From 20332d0cb43cdb93310033a0215aa05af92b01b4 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 2 Jun 2022 11:47:11 +0300 Subject: [PATCH 001/224] added isolated declarations flag. --- src/compiler/commandLineParser.ts | 8 +++ src/compiler/diagnosticMessages.json | 9 ++++ src/compiler/transformers/declarations.ts | 51 +++++++++++++++++-- src/compiler/types.ts | 1 + .../reference/api/tsserverlibrary.d.ts | 1 + tests/baselines/reference/api/typescript.d.ts | 1 + .../tsconfig.json | 1 + .../tsconfig.json | 1 + .../tsconfig.json | 1 + .../tsconfig.json | 1 + .../tsconfig.json | 1 + .../tsconfig.json | 1 + .../tsconfig.json | 1 + .../tsconfig.json | 1 + .../tsconfig.json | 1 + .../tsconfig.json | 1 + .../tsconfig.json | 1 + .../isolatedDeclarations/tsconfig.json | 5 ++ 18 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 tests/baselines/reference/config/showConfig/Shows tsconfig for single option/isolatedDeclarations/tsconfig.json diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 3b2120d258c8c..17fa1418f3a35 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -796,6 +796,14 @@ 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, + transpileOptionValue: true, + defaultValueDescription: false, + }, // Strict Type Checks { diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index f3e482be32ab2..cae918b562a81 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -6095,6 +6095,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 @@ -6605,6 +6610,10 @@ "category": "Error", "code": 9006 }, + "Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit.": { + "category": "Error", + "code": 9007 + }, "JSX attributes must only be assigned a non-empty 'expression'.": { "category": "Error", "code": 17000 diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 4be05fd79eb06..b63d3fed2aff5 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -321,8 +321,15 @@ export function transformDeclarations(context: TransformationContext) { const resolver = context.getEmitResolver(); const options = context.getCompilerOptions(); const { noResolve, stripInternal } = options; + const isolatedDeclarations = false; return transformRoot; + function reportIsolatedDeclarationError(_node: Node) { + // context.addDiagnostic(createDiagnosticForNode( + // node, + // Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit + // )); + } function recordTypeReferenceDirectivesIfNecessary(typeReferenceDirectives: readonly [specifier: string, mode: ResolutionMode][] | undefined): void { if (!typeReferenceDirectives) { return; @@ -743,6 +750,7 @@ export function transformDeclarations(context: TransformationContext) { } function shouldPrintWithInitializer(node: Node) { + if (isolatedDeclarations) return false; return canHaveLiteralInitializer(node) && resolver.isLiteralConstDeclaration(getParseTreeNode(node) as CanHaveLiteralInitializer); // TODO: Make safe } @@ -776,6 +784,13 @@ export function transformDeclarations(context: TransformationContext) { // Literal const declarations will have an initializer ensured rather than a type return; } + if (isolatedDeclarations) { + if (type == undefined) { + reportIsolatedDeclarationError(node); + return factory.createTypeReferenceNode("invalid"); + } + return visitNode(type, visitDeclarationSubtree); + } const shouldUseResolverType = node.kind === SyntaxKind.Parameter && (resolver.isRequiredInitializedParameter(node) || resolver.isOptionalUninitializedParameterProperty(node)); @@ -1391,7 +1406,13 @@ 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); + if (isolatedDeclarations) { + reportIsolatedDeclarationError(input); + } + const type = isolatedDeclarations ? + factory.createTypeReferenceNode("invalud") : + 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)); @@ -1502,8 +1523,14 @@ export function transformDeclarations(context: TransformationContext) { return undefined; // unique symbol or non-identifier name - omit, since there's no syntax that can preserve it } getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration); - const type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags, symbolTracker); + let type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags, symbolTracker); getSymbolAccessibilityDiagnostic = oldDiag; + + if(isolatedDeclarations) { + reportIsolatedDeclarationError(p.valueDeclaration); + type = factory.createTypeReferenceNode("invalid"); + } + const isNonContextualKeywordName = isStringANonContextualKeyword(nameStr); const name = isNonContextualKeywordName ? factory.getGeneratedNameForNode(p.valueDeclaration) : factory.createIdentifier(nameStr); if (isNonContextualKeywordName) { @@ -1685,6 +1712,24 @@ 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 do not allow inferred type in the extends clause + if(isolatedDeclarations) { + reportIsolatedDeclarationError(extendsClause); + 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 = () => ({ @@ -1732,7 +1777,7 @@ export function transformDeclarations(context: TransformationContext) { return cleanup(factory.updateEnumDeclaration(input, factory.createNodeArray(ensureModifiers(input)), input.name, factory.createNodeArray(mapDefined(input.members, m => { if (shouldStripInternal(m)) return; // Rewrite enum values to their constants, if available - const constValue = resolver.getConstantValue(m); + const constValue = isolatedDeclarations? undefined : resolver.getConstantValue(m); return preserveJsDoc(factory.updateEnumMember(m, m.name, constValue !== undefined ? typeof constValue === "string" ? factory.createStringLiteral(constValue) : factory.createNumericLiteral(constValue) : undefined), m); })))); } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index c97bbaffa2834..612a4584b41a1 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -7117,6 +7117,7 @@ export interface CompilerOptions { inlineSourceMap?: boolean; inlineSources?: boolean; isolatedModules?: boolean; + isolatedDeclarations?: boolean; jsx?: JsxEmit; keyofStringsOnly?: boolean; lib?: string[]; diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index ee5fed651ed51..0a8d220d4dc65 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -7195,6 +7195,7 @@ declare namespace ts { inlineSourceMap?: boolean; inlineSources?: boolean; isolatedModules?: boolean; + isolatedDeclarations?: boolean; jsx?: JsxEmit; keyofStringsOnly?: boolean; lib?: string[]; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index debe70be3206c..3acc19c4b8d65 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -3148,6 +3148,7 @@ declare namespace ts { inlineSourceMap?: boolean; inlineSources?: boolean; isolatedModules?: boolean; + isolatedDeclarations?: boolean; jsx?: JsxEmit; keyofStringsOnly?: boolean; lib?: string[]; 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 + } +} From 898d35650950cf29e4ab4f8ce5b07804685e1db2 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 13 Mar 2023 11:30:02 +0000 Subject: [PATCH 002/224] Added extra restrictions to declaration emit in isolated declaration mode. --- src/compiler/checker.ts | 11 +++- src/compiler/transformers/declarations.ts | 59 ++++++++++++++----- src/compiler/utilities.ts | 21 +++++++ .../typeOnly/importsNotUsedAsValues_error.ts | 2 +- 4 files changed, 76 insertions(+), 17 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 4dc1fba15f4f7..f9df1776c6c0f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -1073,6 +1073,7 @@ import { WideningContext, WithStatement, YieldExpression, + isLiteralExpression, } from "./_namespaces/ts"; import * as moduleSpecifiers from "./_namespaces/ts.moduleSpecifiers"; import * as performance from "./_namespaces/ts.performance"; @@ -2705,6 +2706,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return symbol; } if (symbol.flags & SymbolFlags.Alias) { + // Do not take target symbol meaning into account in isolated declaration mode since we don't have access to info from other files. + if(compilerOptions.isolatedDeclarations) { + return symbol; + } const targetFlags = getAllSymbolFlags(symbol); // `targetFlags` will be `SymbolFlags.All` if an error occurred in alias resolution; this avoids cascading errors if (targetFlags & meaning) { @@ -46593,7 +46598,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration): boolean { if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node)) { - return isFreshLiteralType(getTypeOfSymbol(getSymbolOfDeclaration(node))); + // TODO: isolated declarations: Add a test for this. + // In isolated declaration mode we can't really use the freshness of the type as this would require type information. + return compilerOptions.isolatedDeclarations? + !node.type && !!node.initializer && isLiteralExpression(node.initializer): + isFreshLiteralType(getTypeOfSymbol(getSymbolOfDeclaration(node))); } return false; } diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index b63d3fed2aff5..f317d982902fe 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -81,6 +81,7 @@ import { hasDynamicName, hasEffectiveModifier, hasExtension, + hasIdentifierComputedName, hasJSDocNodes, HasModifiers, hasSyntacticModifier, @@ -123,6 +124,7 @@ import { isInterfaceDeclaration, isJsonSourceFile, isLateVisibilityPaintedStatement, + isLiteralExpression, isLiteralImportTypeNode, isMappedTypeNode, isMethodDeclaration, @@ -321,14 +323,14 @@ export function transformDeclarations(context: TransformationContext) { const resolver = context.getEmitResolver(); const options = context.getCompilerOptions(); const { noResolve, stripInternal } = options; - const isolatedDeclarations = false; + const isolatedDeclarations = options.isolatedDeclarations; return transformRoot; - function reportIsolatedDeclarationError(_node: Node) { - // context.addDiagnostic(createDiagnosticForNode( - // node, - // Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit - // )); + function reportIsolatedDeclarationError(node: Node) { + context.addDiagnostic(createDiagnosticForNode( + node, + Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit + )); } function recordTypeReferenceDirectivesIfNecessary(typeReferenceDirectives: readonly [specifier: string, mode: ResolutionMode][] | undefined): void { if (!typeReferenceDirectives) { @@ -588,7 +590,8 @@ export function transformDeclarations(context: TransformationContext) { combinedStatements = setTextRange(factory.createNodeArray([...combinedStatements, createEmptyExports(factory)]), combinedStatements); } } - const updated = factory.updateSourceFile(node, combinedStatements, /*isDeclarationFile*/ true, references, getFileReferencesForUsedTypeReferences(), node.hasNoDefaultLib, getLibReferences()); + const typeReferences = isolatedDeclarations? node.typeReferenceDirectives: getFileReferencesForUsedTypeReferences(); + const updated = factory.updateSourceFile(node, combinedStatements, /*isDeclarationFile*/ true, references, typeReferences, node.hasNoDefaultLib, getLibReferences()); updated.exportedModulesFromDeclarationEmit = exportedModulesFromDeclarationEmit; return updated; @@ -708,7 +711,9 @@ export function transformDeclarations(context: TransformationContext) { if (elem.kind === SyntaxKind.OmittedExpression) { return elem; } - if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { + if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) + // TODO: isolated declarations: find a better way for this since we don't actually do signature usage analysis + && !isolatedDeclarations&& !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { // Unnecessary property renaming is forbidden in types, so remove renaming return factory.updateBindingElement( elem, @@ -750,12 +755,14 @@ export function transformDeclarations(context: TransformationContext) { } function shouldPrintWithInitializer(node: Node) { - if (isolatedDeclarations) return false; return canHaveLiteralInitializer(node) && resolver.isLiteralConstDeclaration(getParseTreeNode(node) as CanHaveLiteralInitializer); // TODO: Make safe } function ensureNoInitializer(node: CanHaveLiteralInitializer) { if (shouldPrintWithInitializer(node)) { + if(node.initializer && isLiteralExpression(node.initializer)) { + return node.initializer; + } return resolver.createLiteralConstValue(getParseTreeNode(node) as CanHaveLiteralInitializer, symbolTracker); // TODO: Make safe } return undefined; @@ -902,7 +909,10 @@ export function transformDeclarations(context: TransformationContext) { if (!isPrivate) { const valueParameter = getSetAccessorValueParameter(input); if (valueParameter) { - const accessorType = getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input)); + const accessorType = + isolatedDeclarations ? + undefined: + getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input)); newValueParameter = ensureParameter(valueParameter, /*modifierMask*/ undefined, accessorType); } } @@ -1038,6 +1048,12 @@ export function transformDeclarations(context: TransformationContext) { } // Augmentation of export depends on import if (resolver.isImportRequiredByAugmentation(decl)) { + if(isolatedDeclarations) { + // TODO: Should report better error here. Suggest we add the syntax import type '....' + // Also add a test for this. + reportIsolatedDeclarationError(decl) + return undefined; + } return factory.updateImportDeclaration( decl, decl.modifiers, @@ -1118,7 +1134,11 @@ export function transformDeclarations(context: TransformationContext) { if (isDeclaration(input)) { if (isDeclarationAndNotVisible(input)) return; if (hasDynamicName(input) && !resolver.isLateBound(getParseTreeNode(input) as Declaration)) { - return; + if (hasIdentifierComputedName(input)) { + reportIsolatedDeclarationError(input); + }else { + return; + } } } @@ -1212,7 +1232,10 @@ 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), @@ -1410,7 +1433,7 @@ export function transformDeclarations(context: TransformationContext) { reportIsolatedDeclarationError(input); } const type = isolatedDeclarations ? - factory.createTypeReferenceNode("invalud") : + factory.createTypeReferenceNode("invalid") : resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker) const varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, type, /*initializer*/ undefined); errorFallbackNode = undefined; @@ -1506,7 +1529,12 @@ export function transformDeclarations(context: TransformationContext) { ensureType(input, input.type), /*body*/ undefined )); - if (clean && resolver.isExpandoFunctionDeclaration(input) && shouldEmitFunctionProperties(input)) { + const isExpandoFunctionDeclaration = clean && resolver.isExpandoFunctionDeclaration(input); + if (isExpandoFunctionDeclaration && shouldEmitFunctionProperties(input)) { + if(isExpandoFunctionDeclaration && isolatedDeclarations) { + reportIsolatedDeclarationError(input); + return clean; + } const props = resolver.getPropertiesOfContainerFunction(input); // 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); @@ -1837,8 +1865,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/utilities.ts b/src/compiler/utilities.ts index fde771ab80db5..42f883d977977 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -4953,6 +4953,27 @@ 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: PropertyName): __String | undefined { switch (name.kind) { 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 From ce662b8ce3935ad9718273ff480dc40a665f9e4b Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 13 Mar 2023 13:12:04 +0000 Subject: [PATCH 003/224] Fix lint errors. --- src/compiler/checker.ts | 1 - src/compiler/transformers/declarations.ts | 31 ++++++++++++----------- src/compiler/utilities.ts | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index f9df1776c6c0f..5283fe610849b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -1073,7 +1073,6 @@ import { WideningContext, WithStatement, YieldExpression, - isLiteralExpression, } from "./_namespaces/ts"; import * as moduleSpecifiers from "./_namespaces/ts.moduleSpecifiers"; import * as performance from "./_namespaces/ts.performance"; diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index f317d982902fe..485fe1507fbaf 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -711,10 +711,10 @@ export function transformDeclarations(context: TransformationContext) { if (elem.kind === SyntaxKind.OmittedExpression) { return elem; } - if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) - // TODO: isolated declarations: find a better way for this since we don't actually do signature usage analysis - && !isolatedDeclarations&& !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { - // Unnecessary property renaming is forbidden in types, so remove renaming + if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) + // TODO: isolated declarations: find a better way for this since we don't actually do signature usage analysis + && !isolatedDeclarations&& !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { + // Unnecessary property renaming is forbidden in types, so remove renaming return factory.updateBindingElement( elem, elem.dotDotDotToken, @@ -792,11 +792,11 @@ export function transformDeclarations(context: TransformationContext) { return; } if (isolatedDeclarations) { - if (type == undefined) { + if (type === undefined) { reportIsolatedDeclarationError(node); return factory.createTypeReferenceNode("invalid"); } - return visitNode(type, visitDeclarationSubtree); + return visitNode(type, visitDeclarationSubtree, isTypeNode); } const shouldUseResolverType = node.kind === SyntaxKind.Parameter && (resolver.isRequiredInitializedParameter(node) || @@ -909,7 +909,7 @@ export function transformDeclarations(context: TransformationContext) { if (!isPrivate) { const valueParameter = getSetAccessorValueParameter(input); if (valueParameter) { - const accessorType = + const accessorType = isolatedDeclarations ? undefined: getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input)); @@ -1051,7 +1051,7 @@ export function transformDeclarations(context: TransformationContext) { if(isolatedDeclarations) { // TODO: Should report better error here. Suggest we add the syntax import type '....' // Also add a test for this. - reportIsolatedDeclarationError(decl) + reportIsolatedDeclarationError(decl); return undefined; } return factory.updateImportDeclaration( @@ -1136,7 +1136,8 @@ export function transformDeclarations(context: TransformationContext) { if (hasDynamicName(input) && !resolver.isLateBound(getParseTreeNode(input) as Declaration)) { if (hasIdentifierComputedName(input)) { reportIsolatedDeclarationError(input); - }else { + } + else { return; } } @@ -1232,7 +1233,7 @@ export function transformDeclarations(context: TransformationContext) { if (isPrivateIdentifier(input.name)) { return cleanup(/*returnValue*/ undefined); } - const accessorType = + const accessorType = isolatedDeclarations ? input.type: getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input)); @@ -1432,9 +1433,9 @@ export function transformDeclarations(context: TransformationContext) { if (isolatedDeclarations) { reportIsolatedDeclarationError(input); } - const type = isolatedDeclarations ? + const type = isolatedDeclarations ? factory.createTypeReferenceNode("invalid") : - resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker) + 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)); @@ -1748,15 +1749,15 @@ export function transformDeclarations(context: TransformationContext) { modifiers, input.name, typeParameters, - factory.createNodeArray([factory.createHeritageClause(SyntaxKind.ExtendsKeyword, + factory.createNodeArray([factory.createHeritageClause(SyntaxKind.ExtendsKeyword, [ factory.createExpressionWithTypeArguments( factory.createIdentifier("invalid"), - /* typeArguments */undefined + /* typeArguments */ undefined, ) ])]), members - )) + )); } const oldId = input.name ? unescapeLeadingUnderscores(input.name.escapedText) : "default"; const newId = factory.createUniqueName(`${oldId}_base`, GeneratedIdentifierFlags.Optimistic); diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 42f883d977977..20f099617cbf7 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -4954,7 +4954,7 @@ export function isDynamicName(name: DeclarationName): boolean { } /** - * + * * @internal */ export function hasIdentifierComputedName(declaration: Declaration): declaration is DynamicNamedDeclaration | DynamicNamedBinaryExpression { From a1f971f1d7653a95eb2f5d7ee15d0ea68492e1f9 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 13 Mar 2023 14:05:18 +0000 Subject: [PATCH 004/224] Fix tests. --- src/compiler/transformers/declarations.ts | 14 ++++++++++---- .../importsNotUsedAsValues_error.errors.txt | 7 +++++-- .../reference/importsNotUsedAsValues_error.js | 7 +++++-- .../reference/importsNotUsedAsValues_error.symbols | 4 ++-- .../reference/importsNotUsedAsValues_error.types | 4 ++-- 5 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 485fe1507fbaf..0709e86518d31 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -760,7 +760,7 @@ export function transformDeclarations(context: TransformationContext) { function ensureNoInitializer(node: CanHaveLiteralInitializer) { if (shouldPrintWithInitializer(node)) { - if(node.initializer && isLiteralExpression(node.initializer)) { + if(isolatedDeclarations && node.initializer && isLiteralExpression(node.initializer)) { return node.initializer; } return resolver.createLiteralConstValue(getParseTreeNode(node) as CanHaveLiteralInitializer, symbolTracker); // TODO: Make safe @@ -1134,7 +1134,7 @@ export function transformDeclarations(context: TransformationContext) { if (isDeclaration(input)) { if (isDeclarationAndNotVisible(input)) return; if (hasDynamicName(input) && !resolver.isLateBound(getParseTreeNode(input) as Declaration)) { - if (hasIdentifierComputedName(input)) { + if (isolatedDeclarations && hasIdentifierComputedName(input)) { reportIsolatedDeclarationError(input); } else { @@ -1741,7 +1741,7 @@ 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 do not allow inferred type in the extends clause + // Isolated declarations does not allow inferred type in the extends clause if(isolatedDeclarations) { reportIsolatedDeclarationError(extendsClause); return cleanup(factory.updateClassDeclaration( @@ -1805,8 +1805,14 @@ export function transformDeclarations(context: TransformationContext) { case SyntaxKind.EnumDeclaration: { return cleanup(factory.updateEnumDeclaration(input, factory.createNodeArray(ensureModifiers(input)), input.name, factory.createNodeArray(mapDefined(input.members, m => { if (shouldStripInternal(m)) return; + if (isolatedDeclarations) { + if (m.initializer && !isLiteralExpression(m.initializer)) { + reportIsolatedDeclarationError(m); + } + return m; + } // Rewrite enum values to their constants, if available - const constValue = isolatedDeclarations? undefined : resolver.getConstantValue(m); + const constValue = resolver.getConstantValue(m); return preserveJsDoc(factory.updateEnumMember(m, m.name, constValue !== undefined ? typeof constValue === "string" ? factory.createStringLiteral(constValue) : factory.createNumericLiteral(constValue) : undefined), m); })))); } 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 4cd9d40aec3f6..985050e04d850 100644 --- a/tests/baselines/reference/importsNotUsedAsValues_error.symbols +++ b/tests/baselines/reference/importsNotUsedAsValues_error.symbols @@ -154,8 +154,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 } @@ -175,6 +175,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 e3d06b246c124..0c3c158c81fb6 100644 --- a/tests/baselines/reference/importsNotUsedAsValues_error.types +++ b/tests/baselines/reference/importsNotUsedAsValues_error.types @@ -151,8 +151,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 } @@ -172,6 +172,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 From 4bd8b7168c3cb420c86f33235b0ce6f020eeffe1 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 16 Mar 2023 12:59:54 +0000 Subject: [PATCH 005/224] Fix duplicate file name in tests. --- .../autoAccessorNoUseDefineForClassFields.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorNoUseDefineForClassFields.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorNoUseDefineForClassFields.ts index 04f0e86b5e090..98dc20d92940a 100644 --- a/tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorNoUseDefineForClassFields.ts +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorNoUseDefineForClassFields.ts @@ -18,7 +18,7 @@ class C3 { accessor #y = 0; } -// @filename: file3.ts +// @filename: file3-2.ts class C3 { accessor x = 0; } From 08d5ca58a54150cc9654e459bb3f8e7891403b63 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 16 Mar 2023 13:47:03 +0000 Subject: [PATCH 006/224] Temporary commit to show an external implementation of declaration emit. --- external-declarations/.gitignore | 5 + external-declarations/package.json | 25 + external-declarations/readme.md | 18 + .../src/code-mod/code-transform.ts | 276 +++ external-declarations/src/code-mod/index.ts | 35 + .../src/code-mod/parallel-run.ts | 88 + .../src/code-mod/test-updater.ts | 141 ++ external-declarations/src/compiler/debug.ts | 319 +++ .../src/compiler/declaration-emit.ts | 1723 +++++++++++++++ .../diagnosticInformationMap.generated.ts | 1893 +++++++++++++++++ .../src/compiler/emit-binder.ts | 696 ++++++ .../src/compiler/emit-host.ts | 69 + .../src/compiler/emit-resolver.ts | 405 ++++ .../src/compiler/lang-utils.ts | 945 ++++++++ .../src/compiler/path-utils.ts | 1097 ++++++++++ .../src/compiler/transform-file.ts | 45 + .../src/compiler/transformer.ts | 451 ++++ external-declarations/src/compiler/types.ts | 502 +++++ external-declarations/src/compiler/utils.ts | 1872 ++++++++++++++++ external-declarations/src/main.ts | 113 + .../src/test-runner/cli-arg-config.ts | 17 + .../src/test-runner/excluded-ts-tests.ts | 21 + .../src/test-runner/parallel-run.ts | 82 + .../src/test-runner/test-runner-main.ts | 138 ++ .../tsc-infrastructure/collections.ts | 326 +++ .../tsc-infrastructure/compiler-run.ts | 231 ++ .../tsc-infrastructure/compiler.ts | 270 +++ .../tsc-infrastructure/fakesHosts.ts | 409 ++++ .../src/test-runner/tsc-infrastructure/io.ts | 177 ++ .../test-runner/tsc-infrastructure/options.ts | 1477 +++++++++++++ .../tsc-infrastructure/test-document.ts | 71 + .../tsc-infrastructure/test-file-parser.ts | 216 ++ .../test-runner/tsc-infrastructure/vary-by.ts | 174 ++ .../src/test-runner/tsc-infrastructure/vfs.ts | 1654 ++++++++++++++ .../test-runner/tsc-infrastructure/vpath.ts | 349 +++ .../src/test-runner/utils.ts | 93 + external-declarations/src/tsconfig.json | 26 + external-declarations/src/utils/cli-parser.ts | 140 ++ external-declarations/src/utils/fs-utils.ts | 119 ++ .../tests/expected/class-all.d.ts | 8 + .../tests/expected/const-var-init.d.ts | 1 + .../tests/expected/const-var.d.ts | 1 + .../tests/expected/export-default.d.ts | 2 + .../tests/expected/functions.d.ts | 8 + .../tests/expected/global.d.ts | 10 + .../tests/expected/imports.d.ts | 7 + .../tests/expected/interface.d.ts | 6 + .../tests/expected/let-var.d.ts | 1 + .../tests/expected/transitive.d.ts | 5 + .../tests/expected/tsconfig.json | 5 + .../tests/expected/type-aliases.d.ts | 8 + external-declarations/tests/source/.gitignore | 1 + .../source/binder/conditionalTypeAliasing.ts | 36 + .../source/binder/default-class-symbol.ts | 5 + .../source/binder/default-function-symbol.ts | 5 + .../source/binder/enum-members-aliasing.ts | 5 + .../source/binder/local-and-export-symbols.ts | 5 + .../tests/source/binder/parameterAliasing.ts | 4 + .../binder/re-exported-import-visibility.ts | 8 + .../tests/source/class-all.ts | 19 + .../tests/source/const-var-init.ts | 1 + .../tests/source/const-var.ts | 1 + .../tests/source/export-default.ts | 2 + .../tests/source/functions.ts | 29 + external-declarations/tests/source/global.ts | 15 + external-declarations/tests/source/imports.ts | 12 + .../tests/source/interface.ts | 6 + external-declarations/tests/source/let-var.ts | 1 + .../tests/source/private-members-typeof.ts | 4 + .../tests/source/transitive.ts | 4 + .../tests/source/tsconfig.json | 6 + .../tests/source/type-aliases.ts | 13 + .../tests/source/unicode-chars.ts | 3 + package.json | 4 +- 74 files changed, 16957 insertions(+), 2 deletions(-) create mode 100644 external-declarations/.gitignore create mode 100644 external-declarations/package.json create mode 100644 external-declarations/readme.md create mode 100644 external-declarations/src/code-mod/code-transform.ts create mode 100644 external-declarations/src/code-mod/index.ts create mode 100644 external-declarations/src/code-mod/parallel-run.ts create mode 100644 external-declarations/src/code-mod/test-updater.ts create mode 100644 external-declarations/src/compiler/debug.ts create mode 100644 external-declarations/src/compiler/declaration-emit.ts create mode 100644 external-declarations/src/compiler/diagnosticInformationMap.generated.ts create mode 100644 external-declarations/src/compiler/emit-binder.ts create mode 100644 external-declarations/src/compiler/emit-host.ts create mode 100644 external-declarations/src/compiler/emit-resolver.ts create mode 100644 external-declarations/src/compiler/lang-utils.ts create mode 100644 external-declarations/src/compiler/path-utils.ts create mode 100644 external-declarations/src/compiler/transform-file.ts create mode 100644 external-declarations/src/compiler/transformer.ts create mode 100644 external-declarations/src/compiler/types.ts create mode 100644 external-declarations/src/compiler/utils.ts create mode 100644 external-declarations/src/main.ts create mode 100644 external-declarations/src/test-runner/cli-arg-config.ts create mode 100644 external-declarations/src/test-runner/excluded-ts-tests.ts create mode 100644 external-declarations/src/test-runner/parallel-run.ts create mode 100644 external-declarations/src/test-runner/test-runner-main.ts create mode 100644 external-declarations/src/test-runner/tsc-infrastructure/collections.ts create mode 100644 external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts create mode 100644 external-declarations/src/test-runner/tsc-infrastructure/compiler.ts create mode 100644 external-declarations/src/test-runner/tsc-infrastructure/fakesHosts.ts create mode 100644 external-declarations/src/test-runner/tsc-infrastructure/io.ts create mode 100644 external-declarations/src/test-runner/tsc-infrastructure/options.ts create mode 100644 external-declarations/src/test-runner/tsc-infrastructure/test-document.ts create mode 100644 external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts create mode 100644 external-declarations/src/test-runner/tsc-infrastructure/vary-by.ts create mode 100644 external-declarations/src/test-runner/tsc-infrastructure/vfs.ts create mode 100644 external-declarations/src/test-runner/tsc-infrastructure/vpath.ts create mode 100644 external-declarations/src/test-runner/utils.ts create mode 100644 external-declarations/src/tsconfig.json create mode 100644 external-declarations/src/utils/cli-parser.ts create mode 100644 external-declarations/src/utils/fs-utils.ts create mode 100644 external-declarations/tests/expected/class-all.d.ts create mode 100644 external-declarations/tests/expected/const-var-init.d.ts create mode 100644 external-declarations/tests/expected/const-var.d.ts create mode 100644 external-declarations/tests/expected/export-default.d.ts create mode 100644 external-declarations/tests/expected/functions.d.ts create mode 100644 external-declarations/tests/expected/global.d.ts create mode 100644 external-declarations/tests/expected/imports.d.ts create mode 100644 external-declarations/tests/expected/interface.d.ts create mode 100644 external-declarations/tests/expected/let-var.d.ts create mode 100644 external-declarations/tests/expected/transitive.d.ts create mode 100644 external-declarations/tests/expected/tsconfig.json create mode 100644 external-declarations/tests/expected/type-aliases.d.ts create mode 100644 external-declarations/tests/source/.gitignore create mode 100644 external-declarations/tests/source/binder/conditionalTypeAliasing.ts create mode 100644 external-declarations/tests/source/binder/default-class-symbol.ts create mode 100644 external-declarations/tests/source/binder/default-function-symbol.ts create mode 100644 external-declarations/tests/source/binder/enum-members-aliasing.ts create mode 100644 external-declarations/tests/source/binder/local-and-export-symbols.ts create mode 100644 external-declarations/tests/source/binder/parameterAliasing.ts create mode 100644 external-declarations/tests/source/binder/re-exported-import-visibility.ts create mode 100644 external-declarations/tests/source/class-all.ts create mode 100644 external-declarations/tests/source/const-var-init.ts create mode 100644 external-declarations/tests/source/const-var.ts create mode 100644 external-declarations/tests/source/export-default.ts create mode 100644 external-declarations/tests/source/functions.ts create mode 100644 external-declarations/tests/source/global.ts create mode 100644 external-declarations/tests/source/imports.ts create mode 100644 external-declarations/tests/source/interface.ts create mode 100644 external-declarations/tests/source/let-var.ts create mode 100644 external-declarations/tests/source/private-members-typeof.ts create mode 100644 external-declarations/tests/source/transitive.ts create mode 100644 external-declarations/tests/source/tsconfig.json create mode 100644 external-declarations/tests/source/type-aliases.ts create mode 100644 external-declarations/tests/source/unicode-chars.ts diff --git a/external-declarations/.gitignore b/external-declarations/.gitignore new file mode 100644 index 0000000000000..9ebf6aba923b5 --- /dev/null +++ b/external-declarations/.gitignore @@ -0,0 +1,5 @@ +/build +/node_modules +/src/*.tsbuildinfo +/tests/actual +/tsc-tests diff --git a/external-declarations/package.json b/external-declarations/package.json new file mode 100644 index 0000000000000..03bb633ab6eb7 --- /dev/null +++ b/external-declarations/package.json @@ -0,0 +1,25 @@ +{ + "name": "external-declarations", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "build": "node ../built/local/tsc.js -p ./src", + "watch": "node ../built/local/tsc.js -w -p ./src", + "run-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=../tests/cases --libPath=../tests/lib --type=all --shardCount=8", + "run-test": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=c:/dev/TSC/TypeScript/tests/cases ", + "transform-tests-parallel": "node ./build/code-mod/parallel-run.js --rootPaths=../tests/cases --shardCount=8", + "transform-test": "node ./build/code-mod/test-updater.js --rootPaths=../tests/cases", + "run-transformed-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=./tsc-tests/updated-tests --libPath=../tests/lib --type=all --shardCount=8", + "run-transformed-test": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=c:/dev/TSC/TypeScript/tests/cases " + }, + "author": "", + "license": "ISC", + "dependencies": { + "source-map-support": "^0.5.21", + "typescript": "../" + }, + "devDependencies": { + "@types/node": "^18.11.18" + } +} diff --git a/external-declarations/readme.md b/external-declarations/readme.md new file mode 100644 index 0000000000000..a46e89f38e6a3 --- /dev/null +++ b/external-declarations/readme.md @@ -0,0 +1,18 @@ +# Implementation of declaration emit + +This implementation uses the the parser and printer from the TypeScript code base but replaces the binder and emit resolver with rewritten versions that do not depend on the type checker. + +The declaration transform itself is mostly the same as the version in TypeScript (with some code erased and different imports) + +## Package scripts + +- `build`/ `watch` - Build the code +- `run-tests-parallel` - Emits declarations using tsc and the stand alone emitter for the tests in the TypeScript code base in parallel. Outputs to `tsc-tests` +- `run-test` - Emits declarations using tsc and the stand alone emitter for the tests in the TypeScript code base on a single thread, or filtered if you specify a test name. Outputs to `tsc-tests` +- `transform-tests-parallel` - Transforms the TypeScript tests t add missing type annotations and write them to `tsc-tests\updated-tests`. Runs in parallel +- `transform-test` - Transforms the TypeScript tests t add missing type annotations and write them to `tsc-tests\updated-tests`. Runs on a single thread. Accepts a test name or regex filter +- `run-transformed-tests-parallel` - Same as `run-tests-parallel` but runs on the transformed tests in `tsc-tests\updated-tests` +- `run-transformed-test`- Same as `run-test` but runs on the transformed tests in `tsc-tests\updated-tests` + + +Note: Tests currently just output the declarations, there is no console error message. Use an external diff tool to see differences. \ No newline at end of file diff --git a/external-declarations/src/code-mod/code-transform.ts b/external-declarations/src/code-mod/code-transform.ts new file mode 100644 index 0000000000000..1b804b9285fd0 --- /dev/null +++ b/external-declarations/src/code-mod/code-transform.ts @@ -0,0 +1,276 @@ +import * as ts from "typescript"; +import { NodeBuilderFlags } from "typescript"; +import { map } from "../compiler/lang-utils"; +import { SymbolTracker } from "../compiler/types"; + +const declarationEmitNodeBuilderFlags = + NodeBuilderFlags.MultilineObjectLiterals | + NodeBuilderFlags.WriteClassExpressionAsTypeLiteral | + NodeBuilderFlags.UseTypeOfFunction | + NodeBuilderFlags.UseStructuralFallback | + NodeBuilderFlags.AllowEmptyTuple | + NodeBuilderFlags.GenerateNamesForShadowedTypeParams | + NodeBuilderFlags.NoTruncation; + + +// Define a transformer function +export function addTypeAnnotationTransformer(program: ts.Program, moduleResolutionHost?: ts.ModuleResolutionHost) { + function tryGetReturnType( + typeChecker: ts.TypeChecker, + node: ts.SignatureDeclaration + ): ts.Type | undefined { + const signature = typeChecker.getSignatureFromDeclaration(node); + if (signature) { + return typeChecker.getReturnTypeOfSignature(signature); + } + } + + function isVarConst(node: ts.VariableDeclaration | ts.VariableDeclarationList): boolean { + return !!(ts.getCombinedNodeFlags(node) & ts.NodeFlags.Const); + } + + function isDeclarationReadonly(declaration: ts.Declaration): boolean { + return !!(ts.getCombinedModifierFlags(declaration) & ts.ModifierFlags.Readonly && !ts.isParameterPropertyDeclaration(declaration, declaration.parent)); + } + + function isLiteralConstDeclaration(node: ts.VariableDeclaration | ts.PropertyDeclaration | ts.PropertySignature | ts.ParameterDeclaration): boolean { + if (isDeclarationReadonly(node) || ts.isVariableDeclaration(node) && isVarConst(node)) { + // TODO: Make sure this is a valid approximation for literal types + return !node.type && 'initializer' in node && !!node.initializer && ts.isLiteralExpression(node.initializer); + // Original TS version + // return isFreshLiteralType(getTypeOfSymbol(getSymbolOfNode(node))); + } + return false; + } + + const typeChecker = program.getTypeChecker(); + + return (context: ts.TransformationContext) => { + let hasError = false; + let reportError = () => { + hasError = true; + } + const symbolTracker: SymbolTracker | undefined = !moduleResolutionHost? undefined : { + trackSymbol(){ return false; }, + reportInaccessibleThisError: reportError, + reportInaccessibleUniqueSymbolError: reportError, + reportCyclicStructureError: reportError, + reportPrivateInBaseOfClassExpression: reportError, + reportLikelyUnsafeImportRequiredError: reportError, + reportTruncationError: reportError, + moduleResolverHost: moduleResolutionHost as any, + trackReferencedAmbientModule(){}, + trackExternalModuleSymbolOfImportTypeNode(){}, + reportNonlocalAugmentation(){}, + reportNonSerializableProperty(){}, + reportImportTypeNodeResolutionModeOverride() {}, + }; + + function typeToTypeNode(type: ts.Type, enclosingDeclaration: ts.Node) { + const typeNode = typeChecker.typeToTypeNode( + type, + enclosingDeclaration, + declarationEmitNodeBuilderFlags, + // @ts-expect-error Use undocumented parameters + symbolTracker, + ) + if (hasError) { + hasError = false; + return undefined; + } + + return typeNode; + } + // Return a visitor function + return (rootNode: ts.Node) => { + function updateTypesInNodeArray(nodeArray: ts.NodeArray): ts.NodeArray + function updateTypesInNodeArray(nodeArray: ts.NodeArray | undefined): ts.NodeArray | undefined + function updateTypesInNodeArray(nodeArray: ts.NodeArray | undefined) { + if(nodeArray === undefined) return undefined; + return ts.factory.createNodeArray( + nodeArray.map(param => { + return visit(param) as ts.ParameterDeclaration; + }) + ) + } + + // Define a visitor function + function visit(node: ts.Node): ts.Node | ts.Node[] { + if(ts.isParameter(node) && !node.type) { + const type = typeChecker.getTypeAtLocation(node); + if(type) { + const typeNode = typeToTypeNode(type, node); + return ts.factory.updateParameterDeclaration( + node, + node.modifiers, + node.dotDotDotToken, + node.name, + node.questionToken, + typeNode, + node.initializer + ) + } + } + // Check if node is a variable declaration + if (ts.isVariableDeclaration(node) && !node.type && !isLiteralConstDeclaration(node)) { + const type = typeChecker.getTypeAtLocation(node); + const typeNode = typeToTypeNode(type, node) + return ts.factory.updateVariableDeclaration( + node, + node.name, + undefined, + typeNode, + node.initializer + ); + } + + if (ts.isFunctionDeclaration(node) && !node.type) { + const type = tryGetReturnType(typeChecker, node); + if(type) { + + const typeNode = typeToTypeNode(type, node); + return ts.factory.updateFunctionDeclaration( + node, + node.modifiers, + node.asteriskToken, + node.name, + updateTypesInNodeArray(node.typeParameters), + updateTypesInNodeArray(node.parameters), + typeNode, + node.body + ) + } + } + if(ts.isPropertySignature(node) && !node.type && !isLiteralConstDeclaration(node)) { + const type = typeChecker.getTypeAtLocation(node); + const typeNode = typeToTypeNode(type, node); + return ts.factory.updatePropertySignature( + node, + node.modifiers, + node.name, + node.questionToken, + typeNode, + ); + } + if(ts.isPropertyDeclaration(node) && !node.type && !isLiteralConstDeclaration(node)) { + const type = typeChecker.getTypeAtLocation(node); + const typeNode = typeToTypeNode(type, node); + return ts.factory.updatePropertyDeclaration( + node, + node.modifiers, + node.name, + node.questionToken ?? node.exclamationToken, + typeNode, + node.initializer + ); + } + if(ts.isMethodSignature(node) && !node.type) { + const type = tryGetReturnType(typeChecker, node); + if(type) { + + const typeNode = typeToTypeNode(type, node); + return ts.factory.updateMethodSignature( + node, + node.modifiers, + node.name, + node.questionToken, + updateTypesInNodeArray(node.typeParameters), + updateTypesInNodeArray(node.parameters), + typeNode, + ); + } + } + if(ts.isCallSignatureDeclaration(node)) { + const type = tryGetReturnType(typeChecker, node); + if(type) { + const typeNode = typeToTypeNode(type, node); + return ts.factory.updateCallSignature( + node, + updateTypesInNodeArray(node.typeParameters), + updateTypesInNodeArray(node.parameters), + typeNode, + ) + } + } + if(ts.isMethodDeclaration(node) && !node.type) { + const type = tryGetReturnType(typeChecker, node); + if(type) { + + const typeNode = typeToTypeNode(type, node); + return ts.factory.updateMethodDeclaration( + node, + node.modifiers, + node.asteriskToken, + node.name, + node.questionToken, + updateTypesInNodeArray(node.typeParameters), + updateTypesInNodeArray(node.parameters), + typeNode, + node.body, + ); + } + } + if(ts.isGetAccessorDeclaration(node) && !node.type) { + const type = tryGetReturnType(typeChecker, node); + if(type) { + const typeNode = typeToTypeNode(type, node); + return ts.factory.updateGetAccessorDeclaration( + node, + node.modifiers, + node.name, + updateTypesInNodeArray(node.parameters), + typeNode, + node.body, + ); + } + } + if(ts.isSetAccessorDeclaration(node) && !node.parameters[0]?.type) { + return ts.factory.updateSetAccessorDeclaration( + node, + node.modifiers, + node.name, + updateTypesInNodeArray(node.parameters), + node.body, + ); + } + if ( ts.isConstructorDeclaration(node)) { + return ts.factory.updateConstructorDeclaration( + node, + node.modifiers, + updateTypesInNodeArray(node.parameters), + node.body, + ) + } + if(ts.isConstructSignatureDeclaration(node)) { + const type = tryGetReturnType(typeChecker, node); + if(type) { + const typeNode = typeToTypeNode(type, node); + return ts.factory.updateConstructSignature( + node, + updateTypesInNodeArray(node.typeParameters), + updateTypesInNodeArray(node.parameters), + typeNode, + ) + } + } + if(ts.isExportAssignment(node) && node.expression.kind !== ts.SyntaxKind.Identifier) { + const type = typeChecker.getTypeAtLocation(node.expression); + if(type) { + const typeNode = typeToTypeNode(type, node); + const newId = ts.factory.createIdentifier("_default"); + const varDecl = ts.factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, typeNode, /*initializer*/ undefined); + const statement = ts.factory.createVariableStatement( + [], + ts.factory.createVariableDeclarationList([varDecl], ts.NodeFlags.Const) + ); + return [statement, ts.factory.updateExportAssignment(node, node.modifiers, newId)]; + } + } + // Otherwise, visit each child node recursively + return ts.visitEachChild(node, visit, context); + } + // Start visiting from root node + return ts.visitNode(rootNode, visit)!; + }; + }; +} \ No newline at end of file diff --git a/external-declarations/src/code-mod/index.ts b/external-declarations/src/code-mod/index.ts new file mode 100644 index 0000000000000..b0cdfec800b0a --- /dev/null +++ b/external-declarations/src/code-mod/index.ts @@ -0,0 +1,35 @@ +// Import TypeScript module +import * as ts from "typescript"; +import { isDeclarationFileName } from "../compiler/utils"; +import { addTypeAnnotationTransformer } from "./code-transform"; + +(ts as any).Debug .enableDebugInfo(); + +// Read tsconfig.json file from disk +const tsconfig = ts.readConfigFile("tsconfig.json", ts.sys.readFile); + +// Parse JSON content to get compiler options and file names +const parsed = ts.parseJsonConfigFileContent(tsconfig.config, ts.sys, "./"); +const options = parsed.options; +// Pass compiler options and file names to createProgram +const program = ts.createProgram(parsed.fileNames, options); + +program.getSemanticDiagnostics(); +const files = program.getSourceFiles(); +for (const file of files) { + if (isDeclarationFileName(file.fileName)) continue; + + const transformedFile = ts.transform(file, [ + addTypeAnnotationTransformer(program), + ]); + + const printer = ts.createPrinter({ + onlyPrintJsDocStyle: true, + newLine: options.newLine, + target: options.target, + } as ts.PrinterOptions); + const resultStr = printer.printFile( + transformedFile.transformed[0] as ts.SourceFile + ); + console.log(resultStr); +} diff --git a/external-declarations/src/code-mod/parallel-run.ts b/external-declarations/src/code-mod/parallel-run.ts new file mode 100644 index 0000000000000..9cf7dec5391ce --- /dev/null +++ b/external-declarations/src/code-mod/parallel-run.ts @@ -0,0 +1,88 @@ +import * as fs from 'fs' +import * as path from 'path' +import * as childProcess from "child_process"; +import { ArgType, parseArgs } from '../utils/cli-parser'; + +type ExecuteResult = { + error: childProcess.ExecException | null + stdout: string, + stderr: string, +} + +function exec(cmd: string, dir: string, onStdOut: (s: string) => void) { + return new Promise((resolve) => { + console.log(`In ${dir} Executing: ${cmd}`); + + const ls = childProcess.spawn(cmd, [], { + cwd: path.resolve(path.join(process.cwd(), dir)), + shell: true + }); + let stdout = "" + let stderr = "" + ls.stdout.on('data', function (data) { + if(!onStdOut) { + process.stdout.write(data.toString()); + } else { + onStdOut(data.toString()); + } + stdout += data.toString(); + }); + + ls.stderr.on('data', function (data) { + process.stderr.write(data.toString()); + stderr += data.toString(); + }); + + ls.on('error', function(err) { + console.log(err); + }) + ls.on('exit', function (code) { + console.log('exited:' + code?.toString()); + resolve({ + error: !code ? null : Object.assign(new Error(""), { + code, + cmd: cmd, + }), + stderr, + stdout + }) + }); + }) +} + +const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), { + default: { + type: ArgType.String(), + description: "Test filter to run", + }, + rootPaths: ArgType.StringArray(), + shardCount: ArgType.Number(), +}); +printUsageOnErrors(); + +const shardCount = parsedArgs.shardCount ?? 6; + +async function main() { + let runCount = 0; + const commandLine = `node ./build/code-mod/test-updater.js ${process.argv.slice(2).join(" ")} ${ + parsedArgs.shardCount === undefined ? `--shardCount=${shardCount} `: "" + }`; + let lastWrite = new Date().getTime(); + const startTime = new Date().getTime(); + const elapsedTime = (now: number) => `${((now - startTime) / 1000 / 60).toFixed(2)} minutes` + const promisees = Array.from({ length: shardCount}).map(async (_, index) => { + await exec(commandLine + ` --shard=${index}`, "./", out => { + runCount += (out.match(/Ran:/g) || []).length; + if(new Date().getTime() - lastWrite > 2000) { + lastWrite = new Date().getTime() + console.log(`Run count: ${runCount} after ${elapsedTime(lastWrite)}`); + } + }); + console.log(`Shard ${index} completed`); + }); + await Promise.all(promisees); + const endTime = new Date().getTime(); + console.log(`Took ${elapsedTime(endTime)} to complete ${runCount}`) +} + +main(); \ No newline at end of file diff --git a/external-declarations/src/code-mod/test-updater.ts b/external-declarations/src/code-mod/test-updater.ts new file mode 100644 index 0000000000000..0087525ddd44c --- /dev/null +++ b/external-declarations/src/code-mod/test-updater.ts @@ -0,0 +1,141 @@ +import 'source-map-support/register'; +import * as fsPath from 'path' +import * as fs from 'fs/promises' +import { parserConfiguration, ArgType, parseArgs } from "../utils/cli-parser"; +import { isDeclarationFile, isJavaScriptFile, isJSONFile, isSourceMapFile, normalizePath } from '../compiler/path-utils'; +import { isRelevantTestFile, loadTestCase } from '../test-runner/utils'; +import ts = require('typescript'); +import { compileFiles, setCompilerOptionsFromHarnessSetting, TestFile } from '../test-runner/tsc-infrastructure/compiler-run'; +import { splitContentByNewlines, TestCaseContent, TestUnitData } from '../test-runner/tsc-infrastructure/test-file-parser'; +import { addTypeAnnotationTransformer } from './code-transform'; +import { ensureDir, readAllFiles } from '../utils/fs-utils'; + +(ts as any).Debug .enableDebugInfo(); + +export const testRunnerCLIConfiguration = parserConfiguration({ + default: { + type: ArgType.String(), + description: "Test filter to run", + }, + rootPaths: ArgType.StringArray(), + shard: ArgType.Number(), + shardCount: ArgType.Number(), +}) + +const excludeFilter =/\/fourslash\//; +const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), testRunnerCLIConfiguration); +printUsageOnErrors(); + +const rootCasePaths = parsedArgs.rootPaths ?? [ './tests/sources' ] +const filter = parsedArgs.default ? new RegExp(parsedArgs.default) : /.*\.ts/ + +const shard = parsedArgs.shard +const shardCount = parsedArgs.shardCount + +const allTests = rootCasePaths + .flatMap(r => readAllFiles(r, filter).map((file) => ({ file, root: r}))) + .filter(f => !excludeFilter.exec(f.file));; + + + +async function writeTestCase(testData: TestCaseContent & { BOM: string }, path: string) { + let lines = splitContentByNewlines(testData.code); + let result: string[] = []; + let copyFrom = 0; + function pushFrom(target: string[], source: string[], from: number = 0, to: number = source.length) { + for(let i = from; i< to; i++) { + target.push(source[i]); + } + } + for (const file of testData.testUnitData) { + if(file.content === undefined) continue; + + pushFrom(result, lines, copyFrom, file.startLine) + + pushFrom(result, splitContentByNewlines(file.content)); + + copyFrom = file.endLine + 1; + } + pushFrom(result, lines, copyFrom, lines.length) + await ensureDir(fsPath.dirname(path)); + const content = testData.BOM + result.join(lines.delimiter); + await fs.writeFile(path, content); +} + +async function main() { + const testsPerShared = shardCount && Math.round(allTests.length / shardCount); + const [start, end] = shard == undefined || shardCount == undefined || testsPerShared == undefined ? + [0, allTests.length] : + [shard * testsPerShared, (shard == shardCount - 1) ? allTests.length : (shard + 1) * testsPerShared]; + + + for (let count = start; count < end; count++) { + const testFile = normalizePath(allTests[count].file); + const rootPath = normalizePath(allTests[count].root); + const caseData = await loadTestCase(testFile); + + const settings: ts.CompilerOptions = {}; + setCompilerOptionsFromHarnessSetting(caseData.settings, settings); + + function createHarnessTestFile(lastUnit: TestUnitData): TestFile { + return { unitName: lastUnit.name, content: lastUnit.content, fileOptions: lastUnit.fileOptions }; + } + + const toBeCompiled = caseData.testUnitData.map(unit => { + return createHarnessTestFile(unit); + }); + + await writeTestCase(caseData, testFile.replace(rootPath, "./tsc-tests/original-tests")) + + const result = compileFiles(toBeCompiled, [], { + declaration: "true", + isolatedDeclarations: "true", + removeComments: "false", + }, settings, undefined); + const program = result.program!; + + + + for(const testFileContent of caseData.testUnitData) { + if(!isRelevantTestFile(testFileContent)) continue; + try { + const sourceFile = program.getSourceFile(testFileContent.name)!; + program.getDeclarationDiagnostics(sourceFile) + + if(!sourceFile) continue; + let moduleResolutionHost: ts.ModuleResolutionHost| undefined = undefined; + program.emit(sourceFile, undefined, undefined, true, { + afterDeclarations:[ + (c) => { + // @ts-expect-error getEmitHost is not exposed + moduleResolutionHost = c.getEmitHost(); + return (v) => v; + }] + }) + const transformedFile = ts.transform(sourceFile, [ + addTypeAnnotationTransformer(program, moduleResolutionHost), + ]); + + const printer = ts.createPrinter({ + onlyPrintJsDocStyle: true, + newLine: settings.newLine, + target: settings.target, + removeComments: false, + } as ts.PrinterOptions); + + + const resultStr = printer.printFile( + transformedFile.transformed[0] as ts.SourceFile + ); + testFileContent.content = resultStr; + }catch(e) { + console.log(`Test ${testFile} failed to transform`) + process.exit(); + } + } + await writeTestCase(caseData, testFile.replace(rootPath, "./tsc-tests/updated-tests")) + console.log(`Ran: ${count}`); + } +} + +main(); \ No newline at end of file diff --git a/external-declarations/src/compiler/debug.ts b/external-declarations/src/compiler/debug.ts new file mode 100644 index 0000000000000..551ea118d26d0 --- /dev/null +++ b/external-declarations/src/compiler/debug.ts @@ -0,0 +1,319 @@ +import { Symbol, Node, NodeArray, SyntaxKind, unescapeLeadingUnderscores, SortedReadonlyArray, NodeFlags, ModifierFlags, EmitFlags, SymbolFlags, TypeFlags, ObjectFlags, FlowFlags, FlowNodeBase, Type, symbolName, LiteralType, BigIntLiteralType, ObjectType, Signature, isIdentifier, idText, isPrivateIdentifier, isStringLiteral, isNumericLiteral, isBigIntLiteral, isTypeParameterDeclaration, isParameter, isConstructorDeclaration, isGetAccessorDeclaration, isSetAccessorDeclaration, isCallSignatureDeclaration, isConstructSignatureDeclaration, isIndexSignatureDeclaration, isTypePredicateNode, isTypeReferenceNode, isFunctionTypeNode, isConstructorTypeNode, isTypeQueryNode, isTypeLiteralNode, isArrayTypeNode, isTupleTypeNode, isOptionalTypeNode, isRestTypeNode, isUnionTypeNode, isIntersectionTypeNode, isConditionalTypeNode, isInferTypeNode, isParenthesizedTypeNode, isThisTypeNode, isTypeOperatorNode, isIndexedAccessTypeNode, isMappedTypeNode, isLiteralTypeNode, isNamedTupleMember, isImportTypeNode, isParseTreeNode, getParseTreeNode, FlowNode, FlowSwitchClause, FlowLabel, MapLike } from "typescript"; +import * as ts from "typescript"; +import { getSourceFileOfNode, getSourceTextOfNodeFromSourceFile} from "./utils"; +import { every, map, stableSort, compareValues } from "./lang-utils"; + +/** @internal */ +export const enum AssertionLevel { + None = 0, + Normal = 1, + Aggressive = 2, + VeryAggressive = 3, +} +type AssertionKeys = keyof typeof Debug; + +const hasOwnProperty = Object.prototype.hasOwnProperty; + +/** + * Indicates whether a map-like contains an own property with the specified key. + * + * @param map A map-like. + * @param key A property key. + * + * @internal + */ +export function hasProperty(map: MapLike, key: string): boolean { + return hasOwnProperty.call(map, key); +} + + + + +/** + * Tests whether an assertion function should be executed. If it shouldn't, it is cached and replaced with `ts.noop`. + * Replaced assertion functions are restored when `Debug.setAssertionLevel` is set to a high enough level. + * @param level The minimum assertion level required. + * @param name The name of the current assertion function. + */ +function shouldAssertFunction(_level: AssertionLevel, _name: K): boolean { + return true; +} + +type AnyFunction = (...a: any) => any; +/** @internal */ +export namespace Debug { + + + export function fail(message?: string, stackCrawlMark?: AnyFunction): never { + debugger; + const e = new Error(message ? `Debug Failure. ${message}` : "Debug Failure."); + if ((Error as any).captureStackTrace) { + (Error as any).captureStackTrace(e, stackCrawlMark || fail); + } + throw e; + } + + export function failBadSyntaxKind(node: Node, message?: string, stackCrawlMark?: AnyFunction): never { + return fail( + `${message || "Unexpected node."}\r\nNode ${formatSyntaxKind(node.kind)} was unexpected.`, + stackCrawlMark || failBadSyntaxKind); + } + + export function assert(expression: unknown, message?: string, verboseDebugInfo?: string | (() => string), stackCrawlMark?: AnyFunction): asserts expression { + if (!expression) { + message = message ? `False expression: ${message}` : "False expression."; + if (verboseDebugInfo) { + message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo()); + } + fail(message, stackCrawlMark || assert); + } + } + + export function assertEqual(a: T, b: T, msg?: string, msg2?: string, stackCrawlMark?: AnyFunction): void { + if (a !== b) { + const message = msg ? msg2 ? `${msg} ${msg2}` : msg : ""; + fail(`Expected ${a} === ${b}. ${message}`, stackCrawlMark || assertEqual); + } + } + + export function assertLessThan(a: number, b: number, msg?: string, stackCrawlMark?: AnyFunction): void { + if (a >= b) { + fail(`Expected ${a} < ${b}. ${msg || ""}`, stackCrawlMark || assertLessThan); + } + } + + export function assertLessThanOrEqual(a: number, b: number, stackCrawlMark?: AnyFunction): void { + if (a > b) { + fail(`Expected ${a} <= ${b}`, stackCrawlMark || assertLessThanOrEqual); + } + } + + export function assertGreaterThanOrEqual(a: number, b: number, stackCrawlMark?: AnyFunction): void { + if (a < b) { + fail(`Expected ${a} >= ${b}`, stackCrawlMark || assertGreaterThanOrEqual); + } + } + + export function assertIsDefined(value: T, message?: string, stackCrawlMark?: AnyFunction): asserts value is NonNullable { + // eslint-disable-next-line no-null/no-null + if (value === undefined || value === null) { + fail(message, stackCrawlMark || assertIsDefined); + } + } + + export function checkDefined(value: T | null | undefined, message?: string, stackCrawlMark?: AnyFunction): T { + assertIsDefined(value, message, stackCrawlMark || checkDefined); + return value; + } + + export function assertEachIsDefined(value: NodeArray, message?: string, stackCrawlMark?: AnyFunction): asserts value is NodeArray; + export function assertEachIsDefined(value: readonly T[], message?: string, stackCrawlMark?: AnyFunction): asserts value is readonly NonNullable[]; + export function assertEachIsDefined(value: readonly T[], message?: string, stackCrawlMark?: AnyFunction) { + for (const v of value) { + assertIsDefined(v, message, stackCrawlMark || assertEachIsDefined); + } + } + + export function checkEachDefined(value: A, message?: string, stackCrawlMark?: AnyFunction): A { + assertEachIsDefined(value, message, stackCrawlMark || checkEachDefined); + return value; + } + + export function assertNever(member: never, message = "Illegal value:", stackCrawlMark?: AnyFunction): never { + const detail = typeof member === "object" && hasProperty(member, "kind") && hasProperty(member, "pos") ? "SyntaxKind: " + formatSyntaxKind((member as Node).kind) : JSON.stringify(member); + return fail(`${message} ${detail}`, stackCrawlMark || assertNever); + } + + export function assertEachNode(nodes: NodeArray, test: (node: T) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts nodes is NodeArray; + export function assertEachNode(nodes: readonly T[], test: (node: T) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts nodes is readonly U[]; + export function assertEachNode(nodes: NodeArray | undefined, test: (node: T) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts nodes is NodeArray | undefined; + export function assertEachNode(nodes: readonly T[] | undefined, test: (node: T) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts nodes is readonly U[] | undefined; + export function assertEachNode(nodes: readonly Node[], test: (node: Node) => boolean, message?: string, stackCrawlMark?: AnyFunction): void; + export function assertEachNode(nodes: readonly Node[] | undefined, test: (node: Node) => boolean, message?: string, stackCrawlMark?: AnyFunction) { + if (shouldAssertFunction(AssertionLevel.Normal, "assertEachNode")) { + assert( + test === undefined || every(nodes, test), + message || "Unexpected node.", + () => `Node array did not pass test '${getFunctionName(test)}'.`, + stackCrawlMark || assertEachNode); + } + } + + export function assertNode(node: T | undefined, test: (node: T) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts node is U; + export function assertNode(node: Node | undefined, test: ((node: Node) => boolean) | undefined, message?: string, stackCrawlMark?: AnyFunction): void; + export function assertNode(node: Node | undefined, test: ((node: Node) => boolean) | undefined, message?: string, stackCrawlMark?: AnyFunction) { + if (shouldAssertFunction(AssertionLevel.Normal, "assertNode")) { + assert( + node !== undefined && (test === undefined || test(node)), + message || "Unexpected node.", + () => `Node ${formatSyntaxKind(node?.kind)} did not pass test '${getFunctionName(test!)}'.`, + stackCrawlMark || assertNode); + } + } + + export function assertNotNode(node: T | undefined, test: (node: Node) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts node is Exclude; + export function assertNotNode(node: Node | undefined, test: ((node: Node) => boolean) | undefined, message?: string, stackCrawlMark?: AnyFunction): void; + export function assertNotNode(node: Node | undefined, test: ((node: Node) => boolean) | undefined, message?: string, stackCrawlMark?: AnyFunction) { + if (shouldAssertFunction(AssertionLevel.Normal, "assertNotNode")) { + assert( + node === undefined || test === undefined || !test(node), + message || "Unexpected node.", + () => `Node ${formatSyntaxKind(node!.kind)} should not have passed test '${getFunctionName(test!)}'.`, + stackCrawlMark || assertNotNode); + } + } + + export function assertOptionalNode(node: T, test: (node: T) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts node is U; + export function assertOptionalNode(node: T | undefined, test: (node: T) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts node is U | undefined; + export function assertOptionalNode(node: Node | undefined, test: ((node: Node) => boolean) | undefined, message?: string, stackCrawlMark?: AnyFunction): void; + export function assertOptionalNode(node: Node | undefined, test: ((node: Node) => boolean) | undefined, message?: string, stackCrawlMark?: AnyFunction) { + if (shouldAssertFunction(AssertionLevel.Normal, "assertOptionalNode")) { + assert( + test === undefined || node === undefined || test(node), + message || "Unexpected node.", + () => `Node ${formatSyntaxKind(node?.kind)} did not pass test '${getFunctionName(test!)}'.`, + stackCrawlMark || assertOptionalNode); + } + } + + export function assertOptionalToken(node: T, kind: K, message?: string, stackCrawlMark?: AnyFunction): asserts node is Extract; + export function assertOptionalToken(node: T | undefined, kind: K, message?: string, stackCrawlMark?: AnyFunction): asserts node is Extract | undefined; + export function assertOptionalToken(node: Node | undefined, kind: SyntaxKind | undefined, message?: string, stackCrawlMark?: AnyFunction): void; + export function assertOptionalToken(node: Node | undefined, kind: SyntaxKind | undefined, message?: string, stackCrawlMark?: AnyFunction) { + if (shouldAssertFunction(AssertionLevel.Normal, "assertOptionalToken")) { + assert( + kind === undefined || node === undefined || node.kind === kind, + message || "Unexpected node.", + () => `Node ${formatSyntaxKind(node?.kind)} was not a '${formatSyntaxKind(kind)}' token.`, + stackCrawlMark || assertOptionalToken); + } + } + + export function assertMissingNode(node: Node | undefined, message?: string, stackCrawlMark?: AnyFunction): asserts node is undefined; + export function assertMissingNode(node: Node | undefined, message?: string, stackCrawlMark?: AnyFunction) { + if (shouldAssertFunction(AssertionLevel.Normal, "assertMissingNode")) { + assert( + node === undefined, + message || "Unexpected node.", + () => `Node ${formatSyntaxKind(node!.kind)} was unexpected'.`, + stackCrawlMark || assertMissingNode); + } + } + + /** + * Asserts a value has the specified type in typespace only (does not perform a runtime assertion). + * This is useful in cases where we switch on `node.kind` and can be reasonably sure the type is accurate, and + * as a result can reduce the number of unnecessary casts. + */ + export function type(value: unknown): asserts value is T; + export function type(_value: unknown) { } + + export function getFunctionName(func: AnyFunction) { + if (typeof func !== "function") { + return ""; + } + else if (hasProperty(func, "name")) { + return (func as any).name; + } + else { + const text = Function.prototype.toString.call(func); + const match = /^function\s+([\w\$]+)\s*\(/.exec(text); + return match ? match[1] : ""; + } + } + + export function formatSymbol(symbol: Symbol): string { + return `{ name: ${unescapeLeadingUnderscores(symbol.escapedName)}; flags: ${formatSymbolFlags(symbol.flags)}; declarations: ${map(symbol.declarations, node => formatSyntaxKind(node.kind))} }`; + } + + /** + * 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); + if (value === 0) { + return members.length > 0 && members[0][0] === 0 ? members[0][1] : "0"; + } + if (isFlags) { + const result: string[] = []; + let remainingFlags = value; + for (const [enumValue, enumName] of members) { + if (enumValue > value) { + break; + } + if (enumValue !== 0 && enumValue & value) { + result.push(enumName); + remainingFlags &= ~enumValue; + } + } + if (remainingFlags === 0) { + return result.join("|"); + } + } + else { + for (const [enumValue, enumName] of members) { + if (enumValue === value) { + return enumName; + } + } + } + return value.toString(); + } + + const enumMemberCache = new Map>(); + + function getEnumMembers(enumObject: any) { + // 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). + const existing = enumMemberCache.get(enumObject); + if (existing) { + return existing; + } + + const result: [number, string][] = []; + for (const name in enumObject) { + const value = enumObject[name]; + if (typeof value === "number") { + result.push([value, name]); + } + } + + const sorted = stableSort<[number, string]>(result, (x, y) => compareValues(x[0], y[0])); + enumMemberCache.set(enumObject, sorted); + return sorted; + } + + export function formatSyntaxKind(kind: SyntaxKind | undefined): string { + return formatEnum(kind, (ts as any).SyntaxKind, /*isFlags*/ false); + } + + + export function formatNodeFlags(flags: NodeFlags | undefined): string { + return formatEnum(flags, (ts as any).NodeFlags, /*isFlags*/ true); + } + + export function formatModifierFlags(flags: ModifierFlags | undefined): string { + return formatEnum(flags, (ts as any).ModifierFlags, /*isFlags*/ true); + } + + export function formatEmitFlags(flags: EmitFlags | undefined): string { + return formatEnum(flags, (ts as any).EmitFlags, /*isFlags*/ true); + } + + export function formatSymbolFlags(flags: SymbolFlags | undefined): string { + return formatEnum(flags, (ts as any).SymbolFlags, /*isFlags*/ true); + } + + export function formatTypeFlags(flags: TypeFlags | undefined): string { + return formatEnum(flags, (ts as any).TypeFlags, /*isFlags*/ true); + } + + export function formatObjectFlags(flags: ObjectFlags | undefined): string { + return formatEnum(flags, (ts as any).ObjectFlags, /*isFlags*/ true); + } + + export function formatFlowFlags(flags: FlowFlags | undefined): string { + return formatEnum(flags, (ts as any).FlowFlags, /*isFlags*/ true); + } +} diff --git a/external-declarations/src/compiler/declaration-emit.ts b/external-declarations/src/compiler/declaration-emit.ts new file mode 100644 index 0000000000000..4d1dc97f9b8f9 --- /dev/null +++ b/external-declarations/src/compiler/declaration-emit.ts @@ -0,0 +1,1723 @@ +import { Symbol, SourceFile, DiagnosticWithLocation, factory, CommentRange, Node, getParseTreeNode, SyntaxKind, SignatureDeclaration, ParameterDeclaration, getTrailingCommentRanges, getLeadingCommentRanges, NodeBuilderFlags, VisitResult, ExportAssignment, DeclarationName, Declaration, ModuleDeclaration, SymbolFlags, getNameOfDeclaration, isExportAssignment, Bundle, visitNodes, setTextRange, createUnparsedSourceFile, FileReference, NodeArray, Statement, isExternalModule, isImportEqualsDeclaration, isExternalModuleReference, isStringLiteralLike, isImportDeclaration, isStringLiteral, UnparsedSource, isUnparsedSource, BindingName, ArrayBindingElement, isIdentifier, ModifierFlags, TypeNode, FunctionDeclaration, MethodDeclaration, GetAccessorDeclaration, SetAccessorDeclaration, BindingElement, ConstructSignatureDeclaration, VariableDeclaration, MethodSignature, CallSignatureDeclaration, PropertyDeclaration, PropertySignature, visitNode, isPropertySignature, NamedDeclaration, isFunctionDeclaration, OmittedExpression, isOmittedExpression, AccessorDeclaration, isSetAccessorDeclaration, TypeParameterDeclaration, isSourceFile, isTypeAliasDeclaration, isModuleDeclaration, isClassDeclaration, isInterfaceDeclaration, isFunctionLike, isIndexSignatureDeclaration, isMappedTypeNode, EntityNameOrEntityNameExpression, setCommentRange, getCommentRange, ImportEqualsDeclaration, ImportDeclaration, ExportDeclaration, ImportTypeNode, StringLiteral, AssertClause, isSemicolonClassElement, isMethodDeclaration, isMethodSignature, isTypeQueryNode, isEntityName, visitEachChild, isPrivateIdentifier, isTypeNode, isTupleTypeNode, getLineAndCharacterOfPosition, setEmitFlags, EmitFlags, setOriginalNode, GeneratedIdentifierFlags, NodeFlags, canHaveModifiers, isTypeParameterDeclaration, NamespaceDeclaration, Identifier, VariableStatement, isPropertyAccessExpression, unescapeLeadingUnderscores, ModuleBody, BindingPattern, isExportDeclaration, HasModifiers, Modifier, isModifier, HeritageClause, InterfaceDeclaration, ClassDeclaration, TypeAliasDeclaration, EnumDeclaration, ConstructorDeclaration, IndexSignatureDeclaration, ExpressionWithTypeArguments, TypeReferenceNode, ConditionalTypeNode, FunctionTypeNode, ConstructorTypeNode, isStatement, isArrayBindingElement, isBindingElement, isClassElement, isExpressionWithTypeArguments, isLiteralExpression, isTypeElement, isVariableDeclaration, NodeFactory } from "typescript"; +import { Debug } from "./debug"; +import { Diagnostics } from "./diagnosticInformationMap.generated"; +import { filter, stringContains, concatenate, last, forEach, length, pushIfUnique, map, mapDefined, arrayFrom, contains, startsWith, some, append, emptyArray, isArray, compact, flatMap, flatten, orderedRemoveItem, tryCast } from "./lang-utils"; +import { getDirectoryPath, normalizeSlashes, toFileNameLowerCase } from "./path-utils"; +import { transformNodes } from "./transformer"; +import { EmitHost, EmitResolver, GetSymbolAccessibilityDiagnostic, LateBoundDeclaration, NodeId, ResolutionMode, SymbolAccessibility, SymbolAccessibilityResult, SymbolTracker, TransformationContext } from "./types"; +import { getEffectiveModifierFlags, skipTrivia, getLeadingCommentRangesOfNode, LateVisibilityPaintedStatement, AnyImportSyntax, getSourceFileOfNode, createDiagnosticForNode, getTextOfNode, declarationNameToString, canProduceDiagnostics, getThisParameter, isDeclaration, DeclarationDiagnosticProducing, setParent, getFirstConstructorWithBody, hasSyntacticModifier, visitArray, AllAccessorDeclarations, isNightly, createGetSymbolAccessibilityDiagnosticForNode, getOriginalNodeId, addRelatedInfo, isExternalOrCommonJsModule, isJsonSourceFile, isSourceFileJS, getResolvedExternalModuleName, isSourceFileNotJson, isAnyImportSyntax, createEmptyExports, isExternalModuleAugmentation, isGlobalScopeAugmentation, isLateVisibilityPaintedStatement, hasDynamicName, hasEffectiveModifier, isBindingPattern, isLiteralImportTypeNode, removeAllComments, needsScopeMarker, hasJSDocNodes, isExternalModuleIndicator, getOutputPathsFor, getSetAccessorValueParameter, getExternalModuleNameFromDeclaration, getExternalModuleImportEqualsDeclarationExpression, getResolutionModeOverrideForClause, isEntityNameExpression, getEffectiveBaseTypeNode, createGetSymbolAccessibilityDiagnosticForNodeName, pathContainsNodeModules, hasIdentifierComputedName, isIdentifierANonContextualKeyword, } from "./utils"; + +/** @internal */ +export function getDeclarationDiagnostics(host: EmitHost, resolver: EmitResolver, file: SourceFile | undefined): DiagnosticWithLocation[] | undefined { + const compilerOptions = host.getCompilerOptions(); + const result = transformNodes(resolver, host, factory, compilerOptions, file ? [file] : filter(host.getSourceFiles(), isSourceFileNotJson), [transformDeclarations], /*allowDtsFiles*/ false); + return result.diagnostics; +} + +function hasInternalAnnotation(range: CommentRange, currentSourceFile: SourceFile) { + const comment = currentSourceFile.text.substring(range.pos, range.end); + return stringContains(comment, "@internal"); +} + +/** @internal */ +export function isInternalDeclaration(node: Node, currentSourceFile: SourceFile) { + const parseTreeNode = getParseTreeNode(node); + if (parseTreeNode && parseTreeNode.kind === SyntaxKind.Parameter) { + const paramIdx = (parseTreeNode.parent as SignatureDeclaration).parameters.indexOf(parseTreeNode as ParameterDeclaration); + const previousSibling = paramIdx > 0 ? (parseTreeNode.parent as SignatureDeclaration).parameters[paramIdx - 1] : undefined; + const text = currentSourceFile.text; + const commentRanges = previousSibling + ? concatenate( + // to handle + // ... parameters, /** @internal */ + // public param: string + getTrailingCommentRanges(text, skipTrivia(text, previousSibling.end + 1, /* stopAfterLineBreak */ false, /* stopAtComments */ true)), + getLeadingCommentRanges(text, node.pos) + ) + : getTrailingCommentRanges(text, skipTrivia(text, node.pos, /* stopAfterLineBreak */ false, /* stopAtComments */ true)); + return commentRanges && commentRanges.length && hasInternalAnnotation(last(commentRanges), currentSourceFile); + } + const leadingCommentRanges = parseTreeNode && getLeadingCommentRangesOfNode(parseTreeNode, currentSourceFile); + return !!forEach(leadingCommentRanges, range => { + return hasInternalAnnotation(range, currentSourceFile); + }); +} + +const declarationEmitNodeBuilderFlags = + NodeBuilderFlags.MultilineObjectLiterals | + NodeBuilderFlags.WriteClassExpressionAsTypeLiteral | + NodeBuilderFlags.UseTypeOfFunction | + NodeBuilderFlags.UseStructuralFallback | + NodeBuilderFlags.AllowEmptyTuple | + NodeBuilderFlags.GenerateNamesForShadowedTypeParams | + NodeBuilderFlags.NoTruncation; + +/** + * Transforms a ts file into a .d.ts file + * This process requires type information, which is retrieved through the emit resolver. Because of this, + * in many places this transformer assumes it will be operating on parse tree nodes directly. + * This means that _no transforms should be allowed to occur before this one_. + * + * @internal + */ +export function transformDeclarations(context: TransformationContext) { + const throwDiagnostic = () => Debug.fail("Diagnostic emitted without context"); + let getSymbolAccessibilityDiagnostic: GetSymbolAccessibilityDiagnostic = throwDiagnostic; + let needsDeclare = true; + let isBundledEmit = false; + let resultHasExternalModuleIndicator = false; + let needsScopeFixMarker = false; + let resultHasScopeMarker = false; + let enclosingDeclaration: Node; + let necessaryTypeReferences: Set<[specifier: string, mode: ResolutionMode]> | 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, + reportImportTypeNodeResolutionModeOverride, + }; + let errorNameNode: DeclarationName | undefined; + let errorFallbackNode: Declaration | undefined; + + let currentSourceFile: SourceFile; + 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 options = context.getCompilerOptions(); + const { noResolve, stripInternal } = options; + const isolatedDeclarations = true; + return transformRoot; + + function reportIsolatedDeclarationError(node: Node) { + context.addDiagnostic(createDiagnosticForNode( + node, + Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit + )); + } + function recordTypeReferenceDirectivesIfNecessary(typeReferenceDirectives: readonly [specifier: string, mode: ResolutionMode][] | undefined): void { + if (!typeReferenceDirectives) { + return; + } + necessaryTypeReferences = necessaryTypeReferences || new Set(); + for (const ref of typeReferenceDirectives) { + necessaryTypeReferences.add(ref); + } + } + + function trackReferencedAmbientModule(node: ModuleDeclaration, symbol: Symbol) { + // If it is visible via `// `, then we should just use that + // TODO: isolatedDeclarations: see about .All flag + const directives = resolver.getTypeReferenceDirectivesForSymbol(symbol, (SymbolFlags as any).All); + if (length(directives)) { + return recordTypeReferenceDirectivesIfNecessary(directives); + } + // Otherwise we should emit a path-based reference + const container = getSourceFileOfNode(node); + refs.set(getOriginalNodeId(container), container); + } + + function handleSymbolAccessibilityError(symbolAccessibilityResult: SymbolAccessibilityResult) { + if (symbolAccessibilityResult.accessibility === SymbolAccessibility.Accessible) { + // Add aliases back onto the possible imports list if they're not there so we can try them again with updated visibility info + if (symbolAccessibilityResult && symbolAccessibilityResult.aliasesToMakeVisible) { + if (!lateMarkedStatements) { + lateMarkedStatements = symbolAccessibilityResult.aliasesToMakeVisible; + } + else { + for (const ref of symbolAccessibilityResult.aliasesToMakeVisible) { + pushIfUnique(lateMarkedStatements, ref); + } + } + } + + // TODO: Do all these accessibility checks inside/after the first pass in the checker when declarations are enabled, if possible + } + else { + // Report error + const errorInfo = getSymbolAccessibilityDiagnostic(symbolAccessibilityResult); + if (errorInfo) { + if (errorInfo.typeName) { + context.addDiagnostic(createDiagnosticForNode(symbolAccessibilityResult.errorNode || errorInfo.errorNode, + errorInfo.diagnosticMessage, + getTextOfNode(errorInfo.typeName), + symbolAccessibilityResult.errorSymbolName, + symbolAccessibilityResult.errorModuleName)); + } + else { + context.addDiagnostic(createDiagnosticForNode(symbolAccessibilityResult.errorNode || errorInfo.errorNode, + errorInfo.diagnosticMessage, + symbolAccessibilityResult.errorSymbolName, + symbolAccessibilityResult.errorModuleName)); + } + return true; + } + } + return false; + } + + 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, /*shouldComputeAliasesToMakeVisible*/ 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 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 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 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 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 reportImportTypeNodeResolutionModeOverride() { + if (!isNightly() && (errorNameNode || errorFallbackNode)) { + context.addDiagnostic(createDiagnosticForNode((errorNameNode || errorFallbackNode)!, Diagnostics.The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next)); + } + } + + function transformDeclarationsForJS(sourceFile: SourceFile, bundled?: boolean) { + const oldDiag = getSymbolAccessibilityDiagnostic; + getSymbolAccessibilityDiagnostic = (s) => (s.errorNode && canProduceDiagnostics(s.errorNode) ? createGetSymbolAccessibilityDiagnosticForNode(s.errorNode)(s) : ({ + diagnosticMessage: s.errorModuleName + ? Diagnostics.Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit + : Diagnostics.Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit, + errorNode: s.errorNode || sourceFile + })); + const result = resolver.getDeclarationStatementsForSourceFile(sourceFile, declarationEmitNodeBuilderFlags, symbolTracker, bundled); + getSymbolAccessibilityDiagnostic = oldDiag; + return result; + } + + function transformRoot(node: Bundle): Bundle; + function transformRoot(node: SourceFile): SourceFile; + function transformRoot(node: SourceFile | Bundle): SourceFile | Bundle; + function transformRoot(node: SourceFile | Bundle) { + if (node.kind === SyntaxKind.SourceFile && node.isDeclarationFile) { + return node; + } + + if (node.kind === SyntaxKind.Bundle) { + isBundledEmit = true; + refs = new Map(); + libs = new Map(); + let hasNoDefaultLib = false; + const bundle = factory.createBundle(map(node.sourceFiles, + sourceFile => { + if (sourceFile.isDeclarationFile) return undefined!; // Omit declaration files from bundle results, too // TODO: GH#18217 + hasNoDefaultLib = hasNoDefaultLib || sourceFile.hasNoDefaultLib; + currentSourceFile = sourceFile; + enclosingDeclaration = sourceFile; + lateMarkedStatements = undefined; + suppressNewDiagnosticContexts = false; + lateStatementReplacementMap = new Map(); + getSymbolAccessibilityDiagnostic = throwDiagnostic; + needsScopeFixMarker = false; + resultHasScopeMarker = false; + collectReferences(sourceFile, refs); + collectLibs(sourceFile, libs); + if (isExternalOrCommonJsModule(sourceFile) || isJsonSourceFile(sourceFile)) { + resultHasExternalModuleIndicator = false; // unused in external module bundle emit (all external modules are within module blocks, therefore are known to be modules) + needsDeclare = false; + const statements = isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile, /*bundled*/ true)) : visitNodes(sourceFile.statements, visitDeclarationStatements, isStatement); + const newFile = factory.updateSourceFile(sourceFile, [factory.createModuleDeclaration( + [factory.createModifier(SyntaxKind.DeclareKeyword)], + factory.createStringLiteral(getResolvedExternalModuleName(context.getEmitHost(), sourceFile)), + factory.createModuleBlock(setTextRange(factory.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), sourceFile.statements)) + )], /*isDeclarationFile*/ true, /*referencedFiles*/ [], /*typeReferences*/ [], /*hasNoDefaultLib*/ false, /*libReferences*/ []); + return newFile; + } + needsDeclare = true; + 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*/ []); + } + ), mapDefined(node.prepends, prepend => { + if (prepend.kind === SyntaxKind.InputFiles) { + const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); + hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; + collectReferences(sourceFile, refs); + recordTypeReferenceDirectivesIfNecessary(map(sourceFile.typeReferenceDirectives, ref => [ref.fileName, ref.resolutionMode])); + collectLibs(sourceFile, libs); + return sourceFile; + } + return prepend; + })); + bundle.syntheticFileReferences = []; + 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); + return bundle; + } + + // Single source file + needsDeclare = true; + needsScopeFixMarker = false; + resultHasScopeMarker = false; + enclosingDeclaration = node; + currentSourceFile = node; + getSymbolAccessibilityDiagnostic = throwDiagnostic; + isBundledEmit = false; + resultHasExternalModuleIndicator = false; + suppressNewDiagnosticContexts = false; + lateMarkedStatements = undefined; + lateStatementReplacementMap = new Map(); + necessaryTypeReferences = undefined; + 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); + let combinedStatements: NodeArray; + if (isSourceFileJS(currentSourceFile)) { + combinedStatements = factory.createNodeArray(transformDeclarationsForJS(node)); + 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); + emittedImports = filter(combinedStatements, isAnyImportSyntax); + if (isExternalModule(node) && (!resultHasExternalModuleIndicator || (needsScopeFixMarker && !resultHasScopeMarker))) { + combinedStatements = setTextRange(factory.createNodeArray([...combinedStatements, createEmptyExports(factory)]), combinedStatements); + } + } + const typeReferences = isolatedDeclarations? node.typeReferenceDirectives: getFileReferencesForUsedTypeReferences(); + const updated = factory.updateSourceFile(node, combinedStatements, /*isDeclarationFile*/ true, references, typeReferences, node.hasNoDefaultLib, getLibReferences()); + updated.exportedModulesFromDeclarationEmit = exportedModulesFromDeclarationEmit; + return updated; + + function getLibReferences() { + return arrayFrom(libs.keys(), lib => ({ fileName: lib, pos: -1, end: -1 })); + } + + function getFileReferencesForUsedTypeReferences() { + return necessaryTypeReferences ? mapDefined(arrayFrom(necessaryTypeReferences.keys()), getFileReferenceForSpecifierModeTuple) : []; + } + + function getFileReferenceForSpecifierModeTuple([typeName, mode]: [specifier: string, mode: ResolutionMode]): FileReference | undefined { + // Elide type references for which we have imports + if (emittedImports) { + for (const importStatement of emittedImports) { + if (isImportEqualsDeclaration(importStatement) && isExternalModuleReference(importStatement.moduleReference)) { + const expr = importStatement.moduleReference.expression; + if (isStringLiteralLike(expr) && expr.text === typeName) { + return undefined; + } + } + else if (isImportDeclaration(importStatement) && isStringLiteral(importStatement.moduleSpecifier) && importStatement.moduleSpecifier.text === typeName) { + return undefined; + } + } + } + return { fileName: typeName, pos: -1, end: -1, ...(mode ? { resolutionMode: mode } : undefined) }; + } + + function mapReferencesIntoArray(references: FileReference[], outputFilePath: string): (file: SourceFile) => void { + return file => { + let fileName = file.fileName; + if(!fileName.endsWith(".d.ts") && fileName.endsWith(".ts")) { + fileName = fileName.substring(0, fileName.length - 3) + ".d.ts"; + } + references.push({ pos: -1, end: -1, fileName }); + }; + } + } + + function collectReferences(sourceFile: SourceFile | UnparsedSource, ret: Map) { + if (noResolve || (!isUnparsedSource(sourceFile) && isSourceFileJS(sourceFile))) return ret; + forEach(sourceFile.referencedFiles, f => { + const elem = host.getSourceFileFromReference(sourceFile, f); + if (elem) { + ret.set(getOriginalNodeId(elem), elem); + } + }); + return ret; + } + + function collectLibs(sourceFile: SourceFile | UnparsedSource, ret: Map) { + forEach(sourceFile.libReferenceDirectives, ref => { + const lib = host.getLibFileFromReference(ref); + if (lib) { + ret.set(toFileNameLowerCase(ref.fileName), true); + } + }); + return ret; + } + + function filterBindingPatternInitializersAndRenamings(name: BindingName) { + if (name.kind === SyntaxKind.Identifier) { + return name; + } + else { + if (name.kind === SyntaxKind.ArrayBindingPattern) { + return factory.updateArrayBindingPattern(name, visitNodes(name.elements, visitBindingElement, isArrayBindingElement)); + } + else { + return factory.updateObjectBindingPattern(name, visitNodes(name.elements, visitBindingElement, isBindingElement)); + } + } + + function visitBindingElement(elem: T): T; + function visitBindingElement(elem: ArrayBindingElement): ArrayBindingElement { + if (elem.kind === SyntaxKind.OmittedExpression) { + return elem; + } + if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) + // TODO: isolated declarations: find a better way for this since we don't actually do signature usage analysis + && !isolatedDeclarations && !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { + // Unnecessary property renaming is forbidden in types, so remove renaming + return factory.updateBindingElement( + elem, + elem.dotDotDotToken, + /* propertyName */ undefined, + elem.propertyName, + shouldPrintWithInitializer(elem) ? elem.initializer : undefined + ); + } + return factory.updateBindingElement( + elem, + elem.dotDotDotToken, + elem.propertyName, + filterBindingPatternInitializersAndRenamings(elem.name), + shouldPrintWithInitializer(elem) ? elem.initializer : undefined + ); + } + } + + function ensureParameter(p: ParameterDeclaration, modifierMask?: ModifierFlags, type?: TypeNode): ParameterDeclaration { + let oldDiag: typeof getSymbolAccessibilityDiagnostic | undefined; + if (!suppressNewDiagnosticContexts) { + oldDiag = getSymbolAccessibilityDiagnostic; + getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(p); + } + const newParam = factory.updateParameterDeclaration( + p, + maskModifiers(factory, p, modifierMask), + p.dotDotDotToken, + filterBindingPatternInitializersAndRenamings(p.name), + resolver.isOptionalParameter(p) ? (p.questionToken || factory.createToken(SyntaxKind.QuestionToken)) : undefined, + ensureType(p, type || p.type, /*ignorePrivate*/ true), // Ignore private param props, since this type is going straight back into a param + ensureNoInitializer(p) + ); + if (!suppressNewDiagnosticContexts) { + getSymbolAccessibilityDiagnostic = oldDiag!; + } + return newParam; + } + + function shouldPrintWithInitializer(node: Node) { + 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 makeInvalidType() { + return factory.createTypeReferenceNode("invalid"); + } + 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) + return; + } + if (shouldPrintWithInitializer(node)) { + // Literal const declarations will have an initializer ensured rather than a type + return; + } + if (isolatedDeclarations) { + if (type === undefined) { + reportIsolatedDeclarationError(node); + return makeInvalidType(); + } + return visitNode(type, visitDeclarationSubtree, isTypeNode); + } + const shouldUseResolverType = node.kind === SyntaxKind.Parameter && + (resolver.isRequiredInitializedParameter(node) || + resolver.isOptionalUninitializedParameterProperty(node)); + if (type && !shouldUseResolverType) { + return visitNode(type, visitDeclarationSubtree, isTypeNode); + } + if (!getParseTreeNode(node)) { + return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); + } + if (node.kind === SyntaxKind.SetAccessor) { + // Set accessors with no associated type node (from it's param or get accessor return) are `any` since they are never contextually typed right now + // (The inferred type here will be void, but the old declaration emitter printed `any`, so this replicates that) + return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); + } + errorNameNode = node.name; + let oldDiag: typeof getSymbolAccessibilityDiagnostic; + if (!suppressNewDiagnosticContexts) { + oldDiag = getSymbolAccessibilityDiagnostic; + getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node); + } + if (node.kind === SyntaxKind.VariableDeclaration || node.kind === SyntaxKind.BindingElement) { + return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); + } + if (node.kind === SyntaxKind.Parameter + || node.kind === SyntaxKind.PropertyDeclaration + || node.kind === SyntaxKind.PropertySignature) { + if (isPropertySignature(node) || !node.initializer) return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType)); + return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType) || resolver.createTypeOfExpression(node.initializer, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); + } + return cleanup(resolver.createReturnTypeOfSignatureDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); + + function cleanup(returnValue: TypeNode | undefined) { + errorNameNode = undefined; + if (!suppressNewDiagnosticContexts) { + getSymbolAccessibilityDiagnostic = oldDiag; + } + return returnValue || factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); + } + } + + function isDeclarationAndNotVisible(node: NamedDeclaration) { + node = getParseTreeNode(node) as NamedDeclaration; + switch (node.kind) { + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.ModuleDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.ClassDeclaration: + case SyntaxKind.TypeAliasDeclaration: + case SyntaxKind.EnumDeclaration: + return !resolver.isDeclarationVisible(node); + // The following should be doing their own visibility checks based on filtering their members + case SyntaxKind.VariableDeclaration: + return !getBindingNameVisible(node as VariableDeclaration); + case SyntaxKind.ImportEqualsDeclaration: + case SyntaxKind.ImportDeclaration: + case SyntaxKind.ExportDeclaration: + case SyntaxKind.ExportAssignment: + return false; + case SyntaxKind.ClassStaticBlockDeclaration: + return true; + } + return false; + } + + // If the ExpandoFunctionDeclaration have multiple overloads, then we only need to emit properties for the last one. + function shouldEmitFunctionProperties(input: FunctionDeclaration) { + if (input.body) { + return true; + } + + const overloadSignatures = input.symbol.declarations?.filter(decl => isFunctionDeclaration(decl) && !decl.body); + return !overloadSignatures || overloadSignatures.indexOf(input) === overloadSignatures.length - 1; + } + + function getBindingNameVisible(elem: BindingElement | VariableDeclaration | OmittedExpression): boolean { + if (isOmittedExpression(elem)) { + return false; + } + if (isBindingPattern(elem.name)) { + // If any child binding pattern element has been marked visible (usually by collect linked aliases), then this is visible + return some(elem.name.elements, getBindingNameVisible); + } + else { + return resolver.isDeclarationVisible(elem); + } + } + + function updateParamsList(node: Node, params: NodeArray, modifierMask?: ModifierFlags): NodeArray { + if (hasEffectiveModifier(node, ModifierFlags.Private)) { + return factory.createNodeArray(); + } + const newParams = map(params, p => ensureParameter(p, modifierMask)); + if (!newParams) { + return factory.createNodeArray(); + } + return factory.createNodeArray(newParams, params.hasTrailingComma); + } + + function updateAccessorParamsList(input: AccessorDeclaration, isPrivate: boolean) { + let newParams: ParameterDeclaration[] | undefined; + if (!isPrivate) { + const thisParameter = getThisParameter(input); + if (thisParameter) { + newParams = [ensureParameter(thisParameter)]; + } + } + if (isSetAccessorDeclaration(input)) { + let newValueParameter: ParameterDeclaration | undefined; + if (!isPrivate) { + const valueParameter = getSetAccessorValueParameter(input); + if (valueParameter) { + const accessorType = + isolatedDeclarations ? + undefined: + getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input)); + newValueParameter = ensureParameter(valueParameter, /*modifierMask*/ undefined, accessorType); + } + } + if (!newValueParameter) { + newValueParameter = factory.createParameterDeclaration( + /*modifiers*/ undefined, + /*dotDotDotToken*/ undefined, + "value" + ); + } + newParams = append(newParams, newValueParameter); + } + return factory.createNodeArray(newParams || emptyArray); + } + + function ensureTypeParams(node: Node, params: NodeArray | undefined) { + return hasEffectiveModifier(node, ModifierFlags.Private) ? undefined : visitNodes(params, visitDeclarationSubtree, isTypeParameterDeclaration); + } + + function isEnclosingDeclaration(node: Node) { + return isSourceFile(node) + || isTypeAliasDeclaration(node) + || isModuleDeclaration(node) + || isClassDeclaration(node) + || isInterfaceDeclaration(node) + || isFunctionLike(node) + || isIndexSignatureDeclaration(node) + || isMappedTypeNode(node); + } + + function checkEntityNameVisibility(entityName: EntityNameOrEntityNameExpression, enclosingDeclaration: Node) { + const visibilityResult = resolver.isEntityNameVisible(entityName, enclosingDeclaration); + handleSymbolAccessibilityError(visibilityResult); + recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForEntityName(entityName)); + } + + function preserveJsDoc(updated: T, original: Node): T { + if (hasJSDocNodes(updated) && hasJSDocNodes(original)) { + updated.jsDoc = original.jsDoc; + } + return setCommentRange(updated, getCommentRange(original)); + } + + 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); + } + } + else { + const symbol = resolver.getSymbolOfExternalModuleSpecifier(input); + if (symbol) { + (exportedModulesFromDeclarationEmit || (exportedModulesFromDeclarationEmit = [])).push(symbol); + } + } + } + return input; + } + + function transformImportEqualsDeclaration(decl: ImportEqualsDeclaration) { + if (!resolver.isDeclarationVisible(decl)) return; + if (decl.moduleReference.kind === SyntaxKind.ExternalModuleReference) { + // Rewrite external module names if necessary + const specifier = getExternalModuleImportEqualsDeclarationExpression(decl); + return factory.updateImportEqualsDeclaration( + decl, + decl.modifiers, + decl.isTypeOnly, + decl.name, + factory.updateExternalModuleReference(decl.moduleReference, rewriteModuleSpecifier(decl, specifier)) + ); + } + else { + const oldDiag = getSymbolAccessibilityDiagnostic; + getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(decl); + checkEntityNameVisibility(decl.moduleReference, enclosingDeclaration); + getSymbolAccessibilityDiagnostic = oldDiag; + return decl; + } + } + + function transformImportDeclaration(decl: ImportDeclaration) { + if (!decl.importClause) { + // import "mod" - possibly needed for side effects? (global interface patches, module augmentations, etc) + return factory.updateImportDeclaration( + decl, + decl.modifiers, + decl.importClause, + rewriteModuleSpecifier(decl, decl.moduleSpecifier), + getResolutionModeOverrideForClauseInNightly(decl.assertClause) + ); + } + // The `importClause` visibility corresponds to the default's visibility. + const visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : undefined; + if (!decl.importClause.namedBindings) { + // No named bindings (either namespace or list), meaning the import is just default or should be elided + return visibleDefaultBinding && factory.updateImportDeclaration(decl, decl.modifiers, factory.updateImportClause( + decl.importClause, + decl.importClause.isTypeOnly, + visibleDefaultBinding, + /*namedBindings*/ undefined, + ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)); + } + if (decl.importClause.namedBindings.kind === SyntaxKind.NamespaceImport) { + // Namespace import (optionally with visible default) + const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : /*namedBindings*/ undefined; + return visibleDefaultBinding || namedBindings ? factory.updateImportDeclaration(decl, decl.modifiers, factory.updateImportClause( + decl.importClause, + decl.importClause.isTypeOnly, + visibleDefaultBinding, + namedBindings, + ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)) : undefined; + } + // Named imports (optionally with visible default) + const bindingList = mapDefined(decl.importClause.namedBindings.elements, b => resolver.isDeclarationVisible(b) ? b : undefined); + if ((bindingList && bindingList.length) || visibleDefaultBinding) { + return factory.updateImportDeclaration( + decl, + decl.modifiers, + factory.updateImportClause( + decl.importClause, + decl.importClause.isTypeOnly, + visibleDefaultBinding, + bindingList && bindingList.length ? factory.updateNamedImports(decl.importClause.namedBindings, bindingList) : undefined, + ), + rewriteModuleSpecifier(decl, decl.moduleSpecifier), + getResolutionModeOverrideForClauseInNightly(decl.assertClause) + ); + } + // Augmentation of export depends on import + if (resolver.isImportRequiredByAugmentation(decl)) { + if(isolatedDeclarations) { + // TODO: Should report better error here. Suggest we add the syntax import type '....' + // Also add a test for this. + reportIsolatedDeclarationError(decl); + return undefined; + } + return factory.updateImportDeclaration( + decl, + decl.modifiers, + /*importClause*/ undefined, + rewriteModuleSpecifier(decl, decl.moduleSpecifier), + getResolutionModeOverrideForClauseInNightly(decl.assertClause) + ); + } + // Nothing visible + } + + function getResolutionModeOverrideForClauseInNightly(assertClause: AssertClause | undefined) { + const mode = getResolutionModeOverrideForClause(assertClause); + if (mode !== undefined) { + if (!isNightly()) { + context.addDiagnostic(createDiagnosticForNode(assertClause!, Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next)); + } + return assertClause; + } + return undefined; + } + + function transformAndReplaceLatePaintedStatements(statements: NodeArray): NodeArray { + // This is a `while` loop because `handleSymbolAccessibilityError` can see additional import aliases marked as visible during + // error handling which must now be included in the output and themselves checked for errors. + // For example: + // ``` + // module A { + // export module Q {} + // import B = Q; + // import C = B; + // export import D = C; + // } + // ``` + // In such a scenario, only Q and D are initially visible, but we don't consider imports as private names - instead we say they if they are referenced they must + // be recorded. So while checking D's visibility we mark C as visible, then we must check C which in turn marks B, completing the chain of + // dependent imports and allowing a valid declaration file output. Today, this dependent alias marking only happens for internal import aliases. + while (length(lateMarkedStatements)) { + const i = lateMarkedStatements!.shift()!; + if (!isLateVisibilityPaintedStatement(i)) { + return Debug.fail(`Late replaced statement was found which is not handled by the declaration transformer!: ${Debug.formatSyntaxKind((i as Node).kind)}`); + } + const priorNeedsDeclare = needsDeclare; + needsDeclare = i.parent && isSourceFile(i.parent) && !(isExternalModule(i.parent) && isBundledEmit); + const result = transformTopLevelDeclaration(i); + needsDeclare = priorNeedsDeclare; + lateStatementReplacementMap.set(getOriginalNodeId(i), result); + } + + // And lastly, we need to get the final form of all those indetermine import declarations from before and add them to the output list + // (and remove them from the set to examine for outter declarations) + return visitNodes(statements, visitLateVisibilityMarkedStatements, isStatement); + + function visitLateVisibilityMarkedStatements(statement: Statement) { + if (isLateVisibilityPaintedStatement(statement)) { + const key = getOriginalNodeId(statement); + if (lateStatementReplacementMap.has(key)) { + const result = lateStatementReplacementMap.get(key) as Statement | readonly Statement[] | undefined; + lateStatementReplacementMap.delete(key); + if (result) { + if (isArray(result) ? some(result, needsScopeMarker) : needsScopeMarker(result)) { + // Top-level declarations in .d.ts files are always considered exported even without a modifier unless there's an export assignment or specifier + needsScopeFixMarker = true; + } + if (isSourceFile(statement.parent) && (isArray(result) ? some(result, isExternalModuleIndicator) : isExternalModuleIndicator(result))) { + resultHasExternalModuleIndicator = true; + } + } + return result; + } + } + return statement; + } + } + + function visitDeclarationSubtree(input: Node): VisitResult { + if (shouldStripInternal(input)) return; + if (isDeclaration(input)) { + if (isDeclarationAndNotVisible(input)) return; + if (hasDynamicName(input) && !resolver.isLateBound(getParseTreeNode(input) as Declaration)) { + if (isolatedDeclarations && hasIdentifierComputedName(input)) { + reportIsolatedDeclarationError(input); + } + else { + return; + } + } + } + + // Elide implementation signatures from overload sets + if (isFunctionLike(input) && resolver.isImplementationOfOverload(input)) return; + + // Elide semicolon class statements + if (isSemicolonClassElement(input)) return; + + let previousEnclosingDeclaration: typeof enclosingDeclaration; + if (isEnclosingDeclaration(input)) { + previousEnclosingDeclaration = enclosingDeclaration; + enclosingDeclaration = input as Declaration; + } + const oldDiag = getSymbolAccessibilityDiagnostic; + + // Setup diagnostic-related flags before first potential `cleanup` call, otherwise + // We'd see a TDZ violation at runtime + const canProduceDiagnostic = canProduceDiagnostics(input); + const oldWithinObjectLiteralType = suppressNewDiagnosticContexts; + let shouldEnterSuppressNewDiagnosticsContextContext = ((input.kind === SyntaxKind.TypeLiteral || input.kind === SyntaxKind.MappedType) && input.parent.kind !== SyntaxKind.TypeAliasDeclaration); + + // Emit methods which are private as properties with no type information + if (isMethodDeclaration(input) || isMethodSignature(input)) { + if (hasEffectiveModifier(input, ModifierFlags.Private)) { + if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) return; // Elide all but the first overload + return cleanup(factory.createPropertyDeclaration(ensureModifiers(input), input.name, /*questionToken*/ undefined, /*type*/ undefined, /*initializer*/ undefined)); + } + } + + if (canProduceDiagnostic && !suppressNewDiagnosticContexts) { + getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(input); + } + + if (isTypeQueryNode(input)) { + checkEntityNameVisibility(input.exprName, enclosingDeclaration); + } + + if (shouldEnterSuppressNewDiagnosticsContextContext) { + // We stop making new diagnostic contexts within object literal types. Unless it's an object type on the RHS of a type alias declaration. Then we do. + suppressNewDiagnosticContexts = true; + } + + if (isProcessedComponent(input)) { + switch (input.kind) { + case SyntaxKind.ExpressionWithTypeArguments: { + if ((isEntityName(input.expression) || isEntityNameExpression(input.expression))) { + checkEntityNameVisibility(input.expression, enclosingDeclaration); + } + const node = visitEachChild(input, visitDeclarationSubtree, context); + return cleanup(factory.updateExpressionWithTypeArguments(node, node.expression, node.typeArguments)); + } + case SyntaxKind.TypeReference: { + checkEntityNameVisibility(input.typeName, enclosingDeclaration); + const node = visitEachChild(input, visitDeclarationSubtree, context); + return cleanup(factory.updateTypeReferenceNode(node, node.typeName, node.typeArguments)); + } + case SyntaxKind.ConstructSignature: + return cleanup(factory.updateConstructSignature( + input, + ensureTypeParams(input, input.typeParameters), + updateParamsList(input, input.parameters), + ensureType(input, input.type) + )); + case SyntaxKind.Constructor: { + // A constructor declaration may not have a type annotation + const ctor = factory.createConstructorDeclaration( + /*modifiers*/ ensureModifiers(input), + updateParamsList(input, input.parameters, ModifierFlags.None), + /*body*/ undefined + ); + return cleanup(ctor); + } + case SyntaxKind.MethodDeclaration: { + if (isPrivateIdentifier(input.name)) { + return cleanup(/*returnValue*/ undefined); + } + const sig = factory.createMethodDeclaration( + ensureModifiers(input), + /*asteriskToken*/ undefined, + input.name, + input.questionToken, + ensureTypeParams(input, input.typeParameters), + updateParamsList(input, input.parameters), + ensureType(input, input.type), + /*body*/ undefined + ); + return cleanup(sig); + } + case SyntaxKind.GetAccessor: { + if (isPrivateIdentifier(input.name)) { + return cleanup(/*returnValue*/ undefined); + } + const accessorType = + isolatedDeclarations ? + input.type: + getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input)); + return cleanup(factory.updateGetAccessorDeclaration( + input, + ensureModifiers(input), + input.name, + updateAccessorParamsList(input, hasEffectiveModifier(input, ModifierFlags.Private)), + ensureType(input, accessorType), + /*body*/ undefined)); + } + case SyntaxKind.SetAccessor: { + if (isPrivateIdentifier(input.name)) { + return cleanup(/*returnValue*/ undefined); + } + return cleanup(factory.updateSetAccessorDeclaration( + input, + ensureModifiers(input), + input.name, + updateAccessorParamsList(input, hasEffectiveModifier(input, ModifierFlags.Private)), + /*body*/ undefined)); + } + case SyntaxKind.PropertyDeclaration: + if (isPrivateIdentifier(input.name)) { + return cleanup(/*returnValue*/ undefined); + } + return cleanup(factory.updatePropertyDeclaration( + input, + ensureModifiers(input), + input.name, + input.questionToken, + ensureType(input, input.type), + ensureNoInitializer(input) + )); + case SyntaxKind.PropertySignature: + if (isPrivateIdentifier(input.name)) { + return cleanup(/*returnValue*/ undefined); + } + return cleanup(factory.updatePropertySignature( + input, + ensureModifiers(input), + input.name, + input.questionToken, + ensureType(input, input.type) + )); + case SyntaxKind.MethodSignature: { + if (isPrivateIdentifier(input.name)) { + return cleanup(/*returnValue*/ undefined); + } + return cleanup(factory.updateMethodSignature( + input, + ensureModifiers(input), + input.name, + input.questionToken, + ensureTypeParams(input, input.typeParameters), + updateParamsList(input, input.parameters), + ensureType(input, input.type) + )); + } + case SyntaxKind.CallSignature: { + return cleanup(factory.updateCallSignature( + input, + ensureTypeParams(input, input.typeParameters), + updateParamsList(input, input.parameters), + ensureType(input, input.type) + )); + } + case SyntaxKind.IndexSignature: { + return cleanup(factory.updateIndexSignature( + input, + ensureModifiers(input), + updateParamsList(input, input.parameters), + visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory.createKeywordTypeNode(SyntaxKind.AnyKeyword) + )); + } + case SyntaxKind.VariableDeclaration: { + if (isBindingPattern(input.name)) { + return recreateBindingPattern(input.name); + } + shouldEnterSuppressNewDiagnosticsContextContext = true; + suppressNewDiagnosticContexts = true; // Variable declaration types also suppress new diagnostic contexts, provided the contexts wouldn't be made for binding pattern types + return cleanup(factory.updateVariableDeclaration(input, input.name, /*exclamationToken*/ undefined, ensureType(input, input.type), ensureNoInitializer(input))); + } + case SyntaxKind.TypeParameter: { + if (isPrivateMethodTypeParameter(input) && (input.default || input.constraint)) { + return cleanup(factory.updateTypeParameterDeclaration(input, input.modifiers, input.name, /*constraint*/ undefined, /*defaultType*/ undefined)); + } + return cleanup(visitEachChild(input, visitDeclarationSubtree, context)); + } + case SyntaxKind.ConditionalType: { + // We have to process conditional types in a special way because for visibility purposes we need to push a new enclosingDeclaration + // just for the `infer` types in the true branch. It's an implicit declaration scope that only applies to _part_ of the type. + const checkType = visitNode(input.checkType, visitDeclarationSubtree, isTypeNode); + const extendsType = visitNode(input.extendsType, visitDeclarationSubtree, isTypeNode); + const oldEnclosingDecl = enclosingDeclaration; + enclosingDeclaration = input.trueType; + const trueType = visitNode(input.trueType, visitDeclarationSubtree, isTypeNode); + enclosingDeclaration = oldEnclosingDecl; + const falseType = visitNode(input.falseType, visitDeclarationSubtree, isTypeNode); + Debug.assert(checkType); + Debug.assert(extendsType); + Debug.assert(trueType); + Debug.assert(falseType); + return cleanup(factory.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType)); + } + case SyntaxKind.FunctionType: { + return cleanup(factory.updateFunctionTypeNode(input, visitNodes(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); + } + case SyntaxKind.ConstructorType: { + return cleanup(factory.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); + } + case SyntaxKind.ImportType: { + if (!isLiteralImportTypeNode(input)) return cleanup(input); + return cleanup(factory.updateImportTypeNode( + input, + factory.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)), + input.assertions, + input.qualifier, + visitNodes(input.typeArguments, visitDeclarationSubtree, isTypeNode), + input.isTypeOf + )); + } + default: Debug.assertNever(input, `Attempted to process unhandled node kind: ${Debug.formatSyntaxKind((input as Node).kind)}`); + } + } + + if (isTupleTypeNode(input) && (getLineAndCharacterOfPosition(currentSourceFile, input.pos).line === getLineAndCharacterOfPosition(currentSourceFile, input.end).line)) { + setEmitFlags(input, EmitFlags.SingleLine); + } + + return cleanup(visitEachChild(input, visitDeclarationSubtree, context)); + + function cleanup(returnValue: T | undefined): T | undefined { + if (returnValue && canProduceDiagnostic && hasDynamicName(input as Declaration)) { + checkName(input); + } + if (isEnclosingDeclaration(input)) { + enclosingDeclaration = previousEnclosingDeclaration; + } + if (canProduceDiagnostic && !suppressNewDiagnosticContexts) { + getSymbolAccessibilityDiagnostic = oldDiag; + } + if (shouldEnterSuppressNewDiagnosticsContextContext) { + suppressNewDiagnosticContexts = oldWithinObjectLiteralType; + } + if (returnValue === input) { + return returnValue; + } + return returnValue && setOriginalNode(preserveJsDoc(returnValue, input), input); + } + } + + function isPrivateMethodTypeParameter(node: TypeParameterDeclaration) { + return node.parent.kind === SyntaxKind.MethodDeclaration && hasEffectiveModifier(node.parent, ModifierFlags.Private); + } + + function visitDeclarationStatements(input: Node): VisitResult { + if (!isPreservedDeclarationStatement(input)) { + // return undefined for unmatched kinds to omit them from the tree + return; + } + if (shouldStripInternal(input)) return; + + switch (input.kind) { + case SyntaxKind.ExportDeclaration: { + if (isSourceFile(input.parent)) { + resultHasExternalModuleIndicator = true; + } + resultHasScopeMarker = true; + // Always visible if the parent node isn't dropped for being not visible + // Rewrite external module names if necessary + return factory.updateExportDeclaration( + input, + input.modifiers, + input.isTypeOnly, + input.exportClause, + rewriteModuleSpecifier(input, input.moduleSpecifier), + getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : undefined + ); + } + case SyntaxKind.ExportAssignment: { + // Always visible if the parent node isn't dropped for being not visible + if (isSourceFile(input.parent)) { + resultHasExternalModuleIndicator = true; + } + resultHasScopeMarker = true; + if (input.expression.kind === SyntaxKind.Identifier) { + return input; + } + else { + const newId = factory.createUniqueName("_default", GeneratedIdentifierFlags.Optimistic); + getSymbolAccessibilityDiagnostic = () => ({ + diagnosticMessage: Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0, + errorNode: input + }); + errorFallbackNode = input; + if (isolatedDeclarations) { + reportIsolatedDeclarationError(input); + } + const type = isolatedDeclarations ? + makeInvalidType() : + 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)); + + preserveJsDoc(statement, input); + removeAllComments(input); + return [statement, factory.updateExportAssignment(input, input.modifiers, newId)]; + } + } + } + + const result = transformTopLevelDeclaration(input); + // Don't actually transform yet; just leave as original node - will be elided/swapped by late pass + lateStatementReplacementMap.set(getOriginalNodeId(input), result); + return input; + } + + function stripExportModifiers(statement: Statement): Statement { + if (isImportEqualsDeclaration(statement) || hasEffectiveModifier(statement, ModifierFlags.Default) || !canHaveModifiers(statement)) { + // `export import` statements should remain as-is, as imports are _not_ implicitly exported in an ambient namespace + // Likewise, `export default` classes and the like and just be `default`, so we preserve their `export` modifiers, too + return statement; + } + + const modifiers = factory.createModifiersFromModifierFlags(getEffectiveModifierFlags(statement) & (ModifierFlags.All ^ ModifierFlags.Export)); + return factory.updateModifiers(statement, modifiers); + } + + function transformTopLevelDeclaration(input: LateVisibilityPaintedStatement) { + if (lateMarkedStatements) { + while (orderedRemoveItem(lateMarkedStatements, input)); + } + if (shouldStripInternal(input)) return; + switch (input.kind) { + case SyntaxKind.ImportEqualsDeclaration: { + return transformImportEqualsDeclaration(input); + } + case SyntaxKind.ImportDeclaration: { + return transformImportDeclaration(input); + } + } + if (isDeclaration(input) && isDeclarationAndNotVisible(input)) return; + + // Elide implementation signatures from overload sets + if (isFunctionLike(input) && resolver.isImplementationOfOverload(input)) return; + + let previousEnclosingDeclaration: typeof enclosingDeclaration; + if (isEnclosingDeclaration(input)) { + previousEnclosingDeclaration = enclosingDeclaration; + enclosingDeclaration = input as Declaration; + } + + const canProdiceDiagnostic = canProduceDiagnostics(input); + const oldDiag = getSymbolAccessibilityDiagnostic; + if (canProdiceDiagnostic) { + getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(input as DeclarationDiagnosticProducing); + } + + const previousNeedsDeclare = needsDeclare; + switch (input.kind) { + case SyntaxKind.TypeAliasDeclaration: { + needsDeclare = false; + const clean = cleanup(factory.updateTypeAliasDeclaration( + input, + ensureModifiers(input), + input.name, + visitNodes(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), + Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)) + )); + needsDeclare = previousNeedsDeclare; + return clean; + } + case SyntaxKind.InterfaceDeclaration: { + return cleanup(factory.updateInterfaceDeclaration( + input, + ensureModifiers(input), + input.name, + ensureTypeParams(input, input.typeParameters), + transformHeritageClauses(input.heritageClauses), + visitNodes(input.members, visitDeclarationSubtree, isTypeElement) + )); + } + case SyntaxKind.FunctionDeclaration: { + // Generators lose their generator-ness, excepting their return type + const clean = cleanup(factory.updateFunctionDeclaration( + input, + ensureModifiers(input), + /*asteriskToken*/ undefined, + input.name, + ensureTypeParams(input, input.typeParameters), + updateParamsList(input, input.parameters), + ensureType(input, input.type), + /*body*/ undefined + )); + const isExpandoFunctionDeclaration = clean && resolver.isExpandoFunctionDeclaration(input); + if (isExpandoFunctionDeclaration && shouldEmitFunctionProperties(input)) { + if(isExpandoFunctionDeclaration && isolatedDeclarations) { + reportIsolatedDeclarationError(input); + return clean; + } + return clean; + } + else { + return clean; + } + } + case SyntaxKind.ModuleDeclaration: { + needsDeclare = false; + const inner = input.body; + if (inner && inner.kind === SyntaxKind.ModuleBlock) { + const oldNeedsScopeFix = needsScopeFixMarker; + const oldHasScopeFix = resultHasScopeMarker; + resultHasScopeMarker = false; + needsScopeFixMarker = false; + const statements = visitNodes(inner.statements, visitDeclarationStatements, isStatement); + let lateStatements = transformAndReplaceLatePaintedStatements(statements); + // TODO: isolatedDeclarations: See why Ambient si needed here + if (input.flags & (NodeFlags as any).Ambient) { + needsScopeFixMarker = false; // If it was `declare`'d everything is implicitly exported already, ignore late printed "privates" + } + // With the final list of statements, there are 3 possibilities: + // 1. There's an export assignment or export declaration in the namespace - do nothing + // 2. Everything is exported and there are no export assignments or export declarations - strip all export modifiers + // 3. Some things are exported, some are not, and there's no marker - add an empty marker + if (!isGlobalScopeAugmentation(input) && !hasScopeMarker(lateStatements) && !resultHasScopeMarker) { + if (needsScopeFixMarker) { + lateStatements = factory.createNodeArray([...lateStatements, createEmptyExports(factory)]); + } + else { + lateStatements = visitNodes(lateStatements, stripExportModifiers, isStatement); + } + } + const body = factory.updateModuleBlock(inner, lateStatements); + needsDeclare = previousNeedsDeclare; + needsScopeFixMarker = oldNeedsScopeFix; + resultHasScopeMarker = oldHasScopeFix; + const mods = ensureModifiers(input); + return cleanup(factory.updateModuleDeclaration( + input, + mods, + isExternalModuleAugmentation(input) ? rewriteModuleSpecifier(input, input.name) : input.name, + body + )); + } + else { + needsDeclare = previousNeedsDeclare; + const mods = ensureModifiers(input); + needsDeclare = false; + visitNode(inner, visitDeclarationStatements); + // eagerly transform nested namespaces (the nesting doesn't need any elision or painting done) + const id = getOriginalNodeId(inner!); // TODO: GH#18217 + const body = lateStatementReplacementMap.get(id); + lateStatementReplacementMap.delete(id); + return cleanup(factory.updateModuleDeclaration( + input, + mods, + input.name, + body as ModuleBody + )); + } + } + case SyntaxKind.ClassDeclaration: { + errorNameNode = input.name; + errorFallbackNode = input; + const modifiers = factory.createNodeArray(ensureModifiers(input)); + const typeParameters = ensureTypeParams(input, input.typeParameters); + const ctor = getFirstConstructorWithBody(input); + let parameterProperties: readonly PropertyDeclaration[] | undefined; + if (ctor) { + const oldDiag = getSymbolAccessibilityDiagnostic; + parameterProperties = compact(flatMap(ctor.parameters, (param) => { + if (!hasSyntacticModifier(param, ModifierFlags.ParameterPropertyModifier) || shouldStripInternal(param)) return; + getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(param); + if (param.name.kind === SyntaxKind.Identifier) { + return preserveJsDoc(factory.createPropertyDeclaration( + ensureModifiers(param), + param.name, + param.questionToken, + ensureType(param, param.type), + ensureNoInitializer(param)), param); + } + else { + // Pattern - this is currently an error, but we emit declarations for it somewhat correctly + return walkBindingPattern(param.name); + } + + function walkBindingPattern(pattern: BindingPattern) { + let elems: PropertyDeclaration[] | undefined; + for (const elem of pattern.elements) { + if (isOmittedExpression(elem)) continue; + if (isBindingPattern(elem.name)) { + elems = concatenate(elems, walkBindingPattern(elem.name)); + } + elems = elems || []; + elems.push(factory.createPropertyDeclaration( + ensureModifiers(param), + elem.name as Identifier, + /*questionToken*/ undefined, + ensureType(elem, /*type*/ undefined), + /*initializer*/ undefined + )); + } + return elems; + } + })); + getSymbolAccessibilityDiagnostic = oldDiag; + } + + const hasPrivateIdentifier = some(input.members, member => !!member.name && isPrivateIdentifier(member.name)); + // When the class has at least one private identifier, create a unique constant identifier to retain the nominal typing behavior + // Prevents other classes with the same public members from being used in place of the current class + const privateIdentifier = hasPrivateIdentifier ? [ + factory.createPropertyDeclaration( + /*modifiers*/ undefined, + factory.createPrivateIdentifier("#private"), + /*questionToken*/ undefined, + /*type*/ undefined, + /*initializer*/ undefined + ) + ] : undefined; + const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes(input.members, visitDeclarationSubtree, isClassElement)); + const members = factory.createNodeArray(memberNodes); + + const extendsClause = getEffectiveBaseTypeNode(input); + 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) { + reportIsolatedDeclarationError(extendsClause); + 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 = () => ({ + diagnosticMessage: Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1, + errorNode: extendsClause, + typeName: input.name + }); + const varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, resolver.createTypeOfExpression(extendsClause.expression, input, declarationEmitNodeBuilderFlags, symbolTracker), /*initializer*/ undefined); + const statement = factory.createVariableStatement(needsDeclare ? [factory.createModifier(SyntaxKind.DeclareKeyword)] : [], factory.createVariableDeclarationList([varDecl], NodeFlags.Const)); + const heritageClauses = factory.createNodeArray(map(input.heritageClauses, clause => { + if (clause.token === SyntaxKind.ExtendsKeyword) { + const oldDiag = getSymbolAccessibilityDiagnostic; + getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]); + const newClause = factory.updateHeritageClause(clause, map(clause.types, t => factory.updateExpressionWithTypeArguments(t, newId, visitNodes(t.typeArguments, visitDeclarationSubtree, isTypeNode)))); + getSymbolAccessibilityDiagnostic = oldDiag; + return newClause; + } + return factory.updateHeritageClause(clause, visitNodes(factory.createNodeArray(filter(clause.types, t => isEntityNameExpression(t.expression) || t.expression.kind === SyntaxKind.NullKeyword)), visitDeclarationSubtree, isExpressionWithTypeArguments)); + })); + return [statement, cleanup(factory.updateClassDeclaration( + input, + modifiers, + input.name, + typeParameters, + heritageClauses, + members + ))!]; // TODO: GH#18217 + } + else { + const heritageClauses = transformHeritageClauses(input.heritageClauses); + return cleanup(factory.updateClassDeclaration( + input, + modifiers, + input.name, + typeParameters, + heritageClauses, + members + )); + } + } + case SyntaxKind.VariableStatement: { + return cleanup(transformVariableStatement(input)); + } + case SyntaxKind.EnumDeclaration: { + return cleanup(factory.updateEnumDeclaration(input, factory.createNodeArray(ensureModifiers(input)), input.name, factory.createNodeArray(mapDefined(input.members, m => { + if (shouldStripInternal(m)) return; + if (isolatedDeclarations) { + if (m.initializer && !isLiteralExpression(m.initializer)) { + reportIsolatedDeclarationError(m); + } + return m; + } + // Rewrite enum values to their constants, if available + const constValue = isolatedDeclarations? undefined : resolver.getConstantValue(m); + return preserveJsDoc(factory.updateEnumMember(m, m.name, constValue !== undefined ? typeof constValue === "string" ? factory.createStringLiteral(constValue) : factory.createNumericLiteral(constValue) : undefined), m); + })))); + } + } + // Anything left unhandled is an error, so this should be unreachable + return Debug.assertNever(input, `Unhandled top-level node in declaration emit: ${Debug.formatSyntaxKind((input as Node).kind)}`); + + function cleanup(node: T | undefined): T | undefined { + if (isEnclosingDeclaration(input)) { + enclosingDeclaration = previousEnclosingDeclaration; + } + if (canProdiceDiagnostic) { + getSymbolAccessibilityDiagnostic = oldDiag; + } + if (input.kind === SyntaxKind.ModuleDeclaration) { + needsDeclare = previousNeedsDeclare; + } + if (node as Node === input) { + return node; + } + errorFallbackNode = undefined; + errorNameNode = undefined; + return node && setOriginalNode(preserveJsDoc(node, input), input); + } + } + + function transformVariableStatement(input: VariableStatement) { + if (!forEach(input.declarationList.declarations, getBindingNameVisible)) return; + const nodes = visitNodes(input.declarationList.declarations, visitDeclarationSubtree, isVariableDeclaration); + if (!length(nodes)) return; + return factory.updateVariableStatement(input, factory.createNodeArray(ensureModifiers(input)), factory.updateVariableDeclarationList(input.declarationList, nodes)); + } + + function recreateBindingPattern(d: BindingPattern): VariableDeclaration[] { + return flatten(mapDefined(d.elements, e => recreateBindingElement(e))); + } + + function recreateBindingElement(e: ArrayBindingElement) { + if (e.kind === SyntaxKind.OmittedExpression) { + return; + } + if (e.name) { + if (!getBindingNameVisible(e)) return; + if (isBindingPattern(e.name)) { + return recreateBindingPattern(e.name); + } + else { + return factory.createVariableDeclaration(e.name, /*exclamationToken*/ undefined, ensureType(e, /*type*/ undefined), /*initializer*/ undefined); + } + } + } + + function checkName(node: DeclarationDiagnosticProducing) { + let oldDiag: typeof getSymbolAccessibilityDiagnostic | undefined; + if (!suppressNewDiagnosticContexts) { + oldDiag = getSymbolAccessibilityDiagnostic; + getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNodeName(node); + } + errorNameNode = (node as NamedDeclaration).name; + 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) { + getSymbolAccessibilityDiagnostic = oldDiag!; + } + errorNameNode = undefined; + } + + function shouldStripInternal(node: Node) { + return !!stripInternal && !!node && isInternalDeclaration(node, currentSourceFile); + } + + function isScopeMarker(node: Node) { + return isExportAssignment(node) || isExportDeclaration(node); + } + + function hasScopeMarker(statements: readonly Statement[]) { + return some(statements, isScopeMarker); + } + + function ensureModifiers(node: T): readonly Modifier[] | undefined { + const currentFlags = getEffectiveModifierFlags(node); + const newFlags = ensureModifierFlags(node); + if (currentFlags === newFlags) { + return visitArray(node.modifiers, n => tryCast(n, isModifier), isModifier); + } + return factory.createModifiersFromModifierFlags(newFlags); + } + + function ensureModifierFlags(node: Node): ModifierFlags { + let mask = ModifierFlags.All ^ (ModifierFlags.Public | ModifierFlags.Async | ModifierFlags.Override); // No async and override modifiers in declaration files + let additions = (needsDeclare && !isAlwaysType(node)) ? ModifierFlags.Ambient : ModifierFlags.None; + const parentIsFile = node.parent.kind === SyntaxKind.SourceFile; + if (!parentIsFile || (isBundledEmit && parentIsFile && isExternalModule(node.parent as SourceFile))) { + mask ^= ModifierFlags.Ambient; + additions = ModifierFlags.None; + } + return maskModifierFlags(node, mask, additions); + } + + function getTypeAnnotationFromAllAccessorDeclarations(node: AccessorDeclaration, accessors: AllAccessorDeclarations) { + let accessorType = getTypeAnnotationFromAccessor(node); + if (!accessorType && node !== accessors.firstAccessor) { + accessorType = getTypeAnnotationFromAccessor(accessors.firstAccessor); + // If we end up pulling the type from the second accessor, we also need to change the diagnostic context to get the expected error message + getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(accessors.firstAccessor); + } + if (!accessorType && accessors.secondAccessor && node !== accessors.secondAccessor) { + accessorType = getTypeAnnotationFromAccessor(accessors.secondAccessor); + // If we end up pulling the type from the second accessor, we also need to change the diagnostic context to get the expected error message + getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(accessors.secondAccessor); + } + return accessorType; + } + + function transformHeritageClauses(nodes: NodeArray | undefined) { + return factory.createNodeArray(filter(map(nodes, clause => factory.updateHeritageClause(clause, visitNodes(factory.createNodeArray(filter(clause.types, t => { + return isEntityNameExpression(t.expression) || (clause.token === SyntaxKind.ExtendsKeyword && t.expression.kind === SyntaxKind.NullKeyword); + })), visitDeclarationSubtree, isExpressionWithTypeArguments))), clause => clause.types && !!clause.types.length)); + } +} + +function isAlwaysType(node: Node) { + if (node.kind === SyntaxKind.InterfaceDeclaration) { + return true; + } + return false; +} + +// Elide "public" modifier, as it is the default +function maskModifiers(factory: NodeFactory, node: Node, modifierMask?: ModifierFlags, modifierAdditions?: ModifierFlags): Modifier[] | undefined { + return factory.createModifiersFromModifierFlags(maskModifierFlags(node, modifierMask, modifierAdditions)); +} + +function maskModifierFlags(node: Node, modifierMask: ModifierFlags = ModifierFlags.All ^ ModifierFlags.Public, modifierAdditions: ModifierFlags = ModifierFlags.None): ModifierFlags { + let flags = (getEffectiveModifierFlags(node) & modifierMask) | modifierAdditions; + if (flags & ModifierFlags.Default && !(flags & ModifierFlags.Export)) { + // A non-exported default is a nonsequitor - we usually try to remove all export modifiers + // from statements in ambient declarations; but a default export must retain its export modifier to be syntactically valid + flags ^= ModifierFlags.Export; + } + if (flags & ModifierFlags.Default && flags & ModifierFlags.Ambient) { + flags ^= ModifierFlags.Ambient; // `declare` is never required alongside `default` (and would be an error if printed) + } + return flags; +} + +function getTypeAnnotationFromAccessor(accessor: AccessorDeclaration): TypeNode | undefined { + if (accessor) { + return accessor.kind === SyntaxKind.GetAccessor + ? accessor.type // Getter - return type + : accessor.parameters.length > 0 + ? accessor.parameters[0].type // Setter parameter type + : undefined; + } +} + +type CanHaveLiteralInitializer = VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration; +function canHaveLiteralInitializer(node: Node): boolean { + switch (node.kind) { + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.PropertySignature: + return !hasEffectiveModifier(node, ModifierFlags.Private); + case SyntaxKind.Parameter: + case SyntaxKind.VariableDeclaration: + return true; + } + return false; +} + +type ProcessedDeclarationStatement = + | FunctionDeclaration + | ModuleDeclaration + | ImportEqualsDeclaration + | InterfaceDeclaration + | ClassDeclaration + | TypeAliasDeclaration + | EnumDeclaration + | VariableStatement + | ImportDeclaration + | ExportDeclaration + | ExportAssignment; + +function isPreservedDeclarationStatement(node: Node): node is ProcessedDeclarationStatement { + switch (node.kind) { + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.ModuleDeclaration: + case SyntaxKind.ImportEqualsDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.ClassDeclaration: + case SyntaxKind.TypeAliasDeclaration: + case SyntaxKind.EnumDeclaration: + case SyntaxKind.VariableStatement: + case SyntaxKind.ImportDeclaration: + case SyntaxKind.ExportDeclaration: + case SyntaxKind.ExportAssignment: + return true; + } + return false; +} + +type ProcessedComponent = + | ConstructSignatureDeclaration + | ConstructorDeclaration + | MethodDeclaration + | GetAccessorDeclaration + | SetAccessorDeclaration + | PropertyDeclaration + | PropertySignature + | MethodSignature + | CallSignatureDeclaration + | IndexSignatureDeclaration + | VariableDeclaration + | TypeParameterDeclaration + | ExpressionWithTypeArguments + | TypeReferenceNode + | ConditionalTypeNode + | FunctionTypeNode + | ConstructorTypeNode + | ImportTypeNode; + +function isProcessedComponent(node: Node): node is ProcessedComponent { + switch (node.kind) { + case SyntaxKind.ConstructSignature: + case SyntaxKind.Constructor: + case SyntaxKind.MethodDeclaration: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.PropertySignature: + case SyntaxKind.MethodSignature: + case SyntaxKind.CallSignature: + case SyntaxKind.IndexSignature: + case SyntaxKind.VariableDeclaration: + case SyntaxKind.TypeParameter: + case SyntaxKind.ExpressionWithTypeArguments: + case SyntaxKind.TypeReference: + case SyntaxKind.ConditionalType: + case SyntaxKind.FunctionType: + case SyntaxKind.ConstructorType: + case SyntaxKind.ImportType: + return true; + } + return false; +} diff --git a/external-declarations/src/compiler/diagnosticInformationMap.generated.ts b/external-declarations/src/compiler/diagnosticInformationMap.generated.ts new file mode 100644 index 0000000000000..e4d7ed614ed3f --- /dev/null +++ b/external-declarations/src/compiler/diagnosticInformationMap.generated.ts @@ -0,0 +1,1893 @@ +// +// generated from 'src/compiler/diagnosticMessages.json' + +import { DiagnosticCategory, DiagnosticMessage } from "typescript"; + + +function diag(code: number, category: DiagnosticCategory, key: string, message: string, reportsUnnecessary?: {}, elidedInCompatabilityPyramid?: boolean, reportsDeprecated?: {}): DiagnosticMessage { + return { code, category, key, message, reportsUnnecessary, reportsDeprecated }; +} + +/** @internal */ +export const Diagnostics = { + Unterminated_string_literal: diag(1002, DiagnosticCategory.Error, "Unterminated_string_literal_1002", "Unterminated string literal."), + Identifier_expected: diag(1003, DiagnosticCategory.Error, "Identifier_expected_1003", "Identifier expected."), + _0_expected: diag(1005, DiagnosticCategory.Error, "_0_expected_1005", "'{0}' expected."), + A_file_cannot_have_a_reference_to_itself: diag(1006, DiagnosticCategory.Error, "A_file_cannot_have_a_reference_to_itself_1006", "A file cannot have a reference to itself."), + The_parser_expected_to_find_a_1_to_match_the_0_token_here: diag(1007, DiagnosticCategory.Error, "The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007", "The parser expected to find a '{1}' to match the '{0}' token here."), + Trailing_comma_not_allowed: diag(1009, DiagnosticCategory.Error, "Trailing_comma_not_allowed_1009", "Trailing comma not allowed."), + Asterisk_Slash_expected: diag(1010, DiagnosticCategory.Error, "Asterisk_Slash_expected_1010", "'*/' expected."), + An_element_access_expression_should_take_an_argument: diag(1011, DiagnosticCategory.Error, "An_element_access_expression_should_take_an_argument_1011", "An element access expression should take an argument."), + Unexpected_token: diag(1012, DiagnosticCategory.Error, "Unexpected_token_1012", "Unexpected token."), + A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma: diag(1013, DiagnosticCategory.Error, "A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013", "A rest parameter or binding pattern may not have a trailing comma."), + A_rest_parameter_must_be_last_in_a_parameter_list: diag(1014, DiagnosticCategory.Error, "A_rest_parameter_must_be_last_in_a_parameter_list_1014", "A rest parameter must be last in a parameter list."), + Parameter_cannot_have_question_mark_and_initializer: diag(1015, DiagnosticCategory.Error, "Parameter_cannot_have_question_mark_and_initializer_1015", "Parameter cannot have question mark and initializer."), + A_required_parameter_cannot_follow_an_optional_parameter: diag(1016, DiagnosticCategory.Error, "A_required_parameter_cannot_follow_an_optional_parameter_1016", "A required parameter cannot follow an optional parameter."), + An_index_signature_cannot_have_a_rest_parameter: diag(1017, DiagnosticCategory.Error, "An_index_signature_cannot_have_a_rest_parameter_1017", "An index signature cannot have a rest parameter."), + An_index_signature_parameter_cannot_have_an_accessibility_modifier: diag(1018, DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018", "An index signature parameter cannot have an accessibility modifier."), + An_index_signature_parameter_cannot_have_a_question_mark: diag(1019, DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_a_question_mark_1019", "An index signature parameter cannot have a question mark."), + An_index_signature_parameter_cannot_have_an_initializer: diag(1020, DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_an_initializer_1020", "An index signature parameter cannot have an initializer."), + An_index_signature_must_have_a_type_annotation: diag(1021, DiagnosticCategory.Error, "An_index_signature_must_have_a_type_annotation_1021", "An index signature must have a type annotation."), + An_index_signature_parameter_must_have_a_type_annotation: diag(1022, DiagnosticCategory.Error, "An_index_signature_parameter_must_have_a_type_annotation_1022", "An index signature parameter must have a type annotation."), + readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature: diag(1024, DiagnosticCategory.Error, "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", "'readonly' modifier can only appear on a property declaration or index signature."), + An_index_signature_cannot_have_a_trailing_comma: diag(1025, DiagnosticCategory.Error, "An_index_signature_cannot_have_a_trailing_comma_1025", "An index signature cannot have a trailing comma."), + Accessibility_modifier_already_seen: diag(1028, DiagnosticCategory.Error, "Accessibility_modifier_already_seen_1028", "Accessibility modifier already seen."), + _0_modifier_must_precede_1_modifier: diag(1029, DiagnosticCategory.Error, "_0_modifier_must_precede_1_modifier_1029", "'{0}' modifier must precede '{1}' modifier."), + _0_modifier_already_seen: diag(1030, DiagnosticCategory.Error, "_0_modifier_already_seen_1030", "'{0}' modifier already seen."), + _0_modifier_cannot_appear_on_class_elements_of_this_kind: diag(1031, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031", "'{0}' modifier cannot appear on class elements of this kind."), + super_must_be_followed_by_an_argument_list_or_member_access: diag(1034, DiagnosticCategory.Error, "super_must_be_followed_by_an_argument_list_or_member_access_1034", "'super' must be followed by an argument list or member access."), + Only_ambient_modules_can_use_quoted_names: diag(1035, DiagnosticCategory.Error, "Only_ambient_modules_can_use_quoted_names_1035", "Only ambient modules can use quoted names."), + Statements_are_not_allowed_in_ambient_contexts: diag(1036, DiagnosticCategory.Error, "Statements_are_not_allowed_in_ambient_contexts_1036", "Statements are not allowed in ambient contexts."), + A_declare_modifier_cannot_be_used_in_an_already_ambient_context: diag(1038, DiagnosticCategory.Error, "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038", "A 'declare' modifier cannot be used in an already ambient context."), + Initializers_are_not_allowed_in_ambient_contexts: diag(1039, DiagnosticCategory.Error, "Initializers_are_not_allowed_in_ambient_contexts_1039", "Initializers are not allowed in ambient contexts."), + _0_modifier_cannot_be_used_in_an_ambient_context: diag(1040, DiagnosticCategory.Error, "_0_modifier_cannot_be_used_in_an_ambient_context_1040", "'{0}' modifier cannot be used in an ambient context."), + _0_modifier_cannot_be_used_here: diag(1042, DiagnosticCategory.Error, "_0_modifier_cannot_be_used_here_1042", "'{0}' modifier cannot be used here."), + _0_modifier_cannot_appear_on_a_module_or_namespace_element: diag(1044, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044", "'{0}' modifier cannot appear on a module or namespace element."), + Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier: diag(1046, DiagnosticCategory.Error, "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046", "Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."), + A_rest_parameter_cannot_be_optional: diag(1047, DiagnosticCategory.Error, "A_rest_parameter_cannot_be_optional_1047", "A rest parameter cannot be optional."), + A_rest_parameter_cannot_have_an_initializer: diag(1048, DiagnosticCategory.Error, "A_rest_parameter_cannot_have_an_initializer_1048", "A rest parameter cannot have an initializer."), + A_set_accessor_must_have_exactly_one_parameter: diag(1049, DiagnosticCategory.Error, "A_set_accessor_must_have_exactly_one_parameter_1049", "A 'set' accessor must have exactly one parameter."), + A_set_accessor_cannot_have_an_optional_parameter: diag(1051, DiagnosticCategory.Error, "A_set_accessor_cannot_have_an_optional_parameter_1051", "A 'set' accessor cannot have an optional parameter."), + A_set_accessor_parameter_cannot_have_an_initializer: diag(1052, DiagnosticCategory.Error, "A_set_accessor_parameter_cannot_have_an_initializer_1052", "A 'set' accessor parameter cannot have an initializer."), + A_set_accessor_cannot_have_rest_parameter: diag(1053, DiagnosticCategory.Error, "A_set_accessor_cannot_have_rest_parameter_1053", "A 'set' accessor cannot have rest parameter."), + A_get_accessor_cannot_have_parameters: diag(1054, DiagnosticCategory.Error, "A_get_accessor_cannot_have_parameters_1054", "A 'get' accessor cannot have parameters."), + Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value: diag(1055, DiagnosticCategory.Error, "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055", "Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value."), + Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: diag(1056, DiagnosticCategory.Error, "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056", "Accessors are only available when targeting ECMAScript 5 and higher."), + The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1058, DiagnosticCategory.Error, "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058", "The return type of an async function must either be a valid promise or must not contain a callable 'then' member."), + A_promise_must_have_a_then_method: diag(1059, DiagnosticCategory.Error, "A_promise_must_have_a_then_method_1059", "A promise must have a 'then' method."), + The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback: diag(1060, DiagnosticCategory.Error, "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060", "The first parameter of the 'then' method of a promise must be a callback."), + Enum_member_must_have_initializer: diag(1061, DiagnosticCategory.Error, "Enum_member_must_have_initializer_1061", "Enum member must have initializer."), + Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: diag(1062, DiagnosticCategory.Error, "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."), + An_export_assignment_cannot_be_used_in_a_namespace: diag(1063, DiagnosticCategory.Error, "An_export_assignment_cannot_be_used_in_a_namespace_1063", "An export assignment cannot be used in a namespace."), + The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0: diag(1064, DiagnosticCategory.Error, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064", "The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"), + In_ambient_enum_declarations_member_initializer_must_be_constant_expression: diag(1066, DiagnosticCategory.Error, "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", "In ambient enum declarations member initializer must be constant expression."), + Unexpected_token_A_constructor_method_accessor_or_property_was_expected: diag(1068, DiagnosticCategory.Error, "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068", "Unexpected token. A constructor, method, accessor, or property was expected."), + Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces: diag(1069, DiagnosticCategory.Error, "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069", "Unexpected token. A type parameter name was expected without curly braces."), + _0_modifier_cannot_appear_on_a_type_member: diag(1070, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_type_member_1070", "'{0}' modifier cannot appear on a type member."), + _0_modifier_cannot_appear_on_an_index_signature: diag(1071, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_an_index_signature_1071", "'{0}' modifier cannot appear on an index signature."), + A_0_modifier_cannot_be_used_with_an_import_declaration: diag(1079, DiagnosticCategory.Error, "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", "A '{0}' modifier cannot be used with an import declaration."), + Invalid_reference_directive_syntax: diag(1084, DiagnosticCategory.Error, "Invalid_reference_directive_syntax_1084", "Invalid 'reference' directive syntax."), + Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0: diag(1085, DiagnosticCategory.Error, "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085", "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'."), + _0_modifier_cannot_appear_on_a_constructor_declaration: diag(1089, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_constructor_declaration_1089", "'{0}' modifier cannot appear on a constructor declaration."), + _0_modifier_cannot_appear_on_a_parameter: diag(1090, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_parameter_1090", "'{0}' modifier cannot appear on a parameter."), + Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: diag(1091, DiagnosticCategory.Error, "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091", "Only a single variable declaration is allowed in a 'for...in' statement."), + Type_parameters_cannot_appear_on_a_constructor_declaration: diag(1092, DiagnosticCategory.Error, "Type_parameters_cannot_appear_on_a_constructor_declaration_1092", "Type parameters cannot appear on a constructor declaration."), + Type_annotation_cannot_appear_on_a_constructor_declaration: diag(1093, DiagnosticCategory.Error, "Type_annotation_cannot_appear_on_a_constructor_declaration_1093", "Type annotation cannot appear on a constructor declaration."), + An_accessor_cannot_have_type_parameters: diag(1094, DiagnosticCategory.Error, "An_accessor_cannot_have_type_parameters_1094", "An accessor cannot have type parameters."), + A_set_accessor_cannot_have_a_return_type_annotation: diag(1095, DiagnosticCategory.Error, "A_set_accessor_cannot_have_a_return_type_annotation_1095", "A 'set' accessor cannot have a return type annotation."), + An_index_signature_must_have_exactly_one_parameter: diag(1096, DiagnosticCategory.Error, "An_index_signature_must_have_exactly_one_parameter_1096", "An index signature must have exactly one parameter."), + _0_list_cannot_be_empty: diag(1097, DiagnosticCategory.Error, "_0_list_cannot_be_empty_1097", "'{0}' list cannot be empty."), + Type_parameter_list_cannot_be_empty: diag(1098, DiagnosticCategory.Error, "Type_parameter_list_cannot_be_empty_1098", "Type parameter list cannot be empty."), + Type_argument_list_cannot_be_empty: diag(1099, DiagnosticCategory.Error, "Type_argument_list_cannot_be_empty_1099", "Type argument list cannot be empty."), + Invalid_use_of_0_in_strict_mode: diag(1100, DiagnosticCategory.Error, "Invalid_use_of_0_in_strict_mode_1100", "Invalid use of '{0}' in strict mode."), + with_statements_are_not_allowed_in_strict_mode: diag(1101, DiagnosticCategory.Error, "with_statements_are_not_allowed_in_strict_mode_1101", "'with' statements are not allowed in strict mode."), + delete_cannot_be_called_on_an_identifier_in_strict_mode: diag(1102, DiagnosticCategory.Error, "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102", "'delete' cannot be called on an identifier in strict mode."), + for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1103, DiagnosticCategory.Error, "for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103", "'for await' loops are only allowed within async functions and at the top levels of modules."), + A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: diag(1104, DiagnosticCategory.Error, "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104", "A 'continue' statement can only be used within an enclosing iteration statement."), + A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: diag(1105, DiagnosticCategory.Error, "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105", "A 'break' statement can only be used within an enclosing iteration or switch statement."), + The_left_hand_side_of_a_for_of_statement_may_not_be_async: diag(1106, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106", "The left-hand side of a 'for...of' statement may not be 'async'."), + Jump_target_cannot_cross_function_boundary: diag(1107, DiagnosticCategory.Error, "Jump_target_cannot_cross_function_boundary_1107", "Jump target cannot cross function boundary."), + A_return_statement_can_only_be_used_within_a_function_body: diag(1108, DiagnosticCategory.Error, "A_return_statement_can_only_be_used_within_a_function_body_1108", "A 'return' statement can only be used within a function body."), + Expression_expected: diag(1109, DiagnosticCategory.Error, "Expression_expected_1109", "Expression expected."), + Type_expected: diag(1110, DiagnosticCategory.Error, "Type_expected_1110", "Type expected."), + A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: diag(1113, DiagnosticCategory.Error, "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", "A 'default' clause cannot appear more than once in a 'switch' statement."), + Duplicate_label_0: diag(1114, DiagnosticCategory.Error, "Duplicate_label_0_1114", "Duplicate label '{0}'."), + A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: diag(1115, DiagnosticCategory.Error, "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", "A 'continue' statement can only jump to a label of an enclosing iteration statement."), + A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: diag(1116, DiagnosticCategory.Error, "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116", "A 'break' statement can only jump to a label of an enclosing statement."), + An_object_literal_cannot_have_multiple_properties_with_the_same_name: diag(1117, DiagnosticCategory.Error, "An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117", "An object literal cannot have multiple properties with the same name."), + An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: diag(1118, DiagnosticCategory.Error, "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118", "An object literal cannot have multiple get/set accessors with the same name."), + An_object_literal_cannot_have_property_and_accessor_with_the_same_name: diag(1119, DiagnosticCategory.Error, "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119", "An object literal cannot have property and accessor with the same name."), + An_export_assignment_cannot_have_modifiers: diag(1120, DiagnosticCategory.Error, "An_export_assignment_cannot_have_modifiers_1120", "An export assignment cannot have modifiers."), + Octal_literals_are_not_allowed_in_strict_mode: diag(1121, DiagnosticCategory.Error, "Octal_literals_are_not_allowed_in_strict_mode_1121", "Octal literals are not allowed in strict mode."), + Variable_declaration_list_cannot_be_empty: diag(1123, DiagnosticCategory.Error, "Variable_declaration_list_cannot_be_empty_1123", "Variable declaration list cannot be empty."), + Digit_expected: diag(1124, DiagnosticCategory.Error, "Digit_expected_1124", "Digit expected."), + Hexadecimal_digit_expected: diag(1125, DiagnosticCategory.Error, "Hexadecimal_digit_expected_1125", "Hexadecimal digit expected."), + Unexpected_end_of_text: diag(1126, DiagnosticCategory.Error, "Unexpected_end_of_text_1126", "Unexpected end of text."), + Invalid_character: diag(1127, DiagnosticCategory.Error, "Invalid_character_1127", "Invalid character."), + Declaration_or_statement_expected: diag(1128, DiagnosticCategory.Error, "Declaration_or_statement_expected_1128", "Declaration or statement expected."), + Statement_expected: diag(1129, DiagnosticCategory.Error, "Statement_expected_1129", "Statement expected."), + case_or_default_expected: diag(1130, DiagnosticCategory.Error, "case_or_default_expected_1130", "'case' or 'default' expected."), + Property_or_signature_expected: diag(1131, DiagnosticCategory.Error, "Property_or_signature_expected_1131", "Property or signature expected."), + Enum_member_expected: diag(1132, DiagnosticCategory.Error, "Enum_member_expected_1132", "Enum member expected."), + Variable_declaration_expected: diag(1134, DiagnosticCategory.Error, "Variable_declaration_expected_1134", "Variable declaration expected."), + Argument_expression_expected: diag(1135, DiagnosticCategory.Error, "Argument_expression_expected_1135", "Argument expression expected."), + Property_assignment_expected: diag(1136, DiagnosticCategory.Error, "Property_assignment_expected_1136", "Property assignment expected."), + Expression_or_comma_expected: diag(1137, DiagnosticCategory.Error, "Expression_or_comma_expected_1137", "Expression or comma expected."), + Parameter_declaration_expected: diag(1138, DiagnosticCategory.Error, "Parameter_declaration_expected_1138", "Parameter declaration expected."), + Type_parameter_declaration_expected: diag(1139, DiagnosticCategory.Error, "Type_parameter_declaration_expected_1139", "Type parameter declaration expected."), + Type_argument_expected: diag(1140, DiagnosticCategory.Error, "Type_argument_expected_1140", "Type argument expected."), + String_literal_expected: diag(1141, DiagnosticCategory.Error, "String_literal_expected_1141", "String literal expected."), + Line_break_not_permitted_here: diag(1142, DiagnosticCategory.Error, "Line_break_not_permitted_here_1142", "Line break not permitted here."), + or_expected: diag(1144, DiagnosticCategory.Error, "or_expected_1144", "'{' or ';' expected."), + or_JSX_element_expected: diag(1145, DiagnosticCategory.Error, "or_JSX_element_expected_1145", "'{' or JSX element expected."), + Declaration_expected: diag(1146, DiagnosticCategory.Error, "Declaration_expected_1146", "Declaration expected."), + Import_declarations_in_a_namespace_cannot_reference_a_module: diag(1147, DiagnosticCategory.Error, "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", "Import declarations in a namespace cannot reference a module."), + Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: diag(1148, DiagnosticCategory.Error, "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", "Cannot use imports, exports, or module augmentations when '--module' is 'none'."), + File_name_0_differs_from_already_included_file_name_1_only_in_casing: diag(1149, DiagnosticCategory.Error, "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", "File name '{0}' differs from already included file name '{1}' only in casing."), + const_declarations_must_be_initialized: diag(1155, DiagnosticCategory.Error, "const_declarations_must_be_initialized_1155", "'const' declarations must be initialized."), + const_declarations_can_only_be_declared_inside_a_block: diag(1156, DiagnosticCategory.Error, "const_declarations_can_only_be_declared_inside_a_block_1156", "'const' declarations can only be declared inside a block."), + let_declarations_can_only_be_declared_inside_a_block: diag(1157, DiagnosticCategory.Error, "let_declarations_can_only_be_declared_inside_a_block_1157", "'let' declarations can only be declared inside a block."), + Unterminated_template_literal: diag(1160, DiagnosticCategory.Error, "Unterminated_template_literal_1160", "Unterminated template literal."), + Unterminated_regular_expression_literal: diag(1161, DiagnosticCategory.Error, "Unterminated_regular_expression_literal_1161", "Unterminated regular expression literal."), + An_object_member_cannot_be_declared_optional: diag(1162, DiagnosticCategory.Error, "An_object_member_cannot_be_declared_optional_1162", "An object member cannot be declared optional."), + A_yield_expression_is_only_allowed_in_a_generator_body: diag(1163, DiagnosticCategory.Error, "A_yield_expression_is_only_allowed_in_a_generator_body_1163", "A 'yield' expression is only allowed in a generator body."), + Computed_property_names_are_not_allowed_in_enums: diag(1164, DiagnosticCategory.Error, "Computed_property_names_are_not_allowed_in_enums_1164", "Computed property names are not allowed in enums."), + A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1165, DiagnosticCategory.Error, "A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165", "A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type: diag(1166, DiagnosticCategory.Error, "A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166", "A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type."), + A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1168, DiagnosticCategory.Error, "A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168", "A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1169, DiagnosticCategory.Error, "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169", "A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1170, DiagnosticCategory.Error, "A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170", "A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_comma_expression_is_not_allowed_in_a_computed_property_name: diag(1171, DiagnosticCategory.Error, "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171", "A comma expression is not allowed in a computed property name."), + extends_clause_already_seen: diag(1172, DiagnosticCategory.Error, "extends_clause_already_seen_1172", "'extends' clause already seen."), + extends_clause_must_precede_implements_clause: diag(1173, DiagnosticCategory.Error, "extends_clause_must_precede_implements_clause_1173", "'extends' clause must precede 'implements' clause."), + Classes_can_only_extend_a_single_class: diag(1174, DiagnosticCategory.Error, "Classes_can_only_extend_a_single_class_1174", "Classes can only extend a single class."), + implements_clause_already_seen: diag(1175, DiagnosticCategory.Error, "implements_clause_already_seen_1175", "'implements' clause already seen."), + Interface_declaration_cannot_have_implements_clause: diag(1176, DiagnosticCategory.Error, "Interface_declaration_cannot_have_implements_clause_1176", "Interface declaration cannot have 'implements' clause."), + Binary_digit_expected: diag(1177, DiagnosticCategory.Error, "Binary_digit_expected_1177", "Binary digit expected."), + Octal_digit_expected: diag(1178, DiagnosticCategory.Error, "Octal_digit_expected_1178", "Octal digit expected."), + Unexpected_token_expected: diag(1179, DiagnosticCategory.Error, "Unexpected_token_expected_1179", "Unexpected token. '{' expected."), + Property_destructuring_pattern_expected: diag(1180, DiagnosticCategory.Error, "Property_destructuring_pattern_expected_1180", "Property destructuring pattern expected."), + Array_element_destructuring_pattern_expected: diag(1181, DiagnosticCategory.Error, "Array_element_destructuring_pattern_expected_1181", "Array element destructuring pattern expected."), + A_destructuring_declaration_must_have_an_initializer: diag(1182, DiagnosticCategory.Error, "A_destructuring_declaration_must_have_an_initializer_1182", "A destructuring declaration must have an initializer."), + An_implementation_cannot_be_declared_in_ambient_contexts: diag(1183, DiagnosticCategory.Error, "An_implementation_cannot_be_declared_in_ambient_contexts_1183", "An implementation cannot be declared in ambient contexts."), + Modifiers_cannot_appear_here: diag(1184, DiagnosticCategory.Error, "Modifiers_cannot_appear_here_1184", "Modifiers cannot appear here."), + Merge_conflict_marker_encountered: diag(1185, DiagnosticCategory.Error, "Merge_conflict_marker_encountered_1185", "Merge conflict marker encountered."), + A_rest_element_cannot_have_an_initializer: diag(1186, DiagnosticCategory.Error, "A_rest_element_cannot_have_an_initializer_1186", "A rest element cannot have an initializer."), + A_parameter_property_may_not_be_declared_using_a_binding_pattern: diag(1187, DiagnosticCategory.Error, "A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187", "A parameter property may not be declared using a binding pattern."), + Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement: diag(1188, DiagnosticCategory.Error, "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188", "Only a single variable declaration is allowed in a 'for...of' statement."), + The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer: diag(1189, DiagnosticCategory.Error, "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189", "The variable declaration of a 'for...in' statement cannot have an initializer."), + The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer: diag(1190, DiagnosticCategory.Error, "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190", "The variable declaration of a 'for...of' statement cannot have an initializer."), + An_import_declaration_cannot_have_modifiers: diag(1191, DiagnosticCategory.Error, "An_import_declaration_cannot_have_modifiers_1191", "An import declaration cannot have modifiers."), + Module_0_has_no_default_export: diag(1192, DiagnosticCategory.Error, "Module_0_has_no_default_export_1192", "Module '{0}' has no default export."), + An_export_declaration_cannot_have_modifiers: diag(1193, DiagnosticCategory.Error, "An_export_declaration_cannot_have_modifiers_1193", "An export declaration cannot have modifiers."), + Export_declarations_are_not_permitted_in_a_namespace: diag(1194, DiagnosticCategory.Error, "Export_declarations_are_not_permitted_in_a_namespace_1194", "Export declarations are not permitted in a namespace."), + export_Asterisk_does_not_re_export_a_default: diag(1195, DiagnosticCategory.Error, "export_Asterisk_does_not_re_export_a_default_1195", "'export *' does not re-export a default."), + Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified: diag(1196, DiagnosticCategory.Error, "Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196", "Catch clause variable type annotation must be 'any' or 'unknown' if specified."), + Catch_clause_variable_cannot_have_an_initializer: diag(1197, DiagnosticCategory.Error, "Catch_clause_variable_cannot_have_an_initializer_1197", "Catch clause variable cannot have an initializer."), + An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: diag(1198, DiagnosticCategory.Error, "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198", "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."), + Unterminated_Unicode_escape_sequence: diag(1199, DiagnosticCategory.Error, "Unterminated_Unicode_escape_sequence_1199", "Unterminated Unicode escape sequence."), + Line_terminator_not_permitted_before_arrow: diag(1200, DiagnosticCategory.Error, "Line_terminator_not_permitted_before_arrow_1200", "Line terminator not permitted before arrow."), + Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: diag(1202, DiagnosticCategory.Error, "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202", "Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead."), + Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead: diag(1203, DiagnosticCategory.Error, "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203", "Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."), + Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type: diag(1205, DiagnosticCategory.Error, "Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205", "Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'."), + Decorators_are_not_valid_here: diag(1206, DiagnosticCategory.Error, "Decorators_are_not_valid_here_1206", "Decorators are not valid here."), + Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: diag(1207, DiagnosticCategory.Error, "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", "Decorators cannot be applied to multiple get/set accessors of the same name."), + _0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_import_export_or_an_empty_export_statement_to_make_it_a_module: diag(1208, DiagnosticCategory.Error, "_0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_imp_1208", "'{0}' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module."), + Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0: diag(1209, DiagnosticCategory.Error, "Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209", "Invalid optional chain from new expression. Did you mean to call '{0}()'?"), + Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode: diag(1210, DiagnosticCategory.Error, "Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210", "Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."), + A_class_declaration_without_the_default_modifier_must_have_a_name: diag(1211, DiagnosticCategory.Error, "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", "A class declaration without the 'default' modifier must have a name."), + Identifier_expected_0_is_a_reserved_word_in_strict_mode: diag(1212, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", "Identifier expected. '{0}' is a reserved word in strict mode."), + Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: diag(1213, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."), + Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode: diag(1214, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214", "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."), + Invalid_use_of_0_Modules_are_automatically_in_strict_mode: diag(1215, DiagnosticCategory.Error, "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215", "Invalid use of '{0}'. Modules are automatically in strict mode."), + Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules: diag(1216, DiagnosticCategory.Error, "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216", "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."), + Export_assignment_is_not_supported_when_module_flag_is_system: diag(1218, DiagnosticCategory.Error, "Export_assignment_is_not_supported_when_module_flag_is_system_1218", "Export assignment is not supported when '--module' flag is 'system'."), + Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning: diag(1219, DiagnosticCategory.Error, "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219", "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning."), + Generators_are_not_allowed_in_an_ambient_context: diag(1221, DiagnosticCategory.Error, "Generators_are_not_allowed_in_an_ambient_context_1221", "Generators are not allowed in an ambient context."), + An_overload_signature_cannot_be_declared_as_a_generator: diag(1222, DiagnosticCategory.Error, "An_overload_signature_cannot_be_declared_as_a_generator_1222", "An overload signature cannot be declared as a generator."), + _0_tag_already_specified: diag(1223, DiagnosticCategory.Error, "_0_tag_already_specified_1223", "'{0}' tag already specified."), + Signature_0_must_be_a_type_predicate: diag(1224, DiagnosticCategory.Error, "Signature_0_must_be_a_type_predicate_1224", "Signature '{0}' must be a type predicate."), + Cannot_find_parameter_0: diag(1225, DiagnosticCategory.Error, "Cannot_find_parameter_0_1225", "Cannot find parameter '{0}'."), + Type_predicate_0_is_not_assignable_to_1: diag(1226, DiagnosticCategory.Error, "Type_predicate_0_is_not_assignable_to_1_1226", "Type predicate '{0}' is not assignable to '{1}'."), + Parameter_0_is_not_in_the_same_position_as_parameter_1: diag(1227, DiagnosticCategory.Error, "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227", "Parameter '{0}' is not in the same position as parameter '{1}'."), + A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods: diag(1228, DiagnosticCategory.Error, "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228", "A type predicate is only allowed in return type position for functions and methods."), + A_type_predicate_cannot_reference_a_rest_parameter: diag(1229, DiagnosticCategory.Error, "A_type_predicate_cannot_reference_a_rest_parameter_1229", "A type predicate cannot reference a rest parameter."), + A_type_predicate_cannot_reference_element_0_in_a_binding_pattern: diag(1230, DiagnosticCategory.Error, "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230", "A type predicate cannot reference element '{0}' in a binding pattern."), + An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration: diag(1231, DiagnosticCategory.Error, "An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231", "An export assignment must be at the top level of a file or module declaration."), + An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module: diag(1232, DiagnosticCategory.Error, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232", "An import declaration can only be used at the top level of a namespace or module."), + An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module: diag(1233, DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233", "An export declaration can only be used at the top level of a namespace or module."), + An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file: diag(1234, DiagnosticCategory.Error, "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234", "An ambient module declaration is only allowed at the top level in a file."), + A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module: diag(1235, DiagnosticCategory.Error, "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235", "A namespace declaration is only allowed at the top level of a namespace or module."), + The_return_type_of_a_property_decorator_function_must_be_either_void_or_any: diag(1236, DiagnosticCategory.Error, "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236", "The return type of a property decorator function must be either 'void' or 'any'."), + The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any: diag(1237, DiagnosticCategory.Error, "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237", "The return type of a parameter decorator function must be either 'void' or 'any'."), + Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression: diag(1238, DiagnosticCategory.Error, "Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238", "Unable to resolve signature of class decorator when called as an expression."), + Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression: diag(1239, DiagnosticCategory.Error, "Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239", "Unable to resolve signature of parameter decorator when called as an expression."), + Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression: diag(1240, DiagnosticCategory.Error, "Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240", "Unable to resolve signature of property decorator when called as an expression."), + Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression: diag(1241, DiagnosticCategory.Error, "Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241", "Unable to resolve signature of method decorator when called as an expression."), + abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration: diag(1242, DiagnosticCategory.Error, "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242", "'abstract' modifier can only appear on a class, method, or property declaration."), + _0_modifier_cannot_be_used_with_1_modifier: diag(1243, DiagnosticCategory.Error, "_0_modifier_cannot_be_used_with_1_modifier_1243", "'{0}' modifier cannot be used with '{1}' modifier."), + Abstract_methods_can_only_appear_within_an_abstract_class: diag(1244, DiagnosticCategory.Error, "Abstract_methods_can_only_appear_within_an_abstract_class_1244", "Abstract methods can only appear within an abstract class."), + Method_0_cannot_have_an_implementation_because_it_is_marked_abstract: diag(1245, DiagnosticCategory.Error, "Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245", "Method '{0}' cannot have an implementation because it is marked abstract."), + An_interface_property_cannot_have_an_initializer: diag(1246, DiagnosticCategory.Error, "An_interface_property_cannot_have_an_initializer_1246", "An interface property cannot have an initializer."), + A_type_literal_property_cannot_have_an_initializer: diag(1247, DiagnosticCategory.Error, "A_type_literal_property_cannot_have_an_initializer_1247", "A type literal property cannot have an initializer."), + A_class_member_cannot_have_the_0_keyword: diag(1248, DiagnosticCategory.Error, "A_class_member_cannot_have_the_0_keyword_1248", "A class member cannot have the '{0}' keyword."), + A_decorator_can_only_decorate_a_method_implementation_not_an_overload: diag(1249, DiagnosticCategory.Error, "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249", "A decorator can only decorate a method implementation, not an overload."), + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5: diag(1250, DiagnosticCategory.Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'."), + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode: diag(1251, DiagnosticCategory.Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode."), + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode: diag(1252, DiagnosticCategory.Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode."), + A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference: diag(1254, DiagnosticCategory.Error, "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254", "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."), + A_definite_assignment_assertion_is_not_permitted_in_this_context: diag(1255, DiagnosticCategory.Error, "A_definite_assignment_assertion_is_not_permitted_in_this_context_1255", "A definite assignment assertion '!' is not permitted in this context."), + A_required_element_cannot_follow_an_optional_element: diag(1257, DiagnosticCategory.Error, "A_required_element_cannot_follow_an_optional_element_1257", "A required element cannot follow an optional element."), + A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration: diag(1258, DiagnosticCategory.Error, "A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258", "A default export must be at the top level of a file or module declaration."), + Module_0_can_only_be_default_imported_using_the_1_flag: diag(1259, DiagnosticCategory.Error, "Module_0_can_only_be_default_imported_using_the_1_flag_1259", "Module '{0}' can only be default-imported using the '{1}' flag"), + Keywords_cannot_contain_escape_characters: diag(1260, DiagnosticCategory.Error, "Keywords_cannot_contain_escape_characters_1260", "Keywords cannot contain escape characters."), + Already_included_file_name_0_differs_from_file_name_1_only_in_casing: diag(1261, DiagnosticCategory.Error, "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261", "Already included file name '{0}' differs from file name '{1}' only in casing."), + Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module: diag(1262, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262", "Identifier expected. '{0}' is a reserved word at the top-level of a module."), + Declarations_with_initializers_cannot_also_have_definite_assignment_assertions: diag(1263, DiagnosticCategory.Error, "Declarations_with_initializers_cannot_also_have_definite_assignment_assertions_1263", "Declarations with initializers cannot also have definite assignment assertions."), + Declarations_with_definite_assignment_assertions_must_also_have_type_annotations: diag(1264, DiagnosticCategory.Error, "Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264", "Declarations with definite assignment assertions must also have type annotations."), + A_rest_element_cannot_follow_another_rest_element: diag(1265, DiagnosticCategory.Error, "A_rest_element_cannot_follow_another_rest_element_1265", "A rest element cannot follow another rest element."), + An_optional_element_cannot_follow_a_rest_element: diag(1266, DiagnosticCategory.Error, "An_optional_element_cannot_follow_a_rest_element_1266", "An optional element cannot follow a rest element."), + Property_0_cannot_have_an_initializer_because_it_is_marked_abstract: diag(1267, DiagnosticCategory.Error, "Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267", "Property '{0}' cannot have an initializer because it is marked abstract."), + An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type: diag(1268, DiagnosticCategory.Error, "An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268", "An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."), + Cannot_use_export_import_on_a_type_or_type_only_namespace_when_the_isolatedModules_flag_is_provided: diag(1269, DiagnosticCategory.Error, "Cannot_use_export_import_on_a_type_or_type_only_namespace_when_the_isolatedModules_flag_is_provided_1269", "Cannot use 'export import' on a type or type-only namespace when the '--isolatedModules' flag is provided."), + Decorator_function_return_type_0_is_not_assignable_to_type_1: diag(1270, DiagnosticCategory.Error, "Decorator_function_return_type_0_is_not_assignable_to_type_1_1270", "Decorator function return type '{0}' is not assignable to type '{1}'."), + Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any: diag(1271, DiagnosticCategory.Error, "Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271", "Decorator function return type is '{0}' but is expected to be 'void' or 'any'."), + A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled: diag(1272, DiagnosticCategory.Error, "A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272", "A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."), + _0_modifier_cannot_appear_on_a_type_parameter: diag(1273, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_type_parameter_1273", "'{0}' modifier cannot appear on a type parameter"), + _0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias: diag(1274, DiagnosticCategory.Error, "_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274", "'{0}' modifier can only appear on a type parameter of a class, interface or type alias"), + accessor_modifier_can_only_appear_on_a_property_declaration: diag(1275, DiagnosticCategory.Error, "accessor_modifier_can_only_appear_on_a_property_declaration_1275", "'accessor' modifier can only appear on a property declaration."), + An_accessor_property_cannot_be_declared_optional: diag(1276, DiagnosticCategory.Error, "An_accessor_property_cannot_be_declared_optional_1276", "An 'accessor' property cannot be declared optional."), + with_statements_are_not_allowed_in_an_async_function_block: diag(1300, DiagnosticCategory.Error, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."), + await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, DiagnosticCategory.Error, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."), + The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, DiagnosticCategory.Error, "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309", "The current file is a CommonJS module and cannot use 'await' at the top level."), + Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern: diag(1312, DiagnosticCategory.Error, "Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312", "Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."), + The_body_of_an_if_statement_cannot_be_the_empty_statement: diag(1313, DiagnosticCategory.Error, "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313", "The body of an 'if' statement cannot be the empty statement."), + Global_module_exports_may_only_appear_in_module_files: diag(1314, DiagnosticCategory.Error, "Global_module_exports_may_only_appear_in_module_files_1314", "Global module exports may only appear in module files."), + Global_module_exports_may_only_appear_in_declaration_files: diag(1315, DiagnosticCategory.Error, "Global_module_exports_may_only_appear_in_declaration_files_1315", "Global module exports may only appear in declaration files."), + Global_module_exports_may_only_appear_at_top_level: diag(1316, DiagnosticCategory.Error, "Global_module_exports_may_only_appear_at_top_level_1316", "Global module exports may only appear at top level."), + A_parameter_property_cannot_be_declared_using_a_rest_parameter: diag(1317, DiagnosticCategory.Error, "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317", "A parameter property cannot be declared using a rest parameter."), + An_abstract_accessor_cannot_have_an_implementation: diag(1318, DiagnosticCategory.Error, "An_abstract_accessor_cannot_have_an_implementation_1318", "An abstract accessor cannot have an implementation."), + A_default_export_can_only_be_used_in_an_ECMAScript_style_module: diag(1319, DiagnosticCategory.Error, "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319", "A default export can only be used in an ECMAScript-style module."), + Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1320, DiagnosticCategory.Error, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."), + Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1321, DiagnosticCategory.Error, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."), + Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1322, DiagnosticCategory.Error, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."), + Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext: diag(1323, DiagnosticCategory.Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."), + Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext: diag(1324, DiagnosticCategory.Error, "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324", "Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'."), + Argument_of_dynamic_import_cannot_be_spread_element: diag(1325, DiagnosticCategory.Error, "Argument_of_dynamic_import_cannot_be_spread_element_1325", "Argument of dynamic import cannot be spread element."), + This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments: diag(1326, DiagnosticCategory.Error, "This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326", "This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."), + String_literal_with_double_quotes_expected: diag(1327, DiagnosticCategory.Error, "String_literal_with_double_quotes_expected_1327", "String literal with double quotes expected."), + Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal: diag(1328, DiagnosticCategory.Error, "Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328", "Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."), + _0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0: diag(1329, DiagnosticCategory.Error, "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329", "'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"), + A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly: diag(1330, DiagnosticCategory.Error, "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330", "A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."), + A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly: diag(1331, DiagnosticCategory.Error, "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331", "A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."), + A_variable_whose_type_is_a_unique_symbol_type_must_be_const: diag(1332, DiagnosticCategory.Error, "A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332", "A variable whose type is a 'unique symbol' type must be 'const'."), + unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name: diag(1333, DiagnosticCategory.Error, "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333", "'unique symbol' types may not be used on a variable declaration with a binding name."), + unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement: diag(1334, DiagnosticCategory.Error, "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334", "'unique symbol' types are only allowed on variables in a variable statement."), + unique_symbol_types_are_not_allowed_here: diag(1335, DiagnosticCategory.Error, "unique_symbol_types_are_not_allowed_here_1335", "'unique symbol' types are not allowed here."), + An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead: diag(1337, DiagnosticCategory.Error, "An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337", "An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."), + infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type: diag(1338, DiagnosticCategory.Error, "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338", "'infer' declarations are only permitted in the 'extends' clause of a conditional type."), + Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: diag(1339, DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."), + Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"), + Class_constructor_may_not_be_an_accessor: diag(1341, DiagnosticCategory.Error, "Class_constructor_may_not_be_an_accessor_1341", "Class constructor may not be an accessor."), + Type_arguments_cannot_be_used_here: diag(1342, DiagnosticCategory.Error, "Type_arguments_cannot_be_used_here_1342", "Type arguments cannot be used here."), + The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext: diag(1343, DiagnosticCategory.Error, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."), + A_label_is_not_allowed_here: diag(1344, DiagnosticCategory.Error, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."), + An_expression_of_type_void_cannot_be_tested_for_truthiness: diag(1345, DiagnosticCategory.Error, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."), + This_parameter_is_not_allowed_with_use_strict_directive: diag(1346, DiagnosticCategory.Error, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."), + use_strict_directive_cannot_be_used_with_non_simple_parameter_list: diag(1347, DiagnosticCategory.Error, "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347", "'use strict' directive cannot be used with non-simple parameter list."), + Non_simple_parameter_declared_here: diag(1348, DiagnosticCategory.Error, "Non_simple_parameter_declared_here_1348", "Non-simple parameter declared here."), + use_strict_directive_used_here: diag(1349, DiagnosticCategory.Error, "use_strict_directive_used_here_1349", "'use strict' directive used here."), + Print_the_final_configuration_instead_of_building: diag(1350, DiagnosticCategory.Message, "Print_the_final_configuration_instead_of_building_1350", "Print the final configuration instead of building."), + An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal: diag(1351, DiagnosticCategory.Error, "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351", "An identifier or keyword cannot immediately follow a numeric literal."), + A_bigint_literal_cannot_use_exponential_notation: diag(1352, DiagnosticCategory.Error, "A_bigint_literal_cannot_use_exponential_notation_1352", "A bigint literal cannot use exponential notation."), + A_bigint_literal_must_be_an_integer: diag(1353, DiagnosticCategory.Error, "A_bigint_literal_must_be_an_integer_1353", "A bigint literal must be an integer."), + readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types: diag(1354, DiagnosticCategory.Error, "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354", "'readonly' type modifier is only permitted on array and tuple literal types."), + A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals: diag(1355, DiagnosticCategory.Error, "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355", "A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."), + Did_you_mean_to_mark_this_function_as_async: diag(1356, DiagnosticCategory.Error, "Did_you_mean_to_mark_this_function_as_async_1356", "Did you mean to mark this function as 'async'?"), + An_enum_member_name_must_be_followed_by_a_or: diag(1357, DiagnosticCategory.Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."), + Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, DiagnosticCategory.Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."), + Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: diag(1359, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."), + Type_0_does_not_satisfy_the_expected_type_1: diag(1360, DiagnosticCategory.Error, "Type_0_does_not_satisfy_the_expected_type_1_1360", "Type '{0}' does not satisfy the expected type '{1}'."), + _0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type: diag(1361, DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361", "'{0}' cannot be used as a value because it was imported using 'import type'."), + _0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type: diag(1362, DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362", "'{0}' cannot be used as a value because it was exported using 'export type'."), + A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both: diag(1363, DiagnosticCategory.Error, "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363", "A type-only import can specify a default import or named bindings, but not both."), + Convert_to_type_only_export: diag(1364, DiagnosticCategory.Message, "Convert_to_type_only_export_1364", "Convert to type-only export"), + Convert_all_re_exported_types_to_type_only_exports: diag(1365, DiagnosticCategory.Message, "Convert_all_re_exported_types_to_type_only_exports_1365", "Convert all re-exported types to type-only exports"), + Split_into_two_separate_import_declarations: diag(1366, DiagnosticCategory.Message, "Split_into_two_separate_import_declarations_1366", "Split into two separate import declarations"), + Split_all_invalid_type_only_imports: diag(1367, DiagnosticCategory.Message, "Split_all_invalid_type_only_imports_1367", "Split all invalid type-only imports"), + Class_constructor_may_not_be_a_generator: diag(1368, DiagnosticCategory.Error, "Class_constructor_may_not_be_a_generator_1368", "Class constructor may not be a generator."), + Did_you_mean_0: diag(1369, DiagnosticCategory.Message, "Did_you_mean_0_1369", "Did you mean '{0}'?"), + This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error: diag(1371, DiagnosticCategory.Error, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371", "This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'."), + Convert_to_type_only_import: diag(1373, DiagnosticCategory.Message, "Convert_to_type_only_import_1373", "Convert to type-only import"), + Convert_all_imports_not_used_as_a_value_to_type_only_imports: diag(1374, DiagnosticCategory.Message, "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374", "Convert all imports not used as a value to type-only imports"), + await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1375, DiagnosticCategory.Error, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), + _0_was_imported_here: diag(1376, DiagnosticCategory.Message, "_0_was_imported_here_1376", "'{0}' was imported here."), + _0_was_exported_here: diag(1377, DiagnosticCategory.Message, "_0_was_exported_here_1377", "'{0}' was exported here."), + 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: diag(1378, DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378", "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."), + An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."), + An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."), + Unexpected_token_Did_you_mean_or_rbrace: diag(1381, DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"), + Unexpected_token_Did_you_mean_or_gt: diag(1382, DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `>`?"), + Only_named_exports_may_use_export_type: diag(1383, DiagnosticCategory.Error, "Only_named_exports_may_use_export_type_1383", "Only named exports may use 'export type'."), + Function_type_notation_must_be_parenthesized_when_used_in_a_union_type: diag(1385, DiagnosticCategory.Error, "Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385", "Function type notation must be parenthesized when used in a union type."), + Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type: diag(1386, DiagnosticCategory.Error, "Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386", "Constructor type notation must be parenthesized when used in a union type."), + Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: diag(1387, DiagnosticCategory.Error, "Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387", "Function type notation must be parenthesized when used in an intersection type."), + Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: diag(1388, DiagnosticCategory.Error, "Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388", "Constructor type notation must be parenthesized when used in an intersection type."), + _0_is_not_allowed_as_a_variable_declaration_name: diag(1389, DiagnosticCategory.Error, "_0_is_not_allowed_as_a_variable_declaration_name_1389", "'{0}' is not allowed as a variable declaration name."), + _0_is_not_allowed_as_a_parameter_name: diag(1390, DiagnosticCategory.Error, "_0_is_not_allowed_as_a_parameter_name_1390", "'{0}' is not allowed as a parameter name."), + An_import_alias_cannot_use_import_type: diag(1392, DiagnosticCategory.Error, "An_import_alias_cannot_use_import_type_1392", "An import alias cannot use 'import type'"), + Imported_via_0_from_file_1: diag(1393, DiagnosticCategory.Message, "Imported_via_0_from_file_1_1393", "Imported via {0} from file '{1}'"), + Imported_via_0_from_file_1_with_packageId_2: diag(1394, DiagnosticCategory.Message, "Imported_via_0_from_file_1_with_packageId_2_1394", "Imported via {0} from file '{1}' with packageId '{2}'"), + Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions: diag(1395, DiagnosticCategory.Message, "Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395", "Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"), + Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions: diag(1396, DiagnosticCategory.Message, "Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396", "Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"), + Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions: diag(1397, DiagnosticCategory.Message, "Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397", "Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"), + Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions: diag(1398, DiagnosticCategory.Message, "Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398", "Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"), + File_is_included_via_import_here: diag(1399, DiagnosticCategory.Message, "File_is_included_via_import_here_1399", "File is included via import here."), + Referenced_via_0_from_file_1: diag(1400, DiagnosticCategory.Message, "Referenced_via_0_from_file_1_1400", "Referenced via '{0}' from file '{1}'"), + File_is_included_via_reference_here: diag(1401, DiagnosticCategory.Message, "File_is_included_via_reference_here_1401", "File is included via reference here."), + Type_library_referenced_via_0_from_file_1: diag(1402, DiagnosticCategory.Message, "Type_library_referenced_via_0_from_file_1_1402", "Type library referenced via '{0}' from file '{1}'"), + Type_library_referenced_via_0_from_file_1_with_packageId_2: diag(1403, DiagnosticCategory.Message, "Type_library_referenced_via_0_from_file_1_with_packageId_2_1403", "Type library referenced via '{0}' from file '{1}' with packageId '{2}'"), + File_is_included_via_type_library_reference_here: diag(1404, DiagnosticCategory.Message, "File_is_included_via_type_library_reference_here_1404", "File is included via type library reference here."), + Library_referenced_via_0_from_file_1: diag(1405, DiagnosticCategory.Message, "Library_referenced_via_0_from_file_1_1405", "Library referenced via '{0}' from file '{1}'"), + File_is_included_via_library_reference_here: diag(1406, DiagnosticCategory.Message, "File_is_included_via_library_reference_here_1406", "File is included via library reference here."), + Matched_by_include_pattern_0_in_1: diag(1407, DiagnosticCategory.Message, "Matched_by_include_pattern_0_in_1_1407", "Matched by include pattern '{0}' in '{1}'"), + File_is_matched_by_include_pattern_specified_here: diag(1408, DiagnosticCategory.Message, "File_is_matched_by_include_pattern_specified_here_1408", "File is matched by include pattern specified here."), + Part_of_files_list_in_tsconfig_json: diag(1409, DiagnosticCategory.Message, "Part_of_files_list_in_tsconfig_json_1409", "Part of 'files' list in tsconfig.json"), + File_is_matched_by_files_list_specified_here: diag(1410, DiagnosticCategory.Message, "File_is_matched_by_files_list_specified_here_1410", "File is matched by 'files' list specified here."), + Output_from_referenced_project_0_included_because_1_specified: diag(1411, DiagnosticCategory.Message, "Output_from_referenced_project_0_included_because_1_specified_1411", "Output from referenced project '{0}' included because '{1}' specified"), + Output_from_referenced_project_0_included_because_module_is_specified_as_none: diag(1412, DiagnosticCategory.Message, "Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412", "Output from referenced project '{0}' included because '--module' is specified as 'none'"), + File_is_output_from_referenced_project_specified_here: diag(1413, DiagnosticCategory.Message, "File_is_output_from_referenced_project_specified_here_1413", "File is output from referenced project specified here."), + Source_from_referenced_project_0_included_because_1_specified: diag(1414, DiagnosticCategory.Message, "Source_from_referenced_project_0_included_because_1_specified_1414", "Source from referenced project '{0}' included because '{1}' specified"), + Source_from_referenced_project_0_included_because_module_is_specified_as_none: diag(1415, DiagnosticCategory.Message, "Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415", "Source from referenced project '{0}' included because '--module' is specified as 'none'"), + File_is_source_from_referenced_project_specified_here: diag(1416, DiagnosticCategory.Message, "File_is_source_from_referenced_project_specified_here_1416", "File is source from referenced project specified here."), + Entry_point_of_type_library_0_specified_in_compilerOptions: diag(1417, DiagnosticCategory.Message, "Entry_point_of_type_library_0_specified_in_compilerOptions_1417", "Entry point of type library '{0}' specified in compilerOptions"), + Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1: diag(1418, DiagnosticCategory.Message, "Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418", "Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"), + File_is_entry_point_of_type_library_specified_here: diag(1419, DiagnosticCategory.Message, "File_is_entry_point_of_type_library_specified_here_1419", "File is entry point of type library specified here."), + Entry_point_for_implicit_type_library_0: diag(1420, DiagnosticCategory.Message, "Entry_point_for_implicit_type_library_0_1420", "Entry point for implicit type library '{0}'"), + Entry_point_for_implicit_type_library_0_with_packageId_1: diag(1421, DiagnosticCategory.Message, "Entry_point_for_implicit_type_library_0_with_packageId_1_1421", "Entry point for implicit type library '{0}' with packageId '{1}'"), + Library_0_specified_in_compilerOptions: diag(1422, DiagnosticCategory.Message, "Library_0_specified_in_compilerOptions_1422", "Library '{0}' specified in compilerOptions"), + File_is_library_specified_here: diag(1423, DiagnosticCategory.Message, "File_is_library_specified_here_1423", "File is library specified here."), + Default_library: diag(1424, DiagnosticCategory.Message, "Default_library_1424", "Default library"), + Default_library_for_target_0: diag(1425, DiagnosticCategory.Message, "Default_library_for_target_0_1425", "Default library for target '{0}'"), + File_is_default_library_for_target_specified_here: diag(1426, DiagnosticCategory.Message, "File_is_default_library_for_target_specified_here_1426", "File is default library for target specified here."), + Root_file_specified_for_compilation: diag(1427, DiagnosticCategory.Message, "Root_file_specified_for_compilation_1427", "Root file specified for compilation"), + File_is_output_of_project_reference_source_0: diag(1428, DiagnosticCategory.Message, "File_is_output_of_project_reference_source_0_1428", "File is output of project reference source '{0}'"), + File_redirects_to_file_0: diag(1429, DiagnosticCategory.Message, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"), + The_file_is_in_the_program_because_Colon: diag(1430, DiagnosticCategory.Message, "The_file_is_in_the_program_because_Colon_1430", "The file is in the program because:"), + for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1431, DiagnosticCategory.Error, "for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431", "'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), + Top_level_for_await_loops_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: diag(1432, DiagnosticCategory.Error, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432", "Top-level 'for await' loops 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."), + Decorators_may_not_be_applied_to_this_parameters: diag(1433, DiagnosticCategory.Error, "Decorators_may_not_be_applied_to_this_parameters_1433", "Decorators may not be applied to 'this' parameters."), + Unexpected_keyword_or_identifier: diag(1434, DiagnosticCategory.Error, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."), + Unknown_keyword_or_identifier_Did_you_mean_0: diag(1435, DiagnosticCategory.Error, "Unknown_keyword_or_identifier_Did_you_mean_0_1435", "Unknown keyword or identifier. Did you mean '{0}'?"), + Decorators_must_precede_the_name_and_all_keywords_of_property_declarations: diag(1436, DiagnosticCategory.Error, "Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436", "Decorators must precede the name and all keywords of property declarations."), + Namespace_must_be_given_a_name: diag(1437, DiagnosticCategory.Error, "Namespace_must_be_given_a_name_1437", "Namespace must be given a name."), + Interface_must_be_given_a_name: diag(1438, DiagnosticCategory.Error, "Interface_must_be_given_a_name_1438", "Interface must be given a name."), + Type_alias_must_be_given_a_name: diag(1439, DiagnosticCategory.Error, "Type_alias_must_be_given_a_name_1439", "Type alias must be given a name."), + Variable_declaration_not_allowed_at_this_location: diag(1440, DiagnosticCategory.Error, "Variable_declaration_not_allowed_at_this_location_1440", "Variable declaration not allowed at this location."), + Cannot_start_a_function_call_in_a_type_annotation: diag(1441, DiagnosticCategory.Error, "Cannot_start_a_function_call_in_a_type_annotation_1441", "Cannot start a function call in a type annotation."), + Expected_for_property_initializer: diag(1442, DiagnosticCategory.Error, "Expected_for_property_initializer_1442", "Expected '=' for property initializer."), + Module_declaration_names_may_only_use_or_quoted_strings: diag(1443, DiagnosticCategory.Error, "Module_declaration_names_may_only_use_or_quoted_strings_1443", "Module declaration names may only use ' or \" quoted strings."), + _0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled: diag(1444, DiagnosticCategory.Error, "_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedMod_1444", "'{0}' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."), + _0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled: diag(1446, DiagnosticCategory.Error, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveVa_1446", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."), + _0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isolatedModules_is_enabled: diag(1448, DiagnosticCategory.Error, "_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isol_1448", "'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when 'isolatedModules' is enabled."), + Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: diag(1449, DiagnosticCategory.Message, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."), + Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments: diag(1450, DiagnosticCategory.Message, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional assertion as arguments"), + Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: diag(1451, DiagnosticCategory.Error, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"), + resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext: diag(1452, DiagnosticCategory.Error, "resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452", "'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`."), + resolution_mode_should_be_either_require_or_import: diag(1453, DiagnosticCategory.Error, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."), + resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, DiagnosticCategory.Error, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."), + resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, DiagnosticCategory.Error, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."), + Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: diag(1456, DiagnosticCategory.Error, "Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456", "Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."), + Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk: diag(1457, DiagnosticCategory.Message, "Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457", "Matched by default include pattern '**/*'"), + File_is_ECMAScript_module_because_0_has_field_type_with_value_module: diag(1458, DiagnosticCategory.Message, "File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458", "File is ECMAScript module because '{0}' has field \"type\" with value \"module\""), + File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module: diag(1459, DiagnosticCategory.Message, "File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459", "File is CommonJS module because '{0}' has field \"type\" whose value is not \"module\""), + File_is_CommonJS_module_because_0_does_not_have_field_type: diag(1460, DiagnosticCategory.Message, "File_is_CommonJS_module_because_0_does_not_have_field_type_1460", "File is CommonJS module because '{0}' does not have field \"type\""), + File_is_CommonJS_module_because_package_json_was_not_found: diag(1461, DiagnosticCategory.Message, "File_is_CommonJS_module_because_package_json_was_not_found_1461", "File is CommonJS module because 'package.json' was not found"), + The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, DiagnosticCategory.Error, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."), + Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead: diag(1471, DiagnosticCategory.Error, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."), + catch_or_finally_expected: diag(1472, DiagnosticCategory.Error, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."), + An_import_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1473, DiagnosticCategory.Error, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473", "An import declaration can only be used at the top level of a module."), + An_export_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1474, DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474", "An export declaration can only be used at the top level of a module."), + Control_what_method_is_used_to_detect_module_format_JS_files: diag(1475, DiagnosticCategory.Message, "Control_what_method_is_used_to_detect_module_format_JS_files_1475", "Control what method is used to detect module-format JS files."), + auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules: diag(1476, DiagnosticCategory.Message, "auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476", "\"auto\": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules."), + An_instantiation_expression_cannot_be_followed_by_a_property_access: diag(1477, DiagnosticCategory.Error, "An_instantiation_expression_cannot_be_followed_by_a_property_access_1477", "An instantiation expression cannot be followed by a property access."), + Identifier_or_string_literal_expected: diag(1478, DiagnosticCategory.Error, "Identifier_or_string_literal_expected_1478", "Identifier or string literal expected."), + The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead: diag(1479, DiagnosticCategory.Error, "The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479", "The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import(\"{0}\")' call instead."), + To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module: diag(1480, DiagnosticCategory.Message, "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480", "To convert this file to an ECMAScript module, change its file extension to '{0}' or create a local package.json file with `{ \"type\": \"module\" }`."), + To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1: diag(1481, DiagnosticCategory.Message, "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481", "To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field `\"type\": \"module\"` to '{1}'."), + To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0: diag(1482, DiagnosticCategory.Message, "To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482", "To convert this file to an ECMAScript module, add the field `\"type\": \"module\"` to '{0}'."), + To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module: diag(1483, DiagnosticCategory.Message, "To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483", "To convert this file to an ECMAScript module, create a local package.json file with `{ \"type\": \"module\" }`."), + The_types_of_0_are_incompatible_between_these_types: diag(2200, DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."), + The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."), + Call_signature_return_types_0_and_1_are_incompatible: diag(2202, DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), + Construct_signature_return_types_0_and_1_are_incompatible: diag(2203, DiagnosticCategory.Error, "Construct_signature_return_types_0_and_1_are_incompatible_2203", "Construct signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), + Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: diag(2204, DiagnosticCategory.Error, "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204", "Call signatures with no arguments have incompatible return types '{0}' and '{1}'.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), + Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: diag(2205, DiagnosticCategory.Error, "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205", "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), + The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement: diag(2206, DiagnosticCategory.Error, "The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206", "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."), + The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement: diag(2207, DiagnosticCategory.Error, "The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207", "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."), + This_type_parameter_might_need_an_extends_0_constraint: diag(2208, DiagnosticCategory.Error, "This_type_parameter_might_need_an_extends_0_constraint_2208", "This type parameter might need an `extends {0}` constraint."), + The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2209, DiagnosticCategory.Error, "The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209", "The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."), + The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2210, DiagnosticCategory.Error, "The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210", "The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."), + Add_extends_constraint: diag(2211, DiagnosticCategory.Message, "Add_extends_constraint_2211", "Add `extends` constraint."), + Add_extends_constraint_to_all_type_parameters: diag(2212, DiagnosticCategory.Message, "Add_extends_constraint_to_all_type_parameters_2212", "Add `extends` constraint to all type parameters"), + Duplicate_identifier_0: diag(2300, DiagnosticCategory.Error, "Duplicate_identifier_0_2300", "Duplicate identifier '{0}'."), + Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2301, DiagnosticCategory.Error, "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."), + Static_members_cannot_reference_class_type_parameters: diag(2302, DiagnosticCategory.Error, "Static_members_cannot_reference_class_type_parameters_2302", "Static members cannot reference class type parameters."), + Circular_definition_of_import_alias_0: diag(2303, DiagnosticCategory.Error, "Circular_definition_of_import_alias_0_2303", "Circular definition of import alias '{0}'."), + Cannot_find_name_0: diag(2304, DiagnosticCategory.Error, "Cannot_find_name_0_2304", "Cannot find name '{0}'."), + Module_0_has_no_exported_member_1: diag(2305, DiagnosticCategory.Error, "Module_0_has_no_exported_member_1_2305", "Module '{0}' has no exported member '{1}'."), + File_0_is_not_a_module: diag(2306, DiagnosticCategory.Error, "File_0_is_not_a_module_2306", "File '{0}' is not a module."), + Cannot_find_module_0_or_its_corresponding_type_declarations: diag(2307, DiagnosticCategory.Error, "Cannot_find_module_0_or_its_corresponding_type_declarations_2307", "Cannot find module '{0}' or its corresponding type declarations."), + Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity: diag(2308, DiagnosticCategory.Error, "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308", "Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."), + An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: diag(2309, DiagnosticCategory.Error, "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309", "An export assignment cannot be used in a module with other exported elements."), + Type_0_recursively_references_itself_as_a_base_type: diag(2310, DiagnosticCategory.Error, "Type_0_recursively_references_itself_as_a_base_type_2310", "Type '{0}' recursively references itself as a base type."), + Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function: diag(2311, DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311", "Cannot find name '{0}'. Did you mean to write this in an async function?"), + An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2312, DiagnosticCategory.Error, "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312", "An interface can only extend an object type or intersection of object types with statically known members."), + Type_parameter_0_has_a_circular_constraint: diag(2313, DiagnosticCategory.Error, "Type_parameter_0_has_a_circular_constraint_2313", "Type parameter '{0}' has a circular constraint."), + Generic_type_0_requires_1_type_argument_s: diag(2314, DiagnosticCategory.Error, "Generic_type_0_requires_1_type_argument_s_2314", "Generic type '{0}' requires {1} type argument(s)."), + Type_0_is_not_generic: diag(2315, DiagnosticCategory.Error, "Type_0_is_not_generic_2315", "Type '{0}' is not generic."), + Global_type_0_must_be_a_class_or_interface_type: diag(2316, DiagnosticCategory.Error, "Global_type_0_must_be_a_class_or_interface_type_2316", "Global type '{0}' must be a class or interface type."), + Global_type_0_must_have_1_type_parameter_s: diag(2317, DiagnosticCategory.Error, "Global_type_0_must_have_1_type_parameter_s_2317", "Global type '{0}' must have {1} type parameter(s)."), + Cannot_find_global_type_0: diag(2318, DiagnosticCategory.Error, "Cannot_find_global_type_0_2318", "Cannot find global type '{0}'."), + Named_property_0_of_types_1_and_2_are_not_identical: diag(2319, DiagnosticCategory.Error, "Named_property_0_of_types_1_and_2_are_not_identical_2319", "Named property '{0}' of types '{1}' and '{2}' are not identical."), + Interface_0_cannot_simultaneously_extend_types_1_and_2: diag(2320, DiagnosticCategory.Error, "Interface_0_cannot_simultaneously_extend_types_1_and_2_2320", "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."), + Excessive_stack_depth_comparing_types_0_and_1: diag(2321, DiagnosticCategory.Error, "Excessive_stack_depth_comparing_types_0_and_1_2321", "Excessive stack depth comparing types '{0}' and '{1}'."), + Type_0_is_not_assignable_to_type_1: diag(2322, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_2322", "Type '{0}' is not assignable to type '{1}'."), + Cannot_redeclare_exported_variable_0: diag(2323, DiagnosticCategory.Error, "Cannot_redeclare_exported_variable_0_2323", "Cannot redeclare exported variable '{0}'."), + Property_0_is_missing_in_type_1: diag(2324, DiagnosticCategory.Error, "Property_0_is_missing_in_type_1_2324", "Property '{0}' is missing in type '{1}'."), + Property_0_is_private_in_type_1_but_not_in_type_2: diag(2325, DiagnosticCategory.Error, "Property_0_is_private_in_type_1_but_not_in_type_2_2325", "Property '{0}' is private in type '{1}' but not in type '{2}'."), + Types_of_property_0_are_incompatible: diag(2326, DiagnosticCategory.Error, "Types_of_property_0_are_incompatible_2326", "Types of property '{0}' are incompatible."), + Property_0_is_optional_in_type_1_but_required_in_type_2: diag(2327, DiagnosticCategory.Error, "Property_0_is_optional_in_type_1_but_required_in_type_2_2327", "Property '{0}' is optional in type '{1}' but required in type '{2}'."), + Types_of_parameters_0_and_1_are_incompatible: diag(2328, DiagnosticCategory.Error, "Types_of_parameters_0_and_1_are_incompatible_2328", "Types of parameters '{0}' and '{1}' are incompatible."), + Index_signature_for_type_0_is_missing_in_type_1: diag(2329, DiagnosticCategory.Error, "Index_signature_for_type_0_is_missing_in_type_1_2329", "Index signature for type '{0}' is missing in type '{1}'."), + _0_and_1_index_signatures_are_incompatible: diag(2330, DiagnosticCategory.Error, "_0_and_1_index_signatures_are_incompatible_2330", "'{0}' and '{1}' index signatures are incompatible."), + this_cannot_be_referenced_in_a_module_or_namespace_body: diag(2331, DiagnosticCategory.Error, "this_cannot_be_referenced_in_a_module_or_namespace_body_2331", "'this' cannot be referenced in a module or namespace body."), + this_cannot_be_referenced_in_current_location: diag(2332, DiagnosticCategory.Error, "this_cannot_be_referenced_in_current_location_2332", "'this' cannot be referenced in current location."), + this_cannot_be_referenced_in_constructor_arguments: diag(2333, DiagnosticCategory.Error, "this_cannot_be_referenced_in_constructor_arguments_2333", "'this' cannot be referenced in constructor arguments."), + this_cannot_be_referenced_in_a_static_property_initializer: diag(2334, DiagnosticCategory.Error, "this_cannot_be_referenced_in_a_static_property_initializer_2334", "'this' cannot be referenced in a static property initializer."), + super_can_only_be_referenced_in_a_derived_class: diag(2335, DiagnosticCategory.Error, "super_can_only_be_referenced_in_a_derived_class_2335", "'super' can only be referenced in a derived class."), + super_cannot_be_referenced_in_constructor_arguments: diag(2336, DiagnosticCategory.Error, "super_cannot_be_referenced_in_constructor_arguments_2336", "'super' cannot be referenced in constructor arguments."), + Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: diag(2337, DiagnosticCategory.Error, "Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337", "Super calls are not permitted outside constructors or in nested functions inside constructors."), + super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: diag(2338, DiagnosticCategory.Error, "super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338", "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."), + Property_0_does_not_exist_on_type_1: diag(2339, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_2339", "Property '{0}' does not exist on type '{1}'."), + Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: diag(2340, DiagnosticCategory.Error, "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340", "Only public and protected methods of the base class are accessible via the 'super' keyword."), + Property_0_is_private_and_only_accessible_within_class_1: diag(2341, DiagnosticCategory.Error, "Property_0_is_private_and_only_accessible_within_class_1_2341", "Property '{0}' is private and only accessible within class '{1}'."), + This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0: diag(2343, DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343", "This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."), + Type_0_does_not_satisfy_the_constraint_1: diag(2344, DiagnosticCategory.Error, "Type_0_does_not_satisfy_the_constraint_1_2344", "Type '{0}' does not satisfy the constraint '{1}'."), + Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: diag(2345, DiagnosticCategory.Error, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", "Argument of type '{0}' is not assignable to parameter of type '{1}'."), + Call_target_does_not_contain_any_signatures: diag(2346, DiagnosticCategory.Error, "Call_target_does_not_contain_any_signatures_2346", "Call target does not contain any signatures."), + Untyped_function_calls_may_not_accept_type_arguments: diag(2347, DiagnosticCategory.Error, "Untyped_function_calls_may_not_accept_type_arguments_2347", "Untyped function calls may not accept type arguments."), + Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: diag(2348, DiagnosticCategory.Error, "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", "Value of type '{0}' is not callable. Did you mean to include 'new'?"), + This_expression_is_not_callable: diag(2349, DiagnosticCategory.Error, "This_expression_is_not_callable_2349", "This expression is not callable."), + Only_a_void_function_can_be_called_with_the_new_keyword: diag(2350, DiagnosticCategory.Error, "Only_a_void_function_can_be_called_with_the_new_keyword_2350", "Only a void function can be called with the 'new' keyword."), + This_expression_is_not_constructable: diag(2351, DiagnosticCategory.Error, "This_expression_is_not_constructable_2351", "This expression is not constructable."), + Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first: diag(2352, DiagnosticCategory.Error, "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352", "Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."), + Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1: diag(2353, DiagnosticCategory.Error, "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353", "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."), + This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found: diag(2354, DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354", "This syntax requires an imported helper but module '{0}' cannot be found."), + A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value: diag(2355, DiagnosticCategory.Error, "A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355", "A function whose declared type is neither 'void' nor 'any' must return a value."), + An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2356, DiagnosticCategory.Error, "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356", "An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."), + The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: diag(2357, DiagnosticCategory.Error, "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", "The operand of an increment or decrement operator must be a variable or a property access."), + The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: diag(2358, DiagnosticCategory.Error, "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."), + The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: diag(2359, DiagnosticCategory.Error, "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359", "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type."), + The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2362, DiagnosticCategory.Error, "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362", "The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."), + The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2363, DiagnosticCategory.Error, "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363", "The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."), + The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access: diag(2364, DiagnosticCategory.Error, "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", "The left-hand side of an assignment expression must be a variable or a property access."), + Operator_0_cannot_be_applied_to_types_1_and_2: diag(2365, DiagnosticCategory.Error, "Operator_0_cannot_be_applied_to_types_1_and_2_2365", "Operator '{0}' cannot be applied to types '{1}' and '{2}'."), + Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined: diag(2366, DiagnosticCategory.Error, "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366", "Function lacks ending return statement and return type does not include 'undefined'."), + This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap: diag(2367, DiagnosticCategory.Error, "This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367", "This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."), + Type_parameter_name_cannot_be_0: diag(2368, DiagnosticCategory.Error, "Type_parameter_name_cannot_be_0_2368", "Type parameter name cannot be '{0}'."), + A_parameter_property_is_only_allowed_in_a_constructor_implementation: diag(2369, DiagnosticCategory.Error, "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369", "A parameter property is only allowed in a constructor implementation."), + A_rest_parameter_must_be_of_an_array_type: diag(2370, DiagnosticCategory.Error, "A_rest_parameter_must_be_of_an_array_type_2370", "A rest parameter must be of an array type."), + A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: diag(2371, DiagnosticCategory.Error, "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371", "A parameter initializer is only allowed in a function or constructor implementation."), + Parameter_0_cannot_reference_itself: diag(2372, DiagnosticCategory.Error, "Parameter_0_cannot_reference_itself_2372", "Parameter '{0}' cannot reference itself."), + Parameter_0_cannot_reference_identifier_1_declared_after_it: diag(2373, DiagnosticCategory.Error, "Parameter_0_cannot_reference_identifier_1_declared_after_it_2373", "Parameter '{0}' cannot reference identifier '{1}' declared after it."), + Duplicate_index_signature_for_type_0: diag(2374, DiagnosticCategory.Error, "Duplicate_index_signature_for_type_0_2374", "Duplicate index signature for type '{0}'."), + Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: diag(2375, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."), + A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers: diag(2376, DiagnosticCategory.Error, "A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376", "A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers."), + Constructors_for_derived_classes_must_contain_a_super_call: diag(2377, DiagnosticCategory.Error, "Constructors_for_derived_classes_must_contain_a_super_call_2377", "Constructors for derived classes must contain a 'super' call."), + A_get_accessor_must_return_a_value: diag(2378, DiagnosticCategory.Error, "A_get_accessor_must_return_a_value_2378", "A 'get' accessor must return a value."), + Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: diag(2379, DiagnosticCategory.Error, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379", "Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."), + The_return_type_of_a_get_accessor_must_be_assignable_to_its_set_accessor_type: diag(2380, DiagnosticCategory.Error, "The_return_type_of_a_get_accessor_must_be_assignable_to_its_set_accessor_type_2380", "The return type of a 'get' accessor must be assignable to its 'set' accessor type"), + Overload_signatures_must_all_be_exported_or_non_exported: diag(2383, DiagnosticCategory.Error, "Overload_signatures_must_all_be_exported_or_non_exported_2383", "Overload signatures must all be exported or non-exported."), + Overload_signatures_must_all_be_ambient_or_non_ambient: diag(2384, DiagnosticCategory.Error, "Overload_signatures_must_all_be_ambient_or_non_ambient_2384", "Overload signatures must all be ambient or non-ambient."), + Overload_signatures_must_all_be_public_private_or_protected: diag(2385, DiagnosticCategory.Error, "Overload_signatures_must_all_be_public_private_or_protected_2385", "Overload signatures must all be public, private or protected."), + Overload_signatures_must_all_be_optional_or_required: diag(2386, DiagnosticCategory.Error, "Overload_signatures_must_all_be_optional_or_required_2386", "Overload signatures must all be optional or required."), + Function_overload_must_be_static: diag(2387, DiagnosticCategory.Error, "Function_overload_must_be_static_2387", "Function overload must be static."), + Function_overload_must_not_be_static: diag(2388, DiagnosticCategory.Error, "Function_overload_must_not_be_static_2388", "Function overload must not be static."), + Function_implementation_name_must_be_0: diag(2389, DiagnosticCategory.Error, "Function_implementation_name_must_be_0_2389", "Function implementation name must be '{0}'."), + Constructor_implementation_is_missing: diag(2390, DiagnosticCategory.Error, "Constructor_implementation_is_missing_2390", "Constructor implementation is missing."), + Function_implementation_is_missing_or_not_immediately_following_the_declaration: diag(2391, DiagnosticCategory.Error, "Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391", "Function implementation is missing or not immediately following the declaration."), + Multiple_constructor_implementations_are_not_allowed: diag(2392, DiagnosticCategory.Error, "Multiple_constructor_implementations_are_not_allowed_2392", "Multiple constructor implementations are not allowed."), + Duplicate_function_implementation: diag(2393, DiagnosticCategory.Error, "Duplicate_function_implementation_2393", "Duplicate function implementation."), + This_overload_signature_is_not_compatible_with_its_implementation_signature: diag(2394, DiagnosticCategory.Error, "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394", "This overload signature is not compatible with its implementation signature."), + Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local: diag(2395, DiagnosticCategory.Error, "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395", "Individual declarations in merged declaration '{0}' must be all exported or all local."), + Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: diag(2396, DiagnosticCategory.Error, "Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396", "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."), + Declaration_name_conflicts_with_built_in_global_identifier_0: diag(2397, DiagnosticCategory.Error, "Declaration_name_conflicts_with_built_in_global_identifier_0_2397", "Declaration name conflicts with built-in global identifier '{0}'."), + constructor_cannot_be_used_as_a_parameter_property_name: diag(2398, DiagnosticCategory.Error, "constructor_cannot_be_used_as_a_parameter_property_name_2398", "'constructor' cannot be used as a parameter property name."), + Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: diag(2399, DiagnosticCategory.Error, "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399", "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."), + Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: diag(2400, DiagnosticCategory.Error, "Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400", "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."), + A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers: diag(2401, DiagnosticCategory.Error, "A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401", "A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers."), + Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: diag(2402, DiagnosticCategory.Error, "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402", "Expression resolves to '_super' that compiler uses to capture base class reference."), + Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: diag(2403, DiagnosticCategory.Error, "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403", "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."), + The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: diag(2404, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404", "The left-hand side of a 'for...in' statement cannot use a type annotation."), + The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any: diag(2405, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405", "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."), + The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access: diag(2406, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406", "The left-hand side of a 'for...in' statement must be a variable or a property access."), + The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0: diag(2407, DiagnosticCategory.Error, "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407", "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."), + Setters_cannot_return_a_value: diag(2408, DiagnosticCategory.Error, "Setters_cannot_return_a_value_2408", "Setters cannot return a value."), + Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: diag(2409, DiagnosticCategory.Error, "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", "Return type of constructor signature must be assignable to the instance type of the class."), + The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any: diag(2410, DiagnosticCategory.Error, "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410", "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."), + Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target: diag(2412, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."), + Property_0_of_type_1_is_not_assignable_to_2_index_type_3: diag(2411, DiagnosticCategory.Error, "Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411", "Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."), + _0_index_type_1_is_not_assignable_to_2_index_type_3: diag(2413, DiagnosticCategory.Error, "_0_index_type_1_is_not_assignable_to_2_index_type_3_2413", "'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."), + Class_name_cannot_be_0: diag(2414, DiagnosticCategory.Error, "Class_name_cannot_be_0_2414", "Class name cannot be '{0}'."), + Class_0_incorrectly_extends_base_class_1: diag(2415, DiagnosticCategory.Error, "Class_0_incorrectly_extends_base_class_1_2415", "Class '{0}' incorrectly extends base class '{1}'."), + Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2: diag(2416, DiagnosticCategory.Error, "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416", "Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."), + Class_static_side_0_incorrectly_extends_base_class_static_side_1: diag(2417, DiagnosticCategory.Error, "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417", "Class static side '{0}' incorrectly extends base class static side '{1}'."), + Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1: diag(2418, DiagnosticCategory.Error, "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418", "Type of computed property's value is '{0}', which is not assignable to type '{1}'."), + Types_of_construct_signatures_are_incompatible: diag(2419, DiagnosticCategory.Error, "Types_of_construct_signatures_are_incompatible_2419", "Types of construct signatures are incompatible."), + Class_0_incorrectly_implements_interface_1: diag(2420, DiagnosticCategory.Error, "Class_0_incorrectly_implements_interface_1_2420", "Class '{0}' incorrectly implements interface '{1}'."), + A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2422, DiagnosticCategory.Error, "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422", "A class can only implement an object type or intersection of object types with statically known members."), + Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: diag(2423, DiagnosticCategory.Error, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."), + Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2425, DiagnosticCategory.Error, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."), + Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2426, DiagnosticCategory.Error, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."), + Interface_name_cannot_be_0: diag(2427, DiagnosticCategory.Error, "Interface_name_cannot_be_0_2427", "Interface name cannot be '{0}'."), + All_declarations_of_0_must_have_identical_type_parameters: diag(2428, DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_type_parameters_2428", "All declarations of '{0}' must have identical type parameters."), + Interface_0_incorrectly_extends_interface_1: diag(2430, DiagnosticCategory.Error, "Interface_0_incorrectly_extends_interface_1_2430", "Interface '{0}' incorrectly extends interface '{1}'."), + Enum_name_cannot_be_0: diag(2431, DiagnosticCategory.Error, "Enum_name_cannot_be_0_2431", "Enum name cannot be '{0}'."), + In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: diag(2432, DiagnosticCategory.Error, "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432", "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."), + A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: diag(2433, DiagnosticCategory.Error, "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", "A namespace declaration cannot be in a different file from a class or function with which it is merged."), + A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: diag(2434, DiagnosticCategory.Error, "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", "A namespace declaration cannot be located prior to a class or function with which it is merged."), + Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces: diag(2435, DiagnosticCategory.Error, "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435", "Ambient modules cannot be nested in other modules or namespaces."), + Ambient_module_declaration_cannot_specify_relative_module_name: diag(2436, DiagnosticCategory.Error, "Ambient_module_declaration_cannot_specify_relative_module_name_2436", "Ambient module declaration cannot specify relative module name."), + Module_0_is_hidden_by_a_local_declaration_with_the_same_name: diag(2437, DiagnosticCategory.Error, "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", "Module '{0}' is hidden by a local declaration with the same name."), + Import_name_cannot_be_0: diag(2438, DiagnosticCategory.Error, "Import_name_cannot_be_0_2438", "Import name cannot be '{0}'."), + Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: diag(2439, DiagnosticCategory.Error, "Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439", "Import or export declaration in an ambient module declaration cannot reference module through relative module name."), + Import_declaration_conflicts_with_local_declaration_of_0: diag(2440, DiagnosticCategory.Error, "Import_declaration_conflicts_with_local_declaration_of_0_2440", "Import declaration conflicts with local declaration of '{0}'."), + Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: diag(2441, DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441", "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."), + Types_have_separate_declarations_of_a_private_property_0: diag(2442, DiagnosticCategory.Error, "Types_have_separate_declarations_of_a_private_property_0_2442", "Types have separate declarations of a private property '{0}'."), + Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: diag(2443, DiagnosticCategory.Error, "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443", "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."), + Property_0_is_protected_in_type_1_but_public_in_type_2: diag(2444, DiagnosticCategory.Error, "Property_0_is_protected_in_type_1_but_public_in_type_2_2444", "Property '{0}' is protected in type '{1}' but public in type '{2}'."), + Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: diag(2445, DiagnosticCategory.Error, "Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445", "Property '{0}' is protected and only accessible within class '{1}' and its subclasses."), + Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2: diag(2446, DiagnosticCategory.Error, "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446", "Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."), + The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: diag(2447, DiagnosticCategory.Error, "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447", "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."), + Block_scoped_variable_0_used_before_its_declaration: diag(2448, DiagnosticCategory.Error, "Block_scoped_variable_0_used_before_its_declaration_2448", "Block-scoped variable '{0}' used before its declaration."), + Class_0_used_before_its_declaration: diag(2449, DiagnosticCategory.Error, "Class_0_used_before_its_declaration_2449", "Class '{0}' used before its declaration."), + Enum_0_used_before_its_declaration: diag(2450, DiagnosticCategory.Error, "Enum_0_used_before_its_declaration_2450", "Enum '{0}' used before its declaration."), + Cannot_redeclare_block_scoped_variable_0: diag(2451, DiagnosticCategory.Error, "Cannot_redeclare_block_scoped_variable_0_2451", "Cannot redeclare block-scoped variable '{0}'."), + An_enum_member_cannot_have_a_numeric_name: diag(2452, DiagnosticCategory.Error, "An_enum_member_cannot_have_a_numeric_name_2452", "An enum member cannot have a numeric name."), + Variable_0_is_used_before_being_assigned: diag(2454, DiagnosticCategory.Error, "Variable_0_is_used_before_being_assigned_2454", "Variable '{0}' is used before being assigned."), + Type_alias_0_circularly_references_itself: diag(2456, DiagnosticCategory.Error, "Type_alias_0_circularly_references_itself_2456", "Type alias '{0}' circularly references itself."), + Type_alias_name_cannot_be_0: diag(2457, DiagnosticCategory.Error, "Type_alias_name_cannot_be_0_2457", "Type alias name cannot be '{0}'."), + An_AMD_module_cannot_have_multiple_name_assignments: diag(2458, DiagnosticCategory.Error, "An_AMD_module_cannot_have_multiple_name_assignments_2458", "An AMD module cannot have multiple name assignments."), + Module_0_declares_1_locally_but_it_is_not_exported: diag(2459, DiagnosticCategory.Error, "Module_0_declares_1_locally_but_it_is_not_exported_2459", "Module '{0}' declares '{1}' locally, but it is not exported."), + Module_0_declares_1_locally_but_it_is_exported_as_2: diag(2460, DiagnosticCategory.Error, "Module_0_declares_1_locally_but_it_is_exported_as_2_2460", "Module '{0}' declares '{1}' locally, but it is exported as '{2}'."), + Type_0_is_not_an_array_type: diag(2461, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_2461", "Type '{0}' is not an array type."), + A_rest_element_must_be_last_in_a_destructuring_pattern: diag(2462, DiagnosticCategory.Error, "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", "A rest element must be last in a destructuring pattern."), + A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: diag(2463, DiagnosticCategory.Error, "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", "A binding pattern parameter cannot be optional in an implementation signature."), + A_computed_property_name_must_be_of_type_string_number_symbol_or_any: diag(2464, DiagnosticCategory.Error, "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464", "A computed property name must be of type 'string', 'number', 'symbol', or 'any'."), + this_cannot_be_referenced_in_a_computed_property_name: diag(2465, DiagnosticCategory.Error, "this_cannot_be_referenced_in_a_computed_property_name_2465", "'this' cannot be referenced in a computed property name."), + super_cannot_be_referenced_in_a_computed_property_name: diag(2466, DiagnosticCategory.Error, "super_cannot_be_referenced_in_a_computed_property_name_2466", "'super' cannot be referenced in a computed property name."), + A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type: diag(2467, DiagnosticCategory.Error, "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467", "A computed property name cannot reference a type parameter from its containing type."), + Cannot_find_global_value_0: diag(2468, DiagnosticCategory.Error, "Cannot_find_global_value_0_2468", "Cannot find global value '{0}'."), + The_0_operator_cannot_be_applied_to_type_symbol: diag(2469, DiagnosticCategory.Error, "The_0_operator_cannot_be_applied_to_type_symbol_2469", "The '{0}' operator cannot be applied to type 'symbol'."), + Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher: diag(2472, DiagnosticCategory.Error, "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472", "Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."), + Enum_declarations_must_all_be_const_or_non_const: diag(2473, DiagnosticCategory.Error, "Enum_declarations_must_all_be_const_or_non_const_2473", "Enum declarations must all be const or non-const."), + const_enum_member_initializers_must_be_constant_expressions: diag(2474, DiagnosticCategory.Error, "const_enum_member_initializers_must_be_constant_expressions_2474", "const enum member initializers must be constant expressions."), + const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query: diag(2475, DiagnosticCategory.Error, "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475", "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."), + A_const_enum_member_can_only_be_accessed_using_a_string_literal: diag(2476, DiagnosticCategory.Error, "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476", "A const enum member can only be accessed using a string literal."), + const_enum_member_initializer_was_evaluated_to_a_non_finite_value: diag(2477, DiagnosticCategory.Error, "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477", "'const' enum member initializer was evaluated to a non-finite value."), + const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN: diag(2478, DiagnosticCategory.Error, "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478", "'const' enum member initializer was evaluated to disallowed value 'NaN'."), + let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: diag(2480, DiagnosticCategory.Error, "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480", "'let' is not allowed to be used as a name in 'let' or 'const' declarations."), + Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: diag(2481, DiagnosticCategory.Error, "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481", "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."), + The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: diag(2483, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483", "The left-hand side of a 'for...of' statement cannot use a type annotation."), + Export_declaration_conflicts_with_exported_declaration_of_0: diag(2484, DiagnosticCategory.Error, "Export_declaration_conflicts_with_exported_declaration_of_0_2484", "Export declaration conflicts with exported declaration of '{0}'."), + The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access: diag(2487, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487", "The left-hand side of a 'for...of' statement must be a variable or a property access."), + Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2488, DiagnosticCategory.Error, "Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488", "Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."), + An_iterator_must_have_a_next_method: diag(2489, DiagnosticCategory.Error, "An_iterator_must_have_a_next_method_2489", "An iterator must have a 'next()' method."), + The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property: diag(2490, DiagnosticCategory.Error, "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490", "The type returned by the '{0}()' method of an iterator must have a 'value' property."), + The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: diag(2491, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491", "The left-hand side of a 'for...in' statement cannot be a destructuring pattern."), + Cannot_redeclare_identifier_0_in_catch_clause: diag(2492, DiagnosticCategory.Error, "Cannot_redeclare_identifier_0_in_catch_clause_2492", "Cannot redeclare identifier '{0}' in catch clause."), + Tuple_type_0_of_length_1_has_no_element_at_index_2: diag(2493, DiagnosticCategory.Error, "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493", "Tuple type '{0}' of length '{1}' has no element at index '{2}'."), + Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: diag(2494, DiagnosticCategory.Error, "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494", "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."), + Type_0_is_not_an_array_type_or_a_string_type: diag(2495, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_a_string_type_2495", "Type '{0}' is not an array type or a string type."), + The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression: diag(2496, DiagnosticCategory.Error, "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496", "The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression."), + This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export: diag(2497, DiagnosticCategory.Error, "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497", "This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."), + Module_0_uses_export_and_cannot_be_used_with_export_Asterisk: diag(2498, DiagnosticCategory.Error, "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498", "Module '{0}' uses 'export =' and cannot be used with 'export *'."), + An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments: diag(2499, DiagnosticCategory.Error, "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499", "An interface can only extend an identifier/qualified-name with optional type arguments."), + A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments: diag(2500, DiagnosticCategory.Error, "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500", "A class can only implement an identifier/qualified-name with optional type arguments."), + A_rest_element_cannot_contain_a_binding_pattern: diag(2501, DiagnosticCategory.Error, "A_rest_element_cannot_contain_a_binding_pattern_2501", "A rest element cannot contain a binding pattern."), + _0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: diag(2502, DiagnosticCategory.Error, "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502", "'{0}' is referenced directly or indirectly in its own type annotation."), + Cannot_find_namespace_0: diag(2503, DiagnosticCategory.Error, "Cannot_find_namespace_0_2503", "Cannot find namespace '{0}'."), + Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator: diag(2504, DiagnosticCategory.Error, "Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504", "Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."), + A_generator_cannot_have_a_void_type_annotation: diag(2505, DiagnosticCategory.Error, "A_generator_cannot_have_a_void_type_annotation_2505", "A generator cannot have a 'void' type annotation."), + _0_is_referenced_directly_or_indirectly_in_its_own_base_expression: diag(2506, DiagnosticCategory.Error, "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506", "'{0}' is referenced directly or indirectly in its own base expression."), + Type_0_is_not_a_constructor_function_type: diag(2507, DiagnosticCategory.Error, "Type_0_is_not_a_constructor_function_type_2507", "Type '{0}' is not a constructor function type."), + No_base_constructor_has_the_specified_number_of_type_arguments: diag(2508, DiagnosticCategory.Error, "No_base_constructor_has_the_specified_number_of_type_arguments_2508", "No base constructor has the specified number of type arguments."), + Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2509, DiagnosticCategory.Error, "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509", "Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."), + Base_constructors_must_all_have_the_same_return_type: diag(2510, DiagnosticCategory.Error, "Base_constructors_must_all_have_the_same_return_type_2510", "Base constructors must all have the same return type."), + Cannot_create_an_instance_of_an_abstract_class: diag(2511, DiagnosticCategory.Error, "Cannot_create_an_instance_of_an_abstract_class_2511", "Cannot create an instance of an abstract class."), + Overload_signatures_must_all_be_abstract_or_non_abstract: diag(2512, DiagnosticCategory.Error, "Overload_signatures_must_all_be_abstract_or_non_abstract_2512", "Overload signatures must all be abstract or non-abstract."), + Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression: diag(2513, DiagnosticCategory.Error, "Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513", "Abstract method '{0}' in class '{1}' cannot be accessed via super expression."), + A_tuple_type_cannot_be_indexed_with_a_negative_value: diag(2514, DiagnosticCategory.Error, "A_tuple_type_cannot_be_indexed_with_a_negative_value_2514", "A tuple type cannot be indexed with a negative value."), + Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: diag(2515, DiagnosticCategory.Error, "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", "Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'."), + All_declarations_of_an_abstract_method_must_be_consecutive: diag(2516, DiagnosticCategory.Error, "All_declarations_of_an_abstract_method_must_be_consecutive_2516", "All declarations of an abstract method must be consecutive."), + Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: diag(2517, DiagnosticCategory.Error, "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", "Cannot assign an abstract constructor type to a non-abstract constructor type."), + A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: diag(2518, DiagnosticCategory.Error, "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", "A 'this'-based type guard is not compatible with a parameter-based type guard."), + An_async_iterator_must_have_a_next_method: diag(2519, DiagnosticCategory.Error, "An_async_iterator_must_have_a_next_method_2519", "An async iterator must have a 'next()' method."), + Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: diag(2520, DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."), + The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method: diag(2522, DiagnosticCategory.Error, "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522", "The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method."), + yield_expressions_cannot_be_used_in_a_parameter_initializer: diag(2523, DiagnosticCategory.Error, "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523", "'yield' expressions cannot be used in a parameter initializer."), + await_expressions_cannot_be_used_in_a_parameter_initializer: diag(2524, DiagnosticCategory.Error, "await_expressions_cannot_be_used_in_a_parameter_initializer_2524", "'await' expressions cannot be used in a parameter initializer."), + Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value: diag(2525, DiagnosticCategory.Error, "Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525", "Initializer provides no value for this binding element and the binding element has no default value."), + A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface: diag(2526, DiagnosticCategory.Error, "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526", "A 'this' type is available only in a non-static member of a class or interface."), + The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary: diag(2527, DiagnosticCategory.Error, "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527", "The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."), + A_module_cannot_have_multiple_default_exports: diag(2528, DiagnosticCategory.Error, "A_module_cannot_have_multiple_default_exports_2528", "A module cannot have multiple default exports."), + Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions: diag(2529, DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529", "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."), + Property_0_is_incompatible_with_index_signature: diag(2530, DiagnosticCategory.Error, "Property_0_is_incompatible_with_index_signature_2530", "Property '{0}' is incompatible with index signature."), + Object_is_possibly_null: diag(2531, DiagnosticCategory.Error, "Object_is_possibly_null_2531", "Object is possibly 'null'."), + Object_is_possibly_undefined: diag(2532, DiagnosticCategory.Error, "Object_is_possibly_undefined_2532", "Object is possibly 'undefined'."), + Object_is_possibly_null_or_undefined: diag(2533, DiagnosticCategory.Error, "Object_is_possibly_null_or_undefined_2533", "Object is possibly 'null' or 'undefined'."), + A_function_returning_never_cannot_have_a_reachable_end_point: diag(2534, DiagnosticCategory.Error, "A_function_returning_never_cannot_have_a_reachable_end_point_2534", "A function returning 'never' cannot have a reachable end point."), + Type_0_cannot_be_used_to_index_type_1: diag(2536, DiagnosticCategory.Error, "Type_0_cannot_be_used_to_index_type_1_2536", "Type '{0}' cannot be used to index type '{1}'."), + Type_0_has_no_matching_index_signature_for_type_1: diag(2537, DiagnosticCategory.Error, "Type_0_has_no_matching_index_signature_for_type_1_2537", "Type '{0}' has no matching index signature for type '{1}'."), + Type_0_cannot_be_used_as_an_index_type: diag(2538, DiagnosticCategory.Error, "Type_0_cannot_be_used_as_an_index_type_2538", "Type '{0}' cannot be used as an index type."), + Cannot_assign_to_0_because_it_is_not_a_variable: diag(2539, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_not_a_variable_2539", "Cannot assign to '{0}' because it is not a variable."), + Cannot_assign_to_0_because_it_is_a_read_only_property: diag(2540, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_read_only_property_2540", "Cannot assign to '{0}' because it is a read-only property."), + Index_signature_in_type_0_only_permits_reading: diag(2542, DiagnosticCategory.Error, "Index_signature_in_type_0_only_permits_reading_2542", "Index signature in type '{0}' only permits reading."), + Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference: diag(2543, DiagnosticCategory.Error, "Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543", "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."), + Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference: diag(2544, DiagnosticCategory.Error, "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544", "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."), + A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any: diag(2545, DiagnosticCategory.Error, "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545", "A mixin class must have a constructor with a single rest parameter of type 'any[]'."), + The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property: diag(2547, DiagnosticCategory.Error, "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547", "The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."), + Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2548, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548", "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."), + Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2549, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549", "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."), + Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later: diag(2550, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550", "Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{2}' or later."), + Property_0_does_not_exist_on_type_1_Did_you_mean_2: diag(2551, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551", "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"), + Cannot_find_name_0_Did_you_mean_1: diag(2552, DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_1_2552", "Cannot find name '{0}'. Did you mean '{1}'?"), + Computed_values_are_not_permitted_in_an_enum_with_string_valued_members: diag(2553, DiagnosticCategory.Error, "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553", "Computed values are not permitted in an enum with string valued members."), + Expected_0_arguments_but_got_1: diag(2554, DiagnosticCategory.Error, "Expected_0_arguments_but_got_1_2554", "Expected {0} arguments, but got {1}."), + Expected_at_least_0_arguments_but_got_1: diag(2555, DiagnosticCategory.Error, "Expected_at_least_0_arguments_but_got_1_2555", "Expected at least {0} arguments, but got {1}."), + A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter: diag(2556, DiagnosticCategory.Error, "A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556", "A spread argument must either have a tuple type or be passed to a rest parameter."), + Expected_0_type_arguments_but_got_1: diag(2558, DiagnosticCategory.Error, "Expected_0_type_arguments_but_got_1_2558", "Expected {0} type arguments, but got {1}."), + Type_0_has_no_properties_in_common_with_type_1: diag(2559, DiagnosticCategory.Error, "Type_0_has_no_properties_in_common_with_type_1_2559", "Type '{0}' has no properties in common with type '{1}'."), + Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it: diag(2560, DiagnosticCategory.Error, "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560", "Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"), + Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2: diag(2561, DiagnosticCategory.Error, "Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561", "Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"), + Base_class_expressions_cannot_reference_class_type_parameters: diag(2562, DiagnosticCategory.Error, "Base_class_expressions_cannot_reference_class_type_parameters_2562", "Base class expressions cannot reference class type parameters."), + The_containing_function_or_module_body_is_too_large_for_control_flow_analysis: diag(2563, DiagnosticCategory.Error, "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563", "The containing function or module body is too large for control flow analysis."), + Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor: diag(2564, DiagnosticCategory.Error, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564", "Property '{0}' has no initializer and is not definitely assigned in the constructor."), + Property_0_is_used_before_being_assigned: diag(2565, DiagnosticCategory.Error, "Property_0_is_used_before_being_assigned_2565", "Property '{0}' is used before being assigned."), + A_rest_element_cannot_have_a_property_name: diag(2566, DiagnosticCategory.Error, "A_rest_element_cannot_have_a_property_name_2566", "A rest element cannot have a property name."), + Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations: diag(2567, DiagnosticCategory.Error, "Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567", "Enum declarations can only merge with namespace or other enum declarations."), + Property_0_may_not_exist_on_type_1_Did_you_mean_2: diag(2568, DiagnosticCategory.Error, "Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568", "Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"), + Could_not_find_name_0_Did_you_mean_1: diag(2570, DiagnosticCategory.Error, "Could_not_find_name_0_Did_you_mean_1_2570", "Could not find name '{0}'. Did you mean '{1}'?"), + Object_is_of_type_unknown: diag(2571, DiagnosticCategory.Error, "Object_is_of_type_unknown_2571", "Object is of type 'unknown'."), + A_rest_element_type_must_be_an_array_type: diag(2574, DiagnosticCategory.Error, "A_rest_element_type_must_be_an_array_type_2574", "A rest element type must be an array type."), + No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments: diag(2575, DiagnosticCategory.Error, "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575", "No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."), + Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead: diag(2576, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576", "Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"), + Return_type_annotation_circularly_references_itself: diag(2577, DiagnosticCategory.Error, "Return_type_annotation_circularly_references_itself_2577", "Return type annotation circularly references itself."), + Unused_ts_expect_error_directive: diag(2578, DiagnosticCategory.Error, "Unused_ts_expect_error_directive_2578", "Unused '@ts-expect-error' directive."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode: diag(2580, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2580", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery: diag(2581, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2581", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha: diag(2582, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`."), + Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later: diag(2583, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583", "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later."), + Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom: diag(2584, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584", "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'."), + _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later: diag(2585, DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585", "'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later."), + Cannot_assign_to_0_because_it_is_a_constant: diag(2588, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_constant_2588", "Cannot assign to '{0}' because it is a constant."), + Type_instantiation_is_excessively_deep_and_possibly_infinite: diag(2589, DiagnosticCategory.Error, "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589", "Type instantiation is excessively deep and possibly infinite."), + Expression_produces_a_union_type_that_is_too_complex_to_represent: diag(2590, DiagnosticCategory.Error, "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590", "Expression produces a union type that is too complex to represent."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig: diag(2591, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig: diag(2592, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig: diag(2593, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig."), + This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag: diag(2594, DiagnosticCategory.Error, "This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594", "This module is declared with 'export =', and can only be used with a default import when using the '{0}' flag."), + _0_can_only_be_imported_by_using_a_default_import: diag(2595, DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_a_default_import_2595", "'{0}' can only be imported by using a default import."), + _0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: diag(2596, DiagnosticCategory.Error, "_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596", "'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import."), + _0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import: diag(2597, DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597", "'{0}' can only be imported by using a 'require' call or by using a default import."), + _0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: diag(2598, DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using__2598", "'{0}' can only be imported by using a 'require' call or by turning on the 'esModuleInterop' flag and using a default import."), + JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: diag(2602, DiagnosticCategory.Error, "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602", "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."), + Property_0_in_type_1_is_not_assignable_to_type_2: diag(2603, DiagnosticCategory.Error, "Property_0_in_type_1_is_not_assignable_to_type_2_2603", "Property '{0}' in type '{1}' is not assignable to type '{2}'."), + JSX_element_type_0_does_not_have_any_construct_or_call_signatures: diag(2604, DiagnosticCategory.Error, "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604", "JSX element type '{0}' does not have any construct or call signatures."), + Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property: diag(2606, DiagnosticCategory.Error, "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606", "Property '{0}' of JSX spread attribute is not assignable to target property."), + JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: diag(2607, DiagnosticCategory.Error, "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", "JSX element class does not support attributes because it does not have a '{0}' property."), + The_global_type_JSX_0_may_not_have_more_than_one_property: diag(2608, DiagnosticCategory.Error, "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", "The global type 'JSX.{0}' may not have more than one property."), + JSX_spread_child_must_be_an_array_type: diag(2609, DiagnosticCategory.Error, "JSX_spread_child_must_be_an_array_type_2609", "JSX spread child must be an array type."), + _0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property: diag(2610, DiagnosticCategory.Error, "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610", "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."), + _0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor: diag(2611, DiagnosticCategory.Error, "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611", "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."), + Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration: diag(2612, DiagnosticCategory.Error, "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612", "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."), + Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead: diag(2613, DiagnosticCategory.Error, "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613", "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"), + Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead: diag(2614, DiagnosticCategory.Error, "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614", "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"), + Type_of_property_0_circularly_references_itself_in_mapped_type_1: diag(2615, DiagnosticCategory.Error, "Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615", "Type of property '{0}' circularly references itself in mapped type '{1}'."), + _0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import: diag(2616, DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import_2616", "'{0}' can only be imported by using 'import {1} = require({2})' or a default import."), + _0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: diag(2617, DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_us_2617", "'{0}' can only be imported by using 'import {1} = require({2})' or by turning on the 'esModuleInterop' flag and using a default import."), + Source_has_0_element_s_but_target_requires_1: diag(2618, DiagnosticCategory.Error, "Source_has_0_element_s_but_target_requires_1_2618", "Source has {0} element(s) but target requires {1}."), + Source_has_0_element_s_but_target_allows_only_1: diag(2619, DiagnosticCategory.Error, "Source_has_0_element_s_but_target_allows_only_1_2619", "Source has {0} element(s) but target allows only {1}."), + Target_requires_0_element_s_but_source_may_have_fewer: diag(2620, DiagnosticCategory.Error, "Target_requires_0_element_s_but_source_may_have_fewer_2620", "Target requires {0} element(s) but source may have fewer."), + Target_allows_only_0_element_s_but_source_may_have_more: diag(2621, DiagnosticCategory.Error, "Target_allows_only_0_element_s_but_source_may_have_more_2621", "Target allows only {0} element(s) but source may have more."), + Source_provides_no_match_for_required_element_at_position_0_in_target: diag(2623, DiagnosticCategory.Error, "Source_provides_no_match_for_required_element_at_position_0_in_target_2623", "Source provides no match for required element at position {0} in target."), + Source_provides_no_match_for_variadic_element_at_position_0_in_target: diag(2624, DiagnosticCategory.Error, "Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624", "Source provides no match for variadic element at position {0} in target."), + Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target: diag(2625, DiagnosticCategory.Error, "Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625", "Variadic element at position {0} in source does not match element at position {1} in target."), + Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target: diag(2626, DiagnosticCategory.Error, "Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626", "Type at position {0} in source is not compatible with type at position {1} in target."), + Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target: diag(2627, DiagnosticCategory.Error, "Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627", "Type at positions {0} through {1} in source is not compatible with type at position {2} in target."), + Cannot_assign_to_0_because_it_is_an_enum: diag(2628, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_an_enum_2628", "Cannot assign to '{0}' because it is an enum."), + Cannot_assign_to_0_because_it_is_a_class: diag(2629, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_class_2629", "Cannot assign to '{0}' because it is a class."), + Cannot_assign_to_0_because_it_is_a_function: diag(2630, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_function_2630", "Cannot assign to '{0}' because it is a function."), + Cannot_assign_to_0_because_it_is_a_namespace: diag(2631, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_namespace_2631", "Cannot assign to '{0}' because it is a namespace."), + Cannot_assign_to_0_because_it_is_an_import: diag(2632, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_an_import_2632", "Cannot assign to '{0}' because it is an import."), + JSX_property_access_expressions_cannot_include_JSX_namespace_names: diag(2633, DiagnosticCategory.Error, "JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633", "JSX property access expressions cannot include JSX namespace names"), + _0_index_signatures_are_incompatible: diag(2634, DiagnosticCategory.Error, "_0_index_signatures_are_incompatible_2634", "'{0}' index signatures are incompatible."), + Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable: diag(2635, DiagnosticCategory.Error, "Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635", "Type '{0}' has no signatures for which the type argument list is applicable."), + Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation: diag(2636, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636", "Type '{0}' is not assignable to type '{1}' as implied by variance annotation."), + Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types: diag(2637, DiagnosticCategory.Error, "Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637", "Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."), + Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator: diag(2638, DiagnosticCategory.Error, "Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638", "Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."), + Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: diag(2649, DiagnosticCategory.Error, "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", "Cannot augment module '{0}' with value exports because it resolves to a non-module entity."), + A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: diag(2651, DiagnosticCategory.Error, "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."), + Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: diag(2652, DiagnosticCategory.Error, "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."), + Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: diag(2653, DiagnosticCategory.Error, "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."), + JSX_expressions_must_have_one_parent_element: diag(2657, DiagnosticCategory.Error, "JSX_expressions_must_have_one_parent_element_2657", "JSX expressions must have one parent element."), + Type_0_provides_no_match_for_the_signature_1: diag(2658, DiagnosticCategory.Error, "Type_0_provides_no_match_for_the_signature_1_2658", "Type '{0}' provides no match for the signature '{1}'."), + super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: diag(2659, DiagnosticCategory.Error, "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."), + super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: diag(2660, DiagnosticCategory.Error, "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", "'super' can only be referenced in members of derived classes or object literal expressions."), + Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module: diag(2661, DiagnosticCategory.Error, "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661", "Cannot export '{0}'. Only local declarations can be exported from a module."), + Cannot_find_name_0_Did_you_mean_the_static_member_1_0: diag(2662, DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662", "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"), + Cannot_find_name_0_Did_you_mean_the_instance_member_this_0: diag(2663, DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663", "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"), + Invalid_module_name_in_augmentation_module_0_cannot_be_found: diag(2664, DiagnosticCategory.Error, "Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664", "Invalid module name in augmentation, module '{0}' cannot be found."), + Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented: diag(2665, DiagnosticCategory.Error, "Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665", "Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."), + Exports_and_export_assignments_are_not_permitted_in_module_augmentations: diag(2666, DiagnosticCategory.Error, "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666", "Exports and export assignments are not permitted in module augmentations."), + Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module: diag(2667, DiagnosticCategory.Error, "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667", "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."), + export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible: diag(2668, DiagnosticCategory.Error, "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668", "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."), + Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations: diag(2669, DiagnosticCategory.Error, "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669", "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."), + Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context: diag(2670, DiagnosticCategory.Error, "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670", "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."), + Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity: diag(2671, DiagnosticCategory.Error, "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671", "Cannot augment module '{0}' because it resolves to a non-module entity."), + Cannot_assign_a_0_constructor_type_to_a_1_constructor_type: diag(2672, DiagnosticCategory.Error, "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672", "Cannot assign a '{0}' constructor type to a '{1}' constructor type."), + Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration: diag(2673, DiagnosticCategory.Error, "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673", "Constructor of class '{0}' is private and only accessible within the class declaration."), + Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration: diag(2674, DiagnosticCategory.Error, "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674", "Constructor of class '{0}' is protected and only accessible within the class declaration."), + Cannot_extend_a_class_0_Class_constructor_is_marked_as_private: diag(2675, DiagnosticCategory.Error, "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675", "Cannot extend a class '{0}'. Class constructor is marked as private."), + Accessors_must_both_be_abstract_or_non_abstract: diag(2676, DiagnosticCategory.Error, "Accessors_must_both_be_abstract_or_non_abstract_2676", "Accessors must both be abstract or non-abstract."), + A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type: diag(2677, DiagnosticCategory.Error, "A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677", "A type predicate's type must be assignable to its parameter's type."), + Type_0_is_not_comparable_to_type_1: diag(2678, DiagnosticCategory.Error, "Type_0_is_not_comparable_to_type_1_2678", "Type '{0}' is not comparable to type '{1}'."), + A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void: diag(2679, DiagnosticCategory.Error, "A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679", "A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."), + A_0_parameter_must_be_the_first_parameter: diag(2680, DiagnosticCategory.Error, "A_0_parameter_must_be_the_first_parameter_2680", "A '{0}' parameter must be the first parameter."), + A_constructor_cannot_have_a_this_parameter: diag(2681, DiagnosticCategory.Error, "A_constructor_cannot_have_a_this_parameter_2681", "A constructor cannot have a 'this' parameter."), + this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation: diag(2683, DiagnosticCategory.Error, "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683", "'this' implicitly has type 'any' because it does not have a type annotation."), + The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1: diag(2684, DiagnosticCategory.Error, "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684", "The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."), + The_this_types_of_each_signature_are_incompatible: diag(2685, DiagnosticCategory.Error, "The_this_types_of_each_signature_are_incompatible_2685", "The 'this' types of each signature are incompatible."), + _0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead: diag(2686, DiagnosticCategory.Error, "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686", "'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."), + All_declarations_of_0_must_have_identical_modifiers: diag(2687, DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_modifiers_2687", "All declarations of '{0}' must have identical modifiers."), + Cannot_find_type_definition_file_for_0: diag(2688, DiagnosticCategory.Error, "Cannot_find_type_definition_file_for_0_2688", "Cannot find type definition file for '{0}'."), + Cannot_extend_an_interface_0_Did_you_mean_implements: diag(2689, DiagnosticCategory.Error, "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", "Cannot extend an interface '{0}'. Did you mean 'implements'?"), + _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0: diag(2690, DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690", "'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?"), + An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead: diag(2691, DiagnosticCategory.Error, "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691", "An import path cannot end with a '{0}' extension. Consider importing '{1}' instead."), + _0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: diag(2692, DiagnosticCategory.Error, "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."), + _0_only_refers_to_a_type_but_is_being_used_as_a_value_here: diag(2693, DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693", "'{0}' only refers to a type, but is being used as a value here."), + Namespace_0_has_no_exported_member_1: diag(2694, DiagnosticCategory.Error, "Namespace_0_has_no_exported_member_1_2694", "Namespace '{0}' has no exported member '{1}'."), + Left_side_of_comma_operator_is_unused_and_has_no_side_effects: diag(2695, DiagnosticCategory.Error, "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695", "Left side of comma operator is unused and has no side effects.", /*reportsUnnecessary*/ true), + The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead: diag(2696, DiagnosticCategory.Error, "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696", "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"), + An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: diag(2697, DiagnosticCategory.Error, "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."), + Spread_types_may_only_be_created_from_object_types: diag(2698, DiagnosticCategory.Error, "Spread_types_may_only_be_created_from_object_types_2698", "Spread types may only be created from object types."), + Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1: diag(2699, DiagnosticCategory.Error, "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."), + Rest_types_may_only_be_created_from_object_types: diag(2700, DiagnosticCategory.Error, "Rest_types_may_only_be_created_from_object_types_2700", "Rest types may only be created from object types."), + The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: diag(2701, DiagnosticCategory.Error, "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", "The target of an object rest assignment must be a variable or a property access."), + _0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: diag(2702, DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", "'{0}' only refers to a type, but is being used as a namespace here."), + The_operand_of_a_delete_operator_must_be_a_property_reference: diag(2703, DiagnosticCategory.Error, "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", "The operand of a 'delete' operator must be a property reference."), + The_operand_of_a_delete_operator_cannot_be_a_read_only_property: diag(2704, DiagnosticCategory.Error, "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", "The operand of a 'delete' operator cannot be a read-only property."), + An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: diag(2705, DiagnosticCategory.Error, "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."), + Required_type_parameters_may_not_follow_optional_type_parameters: diag(2706, DiagnosticCategory.Error, "Required_type_parameters_may_not_follow_optional_type_parameters_2706", "Required type parameters may not follow optional type parameters."), + Generic_type_0_requires_between_1_and_2_type_arguments: diag(2707, DiagnosticCategory.Error, "Generic_type_0_requires_between_1_and_2_type_arguments_2707", "Generic type '{0}' requires between {1} and {2} type arguments."), + Cannot_use_namespace_0_as_a_value: diag(2708, DiagnosticCategory.Error, "Cannot_use_namespace_0_as_a_value_2708", "Cannot use namespace '{0}' as a value."), + Cannot_use_namespace_0_as_a_type: diag(2709, DiagnosticCategory.Error, "Cannot_use_namespace_0_as_a_type_2709", "Cannot use namespace '{0}' as a type."), + _0_are_specified_twice_The_attribute_named_0_will_be_overwritten: diag(2710, DiagnosticCategory.Error, "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", "'{0}' are specified twice. The attribute named '{0}' will be overwritten."), + A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: diag(2711, DiagnosticCategory.Error, "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711", "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."), + A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: diag(2712, DiagnosticCategory.Error, "A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712", "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."), + Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1: diag(2713, DiagnosticCategory.Error, "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713", "Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}[\"{1}\"]'?"), + The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context: diag(2714, DiagnosticCategory.Error, "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714", "The expression of an export assignment must be an identifier or qualified name in an ambient context."), + Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor: diag(2715, DiagnosticCategory.Error, "Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715", "Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."), + Type_parameter_0_has_a_circular_default: diag(2716, DiagnosticCategory.Error, "Type_parameter_0_has_a_circular_default_2716", "Type parameter '{0}' has a circular default."), + Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2: diag(2717, DiagnosticCategory.Error, "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717", "Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."), + Duplicate_property_0: diag(2718, DiagnosticCategory.Error, "Duplicate_property_0_2718", "Duplicate property '{0}'."), + Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated: diag(2719, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719", "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."), + Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass: diag(2720, DiagnosticCategory.Error, "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720", "Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"), + Cannot_invoke_an_object_which_is_possibly_null: diag(2721, DiagnosticCategory.Error, "Cannot_invoke_an_object_which_is_possibly_null_2721", "Cannot invoke an object which is possibly 'null'."), + Cannot_invoke_an_object_which_is_possibly_undefined: diag(2722, DiagnosticCategory.Error, "Cannot_invoke_an_object_which_is_possibly_undefined_2722", "Cannot invoke an object which is possibly 'undefined'."), + Cannot_invoke_an_object_which_is_possibly_null_or_undefined: diag(2723, DiagnosticCategory.Error, "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723", "Cannot invoke an object which is possibly 'null' or 'undefined'."), + _0_has_no_exported_member_named_1_Did_you_mean_2: diag(2724, DiagnosticCategory.Error, "_0_has_no_exported_member_named_1_Did_you_mean_2_2724", "'{0}' has no exported member named '{1}'. Did you mean '{2}'?"), + Class_name_cannot_be_Object_when_targeting_ES5_with_module_0: diag(2725, DiagnosticCategory.Error, "Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725", "Class name cannot be 'Object' when targeting ES5 with module {0}."), + Cannot_find_lib_definition_for_0: diag(2726, DiagnosticCategory.Error, "Cannot_find_lib_definition_for_0_2726", "Cannot find lib definition for '{0}'."), + Cannot_find_lib_definition_for_0_Did_you_mean_1: diag(2727, DiagnosticCategory.Error, "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727", "Cannot find lib definition for '{0}'. Did you mean '{1}'?"), + _0_is_declared_here: diag(2728, DiagnosticCategory.Message, "_0_is_declared_here_2728", "'{0}' is declared here."), + Property_0_is_used_before_its_initialization: diag(2729, DiagnosticCategory.Error, "Property_0_is_used_before_its_initialization_2729", "Property '{0}' is used before its initialization."), + An_arrow_function_cannot_have_a_this_parameter: diag(2730, DiagnosticCategory.Error, "An_arrow_function_cannot_have_a_this_parameter_2730", "An arrow function cannot have a 'this' parameter."), + Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String: diag(2731, DiagnosticCategory.Error, "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731", "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."), + Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension: diag(2732, DiagnosticCategory.Error, "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732", "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension."), + Property_0_was_also_declared_here: diag(2733, DiagnosticCategory.Error, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."), + Are_you_missing_a_semicolon: diag(2734, DiagnosticCategory.Error, "Are_you_missing_a_semicolon_2734", "Are you missing a semicolon?"), + Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1: diag(2735, DiagnosticCategory.Error, "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735", "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"), + Operator_0_cannot_be_applied_to_type_1: diag(2736, DiagnosticCategory.Error, "Operator_0_cannot_be_applied_to_type_1_2736", "Operator '{0}' cannot be applied to type '{1}'."), + BigInt_literals_are_not_available_when_targeting_lower_than_ES2020: diag(2737, DiagnosticCategory.Error, "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737", "BigInt literals are not available when targeting lower than ES2020."), + An_outer_value_of_this_is_shadowed_by_this_container: diag(2738, DiagnosticCategory.Message, "An_outer_value_of_this_is_shadowed_by_this_container_2738", "An outer value of 'this' is shadowed by this container."), + Type_0_is_missing_the_following_properties_from_type_1_Colon_2: diag(2739, DiagnosticCategory.Error, "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739", "Type '{0}' is missing the following properties from type '{1}': {2}"), + Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more: diag(2740, DiagnosticCategory.Error, "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740", "Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."), + Property_0_is_missing_in_type_1_but_required_in_type_2: diag(2741, DiagnosticCategory.Error, "Property_0_is_missing_in_type_1_but_required_in_type_2_2741", "Property '{0}' is missing in type '{1}' but required in type '{2}'."), + The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary: diag(2742, DiagnosticCategory.Error, "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742", "The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."), + No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments: diag(2743, DiagnosticCategory.Error, "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743", "No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."), + Type_parameter_defaults_can_only_reference_previously_declared_type_parameters: diag(2744, DiagnosticCategory.Error, "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744", "Type parameter defaults can only reference previously declared type parameters."), + This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided: diag(2745, DiagnosticCategory.Error, "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745", "This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."), + This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided: diag(2746, DiagnosticCategory.Error, "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746", "This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."), + _0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2: diag(2747, DiagnosticCategory.Error, "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747", "'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."), + Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided: diag(2748, DiagnosticCategory.Error, "Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748", "Cannot access ambient const enums when the '--isolatedModules' flag is provided."), + _0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0: diag(2749, DiagnosticCategory.Error, "_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749", "'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"), + The_implementation_signature_is_declared_here: diag(2750, DiagnosticCategory.Error, "The_implementation_signature_is_declared_here_2750", "The implementation signature is declared here."), + Circularity_originates_in_type_at_this_location: diag(2751, DiagnosticCategory.Error, "Circularity_originates_in_type_at_this_location_2751", "Circularity originates in type at this location."), + The_first_export_default_is_here: diag(2752, DiagnosticCategory.Error, "The_first_export_default_is_here_2752", "The first export default is here."), + Another_export_default_is_here: diag(2753, DiagnosticCategory.Error, "Another_export_default_is_here_2753", "Another export default is here."), + super_may_not_use_type_arguments: diag(2754, DiagnosticCategory.Error, "super_may_not_use_type_arguments_2754", "'super' may not use type arguments."), + No_constituent_of_type_0_is_callable: diag(2755, DiagnosticCategory.Error, "No_constituent_of_type_0_is_callable_2755", "No constituent of type '{0}' is callable."), + Not_all_constituents_of_type_0_are_callable: diag(2756, DiagnosticCategory.Error, "Not_all_constituents_of_type_0_are_callable_2756", "Not all constituents of type '{0}' are callable."), + Type_0_has_no_call_signatures: diag(2757, DiagnosticCategory.Error, "Type_0_has_no_call_signatures_2757", "Type '{0}' has no call signatures."), + Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other: diag(2758, DiagnosticCategory.Error, "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758", "Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."), + No_constituent_of_type_0_is_constructable: diag(2759, DiagnosticCategory.Error, "No_constituent_of_type_0_is_constructable_2759", "No constituent of type '{0}' is constructable."), + Not_all_constituents_of_type_0_are_constructable: diag(2760, DiagnosticCategory.Error, "Not_all_constituents_of_type_0_are_constructable_2760", "Not all constituents of type '{0}' are constructable."), + Type_0_has_no_construct_signatures: diag(2761, DiagnosticCategory.Error, "Type_0_has_no_construct_signatures_2761", "Type '{0}' has no construct signatures."), + Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other: diag(2762, DiagnosticCategory.Error, "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762", "Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."), + Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0: diag(2763, DiagnosticCategory.Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."), + Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0: diag(2764, DiagnosticCategory.Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."), + Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0: diag(2765, DiagnosticCategory.Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."), + Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0: diag(2766, DiagnosticCategory.Error, "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766", "Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."), + The_0_property_of_an_iterator_must_be_a_method: diag(2767, DiagnosticCategory.Error, "The_0_property_of_an_iterator_must_be_a_method_2767", "The '{0}' property of an iterator must be a method."), + The_0_property_of_an_async_iterator_must_be_a_method: diag(2768, DiagnosticCategory.Error, "The_0_property_of_an_async_iterator_must_be_a_method_2768", "The '{0}' property of an async iterator must be a method."), + No_overload_matches_this_call: diag(2769, DiagnosticCategory.Error, "No_overload_matches_this_call_2769", "No overload matches this call."), + The_last_overload_gave_the_following_error: diag(2770, DiagnosticCategory.Error, "The_last_overload_gave_the_following_error_2770", "The last overload gave the following error."), + The_last_overload_is_declared_here: diag(2771, DiagnosticCategory.Error, "The_last_overload_is_declared_here_2771", "The last overload is declared here."), + Overload_0_of_1_2_gave_the_following_error: diag(2772, DiagnosticCategory.Error, "Overload_0_of_1_2_gave_the_following_error_2772", "Overload {0} of {1}, '{2}', gave the following error."), + Did_you_forget_to_use_await: diag(2773, DiagnosticCategory.Error, "Did_you_forget_to_use_await_2773", "Did you forget to use 'await'?"), + This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead: diag(2774, DiagnosticCategory.Error, "This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774", "This condition will always return true since this function is always defined. Did you mean to call it instead?"), + Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation: diag(2775, DiagnosticCategory.Error, "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775", "Assertions require every name in the call target to be declared with an explicit type annotation."), + Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name: diag(2776, DiagnosticCategory.Error, "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776", "Assertions require the call target to be an identifier or qualified name."), + The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access: diag(2777, DiagnosticCategory.Error, "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777", "The operand of an increment or decrement operator may not be an optional property access."), + The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access: diag(2778, DiagnosticCategory.Error, "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778", "The target of an object rest assignment may not be an optional property access."), + The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access: diag(2779, DiagnosticCategory.Error, "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779", "The left-hand side of an assignment expression may not be an optional property access."), + The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access: diag(2780, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780", "The left-hand side of a 'for...in' statement may not be an optional property access."), + The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access: diag(2781, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781", "The left-hand side of a 'for...of' statement may not be an optional property access."), + _0_needs_an_explicit_type_annotation: diag(2782, DiagnosticCategory.Message, "_0_needs_an_explicit_type_annotation_2782", "'{0}' needs an explicit type annotation."), + _0_is_specified_more_than_once_so_this_usage_will_be_overwritten: diag(2783, DiagnosticCategory.Error, "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783", "'{0}' is specified more than once, so this usage will be overwritten."), + get_and_set_accessors_cannot_declare_this_parameters: diag(2784, DiagnosticCategory.Error, "get_and_set_accessors_cannot_declare_this_parameters_2784", "'get' and 'set' accessors cannot declare 'this' parameters."), + This_spread_always_overwrites_this_property: diag(2785, DiagnosticCategory.Error, "This_spread_always_overwrites_this_property_2785", "This spread always overwrites this property."), + _0_cannot_be_used_as_a_JSX_component: diag(2786, DiagnosticCategory.Error, "_0_cannot_be_used_as_a_JSX_component_2786", "'{0}' cannot be used as a JSX component."), + Its_return_type_0_is_not_a_valid_JSX_element: diag(2787, DiagnosticCategory.Error, "Its_return_type_0_is_not_a_valid_JSX_element_2787", "Its return type '{0}' is not a valid JSX element."), + Its_instance_type_0_is_not_a_valid_JSX_element: diag(2788, DiagnosticCategory.Error, "Its_instance_type_0_is_not_a_valid_JSX_element_2788", "Its instance type '{0}' is not a valid JSX element."), + Its_element_type_0_is_not_a_valid_JSX_element: diag(2789, DiagnosticCategory.Error, "Its_element_type_0_is_not_a_valid_JSX_element_2789", "Its element type '{0}' is not a valid JSX element."), + The_operand_of_a_delete_operator_must_be_optional: diag(2790, DiagnosticCategory.Error, "The_operand_of_a_delete_operator_must_be_optional_2790", "The operand of a 'delete' operator must be optional."), + Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later: diag(2791, DiagnosticCategory.Error, "Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791", "Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later."), + Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_the_paths_option: diag(2792, DiagnosticCategory.Error, "Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_th_2792", "Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?"), + The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible: diag(2793, DiagnosticCategory.Error, "The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793", "The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."), + Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise: diag(2794, DiagnosticCategory.Error, "Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794", "Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?"), + The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types: diag(2795, DiagnosticCategory.Error, "The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795", "The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."), + It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked: diag(2796, DiagnosticCategory.Error, "It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796", "It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked."), + A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract: diag(2797, DiagnosticCategory.Error, "A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797", "A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."), + The_declaration_was_marked_as_deprecated_here: diag(2798, DiagnosticCategory.Error, "The_declaration_was_marked_as_deprecated_here_2798", "The declaration was marked as deprecated here."), + Type_produces_a_tuple_type_that_is_too_large_to_represent: diag(2799, DiagnosticCategory.Error, "Type_produces_a_tuple_type_that_is_too_large_to_represent_2799", "Type produces a tuple type that is too large to represent."), + Expression_produces_a_tuple_type_that_is_too_large_to_represent: diag(2800, DiagnosticCategory.Error, "Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800", "Expression produces a tuple type that is too large to represent."), + This_condition_will_always_return_true_since_this_0_is_always_defined: diag(2801, DiagnosticCategory.Error, "This_condition_will_always_return_true_since_this_0_is_always_defined_2801", "This condition will always return true since this '{0}' is always defined."), + Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher: diag(2802, DiagnosticCategory.Error, "Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802", "Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."), + Cannot_assign_to_private_method_0_Private_methods_are_not_writable: diag(2803, DiagnosticCategory.Error, "Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803", "Cannot assign to private method '{0}'. Private methods are not writable."), + Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name: diag(2804, DiagnosticCategory.Error, "Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804", "Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."), + Private_accessor_was_defined_without_a_getter: diag(2806, DiagnosticCategory.Error, "Private_accessor_was_defined_without_a_getter_2806", "Private accessor was defined without a getter."), + This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0: diag(2807, DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807", "This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."), + A_get_accessor_must_be_at_least_as_accessible_as_the_setter: diag(2808, DiagnosticCategory.Error, "A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808", "A get accessor must be at least as accessible as the setter"), + Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_the_whole_assignment_in_parentheses: diag(2809, DiagnosticCategory.Error, "Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809", "Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the the whole assignment in parentheses."), + Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments: diag(2810, DiagnosticCategory.Error, "Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810", "Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."), + Initializer_for_property_0: diag(2811, DiagnosticCategory.Error, "Initializer_for_property_0_2811", "Initializer for property '{0}'"), + Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: diag(2812, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."), + Class_declaration_cannot_implement_overload_list_for_0: diag(2813, DiagnosticCategory.Error, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."), + Function_with_bodies_can_only_merge_with_classes_that_are_ambient: diag(2814, DiagnosticCategory.Error, "Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814", "Function with bodies can only merge with classes that are ambient."), + arguments_cannot_be_referenced_in_property_initializers: diag(2815, DiagnosticCategory.Error, "arguments_cannot_be_referenced_in_property_initializers_2815", "'arguments' cannot be referenced in property initializers."), + Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class: diag(2816, DiagnosticCategory.Error, "Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816", "Cannot use 'this' in a static property initializer of a decorated class."), + Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block: diag(2817, DiagnosticCategory.Error, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817", "Property '{0}' has no initializer and is not definitely assigned in a class static block."), + Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers: diag(2818, DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818", "Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."), + Namespace_name_cannot_be_0: diag(2819, DiagnosticCategory.Error, "Namespace_name_cannot_be_0_2819", "Namespace name cannot be '{0}'."), + Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"), + Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2821, DiagnosticCategory.Error, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."), + Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, DiagnosticCategory.Error, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."), + Cannot_find_namespace_0_Did_you_mean_1: diag(2833, DiagnosticCategory.Error, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"), + Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."), + Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"), + Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, DiagnosticCategory.Error, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."), + Import_assertion_values_must_be_string_literal_expressions: diag(2837, DiagnosticCategory.Error, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."), + All_declarations_of_0_must_have_identical_constraints: diag(2838, DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."), + This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, DiagnosticCategory.Error, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."), + An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes: diag(2840, DiagnosticCategory.Error, "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840", "An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"), + The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(2841, DiagnosticCategory.Error, "The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_2841", "The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), + _0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: diag(2842, DiagnosticCategory.Error, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"), + We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, DiagnosticCategory.Error, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."), + Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2844, DiagnosticCategory.Error, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."), + This_condition_will_always_return_0: diag(2845, DiagnosticCategory.Error, "This_condition_will_always_return_0_2845", "This condition will always return '{0}'."), + Import_declaration_0_is_using_private_name_1: diag(4000, DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."), + Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."), + Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."), + Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4006, DiagnosticCategory.Error, "Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006", "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."), + Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4008, DiagnosticCategory.Error, "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008", "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."), + Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: diag(4010, DiagnosticCategory.Error, "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010", "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."), + Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: diag(4012, DiagnosticCategory.Error, "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012", "Type parameter '{0}' of public method from exported class has or is using private name '{1}'."), + Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: diag(4014, DiagnosticCategory.Error, "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014", "Type parameter '{0}' of method from exported interface has or is using private name '{1}'."), + Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: diag(4016, DiagnosticCategory.Error, "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016", "Type parameter '{0}' of exported function has or is using private name '{1}'."), + Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: diag(4019, DiagnosticCategory.Error, "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019", "Implements clause of exported class '{0}' has or is using private name '{1}'."), + extends_clause_of_exported_class_0_has_or_is_using_private_name_1: diag(4020, DiagnosticCategory.Error, "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", "'extends' clause of exported class '{0}' has or is using private name '{1}'."), + extends_clause_of_exported_class_has_or_is_using_private_name_0: diag(4021, DiagnosticCategory.Error, "extends_clause_of_exported_class_has_or_is_using_private_name_0_4021", "'extends' clause of exported class has or is using private name '{0}'."), + extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: diag(4022, DiagnosticCategory.Error, "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", "'extends' clause of exported interface '{0}' has or is using private name '{1}'."), + Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4023, DiagnosticCategory.Error, "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023", "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."), + Exported_variable_0_has_or_is_using_name_1_from_private_module_2: diag(4024, DiagnosticCategory.Error, "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024", "Exported variable '{0}' has or is using name '{1}' from private module '{2}'."), + Exported_variable_0_has_or_is_using_private_name_1: diag(4025, DiagnosticCategory.Error, "Exported_variable_0_has_or_is_using_private_name_1_4025", "Exported variable '{0}' has or is using private name '{1}'."), + Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4026, DiagnosticCategory.Error, "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026", "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4027, DiagnosticCategory.Error, "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027", "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_static_property_0_of_exported_class_has_or_is_using_private_name_1: diag(4028, DiagnosticCategory.Error, "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028", "Public static property '{0}' of exported class has or is using private name '{1}'."), + Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4029, DiagnosticCategory.Error, "Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029", "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4030, DiagnosticCategory.Error, "Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030", "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_property_0_of_exported_class_has_or_is_using_private_name_1: diag(4031, DiagnosticCategory.Error, "Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031", "Public property '{0}' of exported class has or is using private name '{1}'."), + Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4032, DiagnosticCategory.Error, "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032", "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."), + Property_0_of_exported_interface_has_or_is_using_private_name_1: diag(4033, DiagnosticCategory.Error, "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033", "Property '{0}' of exported interface has or is using private name '{1}'."), + Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4034, DiagnosticCategory.Error, "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034", "Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1: diag(4035, DiagnosticCategory.Error, "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035", "Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."), + Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4036, DiagnosticCategory.Error, "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036", "Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1: diag(4037, DiagnosticCategory.Error, "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037", "Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."), + Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4038, DiagnosticCategory.Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038", "Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4039, DiagnosticCategory.Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039", "Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1: diag(4040, DiagnosticCategory.Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040", "Return type of public static getter '{0}' from exported class has or is using private name '{1}'."), + Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4041, DiagnosticCategory.Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041", "Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4042, DiagnosticCategory.Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042", "Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1: diag(4043, DiagnosticCategory.Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043", "Return type of public getter '{0}' from exported class has or is using private name '{1}'."), + Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4044, DiagnosticCategory.Error, "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044", "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0: diag(4045, DiagnosticCategory.Error, "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045", "Return type of constructor signature from exported interface has or is using private name '{0}'."), + Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4046, DiagnosticCategory.Error, "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046", "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0: diag(4047, DiagnosticCategory.Error, "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047", "Return type of call signature from exported interface has or is using private name '{0}'."), + Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4048, DiagnosticCategory.Error, "Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048", "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0: diag(4049, DiagnosticCategory.Error, "Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049", "Return type of index signature from exported interface has or is using private name '{0}'."), + Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: diag(4050, DiagnosticCategory.Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050", "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."), + Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: diag(4051, DiagnosticCategory.Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051", "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."), + Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0: diag(4052, DiagnosticCategory.Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052", "Return type of public static method from exported class has or is using private name '{0}'."), + Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: diag(4053, DiagnosticCategory.Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053", "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."), + Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: diag(4054, DiagnosticCategory.Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054", "Return type of public method from exported class has or is using name '{0}' from private module '{1}'."), + Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0: diag(4055, DiagnosticCategory.Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055", "Return type of public method from exported class has or is using private name '{0}'."), + Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4056, DiagnosticCategory.Error, "Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056", "Return type of method from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0: diag(4057, DiagnosticCategory.Error, "Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057", "Return type of method from exported interface has or is using private name '{0}'."), + Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: diag(4058, DiagnosticCategory.Error, "Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058", "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."), + Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: diag(4059, DiagnosticCategory.Error, "Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059", "Return type of exported function has or is using name '{0}' from private module '{1}'."), + Return_type_of_exported_function_has_or_is_using_private_name_0: diag(4060, DiagnosticCategory.Error, "Return_type_of_exported_function_has_or_is_using_private_name_0_4060", "Return type of exported function has or is using private name '{0}'."), + Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4061, DiagnosticCategory.Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061", "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4062, DiagnosticCategory.Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062", "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1: diag(4063, DiagnosticCategory.Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063", "Parameter '{0}' of constructor from exported class has or is using private name '{1}'."), + Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4064, DiagnosticCategory.Error, "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064", "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4065, DiagnosticCategory.Error, "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065", "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."), + Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4066, DiagnosticCategory.Error, "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066", "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4067, DiagnosticCategory.Error, "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067", "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."), + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4068, DiagnosticCategory.Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068", "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4069, DiagnosticCategory.Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069", "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: diag(4070, DiagnosticCategory.Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070", "Parameter '{0}' of public static method from exported class has or is using private name '{1}'."), + Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4071, DiagnosticCategory.Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071", "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4072, DiagnosticCategory.Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072", "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: diag(4073, DiagnosticCategory.Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073", "Parameter '{0}' of public method from exported class has or is using private name '{1}'."), + Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4074, DiagnosticCategory.Error, "Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074", "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: diag(4075, DiagnosticCategory.Error, "Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075", "Parameter '{0}' of method from exported interface has or is using private name '{1}'."), + Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4076, DiagnosticCategory.Error, "Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076", "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: diag(4077, DiagnosticCategory.Error, "Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077", "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_exported_function_has_or_is_using_private_name_1: diag(4078, DiagnosticCategory.Error, "Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078", "Parameter '{0}' of exported function has or is using private name '{1}'."), + Exported_type_alias_0_has_or_is_using_private_name_1: diag(4081, DiagnosticCategory.Error, "Exported_type_alias_0_has_or_is_using_private_name_1_4081", "Exported type alias '{0}' has or is using private name '{1}'."), + Default_export_of_the_module_has_or_is_using_private_name_0: diag(4082, DiagnosticCategory.Error, "Default_export_of_the_module_has_or_is_using_private_name_0_4082", "Default export of the module has or is using private name '{0}'."), + Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1: diag(4083, DiagnosticCategory.Error, "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083", "Type parameter '{0}' of exported type alias has or is using private name '{1}'."), + Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2: diag(4084, DiagnosticCategory.Error, "Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084", "Exported type alias '{0}' has or is using private name '{1}' from module {2}."), + Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict: diag(4090, DiagnosticCategory.Error, "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090", "Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict."), + Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4091, DiagnosticCategory.Error, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091", "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4092, DiagnosticCategory.Error, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092", "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."), + Property_0_of_exported_class_expression_may_not_be_private_or_protected: diag(4094, DiagnosticCategory.Error, "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094", "Property '{0}' of exported class expression may not be private or protected."), + Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4095, DiagnosticCategory.Error, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095", "Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4096, DiagnosticCategory.Error, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096", "Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_static_method_0_of_exported_class_has_or_is_using_private_name_1: diag(4097, DiagnosticCategory.Error, "Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097", "Public static method '{0}' of exported class has or is using private name '{1}'."), + Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4098, DiagnosticCategory.Error, "Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098", "Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4099, DiagnosticCategory.Error, "Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099", "Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_method_0_of_exported_class_has_or_is_using_private_name_1: diag(4100, DiagnosticCategory.Error, "Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100", "Public method '{0}' of exported class has or is using private name '{1}'."), + Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4101, DiagnosticCategory.Error, "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101", "Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."), + Method_0_of_exported_interface_has_or_is_using_private_name_1: diag(4102, DiagnosticCategory.Error, "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102", "Method '{0}' of exported interface has or is using private name '{1}'."), + Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1: diag(4103, DiagnosticCategory.Error, "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103", "Type parameter '{0}' of exported mapped object type is using private name '{1}'."), + The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1: diag(4104, DiagnosticCategory.Error, "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104", "The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."), + Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter: diag(4105, DiagnosticCategory.Error, "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105", "Private or protected member '{0}' cannot be accessed on a type parameter."), + Parameter_0_of_accessor_has_or_is_using_private_name_1: diag(4106, DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106", "Parameter '{0}' of accessor has or is using private name '{1}'."), + Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2: diag(4107, DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107", "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4108, DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108", "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."), + Type_arguments_for_0_circularly_reference_themselves: diag(4109, DiagnosticCategory.Error, "Type_arguments_for_0_circularly_reference_themselves_4109", "Type arguments for '{0}' circularly reference themselves."), + Tuple_type_arguments_circularly_reference_themselves: diag(4110, DiagnosticCategory.Error, "Tuple_type_arguments_circularly_reference_themselves_4110", "Tuple type arguments circularly reference themselves."), + Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0: diag(4111, DiagnosticCategory.Error, "Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111", "Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."), + This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class: diag(4112, DiagnosticCategory.Error, "This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112", "This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."), + This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0: diag(4113, DiagnosticCategory.Error, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."), + This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0: diag(4114, DiagnosticCategory.Error, "This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114", "This member must have an 'override' modifier because it overrides a member in the base class '{0}'."), + This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0: diag(4115, DiagnosticCategory.Error, "This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115", "This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."), + This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0: diag(4116, DiagnosticCategory.Error, "This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116", "This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."), + This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4117, DiagnosticCategory.Error, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"), + The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized: diag(4118, DiagnosticCategory.Error, "The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118", "The type of this node cannot be serialized because its property '{0}' cannot be serialized."), + This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: diag(4119, DiagnosticCategory.Error, "This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119", "This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."), + This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: diag(4120, DiagnosticCategory.Error, "This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120", "This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."), + This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class: diag(4121, DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121", "This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."), + This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."), + This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"), + Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, DiagnosticCategory.Error, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), + resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4125, DiagnosticCategory.Error, "resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125", "'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), + The_current_host_does_not_support_the_0_option: diag(5001, DiagnosticCategory.Error, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."), + Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, DiagnosticCategory.Error, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."), + File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, DiagnosticCategory.Error, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."), + Cannot_read_file_0_Colon_1: diag(5012, DiagnosticCategory.Error, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."), + Failed_to_parse_file_0_Colon_1: diag(5014, DiagnosticCategory.Error, "Failed_to_parse_file_0_Colon_1_5014", "Failed to parse file '{0}': {1}."), + Unknown_compiler_option_0: diag(5023, DiagnosticCategory.Error, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."), + Compiler_option_0_requires_a_value_of_type_1: diag(5024, DiagnosticCategory.Error, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."), + Unknown_compiler_option_0_Did_you_mean_1: diag(5025, DiagnosticCategory.Error, "Unknown_compiler_option_0_Did_you_mean_1_5025", "Unknown compiler option '{0}'. Did you mean '{1}'?"), + Could_not_write_file_0_Colon_1: diag(5033, DiagnosticCategory.Error, "Could_not_write_file_0_Colon_1_5033", "Could not write file '{0}': {1}."), + Option_project_cannot_be_mixed_with_source_files_on_a_command_line: diag(5042, DiagnosticCategory.Error, "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", "Option 'project' cannot be mixed with source files on a command line."), + Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: diag(5047, DiagnosticCategory.Error, "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."), + Option_0_cannot_be_specified_when_option_target_is_ES3: diag(5048, DiagnosticCategory.Error, "Option_0_cannot_be_specified_when_option_target_is_ES3_5048", "Option '{0}' cannot be specified when option 'target' is 'ES3'."), + Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: diag(5051, DiagnosticCategory.Error, "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051", "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."), + Option_0_cannot_be_specified_without_specifying_option_1: diag(5052, DiagnosticCategory.Error, "Option_0_cannot_be_specified_without_specifying_option_1_5052", "Option '{0}' cannot be specified without specifying option '{1}'."), + Option_0_cannot_be_specified_with_option_1: diag(5053, DiagnosticCategory.Error, "Option_0_cannot_be_specified_with_option_1_5053", "Option '{0}' cannot be specified with option '{1}'."), + A_tsconfig_json_file_is_already_defined_at_Colon_0: diag(5054, DiagnosticCategory.Error, "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054", "A 'tsconfig.json' file is already defined at: '{0}'."), + Cannot_write_file_0_because_it_would_overwrite_input_file: diag(5055, DiagnosticCategory.Error, "Cannot_write_file_0_because_it_would_overwrite_input_file_5055", "Cannot write file '{0}' because it would overwrite input file."), + Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files: diag(5056, DiagnosticCategory.Error, "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056", "Cannot write file '{0}' because it would be overwritten by multiple input files."), + Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: diag(5057, DiagnosticCategory.Error, "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", "Cannot find a tsconfig.json file at the specified directory: '{0}'."), + The_specified_path_does_not_exist_Colon_0: diag(5058, DiagnosticCategory.Error, "The_specified_path_does_not_exist_Colon_0_5058", "The specified path does not exist: '{0}'."), + Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier: diag(5059, DiagnosticCategory.Error, "Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059", "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."), + Pattern_0_can_have_at_most_one_Asterisk_character: diag(5061, DiagnosticCategory.Error, "Pattern_0_can_have_at_most_one_Asterisk_character_5061", "Pattern '{0}' can have at most one '*' character."), + Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character: diag(5062, DiagnosticCategory.Error, "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062", "Substitution '{0}' in pattern '{1}' can have at most one '*' character."), + Substitutions_for_pattern_0_should_be_an_array: diag(5063, DiagnosticCategory.Error, "Substitutions_for_pattern_0_should_be_an_array_5063", "Substitutions for pattern '{0}' should be an array."), + Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2: diag(5064, DiagnosticCategory.Error, "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064", "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."), + File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5065, DiagnosticCategory.Error, "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065", "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."), + Substitutions_for_pattern_0_shouldn_t_be_an_empty_array: diag(5066, DiagnosticCategory.Error, "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066", "Substitutions for pattern '{0}' shouldn't be an empty array."), + Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name: diag(5067, DiagnosticCategory.Error, "Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067", "Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."), + Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: diag(5068, DiagnosticCategory.Error, "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068", "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."), + Option_0_cannot_be_specified_without_specifying_option_1_or_option_2: diag(5069, DiagnosticCategory.Error, "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069", "Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."), + Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy: diag(5070, DiagnosticCategory.Error, "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070", "Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy."), + Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext: diag(5071, DiagnosticCategory.Error, "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071", "Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'."), + Unknown_build_option_0: diag(5072, DiagnosticCategory.Error, "Unknown_build_option_0_5072", "Unknown build option '{0}'."), + Build_option_0_requires_a_value_of_type_1: diag(5073, DiagnosticCategory.Error, "Build_option_0_requires_a_value_of_type_1_5073", "Build option '{0}' requires a value of type {1}."), + Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified: diag(5074, DiagnosticCategory.Error, "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074", "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified."), + _0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2: diag(5075, DiagnosticCategory.Error, "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075", "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."), + _0_and_1_operations_cannot_be_mixed_without_parentheses: diag(5076, DiagnosticCategory.Error, "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076", "'{0}' and '{1}' operations cannot be mixed without parentheses."), + Unknown_build_option_0_Did_you_mean_1: diag(5077, DiagnosticCategory.Error, "Unknown_build_option_0_Did_you_mean_1_5077", "Unknown build option '{0}'. Did you mean '{1}'?"), + Unknown_watch_option_0: diag(5078, DiagnosticCategory.Error, "Unknown_watch_option_0_5078", "Unknown watch option '{0}'."), + Unknown_watch_option_0_Did_you_mean_1: diag(5079, DiagnosticCategory.Error, "Unknown_watch_option_0_Did_you_mean_1_5079", "Unknown watch option '{0}'. Did you mean '{1}'?"), + Watch_option_0_requires_a_value_of_type_1: diag(5080, DiagnosticCategory.Error, "Watch_option_0_requires_a_value_of_type_1_5080", "Watch option '{0}' requires a value of type {1}."), + Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0: diag(5081, DiagnosticCategory.Error, "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081", "Cannot find a tsconfig.json file at the current directory: {0}."), + _0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1: diag(5082, DiagnosticCategory.Error, "_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082", "'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."), + Cannot_read_file_0: diag(5083, DiagnosticCategory.Error, "Cannot_read_file_0_5083", "Cannot read file '{0}'."), + Tuple_members_must_all_have_names_or_all_not_have_names: diag(5084, DiagnosticCategory.Error, "Tuple_members_must_all_have_names_or_all_not_have_names_5084", "Tuple members must all have names or all not have names."), + A_tuple_member_cannot_be_both_optional_and_rest: diag(5085, DiagnosticCategory.Error, "A_tuple_member_cannot_be_both_optional_and_rest_5085", "A tuple member cannot be both optional and rest."), + A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type: diag(5086, DiagnosticCategory.Error, "A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086", "A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."), + A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type: diag(5087, DiagnosticCategory.Error, "A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087", "A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."), + The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary: diag(5088, DiagnosticCategory.Error, "The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088", "The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary."), + Option_0_cannot_be_specified_when_option_jsx_is_1: diag(5089, DiagnosticCategory.Error, "Option_0_cannot_be_specified_when_option_jsx_is_1_5089", "Option '{0}' cannot be specified when option 'jsx' is '{1}'."), + Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash: diag(5090, DiagnosticCategory.Error, "Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090", "Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"), + Option_preserveConstEnums_cannot_be_disabled_when_isolatedModules_is_enabled: diag(5091, DiagnosticCategory.Error, "Option_preserveConstEnums_cannot_be_disabled_when_isolatedModules_is_enabled_5091", "Option 'preserveConstEnums' cannot be disabled when 'isolatedModules' is enabled."), + The_root_value_of_a_0_file_must_be_an_object: diag(5092, DiagnosticCategory.Error, "The_root_value_of_a_0_file_must_be_an_object_5092", "The root value of a '{0}' file must be an object."), + Compiler_option_0_may_only_be_used_with_build: diag(5093, DiagnosticCategory.Error, "Compiler_option_0_may_only_be_used_with_build_5093", "Compiler option '--{0}' may only be used with '--build'."), + Compiler_option_0_may_not_be_used_with_build: diag(5094, DiagnosticCategory.Error, "Compiler_option_0_may_not_be_used_with_build_5094", "Compiler option '--{0}' may not be used with '--build'."), + Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later: diag(5095, DiagnosticCategory.Error, "Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later_5095", "Option 'preserveValueImports' can only be used when 'module' is set to 'es2015' or later."), + Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6000, DiagnosticCategory.Message, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), + Concatenate_and_emit_output_to_single_file: diag(6001, DiagnosticCategory.Message, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), + Generates_corresponding_d_ts_file: diag(6002, DiagnosticCategory.Message, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), + Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: diag(6004, DiagnosticCategory.Message, "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004", "Specify the location where debugger should locate TypeScript files instead of source locations."), + Watch_input_files: diag(6005, DiagnosticCategory.Message, "Watch_input_files_6005", "Watch input files."), + Redirect_output_structure_to_the_directory: diag(6006, DiagnosticCategory.Message, "Redirect_output_structure_to_the_directory_6006", "Redirect output structure to the directory."), + Do_not_erase_const_enum_declarations_in_generated_code: diag(6007, DiagnosticCategory.Message, "Do_not_erase_const_enum_declarations_in_generated_code_6007", "Do not erase const enum declarations in generated code."), + Do_not_emit_outputs_if_any_errors_were_reported: diag(6008, DiagnosticCategory.Message, "Do_not_emit_outputs_if_any_errors_were_reported_6008", "Do not emit outputs if any errors were reported."), + Do_not_emit_comments_to_output: diag(6009, DiagnosticCategory.Message, "Do_not_emit_comments_to_output_6009", "Do not emit comments to output."), + Do_not_emit_outputs: diag(6010, DiagnosticCategory.Message, "Do_not_emit_outputs_6010", "Do not emit outputs."), + Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking: diag(6011, DiagnosticCategory.Message, "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011", "Allow default imports from modules with no default export. This does not affect code emit, just typechecking."), + Skip_type_checking_of_declaration_files: diag(6012, DiagnosticCategory.Message, "Skip_type_checking_of_declaration_files_6012", "Skip type checking of declaration files."), + Do_not_resolve_the_real_path_of_symlinks: diag(6013, DiagnosticCategory.Message, "Do_not_resolve_the_real_path_of_symlinks_6013", "Do not resolve the real path of symlinks."), + Only_emit_d_ts_declaration_files: diag(6014, DiagnosticCategory.Message, "Only_emit_d_ts_declaration_files_6014", "Only emit '.d.ts' declaration files."), + Specify_ECMAScript_target_version: diag(6015, DiagnosticCategory.Message, "Specify_ECMAScript_target_version_6015", "Specify ECMAScript target version."), + Specify_module_code_generation: diag(6016, DiagnosticCategory.Message, "Specify_module_code_generation_6016", "Specify module code generation."), + Print_this_message: diag(6017, DiagnosticCategory.Message, "Print_this_message_6017", "Print this message."), + Print_the_compiler_s_version: diag(6019, DiagnosticCategory.Message, "Print_the_compiler_s_version_6019", "Print the compiler's version."), + Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json: diag(6020, DiagnosticCategory.Message, "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020", "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."), + Syntax_Colon_0: diag(6023, DiagnosticCategory.Message, "Syntax_Colon_0_6023", "Syntax: {0}"), + options: diag(6024, DiagnosticCategory.Message, "options_6024", "options"), + file: diag(6025, DiagnosticCategory.Message, "file_6025", "file"), + Examples_Colon_0: diag(6026, DiagnosticCategory.Message, "Examples_Colon_0_6026", "Examples: {0}"), + Options_Colon: diag(6027, DiagnosticCategory.Message, "Options_Colon_6027", "Options:"), + Version_0: diag(6029, DiagnosticCategory.Message, "Version_0_6029", "Version {0}"), + Insert_command_line_options_and_files_from_a_file: diag(6030, DiagnosticCategory.Message, "Insert_command_line_options_and_files_from_a_file_6030", "Insert command line options and files from a file."), + Starting_compilation_in_watch_mode: diag(6031, DiagnosticCategory.Message, "Starting_compilation_in_watch_mode_6031", "Starting compilation in watch mode..."), + File_change_detected_Starting_incremental_compilation: diag(6032, DiagnosticCategory.Message, "File_change_detected_Starting_incremental_compilation_6032", "File change detected. Starting incremental compilation..."), + KIND: diag(6034, DiagnosticCategory.Message, "KIND_6034", "KIND"), + FILE: diag(6035, DiagnosticCategory.Message, "FILE_6035", "FILE"), + VERSION: diag(6036, DiagnosticCategory.Message, "VERSION_6036", "VERSION"), + LOCATION: diag(6037, DiagnosticCategory.Message, "LOCATION_6037", "LOCATION"), + DIRECTORY: diag(6038, DiagnosticCategory.Message, "DIRECTORY_6038", "DIRECTORY"), + STRATEGY: diag(6039, DiagnosticCategory.Message, "STRATEGY_6039", "STRATEGY"), + FILE_OR_DIRECTORY: diag(6040, DiagnosticCategory.Message, "FILE_OR_DIRECTORY_6040", "FILE OR DIRECTORY"), + Errors_Files: diag(6041, DiagnosticCategory.Message, "Errors_Files_6041", "Errors Files"), + Generates_corresponding_map_file: diag(6043, DiagnosticCategory.Message, "Generates_corresponding_map_file_6043", "Generates corresponding '.map' file."), + Compiler_option_0_expects_an_argument: diag(6044, DiagnosticCategory.Error, "Compiler_option_0_expects_an_argument_6044", "Compiler option '{0}' expects an argument."), + Unterminated_quoted_string_in_response_file_0: diag(6045, DiagnosticCategory.Error, "Unterminated_quoted_string_in_response_file_0_6045", "Unterminated quoted string in response file '{0}'."), + Argument_for_0_option_must_be_Colon_1: diag(6046, DiagnosticCategory.Error, "Argument_for_0_option_must_be_Colon_1_6046", "Argument for '{0}' option must be: {1}."), + Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: diag(6048, DiagnosticCategory.Error, "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048", "Locale must be of the form or -. For example '{0}' or '{1}'."), + Unable_to_open_file_0: diag(6050, DiagnosticCategory.Error, "Unable_to_open_file_0_6050", "Unable to open file '{0}'."), + Corrupted_locale_file_0: diag(6051, DiagnosticCategory.Error, "Corrupted_locale_file_0_6051", "Corrupted locale file {0}."), + Raise_error_on_expressions_and_declarations_with_an_implied_any_type: diag(6052, DiagnosticCategory.Message, "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052", "Raise error on expressions and declarations with an implied 'any' type."), + File_0_not_found: diag(6053, DiagnosticCategory.Error, "File_0_not_found_6053", "File '{0}' not found."), + File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1: diag(6054, DiagnosticCategory.Error, "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has an unsupported extension. The only supported extensions are {1}."), + Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: diag(6055, DiagnosticCategory.Message, "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055", "Suppress noImplicitAny errors for indexing objects lacking index signatures."), + Do_not_emit_declarations_for_code_that_has_an_internal_annotation: diag(6056, DiagnosticCategory.Message, "Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056", "Do not emit declarations for code that has an '@internal' annotation."), + Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: diag(6058, DiagnosticCategory.Message, "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058", "Specify the root directory of input files. Use to control the output directory structure with --outDir."), + File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: diag(6059, DiagnosticCategory.Error, "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059", "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."), + Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: diag(6060, DiagnosticCategory.Message, "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060", "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."), + NEWLINE: diag(6061, DiagnosticCategory.Message, "NEWLINE_6061", "NEWLINE"), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line: diag(6064, DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."), + Enables_experimental_support_for_ES7_decorators: diag(6065, DiagnosticCategory.Message, "Enables_experimental_support_for_ES7_decorators_6065", "Enables experimental support for ES7 decorators."), + Enables_experimental_support_for_emitting_type_metadata_for_decorators: diag(6066, DiagnosticCategory.Message, "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", "Enables experimental support for emitting type metadata for decorators."), + Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6: diag(6069, DiagnosticCategory.Message, "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069", "Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6)."), + Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: diag(6070, DiagnosticCategory.Message, "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", "Initializes a TypeScript project and creates a tsconfig.json file."), + Successfully_created_a_tsconfig_json_file: diag(6071, DiagnosticCategory.Message, "Successfully_created_a_tsconfig_json_file_6071", "Successfully created a tsconfig.json file."), + Suppress_excess_property_checks_for_object_literals: diag(6072, DiagnosticCategory.Message, "Suppress_excess_property_checks_for_object_literals_6072", "Suppress excess property checks for object literals."), + Stylize_errors_and_messages_using_color_and_context_experimental: diag(6073, DiagnosticCategory.Message, "Stylize_errors_and_messages_using_color_and_context_experimental_6073", "Stylize errors and messages using color and context (experimental)."), + Do_not_report_errors_on_unused_labels: diag(6074, DiagnosticCategory.Message, "Do_not_report_errors_on_unused_labels_6074", "Do not report errors on unused labels."), + Report_error_when_not_all_code_paths_in_function_return_a_value: diag(6075, DiagnosticCategory.Message, "Report_error_when_not_all_code_paths_in_function_return_a_value_6075", "Report error when not all code paths in function return a value."), + Report_errors_for_fallthrough_cases_in_switch_statement: diag(6076, DiagnosticCategory.Message, "Report_errors_for_fallthrough_cases_in_switch_statement_6076", "Report errors for fallthrough cases in switch statement."), + Do_not_report_errors_on_unreachable_code: diag(6077, DiagnosticCategory.Message, "Do_not_report_errors_on_unreachable_code_6077", "Do not report errors on unreachable code."), + Disallow_inconsistently_cased_references_to_the_same_file: diag(6078, DiagnosticCategory.Message, "Disallow_inconsistently_cased_references_to_the_same_file_6078", "Disallow inconsistently-cased references to the same file."), + Specify_library_files_to_be_included_in_the_compilation: diag(6079, DiagnosticCategory.Message, "Specify_library_files_to_be_included_in_the_compilation_6079", "Specify library files to be included in the compilation."), + Specify_JSX_code_generation: diag(6080, DiagnosticCategory.Message, "Specify_JSX_code_generation_6080", "Specify JSX code generation."), + File_0_has_an_unsupported_extension_so_skipping_it: diag(6081, DiagnosticCategory.Message, "File_0_has_an_unsupported_extension_so_skipping_it_6081", "File '{0}' has an unsupported extension, so skipping it."), + Only_amd_and_system_modules_are_supported_alongside_0: diag(6082, DiagnosticCategory.Error, "Only_amd_and_system_modules_are_supported_alongside_0_6082", "Only 'amd' and 'system' modules are supported alongside --{0}."), + Base_directory_to_resolve_non_absolute_module_names: diag(6083, DiagnosticCategory.Message, "Base_directory_to_resolve_non_absolute_module_names_6083", "Base directory to resolve non-absolute module names."), + Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: diag(6084, DiagnosticCategory.Message, "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"), + Enable_tracing_of_the_name_resolution_process: diag(6085, DiagnosticCategory.Message, "Enable_tracing_of_the_name_resolution_process_6085", "Enable tracing of the name resolution process."), + Resolving_module_0_from_1: diag(6086, DiagnosticCategory.Message, "Resolving_module_0_from_1_6086", "======== Resolving module '{0}' from '{1}'. ========"), + Explicitly_specified_module_resolution_kind_Colon_0: diag(6087, DiagnosticCategory.Message, "Explicitly_specified_module_resolution_kind_Colon_0_6087", "Explicitly specified module resolution kind: '{0}'."), + Module_resolution_kind_is_not_specified_using_0: diag(6088, DiagnosticCategory.Message, "Module_resolution_kind_is_not_specified_using_0_6088", "Module resolution kind is not specified, using '{0}'."), + Module_name_0_was_successfully_resolved_to_1: diag(6089, DiagnosticCategory.Message, "Module_name_0_was_successfully_resolved_to_1_6089", "======== Module name '{0}' was successfully resolved to '{1}'. ========"), + Module_name_0_was_not_resolved: diag(6090, DiagnosticCategory.Message, "Module_name_0_was_not_resolved_6090", "======== Module name '{0}' was not resolved. ========"), + paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0: diag(6091, DiagnosticCategory.Message, "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091", "'paths' option is specified, looking for a pattern to match module name '{0}'."), + Module_name_0_matched_pattern_1: diag(6092, DiagnosticCategory.Message, "Module_name_0_matched_pattern_1_6092", "Module name '{0}', matched pattern '{1}'."), + Trying_substitution_0_candidate_module_location_Colon_1: diag(6093, DiagnosticCategory.Message, "Trying_substitution_0_candidate_module_location_Colon_1_6093", "Trying substitution '{0}', candidate module location: '{1}'."), + Resolving_module_name_0_relative_to_base_url_1_2: diag(6094, DiagnosticCategory.Message, "Resolving_module_name_0_relative_to_base_url_1_2_6094", "Resolving module name '{0}' relative to base url '{1}' - '{2}'."), + Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1: diag(6095, DiagnosticCategory.Message, "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095", "Loading module as file / folder, candidate module location '{0}', target file types: {1}."), + File_0_does_not_exist: diag(6096, DiagnosticCategory.Message, "File_0_does_not_exist_6096", "File '{0}' does not exist."), + File_0_exist_use_it_as_a_name_resolution_result: diag(6097, DiagnosticCategory.Message, "File_0_exist_use_it_as_a_name_resolution_result_6097", "File '{0}' exist - use it as a name resolution result."), + Loading_module_0_from_node_modules_folder_target_file_types_Colon_1: diag(6098, DiagnosticCategory.Message, "Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098", "Loading module '{0}' from 'node_modules' folder, target file types: {1}."), + Found_package_json_at_0: diag(6099, DiagnosticCategory.Message, "Found_package_json_at_0_6099", "Found 'package.json' at '{0}'."), + package_json_does_not_have_a_0_field: diag(6100, DiagnosticCategory.Message, "package_json_does_not_have_a_0_field_6100", "'package.json' does not have a '{0}' field."), + package_json_has_0_field_1_that_references_2: diag(6101, DiagnosticCategory.Message, "package_json_has_0_field_1_that_references_2_6101", "'package.json' has '{0}' field '{1}' that references '{2}'."), + Allow_javascript_files_to_be_compiled: diag(6102, DiagnosticCategory.Message, "Allow_javascript_files_to_be_compiled_6102", "Allow javascript files to be compiled."), + Checking_if_0_is_the_longest_matching_prefix_for_1_2: diag(6104, DiagnosticCategory.Message, "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104", "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."), + Expected_type_of_0_field_in_package_json_to_be_1_got_2: diag(6105, DiagnosticCategory.Message, "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105", "Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."), + baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: diag(6106, DiagnosticCategory.Message, "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."), + rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: diag(6107, DiagnosticCategory.Message, "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", "'rootDirs' option is set, using it to resolve relative module name '{0}'."), + Longest_matching_prefix_for_0_is_1: diag(6108, DiagnosticCategory.Message, "Longest_matching_prefix_for_0_is_1_6108", "Longest matching prefix for '{0}' is '{1}'."), + Loading_0_from_the_root_dir_1_candidate_location_2: diag(6109, DiagnosticCategory.Message, "Loading_0_from_the_root_dir_1_candidate_location_2_6109", "Loading '{0}' from the root dir '{1}', candidate location '{2}'."), + Trying_other_entries_in_rootDirs: diag(6110, DiagnosticCategory.Message, "Trying_other_entries_in_rootDirs_6110", "Trying other entries in 'rootDirs'."), + Module_resolution_using_rootDirs_has_failed: diag(6111, DiagnosticCategory.Message, "Module_resolution_using_rootDirs_has_failed_6111", "Module resolution using 'rootDirs' has failed."), + Do_not_emit_use_strict_directives_in_module_output: diag(6112, DiagnosticCategory.Message, "Do_not_emit_use_strict_directives_in_module_output_6112", "Do not emit 'use strict' directives in module output."), + Enable_strict_null_checks: diag(6113, DiagnosticCategory.Message, "Enable_strict_null_checks_6113", "Enable strict null checks."), + Unknown_option_excludes_Did_you_mean_exclude: diag(6114, DiagnosticCategory.Error, "Unknown_option_excludes_Did_you_mean_exclude_6114", "Unknown option 'excludes'. Did you mean 'exclude'?"), + Raise_error_on_this_expressions_with_an_implied_any_type: diag(6115, DiagnosticCategory.Message, "Raise_error_on_this_expressions_with_an_implied_any_type_6115", "Raise error on 'this' expressions with an implied 'any' type."), + Resolving_type_reference_directive_0_containing_file_1_root_directory_2: diag(6116, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116", "======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"), + Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2: diag(6119, DiagnosticCategory.Message, "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119", "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"), + Type_reference_directive_0_was_not_resolved: diag(6120, DiagnosticCategory.Message, "Type_reference_directive_0_was_not_resolved_6120", "======== Type reference directive '{0}' was not resolved. ========"), + Resolving_with_primary_search_path_0: diag(6121, DiagnosticCategory.Message, "Resolving_with_primary_search_path_0_6121", "Resolving with primary search path '{0}'."), + Root_directory_cannot_be_determined_skipping_primary_search_paths: diag(6122, DiagnosticCategory.Message, "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122", "Root directory cannot be determined, skipping primary search paths."), + Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set: diag(6123, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123", "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"), + Type_declaration_files_to_be_included_in_compilation: diag(6124, DiagnosticCategory.Message, "Type_declaration_files_to_be_included_in_compilation_6124", "Type declaration files to be included in compilation."), + Looking_up_in_node_modules_folder_initial_location_0: diag(6125, DiagnosticCategory.Message, "Looking_up_in_node_modules_folder_initial_location_0_6125", "Looking up in 'node_modules' folder, initial location '{0}'."), + Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder: diag(6126, DiagnosticCategory.Message, "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126", "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."), + Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1: diag(6127, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127", "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"), + Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set: diag(6128, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128", "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"), + Resolving_real_path_for_0_result_1: diag(6130, DiagnosticCategory.Message, "Resolving_real_path_for_0_result_1_6130", "Resolving real path for '{0}', result '{1}'."), + Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system: diag(6131, DiagnosticCategory.Error, "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131", "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."), + File_name_0_has_a_1_extension_stripping_it: diag(6132, DiagnosticCategory.Message, "File_name_0_has_a_1_extension_stripping_it_6132", "File name '{0}' has a '{1}' extension - stripping it."), + _0_is_declared_but_its_value_is_never_read: diag(6133, DiagnosticCategory.Error, "_0_is_declared_but_its_value_is_never_read_6133", "'{0}' is declared but its value is never read.", /*reportsUnnecessary*/ true), + Report_errors_on_unused_locals: diag(6134, DiagnosticCategory.Message, "Report_errors_on_unused_locals_6134", "Report errors on unused locals."), + Report_errors_on_unused_parameters: diag(6135, DiagnosticCategory.Message, "Report_errors_on_unused_parameters_6135", "Report errors on unused parameters."), + The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: diag(6136, DiagnosticCategory.Message, "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", "The maximum dependency depth to search under node_modules and load JavaScript files."), + Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1: diag(6137, DiagnosticCategory.Error, "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137", "Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."), + Property_0_is_declared_but_its_value_is_never_read: diag(6138, DiagnosticCategory.Error, "Property_0_is_declared_but_its_value_is_never_read_6138", "Property '{0}' is declared but its value is never read.", /*reportsUnnecessary*/ true), + Import_emit_helpers_from_tslib: diag(6139, DiagnosticCategory.Message, "Import_emit_helpers_from_tslib_6139", "Import emit helpers from 'tslib'."), + Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2: diag(6140, DiagnosticCategory.Error, "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140", "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."), + Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: diag(6141, DiagnosticCategory.Message, "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", "Parse in strict mode and emit \"use strict\" for each source file."), + Module_0_was_resolved_to_1_but_jsx_is_not_set: diag(6142, DiagnosticCategory.Error, "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142", "Module '{0}' was resolved to '{1}', but '--jsx' is not set."), + Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1: diag(6144, DiagnosticCategory.Message, "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144", "Module '{0}' was resolved as locally declared ambient module in file '{1}'."), + Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified: diag(6145, DiagnosticCategory.Message, "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145", "Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified."), + Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h: diag(6146, DiagnosticCategory.Message, "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146", "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."), + Resolution_for_module_0_was_found_in_cache_from_location_1: diag(6147, DiagnosticCategory.Message, "Resolution_for_module_0_was_found_in_cache_from_location_1_6147", "Resolution for module '{0}' was found in cache from location '{1}'."), + Directory_0_does_not_exist_skipping_all_lookups_in_it: diag(6148, DiagnosticCategory.Message, "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148", "Directory '{0}' does not exist, skipping all lookups in it."), + Show_diagnostic_information: diag(6149, DiagnosticCategory.Message, "Show_diagnostic_information_6149", "Show diagnostic information."), + Show_verbose_diagnostic_information: diag(6150, DiagnosticCategory.Message, "Show_verbose_diagnostic_information_6150", "Show verbose diagnostic information."), + Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file: diag(6151, DiagnosticCategory.Message, "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151", "Emit a single file with source maps instead of having a separate file."), + Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set: diag(6152, DiagnosticCategory.Message, "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152", "Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."), + Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule: diag(6153, DiagnosticCategory.Message, "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153", "Transpile each file as a separate module (similar to 'ts.transpileModule')."), + Print_names_of_generated_files_part_of_the_compilation: diag(6154, DiagnosticCategory.Message, "Print_names_of_generated_files_part_of_the_compilation_6154", "Print names of generated files part of the compilation."), + Print_names_of_files_part_of_the_compilation: diag(6155, DiagnosticCategory.Message, "Print_names_of_files_part_of_the_compilation_6155", "Print names of files part of the compilation."), + The_locale_used_when_displaying_messages_to_the_user_e_g_en_us: diag(6156, DiagnosticCategory.Message, "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156", "The locale used when displaying messages to the user (e.g. 'en-us')"), + Do_not_generate_custom_helper_functions_like_extends_in_compiled_output: diag(6157, DiagnosticCategory.Message, "Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157", "Do not generate custom helper functions like '__extends' in compiled output."), + Do_not_include_the_default_library_file_lib_d_ts: diag(6158, DiagnosticCategory.Message, "Do_not_include_the_default_library_file_lib_d_ts_6158", "Do not include the default library file (lib.d.ts)."), + Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files: diag(6159, DiagnosticCategory.Message, "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159", "Do not add triple-slash references or imported modules to the list of compiled files."), + Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files: diag(6160, DiagnosticCategory.Message, "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160", "[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."), + List_of_folders_to_include_type_definitions_from: diag(6161, DiagnosticCategory.Message, "List_of_folders_to_include_type_definitions_from_6161", "List of folders to include type definitions from."), + Disable_size_limitations_on_JavaScript_projects: diag(6162, DiagnosticCategory.Message, "Disable_size_limitations_on_JavaScript_projects_6162", "Disable size limitations on JavaScript projects."), + The_character_set_of_the_input_files: diag(6163, DiagnosticCategory.Message, "The_character_set_of_the_input_files_6163", "The character set of the input files."), + Do_not_truncate_error_messages: diag(6165, DiagnosticCategory.Message, "Do_not_truncate_error_messages_6165", "Do not truncate error messages."), + Output_directory_for_generated_declaration_files: diag(6166, DiagnosticCategory.Message, "Output_directory_for_generated_declaration_files_6166", "Output directory for generated declaration files."), + A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl: diag(6167, DiagnosticCategory.Message, "A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167", "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."), + List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime: diag(6168, DiagnosticCategory.Message, "List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168", "List of root folders whose combined content represents the structure of the project at runtime."), + Show_all_compiler_options: diag(6169, DiagnosticCategory.Message, "Show_all_compiler_options_6169", "Show all compiler options."), + Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file: diag(6170, DiagnosticCategory.Message, "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170", "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"), + Command_line_Options: diag(6171, DiagnosticCategory.Message, "Command_line_Options_6171", "Command-line Options"), + Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3: diag(6179, DiagnosticCategory.Message, "Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179", "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'."), + Enable_all_strict_type_checking_options: diag(6180, DiagnosticCategory.Message, "Enable_all_strict_type_checking_options_6180", "Enable all strict type-checking options."), + Scoped_package_detected_looking_in_0: diag(6182, DiagnosticCategory.Message, "Scoped_package_detected_looking_in_0_6182", "Scoped package detected, looking in '{0}'"), + Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2: diag(6183, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."), + Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: diag(6184, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."), + Enable_strict_checking_of_function_types: diag(6186, DiagnosticCategory.Message, "Enable_strict_checking_of_function_types_6186", "Enable strict checking of function types."), + Enable_strict_checking_of_property_initialization_in_classes: diag(6187, DiagnosticCategory.Message, "Enable_strict_checking_of_property_initialization_in_classes_6187", "Enable strict checking of property initialization in classes."), + Numeric_separators_are_not_allowed_here: diag(6188, DiagnosticCategory.Error, "Numeric_separators_are_not_allowed_here_6188", "Numeric separators are not allowed here."), + Multiple_consecutive_numeric_separators_are_not_permitted: diag(6189, DiagnosticCategory.Error, "Multiple_consecutive_numeric_separators_are_not_permitted_6189", "Multiple consecutive numeric separators are not permitted."), + Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen: diag(6191, DiagnosticCategory.Message, "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191", "Whether to keep outdated console output in watch mode instead of clearing the screen."), + All_imports_in_import_declaration_are_unused: diag(6192, DiagnosticCategory.Error, "All_imports_in_import_declaration_are_unused_6192", "All imports in import declaration are unused.", /*reportsUnnecessary*/ true), + Found_1_error_Watching_for_file_changes: diag(6193, DiagnosticCategory.Message, "Found_1_error_Watching_for_file_changes_6193", "Found 1 error. Watching for file changes."), + Found_0_errors_Watching_for_file_changes: diag(6194, DiagnosticCategory.Message, "Found_0_errors_Watching_for_file_changes_6194", "Found {0} errors. Watching for file changes."), + Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols: diag(6195, DiagnosticCategory.Message, "Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195", "Resolve 'keyof' to string valued property names only (no numbers or symbols)."), + _0_is_declared_but_never_used: diag(6196, DiagnosticCategory.Error, "_0_is_declared_but_never_used_6196", "'{0}' is declared but never used.", /*reportsUnnecessary*/ true), + Include_modules_imported_with_json_extension: diag(6197, DiagnosticCategory.Message, "Include_modules_imported_with_json_extension_6197", "Include modules imported with '.json' extension"), + All_destructured_elements_are_unused: diag(6198, DiagnosticCategory.Error, "All_destructured_elements_are_unused_6198", "All destructured elements are unused.", /*reportsUnnecessary*/ true), + All_variables_are_unused: diag(6199, DiagnosticCategory.Error, "All_variables_are_unused_6199", "All variables are unused.", /*reportsUnnecessary*/ true), + Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0: diag(6200, DiagnosticCategory.Error, "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200", "Definitions of the following identifiers conflict with those in another file: {0}"), + Conflicts_are_in_this_file: diag(6201, DiagnosticCategory.Message, "Conflicts_are_in_this_file_6201", "Conflicts are in this file."), + Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0: diag(6202, DiagnosticCategory.Error, "Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202", "Project references may not form a circular graph. Cycle detected: {0}"), + _0_was_also_declared_here: diag(6203, DiagnosticCategory.Message, "_0_was_also_declared_here_6203", "'{0}' was also declared here."), + and_here: diag(6204, DiagnosticCategory.Message, "and_here_6204", "and here."), + All_type_parameters_are_unused: diag(6205, DiagnosticCategory.Error, "All_type_parameters_are_unused_6205", "All type parameters are unused."), + package_json_has_a_typesVersions_field_with_version_specific_path_mappings: diag(6206, DiagnosticCategory.Message, "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206", "'package.json' has a 'typesVersions' field with version-specific path mappings."), + package_json_does_not_have_a_typesVersions_entry_that_matches_version_0: diag(6207, DiagnosticCategory.Message, "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207", "'package.json' does not have a 'typesVersions' entry that matches version '{0}'."), + package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2: diag(6208, DiagnosticCategory.Message, "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208", "'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."), + package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range: diag(6209, DiagnosticCategory.Message, "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209", "'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."), + An_argument_for_0_was_not_provided: diag(6210, DiagnosticCategory.Message, "An_argument_for_0_was_not_provided_6210", "An argument for '{0}' was not provided."), + An_argument_matching_this_binding_pattern_was_not_provided: diag(6211, DiagnosticCategory.Message, "An_argument_matching_this_binding_pattern_was_not_provided_6211", "An argument matching this binding pattern was not provided."), + Did_you_mean_to_call_this_expression: diag(6212, DiagnosticCategory.Message, "Did_you_mean_to_call_this_expression_6212", "Did you mean to call this expression?"), + Did_you_mean_to_use_new_with_this_expression: diag(6213, DiagnosticCategory.Message, "Did_you_mean_to_use_new_with_this_expression_6213", "Did you mean to use 'new' with this expression?"), + Enable_strict_bind_call_and_apply_methods_on_functions: diag(6214, DiagnosticCategory.Message, "Enable_strict_bind_call_and_apply_methods_on_functions_6214", "Enable strict 'bind', 'call', and 'apply' methods on functions."), + Using_compiler_options_of_project_reference_redirect_0: diag(6215, DiagnosticCategory.Message, "Using_compiler_options_of_project_reference_redirect_0_6215", "Using compiler options of project reference redirect '{0}'."), + Found_1_error: diag(6216, DiagnosticCategory.Message, "Found_1_error_6216", "Found 1 error."), + Found_0_errors: diag(6217, DiagnosticCategory.Message, "Found_0_errors_6217", "Found {0} errors."), + Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2: diag(6218, DiagnosticCategory.Message, "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218", "======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"), + Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3: diag(6219, DiagnosticCategory.Message, "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219", "======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========"), + package_json_had_a_falsy_0_field: diag(6220, DiagnosticCategory.Message, "package_json_had_a_falsy_0_field_6220", "'package.json' had a falsy '{0}' field."), + Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects: diag(6221, DiagnosticCategory.Message, "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221", "Disable use of source files instead of declaration files from referenced projects."), + Emit_class_fields_with_Define_instead_of_Set: diag(6222, DiagnosticCategory.Message, "Emit_class_fields_with_Define_instead_of_Set_6222", "Emit class fields with Define instead of Set."), + Generates_a_CPU_profile: diag(6223, DiagnosticCategory.Message, "Generates_a_CPU_profile_6223", "Generates a CPU profile."), + Disable_solution_searching_for_this_project: diag(6224, DiagnosticCategory.Message, "Disable_solution_searching_for_this_project_6224", "Disable solution searching for this project."), + Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory: diag(6225, DiagnosticCategory.Message, "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225", "Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."), + Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling: diag(6226, DiagnosticCategory.Message, "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226", "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling'."), + Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize: diag(6227, DiagnosticCategory.Message, "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227", "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority', 'FixedChunkSize'."), + Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3: diag(6229, DiagnosticCategory.Error, "Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229", "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line: diag(6230, DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."), + Could_not_resolve_the_path_0_with_the_extensions_Colon_1: diag(6231, DiagnosticCategory.Error, "Could_not_resolve_the_path_0_with_the_extensions_Colon_1_6231", "Could not resolve the path '{0}' with the extensions: {1}."), + Declaration_augments_declaration_in_another_file_This_cannot_be_serialized: diag(6232, DiagnosticCategory.Error, "Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232", "Declaration augments declaration in another file. This cannot be serialized."), + This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file: diag(6233, DiagnosticCategory.Error, "This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233", "This is the declaration being augmented. Consider moving the augmenting declaration into the same file."), + This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without: diag(6234, DiagnosticCategory.Error, "This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without_6234", "This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?"), + Disable_loading_referenced_projects: diag(6235, DiagnosticCategory.Message, "Disable_loading_referenced_projects_6235", "Disable loading referenced projects."), + Arguments_for_the_rest_parameter_0_were_not_provided: diag(6236, DiagnosticCategory.Error, "Arguments_for_the_rest_parameter_0_were_not_provided_6236", "Arguments for the rest parameter '{0}' were not provided."), + Generates_an_event_trace_and_a_list_of_types: diag(6237, DiagnosticCategory.Message, "Generates_an_event_trace_and_a_list_of_types_6237", "Generates an event trace and a list of types."), + Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react: diag(6238, DiagnosticCategory.Error, "Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238", "Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react"), + File_0_exists_according_to_earlier_cached_lookups: diag(6239, DiagnosticCategory.Message, "File_0_exists_according_to_earlier_cached_lookups_6239", "File '{0}' exists according to earlier cached lookups."), + File_0_does_not_exist_according_to_earlier_cached_lookups: diag(6240, DiagnosticCategory.Message, "File_0_does_not_exist_according_to_earlier_cached_lookups_6240", "File '{0}' does not exist according to earlier cached lookups."), + Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1: diag(6241, DiagnosticCategory.Message, "Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241", "Resolution for type reference directive '{0}' was found in cache from location '{1}'."), + Resolving_type_reference_directive_0_containing_file_1: diag(6242, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_1_6242", "======== Resolving type reference directive '{0}', containing file '{1}'. ========"), + Interpret_optional_property_types_as_written_rather_than_adding_undefined: diag(6243, DiagnosticCategory.Message, "Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243", "Interpret optional property types as written, rather than adding 'undefined'."), + Modules: diag(6244, DiagnosticCategory.Message, "Modules_6244", "Modules"), + File_Management: diag(6245, DiagnosticCategory.Message, "File_Management_6245", "File Management"), + Emit: diag(6246, DiagnosticCategory.Message, "Emit_6246", "Emit"), + JavaScript_Support: diag(6247, DiagnosticCategory.Message, "JavaScript_Support_6247", "JavaScript Support"), + Type_Checking: diag(6248, DiagnosticCategory.Message, "Type_Checking_6248", "Type Checking"), + Editor_Support: diag(6249, DiagnosticCategory.Message, "Editor_Support_6249", "Editor Support"), + Watch_and_Build_Modes: diag(6250, DiagnosticCategory.Message, "Watch_and_Build_Modes_6250", "Watch and Build Modes"), + Compiler_Diagnostics: diag(6251, DiagnosticCategory.Message, "Compiler_Diagnostics_6251", "Compiler Diagnostics"), + Interop_Constraints: diag(6252, DiagnosticCategory.Message, "Interop_Constraints_6252", "Interop Constraints"), + Backwards_Compatibility: diag(6253, DiagnosticCategory.Message, "Backwards_Compatibility_6253", "Backwards Compatibility"), + Language_and_Environment: diag(6254, DiagnosticCategory.Message, "Language_and_Environment_6254", "Language and Environment"), + Projects: diag(6255, DiagnosticCategory.Message, "Projects_6255", "Projects"), + Output_Formatting: diag(6256, DiagnosticCategory.Message, "Output_Formatting_6256", "Output Formatting"), + Completeness: diag(6257, DiagnosticCategory.Message, "Completeness_6257", "Completeness"), + _0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file: diag(6258, DiagnosticCategory.Error, "_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258", "'{0}' should be set inside the 'compilerOptions' object of the config json file"), + Found_1_error_in_1: diag(6259, DiagnosticCategory.Message, "Found_1_error_in_1_6259", "Found 1 error in {1}"), + Found_0_errors_in_the_same_file_starting_at_Colon_1: diag(6260, DiagnosticCategory.Message, "Found_0_errors_in_the_same_file_starting_at_Colon_1_6260", "Found {0} errors in the same file, starting at: {1}"), + Found_0_errors_in_1_files: diag(6261, DiagnosticCategory.Message, "Found_0_errors_in_1_files_6261", "Found {0} errors in {1} files."), + Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve: diag(6270, DiagnosticCategory.Message, "Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270", "Directory '{0}' has no containing package.json scope. Imports will not resolve."), + Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1: diag(6271, DiagnosticCategory.Message, "Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271", "Import specifier '{0}' does not exist in package.json scope at path '{1}'."), + Invalid_import_specifier_0_has_no_possible_resolutions: diag(6272, DiagnosticCategory.Message, "Invalid_import_specifier_0_has_no_possible_resolutions_6272", "Invalid import specifier '{0}' has no possible resolutions."), + package_json_scope_0_has_no_imports_defined: diag(6273, DiagnosticCategory.Message, "package_json_scope_0_has_no_imports_defined_6273", "package.json scope '{0}' has no imports defined."), + package_json_scope_0_explicitly_maps_specifier_1_to_null: diag(6274, DiagnosticCategory.Message, "package_json_scope_0_explicitly_maps_specifier_1_to_null_6274", "package.json scope '{0}' explicitly maps specifier '{1}' to null."), + package_json_scope_0_has_invalid_type_for_target_of_specifier_1: diag(6275, DiagnosticCategory.Message, "package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275", "package.json scope '{0}' has invalid type for target of specifier '{1}'"), + Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1: diag(6276, DiagnosticCategory.Message, "Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276", "Export specifier '{0}' does not exist in package.json scope at path '{1}'."), + Enable_project_compilation: diag(6302, DiagnosticCategory.Message, "Enable_project_compilation_6302", "Enable project compilation"), + Composite_projects_may_not_disable_declaration_emit: diag(6304, DiagnosticCategory.Error, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."), + Output_file_0_has_not_been_built_from_source_file_1: diag(6305, DiagnosticCategory.Error, "Output_file_0_has_not_been_built_from_source_file_1_6305", "Output file '{0}' has not been built from source file '{1}'."), + Referenced_project_0_must_have_setting_composite_Colon_true: diag(6306, DiagnosticCategory.Error, "Referenced_project_0_must_have_setting_composite_Colon_true_6306", "Referenced project '{0}' must have setting \"composite\": true."), + File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern: diag(6307, DiagnosticCategory.Error, "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307", "File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."), + Cannot_prepend_project_0_because_it_does_not_have_outFile_set: diag(6308, DiagnosticCategory.Error, "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308", "Cannot prepend project '{0}' because it does not have 'outFile' set"), + Output_file_0_from_project_1_does_not_exist: diag(6309, DiagnosticCategory.Error, "Output_file_0_from_project_1_does_not_exist_6309", "Output file '{0}' from project '{1}' does not exist"), + Referenced_project_0_may_not_disable_emit: diag(6310, DiagnosticCategory.Error, "Referenced_project_0_may_not_disable_emit_6310", "Referenced project '{0}' may not disable emit."), + Project_0_is_out_of_date_because_output_1_is_older_than_input_2: diag(6350, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350", "Project '{0}' is out of date because output '{1}' is older than input '{2}'"), + Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2: diag(6351, DiagnosticCategory.Message, "Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351", "Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"), + Project_0_is_out_of_date_because_output_file_1_does_not_exist: diag(6352, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352", "Project '{0}' is out of date because output file '{1}' does not exist"), + Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date: diag(6353, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353", "Project '{0}' is out of date because its dependency '{1}' is out of date"), + Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies: diag(6354, DiagnosticCategory.Message, "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354", "Project '{0}' is up to date with .d.ts files from its dependencies"), + Projects_in_this_build_Colon_0: diag(6355, DiagnosticCategory.Message, "Projects_in_this_build_Colon_0_6355", "Projects in this build: {0}"), + A_non_dry_build_would_delete_the_following_files_Colon_0: diag(6356, DiagnosticCategory.Message, "A_non_dry_build_would_delete_the_following_files_Colon_0_6356", "A non-dry build would delete the following files: {0}"), + A_non_dry_build_would_build_project_0: diag(6357, DiagnosticCategory.Message, "A_non_dry_build_would_build_project_0_6357", "A non-dry build would build project '{0}'"), + Building_project_0: diag(6358, DiagnosticCategory.Message, "Building_project_0_6358", "Building project '{0}'..."), + Updating_output_timestamps_of_project_0: diag(6359, DiagnosticCategory.Message, "Updating_output_timestamps_of_project_0_6359", "Updating output timestamps of project '{0}'..."), + Project_0_is_up_to_date: diag(6361, DiagnosticCategory.Message, "Project_0_is_up_to_date_6361", "Project '{0}' is up to date"), + Skipping_build_of_project_0_because_its_dependency_1_has_errors: diag(6362, DiagnosticCategory.Message, "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362", "Skipping build of project '{0}' because its dependency '{1}' has errors"), + Project_0_can_t_be_built_because_its_dependency_1_has_errors: diag(6363, DiagnosticCategory.Message, "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363", "Project '{0}' can't be built because its dependency '{1}' has errors"), + Build_one_or_more_projects_and_their_dependencies_if_out_of_date: diag(6364, DiagnosticCategory.Message, "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364", "Build one or more projects and their dependencies, if out of date"), + Delete_the_outputs_of_all_projects: diag(6365, DiagnosticCategory.Message, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects."), + Show_what_would_be_built_or_deleted_if_specified_with_clean: diag(6367, DiagnosticCategory.Message, "Show_what_would_be_built_or_deleted_if_specified_with_clean_6367", "Show what would be built (or deleted, if specified with '--clean')"), + Option_build_must_be_the_first_command_line_argument: diag(6369, DiagnosticCategory.Error, "Option_build_must_be_the_first_command_line_argument_6369", "Option '--build' must be the first command line argument."), + Options_0_and_1_cannot_be_combined: diag(6370, DiagnosticCategory.Error, "Options_0_and_1_cannot_be_combined_6370", "Options '{0}' and '{1}' cannot be combined."), + Updating_unchanged_output_timestamps_of_project_0: diag(6371, DiagnosticCategory.Message, "Updating_unchanged_output_timestamps_of_project_0_6371", "Updating unchanged output timestamps of project '{0}'..."), + Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed: diag(6372, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372", "Project '{0}' is out of date because output of its dependency '{1}' has changed"), + Updating_output_of_project_0: diag(6373, DiagnosticCategory.Message, "Updating_output_of_project_0_6373", "Updating output of project '{0}'..."), + A_non_dry_build_would_update_timestamps_for_output_of_project_0: diag(6374, DiagnosticCategory.Message, "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374", "A non-dry build would update timestamps for output of project '{0}'"), + A_non_dry_build_would_update_output_of_project_0: diag(6375, DiagnosticCategory.Message, "A_non_dry_build_would_update_output_of_project_0_6375", "A non-dry build would update output of project '{0}'"), + Cannot_update_output_of_project_0_because_there_was_error_reading_file_1: diag(6376, DiagnosticCategory.Message, "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376", "Cannot update output of project '{0}' because there was error reading file '{1}'"), + Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1: diag(6377, DiagnosticCategory.Error, "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377", "Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"), + Composite_projects_may_not_disable_incremental_compilation: diag(6379, DiagnosticCategory.Error, "Composite_projects_may_not_disable_incremental_compilation_6379", "Composite projects may not disable incremental compilation."), + Specify_file_to_store_incremental_compilation_information: diag(6380, DiagnosticCategory.Message, "Specify_file_to_store_incremental_compilation_information_6380", "Specify file to store incremental compilation information"), + Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2: diag(6381, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381", "Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"), + Skipping_build_of_project_0_because_its_dependency_1_was_not_built: diag(6382, DiagnosticCategory.Message, "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382", "Skipping build of project '{0}' because its dependency '{1}' was not built"), + Project_0_can_t_be_built_because_its_dependency_1_was_not_built: diag(6383, DiagnosticCategory.Message, "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383", "Project '{0}' can't be built because its dependency '{1}' was not built"), + Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: diag(6384, DiagnosticCategory.Message, "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384", "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."), + _0_is_deprecated: diag(6385, DiagnosticCategory.Suggestion, "_0_is_deprecated_6385", "'{0}' is deprecated.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ undefined, /*reportsDeprecated*/ true), + Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found: diag(6386, DiagnosticCategory.Message, "Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386", "Performance timings for '--diagnostics' or '--extendedDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found."), + The_signature_0_of_1_is_deprecated: diag(6387, DiagnosticCategory.Suggestion, "The_signature_0_of_1_is_deprecated_6387", "The signature '{0}' of '{1}' is deprecated.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ undefined, /*reportsDeprecated*/ true), + Project_0_is_being_forcibly_rebuilt: diag(6388, DiagnosticCategory.Message, "Project_0_is_being_forcibly_rebuilt_6388", "Project '{0}' is being forcibly rebuilt"), + Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved: diag(6389, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389", "Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."), + Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2: diag(6390, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."), + Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: diag(6391, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."), + Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved: diag(6392, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."), + Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: diag(6393, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."), + Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: diag(6394, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."), + Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: diag(6395, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."), + Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: diag(6396, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."), + Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: diag(6397, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."), + Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: diag(6398, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."), + Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted: diag(6399, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399", "Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"), + Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files: diag(6400, DiagnosticCategory.Message, "Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400", "Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"), + Project_0_is_out_of_date_because_there_was_error_reading_file_1: diag(6401, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401", "Project '{0}' is out of date because there was error reading file '{1}'"), + Resolving_in_0_mode_with_conditions_1: diag(6402, DiagnosticCategory.Message, "Resolving_in_0_mode_with_conditions_1_6402", "Resolving in {0} mode with conditions {1}."), + Matched_0_condition_1: diag(6403, DiagnosticCategory.Message, "Matched_0_condition_1_6403", "Matched '{0}' condition '{1}'."), + Using_0_subpath_1_with_target_2: diag(6404, DiagnosticCategory.Message, "Using_0_subpath_1_with_target_2_6404", "Using '{0}' subpath '{1}' with target '{2}'."), + Saw_non_matching_condition_0: diag(6405, DiagnosticCategory.Message, "Saw_non_matching_condition_0_6405", "Saw non-matching condition '{0}'."), + Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions: diag(6406, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406", "Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"), + The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, DiagnosticCategory.Message, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"), + The_expected_type_comes_from_this_index_signature: diag(6501, DiagnosticCategory.Message, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."), + The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, DiagnosticCategory.Message, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."), + Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing: diag(6503, DiagnosticCategory.Message, "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503", "Print names of files that are part of the compilation and then stop processing."), + File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option: diag(6504, DiagnosticCategory.Error, "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504", "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"), + Print_names_of_files_and_the_reason_they_are_part_of_the_compilation: diag(6505, DiagnosticCategory.Message, "Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505", "Print names of files and the reason they are part of the compilation."), + Consider_adding_a_declare_modifier_to_this_class: diag(6506, DiagnosticCategory.Message, "Consider_adding_a_declare_modifier_to_this_class_6506", "Consider adding a 'declare' modifier to this class."), + Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files: diag(6600, DiagnosticCategory.Message, "Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600", "Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files."), + Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export: diag(6601, DiagnosticCategory.Message, "Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601", "Allow 'import x from y' when a module doesn't have a default export."), + Allow_accessing_UMD_globals_from_modules: diag(6602, DiagnosticCategory.Message, "Allow_accessing_UMD_globals_from_modules_6602", "Allow accessing UMD globals from modules."), + Disable_error_reporting_for_unreachable_code: diag(6603, DiagnosticCategory.Message, "Disable_error_reporting_for_unreachable_code_6603", "Disable error reporting for unreachable code."), + Disable_error_reporting_for_unused_labels: diag(6604, DiagnosticCategory.Message, "Disable_error_reporting_for_unused_labels_6604", "Disable error reporting for unused labels."), + Ensure_use_strict_is_always_emitted: diag(6605, DiagnosticCategory.Message, "Ensure_use_strict_is_always_emitted_6605", "Ensure 'use strict' is always emitted."), + Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: diag(6606, DiagnosticCategory.Message, "Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606", "Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."), + Specify_the_base_directory_to_resolve_non_relative_module_names: diag(6607, DiagnosticCategory.Message, "Specify_the_base_directory_to_resolve_non_relative_module_names_6607", "Specify the base directory to resolve non-relative module names."), + No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files: diag(6608, DiagnosticCategory.Message, "No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608", "No longer supported. In early versions, manually set the text encoding for reading files."), + Enable_error_reporting_in_type_checked_JavaScript_files: diag(6609, DiagnosticCategory.Message, "Enable_error_reporting_in_type_checked_JavaScript_files_6609", "Enable error reporting in type-checked JavaScript files."), + Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references: diag(6611, DiagnosticCategory.Message, "Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611", "Enable constraints that allow a TypeScript project to be used with project references."), + Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project: diag(6612, DiagnosticCategory.Message, "Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612", "Generate .d.ts files from TypeScript and JavaScript files in your project."), + Specify_the_output_directory_for_generated_declaration_files: diag(6613, DiagnosticCategory.Message, "Specify_the_output_directory_for_generated_declaration_files_6613", "Specify the output directory for generated declaration files."), + Create_sourcemaps_for_d_ts_files: diag(6614, DiagnosticCategory.Message, "Create_sourcemaps_for_d_ts_files_6614", "Create sourcemaps for d.ts files."), + Output_compiler_performance_information_after_building: diag(6615, DiagnosticCategory.Message, "Output_compiler_performance_information_after_building_6615", "Output compiler performance information after building."), + Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project: diag(6616, DiagnosticCategory.Message, "Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616", "Disables inference for type acquisition by looking at filenames in a project."), + Reduce_the_number_of_projects_loaded_automatically_by_TypeScript: diag(6617, DiagnosticCategory.Message, "Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617", "Reduce the number of projects loaded automatically by TypeScript."), + Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server: diag(6618, DiagnosticCategory.Message, "Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618", "Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."), + Opt_a_project_out_of_multi_project_reference_checking_when_editing: diag(6619, DiagnosticCategory.Message, "Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619", "Opt a project out of multi-project reference checking when editing."), + Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects: diag(6620, DiagnosticCategory.Message, "Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620", "Disable preferring source files instead of declaration files when referencing composite projects."), + Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration: diag(6621, DiagnosticCategory.Message, "Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621", "Emit more compliant, but verbose and less performant JavaScript for iteration."), + Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files: diag(6622, DiagnosticCategory.Message, "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622", "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."), + Only_output_d_ts_files_and_not_JavaScript_files: diag(6623, DiagnosticCategory.Message, "Only_output_d_ts_files_and_not_JavaScript_files_6623", "Only output d.ts files and not JavaScript files."), + Emit_design_type_metadata_for_decorated_declarations_in_source_files: diag(6624, DiagnosticCategory.Message, "Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624", "Emit design-type metadata for decorated declarations in source files."), + Disable_the_type_acquisition_for_JavaScript_projects: diag(6625, DiagnosticCategory.Message, "Disable_the_type_acquisition_for_JavaScript_projects_6625", "Disable the type acquisition for JavaScript projects"), + Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility: diag(6626, DiagnosticCategory.Message, "Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626", "Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."), + Filters_results_from_the_include_option: diag(6627, DiagnosticCategory.Message, "Filters_results_from_the_include_option_6627", "Filters results from the `include` option."), + Remove_a_list_of_directories_from_the_watch_process: diag(6628, DiagnosticCategory.Message, "Remove_a_list_of_directories_from_the_watch_process_6628", "Remove a list of directories from the watch process."), + Remove_a_list_of_files_from_the_watch_mode_s_processing: diag(6629, DiagnosticCategory.Message, "Remove_a_list_of_files_from_the_watch_mode_s_processing_6629", "Remove a list of files from the watch mode's processing."), + Enable_experimental_support_for_TC39_stage_2_draft_decorators: diag(6630, DiagnosticCategory.Message, "Enable_experimental_support_for_TC39_stage_2_draft_decorators_6630", "Enable experimental support for TC39 stage 2 draft decorators."), + Print_files_read_during_the_compilation_including_why_it_was_included: diag(6631, DiagnosticCategory.Message, "Print_files_read_during_the_compilation_including_why_it_was_included_6631", "Print files read during the compilation including why it was included."), + Output_more_detailed_compiler_performance_information_after_building: diag(6632, DiagnosticCategory.Message, "Output_more_detailed_compiler_performance_information_after_building_6632", "Output more detailed compiler performance information after building."), + Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited: diag(6633, DiagnosticCategory.Message, "Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633", "Specify one or more path or node module references to base configuration files from which settings are inherited."), + Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers: diag(6634, DiagnosticCategory.Message, "Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634", "Specify what approach the watcher should use if the system runs out of native file watchers."), + Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include: diag(6635, DiagnosticCategory.Message, "Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635", "Include a list of files. This does not support glob patterns, as opposed to `include`."), + Build_all_projects_including_those_that_appear_to_be_up_to_date: diag(6636, DiagnosticCategory.Message, "Build_all_projects_including_those_that_appear_to_be_up_to_date_6636", "Build all projects, including those that appear to be up to date."), + Ensure_that_casing_is_correct_in_imports: diag(6637, DiagnosticCategory.Message, "Ensure_that_casing_is_correct_in_imports_6637", "Ensure that casing is correct in imports."), + Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging: diag(6638, DiagnosticCategory.Message, "Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638", "Emit a v8 CPU profile of the compiler run for debugging."), + Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file: diag(6639, DiagnosticCategory.Message, "Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639", "Allow importing helper functions from tslib once per project, instead of including them per-file."), + Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation: diag(6641, DiagnosticCategory.Message, "Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641", "Specify a list of glob patterns that match files to be included in compilation."), + Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects: diag(6642, DiagnosticCategory.Message, "Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642", "Save .tsbuildinfo files to allow for incremental compilation of projects."), + Include_sourcemap_files_inside_the_emitted_JavaScript: diag(6643, DiagnosticCategory.Message, "Include_sourcemap_files_inside_the_emitted_JavaScript_6643", "Include sourcemap files inside the emitted JavaScript."), + Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript: diag(6644, DiagnosticCategory.Message, "Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644", "Include source code in the sourcemaps inside the emitted JavaScript."), + Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports: diag(6645, DiagnosticCategory.Message, "Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645", "Ensure that each file can be safely transpiled without relying on other imports."), + Specify_what_JSX_code_is_generated: diag(6646, DiagnosticCategory.Message, "Specify_what_JSX_code_is_generated_6646", "Specify what JSX code is generated."), + Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h: diag(6647, DiagnosticCategory.Message, "Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647", "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."), + Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment: diag(6648, DiagnosticCategory.Message, "Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648", "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."), + Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk: diag(6649, DiagnosticCategory.Message, "Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649", "Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."), + Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option: diag(6650, DiagnosticCategory.Message, "Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650", "Make keyof only return strings instead of string, numbers or symbols. Legacy option."), + Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment: diag(6651, DiagnosticCategory.Message, "Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651", "Specify a set of bundled library declaration files that describe the target runtime environment."), + Print_the_names_of_emitted_files_after_a_compilation: diag(6652, DiagnosticCategory.Message, "Print_the_names_of_emitted_files_after_a_compilation_6652", "Print the names of emitted files after a compilation."), + Print_all_of_the_files_read_during_the_compilation: diag(6653, DiagnosticCategory.Message, "Print_all_of_the_files_read_during_the_compilation_6653", "Print all of the files read during the compilation."), + Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit: diag(6654, DiagnosticCategory.Message, "Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654", "Set the language of the messaging from TypeScript. This does not affect emit."), + Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: diag(6655, DiagnosticCategory.Message, "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655", "Specify the location where debugger should locate map files instead of generated locations."), + Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs: diag(6656, DiagnosticCategory.Message, "Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656", "Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."), + Specify_what_module_code_is_generated: diag(6657, DiagnosticCategory.Message, "Specify_what_module_code_is_generated_6657", "Specify what module code is generated."), + Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier: diag(6658, DiagnosticCategory.Message, "Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658", "Specify how TypeScript looks up a file from a given module specifier."), + Set_the_newline_character_for_emitting_files: diag(6659, DiagnosticCategory.Message, "Set_the_newline_character_for_emitting_files_6659", "Set the newline character for emitting files."), + Disable_emitting_files_from_a_compilation: diag(6660, DiagnosticCategory.Message, "Disable_emitting_files_from_a_compilation_6660", "Disable emitting files from a compilation."), + Disable_generating_custom_helper_functions_like_extends_in_compiled_output: diag(6661, DiagnosticCategory.Message, "Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661", "Disable generating custom helper functions like '__extends' in compiled output."), + Disable_emitting_files_if_any_type_checking_errors_are_reported: diag(6662, DiagnosticCategory.Message, "Disable_emitting_files_if_any_type_checking_errors_are_reported_6662", "Disable emitting files if any type checking errors are reported."), + Disable_truncating_types_in_error_messages: diag(6663, DiagnosticCategory.Message, "Disable_truncating_types_in_error_messages_6663", "Disable truncating types in error messages."), + Enable_error_reporting_for_fallthrough_cases_in_switch_statements: diag(6664, DiagnosticCategory.Message, "Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664", "Enable error reporting for fallthrough cases in switch statements."), + Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type: diag(6665, DiagnosticCategory.Message, "Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665", "Enable error reporting for expressions and declarations with an implied 'any' type."), + Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier: diag(6666, DiagnosticCategory.Message, "Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666", "Ensure overriding members in derived classes are marked with an override modifier."), + Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function: diag(6667, DiagnosticCategory.Message, "Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667", "Enable error reporting for codepaths that do not explicitly return in a function."), + Enable_error_reporting_when_this_is_given_the_type_any: diag(6668, DiagnosticCategory.Message, "Enable_error_reporting_when_this_is_given_the_type_any_6668", "Enable error reporting when 'this' is given the type 'any'."), + Disable_adding_use_strict_directives_in_emitted_JavaScript_files: diag(6669, DiagnosticCategory.Message, "Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669", "Disable adding 'use strict' directives in emitted JavaScript files."), + Disable_including_any_library_files_including_the_default_lib_d_ts: diag(6670, DiagnosticCategory.Message, "Disable_including_any_library_files_including_the_default_lib_d_ts_6670", "Disable including any library files, including the default lib.d.ts."), + Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type: diag(6671, DiagnosticCategory.Message, "Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671", "Enforces using indexed accessors for keys declared using an indexed type."), + Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project: diag(6672, DiagnosticCategory.Message, "Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672", "Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project."), + Disable_strict_checking_of_generic_signatures_in_function_types: diag(6673, DiagnosticCategory.Message, "Disable_strict_checking_of_generic_signatures_in_function_types_6673", "Disable strict checking of generic signatures in function types."), + Add_undefined_to_a_type_when_accessed_using_an_index: diag(6674, DiagnosticCategory.Message, "Add_undefined_to_a_type_when_accessed_using_an_index_6674", "Add 'undefined' to a type when accessed using an index."), + Enable_error_reporting_when_local_variables_aren_t_read: diag(6675, DiagnosticCategory.Message, "Enable_error_reporting_when_local_variables_aren_t_read_6675", "Enable error reporting when local variables aren't read."), + Raise_an_error_when_a_function_parameter_isn_t_read: diag(6676, DiagnosticCategory.Message, "Raise_an_error_when_a_function_parameter_isn_t_read_6676", "Raise an error when a function parameter isn't read."), + Deprecated_setting_Use_outFile_instead: diag(6677, DiagnosticCategory.Message, "Deprecated_setting_Use_outFile_instead_6677", "Deprecated setting. Use 'outFile' instead."), + Specify_an_output_folder_for_all_emitted_files: diag(6678, DiagnosticCategory.Message, "Specify_an_output_folder_for_all_emitted_files_6678", "Specify an output folder for all emitted files."), + Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output: diag(6679, DiagnosticCategory.Message, "Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679", "Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."), + Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations: diag(6680, DiagnosticCategory.Message, "Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680", "Specify a set of entries that re-map imports to additional lookup locations."), + Specify_a_list_of_language_service_plugins_to_include: diag(6681, DiagnosticCategory.Message, "Specify_a_list_of_language_service_plugins_to_include_6681", "Specify a list of language service plugins to include."), + Disable_erasing_const_enum_declarations_in_generated_code: diag(6682, DiagnosticCategory.Message, "Disable_erasing_const_enum_declarations_in_generated_code_6682", "Disable erasing 'const enum' declarations in generated code."), + Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node: diag(6683, DiagnosticCategory.Message, "Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683", "Disable resolving symlinks to their realpath. This correlates to the same flag in node."), + Disable_wiping_the_console_in_watch_mode: diag(6684, DiagnosticCategory.Message, "Disable_wiping_the_console_in_watch_mode_6684", "Disable wiping the console in watch mode."), + Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read: diag(6685, DiagnosticCategory.Message, "Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685", "Enable color and formatting in TypeScript's output to make compiler errors easier to read."), + Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit: diag(6686, DiagnosticCategory.Message, "Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686", "Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."), + Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references: diag(6687, DiagnosticCategory.Message, "Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687", "Specify an array of objects that specify paths for projects. Used in project references."), + Disable_emitting_comments: diag(6688, DiagnosticCategory.Message, "Disable_emitting_comments_6688", "Disable emitting comments."), + Enable_importing_json_files: diag(6689, DiagnosticCategory.Message, "Enable_importing_json_files_6689", "Enable importing .json files."), + Specify_the_root_folder_within_your_source_files: diag(6690, DiagnosticCategory.Message, "Specify_the_root_folder_within_your_source_files_6690", "Specify the root folder within your source files."), + Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules: diag(6691, DiagnosticCategory.Message, "Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691", "Allow multiple folders to be treated as one when resolving modules."), + Skip_type_checking_d_ts_files_that_are_included_with_TypeScript: diag(6692, DiagnosticCategory.Message, "Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692", "Skip type checking .d.ts files that are included with TypeScript."), + Skip_type_checking_all_d_ts_files: diag(6693, DiagnosticCategory.Message, "Skip_type_checking_all_d_ts_files_6693", "Skip type checking all .d.ts files."), + Create_source_map_files_for_emitted_JavaScript_files: diag(6694, DiagnosticCategory.Message, "Create_source_map_files_for_emitted_JavaScript_files_6694", "Create source map files for emitted JavaScript files."), + Specify_the_root_path_for_debuggers_to_find_the_reference_source_code: diag(6695, DiagnosticCategory.Message, "Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695", "Specify the root path for debuggers to find the reference source code."), + Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function: diag(6697, DiagnosticCategory.Message, "Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697", "Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."), + When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible: diag(6698, DiagnosticCategory.Message, "When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698", "When assigning functions, check to ensure parameters and the return values are subtype-compatible."), + When_type_checking_take_into_account_null_and_undefined: diag(6699, DiagnosticCategory.Message, "When_type_checking_take_into_account_null_and_undefined_6699", "When type checking, take into account 'null' and 'undefined'."), + Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor: diag(6700, DiagnosticCategory.Message, "Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700", "Check for class properties that are declared but not set in the constructor."), + Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments: diag(6701, DiagnosticCategory.Message, "Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701", "Disable emitting declarations that have '@internal' in their JSDoc comments."), + Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals: diag(6702, DiagnosticCategory.Message, "Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702", "Disable reporting of excess property errors during the creation of object literals."), + Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures: diag(6703, DiagnosticCategory.Message, "Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703", "Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."), + Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively: diag(6704, DiagnosticCategory.Message, "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704", "Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."), + Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations: diag(6705, DiagnosticCategory.Message, "Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705", "Set the JavaScript language version for emitted JavaScript and include compatible library declarations."), + Log_paths_used_during_the_moduleResolution_process: diag(6706, DiagnosticCategory.Message, "Log_paths_used_during_the_moduleResolution_process_6706", "Log paths used during the 'moduleResolution' process."), + Specify_the_path_to_tsbuildinfo_incremental_compilation_file: diag(6707, DiagnosticCategory.Message, "Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707", "Specify the path to .tsbuildinfo incremental compilation file."), + Specify_options_for_automatic_acquisition_of_declaration_files: diag(6709, DiagnosticCategory.Message, "Specify_options_for_automatic_acquisition_of_declaration_files_6709", "Specify options for automatic acquisition of declaration files."), + Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types: diag(6710, DiagnosticCategory.Message, "Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710", "Specify multiple folders that act like './node_modules/@types'."), + Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file: diag(6711, DiagnosticCategory.Message, "Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711", "Specify type package names to be included without being referenced in a source file."), + Emit_ECMAScript_standard_compliant_class_fields: diag(6712, DiagnosticCategory.Message, "Emit_ECMAScript_standard_compliant_class_fields_6712", "Emit ECMAScript-standard-compliant class fields."), + Enable_verbose_logging: diag(6713, DiagnosticCategory.Message, "Enable_verbose_logging_6713", "Enable verbose logging."), + Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality: diag(6714, DiagnosticCategory.Message, "Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714", "Specify how directories are watched on systems that lack recursive file-watching functionality."), + Specify_how_the_TypeScript_watch_mode_works: diag(6715, DiagnosticCategory.Message, "Specify_how_the_TypeScript_watch_mode_works_6715", "Specify how the TypeScript watch mode works."), + Require_undeclared_properties_from_index_signatures_to_use_element_accesses: diag(6717, DiagnosticCategory.Message, "Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717", "Require undeclared properties from index signatures to use element accesses."), + Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: diag(6718, DiagnosticCategory.Message, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", "Specify emit/checking behavior for imports that are only used for types."), + Ensure_that_each_file_can_have_declaration_emit_generated_without_type_information: diag(6719, DiagnosticCategory.Message, "Ensure_that_each_file_can_have_declaration_emit_generated_without_type_information_6719", "Ensure that each file can have declaration emit generated without type information"), + Default_catch_clause_variables_as_unknown_instead_of_any: diag(6803, DiagnosticCategory.Message, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."), + one_of_Colon: diag(6900, DiagnosticCategory.Message, "one_of_Colon_6900", "one of:"), + one_or_more_Colon: diag(6901, DiagnosticCategory.Message, "one_or_more_Colon_6901", "one or more:"), + type_Colon: diag(6902, DiagnosticCategory.Message, "type_Colon_6902", "type:"), + default_Colon: diag(6903, DiagnosticCategory.Message, "default_Colon_6903", "default:"), + module_system_or_esModuleInterop: diag(6904, DiagnosticCategory.Message, "module_system_or_esModuleInterop_6904", "module === \"system\" or esModuleInterop"), + false_unless_strict_is_set: diag(6905, DiagnosticCategory.Message, "false_unless_strict_is_set_6905", "`false`, unless `strict` is set"), + false_unless_composite_is_set: diag(6906, DiagnosticCategory.Message, "false_unless_composite_is_set_6906", "`false`, unless `composite` is set"), + node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified: diag(6907, DiagnosticCategory.Message, "node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907", "`[\"node_modules\", \"bower_components\", \"jspm_packages\"]`, plus the value of `outDir` if one is specified."), + if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk: diag(6908, DiagnosticCategory.Message, "if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908", "`[]` if `files` is specified, otherwise `[\"**/*\"]`"), + true_if_composite_false_otherwise: diag(6909, DiagnosticCategory.Message, "true_if_composite_false_otherwise_6909", "`true` if `composite`, `false` otherwise"), + module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node: diag(69010, DiagnosticCategory.Message, "module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010", "module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"), + Computed_from_the_list_of_input_files: diag(6911, DiagnosticCategory.Message, "Computed_from_the_list_of_input_files_6911", "Computed from the list of input files"), + Platform_specific: diag(6912, DiagnosticCategory.Message, "Platform_specific_6912", "Platform specific"), + You_can_learn_about_all_of_the_compiler_options_at_0: diag(6913, DiagnosticCategory.Message, "You_can_learn_about_all_of_the_compiler_options_at_0_6913", "You can learn about all of the compiler options at {0}"), + Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon: diag(6914, DiagnosticCategory.Message, "Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914", "Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"), + Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0: diag(6915, DiagnosticCategory.Message, "Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915", "Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"), + COMMON_COMMANDS: diag(6916, DiagnosticCategory.Message, "COMMON_COMMANDS_6916", "COMMON COMMANDS"), + ALL_COMPILER_OPTIONS: diag(6917, DiagnosticCategory.Message, "ALL_COMPILER_OPTIONS_6917", "ALL COMPILER OPTIONS"), + WATCH_OPTIONS: diag(6918, DiagnosticCategory.Message, "WATCH_OPTIONS_6918", "WATCH OPTIONS"), + BUILD_OPTIONS: diag(6919, DiagnosticCategory.Message, "BUILD_OPTIONS_6919", "BUILD OPTIONS"), + COMMON_COMPILER_OPTIONS: diag(6920, DiagnosticCategory.Message, "COMMON_COMPILER_OPTIONS_6920", "COMMON COMPILER OPTIONS"), + COMMAND_LINE_FLAGS: diag(6921, DiagnosticCategory.Message, "COMMAND_LINE_FLAGS_6921", "COMMAND LINE FLAGS"), + tsc_Colon_The_TypeScript_Compiler: diag(6922, DiagnosticCategory.Message, "tsc_Colon_The_TypeScript_Compiler_6922", "tsc: The TypeScript Compiler"), + Compiles_the_current_project_tsconfig_json_in_the_working_directory: diag(6923, DiagnosticCategory.Message, "Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923", "Compiles the current project (tsconfig.json in the working directory.)"), + Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options: diag(6924, DiagnosticCategory.Message, "Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924", "Ignoring tsconfig.json, compiles the specified files with default compiler options."), + Build_a_composite_project_in_the_working_directory: diag(6925, DiagnosticCategory.Message, "Build_a_composite_project_in_the_working_directory_6925", "Build a composite project in the working directory."), + Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory: diag(6926, DiagnosticCategory.Message, "Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926", "Creates a tsconfig.json with the recommended settings in the working directory."), + Compiles_the_TypeScript_project_located_at_the_specified_path: diag(6927, DiagnosticCategory.Message, "Compiles_the_TypeScript_project_located_at_the_specified_path_6927", "Compiles the TypeScript project located at the specified path."), + An_expanded_version_of_this_information_showing_all_possible_compiler_options: diag(6928, DiagnosticCategory.Message, "An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928", "An expanded version of this information, showing all possible compiler options"), + Compiles_the_current_project_with_additional_settings: diag(6929, DiagnosticCategory.Message, "Compiles_the_current_project_with_additional_settings_6929", "Compiles the current project, with additional settings."), + true_for_ES2022_and_above_including_ESNext: diag(6930, DiagnosticCategory.Message, "true_for_ES2022_and_above_including_ESNext_6930", "`true` for ES2022 and above, including ESNext."), + List_of_file_name_suffixes_to_search_when_resolving_a_module: diag(6931, DiagnosticCategory.Error, "List_of_file_name_suffixes_to_search_when_resolving_a_module_6931", "List of file name suffixes to search when resolving a module."), + Variable_0_implicitly_has_an_1_type: diag(7005, DiagnosticCategory.Error, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."), + Parameter_0_implicitly_has_an_1_type: diag(7006, DiagnosticCategory.Error, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."), + Member_0_implicitly_has_an_1_type: diag(7008, DiagnosticCategory.Error, "Member_0_implicitly_has_an_1_type_7008", "Member '{0}' implicitly has an '{1}' type."), + new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: diag(7009, DiagnosticCategory.Error, "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009", "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."), + _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: diag(7010, DiagnosticCategory.Error, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."), + Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7011, DiagnosticCategory.Error, "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."), + Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: diag(7013, DiagnosticCategory.Error, "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."), + Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7014, DiagnosticCategory.Error, "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014", "Function type, which lacks return-type annotation, implicitly has an '{0}' return type."), + Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: diag(7015, DiagnosticCategory.Error, "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", "Element implicitly has an 'any' type because index expression is not of type 'number'."), + Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type: diag(7016, DiagnosticCategory.Error, "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016", "Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."), + Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature: diag(7017, DiagnosticCategory.Error, "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017", "Element implicitly has an 'any' type because type '{0}' has no index signature."), + Object_literal_s_property_0_implicitly_has_an_1_type: diag(7018, DiagnosticCategory.Error, "Object_literal_s_property_0_implicitly_has_an_1_type_7018", "Object literal's property '{0}' implicitly has an '{1}' type."), + Rest_parameter_0_implicitly_has_an_any_type: diag(7019, DiagnosticCategory.Error, "Rest_parameter_0_implicitly_has_an_any_type_7019", "Rest parameter '{0}' implicitly has an 'any[]' type."), + Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: diag(7020, DiagnosticCategory.Error, "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020", "Call signature, which lacks return-type annotation, implicitly has an 'any' return type."), + _0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: diag(7022, DiagnosticCategory.Error, "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022", "'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."), + _0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: diag(7023, DiagnosticCategory.Error, "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023", "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."), + Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: diag(7024, DiagnosticCategory.Error, "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024", "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."), + Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation: diag(7025, DiagnosticCategory.Error, "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025", "Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation."), + JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: diag(7026, DiagnosticCategory.Error, "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."), + Unreachable_code_detected: diag(7027, DiagnosticCategory.Error, "Unreachable_code_detected_7027", "Unreachable code detected.", /*reportsUnnecessary*/ true), + Unused_label: diag(7028, DiagnosticCategory.Error, "Unused_label_7028", "Unused label.", /*reportsUnnecessary*/ true), + Fallthrough_case_in_switch: diag(7029, DiagnosticCategory.Error, "Fallthrough_case_in_switch_7029", "Fallthrough case in switch."), + Not_all_code_paths_return_a_value: diag(7030, DiagnosticCategory.Error, "Not_all_code_paths_return_a_value_7030", "Not all code paths return a value."), + Binding_element_0_implicitly_has_an_1_type: diag(7031, DiagnosticCategory.Error, "Binding_element_0_implicitly_has_an_1_type_7031", "Binding element '{0}' implicitly has an '{1}' type."), + Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: diag(7032, DiagnosticCategory.Error, "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."), + Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: diag(7033, DiagnosticCategory.Error, "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."), + Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined: diag(7034, DiagnosticCategory.Error, "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034", "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."), + Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0: diag(7035, DiagnosticCategory.Error, "Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035", "Try `npm i --save-dev @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"), + Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0: diag(7036, DiagnosticCategory.Error, "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036", "Dynamic import's specifier must be of type 'string', but here has type '{0}'."), + Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports: diag(7037, DiagnosticCategory.Message, "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037", "Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."), + Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead: diag(7038, DiagnosticCategory.Message, "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038", "Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."), + Mapped_object_type_implicitly_has_an_any_template_type: diag(7039, DiagnosticCategory.Error, "Mapped_object_type_implicitly_has_an_any_template_type_7039", "Mapped object type implicitly has an 'any' template type."), + If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1: diag(7040, DiagnosticCategory.Error, "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040", "If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}'"), + The_containing_arrow_function_captures_the_global_value_of_this: diag(7041, DiagnosticCategory.Error, "The_containing_arrow_function_captures_the_global_value_of_this_7041", "The containing arrow function captures the global value of 'this'."), + Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used: diag(7042, DiagnosticCategory.Error, "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042", "Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."), + Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: diag(7043, DiagnosticCategory.Suggestion, "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043", "Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), + Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: diag(7044, DiagnosticCategory.Suggestion, "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044", "Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), + Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: diag(7045, DiagnosticCategory.Suggestion, "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045", "Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), + Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage: diag(7046, DiagnosticCategory.Suggestion, "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046", "Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."), + Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage: diag(7047, DiagnosticCategory.Suggestion, "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047", "Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."), + Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage: diag(7048, DiagnosticCategory.Suggestion, "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048", "Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."), + Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage: diag(7049, DiagnosticCategory.Suggestion, "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049", "Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."), + _0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage: diag(7050, DiagnosticCategory.Suggestion, "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050", "'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."), + Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1: diag(7051, DiagnosticCategory.Error, "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051", "Parameter has a name but no type. Did you mean '{0}: {1}'?"), + Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1: diag(7052, DiagnosticCategory.Error, "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052", "Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?"), + Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1: diag(7053, DiagnosticCategory.Error, "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053", "Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."), + No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1: diag(7054, DiagnosticCategory.Error, "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054", "No index signature with a parameter of type '{0}' was found on type '{1}'."), + _0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type: diag(7055, DiagnosticCategory.Error, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055", "'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."), + The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed: diag(7056, DiagnosticCategory.Error, "The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056", "The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed."), + yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation: diag(7057, DiagnosticCategory.Error, "yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057", "'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."), + If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1: diag(7058, DiagnosticCategory.Error, "If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058", "If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"), + This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead: diag(7059, DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059", "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."), + This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint: diag(7060, DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060", "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."), + A_mapped_type_may_not_declare_properties_or_methods: diag(7061, DiagnosticCategory.Error, "A_mapped_type_may_not_declare_properties_or_methods_7061", "A mapped type may not declare properties or methods."), + You_cannot_rename_this_element: diag(8000, DiagnosticCategory.Error, "You_cannot_rename_this_element_8000", "You cannot rename this element."), + You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: diag(8001, DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", "You cannot rename elements that are defined in the standard TypeScript library."), + import_can_only_be_used_in_TypeScript_files: diag(8002, DiagnosticCategory.Error, "import_can_only_be_used_in_TypeScript_files_8002", "'import ... =' can only be used in TypeScript files."), + export_can_only_be_used_in_TypeScript_files: diag(8003, DiagnosticCategory.Error, "export_can_only_be_used_in_TypeScript_files_8003", "'export =' can only be used in TypeScript files."), + Type_parameter_declarations_can_only_be_used_in_TypeScript_files: diag(8004, DiagnosticCategory.Error, "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004", "Type parameter declarations can only be used in TypeScript files."), + implements_clauses_can_only_be_used_in_TypeScript_files: diag(8005, DiagnosticCategory.Error, "implements_clauses_can_only_be_used_in_TypeScript_files_8005", "'implements' clauses can only be used in TypeScript files."), + _0_declarations_can_only_be_used_in_TypeScript_files: diag(8006, DiagnosticCategory.Error, "_0_declarations_can_only_be_used_in_TypeScript_files_8006", "'{0}' declarations can only be used in TypeScript files."), + Type_aliases_can_only_be_used_in_TypeScript_files: diag(8008, DiagnosticCategory.Error, "Type_aliases_can_only_be_used_in_TypeScript_files_8008", "Type aliases can only be used in TypeScript files."), + The_0_modifier_can_only_be_used_in_TypeScript_files: diag(8009, DiagnosticCategory.Error, "The_0_modifier_can_only_be_used_in_TypeScript_files_8009", "The '{0}' modifier can only be used in TypeScript files."), + Type_annotations_can_only_be_used_in_TypeScript_files: diag(8010, DiagnosticCategory.Error, "Type_annotations_can_only_be_used_in_TypeScript_files_8010", "Type annotations can only be used in TypeScript files."), + Type_arguments_can_only_be_used_in_TypeScript_files: diag(8011, DiagnosticCategory.Error, "Type_arguments_can_only_be_used_in_TypeScript_files_8011", "Type arguments can only be used in TypeScript files."), + Parameter_modifiers_can_only_be_used_in_TypeScript_files: diag(8012, DiagnosticCategory.Error, "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012", "Parameter modifiers can only be used in TypeScript files."), + Non_null_assertions_can_only_be_used_in_TypeScript_files: diag(8013, DiagnosticCategory.Error, "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013", "Non-null assertions can only be used in TypeScript files."), + Type_assertion_expressions_can_only_be_used_in_TypeScript_files: diag(8016, DiagnosticCategory.Error, "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016", "Type assertion expressions can only be used in TypeScript files."), + Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0: diag(8017, DiagnosticCategory.Error, "Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017", "Octal literal types must use ES2015 syntax. Use the syntax '{0}'."), + Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0: diag(8018, DiagnosticCategory.Error, "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018", "Octal literals are not allowed in enums members initializer. Use the syntax '{0}'."), + Report_errors_in_js_files: diag(8019, DiagnosticCategory.Message, "Report_errors_in_js_files_8019", "Report errors in .js files."), + JSDoc_types_can_only_be_used_inside_documentation_comments: diag(8020, DiagnosticCategory.Error, "JSDoc_types_can_only_be_used_inside_documentation_comments_8020", "JSDoc types can only be used inside documentation comments."), + JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags: diag(8021, DiagnosticCategory.Error, "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021", "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."), + JSDoc_0_is_not_attached_to_a_class: diag(8022, DiagnosticCategory.Error, "JSDoc_0_is_not_attached_to_a_class_8022", "JSDoc '@{0}' is not attached to a class."), + JSDoc_0_1_does_not_match_the_extends_2_clause: diag(8023, DiagnosticCategory.Error, "JSDoc_0_1_does_not_match_the_extends_2_clause_8023", "JSDoc '@{0} {1}' does not match the 'extends {2}' clause."), + JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name: diag(8024, DiagnosticCategory.Error, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name."), + Class_declarations_cannot_have_more_than_one_augments_or_extends_tag: diag(8025, DiagnosticCategory.Error, "Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025", "Class declarations cannot have more than one '@augments' or '@extends' tag."), + Expected_0_type_arguments_provide_these_with_an_extends_tag: diag(8026, DiagnosticCategory.Error, "Expected_0_type_arguments_provide_these_with_an_extends_tag_8026", "Expected {0} type arguments; provide these with an '@extends' tag."), + Expected_0_1_type_arguments_provide_these_with_an_extends_tag: diag(8027, DiagnosticCategory.Error, "Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027", "Expected {0}-{1} type arguments; provide these with an '@extends' tag."), + JSDoc_may_only_appear_in_the_last_parameter_of_a_signature: diag(8028, DiagnosticCategory.Error, "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028", "JSDoc '...' may only appear in the last parameter of a signature."), + JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type: diag(8029, DiagnosticCategory.Error, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."), + The_type_of_a_function_declaration_must_match_the_function_s_signature: diag(8030, DiagnosticCategory.Error, "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030", "The type of a function declaration must match the function's signature."), + You_cannot_rename_a_module_via_a_global_import: diag(8031, DiagnosticCategory.Error, "You_cannot_rename_a_module_via_a_global_import_8031", "You cannot rename a module via a global import."), + Qualified_name_0_is_not_allowed_without_a_leading_param_object_1: diag(8032, DiagnosticCategory.Error, "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032", "Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."), + A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags: diag(8033, DiagnosticCategory.Error, "A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033", "A JSDoc '@typedef' comment may not contain multiple '@type' tags."), + The_tag_was_first_specified_here: diag(8034, DiagnosticCategory.Error, "The_tag_was_first_specified_here_8034", "The tag was first specified here."), + You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder: diag(8035, DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035", "You cannot rename elements that are defined in a 'node_modules' folder."), + You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder: diag(8036, DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036", "You cannot rename elements that are defined in another 'node_modules' folder."), + Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files: diag(8037, DiagnosticCategory.Error, "Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037", "Type satisfaction expressions can only be used in TypeScript files."), + Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9005, DiagnosticCategory.Error, "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005", "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."), + Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9006, DiagnosticCategory.Error, "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006", "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."), + Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9007, DiagnosticCategory.Error, "Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_decl_9007", "Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit."), + JSX_attributes_must_only_be_assigned_a_non_empty_expression: diag(17000, DiagnosticCategory.Error, "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", "JSX attributes must only be assigned a non-empty 'expression'."), + JSX_elements_cannot_have_multiple_attributes_with_the_same_name: diag(17001, DiagnosticCategory.Error, "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001", "JSX elements cannot have multiple attributes with the same name."), + Expected_corresponding_JSX_closing_tag_for_0: diag(17002, DiagnosticCategory.Error, "Expected_corresponding_JSX_closing_tag_for_0_17002", "Expected corresponding JSX closing tag for '{0}'."), + Cannot_use_JSX_unless_the_jsx_flag_is_provided: diag(17004, DiagnosticCategory.Error, "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004", "Cannot use JSX unless the '--jsx' flag is provided."), + A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: diag(17005, DiagnosticCategory.Error, "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", "A constructor cannot contain a 'super' call when its class extends 'null'."), + An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: diag(17006, DiagnosticCategory.Error, "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006", "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."), + A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: diag(17007, DiagnosticCategory.Error, "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007", "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."), + JSX_element_0_has_no_corresponding_closing_tag: diag(17008, DiagnosticCategory.Error, "JSX_element_0_has_no_corresponding_closing_tag_17008", "JSX element '{0}' has no corresponding closing tag."), + super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class: diag(17009, DiagnosticCategory.Error, "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", "'super' must be called before accessing 'this' in the constructor of a derived class."), + Unknown_type_acquisition_option_0: diag(17010, DiagnosticCategory.Error, "Unknown_type_acquisition_option_0_17010", "Unknown type acquisition option '{0}'."), + super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class: diag(17011, DiagnosticCategory.Error, "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011", "'super' must be called before accessing a property of 'super' in the constructor of a derived class."), + _0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2: diag(17012, DiagnosticCategory.Error, "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012", "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"), + Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor: diag(17013, DiagnosticCategory.Error, "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013", "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."), + JSX_fragment_has_no_corresponding_closing_tag: diag(17014, DiagnosticCategory.Error, "JSX_fragment_has_no_corresponding_closing_tag_17014", "JSX fragment has no corresponding closing tag."), + Expected_corresponding_closing_tag_for_JSX_fragment: diag(17015, DiagnosticCategory.Error, "Expected_corresponding_closing_tag_for_JSX_fragment_17015", "Expected corresponding closing tag for JSX fragment."), + The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option: diag(17016, DiagnosticCategory.Error, "The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_com_17016", "The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option."), + An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments: diag(17017, DiagnosticCategory.Error, "An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017", "An @jsxFrag pragma is required when using an @jsx pragma with JSX fragments."), + Unknown_type_acquisition_option_0_Did_you_mean_1: diag(17018, DiagnosticCategory.Error, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"), + Circularity_detected_while_resolving_configuration_Colon_0: diag(18000, DiagnosticCategory.Error, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"), + The_files_list_in_config_file_0_is_empty: diag(18002, DiagnosticCategory.Error, "The_files_list_in_config_file_0_is_empty_18002", "The 'files' list in config file '{0}' is empty."), + No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: diag(18003, DiagnosticCategory.Error, "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."), + File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module: diag(80001, DiagnosticCategory.Suggestion, "File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001", "File is a CommonJS module; it may be converted to an ES module."), + This_constructor_function_may_be_converted_to_a_class_declaration: diag(80002, DiagnosticCategory.Suggestion, "This_constructor_function_may_be_converted_to_a_class_declaration_80002", "This constructor function may be converted to a class declaration."), + Import_may_be_converted_to_a_default_import: diag(80003, DiagnosticCategory.Suggestion, "Import_may_be_converted_to_a_default_import_80003", "Import may be converted to a default import."), + JSDoc_types_may_be_moved_to_TypeScript_types: diag(80004, DiagnosticCategory.Suggestion, "JSDoc_types_may_be_moved_to_TypeScript_types_80004", "JSDoc types may be moved to TypeScript types."), + require_call_may_be_converted_to_an_import: diag(80005, DiagnosticCategory.Suggestion, "require_call_may_be_converted_to_an_import_80005", "'require' call may be converted to an import."), + This_may_be_converted_to_an_async_function: diag(80006, DiagnosticCategory.Suggestion, "This_may_be_converted_to_an_async_function_80006", "This may be converted to an async function."), + await_has_no_effect_on_the_type_of_this_expression: diag(80007, DiagnosticCategory.Suggestion, "await_has_no_effect_on_the_type_of_this_expression_80007", "'await' has no effect on the type of this expression."), + Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers: diag(80008, DiagnosticCategory.Suggestion, "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008", "Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers."), + Add_missing_super_call: diag(90001, DiagnosticCategory.Message, "Add_missing_super_call_90001", "Add missing 'super()' call"), + Make_super_call_the_first_statement_in_the_constructor: diag(90002, DiagnosticCategory.Message, "Make_super_call_the_first_statement_in_the_constructor_90002", "Make 'super()' call the first statement in the constructor"), + Change_extends_to_implements: diag(90003, DiagnosticCategory.Message, "Change_extends_to_implements_90003", "Change 'extends' to 'implements'"), + Remove_unused_declaration_for_Colon_0: diag(90004, DiagnosticCategory.Message, "Remove_unused_declaration_for_Colon_0_90004", "Remove unused declaration for: '{0}'"), + Remove_import_from_0: diag(90005, DiagnosticCategory.Message, "Remove_import_from_0_90005", "Remove import from '{0}'"), + Implement_interface_0: diag(90006, DiagnosticCategory.Message, "Implement_interface_0_90006", "Implement interface '{0}'"), + Implement_inherited_abstract_class: diag(90007, DiagnosticCategory.Message, "Implement_inherited_abstract_class_90007", "Implement inherited abstract class"), + Add_0_to_unresolved_variable: diag(90008, DiagnosticCategory.Message, "Add_0_to_unresolved_variable_90008", "Add '{0}.' to unresolved variable"), + Remove_variable_statement: diag(90010, DiagnosticCategory.Message, "Remove_variable_statement_90010", "Remove variable statement"), + Remove_template_tag: diag(90011, DiagnosticCategory.Message, "Remove_template_tag_90011", "Remove template tag"), + Remove_type_parameters: diag(90012, DiagnosticCategory.Message, "Remove_type_parameters_90012", "Remove type parameters"), + Import_0_from_1: diag(90013, DiagnosticCategory.Message, "Import_0_from_1_90013", "Import '{0}' from \"{1}\""), + Change_0_to_1: diag(90014, DiagnosticCategory.Message, "Change_0_to_1_90014", "Change '{0}' to '{1}'"), + Declare_property_0: diag(90016, DiagnosticCategory.Message, "Declare_property_0_90016", "Declare property '{0}'"), + Add_index_signature_for_property_0: diag(90017, DiagnosticCategory.Message, "Add_index_signature_for_property_0_90017", "Add index signature for property '{0}'"), + Disable_checking_for_this_file: diag(90018, DiagnosticCategory.Message, "Disable_checking_for_this_file_90018", "Disable checking for this file"), + Ignore_this_error_message: diag(90019, DiagnosticCategory.Message, "Ignore_this_error_message_90019", "Ignore this error message"), + Initialize_property_0_in_the_constructor: diag(90020, DiagnosticCategory.Message, "Initialize_property_0_in_the_constructor_90020", "Initialize property '{0}' in the constructor"), + Initialize_static_property_0: diag(90021, DiagnosticCategory.Message, "Initialize_static_property_0_90021", "Initialize static property '{0}'"), + Change_spelling_to_0: diag(90022, DiagnosticCategory.Message, "Change_spelling_to_0_90022", "Change spelling to '{0}'"), + Declare_method_0: diag(90023, DiagnosticCategory.Message, "Declare_method_0_90023", "Declare method '{0}'"), + Declare_static_method_0: diag(90024, DiagnosticCategory.Message, "Declare_static_method_0_90024", "Declare static method '{0}'"), + Prefix_0_with_an_underscore: diag(90025, DiagnosticCategory.Message, "Prefix_0_with_an_underscore_90025", "Prefix '{0}' with an underscore"), + Rewrite_as_the_indexed_access_type_0: diag(90026, DiagnosticCategory.Message, "Rewrite_as_the_indexed_access_type_0_90026", "Rewrite as the indexed access type '{0}'"), + Declare_static_property_0: diag(90027, DiagnosticCategory.Message, "Declare_static_property_0_90027", "Declare static property '{0}'"), + Call_decorator_expression: diag(90028, DiagnosticCategory.Message, "Call_decorator_expression_90028", "Call decorator expression"), + Add_async_modifier_to_containing_function: diag(90029, DiagnosticCategory.Message, "Add_async_modifier_to_containing_function_90029", "Add async modifier to containing function"), + Replace_infer_0_with_unknown: diag(90030, DiagnosticCategory.Message, "Replace_infer_0_with_unknown_90030", "Replace 'infer {0}' with 'unknown'"), + Replace_all_unused_infer_with_unknown: diag(90031, DiagnosticCategory.Message, "Replace_all_unused_infer_with_unknown_90031", "Replace all unused 'infer' with 'unknown'"), + Add_parameter_name: diag(90034, DiagnosticCategory.Message, "Add_parameter_name_90034", "Add parameter name"), + Declare_private_property_0: diag(90035, DiagnosticCategory.Message, "Declare_private_property_0_90035", "Declare private property '{0}'"), + Replace_0_with_Promise_1: diag(90036, DiagnosticCategory.Message, "Replace_0_with_Promise_1_90036", "Replace '{0}' with 'Promise<{1}>'"), + Fix_all_incorrect_return_type_of_an_async_functions: diag(90037, DiagnosticCategory.Message, "Fix_all_incorrect_return_type_of_an_async_functions_90037", "Fix all incorrect return type of an async functions"), + Declare_private_method_0: diag(90038, DiagnosticCategory.Message, "Declare_private_method_0_90038", "Declare private method '{0}'"), + Remove_unused_destructuring_declaration: diag(90039, DiagnosticCategory.Message, "Remove_unused_destructuring_declaration_90039", "Remove unused destructuring declaration"), + Remove_unused_declarations_for_Colon_0: diag(90041, DiagnosticCategory.Message, "Remove_unused_declarations_for_Colon_0_90041", "Remove unused declarations for: '{0}'"), + Declare_a_private_field_named_0: diag(90053, DiagnosticCategory.Message, "Declare_a_private_field_named_0_90053", "Declare a private field named '{0}'."), + Includes_imports_of_types_referenced_by_0: diag(90054, DiagnosticCategory.Message, "Includes_imports_of_types_referenced_by_0_90054", "Includes imports of types referenced by '{0}'"), + Remove_type_from_import_declaration_from_0: diag(90055, DiagnosticCategory.Message, "Remove_type_from_import_declaration_from_0_90055", "Remove 'type' from import declaration from \"{0}\""), + Remove_type_from_import_of_0_from_1: diag(90056, DiagnosticCategory.Message, "Remove_type_from_import_of_0_from_1_90056", "Remove 'type' from import of '{0}' from \"{1}\""), + Add_import_from_0: diag(90057, DiagnosticCategory.Message, "Add_import_from_0_90057", "Add import from \"{0}\""), + Update_import_from_0: diag(90058, DiagnosticCategory.Message, "Update_import_from_0_90058", "Update import from \"{0}\""), + Export_0_from_module_1: diag(90059, DiagnosticCategory.Message, "Export_0_from_module_1_90059", "Export '{0}' from module '{1}'"), + Export_all_referenced_locals: diag(90060, DiagnosticCategory.Message, "Export_all_referenced_locals_90060", "Export all referenced locals"), + Convert_function_to_an_ES2015_class: diag(95001, DiagnosticCategory.Message, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"), + Convert_0_to_1_in_0: diag(95003, DiagnosticCategory.Message, "Convert_0_to_1_in_0_95003", "Convert '{0}' to '{1} in {0}'"), + Extract_to_0_in_1: diag(95004, DiagnosticCategory.Message, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"), + Extract_function: diag(95005, DiagnosticCategory.Message, "Extract_function_95005", "Extract function"), + Extract_constant: diag(95006, DiagnosticCategory.Message, "Extract_constant_95006", "Extract constant"), + Extract_to_0_in_enclosing_scope: diag(95007, DiagnosticCategory.Message, "Extract_to_0_in_enclosing_scope_95007", "Extract to {0} in enclosing scope"), + Extract_to_0_in_1_scope: diag(95008, DiagnosticCategory.Message, "Extract_to_0_in_1_scope_95008", "Extract to {0} in {1} scope"), + Annotate_with_type_from_JSDoc: diag(95009, DiagnosticCategory.Message, "Annotate_with_type_from_JSDoc_95009", "Annotate with type from JSDoc"), + Infer_type_of_0_from_usage: diag(95011, DiagnosticCategory.Message, "Infer_type_of_0_from_usage_95011", "Infer type of '{0}' from usage"), + Infer_parameter_types_from_usage: diag(95012, DiagnosticCategory.Message, "Infer_parameter_types_from_usage_95012", "Infer parameter types from usage"), + Convert_to_default_import: diag(95013, DiagnosticCategory.Message, "Convert_to_default_import_95013", "Convert to default import"), + Install_0: diag(95014, DiagnosticCategory.Message, "Install_0_95014", "Install '{0}'"), + Replace_import_with_0: diag(95015, DiagnosticCategory.Message, "Replace_import_with_0_95015", "Replace import with '{0}'."), + Use_synthetic_default_member: diag(95016, DiagnosticCategory.Message, "Use_synthetic_default_member_95016", "Use synthetic 'default' member."), + Convert_to_ES_module: diag(95017, DiagnosticCategory.Message, "Convert_to_ES_module_95017", "Convert to ES module"), + Add_undefined_type_to_property_0: diag(95018, DiagnosticCategory.Message, "Add_undefined_type_to_property_0_95018", "Add 'undefined' type to property '{0}'"), + Add_initializer_to_property_0: diag(95019, DiagnosticCategory.Message, "Add_initializer_to_property_0_95019", "Add initializer to property '{0}'"), + Add_definite_assignment_assertion_to_property_0: diag(95020, DiagnosticCategory.Message, "Add_definite_assignment_assertion_to_property_0_95020", "Add definite assignment assertion to property '{0}'"), + Convert_all_type_literals_to_mapped_type: diag(95021, DiagnosticCategory.Message, "Convert_all_type_literals_to_mapped_type_95021", "Convert all type literals to mapped type"), + Add_all_missing_members: diag(95022, DiagnosticCategory.Message, "Add_all_missing_members_95022", "Add all missing members"), + Infer_all_types_from_usage: diag(95023, DiagnosticCategory.Message, "Infer_all_types_from_usage_95023", "Infer all types from usage"), + Delete_all_unused_declarations: diag(95024, DiagnosticCategory.Message, "Delete_all_unused_declarations_95024", "Delete all unused declarations"), + Prefix_all_unused_declarations_with_where_possible: diag(95025, DiagnosticCategory.Message, "Prefix_all_unused_declarations_with_where_possible_95025", "Prefix all unused declarations with '_' where possible"), + Fix_all_detected_spelling_errors: diag(95026, DiagnosticCategory.Message, "Fix_all_detected_spelling_errors_95026", "Fix all detected spelling errors"), + Add_initializers_to_all_uninitialized_properties: diag(95027, DiagnosticCategory.Message, "Add_initializers_to_all_uninitialized_properties_95027", "Add initializers to all uninitialized properties"), + Add_definite_assignment_assertions_to_all_uninitialized_properties: diag(95028, DiagnosticCategory.Message, "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028", "Add definite assignment assertions to all uninitialized properties"), + Add_undefined_type_to_all_uninitialized_properties: diag(95029, DiagnosticCategory.Message, "Add_undefined_type_to_all_uninitialized_properties_95029", "Add undefined type to all uninitialized properties"), + Change_all_jsdoc_style_types_to_TypeScript: diag(95030, DiagnosticCategory.Message, "Change_all_jsdoc_style_types_to_TypeScript_95030", "Change all jsdoc-style types to TypeScript"), + Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types: diag(95031, DiagnosticCategory.Message, "Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031", "Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"), + Implement_all_unimplemented_interfaces: diag(95032, DiagnosticCategory.Message, "Implement_all_unimplemented_interfaces_95032", "Implement all unimplemented interfaces"), + Install_all_missing_types_packages: diag(95033, DiagnosticCategory.Message, "Install_all_missing_types_packages_95033", "Install all missing types packages"), + Rewrite_all_as_indexed_access_types: diag(95034, DiagnosticCategory.Message, "Rewrite_all_as_indexed_access_types_95034", "Rewrite all as indexed access types"), + Convert_all_to_default_imports: diag(95035, DiagnosticCategory.Message, "Convert_all_to_default_imports_95035", "Convert all to default imports"), + Make_all_super_calls_the_first_statement_in_their_constructor: diag(95036, DiagnosticCategory.Message, "Make_all_super_calls_the_first_statement_in_their_constructor_95036", "Make all 'super()' calls the first statement in their constructor"), + Add_qualifier_to_all_unresolved_variables_matching_a_member_name: diag(95037, DiagnosticCategory.Message, "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037", "Add qualifier to all unresolved variables matching a member name"), + Change_all_extended_interfaces_to_implements: diag(95038, DiagnosticCategory.Message, "Change_all_extended_interfaces_to_implements_95038", "Change all extended interfaces to 'implements'"), + Add_all_missing_super_calls: diag(95039, DiagnosticCategory.Message, "Add_all_missing_super_calls_95039", "Add all missing super calls"), + Implement_all_inherited_abstract_classes: diag(95040, DiagnosticCategory.Message, "Implement_all_inherited_abstract_classes_95040", "Implement all inherited abstract classes"), + Add_all_missing_async_modifiers: diag(95041, DiagnosticCategory.Message, "Add_all_missing_async_modifiers_95041", "Add all missing 'async' modifiers"), + Add_ts_ignore_to_all_error_messages: diag(95042, DiagnosticCategory.Message, "Add_ts_ignore_to_all_error_messages_95042", "Add '@ts-ignore' to all error messages"), + Annotate_everything_with_types_from_JSDoc: diag(95043, DiagnosticCategory.Message, "Annotate_everything_with_types_from_JSDoc_95043", "Annotate everything with types from JSDoc"), + Add_to_all_uncalled_decorators: diag(95044, DiagnosticCategory.Message, "Add_to_all_uncalled_decorators_95044", "Add '()' to all uncalled decorators"), + Convert_all_constructor_functions_to_classes: diag(95045, DiagnosticCategory.Message, "Convert_all_constructor_functions_to_classes_95045", "Convert all constructor functions to classes"), + Generate_get_and_set_accessors: diag(95046, DiagnosticCategory.Message, "Generate_get_and_set_accessors_95046", "Generate 'get' and 'set' accessors"), + Convert_require_to_import: diag(95047, DiagnosticCategory.Message, "Convert_require_to_import_95047", "Convert 'require' to 'import'"), + Convert_all_require_to_import: diag(95048, DiagnosticCategory.Message, "Convert_all_require_to_import_95048", "Convert all 'require' to 'import'"), + Move_to_a_new_file: diag(95049, DiagnosticCategory.Message, "Move_to_a_new_file_95049", "Move to a new file"), + Remove_unreachable_code: diag(95050, DiagnosticCategory.Message, "Remove_unreachable_code_95050", "Remove unreachable code"), + Remove_all_unreachable_code: diag(95051, DiagnosticCategory.Message, "Remove_all_unreachable_code_95051", "Remove all unreachable code"), + Add_missing_typeof: diag(95052, DiagnosticCategory.Message, "Add_missing_typeof_95052", "Add missing 'typeof'"), + Remove_unused_label: diag(95053, DiagnosticCategory.Message, "Remove_unused_label_95053", "Remove unused label"), + Remove_all_unused_labels: diag(95054, DiagnosticCategory.Message, "Remove_all_unused_labels_95054", "Remove all unused labels"), + Convert_0_to_mapped_object_type: diag(95055, DiagnosticCategory.Message, "Convert_0_to_mapped_object_type_95055", "Convert '{0}' to mapped object type"), + Convert_namespace_import_to_named_imports: diag(95056, DiagnosticCategory.Message, "Convert_namespace_import_to_named_imports_95056", "Convert namespace import to named imports"), + Convert_named_imports_to_namespace_import: diag(95057, DiagnosticCategory.Message, "Convert_named_imports_to_namespace_import_95057", "Convert named imports to namespace import"), + Add_or_remove_braces_in_an_arrow_function: diag(95058, DiagnosticCategory.Message, "Add_or_remove_braces_in_an_arrow_function_95058", "Add or remove braces in an arrow function"), + Add_braces_to_arrow_function: diag(95059, DiagnosticCategory.Message, "Add_braces_to_arrow_function_95059", "Add braces to arrow function"), + Remove_braces_from_arrow_function: diag(95060, DiagnosticCategory.Message, "Remove_braces_from_arrow_function_95060", "Remove braces from arrow function"), + Convert_default_export_to_named_export: diag(95061, DiagnosticCategory.Message, "Convert_default_export_to_named_export_95061", "Convert default export to named export"), + Convert_named_export_to_default_export: diag(95062, DiagnosticCategory.Message, "Convert_named_export_to_default_export_95062", "Convert named export to default export"), + Add_missing_enum_member_0: diag(95063, DiagnosticCategory.Message, "Add_missing_enum_member_0_95063", "Add missing enum member '{0}'"), + Add_all_missing_imports: diag(95064, DiagnosticCategory.Message, "Add_all_missing_imports_95064", "Add all missing imports"), + Convert_to_async_function: diag(95065, DiagnosticCategory.Message, "Convert_to_async_function_95065", "Convert to async function"), + Convert_all_to_async_functions: diag(95066, DiagnosticCategory.Message, "Convert_all_to_async_functions_95066", "Convert all to async functions"), + Add_missing_call_parentheses: diag(95067, DiagnosticCategory.Message, "Add_missing_call_parentheses_95067", "Add missing call parentheses"), + Add_all_missing_call_parentheses: diag(95068, DiagnosticCategory.Message, "Add_all_missing_call_parentheses_95068", "Add all missing call parentheses"), + Add_unknown_conversion_for_non_overlapping_types: diag(95069, DiagnosticCategory.Message, "Add_unknown_conversion_for_non_overlapping_types_95069", "Add 'unknown' conversion for non-overlapping types"), + Add_unknown_to_all_conversions_of_non_overlapping_types: diag(95070, DiagnosticCategory.Message, "Add_unknown_to_all_conversions_of_non_overlapping_types_95070", "Add 'unknown' to all conversions of non-overlapping types"), + Add_missing_new_operator_to_call: diag(95071, DiagnosticCategory.Message, "Add_missing_new_operator_to_call_95071", "Add missing 'new' operator to call"), + Add_missing_new_operator_to_all_calls: diag(95072, DiagnosticCategory.Message, "Add_missing_new_operator_to_all_calls_95072", "Add missing 'new' operator to all calls"), + Add_names_to_all_parameters_without_names: diag(95073, DiagnosticCategory.Message, "Add_names_to_all_parameters_without_names_95073", "Add names to all parameters without names"), + Enable_the_experimentalDecorators_option_in_your_configuration_file: diag(95074, DiagnosticCategory.Message, "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074", "Enable the 'experimentalDecorators' option in your configuration file"), + Convert_parameters_to_destructured_object: diag(95075, DiagnosticCategory.Message, "Convert_parameters_to_destructured_object_95075", "Convert parameters to destructured object"), + Extract_type: diag(95077, DiagnosticCategory.Message, "Extract_type_95077", "Extract type"), + Extract_to_type_alias: diag(95078, DiagnosticCategory.Message, "Extract_to_type_alias_95078", "Extract to type alias"), + Extract_to_typedef: diag(95079, DiagnosticCategory.Message, "Extract_to_typedef_95079", "Extract to typedef"), + Infer_this_type_of_0_from_usage: diag(95080, DiagnosticCategory.Message, "Infer_this_type_of_0_from_usage_95080", "Infer 'this' type of '{0}' from usage"), + Add_const_to_unresolved_variable: diag(95081, DiagnosticCategory.Message, "Add_const_to_unresolved_variable_95081", "Add 'const' to unresolved variable"), + Add_const_to_all_unresolved_variables: diag(95082, DiagnosticCategory.Message, "Add_const_to_all_unresolved_variables_95082", "Add 'const' to all unresolved variables"), + Add_await: diag(95083, DiagnosticCategory.Message, "Add_await_95083", "Add 'await'"), + Add_await_to_initializer_for_0: diag(95084, DiagnosticCategory.Message, "Add_await_to_initializer_for_0_95084", "Add 'await' to initializer for '{0}'"), + Fix_all_expressions_possibly_missing_await: diag(95085, DiagnosticCategory.Message, "Fix_all_expressions_possibly_missing_await_95085", "Fix all expressions possibly missing 'await'"), + Remove_unnecessary_await: diag(95086, DiagnosticCategory.Message, "Remove_unnecessary_await_95086", "Remove unnecessary 'await'"), + Remove_all_unnecessary_uses_of_await: diag(95087, DiagnosticCategory.Message, "Remove_all_unnecessary_uses_of_await_95087", "Remove all unnecessary uses of 'await'"), + Enable_the_jsx_flag_in_your_configuration_file: diag(95088, DiagnosticCategory.Message, "Enable_the_jsx_flag_in_your_configuration_file_95088", "Enable the '--jsx' flag in your configuration file"), + Add_await_to_initializers: diag(95089, DiagnosticCategory.Message, "Add_await_to_initializers_95089", "Add 'await' to initializers"), + Extract_to_interface: diag(95090, DiagnosticCategory.Message, "Extract_to_interface_95090", "Extract to interface"), + Convert_to_a_bigint_numeric_literal: diag(95091, DiagnosticCategory.Message, "Convert_to_a_bigint_numeric_literal_95091", "Convert to a bigint numeric literal"), + Convert_all_to_bigint_numeric_literals: diag(95092, DiagnosticCategory.Message, "Convert_all_to_bigint_numeric_literals_95092", "Convert all to bigint numeric literals"), + Convert_const_to_let: diag(95093, DiagnosticCategory.Message, "Convert_const_to_let_95093", "Convert 'const' to 'let'"), + Prefix_with_declare: diag(95094, DiagnosticCategory.Message, "Prefix_with_declare_95094", "Prefix with 'declare'"), + Prefix_all_incorrect_property_declarations_with_declare: diag(95095, DiagnosticCategory.Message, "Prefix_all_incorrect_property_declarations_with_declare_95095", "Prefix all incorrect property declarations with 'declare'"), + Convert_to_template_string: diag(95096, DiagnosticCategory.Message, "Convert_to_template_string_95096", "Convert to template string"), + Add_export_to_make_this_file_into_a_module: diag(95097, DiagnosticCategory.Message, "Add_export_to_make_this_file_into_a_module_95097", "Add 'export {}' to make this file into a module"), + Set_the_target_option_in_your_configuration_file_to_0: diag(95098, DiagnosticCategory.Message, "Set_the_target_option_in_your_configuration_file_to_0_95098", "Set the 'target' option in your configuration file to '{0}'"), + Set_the_module_option_in_your_configuration_file_to_0: diag(95099, DiagnosticCategory.Message, "Set_the_module_option_in_your_configuration_file_to_0_95099", "Set the 'module' option in your configuration file to '{0}'"), + Convert_invalid_character_to_its_html_entity_code: diag(95100, DiagnosticCategory.Message, "Convert_invalid_character_to_its_html_entity_code_95100", "Convert invalid character to its html entity code"), + Convert_all_invalid_characters_to_HTML_entity_code: diag(95101, DiagnosticCategory.Message, "Convert_all_invalid_characters_to_HTML_entity_code_95101", "Convert all invalid characters to HTML entity code"), + Convert_all_const_to_let: diag(95102, DiagnosticCategory.Message, "Convert_all_const_to_let_95102", "Convert all 'const' to 'let'"), + Convert_function_expression_0_to_arrow_function: diag(95105, DiagnosticCategory.Message, "Convert_function_expression_0_to_arrow_function_95105", "Convert function expression '{0}' to arrow function"), + Convert_function_declaration_0_to_arrow_function: diag(95106, DiagnosticCategory.Message, "Convert_function_declaration_0_to_arrow_function_95106", "Convert function declaration '{0}' to arrow function"), + Fix_all_implicit_this_errors: diag(95107, DiagnosticCategory.Message, "Fix_all_implicit_this_errors_95107", "Fix all implicit-'this' errors"), + Wrap_invalid_character_in_an_expression_container: diag(95108, DiagnosticCategory.Message, "Wrap_invalid_character_in_an_expression_container_95108", "Wrap invalid character in an expression container"), + Wrap_all_invalid_characters_in_an_expression_container: diag(95109, DiagnosticCategory.Message, "Wrap_all_invalid_characters_in_an_expression_container_95109", "Wrap all invalid characters in an expression container"), + Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file: diag(95110, DiagnosticCategory.Message, "Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110", "Visit https://aka.ms/tsconfig to read more about this file"), + Add_a_return_statement: diag(95111, DiagnosticCategory.Message, "Add_a_return_statement_95111", "Add a return statement"), + Remove_braces_from_arrow_function_body: diag(95112, DiagnosticCategory.Message, "Remove_braces_from_arrow_function_body_95112", "Remove braces from arrow function body"), + Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal: diag(95113, DiagnosticCategory.Message, "Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113", "Wrap the following body with parentheses which should be an object literal"), + Add_all_missing_return_statement: diag(95114, DiagnosticCategory.Message, "Add_all_missing_return_statement_95114", "Add all missing return statement"), + Remove_braces_from_all_arrow_function_bodies_with_relevant_issues: diag(95115, DiagnosticCategory.Message, "Remove_braces_from_all_arrow_function_bodies_with_relevant_issues_95115", "Remove braces from all arrow function bodies with relevant issues"), + Wrap_all_object_literal_with_parentheses: diag(95116, DiagnosticCategory.Message, "Wrap_all_object_literal_with_parentheses_95116", "Wrap all object literal with parentheses"), + Move_labeled_tuple_element_modifiers_to_labels: diag(95117, DiagnosticCategory.Message, "Move_labeled_tuple_element_modifiers_to_labels_95117", "Move labeled tuple element modifiers to labels"), + Convert_overload_list_to_single_signature: diag(95118, DiagnosticCategory.Message, "Convert_overload_list_to_single_signature_95118", "Convert overload list to single signature"), + Generate_get_and_set_accessors_for_all_overriding_properties: diag(95119, DiagnosticCategory.Message, "Generate_get_and_set_accessors_for_all_overriding_properties_95119", "Generate 'get' and 'set' accessors for all overriding properties"), + Wrap_in_JSX_fragment: diag(95120, DiagnosticCategory.Message, "Wrap_in_JSX_fragment_95120", "Wrap in JSX fragment"), + Wrap_all_unparented_JSX_in_JSX_fragment: diag(95121, DiagnosticCategory.Message, "Wrap_all_unparented_JSX_in_JSX_fragment_95121", "Wrap all unparented JSX in JSX fragment"), + Convert_arrow_function_or_function_expression: diag(95122, DiagnosticCategory.Message, "Convert_arrow_function_or_function_expression_95122", "Convert arrow function or function expression"), + Convert_to_anonymous_function: diag(95123, DiagnosticCategory.Message, "Convert_to_anonymous_function_95123", "Convert to anonymous function"), + Convert_to_named_function: diag(95124, DiagnosticCategory.Message, "Convert_to_named_function_95124", "Convert to named function"), + Convert_to_arrow_function: diag(95125, DiagnosticCategory.Message, "Convert_to_arrow_function_95125", "Convert to arrow function"), + Remove_parentheses: diag(95126, DiagnosticCategory.Message, "Remove_parentheses_95126", "Remove parentheses"), + Could_not_find_a_containing_arrow_function: diag(95127, DiagnosticCategory.Message, "Could_not_find_a_containing_arrow_function_95127", "Could not find a containing arrow function"), + Containing_function_is_not_an_arrow_function: diag(95128, DiagnosticCategory.Message, "Containing_function_is_not_an_arrow_function_95128", "Containing function is not an arrow function"), + Could_not_find_export_statement: diag(95129, DiagnosticCategory.Message, "Could_not_find_export_statement_95129", "Could not find export statement"), + This_file_already_has_a_default_export: diag(95130, DiagnosticCategory.Message, "This_file_already_has_a_default_export_95130", "This file already has a default export"), + Could_not_find_import_clause: diag(95131, DiagnosticCategory.Message, "Could_not_find_import_clause_95131", "Could not find import clause"), + Could_not_find_namespace_import_or_named_imports: diag(95132, DiagnosticCategory.Message, "Could_not_find_namespace_import_or_named_imports_95132", "Could not find namespace import or named imports"), + Selection_is_not_a_valid_type_node: diag(95133, DiagnosticCategory.Message, "Selection_is_not_a_valid_type_node_95133", "Selection is not a valid type node"), + No_type_could_be_extracted_from_this_type_node: diag(95134, DiagnosticCategory.Message, "No_type_could_be_extracted_from_this_type_node_95134", "No type could be extracted from this type node"), + Could_not_find_property_for_which_to_generate_accessor: diag(95135, DiagnosticCategory.Message, "Could_not_find_property_for_which_to_generate_accessor_95135", "Could not find property for which to generate accessor"), + Name_is_not_valid: diag(95136, DiagnosticCategory.Message, "Name_is_not_valid_95136", "Name is not valid"), + Can_only_convert_property_with_modifier: diag(95137, DiagnosticCategory.Message, "Can_only_convert_property_with_modifier_95137", "Can only convert property with modifier"), + Switch_each_misused_0_to_1: diag(95138, DiagnosticCategory.Message, "Switch_each_misused_0_to_1_95138", "Switch each misused '{0}' to '{1}'"), + Convert_to_optional_chain_expression: diag(95139, DiagnosticCategory.Message, "Convert_to_optional_chain_expression_95139", "Convert to optional chain expression"), + Could_not_find_convertible_access_expression: diag(95140, DiagnosticCategory.Message, "Could_not_find_convertible_access_expression_95140", "Could not find convertible access expression"), + Could_not_find_matching_access_expressions: diag(95141, DiagnosticCategory.Message, "Could_not_find_matching_access_expressions_95141", "Could not find matching access expressions"), + Can_only_convert_logical_AND_access_chains: diag(95142, DiagnosticCategory.Message, "Can_only_convert_logical_AND_access_chains_95142", "Can only convert logical AND access chains"), + Add_void_to_Promise_resolved_without_a_value: diag(95143, DiagnosticCategory.Message, "Add_void_to_Promise_resolved_without_a_value_95143", "Add 'void' to Promise resolved without a value"), + Add_void_to_all_Promises_resolved_without_a_value: diag(95144, DiagnosticCategory.Message, "Add_void_to_all_Promises_resolved_without_a_value_95144", "Add 'void' to all Promises resolved without a value"), + Use_element_access_for_0: diag(95145, DiagnosticCategory.Message, "Use_element_access_for_0_95145", "Use element access for '{0}'"), + Use_element_access_for_all_undeclared_properties: diag(95146, DiagnosticCategory.Message, "Use_element_access_for_all_undeclared_properties_95146", "Use element access for all undeclared properties."), + Delete_all_unused_imports: diag(95147, DiagnosticCategory.Message, "Delete_all_unused_imports_95147", "Delete all unused imports"), + Infer_function_return_type: diag(95148, DiagnosticCategory.Message, "Infer_function_return_type_95148", "Infer function return type"), + Return_type_must_be_inferred_from_a_function: diag(95149, DiagnosticCategory.Message, "Return_type_must_be_inferred_from_a_function_95149", "Return type must be inferred from a function"), + Could_not_determine_function_return_type: diag(95150, DiagnosticCategory.Message, "Could_not_determine_function_return_type_95150", "Could not determine function return type"), + Could_not_convert_to_arrow_function: diag(95151, DiagnosticCategory.Message, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"), + Could_not_convert_to_named_function: diag(95152, DiagnosticCategory.Message, "Could_not_convert_to_named_function_95152", "Could not convert to named function"), + Could_not_convert_to_anonymous_function: diag(95153, DiagnosticCategory.Message, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"), + Can_only_convert_string_concatenation: diag(95154, DiagnosticCategory.Message, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"), + Selection_is_not_a_valid_statement_or_statements: diag(95155, DiagnosticCategory.Message, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"), + Add_missing_function_declaration_0: diag(95156, DiagnosticCategory.Message, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"), + Add_all_missing_function_declarations: diag(95157, DiagnosticCategory.Message, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"), + Method_not_implemented: diag(95158, DiagnosticCategory.Message, "Method_not_implemented_95158", "Method not implemented."), + Function_not_implemented: diag(95159, DiagnosticCategory.Message, "Function_not_implemented_95159", "Function not implemented."), + Add_override_modifier: diag(95160, DiagnosticCategory.Message, "Add_override_modifier_95160", "Add 'override' modifier"), + Remove_override_modifier: diag(95161, DiagnosticCategory.Message, "Remove_override_modifier_95161", "Remove 'override' modifier"), + Add_all_missing_override_modifiers: diag(95162, DiagnosticCategory.Message, "Add_all_missing_override_modifiers_95162", "Add all missing 'override' modifiers"), + Remove_all_unnecessary_override_modifiers: diag(95163, DiagnosticCategory.Message, "Remove_all_unnecessary_override_modifiers_95163", "Remove all unnecessary 'override' modifiers"), + Can_only_convert_named_export: diag(95164, DiagnosticCategory.Message, "Can_only_convert_named_export_95164", "Can only convert named export"), + Add_missing_properties: diag(95165, DiagnosticCategory.Message, "Add_missing_properties_95165", "Add missing properties"), + Add_all_missing_properties: diag(95166, DiagnosticCategory.Message, "Add_all_missing_properties_95166", "Add all missing properties"), + Add_missing_attributes: diag(95167, DiagnosticCategory.Message, "Add_missing_attributes_95167", "Add missing attributes"), + Add_all_missing_attributes: diag(95168, DiagnosticCategory.Message, "Add_all_missing_attributes_95168", "Add all missing attributes"), + Add_undefined_to_optional_property_type: diag(95169, DiagnosticCategory.Message, "Add_undefined_to_optional_property_type_95169", "Add 'undefined' to optional property type"), + Convert_named_imports_to_default_import: diag(95170, DiagnosticCategory.Message, "Convert_named_imports_to_default_import_95170", "Convert named imports to default import"), + Delete_unused_param_tag_0: diag(95171, DiagnosticCategory.Message, "Delete_unused_param_tag_0_95171", "Delete unused '@param' tag '{0}'"), + Delete_all_unused_param_tags: diag(95172, DiagnosticCategory.Message, "Delete_all_unused_param_tags_95172", "Delete all unused '@param' tags"), + Rename_param_tag_name_0_to_1: diag(95173, DiagnosticCategory.Message, "Rename_param_tag_name_0_to_1_95173", "Rename '@param' tag name '{0}' to '{1}'"), + Use_0: diag(95174, DiagnosticCategory.Message, "Use_0_95174", "Use `{0}`."), + Use_Number_isNaN_in_all_conditions: diag(95175, DiagnosticCategory.Message, "Use_Number_isNaN_in_all_conditions_95175", "Use `Number.isNaN` in all conditions."), + No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, DiagnosticCategory.Error, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."), + Classes_may_not_have_a_field_named_constructor: diag(18006, DiagnosticCategory.Error, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."), + JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, DiagnosticCategory.Error, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"), + Private_identifiers_cannot_be_used_as_parameters: diag(18009, DiagnosticCategory.Error, "Private_identifiers_cannot_be_used_as_parameters_18009", "Private identifiers cannot be used as parameters."), + An_accessibility_modifier_cannot_be_used_with_a_private_identifier: diag(18010, DiagnosticCategory.Error, "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010", "An accessibility modifier cannot be used with a private identifier."), + The_operand_of_a_delete_operator_cannot_be_a_private_identifier: diag(18011, DiagnosticCategory.Error, "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011", "The operand of a 'delete' operator cannot be a private identifier."), + constructor_is_a_reserved_word: diag(18012, DiagnosticCategory.Error, "constructor_is_a_reserved_word_18012", "'#constructor' is a reserved word."), + Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier: diag(18013, DiagnosticCategory.Error, "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013", "Property '{0}' is not accessible outside class '{1}' because it has a private identifier."), + The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling: diag(18014, DiagnosticCategory.Error, "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014", "The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling."), + Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2: diag(18015, DiagnosticCategory.Error, "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015", "Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'."), + Private_identifiers_are_not_allowed_outside_class_bodies: diag(18016, DiagnosticCategory.Error, "Private_identifiers_are_not_allowed_outside_class_bodies_18016", "Private identifiers are not allowed outside class bodies."), + The_shadowing_declaration_of_0_is_defined_here: diag(18017, DiagnosticCategory.Error, "The_shadowing_declaration_of_0_is_defined_here_18017", "The shadowing declaration of '{0}' is defined here"), + The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here: diag(18018, DiagnosticCategory.Error, "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018", "The declaration of '{0}' that you probably intended to use is defined here"), + _0_modifier_cannot_be_used_with_a_private_identifier: diag(18019, DiagnosticCategory.Error, "_0_modifier_cannot_be_used_with_a_private_identifier_18019", "'{0}' modifier cannot be used with a private identifier."), + An_enum_member_cannot_be_named_with_a_private_identifier: diag(18024, DiagnosticCategory.Error, "An_enum_member_cannot_be_named_with_a_private_identifier_18024", "An enum member cannot be named with a private identifier."), + can_only_be_used_at_the_start_of_a_file: diag(18026, DiagnosticCategory.Error, "can_only_be_used_at_the_start_of_a_file_18026", "'#!' can only be used at the start of a file."), + Compiler_reserves_name_0_when_emitting_private_identifier_downlevel: diag(18027, DiagnosticCategory.Error, "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027", "Compiler reserves name '{0}' when emitting private identifier downlevel."), + Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher: diag(18028, DiagnosticCategory.Error, "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028", "Private identifiers are only available when targeting ECMAScript 2015 and higher."), + Private_identifiers_are_not_allowed_in_variable_declarations: diag(18029, DiagnosticCategory.Error, "Private_identifiers_are_not_allowed_in_variable_declarations_18029", "Private identifiers are not allowed in variable declarations."), + An_optional_chain_cannot_contain_private_identifiers: diag(18030, DiagnosticCategory.Error, "An_optional_chain_cannot_contain_private_identifiers_18030", "An optional chain cannot contain private identifiers."), + The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents: diag(18031, DiagnosticCategory.Error, "The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031", "The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents."), + The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some: diag(18032, DiagnosticCategory.Error, "The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032", "The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some."), + Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values: diag(18033, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033", "Type '{0}' is not assignable to type '{1}' as required for computed enum member values."), + Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment: diag(18034, DiagnosticCategory.Message, "Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034", "Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."), + Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name: diag(18035, DiagnosticCategory.Error, "Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035", "Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."), + Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator: diag(18036, DiagnosticCategory.Error, "Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036", "Class decorators can't be used with static private identifier. Consider removing the experimental decorator."), + Await_expression_cannot_be_used_inside_a_class_static_block: diag(18037, DiagnosticCategory.Error, "Await_expression_cannot_be_used_inside_a_class_static_block_18037", "Await expression cannot be used inside a class static block."), + For_await_loops_cannot_be_used_inside_a_class_static_block: diag(18038, DiagnosticCategory.Error, "For_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'For await' loops cannot be used inside a class static block."), + Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block: diag(18039, DiagnosticCategory.Error, "Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039", "Invalid use of '{0}'. It cannot be used inside a class static block."), + A_return_statement_cannot_be_used_inside_a_class_static_block: diag(18041, DiagnosticCategory.Error, "A_return_statement_cannot_be_used_inside_a_class_static_block_18041", "A 'return' statement cannot be used inside a class static block."), + _0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation: diag(18042, DiagnosticCategory.Error, "_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042", "'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."), + Types_cannot_appear_in_export_declarations_in_JavaScript_files: diag(18043, DiagnosticCategory.Error, "Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043", "Types cannot appear in export declarations in JavaScript files."), + _0_is_automatically_exported_here: diag(18044, DiagnosticCategory.Message, "_0_is_automatically_exported_here_18044", "'{0}' is automatically exported here."), + Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher: diag(18045, DiagnosticCategory.Error, "Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045", "Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."), + _0_is_of_type_unknown: diag(18046, DiagnosticCategory.Error, "_0_is_of_type_unknown_18046", "'{0}' is of type 'unknown'."), + _0_is_possibly_null: diag(18047, DiagnosticCategory.Error, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."), + _0_is_possibly_undefined: diag(18048, DiagnosticCategory.Error, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."), + _0_is_possibly_null_or_undefined: diag(18049, DiagnosticCategory.Error, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."), + The_value_0_cannot_be_used_here: diag(18050, DiagnosticCategory.Error, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."), +}; \ No newline at end of file diff --git a/external-declarations/src/compiler/emit-binder.ts b/external-declarations/src/compiler/emit-binder.ts new file mode 100644 index 0000000000000..f65622b55cc30 --- /dev/null +++ b/external-declarations/src/compiler/emit-binder.ts @@ -0,0 +1,696 @@ +import { Symbol, Node, VariableDeclaration, ParameterDeclaration, ModifierFlags, isLiteralExpression, ClassElement, isIdentifier, BindingPattern, SyntaxKind, findAncestor, SourceFile, isVariableStatement, SymbolFlags, isImportDeclaration, __String, isFunctionDeclaration, isClassDeclaration, isTypeAliasDeclaration, isExportDeclaration, isExportAssignment, isModuleDeclaration, NodeArray, isConstructSignatureDeclaration, isConstructorDeclaration, isImportEqualsDeclaration, isEnumDeclaration, isInterfaceDeclaration, isNamedExports, isModuleBlock, ModuleDeclaration, ArrayBindingElement, isExternalModuleReference, forEachChild, isMetaProperty, isComputedPropertyName, isPropertyAccessExpression, isPrivateIdentifier, Extension, isConditionalTypeNode, TypeElement, CompilerOptions, ModuleKind, ModuleDetectionKind, isMappedTypeNode, TypeParameterDeclaration, isInferTypeNode, isBlock, InterfaceDeclaration, ClassDeclaration, FunctionDeclaration, JsxEmit, isJsxFragment, isJsxOpeningLikeElement, ModuleResolutionKind, ResolutionMode, isEnumMember, getNameOfDeclaration, ExportDeclaration, Identifier, isSourceFile, ExportSpecifier, EnumDeclaration, isVariableDeclaration } from "typescript"; +import { Debug } from "./debug"; +import { forEach } from "./lang-utils"; +import { _Symbol } from "./types"; +import { isBindingPattern, getNodeId, hasSyntacticModifier, getEmitModuleKind, getEmitModuleResolutionKind, isEnumConst, nodeHasName } from "./utils"; + + +export interface NodeLinks { + isVisible?: boolean; + symbol?: BasicSymbol; + localSymbol?: BasicSymbol; + locals?: SymbolTable; +} + +type SymbolTable = Map<__String, BasicSymbol>; +export interface BasicSymbol { + name?: __String + exportSymbol?: BasicSymbol; + declarations: Node[]; + signatureDeclarations?: Node[]; + flags: SymbolFlags; + isVisible?: boolean; + members?: SymbolTable; + exports?: SymbolTable; +} + +function assertNever(o: never): never { + throw new Error("Should never happen") +} + +type _Node = Node; +declare module 'typescript' { + interface SourceFile { + externalModuleIndicator?: _Node | true; + } +} +export function getEmitModuleDetectionKind(options: CompilerOptions) { + return options.moduleDetection || + (getEmitModuleKind(options) === ModuleKind.Node16 || getEmitModuleKind(options) === ModuleKind.NodeNext ? ModuleDetectionKind.Force : ModuleDetectionKind.Auto); +} + +type SymbolRegistrationFlags = readonly [flags: SymbolFlags, forbiddenFlags: SymbolFlags]; +const syntaxKindToSymbolMap = { + [SyntaxKind.TypeParameter]: [SymbolFlags.TypeParameter, SymbolFlags.TypeParameterExcludes], + [SyntaxKind.Parameter]: [SymbolFlags.FunctionScopedVariable, SymbolFlags.ParameterExcludes], + [SyntaxKind.VariableDeclaration]: [SymbolFlags.BlockScopedVariable, SymbolFlags.BlockScopedVariableExcludes], + [SyntaxKind.BindingElement]: [SymbolFlags.BlockScopedVariable, SymbolFlags.BlockScopedVariableExcludes], + [SyntaxKind.PropertyDeclaration]: [SymbolFlags.Property, SymbolFlags.PropertyExcludes], + [SyntaxKind.PropertySignature]: [SymbolFlags.Property, SymbolFlags.PropertyExcludes], + [SyntaxKind.PropertyAssignment]: [SymbolFlags.Property, SymbolFlags.PropertyExcludes], + [SyntaxKind.ShorthandPropertyAssignment]: [SymbolFlags.Property, SymbolFlags.PropertyExcludes], + [SyntaxKind.EnumMember]: [SymbolFlags.EnumMember, SymbolFlags.EnumMemberExcludes], + [SyntaxKind.CallSignature]: [SymbolFlags.Signature, SymbolFlags.None], + [SyntaxKind.ConstructSignature]: [SymbolFlags.Signature, SymbolFlags.None], + [SyntaxKind.IndexSignature]: [SymbolFlags.Signature, SymbolFlags.None], + [SyntaxKind.MethodDeclaration]: [SymbolFlags.Method, SymbolFlags.MethodExcludes], + [SyntaxKind.MethodSignature]: [SymbolFlags.Method, SymbolFlags.MethodExcludes], + [SyntaxKind.FunctionDeclaration]: [SymbolFlags.Function, SymbolFlags.FunctionExcludes], + [SyntaxKind.Constructor]: [SymbolFlags.Constructor, SymbolFlags.None], + [SyntaxKind.GetAccessor]: [SymbolFlags.GetAccessor, SymbolFlags.GetAccessorExcludes], + [SyntaxKind.SetAccessor]: [SymbolFlags.SetAccessor, SymbolFlags.SetAccessorExcludes], + [SyntaxKind.ClassExpression]: [SymbolFlags.Class, SymbolFlags.ClassExcludes], + [SyntaxKind.ClassDeclaration]: [SymbolFlags.Class, SymbolFlags.ClassExcludes], + [SyntaxKind.InterfaceDeclaration]: [SymbolFlags.Interface, SymbolFlags.InterfaceExcludes], + [SyntaxKind.TypeAliasDeclaration]: [SymbolFlags.TypeAlias, SymbolFlags.TypeAliasExcludes], + [SyntaxKind.EnumDeclaration]: { + const: [SymbolFlags.ConstEnum, SymbolFlags.ConstEnumExcludes], + regular: [SymbolFlags.RegularEnum, SymbolFlags.RegularEnumExcludes], + }, + [SyntaxKind.ModuleDeclaration]: { + value: [SymbolFlags.ValueModule, SymbolFlags.ValueModuleExcludes], + namespace: [SymbolFlags.NamespaceModule, SymbolFlags.NamespaceModuleExcludes], + }, + [SyntaxKind.ImportEqualsDeclaration]: [SymbolFlags.Alias, SymbolFlags.AliasExcludes], + [SyntaxKind.NamespaceImport]: [SymbolFlags.Alias, SymbolFlags.AliasExcludes], + [SyntaxKind.ImportSpecifier]: [SymbolFlags.Alias, SymbolFlags.AliasExcludes], + [SyntaxKind.ExportSpecifier]: [SymbolFlags.Alias | SymbolFlags.ExportValue, SymbolFlags.AliasExcludes], + [SyntaxKind.NamespaceExportDeclaration]: [SymbolFlags.Alias, SymbolFlags.AliasExcludes], + [SyntaxKind.ImportClause]: [SymbolFlags.Alias, SymbolFlags.AliasExcludes], +} as const; //satisfies Partial>>; + +export function bindSourceFile(file: SourceFile, options: CompilerOptions, packageModuleType: ResolutionMode) { + const nodeLinks: NodeLinks[] = [] + function tryGetNodeLinks(node: Node): NodeLinks | undefined { + const id = (node as any).id; + if(!id) return undefined; + return nodeLinks[id]; + } + function getNodeLinks(node: Node): NodeLinks { + const nodeId = getNodeId(node); + return nodeLinks[nodeId] || (nodeLinks[nodeId] = {}); + } + + const [isFileAModule, isNodeAModuleIndicator] = getSetExternalModuleIndicator(options); + file.externalModuleIndicator = + isFileAModule(file) || isExternalModuleWorker(file, isNodeAModuleIndicator); + file.impliedNodeFormat = getImpliedNodeFormat(file.fileName, options, packageModuleType) + + bind(); + + return { + tryGetNodeLinks, + getNodeLinks, + resolveName, + } + + + function resolveName(enclosingDeclaration: Node, escapedText: __String, meaning: SymbolFlags) { + function getSymbolFromScope(table: SymbolTable | undefined) { + let symbol = table?.get(escapedText); + if(symbol && ((symbol.flags & meaning) || (symbol.flags & SymbolFlags.Alias))) { + return symbol + } + } + + let currentScope = enclosingDeclaration; + while(currentScope) { + const links = tryGetNodeLinks(currentScope); + let symbol = getSymbolFromScope(links?.locals); + if(!symbol && (isModuleDeclaration(currentScope) || isSourceFile(currentScope))) { + symbol = getSymbolFromScope(links?.symbol?.exports) + } + if(symbol) return symbol; + currentScope = currentScope.parent; + } + return undefined; + } + + function getSymbolFlagsForNode(node: Node & { kind: keyof typeof syntaxKindToSymbolMap }) { + if(node.kind === SyntaxKind.EnumDeclaration) { + return isEnumConst(node as EnumDeclaration) ? + syntaxKindToSymbolMap[node.kind].const: + syntaxKindToSymbolMap[node.kind].regular; + } + if(node.kind === SyntaxKind.ModuleDeclaration) { + return getModuleInstanceState(node as ModuleDeclaration) === ModuleInstanceState.Instantiated ? + syntaxKindToSymbolMap[node.kind].value: + syntaxKindToSymbolMap[node.kind].namespace; + } + return syntaxKindToSymbolMap[node.kind]; + } + function getElementFlagsOrThrow(node: Node) { + const result = getSymbolFlagsForNode(node as Node & { kind: keyof typeof syntaxKindToSymbolMap }); + if(!result) { + throw new Error("Unknown binding element type"); + } + return result; + } + + function bind() { + let currentScope: Node = undefined!; + let currentSymbol: BasicSymbol = undefined!; + let currentLocalSymbolTable: SymbolTable = undefined!; + let currentExportsSymbolTable: SymbolTable | null = null; + let postBindingAction: Array<() => void> = []; + + const fileLinks = getNodeLinks(file).symbol = newSymbol(); + fileLinks.exports = new Map(); + withScope(file, fileLinks.exports, ()=> bindEachFunctionsFirst(file.statements)); + postBindingAction.forEach(fn => fn()); + + function newSymbol(): BasicSymbol { + return { + declarations: [], + flags: 0, + } + } + function getSymbol(table: SymbolTable, name: __String) { + let symbol = table.get(name); + if(!symbol) { + symbol = newSymbol(); + symbol.name = name; + table.set(name, symbol) + } + return symbol; + } + function addLocalAndExportDeclaration(name: __String | undefined, node: Node, [flags, forbiddenFlags]: SymbolRegistrationFlags, isExport: boolean) { + if(isExport) { + const exportKind = flags & SymbolFlags.Value ? SymbolFlags.ExportValue : 0; + const localSymbol = addLocalOnlyDeclaration(name, node, [exportKind, forbiddenFlags]); + const exportSymbol = addExportOnlyDeclaration(name, node, [flags, forbiddenFlags]); + localSymbol.exportSymbol = exportSymbol + return exportSymbol; + }else { + return addLocalOnlyDeclaration(name, node, [flags, forbiddenFlags]); + } + } + function addExportOnlyDeclaration(name: __String | undefined, node: Node, flagsAndForbiddenFlags: SymbolRegistrationFlags) { + if(!currentExportsSymbolTable) { + throw new Error("Exporting symbol from a context that does not support it"); + } + return addDeclaration(currentExportsSymbolTable, name, node, flagsAndForbiddenFlags); + } + function addLocalOnlyDeclaration(name: __String | undefined, node: Node, flagsAndForbiddenFlags: SymbolRegistrationFlags) { + return addDeclaration(currentLocalSymbolTable, name, node, flagsAndForbiddenFlags); + } + + function addDeclaration(table: SymbolTable, name: __String | undefined, node: Node, [flags, forbiddenFlags]: SymbolRegistrationFlags) { + let symbol = name != null ? getSymbol(table, name) : newSymbol(); + // Symbols don't merge, create new one + if(forbiddenFlags & symbol.flags) { + symbol = newSymbol(); + } + symbol.declarations.push(node); + symbol.flags |= flags; + getNodeLinks(node).symbol = symbol; + node.symbol = symbol as unknown as Symbol; + return symbol; + } + function withScope(scope: Node, exports: SymbolTable | null, fn: () => void) { + const old = [currentScope, currentLocalSymbolTable, currentExportsSymbolTable] as const + currentScope = scope; + const links = getNodeLinks(scope); + currentLocalSymbolTable = (links.locals ??= new Map()); + currentExportsSymbolTable = exports; + fn(); + [currentScope, currentLocalSymbolTable, currentExportsSymbolTable] = old; + } + function withMembers(symbol: BasicSymbol, fn:()=> void, table: "members" | "exports" = "members") { + const old = [currentLocalSymbolTable, currentSymbol] as const + currentSymbol = symbol; + currentLocalSymbolTable = (symbol[table] ??= new Map()); + fn(); + [currentLocalSymbolTable, currentSymbol] = old; + } + + /** + * Gets the symbolic name for a member from its type. + */ + function getMemberName(element: TypeElement | ClassElement): __String | undefined{ + if (isConstructorDeclaration(element) || isConstructSignatureDeclaration(element)) { + return "@constructor" as __String; + } + const name = element.name; + if(!name) return undefined; + if(isIdentifier(name)) { + return name.escapedText; + } + else if(isLiteralExpression(name)) { + return `${name.text}` as __String; + } + else if(isComputedPropertyName(name)) { + let expr = name.expression; + + if(isLiteralExpression(expr)) { + return `${expr.text}` as __String; + } + + let fullName = "" + while(isPropertyAccessExpression(expr)) { + fullName = "." + expr.name.escapedText + name + expr = expr.expression; + } + if(!isIdentifier(expr)) { + return undefined; + } + return `[${expr.escapedText}${fullName}]` as __String; + } else if(isPrivateIdentifier(name)) { + return name.escapedText; + } else { + assertNever(name) + } + } + + function getStatementName(s: InterfaceDeclaration | ClassDeclaration | FunctionDeclaration) { + if(hasSyntacticModifier(s, ModifierFlags.Export) && hasSyntacticModifier(s, ModifierFlags.Default)) { + return "@default" as __String; + } + if(s.name) { + return s.name.escapedText; + } + } + // We need to bind locals for types (conditional and mapped typed define parameters in their definitions) + function bindTypeExpressions(node?: Node) { + function bindChildren(node: Node) { + forEachChild(node, bindWorker, arr => arr.forEach(bindWorker)); + } + function bindWorker(node?: Node) { + if(!node) return; + if(isMappedTypeNode(node)) { + const mappedType = node; + withScope(node, null, () => { + bindTypeParameters([mappedType.typeParameter]); + bindWorker(mappedType.nameType); + bindWorker(mappedType.type); + }); + } + else if(isConditionalTypeNode(node)) { + withScope(node.checkType, null, () => { + bindWorker(node.extendsType); + }) + getNodeLinks(node.trueType).locals = getNodeLinks(node.checkType).locals + } if(isInferTypeNode(node)) { + const conditionalTypeOwner = findAncestor(node, isConditionalTypeNode); + // Probably an error, infer not in a conditional type context + // Try to bind the rest of it + if(conditionalTypeOwner) { + withScope(conditionalTypeOwner, null, () => { + bindTypeParameters([node.typeParameter]); + }); + } + bindChildren(node); + } + else if(isBlock(node)) { + // Do not go into bodies + return; + } + else { + bindChildren(node); + } + } + bindWorker(node) + } + function bindTypeParameters(typeParameters: TypeParameterDeclaration[] | NodeArray | undefined) { + typeParameters?.forEach(t => addLocalOnlyDeclaration(t.name.escapedText, t, getSymbolFlagsForNode(t))); + } + function bindVariable(d: VariableDeclaration | ParameterDeclaration) { + bindTypeExpressions(d.type); + const isExported = isVariableDeclaration(d) && hasSyntacticModifier(d.parent.parent, ModifierFlags.Export); + if(isIdentifier(d.name)) { + addLocalAndExportDeclaration(d.name.escapedText, d, getSymbolFlagsForNode(d), isExported); + } + else if(isBindingPattern(d.name)) { + function bindBindingPattern(pattern: BindingPattern) { + // type BindingPattern = ObjectBindingPattern | ArrayBindingPattern; + (pattern.elements as NodeArray).forEach(b => { + if(b.kind === SyntaxKind.OmittedExpression) return; + if(!b.name) return; + + if(isIdentifier(b.name)) { + addLocalAndExportDeclaration(b.name.escapedText, b, getSymbolFlagsForNode(b), isExported); + } else { + bindBindingPattern(b.name); + } + }) + } + bindBindingPattern(d.name); + } else { + assertNever(d.name) + } + } + function bindEachFunctionsFirst(nodes: NodeArray | undefined): void { + if(!nodes) return; + bindContainer(nodes.filter(n => n.kind === SyntaxKind.FunctionDeclaration)); + bindContainer(nodes.filter(n => n.kind !== SyntaxKind.FunctionDeclaration)); + } + + function bindContainer(statements: NodeArray | Node[]) { + statements.forEach(statement => { + const isExported = hasSyntacticModifier(statement, ModifierFlags.Export); + if(isImportEqualsDeclaration(statement)) { + addLocalOnlyDeclaration(statement.name.escapedText, statement, getSymbolFlagsForNode(statement)); + } + if(isImportDeclaration(statement)) { + if(!statement.importClause) { + return; + } + if(statement.importClause.name) { + addLocalOnlyDeclaration(statement.importClause.name.escapedText, statement.importClause, getSymbolFlagsForNode(statement.importClause)); + } + if(statement.importClause.namedBindings) { + const namedBindings = statement.importClause.namedBindings; + if(namedBindings.kind === SyntaxKind.NamedImports) { + namedBindings.elements.forEach(v => { + addLocalOnlyDeclaration(v.name.escapedText, v, getSymbolFlagsForNode(v)); + }) + } + else if(namedBindings.kind === SyntaxKind.NamespaceImport) { + addLocalOnlyDeclaration(namedBindings.name.escapedText, namedBindings, getSymbolFlagsForNode(namedBindings)); + } else { + debugger; + throw new Error("Not supported"); + } + } + } + if(isVariableStatement(statement)) { + statement.declarationList.declarations.forEach(bindVariable); + } + if(isFunctionDeclaration(statement)) { + bindTypeParameters(statement.typeParameters); + bindTypeExpressions(statement.type); + withScope(statement, null, () => { + bindTypeExpressions(statement); + statement.parameters.forEach(bindVariable); + }); + + addLocalAndExportDeclaration(getStatementName(statement), statement, getSymbolFlagsForNode(statement), isExported); + } + if(isTypeAliasDeclaration(statement)) { + addLocalAndExportDeclaration(statement.name.escapedText, statement, getSymbolFlagsForNode(statement), isExported); + withScope(statement, null, () => { + bindTypeParameters(statement.typeParameters); + }); + bindTypeExpressions(statement.type); + } + // Default export declarations set isVisible on true on associated symbols in the type checker. + if(isExportAssignment(statement)) { + if(statement.expression && isIdentifier(statement.expression)) { + const name = statement.expression.escapedText; + postBindingAction.push(() => { + const resolvedSymbol = resolveName(statement.expression, name, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias); + if(resolvedSymbol) { + resolvedSymbol.isVisible = true; + resolvedSymbol.declarations.forEach(d => getNodeLinks(d).isVisible = true); + } + }); + } + } + if(isExportDeclaration(statement)) { + if(statement.exportClause && isNamedExports(statement.exportClause)) { + const elements = statement.exportClause.elements; + if (statement.moduleSpecifier) { + // TODO is currentExportsSymbolTable ok here? + withScope(statement, null, () => { + elements.forEach(e => { + const [flags, forbiddenFlags] = getSymbolFlagsForNode(e) + addLocalOnlyDeclaration((e.propertyName ?? e.name).escapedText, e, [flags | SymbolFlags.ExportValue , forbiddenFlags]); + }); + }) + } + elements.forEach(e => { + postBindingAction.push(() => { + const resolvedSymbol = resolveName(e,(e.propertyName ?? e.name).escapedText, ~0); + if(resolvedSymbol) { + resolvedSymbol.isVisible = true; + resolvedSymbol.declarations.forEach(d => getNodeLinks(d).isVisible = true); + } + }); + }) + } + } + // if(isEnumMember(statement)) { + // addDeclaration(getNameOfDeclaration(statement.name), statement, getElementFlags(statement.kind)); + // } + if(isEnumDeclaration(statement)) { + addLocalAndExportDeclaration(statement.name.escapedText, statement, getSymbolFlagsForNode(statement), isExported); + // withScope(statement, () => bindContainer(statement.members)) + } + if(isModuleDeclaration(statement)) { + function bindModuleDeclaration(moduleDeclaration: ModuleDeclaration) { + const name = isIdentifier(moduleDeclaration.name) ? moduleDeclaration.name.escapedText: undefined; + const moduleSymbol = addLocalAndExportDeclaration(name, moduleDeclaration, getSymbolFlagsForNode(moduleDeclaration), isExported); + moduleSymbol.exports ??= new Map(); + withScope(moduleDeclaration, moduleSymbol.exports, () => { + if(moduleDeclaration.body) { + if(isModuleBlock(moduleDeclaration.body)) { + const moduleBlock = moduleDeclaration.body + bindEachFunctionsFirst(moduleBlock.statements) + } + else if(isModuleDeclaration(moduleDeclaration.body)) { + const subModule = moduleDeclaration.body; + bindModuleDeclaration(subModule); + } else { + throw new Error("Unsupported body type"); + } + } + }); + } + bindModuleDeclaration(statement); + } + if(isInterfaceDeclaration(statement)) { + const interfaceDeclaration = statement; + const interfaceSymbol = addLocalAndExportDeclaration(interfaceDeclaration.name.escapedText, interfaceDeclaration, getSymbolFlagsForNode(interfaceDeclaration), isExported); + withScope(interfaceDeclaration, null, () =>{ + bindTypeParameters(interfaceDeclaration.typeParameters); + }); + withMembers(interfaceSymbol, () => { + interfaceDeclaration.members.forEach(m => { + addLocalOnlyDeclaration(getMemberName(m), m, getElementFlagsOrThrow(m)); + bindTypeExpressions(m) + }) + }); + } + + if(isClassDeclaration(statement)) { + const classDeclaration = statement; + const classSymbol = addLocalAndExportDeclaration(classDeclaration.name?.escapedText, classDeclaration, getSymbolFlagsForNode(classDeclaration), isExported); + withScope(classDeclaration, null, () =>{ + bindTypeParameters(classDeclaration.typeParameters); + }); + withMembers(classSymbol, () => { + classDeclaration.members.forEach(m => { + if(hasSyntacticModifier(m, ModifierFlags.Static)) return; + if(m.kind === SyntaxKind.SemicolonClassElement || m.kind === SyntaxKind.ClassStaticBlockDeclaration) return; + + addLocalOnlyDeclaration(getMemberName(m), m, getElementFlagsOrThrow(m)); + bindTypeExpressions(m) + }) + }); + withMembers(classSymbol, () => { + classDeclaration.members.forEach(m => { + if(!hasSyntacticModifier(m, ModifierFlags.Static)) return; + if(m.kind === SyntaxKind.SemicolonClassElement + || m.kind === SyntaxKind.ClassStaticBlockDeclaration) return; + + addLocalOnlyDeclaration(getMemberName(m), m, getElementFlagsOrThrow(m)); + bindTypeExpressions(m) + }) + }, "exports"); + } + }) + } + } +} + +function isExternalModuleWorker(file: SourceFile, isModuleIndicatorNode: (node: Node) => boolean): Node | undefined { + return ( + forEach(file.statements, isAnExternalModuleIndicatorNode) || walkTreeForModuleIndicator(file, isModuleIndicatorNode) + // TODO: isolatedDeclarations: find a away to detect commonJS modules + ) +} + +function isAnExternalModuleIndicatorNode(node: Node) { + return hasSyntacticModifier(node, ModifierFlags.Export) + || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) + || isImportDeclaration(node) + || isExportAssignment(node) + || isExportDeclaration(node) ? node : undefined; +} + +function walkTreeForModuleIndicator(node: Node, isModuleIndicatorNode: (node: Node) => boolean) { + function walkTreeForModuleIndicatorWorker(node: Node): Node | undefined { + return isModuleIndicatorNode(node) ? node : forEachChild(node, walkTreeForModuleIndicatorWorker); + } + return walkTreeForModuleIndicatorWorker(node); +} +function isImportMeta(node: Node): boolean { + return isMetaProperty(node) && node.keywordToken === SyntaxKind.ImportKeyword && node.name.escapedText === "meta"; +} + + + +/** @internal */ +export function getSetExternalModuleIndicator(options: CompilerOptions): [(node: SourceFile) => true | undefined, (node: Node) => boolean] { + + function isFileForcedToBeModuleByFormat(file: SourceFile): true | undefined { + // Excludes declaration files - they still require an explicit `export {}` or the like + // for back compat purposes. The only non-declaration files _not_ forced to be a module are `.js` files + // that aren't esm-mode (meaning not in a `type: module` scope). + return ([Extension.Cjs, Extension.Cts, Extension.Mjs, Extension.Mts].some(e => file.fileName.endsWith(e)) ? true : undefined); + } + + // TODO: Should this callback be cached? + switch (getEmitModuleDetectionKind(options)) { + case ModuleDetectionKind.Force: + // All non-declaration files are modules, declaration files still do the usual isFileProbablyExternalModule + return [(file) => !file.isDeclarationFile || undefined, () => true]; + + case ModuleDetectionKind.Legacy: + // Files are modules if they have imports, exports, or import.meta + return [isFileForcedToBeModuleByFormat, isImportMeta]; + + case ModuleDetectionKind.Auto: + + return [ + isFileForcedToBeModuleByFormat, + options.jsx === JsxEmit.ReactJSX || options.jsx === JsxEmit.ReactJSXDev? + n => isImportMeta(n) || isJsxOpeningLikeElement(n) || isJsxFragment(n): + isImportMeta + ] + } +} + +function getImpliedNodeFormat(fileName: string, options: CompilerOptions, packageJsonFormat: ResolutionMode) { + switch (getEmitModuleResolutionKind(options)) { + case ModuleResolutionKind.Node16: + case ModuleResolutionKind.NodeNext: + return [Extension.Dmts, Extension.Mts, Extension.Mjs].some(e => fileName.endsWith(e)) ? ModuleKind.ESNext : + [Extension.Dcts, Extension.Cts, Extension.Cjs].some(e => fileName.endsWith(e)) ? ModuleKind.CommonJS : + [Extension.Dts, Extension.Ts, Extension.Tsx, Extension.Js, Extension.Jsx].some(e => fileName.endsWith(e)) ? packageJsonFormat : + undefined; // other extensions, like `json` or `tsbuildinfo`, are set as `undefined` here but they should never be fed through the transformer pipeline + default: + return undefined; + } +} + +export const enum ModuleInstanceState { + NonInstantiated = 0, + Instantiated = 1, + ConstEnumOnly = 2 +} + +export function getModuleInstanceState(node: ModuleDeclaration, visited?: Map): ModuleInstanceState { + return node.body ? getModuleInstanceStateCached(node.body, visited) : ModuleInstanceState.Instantiated; +} + +function getModuleInstanceStateCached(node: Node, visited = new Map()) { + const nodeId = getNodeId(node); + if (visited.has(nodeId)) { + return visited.get(nodeId) || ModuleInstanceState.NonInstantiated; + } + visited.set(nodeId, undefined); + const result = getModuleInstanceStateWorker(node, visited); + visited.set(nodeId, result); + return result; +} + +function getModuleInstanceStateWorker(node: Node, visited: Map): ModuleInstanceState { + // A module is uninstantiated if it contains only + switch (node.kind) { + // 1. interface declarations, type alias declarations + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.TypeAliasDeclaration: + return ModuleInstanceState.NonInstantiated; + // 2. const enum declarations + case SyntaxKind.EnumDeclaration: + if (isEnumConst(node as EnumDeclaration)) { + return ModuleInstanceState.ConstEnumOnly; + } + break; + // 3. non-exported import declarations + case SyntaxKind.ImportDeclaration: + case SyntaxKind.ImportEqualsDeclaration: + if (!(hasSyntacticModifier(node, ModifierFlags.Export))) { + return ModuleInstanceState.NonInstantiated; + } + break; + // 4. Export alias declarations pointing at only uninstantiated modules or things uninstantiated modules contain + case SyntaxKind.ExportDeclaration: + const exportDeclaration = node as ExportDeclaration; + if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === SyntaxKind.NamedExports) { + let state = ModuleInstanceState.NonInstantiated; + for (const specifier of exportDeclaration.exportClause.elements) { + const specifierState = getModuleInstanceStateForAliasTarget(specifier, visited); + if (specifierState > state) { + state = specifierState; + } + if (state === ModuleInstanceState.Instantiated) { + return state; + } + } + return state; + } + break; + // 5. other uninstantiated module declarations. + case SyntaxKind.ModuleBlock: { + let state = ModuleInstanceState.NonInstantiated; + forEachChild(node, n => { + const childState = getModuleInstanceStateCached(n, visited); + switch (childState) { + case ModuleInstanceState.NonInstantiated: + // child is non-instantiated - continue searching + return; + case ModuleInstanceState.ConstEnumOnly: + // child is const enum only - record state and continue searching + state = ModuleInstanceState.ConstEnumOnly; + return; + case ModuleInstanceState.Instantiated: + // child is instantiated - record state and stop + state = ModuleInstanceState.Instantiated; + return true; + default: + Debug.assertNever(childState); + } + }); + return state; + } + case SyntaxKind.ModuleDeclaration: + return getModuleInstanceState(node as ModuleDeclaration, visited); + case SyntaxKind.Identifier: + // Only jsdoc typedef definition can exist in jsdoc namespace, and it should + // be considered the same as type alias + if ((node as Identifier).isInJSDocNamespace) { + return ModuleInstanceState.NonInstantiated; + } + } + return ModuleInstanceState.Instantiated; +} + +function getModuleInstanceStateForAliasTarget(specifier: ExportSpecifier, visited: Map) { + const name = specifier.propertyName || specifier.name; + let p: Node | undefined = specifier.parent; + while (p) { + if (isBlock(p) || isModuleBlock(p) || isSourceFile(p)) { + const statements = p.statements; + let found: ModuleInstanceState | undefined; + for (const statement of statements) { + if (nodeHasName(statement, name)) { + const state = getModuleInstanceStateCached(statement, visited); + if (found === undefined || state > found) { + found = state; + } + if (found === ModuleInstanceState.Instantiated) { + return found; + } + } + } + if (found !== undefined) { + return found; + } + } + p = p.parent; + } + return ModuleInstanceState.Instantiated; // Couldn't locate, assume could refer to a value +} + diff --git a/external-declarations/src/compiler/emit-host.ts b/external-declarations/src/compiler/emit-host.ts new file mode 100644 index 0000000000000..a94c259cfe838 --- /dev/null +++ b/external-declarations/src/compiler/emit-host.ts @@ -0,0 +1,69 @@ + +import * as ts from 'typescript' +import { changeExtension } from '../test-runner/tsc-infrastructure/vpath'; +import { getDeclarationExtension, getDirectoryPath, getRelativePathFromDirectory, hasExtension, isDeclarationFile, isJavaScriptFile, resolvePath } from './path-utils'; +import { EmitHost } from './types'; +import { getNodeId } from './utils'; + + +export function createEmitHost(allProjectFiles: string[], tsLibFiles: string[], options: ts.CompilerOptions) { + const getCompilerOptions = () => options; + const getCurrentDirectory = () => "."; + const getCommonSourceDirectory = () => "."; + const getCanonicalFileName = (f: string) => `./${f}`; + const projectFileMap = new Map(allProjectFiles + .map((f) => ({ kind: ts.SyntaxKind.SourceFile, fileName: f } as ts.SourceFile)) + .map(f => [f.fileName, getNodeId(f)]) + ) + const tsLibFileSet = new Set(tsLibFiles); + + return { + getSourceFiles() { + throw new Error("Not needed"); + // return [sourceFile] + }, + getCompilerOptions, + getCurrentDirectory, + getCommonSourceDirectory, + getCanonicalFileName, + getLibFileFromReference(ref) { + if(options.noLib) { + return undefined; + } + if(!tsLibFileSet.has(ref.fileName)) { + return; + } + return { + fileName: ref.fileName, + } + }, + getSourceFileFromReference(referencingFile, ref) { + if(ref.fileName.startsWith("node_modules/") || ref.fileName.indexOf("/node_modules/") !== -1) { + return undefined; + } + if(isJavaScriptFile(ref.fileName) && !options.allowJs) { + return; + } + let resolvedFile: string | undefined = resolvePath(getDirectoryPath(referencingFile.fileName), ref.fileName); + let resolvedFileId = projectFileMap.get(resolvedFile) + if(!hasExtension(resolvedFile) && resolvedFileId == undefined) { + [resolvedFile, resolvedFileId] = Object.values(ts.Extension) + .map(e => resolvedFile + e) + .map(f => [f, projectFileMap.get(f)] as const) + .find(([_, id]) => id != undefined) ?? []; + + if(!resolvedFile) return undefined; + } + if(!projectFileMap.has(resolvedFile)) { + return undefined; + } + const resolvedDeclarationFile = + isDeclarationFile(resolvedFile) ? resolvedFile : + changeExtension(resolvedFile, getDeclarationExtension(resolvedFile)) + return { + fileName: getRelativePathFromDirectory(getDirectoryPath(referencingFile.fileName), resolvedDeclarationFile, false), + id: resolvedFileId, + }; + }, + } as Partial as EmitHost +} \ No newline at end of file diff --git a/external-declarations/src/compiler/emit-resolver.ts b/external-declarations/src/compiler/emit-resolver.ts new file mode 100644 index 0000000000000..636cf7d62fc4d --- /dev/null +++ b/external-declarations/src/compiler/emit-resolver.ts @@ -0,0 +1,405 @@ +import { Node, VariableDeclaration, PropertyDeclaration, PropertySignature, ParameterDeclaration, Declaration, getCombinedModifierFlags, isParameterPropertyDeclaration, isVariableDeclaration, ModifierFlags, getCombinedNodeFlags, NodeFlags, VariableDeclarationList, isLiteralExpression, isIdentifier, BindingPattern, isSourceFile, SyntaxKind, findAncestor, SourceFile, EntityNameOrEntityNameExpression, isBindingElement, isVariableStatement, SymbolFlags, __String, ImportClause, ImportEqualsDeclaration, ImportSpecifier, NamespaceImport, isFunctionLike, getNameOfDeclaration, DeclarationName, isElementAccessExpression, isPropertyAccessExpression, FunctionLikeDeclaration, CompilerOptions, isGetAccessor, isSetAccessor, ResolutionMode } from "typescript"; +import { Debug } from "./debug"; +import { BasicSymbol, bindSourceFile } from "./emit-binder"; +import { appendIfUnique, emptyArray, every, filter } from "./lang-utils"; +import { EmitResolver, LateBoundDeclaration, LateVisibilityPaintedStatement, SymbolAccessibility, SymbolVisibilityResult, _Symbol } from "./types"; +import { isBindingPattern, isExternalModuleAugmentation, hasEffectiveModifier, getTextOfNode, hasSyntacticModifier, isInJSFile, isLateVisibilityPaintedStatement, isThisIdentifier, getFirstIdentifier, isPartOfTypeNode, AnyImportSyntax, hasDynamicName, skipParentheses, nodeIsPresent, isAmbientDeclaration } from "./utils"; + + +export function createEmitResolver(file: SourceFile, options: CompilerOptions, packageModuleType: ResolutionMode) { + + const { getNodeLinks, resolveName } = bindSourceFile(file, options, packageModuleType); + + + function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration): boolean { + if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node)) { + // TODO: Make sure this is a valid approximation for literal types + return !node.type && 'initializer' in node && !!node.initializer && isLiteralExpression(node.initializer); + // Original TS version + // return isFreshLiteralType(getTypeOfSymbol(getSymbolOfNode(node))); + } + return false; + } + + + 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); + } + + return { + isDeclarationVisible, + isLiteralConstDeclaration, + createLiteralConstValue(node) { + return 'initializer' in node && node.initializer; + }, + isLateBound(node): node is LateBoundDeclaration { + const name = getNameOfDeclaration(node); + return !hasDynamicName(node) || isIdentifierComputedName(name) + }, + isImplementationOfOverload(node) { + function getSignaturesOfSymbol(symbol: BasicSymbol | undefined): Node[] { + if(!symbol) return emptyArray; + if(symbol.signatureDeclarations) return symbol.signatureDeclarations; + + if (!symbol || !symbol.declarations) return (symbol.signatureDeclarations = emptyArray); + const result: Node[] = symbol.signatureDeclarations = []; + for (let i = 0; i < symbol.declarations.length; i++) { + const decl = symbol.declarations[i]; + if (!isFunctionLike(decl) || isGetAccessor(decl) || isSetAccessor(decl)) { + // If non methods got merged in a class member bail with an empty array + // This is TS error behavior and we want to preserve iot as much as possible + // if(isClassElement(decl)) { + // return emptyArray; + // } + 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 = node.symbol; + const signaturesOfSymbol = getSignaturesOfSymbol(symbol as unknown as BasicSymbol); + // 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(name) { + return undefined; + }, + isExpandoFunctionDeclaration(){ + // Always return false, we don' support expando functions in isolatedDeclarations + return false; + }, + getSymbolOfExternalModuleSpecifier() { + return undefined; + }, + isImportRequiredByAugmentation() { + return false; + }, + } as Partial as EmitResolver + + + function isDeclarationReadonly(declaration: Declaration): boolean { + return !!(getCombinedModifierFlags(declaration) & ModifierFlags.Readonly && !isParameterPropertyDeclaration(declaration, declaration.parent)); + } + + /** @internal */ + function isVarConst(node: VariableDeclaration | VariableDeclarationList): boolean { + return !!(getCombinedNodeFlags(node) & NodeFlags.Const); + } + + function isDeclarationVisible(node: Node): boolean { + if (node) { + const links = getNodeLinks(node); + if (links.isVisible === undefined) { + links.isVisible = links.symbol?.isVisible ?? !!determineIfDeclarationIsVisible(); + } + 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 (!(getCombinedModifierFlags(node as Declaration) & ModifierFlags.Export) && + !(node.kind !== SyntaxKind.ImportEqualsDeclaration && parent.kind !== SyntaxKind.SourceFile && isAmbientDeclaration(parent))) { + 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 hasVisibleDeclarations(symbol: BasicSymbol, 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); + if (symbol && symbol.flags & SymbolFlags.TypeParameter && meaning & SymbolFlags.Type) { + return { accessibility: SymbolAccessibility.Accessible }; + } + if (!symbol && isThisIdentifier(firstIdentifier) + // TODO: isolatedDeclarations: Just assume this is accessible + // && isSymbolAccessible(getSymbolOfNode(getThisContainer(firstIdentifier, /*includeArrowFunctions*/ false)), firstIdentifier, meaning, /*computeAliases*/ false).accessibility === SymbolAccessibility.Accessible + ) { + // TODO: isolatedDeclarations: Is this ever hit for declarations ? + // debugger; + return { accessibility: SymbolAccessibility.Accessible }; + } + + // Verify if the symbol is accessible + return (symbol && hasVisibleDeclarations(symbol, /*shouldComputeAliasToMakeVisible*/ true)) || { + // TODO: isolatedDeclarations: In TS this would be an inaccessible symbol, but TS will give errors we just transform + // We don't actually keep enough information for full accessibility, + // We just do this to mark accessible imports + accessibility: SymbolAccessibility.Accessible, + errorSymbolName: getTextOfNode(firstIdentifier), + errorNode: firstIdentifier + }; + } +} + +/** @internal */ +export function getRootDeclaration(node: Node): Node { + while (node.kind === SyntaxKind.BindingElement) { + node = node.parent.parent; + } + return node; +} + +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; +} + +// Isolated declarations never support global source files. +function isGlobalSourceFile(node: Node) { + return isSourceFile(node) && !isExternalModule(node); +} +export function isExternalModule(file: SourceFile): boolean { + return file.externalModuleIndicator !== undefined; +} + +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; + } +} diff --git a/external-declarations/src/compiler/lang-utils.ts b/external-declarations/src/compiler/lang-utils.ts new file mode 100644 index 0000000000000..d73d66117c17e --- /dev/null +++ b/external-declarations/src/compiler/lang-utils.ts @@ -0,0 +1,945 @@ +import { MapLike, SortedArray, SortedReadonlyArray } from "typescript"; + + +export type Mutable = { -readonly [K in keyof T]: T[K] }; + + +/** @internal */ +export type EqualityComparer = (a: T, b: T) => boolean; + +/** @internal */ +export type Comparer = (a: T, b: T) => Comparison; + +export function forEach(array: readonly T[] | undefined, callback: (element: T, index: number) => U | undefined): U | undefined { + if (array) { + for (let i = 0; i < array.length; i++) { + const result = callback(array[i], i); + if (result) { + return result; + } + } + } + return undefined; +} + + + +/** @internal */ +export function concatenate(array1: T[], array2: T[]): T[]; +/** @internal */ +export function concatenate(array1: readonly T[], array2: readonly T[]): readonly T[]; +/** @internal */ +export function concatenate(array1: T[] | undefined, array2: T[] | undefined): T[]; +/** @internal */ +export function concatenate(array1: readonly T[] | undefined, array2: readonly T[] | undefined): readonly T[]; +/** @internal */ +export function concatenate(array1: undefined | readonly T[], array2: undefined | readonly T[]): undefined | T[] | readonly T[] { + if (!some(array2)) return array1; + if (!some(array1)) return array2; + return [...array1, ...array2]; +} + + +/** @internal */ +export function some(array: readonly T[] | undefined): array is readonly T[]; +/** @internal */ +export function some(array: readonly T[] | undefined, predicate: (value: T) => boolean): boolean; +/** @internal */ +export function some(array: readonly T[] | undefined, predicate?: (value: T) => boolean): boolean { + if (array) { + if (predicate) { + for (const v of array) { + if (predicate(v)) { + return true; + } + } + } + else { + return array.length > 0; + } + } + return false; +} + + +/** @internal */ +export function stringContains(str: string, substring: string): boolean { + return str.indexOf(substring) !== -1; +} + + +/** + * Filters an array by a predicate function. Returns the same array instance if the predicate is + * true for all elements, otherwise returns a new array instance containing the filtered subset. + * + * @internal + */ + export function filter(array: T[], f: (x: T) => x is U): U[]; + /** @internal */ + export function filter(array: T[], f: (x: T) => boolean): T[]; + /** @internal */ + export function filter(array: readonly T[], f: (x: T) => x is U): readonly U[]; + /** @internal */ + export function filter(array: readonly T[], f: (x: T) => boolean): readonly T[]; + /** @internal */ + export function filter(array: T[] | undefined, f: (x: T) => x is U): U[] | undefined; + /** @internal */ + export function filter(array: T[] | undefined, f: (x: T) => boolean): T[] | undefined; + /** @internal */ + export function filter(array: readonly T[] | undefined, f: (x: T) => x is U): readonly U[] | undefined; + /** @internal */ + export function filter(array: readonly T[] | undefined, f: (x: T) => boolean): readonly T[] | undefined; + /** @internal */ + export function filter(array: readonly T[] | undefined, f: (x: T) => boolean): readonly T[] | undefined { + if (array) { + const len = array.length; + let i = 0; + while (i < len && f(array[i])) i++; + if (i < len) { + const result = array.slice(0, i); + i++; + while (i < len) { + const item = array[i]; + if (f(item)) { + result.push(item); + } + i++; + } + return result; + } + } + return array; + } + + /** + * @return Whether the value was added. + * + * @internal + */ +export function pushIfUnique(array: T[], toAdd: T, equalityComparer?: EqualityComparer): boolean { + if (contains(array, toAdd, equalityComparer)) { + return false; + } + else { + array.push(toAdd); + return true; + } +} + +/** @internal */ +export function contains(array: readonly T[] | undefined, value: T, equalityComparer: EqualityComparer = equateValues): boolean { + if (array) { + for (const v of array) { + if (equalityComparer(v, value)) { + return true; + } + } + } + return false; +} + + +/** @internal */ +export const enum Comparison { + LessThan = -1, + EqualTo = 0, + GreaterThan = 1 +} +export function equateValues(a: T, b: T) { + return a === b; +} + +/** @internal */ +export function length(array: readonly any[] | undefined): number { + return array ? array.length : 0; +} + + +/** + * Flattens an array containing a mix of array or non-array elements. + * + * @param array The array to flatten. + * + * @internal + */ + export function flatten(array: T[][] | readonly (T | readonly T[] | undefined)[]): T[] { + const result: T[] = []; + for (const v of array) { + if (v) { + if (isArray(v)) { + addRange(result, v); + } + else { + result.push(v); + } + } + } + return result; +} + + + +/** + * Tests whether a value is an array. + * + * @internal + */ + export function isArray(value: any): value is readonly unknown[] { + return Array.isArray ? Array.isArray(value) : value instanceof Array; +} + + + + +/** + * Appends a range of value to an array, returning the array. + * + * @param to The array to which `value` is to be appended. If `to` is `undefined`, a new array + * is created if `value` was appended. + * @param from The values to append to the array. If `from` is `undefined`, nothing is + * appended. If an element of `from` is `undefined`, that element is not appended. + * @param start The offset in `from` at which to start copying values. + * @param end The offset in `from` at which to stop copying values (non-inclusive). + * + * @internal + */ + export function addRange(to: T[], from: readonly T[] | undefined, start?: number, end?: number): T[]; + /** @internal */ + export function addRange(to: T[] | undefined, from: readonly T[] | undefined, start?: number, end?: number): T[] | undefined; + /** @internal */ + export function addRange(to: T[] | undefined, from: readonly T[] | undefined, start?: number, end?: number): T[] | undefined { + if (from === undefined || from.length === 0) return to; + if (to === undefined) return from.slice(start, end); + start = start === undefined ? 0 : toOffset(from, start); + end = end === undefined ? from.length : toOffset(from, end); + for (let i = start; i < end && i < from.length; i++) { + if (from[i] !== undefined) { + to.push(from[i]); + } + } + return to; + } + +/** + * Gets the actual offset into an array for a relative offset. Negative offsets indicate a + * position offset from the end of the array. + */ +function toOffset(array: readonly any[], offset: number) { + return offset < 0 ? array.length + offset : offset; +} + + +/** @internal */ +export function map(array: readonly T[], f: (x: T, i: number) => U): U[]; +/** @internal */ +export function map(array: readonly T[] | undefined, f: (x: T, i: number) => U): U[] | undefined; +/** @internal */ +export function map(array: readonly T[] | undefined, f: (x: T, i: number) => U): U[] | undefined { + let result: U[] | undefined; + if (array) { + result = []; + for (let i = 0; i < array.length; i++) { + result.push(f(array[i], i)); + } + } + return result; +} + + + +/** + * Compacts an array, removing any falsey elements. + * + * @internal + */ + export function compact(array: (T | undefined | null | false | 0 | "")[]): T[]; + /** @internal */ + export function compact(array: readonly (T | undefined | null | false | 0 | "")[]): readonly T[]; + // ESLint thinks these can be combined with the above - they cannot; they'd produce higher-priority inferences and prevent the falsey types from being stripped + /** @internal */ + export function compact(array: T[]): T[]; // eslint-disable-line @typescript-eslint/unified-signatures + /** @internal */ + export function compact(array: readonly T[]): readonly T[]; // eslint-disable-line @typescript-eslint/unified-signatures + /** @internal */ + export function compact(array: T[]): T[] { + let result: T[] | undefined; + if (array) { + for (let i = 0; i < array.length; i++) { + const v = array[i]; + if (result || !v) { + if (!result) { + result = array.slice(0, i); + } + if (v) { + result.push(v); + } + } + } + } + return result || array; + } + + +/** + * Maps an array. If the mapped value is an array, it is spread into the result. + * + * @param array The array to map. + * @param mapfn The callback used to map the result into one or more values. + * + * @internal + */ + export function flatMap(array: readonly T[] | undefined, mapfn: (x: T, i: number) => U | readonly U[] | undefined): readonly U[] { + let result: U[] | undefined; + if (array) { + for (let i = 0; i < array.length; i++) { + const v = mapfn(array[i], i); + if (v) { + if (isArray(v)) { + result = addRange(result, v); + } + else { + result = append(result, v); + } + } + } + } + return result || emptyArray; +} + +/** @internal */ +export const emptyArray: never[] = [] as never[]; + + + +/** + * Appends a value to an array, returning the array. + * + * @param to The array to which `value` is to be appended. If `to` is `undefined`, a new array + * is created if `value` was appended. + * @param value The value to append to the array. If `value` is `undefined`, nothing is + * appended. + * + * @internal + */ + export function append[number] | undefined>(to: TArray, value: TValue): [undefined, undefined] extends [TArray, TValue] ? TArray : NonNullable[number][]; + /** @internal */ + export function append(to: T[], value: T | undefined): T[]; + /** @internal */ + export function append(to: T[] | undefined, value: T): T[]; + /** @internal */ + export function append(to: T[] | undefined, value: T | undefined): T[] | undefined; + /** @internal */ + export function append(to: Push, value: T | undefined): void; + /** @internal */ + export function append(to: T[], value: T | undefined): T[] | undefined { + if (value === undefined) return to; + if (to === undefined) return [value]; + to.push(value); + return to; + } + +/** Array that is only intended to be pushed to, never read. */ +export interface Push { + push(...values: T[]): void; + /** @internal */ readonly length: number; +} + + +/** + * Stable sort of an array. Elements equal to each other maintain their relative position in the array. + * + * @internal + */ + export function stableSort(array: readonly T[], comparer: Comparer): SortedReadonlyArray { + const indices = indicesOf(array); + stableSortIndices(array, indices, comparer); + return indices.map(i => array[i]) as SortedArray as SortedReadonlyArray; +} +function selectIndex(_: unknown, i: number) { + return i; +} + +function stableSortIndices(array: readonly T[], indices: number[], comparer: Comparer) { + // sort indices by value then position + indices.sort((x, y) => comparer(array[x], array[y]) || compareValues(x, y)); +} + +/** + * Works like Array.prototype.find, returning `undefined` if no element satisfying the predicate is found. + * + * @internal + */ + export function find(array: readonly T[] | undefined, predicate: (element: T, index: number) => element is U, startIndex?: number): U | undefined; + /** @internal */ + export function find(array: readonly T[] | undefined, predicate: (element: T, index: number) => boolean, startIndex?: number): T | undefined; + /** @internal */ + export function find(array: readonly T[] | undefined, predicate: (element: T, index: number) => boolean, startIndex?: number): T | undefined { + if (array === undefined) return undefined; + for (let i = startIndex ?? 0; i < array.length; i++) { + const value = array[i]; + if (predicate(value, i)) { + return value; + } + } + return undefined; + } + + +/** + * Returns the last element of an array if non-empty, `undefined` otherwise. + * + * @internal + */ + export function lastOrUndefined(array: readonly T[] | undefined): T | undefined { + return array === undefined || array.length === 0 ? undefined : array[array.length - 1]; +} + +/** @internal */ +export function last(array: readonly T[]): T { + return array[array.length - 1]; +} + +/** @internal */ +export function indicesOf(array: readonly unknown[]): number[] { + return array.map(selectIndex); +} + +/** @internal */ +export function findLastIndex(array: readonly T[] | undefined, predicate: (element: T, index: number) => boolean, startIndex?: number): number { + if (array === undefined) return -1; + for (let i = startIndex ?? array.length - 1; i >= 0; i--) { + if (predicate(array[i], i)) { + return i; + } + } + return -1; +} + +/** + * Compare the equality of two strings using a case-sensitive ordinal comparison. + * + * Case-sensitive comparisons compare both strings one code-point at a time using the integer + * value of each code-point after applying `toUpperCase` to each string. We always map both + * strings to their upper-case form as some unicode characters do not properly round-trip to + * lowercase (such as `ẞ` (German sharp capital s)). + * + * @internal + */ + export function equateStringsCaseInsensitive(a: string, b: string) { + return a === b + || a !== undefined + && b !== undefined + && a.toUpperCase() === b.toUpperCase(); +} + +/** + * Compare the equality of two strings using a case-sensitive ordinal comparison. + * + * Case-sensitive comparisons compare both strings one code-point at a time using the + * integer value of each code-point. + * + * @internal + */ + export function equateStringsCaseSensitive(a: string, b: string) { + return equateValues(a, b); +} + +function compareComparableValues(a: string | undefined, b: string | undefined): Comparison; +function compareComparableValues(a: number | undefined, b: number | undefined): Comparison; +function compareComparableValues(a: string | number | undefined, b: string | number | undefined) { + return a === b ? Comparison.EqualTo : + a === undefined ? Comparison.LessThan : + b === undefined ? Comparison.GreaterThan : + a < b ? Comparison.LessThan : + Comparison.GreaterThan; +} + +/** + * Compare two numeric values for their order relative to each other. + * To compare strings, use any of the `compareStrings` functions. + * + * @internal + */ +export function compareValues(a: number | undefined, b: number | undefined): Comparison { + return compareComparableValues(a, b); +} + + +/** + * Compare two strings using a case-insensitive ordinal comparison. + * + * Ordinal comparisons are based on the difference between the unicode code points of both + * strings. Characters with multiple unicode representations are considered unequal. Ordinal + * comparisons provide predictable ordering, but place "a" after "B". + * + * Case-insensitive comparisons compare both strings one code-point at a time using the integer + * value of each code-point after applying `toUpperCase` to each string. We always map both + * strings to their upper-case form as some unicode characters do not properly round-trip to + * lowercase (such as `ẞ` (German sharp capital s)). + * + * @internal + */ + export function compareStringsCaseInsensitive(a: string, b: string) { + if (a === b) return Comparison.EqualTo; + if (a === undefined) return Comparison.LessThan; + if (b === undefined) return Comparison.GreaterThan; + a = a.toUpperCase(); + b = b.toUpperCase(); + return a < b ? Comparison.LessThan : a > b ? Comparison.GreaterThan : Comparison.EqualTo; +} + +/** + * Compare two strings using a case-sensitive ordinal comparison. + * + * Ordinal comparisons are based on the difference between the unicode code points of both + * strings. Characters with multiple unicode representations are considered unequal. Ordinal + * comparisons provide predictable ordering, but place "a" after "B". + * + * Case-sensitive comparisons compare both strings one code-point at a time using the integer + * value of each code-point. + * + * @internal + */ + export function compareStringsCaseSensitive(a: string | undefined, b: string | undefined): Comparison { + return compareComparableValues(a, b); +} + +/** @internal */ +export function getStringComparer(ignoreCase?: boolean) { + return ignoreCase ? compareStringsCaseInsensitive : compareStringsCaseSensitive; +} + + +/** + * Iterates through `array` by index and performs the callback on each element of array until the callback + * returns a falsey value, then returns false. + * If no such value is found, the callback is applied to each element of array and `true` is returned. + * + * @internal + */ + export function every(array: readonly T[] | undefined, callback: (element: T, index: number) => boolean): boolean { + if (array) { + for (let i = 0; i < array.length; i++) { + if (!callback(array[i], i)) { + return false; + } + } + } + + return true; +} + + +/** @internal */ +export function mapDefined(array: readonly T[] | undefined, mapFn: (x: T, i: number) => U | undefined): U[] { + const result: U[] = []; + if (array) { + for (let i = 0; i < array.length; i++) { + const mapped = mapFn(array[i], i); + if (mapped !== undefined) { + result.push(mapped); + } + } + } + return result; +} + + +/** + * Shims `Array.from`. + * + * @internal + */ + export function arrayFrom(iterator: Iterator | IterableIterator, map: (t: T) => U): U[]; + /** @internal */ + export function arrayFrom(iterator: Iterator | IterableIterator): T[]; + /** @internal */ + export function arrayFrom(iterator: Iterator | IterableIterator, map?: (t: T) => U): (T | U)[] { + const result: (T | U)[] = []; + for (let iterResult = iterator.next(); !iterResult.done; iterResult = iterator.next()) { + result.push(map ? map(iterResult.value) : iterResult.value); + } + return result; + } + + /** @internal */ +export function startsWith(str: string, prefix: string): boolean { + return str.lastIndexOf(prefix, 0) === 0; +} + + +/** @internal */ +export function endsWith(str: string, suffix: string): boolean { + const expectedPos = str.length - suffix.length; + return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos; +} + +/** @internal */ +export function removeSuffix(str: string, suffix: string): string { + return endsWith(str, suffix) ? str.slice(0, str.length - suffix.length) : str; +} + +/** @internal */ +export function tryRemoveSuffix(str: string, suffix: string): string | undefined { + return endsWith(str, suffix) ? str.slice(0, str.length - suffix.length) : undefined; +} + + +/** + * Returns lower case string + * + * @internal + */ + export function toLowerCase(x: string) { + return x.toLowerCase(); +} + + +/** + * Returns its argument. + * + * @internal + */ + export function identity(x: T) { + return x; +} + + +/** + * Remove an item from an array, moving everything to its right one space left. + * + * @internal + */ + export function orderedRemoveItem(array: T[], item: T): boolean { + for (let i = 0; i < array.length; i++) { + if (array[i] === item) { + orderedRemoveItemAt(array, i); + return true; + } + } + return false; +} + + +/** + * Remove an item by index from an array, moving everything to its right one space left. + * + * @internal + */ + export function orderedRemoveItemAt(array: T[], index: number): void { + // This seems to be faster than either `array.splice(i, 1)` or `array.copyWithin(i, i+ 1)`. + for (let i = index; i < array.length - 1; i++) { + array[i] = array[i + 1]; + } + array.pop(); +} + +export function getEntries(obj: MapLike): [string, T][] { + return obj ? _entries(obj) : []; +} + +const _entries = Object.entries || ((obj: MapLike) => { + const keys = getOwnKeys(obj); + const result: [string, T][] = Array(keys.length); + for (let i = 0; i < keys.length; i++) { + result[i] = [keys[i], obj[keys[i]]]; + } + return result; +}); + +const hasOwnProperty = Object.prototype.hasOwnProperty; + +/** + * Gets the owned, enumerable property keys of a map-like. + * + * @internal + */ + export function getOwnKeys(map: MapLike): string[] { + const keys: string[] = []; + for (const key in map) { + if (hasOwnProperty.call(map, key)) { + keys.push(key); + } + } + + return keys; +} + +/** @internal */ +export function tryCast(value: TIn | undefined, test: (value: TIn) => value is TOut): TOut | undefined; +/** @internal */ +export function tryCast(value: T, test: (value: T) => boolean): T | undefined; +/** @internal */ +export function tryCast(value: T, test: (value: T) => boolean): T | undefined { + return value !== undefined && test(value) ? value : undefined; +} + + +/** + * Like `forEach`, but suitable for use with numbers and strings (which may be falsy). + * + * @internal + */ + export function firstDefined(array: readonly T[] | undefined, callback: (element: T, index: number) => U | undefined): U | undefined { + if (array === undefined) { + return undefined; + } + + for (let i = 0; i < array.length; i++) { + const result = callback(array[i], i); + if (result !== undefined) { + return result; + } + } + return undefined; +} + +/** + * True is greater than false. + * + * @internal + */ + export function compareBooleans(a: boolean, b: boolean): Comparison { + return compareValues(a ? 1 : 0, b ? 1 : 0); +} + +/** + * Tests whether a value is string + * + * @internal + */ + export function isString(text: unknown): text is string { + return typeof text === "string"; +} +/** @internal */ +export function isNumber(x: unknown): x is number { + return typeof x === "number"; +} + + +/** + * patternOrStrings contains both patterns (containing "*") and regular strings. + * Return an exact match if possible, or a pattern match, or undefined. + * (These are verified by verifyCompilerOptions to have 0 or 1 "*" characters.) + * + * @internal + */ + export function matchPatternOrExact(patternOrStrings: readonly (string | Pattern)[], candidate: string): string | Pattern | undefined { + const patterns: Pattern[] = []; + for (const patternOrString of patternOrStrings) { + if (patternOrString === candidate) { + return candidate; + } + + if (!isString(patternOrString)) { + patterns.push(patternOrString); + } + } + + return findBestPatternMatch(patterns, _ => _, candidate); +} + +/** + * Represents a "prefix*suffix" pattern. + * + * @internal + */ + export interface Pattern { + prefix: string; + suffix: string; +} + + +/** + * Return the object corresponding to the best pattern to match `candidate`. + * + * @internal + */ + export function findBestPatternMatch(values: readonly T[], getPattern: (value: T) => Pattern, candidate: string): T | undefined { + let matchedValue: T | undefined; + // use length of prefix as betterness criteria + let longestMatchPrefixLength = -1; + + for (const v of values) { + const pattern = getPattern(v); + if (isPatternMatch(pattern, candidate) && pattern.prefix.length > longestMatchPrefixLength) { + longestMatchPrefixLength = pattern.prefix.length; + matchedValue = v; + } + } + + return matchedValue; +} + +/** @internal */ +export function isPatternMatch({ prefix, suffix }: Pattern, candidate: string) { + return candidate.length >= prefix.length + suffix.length && + startsWith(candidate, prefix) && + endsWith(candidate, suffix); +} + +/** @internal */ +export function tryParsePatterns(paths: MapLike): (string | Pattern)[] { + return mapDefined(getOwnKeys(paths), path => tryParsePattern(path)); +} +/** + * Returns the input if there are no stars, a pattern if there is exactly one, + * and undefined if there are more. + * + * @internal + */ +export function tryParsePattern(pattern: string): string | Pattern | undefined { + const indexOfStar = pattern.indexOf("*"); + if (indexOfStar === -1) { + return pattern; + } + return pattern.indexOf("*", indexOfStar + 1) !== -1 + ? undefined + : { + prefix: pattern.substr(0, indexOfStar), + suffix: pattern.substr(indexOfStar + 1) + }; +} + + +/** @internal */ +export function min(items: readonly [T, ...T[]], compare: Comparer): T; +/** @internal */ +export function min(items: readonly T[], compare: Comparer): T | undefined; +/** @internal */ +export function min(items: readonly T[], compare: Comparer): T | undefined { + return reduceLeft(items, (x, y) => compare(x, y) === Comparison.LessThan ? x : y); +} + +/** @internal */ +export function reduceLeft(array: readonly T[] | undefined, f: (memo: U, value: T, i: number) => U, initial: U, start?: number, count?: number): U; +/** @internal */ +export function reduceLeft(array: readonly T[], f: (memo: T, value: T, i: number) => T): T | undefined; +/** @internal */ +export function reduceLeft(array: T[], f: (memo: T, value: T, i: number) => T, initial?: T, start?: number, count?: number): T | undefined { + if (array && array.length > 0) { + const size = array.length; + if (size > 0) { + let pos = start === undefined || start < 0 ? 0 : start; + const end = count === undefined || pos + count > size - 1 ? size - 1 : pos + count; + let result: T; + if (arguments.length <= 2) { + result = array[pos]; + pos++; + } + else { + result = initial!; + } + while (pos <= end) { + result = f(result, array[pos], pos); + pos++; + } + return result; + } + } + return initial; +} + +export const trimString = (s: string) => s.trim(); + +/** + * Unlike `pushIfUnique`, this can take `undefined` as an input, and returns a new array. + * + * @internal + */ + export function appendIfUnique(array: T[] | undefined, toAdd: T, equalityComparer?: EqualityComparer): T[] { + if (array) { + pushIfUnique(array, toAdd, equalityComparer); + return array; + } + else { + return [toAdd]; + } +} + +export function isNullOrUndefined(x: any): x is null | undefined { + return x === undefined || x === null; // eslint-disable-line no-null/no-null +} + + +/** + * Performs a binary search, finding the index at which `value` occurs in `array`. + * If no such index is found, returns the 2's-complement of first index at which + * `array[index]` exceeds `value`. + * @param array A sorted array whose first element must be no larger than number + * @param value The value to be searched for in the array. + * @param keySelector A callback used to select the search key from `value` and each element of + * `array`. + * @param keyComparer A callback used to compare two keys in a sorted array. + * @param offset An offset into `array` at which to start the search. + * + * @internal + */ + export function binarySearch(array: readonly T[], value: T, keySelector: (v: T) => U, keyComparer: Comparer, offset?: number): number { + return binarySearchKey(array, keySelector(value), keySelector, keyComparer, offset); +} + +/** + * Performs a binary search, finding the index at which an object with `key` occurs in `array`. + * If no such index is found, returns the 2's-complement of first index at which + * `array[index]` exceeds `key`. + * @param array A sorted array whose first element must be no larger than number + * @param key The key to be searched for in the array. + * @param keySelector A callback used to select the search key from each element of `array`. + * @param keyComparer A callback used to compare two keys in a sorted array. + * @param offset An offset into `array` at which to start the search. + * + * @internal + */ +export function binarySearchKey(array: readonly T[], key: U, keySelector: (v: T, i: number) => U, keyComparer: Comparer, offset?: number): number { + if (!some(array)) { + return -1; + } + + let low = offset || 0; + let high = array.length - 1; + while (low <= high) { + const middle = low + ((high - low) >> 1); + const midKey = keySelector(array[middle], middle); + switch (keyComparer(midKey, key)) { + case Comparison.LessThan: + low = middle + 1; + break; + case Comparison.EqualTo: + return middle; + case Comparison.GreaterThan: + high = middle - 1; + break; + } + } + + return ~low; +} + + +/** + * Works like Array.prototype.findIndex, returning `-1` if no element satisfying the predicate is found. + * + * @internal + */ + export function findIndex(array: readonly T[] | undefined, predicate: (element: T, index: number) => boolean, startIndex?: number): number { + if (array === undefined) return -1; + for (let i = startIndex ?? 0; i < array.length; i++) { + if (predicate(array[i], i)) { + return i; + } + } + return -1; +} + + +/** @internal */ +export function clone(object: T): T { + const result: any = {}; + for (const id in object) { + if (hasOwnProperty.call(object, id)) { + result[id] = (object as any)[id]; + } + } + return result; +} \ No newline at end of file diff --git a/external-declarations/src/compiler/path-utils.ts b/external-declarations/src/compiler/path-utils.ts new file mode 100644 index 0000000000000..1e7e8f3e0a0f8 --- /dev/null +++ b/external-declarations/src/compiler/path-utils.ts @@ -0,0 +1,1097 @@ +import { Extension, Path } from "typescript"; +import { Debug } from "./debug"; +import { stringContains, identity, startsWith, equateStringsCaseSensitive, some, Comparison, compareValues, endsWith, lastOrUndefined, equateStringsCaseInsensitive, compareStringsCaseInsensitive, compareStringsCaseSensitive, getStringComparer, toLowerCase } from "./lang-utils"; +import { CharacterCodes, GetCanonicalFileName } from "./types"; + +/** + * Internally, we represent paths as strings with '/' as the directory separator. + * When we make system calls (eg: LanguageServiceHost.getDirectory()), + * we expect the host to correctly handle paths in our specified format. + * + * @internal + */ +export const directorySeparator = "/"; +/** @internal */ +export const altDirectorySeparator = "\\"; +const urlSchemeSeparator = "://"; +const backslashRegExp = /\\/g; + +//// Path Tests + +/** + * Determines whether a charCode corresponds to `/` or `\`. + * + * @internal + */ +export function isAnyDirectorySeparator(charCode: number): boolean { + return charCode === CharacterCodes.slash || charCode === CharacterCodes.backslash; +} + +/** + * Determines whether a path starts with a URL scheme (e.g. starts with `http://`, `ftp://`, `file://`, etc.). + * + * @internal + */ +export function isUrl(path: string) { + return getEncodedRootLength(path) < 0; +} + +/** + * Determines whether a path is an absolute disk path (e.g. starts with `/`, or a dos path + * like `c:`, `c:\` or `c:/`). + * + * @internal + */ +export function isRootedDiskPath(path: string) { + return getEncodedRootLength(path) > 0; +} + +/** + * Determines whether a path consists only of a path root. + * + * @internal + */ +export function isDiskPathRoot(path: string) { + const rootLength = getEncodedRootLength(path); + return rootLength > 0 && rootLength === path.length; +} + +/** + * Determines whether a path starts with an absolute path component (i.e. `/`, `c:/`, `file://`, etc.). + * + * ```ts + * // POSIX + * pathIsAbsolute("/path/to/file.ext") === true + * // DOS + * pathIsAbsolute("c:/path/to/file.ext") === true + * // URL + * pathIsAbsolute("file:///path/to/file.ext") === true + * // Non-absolute + * pathIsAbsolute("path/to/file.ext") === false + * pathIsAbsolute("./path/to/file.ext") === false + * ``` + * + * @internal + */ +export function pathIsAbsolute(path: string): boolean { + return getEncodedRootLength(path) !== 0; +} + +/** + * Determines whether a path starts with a relative path component (i.e. `.` or `..`). + * + * @internal + */ +export function pathIsRelative(path: string): boolean { + return /^\.\.?($|[\\/])/.test(path); +} + +/** + * Determines whether a path is neither relative nor absolute, e.g. "path/to/file". + * Also known misleadingly as "non-relative". + * + * @internal + */ +export function pathIsBareSpecifier(path: string): boolean { + return !pathIsAbsolute(path) && !pathIsRelative(path); +} + +/** @internal */ +export function hasExtension(fileName: string): boolean { + return stringContains(getBaseFileName(fileName), "."); +} + +/** @internal */ +export function fileExtensionIs(path: string, extension: string): boolean { + return path.length > extension.length && endsWith(path, extension); +} + +/** @internal */ +export function fileExtensionIsOneOf(path: string, extensions: readonly string[]): boolean { + for (const extension of extensions) { + if (fileExtensionIs(path, extension)) { + return true; + } + } + + return false; +} + +/** + * Determines whether a path has a trailing separator (`/` or `\\`). + * + * @internal + */ +export function hasTrailingDirectorySeparator(path: string) { + return path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1)); +} + +//// Path Parsing + +function isVolumeCharacter(charCode: number) { + return (charCode >= CharacterCodes.a && charCode <= CharacterCodes.z) || + (charCode >= CharacterCodes.A && charCode <= CharacterCodes.Z); +} + +function getFileUrlVolumeSeparatorEnd(url: string, start: number) { + const ch0 = url.charCodeAt(start); + if (ch0 === CharacterCodes.colon) return start + 1; + if (ch0 === CharacterCodes.percent && url.charCodeAt(start + 1) === CharacterCodes._3) { + const ch2 = url.charCodeAt(start + 2); + if (ch2 === CharacterCodes.a || ch2 === CharacterCodes.A) return start + 3; + } + return -1; +} + +/** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * If the root is part of a URL, the twos-complement of the root length is returned. + */ +function getEncodedRootLength(path: string): number { + if (!path) return 0; + const ch0 = path.charCodeAt(0); + + // POSIX or UNC + if (ch0 === CharacterCodes.slash || ch0 === CharacterCodes.backslash) { + if (path.charCodeAt(1) !== ch0) return 1; // POSIX: "/" (or non-normalized "\") + + const p1 = path.indexOf(ch0 === CharacterCodes.slash ? directorySeparator : altDirectorySeparator, 2); + if (p1 < 0) return path.length; // UNC: "//server" or "\\server" + + return p1 + 1; // UNC: "//server/" or "\\server\" + } + + // DOS + if (isVolumeCharacter(ch0) && path.charCodeAt(1) === CharacterCodes.colon) { + const ch2 = path.charCodeAt(2); + if (ch2 === CharacterCodes.slash || ch2 === CharacterCodes.backslash) return 3; // DOS: "c:/" or "c:\" + if (path.length === 2) return 2; // DOS: "c:" (but not "c:d") + } + + // URL + const schemeEnd = path.indexOf(urlSchemeSeparator); + if (schemeEnd !== -1) { + const authorityStart = schemeEnd + urlSchemeSeparator.length; + const authorityEnd = path.indexOf(directorySeparator, authorityStart); + if (authorityEnd !== -1) { // URL: "file:///", "file://server/", "file://server/path" + // For local "file" URLs, include the leading DOS volume (if present). + // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a + // special case interpreted as "the machine from which the URL is being interpreted". + const scheme = path.slice(0, schemeEnd); + const authority = path.slice(authorityStart, authorityEnd); + if (scheme === "file" && (authority === "" || authority === "localhost") && + isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { + const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); + if (volumeSeparatorEnd !== -1) { + if (path.charCodeAt(volumeSeparatorEnd) === CharacterCodes.slash) { + // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/" + return ~(volumeSeparatorEnd + 1); + } + if (volumeSeparatorEnd === path.length) { + // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a" + // but not "file:///c:d" or "file:///c%3ad" + return ~volumeSeparatorEnd; + } + } + } + return ~(authorityEnd + 1); // URL: "file://server/", "http://server/" + } + return ~path.length; // URL: "file://server", "http://server" + } + + // relative + return 0; +} + +/** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * + * For example: + * ```ts + * getRootLength("a") === 0 // "" + * getRootLength("/") === 1 // "/" + * getRootLength("c:") === 2 // "c:" + * getRootLength("c:d") === 0 // "" + * getRootLength("c:/") === 3 // "c:/" + * getRootLength("c:\\") === 3 // "c:\\" + * getRootLength("//server") === 7 // "//server" + * getRootLength("//server/share") === 8 // "//server/" + * getRootLength("\\\\server") === 7 // "\\\\server" + * getRootLength("\\\\server\\share") === 8 // "\\\\server\\" + * getRootLength("file:///path") === 8 // "file:///" + * getRootLength("file:///c:") === 10 // "file:///c:" + * getRootLength("file:///c:d") === 8 // "file:///" + * getRootLength("file:///c:/path") === 11 // "file:///c:/" + * getRootLength("file://server") === 13 // "file://server" + * getRootLength("file://server/path") === 14 // "file://server/" + * getRootLength("http://server") === 13 // "http://server" + * getRootLength("http://server/path") === 14 // "http://server/" + * ``` + * + * @internal + */ +export function getRootLength(path: string) { + const rootLength = getEncodedRootLength(path); + return rootLength < 0 ? ~rootLength : rootLength; +} + +/** + * Returns the path except for its basename. Semantics align with NodeJS's `path.dirname` + * except that we support URLs as well. + * + * ```ts + * // POSIX + * getDirectoryPath("/path/to/file.ext") === "/path/to" + * getDirectoryPath("/path/to/") === "/path" + * getDirectoryPath("/") === "/" + * // DOS + * getDirectoryPath("c:/path/to/file.ext") === "c:/path/to" + * getDirectoryPath("c:/path/to/") === "c:/path" + * getDirectoryPath("c:/") === "c:/" + * getDirectoryPath("c:") === "c:" + * // URL + * getDirectoryPath("http://typescriptlang.org/path/to/file.ext") === "http://typescriptlang.org/path/to" + * getDirectoryPath("http://typescriptlang.org/path/to") === "http://typescriptlang.org/path" + * getDirectoryPath("http://typescriptlang.org/") === "http://typescriptlang.org/" + * getDirectoryPath("http://typescriptlang.org") === "http://typescriptlang.org" + * ``` + * + * @internal + */ +export function getDirectoryPath(path: Path): Path; +/** + * Returns the path except for its basename. Semantics align with NodeJS's `path.dirname` + * except that we support URLs as well. + * + * ```ts + * // POSIX + * getDirectoryPath("/path/to/file.ext") === "/path/to" + * getDirectoryPath("/path/to/") === "/path" + * getDirectoryPath("/") === "/" + * // DOS + * getDirectoryPath("c:/path/to/file.ext") === "c:/path/to" + * getDirectoryPath("c:/path/to/") === "c:/path" + * getDirectoryPath("c:/") === "c:/" + * getDirectoryPath("c:") === "c:" + * // URL + * getDirectoryPath("http://typescriptlang.org/path/to/file.ext") === "http://typescriptlang.org/path/to" + * getDirectoryPath("http://typescriptlang.org/path/to") === "http://typescriptlang.org/path" + * getDirectoryPath("http://typescriptlang.org/") === "http://typescriptlang.org/" + * getDirectoryPath("http://typescriptlang.org") === "http://typescriptlang.org" + * getDirectoryPath("file://server/path/to/file.ext") === "file://server/path/to" + * getDirectoryPath("file://server/path/to") === "file://server/path" + * getDirectoryPath("file://server/") === "file://server/" + * getDirectoryPath("file://server") === "file://server" + * getDirectoryPath("file:///path/to/file.ext") === "file:///path/to" + * getDirectoryPath("file:///path/to") === "file:///path" + * getDirectoryPath("file:///") === "file:///" + * getDirectoryPath("file://") === "file://" + * ``` + * + * @internal + */ +export function getDirectoryPath(path: string): string; +/** @internal */ +export function getDirectoryPath(path: string): string { + path = normalizeSlashes(path); + + // If the path provided is itself the root, then return it. + const rootLength = getRootLength(path); + if (rootLength === path.length) return path; + + // return the leading portion of the path up to the last (non-terminal) directory separator + // but not including any trailing directory separator. + path = removeTrailingDirectorySeparator(path); + return path.slice(0, Math.max(rootLength, path.lastIndexOf(directorySeparator))); +} + +/** + * Returns the path except for its containing directory name. + * Semantics align with NodeJS's `path.basename` except that we support URL's as well. + * + * ```ts + * // POSIX + * getBaseFileName("/path/to/file.ext") === "file.ext" + * getBaseFileName("/path/to/") === "to" + * getBaseFileName("/") === "" + * // DOS + * getBaseFileName("c:/path/to/file.ext") === "file.ext" + * getBaseFileName("c:/path/to/") === "to" + * getBaseFileName("c:/") === "" + * getBaseFileName("c:") === "" + * // URL + * getBaseFileName("http://typescriptlang.org/path/to/file.ext") === "file.ext" + * getBaseFileName("http://typescriptlang.org/path/to/") === "to" + * getBaseFileName("http://typescriptlang.org/") === "" + * getBaseFileName("http://typescriptlang.org") === "" + * getBaseFileName("file://server/path/to/file.ext") === "file.ext" + * getBaseFileName("file://server/path/to/") === "to" + * getBaseFileName("file://server/") === "" + * getBaseFileName("file://server") === "" + * getBaseFileName("file:///path/to/file.ext") === "file.ext" + * getBaseFileName("file:///path/to/") === "to" + * getBaseFileName("file:///") === "" + * getBaseFileName("file://") === "" + * ``` + * + * @internal + */ +export function getBaseFileName(path: string): string; +/** + * Gets the portion of a path following the last (non-terminal) separator (`/`). + * Semantics align with NodeJS's `path.basename` except that we support URL's as well. + * If the base name has any one of the provided extensions, it is removed. + * + * ```ts + * getBaseFileName("/path/to/file.ext", ".ext", true) === "file" + * getBaseFileName("/path/to/file.js", ".ext", true) === "file.js" + * getBaseFileName("/path/to/file.js", [".ext", ".js"], true) === "file" + * getBaseFileName("/path/to/file.ext", ".EXT", false) === "file.ext" + * ``` + * + * @internal + */ +export function getBaseFileName(path: string, extensions: string | readonly string[], ignoreCase: boolean): string; +/** @internal */ +export function getBaseFileName(path: string, extensions?: string | readonly string[], ignoreCase?: boolean) { + path = normalizeSlashes(path); + + // if the path provided is itself the root, then it has not file name. + const rootLength = getRootLength(path); + if (rootLength === path.length) return ""; + + // return the trailing portion of the path starting after the last (non-terminal) directory + // separator but not including any trailing directory separator. + path = removeTrailingDirectorySeparator(path); + const name = path.slice(Math.max(getRootLength(path), path.lastIndexOf(directorySeparator) + 1)); + const extension = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(name, extensions, ignoreCase) : undefined; + return extension ? name.slice(0, name.length - extension.length) : name; +} + +function tryGetExtensionFromPath(path: string, extension: string, stringEqualityComparer: (a: string, b: string) => boolean) { + if (!startsWith(extension, ".")) extension = "." + extension; + if (path.length >= extension.length && path.charCodeAt(path.length - extension.length) === CharacterCodes.dot) { + const pathExtension = path.slice(path.length - extension.length); + if (stringEqualityComparer(pathExtension, extension)) { + return pathExtension; + } + } +} + +function getAnyExtensionFromPathWorker(path: string, extensions: string | readonly string[], stringEqualityComparer: (a: string, b: string) => boolean) { + if (typeof extensions === "string") { + return tryGetExtensionFromPath(path, extensions, stringEqualityComparer) || ""; + } + for (const extension of extensions) { + const result = tryGetExtensionFromPath(path, extension, stringEqualityComparer); + if (result) return result; + } + return ""; +} + +/** + * Gets the file extension for a path. + * + * ```ts + * getAnyExtensionFromPath("/path/to/file.ext") === ".ext" + * getAnyExtensionFromPath("/path/to/file.ext/") === ".ext" + * getAnyExtensionFromPath("/path/to/file") === "" + * getAnyExtensionFromPath("/path/to.ext/file") === "" + * ``` + * + * @internal + */ +export function getAnyExtensionFromPath(path: string): string; +/** + * Gets the file extension for a path, provided it is one of the provided extensions. + * + * ```ts + * getAnyExtensionFromPath("/path/to/file.ext", ".ext", true) === ".ext" + * getAnyExtensionFromPath("/path/to/file.js", ".ext", true) === "" + * getAnyExtensionFromPath("/path/to/file.js", [".ext", ".js"], true) === ".js" + * getAnyExtensionFromPath("/path/to/file.ext", ".EXT", false) === "" + * + * @internal + */ +export function getAnyExtensionFromPath(path: string, extensions: string | readonly string[], ignoreCase: boolean): string; +/** @internal */ +export function getAnyExtensionFromPath(path: string, extensions?: string | readonly string[], ignoreCase?: boolean): string { + // Retrieves any string from the final "." onwards from a base file name. + // Unlike extensionFromPath, which throws an exception on unrecognized extensions. + if (extensions) { + return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(path), extensions, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive); + } + const baseFileName = getBaseFileName(path); + const extensionIndex = baseFileName.lastIndexOf("."); + if (extensionIndex >= 0) { + return baseFileName.substring(extensionIndex); + } + return ""; +} + +function pathComponents(path: string, rootLength: number) { + const root = path.substring(0, rootLength); + const rest = path.substring(rootLength).split(directorySeparator); + if (rest.length && !lastOrUndefined(rest)) rest.pop(); + return [root, ...rest]; +} + +/** + * Parse a path into an array containing a root component (at index 0) and zero or more path + * components (at indices > 0). The result is not normalized. + * If the path is relative, the root component is `""`. + * If the path is absolute, the root component includes the first path separator (`/`). + * + * ```ts + * // POSIX + * getPathComponents("/path/to/file.ext") === ["/", "path", "to", "file.ext"] + * getPathComponents("/path/to/") === ["/", "path", "to"] + * getPathComponents("/") === ["/"] + * // DOS + * getPathComponents("c:/path/to/file.ext") === ["c:/", "path", "to", "file.ext"] + * getPathComponents("c:/path/to/") === ["c:/", "path", "to"] + * getPathComponents("c:/") === ["c:/"] + * getPathComponents("c:") === ["c:"] + * // URL + * getPathComponents("http://typescriptlang.org/path/to/file.ext") === ["http://typescriptlang.org/", "path", "to", "file.ext"] + * getPathComponents("http://typescriptlang.org/path/to/") === ["http://typescriptlang.org/", "path", "to"] + * getPathComponents("http://typescriptlang.org/") === ["http://typescriptlang.org/"] + * getPathComponents("http://typescriptlang.org") === ["http://typescriptlang.org"] + * getPathComponents("file://server/path/to/file.ext") === ["file://server/", "path", "to", "file.ext"] + * getPathComponents("file://server/path/to/") === ["file://server/", "path", "to"] + * getPathComponents("file://server/") === ["file://server/"] + * getPathComponents("file://server") === ["file://server"] + * getPathComponents("file:///path/to/file.ext") === ["file:///", "path", "to", "file.ext"] + * getPathComponents("file:///path/to/") === ["file:///", "path", "to"] + * getPathComponents("file:///") === ["file:///"] + * getPathComponents("file://") === ["file://"] + * ``` + * + * @internal + */ +export function getPathComponents(path: string, currentDirectory = "") { + path = combinePaths(currentDirectory, path); + return pathComponents(path, getRootLength(path)); +} + +//// Path Formatting + +/** + * Formats a parsed path consisting of a root component (at index 0) and zero or more path + * segments (at indices > 0). + * + * ```ts + * getPathFromPathComponents(["/", "path", "to", "file.ext"]) === "/path/to/file.ext" + * ``` + * + * @internal + */ +export function getPathFromPathComponents(pathComponents: readonly string[]) { + if (pathComponents.length === 0) return ""; + + const root = pathComponents[0] && ensureTrailingDirectorySeparator(pathComponents[0]); + return root + pathComponents.slice(1).join(directorySeparator); +} + +//// Path Normalization + +/** + * Normalize path separators, converting `\` into `/`. + * + * @internal + */ +export function normalizeSlashes(path: string): string { + return path.indexOf("\\") !== -1 + ? path.replace(backslashRegExp, directorySeparator) + : path; +} + +/** + * Reduce an array of path components to a more simplified path by navigating any + * `"."` or `".."` entries in the path. + * + * @internal + */ +export function reducePathComponents(components: readonly string[]) { + if (!some(components)) return []; + const reduced = [components[0]]; + for (let i = 1; i < components.length; i++) { + const component = components[i]; + if (!component) continue; + if (component === ".") continue; + if (component === "..") { + if (reduced.length > 1) { + if (reduced[reduced.length - 1] !== "..") { + reduced.pop(); + continue; + } + } + else if (reduced[0]) continue; + } + reduced.push(component); + } + return reduced; +} + +/** + * Combines paths. If a path is absolute, it replaces any previous path. Relative paths are not simplified. + * + * ```ts + * // Non-rooted + * combinePaths("path", "to", "file.ext") === "path/to/file.ext" + * combinePaths("path", "dir", "..", "to", "file.ext") === "path/dir/../to/file.ext" + * // POSIX + * combinePaths("/path", "to", "file.ext") === "/path/to/file.ext" + * combinePaths("/path", "/to", "file.ext") === "/to/file.ext" + * // DOS + * combinePaths("c:/path", "to", "file.ext") === "c:/path/to/file.ext" + * combinePaths("c:/path", "c:/to", "file.ext") === "c:/to/file.ext" + * // URL + * combinePaths("file:///path", "to", "file.ext") === "file:///path/to/file.ext" + * combinePaths("file:///path", "file:///to", "file.ext") === "file:///to/file.ext" + * ``` + * + * @internal + */ +export function combinePaths(path: string, ...paths: (string | undefined)[]): string { + if (path) path = normalizeSlashes(path); + for (let relativePath of paths) { + if (!relativePath) continue; + relativePath = normalizeSlashes(relativePath); + if (!path || getRootLength(relativePath) !== 0) { + path = relativePath; + } + else { + path = ensureTrailingDirectorySeparator(path) + relativePath; + } + } + return path; +} + +/** + * Combines and resolves paths. If a path is absolute, it replaces any previous path. Any + * `.` and `..` path components are resolved. Trailing directory separators are preserved. + * + * ```ts + * resolvePath("/path", "to", "file.ext") === "path/to/file.ext" + * resolvePath("/path", "to", "file.ext/") === "path/to/file.ext/" + * resolvePath("/path", "dir", "..", "to", "file.ext") === "path/to/file.ext" + * ``` + * + * @internal + */ +export function resolvePath(path: string, ...paths: (string | undefined)[]): string { + return normalizePath(some(paths) ? combinePaths(path, ...paths) : normalizeSlashes(path)); +} + +/** + * Parse a path into an array containing a root component (at index 0) and zero or more path + * components (at indices > 0). The result is normalized. + * If the path is relative, the root component is `""`. + * If the path is absolute, the root component includes the first path separator (`/`). + * + * ```ts + * getNormalizedPathComponents("to/dir/../file.ext", "/path/") === ["/", "path", "to", "file.ext"] + * ``` + * + * @internal + */ +export function getNormalizedPathComponents(path: string, currentDirectory: string | undefined) { + return reducePathComponents(getPathComponents(path, currentDirectory)); +} + +/** @internal */ +export function getNormalizedAbsolutePath(fileName: string, currentDirectory: string | undefined) { + return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); +} + +/** @internal */ +export function normalizePath(path: string): string { + path = normalizeSlashes(path); + // Most paths don't require normalization + if (!relativePathSegmentRegExp.test(path)) { + return path; + } + // Some paths only require cleanup of `/./` or leading `./` + const simplified = path.replace(/\/\.\//g, "/").replace(/^\.\//, ""); + if (simplified !== path) { + path = simplified; + if (!relativePathSegmentRegExp.test(path)) { + return path; + } + } + // Other paths require full normalization + const normalized = getPathFromPathComponents(reducePathComponents(getPathComponents(path))); + return normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized; +} + +function getPathWithoutRoot(pathComponents: readonly string[]) { + if (pathComponents.length === 0) return ""; + return pathComponents.slice(1).join(directorySeparator); +} + +/** @internal */ +export function getNormalizedAbsolutePathWithoutRoot(fileName: string, currentDirectory: string | undefined) { + return getPathWithoutRoot(getNormalizedPathComponents(fileName, currentDirectory)); +} + +/** @internal */ +export function toPath(fileName: string, basePath: string | undefined, getCanonicalFileName: (path: string) => string): Path { + const nonCanonicalizedPath = isRootedDiskPath(fileName) + ? normalizePath(fileName) + : getNormalizedAbsolutePath(fileName, basePath); + return getCanonicalFileName(nonCanonicalizedPath) as Path; +} + +//// Path Mutation + +/** + * Removes a trailing directory separator from a path, if it does not already have one. + * + * ```ts + * removeTrailingDirectorySeparator("/path/to/file.ext") === "/path/to/file.ext" + * removeTrailingDirectorySeparator("/path/to/file.ext/") === "/path/to/file.ext" + * ``` + * + * @internal + */ +export function removeTrailingDirectorySeparator(path: Path): Path; +/** @internal */ +export function removeTrailingDirectorySeparator(path: string): string; +/** @internal */ +export function removeTrailingDirectorySeparator(path: string) { + if (hasTrailingDirectorySeparator(path)) { + return path.substr(0, path.length - 1); + } + + return path; +} + +/** + * Adds a trailing directory separator to a path, if it does not already have one. + * + * ```ts + * ensureTrailingDirectorySeparator("/path/to/file.ext") === "/path/to/file.ext/" + * ensureTrailingDirectorySeparator("/path/to/file.ext/") === "/path/to/file.ext/" + * ``` + * + * @internal + */ +export function ensureTrailingDirectorySeparator(path: Path): Path; +/** @internal */ +export function ensureTrailingDirectorySeparator(path: string): string; +/** @internal */ +export function ensureTrailingDirectorySeparator(path: string) { + if (!hasTrailingDirectorySeparator(path)) { + return path + directorySeparator; + } + + return path; +} + +/** + * Ensures a path is either absolute (prefixed with `/` or `c:`) or dot-relative (prefixed + * with `./` or `../`) so as not to be confused with an unprefixed module name. + * + * ```ts + * ensurePathIsNonModuleName("/path/to/file.ext") === "/path/to/file.ext" + * ensurePathIsNonModuleName("./path/to/file.ext") === "./path/to/file.ext" + * ensurePathIsNonModuleName("../path/to/file.ext") === "../path/to/file.ext" + * ensurePathIsNonModuleName("path/to/file.ext") === "./path/to/file.ext" + * ``` + * + * @internal + */ +export function ensurePathIsNonModuleName(path: string): string { + return !pathIsAbsolute(path) && !pathIsRelative(path) ? "./" + path : path; +} + +/** + * Changes the extension of a path to the provided extension. + * + * ```ts + * changeAnyExtension("/path/to/file.ext", ".js") === "/path/to/file.js" + * ``` + * + * @internal + */ +export function changeAnyExtension(path: string, ext: string): string; +/** + * Changes the extension of a path to the provided extension if it has one of the provided extensions. + * + * ```ts + * changeAnyExtension("/path/to/file.ext", ".js", ".ext") === "/path/to/file.js" + * changeAnyExtension("/path/to/file.ext", ".js", ".ts") === "/path/to/file.ext" + * changeAnyExtension("/path/to/file.ext", ".js", [".ext", ".ts"]) === "/path/to/file.js" + * ``` + * + * @internal + */ +export function changeAnyExtension(path: string, ext: string, extensions: string | readonly string[], ignoreCase: boolean): string; +/** @internal */ +export function changeAnyExtension(path: string, ext: string, extensions?: string | readonly string[], ignoreCase?: boolean) { + const pathext = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(path, extensions, ignoreCase) : getAnyExtensionFromPath(path); + return pathext ? path.slice(0, path.length - pathext.length) + (startsWith(ext, ".") ? ext : "." + ext) : path; +} + +//// Path Comparisons + +// check path for these segments: '', '.'. '..' +const relativePathSegmentRegExp = /(?:\/\/)|(?:^|\/)\.\.?(?:$|\/)/; + +function comparePathsWorker(a: string, b: string, componentComparer: (a: string, b: string) => Comparison) { + if (a === b) return Comparison.EqualTo; + if (a === undefined) return Comparison.LessThan; + if (b === undefined) return Comparison.GreaterThan; + + // NOTE: Performance optimization - shortcut if the root segments differ as there would be no + // need to perform path reduction. + const aRoot = a.substring(0, getRootLength(a)); + const bRoot = b.substring(0, getRootLength(b)); + const result = compareStringsCaseInsensitive(aRoot, bRoot); + if (result !== Comparison.EqualTo) { + return result; + } + + // NOTE: Performance optimization - shortcut if there are no relative path segments in + // the non-root portion of the path + const aRest = a.substring(aRoot.length); + const bRest = b.substring(bRoot.length); + if (!relativePathSegmentRegExp.test(aRest) && !relativePathSegmentRegExp.test(bRest)) { + return componentComparer(aRest, bRest); + } + + // The path contains a relative path segment. Normalize the paths and perform a slower component + // by component comparison. + const aComponents = reducePathComponents(getPathComponents(a)); + const bComponents = reducePathComponents(getPathComponents(b)); + const sharedLength = Math.min(aComponents.length, bComponents.length); + for (let i = 1; i < sharedLength; i++) { + const result = componentComparer(aComponents[i], bComponents[i]); + if (result !== Comparison.EqualTo) { + return result; + } + } + return compareValues(aComponents.length, bComponents.length); +} + +/** + * Performs a case-sensitive comparison of two paths. Path roots are always compared case-insensitively. + * + * @internal + */ +export function comparePathsCaseSensitive(a: string, b: string) { + return comparePathsWorker(a, b, compareStringsCaseSensitive); +} + +/** + * Performs a case-insensitive comparison of two paths. + * + * @internal + */ +export function comparePathsCaseInsensitive(a: string, b: string) { + return comparePathsWorker(a, b, compareStringsCaseInsensitive); +} + +/** + * Compare two paths using the provided case sensitivity. + * + * @internal + */ +export function comparePaths(a: string, b: string, ignoreCase?: boolean): Comparison; +/** @internal */ +export function comparePaths(a: string, b: string, currentDirectory: string, ignoreCase?: boolean): Comparison; +/** @internal */ +export function comparePaths(a: string, b: string, currentDirectory?: string | boolean, ignoreCase?: boolean) { + if (typeof currentDirectory === "string") { + a = combinePaths(currentDirectory, a); + b = combinePaths(currentDirectory, b); + } + else if (typeof currentDirectory === "boolean") { + ignoreCase = currentDirectory; + } + return comparePathsWorker(a, b, getStringComparer(ignoreCase)); +} + +/** + * Determines whether a `parent` path contains a `child` path using the provide case sensitivity. + * + * @internal + */ +export function containsPath(parent: string, child: string, ignoreCase?: boolean): boolean; +/** @internal */ +export function containsPath(parent: string, child: string, currentDirectory: string, ignoreCase?: boolean): boolean; +/** @internal */ +export function containsPath(parent: string, child: string, currentDirectory?: string | boolean, ignoreCase?: boolean) { + if (typeof currentDirectory === "string") { + parent = combinePaths(currentDirectory, parent); + child = combinePaths(currentDirectory, child); + } + else if (typeof currentDirectory === "boolean") { + ignoreCase = currentDirectory; + } + if (parent === undefined || child === undefined) return false; + if (parent === child) return true; + const parentComponents = reducePathComponents(getPathComponents(parent)); + const childComponents = reducePathComponents(getPathComponents(child)); + if (childComponents.length < parentComponents.length) { + return false; + } + + const componentEqualityComparer = ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive; + for (let i = 0; i < parentComponents.length; i++) { + const equalityComparer = i === 0 ? equateStringsCaseInsensitive : componentEqualityComparer; + if (!equalityComparer(parentComponents[i], childComponents[i])) { + return false; + } + } + + return true; +} + +/** + * Determines whether `fileName` starts with the specified `directoryName` using the provided path canonicalization callback. + * Comparison is case-sensitive between the canonical paths. + * + * Use `containsPath` if file names are not already reduced and absolute. + * + * @internal + */ +export function startsWithDirectory(fileName: string, directoryName: string, getCanonicalFileName: GetCanonicalFileName): boolean { + const canonicalFileName = getCanonicalFileName(fileName); + const canonicalDirectoryName = getCanonicalFileName(directoryName); + return startsWith(canonicalFileName, canonicalDirectoryName + "/") || startsWith(canonicalFileName, canonicalDirectoryName + "\\"); +} + +//// Relative Paths + +/** @internal */ +export function getPathComponentsRelativeTo(from: string, to: string, stringEqualityComparer: (a: string, b: string) => boolean, getCanonicalFileName: GetCanonicalFileName) { + const fromComponents = reducePathComponents(getPathComponents(from)); + const toComponents = reducePathComponents(getPathComponents(to)); + + let start: number; + for (start = 0; start < fromComponents.length && start < toComponents.length; start++) { + const fromComponent = getCanonicalFileName(fromComponents[start]); + const toComponent = getCanonicalFileName(toComponents[start]); + const comparer = start === 0 ? equateStringsCaseInsensitive : stringEqualityComparer; + if (!comparer(fromComponent, toComponent)) break; + } + + if (start === 0) { + return toComponents; + } + + const components = toComponents.slice(start); + const relative: string[] = []; + for (; start < fromComponents.length; start++) { + relative.push(".."); + } + return ["", ...relative, ...components]; +} + +/** + * Gets a relative path that can be used to traverse between `from` and `to`. + * + * @internal + */ +export function getRelativePathFromDirectory(from: string, to: string, ignoreCase: boolean): string; +/** + * Gets a relative path that can be used to traverse between `from` and `to`. + * + * @internal + */ +export function getRelativePathFromDirectory(fromDirectory: string, to: string, getCanonicalFileName: GetCanonicalFileName): string; // eslint-disable-line @typescript-eslint/unified-signatures +/** @internal */ +export function getRelativePathFromDirectory(fromDirectory: string, to: string, getCanonicalFileNameOrIgnoreCase: GetCanonicalFileName | boolean) { + Debug.assert((getRootLength(fromDirectory) > 0) === (getRootLength(to) > 0), "Paths must either both be absolute or both be relative"); + const getCanonicalFileName = typeof getCanonicalFileNameOrIgnoreCase === "function" ? getCanonicalFileNameOrIgnoreCase : identity; + const ignoreCase = typeof getCanonicalFileNameOrIgnoreCase === "boolean" ? getCanonicalFileNameOrIgnoreCase : false; + const pathComponents = getPathComponentsRelativeTo(fromDirectory, to, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive, getCanonicalFileName); + return getPathFromPathComponents(pathComponents); +} + +/** @internal */ +export function convertToRelativePath(absoluteOrRelativePath: string, basePath: string, getCanonicalFileName: (path: string) => string): string { + return !isRootedDiskPath(absoluteOrRelativePath) + ? absoluteOrRelativePath + : getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); +} + +/** @internal */ +export function getRelativePathFromFile(from: string, to: string, getCanonicalFileName: GetCanonicalFileName) { + return ensurePathIsNonModuleName(getRelativePathFromDirectory(getDirectoryPath(from), to, getCanonicalFileName)); +} + +/** @internal */ +export function getRelativePathToDirectoryOrUrl(directoryPathOrUrl: string, relativeOrAbsolutePath: string, currentDirectory: string, getCanonicalFileName: GetCanonicalFileName, isAbsolutePathAnUrl: boolean) { + const pathComponents = getPathComponentsRelativeTo( + resolvePath(currentDirectory, directoryPathOrUrl), + resolvePath(currentDirectory, relativeOrAbsolutePath), + equateStringsCaseSensitive, + getCanonicalFileName + ); + + const firstComponent = pathComponents[0]; + if (isAbsolutePathAnUrl && isRootedDiskPath(firstComponent)) { + const prefix = firstComponent.charAt(0) === directorySeparator ? "file://" : "file:///"; + pathComponents[0] = prefix + firstComponent; + } + + return getPathFromPathComponents(pathComponents); +} + +//// Path Traversal + +/** + * Calls `callback` on `directory` and every ancestor directory it has, returning the first defined result. + * + * @internal + */ +export function forEachAncestorDirectory(directory: Path, callback: (directory: Path) => T | undefined): T | undefined; +/** @internal */ +export function forEachAncestorDirectory(directory: string, callback: (directory: string) => T | undefined): T | undefined; +/** @internal */ +export function forEachAncestorDirectory(directory: Path, callback: (directory: Path) => T | undefined): T | undefined { + while (true) { + const result = callback(directory); + if (result !== undefined) { + return result; + } + + const parentPath = getDirectoryPath(directory); + if (parentPath === directory) { + return undefined; + } + + directory = parentPath; + } +} + +/** @internal */ +export function isNodeModulesDirectory(dirPath: Path) { + return endsWith(dirPath, "/node_modules"); +} + + +/** + * Case insensitive file systems have descripencies in how they handle some characters (eg. turkish Upper case I with dot on top - \u0130) + * This function is used in places where we want to make file name as a key on these systems + * It is possible on mac to be able to refer to file name with I with dot on top as a fileName with its lower case form + * But on windows we cannot. Windows can have fileName with I with dot on top next to its lower case and they can not each be referred with the lowercase forms + * Technically we would want this function to be platform sepcific as well but + * our api has till now only taken caseSensitive as the only input and just for some characters we dont want to update API and ensure all customers use those api + * We could use upper case and we would still need to deal with the descripencies but + * we want to continue using lower case since in most cases filenames are lowercasewe and wont need any case changes and avoid having to store another string for the key + * So for this function purpose, we go ahead and assume character I with dot on top it as case sensitive since its very unlikely to use lower case form of that special character + * + * @internal + */ + export function toFileNameLowerCase(x: string) { + return fileNameLowerCaseRegExp.test(x) ? + x.replace(fileNameLowerCaseRegExp, toLowerCase) : + x; +} + + +// We convert the file names to lower case as key for file name on case insensitive file system +// While doing so we need to handle special characters (eg \u0130) to ensure that we dont convert +// it to lower case, fileName with its lowercase form can exist along side it. +// Handle special characters and make those case sensitive instead +// +// |-#--|-Unicode--|-Char code-|-Desc-------------------------------------------------------------------| +// | 1. | i | 105 | Ascii i | +// | 2. | I | 73 | Ascii I | +// |-------- Special characters ------------------------------------------------------------------------| +// | 3. | \u0130 | 304 | Upper case I with dot above | +// | 4. | i,\u0307 | 105,775 | i, followed by 775: Lower case of (3rd item) | +// | 5. | I,\u0307 | 73,775 | I, followed by 775: Upper case of (4th item), lower case is (4th item) | +// | 6. | \u0131 | 305 | Lower case i without dot, upper case is I (2nd item) | +// | 7. | \u00DF | 223 | Lower case sharp s | +// +// Because item 3 is special where in its lowercase character has its own +// upper case form we cant convert its case. +// Rest special characters are either already in lower case format or +// they have corresponding upper case character so they dont need special handling +// +// But to avoid having to do string building for most common cases, also ignore +// a-z, 0-9, \u0131, \u00DF, \, /, ., : and space +const fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g; + +const extensionsToRemove = [Extension.Dts, Extension.Dmts, Extension.Dcts, Extension.Mjs, Extension.Mts, Extension.Cjs, Extension.Cts, Extension.Ts, Extension.Js, Extension.Tsx, Extension.Jsx, Extension.Json]; +/** @internal */ +export function removeFileExtension(path: string): string { + for (const ext of extensionsToRemove) { + const extensionless = tryRemoveExtension(path, ext); + if (extensionless !== undefined) { + return extensionless; + } + } + return path; +} + + +/** @internal */ +export function tryRemoveExtension(path: string, extension: string): string | undefined { + return fileExtensionIs(path, extension) ? removeExtension(path, extension) : undefined; +} + + +/** @internal */ +export function removeExtension(path: string, extension: string): string { + return path.substring(0, path.length - extension.length); +} + +/** @internal */ +export function compareNumberOfDirectorySeparators(path1: string, path2: string) { + return compareValues( + numberOfDirectorySeparators(path1), + numberOfDirectorySeparators(path2) + ); +} +function numberOfDirectorySeparators(str: string) { + const match = str.match(/\//g); + return match ? match.length : 0; +} + +/** @internal */ +export const ignoredPaths = ["/node_modules/.", "/.git", "/.#"]; + +/** @internal */ +export function containsIgnoredPath(path: string) { + return some(ignoredPaths, p => stringContains(path, p)); +} + + +/** @internal */ +export function createGetCanonicalFileName(useCaseSensitiveFileNames: boolean): GetCanonicalFileName { + return useCaseSensitiveFileNames ? identity : toFileNameLowerCase; +} + + +export function isSourceMapFile(f: string) { + return f.endsWith(".map"); +} +export function isJSONFile(f: string) { + return f.endsWith(Extension.Json); +} +export function isDeclarationFile(f: string) { + return f.endsWith(Extension.Dts) + || f.endsWith(Extension.Dmts) + || f.endsWith(Extension.Dcts); +} +export function isJavaScriptFile(f: string) { + return f.endsWith(Extension.Js) + || f.endsWith(Extension.Jsx) + || f.endsWith(Extension.Cjs) + || f.endsWith(Extension.Mjs); +} + + +export function getDeclarationExtension(path: string) { + return ( + path.endsWith(Extension.Mjs) || path.endsWith(Extension.Mts) ? Extension.Dmts: + path.endsWith(Extension.Cjs) || path.endsWith(Extension.Cts) ? Extension.Dcts: + Extension.Dts + ) +} \ No newline at end of file diff --git a/external-declarations/src/compiler/transform-file.ts b/external-declarations/src/compiler/transform-file.ts new file mode 100644 index 0000000000000..d119e4330498a --- /dev/null +++ b/external-declarations/src/compiler/transform-file.ts @@ -0,0 +1,45 @@ + +import * as ts from 'typescript' +import { transformDeclarations } from './declaration-emit'; +import { createEmitHost } from './emit-host'; +import { createEmitResolver } from './emit-resolver'; +import { TransformationContext } from './types'; + + + +export function transformFile(fileName: string, source: string, allProjectFiles: string[], tsLibFiles: string[], options: ts.CompilerOptions, moduleType: ts.ResolutionMode) { + + let sourceFile = ts.createSourceFile(fileName, source, options.target ?? ts.ScriptTarget.ES3, true, + fileName.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS); + const getCompilerOptions = () => options; + const emitResolver = createEmitResolver(sourceFile, options, moduleType); + const emitHost = createEmitHost(allProjectFiles, tsLibFiles, options); + const diagnostics: ts.Diagnostic[] = [] + const x = transformDeclarations({ + getEmitHost() { + return emitHost; + }, + getEmitResolver() { + return emitResolver; + }, + getCompilerOptions, + factory: ts.factory, + addDiagnostic(diag) { + diagnostics.push(diag) + }, + } as Partial as TransformationContext) + + let result = x(sourceFile); + + + const printer = ts.createPrinter({ + onlyPrintJsDocStyle: true, + newLine: options.newLine ?? ts.NewLineKind.CarriageReturnLineFeed, + target: options.target, + } as ts.PrinterOptions) + + return { + code: printer.printFile(result), + diagnostics, + }; +} diff --git a/external-declarations/src/compiler/transformer.ts b/external-declarations/src/compiler/transformer.ts new file mode 100644 index 0000000000000..33ec2033e285e --- /dev/null +++ b/external-declarations/src/compiler/transformer.ts @@ -0,0 +1,451 @@ +import { Node, NodeFactory, CompilerOptions, TransformerFactory, TransformationResult, SyntaxKind, VariableDeclaration, FunctionDeclaration, Statement, Identifier, EmitHelper, DiagnosticWithLocation, disposeEmitNodes, getParseTreeNode, SourceFile, isSourceFile, EmitFlags, EmitHint, setEmitFlags, NodeFlags } from "typescript"; +import { Debug } from "./debug"; +import { some, append } from "./lang-utils"; +import { EmitResolver, EmitHost, TransformationContext } from "./types"; +import { getEmitFlags, getSourceFileOfNode } from "./utils"; + +/** + * Transforms an array of SourceFiles by passing them through each transformer. + * + * @param resolver The emit resolver provided by the checker. + * @param host The emit host object used to interact with the file system. + * @param options Compiler options to surface in the `TransformationContext`. + * @param nodes An array of nodes to transform. + * @param transforms An array of `TransformerFactory` callbacks. + * @param allowDtsFiles A value indicating whether to allow the transformation of .d.ts files. + * + * @internal + */ + export function transformNodes(resolver: EmitResolver | undefined, host: EmitHost | undefined, factory: NodeFactory, options: CompilerOptions, nodes: readonly T[], transformers: readonly TransformerFactory[], allowDtsFiles: boolean): TransformationResult { + const enabledSyntaxKindFeatures = new Array(SyntaxKind.Count); + let lexicalEnvironmentVariableDeclarations: VariableDeclaration[]; + let lexicalEnvironmentFunctionDeclarations: FunctionDeclaration[]; + let lexicalEnvironmentStatements: Statement[]; + let lexicalEnvironmentFlags = LexicalEnvironmentFlags.None; + let lexicalEnvironmentVariableDeclarationsStack: VariableDeclaration[][] = []; + let lexicalEnvironmentFunctionDeclarationsStack: FunctionDeclaration[][] = []; + let lexicalEnvironmentStatementsStack: Statement[][] = []; + let lexicalEnvironmentFlagsStack: LexicalEnvironmentFlags[] = []; + let lexicalEnvironmentStackOffset = 0; + let lexicalEnvironmentSuspended = false; + let blockScopedVariableDeclarationsStack: Identifier[][] = []; + let blockScopeStackOffset = 0; + let blockScopedVariableDeclarations: Identifier[]; + let emitHelpers: EmitHelper[] | undefined; + let onSubstituteNode: TransformationContext["onSubstituteNode"] = noEmitSubstitution; + let onEmitNode: TransformationContext["onEmitNode"] = noEmitNotification; + let state = TransformationState.Uninitialized; + const diagnostics: DiagnosticWithLocation[] = []; + + // The transformation context is provided to each transformer as part of transformer + // initialization. + const context: TransformationContext = { + factory: factory as TransformationContext['factory'], + getCompilerOptions: () => options, + getEmitResolver: () => resolver!, // TODO: GH#18217 + getEmitHost: () => host!, // TODO: GH#18217 + startLexicalEnvironment, + suspendLexicalEnvironment, + resumeLexicalEnvironment, + endLexicalEnvironment, + hoistVariableDeclaration, + hoistFunctionDeclaration, + requestEmitHelper, + readEmitHelpers, + enableSubstitution, + enableEmitNotification, + isSubstitutionEnabled, + isEmitNotificationEnabled, + get onSubstituteNode() { return onSubstituteNode; }, + set onSubstituteNode(value) { + Debug.assert(state < TransformationState.Initialized, "Cannot modify transformation hooks after initialization has completed."); + Debug.assert(value !== undefined, "Value must not be 'undefined'"); + onSubstituteNode = value; + }, + get onEmitNode() { return onEmitNode; }, + set onEmitNode(value) { + Debug.assert(state < TransformationState.Initialized, "Cannot modify transformation hooks after initialization has completed."); + Debug.assert(value !== undefined, "Value must not be 'undefined'"); + onEmitNode = value; + }, + addDiagnostic(diag) { + console.log(diag.messageText); + }, + getEmitHelperFactory() { + return factory; + }, + }; + + // Ensure the parse tree is clean before applying transformations + for (const node of nodes) { + disposeEmitNodes(getSourceFileOfNode(getParseTreeNode(node))); + } + + + // Chain together and initialize each transformer. + const transformersWithContext = transformers.map(t => t(context)); + const transformation = (node: T): T => { + for (const transform of transformersWithContext) { + node = transform(node); + } + return node; + }; + + // prevent modification of transformation hooks. + state = TransformationState.Initialized; + + // Transform each node. + const transformed: T[] = []; + for (const node of nodes) { + transformed.push((allowDtsFiles ? transformation : transformRoot)(node)); + } + + // prevent modification of the lexical environment. + state = TransformationState.Completed; + + return { + transformed, + substituteNode, + emitNodeWithNotification, + isEmitNotificationEnabled, + dispose, + diagnostics + }; + + function transformRoot(node: T) { + return node && (!isSourceFile(node) || !node.isDeclarationFile) ? transformation(node) : node; + } + + /** + * Enables expression substitutions in the pretty printer for the provided SyntaxKind. + */ + function enableSubstitution(kind: SyntaxKind) { + Debug.assert(state < TransformationState.Completed, "Cannot modify the transformation context after transformation has completed."); + enabledSyntaxKindFeatures[kind] |= SyntaxKindFeatureFlags.Substitution; + } + + /** + * Determines whether expression substitutions are enabled for the provided node. + */ + function isSubstitutionEnabled(node: Node) { + return (enabledSyntaxKindFeatures[node.kind] & SyntaxKindFeatureFlags.Substitution) !== 0 + && (getEmitFlags(node) & EmitFlags.NoSubstitution) === 0; + } + + /** + * Emits a node with possible substitution. + * + * @param hint A hint as to the intended usage of the node. + * @param node The node to emit. + * @param emitCallback The callback used to emit the node or its substitute. + */ + function substituteNode(hint: EmitHint, node: Node) { + Debug.assert(state < TransformationState.Disposed, "Cannot substitute a node after the result is disposed."); + return node && isSubstitutionEnabled(node) && onSubstituteNode(hint, node) || node; + } + + /** + * Enables before/after emit notifications in the pretty printer for the provided SyntaxKind. + */ + function enableEmitNotification(kind: SyntaxKind) { + Debug.assert(state < TransformationState.Completed, "Cannot modify the transformation context after transformation has completed."); + enabledSyntaxKindFeatures[kind] |= SyntaxKindFeatureFlags.EmitNotifications; + } + + /** + * Determines whether before/after emit notifications should be raised in the pretty + * printer when it emits a node. + */ + function isEmitNotificationEnabled(node: Node) { + return (enabledSyntaxKindFeatures[node.kind] & SyntaxKindFeatureFlags.EmitNotifications) !== 0 + || (getEmitFlags(node) & EmitFlags.AdviseOnEmitNode) !== 0; + } + + /** + * Emits a node with possible emit notification. + * + * @param hint A hint as to the intended usage of the node. + * @param node The node to emit. + * @param emitCallback The callback used to emit the node. + */ + function emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) { + Debug.assert(state < TransformationState.Disposed, "Cannot invoke TransformationResult callbacks after the result is disposed."); + if (node) { + // TODO: Remove check and unconditionally use onEmitNode when API is breakingly changed + // (see https://github.com/microsoft/TypeScript/pull/36248/files/5062623f39120171b98870c71344b3242eb03d23#r369766739) + if (isEmitNotificationEnabled(node)) { + onEmitNode(hint, node, emitCallback); + } + else { + emitCallback(hint, node); + } + } + } + + /** + * Records a hoisted variable declaration for the provided name within a lexical environment. + */ + function hoistVariableDeclaration(name: Identifier): void { + Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the lexical environment during initialization."); + Debug.assert(state < TransformationState.Completed, "Cannot modify the lexical environment after transformation has completed."); + const decl = setEmitFlags(factory.createVariableDeclaration(name), EmitFlags.NoNestedSourceMaps); + if (!lexicalEnvironmentVariableDeclarations) { + lexicalEnvironmentVariableDeclarations = [decl]; + } + else { + lexicalEnvironmentVariableDeclarations.push(decl); + } + if (lexicalEnvironmentFlags & LexicalEnvironmentFlags.InParameters) { + lexicalEnvironmentFlags |= LexicalEnvironmentFlags.VariablesHoistedInParameters; + } + } + + /** + * Records a hoisted function declaration within a lexical environment. + */ + function hoistFunctionDeclaration(func: FunctionDeclaration): void { + Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the lexical environment during initialization."); + Debug.assert(state < TransformationState.Completed, "Cannot modify the lexical environment after transformation has completed."); + setEmitFlags(func, EmitFlags.CustomPrologue); + if (!lexicalEnvironmentFunctionDeclarations) { + lexicalEnvironmentFunctionDeclarations = [func]; + } + else { + lexicalEnvironmentFunctionDeclarations.push(func); + } + } + + /** + * Adds an initialization statement to the top of the lexical environment. + */ + function addInitializationStatement(node: Statement): void { + Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the lexical environment during initialization."); + Debug.assert(state < TransformationState.Completed, "Cannot modify the lexical environment after transformation has completed."); + setEmitFlags(node, EmitFlags.CustomPrologue); + if (!lexicalEnvironmentStatements) { + lexicalEnvironmentStatements = [node]; + } + else { + lexicalEnvironmentStatements.push(node); + } + } + + /** + * Starts a new lexical environment. Any existing hoisted variable or function declarations + * are pushed onto a stack, and the related storage variables are reset. + */ + function startLexicalEnvironment(): void { + Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the lexical environment during initialization."); + Debug.assert(state < TransformationState.Completed, "Cannot modify the lexical environment after transformation has completed."); + Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is suspended."); + + // Save the current lexical environment. Rather than resizing the array we adjust the + // stack size variable. This allows us to reuse existing array slots we've + // already allocated between transformations to avoid allocation and GC overhead during + // transformation. + lexicalEnvironmentVariableDeclarationsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentVariableDeclarations; + lexicalEnvironmentFunctionDeclarationsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentFunctionDeclarations; + lexicalEnvironmentStatementsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentStatements; + lexicalEnvironmentFlagsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentFlags; + lexicalEnvironmentStackOffset++; + lexicalEnvironmentVariableDeclarations = undefined!; + lexicalEnvironmentFunctionDeclarations = undefined!; + lexicalEnvironmentStatements = undefined!; + lexicalEnvironmentFlags = LexicalEnvironmentFlags.None; + } + + /** Suspends the current lexical environment, usually after visiting a parameter list. */ + function suspendLexicalEnvironment(): void { + Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the lexical environment during initialization."); + Debug.assert(state < TransformationState.Completed, "Cannot modify the lexical environment after transformation has completed."); + Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is already suspended."); + lexicalEnvironmentSuspended = true; + } + + /** Resumes a suspended lexical environment, usually before visiting a function body. */ + function resumeLexicalEnvironment(): void { + Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the lexical environment during initialization."); + Debug.assert(state < TransformationState.Completed, "Cannot modify the lexical environment after transformation has completed."); + Debug.assert(lexicalEnvironmentSuspended, "Lexical environment is not suspended."); + lexicalEnvironmentSuspended = false; + } + + /** + * Ends a lexical environment. The previous set of hoisted declarations are restored and + * any hoisted declarations added in this environment are returned. + */ + function endLexicalEnvironment(): Statement[] | undefined { + Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the lexical environment during initialization."); + Debug.assert(state < TransformationState.Completed, "Cannot modify the lexical environment after transformation has completed."); + Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is suspended."); + + let statements: Statement[] | undefined; + if (lexicalEnvironmentVariableDeclarations || + lexicalEnvironmentFunctionDeclarations || + lexicalEnvironmentStatements) { + if (lexicalEnvironmentFunctionDeclarations) { + statements = [...lexicalEnvironmentFunctionDeclarations]; + } + + if (lexicalEnvironmentVariableDeclarations) { + const statement = factory.createVariableStatement( + /*modifiers*/ undefined, + factory.createVariableDeclarationList(lexicalEnvironmentVariableDeclarations) + ); + + setEmitFlags(statement, EmitFlags.CustomPrologue); + + if (!statements) { + statements = [statement]; + } + else { + statements.push(statement); + } + } + + if (lexicalEnvironmentStatements) { + if (!statements) { + statements = [...lexicalEnvironmentStatements]; + } + else { + statements = [...statements, ...lexicalEnvironmentStatements]; + } + } + } + + // Restore the previous lexical environment. + lexicalEnvironmentStackOffset--; + lexicalEnvironmentVariableDeclarations = lexicalEnvironmentVariableDeclarationsStack[lexicalEnvironmentStackOffset]; + lexicalEnvironmentFunctionDeclarations = lexicalEnvironmentFunctionDeclarationsStack[lexicalEnvironmentStackOffset]; + lexicalEnvironmentStatements = lexicalEnvironmentStatementsStack[lexicalEnvironmentStackOffset]; + lexicalEnvironmentFlags = lexicalEnvironmentFlagsStack[lexicalEnvironmentStackOffset]; + if (lexicalEnvironmentStackOffset === 0) { + lexicalEnvironmentVariableDeclarationsStack = []; + lexicalEnvironmentFunctionDeclarationsStack = []; + lexicalEnvironmentStatementsStack = []; + lexicalEnvironmentFlagsStack = []; + } + return statements; + } + + function setLexicalEnvironmentFlags(flags: LexicalEnvironmentFlags, value: boolean): void { + lexicalEnvironmentFlags = value ? + lexicalEnvironmentFlags | flags : + lexicalEnvironmentFlags & ~flags; + } + + function getLexicalEnvironmentFlags(): LexicalEnvironmentFlags { + return lexicalEnvironmentFlags; + } + + /** + * Starts a block scope. Any existing block hoisted variables are pushed onto the stack and the related storage variables are reset. + */ + function startBlockScope() { + Debug.assert(state > TransformationState.Uninitialized, "Cannot start a block scope during initialization."); + Debug.assert(state < TransformationState.Completed, "Cannot start a block scope after transformation has completed."); + blockScopedVariableDeclarationsStack[blockScopeStackOffset] = blockScopedVariableDeclarations; + blockScopeStackOffset++; + blockScopedVariableDeclarations = undefined!; + } + + /** + * Ends a block scope. The previous set of block hoisted variables are restored. Any hoisted declarations are returned. + */ + function endBlockScope() { + Debug.assert(state > TransformationState.Uninitialized, "Cannot end a block scope during initialization."); + Debug.assert(state < TransformationState.Completed, "Cannot end a block scope after transformation has completed."); + const statements: Statement[] | undefined = some(blockScopedVariableDeclarations) ? + [ + factory.createVariableStatement( + /*modifiers*/ undefined, + factory.createVariableDeclarationList( + blockScopedVariableDeclarations.map(identifier => factory.createVariableDeclaration(identifier)), + NodeFlags.Let + ) + ) + ] : undefined; + blockScopeStackOffset--; + blockScopedVariableDeclarations = blockScopedVariableDeclarationsStack[blockScopeStackOffset]; + if (blockScopeStackOffset === 0) { + blockScopedVariableDeclarationsStack = []; + } + return statements; + } + + function addBlockScopedVariable(name: Identifier): void { + Debug.assert(blockScopeStackOffset > 0, "Cannot add a block scoped variable outside of an iteration body."); + (blockScopedVariableDeclarations || (blockScopedVariableDeclarations = [])).push(name); + } + + function requestEmitHelper(helper: EmitHelper): void { + Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the transformation context during initialization."); + Debug.assert(state < TransformationState.Completed, "Cannot modify the transformation context after transformation has completed."); + Debug.assert(!helper.scoped, "Cannot request a scoped emit helper."); + if (helper.dependencies) { + for (const h of helper.dependencies) { + requestEmitHelper(h); + } + } + emitHelpers = append(emitHelpers, helper); + } + + function readEmitHelpers(): EmitHelper[] | undefined { + Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the transformation context during initialization."); + Debug.assert(state < TransformationState.Completed, "Cannot modify the transformation context after transformation has completed."); + const helpers = emitHelpers; + emitHelpers = undefined; + return helpers; + } + + function dispose() { + if (state < TransformationState.Disposed) { + // Clean up emit nodes on parse tree + for (const node of nodes) { + disposeEmitNodes(getSourceFileOfNode(getParseTreeNode(node))); + } + + // Release references to external entries for GC purposes. + lexicalEnvironmentVariableDeclarations = undefined!; + lexicalEnvironmentVariableDeclarationsStack = undefined!; + lexicalEnvironmentFunctionDeclarations = undefined!; + lexicalEnvironmentFunctionDeclarationsStack = undefined!; + onSubstituteNode = undefined!; + onEmitNode = undefined!; + emitHelpers = undefined; + + // Prevent further use of the transformation result. + state = TransformationState.Disposed; + } + } +} + +const enum TransformationState { + Uninitialized, + Initialized, + Completed, + Disposed +} + +const enum SyntaxKindFeatureFlags { + Substitution = 1 << 0, + EmitNotifications = 1 << 1, +} + + +/** @internal */ +export const enum LexicalEnvironmentFlags { + None = 0, + InParameters = 1 << 0, // currently visiting a parameter list + VariablesHoistedInParameters = 1 << 1 // a temp variable was hoisted while visiting a parameter list +} + +/** @internal */ +export function noEmitSubstitution(_hint: EmitHint, node: Node) { + return node; +} + +/** @internal */ +export function noEmitNotification(hint: EmitHint, node: Node, callback: (hint: EmitHint, node: Node) => void) { + callback(hint, node); +} \ No newline at end of file diff --git a/external-declarations/src/compiler/types.ts b/external-declarations/src/compiler/types.ts new file mode 100644 index 0000000000000..d764200e1251d --- /dev/null +++ b/external-declarations/src/compiler/types.ts @@ -0,0 +1,502 @@ +import { Symbol, ClassDeclaration, CompilerOptions, DeclarationName, DiagnosticWithLocation, EnumDeclaration, FunctionDeclaration, InterfaceDeclaration, ModuleDeclaration, ModuleKind, Node, PackageJsonInfoCache, Path, QualifiedName, SourceFile, SymbolFlags, TransformationContext as _TransformationContext, TypeAliasDeclaration, VariableStatement, NodeBuilderFlags, Statement, AccessorDeclaration, BindingElement, Declaration, ElementAccessExpression, EntityName, EntityNameOrEntityNameExpression, EnumMember, ExportDeclaration, Expression, Identifier, ImportCall, ImportDeclaration, ImportEqualsDeclaration, ImportTypeNode, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertySignature, SignatureDeclaration, StringLiteralLike, TypeNode, VariableDeclaration, VariableLikeDeclaration, ModuleBlock, LiteralTypeNode, BinaryExpression, ComputedPropertyName, NamedDeclaration, StringLiteral, ParenthesizedExpression, AsExpression, NonNullExpression, PartiallyEmittedExpression, SatisfiesExpression, TypeAssertion, EntityNameExpression, HasModifiers, Modifier, ModifierFlags, Program, UnparsedSource, FileReference, EmitFlags, EmitHelper, SourceMapRange, SynthesizedComment, TextRange, NoSubstitutionTemplateLiteral, MapLike } from "typescript"; +import { AllAccessorDeclarations, AnyImportSyntax, DiagnosticMessage } from "./utils"; + + +/** @internal */ +export interface ResolveModuleNameResolutionHost { + getCanonicalFileName(p: string): string; + getCommonSourceDirectory(): string; + getCurrentDirectory(): string; +} + + +export interface TransformationContext extends _TransformationContext { + addDiagnostic(diag: DiagnosticWithLocation): void; + /** @internal */ getEmitResolver(): EmitResolver; + /** @internal */ getEmitHost(): EmitHost; + /** @internal */ getEmitHelperFactory(): EmitHelperFactory; + factory: _TransformationContext['factory'] & { + updateModifiers(node: T, modifiers: readonly Modifier[] | ModifierFlags | undefined): T; + } +} + +export interface EmitHost extends ModuleSpecifierResolutionHost, ResolveModuleNameResolutionHost { + getCommonSourceDirectory(): string + getCompilerOptions(): CompilerOptions + getSourceFiles(): SourceFile[] + /** @internal */ getSourceFileFromReference(referencingFile: SourceFile | UnparsedSource, ref: FileReference): SourceFile | undefined; + /** @internal */ getLibFileFromReference(ref: FileReference): SourceFile | undefined; +} + +export interface EmitResolver { + hasGlobalName(name: string): boolean; + getReferencedExportContainer(node: Identifier, prefixLocals?: boolean): SourceFile | ModuleDeclaration | EnumDeclaration | undefined; + getReferencedImportDeclaration(node: Identifier): Declaration | undefined; + getReferencedDeclarationWithCollidingName(node: Identifier): Declaration | undefined; + isDeclarationWithCollidingName(node: Declaration): boolean; + isValueAliasDeclaration(node: Node): boolean; + 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, 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; + // 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][] | undefined; + getTypeReferenceDirectivesForSymbol(symbol: Symbol, meaning?: SymbolFlags): [specifier: string, mode: ResolutionMode | undefined][] | 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; +} +/** @internal */ +export interface AmbientModuleDeclaration extends ModuleDeclaration { + readonly body?: ModuleBlock; +} + +export interface EmitHelperFactory { + +} + +export type GetSymbolAccessibilityDiagnostic = (symbolAccessibilityResult: SymbolAccessibilityResult) => (SymbolAccessibilityDiagnostic | undefined); + +/** @internal */ +export interface SymbolAccessibilityDiagnostic { + errorNode: Node; + diagnosticMessage: DiagnosticMessage; + typeName?: DeclarationName | QualifiedName; +} + +export interface SymbolTracker { + // Called when the symbol writer encounters a symbol to write. Currently only used by the + // declaration emitter to help determine if it should patch up the final declaration file + // with import statements it previously saw (but chose not to emit). + trackSymbol?(symbol: Symbol, enclosingDeclaration: Node | undefined, meaning: SymbolFlags): boolean; + reportInaccessibleThisError?(): void; + reportPrivateInBaseOfClassExpression?(propertyName: string): void; + reportInaccessibleUniqueSymbolError?(): void; + reportCyclicStructureError?(): void; + reportLikelyUnsafeImportRequiredError?(specifier: string): void; + reportTruncationError?(): void; + moduleResolverHost?: ModuleSpecifierResolutionHost & { getCommonSourceDirectory(): string }; + trackReferencedAmbientModule?(decl: ModuleDeclaration, symbol: Symbol): void; + trackExternalModuleSymbolOfImportTypeNode?(symbol: Symbol): void; + reportNonlocalAugmentation?(containingFile: SourceFile, parentSymbol: Symbol, augmentingSymbol: Symbol): void; + reportNonSerializableProperty?(propertyName: string): void; + reportImportTypeNodeResolutionModeOverride?(): void; +} + +/** @internal */ +export interface ModuleSpecifierResolutionHost { + useCaseSensitiveFileNames?(): boolean; + fileExists(path: string): boolean; + getCurrentDirectory(): string; + directoryExists?(path: string): boolean; + readFile?(path: string): string | undefined; + realpath?(path: string): string; + getPackageJsonInfoCache?(): PackageJsonInfoCache & { + /** @internal */ getPackageJsonInfo(packageJsonPath: string): PackageJsonInfo | boolean | undefined; + } | undefined; + getGlobalTypingsCacheLocation?(): string | undefined; + getNearestAncestorDirectoryWithPackageJson?(fileName: string, rootDir?: string): string | undefined; + + getProjectReferenceRedirect(fileName: string): string | undefined; + isSourceOfProjectReferenceRedirect(fileName: string): boolean; + + getSymlinkCache?(): { + getSymlinkedDirectoriesByRealpath(): MultiMap | undefined; + }; + readonly redirectTargetsMap: RedirectTargetsMap; +} + +export interface PackageJsonInfo { + packageDirectory: string; + contents: PackageJsonInfoContents; +} +/** @internal */ +export interface PackageJsonInfoContents { + packageJsonContent: PackageJsonPathFields; + versionPaths: VersionPaths | undefined; + /** false: resolved to nothing. undefined: not yet resolved */ + resolvedEntrypoints: string[] | false | undefined; +} +/** @internal */ +export interface VersionPaths { + version: string; + paths: MapLike; +} +export interface PackageJsonPathFields { + typings?: string; + types?: string; + typesVersions?: MapLike>; + main?: string; + tsconfig?: string; + type?: string; + imports?: object; + exports?: object; + name?: string; +} + + +export type RedirectTargetsMap = ReadonlyMap; + +export interface MultiMap extends Map { + /** + * Adds the value to an array of values associated with the key, and returns the array. + * Creates the array if it does not already exist. + */ + add(key: K, value: V): V[]; + /** + * Removes a value from an array of values associated with the key. + * Does not preserve the order of those values. + * Does nothing if `key` is not in `map`, or `value` is not in `map[key]`. + */ + remove(key: K, value: V): void; +} + + +/** @internal */ +export interface SymbolAccessibilityResult extends SymbolVisibilityResult { + errorModuleName?: string; // If the symbol is not visible from module, module's name +} +/** @internal */ +export interface SymbolVisibilityResult { + accessibility: SymbolAccessibility; + aliasesToMakeVisible?: LateVisibilityPaintedStatement[]; // aliases that need to have this symbol visible + errorSymbolName?: string; // Optional symbol name that results in error + errorNode?: Node; // optional node that results in error +} + + +/** @internal */ +export const enum SymbolAccessibility { + Accessible, + NotAccessible, + CannotBeNamed +} + +/** @internal */ +export type LateVisibilityPaintedStatement = + | AnyImportSyntax + | VariableStatement + | ClassDeclaration + | FunctionDeclaration + | ModuleDeclaration + | TypeAliasDeclaration + | InterfaceDeclaration + | EnumDeclaration; + + +/** @internal */ +export type NodeId = number; + +export type ResolutionMode = ModuleKind.ESNext | ModuleKind.CommonJS | undefined; + + +/** @internal */ +export type GetCanonicalFileName = (fileName: string) => string; + + + +/** @internal */ +export const enum CharacterCodes { + nullCharacter = 0, + maxAsciiCharacter = 0x7F, + + lineFeed = 0x0A, // \n + carriageReturn = 0x0D, // \r + lineSeparator = 0x2028, + paragraphSeparator = 0x2029, + nextLine = 0x0085, + + // Unicode 3.0 space characters + space = 0x0020, // " " + nonBreakingSpace = 0x00A0, // + enQuad = 0x2000, + emQuad = 0x2001, + enSpace = 0x2002, + emSpace = 0x2003, + threePerEmSpace = 0x2004, + fourPerEmSpace = 0x2005, + sixPerEmSpace = 0x2006, + figureSpace = 0x2007, + punctuationSpace = 0x2008, + thinSpace = 0x2009, + hairSpace = 0x200A, + zeroWidthSpace = 0x200B, + narrowNoBreakSpace = 0x202F, + ideographicSpace = 0x3000, + mathematicalSpace = 0x205F, + ogham = 0x1680, + + _ = 0x5F, + $ = 0x24, + + _0 = 0x30, + _1 = 0x31, + _2 = 0x32, + _3 = 0x33, + _4 = 0x34, + _5 = 0x35, + _6 = 0x36, + _7 = 0x37, + _8 = 0x38, + _9 = 0x39, + + a = 0x61, + b = 0x62, + c = 0x63, + d = 0x64, + e = 0x65, + f = 0x66, + g = 0x67, + h = 0x68, + i = 0x69, + j = 0x6A, + k = 0x6B, + l = 0x6C, + m = 0x6D, + n = 0x6E, + o = 0x6F, + p = 0x70, + q = 0x71, + r = 0x72, + s = 0x73, + t = 0x74, + u = 0x75, + v = 0x76, + w = 0x77, + x = 0x78, + y = 0x79, + z = 0x7A, + + A = 0x41, + B = 0x42, + C = 0x43, + D = 0x44, + E = 0x45, + F = 0x46, + G = 0x47, + H = 0x48, + I = 0x49, + J = 0x4A, + K = 0x4B, + L = 0x4C, + M = 0x4D, + N = 0x4E, + O = 0x4F, + P = 0x50, + Q = 0x51, + R = 0x52, + S = 0x53, + T = 0x54, + U = 0x55, + V = 0x56, + W = 0x57, + X = 0x58, + Y = 0x59, + Z = 0x5a, + + ampersand = 0x26, // & + asterisk = 0x2A, // * + at = 0x40, // @ + backslash = 0x5C, // \ + backtick = 0x60, // ` + bar = 0x7C, // | + caret = 0x5E, // ^ + closeBrace = 0x7D, // } + closeBracket = 0x5D, // ] + closeParen = 0x29, // ) + colon = 0x3A, // : + comma = 0x2C, // , + dot = 0x2E, // . + doubleQuote = 0x22, // " + equals = 0x3D, // = + exclamation = 0x21, // ! + greaterThan = 0x3E, // > + hash = 0x23, // # + lessThan = 0x3C, // < + minus = 0x2D, // - + openBrace = 0x7B, // { + openBracket = 0x5B, // [ + openParen = 0x28, // ( + percent = 0x25, // % + plus = 0x2B, // + + question = 0x3F, // ? + semicolon = 0x3B, // ; + singleQuote = 0x27, // ' + slash = 0x2F, // / + tilde = 0x7E, // ~ + + backspace = 0x08, // \b + formFeed = 0x0C, // \f + byteOrderMark = 0xFEFF, + tab = 0x09, // \t + verticalTab = 0x0B, // \v +} + + +/** @internal */ +export type LiteralImportTypeNode = ImportTypeNode & { readonly argument: LiteralTypeNode & { readonly literal: StringLiteral } }; + + +/** @internal */ +export interface DynamicNamedDeclaration extends NamedDeclaration { + readonly name: ComputedPropertyName; +} + +/** @internal */ +export interface DynamicNamedBinaryExpression extends BinaryExpression { + readonly left: ElementAccessExpression; +} + + +/** @internal */ +export interface JSDocTypeAssertion extends ParenthesizedExpression { + readonly _jsDocTypeAssertionBrand: never; +} + +export type OuterExpression = ParenthesizedExpression | TypeAssertion | SatisfiesExpression | AsExpression | NonNullExpression | PartiallyEmittedExpression; + +/** @internal */ +export type AnyImportOrReExport = AnyImportSyntax | ExportDeclaration; + + +/** @internal */ +// A declaration that supports late-binding (used in checker) +export interface LateBoundDeclaration extends DynamicNamedDeclaration { + readonly name: LateBoundName; +} + +/** @internal */ +// A name that supports late-binding (used in checker) +export interface LateBoundName extends ComputedPropertyName { + readonly expression: EntityNameExpression; +} + + +/** @internal */ +export interface EmitFileNames { + jsFilePath?: string | undefined; + sourceMapFilePath?: string | undefined; + declarationFilePath?: string | undefined; + declarationMapPath?: string | undefined; + buildInfoPath?: string | undefined; +} + +export type _FileReference = FileReference + + +/** @internal */ +export type ExportedModulesFromDeclarationEmit = readonly Symbol[]; +export type _StringLiteralLike = StringLiteralLike + + +export type _Symbol = Symbol +export type _Path = Path +export type _ModifierFlags = ModifierFlags +declare module 'typescript' { + interface Node { + symbol: _Symbol; + emitNode?: EmitNode; + original: this; + modifierFlagsCache: _ModifierFlags + } + interface Symbol { + isReferenced: boolean; + parent: _Symbol; + } + interface Bundle { + /** @internal */ syntheticFileReferences?: readonly _FileReference[]; + /** @internal */ syntheticTypeReferences?: readonly _FileReference[]; + /** @internal */ syntheticLibReferences?: readonly _FileReference[]; + /** @internal */ hasNoDefaultLib?: boolean; + } + interface SourceFile { + exportedModulesFromDeclarationEmit?: ExportedModulesFromDeclarationEmit; + imports: readonly _StringLiteralLike[]; + path: _Path; + } + interface CompilerOptions { + /** + * The directory of the config file that specified 'paths'. Used to resolve relative paths when 'baseUrl' is absent. + * + * @internal + */ + pathsBasePath?: string; + configFilePath?: _Path; + } +} + + +/** @internal */ +export interface EmitNode { + annotatedNodes?: Node[]; // Tracks Parse-tree nodes with EmitNodes for eventual cleanup. + flags: EmitFlags; // Flags that customize emit + leadingComments?: SynthesizedComment[]; // Synthesized leading comments + trailingComments?: SynthesizedComment[]; // Synthesized trailing comments + commentRange?: TextRange; // The text range to use when emitting leading or trailing comments + sourceMapRange?: SourceMapRange; // The text range to use when emitting leading or trailing source mappings + tokenSourceMapRanges?: (SourceMapRange | undefined)[]; // The text range to use when emitting source mappings for tokens + constantValue?: string | number; // The constant value of an expression + externalHelpersModuleName?: Identifier; // The local name for an imported helpers module + externalHelpers?: boolean; + helpers?: EmitHelper[]; // Emit helpers for the node + startsOnNewLine?: boolean; // If the node should begin on a new line + snippetElement?: SnippetElement; // Snippet element of the node + typeNode?: TypeNode; // VariableDeclaration type +} + +/** @internal */ +export type SnippetElement = TabStop | Placeholder; + +/** @internal */ +export interface TabStop { + kind: SnippetKind.TabStop; + order: number; +} + +/** @internal */ +export interface Placeholder { + kind: SnippetKind.Placeholder; + order: number; +} +// Reference: https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax +/** @internal */ +export const enum SnippetKind { + TabStop, // `$1`, `$2` + Placeholder, // `${1:foo}` + Choice, // `${1|one,two,three|}` + Variable, // `$name`, `${name:default}` +} + + + +/** @internal */ +export interface ModulePath { + path: string; + isInNodeModules: boolean; + isRedirect: boolean; +} \ No newline at end of file diff --git a/external-declarations/src/compiler/utils.ts b/external-declarations/src/compiler/utils.ts new file mode 100644 index 0000000000000..58a5747ca6307 --- /dev/null +++ b/external-declarations/src/compiler/utils.ts @@ -0,0 +1,1872 @@ +import { SourceFile, SyntaxKind, Node, TextSpan, DiagnosticWithLocation, DeclarationName, isPropertySignature, isBindingElement, isCallSignatureDeclaration, isConstructorDeclaration, isConstructSignatureDeclaration, isExpressionWithTypeArguments, isFunctionDeclaration, isGetAccessor, isImportEqualsDeclaration, isIndexSignatureDeclaration, isMethodDeclaration, isMethodSignature, isParameter, isPropertyAccessExpression, isPropertyDeclaration, isSetAccessor, isTypeAliasDeclaration, isTypeParameterDeclaration, isVariableDeclaration, QualifiedName, BindingElement, CallSignatureDeclaration, ConstructorDeclaration, ConstructSignatureDeclaration, ExpressionWithTypeArguments, FunctionDeclaration, GetAccessorDeclaration, ImportEqualsDeclaration, IndexSignatureDeclaration, JSDocCallbackTag, JSDocEnumTag, JSDocTypedefTag, MethodDeclaration, MethodSignature, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertySignature, SetAccessorDeclaration, TypeAliasDeclaration, TypeParameterDeclaration, VariableDeclaration, NamedDeclaration, NodeFlags, ClassLikeDeclaration, FunctionBody, ModifierFlags, getModifiers, ClassDeclaration, EnumDeclaration, InterfaceDeclaration, ModuleDeclaration, VariableStatement, ImportDeclaration, Visitor, AccessorDeclaration, SignatureDeclaration, Identifier, JSDocSignature, isJSDocSignature, getLeadingCommentRanges, Diagnostic, DiagnosticRelatedInformation, JsonSourceFile, ScriptKind, NodeFactory, Path, isModuleDeclaration, isSourceFile, Declaration, getNameOfDeclaration, isElementAccessExpression, BindingPattern, ImportTypeNode, isLiteralTypeNode, isStringLiteral, OuterExpressionKinds, Expression, isStringLiteralLike, isNumericLiteral, NumericLiteral, StringLiteralLike, getJSDocTypeTag, isParenthesizedExpression, EmitFlags, Statement, isExportAssignment, isExportDeclaration, JSDocContainer, HasJSDoc, JSDoc, Bundle, CompilerOptions, Extension, getTsBuildInfoEmitOutputFilePath, ImportCall, ExternalModuleReference, AssertClause, ModuleKind, EntityNameExpression, isIdentifier, PropertyAccessEntityNameExpression, ExportDeclaration, getJSDocAugmentsTag, HeritageClause, NodeArray, isClassElement, isClassStaticBlockDeclaration, isParseTreeNode, ModuleResolutionKind, JsxEmit, isPrefixUnaryExpression, PrefixUnaryExpression, canHaveModifiers, ModifierLike, getJSDocPublicTag, getJSDocPrivateTag, getJSDocProtectedTag, getJSDocOverrideTagNoCache, getJSDocReadonlyTag, getJSDocDeprecatedTag, ScriptTarget, FileExtensionInfo, EntityNameOrEntityNameExpression, isHeritageClause, CallExpression, FunctionLikeDeclaration, HasType, JSDocTemplateTag, TypeAssertion, TsConfigSourceFile, PrinterOptions, NewLineKind, sys, isVariableStatement, isLineBreak, isWhiteSpaceLike, identifierToKeywordKind } from "typescript"; +import { Debug } from "./debug"; +import { Diagnostics } from "./diagnosticInformationMap.generated"; +import { clone, Comparison, contains, emptyArray, find, flatten, identity, isArray, length, mapDefined, Mutable, some, startsWith, stringContains } from "./lang-utils"; +import { combinePaths, comparePaths, ensureTrailingDirectorySeparator, fileExtensionIs, fileExtensionIsOneOf, getNormalizedAbsolutePath, pathIsRelative, removeFileExtension } from "./path-utils"; +import { AmbientModuleDeclaration, AnyImportOrReExport, CharacterCodes, DynamicNamedBinaryExpression, DynamicNamedDeclaration, EmitFileNames, EmitHost, EmitNode, EmitResolver, GetCanonicalFileName, GetSymbolAccessibilityDiagnostic, JSDocTypeAssertion, LiteralImportTypeNode, ModuleSpecifierResolutionHost, OuterExpression, ResolveModuleNameResolutionHost, SymbolAccessibility, SymbolAccessibilityDiagnostic, SymbolAccessibilityResult } from "./types"; + + +export function getErrorSpanForNode(sourceFile: SourceFile, node: Node): TextSpan { + return { + start: node.pos, + length: node.end - node.pos + } +} + +export function createDiagnosticForNode(node: Node, message: DiagnosticMessage, arg0?: string | number, arg1?: string | number, arg2?: string | number, arg3?: string | number): DiagnosticWithLocation { + const sourceFile = getSourceFileOfNode(node); + return createDiagnosticForNodeInSourceFile(sourceFile, node, message, arg0, arg1, arg2, arg3); +} + +/** @internal */ +export function createDiagnosticForNodeInSourceFile(sourceFile: SourceFile, node: Node, message: DiagnosticMessage, arg0?: string | number, arg1?: string | number, arg2?: string | number, arg3?: string | number): DiagnosticWithLocation { + const span = getErrorSpanForNode(sourceFile, node); + return createFileDiagnostic(sourceFile, span.start, span.length, message, arg0, arg1, arg2, arg3); +} + +/** @internal */ +export function addRelatedInfo(diagnostic: T, ...relatedInformation: DiagnosticRelatedInformation[]): T { + if (!relatedInformation.length) { + return diagnostic; + } + if (!diagnostic.relatedInformation) { + diagnostic.relatedInformation = []; + } + Debug.assert(diagnostic.relatedInformation !== emptyArray, "Diagnostic had empty array singleton for related info, but is still being constructed!"); + diagnostic.relatedInformation.push(...relatedInformation); + return diagnostic; +} + +export interface DiagnosticMessage { + key: string; + category: DiagnosticCategory; + code: number; + message: string; + reportsUnnecessary?: {}; + reportsDeprecated?: {}; + /** @internal */ + elidedInCompatabilityPyramid?: boolean; +} + +export enum DiagnosticCategory { + Warning, + Error, + Suggestion, + Message +} + + +/** @internal */ +export function hasStaticModifier(node: Node): boolean { + return hasSyntacticModifier(node, ModifierFlags.Static); +} + +/** @internal */ +export function isStatic(node: Node) { + // https://tc39.es/ecma262/#sec-static-semantics-isstatic + return isClassElement(node) && hasStaticModifier(node) || isClassStaticBlockDeclaration(node); +} + +/** @internal */ +export function createGetSymbolAccessibilityDiagnosticForNodeName(node: DeclarationDiagnosticProducing) { + if (isSetAccessor(node) || isGetAccessor(node)) { + return getAccessorNameVisibilityError; + } + else if (isMethodSignature(node) || isMethodDeclaration(node)) { + return getMethodNameVisibilityError; + } + else { + return createGetSymbolAccessibilityDiagnosticForNode(node); + } + function getAccessorNameVisibilityError(symbolAccessibilityResult: SymbolAccessibilityResult) { + const diagnosticMessage = getAccessorNameVisibilityDiagnosticMessage(symbolAccessibilityResult); + return diagnosticMessage !== undefined ? { + diagnosticMessage, + errorNode: node, + typeName: (node as NamedDeclaration).name + } : undefined; + } + + function getAccessorNameVisibilityDiagnosticMessage(symbolAccessibilityResult: SymbolAccessibilityResult) { + if (isStatic(node)) { + return symbolAccessibilityResult.errorModuleName ? + symbolAccessibilityResult.accessibility === SymbolAccessibility.CannotBeNamed ? + Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : + Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; + } + else if (node.parent.kind === SyntaxKind.ClassDeclaration) { + return symbolAccessibilityResult.errorModuleName ? + symbolAccessibilityResult.accessibility === SymbolAccessibility.CannotBeNamed ? + Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : + Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; + } + else { + return symbolAccessibilityResult.errorModuleName ? + Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : + Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; + } + } + + function getMethodNameVisibilityError(symbolAccessibilityResult: SymbolAccessibilityResult): SymbolAccessibilityDiagnostic | undefined { + const diagnosticMessage = getMethodNameVisibilityDiagnosticMessage(symbolAccessibilityResult); + return diagnosticMessage !== undefined ? { + diagnosticMessage, + errorNode: node, + typeName: (node as NamedDeclaration).name + } : undefined; + } + + function getMethodNameVisibilityDiagnosticMessage(symbolAccessibilityResult: SymbolAccessibilityResult) { + if (isStatic(node)) { + return symbolAccessibilityResult.errorModuleName ? + symbolAccessibilityResult.accessibility === SymbolAccessibility.CannotBeNamed ? + Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : + Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1; + } + else if (node.parent.kind === SyntaxKind.ClassDeclaration) { + return symbolAccessibilityResult.errorModuleName ? + symbolAccessibilityResult.accessibility === SymbolAccessibility.CannotBeNamed ? + Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : + Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : + Diagnostics.Public_method_0_of_exported_class_has_or_is_using_private_name_1; + } + else { + return symbolAccessibilityResult.errorModuleName ? + Diagnostics.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : + Diagnostics.Method_0_of_exported_interface_has_or_is_using_private_name_1; + } + } +} + +/** @internal */ +export function getSourceFileOfNode(node: Node): SourceFile; +/** @internal */ +export function getSourceFileOfNode(node: Node | undefined): SourceFile | undefined; +/** @internal */ +export function getSourceFileOfNode(node: Node | undefined ): SourceFile | undefined { + while (node && node.kind !== SyntaxKind.SourceFile) { + node = node.parent; + } + return node as SourceFile; +} + + +/** @internal */ +export function createFileDiagnostic(file: SourceFile, start: number, length: number, message: DiagnosticMessage, ...args: (string | number | undefined)[]): DiagnosticWithLocation; +/** @internal */ +export function createFileDiagnostic(file: SourceFile, start: number, length: number, message: DiagnosticMessage): DiagnosticWithLocation { + + let text= message.message; + if (arguments.length > 4) { + text = formatStringFromArgs(text, arguments, 4); + } + + return { + file, + start, + length, + + messageText: text, + category: message.category, + code: message.code, + reportsUnnecessary: message.reportsUnnecessary, + reportsDeprecated: message.reportsDeprecated + }; +} + + +/** @internal */ +export function formatStringFromArgs(text: string, args: ArrayLike, baseIndex = 0): string { + return text.replace(/{(\d+)}/g, (_match, index: string) => "" + args[+index + baseIndex]); +} +export function declarationNameToString(name: DeclarationName | QualifiedName | undefined) { + return !name || getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name); +} + + +/** @internal */ +export function getTextOfNode(node: Node, includeTrivia = false): string { + return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node, includeTrivia); +} + +/** @internal */ +export function getSourceTextOfNodeFromSourceFile(sourceFile: SourceFile, node: Node, includeTrivia = false): string { + return getTextOfNodeFromSourceText(sourceFile.text, node, includeTrivia); +} + + +/** @internal */ +export function getTextOfNodeFromSourceText(sourceText: string, node: Node, includeTrivia = false): string { + let text = sourceText.substring(node.pos, node.end); + return text; +} +/** @internal */ +export function getFullWidth(node: Node) { + return node.end - node.pos; +} + +/** @internal */ +export function canProduceDiagnostics(node: Node): node is DeclarationDiagnosticProducing { + return isVariableDeclaration(node) || + isPropertyDeclaration(node) || + isPropertySignature(node) || + isBindingElement(node) || + isSetAccessor(node) || + isGetAccessor(node) || + isConstructSignatureDeclaration(node) || + isCallSignatureDeclaration(node) || + isMethodDeclaration(node) || + isMethodSignature(node) || + isFunctionDeclaration(node) || + isParameter(node) || + isTypeParameterDeclaration(node) || + isExpressionWithTypeArguments(node) || + isImportEqualsDeclaration(node) || + isTypeAliasDeclaration(node) || + isConstructorDeclaration(node) || + isIndexSignatureDeclaration(node) || + isPropertyAccessExpression(node) || + isJSDocTypeAlias(node); +} + + + +export function isJSDocTypeAlias(node: Node): node is JSDocTypedefTag | JSDocCallbackTag | JSDocEnumTag { + return node.kind === SyntaxKind.JSDocTypedefTag || node.kind === SyntaxKind.JSDocCallbackTag || node.kind === SyntaxKind.JSDocEnumTag; +} + +export type DeclarationDiagnosticProducing = + | VariableDeclaration + | PropertyDeclaration + | PropertySignature + | BindingElement + | SetAccessorDeclaration + | GetAccessorDeclaration + | ConstructSignatureDeclaration + | CallSignatureDeclaration + | MethodDeclaration + | MethodSignature + | FunctionDeclaration + | ParameterDeclaration + | TypeParameterDeclaration + | ExpressionWithTypeArguments + | ImportEqualsDeclaration + | TypeAliasDeclaration + | ConstructorDeclaration + | IndexSignatureDeclaration + | PropertyAccessExpression + | JSDocTypedefTag + | JSDocCallbackTag + | JSDocEnumTag; + + + +/** @internal */ +export function isDeclaration(node: Node): node is NamedDeclaration { + if (node.kind === SyntaxKind.TypeParameter) { + return (node.parent && node.parent.kind !== SyntaxKind.JSDocTemplateTag) || isInJSFile(node); + } + + return isDeclarationKind(node.kind); +} + +function isDeclarationKind(kind: SyntaxKind) { + return kind === SyntaxKind.ArrowFunction + || kind === SyntaxKind.BindingElement + || kind === SyntaxKind.ClassDeclaration + || kind === SyntaxKind.ClassExpression + || kind === SyntaxKind.ClassStaticBlockDeclaration + || kind === SyntaxKind.Constructor + || kind === SyntaxKind.EnumDeclaration + || kind === SyntaxKind.EnumMember + || kind === SyntaxKind.ExportSpecifier + || kind === SyntaxKind.FunctionDeclaration + || kind === SyntaxKind.FunctionExpression + || kind === SyntaxKind.GetAccessor + || kind === SyntaxKind.ImportClause + || kind === SyntaxKind.ImportEqualsDeclaration + || kind === SyntaxKind.ImportSpecifier + || kind === SyntaxKind.InterfaceDeclaration + || kind === SyntaxKind.JsxAttribute + || kind === SyntaxKind.MethodDeclaration + || kind === SyntaxKind.MethodSignature + || kind === SyntaxKind.ModuleDeclaration + || kind === SyntaxKind.NamespaceExportDeclaration + || kind === SyntaxKind.NamespaceImport + || kind === SyntaxKind.NamespaceExport + || kind === SyntaxKind.Parameter + || kind === SyntaxKind.PropertyAssignment + || kind === SyntaxKind.PropertyDeclaration + || kind === SyntaxKind.PropertySignature + || kind === SyntaxKind.SetAccessor + || kind === SyntaxKind.ShorthandPropertyAssignment + || kind === SyntaxKind.TypeAliasDeclaration + || kind === SyntaxKind.TypeParameter + || kind === SyntaxKind.VariableDeclaration + || kind === SyntaxKind.JSDocTypedefTag + || kind === SyntaxKind.JSDocCallbackTag + || kind === SyntaxKind.JSDocPropertyTag; +} + + +/** + * Bypasses immutability and directly sets the `parent` property of a `Node`. + * + * @internal + */ + export function setParent(child: T, parent: T["parent"] | undefined): T; + /** @internal */ + export function setParent(child: T | undefined, parent: T["parent"] | undefined): T | undefined; + /** @internal */ + export function setParent(child: T | undefined, parent: T["parent"] | undefined): T | undefined { + if (child && parent) { + (child as Mutable).parent = parent; + } + return child; + } + +/** @internal */ +export function isInJSFile(node: Node | undefined): boolean { + return !!node && !!(node.flags & NodeFlags.JavaScriptFile); +} + + +/** @internal */ +export function getFirstConstructorWithBody(node: ClassLikeDeclaration): ConstructorDeclaration & { body: FunctionBody } | undefined { + return find(node.members, (member): member is ConstructorDeclaration & { body: FunctionBody } => isConstructorDeclaration(member) && nodeIsPresent(member.body)); +} + +// Returns true if this node is missing from the actual source code. A 'missing' node is different +// from 'undefined/defined'. When a node is undefined (which can happen for optional nodes +// in the tree), it is definitely missing. However, a node may be defined, but still be +// missing. This happens whenever the parser knows it needs to parse something, but can't +// get anything in the source code that it expects at that location. For example: +// +// let a: ; +// +// Here, the Type in the Type-Annotation is not-optional (as there is a colon in the source +// code). So the parser will attempt to parse out a type, and will create an actual node. +// However, this node will be 'missing' in the sense that no actual source-code/tokens are +// contained within it. +/** @internal */ +export function nodeIsMissing(node: Node | undefined): boolean { + if (node === undefined) { + return true; + } + + return node.pos === node.end && node.pos >= 0 && node.kind !== SyntaxKind.EndOfFileToken; +} + +/** @internal */ +export function nodeIsPresent(node: Node | undefined): boolean { + return !nodeIsMissing(node); +} + + + +/** @internal */ +export function hasSyntacticModifier(node: Node, flags: ModifierFlags): boolean { + return !!getSelectedSyntacticModifierFlags(node, flags); +} + +/** @internal */ +export function getSelectedSyntacticModifierFlags(node: Node, flags: ModifierFlags): ModifierFlags { + return getSyntacticModifierFlags(node) & flags; +} + +/** + * Gets the effective ModifierFlags for the provided node, including JSDoc modifiers. The modifiers will be cached on the node to improve performance. + * + * NOTE: This function may use `parent` pointers. + * + * @internal + */ +export function getEffectiveModifierFlags(node: Node): ModifierFlags { + return getModifierFlagsWorker(node, /*includeJSDoc*/ true); +} + +/** @internal */ +export function getEffectiveModifierFlagsAlwaysIncludeJSDoc(node: Node): ModifierFlags { + return getModifierFlagsWorker(node, /*includeJSDOc*/ true, /*alwaysIncludeJSDOc*/ true); +} + +/** + * Gets the ModifierFlags for syntactic modifiers on the provided node. The modifiers will be cached on the node to improve performance. + * + * NOTE: This function does not use `parent` pointers and will not include modifiers from JSDoc. + * + * @internal + */ + export function getSyntacticModifierFlags(node: Node): ModifierFlags { + return getModifierFlagsWorker(node, /*includeJSDoc*/ false); +} + + +function getModifierFlagsWorker(node: Node, includeJSDoc: boolean, alwaysIncludeJSDoc?: boolean): ModifierFlags { + if (node.kind >= SyntaxKind.FirstToken && node.kind <= SyntaxKind.LastToken) { + return ModifierFlags.None; + } + + if (!(node.modifierFlagsCache & ModifierFlags.HasComputedFlags)) { + node.modifierFlagsCache = getSyntacticModifierFlagsNoCache(node) | ModifierFlags.HasComputedFlags; + } + + if (includeJSDoc && !(node.modifierFlagsCache & ModifierFlags.HasComputedJSDocModifiers) && (alwaysIncludeJSDoc || isInJSFile(node)) && node.parent) { + node.modifierFlagsCache |= getJSDocModifierFlagsNoCache(node) | ModifierFlags.HasComputedJSDocModifiers; + } + + return node.modifierFlagsCache & ~(ModifierFlags.HasComputedFlags | ModifierFlags.HasComputedJSDocModifiers); +} + + +function getJSDocModifierFlagsNoCache(node: Node): ModifierFlags { + let flags = ModifierFlags.None; + if (!!node.parent && !isParameter(node)) { + if (isInJSFile(node)) { + if (getJSDocPublicTag(node)) flags |= ModifierFlags.Public; + if (getJSDocPrivateTag(node)) flags |= ModifierFlags.Private; + if (getJSDocProtectedTag(node)) flags |= ModifierFlags.Protected; + if (getJSDocReadonlyTag(node)) flags |= ModifierFlags.Readonly; + if (getJSDocOverrideTagNoCache(node)) flags |= ModifierFlags.Override; + } + if (getJSDocDeprecatedTag(node)) flags |= ModifierFlags.Deprecated; + } + + return flags; +} + +/** + * Gets the ModifierFlags for syntactic modifiers on the provided node. The modifier flags cache on the node is ignored. + * + * NOTE: This function does not use `parent` pointers and will not include modifiers from JSDoc. + * + * @internal + */ + export function getSyntacticModifierFlagsNoCache(node: Node): ModifierFlags { + let flags = canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : ModifierFlags.None; + if (node.flags & NodeFlags.NestedNamespace || (node.kind === SyntaxKind.Identifier && (node as Identifier).isInJSDocNamespace)) { + flags |= ModifierFlags.Export; + } + return flags; +} + +/** @internal */ +export function modifiersToFlags(modifiers: readonly ModifierLike[] | undefined) { + let flags = ModifierFlags.None; + if (modifiers) { + for (const modifier of modifiers) { + flags |= modifierToFlag(modifier.kind); + } + } + return flags; +} + +/** @internal */ +export function modifierToFlag(token: SyntaxKind): ModifierFlags { + switch (token) { + case SyntaxKind.StaticKeyword: return ModifierFlags.Static; + case SyntaxKind.PublicKeyword: return ModifierFlags.Public; + case SyntaxKind.ProtectedKeyword: return ModifierFlags.Protected; + case SyntaxKind.PrivateKeyword: return ModifierFlags.Private; + case SyntaxKind.AbstractKeyword: return ModifierFlags.Abstract; + case SyntaxKind.AccessorKeyword: return ModifierFlags.Accessor; + case SyntaxKind.ExportKeyword: return ModifierFlags.Export; + case SyntaxKind.DeclareKeyword: return ModifierFlags.Ambient; + case SyntaxKind.ConstKeyword: return ModifierFlags.Const; + case SyntaxKind.DefaultKeyword: return ModifierFlags.Default; + case SyntaxKind.AsyncKeyword: return ModifierFlags.Async; + case SyntaxKind.ReadonlyKeyword: return ModifierFlags.Readonly; + case SyntaxKind.OverrideKeyword: return ModifierFlags.Override; + case SyntaxKind.InKeyword: return ModifierFlags.In; + case SyntaxKind.OutKeyword: return ModifierFlags.Out; + case SyntaxKind.Decorator: return ModifierFlags.Decorator; + } + return ModifierFlags.None; +} + +/** @internal */ +export type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration; + +/** @internal */ +export type LateVisibilityPaintedStatement = + | AnyImportSyntax + | VariableStatement + | ClassDeclaration + | FunctionDeclaration + | ModuleDeclaration + | TypeAliasDeclaration + | InterfaceDeclaration + | EnumDeclaration; + + +/** @internal */ +export function visitArray(nodes: T[] | undefined, visitor: Visitor, test: (node: Node) => node is U, start?: number, count?: number): U[] | undefined; +/** @internal */ +export function visitArray(nodes: readonly T[] | undefined, visitor: Visitor, test: (node: Node) => node is U, start?: number, count?: number): readonly U[] | undefined; +/** @internal */ +export function visitArray(nodes: T[] | undefined, visitor: Visitor, test: (node: Node) => node is T, start?: number, count?: number): T[] | undefined; +/** @internal */ +export function visitArray(nodes: readonly T[] | undefined, visitor: Visitor, test: (node: Node) => node is T, start?: number, count?: number): readonly T[] | undefined; +export function visitArray(nodes: readonly T[] | undefined, visitor: Visitor, test: (node: Node) => node is U, start?: number, count?: number) { + if (nodes === undefined) { + return nodes; + } + + // Ensure start and count have valid values + const length = nodes.length; + if (start === undefined || start < 0) { + start = 0; + } + + if (count === undefined || count > length - start) { + count = length - start; + } + + return visitArrayWorker(nodes, visitor, test, start, count) as readonly U[]; +} + + + +/** @internal */ +function visitArrayWorker(nodes: readonly T[], visitor: Visitor, test: ((node: Node) => boolean) | undefined, start: number, count: number): readonly T[] | undefined { + let updated: T[] | undefined; + + const length = nodes.length; + if (start > 0 || count < length) { + // If we are not visiting all of the original nodes, we must always create a new array. + updated = []; + } + + // Visit each original node. + for (let i = 0; i < count; i++) { + const node: T = nodes[i + start]; + const visited = node !== undefined ? visitor(node) : undefined; + if (updated !== undefined || visited === undefined || visited !== node) { + if (updated === undefined) { + // Ensure we have a copy of `nodes`, up to the current index. + updated = nodes.slice(0, i); + } + if (visited) { + if (isArray(visited)) { + for (const visitedNode of visited) { + void Debug.assertNode(visitedNode, test); + updated.push(visitedNode as T); + } + } + else { + void Debug.assertNode(visited, test); + updated.push(visited as T); + } + } + } + } + + return updated ?? nodes; +} + +/** @internal */ +export interface AllAccessorDeclarations { + firstAccessor: AccessorDeclaration; + secondAccessor: AccessorDeclaration | undefined; + getAccessor: GetAccessorDeclaration | undefined; + setAccessor: SetAccessorDeclaration | undefined; +} + +/** @internal */ +export function getThisParameter(signature: SignatureDeclaration | JSDocSignature): ParameterDeclaration | undefined { + // callback tags do not currently support this parameters + if (signature.parameters.length && !isJSDocSignature(signature)) { + const thisParameter = signature.parameters[0]; + if (parameterIsThisKeyword(thisParameter)) { + return thisParameter; + } + } +} + +/** @internal */ +export function parameterIsThisKeyword(parameter: ParameterDeclaration): boolean { + return isThisIdentifier(parameter.name); +} + +/** @internal */ +export function isThisIdentifier(node: Node | undefined): boolean { + return !!node && node.kind === SyntaxKind.Identifier && identifierIsThisKeyword(node as Identifier); +} + + +/** @internal */ +export function identifierIsThisKeyword(id: Identifier): boolean { + return id.originalKeywordKind === SyntaxKind.ThisKeyword; +} + + +/** @internal */ +export function positionIsSynthesized(pos: number): boolean { + // This is a fast way of testing the following conditions: + // pos === undefined || pos === null || isNaN(pos) || pos < 0; + return !(pos >= 0); +} + +/** @internal */ +export function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean, stopAtComments?: boolean, inJSDoc?: boolean): number { + if (positionIsSynthesized(pos)) { + return pos; + } + + let canConsumeStar = false; + // Keep in sync with couldStartTrivia + while (true) { + const ch = text.charCodeAt(pos); + switch (ch) { + case CharacterCodes.carriageReturn: + if (text.charCodeAt(pos + 1) === CharacterCodes.lineFeed) { + pos++; + } + // falls through + case CharacterCodes.lineFeed: + pos++; + if (stopAfterLineBreak) { + return pos; + } + canConsumeStar = !!inJSDoc; + continue; + case CharacterCodes.tab: + case CharacterCodes.verticalTab: + case CharacterCodes.formFeed: + case CharacterCodes.space: + pos++; + continue; + case CharacterCodes.slash: + if (stopAtComments) { + break; + } + if (text.charCodeAt(pos + 1) === CharacterCodes.slash) { + pos += 2; + while (pos < text.length) { + if (isLineBreak(text.charCodeAt(pos))) { + break; + } + pos++; + } + canConsumeStar = false; + continue; + } + if (text.charCodeAt(pos + 1) === CharacterCodes.asterisk) { + pos += 2; + while (pos < text.length) { + if (text.charCodeAt(pos) === CharacterCodes.asterisk && text.charCodeAt(pos + 1) === CharacterCodes.slash) { + pos += 2; + break; + } + pos++; + } + canConsumeStar = false; + continue; + } + break; + + case CharacterCodes.lessThan: + case CharacterCodes.bar: + case CharacterCodes.equals: + case CharacterCodes.greaterThan: + if (isConflictMarkerTrivia(text, pos)) { + pos = scanConflictMarkerTrivia(text, pos); + canConsumeStar = false; + continue; + } + break; + + case CharacterCodes.hash: + if (pos === 0 && isShebangTrivia(text, pos)) { + pos = scanShebangTrivia(text, pos); + canConsumeStar = false; + continue; + } + break; + + case CharacterCodes.asterisk: + if (canConsumeStar) { + pos++; + canConsumeStar = false; + continue; + } + break; + + default: + if (ch > CharacterCodes.maxAsciiCharacter && (isWhiteSpaceLike(ch))) { + pos++; + continue; + } + break; + } + return pos; + } +} +// All conflict markers consist of the same character repeated seven times. If it is +// a <<<<<<< or >>>>>>> marker then it is also followed by a space. +const mergeConflictMarkerLength = "<<<<<<<".length; + +function isConflictMarkerTrivia(text: string, pos: number) { + Debug.assert(pos >= 0); + + // Conflict markers must be at the start of a line. + if (pos === 0 || isLineBreak(text.charCodeAt(pos - 1))) { + const ch = text.charCodeAt(pos); + + if ((pos + mergeConflictMarkerLength) < text.length) { + for (let i = 0; i < mergeConflictMarkerLength; i++) { + if (text.charCodeAt(pos + i) !== ch) { + return false; + } + } + + return ch === CharacterCodes.equals || + text.charCodeAt(pos + mergeConflictMarkerLength) === CharacterCodes.space; + } + } + + return false; +} + +function scanConflictMarkerTrivia(text: string, pos: number, error?: (diag: DiagnosticMessage, pos?: number, len?: number) => void) { + if (error) { + error(Diagnostics.Merge_conflict_marker_encountered, pos, mergeConflictMarkerLength); + } + + const ch = text.charCodeAt(pos); + const len = text.length; + + if (ch === CharacterCodes.lessThan || ch === CharacterCodes.greaterThan) { + while (pos < len && !isLineBreak(text.charCodeAt(pos))) { + pos++; + } + } + else { + Debug.assert(ch === CharacterCodes.bar || ch === CharacterCodes.equals); + // Consume everything from the start of a ||||||| or ======= marker to the start + // of the next ======= or >>>>>>> marker. + while (pos < len) { + const currentChar = text.charCodeAt(pos); + if ((currentChar === CharacterCodes.equals || currentChar === CharacterCodes.greaterThan) && currentChar !== ch && isConflictMarkerTrivia(text, pos)) { + break; + } + + pos++; + } + } + + return pos; +} + +const shebangTriviaRegex = /^#!.*/; + +/** @internal */ +export function isShebangTrivia(text: string, pos: number) { + // Shebangs check must only be done at the start of the file + Debug.assert(pos === 0); + return shebangTriviaRegex.test(text); +} + +/** @internal */ +export function scanShebangTrivia(text: string, pos: number) { + const shebang = shebangTriviaRegex.exec(text)![0]; + pos = pos + shebang.length; + return pos; +} + + +/** @internal */ +export function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode: SourceFile) { + return node.kind !== SyntaxKind.JsxText ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : undefined; +} + +export function isNightly() { + return false; +} + +export function createGetSymbolAccessibilityDiagnosticForNode(node: DeclarationDiagnosticProducing): GetSymbolAccessibilityDiagnostic { + return () => { + debugger; + throw new Error(); + }; +} + +/** @internal */ +export function getOriginalNodeId(node: Node) { + node = getOriginalNode(node); + return node ? getNodeId(node) : 0; +} + +export function getOriginalNode(node: Node): Node; +export function getOriginalNode(node: Node, nodeTest: (node: Node) => node is T): T; +export function getOriginalNode(node: Node | undefined): Node | undefined; +export function getOriginalNode(node: Node | undefined, nodeTest: (node: Node | undefined) => node is T): T | undefined; +export function getOriginalNode(node: Node | undefined, nodeTest?: (node: Node | undefined) => boolean): Node | undefined { + if (node) { + while ((node as any).original !== undefined) { + node = (node as any).original; + } + } + + return !nodeTest || nodeTest(node) ? node : undefined; +} + +let nextNodeId = 0; +/** @internal */ +export function getNodeId(node: Node): number +export function getNodeId(node: any): number { + if (!node.id) { + nextNodeId++; + node.id = nextNodeId; + } + return node.id; +} + + +/** @internal */ +export function isExternalOrCommonJsModule(file: SourceFile): boolean { + return ((file as any).externalModuleIndicator || (file as any).commonJsModuleIndicator) !== undefined; +} + + +/** @internal */ +export function isJsonSourceFile(file: SourceFile): file is JsonSourceFile { + return (file as any).scriptKind === ScriptKind.JSON; +} + + +/** @internal */ +export function isSourceFileNotJson(file: SourceFile) { + return !isJsonSourceFile(file); +} + +/** @internal */ +export function isSourceFileJS(file: SourceFile): boolean { + return isInJSFile(file); +} + +/** @internal */ +export function getResolvedExternalModuleName(host: ResolveModuleNameResolutionHost, file: SourceFile, referenceFile?: SourceFile): string { + if(!file.moduleName) { + throw new Error("Not implemented"); + } + return file.moduleName; +} + + +/** @internal */ +export function isAnyImportSyntax(node: Node): node is AnyImportSyntax { + switch (node.kind) { + case SyntaxKind.ImportDeclaration: + case SyntaxKind.ImportEqualsDeclaration: + return true; + default: + return false; + } +} + +/** @internal */ +export function createEmptyExports(factory: NodeFactory) { + return factory.createExportDeclaration(/*modifiers*/ undefined, /*isTypeOnly*/ false, factory.createNamedExports([]), /*moduleSpecifier*/ undefined); +} + + +/** @internal */ +export function isGlobalScopeAugmentation(module: ModuleDeclaration): boolean { + return !!(module.flags & NodeFlags.GlobalAugmentation); +} + +/** @internal */ +export function isExternalModuleAugmentation(node: Node): node is AmbientModuleDeclaration { + return isAmbientModule(node) && isModuleAugmentationExternal(node); +} + + +/** @internal */ +export function isModuleAugmentationExternal(node: AmbientModuleDeclaration) { + // external module augmentation is a ambient module declaration that is either: + // - defined in the top level scope and source file is an external module + // - defined inside ambient module declaration located in the top level scope and source file not an external module + switch (node.parent.kind) { + case SyntaxKind.SourceFile: + return isExternalModule(node.parent); + case SyntaxKind.ModuleBlock: + return isAmbientModule(node.parent.parent) && isSourceFile(node.parent.parent.parent) && !isExternalModule(node.parent.parent.parent); + } + return false; +} + +// See also `isExternalOrCommonJsModule` in utilities.ts +export function isExternalModule(file: SourceFile): boolean { + return (file as any).externalModuleIndicator !== undefined; +} + +/** @internal */ +export function isAmbientModule(node: Node): node is AmbientModuleDeclaration { + return isModuleDeclaration(node) && (node.name.kind === SyntaxKind.StringLiteral || isGlobalScopeAugmentation(node)); +} + + +/** @internal */ +export function hasEffectiveModifiers(node: Node) { + return getEffectiveModifierFlags(node) !== ModifierFlags.None; +} + +/** @internal */ +export function hasSyntacticModifiers(node: Node) { + return getSyntacticModifierFlags(node) !== ModifierFlags.None; +} + +/** @internal */ +export function hasEffectiveModifier(node: Node, flags: ModifierFlags): boolean { + return !!getSelectedEffectiveModifierFlags(node, flags); +} + +/** @internal */ +export function getSelectedEffectiveModifierFlags(node: Node, flags: ModifierFlags): ModifierFlags { + return getEffectiveModifierFlags(node) & flags; +} + + +/** + * A declaration has a dynamic name if all of the following are true: + * 1. The declaration has a computed property name. + * 2. The computed name is *not* expressed as a StringLiteral. + * 3. The computed name is *not* expressed as a NumericLiteral. + * 4. The computed name is *not* expressed as a PlusToken or MinusToken + * immediately followed by a NumericLiteral. + * + * @internal + */ + export function hasDynamicName(declaration: Declaration): declaration is DynamicNamedDeclaration | DynamicNamedBinaryExpression { + const name = getNameOfDeclaration(declaration); + return !!name && isDynamicName(name); +} + +/** @internal */ +export function isDynamicName(name: DeclarationName): boolean { + if (!(name.kind === SyntaxKind.ComputedPropertyName || name.kind === SyntaxKind.ElementAccessExpression)) { + return false; + } + const expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; + return !isStringOrNumericLiteralLike(expr) && + !isSignedNumericLiteral(expr); +} + +/** @internal */ +export function isSignedNumericLiteral(node: Node): node is PrefixUnaryExpression & { operand: NumericLiteral } { + return isPrefixUnaryExpression(node) && (node.operator === SyntaxKind.PlusToken || node.operator === SyntaxKind.MinusToken) && isNumericLiteral(node.operand); +} + +/** @internal */ +export function isLateVisibilityPaintedStatement(node: Node): node is LateVisibilityPaintedStatement { + switch (node.kind) { + case SyntaxKind.ImportDeclaration: + case SyntaxKind.ImportEqualsDeclaration: + case SyntaxKind.VariableStatement: + case SyntaxKind.ClassDeclaration: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.ModuleDeclaration: + case SyntaxKind.TypeAliasDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.EnumDeclaration: + return true; + default: + return false; + } +} + + +/** @internal */ +export function isBindingPattern(node: Node | undefined): node is BindingPattern { + if (node) { + const kind = node.kind; + return kind === SyntaxKind.ArrayBindingPattern + || kind === SyntaxKind.ObjectBindingPattern; + } + + return false; +} + + +/** @internal */ +export function isLiteralImportTypeNode(n: Node): n is LiteralImportTypeNode { + return isImportTypeNode(n) && isLiteralTypeNode(n.argument) && isStringLiteral(n.argument.literal); +} + + +export function isImportTypeNode(node: Node): node is ImportTypeNode { + return node.kind === SyntaxKind.ImportType; +} + + +/** @internal */ +export function skipParentheses(node: Expression, excludeJSDocTypeAssertions?: boolean): Expression; +/** @internal */ +export function skipParentheses(node: Node, excludeJSDocTypeAssertions?: boolean): Node; +/** @internal */ +export function skipParentheses(node: Node, excludeJSDocTypeAssertions?: boolean): Node { + const flags = excludeJSDocTypeAssertions ? + OuterExpressionKinds.Parentheses | OuterExpressionKinds.ExcludeJSDocTypeAssertion : + OuterExpressionKinds.Parentheses; + return skipOuterExpressions(node, flags); +} + + +/** @internal */ +export function skipOuterExpressions(node: Expression, kinds?: OuterExpressionKinds): Expression; +/** @internal */ +export function skipOuterExpressions(node: Node, kinds?: OuterExpressionKinds): Node; +/** @internal */ +export function skipOuterExpressions(node: Node, kinds = OuterExpressionKinds.All) { + while (isOuterExpression(node, kinds)) { + node = node.expression; + } + return node; +} + +/** @internal */ +export function isLiteralComputedPropertyDeclarationName(node: Node) { + return isStringOrNumericLiteralLike(node) && + node.parent.kind === SyntaxKind.ComputedPropertyName && + isDeclaration(node.parent.parent); +} + + +/** @internal */ +export function isStringOrNumericLiteralLike(node: Node): node is StringLiteralLike | NumericLiteral { + return isStringLiteralLike(node) || isNumericLiteral(node); +} + + +/** @internal */ +export function isOuterExpression(node: Node, kinds = OuterExpressionKinds.All): node is OuterExpression { + switch (node.kind) { + case SyntaxKind.ParenthesizedExpression: + if (kinds & OuterExpressionKinds.ExcludeJSDocTypeAssertion && isJSDocTypeAssertion(node)) { + return false; + } + return (kinds & OuterExpressionKinds.Parentheses) !== 0; + case SyntaxKind.TypeAssertionExpression: + case SyntaxKind.AsExpression: + case SyntaxKind.SatisfiesExpression: + return (kinds & OuterExpressionKinds.TypeAssertions) !== 0; + case SyntaxKind.NonNullExpression: + return (kinds & OuterExpressionKinds.NonNullAssertions) !== 0; + case SyntaxKind.PartiallyEmittedExpression: + return (kinds & OuterExpressionKinds.PartiallyEmittedExpressions) !== 0; + } + return false; +} + +/** @internal */ +export function isJSDocTypeAssertion(node: Node): node is JSDocTypeAssertion { + return isParenthesizedExpression(node) + && isInJSFile(node) + && !!getJSDocTypeTag(node); +} + + +/** + * Sets `EmitFlags.NoComments` on a node and removes any leading and trailing synthetic comments. + * @internal + */ + export function removeAllComments(node: T): T { + const emitNode = getOrCreateEmitNode(node); + emitNode.flags |= EmitFlags.NoComments; + emitNode.leadingComments = undefined; + emitNode.trailingComments = undefined; + return node; +} + + +/** + * Associates a node with the current transformation, initializing + * various transient transformation properties. + * @internal + */ + export function getOrCreateEmitNode(node: Node): EmitNode { + if (!node.emitNode) { + if (isParseTreeNode(node)) { + // To avoid holding onto transformation artifacts, we keep track of any + // parse tree node we are annotating. This allows us to clean them up after + // all transformations have completed. + if (node.kind === SyntaxKind.SourceFile) { + return node.emitNode = { annotatedNodes: [node] } as EmitNode; + } + + const sourceFile = getSourceFileOfNode(getParseTreeNode(getSourceFileOfNode(node))) ?? Debug.fail("Could not determine parsed source file."); + getOrCreateEmitNode(sourceFile).annotatedNodes!.push(node); + } + + node.emitNode = {} as EmitNode; + } + else { + Debug.assert(!(node.emitNode.flags & (EmitFlags as any).Immutable), "Invalid attempt to mutate an immutable node."); + } + return node.emitNode; +} + +/** + * Gets the original parse tree node for a node. + * + * @param node The original node. + * @returns The original parse tree node if found; otherwise, undefined. + */ + export function getParseTreeNode(node: Node | undefined): Node | undefined; + + /** + * Gets the original parse tree node for a node. + * + * @param node The original node. + * @param nodeTest A callback used to ensure the correct type of parse tree node is returned. + * @returns The original parse tree node if found; otherwise, undefined. + */ + export function getParseTreeNode(node: T | undefined, nodeTest?: (node: Node) => node is T): T | undefined; + export function getParseTreeNode(node: Node | undefined, nodeTest?: (node: Node) => boolean): Node | undefined { + if (node === undefined || isParseTreeNode(node)) { + return node; + } + + node = node.original; + while (node) { + if (isParseTreeNode(node)) { + return !nodeTest || nodeTest(node) ? node : undefined; + } + node = node.original; + } + } + + +/** @internal */ +export function needsScopeMarker(result: Statement) { + return !isAnyImportOrReExport(result) && !isExportAssignment(result) && !hasSyntacticModifier(result, ModifierFlags.Export) && !isAmbientModule(result); +} + + +/** @internal */ +export function isAnyImportOrReExport(node: Node): node is AnyImportOrReExport { + return isAnyImportSyntax(node) || isExportDeclaration(node); +} + +/** + * True if has jsdoc nodes attached to it. + * + * @internal + */ +// TODO: GH#19856 Would like to return `node is Node & { jsDoc: JSDoc[] }` but it causes long compile times +export function hasJSDocNodes(node: Node): node is HasJSDoc & { jsDoc?: JSDoc[] } { + const { jsDoc } = node as { jsDoc?: JSDoc[] }; + return !!jsDoc && jsDoc.length > 0; +} + +/** @internal */ +export function isExternalModuleIndicator(result: Statement) { + // Exported top-level member indicates moduleness + return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, ModifierFlags.Export); +} + + + +/** @internal */ +export function getOutputPathsFor(sourceFile: SourceFile | Bundle, host: EmitHost, forceDtsPaths: boolean): EmitFileNames { + const options = host.getCompilerOptions(); + if (sourceFile.kind === SyntaxKind.Bundle) { + return getOutputPathsForBundle(options, forceDtsPaths); + } + else { + const ownOutputFilePath = getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile.fileName, options)); + const isJsonFile = isJsonSourceFile(sourceFile); + // If json file emits to the same location skip writing it, if emitDeclarationOnly skip writing it + const isJsonEmittedToSameLocation = isJsonFile && + comparePaths(sourceFile.fileName, ownOutputFilePath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames?.()) === Comparison.EqualTo; + const jsFilePath = options.emitDeclarationOnly || isJsonEmittedToSameLocation ? undefined : ownOutputFilePath; + const sourceMapFilePath = !jsFilePath || isJsonSourceFile(sourceFile) ? undefined : getSourceMapFilePath(jsFilePath, options); + const declarationFilePath = (forceDtsPaths || (getEmitDeclarations(options) && !isJsonFile)) ? getDeclarationEmitOutputFilePath(sourceFile.fileName, host) : undefined; + const declarationMapPath = declarationFilePath && getAreDeclarationMapsEnabled(options) ? declarationFilePath + ".map" : undefined; + return { jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath, buildInfoPath: undefined }; + } +} + + +/** @internal */ +export function getDeclarationEmitOutputFilePath(fileName: string, host: EmitHost) { + return getDeclarationEmitOutputFilePathWorker(fileName, host.getCompilerOptions(), host.getCurrentDirectory(), host.getCommonSourceDirectory(), f => host.getCanonicalFileName(f)); +} + +/** @internal */ +export function getDeclarationEmitOutputFilePathWorker(fileName: string, options: CompilerOptions, currentDirectory: string, commonSourceDirectory: string, getCanonicalFileName: GetCanonicalFileName): string { + const outputDir = options.declarationDir || options.outDir; // Prefer declaration folder if specified + + const path = outputDir + ? getSourceFilePathInNewDirWorker(fileName, outputDir, currentDirectory, commonSourceDirectory, getCanonicalFileName) + : fileName; + const declarationExtension = getDeclarationEmitExtensionForPath(path); + return removeFileExtension(path) + declarationExtension; +} + +/** @internal */ +export function getDeclarationEmitExtensionForPath(path: string) { + return fileExtensionIsOneOf(path, [Extension.Mjs, Extension.Mts]) ? Extension.Dmts : + fileExtensionIsOneOf(path, [Extension.Cjs, Extension.Cts]) ? Extension.Dcts : + fileExtensionIsOneOf(path, [Extension.Json]) ? `.json.d.ts` : // Drive-by redefinition of json declaration file output name so if it's ever enabled, it behaves well + Extension.Dts; +} + + +/** @internal */ +export function getOutputExtension(fileName: string, options: CompilerOptions): Extension { + return fileExtensionIs(fileName, Extension.Json) ? Extension.Json : + options.jsx === JsxEmit.Preserve && fileExtensionIsOneOf(fileName, [Extension.Jsx, Extension.Tsx]) ? Extension.Jsx : + fileExtensionIsOneOf(fileName, [Extension.Mts, Extension.Mjs]) ? Extension.Mjs : + fileExtensionIsOneOf(fileName, [Extension.Cts, Extension.Cjs]) ? Extension.Cjs : + Extension.Js; +} + + +/** @internal */ +export function getOwnEmitOutputFilePath(fileName: string, host: EmitHost, extension: string) { + const compilerOptions = host.getCompilerOptions(); + let emitOutputFilePathWithoutExtension: string; + if (compilerOptions.outDir) { + emitOutputFilePathWithoutExtension = removeFileExtension(getSourceFilePathInNewDir(fileName, host, compilerOptions.outDir)); + } + else { + emitOutputFilePathWithoutExtension = removeFileExtension(fileName); + } + + return emitOutputFilePathWithoutExtension + extension; +} + +/** @internal */ +export function getSourceFilePathInNewDir(fileName: string, host: EmitHost, newDirPath: string): string { + return getSourceFilePathInNewDirWorker(fileName, newDirPath, host.getCurrentDirectory(), host.getCommonSourceDirectory(), f => host.getCanonicalFileName(f)); +} + + +/** @internal */ +export function getSourceFilePathInNewDirWorker(fileName: string, newDirPath: string, currentDirectory: string, commonSourceDirectory: string, getCanonicalFileName: GetCanonicalFileName): string { + let sourceFilePath = getNormalizedAbsolutePath(fileName, currentDirectory); + const isSourceFileInCommonSourceDirectory = getCanonicalFileName(sourceFilePath).indexOf(getCanonicalFileName(commonSourceDirectory)) === 0; + sourceFilePath = isSourceFileInCommonSourceDirectory ? sourceFilePath.substring(commonSourceDirectory.length) : sourceFilePath; + return combinePaths(newDirPath, sourceFilePath); +} + + + +/** @internal */ +export function getOutputPathsForBundle(options: CompilerOptions, forceDtsPaths: boolean): EmitFileNames { + const outPath = outFile(options)!; + const jsFilePath = options.emitDeclarationOnly ? undefined : outPath; + const sourceMapFilePath = jsFilePath && getSourceMapFilePath(jsFilePath, options); + const declarationFilePath = (forceDtsPaths || getEmitDeclarations(options)) ? removeFileExtension(outPath) + Extension.Dts : undefined; + const declarationMapPath = declarationFilePath && getAreDeclarationMapsEnabled(options) ? declarationFilePath + ".map" : undefined; + const buildInfoPath = getTsBuildInfoEmitOutputFilePath(options); + return { jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath, buildInfoPath }; +} + + +/** @internal */ +export function outFile(options: CompilerOptions) { + return options.outFile || options.out; +} + + +function getSourceMapFilePath(jsFilePath: string, options: CompilerOptions) { + return (options.sourceMap && !options.inlineSourceMap) ? jsFilePath + ".map" : undefined; +} +/** @internal */ +export function getEmitDeclarations(compilerOptions: CompilerOptions): boolean { + return !!(compilerOptions.declaration || compilerOptions.composite); +} + + +/** @internal */ +export function getAreDeclarationMapsEnabled(options: CompilerOptions) { + return !!(getEmitDeclarations(options) && options.declarationMap); +} + + +/** @internal */ +export function getSetAccessorValueParameter(accessor: SetAccessorDeclaration): ParameterDeclaration | undefined { + if (accessor && accessor.parameters.length > 0) { + const hasThis = accessor.parameters.length === 2 && parameterIsThisKeyword(accessor.parameters[0]); + return accessor.parameters[hasThis ? 1 : 0]; + } +} + + +function getCanonicalAbsolutePath(host: ResolveModuleNameResolutionHost, path: string) { + return host.getCanonicalFileName(getNormalizedAbsolutePath(path, host.getCurrentDirectory())); +} + + +/** @internal */ +export function getExternalModuleNameFromDeclaration(host: ResolveModuleNameResolutionHost, resolver: EmitResolver, declaration: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration | ModuleDeclaration | ImportTypeNode): string | undefined { + const file = resolver.getExternalModuleFileFromDeclaration(declaration); + if (!file || file.isDeclarationFile) { + return undefined; + } + // If the declaration already uses a non-relative name, and is outside the common source directory, continue to use it + const specifier = getExternalModuleName(declaration); + if (specifier && isStringLiteralLike(specifier) && !pathIsRelative(specifier.text) && + getCanonicalAbsolutePath(host, file.path).indexOf(getCanonicalAbsolutePath(host, ensureTrailingDirectorySeparator(host.getCommonSourceDirectory()))) === -1) { + return undefined; + } + return getResolvedExternalModuleName(host, file); +} + + +/** @internal */ +export function getExternalModuleName(node: AnyImportOrReExport | ImportTypeNode | ImportCall | ModuleDeclaration): Expression | undefined { + switch (node.kind) { + case SyntaxKind.ImportDeclaration: + case SyntaxKind.ExportDeclaration: + return node.moduleSpecifier; + case SyntaxKind.ImportEqualsDeclaration: + return node.moduleReference.kind === SyntaxKind.ExternalModuleReference ? node.moduleReference.expression : undefined; + case SyntaxKind.ImportType: + return isLiteralImportTypeNode(node) ? node.argument.literal : undefined; + case SyntaxKind.CallExpression: + return node.arguments[0]; + case SyntaxKind.ModuleDeclaration: + return node.name.kind === SyntaxKind.StringLiteral ? node.name : undefined; + default: + return Debug.assertNever(node); + } +} + + +/** @internal */ +export function getExternalModuleImportEqualsDeclarationExpression(node: Node) { + Debug.assert(isExternalModuleImportEqualsDeclaration(node)); + return ((node as ImportEqualsDeclaration).moduleReference as ExternalModuleReference).expression; +} + +/** @internal */ +export function isExternalModuleImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration & { moduleReference: ExternalModuleReference } { + return node.kind === SyntaxKind.ImportEqualsDeclaration && (node as ImportEqualsDeclaration).moduleReference.kind === SyntaxKind.ExternalModuleReference; +} + + +/** @internal */ +export function getResolutionModeOverrideForClause(clause: AssertClause | undefined, grammarErrorOnNode?: (node: Node, diagnostic: DiagnosticMessage) => void) { + if (!clause) return undefined; + if (length(clause.elements) !== 1) { + grammarErrorOnNode?.(clause, Diagnostics.Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require); + return undefined; + } + const elem = clause.elements[0]; + if (!isStringLiteralLike(elem.name)) return undefined; + if (elem.name.text !== "resolution-mode") { + grammarErrorOnNode?.(elem.name, Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_assertions); + return undefined; + } + if (!isStringLiteralLike(elem.value)) return undefined; + if (elem.value.text !== "import" && elem.value.text !== "require") { + grammarErrorOnNode?.(elem.value, Diagnostics.resolution_mode_should_be_either_require_or_import); + return undefined; + } + return elem.value.text === "import" ? ModuleKind.ESNext : ModuleKind.CommonJS; +} + + +/** @internal */ +export function isEntityNameExpression(node: Node): node is EntityNameExpression { + return node.kind === SyntaxKind.Identifier || isPropertyAccessEntityNameExpression(node); +} + + +/** @internal */ +export function isPropertyAccessEntityNameExpression(node: Node): node is PropertyAccessEntityNameExpression { + return isPropertyAccessExpression(node) && isIdentifier(node.name) && isEntityNameExpression(node.expression); +} + + +/** @internal */ +export function getEffectiveBaseTypeNode(node: ClassLikeDeclaration | InterfaceDeclaration) { + const baseType = getClassExtendsHeritageElement(node); + if (baseType && isInJSFile(node)) { + // Prefer an @augments tag because it may have type parameters. + const tag = getJSDocAugmentsTag(node); + if (tag) { + return tag.class; + } + } + return baseType; +} + + +/** @internal */ +export function getClassExtendsHeritageElement(node: ClassLikeDeclaration | InterfaceDeclaration) { + const heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ExtendsKeyword); + return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; +} + + +/** @internal */ +export function getHeritageClause(clauses: NodeArray | undefined, kind: SyntaxKind) { + if (clauses) { + for (const clause of clauses) { + if (clause.token === kind) { + return clause; + } + } + } + + return undefined; +} + + +/** + * Gets flags that control emit behavior of a node. + * + * @internal + */ + export function getEmitFlags(node: Node): EmitFlags { + const emitNode = node.emitNode; + return emitNode && emitNode.flags || 0; +} + + +/** @internal */ +export function getEmitModuleResolutionKind(compilerOptions: CompilerOptions) { + let moduleResolution = compilerOptions.moduleResolution; + if (moduleResolution === undefined) { + switch (getEmitModuleKind(compilerOptions)) { + case ModuleKind.CommonJS: + moduleResolution = ModuleResolutionKind.NodeJs; + break; + case ModuleKind.Node16: + moduleResolution = ModuleResolutionKind.Node16; + break; + case ModuleKind.NodeNext: + moduleResolution = ModuleResolutionKind.NodeNext; + break; + default: + moduleResolution = ModuleResolutionKind.Classic; + break; + } + } + return moduleResolution; +} +/** @internal */ +export function getEmitModuleKind(compilerOptions: {module?: CompilerOptions["module"], target?: CompilerOptions["target"]}) { + return typeof compilerOptions.module === "number" ? + compilerOptions.module : + getEmitScriptTarget(compilerOptions) >= ScriptTarget.ES2015 ? ModuleKind.ES2015 : ModuleKind.CommonJS; +} + + +/** @internal */ +export function getEmitScriptTarget(compilerOptions: {module?: CompilerOptions["module"], target?: CompilerOptions["target"]}) { + return compilerOptions.target || + (compilerOptions.module === ModuleKind.Node16 && ScriptTarget.ES2022) || + (compilerOptions.module === ModuleKind.NodeNext && ScriptTarget.ESNext) || + ScriptTarget.ES3; +} + + +/** @internal */ +export function removePrefix(str: string, prefix: string): string { + return startsWith(str, prefix) ? str.substr(prefix.length) : str; +} + +/** @internal */ +export function tryRemovePrefix(str: string, prefix: string, getCanonicalFileName: GetCanonicalFileName = identity): string | undefined { + return startsWith(getCanonicalFileName(str), getCanonicalFileName(prefix)) ? str.substring(prefix.length) : undefined; +} + +const extensionsToRemove = [Extension.Dts, Extension.Dmts, Extension.Dcts, Extension.Mjs, Extension.Mts, Extension.Cjs, Extension.Cts, Extension.Ts, Extension.Js, Extension.Tsx, Extension.Jsx, Extension.Json]; + +/** @internal */ +export function isAnySupportedFileExtension(path: string): boolean { + return tryGetExtensionFromPath(path) !== undefined; +} + +/** @internal */ +export function tryGetExtensionFromPath(path: string): Extension | undefined { + return find(extensionsToRemove, e => fileExtensionIs(path, e)); +} + + + +/** @internal */ +export interface NodeModulePathParts { + readonly topLevelNodeModulesIndex: number; + readonly topLevelPackageNameIndex: number; + readonly packageRootIndex: number; + readonly fileNameIndex: number; +} +/** @internal */ +export function getNodeModulePathParts(fullPath: string): NodeModulePathParts | undefined { + // If fullPath can't be valid module file within node_modules, returns undefined. + // Example of expected pattern: /base/path/node_modules/[@scope/otherpackage/@otherscope/node_modules/]package/[subdirectory/]file.js + // Returns indices: ^ ^ ^ ^ + + let topLevelNodeModulesIndex = 0; + let topLevelPackageNameIndex = 0; + let packageRootIndex = 0; + let fileNameIndex = 0; + + const enum States { + BeforeNodeModules, + NodeModules, + Scope, + PackageContent + } + + let partStart = 0; + let partEnd = 0; + let state = States.BeforeNodeModules; + + while (partEnd >= 0) { + partStart = partEnd; + partEnd = fullPath.indexOf("/", partStart + 1); + switch (state) { + case States.BeforeNodeModules: + if (fullPath.indexOf(nodeModulesPathPart, partStart) === partStart) { + topLevelNodeModulesIndex = partStart; + topLevelPackageNameIndex = partEnd; + state = States.NodeModules; + } + break; + case States.NodeModules: + case States.Scope: + if (state === States.NodeModules && fullPath.charAt(partStart + 1) === "@") { + state = States.Scope; + } + else { + packageRootIndex = partEnd; + state = States.PackageContent; + } + break; + case States.PackageContent: + if (fullPath.indexOf(nodeModulesPathPart, partStart) === partStart) { + state = States.NodeModules; + } + else { + state = States.PackageContent; + } + break; + } + } + + fileNameIndex = partStart; + + return state > States.NodeModules ? { topLevelNodeModulesIndex, topLevelPackageNameIndex, packageRootIndex, fileNameIndex } : undefined; +} + + +/** @internal */ +export const nodeModulesPathPart = "/node_modules/"; +/** @internal */ +export function pathContainsNodeModules(path: string): boolean { + return stringContains(path, nodeModulesPathPart); +} + + + +/** + * Gets the extension from a path. + * Path must have a valid extension. + * + * @internal + */ + export function extensionFromPath(path: string): Extension { + const ext = tryGetExtensionFromPath(path); + return ext !== undefined ? ext : Debug.fail(`File ${path} has unknown extension.`); +} + +const allSupportedExtensions: readonly Extension[][] = [[Extension.Ts, Extension.Tsx, Extension.Dts, Extension.Js, Extension.Jsx], [Extension.Cts, Extension.Dcts, Extension.Cjs], [Extension.Mts, Extension.Dmts, Extension.Mjs]]; +const allSupportedExtensionsWithJson: readonly Extension[][] = [...allSupportedExtensions, [Extension.Json]]; + +/** @internal */ +export function getSupportedExtensions(options?: CompilerOptions): readonly Extension[][]; +/** @internal */ +export function getSupportedExtensions(options?: CompilerOptions, extraFileExtensions?: readonly FileExtensionInfo[]): readonly string[][]; +/** @internal */ +export function getSupportedExtensions(options?: CompilerOptions, extraFileExtensions?: readonly FileExtensionInfo[]): readonly string[][] { + const needJsExtensions = options && getAllowJSCompilerOption(options); + + if (!extraFileExtensions || extraFileExtensions.length === 0) { + return needJsExtensions ? allSupportedExtensions : supportedTSExtensions; + } + + const builtins = needJsExtensions ? allSupportedExtensions : supportedTSExtensions; + const flatBuiltins = flatten(builtins); + const extensions = [ + ...builtins, + ...mapDefined(extraFileExtensions, x => x.scriptKind === ScriptKind.Deferred || needJsExtensions && isJSLike(x.scriptKind) && flatBuiltins.indexOf(x.extension as Extension) === -1 ? [x.extension] : undefined) + ]; + + return extensions; +} +/** @internal */ +export const supportedJSExtensions: readonly Extension[][] = [[Extension.Js, Extension.Jsx], [Extension.Mjs], [Extension.Cjs]]; +/** @internal */ +export const supportedJSExtensionsFlat: readonly Extension[] = flatten(supportedJSExtensions); +/** + * Groups of supported extensions in order of file resolution precedence. (eg, TS > TSX > DTS and seperately, CTS > DCTS) + * + * @internal + */ + export const supportedTSExtensions: readonly Extension[][] = [[Extension.Ts, Extension.Tsx, Extension.Dts], [Extension.Cts, Extension.Dcts], [Extension.Mts, Extension.Dmts]]; + /** @internal */ + export const supportedTSExtensionsFlat: readonly Extension[] = flatten(supportedTSExtensions); + +/** @internal */ +export function hasJSFileExtension(fileName: string): boolean { + return some(supportedJSExtensionsFlat, extension => fileExtensionIs(fileName, extension)); +} + +/** @internal */ +export function hasTSFileExtension(fileName: string): boolean { + return some(supportedTSExtensionsFlat, extension => fileExtensionIs(fileName, extension)); +} + +/** @internal */ +export function getAllowJSCompilerOption(compilerOptions: CompilerOptions): boolean { + return compilerOptions.allowJs === undefined ? !!compilerOptions.checkJs : compilerOptions.allowJs; +} + +function isJSLike(scriptKind: ScriptKind | undefined): boolean { + return scriptKind === ScriptKind.JS || scriptKind === ScriptKind.JSX; +} + +export function getFirstIdentifier(node: EntityNameOrEntityNameExpression): Identifier { + switch (node.kind) { + case SyntaxKind.Identifier: + return node; + case SyntaxKind.QualifiedName: + do { + node = node.left; + } while (node.kind !== SyntaxKind.Identifier); + return node; + case SyntaxKind.PropertyAccessExpression: + do { + node = node.expression; + } while (node.kind !== SyntaxKind.Identifier); + return node; + } +} + + +/** @internal */ +export function isPartOfTypeNode(node: Node): boolean { + if (SyntaxKind.FirstTypeNode <= node.kind && node.kind <= SyntaxKind.LastTypeNode) { + return true; + } + + switch (node.kind) { + case SyntaxKind.AnyKeyword: + case SyntaxKind.UnknownKeyword: + case SyntaxKind.NumberKeyword: + case SyntaxKind.BigIntKeyword: + case SyntaxKind.StringKeyword: + case SyntaxKind.BooleanKeyword: + case SyntaxKind.SymbolKeyword: + case SyntaxKind.ObjectKeyword: + case SyntaxKind.UndefinedKeyword: + case SyntaxKind.NeverKeyword: + return true; + case SyntaxKind.VoidKeyword: + return node.parent.kind !== SyntaxKind.VoidExpression; + case SyntaxKind.ExpressionWithTypeArguments: + return isHeritageClause(node.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(node); + case SyntaxKind.TypeParameter: + return node.parent.kind === SyntaxKind.MappedType || node.parent.kind === SyntaxKind.InferType; + + // Identifiers and qualified names may be type nodes, depending on their context. Climb + // above them to find the lowest container + case SyntaxKind.Identifier: + // If the identifier is the RHS of a qualified name, then it's a type iff its parent is. + if (node.parent.kind === SyntaxKind.QualifiedName && (node.parent as QualifiedName).right === node) { + node = node.parent; + } + else if (node.parent.kind === SyntaxKind.PropertyAccessExpression && (node.parent as PropertyAccessExpression).name === node) { + node = node.parent; + } + // At this point, node is either a qualified name or an identifier + Debug.assert(node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.QualifiedName || node.kind === SyntaxKind.PropertyAccessExpression, + "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'."); + // falls through + + case SyntaxKind.QualifiedName: + case SyntaxKind.PropertyAccessExpression: + case SyntaxKind.ThisKeyword: { + const { parent } = node; + if (parent.kind === SyntaxKind.TypeQuery) { + return false; + } + if (parent.kind === SyntaxKind.ImportType) { + return !(parent as ImportTypeNode).isTypeOf; + } + // Do not recursively call isPartOfTypeNode on the parent. In the example: + // + // let a: A.B.C; + // + // Calling isPartOfTypeNode would consider the qualified name A.B a type node. + // Only C and A.B.C are type nodes. + if (SyntaxKind.FirstTypeNode <= parent.kind && parent.kind <= SyntaxKind.LastTypeNode) { + return true; + } + switch (parent.kind) { + case SyntaxKind.ExpressionWithTypeArguments: + return isHeritageClause(parent.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(parent); + case SyntaxKind.TypeParameter: + return node === (parent as TypeParameterDeclaration).constraint; + case SyntaxKind.JSDocTemplateTag: + return node === (parent as JSDocTemplateTag).constraint; + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.PropertySignature: + case SyntaxKind.Parameter: + case SyntaxKind.VariableDeclaration: + return node === (parent as HasType).type; + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.FunctionExpression: + case SyntaxKind.ArrowFunction: + case SyntaxKind.Constructor: + case SyntaxKind.MethodDeclaration: + case SyntaxKind.MethodSignature: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + return node === (parent as FunctionLikeDeclaration).type; + case SyntaxKind.CallSignature: + case SyntaxKind.ConstructSignature: + case SyntaxKind.IndexSignature: + return node === (parent as SignatureDeclaration).type; + case SyntaxKind.TypeAssertionExpression: + return node === (parent as TypeAssertion).type; + case SyntaxKind.CallExpression: + case SyntaxKind.NewExpression: + return contains((parent as CallExpression).typeArguments, node); + case SyntaxKind.TaggedTemplateExpression: + // TODO (drosen): TaggedTemplateExpressions may eventually support type arguments. + return false; + } + } + } + + return false; +} +/** @internal */ +export function isExpressionWithTypeArgumentsInClassExtendsClause(node: Node): node is ExpressionWithTypeArguments { + return tryGetClassExtendingExpressionWithTypeArguments(node) !== undefined; +} +export function tryGetClassExtendingExpressionWithTypeArguments(node: Node): ClassLikeDeclaration | undefined { + const cls = tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node); + return cls && !cls.isImplements ? cls.class : undefined; +} + +/** @internal */ +export interface ClassImplementingOrExtendingExpressionWithTypeArguments { + readonly class: ClassLikeDeclaration; + readonly isImplements: boolean; +} +/** @internal */ +export function tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node: Node): ClassImplementingOrExtendingExpressionWithTypeArguments | undefined { + return isExpressionWithTypeArguments(node) + && isHeritageClause(node.parent) + && isClassLike(node.parent.parent) + ? { class: node.parent.parent, isImplements: node.parent.token === SyntaxKind.ImplementsKeyword } + : undefined; +} +export function isClassLike(node: Node): node is ClassLikeDeclaration { + return node && (node.kind === SyntaxKind.ClassDeclaration || node.kind === SyntaxKind.ClassExpression); +} + +export const supportedDeclarationExtensions: readonly Extension[] = [Extension.Dts, Extension.Dcts, Extension.Dmts]; +/** @internal */ +export function isDeclarationFileName(fileName: string): boolean { + return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions); +} + + + +/** @internal */ +export function cloneCompilerOptions(options: CompilerOptions): CompilerOptions { + const result = clone(options); + setConfigFileInOptions(result, options && options.configFile as any); + return result; +} +/** @internal */ +export function setConfigFileInOptions(options: CompilerOptions, configFile: TsConfigSourceFile | undefined) { + if (configFile) { + Object.defineProperty(options, "configFile", { enumerable: false, writable: false, value: configFile }); + } +} + +const carriageReturnLineFeed = "\r\n"; +const lineFeed = "\n"; +/** @internal */ +export function getNewLineCharacter(options: CompilerOptions | PrinterOptions, getNewLine?: () => string): string { + switch (options.newLine) { + case NewLineKind.CarriageReturnLineFeed: + return carriageReturnLineFeed; + case NewLineKind.LineFeed: + return lineFeed; + } + return getNewLine ? getNewLine() : sys ? sys.newLine : carriageReturnLineFeed; +} + + +export function isAmbientDeclaration(node: Node) { + // @ts-expect-error NodeFlags.Ambient is not exposed + return node.flags & NodeFlags.Ambient +} + +export function isEnumConst(node: EnumDeclaration): boolean { + return !!(getSyntacticModifierFlags(node) & ModifierFlags.Const); +} + + +function idText(id: Identifier) { return id.escapedText; } +/** @internal */ +export function nodeHasName(statement: Node, name: Identifier) { + if (isNamedDeclaration(statement) && isIdentifier(statement.name) && idText(statement.name as Identifier) === idText(name)) { + return true; + } + if (isVariableStatement(statement) && some(statement.declarationList.declarations, d => nodeHasName(d, name))) { + return true; + } + return false; +} + +/** @internal */ +export function isNamedDeclaration(node: Node): node is NamedDeclaration & { name: DeclarationName } { + return !!(node as NamedDeclaration).name; // A 'name' property should always be a DeclarationName. +} + +/** + * @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 isIdentifierANonContextualKeyword(node: Identifier): boolean { + const originalKeywordKind = identifierToKeywordKind(node); + return !!originalKeywordKind && !isContextualKeyword(originalKeywordKind); +} + +/** @internal */ +export function isContextualKeyword(token: SyntaxKind): boolean { + return SyntaxKind.AbstractKeyword <= token && token <= SyntaxKind.OfKeyword; +} \ No newline at end of file diff --git a/external-declarations/src/main.ts b/external-declarations/src/main.ts new file mode 100644 index 0000000000000..4b4a709094a31 --- /dev/null +++ b/external-declarations/src/main.ts @@ -0,0 +1,113 @@ +import * as ts from 'typescript' +import * as fsp from 'fs/promises' +import * as fs from 'fs' +import * as path from 'path' +import { transformFile } from './compiler/transform-file'; +import { ArgType, parseArgs } from './utils/cli-parser'; +import { ensureDir, readAllFiles } from './utils/fs-utils'; +import { changeAnyExtension, normalizePath } from './compiler/path-utils'; + + +(ts as any).Debug.enableDebugInfo(); + + +const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), { + default: ArgType.StringArray(), + project: { + type: ArgType.String(), + description: "Project configuration", + required: true + }, + watch: { + type: ArgType.Boolean(), + description: "Keep watching", + }, + declarationDir: { + type: ArgType.String(), + description: "Keep watching", + } +}); +printUsageOnErrors(); + +let projectConfig = normalizePath(path.resolve(parsedArgs.project)); +let projectPath = projectConfig; +if (path.extname(projectConfig) !== ".json") { + projectConfig = normalizePath(path.join(projectConfig, "tsconfig.json")) +} else { + projectPath = normalizePath(path.dirname(projectConfig)); +} + + +let watched: Array<{ + watcher: fs.FSWatcher, + path: string, +}> = []; + +function watch(rootDir: string) { + if (parsedArgs.watch) { + let newWatched: Array; + if (parsedArgs.default) { + newWatched = parsedArgs.default; + } else { + newWatched = [rootDir]; + } + if(watched.length != newWatched.length || !watched.every((v, index) => v.path === newWatched[index])) { + watched.forEach(f => f.watcher.close()); + watched = newWatched.map(f => ({ + path: f, + watcher: fs.watch(f, { persistent: true, recursive: true }, cancelAndRestart), + })) + } + + } +} +let lastRunCancellation:CancellationToken = { isCancelled: false } +async function delay(ms:number) { + return new Promise(r => setTimeout(r, ms)); +} +function cancelAndRestart(event: fs.WatchEventType, filename: string) { + console.log(event, filename) + lastRunCancellation.isCancelled = true; + lastRunCancellation = { isCancelled: false }; + main(lastRunCancellation, 50); +} +async function main(cancellationToken: CancellationToken, msDelay: number) { + await delay(msDelay); + if(cancellationToken.isCancelled) return; + + console.log("Detected changes rebuilding") + + const tsconfig = ts.readConfigFile(projectConfig, ts.sys.readFile); + const parsed = ts.parseJsonConfigFileContent(tsconfig.config, ts.sys, "./"); + const options = parsed.options; + const rootDir = options.rootDir ? normalizePath(path.resolve(path.join(projectPath, options.rootDir))) : projectPath; + const files = parsedArgs.default ?? readAllFiles(rootDir, /.*\.ts/).filter(t => !/[\\/]node_modules[\\/]/.exec(t)); + + watch(rootDir); + if(cancellationToken.isCancelled) return; + await transformProjectFiles(rootDir, files, options, cancellationToken); +} +main(lastRunCancellation, 0); + +type CancellationToken = { isCancelled: boolean }; +async function transformProjectFiles(rootDir: string, files: string[], options: ts.CompilerOptions, cancellationToken: CancellationToken) { + + const declarationDir = parsedArgs.declarationDir ? normalizePath(path.resolve(parsedArgs.declarationDir)) : + options.outDir ? normalizePath(path.resolve(options.outDir)) : + undefined; + for (let file of files) { + try { + const source = await fsp.readFile(file, { encoding: "utf8" }); + if(cancellationToken.isCancelled) return; + const actualDeclaration = transformFile(file, source, [], [], options, ts.ModuleKind.ESNext); + const output = + declarationDir? changeAnyExtension(file.replace(rootDir, declarationDir), ".d.ts"): + changeAnyExtension(file, ".d.ts"); + await ensureDir(path.dirname(output)); + await fsp.writeFile(output, actualDeclaration.code); + } catch (e) { + console.error(`Failed to transform: ${file}`, e) + } + } + return { rootDir }; +} \ No newline at end of file diff --git a/external-declarations/src/test-runner/cli-arg-config.ts b/external-declarations/src/test-runner/cli-arg-config.ts new file mode 100644 index 0000000000000..07d00c7cf8ad2 --- /dev/null +++ b/external-declarations/src/test-runner/cli-arg-config.ts @@ -0,0 +1,17 @@ +import { parserConfiguration, ArgType } from "../utils/cli-parser"; + +export const testRunnerCLIConfiguration = parserConfiguration({ + default: { + type: ArgType.String(), + description: "Test filter to run", + }, + type: { + type: ArgType.Enum("all", "tsc", "i"), + description: "Type of run (Typescript, all, or isolated)", + }, + shard: ArgType.Number(), + shardCount: ArgType.Number(), + histFolder: ArgType.String(), + libPath: ArgType.String(), + rootPaths: ArgType.StringArray(), +}) diff --git a/external-declarations/src/test-runner/excluded-ts-tests.ts b/external-declarations/src/test-runner/excluded-ts-tests.ts new file mode 100644 index 0000000000000..257e34e69c4d7 --- /dev/null +++ b/external-declarations/src/test-runner/excluded-ts-tests.ts @@ -0,0 +1,21 @@ +export const excludedTsTests = new Set([ + // These two tests contain a declaration error + // A variable that is not of a literal type is used as a computed property name + // TS will error on this and will not merge the overloads to a singe symbol + // This means TS will not remove the implementation overload + // + // The external declaration emitter will use the variable name to merge symbols. + "computedPropertyNamesOnOverloads_ES5", + "computedPropertyNamesOnOverloads_ES6", + // Symbols are merged across files and excluded. We can't do cross file analysis + "jsFileCompilationDuplicateFunctionImplementation", + "jsFileCompilationDuplicateFunctionImplementationFileOrderReversed", + // Output emitted to same file test ios not of interest for isolated declarations + "filesEmittingIntoSameOutput", + // Error in TS, but excludes implementation in declarations. + // Generating same output if we have an error is best effort + "overloadsInDifferentContainersDisagreeOnAmbient", + // The function is elided because the eval function is merged with eval from libs into a single symbol + // We can't reproduce this behavior + "parserStrictMode8", +]); \ No newline at end of file diff --git a/external-declarations/src/test-runner/parallel-run.ts b/external-declarations/src/test-runner/parallel-run.ts new file mode 100644 index 0000000000000..f8b779162981c --- /dev/null +++ b/external-declarations/src/test-runner/parallel-run.ts @@ -0,0 +1,82 @@ +import * as fs from 'fs' +import * as path from 'path' +import * as childProcess from "child_process"; +import { parseArgs } from '../utils/cli-parser'; +import { testRunnerCLIConfiguration } from './cli-arg-config'; + +type ExecuteResult = { + error: childProcess.ExecException | null + stdout: string, + stderr: string, +} + +function exec(cmd: string, dir: string, onStdOut: (s: string) => void) { + return new Promise((resolve) => { + console.log(`In ${dir} Executing: ${cmd}`); + + const ls = childProcess.spawn(cmd, [], { + cwd: path.resolve(path.join(process.cwd(), dir)), + shell: true + }); + let stdout = "" + let stderr = "" + ls.stdout.on('data', function (data) { + if(!onStdOut) { + process.stdout.write(data.toString()); + } else { + onStdOut(data.toString()); + } + stdout += data.toString(); + }); + + ls.stderr.on('data', function (data) { + process.stderr.write(data.toString()); + stderr += data.toString(); + }); + + ls.on('error', function(err) { + console.log(err); + }) + ls.on('exit', function (code) { + console.log('exited:' + code?.toString()); + resolve({ + error: !code ? null : Object.assign(new Error(""), { + code, + cmd: cmd, + }), + stderr, + stdout + }) + }); + }) +} + +const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), testRunnerCLIConfiguration); +printUsageOnErrors(); + +const shardCount = parsedArgs.shardCount ?? 6; + +async function main() { + let runCount = 0; + const date = new Date(); + const histFolder = `${date.toISOString().replace(/:/g, "-")}-${parsedArgs.type}`; + const commandLine = `node ./build/test-runner/test-runner-main.js --histFolder=${histFolder} ${process.argv.slice(2).join(" ")} `; + let lastWrite = new Date().getTime(); + const startTime = new Date().getTime(); + const elapsedTime = (now: number) => `${((now - startTime) / 1000 / 60).toFixed(2)} minutes` + const promisees = Array.from({ length: shardCount}).map(async (_, index) => { + await exec(commandLine + ` --shard=${index}`, "./", out => { + runCount += (out.match(/Ran:/g) || []).length; + if(new Date().getTime() - lastWrite > 2000) { + lastWrite = new Date().getTime() + console.log(`Run count: ${runCount} after ${elapsedTime(lastWrite)}`); + } + }); + console.log(`Shard ${index} completed`); + }); + await Promise.all(promisees); + const endTime = new Date().getTime(); + console.log(`Took ${elapsedTime(endTime)} to complete ${runCount}`) +} + +main(); \ No newline at end of file diff --git a/external-declarations/src/test-runner/test-runner-main.ts b/external-declarations/src/test-runner/test-runner-main.ts new file mode 100644 index 0000000000000..20f6a6b7838fc --- /dev/null +++ b/external-declarations/src/test-runner/test-runner-main.ts @@ -0,0 +1,138 @@ +import 'source-map-support/register'; +import * as path from 'path' +import * as fs from 'fs/promises' +import { loadTestCase, runTypeScript, runIsolated, FileContent } from "./utils"; +import { IO } from './tsc-infrastructure/io'; +import { changeExtension } from './tsc-infrastructure/vpath'; +import { CompilerSettings, TestCaseContent } from './tsc-infrastructure/test-file-parser'; + +import * as ts from 'typescript' +import { normalizePath, removeExtension } from '../compiler/path-utils'; +import { excludedTsTests } from './excluded-ts-tests'; +import { getFileBasedTestConfigurationDescription, getFileBasedTestConfigurations } from './tsc-infrastructure/vary-by'; +import { setCompilerOptionsFromHarnessSetting } from './tsc-infrastructure/compiler-run'; +import { parseArgs } from '../utils/cli-parser'; +import { testRunnerCLIConfiguration } from './cli-arg-config'; +import { addToQueue, ensureDir, flushQueue, readAllFiles } from '../utils/fs-utils'; + + +const excludeFilter =/\/fourslash\//; + +const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), testRunnerCLIConfiguration); + +printUsageOnErrors(); + +const shard = parsedArgs.shard +const shardCount = parsedArgs.shardCount +let prefix: string | undefined = undefined; +const prefixed = parsedArgs.default && /(?[0-9]{5})-(((?.*)\.(?(.*=.*)+)(\.d\.ts))|(?.*))/.exec(parsedArgs.default); +let testVersionFilter: string | undefined = undefined; +if(prefixed) { + prefix = prefixed.groups?.index; + parsedArgs.default = prefixed.groups?.name ?? prefixed.groups?.nameSimple; + testVersionFilter = prefixed.groups?.options; +} + +const rootCasePaths = parsedArgs.rootPaths ?? [ './tests/sources' ] +const libFolder = parsedArgs.libPath ?? path.join(rootCasePaths[0], "../lib") + +const filter = parsedArgs.default ? new RegExp(parsedArgs.default) : /.*\.ts/ +const runType = + parsedArgs.type === "all" ? { tsc: true, isolated: true } : + parsedArgs.type === "tsc" ? { tsc: true, isolated: false } : + { tsc: false, isolated: true }; + +const allTests = rootCasePaths + .map(r => readAllFiles(r, filter)) + .flat() + .filter(f => !excludeFilter.exec(f)); + +(ts as any).Debug.enableDebugInfo(); + +const date = new Date(); +const historical = (parsedArgs.histFolder && `/${parsedArgs.histFolder}/`) ?? `/${date.toISOString().replace(/:/g, "-")}-${parsedArgs.type}/`; + +function pad(num: number, size: number) { return ('000000000' + num).substr(-size); } + +async function main() { + + const libFiles = (await fs.readdir(libFolder)).map(n => normalizePath(path.join("/.lib", n))); + + const testsPerShared = shardCount && Math.round(allTests.length / shardCount); + const [start, end] = shard == undefined || shardCount == undefined || testsPerShared == undefined ? + [0, allTests.length] : + [shard * testsPerShared, (shard == shardCount - 1) ? allTests.length : (shard + 1) * testsPerShared]; + + for (let count = start; count < end; count++) { + const testFile = normalizePath(allTests[count]); + const testFileNoExtension = removeExtension(path.basename(testFile), path.extname(testFile)); + if(excludedTsTests.has(testFileNoExtension)) { + continue; + } + const data = await loadTestCase(testFile); + const variedConfiguration = getFileBasedTestConfigurations(data.settings) ?? [{}]; + for(const varConfig of variedConfiguration) { + const varConfigDescription = getFileBasedTestConfigurationDescription(varConfig); + if (testVersionFilter && varConfigDescription !== testVersionFilter) continue; + const file = (prefix ?? pad(count, 5)) + "-" + changeExtension(path.basename(testFile), varConfigDescription + ".d.ts"); + + if (runType.tsc) runAndWrite(path.join("./tsc-tests/$now/tsc", file), varConfig, runTypeScript); + + if (runType.isolated) runAndWrite(path.join("./tsc-tests/$now/isolated", file), varConfig, (t, s) => runIsolated(t, libFiles, s)); + + } + console.log(` Ran: ${pad(count, 5)}/${allTests.length}`) + + function runAndWrite(file: string, varySettings: CompilerSettings, fn: (data: TestCaseContent, opts: ts.CompilerOptions) => FileContent[]) { + const settings: ts.CompilerOptions = {}; + setCompilerOptionsFromHarnessSetting(data.settings, settings); + setCompilerOptionsFromHarnessSetting(varySettings, settings); + + + // Not supported + delete settings.outFile; + delete settings.out; + delete settings.outDir; + delete settings.declarationDir; + + const results = safeRun(d => fn(d, settings)); + const resultText = results + .flatMap(r => [ + "// " + r.fileName, + r.content + ]) + .join(IO.newLine()); + + if (allTests.length > 5) { + writeResults(normalizePath(file).replace("/$now/", historical), resultText); + } + writeResults(file, resultText); + } + + function safeRun(fn: (data: TestCaseContent) => FileContent[]): FileContent[] { + try { + return fn(data) + } catch (e) { + return [{ + fileName: path.basename(testFile), + content: ` +==== ERROR ==== +message: ${e.message}, +${e.stack}, + `, + }] + } + } + + async function writeResults(fileName: string, results: string) { + addToQueue(async () => { + const dirName = path.dirname(fileName); + await ensureDir(dirName); + await fs.writeFile(fileName, results); + console.log(`Written: ${pad(count, 5)}/${allTests.length}`) + }); + } + } + await flushQueue(); +} +main(); \ No newline at end of file diff --git a/external-declarations/src/test-runner/tsc-infrastructure/collections.ts b/external-declarations/src/test-runner/tsc-infrastructure/collections.ts new file mode 100644 index 0000000000000..dbd518538a657 --- /dev/null +++ b/external-declarations/src/test-runner/tsc-infrastructure/collections.ts @@ -0,0 +1,326 @@ +import * as ts from '../../compiler/lang-utils' + +export interface SortOptions { + comparer: (a: T, b: T) => number; + sort: "insertion" | "comparison"; +} + +export class SortedMap { + private _comparer: (a: K, b: K) => number; + private _keys: K[] = []; + private _values: V[] = []; + private _order: number[] | undefined; + private _version = 0; + private _copyOnWrite = false; + + constructor(comparer: ((a: K, b: K) => number) | SortOptions, iterable?: Iterable<[K, V]>) { + this._comparer = typeof comparer === "object" ? comparer.comparer : comparer; + this._order = typeof comparer === "object" && comparer.sort === "insertion" ? [] : undefined; + if (iterable) { + const iterator = getIterator(iterable); + try { + for (let i = nextResult(iterator); i; i = nextResult(iterator)) { + const [key, value] = i.value; + this.set(key, value); + } + } + finally { + closeIterator(iterator); + } + } + } + + public get size() { + return this._keys.length; + } + + public get comparer() { + return this._comparer; + } + + public get [Symbol.toStringTag]() { + return "SortedMap"; + } + + public has(key: K) { + return ts.binarySearch(this._keys, key, ts.identity, this._comparer) >= 0; + } + + public get(key: K) { + const index = ts.binarySearch(this._keys, key, ts.identity, this._comparer); + return index >= 0 ? this._values[index] : undefined; + } + + public getEntry(key: K): [ K, V ] | undefined { + const index = ts.binarySearch(this._keys, key, ts.identity, this._comparer); + return index >= 0 ? [ this._keys[index], this._values[index] ] : undefined; + } + + public set(key: K, value: V) { + const index = ts.binarySearch(this._keys, key, ts.identity, this._comparer); + if (index >= 0) { + this._values[index] = value; + } + else { + this.writePreamble(); + insertAt(this._keys, ~index, key); + insertAt(this._values, ~index, value); + if (this._order) insertAt(this._order, ~index, this._version); + this.writePostScript(); + } + return this; + } + + public delete(key: K) { + const index = ts.binarySearch(this._keys, key, ts.identity, this._comparer); + if (index >= 0) { + this.writePreamble(); + ts.orderedRemoveItemAt(this._keys, index); + ts.orderedRemoveItemAt(this._values, index); + if (this._order) ts.orderedRemoveItemAt(this._order, index); + this.writePostScript(); + return true; + } + return false; + } + + public clear() { + if (this.size > 0) { + this.writePreamble(); + this._keys.length = 0; + this._values.length = 0; + if (this._order) this._order.length = 0; + this.writePostScript(); + } + } + + public forEach(callback: (value: V, key: K, collection: this) => void, thisArg?: any) { + const keys = this._keys; + const values = this._values; + const indices = this.getIterationOrder(); + const version = this._version; + this._copyOnWrite = true; + try { + if (indices) { + for (const i of indices) { + callback.call(thisArg, values[i], keys[i], this); + } + } + else { + for (let i = 0; i < keys.length; i++) { + callback.call(thisArg, values[i], keys[i], this); + } + } + } + finally { + if (version === this._version) { + this._copyOnWrite = false; + } + } + } + + public * keys() { + const keys = this._keys; + const indices = this.getIterationOrder(); + const version = this._version; + this._copyOnWrite = true; + try { + if (indices) { + for (const i of indices) { + yield keys[i]; + } + } + else { + yield* keys; + } + } + finally { + if (version === this._version) { + this._copyOnWrite = false; + } + } + } + + public * values() { + const values = this._values; + const indices = this.getIterationOrder(); + const version = this._version; + this._copyOnWrite = true; + try { + if (indices) { + for (const i of indices) { + yield values[i]; + } + } + else { + yield* values; + } + } + finally { + if (version === this._version) { + this._copyOnWrite = false; + } + } + } + + public * entries() { + const keys = this._keys; + const values = this._values; + const indices = this.getIterationOrder(); + const version = this._version; + this._copyOnWrite = true; + try { + if (indices) { + for (const i of indices) { + yield [keys[i], values[i]] as [K, V]; + } + } + else { + for (let i = 0; i < keys.length; i++) { + yield [keys[i], values[i]] as [K, V]; + } + } + } + finally { + if (version === this._version) { + this._copyOnWrite = false; + } + } + } + + public [Symbol.iterator]() { + return this.entries(); + } + + private writePreamble() { + if (this._copyOnWrite) { + this._keys = this._keys.slice(); + this._values = this._values.slice(); + if (this._order) this._order = this._order.slice(); + this._copyOnWrite = false; + } + } + + private writePostScript() { + this._version++; + } + + private getIterationOrder() { + if (this._order) { + const order = this._order; + return this._order + .map((_, i) => i) + .sort((x, y) => order[x] - order[y]); + } + return undefined; + } +} + +export function insertAt(array: T[], index: number, value: T): void { + if (index === 0) { + array.unshift(value); + } + else if (index === array.length) { + array.push(value); + } + else { + for (let i = array.length; i > index; i--) { + array[i] = array[i - 1]; + } + array[index] = value; + } +} + +export function getIterator(iterable: Iterable): Iterator { + return iterable[Symbol.iterator](); +} + +export function nextResult(iterator: Iterator): IteratorResult | undefined { + const result = iterator.next(); + return result.done ? undefined : result; +} + +export function closeIterator(iterator: Iterator) { + const fn = iterator.return; + if (typeof fn === "function") fn.call(iterator); +} + +/** + * A collection of metadata that supports inheritance. + */ +export class Metadata { + private static readonly _undefinedValue = {}; + private _parent: Metadata | undefined; + private _map: { [key: string]: any }; + private _version = 0; + private _size = -1; + private _parentVersion: number | undefined; + + constructor(parent?: Metadata) { + this._parent = parent; + this._map = Object.create(parent ? parent._map : null); // eslint-disable-line no-null/no-null + } + + public get size(): number { + if (this._size === -1 || (this._parent && this._parent._version !== this._parentVersion)) { + let size = 0; + for (const _ in this._map) size++; + this._size = size; + if (this._parent) { + this._parentVersion = this._parent._version; + } + } + return this._size; + } + + public get parent() { + return this._parent; + } + + public has(key: string): boolean { + return this._map[Metadata._escapeKey(key)] !== undefined; + } + + public get(key: string): any { + const value = this._map[Metadata._escapeKey(key)]; + return value === Metadata._undefinedValue ? undefined : value; + } + + public set(key: string, value: any): this { + this._map[Metadata._escapeKey(key)] = value === undefined ? Metadata._undefinedValue : value; + this._size = -1; + this._version++; + return this; + } + + public delete(key: string): boolean { + const escapedKey = Metadata._escapeKey(key); + if (this._map[escapedKey] !== undefined) { + delete this._map[escapedKey]; + this._size = -1; + this._version++; + return true; + } + return false; + } + + public clear(): void { + this._map = Object.create(this._parent ? this._parent._map : null); // eslint-disable-line no-null/no-null + this._size = -1; + this._version++; + } + + public forEach(callback: (value: any, key: string, map: this) => void) { + for (const key in this._map) { + callback(this._map[key], Metadata._unescapeKey(key), this); + } + } + + private static _escapeKey(text: string) { + return (text.length >= 2 && text.charAt(0) === "_" && text.charAt(1) === "_" ? "_" + text : text); + } + + private static _unescapeKey(text: string) { + return (text.length >= 3 && text.charAt(0) === "_" && text.charAt(1) === "_" && text.charAt(2) === "_" ? text.slice(1) : text); + } +} diff --git a/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts b/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts new file mode 100644 index 0000000000000..db6a1632e5059 --- /dev/null +++ b/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts @@ -0,0 +1,231 @@ +import { CompilerOptions, Diagnostic } from "typescript"; +import ts = require("typescript"); +import { hasProperty } from "../../compiler/debug"; +import { trimString, startsWith, mapDefined, map, compareStringsCaseSensitive } from "../../compiler/lang-utils"; +import * as opts from "./options"; +import * as TestCaseParser from "./test-file-parser"; +import * as vfs from "./vfs"; +import * as vpath from "./vpath"; +import { parseCustomTypeOption, parseListTypeOption } from "./options"; +import { fileExtensionIs, getNormalizedAbsolutePath, normalizeSlashes, toPath } from "../../compiler/path-utils"; +import { cloneCompilerOptions, getEmitScriptTarget } from "../../compiler/utils"; +import * as documents from './test-document'; +import { createGetCanonicalFileName } from "../../compiler/path-utils"; +import * as compiler from './compiler'; +import * as fakes from './fakesHosts'; +import { IO } from "./io"; + +interface HarnessOptions { + useCaseSensitiveFileNames?: boolean; + includeBuiltFile?: string; + baselineFile?: string; + libFiles?: string; + noTypesAndSymbols?: boolean; +} + +// Additional options not already in ts.optionDeclarations +const harnessOptionDeclarations: opts.CommandLineOption[] = [ + { name: "allowNonTsExtensions", type: "boolean", defaultValueDescription: false }, + { name: "useCaseSensitiveFileNames", type: "boolean", defaultValueDescription: false }, + { name: "baselineFile", type: "string" }, + { name: "includeBuiltFile", type: "string" }, + { name: "fileName", type: "string" }, + { name: "libFiles", type: "string" }, + { name: "noErrorTruncation", type: "boolean", defaultValueDescription: false }, + { name: "suppressOutputPathCheck", type: "boolean", defaultValueDescription: false }, + { name: "noImplicitReferences", type: "boolean", defaultValueDescription: false }, + { name: "currentDirectory", type: "string" }, + { name: "symlink", type: "string" }, + { name: "link", type: "string" }, + { name: "noTypesAndSymbols", type: "boolean", defaultValueDescription: false }, + // Emitted js baseline will print full paths for every output file + { name: "fullEmitPaths", type: "boolean", defaultValueDescription: false }, +]; + +let optionsIndex: Map; +function getCommandLineOption(name: string): opts.CommandLineOption | undefined { + if (!optionsIndex) { + optionsIndex = new Map(); + const optionDeclarations = harnessOptionDeclarations.concat(opts.optionDeclarations); + for (const option of optionDeclarations) { + optionsIndex.set(option.name.toLowerCase(), option); + } + } + return optionsIndex.get(name.toLowerCase()); +} +export function setCompilerOptionsFromHarnessSetting(settings: TestCaseParser.CompilerSettings, options: CompilerOptions & HarnessOptions): void { + for (const name in settings) { + if (hasProperty(settings, name)) { + const value = settings[name]; + if (value === undefined) { + throw new Error(`Cannot have undefined value for compiler option '${name}'.`); + } + const option = getCommandLineOption(name); + if (option) { + const errors: Diagnostic[] = []; + options[option.name] = optionValue(option, value, errors); + if (errors.length > 0) { + throw new Error(`Unknown value '${value}' for compiler option '${name}'.`); + } + } + } + } +} + + +function optionValue(option: opts.CommandLineOption, value: string, errors: Diagnostic[]): any { + switch (option.type) { + case "boolean": + return value.toLowerCase() === "true"; + case "string": + return value; + case "number": { + const numverValue = parseInt(value, 10); + if (isNaN(numverValue)) { + throw new Error(`Value must be a number, got: ${JSON.stringify(value)}`); + } + return numverValue; + } + // If not a primitive, the possible types are specified in what is effectively a map of options. + case "list": + return parseListTypeOption(option, value, errors); + default: + return parseCustomTypeOption(option as opts.CommandLineOptionOfCustomType, value, errors); + } +} + +export interface TestFile { + unitName: string; + content: string; + fileOptions?: any; +} + +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 options: ts.CompilerOptions & HarnessOptions = compilerOptions ? cloneCompilerOptions(compilerOptions) : { noResolve: false }; + options.target = getEmitScriptTarget(options); + options.newLine = options.newLine || ts.NewLineKind.CarriageReturnLineFeed; + options.noErrorTruncation = true; + options.skipDefaultLibCheck = typeof options.skipDefaultLibCheck === "undefined" ? true : options.skipDefaultLibCheck; + + if (typeof currentDirectory === "undefined") { + currentDirectory = vfs.srcFolder; + } + + // Parse settings + if (harnessSettings) { + setCompilerOptionsFromHarnessSetting(harnessSettings, options); + } + if (options.rootDirs) { + options.rootDirs = map(options.rootDirs, d => getNormalizedAbsolutePath(d, currentDirectory)); + } + + const useCaseSensitiveFileNames = options.useCaseSensitiveFileNames !== undefined ? options.useCaseSensitiveFileNames : true; + const programFileNames = inputFiles.map(file => file.unitName).filter(fileName => !fileExtensionIs(fileName, ts.Extension.Json)); + + // Files from built\local that are requested by test "@includeBuiltFiles" to be in the context. + // Treat them as library files, so include them in build, but not in baselines. + if (options.includeBuiltFile) { + programFileNames.push(vpath.combine(vfs.builtFolder, options.includeBuiltFile)); + } + + // Files from tests\lib that are requested by "@libFiles" + if (options.libFiles) { + for (const fileName of options.libFiles.split(",")) { + programFileNames.push(vpath.combine(vfs.testLibFolder, fileName)); + } + + } + const docs = inputFiles.concat(otherFiles).map(documents.TextDocument.fromTestFile); + const fs = vfs.createFromFileSystem(IO, !useCaseSensitiveFileNames, { documents: docs, cwd: currentDirectory }); + if (symlinks) { + fs.apply(symlinks); + } + const host = new fakes.CompilerHost(fs, options); + const result = compiler.compileFiles(host, programFileNames, options); + result.symlinks = symlinks; + return result; +} + + +export function* iterateOutputs(outputFiles: Iterable): IterableIterator<[string, string]> { + // Collect, test, and sort the fileNames + const files = Array.from(outputFiles); + files.slice().sort((a, b) => compareStringsCaseSensitive(cleanName(a.file), cleanName(b.file))); + const dupeCase = new Map(); + // Yield them + for (const outputFile of files) { + yield [checkDuplicatedFileName(outputFile.file, dupeCase), "/*====== " + outputFile.file + " ======*/\r\n" + Utils.removeByteOrderMark(outputFile.text)]; + } + + function cleanName(fn: string) { + const lastSlash = normalizeSlashes(fn).lastIndexOf("/"); + return fn.substr(lastSlash + 1).toLowerCase(); + } +} + +function checkDuplicatedFileName(resultName: string, dupeCase: Map): string { + resultName = sanitizeTestFilePath(resultName); + if (dupeCase.has(resultName)) { + // A different baseline filename should be manufactured if the names differ only in case, for windows compat + const count = 1 + dupeCase.get(resultName)!; + dupeCase.set(resultName, count); + resultName = `${resultName}.dupe${count}`; + } + else { + dupeCase.set(resultName, 0); + } + return resultName; +} + +export function sanitizeTestFilePath(name: string) { + const path = toPath(normalizeSlashes(name.replace(/[\^<>:"|?*%]/g, "_")).replace(/\.\.\//g, "__dotdot/"), "", Utils.canonicalizeForHarness); + if (startsWith(path, "/")) { + return path.substring(1); + } + return path; +} + +export namespace Utils { + export const canonicalizeForHarness = createGetCanonicalFileName(/*caseSensitive*/ false); // This is done so tests work on windows _and_ linux + + export function removeByteOrderMark(text: string): string { + const length = getByteOrderMarkLength(text); + return length ? text.slice(length) : text; + } + + export function getByteOrderMarkLength(text: string): number { + if (text.length >= 1) { + const ch0 = text.charCodeAt(0); + if (ch0 === 0xfeff) return 1; + if (ch0 === 0xfe) return text.length >= 2 && text.charCodeAt(1) === 0xff ? 2 : 0; + if (ch0 === 0xff) return text.length >= 2 && text.charCodeAt(1) === 0xfe ? 2 : 0; + if (ch0 === 0xef) return text.length >= 3 && text.charCodeAt(1) === 0xbb && text.charCodeAt(2) === 0xbf ? 3 : 0; + } + return 0; + } + + function checkDuplicatedFileName(resultName: string, dupeCase: Map): string { + resultName = sanitizeTestFilePath(resultName); + if (dupeCase.has(resultName)) { + // A different baseline filename should be manufactured if the names differ only in case, for windows compat + const count = 1 + dupeCase.get(resultName)!; + dupeCase.set(resultName, count); + resultName = `${resultName}.dupe${count}`; + } + else { + dupeCase.set(resultName, 0); + } + return resultName; + } + export function addUTF8ByteOrderMark(text: string) { + return getByteOrderMarkLength(text) === 0 ? "\u00EF\u00BB\u00BF" + text : text; + } +} \ No newline at end of file diff --git a/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts b/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts new file mode 100644 index 0000000000000..5d39f71f97045 --- /dev/null +++ b/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts @@ -0,0 +1,270 @@ +import * as ts from "typescript"; +import * as lang from "../../compiler/lang-utils"; +import * as vpath from "./vpath"; +import * as documents from "./test-document"; +import * as vfs from "./vfs"; +import * as collections from "./collections"; +import * as fakes from './fakesHosts'; +import { getDeclarationEmitExtensionForPath, getOutputExtension } from "../../compiler/utils"; +import { fileExtensionIs } from "../../compiler/path-utils"; + +/** + * Test harness compiler functionality. + */ + +export interface Project { + file: string; + config?: ts.ParsedCommandLine; + errors?: ts.Diagnostic[]; +} + +export function readProject(host: fakes.ParseConfigHost, project: string | undefined, existingOptions?: ts.CompilerOptions): Project | undefined { + if (project) { + project = vpath.isTsConfigFile(project) ? project : vpath.combine(project, "tsconfig.json"); + } + else { + [project] = host.vfs.scanSync(".", "ancestors-or-self", { + accept: (path, stats) => stats.isFile() && host.vfs.stringComparer(vpath.basename(path), "tsconfig.json") === 0 + }); + } + + if (project) { + // TODO(rbuckton): Do we need to resolve this? Resolving breaks projects tests. + // project = vpath.resolve(host.vfs.currentDirectory, project); + + // read the config file + const readResult = ts.readConfigFile(project, path => host.readFile(path)); + if (readResult.error) { + return { file: project, errors: [readResult.error] }; + } + + // parse the config file + const config = ts.parseJsonConfigFileContent(readResult.config, host, vpath.dirname(project), existingOptions); + return { file: project, errors: config.errors, config }; + } +} + +/** + * Correlates compilation inputs and outputs + */ +export interface CompilationOutput { + readonly inputs: readonly documents.TextDocument[]; + readonly js: documents.TextDocument | undefined; + readonly dts: documents.TextDocument | undefined; + readonly map: documents.TextDocument | undefined; +} + +export class CompilationResult { + public readonly host: fakes.CompilerHost; + public readonly program: ts.Program | undefined; + public readonly result: ts.EmitResult | undefined; + public readonly options: ts.CompilerOptions; + public readonly diagnostics: readonly ts.Diagnostic[]; + public readonly js: ReadonlyMap; + public readonly dts: ReadonlyMap; + public readonly maps: ReadonlyMap; + public symlinks?: vfs.FileSet; // Location to store original symlinks so they may be used in both original and declaration file compilations + + private _inputs: documents.TextDocument[] = []; + private _inputsAndOutputs: collections.SortedMap; + + constructor(host: fakes.CompilerHost, options: ts.CompilerOptions, program: ts.Program | undefined, result: ts.EmitResult | undefined, diagnostics: readonly ts.Diagnostic[]) { + this.host = host; + this.program = program; + this.result = result; + this.diagnostics = diagnostics; + this.options = program ? program.getCompilerOptions() : options; + + // collect outputs + const js = this.js = new collections.SortedMap({ comparer: this.vfs.stringComparer, sort: "insertion" }); + const dts = this.dts = new collections.SortedMap({ comparer: this.vfs.stringComparer, sort: "insertion" }); + const maps = this.maps = new collections.SortedMap({ comparer: this.vfs.stringComparer, sort: "insertion" }); + for (const document of this.host.outputs) { + if (vpath.isJavaScript(document.file) || fileExtensionIs(document.file, ts.Extension.Json)) { + js.set(document.file, document); + } + else if (vpath.isDeclaration(document.file)) { + dts.set(document.file, document); + } + else if (vpath.isSourceMap(document.file)) { + maps.set(document.file, document); + } + } + + // correlate inputs and outputs + this._inputsAndOutputs = new collections.SortedMap({ comparer: this.vfs.stringComparer, sort: "insertion" }); + if (program) { + if (this.options.out || this.options.outFile) { + const outFile = vpath.resolve(this.vfs.cwd(), this.options.outFile || this.options.out); + const inputs: documents.TextDocument[] = []; + for (const sourceFile of program.getSourceFiles()) { + if (sourceFile) { + const input = new documents.TextDocument(sourceFile.fileName, sourceFile.text); + this._inputs.push(input); + if (!vpath.isDeclaration(sourceFile.fileName)) { + inputs.push(input); + } + } + } + + const outputs: CompilationOutput = { + inputs, + js: js.get(outFile), + dts: dts.get(vpath.changeExtension(outFile, ".d.ts")), + map: maps.get(outFile + ".map") + }; + + if (outputs.js) this._inputsAndOutputs.set(outputs.js.file, outputs); + if (outputs.dts) this._inputsAndOutputs.set(outputs.dts.file, outputs); + if (outputs.map) this._inputsAndOutputs.set(outputs.map.file, outputs); + + for (const input of inputs) { + this._inputsAndOutputs.set(input.file, outputs); + } + } + else { + for (const sourceFile of program.getSourceFiles()) { + if (sourceFile) { + const input = new documents.TextDocument(sourceFile.fileName, sourceFile.text); + this._inputs.push(input); + if (!vpath.isDeclaration(sourceFile.fileName)) { + const extname = getOutputExtension(sourceFile.fileName, this.options); + const outputs: CompilationOutput = { + inputs: [input], + js: js.get(this.getOutputPath(sourceFile.fileName, extname)), + dts: dts.get(this.getOutputPath(sourceFile.fileName, getDeclarationEmitExtensionForPath(sourceFile.fileName))), + map: maps.get(this.getOutputPath(sourceFile.fileName, extname + ".map")) + }; + + this._inputsAndOutputs.set(sourceFile.fileName, outputs); + if (outputs.js) this._inputsAndOutputs.set(outputs.js.file, outputs); + if (outputs.dts) this._inputsAndOutputs.set(outputs.dts.file, outputs); + if (outputs.map) this._inputsAndOutputs.set(outputs.map.file, outputs); + } + } + } + } + } + } + + public get vfs(): vfs.FileSystem { + return this.host.vfs; + } + + public get inputs(): readonly documents.TextDocument[] { + return this._inputs; + } + + public get outputs(): readonly documents.TextDocument[] { + return this.host.outputs; + } + + public get traces(): readonly string[] { + return this.host.traces; + } + + public get emitSkipped(): boolean { + return this.result && this.result.emitSkipped || false; + } + + public get singleFile(): boolean { + return !!this.options.outFile || !!this.options.out; + } + + public get commonSourceDirectory(): string { + const common = this.program && (this.program as any).getCommonSourceDirectory() || ""; + return common && vpath.combine(this.vfs.cwd(), common); + } + + public getInputsAndOutputs(path: string): CompilationOutput | undefined { + return this._inputsAndOutputs.get(vpath.resolve(this.vfs.cwd(), path)); + } + + public getInputs(path: string): readonly documents.TextDocument[] | undefined { + const outputs = this.getInputsAndOutputs(path); + return outputs && outputs.inputs; + } + + public getOutput(path: string, kind: "js" | "dts" | "map"): documents.TextDocument | undefined { + const outputs = this.getInputsAndOutputs(path); + return outputs && outputs[kind]; + } + + public getOutputPath(path: string, ext: string): string { + if (this.options.outFile || this.options.out) { + path = vpath.resolve(this.vfs.cwd(), this.options.outFile || this.options.out); + } + else { + path = vpath.resolve(this.vfs.cwd(), path); + const outDir = ext === ".d.ts" || ext === ".json.d.ts" || ext === ".d.mts" || ext === ".d.cts" ? this.options.declarationDir || this.options.outDir : this.options.outDir; + if (outDir) { + const common = this.commonSourceDirectory; + if (common) { + path = vpath.relative(common, path, this.vfs.ignoreCase); + path = vpath.combine(vpath.resolve(this.vfs.cwd(), this.options.outDir), path); + } + } + } + return vpath.changeExtension(path, ext); + } + + public getNumberOfJsFiles(includeJson: boolean) { + if (includeJson) { + return this.js.size; + } + else { + let count = this.js.size; + this.js.forEach(document => { + if (fileExtensionIs(document.file, ts.Extension.Json)) { + count--; + } + }); + return count; + } + } +} + +export function compileFiles(host: fakes.CompilerHost, rootFiles: string[] | undefined, compilerOptions: ts.CompilerOptions): CompilationResult { + if (compilerOptions.project || !rootFiles || rootFiles.length === 0) { + const project = readProject(host.parseConfigHost, compilerOptions.project, compilerOptions); + if (project) { + if (project.errors && project.errors.length > 0) { + return new CompilationResult(host, compilerOptions, /*program*/ undefined, /*result*/ undefined, project.errors); + } + if (project.config) { + rootFiles = project.config.fileNames; + compilerOptions = project.config.options; + } + } + delete compilerOptions.project; + } + + // establish defaults (aligns with old harness) + if (compilerOptions.target === undefined && compilerOptions.module !== ts.ModuleKind.Node16 && compilerOptions.module !== ts.ModuleKind.NodeNext) compilerOptions.target = ts.ScriptTarget.ES3; + if (compilerOptions.newLine === undefined) compilerOptions.newLine = ts.NewLineKind.CarriageReturnLineFeed; + if (compilerOptions.skipDefaultLibCheck === undefined) compilerOptions.skipDefaultLibCheck = true; + if (compilerOptions.noErrorTruncation === undefined) compilerOptions.noErrorTruncation = true; + + // 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 = lang.length(rootFiles) >= 100 || (!!compilerOptions.skipLibCheck && !!compilerOptions.declaration); + + const preProgram = !skipErrorComparison ? ts.createProgram(rootFiles || [], { ...compilerOptions, configFile: compilerOptions.configFile, traceResolution: false }, host) : undefined; + const preErrors = preProgram && ts.getPreEmitDiagnostics(preProgram); + + const program = ts.createProgram(rootFiles || [], compilerOptions, host); + const emitResult = program.emit(undefined, (fileName, text, writeByteOrderMark) => { + // If there are errors TS will ot emit declaration files. We want then regardless of errors. + if(!vpath.isAbsolute(fileName)) { + fileName = vpath.resolve(host.vfs.cwd(), fileName); + } + if(host.outputs.some(d => d.file === fileName)) return; + host.writeFile(fileName, text, writeByteOrderMark); + // @ts-expect-error We use forceDts emit documented flag + }, undefined, undefined,undefined, true); + const postErrors = ts.getPreEmitDiagnostics(program); + const longerErrors = lang.length(preErrors) > postErrors.length ? preErrors : postErrors; + const shorterErrors = longerErrors === preErrors ? postErrors : preErrors; + const errors = preErrors && (preErrors.length !== postErrors.length) ? [...shorterErrors!] : postErrors; + return new CompilationResult(host, compilerOptions, program, emitResult, errors); +} diff --git a/external-declarations/src/test-runner/tsc-infrastructure/fakesHosts.ts b/external-declarations/src/test-runner/tsc-infrastructure/fakesHosts.ts new file mode 100644 index 0000000000000..4498a0c5641a8 --- /dev/null +++ b/external-declarations/src/test-runner/tsc-infrastructure/fakesHosts.ts @@ -0,0 +1,409 @@ +import * as ts from 'typescript'; +import * as vfs from "./vfs"; +import * as vpath from "./vpath"; +import * as collections from './collections' +import * as documents from './test-document' +import { Utils } from './compiler-run'; +import { getNewLineCharacter } from '../../compiler/utils'; + + +/** + * Fake implementations of various compiler dependencies. + */ + + const processExitSentinel = new Error("System exit"); + + export interface SystemOptions { + executingFilePath?: string; + newLine?: "\r\n" | "\n"; + env?: Record; + } + + /** + * A fake `ts.System` that leverages a virtual file system. + */ + export class System implements ts.System { + public readonly vfs: vfs.FileSystem; + public readonly args: string[] = []; + public readonly output: string[] = []; + public readonly newLine: string; + public readonly useCaseSensitiveFileNames: boolean; + public exitCode: number | undefined; + + private readonly _executingFilePath: string | undefined; + private readonly _env: Record | undefined; + + constructor(vfs: vfs.FileSystem, { executingFilePath, newLine = "\r\n", env }: SystemOptions = {}) { + this.vfs = vfs.isReadonly ? vfs.shadow() : vfs; + this.useCaseSensitiveFileNames = !this.vfs.ignoreCase; + this.newLine = newLine; + this._executingFilePath = executingFilePath; + this._env = env; + } + + private testTerminalWidth = Number.parseInt(this.getEnvironmentVariable("TS_TEST_TERMINAL_WIDTH")); + getWidthOfTerminal = Number.isNaN(this.testTerminalWidth) ? undefined : () => this.testTerminalWidth; + + // Pretty output + writeOutputIsTTY() { + return true; + } + + public write(message: string) { + console.log(message); + this.output.push(message); + } + + public readFile(path: string) { + try { + const content = this.vfs.readFileSync(path, "utf8"); + return content === undefined ? undefined : Utils.removeByteOrderMark(content); + } + catch { + return undefined; + } + } + + public writeFile(path: string, data: string, writeByteOrderMark?: boolean): void { + this.vfs.mkdirpSync(vpath.dirname(path)); + this.vfs.writeFileSync(path, writeByteOrderMark ? Utils.addUTF8ByteOrderMark(data) : data); + } + + public deleteFile(path: string) { + this.vfs.unlinkSync(path); + } + + public fileExists(path: string) { + const stats = this._getStats(path); + return stats ? stats.isFile() : false; + } + + public directoryExists(path: string) { + const stats = this._getStats(path); + return stats ? stats.isDirectory() : false; + } + + public createDirectory(path: string): void { + this.vfs.mkdirpSync(path); + } + + public getCurrentDirectory() { + return this.vfs.cwd(); + } + + public getDirectories(path: string) { + const result: string[] = []; + try { + for (const file of this.vfs.readdirSync(path)) { + if (this.vfs.statSync(vpath.combine(path, file)).isDirectory()) { + result.push(file); + } + } + } + catch { /*ignore*/ } + return result; + } + + public readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[] { + throw new Error("Not implemented"); + // return matchFiles(path, extensions, exclude, include, this.useCaseSensitiveFileNames, this.getCurrentDirectory(), depth, path => this.getAccessibleFileSystemEntries(path), path => this.realpath(path)); + } + + public getAccessibleFileSystemEntries(path: string): vfs.FileSystemEntries { + const files: string[] = []; + const directories: string[] = []; + try { + for (const file of this.vfs.readdirSync(path)) { + try { + const stats = this.vfs.statSync(vpath.combine(path, file)); + if (stats.isFile()) { + files.push(file); + } + else if (stats.isDirectory()) { + directories.push(file); + } + } + catch { /*ignored*/ } + } + } + catch { /*ignored*/ } + return { files, directories }; + } + + public exit(exitCode?: number) { + this.exitCode = exitCode; + throw processExitSentinel; + } + + public getFileSize(path: string) { + const stats = this._getStats(path); + return stats && stats.isFile() ? stats.size : 0; + } + + public resolvePath(path: string) { + return vpath.resolve(this.vfs.cwd(), path); + } + + public getExecutingFilePath() { + if (this._executingFilePath === undefined) throw new Error("ts.notImplemented"); + return this._executingFilePath; + } + + public getModifiedTime(path: string) { + const stats = this._getStats(path); + return stats ? stats.mtime : undefined!; // TODO: GH#18217 + } + + public setModifiedTime(path: string, time: Date) { + this.vfs.utimesSync(path, time, time); + } + + public createHash(data: string): string { + return `${generateDjb2Hash(data)}-${data}`; + } + + public realpath(path: string) { + try { + return this.vfs.realpathSync(path); + } + catch { + return path; + } + } + + public getEnvironmentVariable(name: string): string { + return (this._env && this._env[name])!; // TODO: GH#18217 + } + + private _getStats(path: string) { + try { + return this.vfs.existsSync(path) ? this.vfs.statSync(path) : undefined; + } + catch { + return undefined; + } + } + + now() { + return new Date(this.vfs.time()); + } + } + + /** + * A fake `ts.ParseConfigHost` that leverages a virtual file system. + */ + export class ParseConfigHost implements ts.ParseConfigHost { + public readonly sys: System; + + constructor(sys: System | vfs.FileSystem) { + if (sys instanceof vfs.FileSystem) sys = new System(sys); + this.sys = sys; + } + + public get vfs() { + return this.sys.vfs; + } + + public get useCaseSensitiveFileNames() { + return this.sys.useCaseSensitiveFileNames; + } + + public fileExists(fileName: string): boolean { + return this.sys.fileExists(fileName); + } + + public directoryExists(directoryName: string): boolean { + return this.sys.directoryExists(directoryName); + } + + public readFile(path: string): string | undefined { + return this.sys.readFile(path); + } + + public readDirectory(path: string, extensions: string[], excludes: string[], includes: string[], depth: number): string[] { + return this.sys.readDirectory(path, extensions, excludes, includes, depth); + } + } + +/** + * A fake `ts.CompilerHost` that leverages a virtual file system. + */ + export class CompilerHost implements ts.CompilerHost { + public readonly sys: System; + public readonly defaultLibLocation: string; + public readonly outputs: documents.TextDocument[] = []; + private readonly _outputsMap: collections.SortedMap; + public readonly traces: string[] = []; + public readonly shouldAssertInvariants = false; + + private _setParentNodes: boolean; + private _sourceFiles: collections.SortedMap; + private _parseConfigHost: ParseConfigHost | undefined; + private _newLine: string; + + constructor(sys: System | vfs.FileSystem, options = ts.getDefaultCompilerOptions(), setParentNodes = false) { + if (sys instanceof vfs.FileSystem) sys = new System(sys); + this.sys = sys; + this.defaultLibLocation = sys.vfs.meta.get("defaultLibLocation") || ""; + this._newLine = getNewLineCharacter(options, () => this.sys.newLine); + this._sourceFiles = new collections.SortedMap({ comparer: sys.vfs.stringComparer, sort: "insertion" }); + this._setParentNodes = setParentNodes; + this._outputsMap = new collections.SortedMap(this.vfs.stringComparer); + } + + public get vfs() { + return this.sys.vfs; + } + + public get parseConfigHost() { + return this._parseConfigHost || (this._parseConfigHost = new ParseConfigHost(this.sys)); + } + + public getCurrentDirectory(): string { + return this.sys.getCurrentDirectory(); + } + + public useCaseSensitiveFileNames(): boolean { + return this.sys.useCaseSensitiveFileNames; + } + + public getNewLine(): string { + return this._newLine; + } + + public getCanonicalFileName(fileName: string): string { + return this.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); + } + + public deleteFile(fileName: string) { + this.sys.deleteFile(fileName); + } + + public fileExists(fileName: string): boolean { + return this.sys.fileExists(fileName); + } + + public directoryExists(directoryName: string): boolean { + return this.sys.directoryExists(directoryName); + } + + public getModifiedTime(fileName: string) { + return this.sys.getModifiedTime(fileName); + } + + public setModifiedTime(fileName: string, time: Date) { + return this.sys.setModifiedTime(fileName, time); + } + + public getDirectories(path: string): string[] { + return this.sys.getDirectories(path); + } + + public readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[] { + return this.sys.readDirectory(path, extensions, exclude, include, depth); + } + + public readFile(path: string): string | undefined { + return this.sys.readFile(path); + } + + public writeFile(fileName: string, content: string, writeByteOrderMark: boolean) { + if (writeByteOrderMark) content = Utils.addUTF8ByteOrderMark(content); + this.sys.writeFile(fileName, content); + + const document = new documents.TextDocument(fileName, content); + document.meta.set("fileName", fileName); + this.vfs.filemeta(fileName).set("document", document); + if (!this._outputsMap.has(document.file)) { + this._outputsMap.set(document.file, this.outputs.length); + this.outputs.push(document); + } + this.outputs[this._outputsMap.get(document.file)!] = document; + } + + public trace(s: string): void { + this.traces.push(s); + } + + public realpath(path: string): string { + return this.sys.realpath(path); + } + + public getDefaultLibLocation(): string { + return vpath.resolve(this.getCurrentDirectory(), this.defaultLibLocation); + } + + public getDefaultLibFileName(options: ts.CompilerOptions): string { + return vpath.resolve(this.getDefaultLibLocation(), ts.getDefaultLibFileName(options)); + } + + public getSourceFile(fileName: string, languageVersion: number): ts.SourceFile | undefined { + const canonicalFileName = this.getCanonicalFileName(vpath.resolve(this.getCurrentDirectory(), fileName)); + const existing = this._sourceFiles.get(canonicalFileName); + if (existing) return existing; + + const content = this.readFile(canonicalFileName); + if (content === undefined) return undefined; + + // A virtual file system may shadow another existing virtual file system. This + // allows us to reuse a common virtual file system structure across multiple + // tests. If a virtual file is a shadow, it is likely that the file will be + // reused across multiple tests. In that case, we cache the SourceFile we parse + // so that it can be reused across multiple tests to avoid the cost of + // repeatedly parsing the same file over and over (such as lib.d.ts). + const cacheKey = this.vfs.shadowRoot && `SourceFile[languageVersion=${languageVersion},setParentNodes=${this._setParentNodes}]`; + if (cacheKey) { + const meta = this.vfs.filemeta(canonicalFileName); + const sourceFileFromMetadata = meta.get(cacheKey) as ts.SourceFile | undefined; + if (sourceFileFromMetadata && sourceFileFromMetadata.getFullText() === content) { + this._sourceFiles.set(canonicalFileName, sourceFileFromMetadata); + return sourceFileFromMetadata; + } + } + + const parsed = ts.createSourceFile(fileName, content, languageVersion, this._setParentNodes || this.shouldAssertInvariants); + + this._sourceFiles.set(canonicalFileName, parsed); + + if (cacheKey) { + // store the cached source file on the unshadowed file with the same version. + const stats = this.vfs.statSync(canonicalFileName); + + let fs = this.vfs; + while (fs.shadowRoot) { + try { + const shadowRootStats = fs.shadowRoot.existsSync(canonicalFileName) ? fs.shadowRoot.statSync(canonicalFileName) : undefined!; // TODO: GH#18217 + if (shadowRootStats.dev !== stats.dev || + shadowRootStats.ino !== stats.ino || + shadowRootStats.mtimeMs !== stats.mtimeMs) { + break; + } + + fs = fs.shadowRoot; + } + catch { + break; + } + } + + if (fs !== this.vfs) { + fs.filemeta(canonicalFileName).set(cacheKey, parsed); + } + } + + return parsed; + } +} +/** + * djb2 hashing algorithm + * http://www.cse.yorku.ca/~oz/hash.html + * + * @internal + */ + export function generateDjb2Hash(data: string): string { + let acc = 5381; + for (let i = 0; i < data.length; i++) { + acc = ((acc << 5) + acc) + data.charCodeAt(i); + } + return acc.toString(); +} diff --git a/external-declarations/src/test-runner/tsc-infrastructure/io.ts b/external-declarations/src/test-runner/tsc-infrastructure/io.ts new file mode 100644 index 0000000000000..ad4305913df3b --- /dev/null +++ b/external-declarations/src/test-runner/tsc-infrastructure/io.ts @@ -0,0 +1,177 @@ +import { sys } from "typescript"; +import { FileSystemEntries } from "./vfs"; +import * as vpath from './vpath'; +import { compareStringsCaseSensitive, compareStringsCaseInsensitive } from "../../compiler/lang-utils"; +type RunnerBase = unknown; + +export interface IO { + newLine(): string; + getCurrentDirectory(): string; + useCaseSensitiveFileNames(): boolean; + resolvePath(path: string): string | undefined; + getFileSize(path: string): number; + readFile(path: string): string | undefined; + writeFile(path: string, contents: string): void; + directoryName(path: string): string | undefined; + getDirectories(path: string): string[]; + createDirectory(path: string): void; + fileExists(fileName: string): boolean; + directoryExists(path: string): boolean; + deleteFile(fileName: string): void; + listFiles(path: string, filter?: RegExp, options?: { recursive?: boolean }): string[]; + log(text: string): void; + args(): string[]; + getExecutingFilePath(): string; + getWorkspaceRoot(): string; + exit(exitCode?: number): void; + readDirectory(path: string, extension?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): readonly string[]; + getAccessibleFileSystemEntries(dirname: string): FileSystemEntries; + tryEnableSourceMapsForHost?(): void; + getEnvironmentVariable?(name: string): string; + getMemoryUsage?(): number | undefined; + joinPath(...components: string[]): string +} + +export let IO: IO; +export function setHarnessIO(io: IO) { + IO = io; +} + +// harness always uses one kind of new line +// But note that `parseTestData` in `fourslash.ts` uses "\n" +export const harnessNewLine = "\r\n"; + +// Root for file paths that are stored in a virtual file system +export const virtualFileSystemRoot = "/"; + +function createNodeIO(): IO { + let workspaceRoot = "../"; + let fs: any, pathModule: any; + if (require) { + fs = require("fs"); + pathModule = require("path"); + workspaceRoot = pathModule.resolve(workspaceRoot); + } + else { + fs = pathModule = {}; + } + + function deleteFile(path: string) { + try { + fs.unlinkSync(path); + } + catch { /*ignore*/ } + } + + function directoryName(path: string) { + const dirPath = pathModule.dirname(path); + // Node will just continue to repeat the root path, rather than return null + return dirPath === path ? undefined : dirPath; + } + + function joinPath(...components: string[]) { + return pathModule.join(...components); + } + + function enumerateTestFiles(runner: RunnerBase):any[] { + throw new Error("Not implemented"); + // return runner.getTestFiles(); + } + + function listFiles(path: string, spec: RegExp, options: { recursive?: boolean } = {}) { + function filesInFolder(folder: string): string[] { + let paths: string[] = []; + + for (const file of fs.readdirSync(folder)) { + const pathToFile = pathModule.join(folder, file); + if (!fs.existsSync(pathToFile)) continue; // ignore invalid symlinks + const stat = fs.statSync(pathToFile); + if (options.recursive && stat.isDirectory()) { + paths = paths.concat(filesInFolder(pathToFile)); + } + else if (stat.isFile() && (!spec || file.match(spec))) { + paths.push(pathToFile); + } + } + + return paths; + } + + return filesInFolder(path); + } + + function getAccessibleFileSystemEntries(dirname: string): FileSystemEntries { + try { + const entries: string[] = fs.readdirSync(dirname || ".").sort(sys.useCaseSensitiveFileNames ? compareStringsCaseSensitive : compareStringsCaseInsensitive); + const files: string[] = []; + const directories: string[] = []; + for (const entry of entries) { + if (entry === "." || entry === "..") continue; + const name = vpath.combine(dirname, entry); + try { + const stat = fs.statSync(name); + if (!stat) continue; + if (stat.isFile()) { + files.push(entry); + } + else if (stat.isDirectory()) { + directories.push(entry); + } + } + catch { /*ignore*/ } + } + return { files, directories }; + } + catch (e) { + return { files: [], directories: [] }; + } + } + + function createDirectory(path: string) { + try { + fs.mkdirSync(path); + } + catch (e) { + if (e.code === "ENOENT") { + createDirectory(vpath.dirname(path)); + createDirectory(path); + } + else if (!sys.directoryExists(path)) { + throw e; + } + } + } + + return { + newLine: () => harnessNewLine, + getCurrentDirectory: () => sys.getCurrentDirectory(), + useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames, + resolvePath: (path: string) => sys.resolvePath(path), + getFileSize: (path: string) => sys.getFileSize!(path), + readFile: path => sys.readFile(path), + writeFile: (path, content) => sys.writeFile(path, content), + directoryName, + getDirectories: path => sys.getDirectories(path), + createDirectory, + fileExists: path => sys.fileExists(path), + directoryExists: path => sys.directoryExists(path), + deleteFile, + listFiles, + log: s => console.log(s), + args: () => sys.args, + getExecutingFilePath: () => sys.getExecutingFilePath(), + getWorkspaceRoot: () => workspaceRoot, + exit: exitCode => sys.exit(exitCode), + readDirectory: (path, extension, exclude, include, depth) => sys.readDirectory(path, extension, exclude, include, depth), + getAccessibleFileSystemEntries, + tryEnableSourceMapsForHost: () => { throw new Error("Not supported")}, + getMemoryUsage: () => sys.getMemoryUsage && sys.getMemoryUsage(), + getEnvironmentVariable(name: string) { + return process.env[name] || ""; + }, + joinPath + }; +} + + +IO = createNodeIO(); diff --git a/external-declarations/src/test-runner/tsc-infrastructure/options.ts b/external-declarations/src/test-runner/tsc-infrastructure/options.ts new file mode 100644 index 0000000000000..ac036e0057acc --- /dev/null +++ b/external-declarations/src/test-runner/tsc-infrastructure/options.ts @@ -0,0 +1,1477 @@ + +// Watch related options + +import { WatchFileKind, WatchDirectoryKind, PollingWatchKind, ScriptTarget, ModuleKind, ImportsNotUsedAsValues, ModuleResolutionKind, NewLineKind, ModuleDetectionKind, JsxEmit, DiagnosticMessage, CompilerOptionsValue, Diagnostic } from "typescript"; +import { isNullOrUndefined } from "../../compiler/lang-utils"; +import { Diagnostics } from "../../compiler/diagnosticInformationMap.generated"; +import { getEntries, mapDefined, startsWith, trimString } from "../../compiler/lang-utils"; + +const jsxOptionMap = new Map(getEntries({ + "preserve": JsxEmit.Preserve, + "react-native": JsxEmit.ReactNative, + "react": JsxEmit.React, + "react-jsx": JsxEmit.ReactJSX, + "react-jsxdev": JsxEmit.ReactJSXDev, +})); + + +// NOTE: The order here is important to default lib ordering as entries will have the same +// order in the generated program (see `getDefaultLibPriority` in program.ts). This +// order also affects overload resolution when a type declared in one lib is +// augmented in another lib. +const libEntries: [string, string][] = [ + // JavaScript only + ["es5", "lib.es5.d.ts"], + ["es6", "lib.es2015.d.ts"], + ["es2015", "lib.es2015.d.ts"], + ["es7", "lib.es2016.d.ts"], + ["es2016", "lib.es2016.d.ts"], + ["es2017", "lib.es2017.d.ts"], + ["es2018", "lib.es2018.d.ts"], + ["es2019", "lib.es2019.d.ts"], + ["es2020", "lib.es2020.d.ts"], + ["es2021", "lib.es2021.d.ts"], + ["es2022", "lib.es2022.d.ts"], + ["esnext", "lib.esnext.d.ts"], + // Host only + ["dom", "lib.dom.d.ts"], + ["dom.iterable", "lib.dom.iterable.d.ts"], + ["webworker", "lib.webworker.d.ts"], + ["webworker.importscripts", "lib.webworker.importscripts.d.ts"], + ["webworker.iterable", "lib.webworker.iterable.d.ts"], + ["scripthost", "lib.scripthost.d.ts"], + // ES2015 Or ESNext By-feature options + ["es2015.core", "lib.es2015.core.d.ts"], + ["es2015.collection", "lib.es2015.collection.d.ts"], + ["es2015.generator", "lib.es2015.generator.d.ts"], + ["es2015.iterable", "lib.es2015.iterable.d.ts"], + ["es2015.promise", "lib.es2015.promise.d.ts"], + ["es2015.proxy", "lib.es2015.proxy.d.ts"], + ["es2015.reflect", "lib.es2015.reflect.d.ts"], + ["es2015.symbol", "lib.es2015.symbol.d.ts"], + ["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"], + ["es2016.array.include", "lib.es2016.array.include.d.ts"], + ["es2017.object", "lib.es2017.object.d.ts"], + ["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"], + ["es2017.string", "lib.es2017.string.d.ts"], + ["es2017.intl", "lib.es2017.intl.d.ts"], + ["es2017.typedarrays", "lib.es2017.typedarrays.d.ts"], + ["es2018.asyncgenerator", "lib.es2018.asyncgenerator.d.ts"], + ["es2018.asynciterable", "lib.es2018.asynciterable.d.ts"], + ["es2018.intl", "lib.es2018.intl.d.ts"], + ["es2018.promise", "lib.es2018.promise.d.ts"], + ["es2018.regexp", "lib.es2018.regexp.d.ts"], + ["es2019.array", "lib.es2019.array.d.ts"], + ["es2019.object", "lib.es2019.object.d.ts"], + ["es2019.string", "lib.es2019.string.d.ts"], + ["es2019.symbol", "lib.es2019.symbol.d.ts"], + ["es2019.intl", "lib.es2019.intl.d.ts"], + ["es2020.bigint", "lib.es2020.bigint.d.ts"], + ["es2020.date", "lib.es2020.date.d.ts"], + ["es2020.promise", "lib.es2020.promise.d.ts"], + ["es2020.sharedmemory", "lib.es2020.sharedmemory.d.ts"], + ["es2020.string", "lib.es2020.string.d.ts"], + ["es2020.symbol.wellknown", "lib.es2020.symbol.wellknown.d.ts"], + ["es2020.intl", "lib.es2020.intl.d.ts"], + ["es2020.number", "lib.es2020.number.d.ts"], + ["es2021.promise", "lib.es2021.promise.d.ts"], + ["es2021.string", "lib.es2021.string.d.ts"], + ["es2021.weakref", "lib.es2021.weakref.d.ts"], + ["es2021.intl", "lib.es2021.intl.d.ts"], + ["es2022.array", "lib.es2022.array.d.ts"], + ["es2022.error", "lib.es2022.error.d.ts"], + ["es2022.intl", "lib.es2022.intl.d.ts"], + ["es2022.object", "lib.es2022.object.d.ts"], + ["es2022.sharedmemory", "lib.es2022.sharedmemory.d.ts"], + ["es2022.string", "lib.es2022.string.d.ts"], + ["esnext.array", "lib.es2022.array.d.ts"], + ["esnext.symbol", "lib.es2019.symbol.d.ts"], + ["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"], + ["esnext.intl", "lib.esnext.intl.d.ts"], + ["esnext.bigint", "lib.es2020.bigint.d.ts"], + ["esnext.string", "lib.es2022.string.d.ts"], + ["esnext.promise", "lib.es2021.promise.d.ts"], + ["esnext.weakref", "lib.es2021.weakref.d.ts"] +]; + +/** + * An array of supported "lib" reference file names used to determine the order for inclusion + * when referenced, as well as for spelling suggestions. This ensures the correct ordering for + * overload resolution when a type declared in one lib is extended by another. + * + * @internal + */ +export const libs = libEntries.map(entry => entry[0]); + +/** + * A map of lib names to lib files. This map is used both for parsing the "lib" command line + * option as well as for resolving lib reference directives. + * + * @internal + */ +export const libMap = new Map(libEntries); + + +/** @internal */ +export const optionsForWatch = [ + { + name: "watchFile", + type: new Map(getEntries({ + fixedpollinginterval: WatchFileKind.FixedPollingInterval, + prioritypollinginterval: WatchFileKind.PriorityPollingInterval, + dynamicprioritypolling: WatchFileKind.DynamicPriorityPolling, + fixedchunksizepolling: WatchFileKind.FixedChunkSizePolling, + usefsevents: WatchFileKind.UseFsEvents, + usefseventsonparentdirectory: WatchFileKind.UseFsEventsOnParentDirectory, + })), + category: Diagnostics.Watch_and_Build_Modes, + description: Diagnostics.Specify_how_the_TypeScript_watch_mode_works, + defaultValueDescription: WatchFileKind.UseFsEvents, + }, + { + name: "watchDirectory", + type: new Map(getEntries({ + usefsevents: WatchDirectoryKind.UseFsEvents, + fixedpollinginterval: WatchDirectoryKind.FixedPollingInterval, + dynamicprioritypolling: WatchDirectoryKind.DynamicPriorityPolling, + fixedchunksizepolling: WatchDirectoryKind.FixedChunkSizePolling, + })), + category: Diagnostics.Watch_and_Build_Modes, + description: Diagnostics.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality, + defaultValueDescription: WatchDirectoryKind.UseFsEvents, + }, + { + name: "fallbackPolling", + type: new Map(getEntries({ + fixedinterval: PollingWatchKind.FixedInterval, + priorityinterval: PollingWatchKind.PriorityInterval, + dynamicpriority: PollingWatchKind.DynamicPriority, + fixedchunksize: PollingWatchKind.FixedChunkSize, + })), + category: Diagnostics.Watch_and_Build_Modes, + description: Diagnostics.Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers, + defaultValueDescription: PollingWatchKind.PriorityInterval, + }, + { + name: "synchronousWatchDirectory", + type: "boolean", + category: Diagnostics.Watch_and_Build_Modes, + description: Diagnostics.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively, + defaultValueDescription: false, + }, + { + name: "excludeDirectories", + type: "list", + element: { + name: "excludeDirectory", + type: "string", + isFilePath: true, + }, + category: Diagnostics.Watch_and_Build_Modes, + description: Diagnostics.Remove_a_list_of_directories_from_the_watch_process, + }, + { + name: "excludeFiles", + type: "list", + element: { + name: "excludeFile", + type: "string", + isFilePath: true, + }, + category: Diagnostics.Watch_and_Build_Modes, + description: Diagnostics.Remove_a_list_of_files_from_the_watch_mode_s_processing, + }, +]; + +/** @internal */ +export const commonOptionsWithBuild = [ + { + name: "help", + shortName: "h", + type: "boolean", + showInSimplifiedHelpView: true, + isCommandLineOnly: true, + category: Diagnostics.Command_line_Options, + description: Diagnostics.Print_this_message, + defaultValueDescription: false, + }, + { + name: "help", + shortName: "?", + type: "boolean", + isCommandLineOnly: true, + category: Diagnostics.Command_line_Options, + defaultValueDescription: false, + }, + { + name: "watch", + shortName: "w", + type: "boolean", + showInSimplifiedHelpView: true, + isCommandLineOnly: true, + category: Diagnostics.Command_line_Options, + description: Diagnostics.Watch_input_files, + defaultValueDescription: false, + }, + { + name: "preserveWatchOutput", + type: "boolean", + showInSimplifiedHelpView: false, + category: Diagnostics.Output_Formatting, + description: Diagnostics.Disable_wiping_the_console_in_watch_mode, + defaultValueDescription: false, + }, + { + name: "listFiles", + type: "boolean", + category: Diagnostics.Compiler_Diagnostics, + description: Diagnostics.Print_all_of_the_files_read_during_the_compilation, + defaultValueDescription: false, + }, + { + name: "explainFiles", + type: "boolean", + category: Diagnostics.Compiler_Diagnostics, + description: Diagnostics.Print_files_read_during_the_compilation_including_why_it_was_included, + defaultValueDescription: false, + }, + { + name: "listEmittedFiles", + type: "boolean", + category: Diagnostics.Compiler_Diagnostics, + description: Diagnostics.Print_the_names_of_emitted_files_after_a_compilation, + defaultValueDescription: false, + }, + { + name: "pretty", + type: "boolean", + showInSimplifiedHelpView: true, + category: Diagnostics.Output_Formatting, + description: Diagnostics.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read, + defaultValueDescription: true, + }, + { + name: "traceResolution", + type: "boolean", + category: Diagnostics.Compiler_Diagnostics, + description: Diagnostics.Log_paths_used_during_the_moduleResolution_process, + defaultValueDescription: false, + }, + { + name: "diagnostics", + type: "boolean", + category: Diagnostics.Compiler_Diagnostics, + description: Diagnostics.Output_compiler_performance_information_after_building, + defaultValueDescription: false, + }, + { + name: "extendedDiagnostics", + type: "boolean", + category: Diagnostics.Compiler_Diagnostics, + description: Diagnostics.Output_more_detailed_compiler_performance_information_after_building, + defaultValueDescription: false, + }, + { + name: "generateCpuProfile", + type: "string", + isFilePath: true, + paramType: Diagnostics.FILE_OR_DIRECTORY, + category: Diagnostics.Compiler_Diagnostics, + description: Diagnostics.Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging, + defaultValueDescription: "profile.cpuprofile" + }, + { + name: "generateTrace", + type: "string", + isFilePath: true, + isCommandLineOnly: true, + paramType: Diagnostics.DIRECTORY, + category: Diagnostics.Compiler_Diagnostics, + description: Diagnostics.Generates_an_event_trace_and_a_list_of_types + }, + { + name: "incremental", + shortName: "i", + type: "boolean", + category: Diagnostics.Projects, + description: Diagnostics.Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects, + transpileOptionValue: undefined, + defaultValueDescription: Diagnostics.false_unless_composite_is_set + }, + { + name: "declaration", + shortName: "d", + type: "boolean", + // Not setting affectsEmit because we calculate this flag might not affect full emit + affectsBuildInfo: true, + showInSimplifiedHelpView: true, + category: Diagnostics.Emit, + transpileOptionValue: undefined, + description: Diagnostics.Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project, + defaultValueDescription: Diagnostics.false_unless_composite_is_set, + }, + { + name: "declarationMap", + type: "boolean", + // Not setting affectsEmit because we calculate this flag might not affect full emit + affectsBuildInfo: true, + showInSimplifiedHelpView: true, + category: Diagnostics.Emit, + transpileOptionValue: undefined, + defaultValueDescription: false, + description: Diagnostics.Create_sourcemaps_for_d_ts_files + }, + { + name: "emitDeclarationOnly", + type: "boolean", + // Not setting affectsEmit because we calculate this flag might not affect full emit + affectsBuildInfo: true, + showInSimplifiedHelpView: true, + category: Diagnostics.Emit, + description: Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files, + transpileOptionValue: undefined, + defaultValueDescription: false, + }, + { + name: "sourceMap", + type: "boolean", + // Not setting affectsEmit because we calculate this flag might not affect full emit + affectsBuildInfo: true, + showInSimplifiedHelpView: true, + category: Diagnostics.Emit, + defaultValueDescription: false, + description: Diagnostics.Create_source_map_files_for_emitted_JavaScript_files, + }, + { + name: "inlineSourceMap", + type: "boolean", + // Not setting affectsEmit because we calculate this flag might not affect full emit + affectsBuildInfo: true, + category: Diagnostics.Emit, + description: Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript, + defaultValueDescription: false, + }, + { + name: "assumeChangesOnlyAffectDirectDependencies", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsEmit: true, + affectsBuildInfo: true, + category: Diagnostics.Watch_and_Build_Modes, + description: Diagnostics.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it, + defaultValueDescription: false, + }, + { + name: "locale", + type: "string", + category: Diagnostics.Command_line_Options, + isCommandLineOnly: true, + description: Diagnostics.Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit, + defaultValueDescription: Diagnostics.Platform_specific + }, +] as const; + +/** @internal */ +export const targetOptionDeclaration = { + name: "target", + shortName: "t", + type: new Map(getEntries({ + es3: ScriptTarget.ES3, + es5: ScriptTarget.ES5, + es6: ScriptTarget.ES2015, + es2015: ScriptTarget.ES2015, + es2016: ScriptTarget.ES2016, + es2017: ScriptTarget.ES2017, + es2018: ScriptTarget.ES2018, + es2019: ScriptTarget.ES2019, + es2020: ScriptTarget.ES2020, + es2021: ScriptTarget.ES2021, + es2022: ScriptTarget.ES2022, + esnext: ScriptTarget.ESNext, + })), + affectsSourceFile: true, + affectsModuleResolution: true, + affectsEmit: true, + affectsBuildInfo: true, + paramType: Diagnostics.VERSION, + showInSimplifiedHelpView: true, + category: Diagnostics.Language_and_Environment, + description: Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations, + defaultValueDescription: ScriptTarget.ES3, +} as const; + +/** @internal */ +export const moduleOptionDeclaration = { + name: "module", + shortName: "m", + type: new Map(getEntries({ + none: ModuleKind.None, + commonjs: ModuleKind.CommonJS, + amd: ModuleKind.AMD, + system: ModuleKind.System, + umd: ModuleKind.UMD, + es6: ModuleKind.ES2015, + es2015: ModuleKind.ES2015, + es2020: ModuleKind.ES2020, + es2022: ModuleKind.ES2022, + esnext: ModuleKind.ESNext, + node16: ModuleKind.Node16, + nodenext: ModuleKind.NodeNext, + })), + affectsModuleResolution: true, + affectsEmit: true, + affectsBuildInfo: true, + paramType: Diagnostics.KIND, + showInSimplifiedHelpView: true, + category: Diagnostics.Modules, + description: Diagnostics.Specify_what_module_code_is_generated, + defaultValueDescription: undefined, +} as const; + +const commandOptionsWithoutBuild = [ + // CommandLine only options + { + name: "all", + type: "boolean", + showInSimplifiedHelpView: true, + category: Diagnostics.Command_line_Options, + description: Diagnostics.Show_all_compiler_options, + defaultValueDescription: false, + }, + { + name: "version", + shortName: "v", + type: "boolean", + showInSimplifiedHelpView: true, + category: Diagnostics.Command_line_Options, + description: Diagnostics.Print_the_compiler_s_version, + defaultValueDescription: false, + }, + { + name: "init", + type: "boolean", + showInSimplifiedHelpView: true, + category: Diagnostics.Command_line_Options, + description: Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file, + defaultValueDescription: false, + }, + { + name: "project", + shortName: "p", + type: "string", + isFilePath: true, + showInSimplifiedHelpView: true, + category: Diagnostics.Command_line_Options, + paramType: Diagnostics.FILE_OR_DIRECTORY, + description: Diagnostics.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json, + }, + { + name: "build", + type: "boolean", + shortName: "b", + showInSimplifiedHelpView: true, + category: Diagnostics.Command_line_Options, + description: Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date, + defaultValueDescription: false, + }, + { + name: "showConfig", + type: "boolean", + showInSimplifiedHelpView: true, + category: Diagnostics.Command_line_Options, + isCommandLineOnly: true, + description: Diagnostics.Print_the_final_configuration_instead_of_building, + defaultValueDescription: false, + }, + { + name: "listFilesOnly", + type: "boolean", + category: Diagnostics.Command_line_Options, + isCommandLineOnly: true, + description: Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing, + defaultValueDescription: false, + }, + + // Basic + targetOptionDeclaration, + moduleOptionDeclaration, + { + name: "lib", + type: "list", + element: { + name: "lib", + type: libMap, + defaultValueDescription: undefined, + }, + affectsProgramStructure: true, + showInSimplifiedHelpView: true, + category: Diagnostics.Language_and_Environment, + description: Diagnostics.Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment, + transpileOptionValue: undefined + }, + { + name: "allowJs", + type: "boolean", + affectsModuleResolution: true, + showInSimplifiedHelpView: true, + category: Diagnostics.JavaScript_Support, + description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files, + defaultValueDescription: false, + }, + { + name: "checkJs", + type: "boolean", + showInSimplifiedHelpView: true, + category: Diagnostics.JavaScript_Support, + description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files, + defaultValueDescription: false, + }, + { + name: "jsx", + type: jsxOptionMap, + affectsSourceFile: true, + affectsEmit: true, + affectsBuildInfo: true, + affectsModuleResolution: true, + paramType: Diagnostics.KIND, + showInSimplifiedHelpView: true, + category: Diagnostics.Language_and_Environment, + description: Diagnostics.Specify_what_JSX_code_is_generated, + defaultValueDescription: undefined, + }, + { + name: "outFile", + type: "string", + affectsEmit: true, + affectsBuildInfo: true, + affectsDeclarationPath: true, + isFilePath: true, + paramType: Diagnostics.FILE, + showInSimplifiedHelpView: true, + category: Diagnostics.Emit, + description: Diagnostics.Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output, + transpileOptionValue: undefined, + }, + { + name: "outDir", + type: "string", + affectsEmit: true, + affectsBuildInfo: true, + affectsDeclarationPath: true, + isFilePath: true, + paramType: Diagnostics.DIRECTORY, + showInSimplifiedHelpView: true, + category: Diagnostics.Emit, + description: Diagnostics.Specify_an_output_folder_for_all_emitted_files, + }, + { + name: "rootDir", + type: "string", + affectsEmit: true, + affectsBuildInfo: true, + affectsDeclarationPath: true, + isFilePath: true, + paramType: Diagnostics.LOCATION, + category: Diagnostics.Modules, + description: Diagnostics.Specify_the_root_folder_within_your_source_files, + defaultValueDescription: Diagnostics.Computed_from_the_list_of_input_files + }, + { + name: "composite", + type: "boolean", + // Not setting affectsEmit because we calculate this flag might not affect full emit + affectsBuildInfo: true, + isTSConfigOnly: true, + category: Diagnostics.Projects, + transpileOptionValue: undefined, + defaultValueDescription: false, + description: Diagnostics.Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references, + }, + { + name: "tsBuildInfoFile", + type: "string", + affectsEmit: true, + affectsBuildInfo: true, + isFilePath: true, + paramType: Diagnostics.FILE, + category: Diagnostics.Projects, + transpileOptionValue: undefined, + defaultValueDescription: ".tsbuildinfo", + description: Diagnostics.Specify_the_path_to_tsbuildinfo_incremental_compilation_file, + }, + { + name: "removeComments", + type: "boolean", + affectsEmit: true, + affectsBuildInfo: true, + showInSimplifiedHelpView: true, + category: Diagnostics.Emit, + defaultValueDescription: false, + description: Diagnostics.Disable_emitting_comments, + }, + { + name: "noEmit", + type: "boolean", + showInSimplifiedHelpView: true, + category: Diagnostics.Emit, + description: Diagnostics.Disable_emitting_files_from_a_compilation, + transpileOptionValue: undefined, + defaultValueDescription: false, + }, + { + name: "importHelpers", + type: "boolean", + affectsEmit: true, + affectsBuildInfo: true, + category: Diagnostics.Emit, + description: Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file, + defaultValueDescription: false, + }, + { + name: "importsNotUsedAsValues", + type: new Map(getEntries({ + remove: ImportsNotUsedAsValues.Remove, + preserve: ImportsNotUsedAsValues.Preserve, + error: ImportsNotUsedAsValues.Error, + })), + affectsEmit: true, + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + category: Diagnostics.Emit, + description: Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types, + defaultValueDescription: ImportsNotUsedAsValues.Remove, + }, + { + name: "downlevelIteration", + type: "boolean", + affectsEmit: true, + affectsBuildInfo: true, + category: Diagnostics.Emit, + description: Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration, + defaultValueDescription: false, + }, + { + name: "isolatedModules", + type: "boolean", + category: Diagnostics.Interop_Constraints, + description: Diagnostics.Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports, + transpileOptionValue: true, + defaultValueDescription: false, + }, + { + name: "isolatedDeclarations", + type: "boolean", + category: Diagnostics.Interop_Constraints, + description: Diagnostics.Ensure_that_each_file_can_have_declaration_emit_generated_without_type_information, + transpileOptionValue: true, + defaultValueDescription: false, + }, + + // Strict Type Checks + { + name: "strict", + type: "boolean", + // Though this affects semantic diagnostics, affectsSemanticDiagnostics is not set here + // The value of each strictFlag depends on own strictFlag value or this and never accessed directly. + // But we need to store `strict` in builf info, even though it won't be examined directly, so that the + // flags it controls (e.g. `strictNullChecks`) will be retrieved correctly + affectsBuildInfo: true, + showInSimplifiedHelpView: true, + category: Diagnostics.Type_Checking, + description: Diagnostics.Enable_all_strict_type_checking_options, + defaultValueDescription: false, + }, + { + name: "noImplicitAny", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + strictFlag: true, + category: Diagnostics.Type_Checking, + description: Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type, + defaultValueDescription: Diagnostics.false_unless_strict_is_set + }, + { + name: "strictNullChecks", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + strictFlag: true, + category: Diagnostics.Type_Checking, + description: Diagnostics.When_type_checking_take_into_account_null_and_undefined, + defaultValueDescription: Diagnostics.false_unless_strict_is_set + }, + { + name: "strictFunctionTypes", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + strictFlag: true, + category: Diagnostics.Type_Checking, + description: Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible, + defaultValueDescription: Diagnostics.false_unless_strict_is_set + }, + { + name: "strictBindCallApply", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + strictFlag: true, + category: Diagnostics.Type_Checking, + description: Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function, + defaultValueDescription: Diagnostics.false_unless_strict_is_set + }, + { + name: "strictPropertyInitialization", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + strictFlag: true, + category: Diagnostics.Type_Checking, + description: Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor, + defaultValueDescription: Diagnostics.false_unless_strict_is_set + }, + { + name: "noImplicitThis", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + strictFlag: true, + category: Diagnostics.Type_Checking, + description: Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any, + defaultValueDescription: Diagnostics.false_unless_strict_is_set + }, + { + name: "useUnknownInCatchVariables", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + strictFlag: true, + category: Diagnostics.Type_Checking, + description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any, + defaultValueDescription: false, + }, + { + name: "alwaysStrict", + type: "boolean", + affectsSourceFile: true, + affectsEmit: true, + affectsBuildInfo: true, + strictFlag: true, + category: Diagnostics.Type_Checking, + description: Diagnostics.Ensure_use_strict_is_always_emitted, + defaultValueDescription: Diagnostics.false_unless_strict_is_set + }, + + // Additional Checks + { + name: "noUnusedLocals", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + category: Diagnostics.Type_Checking, + description: Diagnostics.Enable_error_reporting_when_local_variables_aren_t_read, + defaultValueDescription: false, + }, + { + name: "noUnusedParameters", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + category: Diagnostics.Type_Checking, + description: Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read, + defaultValueDescription: false, + }, + { + name: "exactOptionalPropertyTypes", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + category: Diagnostics.Type_Checking, + description: Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined, + defaultValueDescription: false, + }, + { + name: "noImplicitReturns", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + category: Diagnostics.Type_Checking, + description: Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function, + defaultValueDescription: false, + }, + { + name: "noFallthroughCasesInSwitch", + type: "boolean", + affectsBindDiagnostics: true, + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + category: Diagnostics.Type_Checking, + description: Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements, + defaultValueDescription: false, + }, + { + name: "noUncheckedIndexedAccess", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + category: Diagnostics.Type_Checking, + description: Diagnostics.Add_undefined_to_a_type_when_accessed_using_an_index, + defaultValueDescription: false, + }, + { + name: "noImplicitOverride", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + category: Diagnostics.Type_Checking, + description: Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier, + defaultValueDescription: false, + }, + { + name: "noPropertyAccessFromIndexSignature", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + showInSimplifiedHelpView: false, + category: Diagnostics.Type_Checking, + description: Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type, + defaultValueDescription: false, + }, + + // Module Resolution + { + name: "moduleResolution", + type: new Map(getEntries({ + node: ModuleResolutionKind.NodeJs, + classic: ModuleResolutionKind.Classic, + node16: ModuleResolutionKind.Node16, + nodenext: ModuleResolutionKind.NodeNext, + })), + affectsModuleResolution: true, + paramType: Diagnostics.STRATEGY, + category: Diagnostics.Modules, + description: Diagnostics.Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier, + defaultValueDescription: Diagnostics.module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node + }, + { + name: "baseUrl", + type: "string", + affectsModuleResolution: true, + isFilePath: true, + category: Diagnostics.Modules, + description: Diagnostics.Specify_the_base_directory_to_resolve_non_relative_module_names + }, + { + // this option can only be specified in tsconfig.json + // use type = object to copy the value as-is + name: "paths", + type: "object", + affectsModuleResolution: true, + isTSConfigOnly: true, + category: Diagnostics.Modules, + description: Diagnostics.Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations, + transpileOptionValue: undefined + }, + { + // this option can only be specified in tsconfig.json + // use type = object to copy the value as-is + name: "rootDirs", + type: "list", + isTSConfigOnly: true, + element: { + name: "rootDirs", + type: "string", + isFilePath: true + }, + affectsModuleResolution: true, + category: Diagnostics.Modules, + description: Diagnostics.Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules, + transpileOptionValue: undefined, + defaultValueDescription: Diagnostics.Computed_from_the_list_of_input_files + }, + { + name: "typeRoots", + type: "list", + element: { + name: "typeRoots", + type: "string", + isFilePath: true + }, + affectsModuleResolution: true, + category: Diagnostics.Modules, + description: Diagnostics.Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types + }, + { + name: "types", + type: "list", + element: { + name: "types", + type: "string" + }, + affectsProgramStructure: true, + showInSimplifiedHelpView: true, + category: Diagnostics.Modules, + description: Diagnostics.Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file, + transpileOptionValue: undefined + }, + { + name: "allowSyntheticDefaultImports", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + category: Diagnostics.Interop_Constraints, + description: Diagnostics.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export, + defaultValueDescription: Diagnostics.module_system_or_esModuleInterop + }, + { + name: "esModuleInterop", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsEmit: true, + affectsBuildInfo: true, + showInSimplifiedHelpView: true, + category: Diagnostics.Interop_Constraints, + description: Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility, + defaultValueDescription: false, + }, + { + name: "preserveSymlinks", + type: "boolean", + category: Diagnostics.Interop_Constraints, + description: Diagnostics.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node, + defaultValueDescription: false, + }, + { + name: "allowUmdGlobalAccess", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + category: Diagnostics.Modules, + description: Diagnostics.Allow_accessing_UMD_globals_from_modules, + defaultValueDescription: false, + }, + { + name: "moduleSuffixes", + type: "list", + element: { + name: "suffix", + type: "string", + }, + listPreserveFalsyValues: true, + affectsModuleResolution: true, + category: Diagnostics.Modules, + description: Diagnostics.List_of_file_name_suffixes_to_search_when_resolving_a_module, + }, + + // Source Maps + { + name: "sourceRoot", + type: "string", + affectsEmit: true, + affectsBuildInfo: true, + paramType: Diagnostics.LOCATION, + category: Diagnostics.Emit, + description: Diagnostics.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code, + }, + { + name: "mapRoot", + type: "string", + affectsEmit: true, + affectsBuildInfo: true, + paramType: Diagnostics.LOCATION, + category: Diagnostics.Emit, + description: Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations, + }, + { + name: "inlineSources", + type: "boolean", + affectsEmit: true, + affectsBuildInfo: true, + category: Diagnostics.Emit, + description: Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript, + defaultValueDescription: false, + }, + + // Experimental + { + name: "experimentalDecorators", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + category: Diagnostics.Language_and_Environment, + description: Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators, + defaultValueDescription: false, + }, + { + name: "emitDecoratorMetadata", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsEmit: true, + affectsBuildInfo: true, + category: Diagnostics.Language_and_Environment, + description: Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files, + defaultValueDescription: false, + }, + + // Advanced + { + name: "jsxFactory", + type: "string", + category: Diagnostics.Language_and_Environment, + description: Diagnostics.Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h, + defaultValueDescription: "`React.createElement`" + }, + { + name: "jsxFragmentFactory", + type: "string", + category: Diagnostics.Language_and_Environment, + description: Diagnostics.Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment, + defaultValueDescription: "React.Fragment", + }, + { + name: "jsxImportSource", + type: "string", + affectsSemanticDiagnostics: true, + affectsEmit: true, + affectsBuildInfo: true, + affectsModuleResolution: true, + category: Diagnostics.Language_and_Environment, + description: Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk, + defaultValueDescription: "react" + }, + { + name: "resolveJsonModule", + type: "boolean", + affectsModuleResolution: true, + category: Diagnostics.Modules, + description: Diagnostics.Enable_importing_json_files, + defaultValueDescription: false, + }, + + { + name: "out", + type: "string", + affectsEmit: true, + affectsBuildInfo: true, + affectsDeclarationPath: true, + isFilePath: false, // This is intentionally broken to support compatability with existing tsconfig files + // for correct behaviour, please use outFile + category: Diagnostics.Backwards_Compatibility, + paramType: Diagnostics.FILE, + transpileOptionValue: undefined, + description: Diagnostics.Deprecated_setting_Use_outFile_instead, + }, + { + name: "reactNamespace", + type: "string", + affectsEmit: true, + affectsBuildInfo: true, + category: Diagnostics.Language_and_Environment, + description: Diagnostics.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit, + defaultValueDescription: "`React`", + }, + { + name: "skipDefaultLibCheck", + type: "boolean", + // We need to store these to determine whether `lib` files need to be rechecked + affectsBuildInfo: true, + category: Diagnostics.Completeness, + description: Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript, + defaultValueDescription: false, + }, + { + name: "charset", + type: "string", + category: Diagnostics.Backwards_Compatibility, + description: Diagnostics.No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files, + defaultValueDescription: "utf8" + }, + { + name: "emitBOM", + type: "boolean", + affectsEmit: true, + affectsBuildInfo: true, + category: Diagnostics.Emit, + description: Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files, + defaultValueDescription: false, + }, + { + name: "newLine", + type: new Map(getEntries({ + crlf: NewLineKind.CarriageReturnLineFeed, + lf: NewLineKind.LineFeed + })), + affectsEmit: true, + affectsBuildInfo: true, + paramType: Diagnostics.NEWLINE, + category: Diagnostics.Emit, + description: Diagnostics.Set_the_newline_character_for_emitting_files, + defaultValueDescription: Diagnostics.Platform_specific + }, + { + name: "noErrorTruncation", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + category: Diagnostics.Output_Formatting, + description: Diagnostics.Disable_truncating_types_in_error_messages, + defaultValueDescription: false, + }, + { + name: "noLib", + type: "boolean", + category: Diagnostics.Language_and_Environment, + affectsProgramStructure: true, + description: Diagnostics.Disable_including_any_library_files_including_the_default_lib_d_ts, + // We are not returning a sourceFile for lib file when asked by the program, + // so pass --noLib to avoid reporting a file not found error. + transpileOptionValue: true, + defaultValueDescription: false, + }, + { + name: "noResolve", + type: "boolean", + affectsModuleResolution: true, + category: Diagnostics.Modules, + description: Diagnostics.Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project, + // We are not doing a full typecheck, we are not resolving the whole context, + // so pass --noResolve to avoid reporting missing file errors. + transpileOptionValue: true, + defaultValueDescription: false, + }, + { + name: "stripInternal", + type: "boolean", + affectsEmit: true, + affectsBuildInfo: true, + category: Diagnostics.Emit, + description: Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments, + defaultValueDescription: false, + }, + { + name: "disableSizeLimit", + type: "boolean", + affectsProgramStructure: true, + category: Diagnostics.Editor_Support, + description: Diagnostics.Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server, + defaultValueDescription: false, + }, + { + name: "disableSourceOfProjectReferenceRedirect", + type: "boolean", + isTSConfigOnly: true, + category: Diagnostics.Projects, + description: Diagnostics.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects, + defaultValueDescription: false, + }, + { + name: "disableSolutionSearching", + type: "boolean", + isTSConfigOnly: true, + category: Diagnostics.Projects, + description: Diagnostics.Opt_a_project_out_of_multi_project_reference_checking_when_editing, + defaultValueDescription: false, + }, + { + name: "disableReferencedProjectLoad", + type: "boolean", + isTSConfigOnly: true, + category: Diagnostics.Projects, + description: Diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript, + defaultValueDescription: false, + }, + { + name: "noImplicitUseStrict", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + category: Diagnostics.Backwards_Compatibility, + description: Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files, + defaultValueDescription: false, + }, + { + name: "noEmitHelpers", + type: "boolean", + affectsEmit: true, + affectsBuildInfo: true, + category: Diagnostics.Emit, + description: Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output, + defaultValueDescription: false, + }, + { + name: "noEmitOnError", + type: "boolean", + affectsEmit: true, + affectsBuildInfo: true, + category: Diagnostics.Emit, + transpileOptionValue: undefined, + description: Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported, + defaultValueDescription: false, + }, + { + name: "preserveConstEnums", + type: "boolean", + affectsEmit: true, + affectsBuildInfo: true, + category: Diagnostics.Emit, + description: Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code, + defaultValueDescription: false, + }, + { + name: "declarationDir", + type: "string", + affectsEmit: true, + affectsBuildInfo: true, + affectsDeclarationPath: true, + isFilePath: true, + paramType: Diagnostics.DIRECTORY, + category: Diagnostics.Emit, + transpileOptionValue: undefined, + description: Diagnostics.Specify_the_output_directory_for_generated_declaration_files, + }, + { + name: "skipLibCheck", + type: "boolean", + // We need to store these to determine whether `lib` files need to be rechecked + affectsBuildInfo: true, + category: Diagnostics.Completeness, + description: Diagnostics.Skip_type_checking_all_d_ts_files, + defaultValueDescription: false, + }, + { + name: "allowUnusedLabels", + type: "boolean", + affectsBindDiagnostics: true, + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + category: Diagnostics.Type_Checking, + description: Diagnostics.Disable_error_reporting_for_unused_labels, + defaultValueDescription: undefined, + }, + { + name: "allowUnreachableCode", + type: "boolean", + affectsBindDiagnostics: true, + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + category: Diagnostics.Type_Checking, + description: Diagnostics.Disable_error_reporting_for_unreachable_code, + defaultValueDescription: undefined, + }, + { + name: "suppressExcessPropertyErrors", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + category: Diagnostics.Backwards_Compatibility, + description: Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals, + defaultValueDescription: false, + }, + { + name: "suppressImplicitAnyIndexErrors", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + category: Diagnostics.Backwards_Compatibility, + description: Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures, + defaultValueDescription: false, + }, + { + name: "forceConsistentCasingInFileNames", + type: "boolean", + affectsModuleResolution: true, + category: Diagnostics.Interop_Constraints, + description: Diagnostics.Ensure_that_casing_is_correct_in_imports, + defaultValueDescription: false, + }, + { + name: "maxNodeModuleJsDepth", + type: "number", + affectsModuleResolution: true, + category: Diagnostics.JavaScript_Support, + description: Diagnostics.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs, + defaultValueDescription: 0, + }, + { + name: "noStrictGenericChecks", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsBuildInfo: true, + category: Diagnostics.Backwards_Compatibility, + description: Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types, + defaultValueDescription: false, + }, + { + name: "useDefineForClassFields", + type: "boolean", + affectsSemanticDiagnostics: true, + affectsEmit: true, + affectsBuildInfo: true, + category: Diagnostics.Language_and_Environment, + description: Diagnostics.Emit_ECMAScript_standard_compliant_class_fields, + defaultValueDescription: Diagnostics.true_for_ES2022_and_above_including_ESNext + }, + { + name: "preserveValueImports", + type: "boolean", + affectsEmit: true, + affectsBuildInfo: true, + category: Diagnostics.Emit, + description: Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed, + defaultValueDescription: false, + }, + + { + name: "keyofStringsOnly", + type: "boolean", + category: Diagnostics.Backwards_Compatibility, + description: Diagnostics.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option, + defaultValueDescription: false, + }, + { + // A list of plugins to load in the language service + name: "plugins", + type: "list", + isTSConfigOnly: true, + element: { + name: "plugin", + type: "object" + }, + description: Diagnostics.Specify_a_list_of_language_service_plugins_to_include, + category: Diagnostics.Editor_Support, + + }, + { + name: "moduleDetection", + type: new Map(getEntries({ + auto: ModuleDetectionKind.Auto, + legacy: ModuleDetectionKind.Legacy, + force: ModuleDetectionKind.Force, + })), + affectsModuleResolution: true, + description: Diagnostics.Control_what_method_is_used_to_detect_module_format_JS_files, + category: Diagnostics.Language_and_Environment, + defaultValueDescription: Diagnostics.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules, + } +] as const; + +/** @internal */ +export const optionDeclarations = [ + ...commonOptionsWithBuild, + ...commandOptionsWithoutBuild, +]; + + +export type CommandLineOption = CommandLineOptionOfCustomType | CommandLineOptionOfStringType | CommandLineOptionOfNumberType | CommandLineOptionOfBooleanType | TsConfigOnlyOption | CommandLineOptionOfListType; + + +/** @internal */ +export interface CommandLineOptionOfStringType extends CommandLineOptionBase { + type: "string"; + defaultValueDescription?: string | undefined | DiagnosticMessage; +} + +/** @internal */ +export interface CommandLineOptionOfNumberType extends CommandLineOptionBase { + type: "number"; + defaultValueDescription: number | undefined | DiagnosticMessage; +} + +/** @internal */ +export interface CommandLineOptionOfBooleanType extends CommandLineOptionBase { + type: "boolean"; + defaultValueDescription: boolean | undefined | DiagnosticMessage; +} + +/** @internal */ +export interface CommandLineOptionOfCustomType extends CommandLineOptionBase { + type: Map; // an object literal mapping named values to actual values + defaultValueDescription: number | string | undefined | DiagnosticMessage; +} + + +/** @internal */ +export interface TsConfigOnlyOption extends CommandLineOptionBase { + type: "object"; + elementOptions?: Map; +} + +/** @internal */ +export interface CommandLineOptionOfListType extends CommandLineOptionBase { + type: "list"; + element: CommandLineOptionOfCustomType | CommandLineOptionOfStringType | CommandLineOptionOfNumberType | CommandLineOptionOfBooleanType | TsConfigOnlyOption; + listPreserveFalsyValues?: boolean; +} + + +/** @internal */ +export interface CommandLineOptionBase { + name: string; + type: "string" | "number" | "boolean" | "object" | "list" | Map; // a value of a primitive type, or an object literal mapping named values to actual values + isFilePath?: boolean; // True if option value is a path or fileName + shortName?: string; // A short mnemonic for convenience - for instance, 'h' can be used in place of 'help' + description?: DiagnosticMessage; // The message describing what the command line switch does. + defaultValueDescription?: string | number | boolean | DiagnosticMessage; // The message describing what the dafault value is. string type is prepared for fixed chosen like "false" which do not need I18n. + paramType?: DiagnosticMessage; // The name to be used for a non-boolean option's parameter + isTSConfigOnly?: boolean; // True if option can only be specified via tsconfig.json file + isCommandLineOnly?: boolean; + showInSimplifiedHelpView?: boolean; + category?: DiagnosticMessage; + strictFlag?: true; // true if the option is one of the flag under strict + affectsSourceFile?: true; // true if we should recreate SourceFiles after this option changes + affectsModuleResolution?: true; // currently same effect as `affectsSourceFile` + affectsBindDiagnostics?: true; // true if this affects binding (currently same effect as `affectsSourceFile`) + affectsSemanticDiagnostics?: true; // true if option affects semantic diagnostics + affectsEmit?: true; // true if the options affects emit + affectsProgramStructure?: true; // true if program should be reconstructed from root files if option changes and does not affect module resolution as affectsModuleResolution indirectly means program needs to reconstructed + affectsDeclarationPath?: true; // true if the options affects declaration file path computed + affectsBuildInfo?: true; // true if this options should be emitted in buildInfo + transpileOptionValue?: boolean | undefined; // If set this means that the option should be set to this value when transpiling +} + + + +function convertJsonOptionOfCustomType(opt: CommandLineOptionOfCustomType, value: string, errors: Diagnostic[]) { + if (isNullOrUndefined(value)) return undefined; + const key = value.toLowerCase(); + const val = opt.type.get(key); + if (val !== undefined) { + return validateJsonOptionValue(opt, val, errors); + } + else { + return undefined; + } +} + + +function validateJsonOptionValue(opt: CommandLineOption, value: T, errors: Diagnostic[]): T | undefined { + if (isNullOrUndefined(value)) return undefined; + return value; +} + + +/** @internal */ +export function parseCustomTypeOption(opt: CommandLineOptionOfCustomType, value: string, errors: Diagnostic[]) { + return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors); +} + +/** @internal */ +export function parseListTypeOption(opt: CommandLineOptionOfListType, value = "", errors: Diagnostic[]): (string | number)[] | undefined { + value = trimString(value); + if (startsWith(value, "-")) { + return undefined; + } + if (value === "") { + return []; + } + const values = value.split(","); + switch (opt.element.type) { + case "number": + return mapDefined(values, v => validateJsonOptionValue(opt.element, parseInt(v), errors)); + case "string": + return mapDefined(values, v => validateJsonOptionValue(opt.element, v || "", errors)); + default: + return mapDefined(values, v => parseCustomTypeOption(opt.element as CommandLineOptionOfCustomType, v, errors)); + } +} diff --git a/external-declarations/src/test-runner/tsc-infrastructure/test-document.ts b/external-declarations/src/test-runner/tsc-infrastructure/test-document.ts new file mode 100644 index 0000000000000..70d5f7d154916 --- /dev/null +++ b/external-declarations/src/test-runner/tsc-infrastructure/test-document.ts @@ -0,0 +1,71 @@ +import { isLineBreak } from "typescript"; +import { CharacterCodes } from "../../compiler/types"; +import { TestFile } from "./compiler-run"; + + + +/** @internal */ +export function computeLineStarts(text: string): number[] { + const result: number[] = []; + let pos = 0; + let lineStart = 0; + while (pos < text.length) { + const ch = text.charCodeAt(pos); + pos++; + switch (ch) { + case CharacterCodes.carriageReturn: + if (text.charCodeAt(pos) === CharacterCodes.lineFeed) { + pos++; + } + // falls through + case CharacterCodes.lineFeed: + result.push(lineStart); + lineStart = pos; + break; + default: + if (ch > CharacterCodes.maxAsciiCharacter && isLineBreak(ch)) { + result.push(lineStart); + lineStart = pos; + } + break; + } + } + result.push(lineStart); + return result; +} + +export class TextDocument { + public readonly meta: Map; + public readonly file: string; + public readonly text: string; + + private _lineStarts: readonly number[] | undefined; + private _testFile: TestFile | undefined; + + constructor(file: string, text: string, meta?: Map) { + this.file = file; + this.text = text; + this.meta = meta || new Map(); + } + + public get lineStarts(): readonly number[] { + return this._lineStarts || (this._lineStarts = computeLineStarts(this.text)); + } + + public static fromTestFile(file: TestFile) { + return new TextDocument( + file.unitName, + file.content, + file.fileOptions && Object.keys(file.fileOptions) + .reduce((meta, key) => meta.set(key, file.fileOptions[key]), new Map())); + } + + public asTestFile() { + return this._testFile || (this._testFile = { + unitName: this.file, + content: this.text, + fileOptions: Array.from(this.meta) + .reduce((obj, [key, value]) => (obj[key] = value, obj), {} as Record) + }); + } +} \ No newline at end of file diff --git a/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts b/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts new file mode 100644 index 0000000000000..4c13887fadbb0 --- /dev/null +++ b/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts @@ -0,0 +1,216 @@ +import assert = require('assert'); +import * as ts from 'typescript' +import { find, forEach, orderedRemoveItemAt } from '../../compiler/lang-utils'; +import { getBaseFileName, getDirectoryPath, getNormalizedAbsolutePath, normalizePath } from '../../compiler/path-utils'; +import { _Path } from '../../compiler/types'; +import * as vfs from './vfs' + +/** all the necessary information to set the right compiler settings */ +export interface CompilerSettings { + [name: string]: string; +} +/** All the necessary information to turn a multi file test into useful units for later compilation */ +export interface TestUnitData { + content: string; + name: string; + fileOptions: any; + originalFilePath: string; + references: string[]; + startLine: number; + endLine: number; +} +export interface ParseConfigHost { + useCaseSensitiveFileNames: boolean; + + readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[]; + + /** + * Gets a value indicating whether the specified path exists and is a file. + * @param path The path to test. + */ + fileExists(path: string): boolean; + + readFile(path: string): string | undefined; + trace?(s: string): void; +} + +const optionRegex = /^[\/]{2}\s*@(\w+)\s*:\s*([^\r\n]*)/gm; // multiple matches on multiple lines +const linkRegex = /^[\/]{2}\s*@link\s*:\s*([^\r\n]*)\s*->\s*([^\r\n]*)/gm; // multiple matches on multiple lines + +export function extractCompilerSettings(content: string): CompilerSettings { + const opts: CompilerSettings = {}; + + let match: RegExpExecArray | null; + while ((match = optionRegex.exec(content)) !== null) { // eslint-disable-line no-null/no-null + opts[match[1]] = match[2].trim(); + } + + return opts; +} + +/** Splits the given string on \r\n, or on only \n if that fails, or on only \r if *that* fails. */ +export function splitContentByNewlines(content: string) { + const split = (delimiter: string) => Object.assign(content.split(delimiter), { delimiter }); + // Split up the input file by line + // Note: IE JS engine incorrectly handles consecutive delimiters here when using RegExp split, so + // we have to use string-based splitting instead and try to figure out the delimiting chars + let lines = split("\r\n"); + if (lines.length === 1) { + lines = split("\n"); + + if (lines.length === 1) { + lines = split("\r"); + } + } + return lines; +} + + +export function getConfigNameFromFileName(filename: string): "tsconfig.json" | "jsconfig.json" | undefined { + const flc = getBaseFileName(filename).toLowerCase(); + return find(["tsconfig.json" as const, "jsconfig.json" as const], x => x === flc); +} + + +export function parseSymlinkFromTest(line: string, symlinks: vfs.FileSet | undefined) { + const linkMetaData = linkRegex.exec(line); + linkRegex.lastIndex = 0; + if (!linkMetaData) return undefined; + + if (!symlinks) symlinks = {}; + symlinks[linkMetaData[2].trim()] = new vfs.Symlink(linkMetaData[1].trim()); + return symlinks; +} + + +export interface TestCaseContent { + settings: CompilerSettings; + testUnitData: TestUnitData[]; + tsConfig: ts.ParsedCommandLine | undefined; + tsConfigFileUnitData: TestUnitData | undefined; + symlinks?: vfs.FileSet; + code: string; +} + +/** Given a test file containing // @FileName directives, return an array of named units of code to be added to an existing compiler instance */ +export function makeUnitsFromTest(code: string, fileName: string, rootDir?: string, settings = extractCompilerSettings(code)): TestCaseContent { + // List of all the subfiles we've parsed out + const testUnitData: TestUnitData[] = []; + + const lines = splitContentByNewlines(code); + + // Stuff related to the subfile we're parsing + let currentFileContent: string | undefined; + let currentFileOptions: any = {}; + let currentFileName: any; + let currentFileStartLine: number = 0; + let currentFileEndLine: number = 0; + let refs: string[] = []; + let symlinks: vfs.FileSet | undefined; + let lineIndex = -1; + for (const line of lines) { + lineIndex++; + let testMetaData: RegExpExecArray | null; + const possiblySymlinks = parseSymlinkFromTest(line, symlinks); + if (possiblySymlinks) { + symlinks = possiblySymlinks; + } + else if (testMetaData = optionRegex.exec(line)) { + // Comment line, check for global/file @options and record them + optionRegex.lastIndex = 0; + const metaDataName = testMetaData[1].toLowerCase(); + currentFileOptions[testMetaData[1]] = testMetaData[2].trim(); + if (metaDataName !== "filename") { + continue; + } + + // New metadata statement after having collected some code to go with the previous metadata + if (currentFileName) { + // Store result file + const newTestFile = { + content: currentFileContent!, // TODO: GH#18217 + name: currentFileName, + fileOptions: currentFileOptions, + originalFilePath: fileName, + references: refs, + startLine: currentFileStartLine, + endLine: currentFileEndLine, + }; + testUnitData.push(newTestFile); + + // Reset local data + currentFileContent = undefined; + currentFileOptions = {}; + currentFileName = testMetaData[2].trim(); + currentFileStartLine = lineIndex + 1; + refs = []; + } + else { + // First metadata marker in the file + currentFileName = testMetaData[2].trim(); + currentFileStartLine = lineIndex + 1; + currentFileContent = undefined; + } + } + else { + currentFileEndLine = lineIndex; + // Subfile content line + // Append to the current subfile content, inserting a newline needed + if (currentFileContent === undefined) { + currentFileContent = ""; + currentFileStartLine = lineIndex; + } + else { + // End-of-line + currentFileContent = currentFileContent + "\n"; + } + currentFileContent = currentFileContent + line; + } + } + + // normalize the fileName for the single file case + currentFileName = testUnitData.length > 0 || currentFileName ? currentFileName : getBaseFileName(fileName); + + // EOF, push whatever remains + const newTestFile2 = { + content: currentFileContent || "", + name: currentFileName, + fileOptions: currentFileOptions, + originalFilePath: fileName, + references: refs, + startLine: currentFileStartLine, + endLine: currentFileEndLine, + }; + testUnitData.push(newTestFile2); + + // unit tests always list files explicitly + const parseConfigHost: ts.ParseConfigHost = { + useCaseSensitiveFileNames: false, + readDirectory: () => [], + fileExists: () => true, + readFile: (name) => forEach(testUnitData, data => data.name.toLowerCase() === name.toLowerCase() ? data.content : undefined) + }; + + // check if project has tsconfig.json in the list of files + let tsConfig: ts.ParsedCommandLine | undefined; + let tsConfigFileUnitData: TestUnitData | undefined; + for (let i = 0; i < testUnitData.length; i++) { + const data = testUnitData[i]; + if (getConfigNameFromFileName(data.name)) { + const configJson = ts.parseJsonText(data.name, data.content); + let baseDir = normalizePath(getDirectoryPath(data.name)); + if (rootDir) { + baseDir = getNormalizedAbsolutePath(baseDir, rootDir); + } + tsConfig = ts.parseJsonSourceFileConfigFileContent(configJson, parseConfigHost, baseDir); + tsConfig.options.configFilePath = data.name as _Path; + tsConfigFileUnitData = data; + + // delete entry from the list + orderedRemoveItemAt(testUnitData, i); + + break; + } + } + return { settings, testUnitData, tsConfig, tsConfigFileUnitData, symlinks, code }; +} \ No newline at end of file diff --git a/external-declarations/src/test-runner/tsc-infrastructure/vary-by.ts b/external-declarations/src/test-runner/tsc-infrastructure/vary-by.ts new file mode 100644 index 0000000000000..4db6d1dec2f85 --- /dev/null +++ b/external-declarations/src/test-runner/tsc-infrastructure/vary-by.ts @@ -0,0 +1,174 @@ +import { hasProperty } from "../../compiler/debug"; +import { equateStringsCaseInsensitive, map, forEach, startsWith, findIndex, arrayFrom, orderedRemoveItemAt, getEntries } from "../../compiler/lang-utils"; +import { optionDeclarations } from "./options"; +import { CompilerSettings } from "./test-file-parser"; + +export interface FileBasedTestConfiguration { + [key: string]: string; +} + +const varyBy: readonly string[] = [ + "module", + "moduleResolution", + "moduleDetection", + "target", + "jsx", + "removeComments", + "importHelpers", + "importHelpers", + "downlevelIteration", + "isolatedModules", + "strict", + "noImplicitAny", + "strictNullChecks", + "strictFunctionTypes", + "strictBindCallApply", + "strictPropertyInitialization", + "noImplicitThis", + "alwaysStrict", + "allowSyntheticDefaultImports", + "esModuleInterop", + "emitDecoratorMetadata", + "skipDefaultLibCheck", + "preserveConstEnums", + "skipLibCheck", + "exactOptionalPropertyTypes", + "useDefineForClassFields", + "useUnknownInCatchVariables", + "noUncheckedIndexedAccess", + "noPropertyAccessFromIndexSignature", +]; + +/** + * Compute FileBasedTestConfiguration variations based on a supplied list of variable settings. + */ +export function getFileBasedTestConfigurations(settings: CompilerSettings): FileBasedTestConfiguration[] | undefined { + let varyByEntries: [string, string[]][] | undefined; + let variationCount = 1; + for (const varyByKey of varyBy) { + if (hasProperty(settings, varyByKey)) { + // we only consider variations when there are 2 or more variable entries. + const entries = splitVaryBySettingValue(settings[varyByKey], varyByKey); + if (entries) { + if (!varyByEntries) varyByEntries = []; + variationCount *= entries.length; + if (variationCount > 25) throw new Error(`Provided test options exceeded the maximum number of variations: ${varyBy.map(v => `'@${v}'`).join(", ")}`); + varyByEntries.push([varyByKey, entries]); + } + } + } + + if (!varyByEntries) return undefined; + + const configurations: FileBasedTestConfiguration[] = []; + computeFileBasedTestConfigurationVariations(configurations, /*variationState*/ {}, varyByEntries, /*offset*/ 0); + return configurations; +} + +function computeFileBasedTestConfigurationVariations(configurations: FileBasedTestConfiguration[], variationState: FileBasedTestConfiguration, varyByEntries: [string, string[]][], offset: number) { + if (offset >= varyByEntries.length) { + // make a copy of the current variation state + configurations.push({ ...variationState }); + return; + } + + const [varyBy, entries] = varyByEntries[offset]; + for (const entry of entries) { + // set or overwrite the variation, then compute the next variation + variationState[varyBy] = entry; + computeFileBasedTestConfigurationVariations(configurations, variationState, varyByEntries, offset + 1); + } +} + +function splitVaryBySettingValue(text: string, varyBy: string): string[] | undefined { + if (!text) return undefined; + + let star = false; + const includes: string[] = []; + const excludes: string[] = []; + for (let s of text.split(/,/g)) { + s = s.trim().toLowerCase(); + if (s.length === 0) continue; + if (s === "*") { + star = true; + } + else if (startsWith(s, "-") || startsWith(s, "!")) { + excludes.push(s.slice(1)); + } + else { + includes.push(s); + } + } + + // do nothing if the setting has no variations + if (includes.length <= 1 && !star && excludes.length === 0) { + return undefined; + } + + const variations: { key: string, value?: string | number }[] = []; + const values = getVaryByStarSettingValues(varyBy); + + // add (and deduplicate) all included entries + for (const include of includes) { + const value = values?.get(include); + if (findIndex(variations, v => v.key === include || value !== undefined && v.value === value) === -1) { + variations.push({ key: include, value }); + } + } + + if (star && values) { + // add all entries + for (const [key, value] of arrayFrom(values.entries())) { + if (findIndex(variations, v => v.key === key || v.value === value) === -1) { + variations.push({ key, value }); + } + } + } + + // remove all excluded entries + for (const exclude of excludes) { + const value = values?.get(exclude); + let index: number; + while ((index = findIndex(variations, v => v.key === exclude || value !== undefined && v.value === value)) >= 0) { + orderedRemoveItemAt(variations, index); + } + } + + if (variations.length === 0) { + throw new Error(`Variations in test option '@${varyBy}' resulted in an empty set.`); + } + + return map(variations, v => v.key); +} + +let booleanVaryByStarSettingValues: Map | undefined; + +function getVaryByStarSettingValues(varyBy: string): ReadonlyMap | undefined { + const option = forEach(optionDeclarations, decl => equateStringsCaseInsensitive(decl.name, varyBy) ? decl : undefined); + if (option) { + if (typeof option.type === "object") { + return option.type; + } + if (option.type === "boolean") { + return booleanVaryByStarSettingValues || (booleanVaryByStarSettingValues = new Map(getEntries({ + true: 1, + false: 0 + }))); + } + } +} + +/** + * Compute a description for this configuration based on its entries + */ +export function getFileBasedTestConfigurationDescription(configuration: FileBasedTestConfiguration) { + let name = ""; + if (configuration) { + const keys = Object.keys(configuration).sort(); + for (const key of keys) { + if (name) name += ","; + name += `${key}=${configuration[key]}`; + } + } + return name; +} diff --git a/external-declarations/src/test-runner/tsc-infrastructure/vfs.ts b/external-declarations/src/test-runner/tsc-infrastructure/vfs.ts new file mode 100644 index 0000000000000..ea685e2490d7a --- /dev/null +++ b/external-declarations/src/test-runner/tsc-infrastructure/vfs.ts @@ -0,0 +1,1654 @@ +import * as collections from "./collections"; +import * as vpath from "./vpath"; +import * as documents from "./test-document"; +import * as Harness from "./compiler-run"; +import { arrayFrom } from "../../compiler/lang-utils"; + +/** + * Posix-style path to the TypeScript compiler build outputs (including tsc.js, lib.d.ts, etc.) + */ +export const builtFolder = "/.ts"; + +/** + * Posix-style path to additional mountable folders (./tests/projects in this repo) + */ +export const projectsFolder = "/.projects"; + +/** + * Posix-style path to additional test libraries + */ +export const testLibFolder = "/.lib"; + +/** + * Posix-style path to sources under test + */ +export const srcFolder = "/.src"; + +// file type +const S_IFMT = 0o170000; // file type +const S_IFSOCK = 0o140000; // socket +const S_IFLNK = 0o120000; // symbolic link +const S_IFREG = 0o100000; // regular file +const S_IFBLK = 0o060000; // block device +const S_IFDIR = 0o040000; // directory +const S_IFCHR = 0o020000; // character device +const S_IFIFO = 0o010000; // FIFO + +let devCount = 0; // A monotonically increasing count of device ids +let inoCount = 0; // A monotonically increasing count of inodes + +export interface DiffOptions { + includeChangedFileWithSameContent?: boolean; + baseIsNotShadowRoot?: boolean; +} + +export const timeIncrements = 1000; + +/** + * Represents a virtual POSIX-like file system. + */ +export class FileSystem { + /** Indicates whether the file system is case-sensitive (`false`) or case-insensitive (`true`). */ + public readonly ignoreCase: boolean; + + /** Gets the comparison function used to compare two paths. */ + public readonly stringComparer: (a: string, b: string) => number; + + // lazy-initialized state that should be mutable even if the FileSystem is frozen. + private _lazy: { + links?: collections.SortedMap; + shadows?: Map; + meta?: collections.Metadata; + } = {}; + + private _cwd: string; // current working directory + private _time: number; + private _shadowRoot: FileSystem | undefined; + private _dirStack: string[] | undefined; + + constructor(ignoreCase: boolean, options: FileSystemOptions = {}) { + const { time = timeIncrements, files, meta } = options; + this.ignoreCase = ignoreCase; + this.stringComparer = this.ignoreCase ? vpath.compareCaseInsensitive : vpath.compareCaseSensitive; + this._time = time; + + if (meta) { + for (const key of Object.keys(meta)) { + this.meta.set(key, meta[key]); + } + } + + if (files) { + this._applyFiles(files, /*dirname*/ ""); + } + + let cwd = options.cwd; + if ((!cwd || !vpath.isRoot(cwd)) && this._lazy.links) { + const iterator = collections.getIterator(this._lazy.links.keys()); + try { + for (let i = collections.nextResult(iterator); i; i = collections.nextResult(iterator)) { + const name = i.value; + cwd = cwd ? vpath.resolve(name, cwd) : name; + break; + } + } + finally { + collections.closeIterator(iterator); + } + } + + if (cwd) { + vpath.validate(cwd, vpath.ValidationFlags.Absolute); + this.mkdirpSync(cwd); + } + + this._cwd = cwd || ""; + } + + /** + * Gets metadata for this `FileSystem`. + */ + public get meta(): collections.Metadata { + if (!this._lazy.meta) { + this._lazy.meta = new collections.Metadata(this._shadowRoot ? this._shadowRoot.meta : undefined); + } + return this._lazy.meta; + } + + /** + * Gets a value indicating whether the file system is read-only. + */ + public get isReadonly() { + return Object.isFrozen(this); + } + + /** + * Makes the file system read-only. + */ + public makeReadonly() { + Object.freeze(this); + return this; + } + + /** + * Gets the file system shadowed by this file system. + */ + public get shadowRoot() { + return this._shadowRoot; + } + + /** + * Snapshots the current file system, effectively shadowing itself. This is useful for + * generating file system patches using `.diff()` from one snapshot to the next. Performs + * no action if this file system is read-only. + */ + public snapshot() { + if (this.isReadonly) return; + const fs = new FileSystem(this.ignoreCase, { time: this._time }); + fs._lazy = this._lazy; + fs._cwd = this._cwd; + fs._time = this._time; + fs._shadowRoot = this._shadowRoot; + fs._dirStack = this._dirStack; + fs.makeReadonly(); + this._lazy = {}; + this._shadowRoot = fs; + } + + /** + * Gets a shadow copy of this file system. Changes to the shadow copy do not affect the + * original, allowing multiple copies of the same core file system without multiple copies + * of the same data. + */ + public shadow(ignoreCase = this.ignoreCase) { + if (!this.isReadonly) throw new Error("Cannot shadow a mutable file system."); + if (ignoreCase && !this.ignoreCase) throw new Error("Cannot create a case-insensitive file system from a case-sensitive one."); + const fs = new FileSystem(ignoreCase, { time: this._time }); + fs._shadowRoot = this; + fs._cwd = this._cwd; + return fs; + } + + /** + * Gets or sets the timestamp (in milliseconds) used for file status, returning the previous timestamp. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/time.html + */ + public time(value?: number): number { + if (value !== undefined) { + if (this.isReadonly) throw createIOError("EPERM"); + this._time = value; + } + else if (!this.isReadonly) { + this._time += timeIncrements; + } + return this._time; + } + + /** + * Gets the metadata object for a path. + * @param path + */ + public filemeta(path: string): collections.Metadata { + const { node } = this._walk(this._resolve(path)); + if (!node) throw createIOError("ENOENT"); + return this._filemeta(node); + } + + private _filemeta(node: Inode): collections.Metadata { + if (!node.meta) { + const parentMeta = node.shadowRoot && this._shadowRoot && this._shadowRoot._filemeta(node.shadowRoot); + node.meta = new collections.Metadata(parentMeta); + } + return node.meta; + } + + /** + * Get the pathname of the current working directory. + * + * @link - http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html + */ + public cwd() { + if (!this._cwd) throw new Error("The current working directory has not been set."); + const { node } = this._walk(this._cwd); + if (!node) throw createIOError("ENOENT"); + if (!isDirectory(node)) throw createIOError("ENOTDIR"); + return this._cwd; + } + + /** + * Changes the current working directory. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/chdir.html + */ + public chdir(path: string) { + if (this.isReadonly) throw createIOError("EPERM"); + path = this._resolve(path); + const { node } = this._walk(path); + if (!node) throw createIOError("ENOENT"); + if (!isDirectory(node)) throw createIOError("ENOTDIR"); + this._cwd = path; + } + + /** + * Pushes the current directory onto the directory stack and changes the current working directory to the supplied path. + */ + public pushd(path?: string) { + if (this.isReadonly) throw createIOError("EPERM"); + if (path) path = this._resolve(path); + if (this._cwd) { + if (!this._dirStack) this._dirStack = []; + this._dirStack.push(this._cwd); + } + if (path && path !== this._cwd) { + this.chdir(path); + } + } + + /** + * Pops the previous directory from the location stack and changes the current directory to that directory. + */ + public popd() { + if (this.isReadonly) throw createIOError("EPERM"); + const path = this._dirStack && this._dirStack.pop(); + if (path) { + this.chdir(path); + } + } + + /** + * Update the file system with a set of files. + */ + public apply(files: FileSet) { + this._applyFiles(files, this._cwd); + } + + /** + * Scan file system entries along a path. If `path` is a symbolic link, it is dereferenced. + * @param path The path at which to start the scan. + * @param axis The axis along which to traverse. + * @param traversal The traversal scheme to use. + */ + public scanSync(path: string, axis: Axis, traversal: Traversal) { + path = this._resolve(path); + const results: string[] = []; + this._scan(path, this._stat(this._walk(path)), axis, traversal, /*noFollow*/ false, results); + return results; + } + + /** + * Scan file system entries along a path. + * @param path The path at which to start the scan. + * @param axis The axis along which to traverse. + * @param traversal The traversal scheme to use. + */ + public lscanSync(path: string, axis: Axis, traversal: Traversal) { + path = this._resolve(path); + const results: string[] = []; + this._scan(path, this._stat(this._walk(path, /*noFollow*/ true)), axis, traversal, /*noFollow*/ true, results); + return results; + } + + private _scan(path: string, stats: Stats, axis: Axis, traversal: Traversal, noFollow: boolean, results: string[]) { + if (axis === "ancestors-or-self" || axis === "self" || axis === "descendants-or-self") { + if (!traversal.accept || traversal.accept(path, stats)) { + results.push(path); + } + } + if (axis === "ancestors-or-self" || axis === "ancestors") { + const dirname = vpath.dirname(path); + if (dirname !== path) { + try { + const stats = this._stat(this._walk(dirname, noFollow)); + if (!traversal.traverse || traversal.traverse(dirname, stats)) { + this._scan(dirname, stats, "ancestors-or-self", traversal, noFollow, results); + } + } + catch { /*ignored*/ } + } + } + if (axis === "descendants-or-self" || axis === "descendants") { + if (stats.isDirectory() && (!traversal.traverse || traversal.traverse(path, stats))) { + for (const file of this.readdirSync(path)) { + try { + const childpath = vpath.combine(path, file); + const stats = this._stat(this._walk(childpath, noFollow)); + this._scan(childpath, stats, "descendants-or-self", traversal, noFollow, results); + } + catch { /*ignored*/ } + } + } + } + } + + /** + * Mounts a physical or virtual file system at a location in this virtual file system. + * + * @param source The path in the physical (or other virtual) file system. + * @param target The path in this virtual file system. + * @param resolver An object used to resolve files in `source`. + */ + public mountSync(source: string, target: string, resolver: FileSystemResolver) { + if (this.isReadonly) throw createIOError("EROFS"); + + source = vpath.validate(source, vpath.ValidationFlags.Absolute); + + const { parent, links, node: existingNode, basename } = this._walk(this._resolve(target), /*noFollow*/ true); + if (existingNode) throw createIOError("EEXIST"); + + const time = this.time(); + const node = this._mknod(parent ? parent.dev : ++devCount, S_IFDIR, /*mode*/ 0o777, time); + node.source = source; + node.resolver = resolver; + this._addLink(parent, links, basename, node, time); + } + + /** + * Recursively remove all files and directories underneath the provided path. + */ + public rimrafSync(path: string) { + try { + const stats = this.lstatSync(path); + if (stats.isFile() || stats.isSymbolicLink()) { + this.unlinkSync(path); + } + else if (stats.isDirectory()) { + for (const file of this.readdirSync(path)) { + this.rimrafSync(vpath.combine(path, file)); + } + this.rmdirSync(path); + } + } + catch (e) { + if (e.code === "ENOENT") return; + throw e; + } + } + + /** + * Make a directory and all of its parent paths (if they don't exist). + */ + public mkdirpSync(path: string) { + path = this._resolve(path); + const result = this._walk(path, /*noFollow*/ true, (error, result) => { + if (error.code === "ENOENT") { + this._mkdir(result); + return "retry"; + } + return "throw"; + }); + + if (!result.node) this._mkdir(result); + } + + public getFileListing(): string { + let result = ""; + const printLinks = (dirname: string | undefined, links: collections.SortedMap) => { + const iterator = collections.getIterator(links); + try { + for (let i = collections.nextResult(iterator); i; i = collections.nextResult(iterator)) { + const [name, node] = i.value; + const path = dirname ? vpath.combine(dirname, name) : name; + const marker = vpath.compare(this._cwd, path, this.ignoreCase) === 0 ? "*" : " "; + if (result) result += "\n"; + result += marker; + if (isDirectory(node)) { + result += vpath.addTrailingSeparator(path); + printLinks(path, this._getLinks(node)); + } + else if (isFile(node)) { + result += path; + } + else if (isSymlink(node)) { + result += path + " -> " + node.symlink; + } + } + } + finally { + collections.closeIterator(iterator); + } + }; + printLinks(/*dirname*/ undefined, this._getRootLinks()); + return result; + } + + /** + * Print diagnostic information about the structure of the file system to the console. + */ + public debugPrint(): void { + console.log(this.getFileListing()); + } + + // POSIX API (aligns with NodeJS "fs" module API) + + /** + * Determines whether a path exists. + */ + public existsSync(path: string) { + const result = this._walk(this._resolve(path), /*noFollow*/ true, () => "stop"); + return result !== undefined && result.node !== undefined; + } + + /** + * Get file status. If `path` is a symbolic link, it is dereferenced. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/stat.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + public statSync(path: string) { + return this._stat(this._walk(this._resolve(path))); + } + + /** + * Change file access times + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + public utimesSync(path: string, atime: Date, mtime: Date) { + if (this.isReadonly) throw createIOError("EROFS"); + if (!isFinite(+atime) || !isFinite(+mtime)) throw createIOError("EINVAL"); + + const entry = this._walk(this._resolve(path)); + if (!entry || !entry.node) { + throw createIOError("ENOENT"); + } + entry.node.atimeMs = +atime; + entry.node.mtimeMs = +mtime; + entry.node.ctimeMs = this.time(); + } + + /** + * Get file status. If `path` is a symbolic link, it is dereferenced. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/lstat.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + public lstatSync(path: string) { + return this._stat(this._walk(this._resolve(path), /*noFollow*/ true)); + } + + + private _stat(entry: WalkResult) { + const node = entry.node; + if (!node) throw createIOError(`ENOENT`, entry.realpath); + return new Stats( + node.dev, + node.ino, + node.mode, + node.nlink, + /*rdev*/ 0, + /*size*/ isFile(node) ? this._getSize(node) : isSymlink(node) ? node.symlink.length : 0, + /*blksize*/ 4096, + /*blocks*/ 0, + node.atimeMs, + node.mtimeMs, + node.ctimeMs, + node.birthtimeMs, + ); + } + + /** + * Read a directory. If `path` is a symbolic link, it is dereferenced. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + public readdirSync(path: string) { + const { node } = this._walk(this._resolve(path)); + if (!node) throw createIOError("ENOENT"); + if (!isDirectory(node)) throw createIOError("ENOTDIR"); + return Array.from(this._getLinks(node).keys()); + } + + /** + * Make a directory. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/mkdir.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + public mkdirSync(path: string) { + if (this.isReadonly) throw createIOError("EROFS"); + + this._mkdir(this._walk(this._resolve(path), /*noFollow*/ true)); + } + + private _mkdir({ parent, links, node: existingNode, basename }: WalkResult) { + if (existingNode) throw createIOError("EEXIST"); + const time = this.time(); + const node = this._mknod(parent ? parent.dev : ++devCount, S_IFDIR, /*mode*/ 0o777, time); + this._addLink(parent, links, basename, node, time); + } + + /** + * Remove a directory. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/rmdir.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + public rmdirSync(path: string) { + if (this.isReadonly) throw createIOError("EROFS"); + path = this._resolve(path); + + const { parent, links, node, basename } = this._walk(path, /*noFollow*/ true); + if (!parent) throw createIOError("EPERM"); + if (!isDirectory(node)) throw createIOError("ENOTDIR"); + if (this._getLinks(node).size !== 0) throw createIOError("ENOTEMPTY"); + + this._removeLink(parent, links, basename, node); + } + + /** + * Link one file to another file (also known as a "hard link"). + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + public linkSync(oldpath: string, newpath: string) { + if (this.isReadonly) throw createIOError("EROFS"); + + const { node } = this._walk(this._resolve(oldpath)); + if (!node) throw createIOError("ENOENT"); + if (isDirectory(node)) throw createIOError("EPERM"); + + const { parent, links, basename, node: existingNode } = this._walk(this._resolve(newpath), /*noFollow*/ true); + if (!parent) throw createIOError("EPERM"); + if (existingNode) throw createIOError("EEXIST"); + + this._addLink(parent, links, basename, node); + } + + /** + * Remove a directory entry. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/unlink.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + public unlinkSync(path: string) { + if (this.isReadonly) throw createIOError("EROFS"); + + const { parent, links, node, basename } = this._walk(this._resolve(path), /*noFollow*/ true); + if (!parent) throw createIOError("EPERM"); + if (!node) throw createIOError("ENOENT"); + if (isDirectory(node)) throw createIOError("EISDIR"); + + this._removeLink(parent, links, basename, node); + } + + /** + * Rename a file. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + public renameSync(oldpath: string, newpath: string) { + if (this.isReadonly) throw createIOError("EROFS"); + + const { parent: oldParent, links: oldParentLinks, node, basename: oldBasename } = this._walk(this._resolve(oldpath), /*noFollow*/ true); + if (!oldParent) throw createIOError("EPERM"); + if (!node) throw createIOError("ENOENT"); + + const { parent: newParent, links: newParentLinks, node: existingNode, basename: newBasename } = this._walk(this._resolve(newpath), /*noFollow*/ true); + if (!newParent) throw createIOError("EPERM"); + + const time = this.time(); + if (existingNode) { + if (isDirectory(node)) { + if (!isDirectory(existingNode)) throw createIOError("ENOTDIR"); + // if both old and new arguments point to the same directory, just pass. So we could rename /src/a/1 to /src/A/1 in Win. + // if not and the directory pointed by the new path is not empty, throw an error. + if (this.stringComparer(oldpath, newpath) !== 0 && this._getLinks(existingNode).size > 0) throw createIOError("ENOTEMPTY"); + } + else { + if (isDirectory(existingNode)) throw createIOError("EISDIR"); + } + this._removeLink(newParent, newParentLinks, newBasename, existingNode, time); + } + + this._replaceLink(oldParent, oldParentLinks, oldBasename, newParent, newParentLinks, newBasename, node, time); + } + + /** + * Make a symbolic link. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/symlink.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + public symlinkSync(target: string, linkpath: string) { + if (this.isReadonly) throw createIOError("EROFS"); + + const { parent, links, node: existingNode, basename } = this._walk(this._resolve(linkpath), /*noFollow*/ true); + if (!parent) throw createIOError("EPERM"); + if (existingNode) throw createIOError("EEXIST"); + + const time = this.time(); + const node = this._mknod(parent.dev, S_IFLNK, /*mode*/ 0o666, time); + node.symlink = vpath.validate(target, vpath.ValidationFlags.RelativeOrAbsolute); + this._addLink(parent, links, basename, node, time); + } + + /** + * Resolve a pathname. + * + * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + public realpathSync(path: string) { + const { realpath } = this._walk(this._resolve(path)); + return realpath; + } + + /** + * Read from a file. + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + public readFileSync(path: string, encoding?: null): Buffer; + /** + * Read from a file. + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + public readFileSync(path: string, encoding: BufferEncoding): string; + /** + * Read from a file. + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + public readFileSync(path: string, encoding?: BufferEncoding | null): string | Buffer; + public readFileSync(path: string, encoding: BufferEncoding | null = null) { // eslint-disable-line no-null/no-null + const { node } = this._walk(this._resolve(path)); + if (!node) throw createIOError("ENOENT"); + if (isDirectory(node)) throw createIOError("EISDIR"); + if (!isFile(node)) throw createIOError("EBADF"); + + const buffer = this._getBuffer(node).slice(); + return encoding ? buffer.toString(encoding) : buffer; + } + + /** + * Write to a file. + * + * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. + */ + // eslint-disable-next-line no-null/no-null + public writeFileSync(path: string, data: string | Buffer, encoding: string | null = null) { + if (this.isReadonly) throw createIOError("EROFS"); + + const { parent, links, node: existingNode, basename } = this._walk(this._resolve(path), /*noFollow*/ false); + if (!parent) throw createIOError("EPERM"); + + const time = this.time(); + let node = existingNode; + if (!node) { + node = this._mknod(parent.dev, S_IFREG, 0o666, time); + this._addLink(parent, links, basename, node, time); + } + + if (isDirectory(node)) throw createIOError("EISDIR"); + if (!isFile(node)) throw createIOError("EBADF"); + node.buffer = Buffer.isBuffer(data) ? data.slice() : sys.bufferFrom!("" + data, encoding || "utf8") as Buffer; + node.size = node.buffer.byteLength; + node.mtimeMs = time; + node.ctimeMs = time; + } + + /** + * Generates a `FileSet` patch containing all the entries in this `FileSystem` that are not in `base`. + * @param base The base file system. If not provided, this file system's `shadowRoot` is used (if present). + */ + public diff(base?: FileSystem | undefined, options: DiffOptions = {}) { + if (!base && !options.baseIsNotShadowRoot) base = this.shadowRoot; + const differences: FileSet = {}; + const hasDifferences = base ? + FileSystem.rootDiff(differences, this, base, options) : + FileSystem.trackCreatedInodes(differences, this, this._getRootLinks()); + return hasDifferences ? differences : undefined; + } + + /** + * Generates a `FileSet` patch containing all the entries in `changed` that are not in `base`. + */ + public static diff(changed: FileSystem, base: FileSystem, options: DiffOptions = {}) { + const differences: FileSet = {}; + return FileSystem.rootDiff(differences, changed, base, options) ? + differences : + undefined; + } + + private static diffWorker(container: FileSet, changed: FileSystem, changedLinks: ReadonlyMap | undefined, base: FileSystem, baseLinks: ReadonlyMap | undefined, options: DiffOptions) { + if (changedLinks && !baseLinks) return FileSystem.trackCreatedInodes(container, changed, changedLinks); + if (baseLinks && !changedLinks) return FileSystem.trackDeletedInodes(container, baseLinks); + if (changedLinks && baseLinks) { + let hasChanges = false; + // track base items missing in changed + baseLinks.forEach((node, basename) => { + if (!changedLinks.has(basename)) { + container[basename] = isDirectory(node) ? new Rmdir() : new Unlink(); + hasChanges = true; + } + }); + // track changed items missing or differing in base + changedLinks.forEach((changedNode, basename) => { + const baseNode = baseLinks.get(basename); + if (baseNode) { + if (isDirectory(changedNode) && isDirectory(baseNode)) { + return hasChanges = FileSystem.directoryDiff(container, basename, changed, changedNode, base, baseNode, options) || hasChanges; + } + if (isFile(changedNode) && isFile(baseNode)) { + return hasChanges = FileSystem.fileDiff(container, basename, changed, changedNode, base, baseNode, options) || hasChanges; + } + if (isSymlink(changedNode) && isSymlink(baseNode)) { + return hasChanges = FileSystem.symlinkDiff(container, basename, changedNode, baseNode) || hasChanges; + } + } + return hasChanges = FileSystem.trackCreatedInode(container, basename, changed, changedNode) || hasChanges; + }); + return hasChanges; + } + return false; + } + + private static rootDiff(container: FileSet, changed: FileSystem, base: FileSystem, options: DiffOptions) { + while (!changed._lazy.links && changed._shadowRoot) changed = changed._shadowRoot; + while (!base._lazy.links && base._shadowRoot) base = base._shadowRoot; + + // no difference if the file systems are the same reference + if (changed === base) return false; + + // no difference if the root links are empty and unshadowed + if (!changed._lazy.links && !changed._shadowRoot && !base._lazy.links && !base._shadowRoot) return false; + + return FileSystem.diffWorker(container, changed, changed._getRootLinks(), base, base._getRootLinks(), options); + } + + private static directoryDiff(container: FileSet, basename: string, changed: FileSystem, changedNode: DirectoryInode, base: FileSystem, baseNode: DirectoryInode, options: DiffOptions) { + while (!changedNode.links && changedNode.shadowRoot) changedNode = changedNode.shadowRoot; + while (!baseNode.links && baseNode.shadowRoot) baseNode = baseNode.shadowRoot; + + // no difference if the nodes are the same reference + if (changedNode === baseNode) return false; + + // no difference if both nodes are non shadowed and have no entries + if (isEmptyNonShadowedDirectory(changedNode) && isEmptyNonShadowedDirectory(baseNode)) return false; + + // no difference if both nodes are unpopulated and point to the same mounted file system + if (!changedNode.links && !baseNode.links && + changedNode.resolver && changedNode.source !== undefined && + baseNode.resolver === changedNode.resolver && baseNode.source === changedNode.source) return false; + + // no difference if both nodes have identical children + const children: FileSet = {}; + if (!FileSystem.diffWorker(children, changed, changed._getLinks(changedNode), base, base._getLinks(baseNode), options)) { + return false; + } + + container[basename] = new Directory(children); + return true; + } + + private static fileDiff(container: FileSet, basename: string, changed: FileSystem, changedNode: FileInode, base: FileSystem, baseNode: FileInode, options: DiffOptions) { + while (!changedNode.buffer && changedNode.shadowRoot) changedNode = changedNode.shadowRoot; + while (!baseNode.buffer && baseNode.shadowRoot) baseNode = baseNode.shadowRoot; + + // no difference if the nodes are the same reference + if (changedNode === baseNode) return false; + + // no difference if both nodes are non shadowed and have no entries + if (isEmptyNonShadowedFile(changedNode) && isEmptyNonShadowedFile(baseNode)) return false; + + // no difference if both nodes are unpopulated and point to the same mounted file system + if (!changedNode.buffer && !baseNode.buffer && + changedNode.resolver && changedNode.source !== undefined && + baseNode.resolver === changedNode.resolver && baseNode.source === changedNode.source) return false; + + const changedBuffer = changed._getBuffer(changedNode); + const baseBuffer = base._getBuffer(baseNode); + + // no difference if both buffers are the same reference + if (changedBuffer === baseBuffer) { + if (!options.includeChangedFileWithSameContent || changedNode.mtimeMs === baseNode.mtimeMs) return false; + container[basename] = new SameFileWithModifiedTime(changedBuffer); + return true; + } + + // no difference if both buffers are identical + if (Buffer.compare(changedBuffer, baseBuffer) === 0) { + if (!options.includeChangedFileWithSameContent) return false; + container[basename] = new SameFileContentFile(changedBuffer); + return true; + } + + container[basename] = new File(changedBuffer); + return true; + } + + private static symlinkDiff(container: FileSet, basename: string, changedNode: SymlinkInode, baseNode: SymlinkInode) { + // no difference if the nodes are the same reference + if (changedNode.symlink === baseNode.symlink) return false; + container[basename] = new Symlink(changedNode.symlink); + return true; + } + + private static trackCreatedInode(container: FileSet, basename: string, changed: FileSystem, node: Inode) { + if (isDirectory(node)) { + const children: FileSet = {}; + FileSystem.trackCreatedInodes(children, changed, changed._getLinks(node)); + container[basename] = new Directory(children); + } + else if (isSymlink(node)) { + container[basename] = new Symlink(node.symlink); + } + else { + container[basename] = new File(changed._getBuffer(node)); + } + return true; + } + + private static trackCreatedInodes(container: FileSet, changed: FileSystem, changedLinks: ReadonlyMap) { + // no difference if links are empty + if (!changedLinks.size) return false; + + changedLinks.forEach((node, basename) => { + FileSystem.trackCreatedInode(container, basename, changed, node); + }); + return true; + } + + private static trackDeletedInodes(container: FileSet, baseLinks: ReadonlyMap) { + // no difference if links are empty + if (!baseLinks.size) return false; + baseLinks.forEach((node, basename) => { + container[basename] = isDirectory(node) ? new Rmdir() : new Unlink(); + }); + return true; + } + + private _mknod(dev: number, type: typeof S_IFREG, mode: number, time?: number): FileInode; + private _mknod(dev: number, type: typeof S_IFDIR, mode: number, time?: number): DirectoryInode; + private _mknod(dev: number, type: typeof S_IFLNK, mode: number, time?: number): SymlinkInode; + private _mknod(dev: number, type: number, mode: number, time = this.time()) { + return { + dev, + ino: ++inoCount, + mode: (mode & ~S_IFMT & ~0o022 & 0o7777) | (type & S_IFMT), + atimeMs: time, + mtimeMs: time, + ctimeMs: time, + birthtimeMs: time, + nlink: 0 + } as Inode; + } + + private _addLink(parent: DirectoryInode | undefined, links: collections.SortedMap, name: string, node: Inode, time = this.time()) { + links.set(name, node); + node.nlink++; + node.ctimeMs = time; + if (parent) parent.mtimeMs = time; + if (!parent && !this._cwd) this._cwd = name; + } + + private _removeLink(parent: DirectoryInode | undefined, links: collections.SortedMap, name: string, node: Inode, time = this.time()) { + links.delete(name); + node.nlink--; + node.ctimeMs = time; + if (parent) parent.mtimeMs = time; + } + + private _replaceLink(oldParent: DirectoryInode, oldLinks: collections.SortedMap, oldName: string, newParent: DirectoryInode, newLinks: collections.SortedMap, newName: string, node: Inode, time: number) { + if (oldParent !== newParent) { + this._removeLink(oldParent, oldLinks, oldName, node, time); + this._addLink(newParent, newLinks, newName, node, time); + } + else { + oldLinks.delete(oldName); + oldLinks.set(newName, node); + oldParent.mtimeMs = time; + newParent.mtimeMs = time; + } + } + + private _getRootLinks() { + if (!this._lazy.links) { + this._lazy.links = new collections.SortedMap(this.stringComparer); + if (this._shadowRoot) { + this._copyShadowLinks(this._shadowRoot._getRootLinks(), this._lazy.links); + } + } + return this._lazy.links; + } + + private _getLinks(node: DirectoryInode) { + if (!node.links) { + const links = new collections.SortedMap(this.stringComparer); + const { source, resolver } = node; + if (source && resolver) { + node.source = undefined; + node.resolver = undefined; + for (const name of resolver.readdirSync(source)) { + const path = vpath.combine(source, name); + const stats = resolver.statSync(path); + switch (stats.mode & S_IFMT) { + case S_IFDIR: + const dir = this._mknod(node.dev, S_IFDIR, 0o777); + dir.source = vpath.combine(source, name); + dir.resolver = resolver; + this._addLink(node, links, name, dir); + break; + case S_IFREG: + const file = this._mknod(node.dev, S_IFREG, 0o666); + file.source = vpath.combine(source, name); + file.resolver = resolver; + file.size = stats.size; + this._addLink(node, links, name, file); + break; + } + } + } + else if (this._shadowRoot && node.shadowRoot) { + this._copyShadowLinks(this._shadowRoot._getLinks(node.shadowRoot), links); + } + node.links = links; + } + return node.links; + } + + private _getShadow(root: DirectoryInode): DirectoryInode; + private _getShadow(root: Inode): Inode; + private _getShadow(root: Inode) { + const shadows = this._lazy.shadows || (this._lazy.shadows = new Map()); + + let shadow = shadows.get(root.ino); + if (!shadow) { + shadow = { + dev: root.dev, + ino: root.ino, + mode: root.mode, + atimeMs: root.atimeMs, + mtimeMs: root.mtimeMs, + ctimeMs: root.ctimeMs, + birthtimeMs: root.birthtimeMs, + nlink: root.nlink, + shadowRoot: root + } as Inode; + + if (isSymlink(root)) (shadow as SymlinkInode).symlink = root.symlink; + shadows.set(shadow.ino, shadow); + } + + return shadow; + } + + private _copyShadowLinks(source: ReadonlyMap, target: collections.SortedMap) { + const iterator = collections.getIterator(source); + try { + for (let i = collections.nextResult(iterator); i; i = collections.nextResult(iterator)) { + const [name, root] = i.value; + target.set(name, this._getShadow(root)); + } + } + finally { + collections.closeIterator(iterator); + } + } + + private _getSize(node: FileInode): number { + if (node.buffer) return node.buffer.byteLength; + if (node.size !== undefined) return node.size; + if (node.source && node.resolver) return node.size = node.resolver.statSync(node.source).size; + if (this._shadowRoot && node.shadowRoot) return node.size = this._shadowRoot._getSize(node.shadowRoot); + return 0; + } + + private _getBuffer(node: FileInode): Buffer { + if (!node.buffer) { + const { source, resolver } = node; + if (source && resolver) { + node.source = undefined; + node.resolver = undefined; + node.size = undefined; + node.buffer = resolver.readFileSync(source); + } + else if (this._shadowRoot && node.shadowRoot) { + node.buffer = this._shadowRoot._getBuffer(node.shadowRoot); + } + else { + node.buffer = Buffer.allocUnsafe(0); + } + } + return node.buffer; + } + + /** + * Walk a path to its end. + * + * @param path The path to follow. + * @param noFollow A value indicating whether to *not* dereference a symbolic link at the + * end of a path. + * + * @link http://man7.org/linux/man-pages/man7/path_resolution.7.html + */ + private _walk(path: string, noFollow?: boolean, onError?: (error: NodeJS.ErrnoException, fragment: WalkResult) => "retry" | "throw"): WalkResult; + private _walk(path: string, noFollow?: boolean, onError?: (error: NodeJS.ErrnoException, fragment: WalkResult) => "stop" | "retry" | "throw"): WalkResult | undefined; + private _walk(path: string, noFollow?: boolean, onError?: (error: NodeJS.ErrnoException, fragment: WalkResult) => "stop" | "retry" | "throw"): WalkResult | undefined { + let links = this._getRootLinks(); + let parent: DirectoryInode | undefined; + let components = vpath.parse(path); + let step = 0; + let depth = 0; + let retry = false; + while (true) { + if (depth >= 40) throw createIOError("ELOOP"); + const lastStep = step === components.length - 1; + let basename = components[step]; + const linkEntry = links.getEntry(basename); + if (linkEntry) { + components[step] = basename = linkEntry[0]; + } + const node = linkEntry?.[1]; + if (lastStep && (noFollow || !isSymlink(node))) { + return { realpath: vpath.format(components), basename, parent, links, node }; + } + if (node === undefined) { + if (trapError(createIOError("ENOENT"), node)) continue; + return undefined; + } + if (isSymlink(node)) { + const dirname = vpath.format(components.slice(0, step)); + const symlink = vpath.resolve(dirname, node.symlink); + links = this._getRootLinks(); + parent = undefined; + components = vpath.parse(symlink).concat(components.slice(step + 1)); + step = 0; + depth++; + retry = false; + continue; + } + if (isDirectory(node)) { + links = this._getLinks(node); + parent = node; + step++; + retry = false; + continue; + } + if (trapError(createIOError("ENOTDIR"), node)) continue; + return undefined; + } + + function trapError(error: NodeJS.ErrnoException, node?: Inode) { + const realpath = vpath.format(components.slice(0, step + 1)); + const basename = components[step]; + const result = !retry && onError ? onError(error, { realpath, basename, parent, links, node }) : "throw"; + if (result === "stop") return false; + if (result === "retry") { + retry = true; + return true; + } + throw error; + } + } + + /** + * Resolve a path relative to the current working directory. + */ + private _resolve(path: string) { + return this._cwd + ? vpath.resolve(this._cwd, vpath.validate(path, vpath.ValidationFlags.RelativeOrAbsolute | vpath.ValidationFlags.AllowWildcard)) + : vpath.validate(path, vpath.ValidationFlags.Absolute | vpath.ValidationFlags.AllowWildcard); + } + + private _applyFiles(files: FileSet, dirname: string) { + const deferred: [Symlink | Link | Mount, string][] = []; + this._applyFilesWorker(files, dirname, deferred); + for (const [entry, path] of deferred) { + this.mkdirpSync(vpath.dirname(path)); + this.pushd(vpath.dirname(path)); + if (entry instanceof Symlink) { + if (this.stringComparer(vpath.dirname(path), path) === 0) { + throw new TypeError("Roots cannot be symbolic links."); + } + this.symlinkSync(vpath.resolve(dirname, entry.symlink), path); + this._applyFileExtendedOptions(path, entry); + } + else if (entry instanceof Link) { + if (this.stringComparer(vpath.dirname(path), path) === 0) { + throw new TypeError("Roots cannot be hard links."); + } + this.linkSync(entry.path, path); + } + else { + this.mountSync(entry.source, path, entry.resolver); + this._applyFileExtendedOptions(path, entry); + } + this.popd(); + } + } + + private _applyFileExtendedOptions(path: string, entry: Directory | File | Symlink | Mount) { + const { meta } = entry; + if (meta !== undefined) { + const filemeta = this.filemeta(path); + for (const key of Object.keys(meta)) { + filemeta.set(key, meta[key]); + } + } + } + + private _applyFilesWorker(files: FileSet, dirname: string, deferred: [Symlink | Link | Mount, string][]) { + for (const key of Object.keys(files)) { + const value = normalizeFileSetEntry(files[key]); + const path = dirname ? vpath.resolve(dirname, key) : key; + vpath.validate(path, vpath.ValidationFlags.Absolute); + + // eslint-disable-next-line no-null/no-null + if (value === null || value === undefined || value instanceof Rmdir || value instanceof Unlink) { + if (this.stringComparer(vpath.dirname(path), path) === 0) { + throw new TypeError("Roots cannot be deleted."); + } + this.rimrafSync(path); + } + else if (value instanceof File) { + if (this.stringComparer(vpath.dirname(path), path) === 0) { + throw new TypeError("Roots cannot be files."); + } + this.mkdirpSync(vpath.dirname(path)); + this.writeFileSync(path, value.data, value.encoding); + this._applyFileExtendedOptions(path, value); + } + else if (value instanceof Directory) { + this.mkdirpSync(path); + this._applyFileExtendedOptions(path, value); + this._applyFilesWorker(value.files, path, deferred); + } + else { + deferred.push([value, path]); + } + } + } +} + +export interface FileSystemOptions { + // Sets the initial timestamp for new files and directories + time?: number; + + // A set of file system entries to initially add to the file system. + files?: FileSet; + + // Sets the initial working directory for the file system. + cwd?: string; + + // Sets initial metadata attached to the file system. + meta?: Record; +} + +export interface FileSystemCreateOptions extends FileSystemOptions { + // Sets the documents to add to the file system. + documents?: readonly documents.TextDocument[]; +} + +export type Axis = "ancestors" | "ancestors-or-self" | "self" | "descendants-or-self" | "descendants"; + +export interface Traversal { + /** A function called to choose whether to continue to traverse to either ancestors or descendants. */ + traverse?(path: string, stats: Stats): boolean; + /** A function called to choose whether to accept a path as part of the result. */ + accept?(path: string, stats: Stats): boolean; +} + +export interface FileSystemResolver { + statSync(path: string): { mode: number; size: number; }; + readdirSync(path: string): string[]; + readFileSync(path: string): Buffer; +} + +/** @internal */ +export interface FileSystemEntries { + readonly files: readonly string[]; + readonly directories: readonly string[]; +} + +export interface FileSystemResolverHost { + useCaseSensitiveFileNames(): boolean; + getAccessibleFileSystemEntries(path: string): FileSystemEntries; + directoryExists(path: string): boolean; + fileExists(path: string): boolean; + getFileSize(path: string): number; + readFile(path: string): string | undefined; + getWorkspaceRoot(): string; +} + +export function createResolver(host: FileSystemResolverHost): FileSystemResolver { + return { + readdirSync(path: string): string[] { + const { files, directories } = host.getAccessibleFileSystemEntries(path); + return directories.concat(files); + }, + statSync(path: string): { mode: number; size: number; } { + if (host.directoryExists(path)) { + return { mode: S_IFDIR | 0o777, size: 0 }; + } + else if (host.fileExists(path)) { + return { mode: S_IFREG | 0o666, size: host.getFileSize(path) }; + } + else { + throw new Error("ENOENT: path does not exist"); + } + }, + readFileSync(path: string): Buffer { + return sys.bufferFrom!(host.readFile(path)!, "utf8") as Buffer; // TODO: GH#18217 + } + }; +} +namespace sys { + const Buffer: { + new (input: string, encoding?: string): any; + from?(input: string, encoding?: string): any; + } = require("buffer").Buffer; + + export function bufferFrom(input: string, encoding?: string): Buffer { + // See https://github.com/Microsoft/TypeScript/issues/25652 + return Buffer.from && (Buffer.from as Function) !== Int8Array.from + ? Buffer.from(input, encoding) + : new Buffer(input, encoding); + } +} +/** + * Create a virtual file system from a physical file system using the following path mappings: + * + * - `/.ts` is a directory mapped to `${workspaceRoot}/built/local` + * - `/.lib` is a directory mapped to `${workspaceRoot}/tests/lib` + * - `/.src` is a virtual directory to be used for tests. + * + * Unless overridden, `/.src` will be the current working directory for the virtual file system. + */ +export function createFromFileSystem(host: FileSystemResolverHost, ignoreCase: boolean, { documents, files, cwd, time, meta }: FileSystemCreateOptions = {}) { + const fs = getBuiltLocal(host, ignoreCase).shadow(); + if (meta) { + for (const key of Object.keys(meta)) { + fs.meta.set(key, meta[key]); + } + } + if (time) { + fs.time(time); + } + if (cwd) { + fs.mkdirpSync(cwd); + fs.chdir(cwd); + } + if (documents) { + for (const document of documents) { + fs.mkdirpSync(vpath.dirname(document.file)); + fs.writeFileSync(document.file, document.text, "utf8"); + fs.filemeta(document.file).set("document", document); + // Add symlinks + const symlink = document.meta.get("symlink"); + if (symlink) { + for (const link of symlink.split(",").map(link => link.trim())) { + fs.mkdirpSync(vpath.dirname(link)); + fs.symlinkSync(vpath.resolve(fs.cwd(), document.file), link); + } + } + } + } + if (files) { + fs.apply(files); + } + return fs; +} + +export class Stats { + public dev: number; + public ino: number; + public mode: number; + public nlink: number; + public uid: number; + public gid: number; + public rdev: number; + public size: number; + public blksize: number; + public blocks: number; + public atimeMs: number; + public mtimeMs: number; + public ctimeMs: number; + public birthtimeMs: number; + public atime: Date; + public mtime: Date; + public ctime: Date; + public birthtime: Date; + + constructor(); + constructor(dev: number, ino: number, mode: number, nlink: number, rdev: number, size: number, blksize: number, blocks: number, atimeMs: number, mtimeMs: number, ctimeMs: number, birthtimeMs: number); + constructor(dev = 0, ino = 0, mode = 0, nlink = 0, rdev = 0, size = 0, blksize = 0, blocks = 0, atimeMs = 0, mtimeMs = 0, ctimeMs = 0, birthtimeMs = 0) { + this.dev = dev; + this.ino = ino; + this.mode = mode; + this.nlink = nlink; + this.uid = 0; + this.gid = 0; + this.rdev = rdev; + this.size = size; + this.blksize = blksize; + this.blocks = blocks; + this.atimeMs = atimeMs; + this.mtimeMs = mtimeMs; + this.ctimeMs = ctimeMs; + this.birthtimeMs = birthtimeMs; + this.atime = new Date(this.atimeMs); + this.mtime = new Date(this.mtimeMs); + this.ctime = new Date(this.ctimeMs); + this.birthtime = new Date(this.birthtimeMs); + } + + public isFile() { return (this.mode & S_IFMT) === S_IFREG; } + public isDirectory() { return (this.mode & S_IFMT) === S_IFDIR; } + public isSymbolicLink() { return (this.mode & S_IFMT) === S_IFLNK; } + public isBlockDevice() { return (this.mode & S_IFMT) === S_IFBLK; } + public isCharacterDevice() { return (this.mode & S_IFMT) === S_IFCHR; } + public isFIFO() { return (this.mode & S_IFMT) === S_IFIFO; } + public isSocket() { return (this.mode & S_IFMT) === S_IFSOCK; } +} + +export const IOErrorMessages = Object.freeze({ + EACCES: "access denied", + EIO: "an I/O error occurred", + ENOENT: "no such file or directory", + EEXIST: "file already exists", + ELOOP: "too many symbolic links encountered", + ENOTDIR: "no such directory", + EISDIR: "path is a directory", + EBADF: "invalid file descriptor", + EINVAL: "invalid value", + ENOTEMPTY: "directory not empty", + EPERM: "operation not permitted", + EROFS: "file system is read-only" +}); + +export function createIOError(code: keyof typeof IOErrorMessages, details = "") { + const err: NodeJS.ErrnoException = new Error(`${code}: ${IOErrorMessages[code]} ${details}`); + err.code = code; + if (Error.captureStackTrace) Error.captureStackTrace(err, createIOError); + return err; +} + +/** + * A template used to populate files, directories, links, etc. in a virtual file system. + */ +export interface FileSet { + [name: string]: DirectoryLike | FileLike | Link | Symlink | Mount | Rmdir | Unlink | null | undefined; +} + +export type DirectoryLike = FileSet | Directory; +export type FileLike = File | Buffer | string; + +/** Extended options for a directory in a `FileSet` */ +export class Directory { + public readonly files: FileSet; + public readonly meta: Record | undefined; + constructor(files: FileSet, { meta }: { meta?: Record } = {}) { + this.files = files; + this.meta = meta; + } +} + +/** Extended options for a file in a `FileSet` */ +export class File { + public readonly data: Buffer | string; + public readonly encoding: string | undefined; + public readonly meta: Record | undefined; + constructor(data: Buffer | string, { meta, encoding }: { encoding?: string, meta?: Record } = {}) { + this.data = data; + this.encoding = encoding; + this.meta = meta; + } +} + +export class SameFileContentFile extends File { + constructor(data: Buffer | string, metaAndEncoding?: { encoding?: string, meta?: Record }) { + super(data, metaAndEncoding); + } +} + +export class SameFileWithModifiedTime extends File { + constructor(data: Buffer | string, metaAndEncoding?: { encoding?: string, meta?: Record }) { + super(data, metaAndEncoding); + } +} + +/** Extended options for a hard link in a `FileSet` */ +export class Link { + public readonly path: string; + constructor(path: string) { + this.path = path; + } +} + +/** Removes a directory in a `FileSet` */ +export class Rmdir { + public _rmdirBrand?: never; // brand necessary for proper type guards +} + +/** Unlinks a file in a `FileSet` */ +export class Unlink { + public _unlinkBrand?: never; // brand necessary for proper type guards +} + +/** Extended options for a symbolic link in a `FileSet` */ +export class Symlink { + public readonly symlink: string; + public readonly meta: Record | undefined; + constructor(symlink: string, { meta }: { meta?: Record } = {}) { + this.symlink = symlink; + this.meta = meta; + } +} + +/** Extended options for mounting a virtual copy of an external file system via a `FileSet` */ +export class Mount { + public readonly source: string; + public readonly resolver: FileSystemResolver; + public readonly meta: Record | undefined; + constructor(source: string, resolver: FileSystemResolver, { meta }: { meta?: Record } = {}) { + this.source = source; + this.resolver = resolver; + this.meta = meta; + } +} + +// a generic POSIX inode +type Inode = FileInode | DirectoryInode | SymlinkInode; + +interface FileInode { + dev: number; // device id + ino: number; // inode id + mode: number; // file mode + atimeMs: number; // access time + mtimeMs: number; // modified time + ctimeMs: number; // status change time + birthtimeMs: number; // creation time + nlink: number; // number of hard links + size?: number; + buffer?: Buffer; + source?: string; + resolver?: FileSystemResolver; + shadowRoot?: FileInode; + meta?: collections.Metadata; +} + +interface DirectoryInode { + dev: number; // device id + ino: number; // inode id + mode: number; // file mode + atimeMs: number; // access time + mtimeMs: number; // modified time + ctimeMs: number; // status change time + birthtimeMs: number; // creation time + nlink: number; // number of hard links + links?: collections.SortedMap; + source?: string; + resolver?: FileSystemResolver; + shadowRoot?: DirectoryInode; + meta?: collections.Metadata; +} + +interface SymlinkInode { + dev: number; // device id + ino: number; // inode id + mode: number; // file mode + atimeMs: number; // access time + mtimeMs: number; // modified time + ctimeMs: number; // status change time + birthtimeMs: number; // creation time + nlink: number; // number of hard links + symlink: string; + shadowRoot?: SymlinkInode; + meta?: collections.Metadata; +} + +function isEmptyNonShadowedDirectory(node: DirectoryInode) { + return !node.links && !node.shadowRoot && !node.resolver && !node.source; +} + +function isEmptyNonShadowedFile(node: FileInode) { + return !node.buffer && !node.shadowRoot && !node.resolver && !node.source; +} + +function isFile(node: Inode | undefined): node is FileInode { + return node !== undefined && (node.mode & S_IFMT) === S_IFREG; +} + +function isDirectory(node: Inode | undefined): node is DirectoryInode { + return node !== undefined && (node.mode & S_IFMT) === S_IFDIR; +} + +function isSymlink(node: Inode | undefined): node is SymlinkInode { + return node !== undefined && (node.mode & S_IFMT) === S_IFLNK; +} + +interface WalkResult { + realpath: string; + basename: string; + parent: DirectoryInode | undefined; + links: collections.SortedMap; + node: Inode | undefined; +} + +let builtLocalHost: FileSystemResolverHost | undefined; +let builtLocalCI: FileSystem | undefined; +let builtLocalCS: FileSystem | undefined; + +function getBuiltLocal(host: FileSystemResolverHost, ignoreCase: boolean): FileSystem { + if (builtLocalHost !== host) { + builtLocalCI = undefined; + builtLocalCS = undefined; + builtLocalHost = host; + } + if (!builtLocalCI) { + const resolver = createResolver(host); + builtLocalCI = new FileSystem(/*ignoreCase*/ true, { + files: { + [builtFolder]: new Mount(vpath.resolve(host.getWorkspaceRoot(), "built/local"), resolver), + [testLibFolder]: new Mount(vpath.resolve(host.getWorkspaceRoot(), "tests/lib"), resolver), + [projectsFolder]: new Mount(vpath.resolve(host.getWorkspaceRoot(), "tests/projects"), resolver), + [srcFolder]: {} + }, + cwd: srcFolder, + meta: { defaultLibLocation: builtFolder } + }); + builtLocalCI.makeReadonly(); + } + if (ignoreCase) return builtLocalCI; + if (!builtLocalCS) { + builtLocalCS = builtLocalCI.shadow(/*ignoreCase*/ false); + builtLocalCS.makeReadonly(); + } + return builtLocalCS; +} + +/* eslint-disable no-null/no-null */ +function normalizeFileSetEntry(value: FileSet[string]) { + if (value === undefined || + value === null || + value instanceof Directory || + value instanceof File || + value instanceof Link || + value instanceof Symlink || + value instanceof Mount || + value instanceof Rmdir || + value instanceof Unlink) { + return value; + } + return typeof value === "string" || Buffer.isBuffer(value) ? new File(value) : new Directory(value); +} + +export function formatPatch(patch: FileSet): string; +export function formatPatch(patch: FileSet | undefined): string | null; +export function formatPatch(patch: FileSet | undefined) { + return patch ? formatPatchWorker("", patch) : null; +} +/* eslint-enable no-null/no-null */ + +function formatPatchWorker(dirname: string, container: FileSet): string { + let text = ""; + for (const name of Object.keys(container)) { + const entry = normalizeFileSetEntry(container[name]); + const file = dirname ? vpath.combine(dirname, name) : name; + // eslint-disable-next-line no-null/no-null + if (entry === null || entry === undefined || entry instanceof Unlink) { + text += `//// [${file}] unlink\r\n`; + } + else if (entry instanceof Rmdir) { + text += `//// [${vpath.addTrailingSeparator(file)}] rmdir\r\n`; + } + else if (entry instanceof Directory) { + text += formatPatchWorker(file, entry.files); + } + else if (entry instanceof SameFileWithModifiedTime) { + text += `//// [${file}] file changed its modified time\r\n`; + } + else if (entry instanceof SameFileContentFile) { + text += `//// [${file}] file written with same contents\r\n`; + } + else if (entry instanceof File) { + const content = typeof entry.data === "string" ? entry.data : entry.data.toString("utf8"); + text += `//// [${file}]\r\n${content}\r\n\r\n`; + } + else if (entry instanceof Link) { + text += `//// [${file}] link(${entry.path})\r\n`; + } + else if (entry instanceof Symlink) { + text += `//// [${file}] symlink(${entry.symlink})\r\n`; + } + else if (entry instanceof Mount) { + text += `//// [${file}] mount(${entry.source})\r\n`; + } + } + return text; +} + +export function iteratePatch(patch: FileSet | undefined): IterableIterator<[string, string]> | null { + // eslint-disable-next-line no-null/no-null + return patch ? Harness.iterateOutputs(iteratePatchWorker("", patch)) : null; +} + +function* iteratePatchWorker(dirname: string, container: FileSet): IterableIterator { + for (const name of Object.keys(container)) { + const entry = normalizeFileSetEntry(container[name]); + const file = dirname ? vpath.combine(dirname, name) : name; + if (entry instanceof Directory) { + yield* arrayFrom(iteratePatchWorker(file, entry.files)); + } + else if (entry instanceof File) { + const content = typeof entry.data === "string" ? entry.data : entry.data.toString("utf8"); + yield new documents.TextDocument(file, content); + } + } +} diff --git a/external-declarations/src/test-runner/tsc-infrastructure/vpath.ts b/external-declarations/src/test-runner/tsc-infrastructure/vpath.ts new file mode 100644 index 0000000000000..f7a651e6fa554 --- /dev/null +++ b/external-declarations/src/test-runner/tsc-infrastructure/vpath.ts @@ -0,0 +1,349 @@ +import { Path } from "typescript"; +import { changeAnyExtension, comparePaths, comparePathsCaseInsensitive, comparePathsCaseSensitive, getAnyExtensionFromPath, getBaseFileName, getDirectoryPath, getPathComponents, getPathComponentsRelativeTo, getPathFromPathComponents, getRelativePathFromDirectory, isDiskPathRoot, isRootedDiskPath, reducePathComponents, resolvePath } from "../../compiler/path-utils"; +import { CharacterCodes } from "../../compiler/types"; +import { hasJSFileExtension, hasTSFileExtension, isDeclarationFileName } from "../../compiler/utils"; +import * as vfs from './vfs' + +/** + * Internally, we represent paths as strings with '/' as the directory separator. + * When we make system calls (eg: LanguageServiceHost.getDirectory()), + * we expect the host to correctly handle paths in our specified format. + * + * @internal + */ +export const directorySeparator = "/"; +/** @internal */ +export const altDirectorySeparator = "\\"; +const urlSchemeSeparator = "://"; +const backslashRegExp = /\\/g; +export const sep = directorySeparator; + + + +/** + * Combines paths. If a path is absolute, it replaces any previous path. Relative paths are not simplified. + * + * ```ts + * // Non-rooted + * combinePaths("path", "to", "file.ext") === "path/to/file.ext" + * combinePaths("path", "dir", "..", "to", "file.ext") === "path/dir/../to/file.ext" + * // POSIX + * combinePaths("/path", "to", "file.ext") === "/path/to/file.ext" + * combinePaths("/path", "/to", "file.ext") === "/to/file.ext" + * // DOS + * combinePaths("c:/path", "to", "file.ext") === "c:/path/to/file.ext" + * combinePaths("c:/path", "c:/to", "file.ext") === "c:/to/file.ext" + * // URL + * combinePaths("file:///path", "to", "file.ext") === "file:///path/to/file.ext" + * combinePaths("file:///path", "file:///to", "file.ext") === "file:///to/file.ext" + * ``` + * + * @internal + */ +export function combine(path: string, ...paths: (string | undefined)[]): string { + if (path) path = normalizeSlashes(path); + for (let relativePath of paths) { + if (!relativePath) continue; + relativePath = normalizeSlashes(relativePath); + if (!path || getRootLength(relativePath) !== 0) { + path = relativePath; + } + else { + path = ensureTrailingDirectorySeparator(path) + relativePath; + } + } + return path; +} + +/** + * Normalize path separators, converting `\` into `/`. + * + * @internal + */ +export function normalizeSlashes(path: string): string { + return path.indexOf("\\") !== -1 + ? path.replace(backslashRegExp, directorySeparator) + : path; +} + + +/** + * Adds a trailing directory separator to a path, if it does not already have one. + * + * ```ts + * ensureTrailingDirectorySeparator("/path/to/file.ext") === "/path/to/file.ext/" + * ensureTrailingDirectorySeparator("/path/to/file.ext/") === "/path/to/file.ext/" + * ``` + * + * @internal + */ +export function ensureTrailingDirectorySeparator(path: Path): Path; +/** @internal */ +export function ensureTrailingDirectorySeparator(path: string): string; +/** @internal */ +export function ensureTrailingDirectorySeparator(path: string) { + if (!hasTrailingDirectorySeparator(path)) { + return path + directorySeparator; + } + + return path; +} + +/** + * Determines whether a path has a trailing separator (`/` or `\\`). + * + * @internal + */ +export function hasTrailingDirectorySeparator(path: string) { + return path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1)); +} +/** + * Determines whether a charCode corresponds to `/` or `\`. + * + * @internal + */ +export function isAnyDirectorySeparator(charCode: number): boolean { + return charCode === CharacterCodes.slash || charCode === CharacterCodes.backslash; +} + + +/** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * + * For example: + * ```ts + * getRootLength("a") === 0 // "" + * getRootLength("/") === 1 // "/" + * getRootLength("c:") === 2 // "c:" + * getRootLength("c:d") === 0 // "" + * getRootLength("c:/") === 3 // "c:/" + * getRootLength("c:\\") === 3 // "c:\\" + * getRootLength("//server") === 7 // "//server" + * getRootLength("//server/share") === 8 // "//server/" + * getRootLength("\\\\server") === 7 // "\\\\server" + * getRootLength("\\\\server\\share") === 8 // "\\\\server\\" + * getRootLength("file:///path") === 8 // "file:///" + * getRootLength("file:///c:") === 10 // "file:///c:" + * getRootLength("file:///c:d") === 8 // "file:///" + * getRootLength("file:///c:/path") === 11 // "file:///c:/" + * getRootLength("file://server") === 13 // "file://server" + * getRootLength("file://server/path") === 14 // "file://server/" + * getRootLength("http://server") === 13 // "http://server" + * getRootLength("http://server/path") === 14 // "http://server/" + * ``` + * + * @internal + */ +export function getRootLength(path: string) { + const rootLength = getEncodedRootLength(path); + return rootLength < 0 ? ~rootLength : rootLength; +} + +/** + * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). + * If the root is part of a URL, the twos-complement of the root length is returned. + */ +function getEncodedRootLength(path: string): number { + if (!path) return 0; + const ch0 = path.charCodeAt(0); + + // POSIX or UNC + if (ch0 === CharacterCodes.slash || ch0 === CharacterCodes.backslash) { + if (path.charCodeAt(1) !== ch0) return 1; // POSIX: "/" (or non-normalized "\") + + const p1 = path.indexOf(ch0 === CharacterCodes.slash ? directorySeparator : altDirectorySeparator, 2); + if (p1 < 0) return path.length; // UNC: "//server" or "\\server" + + return p1 + 1; // UNC: "//server/" or "\\server\" + } + + // DOS + if (isVolumeCharacter(ch0) && path.charCodeAt(1) === CharacterCodes.colon) { + const ch2 = path.charCodeAt(2); + if (ch2 === CharacterCodes.slash || ch2 === CharacterCodes.backslash) return 3; // DOS: "c:/" or "c:\" + if (path.length === 2) return 2; // DOS: "c:" (but not "c:d") + } + + // URL + const schemeEnd = path.indexOf(urlSchemeSeparator); + if (schemeEnd !== -1) { + const authorityStart = schemeEnd + urlSchemeSeparator.length; + const authorityEnd = path.indexOf(directorySeparator, authorityStart); + if (authorityEnd !== -1) { // URL: "file:///", "file://server/", "file://server/path" + // For local "file" URLs, include the leading DOS volume (if present). + // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a + // special case interpreted as "the machine from which the URL is being interpreted". + const scheme = path.slice(0, schemeEnd); + const authority = path.slice(authorityStart, authorityEnd); + if (scheme === "file" && (authority === "" || authority === "localhost") && + isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { + const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); + if (volumeSeparatorEnd !== -1) { + if (path.charCodeAt(volumeSeparatorEnd) === CharacterCodes.slash) { + // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/" + return ~(volumeSeparatorEnd + 1); + } + if (volumeSeparatorEnd === path.length) { + // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a" + // but not "file:///c:d" or "file:///c%3ad" + return ~volumeSeparatorEnd; + } + } + } + return ~(authorityEnd + 1); // URL: "file://server/", "http://server/" + } + return ~path.length; // URL: "file://server", "http://server" + } + + // relative + return 0; +} + +function isVolumeCharacter(charCode: number) { + return (charCode >= CharacterCodes.a && charCode <= CharacterCodes.z) || + (charCode >= CharacterCodes.A && charCode <= CharacterCodes.Z); +} + +function getFileUrlVolumeSeparatorEnd(url: string, start: number) { + const ch0 = url.charCodeAt(start); + if (ch0 === CharacterCodes.colon) return start + 1; + if (ch0 === CharacterCodes.percent && url.charCodeAt(start + 1) === CharacterCodes._3) { + const ch2 = url.charCodeAt(start + 2); + if (ch2 === CharacterCodes.a || ch2 === CharacterCodes.A) return start + 3; + } + return -1; +} + +export const dirname = getDirectoryPath; +/** +* Removes a trailing directory separator from a path, if it does not already have one. +* +* ```ts +* removeTrailingDirectorySeparator("/path/to/file.ext") === "/path/to/file.ext" +* removeTrailingDirectorySeparator("/path/to/file.ext/") === "/path/to/file.ext" +* ``` +* +* @internal +*/ +export function removeTrailingDirectorySeparator(path: Path): Path; +/** @internal */ +export function removeTrailingDirectorySeparator(path: string): string; +/** @internal */ +export function removeTrailingDirectorySeparator(path: string) { + if (hasTrailingDirectorySeparator(path)) { + return path.substr(0, path.length - 1); + } + + return path; +} +export const format = getPathFromPathComponents; +export const resolve = resolvePath; +export const compareCaseSensitive = comparePathsCaseSensitive; +export const compareCaseInsensitive = comparePathsCaseInsensitive; +export const isAbsolute = isRootedDiskPath; +export const isRoot = isDiskPathRoot; +export const parse = getPathComponents; +export const hasTrailingSeparator = hasTrailingDirectorySeparator; +export const reduce = reducePathComponents; +export const addTrailingSeparator = ensureTrailingDirectorySeparator; +export const compare = comparePaths; +export const relative = getRelativePathFromDirectory; +export const changeExtension = changeAnyExtension; +export const enum ValidationFlags { + None = 0, + + RequireRoot = 1 << 0, + RequireDirname = 1 << 1, + RequireBasename = 1 << 2, + RequireExtname = 1 << 3, + RequireTrailingSeparator = 1 << 4, + + AllowRoot = 1 << 5, + AllowDirname = 1 << 6, + AllowBasename = 1 << 7, + AllowExtname = 1 << 8, + AllowTrailingSeparator = 1 << 9, + AllowNavigation = 1 << 10, + AllowWildcard = 1 << 11, + + /** Path must be a valid directory root */ + Root = RequireRoot | AllowRoot | AllowTrailingSeparator, + + /** Path must be a absolute */ + Absolute = RequireRoot | AllowRoot | AllowDirname | AllowBasename | AllowExtname | AllowTrailingSeparator | AllowNavigation, + + /** Path may be relative or absolute */ + RelativeOrAbsolute = AllowRoot | AllowDirname | AllowBasename | AllowExtname | AllowTrailingSeparator | AllowNavigation, + + /** Path may only be a filename */ + Basename = RequireBasename | AllowExtname, +} + +export function validate(path: string, flags: ValidationFlags = ValidationFlags.RelativeOrAbsolute) { + const components = parse(path); + const trailing = hasTrailingSeparator(path); + if (!validateComponents(components, flags, trailing)) throw vfs.createIOError("ENOENT"); + return components.length > 1 && trailing ? format(reduce(components)) + sep : format(reduce(components)); +} + + +const invalidRootComponentRegExp = /^(?!(\/|\/\/\w+\/|[a-zA-Z]:\/?|)$)/; +const invalidNavigableComponentRegExp = /[:*?"<>|]/; +const invalidNavigableComponentWithWildcardsRegExp = /[:"<>|]/; +const invalidNonNavigableComponentRegExp = /^\.{1,2}$|[:*?"<>|]/; +const invalidNonNavigableComponentWithWildcardsRegExp = /^\.{1,2}$|[:"<>|]/; +const extRegExp = /\.\w+$/; +function validateComponents(components: string[], flags: ValidationFlags, hasTrailingSeparator: boolean) { + const hasRoot = !!components[0]; + const hasDirname = components.length > 2; + const hasBasename = components.length > 1; + const hasExtname = hasBasename && extRegExp.test(components[components.length - 1]); + const invalidComponentRegExp = flags & ValidationFlags.AllowNavigation + ? flags & ValidationFlags.AllowWildcard ? invalidNavigableComponentWithWildcardsRegExp : invalidNavigableComponentRegExp + : flags & ValidationFlags.AllowWildcard ? invalidNonNavigableComponentWithWildcardsRegExp : invalidNonNavigableComponentRegExp; + + // Validate required components + if (flags & ValidationFlags.RequireRoot && !hasRoot) return false; + if (flags & ValidationFlags.RequireDirname && !hasDirname) return false; + if (flags & ValidationFlags.RequireBasename && !hasBasename) return false; + if (flags & ValidationFlags.RequireExtname && !hasExtname) return false; + if (flags & ValidationFlags.RequireTrailingSeparator && !hasTrailingSeparator) return false; + + // Required components indicate allowed components + if (flags & ValidationFlags.RequireRoot) flags |= ValidationFlags.AllowRoot; + if (flags & ValidationFlags.RequireDirname) flags |= ValidationFlags.AllowDirname; + if (flags & ValidationFlags.RequireBasename) flags |= ValidationFlags.AllowBasename; + if (flags & ValidationFlags.RequireExtname) flags |= ValidationFlags.AllowExtname; + if (flags & ValidationFlags.RequireTrailingSeparator) flags |= ValidationFlags.AllowTrailingSeparator; + + // Validate disallowed components + if (~flags & ValidationFlags.AllowRoot && hasRoot) return false; + if (~flags & ValidationFlags.AllowDirname && hasDirname) return false; + if (~flags & ValidationFlags.AllowBasename && hasBasename) return false; + if (~flags & ValidationFlags.AllowExtname && hasExtname) return false; + if (~flags & ValidationFlags.AllowTrailingSeparator && hasTrailingSeparator) return false; + + // Validate component strings + if (invalidRootComponentRegExp.test(components[0])) return false; + for (let i = 1; i < components.length; i++) { + if (invalidComponentRegExp.test(components[i])) return false; + } + + return true; +} + +export function isDeclaration(path: string) { + return isDeclarationFileName(path); +} + +export const isTypeScript = hasTSFileExtension; +export const isJavaScript = hasJSFileExtension; +export const extname = getAnyExtensionFromPath; +export const basename = getBaseFileName; + +export function isSourceMap(path: string) { + return extname(path, ".map", /*ignoreCase*/ false).length > 0; +} +export function isTsConfigFile(path: string): boolean { + return path.indexOf("tsconfig") !== -1 && path.indexOf("json") !== -1; +} diff --git a/external-declarations/src/test-runner/utils.ts b/external-declarations/src/test-runner/utils.ts new file mode 100644 index 0000000000000..545ee278c8784 --- /dev/null +++ b/external-declarations/src/test-runner/utils.ts @@ -0,0 +1,93 @@ + +import * as path from 'path' +import * as ts from 'typescript' +import { compileFiles, TestFile, Utils } from "./tsc-infrastructure/compiler-run"; +import * as TestCaseParser from "./tsc-infrastructure/test-file-parser"; +import * as fsp from 'fs/promises' +import { getDeclarationExtension, isDeclarationFile, isJavaScriptFile, isJSONFile, isSourceMapFile } from '../compiler/path-utils'; +import { changeExtension } from './tsc-infrastructure/vpath'; +import * as vpath from "./tsc-infrastructure/vpath"; +import { libs } from './tsc-infrastructure/options'; +import { ModuleKind } from 'typescript'; +import { transformFile } from '../compiler/transform-file'; + +export function swapLocation(file: string, changed: string, extension: string | undefined = ".d.ts") { + const parentDir = path.dirname(path.dirname(file)); + let baseFile = path.basename(file) + if (extension) { + const existingExtension = path.extname(file); + baseFile = baseFile.substring(0, baseFile.length - existingExtension.length) + extension; + } + return path.join(parentDir, changed, baseFile); +} + +export interface FileContent { + content: string, + fileName: string +} + +export async function loadTestCase(fileName: string) { + const rawText = await fsp.readFile(fileName, { encoding: "utf-8" }); + const test = { + content: Utils.removeByteOrderMark(rawText), + file: fileName, + } + return Object.assign(TestCaseParser.makeUnitsFromTest(test.content, test.file), { + BOM: rawText.substring(0, Utils.getByteOrderMarkLength(rawText)) + }); +} +export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings: ts.CompilerOptions): FileContent[] { + function createHarnessTestFile(lastUnit: TestCaseParser.TestUnitData): TestFile { + return { unitName: lastUnit.name, content: lastUnit.content, fileOptions: lastUnit.fileOptions }; + } + + const toBeCompiled = caseData.testUnitData.map(unit => { + return createHarnessTestFile(unit); + }); + + const result = compileFiles(toBeCompiled, [], { + declaration: "true", + isolatedDeclarations: "true", + removeComments: "false", + }, settings, undefined); + + return caseData.testUnitData + .filter(isRelevantTestFile) + .map(file => { + const declarationFile = changeExtension(file.name, getDeclarationExtension(file.name)); + const resolvedDeclarationFile = vpath.resolve(result.vfs.cwd(), declarationFile); + const declaration = result.dts.get(resolvedDeclarationFile) + return { + content: declaration?.text ?? "", + fileName: declarationFile, + }; + }) +} +export function isRelevantTestFile(f: TestCaseParser.TestUnitData) { + return !isDeclarationFile(f.name) && !isJavaScriptFile(f.name) && !isJSONFile(f.name) && !isSourceMapFile(f.name) && f.content !== undefined +} + + +export function runIsolated(caseData: TestCaseParser.TestCaseContent, libFiles: string[], settings: ts.CompilerOptions): FileContent[] { + const toSrc = (n: string) => vpath.combine('/src', n); + const projectFiles = [...caseData.testUnitData.map(o => toSrc(o.name)), ...libFiles]; + + const packageJson = caseData.testUnitData.find(f => f.name === "/package.json"); + let packageResolution: ts.ResolutionMode = ts.ModuleKind.CommonJS + if (packageJson) { + packageResolution = JSON.parse(packageJson.content)?.type === "module" ? ModuleKind.ESNext : ModuleKind.CommonJS + } + + const results = caseData.testUnitData + .filter(isRelevantTestFile) + .map(file => { + const declaration = transformFile(toSrc(file.name), Utils.removeByteOrderMark(file.content), projectFiles, libs, settings, packageResolution) + return { + content: declaration.code, + fileName: changeExtension(file.name, getDeclarationExtension(file.name)), + }; + }) + return results; +} + + diff --git a/external-declarations/src/tsconfig.json b/external-declarations/src/tsconfig.json new file mode 100644 index 0000000000000..26012c4a16ff9 --- /dev/null +++ b/external-declarations/src/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + + "pretty": true, + "lib": ["es2018", "DOM"], + "target": "es2018", + "module": "CommonJS", + "moduleResolution": "node", + + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "composite": true, + + "strictNullChecks": true, + "noImplicitAny": true, + "noImplicitThis": true, + "strictPropertyInitialization": true, + + "skipLibCheck": true, + + "alwaysStrict": true, + "preserveConstEnums": true, + "outDir": "../build" + } +} \ No newline at end of file diff --git a/external-declarations/src/utils/cli-parser.ts b/external-declarations/src/utils/cli-parser.ts new file mode 100644 index 0000000000000..56f0fd0073ee0 --- /dev/null +++ b/external-declarations/src/utils/cli-parser.ts @@ -0,0 +1,140 @@ + + +export type ArgTypeParser = (name: string, value: string | undefined, existingValue: T | undefined) => T +function mustNotExist(fn: ArgTypeParser): ArgTypeParser { + return (name, value, existingValue) => { + if (existingValue) { + throw new Error(`Parameter ${name} was specified multiple times. Values ${existingValue}, ${value}`); + } + return fn(name, value, existingValue); + } +} +export const ArgType = { + String: () => mustNotExist((name, value) => { + if (value) { + return value; + } + throw new Error(`String value was not specified for ${name}`); + }), + Boolean: () => mustNotExist((name, value) => { + if (value === undefined) { + return true; + } + if (value.toLowerCase() === "false") { + return false; + } + if (value.toLowerCase() === "true") { + return true; + } + throw new Error(`Invalid Boolean Value ${value} for ${name}`); + }), + Enum: (...values: T[]) => mustNotExist((name, value,) => { + if (values.includes(value as T)) { + return value as T; + } + throw new Error(`Invalid Enum value, Expected one of ${values.join(",")}`); + }), + Number: () => mustNotExist((name, value) => { + if (value && !Number.isNaN(+value)) { + return +value; + } + throw new Error(`Invalid Number value, found ${value}`); + }), + StringArray: () => (name, value, existingValue: string[] | undefined) => { + existingValue ??= []; + if (value) { + existingValue.push(value) + return existingValue; + } + throw new Error(`String value was not specified for ${name}`); + }, +} satisfies Record ArgTypeParser> + + +type ParserConfiguration = Record | { + type: ArgTypeParser, + required?: V, + description: string, +}> +type ParsedValue> = { + [P in keyof T]: + T[P] extends ArgTypeParser ? A | undefined : + T[P] extends { + type: ArgTypeParser, + required?: infer R + } ? R extends true ? A : A | undefined : never +} + +export function parserConfiguration>(config:T) { + return config; +} +export function parseArgs>(args: string[], types: T): { + value: ParsedValue, + diagnostics: string[], + usage: () => string + printUsageOnErrors: () => void; +} { + const config: Record = {} + const diagnostics: string[] = [] + function parseArgument(name: string, value: string | undefined) { + const existingValue = config[name] + const parser = types[name]; + if(!parser) { + diagnostics.push(`Parameter ${name} was unexpected`) + return; + } + const parserFn = typeof parser === "function" ? parser: parser.type; + try { + const newValue = parserFn(name, value, existingValue); + config[name] = newValue; + } catch(e) { + if(e instanceof Error) { + diagnostics.push(e.message); + } + throw e; + } + } + for (const arg of args) { + const named = /--(?.*)=(?.*)/.exec(arg); + if (named) { + parseArgument(named.groups?.name!, named.groups?.value); + } + else { + const flagParam =/--(?.*)/.exec(arg); + if (flagParam) { + parseArgument(flagParam.groups?.name!, undefined); + } else { + parseArgument('default', arg); + } + } + } + + for(const key of Object.keys(types)) { + const cfg = types[key]; + if(!(key in config) && 'required' in cfg && cfg.required) { + diagnostics.push(`Parameters ${key} is required`); + } + } + function usage() { + return Object.entries(types) + .map(([name, v]) => ({ + name, + ...(typeof v === "object" ? v: { }) + })) + .filter(o => !!o.description) + .map(({ name, description, required }) => `--${name} \t ${description} \t ${required? "required": ""}`) + .join("\n"); + } + return { + value: config as any, + diagnostics, + usage, + printUsageOnErrors() { + if(diagnostics.length) { + diagnostics.forEach(s => console.log(s)); + console.log(usage()); + process.exit(); + } + }, + } +} diff --git a/external-declarations/src/utils/fs-utils.ts b/external-declarations/src/utils/fs-utils.ts new file mode 100644 index 0000000000000..2ea35b0dc0768 --- /dev/null +++ b/external-declarations/src/utils/fs-utils.ts @@ -0,0 +1,119 @@ +import * as fs from 'fs' +import * as fsp from 'fs/promises' +import { flatten, stableSort, compareStringsCaseSensitive } from '../compiler/lang-utils'; +import { normalizePath, createGetCanonicalFileName, combinePaths } from '../compiler/path-utils'; +import { FileSystemEntries } from '../test-runner/tsc-infrastructure/vfs'; + +const cache: Record = {} +export async function ensureDir(dirName: string) { + + const exists = cache[dirName] ?? + (await fsp.access(dirName).then(() => true, () => false)); + + if (!exists) { + await fsp.mkdir(dirName, { recursive: true }); + cache[dirName] = true; + } +} +let writeQueue = [0, 0, 0, 0, 0].map(() => Promise.resolve()); +let writeQueueIndex = 0; + +export function addToQueue(fn: () => Promise) { + const index = writeQueueIndex++ % writeQueue.length; + writeQueue[index] = writeQueue[index].then(() => { + return fn(); + }); +} + +export function flushQueue() { + return Promise.all(writeQueue); +} + + +/** + * @param path directory of the tsconfig.json + * + * @internal + */ +export function readAllFiles(path: string, regex: RegExp): string[] { + path = normalizePath(path); + + // Associate an array of results with each include regex. This keeps results in order of the "include" order. + // If there are no "includes", then just put everything in results[0]. + const results: string[] = []; + const visited = new Map(); + const toCanonical = createGetCanonicalFileName(false); + + visitDirectory(path, path); + + return flatten(results); + + function visitDirectory(path: string, absolutePath: string) { + const canonicalPath = toCanonical(absolutePath); + if (visited.has(canonicalPath)) return; + visited.set(canonicalPath, true); + const { files, directories } = getAccessibleFileSystemEntries(path); + + for (const current of stableSort(files, compareStringsCaseSensitive)) { + const name = combinePaths(path, current); + if (!regex.exec(name)) continue; + const absoluteName = combinePaths(absolutePath, current); + results.push(absoluteName); + } + for (const current of stableSort(directories, compareStringsCaseSensitive)) { + const name = combinePaths(path, current); + const absoluteName = combinePaths(absolutePath, current); + visitDirectory(name, absoluteName); + } + } +} + +function getAccessibleFileSystemEntries(path: string): FileSystemEntries { + try { + const entries = fs.readdirSync(path || ".", { withFileTypes: true }); + const files: string[] = []; + const directories: string[] = []; + for (const dirent of entries) { + // withFileTypes is not supported before Node 10.10. + const entry = typeof dirent === "string" ? dirent : dirent.name; + + // This is necessary because on some file system node fails to exclude + // "." and "..". See https://github.com/nodejs/node/issues/4002 + if (entry === "." || entry === "..") { + continue; + } + + let stat: any; + if (typeof dirent === "string" || dirent.isSymbolicLink()) { + const name = combinePaths(path, entry); + + try { + stat = fs.statSync(name); + if (!stat) { + continue; + } + } + catch (e) { + continue; + } + } + else { + stat = dirent; + } + + if (stat.isFile()) { + files.push(entry); + } + else if (stat.isDirectory()) { + directories.push(entry); + } + } + files.sort(); + directories.sort(); + return { files, directories }; + } + catch (e) { + return { files: [], directories: [] }; + } +} + diff --git a/external-declarations/tests/expected/class-all.d.ts b/external-declarations/tests/expected/class-all.d.ts new file mode 100644 index 0000000000000..af5d82e96cbd1 --- /dev/null +++ b/external-declarations/tests/expected/class-all.d.ts @@ -0,0 +1,8 @@ +export declare class Person { + age: number; + greet(): void; + overloaded(a: number): number; + overloaded(a: string): string; + get ageAccessor(): number; + set ageAccessor(value: number); +} diff --git a/external-declarations/tests/expected/const-var-init.d.ts b/external-declarations/tests/expected/const-var-init.d.ts new file mode 100644 index 0000000000000..e0e43abe26758 --- /dev/null +++ b/external-declarations/tests/expected/const-var-init.d.ts @@ -0,0 +1 @@ +export declare const test = 1; diff --git a/external-declarations/tests/expected/const-var.d.ts b/external-declarations/tests/expected/const-var.d.ts new file mode 100644 index 0000000000000..298be4f0ff82b --- /dev/null +++ b/external-declarations/tests/expected/const-var.d.ts @@ -0,0 +1 @@ +export declare const test: number; diff --git a/external-declarations/tests/expected/export-default.d.ts b/external-declarations/tests/expected/export-default.d.ts new file mode 100644 index 0000000000000..83a998ddc9e1c --- /dev/null +++ b/external-declarations/tests/expected/export-default.d.ts @@ -0,0 +1,2 @@ +declare const value: number; +export default value; diff --git a/external-declarations/tests/expected/functions.d.ts b/external-declarations/tests/expected/functions.d.ts new file mode 100644 index 0000000000000..3f00542289412 --- /dev/null +++ b/external-declarations/tests/expected/functions.d.ts @@ -0,0 +1,8 @@ +declare function test(a: string): number; +export declare const testAlias: typeof test; +export declare function testOptional(a: string, b?: string): number; +export declare function testDefault(a: string, b?: string): number; +export declare function testRest(...a: string[]): number; +export declare function testTuple(...a: [string, string]): number; +export declare function testTupleRest(...a: [string, string] | [number, number]): number; +export {}; diff --git a/external-declarations/tests/expected/global.d.ts b/external-declarations/tests/expected/global.d.ts new file mode 100644 index 0000000000000..da3cfbdf134e2 --- /dev/null +++ b/external-declarations/tests/expected/global.d.ts @@ -0,0 +1,10 @@ +declare class Cell { +} +declare class Ship { + isSunk: boolean; +} +declare class Board { + ships: Ship[]; + cells: Cell[]; + private allShipsSunk; +} diff --git a/external-declarations/tests/expected/imports.d.ts b/external-declarations/tests/expected/imports.d.ts new file mode 100644 index 0000000000000..723411f835eb1 --- /dev/null +++ b/external-declarations/tests/expected/imports.d.ts @@ -0,0 +1,7 @@ +import { Person } from './class-all'; +import * as fns from './functions'; +import def from './export-default'; +export declare let person: Person; +export declare const nr: number; +export declare const fff: typeof fns; +export default def; diff --git a/external-declarations/tests/expected/interface.d.ts b/external-declarations/tests/expected/interface.d.ts new file mode 100644 index 0000000000000..0fbc0907b545b --- /dev/null +++ b/external-declarations/tests/expected/interface.d.ts @@ -0,0 +1,6 @@ +export interface I { + n: number; + o: { + s: string; + }; +} diff --git a/external-declarations/tests/expected/let-var.d.ts b/external-declarations/tests/expected/let-var.d.ts new file mode 100644 index 0000000000000..5d422b6d153a5 --- /dev/null +++ b/external-declarations/tests/expected/let-var.d.ts @@ -0,0 +1 @@ +export declare let test: number; diff --git a/external-declarations/tests/expected/transitive.d.ts b/external-declarations/tests/expected/transitive.d.ts new file mode 100644 index 0000000000000..59032b911a1c4 --- /dev/null +++ b/external-declarations/tests/expected/transitive.d.ts @@ -0,0 +1,5 @@ +import { Person } from "./class-all"; +type Q = P; +type P = Person; +export type D = Q; +export {}; diff --git a/external-declarations/tests/expected/tsconfig.json b/external-declarations/tests/expected/tsconfig.json new file mode 100644 index 0000000000000..5c0ac4c34a20b --- /dev/null +++ b/external-declarations/tests/expected/tsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "strict": true + } +} \ No newline at end of file diff --git a/external-declarations/tests/expected/type-aliases.d.ts b/external-declarations/tests/expected/type-aliases.d.ts new file mode 100644 index 0000000000000..b52ed36649b9d --- /dev/null +++ b/external-declarations/tests/expected/type-aliases.d.ts @@ -0,0 +1,8 @@ +type PersonType = { + age: string; +}; +type Id = { + [P in keyof T]: T[P]; +}; +export type P = Id; +export {}; diff --git a/external-declarations/tests/source/.gitignore b/external-declarations/tests/source/.gitignore new file mode 100644 index 0000000000000..a6c7c2852d068 --- /dev/null +++ b/external-declarations/tests/source/.gitignore @@ -0,0 +1 @@ +*.js diff --git a/external-declarations/tests/source/binder/conditionalTypeAliasing.ts b/external-declarations/tests/source/binder/conditionalTypeAliasing.ts new file mode 100644 index 0000000000000..36a97e3979bda --- /dev/null +++ b/external-declarations/tests/source/binder/conditionalTypeAliasing.ts @@ -0,0 +1,36 @@ +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; +} \ No newline at end of file diff --git a/external-declarations/tests/source/binder/default-class-symbol.ts b/external-declarations/tests/source/binder/default-class-symbol.ts new file mode 100644 index 0000000000000..ffc46996a8233 --- /dev/null +++ b/external-declarations/tests/source/binder/default-class-symbol.ts @@ -0,0 +1,5 @@ +export default class Class { + parent!: Class; +} + +export const instance: Class = new Class(); \ No newline at end of file diff --git a/external-declarations/tests/source/binder/default-function-symbol.ts b/external-declarations/tests/source/binder/default-function-symbol.ts new file mode 100644 index 0000000000000..60b729d25164b --- /dev/null +++ b/external-declarations/tests/source/binder/default-function-symbol.ts @@ -0,0 +1,5 @@ +export default function foo(): typeof foo { + return foo; +} + +export const instance: typeof foo = foo; \ No newline at end of file diff --git a/external-declarations/tests/source/binder/enum-members-aliasing.ts b/external-declarations/tests/source/binder/enum-members-aliasing.ts new file mode 100644 index 0000000000000..c25be6b680918 --- /dev/null +++ b/external-declarations/tests/source/binder/enum-members-aliasing.ts @@ -0,0 +1,5 @@ +const X = 1; +export const enum E { + X = 1, + Y = X +} diff --git a/external-declarations/tests/source/binder/local-and-export-symbols.ts b/external-declarations/tests/source/binder/local-and-export-symbols.ts new file mode 100644 index 0000000000000..499e6fc78f440 --- /dev/null +++ b/external-declarations/tests/source/binder/local-and-export-symbols.ts @@ -0,0 +1,5 @@ +export interface I { +} + +const I = 1; +export const O: I = {} \ No newline at end of file diff --git a/external-declarations/tests/source/binder/parameterAliasing.ts b/external-declarations/tests/source/binder/parameterAliasing.ts new file mode 100644 index 0000000000000..78c94c75d2728 --- /dev/null +++ b/external-declarations/tests/source/binder/parameterAliasing.ts @@ -0,0 +1,4 @@ +const p: string =""; +export function test(p: number, r: typeof p): UF extends infer TF ? TF: typeof p { + return null! +} \ No newline at end of file diff --git a/external-declarations/tests/source/binder/re-exported-import-visibility.ts b/external-declarations/tests/source/binder/re-exported-import-visibility.ts new file mode 100644 index 0000000000000..7a5f57dc7121f --- /dev/null +++ b/external-declarations/tests/source/binder/re-exported-import-visibility.ts @@ -0,0 +1,8 @@ +// x0.d.ts +export declare let a: invalid; + +// x.d.ts +declare module "./observable" { + // import { a } from "./x0"; + export { a } from "./x0"; +} \ No newline at end of file diff --git a/external-declarations/tests/source/class-all.ts b/external-declarations/tests/source/class-all.ts new file mode 100644 index 0000000000000..9d4f35f18a9bd --- /dev/null +++ b/external-declarations/tests/source/class-all.ts @@ -0,0 +1,19 @@ +export class Person { + age: number = 1; + greet(): void { + console.log("Hi") + } + + overloaded(a: number): number; + overloaded(a: string): string; + overloaded(a: any): any{ + return a; + } + + get ageAccessor(): number { + return this.age; + } + set ageAccessor(value: number) { + this.age = value; + } +} \ No newline at end of file diff --git a/external-declarations/tests/source/const-var-init.ts b/external-declarations/tests/source/const-var-init.ts new file mode 100644 index 0000000000000..873e758025b50 --- /dev/null +++ b/external-declarations/tests/source/const-var-init.ts @@ -0,0 +1 @@ +export const test = 1; diff --git a/external-declarations/tests/source/const-var.ts b/external-declarations/tests/source/const-var.ts new file mode 100644 index 0000000000000..42a1cdeda0cc4 --- /dev/null +++ b/external-declarations/tests/source/const-var.ts @@ -0,0 +1 @@ +export const test: number = 0; diff --git a/external-declarations/tests/source/export-default.ts b/external-declarations/tests/source/export-default.ts new file mode 100644 index 0000000000000..9668f69f682de --- /dev/null +++ b/external-declarations/tests/source/export-default.ts @@ -0,0 +1,2 @@ +const value: number = 10; +export default value \ No newline at end of file diff --git a/external-declarations/tests/source/functions.ts b/external-declarations/tests/source/functions.ts new file mode 100644 index 0000000000000..dfbbf4c867322 --- /dev/null +++ b/external-declarations/tests/source/functions.ts @@ -0,0 +1,29 @@ + + +function test(a: string): number { + return 0; +} +export const testAlias: typeof test = test; + +export function testOptional(a: string, b?: string): number { + return 0; +} + +export function testDefault(a: string, b: string = ""): number { + return 0; +} + + +export function testRest(...a: string[]): number { + return 0; +} + +export function testTuple(...a: [string, string]): number { + return 0; +} + +export function testTupleRest(...a: + | [string, string] + | [number, number]): number { + return 0; +} \ No newline at end of file diff --git a/external-declarations/tests/source/global.ts b/external-declarations/tests/source/global.ts new file mode 100644 index 0000000000000..e56cd849ba20b --- /dev/null +++ b/external-declarations/tests/source/global.ts @@ -0,0 +1,15 @@ +class Cell { +} + +class Ship { + isSunk: boolean; +} + +class Board { + ships: Ship[]; + cells: Cell[]; + + private allShipsSunk() { + return this.ships.every(function (val) { return val.isSunk; }); + } +} \ No newline at end of file diff --git a/external-declarations/tests/source/imports.ts b/external-declarations/tests/source/imports.ts new file mode 100644 index 0000000000000..0f5ac62055fbd --- /dev/null +++ b/external-declarations/tests/source/imports.ts @@ -0,0 +1,12 @@ +import { Person } from './class-all'; +import * as fns from './functions'; +import * as fns2 from './functions'; +import def from './export-default'; + + +export let person: Person = new Person; +export const nr: number = fns2.testAlias("1"); +export const fff: typeof fns = fns; +export default def; + + diff --git a/external-declarations/tests/source/interface.ts b/external-declarations/tests/source/interface.ts new file mode 100644 index 0000000000000..88d0e45286812 --- /dev/null +++ b/external-declarations/tests/source/interface.ts @@ -0,0 +1,6 @@ +export interface I { + n: number; + o: { + s: string + } +} \ No newline at end of file diff --git a/external-declarations/tests/source/let-var.ts b/external-declarations/tests/source/let-var.ts new file mode 100644 index 0000000000000..44e8ffc615312 --- /dev/null +++ b/external-declarations/tests/source/let-var.ts @@ -0,0 +1 @@ +export let test: number = 0; diff --git a/external-declarations/tests/source/private-members-typeof.ts b/external-declarations/tests/source/private-members-typeof.ts new file mode 100644 index 0000000000000..4387ee66df7a0 --- /dev/null +++ b/external-declarations/tests/source/private-members-typeof.ts @@ -0,0 +1,4 @@ +class Test { + #foo = 1 + #bar: typeof this.#foo = 1; +} \ No newline at end of file diff --git a/external-declarations/tests/source/transitive.ts b/external-declarations/tests/source/transitive.ts new file mode 100644 index 0000000000000..e599dad981578 --- /dev/null +++ b/external-declarations/tests/source/transitive.ts @@ -0,0 +1,4 @@ +import { Person } from "./class-all"; +type Q = P; +type P = Person; +export type D = Q; \ No newline at end of file diff --git a/external-declarations/tests/source/tsconfig.json b/external-declarations/tests/source/tsconfig.json new file mode 100644 index 0000000000000..587ba1c506cf8 --- /dev/null +++ b/external-declarations/tests/source/tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "strict": true, + "target": "ESNext" + } +} \ No newline at end of file diff --git a/external-declarations/tests/source/type-aliases.ts b/external-declarations/tests/source/type-aliases.ts new file mode 100644 index 0000000000000..db7efb5b0b514 --- /dev/null +++ b/external-declarations/tests/source/type-aliases.ts @@ -0,0 +1,13 @@ +type PersonType = { + age: string; +} + +type Id = { + [P in keyof T]: T[P] +} + +export type P = Id + +function x() { + return 1; +} \ No newline at end of file diff --git a/external-declarations/tests/source/unicode-chars.ts b/external-declarations/tests/source/unicode-chars.ts new file mode 100644 index 0000000000000..d325ca925d118 --- /dev/null +++ b/external-declarations/tests/source/unicode-chars.ts @@ -0,0 +1,3 @@ +// @target: es2015 +// @filename: extendedEscapesForAstralsInVarsAndClasses.ts +export var _𐊧 = "" \ No newline at end of file diff --git a/package.json b/package.json index 5ac9044fde463..a521b12388d3c 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,8 @@ "type": "git", "url": "https://github.com/Microsoft/TypeScript.git" }, - "main": "./lib/typescript.js", - "typings": "./lib/typescript.d.ts", + "main": "./built/local/typescript.js", + "typings": "./built/local/typescript.d.ts", "bin": { "tsc": "./bin/tsc", "tsserver": "./bin/tsserver" From 6e51087a9c75d3853b095410ab43350d53a5a0b5 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 9 May 2023 14:55:23 +0100 Subject: [PATCH 007/224] Added local inference WIP. --- .../src/code-mod/test-updater.ts | 2 +- .../src/compiler/declaration-emit.ts | 701 +++++++++++++++++- .../src/compiler/emit-host.ts | 3 +- .../src/compiler/path-utils.ts | 11 +- .../src/compiler/transform-file.ts | 1 - .../src/test-runner/test-runner-main.ts | 8 +- .../tsc-infrastructure/compiler.ts | 3 +- .../tests/source/functions.ts | 4 +- .../local-inference/array-literal-const.ts | 9 + .../local-inference/array-literal-mutable.ts | 42 ++ .../tests/source/local-inference/class.ts | 7 + .../expressions-with-assertions.ts | 14 + .../local-inference/function-expression.ts | 21 + .../local-inference/literals-as-const.ts | 22 + .../source/local-inference/literals-const.ts | 14 + .../tests/source/local-inference/literals.ts | 12 + .../tests/source/local-inference/new-type.ts | 2 + .../local-inference/object-generic-methods.ts | 48 ++ .../source/local-inference/object-literal.ts | 25 + .../return-types-function-declarations.ts | 83 +++ .../return-types-function-expressions.ts | 66 ++ .../local-inference/return-types-methods.ts | 34 + .../source/local-inference/typeof-var.ts | 0 .../source/local-inference/union-collapse.ts | 53 ++ src/compiler/transformers/declarations.ts | 700 ++++++++++++++++- 25 files changed, 1867 insertions(+), 18 deletions(-) create mode 100644 external-declarations/tests/source/local-inference/array-literal-const.ts create mode 100644 external-declarations/tests/source/local-inference/array-literal-mutable.ts create mode 100644 external-declarations/tests/source/local-inference/class.ts create mode 100644 external-declarations/tests/source/local-inference/expressions-with-assertions.ts create mode 100644 external-declarations/tests/source/local-inference/function-expression.ts create mode 100644 external-declarations/tests/source/local-inference/literals-as-const.ts create mode 100644 external-declarations/tests/source/local-inference/literals-const.ts create mode 100644 external-declarations/tests/source/local-inference/literals.ts create mode 100644 external-declarations/tests/source/local-inference/new-type.ts create mode 100644 external-declarations/tests/source/local-inference/object-generic-methods.ts create mode 100644 external-declarations/tests/source/local-inference/object-literal.ts create mode 100644 external-declarations/tests/source/local-inference/return-types-function-declarations.ts create mode 100644 external-declarations/tests/source/local-inference/return-types-function-expressions.ts create mode 100644 external-declarations/tests/source/local-inference/return-types-methods.ts create mode 100644 external-declarations/tests/source/local-inference/typeof-var.ts create mode 100644 external-declarations/tests/source/local-inference/union-collapse.ts diff --git a/external-declarations/src/code-mod/test-updater.ts b/external-declarations/src/code-mod/test-updater.ts index 0087525ddd44c..88418c2d68dad 100644 --- a/external-declarations/src/code-mod/test-updater.ts +++ b/external-declarations/src/code-mod/test-updater.ts @@ -2,7 +2,7 @@ import 'source-map-support/register'; import * as fsPath from 'path' import * as fs from 'fs/promises' import { parserConfiguration, ArgType, parseArgs } from "../utils/cli-parser"; -import { isDeclarationFile, isJavaScriptFile, isJSONFile, isSourceMapFile, normalizePath } from '../compiler/path-utils'; +import { normalizePath } from '../compiler/path-utils'; import { isRelevantTestFile, loadTestCase } from '../test-runner/utils'; import ts = require('typescript'); import { compileFiles, setCompilerOptionsFromHarnessSetting, TestFile } from '../test-runner/tsc-infrastructure/compiler-run'; diff --git a/external-declarations/src/compiler/declaration-emit.ts b/external-declarations/src/compiler/declaration-emit.ts index 4d1dc97f9b8f9..a0e43367f0c42 100644 --- a/external-declarations/src/compiler/declaration-emit.ts +++ b/external-declarations/src/compiler/declaration-emit.ts @@ -1,11 +1,32 @@ -import { Symbol, SourceFile, DiagnosticWithLocation, factory, CommentRange, Node, getParseTreeNode, SyntaxKind, SignatureDeclaration, ParameterDeclaration, getTrailingCommentRanges, getLeadingCommentRanges, NodeBuilderFlags, VisitResult, ExportAssignment, DeclarationName, Declaration, ModuleDeclaration, SymbolFlags, getNameOfDeclaration, isExportAssignment, Bundle, visitNodes, setTextRange, createUnparsedSourceFile, FileReference, NodeArray, Statement, isExternalModule, isImportEqualsDeclaration, isExternalModuleReference, isStringLiteralLike, isImportDeclaration, isStringLiteral, UnparsedSource, isUnparsedSource, BindingName, ArrayBindingElement, isIdentifier, ModifierFlags, TypeNode, FunctionDeclaration, MethodDeclaration, GetAccessorDeclaration, SetAccessorDeclaration, BindingElement, ConstructSignatureDeclaration, VariableDeclaration, MethodSignature, CallSignatureDeclaration, PropertyDeclaration, PropertySignature, visitNode, isPropertySignature, NamedDeclaration, isFunctionDeclaration, OmittedExpression, isOmittedExpression, AccessorDeclaration, isSetAccessorDeclaration, TypeParameterDeclaration, isSourceFile, isTypeAliasDeclaration, isModuleDeclaration, isClassDeclaration, isInterfaceDeclaration, isFunctionLike, isIndexSignatureDeclaration, isMappedTypeNode, EntityNameOrEntityNameExpression, setCommentRange, getCommentRange, ImportEqualsDeclaration, ImportDeclaration, ExportDeclaration, ImportTypeNode, StringLiteral, AssertClause, isSemicolonClassElement, isMethodDeclaration, isMethodSignature, isTypeQueryNode, isEntityName, visitEachChild, isPrivateIdentifier, isTypeNode, isTupleTypeNode, getLineAndCharacterOfPosition, setEmitFlags, EmitFlags, setOriginalNode, GeneratedIdentifierFlags, NodeFlags, canHaveModifiers, isTypeParameterDeclaration, NamespaceDeclaration, Identifier, VariableStatement, isPropertyAccessExpression, unescapeLeadingUnderscores, ModuleBody, BindingPattern, isExportDeclaration, HasModifiers, Modifier, isModifier, HeritageClause, InterfaceDeclaration, ClassDeclaration, TypeAliasDeclaration, EnumDeclaration, ConstructorDeclaration, IndexSignatureDeclaration, ExpressionWithTypeArguments, TypeReferenceNode, ConditionalTypeNode, FunctionTypeNode, ConstructorTypeNode, isStatement, isArrayBindingElement, isBindingElement, isClassElement, isExpressionWithTypeArguments, isLiteralExpression, isTypeElement, isVariableDeclaration, NodeFactory } from "typescript"; +import { Symbol, SourceFile, DiagnosticWithLocation, factory, CommentRange, Node, getParseTreeNode, SyntaxKind, SignatureDeclaration, ParameterDeclaration, getTrailingCommentRanges, getLeadingCommentRanges, NodeBuilderFlags, VisitResult, ExportAssignment, DeclarationName, Declaration, ModuleDeclaration, SymbolFlags, getNameOfDeclaration, isExportAssignment, Bundle, visitNodes, setTextRange, createUnparsedSourceFile, FileReference, NodeArray, Statement, isExternalModule, isImportEqualsDeclaration, isExternalModuleReference, isStringLiteralLike, isImportDeclaration, isStringLiteral, UnparsedSource, isUnparsedSource, BindingName, ArrayBindingElement, isIdentifier, ModifierFlags, TypeNode, FunctionDeclaration, MethodDeclaration, GetAccessorDeclaration, SetAccessorDeclaration, BindingElement, ConstructSignatureDeclaration, VariableDeclaration, MethodSignature, CallSignatureDeclaration, PropertyDeclaration, PropertySignature, visitNode, isPropertySignature, NamedDeclaration, isFunctionDeclaration, OmittedExpression, isOmittedExpression, AccessorDeclaration, isSetAccessorDeclaration, TypeParameterDeclaration, isSourceFile, isTypeAliasDeclaration, isModuleDeclaration, isClassDeclaration, isInterfaceDeclaration, isFunctionLike, isIndexSignatureDeclaration, isMappedTypeNode, EntityNameOrEntityNameExpression, setCommentRange, getCommentRange, ImportEqualsDeclaration, ImportDeclaration, ExportDeclaration, ImportTypeNode, StringLiteral, AssertClause, isSemicolonClassElement, isMethodDeclaration, isMethodSignature, isTypeQueryNode, isEntityName, visitEachChild, isPrivateIdentifier, isTypeNode, isTupleTypeNode, getLineAndCharacterOfPosition, setEmitFlags, EmitFlags, setOriginalNode, GeneratedIdentifierFlags, NodeFlags, canHaveModifiers, isTypeParameterDeclaration, NamespaceDeclaration, Identifier, VariableStatement, isPropertyAccessExpression, unescapeLeadingUnderscores, ModuleBody, BindingPattern, isExportDeclaration, HasModifiers, Modifier, isModifier, HeritageClause, InterfaceDeclaration, ClassDeclaration, TypeAliasDeclaration, EnumDeclaration, ConstructorDeclaration, IndexSignatureDeclaration, ExpressionWithTypeArguments, TypeReferenceNode, ConditionalTypeNode, FunctionTypeNode, ConstructorTypeNode, isStatement, isArrayBindingElement, isBindingElement, isClassElement, isExpressionWithTypeArguments, isLiteralExpression, isTypeElement, isVariableDeclaration, NodeFactory, isTypeAssertionExpression, isNumericLiteral, isTemplateLiteral, BooleanLiteral, TypeAssertion, LiteralExpression, AsExpression, isTypeReferenceNode, ObjectLiteralExpression, TypeElement, isPropertyAssignment, ArrayLiteralExpression, isSpreadElement, FunctionExpression, ArrowFunction, isParameter, isPropertyName, NewExpression, KeywordTypeSyntaxKind, isPropertyDeclaration, isReturnStatement, isClassLike, ReturnStatement, forEachChild, TypeLiteralNode, __String, isTypeLiteralNode, isLiteralTypeNode, TemplateExpression, TemplateLiteralTypeSpan, TemplateHead, isNoSubstitutionTemplateLiteral, isTypeOfExpression, PrefixUnaryOperator } from "typescript"; import { Debug } from "./debug"; import { Diagnostics } from "./diagnosticInformationMap.generated"; -import { filter, stringContains, concatenate, last, forEach, length, pushIfUnique, map, mapDefined, arrayFrom, contains, startsWith, some, append, emptyArray, isArray, compact, flatMap, flatten, orderedRemoveItem, tryCast } from "./lang-utils"; +import { filter, stringContains, concatenate, last, forEach, length, pushIfUnique, map, mapDefined, arrayFrom, contains, startsWith, some, append, emptyArray, isArray, compact, flatMap, flatten, orderedRemoveItem, tryCast, findIndex } from "./lang-utils"; import { getDirectoryPath, normalizeSlashes, toFileNameLowerCase } from "./path-utils"; import { transformNodes } from "./transformer"; import { EmitHost, EmitResolver, GetSymbolAccessibilityDiagnostic, LateBoundDeclaration, NodeId, ResolutionMode, SymbolAccessibility, SymbolAccessibilityResult, SymbolTracker, TransformationContext } from "./types"; -import { getEffectiveModifierFlags, skipTrivia, getLeadingCommentRangesOfNode, LateVisibilityPaintedStatement, AnyImportSyntax, getSourceFileOfNode, createDiagnosticForNode, getTextOfNode, declarationNameToString, canProduceDiagnostics, getThisParameter, isDeclaration, DeclarationDiagnosticProducing, setParent, getFirstConstructorWithBody, hasSyntacticModifier, visitArray, AllAccessorDeclarations, isNightly, createGetSymbolAccessibilityDiagnosticForNode, getOriginalNodeId, addRelatedInfo, isExternalOrCommonJsModule, isJsonSourceFile, isSourceFileJS, getResolvedExternalModuleName, isSourceFileNotJson, isAnyImportSyntax, createEmptyExports, isExternalModuleAugmentation, isGlobalScopeAugmentation, isLateVisibilityPaintedStatement, hasDynamicName, hasEffectiveModifier, isBindingPattern, isLiteralImportTypeNode, removeAllComments, needsScopeMarker, hasJSDocNodes, isExternalModuleIndicator, getOutputPathsFor, getSetAccessorValueParameter, getExternalModuleNameFromDeclaration, getExternalModuleImportEqualsDeclarationExpression, getResolutionModeOverrideForClause, isEntityNameExpression, getEffectiveBaseTypeNode, createGetSymbolAccessibilityDiagnosticForNodeName, pathContainsNodeModules, hasIdentifierComputedName, isIdentifierANonContextualKeyword, } from "./utils"; +import { getEffectiveModifierFlags, skipTrivia, getLeadingCommentRangesOfNode, LateVisibilityPaintedStatement, AnyImportSyntax, getSourceFileOfNode, createDiagnosticForNode, getTextOfNode, declarationNameToString, canProduceDiagnostics, getThisParameter, isDeclaration, DeclarationDiagnosticProducing, setParent, getFirstConstructorWithBody, hasSyntacticModifier, visitArray, AllAccessorDeclarations, isNightly, createGetSymbolAccessibilityDiagnosticForNode, getOriginalNodeId, addRelatedInfo, isExternalOrCommonJsModule, isJsonSourceFile, isSourceFileJS, getResolvedExternalModuleName, isSourceFileNotJson, isAnyImportSyntax, createEmptyExports, isExternalModuleAugmentation, isGlobalScopeAugmentation, isLateVisibilityPaintedStatement, hasDynamicName, hasEffectiveModifier, isBindingPattern, isLiteralImportTypeNode, removeAllComments, needsScopeMarker, hasJSDocNodes, isExternalModuleIndicator, getOutputPathsFor, getSetAccessorValueParameter, getExternalModuleNameFromDeclaration, getExternalModuleImportEqualsDeclarationExpression, getResolutionModeOverrideForClause, isEntityNameExpression, getEffectiveBaseTypeNode, createGetSymbolAccessibilityDiagnosticForNodeName, pathContainsNodeModules, hasIdentifierComputedName, isIdentifierANonContextualKeyword, getNodeId, getSyntacticModifierFlags, } from "./utils"; +import { getModifiers } from "typescript"; +import { PrefixUnaryExpression } from "typescript"; +import { NumericLiteral } from "typescript"; +import { FunctionLikeDeclaration } from "typescript"; +import { LiteralTypeNode } from "typescript"; +import { NoSubstitutionTemplateLiteral } from "typescript"; +import { ParenthesizedExpression } from "typescript"; + + +enum NarrowBehavior { + None = 0, + AsConst = 1, + KeepLiterals = 2, + NotKeepLiterals = ~KeepLiterals, +} + +enum LocalTypeInfoFlags { + None = 0, + Fresh = 1 << 0, + Implicit = 1<< 1 +} /** @internal */ export function getDeclarationDiagnostics(host: EmitHost, resolver: EmitResolver, file: SourceFile | undefined): DiagnosticWithLocation[] | undefined { @@ -103,6 +124,7 @@ export function transformDeclarations(context: TransformationContext) { const options = context.getCompilerOptions(); const { noResolve, stripInternal } = options; const isolatedDeclarations = true; + const strictNullChecks = !!options.strict || !!options.strictNullChecks; return transformRoot; function reportIsolatedDeclarationError(node: Node) { @@ -521,6 +543,675 @@ export function transformDeclarations(context: TransformationContext) { function makeInvalidType() { return factory.createTypeReferenceNode("invalid"); } + + type LocalTypeInfo = { typeNode: TypeNode, flags: LocalTypeInfoFlags }; + + function localInference(node: Node, isConstContext: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { + const nextIsConst = isConstContext & NarrowBehavior.NotKeepLiterals; + switch(node.kind) { + case SyntaxKind.ParenthesizedExpression: + return regular(getWidenedType(localInference((node as ParenthesizedExpression).expression, isConstContext))); + case SyntaxKind.Identifier: + if((node as Identifier).escapedText === "undefined") { + if(strictNullChecks) { + return regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword)); + } else { + return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), LocalTypeInfoFlags.Implicit); + } + } + case SyntaxKind.NullKeyword: + if(strictNullChecks) { + return regular(factory.createLiteralTypeNode(factory.createNull())); + } else { + return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), LocalTypeInfoFlags.Implicit); + } + case SyntaxKind.NewExpression: + const newExpr = node as NewExpression; + if(isIdentifier(newExpr.expression)) { + // to do: isolated declarations : Add check for type arguments. + const typeNode = factory.createTypeReferenceNode( + visitNode(newExpr.expression, visitDeclarationSubtree, isIdentifier)!, + visitNodes(newExpr.typeArguments, visitDeclarationSubtree, isTypeNode) + ); + return regular(visitNode(typeNode, visitDeclarationSubtree, isTypeNode) ?? + makeInvalidTypeAndReport(node)); + } + return regular(makeInvalidTypeAndReport(node)); + case SyntaxKind.ArrowFunction: + case SyntaxKind.FunctionExpression: + const fnNode = node as FunctionExpression | ArrowFunction; + return regular(factory.createFunctionTypeNode( + visitNodes(fnNode.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), + fnNode.parameters.map(p => ensureParameter(p)), + inferReturnType(fnNode).typeNode, + )) + case SyntaxKind.TypeAssertionExpression: + case SyntaxKind.AsExpression: + const asExpression = node as AsExpression | TypeAssertion; + if(isTypeReferenceNode(asExpression.type) && isConst(asExpression.type)) { + return localInference(asExpression.expression, NarrowBehavior.AsConst); + } else { + const type = visitType(asExpression.type, asExpression); + if(isLiteralTypeNode(type) && + (isNoSubstitutionTemplateLiteral(type.literal) || isStringLiteral(type.literal))) { + return regular(factory.createLiteralTypeNode( + normalizeLiteralValue(type.literal) + )); + } + return regular(type); + } + case SyntaxKind.PrefixUnaryExpression: + const prefixOp = node as PrefixUnaryExpression; + if(prefixOp.operator === SyntaxKind.MinusToken) { + const {typeNode: targetExpressionType, flags } = localInference(prefixOp.operand, isConstContext); + if(isLiteralTypeNode(targetExpressionType) && isNumericLiteral(targetExpressionType.literal)) { + return { + flags, + typeNode: factory.createLiteralTypeNode(factory.createPrefixMinus(targetExpressionType.literal)) + } + } else if(targetExpressionType.kind === SyntaxKind.NumberKeyword) { + return { typeNode: targetExpressionType, flags }; + } + } + break; + case SyntaxKind.NumericLiteral: + return literal(node, SyntaxKind.NumberKeyword, isConstContext); + case SyntaxKind.TemplateExpression: + if(!isConstContext) { + return literal(node, SyntaxKind.StringKeyword, isConstContext) + } + const templateExpression = node as TemplateExpression; + const templateSpans: TemplateLiteralTypeSpan[] = [] + let head = factory.createTemplateHead(templateExpression.head.text); + let prevSpan: TemplateHead | TemplateLiteralTypeSpan = head; + for(const span of templateExpression.templateSpans) { + const {typeNode} = localInference(span.expression, nextIsConst); + if(isLiteralTypeNode(typeNode)) { + let oldText = prevSpan.kind === SyntaxKind.TemplateHead ? prevSpan.text : prevSpan.literal.text; + let newText= oldText; + } else { + const literalSpan = factory.createTemplateLiteralTypeSpan( + typeNode, + span.literal + ); + prevSpan = literalSpan; + templateSpans.push(literalSpan); + } + + } + return regular(factory.createTemplateLiteralType(templateExpression.head, templateSpans)); + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.StringLiteral: + return literal(node, SyntaxKind.StringKeyword, isConstContext); + case SyntaxKind.BigIntLiteral: + return literal(node, SyntaxKind.BigIntKeyword, isConstContext); + case SyntaxKind.RegularExpressionLiteral: + return literal(node, "RegExp", isConstContext); + case SyntaxKind.TrueKeyword: + case SyntaxKind.FalseKeyword: + return literal(node, SyntaxKind.BooleanKeyword, isConstContext); + case SyntaxKind.ArrayLiteralExpression: + const arrayLiteral = node as ArrayLiteralExpression + const elementTypesInfo: LocalTypeInfo[] = [] + for(const element of arrayLiteral.elements) { + elementTypesInfo.push( + localInference(element, nextIsConst) + ) + } + if(isConstContext & NarrowBehavior.AsConst) { + const tupleType = factory.createTupleTypeNode( + elementTypesInfo.map(lti => lti.typeNode) + ); + tupleType.emitNode = { flags: 1 }; + return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType)); + } else { + let elementTypes = deduplicateUnion(elementTypesInfo); + let simplifiedUnion = collapseLiteralTypesIntoBaseTypes(elementTypes); + normalizeObjectUnion(simplifiedUnion); + let itemType; + if(simplifiedUnion.length === 0) { + itemType = (strictNullChecks ? factory.createKeywordTypeNode(SyntaxKind.NeverKeyword) : factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)); + } else { + itemType = simplifiedUnion.length === 1? simplifiedUnion[0]: factory.createUnionTypeNode(simplifiedUnion); + } + + return regular(factory.createArrayTypeNode(itemType)); + } + case SyntaxKind.ObjectLiteralExpression: + const objectLiteral = node as ObjectLiteralExpression + const properties: TypeElement[] = [] + for(const prop of objectLiteral.properties) { + if(isMethodDeclaration(prop)) { + if (isConstContext & NarrowBehavior.AsConst) { + properties.push(factory.createPropertySignature( + [factory.createModifier(SyntaxKind.ReadonlyKeyword)], + visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!, + undefined, + factory.createFunctionTypeNode( + visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), + prop.parameters.map(p => ensureParameter(p)), + visitType(prop.type, prop), + ) + )); + } + else { + properties.push(factory.createMethodSignature( + [], + visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!, + prop.questionToken, + visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), + prop.parameters.map(p => ensureParameter(p)), + visitType(prop.type, prop), + )) + } + } + else if(isPropertyAssignment(prop)) { + const modifiers = isConstContext & NarrowBehavior.AsConst ? + [factory.createModifier(SyntaxKind.ReadonlyKeyword)]: + []; + properties.push(factory.createPropertySignature( + modifiers, + visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!, + undefined, + localInference(prop.initializer, nextIsConst).typeNode + )) + } else { + return regular(makeInvalidTypeAndReport(prop)); + } + } + return regular(factory.createTypeLiteralNode( + properties + )) + } + + return regular(makeInvalidTypeAndReport(node)); + } + function fresh(typeNode: TypeNode, flags = LocalTypeInfoFlags.None) { + return { typeNode, flags: flags | LocalTypeInfoFlags.Fresh } + } + function regular(typeNode: TypeNode, flags = LocalTypeInfoFlags.None) { + return { typeNode, flags } + } + function normalizeLiteralValue(literal: LiteralExpression) { + switch(literal.kind) { + case SyntaxKind.BigIntLiteral: + case SyntaxKind.TrueKeyword: + case SyntaxKind.FalseKeyword: + return 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 literal(node: Node, baseType: string | KeywordTypeSyntaxKind, narrowBehavior: NarrowBehavior) { + if(narrowBehavior) { + return fresh(factory.createLiteralTypeNode( + normalizeLiteralValue(node as LiteralExpression) + )) + } else { + return fresh(typeof baseType === "number" ? + factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType)); + } + } + function isConst(typeReference: TypeReferenceNode) { + return isIdentifier(typeReference.typeName) && typeReference.typeName.escapedText === "const"; + } + function makeInvalidTypeAndReport(node: Node) { + reportIsolatedDeclarationError(node); + return makeInvalidType(); + } + function visitType(type: TypeNode | undefined, owner: Node) { + const visitedType = visitNode(type, visitDeclarationSubtree, isTypeNode); + return visitedType ?? makeInvalidTypeAndReport(owner); + } + + function getMemberKey(member:MethodSignature | PropertySignature ) { + if(!isIdentifier(member.name)) { + makeInvalidTypeAndReport(member); + return undefined; + } + return member.name.escapedText; + } + + function collapseLiteralTypesIntoBaseTypes(nodes: LocalTypeInfo[]) { + enum CollapsibleTypes { + None = 0, + String = 1 << 1, + Number = 1 << 2, + True = 1 << 3, + False = 1 << 4, + Boolean = True | False, + BigInt = 1 << 5, + Any = 1 << 7, + ImplicitAny = 1 << 8 + } + let baseTypes = CollapsibleTypes.None; + let literalTypes = CollapsibleTypes.None; + for(const type of nodes) { + switch(type.typeNode.kind) { + case SyntaxKind.TemplateLiteralType: + literalTypes |= CollapsibleTypes.String; + break; + case SyntaxKind.AnyKeyword: + if(type.flags & LocalTypeInfoFlags.Implicit) { + literalTypes |= CollapsibleTypes.ImplicitAny + } else { + baseTypes |= CollapsibleTypes.Any + } + break + case SyntaxKind.BooleanKeyword: + baseTypes |= CollapsibleTypes.Boolean + break; + case SyntaxKind.StringKeyword: + baseTypes |= CollapsibleTypes.String + break; + case SyntaxKind.NumberKeyword: + baseTypes |= CollapsibleTypes.Number; + break; + case SyntaxKind.BigIntKeyword: + baseTypes |= CollapsibleTypes.BigInt; + break; + case SyntaxKind.LiteralType: + const literalType = type.typeNode as LiteralTypeNode; + switch(literalType.literal.kind) { + case SyntaxKind.TrueKeyword: + literalTypes |= CollapsibleTypes.True; + break; + case SyntaxKind.FalseKeyword: + literalTypes |= CollapsibleTypes.False; + break; + case SyntaxKind.NumericLiteral: + literalTypes |= CollapsibleTypes.Number; + break; + case SyntaxKind.PrefixUnaryExpression: + if((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { + literalTypes |= CollapsibleTypes.Number; + } + break; + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.TemplateExpression: + literalTypes |= CollapsibleTypes.String; + break; + case SyntaxKind.BigIntLiteral: + literalTypes |= CollapsibleTypes.BigInt; + break; + } + } + } + // If true and false are both present, act as if we found boolean itself + if((literalTypes & CollapsibleTypes.Boolean) === CollapsibleTypes.Boolean) { + baseTypes |= CollapsibleTypes.Boolean; + } + const typesToCollapse = baseTypes & literalTypes; + + if(baseTypes & CollapsibleTypes.Any) { + return [factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)] + } + // Nothing to collapse or reorder + if(baseTypes === CollapsibleTypes.None) return nodes.map(n => n.typeNode); + const result: TypeNode[] = []; + + // We do a best effort to preserve TS union order for primitives + if(baseTypes & CollapsibleTypes.String) { + result.push(factory.createKeywordTypeNode(SyntaxKind.StringKeyword)) + } + if(baseTypes & CollapsibleTypes.Number) { + result.push(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)) + } + if(baseTypes & CollapsibleTypes.Boolean) { + result.push(factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword)) + } + if(baseTypes & CollapsibleTypes.BigInt) { + result.push(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword)) + } + if(!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.True) { + result.push(factory.createLiteralTypeNode(factory.createTrue())) + } + if(!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.False) { + result.push(factory.createLiteralTypeNode(factory.createFalse())) + } + + for(const type of nodes) { + let typeofNode = CollapsibleTypes.None + + switch(type.typeNode.kind) { + case SyntaxKind.BooleanKeyword: + case SyntaxKind.StringKeyword: + case SyntaxKind.NumberKeyword: + case SyntaxKind.BigIntKeyword: + case SyntaxKind.AnyKeyword: + // They were already added + continue; + case SyntaxKind.TemplateLiteralType: + typeofNode = CollapsibleTypes.String; + break; + case SyntaxKind.LiteralType: + const literalType = type.typeNode as LiteralTypeNode; + switch(literalType.literal.kind) { + case SyntaxKind.TrueKeyword: + continue; + case SyntaxKind.FalseKeyword: + continue; + case SyntaxKind.NumericLiteral: + typeofNode = CollapsibleTypes.Number; + break; + case SyntaxKind.PrefixUnaryExpression: + if((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { + typeofNode = CollapsibleTypes.Number; + } + break; + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.TemplateExpression: + typeofNode = CollapsibleTypes.String; + break; + case SyntaxKind.BigIntLiteral: + typeofNode = CollapsibleTypes.BigInt; + break; + } + } + // Not a node of interest, do not change + if((typeofNode & typesToCollapse) === 0) { + result.push(type.typeNode); + } + } + return result; + } + function deduplicateUnion(nodes: LocalTypeInfo[]) { + const typeInfoCache = new Map + }> + let union: LocalTypeInfo[] = []; + for(const node of nodes) { + const existing = union.find(u => typesEqual(node.typeNode, u.typeNode)); + if(existing === undefined) { + union.push(node); + } else { + existing.flags &= node.flags; + } + } + return union + + function getTypeInfo(type:TypeLiteralNode) { + const typeNodeId = getNodeId(type); + let typeInfo = typeInfoCache.get(typeNodeId); + if(typeInfo) return typeInfo; + + typeInfo = { + node: type, + members: new Map() + } + for(const member of type.members) { + const isMethod = isMethodSignature(member); + const isProp = isPropertySignature(member); + if(isMethod || isProp) { + const memberKey = getMemberKey(member) + if (memberKey === undefined) { + makeInvalidTypeAndReport(member); + break; + } + typeInfo.members.set(memberKey, member); + } else { + makeInvalidTypeAndReport(member); + } + } + typeInfoCache.set(typeNodeId, typeInfo); + return typeInfo; + } + function typesEqual(a?: TypeNode, b?: TypeNode) { + if (a === undefined || b === undefined) return a === b; + if (a.kind !== b.kind) return false; + switch(a.kind) { + case SyntaxKind.AnyKeyword: + case SyntaxKind.UnknownKeyword: + case SyntaxKind.NumberKeyword: + case SyntaxKind.BigIntKeyword: + case SyntaxKind.ObjectKeyword: + case SyntaxKind.BooleanKeyword: + case SyntaxKind.StringKeyword: + case SyntaxKind.SymbolKeyword: + case SyntaxKind.VoidKeyword: + case SyntaxKind.UndefinedKeyword: + case SyntaxKind.NeverKeyword: + return true; + } + if(isLiteralTypeNode(a) && isLiteralTypeNode(b)) { + let aLiteral = a.literal; + let bLiteral = b.literal; + while(true) { + switch(aLiteral.kind) { + case SyntaxKind.NullKeyword: + case SyntaxKind.TrueKeyword: + case SyntaxKind.FalseKeyword: + return aLiteral.kind === bLiteral.kind; + case SyntaxKind.NumericLiteral: + return aLiteral.kind === bLiteral.kind && +aLiteral.text === +(bLiteral as LiteralExpression).text; + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + return (bLiteral.kind === SyntaxKind.StringLiteral || bLiteral.kind === SyntaxKind.NoSubstitutionTemplateLiteral) + && aLiteral.text === (bLiteral as LiteralExpression).text; + case SyntaxKind.PrefixUnaryExpression: + const aUnary = (aLiteral as PrefixUnaryExpression); + const bUnary = (bLiteral as PrefixUnaryExpression); + if(aUnary.operator !== bUnary.operator) return false; + + aLiteral = aUnary.operand as LiteralExpression; + bLiteral = bUnary.operand as LiteralExpression; + return +aLiteral.text === +bLiteral.text; + default: + return false; + } + } + } + if(isIdentifier(a) && isIdentifier(b)) { + return a.escapedText === b.escapedText; + } + if(isTypeLiteralNode(a) && isTypeLiteralNode(b)) { + if(a.members.length !== b.members.length) return false; + let aTypeInfo = getTypeInfo(a) + if(!aTypeInfo) return false; + + for(const bMember of b.members) { + const bIsMethod = isMethodSignature(bMember); + const bIsProp = isPropertySignature(bMember); + if(bIsMethod || bIsProp) { + const memberKey = getMemberKey(bMember); + if (memberKey === undefined) { + makeInvalidTypeAndReport(bMember); + break; + } + const aMember = aTypeInfo.members.get(memberKey); + if(!aMember) return false; + if((aMember.questionToken !== undefined) !== (bMember.questionToken !== undefined)) return false; + if (getSyntacticModifierFlags(aMember) != getSyntacticModifierFlags(bMember)) return false; + if(bIsProp && isPropertySignature(aMember)) { + if(!typesEqual(aMember.type, bMember.type)) { + return false; + } + } else if(bIsMethod && isMethodSignature(aMember)) { + if(!typesEqual(aMember.type,bMember.type)) { + return false; + } + if(aMember.parameters.length !== b.members.length) { + return false + } + } + } else { + makeInvalidTypeAndReport(bMember); + } + } + return true; + }else { + reportIsolatedDeclarationError(a); + reportIsolatedDeclarationError(b); + } + } + } + function normalizeObjectUnion(nodes: Array) { + const allProps = new Map<__String, Array>(); + const allTypeLookup = new Array | undefined>(); + let hasChanged = false; + for (let i = 0; i< nodes.length; i++) { + const type = nodes[i]; + const typeLookup = new Map<__String, TypeNode>(); + allTypeLookup.push(typeLookup) + + if(!type || !isTypeLiteralNode(type)) continue; + for(const member of type.members){ + const isMethod = isMethodSignature(member); + const isProp = isPropertySignature(member); + if(isMethod || isProp) { + const memberKey = getMemberKey(member); + if(memberKey === undefined) { + nodes[i] = makeInvalidTypeAndReport(member.name) + allTypeLookup[i] = undefined; + hasChanged = true; + break; + } + let type; + if(isProp) { + type = member.type ?? makeInvalidTypeAndReport(member); + } else { + type = factory.createFunctionTypeNode( + member.typeParameters, + member.parameters, + member.type!, + ) + } + let propTypes = allProps.get(memberKey); + if(!propTypes) { + propTypes = new Array(nodes.length); + allProps.set(memberKey, propTypes); + } + propTypes[i] = type; + typeLookup.set(memberKey, type); + } else { + nodes[i] = makeInvalidTypeAndReport(member); + allTypeLookup[i] = undefined; + hasChanged = true; + break; + } + } + } + for(const [, propTypes] of allProps) { + normalizeObjectUnion(propTypes) + } + for(let typeIndex = 0; typeIndex< nodes.length; typeIndex++) { + const type = nodes[typeIndex]; + const props = allTypeLookup[typeIndex]; + if(!type || !isTypeLiteralNode(type) || !props) continue; + + let newMembers: TypeElement[] | undefined = undefined; + for(const [commonProp, propTypes] of allProps) { + const propType = props.get(commonProp); + if(propType) { + if(propType != propTypes[typeIndex]) { + let indexOfProp = findIndex(type.members, e => isPropertySignature(e) && isIdentifier(e.name) && e.name.escapedText === commonProp); + if(indexOfProp !== -1) { + if(newMembers === undefined) { + newMembers = [...type.members]; + } + const existingMember = type.members[indexOfProp] as PropertySignature; + newMembers[indexOfProp] = factory.createPropertySignature( + existingMember.modifiers, + existingMember.name, + existingMember.questionToken, + propTypes[typeIndex] + ); + } + } + } else { + if(newMembers === undefined) { + newMembers = [...type.members]; + } + newMembers.push(factory.createPropertySignature( + /* modifiers */ undefined, + factory.createIdentifier(unescapeLeadingUnderscores(commonProp)), + factory.createToken(SyntaxKind.QuestionToken), + factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), + )) + } + } + if (newMembers) { + hasChanged = true; + nodes[typeIndex] = factory.createTypeLiteralNode(newMembers); + } + } + return hasChanged; + } + function getWidenedType(localTypeInfo: LocalTypeInfo) { + if((localTypeInfo.flags & LocalTypeInfoFlags.Fresh) && isLiteralTypeNode(localTypeInfo.typeNode)) { + const literal = localTypeInfo.typeNode.literal; + return literal.kind === SyntaxKind.StringLiteral ? factory.createKeywordTypeNode(SyntaxKind.StringKeyword) : + literal.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : + literal.kind === SyntaxKind.PrefixUnaryExpression && (literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : + literal.kind === SyntaxKind.BigIntLiteral ? factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword) : + literal.kind === SyntaxKind.TrueKeyword || literal.kind === SyntaxKind.FalseKeyword ? factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword) : + localTypeInfo.typeNode; + } + + return localTypeInfo.typeNode; + } + + function inferReturnType(node: FunctionLikeDeclaration) { + const returnStatements: ReturnStatement[] = []; + if(node.type) { + return regular(visitType(node.type, node)); + } + if(!node.body) { + return regular(makeInvalidTypeAndReport(node)); + } + collectReturnExpressions(node.body, returnStatements); + if(returnStatements.length === 0) { + return regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword)); + } + + let returnStatementInference = returnStatements.map((r) => r.expression? localInference(r.expression, NarrowBehavior.KeepLiterals): regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword))); + returnStatementInference = deduplicateUnion(returnStatementInference) + const unionConstituents = returnStatementInference.length === 1 ? + [getWidenedType(returnStatementInference[0])] : + collapseLiteralTypesIntoBaseTypes(returnStatementInference); + normalizeObjectUnion(unionConstituents); + + return regular(unionConstituents.length === 1? unionConstituents[0]: factory.createUnionTypeNode(unionConstituents)); + + function collectReturnExpressions(node: Node, result: ReturnStatement[]) { + forEachChild(node, child => { + if(isReturnStatement(child)) { + result.push(child) + } + if(isClassLike(child) || isFunctionLike(child)) { + return; + } + collectReturnExpressions(child, result); + }) + } + } + + function localInferenceFromInitializer(node: HasInferredType): TypeNode | undefined { + let typeNode; + if(isParameter(node) && node.initializer) { + typeNode = localInference(node.initializer); + } + if(isVariableDeclaration(node) && node.initializer) { + typeNode = localInference(node.initializer); + } + if(isPropertyDeclaration(node) && node.initializer) { + typeNode = localInference(node.initializer); + } + if(isFunctionDeclaration(node)) { + typeNode = inferReturnType(node); + } + if(isMethodDeclaration(node)) { + typeNode = inferReturnType(node); + } + return typeNode?.typeNode; + } 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) @@ -532,6 +1223,10 @@ export function transformDeclarations(context: TransformationContext) { } if (isolatedDeclarations) { if (type === undefined) { + const localType = localInferenceFromInitializer(node); + if (localType !== undefined) { + return localType; + } reportIsolatedDeclarationError(node); return makeInvalidType(); } diff --git a/external-declarations/src/compiler/emit-host.ts b/external-declarations/src/compiler/emit-host.ts index a94c259cfe838..3fafebcf2a2de 100644 --- a/external-declarations/src/compiler/emit-host.ts +++ b/external-declarations/src/compiler/emit-host.ts @@ -20,7 +20,6 @@ export function createEmitHost(allProjectFiles: string[], tsLibFiles: string[], return { getSourceFiles() { throw new Error("Not needed"); - // return [sourceFile] }, getCompilerOptions, getCurrentDirectory, @@ -54,7 +53,7 @@ export function createEmitHost(allProjectFiles: string[], tsLibFiles: string[], if(!resolvedFile) return undefined; } - if(!projectFileMap.has(resolvedFile)) { + if(!projectFileMap.has(resolvedFile)) { return undefined; } const resolvedDeclarationFile = diff --git a/external-declarations/src/compiler/path-utils.ts b/external-declarations/src/compiler/path-utils.ts index 1e7e8f3e0a0f8..59422a66480af 100644 --- a/external-declarations/src/compiler/path-utils.ts +++ b/external-declarations/src/compiler/path-utils.ts @@ -1075,10 +1075,19 @@ export function isSourceMapFile(f: string) { export function isJSONFile(f: string) { return f.endsWith(Extension.Json); } +export function isTypeScriptFile(f: string) { + return f.endsWith(Extension.Ts) + || f.endsWith(Extension.Mts) + || f.endsWith(Extension.Cts); +} + export function isDeclarationFile(f: string) { return f.endsWith(Extension.Dts) || f.endsWith(Extension.Dmts) - || f.endsWith(Extension.Dcts); + || f.endsWith(Extension.Dcts) + || /\.d\.[A-z]{1,5}\.mts$/.exec(f) + || /\.d\.[A-z]{1,5}\.cts$/.exec(f) + || /\.d\.[A-z]{1,5}\.ts$/.exec(f); } export function isJavaScriptFile(f: string) { return f.endsWith(Extension.Js) diff --git a/external-declarations/src/compiler/transform-file.ts b/external-declarations/src/compiler/transform-file.ts index d119e4330498a..8d9320e49c265 100644 --- a/external-declarations/src/compiler/transform-file.ts +++ b/external-declarations/src/compiler/transform-file.ts @@ -31,7 +31,6 @@ export function transformFile(fileName: string, source: string, allProjectFiles: let result = x(sourceFile); - const printer = ts.createPrinter({ onlyPrintJsDocStyle: true, newLine: options.newLine ?? ts.NewLineKind.CarriageReturnLineFeed, diff --git a/external-declarations/src/test-runner/test-runner-main.ts b/external-declarations/src/test-runner/test-runner-main.ts index 20f6a6b7838fc..88d52e9a66651 100644 --- a/external-declarations/src/test-runner/test-runner-main.ts +++ b/external-declarations/src/test-runner/test-runner-main.ts @@ -33,7 +33,7 @@ if(prefixed) { testVersionFilter = prefixed.groups?.options; } -const rootCasePaths = parsedArgs.rootPaths ?? [ './tests/sources' ] +const rootCasePaths = parsedArgs.rootPaths ?? [ './tests/source' ] const libFolder = parsedArgs.libPath ?? path.join(rootCasePaths[0], "../lib") const filter = parsedArgs.default ? new RegExp(parsedArgs.default) : /.*\.ts/ @@ -101,7 +101,11 @@ async function main() { "// " + r.fileName, r.content ]) - .join(IO.newLine()); + .join(IO.newLine()) + ` +// ================== +// Original test file: ${testFile} +// ` + data.code.split("\n").join(` +// `); if (allTests.length > 5) { writeResults(normalizePath(file).replace("/$now/", historical), resultText); diff --git a/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts b/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts index 5d39f71f97045..d204fbfc5590e 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts @@ -260,8 +260,7 @@ export function compileFiles(host: fakes.CompilerHost, rootFiles: string[] | und } if(host.outputs.some(d => d.file === fileName)) return; host.writeFile(fileName, text, writeByteOrderMark); - // @ts-expect-error We use forceDts emit documented flag - }, undefined, undefined,undefined, true); + }, undefined, undefined,undefined); const postErrors = ts.getPreEmitDiagnostics(program); const longerErrors = lang.length(preErrors) > postErrors.length ? preErrors : postErrors; const shorterErrors = longerErrors === preErrors ? postErrors : preErrors; diff --git a/external-declarations/tests/source/functions.ts b/external-declarations/tests/source/functions.ts index dfbbf4c867322..bc024f0a6bac7 100644 --- a/external-declarations/tests/source/functions.ts +++ b/external-declarations/tests/source/functions.ts @@ -1,4 +1,6 @@ - +export function testDefaultNoType(a: string, b = ""): number { + return 0; +} function test(a: string): number { return 0; diff --git a/external-declarations/tests/source/local-inference/array-literal-const.ts b/external-declarations/tests/source/local-inference/array-literal-const.ts new file mode 100644 index 0000000000000..a9071e49b65d7 --- /dev/null +++ b/external-declarations/tests/source/local-inference/array-literal-const.ts @@ -0,0 +1,9 @@ +// @strict:true,false +export let arr = [1, 2, 3, -1] as const; +export let arr2 = ["1", 2, true, 1] as const; +export let tupleWithNull = [1, null, undefined] as const; +export let arrObjects = [ + { foo: "A", m(): void {} }, + { bar: "B" }, + { bar: { baz: 1} }, +] as const; \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/array-literal-mutable.ts b/external-declarations/tests/source/local-inference/array-literal-mutable.ts new file mode 100644 index 0000000000000..09cccc9d66f38 --- /dev/null +++ b/external-declarations/tests/source/local-inference/array-literal-mutable.ts @@ -0,0 +1,42 @@ +// @strict:false,true +export let normalizedObjectArray = [ + { foo: "" }, + { bar: "" }, + { foo: "" }, + { bar: "" }, + { foo: "" }, + { bar: "" }, + { foo: "" }, + { bar: "" }, +] + +export let simpleObjetArray = [ + {foo : "" }, + {foo : "" }, + {foo : "" }, + {foo : "" }, +] +export let stringLiterals = [ `A` as 'A', 'A' as 'A', 'A' as `A`]; +export let numberLiterals = [ 1 as 1, 2 as 2, 1 as 1, 0x1 as 0x1]; +export let numberLiteralsNeg = [ -1 as -1, -2 as -2, -1 as -1, 0x1 as -0x1]; +export let nulls = [null, null, null]; +export let undefineds = [undefined, undefined, undefined]; +export let empty = [] +export let explicitAny = [1, "2", null as any]; +export let implicitAny = ["1", null]; +export let mixed = ["1", 1, true, null, 2, undefined, "2", false, null] +export let numbers = [1, 2, 3]; +export let numbersNeg = [1, 2, 3, -1, -2, -3, -1, -2]; +export let strings = ["1", "2", "3"]; + +export let arrNestedObjects = [ + { bar: { baz: 1} }, + { bar: { bat: 1} }, +]; + +export let arrObjects = [ + { foo: "A", m(): void {} }, + { bar: "B" }, + { bar: { baz: 1} }, + { bar: { bat: 1} }, +]; \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/class.ts b/external-declarations/tests/source/local-inference/class.ts new file mode 100644 index 0000000000000..e0936c6abf29e --- /dev/null +++ b/external-declarations/tests/source/local-inference/class.ts @@ -0,0 +1,7 @@ +class Test { + method(p: string): number { + return 0; + } +} + +export const test = new Test(); \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/expressions-with-assertions.ts b/external-declarations/tests/source/local-inference/expressions-with-assertions.ts new file mode 100644 index 0000000000000..c93801de649e4 --- /dev/null +++ b/external-declarations/tests/source/local-inference/expressions-with-assertions.ts @@ -0,0 +1,14 @@ +//@fileName: types.ts +export type Type = { foo: T }; +export type UsedAsTypeParameter = { foo: string }; +export type UnUsed = { foo: string }; + +//@fileName: expressions-with-assertions.ts +import type { Type, Unused, UsedAsTypeParameter } from './types' +export let n = 0 + 1 as number; +export let s = "X" + "Y" as string; +export let b = !true as boolean; +export let bn = 10n + 11n as bigint; +export let o = null! as Type; +export let o2 = null! as Type; +export let o3 = null! as Type; diff --git a/external-declarations/tests/source/local-inference/function-expression.ts b/external-declarations/tests/source/local-inference/function-expression.ts new file mode 100644 index 0000000000000..790f2ca1e34a4 --- /dev/null +++ b/external-declarations/tests/source/local-inference/function-expression.ts @@ -0,0 +1,21 @@ +//@fileName: module-for-arrow.ts +export type Used = { foo: string }; +export type UsedAsReturn = { foo: string }; +export type UnUsed = { foo: string }; + +//@fileName: module-for-fn-exp.ts +export type UsedExpr = { foo: string }; +export type UsedAsReturnExpr = { foo: string }; +export type UnUsedExp = { foo: string }; + +//@fileName: functions.ts +import type { Used, UsedAsReturn, UnUsed } from './module-for-arrow' + +export const fnNoParameterTypeWithDefault = (a = 0): number => a; +export const fn = (a: string): number => a.length; +export const fn3 = (a: Used): UsedAsReturn => a.length; + +import type { UsedExpr, UsedAsReturnExpr, UnUsedExp } from './module-for-fn-exp' +export const fnExpr = function (a: string): number { return a.length; }; +export const fn3Expr = function (a: UsedExpr): UsedAsReturnExpr { return a.length; } +export const fnExpNoParameterTypeWithDefault = function (a = 0): number { return a; } \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/literals-as-const.ts b/external-declarations/tests/source/local-inference/literals-as-const.ts new file mode 100644 index 0000000000000..f93e81f69b53a --- /dev/null +++ b/external-declarations/tests/source/local-inference/literals-as-const.ts @@ -0,0 +1,22 @@ +export let n = 0 as const; +export let hex = 0x1 as const; +export let neg = -11 as const; +export const negP = { n: -((11)) } as const; +export const hexNeg = -0x1 as const; +export const hexNegParan = { n: -(((0x1))) } as const; + +export let s = "X" as const; +export let b = true as const; +export let bn = 10n as const; + +export let t0 = `A` as const; +export let t1 = `A${1}` as const; +export let t2 = `A${1 as number}` as const; +export let t3 = `A number=${1 as 1|2} string=${"1" as "1" | "2"} bigint=${1n as 1n | 2n} ` as const; +export let t4 = `A number=${1 as 1|2} mixed=${"1" as "X" | number}` as const; +export let t5 = `A number=${1 as 1|2} mixed=${"1" as "1" | number}` as const; + +export let n2 = 0; +export let s2 = "X"; +export let b2 = true; +export let bn2 = 10n; \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/literals-const.ts b/external-declarations/tests/source/local-inference/literals-const.ts new file mode 100644 index 0000000000000..4a90ae9c72435 --- /dev/null +++ b/external-declarations/tests/source/local-inference/literals-const.ts @@ -0,0 +1,14 @@ +export const n = 0; +export const hex = 0x1; +export const neg = -11; +export const negP = -((11)); +export const hexNeg = -0x1; +export const hexNegParan = -(((0x1))); + +export const s = "X"; +export const b = true; +export const bn = 10n; + +export const t0 = `A`; +export const t1 = `A${1}`; +export const t2 = `A${1 as number}`; diff --git a/external-declarations/tests/source/local-inference/literals.ts b/external-declarations/tests/source/local-inference/literals.ts new file mode 100644 index 0000000000000..182a9395979f1 --- /dev/null +++ b/external-declarations/tests/source/local-inference/literals.ts @@ -0,0 +1,12 @@ +export let n = 0; +export let hex = 0x1; +export let neg = -11; +export let s = "X"; +export let b = true; +export let r = /test/; +export let bn = 10n; + + +export let t0 = `A`; +export let t1 = `A${1}`; +export let t2 = `A${1 + 1}`; \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/new-type.ts b/external-declarations/tests/source/local-inference/new-type.ts new file mode 100644 index 0000000000000..5252b281708c1 --- /dev/null +++ b/external-declarations/tests/source/local-inference/new-type.ts @@ -0,0 +1,2 @@ +//@target:es2022 +let x = new Promise(() => {}); \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/object-generic-methods.ts b/external-declarations/tests/source/local-inference/object-generic-methods.ts new file mode 100644 index 0000000000000..a8a168688fde8 --- /dev/null +++ b/external-declarations/tests/source/local-inference/object-generic-methods.ts @@ -0,0 +1,48 @@ + +//@fileName: test-types.ts +export type UsedAsConstraint = { foo: string }; +export type UsedAsParameter = { foo: string }; +export type UsedAsReturnType = { foo: string }; +export type UsedAsDefault = { foo: string }; +export type Unused = { foo: string }; +export type UsedAsVariableType = { foo: string }; +export type UsedAsConstraintConst = { ro: string }; +export type UsedAsParameterConst = { ro: string }; +export type UsedAsReturnTypeConst = { ro: string }; +export type UsedAsDefaultConst = { ro: string }; +export type UnusedConst = { ro: string }; +export type UsedAsVariableTypeConst = { ro: string }; + +//@fileName: objects.ts +import type { + UsedAsConstraint, + UsedAsParameter, + UsedAsReturnType, + UsedAsDefault, + Unused, + UsedAsVariableType +} from './test-types' + +export let g = { + method(p: T, p2: UsedAsParameter): UsedAsReturnType { + let o: UsedAsVariableType; + return o; + } +} + + +import type { + UsedAsConstraintConst, + UsedAsParameterConst, + UsedAsReturnTypeConst, + UsedAsDefaultConst, + UnusedConst, + UsedAsVariableTypeConst, +} from './test-types' + +export let g = { + method(p: T, p2: UsedAsParameterConst): UsedAsReturnTypeConst { + let o: UsedAsVariableTypeConst; + return o; + } +} as const \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/object-literal.ts b/external-declarations/tests/source/local-inference/object-literal.ts new file mode 100644 index 0000000000000..0dac6945e01d8 --- /dev/null +++ b/external-declarations/tests/source/local-inference/object-literal.ts @@ -0,0 +1,25 @@ +let value: string = "0"; +export let o = { + n: 1, + s: "s", + nested: { + nn: 2 + }, + method(value: number): number { + return value; + } +} + +export let oRo = { + n: 1, + s: "s", + nested: { + nn: 2 + }, + fn:(value: number, defaultValue = 1): string =>{ + return "" + }, + method(value: number): number { + return value; + } +} as const diff --git a/external-declarations/tests/source/local-inference/return-types-function-declarations.ts b/external-declarations/tests/source/local-inference/return-types-function-declarations.ts new file mode 100644 index 0000000000000..36fba2897106a --- /dev/null +++ b/external-declarations/tests/source/local-inference/return-types-function-declarations.ts @@ -0,0 +1,83 @@ +export function returnsStringParenthesized() { + return ((("A"))) +} + +export function returnsFreshString() { + return "A" +} + +export function returnsCollapsibleType() { + if(Math.random()) return "" as string + return "A" as "A" +} + +export function returnFreshLiteralType() { + if(Math.random()) return 1; + if(Math.random()) return 1; + return 1; +} + +export function returnsSingleNegativeNumbers() { + return -1; +} +export function returnsNegativeNumbers() { + if(Math.random()) return 1; + return -1; +} + +export function returnsNegativeNumbersAndString() { + if(Math.random()) return "1" as string; + return -1; +} + +export function returnsNegativeNumbersAndNumber() { + if(Math.random()) return 1 as number; + return -1; +} +export function returnNotFreshLiteralType() { + if(Math.random()) return 1 as 1; + if(Math.random()) return 1; + return 1; +} + + +export function returnNotFreshAndObjects() { + if(Math.random()) return 1 as 1; + if(Math.random()) return 1; + return { foo: 1 }; +} + +export function returnTypeFreshAndObjects() { + if(Math.random()) return 1; + if(Math.random()) return 1; + return { foo: 1 }; +} + +export function returnsNumber() { + return 1 +} + +export function returnsObject() { + return { + foo: "" + }; +} + +export function returnsObjectUnion() { + if(Math.random() > 0) { + return { + foo: "", + bar: 1 + }; + } + return { + foo: "" + }; +} + +export function returnsUnionPrimitive() { + if(Math.random() > 0) { + return "A"; + } + return "B"; +} diff --git a/external-declarations/tests/source/local-inference/return-types-function-expressions.ts b/external-declarations/tests/source/local-inference/return-types-function-expressions.ts new file mode 100644 index 0000000000000..bc8ba2c0d24dc --- /dev/null +++ b/external-declarations/tests/source/local-inference/return-types-function-expressions.ts @@ -0,0 +1,66 @@ +export let returnsStringParenthesized = () => { + return ((("A"))) +} + +export let returnsNumber = () => { + return 1 +} + +export let returnsObject = () => { + return { + foo: "" + }; +} + +export let returnsObjectUnion = () => { + if(Math.random() > 0) { + return { + foo: "", + bar: 1, + }; + } + return { + foo: "" + }; +} + +export let returnsUnionPrimitive = () => { + if(Math.random() > 0) { + return "A"; + } + return "B"; +} + + +export let returnsStringFn = function () { + return "A" +} + +export let returnsNumberFn = function () { + return 1 +} + +export let returnsObjectFn = function () { + return { + foo: "" + }; +} + +export let returnsObjectUnionFn = function () { + if(Math.random() > 0) { + return { + foo: "", + bar: 1 + }; + } + return { + foo: "" + }; +} + +export let returnsUnionPrimitiveFn = function () { + if(Math.random() > 0) { + return "A"; + } + return "B"; +} diff --git a/external-declarations/tests/source/local-inference/return-types-methods.ts b/external-declarations/tests/source/local-inference/return-types-methods.ts new file mode 100644 index 0000000000000..a49a904592522 --- /dev/null +++ b/external-declarations/tests/source/local-inference/return-types-methods.ts @@ -0,0 +1,34 @@ +export class WithMethods { + returnsStringParenthesized() { + return ((("A"))) + } + + returnsNumber() { + return 1 + } + + returnsObject() { + return { + foo: "" + }; + } + + returnsObjectUnion() { + if(Math.random() > 0) { + return { + foo: "", + bar: 1, + }; + } + return { + foo: "" + }; + } + + returnsUnionPrimitive() { + if(Math.random() > 0) { + return "A"; + } + return "B"; + } +} \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/typeof-var.ts b/external-declarations/tests/source/local-inference/typeof-var.ts new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/external-declarations/tests/source/local-inference/union-collapse.ts b/external-declarations/tests/source/local-inference/union-collapse.ts new file mode 100644 index 0000000000000..e0decddb1a6ab --- /dev/null +++ b/external-declarations/tests/source/local-inference/union-collapse.ts @@ -0,0 +1,53 @@ +//@nolib:true + +//@fileName: lib.d.ts + +interface Object { type: "object" } +interface String { type: "string" } +interface BigInt { type: "bigint" } +interface Number { type: "number" } +interface Boolean { type: "boolean" } +interface Function { type: "function" } +interface Array { type: "array" } + +//@fileName: unions.ts +export let arrStrings3 = [`A` as `A`, `B` as `B`]; +export let arrStrings0 = ["", "A" as "A"]; +export let arrStrings1 = ["A" as "A", ""]; +export let arrStrings2 = [`A` as `A`, ""]; +export let arrStrings4 = [`A` as `B${number}`, `E`]; +export let arrStrings5 = [`A` as `A`, `B` as `B`, 'C' as const, 'D' as const, "", 'E' as const, 'F' as const]; +export let arrStrings6 = [`A` as `B${number}`, `G` as const]; + +export let arrBooleans1 = [true as const, false]; +export let arrBooleans2 = [false, true as const]; +export let arrBooleans3 = [false as const, true as const]; + + + +export let arrNumber1 = [1 as const, 0]; +export let arrNumber2 = [0, 1 as const]; +export let arrNumber3 = [1 as const, 2 as const]; +export let arrNumber4 = [1 as const, 2 as const, 3 as const, 0, 4 as const, 5 as const]; + + +export let arrBigInt1 = [1n as const, 0n]; +export let arrBigInt2 = [0n, 1n as const]; +export let arrBigInt3 = [1n as const, 2n as const]; + + +export let arrMixed1 = [false as const, true as const, 0 as const]; +export let arrMixed2 = [false as const, true as const, 0 as const, 1]; +export let arrMixed3 = [false as const, true as const, 0 as const, 1 as const]; +export let arrMixed4 = [false as const, true as const, "A" as const, 1 as const]; +export let arrMixed5 = [false as const, true as const, "A" as const, 1 as const, ""]; +export let arrMixed6 = [true as const, "A" as const, 1 as const, "", 0]; +export let arrMixed7 = [true as const, "A" as const, 1 as const, "", 0, 1n as const]; +export let arrMixed8 = [true as const, 2n, "A" as const, 1 as const, "", 0, 1n as const]; + +export let unionOrder1 = [0, ""] +export let unionOrder2 = ["", 0] +export let unionOrder3 = ["", { foo: 0}, 0] +export let unionOrder4 = [{ foo: 0}, 0, "", 0] +export let unionOrder5 = [{ foo: 0}, 0, "", 0, true as const] +export let unionOrder6 = [{ foo: 0}, 0, "", 0, 1n, true as const] \ No newline at end of file diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 0709e86518d31..f2ccfab28b21b 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -228,6 +228,20 @@ import { } from "../_namespaces/ts"; import * as moduleSpecifiers from "../_namespaces/ts.moduleSpecifiers"; + +enum NarrowBehavior { + None = 0, + AsConst = 1, + KeepLiterals = 2, + NotKeepLiterals = ~KeepLiterals, +} + +enum LocalTypeInfoFlags { + None = 0, + Fresh = 1 << 0, + Implicit = 1<< 1 +} + /** @internal */ export function getDeclarationDiagnostics(host: EmitHost, resolver: EmitResolver, file: SourceFile | undefined): DiagnosticWithLocation[] | undefined { const compilerOptions = host.getCompilerOptions(); @@ -324,6 +338,7 @@ export function transformDeclarations(context: TransformationContext) { const options = context.getCompilerOptions(); const { noResolve, stripInternal } = options; const isolatedDeclarations = options.isolatedDeclarations; + const strictNullChecks = !!options.strict || !!options.strictNullChecks; return transformRoot; function reportIsolatedDeclarationError(node: Node) { @@ -713,7 +728,7 @@ export function transformDeclarations(context: TransformationContext) { } if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) // TODO: isolated declarations: find a better way for this since we don't actually do signature usage analysis - && !isolatedDeclarations&& !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { + && !isolatedDeclarations && !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { // Unnecessary property renaming is forbidden in types, so remove renaming return factory.updateBindingElement( elem, @@ -781,7 +796,678 @@ export function transformDeclarations(context: TransformationContext) { | ParameterDeclaration | PropertyDeclaration | PropertySignature; + function makeInvalidType() { + return factory.createTypeReferenceNode("invalid"); + } + + type LocalTypeInfo = { typeNode: TypeNode, flags: LocalTypeInfoFlags }; + + function localInference(node: Node, isConstContext: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { + const nextIsConst = isConstContext & NarrowBehavior.NotKeepLiterals; + switch(node.kind) { + case SyntaxKind.ParenthesizedExpression: + return regular(getWidenedType(localInference((node as ParenthesizedExpression).expression, isConstContext))); + case SyntaxKind.Identifier: + if((node as Identifier).escapedText === "undefined") { + if(strictNullChecks) { + return regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword)); + } else { + return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), LocalTypeInfoFlags.Implicit); + } + } + case SyntaxKind.NullKeyword: + if(strictNullChecks) { + return regular(factory.createLiteralTypeNode(factory.createNull())); + } else { + return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), LocalTypeInfoFlags.Implicit); + } + case SyntaxKind.NewExpression: + const newExpr = node as NewExpression; + if(isIdentifier(newExpr.expression)) { + // to do: isolated declarations : Add check for type arguments. + const typeNode = factory.createTypeReferenceNode( + visitNode(newExpr.expression, visitDeclarationSubtree, isIdentifier)!, + visitNodes(newExpr.typeArguments, visitDeclarationSubtree, isTypeNode) + ); + return regular(visitNode(typeNode, visitDeclarationSubtree, isTypeNode) ?? + makeInvalidTypeAndReport(node)); + } + return regular(makeInvalidTypeAndReport(node)); + case SyntaxKind.ArrowFunction: + case SyntaxKind.FunctionExpression: + const fnNode = node as FunctionExpression | ArrowFunction; + return regular(factory.createFunctionTypeNode( + visitNodes(fnNode.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), + fnNode.parameters.map(p => ensureParameter(p)), + inferReturnType(fnNode).typeNode, + )) + case SyntaxKind.TypeAssertionExpression: + case SyntaxKind.AsExpression: + const asExpression = node as AsExpression | TypeAssertion; + if(isTypeReferenceNode(asExpression.type) && isConst(asExpression.type)) { + return localInference(asExpression.expression, NarrowBehavior.AsConst); + } else { + const type = visitType(asExpression.type, asExpression); + if(isLiteralTypeNode(type) && + (isNoSubstitutionTemplateLiteral(type.literal) || isStringLiteral(type.literal))) { + return regular(factory.createLiteralTypeNode( + normalizeLiteralValue(type.literal) + )); + } + return regular(type); + } + case SyntaxKind.PrefixUnaryExpression: + const prefixOp = node as PrefixUnaryExpression; + if(prefixOp.operator === SyntaxKind.MinusToken) { + const {typeNode: targetExpressionType, flags } = localInference(prefixOp.operand, isConstContext); + if(isLiteralTypeNode(targetExpressionType) && isNumericLiteral(targetExpressionType.literal)) { + return { + flags, + typeNode: factory.createLiteralTypeNode(factory.createPrefixMinus(targetExpressionType.literal)) + } + } else if(targetExpressionType.kind === SyntaxKind.NumberKeyword) { + return { typeNode: targetExpressionType, flags }; + } + } + break; + case SyntaxKind.NumericLiteral: + return literal(node, SyntaxKind.NumberKeyword, isConstContext); + case SyntaxKind.TemplateExpression: + if(!isConstContext) { + return literal(node, SyntaxKind.StringKeyword, isConstContext) + } + const templateExpression = node as TemplateExpression; + const templateSpans: TemplateLiteralTypeSpan[] = [] + let head = factory.createTemplateHead(templateExpression.head.text); + let prevSpan: TemplateHead | TemplateLiteralTypeSpan = head; + for(const span of templateExpression.templateSpans) { + const {typeNode} = localInference(span.expression, nextIsConst); + if(isLiteralTypeNode(typeNode)) { + let oldText = prevSpan.kind === SyntaxKind.TemplateHead ? prevSpan.text : prevSpan.literal.text; + let newText= oldText; + } else { + const literalSpan = factory.createTemplateLiteralTypeSpan( + typeNode, + span.literal + ); + prevSpan = literalSpan; + templateSpans.push(literalSpan); + } + + } + return regular(factory.createTemplateLiteralType(templateExpression.head, templateSpans)); + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.StringLiteral: + return literal(node, SyntaxKind.StringKeyword, isConstContext); + case SyntaxKind.BigIntLiteral: + return literal(node, SyntaxKind.BigIntKeyword, isConstContext); + case SyntaxKind.RegularExpressionLiteral: + return literal(node, "RegExp", isConstContext); + case SyntaxKind.TrueKeyword: + case SyntaxKind.FalseKeyword: + return literal(node, SyntaxKind.BooleanKeyword, isConstContext); + case SyntaxKind.ArrayLiteralExpression: + const arrayLiteral = node as ArrayLiteralExpression + const elementTypesInfo: LocalTypeInfo[] = [] + for(const element of arrayLiteral.elements) { + elementTypesInfo.push( + localInference(element, nextIsConst) + ) + } + if(isConstContext & NarrowBehavior.AsConst) { + const tupleType = factory.createTupleTypeNode( + elementTypesInfo.map(lti => lti.typeNode) + ); + tupleType.emitNode = { flags: 1 }; + return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType)); + } else { + let elementTypes = deduplicateUnion(elementTypesInfo); + let simplifiedUnion = collapseLiteralTypesIntoBaseTypes(elementTypes); + normalizeObjectUnion(simplifiedUnion); + let itemType; + if(simplifiedUnion.length === 0) { + itemType = (strictNullChecks ? factory.createKeywordTypeNode(SyntaxKind.NeverKeyword) : factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)); + } else { + itemType = simplifiedUnion.length === 1? simplifiedUnion[0]: factory.createUnionTypeNode(simplifiedUnion); + } + + return regular(factory.createArrayTypeNode(itemType)); + } + case SyntaxKind.ObjectLiteralExpression: + const objectLiteral = node as ObjectLiteralExpression + const properties: TypeElement[] = [] + for(const prop of objectLiteral.properties) { + if(isMethodDeclaration(prop)) { + if (isConstContext & NarrowBehavior.AsConst) { + properties.push(factory.createPropertySignature( + [factory.createModifier(SyntaxKind.ReadonlyKeyword)], + visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!, + undefined, + factory.createFunctionTypeNode( + visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), + prop.parameters.map(p => ensureParameter(p)), + visitType(prop.type, prop), + ) + )); + } + else { + properties.push(factory.createMethodSignature( + [], + visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!, + prop.questionToken, + visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), + prop.parameters.map(p => ensureParameter(p)), + visitType(prop.type, prop), + )) + } + } + else if(isPropertyAssignment(prop)) { + const modifiers = isConstContext & NarrowBehavior.AsConst ? + [factory.createModifier(SyntaxKind.ReadonlyKeyword)]: + []; + properties.push(factory.createPropertySignature( + modifiers, + visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!, + undefined, + localInference(prop.initializer, nextIsConst).typeNode + )) + } else { + return regular(makeInvalidTypeAndReport(prop)); + } + } + return regular(factory.createTypeLiteralNode( + properties + )) + } + + return regular(makeInvalidTypeAndReport(node)); + } + function fresh(typeNode: TypeNode, flags = LocalTypeInfoFlags.None) { + return { typeNode, flags: flags | LocalTypeInfoFlags.Fresh } + } + function regular(typeNode: TypeNode, flags = LocalTypeInfoFlags.None) { + return { typeNode, flags } + } + function normalizeLiteralValue(literal: LiteralExpression) { + switch(literal.kind) { + case SyntaxKind.BigIntLiteral: + case SyntaxKind.TrueKeyword: + case SyntaxKind.FalseKeyword: + return 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 literal(node: Node, baseType: string | KeywordTypeSyntaxKind, narrowBehavior: NarrowBehavior) { + if(narrowBehavior) { + return fresh(factory.createLiteralTypeNode( + normalizeLiteralValue(node as LiteralExpression) + )) + } else { + return fresh(typeof baseType === "number" ? + factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType)); + } + } + function isConst(typeReference: TypeReferenceNode) { + return isIdentifier(typeReference.typeName) && typeReference.typeName.escapedText === "const"; + } + function makeInvalidTypeAndReport(node: Node) { + reportIsolatedDeclarationError(node); + return makeInvalidType(); + } + function visitType(type: TypeNode | undefined, owner: Node) { + const visitedType = visitNode(type, visitDeclarationSubtree, isTypeNode); + return visitedType ?? makeInvalidTypeAndReport(owner); + } + + function getMemberKey(member:MethodSignature | PropertySignature ) { + if(!isIdentifier(member.name)) { + makeInvalidTypeAndReport(member); + return undefined; + } + return member.name.escapedText; + } + + function collapseLiteralTypesIntoBaseTypes(nodes: LocalTypeInfo[]) { + enum CollapsibleTypes { + None = 0, + String = 1 << 1, + Number = 1 << 2, + True = 1 << 3, + False = 1 << 4, + Boolean = True | False, + BigInt = 1 << 5, + Any = 1 << 7, + ImplicitAny = 1 << 8 + } + let baseTypes = CollapsibleTypes.None; + let literalTypes = CollapsibleTypes.None; + for(const type of nodes) { + switch(type.typeNode.kind) { + case SyntaxKind.TemplateLiteralType: + literalTypes |= CollapsibleTypes.String; + break; + case SyntaxKind.AnyKeyword: + if(type.flags & LocalTypeInfoFlags.Implicit) { + literalTypes |= CollapsibleTypes.ImplicitAny + } else { + baseTypes |= CollapsibleTypes.Any + } + break + case SyntaxKind.BooleanKeyword: + baseTypes |= CollapsibleTypes.Boolean + break; + case SyntaxKind.StringKeyword: + baseTypes |= CollapsibleTypes.String + break; + case SyntaxKind.NumberKeyword: + baseTypes |= CollapsibleTypes.Number; + break; + case SyntaxKind.BigIntKeyword: + baseTypes |= CollapsibleTypes.BigInt; + break; + case SyntaxKind.LiteralType: + const literalType = type.typeNode as LiteralTypeNode; + switch(literalType.literal.kind) { + case SyntaxKind.TrueKeyword: + literalTypes |= CollapsibleTypes.True; + break; + case SyntaxKind.FalseKeyword: + literalTypes |= CollapsibleTypes.False; + break; + case SyntaxKind.NumericLiteral: + literalTypes |= CollapsibleTypes.Number; + break; + case SyntaxKind.PrefixUnaryExpression: + if((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { + literalTypes |= CollapsibleTypes.Number; + } + break; + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.TemplateExpression: + literalTypes |= CollapsibleTypes.String; + break; + case SyntaxKind.BigIntLiteral: + literalTypes |= CollapsibleTypes.BigInt; + break; + } + } + } + // If true and false are both present, act as if we found boolean itself + if((literalTypes & CollapsibleTypes.Boolean) === CollapsibleTypes.Boolean) { + baseTypes |= CollapsibleTypes.Boolean; + } + const typesToCollapse = baseTypes & literalTypes; + + if(baseTypes & CollapsibleTypes.Any) { + return [factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)] + } + // Nothing to collapse or reorder + if(baseTypes === CollapsibleTypes.None) return nodes.map(n => n.typeNode); + const result: TypeNode[] = []; + + // We do a best effort to preserve TS union order for primitives + if(baseTypes & CollapsibleTypes.String) { + result.push(factory.createKeywordTypeNode(SyntaxKind.StringKeyword)) + } + if(baseTypes & CollapsibleTypes.Number) { + result.push(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)) + } + if(baseTypes & CollapsibleTypes.Boolean) { + result.push(factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword)) + } + if(baseTypes & CollapsibleTypes.BigInt) { + result.push(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword)) + } + if(!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.True) { + result.push(factory.createLiteralTypeNode(factory.createTrue())) + } + if(!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.False) { + result.push(factory.createLiteralTypeNode(factory.createFalse())) + } + + for(const type of nodes) { + let typeofNode = CollapsibleTypes.None + + switch(type.typeNode.kind) { + case SyntaxKind.BooleanKeyword: + case SyntaxKind.StringKeyword: + case SyntaxKind.NumberKeyword: + case SyntaxKind.BigIntKeyword: + case SyntaxKind.AnyKeyword: + // They were already added + continue; + case SyntaxKind.TemplateLiteralType: + typeofNode = CollapsibleTypes.String; + break; + case SyntaxKind.LiteralType: + const literalType = type.typeNode as LiteralTypeNode; + switch(literalType.literal.kind) { + case SyntaxKind.TrueKeyword: + continue; + case SyntaxKind.FalseKeyword: + continue; + case SyntaxKind.NumericLiteral: + typeofNode = CollapsibleTypes.Number; + break; + case SyntaxKind.PrefixUnaryExpression: + if((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { + typeofNode = CollapsibleTypes.Number; + } + break; + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.TemplateExpression: + typeofNode = CollapsibleTypes.String; + break; + case SyntaxKind.BigIntLiteral: + typeofNode = CollapsibleTypes.BigInt; + break; + } + } + // Not a node of interest, do not change + if((typeofNode & typesToCollapse) === 0) { + result.push(type.typeNode); + } + } + return result; + } + function deduplicateUnion(nodes: LocalTypeInfo[]) { + const typeInfoCache = new Map + }> + let union: LocalTypeInfo[] = []; + for(const node of nodes) { + const existing = union.find(u => typesEqual(node.typeNode, u.typeNode)); + if(existing === undefined) { + union.push(node); + } else { + existing.flags &= node.flags; + } + } + return union + + function getTypeInfo(type:TypeLiteralNode) { + const typeNodeId = getNodeId(type); + let typeInfo = typeInfoCache.get(typeNodeId); + if(typeInfo) return typeInfo; + + typeInfo = { + node: type, + members: new Map() + } + for(const member of type.members) { + const isMethod = isMethodSignature(member); + const isProp = isPropertySignature(member); + if(isMethod || isProp) { + const memberKey = getMemberKey(member) + if (memberKey === undefined) { + makeInvalidTypeAndReport(member); + break; + } + typeInfo.members.set(memberKey, member); + } else { + makeInvalidTypeAndReport(member); + } + } + typeInfoCache.set(typeNodeId, typeInfo); + return typeInfo; + } + function typesEqual(a?: TypeNode, b?: TypeNode) { + if (a === undefined || b === undefined) return a === b; + if (a.kind !== b.kind) return false; + switch(a.kind) { + case SyntaxKind.AnyKeyword: + case SyntaxKind.UnknownKeyword: + case SyntaxKind.NumberKeyword: + case SyntaxKind.BigIntKeyword: + case SyntaxKind.ObjectKeyword: + case SyntaxKind.BooleanKeyword: + case SyntaxKind.StringKeyword: + case SyntaxKind.SymbolKeyword: + case SyntaxKind.VoidKeyword: + case SyntaxKind.UndefinedKeyword: + case SyntaxKind.NeverKeyword: + return true; + } + if(isLiteralTypeNode(a) && isLiteralTypeNode(b)) { + let aLiteral = a.literal; + let bLiteral = b.literal; + while(true) { + switch(aLiteral.kind) { + case SyntaxKind.NullKeyword: + case SyntaxKind.TrueKeyword: + case SyntaxKind.FalseKeyword: + return aLiteral.kind === bLiteral.kind; + case SyntaxKind.NumericLiteral: + return aLiteral.kind === bLiteral.kind && +aLiteral.text === +(bLiteral as LiteralExpression).text; + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + return (bLiteral.kind === SyntaxKind.StringLiteral || bLiteral.kind === SyntaxKind.NoSubstitutionTemplateLiteral) + && aLiteral.text === (bLiteral as LiteralExpression).text; + case SyntaxKind.PrefixUnaryExpression: + const aUnary = (aLiteral as PrefixUnaryExpression); + const bUnary = (bLiteral as PrefixUnaryExpression); + if(aUnary.operator !== bUnary.operator) return false; + + aLiteral = aUnary.operand as LiteralExpression; + bLiteral = bUnary.operand as LiteralExpression; + return +aLiteral.text === +bLiteral.text; + default: + return false; + } + } + } + if(isIdentifier(a) && isIdentifier(b)) { + return a.escapedText === b.escapedText; + } + if(isTypeLiteralNode(a) && isTypeLiteralNode(b)) { + if(a.members.length !== b.members.length) return false; + let aTypeInfo = getTypeInfo(a) + if(!aTypeInfo) return false; + + for(const bMember of b.members) { + const bIsMethod = isMethodSignature(bMember); + const bIsProp = isPropertySignature(bMember); + if(bIsMethod || bIsProp) { + const memberKey = getMemberKey(bMember); + if (memberKey === undefined) { + makeInvalidTypeAndReport(bMember); + break; + } + const aMember = aTypeInfo.members.get(memberKey); + if(!aMember) return false; + if((aMember.questionToken !== undefined) !== (bMember.questionToken !== undefined)) return false; + if (getSyntacticModifierFlags(aMember) != getSyntacticModifierFlags(bMember)) return false; + if(bIsProp && isPropertySignature(aMember)) { + if(!typesEqual(aMember.type, bMember.type)) { + return false; + } + } else if(bIsMethod && isMethodSignature(aMember)) { + if(!typesEqual(aMember.type,bMember.type)) { + return false; + } + if(aMember.parameters.length !== b.members.length) { + return false + } + } + } else { + makeInvalidTypeAndReport(bMember); + } + } + return true; + }else { + reportIsolatedDeclarationError(a); + reportIsolatedDeclarationError(b); + } + } + } + function normalizeObjectUnion(nodes: Array) { + const allProps = new Map<__String, Array>(); + const allTypeLookup = new Array | undefined>(); + let hasChanged = false; + for (let i = 0; i< nodes.length; i++) { + const type = nodes[i]; + const typeLookup = new Map<__String, TypeNode>(); + allTypeLookup.push(typeLookup) + + if(!type || !isTypeLiteralNode(type)) continue; + for(const member of type.members){ + const isMethod = isMethodSignature(member); + const isProp = isPropertySignature(member); + if(isMethod || isProp) { + const memberKey = getMemberKey(member); + if(memberKey === undefined) { + nodes[i] = makeInvalidTypeAndReport(member.name) + allTypeLookup[i] = undefined; + hasChanged = true; + break; + } + let type; + if(isProp) { + type = member.type ?? makeInvalidTypeAndReport(member); + } else { + type = factory.createFunctionTypeNode( + member.typeParameters, + member.parameters, + member.type!, + ) + } + let propTypes = allProps.get(memberKey); + if(!propTypes) { + propTypes = new Array(nodes.length); + allProps.set(memberKey, propTypes); + } + propTypes[i] = type; + typeLookup.set(memberKey, type); + } else { + nodes[i] = makeInvalidTypeAndReport(member); + allTypeLookup[i] = undefined; + hasChanged = true; + break; + } + } + } + for(const [, propTypes] of allProps) { + normalizeObjectUnion(propTypes) + } + for(let typeIndex = 0; typeIndex< nodes.length; typeIndex++) { + const type = nodes[typeIndex]; + const props = allTypeLookup[typeIndex]; + if(!type || !isTypeLiteralNode(type) || !props) continue; + + let newMembers: TypeElement[] | undefined = undefined; + for(const [commonProp, propTypes] of allProps) { + const propType = props.get(commonProp); + if(propType) { + if(propType != propTypes[typeIndex]) { + let indexOfProp = findIndex(type.members, e => isPropertySignature(e) && isIdentifier(e.name) && e.name.escapedText === commonProp); + if(indexOfProp !== -1) { + if(newMembers === undefined) { + newMembers = [...type.members]; + } + const existingMember = type.members[indexOfProp] as PropertySignature; + newMembers[indexOfProp] = factory.createPropertySignature( + existingMember.modifiers, + existingMember.name, + existingMember.questionToken, + propTypes[typeIndex] + ); + } + } + } else { + if(newMembers === undefined) { + newMembers = [...type.members]; + } + newMembers.push(factory.createPropertySignature( + /* modifiers */ undefined, + factory.createIdentifier(unescapeLeadingUnderscores(commonProp)), + factory.createToken(SyntaxKind.QuestionToken), + factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), + )) + } + } + if (newMembers) { + hasChanged = true; + nodes[typeIndex] = factory.createTypeLiteralNode(newMembers); + } + } + return hasChanged; + } + function getWidenedType(localTypeInfo: LocalTypeInfo) { + if((localTypeInfo.flags & LocalTypeInfoFlags.Fresh) && isLiteralTypeNode(localTypeInfo.typeNode)) { + const literal = localTypeInfo.typeNode.literal; + return literal.kind === SyntaxKind.StringLiteral ? factory.createKeywordTypeNode(SyntaxKind.StringKeyword) : + literal.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : + literal.kind === SyntaxKind.PrefixUnaryExpression && (literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : + literal.kind === SyntaxKind.BigIntLiteral ? factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword) : + literal.kind === SyntaxKind.TrueKeyword || literal.kind === SyntaxKind.FalseKeyword ? factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword) : + localTypeInfo.typeNode; + } + + return localTypeInfo.typeNode; + } + + function inferReturnType(node: FunctionLikeDeclaration) { + const returnStatements: ReturnStatement[] = []; + if(node.type) { + return regular(visitType(node.type, node)); + } + if(!node.body) { + return regular(makeInvalidTypeAndReport(node)); + } + collectReturnExpressions(node.body, returnStatements); + if(returnStatements.length === 0) { + return regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword)); + } + + let returnStatementInference = returnStatements.map((r) => r.expression? localInference(r.expression, NarrowBehavior.KeepLiterals): regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword))); + returnStatementInference = deduplicateUnion(returnStatementInference) + const unionConstituents = returnStatementInference.length === 1 ? + [getWidenedType(returnStatementInference[0])] : + collapseLiteralTypesIntoBaseTypes(returnStatementInference); + normalizeObjectUnion(unionConstituents); + return regular(unionConstituents.length === 1? unionConstituents[0]: factory.createUnionTypeNode(unionConstituents)); + + function collectReturnExpressions(node: Node, result: ReturnStatement[]) { + forEachChild(node, child => { + if(isReturnStatement(child)) { + result.push(child) + } + if(isClassLike(child) || isFunctionLike(child)) { + return; + } + collectReturnExpressions(child, result); + }) + } + } + + function localInferenceFromInitializer(node: HasInferredType): TypeNode | undefined { + let typeNode; + if(isParameter(node) && node.initializer) { + typeNode = localInference(node.initializer); + } + if(isVariableDeclaration(node) && node.initializer) { + typeNode = localInference(node.initializer); + } + if(isPropertyDeclaration(node) && node.initializer) { + typeNode = localInference(node.initializer); + } + if(isFunctionDeclaration(node)) { + typeNode = inferReturnType(node); + } + if(isMethodDeclaration(node)) { + typeNode = inferReturnType(node); + } + return typeNode?.typeNode; + } 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) @@ -793,8 +1479,12 @@ export function transformDeclarations(context: TransformationContext) { } if (isolatedDeclarations) { if (type === undefined) { + const localType = localInferenceFromInitializer(node); + if (localType !== undefined) { + return localType; + } reportIsolatedDeclarationError(node); - return factory.createTypeReferenceNode("invalid"); + return makeInvalidType(); } return visitNode(type, visitDeclarationSubtree, isTypeNode); } @@ -1433,8 +2123,8 @@ export function transformDeclarations(context: TransformationContext) { if (isolatedDeclarations) { reportIsolatedDeclarationError(input); } - const type = isolatedDeclarations ? - factory.createTypeReferenceNode("invalid") : + const type = isolatedDeclarations ? + makeInvalidType() : resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker); const varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, type, /*initializer*/ undefined); errorFallbackNode = undefined; @@ -1812,7 +2502,7 @@ export function transformDeclarations(context: TransformationContext) { return m; } // Rewrite enum values to their constants, if available - const constValue = resolver.getConstantValue(m); + const constValue = isolatedDeclarations? undefined : resolver.getConstantValue(m); return preserveJsDoc(factory.updateEnumMember(m, m.name, constValue !== undefined ? typeof constValue === "string" ? factory.createStringLiteral(constValue) : factory.createNumericLiteral(constValue) : undefined), m); })))); } From 1cb81c96901bfa30ed956cf2af87dc97946ab856 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 9 May 2023 15:12:53 +0100 Subject: [PATCH 008/224] Fixed duplicate named test file. --- .../esDecorators-classDeclaration-setFunctionName.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {} From ae679bf14aab258523d785db4a256b640d7d7bc7 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 10 May 2023 17:46:15 +0100 Subject: [PATCH 009/224] Local inference improvements and transform test fixes. --- .../src/code-mod/test-updater.ts | 37 +++- .../src/compiler/declaration-emit.ts | 146 +++++++++------- src/compiler/transformers/declarations.ts | 163 ++++++++++++------ 3 files changed, 231 insertions(+), 115 deletions(-) diff --git a/external-declarations/src/code-mod/test-updater.ts b/external-declarations/src/code-mod/test-updater.ts index 88418c2d68dad..3257365bb4daa 100644 --- a/external-declarations/src/code-mod/test-updater.ts +++ b/external-declarations/src/code-mod/test-updater.ts @@ -86,17 +86,31 @@ async function main() { }); await writeTestCase(caseData, testFile.replace(rootPath, "./tsc-tests/original-tests")) - - const result = compileFiles(toBeCompiled, [], { - declaration: "true", - isolatedDeclarations: "true", - removeComments: "false", - }, settings, undefined); + const updatedTestFileName = testFile.replace(rootPath, "./tsc-tests/updated-tests"); + const result = (() => { + try { + return compileFiles(toBeCompiled, [], { + declaration: "true", + isolatedDeclarations: "true", + removeComments: "false", + }, settings, undefined); + } catch(e) { + return e as Error; + } + })(); + if(result instanceof Error) { + fs.writeFile(updatedTestFileName, ` +================= CODE MOD ERROR ============== +${result.message} +${result.stack} +`); + continue; + } const program = result.program!; - for(const testFileContent of caseData.testUnitData) { + for(const testFileContent of caseData.testUnitData) { if(!isRelevantTestFile(testFileContent)) continue; try { const sourceFile = program.getSourceFile(testFileContent.name)!; @@ -130,10 +144,15 @@ async function main() { testFileContent.content = resultStr; }catch(e) { console.log(`Test ${testFile} failed to transform`) - process.exit(); + testFileContent.content = ` +================= CODE MOD ERROR ============== +${e.message} +${e.stack} +`; + debugger; } } - await writeTestCase(caseData, testFile.replace(rootPath, "./tsc-tests/updated-tests")) + await writeTestCase(caseData, updatedTestFileName) console.log(`Ran: ${count}`); } } diff --git a/external-declarations/src/compiler/declaration-emit.ts b/external-declarations/src/compiler/declaration-emit.ts index a0e43367f0c42..f13b7ed2d36e4 100644 --- a/external-declarations/src/compiler/declaration-emit.ts +++ b/external-declarations/src/compiler/declaration-emit.ts @@ -25,7 +25,8 @@ enum NarrowBehavior { enum LocalTypeInfoFlags { None = 0, Fresh = 1 << 0, - Implicit = 1<< 1 + Implicit = 1<< 1, + Invalid = 1<<2, } /** @internal */ @@ -52,10 +53,10 @@ export function isInternalDeclaration(node: Node, currentSourceFile: SourceFile) // to handle // ... parameters, /** @internal */ // public param: string - getTrailingCommentRanges(text, skipTrivia(text, previousSibling.end + 1, /* stopAfterLineBreak */ false, /* stopAtComments */ true)), + getTrailingCommentRanges(text, skipTrivia(text, previousSibling.end + 1, /*stopAfterLineBreak*/ false, /*stopAtComments*/ true)), getLeadingCommentRanges(text, node.pos) ) - : getTrailingCommentRanges(text, skipTrivia(text, node.pos, /* stopAfterLineBreak */ false, /* stopAtComments */ true)); + : getTrailingCommentRanges(text, skipTrivia(text, node.pos, /*stopAfterLineBreak*/ false, /*stopAtComments*/ true)); return commentRanges && commentRanges.length && hasInternalAnnotation(last(commentRanges), currentSourceFile); } const leadingCommentRanges = parseTreeNode && getLeadingCommentRangesOfNode(parseTreeNode, currentSourceFile); @@ -179,14 +180,14 @@ export function transformDeclarations(context: TransformationContext) { context.addDiagnostic(createDiagnosticForNode(symbolAccessibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, getTextOfNode(errorInfo.typeName), - symbolAccessibilityResult.errorSymbolName, - symbolAccessibilityResult.errorModuleName)); + symbolAccessibilityResult.errorSymbolName!, + symbolAccessibilityResult.errorModuleName!)); } else { context.addDiagnostic(createDiagnosticForNode(symbolAccessibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, - symbolAccessibilityResult.errorSymbolName, - symbolAccessibilityResult.errorModuleName)); + symbolAccessibilityResult.errorSymbolName!, + symbolAccessibilityResult.errorModuleName!)); } return true; } @@ -202,7 +203,7 @@ export function transformDeclarations(context: TransformationContext) { function trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) { if (symbol.flags & SymbolFlags.TypeParameter) return false; - const issuedDiagnostic = handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning, /*shouldComputeAliasesToMakeVisible*/ true)); + const issuedDiagnostic = handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning, /*shouldComputeAliasToMarkVisible*/ true)); recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning)); return issuedDiagnostic; } @@ -480,7 +481,7 @@ export function transformDeclarations(context: TransformationContext) { return factory.updateBindingElement( elem, elem.dotDotDotToken, - /* propertyName */ undefined, + /*propertyName*/ undefined, elem.propertyName, shouldPrintWithInitializer(elem) ? elem.initializer : undefined ); @@ -544,26 +545,26 @@ export function transformDeclarations(context: TransformationContext) { return factory.createTypeReferenceNode("invalid"); } - type LocalTypeInfo = { typeNode: TypeNode, flags: LocalTypeInfoFlags }; + type LocalTypeInfo = { typeNode: TypeNode, sourceNode?: Node, flags: LocalTypeInfoFlags }; function localInference(node: Node, isConstContext: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { const nextIsConst = isConstContext & NarrowBehavior.NotKeepLiterals; switch(node.kind) { case SyntaxKind.ParenthesizedExpression: - return regular(getWidenedType(localInference((node as ParenthesizedExpression).expression, isConstContext))); + return regular(getWidenedType(localInference((node as ParenthesizedExpression).expression, isConstContext)), node); case SyntaxKind.Identifier: if((node as Identifier).escapedText === "undefined") { if(strictNullChecks) { - return regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword)); + return regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), node); } else { - return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), LocalTypeInfoFlags.Implicit); + return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.Implicit); } } case SyntaxKind.NullKeyword: if(strictNullChecks) { - return regular(factory.createLiteralTypeNode(factory.createNull())); + return regular(factory.createLiteralTypeNode(factory.createNull()), node); } else { - return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), LocalTypeInfoFlags.Implicit); + return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.Implicit); } case SyntaxKind.NewExpression: const newExpr = node as NewExpression; @@ -573,18 +574,22 @@ export function transformDeclarations(context: TransformationContext) { visitNode(newExpr.expression, visitDeclarationSubtree, isIdentifier)!, visitNodes(newExpr.typeArguments, visitDeclarationSubtree, isTypeNode) ); - return regular(visitNode(typeNode, visitDeclarationSubtree, isTypeNode) ?? - makeInvalidTypeAndReport(node)); + const visitedTypeNode = visitNode(typeNode, visitDeclarationSubtree, isTypeNode) + if(visitedTypeNode) { + return regular(visitedTypeNode, node); + } + return invalid(node); } - return regular(makeInvalidTypeAndReport(node)); + return invalid(node); case SyntaxKind.ArrowFunction: case SyntaxKind.FunctionExpression: const fnNode = node as FunctionExpression | ArrowFunction; - return regular(factory.createFunctionTypeNode( + const fnTypeNode = factory.createFunctionTypeNode( visitNodes(fnNode.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), fnNode.parameters.map(p => ensureParameter(p)), inferReturnType(fnNode).typeNode, - )) + ); + return regular(fnTypeNode, node) case SyntaxKind.TypeAssertionExpression: case SyntaxKind.AsExpression: const asExpression = node as AsExpression | TypeAssertion; @@ -596,9 +601,9 @@ export function transformDeclarations(context: TransformationContext) { (isNoSubstitutionTemplateLiteral(type.literal) || isStringLiteral(type.literal))) { return regular(factory.createLiteralTypeNode( normalizeLiteralValue(type.literal) - )); + ), node); } - return regular(type); + return regular(type, node); } case SyntaxKind.PrefixUnaryExpression: const prefixOp = node as PrefixUnaryExpression; @@ -639,7 +644,7 @@ export function transformDeclarations(context: TransformationContext) { } } - return regular(factory.createTemplateLiteralType(templateExpression.head, templateSpans)); + return regular(factory.createTemplateLiteralType(templateExpression.head, templateSpans), node); case SyntaxKind.NoSubstitutionTemplateLiteral: case SyntaxKind.StringLiteral: return literal(node, SyntaxKind.StringKeyword, isConstContext); @@ -663,7 +668,7 @@ export function transformDeclarations(context: TransformationContext) { elementTypesInfo.map(lti => lti.typeNode) ); tupleType.emitNode = { flags: 1 }; - return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType)); + return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node); } else { let elementTypes = deduplicateUnion(elementTypesInfo); let simplifiedUnion = collapseLiteralTypesIntoBaseTypes(elementTypes); @@ -675,7 +680,7 @@ export function transformDeclarations(context: TransformationContext) { itemType = simplifiedUnion.length === 1? simplifiedUnion[0]: factory.createUnionTypeNode(simplifiedUnion); } - return regular(factory.createArrayTypeNode(itemType)); + return regular(factory.createArrayTypeNode(itemType), node); } case SyntaxKind.ObjectLiteralExpression: const objectLiteral = node as ObjectLiteralExpression @@ -716,21 +721,24 @@ export function transformDeclarations(context: TransformationContext) { localInference(prop.initializer, nextIsConst).typeNode )) } else { - return regular(makeInvalidTypeAndReport(prop)); + return invalid(prop); } } return regular(factory.createTypeLiteralNode( properties - )) + ), objectLiteral) } - return regular(makeInvalidTypeAndReport(node)); + return regular(makeInvalidTypeAndReport(node), node); } - function fresh(typeNode: TypeNode, flags = LocalTypeInfoFlags.None) { - return { typeNode, flags: flags | LocalTypeInfoFlags.Fresh } + function invalid(node: Node): LocalTypeInfo { + return { typeNode: makeInvalidTypeAndReport(node), flags: LocalTypeInfoFlags.Invalid, sourceNode: node } } - function regular(typeNode: TypeNode, flags = LocalTypeInfoFlags.None) { - return { typeNode, flags } + function fresh(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { + return { typeNode, flags: flags | LocalTypeInfoFlags.Fresh, sourceNode } + } + function regular(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { + return { typeNode, flags, sourceNode } } function normalizeLiteralValue(literal: LiteralExpression) { switch(literal.kind) { @@ -750,10 +758,12 @@ export function transformDeclarations(context: TransformationContext) { if(narrowBehavior) { return fresh(factory.createLiteralTypeNode( normalizeLiteralValue(node as LiteralExpression) - )) + ), node) } else { - return fresh(typeof baseType === "number" ? - factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType)); + return fresh( + typeof baseType === "number" ? factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType), + node + ); } } function isConst(typeReference: TypeReferenceNode) { @@ -770,7 +780,7 @@ export function transformDeclarations(context: TransformationContext) { function getMemberKey(member:MethodSignature | PropertySignature ) { if(!isIdentifier(member.name)) { - makeInvalidTypeAndReport(member); + makeInvalidTypeAndReport(member.name); return undefined; } return member.name.escapedText; @@ -928,7 +938,7 @@ export function transformDeclarations(context: TransformationContext) { }> let union: LocalTypeInfo[] = []; for(const node of nodes) { - const existing = union.find(u => typesEqual(node.typeNode, u.typeNode)); + const existing = union.find(u => typesEqual(node.typeNode, node.sourceNode, u.typeNode, u.sourceNode)); if(existing === undefined) { union.push(node); } else { @@ -937,7 +947,7 @@ export function transformDeclarations(context: TransformationContext) { } return union - function getTypeInfo(type:TypeLiteralNode) { + function getTypeInfo(type:TypeLiteralNode, errorTarget: Node | undefined) { const typeNodeId = getNodeId(type); let typeInfo = typeInfoCache.get(typeNodeId); if(typeInfo) return typeInfo; @@ -952,18 +962,18 @@ export function transformDeclarations(context: TransformationContext) { if(isMethod || isProp) { const memberKey = getMemberKey(member) if (memberKey === undefined) { - makeInvalidTypeAndReport(member); + makeInvalidTypeAndReport(errorTarget ?? member); break; } typeInfo.members.set(memberKey, member); } else { - makeInvalidTypeAndReport(member); + makeInvalidTypeAndReport(errorTarget ?? member); } } typeInfoCache.set(typeNodeId, typeInfo); return typeInfo; } - function typesEqual(a?: TypeNode, b?: TypeNode) { + function typesEqual(a: TypeNode | undefined, aErrorTarget:Node | undefined, b: TypeNode | undefined, bErrorTarget:Node | undefined) { if (a === undefined || b === undefined) return a === b; if (a.kind !== b.kind) return false; switch(a.kind) { @@ -1008,12 +1018,24 @@ export function transformDeclarations(context: TransformationContext) { } } } - if(isIdentifier(a) && isIdentifier(b)) { - return a.escapedText === b.escapedText; + if(isTypeReferenceNode(a) && isTypeReferenceNode(b)) { + let aTypeName = a.typeName; + let bTypeName = b.typeName; + while(true) { + if(aTypeName.kind === SyntaxKind.QualifiedName && bTypeName.kind === SyntaxKind.QualifiedName) { + if(aTypeName.right.escapedText !== bTypeName.right.escapedText) return false; + aTypeName = aTypeName.left; + bTypeName = bTypeName.left; + } else if(aTypeName.kind === SyntaxKind.Identifier && bTypeName.kind === SyntaxKind.Identifier) { + return aTypeName.escapedText === bTypeName.escapedText; + } else { + return false; + } + } } if(isTypeLiteralNode(a) && isTypeLiteralNode(b)) { if(a.members.length !== b.members.length) return false; - let aTypeInfo = getTypeInfo(a) + let aTypeInfo = getTypeInfo(a, aErrorTarget); if(!aTypeInfo) return false; for(const bMember of b.members) { @@ -1022,7 +1044,7 @@ export function transformDeclarations(context: TransformationContext) { if(bIsMethod || bIsProp) { const memberKey = getMemberKey(bMember); if (memberKey === undefined) { - makeInvalidTypeAndReport(bMember); + makeInvalidTypeAndReport(bErrorTarget ?? bMember); break; } const aMember = aTypeInfo.members.get(memberKey); @@ -1030,11 +1052,11 @@ export function transformDeclarations(context: TransformationContext) { if((aMember.questionToken !== undefined) !== (bMember.questionToken !== undefined)) return false; if (getSyntacticModifierFlags(aMember) != getSyntacticModifierFlags(bMember)) return false; if(bIsProp && isPropertySignature(aMember)) { - if(!typesEqual(aMember.type, bMember.type)) { + if(!typesEqual(aMember.type, aErrorTarget, bMember.type, bErrorTarget)) { return false; } } else if(bIsMethod && isMethodSignature(aMember)) { - if(!typesEqual(aMember.type,bMember.type)) { + if(!typesEqual(aMember.type, aErrorTarget,bMember.type, bErrorTarget)) { return false; } if(aMember.parameters.length !== b.members.length) { @@ -1042,13 +1064,17 @@ export function transformDeclarations(context: TransformationContext) { } } } else { - makeInvalidTypeAndReport(bMember); + makeInvalidTypeAndReport(bErrorTarget ?? bMember); } } return true; }else { - reportIsolatedDeclarationError(a); - reportIsolatedDeclarationError(b); + if(aErrorTarget) { + reportIsolatedDeclarationError(aErrorTarget); + } + if(bErrorTarget) { + reportIsolatedDeclarationError(bErrorTarget); + } } } } @@ -1161,24 +1187,28 @@ export function transformDeclarations(context: TransformationContext) { function inferReturnType(node: FunctionLikeDeclaration) { const returnStatements: ReturnStatement[] = []; if(node.type) { - return regular(visitType(node.type, node)); + return regular(visitType(node.type, node), node); } if(!node.body) { - return regular(makeInvalidTypeAndReport(node)); + return regular(makeInvalidTypeAndReport(node), node); } collectReturnExpressions(node.body, returnStatements); if(returnStatements.length === 0) { - return regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword)); + return regular(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), node); } - let returnStatementInference = returnStatements.map((r) => r.expression? localInference(r.expression, NarrowBehavior.KeepLiterals): regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword))); + let returnStatementInference = returnStatements.map((r) => { + return r.expression? + localInference(r.expression, NarrowBehavior.KeepLiterals): + regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), r) + }); returnStatementInference = deduplicateUnion(returnStatementInference) const unionConstituents = returnStatementInference.length === 1 ? [getWidenedType(returnStatementInference[0])] : collapseLiteralTypesIntoBaseTypes(returnStatementInference); normalizeObjectUnion(unionConstituents); - return regular(unionConstituents.length === 1? unionConstituents[0]: factory.createUnionTypeNode(unionConstituents)); + return regular(unionConstituents.length === 1? unionConstituents[0]: factory.createUnionTypeNode(unionConstituents), node); function collectReturnExpressions(node: Node, result: ReturnStatement[]) { forEachChild(node, child => { @@ -1600,7 +1630,7 @@ export function transformDeclarations(context: TransformationContext) { if (isMethodDeclaration(input) || isMethodSignature(input)) { if (hasEffectiveModifier(input, ModifierFlags.Private)) { if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) return; // Elide all but the first overload - return cleanup(factory.createPropertyDeclaration(ensureModifiers(input), input.name, /*questionToken*/ undefined, /*type*/ undefined, /*initializer*/ undefined)); + return cleanup(factory.createPropertyDeclaration(ensureModifiers(input), input.name, /*questionOrExclamationToken*/ undefined, /*type*/ undefined, /*initializer*/ undefined)); } } @@ -2067,7 +2097,7 @@ export function transformDeclarations(context: TransformationContext) { elems.push(factory.createPropertyDeclaration( ensureModifiers(param), elem.name as Identifier, - /*questionToken*/ undefined, + /*questionOrExclamationToken*/ undefined, ensureType(elem, /*type*/ undefined), /*initializer*/ undefined )); @@ -2085,7 +2115,7 @@ export function transformDeclarations(context: TransformationContext) { factory.createPropertyDeclaration( /*modifiers*/ undefined, factory.createPrivateIdentifier("#private"), - /*questionToken*/ undefined, + /*questionOrExclamationToken*/ undefined, /*type*/ undefined, /*initializer*/ undefined ) diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index f2ccfab28b21b..829ba592efa4d 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -1,4 +1,5 @@ import { + __String, AccessorDeclaration, addRelatedInfo, AllAccessorDeclarations, @@ -6,6 +7,9 @@ import { append, ArrayBindingElement, arrayFrom, + ArrayLiteralExpression, + ArrowFunction, + AsExpression, AssertClause, BindingElement, BindingName, @@ -48,10 +52,14 @@ import { factory, FileReference, filter, + findIndex, flatMap, flatten, forEach, + forEachChild, FunctionDeclaration, + FunctionExpression, + FunctionLikeDeclaration, FunctionTypeNode, GeneratedIdentifierFlags, GetAccessorDeclaration, @@ -66,6 +74,7 @@ import { getLeadingCommentRangesOfNode, getLineAndCharacterOfPosition, getNameOfDeclaration, + getNodeId, getOriginalNodeId, getOutputPathsFor, getParseTreeNode, @@ -75,6 +84,7 @@ import { getSetAccessorValueParameter, getSourceFileOfNode, GetSymbolAccessibilityDiagnostic, + getSyntacticModifierFlags, getTextOfNode, getThisParameter, getTrailingCommentRanges, @@ -100,6 +110,7 @@ import { isBindingPattern, isClassDeclaration, isClassElement, + isClassLike, isDeclaration, isElementAccessExpression, isEntityName, @@ -126,16 +137,24 @@ import { isLateVisibilityPaintedStatement, isLiteralExpression, isLiteralImportTypeNode, + isLiteralTypeNode, isMappedTypeNode, isMethodDeclaration, isMethodSignature, isModifier, isModuleDeclaration, isNightly, + isNoSubstitutionTemplateLiteral, + isNumericLiteral, isOmittedExpression, + isParameter, isPrivateIdentifier, isPropertyAccessExpression, + isPropertyAssignment, + isPropertyDeclaration, + isPropertyName, isPropertySignature, + isReturnStatement, isSemicolonClassElement, isSetAccessorDeclaration, isSourceFile, @@ -148,15 +167,20 @@ import { isTupleTypeNode, isTypeAliasDeclaration, isTypeElement, + isTypeLiteralNode, isTypeNode, isTypeParameterDeclaration, isTypeQueryNode, + isTypeReferenceNode, isUnparsedSource, isVariableDeclaration, + KeywordTypeSyntaxKind, last, LateBoundDeclaration, LateVisibilityPaintedStatement, length, + LiteralExpression, + LiteralTypeNode, map, mapDefined, MethodDeclaration, @@ -168,6 +192,7 @@ import { NamedDeclaration, NamespaceDeclaration, needsScopeMarker, + NewExpression, Node, NodeArray, NodeBuilderFlags, @@ -175,17 +200,21 @@ import { NodeFlags, NodeId, normalizeSlashes, + ObjectLiteralExpression, OmittedExpression, orderedRemoveItem, ParameterDeclaration, + ParenthesizedExpression, parseNodeFactory, pathContainsNodeModules, pathIsRelative, + PrefixUnaryExpression, PropertyDeclaration, PropertySignature, pushIfUnique, removeAllComments, ResolutionMode, + ReturnStatement, ScriptTarget, SetAccessorDeclaration, setCommentRange, @@ -207,12 +236,18 @@ import { SymbolFlags, SymbolTracker, SyntaxKind, + TemplateExpression, + TemplateHead, + TemplateLiteralTypeSpan, toFileNameLowerCase, toPath, TransformationContext, transformNodes, tryCast, TypeAliasDeclaration, + TypeAssertion, + TypeElement, + TypeLiteralNode, TypeNode, TypeParameterDeclaration, TypeReferenceNode, @@ -239,7 +274,8 @@ enum NarrowBehavior { enum LocalTypeInfoFlags { None = 0, Fresh = 1 << 0, - Implicit = 1<< 1 + Implicit = 1<< 1, + Invalid = 1<<2, } /** @internal */ @@ -359,6 +395,7 @@ export function transformDeclarations(context: TransformationContext) { function trackReferencedAmbientModule(node: ModuleDeclaration, symbol: Symbol) { // If it is visible via `// `, then we should just use that + // TODO: isolatedDeclarations: see about .All flag const directives = resolver.getTypeReferenceDirectivesForSymbol(symbol, SymbolFlags.All); if (length(directives)) { return recordTypeReferenceDirectivesIfNecessary(directives); @@ -800,26 +837,26 @@ export function transformDeclarations(context: TransformationContext) { return factory.createTypeReferenceNode("invalid"); } - type LocalTypeInfo = { typeNode: TypeNode, flags: LocalTypeInfoFlags }; + type LocalTypeInfo = { typeNode: TypeNode, sourceNode?: Node, flags: LocalTypeInfoFlags }; function localInference(node: Node, isConstContext: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { const nextIsConst = isConstContext & NarrowBehavior.NotKeepLiterals; switch(node.kind) { case SyntaxKind.ParenthesizedExpression: - return regular(getWidenedType(localInference((node as ParenthesizedExpression).expression, isConstContext))); + return regular(getWidenedType(localInference((node as ParenthesizedExpression).expression, isConstContext)), node); case SyntaxKind.Identifier: if((node as Identifier).escapedText === "undefined") { if(strictNullChecks) { - return regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword)); + return regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), node); } else { - return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), LocalTypeInfoFlags.Implicit); + return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.Implicit); } } case SyntaxKind.NullKeyword: if(strictNullChecks) { - return regular(factory.createLiteralTypeNode(factory.createNull())); + return regular(factory.createLiteralTypeNode(factory.createNull()), node); } else { - return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), LocalTypeInfoFlags.Implicit); + return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.Implicit); } case SyntaxKind.NewExpression: const newExpr = node as NewExpression; @@ -829,18 +866,22 @@ export function transformDeclarations(context: TransformationContext) { visitNode(newExpr.expression, visitDeclarationSubtree, isIdentifier)!, visitNodes(newExpr.typeArguments, visitDeclarationSubtree, isTypeNode) ); - return regular(visitNode(typeNode, visitDeclarationSubtree, isTypeNode) ?? - makeInvalidTypeAndReport(node)); + const visitedTypeNode = visitNode(typeNode, visitDeclarationSubtree, isTypeNode) + if(visitedTypeNode) { + return regular(visitedTypeNode, node); + } + return invalid(node); } - return regular(makeInvalidTypeAndReport(node)); + return invalid(node); case SyntaxKind.ArrowFunction: case SyntaxKind.FunctionExpression: const fnNode = node as FunctionExpression | ArrowFunction; - return regular(factory.createFunctionTypeNode( + const fnTypeNode = factory.createFunctionTypeNode( visitNodes(fnNode.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), fnNode.parameters.map(p => ensureParameter(p)), inferReturnType(fnNode).typeNode, - )) + ); + return regular(fnTypeNode, node) case SyntaxKind.TypeAssertionExpression: case SyntaxKind.AsExpression: const asExpression = node as AsExpression | TypeAssertion; @@ -852,9 +893,9 @@ export function transformDeclarations(context: TransformationContext) { (isNoSubstitutionTemplateLiteral(type.literal) || isStringLiteral(type.literal))) { return regular(factory.createLiteralTypeNode( normalizeLiteralValue(type.literal) - )); + ), node); } - return regular(type); + return regular(type, node); } case SyntaxKind.PrefixUnaryExpression: const prefixOp = node as PrefixUnaryExpression; @@ -885,6 +926,7 @@ export function transformDeclarations(context: TransformationContext) { if(isLiteralTypeNode(typeNode)) { let oldText = prevSpan.kind === SyntaxKind.TemplateHead ? prevSpan.text : prevSpan.literal.text; let newText= oldText; + console.log(newText);//wip } else { const literalSpan = factory.createTemplateLiteralTypeSpan( typeNode, @@ -895,7 +937,7 @@ export function transformDeclarations(context: TransformationContext) { } } - return regular(factory.createTemplateLiteralType(templateExpression.head, templateSpans)); + return regular(factory.createTemplateLiteralType(templateExpression.head, templateSpans), node); case SyntaxKind.NoSubstitutionTemplateLiteral: case SyntaxKind.StringLiteral: return literal(node, SyntaxKind.StringKeyword, isConstContext); @@ -918,8 +960,8 @@ export function transformDeclarations(context: TransformationContext) { const tupleType = factory.createTupleTypeNode( elementTypesInfo.map(lti => lti.typeNode) ); - tupleType.emitNode = { flags: 1 }; - return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType)); + tupleType.emitNode = { flags: 1, autoGenerate: undefined, internalFlags: 0 }; + return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node); } else { let elementTypes = deduplicateUnion(elementTypesInfo); let simplifiedUnion = collapseLiteralTypesIntoBaseTypes(elementTypes); @@ -931,7 +973,7 @@ export function transformDeclarations(context: TransformationContext) { itemType = simplifiedUnion.length === 1? simplifiedUnion[0]: factory.createUnionTypeNode(simplifiedUnion); } - return regular(factory.createArrayTypeNode(itemType)); + return regular(factory.createArrayTypeNode(itemType), node); } case SyntaxKind.ObjectLiteralExpression: const objectLiteral = node as ObjectLiteralExpression @@ -972,21 +1014,24 @@ export function transformDeclarations(context: TransformationContext) { localInference(prop.initializer, nextIsConst).typeNode )) } else { - return regular(makeInvalidTypeAndReport(prop)); + return invalid(prop); } } return regular(factory.createTypeLiteralNode( properties - )) + ), objectLiteral) } - return regular(makeInvalidTypeAndReport(node)); + return regular(makeInvalidTypeAndReport(node), node); } - function fresh(typeNode: TypeNode, flags = LocalTypeInfoFlags.None) { - return { typeNode, flags: flags | LocalTypeInfoFlags.Fresh } + function invalid(node: Node): LocalTypeInfo { + return { typeNode: makeInvalidTypeAndReport(node), flags: LocalTypeInfoFlags.Invalid, sourceNode: node } } - function regular(typeNode: TypeNode, flags = LocalTypeInfoFlags.None) { - return { typeNode, flags } + function fresh(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { + return { typeNode, flags: flags | LocalTypeInfoFlags.Fresh, sourceNode } + } + function regular(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { + return { typeNode, flags, sourceNode } } function normalizeLiteralValue(literal: LiteralExpression) { switch(literal.kind) { @@ -1006,10 +1051,12 @@ export function transformDeclarations(context: TransformationContext) { if(narrowBehavior) { return fresh(factory.createLiteralTypeNode( normalizeLiteralValue(node as LiteralExpression) - )) + ), node) } else { - return fresh(typeof baseType === "number" ? - factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType)); + return fresh( + typeof baseType === "number" ? factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType), + node + ); } } function isConst(typeReference: TypeReferenceNode) { @@ -1026,7 +1073,7 @@ export function transformDeclarations(context: TransformationContext) { function getMemberKey(member:MethodSignature | PropertySignature ) { if(!isIdentifier(member.name)) { - makeInvalidTypeAndReport(member); + makeInvalidTypeAndReport(member.name); return undefined; } return member.name.escapedText; @@ -1184,7 +1231,7 @@ export function transformDeclarations(context: TransformationContext) { }> let union: LocalTypeInfo[] = []; for(const node of nodes) { - const existing = union.find(u => typesEqual(node.typeNode, u.typeNode)); + const existing = union.find(u => typesEqual(node.typeNode, node.sourceNode, u.typeNode, u.sourceNode)); if(existing === undefined) { union.push(node); } else { @@ -1193,7 +1240,7 @@ export function transformDeclarations(context: TransformationContext) { } return union - function getTypeInfo(type:TypeLiteralNode) { + function getTypeInfo(type:TypeLiteralNode, errorTarget: Node | undefined) { const typeNodeId = getNodeId(type); let typeInfo = typeInfoCache.get(typeNodeId); if(typeInfo) return typeInfo; @@ -1208,18 +1255,18 @@ export function transformDeclarations(context: TransformationContext) { if(isMethod || isProp) { const memberKey = getMemberKey(member) if (memberKey === undefined) { - makeInvalidTypeAndReport(member); + makeInvalidTypeAndReport(errorTarget ?? member); break; } typeInfo.members.set(memberKey, member); } else { - makeInvalidTypeAndReport(member); + makeInvalidTypeAndReport(errorTarget ?? member); } } typeInfoCache.set(typeNodeId, typeInfo); return typeInfo; } - function typesEqual(a?: TypeNode, b?: TypeNode) { + function typesEqual(a: TypeNode | undefined, aErrorTarget:Node | undefined, b: TypeNode | undefined, bErrorTarget:Node | undefined) { if (a === undefined || b === undefined) return a === b; if (a.kind !== b.kind) return false; switch(a.kind) { @@ -1264,12 +1311,24 @@ export function transformDeclarations(context: TransformationContext) { } } } - if(isIdentifier(a) && isIdentifier(b)) { - return a.escapedText === b.escapedText; + if(isTypeReferenceNode(a) && isTypeReferenceNode(b)) { + let aTypeName = a.typeName; + let bTypeName = b.typeName; + while(true) { + if(aTypeName.kind === SyntaxKind.QualifiedName && bTypeName.kind === SyntaxKind.QualifiedName) { + if(aTypeName.right.escapedText !== bTypeName.right.escapedText) return false; + aTypeName = aTypeName.left; + bTypeName = bTypeName.left; + } else if(aTypeName.kind === SyntaxKind.Identifier && bTypeName.kind === SyntaxKind.Identifier) { + return aTypeName.escapedText === bTypeName.escapedText; + } else { + return false; + } + } } if(isTypeLiteralNode(a) && isTypeLiteralNode(b)) { if(a.members.length !== b.members.length) return false; - let aTypeInfo = getTypeInfo(a) + let aTypeInfo = getTypeInfo(a, aErrorTarget); if(!aTypeInfo) return false; for(const bMember of b.members) { @@ -1278,7 +1337,7 @@ export function transformDeclarations(context: TransformationContext) { if(bIsMethod || bIsProp) { const memberKey = getMemberKey(bMember); if (memberKey === undefined) { - makeInvalidTypeAndReport(bMember); + makeInvalidTypeAndReport(bErrorTarget ?? bMember); break; } const aMember = aTypeInfo.members.get(memberKey); @@ -1286,11 +1345,11 @@ export function transformDeclarations(context: TransformationContext) { if((aMember.questionToken !== undefined) !== (bMember.questionToken !== undefined)) return false; if (getSyntacticModifierFlags(aMember) != getSyntacticModifierFlags(bMember)) return false; if(bIsProp && isPropertySignature(aMember)) { - if(!typesEqual(aMember.type, bMember.type)) { + if(!typesEqual(aMember.type, aErrorTarget, bMember.type, bErrorTarget)) { return false; } } else if(bIsMethod && isMethodSignature(aMember)) { - if(!typesEqual(aMember.type,bMember.type)) { + if(!typesEqual(aMember.type, aErrorTarget,bMember.type, bErrorTarget)) { return false; } if(aMember.parameters.length !== b.members.length) { @@ -1298,13 +1357,17 @@ export function transformDeclarations(context: TransformationContext) { } } } else { - makeInvalidTypeAndReport(bMember); + makeInvalidTypeAndReport(bErrorTarget ?? bMember); } } return true; }else { - reportIsolatedDeclarationError(a); - reportIsolatedDeclarationError(b); + if(aErrorTarget) { + reportIsolatedDeclarationError(aErrorTarget); + } + if(bErrorTarget) { + reportIsolatedDeclarationError(bErrorTarget); + } } } } @@ -1417,24 +1480,28 @@ export function transformDeclarations(context: TransformationContext) { function inferReturnType(node: FunctionLikeDeclaration) { const returnStatements: ReturnStatement[] = []; if(node.type) { - return regular(visitType(node.type, node)); + return regular(visitType(node.type, node), node); } if(!node.body) { - return regular(makeInvalidTypeAndReport(node)); + return regular(makeInvalidTypeAndReport(node), node); } collectReturnExpressions(node.body, returnStatements); if(returnStatements.length === 0) { - return regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword)); + return regular(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), node); } - let returnStatementInference = returnStatements.map((r) => r.expression? localInference(r.expression, NarrowBehavior.KeepLiterals): regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword))); + let returnStatementInference = returnStatements.map((r) => { + return r.expression? + localInference(r.expression, NarrowBehavior.KeepLiterals): + regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), r) + }); returnStatementInference = deduplicateUnion(returnStatementInference) const unionConstituents = returnStatementInference.length === 1 ? [getWidenedType(returnStatementInference[0])] : collapseLiteralTypesIntoBaseTypes(returnStatementInference); normalizeObjectUnion(unionConstituents); - return regular(unionConstituents.length === 1? unionConstituents[0]: factory.createUnionTypeNode(unionConstituents)); + return regular(unionConstituents.length === 1? unionConstituents[0]: factory.createUnionTypeNode(unionConstituents), node); function collectReturnExpressions(node: Node, result: ReturnStatement[]) { forEachChild(node, child => { From 6a978542f919a3e91d4c7979aa3e99de0b6835e3 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Tue, 16 May 2023 11:25:32 +0000 Subject: [PATCH 010/224] Fix various lint errors 1. Apply auto fixes with hereby lint --fix 2. Manual fixes such as raw function to arrow functions, removing unused imports, adding comments for parameters. Signed-off-by: Hana Joo --- .../src/code-mod/code-transform.ts | 58 +++++------ external-declarations/src/code-mod/index.ts | 1 + .../src/code-mod/parallel-run.ts | 45 ++++----- .../src/code-mod/test-updater.ts | 98 ++++++++++--------- 4 files changed, 104 insertions(+), 98 deletions(-) diff --git a/external-declarations/src/code-mod/code-transform.ts b/external-declarations/src/code-mod/code-transform.ts index 1b804b9285fd0..cb3b37f384354 100644 --- a/external-declarations/src/code-mod/code-transform.ts +++ b/external-declarations/src/code-mod/code-transform.ts @@ -1,6 +1,6 @@ import * as ts from "typescript"; import { NodeBuilderFlags } from "typescript"; -import { map } from "../compiler/lang-utils"; + import { SymbolTracker } from "../compiler/types"; const declarationEmitNodeBuilderFlags = @@ -28,7 +28,7 @@ export function addTypeAnnotationTransformer(program: ts.Program, moduleResoluti function isVarConst(node: ts.VariableDeclaration | ts.VariableDeclarationList): boolean { return !!(ts.getCombinedNodeFlags(node) & ts.NodeFlags.Const); } - + function isDeclarationReadonly(declaration: ts.Declaration): boolean { return !!(ts.getCombinedModifierFlags(declaration) & ts.ModifierFlags.Readonly && !ts.isParameterPropertyDeclaration(declaration, declaration.parent)); } @@ -36,20 +36,20 @@ export function addTypeAnnotationTransformer(program: ts.Program, moduleResoluti function isLiteralConstDeclaration(node: ts.VariableDeclaration | ts.PropertyDeclaration | ts.PropertySignature | ts.ParameterDeclaration): boolean { if (isDeclarationReadonly(node) || ts.isVariableDeclaration(node) && isVarConst(node)) { // TODO: Make sure this is a valid approximation for literal types - return !node.type && 'initializer' in node && !!node.initializer && ts.isLiteralExpression(node.initializer); - // Original TS version + return !node.type && "initializer" in node && !!node.initializer && ts.isLiteralExpression(node.initializer); + // Original TS version // return isFreshLiteralType(getTypeOfSymbol(getSymbolOfNode(node))); } return false; } - + const typeChecker = program.getTypeChecker(); - + return (context: ts.TransformationContext) => { let hasError = false; - let reportError = () => { + const reportError = () => { hasError = true; - } + }; const symbolTracker: SymbolTracker | undefined = !moduleResolutionHost? undefined : { trackSymbol(){ return false; }, reportInaccessibleThisError: reportError, @@ -73,7 +73,7 @@ export function addTypeAnnotationTransformer(program: ts.Program, moduleResoluti declarationEmitNodeBuilderFlags, // @ts-expect-error Use undocumented parameters symbolTracker, - ) + ); if (hasError) { hasError = false; return undefined; @@ -83,15 +83,15 @@ export function addTypeAnnotationTransformer(program: ts.Program, moduleResoluti } // Return a visitor function return (rootNode: ts.Node) => { - function updateTypesInNodeArray(nodeArray: ts.NodeArray): ts.NodeArray - function updateTypesInNodeArray(nodeArray: ts.NodeArray | undefined): ts.NodeArray | undefined + function updateTypesInNodeArray(nodeArray: ts.NodeArray): ts.NodeArray; + function updateTypesInNodeArray(nodeArray: ts.NodeArray | undefined): ts.NodeArray | undefined; function updateTypesInNodeArray(nodeArray: ts.NodeArray | undefined) { if(nodeArray === undefined) return undefined; return ts.factory.createNodeArray( nodeArray.map(param => { return visit(param) as ts.ParameterDeclaration; }) - ) + ); } // Define a visitor function @@ -108,17 +108,17 @@ export function addTypeAnnotationTransformer(program: ts.Program, moduleResoluti node.questionToken, typeNode, node.initializer - ) + ); } } // Check if node is a variable declaration if (ts.isVariableDeclaration(node) && !node.type && !isLiteralConstDeclaration(node)) { const type = typeChecker.getTypeAtLocation(node); - const typeNode = typeToTypeNode(type, node) + const typeNode = typeToTypeNode(type, node); return ts.factory.updateVariableDeclaration( node, node.name, - undefined, + /**exclamationToken=*/undefined, typeNode, node.initializer ); @@ -127,10 +127,10 @@ export function addTypeAnnotationTransformer(program: ts.Program, moduleResoluti if (ts.isFunctionDeclaration(node) && !node.type) { const type = tryGetReturnType(typeChecker, node); if(type) { - + const typeNode = typeToTypeNode(type, node); return ts.factory.updateFunctionDeclaration( - node, + node, node.modifiers, node.asteriskToken, node.name, @@ -138,7 +138,7 @@ export function addTypeAnnotationTransformer(program: ts.Program, moduleResoluti updateTypesInNodeArray(node.parameters), typeNode, node.body - ) + ); } } if(ts.isPropertySignature(node) && !node.type && !isLiteralConstDeclaration(node)) { @@ -167,7 +167,7 @@ export function addTypeAnnotationTransformer(program: ts.Program, moduleResoluti if(ts.isMethodSignature(node) && !node.type) { const type = tryGetReturnType(typeChecker, node); if(type) { - + const typeNode = typeToTypeNode(type, node); return ts.factory.updateMethodSignature( node, @@ -176,7 +176,7 @@ export function addTypeAnnotationTransformer(program: ts.Program, moduleResoluti node.questionToken, updateTypesInNodeArray(node.typeParameters), updateTypesInNodeArray(node.parameters), - typeNode, + typeNode, ); } } @@ -189,13 +189,13 @@ export function addTypeAnnotationTransformer(program: ts.Program, moduleResoluti updateTypesInNodeArray(node.typeParameters), updateTypesInNodeArray(node.parameters), typeNode, - ) + ); } } if(ts.isMethodDeclaration(node) && !node.type) { const type = tryGetReturnType(typeChecker, node); if(type) { - + const typeNode = typeToTypeNode(type, node); return ts.factory.updateMethodDeclaration( node, @@ -206,7 +206,7 @@ export function addTypeAnnotationTransformer(program: ts.Program, moduleResoluti updateTypesInNodeArray(node.typeParameters), updateTypesInNodeArray(node.parameters), typeNode, - node.body, + node.body, ); } } @@ -220,7 +220,7 @@ export function addTypeAnnotationTransformer(program: ts.Program, moduleResoluti node.name, updateTypesInNodeArray(node.parameters), typeNode, - node.body, + node.body, ); } } @@ -230,16 +230,16 @@ export function addTypeAnnotationTransformer(program: ts.Program, moduleResoluti node.modifiers, node.name, updateTypesInNodeArray(node.parameters), - node.body, + node.body, ); } - if ( ts.isConstructorDeclaration(node)) { + if (ts.isConstructorDeclaration(node)) { return ts.factory.updateConstructorDeclaration( node, node.modifiers, updateTypesInNodeArray(node.parameters), node.body, - ) + ); } if(ts.isConstructSignatureDeclaration(node)) { const type = tryGetReturnType(typeChecker, node); @@ -250,7 +250,7 @@ export function addTypeAnnotationTransformer(program: ts.Program, moduleResoluti updateTypesInNodeArray(node.typeParameters), updateTypesInNodeArray(node.parameters), typeNode, - ) + ); } } if(ts.isExportAssignment(node) && node.expression.kind !== ts.SyntaxKind.Identifier) { @@ -260,7 +260,7 @@ export function addTypeAnnotationTransformer(program: ts.Program, moduleResoluti const newId = ts.factory.createIdentifier("_default"); const varDecl = ts.factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, typeNode, /*initializer*/ undefined); const statement = ts.factory.createVariableStatement( - [], + [], ts.factory.createVariableDeclarationList([varDecl], ts.NodeFlags.Const) ); return [statement, ts.factory.updateExportAssignment(node, node.modifiers, newId)]; diff --git a/external-declarations/src/code-mod/index.ts b/external-declarations/src/code-mod/index.ts index b0cdfec800b0a..a85323f296d67 100644 --- a/external-declarations/src/code-mod/index.ts +++ b/external-declarations/src/code-mod/index.ts @@ -1,5 +1,6 @@ // Import TypeScript module import * as ts from "typescript"; + import { isDeclarationFileName } from "../compiler/utils"; import { addTypeAnnotationTransformer } from "./code-transform"; diff --git a/external-declarations/src/code-mod/parallel-run.ts b/external-declarations/src/code-mod/parallel-run.ts index 9cf7dec5391ce..6b382918fc8d1 100644 --- a/external-declarations/src/code-mod/parallel-run.ts +++ b/external-declarations/src/code-mod/parallel-run.ts @@ -1,9 +1,9 @@ -import * as fs from 'fs' -import * as path from 'path' import * as childProcess from "child_process"; -import { ArgType, parseArgs } from '../utils/cli-parser'; +import * as path from "path"; -type ExecuteResult = { +import { ArgType, parseArgs } from "../utils/cli-parser"; + +interface ExecuteResult { error: childProcess.ExecException | null stdout: string, stderr: string, @@ -14,40 +14,41 @@ function exec(cmd: string, dir: string, onStdOut: (s: string) => void) { console.log(`In ${dir} Executing: ${cmd}`); const ls = childProcess.spawn(cmd, [], { - cwd: path.resolve(path.join(process.cwd(), dir)), + cwd: path.resolve(path.join(process.cwd(), dir)), shell: true }); - let stdout = "" - let stderr = "" - ls.stdout.on('data', function (data) { - if(!onStdOut) { + let stdout = ""; + let stderr = ""; + ls.stdout.on("data", (data) => { + if (!onStdOut) { process.stdout.write(data.toString()); - } else { + } + else { onStdOut(data.toString()); } stdout += data.toString(); }); - ls.stderr.on('data', function (data) { + ls.stderr.on("data", (data) => { process.stderr.write(data.toString()); stderr += data.toString(); }); - ls.on('error', function(err) { + ls.on("error", (err) => { console.log(err); - }) - ls.on('exit', function (code) { - console.log('exited:' + code?.toString()); + }); + ls.on("exit", (code) => { + console.log("exited:" + code?.toString()); resolve({ error: !code ? null : Object.assign(new Error(""), { code, - cmd: cmd, + cmd, }), stderr, stdout - }) + }); }); - }) + }); } const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), { @@ -69,12 +70,12 @@ async function main() { }`; let lastWrite = new Date().getTime(); const startTime = new Date().getTime(); - const elapsedTime = (now: number) => `${((now - startTime) / 1000 / 60).toFixed(2)} minutes` - const promisees = Array.from({ length: shardCount}).map(async (_, index) => { + const elapsedTime = (now: number) => `${((now - startTime) / 1000 / 60).toFixed(2)} minutes`; + const promisees = Array.from({ length: shardCount }).map(async (_, index) => { await exec(commandLine + ` --shard=${index}`, "./", out => { runCount += (out.match(/Ran:/g) || []).length; if(new Date().getTime() - lastWrite > 2000) { - lastWrite = new Date().getTime() + lastWrite = new Date().getTime(); console.log(`Run count: ${runCount} after ${elapsedTime(lastWrite)}`); } }); @@ -82,7 +83,7 @@ async function main() { }); await Promise.all(promisees); const endTime = new Date().getTime(); - console.log(`Took ${elapsedTime(endTime)} to complete ${runCount}`) + console.log(`Took ${elapsedTime(endTime)} to complete ${runCount}`); } main(); \ No newline at end of file diff --git a/external-declarations/src/code-mod/test-updater.ts b/external-declarations/src/code-mod/test-updater.ts index 3257365bb4daa..791370a44c32a 100644 --- a/external-declarations/src/code-mod/test-updater.ts +++ b/external-declarations/src/code-mod/test-updater.ts @@ -1,14 +1,16 @@ -import 'source-map-support/register'; -import * as fsPath from 'path' -import * as fs from 'fs/promises' -import { parserConfiguration, ArgType, parseArgs } from "../utils/cli-parser"; -import { normalizePath } from '../compiler/path-utils'; -import { isRelevantTestFile, loadTestCase } from '../test-runner/utils'; -import ts = require('typescript'); -import { compileFiles, setCompilerOptionsFromHarnessSetting, TestFile } from '../test-runner/tsc-infrastructure/compiler-run'; -import { splitContentByNewlines, TestCaseContent, TestUnitData } from '../test-runner/tsc-infrastructure/test-file-parser'; -import { addTypeAnnotationTransformer } from './code-transform'; -import { ensureDir, readAllFiles } from '../utils/fs-utils'; +import "source-map-support/register"; + +import * as fs from "fs/promises"; +import * as fsPath from "path"; + +import { normalizePath } from "../compiler/path-utils"; +import { isRelevantTestFile, loadTestCase } from "../test-runner/utils"; +import { ArgType, parseArgs,parserConfiguration } from "../utils/cli-parser"; +import ts = require("typescript"); +import { compileFiles, setCompilerOptionsFromHarnessSetting, TestFile } from "../test-runner/tsc-infrastructure/compiler-run"; +import { splitContentByNewlines, TestCaseContent, TestUnitData } from "../test-runner/tsc-infrastructure/test-file-parser"; +import { ensureDir, readAllFiles } from "../utils/fs-utils"; +import { addTypeAnnotationTransformer } from "./code-transform"; (ts as any).Debug .enableDebugInfo(); @@ -20,29 +22,29 @@ export const testRunnerCLIConfiguration = parserConfiguration({ rootPaths: ArgType.StringArray(), shard: ArgType.Number(), shardCount: ArgType.Number(), -}) +}); const excludeFilter =/\/fourslash\//; const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), testRunnerCLIConfiguration); printUsageOnErrors(); -const rootCasePaths = parsedArgs.rootPaths ?? [ './tests/sources' ] -const filter = parsedArgs.default ? new RegExp(parsedArgs.default) : /.*\.ts/ +const rootCasePaths = parsedArgs.rootPaths ?? [ "./tests/sources" ]; +const filter = parsedArgs.default ? new RegExp(parsedArgs.default) : /.*\.ts/; -const shard = parsedArgs.shard -const shardCount = parsedArgs.shardCount +const shard = parsedArgs.shard; +const shardCount = parsedArgs.shardCount; const allTests = rootCasePaths - .flatMap(r => readAllFiles(r, filter).map((file) => ({ file, root: r}))) - .filter(f => !excludeFilter.exec(f.file));; + .flatMap(r => readAllFiles(r, filter).map((file) => ({ file, root: r }))) + .filter(f => !excludeFilter.exec(f.file)); -async function writeTestCase(testData: TestCaseContent & { BOM: string }, path: string) { - let lines = splitContentByNewlines(testData.code); - let result: string[] = []; +async function writeTestCase(testData: TestCaseContent & { BOM: string }, path: string) { + const lines = splitContentByNewlines(testData.code); + const result: string[] = []; let copyFrom = 0; - function pushFrom(target: string[], source: string[], from: number = 0, to: number = source.length) { + function pushFrom(target: string[], source: string[], from = 0, to: number = source.length) { for(let i = from; i< to; i++) { target.push(source[i]); } @@ -50,13 +52,13 @@ async function writeTestCase(testData: TestCaseContent & { BOM: string }, path: for (const file of testData.testUnitData) { if(file.content === undefined) continue; - pushFrom(result, lines, copyFrom, file.startLine) - + pushFrom(result, lines, copyFrom, file.startLine); + pushFrom(result, splitContentByNewlines(file.content)); - + copyFrom = file.endLine + 1; } - pushFrom(result, lines, copyFrom, lines.length) + pushFrom(result, lines, copyFrom, lines.length); await ensureDir(fsPath.dirname(path)); const content = testData.BOM + result.join(lines.delimiter); await fs.writeFile(path, content); @@ -64,37 +66,38 @@ async function writeTestCase(testData: TestCaseContent & { BOM: string }, path: async function main() { const testsPerShared = shardCount && Math.round(allTests.length / shardCount); - const [start, end] = shard == undefined || shardCount == undefined || testsPerShared == undefined ? + const [start, end] = shard === undefined || shardCount === undefined || testsPerShared === undefined ? [0, allTests.length] : - [shard * testsPerShared, (shard == shardCount - 1) ? allTests.length : (shard + 1) * testsPerShared]; + [shard * testsPerShared, (shard === shardCount - 1) ? allTests.length : (shard + 1) * testsPerShared]; for (let count = start; count < end; count++) { const testFile = normalizePath(allTests[count].file); const rootPath = normalizePath(allTests[count].root); const caseData = await loadTestCase(testFile); - + const settings: ts.CompilerOptions = {}; setCompilerOptionsFromHarnessSetting(caseData.settings, settings); function createHarnessTestFile(lastUnit: TestUnitData): TestFile { return { unitName: lastUnit.name, content: lastUnit.content, fileOptions: lastUnit.fileOptions }; } - + const toBeCompiled = caseData.testUnitData.map(unit => { return createHarnessTestFile(unit); }); - - await writeTestCase(caseData, testFile.replace(rootPath, "./tsc-tests/original-tests")) + + await writeTestCase(caseData, testFile.replace(rootPath, "./tsc-tests/original-tests")); const updatedTestFileName = testFile.replace(rootPath, "./tsc-tests/updated-tests"); const result = (() => { try { - return compileFiles(toBeCompiled, [], { + return compileFiles(toBeCompiled, [], { declaration: "true", isolatedDeclarations: "true", removeComments: "false", - }, settings, undefined); - } catch(e) { + }, settings, /**currentDirectory=*/ undefined); + } + catch(e) { return e as Error; } })(); @@ -106,30 +109,30 @@ ${result.stack} `); continue; } - const program = result.program!; - + const program = result.program!; + for(const testFileContent of caseData.testUnitData) { if(!isRelevantTestFile(testFileContent)) continue; try { const sourceFile = program.getSourceFile(testFileContent.name)!; - program.getDeclarationDiagnostics(sourceFile) + program.getDeclarationDiagnostics(sourceFile); - if(!sourceFile) continue; - let moduleResolutionHost: ts.ModuleResolutionHost| undefined = undefined; - program.emit(sourceFile, undefined, undefined, true, { + if(!sourceFile) continue; + let moduleResolutionHost: ts.ModuleResolutionHost | undefined; + program.emit(sourceFile, /**writeFile=*/ undefined, /**cancellationToken=*/ undefined, /**emitOnlyDtsFiles=*/ true, { afterDeclarations:[ (c) => { // @ts-expect-error getEmitHost is not exposed moduleResolutionHost = c.getEmitHost(); return (v) => v; }] - }) + }); const transformedFile = ts.transform(sourceFile, [ addTypeAnnotationTransformer(program, moduleResolutionHost), ]); - + const printer = ts.createPrinter({ onlyPrintJsDocStyle: true, newLine: settings.newLine, @@ -137,13 +140,14 @@ ${result.stack} removeComments: false, } as ts.PrinterOptions); - + const resultStr = printer.printFile( transformedFile.transformed[0] as ts.SourceFile ); testFileContent.content = resultStr; - }catch(e) { - console.log(`Test ${testFile} failed to transform`) + } + catch(e) { + console.log(`Test ${testFile} failed to transform`); testFileContent.content = ` ================= CODE MOD ERROR ============== ${e.message} @@ -152,7 +156,7 @@ ${e.stack} debugger; } } - await writeTestCase(caseData, updatedTestFileName) + await writeTestCase(caseData, updatedTestFileName); console.log(`Ran: ${count}`); } } From b3c5b6c03c500ae1c5a7f05d9d7e51b3deafd1c5 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Mon, 8 May 2023 15:22:44 +0000 Subject: [PATCH 011/224] Update the code mode to fix based on diagnotsics Signed-off-by: Hana Joo --- .../src/code-mod/code-transform.ts | 36 +++++++++++++++++-- external-declarations/src/code-mod/index.ts | 4 +-- .../src/code-mod/test-updater.ts | 2 +- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/external-declarations/src/code-mod/code-transform.ts b/external-declarations/src/code-mod/code-transform.ts index cb3b37f384354..9997020892074 100644 --- a/external-declarations/src/code-mod/code-transform.ts +++ b/external-declarations/src/code-mod/code-transform.ts @@ -12,9 +12,24 @@ const declarationEmitNodeBuilderFlags = NodeBuilderFlags.GenerateNamesForShadowedTypeParams | NodeBuilderFlags.NoTruncation; +function sortDiagnostics(a: ts.Diagnostic, b: ts.Diagnostic) { + if (a.start! < b.start!) { + return -1; + } + if (a.start! === b.start!) { + if (a.length === b.length) { + return 0; + } + if (a.length! < b.length!){ + return -1; + } + return 1; + } + return 1; +} // Define a transformer function -export function addTypeAnnotationTransformer(program: ts.Program, moduleResolutionHost?: ts.ModuleResolutionHost) { +export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: ts.Program, moduleResolutionHost?: ts.ModuleResolutionHost) { function tryGetReturnType( typeChecker: ts.TypeChecker, node: ts.SignatureDeclaration @@ -44,8 +59,13 @@ export function addTypeAnnotationTransformer(program: ts.Program, moduleResoluti } const typeChecker = program.getTypeChecker(); + const sortedDiags = program.getDeclarationDiagnostics(sourceFile) + .filter((diag) => diag.code === 9007) + .sort(sortDiagnostics). + map((diag) => { return { start: diag.start!, end: diag.start! + diag.length! };}); return (context: ts.TransformationContext) => { + if (!sortedDiags) return (node: ts.Node) => node; let hasError = false; const reportError = () => { hasError = true; @@ -81,6 +101,7 @@ export function addTypeAnnotationTransformer(program: ts.Program, moduleResoluti return typeNode; } + let diagIndex = 0; // Return a visitor function return (rootNode: ts.Node) => { function updateTypesInNodeArray(nodeArray: ts.NodeArray): ts.NodeArray; @@ -96,7 +117,18 @@ export function addTypeAnnotationTransformer(program: ts.Program, moduleResoluti // Define a visitor function function visit(node: ts.Node): ts.Node | ts.Node[] { - if(ts.isParameter(node) && !node.type) { + // Only visit descendants when there's diagnostics on this location. + while (diagIndex < sortedDiags.length && sortedDiags[diagIndex].start < node.getStart()) { + ++diagIndex; + } + if (diagIndex >= sortedDiags.length) { + return node; + } + if ((node.getStart() !== sortedDiags[diagIndex].start || node.getEnd() !== sortedDiags[diagIndex].end) && + sortedDiags[diagIndex].end > node.getEnd()) { + return node; + } + if (ts.isParameter(node) && !node.type) { const type = typeChecker.getTypeAtLocation(node); if(type) { const typeNode = typeToTypeNode(type, node); diff --git a/external-declarations/src/code-mod/index.ts b/external-declarations/src/code-mod/index.ts index a85323f296d67..48150763788e7 100644 --- a/external-declarations/src/code-mod/index.ts +++ b/external-declarations/src/code-mod/index.ts @@ -5,10 +5,8 @@ import { isDeclarationFileName } from "../compiler/utils"; import { addTypeAnnotationTransformer } from "./code-transform"; (ts as any).Debug .enableDebugInfo(); - // Read tsconfig.json file from disk const tsconfig = ts.readConfigFile("tsconfig.json", ts.sys.readFile); - // Parse JSON content to get compiler options and file names const parsed = ts.parseJsonConfigFileContent(tsconfig.config, ts.sys, "./"); const options = parsed.options; @@ -21,7 +19,7 @@ for (const file of files) { if (isDeclarationFileName(file.fileName)) continue; const transformedFile = ts.transform(file, [ - addTypeAnnotationTransformer(program), + addTypeAnnotationTransformer(file, program), ]); const printer = ts.createPrinter({ diff --git a/external-declarations/src/code-mod/test-updater.ts b/external-declarations/src/code-mod/test-updater.ts index 791370a44c32a..abb57d2729104 100644 --- a/external-declarations/src/code-mod/test-updater.ts +++ b/external-declarations/src/code-mod/test-updater.ts @@ -130,7 +130,7 @@ ${result.stack} }] }); const transformedFile = ts.transform(sourceFile, [ - addTypeAnnotationTransformer(program, moduleResolutionHost), + addTypeAnnotationTransformer(sourceFile, program, moduleResolutionHost), ]); const printer = ts.createPrinter({ From 73d7e24f5b629c5927d9ba46e81076db94ecab1f Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Mon, 8 May 2023 15:54:36 +0000 Subject: [PATCH 012/224] Move functions outside where they don't need local context Signed-off-by: Hana Joo --- .../src/code-mod/code-transform.ts | 50 ++++++++----------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/external-declarations/src/code-mod/code-transform.ts b/external-declarations/src/code-mod/code-transform.ts index 9997020892074..1250991fefd6d 100644 --- a/external-declarations/src/code-mod/code-transform.ts +++ b/external-declarations/src/code-mod/code-transform.ts @@ -28,36 +28,33 @@ function sortDiagnostics(a: ts.Diagnostic, b: ts.Diagnostic) { return 1; } -// Define a transformer function -export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: ts.Program, moduleResolutionHost?: ts.ModuleResolutionHost) { - function tryGetReturnType( - typeChecker: ts.TypeChecker, - node: ts.SignatureDeclaration - ): ts.Type | undefined { - const signature = typeChecker.getSignatureFromDeclaration(node); - if (signature) { - return typeChecker.getReturnTypeOfSignature(signature); - } - } +function isVarConst(node: ts.VariableDeclaration | ts.VariableDeclarationList): boolean { + return !!(ts.getCombinedNodeFlags(node) & ts.NodeFlags.Const); +} - function isVarConst(node: ts.VariableDeclaration | ts.VariableDeclarationList): boolean { - return !!(ts.getCombinedNodeFlags(node) & ts.NodeFlags.Const); - } +function isDeclarationReadonly(declaration: ts.Declaration): boolean { + return !!(ts.getCombinedModifierFlags(declaration) & ts.ModifierFlags.Readonly && !ts.isParameterPropertyDeclaration(declaration, declaration.parent)); +} - function isDeclarationReadonly(declaration: ts.Declaration): boolean { - return !!(ts.getCombinedModifierFlags(declaration) & ts.ModifierFlags.Readonly && !ts.isParameterPropertyDeclaration(declaration, declaration.parent)); +function isLiteralConstDeclaration(node: ts.VariableDeclaration | ts.PropertyDeclaration | ts.PropertySignature | ts.ParameterDeclaration): boolean { + if (isDeclarationReadonly(node) || ts.isVariableDeclaration(node) && isVarConst(node)) { + // TODO: Make sure this is a valid approximation for literal types + return !node.type && "initializer" in node && !!node.initializer && ts.isLiteralExpression(node.initializer); + // Original TS version + // return isFreshLiteralType(getTypeOfSymbol(getSymbolOfNode(node))); } + return false; +} - function isLiteralConstDeclaration(node: ts.VariableDeclaration | ts.PropertyDeclaration | ts.PropertySignature | ts.ParameterDeclaration): boolean { - if (isDeclarationReadonly(node) || ts.isVariableDeclaration(node) && isVarConst(node)) { - // TODO: Make sure this is a valid approximation for literal types - return !node.type && "initializer" in node && !!node.initializer && ts.isLiteralExpression(node.initializer); - // Original TS version - // return isFreshLiteralType(getTypeOfSymbol(getSymbolOfNode(node))); - } - return false; +function tryGetReturnType(typeChecker: ts.TypeChecker, node: ts.SignatureDeclaration): ts.Type | undefined { + const signature = typeChecker.getSignatureFromDeclaration(node); + if (signature) { + return typeChecker.getReturnTypeOfSignature(signature); } +} +// Define a transformer function +export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: ts.Program, moduleResolutionHost?: ts.ModuleResolutionHost) { const typeChecker = program.getTypeChecker(); const sortedDiags = program.getDeclarationDiagnostics(sourceFile) .filter((diag) => diag.code === 9007) @@ -98,7 +95,6 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: hasError = false; return undefined; } - return typeNode; } let diagIndex = 0; @@ -130,7 +126,7 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: } if (ts.isParameter(node) && !node.type) { const type = typeChecker.getTypeAtLocation(node); - if(type) { + if (type) { const typeNode = typeToTypeNode(type, node); return ts.factory.updateParameterDeclaration( node, @@ -159,7 +155,6 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: if (ts.isFunctionDeclaration(node) && !node.type) { const type = tryGetReturnType(typeChecker, node); if(type) { - const typeNode = typeToTypeNode(type, node); return ts.factory.updateFunctionDeclaration( node, @@ -199,7 +194,6 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: if(ts.isMethodSignature(node) && !node.type) { const type = tryGetReturnType(typeChecker, node); if(type) { - const typeNode = typeToTypeNode(type, node); return ts.factory.updateMethodSignature( node, From bb9f64cfb53e33d52d6cb2642100988af12640ec Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Mon, 8 May 2023 16:26:49 +0000 Subject: [PATCH 013/224] Change if statements into switch Signed-off-by: Hana Joo --- .../src/code-mod/code-transform.ts | 317 ++++++++++-------- 1 file changed, 176 insertions(+), 141 deletions(-) diff --git a/external-declarations/src/code-mod/code-transform.ts b/external-declarations/src/code-mod/code-transform.ts index 1250991fefd6d..f729c12ecfaa1 100644 --- a/external-declarations/src/code-mod/code-transform.ts +++ b/external-declarations/src/code-mod/code-transform.ts @@ -124,174 +124,209 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: sortedDiags[diagIndex].end > node.getEnd()) { return node; } - if (ts.isParameter(node) && !node.type) { - const type = typeChecker.getTypeAtLocation(node); - if (type) { - const typeNode = typeToTypeNode(type, node); - return ts.factory.updateParameterDeclaration( - node, - node.modifiers, - node.dotDotDotToken, - node.name, - node.questionToken, + + switch (node.kind) { + case ts.SyntaxKind.Parameter: + const parameter = node as ts.ParameterDeclaration; + if (!parameter.type) { + const type = typeChecker.getTypeAtLocation(node); + if (type) { + const typeNode = typeToTypeNode(type, node); + return ts.factory.updateParameterDeclaration( + parameter, + parameter.modifiers, + parameter.dotDotDotToken, + parameter.name, + parameter.questionToken, + typeNode, + parameter.initializer + ); + } + } + break; + case ts.SyntaxKind.VariableDeclaration: + const variableDeclaration = node as ts.VariableDeclaration; + if (!variableDeclaration.type && !isLiteralConstDeclaration(variableDeclaration)) { + const type = typeChecker.getTypeAtLocation(variableDeclaration); + const typeNode = typeToTypeNode(type, variableDeclaration); + return ts.factory.updateVariableDeclaration( + variableDeclaration, + variableDeclaration.name, + /**exclamationToken=*/ undefined, typeNode, - node.initializer + variableDeclaration.initializer ); } - } - // Check if node is a variable declaration - if (ts.isVariableDeclaration(node) && !node.type && !isLiteralConstDeclaration(node)) { - const type = typeChecker.getTypeAtLocation(node); - const typeNode = typeToTypeNode(type, node); - return ts.factory.updateVariableDeclaration( - node, - node.name, - /**exclamationToken=*/undefined, - typeNode, - node.initializer - ); - } - - if (ts.isFunctionDeclaration(node) && !node.type) { - const type = tryGetReturnType(typeChecker, node); - if(type) { + break; + case ts.SyntaxKind.FunctionDeclaration: + const functionDecl = node as ts.FunctionDeclaration; + if (!functionDecl.type) { + const type = tryGetReturnType(typeChecker, functionDecl); + if(type) { + const typeNode = typeToTypeNode(type, functionDecl); + return ts.factory.updateFunctionDeclaration( + functionDecl, + functionDecl.modifiers, + functionDecl.asteriskToken, + functionDecl.name, + updateTypesInNodeArray(functionDecl.typeParameters), + updateTypesInNodeArray(functionDecl.parameters), + typeNode, + functionDecl.body + ); + } + } + break; + case ts.SyntaxKind.PropertySignature: + const propertySignature = node as ts.PropertySignature; + if(!propertySignature.type && !isLiteralConstDeclaration(propertySignature)) { + const type = typeChecker.getTypeAtLocation(node); const typeNode = typeToTypeNode(type, node); - return ts.factory.updateFunctionDeclaration( - node, - node.modifiers, - node.asteriskToken, - node.name, - updateTypesInNodeArray(node.typeParameters), - updateTypesInNodeArray(node.parameters), + return ts.factory.updatePropertySignature( + propertySignature, + propertySignature.modifiers, + propertySignature.name, + propertySignature.questionToken, typeNode, - node.body ); } - } - if(ts.isPropertySignature(node) && !node.type && !isLiteralConstDeclaration(node)) { - const type = typeChecker.getTypeAtLocation(node); - const typeNode = typeToTypeNode(type, node); - return ts.factory.updatePropertySignature( - node, - node.modifiers, - node.name, - node.questionToken, - typeNode, - ); - } - if(ts.isPropertyDeclaration(node) && !node.type && !isLiteralConstDeclaration(node)) { - const type = typeChecker.getTypeAtLocation(node); - const typeNode = typeToTypeNode(type, node); - return ts.factory.updatePropertyDeclaration( - node, - node.modifiers, - node.name, - node.questionToken ?? node.exclamationToken, - typeNode, - node.initializer - ); - } - if(ts.isMethodSignature(node) && !node.type) { - const type = tryGetReturnType(typeChecker, node); - if(type) { - const typeNode = typeToTypeNode(type, node); - return ts.factory.updateMethodSignature( - node, - node.modifiers, - node.name, - node.questionToken, - updateTypesInNodeArray(node.typeParameters), - updateTypesInNodeArray(node.parameters), + break; + case ts.SyntaxKind.PropertyDeclaration: + const propDecl = node as ts.PropertyDeclaration; + if(!propDecl.type && !isLiteralConstDeclaration(propDecl)) { + const type = typeChecker.getTypeAtLocation(node); + const typeNode = typeToTypeNode(type, propDecl); + return ts.factory.updatePropertyDeclaration( + propDecl, + propDecl.modifiers, + propDecl.name, + propDecl.questionToken ?? propDecl.exclamationToken, typeNode, + propDecl.initializer ); } - } - if(ts.isCallSignatureDeclaration(node)) { - const type = tryGetReturnType(typeChecker, node); + break; + case ts.SyntaxKind.MethodSignature: + const methodSignature = node as ts.MethodSignature; + if(!methodSignature.type) { + const type = tryGetReturnType(typeChecker, methodSignature); + if(type) { + const typeNode = typeToTypeNode(type, node); + return ts.factory.updateMethodSignature( + methodSignature, + methodSignature.modifiers, + methodSignature.name, + methodSignature.questionToken, + updateTypesInNodeArray(methodSignature.typeParameters), + updateTypesInNodeArray(methodSignature.parameters), + typeNode, + ); + } + } + break; + case ts.SyntaxKind.CallSignature: + const callSignature = node as ts.CallSignatureDeclaration; + const type = tryGetReturnType(typeChecker, callSignature); if(type) { const typeNode = typeToTypeNode(type, node); return ts.factory.updateCallSignature( - node, - updateTypesInNodeArray(node.typeParameters), - updateTypesInNodeArray(node.parameters), + callSignature, + updateTypesInNodeArray(callSignature.typeParameters), + updateTypesInNodeArray(callSignature.parameters), typeNode, ); } - } - if(ts.isMethodDeclaration(node) && !node.type) { - const type = tryGetReturnType(typeChecker, node); - if(type) { - - const typeNode = typeToTypeNode(type, node); - return ts.factory.updateMethodDeclaration( - node, - node.modifiers, - node.asteriskToken, - node.name, - node.questionToken, - updateTypesInNodeArray(node.typeParameters), - updateTypesInNodeArray(node.parameters), - typeNode, - node.body, - ); + break; + case ts.SyntaxKind.MethodDeclaration: + const methodDeclaration = node as ts.MethodDeclaration; + if(!methodDeclaration.type) { + const type = tryGetReturnType(typeChecker, methodDeclaration); + if(type) { + const typeNode = typeToTypeNode(type, node); + return ts.factory.updateMethodDeclaration( + methodDeclaration, + methodDeclaration.modifiers, + methodDeclaration.asteriskToken, + methodDeclaration.name, + methodDeclaration.questionToken, + updateTypesInNodeArray(methodDeclaration.typeParameters), + updateTypesInNodeArray(methodDeclaration.parameters), + typeNode, + methodDeclaration.body, + ); + } } - } - if(ts.isGetAccessorDeclaration(node) && !node.type) { - const type = tryGetReturnType(typeChecker, node); - if(type) { - const typeNode = typeToTypeNode(type, node); - return ts.factory.updateGetAccessorDeclaration( - node, - node.modifiers, - node.name, - updateTypesInNodeArray(node.parameters), - typeNode, - node.body, + break; + case ts.SyntaxKind.GetAccessor: + const getAccessor = node as ts.GetAccessorDeclaration; + if(!getAccessor.type) { + const returnType = tryGetReturnType(typeChecker, getAccessor); + if(returnType) { + const typeNode = typeToTypeNode(returnType, node); + return ts.factory.updateGetAccessorDeclaration( + getAccessor, + getAccessor.modifiers, + getAccessor.name, + updateTypesInNodeArray(getAccessor.parameters), + typeNode, + getAccessor.body, + ); + } + } + break; + case ts.SyntaxKind.SetAccessor: + const setAccessor = node as ts.SetAccessorDeclaration; + if(!setAccessor.parameters[0]?.type) { + return ts.factory.updateSetAccessorDeclaration( + setAccessor, + setAccessor.modifiers, + setAccessor.name, + updateTypesInNodeArray(setAccessor.parameters), + setAccessor.body, ); } - } - if(ts.isSetAccessorDeclaration(node) && !node.parameters[0]?.type) { - return ts.factory.updateSetAccessorDeclaration( - node, - node.modifiers, - node.name, - updateTypesInNodeArray(node.parameters), - node.body, - ); - } - if (ts.isConstructorDeclaration(node)) { + break; + case ts.SyntaxKind.Constructor: + const constructor = node as ts.ConstructorDeclaration; return ts.factory.updateConstructorDeclaration( - node, - node.modifiers, - updateTypesInNodeArray(node.parameters), - node.body, + constructor, + constructor.modifiers, + updateTypesInNodeArray(constructor.parameters), + constructor.body, ); - } - if(ts.isConstructSignatureDeclaration(node)) { - const type = tryGetReturnType(typeChecker, node); - if(type) { - const typeNode = typeToTypeNode(type, node); + case ts.SyntaxKind.ConstructSignature: + const constructorSignature = node as ts.ConstructSignatureDeclaration; + const typeConstructor = tryGetReturnType(typeChecker, constructorSignature); + if(typeConstructor) { + const typeNode = typeToTypeNode(typeConstructor, constructorSignature); return ts.factory.updateConstructSignature( - node, - updateTypesInNodeArray(node.typeParameters), - updateTypesInNodeArray(node.parameters), + constructorSignature, + updateTypesInNodeArray(constructorSignature.typeParameters), + updateTypesInNodeArray(constructorSignature.parameters), typeNode, ); } - } - if(ts.isExportAssignment(node) && node.expression.kind !== ts.SyntaxKind.Identifier) { - const type = typeChecker.getTypeAtLocation(node.expression); - if(type) { - const typeNode = typeToTypeNode(type, node); - const newId = ts.factory.createIdentifier("_default"); - const varDecl = ts.factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, typeNode, /*initializer*/ undefined); - const statement = ts.factory.createVariableStatement( - [], - ts.factory.createVariableDeclarationList([varDecl], ts.NodeFlags.Const) - ); - return [statement, ts.factory.updateExportAssignment(node, node.modifiers, newId)]; + break; + case ts.SyntaxKind.ExportAssignment: + const exportAssignment = node as ts.ExportAssignment; + if(exportAssignment.expression.kind !== ts.SyntaxKind.Identifier) { + const type = typeChecker.getTypeAtLocation(exportAssignment.expression); + if(type) { + const typeNode = typeToTypeNode(type, exportAssignment); + const newId = ts.factory.createIdentifier("_default"); + const varDecl = ts.factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, typeNode, /*initializer*/ undefined); + const statement = ts.factory.createVariableStatement( + [], + ts.factory.createVariableDeclarationList([varDecl], ts.NodeFlags.Const) + ); + return [statement, ts.factory.updateExportAssignment(exportAssignment, exportAssignment.modifiers, newId)]; + } } + break; + default: + break; } + // Otherwise, visit each child node recursively return ts.visitEachChild(node, visit, context); } From aa2e90062511aca07ffe9d6f76765431b818a733 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Tue, 16 May 2023 13:20:30 +0000 Subject: [PATCH 014/224] Add tests for code-mode fixer Signed-off-by: Hana Joo --- .../fixer-test/expected/array_literals.ts | 4 + .../fixer-test/expected/basic_types.ts | 11 ++ .../expected/expressions_in_objects.ts | 31 ++++ .../fixer-test/expected/function_return.ts | 54 ++++++ .../expected/function_signatures_objects.ts | 51 ++++++ .../fixer-test/expected/object_literals.ts | 16 ++ .../fixer-test/source/array_literals.ts | 5 + .../fixer-test/source/basic_types.ts | 15 ++ .../source/expressions_in_objects.ts | 27 +++ .../fixer-test/source/function_return.ts | 59 ++++++ .../source/function_signatures_objects.ts | 51 ++++++ .../fixer-test/source/object_literals.ts | 19 ++ external-declarations/package.json | 4 +- .../src/code-mod/fixer-test.ts | 171 ++++++++++++++++++ 14 files changed, 517 insertions(+), 1 deletion(-) create mode 100644 external-declarations/fixer-test/expected/array_literals.ts create mode 100644 external-declarations/fixer-test/expected/basic_types.ts create mode 100644 external-declarations/fixer-test/expected/expressions_in_objects.ts create mode 100644 external-declarations/fixer-test/expected/function_return.ts create mode 100644 external-declarations/fixer-test/expected/function_signatures_objects.ts create mode 100644 external-declarations/fixer-test/expected/object_literals.ts create mode 100644 external-declarations/fixer-test/source/array_literals.ts create mode 100644 external-declarations/fixer-test/source/basic_types.ts create mode 100644 external-declarations/fixer-test/source/expressions_in_objects.ts create mode 100644 external-declarations/fixer-test/source/function_return.ts create mode 100644 external-declarations/fixer-test/source/function_signatures_objects.ts create mode 100644 external-declarations/fixer-test/source/object_literals.ts create mode 100644 external-declarations/src/code-mod/fixer-test.ts diff --git a/external-declarations/fixer-test/expected/array_literals.ts b/external-declarations/fixer-test/expected/array_literals.ts new file mode 100644 index 0000000000000..4f3825a08305d --- /dev/null +++ b/external-declarations/fixer-test/expected/array_literals.ts @@ -0,0 +1,4 @@ +export const a = [42, 34] as const; +const b = [42, 34] as const; +export const c = [42, 34]; +const d = [42, 34]; diff --git a/external-declarations/fixer-test/expected/basic_types.ts b/external-declarations/fixer-test/expected/basic_types.ts new file mode 100644 index 0000000000000..cbaaf935bd958 --- /dev/null +++ b/external-declarations/fixer-test/expected/basic_types.ts @@ -0,0 +1,11 @@ +function foo() { + return 42; +} +export const a: number = foo(); +const b = foo(); +export const c = 42; +const d = 42; +export const e = "42"; +const f = "42"; +export const g: "42" | "43" = foo() === 0 ? "42" : "43"; +const h = foo() === 0 ? "42" : "43"; diff --git a/external-declarations/fixer-test/expected/expressions_in_objects.ts b/external-declarations/fixer-test/expected/expressions_in_objects.ts new file mode 100644 index 0000000000000..fac35b4349573 --- /dev/null +++ b/external-declarations/fixer-test/expected/expressions_in_objects.ts @@ -0,0 +1,31 @@ +function makeResource(identifier: string): string { + return identifier; +} +export const resourceObject: { + readonly Label: string; + readonly Button: string; +} = { + Label: makeResource("Label"), + Button: makeResource("Label") +} as const; +const resourceObject2 = { + Label: makeResource("Label"), + Button: makeResource("Label") +} as const; +export const nestedObjects: { + nested: { + Label: string; + Button: string; + }; +} = { + nested: { + Label: makeResource("Label"), + Button: makeResource("Label") + } +}; +const nestedObjects2 = { + nested: { + Label: makeResource("Label"), + Button: makeResource("Label") + } +}; diff --git a/external-declarations/fixer-test/expected/function_return.ts b/external-declarations/fixer-test/expected/function_return.ts new file mode 100644 index 0000000000000..c3fa162eaba7a --- /dev/null +++ b/external-declarations/fixer-test/expected/function_return.ts @@ -0,0 +1,54 @@ +export function foo(a: number): string | 42 { + if (a === 3) { + return 42; + } + return String(a); +} +function foo2(a: number) { + if (a === 3) { + return 42; + } + return String(a); +} +export function singleReturn() { + return 42; +} +function singleReturn2() { + return 42; +} +export function singleReturnNonLiteral(): string | 42 { + return foo(2); +} +function singleReturnNonLiteral2() { + return foo(2); +} +export function multipleReturn(a: number) { + if (a === 0) { + return 42; + } + return 43; +} +function multipleReturn2(a: number) { + if (a === 0) { + return 42; + } + return 43; +} +function makeResource(identifier: string): string { + return identifier; +} +export function returnObjectLiteral(): { + Label: string; + Button: string; +} { + return { + Label: makeResource("Label"), + Button: makeResource("Label") + }; +} +export function returnObjectLiteral2() { + return { + Label: 42, + Button: "42" + }; +} diff --git a/external-declarations/fixer-test/expected/function_signatures_objects.ts b/external-declarations/fixer-test/expected/function_signatures_objects.ts new file mode 100644 index 0000000000000..c2ff3c909354a --- /dev/null +++ b/external-declarations/fixer-test/expected/function_signatures_objects.ts @@ -0,0 +1,51 @@ +function foo() { + return 42; +} +export const a = { + value: 0, + array: [1, 2, 3], + fn(value: string): number { return 0; } +} as const; +const b = { + value: 0, + array: [1, 2, 3], + fn(value: string): number { return 0; } +} as const; +export const c = { + value: 0, + array: [1, 2, 3], + fn(value: string): number { return 0; } +}; +const d = { + value: 0, + array: [1, 2, 3], + fn(value: string): number { return 0; } +}; +export const e: { + readonly value: number; + readonly array: readonly [1, 2, 3]; + readonly fn: (value: string) => number; +} = { + value: foo(), + array: [1, 2, 3], + fn(value: string): number { return 0; } +} as const; +const f = { + value: foo(), + array: [1, 2, 3], + fn(value: string): number { return 0; } +} as const; +export const g: { + value: number; + array: number[]; + fn(value: string): number; +} = { + value: foo(), + array: [1, 2, 3], + fn(value: string): number { return 0; } +}; +const h = { + value: foo(), + array: [1, 2, 3], + fn(value: string): number { return 0; } +}; diff --git a/external-declarations/fixer-test/expected/object_literals.ts b/external-declarations/fixer-test/expected/object_literals.ts new file mode 100644 index 0000000000000..b395bb514d664 --- /dev/null +++ b/external-declarations/fixer-test/expected/object_literals.ts @@ -0,0 +1,16 @@ +export const a = { + value: 0, + array: [1, 2, 3] +} as const; +const b = { + value: 0, + array: [1, 2, 3] +} as const; +export const c = { + value: 0, + array: [1, 2, 3] +}; +const d = { + value: 0, + array: [1, 2, 3] +}; diff --git a/external-declarations/fixer-test/source/array_literals.ts b/external-declarations/fixer-test/source/array_literals.ts new file mode 100644 index 0000000000000..c2c47dd0b0a75 --- /dev/null +++ b/external-declarations/fixer-test/source/array_literals.ts @@ -0,0 +1,5 @@ +export const a = [42, 34] as const; +const b = [42, 34] as const; + +export const c = [42, 34]; +const d = [42, 34]; diff --git a/external-declarations/fixer-test/source/basic_types.ts b/external-declarations/fixer-test/source/basic_types.ts new file mode 100644 index 0000000000000..7e291952c2ec2 --- /dev/null +++ b/external-declarations/fixer-test/source/basic_types.ts @@ -0,0 +1,15 @@ +function foo() { + return 42; +} + +export const a = foo(); +const b = foo(); + +export const c = 42; +const d = 42; + +export const e = "42"; +const f = "42"; + +export const g = foo() === 0? "42": "43"; +const h = foo() === 0? "42": "43"; \ No newline at end of file diff --git a/external-declarations/fixer-test/source/expressions_in_objects.ts b/external-declarations/fixer-test/source/expressions_in_objects.ts new file mode 100644 index 0000000000000..77c8a2dac2421 --- /dev/null +++ b/external-declarations/fixer-test/source/expressions_in_objects.ts @@ -0,0 +1,27 @@ +function makeResource(identifier: string): string { + return identifier; +} + +export const resourceObject = { + Label: makeResource("Label"), + Button: makeResource("Label") +} as const; + +const resourceObject2 = { + Label: makeResource("Label"), + Button: makeResource("Label") +} as const; + +export const nestedObjects = { + nested: { + Label: makeResource("Label"), + Button: makeResource("Label") + } +}; + +const nestedObjects2 = { + nested: { + Label: makeResource("Label"), + Button: makeResource("Label") + } +}; \ No newline at end of file diff --git a/external-declarations/fixer-test/source/function_return.ts b/external-declarations/fixer-test/source/function_return.ts new file mode 100644 index 0000000000000..c5de10fe95287 --- /dev/null +++ b/external-declarations/fixer-test/source/function_return.ts @@ -0,0 +1,59 @@ +export function foo(a: number) { + if (a === 3) { + return 42; + } + return String(a); +} + +function foo2(a: number) { + if (a === 3) { + return 42; + } + return String(a); +} + +export function singleReturn() { + return 42; +} + +function singleReturn2() { + return 42; +} + +export function singleReturnNonLiteral() { + return foo(2); +} + +function singleReturnNonLiteral2() { + return foo(2); +} + +export function multipleReturn(a: number) { + if (a === 0) { + return 42; + } + return 43; +} + +function multipleReturn2(a: number) { + if (a === 0) { + return 42; + } + return 43; +} + +function makeResource(identifier: string): string { + return identifier; +} +export function returnObjectLiteral() { + return { + Label: makeResource("Label"), + Button: makeResource("Label") + }; +} +export function returnObjectLiteral2() { + return { + Label: 42, + Button: "42" + }; +} diff --git a/external-declarations/fixer-test/source/function_signatures_objects.ts b/external-declarations/fixer-test/source/function_signatures_objects.ts new file mode 100644 index 0000000000000..9b7c85a66794f --- /dev/null +++ b/external-declarations/fixer-test/source/function_signatures_objects.ts @@ -0,0 +1,51 @@ +function foo() { + return 42; +} +export const a = { + value: 0, + array: [1, 2, 3], + fn(value: string): number { return 0; }, +} as const; + +const b = { + value: 0, + array: [1, 2, 3], + fn(value: string): number { return 0; }, +} as const; + +export const c = { + value: 0, + array: [1, 2, 3], + fn(value: string): number { return 0; }, +}; + +const d = { + value: 0, + array: [1, 2, 3], + fn(value: string): number { return 0; }, +}; + +export const e = { + value: foo(), + array: [1, 2, 3], + fn(value: string): number { return 0; }, +} as const; + +const f = { + value: foo(), + array: [1, 2, 3], + fn(value: string): number { return 0; }, +} as const; + + +export const g = { + value: foo(), + array: [1, 2, 3], + fn(value: string): number { return 0; }, +}; + +const h = { + value: foo(), + array: [1, 2, 3], + fn(value: string): number { return 0; }, +}; diff --git a/external-declarations/fixer-test/source/object_literals.ts b/external-declarations/fixer-test/source/object_literals.ts new file mode 100644 index 0000000000000..cf86c77c0914f --- /dev/null +++ b/external-declarations/fixer-test/source/object_literals.ts @@ -0,0 +1,19 @@ +export const a = { + value: 0, + array: [1, 2, 3], +} as const; + +const b = { + value: 0, + array: [1, 2, 3], +} as const; + +export const c = { + value: 0, + array: [1, 2, 3], +}; + +const d = { + value: 0, + array: [1, 2, 3], +}; diff --git a/external-declarations/package.json b/external-declarations/package.json index 03bb633ab6eb7..50d826e6070ee 100644 --- a/external-declarations/package.json +++ b/external-declarations/package.json @@ -11,7 +11,9 @@ "transform-tests-parallel": "node ./build/code-mod/parallel-run.js --rootPaths=../tests/cases --shardCount=8", "transform-test": "node ./build/code-mod/test-updater.js --rootPaths=../tests/cases", "run-transformed-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=./tsc-tests/updated-tests --libPath=../tests/lib --type=all --shardCount=8", - "run-transformed-test": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=c:/dev/TSC/TypeScript/tests/cases " + "run-transformed-test": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=c:/dev/TSC/TypeScript/tests/cases ", + "fixer-test": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source ", + "fixer-test-update": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source --update " }, "author": "", "license": "ISC", diff --git a/external-declarations/src/code-mod/fixer-test.ts b/external-declarations/src/code-mod/fixer-test.ts new file mode 100644 index 0000000000000..dccb132820037 --- /dev/null +++ b/external-declarations/src/code-mod/fixer-test.ts @@ -0,0 +1,171 @@ +import "source-map-support/register"; + +import * as fs from "fs/promises"; +import * as fsPath from "path"; + +import { normalizePath } from "../compiler/path-utils"; +import { isRelevantTestFile, loadTestCase } from "../test-runner/utils"; +import { ArgType, parseArgs,parserConfiguration } from "../utils/cli-parser"; +import ts = require("typescript"); +import { compileFiles, setCompilerOptionsFromHarnessSetting, TestFile } from "../test-runner/tsc-infrastructure/compiler-run"; +import { splitContentByNewlines, TestCaseContent, TestUnitData } from "../test-runner/tsc-infrastructure/test-file-parser"; +import { ensureDir, readAllFiles } from "../utils/fs-utils"; +import { addTypeAnnotationTransformer } from "./code-transform"; + +(ts as any).Debug .enableDebugInfo(); + +export const testRunnerCLIConfiguration = parserConfiguration({ + default: { + type: ArgType.String(), + description: "Test filter to run", + }, + rootPaths: ArgType.StringArray(), + shard: ArgType.Number(), + shardCount: ArgType.Number(), + update: ArgType.Boolean(), +}); + +const excludeFilter =/\/fourslash\//; +const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), testRunnerCLIConfiguration); +printUsageOnErrors(); + +const rootCasePaths = parsedArgs.rootPaths ?? [ "./tests/sources" ]; +const filter = parsedArgs.default ? new RegExp(parsedArgs.default) : /.*\.ts/; + +const shard = parsedArgs.shard; +const shardCount = parsedArgs.shardCount; + +const allTests = rootCasePaths + .flatMap(r => readAllFiles(r, filter).map((file) => ({ file, root: r }))) + .filter(f => !excludeFilter.exec(f.file)); + + + +async function compareTestCase(testData: TestCaseContent & { BOM: string }, path: string, update: boolean) { + const lines = splitContentByNewlines(testData.code); + const result: string[] = []; + let copyFrom = 0; + function pushFrom(target: string[], source: string[], from = 0, to: number = source.length) { + for(let i = from; i< to; i++) { + target.push(source[i]); + } + } + for (const file of testData.testUnitData) { + if(file.content === undefined) continue; + + pushFrom(result, lines, copyFrom, file.startLine); + + pushFrom(result, splitContentByNewlines(file.content)); + + copyFrom = file.endLine + 1; + } + pushFrom(result, lines, copyFrom, lines.length); + await ensureDir(fsPath.dirname(path)); + const content = testData.BOM + result.join(lines.delimiter); + const original = await fs.readFile(path, "utf-8"); + if (content !== original) { + if (!update) { + throw new Error(`Expected \n${original}\n for file ${path} but seen \n${content}`); + } + else { + fs.writeFile(path, content); + } + } +} + +async function main() { + const testsPerShared = shardCount && Math.round(allTests.length / shardCount); + const [start, end] = shard === undefined || shardCount === undefined || testsPerShared === undefined ? + [0, allTests.length] : + [shard * testsPerShared, (shard === shardCount - 1) ? allTests.length : (shard + 1) * testsPerShared]; + + + for (let count = start; count < end; count++) { + const testFile = normalizePath(allTests[count].file); + const caseData = await loadTestCase(testFile); + + const settings: ts.CompilerOptions = {}; + setCompilerOptionsFromHarnessSetting(caseData.settings, settings); + + function createHarnessTestFile(lastUnit: TestUnitData): TestFile { + return { unitName: lastUnit.name, content: lastUnit.content, fileOptions: lastUnit.fileOptions }; + } + + const toBeCompiled = caseData.testUnitData.map(unit => { + return createHarnessTestFile(unit); + }); + + const updatedTestFileName = testFile.replace("fixer-test/source", "fixer-test/expected"); + const result = (() => { + try { + return compileFiles(toBeCompiled, [], { + declaration: "true", + isolatedDeclarations: "true", + removeComments: "false", + }, settings, /**currentDirectory=*/ undefined); + } + catch(e) { + return e as Error; + } + })(); + if(result instanceof Error) { + fs.writeFile(updatedTestFileName, ` +================= CODE MOD ERROR ============== +${result.message} +${result.stack} +`); + continue; + } + const program = result.program!; + + + + for(const testFileContent of caseData.testUnitData) { + if(!isRelevantTestFile(testFileContent)) continue; + try { + const sourceFile = program.getSourceFile(testFileContent.name)!; + program.getDeclarationDiagnostics(sourceFile); + + if(!sourceFile) continue; + let moduleResolutionHost: ts.ModuleResolutionHost | undefined; + program.emit(sourceFile, /**writeFile=*/ undefined, /**cancellationToken=*/ undefined, /**emitOnlyDtsFiles=*/ true, { + afterDeclarations:[ + (c) => { + // @ts-expect-error getEmitHost is not exposed + moduleResolutionHost = c.getEmitHost(); + return (v) => v; + }] + }); + const transformedFile = ts.transform(sourceFile, [ + addTypeAnnotationTransformer(sourceFile, program, moduleResolutionHost), + ]); + + const printer = ts.createPrinter({ + onlyPrintJsDocStyle: true, + newLine: settings.newLine, + target: settings.target, + removeComments: false, + } as ts.PrinterOptions); + + + const resultStr = printer.printFile( + transformedFile.transformed[0] as ts.SourceFile + ); + testFileContent.content = resultStr; + } + catch(e) { + console.log(`Test ${testFile} failed to transform`); + testFileContent.content = ` +================= CODE MOD ERROR ============== +${e.message} +${e.stack} +`; + debugger; + } + } + await compareTestCase(caseData, updatedTestFileName, parsedArgs.update === true); + console.log(`Ran: ${count}`); + } +} + +main(); \ No newline at end of file From dd14ea3662497512a9556b7f24c2cdf784e5ff73 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 23 May 2023 08:38:55 +0100 Subject: [PATCH 015/224] Improve local inference. --- .../src/compiler/declaration-emit.ts | 190 +++++++++++++----- .../tsc-infrastructure/compiler.ts | 3 +- .../src/test-runner/tsc-infrastructure/io.ts | 2 +- .../src/test-runner/utils.ts | 19 +- src/compiler/transformers/declarations.ts | 188 ++++++++++++----- 5 files changed, 300 insertions(+), 102 deletions(-) diff --git a/external-declarations/src/compiler/declaration-emit.ts b/external-declarations/src/compiler/declaration-emit.ts index f13b7ed2d36e4..1bee81f4d8957 100644 --- a/external-declarations/src/compiler/declaration-emit.ts +++ b/external-declarations/src/compiler/declaration-emit.ts @@ -1,4 +1,4 @@ -import { Symbol, SourceFile, DiagnosticWithLocation, factory, CommentRange, Node, getParseTreeNode, SyntaxKind, SignatureDeclaration, ParameterDeclaration, getTrailingCommentRanges, getLeadingCommentRanges, NodeBuilderFlags, VisitResult, ExportAssignment, DeclarationName, Declaration, ModuleDeclaration, SymbolFlags, getNameOfDeclaration, isExportAssignment, Bundle, visitNodes, setTextRange, createUnparsedSourceFile, FileReference, NodeArray, Statement, isExternalModule, isImportEqualsDeclaration, isExternalModuleReference, isStringLiteralLike, isImportDeclaration, isStringLiteral, UnparsedSource, isUnparsedSource, BindingName, ArrayBindingElement, isIdentifier, ModifierFlags, TypeNode, FunctionDeclaration, MethodDeclaration, GetAccessorDeclaration, SetAccessorDeclaration, BindingElement, ConstructSignatureDeclaration, VariableDeclaration, MethodSignature, CallSignatureDeclaration, PropertyDeclaration, PropertySignature, visitNode, isPropertySignature, NamedDeclaration, isFunctionDeclaration, OmittedExpression, isOmittedExpression, AccessorDeclaration, isSetAccessorDeclaration, TypeParameterDeclaration, isSourceFile, isTypeAliasDeclaration, isModuleDeclaration, isClassDeclaration, isInterfaceDeclaration, isFunctionLike, isIndexSignatureDeclaration, isMappedTypeNode, EntityNameOrEntityNameExpression, setCommentRange, getCommentRange, ImportEqualsDeclaration, ImportDeclaration, ExportDeclaration, ImportTypeNode, StringLiteral, AssertClause, isSemicolonClassElement, isMethodDeclaration, isMethodSignature, isTypeQueryNode, isEntityName, visitEachChild, isPrivateIdentifier, isTypeNode, isTupleTypeNode, getLineAndCharacterOfPosition, setEmitFlags, EmitFlags, setOriginalNode, GeneratedIdentifierFlags, NodeFlags, canHaveModifiers, isTypeParameterDeclaration, NamespaceDeclaration, Identifier, VariableStatement, isPropertyAccessExpression, unescapeLeadingUnderscores, ModuleBody, BindingPattern, isExportDeclaration, HasModifiers, Modifier, isModifier, HeritageClause, InterfaceDeclaration, ClassDeclaration, TypeAliasDeclaration, EnumDeclaration, ConstructorDeclaration, IndexSignatureDeclaration, ExpressionWithTypeArguments, TypeReferenceNode, ConditionalTypeNode, FunctionTypeNode, ConstructorTypeNode, isStatement, isArrayBindingElement, isBindingElement, isClassElement, isExpressionWithTypeArguments, isLiteralExpression, isTypeElement, isVariableDeclaration, NodeFactory, isTypeAssertionExpression, isNumericLiteral, isTemplateLiteral, BooleanLiteral, TypeAssertion, LiteralExpression, AsExpression, isTypeReferenceNode, ObjectLiteralExpression, TypeElement, isPropertyAssignment, ArrayLiteralExpression, isSpreadElement, FunctionExpression, ArrowFunction, isParameter, isPropertyName, NewExpression, KeywordTypeSyntaxKind, isPropertyDeclaration, isReturnStatement, isClassLike, ReturnStatement, forEachChild, TypeLiteralNode, __String, isTypeLiteralNode, isLiteralTypeNode, TemplateExpression, TemplateLiteralTypeSpan, TemplateHead, isNoSubstitutionTemplateLiteral, isTypeOfExpression, PrefixUnaryOperator } from "typescript"; +import { Symbol, SourceFile, DiagnosticWithLocation, factory, CommentRange, Node, getParseTreeNode, SyntaxKind, SignatureDeclaration, ParameterDeclaration, getTrailingCommentRanges, getLeadingCommentRanges, NodeBuilderFlags, VisitResult, ExportAssignment, DeclarationName, Declaration, ModuleDeclaration, SymbolFlags, getNameOfDeclaration, isExportAssignment, Bundle, visitNodes, setTextRange, createUnparsedSourceFile, FileReference, NodeArray, Statement, isExternalModule, isImportEqualsDeclaration, isExternalModuleReference, isStringLiteralLike, isImportDeclaration, isStringLiteral, UnparsedSource, isUnparsedSource, BindingName, ArrayBindingElement, isIdentifier, ModifierFlags, TypeNode, FunctionDeclaration, MethodDeclaration, GetAccessorDeclaration, SetAccessorDeclaration, BindingElement, ConstructSignatureDeclaration, VariableDeclaration, MethodSignature, CallSignatureDeclaration, PropertyDeclaration, PropertySignature, visitNode, isPropertySignature, NamedDeclaration, isFunctionDeclaration, OmittedExpression, isOmittedExpression, AccessorDeclaration, isSetAccessorDeclaration, TypeParameterDeclaration, isSourceFile, isTypeAliasDeclaration, isModuleDeclaration, isClassDeclaration, isInterfaceDeclaration, isFunctionLike, isIndexSignatureDeclaration, isMappedTypeNode, EntityNameOrEntityNameExpression, setCommentRange, getCommentRange, ImportEqualsDeclaration, ImportDeclaration, ExportDeclaration, ImportTypeNode, StringLiteral, AssertClause, isSemicolonClassElement, isMethodDeclaration, isMethodSignature, isTypeQueryNode, isEntityName, visitEachChild, isPrivateIdentifier, isTypeNode, isTupleTypeNode, getLineAndCharacterOfPosition, setEmitFlags, EmitFlags, setOriginalNode, GeneratedIdentifierFlags, NodeFlags, canHaveModifiers, isTypeParameterDeclaration, NamespaceDeclaration, Identifier, VariableStatement, isPropertyAccessExpression, unescapeLeadingUnderscores, ModuleBody, BindingPattern, isExportDeclaration, HasModifiers, Modifier, isModifier, HeritageClause, InterfaceDeclaration, ClassDeclaration, TypeAliasDeclaration, EnumDeclaration, ConstructorDeclaration, IndexSignatureDeclaration, ExpressionWithTypeArguments, TypeReferenceNode, ConditionalTypeNode, FunctionTypeNode, ConstructorTypeNode, isStatement, isArrayBindingElement, isBindingElement, isClassElement, isExpressionWithTypeArguments, isLiteralExpression, isTypeElement, isVariableDeclaration, NodeFactory, isTypeAssertionExpression, isNumericLiteral, isTemplateLiteral, BooleanLiteral, TypeAssertion, LiteralExpression, AsExpression, isTypeReferenceNode, ObjectLiteralExpression, TypeElement, isPropertyAssignment, ArrayLiteralExpression, isSpreadElement, FunctionExpression, ArrowFunction, isParameter, isPropertyName, NewExpression, KeywordTypeSyntaxKind, isPropertyDeclaration, isReturnStatement, isClassLike, ReturnStatement, forEachChild, TypeLiteralNode, __String, isTypeLiteralNode, isLiteralTypeNode, TemplateExpression, TemplateLiteralTypeSpan, TemplateHead, isNoSubstitutionTemplateLiteral, isTypeOfExpression, PrefixUnaryOperator, isYieldExpression, YieldExpression, isBlock, EntityName } from "typescript"; import { Debug } from "./debug"; import { Diagnostics } from "./diagnosticInformationMap.generated"; import { filter, stringContains, concatenate, last, forEach, length, pushIfUnique, map, mapDefined, arrayFrom, contains, startsWith, some, append, emptyArray, isArray, compact, flatMap, flatten, orderedRemoveItem, tryCast, findIndex } from "./lang-utils"; @@ -15,6 +15,7 @@ import { NoSubstitutionTemplateLiteral } from "typescript"; import { ParenthesizedExpression } from "typescript"; +const NO_LOCAL_INFERENCE = !!process.env.NO_LOCAL_INFERENCE; enum NarrowBehavior { None = 0, AsConst = 1, @@ -523,6 +524,9 @@ export function transformDeclarations(context: TransformationContext) { function ensureNoInitializer(node: CanHaveLiteralInitializer) { if (shouldPrintWithInitializer(node)) { + if(isolatedDeclarations && 'initializer' in node && node.initializer && isLiteralExpression(node.initializer)) { + return node.initializer; + } return resolver.createLiteralConstValue(getParseTreeNode(node) as CanHaveLiteralInitializer, symbolTracker); // TODO: Make safe } return undefined; @@ -546,7 +550,16 @@ export function transformDeclarations(context: TransformationContext) { } type LocalTypeInfo = { typeNode: TypeNode, sourceNode?: Node, flags: LocalTypeInfoFlags }; - + // We need to see about getting the JSX element type. + function getJSXElementType(_node: Node): EntityName { + return factory.createQualifiedName( + factory.createQualifiedName( + factory.createIdentifier("React"), + factory.createIdentifier("JSX"), + ), + factory.createIdentifier("Element"), + ) + } function localInference(node: Node, isConstContext: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { const nextIsConst = isConstContext & NarrowBehavior.NotKeepLiterals; switch(node.kind) { @@ -560,6 +573,7 @@ export function transformDeclarations(context: TransformationContext) { return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.Implicit); } } + break; case SyntaxKind.NullKeyword: if(strictNullChecks) { return regular(factory.createLiteralTypeNode(factory.createNull()), node); @@ -584,12 +598,19 @@ export function transformDeclarations(context: TransformationContext) { case SyntaxKind.ArrowFunction: case SyntaxKind.FunctionExpression: const fnNode = node as FunctionExpression | ArrowFunction; - const fnTypeNode = factory.createFunctionTypeNode( - visitNodes(fnNode.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), - fnNode.parameters.map(p => ensureParameter(p)), - inferReturnType(fnNode).typeNode, - ); - return regular(fnTypeNode, node) + const oldEnclosingDeclaration = enclosingDeclaration; + try { + enclosingDeclaration = node; + + const fnTypeNode = factory.createFunctionTypeNode( + visitNodes(fnNode.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), + fnNode.parameters.map(p => ensureParameter(p)), + inferReturnType(fnNode).typeNode, + ); + return regular(fnTypeNode, node) + }finally { + enclosingDeclaration = oldEnclosingDeclaration; + } case SyntaxKind.TypeAssertionExpression: case SyntaxKind.AsExpression: const asExpression = node as AsExpression | TypeAssertion; @@ -634,6 +655,7 @@ export function transformDeclarations(context: TransformationContext) { if(isLiteralTypeNode(typeNode)) { let oldText = prevSpan.kind === SyntaxKind.TemplateHead ? prevSpan.text : prevSpan.literal.text; let newText= oldText; + console.log(newText);//wip } else { const literalSpan = factory.createTemplateLiteralTypeSpan( typeNode, @@ -652,6 +674,12 @@ export function transformDeclarations(context: TransformationContext) { return literal(node, SyntaxKind.BigIntKeyword, isConstContext); case SyntaxKind.RegularExpressionLiteral: return literal(node, "RegExp", isConstContext); + case SyntaxKind.JsxSelfClosingElement: + case SyntaxKind.JsxElement: + const typeReference = factory.createTypeReferenceNode(getJSXElementType(node)); + setParent(typeReference.typeName, typeReference); + checkEntityNameVisibility(typeReference.typeName, enclosingDeclaration); + return fresh(typeReference, node); case SyntaxKind.TrueKeyword: case SyntaxKind.FalseKeyword: return literal(node, SyntaxKind.BooleanKeyword, isConstContext); @@ -670,14 +698,11 @@ export function transformDeclarations(context: TransformationContext) { tupleType.emitNode = { flags: 1 }; return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node); } else { - let elementTypes = deduplicateUnion(elementTypesInfo); - let simplifiedUnion = collapseLiteralTypesIntoBaseTypes(elementTypes); - normalizeObjectUnion(simplifiedUnion); let itemType; - if(simplifiedUnion.length === 0) { + if(elementTypesInfo.length === 0) { itemType = (strictNullChecks ? factory.createKeywordTypeNode(SyntaxKind.NeverKeyword) : factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)); } else { - itemType = simplifiedUnion.length === 1? simplifiedUnion[0]: factory.createUnionTypeNode(simplifiedUnion); + itemType = makeUnionFromTypes(node, elementTypesInfo, false).typeNode; } return regular(factory.createArrayTypeNode(itemType), node); @@ -687,6 +712,8 @@ export function transformDeclarations(context: TransformationContext) { const properties: TypeElement[] = [] for(const prop of objectLiteral.properties) { if(isMethodDeclaration(prop)) { + const oldEnclosingDeclaration = enclosingDeclaration; + enclosingDeclaration = prop; if (isConstContext & NarrowBehavior.AsConst) { properties.push(factory.createPropertySignature( [factory.createModifier(SyntaxKind.ReadonlyKeyword)], @@ -695,7 +722,7 @@ export function transformDeclarations(context: TransformationContext) { factory.createFunctionTypeNode( visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), prop.parameters.map(p => ensureParameter(p)), - visitType(prop.type, prop), + localInferenceFromInitializer(prop)!, ) )); } @@ -706,9 +733,10 @@ export function transformDeclarations(context: TransformationContext) { prop.questionToken, visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), prop.parameters.map(p => ensureParameter(p)), - visitType(prop.type, prop), + localInferenceFromInitializer(prop), )) } + enclosingDeclaration = oldEnclosingDeclaration; } else if(isPropertyAssignment(prop)) { const modifiers = isConstContext & NarrowBehavior.AsConst ? @@ -734,10 +762,10 @@ export function transformDeclarations(context: TransformationContext) { function invalid(node: Node): LocalTypeInfo { return { typeNode: makeInvalidTypeAndReport(node), flags: LocalTypeInfoFlags.Invalid, sourceNode: node } } - function fresh(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { + function fresh(typeNode: TypeNode, sourceNode?: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { return { typeNode, flags: flags | LocalTypeInfoFlags.Fresh, sourceNode } } - function regular(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { + function regular(typeNode: TypeNode, sourceNode?: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { return { typeNode, flags, sourceNode } } function normalizeLiteralValue(literal: LiteralExpression) { @@ -1183,61 +1211,130 @@ export function transformDeclarations(context: TransformationContext) { return localTypeInfo.typeNode; } - + function makeUnionFromTypes(sourceNode: Node, types: LocalTypeInfo[], widenSingle: boolean) { + types = deduplicateUnion(types) + if(types.length === 1) { + const localType = types[0] + return widenSingle ? { ... localType, type: getWidenedType(localType) }: localType + } + const unionConstituents = collapseLiteralTypesIntoBaseTypes(types); + + normalizeObjectUnion(unionConstituents); + return regular(unionConstituents.length === 1? unionConstituents[0]: factory.createUnionTypeNode(unionConstituents), sourceNode) + } function inferReturnType(node: FunctionLikeDeclaration) { - const returnStatements: ReturnStatement[] = []; if(node.type) { return regular(visitType(node.type, node), node); } if(!node.body) { return regular(makeInvalidTypeAndReport(node), node); } - collectReturnExpressions(node.body, returnStatements); - if(returnStatements.length === 0) { - return regular(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), node); + + const returnStatements: ReturnStatement[] = []; + const yieldExpressions: YieldExpression[] = []; + + let returnType; + if(!isBlock(node.body)) { + returnType = localInference(node.body) } - - let returnStatementInference = returnStatements.map((r) => { - return r.expression? - localInference(r.expression, NarrowBehavior.KeepLiterals): - regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), r) - }); - returnStatementInference = deduplicateUnion(returnStatementInference) - const unionConstituents = returnStatementInference.length === 1 ? - [getWidenedType(returnStatementInference[0])] : - collapseLiteralTypesIntoBaseTypes(returnStatementInference); - normalizeObjectUnion(unionConstituents); - - return regular(unionConstituents.length === 1? unionConstituents[0]: factory.createUnionTypeNode(unionConstituents), node); - - function collectReturnExpressions(node: Node, result: ReturnStatement[]) { + else { + collectReturnAndYield(node.body, returnStatements, yieldExpressions); + if(returnStatements.length === 0) { + returnType = regular(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), node); + } else { + let returnStatementInference = returnStatements.map((r) => { + return r.expression? + localInference(r.expression, NarrowBehavior.KeepLiterals): + fresh(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), r) + }); + + returnType = makeUnionFromTypes(node, returnStatementInference, true); + if(returnType.flags & LocalTypeInfoFlags.Fresh && returnType.typeNode.kind === SyntaxKind.UndefinedKeyword) { + returnType = fresh(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), returnType.typeNode); + } + } + } + let yieldType: LocalTypeInfo | undefined = undefined; + if(node.asteriskToken) { + if(yieldExpressions.length === 0) { + returnType = regular( + factory.createKeywordTypeNode(SyntaxKind.NeverKeyword), + node + ); + } else { + let yieldExpressionsInference = yieldExpressions.map((r) => { + return r.expression? + localInference(r.expression, NarrowBehavior.KeepLiterals): + regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), r) + }); + + yieldType = makeUnionFromTypes(node, yieldExpressionsInference, true); + } + } + return makeFinalReturnType(node, returnType, yieldType); + + function makeFinalReturnType(node: FunctionLikeDeclaration, returnType: LocalTypeInfo, yieldType: LocalTypeInfo | undefined) { + const modifiers = getEffectiveModifierFlags(node); + if(node.asteriskToken) { + return regular( + factory.createTypeReferenceNode( + factory.createIdentifier(modifiers & ModifierFlags.Async ? "Generator": "AsyncGenerator"), + [returnType.typeNode, yieldType?.typeNode!], + ), + returnType.sourceNode, + returnType.flags + ) + } + else if(modifiers & ModifierFlags.Async) { + return regular( + factory.createTypeReferenceNode( + factory.createIdentifier("Promise"), + [returnType.typeNode], + ), + returnType.sourceNode, + returnType.flags + ) + } + return returnType; + } + function collectReturnAndYield(node: Node, result: ReturnStatement[], yieldExpressions: YieldExpression[]) { forEachChild(node, child => { if(isReturnStatement(child)) { result.push(child) } + if(isYieldExpression(child)) { + yieldExpressions.push(child); + } if(isClassLike(child) || isFunctionLike(child)) { return; } - collectReturnExpressions(child, result); + // TODO: Do not walk all children if not generator function + collectReturnAndYield(child, result, yieldExpressions); }) } } - function localInferenceFromInitializer(node: HasInferredType): TypeNode | undefined { + function localInferenceFromInitializer(node: HasInferredType | ExportAssignment): TypeNode | undefined { + if(NO_LOCAL_INFERENCE) { + return undefined; + } let typeNode; - if(isParameter(node) && node.initializer) { + if(isExportAssignment(node) && node.expression) { + typeNode = localInference(node.expression); + } + else if(isParameter(node) && node.initializer) { typeNode = localInference(node.initializer); } - if(isVariableDeclaration(node) && node.initializer) { + else if(isVariableDeclaration(node) && node.initializer) { typeNode = localInference(node.initializer); } - if(isPropertyDeclaration(node) && node.initializer) { + else if(isPropertyDeclaration(node) && node.initializer) { typeNode = localInference(node.initializer); } - if(isFunctionDeclaration(node)) { + else if(isFunctionDeclaration(node)) { typeNode = inferReturnType(node); } - if(isMethodDeclaration(node)) { + else if(isMethodDeclaration(node)) { typeNode = inferReturnType(node); } return typeNode?.typeNode; @@ -1894,11 +1991,8 @@ export function transformDeclarations(context: TransformationContext) { errorNode: input }); errorFallbackNode = input; - if (isolatedDeclarations) { - reportIsolatedDeclarationError(input); - } const type = isolatedDeclarations ? - makeInvalidType() : + localInferenceFromInitializer(input) ?? makeInvalidTypeAndReport(input) : resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker); const varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, type, /*initializer*/ undefined); errorFallbackNode = undefined; diff --git a/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts b/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts index d204fbfc5590e..5d39f71f97045 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts @@ -260,7 +260,8 @@ export function compileFiles(host: fakes.CompilerHost, rootFiles: string[] | und } if(host.outputs.some(d => d.file === fileName)) return; host.writeFile(fileName, text, writeByteOrderMark); - }, undefined, undefined,undefined); + // @ts-expect-error We use forceDts emit documented flag + }, undefined, undefined,undefined, true); const postErrors = ts.getPreEmitDiagnostics(program); const longerErrors = lang.length(preErrors) > postErrors.length ? preErrors : postErrors; const shorterErrors = longerErrors === preErrors ? postErrors : preErrors; diff --git a/external-declarations/src/test-runner/tsc-infrastructure/io.ts b/external-declarations/src/test-runner/tsc-infrastructure/io.ts index ad4305913df3b..ea8dcc0528d2e 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/io.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/io.ts @@ -45,7 +45,7 @@ export const harnessNewLine = "\r\n"; export const virtualFileSystemRoot = "/"; function createNodeIO(): IO { - let workspaceRoot = "../"; + let workspaceRoot = "./node_modules/typescript/"; let fs: any, pathModule: any; if (require) { fs = require("fs"); diff --git a/external-declarations/src/test-runner/utils.ts b/external-declarations/src/test-runner/utils.ts index 545ee278c8784..fd8bde407ad2a 100644 --- a/external-declarations/src/test-runner/utils.ts +++ b/external-declarations/src/test-runner/utils.ts @@ -4,7 +4,7 @@ import * as ts from 'typescript' import { compileFiles, TestFile, Utils } from "./tsc-infrastructure/compiler-run"; import * as TestCaseParser from "./tsc-infrastructure/test-file-parser"; import * as fsp from 'fs/promises' -import { getDeclarationExtension, isDeclarationFile, isJavaScriptFile, isJSONFile, isSourceMapFile } from '../compiler/path-utils'; +import { getDeclarationExtension, isDeclarationFile, isJavaScriptFile, isJSONFile, isSourceMapFile, isTypeScriptFile } from '../compiler/path-utils'; import { changeExtension } from './tsc-infrastructure/vpath'; import * as vpath from "./tsc-infrastructure/vpath"; import { libs } from './tsc-infrastructure/options'; @@ -47,24 +47,33 @@ export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings const result = compileFiles(toBeCompiled, [], { declaration: "true", + // declarationMap: "true", isolatedDeclarations: "true", removeComments: "false", }, settings, undefined); return caseData.testUnitData .filter(isRelevantTestFile) - .map(file => { + .flatMap(file => { const declarationFile = changeExtension(file.name, getDeclarationExtension(file.name)); + const declarationMapFile = declarationFile + ".map"; const resolvedDeclarationFile = vpath.resolve(result.vfs.cwd(), declarationFile); + const resolvedDeclarationMapFile = vpath.resolve(result.vfs.cwd(), declarationMapFile); const declaration = result.dts.get(resolvedDeclarationFile) - return { + const declarationMap = result.maps.get(resolvedDeclarationMapFile) + return [{ content: declaration?.text ?? "", fileName: declarationFile, - }; + } + // , { + // content: declarationMap?.text ?? "", + // fileName: declarationMapFile, + // } + ]; }) } export function isRelevantTestFile(f: TestCaseParser.TestUnitData) { - return !isDeclarationFile(f.name) && !isJavaScriptFile(f.name) && !isJSONFile(f.name) && !isSourceMapFile(f.name) && f.content !== undefined + return isTypeScriptFile(f.name) && !isDeclarationFile(f.name) && f.content !== undefined } diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 829ba592efa4d..75766308e996e 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -44,6 +44,7 @@ import { EmitHost, EmitResolver, emptyArray, + EntityName, EntityNameOrEntityNameExpression, EnumDeclaration, ExportAssignment, @@ -108,6 +109,7 @@ import { isBinaryExpression, isBindingElement, isBindingPattern, + isBlock, isClassDeclaration, isClassElement, isClassLike, @@ -174,6 +176,7 @@ import { isTypeReferenceNode, isUnparsedSource, isVariableDeclaration, + isYieldExpression, KeywordTypeSyntaxKind, last, LateBoundDeclaration, @@ -260,10 +263,12 @@ import { visitNode, visitNodes, VisitResult, + YieldExpression, } from "../_namespaces/ts"; import * as moduleSpecifiers from "../_namespaces/ts.moduleSpecifiers"; +const NO_LOCAL_INFERENCE = !!process.env.NO_LOCAL_INFERENCE; enum NarrowBehavior { None = 0, AsConst = 1, @@ -838,7 +843,16 @@ export function transformDeclarations(context: TransformationContext) { } type LocalTypeInfo = { typeNode: TypeNode, sourceNode?: Node, flags: LocalTypeInfoFlags }; - + // We need to see about getting the JSX element type. + function getJSXElementType(_node: Node): EntityName { + return factory.createQualifiedName( + factory.createQualifiedName( + factory.createIdentifier("React"), + factory.createIdentifier("JSX"), + ), + factory.createIdentifier("Element"), + ) + } function localInference(node: Node, isConstContext: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { const nextIsConst = isConstContext & NarrowBehavior.NotKeepLiterals; switch(node.kind) { @@ -852,6 +866,7 @@ export function transformDeclarations(context: TransformationContext) { return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.Implicit); } } + break; case SyntaxKind.NullKeyword: if(strictNullChecks) { return regular(factory.createLiteralTypeNode(factory.createNull()), node); @@ -876,12 +891,19 @@ export function transformDeclarations(context: TransformationContext) { case SyntaxKind.ArrowFunction: case SyntaxKind.FunctionExpression: const fnNode = node as FunctionExpression | ArrowFunction; - const fnTypeNode = factory.createFunctionTypeNode( - visitNodes(fnNode.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), - fnNode.parameters.map(p => ensureParameter(p)), - inferReturnType(fnNode).typeNode, - ); - return regular(fnTypeNode, node) + const oldEnclosingDeclaration = enclosingDeclaration; + try { + enclosingDeclaration = node; + + const fnTypeNode = factory.createFunctionTypeNode( + visitNodes(fnNode.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), + fnNode.parameters.map(p => ensureParameter(p)), + inferReturnType(fnNode).typeNode, + ); + return regular(fnTypeNode, node) + }finally { + enclosingDeclaration = oldEnclosingDeclaration; + } case SyntaxKind.TypeAssertionExpression: case SyntaxKind.AsExpression: const asExpression = node as AsExpression | TypeAssertion; @@ -945,6 +967,12 @@ export function transformDeclarations(context: TransformationContext) { return literal(node, SyntaxKind.BigIntKeyword, isConstContext); case SyntaxKind.RegularExpressionLiteral: return literal(node, "RegExp", isConstContext); + case SyntaxKind.JsxSelfClosingElement: + case SyntaxKind.JsxElement: + const typeReference = factory.createTypeReferenceNode(getJSXElementType(node)); + setParent(typeReference.typeName, typeReference); + checkEntityNameVisibility(typeReference.typeName, enclosingDeclaration); + return fresh(typeReference, node); case SyntaxKind.TrueKeyword: case SyntaxKind.FalseKeyword: return literal(node, SyntaxKind.BooleanKeyword, isConstContext); @@ -963,14 +991,11 @@ export function transformDeclarations(context: TransformationContext) { tupleType.emitNode = { flags: 1, autoGenerate: undefined, internalFlags: 0 }; return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node); } else { - let elementTypes = deduplicateUnion(elementTypesInfo); - let simplifiedUnion = collapseLiteralTypesIntoBaseTypes(elementTypes); - normalizeObjectUnion(simplifiedUnion); let itemType; - if(simplifiedUnion.length === 0) { + if(elementTypesInfo.length === 0) { itemType = (strictNullChecks ? factory.createKeywordTypeNode(SyntaxKind.NeverKeyword) : factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)); } else { - itemType = simplifiedUnion.length === 1? simplifiedUnion[0]: factory.createUnionTypeNode(simplifiedUnion); + itemType = makeUnionFromTypes(node, elementTypesInfo, false).typeNode; } return regular(factory.createArrayTypeNode(itemType), node); @@ -980,6 +1005,8 @@ export function transformDeclarations(context: TransformationContext) { const properties: TypeElement[] = [] for(const prop of objectLiteral.properties) { if(isMethodDeclaration(prop)) { + const oldEnclosingDeclaration = enclosingDeclaration; + enclosingDeclaration = prop; if (isConstContext & NarrowBehavior.AsConst) { properties.push(factory.createPropertySignature( [factory.createModifier(SyntaxKind.ReadonlyKeyword)], @@ -988,7 +1015,7 @@ export function transformDeclarations(context: TransformationContext) { factory.createFunctionTypeNode( visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), prop.parameters.map(p => ensureParameter(p)), - visitType(prop.type, prop), + localInferenceFromInitializer(prop)!, ) )); } @@ -999,9 +1026,10 @@ export function transformDeclarations(context: TransformationContext) { prop.questionToken, visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), prop.parameters.map(p => ensureParameter(p)), - visitType(prop.type, prop), + localInferenceFromInitializer(prop), )) } + enclosingDeclaration = oldEnclosingDeclaration; } else if(isPropertyAssignment(prop)) { const modifiers = isConstContext & NarrowBehavior.AsConst ? @@ -1027,10 +1055,10 @@ export function transformDeclarations(context: TransformationContext) { function invalid(node: Node): LocalTypeInfo { return { typeNode: makeInvalidTypeAndReport(node), flags: LocalTypeInfoFlags.Invalid, sourceNode: node } } - function fresh(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { + function fresh(typeNode: TypeNode, sourceNode?: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { return { typeNode, flags: flags | LocalTypeInfoFlags.Fresh, sourceNode } } - function regular(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { + function regular(typeNode: TypeNode, sourceNode?: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { return { typeNode, flags, sourceNode } } function normalizeLiteralValue(literal: LiteralExpression) { @@ -1476,61 +1504,130 @@ export function transformDeclarations(context: TransformationContext) { return localTypeInfo.typeNode; } - + function makeUnionFromTypes(sourceNode: Node, types: LocalTypeInfo[], widenSingle: boolean) { + types = deduplicateUnion(types) + if(types.length === 1) { + const localType = types[0] + return widenSingle ? { ... localType, type: getWidenedType(localType) }: localType + } + const unionConstituents = collapseLiteralTypesIntoBaseTypes(types); + + normalizeObjectUnion(unionConstituents); + return regular(unionConstituents.length === 1? unionConstituents[0]: factory.createUnionTypeNode(unionConstituents), sourceNode) + } function inferReturnType(node: FunctionLikeDeclaration) { - const returnStatements: ReturnStatement[] = []; if(node.type) { return regular(visitType(node.type, node), node); } if(!node.body) { return regular(makeInvalidTypeAndReport(node), node); } - collectReturnExpressions(node.body, returnStatements); - if(returnStatements.length === 0) { - return regular(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), node); + + const returnStatements: ReturnStatement[] = []; + const yieldExpressions: YieldExpression[] = []; + + let returnType; + if(!isBlock(node.body)) { + returnType = localInference(node.body) } - - let returnStatementInference = returnStatements.map((r) => { - return r.expression? - localInference(r.expression, NarrowBehavior.KeepLiterals): - regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), r) - }); - returnStatementInference = deduplicateUnion(returnStatementInference) - const unionConstituents = returnStatementInference.length === 1 ? - [getWidenedType(returnStatementInference[0])] : - collapseLiteralTypesIntoBaseTypes(returnStatementInference); - normalizeObjectUnion(unionConstituents); - - return regular(unionConstituents.length === 1? unionConstituents[0]: factory.createUnionTypeNode(unionConstituents), node); - - function collectReturnExpressions(node: Node, result: ReturnStatement[]) { + else { + collectReturnAndYield(node.body, returnStatements, yieldExpressions); + if(returnStatements.length === 0) { + returnType = regular(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), node); + } else { + let returnStatementInference = returnStatements.map((r) => { + return r.expression? + localInference(r.expression, NarrowBehavior.KeepLiterals): + fresh(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), r) + }); + + returnType = makeUnionFromTypes(node, returnStatementInference, true); + if(returnType.flags & LocalTypeInfoFlags.Fresh && returnType.typeNode.kind === SyntaxKind.UndefinedKeyword) { + returnType = fresh(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), returnType.typeNode); + } + } + } + let yieldType: LocalTypeInfo | undefined = undefined; + if(node.asteriskToken) { + if(yieldExpressions.length === 0) { + returnType = regular( + factory.createKeywordTypeNode(SyntaxKind.NeverKeyword), + node + ); + } else { + let yieldExpressionsInference = yieldExpressions.map((r) => { + return r.expression? + localInference(r.expression, NarrowBehavior.KeepLiterals): + regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), r) + }); + + yieldType = makeUnionFromTypes(node, yieldExpressionsInference, true); + } + } + return makeFinalReturnType(node, returnType, yieldType); + + function makeFinalReturnType(node: FunctionLikeDeclaration, returnType: LocalTypeInfo, yieldType: LocalTypeInfo | undefined) { + const modifiers = getEffectiveModifierFlags(node); + if(node.asteriskToken) { + return regular( + factory.createTypeReferenceNode( + factory.createIdentifier(modifiers & ModifierFlags.Async ? "Generator": "AsyncGenerator"), + [returnType.typeNode, yieldType?.typeNode!], + ), + returnType.sourceNode, + returnType.flags + ) + } + else if(modifiers & ModifierFlags.Async) { + return regular( + factory.createTypeReferenceNode( + factory.createIdentifier("Promise"), + [returnType.typeNode], + ), + returnType.sourceNode, + returnType.flags + ) + } + return returnType; + } + function collectReturnAndYield(node: Node, result: ReturnStatement[], yieldExpressions: YieldExpression[]) { forEachChild(node, child => { if(isReturnStatement(child)) { result.push(child) } + if(isYieldExpression(child)) { + yieldExpressions.push(child); + } if(isClassLike(child) || isFunctionLike(child)) { return; } - collectReturnExpressions(child, result); + // TODO: Do not walk all children if not generator function + collectReturnAndYield(child, result, yieldExpressions); }) } } - function localInferenceFromInitializer(node: HasInferredType): TypeNode | undefined { + function localInferenceFromInitializer(node: HasInferredType | ExportAssignment): TypeNode | undefined { + if(NO_LOCAL_INFERENCE) { + return undefined; + } let typeNode; - if(isParameter(node) && node.initializer) { + if(isExportAssignment(node) && node.expression) { + typeNode = localInference(node.expression); + } + else if(isParameter(node) && node.initializer) { typeNode = localInference(node.initializer); } - if(isVariableDeclaration(node) && node.initializer) { + else if(isVariableDeclaration(node) && node.initializer) { typeNode = localInference(node.initializer); } - if(isPropertyDeclaration(node) && node.initializer) { + else if(isPropertyDeclaration(node) && node.initializer) { typeNode = localInference(node.initializer); } - if(isFunctionDeclaration(node)) { + else if(isFunctionDeclaration(node)) { typeNode = inferReturnType(node); } - if(isMethodDeclaration(node)) { + else if(isMethodDeclaration(node)) { typeNode = inferReturnType(node); } return typeNode?.typeNode; @@ -2187,11 +2284,8 @@ export function transformDeclarations(context: TransformationContext) { errorNode: input }); errorFallbackNode = input; - if (isolatedDeclarations) { - reportIsolatedDeclarationError(input); - } const type = isolatedDeclarations ? - makeInvalidType() : + localInferenceFromInitializer(input) ?? makeInvalidTypeAndReport(input) : resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker); const varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, type, /*initializer*/ undefined); errorFallbackNode = undefined; From e57c64908721ab2666c8bde6edfde98f9d92cafb Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 23 May 2023 15:34:07 +0100 Subject: [PATCH 016/224] Fixed lint and errors. --- .eslintrc.json | 2 + .../src/compiler/declaration-emit.ts | 313 +++++++++-------- external-declarations/src/utils/fs-utils.ts | 2 +- src/compiler/transformers/declarations.ts | 317 ++++++++++-------- .../autoAccessorNoUseDefineForClassFields.js | 7 +- ...oAccessorNoUseDefineForClassFields.symbols | 9 +- ...utoAccessorNoUseDefineForClassFields.types | 6 +- ...laration-setFunctionName(target=es2015).js | 18 +- ...laration-setFunctionName(target=es2022).js | 17 +- ...Declaration-setFunctionName(target=es5).js | 25 +- ...laration-setFunctionName(target=esnext).js | 6 +- 11 files changed, 418 insertions(+), 304 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 5089051839926..e2569fed6c47f 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -17,6 +17,8 @@ "**/node_modules/**", "/built/**", "/tests/**", + "/external-declarations/tests/**", + "/external-declarations/build/**", "/lib/**", "/src/lib/*.generated.d.ts", "/scripts/**/*.js", diff --git a/external-declarations/src/compiler/declaration-emit.ts b/external-declarations/src/compiler/declaration-emit.ts index 1bee81f4d8957..350c1b082834a 100644 --- a/external-declarations/src/compiler/declaration-emit.ts +++ b/external-declarations/src/compiler/declaration-emit.ts @@ -14,7 +14,7 @@ import { LiteralTypeNode } from "typescript"; import { NoSubstitutionTemplateLiteral } from "typescript"; import { ParenthesizedExpression } from "typescript"; - + const NO_LOCAL_INFERENCE = !!process.env.NO_LOCAL_INFERENCE; enum NarrowBehavior { None = 0, @@ -549,7 +549,7 @@ export function transformDeclarations(context: TransformationContext) { return factory.createTypeReferenceNode("invalid"); } - type LocalTypeInfo = { typeNode: TypeNode, sourceNode?: Node, flags: LocalTypeInfoFlags }; + interface LocalTypeInfo { typeNode: TypeNode, sourceNode?: Node, flags: LocalTypeInfoFlags } // We need to see about getting the JSX element type. function getJSXElementType(_node: Node): EntityName { return factory.createQualifiedName( @@ -558,7 +558,7 @@ export function transformDeclarations(context: TransformationContext) { factory.createIdentifier("JSX"), ), factory.createIdentifier("Element"), - ) + ); } function localInference(node: Node, isConstContext: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { const nextIsConst = isConstContext & NarrowBehavior.NotKeepLiterals; @@ -569,7 +569,8 @@ export function transformDeclarations(context: TransformationContext) { if((node as Identifier).escapedText === "undefined") { if(strictNullChecks) { return regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), node); - } else { + } + else { return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.Implicit); } } @@ -577,7 +578,8 @@ export function transformDeclarations(context: TransformationContext) { case SyntaxKind.NullKeyword: if(strictNullChecks) { return regular(factory.createLiteralTypeNode(factory.createNull()), node); - } else { + } + else { return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.Implicit); } case SyntaxKind.NewExpression: @@ -588,7 +590,7 @@ export function transformDeclarations(context: TransformationContext) { visitNode(newExpr.expression, visitDeclarationSubtree, isIdentifier)!, visitNodes(newExpr.typeArguments, visitDeclarationSubtree, isTypeNode) ); - const visitedTypeNode = visitNode(typeNode, visitDeclarationSubtree, isTypeNode) + const visitedTypeNode = visitNode(typeNode, visitDeclarationSubtree, isTypeNode); if(visitedTypeNode) { return regular(visitedTypeNode, node); } @@ -607,8 +609,9 @@ export function transformDeclarations(context: TransformationContext) { fnNode.parameters.map(p => ensureParameter(p)), inferReturnType(fnNode).typeNode, ); - return regular(fnTypeNode, node) - }finally { + return regular(fnTypeNode, node); + } + finally { enclosingDeclaration = oldEnclosingDeclaration; } case SyntaxKind.TypeAssertionExpression: @@ -616,9 +619,10 @@ export function transformDeclarations(context: TransformationContext) { const asExpression = node as AsExpression | TypeAssertion; if(isTypeReferenceNode(asExpression.type) && isConst(asExpression.type)) { return localInference(asExpression.expression, NarrowBehavior.AsConst); - } else { + } + else { const type = visitType(asExpression.type, asExpression); - if(isLiteralTypeNode(type) && + if(isLiteralTypeNode(type) && (isNoSubstitutionTemplateLiteral(type.literal) || isStringLiteral(type.literal))) { return regular(factory.createLiteralTypeNode( normalizeLiteralValue(type.literal) @@ -634,29 +638,31 @@ export function transformDeclarations(context: TransformationContext) { return { flags, typeNode: factory.createLiteralTypeNode(factory.createPrefixMinus(targetExpressionType.literal)) - } - } else if(targetExpressionType.kind === SyntaxKind.NumberKeyword) { + }; + } + else if(targetExpressionType.kind === SyntaxKind.NumberKeyword) { return { typeNode: targetExpressionType, flags }; } } break; - case SyntaxKind.NumericLiteral: + case SyntaxKind.NumericLiteral: return literal(node, SyntaxKind.NumberKeyword, isConstContext); case SyntaxKind.TemplateExpression: if(!isConstContext) { - return literal(node, SyntaxKind.StringKeyword, isConstContext) + return literal(node, SyntaxKind.StringKeyword, isConstContext); } const templateExpression = node as TemplateExpression; - const templateSpans: TemplateLiteralTypeSpan[] = [] - let head = factory.createTemplateHead(templateExpression.head.text); + const templateSpans: TemplateLiteralTypeSpan[] = []; + const head = factory.createTemplateHead(templateExpression.head.text); let prevSpan: TemplateHead | TemplateLiteralTypeSpan = head; for(const span of templateExpression.templateSpans) { const {typeNode} = localInference(span.expression, nextIsConst); if(isLiteralTypeNode(typeNode)) { - let oldText = prevSpan.kind === SyntaxKind.TemplateHead ? prevSpan.text : prevSpan.literal.text; - let newText= oldText; + const oldText = prevSpan.kind === SyntaxKind.TemplateHead ? prevSpan.text : prevSpan.literal.text; + const newText= oldText; console.log(newText);//wip - } else { + } + else { const literalSpan = factory.createTemplateLiteralTypeSpan( typeNode, span.literal @@ -668,11 +674,11 @@ export function transformDeclarations(context: TransformationContext) { } return regular(factory.createTemplateLiteralType(templateExpression.head, templateSpans), node); case SyntaxKind.NoSubstitutionTemplateLiteral: - case SyntaxKind.StringLiteral: + case SyntaxKind.StringLiteral: return literal(node, SyntaxKind.StringKeyword, isConstContext); - case SyntaxKind.BigIntLiteral: + case SyntaxKind.BigIntLiteral: return literal(node, SyntaxKind.BigIntKeyword, isConstContext); - case SyntaxKind.RegularExpressionLiteral: + case SyntaxKind.RegularExpressionLiteral: return literal(node, "RegExp", isConstContext); case SyntaxKind.JsxSelfClosingElement: case SyntaxKind.JsxElement: @@ -680,16 +686,16 @@ export function transformDeclarations(context: TransformationContext) { setParent(typeReference.typeName, typeReference); checkEntityNameVisibility(typeReference.typeName, enclosingDeclaration); return fresh(typeReference, node); - case SyntaxKind.TrueKeyword: - case SyntaxKind.FalseKeyword: + case SyntaxKind.TrueKeyword: + case SyntaxKind.FalseKeyword: return literal(node, SyntaxKind.BooleanKeyword, isConstContext); case SyntaxKind.ArrayLiteralExpression: - const arrayLiteral = node as ArrayLiteralExpression - const elementTypesInfo: LocalTypeInfo[] = [] + const arrayLiteral = node as ArrayLiteralExpression; + const elementTypesInfo: LocalTypeInfo[] = []; for(const element of arrayLiteral.elements) { elementTypesInfo.push( localInference(element, nextIsConst) - ) + ); } if(isConstContext & NarrowBehavior.AsConst) { const tupleType = factory.createTupleTypeNode( @@ -697,19 +703,21 @@ export function transformDeclarations(context: TransformationContext) { ); tupleType.emitNode = { flags: 1 }; return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node); - } else { + } + else { let itemType; if(elementTypesInfo.length === 0) { itemType = (strictNullChecks ? factory.createKeywordTypeNode(SyntaxKind.NeverKeyword) : factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)); - } else { - itemType = makeUnionFromTypes(node, elementTypesInfo, false).typeNode; + } + else { + itemType = makeUnionFromTypes(node, elementTypesInfo, /*widenSingle*/ false).typeNode; } return regular(factory.createArrayTypeNode(itemType), node); - } + } case SyntaxKind.ObjectLiteralExpression: - const objectLiteral = node as ObjectLiteralExpression - const properties: TypeElement[] = [] + const objectLiteral = node as ObjectLiteralExpression; + const properties: TypeElement[] = []; for(const prop of objectLiteral.properties) { if(isMethodDeclaration(prop)) { const oldEnclosingDeclaration = enclosingDeclaration; @@ -718,9 +726,9 @@ export function transformDeclarations(context: TransformationContext) { properties.push(factory.createPropertySignature( [factory.createModifier(SyntaxKind.ReadonlyKeyword)], visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!, - undefined, + /*questionToken*/ undefined, factory.createFunctionTypeNode( - visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), + visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), prop.parameters.map(p => ensureParameter(p)), localInferenceFromInitializer(prop)!, ) @@ -731,10 +739,10 @@ export function transformDeclarations(context: TransformationContext) { [], visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!, prop.questionToken, - visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), + visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), prop.parameters.map(p => ensureParameter(p)), localInferenceFromInitializer(prop), - )) + )); } enclosingDeclaration = oldEnclosingDeclaration; } @@ -745,28 +753,29 @@ export function transformDeclarations(context: TransformationContext) { properties.push(factory.createPropertySignature( modifiers, visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!, - undefined, + /*questionToken*/ undefined, localInference(prop.initializer, nextIsConst).typeNode - )) - } else { + )); + } + else { return invalid(prop); - } + } } return regular(factory.createTypeLiteralNode( properties - ), objectLiteral) + ), objectLiteral); } - + return regular(makeInvalidTypeAndReport(node), node); } function invalid(node: Node): LocalTypeInfo { return { typeNode: makeInvalidTypeAndReport(node), flags: LocalTypeInfoFlags.Invalid, sourceNode: node } } function fresh(typeNode: TypeNode, sourceNode?: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { - return { typeNode, flags: flags | LocalTypeInfoFlags.Fresh, sourceNode } + return { typeNode, flags: flags | LocalTypeInfoFlags.Fresh, sourceNode }; } function regular(typeNode: TypeNode, sourceNode?: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { - return { typeNode, flags, sourceNode } + return { typeNode, flags, sourceNode }; } function normalizeLiteralValue(literal: LiteralExpression) { switch(literal.kind) { @@ -786,10 +795,11 @@ export function transformDeclarations(context: TransformationContext) { if(narrowBehavior) { return fresh(factory.createLiteralTypeNode( normalizeLiteralValue(node as LiteralExpression) - ), node) - } else { + ), node); + } + else { return fresh( - typeof baseType === "number" ? factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType), + typeof baseType === "number" ? factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType), node ); } @@ -806,7 +816,7 @@ export function transformDeclarations(context: TransformationContext) { return visitedType ?? makeInvalidTypeAndReport(owner); } - function getMemberKey(member:MethodSignature | PropertySignature ) { + function getMemberKey(member: MethodSignature | PropertySignature) { if(!isIdentifier(member.name)) { makeInvalidTypeAndReport(member.name); return undefined; @@ -835,30 +845,31 @@ export function transformDeclarations(context: TransformationContext) { break; case SyntaxKind.AnyKeyword: if(type.flags & LocalTypeInfoFlags.Implicit) { - literalTypes |= CollapsibleTypes.ImplicitAny - } else { - baseTypes |= CollapsibleTypes.Any + literalTypes |= CollapsibleTypes.ImplicitAny; + } + else { + baseTypes |= CollapsibleTypes.Any; } - break + break; case SyntaxKind.BooleanKeyword: - baseTypes |= CollapsibleTypes.Boolean + baseTypes |= CollapsibleTypes.Boolean; break; - case SyntaxKind.StringKeyword: - baseTypes |= CollapsibleTypes.String + case SyntaxKind.StringKeyword: + baseTypes |= CollapsibleTypes.String; break; - case SyntaxKind.NumberKeyword: + case SyntaxKind.NumberKeyword: baseTypes |= CollapsibleTypes.Number; break; - case SyntaxKind.BigIntKeyword: + case SyntaxKind.BigIntKeyword: baseTypes |= CollapsibleTypes.BigInt; break; case SyntaxKind.LiteralType: const literalType = type.typeNode as LiteralTypeNode; switch(literalType.literal.kind) { - case SyntaxKind.TrueKeyword: + case SyntaxKind.TrueKeyword: literalTypes |= CollapsibleTypes.True; break; - case SyntaxKind.FalseKeyword: + case SyntaxKind.FalseKeyword: literalTypes |= CollapsibleTypes.False; break; case SyntaxKind.NumericLiteral: @@ -887,38 +898,38 @@ export function transformDeclarations(context: TransformationContext) { const typesToCollapse = baseTypes & literalTypes; if(baseTypes & CollapsibleTypes.Any) { - return [factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)] + return [factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)]; } // Nothing to collapse or reorder if(baseTypes === CollapsibleTypes.None) return nodes.map(n => n.typeNode); const result: TypeNode[] = []; - + // We do a best effort to preserve TS union order for primitives if(baseTypes & CollapsibleTypes.String) { - result.push(factory.createKeywordTypeNode(SyntaxKind.StringKeyword)) + result.push(factory.createKeywordTypeNode(SyntaxKind.StringKeyword)); } if(baseTypes & CollapsibleTypes.Number) { - result.push(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)) + result.push(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)); } if(baseTypes & CollapsibleTypes.Boolean) { - result.push(factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword)) + result.push(factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword)); } if(baseTypes & CollapsibleTypes.BigInt) { - result.push(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword)) + result.push(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword)); } if(!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.True) { - result.push(factory.createLiteralTypeNode(factory.createTrue())) + result.push(factory.createLiteralTypeNode(factory.createTrue())); } if(!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.False) { - result.push(factory.createLiteralTypeNode(factory.createFalse())) + result.push(factory.createLiteralTypeNode(factory.createFalse())); } for(const type of nodes) { - let typeofNode = CollapsibleTypes.None - + let typeofNode = CollapsibleTypes.None; + switch(type.typeNode.kind) { case SyntaxKind.BooleanKeyword: - case SyntaxKind.StringKeyword: + case SyntaxKind.StringKeyword: case SyntaxKind.NumberKeyword: case SyntaxKind.BigIntKeyword: case SyntaxKind.AnyKeyword: @@ -930,9 +941,9 @@ export function transformDeclarations(context: TransformationContext) { case SyntaxKind.LiteralType: const literalType = type.typeNode as LiteralTypeNode; switch(literalType.literal.kind) { - case SyntaxKind.TrueKeyword: + case SyntaxKind.TrueKeyword: continue; - case SyntaxKind.FalseKeyword: + case SyntaxKind.FalseKeyword: continue; case SyntaxKind.NumericLiteral: typeofNode = CollapsibleTypes.Number; @@ -963,19 +974,20 @@ export function transformDeclarations(context: TransformationContext) { const typeInfoCache = new Map - }> - let union: LocalTypeInfo[] = []; + }>(); + const union: LocalTypeInfo[] = []; for(const node of nodes) { const existing = union.find(u => typesEqual(node.typeNode, node.sourceNode, u.typeNode, u.sourceNode)); if(existing === undefined) { union.push(node); - } else { + } + else { existing.flags &= node.flags; } } - return union + return union; - function getTypeInfo(type:TypeLiteralNode, errorTarget: Node | undefined) { + function getTypeInfo(type: TypeLiteralNode, errorTarget: Node | undefined) { const typeNodeId = getNodeId(type); let typeInfo = typeInfoCache.get(typeNodeId); if(typeInfo) return typeInfo; @@ -983,25 +995,26 @@ export function transformDeclarations(context: TransformationContext) { typeInfo = { node: type, members: new Map() - } + }; for(const member of type.members) { const isMethod = isMethodSignature(member); const isProp = isPropertySignature(member); if(isMethod || isProp) { - const memberKey = getMemberKey(member) + const memberKey = getMemberKey(member); if (memberKey === undefined) { makeInvalidTypeAndReport(errorTarget ?? member); - break; + break; } typeInfo.members.set(memberKey, member); - } else { + } + else { makeInvalidTypeAndReport(errorTarget ?? member); } } typeInfoCache.set(typeNodeId, typeInfo); return typeInfo; } - function typesEqual(a: TypeNode | undefined, aErrorTarget:Node | undefined, b: TypeNode | undefined, bErrorTarget:Node | undefined) { + function typesEqual(a: TypeNode | undefined, aErrorTarget: Node | undefined, b: TypeNode | undefined, bErrorTarget: Node | undefined) { if (a === undefined || b === undefined) return a === b; if (a.kind !== b.kind) return false; switch(a.kind) { @@ -1021,18 +1034,18 @@ export function transformDeclarations(context: TransformationContext) { if(isLiteralTypeNode(a) && isLiteralTypeNode(b)) { let aLiteral = a.literal; let bLiteral = b.literal; - while(true) { + while(true) { switch(aLiteral.kind) { case SyntaxKind.NullKeyword: case SyntaxKind.TrueKeyword: case SyntaxKind.FalseKeyword: return aLiteral.kind === bLiteral.kind; case SyntaxKind.NumericLiteral: - return aLiteral.kind === bLiteral.kind && +aLiteral.text === +(bLiteral as LiteralExpression).text; + return aLiteral.kind === bLiteral.kind && +aLiteral.text === +(bLiteral).text; case SyntaxKind.StringLiteral: case SyntaxKind.NoSubstitutionTemplateLiteral: return (bLiteral.kind === SyntaxKind.StringLiteral || bLiteral.kind === SyntaxKind.NoSubstitutionTemplateLiteral) - && aLiteral.text === (bLiteral as LiteralExpression).text; + && aLiteral.text === (bLiteral).text; case SyntaxKind.PrefixUnaryExpression: const aUnary = (aLiteral as PrefixUnaryExpression); const bUnary = (bLiteral as PrefixUnaryExpression); @@ -1041,7 +1054,7 @@ export function transformDeclarations(context: TransformationContext) { aLiteral = aUnary.operand as LiteralExpression; bLiteral = bUnary.operand as LiteralExpression; return +aLiteral.text === +bLiteral.text; - default: + default: return false; } } @@ -1054,16 +1067,18 @@ export function transformDeclarations(context: TransformationContext) { if(aTypeName.right.escapedText !== bTypeName.right.escapedText) return false; aTypeName = aTypeName.left; bTypeName = bTypeName.left; - } else if(aTypeName.kind === SyntaxKind.Identifier && bTypeName.kind === SyntaxKind.Identifier) { + } + else if(aTypeName.kind === SyntaxKind.Identifier && bTypeName.kind === SyntaxKind.Identifier) { return aTypeName.escapedText === bTypeName.escapedText; - } else { + } + else { return false; } } } if(isTypeLiteralNode(a) && isTypeLiteralNode(b)) { if(a.members.length !== b.members.length) return false; - let aTypeInfo = getTypeInfo(a, aErrorTarget); + const aTypeInfo = getTypeInfo(a, aErrorTarget); if(!aTypeInfo) return false; for(const bMember of b.members) { @@ -1073,47 +1088,50 @@ export function transformDeclarations(context: TransformationContext) { const memberKey = getMemberKey(bMember); if (memberKey === undefined) { makeInvalidTypeAndReport(bErrorTarget ?? bMember); - break; + break; } const aMember = aTypeInfo.members.get(memberKey); if(!aMember) return false; if((aMember.questionToken !== undefined) !== (bMember.questionToken !== undefined)) return false; - if (getSyntacticModifierFlags(aMember) != getSyntacticModifierFlags(bMember)) return false; + if (getSyntacticModifierFlags(aMember) !== getSyntacticModifierFlags(bMember)) return false; if(bIsProp && isPropertySignature(aMember)) { if(!typesEqual(aMember.type, aErrorTarget, bMember.type, bErrorTarget)) { return false; } - } else if(bIsMethod && isMethodSignature(aMember)) { + } + else if(bIsMethod && isMethodSignature(aMember)) { if(!typesEqual(aMember.type, aErrorTarget,bMember.type, bErrorTarget)) { return false; } if(aMember.parameters.length !== b.members.length) { - return false + return false; } } - } else { + } + else { makeInvalidTypeAndReport(bErrorTarget ?? bMember); } } return true; - }else { + } + else { if(aErrorTarget) { reportIsolatedDeclarationError(aErrorTarget); } if(bErrorTarget) { reportIsolatedDeclarationError(bErrorTarget); } - } + } } } - function normalizeObjectUnion(nodes: Array) { - const allProps = new Map<__String, Array>(); + function normalizeObjectUnion(nodes: (TypeNode | undefined)[]) { + const allProps = new Map<__String, (TypeNode | undefined)[]>(); const allTypeLookup = new Array | undefined>(); let hasChanged = false; for (let i = 0; i< nodes.length; i++) { const type = nodes[i]; const typeLookup = new Map<__String, TypeNode>(); - allTypeLookup.push(typeLookup) + allTypeLookup.push(typeLookup); if(!type || !isTypeLiteralNode(type)) continue; for(const member of type.members){ @@ -1122,7 +1140,7 @@ export function transformDeclarations(context: TransformationContext) { if(isMethod || isProp) { const memberKey = getMemberKey(member); if(memberKey === undefined) { - nodes[i] = makeInvalidTypeAndReport(member.name) + nodes[i] = makeInvalidTypeAndReport(member.name); allTypeLookup[i] = undefined; hasChanged = true; break; @@ -1130,12 +1148,13 @@ export function transformDeclarations(context: TransformationContext) { let type; if(isProp) { type = member.type ?? makeInvalidTypeAndReport(member); - } else { + } + else { type = factory.createFunctionTypeNode( member.typeParameters, member.parameters, member.type!, - ) + ); } let propTypes = allProps.get(memberKey); if(!propTypes) { @@ -1144,7 +1163,8 @@ export function transformDeclarations(context: TransformationContext) { } propTypes[i] = type; typeLookup.set(memberKey, type); - } else { + } + else { nodes[i] = makeInvalidTypeAndReport(member); allTypeLookup[i] = undefined; hasChanged = true; @@ -1153,19 +1173,19 @@ export function transformDeclarations(context: TransformationContext) { } } for(const [, propTypes] of allProps) { - normalizeObjectUnion(propTypes) + normalizeObjectUnion(propTypes); } for(let typeIndex = 0; typeIndex< nodes.length; typeIndex++) { const type = nodes[typeIndex]; const props = allTypeLookup[typeIndex]; if(!type || !isTypeLiteralNode(type) || !props) continue; - let newMembers: TypeElement[] | undefined = undefined; + let newMembers: TypeElement[] | undefined; for(const [commonProp, propTypes] of allProps) { const propType = props.get(commonProp); if(propType) { - if(propType != propTypes[typeIndex]) { - let indexOfProp = findIndex(type.members, e => isPropertySignature(e) && isIdentifier(e.name) && e.name.escapedText === commonProp); + if(propType !== propTypes[typeIndex]) { + const indexOfProp = findIndex(type.members, e => isPropertySignature(e) && isIdentifier(e.name) && e.name.escapedText === commonProp); if(indexOfProp !== -1) { if(newMembers === undefined) { newMembers = [...type.members]; @@ -1179,16 +1199,17 @@ export function transformDeclarations(context: TransformationContext) { ); } } - } else { + } + else { if(newMembers === undefined) { newMembers = [...type.members]; } newMembers.push(factory.createPropertySignature( - /* modifiers */ undefined, + /*modifiers*/ undefined, factory.createIdentifier(unescapeLeadingUnderscores(commonProp)), factory.createToken(SyntaxKind.QuestionToken), factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), - )) + )); } } if (newMembers) { @@ -1211,16 +1232,16 @@ export function transformDeclarations(context: TransformationContext) { return localTypeInfo.typeNode; } - function makeUnionFromTypes(sourceNode: Node, types: LocalTypeInfo[], widenSingle: boolean) { - types = deduplicateUnion(types) + function makeUnionFromTypes(sourceNode: Node, types: LocalTypeInfo[], widenSingle: boolean) { + types = deduplicateUnion(types); if(types.length === 1) { - const localType = types[0] - return widenSingle ? { ... localType, type: getWidenedType(localType) }: localType + const localType = types[0]; + return widenSingle ? { ... localType, type: getWidenedType(localType) }: localType; } const unionConstituents = collapseLiteralTypesIntoBaseTypes(types); normalizeObjectUnion(unionConstituents); - return regular(unionConstituents.length === 1? unionConstituents[0]: factory.createUnionTypeNode(unionConstituents), sourceNode) + return regular(unionConstituents.length === 1? unionConstituents[0]: factory.createUnionTypeNode(unionConstituents), sourceNode); } function inferReturnType(node: FunctionLikeDeclaration) { if(node.type) { @@ -1229,46 +1250,48 @@ export function transformDeclarations(context: TransformationContext) { if(!node.body) { return regular(makeInvalidTypeAndReport(node), node); } - + const returnStatements: ReturnStatement[] = []; const yieldExpressions: YieldExpression[] = []; - + let returnType; if(!isBlock(node.body)) { - returnType = localInference(node.body) + returnType = localInference(node.body); } else { collectReturnAndYield(node.body, returnStatements, yieldExpressions); if(returnStatements.length === 0) { returnType = regular(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), node); - } else { - let returnStatementInference = returnStatements.map((r) => { - return r.expression? - localInference(r.expression, NarrowBehavior.KeepLiterals): - fresh(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), r) + } + else { + const returnStatementInference = returnStatements.map((r) => { + return r.expression? + localInference(r.expression, NarrowBehavior.KeepLiterals): + fresh(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), r); }); - - returnType = makeUnionFromTypes(node, returnStatementInference, true); + + returnType = makeUnionFromTypes(node, returnStatementInference, /*widenSingle*/ true); if(returnType.flags & LocalTypeInfoFlags.Fresh && returnType.typeNode.kind === SyntaxKind.UndefinedKeyword) { returnType = fresh(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), returnType.typeNode); } } } - let yieldType: LocalTypeInfo | undefined = undefined; + let yieldType: LocalTypeInfo | undefined; if(node.asteriskToken) { if(yieldExpressions.length === 0) { returnType = regular( - factory.createKeywordTypeNode(SyntaxKind.NeverKeyword), + factory.createKeywordTypeNode(SyntaxKind.NeverKeyword), node ); - } else { - let yieldExpressionsInference = yieldExpressions.map((r) => { - return r.expression? - localInference(r.expression, NarrowBehavior.KeepLiterals): - regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), r) + } + else { + const yieldExpressionsInference = yieldExpressions.map((r) => { + return r.expression? + localInference(r.expression, NarrowBehavior.KeepLiterals): + regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), r); }); - - yieldType = makeUnionFromTypes(node, yieldExpressionsInference, true); + + yieldType = makeUnionFromTypes(node, yieldExpressionsInference, /*widenSingle*/ true); } } return makeFinalReturnType(node, returnType, yieldType); @@ -1283,7 +1306,7 @@ export function transformDeclarations(context: TransformationContext) { ), returnType.sourceNode, returnType.flags - ) + ); } else if(modifiers & ModifierFlags.Async) { return regular( @@ -1293,27 +1316,27 @@ export function transformDeclarations(context: TransformationContext) { ), returnType.sourceNode, returnType.flags - ) + ); } return returnType; } function collectReturnAndYield(node: Node, result: ReturnStatement[], yieldExpressions: YieldExpression[]) { forEachChild(node, child => { if(isReturnStatement(child)) { - result.push(child) + result.push(child); } if(isYieldExpression(child)) { yieldExpressions.push(child); } if(isClassLike(child) || isFunctionLike(child)) { - return; + return; } // TODO: Do not walk all children if not generator function collectReturnAndYield(child, result, yieldExpressions); - }) + }); } } - + function localInferenceFromInitializer(node: HasInferredType | ExportAssignment): TypeNode | undefined { if(NO_LOCAL_INFERENCE) { return undefined; @@ -1328,7 +1351,7 @@ export function transformDeclarations(context: TransformationContext) { else if(isVariableDeclaration(node) && node.initializer) { typeNode = localInference(node.initializer); } - else if(isPropertyDeclaration(node) && node.initializer) { + else if(isPropertyDeclaration(node) && node.initializer) { typeNode = localInference(node.initializer); } else if(isFunctionDeclaration(node)) { @@ -1991,8 +2014,8 @@ export function transformDeclarations(context: TransformationContext) { errorNode: input }); errorFallbackNode = input; - const type = isolatedDeclarations ? - localInferenceFromInitializer(input) ?? makeInvalidTypeAndReport(input) : + const type = isolatedDeclarations ? + localInferenceFromInitializer(input) ?? makeInvalidTypeAndReport(input) : resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker); const varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, type, /*initializer*/ undefined); errorFallbackNode = undefined; @@ -2233,7 +2256,7 @@ export function transformDeclarations(context: TransformationContext) { [ factory.createExpressionWithTypeArguments( factory.createIdentifier("invalid"), - /* typeArguments */ undefined, + /*typeArguments*/ undefined, ) ])]), members diff --git a/external-declarations/src/utils/fs-utils.ts b/external-declarations/src/utils/fs-utils.ts index 2ea35b0dc0768..b293643c9cd33 100644 --- a/external-declarations/src/utils/fs-utils.ts +++ b/external-declarations/src/utils/fs-utils.ts @@ -15,7 +15,7 @@ export async function ensureDir(dirName: string) { cache[dirName] = true; } } -let writeQueue = [0, 0, 0, 0, 0].map(() => Promise.resolve()); +const writeQueue = [0, 0, 0, 0, 0].map(() => Promise.resolve()); let writeQueueIndex = 0; export function addToQueue(fn: () => Promise) { diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 75766308e996e..55d0c1f08b99b 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -267,7 +267,7 @@ import { } from "../_namespaces/ts"; import * as moduleSpecifiers from "../_namespaces/ts.moduleSpecifiers"; - + const NO_LOCAL_INFERENCE = !!process.env.NO_LOCAL_INFERENCE; enum NarrowBehavior { None = 0, @@ -842,7 +842,7 @@ export function transformDeclarations(context: TransformationContext) { return factory.createTypeReferenceNode("invalid"); } - type LocalTypeInfo = { typeNode: TypeNode, sourceNode?: Node, flags: LocalTypeInfoFlags }; + interface LocalTypeInfo { typeNode: TypeNode, sourceNode?: Node, flags: LocalTypeInfoFlags } // We need to see about getting the JSX element type. function getJSXElementType(_node: Node): EntityName { return factory.createQualifiedName( @@ -851,7 +851,7 @@ export function transformDeclarations(context: TransformationContext) { factory.createIdentifier("JSX"), ), factory.createIdentifier("Element"), - ) + ); } function localInference(node: Node, isConstContext: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { const nextIsConst = isConstContext & NarrowBehavior.NotKeepLiterals; @@ -862,7 +862,8 @@ export function transformDeclarations(context: TransformationContext) { if((node as Identifier).escapedText === "undefined") { if(strictNullChecks) { return regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), node); - } else { + } + else { return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.Implicit); } } @@ -870,7 +871,8 @@ export function transformDeclarations(context: TransformationContext) { case SyntaxKind.NullKeyword: if(strictNullChecks) { return regular(factory.createLiteralTypeNode(factory.createNull()), node); - } else { + } + else { return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.Implicit); } case SyntaxKind.NewExpression: @@ -881,7 +883,7 @@ export function transformDeclarations(context: TransformationContext) { visitNode(newExpr.expression, visitDeclarationSubtree, isIdentifier)!, visitNodes(newExpr.typeArguments, visitDeclarationSubtree, isTypeNode) ); - const visitedTypeNode = visitNode(typeNode, visitDeclarationSubtree, isTypeNode) + const visitedTypeNode = visitNode(typeNode, visitDeclarationSubtree, isTypeNode); if(visitedTypeNode) { return regular(visitedTypeNode, node); } @@ -900,8 +902,9 @@ export function transformDeclarations(context: TransformationContext) { fnNode.parameters.map(p => ensureParameter(p)), inferReturnType(fnNode).typeNode, ); - return regular(fnTypeNode, node) - }finally { + return regular(fnTypeNode, node); + } + finally { enclosingDeclaration = oldEnclosingDeclaration; } case SyntaxKind.TypeAssertionExpression: @@ -909,9 +912,10 @@ export function transformDeclarations(context: TransformationContext) { const asExpression = node as AsExpression | TypeAssertion; if(isTypeReferenceNode(asExpression.type) && isConst(asExpression.type)) { return localInference(asExpression.expression, NarrowBehavior.AsConst); - } else { + } + else { const type = visitType(asExpression.type, asExpression); - if(isLiteralTypeNode(type) && + if(isLiteralTypeNode(type) && (isNoSubstitutionTemplateLiteral(type.literal) || isStringLiteral(type.literal))) { return regular(factory.createLiteralTypeNode( normalizeLiteralValue(type.literal) @@ -927,29 +931,31 @@ export function transformDeclarations(context: TransformationContext) { return { flags, typeNode: factory.createLiteralTypeNode(factory.createPrefixMinus(targetExpressionType.literal)) - } - } else if(targetExpressionType.kind === SyntaxKind.NumberKeyword) { + }; + } + else if(targetExpressionType.kind === SyntaxKind.NumberKeyword) { return { typeNode: targetExpressionType, flags }; } } break; - case SyntaxKind.NumericLiteral: + case SyntaxKind.NumericLiteral: return literal(node, SyntaxKind.NumberKeyword, isConstContext); case SyntaxKind.TemplateExpression: if(!isConstContext) { - return literal(node, SyntaxKind.StringKeyword, isConstContext) + return literal(node, SyntaxKind.StringKeyword, isConstContext); } const templateExpression = node as TemplateExpression; - const templateSpans: TemplateLiteralTypeSpan[] = [] - let head = factory.createTemplateHead(templateExpression.head.text); + const templateSpans: TemplateLiteralTypeSpan[] = []; + const head = factory.createTemplateHead(templateExpression.head.text); let prevSpan: TemplateHead | TemplateLiteralTypeSpan = head; for(const span of templateExpression.templateSpans) { const {typeNode} = localInference(span.expression, nextIsConst); if(isLiteralTypeNode(typeNode)) { - let oldText = prevSpan.kind === SyntaxKind.TemplateHead ? prevSpan.text : prevSpan.literal.text; - let newText= oldText; + const oldText = prevSpan.kind === SyntaxKind.TemplateHead ? prevSpan.text : prevSpan.literal.text; + const newText= oldText; console.log(newText);//wip - } else { + } + else { const literalSpan = factory.createTemplateLiteralTypeSpan( typeNode, span.literal @@ -961,11 +967,11 @@ export function transformDeclarations(context: TransformationContext) { } return regular(factory.createTemplateLiteralType(templateExpression.head, templateSpans), node); case SyntaxKind.NoSubstitutionTemplateLiteral: - case SyntaxKind.StringLiteral: + case SyntaxKind.StringLiteral: return literal(node, SyntaxKind.StringKeyword, isConstContext); - case SyntaxKind.BigIntLiteral: + case SyntaxKind.BigIntLiteral: return literal(node, SyntaxKind.BigIntKeyword, isConstContext); - case SyntaxKind.RegularExpressionLiteral: + case SyntaxKind.RegularExpressionLiteral: return literal(node, "RegExp", isConstContext); case SyntaxKind.JsxSelfClosingElement: case SyntaxKind.JsxElement: @@ -973,16 +979,16 @@ export function transformDeclarations(context: TransformationContext) { setParent(typeReference.typeName, typeReference); checkEntityNameVisibility(typeReference.typeName, enclosingDeclaration); return fresh(typeReference, node); - case SyntaxKind.TrueKeyword: - case SyntaxKind.FalseKeyword: + case SyntaxKind.TrueKeyword: + case SyntaxKind.FalseKeyword: return literal(node, SyntaxKind.BooleanKeyword, isConstContext); case SyntaxKind.ArrayLiteralExpression: - const arrayLiteral = node as ArrayLiteralExpression - const elementTypesInfo: LocalTypeInfo[] = [] + const arrayLiteral = node as ArrayLiteralExpression; + const elementTypesInfo: LocalTypeInfo[] = []; for(const element of arrayLiteral.elements) { elementTypesInfo.push( localInference(element, nextIsConst) - ) + ); } if(isConstContext & NarrowBehavior.AsConst) { const tupleType = factory.createTupleTypeNode( @@ -990,19 +996,21 @@ export function transformDeclarations(context: TransformationContext) { ); tupleType.emitNode = { flags: 1, autoGenerate: undefined, internalFlags: 0 }; return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node); - } else { + } + else { let itemType; if(elementTypesInfo.length === 0) { itemType = (strictNullChecks ? factory.createKeywordTypeNode(SyntaxKind.NeverKeyword) : factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)); - } else { - itemType = makeUnionFromTypes(node, elementTypesInfo, false).typeNode; + } + else { + itemType = makeUnionFromTypes(node, elementTypesInfo, /*widenSingle*/ false).typeNode; } return regular(factory.createArrayTypeNode(itemType), node); - } + } case SyntaxKind.ObjectLiteralExpression: - const objectLiteral = node as ObjectLiteralExpression - const properties: TypeElement[] = [] + const objectLiteral = node as ObjectLiteralExpression; + const properties: TypeElement[] = []; for(const prop of objectLiteral.properties) { if(isMethodDeclaration(prop)) { const oldEnclosingDeclaration = enclosingDeclaration; @@ -1011,9 +1019,9 @@ export function transformDeclarations(context: TransformationContext) { properties.push(factory.createPropertySignature( [factory.createModifier(SyntaxKind.ReadonlyKeyword)], visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!, - undefined, + /*questionToken*/ undefined, factory.createFunctionTypeNode( - visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), + visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), prop.parameters.map(p => ensureParameter(p)), localInferenceFromInitializer(prop)!, ) @@ -1024,42 +1032,43 @@ export function transformDeclarations(context: TransformationContext) { [], visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!, prop.questionToken, - visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), + visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), prop.parameters.map(p => ensureParameter(p)), localInferenceFromInitializer(prop), - )) + )); } enclosingDeclaration = oldEnclosingDeclaration; } else if(isPropertyAssignment(prop)) { - const modifiers = isConstContext & NarrowBehavior.AsConst ? + const modifiers = isConstContext & NarrowBehavior.AsConst ? [factory.createModifier(SyntaxKind.ReadonlyKeyword)]: []; properties.push(factory.createPropertySignature( modifiers, visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!, - undefined, + /*questionToken*/ undefined, localInference(prop.initializer, nextIsConst).typeNode - )) - } else { + )); + } + else { return invalid(prop); - } + } } return regular(factory.createTypeLiteralNode( properties - ), objectLiteral) + ), objectLiteral); } - + return regular(makeInvalidTypeAndReport(node), node); } function invalid(node: Node): LocalTypeInfo { - return { typeNode: makeInvalidTypeAndReport(node), flags: LocalTypeInfoFlags.Invalid, sourceNode: node } + return { typeNode: makeInvalidTypeAndReport(node), flags: LocalTypeInfoFlags.Invalid, sourceNode: node }; } function fresh(typeNode: TypeNode, sourceNode?: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { - return { typeNode, flags: flags | LocalTypeInfoFlags.Fresh, sourceNode } + return { typeNode, flags: flags | LocalTypeInfoFlags.Fresh, sourceNode }; } function regular(typeNode: TypeNode, sourceNode?: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { - return { typeNode, flags, sourceNode } + return { typeNode, flags, sourceNode }; } function normalizeLiteralValue(literal: LiteralExpression) { switch(literal.kind) { @@ -1079,10 +1088,11 @@ export function transformDeclarations(context: TransformationContext) { if(narrowBehavior) { return fresh(factory.createLiteralTypeNode( normalizeLiteralValue(node as LiteralExpression) - ), node) - } else { + ), node); + } + else { return fresh( - typeof baseType === "number" ? factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType), + typeof baseType === "number" ? factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType), node ); } @@ -1099,7 +1109,7 @@ export function transformDeclarations(context: TransformationContext) { return visitedType ?? makeInvalidTypeAndReport(owner); } - function getMemberKey(member:MethodSignature | PropertySignature ) { + function getMemberKey(member: MethodSignature | PropertySignature) { if(!isIdentifier(member.name)) { makeInvalidTypeAndReport(member.name); return undefined; @@ -1128,30 +1138,31 @@ export function transformDeclarations(context: TransformationContext) { break; case SyntaxKind.AnyKeyword: if(type.flags & LocalTypeInfoFlags.Implicit) { - literalTypes |= CollapsibleTypes.ImplicitAny - } else { - baseTypes |= CollapsibleTypes.Any + literalTypes |= CollapsibleTypes.ImplicitAny; } - break + else { + baseTypes |= CollapsibleTypes.Any; + } + break; case SyntaxKind.BooleanKeyword: - baseTypes |= CollapsibleTypes.Boolean + baseTypes |= CollapsibleTypes.Boolean; break; - case SyntaxKind.StringKeyword: - baseTypes |= CollapsibleTypes.String + case SyntaxKind.StringKeyword: + baseTypes |= CollapsibleTypes.String; break; - case SyntaxKind.NumberKeyword: + case SyntaxKind.NumberKeyword: baseTypes |= CollapsibleTypes.Number; break; - case SyntaxKind.BigIntKeyword: + case SyntaxKind.BigIntKeyword: baseTypes |= CollapsibleTypes.BigInt; break; case SyntaxKind.LiteralType: const literalType = type.typeNode as LiteralTypeNode; switch(literalType.literal.kind) { - case SyntaxKind.TrueKeyword: + case SyntaxKind.TrueKeyword: literalTypes |= CollapsibleTypes.True; break; - case SyntaxKind.FalseKeyword: + case SyntaxKind.FalseKeyword: literalTypes |= CollapsibleTypes.False; break; case SyntaxKind.NumericLiteral: @@ -1180,38 +1191,38 @@ export function transformDeclarations(context: TransformationContext) { const typesToCollapse = baseTypes & literalTypes; if(baseTypes & CollapsibleTypes.Any) { - return [factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)] + return [factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)]; } // Nothing to collapse or reorder if(baseTypes === CollapsibleTypes.None) return nodes.map(n => n.typeNode); const result: TypeNode[] = []; - + // We do a best effort to preserve TS union order for primitives if(baseTypes & CollapsibleTypes.String) { - result.push(factory.createKeywordTypeNode(SyntaxKind.StringKeyword)) + result.push(factory.createKeywordTypeNode(SyntaxKind.StringKeyword)); } if(baseTypes & CollapsibleTypes.Number) { - result.push(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)) + result.push(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)); } if(baseTypes & CollapsibleTypes.Boolean) { - result.push(factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword)) + result.push(factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword)); } if(baseTypes & CollapsibleTypes.BigInt) { - result.push(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword)) + result.push(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword)); } if(!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.True) { - result.push(factory.createLiteralTypeNode(factory.createTrue())) + result.push(factory.createLiteralTypeNode(factory.createTrue())); } if(!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.False) { - result.push(factory.createLiteralTypeNode(factory.createFalse())) + result.push(factory.createLiteralTypeNode(factory.createFalse())); } for(const type of nodes) { - let typeofNode = CollapsibleTypes.None - + let typeofNode = CollapsibleTypes.None; + switch(type.typeNode.kind) { case SyntaxKind.BooleanKeyword: - case SyntaxKind.StringKeyword: + case SyntaxKind.StringKeyword: case SyntaxKind.NumberKeyword: case SyntaxKind.BigIntKeyword: case SyntaxKind.AnyKeyword: @@ -1223,9 +1234,9 @@ export function transformDeclarations(context: TransformationContext) { case SyntaxKind.LiteralType: const literalType = type.typeNode as LiteralTypeNode; switch(literalType.literal.kind) { - case SyntaxKind.TrueKeyword: + case SyntaxKind.TrueKeyword: continue; - case SyntaxKind.FalseKeyword: + case SyntaxKind.FalseKeyword: continue; case SyntaxKind.NumericLiteral: typeofNode = CollapsibleTypes.Number; @@ -1256,19 +1267,20 @@ export function transformDeclarations(context: TransformationContext) { const typeInfoCache = new Map - }> - let union: LocalTypeInfo[] = []; + }>(); + const union: LocalTypeInfo[] = []; for(const node of nodes) { const existing = union.find(u => typesEqual(node.typeNode, node.sourceNode, u.typeNode, u.sourceNode)); if(existing === undefined) { union.push(node); - } else { + } + else { existing.flags &= node.flags; } } - return union + return union; - function getTypeInfo(type:TypeLiteralNode, errorTarget: Node | undefined) { + function getTypeInfo(type: TypeLiteralNode, errorTarget: Node | undefined) { const typeNodeId = getNodeId(type); let typeInfo = typeInfoCache.get(typeNodeId); if(typeInfo) return typeInfo; @@ -1276,25 +1288,26 @@ export function transformDeclarations(context: TransformationContext) { typeInfo = { node: type, members: new Map() - } + }; for(const member of type.members) { const isMethod = isMethodSignature(member); const isProp = isPropertySignature(member); if(isMethod || isProp) { - const memberKey = getMemberKey(member) + const memberKey = getMemberKey(member); if (memberKey === undefined) { makeInvalidTypeAndReport(errorTarget ?? member); - break; + break; } typeInfo.members.set(memberKey, member); - } else { + } + else { makeInvalidTypeAndReport(errorTarget ?? member); } } typeInfoCache.set(typeNodeId, typeInfo); return typeInfo; } - function typesEqual(a: TypeNode | undefined, aErrorTarget:Node | undefined, b: TypeNode | undefined, bErrorTarget:Node | undefined) { + function typesEqual(a: TypeNode | undefined, aErrorTarget: Node | undefined, b: TypeNode | undefined, bErrorTarget: Node | undefined) { if (a === undefined || b === undefined) return a === b; if (a.kind !== b.kind) return false; switch(a.kind) { @@ -1314,18 +1327,18 @@ export function transformDeclarations(context: TransformationContext) { if(isLiteralTypeNode(a) && isLiteralTypeNode(b)) { let aLiteral = a.literal; let bLiteral = b.literal; - while(true) { + while(true) { switch(aLiteral.kind) { case SyntaxKind.NullKeyword: case SyntaxKind.TrueKeyword: case SyntaxKind.FalseKeyword: return aLiteral.kind === bLiteral.kind; case SyntaxKind.NumericLiteral: - return aLiteral.kind === bLiteral.kind && +aLiteral.text === +(bLiteral as LiteralExpression).text; + return aLiteral.kind === bLiteral.kind && +aLiteral.text === +(bLiteral).text; case SyntaxKind.StringLiteral: case SyntaxKind.NoSubstitutionTemplateLiteral: return (bLiteral.kind === SyntaxKind.StringLiteral || bLiteral.kind === SyntaxKind.NoSubstitutionTemplateLiteral) - && aLiteral.text === (bLiteral as LiteralExpression).text; + && aLiteral.text === (bLiteral).text; case SyntaxKind.PrefixUnaryExpression: const aUnary = (aLiteral as PrefixUnaryExpression); const bUnary = (bLiteral as PrefixUnaryExpression); @@ -1334,7 +1347,7 @@ export function transformDeclarations(context: TransformationContext) { aLiteral = aUnary.operand as LiteralExpression; bLiteral = bUnary.operand as LiteralExpression; return +aLiteral.text === +bLiteral.text; - default: + default: return false; } } @@ -1347,16 +1360,18 @@ export function transformDeclarations(context: TransformationContext) { if(aTypeName.right.escapedText !== bTypeName.right.escapedText) return false; aTypeName = aTypeName.left; bTypeName = bTypeName.left; - } else if(aTypeName.kind === SyntaxKind.Identifier && bTypeName.kind === SyntaxKind.Identifier) { + } + else if(aTypeName.kind === SyntaxKind.Identifier && bTypeName.kind === SyntaxKind.Identifier) { return aTypeName.escapedText === bTypeName.escapedText; - } else { + } + else { return false; } } } if(isTypeLiteralNode(a) && isTypeLiteralNode(b)) { if(a.members.length !== b.members.length) return false; - let aTypeInfo = getTypeInfo(a, aErrorTarget); + const aTypeInfo = getTypeInfo(a, aErrorTarget); if(!aTypeInfo) return false; for(const bMember of b.members) { @@ -1366,47 +1381,50 @@ export function transformDeclarations(context: TransformationContext) { const memberKey = getMemberKey(bMember); if (memberKey === undefined) { makeInvalidTypeAndReport(bErrorTarget ?? bMember); - break; + break; } const aMember = aTypeInfo.members.get(memberKey); if(!aMember) return false; if((aMember.questionToken !== undefined) !== (bMember.questionToken !== undefined)) return false; - if (getSyntacticModifierFlags(aMember) != getSyntacticModifierFlags(bMember)) return false; + if (getSyntacticModifierFlags(aMember) !== getSyntacticModifierFlags(bMember)) return false; if(bIsProp && isPropertySignature(aMember)) { if(!typesEqual(aMember.type, aErrorTarget, bMember.type, bErrorTarget)) { return false; } - } else if(bIsMethod && isMethodSignature(aMember)) { + } + else if(bIsMethod && isMethodSignature(aMember)) { if(!typesEqual(aMember.type, aErrorTarget,bMember.type, bErrorTarget)) { return false; } if(aMember.parameters.length !== b.members.length) { - return false + return false; } } - } else { + } + else { makeInvalidTypeAndReport(bErrorTarget ?? bMember); } } return true; - }else { + } + else { if(aErrorTarget) { reportIsolatedDeclarationError(aErrorTarget); } if(bErrorTarget) { reportIsolatedDeclarationError(bErrorTarget); } - } + } } } - function normalizeObjectUnion(nodes: Array) { - const allProps = new Map<__String, Array>(); + function normalizeObjectUnion(nodes: (TypeNode | undefined)[]) { + const allProps = new Map<__String, (TypeNode | undefined)[]>(); const allTypeLookup = new Array | undefined>(); let hasChanged = false; for (let i = 0; i< nodes.length; i++) { const type = nodes[i]; const typeLookup = new Map<__String, TypeNode>(); - allTypeLookup.push(typeLookup) + allTypeLookup.push(typeLookup); if(!type || !isTypeLiteralNode(type)) continue; for(const member of type.members){ @@ -1415,7 +1433,7 @@ export function transformDeclarations(context: TransformationContext) { if(isMethod || isProp) { const memberKey = getMemberKey(member); if(memberKey === undefined) { - nodes[i] = makeInvalidTypeAndReport(member.name) + nodes[i] = makeInvalidTypeAndReport(member.name); allTypeLookup[i] = undefined; hasChanged = true; break; @@ -1423,12 +1441,13 @@ export function transformDeclarations(context: TransformationContext) { let type; if(isProp) { type = member.type ?? makeInvalidTypeAndReport(member); - } else { + } + else { type = factory.createFunctionTypeNode( member.typeParameters, member.parameters, member.type!, - ) + ); } let propTypes = allProps.get(memberKey); if(!propTypes) { @@ -1437,7 +1456,8 @@ export function transformDeclarations(context: TransformationContext) { } propTypes[i] = type; typeLookup.set(memberKey, type); - } else { + } + else { nodes[i] = makeInvalidTypeAndReport(member); allTypeLookup[i] = undefined; hasChanged = true; @@ -1446,19 +1466,19 @@ export function transformDeclarations(context: TransformationContext) { } } for(const [, propTypes] of allProps) { - normalizeObjectUnion(propTypes) + normalizeObjectUnion(propTypes); } for(let typeIndex = 0; typeIndex< nodes.length; typeIndex++) { const type = nodes[typeIndex]; const props = allTypeLookup[typeIndex]; if(!type || !isTypeLiteralNode(type) || !props) continue; - let newMembers: TypeElement[] | undefined = undefined; + let newMembers: TypeElement[] | undefined; for(const [commonProp, propTypes] of allProps) { const propType = props.get(commonProp); if(propType) { - if(propType != propTypes[typeIndex]) { - let indexOfProp = findIndex(type.members, e => isPropertySignature(e) && isIdentifier(e.name) && e.name.escapedText === commonProp); + if(propType !== propTypes[typeIndex]) { + const indexOfProp = findIndex(type.members, e => isPropertySignature(e) && isIdentifier(e.name) && e.name.escapedText === commonProp); if(indexOfProp !== -1) { if(newMembers === undefined) { newMembers = [...type.members]; @@ -1472,16 +1492,17 @@ export function transformDeclarations(context: TransformationContext) { ); } } - } else { + } + else { if(newMembers === undefined) { newMembers = [...type.members]; } newMembers.push(factory.createPropertySignature( - /* modifiers */ undefined, + /*modifiers*/ undefined, factory.createIdentifier(unescapeLeadingUnderscores(commonProp)), factory.createToken(SyntaxKind.QuestionToken), factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), - )) + )); } } if (newMembers) { @@ -1504,16 +1525,16 @@ export function transformDeclarations(context: TransformationContext) { return localTypeInfo.typeNode; } - function makeUnionFromTypes(sourceNode: Node, types: LocalTypeInfo[], widenSingle: boolean) { - types = deduplicateUnion(types) + function makeUnionFromTypes(sourceNode: Node, types: LocalTypeInfo[], widenSingle: boolean) { + types = deduplicateUnion(types); if(types.length === 1) { - const localType = types[0] - return widenSingle ? { ... localType, type: getWidenedType(localType) }: localType + const localType = types[0]; + return widenSingle ? { ... localType, type: getWidenedType(localType) }: localType; } const unionConstituents = collapseLiteralTypesIntoBaseTypes(types); normalizeObjectUnion(unionConstituents); - return regular(unionConstituents.length === 1? unionConstituents[0]: factory.createUnionTypeNode(unionConstituents), sourceNode) + return regular(unionConstituents.length === 1? unionConstituents[0]: factory.createUnionTypeNode(unionConstituents), sourceNode); } function inferReturnType(node: FunctionLikeDeclaration) { if(node.type) { @@ -1522,46 +1543,48 @@ export function transformDeclarations(context: TransformationContext) { if(!node.body) { return regular(makeInvalidTypeAndReport(node), node); } - + const returnStatements: ReturnStatement[] = []; const yieldExpressions: YieldExpression[] = []; - + let returnType; if(!isBlock(node.body)) { - returnType = localInference(node.body) + returnType = localInference(node.body); } else { collectReturnAndYield(node.body, returnStatements, yieldExpressions); if(returnStatements.length === 0) { returnType = regular(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), node); - } else { - let returnStatementInference = returnStatements.map((r) => { - return r.expression? - localInference(r.expression, NarrowBehavior.KeepLiterals): - fresh(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), r) + } + else { + const returnStatementInference = returnStatements.map((r) => { + return r.expression? + localInference(r.expression, NarrowBehavior.KeepLiterals): + fresh(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), r); }); - - returnType = makeUnionFromTypes(node, returnStatementInference, true); + + returnType = makeUnionFromTypes(node, returnStatementInference, /*widenSingle*/ true); if(returnType.flags & LocalTypeInfoFlags.Fresh && returnType.typeNode.kind === SyntaxKind.UndefinedKeyword) { returnType = fresh(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), returnType.typeNode); } } } - let yieldType: LocalTypeInfo | undefined = undefined; + let yieldType: LocalTypeInfo | undefined; if(node.asteriskToken) { if(yieldExpressions.length === 0) { returnType = regular( - factory.createKeywordTypeNode(SyntaxKind.NeverKeyword), + factory.createKeywordTypeNode(SyntaxKind.NeverKeyword), node ); - } else { - let yieldExpressionsInference = yieldExpressions.map((r) => { - return r.expression? - localInference(r.expression, NarrowBehavior.KeepLiterals): - regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), r) + } + else { + const yieldExpressionsInference = yieldExpressions.map((r) => { + return r.expression? + localInference(r.expression, NarrowBehavior.KeepLiterals): + regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), r); }); - - yieldType = makeUnionFromTypes(node, yieldExpressionsInference, true); + + yieldType = makeUnionFromTypes(node, yieldExpressionsInference, /*widenSingle*/ true); } } return makeFinalReturnType(node, returnType, yieldType); @@ -1576,7 +1599,7 @@ export function transformDeclarations(context: TransformationContext) { ), returnType.sourceNode, returnType.flags - ) + ); } else if(modifiers & ModifierFlags.Async) { return regular( @@ -1586,27 +1609,27 @@ export function transformDeclarations(context: TransformationContext) { ), returnType.sourceNode, returnType.flags - ) + ); } return returnType; } function collectReturnAndYield(node: Node, result: ReturnStatement[], yieldExpressions: YieldExpression[]) { forEachChild(node, child => { if(isReturnStatement(child)) { - result.push(child) + result.push(child); } if(isYieldExpression(child)) { yieldExpressions.push(child); } if(isClassLike(child) || isFunctionLike(child)) { - return; + return; } // TODO: Do not walk all children if not generator function collectReturnAndYield(child, result, yieldExpressions); - }) + }); } } - + function localInferenceFromInitializer(node: HasInferredType | ExportAssignment): TypeNode | undefined { if(NO_LOCAL_INFERENCE) { return undefined; @@ -1621,7 +1644,7 @@ export function transformDeclarations(context: TransformationContext) { else if(isVariableDeclaration(node) && node.initializer) { typeNode = localInference(node.initializer); } - else if(isPropertyDeclaration(node) && node.initializer) { + else if(isPropertyDeclaration(node) && node.initializer) { typeNode = localInference(node.initializer); } else if(isFunctionDeclaration(node)) { @@ -2284,8 +2307,8 @@ export function transformDeclarations(context: TransformationContext) { errorNode: input }); errorFallbackNode = input; - const type = isolatedDeclarations ? - localInferenceFromInitializer(input) ?? makeInvalidTypeAndReport(input) : + const type = isolatedDeclarations ? + localInferenceFromInitializer(input) ?? makeInvalidTypeAndReport(input) : resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker); const varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, type, /*initializer*/ undefined); errorFallbackNode = undefined; @@ -2604,7 +2627,7 @@ export function transformDeclarations(context: TransformationContext) { [ factory.createExpressionWithTypeArguments( factory.createIdentifier("invalid"), - /* typeArguments */ undefined, + /*typeArguments*/ undefined, ) ])]), members diff --git a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.js b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.js index 7409d2130cf40..a2d0ad89cccac 100644 --- a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.js +++ b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.js @@ -17,7 +17,7 @@ class C3 { accessor #y = 0; } -//// [file3.ts] +//// [file3-2.ts] class C3 { accessor x = 0; } @@ -50,6 +50,11 @@ class C2 { static accessor #x = 0; } //// [file3.js] +class C3 { + static accessor #x = 0; + accessor #y = 0; +} +//// [file3-2.js] class C3 { accessor x = 0; } diff --git a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.symbols b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.symbols index 3e0098e855f4a..5cc07d4073d07 100644 --- a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.symbols +++ b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.symbols @@ -20,17 +20,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)) } -=== tests/cases/conformance/classes/propertyMemberDeclarations/file3.ts === +=== tests/cases/conformance/classes/propertyMemberDeclarations/file3-2.ts === class C3 { ->C3 : Symbol(C3, Decl(file3.ts, 0, 0)) +>C3 : Symbol(C3, Decl(file3-2.ts, 0, 0)) accessor x = 0; ->x : Symbol(C3.x, Decl(file3.ts, 0, 10)) +>x : Symbol(C3.x, Decl(file3-2.ts, 0, 10)) } === tests/cases/conformance/classes/propertyMemberDeclarations/file4.ts === diff --git a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.types b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.types index a3a0b8c137629..6bd43a1860c58 100644 --- a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.types +++ b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.types @@ -22,13 +22,15 @@ class C3 { >C3 : C3 static accessor #x = 0; ->x : number +>#x : number >0 : 0 accessor #y = 0; +>#y : number +>0 : 0 } -=== tests/cases/conformance/classes/propertyMemberDeclarations/file3.ts === +=== tests/cases/conformance/classes/propertyMemberDeclarations/file3-2.ts === class C3 { >C3 : C3 diff --git a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2015).js index 7702afec3b08f..b663b691ea423 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 {} @@ -57,6 +57,22 @@ export let C = (() => { return C = _classThis; })(); //// [c.js] +export default (() => { + let _classDecorators = [dec]; + let _classDescriptor; + let _classExtraInitializers = []; + let _classThis; + var C = _classThis = class { + }; + __setFunctionName(_classThis, "C"); + (() => { + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + C = _classThis = _classDescriptor.value; + __runInitializers(_classThis, _classExtraInitializers); + })(); + return C = _classThis; +})(); +//// [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 09eac0a5b6171..0c89cfaea0b7a 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 {} @@ -55,6 +55,21 @@ export let C = (() => { return C = _classThis; })(); //// [c.js] +export default (() => { + let _classDecorators = [dec]; + let _classDescriptor; + let _classExtraInitializers = []; + let _classThis; + var C = class { + static { + __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + C = _classThis = _classDescriptor.value; + __runInitializers(_classThis, _classExtraInitializers); + } + }; + return C = _classThis; +})(); +//// [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 b574caffd3bbf..0e455692f6483 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 {} @@ -72,6 +72,29 @@ var C = exports.C = function () { "use strict"; var _this = this; 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 () { + __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + C = _classThis = _classDescriptor.value; + __runInitializers(_classThis, _classExtraInitializers); + })(); + return C = _classThis; +}(); +exports.default = C; +//// [d.js] +"use strict"; +var _this = this; +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 { } From a6da3152ffef5b394793f21b0de8972b2a2ca00c Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 9 Jun 2023 15:43:04 +0100 Subject: [PATCH 017/224] Improvements to local inference. --- src/compiler/binder.ts | 68 +- src/compiler/checker.ts | 39 + src/compiler/emitter.ts | 1 + src/compiler/transformers/declarations.ts | 1358 +++++++++++++-------- src/compiler/types.ts | 1 + src/compiler/utilities.ts | 5 + 6 files changed, 953 insertions(+), 519 deletions(-) diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index f54a3e0666f00..cd86ae611c455 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -305,6 +305,7 @@ import { tryParsePattern, TryStatement, TypeLiteralNode, + TypeNode, TypeOfExpression, TypeParameterDeclaration, unescapeLeadingUnderscores, @@ -488,7 +489,12 @@ function initFlowNode(node: T) { return node; } -const binder = /* @__PURE__ */ createBinder(); +const { bindSourceFile: binder, bindSyntheticTypeNode: typeNodeBinder } = /* @__PURE__ */ createBinder(); + +/** @internal */ +export function bindSyntheticTypeNode(node: TypeNode, location: Node, opts: CompilerOptions) { + typeNodeBinder(node, location, opts); +} /** @internal */ export function bindSourceFile(file: SourceFile, options: CompilerOptions) { @@ -500,7 +506,10 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions) { performance.measure("Bind", "beforeBind", "afterBind"); } -function createBinder(): (file: SourceFile, options: CompilerOptions) => void { +function createBinder(): { + bindSourceFile: (file: SourceFile, options: CompilerOptions) => void, + bindSyntheticTypeNode: (node: TypeNode, location: Node, opts: CompilerOptions) => void + } { // 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 */ @@ -549,7 +558,7 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { var bindBinaryExpressionFlow = createBindBinaryExpressionFlow(); /* eslint-enable no-var */ - return bindSourceFile; + return { bindSourceFile, bindSyntheticTypeNode }; /** * Inside the binder, we may create a diagnostic for an as-yet unbound node (with potentially no parent pointers, implying no accessible source file) @@ -560,29 +569,16 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { return createDiagnosticForNodeInSourceFile(getSourceFileOfNode(node) || file, node, message, ...args); } - function bindSourceFile(f: SourceFile, opts: CompilerOptions) { - file = f; + function bindSyntheticTypeNode(node: TypeNode, location: Node, opts: CompilerOptions) { + file = getSourceFileOfNode(location); options = opts; - languageVersion = getEmitScriptTarget(options); - inStrictMode = bindInStrictMode(file, opts); - classifiableNames = new Set(); - symbolCount = 0; - - Symbol = objectAllocator.getSymbolConstructor(); - - // Attach debugging information if necessary - Debug.attachFlowNodeDebugInfo(unreachableFlow); - Debug.attachFlowNodeDebugInfo(reportedUnreachableFlow); - - if (!file.locals) { - tracing?.push(tracing.Phase.Bind, "bindSourceFile", { path: file.path }, /*separateBeginAndEnd*/ true); - bind(file); - tracing?.pop(); - file.symbolCount = symbolCount; - file.classifiableNames = classifiableNames; - delayedBindJSDocTypedefTag(); - } + parent = location; + currentFlow = initFlowNode({ flags: FlowFlags.Start }); + bind(node); + bindCleanup(); + } + function bindCleanup() { file = undefined!; options = undefined!; languageVersion = undefined!; @@ -605,6 +601,30 @@ function createBinder(): (file: SourceFile, options: CompilerOptions) => void { inAssignmentPattern = false; emitFlags = NodeFlags.None; } + function bindSourceFile(f: SourceFile, opts: CompilerOptions) { + file = f; + options = opts; + languageVersion = getEmitScriptTarget(options); + inStrictMode = bindInStrictMode(file, opts); + classifiableNames = new Set(); + symbolCount = 0; + + Symbol = objectAllocator.getSymbolConstructor(); + + // Attach debugging information if necessary + Debug.attachFlowNodeDebugInfo(unreachableFlow); + Debug.attachFlowNodeDebugInfo(reportedUnreachableFlow); + + if (!file.locals) { + tracing?.push(tracing.Phase.Bind, "bindSourceFile", { path: file.path }, /*separateBeginAndEnd*/ true); + bind(file); + tracing?.pop(); + file.symbolCount = symbolCount; + file.classifiableNames = classifiableNames; + delayedBindJSDocTypedefTag(); + } + bindCleanup(); + } function bindInStrictMode(file: SourceFile, opts: CompilerOptions): boolean { if (getStrictOptionValue(opts, "alwaysStrict") && !file.isDeclarationFile) { diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 5283fe610849b..9db2bb55b25ea 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -42,6 +42,7 @@ import { BindingName, BindingPattern, bindSourceFile, + bindSyntheticTypeNode, Block, BreakOrContinueStatement, CallChain, @@ -12515,6 +12516,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { * For a description of late-binding, see `lateBindMember`. */ function getMembersOfSymbol(symbol: Symbol) { + if(!symbol) debugger; return symbol.flags & SymbolFlags.LateBindingContainer ? getResolvedMembersOrExportsOfSymbol(symbol, MembersOrExportsResolutionKind.resolvedMembers) : symbol.members || emptySymbols; @@ -46666,7 +46668,43 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } }); } + function isSyntheticTypeEquivalent( + actualNode: Node, + syntheticNode: TypeNode, + headMessage: DiagnosticMessage, + ): true | Diagnostic[] { + bindSyntheticTypeNode(syntheticNode, actualNode, compilerOptions); + const prevDeferredDiagnosticsCallbacksLength = deferredDiagnosticsCallbacks.length; + const syntheticType = getTypeOfNode(syntheticNode); + const actualNodeType = getTypeOfNode(actualNode); + + let actualType; + if(isFunctionLike(actualNode)) { + const signatures = getSignaturesOfType(actualNodeType, SignatureKind.Call); + actualType = signatures.length === 0? actualNodeType: getReturnTypeOfSignature(signatures[0]); + } + else { + actualType = actualNodeType + } + const errors: Diagnostic[] = [] + + try { + const resultOneWay = checkTypeRelatedTo(actualType, syntheticType, strictSubtypeRelation, actualNode, headMessage, undefined, { errors }); + + if(!resultOneWay) { + return errors; + } + const resultReveresed = checkTypeRelatedTo(syntheticType, actualType, strictSubtypeRelation, actualNode, headMessage, undefined, { errors }); + + if(!resultReveresed) { + return errors; + } + return true; + } finally { + deferredDiagnosticsCallbacks.length = prevDeferredDiagnosticsCallbacksLength; + } + } return { getReferencedExportContainer, getReferencedImportDeclaration, @@ -46756,6 +46794,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, tracker, bundled); }, isImportRequiredByAugmentation, + isSyntheticTypeEquivalent, }; function isImportRequiredByAugmentation(node: ImportDeclaration) { diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index da4f3f56fa5e7..d34294707d600 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1171,6 +1171,7 @@ export const notImplementedResolver: EmitResolver = { isBindingCapturedByNode: notImplemented, getDeclarationStatementsForSourceFile: notImplemented, isImportRequiredByAugmentation: notImplemented, + isSyntheticTypeEquivalent: notImplemented, }; /** diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 55d0c1f08b99b..0d1b3f58cd37c 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -15,6 +15,7 @@ import { BindingName, BindingPattern, Bundle, + CallExpression, CallSignatureDeclaration, canHaveModifiers, canProduceDiagnostics, @@ -22,6 +23,7 @@ import { CommentRange, compact, concatenate, + ConditionalExpression, ConditionalTypeNode, ConstructorDeclaration, ConstructorTypeNode, @@ -58,6 +60,7 @@ import { flatten, forEach, forEachChild, + forEachChildRecursively, FunctionDeclaration, FunctionExpression, FunctionLikeDeclaration, @@ -106,6 +109,7 @@ import { isAnyImportSyntax, isArray, isArrayBindingElement, + isArrayTypeNode, isBinaryExpression, isBindingElement, isBindingPattern, @@ -113,12 +117,15 @@ import { isClassDeclaration, isClassElement, isClassLike, + isComputedPropertyName, + isConstructorTypeNode, isDeclaration, isElementAccessExpression, isEntityName, isEntityNameExpression, isExportAssignment, isExportDeclaration, + isExpressionStatement, isExpressionWithTypeArguments, isExternalModule, isExternalModuleAugmentation, @@ -127,6 +134,7 @@ import { isExternalOrCommonJsModule, isFunctionDeclaration, isFunctionLike, + isFunctionTypeNode, isGlobalScopeAugmentation, isIdentifier, isIdentifierANonContextualKeyword, @@ -156,12 +164,16 @@ import { isPropertyDeclaration, isPropertyName, isPropertySignature, + isQualifiedName, isReturnStatement, isSemicolonClassElement, isSetAccessorDeclaration, + isShorthandPropertyAssignment, isSourceFile, isSourceFileJS, isSourceFileNotJson, + isSpreadAssignment, + isSpreadElement, isStatement, isStringANonContextualKeyword, isStringLiteral, @@ -176,6 +188,7 @@ import { isTypeReferenceNode, isUnparsedSource, isVariableDeclaration, + isVariableStatement, isYieldExpression, KeywordTypeSyntaxKind, last, @@ -203,6 +216,7 @@ import { NodeFlags, NodeId, normalizeSlashes, + nullTransformationContext, ObjectLiteralExpression, OmittedExpression, orderedRemoveItem, @@ -213,11 +227,14 @@ import { pathIsRelative, PrefixUnaryExpression, PropertyDeclaration, + PropertyName, PropertySignature, pushIfUnique, + QualifiedName, removeAllComments, ResolutionMode, ReturnStatement, + SatisfiesExpression, ScriptTarget, SetAccessorDeclaration, setCommentRange, @@ -240,7 +257,6 @@ import { SymbolTracker, SyntaxKind, TemplateExpression, - TemplateHead, TemplateLiteralTypeSpan, toFileNameLowerCase, toPath, @@ -262,6 +278,7 @@ import { visitEachChild, visitNode, visitNodes, + Visitor, VisitResult, YieldExpression, } from "../_namespaces/ts"; @@ -273,14 +290,16 @@ enum NarrowBehavior { None = 0, AsConst = 1, KeepLiterals = 2, + AsConstOrKeepLiterals = AsConst | KeepLiterals, NotKeepLiterals = ~KeepLiterals, } enum LocalTypeInfoFlags { None = 0, Fresh = 1 << 0, - Implicit = 1<< 1, - Invalid = 1<<2, + ImplicitAny = 1<< 1, + Invalid = 1 << 2, + Optimistic = 1 << 3, } /** @internal */ @@ -350,6 +369,7 @@ export function transformDeclarations(context: TransformationContext) { let lateStatementReplacementMap: Map>; let suppressNewDiagnosticContexts: boolean; let exportedModulesFromDeclarationEmit: Symbol[] | undefined; + let localInferenceTargetNode: Node | undefined = undefined; const { factory } = context; const host = context.getEmitHost(); @@ -383,10 +403,11 @@ export function transformDeclarations(context: TransformationContext) { return transformRoot; function reportIsolatedDeclarationError(node: Node) { - context.addDiagnostic(createDiagnosticForNode( + const message = createDiagnosticForNode( node, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit - )); + ); + context.addDiagnostic(message); } function recordTypeReferenceDirectivesIfNecessary(typeReferenceDirectives: readonly [specifier: string, mode: ResolutionMode][] | undefined): void { if (!typeReferenceDirectives) { @@ -427,6 +448,10 @@ export function transformDeclarations(context: TransformationContext) { // TODO: Do all these accessibility checks inside/after the first pass in the checker when declarations are enabled, if possible } else { + if(localInferenceTargetNode) { + reportIsolatedDeclarationError(localInferenceTargetNode); + return true; + } // Report error const errorInfo = getSymbolAccessibilityDiagnostic(symbolAccessibilityResult); if (errorInfo) { @@ -842,7 +867,7 @@ export function transformDeclarations(context: TransformationContext) { return factory.createTypeReferenceNode("invalid"); } - interface LocalTypeInfo { typeNode: TypeNode, sourceNode?: Node, flags: LocalTypeInfoFlags } + interface LocalTypeInfo { typeNode: TypeNode, sourceNode: Node, flags: LocalTypeInfoFlags } // We need to see about getting the JSX element type. function getJSXElementType(_node: Node): EntityName { return factory.createQualifiedName( @@ -853,41 +878,130 @@ export function transformDeclarations(context: TransformationContext) { factory.createIdentifier("Element"), ); } - function localInference(node: Node, isConstContext: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { - const nextIsConst = isConstContext & NarrowBehavior.NotKeepLiterals; + function entityNameExpressionToQualifiedName(node:EntityNameOrEntityNameExpression): EntityName { + if(isIdentifier(node)) { + return factory.cloneNode(node); + } + else if(isPropertyAccessExpression(node)) { + return factory.createQualifiedName( + entityNameExpressionToQualifiedName(node.expression), + factory.cloneNode(node.name) + ); + } + else if(isQualifiedName(node)) { + return factory.createQualifiedName( + entityNameExpressionToQualifiedName(node), + factory.cloneNode(node.right) + ); + } + throw Error("Should not happen"); + } + + function isSyntheticTypeNode(node: Node): node is TypeNode { + return isTypeNode(node) && !!(node.flags & NodeFlags.Synthesized); + } + function finalizeSyntheticTypeNode(typeNode: T, parent: Node): T { + if(typeNode && typeNode.parent !== parent) { + setParent(typeNode, parent); + // Ensure no non synthetic nodes make it in here + Debug.assert(typeNode.flags & NodeFlags.Synthesized) + forEachChildRecursively(typeNode, (child, parent) => { + Debug.assert(typeNode.flags & NodeFlags.Synthesized); + if(child.parent === parent) { + return "skip"; + } + setParent(child, parent); + }); + } + return typeNode as T & { isSynthetic: true }; + } + function visitSyntheticType(typeNode: TypeNode, node: Node) { + const previousLocalInferenceTargetNode = localInferenceTargetNode; + try { + localInferenceTargetNode = node; + let visitedNode = visitNode(finalizeSyntheticTypeNode(typeNode, node), visitDeclarationSubtree, isSyntheticTypeNode); + Debug.assert(visitedNode); + return visitedNode; + } finally { + localInferenceTargetNode = previousLocalInferenceTargetNode; + } + } + + function mergeFlags(existing: LocalTypeInfoFlags, newFlags: LocalTypeInfoFlags): LocalTypeInfoFlags { + return existing | (newFlags | LocalTypeInfoFlags.Optimistic); + } + function localInference(node: Node, inferenceFlags: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { + const nextInferenceFlags = inferenceFlags & NarrowBehavior.NotKeepLiterals; switch(node.kind) { case SyntaxKind.ParenthesizedExpression: - return regular(getWidenedType(localInference((node as ParenthesizedExpression).expression, isConstContext)), node); - case SyntaxKind.Identifier: - if((node as Identifier).escapedText === "undefined") { - if(strictNullChecks) { - return regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), node); - } - else { - return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.Implicit); - } + return localInference((node as ParenthesizedExpression).expression, inferenceFlags); + case SyntaxKind.QualifiedName: + const typeNode = visitSyntheticType(factory.createTypeQueryNode( + entityNameExpressionToQualifiedName(node as QualifiedName) + ), node); + + return regular( + typeNode, + node, + LocalTypeInfoFlags.Optimistic + ) + case SyntaxKind.PropertyAccessExpression: + if(isEntityNameExpression(node)) { + const typeNode = visitSyntheticType(factory.createTypeQueryNode( + entityNameExpressionToQualifiedName(node) + ), node); + return regular( + typeNode, + node, + LocalTypeInfoFlags.Optimistic + ) } break; + case SyntaxKind.Identifier: { + if((node as Identifier).escapedText === "undefined") { + return createUndefinedTypeNode(node); + } + const typeNode = visitSyntheticType(factory.createTypeQueryNode( + deepClone(node as Identifier) + ), node) + + return regular(typeNode, node, LocalTypeInfoFlags.Optimistic) + } case SyntaxKind.NullKeyword: if(strictNullChecks) { return regular(factory.createLiteralTypeNode(factory.createNull()), node); } else { - return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.Implicit); + return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.ImplicitAny); + } + case SyntaxKind.CallExpression: + const callExpression = node as CallExpression; + if(isIdentifier(callExpression.expression) && callExpression.expression.escapedText === "Symbol") { + if(inferenceFlags & NarrowBehavior.KeepLiterals) { + return regular( + factory.createTypeOperatorNode( + SyntaxKind.UniqueKeyword, + factory.createKeywordTypeNode(SyntaxKind.SymbolKeyword) + ), + node + ) + } else { + return regular( + factory.createKeywordTypeNode(SyntaxKind.SymbolKeyword), + node + ) + } } case SyntaxKind.NewExpression: const newExpr = node as NewExpression; if(isIdentifier(newExpr.expression)) { - // to do: isolated declarations : Add check for type arguments. - const typeNode = factory.createTypeReferenceNode( - visitNode(newExpr.expression, visitDeclarationSubtree, isIdentifier)!, - visitNodes(newExpr.typeArguments, visitDeclarationSubtree, isTypeNode) - ); - const visitedTypeNode = visitNode(typeNode, visitDeclarationSubtree, isTypeNode); - if(visitedTypeNode) { - return regular(visitedTypeNode, node); - } - return invalid(node); + + const typeNode = visitSyntheticType(factory.createTypeReferenceNode( + deepClone(newExpr.expression), + visitNodes(newExpr.typeArguments, deepClone, isTypeNode)! + ), node); + // Optimistic since the constructor might not have the same name as the type + return regular(typeNode, node, LocalTypeInfoFlags.Optimistic); } return invalid(node); case SyntaxKind.ArrowFunction: @@ -896,17 +1010,23 @@ export function transformDeclarations(context: TransformationContext) { const oldEnclosingDeclaration = enclosingDeclaration; try { enclosingDeclaration = node; - + const returnType = inferReturnType(fnNode); const fnTypeNode = factory.createFunctionTypeNode( - visitNodes(fnNode.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), - fnNode.parameters.map(p => ensureParameter(p)), - inferReturnType(fnNode).typeNode, + visitNodes(fnNode.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone), + fnNode.parameters.map(p => deepClone(ensureParameter(p))), + returnType.typeNode, ); - return regular(fnTypeNode, node); + // If the return type is optimistic, teh whole function type is optimistic + const flags = mergeFlags(LocalTypeInfoFlags.None, returnType.flags) + return regular(fnTypeNode, node, flags); } finally { enclosingDeclaration = oldEnclosingDeclaration; } + case SyntaxKind.SatisfiesExpression: { + const typeNode = localInference((node as SatisfiesExpression).expression); + return { ...typeNode, flags: typeNode.flags | LocalTypeInfoFlags.Optimistic } + } case SyntaxKind.TypeAssertionExpression: case SyntaxKind.AsExpression: const asExpression = node as AsExpression | TypeAssertion; @@ -917,80 +1037,107 @@ export function transformDeclarations(context: TransformationContext) { const type = visitType(asExpression.type, asExpression); if(isLiteralTypeNode(type) && (isNoSubstitutionTemplateLiteral(type.literal) || isStringLiteral(type.literal))) { - return regular(factory.createLiteralTypeNode( - normalizeLiteralValue(type.literal) - ), node); + return regular( + factory.createLiteralTypeNode( + normalizeLiteralValue(type.literal) + ), + node + ); } - return regular(type, node); + return regular(deepClone(type), node); } case SyntaxKind.PrefixUnaryExpression: const prefixOp = node as PrefixUnaryExpression; - if(prefixOp.operator === SyntaxKind.MinusToken) { - const {typeNode: targetExpressionType, flags } = localInference(prefixOp.operand, isConstContext); - if(isLiteralTypeNode(targetExpressionType) && isNumericLiteral(targetExpressionType.literal)) { + 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 fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node); + case SyntaxKind.PlusToken: + return fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node);; + } + case SyntaxKind.BigIntLiteral: + if (prefixOp.operator === SyntaxKind.MinusToken) { + return fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node);; + } + } + } + + const targetExpressionType = localInference(prefixOp.operand, inferenceFlags); + if(isLiteralTypeNode(targetExpressionType.typeNode)) { return { - flags, - typeNode: factory.createLiteralTypeNode(factory.createPrefixMinus(targetExpressionType.literal)) + flags: targetExpressionType.flags, + typeNode: getWidenedType(targetExpressionType), + sourceNode: node }; } - else if(targetExpressionType.kind === SyntaxKind.NumberKeyword) { - return { typeNode: targetExpressionType, flags }; + else if(targetExpressionType.typeNode.kind === SyntaxKind.NumberKeyword || targetExpressionType.typeNode.kind === SyntaxKind.BigIntKeyword) { + return targetExpressionType; } } break; case SyntaxKind.NumericLiteral: - return literal(node, SyntaxKind.NumberKeyword, isConstContext); + return literal(node, SyntaxKind.NumberKeyword, inferenceFlags); case SyntaxKind.TemplateExpression: - if(!isConstContext) { - return literal(node, SyntaxKind.StringKeyword, isConstContext); + if(!(inferenceFlags & NarrowBehavior.AsConst)) { + return fresh(factory.createKeywordTypeNode(SyntaxKind.StringKeyword), node); } const templateExpression = node as TemplateExpression; const templateSpans: TemplateLiteralTypeSpan[] = []; - const head = factory.createTemplateHead(templateExpression.head.text); - let prevSpan: TemplateHead | TemplateLiteralTypeSpan = head; for(const span of templateExpression.templateSpans) { - const {typeNode} = localInference(span.expression, nextIsConst); - if(isLiteralTypeNode(typeNode)) { - const oldText = prevSpan.kind === SyntaxKind.TemplateHead ? prevSpan.text : prevSpan.literal.text; - const newText= oldText; - console.log(newText);//wip - } - else { - const literalSpan = factory.createTemplateLiteralTypeSpan( - typeNode, - span.literal - ); - prevSpan = literalSpan; - templateSpans.push(literalSpan); - } - + const {typeNode} = localInference(span.expression, nextInferenceFlags); + const literalSpan = factory.createTemplateLiteralTypeSpan( + typeNode, + span.literal + ); + templateSpans.push(literalSpan); } - return regular(factory.createTemplateLiteralType(templateExpression.head, templateSpans), node); + return regular( + factory.createTemplateLiteralType(deepClone(templateExpression.head), templateSpans), + node + ); case SyntaxKind.NoSubstitutionTemplateLiteral: case SyntaxKind.StringLiteral: - return literal(node, SyntaxKind.StringKeyword, isConstContext); + return literal(node, SyntaxKind.StringKeyword, inferenceFlags); case SyntaxKind.BigIntLiteral: - return literal(node, SyntaxKind.BigIntKeyword, isConstContext); + return literal(node, SyntaxKind.BigIntKeyword, inferenceFlags); case SyntaxKind.RegularExpressionLiteral: - return literal(node, "RegExp", isConstContext); + return literal(node, "RegExp", inferenceFlags); case SyntaxKind.JsxSelfClosingElement: case SyntaxKind.JsxElement: - const typeReference = factory.createTypeReferenceNode(getJSXElementType(node)); - setParent(typeReference.typeName, typeReference); + const typeReference = finalizeSyntheticTypeNode(factory.createTypeReferenceNode(getJSXElementType(node)), node.parent); checkEntityNameVisibility(typeReference.typeName, enclosingDeclaration); return fresh(typeReference, node); case SyntaxKind.TrueKeyword: case SyntaxKind.FalseKeyword: - return literal(node, SyntaxKind.BooleanKeyword, isConstContext); + return literal(node, SyntaxKind.BooleanKeyword, inferenceFlags); case SyntaxKind.ArrayLiteralExpression: const arrayLiteral = node as ArrayLiteralExpression; const elementTypesInfo: LocalTypeInfo[] = []; for(const element of arrayLiteral.elements) { - elementTypesInfo.push( - localInference(element, nextIsConst) - ); + if(isSpreadElement(element)) { + const spreadType = localInference(element.expression, nextInferenceFlags) + const elementTypeNode = inferenceFlags & NarrowBehavior.AsConst ? + factory.createRestTypeNode(spreadType.typeNode) : + factory.createIndexedAccessTypeNode(spreadType.typeNode, factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)); + + elementTypesInfo.push( + { ...spreadType, typeNode: elementTypeNode } + ); + } + else if(isOmittedExpression(element)) { + elementTypesInfo.push( + createUndefinedTypeNode(element) + ); + } else { + elementTypesInfo.push( + localInference(element, nextInferenceFlags) + ); + } } - if(isConstContext & NarrowBehavior.AsConst) { + if(inferenceFlags & NarrowBehavior.AsConst) { const tupleType = factory.createTupleTypeNode( elementTypesInfo.map(lti => lti.typeNode) ); @@ -1008,55 +1155,91 @@ export function transformDeclarations(context: TransformationContext) { return regular(factory.createArrayTypeNode(itemType), node); } - case SyntaxKind.ObjectLiteralExpression: + case SyntaxKind.ObjectLiteralExpression: { const objectLiteral = node as ObjectLiteralExpression; const properties: TypeElement[] = []; + let addedIntersections: TypeNode[] | undefined for(const prop of objectLiteral.properties) { - if(isMethodDeclaration(prop)) { + if(prop.name && isComputedPropertyName(prop.name) && isEntityNameExpression(prop.name.expression)) { + checkEntityNameVisibility(prop.name.expression, prop); + } + const name = prop.name && deepClone(visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!); + + if(isMethodDeclaration(prop) && name) { const oldEnclosingDeclaration = enclosingDeclaration; enclosingDeclaration = prop; - if (isConstContext & NarrowBehavior.AsConst) { + const returnType = inferReturnType(prop); + const typeParameters = visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone); + const parameters = prop.parameters.map(p => deepClone(ensureParameter(p))); + if (inferenceFlags & NarrowBehavior.AsConst) { properties.push(factory.createPropertySignature( [factory.createModifier(SyntaxKind.ReadonlyKeyword)], - visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!, + name, /*questionToken*/ undefined, factory.createFunctionTypeNode( - visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), - prop.parameters.map(p => ensureParameter(p)), - localInferenceFromInitializer(prop)!, + typeParameters, + parameters, + returnType.typeNode, ) )); } else { properties.push(factory.createMethodSignature( [], - visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!, - prop.questionToken, - visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), - prop.parameters.map(p => ensureParameter(p)), - localInferenceFromInitializer(prop), + name, + /*questionToken*/ undefined, + typeParameters, + parameters, + returnType.typeNode, )); } enclosingDeclaration = oldEnclosingDeclaration; } - else if(isPropertyAssignment(prop)) { - const modifiers = isConstContext & NarrowBehavior.AsConst ? + else if(isPropertyAssignment(prop) && name) { + const modifiers = inferenceFlags & NarrowBehavior.AsConst ? + [factory.createModifier(SyntaxKind.ReadonlyKeyword)]: + []; + properties.push(factory.createPropertySignature( + modifiers, + name, + /*questionToken*/ undefined, + localInference(prop.initializer, nextInferenceFlags).typeNode + )); + } + else if(isShorthandPropertyAssignment(prop) && name) { + const modifiers = inferenceFlags & NarrowBehavior.AsConst ? [factory.createModifier(SyntaxKind.ReadonlyKeyword)]: []; properties.push(factory.createPropertySignature( modifiers, - visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!, + name, /*questionToken*/ undefined, - localInference(prop.initializer, nextIsConst).typeNode + localInference(prop.name, nextInferenceFlags).typeNode )); } + else if(isSpreadAssignment(prop)) { + addedIntersections ??= []; + addedIntersections.push(localInference(prop.expression).typeNode) + } else { return invalid(prop); } } - return regular(factory.createTypeLiteralNode( - properties - ), objectLiteral); + + let typeNode: TypeNode = factory.createTypeLiteralNode(properties); + if (addedIntersections) { + addedIntersections.push(typeNode); + typeNode = factory.createIntersectionTypeNode(addedIntersections); + } + return regular(typeNode, objectLiteral); + } + case SyntaxKind.ConditionalExpression: + const conditionalExpression = node as ConditionalExpression; + const types = [ + localInference(conditionalExpression.whenTrue, inferenceFlags & ~NarrowBehavior.AsConst), + localInference(conditionalExpression.whenFalse, inferenceFlags & ~NarrowBehavior.AsConst), + ] + return makeUnionFromTypes(node, types, /*widenSingle*/ false); } return regular(makeInvalidTypeAndReport(node), node); @@ -1064,18 +1247,18 @@ export function transformDeclarations(context: TransformationContext) { function invalid(node: Node): LocalTypeInfo { return { typeNode: makeInvalidTypeAndReport(node), flags: LocalTypeInfoFlags.Invalid, sourceNode: node }; } - function fresh(typeNode: TypeNode, sourceNode?: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { - return { typeNode, flags: flags | LocalTypeInfoFlags.Fresh, sourceNode }; + function fresh(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { + return { typeNode: finalizeSyntheticTypeNode(typeNode, sourceNode.parent), flags: flags | LocalTypeInfoFlags.Fresh, sourceNode }; } - function regular(typeNode: TypeNode, sourceNode?: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { - return { typeNode, flags, sourceNode }; + function regular(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { + return { typeNode: finalizeSyntheticTypeNode(typeNode, sourceNode.parent), flags, sourceNode }; } function normalizeLiteralValue(literal: LiteralExpression) { switch(literal.kind) { case SyntaxKind.BigIntLiteral: case SyntaxKind.TrueKeyword: case SyntaxKind.FalseKeyword: - return literal; + return deepClone(literal); case SyntaxKind.NoSubstitutionTemplateLiteral: case SyntaxKind.StringLiteral: return factory.createStringLiteral(literal.text); @@ -1084,8 +1267,18 @@ export function transformDeclarations(context: TransformationContext) { } throw new Error("Not supported"); } + function createUndefinedTypeNode(node: Node, flags = LocalTypeInfoFlags.None) { + if(strictNullChecks) { + return regular( + factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword) + , node, flags); + } + else { + return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.ImplicitAny | flags); + } + } function literal(node: Node, baseType: string | KeywordTypeSyntaxKind, narrowBehavior: NarrowBehavior) { - if(narrowBehavior) { + if(narrowBehavior & NarrowBehavior.AsConstOrKeepLiterals) { return fresh(factory.createLiteralTypeNode( normalizeLiteralValue(node as LiteralExpression) ), node); @@ -1102,7 +1295,7 @@ export function transformDeclarations(context: TransformationContext) { } function makeInvalidTypeAndReport(node: Node) { reportIsolatedDeclarationError(node); - return makeInvalidType(); + return makeInvalidType() as TypeReferenceNode; } function visitType(type: TypeNode | undefined, owner: Node) { const visitedType = visitNode(type, visitDeclarationSubtree, isTypeNode); @@ -1110,251 +1303,268 @@ export function transformDeclarations(context: TransformationContext) { } function getMemberKey(member: MethodSignature | PropertySignature) { - if(!isIdentifier(member.name)) { - makeInvalidTypeAndReport(member.name); - return undefined; - } - return member.name.escapedText; - } - - function collapseLiteralTypesIntoBaseTypes(nodes: LocalTypeInfo[]) { - enum CollapsibleTypes { - None = 0, - String = 1 << 1, - Number = 1 << 2, - True = 1 << 3, - False = 1 << 4, - Boolean = True | False, - BigInt = 1 << 5, - Any = 1 << 7, - ImplicitAny = 1 << 8 - } - let baseTypes = CollapsibleTypes.None; - let literalTypes = CollapsibleTypes.None; - for(const type of nodes) { - switch(type.typeNode.kind) { - case SyntaxKind.TemplateLiteralType: - literalTypes |= CollapsibleTypes.String; + if(isIdentifier(member.name)) { + return "I:" + member.name.escapedText; + } + if(isStringLiteral(member.name)) { + return "S:" + member.name.text + } + if(isNumericLiteral(member.name)) { + return "N:" + (+member.name.text) + } + if(isComputedPropertyName(member.name)) { + let fullId = "C:"; + let computedName = member.name.expression; + // We only support dotted identifiers as property keys + while(true) { + if(isIdentifier(computedName)) { + fullId += computedName.escapedText; break; - case SyntaxKind.AnyKeyword: - if(type.flags & LocalTypeInfoFlags.Implicit) { - literalTypes |= CollapsibleTypes.ImplicitAny; - } - else { - baseTypes |= CollapsibleTypes.Any; - } - break; - case SyntaxKind.BooleanKeyword: - baseTypes |= CollapsibleTypes.Boolean; - break; - case SyntaxKind.StringKeyword: - baseTypes |= CollapsibleTypes.String; - break; - case SyntaxKind.NumberKeyword: - baseTypes |= CollapsibleTypes.Number; - break; - case SyntaxKind.BigIntKeyword: - baseTypes |= CollapsibleTypes.BigInt; - break; - case SyntaxKind.LiteralType: - const literalType = type.typeNode as LiteralTypeNode; - switch(literalType.literal.kind) { - case SyntaxKind.TrueKeyword: - literalTypes |= CollapsibleTypes.True; - break; - case SyntaxKind.FalseKeyword: - literalTypes |= CollapsibleTypes.False; - break; - case SyntaxKind.NumericLiteral: - literalTypes |= CollapsibleTypes.Number; - break; - case SyntaxKind.PrefixUnaryExpression: - if((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { - literalTypes |= CollapsibleTypes.Number; - } - break; - case SyntaxKind.StringLiteral: - case SyntaxKind.NoSubstitutionTemplateLiteral: - case SyntaxKind.TemplateExpression: - literalTypes |= CollapsibleTypes.String; - break; - case SyntaxKind.BigIntLiteral: - literalTypes |= CollapsibleTypes.BigInt; - break; - } + } + else if(isPropertyAccessExpression(computedName)) { + fullId += computedName.name.escapedText; + computedName = computedName.expression; + } + else { + // Can't compute a property key, bail + return undefined; + } } + return fullId; } - // If true and false are both present, act as if we found boolean itself - if((literalTypes & CollapsibleTypes.Boolean) === CollapsibleTypes.Boolean) { - baseTypes |= CollapsibleTypes.Boolean; - } - const typesToCollapse = baseTypes & literalTypes; + return undefined; + } - if(baseTypes & CollapsibleTypes.Any) { - return [factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)]; + function getWidenedType(localTypeInfo: LocalTypeInfo) { + if((localTypeInfo.flags & LocalTypeInfoFlags.Fresh) && isLiteralTypeNode(localTypeInfo.typeNode)) { + const literal = localTypeInfo.typeNode.literal; + return ( + literal.kind === SyntaxKind.StringLiteral ? factory.createKeywordTypeNode(SyntaxKind.StringKeyword) : + literal.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : + literal.kind === SyntaxKind.PrefixUnaryExpression && (literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : + literal.kind === SyntaxKind.BigIntLiteral ? factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword) : + literal.kind === SyntaxKind.TrueKeyword || literal.kind === SyntaxKind.FalseKeyword ? factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword) : + localTypeInfo.typeNode + ); } - // Nothing to collapse or reorder - if(baseTypes === CollapsibleTypes.None) return nodes.map(n => n.typeNode); - const result: TypeNode[] = []; - // We do a best effort to preserve TS union order for primitives - if(baseTypes & CollapsibleTypes.String) { - result.push(factory.createKeywordTypeNode(SyntaxKind.StringKeyword)); - } - if(baseTypes & CollapsibleTypes.Number) { - result.push(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)); - } - if(baseTypes & CollapsibleTypes.Boolean) { - result.push(factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword)); - } - if(baseTypes & CollapsibleTypes.BigInt) { - result.push(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword)); - } - if(!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.True) { - result.push(factory.createLiteralTypeNode(factory.createTrue())); - } - if(!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.False) { - result.push(factory.createLiteralTypeNode(factory.createFalse())); + return localTypeInfo.typeNode; + } + function makeUnionFromTypes(sourceNode: Node, types: LocalTypeInfo[], widenSingle: boolean) { + types = deduplicateUnion(types); + if(types.length === 1) { + const localType = types[0]; + return widenSingle ? { ... localType, typeNode: getWidenedType(localType) }: localType; } + const unionConstituents = collapseLiteralTypesIntoBaseTypes(types); - for(const type of nodes) { - let typeofNode = CollapsibleTypes.None; + normalizeObjectUnion(unionConstituents); + return regular( + unionConstituents.length === 1? unionConstituents[0]: factory.createUnionTypeNode(unionConstituents), + sourceNode, + LocalTypeInfoFlags.Optimistic + ); - switch(type.typeNode.kind) { - case SyntaxKind.BooleanKeyword: - case SyntaxKind.StringKeyword: - case SyntaxKind.NumberKeyword: - case SyntaxKind.BigIntKeyword: - case SyntaxKind.AnyKeyword: - // They were already added - continue; - case SyntaxKind.TemplateLiteralType: - typeofNode = CollapsibleTypes.String; - break; - case SyntaxKind.LiteralType: - const literalType = type.typeNode as LiteralTypeNode; - switch(literalType.literal.kind) { - case SyntaxKind.TrueKeyword: - continue; - case SyntaxKind.FalseKeyword: - continue; - case SyntaxKind.NumericLiteral: - typeofNode = CollapsibleTypes.Number; - break; - case SyntaxKind.PrefixUnaryExpression: - if((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { - typeofNode = CollapsibleTypes.Number; - } - break; - case SyntaxKind.StringLiteral: - case SyntaxKind.NoSubstitutionTemplateLiteral: - case SyntaxKind.TemplateExpression: - typeofNode = CollapsibleTypes.String; - break; - case SyntaxKind.BigIntLiteral: - typeofNode = CollapsibleTypes.BigInt; - break; - } + function collapseLiteralTypesIntoBaseTypes(nodes: LocalTypeInfo[]) { + enum CollapsibleTypes { + None = 0, + String = 1 << 1, + Number = 1 << 2, + True = 1 << 3, + False = 1 << 4, + Boolean = True | False, + BigInt = 1 << 5, + Any = 1 << 7, + ImplicitAny = 1 << 8 + } + let baseTypes = CollapsibleTypes.None; + let literalTypes = CollapsibleTypes.None; + for(const type of nodes) { + switch(type.typeNode.kind) { + case SyntaxKind.TemplateLiteralType: + literalTypes |= CollapsibleTypes.String; + break; + case SyntaxKind.AnyKeyword: + if(type.flags & LocalTypeInfoFlags.ImplicitAny) { + literalTypes |= CollapsibleTypes.ImplicitAny; + } + else { + baseTypes |= CollapsibleTypes.Any; + } + break; + case SyntaxKind.BooleanKeyword: + baseTypes |= CollapsibleTypes.Boolean; + break; + case SyntaxKind.StringKeyword: + baseTypes |= CollapsibleTypes.String; + break; + case SyntaxKind.NumberKeyword: + baseTypes |= CollapsibleTypes.Number; + break; + case SyntaxKind.BigIntKeyword: + baseTypes |= CollapsibleTypes.BigInt; + break; + case SyntaxKind.LiteralType: + const literalType = type.typeNode as LiteralTypeNode; + switch(literalType.literal.kind) { + case SyntaxKind.TrueKeyword: + literalTypes |= CollapsibleTypes.True; + break; + case SyntaxKind.FalseKeyword: + literalTypes |= CollapsibleTypes.False; + break; + case SyntaxKind.NumericLiteral: + literalTypes |= CollapsibleTypes.Number; + break; + case SyntaxKind.PrefixUnaryExpression: + if((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { + literalTypes |= CollapsibleTypes.Number; + } + break; + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.TemplateExpression: + literalTypes |= CollapsibleTypes.String; + break; + case SyntaxKind.BigIntLiteral: + literalTypes |= CollapsibleTypes.BigInt; + break; + } + } } - // Not a node of interest, do not change - if((typeofNode & typesToCollapse) === 0) { - result.push(type.typeNode); + // If true and false are both present, act as if we found boolean itself + if((literalTypes & CollapsibleTypes.Boolean) === CollapsibleTypes.Boolean) { + baseTypes |= CollapsibleTypes.Boolean; } - } - return result; - } - function deduplicateUnion(nodes: LocalTypeInfo[]) { - const typeInfoCache = new Map - }>(); - const union: LocalTypeInfo[] = []; - for(const node of nodes) { - const existing = union.find(u => typesEqual(node.typeNode, node.sourceNode, u.typeNode, u.sourceNode)); - if(existing === undefined) { - union.push(node); + const typesToCollapse = baseTypes & literalTypes; + + if(baseTypes & CollapsibleTypes.Any) { + return [factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)]; } - else { - existing.flags &= node.flags; + // Nothing to collapse or reorder + if(baseTypes === CollapsibleTypes.None) return nodes.map(n => n.typeNode); + const result: TypeNode[] = []; + + // We do a best effort to preserve TS union order for primitives + if(baseTypes & CollapsibleTypes.String) { + result.push(factory.createKeywordTypeNode(SyntaxKind.StringKeyword)); + } + if(baseTypes & CollapsibleTypes.Number) { + result.push(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)); + } + if(baseTypes & CollapsibleTypes.Boolean) { + result.push(factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword)); + } + if(baseTypes & CollapsibleTypes.BigInt) { + result.push(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword)); + } + if(!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.True) { + result.push(factory.createLiteralTypeNode(factory.createTrue())); + } + if(!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.False) { + result.push(factory.createLiteralTypeNode(factory.createFalse())); } - } - return union; - function getTypeInfo(type: TypeLiteralNode, errorTarget: Node | undefined) { - const typeNodeId = getNodeId(type); - let typeInfo = typeInfoCache.get(typeNodeId); - if(typeInfo) return typeInfo; + for(const type of nodes) { + let typeofNode = CollapsibleTypes.None; - typeInfo = { - node: type, - members: new Map() - }; - for(const member of type.members) { - const isMethod = isMethodSignature(member); - const isProp = isPropertySignature(member); - if(isMethod || isProp) { - const memberKey = getMemberKey(member); - if (memberKey === undefined) { - makeInvalidTypeAndReport(errorTarget ?? member); + switch(type.typeNode.kind) { + case SyntaxKind.BooleanKeyword: + case SyntaxKind.StringKeyword: + case SyntaxKind.NumberKeyword: + case SyntaxKind.BigIntKeyword: + case SyntaxKind.AnyKeyword: + // They were already added + continue; + case SyntaxKind.TemplateLiteralType: + typeofNode = CollapsibleTypes.String; break; - } - typeInfo.members.set(memberKey, member); + case SyntaxKind.LiteralType: + const literalType = type.typeNode as LiteralTypeNode; + switch(literalType.literal.kind) { + case SyntaxKind.TrueKeyword: + continue; + case SyntaxKind.FalseKeyword: + continue; + case SyntaxKind.NumericLiteral: + typeofNode = CollapsibleTypes.Number; + break; + case SyntaxKind.PrefixUnaryExpression: + if((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { + typeofNode = CollapsibleTypes.Number; + } + break; + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.TemplateExpression: + typeofNode = CollapsibleTypes.String; + break; + case SyntaxKind.BigIntLiteral: + typeofNode = CollapsibleTypes.BigInt; + break; + } + } + // Not a node of interest, do not change + if((typeofNode & typesToCollapse) === 0) { + result.push(type.typeNode); + } + } + return result; + } + function deduplicateUnion(nodes: LocalTypeInfo[]) { + const typeInfoCache = new Map + }>(); + const union: LocalTypeInfo[] = []; + let implicitAnyNode: LocalTypeInfo | undefined; + for(const node of nodes) { + // Do not add implicit any unless it's the only type in the array + if(!strictNullChecks && node.flags & LocalTypeInfoFlags.ImplicitAny) { + implicitAnyNode = node; + continue; + } + const existing = union.find(u => typesEqual(node.typeNode, node.sourceNode, u.typeNode, u.sourceNode)); + if(existing === undefined) { + union.push(node); } else { - makeInvalidTypeAndReport(errorTarget ?? member); - } - } - typeInfoCache.set(typeNodeId, typeInfo); - return typeInfo; - } - function typesEqual(a: TypeNode | undefined, aErrorTarget: Node | undefined, b: TypeNode | undefined, bErrorTarget: Node | undefined) { - if (a === undefined || b === undefined) return a === b; - if (a.kind !== b.kind) return false; - switch(a.kind) { - case SyntaxKind.AnyKeyword: - case SyntaxKind.UnknownKeyword: - case SyntaxKind.NumberKeyword: - case SyntaxKind.BigIntKeyword: - case SyntaxKind.ObjectKeyword: - case SyntaxKind.BooleanKeyword: - case SyntaxKind.StringKeyword: - case SyntaxKind.SymbolKeyword: - case SyntaxKind.VoidKeyword: - case SyntaxKind.UndefinedKeyword: - case SyntaxKind.NeverKeyword: - return true; + existing.flags &= node.flags; + } } - if(isLiteralTypeNode(a) && isLiteralTypeNode(b)) { - let aLiteral = a.literal; - let bLiteral = b.literal; - while(true) { - switch(aLiteral.kind) { - case SyntaxKind.NullKeyword: - case SyntaxKind.TrueKeyword: - case SyntaxKind.FalseKeyword: - return aLiteral.kind === bLiteral.kind; - case SyntaxKind.NumericLiteral: - return aLiteral.kind === bLiteral.kind && +aLiteral.text === +(bLiteral).text; - case SyntaxKind.StringLiteral: - case SyntaxKind.NoSubstitutionTemplateLiteral: - return (bLiteral.kind === SyntaxKind.StringLiteral || bLiteral.kind === SyntaxKind.NoSubstitutionTemplateLiteral) - && aLiteral.text === (bLiteral).text; - case SyntaxKind.PrefixUnaryExpression: - const aUnary = (aLiteral as PrefixUnaryExpression); - const bUnary = (bLiteral as PrefixUnaryExpression); - if(aUnary.operator !== bUnary.operator) return false; - - aLiteral = aUnary.operand as LiteralExpression; - bLiteral = bUnary.operand as LiteralExpression; - return +aLiteral.text === +bLiteral.text; - default: - return false; + if(union.length === 0 && implicitAnyNode) { + union.push(implicitAnyNode); + } + return union; + + function getTypeInfo(type: TypeLiteralNode, errorTarget: Node | undefined) { + const typeNodeId = getNodeId(type); + let typeInfo = typeInfoCache.get(typeNodeId); + if(typeInfo) return typeInfo; + + typeInfo = { + node: type, + members: new Map() + }; + for(const member of type.members) { + const isMethod = isMethodSignature(member); + const isProp = isPropertySignature(member); + if(isMethod || isProp) { + const memberKey = getMemberKey(member); + if (memberKey === undefined) { + makeInvalidTypeAndReport(errorTarget ?? member); + break; + } + typeInfo.members.set(memberKey, member); + } + else { + makeInvalidTypeAndReport(errorTarget ?? member); } } + typeInfoCache.set(typeNodeId, typeInfo); + return typeInfo; } - if(isTypeReferenceNode(a) && isTypeReferenceNode(b)) { - let aTypeName = a.typeName; - let bTypeName = b.typeName; + function entityNameEqual(aTypeName: EntityName, bTypeName: EntityName) { while(true) { if(aTypeName.kind === SyntaxKind.QualifiedName && bTypeName.kind === SyntaxKind.QualifiedName) { if(aTypeName.right.escapedText !== bTypeName.right.escapedText) return false; @@ -1369,176 +1579,252 @@ export function transformDeclarations(context: TransformationContext) { } } } - if(isTypeLiteralNode(a) && isTypeLiteralNode(b)) { - if(a.members.length !== b.members.length) return false; - const aTypeInfo = getTypeInfo(a, aErrorTarget); - if(!aTypeInfo) return false; + function signatureEqual(a:SignatureDeclaration, aErrorTarget: Node | undefined, b: SignatureDeclaration, bErrorTarget: Node | undefined) { + if(!typesEqual(a.type, aErrorTarget, b.type, bErrorTarget)) { + return false; + } + if(a.parameters.length !== b.parameters.length) { + return false; + } - for(const bMember of b.members) { - const bIsMethod = isMethodSignature(bMember); - const bIsProp = isPropertySignature(bMember); - if(bIsMethod || bIsProp) { - const memberKey = getMemberKey(bMember); - if (memberKey === undefined) { - makeInvalidTypeAndReport(bErrorTarget ?? bMember); - break; - } - const aMember = aTypeInfo.members.get(memberKey); - if(!aMember) return false; - if((aMember.questionToken !== undefined) !== (bMember.questionToken !== undefined)) return false; - if (getSyntacticModifierFlags(aMember) !== getSyntacticModifierFlags(bMember)) return false; - if(bIsProp && isPropertySignature(aMember)) { - if(!typesEqual(aMember.type, aErrorTarget, bMember.type, bErrorTarget)) { + return a.parameters.every((aParam, index) => isParameterEqual(aParam, b.parameters[index])); + + // Isolated declarations finish equality + function isParameterEqual(a: ParameterDeclaration, b: ParameterDeclaration) { + if(!!a.questionToken !== !!b.questionToken) { + return false; + } + return typesEqual(a.type, aErrorTarget, b.type, bErrorTarget); + } + } + function typesEqual(a: TypeNode | undefined, aErrorTarget: Node | undefined, b: TypeNode | undefined, bErrorTarget: Node | undefined): boolean { + if (a === undefined || b === undefined) return a === b; + if (a.kind !== b.kind) return false; + switch(a.kind) { + case SyntaxKind.AnyKeyword: + case SyntaxKind.UnknownKeyword: + case SyntaxKind.NumberKeyword: + case SyntaxKind.BigIntKeyword: + case SyntaxKind.ObjectKeyword: + case SyntaxKind.BooleanKeyword: + case SyntaxKind.StringKeyword: + case SyntaxKind.SymbolKeyword: + case SyntaxKind.VoidKeyword: + case SyntaxKind.UndefinedKeyword: + case SyntaxKind.NeverKeyword: + return true; + } + if(isLiteralTypeNode(a) && isLiteralTypeNode(b)) { + let aLiteral = a.literal; + let bLiteral = b.literal; + while(true) { + switch(aLiteral.kind) { + case SyntaxKind.NullKeyword: + case SyntaxKind.TrueKeyword: + case SyntaxKind.FalseKeyword: + return aLiteral.kind === bLiteral.kind; + case SyntaxKind.NumericLiteral: + return aLiteral.kind === bLiteral.kind && +aLiteral.text === +(bLiteral).text; + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + return (bLiteral.kind === SyntaxKind.StringLiteral || bLiteral.kind === SyntaxKind.NoSubstitutionTemplateLiteral) + && aLiteral.text === (bLiteral).text; + case SyntaxKind.PrefixUnaryExpression: + const aUnary = (aLiteral as PrefixUnaryExpression); + const bUnary = (bLiteral as PrefixUnaryExpression); + if(aUnary.operator !== bUnary.operator) return false; + + aLiteral = aUnary.operand as LiteralExpression; + bLiteral = bUnary.operand as LiteralExpression; + return +aLiteral.text === +bLiteral.text; + default: return false; - } } - else if(bIsMethod && isMethodSignature(aMember)) { - if(!typesEqual(aMember.type, aErrorTarget,bMember.type, bErrorTarget)) { - return false; + } + } + else if(isArrayTypeNode(a) && isArrayTypeNode(b)) { + return typesEqual(a.elementType, aErrorTarget, b.elementType, bErrorTarget); + } + else if(isTypeReferenceNode(a) && isTypeReferenceNode(b)) { + entityNameEqual(a.typeName, b.typeName); + if(a.typeArguments === undefined && b.typeArguments === undefined) { + return true; + } + if(a.typeArguments?.length !== b.typeArguments?.length) { + return false; + } + + return !!a.typeArguments?.every((aArg, index) => typesEqual(aArg, aErrorTarget, b.typeArguments?.[index], bErrorTarget)) + } + else if(isTypeLiteralNode(a) && isTypeLiteralNode(b)) { + if(a.members.length !== b.members.length) return false; + const aTypeInfo = getTypeInfo(a, aErrorTarget); + if(!aTypeInfo) return false; + + for(const bMember of b.members) { + const bIsMethod = isMethodSignature(bMember); + const bIsProp = isPropertySignature(bMember); + if(bIsMethod || bIsProp) { + const memberKey = getMemberKey(bMember); + if (memberKey === undefined) { + makeInvalidTypeAndReport(bErrorTarget ?? bMember); + break; } - if(aMember.parameters.length !== b.members.length) { - return false; + const aMember = aTypeInfo.members.get(memberKey); + if(!aMember) return false; + if((aMember.questionToken !== undefined) !== (bMember.questionToken !== undefined)) return false; + if (getSyntacticModifierFlags(aMember) !== getSyntacticModifierFlags(bMember)) return false; + if(bIsProp && isPropertySignature(aMember)) { + if(!typesEqual(aMember.type, aErrorTarget, bMember.type, bErrorTarget)) { + return false; + } + } + else if(bIsMethod && isMethodSignature(aMember)) { + return signatureEqual(aMember, aErrorTarget, bMember, bErrorTarget) } } + else { + makeInvalidTypeAndReport(bErrorTarget ?? bMember); + } } - else { - makeInvalidTypeAndReport(bErrorTarget ?? bMember); - } + return true; } - return true; - } - else { - if(aErrorTarget) { - reportIsolatedDeclarationError(aErrorTarget); + else if(isFunctionTypeNode(a) && isFunctionTypeNode(b)) { + return signatureEqual(a, aErrorTarget, b, bErrorTarget); } - if(bErrorTarget) { - reportIsolatedDeclarationError(bErrorTarget); + else if(isConstructorTypeNode(a) && isConstructorTypeNode(b)) { + return signatureEqual(a, aErrorTarget, b, bErrorTarget); } - } - } - } - function normalizeObjectUnion(nodes: (TypeNode | undefined)[]) { - const allProps = new Map<__String, (TypeNode | undefined)[]>(); - const allTypeLookup = new Array | undefined>(); - let hasChanged = false; - for (let i = 0; i< nodes.length; i++) { - const type = nodes[i]; - const typeLookup = new Map<__String, TypeNode>(); - allTypeLookup.push(typeLookup); - - if(!type || !isTypeLiteralNode(type)) continue; - for(const member of type.members){ - const isMethod = isMethodSignature(member); - const isProp = isPropertySignature(member); - if(isMethod || isProp) { - const memberKey = getMemberKey(member); - if(memberKey === undefined) { - nodes[i] = makeInvalidTypeAndReport(member.name); - allTypeLookup[i] = undefined; - hasChanged = true; - break; + else if(isTypeQueryNode(a) && isTypeQueryNode(b)) { + let aEntity = a.exprName; + let bEntity = b.exprName; + while(true) { + if(isIdentifier(aEntity) && isIdentifier(bEntity)) { + return aEntity.escapedText === bEntity.escapedText; + } + if(isQualifiedName(aEntity) && isQualifiedName(bEntity)) { + if(aEntity.right.escapedText !== bEntity.right.escapedText) { + return false; + } + aEntity = aEntity.left; + bEntity = bEntity.left; + } + return false; } - let type; - if(isProp) { - type = member.type ?? makeInvalidTypeAndReport(member); + } + else { + return false; + } + } + } + function normalizeObjectUnion(nodes: (TypeNode | undefined)[]) { + const allProps = new Map(); + const allTypeLookup = new Array | undefined>(); + let hasChanged = false; + for (let i = 0; i< nodes.length; i++) { + const type = nodes[i]; + const typeLookup = new Map(); + allTypeLookup.push(typeLookup); + + if(!type || !isTypeLiteralNode(type)) continue; + for(const member of type.members){ + const isMethod = isMethodSignature(member); + const isProp = isPropertySignature(member); + if(isMethod || isProp) { + const memberKey = getMemberKey(member); + if(memberKey === undefined) { + nodes[i] = makeInvalidTypeAndReport(member.name); + allTypeLookup[i] = undefined; + hasChanged = true; + break; + } + let type; + if(isProp) { + type = member.type ?? makeInvalidTypeAndReport(member); + } + else { + type = factory.createFunctionTypeNode( + member.typeParameters, + member.parameters, + member.type!, + ); + } + let propInfo = allProps.get(memberKey); + if(!propInfo) { + propInfo = { + types: new Array(nodes.length), + name: member.name, + isReadonly: false, + }; + allProps.set(memberKey, propInfo); + } + propInfo.types[i] = type; + propInfo.isReadonly ||= !!(getSyntacticModifierFlags(member) & ModifierFlags.Readonly) + typeLookup.set(memberKey, type); } else { - type = factory.createFunctionTypeNode( - member.typeParameters, - member.parameters, - member.type!, - ); - } - let propTypes = allProps.get(memberKey); - if(!propTypes) { - propTypes = new Array(nodes.length); - allProps.set(memberKey, propTypes); + nodes[i] = makeInvalidTypeAndReport(member); + allTypeLookup[i] = undefined; + hasChanged = true; + break; } - propTypes[i] = type; - typeLookup.set(memberKey, type); - } - else { - nodes[i] = makeInvalidTypeAndReport(member); - allTypeLookup[i] = undefined; - hasChanged = true; - break; } } - } - for(const [, propTypes] of allProps) { - normalizeObjectUnion(propTypes); - } - for(let typeIndex = 0; typeIndex< nodes.length; typeIndex++) { - const type = nodes[typeIndex]; - const props = allTypeLookup[typeIndex]; - if(!type || !isTypeLiteralNode(type) || !props) continue; + for(const [, propTypes] of allProps) { + normalizeObjectUnion(propTypes.types); + } + for(let typeIndex = 0; typeIndex< nodes.length; typeIndex++) { + const type = nodes[typeIndex]; + const props = allTypeLookup[typeIndex]; + if(!type || !isTypeLiteralNode(type) || !props) continue; - let newMembers: TypeElement[] | undefined; - for(const [commonProp, propTypes] of allProps) { - const propType = props.get(commonProp); - if(propType) { - if(propType !== propTypes[typeIndex]) { - const indexOfProp = findIndex(type.members, e => isPropertySignature(e) && isIdentifier(e.name) && e.name.escapedText === commonProp); - if(indexOfProp !== -1) { - if(newMembers === undefined) { - newMembers = [...type.members]; + let newMembers: TypeElement[] | undefined; + for(const [commonProp, propInfo] of allProps) { + const propType = props.get(commonProp); + if(propType) { + if(propType !== propInfo.types[typeIndex]) { + const indexOfProp = findIndex(type.members, e => isPropertySignature(e) && getMemberKey(e) === commonProp); + if(indexOfProp !== -1) { + if(newMembers === undefined) { + newMembers = [...type.members]; + } + const existingMember = type.members[indexOfProp] as PropertySignature; + newMembers[indexOfProp] = factory.createPropertySignature( + existingMember.modifiers, + existingMember.name, + existingMember.questionToken, + propInfo.types[typeIndex] + ); } - const existingMember = type.members[indexOfProp] as PropertySignature; - newMembers[indexOfProp] = factory.createPropertySignature( - existingMember.modifiers, - existingMember.name, - existingMember.questionToken, - propTypes[typeIndex] - ); } } - } - else { - if(newMembers === undefined) { - newMembers = [...type.members]; + else { + if(newMembers === undefined) { + newMembers = [...type.members]; + } + newMembers.push(factory.createPropertySignature( + propInfo.isReadonly ? [factory.createToken(SyntaxKind.ReadonlyKeyword)] : undefined, + deepClone(propInfo.name), + factory.createToken(SyntaxKind.QuestionToken), + factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), + )); } - newMembers.push(factory.createPropertySignature( - /*modifiers*/ undefined, - factory.createIdentifier(unescapeLeadingUnderscores(commonProp)), - factory.createToken(SyntaxKind.QuestionToken), - factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), - )); + } + if (newMembers) { + hasChanged = true; + nodes[typeIndex] = factory.createTypeLiteralNode(newMembers); } } - if (newMembers) { - hasChanged = true; - nodes[typeIndex] = factory.createTypeLiteralNode(newMembers); - } - } - return hasChanged; - } - function getWidenedType(localTypeInfo: LocalTypeInfo) { - if((localTypeInfo.flags & LocalTypeInfoFlags.Fresh) && isLiteralTypeNode(localTypeInfo.typeNode)) { - const literal = localTypeInfo.typeNode.literal; - return literal.kind === SyntaxKind.StringLiteral ? factory.createKeywordTypeNode(SyntaxKind.StringKeyword) : - literal.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : - literal.kind === SyntaxKind.PrefixUnaryExpression && (literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : - literal.kind === SyntaxKind.BigIntLiteral ? factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword) : - literal.kind === SyntaxKind.TrueKeyword || literal.kind === SyntaxKind.FalseKeyword ? factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword) : - localTypeInfo.typeNode; - } - - return localTypeInfo.typeNode; - } - function makeUnionFromTypes(sourceNode: Node, types: LocalTypeInfo[], widenSingle: boolean) { - types = deduplicateUnion(types); - if(types.length === 1) { - const localType = types[0]; - return widenSingle ? { ... localType, type: getWidenedType(localType) }: localType; + return hasChanged; } - const unionConstituents = collapseLiteralTypesIntoBaseTypes(types); - - normalizeObjectUnion(unionConstituents); - return regular(unionConstituents.length === 1? unionConstituents[0]: factory.createUnionTypeNode(unionConstituents), sourceNode); } function inferReturnType(node: FunctionLikeDeclaration) { if(node.type) { - return regular(visitType(node.type, node), node); + return regular(deepClone(visitType(node.type, node)), node); } if(!node.body) { return regular(makeInvalidTypeAndReport(node), node); @@ -1557,45 +1843,50 @@ export function transformDeclarations(context: TransformationContext) { returnType = regular(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), node); } else { - const returnStatementInference = returnStatements.map((r) => { - return r.expression? - localInference(r.expression, NarrowBehavior.KeepLiterals): - fresh(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), r); - }); - - returnType = makeUnionFromTypes(node, returnStatementInference, /*widenSingle*/ true); - if(returnType.flags & LocalTypeInfoFlags.Fresh && returnType.typeNode.kind === SyntaxKind.UndefinedKeyword) { - returnType = fresh(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), returnType.typeNode); - } + returnType = inferFromOutputs(node, returnStatements, node.asteriskToken ? SyntaxKind.NeverKeyword : SyntaxKind.VoidKeyword); } } let yieldType: LocalTypeInfo | undefined; if(node.asteriskToken) { if(yieldExpressions.length === 0) { - returnType = regular( + yieldType = regular( factory.createKeywordTypeNode(SyntaxKind.NeverKeyword), node ); } else { - const yieldExpressionsInference = yieldExpressions.map((r) => { - return r.expression? - localInference(r.expression, NarrowBehavior.KeepLiterals): - regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), r); - }); - - yieldType = makeUnionFromTypes(node, yieldExpressionsInference, /*widenSingle*/ true); + yieldType = inferFromOutputs(node, yieldExpressions, strictNullChecks ?SyntaxKind.UndefinedKeyword: SyntaxKind.AnyKeyword); } } return makeFinalReturnType(node, returnType, yieldType); + function inferFromOutputs(node: Node, statements: (YieldExpression | ReturnStatement )[], emptyType: KeywordTypeSyntaxKind) { + const returnStatementInference: LocalTypeInfo[] = []; + let hasOnlyEmpty = true; + for(let r of statements) { + if(r.expression) { + returnStatementInference.push(localInference(r.expression, NarrowBehavior.KeepLiterals)); + hasOnlyEmpty = false; + }else { + returnStatementInference.push( + createUndefinedTypeNode(r, LocalTypeInfoFlags.Fresh) + ); + } + }; + if(hasOnlyEmpty) { + return fresh(factory.createKeywordTypeNode(emptyType), node); + }else { + return makeUnionFromTypes(node, returnStatementInference, /*widenSingle*/ true); + } + } function makeFinalReturnType(node: FunctionLikeDeclaration, returnType: LocalTypeInfo, yieldType: LocalTypeInfo | undefined) { const modifiers = getEffectiveModifierFlags(node); if(node.asteriskToken) { + const yieldTypeNode = yieldType?.typeNode ?? factory.createKeywordTypeNode(SyntaxKind.VoidKeyword); return regular( factory.createTypeReferenceNode( - factory.createIdentifier(modifiers & ModifierFlags.Async ? "Generator": "AsyncGenerator"), - [returnType.typeNode, yieldType?.typeNode!], + factory.createIdentifier(modifiers & ModifierFlags.Async ? "AsyncGenerator": "Generator"), + [yieldTypeNode, returnType.typeNode, factory.createKeywordTypeNode(SyntaxKind.UnknownKeyword)], ), returnType.sourceNode, returnType.flags @@ -1629,31 +1920,108 @@ export function transformDeclarations(context: TransformationContext) { }); } } + function inferFunctionMembers(scope: { statements: NodeArray }, functionName: Identifier, localType: LocalTypeInfo): LocalTypeInfo { + if(!isFunctionTypeNode(localType.typeNode)) return localType; + let inferredMembers: TypeElement[] | undefined; + for(let i = 0; i< scope.statements.length; i++) { + const statement = scope.statements[i]; + // Looking for name functionName.member = init; + if(isExpressionStatement(statement) + && isBinaryExpression(statement.expression) + && isPropertyAccessExpression(statement.expression.left) + && isIdentifier(statement.expression.left.expression) + && statement.expression.left.expression.escapedText === functionName.escapedText) { + (inferredMembers ??= []).push(factory.createPropertySignature( + [], + statement.expression.left.name, + undefined, + localInference(statement.expression.right).typeNode + )); + } + } + if(inferredMembers) { + inferredMembers.push( + factory.createCallSignature( + localType.typeNode.typeParameters, + localType.typeNode.parameters, + localType.typeNode.type + ) + ); + return { + sourceNode: localType.sourceNode, + flags: localType.flags, + typeNode: factory.createTypeLiteralNode( + inferredMembers + ), + } + } + return localType; + } + + // Copied similar function in checker. Maybe a reusable one should be created. + function deepClone(node: T): T { + return setTextRange(factory.cloneNode(visitEachChild(node, deepClone, nullTransformationContext, deepCloneNodes)), 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 localInferenceFromInitializer(node: HasInferredType | ExportAssignment): TypeNode | undefined { if(NO_LOCAL_INFERENCE) { return undefined; } - let typeNode; + let localType; + let actualTypeNode: Node = node; if(isExportAssignment(node) && node.expression) { - typeNode = localInference(node.expression); + localType = localInference(node.expression); + actualTypeNode = node.expression; } else if(isParameter(node) && node.initializer) { - typeNode = localInference(node.initializer); + localType = localInference(node.initializer); } else if(isVariableDeclaration(node) && node.initializer) { - typeNode = localInference(node.initializer); + + localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals: NarrowBehavior.None); + if(isVariableStatement(node.parent.parent) && + node.parent.flags & NodeFlags.Const && + isIdentifier(node.name) && + (isBlock(node.parent.parent.parent) || isSourceFile(node.parent.parent.parent))) { + localType = inferFunctionMembers(node.parent.parent.parent, node.name, localType); + } } else if(isPropertyDeclaration(node) && node.initializer) { - typeNode = localInference(node.initializer); + localType = localInference(node.initializer); } else if(isFunctionDeclaration(node)) { - typeNode = inferReturnType(node); + localType = inferReturnType(node); } else if(isMethodDeclaration(node)) { - typeNode = inferReturnType(node); + localType = inferReturnType(node); + } + if(localType) { + const typeNode = localType.typeNode; + setParent(typeNode, node); + const result = resolver.isSyntheticTypeEquivalent(actualTypeNode, typeNode, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit); + if(result !== true) { + result.forEach(r => context.addDiagnostic(r as DiagnosticWithLocation)); + // we should add the extra diagnostics here + return makeInvalidType(); + } } - return typeNode?.typeNode; + return localType?.typeNode; } function ensureType(node: HasInferredType, type: TypeNode | undefined, ignorePrivate?: boolean): TypeNode | undefined { if (!ignorePrivate && hasEffectiveModifier(node, ModifierFlags.Private)) { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 612a4584b41a1..2980a18fa512c 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -5710,6 +5710,7 @@ export interface EmitResolver { isBindingCapturedByNode(node: Node, decl: VariableDeclaration | BindingElement): boolean; getDeclarationStatementsForSourceFile(node: SourceFile, flags: NodeBuilderFlags, tracker: SymbolTracker, bundled?: boolean): Statement[] | undefined; isImportRequiredByAugmentation(decl: ImportDeclaration): boolean; + isSyntheticTypeEquivalent(actualNode: Node, syntheticNodeType: TypeNode, headMessage: DiagnosticMessage): true | Diagnostic[]; } export const enum SymbolFlags { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 20f099617cbf7..b2cfcf51d53a7 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -2192,6 +2192,11 @@ function getErrorSpanForArrowFunction(sourceFile: SourceFile, node: ArrowFunctio /** @internal */ export function getErrorSpanForNode(sourceFile: SourceFile, node: Node): TextSpan { + // Temporary fix + if(node.flags & NodeFlags.Synthesized && node.pos < 0) { + debugger; + return { start: 0, length: 0 } + } let errorNode: Node | undefined = node; switch (node.kind) { case SyntaxKind.SourceFile: { From 0c623dd6afed733181506a6a1ea4d9810f500a7d Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 14 Jun 2023 18:52:25 +0100 Subject: [PATCH 018/224] 1. Support for accessors in object literals 2. Better union deduplication 3. Fix for readonly modifier placement bug 4. Fixed for rezolving type parameters with nested generic functions. --- src/compiler/checker.ts | 20 ++- src/compiler/transformers/declarations.ts | 175 ++++++++++++++++------ 2 files changed, 150 insertions(+), 45 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 9db2bb55b25ea..9a704052e8f6c 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -46673,13 +46673,31 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { syntheticNode: TypeNode, headMessage: DiagnosticMessage, ): true | Diagnostic[] { + const isActualNodeFunctionLike = isFunctionLike(actualNode); + + let syntheticTypeNodeContainer: Node = syntheticNode; + + if(isActualNodeFunctionLike) { + const fakeParameter = factory.createParameterDeclaration( undefined, undefined, "__p", undefined, syntheticNode); + fakeParameter.symbol = createSymbol(SymbolFlags.Variable, "__p" as __String) + syntheticTypeNodeContainer = fakeParameter; + } + + + setParent(syntheticNode, actualNode); bindSyntheticTypeNode(syntheticNode, actualNode, compilerOptions); + + + setParent(syntheticNode, syntheticTypeNodeContainer); + setParent(syntheticTypeNodeContainer, actualNode); + checkSourceElement(syntheticNode); + const prevDeferredDiagnosticsCallbacksLength = deferredDiagnosticsCallbacks.length; const syntheticType = getTypeOfNode(syntheticNode); const actualNodeType = getTypeOfNode(actualNode); let actualType; - if(isFunctionLike(actualNode)) { + if(isActualNodeFunctionLike) { const signatures = getSignaturesOfType(actualNodeType, SignatureKind.Call); actualType = signatures.length === 0? actualNodeType: getReturnTypeOfSignature(signatures[0]); } diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 0d1b3f58cd37c..d0fe7c5f732a4 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -91,6 +91,7 @@ import { getSyntacticModifierFlags, getTextOfNode, getThisParameter, + getTokenPosOfNode, getTrailingCommentRanges, hasDynamicName, hasEffectiveModifier, @@ -135,6 +136,7 @@ import { isFunctionDeclaration, isFunctionLike, isFunctionTypeNode, + isGetAccessorDeclaration, isGlobalScopeAugmentation, isIdentifier, isIdentifierANonContextualKeyword, @@ -215,8 +217,10 @@ import { NodeFactory, NodeFlags, NodeId, + NodeWithTypeArguments, normalizeSlashes, nullTransformationContext, + ObjectLiteralElementLike, ObjectLiteralExpression, OmittedExpression, orderedRemoveItem, @@ -880,19 +884,19 @@ export function transformDeclarations(context: TransformationContext) { } function entityNameExpressionToQualifiedName(node:EntityNameOrEntityNameExpression): EntityName { if(isIdentifier(node)) { - return factory.cloneNode(node); + return setTextRange(factory.cloneNode(node), node); } else if(isPropertyAccessExpression(node)) { - return factory.createQualifiedName( + return setTextRange(factory.createQualifiedName( entityNameExpressionToQualifiedName(node.expression), factory.cloneNode(node.name) - ); + ), node); } else if(isQualifiedName(node)) { - return factory.createQualifiedName( + return setTextRange(factory.createQualifiedName( entityNameExpressionToQualifiedName(node), factory.cloneNode(node.right) - ); + ), node); } throw Error("Should not happen"); } @@ -930,6 +934,45 @@ export function transformDeclarations(context: TransformationContext) { function mergeFlags(existing: LocalTypeInfoFlags, newFlags: LocalTypeInfoFlags): LocalTypeInfoFlags { return existing | (newFlags | LocalTypeInfoFlags.Optimistic); } + function getAccessorInfo(properties: NodeArray, knownAccessor: SetAccessorDeclaration | GetAccessorDeclaration) { + const nameKey = getMemberKey(knownAccessor); + const knownIsGetAccessor = isGetAccessorDeclaration(knownAccessor); + const otherAccessorTest = knownIsGetAccessor ? isSetAccessorDeclaration: isGetAccessorDeclaration; + const otherAccessorIndex = properties.findIndex(n => otherAccessorTest(n) && getMemberKey(n) === nameKey); + const otherAccessor = properties[otherAccessorIndex] as SetAccessorDeclaration | GetAccessorDeclaration | undefined; + + + const getAccessor = knownIsGetAccessor ? knownAccessor: + otherAccessor && isGetAccessorDeclaration(otherAccessor)? otherAccessor: + undefined; + const setAccessor = !knownIsGetAccessor ? knownAccessor: + otherAccessor && isSetAccessorDeclaration(otherAccessor)? otherAccessor: + undefined; + + + return { + otherAccessorIndex, + otherAccessor, + getAccessor, + setAccessor, + } + } + function inferAccessorType(getAccessor?: GetAccessorDeclaration, setAccessor?: SetAccessorDeclaration) { + + let accessorType = getAccessor?.type && deepClone(visitType(getAccessor?.type, getAccessor)); + + if(!accessorType && setAccessor) { + accessorType = setAccessor.parameters[0].type; + accessorType = accessorType && deepClone(visitType(accessorType, setAccessor)); + } + + if(!accessorType && getAccessor) { + const localPropType = inferReturnType(getAccessor) + accessorType = localPropType.typeNode; + } + + return accessorType ?? makeInvalidType(); + } function localInference(node: Node, inferenceFlags: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { const nextInferenceFlags = inferenceFlags & NarrowBehavior.NotKeepLiterals; switch(node.kind) { @@ -994,10 +1037,10 @@ export function transformDeclarations(context: TransformationContext) { } case SyntaxKind.NewExpression: const newExpr = node as NewExpression; - if(isIdentifier(newExpr.expression)) { + if(isEntityNameExpression(newExpr.expression)) { const typeNode = visitSyntheticType(factory.createTypeReferenceNode( - deepClone(newExpr.expression), + entityNameExpressionToQualifiedName(newExpr.expression), visitNodes(newExpr.typeArguments, deepClone, isTypeNode)! ), node); // Optimistic since the constructor might not have the same name as the type @@ -1158,13 +1201,15 @@ export function transformDeclarations(context: TransformationContext) { case SyntaxKind.ObjectLiteralExpression: { const objectLiteral = node as ObjectLiteralExpression; const properties: TypeElement[] = []; - let addedIntersections: TypeNode[] | undefined - for(const prop of objectLiteral.properties) { + let addedIntersections: TypeNode[] | undefined; + + for(let propIndex =0, length = objectLiteral.properties.length; propIndex deepClone(ensureParameter(p))); if (inferenceFlags & NarrowBehavior.AsConst) { - properties.push(factory.createPropertySignature( + newProp = factory.createPropertySignature( [factory.createModifier(SyntaxKind.ReadonlyKeyword)], name, /*questionToken*/ undefined, @@ -1181,17 +1226,17 @@ export function transformDeclarations(context: TransformationContext) { parameters, returnType.typeNode, ) - )); + ); } else { - properties.push(factory.createMethodSignature( + newProp = factory.createMethodSignature( [], name, /*questionToken*/ undefined, typeParameters, parameters, returnType.typeNode, - )); + ); } enclosingDeclaration = oldEnclosingDeclaration; } @@ -1199,36 +1244,81 @@ export function transformDeclarations(context: TransformationContext) { const modifiers = inferenceFlags & NarrowBehavior.AsConst ? [factory.createModifier(SyntaxKind.ReadonlyKeyword)]: []; - properties.push(factory.createPropertySignature( + newProp = factory.createPropertySignature( modifiers, name, /*questionToken*/ undefined, localInference(prop.initializer, nextInferenceFlags).typeNode - )); + ); } else if(isShorthandPropertyAssignment(prop) && name) { const modifiers = inferenceFlags & NarrowBehavior.AsConst ? [factory.createModifier(SyntaxKind.ReadonlyKeyword)]: []; - properties.push(factory.createPropertySignature( + newProp = factory.createPropertySignature( modifiers, name, /*questionToken*/ undefined, localInference(prop.name, nextInferenceFlags).typeNode - )); + ); } else if(isSpreadAssignment(prop)) { addedIntersections ??= []; - addedIntersections.push(localInference(prop.expression).typeNode) + addedIntersections.push(localInference(prop.expression, nextInferenceFlags).typeNode) } else { - return invalid(prop); + if(isGetAccessorDeclaration(prop) || isSetAccessorDeclaration(prop)) { + const nameKey = getMemberKey(prop); + if(nameKey && name) { + const { getAccessor, setAccessor, otherAccessorIndex } = getAccessorInfo(objectLiteral.properties, prop); + if(otherAccessorIndex === -1 || otherAccessorIndex > propIndex) { + const accessorType = inferAccessorType(getAccessor, setAccessor); + const modifiers: Modifier[] = [] + if(!setAccessor) { + modifiers.push(factory.createModifier(SyntaxKind.ReadonlyKeyword)) + } + + newProp = factory.createPropertySignature( + modifiers, + name, + /*questionToken*/ undefined, + accessorType, + ); + } + } else { + return invalid(prop); + } + } else { + return invalid(prop); + } + } + + if(newProp) { + const prevPos = newProp.name.pos; + const newPos = getTokenPosOfNode(newProp.name, currentSourceFile); + + setTextRange(newProp.name, { + pos: newPos, + end: newProp.name.end + }); + setTextRange(newProp, { + pos: prevPos, + end: newProp.name.end, + }) + setCommentRange(newProp, { + pos: prevPos, + end: newProp.name.pos + }) + + properties.push(newProp) } } let typeNode: TypeNode = factory.createTypeLiteralNode(properties); if (addedIntersections) { - addedIntersections.push(typeNode); + if(properties.length !== 0) { + addedIntersections.push(typeNode); + } typeNode = factory.createIntersectionTypeNode(addedIntersections); } return regular(typeNode, objectLiteral); @@ -1302,7 +1392,7 @@ export function transformDeclarations(context: TransformationContext) { return visitedType ?? makeInvalidTypeAndReport(owner); } - function getMemberKey(member: MethodSignature | PropertySignature) { + function getMemberKey(member: MethodSignature | PropertySignature | GetAccessorDeclaration | SetAccessorDeclaration) { if(isIdentifier(member.name)) { return "I:" + member.name.escapedText; } @@ -1597,6 +1687,16 @@ export function transformDeclarations(context: TransformationContext) { return typesEqual(a.type, aErrorTarget, b.type, bErrorTarget); } } + function nodeTypeArgumentsEqual(a: NodeWithTypeArguments, aErrorTarget: Node | undefined, b: NodeWithTypeArguments, bErrorTarget: Node | undefined) { + if(a.typeArguments === undefined && b.typeArguments === undefined) { + return true; + } + if(a.typeArguments?.length !== b.typeArguments?.length) { + return false; + } + + return !!a.typeArguments?.every((aArg, index) => typesEqual(aArg, aErrorTarget, b.typeArguments?.[index], bErrorTarget)) + } function typesEqual(a: TypeNode | undefined, aErrorTarget: Node | undefined, b: TypeNode | undefined, bErrorTarget: Node | undefined): boolean { if (a === undefined || b === undefined) return a === b; if (a.kind !== b.kind) return false; @@ -1646,15 +1746,10 @@ export function transformDeclarations(context: TransformationContext) { return typesEqual(a.elementType, aErrorTarget, b.elementType, bErrorTarget); } else if(isTypeReferenceNode(a) && isTypeReferenceNode(b)) { - entityNameEqual(a.typeName, b.typeName); - if(a.typeArguments === undefined && b.typeArguments === undefined) { - return true; - } - if(a.typeArguments?.length !== b.typeArguments?.length) { + if(!entityNameEqual(a.typeName, b.typeName)) { return false; } - - return !!a.typeArguments?.every((aArg, index) => typesEqual(aArg, aErrorTarget, b.typeArguments?.[index], bErrorTarget)) + return nodeTypeArgumentsEqual(a, aErrorTarget, b, bErrorTarget); } else if(isTypeLiteralNode(a) && isTypeLiteralNode(b)) { if(a.members.length !== b.members.length) return false; @@ -1696,21 +1791,10 @@ export function transformDeclarations(context: TransformationContext) { return signatureEqual(a, aErrorTarget, b, bErrorTarget); } else if(isTypeQueryNode(a) && isTypeQueryNode(b)) { - let aEntity = a.exprName; - let bEntity = b.exprName; - while(true) { - if(isIdentifier(aEntity) && isIdentifier(bEntity)) { - return aEntity.escapedText === bEntity.escapedText; - } - if(isQualifiedName(aEntity) && isQualifiedName(bEntity)) { - if(aEntity.right.escapedText !== bEntity.right.escapedText) { - return false; - } - aEntity = aEntity.left; - bEntity = bEntity.left; - } - return false; + if(!entityNameEqual(a.exprName, b.exprName)) { + return false; } + return nodeTypeArgumentsEqual(a, aErrorTarget, b, bErrorTarget); } else { return false; @@ -1835,7 +1919,7 @@ export function transformDeclarations(context: TransformationContext) { let returnType; if(!isBlock(node.body)) { - returnType = localInference(node.body); + returnType = localInference(node.body, NarrowBehavior.KeepLiterals); } else { collectReturnAndYield(node.body, returnStatements, yieldExpressions); @@ -2011,6 +2095,9 @@ export function transformDeclarations(context: TransformationContext) { else if(isMethodDeclaration(node)) { localType = inferReturnType(node); } + else if(isGetAccessorDeclaration(node)) { + localType = inferReturnType(node); + } if(localType) { const typeNode = localType.typeNode; setParent(typeNode, node); From ea56f2c009ac15d409bd86475d291d6b46ad4fec Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 19 Jun 2023 09:42:46 +0100 Subject: [PATCH 019/224] Do not clone node if it has already been cloned. --- src/compiler/transformers/declarations.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index d0fe7c5f732a4..57f19e69ed627 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -2044,7 +2044,12 @@ export function transformDeclarations(context: TransformationContext) { // Copied similar function in checker. Maybe a reusable one should be created. function deepClone(node: T): T { - return setTextRange(factory.cloneNode(visitEachChild(node, deepClone, nullTransformationContext, deepCloneNodes)), node); + 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, From 595fe53884cb539360266f64049fb246d37c2515 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 20 Jun 2023 10:16:46 +0100 Subject: [PATCH 020/224] Moved local inference to separate file. --- .../tests/source/local-inference/scratch.ts | 5 + src/compiler/transformers/declarations.ts | 1370 +---------------- .../declarations/localInferenceResolver.ts | 1335 ++++++++++++++++ src/compiler/types.ts | 14 + 4 files changed, 1377 insertions(+), 1347 deletions(-) create mode 100644 external-declarations/tests/source/local-inference/scratch.ts create mode 100644 src/compiler/transformers/declarations/localInferenceResolver.ts diff --git a/external-declarations/tests/source/local-inference/scratch.ts b/external-declarations/tests/source/local-inference/scratch.ts new file mode 100644 index 0000000000000..3718b222bc79b --- /dev/null +++ b/external-declarations/tests/source/local-inference/scratch.ts @@ -0,0 +1,5 @@ +export const x = [ + "A" as const, + "", + "B" as const +] \ No newline at end of file diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 57f19e69ed627..4bb366bc252c3 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -7,15 +7,11 @@ import { append, ArrayBindingElement, arrayFrom, - ArrayLiteralExpression, - ArrowFunction, - AsExpression, AssertClause, BindingElement, BindingName, BindingPattern, Bundle, - CallExpression, CallSignatureDeclaration, canHaveModifiers, canProduceDiagnostics, @@ -23,7 +19,6 @@ import { CommentRange, compact, concatenate, - ConditionalExpression, ConditionalTypeNode, ConstructorDeclaration, ConstructorTypeNode, @@ -46,7 +41,6 @@ import { EmitHost, EmitResolver, emptyArray, - EntityName, EntityNameOrEntityNameExpression, EnumDeclaration, ExportAssignment, @@ -55,15 +49,10 @@ import { factory, FileReference, filter, - findIndex, flatMap, flatten, forEach, - forEachChild, - forEachChildRecursively, FunctionDeclaration, - FunctionExpression, - FunctionLikeDeclaration, FunctionTypeNode, GeneratedIdentifierFlags, GetAccessorDeclaration, @@ -78,7 +67,6 @@ import { getLeadingCommentRangesOfNode, getLineAndCharacterOfPosition, getNameOfDeclaration, - getNodeId, getOriginalNodeId, getOutputPathsFor, getParseTreeNode, @@ -88,15 +76,14 @@ import { getSetAccessorValueParameter, getSourceFileOfNode, GetSymbolAccessibilityDiagnostic, - getSyntacticModifierFlags, getTextOfNode, getThisParameter, - getTokenPosOfNode, getTrailingCommentRanges, hasDynamicName, hasEffectiveModifier, hasExtension, hasIdentifierComputedName, + HasInferredType, hasJSDocNodes, HasModifiers, hasSyntacticModifier, @@ -110,23 +97,17 @@ import { isAnyImportSyntax, isArray, isArrayBindingElement, - isArrayTypeNode, isBinaryExpression, isBindingElement, isBindingPattern, - isBlock, isClassDeclaration, isClassElement, - isClassLike, - isComputedPropertyName, - isConstructorTypeNode, isDeclaration, isElementAccessExpression, isEntityName, isEntityNameExpression, isExportAssignment, isExportDeclaration, - isExpressionStatement, isExpressionWithTypeArguments, isExternalModule, isExternalModuleAugmentation, @@ -135,8 +116,6 @@ import { isExternalOrCommonJsModule, isFunctionDeclaration, isFunctionLike, - isFunctionTypeNode, - isGetAccessorDeclaration, isGlobalScopeAugmentation, isIdentifier, isIdentifierANonContextualKeyword, @@ -149,33 +128,21 @@ import { isLateVisibilityPaintedStatement, isLiteralExpression, isLiteralImportTypeNode, - isLiteralTypeNode, isMappedTypeNode, isMethodDeclaration, isMethodSignature, isModifier, isModuleDeclaration, isNightly, - isNoSubstitutionTemplateLiteral, - isNumericLiteral, isOmittedExpression, - isParameter, isPrivateIdentifier, isPropertyAccessExpression, - isPropertyAssignment, - isPropertyDeclaration, - isPropertyName, isPropertySignature, - isQualifiedName, - isReturnStatement, isSemicolonClassElement, isSetAccessorDeclaration, - isShorthandPropertyAssignment, isSourceFile, isSourceFileJS, isSourceFileNotJson, - isSpreadAssignment, - isSpreadElement, isStatement, isStringANonContextualKeyword, isStringLiteral, @@ -183,22 +150,15 @@ import { isTupleTypeNode, isTypeAliasDeclaration, isTypeElement, - isTypeLiteralNode, isTypeNode, isTypeParameterDeclaration, isTypeQueryNode, - isTypeReferenceNode, isUnparsedSource, isVariableDeclaration, - isVariableStatement, - isYieldExpression, - KeywordTypeSyntaxKind, last, LateBoundDeclaration, LateVisibilityPaintedStatement, length, - LiteralExpression, - LiteralTypeNode, map, mapDefined, MethodDeclaration, @@ -210,35 +170,24 @@ import { NamedDeclaration, NamespaceDeclaration, needsScopeMarker, - NewExpression, Node, NodeArray, NodeBuilderFlags, NodeFactory, NodeFlags, NodeId, - NodeWithTypeArguments, normalizeSlashes, - nullTransformationContext, - ObjectLiteralElementLike, - ObjectLiteralExpression, OmittedExpression, orderedRemoveItem, ParameterDeclaration, - ParenthesizedExpression, parseNodeFactory, pathContainsNodeModules, pathIsRelative, - PrefixUnaryExpression, PropertyDeclaration, - PropertyName, PropertySignature, pushIfUnique, - QualifiedName, removeAllComments, ResolutionMode, - ReturnStatement, - SatisfiesExpression, ScriptTarget, SetAccessorDeclaration, setCommentRange, @@ -260,17 +209,12 @@ import { SymbolFlags, SymbolTracker, SyntaxKind, - TemplateExpression, - TemplateLiteralTypeSpan, toFileNameLowerCase, toPath, TransformationContext, transformNodes, tryCast, TypeAliasDeclaration, - TypeAssertion, - TypeElement, - TypeLiteralNode, TypeNode, TypeParameterDeclaration, TypeReferenceNode, @@ -282,29 +226,10 @@ import { visitEachChild, visitNode, visitNodes, - Visitor, VisitResult, - YieldExpression, } from "../_namespaces/ts"; import * as moduleSpecifiers from "../_namespaces/ts.moduleSpecifiers"; - - -const NO_LOCAL_INFERENCE = !!process.env.NO_LOCAL_INFERENCE; -enum NarrowBehavior { - None = 0, - AsConst = 1, - KeepLiterals = 2, - AsConstOrKeepLiterals = AsConst | KeepLiterals, - NotKeepLiterals = ~KeepLiterals, -} - -enum LocalTypeInfoFlags { - None = 0, - Fresh = 1 << 0, - ImplicitAny = 1<< 1, - Invalid = 1 << 2, - Optimistic = 1 << 3, -} +import { createLocalInferenceResolver } from "./declarations/localInferenceResolver"; /** @internal */ export function getDeclarationDiagnostics(host: EmitHost, resolver: EmitResolver, file: SourceFile | undefined): DiagnosticWithLocation[] | undefined { @@ -400,10 +325,27 @@ export function transformDeclarations(context: TransformationContext) { 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 = createLocalInferenceResolver({ + ensureParameter, + context, + visitDeclarationSubtree, + setEnclosingDeclarations(node) { + const oldNode = enclosingDeclaration; + enclosingDeclaration = node; + return oldNode; + }, + setLocalInferenceTargetNode(node) { + const oldNode = localInferenceTargetNode; + localInferenceTargetNode = node; + return oldNode; + }, + checkEntityNameVisibility(name, container) { + return checkEntityNameVisibility(name, container ?? enclosingDeclaration) + }, + }) const options = context.getCompilerOptions(); const { noResolve, stripInternal } = options; const isolatedDeclarations = options.isolatedDeclarations; - const strictNullChecks = !!options.strict || !!options.strictNullChecks; return transformRoot; function reportIsolatedDeclarationError(node: Node) { @@ -854,1267 +796,6 @@ export function transformDeclarations(context: TransformationContext) { return undefined; } - type HasInferredType = - | FunctionDeclaration - | MethodDeclaration - | GetAccessorDeclaration - | SetAccessorDeclaration - | BindingElement - | ConstructSignatureDeclaration - | VariableDeclaration - | MethodSignature - | CallSignatureDeclaration - | ParameterDeclaration - | PropertyDeclaration - | PropertySignature; - function makeInvalidType() { - return factory.createTypeReferenceNode("invalid"); - } - - interface LocalTypeInfo { typeNode: TypeNode, sourceNode: Node, flags: LocalTypeInfoFlags } - // We need to see about getting the JSX element type. - function getJSXElementType(_node: Node): EntityName { - return factory.createQualifiedName( - factory.createQualifiedName( - factory.createIdentifier("React"), - factory.createIdentifier("JSX"), - ), - factory.createIdentifier("Element"), - ); - } - function entityNameExpressionToQualifiedName(node:EntityNameOrEntityNameExpression): EntityName { - if(isIdentifier(node)) { - return setTextRange(factory.cloneNode(node), node); - } - else if(isPropertyAccessExpression(node)) { - return setTextRange(factory.createQualifiedName( - entityNameExpressionToQualifiedName(node.expression), - factory.cloneNode(node.name) - ), node); - } - else if(isQualifiedName(node)) { - return setTextRange(factory.createQualifiedName( - entityNameExpressionToQualifiedName(node), - factory.cloneNode(node.right) - ), node); - } - throw Error("Should not happen"); - } - - function isSyntheticTypeNode(node: Node): node is TypeNode { - return isTypeNode(node) && !!(node.flags & NodeFlags.Synthesized); - } - function finalizeSyntheticTypeNode(typeNode: T, parent: Node): T { - if(typeNode && typeNode.parent !== parent) { - setParent(typeNode, parent); - // Ensure no non synthetic nodes make it in here - Debug.assert(typeNode.flags & NodeFlags.Synthesized) - forEachChildRecursively(typeNode, (child, parent) => { - Debug.assert(typeNode.flags & NodeFlags.Synthesized); - if(child.parent === parent) { - return "skip"; - } - setParent(child, parent); - }); - } - return typeNode as T & { isSynthetic: true }; - } - function visitSyntheticType(typeNode: TypeNode, node: Node) { - const previousLocalInferenceTargetNode = localInferenceTargetNode; - try { - localInferenceTargetNode = node; - let visitedNode = visitNode(finalizeSyntheticTypeNode(typeNode, node), visitDeclarationSubtree, isSyntheticTypeNode); - Debug.assert(visitedNode); - return visitedNode; - } finally { - localInferenceTargetNode = previousLocalInferenceTargetNode; - } - } - - function mergeFlags(existing: LocalTypeInfoFlags, newFlags: LocalTypeInfoFlags): LocalTypeInfoFlags { - return existing | (newFlags | LocalTypeInfoFlags.Optimistic); - } - function getAccessorInfo(properties: NodeArray, knownAccessor: SetAccessorDeclaration | GetAccessorDeclaration) { - const nameKey = getMemberKey(knownAccessor); - const knownIsGetAccessor = isGetAccessorDeclaration(knownAccessor); - const otherAccessorTest = knownIsGetAccessor ? isSetAccessorDeclaration: isGetAccessorDeclaration; - const otherAccessorIndex = properties.findIndex(n => otherAccessorTest(n) && getMemberKey(n) === nameKey); - const otherAccessor = properties[otherAccessorIndex] as SetAccessorDeclaration | GetAccessorDeclaration | undefined; - - - const getAccessor = knownIsGetAccessor ? knownAccessor: - otherAccessor && isGetAccessorDeclaration(otherAccessor)? otherAccessor: - undefined; - const setAccessor = !knownIsGetAccessor ? knownAccessor: - otherAccessor && isSetAccessorDeclaration(otherAccessor)? otherAccessor: - undefined; - - - return { - otherAccessorIndex, - otherAccessor, - getAccessor, - setAccessor, - } - } - function inferAccessorType(getAccessor?: GetAccessorDeclaration, setAccessor?: SetAccessorDeclaration) { - - let accessorType = getAccessor?.type && deepClone(visitType(getAccessor?.type, getAccessor)); - - if(!accessorType && setAccessor) { - accessorType = setAccessor.parameters[0].type; - accessorType = accessorType && deepClone(visitType(accessorType, setAccessor)); - } - - if(!accessorType && getAccessor) { - const localPropType = inferReturnType(getAccessor) - accessorType = localPropType.typeNode; - } - - return accessorType ?? makeInvalidType(); - } - function localInference(node: Node, inferenceFlags: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { - const nextInferenceFlags = inferenceFlags & NarrowBehavior.NotKeepLiterals; - switch(node.kind) { - case SyntaxKind.ParenthesizedExpression: - return localInference((node as ParenthesizedExpression).expression, inferenceFlags); - case SyntaxKind.QualifiedName: - const typeNode = visitSyntheticType(factory.createTypeQueryNode( - entityNameExpressionToQualifiedName(node as QualifiedName) - ), node); - - return regular( - typeNode, - node, - LocalTypeInfoFlags.Optimistic - ) - case SyntaxKind.PropertyAccessExpression: - if(isEntityNameExpression(node)) { - const typeNode = visitSyntheticType(factory.createTypeQueryNode( - entityNameExpressionToQualifiedName(node) - ), node); - return regular( - typeNode, - node, - LocalTypeInfoFlags.Optimistic - ) - } - break; - case SyntaxKind.Identifier: { - if((node as Identifier).escapedText === "undefined") { - return createUndefinedTypeNode(node); - } - const typeNode = visitSyntheticType(factory.createTypeQueryNode( - deepClone(node as Identifier) - ), node) - - return regular(typeNode, node, LocalTypeInfoFlags.Optimistic) - } - case SyntaxKind.NullKeyword: - if(strictNullChecks) { - return regular(factory.createLiteralTypeNode(factory.createNull()), node); - } - else { - return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.ImplicitAny); - } - case SyntaxKind.CallExpression: - const callExpression = node as CallExpression; - if(isIdentifier(callExpression.expression) && callExpression.expression.escapedText === "Symbol") { - if(inferenceFlags & NarrowBehavior.KeepLiterals) { - return regular( - factory.createTypeOperatorNode( - SyntaxKind.UniqueKeyword, - factory.createKeywordTypeNode(SyntaxKind.SymbolKeyword) - ), - node - ) - } else { - return regular( - factory.createKeywordTypeNode(SyntaxKind.SymbolKeyword), - node - ) - } - } - case SyntaxKind.NewExpression: - const newExpr = node as NewExpression; - if(isEntityNameExpression(newExpr.expression)) { - - const typeNode = visitSyntheticType(factory.createTypeReferenceNode( - entityNameExpressionToQualifiedName(newExpr.expression), - visitNodes(newExpr.typeArguments, deepClone, isTypeNode)! - ), node); - // Optimistic since the constructor might not have the same name as the type - return regular(typeNode, node, LocalTypeInfoFlags.Optimistic); - } - return invalid(node); - case SyntaxKind.ArrowFunction: - case SyntaxKind.FunctionExpression: - const fnNode = node as FunctionExpression | ArrowFunction; - const oldEnclosingDeclaration = enclosingDeclaration; - try { - enclosingDeclaration = node; - const returnType = inferReturnType(fnNode); - const fnTypeNode = factory.createFunctionTypeNode( - visitNodes(fnNode.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone), - fnNode.parameters.map(p => deepClone(ensureParameter(p))), - returnType.typeNode, - ); - // If the return type is optimistic, teh whole function type is optimistic - const flags = mergeFlags(LocalTypeInfoFlags.None, returnType.flags) - return regular(fnTypeNode, node, flags); - } - finally { - enclosingDeclaration = oldEnclosingDeclaration; - } - case SyntaxKind.SatisfiesExpression: { - const typeNode = localInference((node as SatisfiesExpression).expression); - return { ...typeNode, flags: typeNode.flags | LocalTypeInfoFlags.Optimistic } - } - case SyntaxKind.TypeAssertionExpression: - case SyntaxKind.AsExpression: - const asExpression = node as AsExpression | TypeAssertion; - if(isTypeReferenceNode(asExpression.type) && isConst(asExpression.type)) { - return localInference(asExpression.expression, NarrowBehavior.AsConst); - } - else { - const type = visitType(asExpression.type, asExpression); - if(isLiteralTypeNode(type) && - (isNoSubstitutionTemplateLiteral(type.literal) || isStringLiteral(type.literal))) { - return regular( - factory.createLiteralTypeNode( - normalizeLiteralValue(type.literal) - ), - node - ); - } - return regular(deepClone(type), node); - } - 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 fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node); - case SyntaxKind.PlusToken: - return fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node);; - } - case SyntaxKind.BigIntLiteral: - if (prefixOp.operator === SyntaxKind.MinusToken) { - return fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node);; - } - } - } - - const targetExpressionType = localInference(prefixOp.operand, inferenceFlags); - if(isLiteralTypeNode(targetExpressionType.typeNode)) { - return { - flags: targetExpressionType.flags, - typeNode: getWidenedType(targetExpressionType), - sourceNode: node - }; - } - else if(targetExpressionType.typeNode.kind === SyntaxKind.NumberKeyword || targetExpressionType.typeNode.kind === SyntaxKind.BigIntKeyword) { - return targetExpressionType; - } - } - break; - case SyntaxKind.NumericLiteral: - return literal(node, SyntaxKind.NumberKeyword, inferenceFlags); - case SyntaxKind.TemplateExpression: - if(!(inferenceFlags & NarrowBehavior.AsConst)) { - return fresh(factory.createKeywordTypeNode(SyntaxKind.StringKeyword), node); - } - const templateExpression = node as TemplateExpression; - const templateSpans: TemplateLiteralTypeSpan[] = []; - for(const span of templateExpression.templateSpans) { - const {typeNode} = localInference(span.expression, nextInferenceFlags); - const literalSpan = factory.createTemplateLiteralTypeSpan( - typeNode, - span.literal - ); - templateSpans.push(literalSpan); - } - return regular( - factory.createTemplateLiteralType(deepClone(templateExpression.head), templateSpans), - node - ); - case SyntaxKind.NoSubstitutionTemplateLiteral: - case SyntaxKind.StringLiteral: - return literal(node, SyntaxKind.StringKeyword, inferenceFlags); - case SyntaxKind.BigIntLiteral: - return literal(node, SyntaxKind.BigIntKeyword, inferenceFlags); - case SyntaxKind.RegularExpressionLiteral: - return literal(node, "RegExp", inferenceFlags); - case SyntaxKind.JsxSelfClosingElement: - case SyntaxKind.JsxElement: - const typeReference = finalizeSyntheticTypeNode(factory.createTypeReferenceNode(getJSXElementType(node)), node.parent); - checkEntityNameVisibility(typeReference.typeName, enclosingDeclaration); - return fresh(typeReference, node); - case SyntaxKind.TrueKeyword: - case SyntaxKind.FalseKeyword: - return literal(node, SyntaxKind.BooleanKeyword, inferenceFlags); - case SyntaxKind.ArrayLiteralExpression: - const arrayLiteral = node as ArrayLiteralExpression; - const elementTypesInfo: LocalTypeInfo[] = []; - for(const element of arrayLiteral.elements) { - if(isSpreadElement(element)) { - const spreadType = localInference(element.expression, nextInferenceFlags) - const elementTypeNode = inferenceFlags & NarrowBehavior.AsConst ? - factory.createRestTypeNode(spreadType.typeNode) : - factory.createIndexedAccessTypeNode(spreadType.typeNode, factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)); - - elementTypesInfo.push( - { ...spreadType, typeNode: elementTypeNode } - ); - } - else if(isOmittedExpression(element)) { - elementTypesInfo.push( - createUndefinedTypeNode(element) - ); - } else { - elementTypesInfo.push( - localInference(element, nextInferenceFlags) - ); - } - } - if(inferenceFlags & NarrowBehavior.AsConst) { - const tupleType = factory.createTupleTypeNode( - elementTypesInfo.map(lti => lti.typeNode) - ); - tupleType.emitNode = { flags: 1, autoGenerate: undefined, internalFlags: 0 }; - return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node); - } - else { - let itemType; - if(elementTypesInfo.length === 0) { - itemType = (strictNullChecks ? factory.createKeywordTypeNode(SyntaxKind.NeverKeyword) : factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)); - } - else { - itemType = makeUnionFromTypes(node, elementTypesInfo, /*widenSingle*/ false).typeNode; - } - - return regular(factory.createArrayTypeNode(itemType), node); - } - case SyntaxKind.ObjectLiteralExpression: { - const objectLiteral = node as ObjectLiteralExpression; - const properties: TypeElement[] = []; - let addedIntersections: TypeNode[] | undefined; - - for(let propIndex =0, length = objectLiteral.properties.length; propIndex deepClone(ensureParameter(p))); - if (inferenceFlags & NarrowBehavior.AsConst) { - newProp = factory.createPropertySignature( - [factory.createModifier(SyntaxKind.ReadonlyKeyword)], - name, - /*questionToken*/ undefined, - factory.createFunctionTypeNode( - typeParameters, - parameters, - returnType.typeNode, - ) - ); - } - else { - newProp = factory.createMethodSignature( - [], - name, - /*questionToken*/ undefined, - typeParameters, - parameters, - returnType.typeNode, - ); - } - enclosingDeclaration = oldEnclosingDeclaration; - } - else if(isPropertyAssignment(prop) && name) { - const modifiers = inferenceFlags & NarrowBehavior.AsConst ? - [factory.createModifier(SyntaxKind.ReadonlyKeyword)]: - []; - newProp = factory.createPropertySignature( - modifiers, - name, - /*questionToken*/ undefined, - localInference(prop.initializer, nextInferenceFlags).typeNode - ); - } - else if(isShorthandPropertyAssignment(prop) && name) { - const modifiers = inferenceFlags & NarrowBehavior.AsConst ? - [factory.createModifier(SyntaxKind.ReadonlyKeyword)]: - []; - newProp = factory.createPropertySignature( - modifiers, - name, - /*questionToken*/ undefined, - localInference(prop.name, nextInferenceFlags).typeNode - ); - } - else if(isSpreadAssignment(prop)) { - addedIntersections ??= []; - addedIntersections.push(localInference(prop.expression, nextInferenceFlags).typeNode) - } - else { - if(isGetAccessorDeclaration(prop) || isSetAccessorDeclaration(prop)) { - const nameKey = getMemberKey(prop); - if(nameKey && name) { - const { getAccessor, setAccessor, otherAccessorIndex } = getAccessorInfo(objectLiteral.properties, prop); - if(otherAccessorIndex === -1 || otherAccessorIndex > propIndex) { - const accessorType = inferAccessorType(getAccessor, setAccessor); - const modifiers: Modifier[] = [] - if(!setAccessor) { - modifiers.push(factory.createModifier(SyntaxKind.ReadonlyKeyword)) - } - - newProp = factory.createPropertySignature( - modifiers, - name, - /*questionToken*/ undefined, - accessorType, - ); - } - } else { - return invalid(prop); - } - } else { - return invalid(prop); - } - } - - if(newProp) { - const prevPos = newProp.name.pos; - const newPos = getTokenPosOfNode(newProp.name, currentSourceFile); - - setTextRange(newProp.name, { - pos: newPos, - end: newProp.name.end - }); - setTextRange(newProp, { - pos: prevPos, - end: newProp.name.end, - }) - setCommentRange(newProp, { - pos: prevPos, - end: newProp.name.pos - }) - - properties.push(newProp) - } - } - - let typeNode: TypeNode = factory.createTypeLiteralNode(properties); - if (addedIntersections) { - if(properties.length !== 0) { - addedIntersections.push(typeNode); - } - typeNode = factory.createIntersectionTypeNode(addedIntersections); - } - return regular(typeNode, objectLiteral); - } - case SyntaxKind.ConditionalExpression: - const conditionalExpression = node as ConditionalExpression; - const types = [ - localInference(conditionalExpression.whenTrue, inferenceFlags & ~NarrowBehavior.AsConst), - localInference(conditionalExpression.whenFalse, inferenceFlags & ~NarrowBehavior.AsConst), - ] - return makeUnionFromTypes(node, types, /*widenSingle*/ false); - } - - return regular(makeInvalidTypeAndReport(node), node); - } - function invalid(node: Node): LocalTypeInfo { - return { typeNode: makeInvalidTypeAndReport(node), flags: LocalTypeInfoFlags.Invalid, sourceNode: node }; - } - function fresh(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { - return { typeNode: finalizeSyntheticTypeNode(typeNode, sourceNode.parent), flags: flags | LocalTypeInfoFlags.Fresh, sourceNode }; - } - function regular(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { - return { typeNode: finalizeSyntheticTypeNode(typeNode, sourceNode.parent), flags, sourceNode }; - } - 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(node: Node, flags = LocalTypeInfoFlags.None) { - if(strictNullChecks) { - return regular( - factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword) - , node, flags); - } - else { - return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.ImplicitAny | flags); - } - } - function literal(node: Node, baseType: string | KeywordTypeSyntaxKind, narrowBehavior: NarrowBehavior) { - if(narrowBehavior & NarrowBehavior.AsConstOrKeepLiterals) { - return fresh(factory.createLiteralTypeNode( - normalizeLiteralValue(node as LiteralExpression) - ), node); - } - else { - return fresh( - typeof baseType === "number" ? factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType), - node - ); - } - } - function isConst(typeReference: TypeReferenceNode) { - return isIdentifier(typeReference.typeName) && typeReference.typeName.escapedText === "const"; - } - function makeInvalidTypeAndReport(node: Node) { - reportIsolatedDeclarationError(node); - return makeInvalidType() as TypeReferenceNode; - } - function visitType(type: TypeNode | undefined, owner: Node) { - const visitedType = visitNode(type, visitDeclarationSubtree, isTypeNode); - return visitedType ?? makeInvalidTypeAndReport(owner); - } - - function getMemberKey(member: MethodSignature | PropertySignature | GetAccessorDeclaration | SetAccessorDeclaration) { - if(isIdentifier(member.name)) { - return "I:" + member.name.escapedText; - } - if(isStringLiteral(member.name)) { - return "S:" + member.name.text - } - if(isNumericLiteral(member.name)) { - return "N:" + (+member.name.text) - } - if(isComputedPropertyName(member.name)) { - let fullId = "C:"; - let computedName = member.name.expression; - // We only support dotted identifiers as property keys - while(true) { - if(isIdentifier(computedName)) { - fullId += computedName.escapedText; - break; - } - else if(isPropertyAccessExpression(computedName)) { - fullId += computedName.name.escapedText; - computedName = computedName.expression; - } - else { - // Can't compute a property key, bail - return undefined; - } - } - return fullId; - } - return undefined; - } - - function getWidenedType(localTypeInfo: LocalTypeInfo) { - if((localTypeInfo.flags & LocalTypeInfoFlags.Fresh) && isLiteralTypeNode(localTypeInfo.typeNode)) { - const literal = localTypeInfo.typeNode.literal; - return ( - literal.kind === SyntaxKind.StringLiteral ? factory.createKeywordTypeNode(SyntaxKind.StringKeyword) : - literal.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : - literal.kind === SyntaxKind.PrefixUnaryExpression && (literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : - literal.kind === SyntaxKind.BigIntLiteral ? factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword) : - literal.kind === SyntaxKind.TrueKeyword || literal.kind === SyntaxKind.FalseKeyword ? factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword) : - localTypeInfo.typeNode - ); - } - - return localTypeInfo.typeNode; - } - function makeUnionFromTypes(sourceNode: Node, types: LocalTypeInfo[], widenSingle: boolean) { - types = deduplicateUnion(types); - if(types.length === 1) { - const localType = types[0]; - return widenSingle ? { ... localType, typeNode: getWidenedType(localType) }: localType; - } - const unionConstituents = collapseLiteralTypesIntoBaseTypes(types); - - normalizeObjectUnion(unionConstituents); - return regular( - unionConstituents.length === 1? unionConstituents[0]: factory.createUnionTypeNode(unionConstituents), - sourceNode, - LocalTypeInfoFlags.Optimistic - ); - - function collapseLiteralTypesIntoBaseTypes(nodes: LocalTypeInfo[]) { - enum CollapsibleTypes { - None = 0, - String = 1 << 1, - Number = 1 << 2, - True = 1 << 3, - False = 1 << 4, - Boolean = True | False, - BigInt = 1 << 5, - Any = 1 << 7, - ImplicitAny = 1 << 8 - } - let baseTypes = CollapsibleTypes.None; - let literalTypes = CollapsibleTypes.None; - for(const type of nodes) { - switch(type.typeNode.kind) { - case SyntaxKind.TemplateLiteralType: - literalTypes |= CollapsibleTypes.String; - break; - case SyntaxKind.AnyKeyword: - if(type.flags & LocalTypeInfoFlags.ImplicitAny) { - literalTypes |= CollapsibleTypes.ImplicitAny; - } - else { - baseTypes |= CollapsibleTypes.Any; - } - break; - case SyntaxKind.BooleanKeyword: - baseTypes |= CollapsibleTypes.Boolean; - break; - case SyntaxKind.StringKeyword: - baseTypes |= CollapsibleTypes.String; - break; - case SyntaxKind.NumberKeyword: - baseTypes |= CollapsibleTypes.Number; - break; - case SyntaxKind.BigIntKeyword: - baseTypes |= CollapsibleTypes.BigInt; - break; - case SyntaxKind.LiteralType: - const literalType = type.typeNode as LiteralTypeNode; - switch(literalType.literal.kind) { - case SyntaxKind.TrueKeyword: - literalTypes |= CollapsibleTypes.True; - break; - case SyntaxKind.FalseKeyword: - literalTypes |= CollapsibleTypes.False; - break; - case SyntaxKind.NumericLiteral: - literalTypes |= CollapsibleTypes.Number; - break; - case SyntaxKind.PrefixUnaryExpression: - if((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { - literalTypes |= CollapsibleTypes.Number; - } - break; - case SyntaxKind.StringLiteral: - case SyntaxKind.NoSubstitutionTemplateLiteral: - case SyntaxKind.TemplateExpression: - literalTypes |= CollapsibleTypes.String; - break; - case SyntaxKind.BigIntLiteral: - literalTypes |= CollapsibleTypes.BigInt; - break; - } - } - } - // If true and false are both present, act as if we found boolean itself - if((literalTypes & CollapsibleTypes.Boolean) === CollapsibleTypes.Boolean) { - baseTypes |= CollapsibleTypes.Boolean; - } - const typesToCollapse = baseTypes & literalTypes; - - if(baseTypes & CollapsibleTypes.Any) { - return [factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)]; - } - // Nothing to collapse or reorder - if(baseTypes === CollapsibleTypes.None) return nodes.map(n => n.typeNode); - const result: TypeNode[] = []; - - // We do a best effort to preserve TS union order for primitives - if(baseTypes & CollapsibleTypes.String) { - result.push(factory.createKeywordTypeNode(SyntaxKind.StringKeyword)); - } - if(baseTypes & CollapsibleTypes.Number) { - result.push(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)); - } - if(baseTypes & CollapsibleTypes.Boolean) { - result.push(factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword)); - } - if(baseTypes & CollapsibleTypes.BigInt) { - result.push(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword)); - } - if(!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.True) { - result.push(factory.createLiteralTypeNode(factory.createTrue())); - } - if(!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.False) { - result.push(factory.createLiteralTypeNode(factory.createFalse())); - } - - for(const type of nodes) { - let typeofNode = CollapsibleTypes.None; - - switch(type.typeNode.kind) { - case SyntaxKind.BooleanKeyword: - case SyntaxKind.StringKeyword: - case SyntaxKind.NumberKeyword: - case SyntaxKind.BigIntKeyword: - case SyntaxKind.AnyKeyword: - // They were already added - continue; - case SyntaxKind.TemplateLiteralType: - typeofNode = CollapsibleTypes.String; - break; - case SyntaxKind.LiteralType: - const literalType = type.typeNode as LiteralTypeNode; - switch(literalType.literal.kind) { - case SyntaxKind.TrueKeyword: - continue; - case SyntaxKind.FalseKeyword: - continue; - case SyntaxKind.NumericLiteral: - typeofNode = CollapsibleTypes.Number; - break; - case SyntaxKind.PrefixUnaryExpression: - if((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { - typeofNode = CollapsibleTypes.Number; - } - break; - case SyntaxKind.StringLiteral: - case SyntaxKind.NoSubstitutionTemplateLiteral: - case SyntaxKind.TemplateExpression: - typeofNode = CollapsibleTypes.String; - break; - case SyntaxKind.BigIntLiteral: - typeofNode = CollapsibleTypes.BigInt; - break; - } - } - // Not a node of interest, do not change - if((typeofNode & typesToCollapse) === 0) { - result.push(type.typeNode); - } - } - return result; - } - function deduplicateUnion(nodes: LocalTypeInfo[]) { - const typeInfoCache = new Map - }>(); - const union: LocalTypeInfo[] = []; - let implicitAnyNode: LocalTypeInfo | undefined; - for(const node of nodes) { - // Do not add implicit any unless it's the only type in the array - if(!strictNullChecks && node.flags & LocalTypeInfoFlags.ImplicitAny) { - implicitAnyNode = node; - continue; - } - const existing = union.find(u => typesEqual(node.typeNode, node.sourceNode, u.typeNode, u.sourceNode)); - if(existing === undefined) { - union.push(node); - } - else { - existing.flags &= node.flags; - } - } - if(union.length === 0 && implicitAnyNode) { - union.push(implicitAnyNode); - } - return union; - - function getTypeInfo(type: TypeLiteralNode, errorTarget: Node | undefined) { - const typeNodeId = getNodeId(type); - let typeInfo = typeInfoCache.get(typeNodeId); - if(typeInfo) return typeInfo; - - typeInfo = { - node: type, - members: new Map() - }; - for(const member of type.members) { - const isMethod = isMethodSignature(member); - const isProp = isPropertySignature(member); - if(isMethod || isProp) { - const memberKey = getMemberKey(member); - if (memberKey === undefined) { - makeInvalidTypeAndReport(errorTarget ?? member); - break; - } - typeInfo.members.set(memberKey, member); - } - else { - makeInvalidTypeAndReport(errorTarget ?? member); - } - } - typeInfoCache.set(typeNodeId, typeInfo); - return typeInfo; - } - function entityNameEqual(aTypeName: EntityName, bTypeName: EntityName) { - while(true) { - if(aTypeName.kind === SyntaxKind.QualifiedName && bTypeName.kind === SyntaxKind.QualifiedName) { - if(aTypeName.right.escapedText !== bTypeName.right.escapedText) return false; - aTypeName = aTypeName.left; - bTypeName = bTypeName.left; - } - else if(aTypeName.kind === SyntaxKind.Identifier && bTypeName.kind === SyntaxKind.Identifier) { - return aTypeName.escapedText === bTypeName.escapedText; - } - else { - return false; - } - } - } - function signatureEqual(a:SignatureDeclaration, aErrorTarget: Node | undefined, b: SignatureDeclaration, bErrorTarget: Node | undefined) { - if(!typesEqual(a.type, aErrorTarget, b.type, bErrorTarget)) { - return false; - } - if(a.parameters.length !== b.parameters.length) { - return false; - } - - return a.parameters.every((aParam, index) => isParameterEqual(aParam, b.parameters[index])); - - // Isolated declarations finish equality - function isParameterEqual(a: ParameterDeclaration, b: ParameterDeclaration) { - if(!!a.questionToken !== !!b.questionToken) { - return false; - } - return typesEqual(a.type, aErrorTarget, b.type, bErrorTarget); - } - } - function nodeTypeArgumentsEqual(a: NodeWithTypeArguments, aErrorTarget: Node | undefined, b: NodeWithTypeArguments, bErrorTarget: Node | undefined) { - if(a.typeArguments === undefined && b.typeArguments === undefined) { - return true; - } - if(a.typeArguments?.length !== b.typeArguments?.length) { - return false; - } - - return !!a.typeArguments?.every((aArg, index) => typesEqual(aArg, aErrorTarget, b.typeArguments?.[index], bErrorTarget)) - } - function typesEqual(a: TypeNode | undefined, aErrorTarget: Node | undefined, b: TypeNode | undefined, bErrorTarget: Node | undefined): boolean { - if (a === undefined || b === undefined) return a === b; - if (a.kind !== b.kind) return false; - switch(a.kind) { - case SyntaxKind.AnyKeyword: - case SyntaxKind.UnknownKeyword: - case SyntaxKind.NumberKeyword: - case SyntaxKind.BigIntKeyword: - case SyntaxKind.ObjectKeyword: - case SyntaxKind.BooleanKeyword: - case SyntaxKind.StringKeyword: - case SyntaxKind.SymbolKeyword: - case SyntaxKind.VoidKeyword: - case SyntaxKind.UndefinedKeyword: - case SyntaxKind.NeverKeyword: - return true; - } - if(isLiteralTypeNode(a) && isLiteralTypeNode(b)) { - let aLiteral = a.literal; - let bLiteral = b.literal; - while(true) { - switch(aLiteral.kind) { - case SyntaxKind.NullKeyword: - case SyntaxKind.TrueKeyword: - case SyntaxKind.FalseKeyword: - return aLiteral.kind === bLiteral.kind; - case SyntaxKind.NumericLiteral: - return aLiteral.kind === bLiteral.kind && +aLiteral.text === +(bLiteral).text; - case SyntaxKind.StringLiteral: - case SyntaxKind.NoSubstitutionTemplateLiteral: - return (bLiteral.kind === SyntaxKind.StringLiteral || bLiteral.kind === SyntaxKind.NoSubstitutionTemplateLiteral) - && aLiteral.text === (bLiteral).text; - case SyntaxKind.PrefixUnaryExpression: - const aUnary = (aLiteral as PrefixUnaryExpression); - const bUnary = (bLiteral as PrefixUnaryExpression); - if(aUnary.operator !== bUnary.operator) return false; - - aLiteral = aUnary.operand as LiteralExpression; - bLiteral = bUnary.operand as LiteralExpression; - return +aLiteral.text === +bLiteral.text; - default: - return false; - } - } - } - else if(isArrayTypeNode(a) && isArrayTypeNode(b)) { - return typesEqual(a.elementType, aErrorTarget, b.elementType, bErrorTarget); - } - else if(isTypeReferenceNode(a) && isTypeReferenceNode(b)) { - if(!entityNameEqual(a.typeName, b.typeName)) { - return false; - } - return nodeTypeArgumentsEqual(a, aErrorTarget, b, bErrorTarget); - } - else if(isTypeLiteralNode(a) && isTypeLiteralNode(b)) { - if(a.members.length !== b.members.length) return false; - const aTypeInfo = getTypeInfo(a, aErrorTarget); - if(!aTypeInfo) return false; - - for(const bMember of b.members) { - const bIsMethod = isMethodSignature(bMember); - const bIsProp = isPropertySignature(bMember); - if(bIsMethod || bIsProp) { - const memberKey = getMemberKey(bMember); - if (memberKey === undefined) { - makeInvalidTypeAndReport(bErrorTarget ?? bMember); - break; - } - const aMember = aTypeInfo.members.get(memberKey); - if(!aMember) return false; - if((aMember.questionToken !== undefined) !== (bMember.questionToken !== undefined)) return false; - if (getSyntacticModifierFlags(aMember) !== getSyntacticModifierFlags(bMember)) return false; - if(bIsProp && isPropertySignature(aMember)) { - if(!typesEqual(aMember.type, aErrorTarget, bMember.type, bErrorTarget)) { - return false; - } - } - else if(bIsMethod && isMethodSignature(aMember)) { - return signatureEqual(aMember, aErrorTarget, bMember, bErrorTarget) - } - } - else { - makeInvalidTypeAndReport(bErrorTarget ?? bMember); - } - } - return true; - } - else if(isFunctionTypeNode(a) && isFunctionTypeNode(b)) { - return signatureEqual(a, aErrorTarget, b, bErrorTarget); - } - else if(isConstructorTypeNode(a) && isConstructorTypeNode(b)) { - return signatureEqual(a, aErrorTarget, b, bErrorTarget); - } - else if(isTypeQueryNode(a) && isTypeQueryNode(b)) { - if(!entityNameEqual(a.exprName, b.exprName)) { - return false; - } - return nodeTypeArgumentsEqual(a, aErrorTarget, b, bErrorTarget); - } - else { - return false; - } - } - } - function normalizeObjectUnion(nodes: (TypeNode | undefined)[]) { - const allProps = new Map(); - const allTypeLookup = new Array | undefined>(); - let hasChanged = false; - for (let i = 0; i< nodes.length; i++) { - const type = nodes[i]; - const typeLookup = new Map(); - allTypeLookup.push(typeLookup); - - if(!type || !isTypeLiteralNode(type)) continue; - for(const member of type.members){ - const isMethod = isMethodSignature(member); - const isProp = isPropertySignature(member); - if(isMethod || isProp) { - const memberKey = getMemberKey(member); - if(memberKey === undefined) { - nodes[i] = makeInvalidTypeAndReport(member.name); - allTypeLookup[i] = undefined; - hasChanged = true; - break; - } - let type; - if(isProp) { - type = member.type ?? makeInvalidTypeAndReport(member); - } - else { - type = factory.createFunctionTypeNode( - member.typeParameters, - member.parameters, - member.type!, - ); - } - let propInfo = allProps.get(memberKey); - if(!propInfo) { - propInfo = { - types: new Array(nodes.length), - name: member.name, - isReadonly: false, - }; - allProps.set(memberKey, propInfo); - } - propInfo.types[i] = type; - propInfo.isReadonly ||= !!(getSyntacticModifierFlags(member) & ModifierFlags.Readonly) - typeLookup.set(memberKey, type); - } - else { - nodes[i] = makeInvalidTypeAndReport(member); - allTypeLookup[i] = undefined; - hasChanged = true; - break; - } - } - } - for(const [, propTypes] of allProps) { - normalizeObjectUnion(propTypes.types); - } - for(let typeIndex = 0; typeIndex< nodes.length; typeIndex++) { - const type = nodes[typeIndex]; - const props = allTypeLookup[typeIndex]; - if(!type || !isTypeLiteralNode(type) || !props) continue; - - let newMembers: TypeElement[] | undefined; - for(const [commonProp, propInfo] of allProps) { - const propType = props.get(commonProp); - if(propType) { - if(propType !== propInfo.types[typeIndex]) { - const indexOfProp = findIndex(type.members, e => isPropertySignature(e) && getMemberKey(e) === commonProp); - if(indexOfProp !== -1) { - if(newMembers === undefined) { - newMembers = [...type.members]; - } - const existingMember = type.members[indexOfProp] as PropertySignature; - newMembers[indexOfProp] = factory.createPropertySignature( - existingMember.modifiers, - existingMember.name, - existingMember.questionToken, - propInfo.types[typeIndex] - ); - } - } - } - else { - if(newMembers === undefined) { - newMembers = [...type.members]; - } - newMembers.push(factory.createPropertySignature( - propInfo.isReadonly ? [factory.createToken(SyntaxKind.ReadonlyKeyword)] : undefined, - deepClone(propInfo.name), - factory.createToken(SyntaxKind.QuestionToken), - factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), - )); - } - } - if (newMembers) { - hasChanged = true; - nodes[typeIndex] = factory.createTypeLiteralNode(newMembers); - } - } - return hasChanged; - } - } - function inferReturnType(node: FunctionLikeDeclaration) { - if(node.type) { - return regular(deepClone(visitType(node.type, node)), node); - } - if(!node.body) { - return regular(makeInvalidTypeAndReport(node), node); - } - - const returnStatements: ReturnStatement[] = []; - const yieldExpressions: YieldExpression[] = []; - - let returnType; - if(!isBlock(node.body)) { - returnType = localInference(node.body, NarrowBehavior.KeepLiterals); - } - else { - collectReturnAndYield(node.body, returnStatements, yieldExpressions); - if(returnStatements.length === 0) { - returnType = regular(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), node); - } - else { - returnType = inferFromOutputs(node, returnStatements, node.asteriskToken ? SyntaxKind.NeverKeyword : SyntaxKind.VoidKeyword); - } - } - let yieldType: LocalTypeInfo | undefined; - if(node.asteriskToken) { - if(yieldExpressions.length === 0) { - yieldType = regular( - factory.createKeywordTypeNode(SyntaxKind.NeverKeyword), - node - ); - } - else { - yieldType = inferFromOutputs(node, yieldExpressions, strictNullChecks ?SyntaxKind.UndefinedKeyword: SyntaxKind.AnyKeyword); - } - } - return makeFinalReturnType(node, returnType, yieldType); - - function inferFromOutputs(node: Node, statements: (YieldExpression | ReturnStatement )[], emptyType: KeywordTypeSyntaxKind) { - const returnStatementInference: LocalTypeInfo[] = []; - let hasOnlyEmpty = true; - for(let r of statements) { - if(r.expression) { - returnStatementInference.push(localInference(r.expression, NarrowBehavior.KeepLiterals)); - hasOnlyEmpty = false; - }else { - returnStatementInference.push( - createUndefinedTypeNode(r, LocalTypeInfoFlags.Fresh) - ); - } - }; - if(hasOnlyEmpty) { - return fresh(factory.createKeywordTypeNode(emptyType), node); - }else { - return makeUnionFromTypes(node, returnStatementInference, /*widenSingle*/ true); - } - } - function makeFinalReturnType(node: FunctionLikeDeclaration, returnType: LocalTypeInfo, yieldType: LocalTypeInfo | undefined) { - const modifiers = getEffectiveModifierFlags(node); - if(node.asteriskToken) { - const yieldTypeNode = yieldType?.typeNode ?? factory.createKeywordTypeNode(SyntaxKind.VoidKeyword); - return regular( - factory.createTypeReferenceNode( - factory.createIdentifier(modifiers & ModifierFlags.Async ? "AsyncGenerator": "Generator"), - [yieldTypeNode, returnType.typeNode, factory.createKeywordTypeNode(SyntaxKind.UnknownKeyword)], - ), - returnType.sourceNode, - returnType.flags - ); - } - else if(modifiers & ModifierFlags.Async) { - return regular( - factory.createTypeReferenceNode( - factory.createIdentifier("Promise"), - [returnType.typeNode], - ), - returnType.sourceNode, - returnType.flags - ); - } - return returnType; - } - function collectReturnAndYield(node: Node, result: ReturnStatement[], yieldExpressions: YieldExpression[]) { - forEachChild(node, child => { - if(isReturnStatement(child)) { - result.push(child); - } - if(isYieldExpression(child)) { - yieldExpressions.push(child); - } - if(isClassLike(child) || isFunctionLike(child)) { - return; - } - // TODO: Do not walk all children if not generator function - collectReturnAndYield(child, result, yieldExpressions); - }); - } - } - function inferFunctionMembers(scope: { statements: NodeArray }, functionName: Identifier, localType: LocalTypeInfo): LocalTypeInfo { - if(!isFunctionTypeNode(localType.typeNode)) return localType; - let inferredMembers: TypeElement[] | undefined; - for(let i = 0; i< scope.statements.length; i++) { - const statement = scope.statements[i]; - // Looking for name functionName.member = init; - if(isExpressionStatement(statement) - && isBinaryExpression(statement.expression) - && isPropertyAccessExpression(statement.expression.left) - && isIdentifier(statement.expression.left.expression) - && statement.expression.left.expression.escapedText === functionName.escapedText) { - (inferredMembers ??= []).push(factory.createPropertySignature( - [], - statement.expression.left.name, - undefined, - localInference(statement.expression.right).typeNode - )); - } - } - if(inferredMembers) { - inferredMembers.push( - factory.createCallSignature( - localType.typeNode.typeParameters, - localType.typeNode.parameters, - localType.typeNode.type - ) - ); - return { - sourceNode: localType.sourceNode, - flags: localType.flags, - typeNode: factory.createTypeLiteralNode( - inferredMembers - ), - } - } - return localType; - } - - // Copied similar function in checker. Maybe a reusable one should be created. - 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 localInferenceFromInitializer(node: HasInferredType | ExportAssignment): TypeNode | undefined { - if(NO_LOCAL_INFERENCE) { - return undefined; - } - let localType; - let actualTypeNode: Node = node; - if(isExportAssignment(node) && node.expression) { - localType = localInference(node.expression); - actualTypeNode = node.expression; - } - else if(isParameter(node) && node.initializer) { - localType = localInference(node.initializer); - } - else if(isVariableDeclaration(node) && node.initializer) { - - localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals: NarrowBehavior.None); - if(isVariableStatement(node.parent.parent) && - node.parent.flags & NodeFlags.Const && - isIdentifier(node.name) && - (isBlock(node.parent.parent.parent) || isSourceFile(node.parent.parent.parent))) { - localType = inferFunctionMembers(node.parent.parent.parent, node.name, localType); - } - } - else if(isPropertyDeclaration(node) && node.initializer) { - localType = localInference(node.initializer); - } - else if(isFunctionDeclaration(node)) { - localType = inferReturnType(node); - } - else if(isMethodDeclaration(node)) { - localType = inferReturnType(node); - } - else if(isGetAccessorDeclaration(node)) { - localType = inferReturnType(node); - } - if(localType) { - const typeNode = localType.typeNode; - setParent(typeNode, node); - const result = resolver.isSyntheticTypeEquivalent(actualTypeNode, typeNode, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit); - if(result !== true) { - result.forEach(r => context.addDiagnostic(r as DiagnosticWithLocation)); - // we should add the extra diagnostics here - return makeInvalidType(); - } - } - return localType?.typeNode; - } 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) @@ -2125,13 +806,8 @@ export function transformDeclarations(context: TransformationContext) { return; } if (isolatedDeclarations) { - if (type === undefined) { - const localType = localInferenceFromInitializer(node); - if (localType !== undefined) { - return localType; - } - reportIsolatedDeclarationError(node); - return makeInvalidType(); + if (type === undefined && localInferenceResolver) { + return localInferenceResolver.fromInitializer(node, currentSourceFile) } return visitNode(type, visitDeclarationSubtree, isTypeNode); } @@ -2768,7 +1444,7 @@ export function transformDeclarations(context: TransformationContext) { }); errorFallbackNode = input; const type = isolatedDeclarations ? - localInferenceFromInitializer(input) ?? makeInvalidTypeAndReport(input) : + localInferenceResolver?.fromInitializer(input, currentSourceFile) : resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker); const varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, type, /*initializer*/ undefined); errorFallbackNode = undefined; diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts new file mode 100644 index 0000000000000..21caaf3703f0f --- /dev/null +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -0,0 +1,1335 @@ +import { getNodeId } from "../../checker"; +import { findIndex } from "../../core"; +import { Debug } from "../../debug"; +import { Diagnostics } from "../../diagnosticInformationMap.generated"; +import { setCommentRange } from "../../factory/emitNode"; +import { factory } from "../../factory/nodeFactory"; +import { isIdentifier, isPropertyAccessExpression, isQualifiedName, isGetAccessorDeclaration, isSetAccessorDeclaration, isTypeParameterDeclaration, isTypeReferenceNode, isLiteralTypeNode, isNoSubstitutionTemplateLiteral, isStringLiteral, isSpreadElement, isOmittedExpression, isComputedPropertyName, isMethodDeclaration, isPropertyAssignment, isShorthandPropertyAssignment, isSpreadAssignment, isNumericLiteral, isMethodSignature, isPropertySignature, isArrayTypeNode, isTypeLiteralNode, isFunctionTypeNode, isConstructorTypeNode, isTypeQueryNode, isBlock, isReturnStatement, isYieldExpression, isExpressionStatement, isBinaryExpression, isExportAssignment, isParameter, isVariableDeclaration, isVariableStatement, isSourceFile, isPropertyDeclaration, isFunctionDeclaration } from "../../factory/nodeTests"; +import { setTextRange } from "../../factory/utilitiesPublic"; +import { forEachChildRecursively, forEachChild } from "../../parser"; +import { nullTransformationContext } from "../../transformer"; +import { TypeNode, Node, EntityName, EntityNameOrEntityNameExpression, NodeFlags, NodeArray, ObjectLiteralElementLike, SetAccessorDeclaration, GetAccessorDeclaration, SyntaxKind, ParenthesizedExpression, QualifiedName, Identifier, CallExpression, NewExpression, FunctionExpression, ArrowFunction, SatisfiesExpression, AsExpression, TypeAssertion, PrefixUnaryExpression, TemplateExpression, TemplateLiteralTypeSpan, ArrayLiteralExpression, ObjectLiteralExpression, TypeElement, Modifier, ConditionalExpression, LiteralExpression, KeywordTypeSyntaxKind, TypeReferenceNode, MethodSignature, PropertySignature, LiteralTypeNode, TypeLiteralNode, SignatureDeclaration, ParameterDeclaration, NodeWithTypeArguments, PropertyName, ModifierFlags, FunctionLikeDeclaration, ReturnStatement, YieldExpression, Statement, Visitor, ExportAssignment, DiagnosticWithLocation, VisitResult, SourceFile, HasInferredType, TransformationContext } from "../../types"; +import { setParent, isEntityNameExpression, getTokenPosOfNode, getSyntacticModifierFlags, getEffectiveModifierFlags, createDiagnosticForNode } from "../../utilities"; +import { isTypeNode, isPropertyName, isClassLike, isFunctionLike } from "../../utilitiesPublic"; +import { visitNode, visitNodes, visitEachChild } from "../../visitorPublic"; + + +const NO_LOCAL_INFERENCE = !!process.env.NO_LOCAL_INFERENCE; +enum NarrowBehavior { + None = 0, + AsConst = 1, + KeepLiterals = 2, + AsConstOrKeepLiterals = AsConst | KeepLiterals, + NotKeepLiterals = ~KeepLiterals, +} + +enum LocalTypeInfoFlags { + None = 0, + Fresh = 1 << 0, + ImplicitAny = 1<< 1, + Invalid = 1 << 2, + Optimistic = 1 << 3, +} + +interface LocalInferenceResolver { + makeInvalidType(): Node; + fromInitializer(node: HasInferredType | ExportAssignment, sourceFile: SourceFile): TypeNode; +} +export function createLocalInferenceResolver({ + setLocalInferenceTargetNode, + setEnclosingDeclarations, + visitDeclarationSubtree, + checkEntityNameVisibility, + ensureParameter, + context, +}: { + setLocalInferenceTargetNode(node: Node | undefined): Node | undefined; + setEnclosingDeclarations(node: Node): Node; + visitDeclarationSubtree(input: Node): VisitResult + checkEntityNameVisibility(name: EntityNameOrEntityNameExpression, container?: Node): void; + ensureParameter(p: ParameterDeclaration): ParameterDeclaration; + + context: TransformationContext +}): LocalInferenceResolver | undefined { + let currentSourceFile: SourceFile | undefined; + const options = context.getCompilerOptions(); + if (!options.isolatedDeclarations) { + return undefined; + } + const resolver = context.getEmitResolver(); + const strictNullChecks = !!options.strict || !!options.strictNullChecks; + + return { + fromInitializer(node: HasInferredType, sourceFile: SourceFile) { + const oldSourceFile = currentSourceFile; + currentSourceFile = sourceFile; + try { + const localType = localInferenceFromInitializer(node); + if (localType !== undefined) { + return localType ?? makeInvalidType(); + } + reportIsolatedDeclarationError(node); + return makeInvalidType(); + } finally { + currentSourceFile = oldSourceFile; + } + }, + makeInvalidType, + }; + function reportIsolatedDeclarationError(node: Node) { + const message = createDiagnosticForNode( + node, + Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit + ); + context.addDiagnostic(message); + } + + function makeInvalidType() { + return factory.createTypeReferenceNode("invalid"); + } + + interface LocalTypeInfo { typeNode: TypeNode, sourceNode: Node, flags: LocalTypeInfoFlags } + // We need to see about getting the JSX element type. + function getJSXElementType(_node: Node): EntityName { + return factory.createQualifiedName( + factory.createQualifiedName( + factory.createIdentifier("React"), + factory.createIdentifier("JSX"), + ), + factory.createIdentifier("Element"), + ); + } + function entityNameExpressionToQualifiedName(node:EntityNameOrEntityNameExpression): EntityName { + if(isIdentifier(node)) { + return setTextRange(factory.cloneNode(node), node); + } + else if(isPropertyAccessExpression(node)) { + return setTextRange(factory.createQualifiedName( + entityNameExpressionToQualifiedName(node.expression), + factory.cloneNode(node.name) + ), node); + } + else if(isQualifiedName(node)) { + return setTextRange(factory.createQualifiedName( + entityNameExpressionToQualifiedName(node), + factory.cloneNode(node.right) + ), node); + } + throw Error("Should not happen"); + } + + function isSyntheticTypeNode(node: Node): node is TypeNode { + return isTypeNode(node) && !!(node.flags & NodeFlags.Synthesized); + } + function finalizeSyntheticTypeNode(typeNode: T, parent: Node): T { + if(typeNode && typeNode.parent !== parent) { + setParent(typeNode, parent); + // Ensure no non synthetic nodes make it in here + Debug.assert(typeNode.flags & NodeFlags.Synthesized) + forEachChildRecursively(typeNode, (child, parent) => { + Debug.assert(typeNode.flags & NodeFlags.Synthesized); + if(child.parent === parent) { + return "skip"; + } + setParent(child, parent); + }); + } + return typeNode as T & { isSynthetic: true }; + } + function visitSyntheticType(typeNode: TypeNode, node: Node) { + const previousLocalInferenceTargetNode = setLocalInferenceTargetNode(node); + try { + let visitedNode = visitNode(finalizeSyntheticTypeNode(typeNode, node), visitDeclarationSubtree, isSyntheticTypeNode); + Debug.assert(visitedNode); + return visitedNode; + } finally { + setLocalInferenceTargetNode(previousLocalInferenceTargetNode); + } + } + + function mergeFlags(existing: LocalTypeInfoFlags, newFlags: LocalTypeInfoFlags): LocalTypeInfoFlags { + return existing | (newFlags | LocalTypeInfoFlags.Optimistic); + } + function getAccessorInfo(properties: NodeArray, knownAccessor: SetAccessorDeclaration | GetAccessorDeclaration) { + const nameKey = getMemberKey(knownAccessor); + const knownIsGetAccessor = isGetAccessorDeclaration(knownAccessor); + const otherAccessorTest = knownIsGetAccessor ? isSetAccessorDeclaration: isGetAccessorDeclaration; + const otherAccessorIndex = properties.findIndex(n => otherAccessorTest(n) && getMemberKey(n) === nameKey); + const otherAccessor = properties[otherAccessorIndex] as SetAccessorDeclaration | GetAccessorDeclaration | undefined; + + + const getAccessor = knownIsGetAccessor ? knownAccessor: + otherAccessor && isGetAccessorDeclaration(otherAccessor)? otherAccessor: + undefined; + const setAccessor = !knownIsGetAccessor ? knownAccessor: + otherAccessor && isSetAccessorDeclaration(otherAccessor)? otherAccessor: + undefined; + + + return { + otherAccessorIndex, + otherAccessor, + getAccessor, + setAccessor, + } + } + function inferAccessorType(getAccessor?: GetAccessorDeclaration, setAccessor?: SetAccessorDeclaration) { + + let accessorType = getAccessor?.type && deepClone(visitType(getAccessor?.type, getAccessor)); + + if(!accessorType && setAccessor) { + accessorType = setAccessor.parameters[0].type; + accessorType = accessorType && deepClone(visitType(accessorType, setAccessor)); + } + + if(!accessorType && getAccessor) { + const localPropType = inferReturnType(getAccessor) + accessorType = localPropType.typeNode; + } + + return accessorType ?? makeInvalidType(); + } + function localInference(node: Node, inferenceFlags: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { + const nextInferenceFlags = inferenceFlags & NarrowBehavior.NotKeepLiterals; + switch(node.kind) { + case SyntaxKind.ParenthesizedExpression: + return localInference((node as ParenthesizedExpression).expression, inferenceFlags); + case SyntaxKind.QualifiedName: + const typeNode = visitSyntheticType(factory.createTypeQueryNode( + entityNameExpressionToQualifiedName(node as QualifiedName) + ), node); + + return regular( + typeNode, + node, + LocalTypeInfoFlags.Optimistic + ) + case SyntaxKind.PropertyAccessExpression: + if(isEntityNameExpression(node)) { + const typeNode = visitSyntheticType(factory.createTypeQueryNode( + entityNameExpressionToQualifiedName(node) + ), node); + return regular( + typeNode, + node, + LocalTypeInfoFlags.Optimistic + ) + } + break; + case SyntaxKind.Identifier: { + if((node as Identifier).escapedText === "undefined") { + return createUndefinedTypeNode(node); + } + const typeNode = visitSyntheticType(factory.createTypeQueryNode( + deepClone(node as Identifier) + ), node) + + return regular(typeNode, node, LocalTypeInfoFlags.Optimistic) + } + case SyntaxKind.NullKeyword: + if(strictNullChecks) { + return regular(factory.createLiteralTypeNode(factory.createNull()), node); + } + else { + return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.ImplicitAny); + } + case SyntaxKind.CallExpression: + const callExpression = node as CallExpression; + if(isIdentifier(callExpression.expression) && callExpression.expression.escapedText === "Symbol") { + if(inferenceFlags & NarrowBehavior.KeepLiterals) { + return regular( + factory.createTypeOperatorNode( + SyntaxKind.UniqueKeyword, + factory.createKeywordTypeNode(SyntaxKind.SymbolKeyword) + ), + node + ) + } else { + return regular( + factory.createKeywordTypeNode(SyntaxKind.SymbolKeyword), + node + ) + } + } + case SyntaxKind.NewExpression: + const newExpr = node as NewExpression; + if(isEntityNameExpression(newExpr.expression)) { + + const typeNode = visitSyntheticType(factory.createTypeReferenceNode( + entityNameExpressionToQualifiedName(newExpr.expression), + visitNodes(newExpr.typeArguments, deepClone, isTypeNode)! + ), node); + // Optimistic since the constructor might not have the same name as the type + return regular(typeNode, node, LocalTypeInfoFlags.Optimistic); + } + return invalid(node); + case SyntaxKind.ArrowFunction: + case SyntaxKind.FunctionExpression: + const fnNode = node as FunctionExpression | ArrowFunction; + const oldEnclosingDeclaration = setEnclosingDeclarations(node); + try { + const returnType = inferReturnType(fnNode); + const fnTypeNode = factory.createFunctionTypeNode( + visitNodes(fnNode.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone), + fnNode.parameters.map(p => deepClone(ensureParameter(p))), + returnType.typeNode, + ); + // If the return type is optimistic, teh whole function type is optimistic + const flags = mergeFlags(LocalTypeInfoFlags.None, returnType.flags) + return regular(fnTypeNode, node, flags); + } + finally { + setEnclosingDeclarations(oldEnclosingDeclaration); + } + case SyntaxKind.SatisfiesExpression: { + const typeNode = localInference((node as SatisfiesExpression).expression); + return { ...typeNode, flags: typeNode.flags | LocalTypeInfoFlags.Optimistic } + } + case SyntaxKind.TypeAssertionExpression: + case SyntaxKind.AsExpression: + const asExpression = node as AsExpression | TypeAssertion; + if(isTypeReferenceNode(asExpression.type) && isConst(asExpression.type)) { + return localInference(asExpression.expression, NarrowBehavior.AsConst); + } + else { + const type = visitType(asExpression.type, asExpression); + if(isLiteralTypeNode(type) && + (isNoSubstitutionTemplateLiteral(type.literal) || isStringLiteral(type.literal))) { + return regular( + factory.createLiteralTypeNode( + normalizeLiteralValue(type.literal) + ), + node + ); + } + return regular(deepClone(type), node); + } + 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 fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node); + case SyntaxKind.PlusToken: + return fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node);; + } + case SyntaxKind.BigIntLiteral: + if (prefixOp.operator === SyntaxKind.MinusToken) { + return fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node);; + } + } + } + + const targetExpressionType = localInference(prefixOp.operand, inferenceFlags); + if(isLiteralTypeNode(targetExpressionType.typeNode)) { + return { + flags: targetExpressionType.flags, + typeNode: getWidenedType(targetExpressionType), + sourceNode: node + }; + } + else if(targetExpressionType.typeNode.kind === SyntaxKind.NumberKeyword || targetExpressionType.typeNode.kind === SyntaxKind.BigIntKeyword) { + return targetExpressionType; + } + } + break; + case SyntaxKind.NumericLiteral: + return literal(node, SyntaxKind.NumberKeyword, inferenceFlags); + case SyntaxKind.TemplateExpression: + if(!(inferenceFlags & NarrowBehavior.AsConst)) { + return fresh(factory.createKeywordTypeNode(SyntaxKind.StringKeyword), node); + } + const templateExpression = node as TemplateExpression; + const templateSpans: TemplateLiteralTypeSpan[] = []; + for(const span of templateExpression.templateSpans) { + const {typeNode} = localInference(span.expression, nextInferenceFlags); + const literalSpan = factory.createTemplateLiteralTypeSpan( + typeNode, + span.literal + ); + templateSpans.push(literalSpan); + } + return regular( + factory.createTemplateLiteralType(deepClone(templateExpression.head), templateSpans), + node + ); + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.StringLiteral: + return literal(node, SyntaxKind.StringKeyword, inferenceFlags); + case SyntaxKind.BigIntLiteral: + return literal(node, SyntaxKind.BigIntKeyword, inferenceFlags); + case SyntaxKind.RegularExpressionLiteral: + return literal(node, "RegExp", inferenceFlags); + case SyntaxKind.JsxSelfClosingElement: + case SyntaxKind.JsxElement: + const typeReference = finalizeSyntheticTypeNode(factory.createTypeReferenceNode(getJSXElementType(node)), node.parent); + checkEntityNameVisibility(typeReference.typeName); + return fresh(typeReference, node); + case SyntaxKind.TrueKeyword: + case SyntaxKind.FalseKeyword: + return literal(node, SyntaxKind.BooleanKeyword, inferenceFlags); + case SyntaxKind.ArrayLiteralExpression: + const arrayLiteral = node as ArrayLiteralExpression; + const elementTypesInfo: LocalTypeInfo[] = []; + for(const element of arrayLiteral.elements) { + if(isSpreadElement(element)) { + const spreadType = localInference(element.expression, nextInferenceFlags) + const elementTypeNode = inferenceFlags & NarrowBehavior.AsConst ? + factory.createRestTypeNode(spreadType.typeNode) : + factory.createIndexedAccessTypeNode(spreadType.typeNode, factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)); + + elementTypesInfo.push( + { ...spreadType, typeNode: elementTypeNode } + ); + } + else if(isOmittedExpression(element)) { + elementTypesInfo.push( + createUndefinedTypeNode(element) + ); + } else { + elementTypesInfo.push( + localInference(element, nextInferenceFlags) + ); + } + } + if(inferenceFlags & NarrowBehavior.AsConst) { + const tupleType = factory.createTupleTypeNode( + elementTypesInfo.map(lti => lti.typeNode) + ); + tupleType.emitNode = { flags: 1, autoGenerate: undefined, internalFlags: 0 }; + return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node); + } + else { + let itemType; + if(elementTypesInfo.length === 0) { + itemType = (strictNullChecks ? factory.createKeywordTypeNode(SyntaxKind.NeverKeyword) : factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)); + } + else { + itemType = makeUnionFromTypes(node, elementTypesInfo, /*widenSingle*/ false).typeNode; + } + + return regular(factory.createArrayTypeNode(itemType), node); + } + case SyntaxKind.ObjectLiteralExpression: { + const objectLiteral = node as ObjectLiteralExpression; + const properties: TypeElement[] = []; + let addedIntersections: TypeNode[] | undefined; + + for(let propIndex =0, length = objectLiteral.properties.length; propIndex deepClone(ensureParameter(p))); + if (inferenceFlags & NarrowBehavior.AsConst) { + newProp = factory.createPropertySignature( + [factory.createModifier(SyntaxKind.ReadonlyKeyword)], + name, + /*questionToken*/ undefined, + factory.createFunctionTypeNode( + typeParameters, + parameters, + returnType.typeNode, + ) + ); + } + else { + newProp = factory.createMethodSignature( + [], + name, + /*questionToken*/ undefined, + typeParameters, + parameters, + returnType.typeNode, + ); + } + } finally { + setEnclosingDeclarations(oldEnclosingDeclaration); + } + } + else if(isPropertyAssignment(prop) && name) { + const modifiers = inferenceFlags & NarrowBehavior.AsConst ? + [factory.createModifier(SyntaxKind.ReadonlyKeyword)]: + []; + newProp = factory.createPropertySignature( + modifiers, + name, + /*questionToken*/ undefined, + localInference(prop.initializer, nextInferenceFlags).typeNode + ); + } + else if(isShorthandPropertyAssignment(prop) && name) { + const modifiers = inferenceFlags & NarrowBehavior.AsConst ? + [factory.createModifier(SyntaxKind.ReadonlyKeyword)]: + []; + newProp = factory.createPropertySignature( + modifiers, + name, + /*questionToken*/ undefined, + localInference(prop.name, nextInferenceFlags).typeNode + ); + } + else if(isSpreadAssignment(prop)) { + addedIntersections ??= []; + addedIntersections.push(localInference(prop.expression, nextInferenceFlags).typeNode) + } + else { + if(isGetAccessorDeclaration(prop) || isSetAccessorDeclaration(prop)) { + const nameKey = getMemberKey(prop); + if(nameKey && name) { + const { getAccessor, setAccessor, otherAccessorIndex } = getAccessorInfo(objectLiteral.properties, prop); + if(otherAccessorIndex === -1 || otherAccessorIndex > propIndex) { + const accessorType = inferAccessorType(getAccessor, setAccessor); + const modifiers: Modifier[] = [] + if(!setAccessor) { + modifiers.push(factory.createModifier(SyntaxKind.ReadonlyKeyword)) + } + + newProp = factory.createPropertySignature( + modifiers, + name, + /*questionToken*/ undefined, + accessorType, + ); + } + } else { + return invalid(prop); + } + } else { + return invalid(prop); + } + } + + if(newProp) { + const prevPos = newProp.name.pos; + const newPos = getTokenPosOfNode(newProp.name, currentSourceFile); + + setTextRange(newProp.name, { + pos: newPos, + end: newProp.name.end + }); + setTextRange(newProp, { + pos: prevPos, + end: newProp.name.end, + }) + setCommentRange(newProp, { + pos: prevPos, + end: newProp.name.pos + }) + + properties.push(newProp) + } + } + + let typeNode: TypeNode = factory.createTypeLiteralNode(properties); + if (addedIntersections) { + if(properties.length !== 0) { + addedIntersections.push(typeNode); + } + typeNode = factory.createIntersectionTypeNode(addedIntersections); + } + return regular(typeNode, objectLiteral); + } + case SyntaxKind.ConditionalExpression: + const conditionalExpression = node as ConditionalExpression; + const types = [ + localInference(conditionalExpression.whenTrue, inferenceFlags & ~NarrowBehavior.AsConst), + localInference(conditionalExpression.whenFalse, inferenceFlags & ~NarrowBehavior.AsConst), + ] + return makeUnionFromTypes(node, types, /*widenSingle*/ false); + } + + return regular(makeInvalidTypeAndReport(node), node); + } + function invalid(node: Node): LocalTypeInfo { + return { typeNode: makeInvalidTypeAndReport(node), flags: LocalTypeInfoFlags.Invalid, sourceNode: node }; + } + function fresh(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { + return { typeNode: finalizeSyntheticTypeNode(typeNode, sourceNode.parent), flags: flags | LocalTypeInfoFlags.Fresh, sourceNode }; + } + function regular(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { + return { typeNode: finalizeSyntheticTypeNode(typeNode, sourceNode.parent), flags, sourceNode }; + } + 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(node: Node, flags = LocalTypeInfoFlags.None) { + if(strictNullChecks) { + return regular( + factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword) + , node, flags); + } + else { + return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.ImplicitAny | flags); + } + } + function literal(node: Node, baseType: string | KeywordTypeSyntaxKind, narrowBehavior: NarrowBehavior) { + if(narrowBehavior & NarrowBehavior.AsConstOrKeepLiterals) { + return fresh(factory.createLiteralTypeNode( + normalizeLiteralValue(node as LiteralExpression) + ), node); + } + else { + return fresh( + typeof baseType === "number" ? factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType), + node + ); + } + } + function isConst(typeReference: TypeReferenceNode) { + return isIdentifier(typeReference.typeName) && typeReference.typeName.escapedText === "const"; + } + function makeInvalidTypeAndReport(node: Node) { + reportIsolatedDeclarationError(node); + return makeInvalidType() as TypeReferenceNode; + } + function visitType(type: TypeNode | undefined, owner: Node) { + const visitedType = visitNode(type, visitDeclarationSubtree, isTypeNode); + return visitedType ?? makeInvalidTypeAndReport(owner); + } + + function getMemberKey(member: MethodSignature | PropertySignature | GetAccessorDeclaration | SetAccessorDeclaration) { + if(isIdentifier(member.name)) { + return "I:" + member.name.escapedText; + } + if(isStringLiteral(member.name)) { + return "S:" + member.name.text + } + if(isNumericLiteral(member.name)) { + return "N:" + (+member.name.text) + } + if(isComputedPropertyName(member.name)) { + let fullId = "C:"; + let computedName = member.name.expression; + // We only support dotted identifiers as property keys + while(true) { + if(isIdentifier(computedName)) { + fullId += computedName.escapedText; + break; + } + else if(isPropertyAccessExpression(computedName)) { + fullId += computedName.name.escapedText; + computedName = computedName.expression; + } + else { + // Can't compute a property key, bail + return undefined; + } + } + return fullId; + } + return undefined; + } + + function getWidenedType(localTypeInfo: LocalTypeInfo) { + if((localTypeInfo.flags & LocalTypeInfoFlags.Fresh) && isLiteralTypeNode(localTypeInfo.typeNode)) { + const literal = localTypeInfo.typeNode.literal; + return ( + literal.kind === SyntaxKind.StringLiteral ? factory.createKeywordTypeNode(SyntaxKind.StringKeyword) : + literal.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : + literal.kind === SyntaxKind.PrefixUnaryExpression && (literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : + literal.kind === SyntaxKind.BigIntLiteral ? factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword) : + literal.kind === SyntaxKind.TrueKeyword || literal.kind === SyntaxKind.FalseKeyword ? factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword) : + localTypeInfo.typeNode + ); + } + + return localTypeInfo.typeNode; + } + function makeUnionFromTypes(sourceNode: Node, types: LocalTypeInfo[], widenSingle: boolean) { + types = deduplicateUnion(types); + if(types.length === 1) { + const localType = types[0]; + return widenSingle ? { ... localType, typeNode: getWidenedType(localType) }: localType; + } + const unionConstituents = collapseLiteralTypesIntoBaseTypes(types); + + normalizeObjectUnion(unionConstituents); + return regular( + unionConstituents.length === 1? unionConstituents[0]: factory.createUnionTypeNode(unionConstituents), + sourceNode, + LocalTypeInfoFlags.Optimistic + ); + + function collapseLiteralTypesIntoBaseTypes(nodes: LocalTypeInfo[]) { + enum CollapsibleTypes { + None = 0, + String = 1 << 1, + Number = 1 << 2, + True = 1 << 3, + False = 1 << 4, + Boolean = True | False, + BigInt = 1 << 5, + Any = 1 << 7, + ImplicitAny = 1 << 8 + } + let baseTypes = CollapsibleTypes.None; + let literalTypes = CollapsibleTypes.None; + for(const type of nodes) { + switch(type.typeNode.kind) { + case SyntaxKind.TemplateLiteralType: + literalTypes |= CollapsibleTypes.String; + break; + case SyntaxKind.AnyKeyword: + if(type.flags & LocalTypeInfoFlags.ImplicitAny) { + literalTypes |= CollapsibleTypes.ImplicitAny; + } + else { + baseTypes |= CollapsibleTypes.Any; + } + break; + case SyntaxKind.BooleanKeyword: + baseTypes |= CollapsibleTypes.Boolean; + break; + case SyntaxKind.StringKeyword: + baseTypes |= CollapsibleTypes.String; + break; + case SyntaxKind.NumberKeyword: + baseTypes |= CollapsibleTypes.Number; + break; + case SyntaxKind.BigIntKeyword: + baseTypes |= CollapsibleTypes.BigInt; + break; + case SyntaxKind.LiteralType: + const literalType = type.typeNode as LiteralTypeNode; + switch(literalType.literal.kind) { + case SyntaxKind.TrueKeyword: + literalTypes |= CollapsibleTypes.True; + break; + case SyntaxKind.FalseKeyword: + literalTypes |= CollapsibleTypes.False; + break; + case SyntaxKind.NumericLiteral: + literalTypes |= CollapsibleTypes.Number; + break; + case SyntaxKind.PrefixUnaryExpression: + if((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { + literalTypes |= CollapsibleTypes.Number; + } + break; + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.TemplateExpression: + literalTypes |= CollapsibleTypes.String; + break; + case SyntaxKind.BigIntLiteral: + literalTypes |= CollapsibleTypes.BigInt; + break; + } + } + } + // If true and false are both present, act as if we found boolean itself + if((literalTypes & CollapsibleTypes.Boolean) === CollapsibleTypes.Boolean) { + baseTypes |= CollapsibleTypes.Boolean; + } + const typesToCollapse = baseTypes & literalTypes; + + if(baseTypes & CollapsibleTypes.Any) { + return [factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)]; + } + // Nothing to collapse or reorder + if(baseTypes === CollapsibleTypes.None) return nodes.map(n => n.typeNode); + const result: TypeNode[] = []; + + // We do a best effort to preserve TS union order for primitives + if(baseTypes & CollapsibleTypes.String) { + result.push(factory.createKeywordTypeNode(SyntaxKind.StringKeyword)); + } + if(baseTypes & CollapsibleTypes.Number) { + result.push(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)); + } + if(baseTypes & CollapsibleTypes.Boolean) { + result.push(factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword)); + } + if(baseTypes & CollapsibleTypes.BigInt) { + result.push(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword)); + } + if(!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.True) { + result.push(factory.createLiteralTypeNode(factory.createTrue())); + } + if(!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.False) { + result.push(factory.createLiteralTypeNode(factory.createFalse())); + } + + for(const type of nodes) { + let typeofNode = CollapsibleTypes.None; + + switch(type.typeNode.kind) { + case SyntaxKind.BooleanKeyword: + case SyntaxKind.StringKeyword: + case SyntaxKind.NumberKeyword: + case SyntaxKind.BigIntKeyword: + case SyntaxKind.AnyKeyword: + // They were already added + continue; + case SyntaxKind.TemplateLiteralType: + typeofNode = CollapsibleTypes.String; + break; + case SyntaxKind.LiteralType: + const literalType = type.typeNode as LiteralTypeNode; + switch(literalType.literal.kind) { + case SyntaxKind.TrueKeyword: + continue; + case SyntaxKind.FalseKeyword: + continue; + case SyntaxKind.NumericLiteral: + typeofNode = CollapsibleTypes.Number; + break; + case SyntaxKind.PrefixUnaryExpression: + if((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { + typeofNode = CollapsibleTypes.Number; + } + break; + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.TemplateExpression: + typeofNode = CollapsibleTypes.String; + break; + case SyntaxKind.BigIntLiteral: + typeofNode = CollapsibleTypes.BigInt; + break; + } + } + // Not a node of interest, do not change + if((typeofNode & typesToCollapse) === 0) { + result.push(type.typeNode); + } + } + return result; + } + function deduplicateUnion(nodes: LocalTypeInfo[]) { + const typeInfoCache = new Map + }>(); + const union: LocalTypeInfo[] = []; + let implicitAnyNode: LocalTypeInfo | undefined; + for(const node of nodes) { + // Do not add implicit any unless it's the only type in the array + if(!strictNullChecks && node.flags & LocalTypeInfoFlags.ImplicitAny) { + implicitAnyNode = node; + continue; + } + const existing = union.find(u => typesEqual(node.typeNode, node.sourceNode, u.typeNode, u.sourceNode)); + if(existing === undefined) { + union.push(node); + } + else { + existing.flags &= node.flags; + } + } + if(union.length === 0 && implicitAnyNode) { + union.push(implicitAnyNode); + } + return union; + + function getTypeInfo(type: TypeLiteralNode, errorTarget: Node | undefined) { + const typeNodeId = getNodeId(type); + let typeInfo = typeInfoCache.get(typeNodeId); + if(typeInfo) return typeInfo; + + typeInfo = { + node: type, + members: new Map() + }; + for(const member of type.members) { + const isMethod = isMethodSignature(member); + const isProp = isPropertySignature(member); + if(isMethod || isProp) { + const memberKey = getMemberKey(member); + if (memberKey === undefined) { + makeInvalidTypeAndReport(errorTarget ?? member); + break; + } + typeInfo.members.set(memberKey, member); + } + else { + makeInvalidTypeAndReport(errorTarget ?? member); + } + } + typeInfoCache.set(typeNodeId, typeInfo); + return typeInfo; + } + function entityNameEqual(aTypeName: EntityName, bTypeName: EntityName) { + while(true) { + if(aTypeName.kind === SyntaxKind.QualifiedName && bTypeName.kind === SyntaxKind.QualifiedName) { + if(aTypeName.right.escapedText !== bTypeName.right.escapedText) return false; + aTypeName = aTypeName.left; + bTypeName = bTypeName.left; + } + else if(aTypeName.kind === SyntaxKind.Identifier && bTypeName.kind === SyntaxKind.Identifier) { + return aTypeName.escapedText === bTypeName.escapedText; + } + else { + return false; + } + } + } + function signatureEqual(a:SignatureDeclaration, aErrorTarget: Node | undefined, b: SignatureDeclaration, bErrorTarget: Node | undefined) { + if(!typesEqual(a.type, aErrorTarget, b.type, bErrorTarget)) { + return false; + } + if(a.parameters.length !== b.parameters.length) { + return false; + } + + return a.parameters.every((aParam, index) => isParameterEqual(aParam, b.parameters[index])); + + // Isolated declarations finish equality + function isParameterEqual(a: ParameterDeclaration, b: ParameterDeclaration) { + if(!!a.questionToken !== !!b.questionToken) { + return false; + } + return typesEqual(a.type, aErrorTarget, b.type, bErrorTarget); + } + } + function nodeTypeArgumentsEqual(a: NodeWithTypeArguments, aErrorTarget: Node | undefined, b: NodeWithTypeArguments, bErrorTarget: Node | undefined) { + if(a.typeArguments === undefined && b.typeArguments === undefined) { + return true; + } + if(a.typeArguments?.length !== b.typeArguments?.length) { + return false; + } + + return !!a.typeArguments?.every((aArg, index) => typesEqual(aArg, aErrorTarget, b.typeArguments?.[index], bErrorTarget)) + } + function typesEqual(a: TypeNode | undefined, aErrorTarget: Node | undefined, b: TypeNode | undefined, bErrorTarget: Node | undefined): boolean { + if (a === undefined || b === undefined) return a === b; + if (a.kind !== b.kind) return false; + switch(a.kind) { + case SyntaxKind.AnyKeyword: + case SyntaxKind.UnknownKeyword: + case SyntaxKind.NumberKeyword: + case SyntaxKind.BigIntKeyword: + case SyntaxKind.ObjectKeyword: + case SyntaxKind.BooleanKeyword: + case SyntaxKind.StringKeyword: + case SyntaxKind.SymbolKeyword: + case SyntaxKind.VoidKeyword: + case SyntaxKind.UndefinedKeyword: + case SyntaxKind.NeverKeyword: + return true; + } + if(isLiteralTypeNode(a) && isLiteralTypeNode(b)) { + let aLiteral = a.literal; + let bLiteral = b.literal; + while(true) { + switch(aLiteral.kind) { + case SyntaxKind.NullKeyword: + case SyntaxKind.TrueKeyword: + case SyntaxKind.FalseKeyword: + return aLiteral.kind === bLiteral.kind; + case SyntaxKind.NumericLiteral: + return aLiteral.kind === bLiteral.kind && +aLiteral.text === +(bLiteral).text; + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + return (bLiteral.kind === SyntaxKind.StringLiteral || bLiteral.kind === SyntaxKind.NoSubstitutionTemplateLiteral) + && aLiteral.text === (bLiteral).text; + case SyntaxKind.PrefixUnaryExpression: + const aUnary = (aLiteral as PrefixUnaryExpression); + const bUnary = (bLiteral as PrefixUnaryExpression); + if(aUnary.operator !== bUnary.operator) return false; + + aLiteral = aUnary.operand as LiteralExpression; + bLiteral = bUnary.operand as LiteralExpression; + return +aLiteral.text === +bLiteral.text; + default: + return false; + } + } + } + else if(isArrayTypeNode(a) && isArrayTypeNode(b)) { + return typesEqual(a.elementType, aErrorTarget, b.elementType, bErrorTarget); + } + else if(isTypeReferenceNode(a) && isTypeReferenceNode(b)) { + if(!entityNameEqual(a.typeName, b.typeName)) { + return false; + } + return nodeTypeArgumentsEqual(a, aErrorTarget, b, bErrorTarget); + } + else if(isTypeLiteralNode(a) && isTypeLiteralNode(b)) { + if(a.members.length !== b.members.length) return false; + const aTypeInfo = getTypeInfo(a, aErrorTarget); + if(!aTypeInfo) return false; + + for(const bMember of b.members) { + const bIsMethod = isMethodSignature(bMember); + const bIsProp = isPropertySignature(bMember); + if(bIsMethod || bIsProp) { + const memberKey = getMemberKey(bMember); + if (memberKey === undefined) { + makeInvalidTypeAndReport(bErrorTarget ?? bMember); + break; + } + const aMember = aTypeInfo.members.get(memberKey); + if(!aMember) return false; + if((aMember.questionToken !== undefined) !== (bMember.questionToken !== undefined)) return false; + if (getSyntacticModifierFlags(aMember) !== getSyntacticModifierFlags(bMember)) return false; + if(bIsProp && isPropertySignature(aMember)) { + if(!typesEqual(aMember.type, aErrorTarget, bMember.type, bErrorTarget)) { + return false; + } + } + else if(bIsMethod && isMethodSignature(aMember)) { + return signatureEqual(aMember, aErrorTarget, bMember, bErrorTarget) + } + } + else { + makeInvalidTypeAndReport(bErrorTarget ?? bMember); + } + } + return true; + } + else if(isFunctionTypeNode(a) && isFunctionTypeNode(b)) { + return signatureEqual(a, aErrorTarget, b, bErrorTarget); + } + else if(isConstructorTypeNode(a) && isConstructorTypeNode(b)) { + return signatureEqual(a, aErrorTarget, b, bErrorTarget); + } + else if(isTypeQueryNode(a) && isTypeQueryNode(b)) { + if(!entityNameEqual(a.exprName, b.exprName)) { + return false; + } + return nodeTypeArgumentsEqual(a, aErrorTarget, b, bErrorTarget); + } + else { + return false; + } + } + } + function normalizeObjectUnion(nodes: (TypeNode | undefined)[]) { + const allProps = new Map(); + const allTypeLookup = new Array | undefined>(); + let hasChanged = false; + for (let i = 0; i< nodes.length; i++) { + const type = nodes[i]; + const typeLookup = new Map(); + allTypeLookup.push(typeLookup); + + if(!type || !isTypeLiteralNode(type)) continue; + for(const member of type.members){ + const isMethod = isMethodSignature(member); + const isProp = isPropertySignature(member); + if(isMethod || isProp) { + const memberKey = getMemberKey(member); + if(memberKey === undefined) { + nodes[i] = makeInvalidTypeAndReport(member.name); + allTypeLookup[i] = undefined; + hasChanged = true; + break; + } + let type; + if(isProp) { + type = member.type ?? makeInvalidTypeAndReport(member); + } + else { + type = factory.createFunctionTypeNode( + member.typeParameters, + member.parameters, + member.type!, + ); + } + let propInfo = allProps.get(memberKey); + if(!propInfo) { + propInfo = { + types: new Array(nodes.length), + name: member.name, + isReadonly: false, + }; + allProps.set(memberKey, propInfo); + } + propInfo.types[i] = type; + propInfo.isReadonly ||= !!(getSyntacticModifierFlags(member) & ModifierFlags.Readonly) + typeLookup.set(memberKey, type); + } + else { + nodes[i] = makeInvalidTypeAndReport(member); + allTypeLookup[i] = undefined; + hasChanged = true; + break; + } + } + } + for(const [, propTypes] of allProps) { + normalizeObjectUnion(propTypes.types); + } + for(let typeIndex = 0; typeIndex< nodes.length; typeIndex++) { + const type = nodes[typeIndex]; + const props = allTypeLookup[typeIndex]; + if(!type || !isTypeLiteralNode(type) || !props) continue; + + let newMembers: TypeElement[] | undefined; + for(const [commonProp, propInfo] of allProps) { + const propType = props.get(commonProp); + if(propType) { + if(propType !== propInfo.types[typeIndex]) { + const indexOfProp = findIndex(type.members, e => isPropertySignature(e) && getMemberKey(e) === commonProp); + if(indexOfProp !== -1) { + if(newMembers === undefined) { + newMembers = [...type.members]; + } + const existingMember = type.members[indexOfProp] as PropertySignature; + newMembers[indexOfProp] = factory.createPropertySignature( + existingMember.modifiers, + existingMember.name, + existingMember.questionToken, + propInfo.types[typeIndex] + ); + } + } + } + else { + if(newMembers === undefined) { + newMembers = [...type.members]; + } + newMembers.push(factory.createPropertySignature( + propInfo.isReadonly ? [factory.createToken(SyntaxKind.ReadonlyKeyword)] : undefined, + deepClone(propInfo.name), + factory.createToken(SyntaxKind.QuestionToken), + factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), + )); + } + } + if (newMembers) { + hasChanged = true; + nodes[typeIndex] = factory.createTypeLiteralNode(newMembers); + } + } + return hasChanged; + } + } + function inferReturnType(node: FunctionLikeDeclaration) { + if(node.type) { + return regular(deepClone(visitType(node.type, node)), node); + } + if(!node.body) { + return regular(makeInvalidTypeAndReport(node), node); + } + + const returnStatements: ReturnStatement[] = []; + const yieldExpressions: YieldExpression[] = []; + + let returnType; + if(!isBlock(node.body)) { + returnType = localInference(node.body, NarrowBehavior.KeepLiterals); + } + else { + collectReturnAndYield(node.body, returnStatements, yieldExpressions); + if(returnStatements.length === 0) { + returnType = regular(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), node); + } + else { + returnType = inferFromOutputs(node, returnStatements, node.asteriskToken ? SyntaxKind.NeverKeyword : SyntaxKind.VoidKeyword); + } + } + let yieldType: LocalTypeInfo | undefined; + if(node.asteriskToken) { + if(yieldExpressions.length === 0) { + yieldType = regular( + factory.createKeywordTypeNode(SyntaxKind.NeverKeyword), + node + ); + } + else { + yieldType = inferFromOutputs(node, yieldExpressions, strictNullChecks ?SyntaxKind.UndefinedKeyword: SyntaxKind.AnyKeyword); + } + } + return makeFinalReturnType(node, returnType, yieldType); + + function inferFromOutputs(node: Node, statements: (YieldExpression | ReturnStatement )[], emptyType: KeywordTypeSyntaxKind) { + const returnStatementInference: LocalTypeInfo[] = []; + let hasOnlyEmpty = true; + for(let r of statements) { + if(r.expression) { + returnStatementInference.push(localInference(r.expression, NarrowBehavior.KeepLiterals)); + hasOnlyEmpty = false; + }else { + returnStatementInference.push( + createUndefinedTypeNode(r, LocalTypeInfoFlags.Fresh) + ); + } + }; + if(hasOnlyEmpty) { + return fresh(factory.createKeywordTypeNode(emptyType), node); + }else { + return makeUnionFromTypes(node, returnStatementInference, /*widenSingle*/ true); + } + } + function makeFinalReturnType(node: FunctionLikeDeclaration, returnType: LocalTypeInfo, yieldType: LocalTypeInfo | undefined) { + const modifiers = getEffectiveModifierFlags(node); + if(node.asteriskToken) { + const yieldTypeNode = yieldType?.typeNode ?? factory.createKeywordTypeNode(SyntaxKind.VoidKeyword); + return regular( + factory.createTypeReferenceNode( + factory.createIdentifier(modifiers & ModifierFlags.Async ? "AsyncGenerator": "Generator"), + [yieldTypeNode, returnType.typeNode, factory.createKeywordTypeNode(SyntaxKind.UnknownKeyword)], + ), + returnType.sourceNode, + returnType.flags + ); + } + else if(modifiers & ModifierFlags.Async) { + return regular( + factory.createTypeReferenceNode( + factory.createIdentifier("Promise"), + [returnType.typeNode], + ), + returnType.sourceNode, + returnType.flags + ); + } + return returnType; + } + function collectReturnAndYield(node: Node, result: ReturnStatement[], yieldExpressions: YieldExpression[]) { + forEachChild(node, child => { + if(isReturnStatement(child)) { + result.push(child); + } + if(isYieldExpression(child)) { + yieldExpressions.push(child); + } + if(isClassLike(child) || isFunctionLike(child)) { + return; + } + // TODO: Do not walk all children if not generator function + collectReturnAndYield(child, result, yieldExpressions); + }); + } + } + function inferFunctionMembers(scope: { statements: NodeArray }, functionName: Identifier, localType: LocalTypeInfo): LocalTypeInfo { + if(!isFunctionTypeNode(localType.typeNode)) return localType; + let inferredMembers: TypeElement[] | undefined; + for(let i = 0; i< scope.statements.length; i++) { + const statement = scope.statements[i]; + // Looking for name functionName.member = init; + if(isExpressionStatement(statement) + && isBinaryExpression(statement.expression) + && isPropertyAccessExpression(statement.expression.left) + && isIdentifier(statement.expression.left.expression) + && statement.expression.left.expression.escapedText === functionName.escapedText) { + (inferredMembers ??= []).push(factory.createPropertySignature( + [], + statement.expression.left.name, + undefined, + localInference(statement.expression.right).typeNode + )); + } + } + if(inferredMembers) { + inferredMembers.push( + factory.createCallSignature( + localType.typeNode.typeParameters, + localType.typeNode.parameters, + localType.typeNode.type + ) + ); + return { + sourceNode: localType.sourceNode, + flags: localType.flags, + typeNode: factory.createTypeLiteralNode( + inferredMembers + ), + } + } + return localType; + } + + // Copied similar function in checker. Maybe a reusable one should be created. + 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 localInferenceFromInitializer(node: HasInferredType | ExportAssignment): TypeNode | undefined { + if(NO_LOCAL_INFERENCE) { + return undefined; + } + let localType; + let actualTypeNode: Node = node; + if(isExportAssignment(node) && node.expression) { + localType = localInference(node.expression); + actualTypeNode = node.expression; + } + else if(isParameter(node) && node.initializer) { + localType = localInference(node.initializer); + } + else if(isVariableDeclaration(node) && node.initializer) { + + localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals: NarrowBehavior.None); + if(isVariableStatement(node.parent.parent) && + node.parent.flags & NodeFlags.Const && + isIdentifier(node.name) && + (isBlock(node.parent.parent.parent) || isSourceFile(node.parent.parent.parent))) { + localType = inferFunctionMembers(node.parent.parent.parent, node.name, localType); + } + } + else if(isPropertyDeclaration(node) && node.initializer) { + localType = localInference(node.initializer); + } + else if(isFunctionDeclaration(node)) { + localType = inferReturnType(node); + } + else if(isMethodDeclaration(node)) { + localType = inferReturnType(node); + } + else if(isGetAccessorDeclaration(node)) { + localType = inferReturnType(node); + } + if(localType) { + const typeNode = localType.typeNode; + setParent(typeNode, node); + const result = resolver.isSyntheticTypeEquivalent(actualTypeNode, typeNode, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit); + if(result !== true) { + result.forEach(r => context.addDiagnostic(r as DiagnosticWithLocation)); + // we should add the extra diagnostics here + return makeInvalidType(); + } + } + return localType?.typeNode; + } +} \ No newline at end of file diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 2980a18fa512c..14f5a4959b095 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1376,6 +1376,20 @@ export type HasIllegalModifiers = | NamespaceExportDeclaration ; + +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. * From 0162acf7fbf7d8da13a51970110873321e74b222 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 21 Jun 2023 13:58:28 +0100 Subject: [PATCH 021/224] Updated external emitter. --- .../src/compiler/declaration-emit.ts | 903 +---------- .../src/compiler/emit-binder.ts | 4 + .../src/compiler/emit-resolver.ts | 3 + .../src/compiler/localInferenceResolver.ts | 1354 +++++++++++++++++ .../src/compiler/path-utils.ts | 1 + .../src/compiler/perf-tracer.ts | 29 + .../src/compiler/transform-file.ts | 26 +- .../src/compiler/transform-project.ts | 64 + external-declarations/src/compiler/types.ts | 45 +- external-declarations/src/main.ts | 38 +- .../src/test-runner/utils.ts | 8 +- .../binder/re-exported-import-visibility.ts | 2 +- .../source/expando-functions-expressions.ts | 2 + .../not-supported-sugegstions.ts | 24 + .../local-inference/array-literal-const.ts | 9 +- .../local-inference/array-literal-mutable.ts | 35 +- .../tests/source/local-inference/class.ts | 3 + .../source/local-inference/default-export.ts | 21 + .../expressions-with-assertions.ts | 3 + .../local-inference/function-expression.ts | 3 + .../generic-nested-function.ts | 14 + .../local-inference/literals-as-const.ts | 3 + .../source/local-inference/literals-const.ts | 3 + .../tests/source/local-inference/literals.ts | 3 + .../mark-const-contaner-as-used.ts | 15 + .../tests/source/local-inference/new-type.ts | 25 +- .../local-inference/object-generic-methods.ts | 2 +- .../source/local-inference/object-literal.ts | 51 + .../return-types-function-declarations.ts | 216 ++- .../return-types-function-expressions.ts | 56 + .../local-inference/return-types-methods.ts | 21 + .../return-types-object-methods.ts | 37 + .../tests/source/local-inference/scratch.ts | 27 +- .../tests/source/local-inference/ternary.ts | 45 + .../tests/source/local-inference/typeof.ts | 61 + .../tests/source/tsconfig.json | 2 +- 36 files changed, 2147 insertions(+), 1011 deletions(-) create mode 100644 external-declarations/src/compiler/localInferenceResolver.ts create mode 100644 external-declarations/src/compiler/perf-tracer.ts create mode 100644 external-declarations/src/compiler/transform-project.ts create mode 100644 external-declarations/tests/source/expando-functions-expressions.ts create mode 100644 external-declarations/tests/source/local-inference-not-supported/not-supported-sugegstions.ts create mode 100644 external-declarations/tests/source/local-inference/default-export.ts create mode 100644 external-declarations/tests/source/local-inference/generic-nested-function.ts create mode 100644 external-declarations/tests/source/local-inference/mark-const-contaner-as-used.ts create mode 100644 external-declarations/tests/source/local-inference/return-types-object-methods.ts create mode 100644 external-declarations/tests/source/local-inference/ternary.ts create mode 100644 external-declarations/tests/source/local-inference/typeof.ts diff --git a/external-declarations/src/compiler/declaration-emit.ts b/external-declarations/src/compiler/declaration-emit.ts index 350c1b082834a..5ae6b097d167e 100644 --- a/external-declarations/src/compiler/declaration-emit.ts +++ b/external-declarations/src/compiler/declaration-emit.ts @@ -1,34 +1,12 @@ -import { Symbol, SourceFile, DiagnosticWithLocation, factory, CommentRange, Node, getParseTreeNode, SyntaxKind, SignatureDeclaration, ParameterDeclaration, getTrailingCommentRanges, getLeadingCommentRanges, NodeBuilderFlags, VisitResult, ExportAssignment, DeclarationName, Declaration, ModuleDeclaration, SymbolFlags, getNameOfDeclaration, isExportAssignment, Bundle, visitNodes, setTextRange, createUnparsedSourceFile, FileReference, NodeArray, Statement, isExternalModule, isImportEqualsDeclaration, isExternalModuleReference, isStringLiteralLike, isImportDeclaration, isStringLiteral, UnparsedSource, isUnparsedSource, BindingName, ArrayBindingElement, isIdentifier, ModifierFlags, TypeNode, FunctionDeclaration, MethodDeclaration, GetAccessorDeclaration, SetAccessorDeclaration, BindingElement, ConstructSignatureDeclaration, VariableDeclaration, MethodSignature, CallSignatureDeclaration, PropertyDeclaration, PropertySignature, visitNode, isPropertySignature, NamedDeclaration, isFunctionDeclaration, OmittedExpression, isOmittedExpression, AccessorDeclaration, isSetAccessorDeclaration, TypeParameterDeclaration, isSourceFile, isTypeAliasDeclaration, isModuleDeclaration, isClassDeclaration, isInterfaceDeclaration, isFunctionLike, isIndexSignatureDeclaration, isMappedTypeNode, EntityNameOrEntityNameExpression, setCommentRange, getCommentRange, ImportEqualsDeclaration, ImportDeclaration, ExportDeclaration, ImportTypeNode, StringLiteral, AssertClause, isSemicolonClassElement, isMethodDeclaration, isMethodSignature, isTypeQueryNode, isEntityName, visitEachChild, isPrivateIdentifier, isTypeNode, isTupleTypeNode, getLineAndCharacterOfPosition, setEmitFlags, EmitFlags, setOriginalNode, GeneratedIdentifierFlags, NodeFlags, canHaveModifiers, isTypeParameterDeclaration, NamespaceDeclaration, Identifier, VariableStatement, isPropertyAccessExpression, unescapeLeadingUnderscores, ModuleBody, BindingPattern, isExportDeclaration, HasModifiers, Modifier, isModifier, HeritageClause, InterfaceDeclaration, ClassDeclaration, TypeAliasDeclaration, EnumDeclaration, ConstructorDeclaration, IndexSignatureDeclaration, ExpressionWithTypeArguments, TypeReferenceNode, ConditionalTypeNode, FunctionTypeNode, ConstructorTypeNode, isStatement, isArrayBindingElement, isBindingElement, isClassElement, isExpressionWithTypeArguments, isLiteralExpression, isTypeElement, isVariableDeclaration, NodeFactory, isTypeAssertionExpression, isNumericLiteral, isTemplateLiteral, BooleanLiteral, TypeAssertion, LiteralExpression, AsExpression, isTypeReferenceNode, ObjectLiteralExpression, TypeElement, isPropertyAssignment, ArrayLiteralExpression, isSpreadElement, FunctionExpression, ArrowFunction, isParameter, isPropertyName, NewExpression, KeywordTypeSyntaxKind, isPropertyDeclaration, isReturnStatement, isClassLike, ReturnStatement, forEachChild, TypeLiteralNode, __String, isTypeLiteralNode, isLiteralTypeNode, TemplateExpression, TemplateLiteralTypeSpan, TemplateHead, isNoSubstitutionTemplateLiteral, isTypeOfExpression, PrefixUnaryOperator, isYieldExpression, YieldExpression, isBlock, EntityName } from "typescript"; +import { Symbol, SourceFile, DiagnosticWithLocation, factory, CommentRange, Node, getParseTreeNode, SyntaxKind, SignatureDeclaration, ParameterDeclaration, getTrailingCommentRanges, getLeadingCommentRanges, NodeBuilderFlags, VisitResult, ExportAssignment, DeclarationName, Declaration, ModuleDeclaration, SymbolFlags, getNameOfDeclaration, isExportAssignment, Bundle, visitNodes, setTextRange, createUnparsedSourceFile, FileReference, NodeArray, Statement, isExternalModule, isImportEqualsDeclaration, isExternalModuleReference, isStringLiteralLike, isImportDeclaration, isStringLiteral, UnparsedSource, isUnparsedSource, BindingName, ArrayBindingElement, isIdentifier, ModifierFlags, TypeNode, FunctionDeclaration, MethodDeclaration, GetAccessorDeclaration, SetAccessorDeclaration, BindingElement, ConstructSignatureDeclaration, VariableDeclaration, MethodSignature, CallSignatureDeclaration, PropertyDeclaration, PropertySignature, visitNode, isPropertySignature, NamedDeclaration, isFunctionDeclaration, OmittedExpression, isOmittedExpression, AccessorDeclaration, isSetAccessorDeclaration, TypeParameterDeclaration, isSourceFile, isTypeAliasDeclaration, isModuleDeclaration, isClassDeclaration, isInterfaceDeclaration, isFunctionLike, isIndexSignatureDeclaration, isMappedTypeNode, EntityNameOrEntityNameExpression, setCommentRange, getCommentRange, ImportEqualsDeclaration, ImportDeclaration, ExportDeclaration, ImportTypeNode, StringLiteral, AssertClause, isSemicolonClassElement, isMethodDeclaration, isMethodSignature, isTypeQueryNode, isEntityName, visitEachChild, isPrivateIdentifier, isTypeNode, isTupleTypeNode, getLineAndCharacterOfPosition, setEmitFlags, EmitFlags, setOriginalNode, GeneratedIdentifierFlags, NodeFlags, canHaveModifiers, isTypeParameterDeclaration, NamespaceDeclaration, Identifier, VariableStatement, isPropertyAccessExpression, unescapeLeadingUnderscores, ModuleBody, BindingPattern, isExportDeclaration, HasModifiers, Modifier, isModifier, HeritageClause, InterfaceDeclaration, ClassDeclaration, TypeAliasDeclaration, EnumDeclaration, ConstructorDeclaration, IndexSignatureDeclaration, ExpressionWithTypeArguments, TypeReferenceNode, ConditionalTypeNode, FunctionTypeNode, ConstructorTypeNode, isStatement, isArrayBindingElement, isBindingElement, isClassElement, isExpressionWithTypeArguments, isLiteralExpression, isTypeElement, isVariableDeclaration, NodeFactory, isTypeAssertionExpression, isNumericLiteral, isTemplateLiteral, BooleanLiteral, TypeAssertion, LiteralExpression, AsExpression, isTypeReferenceNode, ObjectLiteralExpression, TypeElement, isPropertyAssignment, ArrayLiteralExpression, isSpreadElement, FunctionExpression, ArrowFunction, isParameter, isPropertyName, NewExpression, KeywordTypeSyntaxKind, isPropertyDeclaration, isReturnStatement, isClassLike, ReturnStatement, forEachChild, TypeLiteralNode, __String, isTypeLiteralNode, isLiteralTypeNode, TemplateExpression, TemplateLiteralTypeSpan, TemplateHead, isNoSubstitutionTemplateLiteral, isTypeOfExpression, PrefixUnaryOperator, isYieldExpression, YieldExpression, isBlock, EntityName, isQualifiedName, isGetAccessorDeclaration, CallExpression, isComputedPropertyName, isShorthandPropertyAssignment, isSpreadAssignment, ConditionalExpression, NodeWithTypeArguments, isArrayTypeNode, isFunctionTypeNode, isConstructorTypeNode, PropertyName, isExpressionStatement, isBinaryExpression, Visitor, isVariableStatement, SatisfiesExpression, ObjectLiteralElementLike, QualifiedName, forEachChildRecursively, getTokenPosOfNode, HasInferredType } from "typescript"; import { Debug } from "./debug"; import { Diagnostics } from "./diagnosticInformationMap.generated"; import { filter, stringContains, concatenate, last, forEach, length, pushIfUnique, map, mapDefined, arrayFrom, contains, startsWith, some, append, emptyArray, isArray, compact, flatMap, flatten, orderedRemoveItem, tryCast, findIndex } from "./lang-utils"; import { getDirectoryPath, normalizeSlashes, toFileNameLowerCase } from "./path-utils"; import { transformNodes } from "./transformer"; -import { EmitHost, EmitResolver, GetSymbolAccessibilityDiagnostic, LateBoundDeclaration, NodeId, ResolutionMode, SymbolAccessibility, SymbolAccessibilityResult, SymbolTracker, TransformationContext } from "./types"; -import { getEffectiveModifierFlags, skipTrivia, getLeadingCommentRangesOfNode, LateVisibilityPaintedStatement, AnyImportSyntax, getSourceFileOfNode, createDiagnosticForNode, getTextOfNode, declarationNameToString, canProduceDiagnostics, getThisParameter, isDeclaration, DeclarationDiagnosticProducing, setParent, getFirstConstructorWithBody, hasSyntacticModifier, visitArray, AllAccessorDeclarations, isNightly, createGetSymbolAccessibilityDiagnosticForNode, getOriginalNodeId, addRelatedInfo, isExternalOrCommonJsModule, isJsonSourceFile, isSourceFileJS, getResolvedExternalModuleName, isSourceFileNotJson, isAnyImportSyntax, createEmptyExports, isExternalModuleAugmentation, isGlobalScopeAugmentation, isLateVisibilityPaintedStatement, hasDynamicName, hasEffectiveModifier, isBindingPattern, isLiteralImportTypeNode, removeAllComments, needsScopeMarker, hasJSDocNodes, isExternalModuleIndicator, getOutputPathsFor, getSetAccessorValueParameter, getExternalModuleNameFromDeclaration, getExternalModuleImportEqualsDeclarationExpression, getResolutionModeOverrideForClause, isEntityNameExpression, getEffectiveBaseTypeNode, createGetSymbolAccessibilityDiagnosticForNodeName, pathContainsNodeModules, hasIdentifierComputedName, isIdentifierANonContextualKeyword, getNodeId, getSyntacticModifierFlags, } from "./utils"; -import { getModifiers } from "typescript"; -import { PrefixUnaryExpression } from "typescript"; -import { NumericLiteral } from "typescript"; -import { FunctionLikeDeclaration } from "typescript"; -import { LiteralTypeNode } from "typescript"; -import { NoSubstitutionTemplateLiteral } from "typescript"; -import { ParenthesizedExpression } from "typescript"; - - -const NO_LOCAL_INFERENCE = !!process.env.NO_LOCAL_INFERENCE; -enum NarrowBehavior { - None = 0, - AsConst = 1, - KeepLiterals = 2, - NotKeepLiterals = ~KeepLiterals, -} - -enum LocalTypeInfoFlags { - None = 0, - Fresh = 1 << 0, - Implicit = 1<< 1, - Invalid = 1<<2, -} +import { EmitHost, EmitResolver, GetSymbolAccessibilityDiagnostic, LateBoundDeclaration, NodeId, ResolutionMode, SymbolAccessibility, SymbolAccessibilityResult, SymbolTracker, TransformationContext, nullTransformationContext } from "./types"; +import { getEffectiveModifierFlags, skipTrivia, getLeadingCommentRangesOfNode, LateVisibilityPaintedStatement, AnyImportSyntax, getSourceFileOfNode, createDiagnosticForNode, getTextOfNode, declarationNameToString, canProduceDiagnostics, getThisParameter, isDeclaration, DeclarationDiagnosticProducing, setParent, getFirstConstructorWithBody, hasSyntacticModifier, visitArray, AllAccessorDeclarations, isNightly, createGetSymbolAccessibilityDiagnosticForNode, getOriginalNodeId, addRelatedInfo, isExternalOrCommonJsModule, isJsonSourceFile, isSourceFileJS, getResolvedExternalModuleName, isSourceFileNotJson, isAnyImportSyntax, createEmptyExports, isExternalModuleAugmentation, isGlobalScopeAugmentation, isLateVisibilityPaintedStatement, hasDynamicName, hasEffectiveModifier, isBindingPattern, isLiteralImportTypeNode, removeAllComments, needsScopeMarker, hasJSDocNodes, isExternalModuleIndicator, getOutputPathsFor, getSetAccessorValueParameter, getExternalModuleNameFromDeclaration, getExternalModuleImportEqualsDeclarationExpression, getResolutionModeOverrideForClause, isEntityNameExpression, getEffectiveBaseTypeNode, createGetSymbolAccessibilityDiagnosticForNodeName, pathContainsNodeModules, hasIdentifierComputedName, isIdentifierANonContextualKeyword } from "./utils"; +import { createLocalInferenceResolver } from "./localInferenceResolver"; /** @internal */ export function getDeclarationDiagnostics(host: EmitHost, resolver: EmitResolver, file: SourceFile | undefined): DiagnosticWithLocation[] | undefined { @@ -97,6 +75,7 @@ export function transformDeclarations(context: TransformationContext) { let lateStatementReplacementMap: Map>; let suppressNewDiagnosticContexts: boolean; let exportedModulesFromDeclarationEmit: Symbol[] | undefined; + let localInferenceTargetNode: Node | undefined = undefined; const { factory } = context; const host = context.getEmitHost(); @@ -123,17 +102,35 @@ export function transformDeclarations(context: TransformationContext) { 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 = createLocalInferenceResolver({ + ensureParameter, + context, + visitDeclarationSubtree, + setEnclosingDeclarations(node) { + const oldNode = enclosingDeclaration; + enclosingDeclaration = node; + return oldNode; + }, + setLocalInferenceTargetNode(node) { + const oldNode = localInferenceTargetNode; + localInferenceTargetNode = node; + return oldNode; + }, + checkEntityNameVisibility(name, container) { + return checkEntityNameVisibility(name, container ?? enclosingDeclaration) + }, + }) const options = context.getCompilerOptions(); const { noResolve, stripInternal } = options; const isolatedDeclarations = true; - const strictNullChecks = !!options.strict || !!options.strictNullChecks; return transformRoot; function reportIsolatedDeclarationError(node: Node) { - context.addDiagnostic(createDiagnosticForNode( + const message = createDiagnosticForNode( node, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit - )); + ); + context.addDiagnostic(message); } function recordTypeReferenceDirectivesIfNecessary(typeReferenceDirectives: readonly [specifier: string, mode: ResolutionMode][] | undefined): void { if (!typeReferenceDirectives) { @@ -174,6 +171,10 @@ export function transformDeclarations(context: TransformationContext) { // TODO: Do all these accessibility checks inside/after the first pass in the checker when declarations are enabled, if possible } else { + if(localInferenceTargetNode) { + reportIsolatedDeclarationError(localInferenceTargetNode); + return true; + } // Report error const errorInfo = getSymbolAccessibilityDiagnostic(symbolAccessibilityResult); if (errorInfo) { @@ -428,9 +429,6 @@ export function transformDeclarations(context: TransformationContext) { function mapReferencesIntoArray(references: FileReference[], outputFilePath: string): (file: SourceFile) => void { return file => { let fileName = file.fileName; - if(!fileName.endsWith(".d.ts") && fileName.endsWith(".ts")) { - fileName = fileName.substring(0, fileName.length - 3) + ".d.ts"; - } references.push({ pos: -1, end: -1, fileName }); }; } @@ -532,836 +530,6 @@ export function transformDeclarations(context: TransformationContext) { return undefined; } - type HasInferredType = - | FunctionDeclaration - | MethodDeclaration - | GetAccessorDeclaration - | SetAccessorDeclaration - | BindingElement - | ConstructSignatureDeclaration - | VariableDeclaration - | MethodSignature - | CallSignatureDeclaration - | ParameterDeclaration - | PropertyDeclaration - | PropertySignature; - function makeInvalidType() { - return factory.createTypeReferenceNode("invalid"); - } - - interface LocalTypeInfo { typeNode: TypeNode, sourceNode?: Node, flags: LocalTypeInfoFlags } - // We need to see about getting the JSX element type. - function getJSXElementType(_node: Node): EntityName { - return factory.createQualifiedName( - factory.createQualifiedName( - factory.createIdentifier("React"), - factory.createIdentifier("JSX"), - ), - factory.createIdentifier("Element"), - ); - } - function localInference(node: Node, isConstContext: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { - const nextIsConst = isConstContext & NarrowBehavior.NotKeepLiterals; - switch(node.kind) { - case SyntaxKind.ParenthesizedExpression: - return regular(getWidenedType(localInference((node as ParenthesizedExpression).expression, isConstContext)), node); - case SyntaxKind.Identifier: - if((node as Identifier).escapedText === "undefined") { - if(strictNullChecks) { - return regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), node); - } - else { - return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.Implicit); - } - } - break; - case SyntaxKind.NullKeyword: - if(strictNullChecks) { - return regular(factory.createLiteralTypeNode(factory.createNull()), node); - } - else { - return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.Implicit); - } - case SyntaxKind.NewExpression: - const newExpr = node as NewExpression; - if(isIdentifier(newExpr.expression)) { - // to do: isolated declarations : Add check for type arguments. - const typeNode = factory.createTypeReferenceNode( - visitNode(newExpr.expression, visitDeclarationSubtree, isIdentifier)!, - visitNodes(newExpr.typeArguments, visitDeclarationSubtree, isTypeNode) - ); - const visitedTypeNode = visitNode(typeNode, visitDeclarationSubtree, isTypeNode); - if(visitedTypeNode) { - return regular(visitedTypeNode, node); - } - return invalid(node); - } - return invalid(node); - case SyntaxKind.ArrowFunction: - case SyntaxKind.FunctionExpression: - const fnNode = node as FunctionExpression | ArrowFunction; - const oldEnclosingDeclaration = enclosingDeclaration; - try { - enclosingDeclaration = node; - - const fnTypeNode = factory.createFunctionTypeNode( - visitNodes(fnNode.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), - fnNode.parameters.map(p => ensureParameter(p)), - inferReturnType(fnNode).typeNode, - ); - return regular(fnTypeNode, node); - } - finally { - enclosingDeclaration = oldEnclosingDeclaration; - } - case SyntaxKind.TypeAssertionExpression: - case SyntaxKind.AsExpression: - const asExpression = node as AsExpression | TypeAssertion; - if(isTypeReferenceNode(asExpression.type) && isConst(asExpression.type)) { - return localInference(asExpression.expression, NarrowBehavior.AsConst); - } - else { - const type = visitType(asExpression.type, asExpression); - if(isLiteralTypeNode(type) && - (isNoSubstitutionTemplateLiteral(type.literal) || isStringLiteral(type.literal))) { - return regular(factory.createLiteralTypeNode( - normalizeLiteralValue(type.literal) - ), node); - } - return regular(type, node); - } - case SyntaxKind.PrefixUnaryExpression: - const prefixOp = node as PrefixUnaryExpression; - if(prefixOp.operator === SyntaxKind.MinusToken) { - const {typeNode: targetExpressionType, flags } = localInference(prefixOp.operand, isConstContext); - if(isLiteralTypeNode(targetExpressionType) && isNumericLiteral(targetExpressionType.literal)) { - return { - flags, - typeNode: factory.createLiteralTypeNode(factory.createPrefixMinus(targetExpressionType.literal)) - }; - } - else if(targetExpressionType.kind === SyntaxKind.NumberKeyword) { - return { typeNode: targetExpressionType, flags }; - } - } - break; - case SyntaxKind.NumericLiteral: - return literal(node, SyntaxKind.NumberKeyword, isConstContext); - case SyntaxKind.TemplateExpression: - if(!isConstContext) { - return literal(node, SyntaxKind.StringKeyword, isConstContext); - } - const templateExpression = node as TemplateExpression; - const templateSpans: TemplateLiteralTypeSpan[] = []; - const head = factory.createTemplateHead(templateExpression.head.text); - let prevSpan: TemplateHead | TemplateLiteralTypeSpan = head; - for(const span of templateExpression.templateSpans) { - const {typeNode} = localInference(span.expression, nextIsConst); - if(isLiteralTypeNode(typeNode)) { - const oldText = prevSpan.kind === SyntaxKind.TemplateHead ? prevSpan.text : prevSpan.literal.text; - const newText= oldText; - console.log(newText);//wip - } - else { - const literalSpan = factory.createTemplateLiteralTypeSpan( - typeNode, - span.literal - ); - prevSpan = literalSpan; - templateSpans.push(literalSpan); - } - - } - return regular(factory.createTemplateLiteralType(templateExpression.head, templateSpans), node); - case SyntaxKind.NoSubstitutionTemplateLiteral: - case SyntaxKind.StringLiteral: - return literal(node, SyntaxKind.StringKeyword, isConstContext); - case SyntaxKind.BigIntLiteral: - return literal(node, SyntaxKind.BigIntKeyword, isConstContext); - case SyntaxKind.RegularExpressionLiteral: - return literal(node, "RegExp", isConstContext); - case SyntaxKind.JsxSelfClosingElement: - case SyntaxKind.JsxElement: - const typeReference = factory.createTypeReferenceNode(getJSXElementType(node)); - setParent(typeReference.typeName, typeReference); - checkEntityNameVisibility(typeReference.typeName, enclosingDeclaration); - return fresh(typeReference, node); - case SyntaxKind.TrueKeyword: - case SyntaxKind.FalseKeyword: - return literal(node, SyntaxKind.BooleanKeyword, isConstContext); - case SyntaxKind.ArrayLiteralExpression: - const arrayLiteral = node as ArrayLiteralExpression; - const elementTypesInfo: LocalTypeInfo[] = []; - for(const element of arrayLiteral.elements) { - elementTypesInfo.push( - localInference(element, nextIsConst) - ); - } - if(isConstContext & NarrowBehavior.AsConst) { - const tupleType = factory.createTupleTypeNode( - elementTypesInfo.map(lti => lti.typeNode) - ); - tupleType.emitNode = { flags: 1 }; - return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node); - } - else { - let itemType; - if(elementTypesInfo.length === 0) { - itemType = (strictNullChecks ? factory.createKeywordTypeNode(SyntaxKind.NeverKeyword) : factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)); - } - else { - itemType = makeUnionFromTypes(node, elementTypesInfo, /*widenSingle*/ false).typeNode; - } - - return regular(factory.createArrayTypeNode(itemType), node); - } - case SyntaxKind.ObjectLiteralExpression: - const objectLiteral = node as ObjectLiteralExpression; - const properties: TypeElement[] = []; - for(const prop of objectLiteral.properties) { - if(isMethodDeclaration(prop)) { - const oldEnclosingDeclaration = enclosingDeclaration; - enclosingDeclaration = prop; - if (isConstContext & NarrowBehavior.AsConst) { - properties.push(factory.createPropertySignature( - [factory.createModifier(SyntaxKind.ReadonlyKeyword)], - visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!, - /*questionToken*/ undefined, - factory.createFunctionTypeNode( - visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), - prop.parameters.map(p => ensureParameter(p)), - localInferenceFromInitializer(prop)!, - ) - )); - } - else { - properties.push(factory.createMethodSignature( - [], - visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!, - prop.questionToken, - visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), - prop.parameters.map(p => ensureParameter(p)), - localInferenceFromInitializer(prop), - )); - } - enclosingDeclaration = oldEnclosingDeclaration; - } - else if(isPropertyAssignment(prop)) { - const modifiers = isConstContext & NarrowBehavior.AsConst ? - [factory.createModifier(SyntaxKind.ReadonlyKeyword)]: - []; - properties.push(factory.createPropertySignature( - modifiers, - visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!, - /*questionToken*/ undefined, - localInference(prop.initializer, nextIsConst).typeNode - )); - } - else { - return invalid(prop); - } - } - return regular(factory.createTypeLiteralNode( - properties - ), objectLiteral); - } - - return regular(makeInvalidTypeAndReport(node), node); - } - function invalid(node: Node): LocalTypeInfo { - return { typeNode: makeInvalidTypeAndReport(node), flags: LocalTypeInfoFlags.Invalid, sourceNode: node } - } - function fresh(typeNode: TypeNode, sourceNode?: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { - return { typeNode, flags: flags | LocalTypeInfoFlags.Fresh, sourceNode }; - } - function regular(typeNode: TypeNode, sourceNode?: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { - return { typeNode, flags, sourceNode }; - } - function normalizeLiteralValue(literal: LiteralExpression) { - switch(literal.kind) { - case SyntaxKind.BigIntLiteral: - case SyntaxKind.TrueKeyword: - case SyntaxKind.FalseKeyword: - return 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 literal(node: Node, baseType: string | KeywordTypeSyntaxKind, narrowBehavior: NarrowBehavior) { - if(narrowBehavior) { - return fresh(factory.createLiteralTypeNode( - normalizeLiteralValue(node as LiteralExpression) - ), node); - } - else { - return fresh( - typeof baseType === "number" ? factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType), - node - ); - } - } - function isConst(typeReference: TypeReferenceNode) { - return isIdentifier(typeReference.typeName) && typeReference.typeName.escapedText === "const"; - } - function makeInvalidTypeAndReport(node: Node) { - reportIsolatedDeclarationError(node); - return makeInvalidType(); - } - function visitType(type: TypeNode | undefined, owner: Node) { - const visitedType = visitNode(type, visitDeclarationSubtree, isTypeNode); - return visitedType ?? makeInvalidTypeAndReport(owner); - } - - function getMemberKey(member: MethodSignature | PropertySignature) { - if(!isIdentifier(member.name)) { - makeInvalidTypeAndReport(member.name); - return undefined; - } - return member.name.escapedText; - } - - function collapseLiteralTypesIntoBaseTypes(nodes: LocalTypeInfo[]) { - enum CollapsibleTypes { - None = 0, - String = 1 << 1, - Number = 1 << 2, - True = 1 << 3, - False = 1 << 4, - Boolean = True | False, - BigInt = 1 << 5, - Any = 1 << 7, - ImplicitAny = 1 << 8 - } - let baseTypes = CollapsibleTypes.None; - let literalTypes = CollapsibleTypes.None; - for(const type of nodes) { - switch(type.typeNode.kind) { - case SyntaxKind.TemplateLiteralType: - literalTypes |= CollapsibleTypes.String; - break; - case SyntaxKind.AnyKeyword: - if(type.flags & LocalTypeInfoFlags.Implicit) { - literalTypes |= CollapsibleTypes.ImplicitAny; - } - else { - baseTypes |= CollapsibleTypes.Any; - } - break; - case SyntaxKind.BooleanKeyword: - baseTypes |= CollapsibleTypes.Boolean; - break; - case SyntaxKind.StringKeyword: - baseTypes |= CollapsibleTypes.String; - break; - case SyntaxKind.NumberKeyword: - baseTypes |= CollapsibleTypes.Number; - break; - case SyntaxKind.BigIntKeyword: - baseTypes |= CollapsibleTypes.BigInt; - break; - case SyntaxKind.LiteralType: - const literalType = type.typeNode as LiteralTypeNode; - switch(literalType.literal.kind) { - case SyntaxKind.TrueKeyword: - literalTypes |= CollapsibleTypes.True; - break; - case SyntaxKind.FalseKeyword: - literalTypes |= CollapsibleTypes.False; - break; - case SyntaxKind.NumericLiteral: - literalTypes |= CollapsibleTypes.Number; - break; - case SyntaxKind.PrefixUnaryExpression: - if((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { - literalTypes |= CollapsibleTypes.Number; - } - break; - case SyntaxKind.StringLiteral: - case SyntaxKind.NoSubstitutionTemplateLiteral: - case SyntaxKind.TemplateExpression: - literalTypes |= CollapsibleTypes.String; - break; - case SyntaxKind.BigIntLiteral: - literalTypes |= CollapsibleTypes.BigInt; - break; - } - } - } - // If true and false are both present, act as if we found boolean itself - if((literalTypes & CollapsibleTypes.Boolean) === CollapsibleTypes.Boolean) { - baseTypes |= CollapsibleTypes.Boolean; - } - const typesToCollapse = baseTypes & literalTypes; - - if(baseTypes & CollapsibleTypes.Any) { - return [factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)]; - } - // Nothing to collapse or reorder - if(baseTypes === CollapsibleTypes.None) return nodes.map(n => n.typeNode); - const result: TypeNode[] = []; - - // We do a best effort to preserve TS union order for primitives - if(baseTypes & CollapsibleTypes.String) { - result.push(factory.createKeywordTypeNode(SyntaxKind.StringKeyword)); - } - if(baseTypes & CollapsibleTypes.Number) { - result.push(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)); - } - if(baseTypes & CollapsibleTypes.Boolean) { - result.push(factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword)); - } - if(baseTypes & CollapsibleTypes.BigInt) { - result.push(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword)); - } - if(!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.True) { - result.push(factory.createLiteralTypeNode(factory.createTrue())); - } - if(!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.False) { - result.push(factory.createLiteralTypeNode(factory.createFalse())); - } - - for(const type of nodes) { - let typeofNode = CollapsibleTypes.None; - - switch(type.typeNode.kind) { - case SyntaxKind.BooleanKeyword: - case SyntaxKind.StringKeyword: - case SyntaxKind.NumberKeyword: - case SyntaxKind.BigIntKeyword: - case SyntaxKind.AnyKeyword: - // They were already added - continue; - case SyntaxKind.TemplateLiteralType: - typeofNode = CollapsibleTypes.String; - break; - case SyntaxKind.LiteralType: - const literalType = type.typeNode as LiteralTypeNode; - switch(literalType.literal.kind) { - case SyntaxKind.TrueKeyword: - continue; - case SyntaxKind.FalseKeyword: - continue; - case SyntaxKind.NumericLiteral: - typeofNode = CollapsibleTypes.Number; - break; - case SyntaxKind.PrefixUnaryExpression: - if((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { - typeofNode = CollapsibleTypes.Number; - } - break; - case SyntaxKind.StringLiteral: - case SyntaxKind.NoSubstitutionTemplateLiteral: - case SyntaxKind.TemplateExpression: - typeofNode = CollapsibleTypes.String; - break; - case SyntaxKind.BigIntLiteral: - typeofNode = CollapsibleTypes.BigInt; - break; - } - } - // Not a node of interest, do not change - if((typeofNode & typesToCollapse) === 0) { - result.push(type.typeNode); - } - } - return result; - } - function deduplicateUnion(nodes: LocalTypeInfo[]) { - const typeInfoCache = new Map - }>(); - const union: LocalTypeInfo[] = []; - for(const node of nodes) { - const existing = union.find(u => typesEqual(node.typeNode, node.sourceNode, u.typeNode, u.sourceNode)); - if(existing === undefined) { - union.push(node); - } - else { - existing.flags &= node.flags; - } - } - return union; - - function getTypeInfo(type: TypeLiteralNode, errorTarget: Node | undefined) { - const typeNodeId = getNodeId(type); - let typeInfo = typeInfoCache.get(typeNodeId); - if(typeInfo) return typeInfo; - - typeInfo = { - node: type, - members: new Map() - }; - for(const member of type.members) { - const isMethod = isMethodSignature(member); - const isProp = isPropertySignature(member); - if(isMethod || isProp) { - const memberKey = getMemberKey(member); - if (memberKey === undefined) { - makeInvalidTypeAndReport(errorTarget ?? member); - break; - } - typeInfo.members.set(memberKey, member); - } - else { - makeInvalidTypeAndReport(errorTarget ?? member); - } - } - typeInfoCache.set(typeNodeId, typeInfo); - return typeInfo; - } - function typesEqual(a: TypeNode | undefined, aErrorTarget: Node | undefined, b: TypeNode | undefined, bErrorTarget: Node | undefined) { - if (a === undefined || b === undefined) return a === b; - if (a.kind !== b.kind) return false; - switch(a.kind) { - case SyntaxKind.AnyKeyword: - case SyntaxKind.UnknownKeyword: - case SyntaxKind.NumberKeyword: - case SyntaxKind.BigIntKeyword: - case SyntaxKind.ObjectKeyword: - case SyntaxKind.BooleanKeyword: - case SyntaxKind.StringKeyword: - case SyntaxKind.SymbolKeyword: - case SyntaxKind.VoidKeyword: - case SyntaxKind.UndefinedKeyword: - case SyntaxKind.NeverKeyword: - return true; - } - if(isLiteralTypeNode(a) && isLiteralTypeNode(b)) { - let aLiteral = a.literal; - let bLiteral = b.literal; - while(true) { - switch(aLiteral.kind) { - case SyntaxKind.NullKeyword: - case SyntaxKind.TrueKeyword: - case SyntaxKind.FalseKeyword: - return aLiteral.kind === bLiteral.kind; - case SyntaxKind.NumericLiteral: - return aLiteral.kind === bLiteral.kind && +aLiteral.text === +(bLiteral).text; - case SyntaxKind.StringLiteral: - case SyntaxKind.NoSubstitutionTemplateLiteral: - return (bLiteral.kind === SyntaxKind.StringLiteral || bLiteral.kind === SyntaxKind.NoSubstitutionTemplateLiteral) - && aLiteral.text === (bLiteral).text; - case SyntaxKind.PrefixUnaryExpression: - const aUnary = (aLiteral as PrefixUnaryExpression); - const bUnary = (bLiteral as PrefixUnaryExpression); - if(aUnary.operator !== bUnary.operator) return false; - - aLiteral = aUnary.operand as LiteralExpression; - bLiteral = bUnary.operand as LiteralExpression; - return +aLiteral.text === +bLiteral.text; - default: - return false; - } - } - } - if(isTypeReferenceNode(a) && isTypeReferenceNode(b)) { - let aTypeName = a.typeName; - let bTypeName = b.typeName; - while(true) { - if(aTypeName.kind === SyntaxKind.QualifiedName && bTypeName.kind === SyntaxKind.QualifiedName) { - if(aTypeName.right.escapedText !== bTypeName.right.escapedText) return false; - aTypeName = aTypeName.left; - bTypeName = bTypeName.left; - } - else if(aTypeName.kind === SyntaxKind.Identifier && bTypeName.kind === SyntaxKind.Identifier) { - return aTypeName.escapedText === bTypeName.escapedText; - } - else { - return false; - } - } - } - if(isTypeLiteralNode(a) && isTypeLiteralNode(b)) { - if(a.members.length !== b.members.length) return false; - const aTypeInfo = getTypeInfo(a, aErrorTarget); - if(!aTypeInfo) return false; - - for(const bMember of b.members) { - const bIsMethod = isMethodSignature(bMember); - const bIsProp = isPropertySignature(bMember); - if(bIsMethod || bIsProp) { - const memberKey = getMemberKey(bMember); - if (memberKey === undefined) { - makeInvalidTypeAndReport(bErrorTarget ?? bMember); - break; - } - const aMember = aTypeInfo.members.get(memberKey); - if(!aMember) return false; - if((aMember.questionToken !== undefined) !== (bMember.questionToken !== undefined)) return false; - if (getSyntacticModifierFlags(aMember) !== getSyntacticModifierFlags(bMember)) return false; - if(bIsProp && isPropertySignature(aMember)) { - if(!typesEqual(aMember.type, aErrorTarget, bMember.type, bErrorTarget)) { - return false; - } - } - else if(bIsMethod && isMethodSignature(aMember)) { - if(!typesEqual(aMember.type, aErrorTarget,bMember.type, bErrorTarget)) { - return false; - } - if(aMember.parameters.length !== b.members.length) { - return false; - } - } - } - else { - makeInvalidTypeAndReport(bErrorTarget ?? bMember); - } - } - return true; - } - else { - if(aErrorTarget) { - reportIsolatedDeclarationError(aErrorTarget); - } - if(bErrorTarget) { - reportIsolatedDeclarationError(bErrorTarget); - } - } - } - } - function normalizeObjectUnion(nodes: (TypeNode | undefined)[]) { - const allProps = new Map<__String, (TypeNode | undefined)[]>(); - const allTypeLookup = new Array | undefined>(); - let hasChanged = false; - for (let i = 0; i< nodes.length; i++) { - const type = nodes[i]; - const typeLookup = new Map<__String, TypeNode>(); - allTypeLookup.push(typeLookup); - - if(!type || !isTypeLiteralNode(type)) continue; - for(const member of type.members){ - const isMethod = isMethodSignature(member); - const isProp = isPropertySignature(member); - if(isMethod || isProp) { - const memberKey = getMemberKey(member); - if(memberKey === undefined) { - nodes[i] = makeInvalidTypeAndReport(member.name); - allTypeLookup[i] = undefined; - hasChanged = true; - break; - } - let type; - if(isProp) { - type = member.type ?? makeInvalidTypeAndReport(member); - } - else { - type = factory.createFunctionTypeNode( - member.typeParameters, - member.parameters, - member.type!, - ); - } - let propTypes = allProps.get(memberKey); - if(!propTypes) { - propTypes = new Array(nodes.length); - allProps.set(memberKey, propTypes); - } - propTypes[i] = type; - typeLookup.set(memberKey, type); - } - else { - nodes[i] = makeInvalidTypeAndReport(member); - allTypeLookup[i] = undefined; - hasChanged = true; - break; - } - } - } - for(const [, propTypes] of allProps) { - normalizeObjectUnion(propTypes); - } - for(let typeIndex = 0; typeIndex< nodes.length; typeIndex++) { - const type = nodes[typeIndex]; - const props = allTypeLookup[typeIndex]; - if(!type || !isTypeLiteralNode(type) || !props) continue; - - let newMembers: TypeElement[] | undefined; - for(const [commonProp, propTypes] of allProps) { - const propType = props.get(commonProp); - if(propType) { - if(propType !== propTypes[typeIndex]) { - const indexOfProp = findIndex(type.members, e => isPropertySignature(e) && isIdentifier(e.name) && e.name.escapedText === commonProp); - if(indexOfProp !== -1) { - if(newMembers === undefined) { - newMembers = [...type.members]; - } - const existingMember = type.members[indexOfProp] as PropertySignature; - newMembers[indexOfProp] = factory.createPropertySignature( - existingMember.modifiers, - existingMember.name, - existingMember.questionToken, - propTypes[typeIndex] - ); - } - } - } - else { - if(newMembers === undefined) { - newMembers = [...type.members]; - } - newMembers.push(factory.createPropertySignature( - /*modifiers*/ undefined, - factory.createIdentifier(unescapeLeadingUnderscores(commonProp)), - factory.createToken(SyntaxKind.QuestionToken), - factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), - )); - } - } - if (newMembers) { - hasChanged = true; - nodes[typeIndex] = factory.createTypeLiteralNode(newMembers); - } - } - return hasChanged; - } - function getWidenedType(localTypeInfo: LocalTypeInfo) { - if((localTypeInfo.flags & LocalTypeInfoFlags.Fresh) && isLiteralTypeNode(localTypeInfo.typeNode)) { - const literal = localTypeInfo.typeNode.literal; - return literal.kind === SyntaxKind.StringLiteral ? factory.createKeywordTypeNode(SyntaxKind.StringKeyword) : - literal.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : - literal.kind === SyntaxKind.PrefixUnaryExpression && (literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : - literal.kind === SyntaxKind.BigIntLiteral ? factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword) : - literal.kind === SyntaxKind.TrueKeyword || literal.kind === SyntaxKind.FalseKeyword ? factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword) : - localTypeInfo.typeNode; - } - - return localTypeInfo.typeNode; - } - function makeUnionFromTypes(sourceNode: Node, types: LocalTypeInfo[], widenSingle: boolean) { - types = deduplicateUnion(types); - if(types.length === 1) { - const localType = types[0]; - return widenSingle ? { ... localType, type: getWidenedType(localType) }: localType; - } - const unionConstituents = collapseLiteralTypesIntoBaseTypes(types); - - normalizeObjectUnion(unionConstituents); - return regular(unionConstituents.length === 1? unionConstituents[0]: factory.createUnionTypeNode(unionConstituents), sourceNode); - } - function inferReturnType(node: FunctionLikeDeclaration) { - if(node.type) { - return regular(visitType(node.type, node), node); - } - if(!node.body) { - return regular(makeInvalidTypeAndReport(node), node); - } - - const returnStatements: ReturnStatement[] = []; - const yieldExpressions: YieldExpression[] = []; - - let returnType; - if(!isBlock(node.body)) { - returnType = localInference(node.body); - } - else { - collectReturnAndYield(node.body, returnStatements, yieldExpressions); - if(returnStatements.length === 0) { - returnType = regular(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), node); - } - else { - const returnStatementInference = returnStatements.map((r) => { - return r.expression? - localInference(r.expression, NarrowBehavior.KeepLiterals): - fresh(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), r); - }); - - returnType = makeUnionFromTypes(node, returnStatementInference, /*widenSingle*/ true); - if(returnType.flags & LocalTypeInfoFlags.Fresh && returnType.typeNode.kind === SyntaxKind.UndefinedKeyword) { - returnType = fresh(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), returnType.typeNode); - } - } - } - let yieldType: LocalTypeInfo | undefined; - if(node.asteriskToken) { - if(yieldExpressions.length === 0) { - returnType = regular( - factory.createKeywordTypeNode(SyntaxKind.NeverKeyword), - node - ); - } - else { - const yieldExpressionsInference = yieldExpressions.map((r) => { - return r.expression? - localInference(r.expression, NarrowBehavior.KeepLiterals): - regular(factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), r); - }); - - yieldType = makeUnionFromTypes(node, yieldExpressionsInference, /*widenSingle*/ true); - } - } - return makeFinalReturnType(node, returnType, yieldType); - - function makeFinalReturnType(node: FunctionLikeDeclaration, returnType: LocalTypeInfo, yieldType: LocalTypeInfo | undefined) { - const modifiers = getEffectiveModifierFlags(node); - if(node.asteriskToken) { - return regular( - factory.createTypeReferenceNode( - factory.createIdentifier(modifiers & ModifierFlags.Async ? "Generator": "AsyncGenerator"), - [returnType.typeNode, yieldType?.typeNode!], - ), - returnType.sourceNode, - returnType.flags - ); - } - else if(modifiers & ModifierFlags.Async) { - return regular( - factory.createTypeReferenceNode( - factory.createIdentifier("Promise"), - [returnType.typeNode], - ), - returnType.sourceNode, - returnType.flags - ); - } - return returnType; - } - function collectReturnAndYield(node: Node, result: ReturnStatement[], yieldExpressions: YieldExpression[]) { - forEachChild(node, child => { - if(isReturnStatement(child)) { - result.push(child); - } - if(isYieldExpression(child)) { - yieldExpressions.push(child); - } - if(isClassLike(child) || isFunctionLike(child)) { - return; - } - // TODO: Do not walk all children if not generator function - collectReturnAndYield(child, result, yieldExpressions); - }); - } - } - - function localInferenceFromInitializer(node: HasInferredType | ExportAssignment): TypeNode | undefined { - if(NO_LOCAL_INFERENCE) { - return undefined; - } - let typeNode; - if(isExportAssignment(node) && node.expression) { - typeNode = localInference(node.expression); - } - else if(isParameter(node) && node.initializer) { - typeNode = localInference(node.initializer); - } - else if(isVariableDeclaration(node) && node.initializer) { - typeNode = localInference(node.initializer); - } - else if(isPropertyDeclaration(node) && node.initializer) { - typeNode = localInference(node.initializer); - } - else if(isFunctionDeclaration(node)) { - typeNode = inferReturnType(node); - } - else if(isMethodDeclaration(node)) { - typeNode = inferReturnType(node); - } - return typeNode?.typeNode; - } 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) @@ -1372,13 +540,8 @@ export function transformDeclarations(context: TransformationContext) { return; } if (isolatedDeclarations) { - if (type === undefined) { - const localType = localInferenceFromInitializer(node); - if (localType !== undefined) { - return localType; - } - reportIsolatedDeclarationError(node); - return makeInvalidType(); + if (type === undefined && localInferenceResolver) { + return localInferenceResolver.fromInitializer(node, currentSourceFile) } return visitNode(type, visitDeclarationSubtree, isTypeNode); } @@ -2015,7 +1178,7 @@ export function transformDeclarations(context: TransformationContext) { }); errorFallbackNode = input; const type = isolatedDeclarations ? - localInferenceFromInitializer(input) ?? makeInvalidTypeAndReport(input) : + localInferenceResolver?.fromInitializer(input, currentSourceFile) : resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker); const varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, type, /*initializer*/ undefined); errorFallbackNode = undefined; diff --git a/external-declarations/src/compiler/emit-binder.ts b/external-declarations/src/compiler/emit-binder.ts index f65622b55cc30..0a883220c1822 100644 --- a/external-declarations/src/compiler/emit-binder.ts +++ b/external-declarations/src/compiler/emit-binder.ts @@ -29,10 +29,14 @@ function assertNever(o: never): never { } type _Node = Node; +type _NodeArray = NodeArray; +type _SourceFile = SourceFile; declare module 'typescript' { interface SourceFile { externalModuleIndicator?: _Node | true; } + export function forEachChildRecursively(rootNode: _Node, cbNode: (node: _Node, parent: _Node) => T | "skip" | undefined, cbNodes?: (nodes: _NodeArray<_Node>, parent: _Node) => T | "skip" | undefined): T | undefined + export function getTokenPosOfNode(node: _Node, sourceFile?: _SourceFile, includeJsDoc?: boolean): number; } export function getEmitModuleDetectionKind(options: CompilerOptions) { return options.moduleDetection || diff --git a/external-declarations/src/compiler/emit-resolver.ts b/external-declarations/src/compiler/emit-resolver.ts index 636cf7d62fc4d..86941770086c7 100644 --- a/external-declarations/src/compiler/emit-resolver.ts +++ b/external-declarations/src/compiler/emit-resolver.ts @@ -35,6 +35,9 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p } return { + isSyntheticTypeEquivalent(actualTypeNode, typeNode, message) { + return true + }, isDeclarationVisible, isLiteralConstDeclaration, createLiteralConstValue(node) { diff --git a/external-declarations/src/compiler/localInferenceResolver.ts b/external-declarations/src/compiler/localInferenceResolver.ts new file mode 100644 index 0000000000000..3a051857d4d50 --- /dev/null +++ b/external-declarations/src/compiler/localInferenceResolver.ts @@ -0,0 +1,1354 @@ +import { + HasInferredType, + Node, + ExportAssignment, SourceFile, TypeNode, VisitResult, + EntityNameOrEntityNameExpression, ParameterDeclaration, + factory, EntityName, isIdentifier, setTextRange, + isPropertyAccessExpression, isQualifiedName, isTypeNode, NodeFlags, + forEachChildRecursively, visitNode, NodeArray, ObjectLiteralElementLike, + SetAccessorDeclaration, GetAccessorDeclaration, isGetAccessorDeclaration, + isSetAccessorDeclaration, SyntaxKind, ParenthesizedExpression, QualifiedName, + Identifier, CallExpression, NewExpression, visitNodes, FunctionExpression, + ArrowFunction, isTypeParameterDeclaration, SatisfiesExpression, AsExpression, + TypeAssertion, isTypeReferenceNode, isLiteralTypeNode, isNoSubstitutionTemplateLiteral, + isStringLiteral, PrefixUnaryExpression, TemplateExpression, TemplateLiteralTypeSpan, + ArrayLiteralExpression, isSpreadElement, isOmittedExpression, ObjectLiteralExpression, + TypeElement, isComputedPropertyName, isPropertyName, isMethodDeclaration, + isPropertyAssignment, isShorthandPropertyAssignment, isSpreadAssignment, + Modifier, getTokenPosOfNode, setCommentRange, ConditionalExpression, LiteralExpression, + KeywordTypeSyntaxKind, TypeReferenceNode, MethodSignature, PropertySignature, isNumericLiteral, + LiteralTypeNode, TypeLiteralNode, isMethodSignature, isPropertySignature, SignatureDeclaration, + NodeWithTypeArguments, isArrayTypeNode, isTypeLiteralNode, isFunctionTypeNode, isConstructorTypeNode, + isTypeQueryNode, PropertyName, ModifierFlags, FunctionLikeDeclaration, ReturnStatement, + YieldExpression, isBlock, forEachChild, isReturnStatement, isYieldExpression, isClassLike, + isFunctionLike, Statement, isExpressionStatement, isBinaryExpression, + visitEachChild, Visitor, isExportAssignment, isParameter, isVariableDeclaration, + isVariableStatement, isSourceFile, isPropertyDeclaration, isFunctionDeclaration, + DiagnosticWithLocation +} from "typescript"; +import { TransformationContext, nullTransformationContext } from "./types"; +import { Debug } from "./debug"; +import { Diagnostics } from "./diagnosticInformationMap.generated"; +import { findIndex } from "./lang-utils"; +import { createDiagnosticForNode, setParent, isEntityNameExpression, getNodeId, getSyntacticModifierFlags, getEffectiveModifierFlags } from "./utils"; + +const NO_LOCAL_INFERENCE = !!process.env.NO_LOCAL_INFERENCE; +enum NarrowBehavior { + None = 0, + AsConst = 1, + KeepLiterals = 2, + AsConstOrKeepLiterals = AsConst | KeepLiterals, + NotKeepLiterals = ~KeepLiterals, +} + +enum LocalTypeInfoFlags { + None = 0, + Fresh = 1 << 0, + ImplicitAny = 1 << 1, + Invalid = 1 << 2, + Optimistic = 1 << 3, +} + +interface LocalInferenceResolver { + makeInvalidType(): Node; + fromInitializer(node: HasInferredType | ExportAssignment, sourceFile: SourceFile): TypeNode; +} +export function createLocalInferenceResolver({ + setLocalInferenceTargetNode, + setEnclosingDeclarations, + visitDeclarationSubtree, + checkEntityNameVisibility, + ensureParameter, + context, +}: { + setLocalInferenceTargetNode(node: Node | undefined): Node | undefined; + setEnclosingDeclarations(node: Node): Node; + visitDeclarationSubtree(input: Node): VisitResult + checkEntityNameVisibility(name: EntityNameOrEntityNameExpression, container?: Node): void; + ensureParameter(p: ParameterDeclaration): ParameterDeclaration; + + context: TransformationContext +}): LocalInferenceResolver | undefined { + let currentSourceFile: SourceFile | undefined; + const options = context.getCompilerOptions(); + if (!options.isolatedDeclarations) { + return undefined; + } + const resolver = context.getEmitResolver(); + const { factory } = context; + const strictNullChecks = !!options.strict || !!options.strictNullChecks; + + return { + fromInitializer(node: HasInferredType, sourceFile: SourceFile) { + const oldSourceFile = currentSourceFile; + currentSourceFile = sourceFile; + try { + const localType = localInferenceFromInitializer(node); + if (localType !== undefined) { + return localType ?? makeInvalidType(); + } + reportIsolatedDeclarationError(node); + return makeInvalidType(); + } finally { + currentSourceFile = oldSourceFile; + } + }, + makeInvalidType, + }; + function reportIsolatedDeclarationError(node: Node) { + const message = createDiagnosticForNode( + node, + Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit + ); + context.addDiagnostic(message); + } + + function makeInvalidType() { + return factory.createTypeReferenceNode("invalid"); + } + + interface LocalTypeInfo { typeNode: TypeNode, sourceNode: Node, flags: LocalTypeInfoFlags } + // We need to see about getting the JSX element type. + function getJSXElementType(_node: Node): EntityName { + return factory.createQualifiedName( + factory.createQualifiedName( + factory.createIdentifier("React"), + factory.createIdentifier("JSX"), + ), + factory.createIdentifier("Element"), + ); + } + function entityNameExpressionToQualifiedName(node: EntityNameOrEntityNameExpression): EntityName { + if (isIdentifier(node)) { + return setTextRange(factory.cloneNode(node), node); + } + else if (isPropertyAccessExpression(node)) { + return setTextRange(factory.createQualifiedName( + entityNameExpressionToQualifiedName(node.expression), + factory.cloneNode(node.name) + ), node); + } + else if (isQualifiedName(node)) { + return setTextRange(factory.createQualifiedName( + entityNameExpressionToQualifiedName(node), + factory.cloneNode(node.right) + ), node); + } + throw Error("Should not happen"); + } + + function isSyntheticTypeNode(node: Node): node is TypeNode { + return isTypeNode(node) && !!(node.flags & NodeFlags.Synthesized); + } + function finalizeSyntheticTypeNode(typeNode: T, parent: Node): T { + if (typeNode && typeNode.parent !== parent) { + setParent(typeNode, parent); + // Ensure no non synthetic nodes make it in here + Debug.assert(typeNode.flags & NodeFlags.Synthesized) + forEachChildRecursively(typeNode, (child, parent) => { + Debug.assert(typeNode.flags & NodeFlags.Synthesized); + if (child.parent === parent) { + return "skip"; + } + setParent(child, parent); + }); + } + return typeNode as T & { isSynthetic: true }; + } + function visitSyntheticType(typeNode: TypeNode, node: Node) { + const previousLocalInferenceTargetNode = setLocalInferenceTargetNode(node); + try { + let visitedNode = visitNode(finalizeSyntheticTypeNode(typeNode, node), visitDeclarationSubtree, isSyntheticTypeNode); + Debug.assert(visitedNode); + return visitedNode; + } finally { + setLocalInferenceTargetNode(previousLocalInferenceTargetNode); + } + } + + function mergeFlags(existing: LocalTypeInfoFlags, newFlags: LocalTypeInfoFlags): LocalTypeInfoFlags { + return existing | (newFlags | LocalTypeInfoFlags.Optimistic); + } + function getAccessorInfo(properties: NodeArray, knownAccessor: SetAccessorDeclaration | GetAccessorDeclaration) { + const nameKey = getMemberKey(knownAccessor); + const knownIsGetAccessor = isGetAccessorDeclaration(knownAccessor); + const otherAccessorTest = knownIsGetAccessor ? isSetAccessorDeclaration : isGetAccessorDeclaration; + const otherAccessorIndex = properties.findIndex(n => otherAccessorTest(n) && getMemberKey(n) === nameKey); + const otherAccessor = properties[otherAccessorIndex] as SetAccessorDeclaration | GetAccessorDeclaration | undefined; + + + const getAccessor = knownIsGetAccessor ? knownAccessor : + otherAccessor && isGetAccessorDeclaration(otherAccessor) ? otherAccessor : + undefined; + const setAccessor = !knownIsGetAccessor ? knownAccessor : + otherAccessor && isSetAccessorDeclaration(otherAccessor) ? otherAccessor : + undefined; + + + return { + otherAccessorIndex, + otherAccessor, + getAccessor, + setAccessor, + } + } + function inferAccessorType(getAccessor?: GetAccessorDeclaration, setAccessor?: SetAccessorDeclaration) { + + let accessorType = getAccessor?.type && deepClone(visitType(getAccessor?.type, getAccessor)); + + if (!accessorType && setAccessor) { + accessorType = setAccessor.parameters[0].type; + accessorType = accessorType && deepClone(visitType(accessorType, setAccessor)); + } + + if (!accessorType && getAccessor) { + const localPropType = inferReturnType(getAccessor) + accessorType = localPropType.typeNode; + } + + return accessorType ?? makeInvalidType(); + } + function localInference(node: Node, inferenceFlags: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { + const nextInferenceFlags = inferenceFlags & NarrowBehavior.NotKeepLiterals; + switch (node.kind) { + case SyntaxKind.ParenthesizedExpression: + return localInference((node as ParenthesizedExpression).expression, inferenceFlags); + case SyntaxKind.QualifiedName: + const typeNode = visitSyntheticType(factory.createTypeQueryNode( + entityNameExpressionToQualifiedName(node as QualifiedName) + ), node); + + return regular( + typeNode, + node, + LocalTypeInfoFlags.Optimistic + ) + case SyntaxKind.PropertyAccessExpression: + if (isEntityNameExpression(node)) { + const typeNode = visitSyntheticType(factory.createTypeQueryNode( + entityNameExpressionToQualifiedName(node) + ), node); + return regular( + typeNode, + node, + LocalTypeInfoFlags.Optimistic + ) + } + break; + case SyntaxKind.Identifier: { + if ((node as Identifier).escapedText === "undefined") { + return createUndefinedTypeNode(node); + } + const typeNode = visitSyntheticType(factory.createTypeQueryNode( + deepClone(node as Identifier) + ), node) + + return regular(typeNode, node, LocalTypeInfoFlags.Optimistic) + } + case SyntaxKind.NullKeyword: + if (strictNullChecks) { + return regular(factory.createLiteralTypeNode(factory.createNull()), node); + } + else { + return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.ImplicitAny); + } + case SyntaxKind.CallExpression: + const callExpression = node as CallExpression; + if (isIdentifier(callExpression.expression) && callExpression.expression.escapedText === "Symbol") { + if (inferenceFlags & NarrowBehavior.KeepLiterals) { + return regular( + factory.createTypeOperatorNode( + SyntaxKind.UniqueKeyword, + factory.createKeywordTypeNode(SyntaxKind.SymbolKeyword) + ), + node + ) + } else { + return regular( + factory.createKeywordTypeNode(SyntaxKind.SymbolKeyword), + node + ) + } + } + case SyntaxKind.NewExpression: + const newExpr = node as NewExpression; + if (isEntityNameExpression(newExpr.expression)) { + + const typeNode = visitSyntheticType(factory.createTypeReferenceNode( + entityNameExpressionToQualifiedName(newExpr.expression), + visitNodes(newExpr.typeArguments, deepClone, isTypeNode)! + ), node); + // Optimistic since the constructor might not have the same name as the type + return regular(typeNode, node, LocalTypeInfoFlags.Optimistic); + } + return invalid(node); + case SyntaxKind.ArrowFunction: + case SyntaxKind.FunctionExpression: + const fnNode = node as FunctionExpression | ArrowFunction; + const oldEnclosingDeclaration = setEnclosingDeclarations(node); + try { + const returnType = inferReturnType(fnNode); + const fnTypeNode = factory.createFunctionTypeNode( + visitNodes(fnNode.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone), + fnNode.parameters.map(p => deepClone(ensureParameter(p))), + returnType.typeNode, + ); + // If the return type is optimistic, teh whole function type is optimistic + const flags = mergeFlags(LocalTypeInfoFlags.None, returnType.flags) + return regular(fnTypeNode, node, flags); + } + finally { + setEnclosingDeclarations(oldEnclosingDeclaration); + } + case SyntaxKind.SatisfiesExpression: { + const typeNode = localInference((node as SatisfiesExpression).expression); + return { ...typeNode, flags: typeNode.flags | LocalTypeInfoFlags.Optimistic } + } + case SyntaxKind.TypeAssertionExpression: + case SyntaxKind.AsExpression: + const asExpression = node as AsExpression | TypeAssertion; + if (isTypeReferenceNode(asExpression.type) && isConst(asExpression.type)) { + return localInference(asExpression.expression, NarrowBehavior.AsConst); + } + else { + const type = visitType(asExpression.type, asExpression); + if (isLiteralTypeNode(type) && + (isNoSubstitutionTemplateLiteral(type.literal) || isStringLiteral(type.literal))) { + return regular( + factory.createLiteralTypeNode( + normalizeLiteralValue(type.literal) + ), + node + ); + } + return regular(deepClone(type), node); + } + 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 fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node); + case SyntaxKind.PlusToken: + return fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node);; + } + case SyntaxKind.BigIntLiteral: + if (prefixOp.operator === SyntaxKind.MinusToken) { + return fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node);; + } + } + } + + const targetExpressionType = localInference(prefixOp.operand, inferenceFlags); + if (isLiteralTypeNode(targetExpressionType.typeNode)) { + return { + flags: targetExpressionType.flags, + typeNode: getWidenedType(targetExpressionType), + sourceNode: node + }; + } + else if (targetExpressionType.typeNode.kind === SyntaxKind.NumberKeyword || targetExpressionType.typeNode.kind === SyntaxKind.BigIntKeyword) { + return targetExpressionType; + } + } + break; + case SyntaxKind.NumericLiteral: + return literal(node, SyntaxKind.NumberKeyword, inferenceFlags); + case SyntaxKind.TemplateExpression: + if (!(inferenceFlags & NarrowBehavior.AsConst)) { + return fresh(factory.createKeywordTypeNode(SyntaxKind.StringKeyword), node); + } + const templateExpression = node as TemplateExpression; + const templateSpans: TemplateLiteralTypeSpan[] = []; + for (const span of templateExpression.templateSpans) { + const { typeNode } = localInference(span.expression, nextInferenceFlags); + const literalSpan = factory.createTemplateLiteralTypeSpan( + typeNode, + span.literal + ); + templateSpans.push(literalSpan); + } + return regular( + factory.createTemplateLiteralType(deepClone(templateExpression.head), templateSpans), + node + ); + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.StringLiteral: + return literal(node, SyntaxKind.StringKeyword, inferenceFlags); + case SyntaxKind.BigIntLiteral: + return literal(node, SyntaxKind.BigIntKeyword, inferenceFlags); + case SyntaxKind.RegularExpressionLiteral: + return literal(node, "RegExp", inferenceFlags); + case SyntaxKind.JsxSelfClosingElement: + case SyntaxKind.JsxElement: + const typeReference = finalizeSyntheticTypeNode(factory.createTypeReferenceNode(getJSXElementType(node)), node.parent); + checkEntityNameVisibility(typeReference.typeName); + return fresh(typeReference, node); + case SyntaxKind.TrueKeyword: + case SyntaxKind.FalseKeyword: + return literal(node, SyntaxKind.BooleanKeyword, inferenceFlags); + case SyntaxKind.ArrayLiteralExpression: + const arrayLiteral = node as ArrayLiteralExpression; + const elementTypesInfo: LocalTypeInfo[] = []; + for (const element of arrayLiteral.elements) { + if (isSpreadElement(element)) { + const spreadType = localInference(element.expression, nextInferenceFlags) + const elementTypeNode = inferenceFlags & NarrowBehavior.AsConst ? + factory.createRestTypeNode(spreadType.typeNode) : + factory.createIndexedAccessTypeNode(spreadType.typeNode, factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)); + + elementTypesInfo.push( + { ...spreadType, typeNode: elementTypeNode } + ); + } + else if (isOmittedExpression(element)) { + elementTypesInfo.push( + createUndefinedTypeNode(element) + ); + } else { + elementTypesInfo.push( + localInference(element, nextInferenceFlags) + ); + } + } + if (inferenceFlags & NarrowBehavior.AsConst) { + const tupleType = factory.createTupleTypeNode( + elementTypesInfo.map(lti => lti.typeNode) + ); + tupleType.emitNode = { flags: 1 }; + return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node); + } + else { + let itemType; + if (elementTypesInfo.length === 0) { + itemType = (strictNullChecks ? factory.createKeywordTypeNode(SyntaxKind.NeverKeyword) : factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)); + } + else { + itemType = makeUnionFromTypes(node, elementTypesInfo, /*widenSingle*/ false).typeNode; + } + + return regular(factory.createArrayTypeNode(itemType), node); + } + case SyntaxKind.ObjectLiteralExpression: { + const objectLiteral = node as ObjectLiteralExpression; + const properties: TypeElement[] = []; + let addedIntersections: TypeNode[] | undefined; + + for (let propIndex = 0, length = objectLiteral.properties.length; propIndex < length; propIndex++) { + const prop = objectLiteral.properties[propIndex] + if (prop.name && isComputedPropertyName(prop.name) && isEntityNameExpression(prop.name.expression)) { + checkEntityNameVisibility(prop.name.expression, prop); + } + const name = prop.name && deepClone(visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!); + let newProp; + if (isMethodDeclaration(prop) && name) { + const oldEnclosingDeclaration = setEnclosingDeclarations(prop); + try { + const returnType = inferReturnType(prop); + const typeParameters = visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone); + const parameters = prop.parameters.map(p => deepClone(ensureParameter(p))); + if (inferenceFlags & NarrowBehavior.AsConst) { + newProp = factory.createPropertySignature( + [factory.createModifier(SyntaxKind.ReadonlyKeyword)], + name, + /*questionToken*/ undefined, + factory.createFunctionTypeNode( + typeParameters, + parameters, + returnType.typeNode, + ) + ); + } + else { + newProp = factory.createMethodSignature( + [], + name, + /*questionToken*/ undefined, + typeParameters, + parameters, + returnType.typeNode, + ); + } + } finally { + setEnclosingDeclarations(oldEnclosingDeclaration); + } + } + else if (isPropertyAssignment(prop) && name) { + const modifiers = inferenceFlags & NarrowBehavior.AsConst ? + [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : + []; + newProp = factory.createPropertySignature( + modifiers, + name, + /*questionToken*/ undefined, + localInference(prop.initializer, nextInferenceFlags).typeNode + ); + } + else if (isShorthandPropertyAssignment(prop) && name) { + const modifiers = inferenceFlags & NarrowBehavior.AsConst ? + [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : + []; + newProp = factory.createPropertySignature( + modifiers, + name, + /*questionToken*/ undefined, + localInference(prop.name, nextInferenceFlags).typeNode + ); + } + else if (isSpreadAssignment(prop)) { + addedIntersections ??= []; + addedIntersections.push(localInference(prop.expression, nextInferenceFlags).typeNode) + } + else { + if (isGetAccessorDeclaration(prop) || isSetAccessorDeclaration(prop)) { + const nameKey = getMemberKey(prop); + if (nameKey && name) { + const { getAccessor, setAccessor, otherAccessorIndex } = getAccessorInfo(objectLiteral.properties, prop); + if (otherAccessorIndex === -1 || otherAccessorIndex > propIndex) { + const accessorType = inferAccessorType(getAccessor, setAccessor); + const modifiers: Modifier[] = [] + if (!setAccessor) { + modifiers.push(factory.createModifier(SyntaxKind.ReadonlyKeyword)) + } + + newProp = factory.createPropertySignature( + modifiers, + name, + /*questionToken*/ undefined, + accessorType, + ); + } + } else { + return invalid(prop); + } + } else { + return invalid(prop); + } + } + + if (newProp) { + const prevPos = newProp.name.pos; + const newPos = getTokenPosOfNode(newProp.name, currentSourceFile); + + setTextRange(newProp.name, { + pos: newPos, + end: newProp.name.end + }); + setTextRange(newProp, { + pos: prevPos, + end: newProp.name.end, + }) + setCommentRange(newProp, { + pos: prevPos, + end: newProp.name.pos + }) + + properties.push(newProp) + } + } + + let typeNode: TypeNode = factory.createTypeLiteralNode(properties); + if (addedIntersections) { + if (properties.length !== 0) { + addedIntersections.push(typeNode); + } + typeNode = factory.createIntersectionTypeNode(addedIntersections); + } + return regular(typeNode, objectLiteral); + } + case SyntaxKind.ConditionalExpression: + const conditionalExpression = node as ConditionalExpression; + const types = [ + localInference(conditionalExpression.whenTrue, inferenceFlags & ~NarrowBehavior.AsConst), + localInference(conditionalExpression.whenFalse, inferenceFlags & ~NarrowBehavior.AsConst), + ] + return makeUnionFromTypes(node, types, /*widenSingle*/ false); + } + + return regular(makeInvalidTypeAndReport(node), node); + } + function invalid(node: Node): LocalTypeInfo { + return { typeNode: makeInvalidTypeAndReport(node), flags: LocalTypeInfoFlags.Invalid, sourceNode: node }; + } + function fresh(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { + return { typeNode: finalizeSyntheticTypeNode(typeNode, sourceNode.parent), flags: flags | LocalTypeInfoFlags.Fresh, sourceNode }; + } + function regular(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { + return { typeNode: finalizeSyntheticTypeNode(typeNode, sourceNode.parent), flags, sourceNode }; + } + 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(node: Node, flags = LocalTypeInfoFlags.None) { + if (strictNullChecks) { + return regular( + factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword) + , node, flags); + } + else { + return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.ImplicitAny | flags); + } + } + function literal(node: Node, baseType: string | KeywordTypeSyntaxKind, narrowBehavior: NarrowBehavior) { + if (narrowBehavior & NarrowBehavior.AsConstOrKeepLiterals) { + return fresh(factory.createLiteralTypeNode( + normalizeLiteralValue(node as LiteralExpression) + ), node); + } + else { + return fresh( + typeof baseType === "number" ? factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType), + node + ); + } + } + function isConst(typeReference: TypeReferenceNode) { + return isIdentifier(typeReference.typeName) && typeReference.typeName.escapedText === "const"; + } + function makeInvalidTypeAndReport(node: Node) { + reportIsolatedDeclarationError(node); + return makeInvalidType() as TypeReferenceNode; + } + function visitType(type: TypeNode | undefined, owner: Node) { + const visitedType = visitNode(type, visitDeclarationSubtree, isTypeNode); + return visitedType ?? makeInvalidTypeAndReport(owner); + } + + function getMemberKey(member: MethodSignature | PropertySignature | GetAccessorDeclaration | SetAccessorDeclaration) { + if (isIdentifier(member.name)) { + return "I:" + member.name.escapedText; + } + if (isStringLiteral(member.name)) { + return "S:" + member.name.text + } + if (isNumericLiteral(member.name)) { + return "N:" + (+member.name.text) + } + if (isComputedPropertyName(member.name)) { + let fullId = "C:"; + let computedName = member.name.expression; + // We only support dotted identifiers as property keys + while (true) { + if (isIdentifier(computedName)) { + fullId += computedName.escapedText; + break; + } + else if (isPropertyAccessExpression(computedName)) { + fullId += computedName.name.escapedText; + computedName = computedName.expression; + } + else { + // Can't compute a property key, bail + return undefined; + } + } + return fullId; + } + return undefined; + } + + function getWidenedType(localTypeInfo: LocalTypeInfo) { + if ((localTypeInfo.flags & LocalTypeInfoFlags.Fresh) && isLiteralTypeNode(localTypeInfo.typeNode)) { + const literal = localTypeInfo.typeNode.literal; + return ( + literal.kind === SyntaxKind.StringLiteral ? factory.createKeywordTypeNode(SyntaxKind.StringKeyword) : + literal.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : + literal.kind === SyntaxKind.PrefixUnaryExpression && (literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : + literal.kind === SyntaxKind.BigIntLiteral ? factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword) : + literal.kind === SyntaxKind.TrueKeyword || literal.kind === SyntaxKind.FalseKeyword ? factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword) : + localTypeInfo.typeNode + ); + } + + return localTypeInfo.typeNode; + } + function makeUnionFromTypes(sourceNode: Node, types: LocalTypeInfo[], widenSingle: boolean) { + types = deduplicateUnion(types); + if (types.length === 1) { + const localType = types[0]; + return widenSingle ? { ...localType, typeNode: getWidenedType(localType) } : localType; + } + const unionConstituents = collapseLiteralTypesIntoBaseTypes(types); + + normalizeObjectUnion(unionConstituents); + return regular( + unionConstituents.length === 1 ? unionConstituents[0] : factory.createUnionTypeNode(unionConstituents), + sourceNode, + LocalTypeInfoFlags.Optimistic + ); + + function collapseLiteralTypesIntoBaseTypes(nodes: LocalTypeInfo[]) { + enum CollapsibleTypes { + None = 0, + String = 1 << 1, + Number = 1 << 2, + True = 1 << 3, + False = 1 << 4, + Boolean = True | False, + BigInt = 1 << 5, + Any = 1 << 7, + ImplicitAny = 1 << 8 + } + let baseTypes = CollapsibleTypes.None; + let literalTypes = CollapsibleTypes.None; + for (const type of nodes) { + switch (type.typeNode.kind) { + case SyntaxKind.TemplateLiteralType: + literalTypes |= CollapsibleTypes.String; + break; + case SyntaxKind.AnyKeyword: + if (type.flags & LocalTypeInfoFlags.ImplicitAny) { + literalTypes |= CollapsibleTypes.ImplicitAny; + } + else { + baseTypes |= CollapsibleTypes.Any; + } + break; + case SyntaxKind.BooleanKeyword: + baseTypes |= CollapsibleTypes.Boolean; + break; + case SyntaxKind.StringKeyword: + baseTypes |= CollapsibleTypes.String; + break; + case SyntaxKind.NumberKeyword: + baseTypes |= CollapsibleTypes.Number; + break; + case SyntaxKind.BigIntKeyword: + baseTypes |= CollapsibleTypes.BigInt; + break; + case SyntaxKind.LiteralType: + const literalType = type.typeNode as LiteralTypeNode; + switch (literalType.literal.kind) { + case SyntaxKind.TrueKeyword: + literalTypes |= CollapsibleTypes.True; + break; + case SyntaxKind.FalseKeyword: + literalTypes |= CollapsibleTypes.False; + break; + case SyntaxKind.NumericLiteral: + literalTypes |= CollapsibleTypes.Number; + break; + case SyntaxKind.PrefixUnaryExpression: + if ((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { + literalTypes |= CollapsibleTypes.Number; + } + break; + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.TemplateExpression: + literalTypes |= CollapsibleTypes.String; + break; + case SyntaxKind.BigIntLiteral: + literalTypes |= CollapsibleTypes.BigInt; + break; + } + } + } + // If true and false are both present, act as if we found boolean itself + if ((literalTypes & CollapsibleTypes.Boolean) === CollapsibleTypes.Boolean) { + baseTypes |= CollapsibleTypes.Boolean; + } + const typesToCollapse = baseTypes & literalTypes; + + if (baseTypes & CollapsibleTypes.Any) { + return [factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)]; + } + // Nothing to collapse or reorder + if (baseTypes === CollapsibleTypes.None) return nodes.map(n => n.typeNode); + const result: TypeNode[] = []; + + // We do a best effort to preserve TS union order for primitives + if (baseTypes & CollapsibleTypes.String) { + result.push(factory.createKeywordTypeNode(SyntaxKind.StringKeyword)); + } + if (baseTypes & CollapsibleTypes.Number) { + result.push(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)); + } + if (baseTypes & CollapsibleTypes.Boolean) { + result.push(factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword)); + } + if (baseTypes & CollapsibleTypes.BigInt) { + result.push(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword)); + } + if (!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.True) { + result.push(factory.createLiteralTypeNode(factory.createTrue())); + } + if (!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.False) { + result.push(factory.createLiteralTypeNode(factory.createFalse())); + } + + for (const type of nodes) { + let typeofNode = CollapsibleTypes.None; + + switch (type.typeNode.kind) { + case SyntaxKind.BooleanKeyword: + case SyntaxKind.StringKeyword: + case SyntaxKind.NumberKeyword: + case SyntaxKind.BigIntKeyword: + case SyntaxKind.AnyKeyword: + // They were already added + continue; + case SyntaxKind.TemplateLiteralType: + typeofNode = CollapsibleTypes.String; + break; + case SyntaxKind.LiteralType: + const literalType = type.typeNode as LiteralTypeNode; + switch (literalType.literal.kind) { + case SyntaxKind.TrueKeyword: + continue; + case SyntaxKind.FalseKeyword: + continue; + case SyntaxKind.NumericLiteral: + typeofNode = CollapsibleTypes.Number; + break; + case SyntaxKind.PrefixUnaryExpression: + if ((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { + typeofNode = CollapsibleTypes.Number; + } + break; + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.TemplateExpression: + typeofNode = CollapsibleTypes.String; + break; + case SyntaxKind.BigIntLiteral: + typeofNode = CollapsibleTypes.BigInt; + break; + } + } + // Not a node of interest, do not change + if ((typeofNode & typesToCollapse) === 0) { + result.push(type.typeNode); + } + } + return result; + } + function deduplicateUnion(nodes: LocalTypeInfo[]) { + const typeInfoCache = new Map + }>(); + const union: LocalTypeInfo[] = []; + let implicitAnyNode: LocalTypeInfo | undefined; + for (const node of nodes) { + // Do not add implicit any unless it's the only type in the array + if (!strictNullChecks && node.flags & LocalTypeInfoFlags.ImplicitAny) { + implicitAnyNode = node; + continue; + } + const existing = union.find(u => typesEqual(node.typeNode, node.sourceNode, u.typeNode, u.sourceNode)); + if (existing === undefined) { + union.push(node); + } + else { + existing.flags &= node.flags; + } + } + if (union.length === 0 && implicitAnyNode) { + union.push(implicitAnyNode); + } + return union; + + function getTypeInfo(type: TypeLiteralNode, errorTarget: Node | undefined) { + const typeNodeId = getNodeId(type); + let typeInfo = typeInfoCache.get(typeNodeId); + if (typeInfo) return typeInfo; + + typeInfo = { + node: type, + members: new Map() + }; + for (const member of type.members) { + const isMethod = isMethodSignature(member); + const isProp = isPropertySignature(member); + if (isMethod || isProp) { + const memberKey = getMemberKey(member); + if (memberKey === undefined) { + makeInvalidTypeAndReport(errorTarget ?? member); + break; + } + typeInfo.members.set(memberKey, member); + } + else { + makeInvalidTypeAndReport(errorTarget ?? member); + } + } + typeInfoCache.set(typeNodeId, typeInfo); + return typeInfo; + } + function entityNameEqual(aTypeName: EntityName, bTypeName: EntityName) { + while (true) { + if (aTypeName.kind === SyntaxKind.QualifiedName && bTypeName.kind === SyntaxKind.QualifiedName) { + if (aTypeName.right.escapedText !== bTypeName.right.escapedText) return false; + aTypeName = aTypeName.left; + bTypeName = bTypeName.left; + } + else if (aTypeName.kind === SyntaxKind.Identifier && bTypeName.kind === SyntaxKind.Identifier) { + return aTypeName.escapedText === bTypeName.escapedText; + } + else { + return false; + } + } + } + function signatureEqual(a: SignatureDeclaration, aErrorTarget: Node | undefined, b: SignatureDeclaration, bErrorTarget: Node | undefined) { + if (!typesEqual(a.type, aErrorTarget, b.type, bErrorTarget)) { + return false; + } + if (a.parameters.length !== b.parameters.length) { + return false; + } + + return a.parameters.every((aParam, index) => isParameterEqual(aParam, b.parameters[index])); + + // Isolated declarations finish equality + function isParameterEqual(a: ParameterDeclaration, b: ParameterDeclaration) { + if (!!a.questionToken !== !!b.questionToken) { + return false; + } + return typesEqual(a.type, aErrorTarget, b.type, bErrorTarget); + } + } + function nodeTypeArgumentsEqual(a: NodeWithTypeArguments, aErrorTarget: Node | undefined, b: NodeWithTypeArguments, bErrorTarget: Node | undefined) { + if (a.typeArguments === undefined && b.typeArguments === undefined) { + return true; + } + if (a.typeArguments?.length !== b.typeArguments?.length) { + return false; + } + + return !!a.typeArguments?.every((aArg, index) => typesEqual(aArg, aErrorTarget, b.typeArguments?.[index], bErrorTarget)) + } + function typesEqual(a: TypeNode | undefined, aErrorTarget: Node | undefined, b: TypeNode | undefined, bErrorTarget: Node | undefined): boolean { + if (a === undefined || b === undefined) return a === b; + if (a.kind !== b.kind) return false; + switch (a.kind) { + case SyntaxKind.AnyKeyword: + case SyntaxKind.UnknownKeyword: + case SyntaxKind.NumberKeyword: + case SyntaxKind.BigIntKeyword: + case SyntaxKind.ObjectKeyword: + case SyntaxKind.BooleanKeyword: + case SyntaxKind.StringKeyword: + case SyntaxKind.SymbolKeyword: + case SyntaxKind.VoidKeyword: + case SyntaxKind.UndefinedKeyword: + case SyntaxKind.NeverKeyword: + return true; + } + if (isLiteralTypeNode(a) && isLiteralTypeNode(b)) { + let aLiteral = a.literal; + let bLiteral = b.literal; + while (true) { + switch (aLiteral.kind) { + case SyntaxKind.NullKeyword: + case SyntaxKind.TrueKeyword: + case SyntaxKind.FalseKeyword: + return aLiteral.kind === bLiteral.kind; + case SyntaxKind.NumericLiteral: + return aLiteral.kind === bLiteral.kind && +aLiteral.text === +(bLiteral).text; + case SyntaxKind.StringLiteral: + case SyntaxKind.NoSubstitutionTemplateLiteral: + return (bLiteral.kind === SyntaxKind.StringLiteral || bLiteral.kind === SyntaxKind.NoSubstitutionTemplateLiteral) + && aLiteral.text === (bLiteral).text; + case SyntaxKind.PrefixUnaryExpression: + const aUnary = (aLiteral as PrefixUnaryExpression); + const bUnary = (bLiteral as PrefixUnaryExpression); + if (aUnary.operator !== bUnary.operator) return false; + + aLiteral = aUnary.operand as LiteralExpression; + bLiteral = bUnary.operand as LiteralExpression; + return +aLiteral.text === +bLiteral.text; + default: + return false; + } + } + } + else if (isArrayTypeNode(a) && isArrayTypeNode(b)) { + return typesEqual(a.elementType, aErrorTarget, b.elementType, bErrorTarget); + } + else if (isTypeReferenceNode(a) && isTypeReferenceNode(b)) { + if (!entityNameEqual(a.typeName, b.typeName)) { + return false; + } + return nodeTypeArgumentsEqual(a, aErrorTarget, b, bErrorTarget); + } + else if (isTypeLiteralNode(a) && isTypeLiteralNode(b)) { + if (a.members.length !== b.members.length) return false; + const aTypeInfo = getTypeInfo(a, aErrorTarget); + if (!aTypeInfo) return false; + + for (const bMember of b.members) { + const bIsMethod = isMethodSignature(bMember); + const bIsProp = isPropertySignature(bMember); + if (bIsMethod || bIsProp) { + const memberKey = getMemberKey(bMember); + if (memberKey === undefined) { + makeInvalidTypeAndReport(bErrorTarget ?? bMember); + break; + } + const aMember = aTypeInfo.members.get(memberKey); + if (!aMember) return false; + if ((aMember.questionToken !== undefined) !== (bMember.questionToken !== undefined)) return false; + if (getSyntacticModifierFlags(aMember) !== getSyntacticModifierFlags(bMember)) return false; + if (bIsProp && isPropertySignature(aMember)) { + if (!typesEqual(aMember.type, aErrorTarget, bMember.type, bErrorTarget)) { + return false; + } + } + else if (bIsMethod && isMethodSignature(aMember)) { + return signatureEqual(aMember, aErrorTarget, bMember, bErrorTarget) + } + } + else { + makeInvalidTypeAndReport(bErrorTarget ?? bMember); + } + } + return true; + } + else if (isFunctionTypeNode(a) && isFunctionTypeNode(b)) { + return signatureEqual(a, aErrorTarget, b, bErrorTarget); + } + else if (isConstructorTypeNode(a) && isConstructorTypeNode(b)) { + return signatureEqual(a, aErrorTarget, b, bErrorTarget); + } + else if (isTypeQueryNode(a) && isTypeQueryNode(b)) { + if (!entityNameEqual(a.exprName, b.exprName)) { + return false; + } + return nodeTypeArgumentsEqual(a, aErrorTarget, b, bErrorTarget); + } + else { + return false; + } + } + } + function normalizeObjectUnion(nodes: (TypeNode | undefined)[]) { + const allProps = new Map(); + const allTypeLookup = new Array | undefined>(); + let hasChanged = false; + for (let i = 0; i < nodes.length; i++) { + const type = nodes[i]; + const typeLookup = new Map(); + allTypeLookup.push(typeLookup); + + if (!type || !isTypeLiteralNode(type)) continue; + for (const member of type.members) { + const isMethod = isMethodSignature(member); + const isProp = isPropertySignature(member); + if (isMethod || isProp) { + const memberKey = getMemberKey(member); + if (memberKey === undefined) { + nodes[i] = makeInvalidTypeAndReport(member.name); + allTypeLookup[i] = undefined; + hasChanged = true; + break; + } + let type; + if (isProp) { + type = member.type ?? makeInvalidTypeAndReport(member); + } + else { + type = factory.createFunctionTypeNode( + member.typeParameters, + member.parameters, + member.type!, + ); + } + let propInfo = allProps.get(memberKey); + if (!propInfo) { + propInfo = { + types: new Array(nodes.length), + name: member.name, + isReadonly: false, + }; + allProps.set(memberKey, propInfo); + } + propInfo.types[i] = type; + propInfo.isReadonly ||= !!(getSyntacticModifierFlags(member) & ModifierFlags.Readonly) + typeLookup.set(memberKey, type); + } + else { + nodes[i] = makeInvalidTypeAndReport(member); + allTypeLookup[i] = undefined; + hasChanged = true; + break; + } + } + } + for (const [, propTypes] of allProps) { + normalizeObjectUnion(propTypes.types); + } + for (let typeIndex = 0; typeIndex < nodes.length; typeIndex++) { + const type = nodes[typeIndex]; + const props = allTypeLookup[typeIndex]; + if (!type || !isTypeLiteralNode(type) || !props) continue; + + let newMembers: TypeElement[] | undefined; + for (const [commonProp, propInfo] of allProps) { + const propType = props.get(commonProp); + if (propType) { + if (propType !== propInfo.types[typeIndex]) { + const indexOfProp = findIndex(type.members, e => isPropertySignature(e) && getMemberKey(e) === commonProp); + if (indexOfProp !== -1) { + if (newMembers === undefined) { + newMembers = [...type.members]; + } + const existingMember = type.members[indexOfProp] as PropertySignature; + newMembers[indexOfProp] = factory.createPropertySignature( + existingMember.modifiers, + existingMember.name, + existingMember.questionToken, + propInfo.types[typeIndex] + ); + } + } + } + else { + if (newMembers === undefined) { + newMembers = [...type.members]; + } + newMembers.push(factory.createPropertySignature( + propInfo.isReadonly ? [factory.createToken(SyntaxKind.ReadonlyKeyword)] : undefined, + deepClone(propInfo.name), + factory.createToken(SyntaxKind.QuestionToken), + factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), + )); + } + } + if (newMembers) { + hasChanged = true; + nodes[typeIndex] = factory.createTypeLiteralNode(newMembers); + } + } + return hasChanged; + } + } + function inferReturnType(node: FunctionLikeDeclaration) { + if (node.type) { + return regular(deepClone(visitType(node.type, node)), node); + } + if (!node.body) { + return regular(makeInvalidTypeAndReport(node), node); + } + + const returnStatements: ReturnStatement[] = []; + const yieldExpressions: YieldExpression[] = []; + + let returnType; + if (!isBlock(node.body)) { + returnType = localInference(node.body, NarrowBehavior.KeepLiterals); + } + else { + collectReturnAndYield(node.body, returnStatements, yieldExpressions); + if (returnStatements.length === 0) { + returnType = regular(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), node); + } + else { + returnType = inferFromOutputs(node, returnStatements, node.asteriskToken ? SyntaxKind.NeverKeyword : SyntaxKind.VoidKeyword); + } + } + let yieldType: LocalTypeInfo | undefined; + if (node.asteriskToken) { + if (yieldExpressions.length === 0) { + yieldType = regular( + factory.createKeywordTypeNode(SyntaxKind.NeverKeyword), + node + ); + } + else { + yieldType = inferFromOutputs(node, yieldExpressions, strictNullChecks ? SyntaxKind.UndefinedKeyword : SyntaxKind.AnyKeyword); + } + } + return makeFinalReturnType(node, returnType, yieldType); + + function inferFromOutputs(node: Node, statements: (YieldExpression | ReturnStatement)[], emptyType: KeywordTypeSyntaxKind) { + const returnStatementInference: LocalTypeInfo[] = []; + let hasOnlyEmpty = true; + for (let r of statements) { + if (r.expression) { + returnStatementInference.push(localInference(r.expression, NarrowBehavior.KeepLiterals)); + hasOnlyEmpty = false; + } else { + returnStatementInference.push( + createUndefinedTypeNode(r, LocalTypeInfoFlags.Fresh) + ); + } + }; + if (hasOnlyEmpty) { + return fresh(factory.createKeywordTypeNode(emptyType), node); + } else { + return makeUnionFromTypes(node, returnStatementInference, /*widenSingle*/ true); + } + } + function makeFinalReturnType(node: FunctionLikeDeclaration, returnType: LocalTypeInfo, yieldType: LocalTypeInfo | undefined) { + const modifiers = getEffectiveModifierFlags(node); + if (node.asteriskToken) { + const yieldTypeNode = yieldType?.typeNode ?? factory.createKeywordTypeNode(SyntaxKind.VoidKeyword); + return regular( + factory.createTypeReferenceNode( + factory.createIdentifier(modifiers & ModifierFlags.Async ? "AsyncGenerator" : "Generator"), + [yieldTypeNode, returnType.typeNode, factory.createKeywordTypeNode(SyntaxKind.UnknownKeyword)], + ), + returnType.sourceNode, + returnType.flags + ); + } + else if (modifiers & ModifierFlags.Async) { + return regular( + factory.createTypeReferenceNode( + factory.createIdentifier("Promise"), + [returnType.typeNode], + ), + returnType.sourceNode, + returnType.flags + ); + } + return returnType; + } + function collectReturnAndYield(node: Node, result: ReturnStatement[], yieldExpressions: YieldExpression[]) { + forEachChild(node, child => { + if (isReturnStatement(child)) { + result.push(child); + } + if (isYieldExpression(child)) { + yieldExpressions.push(child); + } + if (isClassLike(child) || isFunctionLike(child)) { + return; + } + // TODO: Do not walk all children if not generator function + collectReturnAndYield(child, result, yieldExpressions); + }); + } + } + function inferFunctionMembers(scope: { statements: NodeArray }, functionName: Identifier, localType: LocalTypeInfo): LocalTypeInfo { + if (!isFunctionTypeNode(localType.typeNode)) return localType; + let inferredMembers: TypeElement[] | undefined; + for (let i = 0; i < scope.statements.length; i++) { + const statement = scope.statements[i]; + // Looking for name functionName.member = init; + if (isExpressionStatement(statement) + && isBinaryExpression(statement.expression) + && isPropertyAccessExpression(statement.expression.left) + && isIdentifier(statement.expression.left.expression) + && statement.expression.left.expression.escapedText === functionName.escapedText) { + (inferredMembers ??= []).push(factory.createPropertySignature( + [], + statement.expression.left.name, + undefined, + localInference(statement.expression.right).typeNode + )); + } + } + if (inferredMembers) { + inferredMembers.push( + factory.createCallSignature( + localType.typeNode.typeParameters, + localType.typeNode.parameters, + localType.typeNode.type + ) + ); + return { + sourceNode: localType.sourceNode, + flags: localType.flags, + typeNode: factory.createTypeLiteralNode( + inferredMembers + ), + } + } + return localType; + } + + // Copied similar function in checker. Maybe a reusable one should be created. + 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 localInferenceFromInitializer(node: HasInferredType | ExportAssignment): TypeNode | undefined { + if (NO_LOCAL_INFERENCE) { + return undefined; + } + let localType; + let actualTypeNode: Node = node; + if (isExportAssignment(node) && node.expression) { + localType = localInference(node.expression); + actualTypeNode = node.expression; + } + else if (isParameter(node) && node.initializer) { + localType = localInference(node.initializer); + } + else if (isVariableDeclaration(node) && node.initializer) { + + localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals : NarrowBehavior.None); + if (isVariableStatement(node.parent.parent) && + node.parent.flags & NodeFlags.Const && + isIdentifier(node.name) && + (isBlock(node.parent.parent.parent) || isSourceFile(node.parent.parent.parent))) { + localType = inferFunctionMembers(node.parent.parent.parent, node.name, localType); + } + } + else if (isPropertyDeclaration(node) && node.initializer) { + localType = localInference(node.initializer); + } + else if (isFunctionDeclaration(node)) { + localType = inferReturnType(node); + } + else if (isMethodDeclaration(node)) { + localType = inferReturnType(node); + } + else if (isGetAccessorDeclaration(node)) { + localType = inferReturnType(node); + } + if (localType) { + const typeNode = localType.typeNode; + setParent(typeNode, node); + const result = resolver.isSyntheticTypeEquivalent(actualTypeNode, typeNode, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit); + if (result !== true) { + result.forEach(r => context.addDiagnostic(r as DiagnosticWithLocation)); + // we should add the extra diagnostics here + return makeInvalidType(); + } + } + return localType?.typeNode; + } +} \ No newline at end of file diff --git a/external-declarations/src/compiler/path-utils.ts b/external-declarations/src/compiler/path-utils.ts index 59422a66480af..cc102c83fc16d 100644 --- a/external-declarations/src/compiler/path-utils.ts +++ b/external-declarations/src/compiler/path-utils.ts @@ -1077,6 +1077,7 @@ export function isJSONFile(f: string) { } export function isTypeScriptFile(f: string) { return f.endsWith(Extension.Ts) + || f.endsWith(Extension.Tsx) || f.endsWith(Extension.Mts) || f.endsWith(Extension.Cts); } diff --git a/external-declarations/src/compiler/perf-tracer.ts b/external-declarations/src/compiler/perf-tracer.ts new file mode 100644 index 0000000000000..bca82731b1f7e --- /dev/null +++ b/external-declarations/src/compiler/perf-tracer.ts @@ -0,0 +1,29 @@ +export let tracer: { + current: undefined | { + times: Record; + increment(name: string): void; + start(name: string): void; + end(name: string): void; + }; +} = { + current: undefined +}; + +export function installTracer() { + const times: Record = {}; + const startTimes: Record = {}; + tracer.current = { + times, + start(name: string) { + startTimes[name] = Date.now(); + }, + increment(name: string) { + times[name] = (times[name] ?? 0) + 1; + }, + end(name: string) { + times[name] = (times[name] ?? 0) + + (Date.now() - (startTimes[name] ?? Date.now())); + startTimes[name] = undefined; + }, + } +}; \ No newline at end of file diff --git a/external-declarations/src/compiler/transform-file.ts b/external-declarations/src/compiler/transform-file.ts index 8d9320e49c265..73f0e8308d30c 100644 --- a/external-declarations/src/compiler/transform-file.ts +++ b/external-declarations/src/compiler/transform-file.ts @@ -4,16 +4,15 @@ import { transformDeclarations } from './declaration-emit'; import { createEmitHost } from './emit-host'; import { createEmitResolver } from './emit-resolver'; import { TransformationContext } from './types'; +import { tracer } from './perf-tracer'; - - -export function transformFile(fileName: string, source: string, allProjectFiles: string[], tsLibFiles: string[], options: ts.CompilerOptions, moduleType: ts.ResolutionMode) { +export function transformFile(sourceFile: ts.SourceFile, allProjectFiles: string[], tsLibFiles: string[], options: ts.CompilerOptions, moduleType: ts.ResolutionMode) { - let sourceFile = ts.createSourceFile(fileName, source, options.target ?? ts.ScriptTarget.ES3, true, - fileName.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS); const getCompilerOptions = () => options; + tracer.current?.start("bind") const emitResolver = createEmitResolver(sourceFile, options, moduleType); const emitHost = createEmitHost(allProjectFiles, tsLibFiles, options); + tracer.current?.end("bind") const diagnostics: ts.Diagnostic[] = [] const x = transformDeclarations({ getEmitHost() { @@ -28,17 +27,24 @@ export function transformFile(fileName: string, source: string, allProjectFiles: diagnostics.push(diag) }, } as Partial as TransformationContext) - + tracer.current?.start("transform") let result = x(sourceFile); + tracer.current?.end("transform"); + tracer.current?.start("print") const printer = ts.createPrinter({ onlyPrintJsDocStyle: true, newLine: options.newLine ?? ts.NewLineKind.CarriageReturnLineFeed, target: options.target, } as ts.PrinterOptions) - return { - code: printer.printFile(result), - diagnostics, - }; + try { + return { + code: printer.printFile(result), + diagnostics, + }; + } + finally { + tracer.current?.end("print") + } } diff --git a/external-declarations/src/compiler/transform-project.ts b/external-declarations/src/compiler/transform-project.ts new file mode 100644 index 0000000000000..d36caec102c42 --- /dev/null +++ b/external-declarations/src/compiler/transform-project.ts @@ -0,0 +1,64 @@ +import path = require("path"); +import ts = require("typescript"); +import { normalizePath, changeAnyExtension } from "./path-utils"; +import { transformFile } from "./transform-file"; +import { tracer } from "./perf-tracer"; + + + +export type CancellationToken = { isCancelled: boolean }; +export function transformProject( + projectPath: string, + files: string[] | undefined, + options: ts.CompilerOptions, + host: ts.CompilerHost, + cancellationToken: CancellationToken +) { + tracer.current?.start("readFiles") + const rootDir = options.rootDir ? normalizePath(path.resolve(path.join(projectPath, options.rootDir))) : normalizePath(projectPath); + files ??= host.readDirectory!(rootDir, [".ts", ".tsx"], ["**/*.d.ts"], []); + tracer.current?.end("readFiles") + transformProjectFiles(rootDir, files, host, options, cancellationToken); + return rootDir +} + + +function ensureDirRecursive(dirPath: string, host: ts.CompilerHost) { + if(!host.directoryExists!(dirPath)) { + let parent = path.dirname(dirPath); + ensureDirRecursive(parent, host); + (host as any).createDirectory(dirPath) + } +} +function joinToRootIfNeeded(rootDir: string, existingPath: string) { + return normalizePath(path.isAbsolute(existingPath) ? existingPath : path.resolve(path.join(rootDir, existingPath))); +} +export function transformProjectFiles(rootDir: string, files: string[], host: ts.CompilerHost, options: ts.CompilerOptions, cancellationToken: CancellationToken) { + + const declarationDir = + options.declarationDir? joinToRootIfNeeded(rootDir, options.declarationDir) : + options.outDir? joinToRootIfNeeded(rootDir,options.outDir) : + undefined; + for (let file of files.map(normalizePath)) { + try { + tracer.current?.start("parse") + const source = host.getSourceFile(file, options.target ?? ts.ScriptTarget.ES2015); + tracer.current?.end("parse") + if(cancellationToken.isCancelled) return; + if(!source) continue; + + const actualDeclaration = transformFile(source, [], [], options, ts.ModuleKind.ESNext); + const output = + declarationDir? changeAnyExtension(file.replace(rootDir, declarationDir), ".d.ts"): + changeAnyExtension(file, ".d.ts"); + const dirPath = path.dirname(output); + ensureDirRecursive(dirPath, host) + tracer.current?.start("write") + host.writeFile(output, actualDeclaration.code, false); + tracer.current?.end("write") + } catch (e) { + console.error(`Failed to transform: ${file}`, e) + } + } + return { rootDir }; +} \ No newline at end of file diff --git a/external-declarations/src/compiler/types.ts b/external-declarations/src/compiler/types.ts index d764200e1251d..5e3cf958d951a 100644 --- a/external-declarations/src/compiler/types.ts +++ b/external-declarations/src/compiler/types.ts @@ -1,5 +1,5 @@ -import { Symbol, ClassDeclaration, CompilerOptions, DeclarationName, DiagnosticWithLocation, EnumDeclaration, FunctionDeclaration, InterfaceDeclaration, ModuleDeclaration, ModuleKind, Node, PackageJsonInfoCache, Path, QualifiedName, SourceFile, SymbolFlags, TransformationContext as _TransformationContext, TypeAliasDeclaration, VariableStatement, NodeBuilderFlags, Statement, AccessorDeclaration, BindingElement, Declaration, ElementAccessExpression, EntityName, EntityNameOrEntityNameExpression, EnumMember, ExportDeclaration, Expression, Identifier, ImportCall, ImportDeclaration, ImportEqualsDeclaration, ImportTypeNode, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertySignature, SignatureDeclaration, StringLiteralLike, TypeNode, VariableDeclaration, VariableLikeDeclaration, ModuleBlock, LiteralTypeNode, BinaryExpression, ComputedPropertyName, NamedDeclaration, StringLiteral, ParenthesizedExpression, AsExpression, NonNullExpression, PartiallyEmittedExpression, SatisfiesExpression, TypeAssertion, EntityNameExpression, HasModifiers, Modifier, ModifierFlags, Program, UnparsedSource, FileReference, EmitFlags, EmitHelper, SourceMapRange, SynthesizedComment, TextRange, NoSubstitutionTemplateLiteral, MapLike } from "typescript"; -import { AllAccessorDeclarations, AnyImportSyntax, DiagnosticMessage } from "./utils"; +import { Symbol, ClassDeclaration, CompilerOptions, DeclarationName, DiagnosticWithLocation, EnumDeclaration, FunctionDeclaration, InterfaceDeclaration, ModuleDeclaration, ModuleKind, Node, PackageJsonInfoCache, Path, QualifiedName, SourceFile, SymbolFlags, TransformationContext as _TransformationContext, TypeAliasDeclaration, VariableStatement, NodeBuilderFlags, Statement, AccessorDeclaration, BindingElement, Declaration, ElementAccessExpression, EntityName, EntityNameOrEntityNameExpression, EnumMember, ExportDeclaration, Expression, Identifier, ImportCall, ImportDeclaration, ImportEqualsDeclaration, ImportTypeNode, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertySignature, SignatureDeclaration, StringLiteralLike, TypeNode, VariableDeclaration, VariableLikeDeclaration, ModuleBlock, LiteralTypeNode, BinaryExpression, ComputedPropertyName, NamedDeclaration, StringLiteral, ParenthesizedExpression, AsExpression, NonNullExpression, PartiallyEmittedExpression, SatisfiesExpression, TypeAssertion, EntityNameExpression, HasModifiers, Modifier, ModifierFlags, Program, UnparsedSource, FileReference, EmitFlags, EmitHelper, SourceMapRange, SynthesizedComment, TextRange, NoSubstitutionTemplateLiteral, MapLike, DiagnosticMessage, Diagnostic, EmitHint, factory, NodeFactory } from "typescript"; +import { AllAccessorDeclarations, AnyImportSyntax } from "./utils"; /** @internal */ @@ -17,9 +17,49 @@ export interface TransformationContext extends _TransformationContext { /** @internal */ getEmitHelperFactory(): EmitHelperFactory; factory: _TransformationContext['factory'] & { updateModifiers(node: T, modifiers: readonly Modifier[] | ModifierFlags | undefined): T; + cloneNode(node: T): T; } } +export const nullTransformationContext: TransformationContext = { + factory: factory as any, // eslint-disable-line object-shorthand + getCompilerOptions: () => ({}), + getEmitResolver: notImplemented, + getEmitHost: notImplemented, + getEmitHelperFactory: notImplemented, + startLexicalEnvironment: noop, + resumeLexicalEnvironment: noop, + suspendLexicalEnvironment: noop, + endLexicalEnvironment: returnUndefined, + hoistVariableDeclaration: noop, + hoistFunctionDeclaration: noop, + requestEmitHelper: noop, + readEmitHelpers: notImplemented, + enableSubstitution: noop, + enableEmitNotification: noop, + isSubstitutionEnabled: notImplemented, + isEmitNotificationEnabled: notImplemented, + onSubstituteNode: noEmitSubstitution, + onEmitNode: noEmitNotification, + addDiagnostic: noop, +}; +export function notImplemented(): never { + throw new Error("Not implemented"); +} +export function returnUndefined(): undefined { + return undefined; +} +export function noop(_?: unknown): void { } +/** @internal */ +export function noEmitSubstitution(_hint: EmitHint, node: Node) { + return node; +} + +/** @internal */ +export function noEmitNotification(hint: EmitHint, node: Node, callback: (hint: EmitHint, node: Node) => void) { + callback(hint, node); +} + export interface EmitHost extends ModuleSpecifierResolutionHost, ResolveModuleNameResolutionHost { getCommonSourceDirectory(): string getCompilerOptions(): CompilerOptions @@ -29,6 +69,7 @@ export interface EmitHost extends ModuleSpecifierResolutionHost, ResolveModuleNa } export interface EmitResolver { + isSyntheticTypeEquivalent(actualTypeNode: Node, typeNode: TypeNode, message: DiagnosticMessage): Diagnostic[] | true; hasGlobalName(name: string): boolean; getReferencedExportContainer(node: Identifier, prefixLocals?: boolean): SourceFile | ModuleDeclaration | EnumDeclaration | undefined; getReferencedImportDeclaration(node: Identifier): Declaration | undefined; diff --git a/external-declarations/src/main.ts b/external-declarations/src/main.ts index 4b4a709094a31..5fb65975e1980 100644 --- a/external-declarations/src/main.ts +++ b/external-declarations/src/main.ts @@ -6,6 +6,8 @@ import { transformFile } from './compiler/transform-file'; import { ArgType, parseArgs } from './utils/cli-parser'; import { ensureDir, readAllFiles } from './utils/fs-utils'; import { changeAnyExtension, normalizePath } from './compiler/path-utils'; +import { CancellationToken, transformProject } from './compiler/transform-project'; +import { installTracer, tracer } from './compiler/perf-tracer'; (ts as any).Debug.enableDebugInfo(); @@ -24,7 +26,7 @@ const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2 }, declarationDir: { type: ArgType.String(), - description: "Keep watching", + description: "Output dir", } }); printUsageOnErrors(); @@ -77,37 +79,17 @@ async function main(cancellationToken: CancellationToken, msDelay: number) { console.log("Detected changes rebuilding") + installTracer() const tsconfig = ts.readConfigFile(projectConfig, ts.sys.readFile); const parsed = ts.parseJsonConfigFileContent(tsconfig.config, ts.sys, "./"); const options = parsed.options; - const rootDir = options.rootDir ? normalizePath(path.resolve(path.join(projectPath, options.rootDir))) : projectPath; - const files = parsedArgs.default ?? readAllFiles(rootDir, /.*\.ts/).filter(t => !/[\\/]node_modules[\\/]/.exec(t)); - + if(parsedArgs.declarationDir) { + options.declarationDir = parsedArgs.declarationDir; + } + const host = ts.createCompilerHost(options, true); + const rootDir = await transformProject(path.dirname(projectConfig), undefined, options, host, cancellationToken) + console.log(tracer.current?.times); watch(rootDir); if(cancellationToken.isCancelled) return; - await transformProjectFiles(rootDir, files, options, cancellationToken); } main(lastRunCancellation, 0); - -type CancellationToken = { isCancelled: boolean }; -async function transformProjectFiles(rootDir: string, files: string[], options: ts.CompilerOptions, cancellationToken: CancellationToken) { - - const declarationDir = parsedArgs.declarationDir ? normalizePath(path.resolve(parsedArgs.declarationDir)) : - options.outDir ? normalizePath(path.resolve(options.outDir)) : - undefined; - for (let file of files) { - try { - const source = await fsp.readFile(file, { encoding: "utf8" }); - if(cancellationToken.isCancelled) return; - const actualDeclaration = transformFile(file, source, [], [], options, ts.ModuleKind.ESNext); - const output = - declarationDir? changeAnyExtension(file.replace(rootDir, declarationDir), ".d.ts"): - changeAnyExtension(file, ".d.ts"); - await ensureDir(path.dirname(output)); - await fsp.writeFile(output, actualDeclaration.code); - } catch (e) { - console.error(`Failed to transform: ${file}`, e) - } - } - return { rootDir }; -} \ No newline at end of file diff --git a/external-declarations/src/test-runner/utils.ts b/external-declarations/src/test-runner/utils.ts index fd8bde407ad2a..0129ba47a8bc9 100644 --- a/external-declarations/src/test-runner/utils.ts +++ b/external-declarations/src/test-runner/utils.ts @@ -45,10 +45,12 @@ export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings return createHarnessTestFile(unit); }); + if (settings.isolatedDeclarations === undefined) { + settings.isolatedDeclarations = true; + } const result = compileFiles(toBeCompiled, [], { declaration: "true", // declarationMap: "true", - isolatedDeclarations: "true", removeComments: "false", }, settings, undefined); @@ -90,7 +92,9 @@ export function runIsolated(caseData: TestCaseParser.TestCaseContent, libFiles: const results = caseData.testUnitData .filter(isRelevantTestFile) .map(file => { - const declaration = transformFile(toSrc(file.name), Utils.removeByteOrderMark(file.content), projectFiles, libs, settings, packageResolution) + const sourceFile = ts.createSourceFile(toSrc(file.name), Utils.removeByteOrderMark(file.content), settings.target ?? ts.ScriptTarget.ES2015, true, + file.name.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS) + const declaration = transformFile(sourceFile, projectFiles, libs, settings, packageResolution) return { content: declaration.code, fileName: changeExtension(file.name, getDeclarationExtension(file.name)), diff --git a/external-declarations/tests/source/binder/re-exported-import-visibility.ts b/external-declarations/tests/source/binder/re-exported-import-visibility.ts index 7a5f57dc7121f..672639b9b6e29 100644 --- a/external-declarations/tests/source/binder/re-exported-import-visibility.ts +++ b/external-declarations/tests/source/binder/re-exported-import-visibility.ts @@ -1,5 +1,5 @@ // x0.d.ts -export declare let a: invalid; +export declare let a: number; // x.d.ts declare module "./observable" { diff --git a/external-declarations/tests/source/expando-functions-expressions.ts b/external-declarations/tests/source/expando-functions-expressions.ts new file mode 100644 index 0000000000000..8ea398c73065f --- /dev/null +++ b/external-declarations/tests/source/expando-functions-expressions.ts @@ -0,0 +1,2 @@ +export const x = ()=> {} +x.test = 1; \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference-not-supported/not-supported-sugegstions.ts b/external-declarations/tests/source/local-inference-not-supported/not-supported-sugegstions.ts new file mode 100644 index 0000000000000..d3ef71b0c93cb --- /dev/null +++ b/external-declarations/tests/source/local-inference-not-supported/not-supported-sugegstions.ts @@ -0,0 +1,24 @@ +// export function getCachedClientContextInfo() { +// const contextInfoCache = ""; +// return contextInfoCache; +// } + + +// // returns Generator; +// export function *returnsIterableN() { +// let x: number = (yield ""); +// } + +// // returns Generator; +// export function *returnsIterableS() { +// let x: string = (yield ""); +// } + + +// no typeof this.#other +// export class Test { +// #other = ""; +// getField() { +// return this.#other +// } +// } diff --git a/external-declarations/tests/source/local-inference/array-literal-const.ts b/external-declarations/tests/source/local-inference/array-literal-const.ts index a9071e49b65d7..73f3edf8b1d69 100644 --- a/external-declarations/tests/source/local-inference/array-literal-const.ts +++ b/external-declarations/tests/source/local-inference/array-literal-const.ts @@ -1,9 +1,16 @@ // @strict:true,false +// @target: es2015 export let arr = [1, 2, 3, -1] as const; +export let arrTrue = [true] as const; export let arr2 = ["1", 2, true, 1] as const; export let tupleWithNull = [1, null, undefined] as const; export let arrObjects = [ { foo: "A", m(): void {} }, { bar: "B" }, { bar: { baz: 1} }, -] as const; \ No newline at end of file +] as const; + + +let tuple = [1, 2, 3] as const +export const composedTuple = [0, ...tuple] as const +export const composedArray = [0, ...tuple]; \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/array-literal-mutable.ts b/external-declarations/tests/source/local-inference/array-literal-mutable.ts index 09cccc9d66f38..a6138d79a6247 100644 --- a/external-declarations/tests/source/local-inference/array-literal-mutable.ts +++ b/external-declarations/tests/source/local-inference/array-literal-mutable.ts @@ -1,4 +1,5 @@ -// @strict:false,true +// @strict:true,false +// @target: es2015 export let normalizedObjectArray = [ { foo: "" }, { bar: "" }, @@ -34,9 +35,33 @@ export let arrNestedObjects = [ { bar: { bat: 1} }, ]; -export let arrObjects = [ - { foo: "A", m(): void {} }, - { bar: "B" }, +export let arrNestedObjectsWithReadonly = [ { bar: { baz: 1} }, { bar: { bat: 1} }, -]; \ No newline at end of file + { bar: { roProp: 1} } as const, +]; + + +// TODO Uncomment when methods appear in merged union types +// export let arrObjects = [ +// { foo: "A", m(): void {} }, +// { bar: "B" }, +// { bar: { baz: 1} }, +// { bar: { bat: 1} }, +// ]; + + +export const nestedArray = [[[1, 2]], [[3, 4]]]; +export const nestedMixedArray = [[[1, 2]], [[3, 4]], [["3", "4"]]]; + + +export const functionArrayMixed = [ + (o: number) => 2, + (n: number): number => 2, + (n: string): number => 2, + (n: string): number => 2, +] + +let nrs = [1, 2, 3] +let strs = ["1", "2", "3"] +export const composedArray = [false, ...nrs, ...strs] diff --git a/external-declarations/tests/source/local-inference/class.ts b/external-declarations/tests/source/local-inference/class.ts index e0936c6abf29e..c8059197232b0 100644 --- a/external-declarations/tests/source/local-inference/class.ts +++ b/external-declarations/tests/source/local-inference/class.ts @@ -1,3 +1,6 @@ +// @strict:true,false +// @target: es2015 + class Test { method(p: string): number { return 0; diff --git a/external-declarations/tests/source/local-inference/default-export.ts b/external-declarations/tests/source/local-inference/default-export.ts new file mode 100644 index 0000000000000..504d63a507a39 --- /dev/null +++ b/external-declarations/tests/source/local-inference/default-export.ts @@ -0,0 +1,21 @@ +// @jsx: preserve +// @esModuleInterop: true +// @isolatedDeclarations:true +// @strict:true,false +// @target: es2015 + +//@fileName: some-module.ts +export let X = 1; +//@fileName: default-with-typeof.ts +import { X } from './some-module'; +export default { + X +} +//@fileName: default-with-assertion.ts +export type TestCase = { exec: () => void } +function test(): TestCase { + return null! +} + +export default test() satisfies TestCase as TestCase + diff --git a/external-declarations/tests/source/local-inference/expressions-with-assertions.ts b/external-declarations/tests/source/local-inference/expressions-with-assertions.ts index c93801de649e4..4b0c8bbcdd173 100644 --- a/external-declarations/tests/source/local-inference/expressions-with-assertions.ts +++ b/external-declarations/tests/source/local-inference/expressions-with-assertions.ts @@ -1,3 +1,6 @@ +// @strict:true,false +// @target: es2015 + //@fileName: types.ts export type Type = { foo: T }; export type UsedAsTypeParameter = { foo: string }; diff --git a/external-declarations/tests/source/local-inference/function-expression.ts b/external-declarations/tests/source/local-inference/function-expression.ts index 790f2ca1e34a4..efac725232177 100644 --- a/external-declarations/tests/source/local-inference/function-expression.ts +++ b/external-declarations/tests/source/local-inference/function-expression.ts @@ -1,3 +1,6 @@ +// @strict:true,false +// @target: es2015 + //@fileName: module-for-arrow.ts export type Used = { foo: string }; export type UsedAsReturn = { foo: string }; diff --git a/external-declarations/tests/source/local-inference/generic-nested-function.ts b/external-declarations/tests/source/local-inference/generic-nested-function.ts new file mode 100644 index 0000000000000..e68201a1a0030 --- /dev/null +++ b/external-declarations/tests/source/local-inference/generic-nested-function.ts @@ -0,0 +1,14 @@ +// @strict: true +// @target: es2015 + +export function makeEnforcePredicate(predicateName: string, predicate: (v: unknown) => v is V) { + return (object: T, key: keyof T): V => { + const value = object[key] as unknown; + if (predicate(value)) return value; + + throw new Error( + `expected ${predicateName} value for key ${JSON.stringify(key)}, ` + + `instead got: ${JSON.stringify(value)}` + ); + }; +} diff --git a/external-declarations/tests/source/local-inference/literals-as-const.ts b/external-declarations/tests/source/local-inference/literals-as-const.ts index f93e81f69b53a..2eae31199d7e3 100644 --- a/external-declarations/tests/source/local-inference/literals-as-const.ts +++ b/external-declarations/tests/source/local-inference/literals-as-const.ts @@ -1,3 +1,6 @@ +// @strict:true,false +// @target: es2015 + export let n = 0 as const; export let hex = 0x1 as const; export let neg = -11 as const; diff --git a/external-declarations/tests/source/local-inference/literals-const.ts b/external-declarations/tests/source/local-inference/literals-const.ts index 4a90ae9c72435..7f856b68cec75 100644 --- a/external-declarations/tests/source/local-inference/literals-const.ts +++ b/external-declarations/tests/source/local-inference/literals-const.ts @@ -1,3 +1,6 @@ +// @strict:true,false +// @target: es2015 + export const n = 0; export const hex = 0x1; export const neg = -11; diff --git a/external-declarations/tests/source/local-inference/literals.ts b/external-declarations/tests/source/local-inference/literals.ts index 182a9395979f1..5346412d6d5d9 100644 --- a/external-declarations/tests/source/local-inference/literals.ts +++ b/external-declarations/tests/source/local-inference/literals.ts @@ -1,3 +1,6 @@ +// @strict:true,false +// @target: es2015 + export let n = 0; export let hex = 0x1; export let neg = -11; diff --git a/external-declarations/tests/source/local-inference/mark-const-contaner-as-used.ts b/external-declarations/tests/source/local-inference/mark-const-contaner-as-used.ts new file mode 100644 index 0000000000000..c2da7927850de --- /dev/null +++ b/external-declarations/tests/source/local-inference/mark-const-contaner-as-used.ts @@ -0,0 +1,15 @@ +// @strict: true +// @target: es2015 + +// @filename: const-def.ts +export const E = { + A: "A" +} as const; +export const V = "V" + +// @filename: const-use.ts +import { E , V} from './const-def' +export const value = { + [E.A]: 0, + [V]: 1, +} \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/new-type.ts b/external-declarations/tests/source/local-inference/new-type.ts index 5252b281708c1..137c4f319d9f7 100644 --- a/external-declarations/tests/source/local-inference/new-type.ts +++ b/external-declarations/tests/source/local-inference/new-type.ts @@ -1,2 +1,23 @@ -//@target:es2022 -let x = new Promise(() => {}); \ No newline at end of file +// @strict:true,false +// @target: es2015 +namespace Ns { + export class Cat { + cat = true + } +} + +let x = new Promise(() => {}); +let cat = new Ns.Cat() + + +export class Dog { + dog = true +} +export class Bird { + bird = true +} +export default [ + new Ns.Cat(), + new Dog(), + new Bird(), +]; diff --git a/external-declarations/tests/source/local-inference/object-generic-methods.ts b/external-declarations/tests/source/local-inference/object-generic-methods.ts index a8a168688fde8..d6700a4f02f10 100644 --- a/external-declarations/tests/source/local-inference/object-generic-methods.ts +++ b/external-declarations/tests/source/local-inference/object-generic-methods.ts @@ -40,7 +40,7 @@ import type { UsedAsVariableTypeConst, } from './test-types' -export let g = { +export let g2 = { method(p: T, p2: UsedAsParameterConst): UsedAsReturnTypeConst { let o: UsedAsVariableTypeConst; return o; diff --git a/external-declarations/tests/source/local-inference/object-literal.ts b/external-declarations/tests/source/local-inference/object-literal.ts index 0dac6945e01d8..db6e1a2eeefd3 100644 --- a/external-declarations/tests/source/local-inference/object-literal.ts +++ b/external-declarations/tests/source/local-inference/object-literal.ts @@ -23,3 +23,54 @@ export let oRo = { return value; } } as const + + +// With comments +export const State = { + /** + * Session orders or tickets have been processed in total and created without error + */ + Committed: 'Committed', + + /** + * Attempting to commit orders or tickets + */ + Committing: 'Committing', +} as const; + + +export let a0 = { + get x() { + return 1; + } +} + +export let a1 = { + get x(): number { + return 1; + } +} + +export let a2 = { + get x() { + return 1; + }, + set x(v) { + } +} + +export let a3 = { + get x() { + return 1; + }, + set x(v: number) { + } +} + +export let a4 = { + get x(): number { + return 1; + }, + set x(v: string) { + } +} diff --git a/external-declarations/tests/source/local-inference/return-types-function-declarations.ts b/external-declarations/tests/source/local-inference/return-types-function-declarations.ts index 36fba2897106a..67532446c7db0 100644 --- a/external-declarations/tests/source/local-inference/return-types-function-declarations.ts +++ b/external-declarations/tests/source/local-inference/return-types-function-declarations.ts @@ -1,83 +1,133 @@ -export function returnsStringParenthesized() { - return ((("A"))) -} - -export function returnsFreshString() { - return "A" -} - -export function returnsCollapsibleType() { - if(Math.random()) return "" as string - return "A" as "A" -} - -export function returnFreshLiteralType() { - if(Math.random()) return 1; - if(Math.random()) return 1; - return 1; -} - -export function returnsSingleNegativeNumbers() { - return -1; -} -export function returnsNegativeNumbers() { - if(Math.random()) return 1; - return -1; -} - -export function returnsNegativeNumbersAndString() { - if(Math.random()) return "1" as string; - return -1; -} - -export function returnsNegativeNumbersAndNumber() { - if(Math.random()) return 1 as number; - return -1; -} -export function returnNotFreshLiteralType() { - if(Math.random()) return 1 as 1; - if(Math.random()) return 1; - return 1; -} - - -export function returnNotFreshAndObjects() { - if(Math.random()) return 1 as 1; - if(Math.random()) return 1; - return { foo: 1 }; -} - -export function returnTypeFreshAndObjects() { - if(Math.random()) return 1; - if(Math.random()) return 1; - return { foo: 1 }; -} - -export function returnsNumber() { - return 1 -} - -export function returnsObject() { - return { - foo: "" - }; -} - -export function returnsObjectUnion() { - if(Math.random() > 0) { - return { - foo: "", - bar: 1 - }; - } - return { - foo: "" - }; -} - -export function returnsUnionPrimitive() { - if(Math.random() > 0) { - return "A"; - } - return "B"; -} +// @strict: true, false +// @target: es2022 +// export async function returnsAsyncFunction() { +// return { foo: "" } +// } + +// export function *returnsIterableFunction(){ +// yield { yield: "" } + +// return { return: "" } +// } + +// export function *returnsIterableFunction2() { +// yield { yield: "" } +// } + + +// export function *returnsEmptyYield() { +// yield; +// } + +// export async function *returnsEmptyAsyncIterableFunction() { + +// } + +// export function *returnsIterableFunction4() { + +// } + +// export async function *returnsAsyncIterableFunction() { +// yield { yield: "" } + +// return { return: "" } +// } + +// export async function *returnsAsyncIterableFunction2() { +// yield { yield: "" } +// } + +// export function returnsStringParenthesized() { +// return ((("A"))) +// } + +// export function returnsFreshString() { +// return "A" +// } + +// export function returnsCollapsibleType() { +// if(Math.random()) return "" as string +// return "A" as "A" +// } + +// export function returnFreshLiteralType() { +// if(Math.random()) return 1; +// if(Math.random()) return 1; +// return 1; +// } + +// export function returnsSingleNegativeNumbers() { +// return -1; +// } +// export function returnsNegativeNumbers() { +// if(Math.random()) return 1; +// return -1; +// } + +// export function returnsNegativeNumbersAndString() { +// if(Math.random()) return "1" as string; +// return -1; +// } + +// export function returnsNegativeNumbersAndNumber() { +// if(Math.random()) return 1 as number; +// return -1; +// } +// export function returnNotFreshLiteralType() { +// if(Math.random()) return 1 as 1; +// if(Math.random()) return 1; +// return 1; +// } + + +// export function returnNotFreshAndObjects() { +// if(Math.random()) return 1 as 1; +// if(Math.random()) return 1; +// return { foo: 1 }; +// } + +// export function returnTypeFreshAndObjects() { +// if(Math.random()) return 1; +// if(Math.random()) return 1; +// return { foo: 1 }; +// } + +// export function returnsNumber() { +// return 1 +// } + +// export function returnsObject() { +// return { +// foo: "" +// }; +// } + +// export function returnsObjectUnion() { +// if(Math.random() > 0) { +// return { +// foo: "", +// bar: 1 +// }; +// } +// return { +// foo: "" +// }; +// } + +// export function returnsUnionPrimitive() { +// if(Math.random() > 0) { +// return "A"; +// } +// return "B"; +// } + + +// export function ternaryReturn() { +// return Math.random() ? 1 : ""; +// } + + +let contextInfoCache =""; +export function getCachedClientContextInfo() { + return contextInfoCache; +} \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/return-types-function-expressions.ts b/external-declarations/tests/source/local-inference/return-types-function-expressions.ts index bc8ba2c0d24dc..09a5a90568e4a 100644 --- a/external-declarations/tests/source/local-inference/return-types-function-expressions.ts +++ b/external-declarations/tests/source/local-inference/return-types-function-expressions.ts @@ -1,3 +1,49 @@ +// @strict: false, true +// @target: es2015 + +export let noBody = () => 1; +export let noBodyAsync = async () => 1; + +export const returnNoExpression = (...args: unknown[]) => { + if (Math.random()) return; +}; + + + +export const returnUndefined = (...args: unknown[]) => { + if (Math.random()) return undefined; +}; + +export const returnUndefinedOrNoExpr = (...args: unknown[]) => { + if (Math.random()) return undefined; + if (Math.random()) return; +}; + +export const returnNoExpression2 = (...args: unknown[]) => { + if (Math.random()) return; + if (Math.random()) return; + if (Math.random()) return; +}; + +export const returnSomeNoExpression = (...args: unknown[]) => { + if (Math.random()) return; + if (Math.random()) return 2 +}; + +export const returnsUndefinedOrPrimitive = (...args: unknown[]) => { + if (Math.random()) return undefined; + if (Math.random()) return 2 + return undefined; +}; + + +export const returnsNullOrPrimitive = (...args: unknown[]) => { + if (Math.random()) return null; + if (Math.random()) return 2 + return null; +}; + + export let returnsStringParenthesized = () => { return ((("A"))) } @@ -64,3 +110,13 @@ export let returnsUnionPrimitiveFn = function () { } return "B"; } + + +export const genericFn = (o: T): T => { return o as T }; +export const nestedGenericFns = function (o: T) { + return (p: T, v: U) => { + return p as T; + } +}; + + diff --git a/external-declarations/tests/source/local-inference/return-types-methods.ts b/external-declarations/tests/source/local-inference/return-types-methods.ts index a49a904592522..e98c5c1fe4d7c 100644 --- a/external-declarations/tests/source/local-inference/return-types-methods.ts +++ b/external-declarations/tests/source/local-inference/return-types-methods.ts @@ -31,4 +31,25 @@ export class WithMethods { } return "B"; } + + returnsUnionStringParenthesized() { + if(Math.random() > 0) { + return ((("A"))); + } + return ((("B"))); + } + + + returnsUnionNumericParenthesized() { + if(Math.random() > 0) { + return -(((1))); + } + return -(((2))); + } + returnsUnionNumeric() { + if(Math.random() > 0) { + return -1; + } + return -2; + } } \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/return-types-object-methods.ts b/external-declarations/tests/source/local-inference/return-types-object-methods.ts new file mode 100644 index 0000000000000..72605be548b85 --- /dev/null +++ b/external-declarations/tests/source/local-inference/return-types-object-methods.ts @@ -0,0 +1,37 @@ +// @strict: true +// @target: es2015 + +export const o = { + returnsStringParenthesized() { + return ((("A"))) + }, + + returnsNumber() { + return 1 + }, + + returnsObject() { + return { + foo: "" + }; + }, + + returnsObjectUnion() { + if(Math.random() > 0) { + return { + foo: "", + bar: 1, + }; + } + return { + foo: "" + }; + }, + + returnsUnionPrimitive() { + if(Math.random() > 0) { + return "A"; + } + return "B"; + }, +} \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/scratch.ts b/external-declarations/tests/source/local-inference/scratch.ts index 3718b222bc79b..ca105304f30b1 100644 --- a/external-declarations/tests/source/local-inference/scratch.ts +++ b/external-declarations/tests/source/local-inference/scratch.ts @@ -1,5 +1,22 @@ -export const x = [ - "A" as const, - "", - "B" as const -] \ No newline at end of file +// @jsx: preserve +// @esModuleInterop: true +// @strict: true +// @isolatedDeclarations:false +// @target: es2015 +// @filename: react.ts +namespace React { + +} + +declare global { + export namespace JSX { + export interface Element { + name: string + } + } +} + +export default React; +// @filename: index.tsx +import React from './react'; +export const value =
\ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/ternary.ts b/external-declarations/tests/source/local-inference/ternary.ts new file mode 100644 index 0000000000000..ac0cb66c4acbe --- /dev/null +++ b/external-declarations/tests/source/local-inference/ternary.ts @@ -0,0 +1,45 @@ + +// @strict: true +// @target: es2015 + +export let x = Math.random() ? 0 : 1; + +export let y = Math.random() ? x : ""; + +export const yConst = Math.random() ? x : ""; + +export let group = { x: Math.random()? ["A"]: ["B"] } as const + +export let group2 = { + // Nested object has literals and is readonly + // justNested: { readonly x: "A" }, + justNested: {x: "A" }, + // conditional expression does not flow const-ness + // conditionalNoSpread: { x: string; } + conditionalNoSpread: Math.random()? { x: "A" }: { x: "A"}, + + // conditional expression WITH ... flows some const-ness + // The property is readonly, but does not have literal type + // noSpread: { readonly x: string; } + conditionalSpread: { ...Math.random()? { x: "A" }: { x: "A"} }, +} as const + + + + +const ParametricColumnAlias = { + ExposureWeightBeforeCashSim: "ExposureWeightBeforeCashSim", + ExposureWeight: "ExposureWeight" +} as const +export const targetTypeConfig = { + targetBaselineColumn: Math.random() + ? ParametricColumnAlias.ExposureWeightBeforeCashSim + : ParametricColumnAlias.ExposureWeight, +} as const; + + + +export const getMetricStatusFromResponse = (sessionResponse: boolean) => + sessionResponse + ? 'SUCCESS' + : 'FAILURE'; \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/typeof.ts b/external-declarations/tests/source/local-inference/typeof.ts new file mode 100644 index 0000000000000..2710041daf2a9 --- /dev/null +++ b/external-declarations/tests/source/local-inference/typeof.ts @@ -0,0 +1,61 @@ +// @strict: true +// @target: es2015 + +export let x = 1; +export let y = x; + +export const EnumLike = { + A: 1, + B: 2, +} + +export const arr = [EnumLike.A, EnumLike.B] as const +// export const arr2: readonly [typeof EnumLike.A, typeof EnumLike.B]; + + +let v = ""; +export const exportedV = v; + +let o = { prop: 1 }; +export const exportedProp = o.prop; + + +let xo = { + baz: 1, + bar: 1 +} + +let yo = { + bat: "", + foo: "" +} + +export let xyo = { + ...yo, + ...xo, +} + +export const HappyLogLevel = { + DEBUG: 'DEBUG', + INFO: 'INFO', + NONE: 'NONE', + TRACE: 'TRACE', +} as const; +export const UnhappyLogLevel = { + ERROR: 'ERROR', + FATAL: 'FATAL', + WARN: 'WARN', +} as const; +export const LogLevel = { + ...HappyLogLevel, + ...UnhappyLogLevel, +} as const; + +const noteTypes = ['short', 'long'] as const; +export const getNoteTypes = () => noteTypes; + +export const getSettings = ( + settings: { field: boolean } +)=> ({ + x: settings.field +}); diff --git a/external-declarations/tests/source/tsconfig.json b/external-declarations/tests/source/tsconfig.json index 587ba1c506cf8..c329cc3402210 100644 --- a/external-declarations/tests/source/tsconfig.json +++ b/external-declarations/tests/source/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { "strict": true, - "target": "ESNext" + "target": "ESNext", } } \ No newline at end of file From 89b7374dbf9ad6c39b2466687c189ef12fe5bc54 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 27 Jun 2023 10:58:51 +0100 Subject: [PATCH 022/224] Fix inference for return type when returning a single primitive literal in an arrow function. --- .../declarations/localInferenceResolver.ts | 468 +++++++++--------- 1 file changed, 232 insertions(+), 236 deletions(-) diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 21caaf3703f0f..5470a0eae1fd8 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -3,7 +3,6 @@ import { findIndex } from "../../core"; import { Debug } from "../../debug"; import { Diagnostics } from "../../diagnosticInformationMap.generated"; import { setCommentRange } from "../../factory/emitNode"; -import { factory } from "../../factory/nodeFactory"; import { isIdentifier, isPropertyAccessExpression, isQualifiedName, isGetAccessorDeclaration, isSetAccessorDeclaration, isTypeParameterDeclaration, isTypeReferenceNode, isLiteralTypeNode, isNoSubstitutionTemplateLiteral, isStringLiteral, isSpreadElement, isOmittedExpression, isComputedPropertyName, isMethodDeclaration, isPropertyAssignment, isShorthandPropertyAssignment, isSpreadAssignment, isNumericLiteral, isMethodSignature, isPropertySignature, isArrayTypeNode, isTypeLiteralNode, isFunctionTypeNode, isConstructorTypeNode, isTypeQueryNode, isBlock, isReturnStatement, isYieldExpression, isExpressionStatement, isBinaryExpression, isExportAssignment, isParameter, isVariableDeclaration, isVariableStatement, isSourceFile, isPropertyDeclaration, isFunctionDeclaration } from "../../factory/nodeTests"; import { setTextRange } from "../../factory/utilitiesPublic"; import { forEachChildRecursively, forEachChild } from "../../parser"; @@ -13,7 +12,6 @@ import { setParent, isEntityNameExpression, getTokenPosOfNode, getSyntacticModif import { isTypeNode, isPropertyName, isClassLike, isFunctionLike } from "../../utilitiesPublic"; import { visitNode, visitNodes, visitEachChild } from "../../visitorPublic"; - const NO_LOCAL_INFERENCE = !!process.env.NO_LOCAL_INFERENCE; enum NarrowBehavior { None = 0, @@ -26,7 +24,7 @@ enum NarrowBehavior { enum LocalTypeInfoFlags { None = 0, Fresh = 1 << 0, - ImplicitAny = 1<< 1, + ImplicitAny = 1 << 1, Invalid = 1 << 2, Optimistic = 1 << 3, } @@ -48,7 +46,7 @@ export function createLocalInferenceResolver({ visitDeclarationSubtree(input: Node): VisitResult checkEntityNameVisibility(name: EntityNameOrEntityNameExpression, container?: Node): void; ensureParameter(p: ParameterDeclaration): ParameterDeclaration; - + context: TransformationContext }): LocalInferenceResolver | undefined { let currentSourceFile: SourceFile | undefined; @@ -57,8 +55,9 @@ export function createLocalInferenceResolver({ return undefined; } const resolver = context.getEmitResolver(); + const { factory } = context; const strictNullChecks = !!options.strict || !!options.strictNullChecks; - + return { fromInitializer(node: HasInferredType, sourceFile: SourceFile) { const oldSourceFile = currentSourceFile; @@ -99,17 +98,17 @@ export function createLocalInferenceResolver({ factory.createIdentifier("Element"), ); } - function entityNameExpressionToQualifiedName(node:EntityNameOrEntityNameExpression): EntityName { - if(isIdentifier(node)) { + function entityNameExpressionToQualifiedName(node: EntityNameOrEntityNameExpression): EntityName { + if (isIdentifier(node)) { return setTextRange(factory.cloneNode(node), node); } - else if(isPropertyAccessExpression(node)) { + else if (isPropertyAccessExpression(node)) { return setTextRange(factory.createQualifiedName( entityNameExpressionToQualifiedName(node.expression), factory.cloneNode(node.name) ), node); } - else if(isQualifiedName(node)) { + else if (isQualifiedName(node)) { return setTextRange(factory.createQualifiedName( entityNameExpressionToQualifiedName(node), factory.cloneNode(node.right) @@ -122,13 +121,13 @@ export function createLocalInferenceResolver({ return isTypeNode(node) && !!(node.flags & NodeFlags.Synthesized); } function finalizeSyntheticTypeNode(typeNode: T, parent: Node): T { - if(typeNode && typeNode.parent !== parent) { + if (typeNode && typeNode.parent !== parent) { setParent(typeNode, parent); // Ensure no non synthetic nodes make it in here Debug.assert(typeNode.flags & NodeFlags.Synthesized) forEachChildRecursively(typeNode, (child, parent) => { Debug.assert(typeNode.flags & NodeFlags.Synthesized); - if(child.parent === parent) { + if (child.parent === parent) { return "skip"; } setParent(child, parent); @@ -139,7 +138,7 @@ export function createLocalInferenceResolver({ function visitSyntheticType(typeNode: TypeNode, node: Node) { const previousLocalInferenceTargetNode = setLocalInferenceTargetNode(node); try { - let visitedNode = visitNode(finalizeSyntheticTypeNode(typeNode, node), visitDeclarationSubtree, isSyntheticTypeNode); + let visitedNode = visitNode(finalizeSyntheticTypeNode(typeNode, node), visitDeclarationSubtree, isSyntheticTypeNode); Debug.assert(visitedNode); return visitedNode; } finally { @@ -153,20 +152,20 @@ export function createLocalInferenceResolver({ function getAccessorInfo(properties: NodeArray, knownAccessor: SetAccessorDeclaration | GetAccessorDeclaration) { const nameKey = getMemberKey(knownAccessor); const knownIsGetAccessor = isGetAccessorDeclaration(knownAccessor); - const otherAccessorTest = knownIsGetAccessor ? isSetAccessorDeclaration: isGetAccessorDeclaration; + const otherAccessorTest = knownIsGetAccessor ? isSetAccessorDeclaration : isGetAccessorDeclaration; const otherAccessorIndex = properties.findIndex(n => otherAccessorTest(n) && getMemberKey(n) === nameKey); const otherAccessor = properties[otherAccessorIndex] as SetAccessorDeclaration | GetAccessorDeclaration | undefined; - - - const getAccessor = knownIsGetAccessor ? knownAccessor: - otherAccessor && isGetAccessorDeclaration(otherAccessor)? otherAccessor: - undefined; - const setAccessor = !knownIsGetAccessor ? knownAccessor: - otherAccessor && isSetAccessorDeclaration(otherAccessor)? otherAccessor: - undefined; - - return { + + const getAccessor = knownIsGetAccessor ? knownAccessor : + otherAccessor && isGetAccessorDeclaration(otherAccessor) ? otherAccessor : + undefined; + const setAccessor = !knownIsGetAccessor ? knownAccessor : + otherAccessor && isSetAccessorDeclaration(otherAccessor) ? otherAccessor : + undefined; + + + return { otherAccessorIndex, otherAccessor, getAccessor, @@ -174,15 +173,15 @@ export function createLocalInferenceResolver({ } } function inferAccessorType(getAccessor?: GetAccessorDeclaration, setAccessor?: SetAccessorDeclaration) { - + let accessorType = getAccessor?.type && deepClone(visitType(getAccessor?.type, getAccessor)); - - if(!accessorType && setAccessor) { + + if (!accessorType && setAccessor) { accessorType = setAccessor.parameters[0].type; accessorType = accessorType && deepClone(visitType(accessorType, setAccessor)); } - if(!accessorType && getAccessor) { + if (!accessorType && getAccessor) { const localPropType = inferReturnType(getAccessor) accessorType = localPropType.typeNode; } @@ -191,21 +190,21 @@ export function createLocalInferenceResolver({ } function localInference(node: Node, inferenceFlags: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { const nextInferenceFlags = inferenceFlags & NarrowBehavior.NotKeepLiterals; - switch(node.kind) { + switch (node.kind) { case SyntaxKind.ParenthesizedExpression: return localInference((node as ParenthesizedExpression).expression, inferenceFlags); case SyntaxKind.QualifiedName: const typeNode = visitSyntheticType(factory.createTypeQueryNode( entityNameExpressionToQualifiedName(node as QualifiedName) ), node); - + return regular( typeNode, node, LocalTypeInfoFlags.Optimistic ) case SyntaxKind.PropertyAccessExpression: - if(isEntityNameExpression(node)) { + if (isEntityNameExpression(node)) { const typeNode = visitSyntheticType(factory.createTypeQueryNode( entityNameExpressionToQualifiedName(node) ), node); @@ -217,7 +216,7 @@ export function createLocalInferenceResolver({ } break; case SyntaxKind.Identifier: { - if((node as Identifier).escapedText === "undefined") { + if ((node as Identifier).escapedText === "undefined") { return createUndefinedTypeNode(node); } const typeNode = visitSyntheticType(factory.createTypeQueryNode( @@ -227,7 +226,7 @@ export function createLocalInferenceResolver({ return regular(typeNode, node, LocalTypeInfoFlags.Optimistic) } case SyntaxKind.NullKeyword: - if(strictNullChecks) { + if (strictNullChecks) { return regular(factory.createLiteralTypeNode(factory.createNull()), node); } else { @@ -235,11 +234,11 @@ export function createLocalInferenceResolver({ } case SyntaxKind.CallExpression: const callExpression = node as CallExpression; - if(isIdentifier(callExpression.expression) && callExpression.expression.escapedText === "Symbol") { - if(inferenceFlags & NarrowBehavior.KeepLiterals) { + if (isIdentifier(callExpression.expression) && callExpression.expression.escapedText === "Symbol") { + if (inferenceFlags & NarrowBehavior.KeepLiterals) { return regular( factory.createTypeOperatorNode( - SyntaxKind.UniqueKeyword, + SyntaxKind.UniqueKeyword, factory.createKeywordTypeNode(SyntaxKind.SymbolKeyword) ), node @@ -253,8 +252,7 @@ export function createLocalInferenceResolver({ } case SyntaxKind.NewExpression: const newExpr = node as NewExpression; - if(isEntityNameExpression(newExpr.expression)) { - + if (isEntityNameExpression(newExpr.expression)) { const typeNode = visitSyntheticType(factory.createTypeReferenceNode( entityNameExpressionToQualifiedName(newExpr.expression), visitNodes(newExpr.typeArguments, deepClone, isTypeNode)! @@ -288,17 +286,17 @@ export function createLocalInferenceResolver({ case SyntaxKind.TypeAssertionExpression: case SyntaxKind.AsExpression: const asExpression = node as AsExpression | TypeAssertion; - if(isTypeReferenceNode(asExpression.type) && isConst(asExpression.type)) { + if (isTypeReferenceNode(asExpression.type) && isConst(asExpression.type)) { return localInference(asExpression.expression, NarrowBehavior.AsConst); } else { const type = visitType(asExpression.type, asExpression); - if(isLiteralTypeNode(type) && + if (isLiteralTypeNode(type) && (isNoSubstitutionTemplateLiteral(type.literal) || isStringLiteral(type.literal))) { return regular( factory.createLiteralTypeNode( normalizeLiteralValue(type.literal) - ), + ), node ); } @@ -306,7 +304,7 @@ export function createLocalInferenceResolver({ } case SyntaxKind.PrefixUnaryExpression: const prefixOp = node as PrefixUnaryExpression; - if(prefixOp.operator === SyntaxKind.MinusToken || prefixOp.operator === SyntaxKind.PlusToken) { + if (prefixOp.operator === SyntaxKind.MinusToken || prefixOp.operator === SyntaxKind.PlusToken) { if (NarrowBehavior.AsConstOrKeepLiterals & inferenceFlags) { switch (prefixOp.operand.kind) { case SyntaxKind.NumericLiteral: @@ -322,47 +320,44 @@ export function createLocalInferenceResolver({ } } } - - const targetExpressionType = localInference(prefixOp.operand, inferenceFlags); - if(isLiteralTypeNode(targetExpressionType.typeNode)) { - return { - flags: targetExpressionType.flags, - typeNode: getWidenedType(targetExpressionType), - sourceNode: node - }; + + if(prefixOp.operator === SyntaxKind.PlusToken) { + return fresh(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), node) } - else if(targetExpressionType.typeNode.kind === SyntaxKind.NumberKeyword || targetExpressionType.typeNode.kind === SyntaxKind.BigIntKeyword) { - return targetExpressionType; + else if(prefixOp.operator === SyntaxKind.MinusToken) { + return prefixOp.operand.kind === SyntaxKind.BigIntLiteral? + fresh(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword), node): + fresh(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), node) } } break; case SyntaxKind.NumericLiteral: return literal(node, SyntaxKind.NumberKeyword, inferenceFlags); case SyntaxKind.TemplateExpression: - if(!(inferenceFlags & NarrowBehavior.AsConst)) { - return fresh(factory.createKeywordTypeNode(SyntaxKind.StringKeyword), node); - } - const templateExpression = node as TemplateExpression; - const templateSpans: TemplateLiteralTypeSpan[] = []; - for(const span of templateExpression.templateSpans) { - const {typeNode} = localInference(span.expression, nextInferenceFlags); - const literalSpan = factory.createTemplateLiteralTypeSpan( - typeNode, - span.literal - ); - templateSpans.push(literalSpan); - } - return regular( - factory.createTemplateLiteralType(deepClone(templateExpression.head), templateSpans), - node + if (!(inferenceFlags & NarrowBehavior.AsConst)) { + return fresh(factory.createKeywordTypeNode(SyntaxKind.StringKeyword), node); + } + const templateExpression = node as TemplateExpression; + const templateSpans: TemplateLiteralTypeSpan[] = []; + for (const span of templateExpression.templateSpans) { + const { typeNode } = localInference(span.expression, nextInferenceFlags); + const literalSpan = factory.createTemplateLiteralTypeSpan( + typeNode, + span.literal ); + templateSpans.push(literalSpan); + } + return regular( + factory.createTemplateLiteralType(deepClone(templateExpression.head), templateSpans), + node + ); case SyntaxKind.NoSubstitutionTemplateLiteral: case SyntaxKind.StringLiteral: return literal(node, SyntaxKind.StringKeyword, inferenceFlags); case SyntaxKind.BigIntLiteral: return literal(node, SyntaxKind.BigIntKeyword, inferenceFlags); case SyntaxKind.RegularExpressionLiteral: - return literal(node, "RegExp", inferenceFlags); + return literal(node, "RegExp", inferenceFlags, LocalTypeInfoFlags.Optimistic); case SyntaxKind.JsxSelfClosingElement: case SyntaxKind.JsxElement: const typeReference = finalizeSyntheticTypeNode(factory.createTypeReferenceNode(getJSXElementType(node)), node.parent); @@ -374,8 +369,8 @@ export function createLocalInferenceResolver({ case SyntaxKind.ArrayLiteralExpression: const arrayLiteral = node as ArrayLiteralExpression; const elementTypesInfo: LocalTypeInfo[] = []; - for(const element of arrayLiteral.elements) { - if(isSpreadElement(element)) { + for (const element of arrayLiteral.elements) { + if (isSpreadElement(element)) { const spreadType = localInference(element.expression, nextInferenceFlags) const elementTypeNode = inferenceFlags & NarrowBehavior.AsConst ? factory.createRestTypeNode(spreadType.typeNode) : @@ -385,7 +380,7 @@ export function createLocalInferenceResolver({ { ...spreadType, typeNode: elementTypeNode } ); } - else if(isOmittedExpression(element)) { + else if (isOmittedExpression(element)) { elementTypesInfo.push( createUndefinedTypeNode(element) ); @@ -395,7 +390,7 @@ export function createLocalInferenceResolver({ ); } } - if(inferenceFlags & NarrowBehavior.AsConst) { + if (inferenceFlags & NarrowBehavior.AsConst) { const tupleType = factory.createTupleTypeNode( elementTypesInfo.map(lti => lti.typeNode) ); @@ -404,7 +399,7 @@ export function createLocalInferenceResolver({ } else { let itemType; - if(elementTypesInfo.length === 0) { + if (elementTypesInfo.length === 0) { itemType = (strictNullChecks ? factory.createKeywordTypeNode(SyntaxKind.NeverKeyword) : factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)); } else { @@ -418,14 +413,14 @@ export function createLocalInferenceResolver({ const properties: TypeElement[] = []; let addedIntersections: TypeNode[] | undefined; - for(let propIndex =0, length = objectLiteral.properties.length; propIndex propIndex) { + if (otherAccessorIndex === -1 || otherAccessorIndex > propIndex) { const accessorType = inferAccessorType(getAccessor, setAccessor); const modifiers: Modifier[] = [] - if(!setAccessor) { + if (!setAccessor) { modifiers.push(factory.createModifier(SyntaxKind.ReadonlyKeyword)) - } - + } + newProp = factory.createPropertySignature( modifiers, name, @@ -510,10 +505,10 @@ export function createLocalInferenceResolver({ } } - if(newProp) { + if (newProp) { const prevPos = newProp.name.pos; const newPos = getTokenPosOfNode(newProp.name, currentSourceFile); - + setTextRange(newProp.name, { pos: newPos, end: newProp.name.end @@ -526,17 +521,17 @@ export function createLocalInferenceResolver({ pos: prevPos, end: newProp.name.pos }) - + properties.push(newProp) } } let typeNode: TypeNode = factory.createTypeLiteralNode(properties); if (addedIntersections) { - if(properties.length !== 0) { + if (properties.length !== 0) { addedIntersections.push(typeNode); } - typeNode = factory.createIntersectionTypeNode(addedIntersections); + typeNode = factory.createIntersectionTypeNode(addedIntersections); } return regular(typeNode, objectLiteral); } @@ -561,7 +556,7 @@ export function createLocalInferenceResolver({ return { typeNode: finalizeSyntheticTypeNode(typeNode, sourceNode.parent), flags, sourceNode }; } function normalizeLiteralValue(literal: LiteralExpression) { - switch(literal.kind) { + switch (literal.kind) { case SyntaxKind.BigIntLiteral: case SyntaxKind.TrueKeyword: case SyntaxKind.FalseKeyword: @@ -575,25 +570,26 @@ export function createLocalInferenceResolver({ throw new Error("Not supported"); } function createUndefinedTypeNode(node: Node, flags = LocalTypeInfoFlags.None) { - if(strictNullChecks) { + if (strictNullChecks) { return regular( factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword) - , node, flags); + , node, flags); } else { return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.ImplicitAny | flags); } } - function literal(node: Node, baseType: string | KeywordTypeSyntaxKind, narrowBehavior: NarrowBehavior) { - if(narrowBehavior & NarrowBehavior.AsConstOrKeepLiterals) { + function literal(node: Node, baseType: string | KeywordTypeSyntaxKind, narrowBehavior: NarrowBehavior, flags: LocalTypeInfoFlags = 0) { + if (narrowBehavior & NarrowBehavior.AsConstOrKeepLiterals) { return fresh(factory.createLiteralTypeNode( normalizeLiteralValue(node as LiteralExpression) - ), node); + ), node, flags); } else { return fresh( typeof baseType === "number" ? factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType), - node + node, + flags ); } } @@ -610,25 +606,25 @@ export function createLocalInferenceResolver({ } function getMemberKey(member: MethodSignature | PropertySignature | GetAccessorDeclaration | SetAccessorDeclaration) { - if(isIdentifier(member.name)) { + if (isIdentifier(member.name)) { return "I:" + member.name.escapedText; } - if(isStringLiteral(member.name)) { + if (isStringLiteral(member.name)) { return "S:" + member.name.text } - if(isNumericLiteral(member.name)) { + if (isNumericLiteral(member.name)) { return "N:" + (+member.name.text) } - if(isComputedPropertyName(member.name)) { + if (isComputedPropertyName(member.name)) { let fullId = "C:"; let computedName = member.name.expression; // We only support dotted identifiers as property keys - while(true) { - if(isIdentifier(computedName)) { + while (true) { + if (isIdentifier(computedName)) { fullId += computedName.escapedText; break; } - else if(isPropertyAccessExpression(computedName)) { + else if (isPropertyAccessExpression(computedName)) { fullId += computedName.name.escapedText; computedName = computedName.expression; } @@ -643,7 +639,7 @@ export function createLocalInferenceResolver({ } function getWidenedType(localTypeInfo: LocalTypeInfo) { - if((localTypeInfo.flags & LocalTypeInfoFlags.Fresh) && isLiteralTypeNode(localTypeInfo.typeNode)) { + if ((localTypeInfo.flags & LocalTypeInfoFlags.Fresh) && isLiteralTypeNode(localTypeInfo.typeNode)) { const literal = localTypeInfo.typeNode.literal; return ( literal.kind === SyntaxKind.StringLiteral ? factory.createKeywordTypeNode(SyntaxKind.StringKeyword) : @@ -659,15 +655,15 @@ export function createLocalInferenceResolver({ } function makeUnionFromTypes(sourceNode: Node, types: LocalTypeInfo[], widenSingle: boolean) { types = deduplicateUnion(types); - if(types.length === 1) { + if (types.length === 1) { const localType = types[0]; - return widenSingle ? { ... localType, typeNode: getWidenedType(localType) }: localType; + return widenSingle ? { ...localType, typeNode: getWidenedType(localType) } : localType; } const unionConstituents = collapseLiteralTypesIntoBaseTypes(types); normalizeObjectUnion(unionConstituents); return regular( - unionConstituents.length === 1? unionConstituents[0]: factory.createUnionTypeNode(unionConstituents), + unionConstituents.length === 1 ? unionConstituents[0] : factory.createUnionTypeNode(unionConstituents), sourceNode, LocalTypeInfoFlags.Optimistic ); @@ -686,13 +682,13 @@ export function createLocalInferenceResolver({ } let baseTypes = CollapsibleTypes.None; let literalTypes = CollapsibleTypes.None; - for(const type of nodes) { - switch(type.typeNode.kind) { + for (const type of nodes) { + switch (type.typeNode.kind) { case SyntaxKind.TemplateLiteralType: literalTypes |= CollapsibleTypes.String; break; case SyntaxKind.AnyKeyword: - if(type.flags & LocalTypeInfoFlags.ImplicitAny) { + if (type.flags & LocalTypeInfoFlags.ImplicitAny) { literalTypes |= CollapsibleTypes.ImplicitAny; } else { @@ -713,7 +709,7 @@ export function createLocalInferenceResolver({ break; case SyntaxKind.LiteralType: const literalType = type.typeNode as LiteralTypeNode; - switch(literalType.literal.kind) { + switch (literalType.literal.kind) { case SyntaxKind.TrueKeyword: literalTypes |= CollapsibleTypes.True; break; @@ -724,7 +720,7 @@ export function createLocalInferenceResolver({ literalTypes |= CollapsibleTypes.Number; break; case SyntaxKind.PrefixUnaryExpression: - if((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { + if ((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { literalTypes |= CollapsibleTypes.Number; } break; @@ -740,42 +736,42 @@ export function createLocalInferenceResolver({ } } // If true and false are both present, act as if we found boolean itself - if((literalTypes & CollapsibleTypes.Boolean) === CollapsibleTypes.Boolean) { + if ((literalTypes & CollapsibleTypes.Boolean) === CollapsibleTypes.Boolean) { baseTypes |= CollapsibleTypes.Boolean; } const typesToCollapse = baseTypes & literalTypes; - if(baseTypes & CollapsibleTypes.Any) { + if (baseTypes & CollapsibleTypes.Any) { return [factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)]; } // Nothing to collapse or reorder - if(baseTypes === CollapsibleTypes.None) return nodes.map(n => n.typeNode); + if (baseTypes === CollapsibleTypes.None) return nodes.map(n => n.typeNode); const result: TypeNode[] = []; // We do a best effort to preserve TS union order for primitives - if(baseTypes & CollapsibleTypes.String) { + if (baseTypes & CollapsibleTypes.String) { result.push(factory.createKeywordTypeNode(SyntaxKind.StringKeyword)); } - if(baseTypes & CollapsibleTypes.Number) { + if (baseTypes & CollapsibleTypes.Number) { result.push(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)); } - if(baseTypes & CollapsibleTypes.Boolean) { + if (baseTypes & CollapsibleTypes.Boolean) { result.push(factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword)); } - if(baseTypes & CollapsibleTypes.BigInt) { + if (baseTypes & CollapsibleTypes.BigInt) { result.push(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword)); } - if(!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.True) { + if (!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.True) { result.push(factory.createLiteralTypeNode(factory.createTrue())); } - if(!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.False) { + if (!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.False) { result.push(factory.createLiteralTypeNode(factory.createFalse())); } - for(const type of nodes) { + for (const type of nodes) { let typeofNode = CollapsibleTypes.None; - switch(type.typeNode.kind) { + switch (type.typeNode.kind) { case SyntaxKind.BooleanKeyword: case SyntaxKind.StringKeyword: case SyntaxKind.NumberKeyword: @@ -788,7 +784,7 @@ export function createLocalInferenceResolver({ break; case SyntaxKind.LiteralType: const literalType = type.typeNode as LiteralTypeNode; - switch(literalType.literal.kind) { + switch (literalType.literal.kind) { case SyntaxKind.TrueKeyword: continue; case SyntaxKind.FalseKeyword: @@ -797,7 +793,7 @@ export function createLocalInferenceResolver({ typeofNode = CollapsibleTypes.Number; break; case SyntaxKind.PrefixUnaryExpression: - if((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { + if ((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { typeofNode = CollapsibleTypes.Number; } break; @@ -812,7 +808,7 @@ export function createLocalInferenceResolver({ } } // Not a node of interest, do not change - if((typeofNode & typesToCollapse) === 0) { + if ((typeofNode & typesToCollapse) === 0) { result.push(type.typeNode); } } @@ -824,22 +820,22 @@ export function createLocalInferenceResolver({ members: Map }>(); const union: LocalTypeInfo[] = []; - let implicitAnyNode: LocalTypeInfo | undefined; - for(const node of nodes) { + let implicitAnyNode: LocalTypeInfo | undefined; + for (const node of nodes) { // Do not add implicit any unless it's the only type in the array - if(!strictNullChecks && node.flags & LocalTypeInfoFlags.ImplicitAny) { + if (!strictNullChecks && node.flags & LocalTypeInfoFlags.ImplicitAny) { implicitAnyNode = node; continue; } const existing = union.find(u => typesEqual(node.typeNode, node.sourceNode, u.typeNode, u.sourceNode)); - if(existing === undefined) { + if (existing === undefined) { union.push(node); } else { existing.flags &= node.flags; } } - if(union.length === 0 && implicitAnyNode) { + if (union.length === 0 && implicitAnyNode) { union.push(implicitAnyNode); } return union; @@ -847,16 +843,16 @@ export function createLocalInferenceResolver({ function getTypeInfo(type: TypeLiteralNode, errorTarget: Node | undefined) { const typeNodeId = getNodeId(type); let typeInfo = typeInfoCache.get(typeNodeId); - if(typeInfo) return typeInfo; + if (typeInfo) return typeInfo; typeInfo = { node: type, members: new Map() }; - for(const member of type.members) { + for (const member of type.members) { const isMethod = isMethodSignature(member); const isProp = isPropertySignature(member); - if(isMethod || isProp) { + if (isMethod || isProp) { const memberKey = getMemberKey(member); if (memberKey === undefined) { makeInvalidTypeAndReport(errorTarget ?? member); @@ -872,13 +868,13 @@ export function createLocalInferenceResolver({ return typeInfo; } function entityNameEqual(aTypeName: EntityName, bTypeName: EntityName) { - while(true) { - if(aTypeName.kind === SyntaxKind.QualifiedName && bTypeName.kind === SyntaxKind.QualifiedName) { - if(aTypeName.right.escapedText !== bTypeName.right.escapedText) return false; + while (true) { + if (aTypeName.kind === SyntaxKind.QualifiedName && bTypeName.kind === SyntaxKind.QualifiedName) { + if (aTypeName.right.escapedText !== bTypeName.right.escapedText) return false; aTypeName = aTypeName.left; bTypeName = bTypeName.left; } - else if(aTypeName.kind === SyntaxKind.Identifier && bTypeName.kind === SyntaxKind.Identifier) { + else if (aTypeName.kind === SyntaxKind.Identifier && bTypeName.kind === SyntaxKind.Identifier) { return aTypeName.escapedText === bTypeName.escapedText; } else { @@ -886,11 +882,11 @@ export function createLocalInferenceResolver({ } } } - function signatureEqual(a:SignatureDeclaration, aErrorTarget: Node | undefined, b: SignatureDeclaration, bErrorTarget: Node | undefined) { - if(!typesEqual(a.type, aErrorTarget, b.type, bErrorTarget)) { + function signatureEqual(a: SignatureDeclaration, aErrorTarget: Node | undefined, b: SignatureDeclaration, bErrorTarget: Node | undefined) { + if (!typesEqual(a.type, aErrorTarget, b.type, bErrorTarget)) { return false; } - if(a.parameters.length !== b.parameters.length) { + if (a.parameters.length !== b.parameters.length) { return false; } @@ -898,26 +894,26 @@ export function createLocalInferenceResolver({ // Isolated declarations finish equality function isParameterEqual(a: ParameterDeclaration, b: ParameterDeclaration) { - if(!!a.questionToken !== !!b.questionToken) { + if (!!a.questionToken !== !!b.questionToken) { return false; } return typesEqual(a.type, aErrorTarget, b.type, bErrorTarget); } } function nodeTypeArgumentsEqual(a: NodeWithTypeArguments, aErrorTarget: Node | undefined, b: NodeWithTypeArguments, bErrorTarget: Node | undefined) { - if(a.typeArguments === undefined && b.typeArguments === undefined) { + if (a.typeArguments === undefined && b.typeArguments === undefined) { return true; } - if(a.typeArguments?.length !== b.typeArguments?.length) { + if (a.typeArguments?.length !== b.typeArguments?.length) { return false; } - + return !!a.typeArguments?.every((aArg, index) => typesEqual(aArg, aErrorTarget, b.typeArguments?.[index], bErrorTarget)) } function typesEqual(a: TypeNode | undefined, aErrorTarget: Node | undefined, b: TypeNode | undefined, bErrorTarget: Node | undefined): boolean { if (a === undefined || b === undefined) return a === b; if (a.kind !== b.kind) return false; - switch(a.kind) { + switch (a.kind) { case SyntaxKind.AnyKeyword: case SyntaxKind.UnknownKeyword: case SyntaxKind.NumberKeyword: @@ -931,11 +927,11 @@ export function createLocalInferenceResolver({ case SyntaxKind.NeverKeyword: return true; } - if(isLiteralTypeNode(a) && isLiteralTypeNode(b)) { + if (isLiteralTypeNode(a) && isLiteralTypeNode(b)) { let aLiteral = a.literal; let bLiteral = b.literal; - while(true) { - switch(aLiteral.kind) { + while (true) { + switch (aLiteral.kind) { case SyntaxKind.NullKeyword: case SyntaxKind.TrueKeyword: case SyntaxKind.FalseKeyword: @@ -949,7 +945,7 @@ export function createLocalInferenceResolver({ case SyntaxKind.PrefixUnaryExpression: const aUnary = (aLiteral as PrefixUnaryExpression); const bUnary = (bLiteral as PrefixUnaryExpression); - if(aUnary.operator !== bUnary.operator) return false; + if (aUnary.operator !== bUnary.operator) return false; aLiteral = aUnary.operand as LiteralExpression; bLiteral = bUnary.operand as LiteralExpression; @@ -959,39 +955,39 @@ export function createLocalInferenceResolver({ } } } - else if(isArrayTypeNode(a) && isArrayTypeNode(b)) { + else if (isArrayTypeNode(a) && isArrayTypeNode(b)) { return typesEqual(a.elementType, aErrorTarget, b.elementType, bErrorTarget); } - else if(isTypeReferenceNode(a) && isTypeReferenceNode(b)) { - if(!entityNameEqual(a.typeName, b.typeName)) { + else if (isTypeReferenceNode(a) && isTypeReferenceNode(b)) { + if (!entityNameEqual(a.typeName, b.typeName)) { return false; } return nodeTypeArgumentsEqual(a, aErrorTarget, b, bErrorTarget); } - else if(isTypeLiteralNode(a) && isTypeLiteralNode(b)) { - if(a.members.length !== b.members.length) return false; + else if (isTypeLiteralNode(a) && isTypeLiteralNode(b)) { + if (a.members.length !== b.members.length) return false; const aTypeInfo = getTypeInfo(a, aErrorTarget); - if(!aTypeInfo) return false; + if (!aTypeInfo) return false; - for(const bMember of b.members) { + for (const bMember of b.members) { const bIsMethod = isMethodSignature(bMember); const bIsProp = isPropertySignature(bMember); - if(bIsMethod || bIsProp) { + if (bIsMethod || bIsProp) { const memberKey = getMemberKey(bMember); if (memberKey === undefined) { makeInvalidTypeAndReport(bErrorTarget ?? bMember); break; } const aMember = aTypeInfo.members.get(memberKey); - if(!aMember) return false; - if((aMember.questionToken !== undefined) !== (bMember.questionToken !== undefined)) return false; + if (!aMember) return false; + if ((aMember.questionToken !== undefined) !== (bMember.questionToken !== undefined)) return false; if (getSyntacticModifierFlags(aMember) !== getSyntacticModifierFlags(bMember)) return false; - if(bIsProp && isPropertySignature(aMember)) { - if(!typesEqual(aMember.type, aErrorTarget, bMember.type, bErrorTarget)) { + if (bIsProp && isPropertySignature(aMember)) { + if (!typesEqual(aMember.type, aErrorTarget, bMember.type, bErrorTarget)) { return false; } } - else if(bIsMethod && isMethodSignature(aMember)) { + else if (bIsMethod && isMethodSignature(aMember)) { return signatureEqual(aMember, aErrorTarget, bMember, bErrorTarget) } } @@ -1001,14 +997,14 @@ export function createLocalInferenceResolver({ } return true; } - else if(isFunctionTypeNode(a) && isFunctionTypeNode(b)) { + else if (isFunctionTypeNode(a) && isFunctionTypeNode(b)) { return signatureEqual(a, aErrorTarget, b, bErrorTarget); } - else if(isConstructorTypeNode(a) && isConstructorTypeNode(b)) { + else if (isConstructorTypeNode(a) && isConstructorTypeNode(b)) { return signatureEqual(a, aErrorTarget, b, bErrorTarget); } - else if(isTypeQueryNode(a) && isTypeQueryNode(b)) { - if(!entityNameEqual(a.exprName, b.exprName)) { + else if (isTypeQueryNode(a) && isTypeQueryNode(b)) { + if (!entityNameEqual(a.exprName, b.exprName)) { return false; } return nodeTypeArgumentsEqual(a, aErrorTarget, b, bErrorTarget); @@ -1024,27 +1020,27 @@ export function createLocalInferenceResolver({ isReadonly: boolean, types: (TypeNode | undefined)[] }>(); - const allTypeLookup = new Array | undefined>(); + const allTypeLookup = new Array | undefined>(); let hasChanged = false; - for (let i = 0; i< nodes.length; i++) { + for (let i = 0; i < nodes.length; i++) { const type = nodes[i]; const typeLookup = new Map(); allTypeLookup.push(typeLookup); - if(!type || !isTypeLiteralNode(type)) continue; - for(const member of type.members){ + if (!type || !isTypeLiteralNode(type)) continue; + for (const member of type.members) { const isMethod = isMethodSignature(member); const isProp = isPropertySignature(member); - if(isMethod || isProp) { + if (isMethod || isProp) { const memberKey = getMemberKey(member); - if(memberKey === undefined) { + if (memberKey === undefined) { nodes[i] = makeInvalidTypeAndReport(member.name); allTypeLookup[i] = undefined; hasChanged = true; break; } let type; - if(isProp) { + if (isProp) { type = member.type ?? makeInvalidTypeAndReport(member); } else { @@ -1055,7 +1051,7 @@ export function createLocalInferenceResolver({ ); } let propInfo = allProps.get(memberKey); - if(!propInfo) { + if (!propInfo) { propInfo = { types: new Array(nodes.length), name: member.name, @@ -1075,22 +1071,22 @@ export function createLocalInferenceResolver({ } } } - for(const [, propTypes] of allProps) { + for (const [, propTypes] of allProps) { normalizeObjectUnion(propTypes.types); } - for(let typeIndex = 0; typeIndex< nodes.length; typeIndex++) { + for (let typeIndex = 0; typeIndex < nodes.length; typeIndex++) { const type = nodes[typeIndex]; const props = allTypeLookup[typeIndex]; - if(!type || !isTypeLiteralNode(type) || !props) continue; + if (!type || !isTypeLiteralNode(type) || !props) continue; let newMembers: TypeElement[] | undefined; - for(const [commonProp, propInfo] of allProps) { + for (const [commonProp, propInfo] of allProps) { const propType = props.get(commonProp); - if(propType) { - if(propType !== propInfo.types[typeIndex]) { + if (propType) { + if (propType !== propInfo.types[typeIndex]) { const indexOfProp = findIndex(type.members, e => isPropertySignature(e) && getMemberKey(e) === commonProp); - if(indexOfProp !== -1) { - if(newMembers === undefined) { + if (indexOfProp !== -1) { + if (newMembers === undefined) { newMembers = [...type.members]; } const existingMember = type.members[indexOfProp] as PropertySignature; @@ -1104,7 +1100,7 @@ export function createLocalInferenceResolver({ } } else { - if(newMembers === undefined) { + if (newMembers === undefined) { newMembers = [...type.members]; } newMembers.push(factory.createPropertySignature( @@ -1124,10 +1120,10 @@ export function createLocalInferenceResolver({ } } function inferReturnType(node: FunctionLikeDeclaration) { - if(node.type) { + if (node.type) { return regular(deepClone(visitType(node.type, node)), node); } - if(!node.body) { + if (!node.body) { return regular(makeInvalidTypeAndReport(node), node); } @@ -1135,12 +1131,12 @@ export function createLocalInferenceResolver({ const yieldExpressions: YieldExpression[] = []; let returnType; - if(!isBlock(node.body)) { - returnType = localInference(node.body, NarrowBehavior.KeepLiterals); + if (!isBlock(node.body)) { + returnType = localInference(node.body); } else { collectReturnAndYield(node.body, returnStatements, yieldExpressions); - if(returnStatements.length === 0) { + if (returnStatements.length === 0) { returnType = regular(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), node); } else { @@ -1148,52 +1144,52 @@ export function createLocalInferenceResolver({ } } let yieldType: LocalTypeInfo | undefined; - if(node.asteriskToken) { - if(yieldExpressions.length === 0) { + if (node.asteriskToken) { + if (yieldExpressions.length === 0) { yieldType = regular( factory.createKeywordTypeNode(SyntaxKind.NeverKeyword), node ); } else { - yieldType = inferFromOutputs(node, yieldExpressions, strictNullChecks ?SyntaxKind.UndefinedKeyword: SyntaxKind.AnyKeyword); + yieldType = inferFromOutputs(node, yieldExpressions, strictNullChecks ? SyntaxKind.UndefinedKeyword : SyntaxKind.AnyKeyword); } } return makeFinalReturnType(node, returnType, yieldType); - function inferFromOutputs(node: Node, statements: (YieldExpression | ReturnStatement )[], emptyType: KeywordTypeSyntaxKind) { + function inferFromOutputs(node: Node, statements: (YieldExpression | ReturnStatement)[], emptyType: KeywordTypeSyntaxKind) { const returnStatementInference: LocalTypeInfo[] = []; let hasOnlyEmpty = true; - for(let r of statements) { - if(r.expression) { + for (let r of statements) { + if (r.expression) { returnStatementInference.push(localInference(r.expression, NarrowBehavior.KeepLiterals)); hasOnlyEmpty = false; - }else { + } else { returnStatementInference.push( createUndefinedTypeNode(r, LocalTypeInfoFlags.Fresh) ); } - }; - if(hasOnlyEmpty) { + }; + if (hasOnlyEmpty) { return fresh(factory.createKeywordTypeNode(emptyType), node); - }else { + } else { return makeUnionFromTypes(node, returnStatementInference, /*widenSingle*/ true); } } function makeFinalReturnType(node: FunctionLikeDeclaration, returnType: LocalTypeInfo, yieldType: LocalTypeInfo | undefined) { const modifiers = getEffectiveModifierFlags(node); - if(node.asteriskToken) { + if (node.asteriskToken) { const yieldTypeNode = yieldType?.typeNode ?? factory.createKeywordTypeNode(SyntaxKind.VoidKeyword); return regular( factory.createTypeReferenceNode( - factory.createIdentifier(modifiers & ModifierFlags.Async ? "AsyncGenerator": "Generator"), + factory.createIdentifier(modifiers & ModifierFlags.Async ? "AsyncGenerator" : "Generator"), [yieldTypeNode, returnType.typeNode, factory.createKeywordTypeNode(SyntaxKind.UnknownKeyword)], ), returnType.sourceNode, returnType.flags ); } - else if(modifiers & ModifierFlags.Async) { + else if (modifiers & ModifierFlags.Async) { return regular( factory.createTypeReferenceNode( factory.createIdentifier("Promise"), @@ -1207,13 +1203,13 @@ export function createLocalInferenceResolver({ } function collectReturnAndYield(node: Node, result: ReturnStatement[], yieldExpressions: YieldExpression[]) { forEachChild(node, child => { - if(isReturnStatement(child)) { + if (isReturnStatement(child)) { result.push(child); } - if(isYieldExpression(child)) { + if (isYieldExpression(child)) { yieldExpressions.push(child); } - if(isClassLike(child) || isFunctionLike(child)) { + if (isClassLike(child) || isFunctionLike(child)) { return; } // TODO: Do not walk all children if not generator function @@ -1222,25 +1218,25 @@ export function createLocalInferenceResolver({ } } function inferFunctionMembers(scope: { statements: NodeArray }, functionName: Identifier, localType: LocalTypeInfo): LocalTypeInfo { - if(!isFunctionTypeNode(localType.typeNode)) return localType; + if (!isFunctionTypeNode(localType.typeNode)) return localType; let inferredMembers: TypeElement[] | undefined; - for(let i = 0; i< scope.statements.length; i++) { + for (let i = 0; i < scope.statements.length; i++) { const statement = scope.statements[i]; // Looking for name functionName.member = init; - if(isExpressionStatement(statement) + if (isExpressionStatement(statement) && isBinaryExpression(statement.expression) && isPropertyAccessExpression(statement.expression.left) && isIdentifier(statement.expression.left.expression) && statement.expression.left.expression.escapedText === functionName.escapedText) { - (inferredMembers ??= []).push(factory.createPropertySignature( - [], - statement.expression.left.name, - undefined, - localInference(statement.expression.right).typeNode - )); - } + (inferredMembers ??= []).push(factory.createPropertySignature( + [], + statement.expression.left.name, + undefined, + localInference(statement.expression.right).typeNode + )); + } } - if(inferredMembers) { + if (inferredMembers) { inferredMembers.push( factory.createCallSignature( localType.typeNode.typeParameters, @@ -1254,7 +1250,7 @@ export function createLocalInferenceResolver({ typeNode: factory.createTypeLiteralNode( inferredMembers ), - } + } } return localType; } @@ -1263,11 +1259,11 @@ export function createLocalInferenceResolver({ 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; + if (clonedNode !== node) { + return clonedNode!; } return setTextRange(factory.cloneNode(node), node); - + function deepCloneNodes( nodes: NodeArray | undefined, visitor: Visitor, @@ -1286,45 +1282,45 @@ export function createLocalInferenceResolver({ function localInferenceFromInitializer(node: HasInferredType | ExportAssignment): TypeNode | undefined { - if(NO_LOCAL_INFERENCE) { + if (NO_LOCAL_INFERENCE) { return undefined; } let localType; let actualTypeNode: Node = node; - if(isExportAssignment(node) && node.expression) { + if (isExportAssignment(node) && node.expression) { localType = localInference(node.expression); actualTypeNode = node.expression; } - else if(isParameter(node) && node.initializer) { + else if (isParameter(node) && node.initializer) { localType = localInference(node.initializer); } - else if(isVariableDeclaration(node) && node.initializer) { - - localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals: NarrowBehavior.None); - if(isVariableStatement(node.parent.parent) && + else if (isVariableDeclaration(node) && node.initializer) { + + localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals : NarrowBehavior.None); + if (isVariableStatement(node.parent.parent) && node.parent.flags & NodeFlags.Const && isIdentifier(node.name) && (isBlock(node.parent.parent.parent) || isSourceFile(node.parent.parent.parent))) { localType = inferFunctionMembers(node.parent.parent.parent, node.name, localType); } } - else if(isPropertyDeclaration(node) && node.initializer) { + else if (isPropertyDeclaration(node) && node.initializer) { localType = localInference(node.initializer); } - else if(isFunctionDeclaration(node)) { + else if (isFunctionDeclaration(node)) { localType = inferReturnType(node); } - else if(isMethodDeclaration(node)) { + else if (isMethodDeclaration(node)) { localType = inferReturnType(node); } - else if(isGetAccessorDeclaration(node)) { + else if (isGetAccessorDeclaration(node)) { localType = inferReturnType(node); } - if(localType) { + if (localType) { const typeNode = localType.typeNode; setParent(typeNode, node); const result = resolver.isSyntheticTypeEquivalent(actualTypeNode, typeNode, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit); - if(result !== true) { + if (result !== true) { result.forEach(r => context.addDiagnostic(r as DiagnosticWithLocation)); // we should add the extra diagnostics here return makeInvalidType(); From 643c7fc8ede1bf89f04729d266c7cd0cb8ebc17d Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 28 Jun 2023 16:49:44 +0100 Subject: [PATCH 023/224] Improved local inference. --- .../declarations/localInferenceResolver.ts | 207 ++++++++++++------ 1 file changed, 138 insertions(+), 69 deletions(-) diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 5470a0eae1fd8..7b6815b45ea84 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -3,13 +3,13 @@ import { findIndex } from "../../core"; import { Debug } from "../../debug"; import { Diagnostics } from "../../diagnosticInformationMap.generated"; import { setCommentRange } from "../../factory/emitNode"; -import { isIdentifier, isPropertyAccessExpression, isQualifiedName, isGetAccessorDeclaration, isSetAccessorDeclaration, isTypeParameterDeclaration, isTypeReferenceNode, isLiteralTypeNode, isNoSubstitutionTemplateLiteral, isStringLiteral, isSpreadElement, isOmittedExpression, isComputedPropertyName, isMethodDeclaration, isPropertyAssignment, isShorthandPropertyAssignment, isSpreadAssignment, isNumericLiteral, isMethodSignature, isPropertySignature, isArrayTypeNode, isTypeLiteralNode, isFunctionTypeNode, isConstructorTypeNode, isTypeQueryNode, isBlock, isReturnStatement, isYieldExpression, isExpressionStatement, isBinaryExpression, isExportAssignment, isParameter, isVariableDeclaration, isVariableStatement, isSourceFile, isPropertyDeclaration, isFunctionDeclaration } from "../../factory/nodeTests"; +import { isIdentifier, isPropertyAccessExpression, isQualifiedName, isGetAccessorDeclaration, isSetAccessorDeclaration, isTypeParameterDeclaration, isTypeReferenceNode, isLiteralTypeNode, isNoSubstitutionTemplateLiteral, isStringLiteral, isSpreadElement, isOmittedExpression, isComputedPropertyName, isMethodDeclaration, isPropertyAssignment, isShorthandPropertyAssignment, isSpreadAssignment, isNumericLiteral, isMethodSignature, isPropertySignature, isArrayTypeNode, isTypeLiteralNode, isFunctionTypeNode, isConstructorTypeNode, isTypeQueryNode, isBlock, isReturnStatement, isYieldExpression, isExpressionStatement, isBinaryExpression, isExportAssignment, isParameter, isVariableDeclaration, isVariableStatement, isSourceFile, isPropertyDeclaration, isFunctionDeclaration, isElementAccessExpression } from "../../factory/nodeTests"; import { setTextRange } from "../../factory/utilitiesPublic"; import { forEachChildRecursively, forEachChild } from "../../parser"; import { nullTransformationContext } from "../../transformer"; import { TypeNode, Node, EntityName, EntityNameOrEntityNameExpression, NodeFlags, NodeArray, ObjectLiteralElementLike, SetAccessorDeclaration, GetAccessorDeclaration, SyntaxKind, ParenthesizedExpression, QualifiedName, Identifier, CallExpression, NewExpression, FunctionExpression, ArrowFunction, SatisfiesExpression, AsExpression, TypeAssertion, PrefixUnaryExpression, TemplateExpression, TemplateLiteralTypeSpan, ArrayLiteralExpression, ObjectLiteralExpression, TypeElement, Modifier, ConditionalExpression, LiteralExpression, KeywordTypeSyntaxKind, TypeReferenceNode, MethodSignature, PropertySignature, LiteralTypeNode, TypeLiteralNode, SignatureDeclaration, ParameterDeclaration, NodeWithTypeArguments, PropertyName, ModifierFlags, FunctionLikeDeclaration, ReturnStatement, YieldExpression, Statement, Visitor, ExportAssignment, DiagnosticWithLocation, VisitResult, SourceFile, HasInferredType, TransformationContext } from "../../types"; import { setParent, isEntityNameExpression, getTokenPosOfNode, getSyntacticModifierFlags, getEffectiveModifierFlags, createDiagnosticForNode } from "../../utilities"; -import { isTypeNode, isPropertyName, isClassLike, isFunctionLike } from "../../utilitiesPublic"; +import { isTypeNode, isPropertyName, isClassLike, isFunctionLike, isExpression } from "../../utilitiesPublic"; import { visitNode, visitNodes, visitEachChild } from "../../visitorPublic"; const NO_LOCAL_INFERENCE = !!process.env.NO_LOCAL_INFERENCE; @@ -65,7 +65,7 @@ export function createLocalInferenceResolver({ try { const localType = localInferenceFromInitializer(node); if (localType !== undefined) { - return localType ?? makeInvalidType(); + return localType; } reportIsolatedDeclarationError(node); return makeInvalidType(); @@ -172,21 +172,29 @@ export function createLocalInferenceResolver({ setAccessor, } } - function inferAccessorType(getAccessor?: GetAccessorDeclaration, setAccessor?: SetAccessorDeclaration) { + function inferAccessorType(getAccessor?: GetAccessorDeclaration, setAccessor?: SetAccessorDeclaration): LocalTypeInfo { - let accessorType = getAccessor?.type && deepClone(visitType(getAccessor?.type, getAccessor)); + if(getAccessor?.type){ + return regular( + deepClone(visitType(getAccessor.type, getAccessor)), + getAccessor + ); + }; - if (!accessorType && setAccessor) { - accessorType = setAccessor.parameters[0].type; - accessorType = accessorType && deepClone(visitType(accessorType, setAccessor)); + if (setAccessor && setAccessor.parameters[0]?.type) { + const parameterType = setAccessor.parameters[0].type; + return regular( + deepClone(visitType(parameterType, setAccessor)), + setAccessor + ); } - if (!accessorType && getAccessor) { + if (getAccessor) { const localPropType = inferReturnType(getAccessor) - accessorType = localPropType.typeNode; + return localPropType; } - return accessorType ?? makeInvalidType(); + return invalid(getAccessor ?? setAccessor!); } function localInference(node: Node, inferenceFlags: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { const nextInferenceFlags = inferenceFlags & NarrowBehavior.NotKeepLiterals; @@ -339,17 +347,20 @@ export function createLocalInferenceResolver({ } const templateExpression = node as TemplateExpression; const templateSpans: TemplateLiteralTypeSpan[] = []; + let flags = LocalTypeInfoFlags.None; for (const span of templateExpression.templateSpans) { - const { typeNode } = localInference(span.expression, nextInferenceFlags); + const { typeNode, flags: typeFlags } = localInference(span.expression, nextInferenceFlags); const literalSpan = factory.createTemplateLiteralTypeSpan( typeNode, span.literal ); + flags = mergeFlags(flags, typeFlags) templateSpans.push(literalSpan); } return regular( factory.createTemplateLiteralType(deepClone(templateExpression.head), templateSpans), - node + node, + flags ); case SyntaxKind.NoSubstitutionTemplateLiteral: case SyntaxKind.StringLiteral: @@ -369,13 +380,14 @@ export function createLocalInferenceResolver({ case SyntaxKind.ArrayLiteralExpression: const arrayLiteral = node as ArrayLiteralExpression; const elementTypesInfo: LocalTypeInfo[] = []; + let inheritedArrayTypeFlags = LocalTypeInfoFlags.None; for (const element of arrayLiteral.elements) { if (isSpreadElement(element)) { const spreadType = localInference(element.expression, nextInferenceFlags) const elementTypeNode = inferenceFlags & NarrowBehavior.AsConst ? factory.createRestTypeNode(spreadType.typeNode) : factory.createIndexedAccessTypeNode(spreadType.typeNode, factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)); - + inheritedArrayTypeFlags = mergeFlags(inheritedArrayTypeFlags, spreadType.flags); elementTypesInfo.push( { ...spreadType, typeNode: elementTypeNode } ); @@ -385,9 +397,9 @@ export function createLocalInferenceResolver({ createUndefinedTypeNode(element) ); } else { - elementTypesInfo.push( - localInference(element, nextInferenceFlags) - ); + const elementType = localInference(element, nextInferenceFlags) + inheritedArrayTypeFlags = mergeFlags(inheritedArrayTypeFlags, elementType.flags); + elementTypesInfo.push(elementType); } } if (inferenceFlags & NarrowBehavior.AsConst) { @@ -395,7 +407,7 @@ export function createLocalInferenceResolver({ elementTypesInfo.map(lti => lti.typeNode) ); tupleType.emitNode = { flags: 1, autoGenerate: undefined, internalFlags: 0 }; - return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node); + return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node, inheritedArrayTypeFlags); } else { let itemType; @@ -406,7 +418,7 @@ export function createLocalInferenceResolver({ itemType = makeUnionFromTypes(node, elementTypesInfo, /*widenSingle*/ false).typeNode; } - return regular(factory.createArrayTypeNode(itemType), node); + return regular(factory.createArrayTypeNode(itemType), node, inheritedArrayTypeFlags | LocalTypeInfoFlags.Optimistic); } case SyntaxKind.ObjectLiteralExpression: { const objectLiteral = node as ObjectLiteralExpression; @@ -419,13 +431,16 @@ export function createLocalInferenceResolver({ checkEntityNameVisibility(prop.name.expression, prop); } const name = prop.name && deepClone(visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!); + let inheritedObjectTypeFlags = LocalTypeInfoFlags.None; let newProp; if (isMethodDeclaration(prop) && name) { const oldEnclosingDeclaration = setEnclosingDeclarations(prop); try { const returnType = inferReturnType(prop); const typeParameters = visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone); + // TODO: We need to see about inheriting flags from parameters const parameters = prop.parameters.map(p => deepClone(ensureParameter(p))); + inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, returnType.flags); if (inferenceFlags & NarrowBehavior.AsConst) { newProp = factory.createPropertySignature( [factory.createModifier(SyntaxKind.ReadonlyKeyword)], @@ -456,27 +471,35 @@ export function createLocalInferenceResolver({ const modifiers = inferenceFlags & NarrowBehavior.AsConst ? [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : []; + const { typeNode, flags: propTypeFlags } = localInference(prop.initializer, nextInferenceFlags); + inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, propTypeFlags); newProp = factory.createPropertySignature( modifiers, name, /*questionToken*/ undefined, - localInference(prop.initializer, nextInferenceFlags).typeNode + typeNode ); } else if (isShorthandPropertyAssignment(prop) && name) { const modifiers = inferenceFlags & NarrowBehavior.AsConst ? [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : []; + const { typeNode, flags: propTypeFlags } = localInference(prop.name, nextInferenceFlags); + inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, propTypeFlags); + newProp = factory.createPropertySignature( modifiers, name, /*questionToken*/ undefined, - localInference(prop.name, nextInferenceFlags).typeNode + typeNode ); } else if (isSpreadAssignment(prop)) { addedIntersections ??= []; - addedIntersections.push(localInference(prop.expression, nextInferenceFlags).typeNode) + const { typeNode, flags: spreadTypeFlags } = localInference(prop.expression, nextInferenceFlags); + // Spread types are always optimistic + inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, spreadTypeFlags) | LocalTypeInfoFlags.Optimistic; + addedIntersections.push(typeNode) } else { if (isGetAccessorDeclaration(prop) || isSetAccessorDeclaration(prop)) { @@ -489,12 +512,12 @@ export function createLocalInferenceResolver({ if (!setAccessor) { modifiers.push(factory.createModifier(SyntaxKind.ReadonlyKeyword)) } - + inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, accessorType.flags); newProp = factory.createPropertySignature( modifiers, name, /*questionToken*/ undefined, - accessorType, + accessorType.typeNode, ); } } else { @@ -544,7 +567,7 @@ export function createLocalInferenceResolver({ return makeUnionFromTypes(node, types, /*widenSingle*/ false); } - return regular(makeInvalidTypeAndReport(node), node); + return invalid(node); } function invalid(node: Node): LocalTypeInfo { return { typeNode: makeInvalidTypeAndReport(node), flags: LocalTypeInfoFlags.Invalid, sourceNode: node }; @@ -605,19 +628,19 @@ export function createLocalInferenceResolver({ return visitedType ?? makeInvalidTypeAndReport(owner); } - function getMemberKey(member: MethodSignature | PropertySignature | GetAccessorDeclaration | SetAccessorDeclaration) { - if (isIdentifier(member.name)) { - return "I:" + member.name.escapedText; + function getMemberNameKey(name: PropertyName) { + if (isIdentifier(name)) { + return "I:" + name.escapedText; } - if (isStringLiteral(member.name)) { - return "S:" + member.name.text + if (isStringLiteral(name)) { + return "S:" + name.text } - if (isNumericLiteral(member.name)) { - return "N:" + (+member.name.text) + if (isNumericLiteral(name)) { + return "N:" + (+name.text) } - if (isComputedPropertyName(member.name)) { + if (isComputedPropertyName(name)) { let fullId = "C:"; - let computedName = member.name.expression; + let computedName = isComputedPropertyName(name)? name.expression: name; // We only support dotted identifiers as property keys while (true) { if (isIdentifier(computedName)) { @@ -637,6 +660,9 @@ export function createLocalInferenceResolver({ } return undefined; } + function getMemberKey(member: MethodSignature | PropertySignature | GetAccessorDeclaration | SetAccessorDeclaration) { + return getMemberNameKey(member.name) + } function getWidenedType(localTypeInfo: LocalTypeInfo) { if ((localTypeInfo.flags & LocalTypeInfoFlags.Fresh) && isLiteralTypeNode(localTypeInfo.typeNode)) { @@ -654,18 +680,19 @@ export function createLocalInferenceResolver({ return localTypeInfo.typeNode; } function makeUnionFromTypes(sourceNode: Node, types: LocalTypeInfo[], widenSingle: boolean) { - types = deduplicateUnion(types); - if (types.length === 1) { - const localType = types[0]; + let [unionConstituents, flags] = deduplicateUnion(types); + if (unionConstituents.length === 1) { + const localType = unionConstituents[0]; + return widenSingle ? { ...localType, typeNode: getWidenedType(localType) } : localType; } - const unionConstituents = collapseLiteralTypesIntoBaseTypes(types); + const unionConstituentsTypes = collapseLiteralTypesIntoBaseTypes(unionConstituents); - normalizeObjectUnion(unionConstituents); + normalizeObjectUnion(unionConstituentsTypes); return regular( - unionConstituents.length === 1 ? unionConstituents[0] : factory.createUnionTypeNode(unionConstituents), + unionConstituentsTypes.length === 1 ? unionConstituentsTypes[0] : factory.createUnionTypeNode(unionConstituentsTypes), sourceNode, - LocalTypeInfoFlags.Optimistic + LocalTypeInfoFlags.Optimistic | flags ); function collapseLiteralTypesIntoBaseTypes(nodes: LocalTypeInfo[]) { @@ -821,7 +848,9 @@ export function createLocalInferenceResolver({ }>(); const union: LocalTypeInfo[] = []; let implicitAnyNode: LocalTypeInfo | undefined; + let mergedUnionFlags = LocalTypeInfoFlags.None; for (const node of nodes) { + mergedUnionFlags = mergeFlags(mergedUnionFlags, node.flags) // Do not add implicit any unless it's the only type in the array if (!strictNullChecks && node.flags & LocalTypeInfoFlags.ImplicitAny) { implicitAnyNode = node; @@ -838,7 +867,7 @@ export function createLocalInferenceResolver({ if (union.length === 0 && implicitAnyNode) { union.push(implicitAnyNode); } - return union; + return [union, mergedUnionFlags] as const; function getTypeInfo(type: TypeLiteralNode, errorTarget: Node | undefined) { const typeNodeId = getNodeId(type); @@ -1132,7 +1161,9 @@ export function createLocalInferenceResolver({ let returnType; if (!isBlock(node.body)) { - returnType = localInference(node.body); + returnType = makeUnionFromTypes(node, [ + localInference(node.body, NarrowBehavior.KeepLiterals) + ], true); } else { collectReturnAndYield(node.body, returnStatements, yieldExpressions); @@ -1219,34 +1250,69 @@ export function createLocalInferenceResolver({ } function inferFunctionMembers(scope: { statements: NodeArray }, functionName: Identifier, localType: LocalTypeInfo): LocalTypeInfo { if (!isFunctionTypeNode(localType.typeNode)) return localType; - let inferredMembers: TypeElement[] | undefined; + let mergedFlags = LocalTypeInfoFlags.None; + let members = new Map(); for (let i = 0; i < scope.statements.length; i++) { const statement = scope.statements[i]; // Looking for name functionName.member = init; - if (isExpressionStatement(statement) - && isBinaryExpression(statement.expression) - && isPropertyAccessExpression(statement.expression.left) - && isIdentifier(statement.expression.left.expression) - && statement.expression.left.expression.escapedText === functionName.escapedText) { - (inferredMembers ??= []).push(factory.createPropertySignature( - [], - statement.expression.left.name, - undefined, - localInference(statement.expression.right).typeNode - )); + if (!isExpressionStatement(statement)) continue; + if(!isBinaryExpression(statement.expression)) continue; + const assignment = statement.expression; + if(assignment.operatorToken.kind !== SyntaxKind.EqualsToken) continue; + + const isPropertyAccess = isPropertyAccessExpression(assignment.left); + if(isPropertyAccess || isElementAccessExpression(assignment.left) + && isIdentifier(assignment.left.expression) + && assignment.left.expression.escapedText === functionName.escapedText) { + + let name; + if(isPropertyAccess) { + name = deepClone(assignment.left.name); + } else { + const argumentExpression = visitNode(assignment.left.argumentExpression, visitDeclarationSubtree, isExpression)!; + name = factory.createComputedPropertyName(deepClone(argumentExpression)); + } + const key = getMemberNameKey(name); + if(!key) { + continue; + } + + const propType = localInference(assignment.right); + let memberInfo = members.get(key); + if(!memberInfo) { + members.set(key, memberInfo = { + name, + type: [] + }) + } + memberInfo.type.push(propType); } } - if (inferredMembers) { - inferredMembers.push( + if (members.size) { + const inferredMembers = [ factory.createCallSignature( localType.typeNode.typeParameters, localType.typeNode.parameters, localType.typeNode.type ) - ); + ]; + for(const member of members.values()) { + const propType = makeUnionFromTypes(member.name, member.type, false); + mergedFlags = mergeFlags(mergedFlags, propType.flags); + + factory.createPropertySignature( + [], + member.name, + undefined, + propType.typeNode + ) + } return { sourceNode: localType.sourceNode, - flags: localType.flags, + flags: mergeFlags(localType.flags, mergedFlags) , typeNode: factory.createTypeLiteralNode( inferredMembers ), @@ -1316,16 +1382,19 @@ export function createLocalInferenceResolver({ else if (isGetAccessorDeclaration(node)) { localType = inferReturnType(node); } - if (localType) { - const typeNode = localType.typeNode; - setParent(typeNode, node); - const result = resolver.isSyntheticTypeEquivalent(actualTypeNode, typeNode, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit); - if (result !== true) { - result.forEach(r => context.addDiagnostic(r as DiagnosticWithLocation)); - // we should add the extra diagnostics here - return makeInvalidType(); - } + + if(!localType || localType.flags & LocalTypeInfoFlags.Invalid) { + return undefined; + } + + const typeNode = localType.typeNode; + setParent(typeNode, node); + const result = resolver.isSyntheticTypeEquivalent(actualTypeNode, typeNode, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit); + if (result !== true) { + result.forEach(r => context.addDiagnostic(r as DiagnosticWithLocation)); + return makeInvalidType(); } - return localType?.typeNode; + + return typeNode; } } \ No newline at end of file From cda4df98b7ffcf8d88822b099a01830f1442a1ae Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 28 Jun 2023 16:57:28 +0100 Subject: [PATCH 024/224] Updated external declaration emitter --- .../src/compiler/declaration-emit.ts | 88 ++++++- .../src/compiler/emit-resolver.ts | 3 + .../src/compiler/localInferenceResolver.ts | 244 +++++++++++------- external-declarations/src/compiler/types.ts | 3 +- external-declarations/src/compiler/utils.ts | 46 +++- .../src/test-runner/utils.ts | 4 + 6 files changed, 294 insertions(+), 94 deletions(-) diff --git a/external-declarations/src/compiler/declaration-emit.ts b/external-declarations/src/compiler/declaration-emit.ts index 5ae6b097d167e..b2cb1b3c739b5 100644 --- a/external-declarations/src/compiler/declaration-emit.ts +++ b/external-declarations/src/compiler/declaration-emit.ts @@ -1,11 +1,11 @@ -import { Symbol, SourceFile, DiagnosticWithLocation, factory, CommentRange, Node, getParseTreeNode, SyntaxKind, SignatureDeclaration, ParameterDeclaration, getTrailingCommentRanges, getLeadingCommentRanges, NodeBuilderFlags, VisitResult, ExportAssignment, DeclarationName, Declaration, ModuleDeclaration, SymbolFlags, getNameOfDeclaration, isExportAssignment, Bundle, visitNodes, setTextRange, createUnparsedSourceFile, FileReference, NodeArray, Statement, isExternalModule, isImportEqualsDeclaration, isExternalModuleReference, isStringLiteralLike, isImportDeclaration, isStringLiteral, UnparsedSource, isUnparsedSource, BindingName, ArrayBindingElement, isIdentifier, ModifierFlags, TypeNode, FunctionDeclaration, MethodDeclaration, GetAccessorDeclaration, SetAccessorDeclaration, BindingElement, ConstructSignatureDeclaration, VariableDeclaration, MethodSignature, CallSignatureDeclaration, PropertyDeclaration, PropertySignature, visitNode, isPropertySignature, NamedDeclaration, isFunctionDeclaration, OmittedExpression, isOmittedExpression, AccessorDeclaration, isSetAccessorDeclaration, TypeParameterDeclaration, isSourceFile, isTypeAliasDeclaration, isModuleDeclaration, isClassDeclaration, isInterfaceDeclaration, isFunctionLike, isIndexSignatureDeclaration, isMappedTypeNode, EntityNameOrEntityNameExpression, setCommentRange, getCommentRange, ImportEqualsDeclaration, ImportDeclaration, ExportDeclaration, ImportTypeNode, StringLiteral, AssertClause, isSemicolonClassElement, isMethodDeclaration, isMethodSignature, isTypeQueryNode, isEntityName, visitEachChild, isPrivateIdentifier, isTypeNode, isTupleTypeNode, getLineAndCharacterOfPosition, setEmitFlags, EmitFlags, setOriginalNode, GeneratedIdentifierFlags, NodeFlags, canHaveModifiers, isTypeParameterDeclaration, NamespaceDeclaration, Identifier, VariableStatement, isPropertyAccessExpression, unescapeLeadingUnderscores, ModuleBody, BindingPattern, isExportDeclaration, HasModifiers, Modifier, isModifier, HeritageClause, InterfaceDeclaration, ClassDeclaration, TypeAliasDeclaration, EnumDeclaration, ConstructorDeclaration, IndexSignatureDeclaration, ExpressionWithTypeArguments, TypeReferenceNode, ConditionalTypeNode, FunctionTypeNode, ConstructorTypeNode, isStatement, isArrayBindingElement, isBindingElement, isClassElement, isExpressionWithTypeArguments, isLiteralExpression, isTypeElement, isVariableDeclaration, NodeFactory, isTypeAssertionExpression, isNumericLiteral, isTemplateLiteral, BooleanLiteral, TypeAssertion, LiteralExpression, AsExpression, isTypeReferenceNode, ObjectLiteralExpression, TypeElement, isPropertyAssignment, ArrayLiteralExpression, isSpreadElement, FunctionExpression, ArrowFunction, isParameter, isPropertyName, NewExpression, KeywordTypeSyntaxKind, isPropertyDeclaration, isReturnStatement, isClassLike, ReturnStatement, forEachChild, TypeLiteralNode, __String, isTypeLiteralNode, isLiteralTypeNode, TemplateExpression, TemplateLiteralTypeSpan, TemplateHead, isNoSubstitutionTemplateLiteral, isTypeOfExpression, PrefixUnaryOperator, isYieldExpression, YieldExpression, isBlock, EntityName, isQualifiedName, isGetAccessorDeclaration, CallExpression, isComputedPropertyName, isShorthandPropertyAssignment, isSpreadAssignment, ConditionalExpression, NodeWithTypeArguments, isArrayTypeNode, isFunctionTypeNode, isConstructorTypeNode, PropertyName, isExpressionStatement, isBinaryExpression, Visitor, isVariableStatement, SatisfiesExpression, ObjectLiteralElementLike, QualifiedName, forEachChildRecursively, getTokenPosOfNode, HasInferredType } from "typescript"; +import { Symbol, SourceFile, DiagnosticWithLocation, factory, CommentRange, Node, getParseTreeNode, SyntaxKind, SignatureDeclaration, ParameterDeclaration, getTrailingCommentRanges, getLeadingCommentRanges, NodeBuilderFlags, VisitResult, ExportAssignment, DeclarationName, Declaration, ModuleDeclaration, SymbolFlags, getNameOfDeclaration, isExportAssignment, Bundle, visitNodes, setTextRange, createUnparsedSourceFile, FileReference, NodeArray, Statement, isExternalModule, isImportEqualsDeclaration, isExternalModuleReference, isStringLiteralLike, isImportDeclaration, isStringLiteral, UnparsedSource, isUnparsedSource, BindingName, ArrayBindingElement, isIdentifier, ModifierFlags, TypeNode, FunctionDeclaration, MethodDeclaration, GetAccessorDeclaration, SetAccessorDeclaration, BindingElement, ConstructSignatureDeclaration, VariableDeclaration, MethodSignature, CallSignatureDeclaration, PropertyDeclaration, PropertySignature, visitNode, isPropertySignature, NamedDeclaration, isFunctionDeclaration, OmittedExpression, isOmittedExpression, AccessorDeclaration, isSetAccessorDeclaration, TypeParameterDeclaration, isSourceFile, isTypeAliasDeclaration, isModuleDeclaration, isClassDeclaration, isInterfaceDeclaration, isFunctionLike, isIndexSignatureDeclaration, isMappedTypeNode, EntityNameOrEntityNameExpression, setCommentRange, getCommentRange, ImportEqualsDeclaration, ImportDeclaration, ExportDeclaration, ImportTypeNode, StringLiteral, AssertClause, isSemicolonClassElement, isMethodDeclaration, isMethodSignature, isTypeQueryNode, isEntityName, visitEachChild, isPrivateIdentifier, isTypeNode, isTupleTypeNode, getLineAndCharacterOfPosition, setEmitFlags, EmitFlags, setOriginalNode, GeneratedIdentifierFlags, NodeFlags, canHaveModifiers, isTypeParameterDeclaration, NamespaceDeclaration, Identifier, VariableStatement, isPropertyAccessExpression, unescapeLeadingUnderscores, ModuleBody, BindingPattern, isExportDeclaration, HasModifiers, Modifier, isModifier, HeritageClause, InterfaceDeclaration, ClassDeclaration, TypeAliasDeclaration, EnumDeclaration, ConstructorDeclaration, IndexSignatureDeclaration, ExpressionWithTypeArguments, TypeReferenceNode, ConditionalTypeNode, FunctionTypeNode, ConstructorTypeNode, isStatement, isArrayBindingElement, isBindingElement, isClassElement, isExpressionWithTypeArguments, isLiteralExpression, isTypeElement, isVariableDeclaration, NodeFactory, isTypeAssertionExpression, isNumericLiteral, isTemplateLiteral, BooleanLiteral, TypeAssertion, LiteralExpression, AsExpression, isTypeReferenceNode, ObjectLiteralExpression, TypeElement, isPropertyAssignment, ArrayLiteralExpression, isSpreadElement, FunctionExpression, ArrowFunction, isParameter, isPropertyName, NewExpression, KeywordTypeSyntaxKind, isPropertyDeclaration, isReturnStatement, isClassLike, ReturnStatement, forEachChild, TypeLiteralNode, __String, isTypeLiteralNode, isLiteralTypeNode, TemplateExpression, TemplateLiteralTypeSpan, TemplateHead, isNoSubstitutionTemplateLiteral, isTypeOfExpression, PrefixUnaryOperator, isYieldExpression, YieldExpression, isBlock, EntityName, isQualifiedName, isGetAccessorDeclaration, CallExpression, isComputedPropertyName, isShorthandPropertyAssignment, isSpreadAssignment, ConditionalExpression, NodeWithTypeArguments, isArrayTypeNode, isFunctionTypeNode, isConstructorTypeNode, PropertyName, isExpressionStatement, isBinaryExpression, Visitor, isVariableStatement, SatisfiesExpression, ObjectLiteralElementLike, QualifiedName, forEachChildRecursively, getTokenPosOfNode, HasInferredType, isElementAccessExpression, ScriptTarget, isStringANonContextualKeyword } from "typescript"; import { Debug } from "./debug"; import { Diagnostics } from "./diagnosticInformationMap.generated"; import { filter, stringContains, concatenate, last, forEach, length, pushIfUnique, map, mapDefined, arrayFrom, contains, startsWith, some, append, emptyArray, isArray, compact, flatMap, flatten, orderedRemoveItem, tryCast, findIndex } from "./lang-utils"; import { getDirectoryPath, normalizeSlashes, toFileNameLowerCase } from "./path-utils"; import { transformNodes } from "./transformer"; import { EmitHost, EmitResolver, GetSymbolAccessibilityDiagnostic, LateBoundDeclaration, NodeId, ResolutionMode, SymbolAccessibility, SymbolAccessibilityResult, SymbolTracker, TransformationContext, nullTransformationContext } from "./types"; -import { getEffectiveModifierFlags, skipTrivia, getLeadingCommentRangesOfNode, LateVisibilityPaintedStatement, AnyImportSyntax, getSourceFileOfNode, createDiagnosticForNode, getTextOfNode, declarationNameToString, canProduceDiagnostics, getThisParameter, isDeclaration, DeclarationDiagnosticProducing, setParent, getFirstConstructorWithBody, hasSyntacticModifier, visitArray, AllAccessorDeclarations, isNightly, createGetSymbolAccessibilityDiagnosticForNode, getOriginalNodeId, addRelatedInfo, isExternalOrCommonJsModule, isJsonSourceFile, isSourceFileJS, getResolvedExternalModuleName, isSourceFileNotJson, isAnyImportSyntax, createEmptyExports, isExternalModuleAugmentation, isGlobalScopeAugmentation, isLateVisibilityPaintedStatement, hasDynamicName, hasEffectiveModifier, isBindingPattern, isLiteralImportTypeNode, removeAllComments, needsScopeMarker, hasJSDocNodes, isExternalModuleIndicator, getOutputPathsFor, getSetAccessorValueParameter, getExternalModuleNameFromDeclaration, getExternalModuleImportEqualsDeclarationExpression, getResolutionModeOverrideForClause, isEntityNameExpression, getEffectiveBaseTypeNode, createGetSymbolAccessibilityDiagnosticForNodeName, pathContainsNodeModules, hasIdentifierComputedName, isIdentifierANonContextualKeyword } from "./utils"; +import { getEffectiveModifierFlags, skipTrivia, getLeadingCommentRangesOfNode, LateVisibilityPaintedStatement, AnyImportSyntax, getSourceFileOfNode, createDiagnosticForNode, getTextOfNode, declarationNameToString, canProduceDiagnostics, getThisParameter, isDeclaration, DeclarationDiagnosticProducing, setParent, getFirstConstructorWithBody, hasSyntacticModifier, visitArray, AllAccessorDeclarations, isNightly, createGetSymbolAccessibilityDiagnosticForNode, getOriginalNodeId, addRelatedInfo, isExternalOrCommonJsModule, isJsonSourceFile, isSourceFileJS, getResolvedExternalModuleName, isSourceFileNotJson, isAnyImportSyntax, createEmptyExports, isExternalModuleAugmentation, isGlobalScopeAugmentation, isLateVisibilityPaintedStatement, hasDynamicName, hasEffectiveModifier, isBindingPattern, isLiteralImportTypeNode, removeAllComments, needsScopeMarker, hasJSDocNodes, isExternalModuleIndicator, getOutputPathsFor, getSetAccessorValueParameter, getExternalModuleNameFromDeclaration, getExternalModuleImportEqualsDeclarationExpression, getResolutionModeOverrideForClause, isEntityNameExpression, getEffectiveBaseTypeNode, createGetSymbolAccessibilityDiagnosticForNodeName, pathContainsNodeModules, hasIdentifierComputedName, isIdentifierANonContextualKeyword, isIdentifierText } from "./utils"; import { createLocalInferenceResolver } from "./localInferenceResolver"; /** @internal */ @@ -78,6 +78,7 @@ export function transformDeclarations(context: TransformationContext) { let localInferenceTargetNode: Node | undefined = undefined; const { factory } = context; + const parseNodeFactory = factory const host = context.getEmitHost(); const symbolTracker: SymbolTracker = { trackSymbol, @@ -122,7 +123,7 @@ export function transformDeclarations(context: TransformationContext) { }) const options = context.getCompilerOptions(); const { noResolve, stripInternal } = options; - const isolatedDeclarations = true; + const isolatedDeclarations = options.isolatedDeclarations; return transformRoot; function reportIsolatedDeclarationError(node: Node) { @@ -1280,7 +1281,86 @@ export function transformDeclarations(context: TransformationContext) { reportIsolatedDeclarationError(input); return clean; } - return clean; + const props = resolver.getPropertiesOfContainerFunction(input); + // 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); + // fakespace.locals = createSymbolTable(props); + fakespace.symbol = props[0].parent!; + const exportMappings: [Identifier, string][] = []; + let declarations: (VariableStatement | ExportDeclaration)[] = mapDefined(props, p => { + if (!p.valueDeclaration || !(isPropertyAccessExpression(p.valueDeclaration) || isElementAccessExpression(p.valueDeclaration) || isBinaryExpression(p.valueDeclaration))) { + return undefined; + } + const nameStr = unescapeLeadingUnderscores(p.escapedName); + if (!isIdentifierText(nameStr, ScriptTarget.ESNext)) { + return undefined; // unique symbol or non-identifier name - omit, since there's no syntax that can preserve it + } + getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration); + let type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags, symbolTracker); + getSymbolAccessibilityDiagnostic = oldDiag; + + if(isolatedDeclarations) { + reportIsolatedDeclarationError(p.valueDeclaration); + type = factory.createTypeReferenceNode("invalid"); + } + + const isNonContextualKeywordName = isStringANonContextualKeyword(nameStr); + const name = isNonContextualKeywordName ? factory.getGeneratedNameForNode(p.valueDeclaration) : factory.createIdentifier(nameStr); + if (isNonContextualKeywordName) { + exportMappings.push([name, nameStr]); + } + const varDecl = factory.createVariableDeclaration(name, /*exclamationToken*/ undefined, type, /*initializer*/ undefined); + return factory.createVariableStatement(isNonContextualKeywordName ? undefined : [factory.createToken(SyntaxKind.ExportKeyword)], factory.createVariableDeclarationList([varDecl])); + }); + if (!exportMappings.length) { + declarations = mapDefined(declarations, declaration => factory.updateModifiers(declaration, ModifierFlags.None)); + } + else { + declarations.push(factory.createExportDeclaration( + /*modifiers*/ undefined, + /*isTypeOnly*/ false, + factory.createNamedExports(map(exportMappings, ([gen, exp]) => { + return factory.createExportSpecifier(/*isTypeOnly*/ false, gen, exp); + })) + )); + } + const namespaceDecl = factory.createModuleDeclaration(ensureModifiers(input), input.name!, factory.createModuleBlock(declarations), NodeFlags.Namespace); + if (!hasEffectiveModifier(clean, ModifierFlags.Default)) { + return [clean, namespaceDecl]; + } + + const modifiers = factory.createModifiersFromModifierFlags((getEffectiveModifierFlags(clean) & ~ModifierFlags.ExportDefault) | ModifierFlags.Ambient); + const cleanDeclaration = factory.updateFunctionDeclaration( + clean, + modifiers, + /*asteriskToken*/ undefined, + clean.name, + clean.typeParameters, + clean.parameters, + clean.type, + /*body*/ undefined + ); + + const namespaceDeclaration = factory.updateModuleDeclaration( + namespaceDecl, + modifiers, + namespaceDecl.name, + namespaceDecl.body + ); + + const exportDefaultDeclaration = factory.createExportAssignment( + /*modifiers*/ undefined, + /*isExportEquals*/ false, + namespaceDecl.name + ); + + if (isSourceFile(input.parent)) { + resultHasExternalModuleIndicator = true; + } + resultHasScopeMarker = true; + + return [cleanDeclaration, namespaceDeclaration, exportDefaultDeclaration]; } else { return clean; diff --git a/external-declarations/src/compiler/emit-resolver.ts b/external-declarations/src/compiler/emit-resolver.ts index 86941770086c7..db3e053e24a7a 100644 --- a/external-declarations/src/compiler/emit-resolver.ts +++ b/external-declarations/src/compiler/emit-resolver.ts @@ -47,6 +47,9 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p const name = getNameOfDeclaration(node); return !hasDynamicName(node) || isIdentifierComputedName(name) }, + getPropertiesOfContainerFunction(node: Declaration) { + return []; + }, isImplementationOfOverload(node) { function getSignaturesOfSymbol(symbol: BasicSymbol | undefined): Node[] { if(!symbol) return emptyArray; diff --git a/external-declarations/src/compiler/localInferenceResolver.ts b/external-declarations/src/compiler/localInferenceResolver.ts index 3a051857d4d50..d0699e79e7743 100644 --- a/external-declarations/src/compiler/localInferenceResolver.ts +++ b/external-declarations/src/compiler/localInferenceResolver.ts @@ -24,7 +24,9 @@ import { isFunctionLike, Statement, isExpressionStatement, isBinaryExpression, visitEachChild, Visitor, isExportAssignment, isParameter, isVariableDeclaration, isVariableStatement, isSourceFile, isPropertyDeclaration, isFunctionDeclaration, - DiagnosticWithLocation + DiagnosticWithLocation, + isElementAccessExpression, + isExpression } from "typescript"; import { TransformationContext, nullTransformationContext } from "./types"; import { Debug } from "./debug"; @@ -85,7 +87,7 @@ export function createLocalInferenceResolver({ try { const localType = localInferenceFromInitializer(node); if (localType !== undefined) { - return localType ?? makeInvalidType(); + return localType; } reportIsolatedDeclarationError(node); return makeInvalidType(); @@ -192,21 +194,29 @@ export function createLocalInferenceResolver({ setAccessor, } } - function inferAccessorType(getAccessor?: GetAccessorDeclaration, setAccessor?: SetAccessorDeclaration) { + function inferAccessorType(getAccessor?: GetAccessorDeclaration, setAccessor?: SetAccessorDeclaration): LocalTypeInfo { - let accessorType = getAccessor?.type && deepClone(visitType(getAccessor?.type, getAccessor)); + if(getAccessor?.type){ + return regular( + deepClone(visitType(getAccessor.type, getAccessor)), + getAccessor + ); + }; - if (!accessorType && setAccessor) { - accessorType = setAccessor.parameters[0].type; - accessorType = accessorType && deepClone(visitType(accessorType, setAccessor)); + if (setAccessor && setAccessor.parameters[0]?.type) { + const parameterType = setAccessor.parameters[0].type; + return regular( + deepClone(visitType(parameterType, setAccessor)), + setAccessor + ); } - if (!accessorType && getAccessor) { + if (getAccessor) { const localPropType = inferReturnType(getAccessor) - accessorType = localPropType.typeNode; + return localPropType; } - return accessorType ?? makeInvalidType(); + return invalid(getAccessor ?? setAccessor!); } function localInference(node: Node, inferenceFlags: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { const nextInferenceFlags = inferenceFlags & NarrowBehavior.NotKeepLiterals; @@ -273,7 +283,6 @@ export function createLocalInferenceResolver({ case SyntaxKind.NewExpression: const newExpr = node as NewExpression; if (isEntityNameExpression(newExpr.expression)) { - const typeNode = visitSyntheticType(factory.createTypeReferenceNode( entityNameExpressionToQualifiedName(newExpr.expression), visitNodes(newExpr.typeArguments, deepClone, isTypeNode)! @@ -341,17 +350,14 @@ export function createLocalInferenceResolver({ } } } - - const targetExpressionType = localInference(prefixOp.operand, inferenceFlags); - if (isLiteralTypeNode(targetExpressionType.typeNode)) { - return { - flags: targetExpressionType.flags, - typeNode: getWidenedType(targetExpressionType), - sourceNode: node - }; + + if(prefixOp.operator === SyntaxKind.PlusToken) { + return fresh(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), node) } - else if (targetExpressionType.typeNode.kind === SyntaxKind.NumberKeyword || targetExpressionType.typeNode.kind === SyntaxKind.BigIntKeyword) { - return targetExpressionType; + else if(prefixOp.operator === SyntaxKind.MinusToken) { + return prefixOp.operand.kind === SyntaxKind.BigIntLiteral? + fresh(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword), node): + fresh(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), node) } } break; @@ -363,17 +369,20 @@ export function createLocalInferenceResolver({ } const templateExpression = node as TemplateExpression; const templateSpans: TemplateLiteralTypeSpan[] = []; + let flags = LocalTypeInfoFlags.None; for (const span of templateExpression.templateSpans) { - const { typeNode } = localInference(span.expression, nextInferenceFlags); + const { typeNode, flags: typeFlags } = localInference(span.expression, nextInferenceFlags); const literalSpan = factory.createTemplateLiteralTypeSpan( typeNode, span.literal ); + flags = mergeFlags(flags, typeFlags) templateSpans.push(literalSpan); } return regular( factory.createTemplateLiteralType(deepClone(templateExpression.head), templateSpans), - node + node, + flags ); case SyntaxKind.NoSubstitutionTemplateLiteral: case SyntaxKind.StringLiteral: @@ -381,7 +390,7 @@ export function createLocalInferenceResolver({ case SyntaxKind.BigIntLiteral: return literal(node, SyntaxKind.BigIntKeyword, inferenceFlags); case SyntaxKind.RegularExpressionLiteral: - return literal(node, "RegExp", inferenceFlags); + return literal(node, "RegExp", inferenceFlags, LocalTypeInfoFlags.Optimistic); case SyntaxKind.JsxSelfClosingElement: case SyntaxKind.JsxElement: const typeReference = finalizeSyntheticTypeNode(factory.createTypeReferenceNode(getJSXElementType(node)), node.parent); @@ -393,13 +402,14 @@ export function createLocalInferenceResolver({ case SyntaxKind.ArrayLiteralExpression: const arrayLiteral = node as ArrayLiteralExpression; const elementTypesInfo: LocalTypeInfo[] = []; + let inheritedArrayTypeFlags = LocalTypeInfoFlags.None; for (const element of arrayLiteral.elements) { if (isSpreadElement(element)) { const spreadType = localInference(element.expression, nextInferenceFlags) const elementTypeNode = inferenceFlags & NarrowBehavior.AsConst ? factory.createRestTypeNode(spreadType.typeNode) : factory.createIndexedAccessTypeNode(spreadType.typeNode, factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)); - + inheritedArrayTypeFlags = mergeFlags(inheritedArrayTypeFlags, spreadType.flags); elementTypesInfo.push( { ...spreadType, typeNode: elementTypeNode } ); @@ -409,9 +419,9 @@ export function createLocalInferenceResolver({ createUndefinedTypeNode(element) ); } else { - elementTypesInfo.push( - localInference(element, nextInferenceFlags) - ); + const elementType = localInference(element, nextInferenceFlags) + inheritedArrayTypeFlags = mergeFlags(inheritedArrayTypeFlags, elementType.flags); + elementTypesInfo.push(elementType); } } if (inferenceFlags & NarrowBehavior.AsConst) { @@ -419,7 +429,7 @@ export function createLocalInferenceResolver({ elementTypesInfo.map(lti => lti.typeNode) ); tupleType.emitNode = { flags: 1 }; - return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node); + return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node, inheritedArrayTypeFlags); } else { let itemType; @@ -430,7 +440,7 @@ export function createLocalInferenceResolver({ itemType = makeUnionFromTypes(node, elementTypesInfo, /*widenSingle*/ false).typeNode; } - return regular(factory.createArrayTypeNode(itemType), node); + return regular(factory.createArrayTypeNode(itemType), node, inheritedArrayTypeFlags | LocalTypeInfoFlags.Optimistic); } case SyntaxKind.ObjectLiteralExpression: { const objectLiteral = node as ObjectLiteralExpression; @@ -443,13 +453,16 @@ export function createLocalInferenceResolver({ checkEntityNameVisibility(prop.name.expression, prop); } const name = prop.name && deepClone(visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!); + let inheritedObjectTypeFlags = LocalTypeInfoFlags.None; let newProp; if (isMethodDeclaration(prop) && name) { const oldEnclosingDeclaration = setEnclosingDeclarations(prop); try { const returnType = inferReturnType(prop); const typeParameters = visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone); + // TODO: We need to see about inheriting flags from parameters const parameters = prop.parameters.map(p => deepClone(ensureParameter(p))); + inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, returnType.flags); if (inferenceFlags & NarrowBehavior.AsConst) { newProp = factory.createPropertySignature( [factory.createModifier(SyntaxKind.ReadonlyKeyword)], @@ -480,27 +493,35 @@ export function createLocalInferenceResolver({ const modifiers = inferenceFlags & NarrowBehavior.AsConst ? [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : []; + const { typeNode, flags: propTypeFlags } = localInference(prop.initializer, nextInferenceFlags); + inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, propTypeFlags); newProp = factory.createPropertySignature( modifiers, name, /*questionToken*/ undefined, - localInference(prop.initializer, nextInferenceFlags).typeNode + typeNode ); } else if (isShorthandPropertyAssignment(prop) && name) { const modifiers = inferenceFlags & NarrowBehavior.AsConst ? [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : []; + const { typeNode, flags: propTypeFlags } = localInference(prop.name, nextInferenceFlags); + inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, propTypeFlags); + newProp = factory.createPropertySignature( modifiers, name, /*questionToken*/ undefined, - localInference(prop.name, nextInferenceFlags).typeNode + typeNode ); } else if (isSpreadAssignment(prop)) { addedIntersections ??= []; - addedIntersections.push(localInference(prop.expression, nextInferenceFlags).typeNode) + const { typeNode, flags: spreadTypeFlags } = localInference(prop.expression, nextInferenceFlags); + // Spread types are always optimistic + inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, spreadTypeFlags) | LocalTypeInfoFlags.Optimistic; + addedIntersections.push(typeNode) } else { if (isGetAccessorDeclaration(prop) || isSetAccessorDeclaration(prop)) { @@ -513,12 +534,12 @@ export function createLocalInferenceResolver({ if (!setAccessor) { modifiers.push(factory.createModifier(SyntaxKind.ReadonlyKeyword)) } - + inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, accessorType.flags); newProp = factory.createPropertySignature( modifiers, name, /*questionToken*/ undefined, - accessorType, + accessorType.typeNode, ); } } else { @@ -568,7 +589,7 @@ export function createLocalInferenceResolver({ return makeUnionFromTypes(node, types, /*widenSingle*/ false); } - return regular(makeInvalidTypeAndReport(node), node); + return invalid(node); } function invalid(node: Node): LocalTypeInfo { return { typeNode: makeInvalidTypeAndReport(node), flags: LocalTypeInfoFlags.Invalid, sourceNode: node }; @@ -603,16 +624,17 @@ export function createLocalInferenceResolver({ return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.ImplicitAny | flags); } } - function literal(node: Node, baseType: string | KeywordTypeSyntaxKind, narrowBehavior: NarrowBehavior) { + function literal(node: Node, baseType: string | KeywordTypeSyntaxKind, narrowBehavior: NarrowBehavior, flags: LocalTypeInfoFlags = 0) { if (narrowBehavior & NarrowBehavior.AsConstOrKeepLiterals) { return fresh(factory.createLiteralTypeNode( normalizeLiteralValue(node as LiteralExpression) - ), node); + ), node, flags); } else { return fresh( typeof baseType === "number" ? factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType), - node + node, + flags ); } } @@ -628,19 +650,19 @@ export function createLocalInferenceResolver({ return visitedType ?? makeInvalidTypeAndReport(owner); } - function getMemberKey(member: MethodSignature | PropertySignature | GetAccessorDeclaration | SetAccessorDeclaration) { - if (isIdentifier(member.name)) { - return "I:" + member.name.escapedText; + function getMemberNameKey(name: PropertyName) { + if (isIdentifier(name)) { + return "I:" + name.escapedText; } - if (isStringLiteral(member.name)) { - return "S:" + member.name.text + if (isStringLiteral(name)) { + return "S:" + name.text } - if (isNumericLiteral(member.name)) { - return "N:" + (+member.name.text) + if (isNumericLiteral(name)) { + return "N:" + (+name.text) } - if (isComputedPropertyName(member.name)) { + if (isComputedPropertyName(name)) { let fullId = "C:"; - let computedName = member.name.expression; + let computedName = isComputedPropertyName(name)? name.expression: name; // We only support dotted identifiers as property keys while (true) { if (isIdentifier(computedName)) { @@ -660,35 +682,39 @@ export function createLocalInferenceResolver({ } return undefined; } + function getMemberKey(member: MethodSignature | PropertySignature | GetAccessorDeclaration | SetAccessorDeclaration) { + return getMemberNameKey(member.name) + } function getWidenedType(localTypeInfo: LocalTypeInfo) { if ((localTypeInfo.flags & LocalTypeInfoFlags.Fresh) && isLiteralTypeNode(localTypeInfo.typeNode)) { const literal = localTypeInfo.typeNode.literal; return ( literal.kind === SyntaxKind.StringLiteral ? factory.createKeywordTypeNode(SyntaxKind.StringKeyword) : - literal.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : - literal.kind === SyntaxKind.PrefixUnaryExpression && (literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : - literal.kind === SyntaxKind.BigIntLiteral ? factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword) : - literal.kind === SyntaxKind.TrueKeyword || literal.kind === SyntaxKind.FalseKeyword ? factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword) : - localTypeInfo.typeNode + literal.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : + literal.kind === SyntaxKind.PrefixUnaryExpression && (literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : + literal.kind === SyntaxKind.BigIntLiteral ? factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword) : + literal.kind === SyntaxKind.TrueKeyword || literal.kind === SyntaxKind.FalseKeyword ? factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword) : + localTypeInfo.typeNode ); } return localTypeInfo.typeNode; } function makeUnionFromTypes(sourceNode: Node, types: LocalTypeInfo[], widenSingle: boolean) { - types = deduplicateUnion(types); - if (types.length === 1) { - const localType = types[0]; + let [unionConstituents, flags] = deduplicateUnion(types); + if (unionConstituents.length === 1) { + const localType = unionConstituents[0]; + return widenSingle ? { ...localType, typeNode: getWidenedType(localType) } : localType; } - const unionConstituents = collapseLiteralTypesIntoBaseTypes(types); + const unionConstituentsTypes = collapseLiteralTypesIntoBaseTypes(unionConstituents); - normalizeObjectUnion(unionConstituents); + normalizeObjectUnion(unionConstituentsTypes); return regular( - unionConstituents.length === 1 ? unionConstituents[0] : factory.createUnionTypeNode(unionConstituents), + unionConstituentsTypes.length === 1 ? unionConstituentsTypes[0] : factory.createUnionTypeNode(unionConstituentsTypes), sourceNode, - LocalTypeInfoFlags.Optimistic + LocalTypeInfoFlags.Optimistic | flags ); function collapseLiteralTypesIntoBaseTypes(nodes: LocalTypeInfo[]) { @@ -844,7 +870,9 @@ export function createLocalInferenceResolver({ }>(); const union: LocalTypeInfo[] = []; let implicitAnyNode: LocalTypeInfo | undefined; + let mergedUnionFlags = LocalTypeInfoFlags.None; for (const node of nodes) { + mergedUnionFlags = mergeFlags(mergedUnionFlags, node.flags) // Do not add implicit any unless it's the only type in the array if (!strictNullChecks && node.flags & LocalTypeInfoFlags.ImplicitAny) { implicitAnyNode = node; @@ -861,7 +889,7 @@ export function createLocalInferenceResolver({ if (union.length === 0 && implicitAnyNode) { union.push(implicitAnyNode); } - return union; + return [union, mergedUnionFlags] as const; function getTypeInfo(type: TypeLiteralNode, errorTarget: Node | undefined) { const typeNodeId = getNodeId(type); @@ -1155,7 +1183,9 @@ export function createLocalInferenceResolver({ let returnType; if (!isBlock(node.body)) { - returnType = localInference(node.body, NarrowBehavior.KeepLiterals); + returnType = makeUnionFromTypes(node, [ + localInference(node.body, NarrowBehavior.KeepLiterals) + ], true); } else { collectReturnAndYield(node.body, returnStatements, yieldExpressions); @@ -1242,34 +1272,69 @@ export function createLocalInferenceResolver({ } function inferFunctionMembers(scope: { statements: NodeArray }, functionName: Identifier, localType: LocalTypeInfo): LocalTypeInfo { if (!isFunctionTypeNode(localType.typeNode)) return localType; - let inferredMembers: TypeElement[] | undefined; + let mergedFlags = LocalTypeInfoFlags.None; + let members = new Map(); for (let i = 0; i < scope.statements.length; i++) { const statement = scope.statements[i]; // Looking for name functionName.member = init; - if (isExpressionStatement(statement) - && isBinaryExpression(statement.expression) - && isPropertyAccessExpression(statement.expression.left) - && isIdentifier(statement.expression.left.expression) - && statement.expression.left.expression.escapedText === functionName.escapedText) { - (inferredMembers ??= []).push(factory.createPropertySignature( - [], - statement.expression.left.name, - undefined, - localInference(statement.expression.right).typeNode - )); + if (!isExpressionStatement(statement)) continue; + if(!isBinaryExpression(statement.expression)) continue; + const assignment = statement.expression; + if(assignment.operatorToken.kind !== SyntaxKind.EqualsToken) continue; + + const isPropertyAccess = isPropertyAccessExpression(assignment.left); + if(isPropertyAccess || isElementAccessExpression(assignment.left) + && isIdentifier(assignment.left.expression) + && assignment.left.expression.escapedText === functionName.escapedText) { + + let name; + if(isPropertyAccess) { + name = deepClone(assignment.left.name); + } else { + const argumentExpression = visitNode(assignment.left.argumentExpression, visitDeclarationSubtree, isExpression)!; + name = factory.createComputedPropertyName(deepClone(argumentExpression)); + } + const key = getMemberNameKey(name); + if(!key) { + continue; + } + + const propType = localInference(assignment.right); + let memberInfo = members.get(key); + if(!memberInfo) { + members.set(key, memberInfo = { + name, + type: [] + }) + } + memberInfo.type.push(propType); } } - if (inferredMembers) { - inferredMembers.push( + if (members.size) { + const inferredMembers = [ factory.createCallSignature( localType.typeNode.typeParameters, localType.typeNode.parameters, localType.typeNode.type ) - ); + ]; + for(const member of members.values()) { + const propType = makeUnionFromTypes(member.name, member.type, false); + mergedFlags = mergeFlags(mergedFlags, propType.flags); + + factory.createPropertySignature( + [], + member.name, + undefined, + propType.typeNode + ) + } return { sourceNode: localType.sourceNode, - flags: localType.flags, + flags: mergeFlags(localType.flags, mergedFlags) , typeNode: factory.createTypeLiteralNode( inferredMembers ), @@ -1339,16 +1404,19 @@ export function createLocalInferenceResolver({ else if (isGetAccessorDeclaration(node)) { localType = inferReturnType(node); } - if (localType) { - const typeNode = localType.typeNode; - setParent(typeNode, node); - const result = resolver.isSyntheticTypeEquivalent(actualTypeNode, typeNode, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit); - if (result !== true) { - result.forEach(r => context.addDiagnostic(r as DiagnosticWithLocation)); - // we should add the extra diagnostics here - return makeInvalidType(); - } + + if(!localType || localType.flags & LocalTypeInfoFlags.Invalid) { + return undefined; + } + + const typeNode = localType.typeNode; + setParent(typeNode, node); + const result = resolver.isSyntheticTypeEquivalent(actualTypeNode, typeNode, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit); + if (result !== true) { + result.forEach(r => context.addDiagnostic(r as DiagnosticWithLocation)); + return makeInvalidType(); } - return localType?.typeNode; + + return typeNode; } } \ No newline at end of file diff --git a/external-declarations/src/compiler/types.ts b/external-declarations/src/compiler/types.ts index 5e3cf958d951a..1c0b7c607792c 100644 --- a/external-declarations/src/compiler/types.ts +++ b/external-declarations/src/compiler/types.ts @@ -87,7 +87,7 @@ export interface EmitResolver { isOptionalUninitializedParameterProperty(node: ParameterDeclaration): boolean; isExpandoFunctionDeclaration(node: FunctionDeclaration): boolean; getPropertiesOfContainerFunction(node: Declaration): Symbol[]; - createTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration | PropertyAccessExpression, enclosingDeclaration: Node, flags: NodeBuilderFlags, tracker: SymbolTracker, addUndefined?: boolean): TypeNode | undefined; + 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; @@ -489,6 +489,7 @@ declare module 'typescript' { pathsBasePath?: string; configFilePath?: _Path; } + function isStringANonContextualKeyword(name: string): boolean; } diff --git a/external-declarations/src/compiler/utils.ts b/external-declarations/src/compiler/utils.ts index 58a5747ca6307..9465f770c8915 100644 --- a/external-declarations/src/compiler/utils.ts +++ b/external-declarations/src/compiler/utils.ts @@ -1,4 +1,4 @@ -import { SourceFile, SyntaxKind, Node, TextSpan, DiagnosticWithLocation, DeclarationName, isPropertySignature, isBindingElement, isCallSignatureDeclaration, isConstructorDeclaration, isConstructSignatureDeclaration, isExpressionWithTypeArguments, isFunctionDeclaration, isGetAccessor, isImportEqualsDeclaration, isIndexSignatureDeclaration, isMethodDeclaration, isMethodSignature, isParameter, isPropertyAccessExpression, isPropertyDeclaration, isSetAccessor, isTypeAliasDeclaration, isTypeParameterDeclaration, isVariableDeclaration, QualifiedName, BindingElement, CallSignatureDeclaration, ConstructorDeclaration, ConstructSignatureDeclaration, ExpressionWithTypeArguments, FunctionDeclaration, GetAccessorDeclaration, ImportEqualsDeclaration, IndexSignatureDeclaration, JSDocCallbackTag, JSDocEnumTag, JSDocTypedefTag, MethodDeclaration, MethodSignature, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertySignature, SetAccessorDeclaration, TypeAliasDeclaration, TypeParameterDeclaration, VariableDeclaration, NamedDeclaration, NodeFlags, ClassLikeDeclaration, FunctionBody, ModifierFlags, getModifiers, ClassDeclaration, EnumDeclaration, InterfaceDeclaration, ModuleDeclaration, VariableStatement, ImportDeclaration, Visitor, AccessorDeclaration, SignatureDeclaration, Identifier, JSDocSignature, isJSDocSignature, getLeadingCommentRanges, Diagnostic, DiagnosticRelatedInformation, JsonSourceFile, ScriptKind, NodeFactory, Path, isModuleDeclaration, isSourceFile, Declaration, getNameOfDeclaration, isElementAccessExpression, BindingPattern, ImportTypeNode, isLiteralTypeNode, isStringLiteral, OuterExpressionKinds, Expression, isStringLiteralLike, isNumericLiteral, NumericLiteral, StringLiteralLike, getJSDocTypeTag, isParenthesizedExpression, EmitFlags, Statement, isExportAssignment, isExportDeclaration, JSDocContainer, HasJSDoc, JSDoc, Bundle, CompilerOptions, Extension, getTsBuildInfoEmitOutputFilePath, ImportCall, ExternalModuleReference, AssertClause, ModuleKind, EntityNameExpression, isIdentifier, PropertyAccessEntityNameExpression, ExportDeclaration, getJSDocAugmentsTag, HeritageClause, NodeArray, isClassElement, isClassStaticBlockDeclaration, isParseTreeNode, ModuleResolutionKind, JsxEmit, isPrefixUnaryExpression, PrefixUnaryExpression, canHaveModifiers, ModifierLike, getJSDocPublicTag, getJSDocPrivateTag, getJSDocProtectedTag, getJSDocOverrideTagNoCache, getJSDocReadonlyTag, getJSDocDeprecatedTag, ScriptTarget, FileExtensionInfo, EntityNameOrEntityNameExpression, isHeritageClause, CallExpression, FunctionLikeDeclaration, HasType, JSDocTemplateTag, TypeAssertion, TsConfigSourceFile, PrinterOptions, NewLineKind, sys, isVariableStatement, isLineBreak, isWhiteSpaceLike, identifierToKeywordKind } from "typescript"; +import { SourceFile, SyntaxKind, Node, TextSpan, DiagnosticWithLocation, DeclarationName, isPropertySignature, isBindingElement, isCallSignatureDeclaration, isConstructorDeclaration, isConstructSignatureDeclaration, isExpressionWithTypeArguments, isFunctionDeclaration, isGetAccessor, isImportEqualsDeclaration, isIndexSignatureDeclaration, isMethodDeclaration, isMethodSignature, isParameter, isPropertyAccessExpression, isPropertyDeclaration, isSetAccessor, isTypeAliasDeclaration, isTypeParameterDeclaration, isVariableDeclaration, QualifiedName, BindingElement, CallSignatureDeclaration, ConstructorDeclaration, ConstructSignatureDeclaration, ExpressionWithTypeArguments, FunctionDeclaration, GetAccessorDeclaration, ImportEqualsDeclaration, IndexSignatureDeclaration, JSDocCallbackTag, JSDocEnumTag, JSDocTypedefTag, MethodDeclaration, MethodSignature, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertySignature, SetAccessorDeclaration, TypeAliasDeclaration, TypeParameterDeclaration, VariableDeclaration, NamedDeclaration, NodeFlags, ClassLikeDeclaration, FunctionBody, ModifierFlags, getModifiers, ClassDeclaration, EnumDeclaration, InterfaceDeclaration, ModuleDeclaration, VariableStatement, ImportDeclaration, Visitor, AccessorDeclaration, SignatureDeclaration, Identifier, JSDocSignature, isJSDocSignature, getLeadingCommentRanges, Diagnostic, DiagnosticRelatedInformation, JsonSourceFile, ScriptKind, NodeFactory, Path, isModuleDeclaration, isSourceFile, Declaration, getNameOfDeclaration, isElementAccessExpression, BindingPattern, ImportTypeNode, isLiteralTypeNode, isStringLiteral, OuterExpressionKinds, Expression, isStringLiteralLike, isNumericLiteral, NumericLiteral, StringLiteralLike, getJSDocTypeTag, isParenthesizedExpression, EmitFlags, Statement, isExportAssignment, isExportDeclaration, JSDocContainer, HasJSDoc, JSDoc, Bundle, CompilerOptions, Extension, getTsBuildInfoEmitOutputFilePath, ImportCall, ExternalModuleReference, AssertClause, ModuleKind, EntityNameExpression, isIdentifier, PropertyAccessEntityNameExpression, ExportDeclaration, getJSDocAugmentsTag, HeritageClause, NodeArray, isClassElement, isClassStaticBlockDeclaration, isParseTreeNode, ModuleResolutionKind, JsxEmit, isPrefixUnaryExpression, PrefixUnaryExpression, canHaveModifiers, ModifierLike, getJSDocPublicTag, getJSDocPrivateTag, getJSDocProtectedTag, getJSDocOverrideTagNoCache, getJSDocReadonlyTag, getJSDocDeprecatedTag, ScriptTarget, FileExtensionInfo, EntityNameOrEntityNameExpression, isHeritageClause, CallExpression, FunctionLikeDeclaration, HasType, JSDocTemplateTag, TypeAssertion, TsConfigSourceFile, PrinterOptions, NewLineKind, sys, isVariableStatement, isLineBreak, isWhiteSpaceLike, identifierToKeywordKind, isIdentifierStart, isIdentifierPart, LanguageVariant, ElementAccessExpression, BinaryExpression } from "typescript"; import { Debug } from "./debug"; import { Diagnostics } from "./diagnosticInformationMap.generated"; import { clone, Comparison, contains, emptyArray, find, flatten, identity, isArray, length, mapDefined, Mutable, some, startsWith, stringContains } from "./lang-utils"; @@ -258,6 +258,8 @@ export type DeclarationDiagnosticProducing = | ConstructorDeclaration | IndexSignatureDeclaration | PropertyAccessExpression + | ElementAccessExpression + | BinaryExpression | JSDocTypedefTag | JSDocCallbackTag | JSDocEnumTag; @@ -777,7 +779,49 @@ export function scanShebangTrivia(text: string, pos: number) { return pos; } +/** @internal */ +const codePointAt: (s: string, i: number) => number = (String.prototype as any).codePointAt ? (s, i) => (s as any).codePointAt(i) : function codePointAt(str, i): number { + // from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt + // Account for out-of-bounds indices: + const size = str.length; + if (i < 0 || i >= size) { + return undefined!; // String.codePointAt returns `undefined` for OOB indexes + } + // Get the first code unit + const first = str.charCodeAt(i); + // check if it's the start of a surrogate pair + if (first >= 0xD800 && first <= 0xDBFF && size > i + 1) { // high surrogate and there is a next code unit + const second = str.charCodeAt(i + 1); + if (second >= 0xDC00 && second <= 0xDFFF) { // low surrogate + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + } + } + return first; +}; + +/** @internal */ +function charSize(ch: number) { + if (ch >= 0x10000) { + return 2; + } + return 1; +} +export function isIdentifierText(name: string, languageVersion: ScriptTarget | undefined, identifierVariant?: LanguageVariant): boolean { + let ch = codePointAt(name, 0); + if (!isIdentifierStart(ch, languageVersion)) { + return false; + } + + for (let i = charSize(ch); i < name.length; i += charSize(ch)) { + if (!isIdentifierPart(ch = codePointAt(name, i), languageVersion, identifierVariant)) { + return false; + } + } + + return true; +} /** @internal */ export function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode: SourceFile) { return node.kind !== SyntaxKind.JsxText ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : undefined; diff --git a/external-declarations/src/test-runner/utils.ts b/external-declarations/src/test-runner/utils.ts index 0129ba47a8bc9..93bb77f09ccee 100644 --- a/external-declarations/src/test-runner/utils.ts +++ b/external-declarations/src/test-runner/utils.ts @@ -82,6 +82,10 @@ export function isRelevantTestFile(f: TestCaseParser.TestUnitData) { export function runIsolated(caseData: TestCaseParser.TestCaseContent, libFiles: string[], settings: ts.CompilerOptions): FileContent[] { const toSrc = (n: string) => vpath.combine('/src', n); const projectFiles = [...caseData.testUnitData.map(o => toSrc(o.name)), ...libFiles]; + settings = { + ...settings, + isolatedDeclarations: true, + } const packageJson = caseData.testUnitData.find(f => f.name === "/package.json"); let packageResolution: ts.ResolutionMode = ts.ModuleKind.CommonJS From efe7fa0110f9a043e8b24cda4161963896925edf Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 29 Jun 2023 11:05:32 +0100 Subject: [PATCH 025/224] Improved tests. --- .../source/expando-functions-expressions.ts | 2 - .../local-inference/array-literal-const.ts | 3 + .../local-inference/array-literal-mutable.ts | 3 + .../source/local-inference/literals-const.ts | 6 + .../tests/source/local-inference/literals.ts | 9 + .../source/local-inference/object-literal.ts | 8 + .../return-types-function-declarations.ts | 232 +++++++++--------- .../tests/source/local-inference/ternary.ts | 9 +- .../source/local-inference/typeof-var.ts | 0 .../tests/source/local-inference/typeof.ts | 1 + 10 files changed, 154 insertions(+), 119 deletions(-) delete mode 100644 external-declarations/tests/source/expando-functions-expressions.ts delete mode 100644 external-declarations/tests/source/local-inference/typeof-var.ts diff --git a/external-declarations/tests/source/expando-functions-expressions.ts b/external-declarations/tests/source/expando-functions-expressions.ts deleted file mode 100644 index 8ea398c73065f..0000000000000 --- a/external-declarations/tests/source/expando-functions-expressions.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const x = ()=> {} -x.test = 1; \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/array-literal-const.ts b/external-declarations/tests/source/local-inference/array-literal-const.ts index 73f3edf8b1d69..baf686fa7abe1 100644 --- a/external-declarations/tests/source/local-inference/array-literal-const.ts +++ b/external-declarations/tests/source/local-inference/array-literal-const.ts @@ -10,6 +10,9 @@ export let arrObjects = [ { bar: { baz: 1} }, ] as const; +let value = 1; +export let values = [value, "A", 1] as const; + let tuple = [1, 2, 3] as const export const composedTuple = [0, ...tuple] as const diff --git a/external-declarations/tests/source/local-inference/array-literal-mutable.ts b/external-declarations/tests/source/local-inference/array-literal-mutable.ts index a6138d79a6247..237a655d318c1 100644 --- a/external-declarations/tests/source/local-inference/array-literal-mutable.ts +++ b/external-declarations/tests/source/local-inference/array-literal-mutable.ts @@ -30,6 +30,9 @@ export let numbers = [1, 2, 3]; export let numbersNeg = [1, 2, 3, -1, -2, -3, -1, -2]; export let strings = ["1", "2", "3"]; +let value = 1; +export let values = [value, "A", 1] + export let arrNestedObjects = [ { bar: { baz: 1} }, { bar: { bat: 1} }, diff --git a/external-declarations/tests/source/local-inference/literals-const.ts b/external-declarations/tests/source/local-inference/literals-const.ts index 7f856b68cec75..a1f3631de6c5a 100644 --- a/external-declarations/tests/source/local-inference/literals-const.ts +++ b/external-declarations/tests/source/local-inference/literals-const.ts @@ -9,7 +9,13 @@ export const hexNeg = -0x1; export const hexNegParan = -(((0x1))); export const s = "X"; +export const sPoz = +"X"; +export const sNeg = -"X"; + export const b = true; +export const bPoz = +true; +export const bNeg = -true; + export const bn = 10n; export const t0 = `A`; diff --git a/external-declarations/tests/source/local-inference/literals.ts b/external-declarations/tests/source/local-inference/literals.ts index 5346412d6d5d9..74f958d6c57a9 100644 --- a/external-declarations/tests/source/local-inference/literals.ts +++ b/external-declarations/tests/source/local-inference/literals.ts @@ -5,9 +5,18 @@ export let n = 0; export let hex = 0x1; export let neg = -11; export let s = "X"; +export let sPoz = +"X"; +export let sNeg = -+"X"; export let b = true; +export let bPoz = +true; +export let bNeg = -true; export let r = /test/; export let bn = 10n; +export let bnNeg = -10n; + +export let nl = null; +export let undef = undefined; + export let t0 = `A`; diff --git a/external-declarations/tests/source/local-inference/object-literal.ts b/external-declarations/tests/source/local-inference/object-literal.ts index db6e1a2eeefd3..301129b9ddac9 100644 --- a/external-declarations/tests/source/local-inference/object-literal.ts +++ b/external-declarations/tests/source/local-inference/object-literal.ts @@ -2,6 +2,7 @@ let value: string = "0"; export let o = { n: 1, s: "s", + value, nested: { nn: 2 }, @@ -13,6 +14,7 @@ export let o = { export let oRo = { n: 1, s: "s", + value, nested: { nn: 2 }, @@ -74,3 +76,9 @@ export let a4 = { set x(v: string) { } } + + +export const satisfied = { + save: () => {}, + close: () => {}, +} as const satisfies Record void> \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/return-types-function-declarations.ts b/external-declarations/tests/source/local-inference/return-types-function-declarations.ts index 67532446c7db0..d8ccd87f1d526 100644 --- a/external-declarations/tests/source/local-inference/return-types-function-declarations.ts +++ b/external-declarations/tests/source/local-inference/return-types-function-declarations.ts @@ -1,130 +1,130 @@ // @strict: true, false // @target: es2022 -// export async function returnsAsyncFunction() { -// return { foo: "" } -// } +export async function returnsAsyncFunction() { + return { foo: "" } +} -// export function *returnsIterableFunction(){ -// yield { yield: "" } +export function *returnsIterableFunction(){ + yield { yield: "" } -// return { return: "" } -// } + return { return: "" } +} -// export function *returnsIterableFunction2() { -// yield { yield: "" } -// } +export function *returnsIterableFunction2() { + yield { yield: "" } +} -// export function *returnsEmptyYield() { -// yield; -// } +export function *returnsEmptyYield() { + yield; +} -// export async function *returnsEmptyAsyncIterableFunction() { +export async function *returnsEmptyAsyncIterableFunction() { -// } +} -// export function *returnsIterableFunction4() { +export function *returnsIterableFunction4() { -// } - -// export async function *returnsAsyncIterableFunction() { -// yield { yield: "" } - -// return { return: "" } -// } - -// export async function *returnsAsyncIterableFunction2() { -// yield { yield: "" } -// } - -// export function returnsStringParenthesized() { -// return ((("A"))) -// } - -// export function returnsFreshString() { -// return "A" -// } - -// export function returnsCollapsibleType() { -// if(Math.random()) return "" as string -// return "A" as "A" -// } - -// export function returnFreshLiteralType() { -// if(Math.random()) return 1; -// if(Math.random()) return 1; -// return 1; -// } - -// export function returnsSingleNegativeNumbers() { -// return -1; -// } -// export function returnsNegativeNumbers() { -// if(Math.random()) return 1; -// return -1; -// } - -// export function returnsNegativeNumbersAndString() { -// if(Math.random()) return "1" as string; -// return -1; -// } - -// export function returnsNegativeNumbersAndNumber() { -// if(Math.random()) return 1 as number; -// return -1; -// } -// export function returnNotFreshLiteralType() { -// if(Math.random()) return 1 as 1; -// if(Math.random()) return 1; -// return 1; -// } - - -// export function returnNotFreshAndObjects() { -// if(Math.random()) return 1 as 1; -// if(Math.random()) return 1; -// return { foo: 1 }; -// } - -// export function returnTypeFreshAndObjects() { -// if(Math.random()) return 1; -// if(Math.random()) return 1; -// return { foo: 1 }; -// } - -// export function returnsNumber() { -// return 1 -// } - -// export function returnsObject() { -// return { -// foo: "" -// }; -// } - -// export function returnsObjectUnion() { -// if(Math.random() > 0) { -// return { -// foo: "", -// bar: 1 -// }; -// } -// return { -// foo: "" -// }; -// } - -// export function returnsUnionPrimitive() { -// if(Math.random() > 0) { -// return "A"; -// } -// return "B"; -// } - - -// export function ternaryReturn() { -// return Math.random() ? 1 : ""; -// } +} + +export async function *returnsAsyncIterableFunction() { + yield { yield: "" } + + return { return: "" } +} + +export async function *returnsAsyncIterableFunction2() { + yield { yield: "" } +} + +export function returnsStringParenthesized() { + return ((("A"))) +} + +export function returnsFreshString() { + return "A" +} + +export function returnsCollapsibleType() { + if(Math.random()) return "" as string + return "A" as "A" +} + +export function returnFreshLiteralType() { + if(Math.random()) return 1; + if(Math.random()) return 1; + return 1; +} + +export function returnsSingleNegativeNumbers() { + return -1; +} +export function returnsNegativeNumbers() { + if(Math.random()) return 1; + return -1; +} + +export function returnsNegativeNumbersAndString() { + if(Math.random()) return "1" as string; + return -1; +} + +export function returnsNegativeNumbersAndNumber() { + if(Math.random()) return 1 as number; + return -1; +} +export function returnNotFreshLiteralType() { + if(Math.random()) return 1 as 1; + if(Math.random()) return 1; + return 1; +} + + +export function returnNotFreshAndObjects() { + if(Math.random()) return 1 as 1; + if(Math.random()) return 1; + return { foo: 1 }; +} + +export function returnTypeFreshAndObjects() { + if(Math.random()) return 1; + if(Math.random()) return 1; + return { foo: 1 }; +} + +export function returnsNumber() { + return 1 +} + +export function returnsObject() { + return { + foo: "" + }; +} + +export function returnsObjectUnion() { + if(Math.random() > 0) { + return { + foo: "", + bar: 1 + }; + } + return { + foo: "" + }; +} + +export function returnsUnionPrimitive() { + if(Math.random() > 0) { + return "A"; + } + return "B"; +} + + +export function ternaryReturn() { + return Math.random() ? 1 : ""; +} let contextInfoCache =""; diff --git a/external-declarations/tests/source/local-inference/ternary.ts b/external-declarations/tests/source/local-inference/ternary.ts index ac0cb66c4acbe..0879731af7c08 100644 --- a/external-declarations/tests/source/local-inference/ternary.ts +++ b/external-declarations/tests/source/local-inference/ternary.ts @@ -42,4 +42,11 @@ export const targetTypeConfig = { export const getMetricStatusFromResponse = (sessionResponse: boolean) => sessionResponse ? 'SUCCESS' - : 'FAILURE'; \ No newline at end of file + : 'FAILURE'; + + +export const getMetricStatusFromResponse2 = (sessionResponse: boolean) => { + return sessionResponse + ? 'SUCCESS' + : 'FAILURE'; +} \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/typeof-var.ts b/external-declarations/tests/source/local-inference/typeof-var.ts deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/external-declarations/tests/source/local-inference/typeof.ts b/external-declarations/tests/source/local-inference/typeof.ts index 2710041daf2a9..608946cbad7d5 100644 --- a/external-declarations/tests/source/local-inference/typeof.ts +++ b/external-declarations/tests/source/local-inference/typeof.ts @@ -47,6 +47,7 @@ export const UnhappyLogLevel = { WARN: 'WARN', } as const; export const LogLevel = { + UNDEFINED: "UNDEFINED", ...HappyLogLevel, ...UnhappyLogLevel, } as const; From e03119a6fabba10c43ff09f3ab51bb68ac6dd6fb Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 29 Jun 2023 11:16:52 +0100 Subject: [PATCH 026/224] Removed declaration emitter from external declaration implementation reusing the TS one. --- external-declarations/src/compiler/debug.ts | 294 +-- .../src/compiler/declaration-emit.ts | 1808 ---------------- .../diagnosticInformationMap.generated.ts | 1893 ----------------- .../src/compiler/emit-binder.ts | 14 +- .../src/compiler/emit-host.ts | 4 +- .../src/compiler/emit-resolver.ts | 21 +- .../src/compiler/lang-utils.ts | 43 +- .../src/compiler/localInferenceResolver.ts | 1422 ------------- .../src/compiler/path-utils.ts | 257 +-- .../src/compiler/transform-file.ts | 7 +- .../src/compiler/transform-project.ts | 4 +- .../src/compiler/transformer.ts | 451 ---- external-declarations/src/compiler/types.ts | 281 +-- external-declarations/src/compiler/utils.ts | 1359 +----------- external-declarations/src/main.ts | 8 +- .../src/test-runner/parallel-run.ts | 1 - .../tsc-infrastructure/compiler-run.ts | 18 +- .../src/test-runner/tsc-infrastructure/io.ts | 14 +- .../test-runner/tsc-infrastructure/options.ts | 2 +- .../tsc-infrastructure/test-file-parser.ts | 5 +- .../test-runner/tsc-infrastructure/vary-by.ts | 5 +- .../test-runner/tsc-infrastructure/vpath.ts | 2 +- .../src/test-runner/utils.ts | 19 +- external-declarations/src/tsconfig.json | 3 +- external-declarations/src/utils/cli-parser.ts | 2 +- 25 files changed, 130 insertions(+), 7807 deletions(-) delete mode 100644 external-declarations/src/compiler/declaration-emit.ts delete mode 100644 external-declarations/src/compiler/diagnosticInformationMap.generated.ts delete mode 100644 external-declarations/src/compiler/localInferenceResolver.ts delete mode 100644 external-declarations/src/compiler/transformer.ts diff --git a/external-declarations/src/compiler/debug.ts b/external-declarations/src/compiler/debug.ts index 551ea118d26d0..34e4eb9d9ea01 100644 --- a/external-declarations/src/compiler/debug.ts +++ b/external-declarations/src/compiler/debug.ts @@ -1,49 +1,6 @@ -import { Symbol, Node, NodeArray, SyntaxKind, unescapeLeadingUnderscores, SortedReadonlyArray, NodeFlags, ModifierFlags, EmitFlags, SymbolFlags, TypeFlags, ObjectFlags, FlowFlags, FlowNodeBase, Type, symbolName, LiteralType, BigIntLiteralType, ObjectType, Signature, isIdentifier, idText, isPrivateIdentifier, isStringLiteral, isNumericLiteral, isBigIntLiteral, isTypeParameterDeclaration, isParameter, isConstructorDeclaration, isGetAccessorDeclaration, isSetAccessorDeclaration, isCallSignatureDeclaration, isConstructSignatureDeclaration, isIndexSignatureDeclaration, isTypePredicateNode, isTypeReferenceNode, isFunctionTypeNode, isConstructorTypeNode, isTypeQueryNode, isTypeLiteralNode, isArrayTypeNode, isTupleTypeNode, isOptionalTypeNode, isRestTypeNode, isUnionTypeNode, isIntersectionTypeNode, isConditionalTypeNode, isInferTypeNode, isParenthesizedTypeNode, isThisTypeNode, isTypeOperatorNode, isIndexedAccessTypeNode, isMappedTypeNode, isLiteralTypeNode, isNamedTupleMember, isImportTypeNode, isParseTreeNode, getParseTreeNode, FlowNode, FlowSwitchClause, FlowLabel, MapLike } from "typescript"; -import * as ts from "typescript"; -import { getSourceFileOfNode, getSourceTextOfNodeFromSourceFile} from "./utils"; -import { every, map, stableSort, compareValues } from "./lang-utils"; - -/** @internal */ -export const enum AssertionLevel { - None = 0, - Normal = 1, - Aggressive = 2, - VeryAggressive = 3, -} -type AssertionKeys = keyof typeof Debug; - -const hasOwnProperty = Object.prototype.hasOwnProperty; - -/** - * Indicates whether a map-like contains an own property with the specified key. - * - * @param map A map-like. - * @param key A property key. - * - * @internal - */ -export function hasProperty(map: MapLike, key: string): boolean { - return hasOwnProperty.call(map, key); -} - - - - -/** - * Tests whether an assertion function should be executed. If it shouldn't, it is cached and replaced with `ts.noop`. - * Replaced assertion functions are restored when `Debug.setAssertionLevel` is set to a high enough level. - * @param level The minimum assertion level required. - * @param name The name of the current assertion function. - */ -function shouldAssertFunction(_level: AssertionLevel, _name: K): boolean { - return true; -} - type AnyFunction = (...a: any) => any; /** @internal */ export namespace Debug { - - export function fail(message?: string, stackCrawlMark?: AnyFunction): never { debugger; const e = new Error(message ? `Debug Failure. ${message}` : "Debug Failure."); @@ -53,12 +10,6 @@ export namespace Debug { throw e; } - export function failBadSyntaxKind(node: Node, message?: string, stackCrawlMark?: AnyFunction): never { - return fail( - `${message || "Unexpected node."}\r\nNode ${formatSyntaxKind(node.kind)} was unexpected.`, - stackCrawlMark || failBadSyntaxKind); - } - export function assert(expression: unknown, message?: string, verboseDebugInfo?: string | (() => string), stackCrawlMark?: AnyFunction): asserts expression { if (!expression) { message = message ? `False expression: ${message}` : "False expression."; @@ -69,251 +20,8 @@ export namespace Debug { } } - export function assertEqual(a: T, b: T, msg?: string, msg2?: string, stackCrawlMark?: AnyFunction): void { - if (a !== b) { - const message = msg ? msg2 ? `${msg} ${msg2}` : msg : ""; - fail(`Expected ${a} === ${b}. ${message}`, stackCrawlMark || assertEqual); - } - } - - export function assertLessThan(a: number, b: number, msg?: string, stackCrawlMark?: AnyFunction): void { - if (a >= b) { - fail(`Expected ${a} < ${b}. ${msg || ""}`, stackCrawlMark || assertLessThan); - } - } - - export function assertLessThanOrEqual(a: number, b: number, stackCrawlMark?: AnyFunction): void { - if (a > b) { - fail(`Expected ${a} <= ${b}`, stackCrawlMark || assertLessThanOrEqual); - } - } - - export function assertGreaterThanOrEqual(a: number, b: number, stackCrawlMark?: AnyFunction): void { - if (a < b) { - fail(`Expected ${a} >= ${b}`, stackCrawlMark || assertGreaterThanOrEqual); - } - } - - export function assertIsDefined(value: T, message?: string, stackCrawlMark?: AnyFunction): asserts value is NonNullable { - // eslint-disable-next-line no-null/no-null - if (value === undefined || value === null) { - fail(message, stackCrawlMark || assertIsDefined); - } - } - - export function checkDefined(value: T | null | undefined, message?: string, stackCrawlMark?: AnyFunction): T { - assertIsDefined(value, message, stackCrawlMark || checkDefined); - return value; - } - - export function assertEachIsDefined(value: NodeArray, message?: string, stackCrawlMark?: AnyFunction): asserts value is NodeArray; - export function assertEachIsDefined(value: readonly T[], message?: string, stackCrawlMark?: AnyFunction): asserts value is readonly NonNullable[]; - export function assertEachIsDefined(value: readonly T[], message?: string, stackCrawlMark?: AnyFunction) { - for (const v of value) { - assertIsDefined(v, message, stackCrawlMark || assertEachIsDefined); - } - } - - export function checkEachDefined(value: A, message?: string, stackCrawlMark?: AnyFunction): A { - assertEachIsDefined(value, message, stackCrawlMark || checkEachDefined); - return value; - } - export function assertNever(member: never, message = "Illegal value:", stackCrawlMark?: AnyFunction): never { - const detail = typeof member === "object" && hasProperty(member, "kind") && hasProperty(member, "pos") ? "SyntaxKind: " + formatSyntaxKind((member as Node).kind) : JSON.stringify(member); + const detail = JSON.stringify(member); return fail(`${message} ${detail}`, stackCrawlMark || assertNever); } - - export function assertEachNode(nodes: NodeArray, test: (node: T) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts nodes is NodeArray; - export function assertEachNode(nodes: readonly T[], test: (node: T) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts nodes is readonly U[]; - export function assertEachNode(nodes: NodeArray | undefined, test: (node: T) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts nodes is NodeArray | undefined; - export function assertEachNode(nodes: readonly T[] | undefined, test: (node: T) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts nodes is readonly U[] | undefined; - export function assertEachNode(nodes: readonly Node[], test: (node: Node) => boolean, message?: string, stackCrawlMark?: AnyFunction): void; - export function assertEachNode(nodes: readonly Node[] | undefined, test: (node: Node) => boolean, message?: string, stackCrawlMark?: AnyFunction) { - if (shouldAssertFunction(AssertionLevel.Normal, "assertEachNode")) { - assert( - test === undefined || every(nodes, test), - message || "Unexpected node.", - () => `Node array did not pass test '${getFunctionName(test)}'.`, - stackCrawlMark || assertEachNode); - } - } - - export function assertNode(node: T | undefined, test: (node: T) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts node is U; - export function assertNode(node: Node | undefined, test: ((node: Node) => boolean) | undefined, message?: string, stackCrawlMark?: AnyFunction): void; - export function assertNode(node: Node | undefined, test: ((node: Node) => boolean) | undefined, message?: string, stackCrawlMark?: AnyFunction) { - if (shouldAssertFunction(AssertionLevel.Normal, "assertNode")) { - assert( - node !== undefined && (test === undefined || test(node)), - message || "Unexpected node.", - () => `Node ${formatSyntaxKind(node?.kind)} did not pass test '${getFunctionName(test!)}'.`, - stackCrawlMark || assertNode); - } - } - - export function assertNotNode(node: T | undefined, test: (node: Node) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts node is Exclude; - export function assertNotNode(node: Node | undefined, test: ((node: Node) => boolean) | undefined, message?: string, stackCrawlMark?: AnyFunction): void; - export function assertNotNode(node: Node | undefined, test: ((node: Node) => boolean) | undefined, message?: string, stackCrawlMark?: AnyFunction) { - if (shouldAssertFunction(AssertionLevel.Normal, "assertNotNode")) { - assert( - node === undefined || test === undefined || !test(node), - message || "Unexpected node.", - () => `Node ${formatSyntaxKind(node!.kind)} should not have passed test '${getFunctionName(test!)}'.`, - stackCrawlMark || assertNotNode); - } - } - - export function assertOptionalNode(node: T, test: (node: T) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts node is U; - export function assertOptionalNode(node: T | undefined, test: (node: T) => node is U, message?: string, stackCrawlMark?: AnyFunction): asserts node is U | undefined; - export function assertOptionalNode(node: Node | undefined, test: ((node: Node) => boolean) | undefined, message?: string, stackCrawlMark?: AnyFunction): void; - export function assertOptionalNode(node: Node | undefined, test: ((node: Node) => boolean) | undefined, message?: string, stackCrawlMark?: AnyFunction) { - if (shouldAssertFunction(AssertionLevel.Normal, "assertOptionalNode")) { - assert( - test === undefined || node === undefined || test(node), - message || "Unexpected node.", - () => `Node ${formatSyntaxKind(node?.kind)} did not pass test '${getFunctionName(test!)}'.`, - stackCrawlMark || assertOptionalNode); - } - } - - export function assertOptionalToken(node: T, kind: K, message?: string, stackCrawlMark?: AnyFunction): asserts node is Extract; - export function assertOptionalToken(node: T | undefined, kind: K, message?: string, stackCrawlMark?: AnyFunction): asserts node is Extract | undefined; - export function assertOptionalToken(node: Node | undefined, kind: SyntaxKind | undefined, message?: string, stackCrawlMark?: AnyFunction): void; - export function assertOptionalToken(node: Node | undefined, kind: SyntaxKind | undefined, message?: string, stackCrawlMark?: AnyFunction) { - if (shouldAssertFunction(AssertionLevel.Normal, "assertOptionalToken")) { - assert( - kind === undefined || node === undefined || node.kind === kind, - message || "Unexpected node.", - () => `Node ${formatSyntaxKind(node?.kind)} was not a '${formatSyntaxKind(kind)}' token.`, - stackCrawlMark || assertOptionalToken); - } - } - - export function assertMissingNode(node: Node | undefined, message?: string, stackCrawlMark?: AnyFunction): asserts node is undefined; - export function assertMissingNode(node: Node | undefined, message?: string, stackCrawlMark?: AnyFunction) { - if (shouldAssertFunction(AssertionLevel.Normal, "assertMissingNode")) { - assert( - node === undefined, - message || "Unexpected node.", - () => `Node ${formatSyntaxKind(node!.kind)} was unexpected'.`, - stackCrawlMark || assertMissingNode); - } - } - - /** - * Asserts a value has the specified type in typespace only (does not perform a runtime assertion). - * This is useful in cases where we switch on `node.kind` and can be reasonably sure the type is accurate, and - * as a result can reduce the number of unnecessary casts. - */ - export function type(value: unknown): asserts value is T; - export function type(_value: unknown) { } - - export function getFunctionName(func: AnyFunction) { - if (typeof func !== "function") { - return ""; - } - else if (hasProperty(func, "name")) { - return (func as any).name; - } - else { - const text = Function.prototype.toString.call(func); - const match = /^function\s+([\w\$]+)\s*\(/.exec(text); - return match ? match[1] : ""; - } - } - - export function formatSymbol(symbol: Symbol): string { - return `{ name: ${unescapeLeadingUnderscores(symbol.escapedName)}; flags: ${formatSymbolFlags(symbol.flags)}; declarations: ${map(symbol.declarations, node => formatSyntaxKind(node.kind))} }`; - } - - /** - * 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); - if (value === 0) { - return members.length > 0 && members[0][0] === 0 ? members[0][1] : "0"; - } - if (isFlags) { - const result: string[] = []; - let remainingFlags = value; - for (const [enumValue, enumName] of members) { - if (enumValue > value) { - break; - } - if (enumValue !== 0 && enumValue & value) { - result.push(enumName); - remainingFlags &= ~enumValue; - } - } - if (remainingFlags === 0) { - return result.join("|"); - } - } - else { - for (const [enumValue, enumName] of members) { - if (enumValue === value) { - return enumName; - } - } - } - return value.toString(); - } - - const enumMemberCache = new Map>(); - - function getEnumMembers(enumObject: any) { - // 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). - const existing = enumMemberCache.get(enumObject); - if (existing) { - return existing; - } - - const result: [number, string][] = []; - for (const name in enumObject) { - const value = enumObject[name]; - if (typeof value === "number") { - result.push([value, name]); - } - } - - const sorted = stableSort<[number, string]>(result, (x, y) => compareValues(x[0], y[0])); - enumMemberCache.set(enumObject, sorted); - return sorted; - } - - export function formatSyntaxKind(kind: SyntaxKind | undefined): string { - return formatEnum(kind, (ts as any).SyntaxKind, /*isFlags*/ false); - } - - - export function formatNodeFlags(flags: NodeFlags | undefined): string { - return formatEnum(flags, (ts as any).NodeFlags, /*isFlags*/ true); - } - - export function formatModifierFlags(flags: ModifierFlags | undefined): string { - return formatEnum(flags, (ts as any).ModifierFlags, /*isFlags*/ true); - } - - export function formatEmitFlags(flags: EmitFlags | undefined): string { - return formatEnum(flags, (ts as any).EmitFlags, /*isFlags*/ true); - } - - export function formatSymbolFlags(flags: SymbolFlags | undefined): string { - return formatEnum(flags, (ts as any).SymbolFlags, /*isFlags*/ true); - } - - export function formatTypeFlags(flags: TypeFlags | undefined): string { - return formatEnum(flags, (ts as any).TypeFlags, /*isFlags*/ true); - } - - export function formatObjectFlags(flags: ObjectFlags | undefined): string { - return formatEnum(flags, (ts as any).ObjectFlags, /*isFlags*/ true); - } - - export function formatFlowFlags(flags: FlowFlags | undefined): string { - return formatEnum(flags, (ts as any).FlowFlags, /*isFlags*/ true); - } } diff --git a/external-declarations/src/compiler/declaration-emit.ts b/external-declarations/src/compiler/declaration-emit.ts deleted file mode 100644 index b2cb1b3c739b5..0000000000000 --- a/external-declarations/src/compiler/declaration-emit.ts +++ /dev/null @@ -1,1808 +0,0 @@ -import { Symbol, SourceFile, DiagnosticWithLocation, factory, CommentRange, Node, getParseTreeNode, SyntaxKind, SignatureDeclaration, ParameterDeclaration, getTrailingCommentRanges, getLeadingCommentRanges, NodeBuilderFlags, VisitResult, ExportAssignment, DeclarationName, Declaration, ModuleDeclaration, SymbolFlags, getNameOfDeclaration, isExportAssignment, Bundle, visitNodes, setTextRange, createUnparsedSourceFile, FileReference, NodeArray, Statement, isExternalModule, isImportEqualsDeclaration, isExternalModuleReference, isStringLiteralLike, isImportDeclaration, isStringLiteral, UnparsedSource, isUnparsedSource, BindingName, ArrayBindingElement, isIdentifier, ModifierFlags, TypeNode, FunctionDeclaration, MethodDeclaration, GetAccessorDeclaration, SetAccessorDeclaration, BindingElement, ConstructSignatureDeclaration, VariableDeclaration, MethodSignature, CallSignatureDeclaration, PropertyDeclaration, PropertySignature, visitNode, isPropertySignature, NamedDeclaration, isFunctionDeclaration, OmittedExpression, isOmittedExpression, AccessorDeclaration, isSetAccessorDeclaration, TypeParameterDeclaration, isSourceFile, isTypeAliasDeclaration, isModuleDeclaration, isClassDeclaration, isInterfaceDeclaration, isFunctionLike, isIndexSignatureDeclaration, isMappedTypeNode, EntityNameOrEntityNameExpression, setCommentRange, getCommentRange, ImportEqualsDeclaration, ImportDeclaration, ExportDeclaration, ImportTypeNode, StringLiteral, AssertClause, isSemicolonClassElement, isMethodDeclaration, isMethodSignature, isTypeQueryNode, isEntityName, visitEachChild, isPrivateIdentifier, isTypeNode, isTupleTypeNode, getLineAndCharacterOfPosition, setEmitFlags, EmitFlags, setOriginalNode, GeneratedIdentifierFlags, NodeFlags, canHaveModifiers, isTypeParameterDeclaration, NamespaceDeclaration, Identifier, VariableStatement, isPropertyAccessExpression, unescapeLeadingUnderscores, ModuleBody, BindingPattern, isExportDeclaration, HasModifiers, Modifier, isModifier, HeritageClause, InterfaceDeclaration, ClassDeclaration, TypeAliasDeclaration, EnumDeclaration, ConstructorDeclaration, IndexSignatureDeclaration, ExpressionWithTypeArguments, TypeReferenceNode, ConditionalTypeNode, FunctionTypeNode, ConstructorTypeNode, isStatement, isArrayBindingElement, isBindingElement, isClassElement, isExpressionWithTypeArguments, isLiteralExpression, isTypeElement, isVariableDeclaration, NodeFactory, isTypeAssertionExpression, isNumericLiteral, isTemplateLiteral, BooleanLiteral, TypeAssertion, LiteralExpression, AsExpression, isTypeReferenceNode, ObjectLiteralExpression, TypeElement, isPropertyAssignment, ArrayLiteralExpression, isSpreadElement, FunctionExpression, ArrowFunction, isParameter, isPropertyName, NewExpression, KeywordTypeSyntaxKind, isPropertyDeclaration, isReturnStatement, isClassLike, ReturnStatement, forEachChild, TypeLiteralNode, __String, isTypeLiteralNode, isLiteralTypeNode, TemplateExpression, TemplateLiteralTypeSpan, TemplateHead, isNoSubstitutionTemplateLiteral, isTypeOfExpression, PrefixUnaryOperator, isYieldExpression, YieldExpression, isBlock, EntityName, isQualifiedName, isGetAccessorDeclaration, CallExpression, isComputedPropertyName, isShorthandPropertyAssignment, isSpreadAssignment, ConditionalExpression, NodeWithTypeArguments, isArrayTypeNode, isFunctionTypeNode, isConstructorTypeNode, PropertyName, isExpressionStatement, isBinaryExpression, Visitor, isVariableStatement, SatisfiesExpression, ObjectLiteralElementLike, QualifiedName, forEachChildRecursively, getTokenPosOfNode, HasInferredType, isElementAccessExpression, ScriptTarget, isStringANonContextualKeyword } from "typescript"; -import { Debug } from "./debug"; -import { Diagnostics } from "./diagnosticInformationMap.generated"; -import { filter, stringContains, concatenate, last, forEach, length, pushIfUnique, map, mapDefined, arrayFrom, contains, startsWith, some, append, emptyArray, isArray, compact, flatMap, flatten, orderedRemoveItem, tryCast, findIndex } from "./lang-utils"; -import { getDirectoryPath, normalizeSlashes, toFileNameLowerCase } from "./path-utils"; -import { transformNodes } from "./transformer"; -import { EmitHost, EmitResolver, GetSymbolAccessibilityDiagnostic, LateBoundDeclaration, NodeId, ResolutionMode, SymbolAccessibility, SymbolAccessibilityResult, SymbolTracker, TransformationContext, nullTransformationContext } from "./types"; -import { getEffectiveModifierFlags, skipTrivia, getLeadingCommentRangesOfNode, LateVisibilityPaintedStatement, AnyImportSyntax, getSourceFileOfNode, createDiagnosticForNode, getTextOfNode, declarationNameToString, canProduceDiagnostics, getThisParameter, isDeclaration, DeclarationDiagnosticProducing, setParent, getFirstConstructorWithBody, hasSyntacticModifier, visitArray, AllAccessorDeclarations, isNightly, createGetSymbolAccessibilityDiagnosticForNode, getOriginalNodeId, addRelatedInfo, isExternalOrCommonJsModule, isJsonSourceFile, isSourceFileJS, getResolvedExternalModuleName, isSourceFileNotJson, isAnyImportSyntax, createEmptyExports, isExternalModuleAugmentation, isGlobalScopeAugmentation, isLateVisibilityPaintedStatement, hasDynamicName, hasEffectiveModifier, isBindingPattern, isLiteralImportTypeNode, removeAllComments, needsScopeMarker, hasJSDocNodes, isExternalModuleIndicator, getOutputPathsFor, getSetAccessorValueParameter, getExternalModuleNameFromDeclaration, getExternalModuleImportEqualsDeclarationExpression, getResolutionModeOverrideForClause, isEntityNameExpression, getEffectiveBaseTypeNode, createGetSymbolAccessibilityDiagnosticForNodeName, pathContainsNodeModules, hasIdentifierComputedName, isIdentifierANonContextualKeyword, isIdentifierText } from "./utils"; -import { createLocalInferenceResolver } from "./localInferenceResolver"; - -/** @internal */ -export function getDeclarationDiagnostics(host: EmitHost, resolver: EmitResolver, file: SourceFile | undefined): DiagnosticWithLocation[] | undefined { - const compilerOptions = host.getCompilerOptions(); - const result = transformNodes(resolver, host, factory, compilerOptions, file ? [file] : filter(host.getSourceFiles(), isSourceFileNotJson), [transformDeclarations], /*allowDtsFiles*/ false); - return result.diagnostics; -} - -function hasInternalAnnotation(range: CommentRange, currentSourceFile: SourceFile) { - const comment = currentSourceFile.text.substring(range.pos, range.end); - return stringContains(comment, "@internal"); -} - -/** @internal */ -export function isInternalDeclaration(node: Node, currentSourceFile: SourceFile) { - const parseTreeNode = getParseTreeNode(node); - if (parseTreeNode && parseTreeNode.kind === SyntaxKind.Parameter) { - const paramIdx = (parseTreeNode.parent as SignatureDeclaration).parameters.indexOf(parseTreeNode as ParameterDeclaration); - const previousSibling = paramIdx > 0 ? (parseTreeNode.parent as SignatureDeclaration).parameters[paramIdx - 1] : undefined; - const text = currentSourceFile.text; - const commentRanges = previousSibling - ? concatenate( - // to handle - // ... parameters, /** @internal */ - // public param: string - getTrailingCommentRanges(text, skipTrivia(text, previousSibling.end + 1, /*stopAfterLineBreak*/ false, /*stopAtComments*/ true)), - getLeadingCommentRanges(text, node.pos) - ) - : getTrailingCommentRanges(text, skipTrivia(text, node.pos, /*stopAfterLineBreak*/ false, /*stopAtComments*/ true)); - return commentRanges && commentRanges.length && hasInternalAnnotation(last(commentRanges), currentSourceFile); - } - const leadingCommentRanges = parseTreeNode && getLeadingCommentRangesOfNode(parseTreeNode, currentSourceFile); - return !!forEach(leadingCommentRanges, range => { - return hasInternalAnnotation(range, currentSourceFile); - }); -} - -const declarationEmitNodeBuilderFlags = - NodeBuilderFlags.MultilineObjectLiterals | - NodeBuilderFlags.WriteClassExpressionAsTypeLiteral | - NodeBuilderFlags.UseTypeOfFunction | - NodeBuilderFlags.UseStructuralFallback | - NodeBuilderFlags.AllowEmptyTuple | - NodeBuilderFlags.GenerateNamesForShadowedTypeParams | - NodeBuilderFlags.NoTruncation; - -/** - * Transforms a ts file into a .d.ts file - * This process requires type information, which is retrieved through the emit resolver. Because of this, - * in many places this transformer assumes it will be operating on parse tree nodes directly. - * This means that _no transforms should be allowed to occur before this one_. - * - * @internal - */ -export function transformDeclarations(context: TransformationContext) { - const throwDiagnostic = () => Debug.fail("Diagnostic emitted without context"); - let getSymbolAccessibilityDiagnostic: GetSymbolAccessibilityDiagnostic = throwDiagnostic; - let needsDeclare = true; - let isBundledEmit = false; - let resultHasExternalModuleIndicator = false; - let needsScopeFixMarker = false; - let resultHasScopeMarker = false; - let enclosingDeclaration: Node; - let necessaryTypeReferences: Set<[specifier: string, mode: ResolutionMode]> | undefined; - let lateMarkedStatements: LateVisibilityPaintedStatement[] | undefined; - let lateStatementReplacementMap: Map>; - let suppressNewDiagnosticContexts: boolean; - let exportedModulesFromDeclarationEmit: Symbol[] | undefined; - let localInferenceTargetNode: Node | undefined = undefined; - - const { factory } = context; - const parseNodeFactory = factory - const host = context.getEmitHost(); - const symbolTracker: SymbolTracker = { - trackSymbol, - reportInaccessibleThisError, - reportInaccessibleUniqueSymbolError, - reportCyclicStructureError, - reportPrivateInBaseOfClassExpression, - reportLikelyUnsafeImportRequiredError, - reportTruncationError, - moduleResolverHost: host, - trackReferencedAmbientModule, - trackExternalModuleSymbolOfImportTypeNode, - reportNonlocalAugmentation, - reportNonSerializableProperty, - reportImportTypeNodeResolutionModeOverride, - }; - let errorNameNode: DeclarationName | undefined; - let errorFallbackNode: Declaration | undefined; - - let currentSourceFile: SourceFile; - 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 = createLocalInferenceResolver({ - ensureParameter, - context, - visitDeclarationSubtree, - setEnclosingDeclarations(node) { - const oldNode = enclosingDeclaration; - enclosingDeclaration = node; - return oldNode; - }, - setLocalInferenceTargetNode(node) { - const oldNode = localInferenceTargetNode; - localInferenceTargetNode = node; - return oldNode; - }, - checkEntityNameVisibility(name, container) { - return checkEntityNameVisibility(name, container ?? enclosingDeclaration) - }, - }) - const options = context.getCompilerOptions(); - const { noResolve, stripInternal } = options; - const isolatedDeclarations = options.isolatedDeclarations; - return transformRoot; - - function reportIsolatedDeclarationError(node: Node) { - const message = createDiagnosticForNode( - node, - Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit - ); - context.addDiagnostic(message); - } - function recordTypeReferenceDirectivesIfNecessary(typeReferenceDirectives: readonly [specifier: string, mode: ResolutionMode][] | undefined): void { - if (!typeReferenceDirectives) { - return; - } - necessaryTypeReferences = necessaryTypeReferences || new Set(); - for (const ref of typeReferenceDirectives) { - necessaryTypeReferences.add(ref); - } - } - - function trackReferencedAmbientModule(node: ModuleDeclaration, symbol: Symbol) { - // If it is visible via `// `, then we should just use that - // TODO: isolatedDeclarations: see about .All flag - const directives = resolver.getTypeReferenceDirectivesForSymbol(symbol, (SymbolFlags as any).All); - if (length(directives)) { - return recordTypeReferenceDirectivesIfNecessary(directives); - } - // Otherwise we should emit a path-based reference - const container = getSourceFileOfNode(node); - refs.set(getOriginalNodeId(container), container); - } - - function handleSymbolAccessibilityError(symbolAccessibilityResult: SymbolAccessibilityResult) { - if (symbolAccessibilityResult.accessibility === SymbolAccessibility.Accessible) { - // Add aliases back onto the possible imports list if they're not there so we can try them again with updated visibility info - if (symbolAccessibilityResult && symbolAccessibilityResult.aliasesToMakeVisible) { - if (!lateMarkedStatements) { - lateMarkedStatements = symbolAccessibilityResult.aliasesToMakeVisible; - } - else { - for (const ref of symbolAccessibilityResult.aliasesToMakeVisible) { - pushIfUnique(lateMarkedStatements, ref); - } - } - } - - // TODO: Do all these accessibility checks inside/after the first pass in the checker when declarations are enabled, if possible - } - else { - if(localInferenceTargetNode) { - reportIsolatedDeclarationError(localInferenceTargetNode); - return true; - } - // Report error - const errorInfo = getSymbolAccessibilityDiagnostic(symbolAccessibilityResult); - if (errorInfo) { - if (errorInfo.typeName) { - context.addDiagnostic(createDiagnosticForNode(symbolAccessibilityResult.errorNode || errorInfo.errorNode, - errorInfo.diagnosticMessage, - getTextOfNode(errorInfo.typeName), - symbolAccessibilityResult.errorSymbolName!, - symbolAccessibilityResult.errorModuleName!)); - } - else { - context.addDiagnostic(createDiagnosticForNode(symbolAccessibilityResult.errorNode || errorInfo.errorNode, - errorInfo.diagnosticMessage, - symbolAccessibilityResult.errorSymbolName!, - symbolAccessibilityResult.errorModuleName!)); - } - return true; - } - } - return false; - } - - 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 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 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 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 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 reportImportTypeNodeResolutionModeOverride() { - if (!isNightly() && (errorNameNode || errorFallbackNode)) { - context.addDiagnostic(createDiagnosticForNode((errorNameNode || errorFallbackNode)!, Diagnostics.The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next)); - } - } - - function transformDeclarationsForJS(sourceFile: SourceFile, bundled?: boolean) { - const oldDiag = getSymbolAccessibilityDiagnostic; - getSymbolAccessibilityDiagnostic = (s) => (s.errorNode && canProduceDiagnostics(s.errorNode) ? createGetSymbolAccessibilityDiagnosticForNode(s.errorNode)(s) : ({ - diagnosticMessage: s.errorModuleName - ? Diagnostics.Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit - : Diagnostics.Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit, - errorNode: s.errorNode || sourceFile - })); - const result = resolver.getDeclarationStatementsForSourceFile(sourceFile, declarationEmitNodeBuilderFlags, symbolTracker, bundled); - getSymbolAccessibilityDiagnostic = oldDiag; - return result; - } - - function transformRoot(node: Bundle): Bundle; - function transformRoot(node: SourceFile): SourceFile; - function transformRoot(node: SourceFile | Bundle): SourceFile | Bundle; - function transformRoot(node: SourceFile | Bundle) { - if (node.kind === SyntaxKind.SourceFile && node.isDeclarationFile) { - return node; - } - - if (node.kind === SyntaxKind.Bundle) { - isBundledEmit = true; - refs = new Map(); - libs = new Map(); - let hasNoDefaultLib = false; - const bundle = factory.createBundle(map(node.sourceFiles, - sourceFile => { - if (sourceFile.isDeclarationFile) return undefined!; // Omit declaration files from bundle results, too // TODO: GH#18217 - hasNoDefaultLib = hasNoDefaultLib || sourceFile.hasNoDefaultLib; - currentSourceFile = sourceFile; - enclosingDeclaration = sourceFile; - lateMarkedStatements = undefined; - suppressNewDiagnosticContexts = false; - lateStatementReplacementMap = new Map(); - getSymbolAccessibilityDiagnostic = throwDiagnostic; - needsScopeFixMarker = false; - resultHasScopeMarker = false; - collectReferences(sourceFile, refs); - collectLibs(sourceFile, libs); - if (isExternalOrCommonJsModule(sourceFile) || isJsonSourceFile(sourceFile)) { - resultHasExternalModuleIndicator = false; // unused in external module bundle emit (all external modules are within module blocks, therefore are known to be modules) - needsDeclare = false; - const statements = isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile, /*bundled*/ true)) : visitNodes(sourceFile.statements, visitDeclarationStatements, isStatement); - const newFile = factory.updateSourceFile(sourceFile, [factory.createModuleDeclaration( - [factory.createModifier(SyntaxKind.DeclareKeyword)], - factory.createStringLiteral(getResolvedExternalModuleName(context.getEmitHost(), sourceFile)), - factory.createModuleBlock(setTextRange(factory.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), sourceFile.statements)) - )], /*isDeclarationFile*/ true, /*referencedFiles*/ [], /*typeReferences*/ [], /*hasNoDefaultLib*/ false, /*libReferences*/ []); - return newFile; - } - needsDeclare = true; - 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*/ []); - } - ), mapDefined(node.prepends, prepend => { - if (prepend.kind === SyntaxKind.InputFiles) { - const sourceFile = createUnparsedSourceFile(prepend, "dts", stripInternal); - hasNoDefaultLib = hasNoDefaultLib || !!sourceFile.hasNoDefaultLib; - collectReferences(sourceFile, refs); - recordTypeReferenceDirectivesIfNecessary(map(sourceFile.typeReferenceDirectives, ref => [ref.fileName, ref.resolutionMode])); - collectLibs(sourceFile, libs); - return sourceFile; - } - return prepend; - })); - bundle.syntheticFileReferences = []; - 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); - return bundle; - } - - // Single source file - needsDeclare = true; - needsScopeFixMarker = false; - resultHasScopeMarker = false; - enclosingDeclaration = node; - currentSourceFile = node; - getSymbolAccessibilityDiagnostic = throwDiagnostic; - isBundledEmit = false; - resultHasExternalModuleIndicator = false; - suppressNewDiagnosticContexts = false; - lateMarkedStatements = undefined; - lateStatementReplacementMap = new Map(); - necessaryTypeReferences = undefined; - 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); - let combinedStatements: NodeArray; - if (isSourceFileJS(currentSourceFile)) { - combinedStatements = factory.createNodeArray(transformDeclarationsForJS(node)); - 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); - emittedImports = filter(combinedStatements, isAnyImportSyntax); - if (isExternalModule(node) && (!resultHasExternalModuleIndicator || (needsScopeFixMarker && !resultHasScopeMarker))) { - combinedStatements = setTextRange(factory.createNodeArray([...combinedStatements, createEmptyExports(factory)]), combinedStatements); - } - } - const typeReferences = isolatedDeclarations? node.typeReferenceDirectives: getFileReferencesForUsedTypeReferences(); - const updated = factory.updateSourceFile(node, combinedStatements, /*isDeclarationFile*/ true, references, typeReferences, node.hasNoDefaultLib, getLibReferences()); - updated.exportedModulesFromDeclarationEmit = exportedModulesFromDeclarationEmit; - return updated; - - function getLibReferences() { - return arrayFrom(libs.keys(), lib => ({ fileName: lib, pos: -1, end: -1 })); - } - - function getFileReferencesForUsedTypeReferences() { - return necessaryTypeReferences ? mapDefined(arrayFrom(necessaryTypeReferences.keys()), getFileReferenceForSpecifierModeTuple) : []; - } - - function getFileReferenceForSpecifierModeTuple([typeName, mode]: [specifier: string, mode: ResolutionMode]): FileReference | undefined { - // Elide type references for which we have imports - if (emittedImports) { - for (const importStatement of emittedImports) { - if (isImportEqualsDeclaration(importStatement) && isExternalModuleReference(importStatement.moduleReference)) { - const expr = importStatement.moduleReference.expression; - if (isStringLiteralLike(expr) && expr.text === typeName) { - return undefined; - } - } - else if (isImportDeclaration(importStatement) && isStringLiteral(importStatement.moduleSpecifier) && importStatement.moduleSpecifier.text === typeName) { - return undefined; - } - } - } - return { fileName: typeName, pos: -1, end: -1, ...(mode ? { resolutionMode: mode } : undefined) }; - } - - function mapReferencesIntoArray(references: FileReference[], outputFilePath: string): (file: SourceFile) => void { - return file => { - let fileName = file.fileName; - references.push({ pos: -1, end: -1, fileName }); - }; - } - } - - function collectReferences(sourceFile: SourceFile | UnparsedSource, ret: Map) { - if (noResolve || (!isUnparsedSource(sourceFile) && isSourceFileJS(sourceFile))) return ret; - forEach(sourceFile.referencedFiles, f => { - const elem = host.getSourceFileFromReference(sourceFile, f); - if (elem) { - ret.set(getOriginalNodeId(elem), elem); - } - }); - return ret; - } - - function collectLibs(sourceFile: SourceFile | UnparsedSource, ret: Map) { - forEach(sourceFile.libReferenceDirectives, ref => { - const lib = host.getLibFileFromReference(ref); - if (lib) { - ret.set(toFileNameLowerCase(ref.fileName), true); - } - }); - return ret; - } - - function filterBindingPatternInitializersAndRenamings(name: BindingName) { - if (name.kind === SyntaxKind.Identifier) { - return name; - } - else { - if (name.kind === SyntaxKind.ArrayBindingPattern) { - return factory.updateArrayBindingPattern(name, visitNodes(name.elements, visitBindingElement, isArrayBindingElement)); - } - else { - return factory.updateObjectBindingPattern(name, visitNodes(name.elements, visitBindingElement, isBindingElement)); - } - } - - function visitBindingElement(elem: T): T; - function visitBindingElement(elem: ArrayBindingElement): ArrayBindingElement { - if (elem.kind === SyntaxKind.OmittedExpression) { - return elem; - } - if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) - // TODO: isolated declarations: find a better way for this since we don't actually do signature usage analysis - && !isolatedDeclarations && !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { - // Unnecessary property renaming is forbidden in types, so remove renaming - return factory.updateBindingElement( - elem, - elem.dotDotDotToken, - /*propertyName*/ undefined, - elem.propertyName, - shouldPrintWithInitializer(elem) ? elem.initializer : undefined - ); - } - return factory.updateBindingElement( - elem, - elem.dotDotDotToken, - elem.propertyName, - filterBindingPatternInitializersAndRenamings(elem.name), - shouldPrintWithInitializer(elem) ? elem.initializer : undefined - ); - } - } - - function ensureParameter(p: ParameterDeclaration, modifierMask?: ModifierFlags, type?: TypeNode): ParameterDeclaration { - let oldDiag: typeof getSymbolAccessibilityDiagnostic | undefined; - if (!suppressNewDiagnosticContexts) { - oldDiag = getSymbolAccessibilityDiagnostic; - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(p); - } - const newParam = factory.updateParameterDeclaration( - p, - maskModifiers(factory, p, modifierMask), - p.dotDotDotToken, - filterBindingPatternInitializersAndRenamings(p.name), - resolver.isOptionalParameter(p) ? (p.questionToken || factory.createToken(SyntaxKind.QuestionToken)) : undefined, - ensureType(p, type || p.type, /*ignorePrivate*/ true), // Ignore private param props, since this type is going straight back into a param - ensureNoInitializer(p) - ); - if (!suppressNewDiagnosticContexts) { - getSymbolAccessibilityDiagnostic = oldDiag!; - } - return newParam; - } - - function shouldPrintWithInitializer(node: Node) { - return canHaveLiteralInitializer(node) && resolver.isLiteralConstDeclaration(getParseTreeNode(node) as CanHaveLiteralInitializer); // TODO: Make safe - } - - function ensureNoInitializer(node: CanHaveLiteralInitializer) { - if (shouldPrintWithInitializer(node)) { - if(isolatedDeclarations && 'initializer' in node && node.initializer && isLiteralExpression(node.initializer)) { - return node.initializer; - } - return resolver.createLiteralConstValue(getParseTreeNode(node) as CanHaveLiteralInitializer, symbolTracker); // TODO: Make safe - } - return undefined; - } - - 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) - return; - } - if (shouldPrintWithInitializer(node)) { - // Literal const declarations will have an initializer ensured rather than a type - return; - } - if (isolatedDeclarations) { - if (type === undefined && localInferenceResolver) { - return localInferenceResolver.fromInitializer(node, currentSourceFile) - } - return visitNode(type, visitDeclarationSubtree, isTypeNode); - } - const shouldUseResolverType = node.kind === SyntaxKind.Parameter && - (resolver.isRequiredInitializedParameter(node) || - resolver.isOptionalUninitializedParameterProperty(node)); - if (type && !shouldUseResolverType) { - return visitNode(type, visitDeclarationSubtree, isTypeNode); - } - if (!getParseTreeNode(node)) { - return type ? visitNode(type, visitDeclarationSubtree, isTypeNode) : factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); - } - if (node.kind === SyntaxKind.SetAccessor) { - // Set accessors with no associated type node (from it's param or get accessor return) are `any` since they are never contextually typed right now - // (The inferred type here will be void, but the old declaration emitter printed `any`, so this replicates that) - return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); - } - errorNameNode = node.name; - let oldDiag: typeof getSymbolAccessibilityDiagnostic; - if (!suppressNewDiagnosticContexts) { - oldDiag = getSymbolAccessibilityDiagnostic; - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(node); - } - if (node.kind === SyntaxKind.VariableDeclaration || node.kind === SyntaxKind.BindingElement) { - return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); - } - if (node.kind === SyntaxKind.Parameter - || node.kind === SyntaxKind.PropertyDeclaration - || node.kind === SyntaxKind.PropertySignature) { - if (isPropertySignature(node) || !node.initializer) return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType)); - return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType) || resolver.createTypeOfExpression(node.initializer, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); - } - return cleanup(resolver.createReturnTypeOfSignatureDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker)); - - function cleanup(returnValue: TypeNode | undefined) { - errorNameNode = undefined; - if (!suppressNewDiagnosticContexts) { - getSymbolAccessibilityDiagnostic = oldDiag; - } - return returnValue || factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); - } - } - - function isDeclarationAndNotVisible(node: NamedDeclaration) { - node = getParseTreeNode(node) as NamedDeclaration; - switch (node.kind) { - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.InterfaceDeclaration: - case SyntaxKind.ClassDeclaration: - case SyntaxKind.TypeAliasDeclaration: - case SyntaxKind.EnumDeclaration: - return !resolver.isDeclarationVisible(node); - // The following should be doing their own visibility checks based on filtering their members - case SyntaxKind.VariableDeclaration: - return !getBindingNameVisible(node as VariableDeclaration); - case SyntaxKind.ImportEqualsDeclaration: - case SyntaxKind.ImportDeclaration: - case SyntaxKind.ExportDeclaration: - case SyntaxKind.ExportAssignment: - return false; - case SyntaxKind.ClassStaticBlockDeclaration: - return true; - } - return false; - } - - // If the ExpandoFunctionDeclaration have multiple overloads, then we only need to emit properties for the last one. - function shouldEmitFunctionProperties(input: FunctionDeclaration) { - if (input.body) { - return true; - } - - const overloadSignatures = input.symbol.declarations?.filter(decl => isFunctionDeclaration(decl) && !decl.body); - return !overloadSignatures || overloadSignatures.indexOf(input) === overloadSignatures.length - 1; - } - - function getBindingNameVisible(elem: BindingElement | VariableDeclaration | OmittedExpression): boolean { - if (isOmittedExpression(elem)) { - return false; - } - if (isBindingPattern(elem.name)) { - // If any child binding pattern element has been marked visible (usually by collect linked aliases), then this is visible - return some(elem.name.elements, getBindingNameVisible); - } - else { - return resolver.isDeclarationVisible(elem); - } - } - - function updateParamsList(node: Node, params: NodeArray, modifierMask?: ModifierFlags): NodeArray { - if (hasEffectiveModifier(node, ModifierFlags.Private)) { - return factory.createNodeArray(); - } - const newParams = map(params, p => ensureParameter(p, modifierMask)); - if (!newParams) { - return factory.createNodeArray(); - } - return factory.createNodeArray(newParams, params.hasTrailingComma); - } - - function updateAccessorParamsList(input: AccessorDeclaration, isPrivate: boolean) { - let newParams: ParameterDeclaration[] | undefined; - if (!isPrivate) { - const thisParameter = getThisParameter(input); - if (thisParameter) { - newParams = [ensureParameter(thisParameter)]; - } - } - if (isSetAccessorDeclaration(input)) { - let newValueParameter: ParameterDeclaration | undefined; - if (!isPrivate) { - const valueParameter = getSetAccessorValueParameter(input); - if (valueParameter) { - const accessorType = - isolatedDeclarations ? - undefined: - getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input)); - newValueParameter = ensureParameter(valueParameter, /*modifierMask*/ undefined, accessorType); - } - } - if (!newValueParameter) { - newValueParameter = factory.createParameterDeclaration( - /*modifiers*/ undefined, - /*dotDotDotToken*/ undefined, - "value" - ); - } - newParams = append(newParams, newValueParameter); - } - return factory.createNodeArray(newParams || emptyArray); - } - - function ensureTypeParams(node: Node, params: NodeArray | undefined) { - return hasEffectiveModifier(node, ModifierFlags.Private) ? undefined : visitNodes(params, visitDeclarationSubtree, isTypeParameterDeclaration); - } - - function isEnclosingDeclaration(node: Node) { - return isSourceFile(node) - || isTypeAliasDeclaration(node) - || isModuleDeclaration(node) - || isClassDeclaration(node) - || isInterfaceDeclaration(node) - || isFunctionLike(node) - || isIndexSignatureDeclaration(node) - || isMappedTypeNode(node); - } - - function checkEntityNameVisibility(entityName: EntityNameOrEntityNameExpression, enclosingDeclaration: Node) { - const visibilityResult = resolver.isEntityNameVisible(entityName, enclosingDeclaration); - handleSymbolAccessibilityError(visibilityResult); - recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForEntityName(entityName)); - } - - function preserveJsDoc(updated: T, original: Node): T { - if (hasJSDocNodes(updated) && hasJSDocNodes(original)) { - updated.jsDoc = original.jsDoc; - } - return setCommentRange(updated, getCommentRange(original)); - } - - 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); - } - } - else { - const symbol = resolver.getSymbolOfExternalModuleSpecifier(input); - if (symbol) { - (exportedModulesFromDeclarationEmit || (exportedModulesFromDeclarationEmit = [])).push(symbol); - } - } - } - return input; - } - - function transformImportEqualsDeclaration(decl: ImportEqualsDeclaration) { - if (!resolver.isDeclarationVisible(decl)) return; - if (decl.moduleReference.kind === SyntaxKind.ExternalModuleReference) { - // Rewrite external module names if necessary - const specifier = getExternalModuleImportEqualsDeclarationExpression(decl); - return factory.updateImportEqualsDeclaration( - decl, - decl.modifiers, - decl.isTypeOnly, - decl.name, - factory.updateExternalModuleReference(decl.moduleReference, rewriteModuleSpecifier(decl, specifier)) - ); - } - else { - const oldDiag = getSymbolAccessibilityDiagnostic; - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(decl); - checkEntityNameVisibility(decl.moduleReference, enclosingDeclaration); - getSymbolAccessibilityDiagnostic = oldDiag; - return decl; - } - } - - function transformImportDeclaration(decl: ImportDeclaration) { - if (!decl.importClause) { - // import "mod" - possibly needed for side effects? (global interface patches, module augmentations, etc) - return factory.updateImportDeclaration( - decl, - decl.modifiers, - decl.importClause, - rewriteModuleSpecifier(decl, decl.moduleSpecifier), - getResolutionModeOverrideForClauseInNightly(decl.assertClause) - ); - } - // The `importClause` visibility corresponds to the default's visibility. - const visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : undefined; - if (!decl.importClause.namedBindings) { - // No named bindings (either namespace or list), meaning the import is just default or should be elided - return visibleDefaultBinding && factory.updateImportDeclaration(decl, decl.modifiers, factory.updateImportClause( - decl.importClause, - decl.importClause.isTypeOnly, - visibleDefaultBinding, - /*namedBindings*/ undefined, - ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)); - } - if (decl.importClause.namedBindings.kind === SyntaxKind.NamespaceImport) { - // Namespace import (optionally with visible default) - const namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : /*namedBindings*/ undefined; - return visibleDefaultBinding || namedBindings ? factory.updateImportDeclaration(decl, decl.modifiers, factory.updateImportClause( - decl.importClause, - decl.importClause.isTypeOnly, - visibleDefaultBinding, - namedBindings, - ), rewriteModuleSpecifier(decl, decl.moduleSpecifier), getResolutionModeOverrideForClauseInNightly(decl.assertClause)) : undefined; - } - // Named imports (optionally with visible default) - const bindingList = mapDefined(decl.importClause.namedBindings.elements, b => resolver.isDeclarationVisible(b) ? b : undefined); - if ((bindingList && bindingList.length) || visibleDefaultBinding) { - return factory.updateImportDeclaration( - decl, - decl.modifiers, - factory.updateImportClause( - decl.importClause, - decl.importClause.isTypeOnly, - visibleDefaultBinding, - bindingList && bindingList.length ? factory.updateNamedImports(decl.importClause.namedBindings, bindingList) : undefined, - ), - rewriteModuleSpecifier(decl, decl.moduleSpecifier), - getResolutionModeOverrideForClauseInNightly(decl.assertClause) - ); - } - // Augmentation of export depends on import - if (resolver.isImportRequiredByAugmentation(decl)) { - if(isolatedDeclarations) { - // TODO: Should report better error here. Suggest we add the syntax import type '....' - // Also add a test for this. - reportIsolatedDeclarationError(decl); - return undefined; - } - return factory.updateImportDeclaration( - decl, - decl.modifiers, - /*importClause*/ undefined, - rewriteModuleSpecifier(decl, decl.moduleSpecifier), - getResolutionModeOverrideForClauseInNightly(decl.assertClause) - ); - } - // Nothing visible - } - - function getResolutionModeOverrideForClauseInNightly(assertClause: AssertClause | undefined) { - const mode = getResolutionModeOverrideForClause(assertClause); - if (mode !== undefined) { - if (!isNightly()) { - context.addDiagnostic(createDiagnosticForNode(assertClause!, Diagnostics.resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next)); - } - return assertClause; - } - return undefined; - } - - function transformAndReplaceLatePaintedStatements(statements: NodeArray): NodeArray { - // This is a `while` loop because `handleSymbolAccessibilityError` can see additional import aliases marked as visible during - // error handling which must now be included in the output and themselves checked for errors. - // For example: - // ``` - // module A { - // export module Q {} - // import B = Q; - // import C = B; - // export import D = C; - // } - // ``` - // In such a scenario, only Q and D are initially visible, but we don't consider imports as private names - instead we say they if they are referenced they must - // be recorded. So while checking D's visibility we mark C as visible, then we must check C which in turn marks B, completing the chain of - // dependent imports and allowing a valid declaration file output. Today, this dependent alias marking only happens for internal import aliases. - while (length(lateMarkedStatements)) { - const i = lateMarkedStatements!.shift()!; - if (!isLateVisibilityPaintedStatement(i)) { - return Debug.fail(`Late replaced statement was found which is not handled by the declaration transformer!: ${Debug.formatSyntaxKind((i as Node).kind)}`); - } - const priorNeedsDeclare = needsDeclare; - needsDeclare = i.parent && isSourceFile(i.parent) && !(isExternalModule(i.parent) && isBundledEmit); - const result = transformTopLevelDeclaration(i); - needsDeclare = priorNeedsDeclare; - lateStatementReplacementMap.set(getOriginalNodeId(i), result); - } - - // And lastly, we need to get the final form of all those indetermine import declarations from before and add them to the output list - // (and remove them from the set to examine for outter declarations) - return visitNodes(statements, visitLateVisibilityMarkedStatements, isStatement); - - function visitLateVisibilityMarkedStatements(statement: Statement) { - if (isLateVisibilityPaintedStatement(statement)) { - const key = getOriginalNodeId(statement); - if (lateStatementReplacementMap.has(key)) { - const result = lateStatementReplacementMap.get(key) as Statement | readonly Statement[] | undefined; - lateStatementReplacementMap.delete(key); - if (result) { - if (isArray(result) ? some(result, needsScopeMarker) : needsScopeMarker(result)) { - // Top-level declarations in .d.ts files are always considered exported even without a modifier unless there's an export assignment or specifier - needsScopeFixMarker = true; - } - if (isSourceFile(statement.parent) && (isArray(result) ? some(result, isExternalModuleIndicator) : isExternalModuleIndicator(result))) { - resultHasExternalModuleIndicator = true; - } - } - return result; - } - } - return statement; - } - } - - function visitDeclarationSubtree(input: Node): VisitResult { - if (shouldStripInternal(input)) return; - if (isDeclaration(input)) { - if (isDeclarationAndNotVisible(input)) return; - if (hasDynamicName(input) && !resolver.isLateBound(getParseTreeNode(input) as Declaration)) { - if (isolatedDeclarations && hasIdentifierComputedName(input)) { - reportIsolatedDeclarationError(input); - } - else { - return; - } - } - } - - // Elide implementation signatures from overload sets - if (isFunctionLike(input) && resolver.isImplementationOfOverload(input)) return; - - // Elide semicolon class statements - if (isSemicolonClassElement(input)) return; - - let previousEnclosingDeclaration: typeof enclosingDeclaration; - if (isEnclosingDeclaration(input)) { - previousEnclosingDeclaration = enclosingDeclaration; - enclosingDeclaration = input as Declaration; - } - const oldDiag = getSymbolAccessibilityDiagnostic; - - // Setup diagnostic-related flags before first potential `cleanup` call, otherwise - // We'd see a TDZ violation at runtime - const canProduceDiagnostic = canProduceDiagnostics(input); - const oldWithinObjectLiteralType = suppressNewDiagnosticContexts; - let shouldEnterSuppressNewDiagnosticsContextContext = ((input.kind === SyntaxKind.TypeLiteral || input.kind === SyntaxKind.MappedType) && input.parent.kind !== SyntaxKind.TypeAliasDeclaration); - - // Emit methods which are private as properties with no type information - if (isMethodDeclaration(input) || isMethodSignature(input)) { - if (hasEffectiveModifier(input, ModifierFlags.Private)) { - if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input) return; // Elide all but the first overload - return cleanup(factory.createPropertyDeclaration(ensureModifiers(input), input.name, /*questionOrExclamationToken*/ undefined, /*type*/ undefined, /*initializer*/ undefined)); - } - } - - if (canProduceDiagnostic && !suppressNewDiagnosticContexts) { - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(input); - } - - if (isTypeQueryNode(input)) { - checkEntityNameVisibility(input.exprName, enclosingDeclaration); - } - - if (shouldEnterSuppressNewDiagnosticsContextContext) { - // We stop making new diagnostic contexts within object literal types. Unless it's an object type on the RHS of a type alias declaration. Then we do. - suppressNewDiagnosticContexts = true; - } - - if (isProcessedComponent(input)) { - switch (input.kind) { - case SyntaxKind.ExpressionWithTypeArguments: { - if ((isEntityName(input.expression) || isEntityNameExpression(input.expression))) { - checkEntityNameVisibility(input.expression, enclosingDeclaration); - } - const node = visitEachChild(input, visitDeclarationSubtree, context); - return cleanup(factory.updateExpressionWithTypeArguments(node, node.expression, node.typeArguments)); - } - case SyntaxKind.TypeReference: { - checkEntityNameVisibility(input.typeName, enclosingDeclaration); - const node = visitEachChild(input, visitDeclarationSubtree, context); - return cleanup(factory.updateTypeReferenceNode(node, node.typeName, node.typeArguments)); - } - case SyntaxKind.ConstructSignature: - return cleanup(factory.updateConstructSignature( - input, - ensureTypeParams(input, input.typeParameters), - updateParamsList(input, input.parameters), - ensureType(input, input.type) - )); - case SyntaxKind.Constructor: { - // A constructor declaration may not have a type annotation - const ctor = factory.createConstructorDeclaration( - /*modifiers*/ ensureModifiers(input), - updateParamsList(input, input.parameters, ModifierFlags.None), - /*body*/ undefined - ); - return cleanup(ctor); - } - case SyntaxKind.MethodDeclaration: { - if (isPrivateIdentifier(input.name)) { - return cleanup(/*returnValue*/ undefined); - } - const sig = factory.createMethodDeclaration( - ensureModifiers(input), - /*asteriskToken*/ undefined, - input.name, - input.questionToken, - ensureTypeParams(input, input.typeParameters), - updateParamsList(input, input.parameters), - ensureType(input, input.type), - /*body*/ undefined - ); - return cleanup(sig); - } - case SyntaxKind.GetAccessor: { - if (isPrivateIdentifier(input.name)) { - return cleanup(/*returnValue*/ undefined); - } - const accessorType = - isolatedDeclarations ? - input.type: - getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input)); - return cleanup(factory.updateGetAccessorDeclaration( - input, - ensureModifiers(input), - input.name, - updateAccessorParamsList(input, hasEffectiveModifier(input, ModifierFlags.Private)), - ensureType(input, accessorType), - /*body*/ undefined)); - } - case SyntaxKind.SetAccessor: { - if (isPrivateIdentifier(input.name)) { - return cleanup(/*returnValue*/ undefined); - } - return cleanup(factory.updateSetAccessorDeclaration( - input, - ensureModifiers(input), - input.name, - updateAccessorParamsList(input, hasEffectiveModifier(input, ModifierFlags.Private)), - /*body*/ undefined)); - } - case SyntaxKind.PropertyDeclaration: - if (isPrivateIdentifier(input.name)) { - return cleanup(/*returnValue*/ undefined); - } - return cleanup(factory.updatePropertyDeclaration( - input, - ensureModifiers(input), - input.name, - input.questionToken, - ensureType(input, input.type), - ensureNoInitializer(input) - )); - case SyntaxKind.PropertySignature: - if (isPrivateIdentifier(input.name)) { - return cleanup(/*returnValue*/ undefined); - } - return cleanup(factory.updatePropertySignature( - input, - ensureModifiers(input), - input.name, - input.questionToken, - ensureType(input, input.type) - )); - case SyntaxKind.MethodSignature: { - if (isPrivateIdentifier(input.name)) { - return cleanup(/*returnValue*/ undefined); - } - return cleanup(factory.updateMethodSignature( - input, - ensureModifiers(input), - input.name, - input.questionToken, - ensureTypeParams(input, input.typeParameters), - updateParamsList(input, input.parameters), - ensureType(input, input.type) - )); - } - case SyntaxKind.CallSignature: { - return cleanup(factory.updateCallSignature( - input, - ensureTypeParams(input, input.typeParameters), - updateParamsList(input, input.parameters), - ensureType(input, input.type) - )); - } - case SyntaxKind.IndexSignature: { - return cleanup(factory.updateIndexSignature( - input, - ensureModifiers(input), - updateParamsList(input, input.parameters), - visitNode(input.type, visitDeclarationSubtree, isTypeNode) || factory.createKeywordTypeNode(SyntaxKind.AnyKeyword) - )); - } - case SyntaxKind.VariableDeclaration: { - if (isBindingPattern(input.name)) { - return recreateBindingPattern(input.name); - } - shouldEnterSuppressNewDiagnosticsContextContext = true; - suppressNewDiagnosticContexts = true; // Variable declaration types also suppress new diagnostic contexts, provided the contexts wouldn't be made for binding pattern types - return cleanup(factory.updateVariableDeclaration(input, input.name, /*exclamationToken*/ undefined, ensureType(input, input.type), ensureNoInitializer(input))); - } - case SyntaxKind.TypeParameter: { - if (isPrivateMethodTypeParameter(input) && (input.default || input.constraint)) { - return cleanup(factory.updateTypeParameterDeclaration(input, input.modifiers, input.name, /*constraint*/ undefined, /*defaultType*/ undefined)); - } - return cleanup(visitEachChild(input, visitDeclarationSubtree, context)); - } - case SyntaxKind.ConditionalType: { - // We have to process conditional types in a special way because for visibility purposes we need to push a new enclosingDeclaration - // just for the `infer` types in the true branch. It's an implicit declaration scope that only applies to _part_ of the type. - const checkType = visitNode(input.checkType, visitDeclarationSubtree, isTypeNode); - const extendsType = visitNode(input.extendsType, visitDeclarationSubtree, isTypeNode); - const oldEnclosingDecl = enclosingDeclaration; - enclosingDeclaration = input.trueType; - const trueType = visitNode(input.trueType, visitDeclarationSubtree, isTypeNode); - enclosingDeclaration = oldEnclosingDecl; - const falseType = visitNode(input.falseType, visitDeclarationSubtree, isTypeNode); - Debug.assert(checkType); - Debug.assert(extendsType); - Debug.assert(trueType); - Debug.assert(falseType); - return cleanup(factory.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType)); - } - case SyntaxKind.FunctionType: { - return cleanup(factory.updateFunctionTypeNode(input, visitNodes(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); - } - case SyntaxKind.ConstructorType: { - return cleanup(factory.updateConstructorTypeNode(input, ensureModifiers(input), visitNodes(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), updateParamsList(input, input.parameters), Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)))); - } - case SyntaxKind.ImportType: { - if (!isLiteralImportTypeNode(input)) return cleanup(input); - return cleanup(factory.updateImportTypeNode( - input, - factory.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)), - input.assertions, - input.qualifier, - visitNodes(input.typeArguments, visitDeclarationSubtree, isTypeNode), - input.isTypeOf - )); - } - default: Debug.assertNever(input, `Attempted to process unhandled node kind: ${Debug.formatSyntaxKind((input as Node).kind)}`); - } - } - - if (isTupleTypeNode(input) && (getLineAndCharacterOfPosition(currentSourceFile, input.pos).line === getLineAndCharacterOfPosition(currentSourceFile, input.end).line)) { - setEmitFlags(input, EmitFlags.SingleLine); - } - - return cleanup(visitEachChild(input, visitDeclarationSubtree, context)); - - function cleanup(returnValue: T | undefined): T | undefined { - if (returnValue && canProduceDiagnostic && hasDynamicName(input as Declaration)) { - checkName(input); - } - if (isEnclosingDeclaration(input)) { - enclosingDeclaration = previousEnclosingDeclaration; - } - if (canProduceDiagnostic && !suppressNewDiagnosticContexts) { - getSymbolAccessibilityDiagnostic = oldDiag; - } - if (shouldEnterSuppressNewDiagnosticsContextContext) { - suppressNewDiagnosticContexts = oldWithinObjectLiteralType; - } - if (returnValue === input) { - return returnValue; - } - return returnValue && setOriginalNode(preserveJsDoc(returnValue, input), input); - } - } - - function isPrivateMethodTypeParameter(node: TypeParameterDeclaration) { - return node.parent.kind === SyntaxKind.MethodDeclaration && hasEffectiveModifier(node.parent, ModifierFlags.Private); - } - - function visitDeclarationStatements(input: Node): VisitResult { - if (!isPreservedDeclarationStatement(input)) { - // return undefined for unmatched kinds to omit them from the tree - return; - } - if (shouldStripInternal(input)) return; - - switch (input.kind) { - case SyntaxKind.ExportDeclaration: { - if (isSourceFile(input.parent)) { - resultHasExternalModuleIndicator = true; - } - resultHasScopeMarker = true; - // Always visible if the parent node isn't dropped for being not visible - // Rewrite external module names if necessary - return factory.updateExportDeclaration( - input, - input.modifiers, - input.isTypeOnly, - input.exportClause, - rewriteModuleSpecifier(input, input.moduleSpecifier), - getResolutionModeOverrideForClause(input.assertClause) ? input.assertClause : undefined - ); - } - case SyntaxKind.ExportAssignment: { - // Always visible if the parent node isn't dropped for being not visible - if (isSourceFile(input.parent)) { - resultHasExternalModuleIndicator = true; - } - resultHasScopeMarker = true; - if (input.expression.kind === SyntaxKind.Identifier) { - return input; - } - else { - const newId = factory.createUniqueName("_default", GeneratedIdentifierFlags.Optimistic); - getSymbolAccessibilityDiagnostic = () => ({ - diagnosticMessage: Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0, - errorNode: input - }); - errorFallbackNode = input; - const type = isolatedDeclarations ? - localInferenceResolver?.fromInitializer(input, currentSourceFile) : - 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)); - - preserveJsDoc(statement, input); - removeAllComments(input); - return [statement, factory.updateExportAssignment(input, input.modifiers, newId)]; - } - } - } - - const result = transformTopLevelDeclaration(input); - // Don't actually transform yet; just leave as original node - will be elided/swapped by late pass - lateStatementReplacementMap.set(getOriginalNodeId(input), result); - return input; - } - - function stripExportModifiers(statement: Statement): Statement { - if (isImportEqualsDeclaration(statement) || hasEffectiveModifier(statement, ModifierFlags.Default) || !canHaveModifiers(statement)) { - // `export import` statements should remain as-is, as imports are _not_ implicitly exported in an ambient namespace - // Likewise, `export default` classes and the like and just be `default`, so we preserve their `export` modifiers, too - return statement; - } - - const modifiers = factory.createModifiersFromModifierFlags(getEffectiveModifierFlags(statement) & (ModifierFlags.All ^ ModifierFlags.Export)); - return factory.updateModifiers(statement, modifiers); - } - - function transformTopLevelDeclaration(input: LateVisibilityPaintedStatement) { - if (lateMarkedStatements) { - while (orderedRemoveItem(lateMarkedStatements, input)); - } - if (shouldStripInternal(input)) return; - switch (input.kind) { - case SyntaxKind.ImportEqualsDeclaration: { - return transformImportEqualsDeclaration(input); - } - case SyntaxKind.ImportDeclaration: { - return transformImportDeclaration(input); - } - } - if (isDeclaration(input) && isDeclarationAndNotVisible(input)) return; - - // Elide implementation signatures from overload sets - if (isFunctionLike(input) && resolver.isImplementationOfOverload(input)) return; - - let previousEnclosingDeclaration: typeof enclosingDeclaration; - if (isEnclosingDeclaration(input)) { - previousEnclosingDeclaration = enclosingDeclaration; - enclosingDeclaration = input as Declaration; - } - - const canProdiceDiagnostic = canProduceDiagnostics(input); - const oldDiag = getSymbolAccessibilityDiagnostic; - if (canProdiceDiagnostic) { - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(input as DeclarationDiagnosticProducing); - } - - const previousNeedsDeclare = needsDeclare; - switch (input.kind) { - case SyntaxKind.TypeAliasDeclaration: { - needsDeclare = false; - const clean = cleanup(factory.updateTypeAliasDeclaration( - input, - ensureModifiers(input), - input.name, - visitNodes(input.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration), - Debug.checkDefined(visitNode(input.type, visitDeclarationSubtree, isTypeNode)) - )); - needsDeclare = previousNeedsDeclare; - return clean; - } - case SyntaxKind.InterfaceDeclaration: { - return cleanup(factory.updateInterfaceDeclaration( - input, - ensureModifiers(input), - input.name, - ensureTypeParams(input, input.typeParameters), - transformHeritageClauses(input.heritageClauses), - visitNodes(input.members, visitDeclarationSubtree, isTypeElement) - )); - } - case SyntaxKind.FunctionDeclaration: { - // Generators lose their generator-ness, excepting their return type - const clean = cleanup(factory.updateFunctionDeclaration( - input, - ensureModifiers(input), - /*asteriskToken*/ undefined, - input.name, - ensureTypeParams(input, input.typeParameters), - updateParamsList(input, input.parameters), - ensureType(input, input.type), - /*body*/ undefined - )); - const isExpandoFunctionDeclaration = clean && resolver.isExpandoFunctionDeclaration(input); - if (isExpandoFunctionDeclaration && shouldEmitFunctionProperties(input)) { - if(isExpandoFunctionDeclaration && isolatedDeclarations) { - reportIsolatedDeclarationError(input); - return clean; - } - const props = resolver.getPropertiesOfContainerFunction(input); - // 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); - // fakespace.locals = createSymbolTable(props); - fakespace.symbol = props[0].parent!; - const exportMappings: [Identifier, string][] = []; - let declarations: (VariableStatement | ExportDeclaration)[] = mapDefined(props, p => { - if (!p.valueDeclaration || !(isPropertyAccessExpression(p.valueDeclaration) || isElementAccessExpression(p.valueDeclaration) || isBinaryExpression(p.valueDeclaration))) { - return undefined; - } - const nameStr = unescapeLeadingUnderscores(p.escapedName); - if (!isIdentifierText(nameStr, ScriptTarget.ESNext)) { - return undefined; // unique symbol or non-identifier name - omit, since there's no syntax that can preserve it - } - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration); - let type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags, symbolTracker); - getSymbolAccessibilityDiagnostic = oldDiag; - - if(isolatedDeclarations) { - reportIsolatedDeclarationError(p.valueDeclaration); - type = factory.createTypeReferenceNode("invalid"); - } - - const isNonContextualKeywordName = isStringANonContextualKeyword(nameStr); - const name = isNonContextualKeywordName ? factory.getGeneratedNameForNode(p.valueDeclaration) : factory.createIdentifier(nameStr); - if (isNonContextualKeywordName) { - exportMappings.push([name, nameStr]); - } - const varDecl = factory.createVariableDeclaration(name, /*exclamationToken*/ undefined, type, /*initializer*/ undefined); - return factory.createVariableStatement(isNonContextualKeywordName ? undefined : [factory.createToken(SyntaxKind.ExportKeyword)], factory.createVariableDeclarationList([varDecl])); - }); - if (!exportMappings.length) { - declarations = mapDefined(declarations, declaration => factory.updateModifiers(declaration, ModifierFlags.None)); - } - else { - declarations.push(factory.createExportDeclaration( - /*modifiers*/ undefined, - /*isTypeOnly*/ false, - factory.createNamedExports(map(exportMappings, ([gen, exp]) => { - return factory.createExportSpecifier(/*isTypeOnly*/ false, gen, exp); - })) - )); - } - const namespaceDecl = factory.createModuleDeclaration(ensureModifiers(input), input.name!, factory.createModuleBlock(declarations), NodeFlags.Namespace); - if (!hasEffectiveModifier(clean, ModifierFlags.Default)) { - return [clean, namespaceDecl]; - } - - const modifiers = factory.createModifiersFromModifierFlags((getEffectiveModifierFlags(clean) & ~ModifierFlags.ExportDefault) | ModifierFlags.Ambient); - const cleanDeclaration = factory.updateFunctionDeclaration( - clean, - modifiers, - /*asteriskToken*/ undefined, - clean.name, - clean.typeParameters, - clean.parameters, - clean.type, - /*body*/ undefined - ); - - const namespaceDeclaration = factory.updateModuleDeclaration( - namespaceDecl, - modifiers, - namespaceDecl.name, - namespaceDecl.body - ); - - const exportDefaultDeclaration = factory.createExportAssignment( - /*modifiers*/ undefined, - /*isExportEquals*/ false, - namespaceDecl.name - ); - - if (isSourceFile(input.parent)) { - resultHasExternalModuleIndicator = true; - } - resultHasScopeMarker = true; - - return [cleanDeclaration, namespaceDeclaration, exportDefaultDeclaration]; - } - else { - return clean; - } - } - case SyntaxKind.ModuleDeclaration: { - needsDeclare = false; - const inner = input.body; - if (inner && inner.kind === SyntaxKind.ModuleBlock) { - const oldNeedsScopeFix = needsScopeFixMarker; - const oldHasScopeFix = resultHasScopeMarker; - resultHasScopeMarker = false; - needsScopeFixMarker = false; - const statements = visitNodes(inner.statements, visitDeclarationStatements, isStatement); - let lateStatements = transformAndReplaceLatePaintedStatements(statements); - // TODO: isolatedDeclarations: See why Ambient si needed here - if (input.flags & (NodeFlags as any).Ambient) { - needsScopeFixMarker = false; // If it was `declare`'d everything is implicitly exported already, ignore late printed "privates" - } - // With the final list of statements, there are 3 possibilities: - // 1. There's an export assignment or export declaration in the namespace - do nothing - // 2. Everything is exported and there are no export assignments or export declarations - strip all export modifiers - // 3. Some things are exported, some are not, and there's no marker - add an empty marker - if (!isGlobalScopeAugmentation(input) && !hasScopeMarker(lateStatements) && !resultHasScopeMarker) { - if (needsScopeFixMarker) { - lateStatements = factory.createNodeArray([...lateStatements, createEmptyExports(factory)]); - } - else { - lateStatements = visitNodes(lateStatements, stripExportModifiers, isStatement); - } - } - const body = factory.updateModuleBlock(inner, lateStatements); - needsDeclare = previousNeedsDeclare; - needsScopeFixMarker = oldNeedsScopeFix; - resultHasScopeMarker = oldHasScopeFix; - const mods = ensureModifiers(input); - return cleanup(factory.updateModuleDeclaration( - input, - mods, - isExternalModuleAugmentation(input) ? rewriteModuleSpecifier(input, input.name) : input.name, - body - )); - } - else { - needsDeclare = previousNeedsDeclare; - const mods = ensureModifiers(input); - needsDeclare = false; - visitNode(inner, visitDeclarationStatements); - // eagerly transform nested namespaces (the nesting doesn't need any elision or painting done) - const id = getOriginalNodeId(inner!); // TODO: GH#18217 - const body = lateStatementReplacementMap.get(id); - lateStatementReplacementMap.delete(id); - return cleanup(factory.updateModuleDeclaration( - input, - mods, - input.name, - body as ModuleBody - )); - } - } - case SyntaxKind.ClassDeclaration: { - errorNameNode = input.name; - errorFallbackNode = input; - const modifiers = factory.createNodeArray(ensureModifiers(input)); - const typeParameters = ensureTypeParams(input, input.typeParameters); - const ctor = getFirstConstructorWithBody(input); - let parameterProperties: readonly PropertyDeclaration[] | undefined; - if (ctor) { - const oldDiag = getSymbolAccessibilityDiagnostic; - parameterProperties = compact(flatMap(ctor.parameters, (param) => { - if (!hasSyntacticModifier(param, ModifierFlags.ParameterPropertyModifier) || shouldStripInternal(param)) return; - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(param); - if (param.name.kind === SyntaxKind.Identifier) { - return preserveJsDoc(factory.createPropertyDeclaration( - ensureModifiers(param), - param.name, - param.questionToken, - ensureType(param, param.type), - ensureNoInitializer(param)), param); - } - else { - // Pattern - this is currently an error, but we emit declarations for it somewhat correctly - return walkBindingPattern(param.name); - } - - function walkBindingPattern(pattern: BindingPattern) { - let elems: PropertyDeclaration[] | undefined; - for (const elem of pattern.elements) { - if (isOmittedExpression(elem)) continue; - if (isBindingPattern(elem.name)) { - elems = concatenate(elems, walkBindingPattern(elem.name)); - } - elems = elems || []; - elems.push(factory.createPropertyDeclaration( - ensureModifiers(param), - elem.name as Identifier, - /*questionOrExclamationToken*/ undefined, - ensureType(elem, /*type*/ undefined), - /*initializer*/ undefined - )); - } - return elems; - } - })); - getSymbolAccessibilityDiagnostic = oldDiag; - } - - const hasPrivateIdentifier = some(input.members, member => !!member.name && isPrivateIdentifier(member.name)); - // When the class has at least one private identifier, create a unique constant identifier to retain the nominal typing behavior - // Prevents other classes with the same public members from being used in place of the current class - const privateIdentifier = hasPrivateIdentifier ? [ - factory.createPropertyDeclaration( - /*modifiers*/ undefined, - factory.createPrivateIdentifier("#private"), - /*questionOrExclamationToken*/ undefined, - /*type*/ undefined, - /*initializer*/ undefined - ) - ] : undefined; - const memberNodes = concatenate(concatenate(privateIdentifier, parameterProperties), visitNodes(input.members, visitDeclarationSubtree, isClassElement)); - const members = factory.createNodeArray(memberNodes); - - const extendsClause = getEffectiveBaseTypeNode(input); - 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) { - reportIsolatedDeclarationError(extendsClause); - 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 = () => ({ - diagnosticMessage: Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1, - errorNode: extendsClause, - typeName: input.name - }); - const varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, resolver.createTypeOfExpression(extendsClause.expression, input, declarationEmitNodeBuilderFlags, symbolTracker), /*initializer*/ undefined); - const statement = factory.createVariableStatement(needsDeclare ? [factory.createModifier(SyntaxKind.DeclareKeyword)] : [], factory.createVariableDeclarationList([varDecl], NodeFlags.Const)); - const heritageClauses = factory.createNodeArray(map(input.heritageClauses, clause => { - if (clause.token === SyntaxKind.ExtendsKeyword) { - const oldDiag = getSymbolAccessibilityDiagnostic; - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]); - const newClause = factory.updateHeritageClause(clause, map(clause.types, t => factory.updateExpressionWithTypeArguments(t, newId, visitNodes(t.typeArguments, visitDeclarationSubtree, isTypeNode)))); - getSymbolAccessibilityDiagnostic = oldDiag; - return newClause; - } - return factory.updateHeritageClause(clause, visitNodes(factory.createNodeArray(filter(clause.types, t => isEntityNameExpression(t.expression) || t.expression.kind === SyntaxKind.NullKeyword)), visitDeclarationSubtree, isExpressionWithTypeArguments)); - })); - return [statement, cleanup(factory.updateClassDeclaration( - input, - modifiers, - input.name, - typeParameters, - heritageClauses, - members - ))!]; // TODO: GH#18217 - } - else { - const heritageClauses = transformHeritageClauses(input.heritageClauses); - return cleanup(factory.updateClassDeclaration( - input, - modifiers, - input.name, - typeParameters, - heritageClauses, - members - )); - } - } - case SyntaxKind.VariableStatement: { - return cleanup(transformVariableStatement(input)); - } - case SyntaxKind.EnumDeclaration: { - return cleanup(factory.updateEnumDeclaration(input, factory.createNodeArray(ensureModifiers(input)), input.name, factory.createNodeArray(mapDefined(input.members, m => { - if (shouldStripInternal(m)) return; - if (isolatedDeclarations) { - if (m.initializer && !isLiteralExpression(m.initializer)) { - reportIsolatedDeclarationError(m); - } - return m; - } - // Rewrite enum values to their constants, if available - const constValue = isolatedDeclarations? undefined : resolver.getConstantValue(m); - return preserveJsDoc(factory.updateEnumMember(m, m.name, constValue !== undefined ? typeof constValue === "string" ? factory.createStringLiteral(constValue) : factory.createNumericLiteral(constValue) : undefined), m); - })))); - } - } - // Anything left unhandled is an error, so this should be unreachable - return Debug.assertNever(input, `Unhandled top-level node in declaration emit: ${Debug.formatSyntaxKind((input as Node).kind)}`); - - function cleanup(node: T | undefined): T | undefined { - if (isEnclosingDeclaration(input)) { - enclosingDeclaration = previousEnclosingDeclaration; - } - if (canProdiceDiagnostic) { - getSymbolAccessibilityDiagnostic = oldDiag; - } - if (input.kind === SyntaxKind.ModuleDeclaration) { - needsDeclare = previousNeedsDeclare; - } - if (node as Node === input) { - return node; - } - errorFallbackNode = undefined; - errorNameNode = undefined; - return node && setOriginalNode(preserveJsDoc(node, input), input); - } - } - - function transformVariableStatement(input: VariableStatement) { - if (!forEach(input.declarationList.declarations, getBindingNameVisible)) return; - const nodes = visitNodes(input.declarationList.declarations, visitDeclarationSubtree, isVariableDeclaration); - if (!length(nodes)) return; - return factory.updateVariableStatement(input, factory.createNodeArray(ensureModifiers(input)), factory.updateVariableDeclarationList(input.declarationList, nodes)); - } - - function recreateBindingPattern(d: BindingPattern): VariableDeclaration[] { - return flatten(mapDefined(d.elements, e => recreateBindingElement(e))); - } - - function recreateBindingElement(e: ArrayBindingElement) { - if (e.kind === SyntaxKind.OmittedExpression) { - return; - } - if (e.name) { - if (!getBindingNameVisible(e)) return; - if (isBindingPattern(e.name)) { - return recreateBindingPattern(e.name); - } - else { - return factory.createVariableDeclaration(e.name, /*exclamationToken*/ undefined, ensureType(e, /*type*/ undefined), /*initializer*/ undefined); - } - } - } - - function checkName(node: DeclarationDiagnosticProducing) { - let oldDiag: typeof getSymbolAccessibilityDiagnostic | undefined; - if (!suppressNewDiagnosticContexts) { - oldDiag = getSymbolAccessibilityDiagnostic; - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNodeName(node); - } - errorNameNode = (node as NamedDeclaration).name; - 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) { - getSymbolAccessibilityDiagnostic = oldDiag!; - } - errorNameNode = undefined; - } - - function shouldStripInternal(node: Node) { - return !!stripInternal && !!node && isInternalDeclaration(node, currentSourceFile); - } - - function isScopeMarker(node: Node) { - return isExportAssignment(node) || isExportDeclaration(node); - } - - function hasScopeMarker(statements: readonly Statement[]) { - return some(statements, isScopeMarker); - } - - function ensureModifiers(node: T): readonly Modifier[] | undefined { - const currentFlags = getEffectiveModifierFlags(node); - const newFlags = ensureModifierFlags(node); - if (currentFlags === newFlags) { - return visitArray(node.modifiers, n => tryCast(n, isModifier), isModifier); - } - return factory.createModifiersFromModifierFlags(newFlags); - } - - function ensureModifierFlags(node: Node): ModifierFlags { - let mask = ModifierFlags.All ^ (ModifierFlags.Public | ModifierFlags.Async | ModifierFlags.Override); // No async and override modifiers in declaration files - let additions = (needsDeclare && !isAlwaysType(node)) ? ModifierFlags.Ambient : ModifierFlags.None; - const parentIsFile = node.parent.kind === SyntaxKind.SourceFile; - if (!parentIsFile || (isBundledEmit && parentIsFile && isExternalModule(node.parent as SourceFile))) { - mask ^= ModifierFlags.Ambient; - additions = ModifierFlags.None; - } - return maskModifierFlags(node, mask, additions); - } - - function getTypeAnnotationFromAllAccessorDeclarations(node: AccessorDeclaration, accessors: AllAccessorDeclarations) { - let accessorType = getTypeAnnotationFromAccessor(node); - if (!accessorType && node !== accessors.firstAccessor) { - accessorType = getTypeAnnotationFromAccessor(accessors.firstAccessor); - // If we end up pulling the type from the second accessor, we also need to change the diagnostic context to get the expected error message - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(accessors.firstAccessor); - } - if (!accessorType && accessors.secondAccessor && node !== accessors.secondAccessor) { - accessorType = getTypeAnnotationFromAccessor(accessors.secondAccessor); - // If we end up pulling the type from the second accessor, we also need to change the diagnostic context to get the expected error message - getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(accessors.secondAccessor); - } - return accessorType; - } - - function transformHeritageClauses(nodes: NodeArray | undefined) { - return factory.createNodeArray(filter(map(nodes, clause => factory.updateHeritageClause(clause, visitNodes(factory.createNodeArray(filter(clause.types, t => { - return isEntityNameExpression(t.expression) || (clause.token === SyntaxKind.ExtendsKeyword && t.expression.kind === SyntaxKind.NullKeyword); - })), visitDeclarationSubtree, isExpressionWithTypeArguments))), clause => clause.types && !!clause.types.length)); - } -} - -function isAlwaysType(node: Node) { - if (node.kind === SyntaxKind.InterfaceDeclaration) { - return true; - } - return false; -} - -// Elide "public" modifier, as it is the default -function maskModifiers(factory: NodeFactory, node: Node, modifierMask?: ModifierFlags, modifierAdditions?: ModifierFlags): Modifier[] | undefined { - return factory.createModifiersFromModifierFlags(maskModifierFlags(node, modifierMask, modifierAdditions)); -} - -function maskModifierFlags(node: Node, modifierMask: ModifierFlags = ModifierFlags.All ^ ModifierFlags.Public, modifierAdditions: ModifierFlags = ModifierFlags.None): ModifierFlags { - let flags = (getEffectiveModifierFlags(node) & modifierMask) | modifierAdditions; - if (flags & ModifierFlags.Default && !(flags & ModifierFlags.Export)) { - // A non-exported default is a nonsequitor - we usually try to remove all export modifiers - // from statements in ambient declarations; but a default export must retain its export modifier to be syntactically valid - flags ^= ModifierFlags.Export; - } - if (flags & ModifierFlags.Default && flags & ModifierFlags.Ambient) { - flags ^= ModifierFlags.Ambient; // `declare` is never required alongside `default` (and would be an error if printed) - } - return flags; -} - -function getTypeAnnotationFromAccessor(accessor: AccessorDeclaration): TypeNode | undefined { - if (accessor) { - return accessor.kind === SyntaxKind.GetAccessor - ? accessor.type // Getter - return type - : accessor.parameters.length > 0 - ? accessor.parameters[0].type // Setter parameter type - : undefined; - } -} - -type CanHaveLiteralInitializer = VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration; -function canHaveLiteralInitializer(node: Node): boolean { - switch (node.kind) { - case SyntaxKind.PropertyDeclaration: - case SyntaxKind.PropertySignature: - return !hasEffectiveModifier(node, ModifierFlags.Private); - case SyntaxKind.Parameter: - case SyntaxKind.VariableDeclaration: - return true; - } - return false; -} - -type ProcessedDeclarationStatement = - | FunctionDeclaration - | ModuleDeclaration - | ImportEqualsDeclaration - | InterfaceDeclaration - | ClassDeclaration - | TypeAliasDeclaration - | EnumDeclaration - | VariableStatement - | ImportDeclaration - | ExportDeclaration - | ExportAssignment; - -function isPreservedDeclarationStatement(node: Node): node is ProcessedDeclarationStatement { - switch (node.kind) { - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.ImportEqualsDeclaration: - case SyntaxKind.InterfaceDeclaration: - case SyntaxKind.ClassDeclaration: - case SyntaxKind.TypeAliasDeclaration: - case SyntaxKind.EnumDeclaration: - case SyntaxKind.VariableStatement: - case SyntaxKind.ImportDeclaration: - case SyntaxKind.ExportDeclaration: - case SyntaxKind.ExportAssignment: - return true; - } - return false; -} - -type ProcessedComponent = - | ConstructSignatureDeclaration - | ConstructorDeclaration - | MethodDeclaration - | GetAccessorDeclaration - | SetAccessorDeclaration - | PropertyDeclaration - | PropertySignature - | MethodSignature - | CallSignatureDeclaration - | IndexSignatureDeclaration - | VariableDeclaration - | TypeParameterDeclaration - | ExpressionWithTypeArguments - | TypeReferenceNode - | ConditionalTypeNode - | FunctionTypeNode - | ConstructorTypeNode - | ImportTypeNode; - -function isProcessedComponent(node: Node): node is ProcessedComponent { - switch (node.kind) { - case SyntaxKind.ConstructSignature: - case SyntaxKind.Constructor: - case SyntaxKind.MethodDeclaration: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.PropertyDeclaration: - case SyntaxKind.PropertySignature: - case SyntaxKind.MethodSignature: - case SyntaxKind.CallSignature: - case SyntaxKind.IndexSignature: - case SyntaxKind.VariableDeclaration: - case SyntaxKind.TypeParameter: - case SyntaxKind.ExpressionWithTypeArguments: - case SyntaxKind.TypeReference: - case SyntaxKind.ConditionalType: - case SyntaxKind.FunctionType: - case SyntaxKind.ConstructorType: - case SyntaxKind.ImportType: - return true; - } - return false; -} diff --git a/external-declarations/src/compiler/diagnosticInformationMap.generated.ts b/external-declarations/src/compiler/diagnosticInformationMap.generated.ts deleted file mode 100644 index e4d7ed614ed3f..0000000000000 --- a/external-declarations/src/compiler/diagnosticInformationMap.generated.ts +++ /dev/null @@ -1,1893 +0,0 @@ -// -// generated from 'src/compiler/diagnosticMessages.json' - -import { DiagnosticCategory, DiagnosticMessage } from "typescript"; - - -function diag(code: number, category: DiagnosticCategory, key: string, message: string, reportsUnnecessary?: {}, elidedInCompatabilityPyramid?: boolean, reportsDeprecated?: {}): DiagnosticMessage { - return { code, category, key, message, reportsUnnecessary, reportsDeprecated }; -} - -/** @internal */ -export const Diagnostics = { - Unterminated_string_literal: diag(1002, DiagnosticCategory.Error, "Unterminated_string_literal_1002", "Unterminated string literal."), - Identifier_expected: diag(1003, DiagnosticCategory.Error, "Identifier_expected_1003", "Identifier expected."), - _0_expected: diag(1005, DiagnosticCategory.Error, "_0_expected_1005", "'{0}' expected."), - A_file_cannot_have_a_reference_to_itself: diag(1006, DiagnosticCategory.Error, "A_file_cannot_have_a_reference_to_itself_1006", "A file cannot have a reference to itself."), - The_parser_expected_to_find_a_1_to_match_the_0_token_here: diag(1007, DiagnosticCategory.Error, "The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007", "The parser expected to find a '{1}' to match the '{0}' token here."), - Trailing_comma_not_allowed: diag(1009, DiagnosticCategory.Error, "Trailing_comma_not_allowed_1009", "Trailing comma not allowed."), - Asterisk_Slash_expected: diag(1010, DiagnosticCategory.Error, "Asterisk_Slash_expected_1010", "'*/' expected."), - An_element_access_expression_should_take_an_argument: diag(1011, DiagnosticCategory.Error, "An_element_access_expression_should_take_an_argument_1011", "An element access expression should take an argument."), - Unexpected_token: diag(1012, DiagnosticCategory.Error, "Unexpected_token_1012", "Unexpected token."), - A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma: diag(1013, DiagnosticCategory.Error, "A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013", "A rest parameter or binding pattern may not have a trailing comma."), - A_rest_parameter_must_be_last_in_a_parameter_list: diag(1014, DiagnosticCategory.Error, "A_rest_parameter_must_be_last_in_a_parameter_list_1014", "A rest parameter must be last in a parameter list."), - Parameter_cannot_have_question_mark_and_initializer: diag(1015, DiagnosticCategory.Error, "Parameter_cannot_have_question_mark_and_initializer_1015", "Parameter cannot have question mark and initializer."), - A_required_parameter_cannot_follow_an_optional_parameter: diag(1016, DiagnosticCategory.Error, "A_required_parameter_cannot_follow_an_optional_parameter_1016", "A required parameter cannot follow an optional parameter."), - An_index_signature_cannot_have_a_rest_parameter: diag(1017, DiagnosticCategory.Error, "An_index_signature_cannot_have_a_rest_parameter_1017", "An index signature cannot have a rest parameter."), - An_index_signature_parameter_cannot_have_an_accessibility_modifier: diag(1018, DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018", "An index signature parameter cannot have an accessibility modifier."), - An_index_signature_parameter_cannot_have_a_question_mark: diag(1019, DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_a_question_mark_1019", "An index signature parameter cannot have a question mark."), - An_index_signature_parameter_cannot_have_an_initializer: diag(1020, DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_an_initializer_1020", "An index signature parameter cannot have an initializer."), - An_index_signature_must_have_a_type_annotation: diag(1021, DiagnosticCategory.Error, "An_index_signature_must_have_a_type_annotation_1021", "An index signature must have a type annotation."), - An_index_signature_parameter_must_have_a_type_annotation: diag(1022, DiagnosticCategory.Error, "An_index_signature_parameter_must_have_a_type_annotation_1022", "An index signature parameter must have a type annotation."), - readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature: diag(1024, DiagnosticCategory.Error, "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", "'readonly' modifier can only appear on a property declaration or index signature."), - An_index_signature_cannot_have_a_trailing_comma: diag(1025, DiagnosticCategory.Error, "An_index_signature_cannot_have_a_trailing_comma_1025", "An index signature cannot have a trailing comma."), - Accessibility_modifier_already_seen: diag(1028, DiagnosticCategory.Error, "Accessibility_modifier_already_seen_1028", "Accessibility modifier already seen."), - _0_modifier_must_precede_1_modifier: diag(1029, DiagnosticCategory.Error, "_0_modifier_must_precede_1_modifier_1029", "'{0}' modifier must precede '{1}' modifier."), - _0_modifier_already_seen: diag(1030, DiagnosticCategory.Error, "_0_modifier_already_seen_1030", "'{0}' modifier already seen."), - _0_modifier_cannot_appear_on_class_elements_of_this_kind: diag(1031, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031", "'{0}' modifier cannot appear on class elements of this kind."), - super_must_be_followed_by_an_argument_list_or_member_access: diag(1034, DiagnosticCategory.Error, "super_must_be_followed_by_an_argument_list_or_member_access_1034", "'super' must be followed by an argument list or member access."), - Only_ambient_modules_can_use_quoted_names: diag(1035, DiagnosticCategory.Error, "Only_ambient_modules_can_use_quoted_names_1035", "Only ambient modules can use quoted names."), - Statements_are_not_allowed_in_ambient_contexts: diag(1036, DiagnosticCategory.Error, "Statements_are_not_allowed_in_ambient_contexts_1036", "Statements are not allowed in ambient contexts."), - A_declare_modifier_cannot_be_used_in_an_already_ambient_context: diag(1038, DiagnosticCategory.Error, "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038", "A 'declare' modifier cannot be used in an already ambient context."), - Initializers_are_not_allowed_in_ambient_contexts: diag(1039, DiagnosticCategory.Error, "Initializers_are_not_allowed_in_ambient_contexts_1039", "Initializers are not allowed in ambient contexts."), - _0_modifier_cannot_be_used_in_an_ambient_context: diag(1040, DiagnosticCategory.Error, "_0_modifier_cannot_be_used_in_an_ambient_context_1040", "'{0}' modifier cannot be used in an ambient context."), - _0_modifier_cannot_be_used_here: diag(1042, DiagnosticCategory.Error, "_0_modifier_cannot_be_used_here_1042", "'{0}' modifier cannot be used here."), - _0_modifier_cannot_appear_on_a_module_or_namespace_element: diag(1044, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044", "'{0}' modifier cannot appear on a module or namespace element."), - Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier: diag(1046, DiagnosticCategory.Error, "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046", "Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."), - A_rest_parameter_cannot_be_optional: diag(1047, DiagnosticCategory.Error, "A_rest_parameter_cannot_be_optional_1047", "A rest parameter cannot be optional."), - A_rest_parameter_cannot_have_an_initializer: diag(1048, DiagnosticCategory.Error, "A_rest_parameter_cannot_have_an_initializer_1048", "A rest parameter cannot have an initializer."), - A_set_accessor_must_have_exactly_one_parameter: diag(1049, DiagnosticCategory.Error, "A_set_accessor_must_have_exactly_one_parameter_1049", "A 'set' accessor must have exactly one parameter."), - A_set_accessor_cannot_have_an_optional_parameter: diag(1051, DiagnosticCategory.Error, "A_set_accessor_cannot_have_an_optional_parameter_1051", "A 'set' accessor cannot have an optional parameter."), - A_set_accessor_parameter_cannot_have_an_initializer: diag(1052, DiagnosticCategory.Error, "A_set_accessor_parameter_cannot_have_an_initializer_1052", "A 'set' accessor parameter cannot have an initializer."), - A_set_accessor_cannot_have_rest_parameter: diag(1053, DiagnosticCategory.Error, "A_set_accessor_cannot_have_rest_parameter_1053", "A 'set' accessor cannot have rest parameter."), - A_get_accessor_cannot_have_parameters: diag(1054, DiagnosticCategory.Error, "A_get_accessor_cannot_have_parameters_1054", "A 'get' accessor cannot have parameters."), - Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value: diag(1055, DiagnosticCategory.Error, "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055", "Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value."), - Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: diag(1056, DiagnosticCategory.Error, "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056", "Accessors are only available when targeting ECMAScript 5 and higher."), - The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1058, DiagnosticCategory.Error, "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058", "The return type of an async function must either be a valid promise or must not contain a callable 'then' member."), - A_promise_must_have_a_then_method: diag(1059, DiagnosticCategory.Error, "A_promise_must_have_a_then_method_1059", "A promise must have a 'then' method."), - The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback: diag(1060, DiagnosticCategory.Error, "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060", "The first parameter of the 'then' method of a promise must be a callback."), - Enum_member_must_have_initializer: diag(1061, DiagnosticCategory.Error, "Enum_member_must_have_initializer_1061", "Enum member must have initializer."), - Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: diag(1062, DiagnosticCategory.Error, "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."), - An_export_assignment_cannot_be_used_in_a_namespace: diag(1063, DiagnosticCategory.Error, "An_export_assignment_cannot_be_used_in_a_namespace_1063", "An export assignment cannot be used in a namespace."), - The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0: diag(1064, DiagnosticCategory.Error, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064", "The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"), - In_ambient_enum_declarations_member_initializer_must_be_constant_expression: diag(1066, DiagnosticCategory.Error, "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", "In ambient enum declarations member initializer must be constant expression."), - Unexpected_token_A_constructor_method_accessor_or_property_was_expected: diag(1068, DiagnosticCategory.Error, "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068", "Unexpected token. A constructor, method, accessor, or property was expected."), - Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces: diag(1069, DiagnosticCategory.Error, "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069", "Unexpected token. A type parameter name was expected without curly braces."), - _0_modifier_cannot_appear_on_a_type_member: diag(1070, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_type_member_1070", "'{0}' modifier cannot appear on a type member."), - _0_modifier_cannot_appear_on_an_index_signature: diag(1071, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_an_index_signature_1071", "'{0}' modifier cannot appear on an index signature."), - A_0_modifier_cannot_be_used_with_an_import_declaration: diag(1079, DiagnosticCategory.Error, "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", "A '{0}' modifier cannot be used with an import declaration."), - Invalid_reference_directive_syntax: diag(1084, DiagnosticCategory.Error, "Invalid_reference_directive_syntax_1084", "Invalid 'reference' directive syntax."), - Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0: diag(1085, DiagnosticCategory.Error, "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085", "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'."), - _0_modifier_cannot_appear_on_a_constructor_declaration: diag(1089, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_constructor_declaration_1089", "'{0}' modifier cannot appear on a constructor declaration."), - _0_modifier_cannot_appear_on_a_parameter: diag(1090, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_parameter_1090", "'{0}' modifier cannot appear on a parameter."), - Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: diag(1091, DiagnosticCategory.Error, "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091", "Only a single variable declaration is allowed in a 'for...in' statement."), - Type_parameters_cannot_appear_on_a_constructor_declaration: diag(1092, DiagnosticCategory.Error, "Type_parameters_cannot_appear_on_a_constructor_declaration_1092", "Type parameters cannot appear on a constructor declaration."), - Type_annotation_cannot_appear_on_a_constructor_declaration: diag(1093, DiagnosticCategory.Error, "Type_annotation_cannot_appear_on_a_constructor_declaration_1093", "Type annotation cannot appear on a constructor declaration."), - An_accessor_cannot_have_type_parameters: diag(1094, DiagnosticCategory.Error, "An_accessor_cannot_have_type_parameters_1094", "An accessor cannot have type parameters."), - A_set_accessor_cannot_have_a_return_type_annotation: diag(1095, DiagnosticCategory.Error, "A_set_accessor_cannot_have_a_return_type_annotation_1095", "A 'set' accessor cannot have a return type annotation."), - An_index_signature_must_have_exactly_one_parameter: diag(1096, DiagnosticCategory.Error, "An_index_signature_must_have_exactly_one_parameter_1096", "An index signature must have exactly one parameter."), - _0_list_cannot_be_empty: diag(1097, DiagnosticCategory.Error, "_0_list_cannot_be_empty_1097", "'{0}' list cannot be empty."), - Type_parameter_list_cannot_be_empty: diag(1098, DiagnosticCategory.Error, "Type_parameter_list_cannot_be_empty_1098", "Type parameter list cannot be empty."), - Type_argument_list_cannot_be_empty: diag(1099, DiagnosticCategory.Error, "Type_argument_list_cannot_be_empty_1099", "Type argument list cannot be empty."), - Invalid_use_of_0_in_strict_mode: diag(1100, DiagnosticCategory.Error, "Invalid_use_of_0_in_strict_mode_1100", "Invalid use of '{0}' in strict mode."), - with_statements_are_not_allowed_in_strict_mode: diag(1101, DiagnosticCategory.Error, "with_statements_are_not_allowed_in_strict_mode_1101", "'with' statements are not allowed in strict mode."), - delete_cannot_be_called_on_an_identifier_in_strict_mode: diag(1102, DiagnosticCategory.Error, "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102", "'delete' cannot be called on an identifier in strict mode."), - for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1103, DiagnosticCategory.Error, "for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103", "'for await' loops are only allowed within async functions and at the top levels of modules."), - A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: diag(1104, DiagnosticCategory.Error, "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104", "A 'continue' statement can only be used within an enclosing iteration statement."), - A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: diag(1105, DiagnosticCategory.Error, "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105", "A 'break' statement can only be used within an enclosing iteration or switch statement."), - The_left_hand_side_of_a_for_of_statement_may_not_be_async: diag(1106, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106", "The left-hand side of a 'for...of' statement may not be 'async'."), - Jump_target_cannot_cross_function_boundary: diag(1107, DiagnosticCategory.Error, "Jump_target_cannot_cross_function_boundary_1107", "Jump target cannot cross function boundary."), - A_return_statement_can_only_be_used_within_a_function_body: diag(1108, DiagnosticCategory.Error, "A_return_statement_can_only_be_used_within_a_function_body_1108", "A 'return' statement can only be used within a function body."), - Expression_expected: diag(1109, DiagnosticCategory.Error, "Expression_expected_1109", "Expression expected."), - Type_expected: diag(1110, DiagnosticCategory.Error, "Type_expected_1110", "Type expected."), - A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: diag(1113, DiagnosticCategory.Error, "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", "A 'default' clause cannot appear more than once in a 'switch' statement."), - Duplicate_label_0: diag(1114, DiagnosticCategory.Error, "Duplicate_label_0_1114", "Duplicate label '{0}'."), - A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: diag(1115, DiagnosticCategory.Error, "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", "A 'continue' statement can only jump to a label of an enclosing iteration statement."), - A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: diag(1116, DiagnosticCategory.Error, "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116", "A 'break' statement can only jump to a label of an enclosing statement."), - An_object_literal_cannot_have_multiple_properties_with_the_same_name: diag(1117, DiagnosticCategory.Error, "An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117", "An object literal cannot have multiple properties with the same name."), - An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: diag(1118, DiagnosticCategory.Error, "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118", "An object literal cannot have multiple get/set accessors with the same name."), - An_object_literal_cannot_have_property_and_accessor_with_the_same_name: diag(1119, DiagnosticCategory.Error, "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119", "An object literal cannot have property and accessor with the same name."), - An_export_assignment_cannot_have_modifiers: diag(1120, DiagnosticCategory.Error, "An_export_assignment_cannot_have_modifiers_1120", "An export assignment cannot have modifiers."), - Octal_literals_are_not_allowed_in_strict_mode: diag(1121, DiagnosticCategory.Error, "Octal_literals_are_not_allowed_in_strict_mode_1121", "Octal literals are not allowed in strict mode."), - Variable_declaration_list_cannot_be_empty: diag(1123, DiagnosticCategory.Error, "Variable_declaration_list_cannot_be_empty_1123", "Variable declaration list cannot be empty."), - Digit_expected: diag(1124, DiagnosticCategory.Error, "Digit_expected_1124", "Digit expected."), - Hexadecimal_digit_expected: diag(1125, DiagnosticCategory.Error, "Hexadecimal_digit_expected_1125", "Hexadecimal digit expected."), - Unexpected_end_of_text: diag(1126, DiagnosticCategory.Error, "Unexpected_end_of_text_1126", "Unexpected end of text."), - Invalid_character: diag(1127, DiagnosticCategory.Error, "Invalid_character_1127", "Invalid character."), - Declaration_or_statement_expected: diag(1128, DiagnosticCategory.Error, "Declaration_or_statement_expected_1128", "Declaration or statement expected."), - Statement_expected: diag(1129, DiagnosticCategory.Error, "Statement_expected_1129", "Statement expected."), - case_or_default_expected: diag(1130, DiagnosticCategory.Error, "case_or_default_expected_1130", "'case' or 'default' expected."), - Property_or_signature_expected: diag(1131, DiagnosticCategory.Error, "Property_or_signature_expected_1131", "Property or signature expected."), - Enum_member_expected: diag(1132, DiagnosticCategory.Error, "Enum_member_expected_1132", "Enum member expected."), - Variable_declaration_expected: diag(1134, DiagnosticCategory.Error, "Variable_declaration_expected_1134", "Variable declaration expected."), - Argument_expression_expected: diag(1135, DiagnosticCategory.Error, "Argument_expression_expected_1135", "Argument expression expected."), - Property_assignment_expected: diag(1136, DiagnosticCategory.Error, "Property_assignment_expected_1136", "Property assignment expected."), - Expression_or_comma_expected: diag(1137, DiagnosticCategory.Error, "Expression_or_comma_expected_1137", "Expression or comma expected."), - Parameter_declaration_expected: diag(1138, DiagnosticCategory.Error, "Parameter_declaration_expected_1138", "Parameter declaration expected."), - Type_parameter_declaration_expected: diag(1139, DiagnosticCategory.Error, "Type_parameter_declaration_expected_1139", "Type parameter declaration expected."), - Type_argument_expected: diag(1140, DiagnosticCategory.Error, "Type_argument_expected_1140", "Type argument expected."), - String_literal_expected: diag(1141, DiagnosticCategory.Error, "String_literal_expected_1141", "String literal expected."), - Line_break_not_permitted_here: diag(1142, DiagnosticCategory.Error, "Line_break_not_permitted_here_1142", "Line break not permitted here."), - or_expected: diag(1144, DiagnosticCategory.Error, "or_expected_1144", "'{' or ';' expected."), - or_JSX_element_expected: diag(1145, DiagnosticCategory.Error, "or_JSX_element_expected_1145", "'{' or JSX element expected."), - Declaration_expected: diag(1146, DiagnosticCategory.Error, "Declaration_expected_1146", "Declaration expected."), - Import_declarations_in_a_namespace_cannot_reference_a_module: diag(1147, DiagnosticCategory.Error, "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", "Import declarations in a namespace cannot reference a module."), - Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: diag(1148, DiagnosticCategory.Error, "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", "Cannot use imports, exports, or module augmentations when '--module' is 'none'."), - File_name_0_differs_from_already_included_file_name_1_only_in_casing: diag(1149, DiagnosticCategory.Error, "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", "File name '{0}' differs from already included file name '{1}' only in casing."), - const_declarations_must_be_initialized: diag(1155, DiagnosticCategory.Error, "const_declarations_must_be_initialized_1155", "'const' declarations must be initialized."), - const_declarations_can_only_be_declared_inside_a_block: diag(1156, DiagnosticCategory.Error, "const_declarations_can_only_be_declared_inside_a_block_1156", "'const' declarations can only be declared inside a block."), - let_declarations_can_only_be_declared_inside_a_block: diag(1157, DiagnosticCategory.Error, "let_declarations_can_only_be_declared_inside_a_block_1157", "'let' declarations can only be declared inside a block."), - Unterminated_template_literal: diag(1160, DiagnosticCategory.Error, "Unterminated_template_literal_1160", "Unterminated template literal."), - Unterminated_regular_expression_literal: diag(1161, DiagnosticCategory.Error, "Unterminated_regular_expression_literal_1161", "Unterminated regular expression literal."), - An_object_member_cannot_be_declared_optional: diag(1162, DiagnosticCategory.Error, "An_object_member_cannot_be_declared_optional_1162", "An object member cannot be declared optional."), - A_yield_expression_is_only_allowed_in_a_generator_body: diag(1163, DiagnosticCategory.Error, "A_yield_expression_is_only_allowed_in_a_generator_body_1163", "A 'yield' expression is only allowed in a generator body."), - Computed_property_names_are_not_allowed_in_enums: diag(1164, DiagnosticCategory.Error, "Computed_property_names_are_not_allowed_in_enums_1164", "Computed property names are not allowed in enums."), - A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1165, DiagnosticCategory.Error, "A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165", "A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."), - A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type: diag(1166, DiagnosticCategory.Error, "A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166", "A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type."), - A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1168, DiagnosticCategory.Error, "A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168", "A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."), - A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1169, DiagnosticCategory.Error, "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169", "A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."), - A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1170, DiagnosticCategory.Error, "A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170", "A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."), - A_comma_expression_is_not_allowed_in_a_computed_property_name: diag(1171, DiagnosticCategory.Error, "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171", "A comma expression is not allowed in a computed property name."), - extends_clause_already_seen: diag(1172, DiagnosticCategory.Error, "extends_clause_already_seen_1172", "'extends' clause already seen."), - extends_clause_must_precede_implements_clause: diag(1173, DiagnosticCategory.Error, "extends_clause_must_precede_implements_clause_1173", "'extends' clause must precede 'implements' clause."), - Classes_can_only_extend_a_single_class: diag(1174, DiagnosticCategory.Error, "Classes_can_only_extend_a_single_class_1174", "Classes can only extend a single class."), - implements_clause_already_seen: diag(1175, DiagnosticCategory.Error, "implements_clause_already_seen_1175", "'implements' clause already seen."), - Interface_declaration_cannot_have_implements_clause: diag(1176, DiagnosticCategory.Error, "Interface_declaration_cannot_have_implements_clause_1176", "Interface declaration cannot have 'implements' clause."), - Binary_digit_expected: diag(1177, DiagnosticCategory.Error, "Binary_digit_expected_1177", "Binary digit expected."), - Octal_digit_expected: diag(1178, DiagnosticCategory.Error, "Octal_digit_expected_1178", "Octal digit expected."), - Unexpected_token_expected: diag(1179, DiagnosticCategory.Error, "Unexpected_token_expected_1179", "Unexpected token. '{' expected."), - Property_destructuring_pattern_expected: diag(1180, DiagnosticCategory.Error, "Property_destructuring_pattern_expected_1180", "Property destructuring pattern expected."), - Array_element_destructuring_pattern_expected: diag(1181, DiagnosticCategory.Error, "Array_element_destructuring_pattern_expected_1181", "Array element destructuring pattern expected."), - A_destructuring_declaration_must_have_an_initializer: diag(1182, DiagnosticCategory.Error, "A_destructuring_declaration_must_have_an_initializer_1182", "A destructuring declaration must have an initializer."), - An_implementation_cannot_be_declared_in_ambient_contexts: diag(1183, DiagnosticCategory.Error, "An_implementation_cannot_be_declared_in_ambient_contexts_1183", "An implementation cannot be declared in ambient contexts."), - Modifiers_cannot_appear_here: diag(1184, DiagnosticCategory.Error, "Modifiers_cannot_appear_here_1184", "Modifiers cannot appear here."), - Merge_conflict_marker_encountered: diag(1185, DiagnosticCategory.Error, "Merge_conflict_marker_encountered_1185", "Merge conflict marker encountered."), - A_rest_element_cannot_have_an_initializer: diag(1186, DiagnosticCategory.Error, "A_rest_element_cannot_have_an_initializer_1186", "A rest element cannot have an initializer."), - A_parameter_property_may_not_be_declared_using_a_binding_pattern: diag(1187, DiagnosticCategory.Error, "A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187", "A parameter property may not be declared using a binding pattern."), - Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement: diag(1188, DiagnosticCategory.Error, "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188", "Only a single variable declaration is allowed in a 'for...of' statement."), - The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer: diag(1189, DiagnosticCategory.Error, "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189", "The variable declaration of a 'for...in' statement cannot have an initializer."), - The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer: diag(1190, DiagnosticCategory.Error, "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190", "The variable declaration of a 'for...of' statement cannot have an initializer."), - An_import_declaration_cannot_have_modifiers: diag(1191, DiagnosticCategory.Error, "An_import_declaration_cannot_have_modifiers_1191", "An import declaration cannot have modifiers."), - Module_0_has_no_default_export: diag(1192, DiagnosticCategory.Error, "Module_0_has_no_default_export_1192", "Module '{0}' has no default export."), - An_export_declaration_cannot_have_modifiers: diag(1193, DiagnosticCategory.Error, "An_export_declaration_cannot_have_modifiers_1193", "An export declaration cannot have modifiers."), - Export_declarations_are_not_permitted_in_a_namespace: diag(1194, DiagnosticCategory.Error, "Export_declarations_are_not_permitted_in_a_namespace_1194", "Export declarations are not permitted in a namespace."), - export_Asterisk_does_not_re_export_a_default: diag(1195, DiagnosticCategory.Error, "export_Asterisk_does_not_re_export_a_default_1195", "'export *' does not re-export a default."), - Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified: diag(1196, DiagnosticCategory.Error, "Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196", "Catch clause variable type annotation must be 'any' or 'unknown' if specified."), - Catch_clause_variable_cannot_have_an_initializer: diag(1197, DiagnosticCategory.Error, "Catch_clause_variable_cannot_have_an_initializer_1197", "Catch clause variable cannot have an initializer."), - An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: diag(1198, DiagnosticCategory.Error, "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198", "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."), - Unterminated_Unicode_escape_sequence: diag(1199, DiagnosticCategory.Error, "Unterminated_Unicode_escape_sequence_1199", "Unterminated Unicode escape sequence."), - Line_terminator_not_permitted_before_arrow: diag(1200, DiagnosticCategory.Error, "Line_terminator_not_permitted_before_arrow_1200", "Line terminator not permitted before arrow."), - Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: diag(1202, DiagnosticCategory.Error, "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202", "Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead."), - Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead: diag(1203, DiagnosticCategory.Error, "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203", "Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."), - Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type: diag(1205, DiagnosticCategory.Error, "Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205", "Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'."), - Decorators_are_not_valid_here: diag(1206, DiagnosticCategory.Error, "Decorators_are_not_valid_here_1206", "Decorators are not valid here."), - Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: diag(1207, DiagnosticCategory.Error, "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", "Decorators cannot be applied to multiple get/set accessors of the same name."), - _0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_import_export_or_an_empty_export_statement_to_make_it_a_module: diag(1208, DiagnosticCategory.Error, "_0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_imp_1208", "'{0}' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module."), - Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0: diag(1209, DiagnosticCategory.Error, "Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209", "Invalid optional chain from new expression. Did you mean to call '{0}()'?"), - Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode: diag(1210, DiagnosticCategory.Error, "Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210", "Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."), - A_class_declaration_without_the_default_modifier_must_have_a_name: diag(1211, DiagnosticCategory.Error, "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", "A class declaration without the 'default' modifier must have a name."), - Identifier_expected_0_is_a_reserved_word_in_strict_mode: diag(1212, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", "Identifier expected. '{0}' is a reserved word in strict mode."), - Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: diag(1213, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."), - Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode: diag(1214, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214", "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."), - Invalid_use_of_0_Modules_are_automatically_in_strict_mode: diag(1215, DiagnosticCategory.Error, "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215", "Invalid use of '{0}'. Modules are automatically in strict mode."), - Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules: diag(1216, DiagnosticCategory.Error, "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216", "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."), - Export_assignment_is_not_supported_when_module_flag_is_system: diag(1218, DiagnosticCategory.Error, "Export_assignment_is_not_supported_when_module_flag_is_system_1218", "Export assignment is not supported when '--module' flag is 'system'."), - Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning: diag(1219, DiagnosticCategory.Error, "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219", "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning."), - Generators_are_not_allowed_in_an_ambient_context: diag(1221, DiagnosticCategory.Error, "Generators_are_not_allowed_in_an_ambient_context_1221", "Generators are not allowed in an ambient context."), - An_overload_signature_cannot_be_declared_as_a_generator: diag(1222, DiagnosticCategory.Error, "An_overload_signature_cannot_be_declared_as_a_generator_1222", "An overload signature cannot be declared as a generator."), - _0_tag_already_specified: diag(1223, DiagnosticCategory.Error, "_0_tag_already_specified_1223", "'{0}' tag already specified."), - Signature_0_must_be_a_type_predicate: diag(1224, DiagnosticCategory.Error, "Signature_0_must_be_a_type_predicate_1224", "Signature '{0}' must be a type predicate."), - Cannot_find_parameter_0: diag(1225, DiagnosticCategory.Error, "Cannot_find_parameter_0_1225", "Cannot find parameter '{0}'."), - Type_predicate_0_is_not_assignable_to_1: diag(1226, DiagnosticCategory.Error, "Type_predicate_0_is_not_assignable_to_1_1226", "Type predicate '{0}' is not assignable to '{1}'."), - Parameter_0_is_not_in_the_same_position_as_parameter_1: diag(1227, DiagnosticCategory.Error, "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227", "Parameter '{0}' is not in the same position as parameter '{1}'."), - A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods: diag(1228, DiagnosticCategory.Error, "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228", "A type predicate is only allowed in return type position for functions and methods."), - A_type_predicate_cannot_reference_a_rest_parameter: diag(1229, DiagnosticCategory.Error, "A_type_predicate_cannot_reference_a_rest_parameter_1229", "A type predicate cannot reference a rest parameter."), - A_type_predicate_cannot_reference_element_0_in_a_binding_pattern: diag(1230, DiagnosticCategory.Error, "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230", "A type predicate cannot reference element '{0}' in a binding pattern."), - An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration: diag(1231, DiagnosticCategory.Error, "An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231", "An export assignment must be at the top level of a file or module declaration."), - An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module: diag(1232, DiagnosticCategory.Error, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232", "An import declaration can only be used at the top level of a namespace or module."), - An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module: diag(1233, DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233", "An export declaration can only be used at the top level of a namespace or module."), - An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file: diag(1234, DiagnosticCategory.Error, "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234", "An ambient module declaration is only allowed at the top level in a file."), - A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module: diag(1235, DiagnosticCategory.Error, "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235", "A namespace declaration is only allowed at the top level of a namespace or module."), - The_return_type_of_a_property_decorator_function_must_be_either_void_or_any: diag(1236, DiagnosticCategory.Error, "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236", "The return type of a property decorator function must be either 'void' or 'any'."), - The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any: diag(1237, DiagnosticCategory.Error, "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237", "The return type of a parameter decorator function must be either 'void' or 'any'."), - Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression: diag(1238, DiagnosticCategory.Error, "Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238", "Unable to resolve signature of class decorator when called as an expression."), - Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression: diag(1239, DiagnosticCategory.Error, "Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239", "Unable to resolve signature of parameter decorator when called as an expression."), - Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression: diag(1240, DiagnosticCategory.Error, "Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240", "Unable to resolve signature of property decorator when called as an expression."), - Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression: diag(1241, DiagnosticCategory.Error, "Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241", "Unable to resolve signature of method decorator when called as an expression."), - abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration: diag(1242, DiagnosticCategory.Error, "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242", "'abstract' modifier can only appear on a class, method, or property declaration."), - _0_modifier_cannot_be_used_with_1_modifier: diag(1243, DiagnosticCategory.Error, "_0_modifier_cannot_be_used_with_1_modifier_1243", "'{0}' modifier cannot be used with '{1}' modifier."), - Abstract_methods_can_only_appear_within_an_abstract_class: diag(1244, DiagnosticCategory.Error, "Abstract_methods_can_only_appear_within_an_abstract_class_1244", "Abstract methods can only appear within an abstract class."), - Method_0_cannot_have_an_implementation_because_it_is_marked_abstract: diag(1245, DiagnosticCategory.Error, "Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245", "Method '{0}' cannot have an implementation because it is marked abstract."), - An_interface_property_cannot_have_an_initializer: diag(1246, DiagnosticCategory.Error, "An_interface_property_cannot_have_an_initializer_1246", "An interface property cannot have an initializer."), - A_type_literal_property_cannot_have_an_initializer: diag(1247, DiagnosticCategory.Error, "A_type_literal_property_cannot_have_an_initializer_1247", "A type literal property cannot have an initializer."), - A_class_member_cannot_have_the_0_keyword: diag(1248, DiagnosticCategory.Error, "A_class_member_cannot_have_the_0_keyword_1248", "A class member cannot have the '{0}' keyword."), - A_decorator_can_only_decorate_a_method_implementation_not_an_overload: diag(1249, DiagnosticCategory.Error, "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249", "A decorator can only decorate a method implementation, not an overload."), - Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5: diag(1250, DiagnosticCategory.Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'."), - Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode: diag(1251, DiagnosticCategory.Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode."), - Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode: diag(1252, DiagnosticCategory.Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode."), - A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference: diag(1254, DiagnosticCategory.Error, "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254", "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."), - A_definite_assignment_assertion_is_not_permitted_in_this_context: diag(1255, DiagnosticCategory.Error, "A_definite_assignment_assertion_is_not_permitted_in_this_context_1255", "A definite assignment assertion '!' is not permitted in this context."), - A_required_element_cannot_follow_an_optional_element: diag(1257, DiagnosticCategory.Error, "A_required_element_cannot_follow_an_optional_element_1257", "A required element cannot follow an optional element."), - A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration: diag(1258, DiagnosticCategory.Error, "A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258", "A default export must be at the top level of a file or module declaration."), - Module_0_can_only_be_default_imported_using_the_1_flag: diag(1259, DiagnosticCategory.Error, "Module_0_can_only_be_default_imported_using_the_1_flag_1259", "Module '{0}' can only be default-imported using the '{1}' flag"), - Keywords_cannot_contain_escape_characters: diag(1260, DiagnosticCategory.Error, "Keywords_cannot_contain_escape_characters_1260", "Keywords cannot contain escape characters."), - Already_included_file_name_0_differs_from_file_name_1_only_in_casing: diag(1261, DiagnosticCategory.Error, "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261", "Already included file name '{0}' differs from file name '{1}' only in casing."), - Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module: diag(1262, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262", "Identifier expected. '{0}' is a reserved word at the top-level of a module."), - Declarations_with_initializers_cannot_also_have_definite_assignment_assertions: diag(1263, DiagnosticCategory.Error, "Declarations_with_initializers_cannot_also_have_definite_assignment_assertions_1263", "Declarations with initializers cannot also have definite assignment assertions."), - Declarations_with_definite_assignment_assertions_must_also_have_type_annotations: diag(1264, DiagnosticCategory.Error, "Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264", "Declarations with definite assignment assertions must also have type annotations."), - A_rest_element_cannot_follow_another_rest_element: diag(1265, DiagnosticCategory.Error, "A_rest_element_cannot_follow_another_rest_element_1265", "A rest element cannot follow another rest element."), - An_optional_element_cannot_follow_a_rest_element: diag(1266, DiagnosticCategory.Error, "An_optional_element_cannot_follow_a_rest_element_1266", "An optional element cannot follow a rest element."), - Property_0_cannot_have_an_initializer_because_it_is_marked_abstract: diag(1267, DiagnosticCategory.Error, "Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267", "Property '{0}' cannot have an initializer because it is marked abstract."), - An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type: diag(1268, DiagnosticCategory.Error, "An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268", "An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."), - Cannot_use_export_import_on_a_type_or_type_only_namespace_when_the_isolatedModules_flag_is_provided: diag(1269, DiagnosticCategory.Error, "Cannot_use_export_import_on_a_type_or_type_only_namespace_when_the_isolatedModules_flag_is_provided_1269", "Cannot use 'export import' on a type or type-only namespace when the '--isolatedModules' flag is provided."), - Decorator_function_return_type_0_is_not_assignable_to_type_1: diag(1270, DiagnosticCategory.Error, "Decorator_function_return_type_0_is_not_assignable_to_type_1_1270", "Decorator function return type '{0}' is not assignable to type '{1}'."), - Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any: diag(1271, DiagnosticCategory.Error, "Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271", "Decorator function return type is '{0}' but is expected to be 'void' or 'any'."), - A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled: diag(1272, DiagnosticCategory.Error, "A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272", "A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."), - _0_modifier_cannot_appear_on_a_type_parameter: diag(1273, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_type_parameter_1273", "'{0}' modifier cannot appear on a type parameter"), - _0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias: diag(1274, DiagnosticCategory.Error, "_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274", "'{0}' modifier can only appear on a type parameter of a class, interface or type alias"), - accessor_modifier_can_only_appear_on_a_property_declaration: diag(1275, DiagnosticCategory.Error, "accessor_modifier_can_only_appear_on_a_property_declaration_1275", "'accessor' modifier can only appear on a property declaration."), - An_accessor_property_cannot_be_declared_optional: diag(1276, DiagnosticCategory.Error, "An_accessor_property_cannot_be_declared_optional_1276", "An 'accessor' property cannot be declared optional."), - with_statements_are_not_allowed_in_an_async_function_block: diag(1300, DiagnosticCategory.Error, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."), - await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, DiagnosticCategory.Error, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."), - The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, DiagnosticCategory.Error, "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309", "The current file is a CommonJS module and cannot use 'await' at the top level."), - Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern: diag(1312, DiagnosticCategory.Error, "Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312", "Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."), - The_body_of_an_if_statement_cannot_be_the_empty_statement: diag(1313, DiagnosticCategory.Error, "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313", "The body of an 'if' statement cannot be the empty statement."), - Global_module_exports_may_only_appear_in_module_files: diag(1314, DiagnosticCategory.Error, "Global_module_exports_may_only_appear_in_module_files_1314", "Global module exports may only appear in module files."), - Global_module_exports_may_only_appear_in_declaration_files: diag(1315, DiagnosticCategory.Error, "Global_module_exports_may_only_appear_in_declaration_files_1315", "Global module exports may only appear in declaration files."), - Global_module_exports_may_only_appear_at_top_level: diag(1316, DiagnosticCategory.Error, "Global_module_exports_may_only_appear_at_top_level_1316", "Global module exports may only appear at top level."), - A_parameter_property_cannot_be_declared_using_a_rest_parameter: diag(1317, DiagnosticCategory.Error, "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317", "A parameter property cannot be declared using a rest parameter."), - An_abstract_accessor_cannot_have_an_implementation: diag(1318, DiagnosticCategory.Error, "An_abstract_accessor_cannot_have_an_implementation_1318", "An abstract accessor cannot have an implementation."), - A_default_export_can_only_be_used_in_an_ECMAScript_style_module: diag(1319, DiagnosticCategory.Error, "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319", "A default export can only be used in an ECMAScript-style module."), - Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1320, DiagnosticCategory.Error, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."), - Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1321, DiagnosticCategory.Error, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."), - Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1322, DiagnosticCategory.Error, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."), - Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext: diag(1323, DiagnosticCategory.Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."), - Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext: diag(1324, DiagnosticCategory.Error, "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324", "Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'."), - Argument_of_dynamic_import_cannot_be_spread_element: diag(1325, DiagnosticCategory.Error, "Argument_of_dynamic_import_cannot_be_spread_element_1325", "Argument of dynamic import cannot be spread element."), - This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments: diag(1326, DiagnosticCategory.Error, "This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326", "This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."), - String_literal_with_double_quotes_expected: diag(1327, DiagnosticCategory.Error, "String_literal_with_double_quotes_expected_1327", "String literal with double quotes expected."), - Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal: diag(1328, DiagnosticCategory.Error, "Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328", "Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."), - _0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0: diag(1329, DiagnosticCategory.Error, "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329", "'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"), - A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly: diag(1330, DiagnosticCategory.Error, "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330", "A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."), - A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly: diag(1331, DiagnosticCategory.Error, "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331", "A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."), - A_variable_whose_type_is_a_unique_symbol_type_must_be_const: diag(1332, DiagnosticCategory.Error, "A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332", "A variable whose type is a 'unique symbol' type must be 'const'."), - unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name: diag(1333, DiagnosticCategory.Error, "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333", "'unique symbol' types may not be used on a variable declaration with a binding name."), - unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement: diag(1334, DiagnosticCategory.Error, "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334", "'unique symbol' types are only allowed on variables in a variable statement."), - unique_symbol_types_are_not_allowed_here: diag(1335, DiagnosticCategory.Error, "unique_symbol_types_are_not_allowed_here_1335", "'unique symbol' types are not allowed here."), - An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead: diag(1337, DiagnosticCategory.Error, "An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337", "An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."), - infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type: diag(1338, DiagnosticCategory.Error, "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338", "'infer' declarations are only permitted in the 'extends' clause of a conditional type."), - Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: diag(1339, DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."), - Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"), - Class_constructor_may_not_be_an_accessor: diag(1341, DiagnosticCategory.Error, "Class_constructor_may_not_be_an_accessor_1341", "Class constructor may not be an accessor."), - Type_arguments_cannot_be_used_here: diag(1342, DiagnosticCategory.Error, "Type_arguments_cannot_be_used_here_1342", "Type arguments cannot be used here."), - The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext: diag(1343, DiagnosticCategory.Error, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."), - A_label_is_not_allowed_here: diag(1344, DiagnosticCategory.Error, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."), - An_expression_of_type_void_cannot_be_tested_for_truthiness: diag(1345, DiagnosticCategory.Error, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."), - This_parameter_is_not_allowed_with_use_strict_directive: diag(1346, DiagnosticCategory.Error, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."), - use_strict_directive_cannot_be_used_with_non_simple_parameter_list: diag(1347, DiagnosticCategory.Error, "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347", "'use strict' directive cannot be used with non-simple parameter list."), - Non_simple_parameter_declared_here: diag(1348, DiagnosticCategory.Error, "Non_simple_parameter_declared_here_1348", "Non-simple parameter declared here."), - use_strict_directive_used_here: diag(1349, DiagnosticCategory.Error, "use_strict_directive_used_here_1349", "'use strict' directive used here."), - Print_the_final_configuration_instead_of_building: diag(1350, DiagnosticCategory.Message, "Print_the_final_configuration_instead_of_building_1350", "Print the final configuration instead of building."), - An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal: diag(1351, DiagnosticCategory.Error, "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351", "An identifier or keyword cannot immediately follow a numeric literal."), - A_bigint_literal_cannot_use_exponential_notation: diag(1352, DiagnosticCategory.Error, "A_bigint_literal_cannot_use_exponential_notation_1352", "A bigint literal cannot use exponential notation."), - A_bigint_literal_must_be_an_integer: diag(1353, DiagnosticCategory.Error, "A_bigint_literal_must_be_an_integer_1353", "A bigint literal must be an integer."), - readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types: diag(1354, DiagnosticCategory.Error, "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354", "'readonly' type modifier is only permitted on array and tuple literal types."), - A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals: diag(1355, DiagnosticCategory.Error, "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355", "A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."), - Did_you_mean_to_mark_this_function_as_async: diag(1356, DiagnosticCategory.Error, "Did_you_mean_to_mark_this_function_as_async_1356", "Did you mean to mark this function as 'async'?"), - An_enum_member_name_must_be_followed_by_a_or: diag(1357, DiagnosticCategory.Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."), - Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, DiagnosticCategory.Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."), - Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: diag(1359, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."), - Type_0_does_not_satisfy_the_expected_type_1: diag(1360, DiagnosticCategory.Error, "Type_0_does_not_satisfy_the_expected_type_1_1360", "Type '{0}' does not satisfy the expected type '{1}'."), - _0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type: diag(1361, DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361", "'{0}' cannot be used as a value because it was imported using 'import type'."), - _0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type: diag(1362, DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362", "'{0}' cannot be used as a value because it was exported using 'export type'."), - A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both: diag(1363, DiagnosticCategory.Error, "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363", "A type-only import can specify a default import or named bindings, but not both."), - Convert_to_type_only_export: diag(1364, DiagnosticCategory.Message, "Convert_to_type_only_export_1364", "Convert to type-only export"), - Convert_all_re_exported_types_to_type_only_exports: diag(1365, DiagnosticCategory.Message, "Convert_all_re_exported_types_to_type_only_exports_1365", "Convert all re-exported types to type-only exports"), - Split_into_two_separate_import_declarations: diag(1366, DiagnosticCategory.Message, "Split_into_two_separate_import_declarations_1366", "Split into two separate import declarations"), - Split_all_invalid_type_only_imports: diag(1367, DiagnosticCategory.Message, "Split_all_invalid_type_only_imports_1367", "Split all invalid type-only imports"), - Class_constructor_may_not_be_a_generator: diag(1368, DiagnosticCategory.Error, "Class_constructor_may_not_be_a_generator_1368", "Class constructor may not be a generator."), - Did_you_mean_0: diag(1369, DiagnosticCategory.Message, "Did_you_mean_0_1369", "Did you mean '{0}'?"), - This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error: diag(1371, DiagnosticCategory.Error, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371", "This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'."), - Convert_to_type_only_import: diag(1373, DiagnosticCategory.Message, "Convert_to_type_only_import_1373", "Convert to type-only import"), - Convert_all_imports_not_used_as_a_value_to_type_only_imports: diag(1374, DiagnosticCategory.Message, "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374", "Convert all imports not used as a value to type-only imports"), - await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1375, DiagnosticCategory.Error, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), - _0_was_imported_here: diag(1376, DiagnosticCategory.Message, "_0_was_imported_here_1376", "'{0}' was imported here."), - _0_was_exported_here: diag(1377, DiagnosticCategory.Message, "_0_was_exported_here_1377", "'{0}' was exported here."), - 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: diag(1378, DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378", "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."), - An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."), - An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."), - Unexpected_token_Did_you_mean_or_rbrace: diag(1381, DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"), - Unexpected_token_Did_you_mean_or_gt: diag(1382, DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `>`?"), - Only_named_exports_may_use_export_type: diag(1383, DiagnosticCategory.Error, "Only_named_exports_may_use_export_type_1383", "Only named exports may use 'export type'."), - Function_type_notation_must_be_parenthesized_when_used_in_a_union_type: diag(1385, DiagnosticCategory.Error, "Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385", "Function type notation must be parenthesized when used in a union type."), - Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type: diag(1386, DiagnosticCategory.Error, "Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386", "Constructor type notation must be parenthesized when used in a union type."), - Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: diag(1387, DiagnosticCategory.Error, "Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387", "Function type notation must be parenthesized when used in an intersection type."), - Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: diag(1388, DiagnosticCategory.Error, "Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388", "Constructor type notation must be parenthesized when used in an intersection type."), - _0_is_not_allowed_as_a_variable_declaration_name: diag(1389, DiagnosticCategory.Error, "_0_is_not_allowed_as_a_variable_declaration_name_1389", "'{0}' is not allowed as a variable declaration name."), - _0_is_not_allowed_as_a_parameter_name: diag(1390, DiagnosticCategory.Error, "_0_is_not_allowed_as_a_parameter_name_1390", "'{0}' is not allowed as a parameter name."), - An_import_alias_cannot_use_import_type: diag(1392, DiagnosticCategory.Error, "An_import_alias_cannot_use_import_type_1392", "An import alias cannot use 'import type'"), - Imported_via_0_from_file_1: diag(1393, DiagnosticCategory.Message, "Imported_via_0_from_file_1_1393", "Imported via {0} from file '{1}'"), - Imported_via_0_from_file_1_with_packageId_2: diag(1394, DiagnosticCategory.Message, "Imported_via_0_from_file_1_with_packageId_2_1394", "Imported via {0} from file '{1}' with packageId '{2}'"), - Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions: diag(1395, DiagnosticCategory.Message, "Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395", "Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"), - Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions: diag(1396, DiagnosticCategory.Message, "Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396", "Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"), - Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions: diag(1397, DiagnosticCategory.Message, "Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397", "Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"), - Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions: diag(1398, DiagnosticCategory.Message, "Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398", "Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"), - File_is_included_via_import_here: diag(1399, DiagnosticCategory.Message, "File_is_included_via_import_here_1399", "File is included via import here."), - Referenced_via_0_from_file_1: diag(1400, DiagnosticCategory.Message, "Referenced_via_0_from_file_1_1400", "Referenced via '{0}' from file '{1}'"), - File_is_included_via_reference_here: diag(1401, DiagnosticCategory.Message, "File_is_included_via_reference_here_1401", "File is included via reference here."), - Type_library_referenced_via_0_from_file_1: diag(1402, DiagnosticCategory.Message, "Type_library_referenced_via_0_from_file_1_1402", "Type library referenced via '{0}' from file '{1}'"), - Type_library_referenced_via_0_from_file_1_with_packageId_2: diag(1403, DiagnosticCategory.Message, "Type_library_referenced_via_0_from_file_1_with_packageId_2_1403", "Type library referenced via '{0}' from file '{1}' with packageId '{2}'"), - File_is_included_via_type_library_reference_here: diag(1404, DiagnosticCategory.Message, "File_is_included_via_type_library_reference_here_1404", "File is included via type library reference here."), - Library_referenced_via_0_from_file_1: diag(1405, DiagnosticCategory.Message, "Library_referenced_via_0_from_file_1_1405", "Library referenced via '{0}' from file '{1}'"), - File_is_included_via_library_reference_here: diag(1406, DiagnosticCategory.Message, "File_is_included_via_library_reference_here_1406", "File is included via library reference here."), - Matched_by_include_pattern_0_in_1: diag(1407, DiagnosticCategory.Message, "Matched_by_include_pattern_0_in_1_1407", "Matched by include pattern '{0}' in '{1}'"), - File_is_matched_by_include_pattern_specified_here: diag(1408, DiagnosticCategory.Message, "File_is_matched_by_include_pattern_specified_here_1408", "File is matched by include pattern specified here."), - Part_of_files_list_in_tsconfig_json: diag(1409, DiagnosticCategory.Message, "Part_of_files_list_in_tsconfig_json_1409", "Part of 'files' list in tsconfig.json"), - File_is_matched_by_files_list_specified_here: diag(1410, DiagnosticCategory.Message, "File_is_matched_by_files_list_specified_here_1410", "File is matched by 'files' list specified here."), - Output_from_referenced_project_0_included_because_1_specified: diag(1411, DiagnosticCategory.Message, "Output_from_referenced_project_0_included_because_1_specified_1411", "Output from referenced project '{0}' included because '{1}' specified"), - Output_from_referenced_project_0_included_because_module_is_specified_as_none: diag(1412, DiagnosticCategory.Message, "Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412", "Output from referenced project '{0}' included because '--module' is specified as 'none'"), - File_is_output_from_referenced_project_specified_here: diag(1413, DiagnosticCategory.Message, "File_is_output_from_referenced_project_specified_here_1413", "File is output from referenced project specified here."), - Source_from_referenced_project_0_included_because_1_specified: diag(1414, DiagnosticCategory.Message, "Source_from_referenced_project_0_included_because_1_specified_1414", "Source from referenced project '{0}' included because '{1}' specified"), - Source_from_referenced_project_0_included_because_module_is_specified_as_none: diag(1415, DiagnosticCategory.Message, "Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415", "Source from referenced project '{0}' included because '--module' is specified as 'none'"), - File_is_source_from_referenced_project_specified_here: diag(1416, DiagnosticCategory.Message, "File_is_source_from_referenced_project_specified_here_1416", "File is source from referenced project specified here."), - Entry_point_of_type_library_0_specified_in_compilerOptions: diag(1417, DiagnosticCategory.Message, "Entry_point_of_type_library_0_specified_in_compilerOptions_1417", "Entry point of type library '{0}' specified in compilerOptions"), - Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1: diag(1418, DiagnosticCategory.Message, "Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418", "Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"), - File_is_entry_point_of_type_library_specified_here: diag(1419, DiagnosticCategory.Message, "File_is_entry_point_of_type_library_specified_here_1419", "File is entry point of type library specified here."), - Entry_point_for_implicit_type_library_0: diag(1420, DiagnosticCategory.Message, "Entry_point_for_implicit_type_library_0_1420", "Entry point for implicit type library '{0}'"), - Entry_point_for_implicit_type_library_0_with_packageId_1: diag(1421, DiagnosticCategory.Message, "Entry_point_for_implicit_type_library_0_with_packageId_1_1421", "Entry point for implicit type library '{0}' with packageId '{1}'"), - Library_0_specified_in_compilerOptions: diag(1422, DiagnosticCategory.Message, "Library_0_specified_in_compilerOptions_1422", "Library '{0}' specified in compilerOptions"), - File_is_library_specified_here: diag(1423, DiagnosticCategory.Message, "File_is_library_specified_here_1423", "File is library specified here."), - Default_library: diag(1424, DiagnosticCategory.Message, "Default_library_1424", "Default library"), - Default_library_for_target_0: diag(1425, DiagnosticCategory.Message, "Default_library_for_target_0_1425", "Default library for target '{0}'"), - File_is_default_library_for_target_specified_here: diag(1426, DiagnosticCategory.Message, "File_is_default_library_for_target_specified_here_1426", "File is default library for target specified here."), - Root_file_specified_for_compilation: diag(1427, DiagnosticCategory.Message, "Root_file_specified_for_compilation_1427", "Root file specified for compilation"), - File_is_output_of_project_reference_source_0: diag(1428, DiagnosticCategory.Message, "File_is_output_of_project_reference_source_0_1428", "File is output of project reference source '{0}'"), - File_redirects_to_file_0: diag(1429, DiagnosticCategory.Message, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"), - The_file_is_in_the_program_because_Colon: diag(1430, DiagnosticCategory.Message, "The_file_is_in_the_program_because_Colon_1430", "The file is in the program because:"), - for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1431, DiagnosticCategory.Error, "for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431", "'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), - Top_level_for_await_loops_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: diag(1432, DiagnosticCategory.Error, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432", "Top-level 'for await' loops 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."), - Decorators_may_not_be_applied_to_this_parameters: diag(1433, DiagnosticCategory.Error, "Decorators_may_not_be_applied_to_this_parameters_1433", "Decorators may not be applied to 'this' parameters."), - Unexpected_keyword_or_identifier: diag(1434, DiagnosticCategory.Error, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."), - Unknown_keyword_or_identifier_Did_you_mean_0: diag(1435, DiagnosticCategory.Error, "Unknown_keyword_or_identifier_Did_you_mean_0_1435", "Unknown keyword or identifier. Did you mean '{0}'?"), - Decorators_must_precede_the_name_and_all_keywords_of_property_declarations: diag(1436, DiagnosticCategory.Error, "Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436", "Decorators must precede the name and all keywords of property declarations."), - Namespace_must_be_given_a_name: diag(1437, DiagnosticCategory.Error, "Namespace_must_be_given_a_name_1437", "Namespace must be given a name."), - Interface_must_be_given_a_name: diag(1438, DiagnosticCategory.Error, "Interface_must_be_given_a_name_1438", "Interface must be given a name."), - Type_alias_must_be_given_a_name: diag(1439, DiagnosticCategory.Error, "Type_alias_must_be_given_a_name_1439", "Type alias must be given a name."), - Variable_declaration_not_allowed_at_this_location: diag(1440, DiagnosticCategory.Error, "Variable_declaration_not_allowed_at_this_location_1440", "Variable declaration not allowed at this location."), - Cannot_start_a_function_call_in_a_type_annotation: diag(1441, DiagnosticCategory.Error, "Cannot_start_a_function_call_in_a_type_annotation_1441", "Cannot start a function call in a type annotation."), - Expected_for_property_initializer: diag(1442, DiagnosticCategory.Error, "Expected_for_property_initializer_1442", "Expected '=' for property initializer."), - Module_declaration_names_may_only_use_or_quoted_strings: diag(1443, DiagnosticCategory.Error, "Module_declaration_names_may_only_use_or_quoted_strings_1443", "Module declaration names may only use ' or \" quoted strings."), - _0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled: diag(1444, DiagnosticCategory.Error, "_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedMod_1444", "'{0}' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."), - _0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled: diag(1446, DiagnosticCategory.Error, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveVa_1446", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."), - _0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isolatedModules_is_enabled: diag(1448, DiagnosticCategory.Error, "_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isol_1448", "'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when 'isolatedModules' is enabled."), - Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: diag(1449, DiagnosticCategory.Message, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."), - Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments: diag(1450, DiagnosticCategory.Message, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional assertion as arguments"), - Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: diag(1451, DiagnosticCategory.Error, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"), - resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext: diag(1452, DiagnosticCategory.Error, "resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452", "'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`."), - resolution_mode_should_be_either_require_or_import: diag(1453, DiagnosticCategory.Error, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."), - resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, DiagnosticCategory.Error, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."), - resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, DiagnosticCategory.Error, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."), - Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: diag(1456, DiagnosticCategory.Error, "Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456", "Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."), - Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk: diag(1457, DiagnosticCategory.Message, "Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457", "Matched by default include pattern '**/*'"), - File_is_ECMAScript_module_because_0_has_field_type_with_value_module: diag(1458, DiagnosticCategory.Message, "File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458", "File is ECMAScript module because '{0}' has field \"type\" with value \"module\""), - File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module: diag(1459, DiagnosticCategory.Message, "File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459", "File is CommonJS module because '{0}' has field \"type\" whose value is not \"module\""), - File_is_CommonJS_module_because_0_does_not_have_field_type: diag(1460, DiagnosticCategory.Message, "File_is_CommonJS_module_because_0_does_not_have_field_type_1460", "File is CommonJS module because '{0}' does not have field \"type\""), - File_is_CommonJS_module_because_package_json_was_not_found: diag(1461, DiagnosticCategory.Message, "File_is_CommonJS_module_because_package_json_was_not_found_1461", "File is CommonJS module because 'package.json' was not found"), - The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, DiagnosticCategory.Error, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."), - Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead: diag(1471, DiagnosticCategory.Error, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."), - catch_or_finally_expected: diag(1472, DiagnosticCategory.Error, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."), - An_import_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1473, DiagnosticCategory.Error, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473", "An import declaration can only be used at the top level of a module."), - An_export_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1474, DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474", "An export declaration can only be used at the top level of a module."), - Control_what_method_is_used_to_detect_module_format_JS_files: diag(1475, DiagnosticCategory.Message, "Control_what_method_is_used_to_detect_module_format_JS_files_1475", "Control what method is used to detect module-format JS files."), - auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules: diag(1476, DiagnosticCategory.Message, "auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476", "\"auto\": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules."), - An_instantiation_expression_cannot_be_followed_by_a_property_access: diag(1477, DiagnosticCategory.Error, "An_instantiation_expression_cannot_be_followed_by_a_property_access_1477", "An instantiation expression cannot be followed by a property access."), - Identifier_or_string_literal_expected: diag(1478, DiagnosticCategory.Error, "Identifier_or_string_literal_expected_1478", "Identifier or string literal expected."), - The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead: diag(1479, DiagnosticCategory.Error, "The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479", "The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import(\"{0}\")' call instead."), - To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module: diag(1480, DiagnosticCategory.Message, "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480", "To convert this file to an ECMAScript module, change its file extension to '{0}' or create a local package.json file with `{ \"type\": \"module\" }`."), - To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1: diag(1481, DiagnosticCategory.Message, "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481", "To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field `\"type\": \"module\"` to '{1}'."), - To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0: diag(1482, DiagnosticCategory.Message, "To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482", "To convert this file to an ECMAScript module, add the field `\"type\": \"module\"` to '{0}'."), - To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module: diag(1483, DiagnosticCategory.Message, "To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483", "To convert this file to an ECMAScript module, create a local package.json file with `{ \"type\": \"module\" }`."), - The_types_of_0_are_incompatible_between_these_types: diag(2200, DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."), - The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."), - Call_signature_return_types_0_and_1_are_incompatible: diag(2202, DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), - Construct_signature_return_types_0_and_1_are_incompatible: diag(2203, DiagnosticCategory.Error, "Construct_signature_return_types_0_and_1_are_incompatible_2203", "Construct signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), - Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: diag(2204, DiagnosticCategory.Error, "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204", "Call signatures with no arguments have incompatible return types '{0}' and '{1}'.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), - Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: diag(2205, DiagnosticCategory.Error, "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205", "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), - The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement: diag(2206, DiagnosticCategory.Error, "The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206", "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."), - The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement: diag(2207, DiagnosticCategory.Error, "The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207", "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."), - This_type_parameter_might_need_an_extends_0_constraint: diag(2208, DiagnosticCategory.Error, "This_type_parameter_might_need_an_extends_0_constraint_2208", "This type parameter might need an `extends {0}` constraint."), - The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2209, DiagnosticCategory.Error, "The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209", "The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."), - The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2210, DiagnosticCategory.Error, "The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210", "The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."), - Add_extends_constraint: diag(2211, DiagnosticCategory.Message, "Add_extends_constraint_2211", "Add `extends` constraint."), - Add_extends_constraint_to_all_type_parameters: diag(2212, DiagnosticCategory.Message, "Add_extends_constraint_to_all_type_parameters_2212", "Add `extends` constraint to all type parameters"), - Duplicate_identifier_0: diag(2300, DiagnosticCategory.Error, "Duplicate_identifier_0_2300", "Duplicate identifier '{0}'."), - Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2301, DiagnosticCategory.Error, "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."), - Static_members_cannot_reference_class_type_parameters: diag(2302, DiagnosticCategory.Error, "Static_members_cannot_reference_class_type_parameters_2302", "Static members cannot reference class type parameters."), - Circular_definition_of_import_alias_0: diag(2303, DiagnosticCategory.Error, "Circular_definition_of_import_alias_0_2303", "Circular definition of import alias '{0}'."), - Cannot_find_name_0: diag(2304, DiagnosticCategory.Error, "Cannot_find_name_0_2304", "Cannot find name '{0}'."), - Module_0_has_no_exported_member_1: diag(2305, DiagnosticCategory.Error, "Module_0_has_no_exported_member_1_2305", "Module '{0}' has no exported member '{1}'."), - File_0_is_not_a_module: diag(2306, DiagnosticCategory.Error, "File_0_is_not_a_module_2306", "File '{0}' is not a module."), - Cannot_find_module_0_or_its_corresponding_type_declarations: diag(2307, DiagnosticCategory.Error, "Cannot_find_module_0_or_its_corresponding_type_declarations_2307", "Cannot find module '{0}' or its corresponding type declarations."), - Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity: diag(2308, DiagnosticCategory.Error, "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308", "Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."), - An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: diag(2309, DiagnosticCategory.Error, "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309", "An export assignment cannot be used in a module with other exported elements."), - Type_0_recursively_references_itself_as_a_base_type: diag(2310, DiagnosticCategory.Error, "Type_0_recursively_references_itself_as_a_base_type_2310", "Type '{0}' recursively references itself as a base type."), - Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function: diag(2311, DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311", "Cannot find name '{0}'. Did you mean to write this in an async function?"), - An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2312, DiagnosticCategory.Error, "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312", "An interface can only extend an object type or intersection of object types with statically known members."), - Type_parameter_0_has_a_circular_constraint: diag(2313, DiagnosticCategory.Error, "Type_parameter_0_has_a_circular_constraint_2313", "Type parameter '{0}' has a circular constraint."), - Generic_type_0_requires_1_type_argument_s: diag(2314, DiagnosticCategory.Error, "Generic_type_0_requires_1_type_argument_s_2314", "Generic type '{0}' requires {1} type argument(s)."), - Type_0_is_not_generic: diag(2315, DiagnosticCategory.Error, "Type_0_is_not_generic_2315", "Type '{0}' is not generic."), - Global_type_0_must_be_a_class_or_interface_type: diag(2316, DiagnosticCategory.Error, "Global_type_0_must_be_a_class_or_interface_type_2316", "Global type '{0}' must be a class or interface type."), - Global_type_0_must_have_1_type_parameter_s: diag(2317, DiagnosticCategory.Error, "Global_type_0_must_have_1_type_parameter_s_2317", "Global type '{0}' must have {1} type parameter(s)."), - Cannot_find_global_type_0: diag(2318, DiagnosticCategory.Error, "Cannot_find_global_type_0_2318", "Cannot find global type '{0}'."), - Named_property_0_of_types_1_and_2_are_not_identical: diag(2319, DiagnosticCategory.Error, "Named_property_0_of_types_1_and_2_are_not_identical_2319", "Named property '{0}' of types '{1}' and '{2}' are not identical."), - Interface_0_cannot_simultaneously_extend_types_1_and_2: diag(2320, DiagnosticCategory.Error, "Interface_0_cannot_simultaneously_extend_types_1_and_2_2320", "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."), - Excessive_stack_depth_comparing_types_0_and_1: diag(2321, DiagnosticCategory.Error, "Excessive_stack_depth_comparing_types_0_and_1_2321", "Excessive stack depth comparing types '{0}' and '{1}'."), - Type_0_is_not_assignable_to_type_1: diag(2322, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_2322", "Type '{0}' is not assignable to type '{1}'."), - Cannot_redeclare_exported_variable_0: diag(2323, DiagnosticCategory.Error, "Cannot_redeclare_exported_variable_0_2323", "Cannot redeclare exported variable '{0}'."), - Property_0_is_missing_in_type_1: diag(2324, DiagnosticCategory.Error, "Property_0_is_missing_in_type_1_2324", "Property '{0}' is missing in type '{1}'."), - Property_0_is_private_in_type_1_but_not_in_type_2: diag(2325, DiagnosticCategory.Error, "Property_0_is_private_in_type_1_but_not_in_type_2_2325", "Property '{0}' is private in type '{1}' but not in type '{2}'."), - Types_of_property_0_are_incompatible: diag(2326, DiagnosticCategory.Error, "Types_of_property_0_are_incompatible_2326", "Types of property '{0}' are incompatible."), - Property_0_is_optional_in_type_1_but_required_in_type_2: diag(2327, DiagnosticCategory.Error, "Property_0_is_optional_in_type_1_but_required_in_type_2_2327", "Property '{0}' is optional in type '{1}' but required in type '{2}'."), - Types_of_parameters_0_and_1_are_incompatible: diag(2328, DiagnosticCategory.Error, "Types_of_parameters_0_and_1_are_incompatible_2328", "Types of parameters '{0}' and '{1}' are incompatible."), - Index_signature_for_type_0_is_missing_in_type_1: diag(2329, DiagnosticCategory.Error, "Index_signature_for_type_0_is_missing_in_type_1_2329", "Index signature for type '{0}' is missing in type '{1}'."), - _0_and_1_index_signatures_are_incompatible: diag(2330, DiagnosticCategory.Error, "_0_and_1_index_signatures_are_incompatible_2330", "'{0}' and '{1}' index signatures are incompatible."), - this_cannot_be_referenced_in_a_module_or_namespace_body: diag(2331, DiagnosticCategory.Error, "this_cannot_be_referenced_in_a_module_or_namespace_body_2331", "'this' cannot be referenced in a module or namespace body."), - this_cannot_be_referenced_in_current_location: diag(2332, DiagnosticCategory.Error, "this_cannot_be_referenced_in_current_location_2332", "'this' cannot be referenced in current location."), - this_cannot_be_referenced_in_constructor_arguments: diag(2333, DiagnosticCategory.Error, "this_cannot_be_referenced_in_constructor_arguments_2333", "'this' cannot be referenced in constructor arguments."), - this_cannot_be_referenced_in_a_static_property_initializer: diag(2334, DiagnosticCategory.Error, "this_cannot_be_referenced_in_a_static_property_initializer_2334", "'this' cannot be referenced in a static property initializer."), - super_can_only_be_referenced_in_a_derived_class: diag(2335, DiagnosticCategory.Error, "super_can_only_be_referenced_in_a_derived_class_2335", "'super' can only be referenced in a derived class."), - super_cannot_be_referenced_in_constructor_arguments: diag(2336, DiagnosticCategory.Error, "super_cannot_be_referenced_in_constructor_arguments_2336", "'super' cannot be referenced in constructor arguments."), - Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: diag(2337, DiagnosticCategory.Error, "Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337", "Super calls are not permitted outside constructors or in nested functions inside constructors."), - super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: diag(2338, DiagnosticCategory.Error, "super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338", "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."), - Property_0_does_not_exist_on_type_1: diag(2339, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_2339", "Property '{0}' does not exist on type '{1}'."), - Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: diag(2340, DiagnosticCategory.Error, "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340", "Only public and protected methods of the base class are accessible via the 'super' keyword."), - Property_0_is_private_and_only_accessible_within_class_1: diag(2341, DiagnosticCategory.Error, "Property_0_is_private_and_only_accessible_within_class_1_2341", "Property '{0}' is private and only accessible within class '{1}'."), - This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0: diag(2343, DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343", "This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."), - Type_0_does_not_satisfy_the_constraint_1: diag(2344, DiagnosticCategory.Error, "Type_0_does_not_satisfy_the_constraint_1_2344", "Type '{0}' does not satisfy the constraint '{1}'."), - Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: diag(2345, DiagnosticCategory.Error, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", "Argument of type '{0}' is not assignable to parameter of type '{1}'."), - Call_target_does_not_contain_any_signatures: diag(2346, DiagnosticCategory.Error, "Call_target_does_not_contain_any_signatures_2346", "Call target does not contain any signatures."), - Untyped_function_calls_may_not_accept_type_arguments: diag(2347, DiagnosticCategory.Error, "Untyped_function_calls_may_not_accept_type_arguments_2347", "Untyped function calls may not accept type arguments."), - Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: diag(2348, DiagnosticCategory.Error, "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", "Value of type '{0}' is not callable. Did you mean to include 'new'?"), - This_expression_is_not_callable: diag(2349, DiagnosticCategory.Error, "This_expression_is_not_callable_2349", "This expression is not callable."), - Only_a_void_function_can_be_called_with_the_new_keyword: diag(2350, DiagnosticCategory.Error, "Only_a_void_function_can_be_called_with_the_new_keyword_2350", "Only a void function can be called with the 'new' keyword."), - This_expression_is_not_constructable: diag(2351, DiagnosticCategory.Error, "This_expression_is_not_constructable_2351", "This expression is not constructable."), - Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first: diag(2352, DiagnosticCategory.Error, "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352", "Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."), - Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1: diag(2353, DiagnosticCategory.Error, "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353", "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."), - This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found: diag(2354, DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354", "This syntax requires an imported helper but module '{0}' cannot be found."), - A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value: diag(2355, DiagnosticCategory.Error, "A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355", "A function whose declared type is neither 'void' nor 'any' must return a value."), - An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2356, DiagnosticCategory.Error, "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356", "An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."), - The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: diag(2357, DiagnosticCategory.Error, "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", "The operand of an increment or decrement operator must be a variable or a property access."), - The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: diag(2358, DiagnosticCategory.Error, "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."), - The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: diag(2359, DiagnosticCategory.Error, "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359", "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type."), - The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2362, DiagnosticCategory.Error, "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362", "The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."), - The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2363, DiagnosticCategory.Error, "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363", "The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."), - The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access: diag(2364, DiagnosticCategory.Error, "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", "The left-hand side of an assignment expression must be a variable or a property access."), - Operator_0_cannot_be_applied_to_types_1_and_2: diag(2365, DiagnosticCategory.Error, "Operator_0_cannot_be_applied_to_types_1_and_2_2365", "Operator '{0}' cannot be applied to types '{1}' and '{2}'."), - Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined: diag(2366, DiagnosticCategory.Error, "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366", "Function lacks ending return statement and return type does not include 'undefined'."), - This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap: diag(2367, DiagnosticCategory.Error, "This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367", "This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."), - Type_parameter_name_cannot_be_0: diag(2368, DiagnosticCategory.Error, "Type_parameter_name_cannot_be_0_2368", "Type parameter name cannot be '{0}'."), - A_parameter_property_is_only_allowed_in_a_constructor_implementation: diag(2369, DiagnosticCategory.Error, "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369", "A parameter property is only allowed in a constructor implementation."), - A_rest_parameter_must_be_of_an_array_type: diag(2370, DiagnosticCategory.Error, "A_rest_parameter_must_be_of_an_array_type_2370", "A rest parameter must be of an array type."), - A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: diag(2371, DiagnosticCategory.Error, "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371", "A parameter initializer is only allowed in a function or constructor implementation."), - Parameter_0_cannot_reference_itself: diag(2372, DiagnosticCategory.Error, "Parameter_0_cannot_reference_itself_2372", "Parameter '{0}' cannot reference itself."), - Parameter_0_cannot_reference_identifier_1_declared_after_it: diag(2373, DiagnosticCategory.Error, "Parameter_0_cannot_reference_identifier_1_declared_after_it_2373", "Parameter '{0}' cannot reference identifier '{1}' declared after it."), - Duplicate_index_signature_for_type_0: diag(2374, DiagnosticCategory.Error, "Duplicate_index_signature_for_type_0_2374", "Duplicate index signature for type '{0}'."), - Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: diag(2375, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."), - A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers: diag(2376, DiagnosticCategory.Error, "A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376", "A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers."), - Constructors_for_derived_classes_must_contain_a_super_call: diag(2377, DiagnosticCategory.Error, "Constructors_for_derived_classes_must_contain_a_super_call_2377", "Constructors for derived classes must contain a 'super' call."), - A_get_accessor_must_return_a_value: diag(2378, DiagnosticCategory.Error, "A_get_accessor_must_return_a_value_2378", "A 'get' accessor must return a value."), - Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: diag(2379, DiagnosticCategory.Error, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379", "Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."), - The_return_type_of_a_get_accessor_must_be_assignable_to_its_set_accessor_type: diag(2380, DiagnosticCategory.Error, "The_return_type_of_a_get_accessor_must_be_assignable_to_its_set_accessor_type_2380", "The return type of a 'get' accessor must be assignable to its 'set' accessor type"), - Overload_signatures_must_all_be_exported_or_non_exported: diag(2383, DiagnosticCategory.Error, "Overload_signatures_must_all_be_exported_or_non_exported_2383", "Overload signatures must all be exported or non-exported."), - Overload_signatures_must_all_be_ambient_or_non_ambient: diag(2384, DiagnosticCategory.Error, "Overload_signatures_must_all_be_ambient_or_non_ambient_2384", "Overload signatures must all be ambient or non-ambient."), - Overload_signatures_must_all_be_public_private_or_protected: diag(2385, DiagnosticCategory.Error, "Overload_signatures_must_all_be_public_private_or_protected_2385", "Overload signatures must all be public, private or protected."), - Overload_signatures_must_all_be_optional_or_required: diag(2386, DiagnosticCategory.Error, "Overload_signatures_must_all_be_optional_or_required_2386", "Overload signatures must all be optional or required."), - Function_overload_must_be_static: diag(2387, DiagnosticCategory.Error, "Function_overload_must_be_static_2387", "Function overload must be static."), - Function_overload_must_not_be_static: diag(2388, DiagnosticCategory.Error, "Function_overload_must_not_be_static_2388", "Function overload must not be static."), - Function_implementation_name_must_be_0: diag(2389, DiagnosticCategory.Error, "Function_implementation_name_must_be_0_2389", "Function implementation name must be '{0}'."), - Constructor_implementation_is_missing: diag(2390, DiagnosticCategory.Error, "Constructor_implementation_is_missing_2390", "Constructor implementation is missing."), - Function_implementation_is_missing_or_not_immediately_following_the_declaration: diag(2391, DiagnosticCategory.Error, "Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391", "Function implementation is missing or not immediately following the declaration."), - Multiple_constructor_implementations_are_not_allowed: diag(2392, DiagnosticCategory.Error, "Multiple_constructor_implementations_are_not_allowed_2392", "Multiple constructor implementations are not allowed."), - Duplicate_function_implementation: diag(2393, DiagnosticCategory.Error, "Duplicate_function_implementation_2393", "Duplicate function implementation."), - This_overload_signature_is_not_compatible_with_its_implementation_signature: diag(2394, DiagnosticCategory.Error, "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394", "This overload signature is not compatible with its implementation signature."), - Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local: diag(2395, DiagnosticCategory.Error, "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395", "Individual declarations in merged declaration '{0}' must be all exported or all local."), - Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: diag(2396, DiagnosticCategory.Error, "Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396", "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."), - Declaration_name_conflicts_with_built_in_global_identifier_0: diag(2397, DiagnosticCategory.Error, "Declaration_name_conflicts_with_built_in_global_identifier_0_2397", "Declaration name conflicts with built-in global identifier '{0}'."), - constructor_cannot_be_used_as_a_parameter_property_name: diag(2398, DiagnosticCategory.Error, "constructor_cannot_be_used_as_a_parameter_property_name_2398", "'constructor' cannot be used as a parameter property name."), - Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: diag(2399, DiagnosticCategory.Error, "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399", "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."), - Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: diag(2400, DiagnosticCategory.Error, "Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400", "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."), - A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers: diag(2401, DiagnosticCategory.Error, "A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401", "A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers."), - Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: diag(2402, DiagnosticCategory.Error, "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402", "Expression resolves to '_super' that compiler uses to capture base class reference."), - Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: diag(2403, DiagnosticCategory.Error, "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403", "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."), - The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: diag(2404, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404", "The left-hand side of a 'for...in' statement cannot use a type annotation."), - The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any: diag(2405, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405", "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."), - The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access: diag(2406, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406", "The left-hand side of a 'for...in' statement must be a variable or a property access."), - The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0: diag(2407, DiagnosticCategory.Error, "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407", "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."), - Setters_cannot_return_a_value: diag(2408, DiagnosticCategory.Error, "Setters_cannot_return_a_value_2408", "Setters cannot return a value."), - Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: diag(2409, DiagnosticCategory.Error, "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", "Return type of constructor signature must be assignable to the instance type of the class."), - The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any: diag(2410, DiagnosticCategory.Error, "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410", "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."), - Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target: diag(2412, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."), - Property_0_of_type_1_is_not_assignable_to_2_index_type_3: diag(2411, DiagnosticCategory.Error, "Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411", "Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."), - _0_index_type_1_is_not_assignable_to_2_index_type_3: diag(2413, DiagnosticCategory.Error, "_0_index_type_1_is_not_assignable_to_2_index_type_3_2413", "'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."), - Class_name_cannot_be_0: diag(2414, DiagnosticCategory.Error, "Class_name_cannot_be_0_2414", "Class name cannot be '{0}'."), - Class_0_incorrectly_extends_base_class_1: diag(2415, DiagnosticCategory.Error, "Class_0_incorrectly_extends_base_class_1_2415", "Class '{0}' incorrectly extends base class '{1}'."), - Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2: diag(2416, DiagnosticCategory.Error, "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416", "Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."), - Class_static_side_0_incorrectly_extends_base_class_static_side_1: diag(2417, DiagnosticCategory.Error, "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417", "Class static side '{0}' incorrectly extends base class static side '{1}'."), - Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1: diag(2418, DiagnosticCategory.Error, "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418", "Type of computed property's value is '{0}', which is not assignable to type '{1}'."), - Types_of_construct_signatures_are_incompatible: diag(2419, DiagnosticCategory.Error, "Types_of_construct_signatures_are_incompatible_2419", "Types of construct signatures are incompatible."), - Class_0_incorrectly_implements_interface_1: diag(2420, DiagnosticCategory.Error, "Class_0_incorrectly_implements_interface_1_2420", "Class '{0}' incorrectly implements interface '{1}'."), - A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2422, DiagnosticCategory.Error, "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422", "A class can only implement an object type or intersection of object types with statically known members."), - Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: diag(2423, DiagnosticCategory.Error, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."), - Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2425, DiagnosticCategory.Error, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."), - Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2426, DiagnosticCategory.Error, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."), - Interface_name_cannot_be_0: diag(2427, DiagnosticCategory.Error, "Interface_name_cannot_be_0_2427", "Interface name cannot be '{0}'."), - All_declarations_of_0_must_have_identical_type_parameters: diag(2428, DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_type_parameters_2428", "All declarations of '{0}' must have identical type parameters."), - Interface_0_incorrectly_extends_interface_1: diag(2430, DiagnosticCategory.Error, "Interface_0_incorrectly_extends_interface_1_2430", "Interface '{0}' incorrectly extends interface '{1}'."), - Enum_name_cannot_be_0: diag(2431, DiagnosticCategory.Error, "Enum_name_cannot_be_0_2431", "Enum name cannot be '{0}'."), - In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: diag(2432, DiagnosticCategory.Error, "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432", "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."), - A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: diag(2433, DiagnosticCategory.Error, "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", "A namespace declaration cannot be in a different file from a class or function with which it is merged."), - A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: diag(2434, DiagnosticCategory.Error, "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", "A namespace declaration cannot be located prior to a class or function with which it is merged."), - Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces: diag(2435, DiagnosticCategory.Error, "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435", "Ambient modules cannot be nested in other modules or namespaces."), - Ambient_module_declaration_cannot_specify_relative_module_name: diag(2436, DiagnosticCategory.Error, "Ambient_module_declaration_cannot_specify_relative_module_name_2436", "Ambient module declaration cannot specify relative module name."), - Module_0_is_hidden_by_a_local_declaration_with_the_same_name: diag(2437, DiagnosticCategory.Error, "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", "Module '{0}' is hidden by a local declaration with the same name."), - Import_name_cannot_be_0: diag(2438, DiagnosticCategory.Error, "Import_name_cannot_be_0_2438", "Import name cannot be '{0}'."), - Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: diag(2439, DiagnosticCategory.Error, "Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439", "Import or export declaration in an ambient module declaration cannot reference module through relative module name."), - Import_declaration_conflicts_with_local_declaration_of_0: diag(2440, DiagnosticCategory.Error, "Import_declaration_conflicts_with_local_declaration_of_0_2440", "Import declaration conflicts with local declaration of '{0}'."), - Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: diag(2441, DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441", "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."), - Types_have_separate_declarations_of_a_private_property_0: diag(2442, DiagnosticCategory.Error, "Types_have_separate_declarations_of_a_private_property_0_2442", "Types have separate declarations of a private property '{0}'."), - Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: diag(2443, DiagnosticCategory.Error, "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443", "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."), - Property_0_is_protected_in_type_1_but_public_in_type_2: diag(2444, DiagnosticCategory.Error, "Property_0_is_protected_in_type_1_but_public_in_type_2_2444", "Property '{0}' is protected in type '{1}' but public in type '{2}'."), - Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: diag(2445, DiagnosticCategory.Error, "Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445", "Property '{0}' is protected and only accessible within class '{1}' and its subclasses."), - Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2: diag(2446, DiagnosticCategory.Error, "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446", "Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."), - The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: diag(2447, DiagnosticCategory.Error, "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447", "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."), - Block_scoped_variable_0_used_before_its_declaration: diag(2448, DiagnosticCategory.Error, "Block_scoped_variable_0_used_before_its_declaration_2448", "Block-scoped variable '{0}' used before its declaration."), - Class_0_used_before_its_declaration: diag(2449, DiagnosticCategory.Error, "Class_0_used_before_its_declaration_2449", "Class '{0}' used before its declaration."), - Enum_0_used_before_its_declaration: diag(2450, DiagnosticCategory.Error, "Enum_0_used_before_its_declaration_2450", "Enum '{0}' used before its declaration."), - Cannot_redeclare_block_scoped_variable_0: diag(2451, DiagnosticCategory.Error, "Cannot_redeclare_block_scoped_variable_0_2451", "Cannot redeclare block-scoped variable '{0}'."), - An_enum_member_cannot_have_a_numeric_name: diag(2452, DiagnosticCategory.Error, "An_enum_member_cannot_have_a_numeric_name_2452", "An enum member cannot have a numeric name."), - Variable_0_is_used_before_being_assigned: diag(2454, DiagnosticCategory.Error, "Variable_0_is_used_before_being_assigned_2454", "Variable '{0}' is used before being assigned."), - Type_alias_0_circularly_references_itself: diag(2456, DiagnosticCategory.Error, "Type_alias_0_circularly_references_itself_2456", "Type alias '{0}' circularly references itself."), - Type_alias_name_cannot_be_0: diag(2457, DiagnosticCategory.Error, "Type_alias_name_cannot_be_0_2457", "Type alias name cannot be '{0}'."), - An_AMD_module_cannot_have_multiple_name_assignments: diag(2458, DiagnosticCategory.Error, "An_AMD_module_cannot_have_multiple_name_assignments_2458", "An AMD module cannot have multiple name assignments."), - Module_0_declares_1_locally_but_it_is_not_exported: diag(2459, DiagnosticCategory.Error, "Module_0_declares_1_locally_but_it_is_not_exported_2459", "Module '{0}' declares '{1}' locally, but it is not exported."), - Module_0_declares_1_locally_but_it_is_exported_as_2: diag(2460, DiagnosticCategory.Error, "Module_0_declares_1_locally_but_it_is_exported_as_2_2460", "Module '{0}' declares '{1}' locally, but it is exported as '{2}'."), - Type_0_is_not_an_array_type: diag(2461, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_2461", "Type '{0}' is not an array type."), - A_rest_element_must_be_last_in_a_destructuring_pattern: diag(2462, DiagnosticCategory.Error, "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", "A rest element must be last in a destructuring pattern."), - A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: diag(2463, DiagnosticCategory.Error, "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", "A binding pattern parameter cannot be optional in an implementation signature."), - A_computed_property_name_must_be_of_type_string_number_symbol_or_any: diag(2464, DiagnosticCategory.Error, "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464", "A computed property name must be of type 'string', 'number', 'symbol', or 'any'."), - this_cannot_be_referenced_in_a_computed_property_name: diag(2465, DiagnosticCategory.Error, "this_cannot_be_referenced_in_a_computed_property_name_2465", "'this' cannot be referenced in a computed property name."), - super_cannot_be_referenced_in_a_computed_property_name: diag(2466, DiagnosticCategory.Error, "super_cannot_be_referenced_in_a_computed_property_name_2466", "'super' cannot be referenced in a computed property name."), - A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type: diag(2467, DiagnosticCategory.Error, "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467", "A computed property name cannot reference a type parameter from its containing type."), - Cannot_find_global_value_0: diag(2468, DiagnosticCategory.Error, "Cannot_find_global_value_0_2468", "Cannot find global value '{0}'."), - The_0_operator_cannot_be_applied_to_type_symbol: diag(2469, DiagnosticCategory.Error, "The_0_operator_cannot_be_applied_to_type_symbol_2469", "The '{0}' operator cannot be applied to type 'symbol'."), - Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher: diag(2472, DiagnosticCategory.Error, "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472", "Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."), - Enum_declarations_must_all_be_const_or_non_const: diag(2473, DiagnosticCategory.Error, "Enum_declarations_must_all_be_const_or_non_const_2473", "Enum declarations must all be const or non-const."), - const_enum_member_initializers_must_be_constant_expressions: diag(2474, DiagnosticCategory.Error, "const_enum_member_initializers_must_be_constant_expressions_2474", "const enum member initializers must be constant expressions."), - const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query: diag(2475, DiagnosticCategory.Error, "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475", "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."), - A_const_enum_member_can_only_be_accessed_using_a_string_literal: diag(2476, DiagnosticCategory.Error, "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476", "A const enum member can only be accessed using a string literal."), - const_enum_member_initializer_was_evaluated_to_a_non_finite_value: diag(2477, DiagnosticCategory.Error, "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477", "'const' enum member initializer was evaluated to a non-finite value."), - const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN: diag(2478, DiagnosticCategory.Error, "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478", "'const' enum member initializer was evaluated to disallowed value 'NaN'."), - let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: diag(2480, DiagnosticCategory.Error, "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480", "'let' is not allowed to be used as a name in 'let' or 'const' declarations."), - Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: diag(2481, DiagnosticCategory.Error, "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481", "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."), - The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: diag(2483, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483", "The left-hand side of a 'for...of' statement cannot use a type annotation."), - Export_declaration_conflicts_with_exported_declaration_of_0: diag(2484, DiagnosticCategory.Error, "Export_declaration_conflicts_with_exported_declaration_of_0_2484", "Export declaration conflicts with exported declaration of '{0}'."), - The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access: diag(2487, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487", "The left-hand side of a 'for...of' statement must be a variable or a property access."), - Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2488, DiagnosticCategory.Error, "Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488", "Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."), - An_iterator_must_have_a_next_method: diag(2489, DiagnosticCategory.Error, "An_iterator_must_have_a_next_method_2489", "An iterator must have a 'next()' method."), - The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property: diag(2490, DiagnosticCategory.Error, "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490", "The type returned by the '{0}()' method of an iterator must have a 'value' property."), - The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: diag(2491, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491", "The left-hand side of a 'for...in' statement cannot be a destructuring pattern."), - Cannot_redeclare_identifier_0_in_catch_clause: diag(2492, DiagnosticCategory.Error, "Cannot_redeclare_identifier_0_in_catch_clause_2492", "Cannot redeclare identifier '{0}' in catch clause."), - Tuple_type_0_of_length_1_has_no_element_at_index_2: diag(2493, DiagnosticCategory.Error, "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493", "Tuple type '{0}' of length '{1}' has no element at index '{2}'."), - Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: diag(2494, DiagnosticCategory.Error, "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494", "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."), - Type_0_is_not_an_array_type_or_a_string_type: diag(2495, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_a_string_type_2495", "Type '{0}' is not an array type or a string type."), - The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression: diag(2496, DiagnosticCategory.Error, "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496", "The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression."), - This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export: diag(2497, DiagnosticCategory.Error, "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497", "This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."), - Module_0_uses_export_and_cannot_be_used_with_export_Asterisk: diag(2498, DiagnosticCategory.Error, "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498", "Module '{0}' uses 'export =' and cannot be used with 'export *'."), - An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments: diag(2499, DiagnosticCategory.Error, "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499", "An interface can only extend an identifier/qualified-name with optional type arguments."), - A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments: diag(2500, DiagnosticCategory.Error, "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500", "A class can only implement an identifier/qualified-name with optional type arguments."), - A_rest_element_cannot_contain_a_binding_pattern: diag(2501, DiagnosticCategory.Error, "A_rest_element_cannot_contain_a_binding_pattern_2501", "A rest element cannot contain a binding pattern."), - _0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: diag(2502, DiagnosticCategory.Error, "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502", "'{0}' is referenced directly or indirectly in its own type annotation."), - Cannot_find_namespace_0: diag(2503, DiagnosticCategory.Error, "Cannot_find_namespace_0_2503", "Cannot find namespace '{0}'."), - Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator: diag(2504, DiagnosticCategory.Error, "Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504", "Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."), - A_generator_cannot_have_a_void_type_annotation: diag(2505, DiagnosticCategory.Error, "A_generator_cannot_have_a_void_type_annotation_2505", "A generator cannot have a 'void' type annotation."), - _0_is_referenced_directly_or_indirectly_in_its_own_base_expression: diag(2506, DiagnosticCategory.Error, "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506", "'{0}' is referenced directly or indirectly in its own base expression."), - Type_0_is_not_a_constructor_function_type: diag(2507, DiagnosticCategory.Error, "Type_0_is_not_a_constructor_function_type_2507", "Type '{0}' is not a constructor function type."), - No_base_constructor_has_the_specified_number_of_type_arguments: diag(2508, DiagnosticCategory.Error, "No_base_constructor_has_the_specified_number_of_type_arguments_2508", "No base constructor has the specified number of type arguments."), - Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2509, DiagnosticCategory.Error, "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509", "Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."), - Base_constructors_must_all_have_the_same_return_type: diag(2510, DiagnosticCategory.Error, "Base_constructors_must_all_have_the_same_return_type_2510", "Base constructors must all have the same return type."), - Cannot_create_an_instance_of_an_abstract_class: diag(2511, DiagnosticCategory.Error, "Cannot_create_an_instance_of_an_abstract_class_2511", "Cannot create an instance of an abstract class."), - Overload_signatures_must_all_be_abstract_or_non_abstract: diag(2512, DiagnosticCategory.Error, "Overload_signatures_must_all_be_abstract_or_non_abstract_2512", "Overload signatures must all be abstract or non-abstract."), - Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression: diag(2513, DiagnosticCategory.Error, "Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513", "Abstract method '{0}' in class '{1}' cannot be accessed via super expression."), - A_tuple_type_cannot_be_indexed_with_a_negative_value: diag(2514, DiagnosticCategory.Error, "A_tuple_type_cannot_be_indexed_with_a_negative_value_2514", "A tuple type cannot be indexed with a negative value."), - Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: diag(2515, DiagnosticCategory.Error, "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", "Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'."), - All_declarations_of_an_abstract_method_must_be_consecutive: diag(2516, DiagnosticCategory.Error, "All_declarations_of_an_abstract_method_must_be_consecutive_2516", "All declarations of an abstract method must be consecutive."), - Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: diag(2517, DiagnosticCategory.Error, "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", "Cannot assign an abstract constructor type to a non-abstract constructor type."), - A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: diag(2518, DiagnosticCategory.Error, "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", "A 'this'-based type guard is not compatible with a parameter-based type guard."), - An_async_iterator_must_have_a_next_method: diag(2519, DiagnosticCategory.Error, "An_async_iterator_must_have_a_next_method_2519", "An async iterator must have a 'next()' method."), - Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: diag(2520, DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."), - The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method: diag(2522, DiagnosticCategory.Error, "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522", "The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method."), - yield_expressions_cannot_be_used_in_a_parameter_initializer: diag(2523, DiagnosticCategory.Error, "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523", "'yield' expressions cannot be used in a parameter initializer."), - await_expressions_cannot_be_used_in_a_parameter_initializer: diag(2524, DiagnosticCategory.Error, "await_expressions_cannot_be_used_in_a_parameter_initializer_2524", "'await' expressions cannot be used in a parameter initializer."), - Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value: diag(2525, DiagnosticCategory.Error, "Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525", "Initializer provides no value for this binding element and the binding element has no default value."), - A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface: diag(2526, DiagnosticCategory.Error, "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526", "A 'this' type is available only in a non-static member of a class or interface."), - The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary: diag(2527, DiagnosticCategory.Error, "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527", "The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."), - A_module_cannot_have_multiple_default_exports: diag(2528, DiagnosticCategory.Error, "A_module_cannot_have_multiple_default_exports_2528", "A module cannot have multiple default exports."), - Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions: diag(2529, DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529", "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."), - Property_0_is_incompatible_with_index_signature: diag(2530, DiagnosticCategory.Error, "Property_0_is_incompatible_with_index_signature_2530", "Property '{0}' is incompatible with index signature."), - Object_is_possibly_null: diag(2531, DiagnosticCategory.Error, "Object_is_possibly_null_2531", "Object is possibly 'null'."), - Object_is_possibly_undefined: diag(2532, DiagnosticCategory.Error, "Object_is_possibly_undefined_2532", "Object is possibly 'undefined'."), - Object_is_possibly_null_or_undefined: diag(2533, DiagnosticCategory.Error, "Object_is_possibly_null_or_undefined_2533", "Object is possibly 'null' or 'undefined'."), - A_function_returning_never_cannot_have_a_reachable_end_point: diag(2534, DiagnosticCategory.Error, "A_function_returning_never_cannot_have_a_reachable_end_point_2534", "A function returning 'never' cannot have a reachable end point."), - Type_0_cannot_be_used_to_index_type_1: diag(2536, DiagnosticCategory.Error, "Type_0_cannot_be_used_to_index_type_1_2536", "Type '{0}' cannot be used to index type '{1}'."), - Type_0_has_no_matching_index_signature_for_type_1: diag(2537, DiagnosticCategory.Error, "Type_0_has_no_matching_index_signature_for_type_1_2537", "Type '{0}' has no matching index signature for type '{1}'."), - Type_0_cannot_be_used_as_an_index_type: diag(2538, DiagnosticCategory.Error, "Type_0_cannot_be_used_as_an_index_type_2538", "Type '{0}' cannot be used as an index type."), - Cannot_assign_to_0_because_it_is_not_a_variable: diag(2539, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_not_a_variable_2539", "Cannot assign to '{0}' because it is not a variable."), - Cannot_assign_to_0_because_it_is_a_read_only_property: diag(2540, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_read_only_property_2540", "Cannot assign to '{0}' because it is a read-only property."), - Index_signature_in_type_0_only_permits_reading: diag(2542, DiagnosticCategory.Error, "Index_signature_in_type_0_only_permits_reading_2542", "Index signature in type '{0}' only permits reading."), - Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference: diag(2543, DiagnosticCategory.Error, "Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543", "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."), - Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference: diag(2544, DiagnosticCategory.Error, "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544", "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."), - A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any: diag(2545, DiagnosticCategory.Error, "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545", "A mixin class must have a constructor with a single rest parameter of type 'any[]'."), - The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property: diag(2547, DiagnosticCategory.Error, "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547", "The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."), - Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2548, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548", "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."), - Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2549, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549", "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."), - Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later: diag(2550, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550", "Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{2}' or later."), - Property_0_does_not_exist_on_type_1_Did_you_mean_2: diag(2551, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551", "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"), - Cannot_find_name_0_Did_you_mean_1: diag(2552, DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_1_2552", "Cannot find name '{0}'. Did you mean '{1}'?"), - Computed_values_are_not_permitted_in_an_enum_with_string_valued_members: diag(2553, DiagnosticCategory.Error, "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553", "Computed values are not permitted in an enum with string valued members."), - Expected_0_arguments_but_got_1: diag(2554, DiagnosticCategory.Error, "Expected_0_arguments_but_got_1_2554", "Expected {0} arguments, but got {1}."), - Expected_at_least_0_arguments_but_got_1: diag(2555, DiagnosticCategory.Error, "Expected_at_least_0_arguments_but_got_1_2555", "Expected at least {0} arguments, but got {1}."), - A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter: diag(2556, DiagnosticCategory.Error, "A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556", "A spread argument must either have a tuple type or be passed to a rest parameter."), - Expected_0_type_arguments_but_got_1: diag(2558, DiagnosticCategory.Error, "Expected_0_type_arguments_but_got_1_2558", "Expected {0} type arguments, but got {1}."), - Type_0_has_no_properties_in_common_with_type_1: diag(2559, DiagnosticCategory.Error, "Type_0_has_no_properties_in_common_with_type_1_2559", "Type '{0}' has no properties in common with type '{1}'."), - Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it: diag(2560, DiagnosticCategory.Error, "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560", "Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"), - Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2: diag(2561, DiagnosticCategory.Error, "Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561", "Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"), - Base_class_expressions_cannot_reference_class_type_parameters: diag(2562, DiagnosticCategory.Error, "Base_class_expressions_cannot_reference_class_type_parameters_2562", "Base class expressions cannot reference class type parameters."), - The_containing_function_or_module_body_is_too_large_for_control_flow_analysis: diag(2563, DiagnosticCategory.Error, "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563", "The containing function or module body is too large for control flow analysis."), - Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor: diag(2564, DiagnosticCategory.Error, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564", "Property '{0}' has no initializer and is not definitely assigned in the constructor."), - Property_0_is_used_before_being_assigned: diag(2565, DiagnosticCategory.Error, "Property_0_is_used_before_being_assigned_2565", "Property '{0}' is used before being assigned."), - A_rest_element_cannot_have_a_property_name: diag(2566, DiagnosticCategory.Error, "A_rest_element_cannot_have_a_property_name_2566", "A rest element cannot have a property name."), - Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations: diag(2567, DiagnosticCategory.Error, "Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567", "Enum declarations can only merge with namespace or other enum declarations."), - Property_0_may_not_exist_on_type_1_Did_you_mean_2: diag(2568, DiagnosticCategory.Error, "Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568", "Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"), - Could_not_find_name_0_Did_you_mean_1: diag(2570, DiagnosticCategory.Error, "Could_not_find_name_0_Did_you_mean_1_2570", "Could not find name '{0}'. Did you mean '{1}'?"), - Object_is_of_type_unknown: diag(2571, DiagnosticCategory.Error, "Object_is_of_type_unknown_2571", "Object is of type 'unknown'."), - A_rest_element_type_must_be_an_array_type: diag(2574, DiagnosticCategory.Error, "A_rest_element_type_must_be_an_array_type_2574", "A rest element type must be an array type."), - No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments: diag(2575, DiagnosticCategory.Error, "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575", "No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."), - Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead: diag(2576, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576", "Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"), - Return_type_annotation_circularly_references_itself: diag(2577, DiagnosticCategory.Error, "Return_type_annotation_circularly_references_itself_2577", "Return type annotation circularly references itself."), - Unused_ts_expect_error_directive: diag(2578, DiagnosticCategory.Error, "Unused_ts_expect_error_directive_2578", "Unused '@ts-expect-error' directive."), - Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode: diag(2580, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2580", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`."), - Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery: diag(2581, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2581", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`."), - Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha: diag(2582, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`."), - Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later: diag(2583, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583", "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later."), - Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom: diag(2584, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584", "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'."), - _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later: diag(2585, DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585", "'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later."), - Cannot_assign_to_0_because_it_is_a_constant: diag(2588, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_constant_2588", "Cannot assign to '{0}' because it is a constant."), - Type_instantiation_is_excessively_deep_and_possibly_infinite: diag(2589, DiagnosticCategory.Error, "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589", "Type instantiation is excessively deep and possibly infinite."), - Expression_produces_a_union_type_that_is_too_complex_to_represent: diag(2590, DiagnosticCategory.Error, "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590", "Expression produces a union type that is too complex to represent."), - Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig: diag(2591, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig."), - Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig: diag(2592, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig."), - Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig: diag(2593, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig."), - This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag: diag(2594, DiagnosticCategory.Error, "This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594", "This module is declared with 'export =', and can only be used with a default import when using the '{0}' flag."), - _0_can_only_be_imported_by_using_a_default_import: diag(2595, DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_a_default_import_2595", "'{0}' can only be imported by using a default import."), - _0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: diag(2596, DiagnosticCategory.Error, "_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596", "'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import."), - _0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import: diag(2597, DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597", "'{0}' can only be imported by using a 'require' call or by using a default import."), - _0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: diag(2598, DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using__2598", "'{0}' can only be imported by using a 'require' call or by turning on the 'esModuleInterop' flag and using a default import."), - JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: diag(2602, DiagnosticCategory.Error, "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602", "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."), - Property_0_in_type_1_is_not_assignable_to_type_2: diag(2603, DiagnosticCategory.Error, "Property_0_in_type_1_is_not_assignable_to_type_2_2603", "Property '{0}' in type '{1}' is not assignable to type '{2}'."), - JSX_element_type_0_does_not_have_any_construct_or_call_signatures: diag(2604, DiagnosticCategory.Error, "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604", "JSX element type '{0}' does not have any construct or call signatures."), - Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property: diag(2606, DiagnosticCategory.Error, "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606", "Property '{0}' of JSX spread attribute is not assignable to target property."), - JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: diag(2607, DiagnosticCategory.Error, "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", "JSX element class does not support attributes because it does not have a '{0}' property."), - The_global_type_JSX_0_may_not_have_more_than_one_property: diag(2608, DiagnosticCategory.Error, "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", "The global type 'JSX.{0}' may not have more than one property."), - JSX_spread_child_must_be_an_array_type: diag(2609, DiagnosticCategory.Error, "JSX_spread_child_must_be_an_array_type_2609", "JSX spread child must be an array type."), - _0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property: diag(2610, DiagnosticCategory.Error, "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610", "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."), - _0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor: diag(2611, DiagnosticCategory.Error, "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611", "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."), - Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration: diag(2612, DiagnosticCategory.Error, "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612", "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."), - Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead: diag(2613, DiagnosticCategory.Error, "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613", "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"), - Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead: diag(2614, DiagnosticCategory.Error, "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614", "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"), - Type_of_property_0_circularly_references_itself_in_mapped_type_1: diag(2615, DiagnosticCategory.Error, "Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615", "Type of property '{0}' circularly references itself in mapped type '{1}'."), - _0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import: diag(2616, DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import_2616", "'{0}' can only be imported by using 'import {1} = require({2})' or a default import."), - _0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: diag(2617, DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_us_2617", "'{0}' can only be imported by using 'import {1} = require({2})' or by turning on the 'esModuleInterop' flag and using a default import."), - Source_has_0_element_s_but_target_requires_1: diag(2618, DiagnosticCategory.Error, "Source_has_0_element_s_but_target_requires_1_2618", "Source has {0} element(s) but target requires {1}."), - Source_has_0_element_s_but_target_allows_only_1: diag(2619, DiagnosticCategory.Error, "Source_has_0_element_s_but_target_allows_only_1_2619", "Source has {0} element(s) but target allows only {1}."), - Target_requires_0_element_s_but_source_may_have_fewer: diag(2620, DiagnosticCategory.Error, "Target_requires_0_element_s_but_source_may_have_fewer_2620", "Target requires {0} element(s) but source may have fewer."), - Target_allows_only_0_element_s_but_source_may_have_more: diag(2621, DiagnosticCategory.Error, "Target_allows_only_0_element_s_but_source_may_have_more_2621", "Target allows only {0} element(s) but source may have more."), - Source_provides_no_match_for_required_element_at_position_0_in_target: diag(2623, DiagnosticCategory.Error, "Source_provides_no_match_for_required_element_at_position_0_in_target_2623", "Source provides no match for required element at position {0} in target."), - Source_provides_no_match_for_variadic_element_at_position_0_in_target: diag(2624, DiagnosticCategory.Error, "Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624", "Source provides no match for variadic element at position {0} in target."), - Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target: diag(2625, DiagnosticCategory.Error, "Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625", "Variadic element at position {0} in source does not match element at position {1} in target."), - Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target: diag(2626, DiagnosticCategory.Error, "Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626", "Type at position {0} in source is not compatible with type at position {1} in target."), - Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target: diag(2627, DiagnosticCategory.Error, "Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627", "Type at positions {0} through {1} in source is not compatible with type at position {2} in target."), - Cannot_assign_to_0_because_it_is_an_enum: diag(2628, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_an_enum_2628", "Cannot assign to '{0}' because it is an enum."), - Cannot_assign_to_0_because_it_is_a_class: diag(2629, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_class_2629", "Cannot assign to '{0}' because it is a class."), - Cannot_assign_to_0_because_it_is_a_function: diag(2630, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_function_2630", "Cannot assign to '{0}' because it is a function."), - Cannot_assign_to_0_because_it_is_a_namespace: diag(2631, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_namespace_2631", "Cannot assign to '{0}' because it is a namespace."), - Cannot_assign_to_0_because_it_is_an_import: diag(2632, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_an_import_2632", "Cannot assign to '{0}' because it is an import."), - JSX_property_access_expressions_cannot_include_JSX_namespace_names: diag(2633, DiagnosticCategory.Error, "JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633", "JSX property access expressions cannot include JSX namespace names"), - _0_index_signatures_are_incompatible: diag(2634, DiagnosticCategory.Error, "_0_index_signatures_are_incompatible_2634", "'{0}' index signatures are incompatible."), - Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable: diag(2635, DiagnosticCategory.Error, "Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635", "Type '{0}' has no signatures for which the type argument list is applicable."), - Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation: diag(2636, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636", "Type '{0}' is not assignable to type '{1}' as implied by variance annotation."), - Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types: diag(2637, DiagnosticCategory.Error, "Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637", "Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."), - Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator: diag(2638, DiagnosticCategory.Error, "Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638", "Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."), - Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: diag(2649, DiagnosticCategory.Error, "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", "Cannot augment module '{0}' with value exports because it resolves to a non-module entity."), - A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: diag(2651, DiagnosticCategory.Error, "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."), - Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: diag(2652, DiagnosticCategory.Error, "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."), - Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: diag(2653, DiagnosticCategory.Error, "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."), - JSX_expressions_must_have_one_parent_element: diag(2657, DiagnosticCategory.Error, "JSX_expressions_must_have_one_parent_element_2657", "JSX expressions must have one parent element."), - Type_0_provides_no_match_for_the_signature_1: diag(2658, DiagnosticCategory.Error, "Type_0_provides_no_match_for_the_signature_1_2658", "Type '{0}' provides no match for the signature '{1}'."), - super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: diag(2659, DiagnosticCategory.Error, "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."), - super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: diag(2660, DiagnosticCategory.Error, "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", "'super' can only be referenced in members of derived classes or object literal expressions."), - Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module: diag(2661, DiagnosticCategory.Error, "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661", "Cannot export '{0}'. Only local declarations can be exported from a module."), - Cannot_find_name_0_Did_you_mean_the_static_member_1_0: diag(2662, DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662", "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"), - Cannot_find_name_0_Did_you_mean_the_instance_member_this_0: diag(2663, DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663", "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"), - Invalid_module_name_in_augmentation_module_0_cannot_be_found: diag(2664, DiagnosticCategory.Error, "Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664", "Invalid module name in augmentation, module '{0}' cannot be found."), - Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented: diag(2665, DiagnosticCategory.Error, "Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665", "Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."), - Exports_and_export_assignments_are_not_permitted_in_module_augmentations: diag(2666, DiagnosticCategory.Error, "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666", "Exports and export assignments are not permitted in module augmentations."), - Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module: diag(2667, DiagnosticCategory.Error, "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667", "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."), - export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible: diag(2668, DiagnosticCategory.Error, "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668", "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."), - Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations: diag(2669, DiagnosticCategory.Error, "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669", "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."), - Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context: diag(2670, DiagnosticCategory.Error, "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670", "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."), - Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity: diag(2671, DiagnosticCategory.Error, "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671", "Cannot augment module '{0}' because it resolves to a non-module entity."), - Cannot_assign_a_0_constructor_type_to_a_1_constructor_type: diag(2672, DiagnosticCategory.Error, "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672", "Cannot assign a '{0}' constructor type to a '{1}' constructor type."), - Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration: diag(2673, DiagnosticCategory.Error, "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673", "Constructor of class '{0}' is private and only accessible within the class declaration."), - Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration: diag(2674, DiagnosticCategory.Error, "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674", "Constructor of class '{0}' is protected and only accessible within the class declaration."), - Cannot_extend_a_class_0_Class_constructor_is_marked_as_private: diag(2675, DiagnosticCategory.Error, "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675", "Cannot extend a class '{0}'. Class constructor is marked as private."), - Accessors_must_both_be_abstract_or_non_abstract: diag(2676, DiagnosticCategory.Error, "Accessors_must_both_be_abstract_or_non_abstract_2676", "Accessors must both be abstract or non-abstract."), - A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type: diag(2677, DiagnosticCategory.Error, "A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677", "A type predicate's type must be assignable to its parameter's type."), - Type_0_is_not_comparable_to_type_1: diag(2678, DiagnosticCategory.Error, "Type_0_is_not_comparable_to_type_1_2678", "Type '{0}' is not comparable to type '{1}'."), - A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void: diag(2679, DiagnosticCategory.Error, "A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679", "A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."), - A_0_parameter_must_be_the_first_parameter: diag(2680, DiagnosticCategory.Error, "A_0_parameter_must_be_the_first_parameter_2680", "A '{0}' parameter must be the first parameter."), - A_constructor_cannot_have_a_this_parameter: diag(2681, DiagnosticCategory.Error, "A_constructor_cannot_have_a_this_parameter_2681", "A constructor cannot have a 'this' parameter."), - this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation: diag(2683, DiagnosticCategory.Error, "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683", "'this' implicitly has type 'any' because it does not have a type annotation."), - The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1: diag(2684, DiagnosticCategory.Error, "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684", "The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."), - The_this_types_of_each_signature_are_incompatible: diag(2685, DiagnosticCategory.Error, "The_this_types_of_each_signature_are_incompatible_2685", "The 'this' types of each signature are incompatible."), - _0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead: diag(2686, DiagnosticCategory.Error, "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686", "'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."), - All_declarations_of_0_must_have_identical_modifiers: diag(2687, DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_modifiers_2687", "All declarations of '{0}' must have identical modifiers."), - Cannot_find_type_definition_file_for_0: diag(2688, DiagnosticCategory.Error, "Cannot_find_type_definition_file_for_0_2688", "Cannot find type definition file for '{0}'."), - Cannot_extend_an_interface_0_Did_you_mean_implements: diag(2689, DiagnosticCategory.Error, "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", "Cannot extend an interface '{0}'. Did you mean 'implements'?"), - _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0: diag(2690, DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690", "'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?"), - An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead: diag(2691, DiagnosticCategory.Error, "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691", "An import path cannot end with a '{0}' extension. Consider importing '{1}' instead."), - _0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: diag(2692, DiagnosticCategory.Error, "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."), - _0_only_refers_to_a_type_but_is_being_used_as_a_value_here: diag(2693, DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693", "'{0}' only refers to a type, but is being used as a value here."), - Namespace_0_has_no_exported_member_1: diag(2694, DiagnosticCategory.Error, "Namespace_0_has_no_exported_member_1_2694", "Namespace '{0}' has no exported member '{1}'."), - Left_side_of_comma_operator_is_unused_and_has_no_side_effects: diag(2695, DiagnosticCategory.Error, "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695", "Left side of comma operator is unused and has no side effects.", /*reportsUnnecessary*/ true), - The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead: diag(2696, DiagnosticCategory.Error, "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696", "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"), - An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: diag(2697, DiagnosticCategory.Error, "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."), - Spread_types_may_only_be_created_from_object_types: diag(2698, DiagnosticCategory.Error, "Spread_types_may_only_be_created_from_object_types_2698", "Spread types may only be created from object types."), - Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1: diag(2699, DiagnosticCategory.Error, "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."), - Rest_types_may_only_be_created_from_object_types: diag(2700, DiagnosticCategory.Error, "Rest_types_may_only_be_created_from_object_types_2700", "Rest types may only be created from object types."), - The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: diag(2701, DiagnosticCategory.Error, "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", "The target of an object rest assignment must be a variable or a property access."), - _0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: diag(2702, DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", "'{0}' only refers to a type, but is being used as a namespace here."), - The_operand_of_a_delete_operator_must_be_a_property_reference: diag(2703, DiagnosticCategory.Error, "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", "The operand of a 'delete' operator must be a property reference."), - The_operand_of_a_delete_operator_cannot_be_a_read_only_property: diag(2704, DiagnosticCategory.Error, "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", "The operand of a 'delete' operator cannot be a read-only property."), - An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: diag(2705, DiagnosticCategory.Error, "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."), - Required_type_parameters_may_not_follow_optional_type_parameters: diag(2706, DiagnosticCategory.Error, "Required_type_parameters_may_not_follow_optional_type_parameters_2706", "Required type parameters may not follow optional type parameters."), - Generic_type_0_requires_between_1_and_2_type_arguments: diag(2707, DiagnosticCategory.Error, "Generic_type_0_requires_between_1_and_2_type_arguments_2707", "Generic type '{0}' requires between {1} and {2} type arguments."), - Cannot_use_namespace_0_as_a_value: diag(2708, DiagnosticCategory.Error, "Cannot_use_namespace_0_as_a_value_2708", "Cannot use namespace '{0}' as a value."), - Cannot_use_namespace_0_as_a_type: diag(2709, DiagnosticCategory.Error, "Cannot_use_namespace_0_as_a_type_2709", "Cannot use namespace '{0}' as a type."), - _0_are_specified_twice_The_attribute_named_0_will_be_overwritten: diag(2710, DiagnosticCategory.Error, "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", "'{0}' are specified twice. The attribute named '{0}' will be overwritten."), - A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: diag(2711, DiagnosticCategory.Error, "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711", "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."), - A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: diag(2712, DiagnosticCategory.Error, "A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712", "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."), - Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1: diag(2713, DiagnosticCategory.Error, "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713", "Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}[\"{1}\"]'?"), - The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context: diag(2714, DiagnosticCategory.Error, "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714", "The expression of an export assignment must be an identifier or qualified name in an ambient context."), - Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor: diag(2715, DiagnosticCategory.Error, "Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715", "Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."), - Type_parameter_0_has_a_circular_default: diag(2716, DiagnosticCategory.Error, "Type_parameter_0_has_a_circular_default_2716", "Type parameter '{0}' has a circular default."), - Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2: diag(2717, DiagnosticCategory.Error, "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717", "Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."), - Duplicate_property_0: diag(2718, DiagnosticCategory.Error, "Duplicate_property_0_2718", "Duplicate property '{0}'."), - Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated: diag(2719, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719", "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."), - Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass: diag(2720, DiagnosticCategory.Error, "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720", "Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"), - Cannot_invoke_an_object_which_is_possibly_null: diag(2721, DiagnosticCategory.Error, "Cannot_invoke_an_object_which_is_possibly_null_2721", "Cannot invoke an object which is possibly 'null'."), - Cannot_invoke_an_object_which_is_possibly_undefined: diag(2722, DiagnosticCategory.Error, "Cannot_invoke_an_object_which_is_possibly_undefined_2722", "Cannot invoke an object which is possibly 'undefined'."), - Cannot_invoke_an_object_which_is_possibly_null_or_undefined: diag(2723, DiagnosticCategory.Error, "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723", "Cannot invoke an object which is possibly 'null' or 'undefined'."), - _0_has_no_exported_member_named_1_Did_you_mean_2: diag(2724, DiagnosticCategory.Error, "_0_has_no_exported_member_named_1_Did_you_mean_2_2724", "'{0}' has no exported member named '{1}'. Did you mean '{2}'?"), - Class_name_cannot_be_Object_when_targeting_ES5_with_module_0: diag(2725, DiagnosticCategory.Error, "Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725", "Class name cannot be 'Object' when targeting ES5 with module {0}."), - Cannot_find_lib_definition_for_0: diag(2726, DiagnosticCategory.Error, "Cannot_find_lib_definition_for_0_2726", "Cannot find lib definition for '{0}'."), - Cannot_find_lib_definition_for_0_Did_you_mean_1: diag(2727, DiagnosticCategory.Error, "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727", "Cannot find lib definition for '{0}'. Did you mean '{1}'?"), - _0_is_declared_here: diag(2728, DiagnosticCategory.Message, "_0_is_declared_here_2728", "'{0}' is declared here."), - Property_0_is_used_before_its_initialization: diag(2729, DiagnosticCategory.Error, "Property_0_is_used_before_its_initialization_2729", "Property '{0}' is used before its initialization."), - An_arrow_function_cannot_have_a_this_parameter: diag(2730, DiagnosticCategory.Error, "An_arrow_function_cannot_have_a_this_parameter_2730", "An arrow function cannot have a 'this' parameter."), - Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String: diag(2731, DiagnosticCategory.Error, "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731", "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."), - Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension: diag(2732, DiagnosticCategory.Error, "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732", "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension."), - Property_0_was_also_declared_here: diag(2733, DiagnosticCategory.Error, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."), - Are_you_missing_a_semicolon: diag(2734, DiagnosticCategory.Error, "Are_you_missing_a_semicolon_2734", "Are you missing a semicolon?"), - Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1: diag(2735, DiagnosticCategory.Error, "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735", "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"), - Operator_0_cannot_be_applied_to_type_1: diag(2736, DiagnosticCategory.Error, "Operator_0_cannot_be_applied_to_type_1_2736", "Operator '{0}' cannot be applied to type '{1}'."), - BigInt_literals_are_not_available_when_targeting_lower_than_ES2020: diag(2737, DiagnosticCategory.Error, "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737", "BigInt literals are not available when targeting lower than ES2020."), - An_outer_value_of_this_is_shadowed_by_this_container: diag(2738, DiagnosticCategory.Message, "An_outer_value_of_this_is_shadowed_by_this_container_2738", "An outer value of 'this' is shadowed by this container."), - Type_0_is_missing_the_following_properties_from_type_1_Colon_2: diag(2739, DiagnosticCategory.Error, "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739", "Type '{0}' is missing the following properties from type '{1}': {2}"), - Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more: diag(2740, DiagnosticCategory.Error, "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740", "Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."), - Property_0_is_missing_in_type_1_but_required_in_type_2: diag(2741, DiagnosticCategory.Error, "Property_0_is_missing_in_type_1_but_required_in_type_2_2741", "Property '{0}' is missing in type '{1}' but required in type '{2}'."), - The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary: diag(2742, DiagnosticCategory.Error, "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742", "The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."), - No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments: diag(2743, DiagnosticCategory.Error, "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743", "No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."), - Type_parameter_defaults_can_only_reference_previously_declared_type_parameters: diag(2744, DiagnosticCategory.Error, "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744", "Type parameter defaults can only reference previously declared type parameters."), - This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided: diag(2745, DiagnosticCategory.Error, "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745", "This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."), - This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided: diag(2746, DiagnosticCategory.Error, "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746", "This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."), - _0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2: diag(2747, DiagnosticCategory.Error, "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747", "'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."), - Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided: diag(2748, DiagnosticCategory.Error, "Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748", "Cannot access ambient const enums when the '--isolatedModules' flag is provided."), - _0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0: diag(2749, DiagnosticCategory.Error, "_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749", "'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"), - The_implementation_signature_is_declared_here: diag(2750, DiagnosticCategory.Error, "The_implementation_signature_is_declared_here_2750", "The implementation signature is declared here."), - Circularity_originates_in_type_at_this_location: diag(2751, DiagnosticCategory.Error, "Circularity_originates_in_type_at_this_location_2751", "Circularity originates in type at this location."), - The_first_export_default_is_here: diag(2752, DiagnosticCategory.Error, "The_first_export_default_is_here_2752", "The first export default is here."), - Another_export_default_is_here: diag(2753, DiagnosticCategory.Error, "Another_export_default_is_here_2753", "Another export default is here."), - super_may_not_use_type_arguments: diag(2754, DiagnosticCategory.Error, "super_may_not_use_type_arguments_2754", "'super' may not use type arguments."), - No_constituent_of_type_0_is_callable: diag(2755, DiagnosticCategory.Error, "No_constituent_of_type_0_is_callable_2755", "No constituent of type '{0}' is callable."), - Not_all_constituents_of_type_0_are_callable: diag(2756, DiagnosticCategory.Error, "Not_all_constituents_of_type_0_are_callable_2756", "Not all constituents of type '{0}' are callable."), - Type_0_has_no_call_signatures: diag(2757, DiagnosticCategory.Error, "Type_0_has_no_call_signatures_2757", "Type '{0}' has no call signatures."), - Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other: diag(2758, DiagnosticCategory.Error, "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758", "Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."), - No_constituent_of_type_0_is_constructable: diag(2759, DiagnosticCategory.Error, "No_constituent_of_type_0_is_constructable_2759", "No constituent of type '{0}' is constructable."), - Not_all_constituents_of_type_0_are_constructable: diag(2760, DiagnosticCategory.Error, "Not_all_constituents_of_type_0_are_constructable_2760", "Not all constituents of type '{0}' are constructable."), - Type_0_has_no_construct_signatures: diag(2761, DiagnosticCategory.Error, "Type_0_has_no_construct_signatures_2761", "Type '{0}' has no construct signatures."), - Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other: diag(2762, DiagnosticCategory.Error, "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762", "Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."), - Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0: diag(2763, DiagnosticCategory.Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."), - Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0: diag(2764, DiagnosticCategory.Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."), - Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0: diag(2765, DiagnosticCategory.Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."), - Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0: diag(2766, DiagnosticCategory.Error, "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766", "Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."), - The_0_property_of_an_iterator_must_be_a_method: diag(2767, DiagnosticCategory.Error, "The_0_property_of_an_iterator_must_be_a_method_2767", "The '{0}' property of an iterator must be a method."), - The_0_property_of_an_async_iterator_must_be_a_method: diag(2768, DiagnosticCategory.Error, "The_0_property_of_an_async_iterator_must_be_a_method_2768", "The '{0}' property of an async iterator must be a method."), - No_overload_matches_this_call: diag(2769, DiagnosticCategory.Error, "No_overload_matches_this_call_2769", "No overload matches this call."), - The_last_overload_gave_the_following_error: diag(2770, DiagnosticCategory.Error, "The_last_overload_gave_the_following_error_2770", "The last overload gave the following error."), - The_last_overload_is_declared_here: diag(2771, DiagnosticCategory.Error, "The_last_overload_is_declared_here_2771", "The last overload is declared here."), - Overload_0_of_1_2_gave_the_following_error: diag(2772, DiagnosticCategory.Error, "Overload_0_of_1_2_gave_the_following_error_2772", "Overload {0} of {1}, '{2}', gave the following error."), - Did_you_forget_to_use_await: diag(2773, DiagnosticCategory.Error, "Did_you_forget_to_use_await_2773", "Did you forget to use 'await'?"), - This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead: diag(2774, DiagnosticCategory.Error, "This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774", "This condition will always return true since this function is always defined. Did you mean to call it instead?"), - Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation: diag(2775, DiagnosticCategory.Error, "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775", "Assertions require every name in the call target to be declared with an explicit type annotation."), - Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name: diag(2776, DiagnosticCategory.Error, "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776", "Assertions require the call target to be an identifier or qualified name."), - The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access: diag(2777, DiagnosticCategory.Error, "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777", "The operand of an increment or decrement operator may not be an optional property access."), - The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access: diag(2778, DiagnosticCategory.Error, "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778", "The target of an object rest assignment may not be an optional property access."), - The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access: diag(2779, DiagnosticCategory.Error, "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779", "The left-hand side of an assignment expression may not be an optional property access."), - The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access: diag(2780, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780", "The left-hand side of a 'for...in' statement may not be an optional property access."), - The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access: diag(2781, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781", "The left-hand side of a 'for...of' statement may not be an optional property access."), - _0_needs_an_explicit_type_annotation: diag(2782, DiagnosticCategory.Message, "_0_needs_an_explicit_type_annotation_2782", "'{0}' needs an explicit type annotation."), - _0_is_specified_more_than_once_so_this_usage_will_be_overwritten: diag(2783, DiagnosticCategory.Error, "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783", "'{0}' is specified more than once, so this usage will be overwritten."), - get_and_set_accessors_cannot_declare_this_parameters: diag(2784, DiagnosticCategory.Error, "get_and_set_accessors_cannot_declare_this_parameters_2784", "'get' and 'set' accessors cannot declare 'this' parameters."), - This_spread_always_overwrites_this_property: diag(2785, DiagnosticCategory.Error, "This_spread_always_overwrites_this_property_2785", "This spread always overwrites this property."), - _0_cannot_be_used_as_a_JSX_component: diag(2786, DiagnosticCategory.Error, "_0_cannot_be_used_as_a_JSX_component_2786", "'{0}' cannot be used as a JSX component."), - Its_return_type_0_is_not_a_valid_JSX_element: diag(2787, DiagnosticCategory.Error, "Its_return_type_0_is_not_a_valid_JSX_element_2787", "Its return type '{0}' is not a valid JSX element."), - Its_instance_type_0_is_not_a_valid_JSX_element: diag(2788, DiagnosticCategory.Error, "Its_instance_type_0_is_not_a_valid_JSX_element_2788", "Its instance type '{0}' is not a valid JSX element."), - Its_element_type_0_is_not_a_valid_JSX_element: diag(2789, DiagnosticCategory.Error, "Its_element_type_0_is_not_a_valid_JSX_element_2789", "Its element type '{0}' is not a valid JSX element."), - The_operand_of_a_delete_operator_must_be_optional: diag(2790, DiagnosticCategory.Error, "The_operand_of_a_delete_operator_must_be_optional_2790", "The operand of a 'delete' operator must be optional."), - Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later: diag(2791, DiagnosticCategory.Error, "Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791", "Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later."), - Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_the_paths_option: diag(2792, DiagnosticCategory.Error, "Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_th_2792", "Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?"), - The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible: diag(2793, DiagnosticCategory.Error, "The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793", "The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."), - Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise: diag(2794, DiagnosticCategory.Error, "Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794", "Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?"), - The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types: diag(2795, DiagnosticCategory.Error, "The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795", "The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."), - It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked: diag(2796, DiagnosticCategory.Error, "It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796", "It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked."), - A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract: diag(2797, DiagnosticCategory.Error, "A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797", "A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."), - The_declaration_was_marked_as_deprecated_here: diag(2798, DiagnosticCategory.Error, "The_declaration_was_marked_as_deprecated_here_2798", "The declaration was marked as deprecated here."), - Type_produces_a_tuple_type_that_is_too_large_to_represent: diag(2799, DiagnosticCategory.Error, "Type_produces_a_tuple_type_that_is_too_large_to_represent_2799", "Type produces a tuple type that is too large to represent."), - Expression_produces_a_tuple_type_that_is_too_large_to_represent: diag(2800, DiagnosticCategory.Error, "Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800", "Expression produces a tuple type that is too large to represent."), - This_condition_will_always_return_true_since_this_0_is_always_defined: diag(2801, DiagnosticCategory.Error, "This_condition_will_always_return_true_since_this_0_is_always_defined_2801", "This condition will always return true since this '{0}' is always defined."), - Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher: diag(2802, DiagnosticCategory.Error, "Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802", "Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."), - Cannot_assign_to_private_method_0_Private_methods_are_not_writable: diag(2803, DiagnosticCategory.Error, "Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803", "Cannot assign to private method '{0}'. Private methods are not writable."), - Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name: diag(2804, DiagnosticCategory.Error, "Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804", "Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."), - Private_accessor_was_defined_without_a_getter: diag(2806, DiagnosticCategory.Error, "Private_accessor_was_defined_without_a_getter_2806", "Private accessor was defined without a getter."), - This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0: diag(2807, DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807", "This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."), - A_get_accessor_must_be_at_least_as_accessible_as_the_setter: diag(2808, DiagnosticCategory.Error, "A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808", "A get accessor must be at least as accessible as the setter"), - Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_the_whole_assignment_in_parentheses: diag(2809, DiagnosticCategory.Error, "Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809", "Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the the whole assignment in parentheses."), - Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments: diag(2810, DiagnosticCategory.Error, "Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810", "Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."), - Initializer_for_property_0: diag(2811, DiagnosticCategory.Error, "Initializer_for_property_0_2811", "Initializer for property '{0}'"), - Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: diag(2812, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."), - Class_declaration_cannot_implement_overload_list_for_0: diag(2813, DiagnosticCategory.Error, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."), - Function_with_bodies_can_only_merge_with_classes_that_are_ambient: diag(2814, DiagnosticCategory.Error, "Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814", "Function with bodies can only merge with classes that are ambient."), - arguments_cannot_be_referenced_in_property_initializers: diag(2815, DiagnosticCategory.Error, "arguments_cannot_be_referenced_in_property_initializers_2815", "'arguments' cannot be referenced in property initializers."), - Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class: diag(2816, DiagnosticCategory.Error, "Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816", "Cannot use 'this' in a static property initializer of a decorated class."), - Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block: diag(2817, DiagnosticCategory.Error, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817", "Property '{0}' has no initializer and is not definitely assigned in a class static block."), - Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers: diag(2818, DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818", "Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."), - Namespace_name_cannot_be_0: diag(2819, DiagnosticCategory.Error, "Namespace_name_cannot_be_0_2819", "Namespace name cannot be '{0}'."), - Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"), - Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2821, DiagnosticCategory.Error, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."), - Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, DiagnosticCategory.Error, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."), - Cannot_find_namespace_0_Did_you_mean_1: diag(2833, DiagnosticCategory.Error, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"), - Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."), - Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"), - Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, DiagnosticCategory.Error, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."), - Import_assertion_values_must_be_string_literal_expressions: diag(2837, DiagnosticCategory.Error, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."), - All_declarations_of_0_must_have_identical_constraints: diag(2838, DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."), - This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, DiagnosticCategory.Error, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."), - An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes: diag(2840, DiagnosticCategory.Error, "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840", "An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"), - The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(2841, DiagnosticCategory.Error, "The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_2841", "The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), - _0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: diag(2842, DiagnosticCategory.Error, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"), - We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, DiagnosticCategory.Error, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."), - Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2844, DiagnosticCategory.Error, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."), - This_condition_will_always_return_0: diag(2845, DiagnosticCategory.Error, "This_condition_will_always_return_0_2845", "This condition will always return '{0}'."), - Import_declaration_0_is_using_private_name_1: diag(4000, DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."), - Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."), - Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."), - Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4006, DiagnosticCategory.Error, "Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006", "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."), - Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4008, DiagnosticCategory.Error, "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008", "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."), - Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: diag(4010, DiagnosticCategory.Error, "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010", "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."), - Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: diag(4012, DiagnosticCategory.Error, "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012", "Type parameter '{0}' of public method from exported class has or is using private name '{1}'."), - Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: diag(4014, DiagnosticCategory.Error, "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014", "Type parameter '{0}' of method from exported interface has or is using private name '{1}'."), - Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: diag(4016, DiagnosticCategory.Error, "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016", "Type parameter '{0}' of exported function has or is using private name '{1}'."), - Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: diag(4019, DiagnosticCategory.Error, "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019", "Implements clause of exported class '{0}' has or is using private name '{1}'."), - extends_clause_of_exported_class_0_has_or_is_using_private_name_1: diag(4020, DiagnosticCategory.Error, "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", "'extends' clause of exported class '{0}' has or is using private name '{1}'."), - extends_clause_of_exported_class_has_or_is_using_private_name_0: diag(4021, DiagnosticCategory.Error, "extends_clause_of_exported_class_has_or_is_using_private_name_0_4021", "'extends' clause of exported class has or is using private name '{0}'."), - extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: diag(4022, DiagnosticCategory.Error, "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", "'extends' clause of exported interface '{0}' has or is using private name '{1}'."), - Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4023, DiagnosticCategory.Error, "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023", "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."), - Exported_variable_0_has_or_is_using_name_1_from_private_module_2: diag(4024, DiagnosticCategory.Error, "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024", "Exported variable '{0}' has or is using name '{1}' from private module '{2}'."), - Exported_variable_0_has_or_is_using_private_name_1: diag(4025, DiagnosticCategory.Error, "Exported_variable_0_has_or_is_using_private_name_1_4025", "Exported variable '{0}' has or is using private name '{1}'."), - Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4026, DiagnosticCategory.Error, "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026", "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), - Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4027, DiagnosticCategory.Error, "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027", "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."), - Public_static_property_0_of_exported_class_has_or_is_using_private_name_1: diag(4028, DiagnosticCategory.Error, "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028", "Public static property '{0}' of exported class has or is using private name '{1}'."), - Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4029, DiagnosticCategory.Error, "Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029", "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), - Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4030, DiagnosticCategory.Error, "Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030", "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."), - Public_property_0_of_exported_class_has_or_is_using_private_name_1: diag(4031, DiagnosticCategory.Error, "Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031", "Public property '{0}' of exported class has or is using private name '{1}'."), - Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4032, DiagnosticCategory.Error, "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032", "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."), - Property_0_of_exported_interface_has_or_is_using_private_name_1: diag(4033, DiagnosticCategory.Error, "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033", "Property '{0}' of exported interface has or is using private name '{1}'."), - Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4034, DiagnosticCategory.Error, "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034", "Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), - Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1: diag(4035, DiagnosticCategory.Error, "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035", "Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."), - Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4036, DiagnosticCategory.Error, "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036", "Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), - Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1: diag(4037, DiagnosticCategory.Error, "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037", "Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."), - Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4038, DiagnosticCategory.Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038", "Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."), - Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4039, DiagnosticCategory.Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039", "Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), - Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1: diag(4040, DiagnosticCategory.Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040", "Return type of public static getter '{0}' from exported class has or is using private name '{1}'."), - Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4041, DiagnosticCategory.Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041", "Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."), - Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4042, DiagnosticCategory.Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042", "Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), - Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1: diag(4043, DiagnosticCategory.Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043", "Return type of public getter '{0}' from exported class has or is using private name '{1}'."), - Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4044, DiagnosticCategory.Error, "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044", "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."), - Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0: diag(4045, DiagnosticCategory.Error, "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045", "Return type of constructor signature from exported interface has or is using private name '{0}'."), - Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4046, DiagnosticCategory.Error, "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046", "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."), - Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0: diag(4047, DiagnosticCategory.Error, "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047", "Return type of call signature from exported interface has or is using private name '{0}'."), - Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4048, DiagnosticCategory.Error, "Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048", "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."), - Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0: diag(4049, DiagnosticCategory.Error, "Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049", "Return type of index signature from exported interface has or is using private name '{0}'."), - Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: diag(4050, DiagnosticCategory.Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050", "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."), - Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: diag(4051, DiagnosticCategory.Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051", "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."), - Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0: diag(4052, DiagnosticCategory.Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052", "Return type of public static method from exported class has or is using private name '{0}'."), - Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: diag(4053, DiagnosticCategory.Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053", "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."), - Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: diag(4054, DiagnosticCategory.Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054", "Return type of public method from exported class has or is using name '{0}' from private module '{1}'."), - Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0: diag(4055, DiagnosticCategory.Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055", "Return type of public method from exported class has or is using private name '{0}'."), - Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4056, DiagnosticCategory.Error, "Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056", "Return type of method from exported interface has or is using name '{0}' from private module '{1}'."), - Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0: diag(4057, DiagnosticCategory.Error, "Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057", "Return type of method from exported interface has or is using private name '{0}'."), - Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: diag(4058, DiagnosticCategory.Error, "Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058", "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."), - Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: diag(4059, DiagnosticCategory.Error, "Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059", "Return type of exported function has or is using name '{0}' from private module '{1}'."), - Return_type_of_exported_function_has_or_is_using_private_name_0: diag(4060, DiagnosticCategory.Error, "Return_type_of_exported_function_has_or_is_using_private_name_0_4060", "Return type of exported function has or is using private name '{0}'."), - Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4061, DiagnosticCategory.Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061", "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."), - Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4062, DiagnosticCategory.Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062", "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."), - Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1: diag(4063, DiagnosticCategory.Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063", "Parameter '{0}' of constructor from exported class has or is using private name '{1}'."), - Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4064, DiagnosticCategory.Error, "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064", "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."), - Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4065, DiagnosticCategory.Error, "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065", "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."), - Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4066, DiagnosticCategory.Error, "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066", "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."), - Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4067, DiagnosticCategory.Error, "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067", "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."), - Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4068, DiagnosticCategory.Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068", "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."), - Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4069, DiagnosticCategory.Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069", "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."), - Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: diag(4070, DiagnosticCategory.Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070", "Parameter '{0}' of public static method from exported class has or is using private name '{1}'."), - Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4071, DiagnosticCategory.Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071", "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."), - Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4072, DiagnosticCategory.Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072", "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."), - Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: diag(4073, DiagnosticCategory.Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073", "Parameter '{0}' of public method from exported class has or is using private name '{1}'."), - Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4074, DiagnosticCategory.Error, "Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074", "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."), - Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: diag(4075, DiagnosticCategory.Error, "Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075", "Parameter '{0}' of method from exported interface has or is using private name '{1}'."), - Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4076, DiagnosticCategory.Error, "Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076", "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."), - Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: diag(4077, DiagnosticCategory.Error, "Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077", "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."), - Parameter_0_of_exported_function_has_or_is_using_private_name_1: diag(4078, DiagnosticCategory.Error, "Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078", "Parameter '{0}' of exported function has or is using private name '{1}'."), - Exported_type_alias_0_has_or_is_using_private_name_1: diag(4081, DiagnosticCategory.Error, "Exported_type_alias_0_has_or_is_using_private_name_1_4081", "Exported type alias '{0}' has or is using private name '{1}'."), - Default_export_of_the_module_has_or_is_using_private_name_0: diag(4082, DiagnosticCategory.Error, "Default_export_of_the_module_has_or_is_using_private_name_0_4082", "Default export of the module has or is using private name '{0}'."), - Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1: diag(4083, DiagnosticCategory.Error, "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083", "Type parameter '{0}' of exported type alias has or is using private name '{1}'."), - Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2: diag(4084, DiagnosticCategory.Error, "Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084", "Exported type alias '{0}' has or is using private name '{1}' from module {2}."), - Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict: diag(4090, DiagnosticCategory.Error, "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090", "Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict."), - Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4091, DiagnosticCategory.Error, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091", "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."), - Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4092, DiagnosticCategory.Error, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092", "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."), - Property_0_of_exported_class_expression_may_not_be_private_or_protected: diag(4094, DiagnosticCategory.Error, "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094", "Property '{0}' of exported class expression may not be private or protected."), - Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4095, DiagnosticCategory.Error, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095", "Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), - Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4096, DiagnosticCategory.Error, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096", "Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."), - Public_static_method_0_of_exported_class_has_or_is_using_private_name_1: diag(4097, DiagnosticCategory.Error, "Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097", "Public static method '{0}' of exported class has or is using private name '{1}'."), - Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4098, DiagnosticCategory.Error, "Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098", "Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), - Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4099, DiagnosticCategory.Error, "Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099", "Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."), - Public_method_0_of_exported_class_has_or_is_using_private_name_1: diag(4100, DiagnosticCategory.Error, "Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100", "Public method '{0}' of exported class has or is using private name '{1}'."), - Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4101, DiagnosticCategory.Error, "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101", "Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."), - Method_0_of_exported_interface_has_or_is_using_private_name_1: diag(4102, DiagnosticCategory.Error, "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102", "Method '{0}' of exported interface has or is using private name '{1}'."), - Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1: diag(4103, DiagnosticCategory.Error, "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103", "Type parameter '{0}' of exported mapped object type is using private name '{1}'."), - The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1: diag(4104, DiagnosticCategory.Error, "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104", "The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."), - Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter: diag(4105, DiagnosticCategory.Error, "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105", "Private or protected member '{0}' cannot be accessed on a type parameter."), - Parameter_0_of_accessor_has_or_is_using_private_name_1: diag(4106, DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106", "Parameter '{0}' of accessor has or is using private name '{1}'."), - Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2: diag(4107, DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107", "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."), - Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4108, DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108", "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."), - Type_arguments_for_0_circularly_reference_themselves: diag(4109, DiagnosticCategory.Error, "Type_arguments_for_0_circularly_reference_themselves_4109", "Type arguments for '{0}' circularly reference themselves."), - Tuple_type_arguments_circularly_reference_themselves: diag(4110, DiagnosticCategory.Error, "Tuple_type_arguments_circularly_reference_themselves_4110", "Tuple type arguments circularly reference themselves."), - Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0: diag(4111, DiagnosticCategory.Error, "Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111", "Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."), - This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class: diag(4112, DiagnosticCategory.Error, "This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112", "This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."), - This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0: diag(4113, DiagnosticCategory.Error, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."), - This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0: diag(4114, DiagnosticCategory.Error, "This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114", "This member must have an 'override' modifier because it overrides a member in the base class '{0}'."), - This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0: diag(4115, DiagnosticCategory.Error, "This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115", "This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."), - This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0: diag(4116, DiagnosticCategory.Error, "This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116", "This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."), - This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4117, DiagnosticCategory.Error, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"), - The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized: diag(4118, DiagnosticCategory.Error, "The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118", "The type of this node cannot be serialized because its property '{0}' cannot be serialized."), - This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: diag(4119, DiagnosticCategory.Error, "This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119", "This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."), - This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: diag(4120, DiagnosticCategory.Error, "This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120", "This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."), - This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class: diag(4121, DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121", "This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."), - This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."), - This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"), - Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, DiagnosticCategory.Error, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), - resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4125, DiagnosticCategory.Error, "resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125", "'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), - The_current_host_does_not_support_the_0_option: diag(5001, DiagnosticCategory.Error, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."), - Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, DiagnosticCategory.Error, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."), - File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, DiagnosticCategory.Error, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."), - Cannot_read_file_0_Colon_1: diag(5012, DiagnosticCategory.Error, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."), - Failed_to_parse_file_0_Colon_1: diag(5014, DiagnosticCategory.Error, "Failed_to_parse_file_0_Colon_1_5014", "Failed to parse file '{0}': {1}."), - Unknown_compiler_option_0: diag(5023, DiagnosticCategory.Error, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."), - Compiler_option_0_requires_a_value_of_type_1: diag(5024, DiagnosticCategory.Error, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."), - Unknown_compiler_option_0_Did_you_mean_1: diag(5025, DiagnosticCategory.Error, "Unknown_compiler_option_0_Did_you_mean_1_5025", "Unknown compiler option '{0}'. Did you mean '{1}'?"), - Could_not_write_file_0_Colon_1: diag(5033, DiagnosticCategory.Error, "Could_not_write_file_0_Colon_1_5033", "Could not write file '{0}': {1}."), - Option_project_cannot_be_mixed_with_source_files_on_a_command_line: diag(5042, DiagnosticCategory.Error, "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", "Option 'project' cannot be mixed with source files on a command line."), - Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: diag(5047, DiagnosticCategory.Error, "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."), - Option_0_cannot_be_specified_when_option_target_is_ES3: diag(5048, DiagnosticCategory.Error, "Option_0_cannot_be_specified_when_option_target_is_ES3_5048", "Option '{0}' cannot be specified when option 'target' is 'ES3'."), - Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: diag(5051, DiagnosticCategory.Error, "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051", "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."), - Option_0_cannot_be_specified_without_specifying_option_1: diag(5052, DiagnosticCategory.Error, "Option_0_cannot_be_specified_without_specifying_option_1_5052", "Option '{0}' cannot be specified without specifying option '{1}'."), - Option_0_cannot_be_specified_with_option_1: diag(5053, DiagnosticCategory.Error, "Option_0_cannot_be_specified_with_option_1_5053", "Option '{0}' cannot be specified with option '{1}'."), - A_tsconfig_json_file_is_already_defined_at_Colon_0: diag(5054, DiagnosticCategory.Error, "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054", "A 'tsconfig.json' file is already defined at: '{0}'."), - Cannot_write_file_0_because_it_would_overwrite_input_file: diag(5055, DiagnosticCategory.Error, "Cannot_write_file_0_because_it_would_overwrite_input_file_5055", "Cannot write file '{0}' because it would overwrite input file."), - Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files: diag(5056, DiagnosticCategory.Error, "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056", "Cannot write file '{0}' because it would be overwritten by multiple input files."), - Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: diag(5057, DiagnosticCategory.Error, "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", "Cannot find a tsconfig.json file at the specified directory: '{0}'."), - The_specified_path_does_not_exist_Colon_0: diag(5058, DiagnosticCategory.Error, "The_specified_path_does_not_exist_Colon_0_5058", "The specified path does not exist: '{0}'."), - Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier: diag(5059, DiagnosticCategory.Error, "Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059", "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."), - Pattern_0_can_have_at_most_one_Asterisk_character: diag(5061, DiagnosticCategory.Error, "Pattern_0_can_have_at_most_one_Asterisk_character_5061", "Pattern '{0}' can have at most one '*' character."), - Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character: diag(5062, DiagnosticCategory.Error, "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062", "Substitution '{0}' in pattern '{1}' can have at most one '*' character."), - Substitutions_for_pattern_0_should_be_an_array: diag(5063, DiagnosticCategory.Error, "Substitutions_for_pattern_0_should_be_an_array_5063", "Substitutions for pattern '{0}' should be an array."), - Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2: diag(5064, DiagnosticCategory.Error, "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064", "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."), - File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5065, DiagnosticCategory.Error, "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065", "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."), - Substitutions_for_pattern_0_shouldn_t_be_an_empty_array: diag(5066, DiagnosticCategory.Error, "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066", "Substitutions for pattern '{0}' shouldn't be an empty array."), - Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name: diag(5067, DiagnosticCategory.Error, "Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067", "Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."), - Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: diag(5068, DiagnosticCategory.Error, "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068", "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."), - Option_0_cannot_be_specified_without_specifying_option_1_or_option_2: diag(5069, DiagnosticCategory.Error, "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069", "Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."), - Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy: diag(5070, DiagnosticCategory.Error, "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070", "Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy."), - Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext: diag(5071, DiagnosticCategory.Error, "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071", "Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'."), - Unknown_build_option_0: diag(5072, DiagnosticCategory.Error, "Unknown_build_option_0_5072", "Unknown build option '{0}'."), - Build_option_0_requires_a_value_of_type_1: diag(5073, DiagnosticCategory.Error, "Build_option_0_requires_a_value_of_type_1_5073", "Build option '{0}' requires a value of type {1}."), - Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified: diag(5074, DiagnosticCategory.Error, "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074", "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified."), - _0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2: diag(5075, DiagnosticCategory.Error, "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075", "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."), - _0_and_1_operations_cannot_be_mixed_without_parentheses: diag(5076, DiagnosticCategory.Error, "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076", "'{0}' and '{1}' operations cannot be mixed without parentheses."), - Unknown_build_option_0_Did_you_mean_1: diag(5077, DiagnosticCategory.Error, "Unknown_build_option_0_Did_you_mean_1_5077", "Unknown build option '{0}'. Did you mean '{1}'?"), - Unknown_watch_option_0: diag(5078, DiagnosticCategory.Error, "Unknown_watch_option_0_5078", "Unknown watch option '{0}'."), - Unknown_watch_option_0_Did_you_mean_1: diag(5079, DiagnosticCategory.Error, "Unknown_watch_option_0_Did_you_mean_1_5079", "Unknown watch option '{0}'. Did you mean '{1}'?"), - Watch_option_0_requires_a_value_of_type_1: diag(5080, DiagnosticCategory.Error, "Watch_option_0_requires_a_value_of_type_1_5080", "Watch option '{0}' requires a value of type {1}."), - Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0: diag(5081, DiagnosticCategory.Error, "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081", "Cannot find a tsconfig.json file at the current directory: {0}."), - _0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1: diag(5082, DiagnosticCategory.Error, "_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082", "'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."), - Cannot_read_file_0: diag(5083, DiagnosticCategory.Error, "Cannot_read_file_0_5083", "Cannot read file '{0}'."), - Tuple_members_must_all_have_names_or_all_not_have_names: diag(5084, DiagnosticCategory.Error, "Tuple_members_must_all_have_names_or_all_not_have_names_5084", "Tuple members must all have names or all not have names."), - A_tuple_member_cannot_be_both_optional_and_rest: diag(5085, DiagnosticCategory.Error, "A_tuple_member_cannot_be_both_optional_and_rest_5085", "A tuple member cannot be both optional and rest."), - A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type: diag(5086, DiagnosticCategory.Error, "A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086", "A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."), - A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type: diag(5087, DiagnosticCategory.Error, "A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087", "A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."), - The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary: diag(5088, DiagnosticCategory.Error, "The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088", "The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary."), - Option_0_cannot_be_specified_when_option_jsx_is_1: diag(5089, DiagnosticCategory.Error, "Option_0_cannot_be_specified_when_option_jsx_is_1_5089", "Option '{0}' cannot be specified when option 'jsx' is '{1}'."), - Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash: diag(5090, DiagnosticCategory.Error, "Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090", "Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"), - Option_preserveConstEnums_cannot_be_disabled_when_isolatedModules_is_enabled: diag(5091, DiagnosticCategory.Error, "Option_preserveConstEnums_cannot_be_disabled_when_isolatedModules_is_enabled_5091", "Option 'preserveConstEnums' cannot be disabled when 'isolatedModules' is enabled."), - The_root_value_of_a_0_file_must_be_an_object: diag(5092, DiagnosticCategory.Error, "The_root_value_of_a_0_file_must_be_an_object_5092", "The root value of a '{0}' file must be an object."), - Compiler_option_0_may_only_be_used_with_build: diag(5093, DiagnosticCategory.Error, "Compiler_option_0_may_only_be_used_with_build_5093", "Compiler option '--{0}' may only be used with '--build'."), - Compiler_option_0_may_not_be_used_with_build: diag(5094, DiagnosticCategory.Error, "Compiler_option_0_may_not_be_used_with_build_5094", "Compiler option '--{0}' may not be used with '--build'."), - Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later: diag(5095, DiagnosticCategory.Error, "Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later_5095", "Option 'preserveValueImports' can only be used when 'module' is set to 'es2015' or later."), - Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6000, DiagnosticCategory.Message, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), - Concatenate_and_emit_output_to_single_file: diag(6001, DiagnosticCategory.Message, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), - Generates_corresponding_d_ts_file: diag(6002, DiagnosticCategory.Message, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), - Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: diag(6004, DiagnosticCategory.Message, "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004", "Specify the location where debugger should locate TypeScript files instead of source locations."), - Watch_input_files: diag(6005, DiagnosticCategory.Message, "Watch_input_files_6005", "Watch input files."), - Redirect_output_structure_to_the_directory: diag(6006, DiagnosticCategory.Message, "Redirect_output_structure_to_the_directory_6006", "Redirect output structure to the directory."), - Do_not_erase_const_enum_declarations_in_generated_code: diag(6007, DiagnosticCategory.Message, "Do_not_erase_const_enum_declarations_in_generated_code_6007", "Do not erase const enum declarations in generated code."), - Do_not_emit_outputs_if_any_errors_were_reported: diag(6008, DiagnosticCategory.Message, "Do_not_emit_outputs_if_any_errors_were_reported_6008", "Do not emit outputs if any errors were reported."), - Do_not_emit_comments_to_output: diag(6009, DiagnosticCategory.Message, "Do_not_emit_comments_to_output_6009", "Do not emit comments to output."), - Do_not_emit_outputs: diag(6010, DiagnosticCategory.Message, "Do_not_emit_outputs_6010", "Do not emit outputs."), - Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking: diag(6011, DiagnosticCategory.Message, "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011", "Allow default imports from modules with no default export. This does not affect code emit, just typechecking."), - Skip_type_checking_of_declaration_files: diag(6012, DiagnosticCategory.Message, "Skip_type_checking_of_declaration_files_6012", "Skip type checking of declaration files."), - Do_not_resolve_the_real_path_of_symlinks: diag(6013, DiagnosticCategory.Message, "Do_not_resolve_the_real_path_of_symlinks_6013", "Do not resolve the real path of symlinks."), - Only_emit_d_ts_declaration_files: diag(6014, DiagnosticCategory.Message, "Only_emit_d_ts_declaration_files_6014", "Only emit '.d.ts' declaration files."), - Specify_ECMAScript_target_version: diag(6015, DiagnosticCategory.Message, "Specify_ECMAScript_target_version_6015", "Specify ECMAScript target version."), - Specify_module_code_generation: diag(6016, DiagnosticCategory.Message, "Specify_module_code_generation_6016", "Specify module code generation."), - Print_this_message: diag(6017, DiagnosticCategory.Message, "Print_this_message_6017", "Print this message."), - Print_the_compiler_s_version: diag(6019, DiagnosticCategory.Message, "Print_the_compiler_s_version_6019", "Print the compiler's version."), - Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json: diag(6020, DiagnosticCategory.Message, "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020", "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."), - Syntax_Colon_0: diag(6023, DiagnosticCategory.Message, "Syntax_Colon_0_6023", "Syntax: {0}"), - options: diag(6024, DiagnosticCategory.Message, "options_6024", "options"), - file: diag(6025, DiagnosticCategory.Message, "file_6025", "file"), - Examples_Colon_0: diag(6026, DiagnosticCategory.Message, "Examples_Colon_0_6026", "Examples: {0}"), - Options_Colon: diag(6027, DiagnosticCategory.Message, "Options_Colon_6027", "Options:"), - Version_0: diag(6029, DiagnosticCategory.Message, "Version_0_6029", "Version {0}"), - Insert_command_line_options_and_files_from_a_file: diag(6030, DiagnosticCategory.Message, "Insert_command_line_options_and_files_from_a_file_6030", "Insert command line options and files from a file."), - Starting_compilation_in_watch_mode: diag(6031, DiagnosticCategory.Message, "Starting_compilation_in_watch_mode_6031", "Starting compilation in watch mode..."), - File_change_detected_Starting_incremental_compilation: diag(6032, DiagnosticCategory.Message, "File_change_detected_Starting_incremental_compilation_6032", "File change detected. Starting incremental compilation..."), - KIND: diag(6034, DiagnosticCategory.Message, "KIND_6034", "KIND"), - FILE: diag(6035, DiagnosticCategory.Message, "FILE_6035", "FILE"), - VERSION: diag(6036, DiagnosticCategory.Message, "VERSION_6036", "VERSION"), - LOCATION: diag(6037, DiagnosticCategory.Message, "LOCATION_6037", "LOCATION"), - DIRECTORY: diag(6038, DiagnosticCategory.Message, "DIRECTORY_6038", "DIRECTORY"), - STRATEGY: diag(6039, DiagnosticCategory.Message, "STRATEGY_6039", "STRATEGY"), - FILE_OR_DIRECTORY: diag(6040, DiagnosticCategory.Message, "FILE_OR_DIRECTORY_6040", "FILE OR DIRECTORY"), - Errors_Files: diag(6041, DiagnosticCategory.Message, "Errors_Files_6041", "Errors Files"), - Generates_corresponding_map_file: diag(6043, DiagnosticCategory.Message, "Generates_corresponding_map_file_6043", "Generates corresponding '.map' file."), - Compiler_option_0_expects_an_argument: diag(6044, DiagnosticCategory.Error, "Compiler_option_0_expects_an_argument_6044", "Compiler option '{0}' expects an argument."), - Unterminated_quoted_string_in_response_file_0: diag(6045, DiagnosticCategory.Error, "Unterminated_quoted_string_in_response_file_0_6045", "Unterminated quoted string in response file '{0}'."), - Argument_for_0_option_must_be_Colon_1: diag(6046, DiagnosticCategory.Error, "Argument_for_0_option_must_be_Colon_1_6046", "Argument for '{0}' option must be: {1}."), - Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: diag(6048, DiagnosticCategory.Error, "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048", "Locale must be of the form or -. For example '{0}' or '{1}'."), - Unable_to_open_file_0: diag(6050, DiagnosticCategory.Error, "Unable_to_open_file_0_6050", "Unable to open file '{0}'."), - Corrupted_locale_file_0: diag(6051, DiagnosticCategory.Error, "Corrupted_locale_file_0_6051", "Corrupted locale file {0}."), - Raise_error_on_expressions_and_declarations_with_an_implied_any_type: diag(6052, DiagnosticCategory.Message, "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052", "Raise error on expressions and declarations with an implied 'any' type."), - File_0_not_found: diag(6053, DiagnosticCategory.Error, "File_0_not_found_6053", "File '{0}' not found."), - File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1: diag(6054, DiagnosticCategory.Error, "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has an unsupported extension. The only supported extensions are {1}."), - Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: diag(6055, DiagnosticCategory.Message, "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055", "Suppress noImplicitAny errors for indexing objects lacking index signatures."), - Do_not_emit_declarations_for_code_that_has_an_internal_annotation: diag(6056, DiagnosticCategory.Message, "Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056", "Do not emit declarations for code that has an '@internal' annotation."), - Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: diag(6058, DiagnosticCategory.Message, "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058", "Specify the root directory of input files. Use to control the output directory structure with --outDir."), - File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: diag(6059, DiagnosticCategory.Error, "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059", "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."), - Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: diag(6060, DiagnosticCategory.Message, "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060", "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."), - NEWLINE: diag(6061, DiagnosticCategory.Message, "NEWLINE_6061", "NEWLINE"), - Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line: diag(6064, DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."), - Enables_experimental_support_for_ES7_decorators: diag(6065, DiagnosticCategory.Message, "Enables_experimental_support_for_ES7_decorators_6065", "Enables experimental support for ES7 decorators."), - Enables_experimental_support_for_emitting_type_metadata_for_decorators: diag(6066, DiagnosticCategory.Message, "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", "Enables experimental support for emitting type metadata for decorators."), - Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6: diag(6069, DiagnosticCategory.Message, "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069", "Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6)."), - Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: diag(6070, DiagnosticCategory.Message, "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", "Initializes a TypeScript project and creates a tsconfig.json file."), - Successfully_created_a_tsconfig_json_file: diag(6071, DiagnosticCategory.Message, "Successfully_created_a_tsconfig_json_file_6071", "Successfully created a tsconfig.json file."), - Suppress_excess_property_checks_for_object_literals: diag(6072, DiagnosticCategory.Message, "Suppress_excess_property_checks_for_object_literals_6072", "Suppress excess property checks for object literals."), - Stylize_errors_and_messages_using_color_and_context_experimental: diag(6073, DiagnosticCategory.Message, "Stylize_errors_and_messages_using_color_and_context_experimental_6073", "Stylize errors and messages using color and context (experimental)."), - Do_not_report_errors_on_unused_labels: diag(6074, DiagnosticCategory.Message, "Do_not_report_errors_on_unused_labels_6074", "Do not report errors on unused labels."), - Report_error_when_not_all_code_paths_in_function_return_a_value: diag(6075, DiagnosticCategory.Message, "Report_error_when_not_all_code_paths_in_function_return_a_value_6075", "Report error when not all code paths in function return a value."), - Report_errors_for_fallthrough_cases_in_switch_statement: diag(6076, DiagnosticCategory.Message, "Report_errors_for_fallthrough_cases_in_switch_statement_6076", "Report errors for fallthrough cases in switch statement."), - Do_not_report_errors_on_unreachable_code: diag(6077, DiagnosticCategory.Message, "Do_not_report_errors_on_unreachable_code_6077", "Do not report errors on unreachable code."), - Disallow_inconsistently_cased_references_to_the_same_file: diag(6078, DiagnosticCategory.Message, "Disallow_inconsistently_cased_references_to_the_same_file_6078", "Disallow inconsistently-cased references to the same file."), - Specify_library_files_to_be_included_in_the_compilation: diag(6079, DiagnosticCategory.Message, "Specify_library_files_to_be_included_in_the_compilation_6079", "Specify library files to be included in the compilation."), - Specify_JSX_code_generation: diag(6080, DiagnosticCategory.Message, "Specify_JSX_code_generation_6080", "Specify JSX code generation."), - File_0_has_an_unsupported_extension_so_skipping_it: diag(6081, DiagnosticCategory.Message, "File_0_has_an_unsupported_extension_so_skipping_it_6081", "File '{0}' has an unsupported extension, so skipping it."), - Only_amd_and_system_modules_are_supported_alongside_0: diag(6082, DiagnosticCategory.Error, "Only_amd_and_system_modules_are_supported_alongside_0_6082", "Only 'amd' and 'system' modules are supported alongside --{0}."), - Base_directory_to_resolve_non_absolute_module_names: diag(6083, DiagnosticCategory.Message, "Base_directory_to_resolve_non_absolute_module_names_6083", "Base directory to resolve non-absolute module names."), - Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: diag(6084, DiagnosticCategory.Message, "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"), - Enable_tracing_of_the_name_resolution_process: diag(6085, DiagnosticCategory.Message, "Enable_tracing_of_the_name_resolution_process_6085", "Enable tracing of the name resolution process."), - Resolving_module_0_from_1: diag(6086, DiagnosticCategory.Message, "Resolving_module_0_from_1_6086", "======== Resolving module '{0}' from '{1}'. ========"), - Explicitly_specified_module_resolution_kind_Colon_0: diag(6087, DiagnosticCategory.Message, "Explicitly_specified_module_resolution_kind_Colon_0_6087", "Explicitly specified module resolution kind: '{0}'."), - Module_resolution_kind_is_not_specified_using_0: diag(6088, DiagnosticCategory.Message, "Module_resolution_kind_is_not_specified_using_0_6088", "Module resolution kind is not specified, using '{0}'."), - Module_name_0_was_successfully_resolved_to_1: diag(6089, DiagnosticCategory.Message, "Module_name_0_was_successfully_resolved_to_1_6089", "======== Module name '{0}' was successfully resolved to '{1}'. ========"), - Module_name_0_was_not_resolved: diag(6090, DiagnosticCategory.Message, "Module_name_0_was_not_resolved_6090", "======== Module name '{0}' was not resolved. ========"), - paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0: diag(6091, DiagnosticCategory.Message, "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091", "'paths' option is specified, looking for a pattern to match module name '{0}'."), - Module_name_0_matched_pattern_1: diag(6092, DiagnosticCategory.Message, "Module_name_0_matched_pattern_1_6092", "Module name '{0}', matched pattern '{1}'."), - Trying_substitution_0_candidate_module_location_Colon_1: diag(6093, DiagnosticCategory.Message, "Trying_substitution_0_candidate_module_location_Colon_1_6093", "Trying substitution '{0}', candidate module location: '{1}'."), - Resolving_module_name_0_relative_to_base_url_1_2: diag(6094, DiagnosticCategory.Message, "Resolving_module_name_0_relative_to_base_url_1_2_6094", "Resolving module name '{0}' relative to base url '{1}' - '{2}'."), - Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1: diag(6095, DiagnosticCategory.Message, "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095", "Loading module as file / folder, candidate module location '{0}', target file types: {1}."), - File_0_does_not_exist: diag(6096, DiagnosticCategory.Message, "File_0_does_not_exist_6096", "File '{0}' does not exist."), - File_0_exist_use_it_as_a_name_resolution_result: diag(6097, DiagnosticCategory.Message, "File_0_exist_use_it_as_a_name_resolution_result_6097", "File '{0}' exist - use it as a name resolution result."), - Loading_module_0_from_node_modules_folder_target_file_types_Colon_1: diag(6098, DiagnosticCategory.Message, "Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098", "Loading module '{0}' from 'node_modules' folder, target file types: {1}."), - Found_package_json_at_0: diag(6099, DiagnosticCategory.Message, "Found_package_json_at_0_6099", "Found 'package.json' at '{0}'."), - package_json_does_not_have_a_0_field: diag(6100, DiagnosticCategory.Message, "package_json_does_not_have_a_0_field_6100", "'package.json' does not have a '{0}' field."), - package_json_has_0_field_1_that_references_2: diag(6101, DiagnosticCategory.Message, "package_json_has_0_field_1_that_references_2_6101", "'package.json' has '{0}' field '{1}' that references '{2}'."), - Allow_javascript_files_to_be_compiled: diag(6102, DiagnosticCategory.Message, "Allow_javascript_files_to_be_compiled_6102", "Allow javascript files to be compiled."), - Checking_if_0_is_the_longest_matching_prefix_for_1_2: diag(6104, DiagnosticCategory.Message, "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104", "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."), - Expected_type_of_0_field_in_package_json_to_be_1_got_2: diag(6105, DiagnosticCategory.Message, "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105", "Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."), - baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: diag(6106, DiagnosticCategory.Message, "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."), - rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: diag(6107, DiagnosticCategory.Message, "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", "'rootDirs' option is set, using it to resolve relative module name '{0}'."), - Longest_matching_prefix_for_0_is_1: diag(6108, DiagnosticCategory.Message, "Longest_matching_prefix_for_0_is_1_6108", "Longest matching prefix for '{0}' is '{1}'."), - Loading_0_from_the_root_dir_1_candidate_location_2: diag(6109, DiagnosticCategory.Message, "Loading_0_from_the_root_dir_1_candidate_location_2_6109", "Loading '{0}' from the root dir '{1}', candidate location '{2}'."), - Trying_other_entries_in_rootDirs: diag(6110, DiagnosticCategory.Message, "Trying_other_entries_in_rootDirs_6110", "Trying other entries in 'rootDirs'."), - Module_resolution_using_rootDirs_has_failed: diag(6111, DiagnosticCategory.Message, "Module_resolution_using_rootDirs_has_failed_6111", "Module resolution using 'rootDirs' has failed."), - Do_not_emit_use_strict_directives_in_module_output: diag(6112, DiagnosticCategory.Message, "Do_not_emit_use_strict_directives_in_module_output_6112", "Do not emit 'use strict' directives in module output."), - Enable_strict_null_checks: diag(6113, DiagnosticCategory.Message, "Enable_strict_null_checks_6113", "Enable strict null checks."), - Unknown_option_excludes_Did_you_mean_exclude: diag(6114, DiagnosticCategory.Error, "Unknown_option_excludes_Did_you_mean_exclude_6114", "Unknown option 'excludes'. Did you mean 'exclude'?"), - Raise_error_on_this_expressions_with_an_implied_any_type: diag(6115, DiagnosticCategory.Message, "Raise_error_on_this_expressions_with_an_implied_any_type_6115", "Raise error on 'this' expressions with an implied 'any' type."), - Resolving_type_reference_directive_0_containing_file_1_root_directory_2: diag(6116, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116", "======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"), - Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2: diag(6119, DiagnosticCategory.Message, "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119", "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"), - Type_reference_directive_0_was_not_resolved: diag(6120, DiagnosticCategory.Message, "Type_reference_directive_0_was_not_resolved_6120", "======== Type reference directive '{0}' was not resolved. ========"), - Resolving_with_primary_search_path_0: diag(6121, DiagnosticCategory.Message, "Resolving_with_primary_search_path_0_6121", "Resolving with primary search path '{0}'."), - Root_directory_cannot_be_determined_skipping_primary_search_paths: diag(6122, DiagnosticCategory.Message, "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122", "Root directory cannot be determined, skipping primary search paths."), - Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set: diag(6123, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123", "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"), - Type_declaration_files_to_be_included_in_compilation: diag(6124, DiagnosticCategory.Message, "Type_declaration_files_to_be_included_in_compilation_6124", "Type declaration files to be included in compilation."), - Looking_up_in_node_modules_folder_initial_location_0: diag(6125, DiagnosticCategory.Message, "Looking_up_in_node_modules_folder_initial_location_0_6125", "Looking up in 'node_modules' folder, initial location '{0}'."), - Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder: diag(6126, DiagnosticCategory.Message, "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126", "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."), - Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1: diag(6127, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127", "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"), - Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set: diag(6128, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128", "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"), - Resolving_real_path_for_0_result_1: diag(6130, DiagnosticCategory.Message, "Resolving_real_path_for_0_result_1_6130", "Resolving real path for '{0}', result '{1}'."), - Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system: diag(6131, DiagnosticCategory.Error, "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131", "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."), - File_name_0_has_a_1_extension_stripping_it: diag(6132, DiagnosticCategory.Message, "File_name_0_has_a_1_extension_stripping_it_6132", "File name '{0}' has a '{1}' extension - stripping it."), - _0_is_declared_but_its_value_is_never_read: diag(6133, DiagnosticCategory.Error, "_0_is_declared_but_its_value_is_never_read_6133", "'{0}' is declared but its value is never read.", /*reportsUnnecessary*/ true), - Report_errors_on_unused_locals: diag(6134, DiagnosticCategory.Message, "Report_errors_on_unused_locals_6134", "Report errors on unused locals."), - Report_errors_on_unused_parameters: diag(6135, DiagnosticCategory.Message, "Report_errors_on_unused_parameters_6135", "Report errors on unused parameters."), - The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: diag(6136, DiagnosticCategory.Message, "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", "The maximum dependency depth to search under node_modules and load JavaScript files."), - Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1: diag(6137, DiagnosticCategory.Error, "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137", "Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."), - Property_0_is_declared_but_its_value_is_never_read: diag(6138, DiagnosticCategory.Error, "Property_0_is_declared_but_its_value_is_never_read_6138", "Property '{0}' is declared but its value is never read.", /*reportsUnnecessary*/ true), - Import_emit_helpers_from_tslib: diag(6139, DiagnosticCategory.Message, "Import_emit_helpers_from_tslib_6139", "Import emit helpers from 'tslib'."), - Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2: diag(6140, DiagnosticCategory.Error, "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140", "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."), - Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: diag(6141, DiagnosticCategory.Message, "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", "Parse in strict mode and emit \"use strict\" for each source file."), - Module_0_was_resolved_to_1_but_jsx_is_not_set: diag(6142, DiagnosticCategory.Error, "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142", "Module '{0}' was resolved to '{1}', but '--jsx' is not set."), - Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1: diag(6144, DiagnosticCategory.Message, "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144", "Module '{0}' was resolved as locally declared ambient module in file '{1}'."), - Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified: diag(6145, DiagnosticCategory.Message, "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145", "Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified."), - Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h: diag(6146, DiagnosticCategory.Message, "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146", "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."), - Resolution_for_module_0_was_found_in_cache_from_location_1: diag(6147, DiagnosticCategory.Message, "Resolution_for_module_0_was_found_in_cache_from_location_1_6147", "Resolution for module '{0}' was found in cache from location '{1}'."), - Directory_0_does_not_exist_skipping_all_lookups_in_it: diag(6148, DiagnosticCategory.Message, "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148", "Directory '{0}' does not exist, skipping all lookups in it."), - Show_diagnostic_information: diag(6149, DiagnosticCategory.Message, "Show_diagnostic_information_6149", "Show diagnostic information."), - Show_verbose_diagnostic_information: diag(6150, DiagnosticCategory.Message, "Show_verbose_diagnostic_information_6150", "Show verbose diagnostic information."), - Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file: diag(6151, DiagnosticCategory.Message, "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151", "Emit a single file with source maps instead of having a separate file."), - Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set: diag(6152, DiagnosticCategory.Message, "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152", "Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."), - Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule: diag(6153, DiagnosticCategory.Message, "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153", "Transpile each file as a separate module (similar to 'ts.transpileModule')."), - Print_names_of_generated_files_part_of_the_compilation: diag(6154, DiagnosticCategory.Message, "Print_names_of_generated_files_part_of_the_compilation_6154", "Print names of generated files part of the compilation."), - Print_names_of_files_part_of_the_compilation: diag(6155, DiagnosticCategory.Message, "Print_names_of_files_part_of_the_compilation_6155", "Print names of files part of the compilation."), - The_locale_used_when_displaying_messages_to_the_user_e_g_en_us: diag(6156, DiagnosticCategory.Message, "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156", "The locale used when displaying messages to the user (e.g. 'en-us')"), - Do_not_generate_custom_helper_functions_like_extends_in_compiled_output: diag(6157, DiagnosticCategory.Message, "Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157", "Do not generate custom helper functions like '__extends' in compiled output."), - Do_not_include_the_default_library_file_lib_d_ts: diag(6158, DiagnosticCategory.Message, "Do_not_include_the_default_library_file_lib_d_ts_6158", "Do not include the default library file (lib.d.ts)."), - Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files: diag(6159, DiagnosticCategory.Message, "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159", "Do not add triple-slash references or imported modules to the list of compiled files."), - Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files: diag(6160, DiagnosticCategory.Message, "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160", "[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."), - List_of_folders_to_include_type_definitions_from: diag(6161, DiagnosticCategory.Message, "List_of_folders_to_include_type_definitions_from_6161", "List of folders to include type definitions from."), - Disable_size_limitations_on_JavaScript_projects: diag(6162, DiagnosticCategory.Message, "Disable_size_limitations_on_JavaScript_projects_6162", "Disable size limitations on JavaScript projects."), - The_character_set_of_the_input_files: diag(6163, DiagnosticCategory.Message, "The_character_set_of_the_input_files_6163", "The character set of the input files."), - Do_not_truncate_error_messages: diag(6165, DiagnosticCategory.Message, "Do_not_truncate_error_messages_6165", "Do not truncate error messages."), - Output_directory_for_generated_declaration_files: diag(6166, DiagnosticCategory.Message, "Output_directory_for_generated_declaration_files_6166", "Output directory for generated declaration files."), - A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl: diag(6167, DiagnosticCategory.Message, "A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167", "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."), - List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime: diag(6168, DiagnosticCategory.Message, "List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168", "List of root folders whose combined content represents the structure of the project at runtime."), - Show_all_compiler_options: diag(6169, DiagnosticCategory.Message, "Show_all_compiler_options_6169", "Show all compiler options."), - Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file: diag(6170, DiagnosticCategory.Message, "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170", "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"), - Command_line_Options: diag(6171, DiagnosticCategory.Message, "Command_line_Options_6171", "Command-line Options"), - Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3: diag(6179, DiagnosticCategory.Message, "Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179", "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'."), - Enable_all_strict_type_checking_options: diag(6180, DiagnosticCategory.Message, "Enable_all_strict_type_checking_options_6180", "Enable all strict type-checking options."), - Scoped_package_detected_looking_in_0: diag(6182, DiagnosticCategory.Message, "Scoped_package_detected_looking_in_0_6182", "Scoped package detected, looking in '{0}'"), - Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2: diag(6183, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."), - Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: diag(6184, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."), - Enable_strict_checking_of_function_types: diag(6186, DiagnosticCategory.Message, "Enable_strict_checking_of_function_types_6186", "Enable strict checking of function types."), - Enable_strict_checking_of_property_initialization_in_classes: diag(6187, DiagnosticCategory.Message, "Enable_strict_checking_of_property_initialization_in_classes_6187", "Enable strict checking of property initialization in classes."), - Numeric_separators_are_not_allowed_here: diag(6188, DiagnosticCategory.Error, "Numeric_separators_are_not_allowed_here_6188", "Numeric separators are not allowed here."), - Multiple_consecutive_numeric_separators_are_not_permitted: diag(6189, DiagnosticCategory.Error, "Multiple_consecutive_numeric_separators_are_not_permitted_6189", "Multiple consecutive numeric separators are not permitted."), - Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen: diag(6191, DiagnosticCategory.Message, "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191", "Whether to keep outdated console output in watch mode instead of clearing the screen."), - All_imports_in_import_declaration_are_unused: diag(6192, DiagnosticCategory.Error, "All_imports_in_import_declaration_are_unused_6192", "All imports in import declaration are unused.", /*reportsUnnecessary*/ true), - Found_1_error_Watching_for_file_changes: diag(6193, DiagnosticCategory.Message, "Found_1_error_Watching_for_file_changes_6193", "Found 1 error. Watching for file changes."), - Found_0_errors_Watching_for_file_changes: diag(6194, DiagnosticCategory.Message, "Found_0_errors_Watching_for_file_changes_6194", "Found {0} errors. Watching for file changes."), - Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols: diag(6195, DiagnosticCategory.Message, "Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195", "Resolve 'keyof' to string valued property names only (no numbers or symbols)."), - _0_is_declared_but_never_used: diag(6196, DiagnosticCategory.Error, "_0_is_declared_but_never_used_6196", "'{0}' is declared but never used.", /*reportsUnnecessary*/ true), - Include_modules_imported_with_json_extension: diag(6197, DiagnosticCategory.Message, "Include_modules_imported_with_json_extension_6197", "Include modules imported with '.json' extension"), - All_destructured_elements_are_unused: diag(6198, DiagnosticCategory.Error, "All_destructured_elements_are_unused_6198", "All destructured elements are unused.", /*reportsUnnecessary*/ true), - All_variables_are_unused: diag(6199, DiagnosticCategory.Error, "All_variables_are_unused_6199", "All variables are unused.", /*reportsUnnecessary*/ true), - Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0: diag(6200, DiagnosticCategory.Error, "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200", "Definitions of the following identifiers conflict with those in another file: {0}"), - Conflicts_are_in_this_file: diag(6201, DiagnosticCategory.Message, "Conflicts_are_in_this_file_6201", "Conflicts are in this file."), - Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0: diag(6202, DiagnosticCategory.Error, "Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202", "Project references may not form a circular graph. Cycle detected: {0}"), - _0_was_also_declared_here: diag(6203, DiagnosticCategory.Message, "_0_was_also_declared_here_6203", "'{0}' was also declared here."), - and_here: diag(6204, DiagnosticCategory.Message, "and_here_6204", "and here."), - All_type_parameters_are_unused: diag(6205, DiagnosticCategory.Error, "All_type_parameters_are_unused_6205", "All type parameters are unused."), - package_json_has_a_typesVersions_field_with_version_specific_path_mappings: diag(6206, DiagnosticCategory.Message, "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206", "'package.json' has a 'typesVersions' field with version-specific path mappings."), - package_json_does_not_have_a_typesVersions_entry_that_matches_version_0: diag(6207, DiagnosticCategory.Message, "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207", "'package.json' does not have a 'typesVersions' entry that matches version '{0}'."), - package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2: diag(6208, DiagnosticCategory.Message, "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208", "'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."), - package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range: diag(6209, DiagnosticCategory.Message, "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209", "'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."), - An_argument_for_0_was_not_provided: diag(6210, DiagnosticCategory.Message, "An_argument_for_0_was_not_provided_6210", "An argument for '{0}' was not provided."), - An_argument_matching_this_binding_pattern_was_not_provided: diag(6211, DiagnosticCategory.Message, "An_argument_matching_this_binding_pattern_was_not_provided_6211", "An argument matching this binding pattern was not provided."), - Did_you_mean_to_call_this_expression: diag(6212, DiagnosticCategory.Message, "Did_you_mean_to_call_this_expression_6212", "Did you mean to call this expression?"), - Did_you_mean_to_use_new_with_this_expression: diag(6213, DiagnosticCategory.Message, "Did_you_mean_to_use_new_with_this_expression_6213", "Did you mean to use 'new' with this expression?"), - Enable_strict_bind_call_and_apply_methods_on_functions: diag(6214, DiagnosticCategory.Message, "Enable_strict_bind_call_and_apply_methods_on_functions_6214", "Enable strict 'bind', 'call', and 'apply' methods on functions."), - Using_compiler_options_of_project_reference_redirect_0: diag(6215, DiagnosticCategory.Message, "Using_compiler_options_of_project_reference_redirect_0_6215", "Using compiler options of project reference redirect '{0}'."), - Found_1_error: diag(6216, DiagnosticCategory.Message, "Found_1_error_6216", "Found 1 error."), - Found_0_errors: diag(6217, DiagnosticCategory.Message, "Found_0_errors_6217", "Found {0} errors."), - Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2: diag(6218, DiagnosticCategory.Message, "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218", "======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"), - Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3: diag(6219, DiagnosticCategory.Message, "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219", "======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========"), - package_json_had_a_falsy_0_field: diag(6220, DiagnosticCategory.Message, "package_json_had_a_falsy_0_field_6220", "'package.json' had a falsy '{0}' field."), - Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects: diag(6221, DiagnosticCategory.Message, "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221", "Disable use of source files instead of declaration files from referenced projects."), - Emit_class_fields_with_Define_instead_of_Set: diag(6222, DiagnosticCategory.Message, "Emit_class_fields_with_Define_instead_of_Set_6222", "Emit class fields with Define instead of Set."), - Generates_a_CPU_profile: diag(6223, DiagnosticCategory.Message, "Generates_a_CPU_profile_6223", "Generates a CPU profile."), - Disable_solution_searching_for_this_project: diag(6224, DiagnosticCategory.Message, "Disable_solution_searching_for_this_project_6224", "Disable solution searching for this project."), - Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory: diag(6225, DiagnosticCategory.Message, "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225", "Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."), - Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling: diag(6226, DiagnosticCategory.Message, "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226", "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling'."), - Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize: diag(6227, DiagnosticCategory.Message, "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227", "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority', 'FixedChunkSize'."), - Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3: diag(6229, DiagnosticCategory.Error, "Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229", "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."), - Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line: diag(6230, DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."), - Could_not_resolve_the_path_0_with_the_extensions_Colon_1: diag(6231, DiagnosticCategory.Error, "Could_not_resolve_the_path_0_with_the_extensions_Colon_1_6231", "Could not resolve the path '{0}' with the extensions: {1}."), - Declaration_augments_declaration_in_another_file_This_cannot_be_serialized: diag(6232, DiagnosticCategory.Error, "Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232", "Declaration augments declaration in another file. This cannot be serialized."), - This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file: diag(6233, DiagnosticCategory.Error, "This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233", "This is the declaration being augmented. Consider moving the augmenting declaration into the same file."), - This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without: diag(6234, DiagnosticCategory.Error, "This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without_6234", "This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?"), - Disable_loading_referenced_projects: diag(6235, DiagnosticCategory.Message, "Disable_loading_referenced_projects_6235", "Disable loading referenced projects."), - Arguments_for_the_rest_parameter_0_were_not_provided: diag(6236, DiagnosticCategory.Error, "Arguments_for_the_rest_parameter_0_were_not_provided_6236", "Arguments for the rest parameter '{0}' were not provided."), - Generates_an_event_trace_and_a_list_of_types: diag(6237, DiagnosticCategory.Message, "Generates_an_event_trace_and_a_list_of_types_6237", "Generates an event trace and a list of types."), - Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react: diag(6238, DiagnosticCategory.Error, "Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238", "Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react"), - File_0_exists_according_to_earlier_cached_lookups: diag(6239, DiagnosticCategory.Message, "File_0_exists_according_to_earlier_cached_lookups_6239", "File '{0}' exists according to earlier cached lookups."), - File_0_does_not_exist_according_to_earlier_cached_lookups: diag(6240, DiagnosticCategory.Message, "File_0_does_not_exist_according_to_earlier_cached_lookups_6240", "File '{0}' does not exist according to earlier cached lookups."), - Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1: diag(6241, DiagnosticCategory.Message, "Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241", "Resolution for type reference directive '{0}' was found in cache from location '{1}'."), - Resolving_type_reference_directive_0_containing_file_1: diag(6242, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_1_6242", "======== Resolving type reference directive '{0}', containing file '{1}'. ========"), - Interpret_optional_property_types_as_written_rather_than_adding_undefined: diag(6243, DiagnosticCategory.Message, "Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243", "Interpret optional property types as written, rather than adding 'undefined'."), - Modules: diag(6244, DiagnosticCategory.Message, "Modules_6244", "Modules"), - File_Management: diag(6245, DiagnosticCategory.Message, "File_Management_6245", "File Management"), - Emit: diag(6246, DiagnosticCategory.Message, "Emit_6246", "Emit"), - JavaScript_Support: diag(6247, DiagnosticCategory.Message, "JavaScript_Support_6247", "JavaScript Support"), - Type_Checking: diag(6248, DiagnosticCategory.Message, "Type_Checking_6248", "Type Checking"), - Editor_Support: diag(6249, DiagnosticCategory.Message, "Editor_Support_6249", "Editor Support"), - Watch_and_Build_Modes: diag(6250, DiagnosticCategory.Message, "Watch_and_Build_Modes_6250", "Watch and Build Modes"), - Compiler_Diagnostics: diag(6251, DiagnosticCategory.Message, "Compiler_Diagnostics_6251", "Compiler Diagnostics"), - Interop_Constraints: diag(6252, DiagnosticCategory.Message, "Interop_Constraints_6252", "Interop Constraints"), - Backwards_Compatibility: diag(6253, DiagnosticCategory.Message, "Backwards_Compatibility_6253", "Backwards Compatibility"), - Language_and_Environment: diag(6254, DiagnosticCategory.Message, "Language_and_Environment_6254", "Language and Environment"), - Projects: diag(6255, DiagnosticCategory.Message, "Projects_6255", "Projects"), - Output_Formatting: diag(6256, DiagnosticCategory.Message, "Output_Formatting_6256", "Output Formatting"), - Completeness: diag(6257, DiagnosticCategory.Message, "Completeness_6257", "Completeness"), - _0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file: diag(6258, DiagnosticCategory.Error, "_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258", "'{0}' should be set inside the 'compilerOptions' object of the config json file"), - Found_1_error_in_1: diag(6259, DiagnosticCategory.Message, "Found_1_error_in_1_6259", "Found 1 error in {1}"), - Found_0_errors_in_the_same_file_starting_at_Colon_1: diag(6260, DiagnosticCategory.Message, "Found_0_errors_in_the_same_file_starting_at_Colon_1_6260", "Found {0} errors in the same file, starting at: {1}"), - Found_0_errors_in_1_files: diag(6261, DiagnosticCategory.Message, "Found_0_errors_in_1_files_6261", "Found {0} errors in {1} files."), - Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve: diag(6270, DiagnosticCategory.Message, "Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270", "Directory '{0}' has no containing package.json scope. Imports will not resolve."), - Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1: diag(6271, DiagnosticCategory.Message, "Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271", "Import specifier '{0}' does not exist in package.json scope at path '{1}'."), - Invalid_import_specifier_0_has_no_possible_resolutions: diag(6272, DiagnosticCategory.Message, "Invalid_import_specifier_0_has_no_possible_resolutions_6272", "Invalid import specifier '{0}' has no possible resolutions."), - package_json_scope_0_has_no_imports_defined: diag(6273, DiagnosticCategory.Message, "package_json_scope_0_has_no_imports_defined_6273", "package.json scope '{0}' has no imports defined."), - package_json_scope_0_explicitly_maps_specifier_1_to_null: diag(6274, DiagnosticCategory.Message, "package_json_scope_0_explicitly_maps_specifier_1_to_null_6274", "package.json scope '{0}' explicitly maps specifier '{1}' to null."), - package_json_scope_0_has_invalid_type_for_target_of_specifier_1: diag(6275, DiagnosticCategory.Message, "package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275", "package.json scope '{0}' has invalid type for target of specifier '{1}'"), - Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1: diag(6276, DiagnosticCategory.Message, "Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276", "Export specifier '{0}' does not exist in package.json scope at path '{1}'."), - Enable_project_compilation: diag(6302, DiagnosticCategory.Message, "Enable_project_compilation_6302", "Enable project compilation"), - Composite_projects_may_not_disable_declaration_emit: diag(6304, DiagnosticCategory.Error, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."), - Output_file_0_has_not_been_built_from_source_file_1: diag(6305, DiagnosticCategory.Error, "Output_file_0_has_not_been_built_from_source_file_1_6305", "Output file '{0}' has not been built from source file '{1}'."), - Referenced_project_0_must_have_setting_composite_Colon_true: diag(6306, DiagnosticCategory.Error, "Referenced_project_0_must_have_setting_composite_Colon_true_6306", "Referenced project '{0}' must have setting \"composite\": true."), - File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern: diag(6307, DiagnosticCategory.Error, "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307", "File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."), - Cannot_prepend_project_0_because_it_does_not_have_outFile_set: diag(6308, DiagnosticCategory.Error, "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308", "Cannot prepend project '{0}' because it does not have 'outFile' set"), - Output_file_0_from_project_1_does_not_exist: diag(6309, DiagnosticCategory.Error, "Output_file_0_from_project_1_does_not_exist_6309", "Output file '{0}' from project '{1}' does not exist"), - Referenced_project_0_may_not_disable_emit: diag(6310, DiagnosticCategory.Error, "Referenced_project_0_may_not_disable_emit_6310", "Referenced project '{0}' may not disable emit."), - Project_0_is_out_of_date_because_output_1_is_older_than_input_2: diag(6350, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350", "Project '{0}' is out of date because output '{1}' is older than input '{2}'"), - Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2: diag(6351, DiagnosticCategory.Message, "Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351", "Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"), - Project_0_is_out_of_date_because_output_file_1_does_not_exist: diag(6352, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352", "Project '{0}' is out of date because output file '{1}' does not exist"), - Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date: diag(6353, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353", "Project '{0}' is out of date because its dependency '{1}' is out of date"), - Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies: diag(6354, DiagnosticCategory.Message, "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354", "Project '{0}' is up to date with .d.ts files from its dependencies"), - Projects_in_this_build_Colon_0: diag(6355, DiagnosticCategory.Message, "Projects_in_this_build_Colon_0_6355", "Projects in this build: {0}"), - A_non_dry_build_would_delete_the_following_files_Colon_0: diag(6356, DiagnosticCategory.Message, "A_non_dry_build_would_delete_the_following_files_Colon_0_6356", "A non-dry build would delete the following files: {0}"), - A_non_dry_build_would_build_project_0: diag(6357, DiagnosticCategory.Message, "A_non_dry_build_would_build_project_0_6357", "A non-dry build would build project '{0}'"), - Building_project_0: diag(6358, DiagnosticCategory.Message, "Building_project_0_6358", "Building project '{0}'..."), - Updating_output_timestamps_of_project_0: diag(6359, DiagnosticCategory.Message, "Updating_output_timestamps_of_project_0_6359", "Updating output timestamps of project '{0}'..."), - Project_0_is_up_to_date: diag(6361, DiagnosticCategory.Message, "Project_0_is_up_to_date_6361", "Project '{0}' is up to date"), - Skipping_build_of_project_0_because_its_dependency_1_has_errors: diag(6362, DiagnosticCategory.Message, "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362", "Skipping build of project '{0}' because its dependency '{1}' has errors"), - Project_0_can_t_be_built_because_its_dependency_1_has_errors: diag(6363, DiagnosticCategory.Message, "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363", "Project '{0}' can't be built because its dependency '{1}' has errors"), - Build_one_or_more_projects_and_their_dependencies_if_out_of_date: diag(6364, DiagnosticCategory.Message, "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364", "Build one or more projects and their dependencies, if out of date"), - Delete_the_outputs_of_all_projects: diag(6365, DiagnosticCategory.Message, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects."), - Show_what_would_be_built_or_deleted_if_specified_with_clean: diag(6367, DiagnosticCategory.Message, "Show_what_would_be_built_or_deleted_if_specified_with_clean_6367", "Show what would be built (or deleted, if specified with '--clean')"), - Option_build_must_be_the_first_command_line_argument: diag(6369, DiagnosticCategory.Error, "Option_build_must_be_the_first_command_line_argument_6369", "Option '--build' must be the first command line argument."), - Options_0_and_1_cannot_be_combined: diag(6370, DiagnosticCategory.Error, "Options_0_and_1_cannot_be_combined_6370", "Options '{0}' and '{1}' cannot be combined."), - Updating_unchanged_output_timestamps_of_project_0: diag(6371, DiagnosticCategory.Message, "Updating_unchanged_output_timestamps_of_project_0_6371", "Updating unchanged output timestamps of project '{0}'..."), - Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed: diag(6372, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372", "Project '{0}' is out of date because output of its dependency '{1}' has changed"), - Updating_output_of_project_0: diag(6373, DiagnosticCategory.Message, "Updating_output_of_project_0_6373", "Updating output of project '{0}'..."), - A_non_dry_build_would_update_timestamps_for_output_of_project_0: diag(6374, DiagnosticCategory.Message, "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374", "A non-dry build would update timestamps for output of project '{0}'"), - A_non_dry_build_would_update_output_of_project_0: diag(6375, DiagnosticCategory.Message, "A_non_dry_build_would_update_output_of_project_0_6375", "A non-dry build would update output of project '{0}'"), - Cannot_update_output_of_project_0_because_there_was_error_reading_file_1: diag(6376, DiagnosticCategory.Message, "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376", "Cannot update output of project '{0}' because there was error reading file '{1}'"), - Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1: diag(6377, DiagnosticCategory.Error, "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377", "Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"), - Composite_projects_may_not_disable_incremental_compilation: diag(6379, DiagnosticCategory.Error, "Composite_projects_may_not_disable_incremental_compilation_6379", "Composite projects may not disable incremental compilation."), - Specify_file_to_store_incremental_compilation_information: diag(6380, DiagnosticCategory.Message, "Specify_file_to_store_incremental_compilation_information_6380", "Specify file to store incremental compilation information"), - Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2: diag(6381, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381", "Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"), - Skipping_build_of_project_0_because_its_dependency_1_was_not_built: diag(6382, DiagnosticCategory.Message, "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382", "Skipping build of project '{0}' because its dependency '{1}' was not built"), - Project_0_can_t_be_built_because_its_dependency_1_was_not_built: diag(6383, DiagnosticCategory.Message, "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383", "Project '{0}' can't be built because its dependency '{1}' was not built"), - Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: diag(6384, DiagnosticCategory.Message, "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384", "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."), - _0_is_deprecated: diag(6385, DiagnosticCategory.Suggestion, "_0_is_deprecated_6385", "'{0}' is deprecated.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ undefined, /*reportsDeprecated*/ true), - Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found: diag(6386, DiagnosticCategory.Message, "Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386", "Performance timings for '--diagnostics' or '--extendedDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found."), - The_signature_0_of_1_is_deprecated: diag(6387, DiagnosticCategory.Suggestion, "The_signature_0_of_1_is_deprecated_6387", "The signature '{0}' of '{1}' is deprecated.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ undefined, /*reportsDeprecated*/ true), - Project_0_is_being_forcibly_rebuilt: diag(6388, DiagnosticCategory.Message, "Project_0_is_being_forcibly_rebuilt_6388", "Project '{0}' is being forcibly rebuilt"), - Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved: diag(6389, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389", "Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."), - Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2: diag(6390, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."), - Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: diag(6391, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."), - Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved: diag(6392, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."), - Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: diag(6393, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."), - Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: diag(6394, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."), - Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: diag(6395, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."), - Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: diag(6396, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."), - Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: diag(6397, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."), - Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: diag(6398, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."), - Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted: diag(6399, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399", "Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"), - Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files: diag(6400, DiagnosticCategory.Message, "Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400", "Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"), - Project_0_is_out_of_date_because_there_was_error_reading_file_1: diag(6401, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401", "Project '{0}' is out of date because there was error reading file '{1}'"), - Resolving_in_0_mode_with_conditions_1: diag(6402, DiagnosticCategory.Message, "Resolving_in_0_mode_with_conditions_1_6402", "Resolving in {0} mode with conditions {1}."), - Matched_0_condition_1: diag(6403, DiagnosticCategory.Message, "Matched_0_condition_1_6403", "Matched '{0}' condition '{1}'."), - Using_0_subpath_1_with_target_2: diag(6404, DiagnosticCategory.Message, "Using_0_subpath_1_with_target_2_6404", "Using '{0}' subpath '{1}' with target '{2}'."), - Saw_non_matching_condition_0: diag(6405, DiagnosticCategory.Message, "Saw_non_matching_condition_0_6405", "Saw non-matching condition '{0}'."), - Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions: diag(6406, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406", "Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"), - The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, DiagnosticCategory.Message, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"), - The_expected_type_comes_from_this_index_signature: diag(6501, DiagnosticCategory.Message, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."), - The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, DiagnosticCategory.Message, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."), - Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing: diag(6503, DiagnosticCategory.Message, "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503", "Print names of files that are part of the compilation and then stop processing."), - File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option: diag(6504, DiagnosticCategory.Error, "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504", "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"), - Print_names_of_files_and_the_reason_they_are_part_of_the_compilation: diag(6505, DiagnosticCategory.Message, "Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505", "Print names of files and the reason they are part of the compilation."), - Consider_adding_a_declare_modifier_to_this_class: diag(6506, DiagnosticCategory.Message, "Consider_adding_a_declare_modifier_to_this_class_6506", "Consider adding a 'declare' modifier to this class."), - Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files: diag(6600, DiagnosticCategory.Message, "Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600", "Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files."), - Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export: diag(6601, DiagnosticCategory.Message, "Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601", "Allow 'import x from y' when a module doesn't have a default export."), - Allow_accessing_UMD_globals_from_modules: diag(6602, DiagnosticCategory.Message, "Allow_accessing_UMD_globals_from_modules_6602", "Allow accessing UMD globals from modules."), - Disable_error_reporting_for_unreachable_code: diag(6603, DiagnosticCategory.Message, "Disable_error_reporting_for_unreachable_code_6603", "Disable error reporting for unreachable code."), - Disable_error_reporting_for_unused_labels: diag(6604, DiagnosticCategory.Message, "Disable_error_reporting_for_unused_labels_6604", "Disable error reporting for unused labels."), - Ensure_use_strict_is_always_emitted: diag(6605, DiagnosticCategory.Message, "Ensure_use_strict_is_always_emitted_6605", "Ensure 'use strict' is always emitted."), - Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: diag(6606, DiagnosticCategory.Message, "Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606", "Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."), - Specify_the_base_directory_to_resolve_non_relative_module_names: diag(6607, DiagnosticCategory.Message, "Specify_the_base_directory_to_resolve_non_relative_module_names_6607", "Specify the base directory to resolve non-relative module names."), - No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files: diag(6608, DiagnosticCategory.Message, "No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608", "No longer supported. In early versions, manually set the text encoding for reading files."), - Enable_error_reporting_in_type_checked_JavaScript_files: diag(6609, DiagnosticCategory.Message, "Enable_error_reporting_in_type_checked_JavaScript_files_6609", "Enable error reporting in type-checked JavaScript files."), - Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references: diag(6611, DiagnosticCategory.Message, "Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611", "Enable constraints that allow a TypeScript project to be used with project references."), - Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project: diag(6612, DiagnosticCategory.Message, "Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612", "Generate .d.ts files from TypeScript and JavaScript files in your project."), - Specify_the_output_directory_for_generated_declaration_files: diag(6613, DiagnosticCategory.Message, "Specify_the_output_directory_for_generated_declaration_files_6613", "Specify the output directory for generated declaration files."), - Create_sourcemaps_for_d_ts_files: diag(6614, DiagnosticCategory.Message, "Create_sourcemaps_for_d_ts_files_6614", "Create sourcemaps for d.ts files."), - Output_compiler_performance_information_after_building: diag(6615, DiagnosticCategory.Message, "Output_compiler_performance_information_after_building_6615", "Output compiler performance information after building."), - Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project: diag(6616, DiagnosticCategory.Message, "Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616", "Disables inference for type acquisition by looking at filenames in a project."), - Reduce_the_number_of_projects_loaded_automatically_by_TypeScript: diag(6617, DiagnosticCategory.Message, "Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617", "Reduce the number of projects loaded automatically by TypeScript."), - Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server: diag(6618, DiagnosticCategory.Message, "Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618", "Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."), - Opt_a_project_out_of_multi_project_reference_checking_when_editing: diag(6619, DiagnosticCategory.Message, "Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619", "Opt a project out of multi-project reference checking when editing."), - Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects: diag(6620, DiagnosticCategory.Message, "Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620", "Disable preferring source files instead of declaration files when referencing composite projects."), - Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration: diag(6621, DiagnosticCategory.Message, "Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621", "Emit more compliant, but verbose and less performant JavaScript for iteration."), - Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files: diag(6622, DiagnosticCategory.Message, "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622", "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."), - Only_output_d_ts_files_and_not_JavaScript_files: diag(6623, DiagnosticCategory.Message, "Only_output_d_ts_files_and_not_JavaScript_files_6623", "Only output d.ts files and not JavaScript files."), - Emit_design_type_metadata_for_decorated_declarations_in_source_files: diag(6624, DiagnosticCategory.Message, "Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624", "Emit design-type metadata for decorated declarations in source files."), - Disable_the_type_acquisition_for_JavaScript_projects: diag(6625, DiagnosticCategory.Message, "Disable_the_type_acquisition_for_JavaScript_projects_6625", "Disable the type acquisition for JavaScript projects"), - Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility: diag(6626, DiagnosticCategory.Message, "Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626", "Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."), - Filters_results_from_the_include_option: diag(6627, DiagnosticCategory.Message, "Filters_results_from_the_include_option_6627", "Filters results from the `include` option."), - Remove_a_list_of_directories_from_the_watch_process: diag(6628, DiagnosticCategory.Message, "Remove_a_list_of_directories_from_the_watch_process_6628", "Remove a list of directories from the watch process."), - Remove_a_list_of_files_from_the_watch_mode_s_processing: diag(6629, DiagnosticCategory.Message, "Remove_a_list_of_files_from_the_watch_mode_s_processing_6629", "Remove a list of files from the watch mode's processing."), - Enable_experimental_support_for_TC39_stage_2_draft_decorators: diag(6630, DiagnosticCategory.Message, "Enable_experimental_support_for_TC39_stage_2_draft_decorators_6630", "Enable experimental support for TC39 stage 2 draft decorators."), - Print_files_read_during_the_compilation_including_why_it_was_included: diag(6631, DiagnosticCategory.Message, "Print_files_read_during_the_compilation_including_why_it_was_included_6631", "Print files read during the compilation including why it was included."), - Output_more_detailed_compiler_performance_information_after_building: diag(6632, DiagnosticCategory.Message, "Output_more_detailed_compiler_performance_information_after_building_6632", "Output more detailed compiler performance information after building."), - Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited: diag(6633, DiagnosticCategory.Message, "Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633", "Specify one or more path or node module references to base configuration files from which settings are inherited."), - Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers: diag(6634, DiagnosticCategory.Message, "Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634", "Specify what approach the watcher should use if the system runs out of native file watchers."), - Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include: diag(6635, DiagnosticCategory.Message, "Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635", "Include a list of files. This does not support glob patterns, as opposed to `include`."), - Build_all_projects_including_those_that_appear_to_be_up_to_date: diag(6636, DiagnosticCategory.Message, "Build_all_projects_including_those_that_appear_to_be_up_to_date_6636", "Build all projects, including those that appear to be up to date."), - Ensure_that_casing_is_correct_in_imports: diag(6637, DiagnosticCategory.Message, "Ensure_that_casing_is_correct_in_imports_6637", "Ensure that casing is correct in imports."), - Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging: diag(6638, DiagnosticCategory.Message, "Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638", "Emit a v8 CPU profile of the compiler run for debugging."), - Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file: diag(6639, DiagnosticCategory.Message, "Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639", "Allow importing helper functions from tslib once per project, instead of including them per-file."), - Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation: diag(6641, DiagnosticCategory.Message, "Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641", "Specify a list of glob patterns that match files to be included in compilation."), - Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects: diag(6642, DiagnosticCategory.Message, "Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642", "Save .tsbuildinfo files to allow for incremental compilation of projects."), - Include_sourcemap_files_inside_the_emitted_JavaScript: diag(6643, DiagnosticCategory.Message, "Include_sourcemap_files_inside_the_emitted_JavaScript_6643", "Include sourcemap files inside the emitted JavaScript."), - Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript: diag(6644, DiagnosticCategory.Message, "Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644", "Include source code in the sourcemaps inside the emitted JavaScript."), - Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports: diag(6645, DiagnosticCategory.Message, "Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645", "Ensure that each file can be safely transpiled without relying on other imports."), - Specify_what_JSX_code_is_generated: diag(6646, DiagnosticCategory.Message, "Specify_what_JSX_code_is_generated_6646", "Specify what JSX code is generated."), - Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h: diag(6647, DiagnosticCategory.Message, "Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647", "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."), - Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment: diag(6648, DiagnosticCategory.Message, "Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648", "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."), - Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk: diag(6649, DiagnosticCategory.Message, "Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649", "Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."), - Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option: diag(6650, DiagnosticCategory.Message, "Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650", "Make keyof only return strings instead of string, numbers or symbols. Legacy option."), - Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment: diag(6651, DiagnosticCategory.Message, "Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651", "Specify a set of bundled library declaration files that describe the target runtime environment."), - Print_the_names_of_emitted_files_after_a_compilation: diag(6652, DiagnosticCategory.Message, "Print_the_names_of_emitted_files_after_a_compilation_6652", "Print the names of emitted files after a compilation."), - Print_all_of_the_files_read_during_the_compilation: diag(6653, DiagnosticCategory.Message, "Print_all_of_the_files_read_during_the_compilation_6653", "Print all of the files read during the compilation."), - Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit: diag(6654, DiagnosticCategory.Message, "Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654", "Set the language of the messaging from TypeScript. This does not affect emit."), - Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: diag(6655, DiagnosticCategory.Message, "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655", "Specify the location where debugger should locate map files instead of generated locations."), - Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs: diag(6656, DiagnosticCategory.Message, "Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656", "Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."), - Specify_what_module_code_is_generated: diag(6657, DiagnosticCategory.Message, "Specify_what_module_code_is_generated_6657", "Specify what module code is generated."), - Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier: diag(6658, DiagnosticCategory.Message, "Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658", "Specify how TypeScript looks up a file from a given module specifier."), - Set_the_newline_character_for_emitting_files: diag(6659, DiagnosticCategory.Message, "Set_the_newline_character_for_emitting_files_6659", "Set the newline character for emitting files."), - Disable_emitting_files_from_a_compilation: diag(6660, DiagnosticCategory.Message, "Disable_emitting_files_from_a_compilation_6660", "Disable emitting files from a compilation."), - Disable_generating_custom_helper_functions_like_extends_in_compiled_output: diag(6661, DiagnosticCategory.Message, "Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661", "Disable generating custom helper functions like '__extends' in compiled output."), - Disable_emitting_files_if_any_type_checking_errors_are_reported: diag(6662, DiagnosticCategory.Message, "Disable_emitting_files_if_any_type_checking_errors_are_reported_6662", "Disable emitting files if any type checking errors are reported."), - Disable_truncating_types_in_error_messages: diag(6663, DiagnosticCategory.Message, "Disable_truncating_types_in_error_messages_6663", "Disable truncating types in error messages."), - Enable_error_reporting_for_fallthrough_cases_in_switch_statements: diag(6664, DiagnosticCategory.Message, "Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664", "Enable error reporting for fallthrough cases in switch statements."), - Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type: diag(6665, DiagnosticCategory.Message, "Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665", "Enable error reporting for expressions and declarations with an implied 'any' type."), - Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier: diag(6666, DiagnosticCategory.Message, "Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666", "Ensure overriding members in derived classes are marked with an override modifier."), - Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function: diag(6667, DiagnosticCategory.Message, "Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667", "Enable error reporting for codepaths that do not explicitly return in a function."), - Enable_error_reporting_when_this_is_given_the_type_any: diag(6668, DiagnosticCategory.Message, "Enable_error_reporting_when_this_is_given_the_type_any_6668", "Enable error reporting when 'this' is given the type 'any'."), - Disable_adding_use_strict_directives_in_emitted_JavaScript_files: diag(6669, DiagnosticCategory.Message, "Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669", "Disable adding 'use strict' directives in emitted JavaScript files."), - Disable_including_any_library_files_including_the_default_lib_d_ts: diag(6670, DiagnosticCategory.Message, "Disable_including_any_library_files_including_the_default_lib_d_ts_6670", "Disable including any library files, including the default lib.d.ts."), - Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type: diag(6671, DiagnosticCategory.Message, "Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671", "Enforces using indexed accessors for keys declared using an indexed type."), - Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project: diag(6672, DiagnosticCategory.Message, "Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672", "Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project."), - Disable_strict_checking_of_generic_signatures_in_function_types: diag(6673, DiagnosticCategory.Message, "Disable_strict_checking_of_generic_signatures_in_function_types_6673", "Disable strict checking of generic signatures in function types."), - Add_undefined_to_a_type_when_accessed_using_an_index: diag(6674, DiagnosticCategory.Message, "Add_undefined_to_a_type_when_accessed_using_an_index_6674", "Add 'undefined' to a type when accessed using an index."), - Enable_error_reporting_when_local_variables_aren_t_read: diag(6675, DiagnosticCategory.Message, "Enable_error_reporting_when_local_variables_aren_t_read_6675", "Enable error reporting when local variables aren't read."), - Raise_an_error_when_a_function_parameter_isn_t_read: diag(6676, DiagnosticCategory.Message, "Raise_an_error_when_a_function_parameter_isn_t_read_6676", "Raise an error when a function parameter isn't read."), - Deprecated_setting_Use_outFile_instead: diag(6677, DiagnosticCategory.Message, "Deprecated_setting_Use_outFile_instead_6677", "Deprecated setting. Use 'outFile' instead."), - Specify_an_output_folder_for_all_emitted_files: diag(6678, DiagnosticCategory.Message, "Specify_an_output_folder_for_all_emitted_files_6678", "Specify an output folder for all emitted files."), - Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output: diag(6679, DiagnosticCategory.Message, "Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679", "Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."), - Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations: diag(6680, DiagnosticCategory.Message, "Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680", "Specify a set of entries that re-map imports to additional lookup locations."), - Specify_a_list_of_language_service_plugins_to_include: diag(6681, DiagnosticCategory.Message, "Specify_a_list_of_language_service_plugins_to_include_6681", "Specify a list of language service plugins to include."), - Disable_erasing_const_enum_declarations_in_generated_code: diag(6682, DiagnosticCategory.Message, "Disable_erasing_const_enum_declarations_in_generated_code_6682", "Disable erasing 'const enum' declarations in generated code."), - Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node: diag(6683, DiagnosticCategory.Message, "Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683", "Disable resolving symlinks to their realpath. This correlates to the same flag in node."), - Disable_wiping_the_console_in_watch_mode: diag(6684, DiagnosticCategory.Message, "Disable_wiping_the_console_in_watch_mode_6684", "Disable wiping the console in watch mode."), - Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read: diag(6685, DiagnosticCategory.Message, "Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685", "Enable color and formatting in TypeScript's output to make compiler errors easier to read."), - Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit: diag(6686, DiagnosticCategory.Message, "Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686", "Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."), - Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references: diag(6687, DiagnosticCategory.Message, "Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687", "Specify an array of objects that specify paths for projects. Used in project references."), - Disable_emitting_comments: diag(6688, DiagnosticCategory.Message, "Disable_emitting_comments_6688", "Disable emitting comments."), - Enable_importing_json_files: diag(6689, DiagnosticCategory.Message, "Enable_importing_json_files_6689", "Enable importing .json files."), - Specify_the_root_folder_within_your_source_files: diag(6690, DiagnosticCategory.Message, "Specify_the_root_folder_within_your_source_files_6690", "Specify the root folder within your source files."), - Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules: diag(6691, DiagnosticCategory.Message, "Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691", "Allow multiple folders to be treated as one when resolving modules."), - Skip_type_checking_d_ts_files_that_are_included_with_TypeScript: diag(6692, DiagnosticCategory.Message, "Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692", "Skip type checking .d.ts files that are included with TypeScript."), - Skip_type_checking_all_d_ts_files: diag(6693, DiagnosticCategory.Message, "Skip_type_checking_all_d_ts_files_6693", "Skip type checking all .d.ts files."), - Create_source_map_files_for_emitted_JavaScript_files: diag(6694, DiagnosticCategory.Message, "Create_source_map_files_for_emitted_JavaScript_files_6694", "Create source map files for emitted JavaScript files."), - Specify_the_root_path_for_debuggers_to_find_the_reference_source_code: diag(6695, DiagnosticCategory.Message, "Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695", "Specify the root path for debuggers to find the reference source code."), - Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function: diag(6697, DiagnosticCategory.Message, "Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697", "Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."), - When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible: diag(6698, DiagnosticCategory.Message, "When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698", "When assigning functions, check to ensure parameters and the return values are subtype-compatible."), - When_type_checking_take_into_account_null_and_undefined: diag(6699, DiagnosticCategory.Message, "When_type_checking_take_into_account_null_and_undefined_6699", "When type checking, take into account 'null' and 'undefined'."), - Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor: diag(6700, DiagnosticCategory.Message, "Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700", "Check for class properties that are declared but not set in the constructor."), - Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments: diag(6701, DiagnosticCategory.Message, "Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701", "Disable emitting declarations that have '@internal' in their JSDoc comments."), - Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals: diag(6702, DiagnosticCategory.Message, "Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702", "Disable reporting of excess property errors during the creation of object literals."), - Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures: diag(6703, DiagnosticCategory.Message, "Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703", "Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."), - Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively: diag(6704, DiagnosticCategory.Message, "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704", "Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."), - Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations: diag(6705, DiagnosticCategory.Message, "Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705", "Set the JavaScript language version for emitted JavaScript and include compatible library declarations."), - Log_paths_used_during_the_moduleResolution_process: diag(6706, DiagnosticCategory.Message, "Log_paths_used_during_the_moduleResolution_process_6706", "Log paths used during the 'moduleResolution' process."), - Specify_the_path_to_tsbuildinfo_incremental_compilation_file: diag(6707, DiagnosticCategory.Message, "Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707", "Specify the path to .tsbuildinfo incremental compilation file."), - Specify_options_for_automatic_acquisition_of_declaration_files: diag(6709, DiagnosticCategory.Message, "Specify_options_for_automatic_acquisition_of_declaration_files_6709", "Specify options for automatic acquisition of declaration files."), - Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types: diag(6710, DiagnosticCategory.Message, "Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710", "Specify multiple folders that act like './node_modules/@types'."), - Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file: diag(6711, DiagnosticCategory.Message, "Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711", "Specify type package names to be included without being referenced in a source file."), - Emit_ECMAScript_standard_compliant_class_fields: diag(6712, DiagnosticCategory.Message, "Emit_ECMAScript_standard_compliant_class_fields_6712", "Emit ECMAScript-standard-compliant class fields."), - Enable_verbose_logging: diag(6713, DiagnosticCategory.Message, "Enable_verbose_logging_6713", "Enable verbose logging."), - Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality: diag(6714, DiagnosticCategory.Message, "Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714", "Specify how directories are watched on systems that lack recursive file-watching functionality."), - Specify_how_the_TypeScript_watch_mode_works: diag(6715, DiagnosticCategory.Message, "Specify_how_the_TypeScript_watch_mode_works_6715", "Specify how the TypeScript watch mode works."), - Require_undeclared_properties_from_index_signatures_to_use_element_accesses: diag(6717, DiagnosticCategory.Message, "Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717", "Require undeclared properties from index signatures to use element accesses."), - Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: diag(6718, DiagnosticCategory.Message, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", "Specify emit/checking behavior for imports that are only used for types."), - Ensure_that_each_file_can_have_declaration_emit_generated_without_type_information: diag(6719, DiagnosticCategory.Message, "Ensure_that_each_file_can_have_declaration_emit_generated_without_type_information_6719", "Ensure that each file can have declaration emit generated without type information"), - Default_catch_clause_variables_as_unknown_instead_of_any: diag(6803, DiagnosticCategory.Message, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."), - one_of_Colon: diag(6900, DiagnosticCategory.Message, "one_of_Colon_6900", "one of:"), - one_or_more_Colon: diag(6901, DiagnosticCategory.Message, "one_or_more_Colon_6901", "one or more:"), - type_Colon: diag(6902, DiagnosticCategory.Message, "type_Colon_6902", "type:"), - default_Colon: diag(6903, DiagnosticCategory.Message, "default_Colon_6903", "default:"), - module_system_or_esModuleInterop: diag(6904, DiagnosticCategory.Message, "module_system_or_esModuleInterop_6904", "module === \"system\" or esModuleInterop"), - false_unless_strict_is_set: diag(6905, DiagnosticCategory.Message, "false_unless_strict_is_set_6905", "`false`, unless `strict` is set"), - false_unless_composite_is_set: diag(6906, DiagnosticCategory.Message, "false_unless_composite_is_set_6906", "`false`, unless `composite` is set"), - node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified: diag(6907, DiagnosticCategory.Message, "node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907", "`[\"node_modules\", \"bower_components\", \"jspm_packages\"]`, plus the value of `outDir` if one is specified."), - if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk: diag(6908, DiagnosticCategory.Message, "if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908", "`[]` if `files` is specified, otherwise `[\"**/*\"]`"), - true_if_composite_false_otherwise: diag(6909, DiagnosticCategory.Message, "true_if_composite_false_otherwise_6909", "`true` if `composite`, `false` otherwise"), - module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node: diag(69010, DiagnosticCategory.Message, "module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010", "module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"), - Computed_from_the_list_of_input_files: diag(6911, DiagnosticCategory.Message, "Computed_from_the_list_of_input_files_6911", "Computed from the list of input files"), - Platform_specific: diag(6912, DiagnosticCategory.Message, "Platform_specific_6912", "Platform specific"), - You_can_learn_about_all_of_the_compiler_options_at_0: diag(6913, DiagnosticCategory.Message, "You_can_learn_about_all_of_the_compiler_options_at_0_6913", "You can learn about all of the compiler options at {0}"), - Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon: diag(6914, DiagnosticCategory.Message, "Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914", "Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"), - Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0: diag(6915, DiagnosticCategory.Message, "Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915", "Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"), - COMMON_COMMANDS: diag(6916, DiagnosticCategory.Message, "COMMON_COMMANDS_6916", "COMMON COMMANDS"), - ALL_COMPILER_OPTIONS: diag(6917, DiagnosticCategory.Message, "ALL_COMPILER_OPTIONS_6917", "ALL COMPILER OPTIONS"), - WATCH_OPTIONS: diag(6918, DiagnosticCategory.Message, "WATCH_OPTIONS_6918", "WATCH OPTIONS"), - BUILD_OPTIONS: diag(6919, DiagnosticCategory.Message, "BUILD_OPTIONS_6919", "BUILD OPTIONS"), - COMMON_COMPILER_OPTIONS: diag(6920, DiagnosticCategory.Message, "COMMON_COMPILER_OPTIONS_6920", "COMMON COMPILER OPTIONS"), - COMMAND_LINE_FLAGS: diag(6921, DiagnosticCategory.Message, "COMMAND_LINE_FLAGS_6921", "COMMAND LINE FLAGS"), - tsc_Colon_The_TypeScript_Compiler: diag(6922, DiagnosticCategory.Message, "tsc_Colon_The_TypeScript_Compiler_6922", "tsc: The TypeScript Compiler"), - Compiles_the_current_project_tsconfig_json_in_the_working_directory: diag(6923, DiagnosticCategory.Message, "Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923", "Compiles the current project (tsconfig.json in the working directory.)"), - Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options: diag(6924, DiagnosticCategory.Message, "Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924", "Ignoring tsconfig.json, compiles the specified files with default compiler options."), - Build_a_composite_project_in_the_working_directory: diag(6925, DiagnosticCategory.Message, "Build_a_composite_project_in_the_working_directory_6925", "Build a composite project in the working directory."), - Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory: diag(6926, DiagnosticCategory.Message, "Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926", "Creates a tsconfig.json with the recommended settings in the working directory."), - Compiles_the_TypeScript_project_located_at_the_specified_path: diag(6927, DiagnosticCategory.Message, "Compiles_the_TypeScript_project_located_at_the_specified_path_6927", "Compiles the TypeScript project located at the specified path."), - An_expanded_version_of_this_information_showing_all_possible_compiler_options: diag(6928, DiagnosticCategory.Message, "An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928", "An expanded version of this information, showing all possible compiler options"), - Compiles_the_current_project_with_additional_settings: diag(6929, DiagnosticCategory.Message, "Compiles_the_current_project_with_additional_settings_6929", "Compiles the current project, with additional settings."), - true_for_ES2022_and_above_including_ESNext: diag(6930, DiagnosticCategory.Message, "true_for_ES2022_and_above_including_ESNext_6930", "`true` for ES2022 and above, including ESNext."), - List_of_file_name_suffixes_to_search_when_resolving_a_module: diag(6931, DiagnosticCategory.Error, "List_of_file_name_suffixes_to_search_when_resolving_a_module_6931", "List of file name suffixes to search when resolving a module."), - Variable_0_implicitly_has_an_1_type: diag(7005, DiagnosticCategory.Error, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."), - Parameter_0_implicitly_has_an_1_type: diag(7006, DiagnosticCategory.Error, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."), - Member_0_implicitly_has_an_1_type: diag(7008, DiagnosticCategory.Error, "Member_0_implicitly_has_an_1_type_7008", "Member '{0}' implicitly has an '{1}' type."), - new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: diag(7009, DiagnosticCategory.Error, "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009", "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."), - _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: diag(7010, DiagnosticCategory.Error, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."), - Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7011, DiagnosticCategory.Error, "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."), - Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: diag(7013, DiagnosticCategory.Error, "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."), - Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7014, DiagnosticCategory.Error, "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014", "Function type, which lacks return-type annotation, implicitly has an '{0}' return type."), - Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: diag(7015, DiagnosticCategory.Error, "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", "Element implicitly has an 'any' type because index expression is not of type 'number'."), - Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type: diag(7016, DiagnosticCategory.Error, "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016", "Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."), - Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature: diag(7017, DiagnosticCategory.Error, "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017", "Element implicitly has an 'any' type because type '{0}' has no index signature."), - Object_literal_s_property_0_implicitly_has_an_1_type: diag(7018, DiagnosticCategory.Error, "Object_literal_s_property_0_implicitly_has_an_1_type_7018", "Object literal's property '{0}' implicitly has an '{1}' type."), - Rest_parameter_0_implicitly_has_an_any_type: diag(7019, DiagnosticCategory.Error, "Rest_parameter_0_implicitly_has_an_any_type_7019", "Rest parameter '{0}' implicitly has an 'any[]' type."), - Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: diag(7020, DiagnosticCategory.Error, "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020", "Call signature, which lacks return-type annotation, implicitly has an 'any' return type."), - _0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: diag(7022, DiagnosticCategory.Error, "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022", "'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."), - _0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: diag(7023, DiagnosticCategory.Error, "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023", "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."), - Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: diag(7024, DiagnosticCategory.Error, "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024", "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."), - Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation: diag(7025, DiagnosticCategory.Error, "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025", "Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation."), - JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: diag(7026, DiagnosticCategory.Error, "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."), - Unreachable_code_detected: diag(7027, DiagnosticCategory.Error, "Unreachable_code_detected_7027", "Unreachable code detected.", /*reportsUnnecessary*/ true), - Unused_label: diag(7028, DiagnosticCategory.Error, "Unused_label_7028", "Unused label.", /*reportsUnnecessary*/ true), - Fallthrough_case_in_switch: diag(7029, DiagnosticCategory.Error, "Fallthrough_case_in_switch_7029", "Fallthrough case in switch."), - Not_all_code_paths_return_a_value: diag(7030, DiagnosticCategory.Error, "Not_all_code_paths_return_a_value_7030", "Not all code paths return a value."), - Binding_element_0_implicitly_has_an_1_type: diag(7031, DiagnosticCategory.Error, "Binding_element_0_implicitly_has_an_1_type_7031", "Binding element '{0}' implicitly has an '{1}' type."), - Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: diag(7032, DiagnosticCategory.Error, "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."), - Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: diag(7033, DiagnosticCategory.Error, "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."), - Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined: diag(7034, DiagnosticCategory.Error, "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034", "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."), - Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0: diag(7035, DiagnosticCategory.Error, "Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035", "Try `npm i --save-dev @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"), - Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0: diag(7036, DiagnosticCategory.Error, "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036", "Dynamic import's specifier must be of type 'string', but here has type '{0}'."), - Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports: diag(7037, DiagnosticCategory.Message, "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037", "Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."), - Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead: diag(7038, DiagnosticCategory.Message, "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038", "Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."), - Mapped_object_type_implicitly_has_an_any_template_type: diag(7039, DiagnosticCategory.Error, "Mapped_object_type_implicitly_has_an_any_template_type_7039", "Mapped object type implicitly has an 'any' template type."), - If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1: diag(7040, DiagnosticCategory.Error, "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040", "If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}'"), - The_containing_arrow_function_captures_the_global_value_of_this: diag(7041, DiagnosticCategory.Error, "The_containing_arrow_function_captures_the_global_value_of_this_7041", "The containing arrow function captures the global value of 'this'."), - Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used: diag(7042, DiagnosticCategory.Error, "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042", "Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."), - Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: diag(7043, DiagnosticCategory.Suggestion, "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043", "Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), - Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: diag(7044, DiagnosticCategory.Suggestion, "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044", "Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), - Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: diag(7045, DiagnosticCategory.Suggestion, "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045", "Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), - Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage: diag(7046, DiagnosticCategory.Suggestion, "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046", "Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."), - Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage: diag(7047, DiagnosticCategory.Suggestion, "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047", "Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."), - Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage: diag(7048, DiagnosticCategory.Suggestion, "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048", "Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."), - Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage: diag(7049, DiagnosticCategory.Suggestion, "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049", "Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."), - _0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage: diag(7050, DiagnosticCategory.Suggestion, "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050", "'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."), - Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1: diag(7051, DiagnosticCategory.Error, "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051", "Parameter has a name but no type. Did you mean '{0}: {1}'?"), - Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1: diag(7052, DiagnosticCategory.Error, "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052", "Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?"), - Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1: diag(7053, DiagnosticCategory.Error, "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053", "Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."), - No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1: diag(7054, DiagnosticCategory.Error, "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054", "No index signature with a parameter of type '{0}' was found on type '{1}'."), - _0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type: diag(7055, DiagnosticCategory.Error, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055", "'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."), - The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed: diag(7056, DiagnosticCategory.Error, "The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056", "The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed."), - yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation: diag(7057, DiagnosticCategory.Error, "yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057", "'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."), - If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1: diag(7058, DiagnosticCategory.Error, "If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058", "If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"), - This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead: diag(7059, DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059", "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."), - This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint: diag(7060, DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060", "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."), - A_mapped_type_may_not_declare_properties_or_methods: diag(7061, DiagnosticCategory.Error, "A_mapped_type_may_not_declare_properties_or_methods_7061", "A mapped type may not declare properties or methods."), - You_cannot_rename_this_element: diag(8000, DiagnosticCategory.Error, "You_cannot_rename_this_element_8000", "You cannot rename this element."), - You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: diag(8001, DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", "You cannot rename elements that are defined in the standard TypeScript library."), - import_can_only_be_used_in_TypeScript_files: diag(8002, DiagnosticCategory.Error, "import_can_only_be_used_in_TypeScript_files_8002", "'import ... =' can only be used in TypeScript files."), - export_can_only_be_used_in_TypeScript_files: diag(8003, DiagnosticCategory.Error, "export_can_only_be_used_in_TypeScript_files_8003", "'export =' can only be used in TypeScript files."), - Type_parameter_declarations_can_only_be_used_in_TypeScript_files: diag(8004, DiagnosticCategory.Error, "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004", "Type parameter declarations can only be used in TypeScript files."), - implements_clauses_can_only_be_used_in_TypeScript_files: diag(8005, DiagnosticCategory.Error, "implements_clauses_can_only_be_used_in_TypeScript_files_8005", "'implements' clauses can only be used in TypeScript files."), - _0_declarations_can_only_be_used_in_TypeScript_files: diag(8006, DiagnosticCategory.Error, "_0_declarations_can_only_be_used_in_TypeScript_files_8006", "'{0}' declarations can only be used in TypeScript files."), - Type_aliases_can_only_be_used_in_TypeScript_files: diag(8008, DiagnosticCategory.Error, "Type_aliases_can_only_be_used_in_TypeScript_files_8008", "Type aliases can only be used in TypeScript files."), - The_0_modifier_can_only_be_used_in_TypeScript_files: diag(8009, DiagnosticCategory.Error, "The_0_modifier_can_only_be_used_in_TypeScript_files_8009", "The '{0}' modifier can only be used in TypeScript files."), - Type_annotations_can_only_be_used_in_TypeScript_files: diag(8010, DiagnosticCategory.Error, "Type_annotations_can_only_be_used_in_TypeScript_files_8010", "Type annotations can only be used in TypeScript files."), - Type_arguments_can_only_be_used_in_TypeScript_files: diag(8011, DiagnosticCategory.Error, "Type_arguments_can_only_be_used_in_TypeScript_files_8011", "Type arguments can only be used in TypeScript files."), - Parameter_modifiers_can_only_be_used_in_TypeScript_files: diag(8012, DiagnosticCategory.Error, "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012", "Parameter modifiers can only be used in TypeScript files."), - Non_null_assertions_can_only_be_used_in_TypeScript_files: diag(8013, DiagnosticCategory.Error, "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013", "Non-null assertions can only be used in TypeScript files."), - Type_assertion_expressions_can_only_be_used_in_TypeScript_files: diag(8016, DiagnosticCategory.Error, "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016", "Type assertion expressions can only be used in TypeScript files."), - Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0: diag(8017, DiagnosticCategory.Error, "Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017", "Octal literal types must use ES2015 syntax. Use the syntax '{0}'."), - Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0: diag(8018, DiagnosticCategory.Error, "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018", "Octal literals are not allowed in enums members initializer. Use the syntax '{0}'."), - Report_errors_in_js_files: diag(8019, DiagnosticCategory.Message, "Report_errors_in_js_files_8019", "Report errors in .js files."), - JSDoc_types_can_only_be_used_inside_documentation_comments: diag(8020, DiagnosticCategory.Error, "JSDoc_types_can_only_be_used_inside_documentation_comments_8020", "JSDoc types can only be used inside documentation comments."), - JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags: diag(8021, DiagnosticCategory.Error, "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021", "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."), - JSDoc_0_is_not_attached_to_a_class: diag(8022, DiagnosticCategory.Error, "JSDoc_0_is_not_attached_to_a_class_8022", "JSDoc '@{0}' is not attached to a class."), - JSDoc_0_1_does_not_match_the_extends_2_clause: diag(8023, DiagnosticCategory.Error, "JSDoc_0_1_does_not_match_the_extends_2_clause_8023", "JSDoc '@{0} {1}' does not match the 'extends {2}' clause."), - JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name: diag(8024, DiagnosticCategory.Error, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name."), - Class_declarations_cannot_have_more_than_one_augments_or_extends_tag: diag(8025, DiagnosticCategory.Error, "Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025", "Class declarations cannot have more than one '@augments' or '@extends' tag."), - Expected_0_type_arguments_provide_these_with_an_extends_tag: diag(8026, DiagnosticCategory.Error, "Expected_0_type_arguments_provide_these_with_an_extends_tag_8026", "Expected {0} type arguments; provide these with an '@extends' tag."), - Expected_0_1_type_arguments_provide_these_with_an_extends_tag: diag(8027, DiagnosticCategory.Error, "Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027", "Expected {0}-{1} type arguments; provide these with an '@extends' tag."), - JSDoc_may_only_appear_in_the_last_parameter_of_a_signature: diag(8028, DiagnosticCategory.Error, "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028", "JSDoc '...' may only appear in the last parameter of a signature."), - JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type: diag(8029, DiagnosticCategory.Error, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."), - The_type_of_a_function_declaration_must_match_the_function_s_signature: diag(8030, DiagnosticCategory.Error, "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030", "The type of a function declaration must match the function's signature."), - You_cannot_rename_a_module_via_a_global_import: diag(8031, DiagnosticCategory.Error, "You_cannot_rename_a_module_via_a_global_import_8031", "You cannot rename a module via a global import."), - Qualified_name_0_is_not_allowed_without_a_leading_param_object_1: diag(8032, DiagnosticCategory.Error, "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032", "Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."), - A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags: diag(8033, DiagnosticCategory.Error, "A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033", "A JSDoc '@typedef' comment may not contain multiple '@type' tags."), - The_tag_was_first_specified_here: diag(8034, DiagnosticCategory.Error, "The_tag_was_first_specified_here_8034", "The tag was first specified here."), - You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder: diag(8035, DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035", "You cannot rename elements that are defined in a 'node_modules' folder."), - You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder: diag(8036, DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036", "You cannot rename elements that are defined in another 'node_modules' folder."), - Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files: diag(8037, DiagnosticCategory.Error, "Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037", "Type satisfaction expressions can only be used in TypeScript files."), - Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9005, DiagnosticCategory.Error, "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005", "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."), - Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9006, DiagnosticCategory.Error, "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006", "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."), - Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9007, DiagnosticCategory.Error, "Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_decl_9007", "Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit."), - JSX_attributes_must_only_be_assigned_a_non_empty_expression: diag(17000, DiagnosticCategory.Error, "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", "JSX attributes must only be assigned a non-empty 'expression'."), - JSX_elements_cannot_have_multiple_attributes_with_the_same_name: diag(17001, DiagnosticCategory.Error, "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001", "JSX elements cannot have multiple attributes with the same name."), - Expected_corresponding_JSX_closing_tag_for_0: diag(17002, DiagnosticCategory.Error, "Expected_corresponding_JSX_closing_tag_for_0_17002", "Expected corresponding JSX closing tag for '{0}'."), - Cannot_use_JSX_unless_the_jsx_flag_is_provided: diag(17004, DiagnosticCategory.Error, "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004", "Cannot use JSX unless the '--jsx' flag is provided."), - A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: diag(17005, DiagnosticCategory.Error, "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", "A constructor cannot contain a 'super' call when its class extends 'null'."), - An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: diag(17006, DiagnosticCategory.Error, "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006", "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."), - A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: diag(17007, DiagnosticCategory.Error, "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007", "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."), - JSX_element_0_has_no_corresponding_closing_tag: diag(17008, DiagnosticCategory.Error, "JSX_element_0_has_no_corresponding_closing_tag_17008", "JSX element '{0}' has no corresponding closing tag."), - super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class: diag(17009, DiagnosticCategory.Error, "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", "'super' must be called before accessing 'this' in the constructor of a derived class."), - Unknown_type_acquisition_option_0: diag(17010, DiagnosticCategory.Error, "Unknown_type_acquisition_option_0_17010", "Unknown type acquisition option '{0}'."), - super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class: diag(17011, DiagnosticCategory.Error, "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011", "'super' must be called before accessing a property of 'super' in the constructor of a derived class."), - _0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2: diag(17012, DiagnosticCategory.Error, "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012", "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"), - Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor: diag(17013, DiagnosticCategory.Error, "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013", "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."), - JSX_fragment_has_no_corresponding_closing_tag: diag(17014, DiagnosticCategory.Error, "JSX_fragment_has_no_corresponding_closing_tag_17014", "JSX fragment has no corresponding closing tag."), - Expected_corresponding_closing_tag_for_JSX_fragment: diag(17015, DiagnosticCategory.Error, "Expected_corresponding_closing_tag_for_JSX_fragment_17015", "Expected corresponding closing tag for JSX fragment."), - The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option: diag(17016, DiagnosticCategory.Error, "The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_com_17016", "The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option."), - An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments: diag(17017, DiagnosticCategory.Error, "An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017", "An @jsxFrag pragma is required when using an @jsx pragma with JSX fragments."), - Unknown_type_acquisition_option_0_Did_you_mean_1: diag(17018, DiagnosticCategory.Error, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"), - Circularity_detected_while_resolving_configuration_Colon_0: diag(18000, DiagnosticCategory.Error, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"), - The_files_list_in_config_file_0_is_empty: diag(18002, DiagnosticCategory.Error, "The_files_list_in_config_file_0_is_empty_18002", "The 'files' list in config file '{0}' is empty."), - No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: diag(18003, DiagnosticCategory.Error, "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."), - File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module: diag(80001, DiagnosticCategory.Suggestion, "File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001", "File is a CommonJS module; it may be converted to an ES module."), - This_constructor_function_may_be_converted_to_a_class_declaration: diag(80002, DiagnosticCategory.Suggestion, "This_constructor_function_may_be_converted_to_a_class_declaration_80002", "This constructor function may be converted to a class declaration."), - Import_may_be_converted_to_a_default_import: diag(80003, DiagnosticCategory.Suggestion, "Import_may_be_converted_to_a_default_import_80003", "Import may be converted to a default import."), - JSDoc_types_may_be_moved_to_TypeScript_types: diag(80004, DiagnosticCategory.Suggestion, "JSDoc_types_may_be_moved_to_TypeScript_types_80004", "JSDoc types may be moved to TypeScript types."), - require_call_may_be_converted_to_an_import: diag(80005, DiagnosticCategory.Suggestion, "require_call_may_be_converted_to_an_import_80005", "'require' call may be converted to an import."), - This_may_be_converted_to_an_async_function: diag(80006, DiagnosticCategory.Suggestion, "This_may_be_converted_to_an_async_function_80006", "This may be converted to an async function."), - await_has_no_effect_on_the_type_of_this_expression: diag(80007, DiagnosticCategory.Suggestion, "await_has_no_effect_on_the_type_of_this_expression_80007", "'await' has no effect on the type of this expression."), - Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers: diag(80008, DiagnosticCategory.Suggestion, "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008", "Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers."), - Add_missing_super_call: diag(90001, DiagnosticCategory.Message, "Add_missing_super_call_90001", "Add missing 'super()' call"), - Make_super_call_the_first_statement_in_the_constructor: diag(90002, DiagnosticCategory.Message, "Make_super_call_the_first_statement_in_the_constructor_90002", "Make 'super()' call the first statement in the constructor"), - Change_extends_to_implements: diag(90003, DiagnosticCategory.Message, "Change_extends_to_implements_90003", "Change 'extends' to 'implements'"), - Remove_unused_declaration_for_Colon_0: diag(90004, DiagnosticCategory.Message, "Remove_unused_declaration_for_Colon_0_90004", "Remove unused declaration for: '{0}'"), - Remove_import_from_0: diag(90005, DiagnosticCategory.Message, "Remove_import_from_0_90005", "Remove import from '{0}'"), - Implement_interface_0: diag(90006, DiagnosticCategory.Message, "Implement_interface_0_90006", "Implement interface '{0}'"), - Implement_inherited_abstract_class: diag(90007, DiagnosticCategory.Message, "Implement_inherited_abstract_class_90007", "Implement inherited abstract class"), - Add_0_to_unresolved_variable: diag(90008, DiagnosticCategory.Message, "Add_0_to_unresolved_variable_90008", "Add '{0}.' to unresolved variable"), - Remove_variable_statement: diag(90010, DiagnosticCategory.Message, "Remove_variable_statement_90010", "Remove variable statement"), - Remove_template_tag: diag(90011, DiagnosticCategory.Message, "Remove_template_tag_90011", "Remove template tag"), - Remove_type_parameters: diag(90012, DiagnosticCategory.Message, "Remove_type_parameters_90012", "Remove type parameters"), - Import_0_from_1: diag(90013, DiagnosticCategory.Message, "Import_0_from_1_90013", "Import '{0}' from \"{1}\""), - Change_0_to_1: diag(90014, DiagnosticCategory.Message, "Change_0_to_1_90014", "Change '{0}' to '{1}'"), - Declare_property_0: diag(90016, DiagnosticCategory.Message, "Declare_property_0_90016", "Declare property '{0}'"), - Add_index_signature_for_property_0: diag(90017, DiagnosticCategory.Message, "Add_index_signature_for_property_0_90017", "Add index signature for property '{0}'"), - Disable_checking_for_this_file: diag(90018, DiagnosticCategory.Message, "Disable_checking_for_this_file_90018", "Disable checking for this file"), - Ignore_this_error_message: diag(90019, DiagnosticCategory.Message, "Ignore_this_error_message_90019", "Ignore this error message"), - Initialize_property_0_in_the_constructor: diag(90020, DiagnosticCategory.Message, "Initialize_property_0_in_the_constructor_90020", "Initialize property '{0}' in the constructor"), - Initialize_static_property_0: diag(90021, DiagnosticCategory.Message, "Initialize_static_property_0_90021", "Initialize static property '{0}'"), - Change_spelling_to_0: diag(90022, DiagnosticCategory.Message, "Change_spelling_to_0_90022", "Change spelling to '{0}'"), - Declare_method_0: diag(90023, DiagnosticCategory.Message, "Declare_method_0_90023", "Declare method '{0}'"), - Declare_static_method_0: diag(90024, DiagnosticCategory.Message, "Declare_static_method_0_90024", "Declare static method '{0}'"), - Prefix_0_with_an_underscore: diag(90025, DiagnosticCategory.Message, "Prefix_0_with_an_underscore_90025", "Prefix '{0}' with an underscore"), - Rewrite_as_the_indexed_access_type_0: diag(90026, DiagnosticCategory.Message, "Rewrite_as_the_indexed_access_type_0_90026", "Rewrite as the indexed access type '{0}'"), - Declare_static_property_0: diag(90027, DiagnosticCategory.Message, "Declare_static_property_0_90027", "Declare static property '{0}'"), - Call_decorator_expression: diag(90028, DiagnosticCategory.Message, "Call_decorator_expression_90028", "Call decorator expression"), - Add_async_modifier_to_containing_function: diag(90029, DiagnosticCategory.Message, "Add_async_modifier_to_containing_function_90029", "Add async modifier to containing function"), - Replace_infer_0_with_unknown: diag(90030, DiagnosticCategory.Message, "Replace_infer_0_with_unknown_90030", "Replace 'infer {0}' with 'unknown'"), - Replace_all_unused_infer_with_unknown: diag(90031, DiagnosticCategory.Message, "Replace_all_unused_infer_with_unknown_90031", "Replace all unused 'infer' with 'unknown'"), - Add_parameter_name: diag(90034, DiagnosticCategory.Message, "Add_parameter_name_90034", "Add parameter name"), - Declare_private_property_0: diag(90035, DiagnosticCategory.Message, "Declare_private_property_0_90035", "Declare private property '{0}'"), - Replace_0_with_Promise_1: diag(90036, DiagnosticCategory.Message, "Replace_0_with_Promise_1_90036", "Replace '{0}' with 'Promise<{1}>'"), - Fix_all_incorrect_return_type_of_an_async_functions: diag(90037, DiagnosticCategory.Message, "Fix_all_incorrect_return_type_of_an_async_functions_90037", "Fix all incorrect return type of an async functions"), - Declare_private_method_0: diag(90038, DiagnosticCategory.Message, "Declare_private_method_0_90038", "Declare private method '{0}'"), - Remove_unused_destructuring_declaration: diag(90039, DiagnosticCategory.Message, "Remove_unused_destructuring_declaration_90039", "Remove unused destructuring declaration"), - Remove_unused_declarations_for_Colon_0: diag(90041, DiagnosticCategory.Message, "Remove_unused_declarations_for_Colon_0_90041", "Remove unused declarations for: '{0}'"), - Declare_a_private_field_named_0: diag(90053, DiagnosticCategory.Message, "Declare_a_private_field_named_0_90053", "Declare a private field named '{0}'."), - Includes_imports_of_types_referenced_by_0: diag(90054, DiagnosticCategory.Message, "Includes_imports_of_types_referenced_by_0_90054", "Includes imports of types referenced by '{0}'"), - Remove_type_from_import_declaration_from_0: diag(90055, DiagnosticCategory.Message, "Remove_type_from_import_declaration_from_0_90055", "Remove 'type' from import declaration from \"{0}\""), - Remove_type_from_import_of_0_from_1: diag(90056, DiagnosticCategory.Message, "Remove_type_from_import_of_0_from_1_90056", "Remove 'type' from import of '{0}' from \"{1}\""), - Add_import_from_0: diag(90057, DiagnosticCategory.Message, "Add_import_from_0_90057", "Add import from \"{0}\""), - Update_import_from_0: diag(90058, DiagnosticCategory.Message, "Update_import_from_0_90058", "Update import from \"{0}\""), - Export_0_from_module_1: diag(90059, DiagnosticCategory.Message, "Export_0_from_module_1_90059", "Export '{0}' from module '{1}'"), - Export_all_referenced_locals: diag(90060, DiagnosticCategory.Message, "Export_all_referenced_locals_90060", "Export all referenced locals"), - Convert_function_to_an_ES2015_class: diag(95001, DiagnosticCategory.Message, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"), - Convert_0_to_1_in_0: diag(95003, DiagnosticCategory.Message, "Convert_0_to_1_in_0_95003", "Convert '{0}' to '{1} in {0}'"), - Extract_to_0_in_1: diag(95004, DiagnosticCategory.Message, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"), - Extract_function: diag(95005, DiagnosticCategory.Message, "Extract_function_95005", "Extract function"), - Extract_constant: diag(95006, DiagnosticCategory.Message, "Extract_constant_95006", "Extract constant"), - Extract_to_0_in_enclosing_scope: diag(95007, DiagnosticCategory.Message, "Extract_to_0_in_enclosing_scope_95007", "Extract to {0} in enclosing scope"), - Extract_to_0_in_1_scope: diag(95008, DiagnosticCategory.Message, "Extract_to_0_in_1_scope_95008", "Extract to {0} in {1} scope"), - Annotate_with_type_from_JSDoc: diag(95009, DiagnosticCategory.Message, "Annotate_with_type_from_JSDoc_95009", "Annotate with type from JSDoc"), - Infer_type_of_0_from_usage: diag(95011, DiagnosticCategory.Message, "Infer_type_of_0_from_usage_95011", "Infer type of '{0}' from usage"), - Infer_parameter_types_from_usage: diag(95012, DiagnosticCategory.Message, "Infer_parameter_types_from_usage_95012", "Infer parameter types from usage"), - Convert_to_default_import: diag(95013, DiagnosticCategory.Message, "Convert_to_default_import_95013", "Convert to default import"), - Install_0: diag(95014, DiagnosticCategory.Message, "Install_0_95014", "Install '{0}'"), - Replace_import_with_0: diag(95015, DiagnosticCategory.Message, "Replace_import_with_0_95015", "Replace import with '{0}'."), - Use_synthetic_default_member: diag(95016, DiagnosticCategory.Message, "Use_synthetic_default_member_95016", "Use synthetic 'default' member."), - Convert_to_ES_module: diag(95017, DiagnosticCategory.Message, "Convert_to_ES_module_95017", "Convert to ES module"), - Add_undefined_type_to_property_0: diag(95018, DiagnosticCategory.Message, "Add_undefined_type_to_property_0_95018", "Add 'undefined' type to property '{0}'"), - Add_initializer_to_property_0: diag(95019, DiagnosticCategory.Message, "Add_initializer_to_property_0_95019", "Add initializer to property '{0}'"), - Add_definite_assignment_assertion_to_property_0: diag(95020, DiagnosticCategory.Message, "Add_definite_assignment_assertion_to_property_0_95020", "Add definite assignment assertion to property '{0}'"), - Convert_all_type_literals_to_mapped_type: diag(95021, DiagnosticCategory.Message, "Convert_all_type_literals_to_mapped_type_95021", "Convert all type literals to mapped type"), - Add_all_missing_members: diag(95022, DiagnosticCategory.Message, "Add_all_missing_members_95022", "Add all missing members"), - Infer_all_types_from_usage: diag(95023, DiagnosticCategory.Message, "Infer_all_types_from_usage_95023", "Infer all types from usage"), - Delete_all_unused_declarations: diag(95024, DiagnosticCategory.Message, "Delete_all_unused_declarations_95024", "Delete all unused declarations"), - Prefix_all_unused_declarations_with_where_possible: diag(95025, DiagnosticCategory.Message, "Prefix_all_unused_declarations_with_where_possible_95025", "Prefix all unused declarations with '_' where possible"), - Fix_all_detected_spelling_errors: diag(95026, DiagnosticCategory.Message, "Fix_all_detected_spelling_errors_95026", "Fix all detected spelling errors"), - Add_initializers_to_all_uninitialized_properties: diag(95027, DiagnosticCategory.Message, "Add_initializers_to_all_uninitialized_properties_95027", "Add initializers to all uninitialized properties"), - Add_definite_assignment_assertions_to_all_uninitialized_properties: diag(95028, DiagnosticCategory.Message, "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028", "Add definite assignment assertions to all uninitialized properties"), - Add_undefined_type_to_all_uninitialized_properties: diag(95029, DiagnosticCategory.Message, "Add_undefined_type_to_all_uninitialized_properties_95029", "Add undefined type to all uninitialized properties"), - Change_all_jsdoc_style_types_to_TypeScript: diag(95030, DiagnosticCategory.Message, "Change_all_jsdoc_style_types_to_TypeScript_95030", "Change all jsdoc-style types to TypeScript"), - Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types: diag(95031, DiagnosticCategory.Message, "Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031", "Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"), - Implement_all_unimplemented_interfaces: diag(95032, DiagnosticCategory.Message, "Implement_all_unimplemented_interfaces_95032", "Implement all unimplemented interfaces"), - Install_all_missing_types_packages: diag(95033, DiagnosticCategory.Message, "Install_all_missing_types_packages_95033", "Install all missing types packages"), - Rewrite_all_as_indexed_access_types: diag(95034, DiagnosticCategory.Message, "Rewrite_all_as_indexed_access_types_95034", "Rewrite all as indexed access types"), - Convert_all_to_default_imports: diag(95035, DiagnosticCategory.Message, "Convert_all_to_default_imports_95035", "Convert all to default imports"), - Make_all_super_calls_the_first_statement_in_their_constructor: diag(95036, DiagnosticCategory.Message, "Make_all_super_calls_the_first_statement_in_their_constructor_95036", "Make all 'super()' calls the first statement in their constructor"), - Add_qualifier_to_all_unresolved_variables_matching_a_member_name: diag(95037, DiagnosticCategory.Message, "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037", "Add qualifier to all unresolved variables matching a member name"), - Change_all_extended_interfaces_to_implements: diag(95038, DiagnosticCategory.Message, "Change_all_extended_interfaces_to_implements_95038", "Change all extended interfaces to 'implements'"), - Add_all_missing_super_calls: diag(95039, DiagnosticCategory.Message, "Add_all_missing_super_calls_95039", "Add all missing super calls"), - Implement_all_inherited_abstract_classes: diag(95040, DiagnosticCategory.Message, "Implement_all_inherited_abstract_classes_95040", "Implement all inherited abstract classes"), - Add_all_missing_async_modifiers: diag(95041, DiagnosticCategory.Message, "Add_all_missing_async_modifiers_95041", "Add all missing 'async' modifiers"), - Add_ts_ignore_to_all_error_messages: diag(95042, DiagnosticCategory.Message, "Add_ts_ignore_to_all_error_messages_95042", "Add '@ts-ignore' to all error messages"), - Annotate_everything_with_types_from_JSDoc: diag(95043, DiagnosticCategory.Message, "Annotate_everything_with_types_from_JSDoc_95043", "Annotate everything with types from JSDoc"), - Add_to_all_uncalled_decorators: diag(95044, DiagnosticCategory.Message, "Add_to_all_uncalled_decorators_95044", "Add '()' to all uncalled decorators"), - Convert_all_constructor_functions_to_classes: diag(95045, DiagnosticCategory.Message, "Convert_all_constructor_functions_to_classes_95045", "Convert all constructor functions to classes"), - Generate_get_and_set_accessors: diag(95046, DiagnosticCategory.Message, "Generate_get_and_set_accessors_95046", "Generate 'get' and 'set' accessors"), - Convert_require_to_import: diag(95047, DiagnosticCategory.Message, "Convert_require_to_import_95047", "Convert 'require' to 'import'"), - Convert_all_require_to_import: diag(95048, DiagnosticCategory.Message, "Convert_all_require_to_import_95048", "Convert all 'require' to 'import'"), - Move_to_a_new_file: diag(95049, DiagnosticCategory.Message, "Move_to_a_new_file_95049", "Move to a new file"), - Remove_unreachable_code: diag(95050, DiagnosticCategory.Message, "Remove_unreachable_code_95050", "Remove unreachable code"), - Remove_all_unreachable_code: diag(95051, DiagnosticCategory.Message, "Remove_all_unreachable_code_95051", "Remove all unreachable code"), - Add_missing_typeof: diag(95052, DiagnosticCategory.Message, "Add_missing_typeof_95052", "Add missing 'typeof'"), - Remove_unused_label: diag(95053, DiagnosticCategory.Message, "Remove_unused_label_95053", "Remove unused label"), - Remove_all_unused_labels: diag(95054, DiagnosticCategory.Message, "Remove_all_unused_labels_95054", "Remove all unused labels"), - Convert_0_to_mapped_object_type: diag(95055, DiagnosticCategory.Message, "Convert_0_to_mapped_object_type_95055", "Convert '{0}' to mapped object type"), - Convert_namespace_import_to_named_imports: diag(95056, DiagnosticCategory.Message, "Convert_namespace_import_to_named_imports_95056", "Convert namespace import to named imports"), - Convert_named_imports_to_namespace_import: diag(95057, DiagnosticCategory.Message, "Convert_named_imports_to_namespace_import_95057", "Convert named imports to namespace import"), - Add_or_remove_braces_in_an_arrow_function: diag(95058, DiagnosticCategory.Message, "Add_or_remove_braces_in_an_arrow_function_95058", "Add or remove braces in an arrow function"), - Add_braces_to_arrow_function: diag(95059, DiagnosticCategory.Message, "Add_braces_to_arrow_function_95059", "Add braces to arrow function"), - Remove_braces_from_arrow_function: diag(95060, DiagnosticCategory.Message, "Remove_braces_from_arrow_function_95060", "Remove braces from arrow function"), - Convert_default_export_to_named_export: diag(95061, DiagnosticCategory.Message, "Convert_default_export_to_named_export_95061", "Convert default export to named export"), - Convert_named_export_to_default_export: diag(95062, DiagnosticCategory.Message, "Convert_named_export_to_default_export_95062", "Convert named export to default export"), - Add_missing_enum_member_0: diag(95063, DiagnosticCategory.Message, "Add_missing_enum_member_0_95063", "Add missing enum member '{0}'"), - Add_all_missing_imports: diag(95064, DiagnosticCategory.Message, "Add_all_missing_imports_95064", "Add all missing imports"), - Convert_to_async_function: diag(95065, DiagnosticCategory.Message, "Convert_to_async_function_95065", "Convert to async function"), - Convert_all_to_async_functions: diag(95066, DiagnosticCategory.Message, "Convert_all_to_async_functions_95066", "Convert all to async functions"), - Add_missing_call_parentheses: diag(95067, DiagnosticCategory.Message, "Add_missing_call_parentheses_95067", "Add missing call parentheses"), - Add_all_missing_call_parentheses: diag(95068, DiagnosticCategory.Message, "Add_all_missing_call_parentheses_95068", "Add all missing call parentheses"), - Add_unknown_conversion_for_non_overlapping_types: diag(95069, DiagnosticCategory.Message, "Add_unknown_conversion_for_non_overlapping_types_95069", "Add 'unknown' conversion for non-overlapping types"), - Add_unknown_to_all_conversions_of_non_overlapping_types: diag(95070, DiagnosticCategory.Message, "Add_unknown_to_all_conversions_of_non_overlapping_types_95070", "Add 'unknown' to all conversions of non-overlapping types"), - Add_missing_new_operator_to_call: diag(95071, DiagnosticCategory.Message, "Add_missing_new_operator_to_call_95071", "Add missing 'new' operator to call"), - Add_missing_new_operator_to_all_calls: diag(95072, DiagnosticCategory.Message, "Add_missing_new_operator_to_all_calls_95072", "Add missing 'new' operator to all calls"), - Add_names_to_all_parameters_without_names: diag(95073, DiagnosticCategory.Message, "Add_names_to_all_parameters_without_names_95073", "Add names to all parameters without names"), - Enable_the_experimentalDecorators_option_in_your_configuration_file: diag(95074, DiagnosticCategory.Message, "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074", "Enable the 'experimentalDecorators' option in your configuration file"), - Convert_parameters_to_destructured_object: diag(95075, DiagnosticCategory.Message, "Convert_parameters_to_destructured_object_95075", "Convert parameters to destructured object"), - Extract_type: diag(95077, DiagnosticCategory.Message, "Extract_type_95077", "Extract type"), - Extract_to_type_alias: diag(95078, DiagnosticCategory.Message, "Extract_to_type_alias_95078", "Extract to type alias"), - Extract_to_typedef: diag(95079, DiagnosticCategory.Message, "Extract_to_typedef_95079", "Extract to typedef"), - Infer_this_type_of_0_from_usage: diag(95080, DiagnosticCategory.Message, "Infer_this_type_of_0_from_usage_95080", "Infer 'this' type of '{0}' from usage"), - Add_const_to_unresolved_variable: diag(95081, DiagnosticCategory.Message, "Add_const_to_unresolved_variable_95081", "Add 'const' to unresolved variable"), - Add_const_to_all_unresolved_variables: diag(95082, DiagnosticCategory.Message, "Add_const_to_all_unresolved_variables_95082", "Add 'const' to all unresolved variables"), - Add_await: diag(95083, DiagnosticCategory.Message, "Add_await_95083", "Add 'await'"), - Add_await_to_initializer_for_0: diag(95084, DiagnosticCategory.Message, "Add_await_to_initializer_for_0_95084", "Add 'await' to initializer for '{0}'"), - Fix_all_expressions_possibly_missing_await: diag(95085, DiagnosticCategory.Message, "Fix_all_expressions_possibly_missing_await_95085", "Fix all expressions possibly missing 'await'"), - Remove_unnecessary_await: diag(95086, DiagnosticCategory.Message, "Remove_unnecessary_await_95086", "Remove unnecessary 'await'"), - Remove_all_unnecessary_uses_of_await: diag(95087, DiagnosticCategory.Message, "Remove_all_unnecessary_uses_of_await_95087", "Remove all unnecessary uses of 'await'"), - Enable_the_jsx_flag_in_your_configuration_file: diag(95088, DiagnosticCategory.Message, "Enable_the_jsx_flag_in_your_configuration_file_95088", "Enable the '--jsx' flag in your configuration file"), - Add_await_to_initializers: diag(95089, DiagnosticCategory.Message, "Add_await_to_initializers_95089", "Add 'await' to initializers"), - Extract_to_interface: diag(95090, DiagnosticCategory.Message, "Extract_to_interface_95090", "Extract to interface"), - Convert_to_a_bigint_numeric_literal: diag(95091, DiagnosticCategory.Message, "Convert_to_a_bigint_numeric_literal_95091", "Convert to a bigint numeric literal"), - Convert_all_to_bigint_numeric_literals: diag(95092, DiagnosticCategory.Message, "Convert_all_to_bigint_numeric_literals_95092", "Convert all to bigint numeric literals"), - Convert_const_to_let: diag(95093, DiagnosticCategory.Message, "Convert_const_to_let_95093", "Convert 'const' to 'let'"), - Prefix_with_declare: diag(95094, DiagnosticCategory.Message, "Prefix_with_declare_95094", "Prefix with 'declare'"), - Prefix_all_incorrect_property_declarations_with_declare: diag(95095, DiagnosticCategory.Message, "Prefix_all_incorrect_property_declarations_with_declare_95095", "Prefix all incorrect property declarations with 'declare'"), - Convert_to_template_string: diag(95096, DiagnosticCategory.Message, "Convert_to_template_string_95096", "Convert to template string"), - Add_export_to_make_this_file_into_a_module: diag(95097, DiagnosticCategory.Message, "Add_export_to_make_this_file_into_a_module_95097", "Add 'export {}' to make this file into a module"), - Set_the_target_option_in_your_configuration_file_to_0: diag(95098, DiagnosticCategory.Message, "Set_the_target_option_in_your_configuration_file_to_0_95098", "Set the 'target' option in your configuration file to '{0}'"), - Set_the_module_option_in_your_configuration_file_to_0: diag(95099, DiagnosticCategory.Message, "Set_the_module_option_in_your_configuration_file_to_0_95099", "Set the 'module' option in your configuration file to '{0}'"), - Convert_invalid_character_to_its_html_entity_code: diag(95100, DiagnosticCategory.Message, "Convert_invalid_character_to_its_html_entity_code_95100", "Convert invalid character to its html entity code"), - Convert_all_invalid_characters_to_HTML_entity_code: diag(95101, DiagnosticCategory.Message, "Convert_all_invalid_characters_to_HTML_entity_code_95101", "Convert all invalid characters to HTML entity code"), - Convert_all_const_to_let: diag(95102, DiagnosticCategory.Message, "Convert_all_const_to_let_95102", "Convert all 'const' to 'let'"), - Convert_function_expression_0_to_arrow_function: diag(95105, DiagnosticCategory.Message, "Convert_function_expression_0_to_arrow_function_95105", "Convert function expression '{0}' to arrow function"), - Convert_function_declaration_0_to_arrow_function: diag(95106, DiagnosticCategory.Message, "Convert_function_declaration_0_to_arrow_function_95106", "Convert function declaration '{0}' to arrow function"), - Fix_all_implicit_this_errors: diag(95107, DiagnosticCategory.Message, "Fix_all_implicit_this_errors_95107", "Fix all implicit-'this' errors"), - Wrap_invalid_character_in_an_expression_container: diag(95108, DiagnosticCategory.Message, "Wrap_invalid_character_in_an_expression_container_95108", "Wrap invalid character in an expression container"), - Wrap_all_invalid_characters_in_an_expression_container: diag(95109, DiagnosticCategory.Message, "Wrap_all_invalid_characters_in_an_expression_container_95109", "Wrap all invalid characters in an expression container"), - Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file: diag(95110, DiagnosticCategory.Message, "Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110", "Visit https://aka.ms/tsconfig to read more about this file"), - Add_a_return_statement: diag(95111, DiagnosticCategory.Message, "Add_a_return_statement_95111", "Add a return statement"), - Remove_braces_from_arrow_function_body: diag(95112, DiagnosticCategory.Message, "Remove_braces_from_arrow_function_body_95112", "Remove braces from arrow function body"), - Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal: diag(95113, DiagnosticCategory.Message, "Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113", "Wrap the following body with parentheses which should be an object literal"), - Add_all_missing_return_statement: diag(95114, DiagnosticCategory.Message, "Add_all_missing_return_statement_95114", "Add all missing return statement"), - Remove_braces_from_all_arrow_function_bodies_with_relevant_issues: diag(95115, DiagnosticCategory.Message, "Remove_braces_from_all_arrow_function_bodies_with_relevant_issues_95115", "Remove braces from all arrow function bodies with relevant issues"), - Wrap_all_object_literal_with_parentheses: diag(95116, DiagnosticCategory.Message, "Wrap_all_object_literal_with_parentheses_95116", "Wrap all object literal with parentheses"), - Move_labeled_tuple_element_modifiers_to_labels: diag(95117, DiagnosticCategory.Message, "Move_labeled_tuple_element_modifiers_to_labels_95117", "Move labeled tuple element modifiers to labels"), - Convert_overload_list_to_single_signature: diag(95118, DiagnosticCategory.Message, "Convert_overload_list_to_single_signature_95118", "Convert overload list to single signature"), - Generate_get_and_set_accessors_for_all_overriding_properties: diag(95119, DiagnosticCategory.Message, "Generate_get_and_set_accessors_for_all_overriding_properties_95119", "Generate 'get' and 'set' accessors for all overriding properties"), - Wrap_in_JSX_fragment: diag(95120, DiagnosticCategory.Message, "Wrap_in_JSX_fragment_95120", "Wrap in JSX fragment"), - Wrap_all_unparented_JSX_in_JSX_fragment: diag(95121, DiagnosticCategory.Message, "Wrap_all_unparented_JSX_in_JSX_fragment_95121", "Wrap all unparented JSX in JSX fragment"), - Convert_arrow_function_or_function_expression: diag(95122, DiagnosticCategory.Message, "Convert_arrow_function_or_function_expression_95122", "Convert arrow function or function expression"), - Convert_to_anonymous_function: diag(95123, DiagnosticCategory.Message, "Convert_to_anonymous_function_95123", "Convert to anonymous function"), - Convert_to_named_function: diag(95124, DiagnosticCategory.Message, "Convert_to_named_function_95124", "Convert to named function"), - Convert_to_arrow_function: diag(95125, DiagnosticCategory.Message, "Convert_to_arrow_function_95125", "Convert to arrow function"), - Remove_parentheses: diag(95126, DiagnosticCategory.Message, "Remove_parentheses_95126", "Remove parentheses"), - Could_not_find_a_containing_arrow_function: diag(95127, DiagnosticCategory.Message, "Could_not_find_a_containing_arrow_function_95127", "Could not find a containing arrow function"), - Containing_function_is_not_an_arrow_function: diag(95128, DiagnosticCategory.Message, "Containing_function_is_not_an_arrow_function_95128", "Containing function is not an arrow function"), - Could_not_find_export_statement: diag(95129, DiagnosticCategory.Message, "Could_not_find_export_statement_95129", "Could not find export statement"), - This_file_already_has_a_default_export: diag(95130, DiagnosticCategory.Message, "This_file_already_has_a_default_export_95130", "This file already has a default export"), - Could_not_find_import_clause: diag(95131, DiagnosticCategory.Message, "Could_not_find_import_clause_95131", "Could not find import clause"), - Could_not_find_namespace_import_or_named_imports: diag(95132, DiagnosticCategory.Message, "Could_not_find_namespace_import_or_named_imports_95132", "Could not find namespace import or named imports"), - Selection_is_not_a_valid_type_node: diag(95133, DiagnosticCategory.Message, "Selection_is_not_a_valid_type_node_95133", "Selection is not a valid type node"), - No_type_could_be_extracted_from_this_type_node: diag(95134, DiagnosticCategory.Message, "No_type_could_be_extracted_from_this_type_node_95134", "No type could be extracted from this type node"), - Could_not_find_property_for_which_to_generate_accessor: diag(95135, DiagnosticCategory.Message, "Could_not_find_property_for_which_to_generate_accessor_95135", "Could not find property for which to generate accessor"), - Name_is_not_valid: diag(95136, DiagnosticCategory.Message, "Name_is_not_valid_95136", "Name is not valid"), - Can_only_convert_property_with_modifier: diag(95137, DiagnosticCategory.Message, "Can_only_convert_property_with_modifier_95137", "Can only convert property with modifier"), - Switch_each_misused_0_to_1: diag(95138, DiagnosticCategory.Message, "Switch_each_misused_0_to_1_95138", "Switch each misused '{0}' to '{1}'"), - Convert_to_optional_chain_expression: diag(95139, DiagnosticCategory.Message, "Convert_to_optional_chain_expression_95139", "Convert to optional chain expression"), - Could_not_find_convertible_access_expression: diag(95140, DiagnosticCategory.Message, "Could_not_find_convertible_access_expression_95140", "Could not find convertible access expression"), - Could_not_find_matching_access_expressions: diag(95141, DiagnosticCategory.Message, "Could_not_find_matching_access_expressions_95141", "Could not find matching access expressions"), - Can_only_convert_logical_AND_access_chains: diag(95142, DiagnosticCategory.Message, "Can_only_convert_logical_AND_access_chains_95142", "Can only convert logical AND access chains"), - Add_void_to_Promise_resolved_without_a_value: diag(95143, DiagnosticCategory.Message, "Add_void_to_Promise_resolved_without_a_value_95143", "Add 'void' to Promise resolved without a value"), - Add_void_to_all_Promises_resolved_without_a_value: diag(95144, DiagnosticCategory.Message, "Add_void_to_all_Promises_resolved_without_a_value_95144", "Add 'void' to all Promises resolved without a value"), - Use_element_access_for_0: diag(95145, DiagnosticCategory.Message, "Use_element_access_for_0_95145", "Use element access for '{0}'"), - Use_element_access_for_all_undeclared_properties: diag(95146, DiagnosticCategory.Message, "Use_element_access_for_all_undeclared_properties_95146", "Use element access for all undeclared properties."), - Delete_all_unused_imports: diag(95147, DiagnosticCategory.Message, "Delete_all_unused_imports_95147", "Delete all unused imports"), - Infer_function_return_type: diag(95148, DiagnosticCategory.Message, "Infer_function_return_type_95148", "Infer function return type"), - Return_type_must_be_inferred_from_a_function: diag(95149, DiagnosticCategory.Message, "Return_type_must_be_inferred_from_a_function_95149", "Return type must be inferred from a function"), - Could_not_determine_function_return_type: diag(95150, DiagnosticCategory.Message, "Could_not_determine_function_return_type_95150", "Could not determine function return type"), - Could_not_convert_to_arrow_function: diag(95151, DiagnosticCategory.Message, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"), - Could_not_convert_to_named_function: diag(95152, DiagnosticCategory.Message, "Could_not_convert_to_named_function_95152", "Could not convert to named function"), - Could_not_convert_to_anonymous_function: diag(95153, DiagnosticCategory.Message, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"), - Can_only_convert_string_concatenation: diag(95154, DiagnosticCategory.Message, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"), - Selection_is_not_a_valid_statement_or_statements: diag(95155, DiagnosticCategory.Message, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"), - Add_missing_function_declaration_0: diag(95156, DiagnosticCategory.Message, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"), - Add_all_missing_function_declarations: diag(95157, DiagnosticCategory.Message, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"), - Method_not_implemented: diag(95158, DiagnosticCategory.Message, "Method_not_implemented_95158", "Method not implemented."), - Function_not_implemented: diag(95159, DiagnosticCategory.Message, "Function_not_implemented_95159", "Function not implemented."), - Add_override_modifier: diag(95160, DiagnosticCategory.Message, "Add_override_modifier_95160", "Add 'override' modifier"), - Remove_override_modifier: diag(95161, DiagnosticCategory.Message, "Remove_override_modifier_95161", "Remove 'override' modifier"), - Add_all_missing_override_modifiers: diag(95162, DiagnosticCategory.Message, "Add_all_missing_override_modifiers_95162", "Add all missing 'override' modifiers"), - Remove_all_unnecessary_override_modifiers: diag(95163, DiagnosticCategory.Message, "Remove_all_unnecessary_override_modifiers_95163", "Remove all unnecessary 'override' modifiers"), - Can_only_convert_named_export: diag(95164, DiagnosticCategory.Message, "Can_only_convert_named_export_95164", "Can only convert named export"), - Add_missing_properties: diag(95165, DiagnosticCategory.Message, "Add_missing_properties_95165", "Add missing properties"), - Add_all_missing_properties: diag(95166, DiagnosticCategory.Message, "Add_all_missing_properties_95166", "Add all missing properties"), - Add_missing_attributes: diag(95167, DiagnosticCategory.Message, "Add_missing_attributes_95167", "Add missing attributes"), - Add_all_missing_attributes: diag(95168, DiagnosticCategory.Message, "Add_all_missing_attributes_95168", "Add all missing attributes"), - Add_undefined_to_optional_property_type: diag(95169, DiagnosticCategory.Message, "Add_undefined_to_optional_property_type_95169", "Add 'undefined' to optional property type"), - Convert_named_imports_to_default_import: diag(95170, DiagnosticCategory.Message, "Convert_named_imports_to_default_import_95170", "Convert named imports to default import"), - Delete_unused_param_tag_0: diag(95171, DiagnosticCategory.Message, "Delete_unused_param_tag_0_95171", "Delete unused '@param' tag '{0}'"), - Delete_all_unused_param_tags: diag(95172, DiagnosticCategory.Message, "Delete_all_unused_param_tags_95172", "Delete all unused '@param' tags"), - Rename_param_tag_name_0_to_1: diag(95173, DiagnosticCategory.Message, "Rename_param_tag_name_0_to_1_95173", "Rename '@param' tag name '{0}' to '{1}'"), - Use_0: diag(95174, DiagnosticCategory.Message, "Use_0_95174", "Use `{0}`."), - Use_Number_isNaN_in_all_conditions: diag(95175, DiagnosticCategory.Message, "Use_Number_isNaN_in_all_conditions_95175", "Use `Number.isNaN` in all conditions."), - No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, DiagnosticCategory.Error, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."), - Classes_may_not_have_a_field_named_constructor: diag(18006, DiagnosticCategory.Error, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."), - JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, DiagnosticCategory.Error, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"), - Private_identifiers_cannot_be_used_as_parameters: diag(18009, DiagnosticCategory.Error, "Private_identifiers_cannot_be_used_as_parameters_18009", "Private identifiers cannot be used as parameters."), - An_accessibility_modifier_cannot_be_used_with_a_private_identifier: diag(18010, DiagnosticCategory.Error, "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010", "An accessibility modifier cannot be used with a private identifier."), - The_operand_of_a_delete_operator_cannot_be_a_private_identifier: diag(18011, DiagnosticCategory.Error, "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011", "The operand of a 'delete' operator cannot be a private identifier."), - constructor_is_a_reserved_word: diag(18012, DiagnosticCategory.Error, "constructor_is_a_reserved_word_18012", "'#constructor' is a reserved word."), - Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier: diag(18013, DiagnosticCategory.Error, "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013", "Property '{0}' is not accessible outside class '{1}' because it has a private identifier."), - The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling: diag(18014, DiagnosticCategory.Error, "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014", "The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling."), - Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2: diag(18015, DiagnosticCategory.Error, "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015", "Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'."), - Private_identifiers_are_not_allowed_outside_class_bodies: diag(18016, DiagnosticCategory.Error, "Private_identifiers_are_not_allowed_outside_class_bodies_18016", "Private identifiers are not allowed outside class bodies."), - The_shadowing_declaration_of_0_is_defined_here: diag(18017, DiagnosticCategory.Error, "The_shadowing_declaration_of_0_is_defined_here_18017", "The shadowing declaration of '{0}' is defined here"), - The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here: diag(18018, DiagnosticCategory.Error, "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018", "The declaration of '{0}' that you probably intended to use is defined here"), - _0_modifier_cannot_be_used_with_a_private_identifier: diag(18019, DiagnosticCategory.Error, "_0_modifier_cannot_be_used_with_a_private_identifier_18019", "'{0}' modifier cannot be used with a private identifier."), - An_enum_member_cannot_be_named_with_a_private_identifier: diag(18024, DiagnosticCategory.Error, "An_enum_member_cannot_be_named_with_a_private_identifier_18024", "An enum member cannot be named with a private identifier."), - can_only_be_used_at_the_start_of_a_file: diag(18026, DiagnosticCategory.Error, "can_only_be_used_at_the_start_of_a_file_18026", "'#!' can only be used at the start of a file."), - Compiler_reserves_name_0_when_emitting_private_identifier_downlevel: diag(18027, DiagnosticCategory.Error, "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027", "Compiler reserves name '{0}' when emitting private identifier downlevel."), - Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher: diag(18028, DiagnosticCategory.Error, "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028", "Private identifiers are only available when targeting ECMAScript 2015 and higher."), - Private_identifiers_are_not_allowed_in_variable_declarations: diag(18029, DiagnosticCategory.Error, "Private_identifiers_are_not_allowed_in_variable_declarations_18029", "Private identifiers are not allowed in variable declarations."), - An_optional_chain_cannot_contain_private_identifiers: diag(18030, DiagnosticCategory.Error, "An_optional_chain_cannot_contain_private_identifiers_18030", "An optional chain cannot contain private identifiers."), - The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents: diag(18031, DiagnosticCategory.Error, "The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031", "The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents."), - The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some: diag(18032, DiagnosticCategory.Error, "The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032", "The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some."), - Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values: diag(18033, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033", "Type '{0}' is not assignable to type '{1}' as required for computed enum member values."), - Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment: diag(18034, DiagnosticCategory.Message, "Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034", "Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."), - Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name: diag(18035, DiagnosticCategory.Error, "Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035", "Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."), - Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator: diag(18036, DiagnosticCategory.Error, "Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036", "Class decorators can't be used with static private identifier. Consider removing the experimental decorator."), - Await_expression_cannot_be_used_inside_a_class_static_block: diag(18037, DiagnosticCategory.Error, "Await_expression_cannot_be_used_inside_a_class_static_block_18037", "Await expression cannot be used inside a class static block."), - For_await_loops_cannot_be_used_inside_a_class_static_block: diag(18038, DiagnosticCategory.Error, "For_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'For await' loops cannot be used inside a class static block."), - Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block: diag(18039, DiagnosticCategory.Error, "Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039", "Invalid use of '{0}'. It cannot be used inside a class static block."), - A_return_statement_cannot_be_used_inside_a_class_static_block: diag(18041, DiagnosticCategory.Error, "A_return_statement_cannot_be_used_inside_a_class_static_block_18041", "A 'return' statement cannot be used inside a class static block."), - _0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation: diag(18042, DiagnosticCategory.Error, "_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042", "'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."), - Types_cannot_appear_in_export_declarations_in_JavaScript_files: diag(18043, DiagnosticCategory.Error, "Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043", "Types cannot appear in export declarations in JavaScript files."), - _0_is_automatically_exported_here: diag(18044, DiagnosticCategory.Message, "_0_is_automatically_exported_here_18044", "'{0}' is automatically exported here."), - Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher: diag(18045, DiagnosticCategory.Error, "Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045", "Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."), - _0_is_of_type_unknown: diag(18046, DiagnosticCategory.Error, "_0_is_of_type_unknown_18046", "'{0}' is of type 'unknown'."), - _0_is_possibly_null: diag(18047, DiagnosticCategory.Error, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."), - _0_is_possibly_undefined: diag(18048, DiagnosticCategory.Error, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."), - _0_is_possibly_null_or_undefined: diag(18049, DiagnosticCategory.Error, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."), - The_value_0_cannot_be_used_here: diag(18050, DiagnosticCategory.Error, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."), -}; \ No newline at end of file diff --git a/external-declarations/src/compiler/emit-binder.ts b/external-declarations/src/compiler/emit-binder.ts index 0a883220c1822..d20e99f19133f 100644 --- a/external-declarations/src/compiler/emit-binder.ts +++ b/external-declarations/src/compiler/emit-binder.ts @@ -1,11 +1,11 @@ -import { Symbol, Node, VariableDeclaration, ParameterDeclaration, ModifierFlags, isLiteralExpression, ClassElement, isIdentifier, BindingPattern, SyntaxKind, findAncestor, SourceFile, isVariableStatement, SymbolFlags, isImportDeclaration, __String, isFunctionDeclaration, isClassDeclaration, isTypeAliasDeclaration, isExportDeclaration, isExportAssignment, isModuleDeclaration, NodeArray, isConstructSignatureDeclaration, isConstructorDeclaration, isImportEqualsDeclaration, isEnumDeclaration, isInterfaceDeclaration, isNamedExports, isModuleBlock, ModuleDeclaration, ArrayBindingElement, isExternalModuleReference, forEachChild, isMetaProperty, isComputedPropertyName, isPropertyAccessExpression, isPrivateIdentifier, Extension, isConditionalTypeNode, TypeElement, CompilerOptions, ModuleKind, ModuleDetectionKind, isMappedTypeNode, TypeParameterDeclaration, isInferTypeNode, isBlock, InterfaceDeclaration, ClassDeclaration, FunctionDeclaration, JsxEmit, isJsxFragment, isJsxOpeningLikeElement, ModuleResolutionKind, ResolutionMode, isEnumMember, getNameOfDeclaration, ExportDeclaration, Identifier, isSourceFile, ExportSpecifier, EnumDeclaration, isVariableDeclaration } from "typescript"; +import { Symbol, Node, VariableDeclaration, ParameterDeclaration, ModifierFlags, isLiteralExpression, ClassElement, isIdentifier, BindingPattern, SyntaxKind, findAncestor, SourceFile, isVariableStatement, SymbolFlags, isImportDeclaration, __String, isFunctionDeclaration, isClassDeclaration, isTypeAliasDeclaration, isExportDeclaration, isExportAssignment, isModuleDeclaration, NodeArray, isConstructSignatureDeclaration, isConstructorDeclaration, isImportEqualsDeclaration, isEnumDeclaration, isInterfaceDeclaration, isNamedExports, isModuleBlock, ModuleDeclaration, ArrayBindingElement, isExternalModuleReference, forEachChild, isMetaProperty, isComputedPropertyName, isPropertyAccessExpression, isPrivateIdentifier, Extension, isConditionalTypeNode, TypeElement, CompilerOptions, ModuleKind, ModuleDetectionKind, isMappedTypeNode, TypeParameterDeclaration, isInferTypeNode, isBlock, InterfaceDeclaration, ClassDeclaration, FunctionDeclaration, JsxEmit, isJsxFragment, isJsxOpeningLikeElement, ModuleResolutionKind, ResolutionMode, ExportDeclaration, Identifier, isSourceFile, ExportSpecifier, EnumDeclaration, isVariableDeclaration } from "typescript"; import { Debug } from "./debug"; import { forEach } from "./lang-utils"; import { _Symbol } from "./types"; import { isBindingPattern, getNodeId, hasSyntacticModifier, getEmitModuleKind, getEmitModuleResolutionKind, isEnumConst, nodeHasName } from "./utils"; -export interface NodeLinks { +interface NodeLinks { isVisible?: boolean; symbol?: BasicSymbol; localSymbol?: BasicSymbol; @@ -38,7 +38,7 @@ declare module 'typescript' { export function forEachChildRecursively(rootNode: _Node, cbNode: (node: _Node, parent: _Node) => T | "skip" | undefined, cbNodes?: (nodes: _NodeArray<_Node>, parent: _Node) => T | "skip" | undefined): T | undefined export function getTokenPosOfNode(node: _Node, sourceFile?: _SourceFile, includeJsDoc?: boolean): number; } -export function getEmitModuleDetectionKind(options: CompilerOptions) { +function getEmitModuleDetectionKind(options: CompilerOptions) { return options.moduleDetection || (getEmitModuleKind(options) === ModuleKind.Node16 || getEmitModuleKind(options) === ModuleKind.NodeNext ? ModuleDetectionKind.Force : ModuleDetectionKind.Auto); } @@ -81,7 +81,7 @@ const syntaxKindToSymbolMap = { [SyntaxKind.ExportSpecifier]: [SymbolFlags.Alias | SymbolFlags.ExportValue, SymbolFlags.AliasExcludes], [SyntaxKind.NamespaceExportDeclaration]: [SymbolFlags.Alias, SymbolFlags.AliasExcludes], [SyntaxKind.ImportClause]: [SymbolFlags.Alias, SymbolFlags.AliasExcludes], -} as const; //satisfies Partial>>; +} as const satisfies Partial>>; export function bindSourceFile(file: SourceFile, options: CompilerOptions, packageModuleType: ResolutionMode) { const nodeLinks: NodeLinks[] = [] @@ -535,7 +535,7 @@ function isImportMeta(node: Node): boolean { /** @internal */ -export function getSetExternalModuleIndicator(options: CompilerOptions): [(node: SourceFile) => true | undefined, (node: Node) => boolean] { +function getSetExternalModuleIndicator(options: CompilerOptions): [(node: SourceFile) => true | undefined, (node: Node) => boolean] { function isFileForcedToBeModuleByFormat(file: SourceFile): true | undefined { // Excludes declaration files - they still require an explicit `export {}` or the like @@ -578,13 +578,13 @@ function getImpliedNodeFormat(fileName: string, options: CompilerOptions, packag } } -export const enum ModuleInstanceState { +const enum ModuleInstanceState { NonInstantiated = 0, Instantiated = 1, ConstEnumOnly = 2 } -export function getModuleInstanceState(node: ModuleDeclaration, visited?: Map): ModuleInstanceState { +function getModuleInstanceState(node: ModuleDeclaration, visited?: Map): ModuleInstanceState { return node.body ? getModuleInstanceStateCached(node.body, visited) : ModuleInstanceState.Instantiated; } diff --git a/external-declarations/src/compiler/emit-host.ts b/external-declarations/src/compiler/emit-host.ts index 3fafebcf2a2de..eba9e3b2a3746 100644 --- a/external-declarations/src/compiler/emit-host.ts +++ b/external-declarations/src/compiler/emit-host.ts @@ -2,7 +2,7 @@ import * as ts from 'typescript' import { changeExtension } from '../test-runner/tsc-infrastructure/vpath'; import { getDeclarationExtension, getDirectoryPath, getRelativePathFromDirectory, hasExtension, isDeclarationFile, isJavaScriptFile, resolvePath } from './path-utils'; -import { EmitHost } from './types'; +import { IsolatedEmitHost } from './types'; import { getNodeId } from './utils'; @@ -64,5 +64,5 @@ export function createEmitHost(allProjectFiles: string[], tsLibFiles: string[], id: resolvedFileId, }; }, - } as Partial as EmitHost + } as Partial as IsolatedEmitHost } \ No newline at end of file diff --git a/external-declarations/src/compiler/emit-resolver.ts b/external-declarations/src/compiler/emit-resolver.ts index db3e053e24a7a..a8cb67a499a09 100644 --- a/external-declarations/src/compiler/emit-resolver.ts +++ b/external-declarations/src/compiler/emit-resolver.ts @@ -2,11 +2,11 @@ import { Node, VariableDeclaration, PropertyDeclaration, PropertySignature, Para import { Debug } from "./debug"; import { BasicSymbol, bindSourceFile } from "./emit-binder"; import { appendIfUnique, emptyArray, every, filter } from "./lang-utils"; -import { EmitResolver, LateBoundDeclaration, LateVisibilityPaintedStatement, SymbolAccessibility, SymbolVisibilityResult, _Symbol } from "./types"; -import { isBindingPattern, isExternalModuleAugmentation, hasEffectiveModifier, getTextOfNode, hasSyntacticModifier, isInJSFile, isLateVisibilityPaintedStatement, isThisIdentifier, getFirstIdentifier, isPartOfTypeNode, AnyImportSyntax, hasDynamicName, skipParentheses, nodeIsPresent, isAmbientDeclaration } from "./utils"; +import { IsolatedEmitResolver, LateBoundDeclaration, LateVisibilityPaintedStatement, SymbolAccessibility, SymbolVisibilityResult, _Symbol } from "./types"; +import { isBindingPattern, isExternalModuleAugmentation, hasEffectiveModifier, hasSyntacticModifier, isInJSFile, isLateVisibilityPaintedStatement, isThisIdentifier, getFirstIdentifier, isPartOfTypeNode, AnyImportSyntax, hasDynamicName, skipParentheses, nodeIsPresent, isAmbientDeclaration } from "./utils"; -export function createEmitResolver(file: SourceFile, options: CompilerOptions, packageModuleType: ResolutionMode) { +export function createEmitResolver(file: SourceFile, options: CompilerOptions, packageModuleType: ResolutionMode): IsolatedEmitResolver { const { getNodeLinks, resolveName } = bindSourceFile(file, options, packageModuleType); @@ -41,7 +41,10 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p isDeclarationVisible, isLiteralConstDeclaration, createLiteralConstValue(node) { - return 'initializer' in node && node.initializer; + if('initializer' in node && node.initializer) { + return node.initializer; + } + Debug.fail(); }, isLateBound(node): node is LateBoundDeclaration { const name = getNameOfDeclaration(node); @@ -133,7 +136,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p isImportRequiredByAugmentation() { return false; }, - } as Partial as EmitResolver + } function isDeclarationReadonly(declaration: Declaration): boolean { @@ -357,14 +360,14 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p // We don't actually keep enough information for full accessibility, // We just do this to mark accessible imports accessibility: SymbolAccessibility.Accessible, - errorSymbolName: getTextOfNode(firstIdentifier), + errorSymbolName: firstIdentifier.text, errorNode: firstIdentifier }; } } -/** @internal */ -export function getRootDeclaration(node: Node): Node { + +function getRootDeclaration(node: Node): Node { while (node.kind === SyntaxKind.BindingElement) { node = node.parent.parent; } @@ -391,7 +394,7 @@ function getDeclarationContainer(node: Node): Node { function isGlobalSourceFile(node: Node) { return isSourceFile(node) && !isExternalModule(node); } -export function isExternalModule(file: SourceFile): boolean { +function isExternalModule(file: SourceFile): boolean { return file.externalModuleIndicator !== undefined; } diff --git a/external-declarations/src/compiler/lang-utils.ts b/external-declarations/src/compiler/lang-utils.ts index d73d66117c17e..86de2ee69c95b 100644 --- a/external-declarations/src/compiler/lang-utils.ts +++ b/external-declarations/src/compiler/lang-utils.ts @@ -280,32 +280,6 @@ export function map(array: readonly T[] | undefined, f: (x: T, i: number) } -/** - * Maps an array. If the mapped value is an array, it is spread into the result. - * - * @param array The array to map. - * @param mapfn The callback used to map the result into one or more values. - * - * @internal - */ - export function flatMap(array: readonly T[] | undefined, mapfn: (x: T, i: number) => U | readonly U[] | undefined): readonly U[] { - let result: U[] | undefined; - if (array) { - for (let i = 0; i < array.length; i++) { - const v = mapfn(array[i], i); - if (v) { - if (isArray(v)) { - result = addRange(result, v); - } - else { - result = append(result, v); - } - } - } - } - return result || emptyArray; -} - /** @internal */ export const emptyArray: never[] = [] as never[]; @@ -649,6 +623,19 @@ const _entries = Object.entries || ((obj: MapLike) => { const hasOwnProperty = Object.prototype.hasOwnProperty; +/** + * Indicates whether a map-like contains an own property with the specified key. + * + * @param map A map-like. + * @param key A property key. + * + * @internal + */ +export function hasProperty(map: MapLike, key: string): boolean { + return hasOwnProperty.call(map, key); +} + + /** * Gets the owned, enumerable property keys of a map-like. * @@ -942,4 +929,6 @@ export function clone(object: T): T { } } return result; -} \ No newline at end of file +} + + diff --git a/external-declarations/src/compiler/localInferenceResolver.ts b/external-declarations/src/compiler/localInferenceResolver.ts deleted file mode 100644 index d0699e79e7743..0000000000000 --- a/external-declarations/src/compiler/localInferenceResolver.ts +++ /dev/null @@ -1,1422 +0,0 @@ -import { - HasInferredType, - Node, - ExportAssignment, SourceFile, TypeNode, VisitResult, - EntityNameOrEntityNameExpression, ParameterDeclaration, - factory, EntityName, isIdentifier, setTextRange, - isPropertyAccessExpression, isQualifiedName, isTypeNode, NodeFlags, - forEachChildRecursively, visitNode, NodeArray, ObjectLiteralElementLike, - SetAccessorDeclaration, GetAccessorDeclaration, isGetAccessorDeclaration, - isSetAccessorDeclaration, SyntaxKind, ParenthesizedExpression, QualifiedName, - Identifier, CallExpression, NewExpression, visitNodes, FunctionExpression, - ArrowFunction, isTypeParameterDeclaration, SatisfiesExpression, AsExpression, - TypeAssertion, isTypeReferenceNode, isLiteralTypeNode, isNoSubstitutionTemplateLiteral, - isStringLiteral, PrefixUnaryExpression, TemplateExpression, TemplateLiteralTypeSpan, - ArrayLiteralExpression, isSpreadElement, isOmittedExpression, ObjectLiteralExpression, - TypeElement, isComputedPropertyName, isPropertyName, isMethodDeclaration, - isPropertyAssignment, isShorthandPropertyAssignment, isSpreadAssignment, - Modifier, getTokenPosOfNode, setCommentRange, ConditionalExpression, LiteralExpression, - KeywordTypeSyntaxKind, TypeReferenceNode, MethodSignature, PropertySignature, isNumericLiteral, - LiteralTypeNode, TypeLiteralNode, isMethodSignature, isPropertySignature, SignatureDeclaration, - NodeWithTypeArguments, isArrayTypeNode, isTypeLiteralNode, isFunctionTypeNode, isConstructorTypeNode, - isTypeQueryNode, PropertyName, ModifierFlags, FunctionLikeDeclaration, ReturnStatement, - YieldExpression, isBlock, forEachChild, isReturnStatement, isYieldExpression, isClassLike, - isFunctionLike, Statement, isExpressionStatement, isBinaryExpression, - visitEachChild, Visitor, isExportAssignment, isParameter, isVariableDeclaration, - isVariableStatement, isSourceFile, isPropertyDeclaration, isFunctionDeclaration, - DiagnosticWithLocation, - isElementAccessExpression, - isExpression -} from "typescript"; -import { TransformationContext, nullTransformationContext } from "./types"; -import { Debug } from "./debug"; -import { Diagnostics } from "./diagnosticInformationMap.generated"; -import { findIndex } from "./lang-utils"; -import { createDiagnosticForNode, setParent, isEntityNameExpression, getNodeId, getSyntacticModifierFlags, getEffectiveModifierFlags } from "./utils"; - -const NO_LOCAL_INFERENCE = !!process.env.NO_LOCAL_INFERENCE; -enum NarrowBehavior { - None = 0, - AsConst = 1, - KeepLiterals = 2, - AsConstOrKeepLiterals = AsConst | KeepLiterals, - NotKeepLiterals = ~KeepLiterals, -} - -enum LocalTypeInfoFlags { - None = 0, - Fresh = 1 << 0, - ImplicitAny = 1 << 1, - Invalid = 1 << 2, - Optimistic = 1 << 3, -} - -interface LocalInferenceResolver { - makeInvalidType(): Node; - fromInitializer(node: HasInferredType | ExportAssignment, sourceFile: SourceFile): TypeNode; -} -export function createLocalInferenceResolver({ - setLocalInferenceTargetNode, - setEnclosingDeclarations, - visitDeclarationSubtree, - checkEntityNameVisibility, - ensureParameter, - context, -}: { - setLocalInferenceTargetNode(node: Node | undefined): Node | undefined; - setEnclosingDeclarations(node: Node): Node; - visitDeclarationSubtree(input: Node): VisitResult - checkEntityNameVisibility(name: EntityNameOrEntityNameExpression, container?: Node): void; - ensureParameter(p: ParameterDeclaration): ParameterDeclaration; - - context: TransformationContext -}): LocalInferenceResolver | undefined { - let currentSourceFile: SourceFile | undefined; - const options = context.getCompilerOptions(); - if (!options.isolatedDeclarations) { - return undefined; - } - const resolver = context.getEmitResolver(); - const { factory } = context; - const strictNullChecks = !!options.strict || !!options.strictNullChecks; - - return { - fromInitializer(node: HasInferredType, sourceFile: SourceFile) { - const oldSourceFile = currentSourceFile; - currentSourceFile = sourceFile; - try { - const localType = localInferenceFromInitializer(node); - if (localType !== undefined) { - return localType; - } - reportIsolatedDeclarationError(node); - return makeInvalidType(); - } finally { - currentSourceFile = oldSourceFile; - } - }, - makeInvalidType, - }; - function reportIsolatedDeclarationError(node: Node) { - const message = createDiagnosticForNode( - node, - Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit - ); - context.addDiagnostic(message); - } - - function makeInvalidType() { - return factory.createTypeReferenceNode("invalid"); - } - - interface LocalTypeInfo { typeNode: TypeNode, sourceNode: Node, flags: LocalTypeInfoFlags } - // We need to see about getting the JSX element type. - function getJSXElementType(_node: Node): EntityName { - return factory.createQualifiedName( - factory.createQualifiedName( - factory.createIdentifier("React"), - factory.createIdentifier("JSX"), - ), - factory.createIdentifier("Element"), - ); - } - function entityNameExpressionToQualifiedName(node: EntityNameOrEntityNameExpression): EntityName { - if (isIdentifier(node)) { - return setTextRange(factory.cloneNode(node), node); - } - else if (isPropertyAccessExpression(node)) { - return setTextRange(factory.createQualifiedName( - entityNameExpressionToQualifiedName(node.expression), - factory.cloneNode(node.name) - ), node); - } - else if (isQualifiedName(node)) { - return setTextRange(factory.createQualifiedName( - entityNameExpressionToQualifiedName(node), - factory.cloneNode(node.right) - ), node); - } - throw Error("Should not happen"); - } - - function isSyntheticTypeNode(node: Node): node is TypeNode { - return isTypeNode(node) && !!(node.flags & NodeFlags.Synthesized); - } - function finalizeSyntheticTypeNode(typeNode: T, parent: Node): T { - if (typeNode && typeNode.parent !== parent) { - setParent(typeNode, parent); - // Ensure no non synthetic nodes make it in here - Debug.assert(typeNode.flags & NodeFlags.Synthesized) - forEachChildRecursively(typeNode, (child, parent) => { - Debug.assert(typeNode.flags & NodeFlags.Synthesized); - if (child.parent === parent) { - return "skip"; - } - setParent(child, parent); - }); - } - return typeNode as T & { isSynthetic: true }; - } - function visitSyntheticType(typeNode: TypeNode, node: Node) { - const previousLocalInferenceTargetNode = setLocalInferenceTargetNode(node); - try { - let visitedNode = visitNode(finalizeSyntheticTypeNode(typeNode, node), visitDeclarationSubtree, isSyntheticTypeNode); - Debug.assert(visitedNode); - return visitedNode; - } finally { - setLocalInferenceTargetNode(previousLocalInferenceTargetNode); - } - } - - function mergeFlags(existing: LocalTypeInfoFlags, newFlags: LocalTypeInfoFlags): LocalTypeInfoFlags { - return existing | (newFlags | LocalTypeInfoFlags.Optimistic); - } - function getAccessorInfo(properties: NodeArray, knownAccessor: SetAccessorDeclaration | GetAccessorDeclaration) { - const nameKey = getMemberKey(knownAccessor); - const knownIsGetAccessor = isGetAccessorDeclaration(knownAccessor); - const otherAccessorTest = knownIsGetAccessor ? isSetAccessorDeclaration : isGetAccessorDeclaration; - const otherAccessorIndex = properties.findIndex(n => otherAccessorTest(n) && getMemberKey(n) === nameKey); - const otherAccessor = properties[otherAccessorIndex] as SetAccessorDeclaration | GetAccessorDeclaration | undefined; - - - const getAccessor = knownIsGetAccessor ? knownAccessor : - otherAccessor && isGetAccessorDeclaration(otherAccessor) ? otherAccessor : - undefined; - const setAccessor = !knownIsGetAccessor ? knownAccessor : - otherAccessor && isSetAccessorDeclaration(otherAccessor) ? otherAccessor : - undefined; - - - return { - otherAccessorIndex, - otherAccessor, - getAccessor, - setAccessor, - } - } - function inferAccessorType(getAccessor?: GetAccessorDeclaration, setAccessor?: SetAccessorDeclaration): LocalTypeInfo { - - if(getAccessor?.type){ - return regular( - deepClone(visitType(getAccessor.type, getAccessor)), - getAccessor - ); - }; - - if (setAccessor && setAccessor.parameters[0]?.type) { - const parameterType = setAccessor.parameters[0].type; - return regular( - deepClone(visitType(parameterType, setAccessor)), - setAccessor - ); - } - - if (getAccessor) { - const localPropType = inferReturnType(getAccessor) - return localPropType; - } - - return invalid(getAccessor ?? setAccessor!); - } - function localInference(node: Node, inferenceFlags: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { - const nextInferenceFlags = inferenceFlags & NarrowBehavior.NotKeepLiterals; - switch (node.kind) { - case SyntaxKind.ParenthesizedExpression: - return localInference((node as ParenthesizedExpression).expression, inferenceFlags); - case SyntaxKind.QualifiedName: - const typeNode = visitSyntheticType(factory.createTypeQueryNode( - entityNameExpressionToQualifiedName(node as QualifiedName) - ), node); - - return regular( - typeNode, - node, - LocalTypeInfoFlags.Optimistic - ) - case SyntaxKind.PropertyAccessExpression: - if (isEntityNameExpression(node)) { - const typeNode = visitSyntheticType(factory.createTypeQueryNode( - entityNameExpressionToQualifiedName(node) - ), node); - return regular( - typeNode, - node, - LocalTypeInfoFlags.Optimistic - ) - } - break; - case SyntaxKind.Identifier: { - if ((node as Identifier).escapedText === "undefined") { - return createUndefinedTypeNode(node); - } - const typeNode = visitSyntheticType(factory.createTypeQueryNode( - deepClone(node as Identifier) - ), node) - - return regular(typeNode, node, LocalTypeInfoFlags.Optimistic) - } - case SyntaxKind.NullKeyword: - if (strictNullChecks) { - return regular(factory.createLiteralTypeNode(factory.createNull()), node); - } - else { - return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.ImplicitAny); - } - case SyntaxKind.CallExpression: - const callExpression = node as CallExpression; - if (isIdentifier(callExpression.expression) && callExpression.expression.escapedText === "Symbol") { - if (inferenceFlags & NarrowBehavior.KeepLiterals) { - return regular( - factory.createTypeOperatorNode( - SyntaxKind.UniqueKeyword, - factory.createKeywordTypeNode(SyntaxKind.SymbolKeyword) - ), - node - ) - } else { - return regular( - factory.createKeywordTypeNode(SyntaxKind.SymbolKeyword), - node - ) - } - } - case SyntaxKind.NewExpression: - const newExpr = node as NewExpression; - if (isEntityNameExpression(newExpr.expression)) { - const typeNode = visitSyntheticType(factory.createTypeReferenceNode( - entityNameExpressionToQualifiedName(newExpr.expression), - visitNodes(newExpr.typeArguments, deepClone, isTypeNode)! - ), node); - // Optimistic since the constructor might not have the same name as the type - return regular(typeNode, node, LocalTypeInfoFlags.Optimistic); - } - return invalid(node); - case SyntaxKind.ArrowFunction: - case SyntaxKind.FunctionExpression: - const fnNode = node as FunctionExpression | ArrowFunction; - const oldEnclosingDeclaration = setEnclosingDeclarations(node); - try { - const returnType = inferReturnType(fnNode); - const fnTypeNode = factory.createFunctionTypeNode( - visitNodes(fnNode.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone), - fnNode.parameters.map(p => deepClone(ensureParameter(p))), - returnType.typeNode, - ); - // If the return type is optimistic, teh whole function type is optimistic - const flags = mergeFlags(LocalTypeInfoFlags.None, returnType.flags) - return regular(fnTypeNode, node, flags); - } - finally { - setEnclosingDeclarations(oldEnclosingDeclaration); - } - case SyntaxKind.SatisfiesExpression: { - const typeNode = localInference((node as SatisfiesExpression).expression); - return { ...typeNode, flags: typeNode.flags | LocalTypeInfoFlags.Optimistic } - } - case SyntaxKind.TypeAssertionExpression: - case SyntaxKind.AsExpression: - const asExpression = node as AsExpression | TypeAssertion; - if (isTypeReferenceNode(asExpression.type) && isConst(asExpression.type)) { - return localInference(asExpression.expression, NarrowBehavior.AsConst); - } - else { - const type = visitType(asExpression.type, asExpression); - if (isLiteralTypeNode(type) && - (isNoSubstitutionTemplateLiteral(type.literal) || isStringLiteral(type.literal))) { - return regular( - factory.createLiteralTypeNode( - normalizeLiteralValue(type.literal) - ), - node - ); - } - return regular(deepClone(type), node); - } - 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 fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node); - case SyntaxKind.PlusToken: - return fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node);; - } - case SyntaxKind.BigIntLiteral: - if (prefixOp.operator === SyntaxKind.MinusToken) { - return fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node);; - } - } - } - - if(prefixOp.operator === SyntaxKind.PlusToken) { - return fresh(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), node) - } - else if(prefixOp.operator === SyntaxKind.MinusToken) { - return prefixOp.operand.kind === SyntaxKind.BigIntLiteral? - fresh(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword), node): - fresh(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), node) - } - } - break; - case SyntaxKind.NumericLiteral: - return literal(node, SyntaxKind.NumberKeyword, inferenceFlags); - case SyntaxKind.TemplateExpression: - if (!(inferenceFlags & NarrowBehavior.AsConst)) { - return fresh(factory.createKeywordTypeNode(SyntaxKind.StringKeyword), node); - } - const templateExpression = node as TemplateExpression; - const templateSpans: TemplateLiteralTypeSpan[] = []; - let flags = LocalTypeInfoFlags.None; - for (const span of templateExpression.templateSpans) { - const { typeNode, flags: typeFlags } = localInference(span.expression, nextInferenceFlags); - const literalSpan = factory.createTemplateLiteralTypeSpan( - typeNode, - span.literal - ); - flags = mergeFlags(flags, typeFlags) - templateSpans.push(literalSpan); - } - return regular( - factory.createTemplateLiteralType(deepClone(templateExpression.head), templateSpans), - node, - flags - ); - case SyntaxKind.NoSubstitutionTemplateLiteral: - case SyntaxKind.StringLiteral: - return literal(node, SyntaxKind.StringKeyword, inferenceFlags); - case SyntaxKind.BigIntLiteral: - return literal(node, SyntaxKind.BigIntKeyword, inferenceFlags); - case SyntaxKind.RegularExpressionLiteral: - return literal(node, "RegExp", inferenceFlags, LocalTypeInfoFlags.Optimistic); - case SyntaxKind.JsxSelfClosingElement: - case SyntaxKind.JsxElement: - const typeReference = finalizeSyntheticTypeNode(factory.createTypeReferenceNode(getJSXElementType(node)), node.parent); - checkEntityNameVisibility(typeReference.typeName); - return fresh(typeReference, node); - case SyntaxKind.TrueKeyword: - case SyntaxKind.FalseKeyword: - return literal(node, SyntaxKind.BooleanKeyword, inferenceFlags); - case SyntaxKind.ArrayLiteralExpression: - const arrayLiteral = node as ArrayLiteralExpression; - const elementTypesInfo: LocalTypeInfo[] = []; - let inheritedArrayTypeFlags = LocalTypeInfoFlags.None; - for (const element of arrayLiteral.elements) { - if (isSpreadElement(element)) { - const spreadType = localInference(element.expression, nextInferenceFlags) - const elementTypeNode = inferenceFlags & NarrowBehavior.AsConst ? - factory.createRestTypeNode(spreadType.typeNode) : - factory.createIndexedAccessTypeNode(spreadType.typeNode, factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)); - inheritedArrayTypeFlags = mergeFlags(inheritedArrayTypeFlags, spreadType.flags); - elementTypesInfo.push( - { ...spreadType, typeNode: elementTypeNode } - ); - } - else if (isOmittedExpression(element)) { - elementTypesInfo.push( - createUndefinedTypeNode(element) - ); - } else { - const elementType = localInference(element, nextInferenceFlags) - inheritedArrayTypeFlags = mergeFlags(inheritedArrayTypeFlags, elementType.flags); - elementTypesInfo.push(elementType); - } - } - if (inferenceFlags & NarrowBehavior.AsConst) { - const tupleType = factory.createTupleTypeNode( - elementTypesInfo.map(lti => lti.typeNode) - ); - tupleType.emitNode = { flags: 1 }; - return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node, inheritedArrayTypeFlags); - } - else { - let itemType; - if (elementTypesInfo.length === 0) { - itemType = (strictNullChecks ? factory.createKeywordTypeNode(SyntaxKind.NeverKeyword) : factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)); - } - else { - itemType = makeUnionFromTypes(node, elementTypesInfo, /*widenSingle*/ false).typeNode; - } - - return regular(factory.createArrayTypeNode(itemType), node, inheritedArrayTypeFlags | LocalTypeInfoFlags.Optimistic); - } - case SyntaxKind.ObjectLiteralExpression: { - const objectLiteral = node as ObjectLiteralExpression; - const properties: TypeElement[] = []; - let addedIntersections: TypeNode[] | undefined; - - for (let propIndex = 0, length = objectLiteral.properties.length; propIndex < length; propIndex++) { - const prop = objectLiteral.properties[propIndex] - if (prop.name && isComputedPropertyName(prop.name) && isEntityNameExpression(prop.name.expression)) { - checkEntityNameVisibility(prop.name.expression, prop); - } - const name = prop.name && deepClone(visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!); - let inheritedObjectTypeFlags = LocalTypeInfoFlags.None; - let newProp; - if (isMethodDeclaration(prop) && name) { - const oldEnclosingDeclaration = setEnclosingDeclarations(prop); - try { - const returnType = inferReturnType(prop); - const typeParameters = visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone); - // TODO: We need to see about inheriting flags from parameters - const parameters = prop.parameters.map(p => deepClone(ensureParameter(p))); - inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, returnType.flags); - if (inferenceFlags & NarrowBehavior.AsConst) { - newProp = factory.createPropertySignature( - [factory.createModifier(SyntaxKind.ReadonlyKeyword)], - name, - /*questionToken*/ undefined, - factory.createFunctionTypeNode( - typeParameters, - parameters, - returnType.typeNode, - ) - ); - } - else { - newProp = factory.createMethodSignature( - [], - name, - /*questionToken*/ undefined, - typeParameters, - parameters, - returnType.typeNode, - ); - } - } finally { - setEnclosingDeclarations(oldEnclosingDeclaration); - } - } - else if (isPropertyAssignment(prop) && name) { - const modifiers = inferenceFlags & NarrowBehavior.AsConst ? - [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : - []; - const { typeNode, flags: propTypeFlags } = localInference(prop.initializer, nextInferenceFlags); - inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, propTypeFlags); - newProp = factory.createPropertySignature( - modifiers, - name, - /*questionToken*/ undefined, - typeNode - ); - } - else if (isShorthandPropertyAssignment(prop) && name) { - const modifiers = inferenceFlags & NarrowBehavior.AsConst ? - [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : - []; - const { typeNode, flags: propTypeFlags } = localInference(prop.name, nextInferenceFlags); - inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, propTypeFlags); - - newProp = factory.createPropertySignature( - modifiers, - name, - /*questionToken*/ undefined, - typeNode - ); - } - else if (isSpreadAssignment(prop)) { - addedIntersections ??= []; - const { typeNode, flags: spreadTypeFlags } = localInference(prop.expression, nextInferenceFlags); - // Spread types are always optimistic - inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, spreadTypeFlags) | LocalTypeInfoFlags.Optimistic; - addedIntersections.push(typeNode) - } - else { - if (isGetAccessorDeclaration(prop) || isSetAccessorDeclaration(prop)) { - const nameKey = getMemberKey(prop); - if (nameKey && name) { - const { getAccessor, setAccessor, otherAccessorIndex } = getAccessorInfo(objectLiteral.properties, prop); - if (otherAccessorIndex === -1 || otherAccessorIndex > propIndex) { - const accessorType = inferAccessorType(getAccessor, setAccessor); - const modifiers: Modifier[] = [] - if (!setAccessor) { - modifiers.push(factory.createModifier(SyntaxKind.ReadonlyKeyword)) - } - inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, accessorType.flags); - newProp = factory.createPropertySignature( - modifiers, - name, - /*questionToken*/ undefined, - accessorType.typeNode, - ); - } - } else { - return invalid(prop); - } - } else { - return invalid(prop); - } - } - - if (newProp) { - const prevPos = newProp.name.pos; - const newPos = getTokenPosOfNode(newProp.name, currentSourceFile); - - setTextRange(newProp.name, { - pos: newPos, - end: newProp.name.end - }); - setTextRange(newProp, { - pos: prevPos, - end: newProp.name.end, - }) - setCommentRange(newProp, { - pos: prevPos, - end: newProp.name.pos - }) - - properties.push(newProp) - } - } - - let typeNode: TypeNode = factory.createTypeLiteralNode(properties); - if (addedIntersections) { - if (properties.length !== 0) { - addedIntersections.push(typeNode); - } - typeNode = factory.createIntersectionTypeNode(addedIntersections); - } - return regular(typeNode, objectLiteral); - } - case SyntaxKind.ConditionalExpression: - const conditionalExpression = node as ConditionalExpression; - const types = [ - localInference(conditionalExpression.whenTrue, inferenceFlags & ~NarrowBehavior.AsConst), - localInference(conditionalExpression.whenFalse, inferenceFlags & ~NarrowBehavior.AsConst), - ] - return makeUnionFromTypes(node, types, /*widenSingle*/ false); - } - - return invalid(node); - } - function invalid(node: Node): LocalTypeInfo { - return { typeNode: makeInvalidTypeAndReport(node), flags: LocalTypeInfoFlags.Invalid, sourceNode: node }; - } - function fresh(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { - return { typeNode: finalizeSyntheticTypeNode(typeNode, sourceNode.parent), flags: flags | LocalTypeInfoFlags.Fresh, sourceNode }; - } - function regular(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { - return { typeNode: finalizeSyntheticTypeNode(typeNode, sourceNode.parent), flags, sourceNode }; - } - 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(node: Node, flags = LocalTypeInfoFlags.None) { - if (strictNullChecks) { - return regular( - factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword) - , node, flags); - } - else { - return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.ImplicitAny | flags); - } - } - function literal(node: Node, baseType: string | KeywordTypeSyntaxKind, narrowBehavior: NarrowBehavior, flags: LocalTypeInfoFlags = 0) { - if (narrowBehavior & NarrowBehavior.AsConstOrKeepLiterals) { - return fresh(factory.createLiteralTypeNode( - normalizeLiteralValue(node as LiteralExpression) - ), node, flags); - } - else { - return fresh( - typeof baseType === "number" ? factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType), - node, - flags - ); - } - } - function isConst(typeReference: TypeReferenceNode) { - return isIdentifier(typeReference.typeName) && typeReference.typeName.escapedText === "const"; - } - function makeInvalidTypeAndReport(node: Node) { - reportIsolatedDeclarationError(node); - return makeInvalidType() as TypeReferenceNode; - } - function visitType(type: TypeNode | undefined, owner: Node) { - const visitedType = visitNode(type, visitDeclarationSubtree, isTypeNode); - return visitedType ?? makeInvalidTypeAndReport(owner); - } - - function getMemberNameKey(name: PropertyName) { - if (isIdentifier(name)) { - return "I:" + name.escapedText; - } - if (isStringLiteral(name)) { - return "S:" + name.text - } - if (isNumericLiteral(name)) { - return "N:" + (+name.text) - } - if (isComputedPropertyName(name)) { - let fullId = "C:"; - let computedName = isComputedPropertyName(name)? name.expression: name; - // We only support dotted identifiers as property keys - while (true) { - if (isIdentifier(computedName)) { - fullId += computedName.escapedText; - break; - } - else if (isPropertyAccessExpression(computedName)) { - fullId += computedName.name.escapedText; - computedName = computedName.expression; - } - else { - // Can't compute a property key, bail - return undefined; - } - } - return fullId; - } - return undefined; - } - function getMemberKey(member: MethodSignature | PropertySignature | GetAccessorDeclaration | SetAccessorDeclaration) { - return getMemberNameKey(member.name) - } - - function getWidenedType(localTypeInfo: LocalTypeInfo) { - if ((localTypeInfo.flags & LocalTypeInfoFlags.Fresh) && isLiteralTypeNode(localTypeInfo.typeNode)) { - const literal = localTypeInfo.typeNode.literal; - return ( - literal.kind === SyntaxKind.StringLiteral ? factory.createKeywordTypeNode(SyntaxKind.StringKeyword) : - literal.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : - literal.kind === SyntaxKind.PrefixUnaryExpression && (literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : - literal.kind === SyntaxKind.BigIntLiteral ? factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword) : - literal.kind === SyntaxKind.TrueKeyword || literal.kind === SyntaxKind.FalseKeyword ? factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword) : - localTypeInfo.typeNode - ); - } - - return localTypeInfo.typeNode; - } - function makeUnionFromTypes(sourceNode: Node, types: LocalTypeInfo[], widenSingle: boolean) { - let [unionConstituents, flags] = deduplicateUnion(types); - if (unionConstituents.length === 1) { - const localType = unionConstituents[0]; - - return widenSingle ? { ...localType, typeNode: getWidenedType(localType) } : localType; - } - const unionConstituentsTypes = collapseLiteralTypesIntoBaseTypes(unionConstituents); - - normalizeObjectUnion(unionConstituentsTypes); - return regular( - unionConstituentsTypes.length === 1 ? unionConstituentsTypes[0] : factory.createUnionTypeNode(unionConstituentsTypes), - sourceNode, - LocalTypeInfoFlags.Optimistic | flags - ); - - function collapseLiteralTypesIntoBaseTypes(nodes: LocalTypeInfo[]) { - enum CollapsibleTypes { - None = 0, - String = 1 << 1, - Number = 1 << 2, - True = 1 << 3, - False = 1 << 4, - Boolean = True | False, - BigInt = 1 << 5, - Any = 1 << 7, - ImplicitAny = 1 << 8 - } - let baseTypes = CollapsibleTypes.None; - let literalTypes = CollapsibleTypes.None; - for (const type of nodes) { - switch (type.typeNode.kind) { - case SyntaxKind.TemplateLiteralType: - literalTypes |= CollapsibleTypes.String; - break; - case SyntaxKind.AnyKeyword: - if (type.flags & LocalTypeInfoFlags.ImplicitAny) { - literalTypes |= CollapsibleTypes.ImplicitAny; - } - else { - baseTypes |= CollapsibleTypes.Any; - } - break; - case SyntaxKind.BooleanKeyword: - baseTypes |= CollapsibleTypes.Boolean; - break; - case SyntaxKind.StringKeyword: - baseTypes |= CollapsibleTypes.String; - break; - case SyntaxKind.NumberKeyword: - baseTypes |= CollapsibleTypes.Number; - break; - case SyntaxKind.BigIntKeyword: - baseTypes |= CollapsibleTypes.BigInt; - break; - case SyntaxKind.LiteralType: - const literalType = type.typeNode as LiteralTypeNode; - switch (literalType.literal.kind) { - case SyntaxKind.TrueKeyword: - literalTypes |= CollapsibleTypes.True; - break; - case SyntaxKind.FalseKeyword: - literalTypes |= CollapsibleTypes.False; - break; - case SyntaxKind.NumericLiteral: - literalTypes |= CollapsibleTypes.Number; - break; - case SyntaxKind.PrefixUnaryExpression: - if ((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { - literalTypes |= CollapsibleTypes.Number; - } - break; - case SyntaxKind.StringLiteral: - case SyntaxKind.NoSubstitutionTemplateLiteral: - case SyntaxKind.TemplateExpression: - literalTypes |= CollapsibleTypes.String; - break; - case SyntaxKind.BigIntLiteral: - literalTypes |= CollapsibleTypes.BigInt; - break; - } - } - } - // If true and false are both present, act as if we found boolean itself - if ((literalTypes & CollapsibleTypes.Boolean) === CollapsibleTypes.Boolean) { - baseTypes |= CollapsibleTypes.Boolean; - } - const typesToCollapse = baseTypes & literalTypes; - - if (baseTypes & CollapsibleTypes.Any) { - return [factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)]; - } - // Nothing to collapse or reorder - if (baseTypes === CollapsibleTypes.None) return nodes.map(n => n.typeNode); - const result: TypeNode[] = []; - - // We do a best effort to preserve TS union order for primitives - if (baseTypes & CollapsibleTypes.String) { - result.push(factory.createKeywordTypeNode(SyntaxKind.StringKeyword)); - } - if (baseTypes & CollapsibleTypes.Number) { - result.push(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)); - } - if (baseTypes & CollapsibleTypes.Boolean) { - result.push(factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword)); - } - if (baseTypes & CollapsibleTypes.BigInt) { - result.push(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword)); - } - if (!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.True) { - result.push(factory.createLiteralTypeNode(factory.createTrue())); - } - if (!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.False) { - result.push(factory.createLiteralTypeNode(factory.createFalse())); - } - - for (const type of nodes) { - let typeofNode = CollapsibleTypes.None; - - switch (type.typeNode.kind) { - case SyntaxKind.BooleanKeyword: - case SyntaxKind.StringKeyword: - case SyntaxKind.NumberKeyword: - case SyntaxKind.BigIntKeyword: - case SyntaxKind.AnyKeyword: - // They were already added - continue; - case SyntaxKind.TemplateLiteralType: - typeofNode = CollapsibleTypes.String; - break; - case SyntaxKind.LiteralType: - const literalType = type.typeNode as LiteralTypeNode; - switch (literalType.literal.kind) { - case SyntaxKind.TrueKeyword: - continue; - case SyntaxKind.FalseKeyword: - continue; - case SyntaxKind.NumericLiteral: - typeofNode = CollapsibleTypes.Number; - break; - case SyntaxKind.PrefixUnaryExpression: - if ((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { - typeofNode = CollapsibleTypes.Number; - } - break; - case SyntaxKind.StringLiteral: - case SyntaxKind.NoSubstitutionTemplateLiteral: - case SyntaxKind.TemplateExpression: - typeofNode = CollapsibleTypes.String; - break; - case SyntaxKind.BigIntLiteral: - typeofNode = CollapsibleTypes.BigInt; - break; - } - } - // Not a node of interest, do not change - if ((typeofNode & typesToCollapse) === 0) { - result.push(type.typeNode); - } - } - return result; - } - function deduplicateUnion(nodes: LocalTypeInfo[]) { - const typeInfoCache = new Map - }>(); - const union: LocalTypeInfo[] = []; - let implicitAnyNode: LocalTypeInfo | undefined; - let mergedUnionFlags = LocalTypeInfoFlags.None; - for (const node of nodes) { - mergedUnionFlags = mergeFlags(mergedUnionFlags, node.flags) - // Do not add implicit any unless it's the only type in the array - if (!strictNullChecks && node.flags & LocalTypeInfoFlags.ImplicitAny) { - implicitAnyNode = node; - continue; - } - const existing = union.find(u => typesEqual(node.typeNode, node.sourceNode, u.typeNode, u.sourceNode)); - if (existing === undefined) { - union.push(node); - } - else { - existing.flags &= node.flags; - } - } - if (union.length === 0 && implicitAnyNode) { - union.push(implicitAnyNode); - } - return [union, mergedUnionFlags] as const; - - function getTypeInfo(type: TypeLiteralNode, errorTarget: Node | undefined) { - const typeNodeId = getNodeId(type); - let typeInfo = typeInfoCache.get(typeNodeId); - if (typeInfo) return typeInfo; - - typeInfo = { - node: type, - members: new Map() - }; - for (const member of type.members) { - const isMethod = isMethodSignature(member); - const isProp = isPropertySignature(member); - if (isMethod || isProp) { - const memberKey = getMemberKey(member); - if (memberKey === undefined) { - makeInvalidTypeAndReport(errorTarget ?? member); - break; - } - typeInfo.members.set(memberKey, member); - } - else { - makeInvalidTypeAndReport(errorTarget ?? member); - } - } - typeInfoCache.set(typeNodeId, typeInfo); - return typeInfo; - } - function entityNameEqual(aTypeName: EntityName, bTypeName: EntityName) { - while (true) { - if (aTypeName.kind === SyntaxKind.QualifiedName && bTypeName.kind === SyntaxKind.QualifiedName) { - if (aTypeName.right.escapedText !== bTypeName.right.escapedText) return false; - aTypeName = aTypeName.left; - bTypeName = bTypeName.left; - } - else if (aTypeName.kind === SyntaxKind.Identifier && bTypeName.kind === SyntaxKind.Identifier) { - return aTypeName.escapedText === bTypeName.escapedText; - } - else { - return false; - } - } - } - function signatureEqual(a: SignatureDeclaration, aErrorTarget: Node | undefined, b: SignatureDeclaration, bErrorTarget: Node | undefined) { - if (!typesEqual(a.type, aErrorTarget, b.type, bErrorTarget)) { - return false; - } - if (a.parameters.length !== b.parameters.length) { - return false; - } - - return a.parameters.every((aParam, index) => isParameterEqual(aParam, b.parameters[index])); - - // Isolated declarations finish equality - function isParameterEqual(a: ParameterDeclaration, b: ParameterDeclaration) { - if (!!a.questionToken !== !!b.questionToken) { - return false; - } - return typesEqual(a.type, aErrorTarget, b.type, bErrorTarget); - } - } - function nodeTypeArgumentsEqual(a: NodeWithTypeArguments, aErrorTarget: Node | undefined, b: NodeWithTypeArguments, bErrorTarget: Node | undefined) { - if (a.typeArguments === undefined && b.typeArguments === undefined) { - return true; - } - if (a.typeArguments?.length !== b.typeArguments?.length) { - return false; - } - - return !!a.typeArguments?.every((aArg, index) => typesEqual(aArg, aErrorTarget, b.typeArguments?.[index], bErrorTarget)) - } - function typesEqual(a: TypeNode | undefined, aErrorTarget: Node | undefined, b: TypeNode | undefined, bErrorTarget: Node | undefined): boolean { - if (a === undefined || b === undefined) return a === b; - if (a.kind !== b.kind) return false; - switch (a.kind) { - case SyntaxKind.AnyKeyword: - case SyntaxKind.UnknownKeyword: - case SyntaxKind.NumberKeyword: - case SyntaxKind.BigIntKeyword: - case SyntaxKind.ObjectKeyword: - case SyntaxKind.BooleanKeyword: - case SyntaxKind.StringKeyword: - case SyntaxKind.SymbolKeyword: - case SyntaxKind.VoidKeyword: - case SyntaxKind.UndefinedKeyword: - case SyntaxKind.NeverKeyword: - return true; - } - if (isLiteralTypeNode(a) && isLiteralTypeNode(b)) { - let aLiteral = a.literal; - let bLiteral = b.literal; - while (true) { - switch (aLiteral.kind) { - case SyntaxKind.NullKeyword: - case SyntaxKind.TrueKeyword: - case SyntaxKind.FalseKeyword: - return aLiteral.kind === bLiteral.kind; - case SyntaxKind.NumericLiteral: - return aLiteral.kind === bLiteral.kind && +aLiteral.text === +(bLiteral).text; - case SyntaxKind.StringLiteral: - case SyntaxKind.NoSubstitutionTemplateLiteral: - return (bLiteral.kind === SyntaxKind.StringLiteral || bLiteral.kind === SyntaxKind.NoSubstitutionTemplateLiteral) - && aLiteral.text === (bLiteral).text; - case SyntaxKind.PrefixUnaryExpression: - const aUnary = (aLiteral as PrefixUnaryExpression); - const bUnary = (bLiteral as PrefixUnaryExpression); - if (aUnary.operator !== bUnary.operator) return false; - - aLiteral = aUnary.operand as LiteralExpression; - bLiteral = bUnary.operand as LiteralExpression; - return +aLiteral.text === +bLiteral.text; - default: - return false; - } - } - } - else if (isArrayTypeNode(a) && isArrayTypeNode(b)) { - return typesEqual(a.elementType, aErrorTarget, b.elementType, bErrorTarget); - } - else if (isTypeReferenceNode(a) && isTypeReferenceNode(b)) { - if (!entityNameEqual(a.typeName, b.typeName)) { - return false; - } - return nodeTypeArgumentsEqual(a, aErrorTarget, b, bErrorTarget); - } - else if (isTypeLiteralNode(a) && isTypeLiteralNode(b)) { - if (a.members.length !== b.members.length) return false; - const aTypeInfo = getTypeInfo(a, aErrorTarget); - if (!aTypeInfo) return false; - - for (const bMember of b.members) { - const bIsMethod = isMethodSignature(bMember); - const bIsProp = isPropertySignature(bMember); - if (bIsMethod || bIsProp) { - const memberKey = getMemberKey(bMember); - if (memberKey === undefined) { - makeInvalidTypeAndReport(bErrorTarget ?? bMember); - break; - } - const aMember = aTypeInfo.members.get(memberKey); - if (!aMember) return false; - if ((aMember.questionToken !== undefined) !== (bMember.questionToken !== undefined)) return false; - if (getSyntacticModifierFlags(aMember) !== getSyntacticModifierFlags(bMember)) return false; - if (bIsProp && isPropertySignature(aMember)) { - if (!typesEqual(aMember.type, aErrorTarget, bMember.type, bErrorTarget)) { - return false; - } - } - else if (bIsMethod && isMethodSignature(aMember)) { - return signatureEqual(aMember, aErrorTarget, bMember, bErrorTarget) - } - } - else { - makeInvalidTypeAndReport(bErrorTarget ?? bMember); - } - } - return true; - } - else if (isFunctionTypeNode(a) && isFunctionTypeNode(b)) { - return signatureEqual(a, aErrorTarget, b, bErrorTarget); - } - else if (isConstructorTypeNode(a) && isConstructorTypeNode(b)) { - return signatureEqual(a, aErrorTarget, b, bErrorTarget); - } - else if (isTypeQueryNode(a) && isTypeQueryNode(b)) { - if (!entityNameEqual(a.exprName, b.exprName)) { - return false; - } - return nodeTypeArgumentsEqual(a, aErrorTarget, b, bErrorTarget); - } - else { - return false; - } - } - } - function normalizeObjectUnion(nodes: (TypeNode | undefined)[]) { - const allProps = new Map(); - const allTypeLookup = new Array | undefined>(); - let hasChanged = false; - for (let i = 0; i < nodes.length; i++) { - const type = nodes[i]; - const typeLookup = new Map(); - allTypeLookup.push(typeLookup); - - if (!type || !isTypeLiteralNode(type)) continue; - for (const member of type.members) { - const isMethod = isMethodSignature(member); - const isProp = isPropertySignature(member); - if (isMethod || isProp) { - const memberKey = getMemberKey(member); - if (memberKey === undefined) { - nodes[i] = makeInvalidTypeAndReport(member.name); - allTypeLookup[i] = undefined; - hasChanged = true; - break; - } - let type; - if (isProp) { - type = member.type ?? makeInvalidTypeAndReport(member); - } - else { - type = factory.createFunctionTypeNode( - member.typeParameters, - member.parameters, - member.type!, - ); - } - let propInfo = allProps.get(memberKey); - if (!propInfo) { - propInfo = { - types: new Array(nodes.length), - name: member.name, - isReadonly: false, - }; - allProps.set(memberKey, propInfo); - } - propInfo.types[i] = type; - propInfo.isReadonly ||= !!(getSyntacticModifierFlags(member) & ModifierFlags.Readonly) - typeLookup.set(memberKey, type); - } - else { - nodes[i] = makeInvalidTypeAndReport(member); - allTypeLookup[i] = undefined; - hasChanged = true; - break; - } - } - } - for (const [, propTypes] of allProps) { - normalizeObjectUnion(propTypes.types); - } - for (let typeIndex = 0; typeIndex < nodes.length; typeIndex++) { - const type = nodes[typeIndex]; - const props = allTypeLookup[typeIndex]; - if (!type || !isTypeLiteralNode(type) || !props) continue; - - let newMembers: TypeElement[] | undefined; - for (const [commonProp, propInfo] of allProps) { - const propType = props.get(commonProp); - if (propType) { - if (propType !== propInfo.types[typeIndex]) { - const indexOfProp = findIndex(type.members, e => isPropertySignature(e) && getMemberKey(e) === commonProp); - if (indexOfProp !== -1) { - if (newMembers === undefined) { - newMembers = [...type.members]; - } - const existingMember = type.members[indexOfProp] as PropertySignature; - newMembers[indexOfProp] = factory.createPropertySignature( - existingMember.modifiers, - existingMember.name, - existingMember.questionToken, - propInfo.types[typeIndex] - ); - } - } - } - else { - if (newMembers === undefined) { - newMembers = [...type.members]; - } - newMembers.push(factory.createPropertySignature( - propInfo.isReadonly ? [factory.createToken(SyntaxKind.ReadonlyKeyword)] : undefined, - deepClone(propInfo.name), - factory.createToken(SyntaxKind.QuestionToken), - factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), - )); - } - } - if (newMembers) { - hasChanged = true; - nodes[typeIndex] = factory.createTypeLiteralNode(newMembers); - } - } - return hasChanged; - } - } - function inferReturnType(node: FunctionLikeDeclaration) { - if (node.type) { - return regular(deepClone(visitType(node.type, node)), node); - } - if (!node.body) { - return regular(makeInvalidTypeAndReport(node), node); - } - - const returnStatements: ReturnStatement[] = []; - const yieldExpressions: YieldExpression[] = []; - - let returnType; - if (!isBlock(node.body)) { - returnType = makeUnionFromTypes(node, [ - localInference(node.body, NarrowBehavior.KeepLiterals) - ], true); - } - else { - collectReturnAndYield(node.body, returnStatements, yieldExpressions); - if (returnStatements.length === 0) { - returnType = regular(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), node); - } - else { - returnType = inferFromOutputs(node, returnStatements, node.asteriskToken ? SyntaxKind.NeverKeyword : SyntaxKind.VoidKeyword); - } - } - let yieldType: LocalTypeInfo | undefined; - if (node.asteriskToken) { - if (yieldExpressions.length === 0) { - yieldType = regular( - factory.createKeywordTypeNode(SyntaxKind.NeverKeyword), - node - ); - } - else { - yieldType = inferFromOutputs(node, yieldExpressions, strictNullChecks ? SyntaxKind.UndefinedKeyword : SyntaxKind.AnyKeyword); - } - } - return makeFinalReturnType(node, returnType, yieldType); - - function inferFromOutputs(node: Node, statements: (YieldExpression | ReturnStatement)[], emptyType: KeywordTypeSyntaxKind) { - const returnStatementInference: LocalTypeInfo[] = []; - let hasOnlyEmpty = true; - for (let r of statements) { - if (r.expression) { - returnStatementInference.push(localInference(r.expression, NarrowBehavior.KeepLiterals)); - hasOnlyEmpty = false; - } else { - returnStatementInference.push( - createUndefinedTypeNode(r, LocalTypeInfoFlags.Fresh) - ); - } - }; - if (hasOnlyEmpty) { - return fresh(factory.createKeywordTypeNode(emptyType), node); - } else { - return makeUnionFromTypes(node, returnStatementInference, /*widenSingle*/ true); - } - } - function makeFinalReturnType(node: FunctionLikeDeclaration, returnType: LocalTypeInfo, yieldType: LocalTypeInfo | undefined) { - const modifiers = getEffectiveModifierFlags(node); - if (node.asteriskToken) { - const yieldTypeNode = yieldType?.typeNode ?? factory.createKeywordTypeNode(SyntaxKind.VoidKeyword); - return regular( - factory.createTypeReferenceNode( - factory.createIdentifier(modifiers & ModifierFlags.Async ? "AsyncGenerator" : "Generator"), - [yieldTypeNode, returnType.typeNode, factory.createKeywordTypeNode(SyntaxKind.UnknownKeyword)], - ), - returnType.sourceNode, - returnType.flags - ); - } - else if (modifiers & ModifierFlags.Async) { - return regular( - factory.createTypeReferenceNode( - factory.createIdentifier("Promise"), - [returnType.typeNode], - ), - returnType.sourceNode, - returnType.flags - ); - } - return returnType; - } - function collectReturnAndYield(node: Node, result: ReturnStatement[], yieldExpressions: YieldExpression[]) { - forEachChild(node, child => { - if (isReturnStatement(child)) { - result.push(child); - } - if (isYieldExpression(child)) { - yieldExpressions.push(child); - } - if (isClassLike(child) || isFunctionLike(child)) { - return; - } - // TODO: Do not walk all children if not generator function - collectReturnAndYield(child, result, yieldExpressions); - }); - } - } - function inferFunctionMembers(scope: { statements: NodeArray }, functionName: Identifier, localType: LocalTypeInfo): LocalTypeInfo { - if (!isFunctionTypeNode(localType.typeNode)) return localType; - let mergedFlags = LocalTypeInfoFlags.None; - let members = new Map(); - for (let i = 0; i < scope.statements.length; i++) { - const statement = scope.statements[i]; - // Looking for name functionName.member = init; - if (!isExpressionStatement(statement)) continue; - if(!isBinaryExpression(statement.expression)) continue; - const assignment = statement.expression; - if(assignment.operatorToken.kind !== SyntaxKind.EqualsToken) continue; - - const isPropertyAccess = isPropertyAccessExpression(assignment.left); - if(isPropertyAccess || isElementAccessExpression(assignment.left) - && isIdentifier(assignment.left.expression) - && assignment.left.expression.escapedText === functionName.escapedText) { - - let name; - if(isPropertyAccess) { - name = deepClone(assignment.left.name); - } else { - const argumentExpression = visitNode(assignment.left.argumentExpression, visitDeclarationSubtree, isExpression)!; - name = factory.createComputedPropertyName(deepClone(argumentExpression)); - } - const key = getMemberNameKey(name); - if(!key) { - continue; - } - - const propType = localInference(assignment.right); - let memberInfo = members.get(key); - if(!memberInfo) { - members.set(key, memberInfo = { - name, - type: [] - }) - } - memberInfo.type.push(propType); - } - } - if (members.size) { - const inferredMembers = [ - factory.createCallSignature( - localType.typeNode.typeParameters, - localType.typeNode.parameters, - localType.typeNode.type - ) - ]; - for(const member of members.values()) { - const propType = makeUnionFromTypes(member.name, member.type, false); - mergedFlags = mergeFlags(mergedFlags, propType.flags); - - factory.createPropertySignature( - [], - member.name, - undefined, - propType.typeNode - ) - } - return { - sourceNode: localType.sourceNode, - flags: mergeFlags(localType.flags, mergedFlags) , - typeNode: factory.createTypeLiteralNode( - inferredMembers - ), - } - } - return localType; - } - - // Copied similar function in checker. Maybe a reusable one should be created. - 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 localInferenceFromInitializer(node: HasInferredType | ExportAssignment): TypeNode | undefined { - if (NO_LOCAL_INFERENCE) { - return undefined; - } - let localType; - let actualTypeNode: Node = node; - if (isExportAssignment(node) && node.expression) { - localType = localInference(node.expression); - actualTypeNode = node.expression; - } - else if (isParameter(node) && node.initializer) { - localType = localInference(node.initializer); - } - else if (isVariableDeclaration(node) && node.initializer) { - - localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals : NarrowBehavior.None); - if (isVariableStatement(node.parent.parent) && - node.parent.flags & NodeFlags.Const && - isIdentifier(node.name) && - (isBlock(node.parent.parent.parent) || isSourceFile(node.parent.parent.parent))) { - localType = inferFunctionMembers(node.parent.parent.parent, node.name, localType); - } - } - else if (isPropertyDeclaration(node) && node.initializer) { - localType = localInference(node.initializer); - } - else if (isFunctionDeclaration(node)) { - localType = inferReturnType(node); - } - else if (isMethodDeclaration(node)) { - localType = inferReturnType(node); - } - else if (isGetAccessorDeclaration(node)) { - localType = inferReturnType(node); - } - - if(!localType || localType.flags & LocalTypeInfoFlags.Invalid) { - return undefined; - } - - const typeNode = localType.typeNode; - setParent(typeNode, node); - const result = resolver.isSyntheticTypeEquivalent(actualTypeNode, typeNode, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit); - if (result !== true) { - result.forEach(r => context.addDiagnostic(r as DiagnosticWithLocation)); - return makeInvalidType(); - } - - return typeNode; - } -} \ No newline at end of file diff --git a/external-declarations/src/compiler/path-utils.ts b/external-declarations/src/compiler/path-utils.ts index cc102c83fc16d..ad066230366b8 100644 --- a/external-declarations/src/compiler/path-utils.ts +++ b/external-declarations/src/compiler/path-utils.ts @@ -10,9 +10,9 @@ import { CharacterCodes, GetCanonicalFileName } from "./types"; * * @internal */ -export const directorySeparator = "/"; +const directorySeparator = "/"; /** @internal */ -export const altDirectorySeparator = "\\"; +const altDirectorySeparator = "\\"; const urlSchemeSeparator = "://"; const backslashRegExp = /\\/g; @@ -23,19 +23,10 @@ const backslashRegExp = /\\/g; * * @internal */ -export function isAnyDirectorySeparator(charCode: number): boolean { +function isAnyDirectorySeparator(charCode: number): boolean { return charCode === CharacterCodes.slash || charCode === CharacterCodes.backslash; } -/** - * Determines whether a path starts with a URL scheme (e.g. starts with `http://`, `ftp://`, `file://`, etc.). - * - * @internal - */ -export function isUrl(path: string) { - return getEncodedRootLength(path) < 0; -} - /** * Determines whether a path is an absolute disk path (e.g. starts with `/`, or a dos path * like `c:`, `c:\` or `c:/`). @@ -56,46 +47,6 @@ export function isDiskPathRoot(path: string) { return rootLength > 0 && rootLength === path.length; } -/** - * Determines whether a path starts with an absolute path component (i.e. `/`, `c:/`, `file://`, etc.). - * - * ```ts - * // POSIX - * pathIsAbsolute("/path/to/file.ext") === true - * // DOS - * pathIsAbsolute("c:/path/to/file.ext") === true - * // URL - * pathIsAbsolute("file:///path/to/file.ext") === true - * // Non-absolute - * pathIsAbsolute("path/to/file.ext") === false - * pathIsAbsolute("./path/to/file.ext") === false - * ``` - * - * @internal - */ -export function pathIsAbsolute(path: string): boolean { - return getEncodedRootLength(path) !== 0; -} - -/** - * Determines whether a path starts with a relative path component (i.e. `.` or `..`). - * - * @internal - */ -export function pathIsRelative(path: string): boolean { - return /^\.\.?($|[\\/])/.test(path); -} - -/** - * Determines whether a path is neither relative nor absolute, e.g. "path/to/file". - * Also known misleadingly as "non-relative". - * - * @internal - */ -export function pathIsBareSpecifier(path: string): boolean { - return !pathIsAbsolute(path) && !pathIsRelative(path); -} - /** @internal */ export function hasExtension(fileName: string): boolean { return stringContains(getBaseFileName(fileName), "."); @@ -122,7 +73,7 @@ export function fileExtensionIsOneOf(path: string, extensions: readonly string[] * * @internal */ -export function hasTrailingDirectorySeparator(path: string) { +function hasTrailingDirectorySeparator(path: string) { return path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1)); } @@ -230,7 +181,7 @@ function getEncodedRootLength(path: string): number { * * @internal */ -export function getRootLength(path: string) { +function getRootLength(path: string) { const rootLength = getEncodedRootLength(path); return rootLength < 0 ? ~rootLength : rootLength; } @@ -596,7 +547,7 @@ export function resolvePath(path: string, ...paths: (string | undefined)[]): str * * @internal */ -export function getNormalizedPathComponents(path: string, currentDirectory: string | undefined) { +function getNormalizedPathComponents(path: string, currentDirectory: string | undefined) { return reducePathComponents(getPathComponents(path, currentDirectory)); } @@ -625,15 +576,6 @@ export function normalizePath(path: string): string { return normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized; } -function getPathWithoutRoot(pathComponents: readonly string[]) { - if (pathComponents.length === 0) return ""; - return pathComponents.slice(1).join(directorySeparator); -} - -/** @internal */ -export function getNormalizedAbsolutePathWithoutRoot(fileName: string, currentDirectory: string | undefined) { - return getPathWithoutRoot(getNormalizedPathComponents(fileName, currentDirectory)); -} /** @internal */ export function toPath(fileName: string, basePath: string | undefined, getCanonicalFileName: (path: string) => string): Path { @@ -655,11 +597,11 @@ export function toPath(fileName: string, basePath: string | undefined, getCanoni * * @internal */ -export function removeTrailingDirectorySeparator(path: Path): Path; +function removeTrailingDirectorySeparator(path: Path): Path; /** @internal */ -export function removeTrailingDirectorySeparator(path: string): string; +function removeTrailingDirectorySeparator(path: string): string; /** @internal */ -export function removeTrailingDirectorySeparator(path: string) { +function removeTrailingDirectorySeparator(path: string) { if (hasTrailingDirectorySeparator(path)) { return path.substr(0, path.length - 1); } @@ -677,11 +619,11 @@ export function removeTrailingDirectorySeparator(path: string) { * * @internal */ -export function ensureTrailingDirectorySeparator(path: Path): Path; +function ensureTrailingDirectorySeparator(path: Path): Path; /** @internal */ -export function ensureTrailingDirectorySeparator(path: string): string; +function ensureTrailingDirectorySeparator(path: string): string; /** @internal */ -export function ensureTrailingDirectorySeparator(path: string) { +function ensureTrailingDirectorySeparator(path: string) { if (!hasTrailingDirectorySeparator(path)) { return path + directorySeparator; } @@ -689,23 +631,6 @@ export function ensureTrailingDirectorySeparator(path: string) { return path; } -/** - * Ensures a path is either absolute (prefixed with `/` or `c:`) or dot-relative (prefixed - * with `./` or `../`) so as not to be confused with an unprefixed module name. - * - * ```ts - * ensurePathIsNonModuleName("/path/to/file.ext") === "/path/to/file.ext" - * ensurePathIsNonModuleName("./path/to/file.ext") === "./path/to/file.ext" - * ensurePathIsNonModuleName("../path/to/file.ext") === "../path/to/file.ext" - * ensurePathIsNonModuleName("path/to/file.ext") === "./path/to/file.ext" - * ``` - * - * @internal - */ -export function ensurePathIsNonModuleName(path: string): string { - return !pathIsAbsolute(path) && !pathIsRelative(path) ? "./" + path : path; -} - /** * Changes the extension of a path to the provided extension. * @@ -813,60 +738,10 @@ export function comparePaths(a: string, b: string, currentDirectory?: string | b return comparePathsWorker(a, b, getStringComparer(ignoreCase)); } -/** - * Determines whether a `parent` path contains a `child` path using the provide case sensitivity. - * - * @internal - */ -export function containsPath(parent: string, child: string, ignoreCase?: boolean): boolean; -/** @internal */ -export function containsPath(parent: string, child: string, currentDirectory: string, ignoreCase?: boolean): boolean; -/** @internal */ -export function containsPath(parent: string, child: string, currentDirectory?: string | boolean, ignoreCase?: boolean) { - if (typeof currentDirectory === "string") { - parent = combinePaths(currentDirectory, parent); - child = combinePaths(currentDirectory, child); - } - else if (typeof currentDirectory === "boolean") { - ignoreCase = currentDirectory; - } - if (parent === undefined || child === undefined) return false; - if (parent === child) return true; - const parentComponents = reducePathComponents(getPathComponents(parent)); - const childComponents = reducePathComponents(getPathComponents(child)); - if (childComponents.length < parentComponents.length) { - return false; - } - - const componentEqualityComparer = ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive; - for (let i = 0; i < parentComponents.length; i++) { - const equalityComparer = i === 0 ? equateStringsCaseInsensitive : componentEqualityComparer; - if (!equalityComparer(parentComponents[i], childComponents[i])) { - return false; - } - } - - return true; -} - -/** - * Determines whether `fileName` starts with the specified `directoryName` using the provided path canonicalization callback. - * Comparison is case-sensitive between the canonical paths. - * - * Use `containsPath` if file names are not already reduced and absolute. - * - * @internal - */ -export function startsWithDirectory(fileName: string, directoryName: string, getCanonicalFileName: GetCanonicalFileName): boolean { - const canonicalFileName = getCanonicalFileName(fileName); - const canonicalDirectoryName = getCanonicalFileName(directoryName); - return startsWith(canonicalFileName, canonicalDirectoryName + "/") || startsWith(canonicalFileName, canonicalDirectoryName + "\\"); -} - //// Relative Paths /** @internal */ -export function getPathComponentsRelativeTo(from: string, to: string, stringEqualityComparer: (a: string, b: string) => boolean, getCanonicalFileName: GetCanonicalFileName) { +function getPathComponentsRelativeTo(from: string, to: string, stringEqualityComparer: (a: string, b: string) => boolean, getCanonicalFileName: GetCanonicalFileName) { const fromComponents = reducePathComponents(getPathComponents(from)); const toComponents = reducePathComponents(getPathComponents(to)); @@ -911,68 +786,9 @@ export function getRelativePathFromDirectory(fromDirectory: string, to: string, return getPathFromPathComponents(pathComponents); } -/** @internal */ -export function convertToRelativePath(absoluteOrRelativePath: string, basePath: string, getCanonicalFileName: (path: string) => string): string { - return !isRootedDiskPath(absoluteOrRelativePath) - ? absoluteOrRelativePath - : getRelativePathToDirectoryOrUrl(basePath, absoluteOrRelativePath, basePath, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); -} - -/** @internal */ -export function getRelativePathFromFile(from: string, to: string, getCanonicalFileName: GetCanonicalFileName) { - return ensurePathIsNonModuleName(getRelativePathFromDirectory(getDirectoryPath(from), to, getCanonicalFileName)); -} - -/** @internal */ -export function getRelativePathToDirectoryOrUrl(directoryPathOrUrl: string, relativeOrAbsolutePath: string, currentDirectory: string, getCanonicalFileName: GetCanonicalFileName, isAbsolutePathAnUrl: boolean) { - const pathComponents = getPathComponentsRelativeTo( - resolvePath(currentDirectory, directoryPathOrUrl), - resolvePath(currentDirectory, relativeOrAbsolutePath), - equateStringsCaseSensitive, - getCanonicalFileName - ); - - const firstComponent = pathComponents[0]; - if (isAbsolutePathAnUrl && isRootedDiskPath(firstComponent)) { - const prefix = firstComponent.charAt(0) === directorySeparator ? "file://" : "file:///"; - pathComponents[0] = prefix + firstComponent; - } - - return getPathFromPathComponents(pathComponents); -} //// Path Traversal -/** - * Calls `callback` on `directory` and every ancestor directory it has, returning the first defined result. - * - * @internal - */ -export function forEachAncestorDirectory(directory: Path, callback: (directory: Path) => T | undefined): T | undefined; -/** @internal */ -export function forEachAncestorDirectory(directory: string, callback: (directory: string) => T | undefined): T | undefined; -/** @internal */ -export function forEachAncestorDirectory(directory: Path, callback: (directory: Path) => T | undefined): T | undefined { - while (true) { - const result = callback(directory); - if (result !== undefined) { - return result; - } - - const parentPath = getDirectoryPath(directory); - if (parentPath === directory) { - return undefined; - } - - directory = parentPath; - } -} - -/** @internal */ -export function isNodeModulesDirectory(dirPath: Path) { - return endsWith(dirPath, "/node_modules"); -} - /** * Case insensitive file systems have descripencies in how they handle some characters (eg. turkish Upper case I with dot on top - \u0130) @@ -987,7 +803,7 @@ export function isNodeModulesDirectory(dirPath: Path) { * * @internal */ - export function toFileNameLowerCase(x: string) { +function toFileNameLowerCase(x: string) { return fileNameLowerCaseRegExp.test(x) ? x.replace(fileNameLowerCaseRegExp, toLowerCase) : x; @@ -1018,63 +834,18 @@ export function isNodeModulesDirectory(dirPath: Path) { // a-z, 0-9, \u0131, \u00DF, \, /, ., : and space const fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g; -const extensionsToRemove = [Extension.Dts, Extension.Dmts, Extension.Dcts, Extension.Mjs, Extension.Mts, Extension.Cjs, Extension.Cts, Extension.Ts, Extension.Js, Extension.Tsx, Extension.Jsx, Extension.Json]; -/** @internal */ -export function removeFileExtension(path: string): string { - for (const ext of extensionsToRemove) { - const extensionless = tryRemoveExtension(path, ext); - if (extensionless !== undefined) { - return extensionless; - } - } - return path; -} - - -/** @internal */ -export function tryRemoveExtension(path: string, extension: string): string | undefined { - return fileExtensionIs(path, extension) ? removeExtension(path, extension) : undefined; -} - /** @internal */ export function removeExtension(path: string, extension: string): string { return path.substring(0, path.length - extension.length); } -/** @internal */ -export function compareNumberOfDirectorySeparators(path1: string, path2: string) { - return compareValues( - numberOfDirectorySeparators(path1), - numberOfDirectorySeparators(path2) - ); -} -function numberOfDirectorySeparators(str: string) { - const match = str.match(/\//g); - return match ? match.length : 0; -} - -/** @internal */ -export const ignoredPaths = ["/node_modules/.", "/.git", "/.#"]; - -/** @internal */ -export function containsIgnoredPath(path: string) { - return some(ignoredPaths, p => stringContains(path, p)); -} - /** @internal */ export function createGetCanonicalFileName(useCaseSensitiveFileNames: boolean): GetCanonicalFileName { return useCaseSensitiveFileNames ? identity : toFileNameLowerCase; } - -export function isSourceMapFile(f: string) { - return f.endsWith(".map"); -} -export function isJSONFile(f: string) { - return f.endsWith(Extension.Json); -} export function isTypeScriptFile(f: string) { return f.endsWith(Extension.Ts) || f.endsWith(Extension.Tsx) diff --git a/external-declarations/src/compiler/transform-file.ts b/external-declarations/src/compiler/transform-file.ts index 73f0e8308d30c..4f2cf1af91aad 100644 --- a/external-declarations/src/compiler/transform-file.ts +++ b/external-declarations/src/compiler/transform-file.ts @@ -1,10 +1,15 @@ import * as ts from 'typescript' -import { transformDeclarations } from './declaration-emit'; + import { createEmitHost } from './emit-host'; import { createEmitResolver } from './emit-resolver'; import { TransformationContext } from './types'; import { tracer } from './perf-tracer'; +import { SourceFile } from 'typescript'; + +const transformDeclarations: (context: TransformationContext) => { + (node: SourceFile): SourceFile; +} = (ts as any).transformDeclarations export function transformFile(sourceFile: ts.SourceFile, allProjectFiles: string[], tsLibFiles: string[], options: ts.CompilerOptions, moduleType: ts.ResolutionMode) { diff --git a/external-declarations/src/compiler/transform-project.ts b/external-declarations/src/compiler/transform-project.ts index d36caec102c42..5675d5db0acfe 100644 --- a/external-declarations/src/compiler/transform-project.ts +++ b/external-declarations/src/compiler/transform-project.ts @@ -1,5 +1,5 @@ -import path = require("path"); -import ts = require("typescript"); +import * as path from "path"; +import * as ts from "typescript"; import { normalizePath, changeAnyExtension } from "./path-utils"; import { transformFile } from "./transform-file"; import { tracer } from "./perf-tracer"; diff --git a/external-declarations/src/compiler/transformer.ts b/external-declarations/src/compiler/transformer.ts deleted file mode 100644 index 33ec2033e285e..0000000000000 --- a/external-declarations/src/compiler/transformer.ts +++ /dev/null @@ -1,451 +0,0 @@ -import { Node, NodeFactory, CompilerOptions, TransformerFactory, TransformationResult, SyntaxKind, VariableDeclaration, FunctionDeclaration, Statement, Identifier, EmitHelper, DiagnosticWithLocation, disposeEmitNodes, getParseTreeNode, SourceFile, isSourceFile, EmitFlags, EmitHint, setEmitFlags, NodeFlags } from "typescript"; -import { Debug } from "./debug"; -import { some, append } from "./lang-utils"; -import { EmitResolver, EmitHost, TransformationContext } from "./types"; -import { getEmitFlags, getSourceFileOfNode } from "./utils"; - -/** - * Transforms an array of SourceFiles by passing them through each transformer. - * - * @param resolver The emit resolver provided by the checker. - * @param host The emit host object used to interact with the file system. - * @param options Compiler options to surface in the `TransformationContext`. - * @param nodes An array of nodes to transform. - * @param transforms An array of `TransformerFactory` callbacks. - * @param allowDtsFiles A value indicating whether to allow the transformation of .d.ts files. - * - * @internal - */ - export function transformNodes(resolver: EmitResolver | undefined, host: EmitHost | undefined, factory: NodeFactory, options: CompilerOptions, nodes: readonly T[], transformers: readonly TransformerFactory[], allowDtsFiles: boolean): TransformationResult { - const enabledSyntaxKindFeatures = new Array(SyntaxKind.Count); - let lexicalEnvironmentVariableDeclarations: VariableDeclaration[]; - let lexicalEnvironmentFunctionDeclarations: FunctionDeclaration[]; - let lexicalEnvironmentStatements: Statement[]; - let lexicalEnvironmentFlags = LexicalEnvironmentFlags.None; - let lexicalEnvironmentVariableDeclarationsStack: VariableDeclaration[][] = []; - let lexicalEnvironmentFunctionDeclarationsStack: FunctionDeclaration[][] = []; - let lexicalEnvironmentStatementsStack: Statement[][] = []; - let lexicalEnvironmentFlagsStack: LexicalEnvironmentFlags[] = []; - let lexicalEnvironmentStackOffset = 0; - let lexicalEnvironmentSuspended = false; - let blockScopedVariableDeclarationsStack: Identifier[][] = []; - let blockScopeStackOffset = 0; - let blockScopedVariableDeclarations: Identifier[]; - let emitHelpers: EmitHelper[] | undefined; - let onSubstituteNode: TransformationContext["onSubstituteNode"] = noEmitSubstitution; - let onEmitNode: TransformationContext["onEmitNode"] = noEmitNotification; - let state = TransformationState.Uninitialized; - const diagnostics: DiagnosticWithLocation[] = []; - - // The transformation context is provided to each transformer as part of transformer - // initialization. - const context: TransformationContext = { - factory: factory as TransformationContext['factory'], - getCompilerOptions: () => options, - getEmitResolver: () => resolver!, // TODO: GH#18217 - getEmitHost: () => host!, // TODO: GH#18217 - startLexicalEnvironment, - suspendLexicalEnvironment, - resumeLexicalEnvironment, - endLexicalEnvironment, - hoistVariableDeclaration, - hoistFunctionDeclaration, - requestEmitHelper, - readEmitHelpers, - enableSubstitution, - enableEmitNotification, - isSubstitutionEnabled, - isEmitNotificationEnabled, - get onSubstituteNode() { return onSubstituteNode; }, - set onSubstituteNode(value) { - Debug.assert(state < TransformationState.Initialized, "Cannot modify transformation hooks after initialization has completed."); - Debug.assert(value !== undefined, "Value must not be 'undefined'"); - onSubstituteNode = value; - }, - get onEmitNode() { return onEmitNode; }, - set onEmitNode(value) { - Debug.assert(state < TransformationState.Initialized, "Cannot modify transformation hooks after initialization has completed."); - Debug.assert(value !== undefined, "Value must not be 'undefined'"); - onEmitNode = value; - }, - addDiagnostic(diag) { - console.log(diag.messageText); - }, - getEmitHelperFactory() { - return factory; - }, - }; - - // Ensure the parse tree is clean before applying transformations - for (const node of nodes) { - disposeEmitNodes(getSourceFileOfNode(getParseTreeNode(node))); - } - - - // Chain together and initialize each transformer. - const transformersWithContext = transformers.map(t => t(context)); - const transformation = (node: T): T => { - for (const transform of transformersWithContext) { - node = transform(node); - } - return node; - }; - - // prevent modification of transformation hooks. - state = TransformationState.Initialized; - - // Transform each node. - const transformed: T[] = []; - for (const node of nodes) { - transformed.push((allowDtsFiles ? transformation : transformRoot)(node)); - } - - // prevent modification of the lexical environment. - state = TransformationState.Completed; - - return { - transformed, - substituteNode, - emitNodeWithNotification, - isEmitNotificationEnabled, - dispose, - diagnostics - }; - - function transformRoot(node: T) { - return node && (!isSourceFile(node) || !node.isDeclarationFile) ? transformation(node) : node; - } - - /** - * Enables expression substitutions in the pretty printer for the provided SyntaxKind. - */ - function enableSubstitution(kind: SyntaxKind) { - Debug.assert(state < TransformationState.Completed, "Cannot modify the transformation context after transformation has completed."); - enabledSyntaxKindFeatures[kind] |= SyntaxKindFeatureFlags.Substitution; - } - - /** - * Determines whether expression substitutions are enabled for the provided node. - */ - function isSubstitutionEnabled(node: Node) { - return (enabledSyntaxKindFeatures[node.kind] & SyntaxKindFeatureFlags.Substitution) !== 0 - && (getEmitFlags(node) & EmitFlags.NoSubstitution) === 0; - } - - /** - * Emits a node with possible substitution. - * - * @param hint A hint as to the intended usage of the node. - * @param node The node to emit. - * @param emitCallback The callback used to emit the node or its substitute. - */ - function substituteNode(hint: EmitHint, node: Node) { - Debug.assert(state < TransformationState.Disposed, "Cannot substitute a node after the result is disposed."); - return node && isSubstitutionEnabled(node) && onSubstituteNode(hint, node) || node; - } - - /** - * Enables before/after emit notifications in the pretty printer for the provided SyntaxKind. - */ - function enableEmitNotification(kind: SyntaxKind) { - Debug.assert(state < TransformationState.Completed, "Cannot modify the transformation context after transformation has completed."); - enabledSyntaxKindFeatures[kind] |= SyntaxKindFeatureFlags.EmitNotifications; - } - - /** - * Determines whether before/after emit notifications should be raised in the pretty - * printer when it emits a node. - */ - function isEmitNotificationEnabled(node: Node) { - return (enabledSyntaxKindFeatures[node.kind] & SyntaxKindFeatureFlags.EmitNotifications) !== 0 - || (getEmitFlags(node) & EmitFlags.AdviseOnEmitNode) !== 0; - } - - /** - * Emits a node with possible emit notification. - * - * @param hint A hint as to the intended usage of the node. - * @param node The node to emit. - * @param emitCallback The callback used to emit the node. - */ - function emitNodeWithNotification(hint: EmitHint, node: Node, emitCallback: (hint: EmitHint, node: Node) => void) { - Debug.assert(state < TransformationState.Disposed, "Cannot invoke TransformationResult callbacks after the result is disposed."); - if (node) { - // TODO: Remove check and unconditionally use onEmitNode when API is breakingly changed - // (see https://github.com/microsoft/TypeScript/pull/36248/files/5062623f39120171b98870c71344b3242eb03d23#r369766739) - if (isEmitNotificationEnabled(node)) { - onEmitNode(hint, node, emitCallback); - } - else { - emitCallback(hint, node); - } - } - } - - /** - * Records a hoisted variable declaration for the provided name within a lexical environment. - */ - function hoistVariableDeclaration(name: Identifier): void { - Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the lexical environment during initialization."); - Debug.assert(state < TransformationState.Completed, "Cannot modify the lexical environment after transformation has completed."); - const decl = setEmitFlags(factory.createVariableDeclaration(name), EmitFlags.NoNestedSourceMaps); - if (!lexicalEnvironmentVariableDeclarations) { - lexicalEnvironmentVariableDeclarations = [decl]; - } - else { - lexicalEnvironmentVariableDeclarations.push(decl); - } - if (lexicalEnvironmentFlags & LexicalEnvironmentFlags.InParameters) { - lexicalEnvironmentFlags |= LexicalEnvironmentFlags.VariablesHoistedInParameters; - } - } - - /** - * Records a hoisted function declaration within a lexical environment. - */ - function hoistFunctionDeclaration(func: FunctionDeclaration): void { - Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the lexical environment during initialization."); - Debug.assert(state < TransformationState.Completed, "Cannot modify the lexical environment after transformation has completed."); - setEmitFlags(func, EmitFlags.CustomPrologue); - if (!lexicalEnvironmentFunctionDeclarations) { - lexicalEnvironmentFunctionDeclarations = [func]; - } - else { - lexicalEnvironmentFunctionDeclarations.push(func); - } - } - - /** - * Adds an initialization statement to the top of the lexical environment. - */ - function addInitializationStatement(node: Statement): void { - Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the lexical environment during initialization."); - Debug.assert(state < TransformationState.Completed, "Cannot modify the lexical environment after transformation has completed."); - setEmitFlags(node, EmitFlags.CustomPrologue); - if (!lexicalEnvironmentStatements) { - lexicalEnvironmentStatements = [node]; - } - else { - lexicalEnvironmentStatements.push(node); - } - } - - /** - * Starts a new lexical environment. Any existing hoisted variable or function declarations - * are pushed onto a stack, and the related storage variables are reset. - */ - function startLexicalEnvironment(): void { - Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the lexical environment during initialization."); - Debug.assert(state < TransformationState.Completed, "Cannot modify the lexical environment after transformation has completed."); - Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is suspended."); - - // Save the current lexical environment. Rather than resizing the array we adjust the - // stack size variable. This allows us to reuse existing array slots we've - // already allocated between transformations to avoid allocation and GC overhead during - // transformation. - lexicalEnvironmentVariableDeclarationsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentVariableDeclarations; - lexicalEnvironmentFunctionDeclarationsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentFunctionDeclarations; - lexicalEnvironmentStatementsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentStatements; - lexicalEnvironmentFlagsStack[lexicalEnvironmentStackOffset] = lexicalEnvironmentFlags; - lexicalEnvironmentStackOffset++; - lexicalEnvironmentVariableDeclarations = undefined!; - lexicalEnvironmentFunctionDeclarations = undefined!; - lexicalEnvironmentStatements = undefined!; - lexicalEnvironmentFlags = LexicalEnvironmentFlags.None; - } - - /** Suspends the current lexical environment, usually after visiting a parameter list. */ - function suspendLexicalEnvironment(): void { - Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the lexical environment during initialization."); - Debug.assert(state < TransformationState.Completed, "Cannot modify the lexical environment after transformation has completed."); - Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is already suspended."); - lexicalEnvironmentSuspended = true; - } - - /** Resumes a suspended lexical environment, usually before visiting a function body. */ - function resumeLexicalEnvironment(): void { - Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the lexical environment during initialization."); - Debug.assert(state < TransformationState.Completed, "Cannot modify the lexical environment after transformation has completed."); - Debug.assert(lexicalEnvironmentSuspended, "Lexical environment is not suspended."); - lexicalEnvironmentSuspended = false; - } - - /** - * Ends a lexical environment. The previous set of hoisted declarations are restored and - * any hoisted declarations added in this environment are returned. - */ - function endLexicalEnvironment(): Statement[] | undefined { - Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the lexical environment during initialization."); - Debug.assert(state < TransformationState.Completed, "Cannot modify the lexical environment after transformation has completed."); - Debug.assert(!lexicalEnvironmentSuspended, "Lexical environment is suspended."); - - let statements: Statement[] | undefined; - if (lexicalEnvironmentVariableDeclarations || - lexicalEnvironmentFunctionDeclarations || - lexicalEnvironmentStatements) { - if (lexicalEnvironmentFunctionDeclarations) { - statements = [...lexicalEnvironmentFunctionDeclarations]; - } - - if (lexicalEnvironmentVariableDeclarations) { - const statement = factory.createVariableStatement( - /*modifiers*/ undefined, - factory.createVariableDeclarationList(lexicalEnvironmentVariableDeclarations) - ); - - setEmitFlags(statement, EmitFlags.CustomPrologue); - - if (!statements) { - statements = [statement]; - } - else { - statements.push(statement); - } - } - - if (lexicalEnvironmentStatements) { - if (!statements) { - statements = [...lexicalEnvironmentStatements]; - } - else { - statements = [...statements, ...lexicalEnvironmentStatements]; - } - } - } - - // Restore the previous lexical environment. - lexicalEnvironmentStackOffset--; - lexicalEnvironmentVariableDeclarations = lexicalEnvironmentVariableDeclarationsStack[lexicalEnvironmentStackOffset]; - lexicalEnvironmentFunctionDeclarations = lexicalEnvironmentFunctionDeclarationsStack[lexicalEnvironmentStackOffset]; - lexicalEnvironmentStatements = lexicalEnvironmentStatementsStack[lexicalEnvironmentStackOffset]; - lexicalEnvironmentFlags = lexicalEnvironmentFlagsStack[lexicalEnvironmentStackOffset]; - if (lexicalEnvironmentStackOffset === 0) { - lexicalEnvironmentVariableDeclarationsStack = []; - lexicalEnvironmentFunctionDeclarationsStack = []; - lexicalEnvironmentStatementsStack = []; - lexicalEnvironmentFlagsStack = []; - } - return statements; - } - - function setLexicalEnvironmentFlags(flags: LexicalEnvironmentFlags, value: boolean): void { - lexicalEnvironmentFlags = value ? - lexicalEnvironmentFlags | flags : - lexicalEnvironmentFlags & ~flags; - } - - function getLexicalEnvironmentFlags(): LexicalEnvironmentFlags { - return lexicalEnvironmentFlags; - } - - /** - * Starts a block scope. Any existing block hoisted variables are pushed onto the stack and the related storage variables are reset. - */ - function startBlockScope() { - Debug.assert(state > TransformationState.Uninitialized, "Cannot start a block scope during initialization."); - Debug.assert(state < TransformationState.Completed, "Cannot start a block scope after transformation has completed."); - blockScopedVariableDeclarationsStack[blockScopeStackOffset] = blockScopedVariableDeclarations; - blockScopeStackOffset++; - blockScopedVariableDeclarations = undefined!; - } - - /** - * Ends a block scope. The previous set of block hoisted variables are restored. Any hoisted declarations are returned. - */ - function endBlockScope() { - Debug.assert(state > TransformationState.Uninitialized, "Cannot end a block scope during initialization."); - Debug.assert(state < TransformationState.Completed, "Cannot end a block scope after transformation has completed."); - const statements: Statement[] | undefined = some(blockScopedVariableDeclarations) ? - [ - factory.createVariableStatement( - /*modifiers*/ undefined, - factory.createVariableDeclarationList( - blockScopedVariableDeclarations.map(identifier => factory.createVariableDeclaration(identifier)), - NodeFlags.Let - ) - ) - ] : undefined; - blockScopeStackOffset--; - blockScopedVariableDeclarations = blockScopedVariableDeclarationsStack[blockScopeStackOffset]; - if (blockScopeStackOffset === 0) { - blockScopedVariableDeclarationsStack = []; - } - return statements; - } - - function addBlockScopedVariable(name: Identifier): void { - Debug.assert(blockScopeStackOffset > 0, "Cannot add a block scoped variable outside of an iteration body."); - (blockScopedVariableDeclarations || (blockScopedVariableDeclarations = [])).push(name); - } - - function requestEmitHelper(helper: EmitHelper): void { - Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the transformation context during initialization."); - Debug.assert(state < TransformationState.Completed, "Cannot modify the transformation context after transformation has completed."); - Debug.assert(!helper.scoped, "Cannot request a scoped emit helper."); - if (helper.dependencies) { - for (const h of helper.dependencies) { - requestEmitHelper(h); - } - } - emitHelpers = append(emitHelpers, helper); - } - - function readEmitHelpers(): EmitHelper[] | undefined { - Debug.assert(state > TransformationState.Uninitialized, "Cannot modify the transformation context during initialization."); - Debug.assert(state < TransformationState.Completed, "Cannot modify the transformation context after transformation has completed."); - const helpers = emitHelpers; - emitHelpers = undefined; - return helpers; - } - - function dispose() { - if (state < TransformationState.Disposed) { - // Clean up emit nodes on parse tree - for (const node of nodes) { - disposeEmitNodes(getSourceFileOfNode(getParseTreeNode(node))); - } - - // Release references to external entries for GC purposes. - lexicalEnvironmentVariableDeclarations = undefined!; - lexicalEnvironmentVariableDeclarationsStack = undefined!; - lexicalEnvironmentFunctionDeclarations = undefined!; - lexicalEnvironmentFunctionDeclarationsStack = undefined!; - onSubstituteNode = undefined!; - onEmitNode = undefined!; - emitHelpers = undefined; - - // Prevent further use of the transformation result. - state = TransformationState.Disposed; - } - } -} - -const enum TransformationState { - Uninitialized, - Initialized, - Completed, - Disposed -} - -const enum SyntaxKindFeatureFlags { - Substitution = 1 << 0, - EmitNotifications = 1 << 1, -} - - -/** @internal */ -export const enum LexicalEnvironmentFlags { - None = 0, - InParameters = 1 << 0, // currently visiting a parameter list - VariablesHoistedInParameters = 1 << 1 // a temp variable was hoisted while visiting a parameter list -} - -/** @internal */ -export function noEmitSubstitution(_hint: EmitHint, node: Node) { - return node; -} - -/** @internal */ -export function noEmitNotification(hint: EmitHint, node: Node, callback: (hint: EmitHint, node: Node) => void) { - callback(hint, node); -} \ No newline at end of file diff --git a/external-declarations/src/compiler/types.ts b/external-declarations/src/compiler/types.ts index 1c0b7c607792c..87f51eefa2d13 100644 --- a/external-declarations/src/compiler/types.ts +++ b/external-declarations/src/compiler/types.ts @@ -1,9 +1,9 @@ -import { Symbol, ClassDeclaration, CompilerOptions, DeclarationName, DiagnosticWithLocation, EnumDeclaration, FunctionDeclaration, InterfaceDeclaration, ModuleDeclaration, ModuleKind, Node, PackageJsonInfoCache, Path, QualifiedName, SourceFile, SymbolFlags, TransformationContext as _TransformationContext, TypeAliasDeclaration, VariableStatement, NodeBuilderFlags, Statement, AccessorDeclaration, BindingElement, Declaration, ElementAccessExpression, EntityName, EntityNameOrEntityNameExpression, EnumMember, ExportDeclaration, Expression, Identifier, ImportCall, ImportDeclaration, ImportEqualsDeclaration, ImportTypeNode, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertySignature, SignatureDeclaration, StringLiteralLike, TypeNode, VariableDeclaration, VariableLikeDeclaration, ModuleBlock, LiteralTypeNode, BinaryExpression, ComputedPropertyName, NamedDeclaration, StringLiteral, ParenthesizedExpression, AsExpression, NonNullExpression, PartiallyEmittedExpression, SatisfiesExpression, TypeAssertion, EntityNameExpression, HasModifiers, Modifier, ModifierFlags, Program, UnparsedSource, FileReference, EmitFlags, EmitHelper, SourceMapRange, SynthesizedComment, TextRange, NoSubstitutionTemplateLiteral, MapLike, DiagnosticMessage, Diagnostic, EmitHint, factory, NodeFactory } from "typescript"; -import { AllAccessorDeclarations, AnyImportSyntax } from "./utils"; +import { Symbol, ClassDeclaration, CompilerOptions, DiagnosticWithLocation, EnumDeclaration, FunctionDeclaration, InterfaceDeclaration, ModuleDeclaration, Node, SourceFile, SymbolFlags, TransformationContext as _TransformationContext, TypeAliasDeclaration, VariableStatement, Declaration, ElementAccessExpression, EntityNameOrEntityNameExpression, Expression, ImportDeclaration, ParameterDeclaration, PropertyDeclaration, PropertySignature, SignatureDeclaration, StringLiteralLike, TypeNode, VariableDeclaration, ModuleBlock, BinaryExpression, ComputedPropertyName, NamedDeclaration, ParenthesizedExpression, AsExpression, NonNullExpression, PartiallyEmittedExpression, SatisfiesExpression, TypeAssertion, EntityNameExpression, ModifierFlags, UnparsedSource, FileReference, DiagnosticMessage, Diagnostic, ResolutionMode } from "typescript"; +import { AnyImportSyntax } from "./utils"; /** @internal */ -export interface ResolveModuleNameResolutionHost { +interface ResolveModuleNameResolutionHost { getCanonicalFileName(p: string): string; getCommonSourceDirectory(): string; getCurrentDirectory(): string; @@ -12,55 +12,11 @@ export interface ResolveModuleNameResolutionHost { export interface TransformationContext extends _TransformationContext { addDiagnostic(diag: DiagnosticWithLocation): void; - /** @internal */ getEmitResolver(): EmitResolver; - /** @internal */ getEmitHost(): EmitHost; - /** @internal */ getEmitHelperFactory(): EmitHelperFactory; - factory: _TransformationContext['factory'] & { - updateModifiers(node: T, modifiers: readonly Modifier[] | ModifierFlags | undefined): T; - cloneNode(node: T): T; - } -} - -export const nullTransformationContext: TransformationContext = { - factory: factory as any, // eslint-disable-line object-shorthand - getCompilerOptions: () => ({}), - getEmitResolver: notImplemented, - getEmitHost: notImplemented, - getEmitHelperFactory: notImplemented, - startLexicalEnvironment: noop, - resumeLexicalEnvironment: noop, - suspendLexicalEnvironment: noop, - endLexicalEnvironment: returnUndefined, - hoistVariableDeclaration: noop, - hoistFunctionDeclaration: noop, - requestEmitHelper: noop, - readEmitHelpers: notImplemented, - enableSubstitution: noop, - enableEmitNotification: noop, - isSubstitutionEnabled: notImplemented, - isEmitNotificationEnabled: notImplemented, - onSubstituteNode: noEmitSubstitution, - onEmitNode: noEmitNotification, - addDiagnostic: noop, -}; -export function notImplemented(): never { - throw new Error("Not implemented"); -} -export function returnUndefined(): undefined { - return undefined; -} -export function noop(_?: unknown): void { } -/** @internal */ -export function noEmitSubstitution(_hint: EmitHint, node: Node) { - return node; -} - -/** @internal */ -export function noEmitNotification(hint: EmitHint, node: Node, callback: (hint: EmitHint, node: Node) => void) { - callback(hint, node); + /** @internal */ getEmitResolver(): IsolatedEmitResolver; + /** @internal */ getEmitHost(): IsolatedEmitHost; } -export interface EmitHost extends ModuleSpecifierResolutionHost, ResolveModuleNameResolutionHost { +export interface IsolatedEmitHost extends ModuleSpecifierResolutionHost, ResolveModuleNameResolutionHost { getCommonSourceDirectory(): string getCompilerOptions(): CompilerOptions getSourceFiles(): SourceFile[] @@ -68,48 +24,19 @@ export interface EmitHost extends ModuleSpecifierResolutionHost, ResolveModuleNa /** @internal */ getLibFileFromReference(ref: FileReference): SourceFile | undefined; } -export interface EmitResolver { +export interface IsolatedEmitResolver { isSyntheticTypeEquivalent(actualTypeNode: Node, typeNode: TypeNode, message: DiagnosticMessage): Diagnostic[] | true; - hasGlobalName(name: string): boolean; - getReferencedExportContainer(node: Identifier, prefixLocals?: boolean): SourceFile | ModuleDeclaration | EnumDeclaration | undefined; - getReferencedImportDeclaration(node: Identifier): Declaration | undefined; - getReferencedDeclarationWithCollidingName(node: Identifier): Declaration | undefined; - isDeclarationWithCollidingName(node: Declaration): boolean; - isValueAliasDeclaration(node: Node): boolean; - 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; - // 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][] | undefined; - getTypeReferenceDirectivesForSymbol(symbol: Symbol, meaning?: SymbolFlags): [specifier: string, mode: ResolutionMode | undefined][] | 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; } /** @internal */ @@ -117,19 +44,6 @@ export interface AmbientModuleDeclaration extends ModuleDeclaration { readonly body?: ModuleBlock; } -export interface EmitHelperFactory { - -} - -export type GetSymbolAccessibilityDiagnostic = (symbolAccessibilityResult: SymbolAccessibilityResult) => (SymbolAccessibilityDiagnostic | undefined); - -/** @internal */ -export interface SymbolAccessibilityDiagnostic { - errorNode: Node; - diagnosticMessage: DiagnosticMessage; - typeName?: DeclarationName | QualifiedName; -} - export interface SymbolTracker { // Called when the symbol writer encounters a symbol to write. Currently only used by the // declaration emitter to help determine if it should patch up the final declaration file @@ -141,7 +55,7 @@ export interface SymbolTracker { reportCyclicStructureError?(): void; reportLikelyUnsafeImportRequiredError?(specifier: string): void; reportTruncationError?(): void; - moduleResolverHost?: ModuleSpecifierResolutionHost & { getCommonSourceDirectory(): string }; + moduleResolverHost?: ModuleSpecifierResolutionHost; trackReferencedAmbientModule?(decl: ModuleDeclaration, symbol: Symbol): void; trackExternalModuleSymbolOfImportTypeNode?(symbol: Symbol): void; reportNonlocalAugmentation?(containingFile: SourceFile, parentSymbol: Symbol, augmentingSymbol: Symbol): void; @@ -150,78 +64,10 @@ export interface SymbolTracker { } /** @internal */ -export interface ModuleSpecifierResolutionHost { - useCaseSensitiveFileNames?(): boolean; - fileExists(path: string): boolean; - getCurrentDirectory(): string; - directoryExists?(path: string): boolean; - readFile?(path: string): string | undefined; - realpath?(path: string): string; - getPackageJsonInfoCache?(): PackageJsonInfoCache & { - /** @internal */ getPackageJsonInfo(packageJsonPath: string): PackageJsonInfo | boolean | undefined; - } | undefined; - getGlobalTypingsCacheLocation?(): string | undefined; - getNearestAncestorDirectoryWithPackageJson?(fileName: string, rootDir?: string): string | undefined; - - getProjectReferenceRedirect(fileName: string): string | undefined; - isSourceOfProjectReferenceRedirect(fileName: string): boolean; +interface ModuleSpecifierResolutionHost { - getSymlinkCache?(): { - getSymlinkedDirectoriesByRealpath(): MultiMap | undefined; - }; - readonly redirectTargetsMap: RedirectTargetsMap; } -export interface PackageJsonInfo { - packageDirectory: string; - contents: PackageJsonInfoContents; -} -/** @internal */ -export interface PackageJsonInfoContents { - packageJsonContent: PackageJsonPathFields; - versionPaths: VersionPaths | undefined; - /** false: resolved to nothing. undefined: not yet resolved */ - resolvedEntrypoints: string[] | false | undefined; -} -/** @internal */ -export interface VersionPaths { - version: string; - paths: MapLike; -} -export interface PackageJsonPathFields { - typings?: string; - types?: string; - typesVersions?: MapLike>; - main?: string; - tsconfig?: string; - type?: string; - imports?: object; - exports?: object; - name?: string; -} - - -export type RedirectTargetsMap = ReadonlyMap; - -export interface MultiMap extends Map { - /** - * Adds the value to an array of values associated with the key, and returns the array. - * Creates the array if it does not already exist. - */ - add(key: K, value: V): V[]; - /** - * Removes a value from an array of values associated with the key. - * Does not preserve the order of those values. - * Does nothing if `key` is not in `map`, or `value` is not in `map[key]`. - */ - remove(key: K, value: V): void; -} - - -/** @internal */ -export interface SymbolAccessibilityResult extends SymbolVisibilityResult { - errorModuleName?: string; // If the symbol is not visible from module, module's name -} /** @internal */ export interface SymbolVisibilityResult { accessibility: SymbolAccessibility; @@ -250,12 +96,6 @@ export type LateVisibilityPaintedStatement = | EnumDeclaration; -/** @internal */ -export type NodeId = number; - -export type ResolutionMode = ModuleKind.ESNext | ModuleKind.CommonJS | undefined; - - /** @internal */ export type GetCanonicalFileName = (fileName: string) => string; @@ -399,10 +239,6 @@ export const enum CharacterCodes { } -/** @internal */ -export type LiteralImportTypeNode = ImportTypeNode & { readonly argument: LiteralTypeNode & { readonly literal: StringLiteral } }; - - /** @internal */ export interface DynamicNamedDeclaration extends NamedDeclaration { readonly name: ComputedPropertyName; @@ -421,10 +257,6 @@ export interface JSDocTypeAssertion extends ParenthesizedExpression { export type OuterExpression = ParenthesizedExpression | TypeAssertion | SatisfiesExpression | AsExpression | NonNullExpression | PartiallyEmittedExpression; -/** @internal */ -export type AnyImportOrReExport = AnyImportSyntax | ExportDeclaration; - - /** @internal */ // A declaration that supports late-binding (used in checker) export interface LateBoundDeclaration extends DynamicNamedDeclaration { @@ -433,35 +265,16 @@ export interface LateBoundDeclaration extends DynamicNamedDeclaration { /** @internal */ // A name that supports late-binding (used in checker) -export interface LateBoundName extends ComputedPropertyName { +interface LateBoundName extends ComputedPropertyName { readonly expression: EntityNameExpression; } -/** @internal */ -export interface EmitFileNames { - jsFilePath?: string | undefined; - sourceMapFilePath?: string | undefined; - declarationFilePath?: string | undefined; - declarationMapPath?: string | undefined; - buildInfoPath?: string | undefined; -} - -export type _FileReference = FileReference - - -/** @internal */ -export type ExportedModulesFromDeclarationEmit = readonly Symbol[]; -export type _StringLiteralLike = StringLiteralLike - - export type _Symbol = Symbol -export type _Path = Path -export type _ModifierFlags = ModifierFlags +type _ModifierFlags = ModifierFlags declare module 'typescript' { interface Node { symbol: _Symbol; - emitNode?: EmitNode; original: this; modifierFlagsCache: _ModifierFlags } @@ -469,76 +282,6 @@ declare module 'typescript' { isReferenced: boolean; parent: _Symbol; } - interface Bundle { - /** @internal */ syntheticFileReferences?: readonly _FileReference[]; - /** @internal */ syntheticTypeReferences?: readonly _FileReference[]; - /** @internal */ syntheticLibReferences?: readonly _FileReference[]; - /** @internal */ hasNoDefaultLib?: boolean; - } - interface SourceFile { - exportedModulesFromDeclarationEmit?: ExportedModulesFromDeclarationEmit; - imports: readonly _StringLiteralLike[]; - path: _Path; - } - interface CompilerOptions { - /** - * The directory of the config file that specified 'paths'. Used to resolve relative paths when 'baseUrl' is absent. - * - * @internal - */ - pathsBasePath?: string; - configFilePath?: _Path; - } - function isStringANonContextualKeyword(name: string): boolean; -} - - -/** @internal */ -export interface EmitNode { - annotatedNodes?: Node[]; // Tracks Parse-tree nodes with EmitNodes for eventual cleanup. - flags: EmitFlags; // Flags that customize emit - leadingComments?: SynthesizedComment[]; // Synthesized leading comments - trailingComments?: SynthesizedComment[]; // Synthesized trailing comments - commentRange?: TextRange; // The text range to use when emitting leading or trailing comments - sourceMapRange?: SourceMapRange; // The text range to use when emitting leading or trailing source mappings - tokenSourceMapRanges?: (SourceMapRange | undefined)[]; // The text range to use when emitting source mappings for tokens - constantValue?: string | number; // The constant value of an expression - externalHelpersModuleName?: Identifier; // The local name for an imported helpers module - externalHelpers?: boolean; - helpers?: EmitHelper[]; // Emit helpers for the node - startsOnNewLine?: boolean; // If the node should begin on a new line - snippetElement?: SnippetElement; // Snippet element of the node - typeNode?: TypeNode; // VariableDeclaration type -} - -/** @internal */ -export type SnippetElement = TabStop | Placeholder; - -/** @internal */ -export interface TabStop { - kind: SnippetKind.TabStop; - order: number; -} - -/** @internal */ -export interface Placeholder { - kind: SnippetKind.Placeholder; - order: number; -} -// Reference: https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax -/** @internal */ -export const enum SnippetKind { - TabStop, // `$1`, `$2` - Placeholder, // `${1:foo}` - Choice, // `${1|one,two,three|}` - Variable, // `$name`, `${name:default}` + } - - -/** @internal */ -export interface ModulePath { - path: string; - isInNodeModules: boolean; - isRedirect: boolean; -} \ No newline at end of file diff --git a/external-declarations/src/compiler/utils.ts b/external-declarations/src/compiler/utils.ts index 9465f770c8915..f604494cd8872 100644 --- a/external-declarations/src/compiler/utils.ts +++ b/external-declarations/src/compiler/utils.ts @@ -1,334 +1,8 @@ -import { SourceFile, SyntaxKind, Node, TextSpan, DiagnosticWithLocation, DeclarationName, isPropertySignature, isBindingElement, isCallSignatureDeclaration, isConstructorDeclaration, isConstructSignatureDeclaration, isExpressionWithTypeArguments, isFunctionDeclaration, isGetAccessor, isImportEqualsDeclaration, isIndexSignatureDeclaration, isMethodDeclaration, isMethodSignature, isParameter, isPropertyAccessExpression, isPropertyDeclaration, isSetAccessor, isTypeAliasDeclaration, isTypeParameterDeclaration, isVariableDeclaration, QualifiedName, BindingElement, CallSignatureDeclaration, ConstructorDeclaration, ConstructSignatureDeclaration, ExpressionWithTypeArguments, FunctionDeclaration, GetAccessorDeclaration, ImportEqualsDeclaration, IndexSignatureDeclaration, JSDocCallbackTag, JSDocEnumTag, JSDocTypedefTag, MethodDeclaration, MethodSignature, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertySignature, SetAccessorDeclaration, TypeAliasDeclaration, TypeParameterDeclaration, VariableDeclaration, NamedDeclaration, NodeFlags, ClassLikeDeclaration, FunctionBody, ModifierFlags, getModifiers, ClassDeclaration, EnumDeclaration, InterfaceDeclaration, ModuleDeclaration, VariableStatement, ImportDeclaration, Visitor, AccessorDeclaration, SignatureDeclaration, Identifier, JSDocSignature, isJSDocSignature, getLeadingCommentRanges, Diagnostic, DiagnosticRelatedInformation, JsonSourceFile, ScriptKind, NodeFactory, Path, isModuleDeclaration, isSourceFile, Declaration, getNameOfDeclaration, isElementAccessExpression, BindingPattern, ImportTypeNode, isLiteralTypeNode, isStringLiteral, OuterExpressionKinds, Expression, isStringLiteralLike, isNumericLiteral, NumericLiteral, StringLiteralLike, getJSDocTypeTag, isParenthesizedExpression, EmitFlags, Statement, isExportAssignment, isExportDeclaration, JSDocContainer, HasJSDoc, JSDoc, Bundle, CompilerOptions, Extension, getTsBuildInfoEmitOutputFilePath, ImportCall, ExternalModuleReference, AssertClause, ModuleKind, EntityNameExpression, isIdentifier, PropertyAccessEntityNameExpression, ExportDeclaration, getJSDocAugmentsTag, HeritageClause, NodeArray, isClassElement, isClassStaticBlockDeclaration, isParseTreeNode, ModuleResolutionKind, JsxEmit, isPrefixUnaryExpression, PrefixUnaryExpression, canHaveModifiers, ModifierLike, getJSDocPublicTag, getJSDocPrivateTag, getJSDocProtectedTag, getJSDocOverrideTagNoCache, getJSDocReadonlyTag, getJSDocDeprecatedTag, ScriptTarget, FileExtensionInfo, EntityNameOrEntityNameExpression, isHeritageClause, CallExpression, FunctionLikeDeclaration, HasType, JSDocTemplateTag, TypeAssertion, TsConfigSourceFile, PrinterOptions, NewLineKind, sys, isVariableStatement, isLineBreak, isWhiteSpaceLike, identifierToKeywordKind, isIdentifierStart, isIdentifierPart, LanguageVariant, ElementAccessExpression, BinaryExpression } from "typescript"; +import { SourceFile, SyntaxKind, Node, DeclarationName, isExpressionWithTypeArguments, isParameter, QualifiedName, ExpressionWithTypeArguments, FunctionDeclaration, ImportEqualsDeclaration, PropertyAccessExpression, TypeAliasDeclaration, TypeParameterDeclaration, NamedDeclaration, NodeFlags, ClassLikeDeclaration, ModifierFlags, ClassDeclaration, EnumDeclaration, InterfaceDeclaration, ModuleDeclaration, VariableStatement, ImportDeclaration, SignatureDeclaration, Identifier, isModuleDeclaration, isSourceFile, Declaration, getNameOfDeclaration, isElementAccessExpression, BindingPattern, ImportTypeNode, OuterExpressionKinds, Expression, isStringLiteralLike, isNumericLiteral, NumericLiteral, StringLiteralLike, getJSDocTypeTag, isParenthesizedExpression, CompilerOptions, Extension, ModuleKind, isIdentifier, ModuleResolutionKind, JsxEmit, isPrefixUnaryExpression, PrefixUnaryExpression, canHaveModifiers, ModifierLike, getJSDocPublicTag, getJSDocPrivateTag, getJSDocProtectedTag, getJSDocOverrideTagNoCache, getJSDocReadonlyTag, getJSDocDeprecatedTag, ScriptTarget, EntityNameOrEntityNameExpression, isHeritageClause, CallExpression, FunctionLikeDeclaration, HasType, JSDocTemplateTag, TypeAssertion, TsConfigSourceFile, PrinterOptions, NewLineKind, sys, isVariableStatement } from "typescript"; import { Debug } from "./debug"; -import { Diagnostics } from "./diagnosticInformationMap.generated"; -import { clone, Comparison, contains, emptyArray, find, flatten, identity, isArray, length, mapDefined, Mutable, some, startsWith, stringContains } from "./lang-utils"; -import { combinePaths, comparePaths, ensureTrailingDirectorySeparator, fileExtensionIs, fileExtensionIsOneOf, getNormalizedAbsolutePath, pathIsRelative, removeFileExtension } from "./path-utils"; -import { AmbientModuleDeclaration, AnyImportOrReExport, CharacterCodes, DynamicNamedBinaryExpression, DynamicNamedDeclaration, EmitFileNames, EmitHost, EmitNode, EmitResolver, GetCanonicalFileName, GetSymbolAccessibilityDiagnostic, JSDocTypeAssertion, LiteralImportTypeNode, ModuleSpecifierResolutionHost, OuterExpression, ResolveModuleNameResolutionHost, SymbolAccessibility, SymbolAccessibilityDiagnostic, SymbolAccessibilityResult } from "./types"; - - -export function getErrorSpanForNode(sourceFile: SourceFile, node: Node): TextSpan { - return { - start: node.pos, - length: node.end - node.pos - } -} - -export function createDiagnosticForNode(node: Node, message: DiagnosticMessage, arg0?: string | number, arg1?: string | number, arg2?: string | number, arg3?: string | number): DiagnosticWithLocation { - const sourceFile = getSourceFileOfNode(node); - return createDiagnosticForNodeInSourceFile(sourceFile, node, message, arg0, arg1, arg2, arg3); -} - -/** @internal */ -export function createDiagnosticForNodeInSourceFile(sourceFile: SourceFile, node: Node, message: DiagnosticMessage, arg0?: string | number, arg1?: string | number, arg2?: string | number, arg3?: string | number): DiagnosticWithLocation { - const span = getErrorSpanForNode(sourceFile, node); - return createFileDiagnostic(sourceFile, span.start, span.length, message, arg0, arg1, arg2, arg3); -} - -/** @internal */ -export function addRelatedInfo(diagnostic: T, ...relatedInformation: DiagnosticRelatedInformation[]): T { - if (!relatedInformation.length) { - return diagnostic; - } - if (!diagnostic.relatedInformation) { - diagnostic.relatedInformation = []; - } - Debug.assert(diagnostic.relatedInformation !== emptyArray, "Diagnostic had empty array singleton for related info, but is still being constructed!"); - diagnostic.relatedInformation.push(...relatedInformation); - return diagnostic; -} - -export interface DiagnosticMessage { - key: string; - category: DiagnosticCategory; - code: number; - message: string; - reportsUnnecessary?: {}; - reportsDeprecated?: {}; - /** @internal */ - elidedInCompatabilityPyramid?: boolean; -} - -export enum DiagnosticCategory { - Warning, - Error, - Suggestion, - Message -} - - -/** @internal */ -export function hasStaticModifier(node: Node): boolean { - return hasSyntacticModifier(node, ModifierFlags.Static); -} - -/** @internal */ -export function isStatic(node: Node) { - // https://tc39.es/ecma262/#sec-static-semantics-isstatic - return isClassElement(node) && hasStaticModifier(node) || isClassStaticBlockDeclaration(node); -} - -/** @internal */ -export function createGetSymbolAccessibilityDiagnosticForNodeName(node: DeclarationDiagnosticProducing) { - if (isSetAccessor(node) || isGetAccessor(node)) { - return getAccessorNameVisibilityError; - } - else if (isMethodSignature(node) || isMethodDeclaration(node)) { - return getMethodNameVisibilityError; - } - else { - return createGetSymbolAccessibilityDiagnosticForNode(node); - } - function getAccessorNameVisibilityError(symbolAccessibilityResult: SymbolAccessibilityResult) { - const diagnosticMessage = getAccessorNameVisibilityDiagnosticMessage(symbolAccessibilityResult); - return diagnosticMessage !== undefined ? { - diagnosticMessage, - errorNode: node, - typeName: (node as NamedDeclaration).name - } : undefined; - } - - function getAccessorNameVisibilityDiagnosticMessage(symbolAccessibilityResult: SymbolAccessibilityResult) { - if (isStatic(node)) { - return symbolAccessibilityResult.errorModuleName ? - symbolAccessibilityResult.accessibility === SymbolAccessibility.CannotBeNamed ? - Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : - Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : - Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } - else if (node.parent.kind === SyntaxKind.ClassDeclaration) { - return symbolAccessibilityResult.errorModuleName ? - symbolAccessibilityResult.accessibility === SymbolAccessibility.CannotBeNamed ? - Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : - Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : - Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; - } - else { - return symbolAccessibilityResult.errorModuleName ? - Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : - Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; - } - } - - function getMethodNameVisibilityError(symbolAccessibilityResult: SymbolAccessibilityResult): SymbolAccessibilityDiagnostic | undefined { - const diagnosticMessage = getMethodNameVisibilityDiagnosticMessage(symbolAccessibilityResult); - return diagnosticMessage !== undefined ? { - diagnosticMessage, - errorNode: node, - typeName: (node as NamedDeclaration).name - } : undefined; - } - - function getMethodNameVisibilityDiagnosticMessage(symbolAccessibilityResult: SymbolAccessibilityResult) { - if (isStatic(node)) { - return symbolAccessibilityResult.errorModuleName ? - symbolAccessibilityResult.accessibility === SymbolAccessibility.CannotBeNamed ? - Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : - Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : - Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1; - } - else if (node.parent.kind === SyntaxKind.ClassDeclaration) { - return symbolAccessibilityResult.errorModuleName ? - symbolAccessibilityResult.accessibility === SymbolAccessibility.CannotBeNamed ? - Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : - Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : - Diagnostics.Public_method_0_of_exported_class_has_or_is_using_private_name_1; - } - else { - return symbolAccessibilityResult.errorModuleName ? - Diagnostics.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : - Diagnostics.Method_0_of_exported_interface_has_or_is_using_private_name_1; - } - } -} - -/** @internal */ -export function getSourceFileOfNode(node: Node): SourceFile; -/** @internal */ -export function getSourceFileOfNode(node: Node | undefined): SourceFile | undefined; -/** @internal */ -export function getSourceFileOfNode(node: Node | undefined ): SourceFile | undefined { - while (node && node.kind !== SyntaxKind.SourceFile) { - node = node.parent; - } - return node as SourceFile; -} - - -/** @internal */ -export function createFileDiagnostic(file: SourceFile, start: number, length: number, message: DiagnosticMessage, ...args: (string | number | undefined)[]): DiagnosticWithLocation; -/** @internal */ -export function createFileDiagnostic(file: SourceFile, start: number, length: number, message: DiagnosticMessage): DiagnosticWithLocation { - - let text= message.message; - if (arguments.length > 4) { - text = formatStringFromArgs(text, arguments, 4); - } - - return { - file, - start, - length, - - messageText: text, - category: message.category, - code: message.code, - reportsUnnecessary: message.reportsUnnecessary, - reportsDeprecated: message.reportsDeprecated - }; -} - - -/** @internal */ -export function formatStringFromArgs(text: string, args: ArrayLike, baseIndex = 0): string { - return text.replace(/{(\d+)}/g, (_match, index: string) => "" + args[+index + baseIndex]); -} -export function declarationNameToString(name: DeclarationName | QualifiedName | undefined) { - return !name || getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name); -} - - -/** @internal */ -export function getTextOfNode(node: Node, includeTrivia = false): string { - return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node, includeTrivia); -} - -/** @internal */ -export function getSourceTextOfNodeFromSourceFile(sourceFile: SourceFile, node: Node, includeTrivia = false): string { - return getTextOfNodeFromSourceText(sourceFile.text, node, includeTrivia); -} - - -/** @internal */ -export function getTextOfNodeFromSourceText(sourceText: string, node: Node, includeTrivia = false): string { - let text = sourceText.substring(node.pos, node.end); - return text; -} -/** @internal */ -export function getFullWidth(node: Node) { - return node.end - node.pos; -} - -/** @internal */ -export function canProduceDiagnostics(node: Node): node is DeclarationDiagnosticProducing { - return isVariableDeclaration(node) || - isPropertyDeclaration(node) || - isPropertySignature(node) || - isBindingElement(node) || - isSetAccessor(node) || - isGetAccessor(node) || - isConstructSignatureDeclaration(node) || - isCallSignatureDeclaration(node) || - isMethodDeclaration(node) || - isMethodSignature(node) || - isFunctionDeclaration(node) || - isParameter(node) || - isTypeParameterDeclaration(node) || - isExpressionWithTypeArguments(node) || - isImportEqualsDeclaration(node) || - isTypeAliasDeclaration(node) || - isConstructorDeclaration(node) || - isIndexSignatureDeclaration(node) || - isPropertyAccessExpression(node) || - isJSDocTypeAlias(node); -} - - - -export function isJSDocTypeAlias(node: Node): node is JSDocTypedefTag | JSDocCallbackTag | JSDocEnumTag { - return node.kind === SyntaxKind.JSDocTypedefTag || node.kind === SyntaxKind.JSDocCallbackTag || node.kind === SyntaxKind.JSDocEnumTag; -} - -export type DeclarationDiagnosticProducing = - | VariableDeclaration - | PropertyDeclaration - | PropertySignature - | BindingElement - | SetAccessorDeclaration - | GetAccessorDeclaration - | ConstructSignatureDeclaration - | CallSignatureDeclaration - | MethodDeclaration - | MethodSignature - | FunctionDeclaration - | ParameterDeclaration - | TypeParameterDeclaration - | ExpressionWithTypeArguments - | ImportEqualsDeclaration - | TypeAliasDeclaration - | ConstructorDeclaration - | IndexSignatureDeclaration - | PropertyAccessExpression - | ElementAccessExpression - | BinaryExpression - | JSDocTypedefTag - | JSDocCallbackTag - | JSDocEnumTag; - - - -/** @internal */ -export function isDeclaration(node: Node): node is NamedDeclaration { - if (node.kind === SyntaxKind.TypeParameter) { - return (node.parent && node.parent.kind !== SyntaxKind.JSDocTemplateTag) || isInJSFile(node); - } - - return isDeclarationKind(node.kind); -} - -function isDeclarationKind(kind: SyntaxKind) { - return kind === SyntaxKind.ArrowFunction - || kind === SyntaxKind.BindingElement - || kind === SyntaxKind.ClassDeclaration - || kind === SyntaxKind.ClassExpression - || kind === SyntaxKind.ClassStaticBlockDeclaration - || kind === SyntaxKind.Constructor - || kind === SyntaxKind.EnumDeclaration - || kind === SyntaxKind.EnumMember - || kind === SyntaxKind.ExportSpecifier - || kind === SyntaxKind.FunctionDeclaration - || kind === SyntaxKind.FunctionExpression - || kind === SyntaxKind.GetAccessor - || kind === SyntaxKind.ImportClause - || kind === SyntaxKind.ImportEqualsDeclaration - || kind === SyntaxKind.ImportSpecifier - || kind === SyntaxKind.InterfaceDeclaration - || kind === SyntaxKind.JsxAttribute - || kind === SyntaxKind.MethodDeclaration - || kind === SyntaxKind.MethodSignature - || kind === SyntaxKind.ModuleDeclaration - || kind === SyntaxKind.NamespaceExportDeclaration - || kind === SyntaxKind.NamespaceImport - || kind === SyntaxKind.NamespaceExport - || kind === SyntaxKind.Parameter - || kind === SyntaxKind.PropertyAssignment - || kind === SyntaxKind.PropertyDeclaration - || kind === SyntaxKind.PropertySignature - || kind === SyntaxKind.SetAccessor - || kind === SyntaxKind.ShorthandPropertyAssignment - || kind === SyntaxKind.TypeAliasDeclaration - || kind === SyntaxKind.TypeParameter - || kind === SyntaxKind.VariableDeclaration - || kind === SyntaxKind.JSDocTypedefTag - || kind === SyntaxKind.JSDocCallbackTag - || kind === SyntaxKind.JSDocPropertyTag; -} - - -/** - * Bypasses immutability and directly sets the `parent` property of a `Node`. - * - * @internal - */ - export function setParent(child: T, parent: T["parent"] | undefined): T; - /** @internal */ - export function setParent(child: T | undefined, parent: T["parent"] | undefined): T | undefined; - /** @internal */ - export function setParent(child: T | undefined, parent: T["parent"] | undefined): T | undefined { - if (child && parent) { - (child as Mutable).parent = parent; - } - return child; - } +import { clone, contains, flatten, some } from "./lang-utils"; +import { fileExtensionIs, fileExtensionIsOneOf } from "./path-utils"; +import { AmbientModuleDeclaration, DynamicNamedBinaryExpression, DynamicNamedDeclaration, JSDocTypeAssertion, OuterExpression } from "./types"; /** @internal */ export function isInJSFile(node: Node | undefined): boolean { @@ -336,11 +10,6 @@ export function isInJSFile(node: Node | undefined): boolean { } -/** @internal */ -export function getFirstConstructorWithBody(node: ClassLikeDeclaration): ConstructorDeclaration & { body: FunctionBody } | undefined { - return find(node.members, (member): member is ConstructorDeclaration & { body: FunctionBody } => isConstructorDeclaration(member) && nodeIsPresent(member.body)); -} - // Returns true if this node is missing from the actual source code. A 'missing' node is different // from 'undefined/defined'. When a node is undefined (which can happen for optional nodes // in the tree), it is definitely missing. However, a node may be defined, but still be @@ -354,7 +23,7 @@ export function getFirstConstructorWithBody(node: ClassLikeDeclaration): Constru // However, this node will be 'missing' in the sense that no actual source-code/tokens are // contained within it. /** @internal */ -export function nodeIsMissing(node: Node | undefined): boolean { +function nodeIsMissing(node: Node | undefined): boolean { if (node === undefined) { return true; } @@ -375,7 +44,7 @@ export function hasSyntacticModifier(node: Node, flags: ModifierFlags): boolean } /** @internal */ -export function getSelectedSyntacticModifierFlags(node: Node, flags: ModifierFlags): ModifierFlags { +function getSelectedSyntacticModifierFlags(node: Node, flags: ModifierFlags): ModifierFlags { return getSyntacticModifierFlags(node) & flags; } @@ -386,15 +55,10 @@ export function getSelectedSyntacticModifierFlags(node: Node, flags: ModifierFla * * @internal */ -export function getEffectiveModifierFlags(node: Node): ModifierFlags { +function getEffectiveModifierFlags(node: Node): ModifierFlags { return getModifierFlagsWorker(node, /*includeJSDoc*/ true); } -/** @internal */ -export function getEffectiveModifierFlagsAlwaysIncludeJSDoc(node: Node): ModifierFlags { - return getModifierFlagsWorker(node, /*includeJSDOc*/ true, /*alwaysIncludeJSDOc*/ true); -} - /** * Gets the ModifierFlags for syntactic modifiers on the provided node. The modifiers will be cached on the node to improve performance. * @@ -402,7 +66,7 @@ export function getEffectiveModifierFlagsAlwaysIncludeJSDoc(node: Node): Modifie * * @internal */ - export function getSyntacticModifierFlags(node: Node): ModifierFlags { +function getSyntacticModifierFlags(node: Node): ModifierFlags { return getModifierFlagsWorker(node, /*includeJSDoc*/ false); } @@ -447,7 +111,7 @@ function getJSDocModifierFlagsNoCache(node: Node): ModifierFlags { * * @internal */ - export function getSyntacticModifierFlagsNoCache(node: Node): ModifierFlags { +function getSyntacticModifierFlagsNoCache(node: Node): ModifierFlags { let flags = canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : ModifierFlags.None; if (node.flags & NodeFlags.NestedNamespace || (node.kind === SyntaxKind.Identifier && (node as Identifier).isInJSDocNamespace)) { flags |= ModifierFlags.Export; @@ -456,7 +120,7 @@ function getJSDocModifierFlagsNoCache(node: Node): ModifierFlags { } /** @internal */ -export function modifiersToFlags(modifiers: readonly ModifierLike[] | undefined) { +function modifiersToFlags(modifiers: readonly ModifierLike[] | undefined) { let flags = ModifierFlags.None; if (modifiers) { for (const modifier of modifiers) { @@ -467,7 +131,7 @@ export function modifiersToFlags(modifiers: readonly ModifierLike[] | undefined) } /** @internal */ -export function modifierToFlag(token: SyntaxKind): ModifierFlags { +function modifierToFlag(token: SyntaxKind): ModifierFlags { switch (token) { case SyntaxKind.StaticKeyword: return ModifierFlags.Static; case SyntaxKind.PublicKeyword: return ModifierFlags.Public; @@ -493,7 +157,7 @@ export function modifierToFlag(token: SyntaxKind): ModifierFlags { export type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration; /** @internal */ -export type LateVisibilityPaintedStatement = +type LateVisibilityPaintedStatement = | AnyImportSyntax | VariableStatement | ClassDeclaration @@ -503,96 +167,6 @@ export type LateVisibilityPaintedStatement = | InterfaceDeclaration | EnumDeclaration; - -/** @internal */ -export function visitArray(nodes: T[] | undefined, visitor: Visitor, test: (node: Node) => node is U, start?: number, count?: number): U[] | undefined; -/** @internal */ -export function visitArray(nodes: readonly T[] | undefined, visitor: Visitor, test: (node: Node) => node is U, start?: number, count?: number): readonly U[] | undefined; -/** @internal */ -export function visitArray(nodes: T[] | undefined, visitor: Visitor, test: (node: Node) => node is T, start?: number, count?: number): T[] | undefined; -/** @internal */ -export function visitArray(nodes: readonly T[] | undefined, visitor: Visitor, test: (node: Node) => node is T, start?: number, count?: number): readonly T[] | undefined; -export function visitArray(nodes: readonly T[] | undefined, visitor: Visitor, test: (node: Node) => node is U, start?: number, count?: number) { - if (nodes === undefined) { - return nodes; - } - - // Ensure start and count have valid values - const length = nodes.length; - if (start === undefined || start < 0) { - start = 0; - } - - if (count === undefined || count > length - start) { - count = length - start; - } - - return visitArrayWorker(nodes, visitor, test, start, count) as readonly U[]; -} - - - -/** @internal */ -function visitArrayWorker(nodes: readonly T[], visitor: Visitor, test: ((node: Node) => boolean) | undefined, start: number, count: number): readonly T[] | undefined { - let updated: T[] | undefined; - - const length = nodes.length; - if (start > 0 || count < length) { - // If we are not visiting all of the original nodes, we must always create a new array. - updated = []; - } - - // Visit each original node. - for (let i = 0; i < count; i++) { - const node: T = nodes[i + start]; - const visited = node !== undefined ? visitor(node) : undefined; - if (updated !== undefined || visited === undefined || visited !== node) { - if (updated === undefined) { - // Ensure we have a copy of `nodes`, up to the current index. - updated = nodes.slice(0, i); - } - if (visited) { - if (isArray(visited)) { - for (const visitedNode of visited) { - void Debug.assertNode(visitedNode, test); - updated.push(visitedNode as T); - } - } - else { - void Debug.assertNode(visited, test); - updated.push(visited as T); - } - } - } - } - - return updated ?? nodes; -} - -/** @internal */ -export interface AllAccessorDeclarations { - firstAccessor: AccessorDeclaration; - secondAccessor: AccessorDeclaration | undefined; - getAccessor: GetAccessorDeclaration | undefined; - setAccessor: SetAccessorDeclaration | undefined; -} - -/** @internal */ -export function getThisParameter(signature: SignatureDeclaration | JSDocSignature): ParameterDeclaration | undefined { - // callback tags do not currently support this parameters - if (signature.parameters.length && !isJSDocSignature(signature)) { - const thisParameter = signature.parameters[0]; - if (parameterIsThisKeyword(thisParameter)) { - return thisParameter; - } - } -} - -/** @internal */ -export function parameterIsThisKeyword(parameter: ParameterDeclaration): boolean { - return isThisIdentifier(parameter.name); -} - /** @internal */ export function isThisIdentifier(node: Node | undefined): boolean { return !!node && node.kind === SyntaxKind.Identifier && identifierIsThisKeyword(node as Identifier); @@ -600,326 +174,24 @@ export function isThisIdentifier(node: Node | undefined): boolean { /** @internal */ -export function identifierIsThisKeyword(id: Identifier): boolean { +function identifierIsThisKeyword(id: Identifier): boolean { return id.originalKeywordKind === SyntaxKind.ThisKeyword; } -/** @internal */ -export function positionIsSynthesized(pos: number): boolean { - // This is a fast way of testing the following conditions: - // pos === undefined || pos === null || isNaN(pos) || pos < 0; - return !(pos >= 0); -} - -/** @internal */ -export function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean, stopAtComments?: boolean, inJSDoc?: boolean): number { - if (positionIsSynthesized(pos)) { - return pos; - } - - let canConsumeStar = false; - // Keep in sync with couldStartTrivia - while (true) { - const ch = text.charCodeAt(pos); - switch (ch) { - case CharacterCodes.carriageReturn: - if (text.charCodeAt(pos + 1) === CharacterCodes.lineFeed) { - pos++; - } - // falls through - case CharacterCodes.lineFeed: - pos++; - if (stopAfterLineBreak) { - return pos; - } - canConsumeStar = !!inJSDoc; - continue; - case CharacterCodes.tab: - case CharacterCodes.verticalTab: - case CharacterCodes.formFeed: - case CharacterCodes.space: - pos++; - continue; - case CharacterCodes.slash: - if (stopAtComments) { - break; - } - if (text.charCodeAt(pos + 1) === CharacterCodes.slash) { - pos += 2; - while (pos < text.length) { - if (isLineBreak(text.charCodeAt(pos))) { - break; - } - pos++; - } - canConsumeStar = false; - continue; - } - if (text.charCodeAt(pos + 1) === CharacterCodes.asterisk) { - pos += 2; - while (pos < text.length) { - if (text.charCodeAt(pos) === CharacterCodes.asterisk && text.charCodeAt(pos + 1) === CharacterCodes.slash) { - pos += 2; - break; - } - pos++; - } - canConsumeStar = false; - continue; - } - break; - - case CharacterCodes.lessThan: - case CharacterCodes.bar: - case CharacterCodes.equals: - case CharacterCodes.greaterThan: - if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos); - canConsumeStar = false; - continue; - } - break; - - case CharacterCodes.hash: - if (pos === 0 && isShebangTrivia(text, pos)) { - pos = scanShebangTrivia(text, pos); - canConsumeStar = false; - continue; - } - break; - - case CharacterCodes.asterisk: - if (canConsumeStar) { - pos++; - canConsumeStar = false; - continue; - } - break; - - default: - if (ch > CharacterCodes.maxAsciiCharacter && (isWhiteSpaceLike(ch))) { - pos++; - continue; - } - break; - } - return pos; - } -} -// All conflict markers consist of the same character repeated seven times. If it is -// a <<<<<<< or >>>>>>> marker then it is also followed by a space. -const mergeConflictMarkerLength = "<<<<<<<".length; - -function isConflictMarkerTrivia(text: string, pos: number) { - Debug.assert(pos >= 0); - - // Conflict markers must be at the start of a line. - if (pos === 0 || isLineBreak(text.charCodeAt(pos - 1))) { - const ch = text.charCodeAt(pos); - - if ((pos + mergeConflictMarkerLength) < text.length) { - for (let i = 0; i < mergeConflictMarkerLength; i++) { - if (text.charCodeAt(pos + i) !== ch) { - return false; - } - } - - return ch === CharacterCodes.equals || - text.charCodeAt(pos + mergeConflictMarkerLength) === CharacterCodes.space; - } - } - - return false; -} - -function scanConflictMarkerTrivia(text: string, pos: number, error?: (diag: DiagnosticMessage, pos?: number, len?: number) => void) { - if (error) { - error(Diagnostics.Merge_conflict_marker_encountered, pos, mergeConflictMarkerLength); - } - - const ch = text.charCodeAt(pos); - const len = text.length; - - if (ch === CharacterCodes.lessThan || ch === CharacterCodes.greaterThan) { - while (pos < len && !isLineBreak(text.charCodeAt(pos))) { - pos++; - } - } - else { - Debug.assert(ch === CharacterCodes.bar || ch === CharacterCodes.equals); - // Consume everything from the start of a ||||||| or ======= marker to the start - // of the next ======= or >>>>>>> marker. - while (pos < len) { - const currentChar = text.charCodeAt(pos); - if ((currentChar === CharacterCodes.equals || currentChar === CharacterCodes.greaterThan) && currentChar !== ch && isConflictMarkerTrivia(text, pos)) { - break; - } - - pos++; - } - } - - return pos; -} - -const shebangTriviaRegex = /^#!.*/; - -/** @internal */ -export function isShebangTrivia(text: string, pos: number) { - // Shebangs check must only be done at the start of the file - Debug.assert(pos === 0); - return shebangTriviaRegex.test(text); -} - -/** @internal */ -export function scanShebangTrivia(text: string, pos: number) { - const shebang = shebangTriviaRegex.exec(text)![0]; - pos = pos + shebang.length; - return pos; -} - -/** @internal */ -const codePointAt: (s: string, i: number) => number = (String.prototype as any).codePointAt ? (s, i) => (s as any).codePointAt(i) : function codePointAt(str, i): number { - // from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt - // Account for out-of-bounds indices: - const size = str.length; - if (i < 0 || i >= size) { - return undefined!; // String.codePointAt returns `undefined` for OOB indexes - } - // Get the first code unit - const first = str.charCodeAt(i); - // check if it's the start of a surrogate pair - if (first >= 0xD800 && first <= 0xDBFF && size > i + 1) { // high surrogate and there is a next code unit - const second = str.charCodeAt(i + 1); - if (second >= 0xDC00 && second <= 0xDFFF) { // low surrogate - // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; - } - } - return first; -}; - -/** @internal */ -function charSize(ch: number) { - if (ch >= 0x10000) { - return 2; - } - return 1; -} - -export function isIdentifierText(name: string, languageVersion: ScriptTarget | undefined, identifierVariant?: LanguageVariant): boolean { - let ch = codePointAt(name, 0); - if (!isIdentifierStart(ch, languageVersion)) { - return false; - } - - for (let i = charSize(ch); i < name.length; i += charSize(ch)) { - if (!isIdentifierPart(ch = codePointAt(name, i), languageVersion, identifierVariant)) { - return false; - } - } - - return true; -} -/** @internal */ -export function getLeadingCommentRangesOfNode(node: Node, sourceFileOfNode: SourceFile) { - return node.kind !== SyntaxKind.JsxText ? getLeadingCommentRanges(sourceFileOfNode.text, node.pos) : undefined; -} - -export function isNightly() { - return false; -} - -export function createGetSymbolAccessibilityDiagnosticForNode(node: DeclarationDiagnosticProducing): GetSymbolAccessibilityDiagnostic { - return () => { - debugger; - throw new Error(); - }; -} - -/** @internal */ -export function getOriginalNodeId(node: Node) { - node = getOriginalNode(node); - return node ? getNodeId(node) : 0; -} - -export function getOriginalNode(node: Node): Node; -export function getOriginalNode(node: Node, nodeTest: (node: Node) => node is T): T; -export function getOriginalNode(node: Node | undefined): Node | undefined; -export function getOriginalNode(node: Node | undefined, nodeTest: (node: Node | undefined) => node is T): T | undefined; -export function getOriginalNode(node: Node | undefined, nodeTest?: (node: Node | undefined) => boolean): Node | undefined { - if (node) { - while ((node as any).original !== undefined) { - node = (node as any).original; - } - } - - return !nodeTest || nodeTest(node) ? node : undefined; -} - let nextNodeId = 0; /** @internal */ export function getNodeId(node: Node): number export function getNodeId(node: any): number { if (!node.id) { nextNodeId++; - node.id = nextNodeId; - } - return node.id; -} - - -/** @internal */ -export function isExternalOrCommonJsModule(file: SourceFile): boolean { - return ((file as any).externalModuleIndicator || (file as any).commonJsModuleIndicator) !== undefined; -} - - -/** @internal */ -export function isJsonSourceFile(file: SourceFile): file is JsonSourceFile { - return (file as any).scriptKind === ScriptKind.JSON; -} - - -/** @internal */ -export function isSourceFileNotJson(file: SourceFile) { - return !isJsonSourceFile(file); -} - -/** @internal */ -export function isSourceFileJS(file: SourceFile): boolean { - return isInJSFile(file); -} - -/** @internal */ -export function getResolvedExternalModuleName(host: ResolveModuleNameResolutionHost, file: SourceFile, referenceFile?: SourceFile): string { - if(!file.moduleName) { - throw new Error("Not implemented"); - } - return file.moduleName; -} - - -/** @internal */ -export function isAnyImportSyntax(node: Node): node is AnyImportSyntax { - switch (node.kind) { - case SyntaxKind.ImportDeclaration: - case SyntaxKind.ImportEqualsDeclaration: - return true; - default: - return false; + node.id = nextNodeId; } + return node.id; } /** @internal */ -export function createEmptyExports(factory: NodeFactory) { - return factory.createExportDeclaration(/*modifiers*/ undefined, /*isTypeOnly*/ false, factory.createNamedExports([]), /*moduleSpecifier*/ undefined); -} - - -/** @internal */ -export function isGlobalScopeAugmentation(module: ModuleDeclaration): boolean { +function isGlobalScopeAugmentation(module: ModuleDeclaration): boolean { return !!(module.flags & NodeFlags.GlobalAugmentation); } @@ -930,7 +202,7 @@ export function isExternalModuleAugmentation(node: Node): node is AmbientModuleD /** @internal */ -export function isModuleAugmentationExternal(node: AmbientModuleDeclaration) { +function isModuleAugmentationExternal(node: AmbientModuleDeclaration) { // external module augmentation is a ambient module declaration that is either: // - defined in the top level scope and source file is an external module // - defined inside ambient module declaration located in the top level scope and source file not an external module @@ -944,33 +216,23 @@ export function isModuleAugmentationExternal(node: AmbientModuleDeclaration) { } // See also `isExternalOrCommonJsModule` in utilities.ts -export function isExternalModule(file: SourceFile): boolean { +function isExternalModule(file: SourceFile): boolean { return (file as any).externalModuleIndicator !== undefined; } /** @internal */ -export function isAmbientModule(node: Node): node is AmbientModuleDeclaration { +function isAmbientModule(node: Node): node is AmbientModuleDeclaration { return isModuleDeclaration(node) && (node.name.kind === SyntaxKind.StringLiteral || isGlobalScopeAugmentation(node)); } -/** @internal */ -export function hasEffectiveModifiers(node: Node) { - return getEffectiveModifierFlags(node) !== ModifierFlags.None; -} - -/** @internal */ -export function hasSyntacticModifiers(node: Node) { - return getSyntacticModifierFlags(node) !== ModifierFlags.None; -} - /** @internal */ export function hasEffectiveModifier(node: Node, flags: ModifierFlags): boolean { return !!getSelectedEffectiveModifierFlags(node, flags); } /** @internal */ -export function getSelectedEffectiveModifierFlags(node: Node, flags: ModifierFlags): ModifierFlags { +function getSelectedEffectiveModifierFlags(node: Node, flags: ModifierFlags): ModifierFlags { return getEffectiveModifierFlags(node) & flags; } @@ -985,13 +247,13 @@ export function getSelectedEffectiveModifierFlags(node: Node, flags: ModifierFla * * @internal */ - export function hasDynamicName(declaration: Declaration): declaration is DynamicNamedDeclaration | DynamicNamedBinaryExpression { +export function hasDynamicName(declaration: Declaration): declaration is DynamicNamedDeclaration | DynamicNamedBinaryExpression { const name = getNameOfDeclaration(declaration); return !!name && isDynamicName(name); } /** @internal */ -export function isDynamicName(name: DeclarationName): boolean { +function isDynamicName(name: DeclarationName): boolean { if (!(name.kind === SyntaxKind.ComputedPropertyName || name.kind === SyntaxKind.ElementAccessExpression)) { return false; } @@ -1001,7 +263,7 @@ export function isDynamicName(name: DeclarationName): boolean { } /** @internal */ -export function isSignedNumericLiteral(node: Node): node is PrefixUnaryExpression & { operand: NumericLiteral } { +function isSignedNumericLiteral(node: Node): node is PrefixUnaryExpression & { operand: NumericLiteral } { return isPrefixUnaryExpression(node) && (node.operator === SyntaxKind.PlusToken || node.operator === SyntaxKind.MinusToken) && isNumericLiteral(node.operand); } @@ -1035,18 +297,6 @@ export function isBindingPattern(node: Node | undefined): node is BindingPattern return false; } - -/** @internal */ -export function isLiteralImportTypeNode(n: Node): n is LiteralImportTypeNode { - return isImportTypeNode(n) && isLiteralTypeNode(n.argument) && isStringLiteral(n.argument.literal); -} - - -export function isImportTypeNode(node: Node): node is ImportTypeNode { - return node.kind === SyntaxKind.ImportType; -} - - /** @internal */ export function skipParentheses(node: Expression, excludeJSDocTypeAssertions?: boolean): Expression; /** @internal */ @@ -1059,35 +309,24 @@ export function skipParentheses(node: Node, excludeJSDocTypeAssertions?: boolean return skipOuterExpressions(node, flags); } - -/** @internal */ -export function skipOuterExpressions(node: Expression, kinds?: OuterExpressionKinds): Expression; -/** @internal */ -export function skipOuterExpressions(node: Node, kinds?: OuterExpressionKinds): Node; -/** @internal */ -export function skipOuterExpressions(node: Node, kinds = OuterExpressionKinds.All) { +function skipOuterExpressions(node: Expression, kinds?: OuterExpressionKinds): Expression; +function skipOuterExpressions(node: Node, kinds?: OuterExpressionKinds): Node; +function skipOuterExpressions(node: Node, kinds = OuterExpressionKinds.All) { while (isOuterExpression(node, kinds)) { node = node.expression; } return node; } -/** @internal */ -export function isLiteralComputedPropertyDeclarationName(node: Node) { - return isStringOrNumericLiteralLike(node) && - node.parent.kind === SyntaxKind.ComputedPropertyName && - isDeclaration(node.parent.parent); -} - /** @internal */ -export function isStringOrNumericLiteralLike(node: Node): node is StringLiteralLike | NumericLiteral { +function isStringOrNumericLiteralLike(node: Node): node is StringLiteralLike | NumericLiteral { return isStringLiteralLike(node) || isNumericLiteral(node); } /** @internal */ -export function isOuterExpression(node: Node, kinds = OuterExpressionKinds.All): node is OuterExpression { +function isOuterExpression(node: Node, kinds = OuterExpressionKinds.All): node is OuterExpression { switch (node.kind) { case SyntaxKind.ParenthesizedExpression: if (kinds & OuterExpressionKinds.ExcludeJSDocTypeAssertion && isJSDocTypeAssertion(node)) { @@ -1107,150 +346,13 @@ export function isOuterExpression(node: Node, kinds = OuterExpressionKinds.All): } /** @internal */ -export function isJSDocTypeAssertion(node: Node): node is JSDocTypeAssertion { +function isJSDocTypeAssertion(node: Node): node is JSDocTypeAssertion { return isParenthesizedExpression(node) && isInJSFile(node) && !!getJSDocTypeTag(node); } -/** - * Sets `EmitFlags.NoComments` on a node and removes any leading and trailing synthetic comments. - * @internal - */ - export function removeAllComments(node: T): T { - const emitNode = getOrCreateEmitNode(node); - emitNode.flags |= EmitFlags.NoComments; - emitNode.leadingComments = undefined; - emitNode.trailingComments = undefined; - return node; -} - - -/** - * Associates a node with the current transformation, initializing - * various transient transformation properties. - * @internal - */ - export function getOrCreateEmitNode(node: Node): EmitNode { - if (!node.emitNode) { - if (isParseTreeNode(node)) { - // To avoid holding onto transformation artifacts, we keep track of any - // parse tree node we are annotating. This allows us to clean them up after - // all transformations have completed. - if (node.kind === SyntaxKind.SourceFile) { - return node.emitNode = { annotatedNodes: [node] } as EmitNode; - } - - const sourceFile = getSourceFileOfNode(getParseTreeNode(getSourceFileOfNode(node))) ?? Debug.fail("Could not determine parsed source file."); - getOrCreateEmitNode(sourceFile).annotatedNodes!.push(node); - } - - node.emitNode = {} as EmitNode; - } - else { - Debug.assert(!(node.emitNode.flags & (EmitFlags as any).Immutable), "Invalid attempt to mutate an immutable node."); - } - return node.emitNode; -} - -/** - * Gets the original parse tree node for a node. - * - * @param node The original node. - * @returns The original parse tree node if found; otherwise, undefined. - */ - export function getParseTreeNode(node: Node | undefined): Node | undefined; - - /** - * Gets the original parse tree node for a node. - * - * @param node The original node. - * @param nodeTest A callback used to ensure the correct type of parse tree node is returned. - * @returns The original parse tree node if found; otherwise, undefined. - */ - export function getParseTreeNode(node: T | undefined, nodeTest?: (node: Node) => node is T): T | undefined; - export function getParseTreeNode(node: Node | undefined, nodeTest?: (node: Node) => boolean): Node | undefined { - if (node === undefined || isParseTreeNode(node)) { - return node; - } - - node = node.original; - while (node) { - if (isParseTreeNode(node)) { - return !nodeTest || nodeTest(node) ? node : undefined; - } - node = node.original; - } - } - - -/** @internal */ -export function needsScopeMarker(result: Statement) { - return !isAnyImportOrReExport(result) && !isExportAssignment(result) && !hasSyntacticModifier(result, ModifierFlags.Export) && !isAmbientModule(result); -} - - -/** @internal */ -export function isAnyImportOrReExport(node: Node): node is AnyImportOrReExport { - return isAnyImportSyntax(node) || isExportDeclaration(node); -} - -/** - * True if has jsdoc nodes attached to it. - * - * @internal - */ -// TODO: GH#19856 Would like to return `node is Node & { jsDoc: JSDoc[] }` but it causes long compile times -export function hasJSDocNodes(node: Node): node is HasJSDoc & { jsDoc?: JSDoc[] } { - const { jsDoc } = node as { jsDoc?: JSDoc[] }; - return !!jsDoc && jsDoc.length > 0; -} - -/** @internal */ -export function isExternalModuleIndicator(result: Statement) { - // Exported top-level member indicates moduleness - return isAnyImportOrReExport(result) || isExportAssignment(result) || hasSyntacticModifier(result, ModifierFlags.Export); -} - - - -/** @internal */ -export function getOutputPathsFor(sourceFile: SourceFile | Bundle, host: EmitHost, forceDtsPaths: boolean): EmitFileNames { - const options = host.getCompilerOptions(); - if (sourceFile.kind === SyntaxKind.Bundle) { - return getOutputPathsForBundle(options, forceDtsPaths); - } - else { - const ownOutputFilePath = getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile.fileName, options)); - const isJsonFile = isJsonSourceFile(sourceFile); - // If json file emits to the same location skip writing it, if emitDeclarationOnly skip writing it - const isJsonEmittedToSameLocation = isJsonFile && - comparePaths(sourceFile.fileName, ownOutputFilePath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames?.()) === Comparison.EqualTo; - const jsFilePath = options.emitDeclarationOnly || isJsonEmittedToSameLocation ? undefined : ownOutputFilePath; - const sourceMapFilePath = !jsFilePath || isJsonSourceFile(sourceFile) ? undefined : getSourceMapFilePath(jsFilePath, options); - const declarationFilePath = (forceDtsPaths || (getEmitDeclarations(options) && !isJsonFile)) ? getDeclarationEmitOutputFilePath(sourceFile.fileName, host) : undefined; - const declarationMapPath = declarationFilePath && getAreDeclarationMapsEnabled(options) ? declarationFilePath + ".map" : undefined; - return { jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath, buildInfoPath: undefined }; - } -} - - -/** @internal */ -export function getDeclarationEmitOutputFilePath(fileName: string, host: EmitHost) { - return getDeclarationEmitOutputFilePathWorker(fileName, host.getCompilerOptions(), host.getCurrentDirectory(), host.getCommonSourceDirectory(), f => host.getCanonicalFileName(f)); -} - -/** @internal */ -export function getDeclarationEmitOutputFilePathWorker(fileName: string, options: CompilerOptions, currentDirectory: string, commonSourceDirectory: string, getCanonicalFileName: GetCanonicalFileName): string { - const outputDir = options.declarationDir || options.outDir; // Prefer declaration folder if specified - - const path = outputDir - ? getSourceFilePathInNewDirWorker(fileName, outputDir, currentDirectory, commonSourceDirectory, getCanonicalFileName) - : fileName; - const declarationExtension = getDeclarationEmitExtensionForPath(path); - return removeFileExtension(path) + declarationExtension; -} /** @internal */ export function getDeclarationEmitExtensionForPath(path: string) { @@ -1271,211 +373,6 @@ export function getOutputExtension(fileName: string, options: CompilerOptions): } -/** @internal */ -export function getOwnEmitOutputFilePath(fileName: string, host: EmitHost, extension: string) { - const compilerOptions = host.getCompilerOptions(); - let emitOutputFilePathWithoutExtension: string; - if (compilerOptions.outDir) { - emitOutputFilePathWithoutExtension = removeFileExtension(getSourceFilePathInNewDir(fileName, host, compilerOptions.outDir)); - } - else { - emitOutputFilePathWithoutExtension = removeFileExtension(fileName); - } - - return emitOutputFilePathWithoutExtension + extension; -} - -/** @internal */ -export function getSourceFilePathInNewDir(fileName: string, host: EmitHost, newDirPath: string): string { - return getSourceFilePathInNewDirWorker(fileName, newDirPath, host.getCurrentDirectory(), host.getCommonSourceDirectory(), f => host.getCanonicalFileName(f)); -} - - -/** @internal */ -export function getSourceFilePathInNewDirWorker(fileName: string, newDirPath: string, currentDirectory: string, commonSourceDirectory: string, getCanonicalFileName: GetCanonicalFileName): string { - let sourceFilePath = getNormalizedAbsolutePath(fileName, currentDirectory); - const isSourceFileInCommonSourceDirectory = getCanonicalFileName(sourceFilePath).indexOf(getCanonicalFileName(commonSourceDirectory)) === 0; - sourceFilePath = isSourceFileInCommonSourceDirectory ? sourceFilePath.substring(commonSourceDirectory.length) : sourceFilePath; - return combinePaths(newDirPath, sourceFilePath); -} - - - -/** @internal */ -export function getOutputPathsForBundle(options: CompilerOptions, forceDtsPaths: boolean): EmitFileNames { - const outPath = outFile(options)!; - const jsFilePath = options.emitDeclarationOnly ? undefined : outPath; - const sourceMapFilePath = jsFilePath && getSourceMapFilePath(jsFilePath, options); - const declarationFilePath = (forceDtsPaths || getEmitDeclarations(options)) ? removeFileExtension(outPath) + Extension.Dts : undefined; - const declarationMapPath = declarationFilePath && getAreDeclarationMapsEnabled(options) ? declarationFilePath + ".map" : undefined; - const buildInfoPath = getTsBuildInfoEmitOutputFilePath(options); - return { jsFilePath, sourceMapFilePath, declarationFilePath, declarationMapPath, buildInfoPath }; -} - - -/** @internal */ -export function outFile(options: CompilerOptions) { - return options.outFile || options.out; -} - - -function getSourceMapFilePath(jsFilePath: string, options: CompilerOptions) { - return (options.sourceMap && !options.inlineSourceMap) ? jsFilePath + ".map" : undefined; -} -/** @internal */ -export function getEmitDeclarations(compilerOptions: CompilerOptions): boolean { - return !!(compilerOptions.declaration || compilerOptions.composite); -} - - -/** @internal */ -export function getAreDeclarationMapsEnabled(options: CompilerOptions) { - return !!(getEmitDeclarations(options) && options.declarationMap); -} - - -/** @internal */ -export function getSetAccessorValueParameter(accessor: SetAccessorDeclaration): ParameterDeclaration | undefined { - if (accessor && accessor.parameters.length > 0) { - const hasThis = accessor.parameters.length === 2 && parameterIsThisKeyword(accessor.parameters[0]); - return accessor.parameters[hasThis ? 1 : 0]; - } -} - - -function getCanonicalAbsolutePath(host: ResolveModuleNameResolutionHost, path: string) { - return host.getCanonicalFileName(getNormalizedAbsolutePath(path, host.getCurrentDirectory())); -} - - -/** @internal */ -export function getExternalModuleNameFromDeclaration(host: ResolveModuleNameResolutionHost, resolver: EmitResolver, declaration: ImportEqualsDeclaration | ImportDeclaration | ExportDeclaration | ModuleDeclaration | ImportTypeNode): string | undefined { - const file = resolver.getExternalModuleFileFromDeclaration(declaration); - if (!file || file.isDeclarationFile) { - return undefined; - } - // If the declaration already uses a non-relative name, and is outside the common source directory, continue to use it - const specifier = getExternalModuleName(declaration); - if (specifier && isStringLiteralLike(specifier) && !pathIsRelative(specifier.text) && - getCanonicalAbsolutePath(host, file.path).indexOf(getCanonicalAbsolutePath(host, ensureTrailingDirectorySeparator(host.getCommonSourceDirectory()))) === -1) { - return undefined; - } - return getResolvedExternalModuleName(host, file); -} - - -/** @internal */ -export function getExternalModuleName(node: AnyImportOrReExport | ImportTypeNode | ImportCall | ModuleDeclaration): Expression | undefined { - switch (node.kind) { - case SyntaxKind.ImportDeclaration: - case SyntaxKind.ExportDeclaration: - return node.moduleSpecifier; - case SyntaxKind.ImportEqualsDeclaration: - return node.moduleReference.kind === SyntaxKind.ExternalModuleReference ? node.moduleReference.expression : undefined; - case SyntaxKind.ImportType: - return isLiteralImportTypeNode(node) ? node.argument.literal : undefined; - case SyntaxKind.CallExpression: - return node.arguments[0]; - case SyntaxKind.ModuleDeclaration: - return node.name.kind === SyntaxKind.StringLiteral ? node.name : undefined; - default: - return Debug.assertNever(node); - } -} - - -/** @internal */ -export function getExternalModuleImportEqualsDeclarationExpression(node: Node) { - Debug.assert(isExternalModuleImportEqualsDeclaration(node)); - return ((node as ImportEqualsDeclaration).moduleReference as ExternalModuleReference).expression; -} - -/** @internal */ -export function isExternalModuleImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration & { moduleReference: ExternalModuleReference } { - return node.kind === SyntaxKind.ImportEqualsDeclaration && (node as ImportEqualsDeclaration).moduleReference.kind === SyntaxKind.ExternalModuleReference; -} - - -/** @internal */ -export function getResolutionModeOverrideForClause(clause: AssertClause | undefined, grammarErrorOnNode?: (node: Node, diagnostic: DiagnosticMessage) => void) { - if (!clause) return undefined; - if (length(clause.elements) !== 1) { - grammarErrorOnNode?.(clause, Diagnostics.Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require); - return undefined; - } - const elem = clause.elements[0]; - if (!isStringLiteralLike(elem.name)) return undefined; - if (elem.name.text !== "resolution-mode") { - grammarErrorOnNode?.(elem.name, Diagnostics.resolution_mode_is_the_only_valid_key_for_type_import_assertions); - return undefined; - } - if (!isStringLiteralLike(elem.value)) return undefined; - if (elem.value.text !== "import" && elem.value.text !== "require") { - grammarErrorOnNode?.(elem.value, Diagnostics.resolution_mode_should_be_either_require_or_import); - return undefined; - } - return elem.value.text === "import" ? ModuleKind.ESNext : ModuleKind.CommonJS; -} - - -/** @internal */ -export function isEntityNameExpression(node: Node): node is EntityNameExpression { - return node.kind === SyntaxKind.Identifier || isPropertyAccessEntityNameExpression(node); -} - - -/** @internal */ -export function isPropertyAccessEntityNameExpression(node: Node): node is PropertyAccessEntityNameExpression { - return isPropertyAccessExpression(node) && isIdentifier(node.name) && isEntityNameExpression(node.expression); -} - - -/** @internal */ -export function getEffectiveBaseTypeNode(node: ClassLikeDeclaration | InterfaceDeclaration) { - const baseType = getClassExtendsHeritageElement(node); - if (baseType && isInJSFile(node)) { - // Prefer an @augments tag because it may have type parameters. - const tag = getJSDocAugmentsTag(node); - if (tag) { - return tag.class; - } - } - return baseType; -} - - -/** @internal */ -export function getClassExtendsHeritageElement(node: ClassLikeDeclaration | InterfaceDeclaration) { - const heritageClause = getHeritageClause(node.heritageClauses, SyntaxKind.ExtendsKeyword); - return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; -} - - -/** @internal */ -export function getHeritageClause(clauses: NodeArray | undefined, kind: SyntaxKind) { - if (clauses) { - for (const clause of clauses) { - if (clause.token === kind) { - return clause; - } - } - } - - return undefined; -} - - -/** - * Gets flags that control emit behavior of a node. - * - * @internal - */ - export function getEmitFlags(node: Node): EmitFlags { - const emitNode = node.emitNode; - return emitNode && emitNode.flags || 0; -} - - /** @internal */ export function getEmitModuleResolutionKind(compilerOptions: CompilerOptions) { let moduleResolution = compilerOptions.moduleResolution; @@ -1513,154 +410,18 @@ export function getEmitScriptTarget(compilerOptions: {module?: CompilerOptions[" ScriptTarget.ES3; } - -/** @internal */ -export function removePrefix(str: string, prefix: string): string { - return startsWith(str, prefix) ? str.substr(prefix.length) : str; -} - -/** @internal */ -export function tryRemovePrefix(str: string, prefix: string, getCanonicalFileName: GetCanonicalFileName = identity): string | undefined { - return startsWith(getCanonicalFileName(str), getCanonicalFileName(prefix)) ? str.substring(prefix.length) : undefined; -} - -const extensionsToRemove = [Extension.Dts, Extension.Dmts, Extension.Dcts, Extension.Mjs, Extension.Mts, Extension.Cjs, Extension.Cts, Extension.Ts, Extension.Js, Extension.Tsx, Extension.Jsx, Extension.Json]; - -/** @internal */ -export function isAnySupportedFileExtension(path: string): boolean { - return tryGetExtensionFromPath(path) !== undefined; -} - -/** @internal */ -export function tryGetExtensionFromPath(path: string): Extension | undefined { - return find(extensionsToRemove, e => fileExtensionIs(path, e)); -} - - - -/** @internal */ -export interface NodeModulePathParts { - readonly topLevelNodeModulesIndex: number; - readonly topLevelPackageNameIndex: number; - readonly packageRootIndex: number; - readonly fileNameIndex: number; -} -/** @internal */ -export function getNodeModulePathParts(fullPath: string): NodeModulePathParts | undefined { - // If fullPath can't be valid module file within node_modules, returns undefined. - // Example of expected pattern: /base/path/node_modules/[@scope/otherpackage/@otherscope/node_modules/]package/[subdirectory/]file.js - // Returns indices: ^ ^ ^ ^ - - let topLevelNodeModulesIndex = 0; - let topLevelPackageNameIndex = 0; - let packageRootIndex = 0; - let fileNameIndex = 0; - - const enum States { - BeforeNodeModules, - NodeModules, - Scope, - PackageContent - } - - let partStart = 0; - let partEnd = 0; - let state = States.BeforeNodeModules; - - while (partEnd >= 0) { - partStart = partEnd; - partEnd = fullPath.indexOf("/", partStart + 1); - switch (state) { - case States.BeforeNodeModules: - if (fullPath.indexOf(nodeModulesPathPart, partStart) === partStart) { - topLevelNodeModulesIndex = partStart; - topLevelPackageNameIndex = partEnd; - state = States.NodeModules; - } - break; - case States.NodeModules: - case States.Scope: - if (state === States.NodeModules && fullPath.charAt(partStart + 1) === "@") { - state = States.Scope; - } - else { - packageRootIndex = partEnd; - state = States.PackageContent; - } - break; - case States.PackageContent: - if (fullPath.indexOf(nodeModulesPathPart, partStart) === partStart) { - state = States.NodeModules; - } - else { - state = States.PackageContent; - } - break; - } - } - - fileNameIndex = partStart; - - return state > States.NodeModules ? { topLevelNodeModulesIndex, topLevelPackageNameIndex, packageRootIndex, fileNameIndex } : undefined; -} - - -/** @internal */ -export const nodeModulesPathPart = "/node_modules/"; -/** @internal */ -export function pathContainsNodeModules(path: string): boolean { - return stringContains(path, nodeModulesPathPart); -} - - - -/** - * Gets the extension from a path. - * Path must have a valid extension. - * - * @internal - */ - export function extensionFromPath(path: string): Extension { - const ext = tryGetExtensionFromPath(path); - return ext !== undefined ? ext : Debug.fail(`File ${path} has unknown extension.`); -} - -const allSupportedExtensions: readonly Extension[][] = [[Extension.Ts, Extension.Tsx, Extension.Dts, Extension.Js, Extension.Jsx], [Extension.Cts, Extension.Dcts, Extension.Cjs], [Extension.Mts, Extension.Dmts, Extension.Mjs]]; -const allSupportedExtensionsWithJson: readonly Extension[][] = [...allSupportedExtensions, [Extension.Json]]; - -/** @internal */ -export function getSupportedExtensions(options?: CompilerOptions): readonly Extension[][]; -/** @internal */ -export function getSupportedExtensions(options?: CompilerOptions, extraFileExtensions?: readonly FileExtensionInfo[]): readonly string[][]; -/** @internal */ -export function getSupportedExtensions(options?: CompilerOptions, extraFileExtensions?: readonly FileExtensionInfo[]): readonly string[][] { - const needJsExtensions = options && getAllowJSCompilerOption(options); - - if (!extraFileExtensions || extraFileExtensions.length === 0) { - return needJsExtensions ? allSupportedExtensions : supportedTSExtensions; - } - - const builtins = needJsExtensions ? allSupportedExtensions : supportedTSExtensions; - const flatBuiltins = flatten(builtins); - const extensions = [ - ...builtins, - ...mapDefined(extraFileExtensions, x => x.scriptKind === ScriptKind.Deferred || needJsExtensions && isJSLike(x.scriptKind) && flatBuiltins.indexOf(x.extension as Extension) === -1 ? [x.extension] : undefined) - ]; - - return extensions; -} /** @internal */ -export const supportedJSExtensions: readonly Extension[][] = [[Extension.Js, Extension.Jsx], [Extension.Mjs], [Extension.Cjs]]; +const supportedJSExtensions: readonly Extension[][] = [[Extension.Js, Extension.Jsx], [Extension.Mjs], [Extension.Cjs]]; /** @internal */ -export const supportedJSExtensionsFlat: readonly Extension[] = flatten(supportedJSExtensions); +const supportedJSExtensionsFlat: readonly Extension[] = flatten(supportedJSExtensions); /** * Groups of supported extensions in order of file resolution precedence. (eg, TS > TSX > DTS and seperately, CTS > DCTS) * * @internal */ - export const supportedTSExtensions: readonly Extension[][] = [[Extension.Ts, Extension.Tsx, Extension.Dts], [Extension.Cts, Extension.Dcts], [Extension.Mts, Extension.Dmts]]; +const supportedTSExtensions: readonly Extension[][] = [[Extension.Ts, Extension.Tsx, Extension.Dts], [Extension.Cts, Extension.Dcts], [Extension.Mts, Extension.Dmts]]; /** @internal */ - export const supportedTSExtensionsFlat: readonly Extension[] = flatten(supportedTSExtensions); +const supportedTSExtensionsFlat: readonly Extension[] = flatten(supportedTSExtensions); /** @internal */ export function hasJSFileExtension(fileName: string): boolean { @@ -1672,15 +433,6 @@ export function hasTSFileExtension(fileName: string): boolean { return some(supportedTSExtensionsFlat, extension => fileExtensionIs(fileName, extension)); } -/** @internal */ -export function getAllowJSCompilerOption(compilerOptions: CompilerOptions): boolean { - return compilerOptions.allowJs === undefined ? !!compilerOptions.checkJs : compilerOptions.allowJs; -} - -function isJSLike(scriptKind: ScriptKind | undefined): boolean { - return scriptKind === ScriptKind.JS || scriptKind === ScriptKind.JSX; -} - export function getFirstIdentifier(node: EntityNameOrEntityNameExpression): Identifier { switch (node.kind) { case SyntaxKind.Identifier: @@ -1798,32 +550,32 @@ export function isPartOfTypeNode(node: Node): boolean { return false; } /** @internal */ -export function isExpressionWithTypeArgumentsInClassExtendsClause(node: Node): node is ExpressionWithTypeArguments { +function isExpressionWithTypeArgumentsInClassExtendsClause(node: Node): node is ExpressionWithTypeArguments { return tryGetClassExtendingExpressionWithTypeArguments(node) !== undefined; } -export function tryGetClassExtendingExpressionWithTypeArguments(node: Node): ClassLikeDeclaration | undefined { +function tryGetClassExtendingExpressionWithTypeArguments(node: Node): ClassLikeDeclaration | undefined { const cls = tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node); return cls && !cls.isImplements ? cls.class : undefined; } /** @internal */ -export interface ClassImplementingOrExtendingExpressionWithTypeArguments { +interface ClassImplementingOrExtendingExpressionWithTypeArguments { readonly class: ClassLikeDeclaration; readonly isImplements: boolean; } /** @internal */ -export function tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node: Node): ClassImplementingOrExtendingExpressionWithTypeArguments | undefined { +function tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node: Node): ClassImplementingOrExtendingExpressionWithTypeArguments | undefined { return isExpressionWithTypeArguments(node) && isHeritageClause(node.parent) && isClassLike(node.parent.parent) ? { class: node.parent.parent, isImplements: node.parent.token === SyntaxKind.ImplementsKeyword } : undefined; } -export function isClassLike(node: Node): node is ClassLikeDeclaration { +function isClassLike(node: Node): node is ClassLikeDeclaration { return node && (node.kind === SyntaxKind.ClassDeclaration || node.kind === SyntaxKind.ClassExpression); } -export const supportedDeclarationExtensions: readonly Extension[] = [Extension.Dts, Extension.Dcts, Extension.Dmts]; +const supportedDeclarationExtensions: readonly Extension[] = [Extension.Dts, Extension.Dcts, Extension.Dmts]; /** @internal */ export function isDeclarationFileName(fileName: string): boolean { return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions); @@ -1838,7 +590,7 @@ export function cloneCompilerOptions(options: CompilerOptions): CompilerOptions return result; } /** @internal */ -export function setConfigFileInOptions(options: CompilerOptions, configFile: TsConfigSourceFile | undefined) { +function setConfigFileInOptions(options: CompilerOptions, configFile: TsConfigSourceFile | undefined) { if (configFile) { Object.defineProperty(options, "configFile", { enumerable: false, writable: false, value: configFile }); } @@ -1881,36 +633,7 @@ export function nodeHasName(statement: Node, name: Identifier) { } /** @internal */ -export function isNamedDeclaration(node: Node): node is NamedDeclaration & { name: DeclarationName } { +function isNamedDeclaration(node: Node): node is NamedDeclaration & { name: DeclarationName } { return !!(node as NamedDeclaration).name; // A 'name' property should always be a DeclarationName. } -/** - * @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 isIdentifierANonContextualKeyword(node: Identifier): boolean { - const originalKeywordKind = identifierToKeywordKind(node); - return !!originalKeywordKind && !isContextualKeyword(originalKeywordKind); -} - -/** @internal */ -export function isContextualKeyword(token: SyntaxKind): boolean { - return SyntaxKind.AbstractKeyword <= token && token <= SyntaxKind.OfKeyword; -} \ No newline at end of file diff --git a/external-declarations/src/main.ts b/external-declarations/src/main.ts index 5fb65975e1980..43bb12c2b59f0 100644 --- a/external-declarations/src/main.ts +++ b/external-declarations/src/main.ts @@ -1,11 +1,8 @@ import * as ts from 'typescript' -import * as fsp from 'fs/promises' import * as fs from 'fs' import * as path from 'path' -import { transformFile } from './compiler/transform-file'; import { ArgType, parseArgs } from './utils/cli-parser'; -import { ensureDir, readAllFiles } from './utils/fs-utils'; -import { changeAnyExtension, normalizePath } from './compiler/path-utils'; +import { normalizePath } from './compiler/path-utils'; import { CancellationToken, transformProject } from './compiler/transform-project'; import { installTracer, tracer } from './compiler/perf-tracer'; @@ -32,11 +29,8 @@ const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2 printUsageOnErrors(); let projectConfig = normalizePath(path.resolve(parsedArgs.project)); -let projectPath = projectConfig; if (path.extname(projectConfig) !== ".json") { projectConfig = normalizePath(path.join(projectConfig, "tsconfig.json")) -} else { - projectPath = normalizePath(path.dirname(projectConfig)); } diff --git a/external-declarations/src/test-runner/parallel-run.ts b/external-declarations/src/test-runner/parallel-run.ts index f8b779162981c..25bb719337e4f 100644 --- a/external-declarations/src/test-runner/parallel-run.ts +++ b/external-declarations/src/test-runner/parallel-run.ts @@ -1,4 +1,3 @@ -import * as fs from 'fs' import * as path from 'path' import * as childProcess from "child_process"; import { parseArgs } from '../utils/cli-parser'; diff --git a/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts b/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts index db6a1632e5059..0ce747fb58439 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts @@ -1,7 +1,6 @@ import { CompilerOptions, Diagnostic } from "typescript"; -import ts = require("typescript"); -import { hasProperty } from "../../compiler/debug"; -import { trimString, startsWith, mapDefined, map, compareStringsCaseSensitive } from "../../compiler/lang-utils"; +import * as ts from "typescript"; +import { startsWith, map, compareStringsCaseSensitive, hasProperty } from "../../compiler/lang-utils"; import * as opts from "./options"; import * as TestCaseParser from "./test-file-parser"; import * as vfs from "./vfs"; @@ -212,19 +211,6 @@ export namespace Utils { return 0; } - function checkDuplicatedFileName(resultName: string, dupeCase: Map): string { - resultName = sanitizeTestFilePath(resultName); - if (dupeCase.has(resultName)) { - // A different baseline filename should be manufactured if the names differ only in case, for windows compat - const count = 1 + dupeCase.get(resultName)!; - dupeCase.set(resultName, count); - resultName = `${resultName}.dupe${count}`; - } - else { - dupeCase.set(resultName, 0); - } - return resultName; - } export function addUTF8ByteOrderMark(text: string) { return getByteOrderMarkLength(text) === 0 ? "\u00EF\u00BB\u00BF" + text : text; } diff --git a/external-declarations/src/test-runner/tsc-infrastructure/io.ts b/external-declarations/src/test-runner/tsc-infrastructure/io.ts index ea8dcc0528d2e..8fdabd388eb67 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/io.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/io.ts @@ -2,7 +2,6 @@ import { sys } from "typescript"; import { FileSystemEntries } from "./vfs"; import * as vpath from './vpath'; import { compareStringsCaseSensitive, compareStringsCaseInsensitive } from "../../compiler/lang-utils"; -type RunnerBase = unknown; export interface IO { newLine(): string; @@ -33,16 +32,10 @@ export interface IO { } export let IO: IO; -export function setHarnessIO(io: IO) { - IO = io; -} // harness always uses one kind of new line // But note that `parseTestData` in `fourslash.ts` uses "\n" -export const harnessNewLine = "\r\n"; - -// Root for file paths that are stored in a virtual file system -export const virtualFileSystemRoot = "/"; +const harnessNewLine = "\r\n"; function createNodeIO(): IO { let workspaceRoot = "./node_modules/typescript/"; @@ -73,11 +66,6 @@ function createNodeIO(): IO { return pathModule.join(...components); } - function enumerateTestFiles(runner: RunnerBase):any[] { - throw new Error("Not implemented"); - // return runner.getTestFiles(); - } - function listFiles(path: string, spec: RegExp, options: { recursive?: boolean } = {}) { function filesInFolder(folder: string): string[] { let paths: string[] = []; diff --git a/external-declarations/src/test-runner/tsc-infrastructure/options.ts b/external-declarations/src/test-runner/tsc-infrastructure/options.ts index ac036e0057acc..6ee765c36ecbb 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/options.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/options.ts @@ -3,7 +3,7 @@ import { WatchFileKind, WatchDirectoryKind, PollingWatchKind, ScriptTarget, ModuleKind, ImportsNotUsedAsValues, ModuleResolutionKind, NewLineKind, ModuleDetectionKind, JsxEmit, DiagnosticMessage, CompilerOptionsValue, Diagnostic } from "typescript"; import { isNullOrUndefined } from "../../compiler/lang-utils"; -import { Diagnostics } from "../../compiler/diagnosticInformationMap.generated"; +import { Diagnostics } from "./diagnosticInformationMap.generated"; import { getEntries, mapDefined, startsWith, trimString } from "../../compiler/lang-utils"; const jsxOptionMap = new Map(getEntries({ diff --git a/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts b/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts index 4c13887fadbb0..760c7dc38cc86 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts @@ -1,9 +1,8 @@ -import assert = require('assert'); import * as ts from 'typescript' import { find, forEach, orderedRemoveItemAt } from '../../compiler/lang-utils'; import { getBaseFileName, getDirectoryPath, getNormalizedAbsolutePath, normalizePath } from '../../compiler/path-utils'; -import { _Path } from '../../compiler/types'; import * as vfs from './vfs' +import { Path } from 'typescript'; /** all the necessary information to set the right compiler settings */ export interface CompilerSettings { @@ -203,7 +202,7 @@ export function makeUnitsFromTest(code: string, fileName: string, rootDir?: stri baseDir = getNormalizedAbsolutePath(baseDir, rootDir); } tsConfig = ts.parseJsonSourceFileConfigFileContent(configJson, parseConfigHost, baseDir); - tsConfig.options.configFilePath = data.name as _Path; + tsConfig.options.configFilePath = data.name as Path; tsConfigFileUnitData = data; // delete entry from the list diff --git a/external-declarations/src/test-runner/tsc-infrastructure/vary-by.ts b/external-declarations/src/test-runner/tsc-infrastructure/vary-by.ts index 4db6d1dec2f85..d8a1a5e02ec7d 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/vary-by.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/vary-by.ts @@ -1,9 +1,8 @@ -import { hasProperty } from "../../compiler/debug"; -import { equateStringsCaseInsensitive, map, forEach, startsWith, findIndex, arrayFrom, orderedRemoveItemAt, getEntries } from "../../compiler/lang-utils"; +import { equateStringsCaseInsensitive, map, forEach, startsWith, findIndex, arrayFrom, orderedRemoveItemAt, getEntries, hasProperty } from "../../compiler/lang-utils"; import { optionDeclarations } from "./options"; import { CompilerSettings } from "./test-file-parser"; -export interface FileBasedTestConfiguration { +interface FileBasedTestConfiguration { [key: string]: string; } diff --git a/external-declarations/src/test-runner/tsc-infrastructure/vpath.ts b/external-declarations/src/test-runner/tsc-infrastructure/vpath.ts index f7a651e6fa554..f706946c153ae 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/vpath.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/vpath.ts @@ -1,5 +1,5 @@ import { Path } from "typescript"; -import { changeAnyExtension, comparePaths, comparePathsCaseInsensitive, comparePathsCaseSensitive, getAnyExtensionFromPath, getBaseFileName, getDirectoryPath, getPathComponents, getPathComponentsRelativeTo, getPathFromPathComponents, getRelativePathFromDirectory, isDiskPathRoot, isRootedDiskPath, reducePathComponents, resolvePath } from "../../compiler/path-utils"; +import { changeAnyExtension, comparePaths, comparePathsCaseInsensitive, comparePathsCaseSensitive, getAnyExtensionFromPath, getBaseFileName, getDirectoryPath, getPathComponents, getPathFromPathComponents, getRelativePathFromDirectory, isDiskPathRoot, isRootedDiskPath, reducePathComponents, resolvePath } from "../../compiler/path-utils"; import { CharacterCodes } from "../../compiler/types"; import { hasJSFileExtension, hasTSFileExtension, isDeclarationFileName } from "../../compiler/utils"; import * as vfs from './vfs' diff --git a/external-declarations/src/test-runner/utils.ts b/external-declarations/src/test-runner/utils.ts index 93bb77f09ccee..a7764f65e3524 100644 --- a/external-declarations/src/test-runner/utils.ts +++ b/external-declarations/src/test-runner/utils.ts @@ -1,26 +1,15 @@ -import * as path from 'path' import * as ts from 'typescript' import { compileFiles, TestFile, Utils } from "./tsc-infrastructure/compiler-run"; import * as TestCaseParser from "./tsc-infrastructure/test-file-parser"; import * as fsp from 'fs/promises' -import { getDeclarationExtension, isDeclarationFile, isJavaScriptFile, isJSONFile, isSourceMapFile, isTypeScriptFile } from '../compiler/path-utils'; +import { getDeclarationExtension, isDeclarationFile, isTypeScriptFile } from '../compiler/path-utils'; import { changeExtension } from './tsc-infrastructure/vpath'; import * as vpath from "./tsc-infrastructure/vpath"; import { libs } from './tsc-infrastructure/options'; import { ModuleKind } from 'typescript'; import { transformFile } from '../compiler/transform-file'; -export function swapLocation(file: string, changed: string, extension: string | undefined = ".d.ts") { - const parentDir = path.dirname(path.dirname(file)); - let baseFile = path.basename(file) - if (extension) { - const existingExtension = path.extname(file); - baseFile = baseFile.substring(0, baseFile.length - existingExtension.length) + extension; - } - return path.join(parentDir, changed, baseFile); -} - export interface FileContent { content: string, fileName: string @@ -58,11 +47,11 @@ export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings .filter(isRelevantTestFile) .flatMap(file => { const declarationFile = changeExtension(file.name, getDeclarationExtension(file.name)); - const declarationMapFile = declarationFile + ".map"; + // const declarationMapFile = declarationFile + ".map"; const resolvedDeclarationFile = vpath.resolve(result.vfs.cwd(), declarationFile); - const resolvedDeclarationMapFile = vpath.resolve(result.vfs.cwd(), declarationMapFile); + // const resolvedDeclarationMapFile = vpath.resolve(result.vfs.cwd(), declarationMapFile); const declaration = result.dts.get(resolvedDeclarationFile) - const declarationMap = result.maps.get(resolvedDeclarationMapFile) + // const declarationMap = result.maps.get(resolvedDeclarationMapFile) return [{ content: declaration?.text ?? "", fileName: declarationFile, diff --git a/external-declarations/src/tsconfig.json b/external-declarations/src/tsconfig.json index 26012c4a16ff9..c0f480bccf081 100644 --- a/external-declarations/src/tsconfig.json +++ b/external-declarations/src/tsconfig.json @@ -21,6 +21,7 @@ "alwaysStrict": true, "preserveConstEnums": true, - "outDir": "../build" + "outDir": "../build", + "noUnusedLocals": true } } \ No newline at end of file diff --git a/external-declarations/src/utils/cli-parser.ts b/external-declarations/src/utils/cli-parser.ts index 56f0fd0073ee0..481318fb103e5 100644 --- a/external-declarations/src/utils/cli-parser.ts +++ b/external-declarations/src/utils/cli-parser.ts @@ -1,6 +1,6 @@ -export type ArgTypeParser = (name: string, value: string | undefined, existingValue: T | undefined) => T +type ArgTypeParser = (name: string, value: string | undefined, existingValue: T | undefined) => T function mustNotExist(fn: ArgTypeParser): ArgTypeParser { return (name, value, existingValue) => { if (existingValue) { From a2911385d557f491bd5c7caf526b112ef5df791b Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 29 Jun 2023 13:19:09 +0100 Subject: [PATCH 027/224] Fix lint errors. --- .../src/compiler/emit-binder.ts | 142 +++++++++--------- .../src/compiler/emit-host.ts | 24 +-- .../src/compiler/emit-resolver.ts | 37 ++--- .../src/compiler/lang-utils.ts | 22 +-- .../src/compiler/path-utils.ts | 7 +- .../src/compiler/perf-tracer.ts | 8 +- .../src/compiler/transform-file.ts | 42 +++--- .../src/compiler/transform-project.ts | 40 ++--- external-declarations/src/compiler/types.ts | 15 +- external-declarations/src/compiler/utils.ts | 9 +- external-declarations/src/main.ts | 42 +++--- .../src/test-runner/cli-arg-config.ts | 4 +- .../src/test-runner/excluded-ts-tests.ts | 6 +- .../src/test-runner/parallel-run.ts | 42 +++--- .../src/test-runner/test-runner-main.ts | 64 ++++---- .../tsc-infrastructure/collections.ts | 2 +- .../tsc-infrastructure/compiler-run.ts | 23 +-- .../tsc-infrastructure/compiler.ts | 13 +- .../tsc-infrastructure/fakesHosts.ts | 83 +++++----- .../src/test-runner/tsc-infrastructure/io.ts | 7 +- .../test-runner/tsc-infrastructure/options.ts | 5 +- .../tsc-infrastructure/test-document.ts | 1 + .../tsc-infrastructure/test-file-parser.ts | 15 +- .../test-runner/tsc-infrastructure/vary-by.ts | 2 +- .../src/test-runner/tsc-infrastructure/vfs.ts | 6 +- .../test-runner/tsc-infrastructure/vpath.ts | 21 +-- .../src/test-runner/utils.ts | 37 ++--- external-declarations/src/utils/cli-parser.ts | 36 ++--- external-declarations/src/utils/fs-utils.ts | 13 +- .../expando-functions-declarations.ts | 10 ++ .../expando-functions-expressions.ts | 21 +++ 31 files changed, 430 insertions(+), 369 deletions(-) create mode 100644 external-declarations/tests/source/local-inference/expando-functions-declarations.ts create mode 100644 external-declarations/tests/source/local-inference/expando-functions-expressions.ts diff --git a/external-declarations/src/compiler/emit-binder.ts b/external-declarations/src/compiler/emit-binder.ts index d20e99f19133f..8ed06e620d429 100644 --- a/external-declarations/src/compiler/emit-binder.ts +++ b/external-declarations/src/compiler/emit-binder.ts @@ -1,8 +1,9 @@ -import { Symbol, Node, VariableDeclaration, ParameterDeclaration, ModifierFlags, isLiteralExpression, ClassElement, isIdentifier, BindingPattern, SyntaxKind, findAncestor, SourceFile, isVariableStatement, SymbolFlags, isImportDeclaration, __String, isFunctionDeclaration, isClassDeclaration, isTypeAliasDeclaration, isExportDeclaration, isExportAssignment, isModuleDeclaration, NodeArray, isConstructSignatureDeclaration, isConstructorDeclaration, isImportEqualsDeclaration, isEnumDeclaration, isInterfaceDeclaration, isNamedExports, isModuleBlock, ModuleDeclaration, ArrayBindingElement, isExternalModuleReference, forEachChild, isMetaProperty, isComputedPropertyName, isPropertyAccessExpression, isPrivateIdentifier, Extension, isConditionalTypeNode, TypeElement, CompilerOptions, ModuleKind, ModuleDetectionKind, isMappedTypeNode, TypeParameterDeclaration, isInferTypeNode, isBlock, InterfaceDeclaration, ClassDeclaration, FunctionDeclaration, JsxEmit, isJsxFragment, isJsxOpeningLikeElement, ModuleResolutionKind, ResolutionMode, ExportDeclaration, Identifier, isSourceFile, ExportSpecifier, EnumDeclaration, isVariableDeclaration } from "typescript"; +import { __String, ArrayBindingElement, BindingPattern, ClassDeclaration, ClassElement, CompilerOptions, EnumDeclaration, ExportDeclaration, ExportSpecifier, Extension, findAncestor, forEachChild, FunctionDeclaration, Identifier, InterfaceDeclaration, isBlock, isClassDeclaration, isComputedPropertyName, isConditionalTypeNode, isConstructorDeclaration, isConstructSignatureDeclaration, isEnumDeclaration, isExportAssignment, isExportDeclaration, isExternalModuleReference, isFunctionDeclaration, isIdentifier, isImportDeclaration, isImportEqualsDeclaration, isInferTypeNode, isInterfaceDeclaration, isJsxFragment, isJsxOpeningLikeElement, isLiteralExpression, isMappedTypeNode, isMetaProperty, isModuleBlock, isModuleDeclaration, isNamedExports, isPrivateIdentifier, isPropertyAccessExpression, isSourceFile, isTypeAliasDeclaration, isVariableDeclaration,isVariableStatement, JsxEmit, ModifierFlags, ModuleDeclaration, ModuleDetectionKind, ModuleKind, ModuleResolutionKind, Node, NodeArray, ParameterDeclaration, ResolutionMode, SourceFile, Symbol, SymbolFlags, SyntaxKind, TypeElement, TypeParameterDeclaration, VariableDeclaration } from "typescript"; + import { Debug } from "./debug"; import { forEach } from "./lang-utils"; import { _Symbol } from "./types"; -import { isBindingPattern, getNodeId, hasSyntacticModifier, getEmitModuleKind, getEmitModuleResolutionKind, isEnumConst, nodeHasName } from "./utils"; +import { getEmitModuleKind, getEmitModuleResolutionKind, getNodeId, hasSyntacticModifier, isBindingPattern, isEnumConst, nodeHasName } from "./utils"; interface NodeLinks { @@ -25,17 +26,17 @@ export interface BasicSymbol { } function assertNever(o: never): never { - throw new Error("Should never happen") + throw new Error("Should never happen"); } type _Node = Node; type _NodeArray = NodeArray; type _SourceFile = SourceFile; -declare module 'typescript' { +declare module "typescript" { interface SourceFile { externalModuleIndicator?: _Node | true; } - export function forEachChildRecursively(rootNode: _Node, cbNode: (node: _Node, parent: _Node) => T | "skip" | undefined, cbNodes?: (nodes: _NodeArray<_Node>, parent: _Node) => T | "skip" | undefined): T | undefined + export function forEachChildRecursively(rootNode: _Node, cbNode: (node: _Node, parent: _Node) => T | "skip" | undefined, cbNodes?: (nodes: _NodeArray<_Node>, parent: _Node) => T | "skip" | undefined): T | undefined; export function getTokenPosOfNode(node: _Node, sourceFile?: _SourceFile, includeJsDoc?: boolean): number; } function getEmitModuleDetectionKind(options: CompilerOptions) { @@ -84,7 +85,7 @@ const syntaxKindToSymbolMap = { } as const satisfies Partial>>; export function bindSourceFile(file: SourceFile, options: CompilerOptions, packageModuleType: ResolutionMode) { - const nodeLinks: NodeLinks[] = [] + const nodeLinks: NodeLinks[] = []; function tryGetNodeLinks(node: Node): NodeLinks | undefined { const id = (node as any).id; if(!id) return undefined; @@ -96,33 +97,33 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa } const [isFileAModule, isNodeAModuleIndicator] = getSetExternalModuleIndicator(options); - file.externalModuleIndicator = + file.externalModuleIndicator = isFileAModule(file) || isExternalModuleWorker(file, isNodeAModuleIndicator); - file.impliedNodeFormat = getImpliedNodeFormat(file.fileName, options, packageModuleType) - + file.impliedNodeFormat = getImpliedNodeFormat(file.fileName, options, packageModuleType); + bind(); - return { - tryGetNodeLinks, + return { + tryGetNodeLinks, getNodeLinks, resolveName, - } + }; + - function resolveName(enclosingDeclaration: Node, escapedText: __String, meaning: SymbolFlags) { function getSymbolFromScope(table: SymbolTable | undefined) { - let symbol = table?.get(escapedText); + const symbol = table?.get(escapedText); if(symbol && ((symbol.flags & meaning) || (symbol.flags & SymbolFlags.Alias))) { - return symbol + return symbol; } } let currentScope = enclosingDeclaration; while(currentScope) { - const links = tryGetNodeLinks(currentScope); + const links = tryGetNodeLinks(currentScope); let symbol = getSymbolFromScope(links?.locals); if(!symbol && (isModuleDeclaration(currentScope) || isSourceFile(currentScope))) { - symbol = getSymbolFromScope(links?.symbol?.exports) + symbol = getSymbolFromScope(links?.symbol?.exports); } if(symbol) return symbol; currentScope = currentScope.parent; @@ -156,8 +157,8 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa let currentSymbol: BasicSymbol = undefined!; let currentLocalSymbolTable: SymbolTable = undefined!; let currentExportsSymbolTable: SymbolTable | null = null; - let postBindingAction: Array<() => void> = []; - + const postBindingAction: (() => void)[] = []; + const fileLinks = getNodeLinks(file).symbol = newSymbol(); fileLinks.exports = new Map(); withScope(file, fileLinks.exports, ()=> bindEachFunctionsFirst(file.statements)); @@ -167,14 +168,14 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa return { declarations: [], flags: 0, - } + }; } function getSymbol(table: SymbolTable, name: __String) { let symbol = table.get(name); if(!symbol) { symbol = newSymbol(); symbol.name = name; - table.set(name, symbol) + table.set(name, symbol); } return symbol; } @@ -183,9 +184,10 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa const exportKind = flags & SymbolFlags.Value ? SymbolFlags.ExportValue : 0; const localSymbol = addLocalOnlyDeclaration(name, node, [exportKind, forbiddenFlags]); const exportSymbol = addExportOnlyDeclaration(name, node, [flags, forbiddenFlags]); - localSymbol.exportSymbol = exportSymbol + localSymbol.exportSymbol = exportSymbol; return exportSymbol; - }else { + } + else { return addLocalOnlyDeclaration(name, node, [flags, forbiddenFlags]); } } @@ -212,7 +214,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa return symbol; } function withScope(scope: Node, exports: SymbolTable | null, fn: () => void) { - const old = [currentScope, currentLocalSymbolTable, currentExportsSymbolTable] as const + const old = [currentScope, currentLocalSymbolTable, currentExportsSymbolTable] as const; currentScope = scope; const links = getNodeLinks(scope); currentLocalSymbolTable = (links.locals ??= new Map()); @@ -220,14 +222,14 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa fn(); [currentScope, currentLocalSymbolTable, currentExportsSymbolTable] = old; } - function withMembers(symbol: BasicSymbol, fn:()=> void, table: "members" | "exports" = "members") { - const old = [currentLocalSymbolTable, currentSymbol] as const + function withMembers(symbol: BasicSymbol, fn: () => void, table: "members" | "exports" = "members") { + const old = [currentLocalSymbolTable, currentSymbol] as const; currentSymbol = symbol; currentLocalSymbolTable = (symbol[table] ??= new Map()); fn(); [currentLocalSymbolTable, currentSymbol] = old; } - + /** * Gets the symbolic name for a member from its type. */ @@ -245,24 +247,26 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa } else if(isComputedPropertyName(name)) { let expr = name.expression; - + if(isLiteralExpression(expr)) { return `${expr.text}` as __String; } - let fullName = "" + let fullName = ""; while(isPropertyAccessExpression(expr)) { - fullName = "." + expr.name.escapedText + name + fullName = "." + expr.name.escapedText + name; expr = expr.expression; } if(!isIdentifier(expr)) { return undefined; } return `[${expr.escapedText}${fullName}]` as __String; - } else if(isPrivateIdentifier(name)) { + } + else if(isPrivateIdentifier(name)) { return name.escapedText; - } else { - assertNever(name) + } + else { + assertNever(name); } } @@ -292,8 +296,8 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa else if(isConditionalTypeNode(node)) { withScope(node.checkType, null, () => { bindWorker(node.extendsType); - }) - getNodeLinks(node.trueType).locals = getNodeLinks(node.checkType).locals + }); + getNodeLinks(node.trueType).locals = getNodeLinks(node.checkType).locals; } if(isInferTypeNode(node)) { const conditionalTypeOwner = findAncestor(node, isConditionalTypeNode); // Probably an error, infer not in a conditional type context @@ -313,7 +317,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa bindChildren(node); } } - bindWorker(node) + bindWorker(node); } function bindTypeParameters(typeParameters: TypeParameterDeclaration[] | NodeArray | undefined) { typeParameters?.forEach(t => addLocalOnlyDeclaration(t.name.escapedText, t, getSymbolFlagsForNode(t))); @@ -330,17 +334,19 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa (pattern.elements as NodeArray).forEach(b => { if(b.kind === SyntaxKind.OmittedExpression) return; if(!b.name) return; - + if(isIdentifier(b.name)) { addLocalAndExportDeclaration(b.name.escapedText, b, getSymbolFlagsForNode(b), isExported); - } else { + } + else { bindBindingPattern(b.name); } - }) + }); } bindBindingPattern(d.name); - } else { - assertNever(d.name) + } + else { + assertNever(d.name); } } function bindEachFunctionsFirst(nodes: NodeArray | undefined): void { @@ -348,7 +354,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa bindContainer(nodes.filter(n => n.kind === SyntaxKind.FunctionDeclaration)); bindContainer(nodes.filter(n => n.kind !== SyntaxKind.FunctionDeclaration)); } - + function bindContainer(statements: NodeArray | Node[]) { statements.forEach(statement => { const isExported = hasSyntacticModifier(statement, ModifierFlags.Export); @@ -367,11 +373,12 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa if(namedBindings.kind === SyntaxKind.NamedImports) { namedBindings.elements.forEach(v => { addLocalOnlyDeclaration(v.name.escapedText, v, getSymbolFlagsForNode(v)); - }) + }); } else if(namedBindings.kind === SyntaxKind.NamespaceImport) { addLocalOnlyDeclaration(namedBindings.name.escapedText, namedBindings, getSymbolFlagsForNode(namedBindings)); - } else { + } + else { debugger; throw new Error("Not supported"); } @@ -387,7 +394,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa bindTypeExpressions(statement); statement.parameters.forEach(bindVariable); }); - + addLocalAndExportDeclaration(getStatementName(statement), statement, getSymbolFlagsForNode(statement), isExported); } if(isTypeAliasDeclaration(statement)) { @@ -414,13 +421,13 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa if(statement.exportClause && isNamedExports(statement.exportClause)) { const elements = statement.exportClause.elements; if (statement.moduleSpecifier) { - // TODO is currentExportsSymbolTable ok here? + // TODO is currentExportsSymbolTable ok here? withScope(statement, null, () => { elements.forEach(e => { - const [flags, forbiddenFlags] = getSymbolFlagsForNode(e) + const [flags, forbiddenFlags] = getSymbolFlagsForNode(e); addLocalOnlyDeclaration((e.propertyName ?? e.name).escapedText, e, [flags | SymbolFlags.ExportValue , forbiddenFlags]); - }); - }) + }); + }); } elements.forEach(e => { postBindingAction.push(() => { @@ -430,7 +437,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa resolvedSymbol.declarations.forEach(d => getNodeLinks(d).isVisible = true); } }); - }) + }); } } // if(isEnumMember(statement)) { @@ -448,13 +455,14 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa withScope(moduleDeclaration, moduleSymbol.exports, () => { if(moduleDeclaration.body) { if(isModuleBlock(moduleDeclaration.body)) { - const moduleBlock = moduleDeclaration.body - bindEachFunctionsFirst(moduleBlock.statements) + const moduleBlock = moduleDeclaration.body; + bindEachFunctionsFirst(moduleBlock.statements); } else if(isModuleDeclaration(moduleDeclaration.body)) { const subModule = moduleDeclaration.body; bindModuleDeclaration(subModule); - } else { + } + else { throw new Error("Unsupported body type"); } } @@ -471,11 +479,11 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa withMembers(interfaceSymbol, () => { interfaceDeclaration.members.forEach(m => { addLocalOnlyDeclaration(getMemberName(m), m, getElementFlagsOrThrow(m)); - bindTypeExpressions(m) - }) + bindTypeExpressions(m); + }); }); } - + if(isClassDeclaration(statement)) { const classDeclaration = statement; const classSymbol = addLocalAndExportDeclaration(classDeclaration.name?.escapedText, classDeclaration, getSymbolFlagsForNode(classDeclaration), isExported); @@ -486,10 +494,10 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa classDeclaration.members.forEach(m => { if(hasSyntacticModifier(m, ModifierFlags.Static)) return; if(m.kind === SyntaxKind.SemicolonClassElement || m.kind === SyntaxKind.ClassStaticBlockDeclaration) return; - + addLocalOnlyDeclaration(getMemberName(m), m, getElementFlagsOrThrow(m)); - bindTypeExpressions(m) - }) + bindTypeExpressions(m); + }); }); withMembers(classSymbol, () => { classDeclaration.members.forEach(m => { @@ -498,11 +506,11 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa || m.kind === SyntaxKind.ClassStaticBlockDeclaration) return; addLocalOnlyDeclaration(getMemberName(m), m, getElementFlagsOrThrow(m)); - bindTypeExpressions(m) - }) + bindTypeExpressions(m); + }); }, "exports"); } - }) + }); } } } @@ -511,7 +519,7 @@ function isExternalModuleWorker(file: SourceFile, isModuleIndicatorNode: (node: return ( forEach(file.statements, isAnExternalModuleIndicatorNode) || walkTreeForModuleIndicator(file, isModuleIndicatorNode) // TODO: isolatedDeclarations: find a away to detect commonJS modules - ) + ); } function isAnExternalModuleIndicatorNode(node: Node) { @@ -536,7 +544,7 @@ function isImportMeta(node: Node): boolean { /** @internal */ function getSetExternalModuleIndicator(options: CompilerOptions): [(node: SourceFile) => true | undefined, (node: Node) => boolean] { - + function isFileForcedToBeModuleByFormat(file: SourceFile): true | undefined { // Excludes declaration files - they still require an explicit `export {}` or the like // for back compat purposes. The only non-declaration files _not_ forced to be a module are `.js` files @@ -553,15 +561,15 @@ function getSetExternalModuleIndicator(options: CompilerOptions): [(node: Source case ModuleDetectionKind.Legacy: // Files are modules if they have imports, exports, or import.meta return [isFileForcedToBeModuleByFormat, isImportMeta]; - + case ModuleDetectionKind.Auto: return [ - isFileForcedToBeModuleByFormat, + isFileForcedToBeModuleByFormat, options.jsx === JsxEmit.ReactJSX || options.jsx === JsxEmit.ReactJSXDev? n => isImportMeta(n) || isJsxOpeningLikeElement(n) || isJsxFragment(n): isImportMeta - ] + ]; } } diff --git a/external-declarations/src/compiler/emit-host.ts b/external-declarations/src/compiler/emit-host.ts index eba9e3b2a3746..7fe254db37074 100644 --- a/external-declarations/src/compiler/emit-host.ts +++ b/external-declarations/src/compiler/emit-host.ts @@ -1,10 +1,10 @@ -import * as ts from 'typescript' -import { changeExtension } from '../test-runner/tsc-infrastructure/vpath'; -import { getDeclarationExtension, getDirectoryPath, getRelativePathFromDirectory, hasExtension, isDeclarationFile, isJavaScriptFile, resolvePath } from './path-utils'; -import { IsolatedEmitHost } from './types'; -import { getNodeId } from './utils'; +import * as ts from "typescript"; +import { changeExtension } from "../test-runner/tsc-infrastructure/vpath"; +import { getDeclarationExtension, getDirectoryPath, getRelativePathFromDirectory, hasExtension, isDeclarationFile, isJavaScriptFile, resolvePath } from "./path-utils"; +import { IsolatedEmitHost } from "./types"; +import { getNodeId } from "./utils"; export function createEmitHost(allProjectFiles: string[], tsLibFiles: string[], options: ts.CompilerOptions) { const getCompilerOptions = () => options; @@ -14,7 +14,7 @@ export function createEmitHost(allProjectFiles: string[], tsLibFiles: string[], const projectFileMap = new Map(allProjectFiles .map((f) => ({ kind: ts.SyntaxKind.SourceFile, fileName: f } as ts.SourceFile)) .map(f => [f.fileName, getNodeId(f)]) - ) + ); const tsLibFileSet = new Set(tsLibFiles); return { @@ -34,7 +34,7 @@ export function createEmitHost(allProjectFiles: string[], tsLibFiles: string[], } return { fileName: ref.fileName, - } + }; }, getSourceFileFromReference(referencingFile, ref) { if(ref.fileName.startsWith("node_modules/") || ref.fileName.indexOf("/node_modules/") !== -1) { @@ -44,7 +44,7 @@ export function createEmitHost(allProjectFiles: string[], tsLibFiles: string[], return; } let resolvedFile: string | undefined = resolvePath(getDirectoryPath(referencingFile.fileName), ref.fileName); - let resolvedFileId = projectFileMap.get(resolvedFile) + let resolvedFileId = projectFileMap.get(resolvedFile); if(!hasExtension(resolvedFile) && resolvedFileId == undefined) { [resolvedFile, resolvedFileId] = Object.values(ts.Extension) .map(e => resolvedFile + e) @@ -56,13 +56,13 @@ export function createEmitHost(allProjectFiles: string[], tsLibFiles: string[], if(!projectFileMap.has(resolvedFile)) { return undefined; } - const resolvedDeclarationFile = + const resolvedDeclarationFile = isDeclarationFile(resolvedFile) ? resolvedFile : - changeExtension(resolvedFile, getDeclarationExtension(resolvedFile)) - return { + changeExtension(resolvedFile, getDeclarationExtension(resolvedFile)); + return { fileName: getRelativePathFromDirectory(getDirectoryPath(referencingFile.fileName), resolvedDeclarationFile, false), id: resolvedFileId, }; }, - } as Partial as IsolatedEmitHost + } as Partial as IsolatedEmitHost; } \ No newline at end of file diff --git a/external-declarations/src/compiler/emit-resolver.ts b/external-declarations/src/compiler/emit-resolver.ts index a8cb67a499a09..1c8cc3e8c213c 100644 --- a/external-declarations/src/compiler/emit-resolver.ts +++ b/external-declarations/src/compiler/emit-resolver.ts @@ -1,27 +1,28 @@ -import { Node, VariableDeclaration, PropertyDeclaration, PropertySignature, ParameterDeclaration, Declaration, getCombinedModifierFlags, isParameterPropertyDeclaration, isVariableDeclaration, ModifierFlags, getCombinedNodeFlags, NodeFlags, VariableDeclarationList, isLiteralExpression, isIdentifier, BindingPattern, isSourceFile, SyntaxKind, findAncestor, SourceFile, EntityNameOrEntityNameExpression, isBindingElement, isVariableStatement, SymbolFlags, __String, ImportClause, ImportEqualsDeclaration, ImportSpecifier, NamespaceImport, isFunctionLike, getNameOfDeclaration, DeclarationName, isElementAccessExpression, isPropertyAccessExpression, FunctionLikeDeclaration, CompilerOptions, isGetAccessor, isSetAccessor, ResolutionMode } from "typescript"; +import { __String, BindingPattern, CompilerOptions, Declaration, DeclarationName, EntityNameOrEntityNameExpression, findAncestor, FunctionLikeDeclaration, getCombinedModifierFlags, getCombinedNodeFlags, getNameOfDeclaration, ImportClause, ImportEqualsDeclaration, ImportSpecifier, isBindingElement, isElementAccessExpression, isFunctionLike, isGetAccessor, isIdentifier, isLiteralExpression, isParameterPropertyDeclaration, isPropertyAccessExpression, isSetAccessor, isSourceFile, isVariableDeclaration, isVariableStatement, ModifierFlags, NamespaceImport, Node, NodeFlags, ParameterDeclaration, PropertyDeclaration, PropertySignature, ResolutionMode,SourceFile, SymbolFlags, SyntaxKind, VariableDeclaration, VariableDeclarationList } from "typescript"; + import { Debug } from "./debug"; import { BasicSymbol, bindSourceFile } from "./emit-binder"; import { appendIfUnique, emptyArray, every, filter } from "./lang-utils"; -import { IsolatedEmitResolver, LateBoundDeclaration, LateVisibilityPaintedStatement, SymbolAccessibility, SymbolVisibilityResult, _Symbol } from "./types"; -import { isBindingPattern, isExternalModuleAugmentation, hasEffectiveModifier, hasSyntacticModifier, isInJSFile, isLateVisibilityPaintedStatement, isThisIdentifier, getFirstIdentifier, isPartOfTypeNode, AnyImportSyntax, hasDynamicName, skipParentheses, nodeIsPresent, isAmbientDeclaration } from "./utils"; +import { _Symbol,IsolatedEmitResolver, LateBoundDeclaration, LateVisibilityPaintedStatement, SymbolAccessibility, SymbolVisibilityResult } from "./types"; +import { AnyImportSyntax, getFirstIdentifier, hasDynamicName, hasEffectiveModifier, hasSyntacticModifier, isAmbientDeclaration,isBindingPattern, isExternalModuleAugmentation, isInJSFile, isLateVisibilityPaintedStatement, isPartOfTypeNode, isThisIdentifier, nodeIsPresent, skipParentheses } from "./utils"; export function createEmitResolver(file: SourceFile, options: CompilerOptions, packageModuleType: ResolutionMode): IsolatedEmitResolver { const { getNodeLinks, resolveName } = bindSourceFile(file, options, packageModuleType); - + function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration): boolean { if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node)) { // TODO: Make sure this is a valid approximation for literal types - return !node.type && 'initializer' in node && !!node.initializer && isLiteralExpression(node.initializer); - // Original TS version + return !node.type && "initializer" in node && !!node.initializer && isLiteralExpression(node.initializer); + // Original TS version // return isFreshLiteralType(getTypeOfSymbol(getSymbolOfNode(node))); } return false; } - + function isIdentifierComputedName(name: DeclarationName | undefined): boolean { if (!name) return false; if (!(name.kind === SyntaxKind.ComputedPropertyName || name.kind === SyntaxKind.ElementAccessExpression)) { @@ -33,22 +34,22 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p } return isIdentifier(expr); } - + return { isSyntheticTypeEquivalent(actualTypeNode, typeNode, message) { - return true + return true; }, isDeclarationVisible, isLiteralConstDeclaration, createLiteralConstValue(node) { - if('initializer' in node && node.initializer) { + if("initializer" in node && node.initializer) { return node.initializer; } Debug.fail(); - }, + }, isLateBound(node): node is LateBoundDeclaration { const name = getNameOfDeclaration(node); - return !hasDynamicName(node) || isIdentifierComputedName(name) + return !hasDynamicName(node) || isIdentifierComputedName(name); }, getPropertiesOfContainerFunction(node: Declaration) { return []; @@ -69,7 +70,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p // return emptyArray; // } 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). @@ -86,7 +87,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p 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 = node.symbol; @@ -136,7 +137,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p isImportRequiredByAugmentation() { return false; }, - } + }; function isDeclarationReadonly(declaration: Declaration): boolean { @@ -345,7 +346,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p if (symbol && symbol.flags & SymbolFlags.TypeParameter && meaning & SymbolFlags.Type) { return { accessibility: SymbolAccessibility.Accessible }; } - if (!symbol && isThisIdentifier(firstIdentifier) + if (!symbol && isThisIdentifier(firstIdentifier) // TODO: isolatedDeclarations: Just assume this is accessible // && isSymbolAccessible(getSymbolOfNode(getThisContainer(firstIdentifier, /*includeArrowFunctions*/ false)), firstIdentifier, meaning, /*computeAliases*/ false).accessibility === SymbolAccessibility.Accessible ) { @@ -356,10 +357,10 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p // Verify if the symbol is accessible return (symbol && hasVisibleDeclarations(symbol, /*shouldComputeAliasToMakeVisible*/ true)) || { - // TODO: isolatedDeclarations: In TS this would be an inaccessible symbol, but TS will give errors we just transform + // TODO: isolatedDeclarations: In TS this would be an inaccessible symbol, but TS will give errors we just transform // We don't actually keep enough information for full accessibility, // We just do this to mark accessible imports - accessibility: SymbolAccessibility.Accessible, + accessibility: SymbolAccessibility.Accessible, errorSymbolName: firstIdentifier.text, errorNode: firstIdentifier }; diff --git a/external-declarations/src/compiler/lang-utils.ts b/external-declarations/src/compiler/lang-utils.ts index 86de2ee69c95b..a6179092f576b 100644 --- a/external-declarations/src/compiler/lang-utils.ts +++ b/external-declarations/src/compiler/lang-utils.ts @@ -112,10 +112,10 @@ export function stringContains(str: string, substring: string): boolean { } /** - * @return Whether the value was added. - * - * @internal - */ + * @return Whether the value was added. + * + * @internal + */ export function pushIfUnique(array: T[], toAdd: T, equalityComparer?: EqualityComparer): boolean { if (contains(array, toAdd, equalityComparer)) { return false; @@ -154,7 +154,7 @@ export function length(array: readonly any[] | undefined): number { return array ? array.length : 0; } - + /** * Flattens an array containing a mix of array or non-array elements. * @@ -219,7 +219,7 @@ export function length(array: readonly any[] | undefined): number { } return to; } - + /** * Gets the actual offset into an array for a relative offset. Negative offsets indicate a * position offset from the end of the array. @@ -245,7 +245,7 @@ export function map(array: readonly T[] | undefined, f: (x: T, i: number) return result; } - + /** * Compacts an array, removing any falsey elements. @@ -278,7 +278,7 @@ export function map(array: readonly T[] | undefined, f: (x: T, i: number) } return result || array; } - + /** @internal */ export const emptyArray: never[] = [] as never[]; @@ -311,7 +311,7 @@ export const emptyArray: never[] = [] as never[]; to.push(value); return to; } - + /** Array that is only intended to be pushed to, never read. */ export interface Push { push(...values: T[]): void; @@ -357,7 +357,7 @@ function stableSortIndices(array: readonly T[], indices: number[], comparer: } return undefined; } - + /** * Returns the last element of an array if non-empty, `undefined` otherwise. @@ -535,7 +535,7 @@ export function mapDefined(array: readonly T[] | undefined, mapFn: (x: T, } return result; } - + /** @internal */ export function startsWith(str: string, prefix: string): boolean { return str.lastIndexOf(prefix, 0) === 0; diff --git a/external-declarations/src/compiler/path-utils.ts b/external-declarations/src/compiler/path-utils.ts index ad066230366b8..3f69872e2c38c 100644 --- a/external-declarations/src/compiler/path-utils.ts +++ b/external-declarations/src/compiler/path-utils.ts @@ -1,6 +1,7 @@ import { Extension, Path } from "typescript"; + import { Debug } from "./debug"; -import { stringContains, identity, startsWith, equateStringsCaseSensitive, some, Comparison, compareValues, endsWith, lastOrUndefined, equateStringsCaseInsensitive, compareStringsCaseInsensitive, compareStringsCaseSensitive, getStringComparer, toLowerCase } from "./lang-utils"; +import { compareStringsCaseInsensitive, compareStringsCaseSensitive, compareValues, Comparison, endsWith, equateStringsCaseInsensitive, equateStringsCaseSensitive, getStringComparer, identity, lastOrUndefined, some, startsWith, stringContains, toLowerCase } from "./lang-utils"; import { CharacterCodes, GetCanonicalFileName } from "./types"; /** @@ -862,7 +863,7 @@ export function isDeclarationFile(f: string) { || /\.d\.[A-z]{1,5}\.ts$/.exec(f); } export function isJavaScriptFile(f: string) { - return f.endsWith(Extension.Js) + return f.endsWith(Extension.Js) || f.endsWith(Extension.Jsx) || f.endsWith(Extension.Cjs) || f.endsWith(Extension.Mjs); @@ -874,5 +875,5 @@ export function getDeclarationExtension(path: string) { path.endsWith(Extension.Mjs) || path.endsWith(Extension.Mts) ? Extension.Dmts: path.endsWith(Extension.Cjs) || path.endsWith(Extension.Cts) ? Extension.Dcts: Extension.Dts - ) + ); } \ No newline at end of file diff --git a/external-declarations/src/compiler/perf-tracer.ts b/external-declarations/src/compiler/perf-tracer.ts index bca82731b1f7e..3e8a65ae8471e 100644 --- a/external-declarations/src/compiler/perf-tracer.ts +++ b/external-declarations/src/compiler/perf-tracer.ts @@ -1,4 +1,4 @@ -export let tracer: { +export const tracer: { current: undefined | { times: Record; increment(name: string): void; @@ -21,9 +21,9 @@ export function installTracer() { times[name] = (times[name] ?? 0) + 1; }, end(name: string) { - times[name] = (times[name] ?? 0) + + times[name] = (times[name] ?? 0) + (Date.now() - (startTimes[name] ?? Date.now())); startTimes[name] = undefined; }, - } -}; \ No newline at end of file + }; +} \ No newline at end of file diff --git a/external-declarations/src/compiler/transform-file.ts b/external-declarations/src/compiler/transform-file.ts index 4f2cf1af91aad..7b1e42986bea9 100644 --- a/external-declarations/src/compiler/transform-file.ts +++ b/external-declarations/src/compiler/transform-file.ts @@ -1,47 +1,45 @@ -import * as ts from 'typescript' +import * as ts from "typescript"; +import { SourceFile } from "typescript"; -import { createEmitHost } from './emit-host'; -import { createEmitResolver } from './emit-resolver'; -import { TransformationContext } from './types'; -import { tracer } from './perf-tracer'; -import { SourceFile } from 'typescript'; +import { createEmitHost } from "./emit-host"; +import { createEmitResolver } from "./emit-resolver"; +import { tracer } from "./perf-tracer"; +import { TransformationContext } from "./types"; -const transformDeclarations: (context: TransformationContext) => { - (node: SourceFile): SourceFile; -} = (ts as any).transformDeclarations +const transformDeclarations: (context: TransformationContext) => (node: SourceFile) => SourceFile = (ts as any).transformDeclarations; export function transformFile(sourceFile: ts.SourceFile, allProjectFiles: string[], tsLibFiles: string[], options: ts.CompilerOptions, moduleType: ts.ResolutionMode) { - + const getCompilerOptions = () => options; - tracer.current?.start("bind") + tracer.current?.start("bind"); const emitResolver = createEmitResolver(sourceFile, options, moduleType); const emitHost = createEmitHost(allProjectFiles, tsLibFiles, options); - tracer.current?.end("bind") - const diagnostics: ts.Diagnostic[] = [] + tracer.current?.end("bind"); + const diagnostics: ts.Diagnostic[] = []; const x = transformDeclarations({ getEmitHost() { return emitHost; - }, + }, getEmitResolver() { return emitResolver; - }, + }, getCompilerOptions, factory: ts.factory, addDiagnostic(diag) { - diagnostics.push(diag) + diagnostics.push(diag); }, - } as Partial as TransformationContext) - tracer.current?.start("transform") - let result = x(sourceFile); + } as Partial as TransformationContext); + tracer.current?.start("transform"); + const result = x(sourceFile); tracer.current?.end("transform"); - tracer.current?.start("print") + tracer.current?.start("print"); const printer = ts.createPrinter({ onlyPrintJsDocStyle: true, newLine: options.newLine ?? ts.NewLineKind.CarriageReturnLineFeed, target: options.target, - } as ts.PrinterOptions) + } as ts.PrinterOptions); try { return { @@ -50,6 +48,6 @@ export function transformFile(sourceFile: ts.SourceFile, allProjectFiles: string }; } finally { - tracer.current?.end("print") + tracer.current?.end("print"); } } diff --git a/external-declarations/src/compiler/transform-project.ts b/external-declarations/src/compiler/transform-project.ts index 5675d5db0acfe..a841aa4a6949c 100644 --- a/external-declarations/src/compiler/transform-project.ts +++ b/external-declarations/src/compiler/transform-project.ts @@ -1,12 +1,13 @@ import * as path from "path"; import * as ts from "typescript"; -import { normalizePath, changeAnyExtension } from "./path-utils"; -import { transformFile } from "./transform-file"; + +import { changeAnyExtension,normalizePath } from "./path-utils"; import { tracer } from "./perf-tracer"; +import { transformFile } from "./transform-file"; -export type CancellationToken = { isCancelled: boolean }; +export interface CancellationToken { isCancelled: boolean } export function transformProject( projectPath: string, files: string[] | undefined, @@ -14,50 +15,51 @@ export function transformProject( host: ts.CompilerHost, cancellationToken: CancellationToken ) { - tracer.current?.start("readFiles") + tracer.current?.start("readFiles"); const rootDir = options.rootDir ? normalizePath(path.resolve(path.join(projectPath, options.rootDir))) : normalizePath(projectPath); files ??= host.readDirectory!(rootDir, [".ts", ".tsx"], ["**/*.d.ts"], []); - tracer.current?.end("readFiles") + tracer.current?.end("readFiles"); transformProjectFiles(rootDir, files, host, options, cancellationToken); - return rootDir + return rootDir; } function ensureDirRecursive(dirPath: string, host: ts.CompilerHost) { if(!host.directoryExists!(dirPath)) { - let parent = path.dirname(dirPath); + const parent = path.dirname(dirPath); ensureDirRecursive(parent, host); - (host as any).createDirectory(dirPath) + (host as any).createDirectory(dirPath); } } function joinToRootIfNeeded(rootDir: string, existingPath: string) { return normalizePath(path.isAbsolute(existingPath) ? existingPath : path.resolve(path.join(rootDir, existingPath))); } export function transformProjectFiles(rootDir: string, files: string[], host: ts.CompilerHost, options: ts.CompilerOptions, cancellationToken: CancellationToken) { - - const declarationDir = + + const declarationDir = options.declarationDir? joinToRootIfNeeded(rootDir, options.declarationDir) : options.outDir? joinToRootIfNeeded(rootDir,options.outDir) : undefined; - for (let file of files.map(normalizePath)) { + for (const file of files.map(normalizePath)) { try { - tracer.current?.start("parse") + tracer.current?.start("parse"); const source = host.getSourceFile(file, options.target ?? ts.ScriptTarget.ES2015); - tracer.current?.end("parse") + tracer.current?.end("parse"); if(cancellationToken.isCancelled) return; if(!source) continue; const actualDeclaration = transformFile(source, [], [], options, ts.ModuleKind.ESNext); - const output = + const output = declarationDir? changeAnyExtension(file.replace(rootDir, declarationDir), ".d.ts"): changeAnyExtension(file, ".d.ts"); const dirPath = path.dirname(output); - ensureDirRecursive(dirPath, host) - tracer.current?.start("write") + ensureDirRecursive(dirPath, host); + tracer.current?.start("write"); host.writeFile(output, actualDeclaration.code, false); - tracer.current?.end("write") - } catch (e) { - console.error(`Failed to transform: ${file}`, e) + tracer.current?.end("write"); + } + catch (e) { + console.error(`Failed to transform: ${file}`, e); } } return { rootDir }; diff --git a/external-declarations/src/compiler/types.ts b/external-declarations/src/compiler/types.ts index 87f51eefa2d13..552c4ddf0936f 100644 --- a/external-declarations/src/compiler/types.ts +++ b/external-declarations/src/compiler/types.ts @@ -1,4 +1,5 @@ -import { Symbol, ClassDeclaration, CompilerOptions, DiagnosticWithLocation, EnumDeclaration, FunctionDeclaration, InterfaceDeclaration, ModuleDeclaration, Node, SourceFile, SymbolFlags, TransformationContext as _TransformationContext, TypeAliasDeclaration, VariableStatement, Declaration, ElementAccessExpression, EntityNameOrEntityNameExpression, Expression, ImportDeclaration, ParameterDeclaration, PropertyDeclaration, PropertySignature, SignatureDeclaration, StringLiteralLike, TypeNode, VariableDeclaration, ModuleBlock, BinaryExpression, ComputedPropertyName, NamedDeclaration, ParenthesizedExpression, AsExpression, NonNullExpression, PartiallyEmittedExpression, SatisfiesExpression, TypeAssertion, EntityNameExpression, ModifierFlags, UnparsedSource, FileReference, DiagnosticMessage, Diagnostic, ResolutionMode } from "typescript"; +import { AsExpression, BinaryExpression, ClassDeclaration, CompilerOptions, ComputedPropertyName, Declaration, Diagnostic, DiagnosticMessage, DiagnosticWithLocation, ElementAccessExpression, EntityNameExpression, EntityNameOrEntityNameExpression, EnumDeclaration, Expression, FileReference, FunctionDeclaration, ImportDeclaration, InterfaceDeclaration, ModifierFlags, ModuleBlock, ModuleDeclaration, NamedDeclaration, Node, NonNullExpression, ParameterDeclaration, ParenthesizedExpression, PartiallyEmittedExpression, PropertyDeclaration, PropertySignature, ResolutionMode,SatisfiesExpression, SignatureDeclaration, SourceFile, StringLiteralLike, Symbol, SymbolFlags, TransformationContext as _TransformationContext, TypeAliasDeclaration, TypeAssertion, TypeNode, UnparsedSource, VariableDeclaration, VariableStatement } from "typescript"; + import { AnyImportSyntax } from "./utils"; @@ -17,7 +18,7 @@ export interface TransformationContext extends _TransformationContext { } export interface IsolatedEmitHost extends ModuleSpecifierResolutionHost, ResolveModuleNameResolutionHost { - getCommonSourceDirectory(): string + getCommonSourceDirectory(): string getCompilerOptions(): CompilerOptions getSourceFiles(): SourceFile[] /** @internal */ getSourceFileFromReference(referencingFile: SourceFile | UnparsedSource, ref: FileReference): SourceFile | undefined; @@ -65,7 +66,7 @@ export interface SymbolTracker { /** @internal */ interface ModuleSpecifierResolutionHost { - + } /** @internal */ @@ -270,9 +271,9 @@ interface LateBoundName extends ComputedPropertyName { } -export type _Symbol = Symbol -type _ModifierFlags = ModifierFlags -declare module 'typescript' { +export type _Symbol = Symbol; +type _ModifierFlags = ModifierFlags; +declare module "typescript" { interface Node { symbol: _Symbol; original: this; @@ -282,6 +283,6 @@ declare module 'typescript' { isReferenced: boolean; parent: _Symbol; } - + } diff --git a/external-declarations/src/compiler/utils.ts b/external-declarations/src/compiler/utils.ts index f604494cd8872..be7b0b3e3c61e 100644 --- a/external-declarations/src/compiler/utils.ts +++ b/external-declarations/src/compiler/utils.ts @@ -1,4 +1,5 @@ -import { SourceFile, SyntaxKind, Node, DeclarationName, isExpressionWithTypeArguments, isParameter, QualifiedName, ExpressionWithTypeArguments, FunctionDeclaration, ImportEqualsDeclaration, PropertyAccessExpression, TypeAliasDeclaration, TypeParameterDeclaration, NamedDeclaration, NodeFlags, ClassLikeDeclaration, ModifierFlags, ClassDeclaration, EnumDeclaration, InterfaceDeclaration, ModuleDeclaration, VariableStatement, ImportDeclaration, SignatureDeclaration, Identifier, isModuleDeclaration, isSourceFile, Declaration, getNameOfDeclaration, isElementAccessExpression, BindingPattern, ImportTypeNode, OuterExpressionKinds, Expression, isStringLiteralLike, isNumericLiteral, NumericLiteral, StringLiteralLike, getJSDocTypeTag, isParenthesizedExpression, CompilerOptions, Extension, ModuleKind, isIdentifier, ModuleResolutionKind, JsxEmit, isPrefixUnaryExpression, PrefixUnaryExpression, canHaveModifiers, ModifierLike, getJSDocPublicTag, getJSDocPrivateTag, getJSDocProtectedTag, getJSDocOverrideTagNoCache, getJSDocReadonlyTag, getJSDocDeprecatedTag, ScriptTarget, EntityNameOrEntityNameExpression, isHeritageClause, CallExpression, FunctionLikeDeclaration, HasType, JSDocTemplateTag, TypeAssertion, TsConfigSourceFile, PrinterOptions, NewLineKind, sys, isVariableStatement } from "typescript"; +import { BindingPattern, CallExpression, canHaveModifiers, ClassDeclaration, ClassLikeDeclaration, CompilerOptions, Declaration, DeclarationName, EntityNameOrEntityNameExpression, EnumDeclaration, Expression, ExpressionWithTypeArguments, Extension, FunctionDeclaration, FunctionLikeDeclaration, getJSDocDeprecatedTag, getJSDocOverrideTagNoCache, getJSDocPrivateTag, getJSDocProtectedTag, getJSDocPublicTag, getJSDocReadonlyTag, getJSDocTypeTag, getNameOfDeclaration, HasType, Identifier, ImportDeclaration, ImportEqualsDeclaration, ImportTypeNode, InterfaceDeclaration, isElementAccessExpression, isExpressionWithTypeArguments, isHeritageClause, isIdentifier, isModuleDeclaration, isNumericLiteral, isParameter, isParenthesizedExpression, isPrefixUnaryExpression, isSourceFile, isStringLiteralLike, isVariableStatement,JSDocTemplateTag, JsxEmit, ModifierFlags, ModifierLike, ModuleDeclaration, ModuleKind, ModuleResolutionKind, NamedDeclaration, NewLineKind, Node, NodeFlags, NumericLiteral, OuterExpressionKinds, PrefixUnaryExpression, PrinterOptions, PropertyAccessExpression, QualifiedName, ScriptTarget, SignatureDeclaration, SourceFile, StringLiteralLike, SyntaxKind, sys, TsConfigSourceFile, TypeAliasDeclaration, TypeAssertion, TypeParameterDeclaration, VariableStatement } from "typescript"; + import { Debug } from "./debug"; import { clone, contains, flatten, some } from "./lang-utils"; import { fileExtensionIs, fileExtensionIsOneOf } from "./path-utils"; @@ -8,7 +9,7 @@ import { AmbientModuleDeclaration, DynamicNamedBinaryExpression, DynamicNamedDec export function isInJSFile(node: Node | undefined): boolean { return !!node && !!(node.flags & NodeFlags.JavaScriptFile); } - + // Returns true if this node is missing from the actual source code. A 'missing' node is different // from 'undefined/defined'. When a node is undefined (which can happen for optional nodes @@ -181,7 +182,7 @@ function identifierIsThisKeyword(id: Identifier): boolean { let nextNodeId = 0; /** @internal */ -export function getNodeId(node: Node): number +export function getNodeId(node: Node): number; export function getNodeId(node: any): number { if (!node.id) { nextNodeId++; @@ -612,7 +613,7 @@ export function getNewLineCharacter(options: CompilerOptions | PrinterOptions, g export function isAmbientDeclaration(node: Node) { // @ts-expect-error NodeFlags.Ambient is not exposed - return node.flags & NodeFlags.Ambient + return node.flags & NodeFlags.Ambient; } export function isEnumConst(node: EnumDeclaration): boolean { diff --git a/external-declarations/src/main.ts b/external-declarations/src/main.ts index 43bb12c2b59f0..3a357e303b997 100644 --- a/external-declarations/src/main.ts +++ b/external-declarations/src/main.ts @@ -1,10 +1,11 @@ -import * as ts from 'typescript' -import * as fs from 'fs' -import * as path from 'path' -import { ArgType, parseArgs } from './utils/cli-parser'; -import { normalizePath } from './compiler/path-utils'; -import { CancellationToken, transformProject } from './compiler/transform-project'; -import { installTracer, tracer } from './compiler/perf-tracer'; +import * as fs from "fs"; +import * as path from "path"; +import * as ts from "typescript"; + +import { normalizePath } from "./compiler/path-utils"; +import { installTracer, tracer } from "./compiler/perf-tracer"; +import { CancellationToken, transformProject } from "./compiler/transform-project"; +import { ArgType, parseArgs } from "./utils/cli-parser"; (ts as any).Debug.enableDebugInfo(); @@ -30,21 +31,22 @@ printUsageOnErrors(); let projectConfig = normalizePath(path.resolve(parsedArgs.project)); if (path.extname(projectConfig) !== ".json") { - projectConfig = normalizePath(path.join(projectConfig, "tsconfig.json")) + projectConfig = normalizePath(path.join(projectConfig, "tsconfig.json")); } -let watched: Array<{ +let watched: { watcher: fs.FSWatcher, path: string, -}> = []; +}[] = []; function watch(rootDir: string) { if (parsedArgs.watch) { - let newWatched: Array; + let newWatched: string[]; if (parsedArgs.default) { newWatched = parsedArgs.default; - } else { + } + else { newWatched = [rootDir]; } if(watched.length != newWatched.length || !watched.every((v, index) => v.path === newWatched[index])) { @@ -52,17 +54,17 @@ function watch(rootDir: string) { watched = newWatched.map(f => ({ path: f, watcher: fs.watch(f, { persistent: true, recursive: true }, cancelAndRestart), - })) + })); } - + } } -let lastRunCancellation:CancellationToken = { isCancelled: false } -async function delay(ms:number) { +let lastRunCancellation: CancellationToken = { isCancelled: false }; +async function delay(ms: number) { return new Promise(r => setTimeout(r, ms)); } function cancelAndRestart(event: fs.WatchEventType, filename: string) { - console.log(event, filename) + console.log(event, filename); lastRunCancellation.isCancelled = true; lastRunCancellation = { isCancelled: false }; main(lastRunCancellation, 50); @@ -71,9 +73,9 @@ async function main(cancellationToken: CancellationToken, msDelay: number) { await delay(msDelay); if(cancellationToken.isCancelled) return; - console.log("Detected changes rebuilding") + console.log("Detected changes rebuilding"); - installTracer() + installTracer(); const tsconfig = ts.readConfigFile(projectConfig, ts.sys.readFile); const parsed = ts.parseJsonConfigFileContent(tsconfig.config, ts.sys, "./"); const options = parsed.options; @@ -81,7 +83,7 @@ async function main(cancellationToken: CancellationToken, msDelay: number) { options.declarationDir = parsedArgs.declarationDir; } const host = ts.createCompilerHost(options, true); - const rootDir = await transformProject(path.dirname(projectConfig), undefined, options, host, cancellationToken) + const rootDir = await transformProject(path.dirname(projectConfig), undefined, options, host, cancellationToken); console.log(tracer.current?.times); watch(rootDir); if(cancellationToken.isCancelled) return; diff --git a/external-declarations/src/test-runner/cli-arg-config.ts b/external-declarations/src/test-runner/cli-arg-config.ts index 07d00c7cf8ad2..b60e7476a0faa 100644 --- a/external-declarations/src/test-runner/cli-arg-config.ts +++ b/external-declarations/src/test-runner/cli-arg-config.ts @@ -1,4 +1,4 @@ -import { parserConfiguration, ArgType } from "../utils/cli-parser"; +import { ArgType,parserConfiguration } from "../utils/cli-parser"; export const testRunnerCLIConfiguration = parserConfiguration({ default: { @@ -14,4 +14,4 @@ export const testRunnerCLIConfiguration = parserConfiguration({ histFolder: ArgType.String(), libPath: ArgType.String(), rootPaths: ArgType.StringArray(), -}) +}); diff --git a/external-declarations/src/test-runner/excluded-ts-tests.ts b/external-declarations/src/test-runner/excluded-ts-tests.ts index 257e34e69c4d7..5eb7b7ef2c965 100644 --- a/external-declarations/src/test-runner/excluded-ts-tests.ts +++ b/external-declarations/src/test-runner/excluded-ts-tests.ts @@ -4,7 +4,7 @@ export const excludedTsTests = new Set([ // TS will error on this and will not merge the overloads to a singe symbol // This means TS will not remove the implementation overload // - // The external declaration emitter will use the variable name to merge symbols. + // The external declaration emitter will use the variable name to merge symbols. "computedPropertyNamesOnOverloads_ES5", "computedPropertyNamesOnOverloads_ES6", // Symbols are merged across files and excluded. We can't do cross file analysis @@ -12,10 +12,10 @@ export const excludedTsTests = new Set([ "jsFileCompilationDuplicateFunctionImplementationFileOrderReversed", // Output emitted to same file test ios not of interest for isolated declarations "filesEmittingIntoSameOutput", - // Error in TS, but excludes implementation in declarations. + // Error in TS, but excludes implementation in declarations. // Generating same output if we have an error is best effort "overloadsInDifferentContainersDisagreeOnAmbient", // The function is elided because the eval function is merged with eval from libs into a single symbol - // We can't reproduce this behavior + // We can't reproduce this behavior "parserStrictMode8", ]); \ No newline at end of file diff --git a/external-declarations/src/test-runner/parallel-run.ts b/external-declarations/src/test-runner/parallel-run.ts index 25bb719337e4f..7707217f14f5f 100644 --- a/external-declarations/src/test-runner/parallel-run.ts +++ b/external-declarations/src/test-runner/parallel-run.ts @@ -1,9 +1,10 @@ -import * as path from 'path' import * as childProcess from "child_process"; -import { parseArgs } from '../utils/cli-parser'; -import { testRunnerCLIConfiguration } from './cli-arg-config'; +import * as path from "path"; -type ExecuteResult = { +import { parseArgs } from "../utils/cli-parser"; +import { testRunnerCLIConfiguration } from "./cli-arg-config"; + +interface ExecuteResult { error: childProcess.ExecException | null stdout: string, stderr: string, @@ -17,37 +18,38 @@ function exec(cmd: string, dir: string, onStdOut: (s: string) => void) { cwd: path.resolve(path.join(process.cwd(), dir)), shell: true }); - let stdout = "" - let stderr = "" - ls.stdout.on('data', function (data) { - if(!onStdOut) { + let stdout = ""; + let stderr = ""; + ls.stdout.on("data", function (data) { + if(!onStdOut) { process.stdout.write(data.toString()); - } else { + } + else { onStdOut(data.toString()); } stdout += data.toString(); }); - ls.stderr.on('data', function (data) { + ls.stderr.on("data", function (data) { process.stderr.write(data.toString()); stderr += data.toString(); }); - ls.on('error', function(err) { + ls.on("error", function (err) { console.log(err); - }) - ls.on('exit', function (code) { - console.log('exited:' + code?.toString()); + }); + ls.on("exit", function (code) { + console.log("exited:" + code?.toString()); resolve({ error: !code ? null : Object.assign(new Error(""), { code, - cmd: cmd, + cmd, }), stderr, stdout - }) + }); }); - }) + }); } const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), testRunnerCLIConfiguration); @@ -62,12 +64,12 @@ async function main() { const commandLine = `node ./build/test-runner/test-runner-main.js --histFolder=${histFolder} ${process.argv.slice(2).join(" ")} `; let lastWrite = new Date().getTime(); const startTime = new Date().getTime(); - const elapsedTime = (now: number) => `${((now - startTime) / 1000 / 60).toFixed(2)} minutes` + const elapsedTime = (now: number) => `${((now - startTime) / 1000 / 60).toFixed(2)} minutes`; const promisees = Array.from({ length: shardCount}).map(async (_, index) => { await exec(commandLine + ` --shard=${index}`, "./", out => { runCount += (out.match(/Ran:/g) || []).length; if(new Date().getTime() - lastWrite > 2000) { - lastWrite = new Date().getTime() + lastWrite = new Date().getTime(); console.log(`Run count: ${runCount} after ${elapsedTime(lastWrite)}`); } }); @@ -75,7 +77,7 @@ async function main() { }); await Promise.all(promisees); const endTime = new Date().getTime(); - console.log(`Took ${elapsedTime(endTime)} to complete ${runCount}`) + console.log(`Took ${elapsedTime(endTime)} to complete ${runCount}`); } main(); \ No newline at end of file diff --git a/external-declarations/src/test-runner/test-runner-main.ts b/external-declarations/src/test-runner/test-runner-main.ts index 88d52e9a66651..fd86c48684e11 100644 --- a/external-declarations/src/test-runner/test-runner-main.ts +++ b/external-declarations/src/test-runner/test-runner-main.ts @@ -1,19 +1,20 @@ -import 'source-map-support/register'; -import * as path from 'path' -import * as fs from 'fs/promises' -import { loadTestCase, runTypeScript, runIsolated, FileContent } from "./utils"; -import { IO } from './tsc-infrastructure/io'; -import { changeExtension } from './tsc-infrastructure/vpath'; -import { CompilerSettings, TestCaseContent } from './tsc-infrastructure/test-file-parser'; - -import * as ts from 'typescript' -import { normalizePath, removeExtension } from '../compiler/path-utils'; -import { excludedTsTests } from './excluded-ts-tests'; -import { getFileBasedTestConfigurationDescription, getFileBasedTestConfigurations } from './tsc-infrastructure/vary-by'; -import { setCompilerOptionsFromHarnessSetting } from './tsc-infrastructure/compiler-run'; -import { parseArgs } from '../utils/cli-parser'; -import { testRunnerCLIConfiguration } from './cli-arg-config'; -import { addToQueue, ensureDir, flushQueue, readAllFiles } from '../utils/fs-utils'; +import "source-map-support/register"; + +import * as fs from "fs/promises"; +import * as path from "path"; +import * as ts from "typescript"; + +import { normalizePath, removeExtension } from "../compiler/path-utils"; +import { parseArgs } from "../utils/cli-parser"; +import { addToQueue, ensureDir, flushQueue, readAllFiles } from "../utils/fs-utils"; +import { testRunnerCLIConfiguration } from "./cli-arg-config"; +import { excludedTsTests } from "./excluded-ts-tests"; +import { setCompilerOptionsFromHarnessSetting } from "./tsc-infrastructure/compiler-run"; +import { IO } from "./tsc-infrastructure/io"; +import { CompilerSettings, TestCaseContent } from "./tsc-infrastructure/test-file-parser"; +import { getFileBasedTestConfigurationDescription, getFileBasedTestConfigurations } from "./tsc-infrastructure/vary-by"; +import { changeExtension } from "./tsc-infrastructure/vpath"; +import { FileContent,loadTestCase, runIsolated, runTypeScript } from "./utils"; const excludeFilter =/\/fourslash\//; @@ -22,21 +23,21 @@ const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2 printUsageOnErrors(); -const shard = parsedArgs.shard -const shardCount = parsedArgs.shardCount -let prefix: string | undefined = undefined; +const shard = parsedArgs.shard; +const shardCount = parsedArgs.shardCount; +let prefix: string | undefined; const prefixed = parsedArgs.default && /(?[0-9]{5})-(((?.*)\.(?(.*=.*)+)(\.d\.ts))|(?.*))/.exec(parsedArgs.default); -let testVersionFilter: string | undefined = undefined; +let testVersionFilter: string | undefined; if(prefixed) { prefix = prefixed.groups?.index; parsedArgs.default = prefixed.groups?.name ?? prefixed.groups?.nameSimple; testVersionFilter = prefixed.groups?.options; } -const rootCasePaths = parsedArgs.rootPaths ?? [ './tests/source' ] -const libFolder = parsedArgs.libPath ?? path.join(rootCasePaths[0], "../lib") +const rootCasePaths = parsedArgs.rootPaths ?? [ "./tests/source" ]; +const libFolder = parsedArgs.libPath ?? path.join(rootCasePaths[0], "../lib"); -const filter = parsedArgs.default ? new RegExp(parsedArgs.default) : /.*\.ts/ +const filter = parsedArgs.default ? new RegExp(parsedArgs.default) : /.*\.ts/; const runType = parsedArgs.type === "all" ? { tsc: true, isolated: true } : parsedArgs.type === "tsc" ? { tsc: true, isolated: false } : @@ -52,7 +53,7 @@ const allTests = rootCasePaths const date = new Date(); const historical = (parsedArgs.histFolder && `/${parsedArgs.histFolder}/`) ?? `/${date.toISOString().replace(/:/g, "-")}-${parsedArgs.type}/`; -function pad(num: number, size: number) { return ('000000000' + num).substr(-size); } +function pad(num: number, size: number) { return ("000000000" + num).substr(-size); } async function main() { @@ -75,20 +76,20 @@ async function main() { const varConfigDescription = getFileBasedTestConfigurationDescription(varConfig); if (testVersionFilter && varConfigDescription !== testVersionFilter) continue; const file = (prefix ?? pad(count, 5)) + "-" + changeExtension(path.basename(testFile), varConfigDescription + ".d.ts"); - + if (runType.tsc) runAndWrite(path.join("./tsc-tests/$now/tsc", file), varConfig, runTypeScript); if (runType.isolated) runAndWrite(path.join("./tsc-tests/$now/isolated", file), varConfig, (t, s) => runIsolated(t, libFiles, s)); } - console.log(` Ran: ${pad(count, 5)}/${allTests.length}`) + console.log(` Ran: ${pad(count, 5)}/${allTests.length}`); function runAndWrite(file: string, varySettings: CompilerSettings, fn: (data: TestCaseContent, opts: ts.CompilerOptions) => FileContent[]) { const settings: ts.CompilerOptions = {}; setCompilerOptionsFromHarnessSetting(data.settings, settings); setCompilerOptionsFromHarnessSetting(varySettings, settings); - + // Not supported delete settings.outFile; delete settings.out; @@ -115,8 +116,9 @@ async function main() { function safeRun(fn: (data: TestCaseContent) => FileContent[]): FileContent[] { try { - return fn(data) - } catch (e) { + return fn(data); + } + catch (e) { return [{ fileName: path.basename(testFile), content: ` @@ -124,7 +126,7 @@ async function main() { message: ${e.message}, ${e.stack}, `, - }] + }]; } } @@ -133,7 +135,7 @@ ${e.stack}, const dirName = path.dirname(fileName); await ensureDir(dirName); await fs.writeFile(fileName, results); - console.log(`Written: ${pad(count, 5)}/${allTests.length}`) + console.log(`Written: ${pad(count, 5)}/${allTests.length}`); }); } } diff --git a/external-declarations/src/test-runner/tsc-infrastructure/collections.ts b/external-declarations/src/test-runner/tsc-infrastructure/collections.ts index dbd518538a657..8adffb7804207 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/collections.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/collections.ts @@ -1,4 +1,4 @@ -import * as ts from '../../compiler/lang-utils' +import * as ts from "../../compiler/lang-utils"; export interface SortOptions { comparer: (a: T, b: T) => number; diff --git a/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts b/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts index 0ce747fb58439..da0990b88785d 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts @@ -1,18 +1,19 @@ import { CompilerOptions, Diagnostic } from "typescript"; import * as ts from "typescript"; -import { startsWith, map, compareStringsCaseSensitive, hasProperty } from "../../compiler/lang-utils"; + +import { compareStringsCaseSensitive, hasProperty,map, startsWith } from "../../compiler/lang-utils"; +import { fileExtensionIs, getNormalizedAbsolutePath, normalizeSlashes, toPath } from "../../compiler/path-utils"; +import { createGetCanonicalFileName } from "../../compiler/path-utils"; +import { cloneCompilerOptions, getEmitScriptTarget } from "../../compiler/utils"; +import * as compiler from "./compiler"; +import * as fakes from "./fakesHosts"; +import { IO } from "./io"; import * as opts from "./options"; +import { parseCustomTypeOption, parseListTypeOption } from "./options"; +import * as documents from "./test-document"; import * as TestCaseParser from "./test-file-parser"; import * as vfs from "./vfs"; import * as vpath from "./vpath"; -import { parseCustomTypeOption, parseListTypeOption } from "./options"; -import { fileExtensionIs, getNormalizedAbsolutePath, normalizeSlashes, toPath } from "../../compiler/path-utils"; -import { cloneCompilerOptions, getEmitScriptTarget } from "../../compiler/utils"; -import * as documents from './test-document'; -import { createGetCanonicalFileName } from "../../compiler/path-utils"; -import * as compiler from './compiler'; -import * as fakes from './fakesHosts'; -import { IO } from "./io"; interface HarnessOptions { useCaseSensitiveFileNames?: boolean; @@ -199,7 +200,7 @@ export namespace Utils { const length = getByteOrderMarkLength(text); return length ? text.slice(length) : text; } - + export function getByteOrderMarkLength(text: string): number { if (text.length >= 1) { const ch0 = text.charCodeAt(0); @@ -210,7 +211,7 @@ export namespace Utils { } return 0; } - + export function addUTF8ByteOrderMark(text: string) { return getByteOrderMarkLength(text) === 0 ? "\u00EF\u00BB\u00BF" + text : text; } diff --git a/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts b/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts index 5d39f71f97045..b325dff0bc261 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts @@ -1,12 +1,13 @@ import * as ts from "typescript"; + import * as lang from "../../compiler/lang-utils"; -import * as vpath from "./vpath"; +import { fileExtensionIs } from "../../compiler/path-utils"; +import { getDeclarationEmitExtensionForPath, getOutputExtension } from "../../compiler/utils"; +import * as collections from "./collections"; +import * as fakes from "./fakesHosts"; import * as documents from "./test-document"; import * as vfs from "./vfs"; -import * as collections from "./collections"; -import * as fakes from './fakesHosts'; -import { getDeclarationEmitExtensionForPath, getOutputExtension } from "../../compiler/utils"; -import { fileExtensionIs } from "../../compiler/path-utils"; +import * as vpath from "./vpath"; /** * Test harness compiler functionality. @@ -260,7 +261,7 @@ export function compileFiles(host: fakes.CompilerHost, rootFiles: string[] | und } if(host.outputs.some(d => d.file === fileName)) return; host.writeFile(fileName, text, writeByteOrderMark); - // @ts-expect-error We use forceDts emit documented flag + // @ts-expect-error We use forceDts emit documented flag }, undefined, undefined,undefined, true); const postErrors = ts.getPreEmitDiagnostics(program); const longerErrors = lang.length(preErrors) > postErrors.length ? preErrors : postErrors; diff --git a/external-declarations/src/test-runner/tsc-infrastructure/fakesHosts.ts b/external-declarations/src/test-runner/tsc-infrastructure/fakesHosts.ts index 4498a0c5641a8..7eb2dedda4f48 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/fakesHosts.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/fakesHosts.ts @@ -1,10 +1,11 @@ -import * as ts from 'typescript'; +import * as ts from "typescript"; + +import { getNewLineCharacter } from "../../compiler/utils"; +import * as collections from "./collections"; +import { Utils } from "./compiler-run"; +import * as documents from "./test-document"; import * as vfs from "./vfs"; import * as vpath from "./vpath"; -import * as collections from './collections' -import * as documents from './test-document' -import { Utils } from './compiler-run'; -import { getNewLineCharacter } from '../../compiler/utils'; /** @@ -18,7 +19,7 @@ import { getNewLineCharacter } from '../../compiler/utils'; newLine?: "\r\n" | "\n"; env?: Record; } - + /** * A fake `ts.System` that leverages a virtual file system. */ @@ -29,10 +30,10 @@ import { getNewLineCharacter } from '../../compiler/utils'; public readonly newLine: string; public readonly useCaseSensitiveFileNames: boolean; public exitCode: number | undefined; - + private readonly _executingFilePath: string | undefined; private readonly _env: Record | undefined; - + constructor(vfs: vfs.FileSystem, { executingFilePath, newLine = "\r\n", env }: SystemOptions = {}) { this.vfs = vfs.isReadonly ? vfs.shadow() : vfs; this.useCaseSensitiveFileNames = !this.vfs.ignoreCase; @@ -40,20 +41,20 @@ import { getNewLineCharacter } from '../../compiler/utils'; this._executingFilePath = executingFilePath; this._env = env; } - + private testTerminalWidth = Number.parseInt(this.getEnvironmentVariable("TS_TEST_TERMINAL_WIDTH")); getWidthOfTerminal = Number.isNaN(this.testTerminalWidth) ? undefined : () => this.testTerminalWidth; - + // Pretty output writeOutputIsTTY() { return true; } - + public write(message: string) { console.log(message); this.output.push(message); } - + public readFile(path: string) { try { const content = this.vfs.readFileSync(path, "utf8"); @@ -63,34 +64,34 @@ import { getNewLineCharacter } from '../../compiler/utils'; return undefined; } } - + public writeFile(path: string, data: string, writeByteOrderMark?: boolean): void { this.vfs.mkdirpSync(vpath.dirname(path)); this.vfs.writeFileSync(path, writeByteOrderMark ? Utils.addUTF8ByteOrderMark(data) : data); } - + public deleteFile(path: string) { this.vfs.unlinkSync(path); } - + public fileExists(path: string) { const stats = this._getStats(path); return stats ? stats.isFile() : false; } - + public directoryExists(path: string) { const stats = this._getStats(path); return stats ? stats.isDirectory() : false; } - + public createDirectory(path: string): void { this.vfs.mkdirpSync(path); } - + public getCurrentDirectory() { return this.vfs.cwd(); } - + public getDirectories(path: string) { const result: string[] = []; try { @@ -103,12 +104,12 @@ import { getNewLineCharacter } from '../../compiler/utils'; catch { /*ignore*/ } return result; } - + public readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[] { throw new Error("Not implemented"); // return matchFiles(path, extensions, exclude, include, this.useCaseSensitiveFileNames, this.getCurrentDirectory(), depth, path => this.getAccessibleFileSystemEntries(path), path => this.realpath(path)); } - + public getAccessibleFileSystemEntries(path: string): vfs.FileSystemEntries { const files: string[] = []; const directories: string[] = []; @@ -129,39 +130,39 @@ import { getNewLineCharacter } from '../../compiler/utils'; catch { /*ignored*/ } return { files, directories }; } - + public exit(exitCode?: number) { this.exitCode = exitCode; throw processExitSentinel; } - + public getFileSize(path: string) { const stats = this._getStats(path); return stats && stats.isFile() ? stats.size : 0; } - + public resolvePath(path: string) { return vpath.resolve(this.vfs.cwd(), path); } - + public getExecutingFilePath() { if (this._executingFilePath === undefined) throw new Error("ts.notImplemented"); return this._executingFilePath; } - + public getModifiedTime(path: string) { const stats = this._getStats(path); return stats ? stats.mtime : undefined!; // TODO: GH#18217 } - + public setModifiedTime(path: string, time: Date) { this.vfs.utimesSync(path, time, time); } - + public createHash(data: string): string { return `${generateDjb2Hash(data)}-${data}`; } - + public realpath(path: string) { try { return this.vfs.realpathSync(path); @@ -170,11 +171,11 @@ import { getNewLineCharacter } from '../../compiler/utils'; return path; } } - + public getEnvironmentVariable(name: string): string { return (this._env && this._env[name])!; // TODO: GH#18217 } - + private _getStats(path: string) { try { return this.vfs.existsSync(path) ? this.vfs.statSync(path) : undefined; @@ -183,43 +184,43 @@ import { getNewLineCharacter } from '../../compiler/utils'; return undefined; } } - + now() { return new Date(this.vfs.time()); } } - + /** * A fake `ts.ParseConfigHost` that leverages a virtual file system. */ export class ParseConfigHost implements ts.ParseConfigHost { public readonly sys: System; - + constructor(sys: System | vfs.FileSystem) { if (sys instanceof vfs.FileSystem) sys = new System(sys); this.sys = sys; } - + public get vfs() { return this.sys.vfs; } - + public get useCaseSensitiveFileNames() { return this.sys.useCaseSensitiveFileNames; } - + public fileExists(fileName: string): boolean { return this.sys.fileExists(fileName); } - + public directoryExists(directoryName: string): boolean { return this.sys.directoryExists(directoryName); } - + public readFile(path: string): string | undefined { return this.sys.readFile(path); } - + public readDirectory(path: string, extensions: string[], excludes: string[], includes: string[], depth: number): string[] { return this.sys.readDirectory(path, extensions, excludes, includes, depth); } @@ -362,7 +363,7 @@ import { getNewLineCharacter } from '../../compiler/utils'; } const parsed = ts.createSourceFile(fileName, content, languageVersion, this._setParentNodes || this.shouldAssertInvariants); - + this._sourceFiles.set(canonicalFileName, parsed); if (cacheKey) { diff --git a/external-declarations/src/test-runner/tsc-infrastructure/io.ts b/external-declarations/src/test-runner/tsc-infrastructure/io.ts index 8fdabd388eb67..4cbc6c8020c18 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/io.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/io.ts @@ -1,7 +1,8 @@ import { sys } from "typescript"; + +import { compareStringsCaseInsensitive,compareStringsCaseSensitive } from "../../compiler/lang-utils"; import { FileSystemEntries } from "./vfs"; -import * as vpath from './vpath'; -import { compareStringsCaseSensitive, compareStringsCaseInsensitive } from "../../compiler/lang-utils"; +import * as vpath from "./vpath"; export interface IO { newLine(): string; @@ -152,7 +153,7 @@ function createNodeIO(): IO { exit: exitCode => sys.exit(exitCode), readDirectory: (path, extension, exclude, include, depth) => sys.readDirectory(path, extension, exclude, include, depth), getAccessibleFileSystemEntries, - tryEnableSourceMapsForHost: () => { throw new Error("Not supported")}, + tryEnableSourceMapsForHost: () => { throw new Error("Not supported");}, getMemoryUsage: () => sys.getMemoryUsage && sys.getMemoryUsage(), getEnvironmentVariable(name: string) { return process.env[name] || ""; diff --git a/external-declarations/src/test-runner/tsc-infrastructure/options.ts b/external-declarations/src/test-runner/tsc-infrastructure/options.ts index 6ee765c36ecbb..76ace5a8ac6fb 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/options.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/options.ts @@ -1,10 +1,11 @@ // Watch related options -import { WatchFileKind, WatchDirectoryKind, PollingWatchKind, ScriptTarget, ModuleKind, ImportsNotUsedAsValues, ModuleResolutionKind, NewLineKind, ModuleDetectionKind, JsxEmit, DiagnosticMessage, CompilerOptionsValue, Diagnostic } from "typescript"; +import { CompilerOptionsValue, Diagnostic,DiagnosticMessage, ImportsNotUsedAsValues, JsxEmit, ModuleDetectionKind, ModuleKind, ModuleResolutionKind, NewLineKind, PollingWatchKind, ScriptTarget, WatchDirectoryKind, WatchFileKind } from "typescript"; + import { isNullOrUndefined } from "../../compiler/lang-utils"; -import { Diagnostics } from "./diagnosticInformationMap.generated"; import { getEntries, mapDefined, startsWith, trimString } from "../../compiler/lang-utils"; +import { Diagnostics } from "./diagnosticInformationMap.generated"; const jsxOptionMap = new Map(getEntries({ "preserve": JsxEmit.Preserve, diff --git a/external-declarations/src/test-runner/tsc-infrastructure/test-document.ts b/external-declarations/src/test-runner/tsc-infrastructure/test-document.ts index 70d5f7d154916..f39a68544861c 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/test-document.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/test-document.ts @@ -1,4 +1,5 @@ import { isLineBreak } from "typescript"; + import { CharacterCodes } from "../../compiler/types"; import { TestFile } from "./compiler-run"; diff --git a/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts b/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts index 760c7dc38cc86..448ffa60c5900 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts @@ -1,8 +1,9 @@ -import * as ts from 'typescript' -import { find, forEach, orderedRemoveItemAt } from '../../compiler/lang-utils'; -import { getBaseFileName, getDirectoryPath, getNormalizedAbsolutePath, normalizePath } from '../../compiler/path-utils'; -import * as vfs from './vfs' -import { Path } from 'typescript'; +import * as ts from "typescript"; +import { Path } from "typescript"; + +import { find, forEach, orderedRemoveItemAt } from "../../compiler/lang-utils"; +import { getBaseFileName, getDirectoryPath, getNormalizedAbsolutePath, normalizePath } from "../../compiler/path-utils"; +import * as vfs from "./vfs"; /** all the necessary information to set the right compiler settings */ export interface CompilerSettings { @@ -102,8 +103,8 @@ export function makeUnitsFromTest(code: string, fileName: string, rootDir?: stri let currentFileContent: string | undefined; let currentFileOptions: any = {}; let currentFileName: any; - let currentFileStartLine: number = 0; - let currentFileEndLine: number = 0; + let currentFileStartLine = 0; + let currentFileEndLine = 0; let refs: string[] = []; let symlinks: vfs.FileSet | undefined; let lineIndex = -1; diff --git a/external-declarations/src/test-runner/tsc-infrastructure/vary-by.ts b/external-declarations/src/test-runner/tsc-infrastructure/vary-by.ts index d8a1a5e02ec7d..5092a3072d552 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/vary-by.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/vary-by.ts @@ -1,4 +1,4 @@ -import { equateStringsCaseInsensitive, map, forEach, startsWith, findIndex, arrayFrom, orderedRemoveItemAt, getEntries, hasProperty } from "../../compiler/lang-utils"; +import { arrayFrom, equateStringsCaseInsensitive, findIndex, forEach, getEntries, hasProperty,map, orderedRemoveItemAt, startsWith } from "../../compiler/lang-utils"; import { optionDeclarations } from "./options"; import { CompilerSettings } from "./test-file-parser"; diff --git a/external-declarations/src/test-runner/tsc-infrastructure/vfs.ts b/external-declarations/src/test-runner/tsc-infrastructure/vfs.ts index ea685e2490d7a..eec156b2028f7 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/vfs.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/vfs.ts @@ -1,8 +1,8 @@ +import { arrayFrom } from "../../compiler/lang-utils"; import * as collections from "./collections"; -import * as vpath from "./vpath"; -import * as documents from "./test-document"; import * as Harness from "./compiler-run"; -import { arrayFrom } from "../../compiler/lang-utils"; +import * as documents from "./test-document"; +import * as vpath from "./vpath"; /** * Posix-style path to the TypeScript compiler build outputs (including tsc.js, lib.d.ts, etc.) diff --git a/external-declarations/src/test-runner/tsc-infrastructure/vpath.ts b/external-declarations/src/test-runner/tsc-infrastructure/vpath.ts index f706946c153ae..3fe922615d1a4 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/vpath.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/vpath.ts @@ -1,8 +1,9 @@ import { Path } from "typescript"; + import { changeAnyExtension, comparePaths, comparePathsCaseInsensitive, comparePathsCaseSensitive, getAnyExtensionFromPath, getBaseFileName, getDirectoryPath, getPathComponents, getPathFromPathComponents, getRelativePathFromDirectory, isDiskPathRoot, isRootedDiskPath, reducePathComponents, resolvePath } from "../../compiler/path-utils"; import { CharacterCodes } from "../../compiler/types"; import { hasJSFileExtension, hasTSFileExtension, isDeclarationFileName } from "../../compiler/utils"; -import * as vfs from './vfs' +import * as vfs from "./vfs"; /** * Internally, we represent paths as strings with '/' as the directory separator. @@ -216,15 +217,15 @@ function getFileUrlVolumeSeparatorEnd(url: string, start: number) { export const dirname = getDirectoryPath; /** -* Removes a trailing directory separator from a path, if it does not already have one. -* -* ```ts -* removeTrailingDirectorySeparator("/path/to/file.ext") === "/path/to/file.ext" -* removeTrailingDirectorySeparator("/path/to/file.ext/") === "/path/to/file.ext" -* ``` -* -* @internal -*/ + * Removes a trailing directory separator from a path, if it does not already have one. + * + * ```ts + * removeTrailingDirectorySeparator("/path/to/file.ext") === "/path/to/file.ext" + * removeTrailingDirectorySeparator("/path/to/file.ext/") === "/path/to/file.ext" + * ``` + * + * @internal + */ export function removeTrailingDirectorySeparator(path: Path): Path; /** @internal */ export function removeTrailingDirectorySeparator(path: string): string; diff --git a/external-declarations/src/test-runner/utils.ts b/external-declarations/src/test-runner/utils.ts index a7764f65e3524..c8b3c5670c67b 100644 --- a/external-declarations/src/test-runner/utils.ts +++ b/external-declarations/src/test-runner/utils.ts @@ -1,14 +1,15 @@ -import * as ts from 'typescript' +import * as fsp from "fs/promises"; +import * as ts from "typescript"; +import { ModuleKind } from "typescript"; + +import { getDeclarationExtension, isDeclarationFile, isTypeScriptFile } from "../compiler/path-utils"; +import { transformFile } from "../compiler/transform-file"; import { compileFiles, TestFile, Utils } from "./tsc-infrastructure/compiler-run"; +import { libs } from "./tsc-infrastructure/options"; import * as TestCaseParser from "./tsc-infrastructure/test-file-parser"; -import * as fsp from 'fs/promises' -import { getDeclarationExtension, isDeclarationFile, isTypeScriptFile } from '../compiler/path-utils'; -import { changeExtension } from './tsc-infrastructure/vpath'; +import { changeExtension } from "./tsc-infrastructure/vpath"; import * as vpath from "./tsc-infrastructure/vpath"; -import { libs } from './tsc-infrastructure/options'; -import { ModuleKind } from 'typescript'; -import { transformFile } from '../compiler/transform-file'; export interface FileContent { content: string, @@ -20,7 +21,7 @@ export async function loadTestCase(fileName: string) { const test = { content: Utils.removeByteOrderMark(rawText), file: fileName, - } + }; return Object.assign(TestCaseParser.makeUnitsFromTest(test.content, test.file), { BOM: rawText.substring(0, Utils.getByteOrderMarkLength(rawText)) }); @@ -50,7 +51,7 @@ export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings // const declarationMapFile = declarationFile + ".map"; const resolvedDeclarationFile = vpath.resolve(result.vfs.cwd(), declarationFile); // const resolvedDeclarationMapFile = vpath.resolve(result.vfs.cwd(), declarationMapFile); - const declaration = result.dts.get(resolvedDeclarationFile) + const declaration = result.dts.get(resolvedDeclarationFile); // const declarationMap = result.maps.get(resolvedDeclarationMapFile) return [{ content: declaration?.text ?? "", @@ -61,38 +62,38 @@ export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings // fileName: declarationMapFile, // } ]; - }) + }); } export function isRelevantTestFile(f: TestCaseParser.TestUnitData) { - return isTypeScriptFile(f.name) && !isDeclarationFile(f.name) && f.content !== undefined + return isTypeScriptFile(f.name) && !isDeclarationFile(f.name) && f.content !== undefined; } export function runIsolated(caseData: TestCaseParser.TestCaseContent, libFiles: string[], settings: ts.CompilerOptions): FileContent[] { - const toSrc = (n: string) => vpath.combine('/src', n); + const toSrc = (n: string) => vpath.combine("/src", n); const projectFiles = [...caseData.testUnitData.map(o => toSrc(o.name)), ...libFiles]; settings = { ...settings, isolatedDeclarations: true, - } + }; const packageJson = caseData.testUnitData.find(f => f.name === "/package.json"); - let packageResolution: ts.ResolutionMode = ts.ModuleKind.CommonJS + let packageResolution: ts.ResolutionMode = ts.ModuleKind.CommonJS; if (packageJson) { - packageResolution = JSON.parse(packageJson.content)?.type === "module" ? ModuleKind.ESNext : ModuleKind.CommonJS + packageResolution = JSON.parse(packageJson.content)?.type === "module" ? ModuleKind.ESNext : ModuleKind.CommonJS; } const results = caseData.testUnitData .filter(isRelevantTestFile) .map(file => { const sourceFile = ts.createSourceFile(toSrc(file.name), Utils.removeByteOrderMark(file.content), settings.target ?? ts.ScriptTarget.ES2015, true, - file.name.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS) - const declaration = transformFile(sourceFile, projectFiles, libs, settings, packageResolution) + file.name.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS); + const declaration = transformFile(sourceFile, projectFiles, libs, settings, packageResolution); return { content: declaration.code, fileName: changeExtension(file.name, getDeclarationExtension(file.name)), }; - }) + }); return results; } diff --git a/external-declarations/src/utils/cli-parser.ts b/external-declarations/src/utils/cli-parser.ts index 481318fb103e5..d49b369f7ce79 100644 --- a/external-declarations/src/utils/cli-parser.ts +++ b/external-declarations/src/utils/cli-parser.ts @@ -1,13 +1,13 @@ -type ArgTypeParser = (name: string, value: string | undefined, existingValue: T | undefined) => T +type ArgTypeParser = (name: string, value: string | undefined, existingValue: T | undefined) => T; function mustNotExist(fn: ArgTypeParser): ArgTypeParser { return (name, value, existingValue) => { if (existingValue) { throw new Error(`Parameter ${name} was specified multiple times. Values ${existingValue}, ${value}`); } return fn(name, value, existingValue); - } + }; } export const ArgType = { String: () => mustNotExist((name, value) => { @@ -43,19 +43,19 @@ export const ArgType = { StringArray: () => (name, value, existingValue: string[] | undefined) => { existingValue ??= []; if (value) { - existingValue.push(value) + existingValue.push(value); return existingValue; } throw new Error(`String value was not specified for ${name}`); }, -} satisfies Record ArgTypeParser> +} satisfies Record ArgTypeParser>; type ParserConfiguration = Record | { type: ArgTypeParser, required?: V, description: string, -}> +}>; type ParsedValue> = { [P in keyof T]: T[P] extends ArgTypeParser ? A | undefined : @@ -63,9 +63,9 @@ type ParsedValue> = { type: ArgTypeParser, required?: infer R } ? R extends true ? A : A | undefined : never -} +}; -export function parserConfiguration>(config:T) { +export function parserConfiguration>(config: T) { return config; } export function parseArgs>(args: string[], types: T): { @@ -74,20 +74,21 @@ export function parseArgs>(a usage: () => string printUsageOnErrors: () => void; } { - const config: Record = {} - const diagnostics: string[] = [] + const config: Record = {}; + const diagnostics: string[] = []; function parseArgument(name: string, value: string | undefined) { - const existingValue = config[name] + const existingValue = config[name]; const parser = types[name]; if(!parser) { - diagnostics.push(`Parameter ${name} was unexpected`) + diagnostics.push(`Parameter ${name} was unexpected`); return; } const parserFn = typeof parser === "function" ? parser: parser.type; try { const newValue = parserFn(name, value, existingValue); config[name] = newValue; - } catch(e) { + } + catch(e) { if(e instanceof Error) { diagnostics.push(e.message); } @@ -97,21 +98,22 @@ export function parseArgs>(a for (const arg of args) { const named = /--(?.*)=(?.*)/.exec(arg); if (named) { - parseArgument(named.groups?.name!, named.groups?.value); + parseArgument(named.groups?.name!, named.groups?.value); } else { const flagParam =/--(?.*)/.exec(arg); if (flagParam) { parseArgument(flagParam.groups?.name!, undefined); - } else { - parseArgument('default', arg); + } + else { + parseArgument("default", arg); } } } for(const key of Object.keys(types)) { const cfg = types[key]; - if(!(key in config) && 'required' in cfg && cfg.required) { + if(!(key in config) && "required" in cfg && cfg.required) { diagnostics.push(`Parameters ${key} is required`); } } @@ -136,5 +138,5 @@ export function parseArgs>(a process.exit(); } }, - } + }; } diff --git a/external-declarations/src/utils/fs-utils.ts b/external-declarations/src/utils/fs-utils.ts index b293643c9cd33..5ba30aa3583f4 100644 --- a/external-declarations/src/utils/fs-utils.ts +++ b/external-declarations/src/utils/fs-utils.ts @@ -1,10 +1,11 @@ -import * as fs from 'fs' -import * as fsp from 'fs/promises' -import { flatten, stableSort, compareStringsCaseSensitive } from '../compiler/lang-utils'; -import { normalizePath, createGetCanonicalFileName, combinePaths } from '../compiler/path-utils'; -import { FileSystemEntries } from '../test-runner/tsc-infrastructure/vfs'; +import * as fs from "fs"; +import * as fsp from "fs/promises"; -const cache: Record = {} +import { compareStringsCaseSensitive,flatten, stableSort } from "../compiler/lang-utils"; +import { combinePaths,createGetCanonicalFileName, normalizePath } from "../compiler/path-utils"; +import { FileSystemEntries } from "../test-runner/tsc-infrastructure/vfs"; + +const cache: Record = {}; export async function ensureDir(dirName: string) { const exists = cache[dirName] ?? diff --git a/external-declarations/tests/source/local-inference/expando-functions-declarations.ts b/external-declarations/tests/source/local-inference/expando-functions-declarations.ts new file mode 100644 index 0000000000000..9feee368b8c6b --- /dev/null +++ b/external-declarations/tests/source/local-inference/expando-functions-declarations.ts @@ -0,0 +1,10 @@ +export function foo() {} +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"; diff --git a/external-declarations/tests/source/local-inference/expando-functions-expressions.ts b/external-declarations/tests/source/local-inference/expando-functions-expressions.ts new file mode 100644 index 0000000000000..e6f272382666c --- /dev/null +++ b/external-declarations/tests/source/local-inference/expando-functions-expressions.ts @@ -0,0 +1,21 @@ +// @strict:true +// @target: es2015 + +// @fileName: propNames.ts + +export const S = "s-name"; + +// @fileName: expando-functions.ts +// import { S } from '' +export const x = ()=> {} +x.test = 1; + +export const fnExpression = function (): string { + return ""; +} +fnExpression.prop = "1" +fnExpression.prop = false +fnExpression["SS"] = "A" +fnExpression["SS"] = "A" +fnExpression[S] = 1 +fnExpression[S] = 1 \ No newline at end of file From 9177b066726161ce3c95b238cabb3b043555efe1 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 29 Jun 2023 13:55:26 +0100 Subject: [PATCH 028/224] Fixed es lint rules --- .../src/code-mod/code-transform.ts | 3 +- .../src/code-mod/parallel-run.ts | 4 +- .../src/compiler/emit-binder.ts | 44 +- .../src/compiler/emit-host.ts | 14 +- .../src/compiler/emit-resolver.ts | 10 +- .../src/compiler/lang-utils.ts | 2 + .../src/compiler/perf-tracer.ts | 2 +- .../src/compiler/transform-file.ts | 6 +- .../src/compiler/transform-project.ts | 2 +- external-declarations/src/compiler/types.ts | 10 +- external-declarations/src/compiler/utils.ts | 4 +- external-declarations/src/main.ts | 9 +- .../src/test-runner/excluded-ts-tests.ts | 2 +- .../src/test-runner/parallel-run.ts | 18 +- .../src/test-runner/test-runner-main.ts | 8 +- .../tsc-infrastructure/compiler-run.ts | 7 +- .../tsc-infrastructure/compiler.ts | 26 +- .../diagnosticInformationMap.generated.ts | 1893 +++++++++++++++++ .../src/test-runner/tsc-infrastructure/io.ts | 4 +- .../test-runner/tsc-infrastructure/options.ts | 3 +- .../tsc-infrastructure/test-file-parser.ts | 2 +- .../src/test-runner/tsc-infrastructure/vfs.ts | 2 +- .../src/test-runner/utils.ts | 8 +- external-declarations/src/utils/cli-parser.ts | 5 +- external-declarations/src/utils/fs-utils.ts | 2 +- src/compiler/checker.ts | 25 +- src/compiler/transformers/declarations.ts | 8 +- .../declarations/localInferenceResolver.ts | 161 +- src/compiler/utilities.ts | 4 +- 29 files changed, 2105 insertions(+), 183 deletions(-) create mode 100644 external-declarations/src/test-runner/tsc-infrastructure/diagnosticInformationMap.generated.ts diff --git a/external-declarations/src/code-mod/code-transform.ts b/external-declarations/src/code-mod/code-transform.ts index f729c12ecfaa1..caa8f15f47266 100644 --- a/external-declarations/src/code-mod/code-transform.ts +++ b/external-declarations/src/code-mod/code-transform.ts @@ -1,6 +1,7 @@ import * as ts from "typescript"; import { NodeBuilderFlags } from "typescript"; +import { hasProperty } from "../compiler/lang-utils"; import { SymbolTracker } from "../compiler/types"; const declarationEmitNodeBuilderFlags = @@ -39,7 +40,7 @@ function isDeclarationReadonly(declaration: ts.Declaration): boolean { function isLiteralConstDeclaration(node: ts.VariableDeclaration | ts.PropertyDeclaration | ts.PropertySignature | ts.ParameterDeclaration): boolean { if (isDeclarationReadonly(node) || ts.isVariableDeclaration(node) && isVarConst(node)) { // TODO: Make sure this is a valid approximation for literal types - return !node.type && "initializer" in node && !!node.initializer && ts.isLiteralExpression(node.initializer); + return !node.type && hasProperty(node, "initializer") && !!node.initializer && ts.isLiteralExpression(node.initializer); // Original TS version // return isFreshLiteralType(getTypeOfSymbol(getSymbolOfNode(node))); } diff --git a/external-declarations/src/code-mod/parallel-run.ts b/external-declarations/src/code-mod/parallel-run.ts index 6b382918fc8d1..483d0b8f57231 100644 --- a/external-declarations/src/code-mod/parallel-run.ts +++ b/external-declarations/src/code-mod/parallel-run.ts @@ -4,7 +4,7 @@ import * as path from "path"; import { ArgType, parseArgs } from "../utils/cli-parser"; interface ExecuteResult { - error: childProcess.ExecException | null + error: childProcess.ExecException | undefined stdout: string, stderr: string, } @@ -40,7 +40,7 @@ function exec(cmd: string, dir: string, onStdOut: (s: string) => void) { ls.on("exit", (code) => { console.log("exited:" + code?.toString()); resolve({ - error: !code ? null : Object.assign(new Error(""), { + error: !code ? undefined : Object.assign(new Error(""), { code, cmd, }), diff --git a/external-declarations/src/compiler/emit-binder.ts b/external-declarations/src/compiler/emit-binder.ts index 8ed06e620d429..92780d2176865 100644 --- a/external-declarations/src/compiler/emit-binder.ts +++ b/external-declarations/src/compiler/emit-binder.ts @@ -2,7 +2,6 @@ import { __String, ArrayBindingElement, BindingPattern, ClassDeclaration, ClassE import { Debug } from "./debug"; import { forEach } from "./lang-utils"; -import { _Symbol } from "./types"; import { getEmitModuleKind, getEmitModuleResolutionKind, getNodeId, hasSyntacticModifier, isBindingPattern, isEnumConst, nodeHasName } from "./utils"; @@ -29,15 +28,15 @@ function assertNever(o: never): never { throw new Error("Should never happen"); } -type _Node = Node; -type _NodeArray = NodeArray; -type _SourceFile = SourceFile; +type InternalNode = Node; +type InternalNodeArray = NodeArray; +type InternalSourceFile = SourceFile; declare module "typescript" { interface SourceFile { - externalModuleIndicator?: _Node | true; + externalModuleIndicator?: InternalNode | true; } - export function forEachChildRecursively(rootNode: _Node, cbNode: (node: _Node, parent: _Node) => T | "skip" | undefined, cbNodes?: (nodes: _NodeArray<_Node>, parent: _Node) => T | "skip" | undefined): T | undefined; - export function getTokenPosOfNode(node: _Node, sourceFile?: _SourceFile, includeJsDoc?: boolean): number; + export function forEachChildRecursively(rootNode: InternalNode, cbNode: (node: InternalNode, parent: InternalNode) => T | "skip" | undefined, cbNodes?: (nodes: InternalNodeArray, parent: InternalNode) => T | "skip" | undefined): T | undefined; + export function getTokenPosOfNode(node: InternalNode, sourceFile?: InternalSourceFile, includeJsDoc?: boolean): number; } function getEmitModuleDetectionKind(options: CompilerOptions) { return options.moduleDetection || @@ -64,8 +63,8 @@ const syntaxKindToSymbolMap = { [SyntaxKind.Constructor]: [SymbolFlags.Constructor, SymbolFlags.None], [SyntaxKind.GetAccessor]: [SymbolFlags.GetAccessor, SymbolFlags.GetAccessorExcludes], [SyntaxKind.SetAccessor]: [SymbolFlags.SetAccessor, SymbolFlags.SetAccessorExcludes], - [SyntaxKind.ClassExpression]: [SymbolFlags.Class, SymbolFlags.ClassExcludes], - [SyntaxKind.ClassDeclaration]: [SymbolFlags.Class, SymbolFlags.ClassExcludes], + [SyntaxKind.ClassExpression]: [SymbolFlags.Class, SymbolFlags.ClassExcludes], + [SyntaxKind.ClassDeclaration]: [SymbolFlags.Class, SymbolFlags.ClassExcludes], [SyntaxKind.InterfaceDeclaration]: [SymbolFlags.Interface, SymbolFlags.InterfaceExcludes], [SyntaxKind.TypeAliasDeclaration]: [SymbolFlags.TypeAlias, SymbolFlags.TypeAliasExcludes], [SyntaxKind.EnumDeclaration]: { @@ -156,7 +155,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa let currentScope: Node = undefined!; let currentSymbol: BasicSymbol = undefined!; let currentLocalSymbolTable: SymbolTable = undefined!; - let currentExportsSymbolTable: SymbolTable | null = null; + let currentExportsSymbolTable: SymbolTable | undefined; const postBindingAction: (() => void)[] = []; const fileLinks = getNodeLinks(file).symbol = newSymbol(); @@ -202,7 +201,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa } function addDeclaration(table: SymbolTable, name: __String | undefined, node: Node, [flags, forbiddenFlags]: SymbolRegistrationFlags) { - let symbol = name != null ? getSymbol(table, name) : newSymbol(); + let symbol = name !== undefined ? getSymbol(table, name) : newSymbol(); // Symbols don't merge, create new one if(forbiddenFlags & symbol.flags) { symbol = newSymbol(); @@ -213,7 +212,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa node.symbol = symbol as unknown as Symbol; return symbol; } - function withScope(scope: Node, exports: SymbolTable | null, fn: () => void) { + function withScope(scope: Node, exports: SymbolTable | undefined, fn: () => void) { const old = [currentScope, currentLocalSymbolTable, currentExportsSymbolTable] as const; currentScope = scope; const links = getNodeLinks(scope); @@ -287,23 +286,24 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa if(!node) return; if(isMappedTypeNode(node)) { const mappedType = node; - withScope(node, null, () => { + withScope(node, /*exports*/ undefined, () => { bindTypeParameters([mappedType.typeParameter]); bindWorker(mappedType.nameType); bindWorker(mappedType.type); }); } else if(isConditionalTypeNode(node)) { - withScope(node.checkType, null, () => { + withScope(node.checkType, /*exports*/ undefined, () => { bindWorker(node.extendsType); }); getNodeLinks(node.trueType).locals = getNodeLinks(node.checkType).locals; - } if(isInferTypeNode(node)) { + } + else if(isInferTypeNode(node)) { const conditionalTypeOwner = findAncestor(node, isConditionalTypeNode); // Probably an error, infer not in a conditional type context // Try to bind the rest of it if(conditionalTypeOwner) { - withScope(conditionalTypeOwner, null, () => { + withScope(conditionalTypeOwner, /*exports*/ undefined, () => { bindTypeParameters([node.typeParameter]); }); } @@ -390,7 +390,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa if(isFunctionDeclaration(statement)) { bindTypeParameters(statement.typeParameters); bindTypeExpressions(statement.type); - withScope(statement, null, () => { + withScope(statement, /*exports*/ undefined, () => { bindTypeExpressions(statement); statement.parameters.forEach(bindVariable); }); @@ -399,7 +399,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa } if(isTypeAliasDeclaration(statement)) { addLocalAndExportDeclaration(statement.name.escapedText, statement, getSymbolFlagsForNode(statement), isExported); - withScope(statement, null, () => { + withScope(statement, /*exports*/ undefined, () => { bindTypeParameters(statement.typeParameters); }); bindTypeExpressions(statement.type); @@ -421,8 +421,8 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa if(statement.exportClause && isNamedExports(statement.exportClause)) { const elements = statement.exportClause.elements; if (statement.moduleSpecifier) { - // TODO is currentExportsSymbolTable ok here? - withScope(statement, null, () => { + // TODO is currentExportsSymbolTable ok here? + withScope(statement, /*exports*/ undefined, () => { elements.forEach(e => { const [flags, forbiddenFlags] = getSymbolFlagsForNode(e); addLocalOnlyDeclaration((e.propertyName ?? e.name).escapedText, e, [flags | SymbolFlags.ExportValue , forbiddenFlags]); @@ -473,7 +473,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa if(isInterfaceDeclaration(statement)) { const interfaceDeclaration = statement; const interfaceSymbol = addLocalAndExportDeclaration(interfaceDeclaration.name.escapedText, interfaceDeclaration, getSymbolFlagsForNode(interfaceDeclaration), isExported); - withScope(interfaceDeclaration, null, () =>{ + withScope(interfaceDeclaration, /*exports*/ undefined, () =>{ bindTypeParameters(interfaceDeclaration.typeParameters); }); withMembers(interfaceSymbol, () => { @@ -487,7 +487,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa if(isClassDeclaration(statement)) { const classDeclaration = statement; const classSymbol = addLocalAndExportDeclaration(classDeclaration.name?.escapedText, classDeclaration, getSymbolFlagsForNode(classDeclaration), isExported); - withScope(classDeclaration, null, () =>{ + withScope(classDeclaration, /*exports*/ undefined, () =>{ bindTypeParameters(classDeclaration.typeParameters); }); withMembers(classSymbol, () => { diff --git a/external-declarations/src/compiler/emit-host.ts b/external-declarations/src/compiler/emit-host.ts index 7fe254db37074..69c26df5f9f5b 100644 --- a/external-declarations/src/compiler/emit-host.ts +++ b/external-declarations/src/compiler/emit-host.ts @@ -6,13 +6,13 @@ import { getDeclarationExtension, getDirectoryPath, getRelativePathFromDirectory import { IsolatedEmitHost } from "./types"; import { getNodeId } from "./utils"; -export function createEmitHost(allProjectFiles: string[], tsLibFiles: string[], options: ts.CompilerOptions) { +export function createEmitHost(allProjectFiles: string[], tsLibFiles: string[], options: ts.CompilerOptions) { const getCompilerOptions = () => options; const getCurrentDirectory = () => "."; const getCommonSourceDirectory = () => "."; const getCanonicalFileName = (f: string) => `./${f}`; const projectFileMap = new Map(allProjectFiles - .map((f) => ({ kind: ts.SyntaxKind.SourceFile, fileName: f } as ts.SourceFile)) + .map((f) => ({ kind: ts.SyntaxKind.SourceFile, fileName: f } as ts.SourceFile)) .map(f => [f.fileName, getNodeId(f)]) ); const tsLibFileSet = new Set(tsLibFiles); @@ -45,11 +45,11 @@ export function createEmitHost(allProjectFiles: string[], tsLibFiles: string[], } let resolvedFile: string | undefined = resolvePath(getDirectoryPath(referencingFile.fileName), ref.fileName); let resolvedFileId = projectFileMap.get(resolvedFile); - if(!hasExtension(resolvedFile) && resolvedFileId == undefined) { + if(!hasExtension(resolvedFile) && resolvedFileId === undefined) { [resolvedFile, resolvedFileId] = Object.values(ts.Extension) .map(e => resolvedFile + e) .map(f => [f, projectFileMap.get(f)] as const) - .find(([_, id]) => id != undefined) ?? []; + .find(([_, id]) => id !== undefined) ?? []; if(!resolvedFile) return undefined; } @@ -60,7 +60,11 @@ export function createEmitHost(allProjectFiles: string[], tsLibFiles: string[], isDeclarationFile(resolvedFile) ? resolvedFile : changeExtension(resolvedFile, getDeclarationExtension(resolvedFile)); return { - fileName: getRelativePathFromDirectory(getDirectoryPath(referencingFile.fileName), resolvedDeclarationFile, false), + fileName: getRelativePathFromDirectory( + getDirectoryPath(referencingFile.fileName), + resolvedDeclarationFile, + /*ignoreCase*/ false + ), id: resolvedFileId, }; }, diff --git a/external-declarations/src/compiler/emit-resolver.ts b/external-declarations/src/compiler/emit-resolver.ts index 1c8cc3e8c213c..ee268b7fda104 100644 --- a/external-declarations/src/compiler/emit-resolver.ts +++ b/external-declarations/src/compiler/emit-resolver.ts @@ -2,8 +2,8 @@ import { __String, BindingPattern, CompilerOptions, Declaration, DeclarationName import { Debug } from "./debug"; import { BasicSymbol, bindSourceFile } from "./emit-binder"; -import { appendIfUnique, emptyArray, every, filter } from "./lang-utils"; -import { _Symbol,IsolatedEmitResolver, LateBoundDeclaration, LateVisibilityPaintedStatement, SymbolAccessibility, SymbolVisibilityResult } from "./types"; +import { appendIfUnique, emptyArray, every, filter, hasProperty } from "./lang-utils"; +import { IsolatedEmitResolver, LateBoundDeclaration, LateVisibilityPaintedStatement, SymbolAccessibility, SymbolVisibilityResult } from "./types"; import { AnyImportSyntax, getFirstIdentifier, hasDynamicName, hasEffectiveModifier, hasSyntacticModifier, isAmbientDeclaration,isBindingPattern, isExternalModuleAugmentation, isInJSFile, isLateVisibilityPaintedStatement, isPartOfTypeNode, isThisIdentifier, nodeIsPresent, skipParentheses } from "./utils"; @@ -15,7 +15,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration): boolean { if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node)) { // TODO: Make sure this is a valid approximation for literal types - return !node.type && "initializer" in node && !!node.initializer && isLiteralExpression(node.initializer); + return !node.type && hasProperty(node, "initializer") && !!node.initializer && isLiteralExpression(node.initializer); // Original TS version // return isFreshLiteralType(getTypeOfSymbol(getSymbolOfNode(node))); } @@ -42,7 +42,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p isDeclarationVisible, isLiteralConstDeclaration, createLiteralConstValue(node) { - if("initializer" in node && node.initializer) { + if(hasProperty(node, "initializer") && node.initializer) { return node.initializer; } Debug.fail(); @@ -111,7 +111,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p isOptionalParameter(parameter) { const signature = parameter.parent; const paramIndex = signature.parameters.indexOf(parameter); - Debug.assert(paramIndex != -1); + Debug.assert(paramIndex !== -1); if(parameter.questionToken) return true; if(parameter.dotDotDotToken) return !!parameter.initializer; diff --git a/external-declarations/src/compiler/lang-utils.ts b/external-declarations/src/compiler/lang-utils.ts index a6179092f576b..ac367f888372a 100644 --- a/external-declarations/src/compiler/lang-utils.ts +++ b/external-declarations/src/compiler/lang-utils.ts @@ -631,6 +631,8 @@ const hasOwnProperty = Object.prototype.hasOwnProperty; * * @internal */ +export function hasProperty(map: T, key: K): map is Extract>>; +export function hasProperty(map: MapLike, key: string): boolean; export function hasProperty(map: MapLike, key: string): boolean { return hasOwnProperty.call(map, key); } diff --git a/external-declarations/src/compiler/perf-tracer.ts b/external-declarations/src/compiler/perf-tracer.ts index 3e8a65ae8471e..175a04692a1df 100644 --- a/external-declarations/src/compiler/perf-tracer.ts +++ b/external-declarations/src/compiler/perf-tracer.ts @@ -21,7 +21,7 @@ export function installTracer() { times[name] = (times[name] ?? 0) + 1; }, end(name: string) { - times[name] = (times[name] ?? 0) + + times[name] = (times[name] ?? 0) + (Date.now() - (startTimes[name] ?? Date.now())); startTimes[name] = undefined; }, diff --git a/external-declarations/src/compiler/transform-file.ts b/external-declarations/src/compiler/transform-file.ts index 7b1e42986bea9..73fc06a11a7be 100644 --- a/external-declarations/src/compiler/transform-file.ts +++ b/external-declarations/src/compiler/transform-file.ts @@ -7,17 +7,17 @@ import { createEmitResolver } from "./emit-resolver"; import { tracer } from "./perf-tracer"; import { TransformationContext } from "./types"; -const transformDeclarations: (context: TransformationContext) => (node: SourceFile) => SourceFile = (ts as any).transformDeclarations; +const transformDeclarations: (context: TransformationContext) => (node: SourceFile) => SourceFile = (ts as any).transformDeclarations; export function transformFile(sourceFile: ts.SourceFile, allProjectFiles: string[], tsLibFiles: string[], options: ts.CompilerOptions, moduleType: ts.ResolutionMode) { const getCompilerOptions = () => options; tracer.current?.start("bind"); const emitResolver = createEmitResolver(sourceFile, options, moduleType); - const emitHost = createEmitHost(allProjectFiles, tsLibFiles, options); + const emitHost = createEmitHost(allProjectFiles, tsLibFiles, options); tracer.current?.end("bind"); const diagnostics: ts.Diagnostic[] = []; - const x = transformDeclarations({ + const x = transformDeclarations({ getEmitHost() { return emitHost; }, diff --git a/external-declarations/src/compiler/transform-project.ts b/external-declarations/src/compiler/transform-project.ts index a841aa4a6949c..ecf64df86180c 100644 --- a/external-declarations/src/compiler/transform-project.ts +++ b/external-declarations/src/compiler/transform-project.ts @@ -55,7 +55,7 @@ export function transformProjectFiles(rootDir: string, files: string[], host: ts const dirPath = path.dirname(output); ensureDirRecursive(dirPath, host); tracer.current?.start("write"); - host.writeFile(output, actualDeclaration.code, false); + host.writeFile(output, actualDeclaration.code, /*writeByteOrderMark*/ false); tracer.current?.end("write"); } catch (e) { diff --git a/external-declarations/src/compiler/types.ts b/external-declarations/src/compiler/types.ts index 552c4ddf0936f..6f45ad775d6da 100644 --- a/external-declarations/src/compiler/types.ts +++ b/external-declarations/src/compiler/types.ts @@ -271,17 +271,17 @@ interface LateBoundName extends ComputedPropertyName { } -export type _Symbol = Symbol; -type _ModifierFlags = ModifierFlags; +export type InternalSymbol = Symbol; +type InternalModifierFlags = ModifierFlags; declare module "typescript" { interface Node { - symbol: _Symbol; + symbol: InternalSymbol; original: this; - modifierFlagsCache: _ModifierFlags + modifierFlagsCache: InternalModifierFlags } interface Symbol { isReferenced: boolean; - parent: _Symbol; + parent: InternalSymbol; } } diff --git a/external-declarations/src/compiler/utils.ts b/external-declarations/src/compiler/utils.ts index be7b0b3e3c61e..6cf89833a2134 100644 --- a/external-declarations/src/compiler/utils.ts +++ b/external-declarations/src/compiler/utils.ts @@ -621,7 +621,9 @@ export function isEnumConst(node: EnumDeclaration): boolean { } -function idText(id: Identifier) { return id.escapedText; } +function idText(id: Identifier) { + return id.escapedText; +} /** @internal */ export function nodeHasName(statement: Node, name: Identifier) { if (isNamedDeclaration(statement) && isIdentifier(statement.name) && idText(statement.name as Identifier) === idText(name)) { diff --git a/external-declarations/src/main.ts b/external-declarations/src/main.ts index 3a357e303b997..4be2a9fae85ee 100644 --- a/external-declarations/src/main.ts +++ b/external-declarations/src/main.ts @@ -29,7 +29,7 @@ const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2 }); printUsageOnErrors(); -let projectConfig = normalizePath(path.resolve(parsedArgs.project)); +let projectConfig = normalizePath(path.resolve(parsedArgs.project)); if (path.extname(projectConfig) !== ".json") { projectConfig = normalizePath(path.join(projectConfig, "tsconfig.json")); } @@ -49,7 +49,7 @@ function watch(rootDir: string) { else { newWatched = [rootDir]; } - if(watched.length != newWatched.length || !watched.every((v, index) => v.path === newWatched[index])) { + if(watched.length !== newWatched.length || !watched.every((v, index) => v.path === newWatched[index])) { watched.forEach(f => f.watcher.close()); watched = newWatched.map(f => ({ path: f, @@ -61,6 +61,7 @@ function watch(rootDir: string) { } let lastRunCancellation: CancellationToken = { isCancelled: false }; async function delay(ms: number) { + // eslint-disable-next-line no-restricted-globals return new Promise(r => setTimeout(r, ms)); } function cancelAndRestart(event: fs.WatchEventType, filename: string) { @@ -82,8 +83,8 @@ async function main(cancellationToken: CancellationToken, msDelay: number) { if(parsedArgs.declarationDir) { options.declarationDir = parsedArgs.declarationDir; } - const host = ts.createCompilerHost(options, true); - const rootDir = await transformProject(path.dirname(projectConfig), undefined, options, host, cancellationToken); + const host = ts.createCompilerHost(options, /*setParentNodes*/ true); + const rootDir = await transformProject(path.dirname(projectConfig), /*files*/ undefined, options, host, cancellationToken); console.log(tracer.current?.times); watch(rootDir); if(cancellationToken.isCancelled) return; diff --git a/external-declarations/src/test-runner/excluded-ts-tests.ts b/external-declarations/src/test-runner/excluded-ts-tests.ts index 5eb7b7ef2c965..878fc2e5c3eeb 100644 --- a/external-declarations/src/test-runner/excluded-ts-tests.ts +++ b/external-declarations/src/test-runner/excluded-ts-tests.ts @@ -1,4 +1,4 @@ -export const excludedTsTests = new Set([ +export const excludedTsTests = new Set([ // These two tests contain a declaration error // A variable that is not of a literal type is used as a computed property name // TS will error on this and will not merge the overloads to a singe symbol diff --git a/external-declarations/src/test-runner/parallel-run.ts b/external-declarations/src/test-runner/parallel-run.ts index 7707217f14f5f..a1b5078894b32 100644 --- a/external-declarations/src/test-runner/parallel-run.ts +++ b/external-declarations/src/test-runner/parallel-run.ts @@ -5,7 +5,7 @@ import { parseArgs } from "../utils/cli-parser"; import { testRunnerCLIConfiguration } from "./cli-arg-config"; interface ExecuteResult { - error: childProcess.ExecException | null + error: childProcess.ExecException | undefined stdout: string, stderr: string, } @@ -15,33 +15,33 @@ function exec(cmd: string, dir: string, onStdOut: (s: string) => void) { console.log(`In ${dir} Executing: ${cmd}`); const ls = childProcess.spawn(cmd, [], { - cwd: path.resolve(path.join(process.cwd(), dir)), + cwd: path.resolve(path.join(process.cwd(), dir)), shell: true }); let stdout = ""; let stderr = ""; - ls.stdout.on("data", function (data) { + ls.stdout.on("data", (data) => { if(!onStdOut) { process.stdout.write(data.toString()); } - else { + else { onStdOut(data.toString()); } stdout += data.toString(); }); - ls.stderr.on("data", function (data) { + ls.stderr.on("data", (data) => { process.stderr.write(data.toString()); stderr += data.toString(); }); - ls.on("error", function (err) { + ls.on("error", (err) => { console.log(err); }); - ls.on("exit", function (code) { + ls.on("exit", (code) => { console.log("exited:" + code?.toString()); resolve({ - error: !code ? null : Object.assign(new Error(""), { + error: !code ? undefined : Object.assign(new Error(""), { code, cmd, }), @@ -65,7 +65,7 @@ async function main() { let lastWrite = new Date().getTime(); const startTime = new Date().getTime(); const elapsedTime = (now: number) => `${((now - startTime) / 1000 / 60).toFixed(2)} minutes`; - const promisees = Array.from({ length: shardCount}).map(async (_, index) => { + const promisees = Array.from({ length: shardCount }).map(async (_, index) => { await exec(commandLine + ` --shard=${index}`, "./", out => { runCount += (out.match(/Ran:/g) || []).length; if(new Date().getTime() - lastWrite > 2000) { diff --git a/external-declarations/src/test-runner/test-runner-main.ts b/external-declarations/src/test-runner/test-runner-main.ts index fd86c48684e11..13c12f666e80e 100644 --- a/external-declarations/src/test-runner/test-runner-main.ts +++ b/external-declarations/src/test-runner/test-runner-main.ts @@ -53,16 +53,18 @@ const allTests = rootCasePaths const date = new Date(); const historical = (parsedArgs.histFolder && `/${parsedArgs.histFolder}/`) ?? `/${date.toISOString().replace(/:/g, "-")}-${parsedArgs.type}/`; -function pad(num: number, size: number) { return ("000000000" + num).substr(-size); } +function pad(num: number, size: number) { + return ("000000000" + num).substr(-size); +} async function main() { const libFiles = (await fs.readdir(libFolder)).map(n => normalizePath(path.join("/.lib", n))); const testsPerShared = shardCount && Math.round(allTests.length / shardCount); - const [start, end] = shard == undefined || shardCount == undefined || testsPerShared == undefined ? + const [start, end] = shard === undefined || shardCount === undefined || testsPerShared === undefined ? [0, allTests.length] : - [shard * testsPerShared, (shard == shardCount - 1) ? allTests.length : (shard + 1) * testsPerShared]; + [shard * testsPerShared, (shard === shardCount - 1) ? allTests.length : (shard + 1) * testsPerShared]; for (let count = start; count < end; count++) { const testFile = normalizePath(allTests[count]); diff --git a/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts b/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts index da0990b88785d..f34fa25643628 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts @@ -2,8 +2,7 @@ import { CompilerOptions, Diagnostic } from "typescript"; import * as ts from "typescript"; import { compareStringsCaseSensitive, hasProperty,map, startsWith } from "../../compiler/lang-utils"; -import { fileExtensionIs, getNormalizedAbsolutePath, normalizeSlashes, toPath } from "../../compiler/path-utils"; -import { createGetCanonicalFileName } from "../../compiler/path-utils"; +import { createGetCanonicalFileName, fileExtensionIs, getNormalizedAbsolutePath, normalizeSlashes, toPath } from "../../compiler/path-utils"; import { cloneCompilerOptions, getEmitScriptTarget } from "../../compiler/utils"; import * as compiler from "./compiler"; import * as fakes from "./fakesHosts"; @@ -104,9 +103,9 @@ export function compileFiles( inputFiles: TestFile[], otherFiles: TestFile[], harnessSettings: TestCaseParser.CompilerSettings | undefined, - compilerOptions: ts.CompilerOptions | undefined, + compilerOptions?: ts.CompilerOptions | undefined, // Current directory is needed for rwcRunner to be able to use currentDirectory defined in json file - currentDirectory: string | undefined, + currentDirectory?: string | undefined, symlinks?: vfs.FileSet ): compiler.CompilationResult { const options: ts.CompilerOptions & HarnessOptions = compilerOptions ? cloneCompilerOptions(compilerOptions) : { noResolve: false }; diff --git a/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts b/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts index b325dff0bc261..a6d11240f7f48 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts @@ -4,7 +4,7 @@ import * as lang from "../../compiler/lang-utils"; import { fileExtensionIs } from "../../compiler/path-utils"; import { getDeclarationEmitExtensionForPath, getOutputExtension } from "../../compiler/utils"; import * as collections from "./collections"; -import * as fakes from "./fakesHosts"; +import * as fakes from "./fakesHosts"; import * as documents from "./test-document"; import * as vfs from "./vfs"; import * as vpath from "./vpath"; @@ -254,15 +254,21 @@ export function compileFiles(host: fakes.CompilerHost, rootFiles: string[] | und const preErrors = preProgram && ts.getPreEmitDiagnostics(preProgram); const program = ts.createProgram(rootFiles || [], compilerOptions, host); - const emitResult = program.emit(undefined, (fileName, text, writeByteOrderMark) => { - // If there are errors TS will ot emit declaration files. We want then regardless of errors. - if(!vpath.isAbsolute(fileName)) { - fileName = vpath.resolve(host.vfs.cwd(), fileName); - } - if(host.outputs.some(d => d.file === fileName)) return; - host.writeFile(fileName, text, writeByteOrderMark); - // @ts-expect-error We use forceDts emit documented flag - }, undefined, undefined,undefined, true); + const emitResult = program.emit( + /*targetSourceFile*/ undefined, + (fileName, text, writeByteOrderMark) => { + // If there are errors TS will ot emit declaration files. We want then regardless of errors. + if(!vpath.isAbsolute(fileName)) { + fileName = vpath.resolve(host.vfs.cwd(), fileName); + } + if(host.outputs.some(d => d.file === fileName)) return; + host.writeFile(fileName, text, writeByteOrderMark); + }, + /*cancellationToken*/ undefined, + /*emitOnlyDtsFiles*/ undefined, + /*customTransformers*/ undefined, + // @ts-expect-error We use forceDts emit documented flag + /*forceEmit*/ true); const postErrors = ts.getPreEmitDiagnostics(program); const longerErrors = lang.length(preErrors) > postErrors.length ? preErrors : postErrors; const shorterErrors = longerErrors === preErrors ? postErrors : preErrors; diff --git a/external-declarations/src/test-runner/tsc-infrastructure/diagnosticInformationMap.generated.ts b/external-declarations/src/test-runner/tsc-infrastructure/diagnosticInformationMap.generated.ts new file mode 100644 index 0000000000000..e4d7ed614ed3f --- /dev/null +++ b/external-declarations/src/test-runner/tsc-infrastructure/diagnosticInformationMap.generated.ts @@ -0,0 +1,1893 @@ +// +// generated from 'src/compiler/diagnosticMessages.json' + +import { DiagnosticCategory, DiagnosticMessage } from "typescript"; + + +function diag(code: number, category: DiagnosticCategory, key: string, message: string, reportsUnnecessary?: {}, elidedInCompatabilityPyramid?: boolean, reportsDeprecated?: {}): DiagnosticMessage { + return { code, category, key, message, reportsUnnecessary, reportsDeprecated }; +} + +/** @internal */ +export const Diagnostics = { + Unterminated_string_literal: diag(1002, DiagnosticCategory.Error, "Unterminated_string_literal_1002", "Unterminated string literal."), + Identifier_expected: diag(1003, DiagnosticCategory.Error, "Identifier_expected_1003", "Identifier expected."), + _0_expected: diag(1005, DiagnosticCategory.Error, "_0_expected_1005", "'{0}' expected."), + A_file_cannot_have_a_reference_to_itself: diag(1006, DiagnosticCategory.Error, "A_file_cannot_have_a_reference_to_itself_1006", "A file cannot have a reference to itself."), + The_parser_expected_to_find_a_1_to_match_the_0_token_here: diag(1007, DiagnosticCategory.Error, "The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007", "The parser expected to find a '{1}' to match the '{0}' token here."), + Trailing_comma_not_allowed: diag(1009, DiagnosticCategory.Error, "Trailing_comma_not_allowed_1009", "Trailing comma not allowed."), + Asterisk_Slash_expected: diag(1010, DiagnosticCategory.Error, "Asterisk_Slash_expected_1010", "'*/' expected."), + An_element_access_expression_should_take_an_argument: diag(1011, DiagnosticCategory.Error, "An_element_access_expression_should_take_an_argument_1011", "An element access expression should take an argument."), + Unexpected_token: diag(1012, DiagnosticCategory.Error, "Unexpected_token_1012", "Unexpected token."), + A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma: diag(1013, DiagnosticCategory.Error, "A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013", "A rest parameter or binding pattern may not have a trailing comma."), + A_rest_parameter_must_be_last_in_a_parameter_list: diag(1014, DiagnosticCategory.Error, "A_rest_parameter_must_be_last_in_a_parameter_list_1014", "A rest parameter must be last in a parameter list."), + Parameter_cannot_have_question_mark_and_initializer: diag(1015, DiagnosticCategory.Error, "Parameter_cannot_have_question_mark_and_initializer_1015", "Parameter cannot have question mark and initializer."), + A_required_parameter_cannot_follow_an_optional_parameter: diag(1016, DiagnosticCategory.Error, "A_required_parameter_cannot_follow_an_optional_parameter_1016", "A required parameter cannot follow an optional parameter."), + An_index_signature_cannot_have_a_rest_parameter: diag(1017, DiagnosticCategory.Error, "An_index_signature_cannot_have_a_rest_parameter_1017", "An index signature cannot have a rest parameter."), + An_index_signature_parameter_cannot_have_an_accessibility_modifier: diag(1018, DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018", "An index signature parameter cannot have an accessibility modifier."), + An_index_signature_parameter_cannot_have_a_question_mark: diag(1019, DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_a_question_mark_1019", "An index signature parameter cannot have a question mark."), + An_index_signature_parameter_cannot_have_an_initializer: diag(1020, DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_an_initializer_1020", "An index signature parameter cannot have an initializer."), + An_index_signature_must_have_a_type_annotation: diag(1021, DiagnosticCategory.Error, "An_index_signature_must_have_a_type_annotation_1021", "An index signature must have a type annotation."), + An_index_signature_parameter_must_have_a_type_annotation: diag(1022, DiagnosticCategory.Error, "An_index_signature_parameter_must_have_a_type_annotation_1022", "An index signature parameter must have a type annotation."), + readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature: diag(1024, DiagnosticCategory.Error, "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", "'readonly' modifier can only appear on a property declaration or index signature."), + An_index_signature_cannot_have_a_trailing_comma: diag(1025, DiagnosticCategory.Error, "An_index_signature_cannot_have_a_trailing_comma_1025", "An index signature cannot have a trailing comma."), + Accessibility_modifier_already_seen: diag(1028, DiagnosticCategory.Error, "Accessibility_modifier_already_seen_1028", "Accessibility modifier already seen."), + _0_modifier_must_precede_1_modifier: diag(1029, DiagnosticCategory.Error, "_0_modifier_must_precede_1_modifier_1029", "'{0}' modifier must precede '{1}' modifier."), + _0_modifier_already_seen: diag(1030, DiagnosticCategory.Error, "_0_modifier_already_seen_1030", "'{0}' modifier already seen."), + _0_modifier_cannot_appear_on_class_elements_of_this_kind: diag(1031, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031", "'{0}' modifier cannot appear on class elements of this kind."), + super_must_be_followed_by_an_argument_list_or_member_access: diag(1034, DiagnosticCategory.Error, "super_must_be_followed_by_an_argument_list_or_member_access_1034", "'super' must be followed by an argument list or member access."), + Only_ambient_modules_can_use_quoted_names: diag(1035, DiagnosticCategory.Error, "Only_ambient_modules_can_use_quoted_names_1035", "Only ambient modules can use quoted names."), + Statements_are_not_allowed_in_ambient_contexts: diag(1036, DiagnosticCategory.Error, "Statements_are_not_allowed_in_ambient_contexts_1036", "Statements are not allowed in ambient contexts."), + A_declare_modifier_cannot_be_used_in_an_already_ambient_context: diag(1038, DiagnosticCategory.Error, "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038", "A 'declare' modifier cannot be used in an already ambient context."), + Initializers_are_not_allowed_in_ambient_contexts: diag(1039, DiagnosticCategory.Error, "Initializers_are_not_allowed_in_ambient_contexts_1039", "Initializers are not allowed in ambient contexts."), + _0_modifier_cannot_be_used_in_an_ambient_context: diag(1040, DiagnosticCategory.Error, "_0_modifier_cannot_be_used_in_an_ambient_context_1040", "'{0}' modifier cannot be used in an ambient context."), + _0_modifier_cannot_be_used_here: diag(1042, DiagnosticCategory.Error, "_0_modifier_cannot_be_used_here_1042", "'{0}' modifier cannot be used here."), + _0_modifier_cannot_appear_on_a_module_or_namespace_element: diag(1044, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044", "'{0}' modifier cannot appear on a module or namespace element."), + Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier: diag(1046, DiagnosticCategory.Error, "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046", "Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."), + A_rest_parameter_cannot_be_optional: diag(1047, DiagnosticCategory.Error, "A_rest_parameter_cannot_be_optional_1047", "A rest parameter cannot be optional."), + A_rest_parameter_cannot_have_an_initializer: diag(1048, DiagnosticCategory.Error, "A_rest_parameter_cannot_have_an_initializer_1048", "A rest parameter cannot have an initializer."), + A_set_accessor_must_have_exactly_one_parameter: diag(1049, DiagnosticCategory.Error, "A_set_accessor_must_have_exactly_one_parameter_1049", "A 'set' accessor must have exactly one parameter."), + A_set_accessor_cannot_have_an_optional_parameter: diag(1051, DiagnosticCategory.Error, "A_set_accessor_cannot_have_an_optional_parameter_1051", "A 'set' accessor cannot have an optional parameter."), + A_set_accessor_parameter_cannot_have_an_initializer: diag(1052, DiagnosticCategory.Error, "A_set_accessor_parameter_cannot_have_an_initializer_1052", "A 'set' accessor parameter cannot have an initializer."), + A_set_accessor_cannot_have_rest_parameter: diag(1053, DiagnosticCategory.Error, "A_set_accessor_cannot_have_rest_parameter_1053", "A 'set' accessor cannot have rest parameter."), + A_get_accessor_cannot_have_parameters: diag(1054, DiagnosticCategory.Error, "A_get_accessor_cannot_have_parameters_1054", "A 'get' accessor cannot have parameters."), + Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value: diag(1055, DiagnosticCategory.Error, "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055", "Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value."), + Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: diag(1056, DiagnosticCategory.Error, "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056", "Accessors are only available when targeting ECMAScript 5 and higher."), + The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1058, DiagnosticCategory.Error, "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058", "The return type of an async function must either be a valid promise or must not contain a callable 'then' member."), + A_promise_must_have_a_then_method: diag(1059, DiagnosticCategory.Error, "A_promise_must_have_a_then_method_1059", "A promise must have a 'then' method."), + The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback: diag(1060, DiagnosticCategory.Error, "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060", "The first parameter of the 'then' method of a promise must be a callback."), + Enum_member_must_have_initializer: diag(1061, DiagnosticCategory.Error, "Enum_member_must_have_initializer_1061", "Enum member must have initializer."), + Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: diag(1062, DiagnosticCategory.Error, "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."), + An_export_assignment_cannot_be_used_in_a_namespace: diag(1063, DiagnosticCategory.Error, "An_export_assignment_cannot_be_used_in_a_namespace_1063", "An export assignment cannot be used in a namespace."), + The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0: diag(1064, DiagnosticCategory.Error, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064", "The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"), + In_ambient_enum_declarations_member_initializer_must_be_constant_expression: diag(1066, DiagnosticCategory.Error, "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", "In ambient enum declarations member initializer must be constant expression."), + Unexpected_token_A_constructor_method_accessor_or_property_was_expected: diag(1068, DiagnosticCategory.Error, "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068", "Unexpected token. A constructor, method, accessor, or property was expected."), + Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces: diag(1069, DiagnosticCategory.Error, "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069", "Unexpected token. A type parameter name was expected without curly braces."), + _0_modifier_cannot_appear_on_a_type_member: diag(1070, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_type_member_1070", "'{0}' modifier cannot appear on a type member."), + _0_modifier_cannot_appear_on_an_index_signature: diag(1071, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_an_index_signature_1071", "'{0}' modifier cannot appear on an index signature."), + A_0_modifier_cannot_be_used_with_an_import_declaration: diag(1079, DiagnosticCategory.Error, "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", "A '{0}' modifier cannot be used with an import declaration."), + Invalid_reference_directive_syntax: diag(1084, DiagnosticCategory.Error, "Invalid_reference_directive_syntax_1084", "Invalid 'reference' directive syntax."), + Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0: diag(1085, DiagnosticCategory.Error, "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085", "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'."), + _0_modifier_cannot_appear_on_a_constructor_declaration: diag(1089, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_constructor_declaration_1089", "'{0}' modifier cannot appear on a constructor declaration."), + _0_modifier_cannot_appear_on_a_parameter: diag(1090, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_parameter_1090", "'{0}' modifier cannot appear on a parameter."), + Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: diag(1091, DiagnosticCategory.Error, "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091", "Only a single variable declaration is allowed in a 'for...in' statement."), + Type_parameters_cannot_appear_on_a_constructor_declaration: diag(1092, DiagnosticCategory.Error, "Type_parameters_cannot_appear_on_a_constructor_declaration_1092", "Type parameters cannot appear on a constructor declaration."), + Type_annotation_cannot_appear_on_a_constructor_declaration: diag(1093, DiagnosticCategory.Error, "Type_annotation_cannot_appear_on_a_constructor_declaration_1093", "Type annotation cannot appear on a constructor declaration."), + An_accessor_cannot_have_type_parameters: diag(1094, DiagnosticCategory.Error, "An_accessor_cannot_have_type_parameters_1094", "An accessor cannot have type parameters."), + A_set_accessor_cannot_have_a_return_type_annotation: diag(1095, DiagnosticCategory.Error, "A_set_accessor_cannot_have_a_return_type_annotation_1095", "A 'set' accessor cannot have a return type annotation."), + An_index_signature_must_have_exactly_one_parameter: diag(1096, DiagnosticCategory.Error, "An_index_signature_must_have_exactly_one_parameter_1096", "An index signature must have exactly one parameter."), + _0_list_cannot_be_empty: diag(1097, DiagnosticCategory.Error, "_0_list_cannot_be_empty_1097", "'{0}' list cannot be empty."), + Type_parameter_list_cannot_be_empty: diag(1098, DiagnosticCategory.Error, "Type_parameter_list_cannot_be_empty_1098", "Type parameter list cannot be empty."), + Type_argument_list_cannot_be_empty: diag(1099, DiagnosticCategory.Error, "Type_argument_list_cannot_be_empty_1099", "Type argument list cannot be empty."), + Invalid_use_of_0_in_strict_mode: diag(1100, DiagnosticCategory.Error, "Invalid_use_of_0_in_strict_mode_1100", "Invalid use of '{0}' in strict mode."), + with_statements_are_not_allowed_in_strict_mode: diag(1101, DiagnosticCategory.Error, "with_statements_are_not_allowed_in_strict_mode_1101", "'with' statements are not allowed in strict mode."), + delete_cannot_be_called_on_an_identifier_in_strict_mode: diag(1102, DiagnosticCategory.Error, "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102", "'delete' cannot be called on an identifier in strict mode."), + for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1103, DiagnosticCategory.Error, "for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103", "'for await' loops are only allowed within async functions and at the top levels of modules."), + A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: diag(1104, DiagnosticCategory.Error, "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104", "A 'continue' statement can only be used within an enclosing iteration statement."), + A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: diag(1105, DiagnosticCategory.Error, "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105", "A 'break' statement can only be used within an enclosing iteration or switch statement."), + The_left_hand_side_of_a_for_of_statement_may_not_be_async: diag(1106, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106", "The left-hand side of a 'for...of' statement may not be 'async'."), + Jump_target_cannot_cross_function_boundary: diag(1107, DiagnosticCategory.Error, "Jump_target_cannot_cross_function_boundary_1107", "Jump target cannot cross function boundary."), + A_return_statement_can_only_be_used_within_a_function_body: diag(1108, DiagnosticCategory.Error, "A_return_statement_can_only_be_used_within_a_function_body_1108", "A 'return' statement can only be used within a function body."), + Expression_expected: diag(1109, DiagnosticCategory.Error, "Expression_expected_1109", "Expression expected."), + Type_expected: diag(1110, DiagnosticCategory.Error, "Type_expected_1110", "Type expected."), + A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: diag(1113, DiagnosticCategory.Error, "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", "A 'default' clause cannot appear more than once in a 'switch' statement."), + Duplicate_label_0: diag(1114, DiagnosticCategory.Error, "Duplicate_label_0_1114", "Duplicate label '{0}'."), + A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: diag(1115, DiagnosticCategory.Error, "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", "A 'continue' statement can only jump to a label of an enclosing iteration statement."), + A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: diag(1116, DiagnosticCategory.Error, "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116", "A 'break' statement can only jump to a label of an enclosing statement."), + An_object_literal_cannot_have_multiple_properties_with_the_same_name: diag(1117, DiagnosticCategory.Error, "An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117", "An object literal cannot have multiple properties with the same name."), + An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: diag(1118, DiagnosticCategory.Error, "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118", "An object literal cannot have multiple get/set accessors with the same name."), + An_object_literal_cannot_have_property_and_accessor_with_the_same_name: diag(1119, DiagnosticCategory.Error, "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119", "An object literal cannot have property and accessor with the same name."), + An_export_assignment_cannot_have_modifiers: diag(1120, DiagnosticCategory.Error, "An_export_assignment_cannot_have_modifiers_1120", "An export assignment cannot have modifiers."), + Octal_literals_are_not_allowed_in_strict_mode: diag(1121, DiagnosticCategory.Error, "Octal_literals_are_not_allowed_in_strict_mode_1121", "Octal literals are not allowed in strict mode."), + Variable_declaration_list_cannot_be_empty: diag(1123, DiagnosticCategory.Error, "Variable_declaration_list_cannot_be_empty_1123", "Variable declaration list cannot be empty."), + Digit_expected: diag(1124, DiagnosticCategory.Error, "Digit_expected_1124", "Digit expected."), + Hexadecimal_digit_expected: diag(1125, DiagnosticCategory.Error, "Hexadecimal_digit_expected_1125", "Hexadecimal digit expected."), + Unexpected_end_of_text: diag(1126, DiagnosticCategory.Error, "Unexpected_end_of_text_1126", "Unexpected end of text."), + Invalid_character: diag(1127, DiagnosticCategory.Error, "Invalid_character_1127", "Invalid character."), + Declaration_or_statement_expected: diag(1128, DiagnosticCategory.Error, "Declaration_or_statement_expected_1128", "Declaration or statement expected."), + Statement_expected: diag(1129, DiagnosticCategory.Error, "Statement_expected_1129", "Statement expected."), + case_or_default_expected: diag(1130, DiagnosticCategory.Error, "case_or_default_expected_1130", "'case' or 'default' expected."), + Property_or_signature_expected: diag(1131, DiagnosticCategory.Error, "Property_or_signature_expected_1131", "Property or signature expected."), + Enum_member_expected: diag(1132, DiagnosticCategory.Error, "Enum_member_expected_1132", "Enum member expected."), + Variable_declaration_expected: diag(1134, DiagnosticCategory.Error, "Variable_declaration_expected_1134", "Variable declaration expected."), + Argument_expression_expected: diag(1135, DiagnosticCategory.Error, "Argument_expression_expected_1135", "Argument expression expected."), + Property_assignment_expected: diag(1136, DiagnosticCategory.Error, "Property_assignment_expected_1136", "Property assignment expected."), + Expression_or_comma_expected: diag(1137, DiagnosticCategory.Error, "Expression_or_comma_expected_1137", "Expression or comma expected."), + Parameter_declaration_expected: diag(1138, DiagnosticCategory.Error, "Parameter_declaration_expected_1138", "Parameter declaration expected."), + Type_parameter_declaration_expected: diag(1139, DiagnosticCategory.Error, "Type_parameter_declaration_expected_1139", "Type parameter declaration expected."), + Type_argument_expected: diag(1140, DiagnosticCategory.Error, "Type_argument_expected_1140", "Type argument expected."), + String_literal_expected: diag(1141, DiagnosticCategory.Error, "String_literal_expected_1141", "String literal expected."), + Line_break_not_permitted_here: diag(1142, DiagnosticCategory.Error, "Line_break_not_permitted_here_1142", "Line break not permitted here."), + or_expected: diag(1144, DiagnosticCategory.Error, "or_expected_1144", "'{' or ';' expected."), + or_JSX_element_expected: diag(1145, DiagnosticCategory.Error, "or_JSX_element_expected_1145", "'{' or JSX element expected."), + Declaration_expected: diag(1146, DiagnosticCategory.Error, "Declaration_expected_1146", "Declaration expected."), + Import_declarations_in_a_namespace_cannot_reference_a_module: diag(1147, DiagnosticCategory.Error, "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", "Import declarations in a namespace cannot reference a module."), + Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: diag(1148, DiagnosticCategory.Error, "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", "Cannot use imports, exports, or module augmentations when '--module' is 'none'."), + File_name_0_differs_from_already_included_file_name_1_only_in_casing: diag(1149, DiagnosticCategory.Error, "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", "File name '{0}' differs from already included file name '{1}' only in casing."), + const_declarations_must_be_initialized: diag(1155, DiagnosticCategory.Error, "const_declarations_must_be_initialized_1155", "'const' declarations must be initialized."), + const_declarations_can_only_be_declared_inside_a_block: diag(1156, DiagnosticCategory.Error, "const_declarations_can_only_be_declared_inside_a_block_1156", "'const' declarations can only be declared inside a block."), + let_declarations_can_only_be_declared_inside_a_block: diag(1157, DiagnosticCategory.Error, "let_declarations_can_only_be_declared_inside_a_block_1157", "'let' declarations can only be declared inside a block."), + Unterminated_template_literal: diag(1160, DiagnosticCategory.Error, "Unterminated_template_literal_1160", "Unterminated template literal."), + Unterminated_regular_expression_literal: diag(1161, DiagnosticCategory.Error, "Unterminated_regular_expression_literal_1161", "Unterminated regular expression literal."), + An_object_member_cannot_be_declared_optional: diag(1162, DiagnosticCategory.Error, "An_object_member_cannot_be_declared_optional_1162", "An object member cannot be declared optional."), + A_yield_expression_is_only_allowed_in_a_generator_body: diag(1163, DiagnosticCategory.Error, "A_yield_expression_is_only_allowed_in_a_generator_body_1163", "A 'yield' expression is only allowed in a generator body."), + Computed_property_names_are_not_allowed_in_enums: diag(1164, DiagnosticCategory.Error, "Computed_property_names_are_not_allowed_in_enums_1164", "Computed property names are not allowed in enums."), + A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1165, DiagnosticCategory.Error, "A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165", "A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type: diag(1166, DiagnosticCategory.Error, "A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166", "A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type."), + A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1168, DiagnosticCategory.Error, "A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168", "A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1169, DiagnosticCategory.Error, "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169", "A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1170, DiagnosticCategory.Error, "A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170", "A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."), + A_comma_expression_is_not_allowed_in_a_computed_property_name: diag(1171, DiagnosticCategory.Error, "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171", "A comma expression is not allowed in a computed property name."), + extends_clause_already_seen: diag(1172, DiagnosticCategory.Error, "extends_clause_already_seen_1172", "'extends' clause already seen."), + extends_clause_must_precede_implements_clause: diag(1173, DiagnosticCategory.Error, "extends_clause_must_precede_implements_clause_1173", "'extends' clause must precede 'implements' clause."), + Classes_can_only_extend_a_single_class: diag(1174, DiagnosticCategory.Error, "Classes_can_only_extend_a_single_class_1174", "Classes can only extend a single class."), + implements_clause_already_seen: diag(1175, DiagnosticCategory.Error, "implements_clause_already_seen_1175", "'implements' clause already seen."), + Interface_declaration_cannot_have_implements_clause: diag(1176, DiagnosticCategory.Error, "Interface_declaration_cannot_have_implements_clause_1176", "Interface declaration cannot have 'implements' clause."), + Binary_digit_expected: diag(1177, DiagnosticCategory.Error, "Binary_digit_expected_1177", "Binary digit expected."), + Octal_digit_expected: diag(1178, DiagnosticCategory.Error, "Octal_digit_expected_1178", "Octal digit expected."), + Unexpected_token_expected: diag(1179, DiagnosticCategory.Error, "Unexpected_token_expected_1179", "Unexpected token. '{' expected."), + Property_destructuring_pattern_expected: diag(1180, DiagnosticCategory.Error, "Property_destructuring_pattern_expected_1180", "Property destructuring pattern expected."), + Array_element_destructuring_pattern_expected: diag(1181, DiagnosticCategory.Error, "Array_element_destructuring_pattern_expected_1181", "Array element destructuring pattern expected."), + A_destructuring_declaration_must_have_an_initializer: diag(1182, DiagnosticCategory.Error, "A_destructuring_declaration_must_have_an_initializer_1182", "A destructuring declaration must have an initializer."), + An_implementation_cannot_be_declared_in_ambient_contexts: diag(1183, DiagnosticCategory.Error, "An_implementation_cannot_be_declared_in_ambient_contexts_1183", "An implementation cannot be declared in ambient contexts."), + Modifiers_cannot_appear_here: diag(1184, DiagnosticCategory.Error, "Modifiers_cannot_appear_here_1184", "Modifiers cannot appear here."), + Merge_conflict_marker_encountered: diag(1185, DiagnosticCategory.Error, "Merge_conflict_marker_encountered_1185", "Merge conflict marker encountered."), + A_rest_element_cannot_have_an_initializer: diag(1186, DiagnosticCategory.Error, "A_rest_element_cannot_have_an_initializer_1186", "A rest element cannot have an initializer."), + A_parameter_property_may_not_be_declared_using_a_binding_pattern: diag(1187, DiagnosticCategory.Error, "A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187", "A parameter property may not be declared using a binding pattern."), + Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement: diag(1188, DiagnosticCategory.Error, "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188", "Only a single variable declaration is allowed in a 'for...of' statement."), + The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer: diag(1189, DiagnosticCategory.Error, "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189", "The variable declaration of a 'for...in' statement cannot have an initializer."), + The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer: diag(1190, DiagnosticCategory.Error, "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190", "The variable declaration of a 'for...of' statement cannot have an initializer."), + An_import_declaration_cannot_have_modifiers: diag(1191, DiagnosticCategory.Error, "An_import_declaration_cannot_have_modifiers_1191", "An import declaration cannot have modifiers."), + Module_0_has_no_default_export: diag(1192, DiagnosticCategory.Error, "Module_0_has_no_default_export_1192", "Module '{0}' has no default export."), + An_export_declaration_cannot_have_modifiers: diag(1193, DiagnosticCategory.Error, "An_export_declaration_cannot_have_modifiers_1193", "An export declaration cannot have modifiers."), + Export_declarations_are_not_permitted_in_a_namespace: diag(1194, DiagnosticCategory.Error, "Export_declarations_are_not_permitted_in_a_namespace_1194", "Export declarations are not permitted in a namespace."), + export_Asterisk_does_not_re_export_a_default: diag(1195, DiagnosticCategory.Error, "export_Asterisk_does_not_re_export_a_default_1195", "'export *' does not re-export a default."), + Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified: diag(1196, DiagnosticCategory.Error, "Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196", "Catch clause variable type annotation must be 'any' or 'unknown' if specified."), + Catch_clause_variable_cannot_have_an_initializer: diag(1197, DiagnosticCategory.Error, "Catch_clause_variable_cannot_have_an_initializer_1197", "Catch clause variable cannot have an initializer."), + An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: diag(1198, DiagnosticCategory.Error, "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198", "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."), + Unterminated_Unicode_escape_sequence: diag(1199, DiagnosticCategory.Error, "Unterminated_Unicode_escape_sequence_1199", "Unterminated Unicode escape sequence."), + Line_terminator_not_permitted_before_arrow: diag(1200, DiagnosticCategory.Error, "Line_terminator_not_permitted_before_arrow_1200", "Line terminator not permitted before arrow."), + Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: diag(1202, DiagnosticCategory.Error, "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202", "Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead."), + Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead: diag(1203, DiagnosticCategory.Error, "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203", "Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."), + Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type: diag(1205, DiagnosticCategory.Error, "Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205", "Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'."), + Decorators_are_not_valid_here: diag(1206, DiagnosticCategory.Error, "Decorators_are_not_valid_here_1206", "Decorators are not valid here."), + Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: diag(1207, DiagnosticCategory.Error, "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", "Decorators cannot be applied to multiple get/set accessors of the same name."), + _0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_import_export_or_an_empty_export_statement_to_make_it_a_module: diag(1208, DiagnosticCategory.Error, "_0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_imp_1208", "'{0}' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module."), + Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0: diag(1209, DiagnosticCategory.Error, "Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209", "Invalid optional chain from new expression. Did you mean to call '{0}()'?"), + Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode: diag(1210, DiagnosticCategory.Error, "Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210", "Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."), + A_class_declaration_without_the_default_modifier_must_have_a_name: diag(1211, DiagnosticCategory.Error, "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", "A class declaration without the 'default' modifier must have a name."), + Identifier_expected_0_is_a_reserved_word_in_strict_mode: diag(1212, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", "Identifier expected. '{0}' is a reserved word in strict mode."), + Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: diag(1213, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."), + Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode: diag(1214, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214", "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."), + Invalid_use_of_0_Modules_are_automatically_in_strict_mode: diag(1215, DiagnosticCategory.Error, "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215", "Invalid use of '{0}'. Modules are automatically in strict mode."), + Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules: diag(1216, DiagnosticCategory.Error, "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216", "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."), + Export_assignment_is_not_supported_when_module_flag_is_system: diag(1218, DiagnosticCategory.Error, "Export_assignment_is_not_supported_when_module_flag_is_system_1218", "Export assignment is not supported when '--module' flag is 'system'."), + Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning: diag(1219, DiagnosticCategory.Error, "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219", "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning."), + Generators_are_not_allowed_in_an_ambient_context: diag(1221, DiagnosticCategory.Error, "Generators_are_not_allowed_in_an_ambient_context_1221", "Generators are not allowed in an ambient context."), + An_overload_signature_cannot_be_declared_as_a_generator: diag(1222, DiagnosticCategory.Error, "An_overload_signature_cannot_be_declared_as_a_generator_1222", "An overload signature cannot be declared as a generator."), + _0_tag_already_specified: diag(1223, DiagnosticCategory.Error, "_0_tag_already_specified_1223", "'{0}' tag already specified."), + Signature_0_must_be_a_type_predicate: diag(1224, DiagnosticCategory.Error, "Signature_0_must_be_a_type_predicate_1224", "Signature '{0}' must be a type predicate."), + Cannot_find_parameter_0: diag(1225, DiagnosticCategory.Error, "Cannot_find_parameter_0_1225", "Cannot find parameter '{0}'."), + Type_predicate_0_is_not_assignable_to_1: diag(1226, DiagnosticCategory.Error, "Type_predicate_0_is_not_assignable_to_1_1226", "Type predicate '{0}' is not assignable to '{1}'."), + Parameter_0_is_not_in_the_same_position_as_parameter_1: diag(1227, DiagnosticCategory.Error, "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227", "Parameter '{0}' is not in the same position as parameter '{1}'."), + A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods: diag(1228, DiagnosticCategory.Error, "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228", "A type predicate is only allowed in return type position for functions and methods."), + A_type_predicate_cannot_reference_a_rest_parameter: diag(1229, DiagnosticCategory.Error, "A_type_predicate_cannot_reference_a_rest_parameter_1229", "A type predicate cannot reference a rest parameter."), + A_type_predicate_cannot_reference_element_0_in_a_binding_pattern: diag(1230, DiagnosticCategory.Error, "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230", "A type predicate cannot reference element '{0}' in a binding pattern."), + An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration: diag(1231, DiagnosticCategory.Error, "An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231", "An export assignment must be at the top level of a file or module declaration."), + An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module: diag(1232, DiagnosticCategory.Error, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232", "An import declaration can only be used at the top level of a namespace or module."), + An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module: diag(1233, DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233", "An export declaration can only be used at the top level of a namespace or module."), + An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file: diag(1234, DiagnosticCategory.Error, "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234", "An ambient module declaration is only allowed at the top level in a file."), + A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module: diag(1235, DiagnosticCategory.Error, "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235", "A namespace declaration is only allowed at the top level of a namespace or module."), + The_return_type_of_a_property_decorator_function_must_be_either_void_or_any: diag(1236, DiagnosticCategory.Error, "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236", "The return type of a property decorator function must be either 'void' or 'any'."), + The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any: diag(1237, DiagnosticCategory.Error, "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237", "The return type of a parameter decorator function must be either 'void' or 'any'."), + Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression: diag(1238, DiagnosticCategory.Error, "Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238", "Unable to resolve signature of class decorator when called as an expression."), + Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression: diag(1239, DiagnosticCategory.Error, "Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239", "Unable to resolve signature of parameter decorator when called as an expression."), + Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression: diag(1240, DiagnosticCategory.Error, "Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240", "Unable to resolve signature of property decorator when called as an expression."), + Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression: diag(1241, DiagnosticCategory.Error, "Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241", "Unable to resolve signature of method decorator when called as an expression."), + abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration: diag(1242, DiagnosticCategory.Error, "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242", "'abstract' modifier can only appear on a class, method, or property declaration."), + _0_modifier_cannot_be_used_with_1_modifier: diag(1243, DiagnosticCategory.Error, "_0_modifier_cannot_be_used_with_1_modifier_1243", "'{0}' modifier cannot be used with '{1}' modifier."), + Abstract_methods_can_only_appear_within_an_abstract_class: diag(1244, DiagnosticCategory.Error, "Abstract_methods_can_only_appear_within_an_abstract_class_1244", "Abstract methods can only appear within an abstract class."), + Method_0_cannot_have_an_implementation_because_it_is_marked_abstract: diag(1245, DiagnosticCategory.Error, "Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245", "Method '{0}' cannot have an implementation because it is marked abstract."), + An_interface_property_cannot_have_an_initializer: diag(1246, DiagnosticCategory.Error, "An_interface_property_cannot_have_an_initializer_1246", "An interface property cannot have an initializer."), + A_type_literal_property_cannot_have_an_initializer: diag(1247, DiagnosticCategory.Error, "A_type_literal_property_cannot_have_an_initializer_1247", "A type literal property cannot have an initializer."), + A_class_member_cannot_have_the_0_keyword: diag(1248, DiagnosticCategory.Error, "A_class_member_cannot_have_the_0_keyword_1248", "A class member cannot have the '{0}' keyword."), + A_decorator_can_only_decorate_a_method_implementation_not_an_overload: diag(1249, DiagnosticCategory.Error, "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249", "A decorator can only decorate a method implementation, not an overload."), + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5: diag(1250, DiagnosticCategory.Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'."), + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode: diag(1251, DiagnosticCategory.Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode."), + Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode: diag(1252, DiagnosticCategory.Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode."), + A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference: diag(1254, DiagnosticCategory.Error, "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254", "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."), + A_definite_assignment_assertion_is_not_permitted_in_this_context: diag(1255, DiagnosticCategory.Error, "A_definite_assignment_assertion_is_not_permitted_in_this_context_1255", "A definite assignment assertion '!' is not permitted in this context."), + A_required_element_cannot_follow_an_optional_element: diag(1257, DiagnosticCategory.Error, "A_required_element_cannot_follow_an_optional_element_1257", "A required element cannot follow an optional element."), + A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration: diag(1258, DiagnosticCategory.Error, "A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258", "A default export must be at the top level of a file or module declaration."), + Module_0_can_only_be_default_imported_using_the_1_flag: diag(1259, DiagnosticCategory.Error, "Module_0_can_only_be_default_imported_using_the_1_flag_1259", "Module '{0}' can only be default-imported using the '{1}' flag"), + Keywords_cannot_contain_escape_characters: diag(1260, DiagnosticCategory.Error, "Keywords_cannot_contain_escape_characters_1260", "Keywords cannot contain escape characters."), + Already_included_file_name_0_differs_from_file_name_1_only_in_casing: diag(1261, DiagnosticCategory.Error, "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261", "Already included file name '{0}' differs from file name '{1}' only in casing."), + Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module: diag(1262, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262", "Identifier expected. '{0}' is a reserved word at the top-level of a module."), + Declarations_with_initializers_cannot_also_have_definite_assignment_assertions: diag(1263, DiagnosticCategory.Error, "Declarations_with_initializers_cannot_also_have_definite_assignment_assertions_1263", "Declarations with initializers cannot also have definite assignment assertions."), + Declarations_with_definite_assignment_assertions_must_also_have_type_annotations: diag(1264, DiagnosticCategory.Error, "Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264", "Declarations with definite assignment assertions must also have type annotations."), + A_rest_element_cannot_follow_another_rest_element: diag(1265, DiagnosticCategory.Error, "A_rest_element_cannot_follow_another_rest_element_1265", "A rest element cannot follow another rest element."), + An_optional_element_cannot_follow_a_rest_element: diag(1266, DiagnosticCategory.Error, "An_optional_element_cannot_follow_a_rest_element_1266", "An optional element cannot follow a rest element."), + Property_0_cannot_have_an_initializer_because_it_is_marked_abstract: diag(1267, DiagnosticCategory.Error, "Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267", "Property '{0}' cannot have an initializer because it is marked abstract."), + An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type: diag(1268, DiagnosticCategory.Error, "An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268", "An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."), + Cannot_use_export_import_on_a_type_or_type_only_namespace_when_the_isolatedModules_flag_is_provided: diag(1269, DiagnosticCategory.Error, "Cannot_use_export_import_on_a_type_or_type_only_namespace_when_the_isolatedModules_flag_is_provided_1269", "Cannot use 'export import' on a type or type-only namespace when the '--isolatedModules' flag is provided."), + Decorator_function_return_type_0_is_not_assignable_to_type_1: diag(1270, DiagnosticCategory.Error, "Decorator_function_return_type_0_is_not_assignable_to_type_1_1270", "Decorator function return type '{0}' is not assignable to type '{1}'."), + Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any: diag(1271, DiagnosticCategory.Error, "Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271", "Decorator function return type is '{0}' but is expected to be 'void' or 'any'."), + A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled: diag(1272, DiagnosticCategory.Error, "A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272", "A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."), + _0_modifier_cannot_appear_on_a_type_parameter: diag(1273, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_type_parameter_1273", "'{0}' modifier cannot appear on a type parameter"), + _0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias: diag(1274, DiagnosticCategory.Error, "_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274", "'{0}' modifier can only appear on a type parameter of a class, interface or type alias"), + accessor_modifier_can_only_appear_on_a_property_declaration: diag(1275, DiagnosticCategory.Error, "accessor_modifier_can_only_appear_on_a_property_declaration_1275", "'accessor' modifier can only appear on a property declaration."), + An_accessor_property_cannot_be_declared_optional: diag(1276, DiagnosticCategory.Error, "An_accessor_property_cannot_be_declared_optional_1276", "An 'accessor' property cannot be declared optional."), + with_statements_are_not_allowed_in_an_async_function_block: diag(1300, DiagnosticCategory.Error, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."), + await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, DiagnosticCategory.Error, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."), + The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, DiagnosticCategory.Error, "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309", "The current file is a CommonJS module and cannot use 'await' at the top level."), + Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern: diag(1312, DiagnosticCategory.Error, "Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312", "Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."), + The_body_of_an_if_statement_cannot_be_the_empty_statement: diag(1313, DiagnosticCategory.Error, "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313", "The body of an 'if' statement cannot be the empty statement."), + Global_module_exports_may_only_appear_in_module_files: diag(1314, DiagnosticCategory.Error, "Global_module_exports_may_only_appear_in_module_files_1314", "Global module exports may only appear in module files."), + Global_module_exports_may_only_appear_in_declaration_files: diag(1315, DiagnosticCategory.Error, "Global_module_exports_may_only_appear_in_declaration_files_1315", "Global module exports may only appear in declaration files."), + Global_module_exports_may_only_appear_at_top_level: diag(1316, DiagnosticCategory.Error, "Global_module_exports_may_only_appear_at_top_level_1316", "Global module exports may only appear at top level."), + A_parameter_property_cannot_be_declared_using_a_rest_parameter: diag(1317, DiagnosticCategory.Error, "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317", "A parameter property cannot be declared using a rest parameter."), + An_abstract_accessor_cannot_have_an_implementation: diag(1318, DiagnosticCategory.Error, "An_abstract_accessor_cannot_have_an_implementation_1318", "An abstract accessor cannot have an implementation."), + A_default_export_can_only_be_used_in_an_ECMAScript_style_module: diag(1319, DiagnosticCategory.Error, "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319", "A default export can only be used in an ECMAScript-style module."), + Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1320, DiagnosticCategory.Error, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."), + Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1321, DiagnosticCategory.Error, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."), + Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1322, DiagnosticCategory.Error, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."), + Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext: diag(1323, DiagnosticCategory.Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."), + Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext: diag(1324, DiagnosticCategory.Error, "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324", "Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'."), + Argument_of_dynamic_import_cannot_be_spread_element: diag(1325, DiagnosticCategory.Error, "Argument_of_dynamic_import_cannot_be_spread_element_1325", "Argument of dynamic import cannot be spread element."), + This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments: diag(1326, DiagnosticCategory.Error, "This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326", "This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."), + String_literal_with_double_quotes_expected: diag(1327, DiagnosticCategory.Error, "String_literal_with_double_quotes_expected_1327", "String literal with double quotes expected."), + Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal: diag(1328, DiagnosticCategory.Error, "Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328", "Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."), + _0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0: diag(1329, DiagnosticCategory.Error, "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329", "'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"), + A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly: diag(1330, DiagnosticCategory.Error, "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330", "A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."), + A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly: diag(1331, DiagnosticCategory.Error, "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331", "A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."), + A_variable_whose_type_is_a_unique_symbol_type_must_be_const: diag(1332, DiagnosticCategory.Error, "A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332", "A variable whose type is a 'unique symbol' type must be 'const'."), + unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name: diag(1333, DiagnosticCategory.Error, "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333", "'unique symbol' types may not be used on a variable declaration with a binding name."), + unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement: diag(1334, DiagnosticCategory.Error, "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334", "'unique symbol' types are only allowed on variables in a variable statement."), + unique_symbol_types_are_not_allowed_here: diag(1335, DiagnosticCategory.Error, "unique_symbol_types_are_not_allowed_here_1335", "'unique symbol' types are not allowed here."), + An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead: diag(1337, DiagnosticCategory.Error, "An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337", "An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."), + infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type: diag(1338, DiagnosticCategory.Error, "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338", "'infer' declarations are only permitted in the 'extends' clause of a conditional type."), + Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: diag(1339, DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."), + Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"), + Class_constructor_may_not_be_an_accessor: diag(1341, DiagnosticCategory.Error, "Class_constructor_may_not_be_an_accessor_1341", "Class constructor may not be an accessor."), + Type_arguments_cannot_be_used_here: diag(1342, DiagnosticCategory.Error, "Type_arguments_cannot_be_used_here_1342", "Type arguments cannot be used here."), + The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext: diag(1343, DiagnosticCategory.Error, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."), + A_label_is_not_allowed_here: diag(1344, DiagnosticCategory.Error, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."), + An_expression_of_type_void_cannot_be_tested_for_truthiness: diag(1345, DiagnosticCategory.Error, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."), + This_parameter_is_not_allowed_with_use_strict_directive: diag(1346, DiagnosticCategory.Error, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."), + use_strict_directive_cannot_be_used_with_non_simple_parameter_list: diag(1347, DiagnosticCategory.Error, "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347", "'use strict' directive cannot be used with non-simple parameter list."), + Non_simple_parameter_declared_here: diag(1348, DiagnosticCategory.Error, "Non_simple_parameter_declared_here_1348", "Non-simple parameter declared here."), + use_strict_directive_used_here: diag(1349, DiagnosticCategory.Error, "use_strict_directive_used_here_1349", "'use strict' directive used here."), + Print_the_final_configuration_instead_of_building: diag(1350, DiagnosticCategory.Message, "Print_the_final_configuration_instead_of_building_1350", "Print the final configuration instead of building."), + An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal: diag(1351, DiagnosticCategory.Error, "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351", "An identifier or keyword cannot immediately follow a numeric literal."), + A_bigint_literal_cannot_use_exponential_notation: diag(1352, DiagnosticCategory.Error, "A_bigint_literal_cannot_use_exponential_notation_1352", "A bigint literal cannot use exponential notation."), + A_bigint_literal_must_be_an_integer: diag(1353, DiagnosticCategory.Error, "A_bigint_literal_must_be_an_integer_1353", "A bigint literal must be an integer."), + readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types: diag(1354, DiagnosticCategory.Error, "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354", "'readonly' type modifier is only permitted on array and tuple literal types."), + A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals: diag(1355, DiagnosticCategory.Error, "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355", "A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."), + Did_you_mean_to_mark_this_function_as_async: diag(1356, DiagnosticCategory.Error, "Did_you_mean_to_mark_this_function_as_async_1356", "Did you mean to mark this function as 'async'?"), + An_enum_member_name_must_be_followed_by_a_or: diag(1357, DiagnosticCategory.Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."), + Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, DiagnosticCategory.Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."), + Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: diag(1359, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."), + Type_0_does_not_satisfy_the_expected_type_1: diag(1360, DiagnosticCategory.Error, "Type_0_does_not_satisfy_the_expected_type_1_1360", "Type '{0}' does not satisfy the expected type '{1}'."), + _0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type: diag(1361, DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361", "'{0}' cannot be used as a value because it was imported using 'import type'."), + _0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type: diag(1362, DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362", "'{0}' cannot be used as a value because it was exported using 'export type'."), + A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both: diag(1363, DiagnosticCategory.Error, "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363", "A type-only import can specify a default import or named bindings, but not both."), + Convert_to_type_only_export: diag(1364, DiagnosticCategory.Message, "Convert_to_type_only_export_1364", "Convert to type-only export"), + Convert_all_re_exported_types_to_type_only_exports: diag(1365, DiagnosticCategory.Message, "Convert_all_re_exported_types_to_type_only_exports_1365", "Convert all re-exported types to type-only exports"), + Split_into_two_separate_import_declarations: diag(1366, DiagnosticCategory.Message, "Split_into_two_separate_import_declarations_1366", "Split into two separate import declarations"), + Split_all_invalid_type_only_imports: diag(1367, DiagnosticCategory.Message, "Split_all_invalid_type_only_imports_1367", "Split all invalid type-only imports"), + Class_constructor_may_not_be_a_generator: diag(1368, DiagnosticCategory.Error, "Class_constructor_may_not_be_a_generator_1368", "Class constructor may not be a generator."), + Did_you_mean_0: diag(1369, DiagnosticCategory.Message, "Did_you_mean_0_1369", "Did you mean '{0}'?"), + This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error: diag(1371, DiagnosticCategory.Error, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371", "This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'."), + Convert_to_type_only_import: diag(1373, DiagnosticCategory.Message, "Convert_to_type_only_import_1373", "Convert to type-only import"), + Convert_all_imports_not_used_as_a_value_to_type_only_imports: diag(1374, DiagnosticCategory.Message, "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374", "Convert all imports not used as a value to type-only imports"), + await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1375, DiagnosticCategory.Error, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), + _0_was_imported_here: diag(1376, DiagnosticCategory.Message, "_0_was_imported_here_1376", "'{0}' was imported here."), + _0_was_exported_here: diag(1377, DiagnosticCategory.Message, "_0_was_exported_here_1377", "'{0}' was exported here."), + 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: diag(1378, DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378", "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."), + An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."), + An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."), + Unexpected_token_Did_you_mean_or_rbrace: diag(1381, DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"), + Unexpected_token_Did_you_mean_or_gt: diag(1382, DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `>`?"), + Only_named_exports_may_use_export_type: diag(1383, DiagnosticCategory.Error, "Only_named_exports_may_use_export_type_1383", "Only named exports may use 'export type'."), + Function_type_notation_must_be_parenthesized_when_used_in_a_union_type: diag(1385, DiagnosticCategory.Error, "Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385", "Function type notation must be parenthesized when used in a union type."), + Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type: diag(1386, DiagnosticCategory.Error, "Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386", "Constructor type notation must be parenthesized when used in a union type."), + Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: diag(1387, DiagnosticCategory.Error, "Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387", "Function type notation must be parenthesized when used in an intersection type."), + Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: diag(1388, DiagnosticCategory.Error, "Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388", "Constructor type notation must be parenthesized when used in an intersection type."), + _0_is_not_allowed_as_a_variable_declaration_name: diag(1389, DiagnosticCategory.Error, "_0_is_not_allowed_as_a_variable_declaration_name_1389", "'{0}' is not allowed as a variable declaration name."), + _0_is_not_allowed_as_a_parameter_name: diag(1390, DiagnosticCategory.Error, "_0_is_not_allowed_as_a_parameter_name_1390", "'{0}' is not allowed as a parameter name."), + An_import_alias_cannot_use_import_type: diag(1392, DiagnosticCategory.Error, "An_import_alias_cannot_use_import_type_1392", "An import alias cannot use 'import type'"), + Imported_via_0_from_file_1: diag(1393, DiagnosticCategory.Message, "Imported_via_0_from_file_1_1393", "Imported via {0} from file '{1}'"), + Imported_via_0_from_file_1_with_packageId_2: diag(1394, DiagnosticCategory.Message, "Imported_via_0_from_file_1_with_packageId_2_1394", "Imported via {0} from file '{1}' with packageId '{2}'"), + Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions: diag(1395, DiagnosticCategory.Message, "Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395", "Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"), + Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions: diag(1396, DiagnosticCategory.Message, "Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396", "Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"), + Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions: diag(1397, DiagnosticCategory.Message, "Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397", "Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"), + Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions: diag(1398, DiagnosticCategory.Message, "Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398", "Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"), + File_is_included_via_import_here: diag(1399, DiagnosticCategory.Message, "File_is_included_via_import_here_1399", "File is included via import here."), + Referenced_via_0_from_file_1: diag(1400, DiagnosticCategory.Message, "Referenced_via_0_from_file_1_1400", "Referenced via '{0}' from file '{1}'"), + File_is_included_via_reference_here: diag(1401, DiagnosticCategory.Message, "File_is_included_via_reference_here_1401", "File is included via reference here."), + Type_library_referenced_via_0_from_file_1: diag(1402, DiagnosticCategory.Message, "Type_library_referenced_via_0_from_file_1_1402", "Type library referenced via '{0}' from file '{1}'"), + Type_library_referenced_via_0_from_file_1_with_packageId_2: diag(1403, DiagnosticCategory.Message, "Type_library_referenced_via_0_from_file_1_with_packageId_2_1403", "Type library referenced via '{0}' from file '{1}' with packageId '{2}'"), + File_is_included_via_type_library_reference_here: diag(1404, DiagnosticCategory.Message, "File_is_included_via_type_library_reference_here_1404", "File is included via type library reference here."), + Library_referenced_via_0_from_file_1: diag(1405, DiagnosticCategory.Message, "Library_referenced_via_0_from_file_1_1405", "Library referenced via '{0}' from file '{1}'"), + File_is_included_via_library_reference_here: diag(1406, DiagnosticCategory.Message, "File_is_included_via_library_reference_here_1406", "File is included via library reference here."), + Matched_by_include_pattern_0_in_1: diag(1407, DiagnosticCategory.Message, "Matched_by_include_pattern_0_in_1_1407", "Matched by include pattern '{0}' in '{1}'"), + File_is_matched_by_include_pattern_specified_here: diag(1408, DiagnosticCategory.Message, "File_is_matched_by_include_pattern_specified_here_1408", "File is matched by include pattern specified here."), + Part_of_files_list_in_tsconfig_json: diag(1409, DiagnosticCategory.Message, "Part_of_files_list_in_tsconfig_json_1409", "Part of 'files' list in tsconfig.json"), + File_is_matched_by_files_list_specified_here: diag(1410, DiagnosticCategory.Message, "File_is_matched_by_files_list_specified_here_1410", "File is matched by 'files' list specified here."), + Output_from_referenced_project_0_included_because_1_specified: diag(1411, DiagnosticCategory.Message, "Output_from_referenced_project_0_included_because_1_specified_1411", "Output from referenced project '{0}' included because '{1}' specified"), + Output_from_referenced_project_0_included_because_module_is_specified_as_none: diag(1412, DiagnosticCategory.Message, "Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412", "Output from referenced project '{0}' included because '--module' is specified as 'none'"), + File_is_output_from_referenced_project_specified_here: diag(1413, DiagnosticCategory.Message, "File_is_output_from_referenced_project_specified_here_1413", "File is output from referenced project specified here."), + Source_from_referenced_project_0_included_because_1_specified: diag(1414, DiagnosticCategory.Message, "Source_from_referenced_project_0_included_because_1_specified_1414", "Source from referenced project '{0}' included because '{1}' specified"), + Source_from_referenced_project_0_included_because_module_is_specified_as_none: diag(1415, DiagnosticCategory.Message, "Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415", "Source from referenced project '{0}' included because '--module' is specified as 'none'"), + File_is_source_from_referenced_project_specified_here: diag(1416, DiagnosticCategory.Message, "File_is_source_from_referenced_project_specified_here_1416", "File is source from referenced project specified here."), + Entry_point_of_type_library_0_specified_in_compilerOptions: diag(1417, DiagnosticCategory.Message, "Entry_point_of_type_library_0_specified_in_compilerOptions_1417", "Entry point of type library '{0}' specified in compilerOptions"), + Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1: diag(1418, DiagnosticCategory.Message, "Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418", "Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"), + File_is_entry_point_of_type_library_specified_here: diag(1419, DiagnosticCategory.Message, "File_is_entry_point_of_type_library_specified_here_1419", "File is entry point of type library specified here."), + Entry_point_for_implicit_type_library_0: diag(1420, DiagnosticCategory.Message, "Entry_point_for_implicit_type_library_0_1420", "Entry point for implicit type library '{0}'"), + Entry_point_for_implicit_type_library_0_with_packageId_1: diag(1421, DiagnosticCategory.Message, "Entry_point_for_implicit_type_library_0_with_packageId_1_1421", "Entry point for implicit type library '{0}' with packageId '{1}'"), + Library_0_specified_in_compilerOptions: diag(1422, DiagnosticCategory.Message, "Library_0_specified_in_compilerOptions_1422", "Library '{0}' specified in compilerOptions"), + File_is_library_specified_here: diag(1423, DiagnosticCategory.Message, "File_is_library_specified_here_1423", "File is library specified here."), + Default_library: diag(1424, DiagnosticCategory.Message, "Default_library_1424", "Default library"), + Default_library_for_target_0: diag(1425, DiagnosticCategory.Message, "Default_library_for_target_0_1425", "Default library for target '{0}'"), + File_is_default_library_for_target_specified_here: diag(1426, DiagnosticCategory.Message, "File_is_default_library_for_target_specified_here_1426", "File is default library for target specified here."), + Root_file_specified_for_compilation: diag(1427, DiagnosticCategory.Message, "Root_file_specified_for_compilation_1427", "Root file specified for compilation"), + File_is_output_of_project_reference_source_0: diag(1428, DiagnosticCategory.Message, "File_is_output_of_project_reference_source_0_1428", "File is output of project reference source '{0}'"), + File_redirects_to_file_0: diag(1429, DiagnosticCategory.Message, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"), + The_file_is_in_the_program_because_Colon: diag(1430, DiagnosticCategory.Message, "The_file_is_in_the_program_because_Colon_1430", "The file is in the program because:"), + for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1431, DiagnosticCategory.Error, "for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431", "'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), + Top_level_for_await_loops_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: diag(1432, DiagnosticCategory.Error, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432", "Top-level 'for await' loops 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."), + Decorators_may_not_be_applied_to_this_parameters: diag(1433, DiagnosticCategory.Error, "Decorators_may_not_be_applied_to_this_parameters_1433", "Decorators may not be applied to 'this' parameters."), + Unexpected_keyword_or_identifier: diag(1434, DiagnosticCategory.Error, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."), + Unknown_keyword_or_identifier_Did_you_mean_0: diag(1435, DiagnosticCategory.Error, "Unknown_keyword_or_identifier_Did_you_mean_0_1435", "Unknown keyword or identifier. Did you mean '{0}'?"), + Decorators_must_precede_the_name_and_all_keywords_of_property_declarations: diag(1436, DiagnosticCategory.Error, "Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436", "Decorators must precede the name and all keywords of property declarations."), + Namespace_must_be_given_a_name: diag(1437, DiagnosticCategory.Error, "Namespace_must_be_given_a_name_1437", "Namespace must be given a name."), + Interface_must_be_given_a_name: diag(1438, DiagnosticCategory.Error, "Interface_must_be_given_a_name_1438", "Interface must be given a name."), + Type_alias_must_be_given_a_name: diag(1439, DiagnosticCategory.Error, "Type_alias_must_be_given_a_name_1439", "Type alias must be given a name."), + Variable_declaration_not_allowed_at_this_location: diag(1440, DiagnosticCategory.Error, "Variable_declaration_not_allowed_at_this_location_1440", "Variable declaration not allowed at this location."), + Cannot_start_a_function_call_in_a_type_annotation: diag(1441, DiagnosticCategory.Error, "Cannot_start_a_function_call_in_a_type_annotation_1441", "Cannot start a function call in a type annotation."), + Expected_for_property_initializer: diag(1442, DiagnosticCategory.Error, "Expected_for_property_initializer_1442", "Expected '=' for property initializer."), + Module_declaration_names_may_only_use_or_quoted_strings: diag(1443, DiagnosticCategory.Error, "Module_declaration_names_may_only_use_or_quoted_strings_1443", "Module declaration names may only use ' or \" quoted strings."), + _0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled: diag(1444, DiagnosticCategory.Error, "_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedMod_1444", "'{0}' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."), + _0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled: diag(1446, DiagnosticCategory.Error, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveVa_1446", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."), + _0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isolatedModules_is_enabled: diag(1448, DiagnosticCategory.Error, "_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isol_1448", "'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when 'isolatedModules' is enabled."), + Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: diag(1449, DiagnosticCategory.Message, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."), + Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments: diag(1450, DiagnosticCategory.Message, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional assertion as arguments"), + Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: diag(1451, DiagnosticCategory.Error, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"), + resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext: diag(1452, DiagnosticCategory.Error, "resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452", "'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`."), + resolution_mode_should_be_either_require_or_import: diag(1453, DiagnosticCategory.Error, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."), + resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, DiagnosticCategory.Error, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."), + resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, DiagnosticCategory.Error, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."), + Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: diag(1456, DiagnosticCategory.Error, "Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456", "Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."), + Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk: diag(1457, DiagnosticCategory.Message, "Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457", "Matched by default include pattern '**/*'"), + File_is_ECMAScript_module_because_0_has_field_type_with_value_module: diag(1458, DiagnosticCategory.Message, "File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458", "File is ECMAScript module because '{0}' has field \"type\" with value \"module\""), + File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module: diag(1459, DiagnosticCategory.Message, "File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459", "File is CommonJS module because '{0}' has field \"type\" whose value is not \"module\""), + File_is_CommonJS_module_because_0_does_not_have_field_type: diag(1460, DiagnosticCategory.Message, "File_is_CommonJS_module_because_0_does_not_have_field_type_1460", "File is CommonJS module because '{0}' does not have field \"type\""), + File_is_CommonJS_module_because_package_json_was_not_found: diag(1461, DiagnosticCategory.Message, "File_is_CommonJS_module_because_package_json_was_not_found_1461", "File is CommonJS module because 'package.json' was not found"), + The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, DiagnosticCategory.Error, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."), + Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead: diag(1471, DiagnosticCategory.Error, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."), + catch_or_finally_expected: diag(1472, DiagnosticCategory.Error, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."), + An_import_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1473, DiagnosticCategory.Error, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473", "An import declaration can only be used at the top level of a module."), + An_export_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1474, DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474", "An export declaration can only be used at the top level of a module."), + Control_what_method_is_used_to_detect_module_format_JS_files: diag(1475, DiagnosticCategory.Message, "Control_what_method_is_used_to_detect_module_format_JS_files_1475", "Control what method is used to detect module-format JS files."), + auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules: diag(1476, DiagnosticCategory.Message, "auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476", "\"auto\": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules."), + An_instantiation_expression_cannot_be_followed_by_a_property_access: diag(1477, DiagnosticCategory.Error, "An_instantiation_expression_cannot_be_followed_by_a_property_access_1477", "An instantiation expression cannot be followed by a property access."), + Identifier_or_string_literal_expected: diag(1478, DiagnosticCategory.Error, "Identifier_or_string_literal_expected_1478", "Identifier or string literal expected."), + The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead: diag(1479, DiagnosticCategory.Error, "The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479", "The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import(\"{0}\")' call instead."), + To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module: diag(1480, DiagnosticCategory.Message, "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480", "To convert this file to an ECMAScript module, change its file extension to '{0}' or create a local package.json file with `{ \"type\": \"module\" }`."), + To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1: diag(1481, DiagnosticCategory.Message, "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481", "To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field `\"type\": \"module\"` to '{1}'."), + To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0: diag(1482, DiagnosticCategory.Message, "To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482", "To convert this file to an ECMAScript module, add the field `\"type\": \"module\"` to '{0}'."), + To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module: diag(1483, DiagnosticCategory.Message, "To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483", "To convert this file to an ECMAScript module, create a local package.json file with `{ \"type\": \"module\" }`."), + The_types_of_0_are_incompatible_between_these_types: diag(2200, DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."), + The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."), + Call_signature_return_types_0_and_1_are_incompatible: diag(2202, DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), + Construct_signature_return_types_0_and_1_are_incompatible: diag(2203, DiagnosticCategory.Error, "Construct_signature_return_types_0_and_1_are_incompatible_2203", "Construct signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), + Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: diag(2204, DiagnosticCategory.Error, "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204", "Call signatures with no arguments have incompatible return types '{0}' and '{1}'.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), + Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: diag(2205, DiagnosticCategory.Error, "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205", "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), + The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement: diag(2206, DiagnosticCategory.Error, "The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206", "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."), + The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement: diag(2207, DiagnosticCategory.Error, "The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207", "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."), + This_type_parameter_might_need_an_extends_0_constraint: diag(2208, DiagnosticCategory.Error, "This_type_parameter_might_need_an_extends_0_constraint_2208", "This type parameter might need an `extends {0}` constraint."), + The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2209, DiagnosticCategory.Error, "The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209", "The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."), + The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2210, DiagnosticCategory.Error, "The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210", "The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."), + Add_extends_constraint: diag(2211, DiagnosticCategory.Message, "Add_extends_constraint_2211", "Add `extends` constraint."), + Add_extends_constraint_to_all_type_parameters: diag(2212, DiagnosticCategory.Message, "Add_extends_constraint_to_all_type_parameters_2212", "Add `extends` constraint to all type parameters"), + Duplicate_identifier_0: diag(2300, DiagnosticCategory.Error, "Duplicate_identifier_0_2300", "Duplicate identifier '{0}'."), + Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2301, DiagnosticCategory.Error, "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."), + Static_members_cannot_reference_class_type_parameters: diag(2302, DiagnosticCategory.Error, "Static_members_cannot_reference_class_type_parameters_2302", "Static members cannot reference class type parameters."), + Circular_definition_of_import_alias_0: diag(2303, DiagnosticCategory.Error, "Circular_definition_of_import_alias_0_2303", "Circular definition of import alias '{0}'."), + Cannot_find_name_0: diag(2304, DiagnosticCategory.Error, "Cannot_find_name_0_2304", "Cannot find name '{0}'."), + Module_0_has_no_exported_member_1: diag(2305, DiagnosticCategory.Error, "Module_0_has_no_exported_member_1_2305", "Module '{0}' has no exported member '{1}'."), + File_0_is_not_a_module: diag(2306, DiagnosticCategory.Error, "File_0_is_not_a_module_2306", "File '{0}' is not a module."), + Cannot_find_module_0_or_its_corresponding_type_declarations: diag(2307, DiagnosticCategory.Error, "Cannot_find_module_0_or_its_corresponding_type_declarations_2307", "Cannot find module '{0}' or its corresponding type declarations."), + Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity: diag(2308, DiagnosticCategory.Error, "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308", "Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."), + An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: diag(2309, DiagnosticCategory.Error, "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309", "An export assignment cannot be used in a module with other exported elements."), + Type_0_recursively_references_itself_as_a_base_type: diag(2310, DiagnosticCategory.Error, "Type_0_recursively_references_itself_as_a_base_type_2310", "Type '{0}' recursively references itself as a base type."), + Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function: diag(2311, DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311", "Cannot find name '{0}'. Did you mean to write this in an async function?"), + An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2312, DiagnosticCategory.Error, "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312", "An interface can only extend an object type or intersection of object types with statically known members."), + Type_parameter_0_has_a_circular_constraint: diag(2313, DiagnosticCategory.Error, "Type_parameter_0_has_a_circular_constraint_2313", "Type parameter '{0}' has a circular constraint."), + Generic_type_0_requires_1_type_argument_s: diag(2314, DiagnosticCategory.Error, "Generic_type_0_requires_1_type_argument_s_2314", "Generic type '{0}' requires {1} type argument(s)."), + Type_0_is_not_generic: diag(2315, DiagnosticCategory.Error, "Type_0_is_not_generic_2315", "Type '{0}' is not generic."), + Global_type_0_must_be_a_class_or_interface_type: diag(2316, DiagnosticCategory.Error, "Global_type_0_must_be_a_class_or_interface_type_2316", "Global type '{0}' must be a class or interface type."), + Global_type_0_must_have_1_type_parameter_s: diag(2317, DiagnosticCategory.Error, "Global_type_0_must_have_1_type_parameter_s_2317", "Global type '{0}' must have {1} type parameter(s)."), + Cannot_find_global_type_0: diag(2318, DiagnosticCategory.Error, "Cannot_find_global_type_0_2318", "Cannot find global type '{0}'."), + Named_property_0_of_types_1_and_2_are_not_identical: diag(2319, DiagnosticCategory.Error, "Named_property_0_of_types_1_and_2_are_not_identical_2319", "Named property '{0}' of types '{1}' and '{2}' are not identical."), + Interface_0_cannot_simultaneously_extend_types_1_and_2: diag(2320, DiagnosticCategory.Error, "Interface_0_cannot_simultaneously_extend_types_1_and_2_2320", "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."), + Excessive_stack_depth_comparing_types_0_and_1: diag(2321, DiagnosticCategory.Error, "Excessive_stack_depth_comparing_types_0_and_1_2321", "Excessive stack depth comparing types '{0}' and '{1}'."), + Type_0_is_not_assignable_to_type_1: diag(2322, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_2322", "Type '{0}' is not assignable to type '{1}'."), + Cannot_redeclare_exported_variable_0: diag(2323, DiagnosticCategory.Error, "Cannot_redeclare_exported_variable_0_2323", "Cannot redeclare exported variable '{0}'."), + Property_0_is_missing_in_type_1: diag(2324, DiagnosticCategory.Error, "Property_0_is_missing_in_type_1_2324", "Property '{0}' is missing in type '{1}'."), + Property_0_is_private_in_type_1_but_not_in_type_2: diag(2325, DiagnosticCategory.Error, "Property_0_is_private_in_type_1_but_not_in_type_2_2325", "Property '{0}' is private in type '{1}' but not in type '{2}'."), + Types_of_property_0_are_incompatible: diag(2326, DiagnosticCategory.Error, "Types_of_property_0_are_incompatible_2326", "Types of property '{0}' are incompatible."), + Property_0_is_optional_in_type_1_but_required_in_type_2: diag(2327, DiagnosticCategory.Error, "Property_0_is_optional_in_type_1_but_required_in_type_2_2327", "Property '{0}' is optional in type '{1}' but required in type '{2}'."), + Types_of_parameters_0_and_1_are_incompatible: diag(2328, DiagnosticCategory.Error, "Types_of_parameters_0_and_1_are_incompatible_2328", "Types of parameters '{0}' and '{1}' are incompatible."), + Index_signature_for_type_0_is_missing_in_type_1: diag(2329, DiagnosticCategory.Error, "Index_signature_for_type_0_is_missing_in_type_1_2329", "Index signature for type '{0}' is missing in type '{1}'."), + _0_and_1_index_signatures_are_incompatible: diag(2330, DiagnosticCategory.Error, "_0_and_1_index_signatures_are_incompatible_2330", "'{0}' and '{1}' index signatures are incompatible."), + this_cannot_be_referenced_in_a_module_or_namespace_body: diag(2331, DiagnosticCategory.Error, "this_cannot_be_referenced_in_a_module_or_namespace_body_2331", "'this' cannot be referenced in a module or namespace body."), + this_cannot_be_referenced_in_current_location: diag(2332, DiagnosticCategory.Error, "this_cannot_be_referenced_in_current_location_2332", "'this' cannot be referenced in current location."), + this_cannot_be_referenced_in_constructor_arguments: diag(2333, DiagnosticCategory.Error, "this_cannot_be_referenced_in_constructor_arguments_2333", "'this' cannot be referenced in constructor arguments."), + this_cannot_be_referenced_in_a_static_property_initializer: diag(2334, DiagnosticCategory.Error, "this_cannot_be_referenced_in_a_static_property_initializer_2334", "'this' cannot be referenced in a static property initializer."), + super_can_only_be_referenced_in_a_derived_class: diag(2335, DiagnosticCategory.Error, "super_can_only_be_referenced_in_a_derived_class_2335", "'super' can only be referenced in a derived class."), + super_cannot_be_referenced_in_constructor_arguments: diag(2336, DiagnosticCategory.Error, "super_cannot_be_referenced_in_constructor_arguments_2336", "'super' cannot be referenced in constructor arguments."), + Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: diag(2337, DiagnosticCategory.Error, "Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337", "Super calls are not permitted outside constructors or in nested functions inside constructors."), + super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: diag(2338, DiagnosticCategory.Error, "super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338", "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."), + Property_0_does_not_exist_on_type_1: diag(2339, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_2339", "Property '{0}' does not exist on type '{1}'."), + Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: diag(2340, DiagnosticCategory.Error, "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340", "Only public and protected methods of the base class are accessible via the 'super' keyword."), + Property_0_is_private_and_only_accessible_within_class_1: diag(2341, DiagnosticCategory.Error, "Property_0_is_private_and_only_accessible_within_class_1_2341", "Property '{0}' is private and only accessible within class '{1}'."), + This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0: diag(2343, DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343", "This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."), + Type_0_does_not_satisfy_the_constraint_1: diag(2344, DiagnosticCategory.Error, "Type_0_does_not_satisfy_the_constraint_1_2344", "Type '{0}' does not satisfy the constraint '{1}'."), + Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: diag(2345, DiagnosticCategory.Error, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", "Argument of type '{0}' is not assignable to parameter of type '{1}'."), + Call_target_does_not_contain_any_signatures: diag(2346, DiagnosticCategory.Error, "Call_target_does_not_contain_any_signatures_2346", "Call target does not contain any signatures."), + Untyped_function_calls_may_not_accept_type_arguments: diag(2347, DiagnosticCategory.Error, "Untyped_function_calls_may_not_accept_type_arguments_2347", "Untyped function calls may not accept type arguments."), + Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: diag(2348, DiagnosticCategory.Error, "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", "Value of type '{0}' is not callable. Did you mean to include 'new'?"), + This_expression_is_not_callable: diag(2349, DiagnosticCategory.Error, "This_expression_is_not_callable_2349", "This expression is not callable."), + Only_a_void_function_can_be_called_with_the_new_keyword: diag(2350, DiagnosticCategory.Error, "Only_a_void_function_can_be_called_with_the_new_keyword_2350", "Only a void function can be called with the 'new' keyword."), + This_expression_is_not_constructable: diag(2351, DiagnosticCategory.Error, "This_expression_is_not_constructable_2351", "This expression is not constructable."), + Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first: diag(2352, DiagnosticCategory.Error, "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352", "Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."), + Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1: diag(2353, DiagnosticCategory.Error, "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353", "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."), + This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found: diag(2354, DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354", "This syntax requires an imported helper but module '{0}' cannot be found."), + A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value: diag(2355, DiagnosticCategory.Error, "A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355", "A function whose declared type is neither 'void' nor 'any' must return a value."), + An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2356, DiagnosticCategory.Error, "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356", "An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."), + The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: diag(2357, DiagnosticCategory.Error, "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", "The operand of an increment or decrement operator must be a variable or a property access."), + The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: diag(2358, DiagnosticCategory.Error, "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."), + The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: diag(2359, DiagnosticCategory.Error, "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359", "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type."), + The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2362, DiagnosticCategory.Error, "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362", "The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."), + The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2363, DiagnosticCategory.Error, "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363", "The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."), + The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access: diag(2364, DiagnosticCategory.Error, "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", "The left-hand side of an assignment expression must be a variable or a property access."), + Operator_0_cannot_be_applied_to_types_1_and_2: diag(2365, DiagnosticCategory.Error, "Operator_0_cannot_be_applied_to_types_1_and_2_2365", "Operator '{0}' cannot be applied to types '{1}' and '{2}'."), + Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined: diag(2366, DiagnosticCategory.Error, "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366", "Function lacks ending return statement and return type does not include 'undefined'."), + This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap: diag(2367, DiagnosticCategory.Error, "This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367", "This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."), + Type_parameter_name_cannot_be_0: diag(2368, DiagnosticCategory.Error, "Type_parameter_name_cannot_be_0_2368", "Type parameter name cannot be '{0}'."), + A_parameter_property_is_only_allowed_in_a_constructor_implementation: diag(2369, DiagnosticCategory.Error, "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369", "A parameter property is only allowed in a constructor implementation."), + A_rest_parameter_must_be_of_an_array_type: diag(2370, DiagnosticCategory.Error, "A_rest_parameter_must_be_of_an_array_type_2370", "A rest parameter must be of an array type."), + A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: diag(2371, DiagnosticCategory.Error, "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371", "A parameter initializer is only allowed in a function or constructor implementation."), + Parameter_0_cannot_reference_itself: diag(2372, DiagnosticCategory.Error, "Parameter_0_cannot_reference_itself_2372", "Parameter '{0}' cannot reference itself."), + Parameter_0_cannot_reference_identifier_1_declared_after_it: diag(2373, DiagnosticCategory.Error, "Parameter_0_cannot_reference_identifier_1_declared_after_it_2373", "Parameter '{0}' cannot reference identifier '{1}' declared after it."), + Duplicate_index_signature_for_type_0: diag(2374, DiagnosticCategory.Error, "Duplicate_index_signature_for_type_0_2374", "Duplicate index signature for type '{0}'."), + Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: diag(2375, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."), + A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers: diag(2376, DiagnosticCategory.Error, "A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376", "A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers."), + Constructors_for_derived_classes_must_contain_a_super_call: diag(2377, DiagnosticCategory.Error, "Constructors_for_derived_classes_must_contain_a_super_call_2377", "Constructors for derived classes must contain a 'super' call."), + A_get_accessor_must_return_a_value: diag(2378, DiagnosticCategory.Error, "A_get_accessor_must_return_a_value_2378", "A 'get' accessor must return a value."), + Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: diag(2379, DiagnosticCategory.Error, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379", "Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."), + The_return_type_of_a_get_accessor_must_be_assignable_to_its_set_accessor_type: diag(2380, DiagnosticCategory.Error, "The_return_type_of_a_get_accessor_must_be_assignable_to_its_set_accessor_type_2380", "The return type of a 'get' accessor must be assignable to its 'set' accessor type"), + Overload_signatures_must_all_be_exported_or_non_exported: diag(2383, DiagnosticCategory.Error, "Overload_signatures_must_all_be_exported_or_non_exported_2383", "Overload signatures must all be exported or non-exported."), + Overload_signatures_must_all_be_ambient_or_non_ambient: diag(2384, DiagnosticCategory.Error, "Overload_signatures_must_all_be_ambient_or_non_ambient_2384", "Overload signatures must all be ambient or non-ambient."), + Overload_signatures_must_all_be_public_private_or_protected: diag(2385, DiagnosticCategory.Error, "Overload_signatures_must_all_be_public_private_or_protected_2385", "Overload signatures must all be public, private or protected."), + Overload_signatures_must_all_be_optional_or_required: diag(2386, DiagnosticCategory.Error, "Overload_signatures_must_all_be_optional_or_required_2386", "Overload signatures must all be optional or required."), + Function_overload_must_be_static: diag(2387, DiagnosticCategory.Error, "Function_overload_must_be_static_2387", "Function overload must be static."), + Function_overload_must_not_be_static: diag(2388, DiagnosticCategory.Error, "Function_overload_must_not_be_static_2388", "Function overload must not be static."), + Function_implementation_name_must_be_0: diag(2389, DiagnosticCategory.Error, "Function_implementation_name_must_be_0_2389", "Function implementation name must be '{0}'."), + Constructor_implementation_is_missing: diag(2390, DiagnosticCategory.Error, "Constructor_implementation_is_missing_2390", "Constructor implementation is missing."), + Function_implementation_is_missing_or_not_immediately_following_the_declaration: diag(2391, DiagnosticCategory.Error, "Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391", "Function implementation is missing or not immediately following the declaration."), + Multiple_constructor_implementations_are_not_allowed: diag(2392, DiagnosticCategory.Error, "Multiple_constructor_implementations_are_not_allowed_2392", "Multiple constructor implementations are not allowed."), + Duplicate_function_implementation: diag(2393, DiagnosticCategory.Error, "Duplicate_function_implementation_2393", "Duplicate function implementation."), + This_overload_signature_is_not_compatible_with_its_implementation_signature: diag(2394, DiagnosticCategory.Error, "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394", "This overload signature is not compatible with its implementation signature."), + Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local: diag(2395, DiagnosticCategory.Error, "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395", "Individual declarations in merged declaration '{0}' must be all exported or all local."), + Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: diag(2396, DiagnosticCategory.Error, "Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396", "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."), + Declaration_name_conflicts_with_built_in_global_identifier_0: diag(2397, DiagnosticCategory.Error, "Declaration_name_conflicts_with_built_in_global_identifier_0_2397", "Declaration name conflicts with built-in global identifier '{0}'."), + constructor_cannot_be_used_as_a_parameter_property_name: diag(2398, DiagnosticCategory.Error, "constructor_cannot_be_used_as_a_parameter_property_name_2398", "'constructor' cannot be used as a parameter property name."), + Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: diag(2399, DiagnosticCategory.Error, "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399", "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."), + Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: diag(2400, DiagnosticCategory.Error, "Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400", "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."), + A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers: diag(2401, DiagnosticCategory.Error, "A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401", "A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers."), + Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: diag(2402, DiagnosticCategory.Error, "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402", "Expression resolves to '_super' that compiler uses to capture base class reference."), + Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: diag(2403, DiagnosticCategory.Error, "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403", "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."), + The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: diag(2404, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404", "The left-hand side of a 'for...in' statement cannot use a type annotation."), + The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any: diag(2405, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405", "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."), + The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access: diag(2406, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406", "The left-hand side of a 'for...in' statement must be a variable or a property access."), + The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0: diag(2407, DiagnosticCategory.Error, "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407", "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."), + Setters_cannot_return_a_value: diag(2408, DiagnosticCategory.Error, "Setters_cannot_return_a_value_2408", "Setters cannot return a value."), + Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: diag(2409, DiagnosticCategory.Error, "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", "Return type of constructor signature must be assignable to the instance type of the class."), + The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any: diag(2410, DiagnosticCategory.Error, "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410", "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."), + Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target: diag(2412, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."), + Property_0_of_type_1_is_not_assignable_to_2_index_type_3: diag(2411, DiagnosticCategory.Error, "Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411", "Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."), + _0_index_type_1_is_not_assignable_to_2_index_type_3: diag(2413, DiagnosticCategory.Error, "_0_index_type_1_is_not_assignable_to_2_index_type_3_2413", "'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."), + Class_name_cannot_be_0: diag(2414, DiagnosticCategory.Error, "Class_name_cannot_be_0_2414", "Class name cannot be '{0}'."), + Class_0_incorrectly_extends_base_class_1: diag(2415, DiagnosticCategory.Error, "Class_0_incorrectly_extends_base_class_1_2415", "Class '{0}' incorrectly extends base class '{1}'."), + Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2: diag(2416, DiagnosticCategory.Error, "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416", "Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."), + Class_static_side_0_incorrectly_extends_base_class_static_side_1: diag(2417, DiagnosticCategory.Error, "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417", "Class static side '{0}' incorrectly extends base class static side '{1}'."), + Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1: diag(2418, DiagnosticCategory.Error, "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418", "Type of computed property's value is '{0}', which is not assignable to type '{1}'."), + Types_of_construct_signatures_are_incompatible: diag(2419, DiagnosticCategory.Error, "Types_of_construct_signatures_are_incompatible_2419", "Types of construct signatures are incompatible."), + Class_0_incorrectly_implements_interface_1: diag(2420, DiagnosticCategory.Error, "Class_0_incorrectly_implements_interface_1_2420", "Class '{0}' incorrectly implements interface '{1}'."), + A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2422, DiagnosticCategory.Error, "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422", "A class can only implement an object type or intersection of object types with statically known members."), + Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: diag(2423, DiagnosticCategory.Error, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."), + Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2425, DiagnosticCategory.Error, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."), + Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2426, DiagnosticCategory.Error, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."), + Interface_name_cannot_be_0: diag(2427, DiagnosticCategory.Error, "Interface_name_cannot_be_0_2427", "Interface name cannot be '{0}'."), + All_declarations_of_0_must_have_identical_type_parameters: diag(2428, DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_type_parameters_2428", "All declarations of '{0}' must have identical type parameters."), + Interface_0_incorrectly_extends_interface_1: diag(2430, DiagnosticCategory.Error, "Interface_0_incorrectly_extends_interface_1_2430", "Interface '{0}' incorrectly extends interface '{1}'."), + Enum_name_cannot_be_0: diag(2431, DiagnosticCategory.Error, "Enum_name_cannot_be_0_2431", "Enum name cannot be '{0}'."), + In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: diag(2432, DiagnosticCategory.Error, "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432", "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."), + A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: diag(2433, DiagnosticCategory.Error, "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", "A namespace declaration cannot be in a different file from a class or function with which it is merged."), + A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: diag(2434, DiagnosticCategory.Error, "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", "A namespace declaration cannot be located prior to a class or function with which it is merged."), + Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces: diag(2435, DiagnosticCategory.Error, "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435", "Ambient modules cannot be nested in other modules or namespaces."), + Ambient_module_declaration_cannot_specify_relative_module_name: diag(2436, DiagnosticCategory.Error, "Ambient_module_declaration_cannot_specify_relative_module_name_2436", "Ambient module declaration cannot specify relative module name."), + Module_0_is_hidden_by_a_local_declaration_with_the_same_name: diag(2437, DiagnosticCategory.Error, "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", "Module '{0}' is hidden by a local declaration with the same name."), + Import_name_cannot_be_0: diag(2438, DiagnosticCategory.Error, "Import_name_cannot_be_0_2438", "Import name cannot be '{0}'."), + Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: diag(2439, DiagnosticCategory.Error, "Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439", "Import or export declaration in an ambient module declaration cannot reference module through relative module name."), + Import_declaration_conflicts_with_local_declaration_of_0: diag(2440, DiagnosticCategory.Error, "Import_declaration_conflicts_with_local_declaration_of_0_2440", "Import declaration conflicts with local declaration of '{0}'."), + Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: diag(2441, DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441", "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."), + Types_have_separate_declarations_of_a_private_property_0: diag(2442, DiagnosticCategory.Error, "Types_have_separate_declarations_of_a_private_property_0_2442", "Types have separate declarations of a private property '{0}'."), + Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: diag(2443, DiagnosticCategory.Error, "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443", "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."), + Property_0_is_protected_in_type_1_but_public_in_type_2: diag(2444, DiagnosticCategory.Error, "Property_0_is_protected_in_type_1_but_public_in_type_2_2444", "Property '{0}' is protected in type '{1}' but public in type '{2}'."), + Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: diag(2445, DiagnosticCategory.Error, "Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445", "Property '{0}' is protected and only accessible within class '{1}' and its subclasses."), + Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2: diag(2446, DiagnosticCategory.Error, "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446", "Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."), + The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: diag(2447, DiagnosticCategory.Error, "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447", "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."), + Block_scoped_variable_0_used_before_its_declaration: diag(2448, DiagnosticCategory.Error, "Block_scoped_variable_0_used_before_its_declaration_2448", "Block-scoped variable '{0}' used before its declaration."), + Class_0_used_before_its_declaration: diag(2449, DiagnosticCategory.Error, "Class_0_used_before_its_declaration_2449", "Class '{0}' used before its declaration."), + Enum_0_used_before_its_declaration: diag(2450, DiagnosticCategory.Error, "Enum_0_used_before_its_declaration_2450", "Enum '{0}' used before its declaration."), + Cannot_redeclare_block_scoped_variable_0: diag(2451, DiagnosticCategory.Error, "Cannot_redeclare_block_scoped_variable_0_2451", "Cannot redeclare block-scoped variable '{0}'."), + An_enum_member_cannot_have_a_numeric_name: diag(2452, DiagnosticCategory.Error, "An_enum_member_cannot_have_a_numeric_name_2452", "An enum member cannot have a numeric name."), + Variable_0_is_used_before_being_assigned: diag(2454, DiagnosticCategory.Error, "Variable_0_is_used_before_being_assigned_2454", "Variable '{0}' is used before being assigned."), + Type_alias_0_circularly_references_itself: diag(2456, DiagnosticCategory.Error, "Type_alias_0_circularly_references_itself_2456", "Type alias '{0}' circularly references itself."), + Type_alias_name_cannot_be_0: diag(2457, DiagnosticCategory.Error, "Type_alias_name_cannot_be_0_2457", "Type alias name cannot be '{0}'."), + An_AMD_module_cannot_have_multiple_name_assignments: diag(2458, DiagnosticCategory.Error, "An_AMD_module_cannot_have_multiple_name_assignments_2458", "An AMD module cannot have multiple name assignments."), + Module_0_declares_1_locally_but_it_is_not_exported: diag(2459, DiagnosticCategory.Error, "Module_0_declares_1_locally_but_it_is_not_exported_2459", "Module '{0}' declares '{1}' locally, but it is not exported."), + Module_0_declares_1_locally_but_it_is_exported_as_2: diag(2460, DiagnosticCategory.Error, "Module_0_declares_1_locally_but_it_is_exported_as_2_2460", "Module '{0}' declares '{1}' locally, but it is exported as '{2}'."), + Type_0_is_not_an_array_type: diag(2461, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_2461", "Type '{0}' is not an array type."), + A_rest_element_must_be_last_in_a_destructuring_pattern: diag(2462, DiagnosticCategory.Error, "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", "A rest element must be last in a destructuring pattern."), + A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: diag(2463, DiagnosticCategory.Error, "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", "A binding pattern parameter cannot be optional in an implementation signature."), + A_computed_property_name_must_be_of_type_string_number_symbol_or_any: diag(2464, DiagnosticCategory.Error, "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464", "A computed property name must be of type 'string', 'number', 'symbol', or 'any'."), + this_cannot_be_referenced_in_a_computed_property_name: diag(2465, DiagnosticCategory.Error, "this_cannot_be_referenced_in_a_computed_property_name_2465", "'this' cannot be referenced in a computed property name."), + super_cannot_be_referenced_in_a_computed_property_name: diag(2466, DiagnosticCategory.Error, "super_cannot_be_referenced_in_a_computed_property_name_2466", "'super' cannot be referenced in a computed property name."), + A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type: diag(2467, DiagnosticCategory.Error, "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467", "A computed property name cannot reference a type parameter from its containing type."), + Cannot_find_global_value_0: diag(2468, DiagnosticCategory.Error, "Cannot_find_global_value_0_2468", "Cannot find global value '{0}'."), + The_0_operator_cannot_be_applied_to_type_symbol: diag(2469, DiagnosticCategory.Error, "The_0_operator_cannot_be_applied_to_type_symbol_2469", "The '{0}' operator cannot be applied to type 'symbol'."), + Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher: diag(2472, DiagnosticCategory.Error, "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472", "Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."), + Enum_declarations_must_all_be_const_or_non_const: diag(2473, DiagnosticCategory.Error, "Enum_declarations_must_all_be_const_or_non_const_2473", "Enum declarations must all be const or non-const."), + const_enum_member_initializers_must_be_constant_expressions: diag(2474, DiagnosticCategory.Error, "const_enum_member_initializers_must_be_constant_expressions_2474", "const enum member initializers must be constant expressions."), + const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query: diag(2475, DiagnosticCategory.Error, "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475", "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."), + A_const_enum_member_can_only_be_accessed_using_a_string_literal: diag(2476, DiagnosticCategory.Error, "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476", "A const enum member can only be accessed using a string literal."), + const_enum_member_initializer_was_evaluated_to_a_non_finite_value: diag(2477, DiagnosticCategory.Error, "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477", "'const' enum member initializer was evaluated to a non-finite value."), + const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN: diag(2478, DiagnosticCategory.Error, "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478", "'const' enum member initializer was evaluated to disallowed value 'NaN'."), + let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: diag(2480, DiagnosticCategory.Error, "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480", "'let' is not allowed to be used as a name in 'let' or 'const' declarations."), + Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: diag(2481, DiagnosticCategory.Error, "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481", "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."), + The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: diag(2483, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483", "The left-hand side of a 'for...of' statement cannot use a type annotation."), + Export_declaration_conflicts_with_exported_declaration_of_0: diag(2484, DiagnosticCategory.Error, "Export_declaration_conflicts_with_exported_declaration_of_0_2484", "Export declaration conflicts with exported declaration of '{0}'."), + The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access: diag(2487, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487", "The left-hand side of a 'for...of' statement must be a variable or a property access."), + Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2488, DiagnosticCategory.Error, "Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488", "Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."), + An_iterator_must_have_a_next_method: diag(2489, DiagnosticCategory.Error, "An_iterator_must_have_a_next_method_2489", "An iterator must have a 'next()' method."), + The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property: diag(2490, DiagnosticCategory.Error, "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490", "The type returned by the '{0}()' method of an iterator must have a 'value' property."), + The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: diag(2491, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491", "The left-hand side of a 'for...in' statement cannot be a destructuring pattern."), + Cannot_redeclare_identifier_0_in_catch_clause: diag(2492, DiagnosticCategory.Error, "Cannot_redeclare_identifier_0_in_catch_clause_2492", "Cannot redeclare identifier '{0}' in catch clause."), + Tuple_type_0_of_length_1_has_no_element_at_index_2: diag(2493, DiagnosticCategory.Error, "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493", "Tuple type '{0}' of length '{1}' has no element at index '{2}'."), + Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: diag(2494, DiagnosticCategory.Error, "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494", "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."), + Type_0_is_not_an_array_type_or_a_string_type: diag(2495, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_a_string_type_2495", "Type '{0}' is not an array type or a string type."), + The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression: diag(2496, DiagnosticCategory.Error, "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496", "The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression."), + This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export: diag(2497, DiagnosticCategory.Error, "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497", "This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."), + Module_0_uses_export_and_cannot_be_used_with_export_Asterisk: diag(2498, DiagnosticCategory.Error, "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498", "Module '{0}' uses 'export =' and cannot be used with 'export *'."), + An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments: diag(2499, DiagnosticCategory.Error, "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499", "An interface can only extend an identifier/qualified-name with optional type arguments."), + A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments: diag(2500, DiagnosticCategory.Error, "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500", "A class can only implement an identifier/qualified-name with optional type arguments."), + A_rest_element_cannot_contain_a_binding_pattern: diag(2501, DiagnosticCategory.Error, "A_rest_element_cannot_contain_a_binding_pattern_2501", "A rest element cannot contain a binding pattern."), + _0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: diag(2502, DiagnosticCategory.Error, "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502", "'{0}' is referenced directly or indirectly in its own type annotation."), + Cannot_find_namespace_0: diag(2503, DiagnosticCategory.Error, "Cannot_find_namespace_0_2503", "Cannot find namespace '{0}'."), + Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator: diag(2504, DiagnosticCategory.Error, "Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504", "Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."), + A_generator_cannot_have_a_void_type_annotation: diag(2505, DiagnosticCategory.Error, "A_generator_cannot_have_a_void_type_annotation_2505", "A generator cannot have a 'void' type annotation."), + _0_is_referenced_directly_or_indirectly_in_its_own_base_expression: diag(2506, DiagnosticCategory.Error, "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506", "'{0}' is referenced directly or indirectly in its own base expression."), + Type_0_is_not_a_constructor_function_type: diag(2507, DiagnosticCategory.Error, "Type_0_is_not_a_constructor_function_type_2507", "Type '{0}' is not a constructor function type."), + No_base_constructor_has_the_specified_number_of_type_arguments: diag(2508, DiagnosticCategory.Error, "No_base_constructor_has_the_specified_number_of_type_arguments_2508", "No base constructor has the specified number of type arguments."), + Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2509, DiagnosticCategory.Error, "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509", "Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."), + Base_constructors_must_all_have_the_same_return_type: diag(2510, DiagnosticCategory.Error, "Base_constructors_must_all_have_the_same_return_type_2510", "Base constructors must all have the same return type."), + Cannot_create_an_instance_of_an_abstract_class: diag(2511, DiagnosticCategory.Error, "Cannot_create_an_instance_of_an_abstract_class_2511", "Cannot create an instance of an abstract class."), + Overload_signatures_must_all_be_abstract_or_non_abstract: diag(2512, DiagnosticCategory.Error, "Overload_signatures_must_all_be_abstract_or_non_abstract_2512", "Overload signatures must all be abstract or non-abstract."), + Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression: diag(2513, DiagnosticCategory.Error, "Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513", "Abstract method '{0}' in class '{1}' cannot be accessed via super expression."), + A_tuple_type_cannot_be_indexed_with_a_negative_value: diag(2514, DiagnosticCategory.Error, "A_tuple_type_cannot_be_indexed_with_a_negative_value_2514", "A tuple type cannot be indexed with a negative value."), + Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: diag(2515, DiagnosticCategory.Error, "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", "Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'."), + All_declarations_of_an_abstract_method_must_be_consecutive: diag(2516, DiagnosticCategory.Error, "All_declarations_of_an_abstract_method_must_be_consecutive_2516", "All declarations of an abstract method must be consecutive."), + Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: diag(2517, DiagnosticCategory.Error, "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", "Cannot assign an abstract constructor type to a non-abstract constructor type."), + A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: diag(2518, DiagnosticCategory.Error, "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", "A 'this'-based type guard is not compatible with a parameter-based type guard."), + An_async_iterator_must_have_a_next_method: diag(2519, DiagnosticCategory.Error, "An_async_iterator_must_have_a_next_method_2519", "An async iterator must have a 'next()' method."), + Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: diag(2520, DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."), + The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method: diag(2522, DiagnosticCategory.Error, "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522", "The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method."), + yield_expressions_cannot_be_used_in_a_parameter_initializer: diag(2523, DiagnosticCategory.Error, "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523", "'yield' expressions cannot be used in a parameter initializer."), + await_expressions_cannot_be_used_in_a_parameter_initializer: diag(2524, DiagnosticCategory.Error, "await_expressions_cannot_be_used_in_a_parameter_initializer_2524", "'await' expressions cannot be used in a parameter initializer."), + Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value: diag(2525, DiagnosticCategory.Error, "Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525", "Initializer provides no value for this binding element and the binding element has no default value."), + A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface: diag(2526, DiagnosticCategory.Error, "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526", "A 'this' type is available only in a non-static member of a class or interface."), + The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary: diag(2527, DiagnosticCategory.Error, "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527", "The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."), + A_module_cannot_have_multiple_default_exports: diag(2528, DiagnosticCategory.Error, "A_module_cannot_have_multiple_default_exports_2528", "A module cannot have multiple default exports."), + Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions: diag(2529, DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529", "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."), + Property_0_is_incompatible_with_index_signature: diag(2530, DiagnosticCategory.Error, "Property_0_is_incompatible_with_index_signature_2530", "Property '{0}' is incompatible with index signature."), + Object_is_possibly_null: diag(2531, DiagnosticCategory.Error, "Object_is_possibly_null_2531", "Object is possibly 'null'."), + Object_is_possibly_undefined: diag(2532, DiagnosticCategory.Error, "Object_is_possibly_undefined_2532", "Object is possibly 'undefined'."), + Object_is_possibly_null_or_undefined: diag(2533, DiagnosticCategory.Error, "Object_is_possibly_null_or_undefined_2533", "Object is possibly 'null' or 'undefined'."), + A_function_returning_never_cannot_have_a_reachable_end_point: diag(2534, DiagnosticCategory.Error, "A_function_returning_never_cannot_have_a_reachable_end_point_2534", "A function returning 'never' cannot have a reachable end point."), + Type_0_cannot_be_used_to_index_type_1: diag(2536, DiagnosticCategory.Error, "Type_0_cannot_be_used_to_index_type_1_2536", "Type '{0}' cannot be used to index type '{1}'."), + Type_0_has_no_matching_index_signature_for_type_1: diag(2537, DiagnosticCategory.Error, "Type_0_has_no_matching_index_signature_for_type_1_2537", "Type '{0}' has no matching index signature for type '{1}'."), + Type_0_cannot_be_used_as_an_index_type: diag(2538, DiagnosticCategory.Error, "Type_0_cannot_be_used_as_an_index_type_2538", "Type '{0}' cannot be used as an index type."), + Cannot_assign_to_0_because_it_is_not_a_variable: diag(2539, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_not_a_variable_2539", "Cannot assign to '{0}' because it is not a variable."), + Cannot_assign_to_0_because_it_is_a_read_only_property: diag(2540, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_read_only_property_2540", "Cannot assign to '{0}' because it is a read-only property."), + Index_signature_in_type_0_only_permits_reading: diag(2542, DiagnosticCategory.Error, "Index_signature_in_type_0_only_permits_reading_2542", "Index signature in type '{0}' only permits reading."), + Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference: diag(2543, DiagnosticCategory.Error, "Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543", "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."), + Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference: diag(2544, DiagnosticCategory.Error, "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544", "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."), + A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any: diag(2545, DiagnosticCategory.Error, "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545", "A mixin class must have a constructor with a single rest parameter of type 'any[]'."), + The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property: diag(2547, DiagnosticCategory.Error, "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547", "The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."), + Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2548, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548", "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."), + Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2549, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549", "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."), + Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later: diag(2550, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550", "Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{2}' or later."), + Property_0_does_not_exist_on_type_1_Did_you_mean_2: diag(2551, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551", "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"), + Cannot_find_name_0_Did_you_mean_1: diag(2552, DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_1_2552", "Cannot find name '{0}'. Did you mean '{1}'?"), + Computed_values_are_not_permitted_in_an_enum_with_string_valued_members: diag(2553, DiagnosticCategory.Error, "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553", "Computed values are not permitted in an enum with string valued members."), + Expected_0_arguments_but_got_1: diag(2554, DiagnosticCategory.Error, "Expected_0_arguments_but_got_1_2554", "Expected {0} arguments, but got {1}."), + Expected_at_least_0_arguments_but_got_1: diag(2555, DiagnosticCategory.Error, "Expected_at_least_0_arguments_but_got_1_2555", "Expected at least {0} arguments, but got {1}."), + A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter: diag(2556, DiagnosticCategory.Error, "A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556", "A spread argument must either have a tuple type or be passed to a rest parameter."), + Expected_0_type_arguments_but_got_1: diag(2558, DiagnosticCategory.Error, "Expected_0_type_arguments_but_got_1_2558", "Expected {0} type arguments, but got {1}."), + Type_0_has_no_properties_in_common_with_type_1: diag(2559, DiagnosticCategory.Error, "Type_0_has_no_properties_in_common_with_type_1_2559", "Type '{0}' has no properties in common with type '{1}'."), + Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it: diag(2560, DiagnosticCategory.Error, "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560", "Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"), + Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2: diag(2561, DiagnosticCategory.Error, "Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561", "Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"), + Base_class_expressions_cannot_reference_class_type_parameters: diag(2562, DiagnosticCategory.Error, "Base_class_expressions_cannot_reference_class_type_parameters_2562", "Base class expressions cannot reference class type parameters."), + The_containing_function_or_module_body_is_too_large_for_control_flow_analysis: diag(2563, DiagnosticCategory.Error, "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563", "The containing function or module body is too large for control flow analysis."), + Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor: diag(2564, DiagnosticCategory.Error, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564", "Property '{0}' has no initializer and is not definitely assigned in the constructor."), + Property_0_is_used_before_being_assigned: diag(2565, DiagnosticCategory.Error, "Property_0_is_used_before_being_assigned_2565", "Property '{0}' is used before being assigned."), + A_rest_element_cannot_have_a_property_name: diag(2566, DiagnosticCategory.Error, "A_rest_element_cannot_have_a_property_name_2566", "A rest element cannot have a property name."), + Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations: diag(2567, DiagnosticCategory.Error, "Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567", "Enum declarations can only merge with namespace or other enum declarations."), + Property_0_may_not_exist_on_type_1_Did_you_mean_2: diag(2568, DiagnosticCategory.Error, "Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568", "Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"), + Could_not_find_name_0_Did_you_mean_1: diag(2570, DiagnosticCategory.Error, "Could_not_find_name_0_Did_you_mean_1_2570", "Could not find name '{0}'. Did you mean '{1}'?"), + Object_is_of_type_unknown: diag(2571, DiagnosticCategory.Error, "Object_is_of_type_unknown_2571", "Object is of type 'unknown'."), + A_rest_element_type_must_be_an_array_type: diag(2574, DiagnosticCategory.Error, "A_rest_element_type_must_be_an_array_type_2574", "A rest element type must be an array type."), + No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments: diag(2575, DiagnosticCategory.Error, "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575", "No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."), + Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead: diag(2576, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576", "Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"), + Return_type_annotation_circularly_references_itself: diag(2577, DiagnosticCategory.Error, "Return_type_annotation_circularly_references_itself_2577", "Return type annotation circularly references itself."), + Unused_ts_expect_error_directive: diag(2578, DiagnosticCategory.Error, "Unused_ts_expect_error_directive_2578", "Unused '@ts-expect-error' directive."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode: diag(2580, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2580", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery: diag(2581, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2581", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha: diag(2582, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`."), + Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later: diag(2583, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583", "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later."), + Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom: diag(2584, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584", "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'."), + _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later: diag(2585, DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585", "'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later."), + Cannot_assign_to_0_because_it_is_a_constant: diag(2588, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_constant_2588", "Cannot assign to '{0}' because it is a constant."), + Type_instantiation_is_excessively_deep_and_possibly_infinite: diag(2589, DiagnosticCategory.Error, "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589", "Type instantiation is excessively deep and possibly infinite."), + Expression_produces_a_union_type_that_is_too_complex_to_represent: diag(2590, DiagnosticCategory.Error, "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590", "Expression produces a union type that is too complex to represent."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig: diag(2591, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig: diag(2592, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig."), + Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig: diag(2593, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig."), + This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag: diag(2594, DiagnosticCategory.Error, "This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594", "This module is declared with 'export =', and can only be used with a default import when using the '{0}' flag."), + _0_can_only_be_imported_by_using_a_default_import: diag(2595, DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_a_default_import_2595", "'{0}' can only be imported by using a default import."), + _0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: diag(2596, DiagnosticCategory.Error, "_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596", "'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import."), + _0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import: diag(2597, DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597", "'{0}' can only be imported by using a 'require' call or by using a default import."), + _0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: diag(2598, DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using__2598", "'{0}' can only be imported by using a 'require' call or by turning on the 'esModuleInterop' flag and using a default import."), + JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: diag(2602, DiagnosticCategory.Error, "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602", "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."), + Property_0_in_type_1_is_not_assignable_to_type_2: diag(2603, DiagnosticCategory.Error, "Property_0_in_type_1_is_not_assignable_to_type_2_2603", "Property '{0}' in type '{1}' is not assignable to type '{2}'."), + JSX_element_type_0_does_not_have_any_construct_or_call_signatures: diag(2604, DiagnosticCategory.Error, "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604", "JSX element type '{0}' does not have any construct or call signatures."), + Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property: diag(2606, DiagnosticCategory.Error, "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606", "Property '{0}' of JSX spread attribute is not assignable to target property."), + JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: diag(2607, DiagnosticCategory.Error, "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", "JSX element class does not support attributes because it does not have a '{0}' property."), + The_global_type_JSX_0_may_not_have_more_than_one_property: diag(2608, DiagnosticCategory.Error, "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", "The global type 'JSX.{0}' may not have more than one property."), + JSX_spread_child_must_be_an_array_type: diag(2609, DiagnosticCategory.Error, "JSX_spread_child_must_be_an_array_type_2609", "JSX spread child must be an array type."), + _0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property: diag(2610, DiagnosticCategory.Error, "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610", "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."), + _0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor: diag(2611, DiagnosticCategory.Error, "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611", "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."), + Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration: diag(2612, DiagnosticCategory.Error, "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612", "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."), + Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead: diag(2613, DiagnosticCategory.Error, "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613", "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"), + Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead: diag(2614, DiagnosticCategory.Error, "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614", "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"), + Type_of_property_0_circularly_references_itself_in_mapped_type_1: diag(2615, DiagnosticCategory.Error, "Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615", "Type of property '{0}' circularly references itself in mapped type '{1}'."), + _0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import: diag(2616, DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import_2616", "'{0}' can only be imported by using 'import {1} = require({2})' or a default import."), + _0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: diag(2617, DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_us_2617", "'{0}' can only be imported by using 'import {1} = require({2})' or by turning on the 'esModuleInterop' flag and using a default import."), + Source_has_0_element_s_but_target_requires_1: diag(2618, DiagnosticCategory.Error, "Source_has_0_element_s_but_target_requires_1_2618", "Source has {0} element(s) but target requires {1}."), + Source_has_0_element_s_but_target_allows_only_1: diag(2619, DiagnosticCategory.Error, "Source_has_0_element_s_but_target_allows_only_1_2619", "Source has {0} element(s) but target allows only {1}."), + Target_requires_0_element_s_but_source_may_have_fewer: diag(2620, DiagnosticCategory.Error, "Target_requires_0_element_s_but_source_may_have_fewer_2620", "Target requires {0} element(s) but source may have fewer."), + Target_allows_only_0_element_s_but_source_may_have_more: diag(2621, DiagnosticCategory.Error, "Target_allows_only_0_element_s_but_source_may_have_more_2621", "Target allows only {0} element(s) but source may have more."), + Source_provides_no_match_for_required_element_at_position_0_in_target: diag(2623, DiagnosticCategory.Error, "Source_provides_no_match_for_required_element_at_position_0_in_target_2623", "Source provides no match for required element at position {0} in target."), + Source_provides_no_match_for_variadic_element_at_position_0_in_target: diag(2624, DiagnosticCategory.Error, "Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624", "Source provides no match for variadic element at position {0} in target."), + Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target: diag(2625, DiagnosticCategory.Error, "Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625", "Variadic element at position {0} in source does not match element at position {1} in target."), + Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target: diag(2626, DiagnosticCategory.Error, "Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626", "Type at position {0} in source is not compatible with type at position {1} in target."), + Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target: diag(2627, DiagnosticCategory.Error, "Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627", "Type at positions {0} through {1} in source is not compatible with type at position {2} in target."), + Cannot_assign_to_0_because_it_is_an_enum: diag(2628, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_an_enum_2628", "Cannot assign to '{0}' because it is an enum."), + Cannot_assign_to_0_because_it_is_a_class: diag(2629, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_class_2629", "Cannot assign to '{0}' because it is a class."), + Cannot_assign_to_0_because_it_is_a_function: diag(2630, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_function_2630", "Cannot assign to '{0}' because it is a function."), + Cannot_assign_to_0_because_it_is_a_namespace: diag(2631, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_namespace_2631", "Cannot assign to '{0}' because it is a namespace."), + Cannot_assign_to_0_because_it_is_an_import: diag(2632, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_an_import_2632", "Cannot assign to '{0}' because it is an import."), + JSX_property_access_expressions_cannot_include_JSX_namespace_names: diag(2633, DiagnosticCategory.Error, "JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633", "JSX property access expressions cannot include JSX namespace names"), + _0_index_signatures_are_incompatible: diag(2634, DiagnosticCategory.Error, "_0_index_signatures_are_incompatible_2634", "'{0}' index signatures are incompatible."), + Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable: diag(2635, DiagnosticCategory.Error, "Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635", "Type '{0}' has no signatures for which the type argument list is applicable."), + Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation: diag(2636, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636", "Type '{0}' is not assignable to type '{1}' as implied by variance annotation."), + Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types: diag(2637, DiagnosticCategory.Error, "Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637", "Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."), + Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator: diag(2638, DiagnosticCategory.Error, "Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638", "Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."), + Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: diag(2649, DiagnosticCategory.Error, "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", "Cannot augment module '{0}' with value exports because it resolves to a non-module entity."), + A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: diag(2651, DiagnosticCategory.Error, "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."), + Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: diag(2652, DiagnosticCategory.Error, "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."), + Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: diag(2653, DiagnosticCategory.Error, "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."), + JSX_expressions_must_have_one_parent_element: diag(2657, DiagnosticCategory.Error, "JSX_expressions_must_have_one_parent_element_2657", "JSX expressions must have one parent element."), + Type_0_provides_no_match_for_the_signature_1: diag(2658, DiagnosticCategory.Error, "Type_0_provides_no_match_for_the_signature_1_2658", "Type '{0}' provides no match for the signature '{1}'."), + super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: diag(2659, DiagnosticCategory.Error, "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."), + super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: diag(2660, DiagnosticCategory.Error, "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", "'super' can only be referenced in members of derived classes or object literal expressions."), + Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module: diag(2661, DiagnosticCategory.Error, "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661", "Cannot export '{0}'. Only local declarations can be exported from a module."), + Cannot_find_name_0_Did_you_mean_the_static_member_1_0: diag(2662, DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662", "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"), + Cannot_find_name_0_Did_you_mean_the_instance_member_this_0: diag(2663, DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663", "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"), + Invalid_module_name_in_augmentation_module_0_cannot_be_found: diag(2664, DiagnosticCategory.Error, "Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664", "Invalid module name in augmentation, module '{0}' cannot be found."), + Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented: diag(2665, DiagnosticCategory.Error, "Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665", "Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."), + Exports_and_export_assignments_are_not_permitted_in_module_augmentations: diag(2666, DiagnosticCategory.Error, "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666", "Exports and export assignments are not permitted in module augmentations."), + Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module: diag(2667, DiagnosticCategory.Error, "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667", "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."), + export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible: diag(2668, DiagnosticCategory.Error, "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668", "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."), + Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations: diag(2669, DiagnosticCategory.Error, "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669", "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."), + Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context: diag(2670, DiagnosticCategory.Error, "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670", "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."), + Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity: diag(2671, DiagnosticCategory.Error, "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671", "Cannot augment module '{0}' because it resolves to a non-module entity."), + Cannot_assign_a_0_constructor_type_to_a_1_constructor_type: diag(2672, DiagnosticCategory.Error, "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672", "Cannot assign a '{0}' constructor type to a '{1}' constructor type."), + Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration: diag(2673, DiagnosticCategory.Error, "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673", "Constructor of class '{0}' is private and only accessible within the class declaration."), + Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration: diag(2674, DiagnosticCategory.Error, "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674", "Constructor of class '{0}' is protected and only accessible within the class declaration."), + Cannot_extend_a_class_0_Class_constructor_is_marked_as_private: diag(2675, DiagnosticCategory.Error, "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675", "Cannot extend a class '{0}'. Class constructor is marked as private."), + Accessors_must_both_be_abstract_or_non_abstract: diag(2676, DiagnosticCategory.Error, "Accessors_must_both_be_abstract_or_non_abstract_2676", "Accessors must both be abstract or non-abstract."), + A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type: diag(2677, DiagnosticCategory.Error, "A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677", "A type predicate's type must be assignable to its parameter's type."), + Type_0_is_not_comparable_to_type_1: diag(2678, DiagnosticCategory.Error, "Type_0_is_not_comparable_to_type_1_2678", "Type '{0}' is not comparable to type '{1}'."), + A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void: diag(2679, DiagnosticCategory.Error, "A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679", "A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."), + A_0_parameter_must_be_the_first_parameter: diag(2680, DiagnosticCategory.Error, "A_0_parameter_must_be_the_first_parameter_2680", "A '{0}' parameter must be the first parameter."), + A_constructor_cannot_have_a_this_parameter: diag(2681, DiagnosticCategory.Error, "A_constructor_cannot_have_a_this_parameter_2681", "A constructor cannot have a 'this' parameter."), + this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation: diag(2683, DiagnosticCategory.Error, "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683", "'this' implicitly has type 'any' because it does not have a type annotation."), + The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1: diag(2684, DiagnosticCategory.Error, "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684", "The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."), + The_this_types_of_each_signature_are_incompatible: diag(2685, DiagnosticCategory.Error, "The_this_types_of_each_signature_are_incompatible_2685", "The 'this' types of each signature are incompatible."), + _0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead: diag(2686, DiagnosticCategory.Error, "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686", "'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."), + All_declarations_of_0_must_have_identical_modifiers: diag(2687, DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_modifiers_2687", "All declarations of '{0}' must have identical modifiers."), + Cannot_find_type_definition_file_for_0: diag(2688, DiagnosticCategory.Error, "Cannot_find_type_definition_file_for_0_2688", "Cannot find type definition file for '{0}'."), + Cannot_extend_an_interface_0_Did_you_mean_implements: diag(2689, DiagnosticCategory.Error, "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", "Cannot extend an interface '{0}'. Did you mean 'implements'?"), + _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0: diag(2690, DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690", "'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?"), + An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead: diag(2691, DiagnosticCategory.Error, "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691", "An import path cannot end with a '{0}' extension. Consider importing '{1}' instead."), + _0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: diag(2692, DiagnosticCategory.Error, "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."), + _0_only_refers_to_a_type_but_is_being_used_as_a_value_here: diag(2693, DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693", "'{0}' only refers to a type, but is being used as a value here."), + Namespace_0_has_no_exported_member_1: diag(2694, DiagnosticCategory.Error, "Namespace_0_has_no_exported_member_1_2694", "Namespace '{0}' has no exported member '{1}'."), + Left_side_of_comma_operator_is_unused_and_has_no_side_effects: diag(2695, DiagnosticCategory.Error, "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695", "Left side of comma operator is unused and has no side effects.", /*reportsUnnecessary*/ true), + The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead: diag(2696, DiagnosticCategory.Error, "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696", "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"), + An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: diag(2697, DiagnosticCategory.Error, "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."), + Spread_types_may_only_be_created_from_object_types: diag(2698, DiagnosticCategory.Error, "Spread_types_may_only_be_created_from_object_types_2698", "Spread types may only be created from object types."), + Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1: diag(2699, DiagnosticCategory.Error, "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."), + Rest_types_may_only_be_created_from_object_types: diag(2700, DiagnosticCategory.Error, "Rest_types_may_only_be_created_from_object_types_2700", "Rest types may only be created from object types."), + The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: diag(2701, DiagnosticCategory.Error, "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", "The target of an object rest assignment must be a variable or a property access."), + _0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: diag(2702, DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", "'{0}' only refers to a type, but is being used as a namespace here."), + The_operand_of_a_delete_operator_must_be_a_property_reference: diag(2703, DiagnosticCategory.Error, "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", "The operand of a 'delete' operator must be a property reference."), + The_operand_of_a_delete_operator_cannot_be_a_read_only_property: diag(2704, DiagnosticCategory.Error, "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", "The operand of a 'delete' operator cannot be a read-only property."), + An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: diag(2705, DiagnosticCategory.Error, "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."), + Required_type_parameters_may_not_follow_optional_type_parameters: diag(2706, DiagnosticCategory.Error, "Required_type_parameters_may_not_follow_optional_type_parameters_2706", "Required type parameters may not follow optional type parameters."), + Generic_type_0_requires_between_1_and_2_type_arguments: diag(2707, DiagnosticCategory.Error, "Generic_type_0_requires_between_1_and_2_type_arguments_2707", "Generic type '{0}' requires between {1} and {2} type arguments."), + Cannot_use_namespace_0_as_a_value: diag(2708, DiagnosticCategory.Error, "Cannot_use_namespace_0_as_a_value_2708", "Cannot use namespace '{0}' as a value."), + Cannot_use_namespace_0_as_a_type: diag(2709, DiagnosticCategory.Error, "Cannot_use_namespace_0_as_a_type_2709", "Cannot use namespace '{0}' as a type."), + _0_are_specified_twice_The_attribute_named_0_will_be_overwritten: diag(2710, DiagnosticCategory.Error, "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", "'{0}' are specified twice. The attribute named '{0}' will be overwritten."), + A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: diag(2711, DiagnosticCategory.Error, "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711", "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."), + A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: diag(2712, DiagnosticCategory.Error, "A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712", "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."), + Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1: diag(2713, DiagnosticCategory.Error, "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713", "Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}[\"{1}\"]'?"), + The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context: diag(2714, DiagnosticCategory.Error, "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714", "The expression of an export assignment must be an identifier or qualified name in an ambient context."), + Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor: diag(2715, DiagnosticCategory.Error, "Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715", "Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."), + Type_parameter_0_has_a_circular_default: diag(2716, DiagnosticCategory.Error, "Type_parameter_0_has_a_circular_default_2716", "Type parameter '{0}' has a circular default."), + Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2: diag(2717, DiagnosticCategory.Error, "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717", "Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."), + Duplicate_property_0: diag(2718, DiagnosticCategory.Error, "Duplicate_property_0_2718", "Duplicate property '{0}'."), + Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated: diag(2719, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719", "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."), + Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass: diag(2720, DiagnosticCategory.Error, "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720", "Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"), + Cannot_invoke_an_object_which_is_possibly_null: diag(2721, DiagnosticCategory.Error, "Cannot_invoke_an_object_which_is_possibly_null_2721", "Cannot invoke an object which is possibly 'null'."), + Cannot_invoke_an_object_which_is_possibly_undefined: diag(2722, DiagnosticCategory.Error, "Cannot_invoke_an_object_which_is_possibly_undefined_2722", "Cannot invoke an object which is possibly 'undefined'."), + Cannot_invoke_an_object_which_is_possibly_null_or_undefined: diag(2723, DiagnosticCategory.Error, "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723", "Cannot invoke an object which is possibly 'null' or 'undefined'."), + _0_has_no_exported_member_named_1_Did_you_mean_2: diag(2724, DiagnosticCategory.Error, "_0_has_no_exported_member_named_1_Did_you_mean_2_2724", "'{0}' has no exported member named '{1}'. Did you mean '{2}'?"), + Class_name_cannot_be_Object_when_targeting_ES5_with_module_0: diag(2725, DiagnosticCategory.Error, "Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725", "Class name cannot be 'Object' when targeting ES5 with module {0}."), + Cannot_find_lib_definition_for_0: diag(2726, DiagnosticCategory.Error, "Cannot_find_lib_definition_for_0_2726", "Cannot find lib definition for '{0}'."), + Cannot_find_lib_definition_for_0_Did_you_mean_1: diag(2727, DiagnosticCategory.Error, "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727", "Cannot find lib definition for '{0}'. Did you mean '{1}'?"), + _0_is_declared_here: diag(2728, DiagnosticCategory.Message, "_0_is_declared_here_2728", "'{0}' is declared here."), + Property_0_is_used_before_its_initialization: diag(2729, DiagnosticCategory.Error, "Property_0_is_used_before_its_initialization_2729", "Property '{0}' is used before its initialization."), + An_arrow_function_cannot_have_a_this_parameter: diag(2730, DiagnosticCategory.Error, "An_arrow_function_cannot_have_a_this_parameter_2730", "An arrow function cannot have a 'this' parameter."), + Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String: diag(2731, DiagnosticCategory.Error, "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731", "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."), + Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension: diag(2732, DiagnosticCategory.Error, "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732", "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension."), + Property_0_was_also_declared_here: diag(2733, DiagnosticCategory.Error, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."), + Are_you_missing_a_semicolon: diag(2734, DiagnosticCategory.Error, "Are_you_missing_a_semicolon_2734", "Are you missing a semicolon?"), + Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1: diag(2735, DiagnosticCategory.Error, "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735", "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"), + Operator_0_cannot_be_applied_to_type_1: diag(2736, DiagnosticCategory.Error, "Operator_0_cannot_be_applied_to_type_1_2736", "Operator '{0}' cannot be applied to type '{1}'."), + BigInt_literals_are_not_available_when_targeting_lower_than_ES2020: diag(2737, DiagnosticCategory.Error, "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737", "BigInt literals are not available when targeting lower than ES2020."), + An_outer_value_of_this_is_shadowed_by_this_container: diag(2738, DiagnosticCategory.Message, "An_outer_value_of_this_is_shadowed_by_this_container_2738", "An outer value of 'this' is shadowed by this container."), + Type_0_is_missing_the_following_properties_from_type_1_Colon_2: diag(2739, DiagnosticCategory.Error, "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739", "Type '{0}' is missing the following properties from type '{1}': {2}"), + Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more: diag(2740, DiagnosticCategory.Error, "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740", "Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."), + Property_0_is_missing_in_type_1_but_required_in_type_2: diag(2741, DiagnosticCategory.Error, "Property_0_is_missing_in_type_1_but_required_in_type_2_2741", "Property '{0}' is missing in type '{1}' but required in type '{2}'."), + The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary: diag(2742, DiagnosticCategory.Error, "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742", "The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."), + No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments: diag(2743, DiagnosticCategory.Error, "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743", "No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."), + Type_parameter_defaults_can_only_reference_previously_declared_type_parameters: diag(2744, DiagnosticCategory.Error, "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744", "Type parameter defaults can only reference previously declared type parameters."), + This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided: diag(2745, DiagnosticCategory.Error, "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745", "This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."), + This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided: diag(2746, DiagnosticCategory.Error, "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746", "This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."), + _0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2: diag(2747, DiagnosticCategory.Error, "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747", "'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."), + Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided: diag(2748, DiagnosticCategory.Error, "Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748", "Cannot access ambient const enums when the '--isolatedModules' flag is provided."), + _0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0: diag(2749, DiagnosticCategory.Error, "_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749", "'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"), + The_implementation_signature_is_declared_here: diag(2750, DiagnosticCategory.Error, "The_implementation_signature_is_declared_here_2750", "The implementation signature is declared here."), + Circularity_originates_in_type_at_this_location: diag(2751, DiagnosticCategory.Error, "Circularity_originates_in_type_at_this_location_2751", "Circularity originates in type at this location."), + The_first_export_default_is_here: diag(2752, DiagnosticCategory.Error, "The_first_export_default_is_here_2752", "The first export default is here."), + Another_export_default_is_here: diag(2753, DiagnosticCategory.Error, "Another_export_default_is_here_2753", "Another export default is here."), + super_may_not_use_type_arguments: diag(2754, DiagnosticCategory.Error, "super_may_not_use_type_arguments_2754", "'super' may not use type arguments."), + No_constituent_of_type_0_is_callable: diag(2755, DiagnosticCategory.Error, "No_constituent_of_type_0_is_callable_2755", "No constituent of type '{0}' is callable."), + Not_all_constituents_of_type_0_are_callable: diag(2756, DiagnosticCategory.Error, "Not_all_constituents_of_type_0_are_callable_2756", "Not all constituents of type '{0}' are callable."), + Type_0_has_no_call_signatures: diag(2757, DiagnosticCategory.Error, "Type_0_has_no_call_signatures_2757", "Type '{0}' has no call signatures."), + Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other: diag(2758, DiagnosticCategory.Error, "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758", "Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."), + No_constituent_of_type_0_is_constructable: diag(2759, DiagnosticCategory.Error, "No_constituent_of_type_0_is_constructable_2759", "No constituent of type '{0}' is constructable."), + Not_all_constituents_of_type_0_are_constructable: diag(2760, DiagnosticCategory.Error, "Not_all_constituents_of_type_0_are_constructable_2760", "Not all constituents of type '{0}' are constructable."), + Type_0_has_no_construct_signatures: diag(2761, DiagnosticCategory.Error, "Type_0_has_no_construct_signatures_2761", "Type '{0}' has no construct signatures."), + Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other: diag(2762, DiagnosticCategory.Error, "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762", "Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."), + Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0: diag(2763, DiagnosticCategory.Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."), + Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0: diag(2764, DiagnosticCategory.Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."), + Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0: diag(2765, DiagnosticCategory.Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."), + Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0: diag(2766, DiagnosticCategory.Error, "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766", "Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."), + The_0_property_of_an_iterator_must_be_a_method: diag(2767, DiagnosticCategory.Error, "The_0_property_of_an_iterator_must_be_a_method_2767", "The '{0}' property of an iterator must be a method."), + The_0_property_of_an_async_iterator_must_be_a_method: diag(2768, DiagnosticCategory.Error, "The_0_property_of_an_async_iterator_must_be_a_method_2768", "The '{0}' property of an async iterator must be a method."), + No_overload_matches_this_call: diag(2769, DiagnosticCategory.Error, "No_overload_matches_this_call_2769", "No overload matches this call."), + The_last_overload_gave_the_following_error: diag(2770, DiagnosticCategory.Error, "The_last_overload_gave_the_following_error_2770", "The last overload gave the following error."), + The_last_overload_is_declared_here: diag(2771, DiagnosticCategory.Error, "The_last_overload_is_declared_here_2771", "The last overload is declared here."), + Overload_0_of_1_2_gave_the_following_error: diag(2772, DiagnosticCategory.Error, "Overload_0_of_1_2_gave_the_following_error_2772", "Overload {0} of {1}, '{2}', gave the following error."), + Did_you_forget_to_use_await: diag(2773, DiagnosticCategory.Error, "Did_you_forget_to_use_await_2773", "Did you forget to use 'await'?"), + This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead: diag(2774, DiagnosticCategory.Error, "This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774", "This condition will always return true since this function is always defined. Did you mean to call it instead?"), + Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation: diag(2775, DiagnosticCategory.Error, "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775", "Assertions require every name in the call target to be declared with an explicit type annotation."), + Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name: diag(2776, DiagnosticCategory.Error, "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776", "Assertions require the call target to be an identifier or qualified name."), + The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access: diag(2777, DiagnosticCategory.Error, "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777", "The operand of an increment or decrement operator may not be an optional property access."), + The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access: diag(2778, DiagnosticCategory.Error, "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778", "The target of an object rest assignment may not be an optional property access."), + The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access: diag(2779, DiagnosticCategory.Error, "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779", "The left-hand side of an assignment expression may not be an optional property access."), + The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access: diag(2780, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780", "The left-hand side of a 'for...in' statement may not be an optional property access."), + The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access: diag(2781, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781", "The left-hand side of a 'for...of' statement may not be an optional property access."), + _0_needs_an_explicit_type_annotation: diag(2782, DiagnosticCategory.Message, "_0_needs_an_explicit_type_annotation_2782", "'{0}' needs an explicit type annotation."), + _0_is_specified_more_than_once_so_this_usage_will_be_overwritten: diag(2783, DiagnosticCategory.Error, "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783", "'{0}' is specified more than once, so this usage will be overwritten."), + get_and_set_accessors_cannot_declare_this_parameters: diag(2784, DiagnosticCategory.Error, "get_and_set_accessors_cannot_declare_this_parameters_2784", "'get' and 'set' accessors cannot declare 'this' parameters."), + This_spread_always_overwrites_this_property: diag(2785, DiagnosticCategory.Error, "This_spread_always_overwrites_this_property_2785", "This spread always overwrites this property."), + _0_cannot_be_used_as_a_JSX_component: diag(2786, DiagnosticCategory.Error, "_0_cannot_be_used_as_a_JSX_component_2786", "'{0}' cannot be used as a JSX component."), + Its_return_type_0_is_not_a_valid_JSX_element: diag(2787, DiagnosticCategory.Error, "Its_return_type_0_is_not_a_valid_JSX_element_2787", "Its return type '{0}' is not a valid JSX element."), + Its_instance_type_0_is_not_a_valid_JSX_element: diag(2788, DiagnosticCategory.Error, "Its_instance_type_0_is_not_a_valid_JSX_element_2788", "Its instance type '{0}' is not a valid JSX element."), + Its_element_type_0_is_not_a_valid_JSX_element: diag(2789, DiagnosticCategory.Error, "Its_element_type_0_is_not_a_valid_JSX_element_2789", "Its element type '{0}' is not a valid JSX element."), + The_operand_of_a_delete_operator_must_be_optional: diag(2790, DiagnosticCategory.Error, "The_operand_of_a_delete_operator_must_be_optional_2790", "The operand of a 'delete' operator must be optional."), + Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later: diag(2791, DiagnosticCategory.Error, "Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791", "Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later."), + Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_the_paths_option: diag(2792, DiagnosticCategory.Error, "Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_th_2792", "Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?"), + The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible: diag(2793, DiagnosticCategory.Error, "The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793", "The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."), + Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise: diag(2794, DiagnosticCategory.Error, "Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794", "Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?"), + The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types: diag(2795, DiagnosticCategory.Error, "The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795", "The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."), + It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked: diag(2796, DiagnosticCategory.Error, "It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796", "It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked."), + A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract: diag(2797, DiagnosticCategory.Error, "A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797", "A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."), + The_declaration_was_marked_as_deprecated_here: diag(2798, DiagnosticCategory.Error, "The_declaration_was_marked_as_deprecated_here_2798", "The declaration was marked as deprecated here."), + Type_produces_a_tuple_type_that_is_too_large_to_represent: diag(2799, DiagnosticCategory.Error, "Type_produces_a_tuple_type_that_is_too_large_to_represent_2799", "Type produces a tuple type that is too large to represent."), + Expression_produces_a_tuple_type_that_is_too_large_to_represent: diag(2800, DiagnosticCategory.Error, "Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800", "Expression produces a tuple type that is too large to represent."), + This_condition_will_always_return_true_since_this_0_is_always_defined: diag(2801, DiagnosticCategory.Error, "This_condition_will_always_return_true_since_this_0_is_always_defined_2801", "This condition will always return true since this '{0}' is always defined."), + Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher: diag(2802, DiagnosticCategory.Error, "Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802", "Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."), + Cannot_assign_to_private_method_0_Private_methods_are_not_writable: diag(2803, DiagnosticCategory.Error, "Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803", "Cannot assign to private method '{0}'. Private methods are not writable."), + Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name: diag(2804, DiagnosticCategory.Error, "Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804", "Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."), + Private_accessor_was_defined_without_a_getter: diag(2806, DiagnosticCategory.Error, "Private_accessor_was_defined_without_a_getter_2806", "Private accessor was defined without a getter."), + This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0: diag(2807, DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807", "This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."), + A_get_accessor_must_be_at_least_as_accessible_as_the_setter: diag(2808, DiagnosticCategory.Error, "A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808", "A get accessor must be at least as accessible as the setter"), + Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_the_whole_assignment_in_parentheses: diag(2809, DiagnosticCategory.Error, "Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809", "Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the the whole assignment in parentheses."), + Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments: diag(2810, DiagnosticCategory.Error, "Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810", "Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."), + Initializer_for_property_0: diag(2811, DiagnosticCategory.Error, "Initializer_for_property_0_2811", "Initializer for property '{0}'"), + Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: diag(2812, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."), + Class_declaration_cannot_implement_overload_list_for_0: diag(2813, DiagnosticCategory.Error, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."), + Function_with_bodies_can_only_merge_with_classes_that_are_ambient: diag(2814, DiagnosticCategory.Error, "Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814", "Function with bodies can only merge with classes that are ambient."), + arguments_cannot_be_referenced_in_property_initializers: diag(2815, DiagnosticCategory.Error, "arguments_cannot_be_referenced_in_property_initializers_2815", "'arguments' cannot be referenced in property initializers."), + Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class: diag(2816, DiagnosticCategory.Error, "Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816", "Cannot use 'this' in a static property initializer of a decorated class."), + Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block: diag(2817, DiagnosticCategory.Error, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817", "Property '{0}' has no initializer and is not definitely assigned in a class static block."), + Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers: diag(2818, DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818", "Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."), + Namespace_name_cannot_be_0: diag(2819, DiagnosticCategory.Error, "Namespace_name_cannot_be_0_2819", "Namespace name cannot be '{0}'."), + Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"), + Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2821, DiagnosticCategory.Error, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."), + Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, DiagnosticCategory.Error, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."), + Cannot_find_namespace_0_Did_you_mean_1: diag(2833, DiagnosticCategory.Error, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"), + Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."), + Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"), + Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, DiagnosticCategory.Error, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."), + Import_assertion_values_must_be_string_literal_expressions: diag(2837, DiagnosticCategory.Error, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."), + All_declarations_of_0_must_have_identical_constraints: diag(2838, DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."), + This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, DiagnosticCategory.Error, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."), + An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes: diag(2840, DiagnosticCategory.Error, "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840", "An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"), + The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(2841, DiagnosticCategory.Error, "The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_2841", "The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), + _0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: diag(2842, DiagnosticCategory.Error, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"), + We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, DiagnosticCategory.Error, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."), + Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2844, DiagnosticCategory.Error, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."), + This_condition_will_always_return_0: diag(2845, DiagnosticCategory.Error, "This_condition_will_always_return_0_2845", "This condition will always return '{0}'."), + Import_declaration_0_is_using_private_name_1: diag(4000, DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."), + Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."), + Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."), + Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4006, DiagnosticCategory.Error, "Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006", "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."), + Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4008, DiagnosticCategory.Error, "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008", "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."), + Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: diag(4010, DiagnosticCategory.Error, "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010", "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."), + Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: diag(4012, DiagnosticCategory.Error, "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012", "Type parameter '{0}' of public method from exported class has or is using private name '{1}'."), + Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: diag(4014, DiagnosticCategory.Error, "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014", "Type parameter '{0}' of method from exported interface has or is using private name '{1}'."), + Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: diag(4016, DiagnosticCategory.Error, "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016", "Type parameter '{0}' of exported function has or is using private name '{1}'."), + Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: diag(4019, DiagnosticCategory.Error, "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019", "Implements clause of exported class '{0}' has or is using private name '{1}'."), + extends_clause_of_exported_class_0_has_or_is_using_private_name_1: diag(4020, DiagnosticCategory.Error, "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", "'extends' clause of exported class '{0}' has or is using private name '{1}'."), + extends_clause_of_exported_class_has_or_is_using_private_name_0: diag(4021, DiagnosticCategory.Error, "extends_clause_of_exported_class_has_or_is_using_private_name_0_4021", "'extends' clause of exported class has or is using private name '{0}'."), + extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: diag(4022, DiagnosticCategory.Error, "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", "'extends' clause of exported interface '{0}' has or is using private name '{1}'."), + Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4023, DiagnosticCategory.Error, "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023", "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."), + Exported_variable_0_has_or_is_using_name_1_from_private_module_2: diag(4024, DiagnosticCategory.Error, "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024", "Exported variable '{0}' has or is using name '{1}' from private module '{2}'."), + Exported_variable_0_has_or_is_using_private_name_1: diag(4025, DiagnosticCategory.Error, "Exported_variable_0_has_or_is_using_private_name_1_4025", "Exported variable '{0}' has or is using private name '{1}'."), + Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4026, DiagnosticCategory.Error, "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026", "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4027, DiagnosticCategory.Error, "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027", "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_static_property_0_of_exported_class_has_or_is_using_private_name_1: diag(4028, DiagnosticCategory.Error, "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028", "Public static property '{0}' of exported class has or is using private name '{1}'."), + Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4029, DiagnosticCategory.Error, "Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029", "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4030, DiagnosticCategory.Error, "Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030", "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_property_0_of_exported_class_has_or_is_using_private_name_1: diag(4031, DiagnosticCategory.Error, "Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031", "Public property '{0}' of exported class has or is using private name '{1}'."), + Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4032, DiagnosticCategory.Error, "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032", "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."), + Property_0_of_exported_interface_has_or_is_using_private_name_1: diag(4033, DiagnosticCategory.Error, "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033", "Property '{0}' of exported interface has or is using private name '{1}'."), + Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4034, DiagnosticCategory.Error, "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034", "Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1: diag(4035, DiagnosticCategory.Error, "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035", "Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."), + Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4036, DiagnosticCategory.Error, "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036", "Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1: diag(4037, DiagnosticCategory.Error, "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037", "Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."), + Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4038, DiagnosticCategory.Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038", "Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4039, DiagnosticCategory.Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039", "Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1: diag(4040, DiagnosticCategory.Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040", "Return type of public static getter '{0}' from exported class has or is using private name '{1}'."), + Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4041, DiagnosticCategory.Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041", "Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4042, DiagnosticCategory.Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042", "Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), + Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1: diag(4043, DiagnosticCategory.Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043", "Return type of public getter '{0}' from exported class has or is using private name '{1}'."), + Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4044, DiagnosticCategory.Error, "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044", "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0: diag(4045, DiagnosticCategory.Error, "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045", "Return type of constructor signature from exported interface has or is using private name '{0}'."), + Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4046, DiagnosticCategory.Error, "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046", "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0: diag(4047, DiagnosticCategory.Error, "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047", "Return type of call signature from exported interface has or is using private name '{0}'."), + Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4048, DiagnosticCategory.Error, "Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048", "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0: diag(4049, DiagnosticCategory.Error, "Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049", "Return type of index signature from exported interface has or is using private name '{0}'."), + Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: diag(4050, DiagnosticCategory.Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050", "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."), + Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: diag(4051, DiagnosticCategory.Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051", "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."), + Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0: diag(4052, DiagnosticCategory.Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052", "Return type of public static method from exported class has or is using private name '{0}'."), + Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: diag(4053, DiagnosticCategory.Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053", "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."), + Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: diag(4054, DiagnosticCategory.Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054", "Return type of public method from exported class has or is using name '{0}' from private module '{1}'."), + Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0: diag(4055, DiagnosticCategory.Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055", "Return type of public method from exported class has or is using private name '{0}'."), + Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4056, DiagnosticCategory.Error, "Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056", "Return type of method from exported interface has or is using name '{0}' from private module '{1}'."), + Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0: diag(4057, DiagnosticCategory.Error, "Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057", "Return type of method from exported interface has or is using private name '{0}'."), + Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: diag(4058, DiagnosticCategory.Error, "Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058", "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."), + Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: diag(4059, DiagnosticCategory.Error, "Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059", "Return type of exported function has or is using name '{0}' from private module '{1}'."), + Return_type_of_exported_function_has_or_is_using_private_name_0: diag(4060, DiagnosticCategory.Error, "Return_type_of_exported_function_has_or_is_using_private_name_0_4060", "Return type of exported function has or is using private name '{0}'."), + Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4061, DiagnosticCategory.Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061", "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4062, DiagnosticCategory.Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062", "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1: diag(4063, DiagnosticCategory.Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063", "Parameter '{0}' of constructor from exported class has or is using private name '{1}'."), + Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4064, DiagnosticCategory.Error, "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064", "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4065, DiagnosticCategory.Error, "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065", "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."), + Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4066, DiagnosticCategory.Error, "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066", "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4067, DiagnosticCategory.Error, "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067", "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."), + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4068, DiagnosticCategory.Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068", "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4069, DiagnosticCategory.Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069", "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: diag(4070, DiagnosticCategory.Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070", "Parameter '{0}' of public static method from exported class has or is using private name '{1}'."), + Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4071, DiagnosticCategory.Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071", "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4072, DiagnosticCategory.Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072", "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: diag(4073, DiagnosticCategory.Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073", "Parameter '{0}' of public method from exported class has or is using private name '{1}'."), + Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4074, DiagnosticCategory.Error, "Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074", "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: diag(4075, DiagnosticCategory.Error, "Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075", "Parameter '{0}' of method from exported interface has or is using private name '{1}'."), + Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4076, DiagnosticCategory.Error, "Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076", "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."), + Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: diag(4077, DiagnosticCategory.Error, "Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077", "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_exported_function_has_or_is_using_private_name_1: diag(4078, DiagnosticCategory.Error, "Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078", "Parameter '{0}' of exported function has or is using private name '{1}'."), + Exported_type_alias_0_has_or_is_using_private_name_1: diag(4081, DiagnosticCategory.Error, "Exported_type_alias_0_has_or_is_using_private_name_1_4081", "Exported type alias '{0}' has or is using private name '{1}'."), + Default_export_of_the_module_has_or_is_using_private_name_0: diag(4082, DiagnosticCategory.Error, "Default_export_of_the_module_has_or_is_using_private_name_0_4082", "Default export of the module has or is using private name '{0}'."), + Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1: diag(4083, DiagnosticCategory.Error, "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083", "Type parameter '{0}' of exported type alias has or is using private name '{1}'."), + Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2: diag(4084, DiagnosticCategory.Error, "Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084", "Exported type alias '{0}' has or is using private name '{1}' from module {2}."), + Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict: diag(4090, DiagnosticCategory.Error, "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090", "Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict."), + Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4091, DiagnosticCategory.Error, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091", "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4092, DiagnosticCategory.Error, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092", "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."), + Property_0_of_exported_class_expression_may_not_be_private_or_protected: diag(4094, DiagnosticCategory.Error, "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094", "Property '{0}' of exported class expression may not be private or protected."), + Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4095, DiagnosticCategory.Error, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095", "Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4096, DiagnosticCategory.Error, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096", "Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_static_method_0_of_exported_class_has_or_is_using_private_name_1: diag(4097, DiagnosticCategory.Error, "Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097", "Public static method '{0}' of exported class has or is using private name '{1}'."), + Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4098, DiagnosticCategory.Error, "Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098", "Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), + Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4099, DiagnosticCategory.Error, "Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099", "Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."), + Public_method_0_of_exported_class_has_or_is_using_private_name_1: diag(4100, DiagnosticCategory.Error, "Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100", "Public method '{0}' of exported class has or is using private name '{1}'."), + Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4101, DiagnosticCategory.Error, "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101", "Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."), + Method_0_of_exported_interface_has_or_is_using_private_name_1: diag(4102, DiagnosticCategory.Error, "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102", "Method '{0}' of exported interface has or is using private name '{1}'."), + Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1: diag(4103, DiagnosticCategory.Error, "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103", "Type parameter '{0}' of exported mapped object type is using private name '{1}'."), + The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1: diag(4104, DiagnosticCategory.Error, "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104", "The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."), + Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter: diag(4105, DiagnosticCategory.Error, "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105", "Private or protected member '{0}' cannot be accessed on a type parameter."), + Parameter_0_of_accessor_has_or_is_using_private_name_1: diag(4106, DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106", "Parameter '{0}' of accessor has or is using private name '{1}'."), + Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2: diag(4107, DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107", "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."), + Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4108, DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108", "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."), + Type_arguments_for_0_circularly_reference_themselves: diag(4109, DiagnosticCategory.Error, "Type_arguments_for_0_circularly_reference_themselves_4109", "Type arguments for '{0}' circularly reference themselves."), + Tuple_type_arguments_circularly_reference_themselves: diag(4110, DiagnosticCategory.Error, "Tuple_type_arguments_circularly_reference_themselves_4110", "Tuple type arguments circularly reference themselves."), + Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0: diag(4111, DiagnosticCategory.Error, "Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111", "Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."), + This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class: diag(4112, DiagnosticCategory.Error, "This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112", "This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."), + This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0: diag(4113, DiagnosticCategory.Error, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."), + This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0: diag(4114, DiagnosticCategory.Error, "This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114", "This member must have an 'override' modifier because it overrides a member in the base class '{0}'."), + This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0: diag(4115, DiagnosticCategory.Error, "This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115", "This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."), + This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0: diag(4116, DiagnosticCategory.Error, "This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116", "This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."), + This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4117, DiagnosticCategory.Error, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"), + The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized: diag(4118, DiagnosticCategory.Error, "The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118", "The type of this node cannot be serialized because its property '{0}' cannot be serialized."), + This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: diag(4119, DiagnosticCategory.Error, "This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119", "This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."), + This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: diag(4120, DiagnosticCategory.Error, "This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120", "This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."), + This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class: diag(4121, DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121", "This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."), + This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."), + This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"), + Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, DiagnosticCategory.Error, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), + resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4125, DiagnosticCategory.Error, "resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125", "'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), + The_current_host_does_not_support_the_0_option: diag(5001, DiagnosticCategory.Error, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."), + Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, DiagnosticCategory.Error, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."), + File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, DiagnosticCategory.Error, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."), + Cannot_read_file_0_Colon_1: diag(5012, DiagnosticCategory.Error, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."), + Failed_to_parse_file_0_Colon_1: diag(5014, DiagnosticCategory.Error, "Failed_to_parse_file_0_Colon_1_5014", "Failed to parse file '{0}': {1}."), + Unknown_compiler_option_0: diag(5023, DiagnosticCategory.Error, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."), + Compiler_option_0_requires_a_value_of_type_1: diag(5024, DiagnosticCategory.Error, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."), + Unknown_compiler_option_0_Did_you_mean_1: diag(5025, DiagnosticCategory.Error, "Unknown_compiler_option_0_Did_you_mean_1_5025", "Unknown compiler option '{0}'. Did you mean '{1}'?"), + Could_not_write_file_0_Colon_1: diag(5033, DiagnosticCategory.Error, "Could_not_write_file_0_Colon_1_5033", "Could not write file '{0}': {1}."), + Option_project_cannot_be_mixed_with_source_files_on_a_command_line: diag(5042, DiagnosticCategory.Error, "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", "Option 'project' cannot be mixed with source files on a command line."), + Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: diag(5047, DiagnosticCategory.Error, "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."), + Option_0_cannot_be_specified_when_option_target_is_ES3: diag(5048, DiagnosticCategory.Error, "Option_0_cannot_be_specified_when_option_target_is_ES3_5048", "Option '{0}' cannot be specified when option 'target' is 'ES3'."), + Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: diag(5051, DiagnosticCategory.Error, "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051", "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."), + Option_0_cannot_be_specified_without_specifying_option_1: diag(5052, DiagnosticCategory.Error, "Option_0_cannot_be_specified_without_specifying_option_1_5052", "Option '{0}' cannot be specified without specifying option '{1}'."), + Option_0_cannot_be_specified_with_option_1: diag(5053, DiagnosticCategory.Error, "Option_0_cannot_be_specified_with_option_1_5053", "Option '{0}' cannot be specified with option '{1}'."), + A_tsconfig_json_file_is_already_defined_at_Colon_0: diag(5054, DiagnosticCategory.Error, "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054", "A 'tsconfig.json' file is already defined at: '{0}'."), + Cannot_write_file_0_because_it_would_overwrite_input_file: diag(5055, DiagnosticCategory.Error, "Cannot_write_file_0_because_it_would_overwrite_input_file_5055", "Cannot write file '{0}' because it would overwrite input file."), + Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files: diag(5056, DiagnosticCategory.Error, "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056", "Cannot write file '{0}' because it would be overwritten by multiple input files."), + Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: diag(5057, DiagnosticCategory.Error, "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", "Cannot find a tsconfig.json file at the specified directory: '{0}'."), + The_specified_path_does_not_exist_Colon_0: diag(5058, DiagnosticCategory.Error, "The_specified_path_does_not_exist_Colon_0_5058", "The specified path does not exist: '{0}'."), + Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier: diag(5059, DiagnosticCategory.Error, "Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059", "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."), + Pattern_0_can_have_at_most_one_Asterisk_character: diag(5061, DiagnosticCategory.Error, "Pattern_0_can_have_at_most_one_Asterisk_character_5061", "Pattern '{0}' can have at most one '*' character."), + Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character: diag(5062, DiagnosticCategory.Error, "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062", "Substitution '{0}' in pattern '{1}' can have at most one '*' character."), + Substitutions_for_pattern_0_should_be_an_array: diag(5063, DiagnosticCategory.Error, "Substitutions_for_pattern_0_should_be_an_array_5063", "Substitutions for pattern '{0}' should be an array."), + Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2: diag(5064, DiagnosticCategory.Error, "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064", "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."), + File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5065, DiagnosticCategory.Error, "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065", "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."), + Substitutions_for_pattern_0_shouldn_t_be_an_empty_array: diag(5066, DiagnosticCategory.Error, "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066", "Substitutions for pattern '{0}' shouldn't be an empty array."), + Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name: diag(5067, DiagnosticCategory.Error, "Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067", "Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."), + Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: diag(5068, DiagnosticCategory.Error, "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068", "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."), + Option_0_cannot_be_specified_without_specifying_option_1_or_option_2: diag(5069, DiagnosticCategory.Error, "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069", "Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."), + Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy: diag(5070, DiagnosticCategory.Error, "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070", "Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy."), + Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext: diag(5071, DiagnosticCategory.Error, "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071", "Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'."), + Unknown_build_option_0: diag(5072, DiagnosticCategory.Error, "Unknown_build_option_0_5072", "Unknown build option '{0}'."), + Build_option_0_requires_a_value_of_type_1: diag(5073, DiagnosticCategory.Error, "Build_option_0_requires_a_value_of_type_1_5073", "Build option '{0}' requires a value of type {1}."), + Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified: diag(5074, DiagnosticCategory.Error, "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074", "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified."), + _0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2: diag(5075, DiagnosticCategory.Error, "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075", "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."), + _0_and_1_operations_cannot_be_mixed_without_parentheses: diag(5076, DiagnosticCategory.Error, "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076", "'{0}' and '{1}' operations cannot be mixed without parentheses."), + Unknown_build_option_0_Did_you_mean_1: diag(5077, DiagnosticCategory.Error, "Unknown_build_option_0_Did_you_mean_1_5077", "Unknown build option '{0}'. Did you mean '{1}'?"), + Unknown_watch_option_0: diag(5078, DiagnosticCategory.Error, "Unknown_watch_option_0_5078", "Unknown watch option '{0}'."), + Unknown_watch_option_0_Did_you_mean_1: diag(5079, DiagnosticCategory.Error, "Unknown_watch_option_0_Did_you_mean_1_5079", "Unknown watch option '{0}'. Did you mean '{1}'?"), + Watch_option_0_requires_a_value_of_type_1: diag(5080, DiagnosticCategory.Error, "Watch_option_0_requires_a_value_of_type_1_5080", "Watch option '{0}' requires a value of type {1}."), + Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0: diag(5081, DiagnosticCategory.Error, "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081", "Cannot find a tsconfig.json file at the current directory: {0}."), + _0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1: diag(5082, DiagnosticCategory.Error, "_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082", "'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."), + Cannot_read_file_0: diag(5083, DiagnosticCategory.Error, "Cannot_read_file_0_5083", "Cannot read file '{0}'."), + Tuple_members_must_all_have_names_or_all_not_have_names: diag(5084, DiagnosticCategory.Error, "Tuple_members_must_all_have_names_or_all_not_have_names_5084", "Tuple members must all have names or all not have names."), + A_tuple_member_cannot_be_both_optional_and_rest: diag(5085, DiagnosticCategory.Error, "A_tuple_member_cannot_be_both_optional_and_rest_5085", "A tuple member cannot be both optional and rest."), + A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type: diag(5086, DiagnosticCategory.Error, "A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086", "A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."), + A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type: diag(5087, DiagnosticCategory.Error, "A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087", "A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."), + The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary: diag(5088, DiagnosticCategory.Error, "The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088", "The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary."), + Option_0_cannot_be_specified_when_option_jsx_is_1: diag(5089, DiagnosticCategory.Error, "Option_0_cannot_be_specified_when_option_jsx_is_1_5089", "Option '{0}' cannot be specified when option 'jsx' is '{1}'."), + Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash: diag(5090, DiagnosticCategory.Error, "Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090", "Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"), + Option_preserveConstEnums_cannot_be_disabled_when_isolatedModules_is_enabled: diag(5091, DiagnosticCategory.Error, "Option_preserveConstEnums_cannot_be_disabled_when_isolatedModules_is_enabled_5091", "Option 'preserveConstEnums' cannot be disabled when 'isolatedModules' is enabled."), + The_root_value_of_a_0_file_must_be_an_object: diag(5092, DiagnosticCategory.Error, "The_root_value_of_a_0_file_must_be_an_object_5092", "The root value of a '{0}' file must be an object."), + Compiler_option_0_may_only_be_used_with_build: diag(5093, DiagnosticCategory.Error, "Compiler_option_0_may_only_be_used_with_build_5093", "Compiler option '--{0}' may only be used with '--build'."), + Compiler_option_0_may_not_be_used_with_build: diag(5094, DiagnosticCategory.Error, "Compiler_option_0_may_not_be_used_with_build_5094", "Compiler option '--{0}' may not be used with '--build'."), + Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later: diag(5095, DiagnosticCategory.Error, "Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later_5095", "Option 'preserveValueImports' can only be used when 'module' is set to 'es2015' or later."), + Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6000, DiagnosticCategory.Message, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), + Concatenate_and_emit_output_to_single_file: diag(6001, DiagnosticCategory.Message, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), + Generates_corresponding_d_ts_file: diag(6002, DiagnosticCategory.Message, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), + Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: diag(6004, DiagnosticCategory.Message, "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004", "Specify the location where debugger should locate TypeScript files instead of source locations."), + Watch_input_files: diag(6005, DiagnosticCategory.Message, "Watch_input_files_6005", "Watch input files."), + Redirect_output_structure_to_the_directory: diag(6006, DiagnosticCategory.Message, "Redirect_output_structure_to_the_directory_6006", "Redirect output structure to the directory."), + Do_not_erase_const_enum_declarations_in_generated_code: diag(6007, DiagnosticCategory.Message, "Do_not_erase_const_enum_declarations_in_generated_code_6007", "Do not erase const enum declarations in generated code."), + Do_not_emit_outputs_if_any_errors_were_reported: diag(6008, DiagnosticCategory.Message, "Do_not_emit_outputs_if_any_errors_were_reported_6008", "Do not emit outputs if any errors were reported."), + Do_not_emit_comments_to_output: diag(6009, DiagnosticCategory.Message, "Do_not_emit_comments_to_output_6009", "Do not emit comments to output."), + Do_not_emit_outputs: diag(6010, DiagnosticCategory.Message, "Do_not_emit_outputs_6010", "Do not emit outputs."), + Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking: diag(6011, DiagnosticCategory.Message, "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011", "Allow default imports from modules with no default export. This does not affect code emit, just typechecking."), + Skip_type_checking_of_declaration_files: diag(6012, DiagnosticCategory.Message, "Skip_type_checking_of_declaration_files_6012", "Skip type checking of declaration files."), + Do_not_resolve_the_real_path_of_symlinks: diag(6013, DiagnosticCategory.Message, "Do_not_resolve_the_real_path_of_symlinks_6013", "Do not resolve the real path of symlinks."), + Only_emit_d_ts_declaration_files: diag(6014, DiagnosticCategory.Message, "Only_emit_d_ts_declaration_files_6014", "Only emit '.d.ts' declaration files."), + Specify_ECMAScript_target_version: diag(6015, DiagnosticCategory.Message, "Specify_ECMAScript_target_version_6015", "Specify ECMAScript target version."), + Specify_module_code_generation: diag(6016, DiagnosticCategory.Message, "Specify_module_code_generation_6016", "Specify module code generation."), + Print_this_message: diag(6017, DiagnosticCategory.Message, "Print_this_message_6017", "Print this message."), + Print_the_compiler_s_version: diag(6019, DiagnosticCategory.Message, "Print_the_compiler_s_version_6019", "Print the compiler's version."), + Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json: diag(6020, DiagnosticCategory.Message, "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020", "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."), + Syntax_Colon_0: diag(6023, DiagnosticCategory.Message, "Syntax_Colon_0_6023", "Syntax: {0}"), + options: diag(6024, DiagnosticCategory.Message, "options_6024", "options"), + file: diag(6025, DiagnosticCategory.Message, "file_6025", "file"), + Examples_Colon_0: diag(6026, DiagnosticCategory.Message, "Examples_Colon_0_6026", "Examples: {0}"), + Options_Colon: diag(6027, DiagnosticCategory.Message, "Options_Colon_6027", "Options:"), + Version_0: diag(6029, DiagnosticCategory.Message, "Version_0_6029", "Version {0}"), + Insert_command_line_options_and_files_from_a_file: diag(6030, DiagnosticCategory.Message, "Insert_command_line_options_and_files_from_a_file_6030", "Insert command line options and files from a file."), + Starting_compilation_in_watch_mode: diag(6031, DiagnosticCategory.Message, "Starting_compilation_in_watch_mode_6031", "Starting compilation in watch mode..."), + File_change_detected_Starting_incremental_compilation: diag(6032, DiagnosticCategory.Message, "File_change_detected_Starting_incremental_compilation_6032", "File change detected. Starting incremental compilation..."), + KIND: diag(6034, DiagnosticCategory.Message, "KIND_6034", "KIND"), + FILE: diag(6035, DiagnosticCategory.Message, "FILE_6035", "FILE"), + VERSION: diag(6036, DiagnosticCategory.Message, "VERSION_6036", "VERSION"), + LOCATION: diag(6037, DiagnosticCategory.Message, "LOCATION_6037", "LOCATION"), + DIRECTORY: diag(6038, DiagnosticCategory.Message, "DIRECTORY_6038", "DIRECTORY"), + STRATEGY: diag(6039, DiagnosticCategory.Message, "STRATEGY_6039", "STRATEGY"), + FILE_OR_DIRECTORY: diag(6040, DiagnosticCategory.Message, "FILE_OR_DIRECTORY_6040", "FILE OR DIRECTORY"), + Errors_Files: diag(6041, DiagnosticCategory.Message, "Errors_Files_6041", "Errors Files"), + Generates_corresponding_map_file: diag(6043, DiagnosticCategory.Message, "Generates_corresponding_map_file_6043", "Generates corresponding '.map' file."), + Compiler_option_0_expects_an_argument: diag(6044, DiagnosticCategory.Error, "Compiler_option_0_expects_an_argument_6044", "Compiler option '{0}' expects an argument."), + Unterminated_quoted_string_in_response_file_0: diag(6045, DiagnosticCategory.Error, "Unterminated_quoted_string_in_response_file_0_6045", "Unterminated quoted string in response file '{0}'."), + Argument_for_0_option_must_be_Colon_1: diag(6046, DiagnosticCategory.Error, "Argument_for_0_option_must_be_Colon_1_6046", "Argument for '{0}' option must be: {1}."), + Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: diag(6048, DiagnosticCategory.Error, "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048", "Locale must be of the form or -. For example '{0}' or '{1}'."), + Unable_to_open_file_0: diag(6050, DiagnosticCategory.Error, "Unable_to_open_file_0_6050", "Unable to open file '{0}'."), + Corrupted_locale_file_0: diag(6051, DiagnosticCategory.Error, "Corrupted_locale_file_0_6051", "Corrupted locale file {0}."), + Raise_error_on_expressions_and_declarations_with_an_implied_any_type: diag(6052, DiagnosticCategory.Message, "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052", "Raise error on expressions and declarations with an implied 'any' type."), + File_0_not_found: diag(6053, DiagnosticCategory.Error, "File_0_not_found_6053", "File '{0}' not found."), + File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1: diag(6054, DiagnosticCategory.Error, "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has an unsupported extension. The only supported extensions are {1}."), + Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: diag(6055, DiagnosticCategory.Message, "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055", "Suppress noImplicitAny errors for indexing objects lacking index signatures."), + Do_not_emit_declarations_for_code_that_has_an_internal_annotation: diag(6056, DiagnosticCategory.Message, "Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056", "Do not emit declarations for code that has an '@internal' annotation."), + Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: diag(6058, DiagnosticCategory.Message, "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058", "Specify the root directory of input files. Use to control the output directory structure with --outDir."), + File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: diag(6059, DiagnosticCategory.Error, "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059", "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."), + Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: diag(6060, DiagnosticCategory.Message, "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060", "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."), + NEWLINE: diag(6061, DiagnosticCategory.Message, "NEWLINE_6061", "NEWLINE"), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line: diag(6064, DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."), + Enables_experimental_support_for_ES7_decorators: diag(6065, DiagnosticCategory.Message, "Enables_experimental_support_for_ES7_decorators_6065", "Enables experimental support for ES7 decorators."), + Enables_experimental_support_for_emitting_type_metadata_for_decorators: diag(6066, DiagnosticCategory.Message, "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", "Enables experimental support for emitting type metadata for decorators."), + Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6: diag(6069, DiagnosticCategory.Message, "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069", "Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6)."), + Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: diag(6070, DiagnosticCategory.Message, "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", "Initializes a TypeScript project and creates a tsconfig.json file."), + Successfully_created_a_tsconfig_json_file: diag(6071, DiagnosticCategory.Message, "Successfully_created_a_tsconfig_json_file_6071", "Successfully created a tsconfig.json file."), + Suppress_excess_property_checks_for_object_literals: diag(6072, DiagnosticCategory.Message, "Suppress_excess_property_checks_for_object_literals_6072", "Suppress excess property checks for object literals."), + Stylize_errors_and_messages_using_color_and_context_experimental: diag(6073, DiagnosticCategory.Message, "Stylize_errors_and_messages_using_color_and_context_experimental_6073", "Stylize errors and messages using color and context (experimental)."), + Do_not_report_errors_on_unused_labels: diag(6074, DiagnosticCategory.Message, "Do_not_report_errors_on_unused_labels_6074", "Do not report errors on unused labels."), + Report_error_when_not_all_code_paths_in_function_return_a_value: diag(6075, DiagnosticCategory.Message, "Report_error_when_not_all_code_paths_in_function_return_a_value_6075", "Report error when not all code paths in function return a value."), + Report_errors_for_fallthrough_cases_in_switch_statement: diag(6076, DiagnosticCategory.Message, "Report_errors_for_fallthrough_cases_in_switch_statement_6076", "Report errors for fallthrough cases in switch statement."), + Do_not_report_errors_on_unreachable_code: diag(6077, DiagnosticCategory.Message, "Do_not_report_errors_on_unreachable_code_6077", "Do not report errors on unreachable code."), + Disallow_inconsistently_cased_references_to_the_same_file: diag(6078, DiagnosticCategory.Message, "Disallow_inconsistently_cased_references_to_the_same_file_6078", "Disallow inconsistently-cased references to the same file."), + Specify_library_files_to_be_included_in_the_compilation: diag(6079, DiagnosticCategory.Message, "Specify_library_files_to_be_included_in_the_compilation_6079", "Specify library files to be included in the compilation."), + Specify_JSX_code_generation: diag(6080, DiagnosticCategory.Message, "Specify_JSX_code_generation_6080", "Specify JSX code generation."), + File_0_has_an_unsupported_extension_so_skipping_it: diag(6081, DiagnosticCategory.Message, "File_0_has_an_unsupported_extension_so_skipping_it_6081", "File '{0}' has an unsupported extension, so skipping it."), + Only_amd_and_system_modules_are_supported_alongside_0: diag(6082, DiagnosticCategory.Error, "Only_amd_and_system_modules_are_supported_alongside_0_6082", "Only 'amd' and 'system' modules are supported alongside --{0}."), + Base_directory_to_resolve_non_absolute_module_names: diag(6083, DiagnosticCategory.Message, "Base_directory_to_resolve_non_absolute_module_names_6083", "Base directory to resolve non-absolute module names."), + Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: diag(6084, DiagnosticCategory.Message, "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"), + Enable_tracing_of_the_name_resolution_process: diag(6085, DiagnosticCategory.Message, "Enable_tracing_of_the_name_resolution_process_6085", "Enable tracing of the name resolution process."), + Resolving_module_0_from_1: diag(6086, DiagnosticCategory.Message, "Resolving_module_0_from_1_6086", "======== Resolving module '{0}' from '{1}'. ========"), + Explicitly_specified_module_resolution_kind_Colon_0: diag(6087, DiagnosticCategory.Message, "Explicitly_specified_module_resolution_kind_Colon_0_6087", "Explicitly specified module resolution kind: '{0}'."), + Module_resolution_kind_is_not_specified_using_0: diag(6088, DiagnosticCategory.Message, "Module_resolution_kind_is_not_specified_using_0_6088", "Module resolution kind is not specified, using '{0}'."), + Module_name_0_was_successfully_resolved_to_1: diag(6089, DiagnosticCategory.Message, "Module_name_0_was_successfully_resolved_to_1_6089", "======== Module name '{0}' was successfully resolved to '{1}'. ========"), + Module_name_0_was_not_resolved: diag(6090, DiagnosticCategory.Message, "Module_name_0_was_not_resolved_6090", "======== Module name '{0}' was not resolved. ========"), + paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0: diag(6091, DiagnosticCategory.Message, "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091", "'paths' option is specified, looking for a pattern to match module name '{0}'."), + Module_name_0_matched_pattern_1: diag(6092, DiagnosticCategory.Message, "Module_name_0_matched_pattern_1_6092", "Module name '{0}', matched pattern '{1}'."), + Trying_substitution_0_candidate_module_location_Colon_1: diag(6093, DiagnosticCategory.Message, "Trying_substitution_0_candidate_module_location_Colon_1_6093", "Trying substitution '{0}', candidate module location: '{1}'."), + Resolving_module_name_0_relative_to_base_url_1_2: diag(6094, DiagnosticCategory.Message, "Resolving_module_name_0_relative_to_base_url_1_2_6094", "Resolving module name '{0}' relative to base url '{1}' - '{2}'."), + Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1: diag(6095, DiagnosticCategory.Message, "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095", "Loading module as file / folder, candidate module location '{0}', target file types: {1}."), + File_0_does_not_exist: diag(6096, DiagnosticCategory.Message, "File_0_does_not_exist_6096", "File '{0}' does not exist."), + File_0_exist_use_it_as_a_name_resolution_result: diag(6097, DiagnosticCategory.Message, "File_0_exist_use_it_as_a_name_resolution_result_6097", "File '{0}' exist - use it as a name resolution result."), + Loading_module_0_from_node_modules_folder_target_file_types_Colon_1: diag(6098, DiagnosticCategory.Message, "Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098", "Loading module '{0}' from 'node_modules' folder, target file types: {1}."), + Found_package_json_at_0: diag(6099, DiagnosticCategory.Message, "Found_package_json_at_0_6099", "Found 'package.json' at '{0}'."), + package_json_does_not_have_a_0_field: diag(6100, DiagnosticCategory.Message, "package_json_does_not_have_a_0_field_6100", "'package.json' does not have a '{0}' field."), + package_json_has_0_field_1_that_references_2: diag(6101, DiagnosticCategory.Message, "package_json_has_0_field_1_that_references_2_6101", "'package.json' has '{0}' field '{1}' that references '{2}'."), + Allow_javascript_files_to_be_compiled: diag(6102, DiagnosticCategory.Message, "Allow_javascript_files_to_be_compiled_6102", "Allow javascript files to be compiled."), + Checking_if_0_is_the_longest_matching_prefix_for_1_2: diag(6104, DiagnosticCategory.Message, "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104", "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."), + Expected_type_of_0_field_in_package_json_to_be_1_got_2: diag(6105, DiagnosticCategory.Message, "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105", "Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."), + baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: diag(6106, DiagnosticCategory.Message, "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."), + rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: diag(6107, DiagnosticCategory.Message, "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", "'rootDirs' option is set, using it to resolve relative module name '{0}'."), + Longest_matching_prefix_for_0_is_1: diag(6108, DiagnosticCategory.Message, "Longest_matching_prefix_for_0_is_1_6108", "Longest matching prefix for '{0}' is '{1}'."), + Loading_0_from_the_root_dir_1_candidate_location_2: diag(6109, DiagnosticCategory.Message, "Loading_0_from_the_root_dir_1_candidate_location_2_6109", "Loading '{0}' from the root dir '{1}', candidate location '{2}'."), + Trying_other_entries_in_rootDirs: diag(6110, DiagnosticCategory.Message, "Trying_other_entries_in_rootDirs_6110", "Trying other entries in 'rootDirs'."), + Module_resolution_using_rootDirs_has_failed: diag(6111, DiagnosticCategory.Message, "Module_resolution_using_rootDirs_has_failed_6111", "Module resolution using 'rootDirs' has failed."), + Do_not_emit_use_strict_directives_in_module_output: diag(6112, DiagnosticCategory.Message, "Do_not_emit_use_strict_directives_in_module_output_6112", "Do not emit 'use strict' directives in module output."), + Enable_strict_null_checks: diag(6113, DiagnosticCategory.Message, "Enable_strict_null_checks_6113", "Enable strict null checks."), + Unknown_option_excludes_Did_you_mean_exclude: diag(6114, DiagnosticCategory.Error, "Unknown_option_excludes_Did_you_mean_exclude_6114", "Unknown option 'excludes'. Did you mean 'exclude'?"), + Raise_error_on_this_expressions_with_an_implied_any_type: diag(6115, DiagnosticCategory.Message, "Raise_error_on_this_expressions_with_an_implied_any_type_6115", "Raise error on 'this' expressions with an implied 'any' type."), + Resolving_type_reference_directive_0_containing_file_1_root_directory_2: diag(6116, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116", "======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"), + Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2: diag(6119, DiagnosticCategory.Message, "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119", "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"), + Type_reference_directive_0_was_not_resolved: diag(6120, DiagnosticCategory.Message, "Type_reference_directive_0_was_not_resolved_6120", "======== Type reference directive '{0}' was not resolved. ========"), + Resolving_with_primary_search_path_0: diag(6121, DiagnosticCategory.Message, "Resolving_with_primary_search_path_0_6121", "Resolving with primary search path '{0}'."), + Root_directory_cannot_be_determined_skipping_primary_search_paths: diag(6122, DiagnosticCategory.Message, "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122", "Root directory cannot be determined, skipping primary search paths."), + Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set: diag(6123, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123", "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"), + Type_declaration_files_to_be_included_in_compilation: diag(6124, DiagnosticCategory.Message, "Type_declaration_files_to_be_included_in_compilation_6124", "Type declaration files to be included in compilation."), + Looking_up_in_node_modules_folder_initial_location_0: diag(6125, DiagnosticCategory.Message, "Looking_up_in_node_modules_folder_initial_location_0_6125", "Looking up in 'node_modules' folder, initial location '{0}'."), + Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder: diag(6126, DiagnosticCategory.Message, "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126", "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."), + Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1: diag(6127, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127", "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"), + Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set: diag(6128, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128", "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"), + Resolving_real_path_for_0_result_1: diag(6130, DiagnosticCategory.Message, "Resolving_real_path_for_0_result_1_6130", "Resolving real path for '{0}', result '{1}'."), + Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system: diag(6131, DiagnosticCategory.Error, "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131", "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."), + File_name_0_has_a_1_extension_stripping_it: diag(6132, DiagnosticCategory.Message, "File_name_0_has_a_1_extension_stripping_it_6132", "File name '{0}' has a '{1}' extension - stripping it."), + _0_is_declared_but_its_value_is_never_read: diag(6133, DiagnosticCategory.Error, "_0_is_declared_but_its_value_is_never_read_6133", "'{0}' is declared but its value is never read.", /*reportsUnnecessary*/ true), + Report_errors_on_unused_locals: diag(6134, DiagnosticCategory.Message, "Report_errors_on_unused_locals_6134", "Report errors on unused locals."), + Report_errors_on_unused_parameters: diag(6135, DiagnosticCategory.Message, "Report_errors_on_unused_parameters_6135", "Report errors on unused parameters."), + The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: diag(6136, DiagnosticCategory.Message, "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", "The maximum dependency depth to search under node_modules and load JavaScript files."), + Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1: diag(6137, DiagnosticCategory.Error, "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137", "Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."), + Property_0_is_declared_but_its_value_is_never_read: diag(6138, DiagnosticCategory.Error, "Property_0_is_declared_but_its_value_is_never_read_6138", "Property '{0}' is declared but its value is never read.", /*reportsUnnecessary*/ true), + Import_emit_helpers_from_tslib: diag(6139, DiagnosticCategory.Message, "Import_emit_helpers_from_tslib_6139", "Import emit helpers from 'tslib'."), + Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2: diag(6140, DiagnosticCategory.Error, "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140", "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."), + Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: diag(6141, DiagnosticCategory.Message, "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", "Parse in strict mode and emit \"use strict\" for each source file."), + Module_0_was_resolved_to_1_but_jsx_is_not_set: diag(6142, DiagnosticCategory.Error, "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142", "Module '{0}' was resolved to '{1}', but '--jsx' is not set."), + Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1: diag(6144, DiagnosticCategory.Message, "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144", "Module '{0}' was resolved as locally declared ambient module in file '{1}'."), + Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified: diag(6145, DiagnosticCategory.Message, "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145", "Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified."), + Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h: diag(6146, DiagnosticCategory.Message, "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146", "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."), + Resolution_for_module_0_was_found_in_cache_from_location_1: diag(6147, DiagnosticCategory.Message, "Resolution_for_module_0_was_found_in_cache_from_location_1_6147", "Resolution for module '{0}' was found in cache from location '{1}'."), + Directory_0_does_not_exist_skipping_all_lookups_in_it: diag(6148, DiagnosticCategory.Message, "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148", "Directory '{0}' does not exist, skipping all lookups in it."), + Show_diagnostic_information: diag(6149, DiagnosticCategory.Message, "Show_diagnostic_information_6149", "Show diagnostic information."), + Show_verbose_diagnostic_information: diag(6150, DiagnosticCategory.Message, "Show_verbose_diagnostic_information_6150", "Show verbose diagnostic information."), + Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file: diag(6151, DiagnosticCategory.Message, "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151", "Emit a single file with source maps instead of having a separate file."), + Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set: diag(6152, DiagnosticCategory.Message, "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152", "Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."), + Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule: diag(6153, DiagnosticCategory.Message, "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153", "Transpile each file as a separate module (similar to 'ts.transpileModule')."), + Print_names_of_generated_files_part_of_the_compilation: diag(6154, DiagnosticCategory.Message, "Print_names_of_generated_files_part_of_the_compilation_6154", "Print names of generated files part of the compilation."), + Print_names_of_files_part_of_the_compilation: diag(6155, DiagnosticCategory.Message, "Print_names_of_files_part_of_the_compilation_6155", "Print names of files part of the compilation."), + The_locale_used_when_displaying_messages_to_the_user_e_g_en_us: diag(6156, DiagnosticCategory.Message, "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156", "The locale used when displaying messages to the user (e.g. 'en-us')"), + Do_not_generate_custom_helper_functions_like_extends_in_compiled_output: diag(6157, DiagnosticCategory.Message, "Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157", "Do not generate custom helper functions like '__extends' in compiled output."), + Do_not_include_the_default_library_file_lib_d_ts: diag(6158, DiagnosticCategory.Message, "Do_not_include_the_default_library_file_lib_d_ts_6158", "Do not include the default library file (lib.d.ts)."), + Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files: diag(6159, DiagnosticCategory.Message, "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159", "Do not add triple-slash references or imported modules to the list of compiled files."), + Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files: diag(6160, DiagnosticCategory.Message, "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160", "[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."), + List_of_folders_to_include_type_definitions_from: diag(6161, DiagnosticCategory.Message, "List_of_folders_to_include_type_definitions_from_6161", "List of folders to include type definitions from."), + Disable_size_limitations_on_JavaScript_projects: diag(6162, DiagnosticCategory.Message, "Disable_size_limitations_on_JavaScript_projects_6162", "Disable size limitations on JavaScript projects."), + The_character_set_of_the_input_files: diag(6163, DiagnosticCategory.Message, "The_character_set_of_the_input_files_6163", "The character set of the input files."), + Do_not_truncate_error_messages: diag(6165, DiagnosticCategory.Message, "Do_not_truncate_error_messages_6165", "Do not truncate error messages."), + Output_directory_for_generated_declaration_files: diag(6166, DiagnosticCategory.Message, "Output_directory_for_generated_declaration_files_6166", "Output directory for generated declaration files."), + A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl: diag(6167, DiagnosticCategory.Message, "A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167", "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."), + List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime: diag(6168, DiagnosticCategory.Message, "List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168", "List of root folders whose combined content represents the structure of the project at runtime."), + Show_all_compiler_options: diag(6169, DiagnosticCategory.Message, "Show_all_compiler_options_6169", "Show all compiler options."), + Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file: diag(6170, DiagnosticCategory.Message, "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170", "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"), + Command_line_Options: diag(6171, DiagnosticCategory.Message, "Command_line_Options_6171", "Command-line Options"), + Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3: diag(6179, DiagnosticCategory.Message, "Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179", "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'."), + Enable_all_strict_type_checking_options: diag(6180, DiagnosticCategory.Message, "Enable_all_strict_type_checking_options_6180", "Enable all strict type-checking options."), + Scoped_package_detected_looking_in_0: diag(6182, DiagnosticCategory.Message, "Scoped_package_detected_looking_in_0_6182", "Scoped package detected, looking in '{0}'"), + Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2: diag(6183, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."), + Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: diag(6184, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."), + Enable_strict_checking_of_function_types: diag(6186, DiagnosticCategory.Message, "Enable_strict_checking_of_function_types_6186", "Enable strict checking of function types."), + Enable_strict_checking_of_property_initialization_in_classes: diag(6187, DiagnosticCategory.Message, "Enable_strict_checking_of_property_initialization_in_classes_6187", "Enable strict checking of property initialization in classes."), + Numeric_separators_are_not_allowed_here: diag(6188, DiagnosticCategory.Error, "Numeric_separators_are_not_allowed_here_6188", "Numeric separators are not allowed here."), + Multiple_consecutive_numeric_separators_are_not_permitted: diag(6189, DiagnosticCategory.Error, "Multiple_consecutive_numeric_separators_are_not_permitted_6189", "Multiple consecutive numeric separators are not permitted."), + Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen: diag(6191, DiagnosticCategory.Message, "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191", "Whether to keep outdated console output in watch mode instead of clearing the screen."), + All_imports_in_import_declaration_are_unused: diag(6192, DiagnosticCategory.Error, "All_imports_in_import_declaration_are_unused_6192", "All imports in import declaration are unused.", /*reportsUnnecessary*/ true), + Found_1_error_Watching_for_file_changes: diag(6193, DiagnosticCategory.Message, "Found_1_error_Watching_for_file_changes_6193", "Found 1 error. Watching for file changes."), + Found_0_errors_Watching_for_file_changes: diag(6194, DiagnosticCategory.Message, "Found_0_errors_Watching_for_file_changes_6194", "Found {0} errors. Watching for file changes."), + Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols: diag(6195, DiagnosticCategory.Message, "Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195", "Resolve 'keyof' to string valued property names only (no numbers or symbols)."), + _0_is_declared_but_never_used: diag(6196, DiagnosticCategory.Error, "_0_is_declared_but_never_used_6196", "'{0}' is declared but never used.", /*reportsUnnecessary*/ true), + Include_modules_imported_with_json_extension: diag(6197, DiagnosticCategory.Message, "Include_modules_imported_with_json_extension_6197", "Include modules imported with '.json' extension"), + All_destructured_elements_are_unused: diag(6198, DiagnosticCategory.Error, "All_destructured_elements_are_unused_6198", "All destructured elements are unused.", /*reportsUnnecessary*/ true), + All_variables_are_unused: diag(6199, DiagnosticCategory.Error, "All_variables_are_unused_6199", "All variables are unused.", /*reportsUnnecessary*/ true), + Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0: diag(6200, DiagnosticCategory.Error, "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200", "Definitions of the following identifiers conflict with those in another file: {0}"), + Conflicts_are_in_this_file: diag(6201, DiagnosticCategory.Message, "Conflicts_are_in_this_file_6201", "Conflicts are in this file."), + Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0: diag(6202, DiagnosticCategory.Error, "Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202", "Project references may not form a circular graph. Cycle detected: {0}"), + _0_was_also_declared_here: diag(6203, DiagnosticCategory.Message, "_0_was_also_declared_here_6203", "'{0}' was also declared here."), + and_here: diag(6204, DiagnosticCategory.Message, "and_here_6204", "and here."), + All_type_parameters_are_unused: diag(6205, DiagnosticCategory.Error, "All_type_parameters_are_unused_6205", "All type parameters are unused."), + package_json_has_a_typesVersions_field_with_version_specific_path_mappings: diag(6206, DiagnosticCategory.Message, "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206", "'package.json' has a 'typesVersions' field with version-specific path mappings."), + package_json_does_not_have_a_typesVersions_entry_that_matches_version_0: diag(6207, DiagnosticCategory.Message, "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207", "'package.json' does not have a 'typesVersions' entry that matches version '{0}'."), + package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2: diag(6208, DiagnosticCategory.Message, "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208", "'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."), + package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range: diag(6209, DiagnosticCategory.Message, "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209", "'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."), + An_argument_for_0_was_not_provided: diag(6210, DiagnosticCategory.Message, "An_argument_for_0_was_not_provided_6210", "An argument for '{0}' was not provided."), + An_argument_matching_this_binding_pattern_was_not_provided: diag(6211, DiagnosticCategory.Message, "An_argument_matching_this_binding_pattern_was_not_provided_6211", "An argument matching this binding pattern was not provided."), + Did_you_mean_to_call_this_expression: diag(6212, DiagnosticCategory.Message, "Did_you_mean_to_call_this_expression_6212", "Did you mean to call this expression?"), + Did_you_mean_to_use_new_with_this_expression: diag(6213, DiagnosticCategory.Message, "Did_you_mean_to_use_new_with_this_expression_6213", "Did you mean to use 'new' with this expression?"), + Enable_strict_bind_call_and_apply_methods_on_functions: diag(6214, DiagnosticCategory.Message, "Enable_strict_bind_call_and_apply_methods_on_functions_6214", "Enable strict 'bind', 'call', and 'apply' methods on functions."), + Using_compiler_options_of_project_reference_redirect_0: diag(6215, DiagnosticCategory.Message, "Using_compiler_options_of_project_reference_redirect_0_6215", "Using compiler options of project reference redirect '{0}'."), + Found_1_error: diag(6216, DiagnosticCategory.Message, "Found_1_error_6216", "Found 1 error."), + Found_0_errors: diag(6217, DiagnosticCategory.Message, "Found_0_errors_6217", "Found {0} errors."), + Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2: diag(6218, DiagnosticCategory.Message, "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218", "======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"), + Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3: diag(6219, DiagnosticCategory.Message, "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219", "======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========"), + package_json_had_a_falsy_0_field: diag(6220, DiagnosticCategory.Message, "package_json_had_a_falsy_0_field_6220", "'package.json' had a falsy '{0}' field."), + Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects: diag(6221, DiagnosticCategory.Message, "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221", "Disable use of source files instead of declaration files from referenced projects."), + Emit_class_fields_with_Define_instead_of_Set: diag(6222, DiagnosticCategory.Message, "Emit_class_fields_with_Define_instead_of_Set_6222", "Emit class fields with Define instead of Set."), + Generates_a_CPU_profile: diag(6223, DiagnosticCategory.Message, "Generates_a_CPU_profile_6223", "Generates a CPU profile."), + Disable_solution_searching_for_this_project: diag(6224, DiagnosticCategory.Message, "Disable_solution_searching_for_this_project_6224", "Disable solution searching for this project."), + Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory: diag(6225, DiagnosticCategory.Message, "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225", "Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."), + Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling: diag(6226, DiagnosticCategory.Message, "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226", "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling'."), + Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize: diag(6227, DiagnosticCategory.Message, "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227", "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority', 'FixedChunkSize'."), + Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3: diag(6229, DiagnosticCategory.Error, "Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229", "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."), + Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line: diag(6230, DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."), + Could_not_resolve_the_path_0_with_the_extensions_Colon_1: diag(6231, DiagnosticCategory.Error, "Could_not_resolve_the_path_0_with_the_extensions_Colon_1_6231", "Could not resolve the path '{0}' with the extensions: {1}."), + Declaration_augments_declaration_in_another_file_This_cannot_be_serialized: diag(6232, DiagnosticCategory.Error, "Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232", "Declaration augments declaration in another file. This cannot be serialized."), + This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file: diag(6233, DiagnosticCategory.Error, "This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233", "This is the declaration being augmented. Consider moving the augmenting declaration into the same file."), + This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without: diag(6234, DiagnosticCategory.Error, "This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without_6234", "This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?"), + Disable_loading_referenced_projects: diag(6235, DiagnosticCategory.Message, "Disable_loading_referenced_projects_6235", "Disable loading referenced projects."), + Arguments_for_the_rest_parameter_0_were_not_provided: diag(6236, DiagnosticCategory.Error, "Arguments_for_the_rest_parameter_0_were_not_provided_6236", "Arguments for the rest parameter '{0}' were not provided."), + Generates_an_event_trace_and_a_list_of_types: diag(6237, DiagnosticCategory.Message, "Generates_an_event_trace_and_a_list_of_types_6237", "Generates an event trace and a list of types."), + Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react: diag(6238, DiagnosticCategory.Error, "Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238", "Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react"), + File_0_exists_according_to_earlier_cached_lookups: diag(6239, DiagnosticCategory.Message, "File_0_exists_according_to_earlier_cached_lookups_6239", "File '{0}' exists according to earlier cached lookups."), + File_0_does_not_exist_according_to_earlier_cached_lookups: diag(6240, DiagnosticCategory.Message, "File_0_does_not_exist_according_to_earlier_cached_lookups_6240", "File '{0}' does not exist according to earlier cached lookups."), + Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1: diag(6241, DiagnosticCategory.Message, "Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241", "Resolution for type reference directive '{0}' was found in cache from location '{1}'."), + Resolving_type_reference_directive_0_containing_file_1: diag(6242, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_1_6242", "======== Resolving type reference directive '{0}', containing file '{1}'. ========"), + Interpret_optional_property_types_as_written_rather_than_adding_undefined: diag(6243, DiagnosticCategory.Message, "Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243", "Interpret optional property types as written, rather than adding 'undefined'."), + Modules: diag(6244, DiagnosticCategory.Message, "Modules_6244", "Modules"), + File_Management: diag(6245, DiagnosticCategory.Message, "File_Management_6245", "File Management"), + Emit: diag(6246, DiagnosticCategory.Message, "Emit_6246", "Emit"), + JavaScript_Support: diag(6247, DiagnosticCategory.Message, "JavaScript_Support_6247", "JavaScript Support"), + Type_Checking: diag(6248, DiagnosticCategory.Message, "Type_Checking_6248", "Type Checking"), + Editor_Support: diag(6249, DiagnosticCategory.Message, "Editor_Support_6249", "Editor Support"), + Watch_and_Build_Modes: diag(6250, DiagnosticCategory.Message, "Watch_and_Build_Modes_6250", "Watch and Build Modes"), + Compiler_Diagnostics: diag(6251, DiagnosticCategory.Message, "Compiler_Diagnostics_6251", "Compiler Diagnostics"), + Interop_Constraints: diag(6252, DiagnosticCategory.Message, "Interop_Constraints_6252", "Interop Constraints"), + Backwards_Compatibility: diag(6253, DiagnosticCategory.Message, "Backwards_Compatibility_6253", "Backwards Compatibility"), + Language_and_Environment: diag(6254, DiagnosticCategory.Message, "Language_and_Environment_6254", "Language and Environment"), + Projects: diag(6255, DiagnosticCategory.Message, "Projects_6255", "Projects"), + Output_Formatting: diag(6256, DiagnosticCategory.Message, "Output_Formatting_6256", "Output Formatting"), + Completeness: diag(6257, DiagnosticCategory.Message, "Completeness_6257", "Completeness"), + _0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file: diag(6258, DiagnosticCategory.Error, "_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258", "'{0}' should be set inside the 'compilerOptions' object of the config json file"), + Found_1_error_in_1: diag(6259, DiagnosticCategory.Message, "Found_1_error_in_1_6259", "Found 1 error in {1}"), + Found_0_errors_in_the_same_file_starting_at_Colon_1: diag(6260, DiagnosticCategory.Message, "Found_0_errors_in_the_same_file_starting_at_Colon_1_6260", "Found {0} errors in the same file, starting at: {1}"), + Found_0_errors_in_1_files: diag(6261, DiagnosticCategory.Message, "Found_0_errors_in_1_files_6261", "Found {0} errors in {1} files."), + Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve: diag(6270, DiagnosticCategory.Message, "Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270", "Directory '{0}' has no containing package.json scope. Imports will not resolve."), + Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1: diag(6271, DiagnosticCategory.Message, "Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271", "Import specifier '{0}' does not exist in package.json scope at path '{1}'."), + Invalid_import_specifier_0_has_no_possible_resolutions: diag(6272, DiagnosticCategory.Message, "Invalid_import_specifier_0_has_no_possible_resolutions_6272", "Invalid import specifier '{0}' has no possible resolutions."), + package_json_scope_0_has_no_imports_defined: diag(6273, DiagnosticCategory.Message, "package_json_scope_0_has_no_imports_defined_6273", "package.json scope '{0}' has no imports defined."), + package_json_scope_0_explicitly_maps_specifier_1_to_null: diag(6274, DiagnosticCategory.Message, "package_json_scope_0_explicitly_maps_specifier_1_to_null_6274", "package.json scope '{0}' explicitly maps specifier '{1}' to null."), + package_json_scope_0_has_invalid_type_for_target_of_specifier_1: diag(6275, DiagnosticCategory.Message, "package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275", "package.json scope '{0}' has invalid type for target of specifier '{1}'"), + Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1: diag(6276, DiagnosticCategory.Message, "Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276", "Export specifier '{0}' does not exist in package.json scope at path '{1}'."), + Enable_project_compilation: diag(6302, DiagnosticCategory.Message, "Enable_project_compilation_6302", "Enable project compilation"), + Composite_projects_may_not_disable_declaration_emit: diag(6304, DiagnosticCategory.Error, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."), + Output_file_0_has_not_been_built_from_source_file_1: diag(6305, DiagnosticCategory.Error, "Output_file_0_has_not_been_built_from_source_file_1_6305", "Output file '{0}' has not been built from source file '{1}'."), + Referenced_project_0_must_have_setting_composite_Colon_true: diag(6306, DiagnosticCategory.Error, "Referenced_project_0_must_have_setting_composite_Colon_true_6306", "Referenced project '{0}' must have setting \"composite\": true."), + File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern: diag(6307, DiagnosticCategory.Error, "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307", "File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."), + Cannot_prepend_project_0_because_it_does_not_have_outFile_set: diag(6308, DiagnosticCategory.Error, "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308", "Cannot prepend project '{0}' because it does not have 'outFile' set"), + Output_file_0_from_project_1_does_not_exist: diag(6309, DiagnosticCategory.Error, "Output_file_0_from_project_1_does_not_exist_6309", "Output file '{0}' from project '{1}' does not exist"), + Referenced_project_0_may_not_disable_emit: diag(6310, DiagnosticCategory.Error, "Referenced_project_0_may_not_disable_emit_6310", "Referenced project '{0}' may not disable emit."), + Project_0_is_out_of_date_because_output_1_is_older_than_input_2: diag(6350, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350", "Project '{0}' is out of date because output '{1}' is older than input '{2}'"), + Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2: diag(6351, DiagnosticCategory.Message, "Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351", "Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"), + Project_0_is_out_of_date_because_output_file_1_does_not_exist: diag(6352, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352", "Project '{0}' is out of date because output file '{1}' does not exist"), + Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date: diag(6353, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353", "Project '{0}' is out of date because its dependency '{1}' is out of date"), + Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies: diag(6354, DiagnosticCategory.Message, "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354", "Project '{0}' is up to date with .d.ts files from its dependencies"), + Projects_in_this_build_Colon_0: diag(6355, DiagnosticCategory.Message, "Projects_in_this_build_Colon_0_6355", "Projects in this build: {0}"), + A_non_dry_build_would_delete_the_following_files_Colon_0: diag(6356, DiagnosticCategory.Message, "A_non_dry_build_would_delete_the_following_files_Colon_0_6356", "A non-dry build would delete the following files: {0}"), + A_non_dry_build_would_build_project_0: diag(6357, DiagnosticCategory.Message, "A_non_dry_build_would_build_project_0_6357", "A non-dry build would build project '{0}'"), + Building_project_0: diag(6358, DiagnosticCategory.Message, "Building_project_0_6358", "Building project '{0}'..."), + Updating_output_timestamps_of_project_0: diag(6359, DiagnosticCategory.Message, "Updating_output_timestamps_of_project_0_6359", "Updating output timestamps of project '{0}'..."), + Project_0_is_up_to_date: diag(6361, DiagnosticCategory.Message, "Project_0_is_up_to_date_6361", "Project '{0}' is up to date"), + Skipping_build_of_project_0_because_its_dependency_1_has_errors: diag(6362, DiagnosticCategory.Message, "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362", "Skipping build of project '{0}' because its dependency '{1}' has errors"), + Project_0_can_t_be_built_because_its_dependency_1_has_errors: diag(6363, DiagnosticCategory.Message, "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363", "Project '{0}' can't be built because its dependency '{1}' has errors"), + Build_one_or_more_projects_and_their_dependencies_if_out_of_date: diag(6364, DiagnosticCategory.Message, "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364", "Build one or more projects and their dependencies, if out of date"), + Delete_the_outputs_of_all_projects: diag(6365, DiagnosticCategory.Message, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects."), + Show_what_would_be_built_or_deleted_if_specified_with_clean: diag(6367, DiagnosticCategory.Message, "Show_what_would_be_built_or_deleted_if_specified_with_clean_6367", "Show what would be built (or deleted, if specified with '--clean')"), + Option_build_must_be_the_first_command_line_argument: diag(6369, DiagnosticCategory.Error, "Option_build_must_be_the_first_command_line_argument_6369", "Option '--build' must be the first command line argument."), + Options_0_and_1_cannot_be_combined: diag(6370, DiagnosticCategory.Error, "Options_0_and_1_cannot_be_combined_6370", "Options '{0}' and '{1}' cannot be combined."), + Updating_unchanged_output_timestamps_of_project_0: diag(6371, DiagnosticCategory.Message, "Updating_unchanged_output_timestamps_of_project_0_6371", "Updating unchanged output timestamps of project '{0}'..."), + Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed: diag(6372, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372", "Project '{0}' is out of date because output of its dependency '{1}' has changed"), + Updating_output_of_project_0: diag(6373, DiagnosticCategory.Message, "Updating_output_of_project_0_6373", "Updating output of project '{0}'..."), + A_non_dry_build_would_update_timestamps_for_output_of_project_0: diag(6374, DiagnosticCategory.Message, "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374", "A non-dry build would update timestamps for output of project '{0}'"), + A_non_dry_build_would_update_output_of_project_0: diag(6375, DiagnosticCategory.Message, "A_non_dry_build_would_update_output_of_project_0_6375", "A non-dry build would update output of project '{0}'"), + Cannot_update_output_of_project_0_because_there_was_error_reading_file_1: diag(6376, DiagnosticCategory.Message, "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376", "Cannot update output of project '{0}' because there was error reading file '{1}'"), + Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1: diag(6377, DiagnosticCategory.Error, "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377", "Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"), + Composite_projects_may_not_disable_incremental_compilation: diag(6379, DiagnosticCategory.Error, "Composite_projects_may_not_disable_incremental_compilation_6379", "Composite projects may not disable incremental compilation."), + Specify_file_to_store_incremental_compilation_information: diag(6380, DiagnosticCategory.Message, "Specify_file_to_store_incremental_compilation_information_6380", "Specify file to store incremental compilation information"), + Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2: diag(6381, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381", "Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"), + Skipping_build_of_project_0_because_its_dependency_1_was_not_built: diag(6382, DiagnosticCategory.Message, "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382", "Skipping build of project '{0}' because its dependency '{1}' was not built"), + Project_0_can_t_be_built_because_its_dependency_1_was_not_built: diag(6383, DiagnosticCategory.Message, "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383", "Project '{0}' can't be built because its dependency '{1}' was not built"), + Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: diag(6384, DiagnosticCategory.Message, "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384", "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."), + _0_is_deprecated: diag(6385, DiagnosticCategory.Suggestion, "_0_is_deprecated_6385", "'{0}' is deprecated.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ undefined, /*reportsDeprecated*/ true), + Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found: diag(6386, DiagnosticCategory.Message, "Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386", "Performance timings for '--diagnostics' or '--extendedDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found."), + The_signature_0_of_1_is_deprecated: diag(6387, DiagnosticCategory.Suggestion, "The_signature_0_of_1_is_deprecated_6387", "The signature '{0}' of '{1}' is deprecated.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ undefined, /*reportsDeprecated*/ true), + Project_0_is_being_forcibly_rebuilt: diag(6388, DiagnosticCategory.Message, "Project_0_is_being_forcibly_rebuilt_6388", "Project '{0}' is being forcibly rebuilt"), + Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved: diag(6389, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389", "Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."), + Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2: diag(6390, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."), + Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: diag(6391, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."), + Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved: diag(6392, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."), + Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: diag(6393, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."), + Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: diag(6394, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."), + Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: diag(6395, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."), + Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: diag(6396, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."), + Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: diag(6397, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."), + Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: diag(6398, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."), + Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted: diag(6399, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399", "Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"), + Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files: diag(6400, DiagnosticCategory.Message, "Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400", "Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"), + Project_0_is_out_of_date_because_there_was_error_reading_file_1: diag(6401, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401", "Project '{0}' is out of date because there was error reading file '{1}'"), + Resolving_in_0_mode_with_conditions_1: diag(6402, DiagnosticCategory.Message, "Resolving_in_0_mode_with_conditions_1_6402", "Resolving in {0} mode with conditions {1}."), + Matched_0_condition_1: diag(6403, DiagnosticCategory.Message, "Matched_0_condition_1_6403", "Matched '{0}' condition '{1}'."), + Using_0_subpath_1_with_target_2: diag(6404, DiagnosticCategory.Message, "Using_0_subpath_1_with_target_2_6404", "Using '{0}' subpath '{1}' with target '{2}'."), + Saw_non_matching_condition_0: diag(6405, DiagnosticCategory.Message, "Saw_non_matching_condition_0_6405", "Saw non-matching condition '{0}'."), + Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions: diag(6406, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406", "Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"), + The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, DiagnosticCategory.Message, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"), + The_expected_type_comes_from_this_index_signature: diag(6501, DiagnosticCategory.Message, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."), + The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, DiagnosticCategory.Message, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."), + Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing: diag(6503, DiagnosticCategory.Message, "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503", "Print names of files that are part of the compilation and then stop processing."), + File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option: diag(6504, DiagnosticCategory.Error, "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504", "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"), + Print_names_of_files_and_the_reason_they_are_part_of_the_compilation: diag(6505, DiagnosticCategory.Message, "Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505", "Print names of files and the reason they are part of the compilation."), + Consider_adding_a_declare_modifier_to_this_class: diag(6506, DiagnosticCategory.Message, "Consider_adding_a_declare_modifier_to_this_class_6506", "Consider adding a 'declare' modifier to this class."), + Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files: diag(6600, DiagnosticCategory.Message, "Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600", "Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files."), + Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export: diag(6601, DiagnosticCategory.Message, "Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601", "Allow 'import x from y' when a module doesn't have a default export."), + Allow_accessing_UMD_globals_from_modules: diag(6602, DiagnosticCategory.Message, "Allow_accessing_UMD_globals_from_modules_6602", "Allow accessing UMD globals from modules."), + Disable_error_reporting_for_unreachable_code: diag(6603, DiagnosticCategory.Message, "Disable_error_reporting_for_unreachable_code_6603", "Disable error reporting for unreachable code."), + Disable_error_reporting_for_unused_labels: diag(6604, DiagnosticCategory.Message, "Disable_error_reporting_for_unused_labels_6604", "Disable error reporting for unused labels."), + Ensure_use_strict_is_always_emitted: diag(6605, DiagnosticCategory.Message, "Ensure_use_strict_is_always_emitted_6605", "Ensure 'use strict' is always emitted."), + Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: diag(6606, DiagnosticCategory.Message, "Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606", "Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."), + Specify_the_base_directory_to_resolve_non_relative_module_names: diag(6607, DiagnosticCategory.Message, "Specify_the_base_directory_to_resolve_non_relative_module_names_6607", "Specify the base directory to resolve non-relative module names."), + No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files: diag(6608, DiagnosticCategory.Message, "No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608", "No longer supported. In early versions, manually set the text encoding for reading files."), + Enable_error_reporting_in_type_checked_JavaScript_files: diag(6609, DiagnosticCategory.Message, "Enable_error_reporting_in_type_checked_JavaScript_files_6609", "Enable error reporting in type-checked JavaScript files."), + Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references: diag(6611, DiagnosticCategory.Message, "Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611", "Enable constraints that allow a TypeScript project to be used with project references."), + Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project: diag(6612, DiagnosticCategory.Message, "Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612", "Generate .d.ts files from TypeScript and JavaScript files in your project."), + Specify_the_output_directory_for_generated_declaration_files: diag(6613, DiagnosticCategory.Message, "Specify_the_output_directory_for_generated_declaration_files_6613", "Specify the output directory for generated declaration files."), + Create_sourcemaps_for_d_ts_files: diag(6614, DiagnosticCategory.Message, "Create_sourcemaps_for_d_ts_files_6614", "Create sourcemaps for d.ts files."), + Output_compiler_performance_information_after_building: diag(6615, DiagnosticCategory.Message, "Output_compiler_performance_information_after_building_6615", "Output compiler performance information after building."), + Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project: diag(6616, DiagnosticCategory.Message, "Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616", "Disables inference for type acquisition by looking at filenames in a project."), + Reduce_the_number_of_projects_loaded_automatically_by_TypeScript: diag(6617, DiagnosticCategory.Message, "Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617", "Reduce the number of projects loaded automatically by TypeScript."), + Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server: diag(6618, DiagnosticCategory.Message, "Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618", "Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."), + Opt_a_project_out_of_multi_project_reference_checking_when_editing: diag(6619, DiagnosticCategory.Message, "Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619", "Opt a project out of multi-project reference checking when editing."), + Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects: diag(6620, DiagnosticCategory.Message, "Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620", "Disable preferring source files instead of declaration files when referencing composite projects."), + Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration: diag(6621, DiagnosticCategory.Message, "Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621", "Emit more compliant, but verbose and less performant JavaScript for iteration."), + Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files: diag(6622, DiagnosticCategory.Message, "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622", "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."), + Only_output_d_ts_files_and_not_JavaScript_files: diag(6623, DiagnosticCategory.Message, "Only_output_d_ts_files_and_not_JavaScript_files_6623", "Only output d.ts files and not JavaScript files."), + Emit_design_type_metadata_for_decorated_declarations_in_source_files: diag(6624, DiagnosticCategory.Message, "Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624", "Emit design-type metadata for decorated declarations in source files."), + Disable_the_type_acquisition_for_JavaScript_projects: diag(6625, DiagnosticCategory.Message, "Disable_the_type_acquisition_for_JavaScript_projects_6625", "Disable the type acquisition for JavaScript projects"), + Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility: diag(6626, DiagnosticCategory.Message, "Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626", "Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."), + Filters_results_from_the_include_option: diag(6627, DiagnosticCategory.Message, "Filters_results_from_the_include_option_6627", "Filters results from the `include` option."), + Remove_a_list_of_directories_from_the_watch_process: diag(6628, DiagnosticCategory.Message, "Remove_a_list_of_directories_from_the_watch_process_6628", "Remove a list of directories from the watch process."), + Remove_a_list_of_files_from_the_watch_mode_s_processing: diag(6629, DiagnosticCategory.Message, "Remove_a_list_of_files_from_the_watch_mode_s_processing_6629", "Remove a list of files from the watch mode's processing."), + Enable_experimental_support_for_TC39_stage_2_draft_decorators: diag(6630, DiagnosticCategory.Message, "Enable_experimental_support_for_TC39_stage_2_draft_decorators_6630", "Enable experimental support for TC39 stage 2 draft decorators."), + Print_files_read_during_the_compilation_including_why_it_was_included: diag(6631, DiagnosticCategory.Message, "Print_files_read_during_the_compilation_including_why_it_was_included_6631", "Print files read during the compilation including why it was included."), + Output_more_detailed_compiler_performance_information_after_building: diag(6632, DiagnosticCategory.Message, "Output_more_detailed_compiler_performance_information_after_building_6632", "Output more detailed compiler performance information after building."), + Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited: diag(6633, DiagnosticCategory.Message, "Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633", "Specify one or more path or node module references to base configuration files from which settings are inherited."), + Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers: diag(6634, DiagnosticCategory.Message, "Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634", "Specify what approach the watcher should use if the system runs out of native file watchers."), + Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include: diag(6635, DiagnosticCategory.Message, "Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635", "Include a list of files. This does not support glob patterns, as opposed to `include`."), + Build_all_projects_including_those_that_appear_to_be_up_to_date: diag(6636, DiagnosticCategory.Message, "Build_all_projects_including_those_that_appear_to_be_up_to_date_6636", "Build all projects, including those that appear to be up to date."), + Ensure_that_casing_is_correct_in_imports: diag(6637, DiagnosticCategory.Message, "Ensure_that_casing_is_correct_in_imports_6637", "Ensure that casing is correct in imports."), + Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging: diag(6638, DiagnosticCategory.Message, "Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638", "Emit a v8 CPU profile of the compiler run for debugging."), + Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file: diag(6639, DiagnosticCategory.Message, "Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639", "Allow importing helper functions from tslib once per project, instead of including them per-file."), + Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation: diag(6641, DiagnosticCategory.Message, "Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641", "Specify a list of glob patterns that match files to be included in compilation."), + Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects: diag(6642, DiagnosticCategory.Message, "Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642", "Save .tsbuildinfo files to allow for incremental compilation of projects."), + Include_sourcemap_files_inside_the_emitted_JavaScript: diag(6643, DiagnosticCategory.Message, "Include_sourcemap_files_inside_the_emitted_JavaScript_6643", "Include sourcemap files inside the emitted JavaScript."), + Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript: diag(6644, DiagnosticCategory.Message, "Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644", "Include source code in the sourcemaps inside the emitted JavaScript."), + Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports: diag(6645, DiagnosticCategory.Message, "Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645", "Ensure that each file can be safely transpiled without relying on other imports."), + Specify_what_JSX_code_is_generated: diag(6646, DiagnosticCategory.Message, "Specify_what_JSX_code_is_generated_6646", "Specify what JSX code is generated."), + Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h: diag(6647, DiagnosticCategory.Message, "Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647", "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."), + Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment: diag(6648, DiagnosticCategory.Message, "Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648", "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."), + Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk: diag(6649, DiagnosticCategory.Message, "Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649", "Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."), + Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option: diag(6650, DiagnosticCategory.Message, "Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650", "Make keyof only return strings instead of string, numbers or symbols. Legacy option."), + Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment: diag(6651, DiagnosticCategory.Message, "Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651", "Specify a set of bundled library declaration files that describe the target runtime environment."), + Print_the_names_of_emitted_files_after_a_compilation: diag(6652, DiagnosticCategory.Message, "Print_the_names_of_emitted_files_after_a_compilation_6652", "Print the names of emitted files after a compilation."), + Print_all_of_the_files_read_during_the_compilation: diag(6653, DiagnosticCategory.Message, "Print_all_of_the_files_read_during_the_compilation_6653", "Print all of the files read during the compilation."), + Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit: diag(6654, DiagnosticCategory.Message, "Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654", "Set the language of the messaging from TypeScript. This does not affect emit."), + Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: diag(6655, DiagnosticCategory.Message, "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655", "Specify the location where debugger should locate map files instead of generated locations."), + Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs: diag(6656, DiagnosticCategory.Message, "Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656", "Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."), + Specify_what_module_code_is_generated: diag(6657, DiagnosticCategory.Message, "Specify_what_module_code_is_generated_6657", "Specify what module code is generated."), + Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier: diag(6658, DiagnosticCategory.Message, "Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658", "Specify how TypeScript looks up a file from a given module specifier."), + Set_the_newline_character_for_emitting_files: diag(6659, DiagnosticCategory.Message, "Set_the_newline_character_for_emitting_files_6659", "Set the newline character for emitting files."), + Disable_emitting_files_from_a_compilation: diag(6660, DiagnosticCategory.Message, "Disable_emitting_files_from_a_compilation_6660", "Disable emitting files from a compilation."), + Disable_generating_custom_helper_functions_like_extends_in_compiled_output: diag(6661, DiagnosticCategory.Message, "Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661", "Disable generating custom helper functions like '__extends' in compiled output."), + Disable_emitting_files_if_any_type_checking_errors_are_reported: diag(6662, DiagnosticCategory.Message, "Disable_emitting_files_if_any_type_checking_errors_are_reported_6662", "Disable emitting files if any type checking errors are reported."), + Disable_truncating_types_in_error_messages: diag(6663, DiagnosticCategory.Message, "Disable_truncating_types_in_error_messages_6663", "Disable truncating types in error messages."), + Enable_error_reporting_for_fallthrough_cases_in_switch_statements: diag(6664, DiagnosticCategory.Message, "Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664", "Enable error reporting for fallthrough cases in switch statements."), + Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type: diag(6665, DiagnosticCategory.Message, "Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665", "Enable error reporting for expressions and declarations with an implied 'any' type."), + Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier: diag(6666, DiagnosticCategory.Message, "Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666", "Ensure overriding members in derived classes are marked with an override modifier."), + Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function: diag(6667, DiagnosticCategory.Message, "Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667", "Enable error reporting for codepaths that do not explicitly return in a function."), + Enable_error_reporting_when_this_is_given_the_type_any: diag(6668, DiagnosticCategory.Message, "Enable_error_reporting_when_this_is_given_the_type_any_6668", "Enable error reporting when 'this' is given the type 'any'."), + Disable_adding_use_strict_directives_in_emitted_JavaScript_files: diag(6669, DiagnosticCategory.Message, "Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669", "Disable adding 'use strict' directives in emitted JavaScript files."), + Disable_including_any_library_files_including_the_default_lib_d_ts: diag(6670, DiagnosticCategory.Message, "Disable_including_any_library_files_including_the_default_lib_d_ts_6670", "Disable including any library files, including the default lib.d.ts."), + Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type: diag(6671, DiagnosticCategory.Message, "Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671", "Enforces using indexed accessors for keys declared using an indexed type."), + Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project: diag(6672, DiagnosticCategory.Message, "Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672", "Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project."), + Disable_strict_checking_of_generic_signatures_in_function_types: diag(6673, DiagnosticCategory.Message, "Disable_strict_checking_of_generic_signatures_in_function_types_6673", "Disable strict checking of generic signatures in function types."), + Add_undefined_to_a_type_when_accessed_using_an_index: diag(6674, DiagnosticCategory.Message, "Add_undefined_to_a_type_when_accessed_using_an_index_6674", "Add 'undefined' to a type when accessed using an index."), + Enable_error_reporting_when_local_variables_aren_t_read: diag(6675, DiagnosticCategory.Message, "Enable_error_reporting_when_local_variables_aren_t_read_6675", "Enable error reporting when local variables aren't read."), + Raise_an_error_when_a_function_parameter_isn_t_read: diag(6676, DiagnosticCategory.Message, "Raise_an_error_when_a_function_parameter_isn_t_read_6676", "Raise an error when a function parameter isn't read."), + Deprecated_setting_Use_outFile_instead: diag(6677, DiagnosticCategory.Message, "Deprecated_setting_Use_outFile_instead_6677", "Deprecated setting. Use 'outFile' instead."), + Specify_an_output_folder_for_all_emitted_files: diag(6678, DiagnosticCategory.Message, "Specify_an_output_folder_for_all_emitted_files_6678", "Specify an output folder for all emitted files."), + Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output: diag(6679, DiagnosticCategory.Message, "Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679", "Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."), + Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations: diag(6680, DiagnosticCategory.Message, "Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680", "Specify a set of entries that re-map imports to additional lookup locations."), + Specify_a_list_of_language_service_plugins_to_include: diag(6681, DiagnosticCategory.Message, "Specify_a_list_of_language_service_plugins_to_include_6681", "Specify a list of language service plugins to include."), + Disable_erasing_const_enum_declarations_in_generated_code: diag(6682, DiagnosticCategory.Message, "Disable_erasing_const_enum_declarations_in_generated_code_6682", "Disable erasing 'const enum' declarations in generated code."), + Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node: diag(6683, DiagnosticCategory.Message, "Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683", "Disable resolving symlinks to their realpath. This correlates to the same flag in node."), + Disable_wiping_the_console_in_watch_mode: diag(6684, DiagnosticCategory.Message, "Disable_wiping_the_console_in_watch_mode_6684", "Disable wiping the console in watch mode."), + Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read: diag(6685, DiagnosticCategory.Message, "Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685", "Enable color and formatting in TypeScript's output to make compiler errors easier to read."), + Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit: diag(6686, DiagnosticCategory.Message, "Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686", "Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."), + Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references: diag(6687, DiagnosticCategory.Message, "Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687", "Specify an array of objects that specify paths for projects. Used in project references."), + Disable_emitting_comments: diag(6688, DiagnosticCategory.Message, "Disable_emitting_comments_6688", "Disable emitting comments."), + Enable_importing_json_files: diag(6689, DiagnosticCategory.Message, "Enable_importing_json_files_6689", "Enable importing .json files."), + Specify_the_root_folder_within_your_source_files: diag(6690, DiagnosticCategory.Message, "Specify_the_root_folder_within_your_source_files_6690", "Specify the root folder within your source files."), + Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules: diag(6691, DiagnosticCategory.Message, "Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691", "Allow multiple folders to be treated as one when resolving modules."), + Skip_type_checking_d_ts_files_that_are_included_with_TypeScript: diag(6692, DiagnosticCategory.Message, "Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692", "Skip type checking .d.ts files that are included with TypeScript."), + Skip_type_checking_all_d_ts_files: diag(6693, DiagnosticCategory.Message, "Skip_type_checking_all_d_ts_files_6693", "Skip type checking all .d.ts files."), + Create_source_map_files_for_emitted_JavaScript_files: diag(6694, DiagnosticCategory.Message, "Create_source_map_files_for_emitted_JavaScript_files_6694", "Create source map files for emitted JavaScript files."), + Specify_the_root_path_for_debuggers_to_find_the_reference_source_code: diag(6695, DiagnosticCategory.Message, "Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695", "Specify the root path for debuggers to find the reference source code."), + Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function: diag(6697, DiagnosticCategory.Message, "Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697", "Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."), + When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible: diag(6698, DiagnosticCategory.Message, "When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698", "When assigning functions, check to ensure parameters and the return values are subtype-compatible."), + When_type_checking_take_into_account_null_and_undefined: diag(6699, DiagnosticCategory.Message, "When_type_checking_take_into_account_null_and_undefined_6699", "When type checking, take into account 'null' and 'undefined'."), + Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor: diag(6700, DiagnosticCategory.Message, "Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700", "Check for class properties that are declared but not set in the constructor."), + Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments: diag(6701, DiagnosticCategory.Message, "Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701", "Disable emitting declarations that have '@internal' in their JSDoc comments."), + Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals: diag(6702, DiagnosticCategory.Message, "Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702", "Disable reporting of excess property errors during the creation of object literals."), + Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures: diag(6703, DiagnosticCategory.Message, "Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703", "Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."), + Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively: diag(6704, DiagnosticCategory.Message, "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704", "Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."), + Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations: diag(6705, DiagnosticCategory.Message, "Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705", "Set the JavaScript language version for emitted JavaScript and include compatible library declarations."), + Log_paths_used_during_the_moduleResolution_process: diag(6706, DiagnosticCategory.Message, "Log_paths_used_during_the_moduleResolution_process_6706", "Log paths used during the 'moduleResolution' process."), + Specify_the_path_to_tsbuildinfo_incremental_compilation_file: diag(6707, DiagnosticCategory.Message, "Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707", "Specify the path to .tsbuildinfo incremental compilation file."), + Specify_options_for_automatic_acquisition_of_declaration_files: diag(6709, DiagnosticCategory.Message, "Specify_options_for_automatic_acquisition_of_declaration_files_6709", "Specify options for automatic acquisition of declaration files."), + Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types: diag(6710, DiagnosticCategory.Message, "Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710", "Specify multiple folders that act like './node_modules/@types'."), + Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file: diag(6711, DiagnosticCategory.Message, "Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711", "Specify type package names to be included without being referenced in a source file."), + Emit_ECMAScript_standard_compliant_class_fields: diag(6712, DiagnosticCategory.Message, "Emit_ECMAScript_standard_compliant_class_fields_6712", "Emit ECMAScript-standard-compliant class fields."), + Enable_verbose_logging: diag(6713, DiagnosticCategory.Message, "Enable_verbose_logging_6713", "Enable verbose logging."), + Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality: diag(6714, DiagnosticCategory.Message, "Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714", "Specify how directories are watched on systems that lack recursive file-watching functionality."), + Specify_how_the_TypeScript_watch_mode_works: diag(6715, DiagnosticCategory.Message, "Specify_how_the_TypeScript_watch_mode_works_6715", "Specify how the TypeScript watch mode works."), + Require_undeclared_properties_from_index_signatures_to_use_element_accesses: diag(6717, DiagnosticCategory.Message, "Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717", "Require undeclared properties from index signatures to use element accesses."), + Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: diag(6718, DiagnosticCategory.Message, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", "Specify emit/checking behavior for imports that are only used for types."), + Ensure_that_each_file_can_have_declaration_emit_generated_without_type_information: diag(6719, DiagnosticCategory.Message, "Ensure_that_each_file_can_have_declaration_emit_generated_without_type_information_6719", "Ensure that each file can have declaration emit generated without type information"), + Default_catch_clause_variables_as_unknown_instead_of_any: diag(6803, DiagnosticCategory.Message, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."), + one_of_Colon: diag(6900, DiagnosticCategory.Message, "one_of_Colon_6900", "one of:"), + one_or_more_Colon: diag(6901, DiagnosticCategory.Message, "one_or_more_Colon_6901", "one or more:"), + type_Colon: diag(6902, DiagnosticCategory.Message, "type_Colon_6902", "type:"), + default_Colon: diag(6903, DiagnosticCategory.Message, "default_Colon_6903", "default:"), + module_system_or_esModuleInterop: diag(6904, DiagnosticCategory.Message, "module_system_or_esModuleInterop_6904", "module === \"system\" or esModuleInterop"), + false_unless_strict_is_set: diag(6905, DiagnosticCategory.Message, "false_unless_strict_is_set_6905", "`false`, unless `strict` is set"), + false_unless_composite_is_set: diag(6906, DiagnosticCategory.Message, "false_unless_composite_is_set_6906", "`false`, unless `composite` is set"), + node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified: diag(6907, DiagnosticCategory.Message, "node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907", "`[\"node_modules\", \"bower_components\", \"jspm_packages\"]`, plus the value of `outDir` if one is specified."), + if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk: diag(6908, DiagnosticCategory.Message, "if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908", "`[]` if `files` is specified, otherwise `[\"**/*\"]`"), + true_if_composite_false_otherwise: diag(6909, DiagnosticCategory.Message, "true_if_composite_false_otherwise_6909", "`true` if `composite`, `false` otherwise"), + module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node: diag(69010, DiagnosticCategory.Message, "module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010", "module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"), + Computed_from_the_list_of_input_files: diag(6911, DiagnosticCategory.Message, "Computed_from_the_list_of_input_files_6911", "Computed from the list of input files"), + Platform_specific: diag(6912, DiagnosticCategory.Message, "Platform_specific_6912", "Platform specific"), + You_can_learn_about_all_of_the_compiler_options_at_0: diag(6913, DiagnosticCategory.Message, "You_can_learn_about_all_of_the_compiler_options_at_0_6913", "You can learn about all of the compiler options at {0}"), + Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon: diag(6914, DiagnosticCategory.Message, "Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914", "Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"), + Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0: diag(6915, DiagnosticCategory.Message, "Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915", "Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"), + COMMON_COMMANDS: diag(6916, DiagnosticCategory.Message, "COMMON_COMMANDS_6916", "COMMON COMMANDS"), + ALL_COMPILER_OPTIONS: diag(6917, DiagnosticCategory.Message, "ALL_COMPILER_OPTIONS_6917", "ALL COMPILER OPTIONS"), + WATCH_OPTIONS: diag(6918, DiagnosticCategory.Message, "WATCH_OPTIONS_6918", "WATCH OPTIONS"), + BUILD_OPTIONS: diag(6919, DiagnosticCategory.Message, "BUILD_OPTIONS_6919", "BUILD OPTIONS"), + COMMON_COMPILER_OPTIONS: diag(6920, DiagnosticCategory.Message, "COMMON_COMPILER_OPTIONS_6920", "COMMON COMPILER OPTIONS"), + COMMAND_LINE_FLAGS: diag(6921, DiagnosticCategory.Message, "COMMAND_LINE_FLAGS_6921", "COMMAND LINE FLAGS"), + tsc_Colon_The_TypeScript_Compiler: diag(6922, DiagnosticCategory.Message, "tsc_Colon_The_TypeScript_Compiler_6922", "tsc: The TypeScript Compiler"), + Compiles_the_current_project_tsconfig_json_in_the_working_directory: diag(6923, DiagnosticCategory.Message, "Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923", "Compiles the current project (tsconfig.json in the working directory.)"), + Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options: diag(6924, DiagnosticCategory.Message, "Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924", "Ignoring tsconfig.json, compiles the specified files with default compiler options."), + Build_a_composite_project_in_the_working_directory: diag(6925, DiagnosticCategory.Message, "Build_a_composite_project_in_the_working_directory_6925", "Build a composite project in the working directory."), + Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory: diag(6926, DiagnosticCategory.Message, "Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926", "Creates a tsconfig.json with the recommended settings in the working directory."), + Compiles_the_TypeScript_project_located_at_the_specified_path: diag(6927, DiagnosticCategory.Message, "Compiles_the_TypeScript_project_located_at_the_specified_path_6927", "Compiles the TypeScript project located at the specified path."), + An_expanded_version_of_this_information_showing_all_possible_compiler_options: diag(6928, DiagnosticCategory.Message, "An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928", "An expanded version of this information, showing all possible compiler options"), + Compiles_the_current_project_with_additional_settings: diag(6929, DiagnosticCategory.Message, "Compiles_the_current_project_with_additional_settings_6929", "Compiles the current project, with additional settings."), + true_for_ES2022_and_above_including_ESNext: diag(6930, DiagnosticCategory.Message, "true_for_ES2022_and_above_including_ESNext_6930", "`true` for ES2022 and above, including ESNext."), + List_of_file_name_suffixes_to_search_when_resolving_a_module: diag(6931, DiagnosticCategory.Error, "List_of_file_name_suffixes_to_search_when_resolving_a_module_6931", "List of file name suffixes to search when resolving a module."), + Variable_0_implicitly_has_an_1_type: diag(7005, DiagnosticCategory.Error, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."), + Parameter_0_implicitly_has_an_1_type: diag(7006, DiagnosticCategory.Error, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."), + Member_0_implicitly_has_an_1_type: diag(7008, DiagnosticCategory.Error, "Member_0_implicitly_has_an_1_type_7008", "Member '{0}' implicitly has an '{1}' type."), + new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: diag(7009, DiagnosticCategory.Error, "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009", "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."), + _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: diag(7010, DiagnosticCategory.Error, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."), + Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7011, DiagnosticCategory.Error, "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."), + Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: diag(7013, DiagnosticCategory.Error, "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."), + Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7014, DiagnosticCategory.Error, "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014", "Function type, which lacks return-type annotation, implicitly has an '{0}' return type."), + Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: diag(7015, DiagnosticCategory.Error, "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", "Element implicitly has an 'any' type because index expression is not of type 'number'."), + Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type: diag(7016, DiagnosticCategory.Error, "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016", "Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."), + Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature: diag(7017, DiagnosticCategory.Error, "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017", "Element implicitly has an 'any' type because type '{0}' has no index signature."), + Object_literal_s_property_0_implicitly_has_an_1_type: diag(7018, DiagnosticCategory.Error, "Object_literal_s_property_0_implicitly_has_an_1_type_7018", "Object literal's property '{0}' implicitly has an '{1}' type."), + Rest_parameter_0_implicitly_has_an_any_type: diag(7019, DiagnosticCategory.Error, "Rest_parameter_0_implicitly_has_an_any_type_7019", "Rest parameter '{0}' implicitly has an 'any[]' type."), + Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: diag(7020, DiagnosticCategory.Error, "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020", "Call signature, which lacks return-type annotation, implicitly has an 'any' return type."), + _0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: diag(7022, DiagnosticCategory.Error, "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022", "'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."), + _0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: diag(7023, DiagnosticCategory.Error, "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023", "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."), + Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: diag(7024, DiagnosticCategory.Error, "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024", "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."), + Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation: diag(7025, DiagnosticCategory.Error, "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025", "Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation."), + JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: diag(7026, DiagnosticCategory.Error, "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."), + Unreachable_code_detected: diag(7027, DiagnosticCategory.Error, "Unreachable_code_detected_7027", "Unreachable code detected.", /*reportsUnnecessary*/ true), + Unused_label: diag(7028, DiagnosticCategory.Error, "Unused_label_7028", "Unused label.", /*reportsUnnecessary*/ true), + Fallthrough_case_in_switch: diag(7029, DiagnosticCategory.Error, "Fallthrough_case_in_switch_7029", "Fallthrough case in switch."), + Not_all_code_paths_return_a_value: diag(7030, DiagnosticCategory.Error, "Not_all_code_paths_return_a_value_7030", "Not all code paths return a value."), + Binding_element_0_implicitly_has_an_1_type: diag(7031, DiagnosticCategory.Error, "Binding_element_0_implicitly_has_an_1_type_7031", "Binding element '{0}' implicitly has an '{1}' type."), + Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: diag(7032, DiagnosticCategory.Error, "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."), + Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: diag(7033, DiagnosticCategory.Error, "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."), + Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined: diag(7034, DiagnosticCategory.Error, "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034", "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."), + Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0: diag(7035, DiagnosticCategory.Error, "Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035", "Try `npm i --save-dev @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"), + Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0: diag(7036, DiagnosticCategory.Error, "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036", "Dynamic import's specifier must be of type 'string', but here has type '{0}'."), + Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports: diag(7037, DiagnosticCategory.Message, "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037", "Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."), + Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead: diag(7038, DiagnosticCategory.Message, "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038", "Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."), + Mapped_object_type_implicitly_has_an_any_template_type: diag(7039, DiagnosticCategory.Error, "Mapped_object_type_implicitly_has_an_any_template_type_7039", "Mapped object type implicitly has an 'any' template type."), + If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1: diag(7040, DiagnosticCategory.Error, "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040", "If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}'"), + The_containing_arrow_function_captures_the_global_value_of_this: diag(7041, DiagnosticCategory.Error, "The_containing_arrow_function_captures_the_global_value_of_this_7041", "The containing arrow function captures the global value of 'this'."), + Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used: diag(7042, DiagnosticCategory.Error, "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042", "Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."), + Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: diag(7043, DiagnosticCategory.Suggestion, "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043", "Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), + Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: diag(7044, DiagnosticCategory.Suggestion, "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044", "Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), + Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: diag(7045, DiagnosticCategory.Suggestion, "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045", "Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), + Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage: diag(7046, DiagnosticCategory.Suggestion, "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046", "Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."), + Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage: diag(7047, DiagnosticCategory.Suggestion, "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047", "Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."), + Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage: diag(7048, DiagnosticCategory.Suggestion, "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048", "Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."), + Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage: diag(7049, DiagnosticCategory.Suggestion, "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049", "Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."), + _0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage: diag(7050, DiagnosticCategory.Suggestion, "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050", "'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."), + Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1: diag(7051, DiagnosticCategory.Error, "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051", "Parameter has a name but no type. Did you mean '{0}: {1}'?"), + Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1: diag(7052, DiagnosticCategory.Error, "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052", "Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?"), + Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1: diag(7053, DiagnosticCategory.Error, "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053", "Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."), + No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1: diag(7054, DiagnosticCategory.Error, "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054", "No index signature with a parameter of type '{0}' was found on type '{1}'."), + _0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type: diag(7055, DiagnosticCategory.Error, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055", "'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."), + The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed: diag(7056, DiagnosticCategory.Error, "The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056", "The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed."), + yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation: diag(7057, DiagnosticCategory.Error, "yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057", "'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."), + If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1: diag(7058, DiagnosticCategory.Error, "If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058", "If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"), + This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead: diag(7059, DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059", "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."), + This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint: diag(7060, DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060", "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."), + A_mapped_type_may_not_declare_properties_or_methods: diag(7061, DiagnosticCategory.Error, "A_mapped_type_may_not_declare_properties_or_methods_7061", "A mapped type may not declare properties or methods."), + You_cannot_rename_this_element: diag(8000, DiagnosticCategory.Error, "You_cannot_rename_this_element_8000", "You cannot rename this element."), + You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: diag(8001, DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", "You cannot rename elements that are defined in the standard TypeScript library."), + import_can_only_be_used_in_TypeScript_files: diag(8002, DiagnosticCategory.Error, "import_can_only_be_used_in_TypeScript_files_8002", "'import ... =' can only be used in TypeScript files."), + export_can_only_be_used_in_TypeScript_files: diag(8003, DiagnosticCategory.Error, "export_can_only_be_used_in_TypeScript_files_8003", "'export =' can only be used in TypeScript files."), + Type_parameter_declarations_can_only_be_used_in_TypeScript_files: diag(8004, DiagnosticCategory.Error, "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004", "Type parameter declarations can only be used in TypeScript files."), + implements_clauses_can_only_be_used_in_TypeScript_files: diag(8005, DiagnosticCategory.Error, "implements_clauses_can_only_be_used_in_TypeScript_files_8005", "'implements' clauses can only be used in TypeScript files."), + _0_declarations_can_only_be_used_in_TypeScript_files: diag(8006, DiagnosticCategory.Error, "_0_declarations_can_only_be_used_in_TypeScript_files_8006", "'{0}' declarations can only be used in TypeScript files."), + Type_aliases_can_only_be_used_in_TypeScript_files: diag(8008, DiagnosticCategory.Error, "Type_aliases_can_only_be_used_in_TypeScript_files_8008", "Type aliases can only be used in TypeScript files."), + The_0_modifier_can_only_be_used_in_TypeScript_files: diag(8009, DiagnosticCategory.Error, "The_0_modifier_can_only_be_used_in_TypeScript_files_8009", "The '{0}' modifier can only be used in TypeScript files."), + Type_annotations_can_only_be_used_in_TypeScript_files: diag(8010, DiagnosticCategory.Error, "Type_annotations_can_only_be_used_in_TypeScript_files_8010", "Type annotations can only be used in TypeScript files."), + Type_arguments_can_only_be_used_in_TypeScript_files: diag(8011, DiagnosticCategory.Error, "Type_arguments_can_only_be_used_in_TypeScript_files_8011", "Type arguments can only be used in TypeScript files."), + Parameter_modifiers_can_only_be_used_in_TypeScript_files: diag(8012, DiagnosticCategory.Error, "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012", "Parameter modifiers can only be used in TypeScript files."), + Non_null_assertions_can_only_be_used_in_TypeScript_files: diag(8013, DiagnosticCategory.Error, "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013", "Non-null assertions can only be used in TypeScript files."), + Type_assertion_expressions_can_only_be_used_in_TypeScript_files: diag(8016, DiagnosticCategory.Error, "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016", "Type assertion expressions can only be used in TypeScript files."), + Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0: diag(8017, DiagnosticCategory.Error, "Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017", "Octal literal types must use ES2015 syntax. Use the syntax '{0}'."), + Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0: diag(8018, DiagnosticCategory.Error, "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018", "Octal literals are not allowed in enums members initializer. Use the syntax '{0}'."), + Report_errors_in_js_files: diag(8019, DiagnosticCategory.Message, "Report_errors_in_js_files_8019", "Report errors in .js files."), + JSDoc_types_can_only_be_used_inside_documentation_comments: diag(8020, DiagnosticCategory.Error, "JSDoc_types_can_only_be_used_inside_documentation_comments_8020", "JSDoc types can only be used inside documentation comments."), + JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags: diag(8021, DiagnosticCategory.Error, "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021", "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."), + JSDoc_0_is_not_attached_to_a_class: diag(8022, DiagnosticCategory.Error, "JSDoc_0_is_not_attached_to_a_class_8022", "JSDoc '@{0}' is not attached to a class."), + JSDoc_0_1_does_not_match_the_extends_2_clause: diag(8023, DiagnosticCategory.Error, "JSDoc_0_1_does_not_match_the_extends_2_clause_8023", "JSDoc '@{0} {1}' does not match the 'extends {2}' clause."), + JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name: diag(8024, DiagnosticCategory.Error, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name."), + Class_declarations_cannot_have_more_than_one_augments_or_extends_tag: diag(8025, DiagnosticCategory.Error, "Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025", "Class declarations cannot have more than one '@augments' or '@extends' tag."), + Expected_0_type_arguments_provide_these_with_an_extends_tag: diag(8026, DiagnosticCategory.Error, "Expected_0_type_arguments_provide_these_with_an_extends_tag_8026", "Expected {0} type arguments; provide these with an '@extends' tag."), + Expected_0_1_type_arguments_provide_these_with_an_extends_tag: diag(8027, DiagnosticCategory.Error, "Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027", "Expected {0}-{1} type arguments; provide these with an '@extends' tag."), + JSDoc_may_only_appear_in_the_last_parameter_of_a_signature: diag(8028, DiagnosticCategory.Error, "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028", "JSDoc '...' may only appear in the last parameter of a signature."), + JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type: diag(8029, DiagnosticCategory.Error, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."), + The_type_of_a_function_declaration_must_match_the_function_s_signature: diag(8030, DiagnosticCategory.Error, "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030", "The type of a function declaration must match the function's signature."), + You_cannot_rename_a_module_via_a_global_import: diag(8031, DiagnosticCategory.Error, "You_cannot_rename_a_module_via_a_global_import_8031", "You cannot rename a module via a global import."), + Qualified_name_0_is_not_allowed_without_a_leading_param_object_1: diag(8032, DiagnosticCategory.Error, "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032", "Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."), + A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags: diag(8033, DiagnosticCategory.Error, "A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033", "A JSDoc '@typedef' comment may not contain multiple '@type' tags."), + The_tag_was_first_specified_here: diag(8034, DiagnosticCategory.Error, "The_tag_was_first_specified_here_8034", "The tag was first specified here."), + You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder: diag(8035, DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035", "You cannot rename elements that are defined in a 'node_modules' folder."), + You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder: diag(8036, DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036", "You cannot rename elements that are defined in another 'node_modules' folder."), + Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files: diag(8037, DiagnosticCategory.Error, "Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037", "Type satisfaction expressions can only be used in TypeScript files."), + Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9005, DiagnosticCategory.Error, "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005", "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."), + Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9006, DiagnosticCategory.Error, "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006", "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."), + Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9007, DiagnosticCategory.Error, "Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_decl_9007", "Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit."), + JSX_attributes_must_only_be_assigned_a_non_empty_expression: diag(17000, DiagnosticCategory.Error, "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", "JSX attributes must only be assigned a non-empty 'expression'."), + JSX_elements_cannot_have_multiple_attributes_with_the_same_name: diag(17001, DiagnosticCategory.Error, "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001", "JSX elements cannot have multiple attributes with the same name."), + Expected_corresponding_JSX_closing_tag_for_0: diag(17002, DiagnosticCategory.Error, "Expected_corresponding_JSX_closing_tag_for_0_17002", "Expected corresponding JSX closing tag for '{0}'."), + Cannot_use_JSX_unless_the_jsx_flag_is_provided: diag(17004, DiagnosticCategory.Error, "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004", "Cannot use JSX unless the '--jsx' flag is provided."), + A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: diag(17005, DiagnosticCategory.Error, "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", "A constructor cannot contain a 'super' call when its class extends 'null'."), + An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: diag(17006, DiagnosticCategory.Error, "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006", "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."), + A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: diag(17007, DiagnosticCategory.Error, "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007", "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."), + JSX_element_0_has_no_corresponding_closing_tag: diag(17008, DiagnosticCategory.Error, "JSX_element_0_has_no_corresponding_closing_tag_17008", "JSX element '{0}' has no corresponding closing tag."), + super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class: diag(17009, DiagnosticCategory.Error, "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", "'super' must be called before accessing 'this' in the constructor of a derived class."), + Unknown_type_acquisition_option_0: diag(17010, DiagnosticCategory.Error, "Unknown_type_acquisition_option_0_17010", "Unknown type acquisition option '{0}'."), + super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class: diag(17011, DiagnosticCategory.Error, "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011", "'super' must be called before accessing a property of 'super' in the constructor of a derived class."), + _0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2: diag(17012, DiagnosticCategory.Error, "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012", "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"), + Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor: diag(17013, DiagnosticCategory.Error, "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013", "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."), + JSX_fragment_has_no_corresponding_closing_tag: diag(17014, DiagnosticCategory.Error, "JSX_fragment_has_no_corresponding_closing_tag_17014", "JSX fragment has no corresponding closing tag."), + Expected_corresponding_closing_tag_for_JSX_fragment: diag(17015, DiagnosticCategory.Error, "Expected_corresponding_closing_tag_for_JSX_fragment_17015", "Expected corresponding closing tag for JSX fragment."), + The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option: diag(17016, DiagnosticCategory.Error, "The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_com_17016", "The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option."), + An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments: diag(17017, DiagnosticCategory.Error, "An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017", "An @jsxFrag pragma is required when using an @jsx pragma with JSX fragments."), + Unknown_type_acquisition_option_0_Did_you_mean_1: diag(17018, DiagnosticCategory.Error, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"), + Circularity_detected_while_resolving_configuration_Colon_0: diag(18000, DiagnosticCategory.Error, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"), + The_files_list_in_config_file_0_is_empty: diag(18002, DiagnosticCategory.Error, "The_files_list_in_config_file_0_is_empty_18002", "The 'files' list in config file '{0}' is empty."), + No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: diag(18003, DiagnosticCategory.Error, "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."), + File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module: diag(80001, DiagnosticCategory.Suggestion, "File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001", "File is a CommonJS module; it may be converted to an ES module."), + This_constructor_function_may_be_converted_to_a_class_declaration: diag(80002, DiagnosticCategory.Suggestion, "This_constructor_function_may_be_converted_to_a_class_declaration_80002", "This constructor function may be converted to a class declaration."), + Import_may_be_converted_to_a_default_import: diag(80003, DiagnosticCategory.Suggestion, "Import_may_be_converted_to_a_default_import_80003", "Import may be converted to a default import."), + JSDoc_types_may_be_moved_to_TypeScript_types: diag(80004, DiagnosticCategory.Suggestion, "JSDoc_types_may_be_moved_to_TypeScript_types_80004", "JSDoc types may be moved to TypeScript types."), + require_call_may_be_converted_to_an_import: diag(80005, DiagnosticCategory.Suggestion, "require_call_may_be_converted_to_an_import_80005", "'require' call may be converted to an import."), + This_may_be_converted_to_an_async_function: diag(80006, DiagnosticCategory.Suggestion, "This_may_be_converted_to_an_async_function_80006", "This may be converted to an async function."), + await_has_no_effect_on_the_type_of_this_expression: diag(80007, DiagnosticCategory.Suggestion, "await_has_no_effect_on_the_type_of_this_expression_80007", "'await' has no effect on the type of this expression."), + Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers: diag(80008, DiagnosticCategory.Suggestion, "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008", "Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers."), + Add_missing_super_call: diag(90001, DiagnosticCategory.Message, "Add_missing_super_call_90001", "Add missing 'super()' call"), + Make_super_call_the_first_statement_in_the_constructor: diag(90002, DiagnosticCategory.Message, "Make_super_call_the_first_statement_in_the_constructor_90002", "Make 'super()' call the first statement in the constructor"), + Change_extends_to_implements: diag(90003, DiagnosticCategory.Message, "Change_extends_to_implements_90003", "Change 'extends' to 'implements'"), + Remove_unused_declaration_for_Colon_0: diag(90004, DiagnosticCategory.Message, "Remove_unused_declaration_for_Colon_0_90004", "Remove unused declaration for: '{0}'"), + Remove_import_from_0: diag(90005, DiagnosticCategory.Message, "Remove_import_from_0_90005", "Remove import from '{0}'"), + Implement_interface_0: diag(90006, DiagnosticCategory.Message, "Implement_interface_0_90006", "Implement interface '{0}'"), + Implement_inherited_abstract_class: diag(90007, DiagnosticCategory.Message, "Implement_inherited_abstract_class_90007", "Implement inherited abstract class"), + Add_0_to_unresolved_variable: diag(90008, DiagnosticCategory.Message, "Add_0_to_unresolved_variable_90008", "Add '{0}.' to unresolved variable"), + Remove_variable_statement: diag(90010, DiagnosticCategory.Message, "Remove_variable_statement_90010", "Remove variable statement"), + Remove_template_tag: diag(90011, DiagnosticCategory.Message, "Remove_template_tag_90011", "Remove template tag"), + Remove_type_parameters: diag(90012, DiagnosticCategory.Message, "Remove_type_parameters_90012", "Remove type parameters"), + Import_0_from_1: diag(90013, DiagnosticCategory.Message, "Import_0_from_1_90013", "Import '{0}' from \"{1}\""), + Change_0_to_1: diag(90014, DiagnosticCategory.Message, "Change_0_to_1_90014", "Change '{0}' to '{1}'"), + Declare_property_0: diag(90016, DiagnosticCategory.Message, "Declare_property_0_90016", "Declare property '{0}'"), + Add_index_signature_for_property_0: diag(90017, DiagnosticCategory.Message, "Add_index_signature_for_property_0_90017", "Add index signature for property '{0}'"), + Disable_checking_for_this_file: diag(90018, DiagnosticCategory.Message, "Disable_checking_for_this_file_90018", "Disable checking for this file"), + Ignore_this_error_message: diag(90019, DiagnosticCategory.Message, "Ignore_this_error_message_90019", "Ignore this error message"), + Initialize_property_0_in_the_constructor: diag(90020, DiagnosticCategory.Message, "Initialize_property_0_in_the_constructor_90020", "Initialize property '{0}' in the constructor"), + Initialize_static_property_0: diag(90021, DiagnosticCategory.Message, "Initialize_static_property_0_90021", "Initialize static property '{0}'"), + Change_spelling_to_0: diag(90022, DiagnosticCategory.Message, "Change_spelling_to_0_90022", "Change spelling to '{0}'"), + Declare_method_0: diag(90023, DiagnosticCategory.Message, "Declare_method_0_90023", "Declare method '{0}'"), + Declare_static_method_0: diag(90024, DiagnosticCategory.Message, "Declare_static_method_0_90024", "Declare static method '{0}'"), + Prefix_0_with_an_underscore: diag(90025, DiagnosticCategory.Message, "Prefix_0_with_an_underscore_90025", "Prefix '{0}' with an underscore"), + Rewrite_as_the_indexed_access_type_0: diag(90026, DiagnosticCategory.Message, "Rewrite_as_the_indexed_access_type_0_90026", "Rewrite as the indexed access type '{0}'"), + Declare_static_property_0: diag(90027, DiagnosticCategory.Message, "Declare_static_property_0_90027", "Declare static property '{0}'"), + Call_decorator_expression: diag(90028, DiagnosticCategory.Message, "Call_decorator_expression_90028", "Call decorator expression"), + Add_async_modifier_to_containing_function: diag(90029, DiagnosticCategory.Message, "Add_async_modifier_to_containing_function_90029", "Add async modifier to containing function"), + Replace_infer_0_with_unknown: diag(90030, DiagnosticCategory.Message, "Replace_infer_0_with_unknown_90030", "Replace 'infer {0}' with 'unknown'"), + Replace_all_unused_infer_with_unknown: diag(90031, DiagnosticCategory.Message, "Replace_all_unused_infer_with_unknown_90031", "Replace all unused 'infer' with 'unknown'"), + Add_parameter_name: diag(90034, DiagnosticCategory.Message, "Add_parameter_name_90034", "Add parameter name"), + Declare_private_property_0: diag(90035, DiagnosticCategory.Message, "Declare_private_property_0_90035", "Declare private property '{0}'"), + Replace_0_with_Promise_1: diag(90036, DiagnosticCategory.Message, "Replace_0_with_Promise_1_90036", "Replace '{0}' with 'Promise<{1}>'"), + Fix_all_incorrect_return_type_of_an_async_functions: diag(90037, DiagnosticCategory.Message, "Fix_all_incorrect_return_type_of_an_async_functions_90037", "Fix all incorrect return type of an async functions"), + Declare_private_method_0: diag(90038, DiagnosticCategory.Message, "Declare_private_method_0_90038", "Declare private method '{0}'"), + Remove_unused_destructuring_declaration: diag(90039, DiagnosticCategory.Message, "Remove_unused_destructuring_declaration_90039", "Remove unused destructuring declaration"), + Remove_unused_declarations_for_Colon_0: diag(90041, DiagnosticCategory.Message, "Remove_unused_declarations_for_Colon_0_90041", "Remove unused declarations for: '{0}'"), + Declare_a_private_field_named_0: diag(90053, DiagnosticCategory.Message, "Declare_a_private_field_named_0_90053", "Declare a private field named '{0}'."), + Includes_imports_of_types_referenced_by_0: diag(90054, DiagnosticCategory.Message, "Includes_imports_of_types_referenced_by_0_90054", "Includes imports of types referenced by '{0}'"), + Remove_type_from_import_declaration_from_0: diag(90055, DiagnosticCategory.Message, "Remove_type_from_import_declaration_from_0_90055", "Remove 'type' from import declaration from \"{0}\""), + Remove_type_from_import_of_0_from_1: diag(90056, DiagnosticCategory.Message, "Remove_type_from_import_of_0_from_1_90056", "Remove 'type' from import of '{0}' from \"{1}\""), + Add_import_from_0: diag(90057, DiagnosticCategory.Message, "Add_import_from_0_90057", "Add import from \"{0}\""), + Update_import_from_0: diag(90058, DiagnosticCategory.Message, "Update_import_from_0_90058", "Update import from \"{0}\""), + Export_0_from_module_1: diag(90059, DiagnosticCategory.Message, "Export_0_from_module_1_90059", "Export '{0}' from module '{1}'"), + Export_all_referenced_locals: diag(90060, DiagnosticCategory.Message, "Export_all_referenced_locals_90060", "Export all referenced locals"), + Convert_function_to_an_ES2015_class: diag(95001, DiagnosticCategory.Message, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"), + Convert_0_to_1_in_0: diag(95003, DiagnosticCategory.Message, "Convert_0_to_1_in_0_95003", "Convert '{0}' to '{1} in {0}'"), + Extract_to_0_in_1: diag(95004, DiagnosticCategory.Message, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"), + Extract_function: diag(95005, DiagnosticCategory.Message, "Extract_function_95005", "Extract function"), + Extract_constant: diag(95006, DiagnosticCategory.Message, "Extract_constant_95006", "Extract constant"), + Extract_to_0_in_enclosing_scope: diag(95007, DiagnosticCategory.Message, "Extract_to_0_in_enclosing_scope_95007", "Extract to {0} in enclosing scope"), + Extract_to_0_in_1_scope: diag(95008, DiagnosticCategory.Message, "Extract_to_0_in_1_scope_95008", "Extract to {0} in {1} scope"), + Annotate_with_type_from_JSDoc: diag(95009, DiagnosticCategory.Message, "Annotate_with_type_from_JSDoc_95009", "Annotate with type from JSDoc"), + Infer_type_of_0_from_usage: diag(95011, DiagnosticCategory.Message, "Infer_type_of_0_from_usage_95011", "Infer type of '{0}' from usage"), + Infer_parameter_types_from_usage: diag(95012, DiagnosticCategory.Message, "Infer_parameter_types_from_usage_95012", "Infer parameter types from usage"), + Convert_to_default_import: diag(95013, DiagnosticCategory.Message, "Convert_to_default_import_95013", "Convert to default import"), + Install_0: diag(95014, DiagnosticCategory.Message, "Install_0_95014", "Install '{0}'"), + Replace_import_with_0: diag(95015, DiagnosticCategory.Message, "Replace_import_with_0_95015", "Replace import with '{0}'."), + Use_synthetic_default_member: diag(95016, DiagnosticCategory.Message, "Use_synthetic_default_member_95016", "Use synthetic 'default' member."), + Convert_to_ES_module: diag(95017, DiagnosticCategory.Message, "Convert_to_ES_module_95017", "Convert to ES module"), + Add_undefined_type_to_property_0: diag(95018, DiagnosticCategory.Message, "Add_undefined_type_to_property_0_95018", "Add 'undefined' type to property '{0}'"), + Add_initializer_to_property_0: diag(95019, DiagnosticCategory.Message, "Add_initializer_to_property_0_95019", "Add initializer to property '{0}'"), + Add_definite_assignment_assertion_to_property_0: diag(95020, DiagnosticCategory.Message, "Add_definite_assignment_assertion_to_property_0_95020", "Add definite assignment assertion to property '{0}'"), + Convert_all_type_literals_to_mapped_type: diag(95021, DiagnosticCategory.Message, "Convert_all_type_literals_to_mapped_type_95021", "Convert all type literals to mapped type"), + Add_all_missing_members: diag(95022, DiagnosticCategory.Message, "Add_all_missing_members_95022", "Add all missing members"), + Infer_all_types_from_usage: diag(95023, DiagnosticCategory.Message, "Infer_all_types_from_usage_95023", "Infer all types from usage"), + Delete_all_unused_declarations: diag(95024, DiagnosticCategory.Message, "Delete_all_unused_declarations_95024", "Delete all unused declarations"), + Prefix_all_unused_declarations_with_where_possible: diag(95025, DiagnosticCategory.Message, "Prefix_all_unused_declarations_with_where_possible_95025", "Prefix all unused declarations with '_' where possible"), + Fix_all_detected_spelling_errors: diag(95026, DiagnosticCategory.Message, "Fix_all_detected_spelling_errors_95026", "Fix all detected spelling errors"), + Add_initializers_to_all_uninitialized_properties: diag(95027, DiagnosticCategory.Message, "Add_initializers_to_all_uninitialized_properties_95027", "Add initializers to all uninitialized properties"), + Add_definite_assignment_assertions_to_all_uninitialized_properties: diag(95028, DiagnosticCategory.Message, "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028", "Add definite assignment assertions to all uninitialized properties"), + Add_undefined_type_to_all_uninitialized_properties: diag(95029, DiagnosticCategory.Message, "Add_undefined_type_to_all_uninitialized_properties_95029", "Add undefined type to all uninitialized properties"), + Change_all_jsdoc_style_types_to_TypeScript: diag(95030, DiagnosticCategory.Message, "Change_all_jsdoc_style_types_to_TypeScript_95030", "Change all jsdoc-style types to TypeScript"), + Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types: diag(95031, DiagnosticCategory.Message, "Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031", "Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"), + Implement_all_unimplemented_interfaces: diag(95032, DiagnosticCategory.Message, "Implement_all_unimplemented_interfaces_95032", "Implement all unimplemented interfaces"), + Install_all_missing_types_packages: diag(95033, DiagnosticCategory.Message, "Install_all_missing_types_packages_95033", "Install all missing types packages"), + Rewrite_all_as_indexed_access_types: diag(95034, DiagnosticCategory.Message, "Rewrite_all_as_indexed_access_types_95034", "Rewrite all as indexed access types"), + Convert_all_to_default_imports: diag(95035, DiagnosticCategory.Message, "Convert_all_to_default_imports_95035", "Convert all to default imports"), + Make_all_super_calls_the_first_statement_in_their_constructor: diag(95036, DiagnosticCategory.Message, "Make_all_super_calls_the_first_statement_in_their_constructor_95036", "Make all 'super()' calls the first statement in their constructor"), + Add_qualifier_to_all_unresolved_variables_matching_a_member_name: diag(95037, DiagnosticCategory.Message, "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037", "Add qualifier to all unresolved variables matching a member name"), + Change_all_extended_interfaces_to_implements: diag(95038, DiagnosticCategory.Message, "Change_all_extended_interfaces_to_implements_95038", "Change all extended interfaces to 'implements'"), + Add_all_missing_super_calls: diag(95039, DiagnosticCategory.Message, "Add_all_missing_super_calls_95039", "Add all missing super calls"), + Implement_all_inherited_abstract_classes: diag(95040, DiagnosticCategory.Message, "Implement_all_inherited_abstract_classes_95040", "Implement all inherited abstract classes"), + Add_all_missing_async_modifiers: diag(95041, DiagnosticCategory.Message, "Add_all_missing_async_modifiers_95041", "Add all missing 'async' modifiers"), + Add_ts_ignore_to_all_error_messages: diag(95042, DiagnosticCategory.Message, "Add_ts_ignore_to_all_error_messages_95042", "Add '@ts-ignore' to all error messages"), + Annotate_everything_with_types_from_JSDoc: diag(95043, DiagnosticCategory.Message, "Annotate_everything_with_types_from_JSDoc_95043", "Annotate everything with types from JSDoc"), + Add_to_all_uncalled_decorators: diag(95044, DiagnosticCategory.Message, "Add_to_all_uncalled_decorators_95044", "Add '()' to all uncalled decorators"), + Convert_all_constructor_functions_to_classes: diag(95045, DiagnosticCategory.Message, "Convert_all_constructor_functions_to_classes_95045", "Convert all constructor functions to classes"), + Generate_get_and_set_accessors: diag(95046, DiagnosticCategory.Message, "Generate_get_and_set_accessors_95046", "Generate 'get' and 'set' accessors"), + Convert_require_to_import: diag(95047, DiagnosticCategory.Message, "Convert_require_to_import_95047", "Convert 'require' to 'import'"), + Convert_all_require_to_import: diag(95048, DiagnosticCategory.Message, "Convert_all_require_to_import_95048", "Convert all 'require' to 'import'"), + Move_to_a_new_file: diag(95049, DiagnosticCategory.Message, "Move_to_a_new_file_95049", "Move to a new file"), + Remove_unreachable_code: diag(95050, DiagnosticCategory.Message, "Remove_unreachable_code_95050", "Remove unreachable code"), + Remove_all_unreachable_code: diag(95051, DiagnosticCategory.Message, "Remove_all_unreachable_code_95051", "Remove all unreachable code"), + Add_missing_typeof: diag(95052, DiagnosticCategory.Message, "Add_missing_typeof_95052", "Add missing 'typeof'"), + Remove_unused_label: diag(95053, DiagnosticCategory.Message, "Remove_unused_label_95053", "Remove unused label"), + Remove_all_unused_labels: diag(95054, DiagnosticCategory.Message, "Remove_all_unused_labels_95054", "Remove all unused labels"), + Convert_0_to_mapped_object_type: diag(95055, DiagnosticCategory.Message, "Convert_0_to_mapped_object_type_95055", "Convert '{0}' to mapped object type"), + Convert_namespace_import_to_named_imports: diag(95056, DiagnosticCategory.Message, "Convert_namespace_import_to_named_imports_95056", "Convert namespace import to named imports"), + Convert_named_imports_to_namespace_import: diag(95057, DiagnosticCategory.Message, "Convert_named_imports_to_namespace_import_95057", "Convert named imports to namespace import"), + Add_or_remove_braces_in_an_arrow_function: diag(95058, DiagnosticCategory.Message, "Add_or_remove_braces_in_an_arrow_function_95058", "Add or remove braces in an arrow function"), + Add_braces_to_arrow_function: diag(95059, DiagnosticCategory.Message, "Add_braces_to_arrow_function_95059", "Add braces to arrow function"), + Remove_braces_from_arrow_function: diag(95060, DiagnosticCategory.Message, "Remove_braces_from_arrow_function_95060", "Remove braces from arrow function"), + Convert_default_export_to_named_export: diag(95061, DiagnosticCategory.Message, "Convert_default_export_to_named_export_95061", "Convert default export to named export"), + Convert_named_export_to_default_export: diag(95062, DiagnosticCategory.Message, "Convert_named_export_to_default_export_95062", "Convert named export to default export"), + Add_missing_enum_member_0: diag(95063, DiagnosticCategory.Message, "Add_missing_enum_member_0_95063", "Add missing enum member '{0}'"), + Add_all_missing_imports: diag(95064, DiagnosticCategory.Message, "Add_all_missing_imports_95064", "Add all missing imports"), + Convert_to_async_function: diag(95065, DiagnosticCategory.Message, "Convert_to_async_function_95065", "Convert to async function"), + Convert_all_to_async_functions: diag(95066, DiagnosticCategory.Message, "Convert_all_to_async_functions_95066", "Convert all to async functions"), + Add_missing_call_parentheses: diag(95067, DiagnosticCategory.Message, "Add_missing_call_parentheses_95067", "Add missing call parentheses"), + Add_all_missing_call_parentheses: diag(95068, DiagnosticCategory.Message, "Add_all_missing_call_parentheses_95068", "Add all missing call parentheses"), + Add_unknown_conversion_for_non_overlapping_types: diag(95069, DiagnosticCategory.Message, "Add_unknown_conversion_for_non_overlapping_types_95069", "Add 'unknown' conversion for non-overlapping types"), + Add_unknown_to_all_conversions_of_non_overlapping_types: diag(95070, DiagnosticCategory.Message, "Add_unknown_to_all_conversions_of_non_overlapping_types_95070", "Add 'unknown' to all conversions of non-overlapping types"), + Add_missing_new_operator_to_call: diag(95071, DiagnosticCategory.Message, "Add_missing_new_operator_to_call_95071", "Add missing 'new' operator to call"), + Add_missing_new_operator_to_all_calls: diag(95072, DiagnosticCategory.Message, "Add_missing_new_operator_to_all_calls_95072", "Add missing 'new' operator to all calls"), + Add_names_to_all_parameters_without_names: diag(95073, DiagnosticCategory.Message, "Add_names_to_all_parameters_without_names_95073", "Add names to all parameters without names"), + Enable_the_experimentalDecorators_option_in_your_configuration_file: diag(95074, DiagnosticCategory.Message, "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074", "Enable the 'experimentalDecorators' option in your configuration file"), + Convert_parameters_to_destructured_object: diag(95075, DiagnosticCategory.Message, "Convert_parameters_to_destructured_object_95075", "Convert parameters to destructured object"), + Extract_type: diag(95077, DiagnosticCategory.Message, "Extract_type_95077", "Extract type"), + Extract_to_type_alias: diag(95078, DiagnosticCategory.Message, "Extract_to_type_alias_95078", "Extract to type alias"), + Extract_to_typedef: diag(95079, DiagnosticCategory.Message, "Extract_to_typedef_95079", "Extract to typedef"), + Infer_this_type_of_0_from_usage: diag(95080, DiagnosticCategory.Message, "Infer_this_type_of_0_from_usage_95080", "Infer 'this' type of '{0}' from usage"), + Add_const_to_unresolved_variable: diag(95081, DiagnosticCategory.Message, "Add_const_to_unresolved_variable_95081", "Add 'const' to unresolved variable"), + Add_const_to_all_unresolved_variables: diag(95082, DiagnosticCategory.Message, "Add_const_to_all_unresolved_variables_95082", "Add 'const' to all unresolved variables"), + Add_await: diag(95083, DiagnosticCategory.Message, "Add_await_95083", "Add 'await'"), + Add_await_to_initializer_for_0: diag(95084, DiagnosticCategory.Message, "Add_await_to_initializer_for_0_95084", "Add 'await' to initializer for '{0}'"), + Fix_all_expressions_possibly_missing_await: diag(95085, DiagnosticCategory.Message, "Fix_all_expressions_possibly_missing_await_95085", "Fix all expressions possibly missing 'await'"), + Remove_unnecessary_await: diag(95086, DiagnosticCategory.Message, "Remove_unnecessary_await_95086", "Remove unnecessary 'await'"), + Remove_all_unnecessary_uses_of_await: diag(95087, DiagnosticCategory.Message, "Remove_all_unnecessary_uses_of_await_95087", "Remove all unnecessary uses of 'await'"), + Enable_the_jsx_flag_in_your_configuration_file: diag(95088, DiagnosticCategory.Message, "Enable_the_jsx_flag_in_your_configuration_file_95088", "Enable the '--jsx' flag in your configuration file"), + Add_await_to_initializers: diag(95089, DiagnosticCategory.Message, "Add_await_to_initializers_95089", "Add 'await' to initializers"), + Extract_to_interface: diag(95090, DiagnosticCategory.Message, "Extract_to_interface_95090", "Extract to interface"), + Convert_to_a_bigint_numeric_literal: diag(95091, DiagnosticCategory.Message, "Convert_to_a_bigint_numeric_literal_95091", "Convert to a bigint numeric literal"), + Convert_all_to_bigint_numeric_literals: diag(95092, DiagnosticCategory.Message, "Convert_all_to_bigint_numeric_literals_95092", "Convert all to bigint numeric literals"), + Convert_const_to_let: diag(95093, DiagnosticCategory.Message, "Convert_const_to_let_95093", "Convert 'const' to 'let'"), + Prefix_with_declare: diag(95094, DiagnosticCategory.Message, "Prefix_with_declare_95094", "Prefix with 'declare'"), + Prefix_all_incorrect_property_declarations_with_declare: diag(95095, DiagnosticCategory.Message, "Prefix_all_incorrect_property_declarations_with_declare_95095", "Prefix all incorrect property declarations with 'declare'"), + Convert_to_template_string: diag(95096, DiagnosticCategory.Message, "Convert_to_template_string_95096", "Convert to template string"), + Add_export_to_make_this_file_into_a_module: diag(95097, DiagnosticCategory.Message, "Add_export_to_make_this_file_into_a_module_95097", "Add 'export {}' to make this file into a module"), + Set_the_target_option_in_your_configuration_file_to_0: diag(95098, DiagnosticCategory.Message, "Set_the_target_option_in_your_configuration_file_to_0_95098", "Set the 'target' option in your configuration file to '{0}'"), + Set_the_module_option_in_your_configuration_file_to_0: diag(95099, DiagnosticCategory.Message, "Set_the_module_option_in_your_configuration_file_to_0_95099", "Set the 'module' option in your configuration file to '{0}'"), + Convert_invalid_character_to_its_html_entity_code: diag(95100, DiagnosticCategory.Message, "Convert_invalid_character_to_its_html_entity_code_95100", "Convert invalid character to its html entity code"), + Convert_all_invalid_characters_to_HTML_entity_code: diag(95101, DiagnosticCategory.Message, "Convert_all_invalid_characters_to_HTML_entity_code_95101", "Convert all invalid characters to HTML entity code"), + Convert_all_const_to_let: diag(95102, DiagnosticCategory.Message, "Convert_all_const_to_let_95102", "Convert all 'const' to 'let'"), + Convert_function_expression_0_to_arrow_function: diag(95105, DiagnosticCategory.Message, "Convert_function_expression_0_to_arrow_function_95105", "Convert function expression '{0}' to arrow function"), + Convert_function_declaration_0_to_arrow_function: diag(95106, DiagnosticCategory.Message, "Convert_function_declaration_0_to_arrow_function_95106", "Convert function declaration '{0}' to arrow function"), + Fix_all_implicit_this_errors: diag(95107, DiagnosticCategory.Message, "Fix_all_implicit_this_errors_95107", "Fix all implicit-'this' errors"), + Wrap_invalid_character_in_an_expression_container: diag(95108, DiagnosticCategory.Message, "Wrap_invalid_character_in_an_expression_container_95108", "Wrap invalid character in an expression container"), + Wrap_all_invalid_characters_in_an_expression_container: diag(95109, DiagnosticCategory.Message, "Wrap_all_invalid_characters_in_an_expression_container_95109", "Wrap all invalid characters in an expression container"), + Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file: diag(95110, DiagnosticCategory.Message, "Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110", "Visit https://aka.ms/tsconfig to read more about this file"), + Add_a_return_statement: diag(95111, DiagnosticCategory.Message, "Add_a_return_statement_95111", "Add a return statement"), + Remove_braces_from_arrow_function_body: diag(95112, DiagnosticCategory.Message, "Remove_braces_from_arrow_function_body_95112", "Remove braces from arrow function body"), + Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal: diag(95113, DiagnosticCategory.Message, "Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113", "Wrap the following body with parentheses which should be an object literal"), + Add_all_missing_return_statement: diag(95114, DiagnosticCategory.Message, "Add_all_missing_return_statement_95114", "Add all missing return statement"), + Remove_braces_from_all_arrow_function_bodies_with_relevant_issues: diag(95115, DiagnosticCategory.Message, "Remove_braces_from_all_arrow_function_bodies_with_relevant_issues_95115", "Remove braces from all arrow function bodies with relevant issues"), + Wrap_all_object_literal_with_parentheses: diag(95116, DiagnosticCategory.Message, "Wrap_all_object_literal_with_parentheses_95116", "Wrap all object literal with parentheses"), + Move_labeled_tuple_element_modifiers_to_labels: diag(95117, DiagnosticCategory.Message, "Move_labeled_tuple_element_modifiers_to_labels_95117", "Move labeled tuple element modifiers to labels"), + Convert_overload_list_to_single_signature: diag(95118, DiagnosticCategory.Message, "Convert_overload_list_to_single_signature_95118", "Convert overload list to single signature"), + Generate_get_and_set_accessors_for_all_overriding_properties: diag(95119, DiagnosticCategory.Message, "Generate_get_and_set_accessors_for_all_overriding_properties_95119", "Generate 'get' and 'set' accessors for all overriding properties"), + Wrap_in_JSX_fragment: diag(95120, DiagnosticCategory.Message, "Wrap_in_JSX_fragment_95120", "Wrap in JSX fragment"), + Wrap_all_unparented_JSX_in_JSX_fragment: diag(95121, DiagnosticCategory.Message, "Wrap_all_unparented_JSX_in_JSX_fragment_95121", "Wrap all unparented JSX in JSX fragment"), + Convert_arrow_function_or_function_expression: diag(95122, DiagnosticCategory.Message, "Convert_arrow_function_or_function_expression_95122", "Convert arrow function or function expression"), + Convert_to_anonymous_function: diag(95123, DiagnosticCategory.Message, "Convert_to_anonymous_function_95123", "Convert to anonymous function"), + Convert_to_named_function: diag(95124, DiagnosticCategory.Message, "Convert_to_named_function_95124", "Convert to named function"), + Convert_to_arrow_function: diag(95125, DiagnosticCategory.Message, "Convert_to_arrow_function_95125", "Convert to arrow function"), + Remove_parentheses: diag(95126, DiagnosticCategory.Message, "Remove_parentheses_95126", "Remove parentheses"), + Could_not_find_a_containing_arrow_function: diag(95127, DiagnosticCategory.Message, "Could_not_find_a_containing_arrow_function_95127", "Could not find a containing arrow function"), + Containing_function_is_not_an_arrow_function: diag(95128, DiagnosticCategory.Message, "Containing_function_is_not_an_arrow_function_95128", "Containing function is not an arrow function"), + Could_not_find_export_statement: diag(95129, DiagnosticCategory.Message, "Could_not_find_export_statement_95129", "Could not find export statement"), + This_file_already_has_a_default_export: diag(95130, DiagnosticCategory.Message, "This_file_already_has_a_default_export_95130", "This file already has a default export"), + Could_not_find_import_clause: diag(95131, DiagnosticCategory.Message, "Could_not_find_import_clause_95131", "Could not find import clause"), + Could_not_find_namespace_import_or_named_imports: diag(95132, DiagnosticCategory.Message, "Could_not_find_namespace_import_or_named_imports_95132", "Could not find namespace import or named imports"), + Selection_is_not_a_valid_type_node: diag(95133, DiagnosticCategory.Message, "Selection_is_not_a_valid_type_node_95133", "Selection is not a valid type node"), + No_type_could_be_extracted_from_this_type_node: diag(95134, DiagnosticCategory.Message, "No_type_could_be_extracted_from_this_type_node_95134", "No type could be extracted from this type node"), + Could_not_find_property_for_which_to_generate_accessor: diag(95135, DiagnosticCategory.Message, "Could_not_find_property_for_which_to_generate_accessor_95135", "Could not find property for which to generate accessor"), + Name_is_not_valid: diag(95136, DiagnosticCategory.Message, "Name_is_not_valid_95136", "Name is not valid"), + Can_only_convert_property_with_modifier: diag(95137, DiagnosticCategory.Message, "Can_only_convert_property_with_modifier_95137", "Can only convert property with modifier"), + Switch_each_misused_0_to_1: diag(95138, DiagnosticCategory.Message, "Switch_each_misused_0_to_1_95138", "Switch each misused '{0}' to '{1}'"), + Convert_to_optional_chain_expression: diag(95139, DiagnosticCategory.Message, "Convert_to_optional_chain_expression_95139", "Convert to optional chain expression"), + Could_not_find_convertible_access_expression: diag(95140, DiagnosticCategory.Message, "Could_not_find_convertible_access_expression_95140", "Could not find convertible access expression"), + Could_not_find_matching_access_expressions: diag(95141, DiagnosticCategory.Message, "Could_not_find_matching_access_expressions_95141", "Could not find matching access expressions"), + Can_only_convert_logical_AND_access_chains: diag(95142, DiagnosticCategory.Message, "Can_only_convert_logical_AND_access_chains_95142", "Can only convert logical AND access chains"), + Add_void_to_Promise_resolved_without_a_value: diag(95143, DiagnosticCategory.Message, "Add_void_to_Promise_resolved_without_a_value_95143", "Add 'void' to Promise resolved without a value"), + Add_void_to_all_Promises_resolved_without_a_value: diag(95144, DiagnosticCategory.Message, "Add_void_to_all_Promises_resolved_without_a_value_95144", "Add 'void' to all Promises resolved without a value"), + Use_element_access_for_0: diag(95145, DiagnosticCategory.Message, "Use_element_access_for_0_95145", "Use element access for '{0}'"), + Use_element_access_for_all_undeclared_properties: diag(95146, DiagnosticCategory.Message, "Use_element_access_for_all_undeclared_properties_95146", "Use element access for all undeclared properties."), + Delete_all_unused_imports: diag(95147, DiagnosticCategory.Message, "Delete_all_unused_imports_95147", "Delete all unused imports"), + Infer_function_return_type: diag(95148, DiagnosticCategory.Message, "Infer_function_return_type_95148", "Infer function return type"), + Return_type_must_be_inferred_from_a_function: diag(95149, DiagnosticCategory.Message, "Return_type_must_be_inferred_from_a_function_95149", "Return type must be inferred from a function"), + Could_not_determine_function_return_type: diag(95150, DiagnosticCategory.Message, "Could_not_determine_function_return_type_95150", "Could not determine function return type"), + Could_not_convert_to_arrow_function: diag(95151, DiagnosticCategory.Message, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"), + Could_not_convert_to_named_function: diag(95152, DiagnosticCategory.Message, "Could_not_convert_to_named_function_95152", "Could not convert to named function"), + Could_not_convert_to_anonymous_function: diag(95153, DiagnosticCategory.Message, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"), + Can_only_convert_string_concatenation: diag(95154, DiagnosticCategory.Message, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"), + Selection_is_not_a_valid_statement_or_statements: diag(95155, DiagnosticCategory.Message, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"), + Add_missing_function_declaration_0: diag(95156, DiagnosticCategory.Message, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"), + Add_all_missing_function_declarations: diag(95157, DiagnosticCategory.Message, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"), + Method_not_implemented: diag(95158, DiagnosticCategory.Message, "Method_not_implemented_95158", "Method not implemented."), + Function_not_implemented: diag(95159, DiagnosticCategory.Message, "Function_not_implemented_95159", "Function not implemented."), + Add_override_modifier: diag(95160, DiagnosticCategory.Message, "Add_override_modifier_95160", "Add 'override' modifier"), + Remove_override_modifier: diag(95161, DiagnosticCategory.Message, "Remove_override_modifier_95161", "Remove 'override' modifier"), + Add_all_missing_override_modifiers: diag(95162, DiagnosticCategory.Message, "Add_all_missing_override_modifiers_95162", "Add all missing 'override' modifiers"), + Remove_all_unnecessary_override_modifiers: diag(95163, DiagnosticCategory.Message, "Remove_all_unnecessary_override_modifiers_95163", "Remove all unnecessary 'override' modifiers"), + Can_only_convert_named_export: diag(95164, DiagnosticCategory.Message, "Can_only_convert_named_export_95164", "Can only convert named export"), + Add_missing_properties: diag(95165, DiagnosticCategory.Message, "Add_missing_properties_95165", "Add missing properties"), + Add_all_missing_properties: diag(95166, DiagnosticCategory.Message, "Add_all_missing_properties_95166", "Add all missing properties"), + Add_missing_attributes: diag(95167, DiagnosticCategory.Message, "Add_missing_attributes_95167", "Add missing attributes"), + Add_all_missing_attributes: diag(95168, DiagnosticCategory.Message, "Add_all_missing_attributes_95168", "Add all missing attributes"), + Add_undefined_to_optional_property_type: diag(95169, DiagnosticCategory.Message, "Add_undefined_to_optional_property_type_95169", "Add 'undefined' to optional property type"), + Convert_named_imports_to_default_import: diag(95170, DiagnosticCategory.Message, "Convert_named_imports_to_default_import_95170", "Convert named imports to default import"), + Delete_unused_param_tag_0: diag(95171, DiagnosticCategory.Message, "Delete_unused_param_tag_0_95171", "Delete unused '@param' tag '{0}'"), + Delete_all_unused_param_tags: diag(95172, DiagnosticCategory.Message, "Delete_all_unused_param_tags_95172", "Delete all unused '@param' tags"), + Rename_param_tag_name_0_to_1: diag(95173, DiagnosticCategory.Message, "Rename_param_tag_name_0_to_1_95173", "Rename '@param' tag name '{0}' to '{1}'"), + Use_0: diag(95174, DiagnosticCategory.Message, "Use_0_95174", "Use `{0}`."), + Use_Number_isNaN_in_all_conditions: diag(95175, DiagnosticCategory.Message, "Use_Number_isNaN_in_all_conditions_95175", "Use `Number.isNaN` in all conditions."), + No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, DiagnosticCategory.Error, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."), + Classes_may_not_have_a_field_named_constructor: diag(18006, DiagnosticCategory.Error, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."), + JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, DiagnosticCategory.Error, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"), + Private_identifiers_cannot_be_used_as_parameters: diag(18009, DiagnosticCategory.Error, "Private_identifiers_cannot_be_used_as_parameters_18009", "Private identifiers cannot be used as parameters."), + An_accessibility_modifier_cannot_be_used_with_a_private_identifier: diag(18010, DiagnosticCategory.Error, "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010", "An accessibility modifier cannot be used with a private identifier."), + The_operand_of_a_delete_operator_cannot_be_a_private_identifier: diag(18011, DiagnosticCategory.Error, "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011", "The operand of a 'delete' operator cannot be a private identifier."), + constructor_is_a_reserved_word: diag(18012, DiagnosticCategory.Error, "constructor_is_a_reserved_word_18012", "'#constructor' is a reserved word."), + Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier: diag(18013, DiagnosticCategory.Error, "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013", "Property '{0}' is not accessible outside class '{1}' because it has a private identifier."), + The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling: diag(18014, DiagnosticCategory.Error, "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014", "The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling."), + Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2: diag(18015, DiagnosticCategory.Error, "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015", "Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'."), + Private_identifiers_are_not_allowed_outside_class_bodies: diag(18016, DiagnosticCategory.Error, "Private_identifiers_are_not_allowed_outside_class_bodies_18016", "Private identifiers are not allowed outside class bodies."), + The_shadowing_declaration_of_0_is_defined_here: diag(18017, DiagnosticCategory.Error, "The_shadowing_declaration_of_0_is_defined_here_18017", "The shadowing declaration of '{0}' is defined here"), + The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here: diag(18018, DiagnosticCategory.Error, "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018", "The declaration of '{0}' that you probably intended to use is defined here"), + _0_modifier_cannot_be_used_with_a_private_identifier: diag(18019, DiagnosticCategory.Error, "_0_modifier_cannot_be_used_with_a_private_identifier_18019", "'{0}' modifier cannot be used with a private identifier."), + An_enum_member_cannot_be_named_with_a_private_identifier: diag(18024, DiagnosticCategory.Error, "An_enum_member_cannot_be_named_with_a_private_identifier_18024", "An enum member cannot be named with a private identifier."), + can_only_be_used_at_the_start_of_a_file: diag(18026, DiagnosticCategory.Error, "can_only_be_used_at_the_start_of_a_file_18026", "'#!' can only be used at the start of a file."), + Compiler_reserves_name_0_when_emitting_private_identifier_downlevel: diag(18027, DiagnosticCategory.Error, "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027", "Compiler reserves name '{0}' when emitting private identifier downlevel."), + Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher: diag(18028, DiagnosticCategory.Error, "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028", "Private identifiers are only available when targeting ECMAScript 2015 and higher."), + Private_identifiers_are_not_allowed_in_variable_declarations: diag(18029, DiagnosticCategory.Error, "Private_identifiers_are_not_allowed_in_variable_declarations_18029", "Private identifiers are not allowed in variable declarations."), + An_optional_chain_cannot_contain_private_identifiers: diag(18030, DiagnosticCategory.Error, "An_optional_chain_cannot_contain_private_identifiers_18030", "An optional chain cannot contain private identifiers."), + The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents: diag(18031, DiagnosticCategory.Error, "The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031", "The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents."), + The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some: diag(18032, DiagnosticCategory.Error, "The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032", "The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some."), + Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values: diag(18033, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033", "Type '{0}' is not assignable to type '{1}' as required for computed enum member values."), + Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment: diag(18034, DiagnosticCategory.Message, "Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034", "Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."), + Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name: diag(18035, DiagnosticCategory.Error, "Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035", "Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."), + Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator: diag(18036, DiagnosticCategory.Error, "Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036", "Class decorators can't be used with static private identifier. Consider removing the experimental decorator."), + Await_expression_cannot_be_used_inside_a_class_static_block: diag(18037, DiagnosticCategory.Error, "Await_expression_cannot_be_used_inside_a_class_static_block_18037", "Await expression cannot be used inside a class static block."), + For_await_loops_cannot_be_used_inside_a_class_static_block: diag(18038, DiagnosticCategory.Error, "For_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'For await' loops cannot be used inside a class static block."), + Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block: diag(18039, DiagnosticCategory.Error, "Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039", "Invalid use of '{0}'. It cannot be used inside a class static block."), + A_return_statement_cannot_be_used_inside_a_class_static_block: diag(18041, DiagnosticCategory.Error, "A_return_statement_cannot_be_used_inside_a_class_static_block_18041", "A 'return' statement cannot be used inside a class static block."), + _0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation: diag(18042, DiagnosticCategory.Error, "_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042", "'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."), + Types_cannot_appear_in_export_declarations_in_JavaScript_files: diag(18043, DiagnosticCategory.Error, "Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043", "Types cannot appear in export declarations in JavaScript files."), + _0_is_automatically_exported_here: diag(18044, DiagnosticCategory.Message, "_0_is_automatically_exported_here_18044", "'{0}' is automatically exported here."), + Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher: diag(18045, DiagnosticCategory.Error, "Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045", "Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."), + _0_is_of_type_unknown: diag(18046, DiagnosticCategory.Error, "_0_is_of_type_unknown_18046", "'{0}' is of type 'unknown'."), + _0_is_possibly_null: diag(18047, DiagnosticCategory.Error, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."), + _0_is_possibly_undefined: diag(18048, DiagnosticCategory.Error, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."), + _0_is_possibly_null_or_undefined: diag(18049, DiagnosticCategory.Error, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."), + The_value_0_cannot_be_used_here: diag(18050, DiagnosticCategory.Error, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."), +}; \ No newline at end of file diff --git a/external-declarations/src/test-runner/tsc-infrastructure/io.ts b/external-declarations/src/test-runner/tsc-infrastructure/io.ts index 4cbc6c8020c18..2cdda290ccb4c 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/io.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/io.ts @@ -32,8 +32,6 @@ export interface IO { joinPath(...components: string[]): string } -export let IO: IO; - // harness always uses one kind of new line // But note that `parseTestData` in `fourslash.ts` uses "\n" const harnessNewLine = "\r\n"; @@ -163,4 +161,4 @@ function createNodeIO(): IO { } -IO = createNodeIO(); +export const IO = createNodeIO(); diff --git a/external-declarations/src/test-runner/tsc-infrastructure/options.ts b/external-declarations/src/test-runner/tsc-infrastructure/options.ts index 76ace5a8ac6fb..4427c9ee8a738 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/options.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/options.ts @@ -3,8 +3,7 @@ import { CompilerOptionsValue, Diagnostic,DiagnosticMessage, ImportsNotUsedAsValues, JsxEmit, ModuleDetectionKind, ModuleKind, ModuleResolutionKind, NewLineKind, PollingWatchKind, ScriptTarget, WatchDirectoryKind, WatchFileKind } from "typescript"; -import { isNullOrUndefined } from "../../compiler/lang-utils"; -import { getEntries, mapDefined, startsWith, trimString } from "../../compiler/lang-utils"; +import { getEntries, isNullOrUndefined, mapDefined, startsWith, trimString } from "../../compiler/lang-utils"; import { Diagnostics } from "./diagnosticInformationMap.generated"; const jsxOptionMap = new Map(getEntries({ diff --git a/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts b/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts index 448ffa60c5900..fe3edb79a72e6 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts @@ -3,7 +3,7 @@ import { Path } from "typescript"; import { find, forEach, orderedRemoveItemAt } from "../../compiler/lang-utils"; import { getBaseFileName, getDirectoryPath, getNormalizedAbsolutePath, normalizePath } from "../../compiler/path-utils"; -import * as vfs from "./vfs"; +import * as vfs from "./vfs"; /** all the necessary information to set the right compiler settings */ export interface CompilerSettings { diff --git a/external-declarations/src/test-runner/tsc-infrastructure/vfs.ts b/external-declarations/src/test-runner/tsc-infrastructure/vfs.ts index eec156b2028f7..54117040dfda0 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/vfs.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/vfs.ts @@ -1248,7 +1248,7 @@ export function createResolver(host: FileSystemResolverHost): FileSystemResolver } }; } -namespace sys { +namespace sys { const Buffer: { new (input: string, encoding?: string): any; from?(input: string, encoding?: string): any; diff --git a/external-declarations/src/test-runner/utils.ts b/external-declarations/src/test-runner/utils.ts index c8b3c5670c67b..046eeee069af6 100644 --- a/external-declarations/src/test-runner/utils.ts +++ b/external-declarations/src/test-runner/utils.ts @@ -42,7 +42,7 @@ export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings declaration: "true", // declarationMap: "true", removeComments: "false", - }, settings, undefined); + }, settings); return caseData.testUnitData .filter(isRelevantTestFile) @@ -86,7 +86,11 @@ export function runIsolated(caseData: TestCaseParser.TestCaseContent, libFiles: const results = caseData.testUnitData .filter(isRelevantTestFile) .map(file => { - const sourceFile = ts.createSourceFile(toSrc(file.name), Utils.removeByteOrderMark(file.content), settings.target ?? ts.ScriptTarget.ES2015, true, + const sourceFile = ts.createSourceFile( + toSrc(file.name), + Utils.removeByteOrderMark(file.content), + settings.target ?? ts.ScriptTarget.ES2015, + /*setParentNodes*/ true, file.name.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS); const declaration = transformFile(sourceFile, projectFiles, libs, settings, packageResolution); return { diff --git a/external-declarations/src/utils/cli-parser.ts b/external-declarations/src/utils/cli-parser.ts index d49b369f7ce79..5ba27b877a8a9 100644 --- a/external-declarations/src/utils/cli-parser.ts +++ b/external-declarations/src/utils/cli-parser.ts @@ -1,3 +1,4 @@ +import { hasProperty } from "../compiler/lang-utils"; type ArgTypeParser = (name: string, value: string | undefined, existingValue: T | undefined) => T; @@ -103,7 +104,7 @@ export function parseArgs>(a else { const flagParam =/--(?.*)/.exec(arg); if (flagParam) { - parseArgument(flagParam.groups?.name!, undefined); + parseArgument(flagParam.groups?.name!, /*value*/ undefined); } else { parseArgument("default", arg); @@ -113,7 +114,7 @@ export function parseArgs>(a for(const key of Object.keys(types)) { const cfg = types[key]; - if(!(key in config) && "required" in cfg && cfg.required) { + if(!(hasProperty(config, key)) && typeof cfg !== "function" && cfg.required) { diagnostics.push(`Parameters ${key} is required`); } } diff --git a/external-declarations/src/utils/fs-utils.ts b/external-declarations/src/utils/fs-utils.ts index 5ba30aa3583f4..6c324b3c724ab 100644 --- a/external-declarations/src/utils/fs-utils.ts +++ b/external-declarations/src/utils/fs-utils.ts @@ -43,7 +43,7 @@ export function readAllFiles(path: string, regex: RegExp): string[] { // If there are no "includes", then just put everything in results[0]. const results: string[] = []; const visited = new Map(); - const toCanonical = createGetCanonicalFileName(false); + const toCanonical = createGetCanonicalFileName(/*useCaseSensitiveFileNames*/ false); visitDirectory(path, path); diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 9a704052e8f6c..297f40ed83bf2 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -46669,7 +46669,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { }); } function isSyntheticTypeEquivalent( - actualNode: Node, + actualNode: Node, syntheticNode: TypeNode, headMessage: DiagnosticMessage, ): true | Diagnostic[] { @@ -46678,16 +46678,14 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { let syntheticTypeNodeContainer: Node = syntheticNode; if(isActualNodeFunctionLike) { - const fakeParameter = factory.createParameterDeclaration( undefined, undefined, "__p", undefined, syntheticNode); - fakeParameter.symbol = createSymbol(SymbolFlags.Variable, "__p" as __String) + const fakeParameter = factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "__p", /*questionToken*/ undefined, syntheticNode); + fakeParameter.symbol = createSymbol(SymbolFlags.Variable, "__p" as __String); syntheticTypeNodeContainer = fakeParameter; } - setParent(syntheticNode, actualNode); bindSyntheticTypeNode(syntheticNode, actualNode, compilerOptions); - setParent(syntheticNode, syntheticTypeNodeContainer); setParent(syntheticTypeNodeContainer, actualNode); checkSourceElement(syntheticNode); @@ -46695,31 +46693,32 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const prevDeferredDiagnosticsCallbacksLength = deferredDiagnosticsCallbacks.length; const syntheticType = getTypeOfNode(syntheticNode); const actualNodeType = getTypeOfNode(actualNode); - + let actualType; if(isActualNodeFunctionLike) { const signatures = getSignaturesOfType(actualNodeType, SignatureKind.Call); actualType = signatures.length === 0? actualNodeType: getReturnTypeOfSignature(signatures[0]); } else { - actualType = actualNodeType + actualType = actualNodeType; } - const errors: Diagnostic[] = [] + const errors: Diagnostic[] = []; try { - const resultOneWay = checkTypeRelatedTo(actualType, syntheticType, strictSubtypeRelation, actualNode, headMessage, undefined, { errors }); - + const resultOneWay = checkTypeRelatedTo(actualType, syntheticType, strictSubtypeRelation, actualNode, headMessage, /*containingMessageChain*/ undefined, { errors }); + if(!resultOneWay) { return errors; } - const resultReveresed = checkTypeRelatedTo(syntheticType, actualType, strictSubtypeRelation, actualNode, headMessage, undefined, { errors }); - + const resultReveresed = checkTypeRelatedTo(syntheticType, actualType, strictSubtypeRelation, actualNode, headMessage, /*containingMessageChain*/ undefined, { errors }); + if(!resultReveresed) { return errors; } return true; - } finally { + } + finally { deferredDiagnosticsCallbacks.length = prevDeferredDiagnosticsCallbacksLength; } } diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 4bb366bc252c3..336384e4f1a9a 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -298,7 +298,7 @@ export function transformDeclarations(context: TransformationContext) { let lateStatementReplacementMap: Map>; let suppressNewDiagnosticContexts: boolean; let exportedModulesFromDeclarationEmit: Symbol[] | undefined; - let localInferenceTargetNode: Node | undefined = undefined; + let localInferenceTargetNode: Node | undefined; const { factory } = context; const host = context.getEmitHost(); @@ -340,9 +340,9 @@ export function transformDeclarations(context: TransformationContext) { return oldNode; }, checkEntityNameVisibility(name, container) { - return checkEntityNameVisibility(name, container ?? enclosingDeclaration) + return checkEntityNameVisibility(name, container ?? enclosingDeclaration); }, - }) + }); const options = context.getCompilerOptions(); const { noResolve, stripInternal } = options; const isolatedDeclarations = options.isolatedDeclarations; @@ -807,7 +807,7 @@ export function transformDeclarations(context: TransformationContext) { } if (isolatedDeclarations) { if (type === undefined && localInferenceResolver) { - return localInferenceResolver.fromInitializer(node, currentSourceFile) + return localInferenceResolver.fromInitializer(node, currentSourceFile); } return visitNode(type, visitDeclarationSubtree, isTypeNode); } diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 7b6815b45ea84..a6a4b51d66574 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -3,14 +3,14 @@ import { findIndex } from "../../core"; import { Debug } from "../../debug"; import { Diagnostics } from "../../diagnosticInformationMap.generated"; import { setCommentRange } from "../../factory/emitNode"; -import { isIdentifier, isPropertyAccessExpression, isQualifiedName, isGetAccessorDeclaration, isSetAccessorDeclaration, isTypeParameterDeclaration, isTypeReferenceNode, isLiteralTypeNode, isNoSubstitutionTemplateLiteral, isStringLiteral, isSpreadElement, isOmittedExpression, isComputedPropertyName, isMethodDeclaration, isPropertyAssignment, isShorthandPropertyAssignment, isSpreadAssignment, isNumericLiteral, isMethodSignature, isPropertySignature, isArrayTypeNode, isTypeLiteralNode, isFunctionTypeNode, isConstructorTypeNode, isTypeQueryNode, isBlock, isReturnStatement, isYieldExpression, isExpressionStatement, isBinaryExpression, isExportAssignment, isParameter, isVariableDeclaration, isVariableStatement, isSourceFile, isPropertyDeclaration, isFunctionDeclaration, isElementAccessExpression } from "../../factory/nodeTests"; +import { isArrayTypeNode, isBinaryExpression, isBlock, isComputedPropertyName, isConstructorTypeNode, isElementAccessExpression,isExportAssignment, isExpressionStatement, isFunctionDeclaration, isFunctionTypeNode, isGetAccessorDeclaration, isIdentifier, isLiteralTypeNode, isMethodDeclaration, isMethodSignature, isNoSubstitutionTemplateLiteral, isNumericLiteral, isOmittedExpression, isParameter, isPropertyAccessExpression, isPropertyAssignment, isPropertyDeclaration, isPropertySignature, isQualifiedName, isReturnStatement, isSetAccessorDeclaration, isShorthandPropertyAssignment, isSourceFile, isSpreadAssignment, isSpreadElement, isStringLiteral, isTypeLiteralNode, isTypeParameterDeclaration, isTypeQueryNode, isTypeReferenceNode, isVariableDeclaration, isVariableStatement, isYieldExpression } from "../../factory/nodeTests"; import { setTextRange } from "../../factory/utilitiesPublic"; -import { forEachChildRecursively, forEachChild } from "../../parser"; +import { forEachChild,forEachChildRecursively } from "../../parser"; import { nullTransformationContext } from "../../transformer"; -import { TypeNode, Node, EntityName, EntityNameOrEntityNameExpression, NodeFlags, NodeArray, ObjectLiteralElementLike, SetAccessorDeclaration, GetAccessorDeclaration, SyntaxKind, ParenthesizedExpression, QualifiedName, Identifier, CallExpression, NewExpression, FunctionExpression, ArrowFunction, SatisfiesExpression, AsExpression, TypeAssertion, PrefixUnaryExpression, TemplateExpression, TemplateLiteralTypeSpan, ArrayLiteralExpression, ObjectLiteralExpression, TypeElement, Modifier, ConditionalExpression, LiteralExpression, KeywordTypeSyntaxKind, TypeReferenceNode, MethodSignature, PropertySignature, LiteralTypeNode, TypeLiteralNode, SignatureDeclaration, ParameterDeclaration, NodeWithTypeArguments, PropertyName, ModifierFlags, FunctionLikeDeclaration, ReturnStatement, YieldExpression, Statement, Visitor, ExportAssignment, DiagnosticWithLocation, VisitResult, SourceFile, HasInferredType, TransformationContext } from "../../types"; -import { setParent, isEntityNameExpression, getTokenPosOfNode, getSyntacticModifierFlags, getEffectiveModifierFlags, createDiagnosticForNode } from "../../utilities"; -import { isTypeNode, isPropertyName, isClassLike, isFunctionLike, isExpression } from "../../utilitiesPublic"; -import { visitNode, visitNodes, visitEachChild } from "../../visitorPublic"; +import { ArrayLiteralExpression, ArrowFunction, AsExpression, CallExpression, ConditionalExpression, DiagnosticWithLocation, EntityName, EntityNameOrEntityNameExpression, ExportAssignment, FunctionExpression, FunctionLikeDeclaration, GetAccessorDeclaration, HasInferredType, Identifier, KeywordTypeSyntaxKind, LiteralExpression, LiteralTypeNode, MethodSignature, Modifier, ModifierFlags, NewExpression, Node, NodeArray, NodeFlags, NodeWithTypeArguments, ObjectLiteralElementLike, ObjectLiteralExpression, ParameterDeclaration, ParenthesizedExpression, PrefixUnaryExpression, PropertyName, PropertySignature, QualifiedName, ReturnStatement, SatisfiesExpression, SetAccessorDeclaration, SignatureDeclaration, SourceFile, Statement, SyntaxKind, TemplateExpression, TemplateLiteralTypeSpan, TransformationContext,TypeAssertion, TypeElement, TypeLiteralNode, TypeNode, TypeReferenceNode, Visitor, VisitResult, YieldExpression } from "../../types"; +import { createDiagnosticForNode,getEffectiveModifierFlags, getSyntacticModifierFlags, getTokenPosOfNode, isEntityNameExpression, setParent } from "../../utilities"; +import { isClassLike, isExpression,isFunctionLike, isPropertyName, isTypeNode } from "../../utilitiesPublic"; +import { visitEachChild,visitNode, visitNodes } from "../../visitorPublic"; const NO_LOCAL_INFERENCE = !!process.env.NO_LOCAL_INFERENCE; enum NarrowBehavior { @@ -69,7 +69,8 @@ export function createLocalInferenceResolver({ } reportIsolatedDeclarationError(node); return makeInvalidType(); - } finally { + } + finally { currentSourceFile = oldSourceFile; } }, @@ -124,7 +125,7 @@ export function createLocalInferenceResolver({ if (typeNode && typeNode.parent !== parent) { setParent(typeNode, parent); // Ensure no non synthetic nodes make it in here - Debug.assert(typeNode.flags & NodeFlags.Synthesized) + Debug.assert(typeNode.flags & NodeFlags.Synthesized); forEachChildRecursively(typeNode, (child, parent) => { Debug.assert(typeNode.flags & NodeFlags.Synthesized); if (child.parent === parent) { @@ -138,10 +139,11 @@ export function createLocalInferenceResolver({ function visitSyntheticType(typeNode: TypeNode, node: Node) { const previousLocalInferenceTargetNode = setLocalInferenceTargetNode(node); try { - let visitedNode = visitNode(finalizeSyntheticTypeNode(typeNode, node), visitDeclarationSubtree, isSyntheticTypeNode); + const visitedNode = visitNode(finalizeSyntheticTypeNode(typeNode, node), visitDeclarationSubtree, isSyntheticTypeNode); Debug.assert(visitedNode); return visitedNode; - } finally { + } + finally { setLocalInferenceTargetNode(previousLocalInferenceTargetNode); } } @@ -170,27 +172,27 @@ export function createLocalInferenceResolver({ otherAccessor, getAccessor, setAccessor, - } + }; } function inferAccessorType(getAccessor?: GetAccessorDeclaration, setAccessor?: SetAccessorDeclaration): LocalTypeInfo { if(getAccessor?.type){ return regular( - deepClone(visitType(getAccessor.type, getAccessor)), + deepClone(visitType(getAccessor.type, getAccessor)), getAccessor ); - }; + } if (setAccessor && setAccessor.parameters[0]?.type) { const parameterType = setAccessor.parameters[0].type; return regular( - deepClone(visitType(parameterType, setAccessor)), + deepClone(visitType(parameterType, setAccessor)), setAccessor ); } if (getAccessor) { - const localPropType = inferReturnType(getAccessor) + const localPropType = inferReturnType(getAccessor); return localPropType; } @@ -210,7 +212,7 @@ export function createLocalInferenceResolver({ typeNode, node, LocalTypeInfoFlags.Optimistic - ) + ); case SyntaxKind.PropertyAccessExpression: if (isEntityNameExpression(node)) { const typeNode = visitSyntheticType(factory.createTypeQueryNode( @@ -220,7 +222,7 @@ export function createLocalInferenceResolver({ typeNode, node, LocalTypeInfoFlags.Optimistic - ) + ); } break; case SyntaxKind.Identifier: { @@ -229,9 +231,9 @@ export function createLocalInferenceResolver({ } const typeNode = visitSyntheticType(factory.createTypeQueryNode( deepClone(node as Identifier) - ), node) + ), node); - return regular(typeNode, node, LocalTypeInfoFlags.Optimistic) + return regular(typeNode, node, LocalTypeInfoFlags.Optimistic); } case SyntaxKind.NullKeyword: if (strictNullChecks) { @@ -250,20 +252,22 @@ export function createLocalInferenceResolver({ factory.createKeywordTypeNode(SyntaxKind.SymbolKeyword) ), node - ) - } else { + ); + } + else { return regular( factory.createKeywordTypeNode(SyntaxKind.SymbolKeyword), node - ) + ); } } + break; case SyntaxKind.NewExpression: const newExpr = node as NewExpression; if (isEntityNameExpression(newExpr.expression)) { const typeNode = visitSyntheticType(factory.createTypeReferenceNode( entityNameExpressionToQualifiedName(newExpr.expression), - visitNodes(newExpr.typeArguments, deepClone, isTypeNode)! + visitNodes(newExpr.typeArguments, deepClone, isTypeNode) ), node); // Optimistic since the constructor might not have the same name as the type return regular(typeNode, node, LocalTypeInfoFlags.Optimistic); @@ -281,7 +285,7 @@ export function createLocalInferenceResolver({ returnType.typeNode, ); // If the return type is optimistic, teh whole function type is optimistic - const flags = mergeFlags(LocalTypeInfoFlags.None, returnType.flags) + const flags = mergeFlags(LocalTypeInfoFlags.None, returnType.flags); return regular(fnTypeNode, node, flags); } finally { @@ -289,7 +293,7 @@ export function createLocalInferenceResolver({ } case SyntaxKind.SatisfiesExpression: { const typeNode = localInference((node as SatisfiesExpression).expression); - return { ...typeNode, flags: typeNode.flags | LocalTypeInfoFlags.Optimistic } + return { ...typeNode, flags: typeNode.flags | LocalTypeInfoFlags.Optimistic }; } case SyntaxKind.TypeAssertionExpression: case SyntaxKind.AsExpression: @@ -320,22 +324,23 @@ export function createLocalInferenceResolver({ case SyntaxKind.MinusToken: return fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node); case SyntaxKind.PlusToken: - return fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node);; + return fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node); } + break; case SyntaxKind.BigIntLiteral: if (prefixOp.operator === SyntaxKind.MinusToken) { - return fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node);; + return fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node); } } } - + if(prefixOp.operator === SyntaxKind.PlusToken) { - return fresh(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), node) + return fresh(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), node); } else if(prefixOp.operator === SyntaxKind.MinusToken) { return prefixOp.operand.kind === SyntaxKind.BigIntLiteral? fresh(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword), node): - fresh(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), node) + fresh(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), node); } } break; @@ -354,7 +359,7 @@ export function createLocalInferenceResolver({ typeNode, span.literal ); - flags = mergeFlags(flags, typeFlags) + flags = mergeFlags(flags, typeFlags); templateSpans.push(literalSpan); } return regular( @@ -383,7 +388,7 @@ export function createLocalInferenceResolver({ let inheritedArrayTypeFlags = LocalTypeInfoFlags.None; for (const element of arrayLiteral.elements) { if (isSpreadElement(element)) { - const spreadType = localInference(element.expression, nextInferenceFlags) + const spreadType = localInference(element.expression, nextInferenceFlags); const elementTypeNode = inferenceFlags & NarrowBehavior.AsConst ? factory.createRestTypeNode(spreadType.typeNode) : factory.createIndexedAccessTypeNode(spreadType.typeNode, factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)); @@ -396,8 +401,9 @@ export function createLocalInferenceResolver({ elementTypesInfo.push( createUndefinedTypeNode(element) ); - } else { - const elementType = localInference(element, nextInferenceFlags) + } + else { + const elementType = localInference(element, nextInferenceFlags); inheritedArrayTypeFlags = mergeFlags(inheritedArrayTypeFlags, elementType.flags); elementTypesInfo.push(elementType); } @@ -426,7 +432,7 @@ export function createLocalInferenceResolver({ let addedIntersections: TypeNode[] | undefined; for (let propIndex = 0, length = objectLiteral.properties.length; propIndex < length; propIndex++) { - const prop = objectLiteral.properties[propIndex] + const prop = objectLiteral.properties[propIndex]; if (prop.name && isComputedPropertyName(prop.name) && isEntityNameExpression(prop.name.expression)) { checkEntityNameVisibility(prop.name.expression, prop); } @@ -463,7 +469,8 @@ export function createLocalInferenceResolver({ returnType.typeNode, ); } - } finally { + } + finally { setEnclosingDeclarations(oldEnclosingDeclaration); } } @@ -499,7 +506,7 @@ export function createLocalInferenceResolver({ const { typeNode, flags: spreadTypeFlags } = localInference(prop.expression, nextInferenceFlags); // Spread types are always optimistic inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, spreadTypeFlags) | LocalTypeInfoFlags.Optimistic; - addedIntersections.push(typeNode) + addedIntersections.push(typeNode); } else { if (isGetAccessorDeclaration(prop) || isSetAccessorDeclaration(prop)) { @@ -508,9 +515,9 @@ export function createLocalInferenceResolver({ const { getAccessor, setAccessor, otherAccessorIndex } = getAccessorInfo(objectLiteral.properties, prop); if (otherAccessorIndex === -1 || otherAccessorIndex > propIndex) { const accessorType = inferAccessorType(getAccessor, setAccessor); - const modifiers: Modifier[] = [] + const modifiers: Modifier[] = []; if (!setAccessor) { - modifiers.push(factory.createModifier(SyntaxKind.ReadonlyKeyword)) + modifiers.push(factory.createModifier(SyntaxKind.ReadonlyKeyword)); } inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, accessorType.flags); newProp = factory.createPropertySignature( @@ -520,10 +527,12 @@ export function createLocalInferenceResolver({ accessorType.typeNode, ); } - } else { + } + else { return invalid(prop); } - } else { + } + else { return invalid(prop); } } @@ -539,13 +548,13 @@ export function createLocalInferenceResolver({ setTextRange(newProp, { pos: prevPos, end: newProp.name.end, - }) + }); setCommentRange(newProp, { pos: prevPos, end: newProp.name.pos - }) + }); - properties.push(newProp) + properties.push(newProp); } } @@ -563,7 +572,7 @@ export function createLocalInferenceResolver({ const types = [ localInference(conditionalExpression.whenTrue, inferenceFlags & ~NarrowBehavior.AsConst), localInference(conditionalExpression.whenFalse, inferenceFlags & ~NarrowBehavior.AsConst), - ] + ]; return makeUnionFromTypes(node, types, /*widenSingle*/ false); } @@ -611,7 +620,7 @@ export function createLocalInferenceResolver({ else { return fresh( typeof baseType === "number" ? factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType), - node, + node, flags ); } @@ -621,7 +630,7 @@ export function createLocalInferenceResolver({ } function makeInvalidTypeAndReport(node: Node) { reportIsolatedDeclarationError(node); - return makeInvalidType() as TypeReferenceNode; + return makeInvalidType() ; } function visitType(type: TypeNode | undefined, owner: Node) { const visitedType = visitNode(type, visitDeclarationSubtree, isTypeNode); @@ -633,10 +642,10 @@ export function createLocalInferenceResolver({ return "I:" + name.escapedText; } if (isStringLiteral(name)) { - return "S:" + name.text + return "S:" + name.text; } if (isNumericLiteral(name)) { - return "N:" + (+name.text) + return "N:" + (+name.text); } if (isComputedPropertyName(name)) { let fullId = "C:"; @@ -661,7 +670,7 @@ export function createLocalInferenceResolver({ return undefined; } function getMemberKey(member: MethodSignature | PropertySignature | GetAccessorDeclaration | SetAccessorDeclaration) { - return getMemberNameKey(member.name) + return getMemberNameKey(member.name); } function getWidenedType(localTypeInfo: LocalTypeInfo) { @@ -680,10 +689,10 @@ export function createLocalInferenceResolver({ return localTypeInfo.typeNode; } function makeUnionFromTypes(sourceNode: Node, types: LocalTypeInfo[], widenSingle: boolean) { - let [unionConstituents, flags] = deduplicateUnion(types); + const [unionConstituents, flags] = deduplicateUnion(types); if (unionConstituents.length === 1) { const localType = unionConstituents[0]; - + return widenSingle ? { ...localType, typeNode: getWidenedType(localType) } : localType; } const unionConstituentsTypes = collapseLiteralTypesIntoBaseTypes(unionConstituents); @@ -850,7 +859,7 @@ export function createLocalInferenceResolver({ let implicitAnyNode: LocalTypeInfo | undefined; let mergedUnionFlags = LocalTypeInfoFlags.None; for (const node of nodes) { - mergedUnionFlags = mergeFlags(mergedUnionFlags, node.flags) + mergedUnionFlags = mergeFlags(mergedUnionFlags, node.flags); // Do not add implicit any unless it's the only type in the array if (!strictNullChecks && node.flags & LocalTypeInfoFlags.ImplicitAny) { implicitAnyNode = node; @@ -921,7 +930,7 @@ export function createLocalInferenceResolver({ return a.parameters.every((aParam, index) => isParameterEqual(aParam, b.parameters[index])); - // Isolated declarations finish equality + // Isolated declarations finish equality function isParameterEqual(a: ParameterDeclaration, b: ParameterDeclaration) { if (!!a.questionToken !== !!b.questionToken) { return false; @@ -937,7 +946,7 @@ export function createLocalInferenceResolver({ return false; } - return !!a.typeArguments?.every((aArg, index) => typesEqual(aArg, aErrorTarget, b.typeArguments?.[index], bErrorTarget)) + return !!a.typeArguments?.every((aArg, index) => typesEqual(aArg, aErrorTarget, b.typeArguments?.[index], bErrorTarget)); } function typesEqual(a: TypeNode | undefined, aErrorTarget: Node | undefined, b: TypeNode | undefined, bErrorTarget: Node | undefined): boolean { if (a === undefined || b === undefined) return a === b; @@ -1017,7 +1026,7 @@ export function createLocalInferenceResolver({ } } else if (bIsMethod && isMethodSignature(aMember)) { - return signatureEqual(aMember, aErrorTarget, bMember, bErrorTarget) + return signatureEqual(aMember, aErrorTarget, bMember, bErrorTarget); } } else { @@ -1089,7 +1098,7 @@ export function createLocalInferenceResolver({ allProps.set(memberKey, propInfo); } propInfo.types[i] = type; - propInfo.isReadonly ||= !!(getSyntacticModifierFlags(member) & ModifierFlags.Readonly) + propInfo.isReadonly ||= !!(getSyntacticModifierFlags(member) & ModifierFlags.Readonly); typeLookup.set(memberKey, type); } else { @@ -1163,7 +1172,7 @@ export function createLocalInferenceResolver({ if (!isBlock(node.body)) { returnType = makeUnionFromTypes(node, [ localInference(node.body, NarrowBehavior.KeepLiterals) - ], true); + ], /*widenSingle*/ true); } else { collectReturnAndYield(node.body, returnStatements, yieldExpressions); @@ -1191,19 +1200,21 @@ export function createLocalInferenceResolver({ function inferFromOutputs(node: Node, statements: (YieldExpression | ReturnStatement)[], emptyType: KeywordTypeSyntaxKind) { const returnStatementInference: LocalTypeInfo[] = []; let hasOnlyEmpty = true; - for (let r of statements) { + for (const r of statements) { if (r.expression) { returnStatementInference.push(localInference(r.expression, NarrowBehavior.KeepLiterals)); hasOnlyEmpty = false; - } else { + } + else { returnStatementInference.push( createUndefinedTypeNode(r, LocalTypeInfoFlags.Fresh) ); } - }; + } if (hasOnlyEmpty) { return fresh(factory.createKeywordTypeNode(emptyType), node); - } else { + } + else { return makeUnionFromTypes(node, returnStatementInference, /*widenSingle*/ true); } } @@ -1251,27 +1262,27 @@ export function createLocalInferenceResolver({ function inferFunctionMembers(scope: { statements: NodeArray }, functionName: Identifier, localType: LocalTypeInfo): LocalTypeInfo { if (!isFunctionTypeNode(localType.typeNode)) return localType; let mergedFlags = LocalTypeInfoFlags.None; - let members = new Map(); - for (let i = 0; i < scope.statements.length; i++) { - const statement = scope.statements[i]; + for (const statement of scope.statements) { // Looking for name functionName.member = init; if (!isExpressionStatement(statement)) continue; if(!isBinaryExpression(statement.expression)) continue; const assignment = statement.expression; if(assignment.operatorToken.kind !== SyntaxKind.EqualsToken) continue; - + const isPropertyAccess = isPropertyAccessExpression(assignment.left); if(isPropertyAccess || isElementAccessExpression(assignment.left) && isIdentifier(assignment.left.expression) && assignment.left.expression.escapedText === functionName.escapedText) { - + let name; if(isPropertyAccess) { name = deepClone(assignment.left.name); - } else { + } + else { const argumentExpression = visitNode(assignment.left.argumentExpression, visitDeclarationSubtree, isExpression)!; name = factory.createComputedPropertyName(deepClone(argumentExpression)); } @@ -1286,7 +1297,7 @@ export function createLocalInferenceResolver({ members.set(key, memberInfo = { name, type: [] - }) + }); } memberInfo.type.push(propType); } @@ -1300,15 +1311,15 @@ export function createLocalInferenceResolver({ ) ]; for(const member of members.values()) { - const propType = makeUnionFromTypes(member.name, member.type, false); + const propType = makeUnionFromTypes(member.name, member.type, /*widenSingle*/ false); mergedFlags = mergeFlags(mergedFlags, propType.flags); - + factory.createPropertySignature( [], member.name, - undefined, + /*questionToken*/ undefined, propType.typeNode - ) + ); } return { sourceNode: localType.sourceNode, @@ -1316,7 +1327,7 @@ export function createLocalInferenceResolver({ typeNode: factory.createTypeLiteralNode( inferredMembers ), - } + }; } return localType; } @@ -1326,7 +1337,7 @@ export function createLocalInferenceResolver({ const clonedNode = visitEachChild(node, deepClone, nullTransformationContext, deepCloneNodes); // If node has children visitEachChild will already return a new node if (clonedNode !== node) { - return clonedNode!; + return clonedNode; } return setTextRange(factory.cloneNode(node), node); diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index b2cfcf51d53a7..802b8f4e72c1d 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -2192,10 +2192,10 @@ function getErrorSpanForArrowFunction(sourceFile: SourceFile, node: ArrowFunctio /** @internal */ export function getErrorSpanForNode(sourceFile: SourceFile, node: Node): TextSpan { - // Temporary fix + // Temporary fix if(node.flags & NodeFlags.Synthesized && node.pos < 0) { debugger; - return { start: 0, length: 0 } + return { start: 0, length: 0 }; } let errorNode: Node | undefined = node; switch (node.kind) { From 9b1faa689e43aca47f0e021c5c6d56934e5d9e65 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Thu, 13 Jul 2023 09:40:12 +0000 Subject: [PATCH 029/224] Strip off some unused logic in code-fixer 1. The check for isLiteralConstDeclaration is not need as we only fix code when there's an error message on it. 2. Method, Call, Constructor signature only exists on type annotation, and with noImplicitAny on this will already be a different error, and with that off, this will be 'any' type so no need to annotate types. 3. Construtctors don't require type annotation 4. The 'missing type' error does not trigger on export assigments Signed-off-by: Hana Joo --- .../src/code-mod/code-transform.ts | 104 +----------------- 1 file changed, 3 insertions(+), 101 deletions(-) diff --git a/external-declarations/src/code-mod/code-transform.ts b/external-declarations/src/code-mod/code-transform.ts index caa8f15f47266..817adfa80eae4 100644 --- a/external-declarations/src/code-mod/code-transform.ts +++ b/external-declarations/src/code-mod/code-transform.ts @@ -29,24 +29,6 @@ function sortDiagnostics(a: ts.Diagnostic, b: ts.Diagnostic) { return 1; } -function isVarConst(node: ts.VariableDeclaration | ts.VariableDeclarationList): boolean { - return !!(ts.getCombinedNodeFlags(node) & ts.NodeFlags.Const); -} - -function isDeclarationReadonly(declaration: ts.Declaration): boolean { - return !!(ts.getCombinedModifierFlags(declaration) & ts.ModifierFlags.Readonly && !ts.isParameterPropertyDeclaration(declaration, declaration.parent)); -} - -function isLiteralConstDeclaration(node: ts.VariableDeclaration | ts.PropertyDeclaration | ts.PropertySignature | ts.ParameterDeclaration): boolean { - if (isDeclarationReadonly(node) || ts.isVariableDeclaration(node) && isVarConst(node)) { - // TODO: Make sure this is a valid approximation for literal types - return !node.type && hasProperty(node, "initializer") && !!node.initializer && ts.isLiteralExpression(node.initializer); - // Original TS version - // return isFreshLiteralType(getTypeOfSymbol(getSymbolOfNode(node))); - } - return false; -} - function tryGetReturnType(typeChecker: ts.TypeChecker, node: ts.SignatureDeclaration): ts.Type | undefined { const signature = typeChecker.getSignatureFromDeclaration(node); if (signature) { @@ -147,7 +129,7 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: break; case ts.SyntaxKind.VariableDeclaration: const variableDeclaration = node as ts.VariableDeclaration; - if (!variableDeclaration.type && !isLiteralConstDeclaration(variableDeclaration)) { + if (!variableDeclaration.type) { const type = typeChecker.getTypeAtLocation(variableDeclaration); const typeNode = typeToTypeNode(type, variableDeclaration); return ts.factory.updateVariableDeclaration( @@ -180,7 +162,7 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: break; case ts.SyntaxKind.PropertySignature: const propertySignature = node as ts.PropertySignature; - if(!propertySignature.type && !isLiteralConstDeclaration(propertySignature)) { + if(!propertySignature.type) { const type = typeChecker.getTypeAtLocation(node); const typeNode = typeToTypeNode(type, node); return ts.factory.updatePropertySignature( @@ -194,7 +176,7 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: break; case ts.SyntaxKind.PropertyDeclaration: const propDecl = node as ts.PropertyDeclaration; - if(!propDecl.type && !isLiteralConstDeclaration(propDecl)) { + if(!propDecl.type) { const type = typeChecker.getTypeAtLocation(node); const typeNode = typeToTypeNode(type, propDecl); return ts.factory.updatePropertyDeclaration( @@ -207,37 +189,6 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: ); } break; - case ts.SyntaxKind.MethodSignature: - const methodSignature = node as ts.MethodSignature; - if(!methodSignature.type) { - const type = tryGetReturnType(typeChecker, methodSignature); - if(type) { - const typeNode = typeToTypeNode(type, node); - return ts.factory.updateMethodSignature( - methodSignature, - methodSignature.modifiers, - methodSignature.name, - methodSignature.questionToken, - updateTypesInNodeArray(methodSignature.typeParameters), - updateTypesInNodeArray(methodSignature.parameters), - typeNode, - ); - } - } - break; - case ts.SyntaxKind.CallSignature: - const callSignature = node as ts.CallSignatureDeclaration; - const type = tryGetReturnType(typeChecker, callSignature); - if(type) { - const typeNode = typeToTypeNode(type, node); - return ts.factory.updateCallSignature( - callSignature, - updateTypesInNodeArray(callSignature.typeParameters), - updateTypesInNodeArray(callSignature.parameters), - typeNode, - ); - } - break; case ts.SyntaxKind.MethodDeclaration: const methodDeclaration = node as ts.MethodDeclaration; if(!methodDeclaration.type) { @@ -275,55 +226,6 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: } } break; - case ts.SyntaxKind.SetAccessor: - const setAccessor = node as ts.SetAccessorDeclaration; - if(!setAccessor.parameters[0]?.type) { - return ts.factory.updateSetAccessorDeclaration( - setAccessor, - setAccessor.modifiers, - setAccessor.name, - updateTypesInNodeArray(setAccessor.parameters), - setAccessor.body, - ); - } - break; - case ts.SyntaxKind.Constructor: - const constructor = node as ts.ConstructorDeclaration; - return ts.factory.updateConstructorDeclaration( - constructor, - constructor.modifiers, - updateTypesInNodeArray(constructor.parameters), - constructor.body, - ); - case ts.SyntaxKind.ConstructSignature: - const constructorSignature = node as ts.ConstructSignatureDeclaration; - const typeConstructor = tryGetReturnType(typeChecker, constructorSignature); - if(typeConstructor) { - const typeNode = typeToTypeNode(typeConstructor, constructorSignature); - return ts.factory.updateConstructSignature( - constructorSignature, - updateTypesInNodeArray(constructorSignature.typeParameters), - updateTypesInNodeArray(constructorSignature.parameters), - typeNode, - ); - } - break; - case ts.SyntaxKind.ExportAssignment: - const exportAssignment = node as ts.ExportAssignment; - if(exportAssignment.expression.kind !== ts.SyntaxKind.Identifier) { - const type = typeChecker.getTypeAtLocation(exportAssignment.expression); - if(type) { - const typeNode = typeToTypeNode(type, exportAssignment); - const newId = ts.factory.createIdentifier("_default"); - const varDecl = ts.factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, typeNode, /*initializer*/ undefined); - const statement = ts.factory.createVariableStatement( - [], - ts.factory.createVariableDeclarationList([varDecl], ts.NodeFlags.Const) - ); - return [statement, ts.factory.updateExportAssignment(exportAssignment, exportAssignment.modifiers, newId)]; - } - } - break; default: break; } From 50f11b3b8696dc520f0907643e2980ccf2e38e6a Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Wed, 7 Jun 2023 13:27:10 +0000 Subject: [PATCH 030/224] Add fixMissingTypeAnnotationOnExports fixer .. and also add tests. The logic was mostly copied in from the code fixer. Signed-off-by: Hana Joo --- src/services/_namespaces/ts.codefix.ts | 1 + .../fixMissingTypeAnnotationOnExports.ts | 222 ++++++++++++++++++ .../codeFixMissingTypeAnnotationOnExports.ts | 19 ++ .../codeFixMissingTypeAnnotationOnExports2.ts | 21 ++ .../codeFixMissingTypeAnnotationOnExports3.ts | 25 ++ .../codeFixMissingTypeAnnotationOnExports4.ts | 25 ++ .../codeFixMissingTypeAnnotationOnExports5.ts | 25 ++ .../codeFixMissingTypeAnnotationOnExports6.ts | 19 ++ .../codeFixMissingTypeAnnotationOnExports7.ts | 21 ++ .../codeFixMissingTypeAnnotationOnExports8.ts | 19 ++ .../codeFixMissingTypeAnnotationOnExports9.ts | 25 ++ 11 files changed, 422 insertions(+) create mode 100644 src/services/codefixes/fixMissingTypeAnnotationOnExports.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports2.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports3.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports4.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports5.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports6.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports8.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports9.ts 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/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts new file mode 100644 index 0000000000000..eb35f2c4e0efa --- /dev/null +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -0,0 +1,222 @@ +import { + Diagnostics, + factory, + FunctionDeclaration, + GetAccessorDeclaration, + getTokenAtPosition, + MethodDeclaration, + Node, + NodeArray, + NodeBuilderFlags, + ParameterDeclaration, + PropertyDeclaration, + SignatureDeclaration, + SourceFile, + SyntaxKind, + textChanges, + Type, + TypeChecker, + VariableDeclaration, +} from "../_namespaces/ts"; +import { + codeFixAll, + createCodeFixAction, + registerCodeFix, +} from "../_namespaces/ts.codefix"; + +const fixId = "fixMissingTypeAnnotationOnExports"; +const errorCodes = [ + Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.code, +]; +const canHaveExplicitTypeAnnotation = new Set([ + SyntaxKind.GetAccessor, + SyntaxKind.MethodDeclaration, + SyntaxKind.PropertyDeclaration, + SyntaxKind.FunctionDeclaration, + SyntaxKind.VariableDeclaration, + SyntaxKind.Parameter, +]); + +const declarationEmitNodeBuilderFlags = + NodeBuilderFlags.MultilineObjectLiterals | + NodeBuilderFlags.WriteClassExpressionAsTypeLiteral | + NodeBuilderFlags.UseTypeOfFunction | + NodeBuilderFlags.UseStructuralFallback | + NodeBuilderFlags.AllowEmptyTuple | + NodeBuilderFlags.GenerateNamesForShadowedTypeParams | + NodeBuilderFlags.NoTruncation; + +registerCodeFix({ + errorCodes, + fixIds: [fixId], + getCodeActions(context) { + const { sourceFile, span } = context; + const nodeWithDiag = getTokenAtPosition(sourceFile, span.start); + + const changes = textChanges.ChangeTracker.with(context, t => doChange(t, context.sourceFile, context.program.getTypeChecker(), nodeWithDiag)); + return [createCodeFixAction(fixId, changes, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit, fixId, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit)]; + }, + getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => { + const nodeWithDiag = getTokenAtPosition(diag.file, diag.start); + doChange(changes, diag.file, context.program.getTypeChecker(), nodeWithDiag); + }) +}); + +function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, typeChecker: TypeChecker, nodeWithDiag: Node): void { + const nodeWithNoType = findNearestParentWithTypeAnnotation(nodeWithDiag); + const replacedNodes = addTypeAnnotationOnNode(nodeWithNoType, typeChecker); + changes.replaceNodeWithNodes(sourceFile, nodeWithNoType, Array.isArray(replacedNodes) ? replacedNodes : [replacedNodes]); +} + +// Currently, the diagnostics for the error is not given in the exact node of which that needs type annotation +function findNearestParentWithTypeAnnotation(node: Node): Node { + while (!canHaveExplicitTypeAnnotation.has(node.kind)) { + node = node.parent; + } + return node; +} + +function addTypeAnnotationOnNode(node: Node, typeChecker: TypeChecker): Node | Node[] { + switch (node.kind) { + case SyntaxKind.Parameter: + const parameter = node as ParameterDeclaration; + const newNode = addTypeToParameterDeclaration(parameter, typeChecker); + if (newNode) { + return newNode; + } + break; + case SyntaxKind.VariableDeclaration: + const variableDeclaration = node as VariableDeclaration; + if (!variableDeclaration.type) { + const type = typeChecker.getTypeAtLocation(variableDeclaration); + const typeNode = typeToTypeNode(type, variableDeclaration, typeChecker); + return factory.updateVariableDeclaration( + variableDeclaration, + variableDeclaration.name, + /*exclamationToken*/ undefined, + typeNode, + variableDeclaration.initializer + ); + } + break; + case SyntaxKind.FunctionDeclaration: + const functionDecl = node as FunctionDeclaration; + if (!functionDecl.type) { + const type = tryGetReturnType(typeChecker, functionDecl); + if(type) { + const typeNode = typeToTypeNode(type, functionDecl, typeChecker); + return factory.updateFunctionDeclaration( + functionDecl, + functionDecl.modifiers, + functionDecl.asteriskToken, + functionDecl.name, + functionDecl.typeParameters, + updateTypesInNodeArray(functionDecl.parameters, typeChecker), + typeNode, + functionDecl.body + ); + } + } + break; + case SyntaxKind.PropertyDeclaration: + const propDecl = node as PropertyDeclaration; + if(!propDecl.type) { + const type = typeChecker.getTypeAtLocation(node); + const typeNode = typeToTypeNode(type, propDecl, typeChecker); + return factory.updatePropertyDeclaration( + propDecl, + propDecl.modifiers, + propDecl.name, + propDecl.questionToken ?? propDecl.exclamationToken, + typeNode, + propDecl.initializer + ); + } + break; + case SyntaxKind.MethodDeclaration: + const methodDeclaration = node as MethodDeclaration; + if(!methodDeclaration.type) { + const type = tryGetReturnType(typeChecker, methodDeclaration); + if(type) { + const typeNode = typeToTypeNode(type, node, typeChecker); + return factory.updateMethodDeclaration( + methodDeclaration, + methodDeclaration.modifiers, + methodDeclaration.asteriskToken, + methodDeclaration.name, + methodDeclaration.questionToken, + methodDeclaration.typeParameters, + updateTypesInNodeArray(methodDeclaration.parameters, typeChecker), + typeNode, + methodDeclaration.body, + ); + } + } + break; + case SyntaxKind.GetAccessor: + const getAccessor = node as GetAccessorDeclaration; + if(!getAccessor.type) { + const returnType = tryGetReturnType(typeChecker, getAccessor); + if(returnType) { + const typeNode = typeToTypeNode(returnType, node, typeChecker); + return factory.updateGetAccessorDeclaration( + getAccessor, + getAccessor.modifiers, + getAccessor.name, + updateTypesInNodeArray(getAccessor.parameters, typeChecker), + typeNode, + getAccessor.body, + ); + } + } + break; + default: + break; + } + throw new Error(`Cannot find a fix for the given node ${node.kind}`); +} + +function typeToTypeNode(type: Type, enclosingDeclaration: Node, typeChecker: TypeChecker) { + const typeNode = typeChecker.typeToTypeNode( + type, + enclosingDeclaration, + declarationEmitNodeBuilderFlags, + ); + return typeNode; +} + +function tryGetReturnType(typeChecker: TypeChecker, node: SignatureDeclaration): Type | undefined { + const signature = typeChecker.getSignatureFromDeclaration(node); + if (signature) { + return typeChecker.getReturnTypeOfSignature(signature); + } +} + +function updateTypesInNodeArray(nodeArray: NodeArray, typeChecker: TypeChecker): NodeArray; +function updateTypesInNodeArray(nodeArray: NodeArray | undefined, typeChecker: TypeChecker): NodeArray | undefined; +function updateTypesInNodeArray(nodeArray: NodeArray | undefined, typeChecker: TypeChecker) { + if(nodeArray === undefined) return undefined; + return factory.createNodeArray( + nodeArray.map(param => { + return addTypeToParameterDeclaration(param, typeChecker) || param; + }) + ); +} + +function addTypeToParameterDeclaration(parameter: ParameterDeclaration, typeChecker: TypeChecker): ParameterDeclaration | undefined { + if (!parameter.type) { + const type = typeChecker.getTypeAtLocation(parameter); + if (type) { + const typeNode = typeToTypeNode(type, parameter, typeChecker); + return factory.updateParameterDeclaration( + parameter, + parameter.modifiers, + parameter.dotDotDotToken, + parameter.name, + parameter.questionToken, + typeNode, + parameter.initializer + ); + } + } +} diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports.ts new file mode 100644 index 0000000000000..6884bc33b6c33 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports.ts @@ -0,0 +1,19 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////function foo() { return 42; } +////export const g = foo(); + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + index: 0, + newFileContent: +`function foo() { return 42; } +export const g: number = foo();`, +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports2.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports2.ts new file mode 100644 index 0000000000000..3de813fb6275d --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports2.ts @@ -0,0 +1,21 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////const a = 42; +////const b = 43; +////export function foo() { return a + b; } + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + index: 0, + newFileContent: +`const a = 42; +const b = 43; +export function foo(): number { return a + b; }`, +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports3.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports3.ts new file mode 100644 index 0000000000000..2c2470ea4e893 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports3.ts @@ -0,0 +1,25 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////const a = 42; +////const b = 42; +////export class C { +//// property = a + b; +////} + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + index: 0, + newFileContent: +`const a = 42; +const b = 42; +export class C { + property: number = a + b; +}`, +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports4.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports4.ts new file mode 100644 index 0000000000000..e000a46b009b6 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports4.ts @@ -0,0 +1,25 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////const a = 42; +////const b = 42; +////export class C { +//// method() { return a + b}; +////} + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + index: 0, + newFileContent: +`const a = 42; +const b = 42; +export class C { + method(): number { return a + b; }; +}`, +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports5.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports5.ts new file mode 100644 index 0000000000000..5b4abb2dd5e59 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports5.ts @@ -0,0 +1,25 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////const a = 42; +////const b = 42; +////export class C { +//// get property() { return a + b; } +////} + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + index: 0, + newFileContent: +`const a = 42; +const b = 42; +export class C { + get property(): number { return a + b; } +}`, +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports6.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports6.ts new file mode 100644 index 0000000000000..16fafc4192e17 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports6.ts @@ -0,0 +1,19 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////function foo(): number[] {return [42];} +////export const c = [...foo()]; + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + 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..e325974dc6398 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts @@ -0,0 +1,21 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////function foo(): number[] {return [42];} +////export const c = {foo: foo()}; + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + 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..72de6bcdc33da --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports8.ts @@ -0,0 +1,19 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////function foo() {return 42;} +////export const g = function () { return foo(); }; + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + index: 0, + newFileContent: +`function foo() {return 42;} +export const g: () => number = function() { return foo(); };`, +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports9.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports9.ts new file mode 100644 index 0000000000000..58bf0c0d7ea84 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports9.ts @@ -0,0 +1,25 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////function foo( ){ +//// return 42; +////} +////const a = foo(); +////export = a; + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + index: 0, + newFileContent: +`function foo( ){ + return 42; +} +const a: number = foo(); +export = a;`, +}); From cde94490109822981c24f426af173929e9c02eac Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Thu, 13 Jul 2023 11:24:00 +0000 Subject: [PATCH 031/224] Update test references Signed-off-by: Hana Joo --- .../reference/api/tsserverlibrary.d.ts | 1 + tests/baselines/reference/api/typescript.d.ts | 1 + ...cessorNoUseDefineForClassFields.errors.txt | 49 +++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 tests/baselines/reference/autoAccessorNoUseDefineForClassFields.errors.txt diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 0a8d220d4dc65..d8e11bce53d05 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -4604,6 +4604,7 @@ declare namespace ts { type HasExpressionInitializer = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | PropertyAssignment | EnumMember; type HasDecorators = ParameterDeclaration | PropertyDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ClassExpression | ClassDeclaration; type HasModifiers = TypeParameterDeclaration | ParameterDeclaration | ConstructorTypeNode | PropertySignature | PropertyDeclaration | MethodSignature | MethodDeclaration | ConstructorDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | IndexSignatureDeclaration | FunctionExpression | ArrowFunction | ClassExpression | VariableStatement | FunctionDeclaration | ClassDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | ExportAssignment | ExportDeclaration; + type HasInferredType = FunctionDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | BindingElement | ConstructSignatureDeclaration | VariableDeclaration | MethodSignature | CallSignatureDeclaration | ParameterDeclaration | PropertyDeclaration | PropertySignature; interface NodeArray extends ReadonlyArray, ReadonlyTextRange { readonly hasTrailingComma: boolean; } diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 3acc19c4b8d65..9e0275cbda334 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -557,6 +557,7 @@ declare namespace ts { type HasExpressionInitializer = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | PropertyAssignment | EnumMember; type HasDecorators = ParameterDeclaration | PropertyDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ClassExpression | ClassDeclaration; type HasModifiers = TypeParameterDeclaration | ParameterDeclaration | ConstructorTypeNode | PropertySignature | PropertyDeclaration | MethodSignature | MethodDeclaration | ConstructorDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | IndexSignatureDeclaration | FunctionExpression | ArrowFunction | ClassExpression | VariableStatement | FunctionDeclaration | ClassDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | ExportAssignment | ExportDeclaration; + type HasInferredType = FunctionDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | BindingElement | ConstructSignatureDeclaration | VariableDeclaration | MethodSignature | CallSignatureDeclaration | ParameterDeclaration | PropertyDeclaration | PropertySignature; interface NodeArray extends ReadonlyArray, ReadonlyTextRange { readonly hasTrailingComma: boolean; } diff --git a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.errors.txt b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.errors.txt new file mode 100644 index 0000000000000..02e3da7fc0a3a --- /dev/null +++ b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.errors.txt @@ -0,0 +1,49 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/file3-2.ts(1,7): error TS2300: Duplicate identifier 'C3'. +tests/cases/conformance/classes/propertyMemberDeclarations/file3.ts(1,7): error TS2300: Duplicate identifier 'C3'. + + +==== tests/cases/conformance/classes/propertyMemberDeclarations/file1.ts (0 errors) ==== + // https://github.com/microsoft/TypeScript/issues/51528 + class C1 { + static accessor x = 0; + } + +==== tests/cases/conformance/classes/propertyMemberDeclarations/file2.ts (0 errors) ==== + class C2 { + static accessor #x = 0; + } + +==== tests/cases/conformance/classes/propertyMemberDeclarations/file3.ts (1 errors) ==== + class C3 { + ~~ +!!! error TS2300: Duplicate identifier 'C3'. +!!! related TS6203 tests/cases/conformance/classes/propertyMemberDeclarations/file3-2.ts:1:7: 'C3' was also declared here. + static accessor #x = 0; + accessor #y = 0; + } + +==== tests/cases/conformance/classes/propertyMemberDeclarations/file3-2.ts (1 errors) ==== + class C3 { + ~~ +!!! error TS2300: Duplicate identifier 'C3'. +!!! related TS6203 tests/cases/conformance/classes/propertyMemberDeclarations/file3.ts:1:7: 'C3' was also declared here. + accessor x = 0; + } + +==== tests/cases/conformance/classes/propertyMemberDeclarations/file4.ts (0 errors) ==== + class C4 { + accessor #x = 0; + } + +==== tests/cases/conformance/classes/propertyMemberDeclarations/file5.ts (0 errors) ==== + class C5 { + x = 0; + accessor #x = 1; + } + +==== tests/cases/conformance/classes/propertyMemberDeclarations/file6.ts (0 errors) ==== + class C6 { + accessor #x = 0; + x = 1; + } + \ No newline at end of file From 6e3b1d0cc4aba549c2b1647e45ed26f406594597 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Thu, 6 Jul 2023 21:10:50 +0000 Subject: [PATCH 032/224] Cover -1 as a valid literal in assignments to enum elements Signed-off-by: Hana Joo --- src/compiler/transformers/declarations.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 336384e4f1a9a..fe4c32d3e1b8d 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -135,6 +135,7 @@ import { isModuleDeclaration, isNightly, isOmittedExpression, + isPrefixUnaryExpression, isPrivateIdentifier, isPropertyAccessExpression, isPropertySignature, @@ -1816,7 +1817,7 @@ export function transformDeclarations(context: TransformationContext) { return cleanup(factory.updateEnumDeclaration(input, factory.createNodeArray(ensureModifiers(input)), input.name, factory.createNodeArray(mapDefined(input.members, m => { if (shouldStripInternal(m)) return; if (isolatedDeclarations) { - if (m.initializer && !isLiteralExpression(m.initializer)) { + if (m.initializer && (!isLiteralExpression(m.initializer) && !(isPrefixUnaryExpression(m.initializer) && isLiteralExpression(m.initializer.operand)))) { reportIsolatedDeclarationError(m); } return m; From 2776820bf1189e5cd773e21064419e7bdfe629f0 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Tue, 11 Jul 2023 16:11:21 +0000 Subject: [PATCH 033/224] Remove unused tsconfig.json Signed-off-by: Hana Joo --- external-declarations/tests/expected/tsconfig.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 external-declarations/tests/expected/tsconfig.json diff --git a/external-declarations/tests/expected/tsconfig.json b/external-declarations/tests/expected/tsconfig.json deleted file mode 100644 index 5c0ac4c34a20b..0000000000000 --- a/external-declarations/tests/expected/tsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "compilerOptions": { - "strict": true - } -} \ No newline at end of file From 54f51d33db45b2309fa3f5aaf86d893d444007e2 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Wed, 12 Jul 2023 09:40:23 +0000 Subject: [PATCH 034/224] Add a case for assigning -1 to enum elements Signed-off-by: Hana Joo --- external-declarations/tests/expected/enums.d.ts | 5 +++++ external-declarations/tests/expected/functions.d.ts | 1 + .../tests/expected/private-members-typeof.d.ts | 3 +++ external-declarations/tests/source/.gitignore | 1 + external-declarations/tests/source/enums.ts | 5 +++++ external-declarations/tests/source/private-members-typeof.ts | 2 +- 6 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 external-declarations/tests/expected/enums.d.ts create mode 100644 external-declarations/tests/expected/private-members-typeof.d.ts create mode 100644 external-declarations/tests/source/enums.ts diff --git a/external-declarations/tests/expected/enums.d.ts b/external-declarations/tests/expected/enums.d.ts new file mode 100644 index 0000000000000..f4bf27402e227 --- /dev/null +++ b/external-declarations/tests/expected/enums.d.ts @@ -0,0 +1,5 @@ +export declare enum Fruits { + PEN_PINEAPPLE_APPLE_PEN = -1, + APPLE = 0, + PEAR = 1 +} diff --git a/external-declarations/tests/expected/functions.d.ts b/external-declarations/tests/expected/functions.d.ts index 3f00542289412..bdf85122c8456 100644 --- a/external-declarations/tests/expected/functions.d.ts +++ b/external-declarations/tests/expected/functions.d.ts @@ -1,3 +1,4 @@ +export declare function testDefaultNoType(a: string, b?: string): number; declare function test(a: string): number; export declare const testAlias: typeof test; export declare function testOptional(a: string, b?: string): number; diff --git a/external-declarations/tests/expected/private-members-typeof.d.ts b/external-declarations/tests/expected/private-members-typeof.d.ts new file mode 100644 index 0000000000000..ec5d883109dc5 --- /dev/null +++ b/external-declarations/tests/expected/private-members-typeof.d.ts @@ -0,0 +1,3 @@ +declare class Test { + #private; +} diff --git a/external-declarations/tests/source/.gitignore b/external-declarations/tests/source/.gitignore index a6c7c2852d068..9a18fd13b1e59 100644 --- a/external-declarations/tests/source/.gitignore +++ b/external-declarations/tests/source/.gitignore @@ -1 +1,2 @@ *.js +*.d.ts \ No newline at end of file diff --git a/external-declarations/tests/source/enums.ts b/external-declarations/tests/source/enums.ts new file mode 100644 index 0000000000000..010fb0563ca8d --- /dev/null +++ b/external-declarations/tests/source/enums.ts @@ -0,0 +1,5 @@ +export enum Fruits { + PEN_PINEAPPLE_APPLE_PEN = -1, + APPLE = 0, + PEAR = 1, +} \ No newline at end of file diff --git a/external-declarations/tests/source/private-members-typeof.ts b/external-declarations/tests/source/private-members-typeof.ts index 4387ee66df7a0..71d744e5109f5 100644 --- a/external-declarations/tests/source/private-members-typeof.ts +++ b/external-declarations/tests/source/private-members-typeof.ts @@ -1,4 +1,4 @@ class Test { - #foo = 1 + #foo = 1; #bar: typeof this.#foo = 1; } \ No newline at end of file From 03ee92f88e631bfdcaa29566b5d6b0e9eef05f9f Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Mon, 24 Jul 2023 11:44:36 +0000 Subject: [PATCH 035/224] Change isLiteralConstDeclaration to accept EnumMembers Signed-off-by: Hana Joo --- external-declarations/src/compiler/emit-resolver.ts | 7 ++++--- src/compiler/checker.ts | 7 ++++--- src/compiler/transformers/declarations.ts | 3 +-- src/compiler/types.ts | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/external-declarations/src/compiler/emit-resolver.ts b/external-declarations/src/compiler/emit-resolver.ts index ee268b7fda104..aa7e32d672294 100644 --- a/external-declarations/src/compiler/emit-resolver.ts +++ b/external-declarations/src/compiler/emit-resolver.ts @@ -1,4 +1,4 @@ -import { __String, BindingPattern, CompilerOptions, Declaration, DeclarationName, EntityNameOrEntityNameExpression, findAncestor, FunctionLikeDeclaration, getCombinedModifierFlags, getCombinedNodeFlags, getNameOfDeclaration, ImportClause, ImportEqualsDeclaration, ImportSpecifier, isBindingElement, isElementAccessExpression, isFunctionLike, isGetAccessor, isIdentifier, isLiteralExpression, isParameterPropertyDeclaration, isPropertyAccessExpression, isSetAccessor, isSourceFile, isVariableDeclaration, isVariableStatement, ModifierFlags, NamespaceImport, Node, NodeFlags, ParameterDeclaration, PropertyDeclaration, PropertySignature, ResolutionMode,SourceFile, SymbolFlags, SyntaxKind, VariableDeclaration, VariableDeclarationList } from "typescript"; +import { __String, BindingPattern, CompilerOptions, Declaration, DeclarationName, EntityNameOrEntityNameExpression, EnumMember, findAncestor, FunctionLikeDeclaration, getCombinedModifierFlags, getCombinedNodeFlags, getNameOfDeclaration, ImportClause, ImportEqualsDeclaration, ImportSpecifier, isBindingElement, isElementAccessExpression, isEnumMember, isFunctionLike, isGetAccessor, isIdentifier, isLiteralExpression, isParameterPropertyDeclaration, isPrefixUnaryExpression, isPropertyAccessExpression, isSetAccessor, isSourceFile, isVariableDeclaration, isVariableStatement, ModifierFlags, NamespaceImport, Node, NodeFlags, ParameterDeclaration, PropertyDeclaration, PropertySignature, ResolutionMode,SourceFile, SymbolFlags, SyntaxKind, VariableDeclaration, VariableDeclarationList } from "typescript"; import { Debug } from "./debug"; import { BasicSymbol, bindSourceFile } from "./emit-binder"; @@ -12,10 +12,11 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p const { getNodeLinks, resolveName } = bindSourceFile(file, options, packageModuleType); - function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration): boolean { + function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration | EnumMember): boolean { if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node)) { // TODO: Make sure this is a valid approximation for literal types - return !node.type && hasProperty(node, "initializer") && !!node.initializer && isLiteralExpression(node.initializer); + return (isEnumMember(node) || !node.type) && hasProperty(node, "initializer") && !!node.initializer && + (isLiteralExpression(node.initializer) || isPrefixUnaryExpression(node.initializer) && isLiteralExpression(node.initializer.operand)); // Original TS version // return isFreshLiteralType(getTypeOfSymbol(getSymbolOfNode(node))); } diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 297f40ed83bf2..4c6cbe2f1f662 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -46597,12 +46597,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return undefined; } - function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration): boolean { - if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node)) { + function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration | EnumMember): boolean { + if (isDeclarationReadonly(node) || (isVariableDeclaration(node) && isVarConst(node)) || isEnumMember(node)) { // TODO: isolated declarations: Add a test for this. // In isolated declaration mode we can't really use the freshness of the type as this would require type information. return compilerOptions.isolatedDeclarations? - !node.type && !!node.initializer && isLiteralExpression(node.initializer): + (isEnumMember(node)|| !node.type) && !!node.initializer && + (isLiteralExpression(node.initializer) || isPrefixUnaryExpression(node.initializer) && isLiteralExpression(node.initializer.operand)) : isFreshLiteralType(getTypeOfSymbol(getSymbolOfDeclaration(node))); } return false; diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index fe4c32d3e1b8d..4ce0abe00661c 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -135,7 +135,6 @@ import { isModuleDeclaration, isNightly, isOmittedExpression, - isPrefixUnaryExpression, isPrivateIdentifier, isPropertyAccessExpression, isPropertySignature, @@ -1817,7 +1816,7 @@ export function transformDeclarations(context: TransformationContext) { return cleanup(factory.updateEnumDeclaration(input, factory.createNodeArray(ensureModifiers(input)), input.name, factory.createNodeArray(mapDefined(input.members, m => { if (shouldStripInternal(m)) return; if (isolatedDeclarations) { - if (m.initializer && (!isLiteralExpression(m.initializer) && !(isPrefixUnaryExpression(m.initializer) && isLiteralExpression(m.initializer.operand)))) { + if (!resolver.isLiteralConstDeclaration(m)) { reportIsolatedDeclarationError(m); } return m; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 14f5a4959b095..f541e9b3fabd4 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -5716,7 +5716,7 @@ export interface EmitResolver { 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; + isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration | EnumMember): boolean; getJsxFactoryEntity(location?: Node): EntityName | undefined; getJsxFragmentFactoryEntity(location?: Node): EntityName | undefined; getAllAccessorDeclarations(declaration: AccessorDeclaration): AllAccessorDeclarations; From 4d3831f04b7e7fab946928ffe9e5354f6ef36dd3 Mon Sep 17 00:00:00 2001 From: Thomas Chetwin Date: Mon, 31 Jul 2023 18:41:18 +0100 Subject: [PATCH 036/224] docs: Add Local Inference findings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jan Kühle Co-authored-by: Rob Palmer Signed-off-by: Thomas Chetwin --- .../docs/example-project-structure.png | Bin 0 -> 2796 bytes .../docs/example-workflow.png | Bin 0 -> 24106 bytes .../docs/local-inferences.md | 1063 +++++++++++++++++ 3 files changed, 1063 insertions(+) create mode 100644 external-declarations/docs/example-project-structure.png create mode 100644 external-declarations/docs/example-workflow.png create mode 100644 external-declarations/docs/local-inferences.md diff --git a/external-declarations/docs/example-project-structure.png b/external-declarations/docs/example-project-structure.png new file mode 100644 index 0000000000000000000000000000000000000000..d2b8d0bc1bf7e9754456b2495728c0ff32da7305 GIT binary patch literal 2796 zcmeHJc~p~E7LSUu$>N|`AR!`1P!KDWst^)Cqy~#XMktGQKnMkjEE7P$NQjLBQ3IK& zwM4c=+rp<%mSQ0$5M~VJ!(kgFk^>=t1h521K!n7EWs(uknfY)2nK@_9%pdRFchCL3 zcb9kHefK6l5NBd!Z3KhCOwRcEo`b=*3bpGi20OH~)rU& z*4ypR^lg}I|0u*M+@x~Ns3mvbqn`N! z5`CcO)Ay*@2b%}KLnXTXcJttOD35#p+v+)o!8X;z?YrTo{}{t|7Z8cguJ<%mj67MI zI~Kn6pM*VZ+oOlU;sV`u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YnzTvr*#wE&K)w{fUGkxRNNtJJlK`7UY3eehmhRagb=Qqdf-v+-mA`$ zbQ6VnuvuQbeg#~9z+t}bds_b9eFIX+(|$SxgIB(fvq)LRWs|oeWxBH(w)}@x7G*p1 zGqu`v^E6r8%p#h6OW{hz;Q{Z4+%NptCKYi$j)=0X^DS%7L!LT5>_PMGqK&oo{_9)+p@U^9~8Ne8Ol zrOl;!8Ha~jKFp$dGl$AnPJ1aVZNpp2%9yj*soembe|!MjQ%U=Ks((FLCMhhrsRSEQ z^kz?Qd*ptQCiU}6bz;#oezHO8A6NlOfx-*_2l3th|AmD@VEJDH%)GbX#fw!Q(P4?1 S5b$^3if not provided***|Complexity of the explicit types in the source code that would be needed if this inference did not exist.
This refers to the burden of a single instance and is ***not*** a measure of how often this inference pattern may occur. (`Low`, `Medium`, `High`)| +|***Emitter complexity***|Complexity of code needed in the emitter to implement this inference (`Low`, `Medium`, `High`)| + +### INF01: Primitive literal (widening and non widening) + +
SourceInferred declaration
+ +```ts +let n = 1; +let s = "a"; +let b = true; +const nc = 1; +const sc = "a"; +const bc = true; +``` + + + +```ts +let n: number; +let s: string; +let b: boolean; +const nc: 1; +const sc: "a"; +const bc: true; +``` + +
+ +- **Optimistic:** No +- **User complexity if not provided:** Low +- **Emitter complexity:** Low + +### INF02: null (widening and non widening) + +This is useful in the context of other inferences. + +
SourceInferred declaration
+ +```ts +const n = null +let nc = null +``` + + + +```ts +const n: null +let nc: any +``` + +
+ +- **Optimistic:** No +- **User complexity if not provided:** Low +- **Emitter complexity:** Low + +### INF03: undefined (widening and non widening) + +This is useful in the context of other inferences. + +
SourceInferred declaration
+ +```ts +const u = undefined +let uc = undefined +``` + + + +```ts +const u: undefined +let uc: any +``` + +
+ +- **Optimistic:** No +- **User complexity if not provided:** Low +- **Emitter complexity:** Low + +### INF04: Symbols (widening and non widening) + +
SourceInferred declaration
+ +```ts +let sym = Symbol(); +const uniqueSym = Symbol(); +``` + + + +```ts +let sym: symbol +const uniqueSym: unique symbol +``` + +
+ +- **Optimistic:** No +- **User complexity if not provided:** Low +- **Emitter complexity:** Low + +### INF05: Identifiers and dotted identifiers + +While we can’t resolve the actual type of an identifier or an entity name expression (a.b.c) we can use the typeof operator in declarations and let TypeScript resolve the actual type. +There are [cases where this optimistic inference fails](#identifiers-and-dotted-identifiers-inf05), when the type of a variable is widened. + +
SourceInferred declaration
+ +```ts +const e = E.A; +export const foo = imported.foo; +let VALUE = NORTH; +``` + + + +```ts +const e: typeof E.A; +export const foo: typeof imported.foo; +let VALUE: typeof NORTH; +``` + +
+ +- **Optimistic:** Yes +- **User complexity if not provided:** High +- **Emitter complexity:** Medium + +### INF06: Type assertions + +Since TypeScript uses the asserted type as the type of the expression it is safe to use it as the type of expression in isolated declarations + +
SourceInferred declaration
+ +```ts +let x = "1" as "1" | "2" +let p = {} as Point +``` + + + +```ts +let x: "1" | "2" +let p: Point +``` + +
+ +- **Optimistic:** No +- **User complexity if not provided:** Low +- **Emitter complexity:** Low + +### INF07: Const assertions on primitives + +
SourceInferred declaration
+ +```ts +let x = "1" as const +``` + + + +```ts +let x: "1" +``` + +
+ +- **Optimistic:** No +- **User complexity if not provided:** Low +- **Emitter complexity:** Low + +### INF08: Function expressions + +This helps deal with the common pattern of initializing a variable or member with a function expression. + +
SourceInferred declaration
+ +```ts +let fn = (a: number): void => { } +let fn2 = function (b: string): string { + return b.toLowerCase() +} +``` + + + +```ts +let fn: (a: number) => void +let fn2: (b: string) => string + + +``` + +
+ +- **Optimistic:** No +- **User complexity if not provided:** Medium +- **Emitter complexity:** Low + +### INF09: `new` operator + +As long as the constructor name is a dotted identifier name, we use it as a type. +This can be wrong if the custom constructor returns something else, but it is usually correct. + +Generic type parameters must be explicitly specified. + +
SourceInferred declaration
+ +```ts +let x = new Dog() +let p2 = new Promise(...) +``` + + + +```ts +let x: Dog +let p: Promise +``` + +
+ +- **Optimistic:** Yes +- **User complexity if not provided:** Low +- **Emitter complexity:** Low + +### INF10: JSX elements ***(TODO: Still under investigation)*** + +We can’t fully emulate the JSX namespace resolution TypeScript does, but we can make a reasonable guess. + +
SourceInferred declaration
+ +```tsx +let jsx =
+``` + +
+ +```ts +let jsx: React.JSX.Element +``` + +
+ +- **Optimistic:** Yes +- **User complexity if not provided:** Medium +- **Emitter complexity:** Low + +### INF11: Object literals in non-const contexts + +We apply all inference rules to property values and create an object type from them. +While this form of local inference is not itself optimistic, if any of the inferred members have optimistic inferences, the object type itself becomes optimistic. + +
SourceInferred declaration
+ +```ts +let o = { + prop: 1, + method(p: number): string { + return p.toString() + }, + value +} +``` + + + +```ts +let o: { + prop: number; + method(p: number): string; + + + value: typeof value; +}; +``` + +
+ +- **Optimistic:** Maybe +- **User complexity if not provided:** High +- **Emitter complexity:** Medium + +### INF12: Object literals in const contexts + +We apply all inference rules to property values and create an object type from them. +May be optimistic if constituents are optimistic. + +
SourceInferred declaration
+ +```ts +let o = { + prop: 1, + method(p: number): string { + return p.toString() + }, + value +} as const +``` + + + +```ts +let o: { + readonly prop: 1; + readonly method: (p: number) => string; + + + readonly value: typeof value; +}; +``` + +
+ +- **Optimistic:** Maybe +- **User complexity if not provided:** High +- **Emitter complexity:** Medium + +### INF13: Array Literals in const contexts + +We apply all inference rules to array items and create a tuple type from the items. +May be optimistic if constituents are optimistic. + +
SourceInferred declaration
+ +```ts +let values = [value, "A", 1] as const; +``` + + + +```ts +let values: readonly [typeof value, "A", 1]; +``` + +
+ +- **Optimistic:** Maybe +- **User complexity if not provided:** High +- **Emitter complexity:** Medium + +### INF14: Array literals in non-const contexts + +We apply all inference rules to array items and create a union from the results. + +This requires union reduction, which we can’t ever fully emulate with just local information. We do a best effort to synthesize the appropriate union. + +
SourceInferred declaration
+ +```ts +export let values = [value, "A", 1] + +export let arrNestedObjects = [{ + bar: { + baz: 1 + } +}, { + bar: { + bat: 1 + } +}]; + + +``` + + + +```ts +let values: (string | number | typeof value)[]; + +let arrNestedObjects: ({ + bar: { + baz: number; + bat?: undefined; + }; +} | { + bar: { + baz?: undefined; + bat: number; + }; +})[]; +``` + +
+ +- **Optimistic:** Yes +- **User complexity if not provided:** High +- **Emitter complexity:** High + +### INF15: Return Type Inference + +We apply all inference rules to return statements and yield expressions. +We synthesize the appropriate return type based on the if the function is async and is a generator. +This requires union reduction - similar to mutable arrays. +This kind of inference should be done for function declarations, method declarations, function expressions and arrow functions. + +
SourceInferred declaration
+ +```ts +async function* asyncGen() { + const input: string = yield 10; + return 123n; +} + +function returnsObjectUnion() { + if (Math.random() > 0) { + return { + foo: "", + bar: 1 + }; + } + return { + foo: "" + }; +} +``` + + + +```ts +function asyncGen(): AsyncGenerator + + + + +function returnsObjectUnion(): { + foo: string; + bar: number; +} | { + foo: string; + bar?: undefined; +}; + + + + +``` + +
+ +- **Optimistic:** Yes +- **User complexity if not provided:** High +- **Emitter complexity:** High + +### INF16: Conditional expressions + +We apply all inference rules to the branches of the conditional and union the result. +This requires union reduction - similar to mutable arrays. + +
SourceInferred declaration
+ +```ts +let x = Math.random() ? 0 : 1; +``` + + + +```ts +let x: number +``` + +
+ +- **Optimistic:** yes +- **User complexity if not provided:** Medium +- **Emitter complexity:** High + +### INF17: `satisfies` expression + +We apply all inference rules to the value operand of satisfies. +Sometimes satisfies changes inference for the operand. +We don’t emulate this behavior, hence this is optimistic. + +
SourceInferred declaration
+ +```ts +export const satisfied = { + save: () => {}, + close: () => {}, +} as const satisfies Record void> +``` + + + +```ts +const satisfied: { + readonly save: () => void; + readonly close: () => void; +}; +``` + +
+ +- **Optimistic:** Yes +- **User complexity if not provided:** Medium +- **Emitter complexity:** Low + +### INF18: Template literals in non-const contexts + +In non const contexts template literals are inferred as strings + +
SourceInferred declaration
+ +```ts +let t2 = `A${1}`; +``` + + + +```ts +let t2: string; +``` + +
+ +- **Optimistic:** No +- **User complexity if not provided:** Low +- **Emitter complexity:** Low + +### INF19: Template literals in const contexts + +In non-const context template literal types can be generated, but we don’t exhaustively expand the template to a union. + +
SourceInferred declaration
+ +```ts +let t1 = `number=${1 as 1|2}` as const; +let t2 = `mixed=${"1" as "1" | number}` as const; +``` + + + +```ts +let t1: `number=${1 | 2}`; +let t2: `mixed=${"1" | number}`; +``` + +
+ +- **Optimistic:** Maybe +- **User complexity if not provided:** Medium +- **Emitter complexity:** Low + +### INF20: Spread elements in objects (in const and non-const contexts) + +We infer the type of the spread, and create an intersection between the inferred spread type and the rest of the object properties. +This does not exactly emulate the property overwriting of spread, but it gives good results in most cases. + +
SourceInferred declaration
+ +```ts +const LogLevel = { + ...HappyLogLevel, + ...UnhappyLogLevel, + UNDEFINED: "UNDEFINED", +} as const; + +``` + + + +```ts +const LogLevel: + typeof HappyLogLevel +& typeof UnhappyLogLevel +& { + readonly UNDEFINED: "UNDEFINED"; +}; +``` + +
+ +- **Optimistic:** Yes +- **User complexity if not provided:** High +- **Emitter complexity:** Medium + +### INF21: Rest elements within arrays in const contexts + +We infer the type of the rest element and create a tuple spread element for that position in the resulting tuple. +While the spread operation should yield a semantically equivalent type it will not be exactly the same as the TS inferred type. +We should assume the type might be wrong and check it, at least for now. + +
SourceInferred declaration
+ +```ts +let tuple = [1, 2, 3] as const +const composedTuple = [0, ...tuple] as const +``` + + + +```ts + +const composedTuple: readonly [0, ...typeof tuple]; +``` + +
+ +- **Optimistic:** Yes +- **User complexity if not provided:** High +- **Emitter complexity:** Medium + +### INF22: Rest elements in within arrays in non-const contexts + +We infer the type of the rest element and create a `[number]` index access for the type and add it to the union. +While the index access should yield a semantically equivalent type it will not be exactly the same as the TS inferred type. +We should assume the type might be wrong and check it, at least for now. + +
SourceInferred declaration
+ +```ts +const a = [false, ...nrs, ...strs] +``` + + + +```ts +const a: (boolean | (typeof nrs)[number] | (typeof strs)[number])[]; +``` + +
+ +- **Optimistic:** Yes +- **User complexity if not provided:** High +- **Emitter complexity:** Medium + +### INF23: Properties on function-typed variables _(“expando function expressions”)_ + +We can infer the types added on to function variables using the same inference we use for other initializers. +This is optimistic if any inferred property types are optimistic. + +
SourceInferred declaration
+ +```ts +export const x = () => {} +x.test = 1; + + +``` + + + +```ts +export declare const x: { + (): void; + test: number; +}; +``` + +
+ +- **Optimistic:** Maybe +- **User complexity if not provided:** High +- **Emitter complexity:** Medium + +--- + +## Design principles + +The following design principles guided the inferences listed above. + +### P1. Local inference + +All inference should only happen based on the currently analyzed statement. +There is no cross-file analysis (this keeps declaration emit parallelizable) and no in-file analysis beyond the current expression. +While some in-file analysis might help, it would require replicating a lot of TypeScript machinery and so is avoided. + +### P2. Optimistic emit + +Sometimes a DTE may not have enough information to determine if the naturally emitted declaration is correct. +In such cases declaration emit can proceed with a deterministic inference and rely on the user to run the type-checker to detect the error. +Meaning the emitter may complete its output but we have to wait for the type-checker to be sure the declarations are valid. + +Optimistic emit should only happen in cases where we deem that the likelihood is high that the type is correct. Some examples: + +```ts +const dog = new Dog(1); +``` + +Optimistically we can assume that the type of `dog` has the same name as the constructor. +In the common case this is true. +However, we can easily construct a scenario where this is not so. +Either through the use of inferred generics... + +```ts +class Dog { constructor(public v: T) {}} +const dog = new Dog(1) +// we could infer from the following +const dog2 = new Dog(1) +``` + +...or `Dog` might be a custom constructor signature... + +```ts +declare const Dog: new (v: number) => { value: number } +const dog = new Dog(1) +``` + +While both scenarios exist in real code, emitting the constructor name as the type helps the majority of cases. + +#### Consequences of optimistic emit on parallel build tools + +Any monorepo build tools that would use a DTE must be prepared for the eventuality that the TypeScript type-checker might fail and thus any work done based on the emitted declarations would need to be discarded. + +Consider the following project structure: + +![Example project structure for optimistic emit](./example-project-structure.png) + +##### Type-checking for project A fails + +Declaration emit for projects A & B can start and finish quickly by running the DTE in parallel. +Type-checking for projects B & C can optimistically start as soon as declarations are available, even if type-checking for project A has not yet completed. + +If project A fails to type-check correctly, the results for projects B & C should be discarded, even if the type checking for B & C was successful. +Projects B & C may have used invalid declarations, so the results of the type-check are invalid. + +![Example workflow for optimistic emit](./example-workflow.png) + +### P3. Performant declarations + +While some deviations from the classicly-generated declaration emit are inevitable, ideally there should not be a lot of extra work involved for the compiler to resolve the type. +For example, we aim to avoid conditional types. + +## Additional details on specific inferences + +### Identifiers and dotted identifiers (INF05) + +Whilst the DTE cannot resolve the actual type of an identifier or an entity name expression (`a.b.c`), it can use the `typeof` operator in declarations and let TypeScript resolve the actual type. + +There are cases where this optimistic inference fails, when the type of a variable is widened. + +
SucceedsFails
+ +```ts +let x = 1; +let y = x; // y: typeof x ✅ + +enum E { A, B, C } +const o = E.A // typeof E.A ✅ +``` + + + +```ts +const x = 1; +let y = x; // y: typeof x ❌ + +enum E { A, B, C } +let o = E.A // typeof E.A ❌ +``` + +
+ +#### Motivation for using `typeof` + +There are a lot of scenarios unlocked by allowing the use of `typeof` as the result of an inference. +Some examples: + +* Enums and enum like objects +* Re-exports +* Object/array literals that contain spread expressions + +There are some advantages to using `typeof`: + +* Preserves the original intent of code +* Easier to type constructs mentioned above + +Arguments against using `typeof`: + +* May decrease performance - though we have not seen this in practice + +### Inferences that use union subtype reduction (INF14, INF15, INF16) + +There are several inferences that use subtype reduction: + +* [INF14: Array literals in non-const contexts](#inf14-array-literals-in-non-const-contexts) +* [INF15: Return Type Inference](#inf15-return-type-inference) +* [INF16: Conditional expressions](#inf16-conditional-expressions) + +#### Implementation of subtype reduction + +Any inference that relies on subtype reduction will be optimistic because: + +* The necessary information to reduce subtypes isn't always available locally. +* Even if all the information exists locally, implementing full subtype reduction is a lot of complexity for not a lot of gain. + +The following kinds of reduction are implemented: + +* Primitive literal type to primitive base type reduction - Ex: `1 | number` is reduced to `number`. +* Object union normalization - If we have several object types inferred we normalize all the properties to get a common set of properties. + * Example: `[{ foo: 1 }, { bar: 2 }]` is inferred as `({ foo: number; bar?: undefined; } | { bar: number; foo?: undefined;})[]` +* Duplicate type removal - If the types are identical we only keep one copy. This applies to the following common types that can commonly occur in a locally inferred expression + * Type references - `Point | Point` is reduced to `Point` + * Keyword types - `number | number` is reduced to `number` + * Literal types - `1 | 1` is reduced to `1` + * Array types - `number[] | number[]` is reduced to `number[]` + * Literal types - `{ foo: string } | { foo: string }` is reduced to `{ foo: string }` + * Function types - `(foo: string) => void | (foo: string) => void` is reduced to `(foo: string) => void` + * Constructor types - `new (foo: string) => T | new (foo: string) => T` is reduced to `new (foo: string) => T` + * Type Queries - `typeof p | typeof p` is reduced to `typeof p` + +This could be extended to more complicated types, such as mapped conditional types, but in practice these would appear exceedingly rare in a local inference context. +They would only appear if someone were to explicitly write a conditional or mapped type inline in a type assertion. + +#### Limitations of this approach + +Only primitive and literal types can be reduced to base types. +Consider the following example: + +```ts +type Id = { id: string, foo?: string } + +// TS: let a: Id[] +let a = [ + { id: "" } as Id, + { id:"", foo: "" }, +] +``` + +TypeScript can reduce the type of the array element from `Id | { id: string, foo: string }` to just `Id`. +Local inference does not have the information about `Id` or the implementation complexity to determine that this reduction is possible. + +Possible outcomes: + +1. The local inference reduced type is the same as the TypeScript reduced type (true for a vast majority of cases we encountered in practice) +2. The local inference reduced type is equivalent to the TypeScript one, but written with redundant terms. In the example above `Id | { id: string, foo: string }` and `Id` are equivalent. We have not in practice found this to occur. +3. The locally inferred type is semantically different from TypeScript one. We have not in practice found this to occur. Example: + ```ts + type Id = { id: string } + // TS: let a: Id[] + // LI: let a: (Id | { id: string, foo?: string })[] + let a = [ + { id: "" } as Id, + { id:"", foo: "" } as { id: string, foo?: string }, + ] + ``` + +The implementation errors today on 3 but does not error on 1 or 2. + +While it is possible to contrive examples of 2 and 3, they generally require type assertions to happen, as a way to introduce external type information. +While the chances of this occurring are non-zero, they don’t usually seem to be the way such code is actually written. + +#### Motivation for using this approach + +Unlocking [the three types of inference](#inferences-that-use-union-subtype-reduction-inf14-inf15-inf16) that use the union subtype reduction described above is a big win for developer experience - especially for return types and arrays. +Once you have the machinery for union reduction, conditional expressions come almost for free. +As described above a complete solution is not possible given the constraints of local inference. +Having a solution that works in most cases seems preferable to forcing people to write type annotations. + +Some examples: + +```ts +let m = Math.random() > 0.5? "OPTION 1": "OPTION 2"; + +import * as React from 'react'; + +export function Component() { + const { isLoading } = useQuery(/* */); + if(isLoading) return <> + + return

+ We have data! +
+} +``` + +### Rest elements and spread assignments (INF20, INF21, INF22) + +#### Motivation for implementation + +Our findings suggest that composing objects and arrays from other objects and arrays is not uncommon. Supporting local inference for such cases greatly reduces the amount of verbose types developers have to write. +Example: + +```ts +let defaultConfig = { + port: 80 +} +// TS: { host: string; port: number; } +// LI: typeof defaultConfig & { host: string; } +let config = { + ...defaultConfig, + host: "localhost" +} +``` + +## Future: Further possible inferences + +These inferences are not implemented. Further discussion is needed to decide if they should be included. + +### Unimplemented: Support for relational operators + +Relational operators always produce boolean results, so we can always type the results of the operators `<`, `>`, `>=`, `<=`, `!=`, `==`, `!==`, `===` as `boolean`. + +Boolean operator can also be sometimes typed as `boolean` +* `!` always produces a boolean result so it can be typed safely as boolean. +* `&&` produces a boolean if the operands are boolean, so we can type it in this case +* `||` can be typed the same as `&&` + +Examples: + +```ts +let r1 = a > 0 && b < 0 // ✅ Always boolean +let r2 = a < 0 || b < 0 // ✅ Always boolean +let r3 = !!xx && !!yy // ✅ Always boolean +let r4 = x && y // ❌ Can’t be sure result is boolean +``` + +These operators commonly appear in the return statements of functions so it would be useful to infer their types + +### Unimplemented: IIFE support + +If the return type of the IIFE can be determined, we can type the result of the function call. + +
SourceInferred declaration
+ +```ts +let service = (function() { + return { + request() { + return 0; + } + }; +})() +``` + + + +```ts +declare let service: { + request(): number; +}; + + + + +``` + +
+ +### Unimplemented: Inference from local variables + +We could add support for inference from local variables/parameters within a function given that symbol tables are already required. +This would help reduce the amount of typeof needed to only places where the variable was not defined in the local scope. + +
SourceInferred declaration
+ +```ts +function test() { + let p: number = 1; + return () => p; +} +``` + + + +```ts +declare function test(p: number): () => number + + + +``` + +
+ +## Open issues + +### ISS01: Validate type equivalence approach + +We would like to test if the local inference type is equivalent to the type TypeScript would infer in that scenario. +We initially used `checkTypeRelatedTo` with `identityRelation`. +This however proved too restrictive as it did not consider object types equivalent to a type that produces the same properties from an intersection type. +We are currently using the `strictSubtypeRelation` and checking the relationship both ways, i.e. that the locally inferred type is a strict subtype of the TS inferred type, and that the TS inferred type is a strict subtype of the locally inferred type. + +We are unsure if this is the best approach for this task. + +We would also like to validate that the way we performed type-checking for the synthetic type does is the best way we could do it. +We took several steps to type-check the synthetic types: + +1. Parent the synthetic type to the node that it will be used on. + 1. For function return types due to the way symbol visibility works, we had to create an extra fake parameter to keep the type in the scope of the function signature +2. Invoke the binder for the synthetic type node. This required some changes to the binder to allow the binding of arbitrary nodes on demand. Without this binding step, it would not be possible to type check object types that contain members for example as the type checker relies on the symbol tables built during binding. +3. Get the types of the synthetic type node and the source and compare them as described above. + +### ISS02: Investigate JSX namespace resolution + +Currently we just use `React.JSX.Element` as the type of any JSX element. +While we probably can’t emulate the whole TS algorithm for resolving the namespace, we can probably do better based on compiler settings and pragmas. + +### ISS03: Inference of expando function properties for function declarations + +Local inference does not currently support adding properties to function declarations. +It only supports variables that have a function type assigned to them. +This inference is possible to implement and should be implemented. + +### ISS04: Better support for binding patterns + +Currently we don’t support local inference for binding patterns. +We could emit in local declarations the binding patterns itself instead of separating out the variables as declaration emit currently does. +Supported example: + +
SourceInferred declaration
+ +```ts +export let { x, y } = p; +``` + + + +```ts +export let { x, y }: typeof p; +``` + +
+ +### ISS05: Accessor inference for classes + +We currently don’t consider the type of the related accessor in local inference in classes. +Whereas we do for object literals. + +### ISS06: Incorrect visibility for parameters of function in return clause + +We are currently facing an error where when we try to synthesize a `typeof` type query for a function parameter in a protected method, we get an error saying that the parameter is not accessible. +We think this error is probably a bit too eager. +The `typeof parameter` does not leak beyond where the method is visible anyway. + +Example: + +```ts +class X { + // Return type of public method from exported class has or is using private name 'p'.(4055) + protected m(p: string): typeof p { + return "" + } +} +``` + +### ISS07: Add better errors for optimistic inference failures + +Currently if optimistic local inference fails, we emit a generic error related to `isolatedDeclarations` and report the incompatibility of the synthetic vs actual type. +This approach provides useful information to the user but it seems a bit strange to report such information between two types TypeScript itself creates. +We will look for better DX in this area. From d29374423d770063ff380bb4074d4331ae02df01 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 15 Aug 2023 13:37:46 +0100 Subject: [PATCH 037/224] Fixed bug caused by different getNdoeId implementations. --- .../src/code-mod/code-transform.ts | 1 - .../src/compiler/transform-project.ts | 57 +++++++++++-------- external-declarations/src/compiler/utils.ts | 9 +-- external-declarations/src/main.ts | 6 +- 4 files changed, 37 insertions(+), 36 deletions(-) diff --git a/external-declarations/src/code-mod/code-transform.ts b/external-declarations/src/code-mod/code-transform.ts index 817adfa80eae4..28c3e4cb7a1cf 100644 --- a/external-declarations/src/code-mod/code-transform.ts +++ b/external-declarations/src/code-mod/code-transform.ts @@ -1,7 +1,6 @@ import * as ts from "typescript"; import { NodeBuilderFlags } from "typescript"; -import { hasProperty } from "../compiler/lang-utils"; import { SymbolTracker } from "../compiler/types"; const declarationEmitNodeBuilderFlags = diff --git a/external-declarations/src/compiler/transform-project.ts b/external-declarations/src/compiler/transform-project.ts index ecf64df86180c..c53fc6093fb71 100644 --- a/external-declarations/src/compiler/transform-project.ts +++ b/external-declarations/src/compiler/transform-project.ts @@ -7,19 +7,17 @@ import { transformFile } from "./transform-file"; -export interface CancellationToken { isCancelled: boolean } export function transformProject( projectPath: string, files: string[] | undefined, options: ts.CompilerOptions, - host: ts.CompilerHost, - cancellationToken: CancellationToken + host: ts.CompilerHost ) { tracer.current?.start("readFiles"); const rootDir = options.rootDir ? normalizePath(path.resolve(path.join(projectPath, options.rootDir))) : normalizePath(projectPath); files ??= host.readDirectory!(rootDir, [".ts", ".tsx"], ["**/*.d.ts"], []); tracer.current?.end("readFiles"); - transformProjectFiles(rootDir, files, host, options, cancellationToken); + transformProjectFiles(rootDir, files, host, options); return rootDir; } @@ -34,32 +32,41 @@ function ensureDirRecursive(dirPath: string, host: ts.CompilerHost) { function joinToRootIfNeeded(rootDir: string, existingPath: string) { return normalizePath(path.isAbsolute(existingPath) ? existingPath : path.resolve(path.join(rootDir, existingPath))); } -export function transformProjectFiles(rootDir: string, files: string[], host: ts.CompilerHost, options: ts.CompilerOptions, cancellationToken: CancellationToken) { - const declarationDir = +export function projectFilesTransformer(rootDir: string, options: ts.CompilerOptions) { + const declarationDir = options.declarationDir? joinToRootIfNeeded(rootDir, options.declarationDir) : options.outDir? joinToRootIfNeeded(rootDir,options.outDir) : undefined; - for (const file of files.map(normalizePath)) { - try { - tracer.current?.start("parse"); - const source = host.getSourceFile(file, options.target ?? ts.ScriptTarget.ES2015); - tracer.current?.end("parse"); - if(cancellationToken.isCancelled) return; - if(!source) continue; + rootDir = normalizePath(rootDir); + return (file: string, host: ts.CompilerHost) => { + file = normalizePath(file); + tracer.current?.start("parse") + const source = host.getSourceFile(file, options.target ?? ts.ScriptTarget.ES2015); + tracer.current?.end("parse") + + if(!source) return; - const actualDeclaration = transformFile(source, [], [], options, ts.ModuleKind.ESNext); - const output = - declarationDir? changeAnyExtension(file.replace(rootDir, declarationDir), ".d.ts"): - changeAnyExtension(file, ".d.ts"); - const dirPath = path.dirname(output); - ensureDirRecursive(dirPath, host); - tracer.current?.start("write"); - host.writeFile(output, actualDeclaration.code, /*writeByteOrderMark*/ false); - tracer.current?.end("write"); - } - catch (e) { - console.error(`Failed to transform: ${file}`, e); + const actualDeclaration = transformFile(source, [], [], options, ts.ModuleKind.ESNext); + const output = + declarationDir? changeAnyExtension(file.replace(rootDir, declarationDir), ".d.ts"): + changeAnyExtension(file, ".d.ts"); + const dirPath = path.dirname(output); + ensureDirRecursive(dirPath, host) + tracer.current?.start("write") + host.writeFile(output, actualDeclaration.code, false); + tracer.current?.end("write") + return output; + } +} + +export function transformProjectFiles(rootDir: string, files: string[], host: ts.CompilerHost, options: ts.CompilerOptions) { + const transformer = projectFilesTransformer(rootDir, options); + for (let file of files) { + try { + transformer(file, host); + } catch (e) { + console.error(`Failed to transform: ${file}`, e) } } return { rootDir }; diff --git a/external-declarations/src/compiler/utils.ts b/external-declarations/src/compiler/utils.ts index 6cf89833a2134..3c1912215077f 100644 --- a/external-declarations/src/compiler/utils.ts +++ b/external-declarations/src/compiler/utils.ts @@ -1,5 +1,5 @@ import { BindingPattern, CallExpression, canHaveModifiers, ClassDeclaration, ClassLikeDeclaration, CompilerOptions, Declaration, DeclarationName, EntityNameOrEntityNameExpression, EnumDeclaration, Expression, ExpressionWithTypeArguments, Extension, FunctionDeclaration, FunctionLikeDeclaration, getJSDocDeprecatedTag, getJSDocOverrideTagNoCache, getJSDocPrivateTag, getJSDocProtectedTag, getJSDocPublicTag, getJSDocReadonlyTag, getJSDocTypeTag, getNameOfDeclaration, HasType, Identifier, ImportDeclaration, ImportEqualsDeclaration, ImportTypeNode, InterfaceDeclaration, isElementAccessExpression, isExpressionWithTypeArguments, isHeritageClause, isIdentifier, isModuleDeclaration, isNumericLiteral, isParameter, isParenthesizedExpression, isPrefixUnaryExpression, isSourceFile, isStringLiteralLike, isVariableStatement,JSDocTemplateTag, JsxEmit, ModifierFlags, ModifierLike, ModuleDeclaration, ModuleKind, ModuleResolutionKind, NamedDeclaration, NewLineKind, Node, NodeFlags, NumericLiteral, OuterExpressionKinds, PrefixUnaryExpression, PrinterOptions, PropertyAccessExpression, QualifiedName, ScriptTarget, SignatureDeclaration, SourceFile, StringLiteralLike, SyntaxKind, sys, TsConfigSourceFile, TypeAliasDeclaration, TypeAssertion, TypeParameterDeclaration, VariableStatement } from "typescript"; - +import * as ts from "typescript"; import { Debug } from "./debug"; import { clone, contains, flatten, some } from "./lang-utils"; import { fileExtensionIs, fileExtensionIsOneOf } from "./path-utils"; @@ -180,15 +180,10 @@ function identifierIsThisKeyword(id: Identifier): boolean { } -let nextNodeId = 0; /** @internal */ export function getNodeId(node: Node): number; export function getNodeId(node: any): number { - if (!node.id) { - nextNodeId++; - node.id = nextNodeId; - } - return node.id; + return (ts as any).getNodeId(node); } /** @internal */ diff --git a/external-declarations/src/main.ts b/external-declarations/src/main.ts index 4be2a9fae85ee..64f488ca1bc89 100644 --- a/external-declarations/src/main.ts +++ b/external-declarations/src/main.ts @@ -4,12 +4,12 @@ import * as ts from "typescript"; import { normalizePath } from "./compiler/path-utils"; import { installTracer, tracer } from "./compiler/perf-tracer"; -import { CancellationToken, transformProject } from "./compiler/transform-project"; +import { transformProject } from "./compiler/transform-project"; import { ArgType, parseArgs } from "./utils/cli-parser"; (ts as any).Debug.enableDebugInfo(); - +type CancellationToken = { isCancelled: boolean } const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), { default: ArgType.StringArray(), @@ -84,7 +84,7 @@ async function main(cancellationToken: CancellationToken, msDelay: number) { options.declarationDir = parsedArgs.declarationDir; } const host = ts.createCompilerHost(options, /*setParentNodes*/ true); - const rootDir = await transformProject(path.dirname(projectConfig), /*files*/ undefined, options, host, cancellationToken); + const rootDir = await transformProject(path.dirname(projectConfig), /*files*/ undefined, options, host); console.log(tracer.current?.times); watch(rootDir); if(cancellationToken.isCancelled) return; From ba15e2b9433ddaad1cae91a6cd60f92265bfb140 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 15 Aug 2023 17:01:04 +0100 Subject: [PATCH 038/224] Remove unapproved inferences. Signed-off-by: Titian Cernicova-Dragomir --- .../src/compiler/emit-host.ts | 18 +- .../src/compiler/transform-project.ts | 29 +- external-declarations/src/compiler/types.ts | 9 +- external-declarations/src/compiler/utils.ts | 1 + external-declarations/src/main.ts | 2 +- .../tests/source/tsconfig.json | 2 +- src/compiler/binder.ts | 68 +- src/compiler/checker.ts | 56 - src/compiler/emitter.ts | 1 - src/compiler/transformers/declarations.ts | 10 - .../declarations/localInferenceResolver.ts | 1079 ++--------------- src/compiler/types.ts | 1 - src/compiler/utilities.ts | 5 - 13 files changed, 144 insertions(+), 1137 deletions(-) diff --git a/external-declarations/src/compiler/emit-host.ts b/external-declarations/src/compiler/emit-host.ts index 69c26df5f9f5b..48480bfdfb56a 100644 --- a/external-declarations/src/compiler/emit-host.ts +++ b/external-declarations/src/compiler/emit-host.ts @@ -6,7 +6,7 @@ import { getDeclarationExtension, getDirectoryPath, getRelativePathFromDirectory import { IsolatedEmitHost } from "./types"; import { getNodeId } from "./utils"; -export function createEmitHost(allProjectFiles: string[], tsLibFiles: string[], options: ts.CompilerOptions) { +export function createEmitHost(allProjectFiles: string[], tsLibFiles: string[], options: ts.CompilerOptions): IsolatedEmitHost { const getCompilerOptions = () => options; const getCurrentDirectory = () => "."; const getCommonSourceDirectory = () => "."; @@ -18,6 +18,7 @@ export function createEmitHost(allProjectFiles: string[], tsLibFiles: string[], const tsLibFileSet = new Set(tsLibFiles); return { + redirectTargetsMap: new Map(), getSourceFiles() { throw new Error("Not needed"); }, @@ -34,14 +35,14 @@ export function createEmitHost(allProjectFiles: string[], tsLibFiles: string[], } return { fileName: ref.fileName, - }; + } as ts.SourceFile; }, getSourceFileFromReference(referencingFile, ref) { if(ref.fileName.startsWith("node_modules/") || ref.fileName.indexOf("/node_modules/") !== -1) { return undefined; } if(isJavaScriptFile(ref.fileName) && !options.allowJs) { - return; + return undefined; } let resolvedFile: string | undefined = resolvePath(getDirectoryPath(referencingFile.fileName), ref.fileName); let resolvedFileId = projectFileMap.get(resolvedFile); @@ -65,8 +66,11 @@ export function createEmitHost(allProjectFiles: string[], tsLibFiles: string[], resolvedDeclarationFile, /*ignoreCase*/ false ), - id: resolvedFileId, - }; + id: resolvedFileId!, + } as any as ts.SourceFile; + }, + isSourceOfProjectReferenceRedirect(fileName) { + return false; }, - } as Partial as IsolatedEmitHost; -} \ No newline at end of file + }; +} diff --git a/external-declarations/src/compiler/transform-project.ts b/external-declarations/src/compiler/transform-project.ts index c53fc6093fb71..929d74c510030 100644 --- a/external-declarations/src/compiler/transform-project.ts +++ b/external-declarations/src/compiler/transform-project.ts @@ -34,40 +34,41 @@ function joinToRootIfNeeded(rootDir: string, existingPath: string) { } export function projectFilesTransformer(rootDir: string, options: ts.CompilerOptions) { - const declarationDir = + const declarationDir = options.declarationDir? joinToRootIfNeeded(rootDir, options.declarationDir) : options.outDir? joinToRootIfNeeded(rootDir,options.outDir) : undefined; rootDir = normalizePath(rootDir); return (file: string, host: ts.CompilerHost) => { file = normalizePath(file); - tracer.current?.start("parse") + tracer.current?.start("parse"); const source = host.getSourceFile(file, options.target ?? ts.ScriptTarget.ES2015); - tracer.current?.end("parse") - + tracer.current?.end("parse"); + if(!source) return; const actualDeclaration = transformFile(source, [], [], options, ts.ModuleKind.ESNext); - const output = + const output = declarationDir? changeAnyExtension(file.replace(rootDir, declarationDir), ".d.ts"): changeAnyExtension(file, ".d.ts"); const dirPath = path.dirname(output); - ensureDirRecursive(dirPath, host) - tracer.current?.start("write") - host.writeFile(output, actualDeclaration.code, false); - tracer.current?.end("write") + ensureDirRecursive(dirPath, host); + tracer.current?.start("write"); + host.writeFile(output, actualDeclaration.code, /*writeByteOrderMark*/ false); + tracer.current?.end("write"); return output; - } + }; } export function transformProjectFiles(rootDir: string, files: string[], host: ts.CompilerHost, options: ts.CompilerOptions) { const transformer = projectFilesTransformer(rootDir, options); - for (let file of files) { + for (const file of files) { try { transformer(file, host); - } catch (e) { - console.error(`Failed to transform: ${file}`, e) + } + catch (e) { + console.error(`Failed to transform: ${file}`, e); } } return { rootDir }; -} \ No newline at end of file +} diff --git a/external-declarations/src/compiler/types.ts b/external-declarations/src/compiler/types.ts index 6f45ad775d6da..9582af1d008b6 100644 --- a/external-declarations/src/compiler/types.ts +++ b/external-declarations/src/compiler/types.ts @@ -1,4 +1,4 @@ -import { AsExpression, BinaryExpression, ClassDeclaration, CompilerOptions, ComputedPropertyName, Declaration, Diagnostic, DiagnosticMessage, DiagnosticWithLocation, ElementAccessExpression, EntityNameExpression, EntityNameOrEntityNameExpression, EnumDeclaration, Expression, FileReference, FunctionDeclaration, ImportDeclaration, InterfaceDeclaration, ModifierFlags, ModuleBlock, ModuleDeclaration, NamedDeclaration, Node, NonNullExpression, ParameterDeclaration, ParenthesizedExpression, PartiallyEmittedExpression, PropertyDeclaration, PropertySignature, ResolutionMode,SatisfiesExpression, SignatureDeclaration, SourceFile, StringLiteralLike, Symbol, SymbolFlags, TransformationContext as _TransformationContext, TypeAliasDeclaration, TypeAssertion, TypeNode, UnparsedSource, VariableDeclaration, VariableStatement } from "typescript"; +import { AsExpression, BinaryExpression, ClassDeclaration, CompilerOptions, ComputedPropertyName, Declaration, Diagnostic, DiagnosticMessage, DiagnosticWithLocation, ElementAccessExpression, EntityNameExpression, EntityNameOrEntityNameExpression, EnumDeclaration, Expression, FileReference, FunctionDeclaration, ImportDeclaration, InterfaceDeclaration, ModifierFlags, ModuleBlock, ModuleDeclaration, NamedDeclaration, Node, NonNullExpression, ParameterDeclaration, ParenthesizedExpression, PartiallyEmittedExpression, PropertyDeclaration, PropertySignature, ResolutionMode,SatisfiesExpression, SignatureDeclaration, SourceFile, StringLiteralLike, Symbol, SymbolFlags, TransformationContext as _TransformationContext, TypeAliasDeclaration, TypeAssertion, TypeNode, VariableDeclaration, VariableStatement, Path } from "typescript"; import { AnyImportSyntax } from "./utils"; @@ -21,8 +21,9 @@ export interface IsolatedEmitHost extends ModuleSpecifierResolutionHost, Resolve getCommonSourceDirectory(): string getCompilerOptions(): CompilerOptions getSourceFiles(): SourceFile[] - /** @internal */ getSourceFileFromReference(referencingFile: SourceFile | UnparsedSource, ref: FileReference): SourceFile | undefined; + /** @internal */ getSourceFileFromReference(referencingFile: SourceFile, ref: FileReference): SourceFile | undefined; /** @internal */ getLibFileFromReference(ref: FileReference): SourceFile | undefined; + isSourceOfProjectReferenceRedirect(fileName: string): boolean; } export interface IsolatedEmitResolver { @@ -66,9 +67,11 @@ export interface SymbolTracker { /** @internal */ interface ModuleSpecifierResolutionHost { - + readonly redirectTargetsMap: RedirectTargetsMap; } +export type RedirectTargetsMap = ReadonlyMap; + /** @internal */ export interface SymbolVisibilityResult { accessibility: SymbolAccessibility; diff --git a/external-declarations/src/compiler/utils.ts b/external-declarations/src/compiler/utils.ts index 3c1912215077f..e2a88e52a5678 100644 --- a/external-declarations/src/compiler/utils.ts +++ b/external-declarations/src/compiler/utils.ts @@ -1,5 +1,6 @@ import { BindingPattern, CallExpression, canHaveModifiers, ClassDeclaration, ClassLikeDeclaration, CompilerOptions, Declaration, DeclarationName, EntityNameOrEntityNameExpression, EnumDeclaration, Expression, ExpressionWithTypeArguments, Extension, FunctionDeclaration, FunctionLikeDeclaration, getJSDocDeprecatedTag, getJSDocOverrideTagNoCache, getJSDocPrivateTag, getJSDocProtectedTag, getJSDocPublicTag, getJSDocReadonlyTag, getJSDocTypeTag, getNameOfDeclaration, HasType, Identifier, ImportDeclaration, ImportEqualsDeclaration, ImportTypeNode, InterfaceDeclaration, isElementAccessExpression, isExpressionWithTypeArguments, isHeritageClause, isIdentifier, isModuleDeclaration, isNumericLiteral, isParameter, isParenthesizedExpression, isPrefixUnaryExpression, isSourceFile, isStringLiteralLike, isVariableStatement,JSDocTemplateTag, JsxEmit, ModifierFlags, ModifierLike, ModuleDeclaration, ModuleKind, ModuleResolutionKind, NamedDeclaration, NewLineKind, Node, NodeFlags, NumericLiteral, OuterExpressionKinds, PrefixUnaryExpression, PrinterOptions, PropertyAccessExpression, QualifiedName, ScriptTarget, SignatureDeclaration, SourceFile, StringLiteralLike, SyntaxKind, sys, TsConfigSourceFile, TypeAliasDeclaration, TypeAssertion, TypeParameterDeclaration, VariableStatement } from "typescript"; import * as ts from "typescript"; + import { Debug } from "./debug"; import { clone, contains, flatten, some } from "./lang-utils"; import { fileExtensionIs, fileExtensionIsOneOf } from "./path-utils"; diff --git a/external-declarations/src/main.ts b/external-declarations/src/main.ts index 64f488ca1bc89..aa0fd98a8861a 100644 --- a/external-declarations/src/main.ts +++ b/external-declarations/src/main.ts @@ -9,7 +9,7 @@ import { ArgType, parseArgs } from "./utils/cli-parser"; (ts as any).Debug.enableDebugInfo(); -type CancellationToken = { isCancelled: boolean } +interface CancellationToken { isCancelled: boolean } const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), { default: ArgType.StringArray(), diff --git a/external-declarations/tests/source/tsconfig.json b/external-declarations/tests/source/tsconfig.json index c329cc3402210..d93575dff06f6 100644 --- a/external-declarations/tests/source/tsconfig.json +++ b/external-declarations/tests/source/tsconfig.json @@ -3,4 +3,4 @@ "strict": true, "target": "ESNext", } -} \ No newline at end of file +} diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index cd86ae611c455..f54a3e0666f00 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -305,7 +305,6 @@ import { tryParsePattern, TryStatement, TypeLiteralNode, - TypeNode, TypeOfExpression, TypeParameterDeclaration, unescapeLeadingUnderscores, @@ -489,12 +488,7 @@ function initFlowNode(node: T) { return node; } -const { bindSourceFile: binder, bindSyntheticTypeNode: typeNodeBinder } = /* @__PURE__ */ createBinder(); - -/** @internal */ -export function bindSyntheticTypeNode(node: TypeNode, location: Node, opts: CompilerOptions) { - typeNodeBinder(node, location, opts); -} +const binder = /* @__PURE__ */ createBinder(); /** @internal */ export function bindSourceFile(file: SourceFile, options: CompilerOptions) { @@ -506,10 +500,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions) { performance.measure("Bind", "beforeBind", "afterBind"); } -function createBinder(): { - bindSourceFile: (file: SourceFile, options: CompilerOptions) => void, - bindSyntheticTypeNode: (node: TypeNode, location: Node, opts: CompilerOptions) => void - } { +function createBinder(): (file: SourceFile, options: CompilerOptions) => void { // 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 */ @@ -558,7 +549,7 @@ function createBinder(): { var bindBinaryExpressionFlow = createBindBinaryExpressionFlow(); /* eslint-enable no-var */ - return { bindSourceFile, bindSyntheticTypeNode }; + return bindSourceFile; /** * Inside the binder, we may create a diagnostic for an as-yet unbound node (with potentially no parent pointers, implying no accessible source file) @@ -569,16 +560,29 @@ function createBinder(): { return createDiagnosticForNodeInSourceFile(getSourceFileOfNode(node) || file, node, message, ...args); } - function bindSyntheticTypeNode(node: TypeNode, location: Node, opts: CompilerOptions) { - file = getSourceFileOfNode(location); + function bindSourceFile(f: SourceFile, opts: CompilerOptions) { + file = f; options = opts; - parent = location; - currentFlow = initFlowNode({ flags: FlowFlags.Start }); - bind(node); - bindCleanup(); - } + languageVersion = getEmitScriptTarget(options); + inStrictMode = bindInStrictMode(file, opts); + classifiableNames = new Set(); + symbolCount = 0; + + Symbol = objectAllocator.getSymbolConstructor(); + + // Attach debugging information if necessary + Debug.attachFlowNodeDebugInfo(unreachableFlow); + Debug.attachFlowNodeDebugInfo(reportedUnreachableFlow); + + if (!file.locals) { + tracing?.push(tracing.Phase.Bind, "bindSourceFile", { path: file.path }, /*separateBeginAndEnd*/ true); + bind(file); + tracing?.pop(); + file.symbolCount = symbolCount; + file.classifiableNames = classifiableNames; + delayedBindJSDocTypedefTag(); + } - function bindCleanup() { file = undefined!; options = undefined!; languageVersion = undefined!; @@ -601,30 +605,6 @@ function createBinder(): { inAssignmentPattern = false; emitFlags = NodeFlags.None; } - function bindSourceFile(f: SourceFile, opts: CompilerOptions) { - file = f; - options = opts; - languageVersion = getEmitScriptTarget(options); - inStrictMode = bindInStrictMode(file, opts); - classifiableNames = new Set(); - symbolCount = 0; - - Symbol = objectAllocator.getSymbolConstructor(); - - // Attach debugging information if necessary - Debug.attachFlowNodeDebugInfo(unreachableFlow); - Debug.attachFlowNodeDebugInfo(reportedUnreachableFlow); - - if (!file.locals) { - tracing?.push(tracing.Phase.Bind, "bindSourceFile", { path: file.path }, /*separateBeginAndEnd*/ true); - bind(file); - tracing?.pop(); - file.symbolCount = symbolCount; - file.classifiableNames = classifiableNames; - delayedBindJSDocTypedefTag(); - } - bindCleanup(); - } function bindInStrictMode(file: SourceFile, opts: CompilerOptions): boolean { if (getStrictOptionValue(opts, "alwaysStrict") && !file.isDeclarationFile) { diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 4c6cbe2f1f662..db751d4243442 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -42,7 +42,6 @@ import { BindingName, BindingPattern, bindSourceFile, - bindSyntheticTypeNode, Block, BreakOrContinueStatement, CallChain, @@ -12516,7 +12515,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { * For a description of late-binding, see `lateBindMember`. */ function getMembersOfSymbol(symbol: Symbol) { - if(!symbol) debugger; return symbol.flags & SymbolFlags.LateBindingContainer ? getResolvedMembersOrExportsOfSymbol(symbol, MembersOrExportsResolutionKind.resolvedMembers) : symbol.members || emptySymbols; @@ -46669,60 +46667,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } }); } - function isSyntheticTypeEquivalent( - actualNode: Node, - syntheticNode: TypeNode, - headMessage: DiagnosticMessage, - ): true | Diagnostic[] { - const isActualNodeFunctionLike = isFunctionLike(actualNode); - let syntheticTypeNodeContainer: Node = syntheticNode; - - if(isActualNodeFunctionLike) { - const fakeParameter = factory.createParameterDeclaration(/*modifiers*/ undefined, /*dotDotDotToken*/ undefined, "__p", /*questionToken*/ undefined, syntheticNode); - fakeParameter.symbol = createSymbol(SymbolFlags.Variable, "__p" as __String); - syntheticTypeNodeContainer = fakeParameter; - } - - setParent(syntheticNode, actualNode); - bindSyntheticTypeNode(syntheticNode, actualNode, compilerOptions); - - setParent(syntheticNode, syntheticTypeNodeContainer); - setParent(syntheticTypeNodeContainer, actualNode); - checkSourceElement(syntheticNode); - - const prevDeferredDiagnosticsCallbacksLength = deferredDiagnosticsCallbacks.length; - const syntheticType = getTypeOfNode(syntheticNode); - const actualNodeType = getTypeOfNode(actualNode); - - let actualType; - if(isActualNodeFunctionLike) { - const signatures = getSignaturesOfType(actualNodeType, SignatureKind.Call); - actualType = signatures.length === 0? actualNodeType: getReturnTypeOfSignature(signatures[0]); - } - else { - actualType = actualNodeType; - } - const errors: Diagnostic[] = []; - - try { - const resultOneWay = checkTypeRelatedTo(actualType, syntheticType, strictSubtypeRelation, actualNode, headMessage, /*containingMessageChain*/ undefined, { errors }); - - if(!resultOneWay) { - return errors; - } - const resultReveresed = checkTypeRelatedTo(syntheticType, actualType, strictSubtypeRelation, actualNode, headMessage, /*containingMessageChain*/ undefined, { errors }); - - if(!resultReveresed) { - return errors; - } - - return true; - } - finally { - deferredDiagnosticsCallbacks.length = prevDeferredDiagnosticsCallbacksLength; - } - } return { getReferencedExportContainer, getReferencedImportDeclaration, @@ -46812,7 +46757,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return !sym.exports ? [] : nodeBuilder.symbolTableToDeclarationStatements(sym.exports, node, flags, tracker, bundled); }, isImportRequiredByAugmentation, - isSyntheticTypeEquivalent, }; function isImportRequiredByAugmentation(node: ImportDeclaration) { diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index d34294707d600..da4f3f56fa5e7 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1171,7 +1171,6 @@ export const notImplementedResolver: EmitResolver = { isBindingCapturedByNode: notImplemented, getDeclarationStatementsForSourceFile: notImplemented, isImportRequiredByAugmentation: notImplemented, - isSyntheticTypeEquivalent: notImplemented, }; /** diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 4ce0abe00661c..9bcc41ca8860e 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -298,7 +298,6 @@ export function transformDeclarations(context: TransformationContext) { let lateStatementReplacementMap: Map>; let suppressNewDiagnosticContexts: boolean; let exportedModulesFromDeclarationEmit: Symbol[] | undefined; - let localInferenceTargetNode: Node | undefined; const { factory } = context; const host = context.getEmitHost(); @@ -334,11 +333,6 @@ export function transformDeclarations(context: TransformationContext) { enclosingDeclaration = node; return oldNode; }, - setLocalInferenceTargetNode(node) { - const oldNode = localInferenceTargetNode; - localInferenceTargetNode = node; - return oldNode; - }, checkEntityNameVisibility(name, container) { return checkEntityNameVisibility(name, container ?? enclosingDeclaration); }, @@ -394,10 +388,6 @@ export function transformDeclarations(context: TransformationContext) { // TODO: Do all these accessibility checks inside/after the first pass in the checker when declarations are enabled, if possible } else { - if(localInferenceTargetNode) { - reportIsolatedDeclarationError(localInferenceTargetNode); - return true; - } // Report error const errorInfo = getSymbolAccessibilityDiagnostic(symbolAccessibilityResult); if (errorInfo) { diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index a6a4b51d66574..aa5ed9f1c114c 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -1,32 +1,22 @@ -import { getNodeId } from "../../checker"; -import { findIndex } from "../../core"; import { Debug } from "../../debug"; import { Diagnostics } from "../../diagnosticInformationMap.generated"; -import { setCommentRange } from "../../factory/emitNode"; -import { isArrayTypeNode, isBinaryExpression, isBlock, isComputedPropertyName, isConstructorTypeNode, isElementAccessExpression,isExportAssignment, isExpressionStatement, isFunctionDeclaration, isFunctionTypeNode, isGetAccessorDeclaration, isIdentifier, isLiteralTypeNode, isMethodDeclaration, isMethodSignature, isNoSubstitutionTemplateLiteral, isNumericLiteral, isOmittedExpression, isParameter, isPropertyAccessExpression, isPropertyAssignment, isPropertyDeclaration, isPropertySignature, isQualifiedName, isReturnStatement, isSetAccessorDeclaration, isShorthandPropertyAssignment, isSourceFile, isSpreadAssignment, isSpreadElement, isStringLiteral, isTypeLiteralNode, isTypeParameterDeclaration, isTypeQueryNode, isTypeReferenceNode, isVariableDeclaration, isVariableStatement, isYieldExpression } from "../../factory/nodeTests"; +import { isComputedPropertyName, isExportAssignment, isGetAccessorDeclaration, isIdentifier, isLiteralTypeNode, isMethodDeclaration, isNoSubstitutionTemplateLiteral, isNumericLiteral, isOmittedExpression, isParameter, isPropertyAccessExpression, isPropertyAssignment, isPropertyDeclaration, isSetAccessorDeclaration, isShorthandPropertyAssignment, isSpreadAssignment, isSpreadElement, isStringLiteral, isTypeParameterDeclaration, isTypeReferenceNode, isVariableDeclaration } from "../../factory/nodeTests"; import { setTextRange } from "../../factory/utilitiesPublic"; -import { forEachChild,forEachChildRecursively } from "../../parser"; +import { forEachChildRecursively } from "../../parser"; import { nullTransformationContext } from "../../transformer"; -import { ArrayLiteralExpression, ArrowFunction, AsExpression, CallExpression, ConditionalExpression, DiagnosticWithLocation, EntityName, EntityNameOrEntityNameExpression, ExportAssignment, FunctionExpression, FunctionLikeDeclaration, GetAccessorDeclaration, HasInferredType, Identifier, KeywordTypeSyntaxKind, LiteralExpression, LiteralTypeNode, MethodSignature, Modifier, ModifierFlags, NewExpression, Node, NodeArray, NodeFlags, NodeWithTypeArguments, ObjectLiteralElementLike, ObjectLiteralExpression, ParameterDeclaration, ParenthesizedExpression, PrefixUnaryExpression, PropertyName, PropertySignature, QualifiedName, ReturnStatement, SatisfiesExpression, SetAccessorDeclaration, SignatureDeclaration, SourceFile, Statement, SyntaxKind, TemplateExpression, TemplateLiteralTypeSpan, TransformationContext,TypeAssertion, TypeElement, TypeLiteralNode, TypeNode, TypeReferenceNode, Visitor, VisitResult, YieldExpression } from "../../types"; -import { createDiagnosticForNode,getEffectiveModifierFlags, getSyntacticModifierFlags, getTokenPosOfNode, isEntityNameExpression, setParent } from "../../utilities"; -import { isClassLike, isExpression,isFunctionLike, isPropertyName, isTypeNode } from "../../utilitiesPublic"; +import { ArrayLiteralExpression, ArrowFunction, AsExpression, EntityNameOrEntityNameExpression, ExportAssignment, FunctionExpression, GetAccessorDeclaration, HasInferredType, Identifier, KeywordTypeSyntaxKind, LiteralExpression, MethodSignature, Modifier, Node, NodeArray, NodeFlags, ObjectLiteralElementLike, ObjectLiteralExpression, ParameterDeclaration, ParenthesizedExpression, PrefixUnaryExpression, PropertySignature, SetAccessorDeclaration, SourceFile, SyntaxKind, TransformationContext,TypeAssertion, TypeElement, TypeNode, Visitor, VisitResult } from "../../types"; +import { createDiagnosticForNode,isEntityNameExpression, setParent } from "../../utilities"; +import { isConstTypeReference, isPropertyName, isTypeNode } from "../../utilitiesPublic"; import { visitEachChild,visitNode, visitNodes } from "../../visitorPublic"; -const NO_LOCAL_INFERENCE = !!process.env.NO_LOCAL_INFERENCE; enum NarrowBehavior { None = 0, AsConst = 1, - KeepLiterals = 2, - AsConstOrKeepLiterals = AsConst | KeepLiterals, - NotKeepLiterals = ~KeepLiterals, } enum LocalTypeInfoFlags { None = 0, - Fresh = 1 << 0, - ImplicitAny = 1 << 1, - Invalid = 1 << 2, - Optimistic = 1 << 3, + Invalid = 1 << 1, } interface LocalInferenceResolver { @@ -34,19 +24,16 @@ interface LocalInferenceResolver { fromInitializer(node: HasInferredType | ExportAssignment, sourceFile: SourceFile): TypeNode; } export function createLocalInferenceResolver({ - setLocalInferenceTargetNode, setEnclosingDeclarations, visitDeclarationSubtree, checkEntityNameVisibility, ensureParameter, context, }: { - setLocalInferenceTargetNode(node: Node | undefined): Node | undefined; setEnclosingDeclarations(node: Node): Node; visitDeclarationSubtree(input: Node): VisitResult checkEntityNameVisibility(name: EntityNameOrEntityNameExpression, container?: Node): void; ensureParameter(p: ParameterDeclaration): ParameterDeclaration; - context: TransformationContext }): LocalInferenceResolver | undefined { let currentSourceFile: SourceFile | undefined; @@ -54,7 +41,6 @@ export function createLocalInferenceResolver({ if (!options.isolatedDeclarations) { return undefined; } - const resolver = context.getEmitResolver(); const { factory } = context; const strictNullChecks = !!options.strict || !!options.strictNullChecks; @@ -89,38 +75,7 @@ export function createLocalInferenceResolver({ } interface LocalTypeInfo { typeNode: TypeNode, sourceNode: Node, flags: LocalTypeInfoFlags } - // We need to see about getting the JSX element type. - function getJSXElementType(_node: Node): EntityName { - return factory.createQualifiedName( - factory.createQualifiedName( - factory.createIdentifier("React"), - factory.createIdentifier("JSX"), - ), - factory.createIdentifier("Element"), - ); - } - function entityNameExpressionToQualifiedName(node: EntityNameOrEntityNameExpression): EntityName { - if (isIdentifier(node)) { - return setTextRange(factory.cloneNode(node), node); - } - else if (isPropertyAccessExpression(node)) { - return setTextRange(factory.createQualifiedName( - entityNameExpressionToQualifiedName(node.expression), - factory.cloneNode(node.name) - ), node); - } - else if (isQualifiedName(node)) { - return setTextRange(factory.createQualifiedName( - entityNameExpressionToQualifiedName(node), - factory.cloneNode(node.right) - ), node); - } - throw Error("Should not happen"); - } - function isSyntheticTypeNode(node: Node): node is TypeNode { - return isTypeNode(node) && !!(node.flags & NodeFlags.Synthesized); - } function finalizeSyntheticTypeNode(typeNode: T, parent: Node): T { if (typeNode && typeNode.parent !== parent) { setParent(typeNode, parent); @@ -136,20 +91,9 @@ export function createLocalInferenceResolver({ } return typeNode as T & { isSynthetic: true }; } - function visitSyntheticType(typeNode: TypeNode, node: Node) { - const previousLocalInferenceTargetNode = setLocalInferenceTargetNode(node); - try { - const visitedNode = visitNode(finalizeSyntheticTypeNode(typeNode, node), visitDeclarationSubtree, isSyntheticTypeNode); - Debug.assert(visitedNode); - return visitedNode; - } - finally { - setLocalInferenceTargetNode(previousLocalInferenceTargetNode); - } - } function mergeFlags(existing: LocalTypeInfoFlags, newFlags: LocalTypeInfoFlags): LocalTypeInfoFlags { - return existing | (newFlags | LocalTypeInfoFlags.Optimistic); + return existing | newFlags; } function getAccessorInfo(properties: NodeArray, knownAccessor: SetAccessorDeclaration | GetAccessorDeclaration) { const nameKey = getMemberKey(knownAccessor); @@ -166,7 +110,6 @@ export function createLocalInferenceResolver({ otherAccessor && isSetAccessorDeclaration(otherAccessor) ? otherAccessor : undefined; - return { otherAccessorIndex, otherAccessor, @@ -177,132 +120,58 @@ export function createLocalInferenceResolver({ function inferAccessorType(getAccessor?: GetAccessorDeclaration, setAccessor?: SetAccessorDeclaration): LocalTypeInfo { if(getAccessor?.type){ - return regular( - deepClone(visitType(getAccessor.type, getAccessor)), - getAccessor - ); + return visitTypeAndClone(getAccessor.type, getAccessor); } if (setAccessor && setAccessor.parameters[0]?.type) { const parameterType = setAccessor.parameters[0].type; - return regular( - deepClone(visitType(parameterType, setAccessor)), - setAccessor - ); - } - - if (getAccessor) { - const localPropType = inferReturnType(getAccessor); - return localPropType; + return visitTypeAndClone(parameterType, setAccessor); } return invalid(getAccessor ?? setAccessor!); } function localInference(node: Node, inferenceFlags: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { - const nextInferenceFlags = inferenceFlags & NarrowBehavior.NotKeepLiterals; switch (node.kind) { case SyntaxKind.ParenthesizedExpression: return localInference((node as ParenthesizedExpression).expression, inferenceFlags); - case SyntaxKind.QualifiedName: - const typeNode = visitSyntheticType(factory.createTypeQueryNode( - entityNameExpressionToQualifiedName(node as QualifiedName) - ), node); - - return regular( - typeNode, - node, - LocalTypeInfoFlags.Optimistic - ); - case SyntaxKind.PropertyAccessExpression: - if (isEntityNameExpression(node)) { - const typeNode = visitSyntheticType(factory.createTypeQueryNode( - entityNameExpressionToQualifiedName(node) - ), node); - return regular( - typeNode, - node, - LocalTypeInfoFlags.Optimistic - ); - } - break; case SyntaxKind.Identifier: { if ((node as Identifier).escapedText === "undefined") { return createUndefinedTypeNode(node); } - const typeNode = visitSyntheticType(factory.createTypeQueryNode( - deepClone(node as Identifier) - ), node); - - return regular(typeNode, node, LocalTypeInfoFlags.Optimistic); + break; } case SyntaxKind.NullKeyword: if (strictNullChecks) { return regular(factory.createLiteralTypeNode(factory.createNull()), node); } else { - return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.ImplicitAny); - } - case SyntaxKind.CallExpression: - const callExpression = node as CallExpression; - if (isIdentifier(callExpression.expression) && callExpression.expression.escapedText === "Symbol") { - if (inferenceFlags & NarrowBehavior.KeepLiterals) { - return regular( - factory.createTypeOperatorNode( - SyntaxKind.UniqueKeyword, - factory.createKeywordTypeNode(SyntaxKind.SymbolKeyword) - ), - node - ); - } - else { - return regular( - factory.createKeywordTypeNode(SyntaxKind.SymbolKeyword), - node - ); - } + return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node); } - break; - case SyntaxKind.NewExpression: - const newExpr = node as NewExpression; - if (isEntityNameExpression(newExpr.expression)) { - const typeNode = visitSyntheticType(factory.createTypeReferenceNode( - entityNameExpressionToQualifiedName(newExpr.expression), - visitNodes(newExpr.typeArguments, deepClone, isTypeNode) - ), node); - // Optimistic since the constructor might not have the same name as the type - return regular(typeNode, node, LocalTypeInfoFlags.Optimistic); - } - return invalid(node); case SyntaxKind.ArrowFunction: case SyntaxKind.FunctionExpression: const fnNode = node as FunctionExpression | ArrowFunction; const oldEnclosingDeclaration = setEnclosingDeclarations(node); try { - const returnType = inferReturnType(fnNode); + const returnType = visitTypeAndClone(fnNode.type, fnNode); const fnTypeNode = factory.createFunctionTypeNode( visitNodes(fnNode.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone), fnNode.parameters.map(p => deepClone(ensureParameter(p))), returnType.typeNode, ); - // If the return type is optimistic, teh whole function type is optimistic const flags = mergeFlags(LocalTypeInfoFlags.None, returnType.flags); return regular(fnTypeNode, node, flags); } finally { setEnclosingDeclarations(oldEnclosingDeclaration); } - case SyntaxKind.SatisfiesExpression: { - const typeNode = localInference((node as SatisfiesExpression).expression); - return { ...typeNode, flags: typeNode.flags | LocalTypeInfoFlags.Optimistic }; - } case SyntaxKind.TypeAssertionExpression: case SyntaxKind.AsExpression: const asExpression = node as AsExpression | TypeAssertion; - if (isTypeReferenceNode(asExpression.type) && isConst(asExpression.type)) { + if (isTypeReferenceNode(asExpression.type) && isConstTypeReference(asExpression.type)) { return localInference(asExpression.expression, NarrowBehavior.AsConst); } else { - const type = visitType(asExpression.type, asExpression); + const type = asExpression.type if (isLiteralTypeNode(type) && (isNoSubstitutionTemplateLiteral(type.literal) || isStringLiteral(type.literal))) { return regular( @@ -312,35 +181,36 @@ export function createLocalInferenceResolver({ node ); } - return regular(deepClone(type), node); + + return visitTypeAndClone(type, asExpression); } case SyntaxKind.PrefixUnaryExpression: const prefixOp = node as PrefixUnaryExpression; if (prefixOp.operator === SyntaxKind.MinusToken || prefixOp.operator === SyntaxKind.PlusToken) { - if (NarrowBehavior.AsConstOrKeepLiterals & inferenceFlags) { + if (NarrowBehavior.AsConst & inferenceFlags) { switch (prefixOp.operand.kind) { case SyntaxKind.NumericLiteral: switch (prefixOp.operator) { case SyntaxKind.MinusToken: - return fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node); + return regular(factory.createLiteralTypeNode(deepClone(prefixOp)), node); case SyntaxKind.PlusToken: - return fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node); + return regular(factory.createLiteralTypeNode(deepClone(prefixOp)), node); } break; case SyntaxKind.BigIntLiteral: if (prefixOp.operator === SyntaxKind.MinusToken) { - return fresh(factory.createLiteralTypeNode(deepClone(prefixOp)), node); + return regular(factory.createLiteralTypeNode(deepClone(prefixOp)), node); } } } if(prefixOp.operator === SyntaxKind.PlusToken) { - return fresh(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), node); + return regular(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), node); } else if(prefixOp.operator === SyntaxKind.MinusToken) { return prefixOp.operand.kind === SyntaxKind.BigIntLiteral? - fresh(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword), node): - fresh(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), node); + regular(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword), node): + regular(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), node); } } break; @@ -348,54 +218,27 @@ export function createLocalInferenceResolver({ return literal(node, SyntaxKind.NumberKeyword, inferenceFlags); case SyntaxKind.TemplateExpression: if (!(inferenceFlags & NarrowBehavior.AsConst)) { - return fresh(factory.createKeywordTypeNode(SyntaxKind.StringKeyword), node); + return regular(factory.createKeywordTypeNode(SyntaxKind.StringKeyword), node); } - const templateExpression = node as TemplateExpression; - const templateSpans: TemplateLiteralTypeSpan[] = []; - let flags = LocalTypeInfoFlags.None; - for (const span of templateExpression.templateSpans) { - const { typeNode, flags: typeFlags } = localInference(span.expression, nextInferenceFlags); - const literalSpan = factory.createTemplateLiteralTypeSpan( - typeNode, - span.literal - ); - flags = mergeFlags(flags, typeFlags); - templateSpans.push(literalSpan); - } - return regular( - factory.createTemplateLiteralType(deepClone(templateExpression.head), templateSpans), - node, - flags - ); + return invalid(node); case SyntaxKind.NoSubstitutionTemplateLiteral: case SyntaxKind.StringLiteral: return literal(node, SyntaxKind.StringKeyword, inferenceFlags); case SyntaxKind.BigIntLiteral: return literal(node, SyntaxKind.BigIntKeyword, inferenceFlags); - case SyntaxKind.RegularExpressionLiteral: - return literal(node, "RegExp", inferenceFlags, LocalTypeInfoFlags.Optimistic); - case SyntaxKind.JsxSelfClosingElement: - case SyntaxKind.JsxElement: - const typeReference = finalizeSyntheticTypeNode(factory.createTypeReferenceNode(getJSXElementType(node)), node.parent); - checkEntityNameVisibility(typeReference.typeName); - return fresh(typeReference, node); case SyntaxKind.TrueKeyword: case SyntaxKind.FalseKeyword: return literal(node, SyntaxKind.BooleanKeyword, inferenceFlags); case SyntaxKind.ArrayLiteralExpression: + if (!(inferenceFlags & NarrowBehavior.AsConst)) { + return invalid(node); + } const arrayLiteral = node as ArrayLiteralExpression; const elementTypesInfo: LocalTypeInfo[] = []; let inheritedArrayTypeFlags = LocalTypeInfoFlags.None; for (const element of arrayLiteral.elements) { if (isSpreadElement(element)) { - const spreadType = localInference(element.expression, nextInferenceFlags); - const elementTypeNode = inferenceFlags & NarrowBehavior.AsConst ? - factory.createRestTypeNode(spreadType.typeNode) : - factory.createIndexedAccessTypeNode(spreadType.typeNode, factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)); - inheritedArrayTypeFlags = mergeFlags(inheritedArrayTypeFlags, spreadType.flags); - elementTypesInfo.push( - { ...spreadType, typeNode: elementTypeNode } - ); + return invalid(element); } else if (isOmittedExpression(element)) { elementTypesInfo.push( @@ -403,46 +246,43 @@ export function createLocalInferenceResolver({ ); } else { - const elementType = localInference(element, nextInferenceFlags); + const elementType = localInference(element, inferenceFlags); inheritedArrayTypeFlags = mergeFlags(inheritedArrayTypeFlags, elementType.flags); elementTypesInfo.push(elementType); } } - if (inferenceFlags & NarrowBehavior.AsConst) { - const tupleType = factory.createTupleTypeNode( - elementTypesInfo.map(lti => lti.typeNode) - ); - tupleType.emitNode = { flags: 1, autoGenerate: undefined, internalFlags: 0 }; - return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node, inheritedArrayTypeFlags); - } - else { - let itemType; - if (elementTypesInfo.length === 0) { - itemType = (strictNullChecks ? factory.createKeywordTypeNode(SyntaxKind.NeverKeyword) : factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)); - } - else { - itemType = makeUnionFromTypes(node, elementTypesInfo, /*widenSingle*/ false).typeNode; - } + const tupleType = factory.createTupleTypeNode( + elementTypesInfo.map(lti => lti.typeNode) + ); + tupleType.emitNode = { flags: 1, autoGenerate: undefined, internalFlags: 0 }; + return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node, inheritedArrayTypeFlags); - return regular(factory.createArrayTypeNode(itemType), node, inheritedArrayTypeFlags | LocalTypeInfoFlags.Optimistic); - } case SyntaxKind.ObjectLiteralExpression: { const objectLiteral = node as ObjectLiteralExpression; const properties: TypeElement[] = []; - let addedIntersections: TypeNode[] | undefined; for (let propIndex = 0, length = objectLiteral.properties.length; propIndex < length; propIndex++) { const prop = objectLiteral.properties[propIndex]; + + if (isShorthandPropertyAssignment(prop)) { + return invalid(prop); + } + else if (isSpreadAssignment(prop)) { + return invalid(prop); + } + if (prop.name && isComputedPropertyName(prop.name) && isEntityNameExpression(prop.name.expression)) { checkEntityNameVisibility(prop.name.expression, prop); } - const name = prop.name && deepClone(visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!); + + const name = deepClone(visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!); let inheritedObjectTypeFlags = LocalTypeInfoFlags.None; let newProp; - if (isMethodDeclaration(prop) && name) { + if (isMethodDeclaration(prop)) { const oldEnclosingDeclaration = setEnclosingDeclarations(prop); try { - const returnType = inferReturnType(prop); + const returnType = visitTypeAndClone(prop.type, prop); + const typeParameters = visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone); // TODO: We need to see about inheriting flags from parameters const parameters = prop.parameters.map(p => deepClone(ensureParameter(p))); @@ -474,26 +314,12 @@ export function createLocalInferenceResolver({ setEnclosingDeclarations(oldEnclosingDeclaration); } } - else if (isPropertyAssignment(prop) && name) { - const modifiers = inferenceFlags & NarrowBehavior.AsConst ? - [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : - []; - const { typeNode, flags: propTypeFlags } = localInference(prop.initializer, nextInferenceFlags); - inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, propTypeFlags); - newProp = factory.createPropertySignature( - modifiers, - name, - /*questionToken*/ undefined, - typeNode - ); - } - else if (isShorthandPropertyAssignment(prop) && name) { + else if (isPropertyAssignment(prop)) { const modifiers = inferenceFlags & NarrowBehavior.AsConst ? [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : []; - const { typeNode, flags: propTypeFlags } = localInference(prop.name, nextInferenceFlags); + const { typeNode, flags: propTypeFlags } = localInference(prop.initializer, inferenceFlags); inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, propTypeFlags); - newProp = factory.createPropertySignature( modifiers, name, @@ -501,88 +327,45 @@ export function createLocalInferenceResolver({ typeNode ); } - else if (isSpreadAssignment(prop)) { - addedIntersections ??= []; - const { typeNode, flags: spreadTypeFlags } = localInference(prop.expression, nextInferenceFlags); - // Spread types are always optimistic - inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, spreadTypeFlags) | LocalTypeInfoFlags.Optimistic; - addedIntersections.push(typeNode); - } else { - if (isGetAccessorDeclaration(prop) || isSetAccessorDeclaration(prop)) { - const nameKey = getMemberKey(prop); - if (nameKey && name) { - const { getAccessor, setAccessor, otherAccessorIndex } = getAccessorInfo(objectLiteral.properties, prop); - if (otherAccessorIndex === -1 || otherAccessorIndex > propIndex) { - const accessorType = inferAccessorType(getAccessor, setAccessor); - const modifiers: Modifier[] = []; - if (!setAccessor) { - modifiers.push(factory.createModifier(SyntaxKind.ReadonlyKeyword)); - } - inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, accessorType.flags); - newProp = factory.createPropertySignature( - modifiers, - name, - /*questionToken*/ undefined, - accessorType.typeNode, - ); - } - } - else { - return invalid(prop); - } + if (!isGetAccessorDeclaration(prop) && !isSetAccessorDeclaration(prop)) { + Debug.assertNever(prop); } - else { - return invalid(prop); + const nameKey = getMemberKey(prop); + if (!nameKey) { + return invalid(prop) } - } + const { getAccessor, setAccessor, otherAccessorIndex } = getAccessorInfo(objectLiteral.properties, prop); + if (otherAccessorIndex === -1 || otherAccessorIndex > propIndex) { + const accessorType = inferAccessorType(getAccessor, setAccessor); + const modifiers: Modifier[] = []; + if (!setAccessor) { + modifiers.push(factory.createModifier(SyntaxKind.ReadonlyKeyword)); + } + inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, accessorType.flags); + newProp = factory.createPropertySignature( + modifiers, + name, + /*questionToken*/ undefined, + accessorType.typeNode, + ); + } + } if (newProp) { - const prevPos = newProp.name.pos; - const newPos = getTokenPosOfNode(newProp.name, currentSourceFile); - - setTextRange(newProp.name, { - pos: newPos, - end: newProp.name.end - }); - setTextRange(newProp, { - pos: prevPos, - end: newProp.name.end, - }); - setCommentRange(newProp, { - pos: prevPos, - end: newProp.name.pos - }); - properties.push(newProp); } } - let typeNode: TypeNode = factory.createTypeLiteralNode(properties); - if (addedIntersections) { - if (properties.length !== 0) { - addedIntersections.push(typeNode); - } - typeNode = factory.createIntersectionTypeNode(addedIntersections); - } + const typeNode: TypeNode = factory.createTypeLiteralNode(properties); return regular(typeNode, objectLiteral); } - case SyntaxKind.ConditionalExpression: - const conditionalExpression = node as ConditionalExpression; - const types = [ - localInference(conditionalExpression.whenTrue, inferenceFlags & ~NarrowBehavior.AsConst), - localInference(conditionalExpression.whenFalse, inferenceFlags & ~NarrowBehavior.AsConst), - ]; - return makeUnionFromTypes(node, types, /*widenSingle*/ false); } return invalid(node); } - function invalid(node: Node): LocalTypeInfo { - return { typeNode: makeInvalidTypeAndReport(node), flags: LocalTypeInfoFlags.Invalid, sourceNode: node }; - } - function fresh(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { - return { typeNode: finalizeSyntheticTypeNode(typeNode, sourceNode.parent), flags: flags | LocalTypeInfoFlags.Fresh, sourceNode }; + function invalid(sourceNode: Node): LocalTypeInfo { + return { typeNode: makeInvalidTypeAndReport(sourceNode), flags: LocalTypeInfoFlags.Invalid, sourceNode }; } function regular(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { return { typeNode: finalizeSyntheticTypeNode(typeNode, sourceNode.parent), flags, sourceNode }; @@ -608,36 +391,35 @@ export function createLocalInferenceResolver({ , node, flags); } else { - return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, LocalTypeInfoFlags.ImplicitAny | flags); + return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, flags); } } function literal(node: Node, baseType: string | KeywordTypeSyntaxKind, narrowBehavior: NarrowBehavior, flags: LocalTypeInfoFlags = 0) { - if (narrowBehavior & NarrowBehavior.AsConstOrKeepLiterals) { - return fresh(factory.createLiteralTypeNode( + if (narrowBehavior & NarrowBehavior.AsConst) { + return regular(factory.createLiteralTypeNode( normalizeLiteralValue(node as LiteralExpression) ), node, flags); } else { - return fresh( + return regular( typeof baseType === "number" ? factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType), node, flags ); } } - function isConst(typeReference: TypeReferenceNode) { - return isIdentifier(typeReference.typeName) && typeReference.typeName.escapedText === "const"; - } function makeInvalidTypeAndReport(node: Node) { reportIsolatedDeclarationError(node); return makeInvalidType() ; } - function visitType(type: TypeNode | undefined, owner: Node) { + function visitTypeAndClone(type: TypeNode | undefined, owner: Node) { const visitedType = visitNode(type, visitDeclarationSubtree, isTypeNode); - return visitedType ?? makeInvalidTypeAndReport(owner); + if(!visitedType) return invalid(owner); + return regular(deepClone(visitedType), owner) } - function getMemberNameKey(name: PropertyName) { + function getMemberKey(member: MethodSignature | PropertySignature | GetAccessorDeclaration | SetAccessorDeclaration) { + const name = member.name; if (isIdentifier(name)) { return "I:" + name.escapedText; } @@ -669,668 +451,6 @@ export function createLocalInferenceResolver({ } return undefined; } - function getMemberKey(member: MethodSignature | PropertySignature | GetAccessorDeclaration | SetAccessorDeclaration) { - return getMemberNameKey(member.name); - } - - function getWidenedType(localTypeInfo: LocalTypeInfo) { - if ((localTypeInfo.flags & LocalTypeInfoFlags.Fresh) && isLiteralTypeNode(localTypeInfo.typeNode)) { - const literal = localTypeInfo.typeNode.literal; - return ( - literal.kind === SyntaxKind.StringLiteral ? factory.createKeywordTypeNode(SyntaxKind.StringKeyword) : - literal.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : - literal.kind === SyntaxKind.PrefixUnaryExpression && (literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral ? factory.createKeywordTypeNode(SyntaxKind.NumberKeyword) : - literal.kind === SyntaxKind.BigIntLiteral ? factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword) : - literal.kind === SyntaxKind.TrueKeyword || literal.kind === SyntaxKind.FalseKeyword ? factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword) : - localTypeInfo.typeNode - ); - } - - return localTypeInfo.typeNode; - } - function makeUnionFromTypes(sourceNode: Node, types: LocalTypeInfo[], widenSingle: boolean) { - const [unionConstituents, flags] = deduplicateUnion(types); - if (unionConstituents.length === 1) { - const localType = unionConstituents[0]; - - return widenSingle ? { ...localType, typeNode: getWidenedType(localType) } : localType; - } - const unionConstituentsTypes = collapseLiteralTypesIntoBaseTypes(unionConstituents); - - normalizeObjectUnion(unionConstituentsTypes); - return regular( - unionConstituentsTypes.length === 1 ? unionConstituentsTypes[0] : factory.createUnionTypeNode(unionConstituentsTypes), - sourceNode, - LocalTypeInfoFlags.Optimistic | flags - ); - - function collapseLiteralTypesIntoBaseTypes(nodes: LocalTypeInfo[]) { - enum CollapsibleTypes { - None = 0, - String = 1 << 1, - Number = 1 << 2, - True = 1 << 3, - False = 1 << 4, - Boolean = True | False, - BigInt = 1 << 5, - Any = 1 << 7, - ImplicitAny = 1 << 8 - } - let baseTypes = CollapsibleTypes.None; - let literalTypes = CollapsibleTypes.None; - for (const type of nodes) { - switch (type.typeNode.kind) { - case SyntaxKind.TemplateLiteralType: - literalTypes |= CollapsibleTypes.String; - break; - case SyntaxKind.AnyKeyword: - if (type.flags & LocalTypeInfoFlags.ImplicitAny) { - literalTypes |= CollapsibleTypes.ImplicitAny; - } - else { - baseTypes |= CollapsibleTypes.Any; - } - break; - case SyntaxKind.BooleanKeyword: - baseTypes |= CollapsibleTypes.Boolean; - break; - case SyntaxKind.StringKeyword: - baseTypes |= CollapsibleTypes.String; - break; - case SyntaxKind.NumberKeyword: - baseTypes |= CollapsibleTypes.Number; - break; - case SyntaxKind.BigIntKeyword: - baseTypes |= CollapsibleTypes.BigInt; - break; - case SyntaxKind.LiteralType: - const literalType = type.typeNode as LiteralTypeNode; - switch (literalType.literal.kind) { - case SyntaxKind.TrueKeyword: - literalTypes |= CollapsibleTypes.True; - break; - case SyntaxKind.FalseKeyword: - literalTypes |= CollapsibleTypes.False; - break; - case SyntaxKind.NumericLiteral: - literalTypes |= CollapsibleTypes.Number; - break; - case SyntaxKind.PrefixUnaryExpression: - if ((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { - literalTypes |= CollapsibleTypes.Number; - } - break; - case SyntaxKind.StringLiteral: - case SyntaxKind.NoSubstitutionTemplateLiteral: - case SyntaxKind.TemplateExpression: - literalTypes |= CollapsibleTypes.String; - break; - case SyntaxKind.BigIntLiteral: - literalTypes |= CollapsibleTypes.BigInt; - break; - } - } - } - // If true and false are both present, act as if we found boolean itself - if ((literalTypes & CollapsibleTypes.Boolean) === CollapsibleTypes.Boolean) { - baseTypes |= CollapsibleTypes.Boolean; - } - const typesToCollapse = baseTypes & literalTypes; - - if (baseTypes & CollapsibleTypes.Any) { - return [factory.createKeywordTypeNode(SyntaxKind.AnyKeyword)]; - } - // Nothing to collapse or reorder - if (baseTypes === CollapsibleTypes.None) return nodes.map(n => n.typeNode); - const result: TypeNode[] = []; - - // We do a best effort to preserve TS union order for primitives - if (baseTypes & CollapsibleTypes.String) { - result.push(factory.createKeywordTypeNode(SyntaxKind.StringKeyword)); - } - if (baseTypes & CollapsibleTypes.Number) { - result.push(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword)); - } - if (baseTypes & CollapsibleTypes.Boolean) { - result.push(factory.createKeywordTypeNode(SyntaxKind.BooleanKeyword)); - } - if (baseTypes & CollapsibleTypes.BigInt) { - result.push(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword)); - } - if (!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.True) { - result.push(factory.createLiteralTypeNode(factory.createTrue())); - } - if (!(baseTypes & CollapsibleTypes.Boolean) && literalTypes & CollapsibleTypes.False) { - result.push(factory.createLiteralTypeNode(factory.createFalse())); - } - - for (const type of nodes) { - let typeofNode = CollapsibleTypes.None; - - switch (type.typeNode.kind) { - case SyntaxKind.BooleanKeyword: - case SyntaxKind.StringKeyword: - case SyntaxKind.NumberKeyword: - case SyntaxKind.BigIntKeyword: - case SyntaxKind.AnyKeyword: - // They were already added - continue; - case SyntaxKind.TemplateLiteralType: - typeofNode = CollapsibleTypes.String; - break; - case SyntaxKind.LiteralType: - const literalType = type.typeNode as LiteralTypeNode; - switch (literalType.literal.kind) { - case SyntaxKind.TrueKeyword: - continue; - case SyntaxKind.FalseKeyword: - continue; - case SyntaxKind.NumericLiteral: - typeofNode = CollapsibleTypes.Number; - break; - case SyntaxKind.PrefixUnaryExpression: - if ((literalType.literal as PrefixUnaryExpression).operand.kind === SyntaxKind.NumericLiteral) { - typeofNode = CollapsibleTypes.Number; - } - break; - case SyntaxKind.StringLiteral: - case SyntaxKind.NoSubstitutionTemplateLiteral: - case SyntaxKind.TemplateExpression: - typeofNode = CollapsibleTypes.String; - break; - case SyntaxKind.BigIntLiteral: - typeofNode = CollapsibleTypes.BigInt; - break; - } - } - // Not a node of interest, do not change - if ((typeofNode & typesToCollapse) === 0) { - result.push(type.typeNode); - } - } - return result; - } - function deduplicateUnion(nodes: LocalTypeInfo[]) { - const typeInfoCache = new Map - }>(); - const union: LocalTypeInfo[] = []; - let implicitAnyNode: LocalTypeInfo | undefined; - let mergedUnionFlags = LocalTypeInfoFlags.None; - for (const node of nodes) { - mergedUnionFlags = mergeFlags(mergedUnionFlags, node.flags); - // Do not add implicit any unless it's the only type in the array - if (!strictNullChecks && node.flags & LocalTypeInfoFlags.ImplicitAny) { - implicitAnyNode = node; - continue; - } - const existing = union.find(u => typesEqual(node.typeNode, node.sourceNode, u.typeNode, u.sourceNode)); - if (existing === undefined) { - union.push(node); - } - else { - existing.flags &= node.flags; - } - } - if (union.length === 0 && implicitAnyNode) { - union.push(implicitAnyNode); - } - return [union, mergedUnionFlags] as const; - - function getTypeInfo(type: TypeLiteralNode, errorTarget: Node | undefined) { - const typeNodeId = getNodeId(type); - let typeInfo = typeInfoCache.get(typeNodeId); - if (typeInfo) return typeInfo; - - typeInfo = { - node: type, - members: new Map() - }; - for (const member of type.members) { - const isMethod = isMethodSignature(member); - const isProp = isPropertySignature(member); - if (isMethod || isProp) { - const memberKey = getMemberKey(member); - if (memberKey === undefined) { - makeInvalidTypeAndReport(errorTarget ?? member); - break; - } - typeInfo.members.set(memberKey, member); - } - else { - makeInvalidTypeAndReport(errorTarget ?? member); - } - } - typeInfoCache.set(typeNodeId, typeInfo); - return typeInfo; - } - function entityNameEqual(aTypeName: EntityName, bTypeName: EntityName) { - while (true) { - if (aTypeName.kind === SyntaxKind.QualifiedName && bTypeName.kind === SyntaxKind.QualifiedName) { - if (aTypeName.right.escapedText !== bTypeName.right.escapedText) return false; - aTypeName = aTypeName.left; - bTypeName = bTypeName.left; - } - else if (aTypeName.kind === SyntaxKind.Identifier && bTypeName.kind === SyntaxKind.Identifier) { - return aTypeName.escapedText === bTypeName.escapedText; - } - else { - return false; - } - } - } - function signatureEqual(a: SignatureDeclaration, aErrorTarget: Node | undefined, b: SignatureDeclaration, bErrorTarget: Node | undefined) { - if (!typesEqual(a.type, aErrorTarget, b.type, bErrorTarget)) { - return false; - } - if (a.parameters.length !== b.parameters.length) { - return false; - } - - return a.parameters.every((aParam, index) => isParameterEqual(aParam, b.parameters[index])); - - // Isolated declarations finish equality - function isParameterEqual(a: ParameterDeclaration, b: ParameterDeclaration) { - if (!!a.questionToken !== !!b.questionToken) { - return false; - } - return typesEqual(a.type, aErrorTarget, b.type, bErrorTarget); - } - } - function nodeTypeArgumentsEqual(a: NodeWithTypeArguments, aErrorTarget: Node | undefined, b: NodeWithTypeArguments, bErrorTarget: Node | undefined) { - if (a.typeArguments === undefined && b.typeArguments === undefined) { - return true; - } - if (a.typeArguments?.length !== b.typeArguments?.length) { - return false; - } - - return !!a.typeArguments?.every((aArg, index) => typesEqual(aArg, aErrorTarget, b.typeArguments?.[index], bErrorTarget)); - } - function typesEqual(a: TypeNode | undefined, aErrorTarget: Node | undefined, b: TypeNode | undefined, bErrorTarget: Node | undefined): boolean { - if (a === undefined || b === undefined) return a === b; - if (a.kind !== b.kind) return false; - switch (a.kind) { - case SyntaxKind.AnyKeyword: - case SyntaxKind.UnknownKeyword: - case SyntaxKind.NumberKeyword: - case SyntaxKind.BigIntKeyword: - case SyntaxKind.ObjectKeyword: - case SyntaxKind.BooleanKeyword: - case SyntaxKind.StringKeyword: - case SyntaxKind.SymbolKeyword: - case SyntaxKind.VoidKeyword: - case SyntaxKind.UndefinedKeyword: - case SyntaxKind.NeverKeyword: - return true; - } - if (isLiteralTypeNode(a) && isLiteralTypeNode(b)) { - let aLiteral = a.literal; - let bLiteral = b.literal; - while (true) { - switch (aLiteral.kind) { - case SyntaxKind.NullKeyword: - case SyntaxKind.TrueKeyword: - case SyntaxKind.FalseKeyword: - return aLiteral.kind === bLiteral.kind; - case SyntaxKind.NumericLiteral: - return aLiteral.kind === bLiteral.kind && +aLiteral.text === +(bLiteral).text; - case SyntaxKind.StringLiteral: - case SyntaxKind.NoSubstitutionTemplateLiteral: - return (bLiteral.kind === SyntaxKind.StringLiteral || bLiteral.kind === SyntaxKind.NoSubstitutionTemplateLiteral) - && aLiteral.text === (bLiteral).text; - case SyntaxKind.PrefixUnaryExpression: - const aUnary = (aLiteral as PrefixUnaryExpression); - const bUnary = (bLiteral as PrefixUnaryExpression); - if (aUnary.operator !== bUnary.operator) return false; - - aLiteral = aUnary.operand as LiteralExpression; - bLiteral = bUnary.operand as LiteralExpression; - return +aLiteral.text === +bLiteral.text; - default: - return false; - } - } - } - else if (isArrayTypeNode(a) && isArrayTypeNode(b)) { - return typesEqual(a.elementType, aErrorTarget, b.elementType, bErrorTarget); - } - else if (isTypeReferenceNode(a) && isTypeReferenceNode(b)) { - if (!entityNameEqual(a.typeName, b.typeName)) { - return false; - } - return nodeTypeArgumentsEqual(a, aErrorTarget, b, bErrorTarget); - } - else if (isTypeLiteralNode(a) && isTypeLiteralNode(b)) { - if (a.members.length !== b.members.length) return false; - const aTypeInfo = getTypeInfo(a, aErrorTarget); - if (!aTypeInfo) return false; - - for (const bMember of b.members) { - const bIsMethod = isMethodSignature(bMember); - const bIsProp = isPropertySignature(bMember); - if (bIsMethod || bIsProp) { - const memberKey = getMemberKey(bMember); - if (memberKey === undefined) { - makeInvalidTypeAndReport(bErrorTarget ?? bMember); - break; - } - const aMember = aTypeInfo.members.get(memberKey); - if (!aMember) return false; - if ((aMember.questionToken !== undefined) !== (bMember.questionToken !== undefined)) return false; - if (getSyntacticModifierFlags(aMember) !== getSyntacticModifierFlags(bMember)) return false; - if (bIsProp && isPropertySignature(aMember)) { - if (!typesEqual(aMember.type, aErrorTarget, bMember.type, bErrorTarget)) { - return false; - } - } - else if (bIsMethod && isMethodSignature(aMember)) { - return signatureEqual(aMember, aErrorTarget, bMember, bErrorTarget); - } - } - else { - makeInvalidTypeAndReport(bErrorTarget ?? bMember); - } - } - return true; - } - else if (isFunctionTypeNode(a) && isFunctionTypeNode(b)) { - return signatureEqual(a, aErrorTarget, b, bErrorTarget); - } - else if (isConstructorTypeNode(a) && isConstructorTypeNode(b)) { - return signatureEqual(a, aErrorTarget, b, bErrorTarget); - } - else if (isTypeQueryNode(a) && isTypeQueryNode(b)) { - if (!entityNameEqual(a.exprName, b.exprName)) { - return false; - } - return nodeTypeArgumentsEqual(a, aErrorTarget, b, bErrorTarget); - } - else { - return false; - } - } - } - function normalizeObjectUnion(nodes: (TypeNode | undefined)[]) { - const allProps = new Map(); - const allTypeLookup = new Array | undefined>(); - let hasChanged = false; - for (let i = 0; i < nodes.length; i++) { - const type = nodes[i]; - const typeLookup = new Map(); - allTypeLookup.push(typeLookup); - - if (!type || !isTypeLiteralNode(type)) continue; - for (const member of type.members) { - const isMethod = isMethodSignature(member); - const isProp = isPropertySignature(member); - if (isMethod || isProp) { - const memberKey = getMemberKey(member); - if (memberKey === undefined) { - nodes[i] = makeInvalidTypeAndReport(member.name); - allTypeLookup[i] = undefined; - hasChanged = true; - break; - } - let type; - if (isProp) { - type = member.type ?? makeInvalidTypeAndReport(member); - } - else { - type = factory.createFunctionTypeNode( - member.typeParameters, - member.parameters, - member.type!, - ); - } - let propInfo = allProps.get(memberKey); - if (!propInfo) { - propInfo = { - types: new Array(nodes.length), - name: member.name, - isReadonly: false, - }; - allProps.set(memberKey, propInfo); - } - propInfo.types[i] = type; - propInfo.isReadonly ||= !!(getSyntacticModifierFlags(member) & ModifierFlags.Readonly); - typeLookup.set(memberKey, type); - } - else { - nodes[i] = makeInvalidTypeAndReport(member); - allTypeLookup[i] = undefined; - hasChanged = true; - break; - } - } - } - for (const [, propTypes] of allProps) { - normalizeObjectUnion(propTypes.types); - } - for (let typeIndex = 0; typeIndex < nodes.length; typeIndex++) { - const type = nodes[typeIndex]; - const props = allTypeLookup[typeIndex]; - if (!type || !isTypeLiteralNode(type) || !props) continue; - - let newMembers: TypeElement[] | undefined; - for (const [commonProp, propInfo] of allProps) { - const propType = props.get(commonProp); - if (propType) { - if (propType !== propInfo.types[typeIndex]) { - const indexOfProp = findIndex(type.members, e => isPropertySignature(e) && getMemberKey(e) === commonProp); - if (indexOfProp !== -1) { - if (newMembers === undefined) { - newMembers = [...type.members]; - } - const existingMember = type.members[indexOfProp] as PropertySignature; - newMembers[indexOfProp] = factory.createPropertySignature( - existingMember.modifiers, - existingMember.name, - existingMember.questionToken, - propInfo.types[typeIndex] - ); - } - } - } - else { - if (newMembers === undefined) { - newMembers = [...type.members]; - } - newMembers.push(factory.createPropertySignature( - propInfo.isReadonly ? [factory.createToken(SyntaxKind.ReadonlyKeyword)] : undefined, - deepClone(propInfo.name), - factory.createToken(SyntaxKind.QuestionToken), - factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), - )); - } - } - if (newMembers) { - hasChanged = true; - nodes[typeIndex] = factory.createTypeLiteralNode(newMembers); - } - } - return hasChanged; - } - } - function inferReturnType(node: FunctionLikeDeclaration) { - if (node.type) { - return regular(deepClone(visitType(node.type, node)), node); - } - if (!node.body) { - return regular(makeInvalidTypeAndReport(node), node); - } - - const returnStatements: ReturnStatement[] = []; - const yieldExpressions: YieldExpression[] = []; - - let returnType; - if (!isBlock(node.body)) { - returnType = makeUnionFromTypes(node, [ - localInference(node.body, NarrowBehavior.KeepLiterals) - ], /*widenSingle*/ true); - } - else { - collectReturnAndYield(node.body, returnStatements, yieldExpressions); - if (returnStatements.length === 0) { - returnType = regular(factory.createKeywordTypeNode(SyntaxKind.VoidKeyword), node); - } - else { - returnType = inferFromOutputs(node, returnStatements, node.asteriskToken ? SyntaxKind.NeverKeyword : SyntaxKind.VoidKeyword); - } - } - let yieldType: LocalTypeInfo | undefined; - if (node.asteriskToken) { - if (yieldExpressions.length === 0) { - yieldType = regular( - factory.createKeywordTypeNode(SyntaxKind.NeverKeyword), - node - ); - } - else { - yieldType = inferFromOutputs(node, yieldExpressions, strictNullChecks ? SyntaxKind.UndefinedKeyword : SyntaxKind.AnyKeyword); - } - } - return makeFinalReturnType(node, returnType, yieldType); - - function inferFromOutputs(node: Node, statements: (YieldExpression | ReturnStatement)[], emptyType: KeywordTypeSyntaxKind) { - const returnStatementInference: LocalTypeInfo[] = []; - let hasOnlyEmpty = true; - for (const r of statements) { - if (r.expression) { - returnStatementInference.push(localInference(r.expression, NarrowBehavior.KeepLiterals)); - hasOnlyEmpty = false; - } - else { - returnStatementInference.push( - createUndefinedTypeNode(r, LocalTypeInfoFlags.Fresh) - ); - } - } - if (hasOnlyEmpty) { - return fresh(factory.createKeywordTypeNode(emptyType), node); - } - else { - return makeUnionFromTypes(node, returnStatementInference, /*widenSingle*/ true); - } - } - function makeFinalReturnType(node: FunctionLikeDeclaration, returnType: LocalTypeInfo, yieldType: LocalTypeInfo | undefined) { - const modifiers = getEffectiveModifierFlags(node); - if (node.asteriskToken) { - const yieldTypeNode = yieldType?.typeNode ?? factory.createKeywordTypeNode(SyntaxKind.VoidKeyword); - return regular( - factory.createTypeReferenceNode( - factory.createIdentifier(modifiers & ModifierFlags.Async ? "AsyncGenerator" : "Generator"), - [yieldTypeNode, returnType.typeNode, factory.createKeywordTypeNode(SyntaxKind.UnknownKeyword)], - ), - returnType.sourceNode, - returnType.flags - ); - } - else if (modifiers & ModifierFlags.Async) { - return regular( - factory.createTypeReferenceNode( - factory.createIdentifier("Promise"), - [returnType.typeNode], - ), - returnType.sourceNode, - returnType.flags - ); - } - return returnType; - } - function collectReturnAndYield(node: Node, result: ReturnStatement[], yieldExpressions: YieldExpression[]) { - forEachChild(node, child => { - if (isReturnStatement(child)) { - result.push(child); - } - if (isYieldExpression(child)) { - yieldExpressions.push(child); - } - if (isClassLike(child) || isFunctionLike(child)) { - return; - } - // TODO: Do not walk all children if not generator function - collectReturnAndYield(child, result, yieldExpressions); - }); - } - } - function inferFunctionMembers(scope: { statements: NodeArray }, functionName: Identifier, localType: LocalTypeInfo): LocalTypeInfo { - if (!isFunctionTypeNode(localType.typeNode)) return localType; - let mergedFlags = LocalTypeInfoFlags.None; - const members = new Map(); - for (const statement of scope.statements) { - // Looking for name functionName.member = init; - if (!isExpressionStatement(statement)) continue; - if(!isBinaryExpression(statement.expression)) continue; - const assignment = statement.expression; - if(assignment.operatorToken.kind !== SyntaxKind.EqualsToken) continue; - - const isPropertyAccess = isPropertyAccessExpression(assignment.left); - if(isPropertyAccess || isElementAccessExpression(assignment.left) - && isIdentifier(assignment.left.expression) - && assignment.left.expression.escapedText === functionName.escapedText) { - - let name; - if(isPropertyAccess) { - name = deepClone(assignment.left.name); - } - else { - const argumentExpression = visitNode(assignment.left.argumentExpression, visitDeclarationSubtree, isExpression)!; - name = factory.createComputedPropertyName(deepClone(argumentExpression)); - } - const key = getMemberNameKey(name); - if(!key) { - continue; - } - - const propType = localInference(assignment.right); - let memberInfo = members.get(key); - if(!memberInfo) { - members.set(key, memberInfo = { - name, - type: [] - }); - } - memberInfo.type.push(propType); - } - } - if (members.size) { - const inferredMembers = [ - factory.createCallSignature( - localType.typeNode.typeParameters, - localType.typeNode.parameters, - localType.typeNode.type - ) - ]; - for(const member of members.values()) { - const propType = makeUnionFromTypes(member.name, member.type, /*widenSingle*/ false); - mergedFlags = mergeFlags(mergedFlags, propType.flags); - - factory.createPropertySignature( - [], - member.name, - /*questionToken*/ undefined, - propType.typeNode - ); - } - return { - sourceNode: localType.sourceNode, - flags: mergeFlags(localType.flags, mergedFlags) , - typeNode: factory.createTypeLiteralNode( - inferredMembers - ), - }; - } - return localType; - } // Copied similar function in checker. Maybe a reusable one should be created. function deepClone(node: T): T { @@ -1357,55 +477,26 @@ export function createLocalInferenceResolver({ } } - function localInferenceFromInitializer(node: HasInferredType | ExportAssignment): TypeNode | undefined { - if (NO_LOCAL_INFERENCE) { - return undefined; - } let localType; - let actualTypeNode: Node = node; if (isExportAssignment(node) && node.expression) { localType = localInference(node.expression); - actualTypeNode = node.expression; } else if (isParameter(node) && node.initializer) { localType = localInference(node.initializer); } else if (isVariableDeclaration(node) && node.initializer) { - - localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals : NarrowBehavior.None); - if (isVariableStatement(node.parent.parent) && - node.parent.flags & NodeFlags.Const && - isIdentifier(node.name) && - (isBlock(node.parent.parent.parent) || isSourceFile(node.parent.parent.parent))) { - localType = inferFunctionMembers(node.parent.parent.parent, node.name, localType); - } + localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.AsConst : NarrowBehavior.None); } else if (isPropertyDeclaration(node) && node.initializer) { localType = localInference(node.initializer); } - else if (isFunctionDeclaration(node)) { - localType = inferReturnType(node); - } - else if (isMethodDeclaration(node)) { - localType = inferReturnType(node); - } - else if (isGetAccessorDeclaration(node)) { - localType = inferReturnType(node); - } - if(!localType || localType.flags & LocalTypeInfoFlags.Invalid) { return undefined; } const typeNode = localType.typeNode; setParent(typeNode, node); - const result = resolver.isSyntheticTypeEquivalent(actualTypeNode, typeNode, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit); - if (result !== true) { - result.forEach(r => context.addDiagnostic(r as DiagnosticWithLocation)); - return makeInvalidType(); - } - return typeNode; } -} \ No newline at end of file +} diff --git a/src/compiler/types.ts b/src/compiler/types.ts index f541e9b3fabd4..970e8da73145f 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -5724,7 +5724,6 @@ export interface EmitResolver { isBindingCapturedByNode(node: Node, decl: VariableDeclaration | BindingElement): boolean; getDeclarationStatementsForSourceFile(node: SourceFile, flags: NodeBuilderFlags, tracker: SymbolTracker, bundled?: boolean): Statement[] | undefined; isImportRequiredByAugmentation(decl: ImportDeclaration): boolean; - isSyntheticTypeEquivalent(actualNode: Node, syntheticNodeType: TypeNode, headMessage: DiagnosticMessage): true | Diagnostic[]; } export const enum SymbolFlags { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 802b8f4e72c1d..20f099617cbf7 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -2192,11 +2192,6 @@ function getErrorSpanForArrowFunction(sourceFile: SourceFile, node: ArrowFunctio /** @internal */ export function getErrorSpanForNode(sourceFile: SourceFile, node: Node): TextSpan { - // Temporary fix - if(node.flags & NodeFlags.Synthesized && node.pos < 0) { - debugger; - return { start: 0, length: 0 }; - } let errorNode: Node | undefined = node; switch (node.kind) { case SyntaxKind.SourceFile: { From 0a1f101aca0f2208cc76df5fd875077c59af277d Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 16 Aug 2023 10:44:15 +0100 Subject: [PATCH 039/224] Add distinction between keep locals and as const back. Signed-off-by: Titian Cernicova-Dragomir --- .../declarations/localInferenceResolver.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index aa5ed9f1c114c..928f5e3e7d89c 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -12,6 +12,9 @@ import { visitEachChild,visitNode, visitNodes } from "../../visitorPublic"; enum NarrowBehavior { None = 0, AsConst = 1, + KeepLiterals = 2, + AsConstOrKeepLiterals = AsConst | KeepLiterals, + NotKeepLiterals = ~KeepLiterals, } enum LocalTypeInfoFlags { @@ -131,9 +134,10 @@ export function createLocalInferenceResolver({ return invalid(getAccessor ?? setAccessor!); } function localInference(node: Node, inferenceFlags: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { + const nextInferenceFlags = inferenceFlags & NarrowBehavior.NotKeepLiterals; switch (node.kind) { case SyntaxKind.ParenthesizedExpression: - return localInference((node as ParenthesizedExpression).expression, inferenceFlags); + return localInference((node as ParenthesizedExpression).expression, nextInferenceFlags); case SyntaxKind.Identifier: { if ((node as Identifier).escapedText === "undefined") { return createUndefinedTypeNode(node); @@ -187,7 +191,7 @@ export function createLocalInferenceResolver({ case SyntaxKind.PrefixUnaryExpression: const prefixOp = node as PrefixUnaryExpression; if (prefixOp.operator === SyntaxKind.MinusToken || prefixOp.operator === SyntaxKind.PlusToken) { - if (NarrowBehavior.AsConst & inferenceFlags) { + if (NarrowBehavior.AsConstOrKeepLiterals & inferenceFlags) { switch (prefixOp.operand.kind) { case SyntaxKind.NumericLiteral: switch (prefixOp.operator) { @@ -246,7 +250,7 @@ export function createLocalInferenceResolver({ ); } else { - const elementType = localInference(element, inferenceFlags); + const elementType = localInference(element, nextInferenceFlags); inheritedArrayTypeFlags = mergeFlags(inheritedArrayTypeFlags, elementType.flags); elementTypesInfo.push(elementType); } @@ -318,7 +322,7 @@ export function createLocalInferenceResolver({ const modifiers = inferenceFlags & NarrowBehavior.AsConst ? [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : []; - const { typeNode, flags: propTypeFlags } = localInference(prop.initializer, inferenceFlags); + const { typeNode, flags: propTypeFlags } = localInference(prop.initializer, nextInferenceFlags); inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, propTypeFlags); newProp = factory.createPropertySignature( modifiers, @@ -395,7 +399,7 @@ export function createLocalInferenceResolver({ } } function literal(node: Node, baseType: string | KeywordTypeSyntaxKind, narrowBehavior: NarrowBehavior, flags: LocalTypeInfoFlags = 0) { - if (narrowBehavior & NarrowBehavior.AsConst) { + if (narrowBehavior & NarrowBehavior.AsConstOrKeepLiterals) { return regular(factory.createLiteralTypeNode( normalizeLiteralValue(node as LiteralExpression) ), node, flags); @@ -486,7 +490,7 @@ export function createLocalInferenceResolver({ localType = localInference(node.initializer); } else if (isVariableDeclaration(node) && node.initializer) { - localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.AsConst : NarrowBehavior.None); + localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals : NarrowBehavior.None); } else if (isPropertyDeclaration(node) && node.initializer) { localType = localInference(node.initializer); From 3a3e7e51f8df5a1e8c5613e0fb0e6f2d0f0ff6fb Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Thu, 17 Aug 2023 18:09:35 +0000 Subject: [PATCH 040/224] Support default exports in the fixMissingTypeAnnotation language service. Signed-off-by: Hana Joo --- .../fixMissingTypeAnnotationOnExports.ts | 19 ++++++++++++++ ...codeFixMissingTypeAnnotationOnExports10.ts | 26 +++++++++++++++++++ .../codeFixMissingTypeAnnotationOnExports2.ts | 1 - .../codeFixMissingTypeAnnotationOnExports4.ts | 1 - .../codeFixMissingTypeAnnotationOnExports5.ts | 1 - .../codeFixMissingTypeAnnotationOnExports7.ts | 1 - 6 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports10.ts diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index eb35f2c4e0efa..120b78735b6d8 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -1,5 +1,6 @@ import { Diagnostics, + ExportAssignment, factory, FunctionDeclaration, GetAccessorDeclaration, @@ -8,6 +9,7 @@ import { Node, NodeArray, NodeBuilderFlags, + NodeFlags, ParameterDeclaration, PropertyDeclaration, SignatureDeclaration, @@ -35,6 +37,7 @@ const canHaveExplicitTypeAnnotation = new Set([ SyntaxKind.FunctionDeclaration, SyntaxKind.VariableDeclaration, SyntaxKind.Parameter, + SyntaxKind.ExportAssignment, ]); const declarationEmitNodeBuilderFlags = @@ -170,6 +173,22 @@ function addTypeAnnotationOnNode(node: Node, typeChecker: TypeChecker): Node | N } } break; + case SyntaxKind.ExportAssignment: + const defaultExport = node as ExportAssignment; + if(!defaultExport.isExportEquals) { + const type = typeChecker.getTypeAtLocation(defaultExport.expression); + const typeNode = typeToTypeNode(type, node, typeChecker); + return [ + factory.createVariableStatement(/*modifiers*/ undefined, + factory.createVariableDeclarationList( + [factory.createVariableDeclaration( + "__default", /*exclamationToken*/ undefined, + typeNode, defaultExport.expression)], + NodeFlags.Const)), + factory.updateExportAssignment(defaultExport, defaultExport?.modifiers, factory.createIdentifier("__default")), + ]; + } + break; default: break; } diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports10.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports10.ts new file mode 100644 index 0000000000000..4b1a78d3cee98 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports10.ts @@ -0,0 +1,26 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +////function foo() { +//// return { x: 1, y: 1 }; +////} +////export default foo(); + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + 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/codeFixMissingTypeAnnotationOnExports2.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports2.ts index 3de813fb6275d..9df3e915b9cc8 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports2.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports2.ts @@ -7,7 +7,6 @@ ////export function foo() { return a + b; } verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } ]); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports4.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports4.ts index e000a46b009b6..284aab3217cf6 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports4.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports4.ts @@ -10,7 +10,6 @@ verify.codeFixAvailable([ { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, ]); verify.codeFix({ diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports5.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports5.ts index 5b4abb2dd5e59..0a1c0e1a9370e 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports5.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports5.ts @@ -9,7 +9,6 @@ ////} verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } ]); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts index e325974dc6398..cd4f13096a29e 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts @@ -6,7 +6,6 @@ ////export const c = {foo: foo()}; verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } ]); From 220fb0dd0f314ff0b9646dcbb244a9cf93f86c38 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Fri, 18 Aug 2023 09:28:01 +0000 Subject: [PATCH 041/224] [Non-functional] Restructure the fixer to be able to create change outside the node itself Signed-off-by: Hana Joo --- .../fixMissingTypeAnnotationOnExports.ts | 83 ++++++++++--------- 1 file changed, 44 insertions(+), 39 deletions(-) diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 120b78735b6d8..faf8328a62e09 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -38,6 +38,7 @@ const canHaveExplicitTypeAnnotation = new Set([ SyntaxKind.VariableDeclaration, SyntaxKind.Parameter, SyntaxKind.ExportAssignment, + SyntaxKind.HeritageClause, ]); const declarationEmitNodeBuilderFlags = @@ -67,8 +68,7 @@ registerCodeFix({ function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, typeChecker: TypeChecker, nodeWithDiag: Node): void { const nodeWithNoType = findNearestParentWithTypeAnnotation(nodeWithDiag); - const replacedNodes = addTypeAnnotationOnNode(nodeWithNoType, typeChecker); - changes.replaceNodeWithNodes(sourceFile, nodeWithNoType, Array.isArray(replacedNodes) ? replacedNodes : [replacedNodes]); + addTypeAnnotationOnNode(nodeWithNoType, sourceFile, typeChecker, changes); } // Currently, the diagnostics for the error is not given in the exact node of which that needs type annotation @@ -79,13 +79,13 @@ function findNearestParentWithTypeAnnotation(node: Node): Node { return node; } -function addTypeAnnotationOnNode(node: Node, typeChecker: TypeChecker): Node | Node[] { +function addTypeAnnotationOnNode(node: Node, sourceFile: SourceFile, typeChecker: TypeChecker, changes: textChanges.ChangeTracker) { switch (node.kind) { case SyntaxKind.Parameter: const parameter = node as ParameterDeclaration; const newNode = addTypeToParameterDeclaration(parameter, typeChecker); if (newNode) { - return newNode; + return changes.replaceNodeWithNodes(sourceFile, node, [newNode]); } break; case SyntaxKind.VariableDeclaration: @@ -93,13 +93,14 @@ function addTypeAnnotationOnNode(node: Node, typeChecker: TypeChecker): Node | N if (!variableDeclaration.type) { const type = typeChecker.getTypeAtLocation(variableDeclaration); const typeNode = typeToTypeNode(type, variableDeclaration, typeChecker); - return factory.updateVariableDeclaration( - variableDeclaration, - variableDeclaration.name, - /*exclamationToken*/ undefined, - typeNode, - variableDeclaration.initializer - ); + return changes.replaceNodeWithNodes(sourceFile, node, + [factory.updateVariableDeclaration( + variableDeclaration, + variableDeclaration.name, + /*exclamationToken*/ undefined, + typeNode, + variableDeclaration.initializer + )]); } break; case SyntaxKind.FunctionDeclaration: @@ -108,7 +109,8 @@ function addTypeAnnotationOnNode(node: Node, typeChecker: TypeChecker): Node | N const type = tryGetReturnType(typeChecker, functionDecl); if(type) { const typeNode = typeToTypeNode(type, functionDecl, typeChecker); - return factory.updateFunctionDeclaration( + return changes.replaceNodeWithNodes(sourceFile, node, + [factory.updateFunctionDeclaration( functionDecl, functionDecl.modifiers, functionDecl.asteriskToken, @@ -116,7 +118,7 @@ function addTypeAnnotationOnNode(node: Node, typeChecker: TypeChecker): Node | N functionDecl.typeParameters, updateTypesInNodeArray(functionDecl.parameters, typeChecker), typeNode, - functionDecl.body + functionDecl.body)] ); } } @@ -126,13 +128,14 @@ function addTypeAnnotationOnNode(node: Node, typeChecker: TypeChecker): Node | N if(!propDecl.type) { const type = typeChecker.getTypeAtLocation(node); const typeNode = typeToTypeNode(type, propDecl, typeChecker); - return factory.updatePropertyDeclaration( - propDecl, - propDecl.modifiers, - propDecl.name, - propDecl.questionToken ?? propDecl.exclamationToken, - typeNode, - propDecl.initializer + return changes.replaceNodeWithNodes(sourceFile, node, + [factory.updatePropertyDeclaration( + propDecl, + propDecl.modifiers, + propDecl.name, + propDecl.questionToken ?? propDecl.exclamationToken, + typeNode, + propDecl.initializer)] ); } break; @@ -142,16 +145,17 @@ function addTypeAnnotationOnNode(node: Node, typeChecker: TypeChecker): Node | N const type = tryGetReturnType(typeChecker, methodDeclaration); if(type) { const typeNode = typeToTypeNode(type, node, typeChecker); - return factory.updateMethodDeclaration( - methodDeclaration, - methodDeclaration.modifiers, - methodDeclaration.asteriskToken, - methodDeclaration.name, - methodDeclaration.questionToken, - methodDeclaration.typeParameters, - updateTypesInNodeArray(methodDeclaration.parameters, typeChecker), - typeNode, - methodDeclaration.body, + return changes.replaceNodeWithNodes(sourceFile, node, + [factory.updateMethodDeclaration( + methodDeclaration, + methodDeclaration.modifiers, + methodDeclaration.asteriskToken, + methodDeclaration.name, + methodDeclaration.questionToken, + methodDeclaration.typeParameters, + updateTypesInNodeArray(methodDeclaration.parameters, typeChecker), + typeNode, + methodDeclaration.body)] ); } } @@ -162,13 +166,14 @@ function addTypeAnnotationOnNode(node: Node, typeChecker: TypeChecker): Node | N const returnType = tryGetReturnType(typeChecker, getAccessor); if(returnType) { const typeNode = typeToTypeNode(returnType, node, typeChecker); - return factory.updateGetAccessorDeclaration( - getAccessor, - getAccessor.modifiers, - getAccessor.name, - updateTypesInNodeArray(getAccessor.parameters, typeChecker), - typeNode, - getAccessor.body, + return changes.replaceNodeWithNodes(sourceFile, node, + [factory.updateGetAccessorDeclaration( + getAccessor, + getAccessor.modifiers, + getAccessor.name, + updateTypesInNodeArray(getAccessor.parameters, typeChecker), + typeNode, + getAccessor.body)] ); } } @@ -178,7 +183,7 @@ function addTypeAnnotationOnNode(node: Node, typeChecker: TypeChecker): Node | N if(!defaultExport.isExportEquals) { const type = typeChecker.getTypeAtLocation(defaultExport.expression); const typeNode = typeToTypeNode(type, node, typeChecker); - return [ + return changes.replaceNodeWithNodes(sourceFile, node, [ factory.createVariableStatement(/*modifiers*/ undefined, factory.createVariableDeclarationList( [factory.createVariableDeclaration( @@ -186,7 +191,7 @@ function addTypeAnnotationOnNode(node: Node, typeChecker: TypeChecker): Node | N typeNode, defaultExport.expression)], NodeFlags.Const)), factory.updateExportAssignment(defaultExport, defaultExport?.modifiers, factory.createIdentifier("__default")), - ]; + ]); } break; default: From 6e866ca5e44bd30ee115ef8f291eeab75c589559 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Fri, 18 Aug 2023 13:47:04 +0000 Subject: [PATCH 042/224] Support fixes for mixin heritage clauses Signed-off-by: Hana Joo --- .../fixMissingTypeAnnotationOnExports.ts | 39 +++++++++++++++++-- ...codeFixMissingTypeAnnotationOnExports11.ts | 25 ++++++++++++ ...codeFixMissingTypeAnnotationOnExports12.ts | 30 ++++++++++++++ 3 files changed, 91 insertions(+), 3 deletions(-) create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index faf8328a62e09..6245a44c0ed2d 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -1,8 +1,11 @@ import { + ClassDeclaration, Diagnostics, ExportAssignment, + ExpressionWithTypeArguments, factory, FunctionDeclaration, + GeneratedIdentifierFlags, GetAccessorDeclaration, getTokenAtPosition, MethodDeclaration, @@ -38,7 +41,7 @@ const canHaveExplicitTypeAnnotation = new Set([ SyntaxKind.VariableDeclaration, SyntaxKind.Parameter, SyntaxKind.ExportAssignment, - SyntaxKind.HeritageClause, + SyntaxKind.ExpressionWithTypeArguments, ]); const declarationEmitNodeBuilderFlags = @@ -68,7 +71,7 @@ registerCodeFix({ function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, typeChecker: TypeChecker, nodeWithDiag: Node): void { const nodeWithNoType = findNearestParentWithTypeAnnotation(nodeWithDiag); - addTypeAnnotationOnNode(nodeWithNoType, sourceFile, typeChecker, changes); + fixupForIsolatedDeclarations(nodeWithNoType, sourceFile, typeChecker, changes); } // Currently, the diagnostics for the error is not given in the exact node of which that needs type annotation @@ -79,7 +82,11 @@ function findNearestParentWithTypeAnnotation(node: Node): Node { return node; } -function addTypeAnnotationOnNode(node: Node, sourceFile: SourceFile, typeChecker: TypeChecker, changes: textChanges.ChangeTracker) { +/** + * 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, sourceFile: SourceFile, typeChecker: TypeChecker, changes: textChanges.ChangeTracker) { switch (node.kind) { case SyntaxKind.Parameter: const parameter = node as ParameterDeclaration; @@ -194,6 +201,32 @@ function addTypeAnnotationOnNode(node: Node, sourceFile: SourceFile, typeChecker ]); } break; + // Handling expression like heritage clauses e.g. class A extends mixin(B) .. + case SyntaxKind.ExpressionWithTypeArguments: + const expression = node as ExpressionWithTypeArguments; + const classDecl = expression.parent.parent as unknown as ClassDeclaration; + const heritageTypeNode = typeToTypeNode( + typeChecker.getTypeAtLocation(expression.expression), + expression.expression, + typeChecker); + 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, + expression, + )], + NodeFlags.Const, + ) + ); + changes.insertNodeAt(sourceFile, classDecl.getFullStart(), heritageVariable, { prefix: "\n" }); + return changes.replaceNodeWithNodes(sourceFile, expression, + [factory.createExpressionWithTypeArguments(heritageVariableName, [])]); default: break; } diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts new file mode 100644 index 0000000000000..66094b4190ab8 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts @@ -0,0 +1,25 @@ +/// + +// @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.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.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/codeFixMissingTypeAnnotationOnExports12.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts new file mode 100644 index 0000000000000..5eccea0d5a3a9 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts @@ -0,0 +1,30 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +//// function mixin any>(ctor: T): T { +//// return ctor; +//// } +//// class Point2D { x = 0; y = 0; } +//// export const Point3D = class extends mixin(Point2D) { z = 0; }; + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +// TODO: There's no easy way to name the type, so rather promoting this to a classDeclaration is better. +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + index: 0, + newFileContent: +`function mixin any>(ctor: T): T { + return ctor; +} +class Point2D { x = 0; y = 0; } +export const Point3D: { + new(): { + z: number; x: number; y: number; + }; + } = class extends mixin(Point2D) { z = 0; };` +}); From 8ab3fcb73209244d604743857bdb8e739f30a744 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Fri, 18 Aug 2023 21:32:21 +0000 Subject: [PATCH 043/224] Support fixes for destructuring patterns we split destructuring patterns as the declaration list is splitted on d.ts emit Signed-off-by: Hana Joo --- .../fixMissingTypeAnnotationOnExports.ts | 199 +++++++++++++++++- ...codeFixMissingTypeAnnotationOnExports13.ts | 25 +++ ...codeFixMissingTypeAnnotationOnExports14.ts | 25 +++ ...codeFixMissingTypeAnnotationOnExports15.ts | 26 +++ ...codeFixMissingTypeAnnotationOnExports16.ts | 26 +++ ...codeFixMissingTypeAnnotationOnExports17.ts | 32 +++ 6 files changed, 332 insertions(+), 1 deletion(-) create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports13.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports14.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports16.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports17.ts diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 6245a44c0ed2d..0920947d96ef0 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -1,18 +1,29 @@ import { + ArrayBindingPattern, + BindingElement, + BindingPattern, ClassDeclaration, Diagnostics, ExportAssignment, + Expression, ExpressionWithTypeArguments, factory, FunctionDeclaration, GeneratedIdentifierFlags, GetAccessorDeclaration, getTokenAtPosition, + Identifier, + isArrayBindingPattern, + isComputedPropertyName, + isObjectBindingPattern, + isOmittedExpression, + isVariableDeclaration, MethodDeclaration, Node, NodeArray, NodeBuilderFlags, NodeFlags, + ObjectBindingPattern, ParameterDeclaration, PropertyDeclaration, SignatureDeclaration, @@ -22,6 +33,7 @@ import { Type, TypeChecker, VariableDeclaration, + VariableStatement, } from "../_namespaces/ts"; import { codeFixAll, @@ -42,6 +54,8 @@ const canHaveExplicitTypeAnnotation = new Set([ SyntaxKind.Parameter, SyntaxKind.ExportAssignment, SyntaxKind.ExpressionWithTypeArguments, + SyntaxKind.ObjectBindingPattern, + SyntaxKind.ArrayBindingPattern, ]); const declarationEmitNodeBuilderFlags = @@ -76,7 +90,8 @@ function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, ty // Currently, the diagnostics for the error is not given in the exact node of which that needs type annotation function findNearestParentWithTypeAnnotation(node: Node): Node { - while (!canHaveExplicitTypeAnnotation.has(node.kind)) { + while (((isObjectBindingPattern(node) || isArrayBindingPattern(node)) && !isVariableDeclaration(node.parent)) || + !canHaveExplicitTypeAnnotation.has(node.kind)) { node = node.parent; } return node; @@ -227,12 +242,194 @@ function fixupForIsolatedDeclarations(node: Node, sourceFile: SourceFile, typeCh changes.insertNodeAt(sourceFile, classDecl.getFullStart(), heritageVariable, { prefix: "\n" }); return changes.replaceNodeWithNodes(sourceFile, expression, [factory.createExpressionWithTypeArguments(heritageVariableName, [])]); + case SyntaxKind.ObjectBindingPattern: + case SyntaxKind.ArrayBindingPattern: + return transformDestructuringPatterns(node as BindingPattern, sourceFile, typeChecker, changes); default: break; } throw new Error(`Cannot find a fix for the given node ${node.kind}`); } + +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, + sourceFile: SourceFile, + typeChecker: TypeChecker, + changes: textChanges.ChangeTracker) { + const enclosingVarStmt = bindingPattern.parent.parent.parent as VariableStatement; + const tempHolderForReturn = factory.createUniqueName("dest", GeneratedIdentifierFlags.Optimistic); + const baseExpr: ExpressionReverseChain = { expression: { kind: ExpressionType.IDENTIFIER, identifier: tempHolderForReturn } }; + const bindingElements: ExpressionReverseChain[] = []; + if (isArrayBindingPattern(bindingPattern)) { + addArrayBindingPatterns(bindingPattern, bindingElements, baseExpr); + } + else { + addObjectBindingPatterns(bindingPattern, bindingElements, baseExpr); + } + + const expressionToVar = new Map(); + const newNodes: Node[] = [ + factory.createVariableStatement( + /*modifiers*/ undefined, + factory.createVariableDeclarationList( + [factory.createVariableDeclaration( + tempHolderForReturn, + /*exclamationToken*/ undefined, + /*type*/ undefined, + enclosingVarStmt.declarationList.declarations[0].initializer)], + NodeFlags.Const + ) + ) + ]; + let i = 0; + while (i < bindingElements.length) { + const bindingElement = bindingElements[i]; + + 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 = typeToTypeNode(typeChecker.getTypeAtLocation(name), name, typeChecker); + let variableInitializer = createChainedExpression(bindingElement, expressionToVar); + if (bindingElement.element!.initializer) { + const tempName = factory.createUniqueName("temp", GeneratedIdentifierFlags.Optimistic); + newNodes.push(factory.createVariableStatement( + /*modifiers*/ undefined, + factory.createVariableDeclarationList( + [factory.createVariableDeclaration( + tempName, /*exclamationToken*/ undefined, typeNode, 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,); + } + newNodes.push(factory.createVariableStatement( + [factory.createToken(SyntaxKind.ExportKeyword)], + factory.createVariableDeclarationList( + [factory.createVariableDeclaration( + name, /*exclamationToken*/ undefined, typeNode, variableInitializer)], + NodeFlags.Const))); + } + ++i; + } + changes.replaceNodeWithNodes(sourceFile, enclosingVarStmt, newNodes); +} + +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; +} + function typeToTypeNode(type: Type, enclosingDeclaration: Node, typeChecker: TypeChecker) { const typeNode = typeChecker.typeToTypeNode( type, diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports13.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports13.ts new file mode 100644 index 0000000000000..97c7e8da9772a --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports13.ts @@ -0,0 +1,25 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +//// function foo() { +//// return { x: 1, y: 1 }; +//// } +//// export const { x, y } = foo(); + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.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..50fc061155f9c --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports14.ts @@ -0,0 +1,25 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +//// function foo() { +//// return { x: 1, y: 1 }; +//// } +//// export const { x: abcd, y: defg } = foo(); + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.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..67a7f6073609c --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts @@ -0,0 +1,26 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +//// function foo() { +//// return { x: 1, y: 1}; +//// } +//// export const { x, y = 0} = foo(); + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + index: 0, + newFileContent: +`function foo() { + return { x: 1, y: 1}; +} +const dest = foo(); +export const x: number = dest.x; +const temp: number = dest.y; +export const y: number = temp === undefined ? 0 : dest.y;` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports16.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports16.ts new file mode 100644 index 0000000000000..dfff3f1e4ccc7 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports16.ts @@ -0,0 +1,26 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +//// function foo() { +//// return { x: 1, y: 1 } as const; +//// } +//// export const { x, y = 0 } = foo(); + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + index: 0, + newFileContent: +`function foo() { + return { x: 1, y: 1 } as const; +} +const dest = foo(); +export const x: 1 = dest.x; +const temp: 1 | 0 = 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..cb15f41acb31a --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports17.ts @@ -0,0 +1,32 @@ +/// + +// @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.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.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;` +}); From 7f574a8797fa3a30224a8f47a98f8306aeb89c02 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Sun, 20 Aug 2023 15:34:26 +0000 Subject: [PATCH 044/224] Add a test case for Symbol Signed-off-by: Hana Joo --- ...codeFixMissingTypeAnnotationOnExports18.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts new file mode 100644 index 0000000000000..5d4f22d111428 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts @@ -0,0 +1,19 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 +//// export const a = Symbol(); + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +// TODO: the typeof operator here is wrong. +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + index: 0, + newFileContent: +`export const x: typeof x = Symbol();` +}); From b97e79f66e2affdff8fb31899ffd4cb92e1b9a3b Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Tue, 22 Aug 2023 10:46:47 +0000 Subject: [PATCH 045/224] Fix PR Comments 1. Reformat union types 2. Do not add type annotation when not needed 3. Fix tests for #2 changes. Signed-off-by: Hana Joo --- .../codefixes/fixMissingTypeAnnotationOnExports.ts | 10 +++++----- .../codeFixMissingTypeAnnotationOnExports15.ts | 2 +- .../codeFixMissingTypeAnnotationOnExports16.ts | 2 +- .../codeFixMissingTypeAnnotationOnExports18.ts | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 0920947d96ef0..8e2ff64591eaa 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -265,10 +265,10 @@ const enum ExpressionType { 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} ; +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, sourceFile: SourceFile, @@ -332,7 +332,7 @@ function transformDestructuringPatterns(bindingPattern: BindingPattern, /*modifiers*/ undefined, factory.createVariableDeclarationList( [factory.createVariableDeclaration( - tempName, /*exclamationToken*/ undefined, typeNode, variableInitializer)], + tempName, /*exclamationToken*/ undefined, /*type*/ undefined, variableInitializer)], NodeFlags.Const))); variableInitializer = factory.createConditionalExpression( factory.createBinaryExpression( diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts index 67a7f6073609c..10da4ced14ad6 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts @@ -21,6 +21,6 @@ verify.codeFix({ } const dest = foo(); export const x: number = dest.x; -const temp: number = dest.y; +const temp = dest.y; export const y: number = temp === undefined ? 0 : dest.y;` }); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports16.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports16.ts index dfff3f1e4ccc7..608c30cb80b28 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports16.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports16.ts @@ -21,6 +21,6 @@ verify.codeFix({ } const dest = foo(); export const x: 1 = dest.x; -const temp: 1 | 0 = dest.y; +const temp = dest.y; export const y: 1 | 0 = temp === undefined ? 0 : dest.y;` }); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts index 5d4f22d111428..1033e99b07f15 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts @@ -15,5 +15,5 @@ verify.codeFix({ description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, index: 0, newFileContent: -`export const x: typeof x = Symbol();` +`export const a: typeof a = Symbol();` }); From c509a6c63f2af54df227dcc6957a5debd703fe0f Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Tue, 22 Aug 2023 11:46:51 +0000 Subject: [PATCH 046/224] Make the fixer replace the classNode instead of replacing the heritage clause. This way, it's more easier to apply this on the code-mod binary as the binary is using a transformer, and transformer works by replacing nodes on the same level. Replacing heritage Signed-off-by: Hana Joo --- .../fixMissingTypeAnnotationOnExports.ts | 75 ++++++++++++------- ...codeFixMissingTypeAnnotationOnExports11.ts | 4 +- 2 files changed, 50 insertions(+), 29 deletions(-) diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 8e2ff64591eaa..e28e96a9d7927 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -53,7 +53,7 @@ const canHaveExplicitTypeAnnotation = new Set([ SyntaxKind.VariableDeclaration, SyntaxKind.Parameter, SyntaxKind.ExportAssignment, - SyntaxKind.ExpressionWithTypeArguments, + SyntaxKind.ClassDeclaration, SyntaxKind.ObjectBindingPattern, SyntaxKind.ArrayBindingPattern, ]); @@ -85,7 +85,7 @@ registerCodeFix({ function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, typeChecker: TypeChecker, nodeWithDiag: Node): void { const nodeWithNoType = findNearestParentWithTypeAnnotation(nodeWithDiag); - fixupForIsolatedDeclarations(nodeWithNoType, sourceFile, typeChecker, changes); + fixupForIsolatedDeclarations(nodeWithNoType, nodeWithDiag, sourceFile, typeChecker, changes); } // Currently, the diagnostics for the error is not given in the exact node of which that needs type annotation @@ -101,7 +101,7 @@ function findNearestParentWithTypeAnnotation(node: Node): Node { * 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, sourceFile: SourceFile, typeChecker: TypeChecker, changes: textChanges.ChangeTracker) { +function fixupForIsolatedDeclarations(node: Node, nodeWithDiag: Node, sourceFile: SourceFile, typeChecker: TypeChecker, changes: textChanges.ChangeTracker) { switch (node.kind) { case SyntaxKind.Parameter: const parameter = node as ParameterDeclaration; @@ -217,31 +217,8 @@ function fixupForIsolatedDeclarations(node: Node, sourceFile: SourceFile, typeCh } break; // Handling expression like heritage clauses e.g. class A extends mixin(B) .. - case SyntaxKind.ExpressionWithTypeArguments: - const expression = node as ExpressionWithTypeArguments; - const classDecl = expression.parent.parent as unknown as ClassDeclaration; - const heritageTypeNode = typeToTypeNode( - typeChecker.getTypeAtLocation(expression.expression), - expression.expression, - typeChecker); - 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, - expression, - )], - NodeFlags.Const, - ) - ); - changes.insertNodeAt(sourceFile, classDecl.getFullStart(), heritageVariable, { prefix: "\n" }); - return changes.replaceNodeWithNodes(sourceFile, expression, - [factory.createExpressionWithTypeArguments(heritageVariableName, [])]); + case SyntaxKind.ClassDeclaration: + return handleClassDeclaration(node as ClassDeclaration, nodeWithDiag.parent.parent as ExpressionWithTypeArguments, sourceFile, changes, typeChecker); case SyntaxKind.ObjectBindingPattern: case SyntaxKind.ArrayBindingPattern: return transformDestructuringPatterns(node as BindingPattern, sourceFile, typeChecker, changes); @@ -251,6 +228,48 @@ function fixupForIsolatedDeclarations(node: Node, sourceFile: SourceFile, typeCh throw new Error(`Cannot find a fix for the given node ${node.kind}`); } +function handleClassDeclaration(classDecl: ClassDeclaration, heritageExpression: ExpressionWithTypeArguments, sourceFile: SourceFile, changes: textChanges.ChangeTracker, typeChecker: TypeChecker) { + if (heritageExpression.kind !== SyntaxKind.ExpressionWithTypeArguments){ + throw new Error(`Hey + ${heritageExpression.kind}`); + } + const heritageTypeNode = typeToTypeNode( + typeChecker.getTypeAtLocation(heritageExpression.expression), + heritageExpression.expression, + typeChecker); + 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, + )], + NodeFlags.Const, + ) + ); + changes.replaceNodeWithNodes(sourceFile, classDecl, + [heritageVariable, + factory.updateClassDeclaration( + classDecl, + classDecl.modifiers, + classDecl.name, + classDecl.typeParameters, + classDecl.heritageClauses?.map( + (node) => { + if (node === heritageExpression.parent) { + return factory.updateHeritageClause(node, + [factory.createExpressionWithTypeArguments(heritageVariableName, [])] + ); + } + return node; + }), + classDecl.members) + ]); +} interface ExpressionReverseChain { element?: BindingElement; diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts index 66094b4190ab8..d454d461db0d9 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts @@ -21,5 +21,7 @@ verify.codeFix({ } class Point2D { x = 0; y = 0; } const Point3DBase: typeof Point2D = (mixin(Point2D)); -export class Point3D extends Point3DBase { z = 0; }` +export class Point3D extends Point3DBase { + z = 0; +}` }); From 4a66f33215b9477f5a7e669b763812c66950d4e0 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Tue, 22 Aug 2023 12:25:34 +0000 Subject: [PATCH 047/224] Restructure to add flexibility to code-mod Predetermine which nodes to generate fix in order to be flexible on transformation. Signed-off-by: Hana Joo --- .../src/code-mod/code-transform.ts | 78 +++++++++---------- 1 file changed, 38 insertions(+), 40 deletions(-) diff --git a/external-declarations/src/code-mod/code-transform.ts b/external-declarations/src/code-mod/code-transform.ts index 28c3e4cb7a1cf..2f4dea0668379 100644 --- a/external-declarations/src/code-mod/code-transform.ts +++ b/external-declarations/src/code-mod/code-transform.ts @@ -1,32 +1,15 @@ import * as ts from "typescript"; -import { NodeBuilderFlags } from "typescript"; import { SymbolTracker } from "../compiler/types"; const declarationEmitNodeBuilderFlags = - NodeBuilderFlags.MultilineObjectLiterals | - NodeBuilderFlags.WriteClassExpressionAsTypeLiteral | - NodeBuilderFlags.UseTypeOfFunction | - NodeBuilderFlags.UseStructuralFallback | - NodeBuilderFlags.AllowEmptyTuple | - NodeBuilderFlags.GenerateNamesForShadowedTypeParams | - NodeBuilderFlags.NoTruncation; - -function sortDiagnostics(a: ts.Diagnostic, b: ts.Diagnostic) { - if (a.start! < b.start!) { - return -1; - } - if (a.start! === b.start!) { - if (a.length === b.length) { - return 0; - } - if (a.length! < b.length!){ - return -1; - } - return 1; - } - return 1; -} + ts.NodeBuilderFlags.MultilineObjectLiterals | + ts.NodeBuilderFlags.WriteClassExpressionAsTypeLiteral | + ts.NodeBuilderFlags.UseTypeOfFunction | + ts.NodeBuilderFlags.UseStructuralFallback | + ts.NodeBuilderFlags.AllowEmptyTuple | + ts.NodeBuilderFlags.GenerateNamesForShadowedTypeParams | + ts.NodeBuilderFlags.NoTruncation; function tryGetReturnType(typeChecker: ts.TypeChecker, node: ts.SignatureDeclaration): ts.Type | undefined { const signature = typeChecker.getSignatureFromDeclaration(node); @@ -34,17 +17,40 @@ function tryGetReturnType(typeChecker: ts.TypeChecker, node: ts.SignatureDeclara return typeChecker.getReturnTypeOfSignature(signature); } } +const canHaveExplicitTypeAnnotation = new Set([ + ts.SyntaxKind.GetAccessor, + ts.SyntaxKind.MethodDeclaration, + ts.SyntaxKind.PropertyDeclaration, + ts.SyntaxKind.FunctionDeclaration, + ts.SyntaxKind.VariableDeclaration, + ts.SyntaxKind.Parameter, + ts.SyntaxKind.ExportAssignment, + ts.SyntaxKind.ClassDeclaration, + ts.SyntaxKind.ObjectBindingPattern, + ts.SyntaxKind.ArrayBindingPattern, +]); + +// Currently, the diagnostics for the error is not given in the exact node of which that needs type annotation +function findNearestParentWithTypeAnnotation(node: ts.Node): ts.Node { + while (((ts.isObjectBindingPattern(node) || ts.isArrayBindingPattern(node)) && !ts.isVariableDeclaration(node.parent)) || + !canHaveExplicitTypeAnnotation.has(node.kind)) { + node = node.parent; + } + return node; +} // Define a transformer function export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: ts.Program, moduleResolutionHost?: ts.ModuleResolutionHost) { const typeChecker = program.getTypeChecker(); - const sortedDiags = program.getDeclarationDiagnostics(sourceFile) - .filter((diag) => diag.code === 9007) - .sort(sortDiagnostics). - map((diag) => { return { start: diag.start!, end: diag.start! + diag.length! };}); + const nodesToFix = new Map(program.getDeclarationDiagnostics(sourceFile). + filter((diag) => diag.code === 9007). + map((diag) => { + const nodeWithDiag = (ts as any).getTokenAtPosition(sourceFile, diag.start)! as ts.Node; + return [findNearestParentWithTypeAnnotation(nodeWithDiag), nodeWithDiag]; + })); return (context: ts.TransformationContext) => { - if (!sortedDiags) return (node: ts.Node) => node; + if (!nodesToFix) return (node: ts.Node) => node; let hasError = false; const reportError = () => { hasError = true; @@ -79,7 +85,6 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: } return typeNode; } - let diagIndex = 0; // Return a visitor function return (rootNode: ts.Node) => { function updateTypesInNodeArray(nodeArray: ts.NodeArray): ts.NodeArray; @@ -95,16 +100,9 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: // Define a visitor function function visit(node: ts.Node): ts.Node | ts.Node[] { - // Only visit descendants when there's diagnostics on this location. - while (diagIndex < sortedDiags.length && sortedDiags[diagIndex].start < node.getStart()) { - ++diagIndex; - } - if (diagIndex >= sortedDiags.length) { - return node; - } - if ((node.getStart() !== sortedDiags[diagIndex].start || node.getEnd() !== sortedDiags[diagIndex].end) && - sortedDiags[diagIndex].end > node.getEnd()) { - return node; + const originalNodeWithDiag = nodesToFix.has(node); + if (!originalNodeWithDiag) { + return ts.visitEachChild(node, visit, context); } switch (node.kind) { From adb25b1f73a31c06d28659912b2e2bcee8c3694c Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Tue, 22 Aug 2023 12:55:06 +0000 Subject: [PATCH 048/224] Port functionality from the language-service This should be temporary fix, the ultimate way to do this is to wrap the code-mod around the language service Signed-off-by: Hana Joo --- .../src/code-mod/code-transform.ts | 244 +++++++++++++++++- 1 file changed, 241 insertions(+), 3 deletions(-) diff --git a/external-declarations/src/code-mod/code-transform.ts b/external-declarations/src/code-mod/code-transform.ts index 2f4dea0668379..87f1d74b82651 100644 --- a/external-declarations/src/code-mod/code-transform.ts +++ b/external-declarations/src/code-mod/code-transform.ts @@ -85,6 +85,222 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: } return typeNode; } + + function handleClassDeclaration(classDecl: ts.ClassDeclaration, heritageExpression: ts.ExpressionWithTypeArguments) { + if (heritageExpression.kind !== ts.SyntaxKind.ExpressionWithTypeArguments){ + throw new Error(`Hey + ${heritageExpression.kind}`); + } + const heritageTypeNode = typeToTypeNode( + typeChecker.getTypeAtLocation(heritageExpression.expression), + heritageExpression.expression); + const heritageVariableName = ts.factory.createUniqueName( + classDecl.name? classDecl.name.text + "Base" : "Anonymous", ts.GeneratedIdentifierFlags.Optimistic); + // e.g. const Point3DBase: typeof Point2D = mixin(Point2D); + const heritageVariable = ts.factory.createVariableStatement( + /*modifiers*/ undefined, + ts.factory.createVariableDeclarationList( + [ts.factory.createVariableDeclaration( + heritageVariableName, + /*exclamationToken*/ undefined, + heritageTypeNode, + heritageExpression, + )], + ts.NodeFlags.Const, + ) + ); + return [heritageVariable, + ts.factory.updateClassDeclaration( + classDecl, + classDecl.modifiers, + classDecl.name, + classDecl.typeParameters, + classDecl.heritageClauses?.map( + (node) => { + if (node === heritageExpression.parent) { + return ts.factory.updateHeritageClause(node, + [ts.factory.createExpressionWithTypeArguments(heritageVariableName, [])] + ); + } + return node; + }), + classDecl.members) + ]; + } + + const enum ExpressionType { + TEXT = 0, + COMPUTED = 1, + ARRAY_ACCESS = 2, + IDENTIFIER = 3, + } + interface ExpressionReverseChain { + element?: ts.BindingElement; + parent?: ExpressionReverseChain; + expression: SubExpression; + } + + type SubExpression = {kind: ExpressionType.TEXT, text: string} + | {kind: ExpressionType.COMPUTED, computed: ts.Expression} + | {kind: ExpressionType.ARRAY_ACCESS, arrayIndex: number} + | {kind: ExpressionType.IDENTIFIER, identifier: ts.Identifier}; + + function transformDestructuringPatterns(bindingPattern: ts.BindingPattern) { + const enclosingVarStmt = bindingPattern.parent.parent.parent as ts.VariableStatement; + const tempHolderForReturn = ts.factory.createUniqueName("dest", ts.GeneratedIdentifierFlags.Optimistic); + const baseExpr: ExpressionReverseChain = { expression: { kind: ExpressionType.IDENTIFIER, identifier: tempHolderForReturn } }; + const bindingElements: ExpressionReverseChain[] = []; + if (ts.isArrayBindingPattern(bindingPattern)) { + addArrayBindingPatterns(bindingPattern, bindingElements, baseExpr); + } + else { + addObjectBindingPatterns(bindingPattern, bindingElements, baseExpr); + } + + const expressionToVar = new Map(); + const newNodes: ts.Node[] = [ + ts.factory.createVariableStatement( + /*modifiers*/ undefined, + ts.factory.createVariableDeclarationList( + [ts.factory.createVariableDeclaration( + tempHolderForReturn, + /*exclamationToken*/ undefined, + /*type*/ undefined, + enclosingVarStmt.declarationList.declarations[0].initializer)], + ts.NodeFlags.Const + ) + ) + ]; + let i = 0; + while (i < bindingElements.length) { + const bindingElement = bindingElements[i]; + + if (bindingElement.element!.propertyName && ts.isComputedPropertyName(bindingElement.element!.propertyName)) { + const computedExpression = bindingElement.element!.propertyName.expression; + const identifierForComputedProperty = ts.factory.getGeneratedNameForNode(computedExpression); + const variableDecl = ts.factory.createVariableDeclaration( + identifierForComputedProperty, /*exclamationToken*/ undefined, /*type*/ undefined, computedExpression); + const variableList = ts.factory.createVariableDeclarationList([variableDecl], ts.NodeFlags.Const); + const variableStatement = ts.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 (ts.isArrayBindingPattern(name)) { + addArrayBindingPatterns(name, bindingElements, bindingElement); + } + else if (ts.isObjectBindingPattern(name)) { + addObjectBindingPatterns(name, bindingElements, bindingElement); + } + else { + const typeNode = typeToTypeNode(typeChecker.getTypeAtLocation(name), name); + let variableInitializer = createChainedExpression(bindingElement, expressionToVar); + if (bindingElement.element!.initializer) { + const tempName = ts.factory.createUniqueName("temp", ts.GeneratedIdentifierFlags.Optimistic); + newNodes.push(ts.factory.createVariableStatement( + /*modifiers*/ undefined, + ts.factory.createVariableDeclarationList( + [ts.factory.createVariableDeclaration( + tempName, /*exclamationToken*/ undefined, /*type*/ undefined, variableInitializer)], + ts.NodeFlags.Const))); + variableInitializer = ts.factory.createConditionalExpression( + ts.factory.createBinaryExpression( + tempName, + ts.factory.createToken(ts.SyntaxKind.EqualsEqualsEqualsToken), + ts.factory.createIdentifier("undefined"), + ), + ts.factory.createToken(ts.SyntaxKind.QuestionToken), + bindingElement.element!.initializer, + ts.factory.createToken(ts.SyntaxKind.ColonToken), + variableInitializer,); + } + newNodes.push(ts.factory.createVariableStatement( + [ts.factory.createToken(ts.SyntaxKind.ExportKeyword)], + ts.factory.createVariableDeclarationList( + [ts.factory.createVariableDeclaration( + name, /*exclamationToken*/ undefined, typeNode, variableInitializer)], + ts.NodeFlags.Const))); + } + ++i; + } + return newNodes; + } + + function addArrayBindingPatterns(bindingPattern: ts.ArrayBindingPattern, bindingElements: ExpressionReverseChain[], parent: ExpressionReverseChain) { + for (let i = 0 ; i < bindingPattern.elements.length ; ++i) { + const element = bindingPattern.elements[i]; + if (ts.isOmittedExpression(element)) { + continue; + } + bindingElements.push({ + element, + parent, + expression: { kind: ExpressionType.ARRAY_ACCESS, arrayIndex: i }, + }); + } + } + + function addObjectBindingPatterns(bindingPattern: ts.ObjectBindingPattern, bindingElements: ExpressionReverseChain[], parent: ExpressionReverseChain) { + for (const bindingElement of bindingPattern.elements) { + let name: string; + if (bindingElement.propertyName) { + if (ts.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 ts.Identifier).text; + } + bindingElements.push({ + element: bindingElement, + parent, + expression: { kind: ExpressionType.TEXT, text: name }, + }); + } + } + + function createChainedExpression(expression: ExpressionReverseChain, expressionToVar: Map): ts.Expression { + const reverseTraverse: ExpressionReverseChain[] = [expression]; + while (expression.parent) { + expression = expression.parent; + reverseTraverse.push(expression); + } + let chainedExpression: ts.Expression = ((reverseTraverse[reverseTraverse.length - 1]).expression as {identifier: ts.Identifier}).identifier; + for (let i = reverseTraverse.length -2 ; i>= 0; --i) { + const nextSubExpr = reverseTraverse[i].expression; + if (nextSubExpr.kind === ExpressionType.TEXT) { + chainedExpression = ts.factory.createPropertyAccessChain( + chainedExpression, + /*questionDotToken*/ undefined, + ts.factory.createIdentifier(nextSubExpr.text) + ); + } + else if (nextSubExpr.kind === ExpressionType.COMPUTED) { + chainedExpression = ts.factory.createElementAccessExpression( + chainedExpression, + expressionToVar.get(nextSubExpr.computed)! + ); + } + else if (nextSubExpr.kind === ExpressionType.ARRAY_ACCESS) { + chainedExpression = ts.factory.createElementAccessExpression( + chainedExpression, + nextSubExpr.arrayIndex + ); + } + } + return chainedExpression; + } + // Return a visitor function return (rootNode: ts.Node) => { function updateTypesInNodeArray(nodeArray: ts.NodeArray): ts.NodeArray; @@ -100,8 +316,8 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: // Define a visitor function function visit(node: ts.Node): ts.Node | ts.Node[] { - const originalNodeWithDiag = nodesToFix.has(node); - if (!originalNodeWithDiag) { + const nodeWithDiag = nodesToFix.get(node); + if (!nodeWithDiag) { return ts.visitEachChild(node, visit, context); } @@ -223,6 +439,28 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: } } break; + case ts.SyntaxKind.ExportAssignment: + const defaultExport = node as ts.ExportAssignment; + if(!defaultExport.isExportEquals) { + const type = typeChecker.getTypeAtLocation(defaultExport.expression); + const typeNode = typeToTypeNode(type, node); + return [ + ts.factory.createVariableStatement(/*modifiers*/ undefined, + ts.factory.createVariableDeclarationList( + [ts.factory.createVariableDeclaration( + "__default", /*exclamationToken*/ undefined, + typeNode, defaultExport.expression)], + ts.NodeFlags.Const)), + ts.factory.updateExportAssignment(defaultExport, defaultExport?.modifiers, ts.factory.createIdentifier("__default")), + ]; + } + break; + // Handling expression like heritage clauses e.g. class A extends mixin(B) .. + case ts.SyntaxKind.ClassDeclaration: + return handleClassDeclaration(node as ts.ClassDeclaration, nodeWithDiag.parent.parent as ts.ExpressionWithTypeArguments); + case ts.SyntaxKind.ObjectBindingPattern: + case ts.SyntaxKind.ArrayBindingPattern: + return transformDestructuringPatterns(node as ts.BindingPattern); default: break; } @@ -234,4 +472,4 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: return ts.visitNode(rootNode, visit)!; }; }; -} \ No newline at end of file +} From a837746d4ea617c1c17386a3c0350959f3d8988f Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Tue, 22 Aug 2023 14:18:55 +0000 Subject: [PATCH 049/224] proper handling for destructuring as it's a variable statement that's actually being replaced, so you need to make the transformer transform on the VariableStatement nodes. Also, update the tests which were failing already Signed-off-by: Hana Joo --- .../fixer-test/expected/array_literals.ts | 2 +- .../fixer-test/expected/classes.ts | 11 +++++++++++ .../fixer-test/expected/default_exports.ts | 8 ++++++++ .../fixer-test/expected/destructuring.ts | 8 ++++++++ .../fixer-test/expected/function_return.ts | 9 ++++++--- .../expected/function_signatures_objects.ts | 6 +++++- .../fixer-test/expected/object_literals.ts | 5 ++++- .../fixer-test/source/classes.ts | 5 +++++ .../fixer-test/source/default_exports.ts | 4 ++++ .../fixer-test/source/destructuring.ts | 4 ++++ .../src/code-mod/code-transform.ts | 18 ++++++++++++++---- 11 files changed, 70 insertions(+), 10 deletions(-) create mode 100644 external-declarations/fixer-test/expected/classes.ts create mode 100644 external-declarations/fixer-test/expected/default_exports.ts create mode 100644 external-declarations/fixer-test/expected/destructuring.ts create mode 100644 external-declarations/fixer-test/source/classes.ts create mode 100644 external-declarations/fixer-test/source/default_exports.ts create mode 100644 external-declarations/fixer-test/source/destructuring.ts diff --git a/external-declarations/fixer-test/expected/array_literals.ts b/external-declarations/fixer-test/expected/array_literals.ts index 4f3825a08305d..35a66c28a76d2 100644 --- a/external-declarations/fixer-test/expected/array_literals.ts +++ b/external-declarations/fixer-test/expected/array_literals.ts @@ -1,4 +1,4 @@ export const a = [42, 34] as const; const b = [42, 34] as const; -export const c = [42, 34]; +export const c: number[] = [42, 34]; const d = [42, 34]; diff --git a/external-declarations/fixer-test/expected/classes.ts b/external-declarations/fixer-test/expected/classes.ts new file mode 100644 index 0000000000000..6aa768678f6d2 --- /dev/null +++ b/external-declarations/fixer-test/expected/classes.ts @@ -0,0 +1,11 @@ +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/external-declarations/fixer-test/expected/default_exports.ts b/external-declarations/fixer-test/expected/default_exports.ts new file mode 100644 index 0000000000000..070c4033c4fd7 --- /dev/null +++ b/external-declarations/fixer-test/expected/default_exports.ts @@ -0,0 +1,8 @@ +function foo() { + return { x: 1, y: 1 }; +} +const __default: { + x: number; + y: number; +} = foo(); +export default __default; diff --git a/external-declarations/fixer-test/expected/destructuring.ts b/external-declarations/fixer-test/expected/destructuring.ts new file mode 100644 index 0000000000000..1052e1300fe91 --- /dev/null +++ b/external-declarations/fixer-test/expected/destructuring.ts @@ -0,0 +1,8 @@ +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; +export const z = 42; diff --git a/external-declarations/fixer-test/expected/function_return.ts b/external-declarations/fixer-test/expected/function_return.ts index c3fa162eaba7a..10edf236a5826 100644 --- a/external-declarations/fixer-test/expected/function_return.ts +++ b/external-declarations/fixer-test/expected/function_return.ts @@ -10,7 +10,7 @@ function foo2(a: number) { } return String(a); } -export function singleReturn() { +export function singleReturn(): number { return 42; } function singleReturn2() { @@ -22,7 +22,7 @@ export function singleReturnNonLiteral(): string | 42 { function singleReturnNonLiteral2() { return foo(2); } -export function multipleReturn(a: number) { +export function multipleReturn(a: number): 42 | 43 { if (a === 0) { return 42; } @@ -46,7 +46,10 @@ export function returnObjectLiteral(): { Button: makeResource("Label") }; } -export function returnObjectLiteral2() { +export function returnObjectLiteral2(): { + Label: number; + Button: string; +} { return { Label: 42, Button: "42" diff --git a/external-declarations/fixer-test/expected/function_signatures_objects.ts b/external-declarations/fixer-test/expected/function_signatures_objects.ts index c2ff3c909354a..b86c8f3c91319 100644 --- a/external-declarations/fixer-test/expected/function_signatures_objects.ts +++ b/external-declarations/fixer-test/expected/function_signatures_objects.ts @@ -11,7 +11,11 @@ const b = { array: [1, 2, 3], fn(value: string): number { return 0; } } as const; -export const c = { +export const c: { + value: number; + array: number[]; + fn(value: string): number; +} = { value: 0, array: [1, 2, 3], fn(value: string): number { return 0; } diff --git a/external-declarations/fixer-test/expected/object_literals.ts b/external-declarations/fixer-test/expected/object_literals.ts index b395bb514d664..b67768599e031 100644 --- a/external-declarations/fixer-test/expected/object_literals.ts +++ b/external-declarations/fixer-test/expected/object_literals.ts @@ -6,7 +6,10 @@ const b = { value: 0, array: [1, 2, 3] } as const; -export const c = { +export const c: { + value: number; + array: number[]; +} = { value: 0, array: [1, 2, 3] }; diff --git a/external-declarations/fixer-test/source/classes.ts b/external-declarations/fixer-test/source/classes.ts new file mode 100644 index 0000000000000..cc08ff5e46bf1 --- /dev/null +++ b/external-declarations/fixer-test/source/classes.ts @@ -0,0 +1,5 @@ +function mixin any>(ctor: T): T { + return ctor; +} +class Point2D { x = 0; y = 0; } +export class Point3D extends mixin(Point2D) { z = 0; } \ No newline at end of file diff --git a/external-declarations/fixer-test/source/default_exports.ts b/external-declarations/fixer-test/source/default_exports.ts new file mode 100644 index 0000000000000..804753d65d7de --- /dev/null +++ b/external-declarations/fixer-test/source/default_exports.ts @@ -0,0 +1,4 @@ +function foo() { + return { x: 1, y: 1 }; +} +export default foo(); \ No newline at end of file diff --git a/external-declarations/fixer-test/source/destructuring.ts b/external-declarations/fixer-test/source/destructuring.ts new file mode 100644 index 0000000000000..7c41a0b24e731 --- /dev/null +++ b/external-declarations/fixer-test/source/destructuring.ts @@ -0,0 +1,4 @@ +function foo() { + return { x: 1, y: 1 } as const; +} +export const { x, y = 0 } = foo(); \ No newline at end of file diff --git a/external-declarations/src/code-mod/code-transform.ts b/external-declarations/src/code-mod/code-transform.ts index 87f1d74b82651..ce1ae1e62f47b 100644 --- a/external-declarations/src/code-mod/code-transform.ts +++ b/external-declarations/src/code-mod/code-transform.ts @@ -36,6 +36,10 @@ function findNearestParentWithTypeAnnotation(node: ts.Node): ts.Node { !canHaveExplicitTypeAnnotation.has(node.kind)) { node = node.parent; } + if (ts.isObjectBindingPattern(node) || ts.isArrayBindingPattern(node)) { + // return VariableStatement + return node.parent.parent.parent; + } return node; } @@ -144,7 +148,7 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: | {kind: ExpressionType.ARRAY_ACCESS, arrayIndex: number} | {kind: ExpressionType.IDENTIFIER, identifier: ts.Identifier}; - function transformDestructuringPatterns(bindingPattern: ts.BindingPattern) { + function transformDestructuringPatterns(variableStatement: ts.VariableStatement, bindingPattern: ts.BindingPattern) { const enclosingVarStmt = bindingPattern.parent.parent.parent as ts.VariableStatement; const tempHolderForReturn = ts.factory.createUniqueName("dest", ts.GeneratedIdentifierFlags.Optimistic); const baseExpr: ExpressionReverseChain = { expression: { kind: ExpressionType.IDENTIFIER, identifier: tempHolderForReturn } }; @@ -458,9 +462,8 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: // Handling expression like heritage clauses e.g. class A extends mixin(B) .. case ts.SyntaxKind.ClassDeclaration: return handleClassDeclaration(node as ts.ClassDeclaration, nodeWithDiag.parent.parent as ts.ExpressionWithTypeArguments); - case ts.SyntaxKind.ObjectBindingPattern: - case ts.SyntaxKind.ArrayBindingPattern: - return transformDestructuringPatterns(node as ts.BindingPattern); + case ts.SyntaxKind.VariableStatement: + return transformDestructuringPatterns(node as ts.VariableStatement, findOuterMostBindingPattern(nodeWithDiag)); default: break; } @@ -473,3 +476,10 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: }; }; } + +function findOuterMostBindingPattern(node: ts.Node) { + while (!ts.isVariableDeclaration(node.parent)) { + node = node.parent; + } + return node as ts.BindingPattern; +} From 5d88b4e70faeb8b8b4e418cfd3c7a1066a666905 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Tue, 22 Aug 2023 14:35:16 +0000 Subject: [PATCH 050/224] Properly handle fix for VariableStatments Before, it was assuming that a VariableStatement only contains a single declaration, which was wrong. Signed-off-by: Hana Joo --- .../fixer-test/source/destructuring.ts | 2 +- external-declarations/src/code-mod/code-transform.ts | 11 +++++++++++ .../codefixes/fixMissingTypeAnnotationOnExports.ts | 11 +++++++++++ .../codeFixMissingTypeAnnotationOnExports15.ts | 6 +++--- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/external-declarations/fixer-test/source/destructuring.ts b/external-declarations/fixer-test/source/destructuring.ts index 7c41a0b24e731..663a76c61814d 100644 --- a/external-declarations/fixer-test/source/destructuring.ts +++ b/external-declarations/fixer-test/source/destructuring.ts @@ -1,4 +1,4 @@ function foo() { return { x: 1, y: 1 } as const; } -export const { x, y = 0 } = foo(); \ No newline at end of file +export const { x, y = 0 } = foo(), z = 42; \ No newline at end of file diff --git a/external-declarations/src/code-mod/code-transform.ts b/external-declarations/src/code-mod/code-transform.ts index ce1ae1e62f47b..8df3fb571bc0f 100644 --- a/external-declarations/src/code-mod/code-transform.ts +++ b/external-declarations/src/code-mod/code-transform.ts @@ -229,6 +229,17 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: } ++i; } + + if (variableStatement.declarationList.declarations.length > 1) { + newNodes.push(ts.factory.updateVariableStatement( + variableStatement, + variableStatement.modifiers, + ts.factory.updateVariableDeclarationList( + variableStatement.declarationList, + variableStatement.declarationList.declarations.filter((node) => node !== bindingPattern.parent), + ) + )); + } return newNodes; } diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index e28e96a9d7927..5e30db93b69e2 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -373,6 +373,17 @@ function transformDestructuringPatterns(bindingPattern: BindingPattern, } ++i; } + + 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), + ) + )); + } changes.replaceNodeWithNodes(sourceFile, enclosingVarStmt, newNodes); } diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts index 10da4ced14ad6..0661503a5bb72 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts @@ -5,7 +5,7 @@ //// function foo() { //// return { x: 1, y: 1}; //// } -//// export const { x, y = 0} = foo(); +//// export const { x, y = 0} = foo(), z= 42; verify.codeFixAvailable([ { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, @@ -22,5 +22,5 @@ verify.codeFix({ const dest = foo(); export const x: number = dest.x; const temp = dest.y; -export const y: number = temp === undefined ? 0 : dest.y;` -}); +export const y: number = temp === undefined ? 0 : dest.y; +export const z = 42;`}); From d653203dfb6a3590946591ae8af0040781358a2f Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 17 Aug 2023 16:50:49 +0100 Subject: [PATCH 051/224] Fix local inference for default exports and method/constructor signatures. Remove duplicate errors. Signed-off-by: Titian Cernicova-Dragomir --- .../declarations/localInferenceResolver.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 928f5e3e7d89c..f2e95435ae05c 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -1,6 +1,6 @@ import { Debug } from "../../debug"; import { Diagnostics } from "../../diagnosticInformationMap.generated"; -import { isComputedPropertyName, isExportAssignment, isGetAccessorDeclaration, isIdentifier, isLiteralTypeNode, isMethodDeclaration, isNoSubstitutionTemplateLiteral, isNumericLiteral, isOmittedExpression, isParameter, isPropertyAccessExpression, isPropertyAssignment, isPropertyDeclaration, isSetAccessorDeclaration, isShorthandPropertyAssignment, isSpreadAssignment, isSpreadElement, isStringLiteral, isTypeParameterDeclaration, isTypeReferenceNode, isVariableDeclaration } from "../../factory/nodeTests"; +import { isComputedPropertyName, isConstructSignatureDeclaration, isExportAssignment, isGetAccessorDeclaration, isIdentifier, isLiteralTypeNode, isMethodDeclaration, isMethodSignature, isNoSubstitutionTemplateLiteral, isNumericLiteral, isOmittedExpression, isParameter, isPropertyAccessExpression, isPropertyAssignment, isPropertyDeclaration, isSetAccessorDeclaration, isShorthandPropertyAssignment, isSpreadAssignment, isSpreadElement, isStringLiteral, isTypeParameterDeclaration, isTypeReferenceNode, isVariableDeclaration } from "../../factory/nodeTests"; import { setTextRange } from "../../factory/utilitiesPublic"; import { forEachChildRecursively } from "../../parser"; import { nullTransformationContext } from "../../transformer"; @@ -56,7 +56,6 @@ export function createLocalInferenceResolver({ if (localType !== undefined) { return localType; } - reportIsolatedDeclarationError(node); return makeInvalidType(); } finally { @@ -484,7 +483,7 @@ export function createLocalInferenceResolver({ function localInferenceFromInitializer(node: HasInferredType | ExportAssignment): TypeNode | undefined { let localType; if (isExportAssignment(node) && node.expression) { - localType = localInference(node.expression); + localType = localInference(node.expression, NarrowBehavior.KeepLiterals); } else if (isParameter(node) && node.initializer) { localType = localInference(node.initializer); @@ -495,6 +494,12 @@ export function createLocalInferenceResolver({ else if (isPropertyDeclaration(node) && node.initializer) { localType = localInference(node.initializer); } + else if(isMethodSignature(node) || isConstructSignatureDeclaration(node)) { + return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); + } + else { + reportIsolatedDeclarationError(node); + } if(!localType || localType.flags & LocalTypeInfoFlags.Invalid) { return undefined; } From cc478ded718ab434899e3c23339e5e0bcb3c92f6 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 23 Aug 2023 11:37:56 +0100 Subject: [PATCH 052/224] Added some enum value computation. Signed-off-by: Titian Cernicova-Dragomir --- .../src/compiler/emit-binder.ts | 3 +- .../src/compiler/emit-resolver.ts | 78 +++++++++++++++++-- external-declarations/src/compiler/types.ts | 4 +- .../src/test-runner/test-runner-main.ts | 56 ++++++++++--- .../src/test-runner/utils.ts | 27 +++++-- src/compiler/checker.ts | 7 +- src/compiler/transformers/declarations.ts | 9 +-- 7 files changed, 141 insertions(+), 43 deletions(-) diff --git a/external-declarations/src/compiler/emit-binder.ts b/external-declarations/src/compiler/emit-binder.ts index 92780d2176865..e2b2c866974d0 100644 --- a/external-declarations/src/compiler/emit-binder.ts +++ b/external-declarations/src/compiler/emit-binder.ts @@ -5,11 +5,12 @@ import { forEach } from "./lang-utils"; import { getEmitModuleKind, getEmitModuleResolutionKind, getNodeId, hasSyntacticModifier, isBindingPattern, isEnumConst, nodeHasName } from "./utils"; -interface NodeLinks { +export interface NodeLinks { isVisible?: boolean; symbol?: BasicSymbol; localSymbol?: BasicSymbol; locals?: SymbolTable; + enumValue?: string | number | undefined; } type SymbolTable = Map<__String, BasicSymbol>; diff --git a/external-declarations/src/compiler/emit-resolver.ts b/external-declarations/src/compiler/emit-resolver.ts index aa7e32d672294..b8d154737ac30 100644 --- a/external-declarations/src/compiler/emit-resolver.ts +++ b/external-declarations/src/compiler/emit-resolver.ts @@ -1,7 +1,7 @@ -import { __String, BindingPattern, CompilerOptions, Declaration, DeclarationName, EntityNameOrEntityNameExpression, EnumMember, findAncestor, FunctionLikeDeclaration, getCombinedModifierFlags, getCombinedNodeFlags, getNameOfDeclaration, ImportClause, ImportEqualsDeclaration, ImportSpecifier, isBindingElement, isElementAccessExpression, isEnumMember, isFunctionLike, isGetAccessor, isIdentifier, isLiteralExpression, isParameterPropertyDeclaration, isPrefixUnaryExpression, isPropertyAccessExpression, isSetAccessor, isSourceFile, isVariableDeclaration, isVariableStatement, ModifierFlags, NamespaceImport, Node, NodeFlags, ParameterDeclaration, PropertyDeclaration, PropertySignature, ResolutionMode,SourceFile, SymbolFlags, SyntaxKind, VariableDeclaration, VariableDeclarationList } from "typescript"; +import { __String, BindingPattern, CompilerOptions, Declaration, DeclarationName, ElementAccessExpression, EntityNameOrEntityNameExpression, EnumDeclaration, EnumMember, factory, findAncestor, FunctionLikeDeclaration, getCombinedModifierFlags, getCombinedNodeFlags, getNameOfDeclaration, ImportClause, ImportEqualsDeclaration, ImportSpecifier, isBindingElement, isElementAccessExpression, isEnumMember, isFunctionLike, isGetAccessor, isIdentifier, isLiteralExpression, isNumericLiteral, isParameterPropertyDeclaration, isPrefixUnaryExpression, isPropertyAccessExpression, isSetAccessor, isSourceFile, isStringLiteralLike, isVariableDeclaration, isVariableStatement, LiteralExpression, ModifierFlags, NamespaceImport, Node, NodeFlags, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertySignature, ResolutionMode,SourceFile, SymbolFlags, SyntaxKind, VariableDeclaration, VariableDeclarationList } from "typescript"; import { Debug } from "./debug"; -import { BasicSymbol, bindSourceFile } from "./emit-binder"; +import { BasicSymbol, bindSourceFile, NodeLinks } from "./emit-binder"; import { appendIfUnique, emptyArray, every, filter, hasProperty } from "./lang-utils"; import { IsolatedEmitResolver, LateBoundDeclaration, LateVisibilityPaintedStatement, SymbolAccessibility, SymbolVisibilityResult } from "./types"; import { AnyImportSyntax, getFirstIdentifier, hasDynamicName, hasEffectiveModifier, hasSyntacticModifier, isAmbientDeclaration,isBindingPattern, isExternalModuleAugmentation, isInJSFile, isLateVisibilityPaintedStatement, isPartOfTypeNode, isThisIdentifier, nodeIsPresent, skipParentheses } from "./utils"; @@ -13,10 +13,14 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration | EnumMember): boolean { - if (isDeclarationReadonly(node) || isVariableDeclaration(node) && isVarConst(node)) { + if (isDeclarationReadonly(node) || (isVariableDeclaration(node) && isVarConst(node)) || isEnumMember(node)) { // TODO: Make sure this is a valid approximation for literal types return (isEnumMember(node) || !node.type) && hasProperty(node, "initializer") && !!node.initializer && - (isLiteralExpression(node.initializer) || isPrefixUnaryExpression(node.initializer) && isLiteralExpression(node.initializer.operand)); + (isLiteralExpression(node.initializer) + || node.initializer.kind === SyntaxKind.TrueKeyword || node.initializer.kind === SyntaxKind.FalseKeyword + || (isPrefixUnaryExpression(node.initializer) + && (node.initializer.operator === SyntaxKind.PlusToken || node.initializer.operator === SyntaxKind.MinusToken) + && isLiteralExpression(node.initializer.operand))); // Original TS version // return isFreshLiteralType(getTypeOfSymbol(getSymbolOfNode(node))); } @@ -37,13 +41,73 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p } return { - isSyntheticTypeEquivalent(actualTypeNode, typeNode, message) { - return true; - }, isDeclarationVisible, isLiteralConstDeclaration, + getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined { + function getLiteralValue(value: LiteralExpression) { + if(isStringLiteralLike(value)) { + return value.text + } + if(isNumericLiteral(value)) { + return +value.text + } + return undefined; + } + function getEnumMemberInitializerValue(node: EnumMember) { + if(isLiteralConstDeclaration(node)) { + const initializer = node.initializer; + if(!initializer) return undefined; + if(isLiteralExpression(initializer)) { + return getLiteralValue(initializer); + } + + if(isPrefixUnaryExpression(initializer) && isNumericLiteral(initializer.operand)) { + if(initializer.operator === SyntaxKind.MinusToken) { + const value = getLiteralValue(initializer.operand); + return value && -value; + } + if(initializer.operator === SyntaxKind.PlusToken) { + return getLiteralValue(initializer.operand) + } + } + } + } + function updateEnumValues(node: EnumDeclaration) { + let prevEnumValueLinks: NodeLinks | undefined; + let isDeclaration = isAmbientDeclaration(node); + for(const enumValue of node.members) { + const links = getNodeLinks(enumValue); + const value = getEnumMemberInitializerValue(enumValue); + if(isDeclaration || value !== undefined || enumValue.initializer) { + links.enumValue = value; + } + 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) { + const initializer = node.initializer; + if(isStringLiteralLike(initializer)) { + return factory.createStringLiteral(initializer.text); + } return node.initializer; } Debug.fail(); diff --git a/external-declarations/src/compiler/types.ts b/external-declarations/src/compiler/types.ts index 9582af1d008b6..89823d787821b 100644 --- a/external-declarations/src/compiler/types.ts +++ b/external-declarations/src/compiler/types.ts @@ -1,4 +1,4 @@ -import { AsExpression, BinaryExpression, ClassDeclaration, CompilerOptions, ComputedPropertyName, Declaration, Diagnostic, DiagnosticMessage, DiagnosticWithLocation, ElementAccessExpression, EntityNameExpression, EntityNameOrEntityNameExpression, EnumDeclaration, Expression, FileReference, FunctionDeclaration, ImportDeclaration, InterfaceDeclaration, ModifierFlags, ModuleBlock, ModuleDeclaration, NamedDeclaration, Node, NonNullExpression, ParameterDeclaration, ParenthesizedExpression, PartiallyEmittedExpression, PropertyDeclaration, PropertySignature, ResolutionMode,SatisfiesExpression, SignatureDeclaration, SourceFile, StringLiteralLike, Symbol, SymbolFlags, TransformationContext as _TransformationContext, TypeAliasDeclaration, TypeAssertion, TypeNode, VariableDeclaration, VariableStatement, Path } from "typescript"; +import { AsExpression, BinaryExpression, ClassDeclaration, CompilerOptions, ComputedPropertyName, Declaration, DiagnosticWithLocation, ElementAccessExpression, EntityNameExpression, EntityNameOrEntityNameExpression, EnumDeclaration, Expression, FileReference, FunctionDeclaration, ImportDeclaration, InterfaceDeclaration, ModifierFlags, ModuleBlock, ModuleDeclaration, NamedDeclaration, Node, NonNullExpression, ParameterDeclaration, ParenthesizedExpression, PartiallyEmittedExpression, PropertyDeclaration, PropertySignature, ResolutionMode,SatisfiesExpression, SignatureDeclaration, SourceFile, StringLiteralLike, Symbol, SymbolFlags, TransformationContext as _TransformationContext, TypeAliasDeclaration, TypeAssertion, VariableDeclaration, VariableStatement, Path, EnumMember, PropertyAccessExpression } from "typescript"; import { AnyImportSyntax } from "./utils"; @@ -27,7 +27,6 @@ export interface IsolatedEmitHost extends ModuleSpecifierResolutionHost, Resolve } export interface IsolatedEmitResolver { - isSyntheticTypeEquivalent(actualTypeNode: Node, typeNode: TypeNode, message: DiagnosticMessage): Diagnostic[] | true; isDeclarationVisible(node: Declaration | AnyImportSyntax): boolean; isLateBound(node: Declaration): node is LateBoundDeclaration; isImplementationOfOverload(node: SignatureDeclaration): boolean | undefined; @@ -40,6 +39,7 @@ export interface IsolatedEmitResolver { isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration): boolean; getSymbolOfExternalModuleSpecifier(node: StringLiteralLike): Symbol | undefined; isImportRequiredByAugmentation(decl: ImportDeclaration): boolean; + getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined } /** @internal */ export interface AmbientModuleDeclaration extends ModuleDeclaration { diff --git a/external-declarations/src/test-runner/test-runner-main.ts b/external-declarations/src/test-runner/test-runner-main.ts index 13c12f666e80e..9d0fbec499803 100644 --- a/external-declarations/src/test-runner/test-runner-main.ts +++ b/external-declarations/src/test-runner/test-runner-main.ts @@ -14,7 +14,8 @@ import { IO } from "./tsc-infrastructure/io"; import { CompilerSettings, TestCaseContent } from "./tsc-infrastructure/test-file-parser"; import { getFileBasedTestConfigurationDescription, getFileBasedTestConfigurations } from "./tsc-infrastructure/vary-by"; import { changeExtension } from "./tsc-infrastructure/vpath"; -import { FileContent,loadTestCase, runIsolated, runTypeScript } from "./utils"; +import { TestCompilationResult, loadTestCase, runIsolated, runTypeScript } from "./utils"; +import { Diagnostics } from "./tsc-infrastructure/diagnosticInformationMap.generated"; const excludeFilter =/\/fourslash\//; @@ -56,6 +57,15 @@ const historical = (parsedArgs.histFolder && `/${parsedArgs.histFolder}/`) ?? `/ function pad(num: number, size: number) { return ("000000000" + num).substr(-size); } +const isolatedDeclarationErrors = new Set([ + Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.code +]); + +const unreliableEmitErrors = new Set([ + Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any.code, + Diagnostics.A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type.code, + Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern.code, +]) async function main() { @@ -86,12 +96,11 @@ async function main() { } console.log(` Ran: ${pad(count, 5)}/${allTests.length}`); - function runAndWrite(file: string, varySettings: CompilerSettings, fn: (data: TestCaseContent, opts: ts.CompilerOptions) => FileContent[]) { + function runAndWrite(file: string, varySettings: CompilerSettings, fn: (data: TestCaseContent, opts: ts.CompilerOptions) => TestCompilationResult) { const settings: ts.CompilerOptions = {}; setCompilerOptionsFromHarnessSetting(data.settings, settings); setCompilerOptionsFromHarnessSetting(varySettings, settings); - // Not supported delete settings.outFile; delete settings.out; @@ -99,7 +108,8 @@ async function main() { delete settings.declarationDir; const results = safeRun(d => fn(d, settings)); - const resultText = results + file = normalizePath(file) + const resultText = results.files .flatMap(r => [ "// " + r.fileName, r.content @@ -110,25 +120,47 @@ async function main() { // ` + data.code.split("\n").join(` // `); + if (results.diagnostics instanceof Error) { + file = path.join( + path.dirname(file), + "critical-errors", + path.basename(file) + ); + } else if(results.diagnostics.some(d =>isolatedDeclarationErrors.has(d.code))) { + file = path.join( + path.dirname(file), + "with-isolated-declaration-errors", + path.basename(file) + ); + } else if(results.diagnostics.some(d =>unreliableEmitErrors.has(d.code))) { + file = path.join( + path.dirname(file), + "with-unreliable-errors", + path.basename(file) + ); + } if (allTests.length > 5) { - writeResults(normalizePath(file).replace("/$now/", historical), resultText); + writeResults(file.replace("/$now/", historical), resultText); } writeResults(file, resultText); } - function safeRun(fn: (data: TestCaseContent) => FileContent[]): FileContent[] { + function safeRun(fn: (data: TestCaseContent) => TestCompilationResult): TestCompilationResult { try { return fn(data); } catch (e) { - return [{ - fileName: path.basename(testFile), - content: ` + return { + diagnostics: e, + files: [{ + fileName: path.basename(testFile), + content: ` ==== ERROR ==== message: ${e.message}, ${e.stack}, - `, - }]; +`, + }] + }; } } @@ -143,4 +175,4 @@ ${e.stack}, } await flushQueue(); } -main(); \ No newline at end of file +main(); diff --git a/external-declarations/src/test-runner/utils.ts b/external-declarations/src/test-runner/utils.ts index 046eeee069af6..5c69041ce17cf 100644 --- a/external-declarations/src/test-runner/utils.ts +++ b/external-declarations/src/test-runner/utils.ts @@ -11,9 +11,13 @@ import * as TestCaseParser from "./tsc-infrastructure/test-file-parser"; import { changeExtension } from "./tsc-infrastructure/vpath"; import * as vpath from "./tsc-infrastructure/vpath"; +export interface TestCompilationResult { + files: readonly FileContent[]; + diagnostics: readonly ts.Diagnostic[] | Error +} export interface FileContent { - content: string, - fileName: string + readonly content: string, + readonly fileName: string, } export async function loadTestCase(fileName: string) { @@ -26,7 +30,8 @@ export async function loadTestCase(fileName: string) { BOM: rawText.substring(0, Utils.getByteOrderMarkLength(rawText)) }); } -export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings: ts.CompilerOptions): FileContent[] { +const forceIsolatedDeclarations = process.argv.some(v => v === "--force-isolated-declarations"); +export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings: ts.CompilerOptions): TestCompilationResult { function createHarnessTestFile(lastUnit: TestCaseParser.TestUnitData): TestFile { return { unitName: lastUnit.name, content: lastUnit.content, fileOptions: lastUnit.fileOptions }; } @@ -35,7 +40,7 @@ export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings return createHarnessTestFile(unit); }); - if (settings.isolatedDeclarations === undefined) { + if (forceIsolatedDeclarations && settings.isolatedDeclarations === undefined) { settings.isolatedDeclarations = true; } const result = compileFiles(toBeCompiled, [], { @@ -44,7 +49,7 @@ export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings removeComments: "false", }, settings); - return caseData.testUnitData + const files = caseData.testUnitData .filter(isRelevantTestFile) .flatMap(file => { const declarationFile = changeExtension(file.name, getDeclarationExtension(file.name)); @@ -63,13 +68,17 @@ export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings // } ]; }); + return { + files, + diagnostics: result.diagnostics, + } } export function isRelevantTestFile(f: TestCaseParser.TestUnitData) { return isTypeScriptFile(f.name) && !isDeclarationFile(f.name) && f.content !== undefined; } -export function runIsolated(caseData: TestCaseParser.TestCaseContent, libFiles: string[], settings: ts.CompilerOptions): FileContent[] { +export function runIsolated(caseData: TestCaseParser.TestCaseContent, libFiles: string[], settings: ts.CompilerOptions): TestCompilationResult { const toSrc = (n: string) => vpath.combine("/src", n); const projectFiles = [...caseData.testUnitData.map(o => toSrc(o.name)), ...libFiles]; settings = { @@ -83,7 +92,8 @@ export function runIsolated(caseData: TestCaseParser.TestCaseContent, libFiles: packageResolution = JSON.parse(packageJson.content)?.type === "module" ? ModuleKind.ESNext : ModuleKind.CommonJS; } - const results = caseData.testUnitData + const diagnostics: ts.Diagnostic[] = [] + const files = caseData.testUnitData .filter(isRelevantTestFile) .map(file => { const sourceFile = ts.createSourceFile( @@ -93,12 +103,13 @@ export function runIsolated(caseData: TestCaseParser.TestCaseContent, libFiles: /*setParentNodes*/ true, file.name.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS); const declaration = transformFile(sourceFile, projectFiles, libs, settings, packageResolution); + diagnostics.push(...declaration.diagnostics); return { content: declaration.code, fileName: changeExtension(file.name, getDeclarationExtension(file.name)), }; }); - return results; + return { files, diagnostics }; } diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index db751d4243442..91f6f766b2b68 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -46597,12 +46597,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration | EnumMember): boolean { if (isDeclarationReadonly(node) || (isVariableDeclaration(node) && isVarConst(node)) || isEnumMember(node)) { - // TODO: isolated declarations: Add a test for this. - // In isolated declaration mode we can't really use the freshness of the type as this would require type information. - return compilerOptions.isolatedDeclarations? - (isEnumMember(node)|| !node.type) && !!node.initializer && - (isLiteralExpression(node.initializer) || isPrefixUnaryExpression(node.initializer) && isLiteralExpression(node.initializer.operand)) : - isFreshLiteralType(getTypeOfSymbol(getSymbolOfDeclaration(node))); + return isFreshLiteralType(getTypeOfSymbol(getSymbolOfDeclaration(node))); } return false; } diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 9bcc41ca8860e..8d2f532438654 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -126,7 +126,6 @@ import { isInterfaceDeclaration, isJsonSourceFile, isLateVisibilityPaintedStatement, - isLiteralExpression, isLiteralImportTypeNode, isMappedTypeNode, isMethodDeclaration, @@ -778,9 +777,6 @@ export function transformDeclarations(context: TransformationContext) { function ensureNoInitializer(node: CanHaveLiteralInitializer) { if (shouldPrintWithInitializer(node)) { - if(isolatedDeclarations && node.initializer && isLiteralExpression(node.initializer)) { - return node.initializer; - } return resolver.createLiteralConstValue(getParseTreeNode(node) as CanHaveLiteralInitializer, symbolTracker); // TODO: Make safe } return undefined; @@ -1806,13 +1802,12 @@ export function transformDeclarations(context: TransformationContext) { return cleanup(factory.updateEnumDeclaration(input, factory.createNodeArray(ensureModifiers(input)), input.name, factory.createNodeArray(mapDefined(input.members, m => { if (shouldStripInternal(m)) return; if (isolatedDeclarations) { - if (!resolver.isLiteralConstDeclaration(m)) { + if (m.initializer && !resolver.isLiteralConstDeclaration(m)) { reportIsolatedDeclarationError(m); } - return m; } // Rewrite enum values to their constants, if available - const constValue = isolatedDeclarations? undefined : resolver.getConstantValue(m); + const constValue = resolver.getConstantValue(m); return preserveJsDoc(factory.updateEnumMember(m, m.name, constValue !== undefined ? typeof constValue === "string" ? factory.createStringLiteral(constValue) : factory.createNumericLiteral(constValue) : undefined), m); })))); } From 643d33cd15e5760c60fd6dbeb6250e0d2aed885f Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Wed, 23 Aug 2023 12:57:08 +0000 Subject: [PATCH 053/224] When annotating for function expressions, prefer adding type annotation on the function rather than on variables to reduce the size of the diff. Signed-off-by: Hana Joo --- .../expected/function_expressions.ts | 9 +++ .../fixer-test/source/function_expressions.ts | 11 +++ .../src/code-mod/code-transform.ts | 57 +++++++++++++ .../fixMissingTypeAnnotationOnExports.ts | 81 ++++++++++++++----- ...codeFixMissingTypeAnnotationOnExports19.ts | 21 +++++ ...codeFixMissingTypeAnnotationOnExports20.ts | 23 ++++++ .../codeFixMissingTypeAnnotationOnExports8.ts | 2 +- 7 files changed, 184 insertions(+), 20 deletions(-) create mode 100644 external-declarations/fixer-test/expected/function_expressions.ts create mode 100644 external-declarations/fixer-test/source/function_expressions.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports19.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports20.ts diff --git a/external-declarations/fixer-test/expected/function_expressions.ts b/external-declarations/fixer-test/expected/function_expressions.ts new file mode 100644 index 0000000000000..4cb96f1b24e93 --- /dev/null +++ b/external-declarations/fixer-test/expected/function_expressions.ts @@ -0,0 +1,9 @@ +function foo() { + return 42; +} +export class A { + readonly b = (): number => foo(); + readonly c = function (): number { return foo(); }; +} +export const b = (): number => foo(); +export const c = function (): number { return foo(); }; diff --git a/external-declarations/fixer-test/source/function_expressions.ts b/external-declarations/fixer-test/source/function_expressions.ts new file mode 100644 index 0000000000000..f31fba96e223a --- /dev/null +++ b/external-declarations/fixer-test/source/function_expressions.ts @@ -0,0 +1,11 @@ +function foo() { + return 42; +} + +export class A { + readonly b = () => foo(); + readonly c = function() { return foo(); }; +} + +export const b = () => foo(); +export const c = function() { return foo(); }; \ No newline at end of file diff --git a/external-declarations/src/code-mod/code-transform.ts b/external-declarations/src/code-mod/code-transform.ts index 8df3fb571bc0f..6f87ad96fc1d1 100644 --- a/external-declarations/src/code-mod/code-transform.ts +++ b/external-declarations/src/code-mod/code-transform.ts @@ -328,6 +328,44 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: }) ); } + function addTypeToFunctionLikeDeclaration(func: ts.FunctionDeclaration): ts.FunctionDeclaration; + function addTypeToFunctionLikeDeclaration(func: ts.FunctionExpression | ts.ArrowFunction): ts.FunctionExpression | ts.ArrowFunction; + function addTypeToFunctionLikeDeclaration(func: ts.FunctionDeclaration | ts.FunctionExpression | ts.ArrowFunction) { + const type = tryGetReturnType(typeChecker, func); + const typeNode = typeToTypeNode(type!, func); + if (ts.isFunctionDeclaration(func)) { + return ts.factory.updateFunctionDeclaration( + func, + func.modifiers, + func.asteriskToken, + func.name, + func.typeParameters, + updateTypesInNodeArray(func.parameters), + typeNode, + func.body); + } + else if (ts.isFunctionExpression(func)) { + return ts.factory.updateFunctionExpression( + func, + func.modifiers, + func.asteriskToken, + func.name, + func.typeParameters, + updateTypesInNodeArray(func.parameters), + typeNode, + func.body); + } + else { + return ts.factory.updateArrowFunction( + func, + func.modifiers, + func.typeParameters, + updateTypesInNodeArray(func.parameters), + typeNode, + ts.factory.createToken(ts.SyntaxKind.EqualsGreaterThanToken), + func.body); + } + } // Define a visitor function function visit(node: ts.Node): ts.Node | ts.Node[] { @@ -358,6 +396,16 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: case ts.SyntaxKind.VariableDeclaration: const variableDeclaration = node as ts.VariableDeclaration; if (!variableDeclaration.type) { + if (variableDeclaration.initializer && + (ts.isFunctionExpression(variableDeclaration.initializer) || ts.isArrowFunction(variableDeclaration.initializer))) { + return ts.factory.updateVariableDeclaration( + variableDeclaration, + variableDeclaration.name, + /**exclamationToken=*/ undefined, + /**type*/ undefined, + addTypeToFunctionLikeDeclaration(variableDeclaration.initializer) + ); + } const type = typeChecker.getTypeAtLocation(variableDeclaration); const typeNode = typeToTypeNode(type, variableDeclaration); return ts.factory.updateVariableDeclaration( @@ -405,6 +453,15 @@ export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: case ts.SyntaxKind.PropertyDeclaration: const propDecl = node as ts.PropertyDeclaration; if(!propDecl.type) { + if (propDecl.initializer && (ts.isFunctionExpression(propDecl.initializer) || ts.isArrowFunction(propDecl.initializer))) { + return ts.factory.updatePropertyDeclaration( + propDecl, + propDecl.modifiers, + propDecl.name, + propDecl.questionToken ?? propDecl.exclamationToken, + /**type*/ undefined, + addTypeToFunctionLikeDeclaration(propDecl.initializer)); + } const type = typeChecker.getTypeAtLocation(node); const typeNode = typeToTypeNode(type, propDecl); return ts.factory.updatePropertyDeclaration( diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 5e30db93b69e2..5adf2701080e3 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -1,5 +1,6 @@ import { ArrayBindingPattern, + ArrowFunction, BindingElement, BindingPattern, ClassDeclaration, @@ -9,12 +10,16 @@ import { ExpressionWithTypeArguments, factory, FunctionDeclaration, + FunctionExpression, GeneratedIdentifierFlags, GetAccessorDeclaration, getTokenAtPosition, Identifier, isArrayBindingPattern, + isArrowFunction, isComputedPropertyName, + isFunctionDeclaration, + isFunctionExpression, isObjectBindingPattern, isOmittedExpression, isVariableDeclaration, @@ -113,6 +118,9 @@ function fixupForIsolatedDeclarations(node: Node, nodeWithDiag: Node, sourceFile case SyntaxKind.VariableDeclaration: const variableDeclaration = node as VariableDeclaration; if (!variableDeclaration.type) { + if (variableDeclaration.initializer && (isFunctionExpression(variableDeclaration.initializer) || isArrowFunction(variableDeclaration.initializer))) { + return addTypeToFunctionLikeDeclaration(variableDeclaration.initializer, sourceFile, typeChecker, changes); + } const type = typeChecker.getTypeAtLocation(variableDeclaration); const typeNode = typeToTypeNode(type, variableDeclaration, typeChecker); return changes.replaceNodeWithNodes(sourceFile, node, @@ -126,28 +134,13 @@ function fixupForIsolatedDeclarations(node: Node, nodeWithDiag: Node, sourceFile } break; case SyntaxKind.FunctionDeclaration: - const functionDecl = node as FunctionDeclaration; - if (!functionDecl.type) { - const type = tryGetReturnType(typeChecker, functionDecl); - if(type) { - const typeNode = typeToTypeNode(type, functionDecl, typeChecker); - return changes.replaceNodeWithNodes(sourceFile, node, - [factory.updateFunctionDeclaration( - functionDecl, - functionDecl.modifiers, - functionDecl.asteriskToken, - functionDecl.name, - functionDecl.typeParameters, - updateTypesInNodeArray(functionDecl.parameters, typeChecker), - typeNode, - functionDecl.body)] - ); - } - } - break; + return addTypeToFunctionLikeDeclaration(node as FunctionDeclaration, sourceFile, typeChecker, changes); case SyntaxKind.PropertyDeclaration: const propDecl = node as PropertyDeclaration; if(!propDecl.type) { + if (propDecl.initializer && (isFunctionExpression(propDecl.initializer) || isArrowFunction(propDecl.initializer))) { + return addTypeToFunctionLikeDeclaration(propDecl.initializer, sourceFile, typeChecker, changes); + } const type = typeChecker.getTypeAtLocation(node); const typeNode = typeToTypeNode(type, propDecl, typeChecker); return changes.replaceNodeWithNodes(sourceFile, node, @@ -228,6 +221,56 @@ function fixupForIsolatedDeclarations(node: Node, nodeWithDiag: Node, sourceFile throw new Error(`Cannot find a fix for the given node ${node.kind}`); } +function addTypeToFunctionLikeDeclaration(func: FunctionDeclaration | FunctionExpression | ArrowFunction, sourceFile: SourceFile, typeChecker: TypeChecker, changes: textChanges.ChangeTracker) { + if (func.type) { + return; + } + + const type = tryGetReturnType(typeChecker, func); + if (!type) { + return; + } + const typeNode = typeToTypeNode(type, func, typeChecker); + if (isFunctionDeclaration(func)) { + changes.replaceNodeWithNodes(sourceFile, func, + [factory.updateFunctionDeclaration( + func, + func.modifiers, + func.asteriskToken, + func.name, + func.typeParameters, + updateTypesInNodeArray(func.parameters, typeChecker), + typeNode, + func.body)] + ); + } + else if (isFunctionExpression(func)) { + changes.replaceNodeWithNodes(sourceFile, func, + [factory.updateFunctionExpression( + func, + func.modifiers, + func.asteriskToken, + func.name, + func.typeParameters, + updateTypesInNodeArray(func.parameters, typeChecker), + typeNode, + func.body)] + ); + } + else { + changes.replaceNodeWithNodes(sourceFile, func, + [factory.updateArrowFunction( + func, + func.modifiers, + func.typeParameters, + updateTypesInNodeArray(func.parameters, typeChecker), + typeNode, + factory.createToken(SyntaxKind.EqualsGreaterThanToken), + func.body)] + ); + } +} + function handleClassDeclaration(classDecl: ClassDeclaration, heritageExpression: ExpressionWithTypeArguments, sourceFile: SourceFile, changes: textChanges.ChangeTracker, typeChecker: TypeChecker) { if (heritageExpression.kind !== SyntaxKind.ExpressionWithTypeArguments){ throw new Error(`Hey + ${heritageExpression.kind}`); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports19.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports19.ts new file mode 100644 index 0000000000000..737851f0a430b --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports19.ts @@ -0,0 +1,21 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +//// export class A { +//// readonly a = function foo() {return 42;} +//// } + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + index: 0, + newFileContent: +`export class A { + readonly a = function foo(): number { return 42; } +}` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports20.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports20.ts new file mode 100644 index 0000000000000..81d80ef059ca6 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports20.ts @@ -0,0 +1,23 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +//// function foo() { return 42; } +//// export class A { +//// readonly a = () => foo(); +//// } + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + index: 0, + newFileContent: +`function foo() { return 42; } +export class A { + readonly a = (): number => foo(); +}` +}); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports8.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports8.ts index 72de6bcdc33da..382c42e90d8da 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports8.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports8.ts @@ -15,5 +15,5 @@ verify.codeFix({ index: 0, newFileContent: `function foo() {return 42;} -export const g: () => number = function() { return foo(); };`, +export const g = function(): number { return foo(); };`, }); From 82dfd3b764bca4465b5a6aca9dd9fb36831e7b80 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Wed, 23 Aug 2023 20:58:11 +0000 Subject: [PATCH 054/224] Do not print typeof operator for Symbol types and rather print out symbol or unique symbol Signed-off-by: Hana Joo --- .../expected/function_signatures_objects.ts | 16 ++++++------- .../fixer-test/expected/object_literals.ts | 8 +++---- .../fixer-test/expected/symbols.ts | 14 +++++++++++ .../fixer-test/source/symbols.ts | 14 +++++++++++ .../src/code-mod/code-transform.ts | 16 ++++++------- .../src/code-mod/fixer-test.ts | 2 +- .../fixMissingTypeAnnotationOnExports.ts | 16 ++++++------- ...codeFixMissingTypeAnnotationOnExports18.ts | 3 +-- ...codeFixMissingTypeAnnotationOnExports21.ts | 23 +++++++++++++++++++ ...codeFixMissingTypeAnnotationOnExports22.ts | 21 +++++++++++++++++ 10 files changed, 102 insertions(+), 31 deletions(-) create mode 100644 external-declarations/fixer-test/expected/symbols.ts create mode 100644 external-declarations/fixer-test/source/symbols.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports22.ts diff --git a/external-declarations/fixer-test/expected/function_signatures_objects.ts b/external-declarations/fixer-test/expected/function_signatures_objects.ts index b86c8f3c91319..a084cf3db5355 100644 --- a/external-declarations/fixer-test/expected/function_signatures_objects.ts +++ b/external-declarations/fixer-test/expected/function_signatures_objects.ts @@ -4,12 +4,12 @@ function foo() { export const a = { value: 0, array: [1, 2, 3], - fn(value: string): number { return 0; } + fn(value: string): number { return 0; }, } as const; const b = { value: 0, array: [1, 2, 3], - fn(value: string): number { return 0; } + fn(value: string): number { return 0; }, } as const; export const c: { value: number; @@ -18,12 +18,12 @@ export const c: { } = { value: 0, array: [1, 2, 3], - fn(value: string): number { return 0; } + fn(value: string): number { return 0; }, }; const d = { value: 0, array: [1, 2, 3], - fn(value: string): number { return 0; } + fn(value: string): number { return 0; }, }; export const e: { readonly value: number; @@ -32,12 +32,12 @@ export const e: { } = { value: foo(), array: [1, 2, 3], - fn(value: string): number { return 0; } + fn(value: string): number { return 0; }, } as const; const f = { value: foo(), array: [1, 2, 3], - fn(value: string): number { return 0; } + fn(value: string): number { return 0; }, } as const; export const g: { value: number; @@ -46,10 +46,10 @@ export const g: { } = { value: foo(), array: [1, 2, 3], - fn(value: string): number { return 0; } + fn(value: string): number { return 0; }, }; const h = { value: foo(), array: [1, 2, 3], - fn(value: string): number { return 0; } + fn(value: string): number { return 0; }, }; diff --git a/external-declarations/fixer-test/expected/object_literals.ts b/external-declarations/fixer-test/expected/object_literals.ts index b67768599e031..97633742753a0 100644 --- a/external-declarations/fixer-test/expected/object_literals.ts +++ b/external-declarations/fixer-test/expected/object_literals.ts @@ -1,19 +1,19 @@ export const a = { value: 0, - array: [1, 2, 3] + array: [1, 2, 3], } as const; const b = { value: 0, - array: [1, 2, 3] + array: [1, 2, 3], } as const; export const c: { value: number; array: number[]; } = { value: 0, - array: [1, 2, 3] + array: [1, 2, 3], }; const d = { value: 0, - array: [1, 2, 3] + array: [1, 2, 3], }; diff --git a/external-declarations/fixer-test/expected/symbols.ts b/external-declarations/fixer-test/expected/symbols.ts new file mode 100644 index 0000000000000..872122f994233 --- /dev/null +++ b/external-declarations/fixer-test/expected/symbols.ts @@ -0,0 +1,14 @@ +export const a: unique symbol = Symbol(); +export function foo(): symbol { + return Symbol(); +} +export const z: { + z: symbol; +} = { + z: Symbol(), +}; +export const z2: { + readonly z: symbol; +} = { + z: Symbol() +} as const; diff --git a/external-declarations/fixer-test/source/symbols.ts b/external-declarations/fixer-test/source/symbols.ts new file mode 100644 index 0000000000000..9ae64ee1bc700 --- /dev/null +++ b/external-declarations/fixer-test/source/symbols.ts @@ -0,0 +1,14 @@ + +export const a = Symbol(); + +export function foo() { + return Symbol(); +} + +export const z = { + z: Symbol(), +}; + +export const z2 = { + z: Symbol() +} as const; \ No newline at end of file diff --git a/external-declarations/src/code-mod/code-transform.ts b/external-declarations/src/code-mod/code-transform.ts index 6f87ad96fc1d1..2471c856c25d1 100644 --- a/external-declarations/src/code-mod/code-transform.ts +++ b/external-declarations/src/code-mod/code-transform.ts @@ -2,14 +2,14 @@ import * as ts from "typescript"; import { SymbolTracker } from "../compiler/types"; -const declarationEmitNodeBuilderFlags = - ts.NodeBuilderFlags.MultilineObjectLiterals | - ts.NodeBuilderFlags.WriteClassExpressionAsTypeLiteral | - ts.NodeBuilderFlags.UseTypeOfFunction | - ts.NodeBuilderFlags.UseStructuralFallback | - ts.NodeBuilderFlags.AllowEmptyTuple | - ts.NodeBuilderFlags.GenerateNamesForShadowedTypeParams | - ts.NodeBuilderFlags.NoTruncation; +const declarationEmitNodeBuilderFlags = ts.NodeBuilderFlags.MultilineObjectLiterals + | ts.NodeBuilderFlags.WriteClassExpressionAsTypeLiteral + | ts.NodeBuilderFlags.UseTypeOfFunction + | ts.NodeBuilderFlags.UseStructuralFallback + | ts.NodeBuilderFlags.AllowEmptyTuple + | ts.NodeBuilderFlags.GenerateNamesForShadowedTypeParams + | ts.NodeBuilderFlags.NoTruncation + | ts.NodeBuilderFlags.AllowUniqueESSymbolType; function tryGetReturnType(typeChecker: ts.TypeChecker, node: ts.SignatureDeclaration): ts.Type | undefined { const signature = typeChecker.getSignatureFromDeclaration(node); diff --git a/external-declarations/src/code-mod/fixer-test.ts b/external-declarations/src/code-mod/fixer-test.ts index dccb132820037..6a5cb48032a08 100644 --- a/external-declarations/src/code-mod/fixer-test.ts +++ b/external-declarations/src/code-mod/fixer-test.ts @@ -84,7 +84,7 @@ async function main() { const testFile = normalizePath(allTests[count].file); const caseData = await loadTestCase(testFile); - const settings: ts.CompilerOptions = {}; + const settings: ts.CompilerOptions = { target: ts.ScriptTarget.ES2019 }; setCompilerOptionsFromHarnessSetting(caseData.settings, settings); function createHarnessTestFile(lastUnit: TestUnitData): TestFile { diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 5adf2701080e3..d351f52548939 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -63,14 +63,14 @@ const canHaveExplicitTypeAnnotation = new Set([ SyntaxKind.ArrayBindingPattern, ]); -const declarationEmitNodeBuilderFlags = - NodeBuilderFlags.MultilineObjectLiterals | - NodeBuilderFlags.WriteClassExpressionAsTypeLiteral | - NodeBuilderFlags.UseTypeOfFunction | - NodeBuilderFlags.UseStructuralFallback | - NodeBuilderFlags.AllowEmptyTuple | - NodeBuilderFlags.GenerateNamesForShadowedTypeParams | - NodeBuilderFlags.NoTruncation; +const declarationEmitNodeBuilderFlags = NodeBuilderFlags.MultilineObjectLiterals + | NodeBuilderFlags.WriteClassExpressionAsTypeLiteral + | NodeBuilderFlags.UseTypeOfFunction + | NodeBuilderFlags.UseStructuralFallback + | NodeBuilderFlags.AllowEmptyTuple + | NodeBuilderFlags.GenerateNamesForShadowedTypeParams + | NodeBuilderFlags.NoTruncation + | NodeBuilderFlags.AllowUniqueESSymbolType; registerCodeFix({ errorCodes, diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts index 1033e99b07f15..e088753be488f 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts @@ -10,10 +10,9 @@ verify.codeFixAvailable([ { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } ]); -// TODO: the typeof operator here is wrong. verify.codeFix({ description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, index: 0, newFileContent: -`export const a: typeof a = Symbol();` +`export const a: unique symbol = Symbol();` }); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts new file mode 100644 index 0000000000000..d68e4a8188e5f --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts @@ -0,0 +1,23 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 +//// export const a = { +//// z: Symbol() +//// } as const; + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + 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..fa920d839884f --- /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: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + index: 0, + newFileContent: +`export function foo(): symbol { + return Symbol(); +}` +}); From cd8feab5198541a54d52bd16bc5aa80e778197c6 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 24 Aug 2023 21:30:05 +0100 Subject: [PATCH 055/224] Fix various miss-matches between DTE and ts Signed-off-by: Titian Cernicova-Dragomir --- external-declarations/fixed-tests.json | 292 ++++++++++++++++++ external-declarations/package.json | 1 + .../src/compiler/emit-binder.ts | 11 +- .../src/compiler/emit-resolver.ts | 29 +- .../src/test-runner/cli-arg-config.ts | 2 + .../src/test-runner/test-runner-main.ts | 55 ++-- src/compiler/transformers/declarations.ts | 12 +- .../declarations/localInferenceResolver.ts | 74 ++++- 8 files changed, 418 insertions(+), 58 deletions(-) create mode 100644 external-declarations/fixed-tests.json diff --git a/external-declarations/fixed-tests.json b/external-declarations/fixed-tests.json new file mode 100644 index 0000000000000..8313192b74791 --- /dev/null +++ b/external-declarations/fixed-tests.json @@ -0,0 +1,292 @@ +{ + "error-categories": { + "with-isolated-declaration-errors": [ + 9007 // Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit + ], + "with-unreliable-errors": [ + 2464, // A_computed_property_name_must_be_of_type_string_number_symbol_or_any, + 2314, // Generic type '{0}' requires {1} type argument(s) + 1166, // A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type + 1187, // A_parameter_property_may_not_be_declared_using_a_binding_pattern + 1003, // Identifier expected. + 2784, // 'get' and 'set' accessors cannot declare 'this' parameters. + 1162, // An object member cannot be declared optional. + ] + }, + "test-categories": { + "with-unreliable-errors": [ + "thisTypeErrors", // Assertion to this in static context produces this in DTE and any in TSC + "parseInvalidNonNullableTypes", // Prefix ! operator + "parseInvalidNullableTypes", // Prefix ? operator + "ArrowFunction1", // Missing type annotation syntax error + "parserX_ArrowFunction1", // Missing type annotation syntax error + "typeParameterDirectlyConstrainedToItself", // Circular type constraints makes emit unreliable + "typeParameterIndirectlyConstrainedToItself", // Circular type constraints makes emit unreliable + ], + "possible-ts-bugs": [ + // Type parameter renamed + "objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts", + "objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames", + "objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts", + // https://github.com/microsoft/TypeScript/issues/55494 + "declarationEmitComputedNameCausesImportToBePainted", + // Default type parameters is written in declarations + "conditionalTypesSimplifyWhenTrivial", + ], + // Needs TS Fix + "binding-patterns": [ + "declarationsAndAssignments", + "excessPropertyCheckWithSpread", + "destructuringParameterDeclaration1ES5", + "destructuringParameterDeclaration1ES5iterable", + "destructuringParameterDeclaration1ES6", + "sourceMapValidationDestructuringParameterNestedObjectBindingPattern", + "sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues", + "sourceMapValidationDestructuringParameterObjectBindingPattern", + "sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues", + "declarationEmitBindingPatterns", + "declarationEmitDuplicateParameterDestructuring", + "declarationEmitKeywordDestructuring", + "paramterDestrcuturingDeclaration", + "renamingDestructuredPropertyInFunctionType", + "restParameterWithBindingPattern3", + ], + // Need error to turn to isolated declaration error + "expando-function":[ + "contextualReturnTypeOfIIFE2", + "declarationEmitDefaultExportWithStaticAssignment", + "declarationEmitExpandoPropertyPrivateName", + "declarationEmitExpandoWithGenericConstraint", + "declarationEmitFunctionDuplicateNamespace", + "declarationEmitFunctionKeywordProp", + "declarationEmitLateBoundAssignments", + "expandoFunctionContextualTypesJSDocInTs", + "expandoFunctionContextualTypesNoValue", + "jsxComponentTypeErrors", + "lateBoundFunctionMemberAssignmentDeclarations", + "exportDefaultNamespace", + "nullPropertyName", + "newTargetNarrowing", + "propertyAssignmentUseParentType3", + "typeFromPropertyAssignment29", + "typeFromPropertyAssignment31", + "typeFromPropertyAssignment32", + "typeFromPropertyAssignment33", + "typeFromPropertyAssignment36", + "twoAccessorsWithSameName", + "propertyAssignmentUseParentType1", + "typeFromPropertyAssignment38", + ], + // Just Printing differences + "print-differences": [ + "arrayFind", + "capturedParametersInInitializers1", + "coAndContraVariantInferences", + "contextualTyping", + "contextualTyping38", + "contextualTyping39", + "correlatedUnions", + "declarationEmitNoNonRequiredParens", + "declarationEmitShadowingInferNotRenamed", + "declarationEmitTupleRestSignatureLeadingVariadic", + "es5SetterparameterDestructuringNotElided", + "hugeDeclarationOutputGetsTruncatedWithError", + "inKeywordAndIntersection", + "mapConstructor", + "mappedTypeInferenceAliasSubstitution", + "mappedTypeWithAsClauseAndLateBoundProperty2", + "parseArrowFunctionWithFunctionReturnType", + "parseTypes", + "asOperator1", + "generatedContextualTyping", + "objectLiteralGettersAndSetters", + "optionalChainingInference", + "constAssertions", + "noUncheckedIndexedAccess", + "conditionalTypes1", + "stringLiteralsWithTypeAssertions01", + "castingTuple", + "emptyTuplesTypeAssertion01", + "emptyTuplesTypeAssertion02", + "namedTupleMembers", + "optionalMethods", + "optionalParameterProperty", + "optionalParameterRetainsNull", + "escapedIdentifiers", + "parseBigInt", + "commentsFunction", + "declarationEmitDistributiveConditionalWithInfer", + "declarationEmitInlinedDistributiveConditional", + "declarationEmitParameterProperty", + "declarationsForFileShadowingGlobalNoError", + "mappedTypeGenericInstantiationPreservesHomomorphism", + "mappedTypeGenericInstantiationPreservesInlineForm", + "unusedTypeParametersCheckedByNoUnusedParameters", + "unusedTypeParametersNotCheckedByNoUnusedLocals", + "mixinClassesAnonymous", + "nodeModulesTripleSlashReferenceModeDeclarationEmit6", + "keyofAndIndexedAccess", + "subtypingWithCallSignatures2", + // Default type parameter is inlined + "conditionalTypesSimplifyWhenTrivial" + ], + // Investigate + "computed-properties": [ + "symbolProperty1", + "symbolProperty2", + "quotedConstructors", + "complicatedPrivacy", + "declarationEmitComputedNameConstEnumAlias", + "duplicateIdentifierDifferentSpelling", + "duplicateObjectLiteralProperty_computedName1", + "duplicateObjectLiteralProperty_computedName2", + "escapedReservedCompilerNamedIdentifier", + "exportEqualsAmd", + "exportEqualsCommonJs", + "exportEqualsDefaultProperty", + "exportEqualsUmd", + "literalsInComputedProperties1", + "objectLiteralComputedNameNoDeclarationError", + "objectLiteralEnumPropertyNames", + "propertyAssignment", + "protoAsIndexInIndexExpression", + "stringLiteralPropertyNameWithLineContinuation1", + "ES5SymbolProperty1", + "ES5SymbolProperty2", + "ES5SymbolProperty3", + "ES5SymbolProperty4", + "ES5SymbolProperty5", + "ES5SymbolProperty6", + "ES5SymbolProperty7", + "symbolProperty36", + "symbolProperty52", + "symbolProperty58", + "binaryIntegerLiteralError", + "octalIntegerLiteralError", + "computedPropertyNames13_ES5", + "computedPropertyNames13_ES6", + "computedPropertyNames16_ES5", + "computedPropertyNames16_ES6", + "computedPropertyNames20_ES5", + "computedPropertyNames20_ES6", + "computedPropertyNames2_ES5", + "computedPropertyNames2_ES6", + "computedPropertyNames46_ES5", + "computedPropertyNames46_ES6", + "computedPropertyNames47_ES5", + "computedPropertyNames47_ES6", + "computedPropertyNames7_ES5", + "computedPropertyNames7_ES6", + "computedPropertyNamesWithStaticProperty", + "MemberFunctionDeclaration3_es6", + "objectLiteralErrors", + "superSymbolIndexedAccess1", + "superSymbolIndexedAccess3", + "superSymbolIndexedAccess4", + "superSymbolIndexedAccess5", + "superSymbolIndexedAccess6", + "parserES5ComputedPropertyName11", + "parserES5ComputedPropertyName2", + "parserES5ComputedPropertyName5", + "parserES5ComputedPropertyName8", + "parserIndexSignature11", + "parserIndexSignature5", + "parserES5SymbolProperty1", + "parserES5SymbolProperty2", + "parserES5SymbolProperty3", + "parserES5SymbolProperty7", + "parserES5SymbolProperty8", + "parserES5SymbolProperty9", + "parserComputedPropertyName11", + "parserComputedPropertyName12", + "parserComputedPropertyName13", + "parserComputedPropertyName14", + "parserComputedPropertyName15", + "parserComputedPropertyName18", + "parserComputedPropertyName19", + "parserComputedPropertyName2", + "parserComputedPropertyName20", + "parserComputedPropertyName21", + "parserComputedPropertyName23", + "parserComputedPropertyName24", + "parserComputedPropertyName32", + "parserComputedPropertyName35", + "parserComputedPropertyName37", + "parserComputedPropertyName38", + "parserComputedPropertyName39", + "parserComputedPropertyName6", + "ES5For-ofTypeCheck10", + "indexSignatures1", + "objectTypeWithDuplicateNumericProperty", + "objectTypeWithStringNamedPropertyOfIllegalCharacters", + "numericNamedPropertyDuplicates", + "numericStringNamedPropertyEquivalence", + "stringNamedPropertyDuplicates", + "genericObjectRest", + "assignmentCompatWithObjectMembersNumericNames", + "parserES5ComputedPropertyName3", + "parserES5ComputedPropertyName4", + "parserFunctionPropertyAssignment3", + "parserComputedPropertyName3", + "parserComputedPropertyName4", + "parserComputedPropertyName5", + "declarationEmitWithDefaultAsComputedName", + "declarationEmitWithDefaultAsComputedName2", + "declarationEmitMappedTypeTemplateTypeofSymbol", + "declarationEmitReadonlyComputedProperty", + "dynamicNames", + "genericFunctionsAndConditionalInference", + "identityAndDivergentNormalizedTypes", + "modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib" + ], + // Investigate in reference DTE + "references-import-diffs": [ + "commonJsExportTypeDeclarationError", + "declarationEmitForModuleImportingModuleAugmentationRetainsImport", + "declarationEmitHasTypesRefOnNamespaceUse", + "declarationFilesWithTypeReferences2", + "decoratorMetadataWithImportDeclarationNameCollision7", + "jsxCallElaborationCheckNoCrash1", + "nodeModulesImportTypeModeDeclarationEmit1", + "nodeModulesImportTypeModeDeclarationEmitErrors1", + "typeReferenceDirectives1", + "typeReferenceDirectives11", + "typeReferenceDirectives12", + "typeReferenceDirectives13", + "typeReferenceDirectives2", + "typeReferenceDirectives5", + "typeReferenceDirectives6", + "typeReferenceDirectives8", + "typeReferenceDirectives9", + "typeReferenceRelatedFiles", + "jsxNamespaceGlobalReexport", + "parseAssertEntriesError", + ], + "bug-binding-pattern-inference": [ + "destructuringWithLiteralInitializers", + "parameterInitializersBackwardReferencing" + ], + "bug-preserve-comments": [ + "commentsOnObjectLiteral4" + ], + // Unreliable errors + // Investigate for duplicate properties. Maybe we can remove the duplicates. + "duplicates": [ + "duplicateObjectLiteralProperty", + "duplicatePropertiesInStrictMode", + "duplicateVariablesWithAny", + "duplicateVarsAcrossFileBoundaries", + "gettersAndSettersErrors", + "jsFileCompilationDuplicateVariableErrorReported", + "memberOverride", + "noRepeatedPropertyNames", + "varBlock", + "duplicatePropertiesInTypeAssertions01", + "duplicatePropertiesInTypeAssertions02", + "parserCastVersusArrowFunction1", + "invalidMultipleVariableDeclarations", + "validMultipleVariableDeclarations", + "augmentedTypesVar", + ], + } +} diff --git a/external-declarations/package.json b/external-declarations/package.json index 50d826e6070ee..4b4da3a44e422 100644 --- a/external-declarations/package.json +++ b/external-declarations/package.json @@ -18,6 +18,7 @@ "author": "", "license": "ISC", "dependencies": { + "json5": "^2.2.3", "source-map-support": "^0.5.21", "typescript": "../" }, diff --git a/external-declarations/src/compiler/emit-binder.ts b/external-declarations/src/compiler/emit-binder.ts index e2b2c866974d0..1fbbeb506e5e0 100644 --- a/external-declarations/src/compiler/emit-binder.ts +++ b/external-declarations/src/compiler/emit-binder.ts @@ -289,15 +289,18 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa const mappedType = node; withScope(node, /*exports*/ undefined, () => { bindTypeParameters([mappedType.typeParameter]); - bindWorker(mappedType.nameType); - bindWorker(mappedType.type); }); + bindWorker(mappedType.nameType); + bindWorker(mappedType.type); } else if(isConditionalTypeNode(node)) { - withScope(node.checkType, /*exports*/ undefined, () => { + withScope(node.extendsType, /*exports*/ undefined, () => { bindWorker(node.extendsType); }); - getNodeLinks(node.trueType).locals = getNodeLinks(node.checkType).locals; + bindWorker(node.checkType); + bindWorker(node.falseType); + getNodeLinks(node.trueType).locals = getNodeLinks(node.extendsType).locals; + bindWorker(node.trueType); } else if(isInferTypeNode(node)) { const conditionalTypeOwner = findAncestor(node, isConditionalTypeNode); diff --git a/external-declarations/src/compiler/emit-resolver.ts b/external-declarations/src/compiler/emit-resolver.ts index b8d154737ac30..671b563e0702e 100644 --- a/external-declarations/src/compiler/emit-resolver.ts +++ b/external-declarations/src/compiler/emit-resolver.ts @@ -1,4 +1,4 @@ -import { __String, BindingPattern, CompilerOptions, Declaration, DeclarationName, ElementAccessExpression, EntityNameOrEntityNameExpression, EnumDeclaration, EnumMember, factory, findAncestor, FunctionLikeDeclaration, getCombinedModifierFlags, getCombinedNodeFlags, getNameOfDeclaration, ImportClause, ImportEqualsDeclaration, ImportSpecifier, isBindingElement, isElementAccessExpression, isEnumMember, isFunctionLike, isGetAccessor, isIdentifier, isLiteralExpression, isNumericLiteral, isParameterPropertyDeclaration, isPrefixUnaryExpression, isPropertyAccessExpression, isSetAccessor, isSourceFile, isStringLiteralLike, isVariableDeclaration, isVariableStatement, LiteralExpression, ModifierFlags, NamespaceImport, Node, NodeFlags, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertySignature, ResolutionMode,SourceFile, SymbolFlags, SyntaxKind, VariableDeclaration, VariableDeclarationList } from "typescript"; +import { __String, BindingPattern, CompilerOptions, Declaration, DeclarationName, ElementAccessExpression, EntityNameOrEntityNameExpression, EnumDeclaration, EnumMember, factory, findAncestor, FunctionLikeDeclaration, getCombinedModifierFlags, getCombinedNodeFlags, getNameOfDeclaration, ImportClause, ImportEqualsDeclaration, ImportSpecifier, isBigIntLiteral, isBindingElement, isElementAccessExpression, isEnumMember, isFunctionLike, isGetAccessor, isIdentifier, isLiteralExpression, isNumericLiteral, isParameterPropertyDeclaration, isPrefixUnaryExpression, isPropertyAccessExpression, isSetAccessor, isSourceFile, isStringLiteralLike, isVariableDeclaration, isVariableStatement, LiteralExpression, ModifierFlags, NamespaceImport, Node, NodeFlags, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertySignature, ResolutionMode,SourceFile, SymbolFlags, SyntaxKind, VariableDeclaration, VariableDeclarationList } from "typescript"; import { Debug } from "./debug"; import { BasicSymbol, bindSourceFile, NodeLinks } from "./emit-binder"; @@ -14,13 +14,24 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration | EnumMember): boolean { if (isDeclarationReadonly(node) || (isVariableDeclaration(node) && isVarConst(node)) || isEnumMember(node)) { - // TODO: Make sure this is a valid approximation for literal types - return (isEnumMember(node) || !node.type) && hasProperty(node, "initializer") && !!node.initializer && - (isLiteralExpression(node.initializer) - || node.initializer.kind === SyntaxKind.TrueKeyword || node.initializer.kind === SyntaxKind.FalseKeyword - || (isPrefixUnaryExpression(node.initializer) - && (node.initializer.operator === SyntaxKind.PlusToken || node.initializer.operator === SyntaxKind.MinusToken) - && isLiteralExpression(node.initializer.operand))); + if(!(isEnumMember(node) || !node.type)) return false; + if(!(hasProperty(node, "initializer") && !!node.initializer)) return false; + + const initializer = node.initializer; + if(isLiteralExpression(initializer)) return true; + + if(initializer.kind === SyntaxKind.TrueKeyword || initializer.kind === SyntaxKind.FalseKeyword) return true; + + if(isPrefixUnaryExpression(initializer)) { + const operand = initializer.operand; + if(initializer.operator === SyntaxKind.MinusToken) { + return isNumericLiteral(operand) || isBigIntLiteral(operand); + } + if(initializer.operator === SyntaxKind.PlusToken) { + return isNumericLiteral(operand); + } + } + return false; // Original TS version // return isFreshLiteralType(getTypeOfSymbol(getSymbolOfNode(node))); } @@ -74,7 +85,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p } function updateEnumValues(node: EnumDeclaration) { let prevEnumValueLinks: NodeLinks | undefined; - let isDeclaration = isAmbientDeclaration(node); + let isDeclaration = isAmbientDeclaration(node) && !hasSyntacticModifier(node, ModifierFlags.Const); for(const enumValue of node.members) { const links = getNodeLinks(enumValue); const value = getEnumMemberInitializerValue(enumValue); diff --git a/external-declarations/src/test-runner/cli-arg-config.ts b/external-declarations/src/test-runner/cli-arg-config.ts index b60e7476a0faa..62d5be3f3d8e8 100644 --- a/external-declarations/src/test-runner/cli-arg-config.ts +++ b/external-declarations/src/test-runner/cli-arg-config.ts @@ -14,4 +14,6 @@ export const testRunnerCLIConfiguration = parserConfiguration({ histFolder: ArgType.String(), libPath: ArgType.String(), rootPaths: ArgType.StringArray(), + configFile: ArgType.String(), + category: ArgType.String(), }); diff --git a/external-declarations/src/test-runner/test-runner-main.ts b/external-declarations/src/test-runner/test-runner-main.ts index 9d0fbec499803..7ec7da28a1d86 100644 --- a/external-declarations/src/test-runner/test-runner-main.ts +++ b/external-declarations/src/test-runner/test-runner-main.ts @@ -3,6 +3,7 @@ import "source-map-support/register"; import * as fs from "fs/promises"; import * as path from "path"; import * as ts from "typescript"; +import * as JSON from 'json5'; import { normalizePath, removeExtension } from "../compiler/path-utils"; import { parseArgs } from "../utils/cli-parser"; @@ -15,7 +16,7 @@ import { CompilerSettings, TestCaseContent } from "./tsc-infrastructure/test-fil import { getFileBasedTestConfigurationDescription, getFileBasedTestConfigurations } from "./tsc-infrastructure/vary-by"; import { changeExtension } from "./tsc-infrastructure/vpath"; import { TestCompilationResult, loadTestCase, runIsolated, runTypeScript } from "./utils"; -import { Diagnostics } from "./tsc-infrastructure/diagnosticInformationMap.generated"; +import { firstDefined } from "../compiler/lang-utils"; const excludeFilter =/\/fourslash\//; @@ -57,18 +58,22 @@ const historical = (parsedArgs.histFolder && `/${parsedArgs.histFolder}/`) ?? `/ function pad(num: number, size: number) { return ("000000000" + num).substr(-size); } -const isolatedDeclarationErrors = new Set([ - Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.code -]); -const unreliableEmitErrors = new Set([ - Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any.code, - Diagnostics.A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type.code, - Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern.code, -]) async function main() { + let fileConfiguration: undefined | { + "error-categories": Record, + "test-categories": Record, + }; + const testCategories = new Map(); + const errorCategories = new Map(); + if(parsedArgs.configFile) { + fileConfiguration = JSON.parse(await fs.readFile(parsedArgs.configFile, { encoding: "utf8" })); + Object.entries(fileConfiguration?.["error-categories"] ?? {}).forEach(([name, codes]) => codes.forEach(c => errorCategories.set(c, name))); + Object.entries(fileConfiguration?.["test-categories"] ?? {}).forEach(([name, tests]) => tests.forEach(t => testCategories.set(t, name))); + } + const libFiles = (await fs.readdir(libFolder)).map(n => normalizePath(path.join("/.lib", n))); const testsPerShared = shardCount && Math.round(allTests.length / shardCount); @@ -82,6 +87,10 @@ async function main() { if(excludedTsTests.has(testFileNoExtension)) { continue; } + const testName = removeExtension(path.basename(testFile), path.extname(testFile)); + if(parsedArgs.category && testCategories.get(testName) !== parsedArgs.category) { + continue; + } const data = await loadTestCase(testFile); const variedConfiguration = getFileBasedTestConfigurations(data.settings) ?? [{}]; for(const varConfig of variedConfiguration) { @@ -89,14 +98,14 @@ async function main() { if (testVersionFilter && varConfigDescription !== testVersionFilter) continue; const file = (prefix ?? pad(count, 5)) + "-" + changeExtension(path.basename(testFile), varConfigDescription + ".d.ts"); - if (runType.tsc) runAndWrite(path.join("./tsc-tests/$now/tsc", file), varConfig, runTypeScript); + if (runType.tsc) runAndWrite(testName, path.join("./tsc-tests/$now/tsc", file), varConfig, runTypeScript); - if (runType.isolated) runAndWrite(path.join("./tsc-tests/$now/isolated", file), varConfig, (t, s) => runIsolated(t, libFiles, s)); + if (runType.isolated) runAndWrite(testName, path.join("./tsc-tests/$now/isolated", file), varConfig, (t, s) => runIsolated(t, libFiles, s)); } console.log(` Ran: ${pad(count, 5)}/${allTests.length}`); - function runAndWrite(file: string, varySettings: CompilerSettings, fn: (data: TestCaseContent, opts: ts.CompilerOptions) => TestCompilationResult) { + function runAndWrite(testName: string, file: string, varySettings: CompilerSettings, fn: (data: TestCaseContent, opts: ts.CompilerOptions) => TestCompilationResult) { const settings: ts.CompilerOptions = {}; setCompilerOptionsFromHarnessSetting(data.settings, settings); setCompilerOptionsFromHarnessSetting(varySettings, settings); @@ -126,18 +135,16 @@ async function main() { "critical-errors", path.basename(file) ); - } else if(results.diagnostics.some(d =>isolatedDeclarationErrors.has(d.code))) { - file = path.join( - path.dirname(file), - "with-isolated-declaration-errors", - path.basename(file) - ); - } else if(results.diagnostics.some(d =>unreliableEmitErrors.has(d.code))) { - file = path.join( - path.dirname(file), - "with-unreliable-errors", - path.basename(file) - ); + } else { + + const category = firstDefined(results.diagnostics, d => errorCategories.get(d.code)) ?? testCategories.get(testName); + if(category) { + file = path.join( + path.dirname(file), + category, + path.basename(file) + ); + } } if (allTests.length > 5) { writeResults(file.replace("/$now/", historical), resultText); diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 8d2f532438654..b72dd63fab9f1 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -759,7 +759,7 @@ export function transformDeclarations(context: TransformationContext) { const newParam = factory.updateParameterDeclaration( p, maskModifiers(factory, p, modifierMask), - p.dotDotDotToken, + p.dotDotDotToken, filterBindingPatternInitializersAndRenamings(p.name), resolver.isOptionalParameter(p) ? (p.questionToken || factory.createToken(SyntaxKind.QuestionToken)) : undefined, ensureType(p, type || p.type, /*ignorePrivate*/ true), // Ignore private param props, since this type is going straight back into a param @@ -791,11 +791,9 @@ export function transformDeclarations(context: TransformationContext) { // Literal const declarations will have an initializer ensured rather than a type return; } - if (isolatedDeclarations) { - if (type === undefined && localInferenceResolver) { - return localInferenceResolver.fromInitializer(node, currentSourceFile); - } - return visitNode(type, visitDeclarationSubtree, isTypeNode); + if (isolatedDeclarations && localInferenceResolver) { + return localInferenceResolver.fromInitializer(node, type, currentSourceFile); + } const shouldUseResolverType = node.kind === SyntaxKind.Parameter && (resolver.isRequiredInitializedParameter(node) || @@ -1430,7 +1428,7 @@ export function transformDeclarations(context: TransformationContext) { }); errorFallbackNode = input; const type = isolatedDeclarations ? - localInferenceResolver?.fromInitializer(input, currentSourceFile) : + localInferenceResolver?.fromInitializer(input, undefined, currentSourceFile) : resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker); const varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, type, /*initializer*/ undefined); errorFallbackNode = undefined; diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index f2e95435ae05c..93e3df7534a38 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -1,6 +1,6 @@ import { Debug } from "../../debug"; import { Diagnostics } from "../../diagnosticInformationMap.generated"; -import { isComputedPropertyName, isConstructSignatureDeclaration, isExportAssignment, isGetAccessorDeclaration, isIdentifier, isLiteralTypeNode, isMethodDeclaration, isMethodSignature, isNoSubstitutionTemplateLiteral, isNumericLiteral, isOmittedExpression, isParameter, isPropertyAccessExpression, isPropertyAssignment, isPropertyDeclaration, isSetAccessorDeclaration, isShorthandPropertyAssignment, isSpreadAssignment, isSpreadElement, isStringLiteral, isTypeParameterDeclaration, isTypeReferenceNode, isVariableDeclaration } from "../../factory/nodeTests"; +import { isCallSignatureDeclaration, isComputedPropertyName, isConstructSignatureDeclaration, isExportAssignment, isGetAccessorDeclaration, isIdentifier, isLiteralTypeNode, isMethodDeclaration, isMethodSignature, isNoSubstitutionTemplateLiteral, isNumericLiteral, isOmittedExpression, isParameter, isPrivateIdentifier, isPropertyAccessExpression, isPropertyAssignment, isPropertyDeclaration, isPropertySignature, isSetAccessorDeclaration, isShorthandPropertyAssignment, isSpreadAssignment, isSpreadElement, isStringLiteral, isTypeParameterDeclaration, isTypeReferenceNode, isUnionTypeNode, isVariableDeclaration } from "../../factory/nodeTests"; import { setTextRange } from "../../factory/utilitiesPublic"; import { forEachChildRecursively } from "../../parser"; import { nullTransformationContext } from "../../transformer"; @@ -24,7 +24,7 @@ enum LocalTypeInfoFlags { interface LocalInferenceResolver { makeInvalidType(): Node; - fromInitializer(node: HasInferredType | ExportAssignment, sourceFile: SourceFile): TypeNode; + fromInitializer(node: HasInferredType | ExportAssignment, type: TypeNode | undefined, sourceFile: SourceFile): TypeNode; } export function createLocalInferenceResolver({ setEnclosingDeclarations, @@ -41,6 +41,7 @@ export function createLocalInferenceResolver({ }): LocalInferenceResolver | undefined { let currentSourceFile: SourceFile | undefined; const options = context.getCompilerOptions(); + const resolver = context.getEmitResolver(); if (!options.isolatedDeclarations) { return undefined; } @@ -48,14 +49,17 @@ export function createLocalInferenceResolver({ const strictNullChecks = !!options.strict || !!options.strictNullChecks; return { - fromInitializer(node: HasInferredType, sourceFile: SourceFile) { + fromInitializer(node: HasInferredType, type: TypeNode | undefined, sourceFile: SourceFile) { const oldSourceFile = currentSourceFile; currentSourceFile = sourceFile; try { - const localType = localInferenceFromInitializer(node); + const localType = localInferenceFromInitializer(node, type); if (localType !== undefined) { return localType; } + if(type) { + return visitNode(type, visitDeclarationSubtree, isTypeNode)!; + } return makeInvalidType(); } finally { @@ -263,6 +267,7 @@ export function createLocalInferenceResolver({ case SyntaxKind.ObjectLiteralExpression: { const objectLiteral = node as ObjectLiteralExpression; const properties: TypeElement[] = []; + let inheritedObjectTypeFlags = LocalTypeInfoFlags.None; for (let propIndex = 0, length = objectLiteral.properties.length; propIndex < length; propIndex++) { const prop = objectLiteral.properties[propIndex]; @@ -274,12 +279,19 @@ export function createLocalInferenceResolver({ return invalid(prop); } - if (prop.name && isComputedPropertyName(prop.name) && isEntityNameExpression(prop.name.expression)) { + if(isPrivateIdentifier(prop.name)) { + // Not valid in object literals but the compiler will complain about this, we just ignore it here. + continue; + } + if (isComputedPropertyName(prop.name)) { + if(!isEntityNameExpression(prop.name.expression)) { + reportIsolatedDeclarationError(node); + continue; + } checkEntityNameVisibility(prop.name.expression, prop); } const name = deepClone(visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!); - let inheritedObjectTypeFlags = LocalTypeInfoFlags.None; let newProp; if (isMethodDeclaration(prop)) { const oldEnclosingDeclaration = setEnclosingDeclarations(prop); @@ -361,7 +373,7 @@ export function createLocalInferenceResolver({ } const typeNode: TypeNode = factory.createTypeLiteralNode(properties); - return regular(typeNode, objectLiteral); + return regular(typeNode, objectLiteral, inheritedObjectTypeFlags); } } @@ -480,13 +492,44 @@ export function createLocalInferenceResolver({ } } - function localInferenceFromInitializer(node: HasInferredType | ExportAssignment): TypeNode | undefined { - let localType; - if (isExportAssignment(node) && node.expression) { - localType = localInference(node.expression, NarrowBehavior.KeepLiterals); + 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) + ]) } - else if (isParameter(node) && node.initializer) { - localType = localInference(node.initializer); + return factory.createUnionTypeNode([ + type, + factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword) + ]) + } + function localInferenceFromInitializer(node: HasInferredType | ExportAssignment, type: TypeNode | undefined): TypeNode | undefined { + let localType: LocalTypeInfo | undefined; + if (isParameter(node) && node.initializer) { + if(type) { + localType = { + typeNode: visitNode(type, visitDeclarationSubtree, isTypeNode)!, + sourceNode: node, + flags: LocalTypeInfoFlags.None + } + } + else { + localType = localInference(node.initializer); + } + + if(localType && strictNullChecks && !resolver.isOptionalParameter(node)) { + localType.typeNode = addUndefinedInUnion(localType.typeNode); + } + } + else if(type) { + return visitNode(type, visitDeclarationSubtree, isTypeNode); + } + else if (isExportAssignment(node) && node.expression) { + localType = localInference(node.expression, NarrowBehavior.KeepLiterals); } else if (isVariableDeclaration(node) && node.initializer) { localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals : NarrowBehavior.None); @@ -494,7 +537,10 @@ export function createLocalInferenceResolver({ else if (isPropertyDeclaration(node) && node.initializer) { localType = localInference(node.initializer); } - else if(isMethodSignature(node) || isConstructSignatureDeclaration(node)) { + else if(isMethodSignature(node) + || isConstructSignatureDeclaration(node) + || isCallSignatureDeclaration(node) + || isPropertySignature(node)) { return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); } else { From 77819686db124bb9662de78c9b1ed5b8fba8532d Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 25 Aug 2023 11:06:37 +0100 Subject: [PATCH 056/224] Fixed rest parameters and removed setting parent node for synthetic type nodes (left over from when the binder needed it) Signed-off-by: Titian Cernicova-Dragomir --- external-declarations/fixed-tests.json | 10 +++- .../src/compiler/emit-resolver.ts | 10 ++-- .../src/test-runner/cli-arg-config.ts | 11 +++- .../src/test-runner/test-runner-main.ts | 5 +- .../src/test-runner/utils.ts | 3 +- .../declarations/localInferenceResolver.ts | 60 +++++++++---------- 6 files changed, 55 insertions(+), 44 deletions(-) diff --git a/external-declarations/fixed-tests.json b/external-declarations/fixed-tests.json index 8313192b74791..f3bc88a4b66f5 100644 --- a/external-declarations/fixed-tests.json +++ b/external-declarations/fixed-tests.json @@ -22,6 +22,7 @@ "parserX_ArrowFunction1", // Missing type annotation syntax error "typeParameterDirectlyConstrainedToItself", // Circular type constraints makes emit unreliable "typeParameterIndirectlyConstrainedToItself", // Circular type constraints makes emit unreliable + "callSignaturesWithAccessibilityModifiersOnParameters", // Accessibility modifiers on function parameters ], "possible-ts-bugs": [ // Type parameter renamed @@ -50,6 +51,7 @@ "paramterDestrcuturingDeclaration", "renamingDestructuredPropertyInFunctionType", "restParameterWithBindingPattern3", + "destructuringInFunctionType", ], // Need error to turn to isolated declaration error "expando-function":[ @@ -127,8 +129,12 @@ "nodeModulesTripleSlashReferenceModeDeclarationEmit6", "keyofAndIndexedAccess", "subtypingWithCallSignatures2", - // Default type parameter is inlined - "conditionalTypesSimplifyWhenTrivial" + "conditionalTypesSimplifyWhenTrivial", // Default type parameter is inlined + "emitArrowFunctionES6", + "stringLiteralTypesInImplementationSignatures", + "stringLiteralTypesInImplementationSignatures2", + "typeOfOnTypeArg", + "stringLiteralObjectLiteralDeclaration1" ], // Investigate "computed-properties": [ diff --git a/external-declarations/src/compiler/emit-resolver.ts b/external-declarations/src/compiler/emit-resolver.ts index 671b563e0702e..60e846601d147 100644 --- a/external-declarations/src/compiler/emit-resolver.ts +++ b/external-declarations/src/compiler/emit-resolver.ts @@ -51,6 +51,11 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p return isIdentifier(expr); } + // Do a best effort to find expando functions + function isExpandoFunctionDeclaration(){ + return false; + } + return { isDeclarationVisible, isLiteralConstDeclaration, @@ -203,10 +208,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p getTypeReferenceDirectivesForEntityName(name) { return undefined; }, - isExpandoFunctionDeclaration(){ - // Always return false, we don' support expando functions in isolatedDeclarations - return false; - }, + isExpandoFunctionDeclaration, getSymbolOfExternalModuleSpecifier() { return undefined; }, diff --git a/external-declarations/src/test-runner/cli-arg-config.ts b/external-declarations/src/test-runner/cli-arg-config.ts index 62d5be3f3d8e8..a04f399f2eada 100644 --- a/external-declarations/src/test-runner/cli-arg-config.ts +++ b/external-declarations/src/test-runner/cli-arg-config.ts @@ -1,4 +1,4 @@ -import { ArgType,parserConfiguration } from "../utils/cli-parser"; +import { ArgType,parserConfiguration, parseArgs } from "../utils/cli-parser"; export const testRunnerCLIConfiguration = parserConfiguration({ default: { @@ -16,4 +16,13 @@ export const testRunnerCLIConfiguration = parserConfiguration({ rootPaths: ArgType.StringArray(), configFile: ArgType.String(), category: ArgType.String(), + forceIsolatedDeclarations: ArgType.Boolean(), }); + + + +const { value, printUsageOnErrors } = parseArgs(process.argv.slice(2), testRunnerCLIConfiguration); + +printUsageOnErrors(); + +export const parsedCliArgs = value; diff --git a/external-declarations/src/test-runner/test-runner-main.ts b/external-declarations/src/test-runner/test-runner-main.ts index 7ec7da28a1d86..8c887c4e8a4c1 100644 --- a/external-declarations/src/test-runner/test-runner-main.ts +++ b/external-declarations/src/test-runner/test-runner-main.ts @@ -6,9 +6,8 @@ import * as ts from "typescript"; import * as JSON from 'json5'; import { normalizePath, removeExtension } from "../compiler/path-utils"; -import { parseArgs } from "../utils/cli-parser"; import { addToQueue, ensureDir, flushQueue, readAllFiles } from "../utils/fs-utils"; -import { testRunnerCLIConfiguration } from "./cli-arg-config"; +import { parsedCliArgs as parsedArgs } from "./cli-arg-config"; import { excludedTsTests } from "./excluded-ts-tests"; import { setCompilerOptionsFromHarnessSetting } from "./tsc-infrastructure/compiler-run"; import { IO } from "./tsc-infrastructure/io"; @@ -21,9 +20,7 @@ import { firstDefined } from "../compiler/lang-utils"; const excludeFilter =/\/fourslash\//; -const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), testRunnerCLIConfiguration); -printUsageOnErrors(); const shard = parsedArgs.shard; const shardCount = parsedArgs.shardCount; diff --git a/external-declarations/src/test-runner/utils.ts b/external-declarations/src/test-runner/utils.ts index 5c69041ce17cf..27d2fa13a3973 100644 --- a/external-declarations/src/test-runner/utils.ts +++ b/external-declarations/src/test-runner/utils.ts @@ -10,6 +10,7 @@ import { libs } from "./tsc-infrastructure/options"; import * as TestCaseParser from "./tsc-infrastructure/test-file-parser"; import { changeExtension } from "./tsc-infrastructure/vpath"; import * as vpath from "./tsc-infrastructure/vpath"; +import { parsedCliArgs } from "./cli-arg-config"; export interface TestCompilationResult { files: readonly FileContent[]; @@ -30,7 +31,7 @@ export async function loadTestCase(fileName: string) { BOM: rawText.substring(0, Utils.getByteOrderMarkLength(rawText)) }); } -const forceIsolatedDeclarations = process.argv.some(v => v === "--force-isolated-declarations"); +const forceIsolatedDeclarations = parsedCliArgs.forceIsolatedDeclarations; export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings: ts.CompilerOptions): TestCompilationResult { function createHarnessTestFile(lastUnit: TestCaseParser.TestUnitData): TestFile { return { unitName: lastUnit.name, content: lastUnit.content, fileOptions: lastUnit.fileOptions }; diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 93e3df7534a38..a6eef89972054 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -2,11 +2,10 @@ import { Debug } from "../../debug"; import { Diagnostics } from "../../diagnosticInformationMap.generated"; import { isCallSignatureDeclaration, isComputedPropertyName, isConstructSignatureDeclaration, isExportAssignment, isGetAccessorDeclaration, isIdentifier, isLiteralTypeNode, isMethodDeclaration, isMethodSignature, isNoSubstitutionTemplateLiteral, isNumericLiteral, isOmittedExpression, isParameter, isPrivateIdentifier, isPropertyAccessExpression, isPropertyAssignment, isPropertyDeclaration, isPropertySignature, isSetAccessorDeclaration, isShorthandPropertyAssignment, isSpreadAssignment, isSpreadElement, isStringLiteral, isTypeParameterDeclaration, isTypeReferenceNode, isUnionTypeNode, isVariableDeclaration } from "../../factory/nodeTests"; import { setTextRange } from "../../factory/utilitiesPublic"; -import { forEachChildRecursively } from "../../parser"; import { nullTransformationContext } from "../../transformer"; import { ArrayLiteralExpression, ArrowFunction, AsExpression, EntityNameOrEntityNameExpression, ExportAssignment, FunctionExpression, GetAccessorDeclaration, HasInferredType, Identifier, KeywordTypeSyntaxKind, LiteralExpression, MethodSignature, Modifier, Node, NodeArray, NodeFlags, ObjectLiteralElementLike, ObjectLiteralExpression, ParameterDeclaration, ParenthesizedExpression, PrefixUnaryExpression, PropertySignature, SetAccessorDeclaration, SourceFile, SyntaxKind, TransformationContext,TypeAssertion, TypeElement, TypeNode, Visitor, VisitResult } from "../../types"; -import { createDiagnosticForNode,isEntityNameExpression, setParent } from "../../utilities"; -import { isConstTypeReference, isPropertyName, isTypeNode } from "../../utilitiesPublic"; +import { createDiagnosticForNode,isEntityNameExpression } from "../../utilities"; +import { isConstTypeReference, isPropertyName, isRestParameter, isTypeNode } from "../../utilitiesPublic"; import { visitEachChild,visitNode, visitNodes } from "../../visitorPublic"; enum NarrowBehavior { @@ -82,22 +81,6 @@ export function createLocalInferenceResolver({ interface LocalTypeInfo { typeNode: TypeNode, sourceNode: Node, flags: LocalTypeInfoFlags } - function finalizeSyntheticTypeNode(typeNode: T, parent: Node): T { - if (typeNode && typeNode.parent !== parent) { - setParent(typeNode, parent); - // Ensure no non synthetic nodes make it in here - Debug.assert(typeNode.flags & NodeFlags.Synthesized); - forEachChildRecursively(typeNode, (child, parent) => { - Debug.assert(typeNode.flags & NodeFlags.Synthesized); - if (child.parent === parent) { - return "skip"; - } - setParent(child, parent); - }); - } - return typeNode as T & { isSynthetic: true }; - } - function mergeFlags(existing: LocalTypeInfoFlags, newFlags: LocalTypeInfoFlags): LocalTypeInfoFlags { return existing | newFlags; } @@ -383,7 +366,7 @@ export function createLocalInferenceResolver({ return { typeNode: makeInvalidTypeAndReport(sourceNode), flags: LocalTypeInfoFlags.Invalid, sourceNode }; } function regular(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { - return { typeNode: finalizeSyntheticTypeNode(typeNode, sourceNode.parent), flags, sourceNode }; + return { typeNode, flags, sourceNode }; } function normalizeLiteralValue(literal: LiteralExpression) { switch (literal.kind) { @@ -509,21 +492,37 @@ export function createLocalInferenceResolver({ } function localInferenceFromInitializer(node: HasInferredType | ExportAssignment, type: TypeNode | undefined): TypeNode | undefined { let localType: LocalTypeInfo | undefined; - if (isParameter(node) && node.initializer) { + if (isParameter(node)) { if(type) { - localType = { - typeNode: visitNode(type, visitDeclarationSubtree, isTypeNode)!, - sourceNode: node, - flags: LocalTypeInfoFlags.None - } + localType = regular( + visitNode(type, visitDeclarationSubtree, isTypeNode)!, + node, + ) } - else { + else if(node.initializer) { localType = localInference(node.initializer); } - if(localType && strictNullChecks && !resolver.isOptionalParameter(node)) { + if(node.initializer && localType && strictNullChecks && !resolver.isOptionalParameter(node)) { localType.typeNode = addUndefinedInUnion(localType.typeNode); } + + if(!localType) { + if(isRestParameter(node)) { + localType = regular( + factory.createArrayTypeNode( + factory.createKeywordTypeNode(SyntaxKind.AnyKeyword) + ), + node, + ) + } + else { + localType = regular( + factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), + node, + ) + } + } } else if(type) { return visitNode(type, visitDeclarationSubtree, isTypeNode); @@ -549,9 +548,6 @@ export function createLocalInferenceResolver({ if(!localType || localType.flags & LocalTypeInfoFlags.Invalid) { return undefined; } - - const typeNode = localType.typeNode; - setParent(typeNode, node); - return typeNode; + return localType.typeNode; } } From cb280cc2728e635f8b213796c3a5334c0d9524da Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 25 Aug 2023 12:24:03 +0100 Subject: [PATCH 057/224] Added errors for expando function expressions. Signed-off-by: Titian Cernicova-Dragomir --- .../src/compiler/emit-resolver.ts | 10 +++++++--- external-declarations/src/compiler/types.ts | 2 +- src/compiler/checker.ts | 17 +++++++++++------ src/compiler/emitter.ts | 2 +- src/compiler/transformers/declarations.ts | 5 ++--- .../declarations/localInferenceResolver.ts | 6 +++++- src/compiler/types.ts | 2 +- 7 files changed, 28 insertions(+), 16 deletions(-) diff --git a/external-declarations/src/compiler/emit-resolver.ts b/external-declarations/src/compiler/emit-resolver.ts index 60e846601d147..7fcb6770e1ca3 100644 --- a/external-declarations/src/compiler/emit-resolver.ts +++ b/external-declarations/src/compiler/emit-resolver.ts @@ -1,4 +1,4 @@ -import { __String, BindingPattern, CompilerOptions, Declaration, DeclarationName, ElementAccessExpression, EntityNameOrEntityNameExpression, EnumDeclaration, EnumMember, factory, findAncestor, FunctionLikeDeclaration, getCombinedModifierFlags, getCombinedNodeFlags, getNameOfDeclaration, ImportClause, ImportEqualsDeclaration, ImportSpecifier, isBigIntLiteral, isBindingElement, isElementAccessExpression, isEnumMember, isFunctionLike, isGetAccessor, isIdentifier, isLiteralExpression, isNumericLiteral, isParameterPropertyDeclaration, isPrefixUnaryExpression, isPropertyAccessExpression, isSetAccessor, isSourceFile, isStringLiteralLike, isVariableDeclaration, isVariableStatement, LiteralExpression, ModifierFlags, NamespaceImport, Node, NodeFlags, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertySignature, ResolutionMode,SourceFile, SymbolFlags, SyntaxKind, VariableDeclaration, VariableDeclarationList } from "typescript"; +import { __String, BindingPattern, CompilerOptions, Declaration, DeclarationName, ElementAccessExpression, EntityNameOrEntityNameExpression, EnumDeclaration, EnumMember, Expression, factory, findAncestor, FunctionLikeDeclaration, getCombinedModifierFlags, getCombinedNodeFlags, getNameOfDeclaration, ImportClause, ImportEqualsDeclaration, ImportSpecifier, isArrowFunction, isBigIntLiteral, isBindingElement, isElementAccessExpression, isEnumMember, isFunctionExpression, isFunctionLike, isGetAccessor, isIdentifier, isLiteralExpression, isNumericLiteral, isParameterPropertyDeclaration, isPrefixUnaryExpression, isPropertyAccessExpression, isSetAccessor, isSourceFile, isStringLiteralLike, isVariableDeclaration, isVariableStatement, LiteralExpression, ModifierFlags, NamespaceImport, Node, NodeFlags, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertySignature, ResolutionMode,SourceFile, SymbolFlags, SyntaxKind, VariableDeclaration, VariableDeclarationList } from "typescript"; import { Debug } from "./debug"; import { BasicSymbol, bindSourceFile, NodeLinks } from "./emit-binder"; @@ -52,7 +52,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p } // Do a best effort to find expando functions - function isExpandoFunctionDeclaration(){ + function isExpandoFunction(node: Declaration){ return false; } @@ -208,7 +208,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p getTypeReferenceDirectivesForEntityName(name) { return undefined; }, - isExpandoFunctionDeclaration, + isExpandoFunction, getSymbolOfExternalModuleSpecifier() { return undefined; }, @@ -491,3 +491,7 @@ function getAnyImportSyntax(node: Node): AnyImportSyntax | undefined { return undefined; } } +function isFunctionExpressionOrArrowFunction(node: Expression) { + return isFunctionExpression(node) || isArrowFunction(node); +} + diff --git a/external-declarations/src/compiler/types.ts b/external-declarations/src/compiler/types.ts index 89823d787821b..b485af273ac50 100644 --- a/external-declarations/src/compiler/types.ts +++ b/external-declarations/src/compiler/types.ts @@ -30,7 +30,7 @@ export interface IsolatedEmitResolver { isDeclarationVisible(node: Declaration | AnyImportSyntax): boolean; isLateBound(node: Declaration): node is LateBoundDeclaration; isImplementationOfOverload(node: SignatureDeclaration): boolean | undefined; - isExpandoFunctionDeclaration(node: FunctionDeclaration): boolean; + isExpandoFunction(node: VariableDeclaration | FunctionDeclaration): boolean; getPropertiesOfContainerFunction(node: Declaration): Symbol[]; createLiteralConstValue(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration, tracker: SymbolTracker): Expression; isEntityNameVisible(entityName: EntityNameOrEntityNameExpression, enclosingDeclaration: Node): SymbolVisibilityResult; diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 91f6f766b2b68..12c96738eb5a4 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -46319,16 +46319,21 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { hasSyntacticModifier(parameter, ModifierFlags.ParameterPropertyModifier); } - function isExpandoFunctionDeclaration(node: Declaration): boolean { - const declaration = getParseTreeNode(node, isFunctionDeclaration); - if (!declaration) { + function isExpandoFunction(node: Declaration): boolean { + const declaration = getParseTreeNode(node, (n): n is FunctionDeclaration | VariableDeclaration => isFunctionDeclaration(n) || isVariableDeclaration(n)); + if (!declaration || (isVariableDeclaration(declaration) && !(declaration.initializer && isFunctionExpressionOrArrowFunction(declaration.initializer)))) { return false; } const symbol = getSymbolOfDeclaration(declaration); - if (!symbol || !(symbol.flags & SymbolFlags.Function)) { + if (!symbol || !(symbol.flags & SymbolFlags.Function | SymbolFlags.Variable)) { return false; } - return !!forEachEntry(getExportsOfSymbol(symbol), p => p.flags & SymbolFlags.Value && p.valueDeclaration && isPropertyAccessExpression(p.valueDeclaration)); + + // Temporary, remove when https://github.com/microsoft/TypeScript/pull/5518 is merged. + function isExpandoPropertyDeclaration(declaration: Declaration | undefined): declaration is PropertyAccessExpression | ElementAccessExpression | BinaryExpression { + return !!declaration && (isPropertyAccessExpression(declaration) || isElementAccessExpression(declaration) || isBinaryExpression(declaration)); + } + return !!forEachEntry(getExportsOfSymbol(symbol), p => p.flags & SymbolFlags.Value && p.valueDeclaration && isExpandoPropertyDeclaration(p.valueDeclaration)); } function getPropertiesOfContainerFunction(node: Declaration): Symbol[] { @@ -46688,7 +46693,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { isImplementationOfOverload, isRequiredInitializedParameter, isOptionalUninitializedParameterProperty, - isExpandoFunctionDeclaration, + isExpandoFunction, getPropertiesOfContainerFunction, createTypeOfDeclaration, createReturnTypeOfSignatureDeclaration, diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index da4f3f56fa5e7..06ffdde29f87d 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1144,7 +1144,7 @@ export const notImplementedResolver: EmitResolver = { isImplementationOfOverload: notImplemented, isRequiredInitializedParameter: notImplemented, isOptionalUninitializedParameterProperty: notImplemented, - isExpandoFunctionDeclaration: notImplemented, + isExpandoFunction: notImplemented, getPropertiesOfContainerFunction: notImplemented, createTypeOfDeclaration: notImplemented, createReturnTypeOfSignatureDeclaration: notImplemented, diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index b72dd63fab9f1..cb5e889452736 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -1524,9 +1524,8 @@ export function transformDeclarations(context: TransformationContext) { ensureType(input, input.type), /*body*/ undefined )); - const isExpandoFunctionDeclaration = clean && resolver.isExpandoFunctionDeclaration(input); - if (isExpandoFunctionDeclaration && shouldEmitFunctionProperties(input)) { - if(isExpandoFunctionDeclaration && isolatedDeclarations) { + if (clean && resolver.isExpandoFunction(input) && shouldEmitFunctionProperties(input)) { + if(isolatedDeclarations) { reportIsolatedDeclarationError(input); return clean; } diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index a6eef89972054..68515c4f2e3bd 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -531,7 +531,11 @@ export function createLocalInferenceResolver({ localType = localInference(node.expression, NarrowBehavior.KeepLiterals); } else if (isVariableDeclaration(node) && node.initializer) { - localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals : NarrowBehavior.None); + if(isVariableDeclaration(node) && resolver.isExpandoFunction(node)) { + localType = invalid(node); + } else { + localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals : NarrowBehavior.None); + } } else if (isPropertyDeclaration(node) && node.initializer) { localType = localInference(node.initializer); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 970e8da73145f..470e353e11fc6 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -5697,7 +5697,7 @@ export interface EmitResolver { isImplementationOfOverload(node: SignatureDeclaration): boolean | undefined; isRequiredInitializedParameter(node: ParameterDeclaration): boolean; isOptionalUninitializedParameterProperty(node: ParameterDeclaration): boolean; - isExpandoFunctionDeclaration(node: FunctionDeclaration): boolean; + isExpandoFunction(node: FunctionDeclaration | VariableDeclaration): 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; From 3d9503d4f7f8d0578b0dd3c421abde937f1a1622 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 29 Aug 2023 14:27:53 +0100 Subject: [PATCH 058/224] Add errors in DTE for expando. Ensure we only support literal computed names. Signed-off-by: Titian Cernicova-Dragomir --- external-declarations/fixed-tests.json | 258 +++++++----------- .../src/compiler/emit-resolver.ts | 138 ++++++++-- external-declarations/src/compiler/types.ts | 1 + external-declarations/src/compiler/utils.ts | 44 ++- .../src/test-runner/parallel-run.ts | 2 +- src/compiler/checker.ts | 31 ++- src/compiler/emitter.ts | 1 + .../declarations/localInferenceResolver.ts | 15 +- src/compiler/types.ts | 1 + 9 files changed, 310 insertions(+), 181 deletions(-) diff --git a/external-declarations/fixed-tests.json b/external-declarations/fixed-tests.json index f3bc88a4b66f5..e237863aac068 100644 --- a/external-declarations/fixed-tests.json +++ b/external-declarations/fixed-tests.json @@ -23,6 +23,89 @@ "typeParameterDirectlyConstrainedToItself", // Circular type constraints makes emit unreliable "typeParameterIndirectlyConstrainedToItself", // Circular type constraints makes emit unreliable "callSignaturesWithAccessibilityModifiersOnParameters", // Accessibility modifiers on function parameters + // Duplicate properties and variables + "duplicateObjectLiteralProperty", + "duplicatePropertiesInStrictMode", + "duplicateVariablesWithAny", + "duplicateVarsAcrossFileBoundaries", + "gettersAndSettersErrors", + "jsFileCompilationDuplicateVariableErrorReported", + "memberOverride", + "noRepeatedPropertyNames", + "varBlock", + "duplicatePropertiesInTypeAssertions01", + "duplicatePropertiesInTypeAssertions02", + "parserCastVersusArrowFunction1", + "invalidMultipleVariableDeclarations", + "validMultipleVariableDeclarations", + "augmentedTypesVar", + "twoAccessorsWithSameName", + "stringNamedPropertyDuplicates", + "numericStringNamedPropertyEquivalence", + "numericNamedPropertyDuplicates", + "objectTypeWithDuplicateNumericProperty", + "objectLiteralErrors", + "octalIntegerLiteralError", + "binaryIntegerLiteralError", + "symbolProperty36", + "duplicateObjectLiteralProperty_computedName2", + "duplicateIdentifierDifferentSpelling", + "castingTuple" // contains both duplicate variables and print differences. + ], + "with-isolated-declaration-errors": [ + "typeFromPropertyAssignment38", // Nested expando functions. Can in principle be detected, but are not yet implemented + "contextualReturnTypeOfIIFE2", // Nested expando functions. Can in principle be detected, but are not yet implemented + // Computed property errors a DTE can't detect + "complicatedPrivacy", + "declarationEmitMappedTypeTemplateTypeofSymbol", + "declarationEmitReadonlyComputedProperty", + "modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib", + "propertyAssignment", + "ES5SymbolProperty1", + "ES5SymbolProperty2", + "ES5SymbolProperty3", + "ES5SymbolProperty4", + "ES5SymbolProperty5", + "ES5SymbolProperty6", + "ES5SymbolProperty7", + "symbolProperty1", + "symbolProperty2", + "symbolProperty52", + "symbolProperty58", + "computedPropertyNames13_ES5", + "computedPropertyNames13_ES6", + "MemberFunctionDeclaration3_es6", + "superSymbolIndexedAccess1", + "superSymbolIndexedAccess3", + "superSymbolIndexedAccess4", + "superSymbolIndexedAccess5", + "superSymbolIndexedAccess6", + "parserES5ComputedPropertyName11", + "parserES5ComputedPropertyName2", + "parserES5ComputedPropertyName3", + "parserES5ComputedPropertyName4", + "parserES5ComputedPropertyName8", + "parserES5SymbolProperty3", + "parserES5SymbolProperty7", + "parserES5SymbolProperty8", + "parserES5SymbolProperty9", + "parserComputedPropertyName11", + "parserComputedPropertyName12", + "parserComputedPropertyName13", + "parserComputedPropertyName14", + "parserComputedPropertyName15", + "parserComputedPropertyName18", + "parserComputedPropertyName19", + "parserComputedPropertyName2", + "parserComputedPropertyName23", + "parserComputedPropertyName3", + "parserComputedPropertyName32", + "parserComputedPropertyName37", + "parserComputedPropertyName38", + "parserComputedPropertyName39", + "parserComputedPropertyName4", + "parserComputedPropertyName5", + "ES5For-ofTypeCheck10", ], "possible-ts-bugs": [ // Type parameter renamed @@ -53,37 +136,9 @@ "restParameterWithBindingPattern3", "destructuringInFunctionType", ], - // Need error to turn to isolated declaration error - "expando-function":[ - "contextualReturnTypeOfIIFE2", - "declarationEmitDefaultExportWithStaticAssignment", - "declarationEmitExpandoPropertyPrivateName", - "declarationEmitExpandoWithGenericConstraint", - "declarationEmitFunctionDuplicateNamespace", - "declarationEmitFunctionKeywordProp", - "declarationEmitLateBoundAssignments", - "expandoFunctionContextualTypesJSDocInTs", - "expandoFunctionContextualTypesNoValue", - "jsxComponentTypeErrors", - "lateBoundFunctionMemberAssignmentDeclarations", - "exportDefaultNamespace", - "nullPropertyName", - "newTargetNarrowing", - "propertyAssignmentUseParentType3", - "typeFromPropertyAssignment29", - "typeFromPropertyAssignment31", - "typeFromPropertyAssignment32", - "typeFromPropertyAssignment33", - "typeFromPropertyAssignment36", - "twoAccessorsWithSameName", - "propertyAssignmentUseParentType1", - "typeFromPropertyAssignment38", - ], // Just Printing differences "print-differences": [ "arrayFind", - "capturedParametersInInitializers1", - "coAndContraVariantInferences", "contextualTyping", "contextualTyping38", "contextualTyping39", @@ -103,7 +158,6 @@ "generatedContextualTyping", "objectLiteralGettersAndSetters", "optionalChainingInference", - "constAssertions", "noUncheckedIndexedAccess", "conditionalTypes1", "stringLiteralsWithTypeAssertions01", @@ -134,116 +188,28 @@ "stringLiteralTypesInImplementationSignatures", "stringLiteralTypesInImplementationSignatures2", "typeOfOnTypeArg", - "stringLiteralObjectLiteralDeclaration1" - ], - // Investigate - "computed-properties": [ - "symbolProperty1", - "symbolProperty2", - "quotedConstructors", - "complicatedPrivacy", - "declarationEmitComputedNameConstEnumAlias", - "duplicateIdentifierDifferentSpelling", - "duplicateObjectLiteralProperty_computedName1", - "duplicateObjectLiteralProperty_computedName2", - "escapedReservedCompilerNamedIdentifier", - "exportEqualsAmd", - "exportEqualsCommonJs", - "exportEqualsDefaultProperty", - "exportEqualsUmd", - "literalsInComputedProperties1", - "objectLiteralComputedNameNoDeclarationError", - "objectLiteralEnumPropertyNames", - "propertyAssignment", - "protoAsIndexInIndexExpression", - "stringLiteralPropertyNameWithLineContinuation1", - "ES5SymbolProperty1", - "ES5SymbolProperty2", - "ES5SymbolProperty3", - "ES5SymbolProperty4", - "ES5SymbolProperty5", - "ES5SymbolProperty6", - "ES5SymbolProperty7", - "symbolProperty36", - "symbolProperty52", - "symbolProperty58", - "binaryIntegerLiteralError", - "octalIntegerLiteralError", - "computedPropertyNames13_ES5", - "computedPropertyNames13_ES6", - "computedPropertyNames16_ES5", - "computedPropertyNames16_ES6", - "computedPropertyNames20_ES5", - "computedPropertyNames20_ES6", - "computedPropertyNames2_ES5", - "computedPropertyNames2_ES6", - "computedPropertyNames46_ES5", - "computedPropertyNames46_ES6", - "computedPropertyNames47_ES5", - "computedPropertyNames47_ES6", - "computedPropertyNames7_ES5", - "computedPropertyNames7_ES6", - "computedPropertyNamesWithStaticProperty", - "MemberFunctionDeclaration3_es6", - "objectLiteralErrors", - "superSymbolIndexedAccess1", - "superSymbolIndexedAccess3", - "superSymbolIndexedAccess4", - "superSymbolIndexedAccess5", - "superSymbolIndexedAccess6", - "parserES5ComputedPropertyName11", - "parserES5ComputedPropertyName2", - "parserES5ComputedPropertyName5", - "parserES5ComputedPropertyName8", - "parserIndexSignature11", - "parserIndexSignature5", - "parserES5SymbolProperty1", - "parserES5SymbolProperty2", - "parserES5SymbolProperty3", - "parserES5SymbolProperty7", - "parserES5SymbolProperty8", - "parserES5SymbolProperty9", - "parserComputedPropertyName11", - "parserComputedPropertyName12", - "parserComputedPropertyName13", - "parserComputedPropertyName14", - "parserComputedPropertyName15", - "parserComputedPropertyName18", - "parserComputedPropertyName19", - "parserComputedPropertyName2", - "parserComputedPropertyName20", - "parserComputedPropertyName21", - "parserComputedPropertyName23", - "parserComputedPropertyName24", - "parserComputedPropertyName32", - "parserComputedPropertyName35", - "parserComputedPropertyName37", - "parserComputedPropertyName38", - "parserComputedPropertyName39", - "parserComputedPropertyName6", - "ES5For-ofTypeCheck10", + "stringLiteralObjectLiteralDeclaration1", "indexSignatures1", - "objectTypeWithDuplicateNumericProperty", - "objectTypeWithStringNamedPropertyOfIllegalCharacters", - "numericNamedPropertyDuplicates", - "numericStringNamedPropertyEquivalence", - "stringNamedPropertyDuplicates", - "genericObjectRest", - "assignmentCompatWithObjectMembersNumericNames", - "parserES5ComputedPropertyName3", - "parserES5ComputedPropertyName4", "parserFunctionPropertyAssignment3", - "parserComputedPropertyName3", - "parserComputedPropertyName4", - "parserComputedPropertyName5", - "declarationEmitWithDefaultAsComputedName", - "declarationEmitWithDefaultAsComputedName2", - "declarationEmitMappedTypeTemplateTypeofSymbol", - "declarationEmitReadonlyComputedProperty", - "dynamicNames", - "genericFunctionsAndConditionalInference", + "computedPropertyNames7_ES6", + "computedPropertyNames7_ES5", + "quotedConstructors", + "stringLiteralPropertyNameWithLineContinuation1", + "protoAsIndexInIndexExpression", + "objectLiteralEnumPropertyNames", + "objectLiteralComputedNameNoDeclarationError", "identityAndDivergentNormalizedTypes", - "modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib" + "genericFunctionsAndConditionalInference", + "exportEqualsUmd", + "exportEqualsDefaultProperty", + "exportEqualsCommonJs", + "exportEqualsAmd", + "escapedReservedCompilerNamedIdentifier", + "dynamicNames", + "declarationEmitWithDefaultAsComputedName2", + "declarationEmitWithDefaultAsComputedName", + "declarationEmitComputedNameConstEnumAlias", + "capturedParametersInInitializers1", ], // Investigate in reference DTE "references-import-diffs": [ @@ -275,24 +241,6 @@ "bug-preserve-comments": [ "commentsOnObjectLiteral4" ], - // Unreliable errors - // Investigate for duplicate properties. Maybe we can remove the duplicates. - "duplicates": [ - "duplicateObjectLiteralProperty", - "duplicatePropertiesInStrictMode", - "duplicateVariablesWithAny", - "duplicateVarsAcrossFileBoundaries", - "gettersAndSettersErrors", - "jsFileCompilationDuplicateVariableErrorReported", - "memberOverride", - "noRepeatedPropertyNames", - "varBlock", - "duplicatePropertiesInTypeAssertions01", - "duplicatePropertiesInTypeAssertions02", - "parserCastVersusArrowFunction1", - "invalidMultipleVariableDeclarations", - "validMultipleVariableDeclarations", - "augmentedTypesVar", - ], } } + diff --git a/external-declarations/src/compiler/emit-resolver.ts b/external-declarations/src/compiler/emit-resolver.ts index 7fcb6770e1ca3..a47b248e63d34 100644 --- a/external-declarations/src/compiler/emit-resolver.ts +++ b/external-declarations/src/compiler/emit-resolver.ts @@ -1,10 +1,10 @@ -import { __String, BindingPattern, CompilerOptions, Declaration, DeclarationName, ElementAccessExpression, EntityNameOrEntityNameExpression, EnumDeclaration, EnumMember, Expression, factory, findAncestor, FunctionLikeDeclaration, getCombinedModifierFlags, getCombinedNodeFlags, getNameOfDeclaration, ImportClause, ImportEqualsDeclaration, ImportSpecifier, isArrowFunction, isBigIntLiteral, isBindingElement, isElementAccessExpression, isEnumMember, isFunctionExpression, isFunctionLike, isGetAccessor, isIdentifier, isLiteralExpression, isNumericLiteral, isParameterPropertyDeclaration, isPrefixUnaryExpression, isPropertyAccessExpression, isSetAccessor, isSourceFile, isStringLiteralLike, isVariableDeclaration, isVariableStatement, LiteralExpression, ModifierFlags, NamespaceImport, Node, NodeFlags, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertySignature, ResolutionMode,SourceFile, SymbolFlags, SyntaxKind, VariableDeclaration, VariableDeclarationList } from "typescript"; +import { __String, BindingPattern, CompilerOptions, ComputedPropertyName, Declaration, DeclarationName, ElementAccessExpression, EntityNameOrEntityNameExpression, EnumDeclaration, EnumMember, Expression, factory, findAncestor, FunctionDeclaration, FunctionLikeDeclaration, getCombinedModifierFlags, getCombinedNodeFlags, getNameOfDeclaration, getParseTreeNode, Identifier, ImportClause, ImportEqualsDeclaration, ImportSpecifier, isArrowFunction, isBigIntLiteral, isBinaryExpression, isBindingElement, isElementAccessExpression, isEnumMember, isExpressionStatement, isFunctionDeclaration, isFunctionExpression, isFunctionLike, isGetAccessor, isIdentifier, isLiteralExpression, isNumericLiteral, isParameterPropertyDeclaration, isPrefixUnaryExpression, isPropertyAccessExpression, isSetAccessor, isSourceFile, isStringLiteralLike, isVariableDeclaration, isVariableStatement, LiteralExpression, ModifierFlags, NamespaceImport, Node, NodeArray, NodeFlags, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertySignature, ResolutionMode,SourceFile, Statement, SymbolFlags, SyntaxKind, VariableDeclaration, VariableDeclarationList } from "typescript"; import { Debug } from "./debug"; import { BasicSymbol, bindSourceFile, NodeLinks } from "./emit-binder"; import { appendIfUnique, emptyArray, every, filter, hasProperty } from "./lang-utils"; import { IsolatedEmitResolver, LateBoundDeclaration, LateVisibilityPaintedStatement, SymbolAccessibility, SymbolVisibilityResult } from "./types"; -import { AnyImportSyntax, getFirstIdentifier, hasDynamicName, hasEffectiveModifier, hasSyntacticModifier, isAmbientDeclaration,isBindingPattern, isExternalModuleAugmentation, isInJSFile, isLateVisibilityPaintedStatement, isPartOfTypeNode, isThisIdentifier, nodeIsPresent, skipParentheses } from "./utils"; +import { AnyImportSyntax, getFirstIdentifier, getMemberKey, hasDynamicName, hasEffectiveModifier, hasSyntacticModifier, isAmbientDeclaration,isBindingPattern, isEntityNameExpression, isExternalModuleAugmentation, isInJSFile, isLateVisibilityPaintedStatement, isPartOfTypeNode, isThisIdentifier, nodeIsPresent, skipParentheses } from "./utils"; export function createEmitResolver(file: SourceFile, options: CompilerOptions, packageModuleType: ResolutionMode): IsolatedEmitResolver { @@ -12,26 +12,29 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p const { getNodeLinks, resolveName } = bindSourceFile(file, options, packageModuleType); + function isLiteralValue(node: Expression) { + if(isLiteralExpression(node)) return true; + + if(node.kind === SyntaxKind.TrueKeyword || node.kind === SyntaxKind.FalseKeyword) return true; + + if(isPrefixUnaryExpression(node)) { + const operand = node.operand; + if(node.operator === SyntaxKind.MinusToken) { + return isNumericLiteral(operand) || isBigIntLiteral(operand); + } + if(node.operator === SyntaxKind.PlusToken) { + return isNumericLiteral(operand); + } + } + return false; + } function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration | EnumMember): 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; - if(isLiteralExpression(initializer)) return true; - - if(initializer.kind === SyntaxKind.TrueKeyword || initializer.kind === SyntaxKind.FalseKeyword) return true; - - if(isPrefixUnaryExpression(initializer)) { - const operand = initializer.operand; - if(initializer.operator === SyntaxKind.MinusToken) { - return isNumericLiteral(operand) || isBigIntLiteral(operand); - } - if(initializer.operator === SyntaxKind.PlusToken) { - return isNumericLiteral(operand); - } - } - return false; + return isLiteralValue(initializer); // Original TS version // return isFreshLiteralType(getTypeOfSymbol(getSymbolOfNode(node))); } @@ -39,6 +42,20 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p } + 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(isLiteralValue(expression)) { + 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)) { @@ -50,15 +67,90 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p } return isIdentifier(expr); } + function getExpandoMembers(declaration: FunctionDeclaration | VariableDeclaration, functionName: Identifier) { + const scope = getParentScope(declaration); + if(!scope) return undefined; + const members = new Set(); + for (const statement of scope.statements) { + // Looking for name functionName.member = init; + if (!isExpressionStatement(statement)) continue; + if (!isBinaryExpression(statement.expression)) continue; + const assignment = statement.expression; + if(assignment.operatorToken.kind !== SyntaxKind.EqualsToken) continue; + + const isPropertyAccess = isPropertyAccessExpression(assignment.left); + if(isPropertyAccess || isElementAccessExpression(assignment.left) + && isIdentifier(assignment.left.expression) + && assignment.left.expression.escapedText === functionName.escapedText) { + + let name; + if(isPropertyAccess) { + name = assignment.left.name; + } + else { + const argumentExpression = assignment.left.argumentExpression;; + name = factory.createComputedPropertyName(argumentExpression); + } + const key = getMemberKey(name) + if(!key) { + continue; + } + members.add(key); + } + } + return members; + } + + function getDefinedMembers(declaration: FunctionDeclaration | VariableDeclaration, functionName: Identifier) { + const scope = getParentScope(declaration); + if(!scope) return undefined; + const namespace = resolveName(scope, functionName.escapedText, SymbolFlags.Namespace) + return namespace?.exports + } // Do a best effort to find expando functions - function isExpandoFunction(node: Declaration){ + 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) { + return false; + } + if(!(declaration.initializer && isFunctionExpressionOrArrowFunction(declaration.initializer))) { + return false; + } + + } + + const functionName = node.name; + if(!functionName || !isIdentifier(functionName)) return false; + + const expandoMembers = getExpandoMembers(declaration, functionName); + if(!expandoMembers || expandoMembers.size === 0) return false; + + if(isVariableDeclaration(declaration) && expandoMembers.size) { + return true + } + const definedMembers = getDefinedMembers(declaration, functionName); + // No namespace definitions, and it has assignments => is Expando function + if(!definedMembers) { + return true + } + + // Some assigned members are not in the defined the namespaces + // computed members are ignored, since they don't name it to declarations anyway + if([...expandoMembers.keys()].some(n => !n.startsWith("C:") && !definedMembers.has(n.substring(2) as __String))) { + return true; + } return false; } return { isDeclarationVisible, isLiteralConstDeclaration, + isLiteralComputedName, getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined { function getLiteralValue(value: LiteralExpression) { if(isStringLiteralLike(value)) { @@ -495,3 +587,15 @@ function isFunctionExpressionOrArrowFunction(node: Expression) { return isFunctionExpression(node) || isArrowFunction(node); } +function getParentScope(declaration: VariableDeclaration | FunctionDeclaration): undefined | Node & { + statements: NodeArray +} { + let scope: Node = declaration; + while(scope) { + if(hasProperty(scope, "statements")) { + return (scope as any); + } + scope = scope.parent; + } + return undefined; +} diff --git a/external-declarations/src/compiler/types.ts b/external-declarations/src/compiler/types.ts index b485af273ac50..a5f7d42eeb524 100644 --- a/external-declarations/src/compiler/types.ts +++ b/external-declarations/src/compiler/types.ts @@ -27,6 +27,7 @@ export interface IsolatedEmitHost extends ModuleSpecifierResolutionHost, Resolve } export interface IsolatedEmitResolver { + isLiteralComputedName(node: ComputedPropertyName): boolean; isDeclarationVisible(node: Declaration | AnyImportSyntax): boolean; isLateBound(node: Declaration): node is LateBoundDeclaration; isImplementationOfOverload(node: SignatureDeclaration): boolean | undefined; diff --git a/external-declarations/src/compiler/utils.ts b/external-declarations/src/compiler/utils.ts index e2a88e52a5678..0e082212fa671 100644 --- a/external-declarations/src/compiler/utils.ts +++ b/external-declarations/src/compiler/utils.ts @@ -1,4 +1,4 @@ -import { BindingPattern, CallExpression, canHaveModifiers, ClassDeclaration, ClassLikeDeclaration, CompilerOptions, Declaration, DeclarationName, EntityNameOrEntityNameExpression, EnumDeclaration, Expression, ExpressionWithTypeArguments, Extension, FunctionDeclaration, FunctionLikeDeclaration, getJSDocDeprecatedTag, getJSDocOverrideTagNoCache, getJSDocPrivateTag, getJSDocProtectedTag, getJSDocPublicTag, getJSDocReadonlyTag, getJSDocTypeTag, getNameOfDeclaration, HasType, Identifier, ImportDeclaration, ImportEqualsDeclaration, ImportTypeNode, InterfaceDeclaration, isElementAccessExpression, isExpressionWithTypeArguments, isHeritageClause, isIdentifier, isModuleDeclaration, isNumericLiteral, isParameter, isParenthesizedExpression, isPrefixUnaryExpression, isSourceFile, isStringLiteralLike, isVariableStatement,JSDocTemplateTag, JsxEmit, ModifierFlags, ModifierLike, ModuleDeclaration, ModuleKind, ModuleResolutionKind, NamedDeclaration, NewLineKind, Node, NodeFlags, NumericLiteral, OuterExpressionKinds, PrefixUnaryExpression, PrinterOptions, PropertyAccessExpression, QualifiedName, ScriptTarget, SignatureDeclaration, SourceFile, StringLiteralLike, SyntaxKind, sys, TsConfigSourceFile, TypeAliasDeclaration, TypeAssertion, TypeParameterDeclaration, VariableStatement } from "typescript"; +import { BindingPattern, CallExpression, canHaveModifiers, ClassDeclaration, ClassLikeDeclaration, CompilerOptions, Declaration, DeclarationName, EntityNameOrEntityNameExpression, EnumDeclaration, Expression, ExpressionWithTypeArguments, Extension, FunctionDeclaration, FunctionLikeDeclaration, getJSDocDeprecatedTag, getJSDocOverrideTagNoCache, getJSDocPrivateTag, getJSDocProtectedTag, getJSDocPublicTag, getJSDocReadonlyTag, getJSDocTypeTag, getNameOfDeclaration, HasType, Identifier, ImportDeclaration, ImportEqualsDeclaration, ImportTypeNode, InterfaceDeclaration, isElementAccessExpression, isExpressionWithTypeArguments, isHeritageClause, isIdentifier, isModuleDeclaration, isNumericLiteral, isParameter, isParenthesizedExpression, isPrefixUnaryExpression, isSourceFile, isStringLiteralLike, isVariableStatement,JSDocTemplateTag, JsxEmit, ModifierFlags, ModifierLike, ModuleDeclaration, ModuleKind, ModuleResolutionKind, NamedDeclaration, NewLineKind, Node, NodeFlags, NumericLiteral, OuterExpressionKinds, PrefixUnaryExpression, PrinterOptions, PropertyAccessEntityNameExpression, PropertyAccessExpression, QualifiedName, ScriptTarget, SignatureDeclaration, SourceFile, StringLiteralLike, SyntaxKind, sys, TsConfigSourceFile, TypeAliasDeclaration, TypeAssertion, TypeParameterDeclaration, VariableStatement } from "typescript"; import * as ts from "typescript"; import { Debug } from "./debug"; @@ -636,3 +636,45 @@ function isNamedDeclaration(node: Node): node is NamedDeclaration & { name: Decl return !!(node as NamedDeclaration).name; // A 'name' property should always be a DeclarationName. } + + +export function getMemberKey(name: ts.PropertyName) { + if (isIdentifier(name)) { + return "I:" + name.escapedText; + } + if (ts.isStringLiteral(name)) { + return "I:" + name.text; + } + if (isNumericLiteral(name)) { + return "I:" + (+name.text); + } + if (ts.isComputedPropertyName(name)) { + let fullId = "C:"; + let computedName = ts.isComputedPropertyName(name)? name.expression: name; + // We only support dotted identifiers as property keys + while (true) { + if (isIdentifier(computedName)) { + fullId += computedName.escapedText; + break; + } + else if (ts.isPropertyAccessExpression(computedName)) { + fullId += computedName.name.escapedText; + computedName = computedName.expression; + } + else { + // Can't compute a property key, bail + return undefined; + } + } + return fullId; + } + return undefined; +} + +export function isPropertyAccessEntityNameExpression(node: Node): node is PropertyAccessEntityNameExpression { + return ts.isPropertyAccessExpression(node) && isIdentifier(node.name) && isEntityNameExpression(node.expression); +} +export function isEntityNameExpression(node: Node): node is ts.EntityNameExpression { + return node.kind === SyntaxKind.Identifier || isPropertyAccessEntityNameExpression(node); +} + diff --git a/external-declarations/src/test-runner/parallel-run.ts b/external-declarations/src/test-runner/parallel-run.ts index a1b5078894b32..b2ce3acb9bd6f 100644 --- a/external-declarations/src/test-runner/parallel-run.ts +++ b/external-declarations/src/test-runner/parallel-run.ts @@ -80,4 +80,4 @@ async function main() { console.log(`Took ${elapsedTime(endTime)} to complete ${runCount}`); } -main(); \ No newline at end of file +main(); diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 12c96738eb5a4..40388beefde6f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -46321,9 +46321,18 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function isExpandoFunction(node: Declaration): boolean { const declaration = getParseTreeNode(node, (n): n is FunctionDeclaration | VariableDeclaration => isFunctionDeclaration(n) || isVariableDeclaration(n)); - if (!declaration || (isVariableDeclaration(declaration) && !(declaration.initializer && isFunctionExpressionOrArrowFunction(declaration.initializer)))) { + if (!declaration) { return false; } + if(isVariableDeclaration(declaration)){ + if(declaration.type) { + return false; + } + if(!(declaration.initializer && isFunctionExpressionOrArrowFunction(declaration.initializer))) { + return false; + } + + } const symbol = getSymbolOfDeclaration(declaration); if (!symbol || !(symbol.flags & SymbolFlags.Function | SymbolFlags.Variable)) { return false; @@ -46606,6 +46615,25 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } return false; } + function isLiteralComputedName(node: ComputedPropertyName) { + const expression = node.expression; + const type = getTypeOfExpression(expression); + if(isFreshLiteralType(type)) { + return true; + } + if(!isTypeUsableAsPropertyName(type)) { + return false; + } + if(!isEntityNameExpression(expression)) { + return false; + } + let symbol = getSymbolAtLocation(expression); + if(!symbol) { + return false; + } + let 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) @@ -46719,6 +46747,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); diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 06ffdde29f87d..d27b8e35c58bf 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1145,6 +1145,7 @@ export const notImplementedResolver: EmitResolver = { isRequiredInitializedParameter: notImplemented, isOptionalUninitializedParameterProperty: notImplemented, isExpandoFunction: notImplemented, + isLiteralComputedName: notImplemented, getPropertiesOfContainerFunction: notImplemented, createTypeOfDeclaration: notImplemented, createReturnTypeOfSignatureDeclaration: notImplemented, diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 68515c4f2e3bd..6d5c6bbe4bdfc 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -184,7 +184,7 @@ export function createLocalInferenceResolver({ case SyntaxKind.MinusToken: return regular(factory.createLiteralTypeNode(deepClone(prefixOp)), node); case SyntaxKind.PlusToken: - return regular(factory.createLiteralTypeNode(deepClone(prefixOp)), node); + return regular(factory.createLiteralTypeNode(deepClone(prefixOp.operand as LiteralExpression)), node); } break; case SyntaxKind.BigIntLiteral: @@ -195,7 +195,7 @@ export function createLocalInferenceResolver({ } if(prefixOp.operator === SyntaxKind.PlusToken) { - return regular(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), node); + return regular(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), prefixOp); } else if(prefixOp.operator === SyntaxKind.MinusToken) { return prefixOp.operand.kind === SyntaxKind.BigIntLiteral? @@ -267,11 +267,14 @@ export function createLocalInferenceResolver({ continue; } if (isComputedPropertyName(prop.name)) { - if(!isEntityNameExpression(prop.name.expression)) { + if (!resolver.isLiteralComputedName(prop.name)) { reportIsolatedDeclarationError(node); continue; } - checkEntityNameVisibility(prop.name.expression, prop); + + if(isEntityNameExpression(prop.name.expression)) { + checkEntityNameVisibility(prop.name.expression, prop); + } } const name = deepClone(visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!); @@ -422,10 +425,10 @@ export function createLocalInferenceResolver({ return "I:" + name.escapedText; } if (isStringLiteral(name)) { - return "S:" + name.text; + return "I:" + name.text; } if (isNumericLiteral(name)) { - return "N:" + (+name.text); + return "I:" + (+name.text); } if (isComputedPropertyName(name)) { let fullId = "C:"; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 470e353e11fc6..7fe82f6008e63 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -5717,6 +5717,7 @@ export interface EmitResolver { getTypeReferenceDirectivesForEntityName(name: EntityNameOrEntityNameExpression): [specifier: string, mode: ResolutionMode][] | undefined; getTypeReferenceDirectivesForSymbol(symbol: Symbol, meaning?: SymbolFlags): [specifier: string, mode: ResolutionMode][] | undefined; isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration | EnumMember): boolean; + isLiteralComputedName(name: ComputedPropertyName): boolean; getJsxFactoryEntity(location?: Node): EntityName | undefined; getJsxFragmentFactoryEntity(location?: Node): EntityName | undefined; getAllAccessorDeclarations(declaration: AccessorDeclaration): AllAccessorDeclarations; From 2af866d638ce354b36de59d46fbd3b8a742287b4 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 29 Aug 2023 17:19:03 +0100 Subject: [PATCH 059/224] Fix bugs after merge. --- external-declarations/src/compiler/utils.ts | 2 +- src/compiler/transformers/declarations.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/external-declarations/src/compiler/utils.ts b/external-declarations/src/compiler/utils.ts index 0e082212fa671..3af284009bc12 100644 --- a/external-declarations/src/compiler/utils.ts +++ b/external-declarations/src/compiler/utils.ts @@ -177,7 +177,7 @@ export function isThisIdentifier(node: Node | undefined): boolean { /** @internal */ function identifierIsThisKeyword(id: Identifier): boolean { - return id.originalKeywordKind === SyntaxKind.ThisKeyword; + return id.escapedText === "this"; } diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 4a1933fa9c9d4..948a2c50df699 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -732,7 +732,7 @@ export function transformDeclarations(context: TransformationContext) { if (elem.propertyName && isComputedPropertyName(elem.propertyName) && isEntityNameExpression(elem.propertyName.expression)) { checkEntityNameVisibility(elem.propertyName.expression, enclosingDeclaration); } - if (elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { + if (!isolatedDeclarations && elem.propertyName && isIdentifier(elem.propertyName) && isIdentifier(elem.name) && !elem.symbol.isReferenced && !isIdentifierANonContextualKeyword(elem.propertyName)) { // Unnecessary property renaming is forbidden in types, so remove renaming return factory.updateBindingElement( elem, From 7800241f9bcf9c2bdc8492638af3ff0d251305c0 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Mon, 28 Aug 2023 15:34:28 +0000 Subject: [PATCH 060/224] Do not print diagnostics on interface members and typeLiteralNodes. As this will automatically be inferred as 'any' when noImplicitAny is off, and will be it's own error when noImplicitAny is on. Signed-off-by: Hana Joo --- src/compiler/transformers/declarations.ts | 6 +++++- .../transformers/declarations/localInferenceResolver.ts | 9 +++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 948a2c50df699..8fdc63a1450d1 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -151,6 +151,7 @@ import { isTupleTypeNode, isTypeAliasDeclaration, isTypeElement, + isTypeLiteralNode, isTypeNode, isTypeParameterDeclaration, isTypeQueryNode, @@ -1147,7 +1148,10 @@ export function transformDeclarations(context: TransformationContext) { if (isDeclaration(input)) { if (isDeclarationAndNotVisible(input)) return; if (hasDynamicName(input) && !resolver.isLateBound(getParseTreeNode(input) as Declaration)) { - if (isolatedDeclarations && hasIdentifierComputedName(input)) { + if (isolatedDeclarations && hasIdentifierComputedName(input) && + // When --noImplicitAny is off, it's automatically 'any' type so we shouldn't complain. + // when it's on, it should be an error on the noImplicitAny side, so we also shouldn't complain. + !isInterfaceDeclaration(input.parent) && !isTypeLiteralNode(input.parent)) { reportIsolatedDeclarationError(input); } else { diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 6d5c6bbe4bdfc..14d1d2d5e4595 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -1,6 +1,6 @@ import { Debug } from "../../debug"; import { Diagnostics } from "../../diagnosticInformationMap.generated"; -import { isCallSignatureDeclaration, isComputedPropertyName, isConstructSignatureDeclaration, isExportAssignment, isGetAccessorDeclaration, isIdentifier, isLiteralTypeNode, isMethodDeclaration, isMethodSignature, isNoSubstitutionTemplateLiteral, isNumericLiteral, isOmittedExpression, isParameter, isPrivateIdentifier, isPropertyAccessExpression, isPropertyAssignment, isPropertyDeclaration, isPropertySignature, isSetAccessorDeclaration, isShorthandPropertyAssignment, isSpreadAssignment, isSpreadElement, isStringLiteral, isTypeParameterDeclaration, isTypeReferenceNode, isUnionTypeNode, isVariableDeclaration } from "../../factory/nodeTests"; +import { isComputedPropertyName, isExportAssignment, isGetAccessorDeclaration, isIdentifier, isInterfaceDeclaration, isLiteralTypeNode, isMethodDeclaration, isNoSubstitutionTemplateLiteral, isNumericLiteral, isOmittedExpression, isParameter, isPrivateIdentifier, isPropertyAccessExpression, isPropertyAssignment, isPropertyDeclaration, isSetAccessorDeclaration, isShorthandPropertyAssignment, isSpreadAssignment, isSpreadElement, isStringLiteral, isTypeLiteralNode, isTypeParameterDeclaration, isTypeReferenceNode, isUnionTypeNode, isVariableDeclaration } from "../../factory/nodeTests"; import { setTextRange } from "../../factory/utilitiesPublic"; import { nullTransformationContext } from "../../transformer"; import { ArrayLiteralExpression, ArrowFunction, AsExpression, EntityNameOrEntityNameExpression, ExportAssignment, FunctionExpression, GetAccessorDeclaration, HasInferredType, Identifier, KeywordTypeSyntaxKind, LiteralExpression, MethodSignature, Modifier, Node, NodeArray, NodeFlags, ObjectLiteralElementLike, ObjectLiteralExpression, ParameterDeclaration, ParenthesizedExpression, PrefixUnaryExpression, PropertySignature, SetAccessorDeclaration, SourceFile, SyntaxKind, TransformationContext,TypeAssertion, TypeElement, TypeNode, Visitor, VisitResult } from "../../types"; @@ -254,7 +254,7 @@ export function createLocalInferenceResolver({ for (let propIndex = 0, length = objectLiteral.properties.length; propIndex < length; propIndex++) { const prop = objectLiteral.properties[propIndex]; - + if (isShorthandPropertyAssignment(prop)) { return invalid(prop); } @@ -543,10 +543,7 @@ export function createLocalInferenceResolver({ else if (isPropertyDeclaration(node) && node.initializer) { localType = localInference(node.initializer); } - else if(isMethodSignature(node) - || isConstructSignatureDeclaration(node) - || isCallSignatureDeclaration(node) - || isPropertySignature(node)) { + else if(isInterfaceDeclaration(node.parent) || isTypeLiteralNode(node.parent)) { return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); } else { From fe34c8739ce9be38d6cbb925a84d5b2b01d91b12 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Wed, 30 Aug 2023 12:36:12 +0000 Subject: [PATCH 061/224] When reporting IsolatedDeclarations error, do not report cases where it's an own compiler error. Signed-off-by: Hana Joo --- src/compiler/transformers/declarations.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 8fdc63a1450d1..5009ce83d52e5 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -128,6 +128,7 @@ import { isInterfaceDeclaration, isJsonSourceFile, isLateVisibilityPaintedStatement, + isLiteralExpression, isLiteralImportTypeNode, isMappedTypeNode, isMethodDeclaration, @@ -1788,7 +1789,13 @@ export function transformDeclarations(context: TransformationContext) { // 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 (isolatedDeclarations && + // 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) { reportIsolatedDeclarationError(extendsClause); return cleanup(factory.updateClassDeclaration( input, @@ -1854,12 +1861,14 @@ export function transformDeclarations(context: TransformationContext) { case SyntaxKind.EnumDeclaration: { return cleanup(factory.updateEnumDeclaration( input, - factory.createNodeArray(ensureModifiers(input)), + factory.createNodeArray(ensureModifiers(input)), input.name, factory.createNodeArray(mapDefined(input.members, m => { if (shouldStripInternal(m)) return; if (isolatedDeclarations) { - if (m.initializer && !resolver.isLiteralConstDeclaration(m)) { + if (m.initializer && !resolver.isLiteralConstDeclaration(m) && + // This will be its own compiler error instead, so don't report. + !isComputedPropertyName(m.name)) { reportIsolatedDeclarationError(m); } } From 99425517ee2fc34825dd7fc1b536c78fb5320ed9 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Wed, 30 Aug 2023 12:46:47 +0000 Subject: [PATCH 062/224] Try not to fail in cases where IsolatedDeclaration can report errors in non-sensical places such as ill-formed AST where it still succeeds to parse, but the fixer would not be able to find a proper node to annotate types. Signed-off-by: Hana Joo --- .../src/code-mod/code-transform.ts | 15 +++++++++++---- .../fixMissingTypeAnnotationOnExports.ts | 15 ++++++++++----- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/external-declarations/src/code-mod/code-transform.ts b/external-declarations/src/code-mod/code-transform.ts index 2471c856c25d1..8da7af30fab01 100644 --- a/external-declarations/src/code-mod/code-transform.ts +++ b/external-declarations/src/code-mod/code-transform.ts @@ -30,12 +30,19 @@ const canHaveExplicitTypeAnnotation = new Set([ ts.SyntaxKind.ArrayBindingPattern, ]); -// Currently, the diagnostics for the error is not given in the exact node of which that needs type annotation -function findNearestParentWithTypeAnnotation(node: ts.Node): ts.Node { - while (((ts.isObjectBindingPattern(node) || ts.isArrayBindingPattern(node)) && !ts.isVariableDeclaration(node.parent)) || - !canHaveExplicitTypeAnnotation.has(node.kind)) { +// 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: ts.Node): ts.Node | undefined { + while (node && + (((ts.isObjectBindingPattern(node) || ts.isArrayBindingPattern(node)) && + !ts.isVariableDeclaration(node.parent)) || + !canHaveExplicitTypeAnnotation.has(node.kind))) { node = node.parent; } + if (!node) { + return undefined; + } if (ts.isObjectBindingPattern(node) || ts.isArrayBindingPattern(node)) { // return VariableStatement return node.parent.parent.parent; diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index d351f52548939..56bf5c5e445af 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -90,13 +90,18 @@ registerCodeFix({ function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, typeChecker: TypeChecker, nodeWithDiag: Node): void { const nodeWithNoType = findNearestParentWithTypeAnnotation(nodeWithDiag); - fixupForIsolatedDeclarations(nodeWithNoType, nodeWithDiag, sourceFile, typeChecker, changes); + if (nodeWithNoType) { + fixupForIsolatedDeclarations(nodeWithNoType, nodeWithDiag, sourceFile, typeChecker, changes); + } } -// Currently, the diagnostics for the error is not given in the exact node of which that needs type annotation -function findNearestParentWithTypeAnnotation(node: Node): Node { - while (((isObjectBindingPattern(node) || isArrayBindingPattern(node)) && !isVariableDeclaration(node.parent)) || - !canHaveExplicitTypeAnnotation.has(node.kind)) { +// 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 { + while (node && + (((isObjectBindingPattern(node) || isArrayBindingPattern(node)) && + !isVariableDeclaration(node.parent)) || !canHaveExplicitTypeAnnotation.has(node.kind))) { node = node.parent; } return node; From 0dd34fecdb267b05681f84d6c17e75f04c055d38 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 30 Aug 2023 15:21:23 +0100 Subject: [PATCH 063/224] Fix DTE / TS inequivalences Signed-off-by: Titian Cernicova-Dragomir --- external-declarations/fixed-tests.json | 43 +++--- .../src/compiler/emit-binder.ts | 56 +++----- .../src/compiler/emit-resolver.ts | 22 ++- .../src/compiler/transform-file.ts | 4 +- external-declarations/src/compiler/types.ts | 11 +- external-declarations/src/compiler/utils.ts | 38 ++++-- src/compiler/transformers/declarations.ts | 5 +- .../declarations/localInferenceResolver.ts | 127 ++++++++++++++---- 8 files changed, 205 insertions(+), 101 deletions(-) diff --git a/external-declarations/fixed-tests.json b/external-declarations/fixed-tests.json index e237863aac068..490431ae20d7d 100644 --- a/external-declarations/fixed-tests.json +++ b/external-declarations/fixed-tests.json @@ -4,11 +4,8 @@ 9007 // Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit ], "with-unreliable-errors": [ - 2464, // A_computed_property_name_must_be_of_type_string_number_symbol_or_any, 2314, // Generic type '{0}' requires {1} type argument(s) 1166, // A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type - 1187, // A_parameter_property_may_not_be_declared_using_a_binding_pattern - 1003, // Identifier expected. 2784, // 'get' and 'set' accessors cannot declare 'this' parameters. 1162, // An object member cannot be declared optional. ] @@ -25,13 +22,10 @@ "callSignaturesWithAccessibilityModifiersOnParameters", // Accessibility modifiers on function parameters // Duplicate properties and variables "duplicateObjectLiteralProperty", - "duplicatePropertiesInStrictMode", "duplicateVariablesWithAny", "duplicateVarsAcrossFileBoundaries", "gettersAndSettersErrors", "jsFileCompilationDuplicateVariableErrorReported", - "memberOverride", - "noRepeatedPropertyNames", "varBlock", "duplicatePropertiesInTypeAssertions01", "duplicatePropertiesInTypeAssertions02", @@ -39,18 +33,30 @@ "invalidMultipleVariableDeclarations", "validMultipleVariableDeclarations", "augmentedTypesVar", - "twoAccessorsWithSameName", - "stringNamedPropertyDuplicates", - "numericStringNamedPropertyEquivalence", - "numericNamedPropertyDuplicates", - "objectTypeWithDuplicateNumericProperty", "objectLiteralErrors", - "octalIntegerLiteralError", - "binaryIntegerLiteralError", - "symbolProperty36", "duplicateObjectLiteralProperty_computedName2", - "duplicateIdentifierDifferentSpelling", - "castingTuple" // contains both duplicate variables and print differences. + "castingTuple", // contains both duplicate variables and print differences. + // Identifier expected. + "FunctionPropertyAssignments2_es6", + "FunctionPropertyAssignments3_es6", + "FunctionPropertyAssignments4_es6", + "FunctionPropertyAssignments6_es6", + // Generic type '{0}' requires {1} type argument(s) + "genericTypeReferenceWithoutTypeArgument", + "genericTypeReferenceWithoutTypeArgument2", + // A_computed_property_name_must_be_of_type_string_number_symbol_or_any, + "bigintIndex", + "computedPropertyNames14_ES5", + "computedPropertyNames14_ES6", + "computedPropertyNames15_ES5", + "computedPropertyNames15_ES6", + "computedPropertyNames17_ES5", + "computedPropertyNames17_ES6", + "parser.asyncGenerators.classMethods.es2018", + // Invalid escape sequences + "invalidTaggedTemplateEscapeSequences", + "objectTypeWithStringNamedPropertyOfIllegalCharacters", + "noUsedBeforeDefinedErrorInTypeContext" // Variable used before definition in type context ], "with-isolated-declaration-errors": [ "typeFromPropertyAssignment38", // Nested expando functions. Can in principle be detected, but are not yet implemented @@ -116,6 +122,8 @@ "declarationEmitComputedNameCausesImportToBePainted", // Default type parameters is written in declarations "conditionalTypesSimplifyWhenTrivial", + // https://github.com/microsoft/TypeScript/issues/55571 + "reExportAliasMakesInstantiated" ], // Needs TS Fix "binding-patterns": [ @@ -210,6 +218,8 @@ "declarationEmitWithDefaultAsComputedName", "declarationEmitComputedNameConstEnumAlias", "capturedParametersInInitializers1", + "declarationEmitPropertyNumericStringKey", + "templateLiteralsSourceMap" // template literal is evaluated in constant value. ], // Investigate in reference DTE "references-import-diffs": [ @@ -233,6 +243,7 @@ "typeReferenceRelatedFiles", "jsxNamespaceGlobalReexport", "parseAssertEntriesError", + "declarationEmitPrefersPathKindBasedOnBundling2" ], "bug-binding-pattern-inference": [ "destructuringWithLiteralInitializers", diff --git a/external-declarations/src/compiler/emit-binder.ts b/external-declarations/src/compiler/emit-binder.ts index 1fbbeb506e5e0..89c36dd74b0c4 100644 --- a/external-declarations/src/compiler/emit-binder.ts +++ b/external-declarations/src/compiler/emit-binder.ts @@ -1,8 +1,8 @@ -import { __String, ArrayBindingElement, BindingPattern, ClassDeclaration, ClassElement, CompilerOptions, EnumDeclaration, ExportDeclaration, ExportSpecifier, Extension, findAncestor, forEachChild, FunctionDeclaration, Identifier, InterfaceDeclaration, isBlock, isClassDeclaration, isComputedPropertyName, isConditionalTypeNode, isConstructorDeclaration, isConstructSignatureDeclaration, isEnumDeclaration, isExportAssignment, isExportDeclaration, isExternalModuleReference, isFunctionDeclaration, isIdentifier, isImportDeclaration, isImportEqualsDeclaration, isInferTypeNode, isInterfaceDeclaration, isJsxFragment, isJsxOpeningLikeElement, isLiteralExpression, isMappedTypeNode, isMetaProperty, isModuleBlock, isModuleDeclaration, isNamedExports, isPrivateIdentifier, isPropertyAccessExpression, isSourceFile, isTypeAliasDeclaration, isVariableDeclaration,isVariableStatement, JsxEmit, ModifierFlags, ModuleDeclaration, ModuleDetectionKind, ModuleKind, ModuleResolutionKind, Node, NodeArray, ParameterDeclaration, ResolutionMode, SourceFile, Symbol, SymbolFlags, SyntaxKind, TypeElement, TypeParameterDeclaration, VariableDeclaration } from "typescript"; +import { __String, ArrayBindingElement, BindingPattern, ClassDeclaration, ClassElement, CompilerOptions, EnumDeclaration, ExportDeclaration, ExportSpecifier, Extension, findAncestor, forEachChild, FunctionDeclaration, Identifier, InterfaceDeclaration, isBlock, isClassDeclaration, isConditionalTypeNode, isConstructorDeclaration, isConstructSignatureDeclaration, isEnumDeclaration, isExportAssignment, isExportDeclaration, isExternalModuleReference, isFunctionDeclaration, isIdentifier, isImportDeclaration, isImportEqualsDeclaration, isInferTypeNode, isInterfaceDeclaration, isJsxFragment, isJsxOpeningLikeElement, isMappedTypeNode, isMetaProperty, isModuleBlock, isModuleDeclaration, isNamedExports, isSourceFile, isTypeAliasDeclaration, isVariableDeclaration,isVariableStatement, JsxEmit, ModifierFlags, ModuleDeclaration, ModuleDetectionKind, ModuleKind, ModuleResolutionKind, Node, NodeArray, ParameterDeclaration, ResolutionMode, SourceFile, Symbol, SymbolFlags, SyntaxKind, TypeElement, TypeParameterDeclaration, VariableDeclaration } from "typescript"; import { Debug } from "./debug"; import { forEach } from "./lang-utils"; -import { getEmitModuleKind, getEmitModuleResolutionKind, getNodeId, hasSyntacticModifier, isBindingPattern, isEnumConst, nodeHasName } from "./utils"; +import { getEmitModuleKind, getEmitModuleResolutionKind, getMemberKey, getNodeId, hasSyntacticModifier, isBindingPattern, isEnumConst, nodeHasName } from "./utils"; export interface NodeLinks { @@ -107,6 +107,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa tryGetNodeLinks, getNodeLinks, resolveName, + getMemberName, }; @@ -230,45 +231,6 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa [currentLocalSymbolTable, currentSymbol] = old; } - /** - * Gets the symbolic name for a member from its type. - */ - function getMemberName(element: TypeElement | ClassElement): __String | undefined{ - if (isConstructorDeclaration(element) || isConstructSignatureDeclaration(element)) { - return "@constructor" as __String; - } - const name = element.name; - if(!name) return undefined; - if(isIdentifier(name)) { - return name.escapedText; - } - else if(isLiteralExpression(name)) { - return `${name.text}` as __String; - } - else if(isComputedPropertyName(name)) { - let expr = name.expression; - - if(isLiteralExpression(expr)) { - return `${expr.text}` as __String; - } - - let fullName = ""; - while(isPropertyAccessExpression(expr)) { - fullName = "." + expr.name.escapedText + name; - expr = expr.expression; - } - if(!isIdentifier(expr)) { - return undefined; - } - return `[${expr.escapedText}${fullName}]` as __String; - } - else if(isPrivateIdentifier(name)) { - return name.escapedText; - } - else { - assertNever(name); - } - } function getStatementName(s: InterfaceDeclaration | ClassDeclaration | FunctionDeclaration) { if(hasSyntacticModifier(s, ModifierFlags.Export) && hasSyntacticModifier(s, ModifierFlags.Default)) { @@ -710,3 +672,15 @@ function getModuleInstanceStateForAliasTarget(specifier: ExportSpecifier, visite return ModuleInstanceState.Instantiated; // Couldn't locate, assume could refer to a value } + +/** + * Gets the symbolic name for a member from its type. + */ +function getMemberName(element: TypeElement | ClassElement): __String | undefined{ + if (isConstructorDeclaration(element) || isConstructSignatureDeclaration(element)) { + return "@constructor" as __String; + } + const name = element.name; + if(!name) return undefined; + return getMemberKey(name) as __String; +} diff --git a/external-declarations/src/compiler/emit-resolver.ts b/external-declarations/src/compiler/emit-resolver.ts index a47b248e63d34..de983f6b5f00d 100644 --- a/external-declarations/src/compiler/emit-resolver.ts +++ b/external-declarations/src/compiler/emit-resolver.ts @@ -1,4 +1,4 @@ -import { __String, BindingPattern, CompilerOptions, ComputedPropertyName, Declaration, DeclarationName, ElementAccessExpression, EntityNameOrEntityNameExpression, EnumDeclaration, EnumMember, Expression, factory, findAncestor, FunctionDeclaration, FunctionLikeDeclaration, getCombinedModifierFlags, getCombinedNodeFlags, getNameOfDeclaration, getParseTreeNode, Identifier, ImportClause, ImportEqualsDeclaration, ImportSpecifier, isArrowFunction, isBigIntLiteral, isBinaryExpression, isBindingElement, isElementAccessExpression, isEnumMember, isExpressionStatement, isFunctionDeclaration, isFunctionExpression, isFunctionLike, isGetAccessor, isIdentifier, isLiteralExpression, isNumericLiteral, isParameterPropertyDeclaration, isPrefixUnaryExpression, isPropertyAccessExpression, isSetAccessor, isSourceFile, isStringLiteralLike, isVariableDeclaration, isVariableStatement, LiteralExpression, ModifierFlags, NamespaceImport, Node, NodeArray, NodeFlags, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertySignature, ResolutionMode,SourceFile, Statement, SymbolFlags, SyntaxKind, VariableDeclaration, VariableDeclarationList } from "typescript"; +import { __String, AccessorDeclaration, BindingPattern, CompilerOptions, ComputedPropertyName, Declaration, DeclarationName, ElementAccessExpression, EntityNameOrEntityNameExpression, EnumDeclaration, EnumMember, Expression, factory, findAncestor, FunctionDeclaration, FunctionLikeDeclaration, getCombinedModifierFlags, getCombinedNodeFlags, getNameOfDeclaration, getParseTreeNode, Identifier, ImportClause, ImportEqualsDeclaration, ImportSpecifier, isArrowFunction, isBigIntLiteral, isBinaryExpression, isBindingElement, isElementAccessExpression, isEnumMember, isExpressionStatement, isFunctionDeclaration, isFunctionExpression, isFunctionLike, isGetAccessor, isGetAccessorDeclaration, isIdentifier, isLiteralExpression, isNumericLiteral, isParameterPropertyDeclaration, isPrefixUnaryExpression, isPropertyAccessExpression, isSetAccessor, isSetAccessorDeclaration, isSourceFile, isStringLiteralLike, isTemplateExpression, isVariableDeclaration, isVariableStatement, LiteralExpression, ModifierFlags, NamespaceImport, Node, NodeArray, NodeFlags, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertySignature, ResolutionMode,SourceFile, Statement, SymbolFlags, SyntaxKind, VariableDeclaration, VariableDeclarationList } from "typescript"; import { Debug } from "./debug"; import { BasicSymbol, bindSourceFile, NodeLinks } from "./emit-binder"; @@ -12,7 +12,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p const { getNodeLinks, resolveName } = bindSourceFile(file, options, packageModuleType); - function isLiteralValue(node: Expression) { + function isLiteralValue(node: Expression): boolean { if(isLiteralExpression(node)) return true; if(node.kind === SyntaxKind.TrueKeyword || node.kind === SyntaxKind.FalseKeyword) return true; @@ -26,6 +26,9 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p return isNumericLiteral(operand); } } + if(isTemplateExpression(node)) { + return node.templateSpans.every(t => isLiteralValue(t.expression)); + } return false; } function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration | EnumMember): boolean { @@ -151,6 +154,21 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p isDeclarationVisible, isLiteralConstDeclaration, isLiteralComputedName, + getAllAccessorDeclarations(declaration) { + const parentLinks = getNodeLinks(declaration.parent); + const key = getMemberKey(declaration.name) as __String; + const members = hasSyntacticModifier(declaration, ModifierFlags.Static) ? + parentLinks.symbol?.exports : + parentLinks.symbol?.members + const symbol = key && members?.get(key); + const declarations = symbol?.declarations ?? [declaration]; + return { + firstAccessor: declarations[0] as AccessorDeclaration, + secondAccessor: declarations[1] as AccessorDeclaration, + getAccessor: declarations.find(isGetAccessorDeclaration), + setAccessor: declarations.find(isSetAccessorDeclaration) + } + }, getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined { function getLiteralValue(value: LiteralExpression) { if(isStringLiteralLike(value)) { diff --git a/external-declarations/src/compiler/transform-file.ts b/external-declarations/src/compiler/transform-file.ts index 73fc06a11a7be..a754fd62f1469 100644 --- a/external-declarations/src/compiler/transform-file.ts +++ b/external-declarations/src/compiler/transform-file.ts @@ -6,6 +6,7 @@ import { createEmitHost } from "./emit-host"; import { createEmitResolver } from "./emit-resolver"; import { tracer } from "./perf-tracer"; import { TransformationContext } from "./types"; +import { Utils } from "../test-runner/tsc-infrastructure/compiler-run"; const transformDeclarations: (context: TransformationContext) => (node: SourceFile) => SourceFile = (ts as any).transformDeclarations; @@ -42,8 +43,9 @@ export function transformFile(sourceFile: ts.SourceFile, allProjectFiles: string } as ts.PrinterOptions); try { + const code = printer.printFile(result); return { - code: printer.printFile(result), + code: options.emitBOM ? Utils.addUTF8ByteOrderMark(code): code, diagnostics, }; } diff --git a/external-declarations/src/compiler/types.ts b/external-declarations/src/compiler/types.ts index a5f7d42eeb524..5648fc83c4f50 100644 --- a/external-declarations/src/compiler/types.ts +++ b/external-declarations/src/compiler/types.ts @@ -1,4 +1,4 @@ -import { AsExpression, BinaryExpression, ClassDeclaration, CompilerOptions, ComputedPropertyName, Declaration, DiagnosticWithLocation, ElementAccessExpression, EntityNameExpression, EntityNameOrEntityNameExpression, EnumDeclaration, Expression, FileReference, FunctionDeclaration, ImportDeclaration, InterfaceDeclaration, ModifierFlags, ModuleBlock, ModuleDeclaration, NamedDeclaration, Node, NonNullExpression, ParameterDeclaration, ParenthesizedExpression, PartiallyEmittedExpression, PropertyDeclaration, PropertySignature, ResolutionMode,SatisfiesExpression, SignatureDeclaration, SourceFile, StringLiteralLike, Symbol, SymbolFlags, TransformationContext as _TransformationContext, TypeAliasDeclaration, TypeAssertion, VariableDeclaration, VariableStatement, Path, EnumMember, PropertyAccessExpression } from "typescript"; +import { AsExpression, BinaryExpression, ClassDeclaration, CompilerOptions, ComputedPropertyName, Declaration, DiagnosticWithLocation, ElementAccessExpression, EntityNameExpression, EntityNameOrEntityNameExpression, EnumDeclaration, Expression, FileReference, FunctionDeclaration, ImportDeclaration, InterfaceDeclaration, ModifierFlags, ModuleBlock, ModuleDeclaration, NamedDeclaration, Node, NonNullExpression, ParameterDeclaration, ParenthesizedExpression, PartiallyEmittedExpression, PropertyDeclaration, PropertySignature, ResolutionMode,SatisfiesExpression, SignatureDeclaration, SourceFile, StringLiteralLike, Symbol, SymbolFlags, TransformationContext as _TransformationContext, TypeAliasDeclaration, TypeAssertion, VariableDeclaration, VariableStatement, Path, EnumMember, PropertyAccessExpression, AccessorDeclaration, GetAccessorDeclaration, SetAccessorDeclaration } from "typescript"; import { AnyImportSyntax } from "./utils"; @@ -41,7 +41,16 @@ export interface IsolatedEmitResolver { getSymbolOfExternalModuleSpecifier(node: StringLiteralLike): Symbol | undefined; isImportRequiredByAugmentation(decl: ImportDeclaration): boolean; getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined + getAllAccessorDeclarations(declaration: AccessorDeclaration): AllAccessorDeclarations; } +export interface AllAccessorDeclarations { + firstAccessor: AccessorDeclaration; + secondAccessor: AccessorDeclaration | undefined; + getAccessor: GetAccessorDeclaration | undefined; + setAccessor: SetAccessorDeclaration | undefined; +} + + /** @internal */ export interface AmbientModuleDeclaration extends ModuleDeclaration { readonly body?: ModuleBlock; diff --git a/external-declarations/src/compiler/utils.ts b/external-declarations/src/compiler/utils.ts index 3af284009bc12..116f0b6088bc6 100644 --- a/external-declarations/src/compiler/utils.ts +++ b/external-declarations/src/compiler/utils.ts @@ -1,4 +1,4 @@ -import { BindingPattern, CallExpression, canHaveModifiers, ClassDeclaration, ClassLikeDeclaration, CompilerOptions, Declaration, DeclarationName, EntityNameOrEntityNameExpression, EnumDeclaration, Expression, ExpressionWithTypeArguments, Extension, FunctionDeclaration, FunctionLikeDeclaration, getJSDocDeprecatedTag, getJSDocOverrideTagNoCache, getJSDocPrivateTag, getJSDocProtectedTag, getJSDocPublicTag, getJSDocReadonlyTag, getJSDocTypeTag, getNameOfDeclaration, HasType, Identifier, ImportDeclaration, ImportEqualsDeclaration, ImportTypeNode, InterfaceDeclaration, isElementAccessExpression, isExpressionWithTypeArguments, isHeritageClause, isIdentifier, isModuleDeclaration, isNumericLiteral, isParameter, isParenthesizedExpression, isPrefixUnaryExpression, isSourceFile, isStringLiteralLike, isVariableStatement,JSDocTemplateTag, JsxEmit, ModifierFlags, ModifierLike, ModuleDeclaration, ModuleKind, ModuleResolutionKind, NamedDeclaration, NewLineKind, Node, NodeFlags, NumericLiteral, OuterExpressionKinds, PrefixUnaryExpression, PrinterOptions, PropertyAccessEntityNameExpression, PropertyAccessExpression, QualifiedName, ScriptTarget, SignatureDeclaration, SourceFile, StringLiteralLike, SyntaxKind, sys, TsConfigSourceFile, TypeAliasDeclaration, TypeAssertion, TypeParameterDeclaration, VariableStatement } from "typescript"; +import { __String, BindingPattern, CallExpression, canHaveModifiers, ClassDeclaration, ClassLikeDeclaration, CompilerOptions, Declaration, DeclarationName, EntityNameOrEntityNameExpression, EnumDeclaration, Expression, ExpressionWithTypeArguments, Extension, FunctionDeclaration, FunctionLikeDeclaration, getJSDocDeprecatedTag, getJSDocOverrideTagNoCache, getJSDocPrivateTag, getJSDocProtectedTag, getJSDocPublicTag, getJSDocReadonlyTag, getJSDocTypeTag, getNameOfDeclaration, HasType, Identifier, ImportDeclaration, ImportEqualsDeclaration, ImportTypeNode, InterfaceDeclaration, isElementAccessExpression, isExpressionWithTypeArguments, isHeritageClause, isIdentifier, isModuleDeclaration, isNumericLiteral, isParameter, isParenthesizedExpression, isPrefixUnaryExpression, isPrivateIdentifier, isSourceFile, isStringLiteral, isStringLiteralLike, isVariableStatement,JSDocTemplateTag, JsxEmit, ModifierFlags, ModifierLike, ModuleDeclaration, ModuleKind, ModuleResolutionKind, NamedDeclaration, NewLineKind, Node, NodeFlags, NumericLiteral, OuterExpressionKinds, PrefixUnaryExpression, PrinterOptions, PropertyAccessEntityNameExpression, PropertyAccessExpression, QualifiedName, ScriptTarget, SignatureDeclaration, SourceFile, StringLiteralLike, SyntaxKind, sys, TsConfigSourceFile, TypeAliasDeclaration, TypeAssertion, TypeParameterDeclaration, VariableStatement } from "typescript"; import * as ts from "typescript"; import { Debug } from "./debug"; @@ -638,19 +638,41 @@ function isNamedDeclaration(node: Node): node is NamedDeclaration & { name: Decl -export function getMemberKey(name: ts.PropertyName) { +export function getMemberKey(name: ts.PropertyName): string | undefined { + if(isPrivateIdentifier(name)) { + return ("P:" + name.escapedText); + } if (isIdentifier(name)) { - return "I:" + name.escapedText; + return ("I:" + name.escapedText); } - if (ts.isStringLiteral(name)) { - return "I:" + name.text; + if (isStringLiteral(name)) { + return ("I:" + name.text); } if (isNumericLiteral(name)) { - return "I:" + (+name.text); + return ("I:" + (+name.text)); } if (ts.isComputedPropertyName(name)) { let fullId = "C:"; - let computedName = ts.isComputedPropertyName(name)? name.expression: name; + let computedName = name.expression; + + if (isStringLiteral(computedName)) { + return ("I:" + computedName.text); + } + if (isNumericLiteral(computedName)) { + return ("I:" + (+computedName.text)); + } + if (isPrefixUnaryExpression(computedName) + && isNumericLiteral(computedName.operand)) { + if(computedName.operator === SyntaxKind.MinusToken){ + return ("I:" + (-computedName.operand.text)); + } + else if(computedName.operator === SyntaxKind.PlusToken){ + return ("I:" + (-computedName.operand.text)); + } + else { + return undefined; + } + } // We only support dotted identifiers as property keys while (true) { if (isIdentifier(computedName)) { @@ -666,7 +688,7 @@ export function getMemberKey(name: ts.PropertyName) { return undefined; } } - return fullId; + return fullId } return undefined; } diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 5009ce83d52e5..f30cefa06e787 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -912,10 +912,7 @@ export function transformDeclarations(context: TransformationContext) { if (!isPrivate) { const valueParameter = getSetAccessorValueParameter(input); if (valueParameter) { - const accessorType = - isolatedDeclarations ? - undefined: - getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input)); + const accessorType = getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input)); newValueParameter = ensureParameter(valueParameter, /*modifierMask*/ undefined, accessorType); } } diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 14d1d2d5e4595..aa5ef7d5f081c 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -1,11 +1,12 @@ import { Debug } from "../../debug"; import { Diagnostics } from "../../diagnosticInformationMap.generated"; -import { isComputedPropertyName, isExportAssignment, isGetAccessorDeclaration, isIdentifier, isInterfaceDeclaration, isLiteralTypeNode, isMethodDeclaration, isNoSubstitutionTemplateLiteral, isNumericLiteral, isOmittedExpression, isParameter, isPrivateIdentifier, isPropertyAccessExpression, isPropertyAssignment, isPropertyDeclaration, isSetAccessorDeclaration, isShorthandPropertyAssignment, isSpreadAssignment, isSpreadElement, isStringLiteral, isTypeLiteralNode, isTypeParameterDeclaration, isTypeReferenceNode, isUnionTypeNode, isVariableDeclaration } from "../../factory/nodeTests"; +import { isComputedPropertyName, isExportAssignment, isGetAccessorDeclaration, isIdentifier, isInterfaceDeclaration, isLiteralTypeNode, isMethodDeclaration, isNoSubstitutionTemplateLiteral, isNumericLiteral, isOmittedExpression, isParameter, isPrefixUnaryExpression, isPrivateIdentifier, isPropertyAccessExpression, isPropertyAssignment, isPropertyDeclaration, isSetAccessorDeclaration, isShorthandPropertyAssignment, isSpreadAssignment, isSpreadElement, isStringLiteral, isTypeLiteralNode, isTypeParameterDeclaration, isTypeReferenceNode, isUnionTypeNode, isVariableDeclaration } from "../../factory/nodeTests"; import { setTextRange } from "../../factory/utilitiesPublic"; +import { isIdentifierText } from "../../scanner"; import { nullTransformationContext } from "../../transformer"; -import { ArrayLiteralExpression, ArrowFunction, AsExpression, EntityNameOrEntityNameExpression, ExportAssignment, FunctionExpression, GetAccessorDeclaration, HasInferredType, Identifier, KeywordTypeSyntaxKind, LiteralExpression, MethodSignature, Modifier, Node, NodeArray, NodeFlags, ObjectLiteralElementLike, ObjectLiteralExpression, ParameterDeclaration, ParenthesizedExpression, PrefixUnaryExpression, PropertySignature, SetAccessorDeclaration, SourceFile, SyntaxKind, TransformationContext,TypeAssertion, TypeElement, TypeNode, Visitor, VisitResult } from "../../types"; +import { ArrayLiteralExpression, ArrowFunction, AsExpression, EntityNameOrEntityNameExpression, ExportAssignment, Expression, FunctionExpression, GetAccessorDeclaration, HasInferredType, Identifier, KeywordTypeSyntaxKind, LanguageVariant, LiteralExpression, MethodDeclaration, MethodSignature, Modifier, Node, NodeArray, NodeFlags, ObjectLiteralElementLike, ObjectLiteralExpression, ParameterDeclaration, ParenthesizedExpression, PrefixUnaryExpression, PropertyAssignment, PropertyName, PropertySignature, SetAccessorDeclaration, SourceFile, SyntaxKind, TransformationContext,TypeAssertion, TypeElement, TypeNode, Visitor, VisitResult } from "../../types"; import { createDiagnosticForNode,isEntityNameExpression } from "../../utilities"; -import { isConstTypeReference, isPropertyName, isRestParameter, isTypeNode } from "../../utilitiesPublic"; +import { isConstTypeReference, isPropertyName, isTypeNode } from "../../utilitiesPublic"; import { visitEachChild,visitNode, visitNodes } from "../../visitorPublic"; enum NarrowBehavior { @@ -251,7 +252,10 @@ export function createLocalInferenceResolver({ const objectLiteral = node as ObjectLiteralExpression; const properties: TypeElement[] = []; let inheritedObjectTypeFlags = LocalTypeInfoFlags.None; - + const members = new Map(); for (let propIndex = 0, length = objectLiteral.properties.length; propIndex < length; propIndex++) { const prop = objectLiteral.properties[propIndex]; @@ -271,13 +275,16 @@ export function createLocalInferenceResolver({ reportIsolatedDeclarationError(node); continue; } - if(isEntityNameExpression(prop.name.expression)) { checkEntityNameVisibility(prop.name.expression, prop); } } - const name = deepClone(visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!); + const nameKey = getMemberKey(prop); + const existingMember = nameKey ? members.get(nameKey): undefined; + const name = simplifyComputedPropertyName(prop.name, existingMember?.name) ?? + deepClone(visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!); + let newProp; if (isMethodDeclaration(prop)) { const oldEnclosingDeclaration = setEnclosingDeclarations(prop); @@ -332,7 +339,6 @@ export function createLocalInferenceResolver({ if (!isGetAccessorDeclaration(prop) && !isSetAccessorDeclaration(prop)) { Debug.assertNever(prop); } - const nameKey = getMemberKey(prop); if (!nameKey) { return invalid(prop) } @@ -354,7 +360,22 @@ export function createLocalInferenceResolver({ } if (newProp) { - properties.push(newProp); + if(nameKey) { + + if(existingMember !== undefined && !isMethodDeclaration(prop)) { + properties[existingMember.location] = newProp; + } + else { + members.set(nameKey, { + location: properties.length, + name, + }); + properties.push(newProp); + } + } + else { + properties.push(newProp); + } } } @@ -419,7 +440,51 @@ export function createLocalInferenceResolver({ return regular(deepClone(visitedType), owner) } - function getMemberKey(member: MethodSignature | PropertySignature | GetAccessorDeclaration | SetAccessorDeclaration) { + function simplifyComputedPropertyName(name: PropertyName, existingName?: PropertyName) { + let numericValue; + function basicStringNumberLiterals(name: PropertyName | Expression) { + if (isStringLiteral(name)) { + if(isIdentifierText(name.text, options.target, LanguageVariant.Standard)) { + return factory.createIdentifier(name.text) + } + return existingName && isNumericLiteral(existingName) ? existingName: name; + } + else if (isNumericLiteral(name)) { + numericValue = (+name.text); + } + } + const result = basicStringNumberLiterals(name); + if(result) { + return result; + } + else if (isComputedPropertyName(name)) { + const expression = name.expression + const result = basicStringNumberLiterals(expression); + if (result) { + return result; + } + else if (isPrefixUnaryExpression(expression) + && isNumericLiteral(expression.operand)) { + if(expression.operator === SyntaxKind.MinusToken){ + return name; + } + else if(expression.operator === SyntaxKind.PlusToken){ + numericValue = +expression.operand.text; + } + } + } + if(numericValue === undefined) { + return undefined; + } + + if(numericValue >= 0) { + return factory.createNumericLiteral(numericValue); + } + else { + return factory.createStringLiteral(numericValue.toString()); + } + } + function getMemberKey(member: PropertyAssignment | MethodDeclaration | MethodSignature | PropertySignature | GetAccessorDeclaration | SetAccessorDeclaration) { const name = member.name; if (isIdentifier(name)) { return "I:" + name.escapedText; @@ -432,7 +497,27 @@ export function createLocalInferenceResolver({ } if (isComputedPropertyName(name)) { let fullId = "C:"; - let computedName = isComputedPropertyName(name)? name.expression: name; + let computedName = name.expression; + + if (isStringLiteral(computedName)) { + return ("I:" + computedName.text); + } + if (isNumericLiteral(computedName)) { + return ("I:" + (+computedName.text)); + } + if (isPrefixUnaryExpression(computedName) + && isNumericLiteral(computedName.operand)) { + if(computedName.operator === SyntaxKind.MinusToken){ + return ("I:" + (-computedName.operand.text)); + } + else if(computedName.operator === SyntaxKind.PlusToken){ + return ("I:" + (+computedName.operand.text)); + } + else { + return undefined; + } + } + // We only support dotted identifiers as property keys while (true) { if (isIdentifier(computedName)) { @@ -505,26 +590,12 @@ export function createLocalInferenceResolver({ else if(node.initializer) { localType = localInference(node.initializer); } - - if(node.initializer && localType && strictNullChecks && !resolver.isOptionalParameter(node)) { - localType.typeNode = addUndefinedInUnion(localType.typeNode); + else { + localType = invalid(node); } - if(!localType) { - if(isRestParameter(node)) { - localType = regular( - factory.createArrayTypeNode( - factory.createKeywordTypeNode(SyntaxKind.AnyKeyword) - ), - node, - ) - } - else { - localType = regular( - factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), - node, - ) - } + if(node.initializer && !(localType.flags & LocalTypeInfoFlags.Invalid) && strictNullChecks && !resolver.isOptionalParameter(node)) { + localType.typeNode = addUndefinedInUnion(localType.typeNode); } } else if(type) { From 1a1d0bd981ec56ab1591cae34dbcaf20c11464bb Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 30 Aug 2023 16:43:34 +0100 Subject: [PATCH 064/224] Fix error caused by trying to emit typeof for inheritance clauses in invalid code. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/transformers/declarations.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index f30cefa06e787..c72412c2ac846 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -1786,14 +1786,16 @@ export function transformDeclarations(context: TransformationContext) { // We must add a temporary declaration for the extends clause expression // Isolated declarations does not allow inferred type in the extends clause - if (isolatedDeclarations && - // 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) { - reportIsolatedDeclarationError(extendsClause); + 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) { + reportIsolatedDeclarationError(extendsClause); + } return cleanup(factory.updateClassDeclaration( input, modifiers, From 7ca64358b460f7cbdb32c749841cd2412fbb7ebf Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 30 Aug 2023 17:44:17 +0100 Subject: [PATCH 065/224] Remove tests that now pass from exception list. Signed-off-by: Titian Cernicova-Dragomir --- external-declarations/fixed-tests.json | 42 ++++++++------------------ 1 file changed, 12 insertions(+), 30 deletions(-) diff --git a/external-declarations/fixed-tests.json b/external-declarations/fixed-tests.json index 490431ae20d7d..c2e42010d7ef1 100644 --- a/external-declarations/fixed-tests.json +++ b/external-declarations/fixed-tests.json @@ -39,24 +39,34 @@ // Identifier expected. "FunctionPropertyAssignments2_es6", "FunctionPropertyAssignments3_es6", - "FunctionPropertyAssignments4_es6", "FunctionPropertyAssignments6_es6", // Generic type '{0}' requires {1} type argument(s) "genericTypeReferenceWithoutTypeArgument", "genericTypeReferenceWithoutTypeArgument2", + // A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + "overloadsWithComputedNames", // A_computed_property_name_must_be_of_type_string_number_symbol_or_any, "bigintIndex", + "symbolProperty59", "computedPropertyNames14_ES5", "computedPropertyNames14_ES6", "computedPropertyNames15_ES5", "computedPropertyNames15_ES6", "computedPropertyNames17_ES5", "computedPropertyNames17_ES6", + "parserES5ComputedPropertyName5", + "parserIndexSignature5", + "parserES5SymbolProperty1", + "parserES5SymbolProperty2", + "parserComputedPropertyName20", + "parserComputedPropertyName21", + "typeUsedAsTypeLiteralIndex", "parser.asyncGenerators.classMethods.es2018", // Invalid escape sequences "invalidTaggedTemplateEscapeSequences", "objectTypeWithStringNamedPropertyOfIllegalCharacters", - "noUsedBeforeDefinedErrorInTypeContext" // Variable used before definition in type context + "noUsedBeforeDefinedErrorInTypeContext", // Variable used before definition in type context + "accessorBodyInTypeContext", //An implementation cannot be declared in ambient contexts. ], "with-isolated-declaration-errors": [ "typeFromPropertyAssignment38", // Nested expando functions. Can in principle be detected, but are not yet implemented @@ -65,19 +75,13 @@ "complicatedPrivacy", "declarationEmitMappedTypeTemplateTypeofSymbol", "declarationEmitReadonlyComputedProperty", - "modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib", "propertyAssignment", - "ES5SymbolProperty1", "ES5SymbolProperty2", "ES5SymbolProperty3", "ES5SymbolProperty4", "ES5SymbolProperty5", "ES5SymbolProperty6", "ES5SymbolProperty7", - "symbolProperty1", - "symbolProperty2", - "symbolProperty52", - "symbolProperty58", "computedPropertyNames13_ES5", "computedPropertyNames13_ES6", "MemberFunctionDeclaration3_es6", @@ -87,9 +91,6 @@ "superSymbolIndexedAccess5", "superSymbolIndexedAccess6", "parserES5ComputedPropertyName11", - "parserES5ComputedPropertyName2", - "parserES5ComputedPropertyName3", - "parserES5ComputedPropertyName4", "parserES5ComputedPropertyName8", "parserES5SymbolProperty3", "parserES5SymbolProperty7", @@ -102,15 +103,10 @@ "parserComputedPropertyName15", "parserComputedPropertyName18", "parserComputedPropertyName19", - "parserComputedPropertyName2", "parserComputedPropertyName23", - "parserComputedPropertyName3", "parserComputedPropertyName32", - "parserComputedPropertyName37", "parserComputedPropertyName38", "parserComputedPropertyName39", - "parserComputedPropertyName4", - "parserComputedPropertyName5", "ES5For-ofTypeCheck10", ], "possible-ts-bugs": [ @@ -118,8 +114,6 @@ "objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts", "objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames", "objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts", - // https://github.com/microsoft/TypeScript/issues/55494 - "declarationEmitComputedNameCausesImportToBePainted", // Default type parameters is written in declarations "conditionalTypesSimplifyWhenTrivial", // https://github.com/microsoft/TypeScript/issues/55571 @@ -195,24 +189,12 @@ "emitArrowFunctionES6", "stringLiteralTypesInImplementationSignatures", "stringLiteralTypesInImplementationSignatures2", - "typeOfOnTypeArg", - "stringLiteralObjectLiteralDeclaration1", - "indexSignatures1", - "parserFunctionPropertyAssignment3", "computedPropertyNames7_ES6", "computedPropertyNames7_ES5", - "quotedConstructors", - "stringLiteralPropertyNameWithLineContinuation1", - "protoAsIndexInIndexExpression", "objectLiteralEnumPropertyNames", "objectLiteralComputedNameNoDeclarationError", "identityAndDivergentNormalizedTypes", "genericFunctionsAndConditionalInference", - "exportEqualsUmd", - "exportEqualsDefaultProperty", - "exportEqualsCommonJs", - "exportEqualsAmd", - "escapedReservedCompilerNamedIdentifier", "dynamicNames", "declarationEmitWithDefaultAsComputedName2", "declarationEmitWithDefaultAsComputedName", From 2d309c6d4d0bc881b25113843f8483279cdbc88a Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 7 Sep 2023 10:38:29 +0100 Subject: [PATCH 066/224] Fix reference and import diffs. Signed-off-by: Titian Cernicova-Dragomir --- external-declarations/fixed-tests.json | 91 +++++++++++++------ .../src/code-mod/test-updater.ts | 12 ++- .../src/test-runner/test-runner-main.ts | 23 ++++- src/compiler/diagnosticMessages.json | 4 + src/compiler/transformers/declarations.ts | 60 +++++++++--- 5 files changed, 146 insertions(+), 44 deletions(-) diff --git a/external-declarations/fixed-tests.json b/external-declarations/fixed-tests.json index c2e42010d7ef1..2cefff9d561be 100644 --- a/external-declarations/fixed-tests.json +++ b/external-declarations/fixed-tests.json @@ -1,7 +1,8 @@ { "error-categories": { "with-isolated-declaration-errors": [ - 9007 // Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit + 9007, // Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit + 9008, // Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit ], "with-unreliable-errors": [ 2314, // Generic type '{0}' requires {1} type argument(s) @@ -67,6 +68,26 @@ "objectTypeWithStringNamedPropertyOfIllegalCharacters", "noUsedBeforeDefinedErrorInTypeContext", // Variable used before definition in type context "accessorBodyInTypeContext", //An implementation cannot be declared in ambient contexts. + "commonJsExportTypeDeclarationError", // Duplicate name, TS resolves to the type alias symbol, DTE resolves to import. Neither is wrong, code is wrong. + "parseAssertEntriesError", // Syntactic invalid import assertions. + "decoratorMetadataWithImportDeclarationNameCollision7", // Import does not have the accessed member. TS removes the import as unused. A DTE will keep it as it is syntactically used. + "classExtendingNonConstructor", // Not reported as isolated declaration error, but the extends clause is invalid. + "nodeModulesImportTypeModeDeclarationEmitErrors1", // Invalid import asserts + ], + "with-isolated-declaration-errors/9008": [ + "declarationEmitHasTypesRefOnNamespaceUse", + "declarationFilesWithTypeReferences2", + "typeReferenceDirectives11", + "typeReferenceDirectives12", + "typeReferenceDirectives2", + "typeReferenceDirectives8", + "typeReferenceDirectives9", + "importingExportingTypes", + // Will not actually error because of https://github.com/microsoft/TypeScript/issues/55636 + // In isolated declarations we walk the type in the return as if it was hand written in the variable + // This triggers the difference in behavior described in the issue. + "jsxNamespaceGlobalReexport", + ], "with-isolated-declaration-errors": [ "typeFromPropertyAssignment38", // Nested expando functions. Can in principle be detected, but are not yet implemented @@ -111,6 +132,7 @@ ], "possible-ts-bugs": [ // Type parameter renamed + // Reported as https://github.com/microsoft/TypeScript/issues/55653 "objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts", "objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames", "objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts", @@ -120,6 +142,7 @@ "reExportAliasMakesInstantiated" ], // Needs TS Fix + // Reported as https://github.com/microsoft/TypeScript/issues/55654 "binding-patterns": [ "declarationsAndAssignments", "excessPropertyCheckWithSpread", @@ -201,31 +224,9 @@ "declarationEmitComputedNameConstEnumAlias", "capturedParametersInInitializers1", "declarationEmitPropertyNumericStringKey", - "templateLiteralsSourceMap" // template literal is evaluated in constant value. - ], - // Investigate in reference DTE - "references-import-diffs": [ - "commonJsExportTypeDeclarationError", - "declarationEmitForModuleImportingModuleAugmentationRetainsImport", - "declarationEmitHasTypesRefOnNamespaceUse", - "declarationFilesWithTypeReferences2", - "decoratorMetadataWithImportDeclarationNameCollision7", - "jsxCallElaborationCheckNoCrash1", - "nodeModulesImportTypeModeDeclarationEmit1", - "nodeModulesImportTypeModeDeclarationEmitErrors1", - "typeReferenceDirectives1", - "typeReferenceDirectives11", - "typeReferenceDirectives12", - "typeReferenceDirectives13", - "typeReferenceDirectives2", - "typeReferenceDirectives5", - "typeReferenceDirectives6", - "typeReferenceDirectives8", - "typeReferenceDirectives9", - "typeReferenceRelatedFiles", - "jsxNamespaceGlobalReexport", - "parseAssertEntriesError", - "declarationEmitPrefersPathKindBasedOnBundling2" + "templateLiteralsSourceMap", // template literal is evaluated in constant value. + "nodeModulesImportTypeModeDeclarationEmit1", // resolution-mode in assert from type assertion is preserved + "declarationEmitPrefersPathKindBasedOnBundling2", // Import path has .. in it. A similar type written by hand would not. ], "bug-binding-pattern-inference": [ "destructuringWithLiteralInitializers", @@ -234,6 +235,44 @@ "bug-preserve-comments": [ "commentsOnObjectLiteral4" ], + "need-to-discuss": [ + // Technically the emit is correct. We just can't remove an import because we can't be sure if the symbol in the import is used. + // In this case the import is a value, and the $ is used as a type and comes from the type reference directive + "typeReferenceDirectives5", + "typeReferenceDirectives13", + // We always keep reference directives + "declarationFilesWithTypeReferences4", + "moduleResolutionWithSymlinks_preserveSymlinks", + "moduleResolutionWithSymlinks_referenceTypes", + "tripleSlashTypesReferenceWithMissingExports", + "tripleSlashTypesReferenceWithMissingExports", + "typeReferenceDirectives10", + "typeReferenceDirectives3", + "typeReferenceDirectives4", + "typeReferenceDirectives7", + "nodeModulesTripleSlashReferenceModeOverride1", + "nodeModulesTripleSlashReferenceModeOverride2", + "nodeModulesTripleSlashReferenceModeOverride3", + "nodeModulesTripleSlashReferenceModeOverride4", + "nodeModulesTripleSlashReferenceModeOverride5", + "nodeModulesTripleSlashReferenceModeOverrideModeError", + "nodeModulesTripleSlashReferenceModeOverrideOldResolutionError", + "library-reference-1", + "library-reference-10", + "library-reference-11", + "library-reference-12", + "library-reference-2", + "library-reference-3", + "library-reference-4", + "library-reference-5", + "library-reference-6", + "library-reference-7", + "library-reference-8", + "library-reference-scoped-packages", + "typingsLookup1", + "typingsLookup3", + "declarationEmitForModuleImportingModuleAugmentationRetainsImport", //Import required by augmentation issues + ] } } diff --git a/external-declarations/src/code-mod/test-updater.ts b/external-declarations/src/code-mod/test-updater.ts index abb57d2729104..4fdcad2495000 100644 --- a/external-declarations/src/code-mod/test-updater.ts +++ b/external-declarations/src/code-mod/test-updater.ts @@ -106,6 +106,10 @@ async function main() { ================= CODE MOD ERROR ============== ${result.message} ${result.stack} + +// ================== +// Original test file: ${testFile} +// ${caseData.code.split("\n").join("\n// ")} `); continue; } @@ -134,10 +138,11 @@ ${result.stack} ]); const printer = ts.createPrinter({ - onlyPrintJsDocStyle: true, + onlyPrintJsDocStyle: false, newLine: settings.newLine, target: settings.target, removeComments: false, + omitTrailingSemicolon: true, } as ts.PrinterOptions); @@ -152,6 +157,9 @@ ${result.stack} ================= CODE MOD ERROR ============== ${e.message} ${e.stack} +// ================== +// Original test file: ${testFile} +// ${caseData.code.split("\n").join("\n// ")} `; debugger; } @@ -161,4 +169,4 @@ ${e.stack} } } -main(); \ No newline at end of file +main(); diff --git a/external-declarations/src/test-runner/test-runner-main.ts b/external-declarations/src/test-runner/test-runner-main.ts index 8c887c4e8a4c1..7bd6a555b026e 100644 --- a/external-declarations/src/test-runner/test-runner-main.ts +++ b/external-declarations/src/test-runner/test-runner-main.ts @@ -71,7 +71,22 @@ async function main() { Object.entries(fileConfiguration?.["test-categories"] ?? {}).forEach(([name, tests]) => tests.forEach(t => testCategories.set(t, name))); } - const libFiles = (await fs.readdir(libFolder)).map(n => normalizePath(path.join("/.lib", n))); + async function readDirRecursive (dir: string, relativePath: string = ""): Promise { + const content = await fs.readdir(dir); + const result: string[] = []; + for (const entry of content) { + const relativeChildPath = path.join(relativePath, entry); + const fsPath = path.join(dir, entry) + const stat = await fs.stat(fsPath); + if(stat.isDirectory()) { + result.push(...await readDirRecursive(fsPath, relativeChildPath)) + } else { + result.push(relativeChildPath); + } + } + return result; + } + const libFiles = (await readDirRecursive(libFolder)).map(n => normalizePath(path.join("/.lib", n))); const testsPerShared = shardCount && Math.round(allTests.length / shardCount); const [start, end] = shard === undefined || shardCount === undefined || testsPerShared === undefined ? @@ -134,7 +149,11 @@ async function main() { ); } else { - const category = firstDefined(results.diagnostics, d => errorCategories.get(d.code)) ?? testCategories.get(testName); + const error = firstDefined(results.diagnostics, d => { + let category = errorCategories.get(d.code); + return category ? { category, code: d.code }: undefined; + }); + const category = error? path.join(error.category, error.code.toString()) : testCategories.get(testName); if(category) { file = path.join( path.dirname(file), diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index e967078c06774..489806509428f 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -6666,6 +6666,10 @@ "category": "Error", "code": 9007 }, + "Declaration emit for this file requires adding a type reference directive. Add a type reference directive to ${0} to unblock declaration emit": { + "category": "Error", + "code": 9008 + }, "JSX attributes must only be assigned a non-empty 'expression'.": { "category": "Error", "code": 17000 diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index c72412c2ac846..822cce41b6787 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -1,3 +1,4 @@ +import { appendFileSync } from "fs"; import { __String, AccessorDeclaration, @@ -299,7 +300,8 @@ 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; @@ -355,28 +357,43 @@ export function transformDeclarations(context: TransformationContext) { ); context.addDiagnostic(message); } - function recordTypeReferenceDirectivesIfNecessary(typeReferenceDirectives: readonly [specifier: string, mode: ResolutionMode][] | undefined): void { + 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) { // If it is visible via `// `, then we should just use that - // TODO: isolatedDeclarations: see about .All flag const directives = resolver.getTypeReferenceDirectivesForSymbol(symbol, SymbolFlags.All); if (length(directives)) { - return recordTypeReferenceDirectivesIfNecessary(directives); + return recordTypeReferenceDirectivesIfNecessary(directives, node); } // Otherwise we should emit a path-based reference const container = getSourceFileOfNode(node); refs.set(getOriginalNodeId(container), container); } + 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) { + const message = createDiagnosticForNode( + requestingNode, + Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit, + typeReferenceDirective[0] + ); + context.addDiagnostic(message); + } + + } + 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 @@ -418,7 +435,7 @@ export function transformDeclarations(context: TransformationContext) { 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)); + recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning), enclosingDeclaration ?? currentSourceFile); return issuedDiagnostic; } @@ -517,6 +534,7 @@ export function transformDeclarations(context: TransformationContext) { isBundledEmit = true; refs = new Map(); libs = new Map(); + existingTypeReferencesSources = node.sourceFiles; let hasNoDefaultLib = false; const bundle = factory.createBundle( map(node.sourceFiles, sourceFile => { @@ -560,7 +578,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]), undefined); collectLibs(sourceFile, libs); return sourceFile; } @@ -583,6 +601,7 @@ export function transformDeclarations(context: TransformationContext) { resultHasScopeMarker = false; enclosingDeclaration = node; currentSourceFile = node; + existingTypeReferencesSources = [node]; getSymbolAccessibilityDiagnostic = throwDiagnostic; isBundledEmit = false; resultHasExternalModuleIndicator = false; @@ -610,8 +629,18 @@ export function transformDeclarations(context: TransformationContext) { combinedStatements = setTextRange(factory.createNodeArray([...combinedStatements, createEmptyExports(factory)]), combinedStatements); } } - const typeReferences = isolatedDeclarations? node.typeReferenceDirectives: getFileReferencesForUsedTypeReferences(); - const updated = factory.updateSourceFile(node, combinedStatements, /*isDeclarationFile*/ true, references, typeReferences, node.hasNoDefaultLib, getLibReferences()); + const typeReferences = getFileReferencesForUsedTypeReferences(); + const libReferences = getLibReferences(); + + const updated = factory.updateSourceFile( + node, + combinedStatements, + /*isDeclarationFile*/ true, + references, + isolatedDeclarations? node.typeReferenceDirectives : typeReferences, + node.hasNoDefaultLib, + libReferences + ); updated.exportedModulesFromDeclarationEmit = exportedModulesFromDeclarationEmit; return updated; @@ -620,10 +649,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) { @@ -638,6 +667,9 @@ export function transformDeclarations(context: TransformationContext) { } } } + if(requestingNode) { + handleTypeReferenceError([typeName, mode], requestingNode) + } return { fileName: typeName, pos: -1, end: -1, ...(mode ? { resolutionMode: mode } : undefined) }; } @@ -665,7 +697,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]], undefined); return; } @@ -946,7 +978,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 { From 9767aa9e2b635d43b22df58ce059281282d562a9 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 7 Sep 2023 10:46:51 +0100 Subject: [PATCH 067/224] Renamed file from json to jsonc to allow for comments. Signed-off-by: Titian Cernicova-Dragomir --- external-declarations/{fixed-tests.json => fixed-tests.jsonc} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename external-declarations/{fixed-tests.json => fixed-tests.jsonc} (100%) diff --git a/external-declarations/fixed-tests.json b/external-declarations/fixed-tests.jsonc similarity index 100% rename from external-declarations/fixed-tests.json rename to external-declarations/fixed-tests.jsonc From 00d340d4a08a8b680c3a6409fb3326cd98b97cf6 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 7 Sep 2023 11:59:35 +0100 Subject: [PATCH 068/224] Fix lint error. Signed-off-by: Titian Cernicova-Dragomir --- .dprint.jsonc | 4 +++- .eslintrc.json | 2 ++ external-declarations/src/code-mod/fixer-test.ts | 3 ++- external-declarations/src/code-mod/test-updater.ts | 1 + external-declarations/src/compiler/debug.ts | 1 + external-declarations/src/compiler/emit-binder.ts | 1 - external-declarations/src/compiler/emit-resolver.ts | 4 ++-- external-declarations/src/compiler/path-utils.ts | 4 ++-- external-declarations/src/compiler/transform-file.ts | 2 +- external-declarations/src/compiler/types.ts | 2 +- .../src/test-runner/cli-arg-config.ts | 2 +- .../src/test-runner/test-runner-main.ts | 10 +++++----- .../test-runner/tsc-infrastructure/test-file-parser.ts | 6 +++--- .../src/test-runner/tsc-infrastructure/vfs.ts | 2 +- external-declarations/src/test-runner/utils.ts | 2 +- src/compiler/checker.ts | 4 ++-- src/compiler/transformers/declarations.ts | 7 +++---- 17 files changed, 31 insertions(+), 26 deletions(-) diff --git a/.dprint.jsonc b/.dprint.jsonc index 29b0dfb160929..89cebc2b89a30 100644 --- a/.dprint.jsonc +++ b/.dprint.jsonc @@ -47,7 +47,9 @@ "tests/**", "internal/**", "**/*.generated.*", - "scripts/*.d.*" + "scripts/*.d.*", + "external-declarations/tsc-tests/**", + "external-declarations/fixer-test/**" ], "plugins": [ "https://plugins.dprint.dev/typescript-0.86.1.wasm", diff --git a/.eslintrc.json b/.eslintrc.json index ff38693f00f85..926cc65aa1bad 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -24,6 +24,8 @@ "/tests/**", "/external-declarations/tests/**", "/external-declarations/build/**", + "/external-declarations/tsc-tests/**", + "/external-declarations/fixer-test/**", "/lib/**", "/src/lib/*.generated.d.ts", "/scripts/**/*.js", diff --git a/external-declarations/src/code-mod/fixer-test.ts b/external-declarations/src/code-mod/fixer-test.ts index 6a5cb48032a08..aca211be62943 100644 --- a/external-declarations/src/code-mod/fixer-test.ts +++ b/external-declarations/src/code-mod/fixer-test.ts @@ -160,6 +160,7 @@ ${result.stack} ${e.message} ${e.stack} `; + // eslint-disable-next-line no-debugger debugger; } } @@ -168,4 +169,4 @@ ${e.stack} } } -main(); \ No newline at end of file +main(); diff --git a/external-declarations/src/code-mod/test-updater.ts b/external-declarations/src/code-mod/test-updater.ts index 4fdcad2495000..894f7825c8185 100644 --- a/external-declarations/src/code-mod/test-updater.ts +++ b/external-declarations/src/code-mod/test-updater.ts @@ -161,6 +161,7 @@ ${e.stack} // Original test file: ${testFile} // ${caseData.code.split("\n").join("\n// ")} `; + // eslint-disable-next-line no-debugger debugger; } } diff --git a/external-declarations/src/compiler/debug.ts b/external-declarations/src/compiler/debug.ts index 34e4eb9d9ea01..7bbe782ec6462 100644 --- a/external-declarations/src/compiler/debug.ts +++ b/external-declarations/src/compiler/debug.ts @@ -2,6 +2,7 @@ type AnyFunction = (...a: any) => any; /** @internal */ export namespace Debug { export function fail(message?: string, stackCrawlMark?: AnyFunction): never { + // eslint-disable-next-line no-debugger debugger; const e = new Error(message ? `Debug Failure. ${message}` : "Debug Failure."); if ((Error as any).captureStackTrace) { diff --git a/external-declarations/src/compiler/emit-binder.ts b/external-declarations/src/compiler/emit-binder.ts index 89c36dd74b0c4..76667b9ef5ea3 100644 --- a/external-declarations/src/compiler/emit-binder.ts +++ b/external-declarations/src/compiler/emit-binder.ts @@ -345,7 +345,6 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa addLocalOnlyDeclaration(namedBindings.name.escapedText, namedBindings, getSymbolFlagsForNode(namedBindings)); } else { - debugger; throw new Error("Not supported"); } } diff --git a/external-declarations/src/compiler/emit-resolver.ts b/external-declarations/src/compiler/emit-resolver.ts index de983f6b5f00d..d7e95e7b883dc 100644 --- a/external-declarations/src/compiler/emit-resolver.ts +++ b/external-declarations/src/compiler/emit-resolver.ts @@ -91,7 +91,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p name = assignment.left.name; } else { - const argumentExpression = assignment.left.argumentExpression;; + const argumentExpression = assignment.left.argumentExpression; name = factory.createComputedPropertyName(argumentExpression); } const key = getMemberKey(name) @@ -200,7 +200,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p } function updateEnumValues(node: EnumDeclaration) { let prevEnumValueLinks: NodeLinks | undefined; - let isDeclaration = isAmbientDeclaration(node) && !hasSyntacticModifier(node, ModifierFlags.Const); + const isDeclaration = isAmbientDeclaration(node) && !hasSyntacticModifier(node, ModifierFlags.Const); for(const enumValue of node.members) { const links = getNodeLinks(enumValue); const value = getEnumMemberInitializerValue(enumValue); diff --git a/external-declarations/src/compiler/path-utils.ts b/external-declarations/src/compiler/path-utils.ts index 3f69872e2c38c..67862199dc201 100644 --- a/external-declarations/src/compiler/path-utils.ts +++ b/external-declarations/src/compiler/path-utils.ts @@ -833,7 +833,7 @@ function toFileNameLowerCase(x: string) { // // But to avoid having to do string building for most common cases, also ignore // a-z, 0-9, \u0131, \u00DF, \, /, ., : and space -const fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g; +const fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_. ]+/g; /** @internal */ @@ -876,4 +876,4 @@ export function getDeclarationExtension(path: string) { path.endsWith(Extension.Cjs) || path.endsWith(Extension.Cts) ? Extension.Dcts: Extension.Dts ); -} \ No newline at end of file +} diff --git a/external-declarations/src/compiler/transform-file.ts b/external-declarations/src/compiler/transform-file.ts index a754fd62f1469..57a61eada1f1c 100644 --- a/external-declarations/src/compiler/transform-file.ts +++ b/external-declarations/src/compiler/transform-file.ts @@ -2,11 +2,11 @@ import * as ts from "typescript"; import { SourceFile } from "typescript"; +import { Utils } from "../test-runner/tsc-infrastructure/compiler-run"; import { createEmitHost } from "./emit-host"; import { createEmitResolver } from "./emit-resolver"; import { tracer } from "./perf-tracer"; import { TransformationContext } from "./types"; -import { Utils } from "../test-runner/tsc-infrastructure/compiler-run"; const transformDeclarations: (context: TransformationContext) => (node: SourceFile) => SourceFile = (ts as any).transformDeclarations; diff --git a/external-declarations/src/compiler/types.ts b/external-declarations/src/compiler/types.ts index 5648fc83c4f50..2699aba729bd5 100644 --- a/external-declarations/src/compiler/types.ts +++ b/external-declarations/src/compiler/types.ts @@ -1,4 +1,4 @@ -import { AsExpression, BinaryExpression, ClassDeclaration, CompilerOptions, ComputedPropertyName, Declaration, DiagnosticWithLocation, ElementAccessExpression, EntityNameExpression, EntityNameOrEntityNameExpression, EnumDeclaration, Expression, FileReference, FunctionDeclaration, ImportDeclaration, InterfaceDeclaration, ModifierFlags, ModuleBlock, ModuleDeclaration, NamedDeclaration, Node, NonNullExpression, ParameterDeclaration, ParenthesizedExpression, PartiallyEmittedExpression, PropertyDeclaration, PropertySignature, ResolutionMode,SatisfiesExpression, SignatureDeclaration, SourceFile, StringLiteralLike, Symbol, SymbolFlags, TransformationContext as _TransformationContext, TypeAliasDeclaration, TypeAssertion, VariableDeclaration, VariableStatement, Path, EnumMember, PropertyAccessExpression, AccessorDeclaration, GetAccessorDeclaration, SetAccessorDeclaration } from "typescript"; +import { AccessorDeclaration, AsExpression, BinaryExpression, ClassDeclaration, CompilerOptions, ComputedPropertyName, Declaration, DiagnosticWithLocation, ElementAccessExpression, EntityNameExpression, EntityNameOrEntityNameExpression, EnumDeclaration, EnumMember, Expression, FileReference, FunctionDeclaration, GetAccessorDeclaration, ImportDeclaration, InterfaceDeclaration, ModifierFlags, ModuleBlock, ModuleDeclaration, NamedDeclaration, Node, NonNullExpression, ParameterDeclaration, ParenthesizedExpression, PartiallyEmittedExpression, Path, PropertyAccessExpression, PropertyDeclaration, PropertySignature, ResolutionMode,SatisfiesExpression, SetAccessorDeclaration,SignatureDeclaration, SourceFile, StringLiteralLike, Symbol, SymbolFlags, TransformationContext as _TransformationContext, TypeAliasDeclaration, TypeAssertion, VariableDeclaration, VariableStatement } from "typescript"; import { AnyImportSyntax } from "./utils"; diff --git a/external-declarations/src/test-runner/cli-arg-config.ts b/external-declarations/src/test-runner/cli-arg-config.ts index a04f399f2eada..d524b777988b0 100644 --- a/external-declarations/src/test-runner/cli-arg-config.ts +++ b/external-declarations/src/test-runner/cli-arg-config.ts @@ -1,4 +1,4 @@ -import { ArgType,parserConfiguration, parseArgs } from "../utils/cli-parser"; +import { ArgType,parseArgs,parserConfiguration } from "../utils/cli-parser"; export const testRunnerCLIConfiguration = parserConfiguration({ default: { diff --git a/external-declarations/src/test-runner/test-runner-main.ts b/external-declarations/src/test-runner/test-runner-main.ts index 7bd6a555b026e..4b975d752b76c 100644 --- a/external-declarations/src/test-runner/test-runner-main.ts +++ b/external-declarations/src/test-runner/test-runner-main.ts @@ -1,10 +1,11 @@ import "source-map-support/register"; import * as fs from "fs/promises"; +import * as JSON from 'json5'; import * as path from "path"; import * as ts from "typescript"; -import * as JSON from 'json5'; +import { firstDefined } from "../compiler/lang-utils"; import { normalizePath, removeExtension } from "../compiler/path-utils"; import { addToQueue, ensureDir, flushQueue, readAllFiles } from "../utils/fs-utils"; import { parsedCliArgs as parsedArgs } from "./cli-arg-config"; @@ -14,8 +15,7 @@ import { IO } from "./tsc-infrastructure/io"; import { CompilerSettings, TestCaseContent } from "./tsc-infrastructure/test-file-parser"; import { getFileBasedTestConfigurationDescription, getFileBasedTestConfigurations } from "./tsc-infrastructure/vary-by"; import { changeExtension } from "./tsc-infrastructure/vpath"; -import { TestCompilationResult, loadTestCase, runIsolated, runTypeScript } from "./utils"; -import { firstDefined } from "../compiler/lang-utils"; +import { loadTestCase, runIsolated, runTypeScript,TestCompilationResult } from "./utils"; const excludeFilter =/\/fourslash\//; @@ -71,7 +71,7 @@ async function main() { Object.entries(fileConfiguration?.["test-categories"] ?? {}).forEach(([name, tests]) => tests.forEach(t => testCategories.set(t, name))); } - async function readDirRecursive (dir: string, relativePath: string = ""): Promise { + async function readDirRecursive (dir: string, relativePath = ""): Promise { const content = await fs.readdir(dir); const result: string[] = []; for (const entry of content) { @@ -150,7 +150,7 @@ async function main() { } else { const error = firstDefined(results.diagnostics, d => { - let category = errorCategories.get(d.code); + const category = errorCategories.get(d.code); return category ? { category, code: d.code }: undefined; }); const category = error? path.join(error.category, error.code.toString()) : testCategories.get(testName); diff --git a/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts b/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts index fe3edb79a72e6..d5bdab0fe8d3f 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts @@ -34,8 +34,8 @@ export interface ParseConfigHost { trace?(s: string): void; } -const optionRegex = /^[\/]{2}\s*@(\w+)\s*:\s*([^\r\n]*)/gm; // multiple matches on multiple lines -const linkRegex = /^[\/]{2}\s*@link\s*:\s*([^\r\n]*)\s*->\s*([^\r\n]*)/gm; // multiple matches on multiple lines +const optionRegex = /^[/]{2}\s*@(\w+)\s*:\s*([^\r\n]*)/gm; // multiple matches on multiple lines +const linkRegex = /^[/]{2}\s*@link\s*:\s*([^\r\n]*)\s*->\s*([^\r\n]*)/gm; // multiple matches on multiple lines export function extractCompilerSettings(content: string): CompilerSettings { const opts: CompilerSettings = {}; @@ -213,4 +213,4 @@ export function makeUnitsFromTest(code: string, fileName: string, rootDir?: stri } } return { settings, testUnitData, tsConfig, tsConfigFileUnitData, symlinks, code }; -} \ No newline at end of file +} diff --git a/external-declarations/src/test-runner/tsc-infrastructure/vfs.ts b/external-declarations/src/test-runner/tsc-infrastructure/vfs.ts index 54117040dfda0..cfab4dc4f5dd5 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/vfs.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/vfs.ts @@ -1256,7 +1256,7 @@ namespace sys { export function bufferFrom(input: string, encoding?: string): Buffer { // See https://github.com/Microsoft/TypeScript/issues/25652 - return Buffer.from && (Buffer.from as Function) !== Int8Array.from + return Buffer.from && Buffer.from !== Int8Array.from ? Buffer.from(input, encoding) : new Buffer(input, encoding); } diff --git a/external-declarations/src/test-runner/utils.ts b/external-declarations/src/test-runner/utils.ts index 27d2fa13a3973..377619da1e4f1 100644 --- a/external-declarations/src/test-runner/utils.ts +++ b/external-declarations/src/test-runner/utils.ts @@ -5,12 +5,12 @@ import { ModuleKind } from "typescript"; import { getDeclarationExtension, isDeclarationFile, isTypeScriptFile } from "../compiler/path-utils"; import { transformFile } from "../compiler/transform-file"; +import { parsedCliArgs } from "./cli-arg-config"; import { compileFiles, TestFile, Utils } from "./tsc-infrastructure/compiler-run"; import { libs } from "./tsc-infrastructure/options"; import * as TestCaseParser from "./tsc-infrastructure/test-file-parser"; import { changeExtension } from "./tsc-infrastructure/vpath"; import * as vpath from "./tsc-infrastructure/vpath"; -import { parsedCliArgs } from "./cli-arg-config"; export interface TestCompilationResult { files: readonly FileContent[]; diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 30081eda0fa1c..027f8cfceeed3 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -47476,11 +47476,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if(!isEntityNameExpression(expression)) { return false; } - let symbol = getSymbolAtLocation(expression); + const symbol = getSymbolAtLocation(expression); if(!symbol) { return false; } - let declaredType = getTypeOfSymbol(symbol); + const declaredType = getTypeOfSymbol(symbol); return declaredType === type } diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 822cce41b6787..4cfce19339016 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -1,4 +1,3 @@ -import { appendFileSync } from "fs"; import { __String, AccessorDeclaration, @@ -578,7 +577,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]), undefined); + recordTypeReferenceDirectivesIfNecessary(map(sourceFile.typeReferenceDirectives, ref => [ref.fileName, ref.resolutionMode]), /*requestingNode*/ undefined); collectLibs(sourceFile, libs); return sourceFile; } @@ -697,7 +696,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]], undefined); + recordTypeReferenceDirectivesIfNecessary([[specifier, /*mode*/ undefined]], /*requestingNode*/ undefined); return; } @@ -1481,7 +1480,7 @@ export function transformDeclarations(context: TransformationContext) { }); errorFallbackNode = input; const type = isolatedDeclarations ? - localInferenceResolver?.fromInitializer(input, undefined, currentSourceFile) : + localInferenceResolver?.fromInitializer(input, /*type*/ undefined, currentSourceFile) : resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker); const varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, type, /*initializer*/ undefined); errorFallbackNode = undefined; From faa3cf11a3cc319d781aa6c538f9c2b57bca5150 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 8 Sep 2023 10:52:46 +0100 Subject: [PATCH 069/224] Categorized ts that sill have 9007 errors even after having been modified with the codemod Signed-off-by: Titian Cernicova-Dragomir --- external-declarations/fixed-tests.jsonc | 163 ++++++++++++++++++ .../src/code-mod/code-transform.ts | 2 +- .../src/code-mod/test-updater.ts | 3 +- .../src/test-runner/test-runner-main.ts | 15 +- 4 files changed, 176 insertions(+), 7 deletions(-) diff --git a/external-declarations/fixed-tests.jsonc b/external-declarations/fixed-tests.jsonc index 2cefff9d561be..9cd06cda7cddd 100644 --- a/external-declarations/fixed-tests.jsonc +++ b/external-declarations/fixed-tests.jsonc @@ -3,6 +3,7 @@ "with-isolated-declaration-errors": [ 9007, // Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit 9008, // Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit + 9009, // Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function ], "with-unreliable-errors": [ 2314, // Generic type '{0}' requires {1} type argument(s) @@ -12,6 +13,164 @@ ] }, "test-categories": { + "enum-issues": [ + "collisionCodeGenEnumWithEnumMemberConflict", + "constEnumDeclarations", + "constEnumErrors", + "constEnums", + "constantEnumAssert", + "declFileEnums", + "ambientEnum1", + "enumAssignmentCompat5", + "enumBasics2", + "enumBasics3", + "enumLiteralAssignableToEnumInsideUnion", + "enumNumbering1", + "enumPropertyAccessBeforeInitalisation", + "enumWithComputedMember", + "enumWithExport", + "enumWithParenthesizedInitializer1", + "enumWithoutInitializerAfterComputedMember", + "exactSpellingSuggestion", + "forwardRefInEnum", + "initializersInAmbientEnums", + "isolatedModulesGlobalNamespacesAndEnums", + "mergedDeclarations2", + "mergedEnumDeclarationCodeGen", + "preserveConstEnums", + "underscoreEscapedNameInEnum", + "ambientEnumDeclaration1", + "constEnum1", + "constEnum2", + "constEnumPropertyAccess1", + "constEnumPropertyAccess2", + "constEnumPropertyAccess3", + "enumBasics", + "enumClassification", + "enumConstantMemberWithString", + "enumConstantMemberWithStringEmitDeclaration", + "enumConstantMemberWithTemplateLiterals", + "enumConstantMemberWithTemplateLiteralsEmitDeclaration", + "enumConstantMembers", + "enumErrors", + "enumExportMergingES6", + "enumMerging", + "enumMergingErrors", + "parserRealSource10", + "parserRealSource14", + "parserRealSource2", + "parserRealSource3", + "parserEnum1", + "parserEnum2", + "parserEnumDeclaration6", + "templateLiteralTypes4", + "numericEnumMappedType", + "equalityWithEnumTypes", + "computedEnumTypeWidening", + "strictModeOctalLiterals", + "verbatimModuleSyntaxConstEnumUsage", + "ambientConstLiterals", + ], + "computed-enum-values-non-const": [ + // Some enum member values will need to be inlined when we can't compute them + "methodContainingLocalFunction", + "mixedTypeEnumComparison" + ], + "expando-not-detected": [ + "declarationEmitExpandoWithGenericConstraint", + "expandoFunctionExpressionsWithDynamicNames", + "propertyAssignmentUseParentType1", + ], + "code-fixer-issues" : [ + // Only one fix is applied per line, fix need to be applied to both another issue (params, default exports) and return type + "ambiguousGenericAssertion1", + "arrowFunctionWithObjectLiteralBody1", + "arrowFunctionWithObjectLiteralBody2", + "arrowFunctionWithObjectLiteralBody3", + "arrowFunctionWithObjectLiteralBody4", + "commentsAfterFunctionExpression1", + "fatarrowfunctions", + "genericTypeAssertions3", + "taggedTemplateStringsWithCurriedFunction", + "unusedParametersWithUnderscore", + "arrowFunctionWithParameterNameAsync_es2017", + "arrowFunctionWithParameterNameAsync_es5", + "arrowFunctionWithParameterNameAsync_es6", + "importCallExpressionInExportEqualsAMD", + "importCallExpressionInExportEqualsCJS", + "importCallExpressionInExportEqualsUMD", + "declarationEmitMixinPrivateProtected", + "disallowLineTerminatorBeforeArrow", + "emitArrowFunctionAsIs", + "emitArrowFunctionAsIsES6", + "emitArrowFunctionsAsIs", + "emitArrowFunctionsAsIsES6", + "declarationEmitObjectAssignedDefaultExport", + "templateStringInArrowFunction", + "templateStringInArrowFunctionES6", + "exportAssignDottedName", + "exportAssignNonIdentifier", + // return type missing + "arrayFakeFlatNoCrashInferenceDeclarations", + "mixingApparentTypeOverrides", + "noCrashOnMixin", + "overrideBaseIntersectionMethod", + "unusedFunctionsinNamespaces6", + "mixinAbstractClasses", + "mixinAbstractClassesReturnTypeInference", + "mixinAccessModifiers", + "override1", + "override19", + "declarationFiles", + // Crash on export = in language service. Test not fixed + "commonJsImportClassExpression", + "constEnumNamespaceReferenceCausesNoImport2", + "declarationEmitInferredDefaultExportType2", + "exportAssignmentWithoutIdentifier1", + "exportEqualsProperty", + "exportEqualsProperty2", + "namedEvaluation", + "thisInInvalidContextsExternalModule", + "reexportClassDefinition", + "esDecorators-classExpression-namedEvaluation.9", + // Members return types are not fixed + "declarationEmitClassMemberWithComputedPropertyName", + "declarationEmitLocalClassDeclarationMixin", + "thisInPropertyBoundDeclarations", + "thisIndexOnExistingReadonlyFieldIsNotNever", + // Constant is not fixed + "declarationEmitCommonJsModuleReferencedType", + // Mixin not fixed. Not sure we can fix them + "mixinPrivateAndProtected", + "doubleMixinConditionalTypeBaseClassWorks", + "emitClassExpressionInDeclarationFile2", + // any, non initialized variable is not fixed + "moduleAugmentationDisallowedExtensions", + "moduleAugmentationNoNewNames", + // ? + "parserEqualsGreaterThanAfterFunction1", + "declarationEmitPrivatePromiseLikeInterface", + // Parser errors + "parserSkippedTokens16", + // Symbol const not annotated + "declarationEmitPrivateNameCausesError" + ], + "not-fixed-with-unreliable-errors": [ + "classMemberWithMissingIdentifier", + "classMemberWithMissingIdentifier2", + "commonMissingSemicolons", + "reservedWords3", + "negateOperator", + "negateOperatorInvalidOperations", + "destructuringObjectBindingPatternAndAssignment3", + "objectBindingPatternKeywordIdentifiers01", + "objectBindingPatternKeywordIdentifiers02", + "objectBindingPatternKeywordIdentifiers03", + "objectBindingPatternKeywordIdentifiers04", + "arrowFunctionExpressions", + "declarationEmitDestructuringParameterProperties", + "destructuringParameterProperties4", + ], "with-unreliable-errors": [ "thisTypeErrors", // Assertion to this in static context produces this in DTE and any in TSC "parseInvalidNonNullableTypes", // Prefix ! operator @@ -73,6 +232,9 @@ "decoratorMetadataWithImportDeclarationNameCollision7", // Import does not have the accessed member. TS removes the import as unused. A DTE will keep it as it is syntactically used. "classExtendingNonConstructor", // Not reported as isolated declaration error, but the extends clause is invalid. "nodeModulesImportTypeModeDeclarationEmitErrors1", // Invalid import asserts + "this_inside-enum-should-not-be-allowed", // strange things in enum initializers + "ambientErrors", // Has errors from ambient declarations on enums + "arrowFunctionContexts", // Function assigned to enum member ], "with-isolated-declaration-errors/9008": [ "declarationEmitHasTypesRefOnNamespaceUse", @@ -227,6 +389,7 @@ "templateLiteralsSourceMap", // template literal is evaluated in constant value. "nodeModulesImportTypeModeDeclarationEmit1", // resolution-mode in assert from type assertion is preserved "declarationEmitPrefersPathKindBasedOnBundling2", // Import path has .. in it. A similar type written by hand would not. + "computedPropertiesNarrowed", ], "bug-binding-pattern-inference": [ "destructuringWithLiteralInitializers", diff --git a/external-declarations/src/code-mod/code-transform.ts b/external-declarations/src/code-mod/code-transform.ts index 8da7af30fab01..919fb18c48877 100644 --- a/external-declarations/src/code-mod/code-transform.ts +++ b/external-declarations/src/code-mod/code-transform.ts @@ -54,7 +54,7 @@ function findNearestParentWithTypeAnnotation(node: ts.Node): ts.Node | undefined export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: ts.Program, moduleResolutionHost?: ts.ModuleResolutionHost) { const typeChecker = program.getTypeChecker(); const nodesToFix = new Map(program.getDeclarationDiagnostics(sourceFile). - filter((diag) => diag.code === 9007). + filter((diag) => diag.code === 9007 || diag.code === 9009). map((diag) => { const nodeWithDiag = (ts as any).getTokenAtPosition(sourceFile, diag.start)! as ts.Node; return [findNearestParentWithTypeAnnotation(nodeWithDiag), nodeWithDiag]; diff --git a/external-declarations/src/code-mod/test-updater.ts b/external-declarations/src/code-mod/test-updater.ts index 894f7825c8185..71c43d86686a4 100644 --- a/external-declarations/src/code-mod/test-updater.ts +++ b/external-declarations/src/code-mod/test-updater.ts @@ -102,7 +102,8 @@ async function main() { } })(); if(result instanceof Error) { - fs.writeFile(updatedTestFileName, ` + await ensureDir(fsPath.dirname(updatedTestFileName)); + await fs.writeFile(updatedTestFileName, ` ================= CODE MOD ERROR ============== ${result.message} ${result.stack} diff --git a/external-declarations/src/test-runner/test-runner-main.ts b/external-declarations/src/test-runner/test-runner-main.ts index 4b975d752b76c..97656540e6e09 100644 --- a/external-declarations/src/test-runner/test-runner-main.ts +++ b/external-declarations/src/test-runner/test-runner-main.ts @@ -149,11 +149,16 @@ async function main() { ); } else { - const error = firstDefined(results.diagnostics, d => { - const category = errorCategories.get(d.code); - return category ? { category, code: d.code }: undefined; - }); - const category = error? path.join(error.category, error.code.toString()) : testCategories.get(testName); + let category = testCategories.get(testName); + if(!category) { + const error = firstDefined(results.diagnostics, d => { + const category = errorCategories.get(d.code); + return category ? { category, code: d.code }: undefined; + }); + if(error) { + category = path.join(error.category, error.code.toString()); + } + } if(category) { file = path.join( path.dirname(file), From e772096752490292f157d90bbfef1b932adbcdfe Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 8 Sep 2023 10:55:56 +0100 Subject: [PATCH 070/224] Added specific error for expando functions. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/checker.ts | 32 +++++++++++++++++-- src/compiler/diagnosticMessages.json | 4 +++ src/compiler/transformers/declarations.ts | 5 ++- .../fixMissingTypeAnnotationOnExports.ts | 1 + 4 files changed, 39 insertions(+), 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 027f8cfceeed3..989361fa80742 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -454,6 +454,7 @@ import { isAssignmentTarget, isAutoAccessorPropertyDeclaration, isAwaitExpression, + isBigIntLiteral, isBinaryExpression, isBindableObjectDefinePropertyCall, isBindableStaticElementAccessExpression, @@ -708,6 +709,7 @@ import { isSuperCall, isSuperProperty, isTaggedTemplateExpression, + isTemplateExpression, isTemplateSpan, isThisContainerOrFunctionBlock, isThisIdentifier, @@ -47458,21 +47460,46 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return undefined; } + function isPrimitiveLiteralValue(node: Expression): boolean { + if(isNumericLiteral(node) || isBigIntLiteral(node) || isStringLiteralLike(node)) return true; + + if(node.kind === SyntaxKind.TrueKeyword || node.kind === SyntaxKind.FalseKeyword) return true; + + if(isPrefixUnaryExpression(node)) { + const operand = node.operand; + if(node.operator === SyntaxKind.MinusToken) { + return isNumericLiteral(operand) || isBigIntLiteral(operand); + } + if(node.operator === SyntaxKind.PlusToken) { + return isNumericLiteral(operand); + } + } + if(isTemplateExpression(node)) { + return node.templateSpans.every(t => isPrimitiveLiteralValue(t.expression)); + } + return false; + } + function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration): boolean { if (isDeclarationReadonly(node) || (isVariableDeclaration(node) && isVarConstLike(node)) || isEnumMember(node)) { + if (compilerOptions.isolatedDeclarations) { + return !!node.initializer && isPrimitiveLiteralValue(node.initializer); + } return isFreshLiteralType(getTypeOfSymbol(getSymbolOfDeclaration(node))); } return false; } function isLiteralComputedName(node: ComputedPropertyName) { const expression = node.expression; - const type = getTypeOfExpression(expression); - if(isFreshLiteralType(type)) { + if(isPrimitiveLiteralValue(expression)) { 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; } @@ -47480,6 +47507,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if(!symbol) { return false; } + // Ensure not type narrowing const declaredType = getTypeOfSymbol(symbol); return declaredType === type } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 489806509428f..33008f5bccfad 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -6670,6 +6670,10 @@ "category": "Error", "code": 9008 }, + "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": 9009 + }, "JSX attributes must only be assigned a non-empty 'expression'.": { "category": "Error", "code": 17000 diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 4cfce19339016..b973e465fa394 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -1603,7 +1603,10 @@ export function transformDeclarations(context: TransformationContext) { )); if (clean && resolver.isExpandoFunction(input) && shouldEmitFunctionProperties(input)) { if(isolatedDeclarations) { - reportIsolatedDeclarationError(input); + context.addDiagnostic(createDiagnosticForNode( + input, + 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; } const props = resolver.getPropertiesOfContainerFunction(input); diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 56bf5c5e445af..37cdcbf950b2f 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -49,6 +49,7 @@ import { const fixId = "fixMissingTypeAnnotationOnExports"; const errorCodes = [ Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.code, + Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function.code, ]; const canHaveExplicitTypeAnnotation = new Set([ SyntaxKind.GetAccessor, From dde8cb6578583a3ac087406bc67a85c24ce77c33 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 13 Sep 2023 16:42:45 +0100 Subject: [PATCH 071/224] Compute enum values. Forbid inference from parameters with binding patterns. Signed-off-by: Titian Cernicova-Dragomir --- external-declarations/fixed-tests.jsonc | 62 +--- .../src/compiler/emit-binder.ts | 79 ++--- .../src/compiler/emit-resolver.ts | 122 +++++--- .../src/compiler/evaluator.ts | 96 +++++++ external-declarations/src/compiler/utils.ts | 18 +- .../src/test-runner/cli-arg-config.ts | 1 + .../src/test-runner/test-runner-main.ts | 2 +- .../declarations/localInferenceResolver.ts | 271 ++++++++++++------ 8 files changed, 425 insertions(+), 226 deletions(-) create mode 100644 external-declarations/src/compiler/evaluator.ts diff --git a/external-declarations/fixed-tests.jsonc b/external-declarations/fixed-tests.jsonc index 9cd06cda7cddd..6b01a74c61f3d 100644 --- a/external-declarations/fixed-tests.jsonc +++ b/external-declarations/fixed-tests.jsonc @@ -14,72 +14,20 @@ }, "test-categories": { "enum-issues": [ - "collisionCodeGenEnumWithEnumMemberConflict", - "constEnumDeclarations", + "ambientConstLiterals", "constEnumErrors", "constEnums", - "constantEnumAssert", - "declFileEnums", - "ambientEnum1", - "enumAssignmentCompat5", "enumBasics2", "enumBasics3", - "enumLiteralAssignableToEnumInsideUnion", - "enumNumbering1", - "enumPropertyAccessBeforeInitalisation", - "enumWithComputedMember", - "enumWithExport", - "enumWithParenthesizedInitializer1", - "enumWithoutInitializerAfterComputedMember", - "exactSpellingSuggestion", "forwardRefInEnum", - "initializersInAmbientEnums", "isolatedModulesGlobalNamespacesAndEnums", "mergedDeclarations2", "mergedEnumDeclarationCodeGen", - "preserveConstEnums", - "underscoreEscapedNameInEnum", - "ambientEnumDeclaration1", - "constEnum1", - "constEnum2", - "constEnumPropertyAccess1", - "constEnumPropertyAccess2", - "constEnumPropertyAccess3", - "enumBasics", - "enumClassification", - "enumConstantMemberWithString", - "enumConstantMemberWithStringEmitDeclaration", - "enumConstantMemberWithTemplateLiterals", - "enumConstantMemberWithTemplateLiteralsEmitDeclaration", "enumConstantMembers", "enumErrors", "enumExportMergingES6", - "enumMerging", - "enumMergingErrors", - "parserRealSource10", - "parserRealSource14", - "parserRealSource2", - "parserRealSource3", - "parserEnum1", - "parserEnum2", - "parserEnumDeclaration6", - "templateLiteralTypes4", - "numericEnumMappedType", - "equalityWithEnumTypes", - "computedEnumTypeWidening", - "strictModeOctalLiterals", "verbatimModuleSyntaxConstEnumUsage", - "ambientConstLiterals", - ], - "computed-enum-values-non-const": [ - // Some enum member values will need to be inlined when we can't compute them - "methodContainingLocalFunction", - "mixedTypeEnumComparison" - ], - "expando-not-detected": [ - "declarationEmitExpandoWithGenericConstraint", - "expandoFunctionExpressionsWithDynamicNames", - "propertyAssignmentUseParentType1", + "templateLiteralTypes4", ], "code-fixer-issues" : [ // Only one fix is applied per line, fix need to be applied to both another issue (params, default exports) and return type @@ -235,6 +183,7 @@ "this_inside-enum-should-not-be-allowed", // strange things in enum initializers "ambientErrors", // Has errors from ambient declarations on enums "arrowFunctionContexts", // Function assigned to enum member + "wellKnownSymbolExpando", // Expando function with well known symbols error in TS, but generate teh expando function namepsace, DTE does not. ], "with-isolated-declaration-errors/9008": [ "declarationEmitHasTypesRefOnNamespaceUse", @@ -305,6 +254,7 @@ ], // Needs TS Fix // Reported as https://github.com/microsoft/TypeScript/issues/55654 + // Fix available "binding-patterns": [ "declarationsAndAssignments", "excessPropertyCheckWithSpread", @@ -391,10 +341,6 @@ "declarationEmitPrefersPathKindBasedOnBundling2", // Import path has .. in it. A similar type written by hand would not. "computedPropertiesNarrowed", ], - "bug-binding-pattern-inference": [ - "destructuringWithLiteralInitializers", - "parameterInitializersBackwardReferencing" - ], "bug-preserve-comments": [ "commentsOnObjectLiteral4" ], diff --git a/external-declarations/src/compiler/emit-binder.ts b/external-declarations/src/compiler/emit-binder.ts index 76667b9ef5ea3..f49f47fdae8c7 100644 --- a/external-declarations/src/compiler/emit-binder.ts +++ b/external-declarations/src/compiler/emit-binder.ts @@ -1,8 +1,8 @@ -import { __String, ArrayBindingElement, BindingPattern, ClassDeclaration, ClassElement, CompilerOptions, EnumDeclaration, ExportDeclaration, ExportSpecifier, Extension, findAncestor, forEachChild, FunctionDeclaration, Identifier, InterfaceDeclaration, isBlock, isClassDeclaration, isConditionalTypeNode, isConstructorDeclaration, isConstructSignatureDeclaration, isEnumDeclaration, isExportAssignment, isExportDeclaration, isExternalModuleReference, isFunctionDeclaration, isIdentifier, isImportDeclaration, isImportEqualsDeclaration, isInferTypeNode, isInterfaceDeclaration, isJsxFragment, isJsxOpeningLikeElement, isMappedTypeNode, isMetaProperty, isModuleBlock, isModuleDeclaration, isNamedExports, isSourceFile, isTypeAliasDeclaration, isVariableDeclaration,isVariableStatement, JsxEmit, ModifierFlags, ModuleDeclaration, ModuleDetectionKind, ModuleKind, ModuleResolutionKind, Node, NodeArray, ParameterDeclaration, ResolutionMode, SourceFile, Symbol, SymbolFlags, SyntaxKind, TypeElement, TypeParameterDeclaration, VariableDeclaration } from "typescript"; +import { __String, ArrayBindingElement, BindingPattern, ClassDeclaration, ClassElement, CompilerOptions, EnumDeclaration, EnumMember, ExportDeclaration, ExportSpecifier, Extension, findAncestor, forEachChild, FunctionDeclaration, Identifier, InterfaceDeclaration, isBlock, isClassDeclaration, isConditionalTypeNode, isConstructorDeclaration, isConstructSignatureDeclaration, isEnumDeclaration, isExportAssignment, isExportDeclaration, isExternalModuleReference, isFunctionDeclaration, isIdentifier, isImportDeclaration, isImportEqualsDeclaration, isInferTypeNode, isInterfaceDeclaration, isJsxFragment, isJsxOpeningLikeElement, isMappedTypeNode, isMetaProperty, isModuleBlock, isModuleDeclaration, isNamedExports, isSourceFile, isTypeAliasDeclaration, isVariableDeclaration,isVariableStatement, JsxEmit, ModifierFlags, ModuleDeclaration, ModuleDetectionKind, ModuleKind, ModuleResolutionKind, Node, NodeArray, ParameterDeclaration, ResolutionMode, SourceFile, Symbol, SymbolFlags, SyntaxKind, TypeElement, TypeParameterDeclaration, VariableDeclaration } from "typescript"; import { Debug } from "./debug"; import { forEach } from "./lang-utils"; -import { getEmitModuleKind, getEmitModuleResolutionKind, getMemberKey, getNodeId, hasSyntacticModifier, isBindingPattern, isEnumConst, nodeHasName } from "./utils"; +import { getEmitModuleKind, getEmitModuleResolutionKind, getMemberKey, getNodeId, hasSyntacticModifier, isBindingPattern, isEnumConst, MemberKey, nodeHasName } from "./utils"; export interface NodeLinks { @@ -13,9 +13,9 @@ export interface NodeLinks { enumValue?: string | number | undefined; } -type SymbolTable = Map<__String, BasicSymbol>; +type SymbolTable = Map; export interface BasicSymbol { - name?: __String + name?: MemberKey; exportSymbol?: BasicSymbol; declarations: Node[]; signatureDeclarations?: Node[]; @@ -107,13 +107,17 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa tryGetNodeLinks, getNodeLinks, resolveName, - getMemberName, + resolveMemberKey, + getMemberNameFromElement, }; function resolveName(enclosingDeclaration: Node, escapedText: __String, meaning: SymbolFlags) { + return resolveMemberKey(enclosingDeclaration, getMemberKey(escapedText as string), meaning); + } + function resolveMemberKey(enclosingDeclaration: Node, key: MemberKey, meaning: SymbolFlags) { function getSymbolFromScope(table: SymbolTable | undefined) { - const symbol = table?.get(escapedText); + const symbol = table?.get(key); if(symbol && ((symbol.flags & meaning) || (symbol.flags & SymbolFlags.Alias))) { return symbol; } @@ -171,7 +175,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa flags: 0, }; } - function getSymbol(table: SymbolTable, name: __String) { + function getSymbol(table: SymbolTable, name: MemberKey) { let symbol = table.get(name); if(!symbol) { symbol = newSymbol(); @@ -180,7 +184,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa } return symbol; } - function addLocalAndExportDeclaration(name: __String | undefined, node: Node, [flags, forbiddenFlags]: SymbolRegistrationFlags, isExport: boolean) { + function addLocalAndExportDeclaration(name: MemberKey | undefined, node: Node, [flags, forbiddenFlags]: SymbolRegistrationFlags, isExport: boolean) { if(isExport) { const exportKind = flags & SymbolFlags.Value ? SymbolFlags.ExportValue : 0; const localSymbol = addLocalOnlyDeclaration(name, node, [exportKind, forbiddenFlags]); @@ -192,17 +196,17 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa return addLocalOnlyDeclaration(name, node, [flags, forbiddenFlags]); } } - function addExportOnlyDeclaration(name: __String | undefined, node: Node, flagsAndForbiddenFlags: SymbolRegistrationFlags) { + function addExportOnlyDeclaration(name: MemberKey | undefined, node: Node, flagsAndForbiddenFlags: SymbolRegistrationFlags) { if(!currentExportsSymbolTable) { throw new Error("Exporting symbol from a context that does not support it"); } return addDeclaration(currentExportsSymbolTable, name, node, flagsAndForbiddenFlags); } - function addLocalOnlyDeclaration(name: __String | undefined, node: Node, flagsAndForbiddenFlags: SymbolRegistrationFlags) { + function addLocalOnlyDeclaration(name: MemberKey | undefined, node: Node, flagsAndForbiddenFlags: SymbolRegistrationFlags) { return addDeclaration(currentLocalSymbolTable, name, node, flagsAndForbiddenFlags); } - function addDeclaration(table: SymbolTable, name: __String | undefined, node: Node, [flags, forbiddenFlags]: SymbolRegistrationFlags) { + function addDeclaration(table: SymbolTable, name: MemberKey | undefined, node: Node, [flags, forbiddenFlags]: SymbolRegistrationFlags) { let symbol = name !== undefined ? getSymbol(table, name) : newSymbol(); // Symbols don't merge, create new one if(forbiddenFlags & symbol.flags) { @@ -234,10 +238,10 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa function getStatementName(s: InterfaceDeclaration | ClassDeclaration | FunctionDeclaration) { if(hasSyntacticModifier(s, ModifierFlags.Export) && hasSyntacticModifier(s, ModifierFlags.Default)) { - return "@default" as __String; + return "@default" as MemberKey; } if(s.name) { - return s.name.escapedText; + return getMemberKey(s.name); } } // We need to bind locals for types (conditional and mapped typed define parameters in their definitions) @@ -286,13 +290,13 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa bindWorker(node); } function bindTypeParameters(typeParameters: TypeParameterDeclaration[] | NodeArray | undefined) { - typeParameters?.forEach(t => addLocalOnlyDeclaration(t.name.escapedText, t, getSymbolFlagsForNode(t))); + typeParameters?.forEach(t => addLocalOnlyDeclaration(getMemberKey(t.name), t, getSymbolFlagsForNode(t))); } function bindVariable(d: VariableDeclaration | ParameterDeclaration) { bindTypeExpressions(d.type); const isExported = isVariableDeclaration(d) && hasSyntacticModifier(d.parent.parent, ModifierFlags.Export); if(isIdentifier(d.name)) { - addLocalAndExportDeclaration(d.name.escapedText, d, getSymbolFlagsForNode(d), isExported); + addLocalAndExportDeclaration(getMemberKey(d.name), d, getSymbolFlagsForNode(d), isExported); } else if(isBindingPattern(d.name)) { function bindBindingPattern(pattern: BindingPattern) { @@ -302,7 +306,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa if(!b.name) return; if(isIdentifier(b.name)) { - addLocalAndExportDeclaration(b.name.escapedText, b, getSymbolFlagsForNode(b), isExported); + addLocalAndExportDeclaration(getMemberKey(b.name), b, getSymbolFlagsForNode(b), isExported); } else { bindBindingPattern(b.name); @@ -325,24 +329,24 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa statements.forEach(statement => { const isExported = hasSyntacticModifier(statement, ModifierFlags.Export); if(isImportEqualsDeclaration(statement)) { - addLocalOnlyDeclaration(statement.name.escapedText, statement, getSymbolFlagsForNode(statement)); + addLocalOnlyDeclaration(getMemberKey(statement.name), statement, getSymbolFlagsForNode(statement)); } if(isImportDeclaration(statement)) { if(!statement.importClause) { return; } if(statement.importClause.name) { - addLocalOnlyDeclaration(statement.importClause.name.escapedText, statement.importClause, getSymbolFlagsForNode(statement.importClause)); + addLocalOnlyDeclaration(getMemberKey(statement.importClause.name), statement.importClause, getSymbolFlagsForNode(statement.importClause)); } if(statement.importClause.namedBindings) { const namedBindings = statement.importClause.namedBindings; if(namedBindings.kind === SyntaxKind.NamedImports) { namedBindings.elements.forEach(v => { - addLocalOnlyDeclaration(v.name.escapedText, v, getSymbolFlagsForNode(v)); + addLocalOnlyDeclaration(getMemberKey(v.name), v, getSymbolFlagsForNode(v)); }); } else if(namedBindings.kind === SyntaxKind.NamespaceImport) { - addLocalOnlyDeclaration(namedBindings.name.escapedText, namedBindings, getSymbolFlagsForNode(namedBindings)); + addLocalOnlyDeclaration(getMemberKey(namedBindings.name), namedBindings, getSymbolFlagsForNode(namedBindings)); } else { throw new Error("Not supported"); @@ -363,7 +367,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa addLocalAndExportDeclaration(getStatementName(statement), statement, getSymbolFlagsForNode(statement), isExported); } if(isTypeAliasDeclaration(statement)) { - addLocalAndExportDeclaration(statement.name.escapedText, statement, getSymbolFlagsForNode(statement), isExported); + addLocalAndExportDeclaration(getMemberKey(statement.name), statement, getSymbolFlagsForNode(statement), isExported); withScope(statement, /*exports*/ undefined, () => { bindTypeParameters(statement.typeParameters); }); @@ -390,7 +394,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa withScope(statement, /*exports*/ undefined, () => { elements.forEach(e => { const [flags, forbiddenFlags] = getSymbolFlagsForNode(e); - addLocalOnlyDeclaration((e.propertyName ?? e.name).escapedText, e, [flags | SymbolFlags.ExportValue , forbiddenFlags]); + addLocalOnlyDeclaration(getMemberKey(e.propertyName ?? e.name), e, [flags | SymbolFlags.ExportValue , forbiddenFlags]); }); }); } @@ -405,17 +409,18 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa }); } } - // if(isEnumMember(statement)) { - // addDeclaration(getNameOfDeclaration(statement.name), statement, getElementFlags(statement.kind)); - // } if(isEnumDeclaration(statement)) { - addLocalAndExportDeclaration(statement.name.escapedText, statement, getSymbolFlagsForNode(statement), isExported); - // withScope(statement, () => bindContainer(statement.members)) + addLocalAndExportDeclaration(getMemberKey(statement.name), statement, getSymbolFlagsForNode(statement), isExported); + withScope(statement, /*exports*/ undefined, () => { + statement.members.forEach(m => { + addLocalOnlyDeclaration(getMemberNameFromElement(m), m, getSymbolFlagsForNode(m)) + }); + }) } if(isModuleDeclaration(statement)) { function bindModuleDeclaration(moduleDeclaration: ModuleDeclaration) { - const name = isIdentifier(moduleDeclaration.name) ? moduleDeclaration.name.escapedText: undefined; - const moduleSymbol = addLocalAndExportDeclaration(name, moduleDeclaration, getSymbolFlagsForNode(moduleDeclaration), isExported); + const name = isIdentifier(moduleDeclaration.name) ? moduleDeclaration.name: undefined; + const moduleSymbol = addLocalAndExportDeclaration(getMemberKey(name), moduleDeclaration, getSymbolFlagsForNode(moduleDeclaration), isExported); moduleSymbol.exports ??= new Map(); withScope(moduleDeclaration, moduleSymbol.exports, () => { if(moduleDeclaration.body) { @@ -437,13 +442,13 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa } if(isInterfaceDeclaration(statement)) { const interfaceDeclaration = statement; - const interfaceSymbol = addLocalAndExportDeclaration(interfaceDeclaration.name.escapedText, interfaceDeclaration, getSymbolFlagsForNode(interfaceDeclaration), isExported); + const interfaceSymbol = addLocalAndExportDeclaration(getMemberKey(interfaceDeclaration.name), interfaceDeclaration, getSymbolFlagsForNode(interfaceDeclaration), isExported); withScope(interfaceDeclaration, /*exports*/ undefined, () =>{ bindTypeParameters(interfaceDeclaration.typeParameters); }); withMembers(interfaceSymbol, () => { interfaceDeclaration.members.forEach(m => { - addLocalOnlyDeclaration(getMemberName(m), m, getElementFlagsOrThrow(m)); + addLocalOnlyDeclaration(getMemberNameFromElement(m), m, getElementFlagsOrThrow(m)); bindTypeExpressions(m); }); }); @@ -451,7 +456,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa if(isClassDeclaration(statement)) { const classDeclaration = statement; - const classSymbol = addLocalAndExportDeclaration(classDeclaration.name?.escapedText, classDeclaration, getSymbolFlagsForNode(classDeclaration), isExported); + const classSymbol = addLocalAndExportDeclaration(getMemberKey(classDeclaration.name), classDeclaration, getSymbolFlagsForNode(classDeclaration), isExported); withScope(classDeclaration, /*exports*/ undefined, () =>{ bindTypeParameters(classDeclaration.typeParameters); }); @@ -460,7 +465,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa if(hasSyntacticModifier(m, ModifierFlags.Static)) return; if(m.kind === SyntaxKind.SemicolonClassElement || m.kind === SyntaxKind.ClassStaticBlockDeclaration) return; - addLocalOnlyDeclaration(getMemberName(m), m, getElementFlagsOrThrow(m)); + addLocalOnlyDeclaration(getMemberNameFromElement(m), m, getElementFlagsOrThrow(m)); bindTypeExpressions(m); }); }); @@ -470,7 +475,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa if(m.kind === SyntaxKind.SemicolonClassElement || m.kind === SyntaxKind.ClassStaticBlockDeclaration) return; - addLocalOnlyDeclaration(getMemberName(m), m, getElementFlagsOrThrow(m)); + addLocalOnlyDeclaration(getMemberNameFromElement(m), m, getElementFlagsOrThrow(m)); bindTypeExpressions(m); }); }, "exports"); @@ -675,11 +680,11 @@ function getModuleInstanceStateForAliasTarget(specifier: ExportSpecifier, visite /** * Gets the symbolic name for a member from its type. */ -function getMemberName(element: TypeElement | ClassElement): __String | undefined{ +function getMemberNameFromElement(element: TypeElement | ClassElement | EnumMember): MemberKey | undefined{ if (isConstructorDeclaration(element) || isConstructSignatureDeclaration(element)) { - return "@constructor" as __String; + return "@constructor" as MemberKey; } const name = element.name; if(!name) return undefined; - return getMemberKey(name) as __String; + return getMemberKey(name) as MemberKey; } diff --git a/external-declarations/src/compiler/emit-resolver.ts b/external-declarations/src/compiler/emit-resolver.ts index d7e95e7b883dc..f15ccd0b15044 100644 --- a/external-declarations/src/compiler/emit-resolver.ts +++ b/external-declarations/src/compiler/emit-resolver.ts @@ -1,17 +1,61 @@ -import { __String, AccessorDeclaration, BindingPattern, CompilerOptions, ComputedPropertyName, Declaration, DeclarationName, ElementAccessExpression, EntityNameOrEntityNameExpression, EnumDeclaration, EnumMember, Expression, factory, findAncestor, FunctionDeclaration, FunctionLikeDeclaration, getCombinedModifierFlags, getCombinedNodeFlags, getNameOfDeclaration, getParseTreeNode, Identifier, ImportClause, ImportEqualsDeclaration, ImportSpecifier, isArrowFunction, isBigIntLiteral, isBinaryExpression, isBindingElement, isElementAccessExpression, isEnumMember, isExpressionStatement, isFunctionDeclaration, isFunctionExpression, isFunctionLike, isGetAccessor, isGetAccessorDeclaration, isIdentifier, isLiteralExpression, isNumericLiteral, isParameterPropertyDeclaration, isPrefixUnaryExpression, isPropertyAccessExpression, isSetAccessor, isSetAccessorDeclaration, isSourceFile, isStringLiteralLike, isTemplateExpression, isVariableDeclaration, isVariableStatement, LiteralExpression, ModifierFlags, NamespaceImport, Node, NodeArray, NodeFlags, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertySignature, ResolutionMode,SourceFile, Statement, SymbolFlags, SyntaxKind, VariableDeclaration, VariableDeclarationList } from "typescript"; +import { __String, AccessorDeclaration, BindingPattern, CompilerOptions, ComputedPropertyName, Declaration, DeclarationName, ElementAccessExpression, EntityNameOrEntityNameExpression, EnumDeclaration, EnumMember, Expression, factory, findAncestor, FunctionDeclaration, FunctionLikeDeclaration, getCombinedModifierFlags, getCombinedNodeFlags, getNameOfDeclaration, getParseTreeNode, Identifier, ImportClause, ImportEqualsDeclaration, ImportSpecifier, isArrowFunction, isBigIntLiteral, isBinaryExpression, isBindingElement, isElementAccessExpression, isEnumDeclaration, isEnumMember, isExpressionStatement, isFunctionDeclaration, isFunctionExpression, isFunctionLike, isGetAccessor, isGetAccessorDeclaration, isIdentifier, isLiteralExpression, isNumericLiteral, isParameterPropertyDeclaration, isPrefixUnaryExpression, isPropertyAccessExpression, isSetAccessor, isSetAccessorDeclaration, isSourceFile, isStringLiteralLike, isTemplateExpression, isVariableDeclaration, isVariableStatement, ModifierFlags, NamespaceImport, Node, NodeArray, NodeFlags, NoSubstitutionTemplateLiteral, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertyName, PropertySignature, ResolutionMode,SourceFile, Statement, SymbolFlags, SyntaxKind, VariableDeclaration, VariableDeclarationList } from "typescript"; import { Debug } from "./debug"; import { BasicSymbol, bindSourceFile, NodeLinks } from "./emit-binder"; import { appendIfUnique, emptyArray, every, filter, hasProperty } from "./lang-utils"; import { IsolatedEmitResolver, LateBoundDeclaration, LateVisibilityPaintedStatement, SymbolAccessibility, SymbolVisibilityResult } from "./types"; -import { AnyImportSyntax, getFirstIdentifier, getMemberKey, hasDynamicName, hasEffectiveModifier, hasSyntacticModifier, isAmbientDeclaration,isBindingPattern, isEntityNameExpression, isExternalModuleAugmentation, isInJSFile, isLateVisibilityPaintedStatement, isPartOfTypeNode, isThisIdentifier, nodeIsPresent, skipParentheses } from "./utils"; - - +import { AnyImportSyntax, getFirstIdentifier, getMemberKey, hasDynamicName, hasEffectiveModifier, hasSyntacticModifier, isAmbientDeclaration,isBindingPattern, isEntityNameExpression, isExternalModuleAugmentation, isInJSFile, isLateVisibilityPaintedStatement, isPartOfTypeNode, isThisIdentifier, MemberKey, nodeIsPresent, skipParentheses } from "./utils"; +import { makeEvaluator } from "./evaluator"; + + +const knownFunctionMembers = new Set([ + "I:apply", + "I:call", + "I:bind", + "I:toString", + "I:prototype", + "I:length", +]) export function createEmitResolver(file: SourceFile, options: CompilerOptions, packageModuleType: ResolutionMode): IsolatedEmitResolver { - const { getNodeLinks, resolveName } = bindSourceFile(file, options, packageModuleType); - + const { getNodeLinks, resolveMemberKey, resolveName } = bindSourceFile(file, options, packageModuleType); + function getEnumValueFromName(name: PropertyName | NoSubstitutionTemplateLiteral, location: EnumDeclaration) { + const enumKey = getMemberKey(name); + if(!enumKey) return undefined; + const enumMemberSymbol = resolveMemberKey(location, enumKey, SymbolFlags.Value); + const enumMemberDeclaration = enumMemberSymbol?.declarations[0]; + if(enumMemberDeclaration && isEnumMember(enumMemberDeclaration)) { + return getNodeLinks(enumMemberDeclaration).enumValue; + } + return undefined; + } + const evaluate = makeEvaluator({ + evaluateElementAccessExpression(expr, location) { + // We only resolve names in the current enum declaration + if(!location || !isEnumDeclaration(location)) return undefined; + if(isIdentifier(expr.expression) + && expr.expression.escapedText === location.name.escapedText + && isStringLiteralLike(expr.argumentExpression)) { + return getEnumValueFromName(expr.argumentExpression, location); + } + return undefined; + }, + evaluateEntityNameExpression(expr, location) { + // We only resolve names in the current enum declaration + if(!location || !isEnumDeclaration(location)) return undefined; + if(isIdentifier(expr)) { + return getEnumValueFromName(expr, location); + } + if(isPropertyAccessExpression(expr) + && isIdentifier(expr.expression) + && expr.expression.escapedText === location.name.escapedText) { + return getEnumValueFromName(expr.name, location); + } + return undefined; + }, + onNumericLiteral() { }, + }) function isLiteralValue(node: Expression): boolean { if(isLiteralExpression(node)) return true; @@ -73,7 +117,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p function getExpandoMembers(declaration: FunctionDeclaration | VariableDeclaration, functionName: Identifier) { const scope = getParentScope(declaration); if(!scope) return undefined; - const members = new Set(); + const members = new Set(); for (const statement of scope.statements) { // Looking for name functionName.member = init; if (!isExpressionStatement(statement)) continue; @@ -82,7 +126,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p if(assignment.operatorToken.kind !== SyntaxKind.EqualsToken) continue; const isPropertyAccess = isPropertyAccessExpression(assignment.left); - if(isPropertyAccess || isElementAccessExpression(assignment.left) + if((isPropertyAccess || isElementAccessExpression(assignment.left)) && isIdentifier(assignment.left.expression) && assignment.left.expression.escapedText === functionName.escapedText) { @@ -95,7 +139,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p name = factory.createComputedPropertyName(argumentExpression); } const key = getMemberKey(name) - if(!key) { + if(!key || knownFunctionMembers.has(key)) { continue; } members.add(key); @@ -107,10 +151,23 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p function getDefinedMembers(declaration: FunctionDeclaration | VariableDeclaration, functionName: Identifier) { const scope = getParentScope(declaration); if(!scope) return undefined; + const cls = resolveName(scope, functionName.escapedText, SymbolFlags.Class); + const namespace = resolveName(scope, functionName.escapedText, SymbolFlags.Namespace) - return namespace?.exports + + if(!cls?.exports) { + return namespace?.exports; + } + if(!namespace?.exports) { + return cls.exports; + } + return new Set([ + ...(namespace.exports.keys() ?? []), + ...(cls.exports.keys() ?? []) + ]); } + // 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)); @@ -144,7 +201,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p // Some assigned members are not in the defined the namespaces // computed members are ignored, since they don't name it to declarations anyway - if([...expandoMembers.keys()].some(n => !n.startsWith("C:") && !definedMembers.has(n.substring(2) as __String))) { + if([...expandoMembers.keys()].some(n => !definedMembers.has(n))) { return true; } return false; @@ -156,7 +213,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p isLiteralComputedName, getAllAccessorDeclarations(declaration) { const parentLinks = getNodeLinks(declaration.parent); - const key = getMemberKey(declaration.name) as __String; + const key = getMemberKey(declaration.name); const members = hasSyntacticModifier(declaration, ModifierFlags.Static) ? parentLinks.symbol?.exports : parentLinks.symbol?.members @@ -170,42 +227,21 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p } }, getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined { - function getLiteralValue(value: LiteralExpression) { - if(isStringLiteralLike(value)) { - return value.text - } - if(isNumericLiteral(value)) { - return +value.text - } - return undefined; - } - function getEnumMemberInitializerValue(node: EnumMember) { - if(isLiteralConstDeclaration(node)) { - const initializer = node.initializer; - if(!initializer) return undefined; - if(isLiteralExpression(initializer)) { - return getLiteralValue(initializer); - } - - if(isPrefixUnaryExpression(initializer) && isNumericLiteral(initializer.operand)) { - if(initializer.operator === SyntaxKind.MinusToken) { - const value = getLiteralValue(initializer.operand); - return value && -value; - } - if(initializer.operator === SyntaxKind.PlusToken) { - return getLiteralValue(initializer.operand) - } - } - } - } function updateEnumValues(node: EnumDeclaration) { let prevEnumValueLinks: NodeLinks | undefined; const isDeclaration = isAmbientDeclaration(node) && !hasSyntacticModifier(node, ModifierFlags.Const); for(const enumValue of node.members) { const links = getNodeLinks(enumValue); - const value = getEnumMemberInitializerValue(enumValue); - if(isDeclaration || value !== undefined || enumValue.initializer) { - links.enumValue = value; + 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; diff --git a/external-declarations/src/compiler/evaluator.ts b/external-declarations/src/compiler/evaluator.ts new file mode 100644 index 0000000000000..1f6cec04ef545 --- /dev/null +++ b/external-declarations/src/compiler/evaluator.ts @@ -0,0 +1,96 @@ +import { __String, BinaryExpression, Declaration, ElementAccessExpression, EntityNameExpression, Expression, NumericLiteral, ParenthesizedExpression, PrefixUnaryExpression, StringLiteralLike, SyntaxKind, TemplateExpression } from "typescript"; + +interface EvaluationResolver { + evaluateEntityNameExpression(expr: EntityNameExpression, location: Declaration | undefined): string | number | undefined; + evaluateElementAccessExpression(expr: ElementAccessExpression, location: Declaration | undefined): string | number | undefined; + onNumericLiteral(expr: NumericLiteral): void; +} +export function makeEvaluator ({ evaluateElementAccessExpression, evaluateEntityNameExpression, onNumericLiteral }: EvaluationResolver) { + 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; +} diff --git a/external-declarations/src/compiler/utils.ts b/external-declarations/src/compiler/utils.ts index 116f0b6088bc6..ca4fe2512f9dc 100644 --- a/external-declarations/src/compiler/utils.ts +++ b/external-declarations/src/compiler/utils.ts @@ -636,23 +636,32 @@ function isNamedDeclaration(node: Node): node is NamedDeclaration & { name: Decl return !!(node as NamedDeclaration).name; // A 'name' property should always be a DeclarationName. } +export type MemberKey = string & { + __memberKey: void +} - -export function getMemberKey(name: ts.PropertyName): string | undefined { +export function getMemberKey(name: string | Exclude | ts.NoSubstitutionTemplateLiteral): MemberKey +export function getMemberKey(name: string | ts.PropertyName | ts.NoSubstitutionTemplateLiteral | undefined): MemberKey | undefined +export function getMemberKey(name: string | ts.PropertyName | ts.NoSubstitutionTemplateLiteral | undefined): string | undefined { + if(name === undefined) { + return undefined; + } + if(typeof name === "string") { + return ("I:" + name); + } if(isPrivateIdentifier(name)) { return ("P:" + name.escapedText); } if (isIdentifier(name)) { return ("I:" + name.escapedText); } - if (isStringLiteral(name)) { + if (isStringLiteralLike(name)) { return ("I:" + name.text); } if (isNumericLiteral(name)) { return ("I:" + (+name.text)); } if (ts.isComputedPropertyName(name)) { - let fullId = "C:"; let computedName = name.expression; if (isStringLiteral(computedName)) { @@ -673,6 +682,7 @@ export function getMemberKey(name: ts.PropertyName): string | undefined { return undefined; } } + let fullId = "C:"; // We only support dotted identifiers as property keys while (true) { if (isIdentifier(computedName)) { diff --git a/external-declarations/src/test-runner/cli-arg-config.ts b/external-declarations/src/test-runner/cli-arg-config.ts index d524b777988b0..02020ee9c6f6e 100644 --- a/external-declarations/src/test-runner/cli-arg-config.ts +++ b/external-declarations/src/test-runner/cli-arg-config.ts @@ -17,6 +17,7 @@ export const testRunnerCLIConfiguration = parserConfiguration({ configFile: ArgType.String(), category: ArgType.String(), forceIsolatedDeclarations: ArgType.Boolean(), + keepHistory: ArgType.Boolean(), }); diff --git a/external-declarations/src/test-runner/test-runner-main.ts b/external-declarations/src/test-runner/test-runner-main.ts index 97656540e6e09..b62897546484a 100644 --- a/external-declarations/src/test-runner/test-runner-main.ts +++ b/external-declarations/src/test-runner/test-runner-main.ts @@ -167,7 +167,7 @@ async function main() { ); } } - if (allTests.length > 5) { + if (allTests.length > 5 && parsedArgs.keepHistory) { writeResults(file.replace("/$now/", historical), resultText); } writeResults(file, resultText); diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index aa5ef7d5f081c..3d7754c2f541c 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -1,13 +1,98 @@ -import { Debug } from "../../debug"; -import { Diagnostics } from "../../diagnosticInformationMap.generated"; -import { isComputedPropertyName, isExportAssignment, isGetAccessorDeclaration, isIdentifier, isInterfaceDeclaration, isLiteralTypeNode, isMethodDeclaration, isNoSubstitutionTemplateLiteral, isNumericLiteral, isOmittedExpression, isParameter, isPrefixUnaryExpression, isPrivateIdentifier, isPropertyAccessExpression, isPropertyAssignment, isPropertyDeclaration, isSetAccessorDeclaration, isShorthandPropertyAssignment, isSpreadAssignment, isSpreadElement, isStringLiteral, isTypeLiteralNode, isTypeParameterDeclaration, isTypeReferenceNode, isUnionTypeNode, isVariableDeclaration } from "../../factory/nodeTests"; -import { setTextRange } from "../../factory/utilitiesPublic"; -import { isIdentifierText } from "../../scanner"; -import { nullTransformationContext } from "../../transformer"; -import { ArrayLiteralExpression, ArrowFunction, AsExpression, EntityNameOrEntityNameExpression, ExportAssignment, Expression, FunctionExpression, GetAccessorDeclaration, HasInferredType, Identifier, KeywordTypeSyntaxKind, LanguageVariant, LiteralExpression, MethodDeclaration, MethodSignature, Modifier, Node, NodeArray, NodeFlags, ObjectLiteralElementLike, ObjectLiteralExpression, ParameterDeclaration, ParenthesizedExpression, PrefixUnaryExpression, PropertyAssignment, PropertyName, PropertySignature, SetAccessorDeclaration, SourceFile, SyntaxKind, TransformationContext,TypeAssertion, TypeElement, TypeNode, Visitor, VisitResult } from "../../types"; -import { createDiagnosticForNode,isEntityNameExpression } from "../../utilities"; -import { isConstTypeReference, isPropertyName, isTypeNode } from "../../utilitiesPublic"; -import { visitEachChild,visitNode, visitNodes } from "../../visitorPublic"; +import { + Debug, +} from "../../debug"; +import { + Diagnostics, +} from "../../diagnosticInformationMap.generated"; +import { + isComputedPropertyName, + isExportAssignment, + isGetAccessorDeclaration, + isIdentifier, + isInterfaceDeclaration, + isLiteralTypeNode, + isMethodDeclaration, + isNoSubstitutionTemplateLiteral, + isNumericLiteral, + isOmittedExpression, + isParameter, + isPrefixUnaryExpression, + isPrivateIdentifier, + isPropertyAccessExpression, + isPropertyAssignment, + isPropertyDeclaration, + isSetAccessorDeclaration, + isShorthandPropertyAssignment, + isSpreadAssignment, + isSpreadElement, + isStringLiteral, + isTypeLiteralNode, + isTypeParameterDeclaration, + isTypeReferenceNode, + isUnionTypeNode, + isVariableDeclaration, +} from "../../factory/nodeTests"; +import { + setTextRange, +} from "../../factory/utilitiesPublic"; +import { + isIdentifierText, +} from "../../scanner"; +import { + nullTransformationContext, +} from "../../transformer"; +import { + ArrayLiteralExpression, + ArrowFunction, + AsExpression, + EntityNameOrEntityNameExpression, + ExportAssignment, + Expression, + FunctionExpression, + GetAccessorDeclaration, + HasInferredType, + Identifier, + KeywordTypeSyntaxKind, + LanguageVariant, + LiteralExpression, + MethodDeclaration, + MethodSignature, + Modifier, + Node, + NodeArray, + NodeFlags, + ObjectLiteralElementLike, + ObjectLiteralExpression, + ParameterDeclaration, + ParenthesizedExpression, + PrefixUnaryExpression, + PropertyAssignment, + PropertyName, + PropertySignature, + SetAccessorDeclaration, + SourceFile, + SyntaxKind, + TransformationContext, + TypeAssertion, + TypeElement, + TypeNode, + Visitor, + VisitResult, +} from "../../types"; +import { + createDiagnosticForNode, + isEntityNameExpression, +} from "../../utilities"; +import { + isConstTypeReference, + isPropertyName, + isTypeNode, +} from "../../utilitiesPublic"; +import { + visitEachChild, + visitNode, + visitNodes, +} from "../../visitorPublic"; enum NarrowBehavior { None = 0, @@ -34,10 +119,10 @@ export function createLocalInferenceResolver({ context, }: { setEnclosingDeclarations(node: Node): Node; - visitDeclarationSubtree(input: Node): VisitResult + visitDeclarationSubtree(input: Node): VisitResult; checkEntityNameVisibility(name: EntityNameOrEntityNameExpression, container?: Node): void; ensureParameter(p: ParameterDeclaration): ParameterDeclaration; - context: TransformationContext + context: TransformationContext; }): LocalInferenceResolver | undefined { let currentSourceFile: SourceFile | undefined; const options = context.getCompilerOptions(); @@ -57,7 +142,7 @@ export function createLocalInferenceResolver({ if (localType !== undefined) { return localType; } - if(type) { + if (type) { return visitNode(type, visitDeclarationSubtree, isTypeNode)!; } return makeInvalidType(); @@ -71,7 +156,7 @@ export function createLocalInferenceResolver({ function reportIsolatedDeclarationError(node: Node) { const message = createDiagnosticForNode( node, - Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit + Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit, ); context.addDiagnostic(message); } @@ -80,7 +165,11 @@ export function createLocalInferenceResolver({ return factory.createTypeReferenceNode("invalid"); } - interface LocalTypeInfo { typeNode: TypeNode, sourceNode: Node, flags: LocalTypeInfoFlags } + interface LocalTypeInfo { + typeNode: TypeNode; + sourceNode: Node; + flags: LocalTypeInfoFlags; + } function mergeFlags(existing: LocalTypeInfoFlags, newFlags: LocalTypeInfoFlags): LocalTypeInfoFlags { return existing | newFlags; @@ -92,13 +181,12 @@ export function createLocalInferenceResolver({ const otherAccessorIndex = properties.findIndex(n => otherAccessorTest(n) && getMemberKey(n) === nameKey); const otherAccessor = properties[otherAccessorIndex] as SetAccessorDeclaration | GetAccessorDeclaration | undefined; - const getAccessor = knownIsGetAccessor ? knownAccessor : otherAccessor && isGetAccessorDeclaration(otherAccessor) ? otherAccessor : - undefined; + undefined; const setAccessor = !knownIsGetAccessor ? knownAccessor : otherAccessor && isSetAccessorDeclaration(otherAccessor) ? otherAccessor : - undefined; + undefined; return { otherAccessorIndex, @@ -108,8 +196,7 @@ export function createLocalInferenceResolver({ }; } function inferAccessorType(getAccessor?: GetAccessorDeclaration, setAccessor?: SetAccessorDeclaration): LocalTypeInfo { - - if(getAccessor?.type){ + if (getAccessor?.type) { return visitTypeAndClone(getAccessor.type, getAccessor); } @@ -162,14 +249,16 @@ export function createLocalInferenceResolver({ return localInference(asExpression.expression, NarrowBehavior.AsConst); } else { - const type = asExpression.type - if (isLiteralTypeNode(type) && - (isNoSubstitutionTemplateLiteral(type.literal) || isStringLiteral(type.literal))) { + const type = asExpression.type; + if ( + isLiteralTypeNode(type) && + (isNoSubstitutionTemplateLiteral(type.literal) || isStringLiteral(type.literal)) + ) { return regular( factory.createLiteralTypeNode( - normalizeLiteralValue(type.literal) + normalizeLiteralValue(type.literal), ), - node + node, ); } @@ -195,12 +284,12 @@ export function createLocalInferenceResolver({ } } - if(prefixOp.operator === SyntaxKind.PlusToken) { + if (prefixOp.operator === SyntaxKind.PlusToken) { return regular(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), prefixOp); } - else if(prefixOp.operator === SyntaxKind.MinusToken) { - return prefixOp.operand.kind === SyntaxKind.BigIntLiteral? - regular(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword), node): + else if (prefixOp.operator === SyntaxKind.MinusToken) { + return prefixOp.operand.kind === SyntaxKind.BigIntLiteral ? + regular(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword), node) : regular(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), node); } } @@ -233,7 +322,7 @@ export function createLocalInferenceResolver({ } else if (isOmittedExpression(element)) { elementTypesInfo.push( - createUndefinedTypeNode(element) + createUndefinedTypeNode(element), ); } else { @@ -243,7 +332,7 @@ export function createLocalInferenceResolver({ } } const tupleType = factory.createTupleTypeNode( - elementTypesInfo.map(lti => lti.typeNode) + elementTypesInfo.map(lti => lti.typeNode), ); tupleType.emitNode = { flags: 1, autoGenerate: undefined, internalFlags: 0 }; return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node, inheritedArrayTypeFlags); @@ -253,8 +342,8 @@ export function createLocalInferenceResolver({ const properties: TypeElement[] = []; let inheritedObjectTypeFlags = LocalTypeInfoFlags.None; const members = new Map(); for (let propIndex = 0, length = objectLiteral.properties.length; propIndex < length; propIndex++) { const prop = objectLiteral.properties[propIndex]; @@ -266,7 +355,7 @@ export function createLocalInferenceResolver({ return invalid(prop); } - if(isPrivateIdentifier(prop.name)) { + if (isPrivateIdentifier(prop.name)) { // Not valid in object literals but the compiler will complain about this, we just ignore it here. continue; } @@ -275,13 +364,13 @@ export function createLocalInferenceResolver({ reportIsolatedDeclarationError(node); continue; } - if(isEntityNameExpression(prop.name.expression)) { + if (isEntityNameExpression(prop.name.expression)) { checkEntityNameVisibility(prop.name.expression, prop); } } const nameKey = getMemberKey(prop); - const existingMember = nameKey ? members.get(nameKey): undefined; + const existingMember = nameKey ? members.get(nameKey) : undefined; const name = simplifyComputedPropertyName(prop.name, existingMember?.name) ?? deepClone(visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!); @@ -304,7 +393,7 @@ export function createLocalInferenceResolver({ typeParameters, parameters, returnType.typeNode, - ) + ), ); } else { @@ -332,7 +421,7 @@ export function createLocalInferenceResolver({ modifiers, name, /*questionToken*/ undefined, - typeNode + typeNode, ); } else { @@ -340,7 +429,7 @@ export function createLocalInferenceResolver({ Debug.assertNever(prop); } if (!nameKey) { - return invalid(prop) + return invalid(prop); } const { getAccessor, setAccessor, otherAccessorIndex } = getAccessorInfo(objectLiteral.properties, prop); if (otherAccessorIndex === -1 || otherAccessorIndex > propIndex) { @@ -357,12 +446,11 @@ export function createLocalInferenceResolver({ accessorType.typeNode, ); } - } + } if (newProp) { - if(nameKey) { - - if(existingMember !== undefined && !isMethodDeclaration(prop)) { + if (nameKey) { + if (existingMember !== undefined && !isMethodDeclaration(prop)) { properties[existingMember.location] = newProp; } else { @@ -409,8 +497,10 @@ export function createLocalInferenceResolver({ function createUndefinedTypeNode(node: Node, flags = LocalTypeInfoFlags.None) { if (strictNullChecks) { return regular( - factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword) - , node, flags); + factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), + node, + flags, + ); } else { return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, flags); @@ -418,66 +508,72 @@ export function createLocalInferenceResolver({ } function literal(node: Node, baseType: string | KeywordTypeSyntaxKind, narrowBehavior: NarrowBehavior, flags: LocalTypeInfoFlags = 0) { if (narrowBehavior & NarrowBehavior.AsConstOrKeepLiterals) { - return regular(factory.createLiteralTypeNode( - normalizeLiteralValue(node as LiteralExpression) - ), node, flags); + return regular( + factory.createLiteralTypeNode( + normalizeLiteralValue(node as LiteralExpression), + ), + node, + flags, + ); } else { return regular( typeof baseType === "number" ? factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType), node, - flags + flags, ); } } function makeInvalidTypeAndReport(node: Node) { reportIsolatedDeclarationError(node); - return makeInvalidType() ; + return makeInvalidType(); } function visitTypeAndClone(type: TypeNode | undefined, owner: Node) { const visitedType = visitNode(type, visitDeclarationSubtree, isTypeNode); - if(!visitedType) return invalid(owner); - return regular(deepClone(visitedType), owner) + if (!visitedType) return invalid(owner); + return regular(deepClone(visitedType), owner); } function simplifyComputedPropertyName(name: PropertyName, existingName?: PropertyName) { let numericValue; function basicStringNumberLiterals(name: PropertyName | Expression) { if (isStringLiteral(name)) { - if(isIdentifierText(name.text, options.target, LanguageVariant.Standard)) { - return factory.createIdentifier(name.text) + if (isIdentifierText(name.text, options.target, LanguageVariant.Standard)) { + return factory.createIdentifier(name.text); } - return existingName && isNumericLiteral(existingName) ? existingName: name; + return existingName && isNumericLiteral(existingName) ? existingName : name; } else if (isNumericLiteral(name)) { - numericValue = (+name.text); + numericValue = +name.text; } } const result = basicStringNumberLiterals(name); - if(result) { + if (result) { return result; } else if (isComputedPropertyName(name)) { - const expression = name.expression + const expression = name.expression; const result = basicStringNumberLiterals(expression); if (result) { return result; } - else if (isPrefixUnaryExpression(expression) - && isNumericLiteral(expression.operand)) { - if(expression.operator === SyntaxKind.MinusToken){ + else if ( + isPrefixUnaryExpression(expression) + && isNumericLiteral(expression.operand) + ) { + if (expression.operator === SyntaxKind.MinusToken) { return name; } - else if(expression.operator === SyntaxKind.PlusToken){ + else if (expression.operator === SyntaxKind.PlusToken) { numericValue = +expression.operand.text; } } } - if(numericValue === undefined) { + if (numericValue === undefined) { return undefined; } - if(numericValue >= 0) { + if (numericValue >= 0) { return factory.createNumericLiteral(numericValue); } else { @@ -505,12 +601,14 @@ export function createLocalInferenceResolver({ if (isNumericLiteral(computedName)) { return ("I:" + (+computedName.text)); } - if (isPrefixUnaryExpression(computedName) - && isNumericLiteral(computedName.operand)) { - if(computedName.operator === SyntaxKind.MinusToken){ + if ( + isPrefixUnaryExpression(computedName) + && isNumericLiteral(computedName.operand) + ) { + if (computedName.operator === SyntaxKind.MinusToken) { return ("I:" + (-computedName.operand.text)); } - else if(computedName.operator === SyntaxKind.PlusToken){ + else if (computedName.operator === SyntaxKind.PlusToken) { return ("I:" + (+computedName.operand.text)); } else { @@ -564,63 +662,70 @@ export function createLocalInferenceResolver({ } function addUndefinedInUnion(type: TypeNode) { - if(isUnionTypeNode(type)) { + if (isUnionTypeNode(type)) { const hasUndefined = type.types.some(p => p.kind === SyntaxKind.UndefinedKeyword); - if(hasUndefined) return type; + if (hasUndefined) return type; return factory.createUnionTypeNode([ ...type.types, - factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword) - ]) + factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), + ]); } return factory.createUnionTypeNode([ type, - factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword) - ]) + factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), + ]); } function localInferenceFromInitializer(node: HasInferredType | ExportAssignment, type: TypeNode | undefined): TypeNode | undefined { let localType: LocalTypeInfo | undefined; if (isParameter(node)) { - if(type) { + if (type) { localType = regular( visitNode(type, visitDeclarationSubtree, isTypeNode)!, node, - ) + ); } - else if(node.initializer) { + // 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); } - if(node.initializer && !(localType.flags & LocalTypeInfoFlags.Invalid) && strictNullChecks && !resolver.isOptionalParameter(node)) { + if (node.initializer && !(localType.flags & LocalTypeInfoFlags.Invalid) && strictNullChecks && !resolver.isOptionalParameter(node)) { localType.typeNode = addUndefinedInUnion(localType.typeNode); } } - else if(type) { + else if (type) { return visitNode(type, visitDeclarationSubtree, isTypeNode); } else if (isExportAssignment(node) && node.expression) { localType = localInference(node.expression, NarrowBehavior.KeepLiterals); } else if (isVariableDeclaration(node) && node.initializer) { - if(isVariableDeclaration(node) && resolver.isExpandoFunction(node)) { + if (isVariableDeclaration(node) && resolver.isExpandoFunction(node)) { + context.addDiagnostic(createDiagnosticForNode( + node, + Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function, + )); localType = invalid(node); - } else { + } + else { localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals : NarrowBehavior.None); } } else if (isPropertyDeclaration(node) && node.initializer) { localType = localInference(node.initializer); } - else if(isInterfaceDeclaration(node.parent) || isTypeLiteralNode(node.parent)) { + else if (isInterfaceDeclaration(node.parent) || isTypeLiteralNode(node.parent)) { return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); } else { reportIsolatedDeclarationError(node); } - if(!localType || localType.flags & LocalTypeInfoFlags.Invalid) { + if (!localType || localType.flags & LocalTypeInfoFlags.Invalid) { return undefined; } return localType.typeNode; From aeeb920a85ade7f475ff163a89b7e7d6a1c53932 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 14 Sep 2023 15:23:55 +0100 Subject: [PATCH 072/224] Ban reference directives. Some minor fixes. Signed-off-by: Titian Cernicova-Dragomir --- external-declarations/fixed-tests.jsonc | 114 +++--- external-declarations/package.json | 2 +- .../src/compiler/emit-resolver.ts | 363 ++++++++++++------ src/compiler/checker.ts | 33 +- src/compiler/diagnosticMessages.json | 8 +- src/compiler/transformers/declarations.ts | 97 +++-- .../transformers/declarations/diagnostics.ts | 2 + .../declarations/localInferenceResolver.ts | 14 +- 8 files changed, 388 insertions(+), 245 deletions(-) diff --git a/external-declarations/fixed-tests.jsonc b/external-declarations/fixed-tests.jsonc index 6b01a74c61f3d..1279cf8f359b4 100644 --- a/external-declarations/fixed-tests.jsonc +++ b/external-declarations/fixed-tests.jsonc @@ -4,10 +4,9 @@ 9007, // Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit 9008, // Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit 9009, // Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function + 9010, // Reference directives are not supported in isolated declaration mode. ], "with-unreliable-errors": [ - 2314, // Generic type '{0}' requires {1} type argument(s) - 1166, // A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type 2784, // 'get' and 'set' accessors cannot declare 'this' parameters. 1162, // An object member cannot be declared optional. ] @@ -101,7 +100,9 @@ // Parser errors "parserSkippedTokens16", // Symbol const not annotated - "declarationEmitPrivateNameCausesError" + "declarationEmitPrivateNameCausesError", + // Crashes + "parseInvalidNonNullableTypes" ], "not-fixed-with-unreliable-errors": [ "classMemberWithMissingIdentifier", @@ -180,10 +181,7 @@ "decoratorMetadataWithImportDeclarationNameCollision7", // Import does not have the accessed member. TS removes the import as unused. A DTE will keep it as it is syntactically used. "classExtendingNonConstructor", // Not reported as isolated declaration error, but the extends clause is invalid. "nodeModulesImportTypeModeDeclarationEmitErrors1", // Invalid import asserts - "this_inside-enum-should-not-be-allowed", // strange things in enum initializers - "ambientErrors", // Has errors from ambient declarations on enums - "arrowFunctionContexts", // Function assigned to enum member - "wellKnownSymbolExpando", // Expando function with well known symbols error in TS, but generate teh expando function namepsace, DTE does not. + "wellKnownSymbolExpando", // Expando function with well known symbols error in TS, but generate the expando function namepsace, DTE does not. ], "with-isolated-declaration-errors/9008": [ "declarationEmitHasTypesRefOnNamespaceUse", @@ -205,29 +203,22 @@ "contextualReturnTypeOfIIFE2", // Nested expando functions. Can in principle be detected, but are not yet implemented // Computed property errors a DTE can't detect "complicatedPrivacy", + "computedPropertyNames12_ES5", + "computedPropertyNames12_ES6", + "computedPropertyNames13_ES5", + "computedPropertyNames13_ES6", "declarationEmitMappedTypeTemplateTypeofSymbol", "declarationEmitReadonlyComputedProperty", - "propertyAssignment", + "ES5For-ofTypeCheck10", "ES5SymbolProperty2", "ES5SymbolProperty3", "ES5SymbolProperty4", "ES5SymbolProperty5", "ES5SymbolProperty6", "ES5SymbolProperty7", - "computedPropertyNames13_ES5", - "computedPropertyNames13_ES6", + "indexWithoutParamType2", "MemberFunctionDeclaration3_es6", - "superSymbolIndexedAccess1", - "superSymbolIndexedAccess3", - "superSymbolIndexedAccess4", - "superSymbolIndexedAccess5", - "superSymbolIndexedAccess6", - "parserES5ComputedPropertyName11", - "parserES5ComputedPropertyName8", - "parserES5SymbolProperty3", - "parserES5SymbolProperty7", - "parserES5SymbolProperty8", - "parserES5SymbolProperty9", + "parserComputedPropertyName10", "parserComputedPropertyName11", "parserComputedPropertyName12", "parserComputedPropertyName13", @@ -235,13 +226,43 @@ "parserComputedPropertyName15", "parserComputedPropertyName18", "parserComputedPropertyName19", + "parserComputedPropertyName22", "parserComputedPropertyName23", + "parserComputedPropertyName25", + "parserComputedPropertyName27", + "parserComputedPropertyName28", + "parserComputedPropertyName29", + "parserComputedPropertyName31", "parserComputedPropertyName32", + "parserComputedPropertyName33", + "parserComputedPropertyName36", "parserComputedPropertyName38", "parserComputedPropertyName39", - "ES5For-ofTypeCheck10", + "parserComputedPropertyName7", + "parserComputedPropertyName8", + "parserComputedPropertyName9", + "parserES5ComputedPropertyName1", + "parserES5ComputedPropertyName10", + "parserES5ComputedPropertyName11", + "parserES5ComputedPropertyName7", + "parserES5ComputedPropertyName8", + "parserES5ComputedPropertyName9", + "parserES5SymbolProperty3", + "parserES5SymbolProperty4", + "parserES5SymbolProperty5", + "parserES5SymbolProperty6", + "parserES5SymbolProperty7", + "parserES5SymbolProperty8", + "parserES5SymbolProperty9", + "propertyAssignment", + "superSymbolIndexedAccess1", + "superSymbolIndexedAccess3", + "superSymbolIndexedAccess4", + "superSymbolIndexedAccess5", + "superSymbolIndexedAccess6", + "declarationEmitForModuleImportingModuleAugmentationRetainsImport" // Import augments and must be kept ], - "possible-ts-bugs": [ + "ts-bugs": [ // Type parameter renamed // Reported as https://github.com/microsoft/TypeScript/issues/55653 "objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts", @@ -251,11 +272,11 @@ "conditionalTypesSimplifyWhenTrivial", // https://github.com/microsoft/TypeScript/issues/55571 "reExportAliasMakesInstantiated" - ], + ], // Needs TS Fix // Reported as https://github.com/microsoft/TypeScript/issues/55654 // Fix available - "binding-patterns": [ + "ts-bug/binding-patterns": [ "declarationsAndAssignments", "excessPropertyCheckWithSpread", "destructuringParameterDeclaration1ES5", @@ -265,8 +286,6 @@ "sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues", "sourceMapValidationDestructuringParameterObjectBindingPattern", "sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues", - "declarationEmitBindingPatterns", - "declarationEmitDuplicateParameterDestructuring", "declarationEmitKeywordDestructuring", "paramterDestrcuturingDeclaration", "renamingDestructuredPropertyInFunctionType", @@ -341,47 +360,6 @@ "declarationEmitPrefersPathKindBasedOnBundling2", // Import path has .. in it. A similar type written by hand would not. "computedPropertiesNarrowed", ], - "bug-preserve-comments": [ - "commentsOnObjectLiteral4" - ], - "need-to-discuss": [ - // Technically the emit is correct. We just can't remove an import because we can't be sure if the symbol in the import is used. - // In this case the import is a value, and the $ is used as a type and comes from the type reference directive - "typeReferenceDirectives5", - "typeReferenceDirectives13", - // We always keep reference directives - "declarationFilesWithTypeReferences4", - "moduleResolutionWithSymlinks_preserveSymlinks", - "moduleResolutionWithSymlinks_referenceTypes", - "tripleSlashTypesReferenceWithMissingExports", - "tripleSlashTypesReferenceWithMissingExports", - "typeReferenceDirectives10", - "typeReferenceDirectives3", - "typeReferenceDirectives4", - "typeReferenceDirectives7", - "nodeModulesTripleSlashReferenceModeOverride1", - "nodeModulesTripleSlashReferenceModeOverride2", - "nodeModulesTripleSlashReferenceModeOverride3", - "nodeModulesTripleSlashReferenceModeOverride4", - "nodeModulesTripleSlashReferenceModeOverride5", - "nodeModulesTripleSlashReferenceModeOverrideModeError", - "nodeModulesTripleSlashReferenceModeOverrideOldResolutionError", - "library-reference-1", - "library-reference-10", - "library-reference-11", - "library-reference-12", - "library-reference-2", - "library-reference-3", - "library-reference-4", - "library-reference-5", - "library-reference-6", - "library-reference-7", - "library-reference-8", - "library-reference-scoped-packages", - "typingsLookup1", - "typingsLookup3", - "declarationEmitForModuleImportingModuleAugmentationRetainsImport", //Import required by augmentation issues - ] } } diff --git a/external-declarations/package.json b/external-declarations/package.json index 4b4da3a44e422..b624563a6cb1a 100644 --- a/external-declarations/package.json +++ b/external-declarations/package.json @@ -6,7 +6,7 @@ "scripts": { "build": "node ../built/local/tsc.js -p ./src", "watch": "node ../built/local/tsc.js -w -p ./src", - "run-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=../tests/cases --libPath=../tests/lib --type=all --shardCount=8", + "run-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=../tests/cases --libPath=../tests/lib --type=all --shardCount=8 --forceIsolatedDeclarations", "run-test": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=c:/dev/TSC/TypeScript/tests/cases ", "transform-tests-parallel": "node ./build/code-mod/parallel-run.js --rootPaths=../tests/cases --shardCount=8", "transform-test": "node ./build/code-mod/test-updater.js --rootPaths=../tests/cases", diff --git a/external-declarations/src/compiler/emit-resolver.ts b/external-declarations/src/compiler/emit-resolver.ts index f15ccd0b15044..b7dd841659069 100644 --- a/external-declarations/src/compiler/emit-resolver.ts +++ b/external-declarations/src/compiler/emit-resolver.ts @@ -1,12 +1,118 @@ -import { __String, AccessorDeclaration, BindingPattern, CompilerOptions, ComputedPropertyName, Declaration, DeclarationName, ElementAccessExpression, EntityNameOrEntityNameExpression, EnumDeclaration, EnumMember, Expression, factory, findAncestor, FunctionDeclaration, FunctionLikeDeclaration, getCombinedModifierFlags, getCombinedNodeFlags, getNameOfDeclaration, getParseTreeNode, Identifier, ImportClause, ImportEqualsDeclaration, ImportSpecifier, isArrowFunction, isBigIntLiteral, isBinaryExpression, isBindingElement, isElementAccessExpression, isEnumDeclaration, isEnumMember, isExpressionStatement, isFunctionDeclaration, isFunctionExpression, isFunctionLike, isGetAccessor, isGetAccessorDeclaration, isIdentifier, isLiteralExpression, isNumericLiteral, isParameterPropertyDeclaration, isPrefixUnaryExpression, isPropertyAccessExpression, isSetAccessor, isSetAccessorDeclaration, isSourceFile, isStringLiteralLike, isTemplateExpression, isVariableDeclaration, isVariableStatement, ModifierFlags, NamespaceImport, Node, NodeArray, NodeFlags, NoSubstitutionTemplateLiteral, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertyName, PropertySignature, ResolutionMode,SourceFile, Statement, SymbolFlags, SyntaxKind, VariableDeclaration, VariableDeclarationList } from "typescript"; - -import { Debug } from "./debug"; -import { BasicSymbol, bindSourceFile, NodeLinks } from "./emit-binder"; -import { appendIfUnique, emptyArray, every, filter, hasProperty } from "./lang-utils"; -import { IsolatedEmitResolver, LateBoundDeclaration, LateVisibilityPaintedStatement, SymbolAccessibility, SymbolVisibilityResult } from "./types"; -import { AnyImportSyntax, getFirstIdentifier, getMemberKey, hasDynamicName, hasEffectiveModifier, hasSyntacticModifier, isAmbientDeclaration,isBindingPattern, isEntityNameExpression, isExternalModuleAugmentation, isInJSFile, isLateVisibilityPaintedStatement, isPartOfTypeNode, isThisIdentifier, MemberKey, nodeIsPresent, skipParentheses } from "./utils"; -import { makeEvaluator } from "./evaluator"; - +import { + __String, + AccessorDeclaration, + BindingPattern, + CompilerOptions, + ComputedPropertyName, + Declaration, + DeclarationName, + ElementAccessExpression, + EntityNameOrEntityNameExpression, + EnumDeclaration, + EnumMember, + Expression, + factory, + findAncestor, + FunctionDeclaration, + FunctionLikeDeclaration, + getCombinedModifierFlags, + getCombinedNodeFlags, + getNameOfDeclaration, + getParseTreeNode, + Identifier, + ImportClause, + ImportEqualsDeclaration, + ImportSpecifier, + isAccessor, + isArrowFunction, + isBigIntLiteral, + isBinaryExpression, + isBindingElement, + isElementAccessExpression, + isEnumDeclaration, + isEnumMember, + isExpressionStatement, + isFunctionDeclaration, + isFunctionExpression, + isFunctionLike, + isGetAccessor, + isGetAccessorDeclaration, + isIdentifier, + isNumericLiteral, + isParameterPropertyDeclaration, + isPrefixUnaryExpression, + isPropertyAccessExpression, + isSetAccessor, + isSetAccessorDeclaration, + isSourceFile, + isStringLiteralLike, + isTemplateExpression, + isVariableDeclaration, + isVariableStatement, + ModifierFlags, + NamespaceImport, + Node, + NodeArray, + NodeFlags, + NoSubstitutionTemplateLiteral, + ParameterDeclaration, + PropertyAccessExpression, + PropertyDeclaration, + PropertyName, + PropertySignature, + ResolutionMode, + SourceFile, + Statement, + SymbolFlags, + SyntaxKind, + VariableDeclaration, + VariableDeclarationList, +} from "typescript"; + +import { + Debug, +} from "./debug"; +import { + BasicSymbol, + bindSourceFile, + NodeLinks, +} from "./emit-binder"; +import { + makeEvaluator, +} from "./evaluator"; +import { + appendIfUnique, + emptyArray, + every, + filter, + hasProperty, +} from "./lang-utils"; +import { + IsolatedEmitResolver, + LateBoundDeclaration, + LateVisibilityPaintedStatement, + SymbolAccessibility, + SymbolVisibilityResult, +} from "./types"; +import { + AnyImportSyntax, + getFirstIdentifier, + getMemberKey, + hasDynamicName, + hasEffectiveModifier, + hasSyntacticModifier, + isAmbientDeclaration, + isBindingPattern, + isEntityNameExpression, + isExternalModuleAugmentation, + isInJSFile, + isLateVisibilityPaintedStatement, + isPartOfTypeNode, + isThisIdentifier, + MemberKey, + nodeIsPresent, + skipParentheses, +} from "./utils"; const knownFunctionMembers = new Set([ "I:apply", @@ -15,17 +121,16 @@ const knownFunctionMembers = new Set([ "I:toString", "I:prototype", "I:length", -]) +]); export function createEmitResolver(file: SourceFile, options: CompilerOptions, packageModuleType: ResolutionMode): IsolatedEmitResolver { - const { getNodeLinks, resolveMemberKey, resolveName } = bindSourceFile(file, options, packageModuleType); function getEnumValueFromName(name: PropertyName | NoSubstitutionTemplateLiteral, location: EnumDeclaration) { const enumKey = getMemberKey(name); - if(!enumKey) return undefined; + if (!enumKey) return undefined; const enumMemberSymbol = resolveMemberKey(location, enumKey, SymbolFlags.Value); const enumMemberDeclaration = enumMemberSymbol?.declarations[0]; - if(enumMemberDeclaration && isEnumMember(enumMemberDeclaration)) { + if (enumMemberDeclaration && isEnumMember(enumMemberDeclaration)) { return getNodeLinks(enumMemberDeclaration).enumValue; } return undefined; @@ -33,71 +138,74 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p const evaluate = makeEvaluator({ evaluateElementAccessExpression(expr, location) { // We only resolve names in the current enum declaration - if(!location || !isEnumDeclaration(location)) return undefined; - if(isIdentifier(expr.expression) + if (!location || !isEnumDeclaration(location)) return undefined; + if ( + isIdentifier(expr.expression) && expr.expression.escapedText === location.name.escapedText - && isStringLiteralLike(expr.argumentExpression)) { + && isStringLiteralLike(expr.argumentExpression) + ) { return getEnumValueFromName(expr.argumentExpression, location); } return undefined; }, evaluateEntityNameExpression(expr, location) { // We only resolve names in the current enum declaration - if(!location || !isEnumDeclaration(location)) return undefined; - if(isIdentifier(expr)) { + if (!location || !isEnumDeclaration(location)) return undefined; + if (isIdentifier(expr)) { return getEnumValueFromName(expr, location); } - if(isPropertyAccessExpression(expr) + if ( + isPropertyAccessExpression(expr) && isIdentifier(expr.expression) - && expr.expression.escapedText === location.name.escapedText) { + && expr.expression.escapedText === location.name.escapedText + ) { return getEnumValueFromName(expr.name, location); } return undefined; }, - onNumericLiteral() { }, - }) - function isLiteralValue(node: Expression): boolean { - if(isLiteralExpression(node)) return true; + onNumericLiteral() {}, + }); + function isPrimitiveLiteralValue(node: Expression): boolean { + if (isNumericLiteral(node) || isBigIntLiteral(node) || isStringLiteralLike(node)) return true; - if(node.kind === SyntaxKind.TrueKeyword || node.kind === SyntaxKind.FalseKeyword) return true; + if (node.kind === SyntaxKind.TrueKeyword || node.kind === SyntaxKind.FalseKeyword) return true; - if(isPrefixUnaryExpression(node)) { + if (isPrefixUnaryExpression(node)) { const operand = node.operand; - if(node.operator === SyntaxKind.MinusToken) { + if (node.operator === SyntaxKind.MinusToken) { return isNumericLiteral(operand) || isBigIntLiteral(operand); } - if(node.operator === SyntaxKind.PlusToken) { + if (node.operator === SyntaxKind.PlusToken) { return isNumericLiteral(operand); } } - if(isTemplateExpression(node)) { - return node.templateSpans.every(t => isLiteralValue(t.expression)); + if (isTemplateExpression(node)) { + return node.templateSpans.every(t => isPrimitiveLiteralValue(t.expression)); } return false; } - function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration | EnumMember): boolean { + 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; + if (!(isEnumMember(node) || !node.type)) return false; + if (!(hasProperty(node, "initializer") && !!node.initializer)) return false; const initializer = node.initializer; - return isLiteralValue(initializer); + return isPrimitiveLiteralValue(initializer); // Original TS version // return isFreshLiteralType(getTypeOfSymbol(getSymbolOfNode(node))); } 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(isLiteralValue(expression)) { + if (isPrimitiveLiteralValue(expression)) { return true; } - if(!isEntityNameExpression(expression)) { + if (!isEntityNameExpression(expression)) { return false; } return true; @@ -108,38 +216,39 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p if (!(name.kind === SyntaxKind.ComputedPropertyName || name.kind === SyntaxKind.ElementAccessExpression)) { return false; } - let expr= isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; - while(isPropertyAccessExpression(expr)) { + let expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; + while (isPropertyAccessExpression(expr)) { expr = expr.expression; } return isIdentifier(expr); } function getExpandoMembers(declaration: FunctionDeclaration | VariableDeclaration, functionName: Identifier) { const scope = getParentScope(declaration); - if(!scope) return undefined; + if (!scope) return undefined; const members = new Set(); for (const statement of scope.statements) { // Looking for name functionName.member = init; if (!isExpressionStatement(statement)) continue; if (!isBinaryExpression(statement.expression)) continue; const assignment = statement.expression; - if(assignment.operatorToken.kind !== SyntaxKind.EqualsToken) continue; + if (assignment.operatorToken.kind !== SyntaxKind.EqualsToken) continue; const isPropertyAccess = isPropertyAccessExpression(assignment.left); - if((isPropertyAccess || isElementAccessExpression(assignment.left)) + if ( + (isPropertyAccess || isElementAccessExpression(assignment.left)) && isIdentifier(assignment.left.expression) - && assignment.left.expression.escapedText === functionName.escapedText) { - + && assignment.left.expression.escapedText === functionName.escapedText + ) { let name; - if(isPropertyAccess) { + if (isPropertyAccess) { name = assignment.left.name; } else { const argumentExpression = assignment.left.argumentExpression; name = factory.createComputedPropertyName(argumentExpression); } - const key = getMemberKey(name) - if(!key || knownFunctionMembers.has(key)) { + const key = getMemberKey(name); + if (!key || knownFunctionMembers.has(key)) { continue; } members.add(key); @@ -150,58 +259,56 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p function getDefinedMembers(declaration: FunctionDeclaration | VariableDeclaration, functionName: Identifier) { const scope = getParentScope(declaration); - if(!scope) return undefined; + if (!scope) return undefined; const cls = resolveName(scope, functionName.escapedText, SymbolFlags.Class); - - const namespace = resolveName(scope, functionName.escapedText, SymbolFlags.Namespace) - if(!cls?.exports) { + const namespace = resolveName(scope, functionName.escapedText, SymbolFlags.Namespace); + + if (!cls?.exports) { return namespace?.exports; } - if(!namespace?.exports) { + if (!namespace?.exports) { return cls.exports; } return new Set([ ...(namespace.exports.keys() ?? []), - ...(cls.exports.keys() ?? []) + ...(cls.exports.keys() ?? []), ]); } - - // Do a best effort to find expando functions - function isExpandoFunction(node: FunctionDeclaration | VariableDeclaration){ + // 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) { + if (isVariableDeclaration(declaration)) { + if (declaration.type) { return false; } - if(!(declaration.initializer && isFunctionExpressionOrArrowFunction(declaration.initializer))) { + if (!(declaration.initializer && isFunctionExpressionOrArrowFunction(declaration.initializer))) { return false; } - } const functionName = node.name; - if(!functionName || !isIdentifier(functionName)) return false; + if (!functionName || !isIdentifier(functionName)) return false; const expandoMembers = getExpandoMembers(declaration, functionName); - if(!expandoMembers || expandoMembers.size === 0) return false; + if (!expandoMembers || expandoMembers.size === 0) return false; - if(isVariableDeclaration(declaration) && expandoMembers.size) { - return true + if (isVariableDeclaration(declaration) && expandoMembers.size) { + return true; } const definedMembers = getDefinedMembers(declaration, functionName); - // No namespace definitions, and it has assignments => is Expando function - if(!definedMembers) { - return true + // No namespace definitions, and it has assignments => is Expando function + if (!definedMembers) { + return true; } // Some assigned members are not in the defined the namespaces // computed members are ignored, since they don't name it to declarations anyway - if([...expandoMembers.keys()].some(n => !definedMembers.has(n))) { + if ([...expandoMembers.keys()].some(n => !definedMembers.has(n))) { return true; } return false; @@ -216,58 +323,57 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p const key = getMemberKey(declaration.name); const members = hasSyntacticModifier(declaration, ModifierFlags.Static) ? parentLinks.symbol?.exports : - parentLinks.symbol?.members + parentLinks.symbol?.members; const symbol = key && members?.get(key); - const declarations = symbol?.declarations ?? [declaration]; + const declaredAccessors = symbol?.declarations.filter(isAccessor); + const declarations = declaredAccessors?.length ? declaredAccessors : [declaration]; return { firstAccessor: declarations[0] as AccessorDeclaration, secondAccessor: declarations[1] as AccessorDeclaration, getAccessor: declarations.find(isGetAccessorDeclaration), - setAccessor: declarations.find(isSetAccessorDeclaration) - } + setAccessor: declarations.find(isSetAccessorDeclaration), + }; }, getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined { function updateEnumValues(node: EnumDeclaration) { - let prevEnumValueLinks: NodeLinks | undefined; + let prevEnumValueLinks: NodeLinks | undefined; const isDeclaration = isAmbientDeclaration(node) && !hasSyntacticModifier(node, ModifierFlags.Const); - for(const enumValue of node.members) { + for (const enumValue of node.members) { const links = getNodeLinks(enumValue); - if(enumValue.initializer) { + if (enumValue.initializer) { const value = enumValue.initializer && evaluate(enumValue.initializer, node); - if(value !== undefined) { + if (value !== undefined) { links.enumValue = value; - } else { + } + else { links.enumValue = undefined; } } - else if(isDeclaration) { + else if (isDeclaration) { links.enumValue = undefined; } - else if(prevEnumValueLinks === undefined) { + else if (prevEnumValueLinks === undefined) { links.enumValue = 0; } - else if(typeof prevEnumValueLinks.enumValue === "number") { + else if (typeof prevEnumValueLinks.enumValue === "number") { links.enumValue = prevEnumValueLinks.enumValue + 1; } prevEnumValueLinks = links; } } - - if(isEnumMember(node)) { + if (isEnumMember(node)) { const links = getNodeLinks(node); - if(!hasProperty(links, 'enumValue')) { - updateEnumValues(node.parent) + if (!hasProperty(links, "enumValue")) { + updateEnumValues(node.parent); } return links.enumValue; - } - }, createLiteralConstValue(node) { - if(hasProperty(node, "initializer") && node.initializer) { + if (hasProperty(node, "initializer") && node.initializer) { const initializer = node.initializer; - if(isStringLiteralLike(initializer)) { + if (isStringLiteralLike(initializer)) { return factory.createStringLiteral(initializer.text); } return node.initializer; @@ -283,8 +389,8 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p }, isImplementationOfOverload(node) { function getSignaturesOfSymbol(symbol: BasicSymbol | undefined): Node[] { - if(!symbol) return emptyArray; - if(symbol.signatureDeclarations) return symbol.signatureDeclarations; + if (!symbol) return emptyArray; + if (symbol.signatureDeclarations) return symbol.signatureDeclarations; if (!symbol || !symbol.declarations) return (symbol.signatureDeclarations = emptyArray); const result: Node[] = symbol.signatureDeclarations = []; @@ -314,7 +420,6 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p 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 = node.symbol; @@ -339,12 +444,12 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p 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; + if (parameter.questionToken) return true; + if (parameter.dotDotDotToken) return !!parameter.initializer; - for(let i = paramIndex; i< signature.parameters.length; i++) { + for (let i = paramIndex; i < signature.parameters.length; i++) { const p = signature.parameters[i]; - if(!p.questionToken && !p.initializer && !p.dotDotDotToken) { + if (!p.questionToken && !p.initializer && !p.dotDotDotToken) { return false; } } @@ -363,7 +468,6 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p }, }; - function isDeclarationReadonly(declaration: Declaration): boolean { return !!(getCombinedModifierFlags(declaration) & ModifierFlags.Readonly && !isParameterPropertyDeclaration(declaration, declaration.parent)); } @@ -395,8 +499,10 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p 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 ( + 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; } @@ -414,8 +520,10 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p } 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 && isAmbientDeclaration(parent))) { + if ( + !(getCombinedModifierFlags(node as Declaration) & ModifierFlags.Export) && + !(node.kind !== SyntaxKind.ImportEqualsDeclaration && parent.kind !== SyntaxKind.SourceFile && isAmbientDeclaration(parent)) + ) { return isGlobalSourceFile(parent); } // Exported members/ambient module elements (exception import declaration) are visible if parent is visible @@ -491,28 +599,36 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p // because these kind of aliases can be used to name types in declaration file const anyImportSyntax = getAnyImportSyntax(declaration); - if (anyImportSyntax && + if ( + anyImportSyntax && !hasSyntacticModifier(anyImportSyntax, ModifierFlags.Export) && // import clause without export - isDeclarationVisible(anyImportSyntax.parent)) { + isDeclarationVisible(anyImportSyntax.parent) + ) { return addVisibleAlias(declaration, anyImportSyntax); } - else if (isVariableDeclaration(declaration) && isVariableStatement(declaration.parent.parent) && + else if ( + isVariableDeclaration(declaration) && isVariableStatement(declaration.parent.parent) && !hasSyntacticModifier(declaration.parent.parent, ModifierFlags.Export) && // unexported variable statement - isDeclarationVisible(declaration.parent.parent.parent)) { + isDeclarationVisible(declaration.parent.parent.parent) + ) { return addVisibleAlias(declaration, declaration.parent.parent); } - else if (isLateVisibilityPaintedStatement(declaration) // unexported top-level statement + else if ( + isLateVisibilityPaintedStatement(declaration) // unexported top-level statement && !hasSyntacticModifier(declaration, ModifierFlags.Export) - && isDeclarationVisible(declaration.parent)) { + && 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 + 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)) { + && isDeclarationVisible(declaration.parent.parent.parent.parent.parent) + ) { return addVisibleAlias(declaration, declaration.parent.parent.parent.parent); } else if (symbol.flags & SymbolFlags.BlockScopedVariable) { @@ -549,14 +665,18 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p 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 || + if ( + entityName.parent.kind === SyntaxKind.TypeQuery || entityName.parent.kind === SyntaxKind.ExpressionWithTypeArguments && !isPartOfTypeNode(entityName.parent) || - entityName.parent.kind === SyntaxKind.ComputedPropertyName) { + 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) { + 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; @@ -570,7 +690,8 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p if (symbol && symbol.flags & SymbolFlags.TypeParameter && meaning & SymbolFlags.Type) { return { accessibility: SymbolAccessibility.Accessible }; } - if (!symbol && isThisIdentifier(firstIdentifier) + if ( + !symbol && isThisIdentifier(firstIdentifier) // TODO: isolatedDeclarations: Just assume this is accessible // && isSymbolAccessible(getSymbolOfNode(getThisContainer(firstIdentifier, /*includeArrowFunctions*/ false)), firstIdentifier, meaning, /*computeAliases*/ false).accessibility === SymbolAccessibility.Accessible ) { @@ -586,12 +707,11 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p // We just do this to mark accessible imports accessibility: SymbolAccessibility.Accessible, errorSymbolName: firstIdentifier.text, - errorNode: firstIdentifier + errorNode: firstIdentifier, }; } } - function getRootDeclaration(node: Node): Node { while (node.kind === SyntaxKind.BindingElement) { node = node.parent.parent; @@ -641,12 +761,15 @@ function isFunctionExpressionOrArrowFunction(node: Expression) { return isFunctionExpression(node) || isArrowFunction(node); } -function getParentScope(declaration: VariableDeclaration | FunctionDeclaration): undefined | Node & { - statements: NodeArray -} { +function getParentScope(declaration: VariableDeclaration | FunctionDeclaration): + | undefined + | Node & { + statements: NodeArray; + } +{ let scope: Node = declaration; - while(scope) { - if(hasProperty(scope, "statements")) { + while (scope) { + if (hasProperty(scope, "statements")) { return (scope as any); } scope = scope.parent; diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 989361fa80742..83ee5cc1fb442 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2721,7 +2721,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } if (symbol.flags & SymbolFlags.Alias) { // Do not take target symbol meaning into account in isolated declaration mode since we don't have access to info from other files. - if(compilerOptions.isolatedDeclarations) { + if (compilerOptions.isolatedDeclarations) { return symbol; } const targetFlags = getSymbolFlags(symbol); @@ -47172,14 +47172,13 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (!declaration) { return false; } - if(isVariableDeclaration(declaration)){ - if(declaration.type) { + if (isVariableDeclaration(declaration)) { + if (declaration.type) { return false; } - if(!(declaration.initializer && isFunctionExpressionOrArrowFunction(declaration.initializer))) { + if (!(declaration.initializer && isFunctionExpressionOrArrowFunction(declaration.initializer))) { return false; } - } const symbol = getSymbolOfDeclaration(declaration); if (!symbol || !(symbol.flags & SymbolFlags.Function | SymbolFlags.Variable)) { @@ -47461,20 +47460,20 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function isPrimitiveLiteralValue(node: Expression): boolean { - if(isNumericLiteral(node) || isBigIntLiteral(node) || isStringLiteralLike(node)) return true; + if (isNumericLiteral(node) || isBigIntLiteral(node) || isStringLiteralLike(node)) return true; - if(node.kind === SyntaxKind.TrueKeyword || node.kind === SyntaxKind.FalseKeyword) return true; + if (node.kind === SyntaxKind.TrueKeyword || node.kind === SyntaxKind.FalseKeyword) return true; - if(isPrefixUnaryExpression(node)) { + if (isPrefixUnaryExpression(node)) { const operand = node.operand; - if(node.operator === SyntaxKind.MinusToken) { + if (node.operator === SyntaxKind.MinusToken) { return isNumericLiteral(operand) || isBigIntLiteral(operand); } - if(node.operator === SyntaxKind.PlusToken) { + if (node.operator === SyntaxKind.PlusToken) { return isNumericLiteral(operand); } } - if(isTemplateExpression(node)) { + if (isTemplateExpression(node)) { return node.templateSpans.every(t => isPrimitiveLiteralValue(t.expression)); } return false; @@ -47483,7 +47482,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration): boolean { if (isDeclarationReadonly(node) || (isVariableDeclaration(node) && isVarConstLike(node)) || isEnumMember(node)) { if (compilerOptions.isolatedDeclarations) { - return !!node.initializer && isPrimitiveLiteralValue(node.initializer); + return !!node.initializer && !node.type && isPrimitiveLiteralValue(node.initializer); } return isFreshLiteralType(getTypeOfSymbol(getSymbolOfDeclaration(node))); } @@ -47491,25 +47490,25 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function isLiteralComputedName(node: ComputedPropertyName) { const expression = node.expression; - if(isPrimitiveLiteralValue(expression)) { + if (isPrimitiveLiteralValue(expression)) { return true; } const type = getTypeOfExpression(expression); - if(!isTypeUsableAsPropertyName(type)) { + if (!isTypeUsableAsPropertyName(type)) { return false; } // Only identifiers of the for A.B.C can be used - if(!isEntityNameExpression(expression)) { + if (!isEntityNameExpression(expression)) { return false; } const symbol = getSymbolAtLocation(expression); - if(!symbol) { + if (!symbol) { return false; } // Ensure not type narrowing const declaredType = getTypeOfSymbol(symbol); - return declaredType === type + return declaredType === type; } function literalTypeToNode(type: FreshableType, enclosing: Node, tracker: SymbolTracker): Expression { diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 33008f5bccfad..7525cb4c6bf8b 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -6666,14 +6666,18 @@ "category": "Error", "code": 9007 }, - "Declaration emit for this file requires adding a type reference directive. Add a type reference directive to ${0} to unblock declaration emit": { + "Declaration emit for this file requires adding a type reference directive. Add a type reference directive to {0} to unblock declaration emit.": { "category": "Error", "code": 9008 }, - "Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function": { + "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": 9009 }, + "Reference directives are not supported in isolated declaration mode.": { + "category": "Error", + "code": 9010 + }, "JSX attributes must only be assigned a non-empty 'expression'.": { "category": "Error", "code": 17000 diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index b973e465fa394..af3e558dd6ccf 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -25,6 +25,7 @@ import { ConstructSignatureDeclaration, contains, createDiagnosticForNode, + createDiagnosticForRange, createEmptyExports, createGetSymbolAccessibilityDiagnosticForNode, createGetSymbolAccessibilityDiagnosticForNodeName, @@ -236,7 +237,9 @@ import { VisitResult, } from "../_namespaces/ts"; import * as moduleSpecifiers from "../_namespaces/ts.moduleSpecifiers"; -import { createLocalInferenceResolver } from "./declarations/localInferenceResolver"; +import { + createLocalInferenceResolver, +} from "./declarations/localInferenceResolver"; /** @internal */ export function getDeclarationDiagnostics(host: EmitHost, resolver: EmitResolver, file: SourceFile | undefined): DiagnosticWithLocation[] | undefined { @@ -352,7 +355,7 @@ export function transformDeclarations(context: TransformationContext) { function reportIsolatedDeclarationError(node: Node) { const message = createDiagnosticForNode( node, - Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit + Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit, ); context.addDiagnostic(message); } @@ -377,20 +380,38 @@ export function transformDeclarations(context: TransformationContext) { refs.set(getOriginalNodeId(container), container); } + function forbidReferenceDirectives(file: SourceFile) { + if (!isolatedDeclarations) { + return; + } + file.libReferenceDirectives.forEach(ref => { + context.addDiagnostic(createDiagnosticForRange( + file, + ref, + Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode, + )); + }); + file.typeReferenceDirectives.forEach(ref => { + context.addDiagnostic(createDiagnosticForRange( + file, + ref, + Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode, + )); + }); + } + function handleTypeReferenceError(typeReferenceDirective: [specifier: string, mode: ResolutionMode], requestingNode: Node) { - if(!isolatedDeclarations) { + if (!isolatedDeclarations) { return; } const existingDirective = existingTypeReferencesSources?.some(s => s.typeReferenceDirectives.some(d => d.fileName === typeReferenceDirective[0])); - if(!existingDirective) { - const message = createDiagnosticForNode( + if (!existingDirective) { + context.addDiagnostic(createDiagnosticForNode( requestingNode, Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit, - typeReferenceDirective[0] - ); - context.addDiagnostic(message); + typeReferenceDirective[0], + )); } - } function handleSymbolAccessibilityError(symbolAccessibilityResult: SymbolAccessibilityResult) { @@ -569,6 +590,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*/ []); }), @@ -630,15 +652,16 @@ export function transformDeclarations(context: TransformationContext) { } const typeReferences = getFileReferencesForUsedTypeReferences(); const libReferences = getLibReferences(); + forbidReferenceDirectives(node); const updated = factory.updateSourceFile( node, combinedStatements, /*isDeclarationFile*/ true, references, - isolatedDeclarations? node.typeReferenceDirectives : typeReferences, + isolatedDeclarations ? [] : typeReferences, node.hasNoDefaultLib, - libReferences + isolatedDeclarations ? [] : libReferences, ); updated.exportedModulesFromDeclarationEmit = exportedModulesFromDeclarationEmit; return updated; @@ -666,8 +689,8 @@ export function transformDeclarations(context: TransformationContext) { } } } - if(requestingNode) { - handleTypeReferenceError([typeName, mode], requestingNode) + if (requestingNode) { + handleTypeReferenceError([typeName, mode], requestingNode); } return { fileName: typeName, pos: -1, end: -1, ...(mode ? { resolutionMode: mode } : undefined) }; } @@ -794,7 +817,7 @@ export function transformDeclarations(context: TransformationContext) { const newParam = factory.updateParameterDeclaration( p, maskModifiers(factory, p, modifierMask), - p.dotDotDotToken, + p.dotDotDotToken, filterBindingPatternInitializersAndRenamings(p.name), resolver.isOptionalParameter(p) ? (p.questionToken || factory.createToken(SyntaxKind.QuestionToken)) : undefined, ensureType(p, type || p.type, /*ignorePrivate*/ true), // Ignore private param props, since this type is going straight back into a param @@ -828,7 +851,6 @@ export function transformDeclarations(context: TransformationContext) { } if (isolatedDeclarations && localInferenceResolver) { return localInferenceResolver.fromInitializer(node, type, currentSourceFile); - } const shouldUseResolverType = node.kind === SyntaxKind.Parameter && (resolver.isRequiredInitializedParameter(node) || @@ -1091,7 +1113,7 @@ export function transformDeclarations(context: TransformationContext) { } // Augmentation of export depends on import if (resolver.isImportRequiredByAugmentation(decl)) { - if(isolatedDeclarations) { + if (isolatedDeclarations) { // TODO: Should report better error here. Suggest we add the syntax import type '....' // Also add a test for this. reportIsolatedDeclarationError(decl); @@ -1177,10 +1199,12 @@ export function transformDeclarations(context: TransformationContext) { if (isDeclaration(input)) { if (isDeclarationAndNotVisible(input)) return; if (hasDynamicName(input) && !resolver.isLateBound(getParseTreeNode(input) as Declaration)) { - if (isolatedDeclarations && hasIdentifierComputedName(input) && + if ( + isolatedDeclarations && hasIdentifierComputedName(input) && // When --noImplicitAny is off, it's automatically 'any' type so we shouldn't complain. // when it's on, it should be an error on the noImplicitAny side, so we also shouldn't complain. - !isInterfaceDeclaration(input.parent) && !isTypeLiteralNode(input.parent)) { + !isInterfaceDeclaration(input.parent) && !isTypeLiteralNode(input.parent) + ) { reportIsolatedDeclarationError(input); } else { @@ -1279,9 +1303,8 @@ export function transformDeclarations(context: TransformationContext) { if (isPrivateIdentifier(input.name)) { return cleanup(/*returnValue*/ undefined); } - const accessorType = - isolatedDeclarations ? - input.type: + const accessorType = isolatedDeclarations ? + input.type : getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input)); return cleanup(factory.updateGetAccessorDeclaration( input, @@ -1602,7 +1625,7 @@ export function transformDeclarations(context: TransformationContext) { /*body*/ undefined, )); if (clean && resolver.isExpandoFunction(input) && shouldEmitFunctionProperties(input)) { - if(isolatedDeclarations) { + if (isolatedDeclarations) { context.addDiagnostic(createDiagnosticForNode( input, Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function, @@ -1628,7 +1651,7 @@ export function transformDeclarations(context: TransformationContext) { let type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags, symbolTracker); getSymbolAccessibilityDiagnostic = oldDiag; - if(isolatedDeclarations) { + if (isolatedDeclarations) { reportIsolatedDeclarationError(p.valueDeclaration); type = factory.createTypeReferenceNode("invalid"); } @@ -1821,13 +1844,14 @@ export function transformDeclarations(context: TransformationContext) { // Isolated declarations does not allow inferred type in the extends clause if (isolatedDeclarations) { - if( + 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) { + extendsClause.expression.kind !== SyntaxKind.TrueKeyword + ) { reportIsolatedDeclarationError(extendsClause); } return cleanup(factory.updateClassDeclaration( @@ -1835,14 +1859,13 @@ export function transformDeclarations(context: TransformationContext) { modifiers, input.name, typeParameters, - factory.createNodeArray([factory.createHeritageClause(SyntaxKind.ExtendsKeyword, - [ - factory.createExpressionWithTypeArguments( - factory.createIdentifier("invalid"), - /*typeArguments*/ undefined, - ) - ])]), - members + factory.createNodeArray([factory.createHeritageClause(SyntaxKind.ExtendsKeyword, [ + factory.createExpressionWithTypeArguments( + factory.createIdentifier("invalid"), + /*typeArguments*/ undefined, + ), + ])]), + members, )); } const oldId = input.name ? unescapeLeadingUnderscores(input.name.escapedText) : "default"; @@ -1894,14 +1917,16 @@ export function transformDeclarations(context: TransformationContext) { case SyntaxKind.EnumDeclaration: { return cleanup(factory.updateEnumDeclaration( input, - factory.createNodeArray(ensureModifiers(input)), + factory.createNodeArray(ensureModifiers(input)), input.name, factory.createNodeArray(mapDefined(input.members, m => { if (shouldStripInternal(m)) return; if (isolatedDeclarations) { - if (m.initializer && !resolver.isLiteralConstDeclaration(m) && + if ( + m.initializer && !resolver.isLiteralConstDeclaration(m) && // This will be its own compiler error instead, so don't report. - !isComputedPropertyName(m.name)) { + !isComputedPropertyName(m.name) + ) { reportIsolatedDeclarationError(m); } } 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/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 3d7754c2f541c..c28e0a79600a1 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -1,3 +1,7 @@ +import { + getCommentRange, + setCommentRange, +} from "../../_namespaces/ts"; import { Debug, } from "../../debug"; @@ -345,6 +349,7 @@ export function createLocalInferenceResolver({ name: PropertyName; location: number; }>(); + let replaceWithInvalid = false; for (let propIndex = 0, length = objectLiteral.properties.length; propIndex < length; propIndex++) { const prop = objectLiteral.properties[propIndex]; @@ -362,6 +367,7 @@ export function createLocalInferenceResolver({ if (isComputedPropertyName(prop.name)) { if (!resolver.isLiteralComputedName(prop.name)) { reportIsolatedDeclarationError(node); + replaceWithInvalid = true; continue; } if (isEntityNameExpression(prop.name.expression)) { @@ -449,6 +455,12 @@ export function createLocalInferenceResolver({ } if (newProp) { + const commentRange = getCommentRange(prop); + setCommentRange(newProp, { + pos: commentRange.pos, + end: newProp.name.end, + }); + if (nameKey) { if (existingMember !== undefined && !isMethodDeclaration(prop)) { properties[existingMember.location] = newProp; @@ -467,7 +479,7 @@ export function createLocalInferenceResolver({ } } - const typeNode: TypeNode = factory.createTypeLiteralNode(properties); + const typeNode: TypeNode = replaceWithInvalid ? makeInvalidType() : factory.createTypeLiteralNode(properties); return regular(typeNode, objectLiteral, inheritedObjectTypeFlags); } } From b0d064d94d1e43d141d33e6b33f8bbc0362829dc Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 25 Sep 2023 10:44:19 +0100 Subject: [PATCH 073/224] Added sample parallel builder. Signed-off-by: Titian Cernicova-Dragomir --- .dprint.jsonc | 1 + parallel-build/.gitignore | 12 + parallel-build/README.md | 57 ++++ .../src/dep-builder/build-task-files.ts | 243 ++++++++++++++++++ .../dep-builder/dep-builder-package.json.ts | 92 +++++++ .../dep-builder/dep-builder-tsconfig.json.ts | 100 +++++++ parallel-build/src/main.ts | 233 +++++++++++++++++ parallel-build/src/protocol.ts | 40 +++ parallel-build/src/run-all-tasks.ts | 77 ++++++ parallel-build/src/single-thread-worker.ts | 42 +++ parallel-build/src/utils.ts | 18 ++ .../src/worker-utils/build-declarations.ts | 42 +++ .../src/worker-utils/build-tsc-b.ts | 26 ++ .../src/worker-utils/build-tsc-p.ts | 77 ++++++ .../src/worker-utils/build-tsc-shard.ts | 168 ++++++++++++ parallel-build/src/worker-utils/cache.ts | 151 +++++++++++ .../src/worker-utils/clean-project.ts | 37 +++ parallel-build/src/worker-utils/utils.ts | 26 ++ parallel-build/src/worker.ts | 77 ++++++ .../computedPropertiesNarrowed.errors.txt | 80 ++++++ .../reference/computedPropertiesNarrowed.js | 88 +++++++ .../computedPropertiesNarrowed.symbols | 125 +++++++++ .../computedPropertiesNarrowed.types | 167 ++++++++++++ .../compiler/computedPropertiesNarrowed.ts | 52 ++++ 24 files changed, 2031 insertions(+) create mode 100644 parallel-build/.gitignore create mode 100644 parallel-build/README.md create mode 100644 parallel-build/src/dep-builder/build-task-files.ts create mode 100644 parallel-build/src/dep-builder/dep-builder-package.json.ts create mode 100644 parallel-build/src/dep-builder/dep-builder-tsconfig.json.ts create mode 100644 parallel-build/src/main.ts create mode 100644 parallel-build/src/protocol.ts create mode 100644 parallel-build/src/run-all-tasks.ts create mode 100644 parallel-build/src/single-thread-worker.ts create mode 100644 parallel-build/src/utils.ts create mode 100644 parallel-build/src/worker-utils/build-declarations.ts create mode 100644 parallel-build/src/worker-utils/build-tsc-b.ts create mode 100644 parallel-build/src/worker-utils/build-tsc-p.ts create mode 100644 parallel-build/src/worker-utils/build-tsc-shard.ts create mode 100644 parallel-build/src/worker-utils/cache.ts create mode 100644 parallel-build/src/worker-utils/clean-project.ts create mode 100644 parallel-build/src/worker-utils/utils.ts create mode 100644 parallel-build/src/worker.ts create mode 100644 tests/baselines/reference/computedPropertiesNarrowed.errors.txt create mode 100644 tests/baselines/reference/computedPropertiesNarrowed.js create mode 100644 tests/baselines/reference/computedPropertiesNarrowed.symbols create mode 100644 tests/baselines/reference/computedPropertiesNarrowed.types create mode 100644 tests/cases/compiler/computedPropertiesNarrowed.ts diff --git a/.dprint.jsonc b/.dprint.jsonc index 89cebc2b89a30..d8d49e647ec2c 100644 --- a/.dprint.jsonc +++ b/.dprint.jsonc @@ -49,6 +49,7 @@ "**/*.generated.*", "scripts/*.d.*", "external-declarations/tsc-tests/**", + "external-declarations/tests/**", "external-declarations/fixer-test/**" ], "plugins": [ diff --git a/parallel-build/.gitignore b/parallel-build/.gitignore new file mode 100644 index 0000000000000..813c8d27fe7c2 --- /dev/null +++ b/parallel-build/.gitignore @@ -0,0 +1,12 @@ +/build +/node_modules +/src/*.tsbuildinfo +/tests/actual +/tsc-tests +/tasks +/tasks-stats* +/tasks-times +clean.json +results +*.txt +*.json \ No newline at end of file diff --git a/parallel-build/README.md b/parallel-build/README.md new file mode 100644 index 0000000000000..bf3016ee6d1e8 --- /dev/null +++ b/parallel-build/README.md @@ -0,0 +1,57 @@ +1. Build typescript +```sh + cd typescript + npx hereby local +``` +2. Build external-declarations +```sh + cd external-declarations + npm run build +``` +3. Build parallel-build +```sh + cd parallel-build + npm run build +``` +4. Create task dirs in the parallel-build folder +```sh + cd parallel-build + mkdir tasks + mkdir tasks-stats + mkdir tasks-times +``` + +5. Create task files by pointing to one or more composite project tsconfigs (referenced projects will be discovered): +```sh + cd parallel-build + node ./build/dep-builder/dep-builder-tsconfig.json.js tsconfig.json +``` + +The task folder should now contain task configurations for different build types: + - `b=T` - just use `tsc -b` equivalent + - `isolatedDeclarations=F` - parallel build with topological sort based on dependencies + - `isolatedDeclarations=T` - parallel build with declaration generation at the beginning + - `cpus=X` - number of workers to use for each build (for `-b` it makes no difference since it is single threaded, unless there are multiple root projects) + +7. Test that build works for all build types. + +```sh +# tsc -b +node ./build/main.js ./tasks/clean.json +node ./build/main.js ./tasks/b\=T-isolatedDeclarations\=F-cpus\=6.json + +# topological order +node ./build/main.js ./clean.json +node ./build/main.js ./tasks/b\=F-isolatedDeclarations\=F-cpus\=6.json + +# isolated declarations full parallelism +node ./build/main.js ./clean.json +node ./build/main.js ./tasks/b\=F-isolatedDeclarations\=T-cpus\=6.json +``` + +8. Run the full test suite (will run each task in the task folder 11 times (1st for task ordering times, 10 for perf metrics) ) +Each task will run 11 time, with a clean in between and a 1s pause + +```sh +node ./build/run-all-tasks.js +``` \ No newline at end of file diff --git a/parallel-build/src/dep-builder/build-task-files.ts b/parallel-build/src/dep-builder/build-task-files.ts new file mode 100644 index 0000000000000..85c6310e8d2a1 --- /dev/null +++ b/parallel-build/src/dep-builder/build-task-files.ts @@ -0,0 +1,243 @@ +import * as fs from "node:fs/promises"; + +import * as path from "path"; +import { + CompilerOptions, +} from "typescript"; + +import { + Message, + Task, +} from "../protocol.js"; + +export interface PackageInfo { + name: string; + dependencies: string[]; + path: string; +} +export async function buildTaskFiles( + outputPath: string, + bundles: PackageInfo[], + tsconfig: (string | null)[] = ["tsconfig.json"], + declarationConfig: string | undefined | null = "tsconfig.json", +) { + const bundleNames = new Set(bundles.map(b => b.name)); + + const taskName = (name: string | null) => + tsconfig.length === 1 ? "" : + name === declarationConfig ? "-declaration" : + name ? "-" + path.basename(name).replace(".json", "").replace("tsconfig.", "") : + name; + + const makeTask = (b: PackageInfo, tscConfig: string | null, name = taskName(tscConfig)): Task => ({ + name: b.name + name, + group: b.name, + dependencies: b.dependencies.filter(d => bundleNames.has(d)).map(d => d + name), + config: { + type: "tsc", + project: tscConfig ? path.join(b.path, tscConfig) : b.path, + redirectDeclarationOutput: true, + tsconfigOverrides: {}, + }, + }); + const tasks = bundles.flatMap(b => tsconfig.map(tscConfig => makeTask(b, tscConfig))); + interface ConfigFile { + globalTsOverrides: CompilerOptions; + tasks: Task[]; + } + interface VarOption { + values: T[]; + make: (value: T, data: ConfigFile) => ConfigFile; + name: K; + format: (v: T) => string; + } + function makeOption( + name: K, + values: T[], + make: (v: T, data: ConfigFile) => ConfigFile, + format?: (v: T) => string, + ): VarOption { + return { + values, + make, + name, + format: format ?? (v => `${v}`), + }; + } + function booleanCompilerOption(key: K, make?: (v: boolean, data: ConfigFile) => ConfigFile) { + const defaultMaker: VarOption["make"] = (value, data) => { + return { + ...data, + globalTsOverrides: { + ...data.globalTsOverrides, + [key]: value, + }, + }; + }; + return makeOption( + key, + [true, false], + make ? (v, d) => make(v, defaultMaker(v, d)) : defaultMaker, + v => v ? "T" : "F", + ); + } + + const baseConfigFileData = { + globalTsOverrides: { + allowJs: false, + skipLibCheck: true, + } as CompilerOptions, + tasks, + }; + + const cleanTasks = { + ...baseConfigFileData, + tasks: tasks.map(t => ({ + ...t, + config: { + ...t.config, + type: "clean", + }, + })), + }; + await fs.writeFile(path.join(outputPath, `clean.json`), JSON.stringify(cleanTasks, undefined, 2)); + + const ensureDeclarationTask = (d: string) => d.endsWith("-declarations") ? d : d + "-declarations"; + const options = [ + booleanCompilerOption("b", (value, data) => { + if (!value) return data; + const leafTasks = tasks.filter(t => tasks.every(s => s.dependencies.indexOf(t.name) === -1)); + return { + ...data, + tasks: leafTasks.map((t, i) => ({ + ...t, + dependencies: leafTasks[i + 1] ? [leafTasks[i + 1].name] : [], + config: t.config.type !== "tsc" ? t.config : { + ...t.config, + type: "tsc-b", + }, + })), + }; + }), + booleanCompilerOption("isolatedDeclarations", (v, d) => { + if (!v) return d; + return { + ...d, + tasks: [ + ...bundles.map(b => makeTask(b, declarationConfig, "-declarations")).map(t => ({ + ...t, + config: { + ...t.config, + type: "declaration", + tsconfigOverrides: {}, + } as Message, + name: t.name, + dependencies: [], + })), + ...d.tasks.map(t => ({ + ...t, + config: { + ...t.config, + type: "tsc", + tsconfigOverrides: { + declaration: false, + }, + } as Message, + name: t.name, + dependencies: [ + ensureDeclarationTask(t.name), + ...t.dependencies.map(ensureDeclarationTask), + ], + })), + ], + }; + }), + // booleanCompilerOption("deps", (value, data) => { + // if (value) return data; + // return { + // ...data, + // tasks: data.tasks.map(t => ({ + // ...t, + // dependencies: [] + // })) + // } + // }), + // booleanCompilerOption("declaration"), + // booleanCompilerOption("skipLibCheck"), + // booleanCompilerOption("noEmit", (v, d) => ({ + // ...d, + // globalTsOverrides: { + // ...d.globalTsOverrides, + // noEmit: d.tasks.some(t => t.config.type === "tsc-b") ? false: true, + // }, + // tasks: d.tasks.map(t => ({...t, suppressOutput: true})), + // })), + makeOption("cpus", [6, 8, 10, 12, 16, 24], (n, data) => ({ + ...data, + cpus: n, + })), + ]; + + const varValueIndexes = options.map(() => 0); + type FileOptions = { + [P in typeof options[number] as P["name"]]: P["values"][number]; + }; + function validateConfiguration(o: FileOptions) { + // if(o.b && !o.declaration) return false; + if (o.b && o.isolatedDeclarations) return false; + // if(o.b && !o.deps) return false; + if (o.b && o.cpus > 6) return false; + if (!o.b && !o.isolatedDeclarations && o.cpus > 10) return false; + // if(o.deps && o.cpus > 8) return false; + return true; + } + function next() { + for (let i = 0; i < options.length; i++) { + varValueIndexes[i]++; + if (varValueIndexes[i] >= options[i].values.length) { + varValueIndexes[i] = 0; + if (i === options.length - 1) { + return false; + } + continue; + } + break; + } + return true; + } + + while (true) { + let configFileData = baseConfigFileData; + const fileName = []; + const currentOptions: FileOptions = {} as FileOptions; + for (let i = 0; i < options.length; i++) { + const opt = options[i]; + const value = opt.values[varValueIndexes[i]]; + configFileData = opt.make(value as never, configFileData); + fileName.push(`${opt.name}=${opt.format(value as never)}`); + currentOptions[opt.name] = value as never; + } + if (validateConfiguration(currentOptions)) { + await fs.writeFile(path.join(outputPath, `${fileName.join("-")}.json`), JSON.stringify(configFileData, undefined, 2)); + } + if (!next()) break; + } + + // const leafTasks = tasks + // .filter(t => tasks.every(s => s.dependencies.indexOf(t.name) === -1)); + // fs.writeFile(`./tasks-leafs.json`, JSON.stringify({ + // globalTsOverrides: { + // allowJs: false, + // } as CompilerOptions, + // tasks: leafTasks.map((t, i) => ({ + // ...t, + // config: { + // ...t.config, + // type: "tsc-b" + // }, + // dependencies: i === leafTasks.length - 1 ? [] : [leafTasks[i + 1].name] + // })), + // }, undefined, 2)); + + // console.log(tasks); +} diff --git a/parallel-build/src/dep-builder/dep-builder-package.json.ts b/parallel-build/src/dep-builder/dep-builder-package.json.ts new file mode 100644 index 0000000000000..d79f4e1e03848 --- /dev/null +++ b/parallel-build/src/dep-builder/dep-builder-package.json.ts @@ -0,0 +1,92 @@ +import * as fs from "node:fs/promises"; +import * as pathModule from "node:path"; + +import { + buildTaskFiles, +} from "./build-task-files.js"; + +function listFiles(path: string, spec: RegExp, options: { recursive?: boolean; exclude?: RegExp; } = {}, depth = Number.MAX_SAFE_INTEGER) { + async function filesInFolder(folder: string, depth: number) { + let paths: string[] = []; + + for (const file of await fs.readdir(folder)) { + const pathToFile = pathModule.join(folder, file); + const stat = await fs.stat(pathToFile); + if (depth !== 0 && options.recursive && stat.isDirectory() && !options.exclude?.exec(pathToFile)) { + paths = paths.concat(await filesInFolder(pathToFile, depth - 1)); + } + else if (stat.isFile() && (!spec || file.match(spec))) { + paths.push(pathToFile); + } + } + + return paths; + } + + return filesInFolder(path, depth); +} + +async function loadBundles(directory: string) { + const files = await listFiles(directory, /package.json/, { + recursive: true, + exclude: /(node_modules)|([\\/]\.)/, + }, 2); + return files.filter(r => pathModule.dirname(r) !== directory); +} + +async function loadBundlesDependencies(packageJsonList: string[]) { + const dependencyInfo: Record = {}; + for (const packagePath of packageJsonList) { + const packageInfo = JSON.parse(await fs.readFile(packagePath, { encoding: "utf-8" })); + dependencyInfo[packageInfo.name] = { + name: packageInfo.name, + dependencies: [ + ...((packageInfo.dependencies && Object.keys(packageInfo.dependencies)) ?? []), + ...((packageInfo.devDependencies && Object.keys(packageInfo.devDependencies)) ?? []), + ], + path: pathModule.dirname(packagePath), + references: [], + }; + } + function depth(name: string): number { + const entry = dependencyInfo[name]; + if (entry === undefined) return 0; + if (entry.depth) return entry.depth; + + entry.depth = 1 + Math.max(...entry.dependencies.map(depth)); + return entry.depth; + } + + const sortedBundles = Object.values(dependencyInfo).sort((a, b) => depth(a.name) - depth(b.name)); + + sortedBundles.forEach(b => { + b.dependencies = b.dependencies.filter(n => { + const entry = dependencyInfo[n]; + if (entry) { + entry.references.push(b.name); + } + return !!entry; + }); + }); + return sortedBundles; +} + +async function main() { + const path = process.argv[2]; + const outPath = process.argv[3] ?? "./tasks"; + const packageJsonPaths = await loadBundles(path); + const packageInfoList = await loadBundlesDependencies(packageJsonPaths); + await buildTaskFiles(outPath, packageInfoList, [ + "tsconfig.es.json", + "tsconfig.cjs.json", + "tsconfig.types.json", + ], "tsconfig.types.json"); +} + +main(); diff --git a/parallel-build/src/dep-builder/dep-builder-tsconfig.json.ts b/parallel-build/src/dep-builder/dep-builder-tsconfig.json.ts new file mode 100644 index 0000000000000..feeef0f01996c --- /dev/null +++ b/parallel-build/src/dep-builder/dep-builder-tsconfig.json.ts @@ -0,0 +1,100 @@ +import * as fs from "node:fs/promises"; +import * as pathModule from "node:path"; + +import JSONC from "json5"; + +import { + buildTaskFiles, + PackageInfo, +} from "./build-task-files.js"; + +function listFiles(path: string, spec: RegExp, options: { recursive?: boolean; exclude?: RegExp; } = {}, depth = Number.MAX_SAFE_INTEGER) { + async function filesInFolder(folder: string, depth: number) { + let paths: string[] = []; + + for (const file of await fs.readdir(folder)) { + const pathToFile = pathModule.join(folder, file); + const stat = await fs.stat(pathToFile); + if (depth !== 0 && options.recursive && stat.isDirectory() && !options.exclude?.exec(pathToFile)) { + paths = paths.concat(await filesInFolder(pathToFile, depth - 1)); + } + else if (stat.isFile() && (!spec || file.match(spec))) { + paths.push(pathToFile); + } + } + + return paths; + } + + return filesInFolder(path, depth); +} + +async function loadBundlesDependencies(tsConfigs: string[]) { + const dependencyInfo: Record< + string, + PackageInfo & { + depth?: number; + } + > = {}; + + async function loadTsConfig(filePath: string): Promise { + let resolvedPath = pathModule.resolve(filePath); + + const stat = await fs.stat(resolvedPath); + if (stat.isDirectory()) { + resolvedPath = pathModule.join(resolvedPath, "tsconfig.json"); + } + + if (dependencyInfo[resolvedPath]) return resolvedPath; + const tsConfigData = JSONC.parse(await fs.readFile(resolvedPath, { encoding: "utf-8" })) as { + references: { + path: string; + }[]; + }; + const configInfo: PackageInfo = dependencyInfo[resolvedPath] = { + name: resolvedPath, + path: resolvedPath, + dependencies: [], + }; + const directory = pathModule.dirname(resolvedPath); + if (tsConfigData.references) { + for (const ref of tsConfigData.references) { + configInfo.dependencies.push(await loadTsConfig(pathModule.join(directory, ref.path))); + } + } + return resolvedPath; + } + + for (const tsConfig of tsConfigs) { + await loadTsConfig(tsConfig); + } + function depth(name: string): number { + const entry = dependencyInfo[name]; + if (entry === undefined) return 0; + if (entry.depth) return entry.depth; + + + entry.depth = 1 + (entry.dependencies.length === 0? 0: Math.max(...entry.dependencies.map(depth))); + return entry.depth; + } + + const sortedBundles = Object.values(dependencyInfo).sort((a, b) => depth(a.name) - depth(b.name)); + + sortedBundles.forEach(b => { + b.dependencies = b.dependencies.filter(n => { + const entry = dependencyInfo[n]; + return !!entry; + }); + }); + return sortedBundles; +} + +async function main() { + const paths = process.argv.slice(2); + const outPath = "./tasks"; + const packageInfoList = await loadBundlesDependencies(paths); + // eslint-disable-next-line no-null/no-null + await buildTaskFiles(outPath, packageInfoList, [null], /*declarationConfig*/ null); +} + +main(); diff --git a/parallel-build/src/main.ts b/parallel-build/src/main.ts new file mode 100644 index 0000000000000..3219a3b8de455 --- /dev/null +++ b/parallel-build/src/main.ts @@ -0,0 +1,233 @@ +import { + fork, + spawn, +} from "node:child_process"; +import * as fs from "node:fs/promises"; +import * as os from "node:os"; +import * as path from "node:path"; +import { + Worker, +} from "node:worker_threads"; + +import JSONC from "json5"; +import { + CompilerOptions, +} from "typescript"; + +import { + Task, +} from "./protocol.js"; +import { + makeSingleThreadedWorker, +} from "./single-thread-worker.js"; +import { + taskNameLog, +} from "./utils.js"; + +const useProcess = process.argv.indexOf("--use-processes") !== -1; +const singleThread = process.argv.indexOf("--single-thread") !== -1; +const cpuOverride = process.argv.map(v => /^--cpus=(?[0-9]+)$/.exec(v)).map(m => Number(m?.groups?.value)).find(v => !isNaN(v)); + +interface AbstractWorker { + postMessage(value: any): void; + once(event: "message", listener: (data: unknown) => void): void; + terminate(): void; +} +function makeWorker(index: number): AbstractWorker { + if (singleThread) { + return makeSingleThreadedWorker(); + } + if (!useProcess) { + return new Worker("./build/worker.js", { + workerData: { + workerIndex: index, + }, + }); + } + const childProcess = fork(path.resolve(`./build/worker.js`), [`--worker-index=${index}`]); + return { + postMessage(value: any) { + childProcess.send(value); + }, + once(event: "message", listener: (data: unknown) => void) { + childProcess.once(event, listener); + }, + terminate() { + childProcess.kill(); + }, + }; +} +interface WorkerInfo { + dependencies: Set; + groups: Set; + worker: AbstractWorker; + workTime: number; +} +function countIntersection(set: Set, items: T[]) { + let c = 0; + for (const item of items) { + if (set.has(item)) { + c++; + } + } + return c; +} +async function main() { + const taskFile = process.argv.slice(2).find(s => !s.startsWith("--")); + if (!taskFile) return; + + const timeFile = path.join(path.dirname(taskFile) + "-times", path.basename(taskFile)); + const existingTaskTimes: Record = await (async () => { + try { + return JSONC.parse(await fs.readFile(timeFile, { encoding: "utf8" })); + } + catch (e) { + return {}; + } + })(); + const getTaskTime = (name: string) => existingTaskTimes[name] ?? Number.MAX_SAFE_INTEGER; + const taskFileConfig = JSONC.parse(await fs.readFile(taskFile, { encoding: "utf-8" })) as { + cpus?: number; + tasks: Task[]; + globalTsOverrides: CompilerOptions; + }; + + let maxParallelTasks = 0; + let groupCollocation = 0; + const startTime = new Date(); + const workerCount = singleThread ? 1 : cpuOverride ?? taskFileConfig.cpus ?? Math.round(os.cpus().length / 2); + const workers: WorkerInfo[] = Array.from({ length: workerCount }).map((_, i) => ({ + worker: makeWorker(i + 1), + groups: new Set(), + dependencies: new Set(), + workTime: 0, + })); + const activeTasks: Promise[] = []; + const tasks: Task[] = taskFileConfig.tasks; + const completedTasks = new Set(); + const taskTimes: Record = {}; + tasks.sort((a, b) => (getTaskTime(b.group ?? b.name) - getTaskTime(a.group ?? a.name))); + const scheduledTasksOrder: string[] = []; + while (tasks.length) { + const nextTasks = tasks.filter(t => t.dependencies.every(d => completedTasks.has(d))); + if (nextTasks.length === 0) { + console.log(`${taskNameLog("NONE")}: Waiting for deps to finish. Unscheduled Tasks: ${tasks.length}`); + if(activeTasks.length === 0) { + throw new Error(`No tasks are running but tasks still have required dependencies. Check your task file. Sample uncompleted task: ${tasks[0].dependencies.find(o => !completedTasks.has(o))}`) + } + await waitForTaskCompletion(); + continue; + } + const workerInfo = await waitForWorker(); + + let task = nextTasks.find(t => workerInfo.groups.has(t.group)); + if (!task) { + // Sort task by dependency overlap + nextTasks.sort((a, b) => countIntersection(workerInfo.dependencies, a.dependencies) - countIntersection(workerInfo.dependencies, b.dependencies)); + task = nextTasks[0]; + } + else { + groupCollocation++; + } + + if (task.config.type === "tsc" || task.config.type === "tsc-b" || task.config.type === "tsc-shard") { + task.config.tsconfigOverrides = { + ...taskFileConfig.globalTsOverrides, + ...task.config.tsconfigOverrides, + }; + } + tasks.splice(tasks.indexOf(task), 1); + const taskStart = new Date(); + scheduledTasksOrder.push(task.name); + workerInfo.groups.add(task.group); + task.dependencies.forEach(d => workerInfo.dependencies.add(d)); + queueTask(workerInfo, task, () => { + completedTasks.add(task!.name); + const time = new Date().getTime() - taskStart.getTime(); + taskTimes[task!.group ?? task!.name] = (taskTimes[task!.group ?? task!.name] ?? 0) + time; + workerInfo.workTime += time; + console.log(`${taskNameLog(task!.name)}: Finish Message in ${Math.round(time / 1000)}s`); + }); + } + console.log(`${taskNameLog("NONE")}: ALL TASKS HAVE BEEN SCHEDULED`); + await Promise.all([...activeTasks]); + workers.forEach(w => w.worker.terminate()); + + const time = new Date().getTime() - startTime.getTime(); + console.log(`${taskNameLog("NONE")}: Finished all in ${time / 1000}s ${time / 1000 / 60}m`); + // console.log(scheduledTasksOrder.join("\n")); + try { + const taskTimesEntries = Object.entries(taskTimes).sort((a, b) => a[1] - b[1]); + + console.log( + "Worker Times", + JSON.stringify( + { + groupCollocation, + groups: taskTimesEntries.length, + times: workers.map(w => ({ time: w.workTime, groups: [...w.groups] })), + }, + undefined, + 2, + ), + ); + + await fs.writeFile(timeFile, JSON.stringify(Object.fromEntries(taskTimesEntries), undefined, 2)); + + const statFile = path.join( + path.dirname(taskFile) + "-stats", + `${Date.now()}-` + path.basename(taskFile.substring(0, taskFile.length - ".json".length)) + ".json", + ); + await fs.writeFile( + statFile, + JSON.stringify( + { + startTime: startTime.getTime(), + executionTime: time, + cumulatedTime: taskTimesEntries.reduce((s, [_, v]) => s + v, 0), + maxParallelTasks, + taskTimes, + taskFileConfig, + }, + undefined, + 2, + ), + ); + } + catch (e) { + console.log("Failed to write times and stats"); + } + + async function waitForTaskCompletion() { + return Promise.any([...activeTasks]); + } + async function waitForWorker() { + let wInfo = workers.pop()!; + while (!wInfo) { + console.log(`${taskNameLog("NONE")}: Waiting for worker - Active Tasks: ${activeTasks.length} - Unscheduled Tasks: ${tasks.length}`); + await waitForTaskCompletion(); + wInfo = workers.pop()!; + } + return wInfo; + } + function queueTask(wInfo: WorkerInfo, task: Task, onTaskCompleted: () => void) { + const taskPromise = new Promise(resolve => { + console.log(`${taskNameLog(task.name)}: Start Message`); + wInfo.worker.once("message", () => { + console.log(`${taskNameLog(task.name)}: Finish Message`); + workers.push(wInfo); + onTaskCompleted(); + activeTasks.splice(activeTasks.indexOf(taskPromise), 1); + resolve(); + }); + wInfo.worker.postMessage({ + name: task.name, + config: task.config, + }); + }); + activeTasks.push(taskPromise); + maxParallelTasks = Math.max(maxParallelTasks, activeTasks.length); + } +} + +main(); diff --git a/parallel-build/src/protocol.ts b/parallel-build/src/protocol.ts new file mode 100644 index 0000000000000..bff4fd9f1a392 --- /dev/null +++ b/parallel-build/src/protocol.ts @@ -0,0 +1,40 @@ +import { + CompilerOptions, +} from "typescript"; + +export interface Task { + name: string; + config: Message; + dependencies: string[]; + group: string; +} + +export type Message = + | { + type: "exit"; + } + | ( + ({ type: "tsc"; } | { type: "tsc-shard"; shard: number; shardCount: number; }) & { + project: string; + suppressOutput?: boolean; + redirectDeclarationOutput?: boolean; + tsconfigOverrides: CompilerOptions; + } + ) + | { + type: "declaration"; + project: string; + tsconfigOverrides: CompilerOptions; + } + | { + type: "tsc-b"; + project: string; + suppressOutput?: boolean; + redirectDeclarationOutput?: boolean; + tsconfigOverrides: CompilerOptions; + } + | { + type: "clean"; + project: string; + tsconfigOverrides: CompilerOptions; + }; diff --git a/parallel-build/src/run-all-tasks.ts b/parallel-build/src/run-all-tasks.ts new file mode 100644 index 0000000000000..067fcc2f9a241 --- /dev/null +++ b/parallel-build/src/run-all-tasks.ts @@ -0,0 +1,77 @@ +import * as child from "node:child_process"; +import path from "node:path"; + +import * as fs from "fs/promises"; +import * as sys from "systeminformation" + +const taskDir = "./tasks"; +const statsDir = taskDir + "-stats"; +const timesDir = taskDir + "-times"; +function runTaskFile(taskFile: string, env?: NodeJS.ProcessEnv) { + return child.execFileSync(`node ./build/main.js ${taskFile} --use-worker`, { + shell: true, + encoding: "utf8", + // env, + }); +} + +function delay(ms: number) { + // eslint-disable-next-line no-restricted-globals + return new Promise(r => setTimeout(r, ms)); +} +async function runAllTests(runCount = 1, skipSet = new Set()) { + const taskFiles = await fs.readdir("./tasks"); + taskFiles.sort((a, b) => b.localeCompare(a)); + + for (let i = 0; i < runCount; i++) { + for (let t = 0; t < taskFiles.length; t++) { + const taskFile = taskFiles[t]; + if (skipSet.has(taskFile)) continue; + + runTaskFile("./tasks/clean.json", {}); + await delay(10 * 1000); + console.log(`Running Task ${(t + 1)}/${taskFiles.length}. Run ${i}. ${taskFile}`); + const result = runTaskFile(path.join("./tasks", taskFile)); + + if (result.indexOf("Has Errors") !== -1 || result.indexOf("Fatal Error") !== -1) { + console.log(`Errors for ${taskFile}`); + const errorFile = `${Date.now()}-` + path.basename(taskFile.substring(0, taskFile.length - ".json".length)) + ".log"; + await fs.writeFile(path.join(statsDir, errorFile), result); + } + } + } +} + +async function exists(path: string) { + try { + await fs.access(path); + return true; + } + catch (e) { + return false; + } +} + +if (await exists(statsDir)) { + const files = await fs.readdir(statsDir); + if (files.length) { + const time = files[0].split("-"); + await fs.rename(statsDir, statsDir + "-" + time[0]); + } + else { + await fs.rm(statsDir, { recursive: true }); + } +} +await fs.mkdir(statsDir); + +const existingTestFiles = new Set(); +if (!(await exists(timesDir))) { + await fs.mkdir(timesDir); +} +else { + (await fs.readdir(timesDir)).forEach(t => existingTestFiles.add(t)); +} +await runAllTests(1, existingTestFiles); // First run to ensure times. +await fs.rm(statsDir, { recursive: true }); +await fs.mkdir(statsDir); +await runAllTests(10); diff --git a/parallel-build/src/single-thread-worker.ts b/parallel-build/src/single-thread-worker.ts new file mode 100644 index 0000000000000..4276946464e5d --- /dev/null +++ b/parallel-build/src/single-thread-worker.ts @@ -0,0 +1,42 @@ +import { + nextTick, +} from "process"; +import { + Readable, + Stream, +} from "stream"; + +export const toWorker = new Readable({ + read() {}, +}); +export const toMain = new Readable({ + read() {}, +}); + +export function makeSingleThreadedWorker() { + import("./worker.js"); + return { + postMessage(value: any) { + nextTick(function postToWorker() { + toWorker.push(JSON.stringify(value)); + }); + }, + once(event: "message", listener: (data: unknown) => void) { + toMain.once("data", value => listener(JSON.parse(value))); + }, + terminate() {}, + }; +} + +export function makeSingleThreadedParentPort() { + return { + on(event: "message", listener: (value: any) => void) { + toWorker.on("data", function receiveFromParent(value) { + listener(JSON.parse(value)); + }); + }, + postMessage(value: any) { + nextTick(() => toMain.push(JSON.stringify(value))); + }, + }; +} diff --git a/parallel-build/src/utils.ts b/parallel-build/src/utils.ts new file mode 100644 index 0000000000000..fadeea9b93ab6 --- /dev/null +++ b/parallel-build/src/utils.ts @@ -0,0 +1,18 @@ +import { + workerData, +} from "worker_threads"; + +const processWorkerIndex = process.argv.map(l => /worker-index=([0-9]*)/.exec(l)).find(m => !!m)?.[1]; +const workerIndex = +(workerData?.workerIndex ?? processWorkerIndex ?? 0); +const spaces = " "; +function pad(s: string, count = 20) { + return spaces.substring(0, count - s?.length) + s; +} +const start = Math.trunc(Date.now() / 1000 / 60 / 60 / 24); +export function taskNameLog(taskName: string) { + const time = Math.trunc((new Date().getTime() - start) / 1000); + return pad(workerIndex + "", 2) + + ": " + pad(time + "", 10) + + ": " + pad(taskName, 30) + + ""; +} diff --git a/parallel-build/src/worker-utils/build-declarations.ts b/parallel-build/src/worker-utils/build-declarations.ts new file mode 100644 index 0000000000000..5b83dc6797b42 --- /dev/null +++ b/parallel-build/src/worker-utils/build-declarations.ts @@ -0,0 +1,42 @@ +import * as path from "node:path"; + +import { + transformProject, +} from "external-declarations/build/compiler/transform-project.js"; +import ts, { + CompilerOptions, +} from "typescript"; + +import type { + Message, +} from "../protocol.js"; +import { + installCache, +} from "./cache.js"; +import { + withTrace, +} from "./utils.js"; + +export function buildDeclarations(name: string, value: Extract) { + const { host, parsedConfig, rootPath } = withTrace("read-config", () => { + const configFile = ts.readConfigFile(value.project, ts.sys.readFile); + const rootPath = path.resolve(path.dirname(value.project)); + const compilerOptions: CompilerOptions = configFile.config.compilerOptions = { + ...configFile.config.compilerOptions, + ...value.tsconfigOverrides, + isolatedDeclarations: true, + }; + configFile.config.compilerOptions = compilerOptions; + const parsedConfig = ts.parseJsonConfigFileContent(configFile.config, ts.sys, rootPath); + const host = ts.createCompilerHost(parsedConfig.options, /*setParentNodes*/ true); + installCache(host); + return { rootPath, parsedConfig, host }; + }); + + transformProject( + rootPath, + /*files*/ undefined, + parsedConfig.options, + host, + ); +} diff --git a/parallel-build/src/worker-utils/build-tsc-b.ts b/parallel-build/src/worker-utils/build-tsc-b.ts new file mode 100644 index 0000000000000..955fdff62ad51 --- /dev/null +++ b/parallel-build/src/worker-utils/build-tsc-b.ts @@ -0,0 +1,26 @@ +import ts from "typescript"; + +import type { + Message, +} from "../protocol.js"; +import { + parseConfigHostFromCompilerHostLike, +} from "./utils.js"; + +export function buildTSCB(value: Extract) { + const buildHost = ts.createSolutionBuilderHost( + ts.sys, + /*createProgram*/ undefined, + d => { + console.log(d.messageText); + }, + ); + + buildHost.getParsedCommandLine = fileName => { + const parserHost = parseConfigHostFromCompilerHostLike(buildHost, ts.sys); + const config = ts.getParsedCommandLineOfConfigFile(fileName, value.tsconfigOverrides, parserHost); + return config; + }; + const builder = ts.createSolutionBuilder(buildHost, [value.project], {}); + builder.build(); +} diff --git a/parallel-build/src/worker-utils/build-tsc-p.ts b/parallel-build/src/worker-utils/build-tsc-p.ts new file mode 100644 index 0000000000000..660af0be3c8fa --- /dev/null +++ b/parallel-build/src/worker-utils/build-tsc-p.ts @@ -0,0 +1,77 @@ +import * as path from "node:path"; + +import ts, {} from "typescript"; + +import type { + Message, +} from "../protocol.js"; +import { + taskNameLog, +} from "../utils.js"; +import { + installCache, +} from "./cache.js"; +import { + withTrace, +} from "./utils.js"; + +const logErrors = process.argv.indexOf("--log-errors") !== -1; + +export function buildTSC(name: string, value: Extract) { + const { parsedConfig, host } = withTrace("read-config", () => { + const configFile = ts.readConfigFile(value.project, ts.sys.readFile); + const rootPath = path.resolve(path.dirname(value.project)); + configFile.config.compilerOptions = { + ...configFile.config.compilerOptions, + ...value.tsconfigOverrides, + }; + const parsedConfig = ts.parseJsonConfigFileContent(configFile.config, ts.sys, rootPath); + const host = ts.createCompilerHost(parsedConfig.options); + installCache(host); + return { parsedConfig, rootPath, host }; + }); + + const program = withTrace("create-program", () => + ts.createProgram({ + rootNames: parsedConfig.fileNames, + options: parsedConfig.options, + projectReferences: parsedConfig.projectReferences, + host, + })); + + const emitResult = value.tsconfigOverrides.noEmit ? undefined : withTrace("emit-js", () => + program.emit( + /*targetSourceFile*/ undefined, + /*writeFile*/ undefined, + /*cancellationToken*/ undefined, + /*emitOnly*/ !parsedConfig.options.declaration ? 0 as any : undefined, // Use undocumented emit only JS flag. + )); + const diagnostics = [ + ...withTrace("syntactic-diagnostic", () => program.getSyntacticDiagnostics()), + ...withTrace("semantic-diagnostic", () => program.getSemanticDiagnostics()), + ...withTrace("declaration-diagnostic", () => { + try { + return program.getDeclarationDiagnostics(); + } + catch (e) { + console.log(`${taskNameLog(name)}: Fatal Error ${(e as any).message}`); + return []; + } + }), + ...(emitResult?.diagnostics ?? []), + ]; + + if (diagnostics.length > 0) { + console.log(`${taskNameLog(name)}: Has Errors ${diagnostics.length}`); + diagnostics.forEach(diagnostic => { + const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n"); + if (diagnostic.file) { + const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start!); + console.log(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`); + } + else { + console.log(message); + } + }); + } +} diff --git a/parallel-build/src/worker-utils/build-tsc-shard.ts b/parallel-build/src/worker-utils/build-tsc-shard.ts new file mode 100644 index 0000000000000..ad9189dadc08f --- /dev/null +++ b/parallel-build/src/worker-utils/build-tsc-shard.ts @@ -0,0 +1,168 @@ +import fs from "node:fs"; +import * as path from "node:path"; + +import * as perf from "external-declarations/build/compiler/perf-tracer.js"; +import { + projectFilesTransformer, +} from "external-declarations/build/compiler/transform-project.js"; +import ts, {} from "typescript"; + +import type { + Message, +} from "../protocol.js"; +import { + taskNameLog, +} from "../utils.js"; +import { + installCache, +} from "./cache.js"; +import { + withTrace, +} from "./utils.js"; + +function assignFilesToShards(fileNames: string[], shardCount: number) { + const tsFiles = fileNames.filter(f => (f.endsWith(".ts") || f.endsWith(".tsx")) && !f.endsWith(".d.ts")); + const dtsFiles = fileNames.filter(f => f.endsWith(".d.ts")); + const fileStats = tsFiles.map(name => ({ + name, + size: fs.statSync(name).size, + })).sort((a, b) => b.size - a.size); + + const shardSizes: number[] = Array(shardCount).fill(0); + const shardFiles: string[][] = Array.from({ length: shardCount }).map(() => []); + + const selectShard = () => shardSizes.reduce((minIndex, v, index) => shardSizes[minIndex] > v ? index : minIndex, 0); + for (const file of fileStats) { + const shardIndex = selectShard(); + shardSizes[shardIndex] += file.size; + shardFiles[shardIndex].push(file.name); + } + return { dtsFiles, shardFiles }; +} +function changeExtension(fileName: string, newExtension: string) { + const index = fileName.lastIndexOf("."); + return fileName.substring(0, index) + newExtension; +} + +function installShardHost(parsedConfig: ts.ParsedCommandLine, host: ts.CompilerHost, value: Extract) { + const shards = withTrace("shardFiles", () => assignFilesToShards(parsedConfig.fileNames, value.shardCount)); + const declarationFile = (f: string) => changeExtension(f, ".d.ts"); + const otherShardFiles = new Map(); + const otherFilesReverseLookup = new Map(); + + shards.shardFiles.forEach((v, i) => { + if (i !== value.shard) { + v.forEach(f => { + const declFileName = declarationFile(f); + otherShardFiles.set(declFileName, f); + otherFilesReverseLookup.set(f, declFileName); + }); + } + }); + + const finalFiles = [...shards.dtsFiles, ...shards.shardFiles[value.shard]]; + parsedConfig.fileNames = finalFiles; + const originalReadFile = host.readFile.bind(host); + const originalFileExists = host.fileExists.bind(host); + const rootPath = path.resolve(path.dirname(value.project)); + const transformer = projectFilesTransformer(rootPath, parsedConfig.options); + const declarationHost = ts.createCompilerHost(parsedConfig.options, /*setParentNodes*/ true); + installCache(declarationHost, () => true); + + host.fileExists = (fileName: string) => { + if (otherFilesReverseLookup.has(fileName)) { + // Hide original source files from the compiler + return false; + } + const sourceFile = otherShardFiles.get(fileName); + if (!sourceFile) { + return originalFileExists(fileName); + } + return originalFileExists(sourceFile); + }; + const declarationFileCache = new Map(); + host.readFile = (fileName: string) => { + const sourceFile = otherShardFiles.get(fileName); + if (!sourceFile) { + return originalReadFile(fileName); + } + if (originalFileExists(fileName)) { + return originalReadFile(fileName); + } + + const cachedResult = declarationFileCache.get(fileName); + if (cachedResult) { + return cachedResult; + } + if (cachedResult === false) { + return undefined; + } + perf.tracer.current?.increment("generate-dts"); + return withTrace("generate-dts-time", () => { + const outputDeclarationFile = transformer(sourceFile, declarationHost); + const code = outputDeclarationFile ? host.readFile(outputDeclarationFile) : undefined; + declarationFileCache.set(fileName, code ?? false); + return code; + }); + }; +} +export function buildTSCShard(name: string, value: Extract) { + const { parsedConfig, host } = withTrace("read-config", () => { + const configFile = ts.readConfigFile(value.project, ts.sys.readFile); + const rootPath = path.resolve(path.dirname(value.project)); + configFile.config.compilerOptions = { + ...configFile.config.compilerOptions, + ...value.tsconfigOverrides, + }; + const parsedConfig = ts.parseJsonConfigFileContent(configFile.config, ts.sys, rootPath); + const host = ts.createCompilerHost(parsedConfig.options); + installCache(host); + return { parsedConfig, rootPath, host }; + }); + + installShardHost(parsedConfig, host, value); + + const program = withTrace("create-program", () => + ts.createProgram({ + rootNames: parsedConfig.fileNames, + options: parsedConfig.options, + projectReferences: parsedConfig.projectReferences, + host, + })); + + const emitResult = value.tsconfigOverrides.noEmit ? undefined : withTrace("emit-js", () => + program.emit( + /*targetSourceFile*/ undefined, + /*writeFile*/ undefined, + /*cancellationToken*/ undefined, + /*emitOnly*/ !parsedConfig.options.declaration ? 0 as any : undefined, // Use undocumented emit only JS flag. + )); + const diagnostics = [ + ...withTrace("syntactic-diagnostic", () => program.getSyntacticDiagnostics()), + ...withTrace("semantic-diagnostic", () => program.getSemanticDiagnostics()), + ...withTrace("declaration-diagnostic", () => { + try { + return program.getDeclarationDiagnostics(); + } + catch (e) { + console.log(`${taskNameLog(name)}: Fatal Error ${(e as any).message}`); + return []; + } + }), + ...(emitResult?.diagnostics ?? []), + ]; + + if (diagnostics.length > 0) { + console.log(`${taskNameLog(name)}: Has Errors ${diagnostics.length}`); + diagnostics.forEach(diagnostic => { + const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n"); + if (diagnostic.file) { + const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start!); + console.log(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`); + } + else { + console.log(message); + } + }); + } +} diff --git a/parallel-build/src/worker-utils/cache.ts b/parallel-build/src/worker-utils/cache.ts new file mode 100644 index 0000000000000..abe40b23e4b74 --- /dev/null +++ b/parallel-build/src/worker-utils/cache.ts @@ -0,0 +1,151 @@ +import * as path from "node:path"; + +import * as perf from "external-declarations/build/compiler/perf-tracer.js"; +import ts, { + CompilerHost, + Node, + ResolutionMode, + SourceFile, +} from "typescript"; + +import { + withTrace, +} from "./utils.js"; + +export const installCache = (function globalCache() { + type Path = string; + const toPath = (path: string) => path; + const readFileCache = new Map(); + const fileExistsCache = new Map(); + const directoryExistsCache = new Map(); + const sourceFileCache = new Map>(); + + return (host: CompilerHost, suppressDiskWrite: (file: string) => boolean = () => false) => { + const originalGetSourceFile = host.getSourceFile.bind(host); + const originalReadFile = host.readFile.bind(host); + const originalFileExists = host.fileExists.bind(host); + const originalDirectoryExists = host.directoryExists?.bind(host); + const originalCreateDirectory = ((host as any).createDirectory as (directory: string) => void).bind(host); + const originalWriteFile = host.writeFile.bind(host); + + const setReadFileCache = (key: Path, fileName: string) => { + const newValue = withTrace("read-disk", () => originalReadFile(fileName)); + readFileCache.set(key, newValue !== undefined ? newValue : false); + return newValue; + }; + host.readFile = fileName => { + const key = toPath(fileName); + const value = readFileCache.get(key); + if (value !== undefined) return value !== false ? value : undefined; // could be .d.ts from output + + return setReadFileCache(key, fileName); + }; + + // fileExists for any kind of extension + host.fileExists = fileName => { + const key = toPath(fileName); + const value = fileExistsCache.get(key); + if (value !== undefined) return value; + const newValue = withTrace("fileExists-disk", () => originalFileExists(fileName)); + fileExistsCache.set(key, !!newValue); + return newValue; + }; + if (originalWriteFile) { + host.writeFile = (fileName, data, ...rest) => { + if (!suppressDiskWrite(fileName)) { + withTrace("write-disk", () => originalWriteFile(fileName, data, ...rest)); + } + + const key = toPath(fileName); + fileExistsCache.set(key, true); + + const value = readFileCache.get(key); + readFileCache.set(key, data); + + if (value !== undefined && value !== data) { + sourceFileCache.forEach(map => map.delete(key)); + } + else { + sourceFileCache.forEach(map => { + const sourceFile = map.get(key); + if (sourceFile && sourceFile.text !== data) { + map.delete(key); + } + }); + } + }; + } + + // directoryExists + if (originalDirectoryExists) { + host.directoryExists = directory => { + const key = toPath(directory); + const value = directoryExistsCache.get(key); + if (value !== undefined) return value; + const newValue = originalDirectoryExists(directory); + directoryExistsCache.set(key, !!newValue); + return newValue; + }; + + if (originalCreateDirectory) { + (host as any).createDirectory = (directory: string) => { + originalCreateDirectory(directory); + const key = toPath(directory); + directoryExistsCache.set(key, true); + }; + } + } + function cleanAST(node: Node) { + (node as any).id = undefined; + ts.forEachChild(node, cleanAST, nodes => nodes.forEach(cleanAST)); + } + const getSourceFileWithCache = (...[fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile]: Parameters) => { + const key = toPath(fileName); + const impliedNodeFormat: ResolutionMode = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : undefined; + let forImpliedNodeFormat = sourceFileCache.get(impliedNodeFormat); + let value = forImpliedNodeFormat?.get(key); + const perfKey = fileName.endsWith(".d.ts") ? "-d.ts" : "-" + path.extname(fileName).substring(1); + + if (value) { + perf.tracer.current?.increment("ast-hit" + perfKey); + cleanAST(value); + return value; + } + + const baseFile = path.basename(fileName); + const isLibFile = baseFile.startsWith("lib."); + if (isLibFile) { + value = forImpliedNodeFormat?.get(baseFile); + if (value && value.text === host.readFile(fileName)) { + perf.tracer.current?.increment("ast-lib-hit"); + // Patch up file as it might not be from the same source + value.fileName = fileName; + cleanAST(value); + return value; + } + } + perf.tracer.current?.increment("ast-miss" + perfKey); + const sourceFile = withTrace("parse", () => originalGetSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile)); + function isCashable(fileName: string) { + return true; + return fileName.endsWith(".d.ts") + || fileName.endsWith(".d.cts") + || fileName.endsWith(".d.mts") + || fileName.endsWith(".json"); + } + if (sourceFile && isCashable(fileName)) { + if (!forImpliedNodeFormat) { + forImpliedNodeFormat = new Map(); + sourceFileCache.set(impliedNodeFormat, forImpliedNodeFormat); + } + forImpliedNodeFormat.set(key, sourceFile); + if (isLibFile) { + forImpliedNodeFormat.set(baseFile, sourceFile); + } + } + return sourceFile; + }; + host.getSourceFile = getSourceFileWithCache; + return host; + }; +})(); diff --git a/parallel-build/src/worker-utils/clean-project.ts b/parallel-build/src/worker-utils/clean-project.ts new file mode 100644 index 0000000000000..89cc9f0b5dbd4 --- /dev/null +++ b/parallel-build/src/worker-utils/clean-project.ts @@ -0,0 +1,37 @@ +import * as fs from "node:fs"; +import * as path from "node:path"; + +import ts, {} from "typescript"; + +import type { + Message, +} from "../protocol.js"; +import { + withTrace, +} from "./utils.js"; + +export function cleanProjectOutput(value: Extract) { + const { parsedConfig } = withTrace("read-config", () => { + const configFile = ts.readConfigFile(value.project, ts.sys.readFile); + const rootPath = path.dirname(value.project); + configFile.config.compilerOptions = { + ...configFile.config.compilerOptions, + ...value.tsconfigOverrides, + }; + const parsedConfig = ts.parseJsonConfigFileContent(configFile.config, ts.sys, rootPath); + + return { parsedConfig }; + }); + + const tsBuildInfo = value.project.substring(0, value.project.length - ".json".length) + ".tsbuildinfo"; + if (fs.existsSync(tsBuildInfo)) { + fs.rmSync(tsBuildInfo); + } + if (parsedConfig.options.outDir && fs.existsSync(parsedConfig.options.outDir)) { + fs.rmSync(parsedConfig.options.outDir, { recursive: true }); + } + + if (parsedConfig.options.declarationDir && fs.existsSync(parsedConfig.options.declarationDir)) { + fs.rmSync(parsedConfig.options.declarationDir, { recursive: true }); + } +} diff --git a/parallel-build/src/worker-utils/utils.ts b/parallel-build/src/worker-utils/utils.ts new file mode 100644 index 0000000000000..28f2e6a76bc20 --- /dev/null +++ b/parallel-build/src/worker-utils/utils.ts @@ -0,0 +1,26 @@ +import * as perf from "external-declarations/build/compiler/perf-tracer.js"; +import ts from "typescript"; + +export function withTrace(name: string, fn: () => T): T { + try { + perf.tracer.current?.start(name); + return fn(); + } + finally { + perf.tracer.current?.end(name); + } +} + +export function parseConfigHostFromCompilerHostLike(host: ts.SolutionBuilderHost, sys: ts.System): ts.ParseConfigFileHost { + return { + fileExists: f => sys.fileExists(f), + readDirectory(root, extensions, excludes, includes, depth) { + return sys.readDirectory(root, extensions, excludes, includes, depth); + }, + readFile: f => sys.readFile(f), + useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(), + getCurrentDirectory: () => host.getCurrentDirectory(), + onUnRecoverableConfigFileDiagnostic: () => undefined, + trace: host.trace ? s => host.trace!(s) : undefined, + }; +} diff --git a/parallel-build/src/worker.ts b/parallel-build/src/worker.ts new file mode 100644 index 0000000000000..f02140db2daae --- /dev/null +++ b/parallel-build/src/worker.ts @@ -0,0 +1,77 @@ +import { + parentPort, + workerData, +} from "node:worker_threads"; + +import * as perf from "external-declarations/build/compiler/perf-tracer.js"; + +import type { + Task, +} from "./protocol.js"; +import { + makeSingleThreadedParentPort, +} from "./single-thread-worker.js"; +import { + taskNameLog, +} from "./utils.js"; +import { + buildDeclarations, +} from "./worker-utils/build-declarations.js"; +import { + buildTSCB, +} from "./worker-utils/build-tsc-b.js"; +import { + buildTSC, +} from "./worker-utils/build-tsc-p.js"; +import { + buildTSCShard, +} from "./worker-utils/build-tsc-shard.js"; +import { + cleanProjectOutput, +} from "./worker-utils/clean-project.js"; + +const singleThread = process.argv.indexOf("--single-thread") !== -1; +const parent = singleThread ? makeSingleThreadedParentPort() : + workerData ? parentPort : { + on(event: "message", listener: (value: any) => void) { + process.on("message", listener); + }, + postMessage(value: any) { + process.send?.(value); + }, + }; + +function main() { + parent?.on("message", (task: Task) => { + perf.installTracer(); + perf.tracer.current?.start("full"); + console.log(`${taskNameLog(task.name)}: Starting`); + const config = task.config; + if (config.type === "clean") { + cleanProjectOutput(config); + } + if (config.type === "tsc-b") { + buildTSCB(config); + } + if (config.type === "tsc") { + buildTSC(task.name, config); + } + if (config.type === "tsc-shard") { + buildTSCShard(task.name, config); + } + if (config.type === "declaration") { + buildDeclarations( + task.name, + config, + ); + } + console.log(`${taskNameLog(task.name)}: Finished`); + parent?.postMessage({ + type: "done", + }); + perf.tracer.current?.end("full"); + console.log(`${taskNameLog(task.name)}: Times`, JSON.stringify(perf.tracer.current?.times)); + }); +} + +main(); diff --git a/tests/baselines/reference/computedPropertiesNarrowed.errors.txt b/tests/baselines/reference/computedPropertiesNarrowed.errors.txt new file mode 100644 index 0000000000000..d487673a3dceb --- /dev/null +++ b/tests/baselines/reference/computedPropertiesNarrowed.errors.txt @@ -0,0 +1,80 @@ +tests/cases/compiler/computedPropertiesNarrowed.ts(4,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +tests/cases/compiler/computedPropertiesNarrowed.ts(18,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +tests/cases/compiler/computedPropertiesNarrowed.ts(21,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +tests/cases/compiler/computedPropertiesNarrowed.ts(25,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +tests/cases/compiler/computedPropertiesNarrowed.ts(36,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +tests/cases/compiler/computedPropertiesNarrowed.ts(46,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== tests/cases/compiler/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + let u = Symbol(); + export let o4 = { + ~ + [u]: 1 // Should error, nut a unique symbol + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + export let o5 ={ + ~ + [Symbol()]: 1 // Should error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ 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..d02723f3345d0 --- /dev/null +++ b/tests/baselines/reference/computedPropertiesNarrowed.js @@ -0,0 +1,88 @@ +//// [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..10f68a1bf3d46 --- /dev/null +++ b/tests/baselines/reference/computedPropertiesNarrowed.symbols @@ -0,0 +1,125 @@ +=== tests/cases/compiler/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..d363ed47e7baa --- /dev/null +++ b/tests/baselines/reference/computedPropertiesNarrowed.types @@ -0,0 +1,167 @@ +=== tests/cases/compiler/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/cases/compiler/computedPropertiesNarrowed.ts b/tests/cases/compiler/computedPropertiesNarrowed.ts new file mode 100644 index 0000000000000..1bedd9dc7cab4 --- /dev/null +++ b/tests/cases/compiler/computedPropertiesNarrowed.ts @@ -0,0 +1,52 @@ +// @target: es2015 +// @isolatedDeclarations: true +// @declaration: true + +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 +} From aac2f6755b7b024231e5f4cd5fa4cb99b8b3abc3 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 25 Sep 2023 11:23:24 +0100 Subject: [PATCH 074/224] Added missing config files. --- parallel-build/.gitignore | 4 ++++ parallel-build/package.json | 20 ++++++++++++++++++++ parallel-build/tsconfig.json | 12 ++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 parallel-build/.gitignore create mode 100644 parallel-build/package.json create mode 100644 parallel-build/tsconfig.json diff --git a/parallel-build/.gitignore b/parallel-build/.gitignore new file mode 100644 index 0000000000000..5fbbc587a2ef0 --- /dev/null +++ b/parallel-build/.gitignore @@ -0,0 +1,4 @@ +tasks-times +tasks +tasks-stats +build \ No newline at end of file diff --git a/parallel-build/package.json b/parallel-build/package.json new file mode 100644 index 0000000000000..f37ac6a9bd7ee --- /dev/null +++ b/parallel-build/package.json @@ -0,0 +1,20 @@ +{ + "name": "parallel-build", + "version": "1.0.0", + "description": "", + "main": "index.js", + "type": "module", + "scripts": { + "build": "tsc -p ./", + "watch": "tsc -w -p ./" + }, + "author": "", + "license": "ISC", + "dependencies": { + "@types/node": "^20.1.3", + "external-declarations": "file:../external-declarations", + "json5": "^2.2.3", + "systeminformation": "^5.21.8", + "typescript": "file:.." + } +} diff --git a/parallel-build/tsconfig.json b/parallel-build/tsconfig.json new file mode 100644 index 0000000000000..b3dca25527a24 --- /dev/null +++ b/parallel-build/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "strict": true, + "module": "NodeNext", + "target": "ESNext", + "rootDir": "./src", + "outDir": "./build", + "moduleResolution":"nodenext", + "sourceMap": true, + "allowSyntheticDefaultImports": true, + } +} \ No newline at end of file From 570f4032afa8f679c4bedaf6389b6d8387988fb8 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 25 Sep 2023 14:47:16 +0100 Subject: [PATCH 075/224] Preserve formatting in the ID fixer. Signed-off-by: Titian Cernicova-Dragomir --- .../fixMissingTypeAnnotationOnExports.ts | 378 +++++++----------- .../codeFixMissingTypeAnnotationOnExports.ts | 1 - ...codeFixMissingTypeAnnotationOnExports10.ts | 1 - ...codeFixMissingTypeAnnotationOnExports11.ts | 6 +- ...codeFixMissingTypeAnnotationOnExports12.ts | 9 +- ...codeFixMissingTypeAnnotationOnExports17.ts | 1 + ...codeFixMissingTypeAnnotationOnExports18.ts | 1 - ...codeFixMissingTypeAnnotationOnExports19.ts | 3 +- ...codeFixMissingTypeAnnotationOnExports20.ts | 1 - ...codeFixMissingTypeAnnotationOnExports21.ts | 12 +- ...codeFixMissingTypeAnnotationOnExports22.ts | 2 +- ...AnnotationOnExports23-params-and-return.ts | 37 ++ ...ingTypeAnnotationOnExports24-formatting.ts | 23 ++ ...gTypeAnnotationOnExports25-formatting-2.ts | 29 ++ ...notationOnExports26-heritage-formatting.ts | 41 ++ ...tationOnExports27-heritage-formatting-2.ts | 29 ++ ...tationOnExports28-heritage-formatting-3.ts | 29 ++ .../codeFixMissingTypeAnnotationOnExports3.ts | 7 +- .../codeFixMissingTypeAnnotationOnExports4.ts | 2 +- .../codeFixMissingTypeAnnotationOnExports6.ts | 1 - .../codeFixMissingTypeAnnotationOnExports7.ts | 4 +- .../codeFixMissingTypeAnnotationOnExports8.ts | 3 +- .../codeFixMissingTypeAnnotationOnExports9.ts | 1 - 23 files changed, 362 insertions(+), 259 deletions(-) create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports23-params-and-return.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports24-formatting.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports25-formatting-2.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports26-heritage-formatting.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports27-heritage-formatting-2.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports28-heritage-formatting-3.ts diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 37cdcbf950b2f..7f8a65166dd71 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -1,6 +1,5 @@ import { ArrayBindingPattern, - ArrowFunction, BindingElement, BindingPattern, ClassDeclaration, @@ -9,21 +8,18 @@ import { Expression, ExpressionWithTypeArguments, factory, - FunctionDeclaration, - FunctionExpression, GeneratedIdentifierFlags, - GetAccessorDeclaration, + getSourceFileOfNode, getTokenAtPosition, + getTrailingCommentRanges, Identifier, isArrayBindingPattern, isArrowFunction, isComputedPropertyName, - isFunctionDeclaration, isFunctionExpression, isObjectBindingPattern, isOmittedExpression, isVariableDeclaration, - MethodDeclaration, Node, NodeArray, NodeBuilderFlags, @@ -81,12 +77,15 @@ registerCodeFix({ const nodeWithDiag = getTokenAtPosition(sourceFile, span.start); const changes = textChanges.ChangeTracker.with(context, t => doChange(t, context.sourceFile, context.program.getTypeChecker(), nodeWithDiag)); - return [createCodeFixAction(fixId, changes, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit, fixId, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit)]; + return [ + createCodeFixAction(fixId, changes, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit, fixId, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit), + ]; }, - getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => { - const nodeWithDiag = getTokenAtPosition(diag.file, diag.start); - doChange(changes, diag.file, context.program.getTypeChecker(), nodeWithDiag); - }) + getAllCodeActions: context => + codeFixAll(context, errorCodes, (changes, diag) => { + const nodeWithDiag = getTokenAtPosition(diag.file, diag.start); + doChange(changes, diag.file, context.program.getTypeChecker(), nodeWithDiag); + }), }); function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, typeChecker: TypeChecker, nodeWithDiag: Node): void { @@ -100,9 +99,11 @@ function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, ty // 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 { - while (node && - (((isObjectBindingPattern(node) || isArrayBindingPattern(node)) && - !isVariableDeclaration(node.parent)) || !canHaveExplicitTypeAnnotation.has(node.kind))) { + while ( + node && + (((isObjectBindingPattern(node) || isArrayBindingPattern(node)) && + !isVariableDeclaration(node.parent)) || !canHaveExplicitTypeAnnotation.has(node.kind)) + ) { node = node.parent; } return node; @@ -114,120 +115,68 @@ function findNearestParentWithTypeAnnotation(node: Node): Node | undefined { */ function fixupForIsolatedDeclarations(node: Node, nodeWithDiag: Node, sourceFile: SourceFile, typeChecker: TypeChecker, changes: textChanges.ChangeTracker) { switch (node.kind) { - case SyntaxKind.Parameter: - const parameter = node as ParameterDeclaration; - const newNode = addTypeToParameterDeclaration(parameter, typeChecker); - if (newNode) { - return changes.replaceNodeWithNodes(sourceFile, node, [newNode]); - } - break; - case SyntaxKind.VariableDeclaration: - const variableDeclaration = node as VariableDeclaration; - if (!variableDeclaration.type) { - if (variableDeclaration.initializer && (isFunctionExpression(variableDeclaration.initializer) || isArrowFunction(variableDeclaration.initializer))) { - return addTypeToFunctionLikeDeclaration(variableDeclaration.initializer, sourceFile, typeChecker, changes); + case SyntaxKind.Parameter: + const parameter = node as ParameterDeclaration; + addTypeToParameterDeclaration(changes, parameter, typeChecker); + break; + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.VariableDeclaration: + const variableDeclaration = node as VariableDeclaration | PropertyDeclaration; + if (!variableDeclaration.type) { + if (variableDeclaration.initializer && (isFunctionExpression(variableDeclaration.initializer) || isArrowFunction(variableDeclaration.initializer))) { + addTypeToFunctionLikeDeclaration(variableDeclaration.initializer, sourceFile, typeChecker, changes); + } + else { + const type = typeChecker.getTypeAtLocation(variableDeclaration); + const typeNode = typeToTypeNode(type, variableDeclaration, typeChecker); + if (typeNode) { + changes.tryInsertTypeAnnotation(sourceFile, variableDeclaration, typeNode); + } + } } - const type = typeChecker.getTypeAtLocation(variableDeclaration); - const typeNode = typeToTypeNode(type, variableDeclaration, typeChecker); - return changes.replaceNodeWithNodes(sourceFile, node, - [factory.updateVariableDeclaration( - variableDeclaration, - variableDeclaration.name, - /*exclamationToken*/ undefined, - typeNode, - variableDeclaration.initializer - )]); - } - break; - case SyntaxKind.FunctionDeclaration: - return addTypeToFunctionLikeDeclaration(node as FunctionDeclaration, sourceFile, typeChecker, changes); - case SyntaxKind.PropertyDeclaration: - const propDecl = node as PropertyDeclaration; - if(!propDecl.type) { - if (propDecl.initializer && (isFunctionExpression(propDecl.initializer) || isArrowFunction(propDecl.initializer))) { - return addTypeToFunctionLikeDeclaration(propDecl.initializer, sourceFile, typeChecker, changes); - } - const type = typeChecker.getTypeAtLocation(node); - const typeNode = typeToTypeNode(type, propDecl, typeChecker); - return changes.replaceNodeWithNodes(sourceFile, node, - [factory.updatePropertyDeclaration( - propDecl, - propDecl.modifiers, - propDecl.name, - propDecl.questionToken ?? propDecl.exclamationToken, - typeNode, - propDecl.initializer)] - ); - } - break; - case SyntaxKind.MethodDeclaration: - const methodDeclaration = node as MethodDeclaration; - if(!methodDeclaration.type) { - const type = tryGetReturnType(typeChecker, methodDeclaration); - if(type) { + break; + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.MethodDeclaration: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + addTypeToFunctionLikeDeclaration(node as SignatureDeclaration, sourceFile, typeChecker, changes); + break; + case SyntaxKind.ExportAssignment: + const defaultExport = node as ExportAssignment; + if (!defaultExport.isExportEquals) { + const type = typeChecker.getTypeAtLocation(defaultExport.expression); const typeNode = typeToTypeNode(type, node, typeChecker); - return changes.replaceNodeWithNodes(sourceFile, node, - [factory.updateMethodDeclaration( - methodDeclaration, - methodDeclaration.modifiers, - methodDeclaration.asteriskToken, - methodDeclaration.name, - methodDeclaration.questionToken, - methodDeclaration.typeParameters, - updateTypesInNodeArray(methodDeclaration.parameters, typeChecker), - typeNode, - methodDeclaration.body)] - ); - } - } - break; - case SyntaxKind.GetAccessor: - const getAccessor = node as GetAccessorDeclaration; - if(!getAccessor.type) { - const returnType = tryGetReturnType(typeChecker, getAccessor); - if(returnType) { - const typeNode = typeToTypeNode(returnType, node, typeChecker); - return changes.replaceNodeWithNodes(sourceFile, node, - [factory.updateGetAccessorDeclaration( - getAccessor, - getAccessor.modifiers, - getAccessor.name, - updateTypesInNodeArray(getAccessor.parameters, typeChecker), - typeNode, - getAccessor.body)] - ); + return changes.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")), + ]); } - } - break; - case SyntaxKind.ExportAssignment: - const defaultExport = node as ExportAssignment; - if(!defaultExport.isExportEquals) { - const type = typeChecker.getTypeAtLocation(defaultExport.expression); - const typeNode = typeToTypeNode(type, node, typeChecker); - return changes.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")), - ]); - } - break; - // Handling expression like heritage clauses e.g. class A extends mixin(B) .. - case SyntaxKind.ClassDeclaration: - return handleClassDeclaration(node as ClassDeclaration, nodeWithDiag.parent.parent as ExpressionWithTypeArguments, sourceFile, changes, typeChecker); - case SyntaxKind.ObjectBindingPattern: - case SyntaxKind.ArrayBindingPattern: - return transformDestructuringPatterns(node as BindingPattern, sourceFile, typeChecker, changes); - default: - break; + break; + // Handling expression like heritage clauses e.g. class A extends mixin(B) .. + case SyntaxKind.ClassDeclaration: + handleClassDeclaration(node as ClassDeclaration, nodeWithDiag.parent.parent as ExpressionWithTypeArguments, sourceFile, changes, typeChecker); + break; + case SyntaxKind.ObjectBindingPattern: + case SyntaxKind.ArrayBindingPattern: + transformDestructuringPatterns(node as BindingPattern, sourceFile, typeChecker, changes); + break; + default: + throw new Error(`Cannot find a fix for the given node ${node.kind}`); } - throw new Error(`Cannot find a fix for the given node ${node.kind}`); } -function addTypeToFunctionLikeDeclaration(func: FunctionDeclaration | FunctionExpression | ArrowFunction, sourceFile: SourceFile, typeChecker: TypeChecker, changes: textChanges.ChangeTracker) { +function addTypeToFunctionLikeDeclaration(func: SignatureDeclaration, sourceFile: SourceFile, typeChecker: TypeChecker, changes: textChanges.ChangeTracker) { if (func.type) { return; } @@ -237,56 +186,30 @@ function addTypeToFunctionLikeDeclaration(func: FunctionDeclaration | FunctionEx return; } const typeNode = typeToTypeNode(type, func, typeChecker); - if (isFunctionDeclaration(func)) { - changes.replaceNodeWithNodes(sourceFile, func, - [factory.updateFunctionDeclaration( - func, - func.modifiers, - func.asteriskToken, - func.name, - func.typeParameters, - updateTypesInNodeArray(func.parameters, typeChecker), - typeNode, - func.body)] - ); - } - else if (isFunctionExpression(func)) { - changes.replaceNodeWithNodes(sourceFile, func, - [factory.updateFunctionExpression( - func, - func.modifiers, - func.asteriskToken, - func.name, - func.typeParameters, - updateTypesInNodeArray(func.parameters, typeChecker), - typeNode, - func.body)] - ); - } - else { - changes.replaceNodeWithNodes(sourceFile, func, - [factory.updateArrowFunction( - func, - func.modifiers, - func.typeParameters, - updateTypesInNodeArray(func.parameters, typeChecker), - typeNode, - factory.createToken(SyntaxKind.EqualsGreaterThanToken), - func.body)] + if (typeNode) { + changes.tryInsertTypeAnnotation( + sourceFile, + func, + typeNode, ); } + addTypesToParametersArray(changes, func.parameters, typeChecker); } function handleClassDeclaration(classDecl: ClassDeclaration, heritageExpression: ExpressionWithTypeArguments, sourceFile: SourceFile, changes: textChanges.ChangeTracker, typeChecker: TypeChecker) { - if (heritageExpression.kind !== SyntaxKind.ExpressionWithTypeArguments){ + if (heritageExpression.kind !== SyntaxKind.ExpressionWithTypeArguments) { throw new Error(`Hey + ${heritageExpression.kind}`); } const heritageTypeNode = typeToTypeNode( typeChecker.getTypeAtLocation(heritageExpression.expression), heritageExpression.expression, - typeChecker); + typeChecker, + ); + const heritageVariableName = factory.createUniqueName( - classDecl.name? classDecl.name.text + "Base" : "Anonymous", GeneratedIdentifierFlags.Optimistic); + classDecl.name ? classDecl.name.text + "Base" : "Anonymous", + GeneratedIdentifierFlags.Optimistic, + ); // e.g. const Point3DBase: typeof Point2D = mixin(Point2D); const heritageVariable = factory.createVariableStatement( /*modifiers*/ undefined, @@ -295,29 +218,26 @@ function handleClassDeclaration(classDecl: ClassDeclaration, heritageExpression: heritageVariableName, /*exclamationToken*/ undefined, heritageTypeNode, - heritageExpression, - )], + heritageExpression.expression, + )], NodeFlags.Const, - ) + ), + ); + // const touchingToken = getTouchingToken(heritageExpression); + changes.insertNodeBefore(sourceFile, classDecl, heritageVariable); + const trailingComments = getTrailingCommentRanges(sourceFile.text, heritageExpression.end); + const realEnd = trailingComments?.[trailingComments.length - 1]?.end ?? heritageExpression.end; + changes.replaceRange( + sourceFile, + { + pos: heritageExpression.getFullStart(), + end: realEnd, + }, + heritageVariableName, + { + prefix: " ", + }, ); - changes.replaceNodeWithNodes(sourceFile, classDecl, - [heritageVariable, - factory.updateClassDeclaration( - classDecl, - classDecl.modifiers, - classDecl.name, - classDecl.typeParameters, - classDecl.heritageClauses?.map( - (node) => { - if (node === heritageExpression.parent) { - return factory.updateHeritageClause(node, - [factory.createExpressionWithTypeArguments(heritageVariableName, [])] - ); - } - return node; - }), - classDecl.members) - ]); } interface ExpressionReverseChain { @@ -333,15 +253,13 @@ const enum ExpressionType { 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}; +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, - sourceFile: SourceFile, - typeChecker: TypeChecker, - changes: textChanges.ChangeTracker) { +function transformDestructuringPatterns(bindingPattern: BindingPattern, sourceFile: SourceFile, typeChecker: TypeChecker, changes: textChanges.ChangeTracker) { const enclosingVarStmt = bindingPattern.parent.parent.parent as VariableStatement; const tempHolderForReturn = factory.createUniqueName("dest", GeneratedIdentifierFlags.Optimistic); const baseExpr: ExpressionReverseChain = { expression: { kind: ExpressionType.IDENTIFIER, identifier: tempHolderForReturn } }; @@ -362,10 +280,11 @@ function transformDestructuringPatterns(bindingPattern: BindingPattern, tempHolderForReturn, /*exclamationToken*/ undefined, /*type*/ undefined, - enclosingVarStmt.declarationList.declarations[0].initializer)], - NodeFlags.Const - ) - ) + enclosingVarStmt.declarationList.declarations[0].initializer, + )], + NodeFlags.Const, + ), + ), ]; let i = 0; while (i < bindingElements.length) { @@ -375,7 +294,11 @@ function transformDestructuringPatterns(bindingPattern: BindingPattern, const computedExpression = bindingElement.element!.propertyName.expression; const identifierForComputedProperty = factory.getGeneratedNameForNode(computedExpression); const variableDecl = factory.createVariableDeclaration( - identifierForComputedProperty, /*exclamationToken*/ undefined, /*type*/ undefined, computedExpression); + identifierForComputedProperty, + /*exclamationToken*/ undefined, + /*type*/ undefined, + computedExpression, + ); const variableList = factory.createVariableDeclarationList([variableDecl], NodeFlags.Const); const variableStatement = factory.createVariableStatement(/*modifiers*/ undefined, variableList); newNodes.push(variableStatement); @@ -400,8 +323,14 @@ function transformDestructuringPatterns(bindingPattern: BindingPattern, /*modifiers*/ undefined, factory.createVariableDeclarationList( [factory.createVariableDeclaration( - tempName, /*exclamationToken*/ undefined, /*type*/ undefined, variableInitializer)], - NodeFlags.Const))); + tempName, + /*exclamationToken*/ undefined, + /*type*/ undefined, + variableInitializer, + )], + NodeFlags.Const, + ), + )); variableInitializer = factory.createConditionalExpression( factory.createBinaryExpression( tempName, @@ -411,14 +340,21 @@ function transformDestructuringPatterns(bindingPattern: BindingPattern, factory.createToken(SyntaxKind.QuestionToken), bindingElement.element!.initializer, factory.createToken(SyntaxKind.ColonToken), - variableInitializer,); + variableInitializer, + ); } newNodes.push(factory.createVariableStatement( [factory.createToken(SyntaxKind.ExportKeyword)], factory.createVariableDeclarationList( [factory.createVariableDeclaration( - name, /*exclamationToken*/ undefined, typeNode, variableInitializer)], - NodeFlags.Const))); + name, + /*exclamationToken*/ undefined, + typeNode, + variableInitializer, + )], + NodeFlags.Const, + ), + )); } ++i; } @@ -429,15 +365,15 @@ function transformDestructuringPatterns(bindingPattern: BindingPattern, enclosingVarStmt.modifiers, factory.updateVariableDeclarationList( enclosingVarStmt.declarationList, - enclosingVarStmt.declarationList.declarations.filter((node) => node !== bindingPattern.parent), - ) + enclosingVarStmt.declarationList.declarations.filter(node => node !== bindingPattern.parent), + ), )); } changes.replaceNodeWithNodes(sourceFile, enclosingVarStmt, newNodes); } function addArrayBindingPatterns(bindingPattern: ArrayBindingPattern, bindingElements: ExpressionReverseChain[], parent: ExpressionReverseChain) { - for (let i = 0 ; i < bindingPattern.elements.length ; ++i) { + for (let i = 0; i < bindingPattern.elements.length; ++i) { const element = bindingPattern.elements[i]; if (isOmittedExpression(element)) { continue; @@ -483,26 +419,26 @@ function createChainedExpression(expression: ExpressionReverseChain, expressionT 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) { + 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) + factory.createIdentifier(nextSubExpr.text), ); } else if (nextSubExpr.kind === ExpressionType.COMPUTED) { chainedExpression = factory.createElementAccessExpression( chainedExpression, - expressionToVar.get(nextSubExpr.computed)! + expressionToVar.get(nextSubExpr.computed)!, ); } else if (nextSubExpr.kind === ExpressionType.ARRAY_ACCESS) { chainedExpression = factory.createElementAccessExpression( chainedExpression, - nextSubExpr.arrayIndex + nextSubExpr.arrayIndex, ); } } @@ -525,31 +461,19 @@ function tryGetReturnType(typeChecker: TypeChecker, node: SignatureDeclaration): } } -function updateTypesInNodeArray(nodeArray: NodeArray, typeChecker: TypeChecker): NodeArray; -function updateTypesInNodeArray(nodeArray: NodeArray | undefined, typeChecker: TypeChecker): NodeArray | undefined; -function updateTypesInNodeArray(nodeArray: NodeArray | undefined, typeChecker: TypeChecker) { - if(nodeArray === undefined) return undefined; - return factory.createNodeArray( - nodeArray.map(param => { - return addTypeToParameterDeclaration(param, typeChecker) || param; - }) - ); +function addTypesToParametersArray(changes: textChanges.ChangeTracker, nodeArray: NodeArray | undefined, typeChecker: TypeChecker) { + if (nodeArray === undefined) return undefined; + nodeArray.forEach(param => addTypeToParameterDeclaration(changes, param, typeChecker)); } -function addTypeToParameterDeclaration(parameter: ParameterDeclaration, typeChecker: TypeChecker): ParameterDeclaration | undefined { +function addTypeToParameterDeclaration(changes: textChanges.ChangeTracker, parameter: ParameterDeclaration, typeChecker: TypeChecker): void { if (!parameter.type) { const type = typeChecker.getTypeAtLocation(parameter); if (type) { const typeNode = typeToTypeNode(type, parameter, typeChecker); - return factory.updateParameterDeclaration( - parameter, - parameter.modifiers, - parameter.dotDotDotToken, - parameter.name, - parameter.questionToken, - typeNode, - parameter.initializer - ); + if (typeNode) { + changes.tryInsertTypeAnnotation(getSourceFileOfNode(parameter), parameter, typeNode); + } } } } diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports.ts index 6884bc33b6c33..a85cfd65dceaa 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports.ts @@ -7,7 +7,6 @@ verify.codeFixAvailable([ { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } ]); verify.codeFix({ diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports10.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports10.ts index 4b1a78d3cee98..33b0f070a7ad0 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports10.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports10.ts @@ -9,7 +9,6 @@ verify.codeFixAvailable([ { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } ]); verify.codeFix({ diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts index d454d461db0d9..cde0fd82737bf 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts @@ -20,8 +20,6 @@ verify.codeFix({ return ctor; } class Point2D { x = 0; y = 0; } -const Point3DBase: typeof Point2D = (mixin(Point2D)); -export class Point3D extends Point3DBase { - z = 0; -}` +const Point3DBase: typeof Point2D = mixin(Point2D); +export class Point3D extends Point3DBase { z = 0; }` }); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts index 5eccea0d5a3a9..4ba84f0757629 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts @@ -10,7 +10,6 @@ verify.codeFixAvailable([ { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } ]); // TODO: There's no easy way to name the type, so rather promoting this to a classDeclaration is better. @@ -23,8 +22,8 @@ verify.codeFix({ } class Point2D { x = 0; y = 0; } export const Point3D: { - new(): { - z: number; x: number; y: number; - }; - } = class extends mixin(Point2D) { z = 0; };` + new(): { + z: number; x: number; y: number; + }; +} = class extends mixin(Point2D) { z = 0; };` }); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports17.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports17.ts index cb15f41acb31a..dc83ccd8bec31 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports17.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports17.ts @@ -1,3 +1,4 @@ + /// // @isolatedDeclarations: true diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts index e088753be488f..2a6ad3744bfab 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts @@ -7,7 +7,6 @@ verify.codeFixAvailable([ { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } ]); verify.codeFix({ diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports19.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports19.ts index 737851f0a430b..aa12f3050ec5c 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports19.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports19.ts @@ -8,7 +8,6 @@ verify.codeFixAvailable([ { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } ]); verify.codeFix({ @@ -16,6 +15,6 @@ verify.codeFix({ index: 0, newFileContent: `export class A { - readonly a = function foo(): number { return 42; } + readonly a = function foo(): number {return 42;} }` }); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports20.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports20.ts index 81d80ef059ca6..26ba639169127 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports20.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports20.ts @@ -9,7 +9,6 @@ verify.codeFixAvailable([ { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } ]); verify.codeFix({ diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts index d68e4a8188e5f..da94d0a3f923f 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts @@ -3,9 +3,9 @@ // @isolatedDeclarations: true // @declaration: true // @lib: es2019 -//// export const a = { +////export const a = { //// z: Symbol() -//// } as const; +////} as const; verify.codeFixAvailable([ { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } @@ -16,8 +16,8 @@ verify.codeFix({ index: 0, newFileContent: `export const a: { - readonly z: symbol; - } = { - z: Symbol() - } as const;` + readonly z: symbol; +} = { + z: Symbol() +} as const;` }); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports22.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports22.ts index fa920d839884f..10b2aa8eb06f3 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports22.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports22.ts @@ -15,7 +15,7 @@ verify.codeFix({ description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, index: 0, newFileContent: -`export function foo(): symbol { +`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..d751a4f159055 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports23-params-and-return.ts @@ -0,0 +1,37 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 + +/////** +//// * Test +//// */ +////export function foo(): number { return 0; } +/////** +////* Docs +////*/ +////export const bar = (a = foo()) => +//// a; +////// Trivia + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + 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..08b429926681e --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports24-formatting.ts @@ -0,0 +1,23 @@ +/// +// @isolatedDeclarations: true +// @declaration: true +// @lib: es2019 +/////** +//// * Test +//// */ +////export function foo(){} + + +verify.codeFixAvailable([ + { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + 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..bb834a6806ce9 --- /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: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + 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..16027e207ca4f --- /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.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.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..7e636990c0773 --- /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.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.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..be92471eefff9 --- /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.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } +]); + +verify.codeFix({ + description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.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/codeFixMissingTypeAnnotationOnExports3.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports3.ts index 2c2470ea4e893..e24b7fa970977 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports3.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports3.ts @@ -5,12 +5,12 @@ ////const a = 42; ////const b = 42; ////export class C { -//// property = a + b; +//// //making sure comments are not changed +//// property =a+b; // comment should stay here ////} verify.codeFixAvailable([ { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, ]); verify.codeFix({ @@ -20,6 +20,7 @@ verify.codeFix({ `const a = 42; const b = 42; export class C { - property: number = a + b; + //making sure comments are not changed + property: number =a+b; // comment should stay here }`, }); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports4.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports4.ts index 284aab3217cf6..058e39d86b4ab 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports4.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports4.ts @@ -19,6 +19,6 @@ verify.codeFix({ `const a = 42; const b = 42; export class C { - method(): number { return a + b; }; + method(): number { return a + b}; }`, }); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports6.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports6.ts index 16fafc4192e17..cdccb01c4d996 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports6.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports6.ts @@ -7,7 +7,6 @@ verify.codeFixAvailable([ { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } ]); verify.codeFix({ diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts index cd4f13096a29e..7d86594d5b3ad 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts @@ -15,6 +15,6 @@ verify.codeFix({ newFileContent: `function foo(): number[] {return [42];} export const c: { - foo: number[]; - } = { foo: foo() };`, + foo: number[]; +} = {foo: foo()};`, }); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports8.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports8.ts index 382c42e90d8da..7e7cfe29d681a 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports8.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports8.ts @@ -7,7 +7,6 @@ verify.codeFixAvailable([ { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } ]); verify.codeFix({ @@ -15,5 +14,5 @@ verify.codeFix({ index: 0, newFileContent: `function foo() {return 42;} -export const g = function(): number { return foo(); };`, +export const g = function (): number { return foo(); };`, }); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports9.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports9.ts index 58bf0c0d7ea84..0f14df3e3c158 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports9.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports9.ts @@ -10,7 +10,6 @@ verify.codeFixAvailable([ { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } ]); verify.codeFix({ From c6b60fc0e59f39ea3e0e61c6c7e08ab01237a99e Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 25 Sep 2023 18:08:24 +0100 Subject: [PATCH 076/224] Use imports instead of import types. Signed-off-by: Titian Cernicova-Dragomir --- .../fixMissingTypeAnnotationOnExports.ts | 566 +++++++++--------- 1 file changed, 298 insertions(+), 268 deletions(-) diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 7f8a65166dd71..e3c3165d6ed56 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -3,12 +3,15 @@ import { BindingElement, BindingPattern, ClassDeclaration, + CodeFixAllContext, + CodeFixContext, Diagnostics, ExportAssignment, Expression, ExpressionWithTypeArguments, factory, GeneratedIdentifierFlags, + getEmitScriptTarget, getSourceFileOfNode, getTokenAtPosition, getTrailingCommentRanges, @@ -39,7 +42,12 @@ import { import { codeFixAll, createCodeFixAction, + createCombinedCodeActions, + createImportAdder, + eachDiagnostic, + ImportAdder, registerCodeFix, + typeToAutoImportableTypeNode, } from "../_namespaces/ts.codefix"; const fixId = "fixMissingTypeAnnotationOnExports"; @@ -76,22 +84,38 @@ registerCodeFix({ const { sourceFile, span } = context; const nodeWithDiag = getTokenAtPosition(sourceFile, span.start); - const changes = textChanges.ChangeTracker.with(context, t => doChange(t, context.sourceFile, context.program.getTypeChecker(), nodeWithDiag)); + const changes = textChanges.ChangeTracker.with(context, t => { + const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host); + doChange(t, context, nodeWithDiag, importAdder); + importAdder.writeFixes(t); + }); return [ - createCodeFixAction(fixId, changes, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit, fixId, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit), + createCodeFixAction( + fixId, + changes, + Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit, + fixId, + Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit, + ), ]; }, - getAllCodeActions: context => - codeFixAll(context, errorCodes, (changes, diag) => { - const nodeWithDiag = getTokenAtPosition(diag.file, diag.start); - doChange(changes, diag.file, context.program.getTypeChecker(), nodeWithDiag); - }), + getAllCodeActions: context => { + const changes = textChanges.ChangeTracker.with(context, t => { + const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host); + eachDiagnostic(context, errorCodes, diag => { + const nodeWithDiag = getTokenAtPosition(diag.file, diag.start); + doChange(t, context, nodeWithDiag, importAdder); + }); + importAdder.writeFixes(t); + }); + return createCombinedCodeActions(changes); + }, }); -function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, typeChecker: TypeChecker, nodeWithDiag: Node): void { +function doChange(changes: textChanges.ChangeTracker, context: CodeFixContext | CodeFixAllContext, nodeWithDiag: Node, importAdder: ImportAdder): void { const nodeWithNoType = findNearestParentWithTypeAnnotation(nodeWithDiag); if (nodeWithNoType) { - fixupForIsolatedDeclarations(nodeWithNoType, nodeWithDiag, sourceFile, typeChecker, changes); + fixupForIsolatedDeclarations(nodeWithNoType, nodeWithDiag, context, changes, importAdder); } } @@ -113,22 +137,26 @@ function findNearestParentWithTypeAnnotation(node: Node): Node | 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, nodeWithDiag: Node, sourceFile: SourceFile, typeChecker: TypeChecker, changes: textChanges.ChangeTracker) { +function fixupForIsolatedDeclarations(node: Node, nodeWithDiag: Node, context: CodeFixContext | CodeFixAllContext, changes: textChanges.ChangeTracker, importAdder: ImportAdder) { + const sourceFile: SourceFile = context.sourceFile; + const program = context.program; + const typeChecker: TypeChecker = program.getTypeChecker(); + const scriptTarget = getEmitScriptTarget(program.getCompilerOptions()); switch (node.kind) { case SyntaxKind.Parameter: const parameter = node as ParameterDeclaration; - addTypeToParameterDeclaration(changes, parameter, typeChecker); + addTypeToParameterDeclaration(parameter); break; case SyntaxKind.PropertyDeclaration: case SyntaxKind.VariableDeclaration: const variableDeclaration = node as VariableDeclaration | PropertyDeclaration; if (!variableDeclaration.type) { if (variableDeclaration.initializer && (isFunctionExpression(variableDeclaration.initializer) || isArrowFunction(variableDeclaration.initializer))) { - addTypeToFunctionLikeDeclaration(variableDeclaration.initializer, sourceFile, typeChecker, changes); + addTypeToFunctionLikeDeclaration(variableDeclaration.initializer, sourceFile); } else { const type = typeChecker.getTypeAtLocation(variableDeclaration); - const typeNode = typeToTypeNode(type, variableDeclaration, typeChecker); + const typeNode = typeToTypeNode(type, variableDeclaration); if (typeNode) { changes.tryInsertTypeAnnotation(sourceFile, variableDeclaration, typeNode); } @@ -139,13 +167,13 @@ function fixupForIsolatedDeclarations(node: Node, nodeWithDiag: Node, sourceFile case SyntaxKind.MethodDeclaration: case SyntaxKind.GetAccessor: case SyntaxKind.SetAccessor: - addTypeToFunctionLikeDeclaration(node as SignatureDeclaration, sourceFile, typeChecker, changes); + addTypeToFunctionLikeDeclaration(node as SignatureDeclaration, sourceFile); break; case SyntaxKind.ExportAssignment: const defaultExport = node as ExportAssignment; if (!defaultExport.isExportEquals) { const type = typeChecker.getTypeAtLocation(defaultExport.expression); - const typeNode = typeToTypeNode(type, node, typeChecker); + const typeNode = typeToTypeNode(type, node); return changes.replaceNodeWithNodes(sourceFile, node, [ factory.createVariableStatement( /*modifiers*/ undefined, @@ -165,314 +193,316 @@ function fixupForIsolatedDeclarations(node: Node, nodeWithDiag: Node, sourceFile break; // Handling expression like heritage clauses e.g. class A extends mixin(B) .. case SyntaxKind.ClassDeclaration: - handleClassDeclaration(node as ClassDeclaration, nodeWithDiag.parent.parent as ExpressionWithTypeArguments, sourceFile, changes, typeChecker); + handleClassDeclaration(node as ClassDeclaration, nodeWithDiag.parent.parent as ExpressionWithTypeArguments); break; case SyntaxKind.ObjectBindingPattern: case SyntaxKind.ArrayBindingPattern: - transformDestructuringPatterns(node as BindingPattern, sourceFile, typeChecker, changes); + transformDestructuringPatterns(node as BindingPattern); break; default: throw new Error(`Cannot find a fix for the given node ${node.kind}`); } -} - -function addTypeToFunctionLikeDeclaration(func: SignatureDeclaration, sourceFile: SourceFile, typeChecker: TypeChecker, changes: textChanges.ChangeTracker) { - if (func.type) { - return; - } - const type = tryGetReturnType(typeChecker, func); - if (!type) { - return; - } - const typeNode = typeToTypeNode(type, func, typeChecker); - if (typeNode) { - changes.tryInsertTypeAnnotation( - sourceFile, - func, - typeNode, - ); - } - addTypesToParametersArray(changes, func.parameters, typeChecker); -} + function addTypeToFunctionLikeDeclaration(func: SignatureDeclaration, sourceFile: SourceFile) { + if (func.type) { + return; + } -function handleClassDeclaration(classDecl: ClassDeclaration, heritageExpression: ExpressionWithTypeArguments, sourceFile: SourceFile, changes: textChanges.ChangeTracker, typeChecker: TypeChecker) { - if (heritageExpression.kind !== SyntaxKind.ExpressionWithTypeArguments) { - throw new Error(`Hey + ${heritageExpression.kind}`); + const type = tryGetReturnType(func); + if (!type) { + return; + } + const typeNode = typeToTypeNode(type, func); + if (typeNode) { + changes.tryInsertTypeAnnotation( + sourceFile, + func, + typeNode, + ); + } + addTypesToParametersArray(func.parameters); } - const heritageTypeNode = typeToTypeNode( - typeChecker.getTypeAtLocation(heritageExpression.expression), - heritageExpression.expression, - typeChecker, - ); - - 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); - changes.insertNodeBefore(sourceFile, classDecl, heritageVariable); - const trailingComments = getTrailingCommentRanges(sourceFile.text, heritageExpression.end); - const realEnd = trailingComments?.[trailingComments.length - 1]?.end ?? heritageExpression.end; - changes.replaceRange( - sourceFile, - { - pos: heritageExpression.getFullStart(), - end: realEnd, - }, - heritageVariableName, - { - prefix: " ", - }, - ); -} - -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, sourceFile: SourceFile, typeChecker: TypeChecker, changes: textChanges.ChangeTracker) { - const enclosingVarStmt = bindingPattern.parent.parent.parent as VariableStatement; - const tempHolderForReturn = factory.createUniqueName("dest", GeneratedIdentifierFlags.Optimistic); - const baseExpr: ExpressionReverseChain = { expression: { kind: ExpressionType.IDENTIFIER, identifier: tempHolderForReturn } }; - const bindingElements: ExpressionReverseChain[] = []; - if (isArrayBindingPattern(bindingPattern)) { - addArrayBindingPatterns(bindingPattern, bindingElements, baseExpr); - } - else { - addObjectBindingPatterns(bindingPattern, bindingElements, baseExpr); - } + function handleClassDeclaration(classDecl: ClassDeclaration, heritageExpression: ExpressionWithTypeArguments) { + if (heritageExpression.kind !== SyntaxKind.ExpressionWithTypeArguments) { + throw new Error(`Hey + ${heritageExpression.kind}`); + } + const heritageTypeNode = typeToTypeNode( + typeChecker.getTypeAtLocation(heritageExpression.expression), + heritageExpression.expression, + ); - const expressionToVar = new Map(); - const newNodes: Node[] = [ - factory.createVariableStatement( + 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( - tempHolderForReturn, + heritageVariableName, /*exclamationToken*/ undefined, - /*type*/ undefined, - enclosingVarStmt.declarationList.declarations[0].initializer, + heritageTypeNode, + heritageExpression.expression, )], NodeFlags.Const, ), - ), - ]; - let i = 0; - while (i < bindingElements.length) { - const bindingElement = bindingElements[i]; + ); + // const touchingToken = getTouchingToken(heritageExpression); + changes.insertNodeBefore(sourceFile, classDecl, heritageVariable); + const trailingComments = getTrailingCommentRanges(sourceFile.text, heritageExpression.end); + const realEnd = trailingComments?.[trailingComments.length - 1]?.end ?? heritageExpression.end; + changes.replaceRange( + sourceFile, + { + pos: heritageExpression.getFullStart(), + end: realEnd, + }, + heritageVariableName, + { + prefix: " ", + }, + ); + } - 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); - } + interface ExpressionReverseChain { + element?: BindingElement; + parent?: ExpressionReverseChain; + expression: SubExpression; + } - // 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); + 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) { + const enclosingVarStmt = bindingPattern.parent.parent.parent as VariableStatement; + const tempHolderForReturn = factory.createUniqueName("dest", GeneratedIdentifierFlags.Optimistic); + const baseExpr: ExpressionReverseChain = { expression: { kind: ExpressionType.IDENTIFIER, identifier: tempHolderForReturn } }; + const bindingElements: ExpressionReverseChain[] = []; + if (isArrayBindingPattern(bindingPattern)) { + addArrayBindingPatterns(bindingPattern, bindingElements, baseExpr); } else { - const typeNode = typeToTypeNode(typeChecker.getTypeAtLocation(name), name, typeChecker); - let variableInitializer = createChainedExpression(bindingElement, expressionToVar); - if (bindingElement.element!.initializer) { - const tempName = factory.createUniqueName("temp", GeneratedIdentifierFlags.Optimistic); + addObjectBindingPatterns(bindingPattern, bindingElements, baseExpr); + } + + const expressionToVar = new Map(); + const newNodes: Node[] = [ + factory.createVariableStatement( + /*modifiers*/ undefined, + factory.createVariableDeclarationList( + [factory.createVariableDeclaration( + tempHolderForReturn, + /*exclamationToken*/ undefined, + /*type*/ undefined, + enclosingVarStmt.declarationList.declarations[0].initializer, + )], + NodeFlags.Const, + ), + ), + ]; + let i = 0; + while (i < bindingElements.length) { + const bindingElement = bindingElements[i]; + + 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 = typeToTypeNode(typeChecker.getTypeAtLocation(name), name); + let variableInitializer = createChainedExpression(bindingElement, expressionToVar); + if (bindingElement.element!.initializer) { + const tempName = factory.createUniqueName("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, + ); + } newNodes.push(factory.createVariableStatement( - /*modifiers*/ undefined, + [factory.createToken(SyntaxKind.ExportKeyword)], factory.createVariableDeclarationList( [factory.createVariableDeclaration( - tempName, + name, /*exclamationToken*/ undefined, - /*type*/ undefined, + typeNode, 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, - ); } - newNodes.push(factory.createVariableStatement( - [factory.createToken(SyntaxKind.ExportKeyword)], - factory.createVariableDeclarationList( - [factory.createVariableDeclaration( - name, - /*exclamationToken*/ undefined, - typeNode, - variableInitializer, - )], - NodeFlags.Const, + ++i; + } + + 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), ), )); } - ++i; + changes.replaceNodeWithNodes(sourceFile, enclosingVarStmt, newNodes); } - 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), - ), - )); - } - changes.replaceNodeWithNodes(sourceFile, enclosingVarStmt, newNodes); -} - -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; + 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 }, + }); } - 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; + 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.propertyName.text; + name = (bindingElement.name as Identifier).text; } + bindingElements.push({ + element: bindingElement, + parent, + expression: { kind: ExpressionType.TEXT, text: name }, + }); } - 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)!, - ); + function createChainedExpression(expression: ExpressionReverseChain, expressionToVar: Map): Expression { + const reverseTraverse: ExpressionReverseChain[] = [expression]; + while (expression.parent) { + expression = expression.parent; + reverseTraverse.push(expression); } - else if (nextSubExpr.kind === ExpressionType.ARRAY_ACCESS) { - chainedExpression = factory.createElementAccessExpression( - chainedExpression, - nextSubExpr.arrayIndex, - ); + 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; } - return chainedExpression; -} -function typeToTypeNode(type: Type, enclosingDeclaration: Node, typeChecker: TypeChecker) { - const typeNode = typeChecker.typeToTypeNode( - type, - enclosingDeclaration, - declarationEmitNodeBuilderFlags, - ); - return typeNode; -} + function typeToTypeNode(type: Type, enclosingDeclaration: Node) { + const typeNode = typeChecker.typeToTypeNode( + type, + enclosingDeclaration, + declarationEmitNodeBuilderFlags, + ); + if (!typeNode) { + return undefined; + } + return typeToAutoImportableTypeNode(typeChecker, importAdder, type, enclosingDeclaration, scriptTarget); + } -function tryGetReturnType(typeChecker: TypeChecker, node: SignatureDeclaration): Type | undefined { - const signature = typeChecker.getSignatureFromDeclaration(node); - if (signature) { - return typeChecker.getReturnTypeOfSignature(signature); + function tryGetReturnType(node: SignatureDeclaration): Type | undefined { + const signature = typeChecker.getSignatureFromDeclaration(node); + if (signature) { + return typeChecker.getReturnTypeOfSignature(signature); + } } -} -function addTypesToParametersArray(changes: textChanges.ChangeTracker, nodeArray: NodeArray | undefined, typeChecker: TypeChecker) { - if (nodeArray === undefined) return undefined; - nodeArray.forEach(param => addTypeToParameterDeclaration(changes, param, typeChecker)); -} + function addTypesToParametersArray(nodeArray: NodeArray | undefined) { + if (nodeArray === undefined) return undefined; + nodeArray.forEach(param => addTypeToParameterDeclaration(param)); + } -function addTypeToParameterDeclaration(changes: textChanges.ChangeTracker, parameter: ParameterDeclaration, typeChecker: TypeChecker): void { - if (!parameter.type) { - const type = typeChecker.getTypeAtLocation(parameter); - if (type) { - const typeNode = typeToTypeNode(type, parameter, typeChecker); - if (typeNode) { - changes.tryInsertTypeAnnotation(getSourceFileOfNode(parameter), parameter, typeNode); + function addTypeToParameterDeclaration(parameter: ParameterDeclaration): void { + if (!parameter.type) { + const type = typeChecker.getTypeAtLocation(parameter); + if (type) { + const typeNode = typeToTypeNode(type, parameter); + if (typeNode) { + changes.tryInsertTypeAnnotation(getSourceFileOfNode(parameter), parameter, typeNode); + } } } } From 86d575149532e78ff8cd063e61b400f1caf2de09 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 26 Sep 2023 15:35:11 +0100 Subject: [PATCH 077/224] Added more descriptive text for fixer messages and enabled fix all. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/diagnosticMessages.json | 24 ++ src/services/codeFixProvider.ts | 1 + .../fixMissingTypeAnnotationOnExports.ts | 245 ++++++++++-------- .../codeFixMissingTypeAnnotationOnExports.ts | 4 +- ...codeFixMissingTypeAnnotationOnExports10.ts | 8 +- ...codeFixMissingTypeAnnotationOnExports11.ts | 4 +- ...codeFixMissingTypeAnnotationOnExports12.ts | 4 +- ...codeFixMissingTypeAnnotationOnExports13.ts | 6 +- ...codeFixMissingTypeAnnotationOnExports14.ts | 6 +- ...codeFixMissingTypeAnnotationOnExports15.ts | 6 +- ...codeFixMissingTypeAnnotationOnExports16.ts | 6 +- ...codeFixMissingTypeAnnotationOnExports17.ts | 6 +- ...codeFixMissingTypeAnnotationOnExports19.ts | 4 +- .../codeFixMissingTypeAnnotationOnExports2.ts | 4 +- ...codeFixMissingTypeAnnotationOnExports20.ts | 4 +- ...codeFixMissingTypeAnnotationOnExports21.ts | 8 +- ...codeFixMissingTypeAnnotationOnExports22.ts | 4 +- ...AnnotationOnExports23-params-and-return.ts | 6 +- ...ingTypeAnnotationOnExports24-formatting.ts | 5 +- ...gTypeAnnotationOnExports25-formatting-2.ts | 4 +- ...notationOnExports26-heritage-formatting.ts | 4 +- ...tationOnExports27-heritage-formatting-2.ts | 4 +- ...tationOnExports28-heritage-formatting-3.ts | 4 +- ...otationOnExports29-fn-in-object-literal.ts | 31 +++ .../codeFixMissingTypeAnnotationOnExports3.ts | 4 +- .../codeFixMissingTypeAnnotationOnExports4.ts | 4 +- .../codeFixMissingTypeAnnotationOnExports5.ts | 4 +- .../codeFixMissingTypeAnnotationOnExports6.ts | 4 +- .../codeFixMissingTypeAnnotationOnExports7.ts | 8 +- .../codeFixMissingTypeAnnotationOnExports8.ts | 4 +- .../codeFixMissingTypeAnnotationOnExports9.ts | 4 +- 31 files changed, 253 insertions(+), 181 deletions(-) create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports29-fn-in-object-literal.ts diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 7525cb4c6bf8b..cf3885fe4a1e6 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -6992,6 +6992,30 @@ "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 tye annotations": { + "category": "Message", + "code": 90067 + }, "Convert function to an ES2015 class": { "category": "Message", 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 index e3c3165d6ed56..6543285725a38 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -3,9 +3,15 @@ import { BindingElement, BindingPattern, ClassDeclaration, + CodeFixAction, CodeFixAllContext, CodeFixContext, + createPrinterWithRemoveComments, + defaultMaximumTruncationLength, + DiagnosticAndArguments, + DiagnosticOrDiagnosticAndArguments, Diagnostics, + EmitHint, ExportAssignment, Expression, ExpressionWithTypeArguments, @@ -17,9 +23,7 @@ import { getTrailingCommentRanges, Identifier, isArrayBindingPattern, - isArrowFunction, isComputedPropertyName, - isFunctionExpression, isObjectBindingPattern, isOmittedExpression, isVariableDeclaration, @@ -36,11 +40,11 @@ import { textChanges, Type, TypeChecker, + TypeNode, VariableDeclaration, VariableStatement, } from "../_namespaces/ts"; import { - codeFixAll, createCodeFixAction, createCombinedCodeActions, createImportAdder, @@ -51,6 +55,7 @@ import { } from "../_namespaces/ts.codefix"; const fixId = "fixMissingTypeAnnotationOnExports"; +const fixName = "add-annotation"; const errorCodes = [ Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.code, Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function.code, @@ -60,6 +65,8 @@ const canHaveExplicitTypeAnnotation = new Set([ SyntaxKind.MethodDeclaration, SyntaxKind.PropertyDeclaration, SyntaxKind.FunctionDeclaration, + SyntaxKind.FunctionExpression, + SyntaxKind.ArrowFunction, SyntaxKind.VariableDeclaration, SyntaxKind.Parameter, SyntaxKind.ExportAssignment, @@ -82,29 +89,34 @@ registerCodeFix({ fixIds: [fixId], getCodeActions(context) { const { sourceFile, span } = context; + const fixes: CodeFixAction[] = []; const nodeWithDiag = getTokenAtPosition(sourceFile, span.start); - + let fixerMessage: DiagnosticOrDiagnosticAndArguments | undefined; const changes = textChanges.ChangeTracker.with(context, t => { const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host); - doChange(t, context, nodeWithDiag, importAdder); + fixerMessage = doChange(t, context, nodeWithDiag, importAdder); importAdder.writeFixes(t); }); - return [ - createCodeFixAction( - fixId, - changes, - Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit, - fixId, - Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit, - ), - ]; + if (fixerMessage) { + fixes.push( + createCodeFixAction( + fixName, + changes, + fixerMessage, + fixId, + Diagnostics.Add_all_missing_tye_annotations, + ), + ); + } + return fixes; }, getAllCodeActions: context => { const changes = textChanges.ChangeTracker.with(context, t => { const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host); + const fixedNodes = new Set(); eachDiagnostic(context, errorCodes, diag => { const nodeWithDiag = getTokenAtPosition(diag.file, diag.start); - doChange(t, context, nodeWithDiag, importAdder); + doChange(t, context, nodeWithDiag, importAdder, fixedNodes); }); importAdder.writeFixes(t); }); @@ -112,98 +124,95 @@ registerCodeFix({ }, }); -function doChange(changes: textChanges.ChangeTracker, context: CodeFixContext | CodeFixAllContext, nodeWithDiag: Node, importAdder: ImportAdder): void { +function doChange( + changes: textChanges.ChangeTracker, + context: CodeFixContext | CodeFixAllContext, + nodeWithDiag: Node, + importAdder: ImportAdder, + fixedNodes?: Set, +): DiagnosticOrDiagnosticAndArguments | undefined { const nodeWithNoType = findNearestParentWithTypeAnnotation(nodeWithDiag); + const sourceFile: SourceFile = context.sourceFile; + const program = context.program; + const typeChecker: TypeChecker = program.getTypeChecker(); + const scriptTarget = getEmitScriptTarget(program.getCompilerOptions()); + if (nodeWithNoType) { - fixupForIsolatedDeclarations(nodeWithNoType, nodeWithDiag, context, changes, importAdder); + return fixupForIsolatedDeclarations(nodeWithNoType); } -} + return undefined; -// 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 { - while ( - node && - (((isObjectBindingPattern(node) || isArrayBindingPattern(node)) && - !isVariableDeclaration(node.parent)) || !canHaveExplicitTypeAnnotation.has(node.kind)) - ) { - node = node.parent; + // 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 { + while ( + node && + (((isObjectBindingPattern(node) || isArrayBindingPattern(node)) && + !isVariableDeclaration(node.parent)) || !canHaveExplicitTypeAnnotation.has(node.kind)) + ) { + node = node.parent; + } + return node; } - return node; -} -/** - * 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, nodeWithDiag: Node, context: CodeFixContext | CodeFixAllContext, changes: textChanges.ChangeTracker, importAdder: ImportAdder) { - const sourceFile: SourceFile = context.sourceFile; - const program = context.program; - const typeChecker: TypeChecker = program.getTypeChecker(); - const scriptTarget = getEmitScriptTarget(program.getCompilerOptions()); - switch (node.kind) { - case SyntaxKind.Parameter: - const parameter = node as ParameterDeclaration; - addTypeToParameterDeclaration(parameter); - break; - case SyntaxKind.PropertyDeclaration: - case SyntaxKind.VariableDeclaration: - const variableDeclaration = node as VariableDeclaration | PropertyDeclaration; - if (!variableDeclaration.type) { - if (variableDeclaration.initializer && (isFunctionExpression(variableDeclaration.initializer) || isArrowFunction(variableDeclaration.initializer))) { - addTypeToFunctionLikeDeclaration(variableDeclaration.initializer, sourceFile); - } - else { - const type = typeChecker.getTypeAtLocation(variableDeclaration); - const typeNode = typeToTypeNode(type, variableDeclaration); - if (typeNode) { - changes.tryInsertTypeAnnotation(sourceFile, variableDeclaration, typeNode); - } - } - } - break; - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.MethodDeclaration: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - addTypeToFunctionLikeDeclaration(node as SignatureDeclaration, sourceFile); - break; - case SyntaxKind.ExportAssignment: - const defaultExport = node as ExportAssignment; - if (!defaultExport.isExportEquals) { - const type = typeChecker.getTypeAtLocation(defaultExport.expression); - const typeNode = typeToTypeNode(type, node); - return changes.replaceNodeWithNodes(sourceFile, node, [ - factory.createVariableStatement( - /*modifiers*/ undefined, - factory.createVariableDeclarationList( - [factory.createVariableDeclaration( - "__default", - /*exclamationToken*/ undefined, - typeNode, - defaultExport.expression, - )], - NodeFlags.Const, + /** + * 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: + case SyntaxKind.SetAccessor: + return addTypeToFunctionLikeDeclaration(node as SignatureDeclaration, sourceFile); + case SyntaxKind.ExportAssignment: + const defaultExport = node as ExportAssignment; + if (!defaultExport.isExportEquals) { + const type = typeChecker.getTypeAtLocation(defaultExport.expression); + const typeNode = typeToTypeNode(type, node); + changes.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")), - ]); - } - break; - // Handling expression like heritage clauses e.g. class A extends mixin(B) .. - case SyntaxKind.ClassDeclaration: - handleClassDeclaration(node as ClassDeclaration, nodeWithDiag.parent.parent as ExpressionWithTypeArguments); - break; - case SyntaxKind.ObjectBindingPattern: - case SyntaxKind.ArrayBindingPattern: - transformDestructuringPatterns(node as BindingPattern); - break; - default: - throw new Error(`Cannot find a fix for the given node ${node.kind}`); + 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, nodeWithDiag.parent.parent as ExpressionWithTypeArguments); + 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) { + function addTypeToFunctionLikeDeclaration(func: SignatureDeclaration, sourceFile: SourceFile): undefined | DiagnosticOrDiagnosticAndArguments { if (func.type) { return; } @@ -213,17 +222,18 @@ function fixupForIsolatedDeclarations(node: Node, nodeWithDiag: Node, context: C return; } const typeNode = typeToTypeNode(type, func); + addTypesToParametersArray(func.parameters); if (typeNode) { changes.tryInsertTypeAnnotation( sourceFile, func, typeNode, ); + return [Diagnostics.Add_return_type_0, printTypeNode(typeNode)]; } - addTypesToParametersArray(func.parameters); } - function handleClassDeclaration(classDecl: ClassDeclaration, heritageExpression: ExpressionWithTypeArguments) { + function handleClassDeclaration(classDecl: ClassDeclaration, heritageExpression: ExpressionWithTypeArguments): DiagnosticAndArguments { if (heritageExpression.kind !== SyntaxKind.ExpressionWithTypeArguments) { throw new Error(`Hey + ${heritageExpression.kind}`); } @@ -264,6 +274,7 @@ function fixupForIsolatedDeclarations(node: Node, nodeWithDiag: Node, context: C prefix: " ", }, ); + return [Diagnostics.Extract_base_class_to_variable]; } interface ExpressionReverseChain { @@ -285,7 +296,7 @@ function fixupForIsolatedDeclarations(node: Node, nodeWithDiag: Node, context: C | { kind: ExpressionType.ARRAY_ACCESS; arrayIndex: number; } | { kind: ExpressionType.IDENTIFIER; identifier: Identifier; }; - function transformDestructuringPatterns(bindingPattern: BindingPattern) { + function transformDestructuringPatterns(bindingPattern: BindingPattern): DiagnosticOrDiagnosticAndArguments { const enclosingVarStmt = bindingPattern.parent.parent.parent as VariableStatement; const tempHolderForReturn = factory.createUniqueName("dest", GeneratedIdentifierFlags.Optimistic); const baseExpr: ExpressionReverseChain = { expression: { kind: ExpressionType.IDENTIFIER, identifier: tempHolderForReturn } }; @@ -396,6 +407,9 @@ function fixupForIsolatedDeclarations(node: Node, nodeWithDiag: Node, context: C )); } changes.replaceNodeWithNodes(sourceFile, enclosingVarStmt, newNodes); + return [ + Diagnostics.Extract_binding_expressions_to_variable, + ]; } function addArrayBindingPatterns(bindingPattern: ArrayBindingPattern, bindingElements: ExpressionReverseChain[], parent: ExpressionReverseChain) { @@ -491,19 +505,28 @@ function fixupForIsolatedDeclarations(node: Node, nodeWithDiag: Node, context: C } function addTypesToParametersArray(nodeArray: NodeArray | undefined) { - if (nodeArray === undefined) return undefined; - nodeArray.forEach(param => addTypeToParameterDeclaration(param)); + if (nodeArray === undefined) return; + nodeArray.forEach(param => fixupForIsolatedDeclarations(param)); } - function addTypeToParameterDeclaration(parameter: ParameterDeclaration): void { - if (!parameter.type) { - const type = typeChecker.getTypeAtLocation(parameter); - if (type) { - const typeNode = typeToTypeNode(type, parameter); - if (typeNode) { - changes.tryInsertTypeAnnotation(getSourceFileOfNode(parameter), parameter, typeNode); - } + function addTypeAnnotation(decl: ParameterDeclaration | VariableDeclaration | PropertyDeclaration): undefined | DiagnosticOrDiagnosticAndArguments { + if (decl.type) return undefined; + + const type = typeChecker.getTypeAtLocation(decl); + if (type) { + const typeNode = typeToTypeNode(type, decl); + if (typeNode) { + changes.tryInsertTypeAnnotation(getSourceFileOfNode(decl), decl, typeNode); + return [Diagnostics.Add_annotation_of_type_0, printTypeNode(typeNode)]; } } } + function printTypeNode(node: TypeNode) { + const printer = createPrinterWithRemoveComments(); + const result = printer.printNode(EmitHint.Unspecified, node, sourceFile); + if (result.length > defaultMaximumTruncationLength) { + return result.substr(0, defaultMaximumTruncationLength - "...".length) + "..."; + } + return result; + } } diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports.ts index a85cfd65dceaa..cc3839951745e 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports.ts @@ -6,11 +6,11 @@ ////export const g = foo(); verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: "Add annotation of type 'number'" }, ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: "Add annotation of type 'number'", index: 0, newFileContent: `function foo() { return 42; } diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports10.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports10.ts index 33b0f070a7ad0..8b5e76ca2b2b3 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports10.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports10.ts @@ -8,18 +8,16 @@ ////export default foo(); verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: "Extract default export to variable" }, ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: "Extract default export to variable", index: 0, newFileContent: `function foo() { return { x: 1, y: 1 }; } -const __default: { - x: number; y: number; -} = foo(); +const __default: { x: number; y: number; } = foo(); export default __default;`, }); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts index cde0fd82737bf..4d183ab48ba0c 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts @@ -9,11 +9,11 @@ //// export class Point3D extends mixin(Point2D) { z = 0; } verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } + { description: ts.Diagnostics.Extract_base_class_to_variable.message } ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: ts.Diagnostics.Extract_base_class_to_variable.message, index: 0, newFileContent: `function mixin any>(ctor: T): T { diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts index 4ba84f0757629..57675a55b19c8 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts @@ -9,12 +9,12 @@ //// export const Point3D = class extends mixin(Point2D) { z = 0; }; verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: "Add annotation of type 'typeof Point3D'" }, ]); // TODO: There's no easy way to name the type, so rather promoting this to a classDeclaration is better. verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: "Add annotation of type 'typeof Point3D'", index: 0, newFileContent: `function mixin any>(ctor: T): T { diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports13.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports13.ts index 97c7e8da9772a..6a864908a4c62 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports13.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports13.ts @@ -8,12 +8,12 @@ //// export const { x, y } = foo(); verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } + { description: ts.Diagnostics.Extract_binding_expressions_to_variable.message }, + { description: ts.Diagnostics.Extract_binding_expressions_to_variable.message } ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: ts.Diagnostics.Extract_binding_expressions_to_variable.message, index: 0, newFileContent: `function foo() { diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports14.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports14.ts index 50fc061155f9c..34d1ce044a5da 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports14.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports14.ts @@ -8,12 +8,12 @@ //// export const { x: abcd, y: defg } = foo(); verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } + { description: ts.Diagnostics.Extract_binding_expressions_to_variable.message }, + { description: ts.Diagnostics.Extract_binding_expressions_to_variable.message } ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: ts.Diagnostics.Extract_binding_expressions_to_variable.message, index: 0, newFileContent: `function foo() { diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts index 0661503a5bb72..d874604367574 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts @@ -8,12 +8,12 @@ //// export const { x, y = 0} = foo(), z= 42; verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } + { description: ts.Diagnostics.Extract_binding_expressions_to_variable.message }, + { description: ts.Diagnostics.Extract_binding_expressions_to_variable.message } ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: ts.Diagnostics.Extract_binding_expressions_to_variable.message, index: 0, newFileContent: `function foo() { diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports16.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports16.ts index 608c30cb80b28..ce7f4d5b9e175 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports16.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports16.ts @@ -8,12 +8,12 @@ //// export const { x, y = 0 } = foo(); verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } + { description: ts.Diagnostics.Extract_binding_expressions_to_variable.message }, + { description: ts.Diagnostics.Extract_binding_expressions_to_variable.message } ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: ts.Diagnostics.Extract_binding_expressions_to_variable.message, index: 0, newFileContent: `function foo() { diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports17.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports17.ts index dc83ccd8bec31..a39f7b5e5abde 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports17.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports17.ts @@ -12,12 +12,12 @@ //// export const { x: a , y: { [foo3()]: {dd: e} } } = foo(); verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } + { description: ts.Diagnostics.Extract_binding_expressions_to_variable.message }, + { description: ts.Diagnostics.Extract_binding_expressions_to_variable.message } ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: ts.Diagnostics.Extract_binding_expressions_to_variable.message, index: 0, newFileContent: `function foo() { diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports19.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports19.ts index aa12f3050ec5c..c8442437b11b1 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports19.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports19.ts @@ -7,11 +7,11 @@ //// } verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: "Add return type 'number'" }, ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: "Add return type 'number'", index: 0, newFileContent: `export class A { diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports2.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports2.ts index 9df3e915b9cc8..c0ce15c2dc205 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports2.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports2.ts @@ -7,11 +7,11 @@ ////export function foo() { return a + b; } verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } + { description: "Add return type 'number'" } ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: "Add return type 'number'", index: 0, newFileContent: `const a = 42; diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports20.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports20.ts index 26ba639169127..c1e9e7900ae5b 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports20.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports20.ts @@ -8,11 +8,11 @@ //// } verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: "Add return type 'number'" }, ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: "Add return type 'number'", index: 0, newFileContent: `function foo() { return 42; } diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts index da94d0a3f923f..9ab92d8d7a0bd 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts @@ -8,16 +8,14 @@ ////} as const; verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } + { description: "Add annotation of type '{ readonly z: symbol; }'" } ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: "Add annotation of type '{ readonly z: symbol; }'", index: 0, newFileContent: -`export const a: { - readonly z: symbol; -} = { +`export const a: { readonly z: symbol; } = { z: Symbol() } as const;` }); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports22.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports22.ts index 10b2aa8eb06f3..fb5c043266284 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports22.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports22.ts @@ -8,11 +8,11 @@ //// } verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } + { description: "Add return type 'symbol'" } ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: "Add return type 'symbol'", index: 0, newFileContent: `export function foo (): symbol { diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports23-params-and-return.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports23-params-and-return.ts index d751a4f159055..d3c9e99c982a2 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports23-params-and-return.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports23-params-and-return.ts @@ -16,12 +16,12 @@ ////// Trivia verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } + { description: "Add return type 'number'" }, + { description: "Add annotation of type 'number'" } ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: "Add return type 'number'", index: 0, newFileContent: `/** diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports24-formatting.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports24-formatting.ts index 08b429926681e..54f306aa8aaad 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports24-formatting.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports24-formatting.ts @@ -7,13 +7,12 @@ //// */ ////export function foo(){} - verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } + { description: "Add return type 'void'" } ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: "Add return type 'void'", index: 0, newFileContent: `/** diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports25-formatting-2.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports25-formatting-2.ts index bb834a6806ce9..8cd30c66dda26 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports25-formatting-2.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports25-formatting-2.ts @@ -12,11 +12,11 @@ verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } + { description: "Add return type 'number'" } ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: "Add return type 'number'", index: 0, newFileContent: `/** diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports26-heritage-formatting.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports26-heritage-formatting.ts index 16027e207ca4f..5485006c46df0 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports26-heritage-formatting.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports26-heritage-formatting.ts @@ -17,11 +17,11 @@ ////} verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } + { description: ts.Diagnostics.Extract_base_class_to_variable.message } ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: ts.Diagnostics.Extract_base_class_to_variable.message, index: 0, newFileContent: `function mixin any>(ctor: T): T { diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports27-heritage-formatting-2.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports27-heritage-formatting-2.ts index 7e636990c0773..eaa37d1a21c4d 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports27-heritage-formatting-2.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports27-heritage-formatting-2.ts @@ -11,11 +11,11 @@ ////} verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } + { description: ts.Diagnostics.Extract_base_class_to_variable.message } ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: ts.Diagnostics.Extract_base_class_to_variable.message, index: 0, newFileContent: `function mixin any>(ctor: T): T { diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports28-heritage-formatting-3.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports28-heritage-formatting-3.ts index be92471eefff9..cb3c18d888188 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports28-heritage-formatting-3.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports28-heritage-formatting-3.ts @@ -11,11 +11,11 @@ ////} verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } + { description: ts.Diagnostics.Extract_base_class_to_variable.message } ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: ts.Diagnostics.Extract_base_class_to_variable.message, index: 0, newFileContent: `function mixin any>(ctor: T): T { 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..458ccbc385d51 --- /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_tye_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 index e24b7fa970977..f154ae2a482f3 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports3.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports3.ts @@ -10,11 +10,11 @@ ////} verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: "Add annotation of type 'number'" }, ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: "Add annotation of type 'number'", index: 0, newFileContent: `const a = 42; diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports4.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports4.ts index 058e39d86b4ab..aa85336a35642 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports4.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports4.ts @@ -9,11 +9,11 @@ ////} verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: "Add return type 'number'" }, ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: "Add return type 'number'", index: 0, newFileContent: `const a = 42; diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports5.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports5.ts index 0a1c0e1a9370e..8a934a215e76a 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports5.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports5.ts @@ -9,11 +9,11 @@ ////} verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } + { description: "Add return type 'number'" } ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: "Add return type 'number'", index: 0, newFileContent: `const a = 42; diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports6.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports6.ts index cdccb01c4d996..39bd7c8f63124 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports6.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports6.ts @@ -6,11 +6,11 @@ ////export const c = [...foo()]; verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: "Add annotation of type 'number[]'" }, ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: "Add annotation of type 'number[]'", index: 0, newFileContent: `function foo(): number[] {return [42];} diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts index 7d86594d5b3ad..14f1688dd0362 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts @@ -6,15 +6,13 @@ ////export const c = {foo: foo()}; verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message } + { description: "Add annotation of type '{ foo: number[]; }'" } ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: "Add annotation of type '{ foo: number[]; }'", index: 0, newFileContent: `function foo(): number[] {return [42];} -export const c: { - foo: number[]; -} = {foo: foo()};`, +export const c: { foo: number[]; } = {foo: foo()};`, }); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports8.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports8.ts index 7e7cfe29d681a..fa049ed7264d6 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports8.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports8.ts @@ -6,11 +6,11 @@ ////export const g = function () { return foo(); }; verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: "Add return type 'number'" }, ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: "Add return type 'number'", index: 0, newFileContent: `function foo() {return 42;} diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports9.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports9.ts index 0f14df3e3c158..2bf42d5405815 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports9.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports9.ts @@ -9,11 +9,11 @@ ////export = a; verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, + { description: "Add annotation of type 'number'" }, ]); verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: "Add annotation of type 'number'", index: 0, newFileContent: `function foo( ){ From 276f9ed5f2e25abd049b6cf6147499853f81f526 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 26 Sep 2023 17:04:38 +0100 Subject: [PATCH 078/224] Improve biding handling. Signed-off-by: Titian Cernicova-Dragomir --- .../fixMissingTypeAnnotationOnExports.ts | 69 ++++++----- ...otationOnExports30-non-exported-bidings.ts | 21 ++++ ...ingTypeAnnotationOnExports31-long-types.ts | 111 ++++++++++++++++++ 3 files changed, 174 insertions(+), 27 deletions(-) create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports30-non-exported-bidings.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports31-long-types.ts diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 6543285725a38..644ef4c358de2 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -21,12 +21,15 @@ import { getSourceFileOfNode, getTokenAtPosition, getTrailingCommentRanges, + hasSyntacticModifier, Identifier, isArrayBindingPattern, isComputedPropertyName, + isIdentifier, isObjectBindingPattern, isOmittedExpression, isVariableDeclaration, + ModifierFlags, Node, NodeArray, NodeBuilderFlags, @@ -42,6 +45,7 @@ import { TypeChecker, TypeNode, VariableDeclaration, + VariableDeclarationList, VariableStatement, } from "../_namespaces/ts"; import { @@ -296,33 +300,45 @@ function doChange( | { kind: ExpressionType.ARRAY_ACCESS; arrayIndex: number; } | { kind: ExpressionType.IDENTIFIER; identifier: Identifier; }; - function transformDestructuringPatterns(bindingPattern: BindingPattern): DiagnosticOrDiagnosticAndArguments { + function transformDestructuringPatterns(bindingPattern: BindingPattern): DiagnosticOrDiagnosticAndArguments | undefined { + const enclosingVariableDeclaration = bindingPattern.parent as VariableDeclaration; const enclosingVarStmt = bindingPattern.parent.parent.parent as VariableStatement; - const tempHolderForReturn = factory.createUniqueName("dest", GeneratedIdentifierFlags.Optimistic); - const baseExpr: ExpressionReverseChain = { expression: { kind: ExpressionType.IDENTIFIER, identifier: tempHolderForReturn } }; - const bindingElements: ExpressionReverseChain[] = []; - if (isArrayBindingPattern(bindingPattern)) { - addArrayBindingPatterns(bindingPattern, bindingElements, baseExpr); - } - else { - addObjectBindingPatterns(bindingPattern, bindingElements, baseExpr); - } + if (!enclosingVariableDeclaration.initializer) return undefined; - const expressionToVar = new Map(); - const newNodes: Node[] = [ - factory.createVariableStatement( + 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, - enclosingVarStmt.declarationList.declarations[0].initializer, + 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(); + let i = 0; while (i < bindingElements.length) { const bindingElement = bindingElements[i]; @@ -355,7 +371,11 @@ function doChange( const typeNode = typeToTypeNode(typeChecker.getTypeAtLocation(name), name); let variableInitializer = createChainedExpression(bindingElement, expressionToVar); if (bindingElement.element!.initializer) { - const tempName = factory.createUniqueName("temp", GeneratedIdentifierFlags.Optimistic); + 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( @@ -380,8 +400,11 @@ function doChange( variableInitializer, ); } + const exportModifier = hasSyntacticModifier(enclosingVarStmt, ModifierFlags.Export) ? + [factory.createToken(SyntaxKind.ExportKeyword)] : + undefined; newNodes.push(factory.createVariableStatement( - [factory.createToken(SyntaxKind.ExportKeyword)], + exportModifier, factory.createVariableDeclarationList( [factory.createVariableDeclaration( name, @@ -486,15 +509,7 @@ function doChange( } function typeToTypeNode(type: Type, enclosingDeclaration: Node) { - const typeNode = typeChecker.typeToTypeNode( - type, - enclosingDeclaration, - declarationEmitNodeBuilderFlags, - ); - if (!typeNode) { - return undefined; - } - return typeToAutoImportableTypeNode(typeChecker, importAdder, type, enclosingDeclaration, scriptTarget); + return typeToAutoImportableTypeNode(typeChecker, importAdder, type, enclosingDeclaration, scriptTarget, declarationEmitNodeBuilderFlags); } function tryGetReturnType(node: SignatureDeclaration): Type | undefined { 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..e7c70367baa6f --- /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_tye_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, + }, + }; + }, +};` +}); From 9416f380e9f310ddbea7c0ebfe4039e86c493be7 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 27 Sep 2023 10:24:46 +0100 Subject: [PATCH 079/224] Ensure nested import types are processed. Signed-off-by: Titian Cernicova-Dragomir --- src/services/codefixes/helpers.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/services/codefixes/helpers.ts b/src/services/codefixes/helpers.ts index 804e87040f48b..6d439356dca3f 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, @@ -592,7 +591,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); From 24a5f53895ebefdacf222980f1f13a1e8ea7d533 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 27 Sep 2023 10:25:27 +0100 Subject: [PATCH 080/224] Added typeof fix for entity names. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/diagnosticMessages.json | 4 + .../fixMissingTypeAnnotationOnExports.ts | 194 +++++++++++++----- src/services/services.ts | 4 +- 3 files changed, 155 insertions(+), 47 deletions(-) diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index cf3885fe4a1e6..163f5b9d8e6e7 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -7016,6 +7016,10 @@ "category": "Message", "code": 90067 }, + "Add inline type assertion to '{0}'": { + "category": "Message", + "code": 90068 + }, "Convert function to an ES2015 class": { "category": "Message", diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 644ef4c358de2..bc615859e224e 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -7,15 +7,19 @@ import { CodeFixAllContext, CodeFixContext, createPrinterWithRemoveComments, + Debug, defaultMaximumTruncationLength, DiagnosticAndArguments, DiagnosticOrDiagnosticAndArguments, Diagnostics, EmitHint, + EntityName, ExportAssignment, Expression, ExpressionWithTypeArguments, factory, + FileTextChanges, + findAncestor, GeneratedIdentifierFlags, getEmitScriptTarget, getSourceFileOfNode, @@ -25,9 +29,14 @@ import { Identifier, isArrayBindingPattern, isComputedPropertyName, + isDeclaration, + isEntityNameExpression, + isExpression, isIdentifier, isObjectBindingPattern, isOmittedExpression, + isShorthandPropertyAssignment, + isValueSignatureDeclaration, isVariableDeclaration, ModifierFlags, Node, @@ -41,11 +50,11 @@ import { SourceFile, SyntaxKind, textChanges, + TextSpan, Type, TypeChecker, TypeNode, VariableDeclaration, - VariableDeclarationList, VariableStatement, } from "../_namespaces/ts"; import { @@ -53,13 +62,13 @@ import { createCombinedCodeActions, createImportAdder, eachDiagnostic, - ImportAdder, registerCodeFix, typeToAutoImportableTypeNode, } from "../_namespaces/ts.codefix"; const fixId = "fixMissingTypeAnnotationOnExports"; -const fixName = "add-annotation"; +const addAnnotationFix = "add-annotation"; +const addInlineTypeAssertion = "add-type-assertion"; const errorCodes = [ Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.code, Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function.code, @@ -92,60 +101,130 @@ registerCodeFix({ errorCodes, fixIds: [fixId], getCodeActions(context) { - const { sourceFile, span } = context; const fixes: CodeFixAction[] = []; - const nodeWithDiag = getTokenAtPosition(sourceFile, span.start); - let fixerMessage: DiagnosticOrDiagnosticAndArguments | undefined; - const changes = textChanges.ChangeTracker.with(context, t => { - const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host); - fixerMessage = doChange(t, context, nodeWithDiag, importAdder); - importAdder.writeFixes(t); - }); - if (fixerMessage) { - fixes.push( - createCodeFixAction( - fixName, - changes, - fixerMessage, - fixId, - Diagnostics.Add_all_missing_tye_annotations, - ), - ); - } + + addCodeAction(addAnnotationFix, fixes, context, "full", f => f.addFullAnnotation(context.span)); + addCodeAction(addAnnotationFix, fixes, context, "relative", f => f.addFullAnnotation(context.span)); + addCodeAction(addInlineTypeAssertion, fixes, context, "full", f => f.addInlineAnnotation(context.span)); + addCodeAction(addInlineTypeAssertion, fixes, context, "relative", f => f.addInlineAnnotation(context.span)); + return fixes; }, getAllCodeActions: context => { - const changes = textChanges.ChangeTracker.with(context, t => { - const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host); - const fixedNodes = new Set(); + const changes = withChanges(context, "full", f => { eachDiagnostic(context, errorCodes, diag => { - const nodeWithDiag = getTokenAtPosition(diag.file, diag.start); - doChange(t, context, nodeWithDiag, importAdder, fixedNodes); + f.addFullAnnotation(diag); }); - importAdder.writeFixes(t); }); - return createCombinedCodeActions(changes); + return createCombinedCodeActions(changes.textChanges); }, }); +interface Fixer { + addFullAnnotation(span: TextSpan): DiagnosticOrDiagnosticAndArguments | undefined; + addInlineAnnotation(span: TextSpan): DiagnosticOrDiagnosticAndArguments | undefined; +} -function doChange( - changes: textChanges.ChangeTracker, +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) { + fixes.push( + createCodeFixAction( + fixName, + changes.textChanges, + changes.result, + fixId, + Diagnostics.Add_all_missing_tye_annotations, + ), + ); + } +} +function withChanges( context: CodeFixContext | CodeFixAllContext, - nodeWithDiag: Node, - importAdder: ImportAdder, - fixedNodes?: Set, -): DiagnosticOrDiagnosticAndArguments | undefined { - const nodeWithNoType = findNearestParentWithTypeAnnotation(nodeWithDiag); + typePrinter: "relative" | "full", + cb: (fixer: Fixer) => T, +): { + textChanges: FileTextChanges[]; + result: T; +} { + 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 }); + importAdder.writeFixes(changeTracker); + return { + result, + textChanges: changeTracker.getChanges(), + }; - if (nodeWithNoType) { - return fixupForIsolatedDeclarations(nodeWithNoType); + function addFullAnnotation(span: TextSpan) { + const nodeWithDiag = getTokenAtPosition(sourceFile, span.start); + const nodeWithNoType = findNearestParentWithTypeAnnotation(nodeWithDiag); + if (nodeWithNoType) { + return fixupForIsolatedDeclarations(nodeWithNoType); + } + return undefined; } - return undefined; + function addInlineAnnotation(span: TextSpan): DiagnosticOrDiagnosticAndArguments | undefined { + const nodeWithDiag = getTokenAtPosition(sourceFile, span.start); + const targetNode = findTargetErrorNode(nodeWithDiag, span) as Expression; + if (!targetNode) return; + const isExpressionTarget = isExpression(targetNode); + const isShorthandPropertyAssignmentTarget = isIdentifier(targetNode) && isShorthandPropertyAssignment(targetNode.parent); + if (!(isExpressionTarget || isShorthandPropertyAssignment)) return undefined; + + const typeNode = inferNodeType(targetNode); + if (!typeNode) return undefined; + let replacementNode: Node; + let replacementTarget: Node; + if (isShorthandPropertyAssignmentTarget) { + replacementTarget = targetNode.parent; + replacementNode = factory.createPropertyAssignment( + targetNode, + factory.createAsExpression( + targetNode, + typeNode, + ), + ); + } + else if (isExpressionTarget) { + replacementTarget = targetNode; + replacementNode = factory.createAsExpression( + targetNode, + typeNode, + ); + } + else { + Debug.assertNever(targetNode); + } + changeTracker.replaceNode( + sourceFile, + replacementTarget, + replacementNode, + ); + return [Diagnostics.Add_inline_type_assertion_to_0, printTypeNode(typeNode)]; + } + + function findTargetErrorNode(node: Node, span: TextSpan) { + while ( + node && + node.end < span.start + span.length + ) { + 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. @@ -185,7 +264,7 @@ function doChange( if (!defaultExport.isExportEquals) { const type = typeChecker.getTypeAtLocation(defaultExport.expression); const typeNode = typeToTypeNode(type, node); - changes.replaceNodeWithNodes(sourceFile, node, [ + changeTracker.replaceNodeWithNodes(sourceFile, node, [ factory.createVariableStatement( /*modifiers*/ undefined, factory.createVariableDeclarationList( @@ -207,7 +286,7 @@ function doChange( break; // Handling expression like heritage clauses e.g. class A extends mixin(B) .. case SyntaxKind.ClassDeclaration: - return handleClassDeclaration(node as ClassDeclaration, nodeWithDiag.parent.parent as ExpressionWithTypeArguments); + return handleClassDeclaration(node as ClassDeclaration, node.parent.parent as ExpressionWithTypeArguments); case SyntaxKind.ObjectBindingPattern: case SyntaxKind.ArrayBindingPattern: return transformDestructuringPatterns(node as BindingPattern); @@ -228,7 +307,7 @@ function doChange( const typeNode = typeToTypeNode(type, func); addTypesToParametersArray(func.parameters); if (typeNode) { - changes.tryInsertTypeAnnotation( + changeTracker.tryInsertTypeAnnotation( sourceFile, func, typeNode, @@ -264,10 +343,10 @@ function doChange( ), ); // const touchingToken = getTouchingToken(heritageExpression); - changes.insertNodeBefore(sourceFile, classDecl, heritageVariable); + changeTracker.insertNodeBefore(sourceFile, classDecl, heritageVariable); const trailingComments = getTrailingCommentRanges(sourceFile.text, heritageExpression.end); const realEnd = trailingComments?.[trailingComments.length - 1]?.end ?? heritageExpression.end; - changes.replaceRange( + changeTracker.replaceRange( sourceFile, { pos: heritageExpression.getFullStart(), @@ -429,7 +508,7 @@ function doChange( ), )); } - changes.replaceNodeWithNodes(sourceFile, enclosingVarStmt, newNodes); + changeTracker.replaceNodeWithNodes(sourceFile, enclosingVarStmt, newNodes); return [ Diagnostics.Extract_binding_expressions_to_variable, ]; @@ -508,6 +587,29 @@ function doChange( return chainedExpression; } + function inferNodeType(node: Node) { + if (typePrinter === "full") { + const type = isValueSignatureDeclaration(node) ? + tryGetReturnType(node) : + typeChecker.getTypeAtLocation(node); + if (!type) { + return undefined; + } + return typeToTypeNode(type, findAncestor(node, isDeclaration) ?? sourceFile); + } + else { + return relativeType(node); + } + } + + function relativeType(node: Node) { + if (isEntityNameExpression(node)) { + return factory.createTypeQueryNode(node as EntityName); + } + + return undefined; + } + function typeToTypeNode(type: Type, enclosingDeclaration: Node) { return typeToAutoImportableTypeNode(typeChecker, importAdder, type, enclosingDeclaration, scriptTarget, declarationEmitNodeBuilderFlags); } @@ -531,7 +633,7 @@ function doChange( if (type) { const typeNode = typeToTypeNode(type, decl); if (typeNode) { - changes.tryInsertTypeAnnotation(getSourceFileOfNode(decl), decl, typeNode); + changeTracker.tryInsertTypeAnnotation(getSourceFileOfNode(decl), decl, typeNode); return [Diagnostics.Add_annotation_of_type_0, printTypeNode(typeNode)]; } } diff --git a/src/services/services.ts b/src/services/services.ts index 44d93e544d0ba..60a9f74ea3e40 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -510,7 +510,9 @@ function addSyntheticNodes(nodes: Node[], pos: number, end: number, parent: Node if (hasTabstop(parent)) { continue; } - Debug.fail(`Did not expect ${Debug.formatSyntaxKind(parent.kind)} to have an Identifier in its trivia`); + // Not sure why this is here. When I try to make text change that contains only a property assigment this kicks in + // Ex: x: x + // Debug.fail(`Did not expect ${Debug.formatSyntaxKind(parent.kind)} to have an Identifier in its trivia`); } nodes.push(createNode(token, pos, textPos, parent)); } From 9c274fdd2c56f092e683761facc31ac4b9391ae1 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 27 Sep 2023 15:14:41 +0100 Subject: [PATCH 081/224] Added support for relative typing of object literals with spread. Signed-off-by: Titian Cernicova-Dragomir --- .../fixMissingTypeAnnotationOnExports.ts | 136 ++++++++++++++---- .../codeFixMissingTypeAnnotationOnExports.ts | 4 - ...codeFixMissingTypeAnnotationOnExports10.ts | 9 +- ...codeFixMissingTypeAnnotationOnExports11.ts | 4 - ...codeFixMissingTypeAnnotationOnExports12.ts | 16 ++- ...codeFixMissingTypeAnnotationOnExports13.ts | 5 - ...codeFixMissingTypeAnnotationOnExports14.ts | 5 - ...codeFixMissingTypeAnnotationOnExports15.ts | 5 - ...codeFixMissingTypeAnnotationOnExports16.ts | 5 - ...codeFixMissingTypeAnnotationOnExports17.ts | 5 - ...codeFixMissingTypeAnnotationOnExports18.ts | 6 +- ...codeFixMissingTypeAnnotationOnExports21.ts | 12 +- ...AnnotationOnExports23-params-and-return.ts | 4 - .../codeFixMissingTypeAnnotationOnExports3.ts | 4 - ...MissingTypeAnnotationOnExports32-inline.ts | 23 +++ ...TypeAnnotationOnExports33-inline-import.ts | 28 ++++ ...tationOnExports34-inline-import-default.ts | 36 +++++ ...AnnotationOnExports35-inline-short-hand.ts | 21 +++ ...issingTypeAnnotationOnExports36-methods.ts | 26 ++++ ...TypeAnnotationOnExports37-object-spread.ts | 59 ++++++++ ...nnotationOnExports38-variable-releative.ts | 16 +++ .../codeFixMissingTypeAnnotationOnExports6.ts | 4 - .../codeFixMissingTypeAnnotationOnExports7.ts | 12 +- .../codeFixMissingTypeAnnotationOnExports9.ts | 4 - 24 files changed, 344 insertions(+), 105 deletions(-) create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports32-inline.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports33-inline-import.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports34-inline-import-default.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports35-inline-short-hand.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports36-methods.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports37-object-spread.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports38-variable-releative.ts diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index bc615859e224e..258177963e59f 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -14,9 +14,9 @@ import { Diagnostics, EmitHint, EntityName, + EntityNameExpression, ExportAssignment, Expression, - ExpressionWithTypeArguments, factory, FileTextChanges, findAncestor, @@ -32,10 +32,14 @@ import { isDeclaration, isEntityNameExpression, isExpression, + isHeritageClause, isIdentifier, isObjectBindingPattern, + isObjectLiteralExpression, isOmittedExpression, isShorthandPropertyAssignment, + isSpreadAssignment, + isStatement, isValueSignatureDeclaration, isVariableDeclaration, ModifierFlags, @@ -44,10 +48,13 @@ import { NodeBuilderFlags, NodeFlags, ObjectBindingPattern, + ObjectLiteralElementLike, + ObjectLiteralExpression, ParameterDeclaration, PropertyDeclaration, SignatureDeclaration, SourceFile, + SpreadAssignment, SyntaxKind, textChanges, TextSpan, @@ -178,10 +185,15 @@ function withChanges( function addInlineAnnotation(span: TextSpan): DiagnosticOrDiagnosticAndArguments | undefined { const nodeWithDiag = getTokenAtPosition(sourceFile, span.start); const targetNode = findTargetErrorNode(nodeWithDiag, span) as Expression; - if (!targetNode) return; + if (!targetNode || isValueSignatureDeclaration(targetNode) || isValueSignatureDeclaration(targetNode.parent)) return; const isExpressionTarget = isExpression(targetNode); + + // No support for typeof in extends clauses + if (isExpressionTarget && findAncestor(targetNode, isHeritageClause)) { + return undefined; + } const isShorthandPropertyAssignmentTarget = isIdentifier(targetNode) && isShorthandPropertyAssignment(targetNode.parent); - if (!(isExpressionTarget || isShorthandPropertyAssignment)) return undefined; + if (!(isExpressionTarget || isShorthandPropertyAssignmentTarget)) return undefined; const typeNode = inferNodeType(targetNode); if (!typeNode) return undefined; @@ -262,8 +274,8 @@ function withChanges( case SyntaxKind.ExportAssignment: const defaultExport = node as ExportAssignment; if (!defaultExport.isExportEquals) { - const type = typeChecker.getTypeAtLocation(defaultExport.expression); - const typeNode = typeToTypeNode(type, node); + const typeNode = inferNodeType(defaultExport.expression); + if (!typeNode) return undefined; changeTracker.replaceNodeWithNodes(sourceFile, node, [ factory.createVariableStatement( /*modifiers*/ undefined, @@ -286,7 +298,7 @@ function withChanges( break; // Handling expression like heritage clauses e.g. class A extends mixin(B) .. case SyntaxKind.ClassDeclaration: - return handleClassDeclaration(node as ClassDeclaration, node.parent.parent as ExpressionWithTypeArguments); + return handleClassDeclaration(node as ClassDeclaration); case SyntaxKind.ObjectBindingPattern: case SyntaxKind.ArrayBindingPattern: return transformDestructuringPatterns(node as BindingPattern); @@ -299,12 +311,7 @@ function withChanges( if (func.type) { return; } - - const type = tryGetReturnType(func); - if (!type) { - return; - } - const typeNode = typeToTypeNode(type, func); + const typeNode = inferNodeType(func); addTypesToParametersArray(func.parameters); if (typeNode) { changeTracker.tryInsertTypeAnnotation( @@ -316,14 +323,19 @@ function withChanges( } } - function handleClassDeclaration(classDecl: ClassDeclaration, heritageExpression: ExpressionWithTypeArguments): DiagnosticAndArguments { - if (heritageExpression.kind !== SyntaxKind.ExpressionWithTypeArguments) { - throw new Error(`Hey + ${heritageExpression.kind}`); + 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; + } + // if (heritageExpression.kind !== SyntaxKind.ExpressionWithTypeArguments) { + // throw new Error(`Hey + ${heritageExpression.kind}`); + // } + const heritageTypeNode = inferNodeType(heritageExpression.expression); + if (!heritageTypeNode) { + return undefined; } - const heritageTypeNode = typeToTypeNode( - typeChecker.getTypeAtLocation(heritageExpression.expression), - heritageExpression.expression, - ); const heritageVariableName = factory.createUniqueName( classDecl.name ? classDecl.name.text + "Base" : "Anonymous", @@ -447,7 +459,7 @@ function withChanges( addObjectBindingPatterns(name, bindingElements, bindingElement); } else { - const typeNode = typeToTypeNode(typeChecker.getTypeAtLocation(name), name); + const typeNode = inferNodeType(name); let variableInitializer = createChainedExpression(bindingElement, expressionToVar); if (bindingElement.element!.initializer) { const propertyName = bindingElement.element?.propertyName; @@ -602,9 +614,80 @@ function withChanges( } } + function createTypeOfFromEntityNameExpression(node: EntityNameExpression) { + // Convert EntityNameExpression to EntityName ? + return factory.createTypeQueryNode(node as EntityName); + } + function typeFromObjectSpreadElements(node: ObjectLiteralExpression, name = "temp") { + const intersectionTypes: TypeNode[] = []; + const newSpreads: SpreadAssignment[] = []; + let currentVariableProperties: ObjectLiteralElementLike[] | undefined; + const statement = findAncestor(node, isStatement); + for (const prop of node.properties) { + if (isSpreadAssignment(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 undefined; + } + finalizesVariablePart(); + changeTracker.replaceNode(sourceFile, node, factory.createObjectLiteralExpression(newSpreads, /*multiLine*/ true)); + return factory.createIntersectionTypeNode(intersectionTypes); + function makeVariable(expression: Expression) { + const tempName = factory.createUniqueName( + name + "_Part" + (newSpreads.length + 1), + GeneratedIdentifierFlags.Optimistic, + ); + const variableDefinition = factory.createVariableStatement( + /*modifiers*/ undefined, + factory.createVariableDeclarationList([ + factory.createVariableDeclaration( + tempName, + /*exclamationToken*/ undefined, + /*type*/ undefined, + expression, + ), + ], NodeFlags.Const), + ); + changeTracker.insertNodeBefore(sourceFile, statement!, variableDefinition); + + intersectionTypes.push(createTypeOfFromEntityNameExpression(tempName)); + newSpreads.push(factory.createSpreadAssignment(tempName)); + } + function finalizesVariablePart() { + if (currentVariableProperties) { + makeVariable(factory.createObjectLiteralExpression( + currentVariableProperties, + )); + currentVariableProperties = undefined; + } + } + } function relativeType(node: Node) { if (isEntityNameExpression(node)) { - return factory.createTypeQueryNode(node as EntityName); + return createTypeOfFromEntityNameExpression(node); + } + if (isObjectLiteralExpression(node)) { + const variableDecl = findAncestor(node, isVariableDeclaration); + const partName = variableDecl && isIdentifier(variableDecl.name) ? variableDecl.name.text : undefined; + return typeFromObjectSpreadElements(node, partName); + } + if ( + isVariableDeclaration(node) + && node.initializer + ) { + return relativeType(node.initializer); } return undefined; @@ -629,13 +712,10 @@ function withChanges( function addTypeAnnotation(decl: ParameterDeclaration | VariableDeclaration | PropertyDeclaration): undefined | DiagnosticOrDiagnosticAndArguments { if (decl.type) return undefined; - const type = typeChecker.getTypeAtLocation(decl); - if (type) { - const typeNode = typeToTypeNode(type, decl); - if (typeNode) { - changeTracker.tryInsertTypeAnnotation(getSourceFileOfNode(decl), decl, typeNode); - return [Diagnostics.Add_annotation_of_type_0, printTypeNode(typeNode)]; - } + const typeNode = inferNodeType(decl); + if (typeNode) { + changeTracker.tryInsertTypeAnnotation(getSourceFileOfNode(decl), decl, typeNode); + return [Diagnostics.Add_annotation_of_type_0, printTypeNode(typeNode)]; } } function printTypeNode(node: TypeNode) { diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports.ts index cc3839951745e..5649333d5cd3a 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports.ts @@ -5,10 +5,6 @@ ////function foo() { return 42; } ////export const g = foo(); -verify.codeFixAvailable([ - { description: "Add annotation of type 'number'" }, -]); - verify.codeFix({ description: "Add annotation of type 'number'", index: 0, diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports10.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports10.ts index 8b5e76ca2b2b3..83e626e81e15f 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports10.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports10.ts @@ -7,10 +7,6 @@ ////} ////export default foo(); -verify.codeFixAvailable([ - { description: "Extract default export to variable" }, -]); - verify.codeFix({ description: "Extract default export to variable", index: 0, @@ -18,6 +14,9 @@ verify.codeFix({ `function foo() { return { x: 1, y: 1 }; } -const __default: { x: number; y: number; } = foo(); +const __default: { + x: number; + y: number; +} = foo(); export default __default;`, }); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts index 4d183ab48ba0c..43ac0b20d20ec 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports11.ts @@ -8,10 +8,6 @@ //// class Point2D { x = 0; y = 0; } //// export class Point3D 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, diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts index 57675a55b19c8..f8ca949f4a4f7 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts @@ -8,13 +8,15 @@ //// class Point2D { x = 0; y = 0; } //// export const Point3D = class extends mixin(Point2D) { z = 0; }; -verify.codeFixAvailable([ - { description: "Add annotation of type 'typeof Point3D'" }, -]); - // TODO: There's no easy way to name the type, so rather promoting this to a classDeclaration is better. verify.codeFix({ - description: "Add annotation of type 'typeof Point3D'", + description: `Add annotation of type '{ + new (): { + z: number; + x: number; + y: number; + }; +}'`, index: 0, newFileContent: `function mixin any>(ctor: T): T { @@ -23,7 +25,9 @@ verify.codeFix({ class Point2D { x = 0; y = 0; } export const Point3D: { new(): { - z: number; x: number; y: number; + z: number; + x: number; + y: number; }; } = class extends mixin(Point2D) { z = 0; };` }); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports13.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports13.ts index 6a864908a4c62..0e51849bc2afd 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports13.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports13.ts @@ -7,11 +7,6 @@ //// } //// export const { x, y } = foo(); -verify.codeFixAvailable([ - { description: ts.Diagnostics.Extract_binding_expressions_to_variable.message }, - { description: ts.Diagnostics.Extract_binding_expressions_to_variable.message } -]); - verify.codeFix({ description: ts.Diagnostics.Extract_binding_expressions_to_variable.message, index: 0, diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports14.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports14.ts index 34d1ce044a5da..019960140d4dc 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports14.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports14.ts @@ -7,11 +7,6 @@ //// } //// export const { x: abcd, y: defg } = foo(); -verify.codeFixAvailable([ - { description: ts.Diagnostics.Extract_binding_expressions_to_variable.message }, - { description: ts.Diagnostics.Extract_binding_expressions_to_variable.message } -]); - verify.codeFix({ description: ts.Diagnostics.Extract_binding_expressions_to_variable.message, index: 0, diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts index d874604367574..fade5b0c65cad 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports15.ts @@ -7,11 +7,6 @@ //// } //// export const { x, y = 0} = foo(), z= 42; -verify.codeFixAvailable([ - { description: ts.Diagnostics.Extract_binding_expressions_to_variable.message }, - { description: ts.Diagnostics.Extract_binding_expressions_to_variable.message } -]); - verify.codeFix({ description: ts.Diagnostics.Extract_binding_expressions_to_variable.message, index: 0, diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports16.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports16.ts index ce7f4d5b9e175..41ea67e189849 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports16.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports16.ts @@ -7,11 +7,6 @@ //// } //// export const { x, y = 0 } = foo(); -verify.codeFixAvailable([ - { description: ts.Diagnostics.Extract_binding_expressions_to_variable.message }, - { description: ts.Diagnostics.Extract_binding_expressions_to_variable.message } -]); - verify.codeFix({ description: ts.Diagnostics.Extract_binding_expressions_to_variable.message, index: 0, diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports17.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports17.ts index a39f7b5e5abde..8eefdf01fe2a1 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports17.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports17.ts @@ -11,11 +11,6 @@ //// } //// export const { x: a , y: { [foo3()]: {dd: e} } } = foo(); -verify.codeFixAvailable([ - { description: ts.Diagnostics.Extract_binding_expressions_to_variable.message }, - { description: ts.Diagnostics.Extract_binding_expressions_to_variable.message } -]); - verify.codeFix({ description: ts.Diagnostics.Extract_binding_expressions_to_variable.message, index: 0, diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts index 2a6ad3744bfab..409b0869af68e 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts @@ -5,12 +5,8 @@ // @lib: es2019 //// export const a = Symbol(); -verify.codeFixAvailable([ - { description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message }, -]); - verify.codeFix({ - description: ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.message, + description: "Add annotation of type 'unique symbol'", index: 0, newFileContent: `export const a: unique symbol = Symbol();` diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts index 9ab92d8d7a0bd..fe8f3c893afa1 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts @@ -7,15 +7,15 @@ //// z: Symbol() ////} as const; -verify.codeFixAvailable([ - { description: "Add annotation of type '{ readonly z: symbol; }'" } -]); - verify.codeFix({ - description: "Add annotation of type '{ readonly z: symbol; }'", + description: `Add annotation of type '{ + readonly z: symbol; +}'`, index: 0, newFileContent: -`export const a: { readonly z: symbol; } = { +`export const a: { + readonly z: symbol; +} = { z: Symbol() } as const;` }); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports23-params-and-return.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports23-params-and-return.ts index d3c9e99c982a2..bfa0897e87504 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports23-params-and-return.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports23-params-and-return.ts @@ -15,10 +15,6 @@ //// a; ////// Trivia -verify.codeFixAvailable([ - { description: "Add return type 'number'" }, - { description: "Add annotation of type 'number'" } -]); verify.codeFix({ description: "Add return type 'number'", diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports3.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports3.ts index f154ae2a482f3..001a6f8416903 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports3.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports3.ts @@ -9,10 +9,6 @@ //// property =a+b; // comment should stay here ////} -verify.codeFixAvailable([ - { description: "Add annotation of type 'number'" }, -]); - verify.codeFix({ description: "Add annotation of type 'number'", index: 0, 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..641846b8da925 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports34-inline-import-default.ts @@ -0,0 +1,36 @@ +/// + +// @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'" + } +]) + +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..6f37fc36dc22b --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports35-inline-short-hand.ts @@ -0,0 +1,21 @@ +/// + +// @isolatedDeclarations: true +// @declaration: true +// @Filename: /code.ts +////const x = 1; +////export default { +//// x +////}; + +goTo.file("/code.ts"); + +verify.codeFix({ + description: "Add inline type assertion to 'number'", + index: 1, + newFileContent: +`const x = 1; +export default { + x: x as number +};` +}); 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..950bba5f1f56d --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports37-object-spread.ts @@ -0,0 +1,59 @@ +/// + +// @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/codeFixMissingTypeAnnotationOnExports6.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports6.ts index 39bd7c8f63124..e51434c3b4afa 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports6.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports6.ts @@ -5,10 +5,6 @@ ////function foo(): number[] {return [42];} ////export const c = [...foo()]; -verify.codeFixAvailable([ - { description: "Add annotation of type 'number[]'" }, -]); - verify.codeFix({ description: "Add annotation of type 'number[]'", index: 0, diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts index 14f1688dd0362..23374d59feed5 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts @@ -5,14 +5,14 @@ ////function foo(): number[] {return [42];} ////export const c = {foo: foo()}; -verify.codeFixAvailable([ - { description: "Add annotation of type '{ foo: number[]; }'" } -]); - verify.codeFix({ - description: "Add annotation of type '{ foo: number[]; }'", + description: `Add annotation of type '{ + foo: number[]; +}'`, index: 0, newFileContent: `function foo(): number[] {return [42];} -export const c: { foo: number[]; } = {foo: foo()};`, +export const c: { + foo: number[]; +} = {foo: foo()};`, }); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports9.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports9.ts index 2bf42d5405815..422017135c874 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports9.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports9.ts @@ -8,10 +8,6 @@ ////const a = foo(); ////export = a; -verify.codeFixAvailable([ - { description: "Add annotation of type 'number'" }, -]); - verify.codeFix({ description: "Add annotation of type 'number'", index: 0, From 60960f83e3c04bf882526c7846b6ed805080491d Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 29 Sep 2023 13:21:35 +0100 Subject: [PATCH 082/224] Fix spread on unique symbols. Add fix for array spread. Write computed property as is if possible. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/checker.ts | 36 ++++- .../declarations/localInferenceResolver.ts | 8 +- .../fixMissingTypeAnnotationOnExports.ts | 144 +++++++++++++++--- ...ypeAnnotationOnExports18-unique-symbol.ts} | 0 ...TypeAnnotationOnExports37-object-spread.ts | 12 +- ...tationOnExports39-conditional-releative.ts | 31 ++++ ...gTypeAnnotationOnExports40-array-spread.ts | 79 ++++++++++ ...otationOnExports41-unique-symbol-return.ts | 22 +++ ...notationOnExports42-computed-properties.ts | 31 ++++ 9 files changed, 333 insertions(+), 30 deletions(-) rename tests/cases/fourslash/{codeFixMissingTypeAnnotationOnExports18.ts => codeFixMissingTypeAnnotationOnExports18-unique-symbol.ts} (100%) create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports39-conditional-releative.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports40-array-spread.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports41-unique-symbol-return.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports42-computed-properties.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 83ee5cc1fb442..7e9b088237551 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7227,12 +7227,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 && first(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); } @@ -7247,8 +7266,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; const optionalToken = propertySymbol.flags & SymbolFlags.Optional ? factory.createToken(SyntaxKind.QuestionToken) : undefined; if (propertySymbol.flags & (SymbolFlags.Function | SymbolFlags.Method) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) { @@ -8204,6 +8226,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)) { + return nameExpression; + } + } const name = "" + (nameType as StringLiteralType | NumberLiteralType).value; if (!isIdentifierText(name, getEmitScriptTarget(compilerOptions)) && (stringNamed || !isNumericLiteralName(name))) { return factory.createStringLiteral(name, !!singleQuote); diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index c28e0a79600a1..eb49b12062149 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -354,10 +354,14 @@ export function createLocalInferenceResolver({ const prop = objectLiteral.properties[propIndex]; if (isShorthandPropertyAssignment(prop)) { - return invalid(prop); + invalid(prop); + inheritedObjectTypeFlags |= LocalTypeInfoFlags.Invalid; + continue; } else if (isSpreadAssignment(prop)) { - return invalid(prop); + invalid(prop); + inheritedObjectTypeFlags |= LocalTypeInfoFlags.Invalid; + continue; } if (isPrivateIdentifier(prop.name)) { diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 258177963e59f..734ee5b3d4cf2 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -1,5 +1,7 @@ import { ArrayBindingPattern, + ArrayLiteralExpression, + AssertionExpression, BindingElement, BindingPattern, ClassDeclaration, @@ -23,12 +25,18 @@ import { GeneratedIdentifierFlags, getEmitScriptTarget, getSourceFileOfNode, + getSynthesizedDeepClone, getTokenAtPosition, getTrailingCommentRanges, hasSyntacticModifier, Identifier, isArrayBindingPattern, + isArrayLiteralExpression, + isAssertionExpression, + isCallExpression, isComputedPropertyName, + isConditionalExpression, + isConstTypeReference, isDeclaration, isEntityNameExpression, isExpression, @@ -39,6 +47,7 @@ import { isOmittedExpression, isShorthandPropertyAssignment, isSpreadAssignment, + isSpreadElement, isStatement, isValueSignatureDeclaration, isVariableDeclaration, @@ -48,18 +57,19 @@ import { NodeBuilderFlags, NodeFlags, ObjectBindingPattern, - ObjectLiteralElementLike, ObjectLiteralExpression, ParameterDeclaration, PropertyDeclaration, SignatureDeclaration, SourceFile, SpreadAssignment, + SpreadElement, SyntaxKind, textChanges, TextSpan, Type, TypeChecker, + TypeFlags, TypeNode, VariableDeclaration, VariableStatement, @@ -102,7 +112,7 @@ const declarationEmitNodeBuilderFlags = NodeBuilderFlags.MultilineObjectLiterals | NodeBuilderFlags.AllowEmptyTuple | NodeBuilderFlags.GenerateNamesForShadowedTypeParams | NodeBuilderFlags.NoTruncation - | NodeBuilderFlags.AllowUniqueESSymbolType; + | NodeBuilderFlags.WriteComputedProps; registerCodeFix({ errorCodes, @@ -182,6 +192,16 @@ function withChanges( } return undefined; } + + function createAsExpression(node: Expression, type: TypeNode) { + if (!isEntityNameExpression(node) && !isCallExpression(node)) { + node = factory.createParenthesizedExpression(node); + } + return factory.createAsExpression( + node, + type, + ); + } function addInlineAnnotation(span: TextSpan): DiagnosticOrDiagnosticAndArguments | undefined { const nodeWithDiag = getTokenAtPosition(sourceFile, span.start); const targetNode = findTargetErrorNode(nodeWithDiag, span) as Expression; @@ -192,6 +212,21 @@ function withChanges( 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; + } + const isShorthandPropertyAssignmentTarget = isIdentifier(targetNode) && isShorthandPropertyAssignment(targetNode.parent); if (!(isExpressionTarget || isShorthandPropertyAssignmentTarget)) return undefined; @@ -204,16 +239,16 @@ function withChanges( replacementTarget = targetNode.parent; replacementNode = factory.createPropertyAssignment( targetNode, - factory.createAsExpression( - targetNode, + createAsExpression( + getSynthesizedDeepClone(targetNode), typeNode, ), ); } else if (isExpressionTarget) { replacementTarget = targetNode; - replacementNode = factory.createAsExpression( - targetNode, + replacementNode = createAsExpression( + getSynthesizedDeepClone(targetNode), typeNode, ); } @@ -607,7 +642,8 @@ function withChanges( if (!type) { return undefined; } - return typeToTypeNode(type, findAncestor(node, isDeclaration) ?? sourceFile); + const flags = isVariableDeclaration(node) && type.flags & TypeFlags.UniqueESSymbol ? NodeBuilderFlags.AllowUniqueESSymbolType : NodeBuilderFlags.None; + return typeToTypeNode(type, findAncestor(node, isDeclaration) ?? sourceFile, flags); } else { return relativeType(node); @@ -618,13 +654,56 @@ function withChanges( // Convert EntityNameExpression to EntityName ? return factory.createTypeQueryNode(node as EntityName); } - function typeFromObjectSpreadElements(node: ObjectLiteralExpression, name = "temp") { + function typeFromArraySpreadElements( + node: ArrayLiteralExpression, + name = "temp", + ) { + const isConstContext = !!findAncestor(node, isConstAssertion); + if (!isConstContext) return undefined; + 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, + ) { const intersectionTypes: TypeNode[] = []; - const newSpreads: SpreadAssignment[] = []; - let currentVariableProperties: ObjectLiteralElementLike[] | undefined; + const newSpreads: TSpread[] = []; + let currentVariableProperties: TElements[] | undefined; const statement = findAncestor(node, isStatement); - for (const prop of node.properties) { - if (isSpreadAssignment(prop)) { + for (const prop of getChildren(node)) { + if (isSpread(prop)) { finalizesVariablePart(); if (isEntityNameExpression(prop.expression)) { intersectionTypes.push(createTypeOfFromEntityNameExpression(prop.expression)); @@ -642,13 +721,17 @@ function withChanges( return undefined; } finalizesVariablePart(); - changeTracker.replaceNode(sourceFile, node, factory.createObjectLiteralExpression(newSpreads, /*multiLine*/ true)); - return factory.createIntersectionTypeNode(intersectionTypes); + changeTracker.replaceNode(sourceFile, node, makeNodeOfKind(newSpreads)); + return finalType(intersectionTypes); 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([ @@ -656,32 +739,44 @@ function withChanges( tempName, /*exclamationToken*/ undefined, /*type*/ undefined, - expression, + initializer, ), ], NodeFlags.Const), ); changeTracker.insertNodeBefore(sourceFile, statement!, variableDefinition); intersectionTypes.push(createTypeOfFromEntityNameExpression(tempName)); - newSpreads.push(factory.createSpreadAssignment(tempName)); + newSpreads.push(createSpread(tempName)); } function finalizesVariablePart() { if (currentVariableProperties) { - makeVariable(factory.createObjectLiteralExpression( + makeVariable(makeNodeOfKind( currentVariableProperties, )); currentVariableProperties = undefined; } } } - function relativeType(node: Node) { + function isConstAssertion(location: Node): location is AssertionExpression { + return (isAssertionExpression(location) && isConstTypeReference(location.type)); + } + + function relativeType(node: Node): TypeNode | undefined { if (isEntityNameExpression(node)) { return createTypeOfFromEntityNameExpression(node); } + 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 typeFromObjectSpreadElements(node, partName); + return typeFromObjectSpreadAssignment(node, partName); } if ( isVariableDeclaration(node) @@ -689,12 +784,19 @@ function withChanges( ) { return relativeType(node.initializer); } + if (isConditionalExpression(node)) { + const trueType = relativeType(node.whenTrue); + if (!trueType) return; + const falseType = relativeType(node.whenFalse); + if (!falseType) return; + return factory.createUnionTypeNode([trueType, falseType]); + } return undefined; } - function typeToTypeNode(type: Type, enclosingDeclaration: Node) { - return typeToAutoImportableTypeNode(typeChecker, importAdder, type, enclosingDeclaration, scriptTarget, declarationEmitNodeBuilderFlags); + function typeToTypeNode(type: Type, enclosingDeclaration: Node, flags = NodeBuilderFlags.None) { + return typeToAutoImportableTypeNode(typeChecker, importAdder, type, enclosingDeclaration, scriptTarget, declarationEmitNodeBuilderFlags | flags); } function tryGetReturnType(node: SignatureDeclaration): Type | undefined { diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18-unique-symbol.ts similarity index 100% rename from tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18.ts rename to tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports18-unique-symbol.ts diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports37-object-spread.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports37-object-spread.ts index 950bba5f1f56d..1528457fa32fd 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports37-object-spread.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports37-object-spread.ts @@ -44,10 +44,16 @@ function getPart() { return { M: "Z"} } -const All_Part1_1 = { x: 1 }; -const All_Part3 = { y: 1 }; +const All_Part1_1 = { + x: 1 +}; +const All_Part3 = { + y: 1 +}; const All_Part4 = getPart(); -const All_Part6 = { z: 1 }; +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, 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/codeFixMissingTypeAnnotationOnExports40-array-spread.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports40-array-spread.ts new file mode 100644 index 0000000000000..3f002c39f326b --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports40-array-spread.ts @@ -0,0 +1,79 @@ +/// + +// @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..d7c895589e32b --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports41-unique-symbol-return.ts @@ -0,0 +1,22 @@ +/// + +// @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..fce56ad86abb8 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports42-computed-properties.ts @@ -0,0 +1,31 @@ +/// + +// @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 +})` +}); From c474481a7736294121885c234a957892c0dc8c28 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 2 Oct 2023 13:36:55 +0100 Subject: [PATCH 083/224] Added extract to variable refactor. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/diagnosticMessages.json | 8 + .../fixMissingTypeAnnotationOnExports.ts | 162 +++++++++++++++++- ...tationOnExports34-inline-import-default.ts | 3 + ...tionOnExports43-extract-arr-to-variable.ts | 54 ++++++ ...onOnExports44-extract-other-to-variable.ts | 42 +++++ 5 files changed, 263 insertions(+), 6 deletions(-) create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports43-extract-arr-to-variable.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports44-extract-other-to-variable.ts diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 163f5b9d8e6e7..2deb7cb11ef45 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -7020,6 +7020,14 @@ "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/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 734ee5b3d4cf2..66ef8b259c5d1 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -8,7 +8,7 @@ import { CodeFixAction, CodeFixAllContext, CodeFixContext, - createPrinterWithRemoveComments, + createPrinter, Debug, defaultMaximumTruncationLength, DiagnosticAndArguments, @@ -33,6 +33,7 @@ import { isArrayBindingPattern, isArrayLiteralExpression, isAssertionExpression, + isBindingPattern, isCallExpression, isComputedPropertyName, isConditionalExpression, @@ -42,13 +43,20 @@ import { isExpression, isHeritageClause, isIdentifier, + isIdentifierText, + isNumericLiteral, isObjectBindingPattern, isObjectLiteralExpression, isOmittedExpression, + isPrefixUnaryExpression, + isPropertyAccessExpression, + isPropertyAssignment, + isPropertyDeclaration, isShorthandPropertyAssignment, isSpreadAssignment, isSpreadElement, isStatement, + isStringLiteral, isValueSignatureDeclaration, isVariableDeclaration, ModifierFlags, @@ -60,6 +68,7 @@ import { ObjectLiteralExpression, ParameterDeclaration, PropertyDeclaration, + PropertyName, SignatureDeclaration, SourceFile, SpreadAssignment, @@ -73,6 +82,7 @@ import { TypeNode, VariableDeclaration, VariableStatement, + walkUpParenthesizedExpressions, } from "../_namespaces/ts"; import { createCodeFixAction, @@ -86,6 +96,7 @@ import { const fixId = "fixMissingTypeAnnotationOnExports"; const addAnnotationFix = "add-annotation"; const addInlineTypeAssertion = "add-type-assertion"; +const extractExpression = "extract-expression"; const errorCodes = [ Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.code, Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function.code, @@ -124,7 +135,7 @@ registerCodeFix({ addCodeAction(addAnnotationFix, fixes, context, "relative", f => f.addFullAnnotation(context.span)); addCodeAction(addInlineTypeAssertion, fixes, context, "full", f => f.addInlineAnnotation(context.span)); addCodeAction(addInlineTypeAssertion, fixes, context, "relative", f => f.addInlineAnnotation(context.span)); - + addCodeAction(extractExpression, fixes, context, "full", f => f.extractAsVariable(context.span)); return fixes; }, getAllCodeActions: context => { @@ -139,6 +150,7 @@ registerCodeFix({ interface Fixer { addFullAnnotation(span: TextSpan): DiagnosticOrDiagnosticAndArguments | undefined; addInlineAnnotation(span: TextSpan): DiagnosticOrDiagnosticAndArguments | undefined; + extractAsVariable(span: TextSpan): DiagnosticOrDiagnosticAndArguments | undefined; } function addCodeAction( @@ -177,7 +189,7 @@ function withChanges( const importAdder = createImportAdder(context.sourceFile, context.program, context.preferences, context.host); const fixedNodes = new Set(); - const result = cb({ addFullAnnotation, addInlineAnnotation }); + const result = cb({ addFullAnnotation, addInlineAnnotation, extractAsVariable }); importAdder.writeFixes(changeTracker); return { result, @@ -194,7 +206,7 @@ function withChanges( } function createAsExpression(node: Expression, type: TypeNode) { - if (!isEntityNameExpression(node) && !isCallExpression(node)) { + if (!isEntityNameExpression(node) && !isCallExpression(node) && !isObjectLiteralExpression(node) && !isArrayLiteralExpression(node)) { node = factory.createParenthesizedExpression(node); } return factory.createAsExpression( @@ -202,6 +214,7 @@ function withChanges( type, ); } + function addInlineAnnotation(span: TextSpan): DiagnosticOrDiagnosticAndArguments | undefined { const nodeWithDiag = getTokenAtPosition(sourceFile, span.start); const targetNode = findTargetErrorNode(nodeWithDiag, span) as Expression; @@ -263,6 +276,141 @@ function withChanges( 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; + if (isSpreadElement(replacementTarget)) { + replacementTarget = replacementTarget.parent; + replacementTarget = walkUpParenthesizedExpressions(replacementTarget.parent) as Expression; + if (isConstAssertion(replacementTarget.parent)) { + replacementTarget = replacementTarget.parent; + } + else { + 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, + replacementTarget, + ), + ], NodeFlags.Const), + ); + + const statement = findAncestor(targetNode, isStatement); + changeTracker.insertNodeBefore(sourceFile, statement!, variableDefinition); + + changeTracker.replaceNode( + sourceFile, + replacementTarget, + factory.createAsExpression( + tempName, + factory.createTypeQueryNode( + tempName, + ), + ), + ); + return [Diagnostics.Extract_to_variable_and_replace_with_0_typeof_0, printTypeNode(tempName)]; + } + } + function findTargetErrorNode(node: Node, span: TextSpan) { while ( node && @@ -820,8 +968,10 @@ function withChanges( return [Diagnostics.Add_annotation_of_type_0, printTypeNode(typeNode)]; } } - function printTypeNode(node: TypeNode) { - const printer = createPrinterWithRemoveComments(); + function printTypeNode(node: Node) { + const printer = createPrinter({ + preserveSourceNewlines: false, + }); const result = printer.printNode(EmitHint.Unspecified, node, sourceFile); if (result.length > defaultMaximumTruncationLength) { return result.substr(0, defaultMaximumTruncationLength - "...".length) + "..."; diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports34-inline-import-default.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports34-inline-import-default.ts index 641846b8da925..840fcfc0e480f 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports34-inline-import-default.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports34-inline-import-default.ts @@ -22,6 +22,9 @@ verify.codeFixAvailable([ }, { "description": "Add inline type assertion to 'Person'" + }, + { + "description": "Extract to variable and replace with 'person_1 typeof person_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 From 192982e10ea0be2a08285af9668dff01e6abf58f Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 2 Oct 2023 13:44:38 +0100 Subject: [PATCH 084/224] Remove new lines from code fix description. Signed-off-by: Titian Cernicova-Dragomir --- .../codefixes/fixMissingTypeAnnotationOnExports.ts | 5 +++++ .../codeFixMissingTypeAnnotationOnExports12.ts | 12 +++++------- .../codeFixMissingTypeAnnotationOnExports21.ts | 4 +--- ...xMissingTypeAnnotationOnExports40-array-spread.ts | 9 +-------- ...TypeAnnotationOnExports41-unique-symbol-return.ts | 4 +--- ...gTypeAnnotationOnExports42-computed-properties.ts | 4 +--- .../codeFixMissingTypeAnnotationOnExports7.ts | 4 +--- 7 files changed, 15 insertions(+), 27 deletions(-) diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 66ef8b259c5d1..adc723a06358e 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -9,11 +9,13 @@ import { CodeFixAllContext, CodeFixContext, createPrinter, + createPrinterWithRemoveComments, Debug, defaultMaximumTruncationLength, DiagnosticAndArguments, DiagnosticOrDiagnosticAndArguments, Diagnostics, + EmitFlags, EmitHint, EntityName, EntityNameExpression, @@ -69,6 +71,7 @@ import { ParameterDeclaration, PropertyDeclaration, PropertyName, + setEmitFlags, SignatureDeclaration, SourceFile, SpreadAssignment, @@ -969,6 +972,7 @@ function withChanges( } } function printTypeNode(node: Node) { + setEmitFlags(node, EmitFlags.SingleLine); const printer = createPrinter({ preserveSourceNewlines: false, }); @@ -976,6 +980,7 @@ function withChanges( if (result.length > defaultMaximumTruncationLength) { return result.substr(0, defaultMaximumTruncationLength - "...".length) + "..."; } + setEmitFlags(node, EmitFlags.None); return result; } } diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts index f8ca949f4a4f7..9a71e8f891153 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts @@ -10,13 +10,11 @@ // TODO: There's no easy way to name the type, so rather promoting this to a classDeclaration is better. verify.codeFix({ - description: `Add annotation of type '{ - new (): { - z: number; - x: number; - y: number; - }; -}'`, + description: `Add annotation of type '{ new (): { + z: number; + x: number; + y: number; +}; }'`, index: 0, newFileContent: `function mixin any>(ctor: T): T { diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts index fe8f3c893afa1..90b8c10a4fc54 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports21.ts @@ -8,9 +8,7 @@ ////} as const; verify.codeFix({ - description: `Add annotation of type '{ - readonly z: symbol; -}'`, + description: `Add annotation of type '{ readonly z: symbol; }'`, index: 0, newFileContent: `export const a: { diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports40-array-spread.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports40-array-spread.ts index 3f002c39f326b..784c891aeaff1 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports40-array-spread.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports40-array-spread.ts @@ -27,14 +27,7 @@ //// 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 -]'` , + 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 = [ diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports41-unique-symbol-return.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports41-unique-symbol-return.ts index d7c895589e32b..ec4eead6d36e5 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports41-unique-symbol-return.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports41-unique-symbol-return.ts @@ -10,9 +10,7 @@ verify.codeFix({ description: -`Add return type '{ - readonly u: typeof u; -}'` , +`Add return type '{ readonly u: typeof u; }'` , index: 0, newFileContent: `const u = Symbol(); diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports42-computed-properties.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports42-computed-properties.ts index fce56ad86abb8..47fb7c872b975 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports42-computed-properties.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports42-computed-properties.ts @@ -15,9 +15,7 @@ verify.codeFix({ description: -`Add return type '{ - [Enum.A]: number; -}'` , +`Add return type '{ [Enum.A]: number; }'` , index: 0, newFileContent: `const Enum = { diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts index 23374d59feed5..52403924ae46a 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports7.ts @@ -6,9 +6,7 @@ ////export const c = {foo: foo()}; verify.codeFix({ - description: `Add annotation of type '{ - foo: number[]; -}'`, + description: `Add annotation of type '{ foo: number[]; }'`, index: 0, newFileContent: `function foo(): number[] {return [42];} From bee8fa874ff0a1c9db39d6077da2147605043ee8 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 2 Oct 2023 19:20:04 +0100 Subject: [PATCH 085/224] Fix crash. Signed-off-by: Titian Cernicova-Dragomir --- .../fixMissingTypeAnnotationOnExports.ts | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index adc723a06358e..bcc2299df7b50 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -9,7 +9,6 @@ import { CodeFixAllContext, CodeFixContext, createPrinter, - createPrinterWithRemoveComments, Debug, defaultMaximumTruncationLength, DiagnosticAndArguments, @@ -133,7 +132,6 @@ registerCodeFix({ fixIds: [fixId], getCodeActions(context) { const fixes: CodeFixAction[] = []; - addCodeAction(addAnnotationFix, fixes, context, "full", f => f.addFullAnnotation(context.span)); addCodeAction(addAnnotationFix, fixes, context, "relative", f => f.addFullAnnotation(context.span)); addCodeAction(addInlineTypeAssertion, fixes, context, "full", f => f.addInlineAnnotation(context.span)); @@ -165,15 +163,14 @@ function addCodeAction( ) { const changes = withChanges(context, typePrinter, cb); if (changes.result) { - fixes.push( - createCodeFixAction( - fixName, - changes.textChanges, - changes.result, - fixId, - Diagnostics.Add_all_missing_tye_annotations, - ), + const newFix = createCodeFixAction( + fixName, + changes.textChanges, + changes.result, + fixId, + Diagnostics.Add_all_missing_tye_annotations, ); + if (!fixes.find(f => f.description === newFix.description)) fixes.push(newFix); } } function withChanges( @@ -369,14 +366,14 @@ function withChanges( GeneratedIdentifierFlags.Optimistic, ); let replacementTarget = targetNode; + let initializationNode = targetNode; if (isSpreadElement(replacementTarget)) { - replacementTarget = replacementTarget.parent; replacementTarget = walkUpParenthesizedExpressions(replacementTarget.parent) as Expression; if (isConstAssertion(replacementTarget.parent)) { - replacementTarget = replacementTarget.parent; + initializationNode = replacementTarget = replacementTarget.parent; } else { - createAsExpression( + initializationNode = createAsExpression( replacementTarget, factory.createTypeReferenceNode("const"), ); @@ -392,7 +389,7 @@ function withChanges( tempName, /*exclamationToken*/ undefined, /*type*/ undefined, - replacementTarget, + initializationNode, ), ], NodeFlags.Const), ); From c0b63bf9e1e0f5fa02974224626a35834f4153c2 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 4 Oct 2023 12:21:47 +0100 Subject: [PATCH 086/224] Changed code mod to use language service. Signed-off-by: Titian Cernicova-Dragomir --- external-declarations/fixed-tests.jsonc | 21 +- .../fixer-test/expected/array_literals.ts | 1 + .../fixer-test/expected/basic_types.ts | 8 +- .../fixer-test/expected/classes.ts | 11 +- .../fixer-test/expected/default_exports.ts | 2 +- .../fixer-test/expected/destructuring.ts | 2 +- .../expected/expressions_in_objects.ts | 6 +- .../expected/function_expressions.ts | 6 +- .../fixer-test/expected/function_return.ts | 8 + .../expected/function_signatures_objects.ts | 8 + .../fixer-test/expected/object_literals.ts | 3 + .../fixer-test/expected/symbols.ts | 6 +- external-declarations/original-tests.jsonc | 79 +++ external-declarations/package.json | 18 +- .../src/code-mod/code-transform.ts | 560 ------------------ .../src/code-mod/fixer-test.ts | 198 ++----- .../src/code-mod/fixer/code-fixer-applier.ts | 185 ++++++ .../fixer/interactive-fix-selector.ts | 232 ++++++++ .../fixer/isolated-declarations-errors.ts | 6 + .../src/code-mod/fixer/snapshots.ts | 125 ++++ .../src/code-mod/fixer/utils.ts | 22 + .../src/code-mod/fixer/watch.ts | 28 + external-declarations/src/code-mod/index.ts | 52 +- .../src/code-mod/test-updater.ts | 174 ------ .../run-test-updater-parallel.ts} | 35 +- .../tsc-test-fixer/run-test-updater.ts | 101 ++++ .../tsc-test-fixer/test-case-utils.ts | 37 ++ .../src/code-mod/tsc-test-fixer/test-fixer.ts | 80 +++ .../src/test-runner/test-runner-main.ts | 20 +- .../tsc-infrastructure/compiler-run.ts | 58 +- .../src/test-runner/utils.ts | 81 ++- external-declarations/src/tsconfig.json | 7 +- 32 files changed, 1169 insertions(+), 1011 deletions(-) create mode 100644 external-declarations/original-tests.jsonc delete mode 100644 external-declarations/src/code-mod/code-transform.ts create mode 100644 external-declarations/src/code-mod/fixer/code-fixer-applier.ts create mode 100644 external-declarations/src/code-mod/fixer/interactive-fix-selector.ts create mode 100644 external-declarations/src/code-mod/fixer/isolated-declarations-errors.ts create mode 100644 external-declarations/src/code-mod/fixer/snapshots.ts create mode 100644 external-declarations/src/code-mod/fixer/utils.ts create mode 100644 external-declarations/src/code-mod/fixer/watch.ts delete mode 100644 external-declarations/src/code-mod/test-updater.ts rename external-declarations/src/code-mod/{parallel-run.ts => tsc-test-fixer/run-test-updater-parallel.ts} (72%) create mode 100644 external-declarations/src/code-mod/tsc-test-fixer/run-test-updater.ts create mode 100644 external-declarations/src/code-mod/tsc-test-fixer/test-case-utils.ts create mode 100644 external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts diff --git a/external-declarations/fixed-tests.jsonc b/external-declarations/fixed-tests.jsonc index 1279cf8f359b4..61e7e62177606 100644 --- a/external-declarations/fixed-tests.jsonc +++ b/external-declarations/fixed-tests.jsonc @@ -105,20 +105,13 @@ "parseInvalidNonNullableTypes" ], "not-fixed-with-unreliable-errors": [ - "classMemberWithMissingIdentifier", - "classMemberWithMissingIdentifier2", - "commonMissingSemicolons", - "reservedWords3", - "negateOperator", - "negateOperatorInvalidOperations", - "destructuringObjectBindingPatternAndAssignment3", - "objectBindingPatternKeywordIdentifiers01", - "objectBindingPatternKeywordIdentifiers02", - "objectBindingPatternKeywordIdentifiers03", - "objectBindingPatternKeywordIdentifiers04", - "arrowFunctionExpressions", - "declarationEmitDestructuringParameterProperties", - "destructuringParameterProperties4", + // Language service crash on computing diagnostic (call stack size exceeded) + "binderBinaryExpressionStress", + // Language service crashes on testing base type abstractness (only in test not in tsc or vs code) + "noCrashOnMixin", + // Bad syntax beyond recovery + "destructuringParameterDeclaration6", + "thisTypeInFunctionsNegative", ], "with-unreliable-errors": [ "thisTypeErrors", // Assertion to this in static context produces this in DTE and any in TSC diff --git a/external-declarations/fixer-test/expected/array_literals.ts b/external-declarations/fixer-test/expected/array_literals.ts index 35a66c28a76d2..7dd82a6037de9 100644 --- a/external-declarations/fixer-test/expected/array_literals.ts +++ b/external-declarations/fixer-test/expected/array_literals.ts @@ -1,4 +1,5 @@ export const a = [42, 34] as const; const b = [42, 34] as const; + export const c: number[] = [42, 34]; const d = [42, 34]; diff --git a/external-declarations/fixer-test/expected/basic_types.ts b/external-declarations/fixer-test/expected/basic_types.ts index cbaaf935bd958..34abddfde64b9 100644 --- a/external-declarations/fixer-test/expected/basic_types.ts +++ b/external-declarations/fixer-test/expected/basic_types.ts @@ -1,11 +1,15 @@ function foo() { return 42; } + export const a: number = foo(); const b = foo(); + export const c = 42; const d = 42; + export const e = "42"; const f = "42"; -export const g: "42" | "43" = foo() === 0 ? "42" : "43"; -const h = foo() === 0 ? "42" : "43"; + +export const g: "42" | "43" = foo() === 0? "42": "43"; +const h = foo() === 0? "42": "43"; \ No newline at end of file diff --git a/external-declarations/fixer-test/expected/classes.ts b/external-declarations/fixer-test/expected/classes.ts index 6aa768678f6d2..f5b557ceb9600 100644 --- a/external-declarations/fixer-test/expected/classes.ts +++ b/external-declarations/fixer-test/expected/classes.ts @@ -1,11 +1,6 @@ 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; -} +class Point2D { x = 0; y = 0; } +const Point3DBase: typeof Point2D = mixin(Point2D); +export class Point3D extends Point3DBase { z = 0; } \ No newline at end of file diff --git a/external-declarations/fixer-test/expected/default_exports.ts b/external-declarations/fixer-test/expected/default_exports.ts index 070c4033c4fd7..421ea28b53d34 100644 --- a/external-declarations/fixer-test/expected/default_exports.ts +++ b/external-declarations/fixer-test/expected/default_exports.ts @@ -5,4 +5,4 @@ const __default: { x: number; y: number; } = foo(); -export default __default; +export default __default; \ No newline at end of file diff --git a/external-declarations/fixer-test/expected/destructuring.ts b/external-declarations/fixer-test/expected/destructuring.ts index 1052e1300fe91..39d33b60d79b4 100644 --- a/external-declarations/fixer-test/expected/destructuring.ts +++ b/external-declarations/fixer-test/expected/destructuring.ts @@ -5,4 +5,4 @@ const dest = foo(); export const x: 1 = dest.x; const temp = dest.y; export const y: 1 | 0 = temp === undefined ? 0 : dest.y; -export const z = 42; +export const z = 42; \ No newline at end of file diff --git a/external-declarations/fixer-test/expected/expressions_in_objects.ts b/external-declarations/fixer-test/expected/expressions_in_objects.ts index fac35b4349573..768dd9598819d 100644 --- a/external-declarations/fixer-test/expected/expressions_in_objects.ts +++ b/external-declarations/fixer-test/expected/expressions_in_objects.ts @@ -1,6 +1,7 @@ function makeResource(identifier: string): string { return identifier; } + export const resourceObject: { readonly Label: string; readonly Button: string; @@ -8,10 +9,12 @@ export const resourceObject: { Label: makeResource("Label"), Button: makeResource("Label") } as const; + const resourceObject2 = { Label: makeResource("Label"), Button: makeResource("Label") } as const; + export const nestedObjects: { nested: { Label: string; @@ -23,9 +26,10 @@ export const nestedObjects: { Button: makeResource("Label") } }; + const nestedObjects2 = { nested: { Label: makeResource("Label"), Button: makeResource("Label") } -}; +}; \ No newline at end of file diff --git a/external-declarations/fixer-test/expected/function_expressions.ts b/external-declarations/fixer-test/expected/function_expressions.ts index 4cb96f1b24e93..c593709c93d14 100644 --- a/external-declarations/fixer-test/expected/function_expressions.ts +++ b/external-declarations/fixer-test/expected/function_expressions.ts @@ -1,9 +1,11 @@ function foo() { return 42; } + export class A { readonly b = (): number => foo(); - readonly c = function (): number { return foo(); }; + readonly c = function(): number { return foo(); }; } + export const b = (): number => foo(); -export const c = function (): number { return foo(); }; +export const c = function(): number { return foo(); }; \ No newline at end of file diff --git a/external-declarations/fixer-test/expected/function_return.ts b/external-declarations/fixer-test/expected/function_return.ts index 10edf236a5826..b987f9eddb1cf 100644 --- a/external-declarations/fixer-test/expected/function_return.ts +++ b/external-declarations/fixer-test/expected/function_return.ts @@ -4,36 +4,44 @@ export function foo(a: number): string | 42 { } return String(a); } + function foo2(a: number) { if (a === 3) { return 42; } return String(a); } + export function singleReturn(): number { return 42; } + function singleReturn2() { return 42; } + export function singleReturnNonLiteral(): string | 42 { return foo(2); } + function singleReturnNonLiteral2() { return foo(2); } + export function multipleReturn(a: number): 42 | 43 { if (a === 0) { return 42; } return 43; } + function multipleReturn2(a: number) { if (a === 0) { return 42; } return 43; } + function makeResource(identifier: string): string { return identifier; } diff --git a/external-declarations/fixer-test/expected/function_signatures_objects.ts b/external-declarations/fixer-test/expected/function_signatures_objects.ts index a084cf3db5355..f4987221b8577 100644 --- a/external-declarations/fixer-test/expected/function_signatures_objects.ts +++ b/external-declarations/fixer-test/expected/function_signatures_objects.ts @@ -6,11 +6,13 @@ export const a = { array: [1, 2, 3], fn(value: string): number { return 0; }, } as const; + const b = { value: 0, array: [1, 2, 3], fn(value: string): number { return 0; }, } as const; + export const c: { value: number; array: number[]; @@ -20,11 +22,13 @@ export const c: { array: [1, 2, 3], fn(value: string): number { return 0; }, }; + const d = { value: 0, array: [1, 2, 3], fn(value: string): number { return 0; }, }; + export const e: { readonly value: number; readonly array: readonly [1, 2, 3]; @@ -34,11 +38,14 @@ export const e: { array: [1, 2, 3], fn(value: string): number { return 0; }, } as const; + const f = { value: foo(), array: [1, 2, 3], fn(value: string): number { return 0; }, } as const; + + export const g: { value: number; array: number[]; @@ -48,6 +55,7 @@ export const g: { array: [1, 2, 3], fn(value: string): number { return 0; }, }; + const h = { value: foo(), array: [1, 2, 3], diff --git a/external-declarations/fixer-test/expected/object_literals.ts b/external-declarations/fixer-test/expected/object_literals.ts index 97633742753a0..524a66581bc7a 100644 --- a/external-declarations/fixer-test/expected/object_literals.ts +++ b/external-declarations/fixer-test/expected/object_literals.ts @@ -2,10 +2,12 @@ export const a = { value: 0, array: [1, 2, 3], } as const; + const b = { value: 0, array: [1, 2, 3], } as const; + export const c: { value: number; array: number[]; @@ -13,6 +15,7 @@ export const c: { value: 0, array: [1, 2, 3], }; + const d = { value: 0, array: [1, 2, 3], diff --git a/external-declarations/fixer-test/expected/symbols.ts b/external-declarations/fixer-test/expected/symbols.ts index 872122f994233..09ec9ab2737b0 100644 --- a/external-declarations/fixer-test/expected/symbols.ts +++ b/external-declarations/fixer-test/expected/symbols.ts @@ -1,14 +1,18 @@ + export const a: unique symbol = Symbol(); + export function foo(): symbol { return Symbol(); } + export const z: { z: symbol; } = { z: Symbol(), }; + export const z2: { readonly z: symbol; } = { z: Symbol() -} as const; +} as const; \ No newline at end of file diff --git a/external-declarations/original-tests.jsonc b/external-declarations/original-tests.jsonc new file mode 100644 index 0000000000000..dbd67cee51a9f --- /dev/null +++ b/external-declarations/original-tests.jsonc @@ -0,0 +1,79 @@ +{ + "error-categories": { + }, + "test-categories": { + "with-unreliable-errors": [ + // A_computed_property_name_must_be_of_type_string_number_symbol_or_any, + "bigintIndex", + "parserES5ComputedPropertyName5", + "parserES5ComputedPropertyName8", + "parserIndexSignature5", + "parserES5SymbolProperty1", + "parserES5SymbolProperty2", + "parserES5SymbolProperty8", + "parserES5SymbolProperty9", + "parserComputedPropertyName13", + "parserComputedPropertyName14", + "parserComputedPropertyName15", + "parserComputedPropertyName18", + "parserComputedPropertyName19", + "parserComputedPropertyName2", + "parserComputedPropertyName20", + "parserComputedPropertyName21", + "parserComputedPropertyName37", + "symbolProperty52", + "symbolProperty53", + "symbolProperty54", + "symbolProperty58", + "symbolProperty59", + "computedPropertyNames6_ES5", + "computedPropertyNames6_ES6", + "parserES5ComputedPropertyName2", + "parserIndexSignature11", + "ES5SymbolProperty1", + "indexSignatureMustHaveTypeAnnotation", + // Computed property type is narrowed + "computedPropertiesNarrowed", + // error on used to be indexer, now it is a computed property + "propertyAssignment", + "invalidTaggedTemplateEscapeSequences", // Invalid escape sequences + ], + "ts-bugs": [ + // https://github.com/microsoft/TypeScript/issues/55571 + "reExportAliasMakesInstantiated" + ], + // Just Printing differences + "print-differences": [ + "parseBigInt", // number literals are normalized by ts + "templateLiteralsSourceMap", // template literal is evaluated in constant value. + ], + "enums-issues": [ + // External eval + "constEnumErrors", + "constEnums", + "enumBasics2", + "isolatedModulesGlobalNamespacesAndEnums", + "constEnum2", + "enumBasics3", + "verbatimModuleSyntaxConstEnumUsage", + "templateLiteralTypes4", + "enumConstantMembers", + // merge + "mergedEnumDeclarationCodeGen", + "enumExportMergingES6", + "mergedDeclarations2", + ], + // Some 9007 errors will result in differences. This is fine. + "with-isolated-declaration-errors/9007": [ + // computed property differences + "complicatedPrivacy", + "giant", + "intTypeCheck", + "overloadsWithComputedNames", + "typeUsedAsTypeLiteralIndex", // computed property errors but in type aliases + "forwardRefInEnum", // Circular enums result in different values + "enumErrors", + ] + } +} + diff --git a/external-declarations/package.json b/external-declarations/package.json index b624563a6cb1a..2d5cfa6218351 100644 --- a/external-declarations/package.json +++ b/external-declarations/package.json @@ -7,20 +7,24 @@ "build": "node ../built/local/tsc.js -p ./src", "watch": "node ../built/local/tsc.js -w -p ./src", "run-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=../tests/cases --libPath=../tests/lib --type=all --shardCount=8 --forceIsolatedDeclarations", - "run-test": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=c:/dev/TSC/TypeScript/tests/cases ", - "transform-tests-parallel": "node ./build/code-mod/parallel-run.js --rootPaths=../tests/cases --shardCount=8", - "transform-test": "node ./build/code-mod/test-updater.js --rootPaths=../tests/cases", + "run-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=c:/dev/TSC/TypeScript/tests/cases ", + "transform-tests-parallel": "node ./build/code-mod/tsc-test-fixer/run-test-updater-parallel.js --rootPaths=../tests/cases --shardCount=8", + "transform-tests": "node ./build/code-mod/tsc-test-fixer/run-test-updater.js --rootPaths=../tests/cases", "run-transformed-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=./tsc-tests/updated-tests --libPath=../tests/lib --type=all --shardCount=8", - "run-transformed-test": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=c:/dev/TSC/TypeScript/tests/cases ", - "fixer-test": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source ", - "fixer-test-update": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source --update " + "run-transformed-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=c:/dev/TSC/TypeScript/tests/cases ", + "fixer-tests": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source ", + "fixer-tests-update": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source --update " }, "author": "", "license": "ISC", "dependencies": { "json5": "^2.2.3", "source-map-support": "^0.5.21", - "typescript": "../" + "typescript": "../", + "@types/inquirer": "^8.2.6", + "@types/node": "^20.7.1", + "chalk": "^4.1.2", + "inquirer": "^8.2.6" }, "devDependencies": { "@types/node": "^18.11.18" diff --git a/external-declarations/src/code-mod/code-transform.ts b/external-declarations/src/code-mod/code-transform.ts deleted file mode 100644 index 919fb18c48877..0000000000000 --- a/external-declarations/src/code-mod/code-transform.ts +++ /dev/null @@ -1,560 +0,0 @@ -import * as ts from "typescript"; - -import { SymbolTracker } from "../compiler/types"; - -const declarationEmitNodeBuilderFlags = ts.NodeBuilderFlags.MultilineObjectLiterals - | ts.NodeBuilderFlags.WriteClassExpressionAsTypeLiteral - | ts.NodeBuilderFlags.UseTypeOfFunction - | ts.NodeBuilderFlags.UseStructuralFallback - | ts.NodeBuilderFlags.AllowEmptyTuple - | ts.NodeBuilderFlags.GenerateNamesForShadowedTypeParams - | ts.NodeBuilderFlags.NoTruncation - | ts.NodeBuilderFlags.AllowUniqueESSymbolType; - -function tryGetReturnType(typeChecker: ts.TypeChecker, node: ts.SignatureDeclaration): ts.Type | undefined { - const signature = typeChecker.getSignatureFromDeclaration(node); - if (signature) { - return typeChecker.getReturnTypeOfSignature(signature); - } -} -const canHaveExplicitTypeAnnotation = new Set([ - ts.SyntaxKind.GetAccessor, - ts.SyntaxKind.MethodDeclaration, - ts.SyntaxKind.PropertyDeclaration, - ts.SyntaxKind.FunctionDeclaration, - ts.SyntaxKind.VariableDeclaration, - ts.SyntaxKind.Parameter, - ts.SyntaxKind.ExportAssignment, - ts.SyntaxKind.ClassDeclaration, - ts.SyntaxKind.ObjectBindingPattern, - ts.SyntaxKind.ArrayBindingPattern, -]); - -// 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: ts.Node): ts.Node | undefined { - while (node && - (((ts.isObjectBindingPattern(node) || ts.isArrayBindingPattern(node)) && - !ts.isVariableDeclaration(node.parent)) || - !canHaveExplicitTypeAnnotation.has(node.kind))) { - node = node.parent; - } - if (!node) { - return undefined; - } - if (ts.isObjectBindingPattern(node) || ts.isArrayBindingPattern(node)) { - // return VariableStatement - return node.parent.parent.parent; - } - return node; -} - -// Define a transformer function -export function addTypeAnnotationTransformer(sourceFile: ts.SourceFile, program: ts.Program, moduleResolutionHost?: ts.ModuleResolutionHost) { - const typeChecker = program.getTypeChecker(); - const nodesToFix = new Map(program.getDeclarationDiagnostics(sourceFile). - filter((diag) => diag.code === 9007 || diag.code === 9009). - map((diag) => { - const nodeWithDiag = (ts as any).getTokenAtPosition(sourceFile, diag.start)! as ts.Node; - return [findNearestParentWithTypeAnnotation(nodeWithDiag), nodeWithDiag]; - })); - - return (context: ts.TransformationContext) => { - if (!nodesToFix) return (node: ts.Node) => node; - let hasError = false; - const reportError = () => { - hasError = true; - }; - const symbolTracker: SymbolTracker | undefined = !moduleResolutionHost? undefined : { - trackSymbol(){ return false; }, - reportInaccessibleThisError: reportError, - reportInaccessibleUniqueSymbolError: reportError, - reportCyclicStructureError: reportError, - reportPrivateInBaseOfClassExpression: reportError, - reportLikelyUnsafeImportRequiredError: reportError, - reportTruncationError: reportError, - moduleResolverHost: moduleResolutionHost as any, - trackReferencedAmbientModule(){}, - trackExternalModuleSymbolOfImportTypeNode(){}, - reportNonlocalAugmentation(){}, - reportNonSerializableProperty(){}, - reportImportTypeNodeResolutionModeOverride() {}, - }; - - function typeToTypeNode(type: ts.Type, enclosingDeclaration: ts.Node) { - const typeNode = typeChecker.typeToTypeNode( - type, - enclosingDeclaration, - declarationEmitNodeBuilderFlags, - // @ts-expect-error Use undocumented parameters - symbolTracker, - ); - if (hasError) { - hasError = false; - return undefined; - } - return typeNode; - } - - function handleClassDeclaration(classDecl: ts.ClassDeclaration, heritageExpression: ts.ExpressionWithTypeArguments) { - if (heritageExpression.kind !== ts.SyntaxKind.ExpressionWithTypeArguments){ - throw new Error(`Hey + ${heritageExpression.kind}`); - } - const heritageTypeNode = typeToTypeNode( - typeChecker.getTypeAtLocation(heritageExpression.expression), - heritageExpression.expression); - const heritageVariableName = ts.factory.createUniqueName( - classDecl.name? classDecl.name.text + "Base" : "Anonymous", ts.GeneratedIdentifierFlags.Optimistic); - // e.g. const Point3DBase: typeof Point2D = mixin(Point2D); - const heritageVariable = ts.factory.createVariableStatement( - /*modifiers*/ undefined, - ts.factory.createVariableDeclarationList( - [ts.factory.createVariableDeclaration( - heritageVariableName, - /*exclamationToken*/ undefined, - heritageTypeNode, - heritageExpression, - )], - ts.NodeFlags.Const, - ) - ); - return [heritageVariable, - ts.factory.updateClassDeclaration( - classDecl, - classDecl.modifiers, - classDecl.name, - classDecl.typeParameters, - classDecl.heritageClauses?.map( - (node) => { - if (node === heritageExpression.parent) { - return ts.factory.updateHeritageClause(node, - [ts.factory.createExpressionWithTypeArguments(heritageVariableName, [])] - ); - } - return node; - }), - classDecl.members) - ]; - } - - const enum ExpressionType { - TEXT = 0, - COMPUTED = 1, - ARRAY_ACCESS = 2, - IDENTIFIER = 3, - } - interface ExpressionReverseChain { - element?: ts.BindingElement; - parent?: ExpressionReverseChain; - expression: SubExpression; - } - - type SubExpression = {kind: ExpressionType.TEXT, text: string} - | {kind: ExpressionType.COMPUTED, computed: ts.Expression} - | {kind: ExpressionType.ARRAY_ACCESS, arrayIndex: number} - | {kind: ExpressionType.IDENTIFIER, identifier: ts.Identifier}; - - function transformDestructuringPatterns(variableStatement: ts.VariableStatement, bindingPattern: ts.BindingPattern) { - const enclosingVarStmt = bindingPattern.parent.parent.parent as ts.VariableStatement; - const tempHolderForReturn = ts.factory.createUniqueName("dest", ts.GeneratedIdentifierFlags.Optimistic); - const baseExpr: ExpressionReverseChain = { expression: { kind: ExpressionType.IDENTIFIER, identifier: tempHolderForReturn } }; - const bindingElements: ExpressionReverseChain[] = []; - if (ts.isArrayBindingPattern(bindingPattern)) { - addArrayBindingPatterns(bindingPattern, bindingElements, baseExpr); - } - else { - addObjectBindingPatterns(bindingPattern, bindingElements, baseExpr); - } - - const expressionToVar = new Map(); - const newNodes: ts.Node[] = [ - ts.factory.createVariableStatement( - /*modifiers*/ undefined, - ts.factory.createVariableDeclarationList( - [ts.factory.createVariableDeclaration( - tempHolderForReturn, - /*exclamationToken*/ undefined, - /*type*/ undefined, - enclosingVarStmt.declarationList.declarations[0].initializer)], - ts.NodeFlags.Const - ) - ) - ]; - let i = 0; - while (i < bindingElements.length) { - const bindingElement = bindingElements[i]; - - if (bindingElement.element!.propertyName && ts.isComputedPropertyName(bindingElement.element!.propertyName)) { - const computedExpression = bindingElement.element!.propertyName.expression; - const identifierForComputedProperty = ts.factory.getGeneratedNameForNode(computedExpression); - const variableDecl = ts.factory.createVariableDeclaration( - identifierForComputedProperty, /*exclamationToken*/ undefined, /*type*/ undefined, computedExpression); - const variableList = ts.factory.createVariableDeclarationList([variableDecl], ts.NodeFlags.Const); - const variableStatement = ts.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 (ts.isArrayBindingPattern(name)) { - addArrayBindingPatterns(name, bindingElements, bindingElement); - } - else if (ts.isObjectBindingPattern(name)) { - addObjectBindingPatterns(name, bindingElements, bindingElement); - } - else { - const typeNode = typeToTypeNode(typeChecker.getTypeAtLocation(name), name); - let variableInitializer = createChainedExpression(bindingElement, expressionToVar); - if (bindingElement.element!.initializer) { - const tempName = ts.factory.createUniqueName("temp", ts.GeneratedIdentifierFlags.Optimistic); - newNodes.push(ts.factory.createVariableStatement( - /*modifiers*/ undefined, - ts.factory.createVariableDeclarationList( - [ts.factory.createVariableDeclaration( - tempName, /*exclamationToken*/ undefined, /*type*/ undefined, variableInitializer)], - ts.NodeFlags.Const))); - variableInitializer = ts.factory.createConditionalExpression( - ts.factory.createBinaryExpression( - tempName, - ts.factory.createToken(ts.SyntaxKind.EqualsEqualsEqualsToken), - ts.factory.createIdentifier("undefined"), - ), - ts.factory.createToken(ts.SyntaxKind.QuestionToken), - bindingElement.element!.initializer, - ts.factory.createToken(ts.SyntaxKind.ColonToken), - variableInitializer,); - } - newNodes.push(ts.factory.createVariableStatement( - [ts.factory.createToken(ts.SyntaxKind.ExportKeyword)], - ts.factory.createVariableDeclarationList( - [ts.factory.createVariableDeclaration( - name, /*exclamationToken*/ undefined, typeNode, variableInitializer)], - ts.NodeFlags.Const))); - } - ++i; - } - - if (variableStatement.declarationList.declarations.length > 1) { - newNodes.push(ts.factory.updateVariableStatement( - variableStatement, - variableStatement.modifiers, - ts.factory.updateVariableDeclarationList( - variableStatement.declarationList, - variableStatement.declarationList.declarations.filter((node) => node !== bindingPattern.parent), - ) - )); - } - return newNodes; - } - - function addArrayBindingPatterns(bindingPattern: ts.ArrayBindingPattern, bindingElements: ExpressionReverseChain[], parent: ExpressionReverseChain) { - for (let i = 0 ; i < bindingPattern.elements.length ; ++i) { - const element = bindingPattern.elements[i]; - if (ts.isOmittedExpression(element)) { - continue; - } - bindingElements.push({ - element, - parent, - expression: { kind: ExpressionType.ARRAY_ACCESS, arrayIndex: i }, - }); - } - } - - function addObjectBindingPatterns(bindingPattern: ts.ObjectBindingPattern, bindingElements: ExpressionReverseChain[], parent: ExpressionReverseChain) { - for (const bindingElement of bindingPattern.elements) { - let name: string; - if (bindingElement.propertyName) { - if (ts.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 ts.Identifier).text; - } - bindingElements.push({ - element: bindingElement, - parent, - expression: { kind: ExpressionType.TEXT, text: name }, - }); - } - } - - function createChainedExpression(expression: ExpressionReverseChain, expressionToVar: Map): ts.Expression { - const reverseTraverse: ExpressionReverseChain[] = [expression]; - while (expression.parent) { - expression = expression.parent; - reverseTraverse.push(expression); - } - let chainedExpression: ts.Expression = ((reverseTraverse[reverseTraverse.length - 1]).expression as {identifier: ts.Identifier}).identifier; - for (let i = reverseTraverse.length -2 ; i>= 0; --i) { - const nextSubExpr = reverseTraverse[i].expression; - if (nextSubExpr.kind === ExpressionType.TEXT) { - chainedExpression = ts.factory.createPropertyAccessChain( - chainedExpression, - /*questionDotToken*/ undefined, - ts.factory.createIdentifier(nextSubExpr.text) - ); - } - else if (nextSubExpr.kind === ExpressionType.COMPUTED) { - chainedExpression = ts.factory.createElementAccessExpression( - chainedExpression, - expressionToVar.get(nextSubExpr.computed)! - ); - } - else if (nextSubExpr.kind === ExpressionType.ARRAY_ACCESS) { - chainedExpression = ts.factory.createElementAccessExpression( - chainedExpression, - nextSubExpr.arrayIndex - ); - } - } - return chainedExpression; - } - - // Return a visitor function - return (rootNode: ts.Node) => { - function updateTypesInNodeArray(nodeArray: ts.NodeArray): ts.NodeArray; - function updateTypesInNodeArray(nodeArray: ts.NodeArray | undefined): ts.NodeArray | undefined; - function updateTypesInNodeArray(nodeArray: ts.NodeArray | undefined) { - if(nodeArray === undefined) return undefined; - return ts.factory.createNodeArray( - nodeArray.map(param => { - return visit(param) as ts.ParameterDeclaration; - }) - ); - } - function addTypeToFunctionLikeDeclaration(func: ts.FunctionDeclaration): ts.FunctionDeclaration; - function addTypeToFunctionLikeDeclaration(func: ts.FunctionExpression | ts.ArrowFunction): ts.FunctionExpression | ts.ArrowFunction; - function addTypeToFunctionLikeDeclaration(func: ts.FunctionDeclaration | ts.FunctionExpression | ts.ArrowFunction) { - const type = tryGetReturnType(typeChecker, func); - const typeNode = typeToTypeNode(type!, func); - if (ts.isFunctionDeclaration(func)) { - return ts.factory.updateFunctionDeclaration( - func, - func.modifiers, - func.asteriskToken, - func.name, - func.typeParameters, - updateTypesInNodeArray(func.parameters), - typeNode, - func.body); - } - else if (ts.isFunctionExpression(func)) { - return ts.factory.updateFunctionExpression( - func, - func.modifiers, - func.asteriskToken, - func.name, - func.typeParameters, - updateTypesInNodeArray(func.parameters), - typeNode, - func.body); - } - else { - return ts.factory.updateArrowFunction( - func, - func.modifiers, - func.typeParameters, - updateTypesInNodeArray(func.parameters), - typeNode, - ts.factory.createToken(ts.SyntaxKind.EqualsGreaterThanToken), - func.body); - } - } - - // Define a visitor function - function visit(node: ts.Node): ts.Node | ts.Node[] { - const nodeWithDiag = nodesToFix.get(node); - if (!nodeWithDiag) { - return ts.visitEachChild(node, visit, context); - } - - switch (node.kind) { - case ts.SyntaxKind.Parameter: - const parameter = node as ts.ParameterDeclaration; - if (!parameter.type) { - const type = typeChecker.getTypeAtLocation(node); - if (type) { - const typeNode = typeToTypeNode(type, node); - return ts.factory.updateParameterDeclaration( - parameter, - parameter.modifiers, - parameter.dotDotDotToken, - parameter.name, - parameter.questionToken, - typeNode, - parameter.initializer - ); - } - } - break; - case ts.SyntaxKind.VariableDeclaration: - const variableDeclaration = node as ts.VariableDeclaration; - if (!variableDeclaration.type) { - if (variableDeclaration.initializer && - (ts.isFunctionExpression(variableDeclaration.initializer) || ts.isArrowFunction(variableDeclaration.initializer))) { - return ts.factory.updateVariableDeclaration( - variableDeclaration, - variableDeclaration.name, - /**exclamationToken=*/ undefined, - /**type*/ undefined, - addTypeToFunctionLikeDeclaration(variableDeclaration.initializer) - ); - } - const type = typeChecker.getTypeAtLocation(variableDeclaration); - const typeNode = typeToTypeNode(type, variableDeclaration); - return ts.factory.updateVariableDeclaration( - variableDeclaration, - variableDeclaration.name, - /**exclamationToken=*/ undefined, - typeNode, - variableDeclaration.initializer - ); - } - break; - case ts.SyntaxKind.FunctionDeclaration: - const functionDecl = node as ts.FunctionDeclaration; - if (!functionDecl.type) { - const type = tryGetReturnType(typeChecker, functionDecl); - if(type) { - const typeNode = typeToTypeNode(type, functionDecl); - return ts.factory.updateFunctionDeclaration( - functionDecl, - functionDecl.modifiers, - functionDecl.asteriskToken, - functionDecl.name, - updateTypesInNodeArray(functionDecl.typeParameters), - updateTypesInNodeArray(functionDecl.parameters), - typeNode, - functionDecl.body - ); - } - } - break; - case ts.SyntaxKind.PropertySignature: - const propertySignature = node as ts.PropertySignature; - if(!propertySignature.type) { - const type = typeChecker.getTypeAtLocation(node); - const typeNode = typeToTypeNode(type, node); - return ts.factory.updatePropertySignature( - propertySignature, - propertySignature.modifiers, - propertySignature.name, - propertySignature.questionToken, - typeNode, - ); - } - break; - case ts.SyntaxKind.PropertyDeclaration: - const propDecl = node as ts.PropertyDeclaration; - if(!propDecl.type) { - if (propDecl.initializer && (ts.isFunctionExpression(propDecl.initializer) || ts.isArrowFunction(propDecl.initializer))) { - return ts.factory.updatePropertyDeclaration( - propDecl, - propDecl.modifiers, - propDecl.name, - propDecl.questionToken ?? propDecl.exclamationToken, - /**type*/ undefined, - addTypeToFunctionLikeDeclaration(propDecl.initializer)); - } - const type = typeChecker.getTypeAtLocation(node); - const typeNode = typeToTypeNode(type, propDecl); - return ts.factory.updatePropertyDeclaration( - propDecl, - propDecl.modifiers, - propDecl.name, - propDecl.questionToken ?? propDecl.exclamationToken, - typeNode, - propDecl.initializer - ); - } - break; - case ts.SyntaxKind.MethodDeclaration: - const methodDeclaration = node as ts.MethodDeclaration; - if(!methodDeclaration.type) { - const type = tryGetReturnType(typeChecker, methodDeclaration); - if(type) { - const typeNode = typeToTypeNode(type, node); - return ts.factory.updateMethodDeclaration( - methodDeclaration, - methodDeclaration.modifiers, - methodDeclaration.asteriskToken, - methodDeclaration.name, - methodDeclaration.questionToken, - updateTypesInNodeArray(methodDeclaration.typeParameters), - updateTypesInNodeArray(methodDeclaration.parameters), - typeNode, - methodDeclaration.body, - ); - } - } - break; - case ts.SyntaxKind.GetAccessor: - const getAccessor = node as ts.GetAccessorDeclaration; - if(!getAccessor.type) { - const returnType = tryGetReturnType(typeChecker, getAccessor); - if(returnType) { - const typeNode = typeToTypeNode(returnType, node); - return ts.factory.updateGetAccessorDeclaration( - getAccessor, - getAccessor.modifiers, - getAccessor.name, - updateTypesInNodeArray(getAccessor.parameters), - typeNode, - getAccessor.body, - ); - } - } - break; - case ts.SyntaxKind.ExportAssignment: - const defaultExport = node as ts.ExportAssignment; - if(!defaultExport.isExportEquals) { - const type = typeChecker.getTypeAtLocation(defaultExport.expression); - const typeNode = typeToTypeNode(type, node); - return [ - ts.factory.createVariableStatement(/*modifiers*/ undefined, - ts.factory.createVariableDeclarationList( - [ts.factory.createVariableDeclaration( - "__default", /*exclamationToken*/ undefined, - typeNode, defaultExport.expression)], - ts.NodeFlags.Const)), - ts.factory.updateExportAssignment(defaultExport, defaultExport?.modifiers, ts.factory.createIdentifier("__default")), - ]; - } - break; - // Handling expression like heritage clauses e.g. class A extends mixin(B) .. - case ts.SyntaxKind.ClassDeclaration: - return handleClassDeclaration(node as ts.ClassDeclaration, nodeWithDiag.parent.parent as ts.ExpressionWithTypeArguments); - case ts.SyntaxKind.VariableStatement: - return transformDestructuringPatterns(node as ts.VariableStatement, findOuterMostBindingPattern(nodeWithDiag)); - default: - break; - } - - // Otherwise, visit each child node recursively - return ts.visitEachChild(node, visit, context); - } - // Start visiting from root node - return ts.visitNode(rootNode, visit)!; - }; - }; -} - -function findOuterMostBindingPattern(node: ts.Node) { - while (!ts.isVariableDeclaration(node.parent)) { - node = node.parent; - } - return node as ts.BindingPattern; -} diff --git a/external-declarations/src/code-mod/fixer-test.ts b/external-declarations/src/code-mod/fixer-test.ts index aca211be62943..b34b7bbea3952 100644 --- a/external-declarations/src/code-mod/fixer-test.ts +++ b/external-declarations/src/code-mod/fixer-test.ts @@ -1,18 +1,32 @@ import "source-map-support/register"; +import * as fsSync from "fs"; import * as fs from "fs/promises"; -import * as fsPath from "path"; - -import { normalizePath } from "../compiler/path-utils"; -import { isRelevantTestFile, loadTestCase } from "../test-runner/utils"; -import { ArgType, parseArgs,parserConfiguration } from "../utils/cli-parser"; -import ts = require("typescript"); -import { compileFiles, setCompilerOptionsFromHarnessSetting, TestFile } from "../test-runner/tsc-infrastructure/compiler-run"; -import { splitContentByNewlines, TestCaseContent, TestUnitData } from "../test-runner/tsc-infrastructure/test-file-parser"; -import { ensureDir, readAllFiles } from "../utils/fs-utils"; -import { addTypeAnnotationTransformer } from "./code-transform"; - -(ts as any).Debug .enableDebugInfo(); +import ts from "typescript"; + +import { + normalizePath, +} from "../compiler/path-utils"; +import { TestCaseContent } from "../test-runner/tsc-infrastructure/test-file-parser"; +import { + loadTestCase, +} from "../test-runner/utils"; +import { + ArgType, + parseArgs, + parserConfiguration, +} from "../utils/cli-parser"; +import { + readAllFiles, +} from "../utils/fs-utils"; +import { + testCaseToString, +} from "./tsc-test-fixer/test-case-utils"; +import { + fixTestCase, +} from "./tsc-test-fixer/test-fixer"; + +(ts as any).Debug.enableDebugInfo(); export const testRunnerCLIConfiguration = parserConfiguration({ default: { @@ -20,153 +34,67 @@ export const testRunnerCLIConfiguration = parserConfiguration({ description: "Test filter to run", }, rootPaths: ArgType.StringArray(), - shard: ArgType.Number(), - shardCount: ArgType.Number(), update: ArgType.Boolean(), }); -const excludeFilter =/\/fourslash\//; const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), testRunnerCLIConfiguration); printUsageOnErrors(); -const rootCasePaths = parsedArgs.rootPaths ?? [ "./tests/sources" ]; -const filter = parsedArgs.default ? new RegExp(parsedArgs.default) : /.*\.ts/; +const rootCasePaths = parsedArgs.rootPaths ?? ["./fixer-test/expected"]; -const shard = parsedArgs.shard; -const shardCount = parsedArgs.shardCount; +const filter = parsedArgs.default ? new RegExp(parsedArgs.default) : /.*\.ts/; const allTests = rootCasePaths - .flatMap(r => readAllFiles(r, filter).map((file) => ({ file, root: r }))) - .filter(f => !excludeFilter.exec(f.file)); - - - -async function compareTestCase(testData: TestCaseContent & { BOM: string }, path: string, update: boolean) { - const lines = splitContentByNewlines(testData.code); - const result: string[] = []; - let copyFrom = 0; - function pushFrom(target: string[], source: string[], from = 0, to: number = source.length) { - for(let i = from; i< to; i++) { - target.push(source[i]); - } - } - for (const file of testData.testUnitData) { - if(file.content === undefined) continue; - - pushFrom(result, lines, copyFrom, file.startLine); - - pushFrom(result, splitContentByNewlines(file.content)); - - copyFrom = file.endLine + 1; - } - pushFrom(result, lines, copyFrom, lines.length); - await ensureDir(fsPath.dirname(path)); - const content = testData.BOM + result.join(lines.delimiter); - const original = await fs.readFile(path, "utf-8"); - if (content !== original) { - if (!update) { - throw new Error(`Expected \n${original}\n for file ${path} but seen \n${content}`); - } - else { - fs.writeFile(path, content); - } - } -} + .flatMap(r => readAllFiles(r, filter).map(file => ({ file, root: r }))); async function main() { - const testsPerShared = shardCount && Math.round(allTests.length / shardCount); - const [start, end] = shard === undefined || shardCount === undefined || testsPerShared === undefined ? - [0, allTests.length] : - [shard * testsPerShared, (shard === shardCount - 1) ? allTests.length : (shard + 1) * testsPerShared]; - + const [start, end] = [0, allTests.length]; for (let count = start; count < end; count++) { const testFile = normalizePath(allTests[count].file); + const rootPath = normalizePath(allTests[count].root); const caseData = await loadTestCase(testFile); - const settings: ts.CompilerOptions = { target: ts.ScriptTarget.ES2019 }; - setCompilerOptionsFromHarnessSetting(caseData.settings, settings); - - function createHarnessTestFile(lastUnit: TestUnitData): TestFile { - return { unitName: lastUnit.name, content: lastUnit.content, fileOptions: lastUnit.fileOptions }; - } - - const toBeCompiled = caseData.testUnitData.map(unit => { - return createHarnessTestFile(unit); + const updatedTestFileName = testFile.replace(rootPath, "./fixer-test/expected"); + const result = await fixTestCase(caseData, { + target: ts.ScriptTarget.ES2019 }); - - const updatedTestFileName = testFile.replace("fixer-test/source", "fixer-test/expected"); - const result = (() => { - try { - return compileFiles(toBeCompiled, [], { - declaration: "true", - isolatedDeclarations: "true", - removeComments: "false", - }, settings, /**currentDirectory=*/ undefined); - } - catch(e) { - return e as Error; - } - })(); - if(result instanceof Error) { - fs.writeFile(updatedTestFileName, ` + const resultFiles = !(result instanceof Error)? result : [{ + unitName: caseData.testUnitData[0].name, + content: ` ================= CODE MOD ERROR ============== ${result.message} ${result.stack} -`); - continue; - } - const program = result.program!; - - - - for(const testFileContent of caseData.testUnitData) { - if(!isRelevantTestFile(testFileContent)) continue; - try { - const sourceFile = program.getSourceFile(testFileContent.name)!; - program.getDeclarationDiagnostics(sourceFile); - - if(!sourceFile) continue; - let moduleResolutionHost: ts.ModuleResolutionHost | undefined; - program.emit(sourceFile, /**writeFile=*/ undefined, /**cancellationToken=*/ undefined, /**emitOnlyDtsFiles=*/ true, { - afterDeclarations:[ - (c) => { - // @ts-expect-error getEmitHost is not exposed - moduleResolutionHost = c.getEmitHost(); - return (v) => v; - }] - }); - const transformedFile = ts.transform(sourceFile, [ - addTypeAnnotationTransformer(sourceFile, program, moduleResolutionHost), - ]); - - const printer = ts.createPrinter({ - onlyPrintJsDocStyle: true, - newLine: settings.newLine, - target: settings.target, - removeComments: false, - } as ts.PrinterOptions); +// ================== +// Original test file: ${testFile} +// ${caseData.code.split("\n").join("\n// ")} +`, + }]; + await compareTestCase({ + ...caseData, + testUnitData: caseData.testUnitData.map(u => ({ + ...u, + content: resultFiles.find(o => o.unitName === u.name)?.content!, + })), + }, updatedTestFileName, !!parsedArgs.update); + console.log(`Ran: ${count}`); + } +} - const resultStr = printer.printFile( - transformedFile.transformed[0] as ts.SourceFile - ); - testFileContent.content = resultStr; - } - catch(e) { - console.log(`Test ${testFile} failed to transform`); - testFileContent.content = ` -================= CODE MOD ERROR ============== -${e.message} -${e.stack} -`; - // eslint-disable-next-line no-debugger - debugger; - } +async function compareTestCase(testData: TestCaseContent & { BOM: string }, path: string, update: boolean) { + const content = await testCaseToString(testData); + const original = + !fsSync.existsSync(path) ? undefined: await fs.readFile(path, "utf-8"); + if (content !== original) { + if (!update) { + throw new Error(`Expected \n${original}\n for file ${path} but seen \n${content}`); + } + else { + fs.writeFile(path, content); } - await compareTestCase(caseData, updatedTestFileName, parsedArgs.update === true); - console.log(`Ran: ${count}`); } } + main(); diff --git a/external-declarations/src/code-mod/fixer/code-fixer-applier.ts b/external-declarations/src/code-mod/fixer/code-fixer-applier.ts new file mode 100644 index 0000000000000..b59bf962025f7 --- /dev/null +++ b/external-declarations/src/code-mod/fixer/code-fixer-applier.ts @@ -0,0 +1,185 @@ +import * as path from "path"; +import ts, { + CompilerHost, + createCompilerHost, + createDocumentRegistry, + DocumentRegistry, +} from "typescript"; +import { + CodeFixAction, + Diagnostic, + LanguageService, +} from "typescript"; + +import { + applyChangesSnapShot, + createSnapshotRegistry, + revertChangeSnapShot, + VersionedFileRegistry, + VersionedScriptSnapshot, +} from "./snapshots"; +import { + getLineColumn, +} from "./utils"; + +export interface BasicAbortSignal { + isAborted: boolean; +} + +export async function fixProjectRaw( + host: ts.LanguageServiceHost, + documentRegistry: DocumentRegistry | undefined, + snapShotRegistry: VersionedFileRegistry, + fixableErrors: Set, + selectFix: (service: LanguageService, diag: Diagnostic, fixes: readonly CodeFixAction[], files: VersionedFileRegistry, signal: BasicAbortSignal) => Promise, + validateFix?: (service: LanguageService) => Promise, + onProjectLoaded?: (service: LanguageService, documentRegistry: DocumentRegistry, files: VersionedFileRegistry, signal: BasicAbortSignal) => Promise, +) { + documentRegistry = documentRegistry ?? createDocumentRegistry( + host.useCaseSensitiveFileNames?.(), + host.getCurrentDirectory(), + ) + const service = ts.createLanguageService(host, documentRegistry); + + const program = service.getProgram()!; + const signal: BasicAbortSignal = { isAborted: false }; + + await onProjectLoaded?.(service, documentRegistry, snapShotRegistry, signal); + const files = program.getSourceFiles(); + const skips = new Map(); + const defaultFormatOptions = ts.getDefaultFormatCodeSettings(); + fileLoop: + for (let index = 0; index < files.length; index++) { + const file = files[index]; + if (file.fileName.endsWith(".d.ts")) continue; + + let diagnostics = getIsolatedDeclarationsErrors(file.fileName); + + if (diagnostics.length === 0) continue; + let skipCount = skips.get(file.fileName) ?? 0; + let lastFixedDiagnostic: Diagnostic | undefined; + let stuckCount = 0; + while (diagnostics.length > skipCount) { + const diag = diagnostics[skipCount]; + + // Ensure we break out of a unfixable loop + if (lastFixedDiagnostic?.start === diag.start) { + stuckCount++; + } + else { + stuckCount = 0; + } + if (stuckCount === 3) { + const { line, col } = getLineColumn(diag); + throw Error(`Could not fix file. Got stuck in a fix loop on ${diag.file?.fileName}:${line}:${col} +TS${diag.code}: ${diag.messageText} +${diag.file?.text.substring(diag.start ?? 0, (diag.start ?? 0) + (diag.length ?? 0))} +`); + } + const fixes = service.getCodeFixesAtPosition(file.fileName, diag.start!, diag.start! + diag.length!, [diag.code], defaultFormatOptions, {}); + signal.isAborted = false; + let selectedFix: number | undefined = -1; + if (fixes.length) { + selectedFix = await selectFix(service, diag, fixes, snapShotRegistry, signal); + if (signal.isAborted || selectedFix === undefined) { + // Restart files. + index = -1; + continue fileLoop; + } + } + if (selectedFix === -1) { + skipCount++; + skips.set(file.fileName, skipCount); + continue; + } + + const fix = fixes[selectedFix]; + const changedFiles: { + file: string; + old: VersionedScriptSnapshot; + new: VersionedScriptSnapshot; + }[] = []; + for (const fileChanges of fix.changes) { + const snapshot = snapShotRegistry.getSnapshot(fileChanges.fileName)!; + const newSnapShot = applyChangesSnapShot(snapshot, fileChanges.textChanges); + snapShotRegistry.setSnapshot(fileChanges.fileName, newSnapShot); + changedFiles.push({ + file: fileChanges.fileName, + new: newSnapShot, + old: snapshot, + }); + } + + if (validateFix && !await validateFix(service)) { + changedFiles.forEach(c => { + snapShotRegistry.setSnapshot(c.file, revertChangeSnapShot(c.old, c.new)); + }); + } + lastFixedDiagnostic = diag; + diagnostics = getIsolatedDeclarationsErrors(file.fileName); + } + } + service.dispose(); + function getIsolatedDeclarationsErrors(fileName: string) { + return service.getSemanticDiagnostics(fileName).filter(d => fixableErrors.has(d.code)); + } +} + +export async function fixProject( + tsconfigPath: string, + fixableErrors: Set, + selectFix: (service: LanguageService, diag: Diagnostic, fixes: readonly CodeFixAction[], files: VersionedFileRegistry, signal: BasicAbortSignal) => Promise, + validateFix?: (service: LanguageService) => Promise, + onProjectLoaded?: (service: LanguageService, documentRegistry: DocumentRegistry, files: VersionedFileRegistry, signal: BasicAbortSignal) => Promise, +) { + const resolved = path.resolve(tsconfigPath); + const resolvedDirName = path.dirname(resolved); + process.chdir(resolvedDirName); + const relativeTsConfigPath = path.relative(resolvedDirName, resolved); + + // // Read tsconfig.json file from disk + const tsconfig = ts.readConfigFile(relativeTsConfigPath, ts.sys.readFile); + // // Parse JSON content to get compiler options and file names + const cmdLine = ts.parseJsonConfigFileContent(tsconfig.config, ts.sys, resolvedDirName); + cmdLine.options.skipLibCheck = true; + const snapShotRegistry = createSnapshotRegistry(ts.sys); + const compilerHost = createCompilerHost(cmdLine.options); + const langHost = createLanguageHost(snapShotRegistry, cmdLine, compilerHost); + + fixProjectRaw(langHost, /*documentRegistry*/ undefined, snapShotRegistry, fixableErrors, selectFix, validateFix, onProjectLoaded); +} + +export function createLanguageHost( + snapShotRegistry: VersionedFileRegistry, + cmdLine: ts.ParsedCommandLine, + compilerHost: 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); + }, + }; + return langHost; +} diff --git a/external-declarations/src/code-mod/fixer/interactive-fix-selector.ts b/external-declarations/src/code-mod/fixer/interactive-fix-selector.ts new file mode 100644 index 0000000000000..6a47d89f6479b --- /dev/null +++ b/external-declarations/src/code-mod/fixer/interactive-fix-selector.ts @@ -0,0 +1,232 @@ +import chalk from "chalk"; +import inquirer from "inquirer"; +import * as os from "os"; +import type { + ClassificationType, + CodeFixAction, + Diagnostic, + LanguageService, +} from "typescript"; +import ts from "typescript"; + +import { + BasicAbortSignal, +} from "./code-fixer-applier"; +import { + isolatedDeclarationsErrors, +} from "./isolated-declarations-errors"; +import { + VersionedFileRegistry, +} from "./snapshots"; +import { + printDiagnostics, +} from "./utils"; + +const cachedSpans: Record> = {}; +function getString(s: string, length: number) { + return ((cachedSpans[s] ??= {})[length] ??= s.repeat(length)); +} + +export async function interactiveFixSelector(service: LanguageService, diag: Diagnostic, fixes: readonly CodeFixAction[], docs: VersionedFileRegistry, signal: BasicAbortSignal) { + clearScreen(); + await printCode(service, diag); + printDiagnostics(diag); + const allDiags = service.getProgram()?.getDeclarationDiagnostics(); + console.log(`Remaining errors ${allDiags?.length}`); + + const updateFile = docs.updateFromDisk; + docs.updateFromDisk = fileName => { + const existingVersion = docs.getSnapshot(fileName); + const newSnapShot = updateFile.call(docs, fileName); + if (newSnapShot?.version !== existingVersion?.version) { + signal.isAborted = true; + } + return newSnapShot; + }; + try { + const result = inquirer.prompt([ + { + type: "list", + name: "fix", + message: "Select fix:", + default: -1, + choices: [ + ...fixes.map((f, index) => ({ + value: index, + name: f.description.replaceAll("\n", " "), + })), + { name: "Skip", value: -1 }, + ], + }, + ]); + await waitOrAbortPrompt(result, signal); + if (signal.isAborted) { + return undefined; + } + const selectedFix: number = (await result).fix; + return selectedFix; + } + catch (e) { + console.log(e); + } + finally { + docs.updateFromDisk = updateFile; + } + + async function waitOrAbortPrompt(prompt: ReturnType, signal: BasicAbortSignal): Promise { + while (!signal.isAborted) { + const result = await Promise.race([delay(500), prompt]); + if (signal.isAborted) { + // Undocumented API + (prompt as any).ui.rl.emit("line"); + return prompt; + } + if (result !== undefined) { + return result; + } + } + } +} + +const clearScreen = () => { + console.log("\x1b[2J"); +}; + +function delay(ms: number): Promise { + // eslint-disable-next-line no-restricted-globals + return new Promise(r => setTimeout(r, ms)); +} + +function printCode(service: LanguageService, diag: Diagnostic) { + const text = diag.file?.text!; + const endDiag = diag.start! + diag.length!; + const startDiag = diag.start!; + const { start, length } = computePrintStartSpan(); + const classifications = service.getEncodedSyntacticClassifications(diag.file?.fileName!, { start, length }); + printSpans(start, length, text, classifications.spans); + + function computePrintStartSpan() { + const [, maxLines] = process.stdout.getWindowSize(); + const usableLines = maxLines - 6; + const lineSpan = Math.round(usableLines / 3); + const [start, startLineCount] = skipLines(diag.start ?? 0, lineSpan, "up", 0); + + const suggestedEnd = diag.start ?? 0; + const [end] = skipLines(suggestedEnd, usableLines - startLineCount, "down", text.length); + return { start, length: end - start }; + } + function skipLines(pos: number, count: number, dir: "up" | "down", defaultPos: number) { + let skippedLines = 0; + while (count >= skippedLines) { + // Lines with errors take 2 screen lines + skippedLines += (startDiag <= pos && pos <= endDiag) ? 2 : 1; + pos = dir === "up" ? + text.lastIndexOf("\n", pos - 1) : + text.indexOf("\n", pos + 1); + if (pos === -1) { + return [defaultPos, skippedLines] as const; + } + } + return [dir === "up" ? pos + 1 : pos - 1, skippedLines] as const; + } + function printSpans(start: number, length: number, text: string, spans: number[]) { + let pos = start; + const printEnd = start + length; + let lineStart = pos; + function areSpansOverlapping(span1: { start: number; end: number; }, span2: typeof span1) { + return span1.start <= span2.end && span2.start <= span1.end; + } + function writeCode(start: number, end: number, formatter: (text: string) => string = s => s) { + const spanText = text.substring(start, end); + const lineEndChar = spanText.indexOf("\n"); + const lineEnd = pos + lineEndChar; + if (lineEndChar !== -1) { + process.stdout.write(formatter(text.substring(pos, lineEnd))); + } + else { + process.stdout.write(formatter(text.substring(pos, end))); + } + if (lineEndChar !== -1) { + if (areSpansOverlapping({ start: lineStart, end: lineEnd }, { start: startDiag, end: endDiag! })) { + process.stdout.write(os.EOL); + process.stdout.write(getString(" ", Math.max(startDiag - lineStart, 0))); + process.stdout.write(chalk.redBright(getString("~", Math.min(endDiag, lineEnd) - Math.max(startDiag, lineStart)))); + } + lineStart = lineEnd + 1; + process.stdout.write(formatter(text.substring(lineEnd, end))); + } + } + for (const span of iterateSpans(spans)) { + if (pos > span.start + span.length) continue; + if (pos !== span.start) { + writeCode(pos, span.start); + } + pos = span.start; + const end = span.start + span.length; + const formatter = chalk[colorScheme[span.type]] as (...text: string[]) => string; + + writeCode(pos, end, formatter); + + pos += span.length; + if (pos >= printEnd) break; + } + writeCode(pos, pos + 2); // add new line to flush any error ~ + } + console.log(""); +} + +const colorScheme: Record = { + [ts.ClassificationType.numericLiteral]: "red", + [ts.ClassificationType.comment]: "gray", + [ts.ClassificationType.identifier]: "white", + [ts.ClassificationType.keyword]: "blueBright", + [ts.ClassificationType.operator]: "white", + [ts.ClassificationType.stringLiteral]: "red", + [ts.ClassificationType.regularExpressionLiteral]: "red", + [ts.ClassificationType.whiteSpace]: "white", + [ts.ClassificationType.text]: "white", + [ts.ClassificationType.punctuation]: "yellow", + [ts.ClassificationType.className]: "blue", + [ts.ClassificationType.enumName]: "blue", + [ts.ClassificationType.interfaceName]: "blue", + [ts.ClassificationType.moduleName]: "blue", + [ts.ClassificationType.typeParameterName]: "blue", + [ts.ClassificationType.typeAliasName]: "blue", + [ts.ClassificationType.parameterName]: "blue", + [ts.ClassificationType.docCommentTagName]: "green", + [ts.ClassificationType.jsxOpenTagName]: "magenta", + [ts.ClassificationType.jsxCloseTagName]: "magenta", + [ts.ClassificationType.jsxSelfClosingTagName]: "magenta", + [ts.ClassificationType.jsxAttribute]: "blue", + [ts.ClassificationType.jsxText]: "white", + [ts.ClassificationType.jsxAttributeStringLiteralValue]: "red", + [ts.ClassificationType.bigintLiteral]: "white", +}; +function* iterateSpans(encodedSpans: number[]) { + for (let i = 0; i < encodedSpans.length; i += 3) { + yield { + start: encodedSpans[i], + length: encodedSpans[i + 1], + type: encodedSpans[i + 2] as ClassificationType, + }; + } +} +export async function interactiveFixValidator(service: LanguageService) { + const diagnostics = service.getProgram()?.getSemanticDiagnostics(); + const nonIsolatedErrors = diagnostics?.filter(d => !isolatedDeclarationsErrors.has(d.code)); + if (nonIsolatedErrors && nonIsolatedErrors.length !== 0) { + console.log(chalk.red("Fix caused new errors: ")); + nonIsolatedErrors.forEach(printDiagnostics); + const result = await inquirer.prompt([ + { + type: "confirm", + name: "fix", + message: "Revert fix:", + }, + ]); + if (result.fix) { + return false; + } + } + return true; +} diff --git a/external-declarations/src/code-mod/fixer/isolated-declarations-errors.ts b/external-declarations/src/code-mod/fixer/isolated-declarations-errors.ts new file mode 100644 index 0000000000000..20f2edfb725f2 --- /dev/null +++ b/external-declarations/src/code-mod/fixer/isolated-declarations-errors.ts @@ -0,0 +1,6 @@ +export const isolatedDeclarationsErrors = new Set([ + 9007, + 9008, + 9009, + 9010, +]); diff --git a/external-declarations/src/code-mod/fixer/snapshots.ts b/external-declarations/src/code-mod/fixer/snapshots.ts new file mode 100644 index 0000000000000..91c051aeceb63 --- /dev/null +++ b/external-declarations/src/code-mod/fixer/snapshots.ts @@ -0,0 +1,125 @@ +import type { + System, + TextSpan, +} from "typescript"; +import ts from "typescript"; + +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) 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: 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/external-declarations/src/code-mod/fixer/utils.ts b/external-declarations/src/code-mod/fixer/utils.ts new file mode 100644 index 0000000000000..d64775dfca587 --- /dev/null +++ b/external-declarations/src/code-mod/fixer/utils.ts @@ -0,0 +1,22 @@ +import chalk from "chalk"; +import * as path from "path"; +import { Diagnostic } from "typescript"; + + +export function printDiagnostics(diag: Diagnostic) { + const pos = getLineColumn(diag) + const relative = path.relative(process.cwd(), diag.file?.fileName!); + console.log(`${chalk.blueBright(relative)}:${pos.line}:${pos.col} - ${diag.messageText}`); +} + +export function getLineColumn(diag: Diagnostic) { + const text = diag.file?.text! + let line = 1; + let lineStart = text.lastIndexOf("\n", diag.start); + const col = lineStart === -1 ? diag.start!: diag.start!- lineStart; + while(lineStart > 0) { + line++ + lineStart = text.lastIndexOf("\n", lineStart - 1); + } + return { line, col } +} \ No newline at end of file diff --git a/external-declarations/src/code-mod/fixer/watch.ts b/external-declarations/src/code-mod/fixer/watch.ts new file mode 100644 index 0000000000000..3b8a9bb4ab362 --- /dev/null +++ b/external-declarations/src/code-mod/fixer/watch.ts @@ -0,0 +1,28 @@ +import * as fs from "fs"; +import * as path from "path"; +import { + DocumentRegistry, + LanguageService, +} from "typescript"; + +import { + VersionedFileRegistry, +} from "./snapshots"; + +export function makeWatcher() { + let watcher: fs.FSWatcher | undefined; + async function startWatcher(_service: LanguageService, _documentRegistry: DocumentRegistry, files: VersionedFileRegistry) { + watcher = fs.watch("./", { recursive: true }, (ev, fileName) => { + if (ev === "change" && fileName) { + const normalizedPath = path.resolve(fileName).replaceAll("\\", "/"); + files.updateFromDisk(normalizedPath); + } + }); + } + return { + startWatcher, + close() { + watcher?.close(); + }, + }; +} diff --git a/external-declarations/src/code-mod/index.ts b/external-declarations/src/code-mod/index.ts index 48150763788e7..ba9cb4c850da8 100644 --- a/external-declarations/src/code-mod/index.ts +++ b/external-declarations/src/code-mod/index.ts @@ -1,34 +1,26 @@ -// Import TypeScript module -import * as ts from "typescript"; +import ts from "typescript"; -import { isDeclarationFileName } from "../compiler/utils"; -import { addTypeAnnotationTransformer } from "./code-transform"; +import { + fixProject, +} from "./fixer/code-fixer-applier"; +import { + isolatedDeclarationsErrors, +} from "./fixer/isolated-declarations-errors"; -(ts as any).Debug .enableDebugInfo(); -// Read tsconfig.json file from disk -const tsconfig = ts.readConfigFile("tsconfig.json", ts.sys.readFile); -// Parse JSON content to get compiler options and file names -const parsed = ts.parseJsonConfigFileContent(tsconfig.config, ts.sys, "./"); -const options = parsed.options; -// Pass compiler options and file names to createProgram -const program = ts.createProgram(parsed.fileNames, options); +(ts as any).Debug.enableDebugInfo(); -program.getSemanticDiagnostics(); -const files = program.getSourceFiles(); -for (const file of files) { - if (isDeclarationFileName(file.fileName)) continue; - - const transformedFile = ts.transform(file, [ - addTypeAnnotationTransformer(file, program), - ]); - - const printer = ts.createPrinter({ - onlyPrintJsDocStyle: true, - newLine: options.newLine, - target: options.target, - } as ts.PrinterOptions); - const resultStr = printer.printFile( - transformedFile.transformed[0] as ts.SourceFile - ); - console.log(resultStr); +async function main() { + const config = process.argv[2] ?? "./tsconfig.json"; + if (process.argv.includes("--interactive")) { + const { interactiveFixSelector, interactiveFixValidator } = await import("./fixer/interactive-fix-selector"); + const { makeWatcher } = await import("./fixer/watch"); + const watcher = makeWatcher(); + await fixProject(config, isolatedDeclarationsErrors, interactiveFixSelector, interactiveFixValidator, watcher.startWatcher); + watcher.close(); + } + else { + await fixProject(config, isolatedDeclarationsErrors, async () => 0); + } } + +main(); diff --git a/external-declarations/src/code-mod/test-updater.ts b/external-declarations/src/code-mod/test-updater.ts deleted file mode 100644 index 71c43d86686a4..0000000000000 --- a/external-declarations/src/code-mod/test-updater.ts +++ /dev/null @@ -1,174 +0,0 @@ -import "source-map-support/register"; - -import * as fs from "fs/promises"; -import * as fsPath from "path"; - -import { normalizePath } from "../compiler/path-utils"; -import { isRelevantTestFile, loadTestCase } from "../test-runner/utils"; -import { ArgType, parseArgs,parserConfiguration } from "../utils/cli-parser"; -import ts = require("typescript"); -import { compileFiles, setCompilerOptionsFromHarnessSetting, TestFile } from "../test-runner/tsc-infrastructure/compiler-run"; -import { splitContentByNewlines, TestCaseContent, TestUnitData } from "../test-runner/tsc-infrastructure/test-file-parser"; -import { ensureDir, readAllFiles } from "../utils/fs-utils"; -import { addTypeAnnotationTransformer } from "./code-transform"; - -(ts as any).Debug .enableDebugInfo(); - -export const testRunnerCLIConfiguration = parserConfiguration({ - default: { - type: ArgType.String(), - description: "Test filter to run", - }, - rootPaths: ArgType.StringArray(), - shard: ArgType.Number(), - shardCount: ArgType.Number(), -}); - -const excludeFilter =/\/fourslash\//; -const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), testRunnerCLIConfiguration); -printUsageOnErrors(); - -const rootCasePaths = parsedArgs.rootPaths ?? [ "./tests/sources" ]; -const filter = parsedArgs.default ? new RegExp(parsedArgs.default) : /.*\.ts/; - -const shard = parsedArgs.shard; -const shardCount = parsedArgs.shardCount; - -const allTests = rootCasePaths - .flatMap(r => readAllFiles(r, filter).map((file) => ({ file, root: r }))) - .filter(f => !excludeFilter.exec(f.file)); - - - -async function writeTestCase(testData: TestCaseContent & { BOM: string }, path: string) { - const lines = splitContentByNewlines(testData.code); - const result: string[] = []; - let copyFrom = 0; - function pushFrom(target: string[], source: string[], from = 0, to: number = source.length) { - for(let i = from; i< to; i++) { - target.push(source[i]); - } - } - for (const file of testData.testUnitData) { - if(file.content === undefined) continue; - - pushFrom(result, lines, copyFrom, file.startLine); - - pushFrom(result, splitContentByNewlines(file.content)); - - copyFrom = file.endLine + 1; - } - pushFrom(result, lines, copyFrom, lines.length); - await ensureDir(fsPath.dirname(path)); - const content = testData.BOM + result.join(lines.delimiter); - await fs.writeFile(path, content); -} - -async function main() { - const testsPerShared = shardCount && Math.round(allTests.length / shardCount); - const [start, end] = shard === undefined || shardCount === undefined || testsPerShared === undefined ? - [0, allTests.length] : - [shard * testsPerShared, (shard === shardCount - 1) ? allTests.length : (shard + 1) * testsPerShared]; - - - for (let count = start; count < end; count++) { - const testFile = normalizePath(allTests[count].file); - const rootPath = normalizePath(allTests[count].root); - const caseData = await loadTestCase(testFile); - - const settings: ts.CompilerOptions = {}; - setCompilerOptionsFromHarnessSetting(caseData.settings, settings); - - function createHarnessTestFile(lastUnit: TestUnitData): TestFile { - return { unitName: lastUnit.name, content: lastUnit.content, fileOptions: lastUnit.fileOptions }; - } - - const toBeCompiled = caseData.testUnitData.map(unit => { - return createHarnessTestFile(unit); - }); - - await writeTestCase(caseData, testFile.replace(rootPath, "./tsc-tests/original-tests")); - const updatedTestFileName = testFile.replace(rootPath, "./tsc-tests/updated-tests"); - const result = (() => { - try { - return compileFiles(toBeCompiled, [], { - declaration: "true", - isolatedDeclarations: "true", - removeComments: "false", - }, settings, /**currentDirectory=*/ undefined); - } - catch(e) { - return e as Error; - } - })(); - if(result instanceof Error) { - await ensureDir(fsPath.dirname(updatedTestFileName)); - await fs.writeFile(updatedTestFileName, ` -================= CODE MOD ERROR ============== -${result.message} -${result.stack} - -// ================== -// Original test file: ${testFile} -// ${caseData.code.split("\n").join("\n// ")} -`); - continue; - } - const program = result.program!; - - - - for(const testFileContent of caseData.testUnitData) { - if(!isRelevantTestFile(testFileContent)) continue; - try { - const sourceFile = program.getSourceFile(testFileContent.name)!; - program.getDeclarationDiagnostics(sourceFile); - - if(!sourceFile) continue; - let moduleResolutionHost: ts.ModuleResolutionHost | undefined; - program.emit(sourceFile, /**writeFile=*/ undefined, /**cancellationToken=*/ undefined, /**emitOnlyDtsFiles=*/ true, { - afterDeclarations:[ - (c) => { - // @ts-expect-error getEmitHost is not exposed - moduleResolutionHost = c.getEmitHost(); - return (v) => v; - }] - }); - const transformedFile = ts.transform(sourceFile, [ - addTypeAnnotationTransformer(sourceFile, program, moduleResolutionHost), - ]); - - const printer = ts.createPrinter({ - onlyPrintJsDocStyle: false, - newLine: settings.newLine, - target: settings.target, - removeComments: false, - omitTrailingSemicolon: true, - } as ts.PrinterOptions); - - - const resultStr = printer.printFile( - transformedFile.transformed[0] as ts.SourceFile - ); - testFileContent.content = resultStr; - } - catch(e) { - console.log(`Test ${testFile} failed to transform`); - testFileContent.content = ` -================= CODE MOD ERROR ============== -${e.message} -${e.stack} -// ================== -// Original test file: ${testFile} -// ${caseData.code.split("\n").join("\n// ")} -`; - // eslint-disable-next-line no-debugger - debugger; - } - } - await writeTestCase(caseData, updatedTestFileName); - console.log(`Ran: ${count}`); - } -} - -main(); diff --git a/external-declarations/src/code-mod/parallel-run.ts b/external-declarations/src/code-mod/tsc-test-fixer/run-test-updater-parallel.ts similarity index 72% rename from external-declarations/src/code-mod/parallel-run.ts rename to external-declarations/src/code-mod/tsc-test-fixer/run-test-updater-parallel.ts index 483d0b8f57231..f9786ab909978 100644 --- a/external-declarations/src/code-mod/parallel-run.ts +++ b/external-declarations/src/code-mod/tsc-test-fixer/run-test-updater-parallel.ts @@ -1,25 +1,28 @@ import * as childProcess from "child_process"; import * as path from "path"; -import { ArgType, parseArgs } from "../utils/cli-parser"; +import { + ArgType, + parseArgs, +} from "../../utils/cli-parser"; interface ExecuteResult { - error: childProcess.ExecException | undefined - stdout: string, - stderr: string, + error: childProcess.ExecException | undefined; + stdout: string; + stderr: string; } function exec(cmd: string, dir: string, onStdOut: (s: string) => void) { - return new Promise((resolve) => { + return new Promise(resolve => { console.log(`In ${dir} Executing: ${cmd}`); - const ls = childProcess.spawn(cmd, [], { + const ls = childProcess.spawn(cmd, [], { cwd: path.resolve(path.join(process.cwd(), dir)), - shell: true + shell: true, }); let stdout = ""; let stderr = ""; - ls.stdout.on("data", (data) => { + ls.stdout.on("data", data => { if (!onStdOut) { process.stdout.write(data.toString()); } @@ -29,15 +32,15 @@ function exec(cmd: string, dir: string, onStdOut: (s: string) => void) { stdout += data.toString(); }); - ls.stderr.on("data", (data) => { + ls.stderr.on("data", data => { process.stderr.write(data.toString()); stderr += data.toString(); }); - ls.on("error", (err) => { + ls.on("error", err => { console.log(err); }); - ls.on("exit", (code) => { + ls.on("exit", code => { console.log("exited:" + code?.toString()); resolve({ error: !code ? undefined : Object.assign(new Error(""), { @@ -45,7 +48,7 @@ function exec(cmd: string, dir: string, onStdOut: (s: string) => void) { cmd, }), stderr, - stdout + stdout, }); }); }); @@ -65,16 +68,14 @@ const shardCount = parsedArgs.shardCount ?? 6; async function main() { let runCount = 0; - const commandLine = `node ./build/code-mod/test-updater.js ${process.argv.slice(2).join(" ")} ${ - parsedArgs.shardCount === undefined ? `--shardCount=${shardCount} `: "" - }`; + const commandLine = `node ./build/code-mod/test-fixer/run-test-updater.js ${process.argv.slice(2).join(" ")} ${parsedArgs.shardCount === undefined ? `--shardCount=${shardCount} ` : ""}`; let lastWrite = new Date().getTime(); const startTime = new Date().getTime(); const elapsedTime = (now: number) => `${((now - startTime) / 1000 / 60).toFixed(2)} minutes`; const promisees = Array.from({ length: shardCount }).map(async (_, index) => { await exec(commandLine + ` --shard=${index}`, "./", out => { runCount += (out.match(/Ran:/g) || []).length; - if(new Date().getTime() - lastWrite > 2000) { + if (new Date().getTime() - lastWrite > 2000) { lastWrite = new Date().getTime(); console.log(`Run count: ${runCount} after ${elapsedTime(lastWrite)}`); } @@ -86,4 +87,4 @@ async function main() { console.log(`Took ${elapsedTime(endTime)} to complete ${runCount}`); } -main(); \ No newline at end of file +main(); diff --git a/external-declarations/src/code-mod/tsc-test-fixer/run-test-updater.ts b/external-declarations/src/code-mod/tsc-test-fixer/run-test-updater.ts new file mode 100644 index 0000000000000..6ff780ab4d6a5 --- /dev/null +++ b/external-declarations/src/code-mod/tsc-test-fixer/run-test-updater.ts @@ -0,0 +1,101 @@ +import "source-map-support/register"; + +import * as fs from "fs/promises"; +import * as fsPath from "path"; +import ts from "typescript"; + +import { + normalizePath, +} from "../../compiler/path-utils"; +import { + loadTestCase, +} from "../../test-runner/utils"; +import { + ArgType, + parseArgs, + parserConfiguration, +} from "../../utils/cli-parser"; +import { + ensureDir, + readAllFiles, +} from "../../utils/fs-utils"; +import { + writeTestCase, +} from "./test-case-utils"; +import { + fixTestCase, +} from "./test-fixer"; + +(ts as any).Debug.enableDebugInfo(); + +export const testRunnerCLIConfiguration = parserConfiguration({ + default: { + type: ArgType.String(), + description: "Test filter to run", + }, + rootPaths: ArgType.StringArray(), + originalOutputPath: ArgType.String(), + updatedOutputPath: ArgType.String(), + shard: ArgType.Number(), + shardCount: ArgType.Number(), +}); + +const excludeFilter = /\/fourslash\//; +const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), testRunnerCLIConfiguration); +printUsageOnErrors(); + +const rootCasePaths = parsedArgs.rootPaths ?? ["./tests/sources"]; + +const filter = parsedArgs.default ? new RegExp(parsedArgs.default) : /.*\.ts/; + +const shard = parsedArgs.shard; +const shardCount = parsedArgs.shardCount; + +const allTests = rootCasePaths + .flatMap(r => readAllFiles(r, filter).map(file => ({ file, root: r }))) + .filter(f => !excludeFilter.exec(f.file)); + +async function main() { + const testsPerShared = shardCount && Math.round(allTests.length / shardCount); + const [start, end] = shard === undefined || shardCount === undefined || testsPerShared === undefined ? + [0, allTests.length] : + [shard * testsPerShared, (shard === shardCount - 1) ? allTests.length : (shard + 1) * testsPerShared]; + + // const libFiles = (await readDirRecursive(libFolder)).map(n => normalizePath(path.join("/.lib", n))); + + for (let count = start; count < end; count++) { + const testFile = normalizePath(allTests[count].file); + const rootPath = normalizePath(allTests[count].root); + const caseData = await loadTestCase(testFile); + + await writeTestCase(caseData, testFile.replace(rootPath, parsedArgs.originalOutputPath ?? "./tsc-tests/original-tests")); + const updatedTestFileName = testFile.replace(rootPath, parsedArgs.updatedOutputPath ?? "./tsc-tests/updated-tests"); + const result = await fixTestCase(caseData, {}); + if (result instanceof Error) { + await ensureDir(fsPath.dirname(updatedTestFileName)); + await fs.writeFile( + updatedTestFileName, + ` +================= CODE MOD ERROR ============== +${result.message} +${result.stack} + +// ================== +// Original test file: ${testFile} +// ${caseData.code.split("\n").join("\n// ")} +`, + ); + continue; + } + await writeTestCase({ + ...caseData, + testUnitData: caseData.testUnitData.map(u => ({ + ...u, + content: result.find(o => o.unitName === u.name)?.content!, + })), + }, updatedTestFileName); + console.log(`Ran: ${count}`); + } +} + +main(); diff --git a/external-declarations/src/code-mod/tsc-test-fixer/test-case-utils.ts b/external-declarations/src/code-mod/tsc-test-fixer/test-case-utils.ts new file mode 100644 index 0000000000000..5d90b49793a7e --- /dev/null +++ b/external-declarations/src/code-mod/tsc-test-fixer/test-case-utils.ts @@ -0,0 +1,37 @@ +import * as fs from "fs/promises"; +import * as fsPath from "path"; + +import { + splitContentByNewlines, + TestCaseContent, +} from "../../test-runner/tsc-infrastructure/test-file-parser"; +import { + ensureDir, +} from "../../utils/fs-utils"; + +export async function writeTestCase(testData: TestCaseContent & { BOM: string; }, path: string) { + await ensureDir(fsPath.dirname(path)) + await fs.writeFile(path, await testCaseToString(testData)); +} +export async function testCaseToString(testData: TestCaseContent & { BOM: string; }) { + const lines = splitContentByNewlines(testData.code); + const result: string[] = []; + let copyFrom = 0; + function pushFrom(target: string[], source: string[], from = 0, to: number = source.length) { + for (let i = from; i < to; i++) { + target.push(source[i]); + } + } + for (const file of testData.testUnitData) { + if (file.content === undefined) continue; + + pushFrom(result, lines, copyFrom, file.startLine); + + pushFrom(result, splitContentByNewlines(file.content)); + + copyFrom = file.endLine + 1; + } + pushFrom(result, lines, copyFrom, lines.length); + const content = testData.BOM + result.join(lines.delimiter); + return content; +} diff --git a/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts b/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts new file mode 100644 index 0000000000000..e390bc24d03be --- /dev/null +++ b/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts @@ -0,0 +1,80 @@ + +import ts from "typescript"; + +import { + prepareTestOptionsAndFs, + setCompilerOptionsFromHarnessSetting, + TestFile, +} from "../../test-runner/tsc-infrastructure/compiler-run"; +import * as fake from "../../test-runner/tsc-infrastructure/fakesHosts"; +import { + TestUnitData, +} from "../../test-runner/tsc-infrastructure/test-file-parser"; +import { + TestCaseWithBOM, +} from "../../test-runner/utils"; +import { + createLanguageHost, + fixProjectRaw, +} from "../fixer/code-fixer-applier"; +import { + isolatedDeclarationsErrors, +} from "../fixer/isolated-declarations-errors"; +import { + createSnapshotRegistry, +} from "../fixer/snapshots"; + +export async function fixTestCase(caseData: TestCaseWithBOM, settings: ts.CompilerOptions) { + settings = { ...settings }; + setCompilerOptionsFromHarnessSetting(caseData.settings, settings); + + function createHarnessTestFile(lastUnit: TestUnitData): TestFile { + return { unitName: lastUnit.name, content: lastUnit.content, fileOptions: lastUnit.fileOptions }; + } + + const toBeCompiled = caseData.testUnitData.map(unit => { + return createHarnessTestFile(unit); + }); + + try { + return await fixTestFiles(toBeCompiled, settings); + } + catch (e) { + return e as Error; + } +} + +export async function fixTestFiles(toBeCompiled: TestFile[], settings: ts.CompilerOptions) { + const { fs, options, programFileNames } = prepareTestOptionsAndFs( + toBeCompiled, + [], + { + declaration: "true", + isolatedDeclarations: "true", + removeComments: "false", + }, + settings, + /**currentDirectory=*/ undefined, + ); + const host = new fake.CompilerHost(fs, options); + + const snapShotRegistry = createSnapshotRegistry(host); + const langHost = createLanguageHost(snapShotRegistry, { + fileNames: programFileNames, + options, + errors: [], + }, host); + + await fixProjectRaw( + langHost, + /*documentRegistry*/ undefined, + snapShotRegistry, + isolatedDeclarationsErrors, + async () => 0, + ); + + return toBeCompiled.map(unit => ({ + ...unit, + content: fs.readFileSync(unit.unitName, "utf-8"), + })); +} diff --git a/external-declarations/src/test-runner/test-runner-main.ts b/external-declarations/src/test-runner/test-runner-main.ts index b62897546484a..deb89a052591b 100644 --- a/external-declarations/src/test-runner/test-runner-main.ts +++ b/external-declarations/src/test-runner/test-runner-main.ts @@ -15,7 +15,7 @@ import { IO } from "./tsc-infrastructure/io"; import { CompilerSettings, TestCaseContent } from "./tsc-infrastructure/test-file-parser"; import { getFileBasedTestConfigurationDescription, getFileBasedTestConfigurations } from "./tsc-infrastructure/vary-by"; import { changeExtension } from "./tsc-infrastructure/vpath"; -import { loadTestCase, runIsolated, runTypeScript,TestCompilationResult } from "./utils"; +import { loadTestCase, readDirRecursive, runIsolated, runTypeScript,TestCompilationResult } from "./utils"; const excludeFilter =/\/fourslash\//; @@ -71,21 +71,6 @@ async function main() { Object.entries(fileConfiguration?.["test-categories"] ?? {}).forEach(([name, tests]) => tests.forEach(t => testCategories.set(t, name))); } - async function readDirRecursive (dir: string, relativePath = ""): Promise { - const content = await fs.readdir(dir); - const result: string[] = []; - for (const entry of content) { - const relativeChildPath = path.join(relativePath, entry); - const fsPath = path.join(dir, entry) - const stat = await fs.stat(fsPath); - if(stat.isDirectory()) { - result.push(...await readDirRecursive(fsPath, relativeChildPath)) - } else { - result.push(relativeChildPath); - } - } - return result; - } const libFiles = (await readDirRecursive(libFolder)).map(n => normalizePath(path.join("/.lib", n))); const testsPerShared = shardCount && Math.round(allTests.length / shardCount); @@ -122,6 +107,9 @@ async function main() { setCompilerOptionsFromHarnessSetting(data.settings, settings); setCompilerOptionsFromHarnessSetting(varySettings, settings); + if(parsedArgs.forceIsolatedDeclarations) { + settings.isolatedDeclarations = true; + } // Not supported delete settings.outFile; delete settings.out; diff --git a/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts b/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts index f34fa25643628..3c1a4ac1dbeea 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts @@ -1,14 +1,36 @@ -import { CompilerOptions, Diagnostic } from "typescript"; +import { + CompilerOptions, + Diagnostic, +} from "typescript"; import * as ts from "typescript"; -import { compareStringsCaseSensitive, hasProperty,map, startsWith } from "../../compiler/lang-utils"; -import { createGetCanonicalFileName, fileExtensionIs, getNormalizedAbsolutePath, normalizeSlashes, toPath } from "../../compiler/path-utils"; -import { cloneCompilerOptions, getEmitScriptTarget } from "../../compiler/utils"; +import { + compareStringsCaseSensitive, + hasProperty, + map, + startsWith, +} from "../../compiler/lang-utils"; +import { + createGetCanonicalFileName, + fileExtensionIs, + getNormalizedAbsolutePath, + normalizeSlashes, + toPath, +} from "../../compiler/path-utils"; +import { + cloneCompilerOptions, + getEmitScriptTarget, +} from "../../compiler/utils"; import * as compiler from "./compiler"; import * as fakes from "./fakesHosts"; -import { IO } from "./io"; +import { + IO, +} from "./io"; import * as opts from "./options"; -import { parseCustomTypeOption, parseListTypeOption } from "./options"; +import { + parseCustomTypeOption, + parseListTypeOption, +} from "./options"; import * as documents from "./test-document"; import * as TestCaseParser from "./test-file-parser"; import * as vfs from "./vfs"; @@ -71,7 +93,6 @@ export function setCompilerOptionsFromHarnessSetting(settings: TestCaseParser.Co } } - function optionValue(option: opts.CommandLineOption, value: string, errors: Diagnostic[]): any { switch (option.type) { case "boolean": @@ -99,15 +120,15 @@ export interface TestFile { fileOptions?: any; } -export function compileFiles( +export function prepareTestOptionsAndFs( 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 { + symlinks?: vfs.FileSet, +) { const options: ts.CompilerOptions & HarnessOptions = compilerOptions ? cloneCompilerOptions(compilerOptions) : { noResolve: false }; options.target = getEmitScriptTarget(options); options.newLine = options.newLine || ts.NewLineKind.CarriageReturnLineFeed; @@ -140,20 +161,31 @@ export function compileFiles( for (const fileName of options.libFiles.split(",")) { programFileNames.push(vpath.combine(vfs.testLibFolder, fileName)); } - } const docs = inputFiles.concat(otherFiles).map(documents.TextDocument.fromTestFile); const fs = vfs.createFromFileSystem(IO, !useCaseSensitiveFileNames, { documents: docs, cwd: currentDirectory }); if (symlinks) { fs.apply(symlinks); } + return { fs, options, programFileNames }; +} + +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, +) { + const { fs, options, programFileNames } = prepareTestOptionsAndFs(inputFiles, otherFiles, harnessSettings, compilerOptions, currentDirectory, symlinks); const host = new fakes.CompilerHost(fs, options); const result = compiler.compileFiles(host, programFileNames, options); result.symlinks = symlinks; return result; } - export function* iterateOutputs(outputFiles: Iterable): IterableIterator<[string, string]> { // Collect, test, and sort the fileNames const files = Array.from(outputFiles); @@ -214,4 +246,4 @@ export namespace Utils { export function addUTF8ByteOrderMark(text: string) { return getByteOrderMarkLength(text) === 0 ? "\u00EF\u00BB\u00BF" + text : text; } -} \ No newline at end of file +} diff --git a/external-declarations/src/test-runner/utils.ts b/external-declarations/src/test-runner/utils.ts index 377619da1e4f1..2c51087351ec1 100644 --- a/external-declarations/src/test-runner/utils.ts +++ b/external-declarations/src/test-runner/utils.ts @@ -1,26 +1,44 @@ - import * as fsp from "fs/promises"; +import * as JSON from 'json5'; +import * as path from "path"; import * as ts from "typescript"; -import { ModuleKind } from "typescript"; +import { + ModuleKind, +} from "typescript"; -import { getDeclarationExtension, isDeclarationFile, isTypeScriptFile } from "../compiler/path-utils"; -import { transformFile } from "../compiler/transform-file"; -import { parsedCliArgs } from "./cli-arg-config"; -import { compileFiles, TestFile, Utils } from "./tsc-infrastructure/compiler-run"; -import { libs } from "./tsc-infrastructure/options"; +import { + getDeclarationExtension, + isDeclarationFile, + isTypeScriptFile, +} from "../compiler/path-utils"; +import { + transformFile, +} from "../compiler/transform-file"; +import { + compileFiles, + TestFile, + Utils, +} from "./tsc-infrastructure/compiler-run"; +import { + libs, +} from "./tsc-infrastructure/options"; import * as TestCaseParser from "./tsc-infrastructure/test-file-parser"; -import { changeExtension } from "./tsc-infrastructure/vpath"; +import { + changeExtension, +} from "./tsc-infrastructure/vpath"; import * as vpath from "./tsc-infrastructure/vpath"; export interface TestCompilationResult { files: readonly FileContent[]; - diagnostics: readonly ts.Diagnostic[] | Error + diagnostics: readonly ts.Diagnostic[] | Error; } export interface FileContent { - readonly content: string, - readonly fileName: string, + readonly content: string; + readonly fileName: string; } +export interface TestCaseWithBOM extends Awaited> { +} export async function loadTestCase(fileName: string) { const rawText = await fsp.readFile(fileName, { encoding: "utf-8" }); const test = { @@ -28,10 +46,10 @@ export async function loadTestCase(fileName: string) { file: fileName, }; return Object.assign(TestCaseParser.makeUnitsFromTest(test.content, test.file), { - BOM: rawText.substring(0, Utils.getByteOrderMarkLength(rawText)) + BOM: rawText.substring(0, Utils.getByteOrderMarkLength(rawText)), }); } -const forceIsolatedDeclarations = parsedCliArgs.forceIsolatedDeclarations; + export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings: ts.CompilerOptions): TestCompilationResult { function createHarnessTestFile(lastUnit: TestCaseParser.TestUnitData): TestFile { return { unitName: lastUnit.name, content: lastUnit.content, fileOptions: lastUnit.fileOptions }; @@ -41,16 +59,13 @@ export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings return createHarnessTestFile(unit); }); - if (forceIsolatedDeclarations && settings.isolatedDeclarations === undefined) { - settings.isolatedDeclarations = true; - } const result = compileFiles(toBeCompiled, [], { declaration: "true", // declarationMap: "true", removeComments: "false", }, settings); - const files = caseData.testUnitData + const files = caseData.testUnitData .filter(isRelevantTestFile) .flatMap(file => { const declarationFile = changeExtension(file.name, getDeclarationExtension(file.name)); @@ -62,23 +77,21 @@ export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings return [{ content: declaration?.text ?? "", fileName: declarationFile, - } - // , { - // content: declarationMap?.text ?? "", - // fileName: declarationMapFile, - // } + }// , { + // content: declarationMap?.text ?? "", + // fileName: declarationMapFile, + // } ]; }); return { files, diagnostics: result.diagnostics, - } + }; } export function isRelevantTestFile(f: TestCaseParser.TestUnitData) { return isTypeScriptFile(f.name) && !isDeclarationFile(f.name) && f.content !== undefined; } - export function runIsolated(caseData: TestCaseParser.TestCaseContent, libFiles: string[], settings: ts.CompilerOptions): TestCompilationResult { const toSrc = (n: string) => vpath.combine("/src", n); const projectFiles = [...caseData.testUnitData.map(o => toSrc(o.name)), ...libFiles]; @@ -93,7 +106,7 @@ export function runIsolated(caseData: TestCaseParser.TestCaseContent, libFiles: packageResolution = JSON.parse(packageJson.content)?.type === "module" ? ModuleKind.ESNext : ModuleKind.CommonJS; } - const diagnostics: ts.Diagnostic[] = [] + const diagnostics: ts.Diagnostic[] = []; const files = caseData.testUnitData .filter(isRelevantTestFile) .map(file => { @@ -102,7 +115,8 @@ export function runIsolated(caseData: TestCaseParser.TestCaseContent, libFiles: Utils.removeByteOrderMark(file.content), settings.target ?? ts.ScriptTarget.ES2015, /*setParentNodes*/ true, - file.name.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS); + file.name.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS, + ); const declaration = transformFile(sourceFile, projectFiles, libs, settings, packageResolution); diagnostics.push(...declaration.diagnostics); return { @@ -114,3 +128,18 @@ export function runIsolated(caseData: TestCaseParser.TestCaseContent, libFiles: } +export async function readDirRecursive (dir: string, relativePath = ""): Promise { + const content = await fsp.readdir(dir); + const result: string[] = []; + for (const entry of content) { + const relativeChildPath = path.join(relativePath, entry); + const fsPath = path.join(dir, entry) + const stat = await fsp.stat(fsPath); + if(stat.isDirectory()) { + result.push(...await readDirRecursive(fsPath, relativeChildPath)) + } else { + result.push(relativeChildPath); + } + } + return result; +} \ No newline at end of file diff --git a/external-declarations/src/tsconfig.json b/external-declarations/src/tsconfig.json index c0f480bccf081..b7c2046ebd846 100644 --- a/external-declarations/src/tsconfig.json +++ b/external-declarations/src/tsconfig.json @@ -2,10 +2,11 @@ "compilerOptions": { "pretty": true, - "lib": ["es2018", "DOM"], - "target": "es2018", + "lib": ["ES2021"], + "target": "ES2021", "module": "CommonJS", - "moduleResolution": "node", + "moduleResolution": "Node", + "esModuleInterop": true, "declaration": true, "declarationMap": true, From 62fd7be9f31b3cd49d24dac04cb9a2ab23edf4a5 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 4 Oct 2023 13:00:05 +0100 Subject: [PATCH 087/224] Fix code fixer issues for enums and for cases where the target changes. Signed-off-by: Titian Cernicova-Dragomir --- .../src/code-mod/tsc-test-fixer/test-fixer.ts | 1 - .../fixMissingTypeAnnotationOnExports.ts | 91 ++++++++++++------- ...peAnnotationOnExports45-no-enum-members.ts | 11 +++ 3 files changed, 71 insertions(+), 32 deletions(-) create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports45-no-enum-members.ts diff --git a/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts b/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts index e390bc24d03be..39dc9eb6a5967 100644 --- a/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts +++ b/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts @@ -1,4 +1,3 @@ - import ts from "typescript"; import { diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index bcc2299df7b50..747d43d019d80 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -41,6 +41,7 @@ import { isConstTypeReference, isDeclaration, isEntityNameExpression, + isEnumMember, isExpression, isHeritageClause, isIdentifier, @@ -162,7 +163,7 @@ function addCodeAction( cb: (fixer: Fixer) => DiagnosticOrDiagnosticAndArguments | undefined, ) { const changes = withChanges(context, typePrinter, cb); - if (changes.result) { + if (changes.result && changes.textChanges.length) { const newFix = createCodeFixAction( fixName, changes.textChanges, @@ -181,6 +182,7 @@ function withChanges( 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; @@ -205,8 +207,11 @@ function withChanges( return undefined; } + function needsParenthesizedExpressionForAssertion(node: Expression) { + return !isEntityNameExpression(node) && !isCallExpression(node) && !isObjectLiteralExpression(node) && !isArrayLiteralExpression(node); + } function createAsExpression(node: Expression, type: TypeNode) { - if (!isEntityNameExpression(node) && !isCallExpression(node) && !isObjectLiteralExpression(node) && !isArrayLiteralExpression(node)) { + if (needsParenthesizedExpressionForAssertion(node)) { node = factory.createParenthesizedExpression(node); } return factory.createAsExpression( @@ -221,6 +226,15 @@ function withChanges( if (!targetNode || isValueSignatureDeclaration(targetNode) || isValueSignatureDeclaration(targetNode.parent)) return; const isExpressionTarget = isExpression(targetNode); + // 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; @@ -243,8 +257,8 @@ function withChanges( const isShorthandPropertyAssignmentTarget = isIdentifier(targetNode) && isShorthandPropertyAssignment(targetNode.parent); if (!(isExpressionTarget || isShorthandPropertyAssignmentTarget)) return undefined; - const typeNode = inferNodeType(targetNode); - if (!typeNode) return undefined; + const { typeNode, mutatedTarget } = inferNodeType(targetNode); + if (!typeNode || mutatedTarget) return undefined; let replacementNode: Node; let replacementTarget: Node; @@ -257,6 +271,11 @@ function withChanges( typeNode, ), ); + changeTracker.replaceNode( + sourceFile, + replacementTarget, + replacementNode, + ); } else if (isExpressionTarget) { replacementTarget = targetNode; @@ -268,11 +287,6 @@ function withChanges( else { Debug.assertNever(targetNode); } - changeTracker.replaceNode( - sourceFile, - replacementTarget, - replacementNode, - ); return [Diagnostics.Add_inline_type_assertion_to_0, printTypeNode(typeNode)]; } @@ -457,7 +471,7 @@ function withChanges( case SyntaxKind.ExportAssignment: const defaultExport = node as ExportAssignment; if (!defaultExport.isExportEquals) { - const typeNode = inferNodeType(defaultExport.expression); + const { typeNode } = inferNodeType(defaultExport.expression); if (!typeNode) return undefined; changeTracker.replaceNodeWithNodes(sourceFile, node, [ factory.createVariableStatement( @@ -494,7 +508,7 @@ function withChanges( if (func.type) { return; } - const typeNode = inferNodeType(func); + const { typeNode } = inferNodeType(func); addTypesToParametersArray(func.parameters); if (typeNode) { changeTracker.tryInsertTypeAnnotation( @@ -515,7 +529,7 @@ function withChanges( // if (heritageExpression.kind !== SyntaxKind.ExpressionWithTypeArguments) { // throw new Error(`Hey + ${heritageExpression.kind}`); // } - const heritageTypeNode = inferNodeType(heritageExpression.expression); + const { typeNode: heritageTypeNode } = inferNodeType(heritageExpression.expression); if (!heritageTypeNode) { return undefined; } @@ -642,7 +656,7 @@ function withChanges( addObjectBindingPatterns(name, bindingElements, bindingElement); } else { - const typeNode = inferNodeType(name); + const { typeNode } = inferNodeType(name); let variableInitializer = createChainedExpression(bindingElement, expressionToVar); if (bindingElement.element!.initializer) { const propertyName = bindingElement.element?.propertyName; @@ -781,17 +795,23 @@ function withChanges( } return chainedExpression; } - - function inferNodeType(node: Node) { + 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 undefined; + return emptyInferenceResult; } const flags = isVariableDeclaration(node) && type.flags & TypeFlags.UniqueESSymbol ? NodeBuilderFlags.AllowUniqueESSymbolType : NodeBuilderFlags.None; - return typeToTypeNode(type, findAncestor(node, isDeclaration) ?? sourceFile, flags); + return { + typeNode: typeToTypeNode(type, findAncestor(node, isDeclaration) ?? sourceFile, flags), + mutatedTarget: false, + }; } else { return relativeType(node); @@ -800,14 +820,14 @@ function withChanges( function createTypeOfFromEntityNameExpression(node: EntityNameExpression) { // Convert EntityNameExpression to EntityName ? - return factory.createTypeQueryNode(node as EntityName); + return factory.createTypeQueryNode(getSynthesizedDeepClone(node) as EntityName); } function typeFromArraySpreadElements( node: ArrayLiteralExpression, name = "temp", ) { const isConstContext = !!findAncestor(node, isConstAssertion); - if (!isConstContext) return undefined; + if (!isConstContext) return emptyInferenceResult; return typeFromSpreads( node, name, @@ -845,7 +865,7 @@ function withChanges( createSpread: (node: Expression) => TSpread, makeNodeOfKind: (newElements: (TSpread | TElements)[]) => T, finalType: (types: TypeNode[]) => TypeNode, - ) { + ): InferenceResult { const intersectionTypes: TypeNode[] = []; const newSpreads: TSpread[] = []; let currentVariableProperties: TElements[] | undefined; @@ -866,11 +886,14 @@ function withChanges( } } if (newSpreads.length === 0) { - return undefined; + return emptyInferenceResult; } finalizesVariablePart(); changeTracker.replaceNode(sourceFile, node, makeNodeOfKind(newSpreads)); - return finalType(intersectionTypes); + return { + typeNode: finalType(intersectionTypes), + mutatedTarget: true, + }; function makeVariable(expression: Expression) { const tempName = factory.createUniqueName( name + "_Part" + (newSpreads.length + 1), @@ -909,9 +932,12 @@ function withChanges( return (isAssertionExpression(location) && isConstTypeReference(location.type)); } - function relativeType(node: Node): TypeNode | undefined { + function relativeType(node: Node): InferenceResult { if (isEntityNameExpression(node)) { - return createTypeOfFromEntityNameExpression(node); + return { + typeNode: createTypeOfFromEntityNameExpression(node), + mutatedTarget: false, + }; } if (isConstAssertion(node)) { return relativeType(node.expression); @@ -933,14 +959,17 @@ function withChanges( return relativeType(node.initializer); } if (isConditionalExpression(node)) { - const trueType = relativeType(node.whenTrue); - if (!trueType) return; - const falseType = relativeType(node.whenFalse); - if (!falseType) return; - return factory.createUnionTypeNode([trueType, falseType]); + 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 undefined; + return emptyInferenceResult; } function typeToTypeNode(type: Type, enclosingDeclaration: Node, flags = NodeBuilderFlags.None) { @@ -962,7 +991,7 @@ function withChanges( function addTypeAnnotation(decl: ParameterDeclaration | VariableDeclaration | PropertyDeclaration): undefined | DiagnosticOrDiagnosticAndArguments { if (decl.type) return undefined; - const typeNode = inferNodeType(decl); + const { typeNode } = inferNodeType(decl); if (typeNode) { changeTracker.tryInsertTypeAnnotation(getSourceFileOfNode(decl), decl, typeNode); return [Diagnostics.Add_annotation_of_type_0, printTypeNode(typeNode)]; diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports45-no-enum-members.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports45-no-enum-members.ts new file mode 100644 index 0000000000000..49451416c9195 --- /dev/null +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports45-no-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 From 57d243a72dfd799d5beb80fe61488ca5cbe969c0 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 4 Oct 2023 13:53:17 +0100 Subject: [PATCH 088/224] Improve inline assertions Signed-off-by: Titian Cernicova-Dragomir --- .../fixMissingTypeAnnotationOnExports.ts | 41 ++++++++++++------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 747d43d019d80..fbc0fec29004a 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -260,29 +260,40 @@ function withChanges( const { typeNode, mutatedTarget } = inferNodeType(targetNode); if (!typeNode || mutatedTarget) return undefined; - let replacementNode: Node; - let replacementTarget: Node; if (isShorthandPropertyAssignmentTarget) { - replacementTarget = targetNode.parent; - replacementNode = factory.createPropertyAssignment( - targetNode, + changeTracker.insertNodeAt( + sourceFile, + targetNode.end, createAsExpression( getSynthesizedDeepClone(targetNode), typeNode, ), - ); - changeTracker.replaceNode( - sourceFile, - replacementTarget, - replacementNode, + { + prefix: ": ", + }, ); } else if (isExpressionTarget) { - replacementTarget = targetNode; - replacementNode = createAsExpression( - getSynthesizedDeepClone(targetNode), - typeNode, - ); + 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); From 0dfdee197865b97fc440b1d9466b6121b72a365e Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 5 Oct 2023 14:38:27 +0100 Subject: [PATCH 089/224] Removed fixed tests. Signed-off-by: Titian Cernicova-Dragomir --- external-declarations/fixed-tests.jsonc | 91 +++++-------------------- 1 file changed, 18 insertions(+), 73 deletions(-) diff --git a/external-declarations/fixed-tests.jsonc b/external-declarations/fixed-tests.jsonc index 61e7e62177606..1f0def95d1af8 100644 --- a/external-declarations/fixed-tests.jsonc +++ b/external-declarations/fixed-tests.jsonc @@ -29,80 +29,28 @@ "templateLiteralTypes4", ], "code-fixer-issues" : [ - // Only one fix is applied per line, fix need to be applied to both another issue (params, default exports) and return type - "ambiguousGenericAssertion1", - "arrowFunctionWithObjectLiteralBody1", - "arrowFunctionWithObjectLiteralBody2", - "arrowFunctionWithObjectLiteralBody3", - "arrowFunctionWithObjectLiteralBody4", - "commentsAfterFunctionExpression1", - "fatarrowfunctions", - "genericTypeAssertions3", - "taggedTemplateStringsWithCurriedFunction", - "unusedParametersWithUnderscore", - "arrowFunctionWithParameterNameAsync_es2017", - "arrowFunctionWithParameterNameAsync_es5", - "arrowFunctionWithParameterNameAsync_es6", - "importCallExpressionInExportEqualsAMD", - "importCallExpressionInExportEqualsCJS", - "importCallExpressionInExportEqualsUMD", - "declarationEmitMixinPrivateProtected", - "disallowLineTerminatorBeforeArrow", - "emitArrowFunctionAsIs", - "emitArrowFunctionAsIsES6", - "emitArrowFunctionsAsIs", - "emitArrowFunctionsAsIsES6", - "declarationEmitObjectAssignedDefaultExport", - "templateStringInArrowFunction", - "templateStringInArrowFunctionES6", - "exportAssignDottedName", - "exportAssignNonIdentifier", - // return type missing "arrayFakeFlatNoCrashInferenceDeclarations", - "mixingApparentTypeOverrides", - "noCrashOnMixin", - "overrideBaseIntersectionMethod", - "unusedFunctionsinNamespaces6", - "mixinAbstractClasses", - "mixinAbstractClassesReturnTypeInference", - "mixinAccessModifiers", - "override1", - "override19", - "declarationFiles", - // Crash on export = in language service. Test not fixed "commonJsImportClassExpression", "constEnumNamespaceReferenceCausesNoImport2", - "declarationEmitInferredDefaultExportType2", + "declarationEmitCommonJsModuleReferencedType", + "declarationEmitObjectAssignedDefaultExport", + "declarationEmitPrivatePromiseLikeInterface", + "doubleMixinConditionalTypeBaseClassWorks", "exportAssignmentWithoutIdentifier1", "exportEqualsProperty", "exportEqualsProperty2", - "namedEvaluation", - "thisInInvalidContextsExternalModule", - "reexportClassDefinition", - "esDecorators-classExpression-namedEvaluation.9", - // Members return types are not fixed - "declarationEmitClassMemberWithComputedPropertyName", - "declarationEmitLocalClassDeclarationMixin", - "thisInPropertyBoundDeclarations", - "thisIndexOnExistingReadonlyFieldIsNotNever", - // Constant is not fixed - "declarationEmitCommonJsModuleReferencedType", - // Mixin not fixed. Not sure we can fix them - "mixinPrivateAndProtected", - "doubleMixinConditionalTypeBaseClassWorks", - "emitClassExpressionInDeclarationFile2", - // any, non initialized variable is not fixed "moduleAugmentationDisallowedExtensions", "moduleAugmentationNoNewNames", - // ? + "overrideBaseIntersectionMethod", + "thisInPropertyBoundDeclarations", + "esDecorators-classExpression-namedEvaluation.9", + "thisInInvalidContextsExternalModule", + "exportAssignDottedName", + "exportAssignNonIdentifier", + "reexportClassDefinition", "parserEqualsGreaterThanAfterFunction1", - "declarationEmitPrivatePromiseLikeInterface", - // Parser errors "parserSkippedTokens16", - // Symbol const not annotated - "declarationEmitPrivateNameCausesError", - // Crashes - "parseInvalidNonNullableTypes" + "declarationFiles", ], "not-fixed-with-unreliable-errors": [ // Language service crash on computing diagnostic (call stack size exceeded) @@ -200,6 +148,11 @@ "computedPropertyNames12_ES6", "computedPropertyNames13_ES5", "computedPropertyNames13_ES6", + "computedPropertyNames16_ES5", + "computedPropertyNames16_ES6", + "computedPropertyNames2_ES5", + "computedPropertyNames2_ES6", + "computedPropertyNamesWithStaticProperty", "declarationEmitMappedTypeTemplateTypeofSymbol", "declarationEmitReadonlyComputedProperty", "ES5For-ofTypeCheck10", @@ -269,7 +222,7 @@ // Needs TS Fix // Reported as https://github.com/microsoft/TypeScript/issues/55654 // Fix available - "ts-bug/binding-patterns": [ + "ts-bugs/binding-patterns": [ "declarationsAndAssignments", "excessPropertyCheckWithSpread", "destructuringParameterDeclaration1ES5", @@ -294,11 +247,8 @@ "correlatedUnions", "declarationEmitNoNonRequiredParens", "declarationEmitShadowingInferNotRenamed", - "declarationEmitTupleRestSignatureLeadingVariadic", - "es5SetterparameterDestructuringNotElided", "hugeDeclarationOutputGetsTruncatedWithError", "inKeywordAndIntersection", - "mapConstructor", "mappedTypeInferenceAliasSubstitution", "mappedTypeWithAsClauseAndLateBoundProperty2", "parseArrowFunctionWithFunctionReturnType", @@ -311,8 +261,6 @@ "conditionalTypes1", "stringLiteralsWithTypeAssertions01", "castingTuple", - "emptyTuplesTypeAssertion01", - "emptyTuplesTypeAssertion02", "namedTupleMembers", "optionalMethods", "optionalParameterProperty", @@ -346,12 +294,9 @@ "declarationEmitWithDefaultAsComputedName2", "declarationEmitWithDefaultAsComputedName", "declarationEmitComputedNameConstEnumAlias", - "capturedParametersInInitializers1", "declarationEmitPropertyNumericStringKey", "templateLiteralsSourceMap", // template literal is evaluated in constant value. "nodeModulesImportTypeModeDeclarationEmit1", // resolution-mode in assert from type assertion is preserved - "declarationEmitPrefersPathKindBasedOnBundling2", // Import path has .. in it. A similar type written by hand would not. - "computedPropertiesNarrowed", ], } } From 9b2fb2686d2c6f97a3248a956dd683d00c11d99b Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 9 Oct 2023 13:30:51 +0100 Subject: [PATCH 090/224] Do not print typeof x for static readonly fields. Signed-off-by: Titian Cernicova-Dragomir --- .../fixMissingTypeAnnotationOnExports.ts | 7 ++++++- ...OnExports46-static-readonly-class-symbol.ts | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports46-static-readonly-class-symbol.ts diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index fbc0fec29004a..f53f368df7d70 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -29,6 +29,7 @@ import { getSynthesizedDeepClone, getTokenAtPosition, getTrailingCommentRanges, + hasStaticModifier, hasSyntacticModifier, Identifier, isArrayBindingPattern, @@ -818,7 +819,11 @@ function withChanges( if (!type) { return emptyInferenceResult; } - const flags = isVariableDeclaration(node) && type.flags & TypeFlags.UniqueESSymbol ? NodeBuilderFlags.AllowUniqueESSymbolType : NodeBuilderFlags.None; + 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, 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 From 363e9d10c950eb1e526c1f5102aa1e0371b66d28 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 9 Oct 2023 16:48:18 +0100 Subject: [PATCH 091/224] Fix code review issues. Signed-off-by: Titian Cernicova-Dragomir --- .../src/code-mod/tsc-test-fixer/test-fixer.ts | 10 ++++---- .../src/test-runner/utils.ts | 25 +++++++------------ .../fixMissingTypeAnnotationOnExports.ts | 4 --- src/services/services.ts | 2 +- ...onOnExports45-no-computed-enum-members.ts} | 0 5 files changed, 15 insertions(+), 26 deletions(-) rename tests/cases/fourslash/{codeFixMissingTypeAnnotationOnExports45-no-enum-members.ts => codeFixMissingTypeAnnotationOnExports45-no-computed-enum-members.ts} (100%) diff --git a/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts b/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts index 39dc9eb6a5967..526f6de8af670 100644 --- a/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts +++ b/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts @@ -34,7 +34,7 @@ export async function fixTestCase(caseData: TestCaseWithBOM, settings: ts.Compil const toBeCompiled = caseData.testUnitData.map(unit => { return createHarnessTestFile(unit); }); - + try { return await fixTestFiles(toBeCompiled, settings); } @@ -43,7 +43,7 @@ export async function fixTestCase(caseData: TestCaseWithBOM, settings: ts.Compil } } -export async function fixTestFiles(toBeCompiled: TestFile[], settings: ts.CompilerOptions) { +async function fixTestFiles(toBeCompiled: TestFile[], settings: ts.CompilerOptions) { const { fs, options, programFileNames } = prepareTestOptionsAndFs( toBeCompiled, [], @@ -56,14 +56,14 @@ export async function fixTestFiles(toBeCompiled: TestFile[], settings: ts.Compil /**currentDirectory=*/ undefined, ); const host = new fake.CompilerHost(fs, options); - + const snapShotRegistry = createSnapshotRegistry(host); const langHost = createLanguageHost(snapShotRegistry, { fileNames: programFileNames, options, errors: [], }, host); - + await fixProjectRaw( langHost, /*documentRegistry*/ undefined, @@ -71,7 +71,7 @@ export async function fixTestFiles(toBeCompiled: TestFile[], settings: ts.Compil isolatedDeclarationsErrors, async () => 0, ); - + return toBeCompiled.map(unit => ({ ...unit, content: fs.readFileSync(unit.unitName, "utf-8"), diff --git a/external-declarations/src/test-runner/utils.ts b/external-declarations/src/test-runner/utils.ts index 2c51087351ec1..2e161a86e17ba 100644 --- a/external-declarations/src/test-runner/utils.ts +++ b/external-declarations/src/test-runner/utils.ts @@ -1,5 +1,5 @@ import * as fsp from "fs/promises"; -import * as JSON from 'json5'; +import * as JSON from "json5"; import * as path from "path"; import * as ts from "typescript"; import { @@ -69,19 +69,12 @@ export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings .filter(isRelevantTestFile) .flatMap(file => { const declarationFile = changeExtension(file.name, getDeclarationExtension(file.name)); - // const declarationMapFile = declarationFile + ".map"; const resolvedDeclarationFile = vpath.resolve(result.vfs.cwd(), declarationFile); - // const resolvedDeclarationMapFile = vpath.resolve(result.vfs.cwd(), declarationMapFile); const declaration = result.dts.get(resolvedDeclarationFile); - // const declarationMap = result.maps.get(resolvedDeclarationMapFile) return [{ content: declaration?.text ?? "", fileName: declarationFile, - }// , { - // content: declarationMap?.text ?? "", - // fileName: declarationMapFile, - // } - ]; + }]; }); return { files, @@ -127,19 +120,19 @@ export function runIsolated(caseData: TestCaseParser.TestCaseContent, libFiles: return { files, diagnostics }; } - -export async function readDirRecursive (dir: string, relativePath = ""): Promise { +export async function readDirRecursive(dir: string, relativePath = ""): Promise { const content = await fsp.readdir(dir); const result: string[] = []; for (const entry of content) { const relativeChildPath = path.join(relativePath, entry); - const fsPath = path.join(dir, entry) + const fsPath = path.join(dir, entry); const stat = await fsp.stat(fsPath); - if(stat.isDirectory()) { - result.push(...await readDirRecursive(fsPath, relativeChildPath)) - } else { + if (stat.isDirectory()) { + result.push(...await readDirRecursive(fsPath, relativeChildPath)); + } + else { result.push(relativeChildPath); } } return result; -} \ No newline at end of file +} diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index f53f368df7d70..685fd63162bff 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -478,7 +478,6 @@ function withChanges( case SyntaxKind.FunctionDeclaration: case SyntaxKind.MethodDeclaration: case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: return addTypeToFunctionLikeDeclaration(node as SignatureDeclaration, sourceFile); case SyntaxKind.ExportAssignment: const defaultExport = node as ExportAssignment; @@ -538,9 +537,6 @@ function withChanges( if (!heritageExpression) { return undefined; } - // if (heritageExpression.kind !== SyntaxKind.ExpressionWithTypeArguments) { - // throw new Error(`Hey + ${heritageExpression.kind}`); - // } const { typeNode: heritageTypeNode } = inferNodeType(heritageExpression.expression); if (!heritageTypeNode) { return undefined; diff --git a/src/services/services.ts b/src/services/services.ts index 60a9f74ea3e40..c3265f33804f7 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -510,7 +510,7 @@ function addSyntheticNodes(nodes: Node[], pos: number, end: number, parent: Node if (hasTabstop(parent)) { continue; } - // Not sure why this is here. When I try to make text change that contains only a property assigment this kicks in + // TODO: Not sure why this is here. When I try to make text change that contains only a property assigment this kicks in // Ex: x: x // Debug.fail(`Did not expect ${Debug.formatSyntaxKind(parent.kind)} to have an Identifier in its trivia`); } diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports45-no-enum-members.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports45-no-computed-enum-members.ts similarity index 100% rename from tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports45-no-enum-members.ts rename to tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports45-no-computed-enum-members.ts From 430bedc3f0dddbb284e58d46ff7d5fa5b93b0c56 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 10 Oct 2023 10:31:50 +0100 Subject: [PATCH 092/224] Fixed diagnostic message typo. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/diagnosticMessages.json | 2 +- src/services/codefixes/fixMissingTypeAnnotationOnExports.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 2deb7cb11ef45..ba0516545d161 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -7012,7 +7012,7 @@ "category": "Message", "code": 90066 }, - "Add all missing tye annotations": { + "Add all missing type annotations": { "category": "Message", "code": 90067 }, diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 685fd63162bff..14dde8f2e4342 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -29,7 +29,6 @@ import { getSynthesizedDeepClone, getTokenAtPosition, getTrailingCommentRanges, - hasStaticModifier, hasSyntacticModifier, Identifier, isArrayBindingPattern, @@ -170,7 +169,7 @@ function addCodeAction( changes.textChanges, changes.result, fixId, - Diagnostics.Add_all_missing_tye_annotations, + Diagnostics.Add_all_missing_type_annotations, ); if (!fixes.find(f => f.description === newFix.description)) fixes.push(newFix); } From 1f85796bde57f58e0116d39e244345f807a44ed1 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 9 Oct 2023 16:18:18 +0100 Subject: [PATCH 093/224] Reintegrate DTE Signed-off-by: Titian Cernicova-Dragomir --- external-declarations/fixed-tests.jsonc | 9 + external-declarations/package.json | 8 +- .../src/compiler/emit-host.ts | 76 --- .../src/compiler/lang-utils.ts | 75 --- .../src/compiler/transform-file.ts | 55 -- .../src/compiler/transform-project.ts | 76 ++- external-declarations/src/compiler/types.ts | 185 ++---- external-declarations/src/compiler/utils.ts | 620 +----------------- .../src/test-runner/cli-arg-config.ts | 5 +- .../src/test-runner/parallel-run.ts | 4 +- .../src/test-runner/test-runner-main.ts | 21 +- .../src/test-runner/utils.ts | 15 +- src/compiler/_namespaces/ts.ts | 4 + src/compiler/checker.ts | 124 +--- .../transformers/declarations}/emit-binder.ts | 513 ++++++--------- .../transformers/declarations/emit-host.ts | 94 +++ .../declarations}/emit-resolver.ts | 227 ++----- .../transformers/declarations}/evaluator.ts | 18 +- .../transformers/declarations/types.ts | 61 ++ .../transformers/declarations/utils.ts | 85 +++ src/compiler/types.ts | 1 - src/compiler/utilities.ts | 121 +++- 22 files changed, 756 insertions(+), 1641 deletions(-) delete mode 100644 external-declarations/src/compiler/emit-host.ts delete mode 100644 external-declarations/src/compiler/transform-file.ts rename {external-declarations/src/compiler => src/compiler/transformers/declarations}/emit-binder.ts (52%) create mode 100644 src/compiler/transformers/declarations/emit-host.ts rename {external-declarations/src/compiler => src/compiler/transformers/declarations}/emit-resolver.ts (76%) rename {external-declarations/src/compiler => src/compiler/transformers/declarations}/evaluator.ts (88%) create mode 100644 src/compiler/transformers/declarations/types.ts create mode 100644 src/compiler/transformers/declarations/utils.ts diff --git a/external-declarations/fixed-tests.jsonc b/external-declarations/fixed-tests.jsonc index 1f0def95d1af8..f5d06f728ab74 100644 --- a/external-declarations/fixed-tests.jsonc +++ b/external-declarations/fixed-tests.jsonc @@ -64,6 +64,7 @@ "with-unreliable-errors": [ "thisTypeErrors", // Assertion to this in static context produces this in DTE and any in TSC "parseInvalidNonNullableTypes", // Prefix ! operator + "thisInConstructorParameter2", // this type used in invalid context "parseInvalidNullableTypes", // Prefix ? operator "ArrowFunction1", // Missing type annotation syntax error "parserX_ArrowFunction1", // Missing type annotation syntax error @@ -85,6 +86,7 @@ "augmentedTypesVar", "objectLiteralErrors", "duplicateObjectLiteralProperty_computedName2", + "arrowFunctionExpressions", "castingTuple", // contains both duplicate variables and print differences. // Identifier expected. "FunctionPropertyAssignments2_es6", @@ -106,12 +108,14 @@ "computedPropertyNames17_ES6", "parserES5ComputedPropertyName5", "parserIndexSignature5", + "parserIndexSignature11", "parserES5SymbolProperty1", "parserES5SymbolProperty2", "parserComputedPropertyName20", "parserComputedPropertyName21", "typeUsedAsTypeLiteralIndex", "parser.asyncGenerators.classMethods.es2018", + "decoratorsOnComputedProperties", // Invalid escape sequences "invalidTaggedTemplateEscapeSequences", "objectTypeWithStringNamedPropertyOfIllegalCharacters", @@ -123,6 +127,7 @@ "classExtendingNonConstructor", // Not reported as isolated declaration error, but the extends clause is invalid. "nodeModulesImportTypeModeDeclarationEmitErrors1", // Invalid import asserts "wellKnownSymbolExpando", // Expando function with well known symbols error in TS, but generate the expando function namepsace, DTE does not. + "genericsWithDuplicateTypeParameters1", // Duplicate type parameters ], "with-isolated-declaration-errors/9008": [ "declarationEmitHasTypesRefOnNamespaceUse", @@ -174,6 +179,7 @@ "parserComputedPropertyName19", "parserComputedPropertyName22", "parserComputedPropertyName23", + "parserComputedPropertyName24", "parserComputedPropertyName25", "parserComputedPropertyName27", "parserComputedPropertyName28", @@ -214,6 +220,7 @@ "objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts", "objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames", "objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts", + "typeAssertionToGenericFunctionType", // Default type parameters is written in declarations "conditionalTypesSimplifyWhenTrivial", // https://github.com/microsoft/TypeScript/issues/55571 @@ -237,6 +244,7 @@ "renamingDestructuredPropertyInFunctionType", "restParameterWithBindingPattern3", "destructuringInFunctionType", + "contextuallyTypedBindingInitializerNegative" ], // Just Printing differences "print-differences": [ @@ -297,6 +305,7 @@ "declarationEmitPropertyNumericStringKey", "templateLiteralsSourceMap", // template literal is evaluated in constant value. "nodeModulesImportTypeModeDeclarationEmit1", // resolution-mode in assert from type assertion is preserved + "literalTypesAndTypeAssertions", // (0 | 1) written in code is preserved by dte ], } } diff --git a/external-declarations/package.json b/external-declarations/package.json index 2d5cfa6218351..6b18e1fe3bf1b 100644 --- a/external-declarations/package.json +++ b/external-declarations/package.json @@ -6,12 +6,12 @@ "scripts": { "build": "node ../built/local/tsc.js -p ./src", "watch": "node ../built/local/tsc.js -w -p ./src", - "run-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=../tests/cases --libPath=../tests/lib --type=all --shardCount=8 --forceIsolatedDeclarations", - "run-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=c:/dev/TSC/TypeScript/tests/cases ", + "run-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=../tests/cases --libPath=../tests/lib --type=all --shardCount=8 --forceIsolatedDeclarations --outputPath=./tsc-tests/$original --configFile=./original-tests.jsonc", + "run-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=../tests/cases --outputPath=./tsc-tests/$original --configFile=./original-tests.jsonc", "transform-tests-parallel": "node ./build/code-mod/tsc-test-fixer/run-test-updater-parallel.js --rootPaths=../tests/cases --shardCount=8", "transform-tests": "node ./build/code-mod/tsc-test-fixer/run-test-updater.js --rootPaths=../tests/cases", - "run-transformed-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=./tsc-tests/updated-tests --libPath=../tests/lib --type=all --shardCount=8", - "run-transformed-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=c:/dev/TSC/TypeScript/tests/cases ", + "run-transformed-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=./tsc-tests/updated-tests --libPath=../tests/lib --type=all --shardCount=8 --outputPath=./tsc-tests/$transformed --configFile=./fixed-tests.jsonc", + "run-transformed-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=./tsc-tests/updated-tests --libPath=../tests/lib --outputPath=./tsc-tests/$transformed --configFile=./fixed-tests.jsonc", "fixer-tests": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source ", "fixer-tests-update": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source --update " }, diff --git a/external-declarations/src/compiler/emit-host.ts b/external-declarations/src/compiler/emit-host.ts deleted file mode 100644 index 48480bfdfb56a..0000000000000 --- a/external-declarations/src/compiler/emit-host.ts +++ /dev/null @@ -1,76 +0,0 @@ - -import * as ts from "typescript"; - -import { changeExtension } from "../test-runner/tsc-infrastructure/vpath"; -import { getDeclarationExtension, getDirectoryPath, getRelativePathFromDirectory, hasExtension, isDeclarationFile, isJavaScriptFile, resolvePath } from "./path-utils"; -import { IsolatedEmitHost } from "./types"; -import { getNodeId } from "./utils"; - -export function createEmitHost(allProjectFiles: string[], tsLibFiles: string[], options: ts.CompilerOptions): IsolatedEmitHost { - const getCompilerOptions = () => options; - const getCurrentDirectory = () => "."; - const getCommonSourceDirectory = () => "."; - const getCanonicalFileName = (f: string) => `./${f}`; - const projectFileMap = new Map(allProjectFiles - .map((f) => ({ kind: ts.SyntaxKind.SourceFile, fileName: f } as ts.SourceFile)) - .map(f => [f.fileName, getNodeId(f)]) - ); - const tsLibFileSet = new Set(tsLibFiles); - - return { - redirectTargetsMap: new Map(), - getSourceFiles() { - throw new Error("Not needed"); - }, - getCompilerOptions, - getCurrentDirectory, - getCommonSourceDirectory, - getCanonicalFileName, - getLibFileFromReference(ref) { - if(options.noLib) { - return undefined; - } - if(!tsLibFileSet.has(ref.fileName)) { - return; - } - return { - fileName: ref.fileName, - } as ts.SourceFile; - }, - getSourceFileFromReference(referencingFile, ref) { - if(ref.fileName.startsWith("node_modules/") || ref.fileName.indexOf("/node_modules/") !== -1) { - return undefined; - } - if(isJavaScriptFile(ref.fileName) && !options.allowJs) { - return undefined; - } - let resolvedFile: string | undefined = resolvePath(getDirectoryPath(referencingFile.fileName), ref.fileName); - let resolvedFileId = projectFileMap.get(resolvedFile); - if(!hasExtension(resolvedFile) && resolvedFileId === undefined) { - [resolvedFile, resolvedFileId] = Object.values(ts.Extension) - .map(e => resolvedFile + e) - .map(f => [f, projectFileMap.get(f)] as const) - .find(([_, id]) => id !== undefined) ?? []; - - if(!resolvedFile) return undefined; - } - if(!projectFileMap.has(resolvedFile)) { - return undefined; - } - const resolvedDeclarationFile = - isDeclarationFile(resolvedFile) ? resolvedFile : - changeExtension(resolvedFile, getDeclarationExtension(resolvedFile)); - return { - fileName: getRelativePathFromDirectory( - getDirectoryPath(referencingFile.fileName), - resolvedDeclarationFile, - /*ignoreCase*/ false - ), - id: resolvedFileId!, - } as any as ts.SourceFile; - }, - isSourceOfProjectReferenceRedirect(fileName) { - return false; - }, - }; -} diff --git a/external-declarations/src/compiler/lang-utils.ts b/external-declarations/src/compiler/lang-utils.ts index ac367f888372a..68f9f7d1e93d3 100644 --- a/external-declarations/src/compiler/lang-utils.ts +++ b/external-declarations/src/compiler/lang-utils.ts @@ -23,23 +23,6 @@ export function forEach(array: readonly T[] | undefined, callback: (elemen } - -/** @internal */ -export function concatenate(array1: T[], array2: T[]): T[]; -/** @internal */ -export function concatenate(array1: readonly T[], array2: readonly T[]): readonly T[]; -/** @internal */ -export function concatenate(array1: T[] | undefined, array2: T[] | undefined): T[]; -/** @internal */ -export function concatenate(array1: readonly T[] | undefined, array2: readonly T[] | undefined): readonly T[]; -/** @internal */ -export function concatenate(array1: undefined | readonly T[], array2: undefined | readonly T[]): undefined | T[] | readonly T[] { - if (!some(array2)) return array1; - if (!some(array1)) return array2; - return [...array1, ...array2]; -} - - /** @internal */ export function some(array: readonly T[] | undefined): array is readonly T[]; /** @internal */ @@ -68,49 +51,6 @@ export function stringContains(str: string, substring: string): boolean { } -/** - * Filters an array by a predicate function. Returns the same array instance if the predicate is - * true for all elements, otherwise returns a new array instance containing the filtered subset. - * - * @internal - */ - export function filter(array: T[], f: (x: T) => x is U): U[]; - /** @internal */ - export function filter(array: T[], f: (x: T) => boolean): T[]; - /** @internal */ - export function filter(array: readonly T[], f: (x: T) => x is U): readonly U[]; - /** @internal */ - export function filter(array: readonly T[], f: (x: T) => boolean): readonly T[]; - /** @internal */ - export function filter(array: T[] | undefined, f: (x: T) => x is U): U[] | undefined; - /** @internal */ - export function filter(array: T[] | undefined, f: (x: T) => boolean): T[] | undefined; - /** @internal */ - export function filter(array: readonly T[] | undefined, f: (x: T) => x is U): readonly U[] | undefined; - /** @internal */ - export function filter(array: readonly T[] | undefined, f: (x: T) => boolean): readonly T[] | undefined; - /** @internal */ - export function filter(array: readonly T[] | undefined, f: (x: T) => boolean): readonly T[] | undefined { - if (array) { - const len = array.length; - let i = 0; - while (i < len && f(array[i])) i++; - if (i < len) { - const result = array.slice(0, i); - i++; - while (i < len) { - const item = array[i]; - if (f(item)) { - result.push(item); - } - i++; - } - return result; - } - } - return array; - } - /** * @return Whether the value was added. * @@ -831,21 +771,6 @@ export function reduceLeft(array: T[], f: (memo: T, value: T, i: number) => T export const trimString = (s: string) => s.trim(); -/** - * Unlike `pushIfUnique`, this can take `undefined` as an input, and returns a new array. - * - * @internal - */ - export function appendIfUnique(array: T[] | undefined, toAdd: T, equalityComparer?: EqualityComparer): T[] { - if (array) { - pushIfUnique(array, toAdd, equalityComparer); - return array; - } - else { - return [toAdd]; - } -} - export function isNullOrUndefined(x: any): x is null | undefined { return x === undefined || x === null; // eslint-disable-line no-null/no-null } diff --git a/external-declarations/src/compiler/transform-file.ts b/external-declarations/src/compiler/transform-file.ts deleted file mode 100644 index 57a61eada1f1c..0000000000000 --- a/external-declarations/src/compiler/transform-file.ts +++ /dev/null @@ -1,55 +0,0 @@ - -import * as ts from "typescript"; -import { SourceFile } from "typescript"; - -import { Utils } from "../test-runner/tsc-infrastructure/compiler-run"; -import { createEmitHost } from "./emit-host"; -import { createEmitResolver } from "./emit-resolver"; -import { tracer } from "./perf-tracer"; -import { TransformationContext } from "./types"; - -const transformDeclarations: (context: TransformationContext) => (node: SourceFile) => SourceFile = (ts as any).transformDeclarations; - -export function transformFile(sourceFile: ts.SourceFile, allProjectFiles: string[], tsLibFiles: string[], options: ts.CompilerOptions, moduleType: ts.ResolutionMode) { - - const getCompilerOptions = () => options; - tracer.current?.start("bind"); - const emitResolver = createEmitResolver(sourceFile, options, moduleType); - const emitHost = createEmitHost(allProjectFiles, tsLibFiles, options); - tracer.current?.end("bind"); - const diagnostics: ts.Diagnostic[] = []; - const x = transformDeclarations({ - getEmitHost() { - return emitHost; - }, - getEmitResolver() { - return emitResolver; - }, - getCompilerOptions, - factory: ts.factory, - addDiagnostic(diag) { - diagnostics.push(diag); - }, - } as Partial as TransformationContext); - tracer.current?.start("transform"); - const result = x(sourceFile); - tracer.current?.end("transform"); - - tracer.current?.start("print"); - const printer = ts.createPrinter({ - onlyPrintJsDocStyle: true, - newLine: options.newLine ?? ts.NewLineKind.CarriageReturnLineFeed, - target: options.target, - } as ts.PrinterOptions); - - try { - const code = printer.printFile(result); - return { - code: options.emitBOM ? Utils.addUTF8ByteOrderMark(code): code, - diagnostics, - }; - } - finally { - tracer.current?.end("print"); - } -} diff --git a/external-declarations/src/compiler/transform-project.ts b/external-declarations/src/compiler/transform-project.ts index 929d74c510030..3b71b07db31ea 100644 --- a/external-declarations/src/compiler/transform-project.ts +++ b/external-declarations/src/compiler/transform-project.ts @@ -1,29 +1,26 @@ import * as path from "path"; import * as ts from "typescript"; -import { changeAnyExtension,normalizePath } from "./path-utils"; -import { tracer } from "./perf-tracer"; -import { transformFile } from "./transform-file"; - - +import { Utils } from "../test-runner/tsc-infrastructure/compiler-run"; +import { + changeAnyExtension, + normalizePath, +} from "./path-utils"; export function transformProject( projectPath: string, files: string[] | undefined, options: ts.CompilerOptions, - host: ts.CompilerHost + host: ts.CompilerHost, ) { - tracer.current?.start("readFiles"); const rootDir = options.rootDir ? normalizePath(path.resolve(path.join(projectPath, options.rootDir))) : normalizePath(projectPath); files ??= host.readDirectory!(rootDir, [".ts", ".tsx"], ["**/*.d.ts"], []); - tracer.current?.end("readFiles"); - transformProjectFiles(rootDir, files, host, options); + emitDeclarationsForAllFiles(rootDir, files, host, options); return rootDir; } - function ensureDirRecursive(dirPath: string, host: ts.CompilerHost) { - if(!host.directoryExists!(dirPath)) { + if (!host.directoryExists!(dirPath)) { const parent = path.dirname(dirPath); ensureDirRecursive(parent, host); (host as any).createDirectory(dirPath); @@ -33,35 +30,29 @@ function joinToRootIfNeeded(rootDir: string, existingPath: string) { return normalizePath(path.isAbsolute(existingPath) ? existingPath : path.resolve(path.join(rootDir, existingPath))); } -export function projectFilesTransformer(rootDir: string, options: ts.CompilerOptions) { - const declarationDir = - options.declarationDir? joinToRootIfNeeded(rootDir, options.declarationDir) : - options.outDir? joinToRootIfNeeded(rootDir,options.outDir) : +export function createIsolatedDeclarationsEmitter(rootDir: string, options: ts.CompilerOptions) { + const declarationDir = options.declarationDir ? joinToRootIfNeeded(rootDir, options.declarationDir) : + options.outDir ? joinToRootIfNeeded(rootDir, options.outDir) : undefined; rootDir = normalizePath(rootDir); return (file: string, host: ts.CompilerHost) => { file = normalizePath(file); - tracer.current?.start("parse"); const source = host.getSourceFile(file, options.target ?? ts.ScriptTarget.ES2015); - tracer.current?.end("parse"); - if(!source) return; + if (!source) return; - const actualDeclaration = transformFile(source, [], [], options, ts.ModuleKind.ESNext); - const output = - declarationDir? changeAnyExtension(file.replace(rootDir, declarationDir), ".d.ts"): + const actualDeclaration = emitDeclarationsForFile(source, [], [], options); + const output = declarationDir ? changeAnyExtension(file.replace(rootDir, declarationDir), ".d.ts") : changeAnyExtension(file, ".d.ts"); const dirPath = path.dirname(output); ensureDirRecursive(dirPath, host); - tracer.current?.start("write"); host.writeFile(output, actualDeclaration.code, /*writeByteOrderMark*/ false); - tracer.current?.end("write"); return output; }; } -export function transformProjectFiles(rootDir: string, files: string[], host: ts.CompilerHost, options: ts.CompilerOptions) { - const transformer = projectFilesTransformer(rootDir, options); +export function emitDeclarationsForAllFiles(rootDir: string, files: string[], host: ts.CompilerHost, options: ts.CompilerOptions) { + const transformer = createIsolatedDeclarationsEmitter(rootDir, options); for (const file of files) { try { transformer(file, host); @@ -72,3 +63,38 @@ export function transformProjectFiles(rootDir: string, files: string[], host: ts } return { rootDir }; } + +const transformDeclarations: (context: ts.TransformationContext) => (node: ts.SourceFile) => ts.SourceFile = (ts as any).transformDeclarations; + +export function emitDeclarationsForFile(sourceFile: ts.SourceFile, allProjectFiles: string[], tsLibFiles: string[], options: ts.CompilerOptions) { + const getCompilerOptions = () => options; + const emitHost = ts.createEmitDeclarationHost(allProjectFiles, tsLibFiles, options, ts.sys); + const emitResolver = ts.createEmitDeclarationResolver(sourceFile, emitHost); + const diagnostics: ts.Diagnostic[] = []; + const transformer = transformDeclarations({ + getEmitHost() { + return emitHost; + }, + getEmitResolver() { + return emitResolver; + }, + getCompilerOptions, + factory: ts.factory, + addDiagnostic(diag: any) { + diagnostics.push(diag); + }, + } as Partial as ts.TransformationContext); + const result = transformer(sourceFile); + + const printer = ts.createPrinter({ + onlyPrintJsDocStyle: true, + newLine: options.newLine ?? ts.NewLineKind.CarriageReturnLineFeed, + target: options.target, + } as ts.PrinterOptions); + + const code = printer.printFile(result); + return { + code: options.emitBOM ? Utils.addUTF8ByteOrderMark(code) : code, + diagnostics, + }; +} diff --git a/external-declarations/src/compiler/types.ts b/external-declarations/src/compiler/types.ts index 2699aba729bd5..80e0648a56c51 100644 --- a/external-declarations/src/compiler/types.ts +++ b/external-declarations/src/compiler/types.ts @@ -1,48 +1,29 @@ -import { AccessorDeclaration, AsExpression, BinaryExpression, ClassDeclaration, CompilerOptions, ComputedPropertyName, Declaration, DiagnosticWithLocation, ElementAccessExpression, EntityNameExpression, EntityNameOrEntityNameExpression, EnumDeclaration, EnumMember, Expression, FileReference, FunctionDeclaration, GetAccessorDeclaration, ImportDeclaration, InterfaceDeclaration, ModifierFlags, ModuleBlock, ModuleDeclaration, NamedDeclaration, Node, NonNullExpression, ParameterDeclaration, ParenthesizedExpression, PartiallyEmittedExpression, Path, PropertyAccessExpression, PropertyDeclaration, PropertySignature, ResolutionMode,SatisfiesExpression, SetAccessorDeclaration,SignatureDeclaration, SourceFile, StringLiteralLike, Symbol, SymbolFlags, TransformationContext as _TransformationContext, TypeAliasDeclaration, TypeAssertion, VariableDeclaration, VariableStatement } from "typescript"; +import { + AccessorDeclaration, + AsExpression, + BinaryExpression, + ComputedPropertyName, + ElementAccessExpression, + EntityNameExpression, + GetAccessorDeclaration, + ModifierFlags, + ModuleBlock, + ModuleDeclaration, + NamedDeclaration, + Node, + NonNullExpression, + ParenthesizedExpression, + PartiallyEmittedExpression, + Path, + SatisfiesExpression, + SetAccessorDeclaration, + SourceFile, + Symbol, + SymbolFlags, + TransformationContext as _TransformationContext, + TypeAssertion, +} from "typescript"; -import { AnyImportSyntax } from "./utils"; - - -/** @internal */ -interface ResolveModuleNameResolutionHost { - getCanonicalFileName(p: string): string; - getCommonSourceDirectory(): string; - getCurrentDirectory(): string; -} - - -export interface TransformationContext extends _TransformationContext { - addDiagnostic(diag: DiagnosticWithLocation): void; - /** @internal */ getEmitResolver(): IsolatedEmitResolver; - /** @internal */ getEmitHost(): IsolatedEmitHost; -} - -export interface IsolatedEmitHost extends ModuleSpecifierResolutionHost, ResolveModuleNameResolutionHost { - getCommonSourceDirectory(): string - getCompilerOptions(): CompilerOptions - getSourceFiles(): SourceFile[] - /** @internal */ getSourceFileFromReference(referencingFile: SourceFile, ref: FileReference): SourceFile | undefined; - /** @internal */ getLibFileFromReference(ref: FileReference): SourceFile | undefined; - isSourceOfProjectReferenceRedirect(fileName: string): boolean; -} - -export interface IsolatedEmitResolver { - 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; - getPropertiesOfContainerFunction(node: Declaration): Symbol[]; - 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; -} export interface AllAccessorDeclarations { firstAccessor: AccessorDeclaration; secondAccessor: AccessorDeclaration | undefined; @@ -50,7 +31,6 @@ export interface AllAccessorDeclarations { setAccessor: SetAccessorDeclaration | undefined; } - /** @internal */ export interface AmbientModuleDeclaration extends ModuleDeclaration { readonly body?: ModuleBlock; @@ -82,53 +62,23 @@ interface ModuleSpecifierResolutionHost { export type RedirectTargetsMap = ReadonlyMap; -/** @internal */ -export interface SymbolVisibilityResult { - accessibility: SymbolAccessibility; - aliasesToMakeVisible?: LateVisibilityPaintedStatement[]; // aliases that need to have this symbol visible - errorSymbolName?: string; // Optional symbol name that results in error - errorNode?: Node; // optional node that results in error -} - - -/** @internal */ -export const enum SymbolAccessibility { - Accessible, - NotAccessible, - CannotBeNamed -} - -/** @internal */ -export type LateVisibilityPaintedStatement = - | AnyImportSyntax - | VariableStatement - | ClassDeclaration - | FunctionDeclaration - | ModuleDeclaration - | TypeAliasDeclaration - | InterfaceDeclaration - | EnumDeclaration; - - /** @internal */ export type GetCanonicalFileName = (fileName: string) => string; - - /** @internal */ export const enum CharacterCodes { nullCharacter = 0, maxAsciiCharacter = 0x7F, - lineFeed = 0x0A, // \n - carriageReturn = 0x0D, // \r + lineFeed = 0x0A, // \n + carriageReturn = 0x0D, // \r lineSeparator = 0x2028, paragraphSeparator = 0x2029, nextLine = 0x0085, // Unicode 3.0 space characters - space = 0x0020, // " " - nonBreakingSpace = 0x00A0, // + space = 0x0020, // " " + nonBreakingSpace = 0x00A0, // enQuad = 0x2000, emQuad = 0x2001, enSpace = 0x2002, @@ -214,45 +164,44 @@ export const enum CharacterCodes { Y = 0x59, Z = 0x5a, - ampersand = 0x26, // & - asterisk = 0x2A, // * - at = 0x40, // @ - backslash = 0x5C, // \ - backtick = 0x60, // ` - bar = 0x7C, // | - caret = 0x5E, // ^ - closeBrace = 0x7D, // } - closeBracket = 0x5D, // ] - closeParen = 0x29, // ) - colon = 0x3A, // : - comma = 0x2C, // , - dot = 0x2E, // . - doubleQuote = 0x22, // " - equals = 0x3D, // = - exclamation = 0x21, // ! - greaterThan = 0x3E, // > - hash = 0x23, // # - lessThan = 0x3C, // < - minus = 0x2D, // - - openBrace = 0x7B, // { - openBracket = 0x5B, // [ - openParen = 0x28, // ( - percent = 0x25, // % - plus = 0x2B, // + - question = 0x3F, // ? - semicolon = 0x3B, // ; - singleQuote = 0x27, // ' - slash = 0x2F, // / - tilde = 0x7E, // ~ - - backspace = 0x08, // \b - formFeed = 0x0C, // \f + ampersand = 0x26, // & + asterisk = 0x2A, // * + at = 0x40, // @ + backslash = 0x5C, // \ + backtick = 0x60, // ` + bar = 0x7C, // | + caret = 0x5E, // ^ + closeBrace = 0x7D, // } + closeBracket = 0x5D, // ] + closeParen = 0x29, // ) + colon = 0x3A, // : + comma = 0x2C, // , + dot = 0x2E, // . + doubleQuote = 0x22, // " + equals = 0x3D, // = + exclamation = 0x21, // ! + greaterThan = 0x3E, // > + hash = 0x23, // # + lessThan = 0x3C, // < + minus = 0x2D, // - + openBrace = 0x7B, // { + openBracket = 0x5B, // [ + openParen = 0x28, // ( + percent = 0x25, // % + plus = 0x2B, // + + question = 0x3F, // ? + semicolon = 0x3B, // ; + singleQuote = 0x27, // ' + slash = 0x2F, // / + tilde = 0x7E, // ~ + + backspace = 0x08, // \b + formFeed = 0x0C, // \f byteOrderMark = 0xFEFF, - tab = 0x09, // \t - verticalTab = 0x0B, // \v + tab = 0x09, // \t + verticalTab = 0x0B, // \v } - /** @internal */ export interface DynamicNamedDeclaration extends NamedDeclaration { readonly name: ComputedPropertyName; @@ -263,7 +212,6 @@ export interface DynamicNamedBinaryExpression extends BinaryExpression { readonly left: ElementAccessExpression; } - /** @internal */ export interface JSDocTypeAssertion extends ParenthesizedExpression { readonly _jsDocTypeAssertionBrand: never; @@ -283,19 +231,16 @@ interface LateBoundName extends ComputedPropertyName { readonly expression: EntityNameExpression; } - export type InternalSymbol = Symbol; type InternalModifierFlags = ModifierFlags; declare module "typescript" { interface Node { symbol: InternalSymbol; original: this; - modifierFlagsCache: InternalModifierFlags + modifierFlagsCache: InternalModifierFlags; } interface Symbol { isReferenced: boolean; parent: InternalSymbol; } - } - diff --git a/external-declarations/src/compiler/utils.ts b/external-declarations/src/compiler/utils.ts index ca4fe2512f9dc..43f516318838e 100644 --- a/external-declarations/src/compiler/utils.ts +++ b/external-declarations/src/compiler/utils.ts @@ -1,356 +1,13 @@ -import { __String, BindingPattern, CallExpression, canHaveModifiers, ClassDeclaration, ClassLikeDeclaration, CompilerOptions, Declaration, DeclarationName, EntityNameOrEntityNameExpression, EnumDeclaration, Expression, ExpressionWithTypeArguments, Extension, FunctionDeclaration, FunctionLikeDeclaration, getJSDocDeprecatedTag, getJSDocOverrideTagNoCache, getJSDocPrivateTag, getJSDocProtectedTag, getJSDocPublicTag, getJSDocReadonlyTag, getJSDocTypeTag, getNameOfDeclaration, HasType, Identifier, ImportDeclaration, ImportEqualsDeclaration, ImportTypeNode, InterfaceDeclaration, isElementAccessExpression, isExpressionWithTypeArguments, isHeritageClause, isIdentifier, isModuleDeclaration, isNumericLiteral, isParameter, isParenthesizedExpression, isPrefixUnaryExpression, isPrivateIdentifier, isSourceFile, isStringLiteral, isStringLiteralLike, isVariableStatement,JSDocTemplateTag, JsxEmit, ModifierFlags, ModifierLike, ModuleDeclaration, ModuleKind, ModuleResolutionKind, NamedDeclaration, NewLineKind, Node, NodeFlags, NumericLiteral, OuterExpressionKinds, PrefixUnaryExpression, PrinterOptions, PropertyAccessEntityNameExpression, PropertyAccessExpression, QualifiedName, ScriptTarget, SignatureDeclaration, SourceFile, StringLiteralLike, SyntaxKind, sys, TsConfigSourceFile, TypeAliasDeclaration, TypeAssertion, TypeParameterDeclaration, VariableStatement } from "typescript"; -import * as ts from "typescript"; +import { __String, CompilerOptions, Extension, JsxEmit, ModuleKind, NewLineKind, Node, NodeFlags, PrinterOptions, ScriptTarget, sys, TsConfigSourceFile } from "typescript"; -import { Debug } from "./debug"; -import { clone, contains, flatten, some } from "./lang-utils"; +import { clone, flatten, some } from "./lang-utils"; import { fileExtensionIs, fileExtensionIsOneOf } from "./path-utils"; -import { AmbientModuleDeclaration, DynamicNamedBinaryExpression, DynamicNamedDeclaration, JSDocTypeAssertion, OuterExpression } from "./types"; /** @internal */ export function isInJSFile(node: Node | undefined): boolean { return !!node && !!(node.flags & NodeFlags.JavaScriptFile); } - -// Returns true if this node is missing from the actual source code. A 'missing' node is different -// from 'undefined/defined'. When a node is undefined (which can happen for optional nodes -// in the tree), it is definitely missing. However, a node may be defined, but still be -// missing. This happens whenever the parser knows it needs to parse something, but can't -// get anything in the source code that it expects at that location. For example: -// -// let a: ; -// -// Here, the Type in the Type-Annotation is not-optional (as there is a colon in the source -// code). So the parser will attempt to parse out a type, and will create an actual node. -// However, this node will be 'missing' in the sense that no actual source-code/tokens are -// contained within it. -/** @internal */ -function nodeIsMissing(node: Node | undefined): boolean { - if (node === undefined) { - return true; - } - - return node.pos === node.end && node.pos >= 0 && node.kind !== SyntaxKind.EndOfFileToken; -} - -/** @internal */ -export function nodeIsPresent(node: Node | undefined): boolean { - return !nodeIsMissing(node); -} - - - -/** @internal */ -export function hasSyntacticModifier(node: Node, flags: ModifierFlags): boolean { - return !!getSelectedSyntacticModifierFlags(node, flags); -} - -/** @internal */ -function getSelectedSyntacticModifierFlags(node: Node, flags: ModifierFlags): ModifierFlags { - return getSyntacticModifierFlags(node) & flags; -} - -/** - * Gets the effective ModifierFlags for the provided node, including JSDoc modifiers. The modifiers will be cached on the node to improve performance. - * - * NOTE: This function may use `parent` pointers. - * - * @internal - */ -function getEffectiveModifierFlags(node: Node): ModifierFlags { - return getModifierFlagsWorker(node, /*includeJSDoc*/ true); -} - -/** - * Gets the ModifierFlags for syntactic modifiers on the provided node. The modifiers will be cached on the node to improve performance. - * - * NOTE: This function does not use `parent` pointers and will not include modifiers from JSDoc. - * - * @internal - */ -function getSyntacticModifierFlags(node: Node): ModifierFlags { - return getModifierFlagsWorker(node, /*includeJSDoc*/ false); -} - - -function getModifierFlagsWorker(node: Node, includeJSDoc: boolean, alwaysIncludeJSDoc?: boolean): ModifierFlags { - if (node.kind >= SyntaxKind.FirstToken && node.kind <= SyntaxKind.LastToken) { - return ModifierFlags.None; - } - - if (!(node.modifierFlagsCache & ModifierFlags.HasComputedFlags)) { - node.modifierFlagsCache = getSyntacticModifierFlagsNoCache(node) | ModifierFlags.HasComputedFlags; - } - - if (includeJSDoc && !(node.modifierFlagsCache & ModifierFlags.HasComputedJSDocModifiers) && (alwaysIncludeJSDoc || isInJSFile(node)) && node.parent) { - node.modifierFlagsCache |= getJSDocModifierFlagsNoCache(node) | ModifierFlags.HasComputedJSDocModifiers; - } - - return node.modifierFlagsCache & ~(ModifierFlags.HasComputedFlags | ModifierFlags.HasComputedJSDocModifiers); -} - - -function getJSDocModifierFlagsNoCache(node: Node): ModifierFlags { - let flags = ModifierFlags.None; - if (!!node.parent && !isParameter(node)) { - if (isInJSFile(node)) { - if (getJSDocPublicTag(node)) flags |= ModifierFlags.Public; - if (getJSDocPrivateTag(node)) flags |= ModifierFlags.Private; - if (getJSDocProtectedTag(node)) flags |= ModifierFlags.Protected; - if (getJSDocReadonlyTag(node)) flags |= ModifierFlags.Readonly; - if (getJSDocOverrideTagNoCache(node)) flags |= ModifierFlags.Override; - } - if (getJSDocDeprecatedTag(node)) flags |= ModifierFlags.Deprecated; - } - - return flags; -} - -/** - * Gets the ModifierFlags for syntactic modifiers on the provided node. The modifier flags cache on the node is ignored. - * - * NOTE: This function does not use `parent` pointers and will not include modifiers from JSDoc. - * - * @internal - */ -function getSyntacticModifierFlagsNoCache(node: Node): ModifierFlags { - let flags = canHaveModifiers(node) ? modifiersToFlags(node.modifiers) : ModifierFlags.None; - if (node.flags & NodeFlags.NestedNamespace || (node.kind === SyntaxKind.Identifier && (node as Identifier).isInJSDocNamespace)) { - flags |= ModifierFlags.Export; - } - return flags; -} - -/** @internal */ -function modifiersToFlags(modifiers: readonly ModifierLike[] | undefined) { - let flags = ModifierFlags.None; - if (modifiers) { - for (const modifier of modifiers) { - flags |= modifierToFlag(modifier.kind); - } - } - return flags; -} - -/** @internal */ -function modifierToFlag(token: SyntaxKind): ModifierFlags { - switch (token) { - case SyntaxKind.StaticKeyword: return ModifierFlags.Static; - case SyntaxKind.PublicKeyword: return ModifierFlags.Public; - case SyntaxKind.ProtectedKeyword: return ModifierFlags.Protected; - case SyntaxKind.PrivateKeyword: return ModifierFlags.Private; - case SyntaxKind.AbstractKeyword: return ModifierFlags.Abstract; - case SyntaxKind.AccessorKeyword: return ModifierFlags.Accessor; - case SyntaxKind.ExportKeyword: return ModifierFlags.Export; - case SyntaxKind.DeclareKeyword: return ModifierFlags.Ambient; - case SyntaxKind.ConstKeyword: return ModifierFlags.Const; - case SyntaxKind.DefaultKeyword: return ModifierFlags.Default; - case SyntaxKind.AsyncKeyword: return ModifierFlags.Async; - case SyntaxKind.ReadonlyKeyword: return ModifierFlags.Readonly; - case SyntaxKind.OverrideKeyword: return ModifierFlags.Override; - case SyntaxKind.InKeyword: return ModifierFlags.In; - case SyntaxKind.OutKeyword: return ModifierFlags.Out; - case SyntaxKind.Decorator: return ModifierFlags.Decorator; - } - return ModifierFlags.None; -} - -/** @internal */ -export type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration; - -/** @internal */ -type LateVisibilityPaintedStatement = - | AnyImportSyntax - | VariableStatement - | ClassDeclaration - | FunctionDeclaration - | ModuleDeclaration - | TypeAliasDeclaration - | InterfaceDeclaration - | EnumDeclaration; - -/** @internal */ -export function isThisIdentifier(node: Node | undefined): boolean { - return !!node && node.kind === SyntaxKind.Identifier && identifierIsThisKeyword(node as Identifier); -} - - -/** @internal */ -function identifierIsThisKeyword(id: Identifier): boolean { - return id.escapedText === "this"; -} - - -/** @internal */ -export function getNodeId(node: Node): number; -export function getNodeId(node: any): number { - return (ts as any).getNodeId(node); -} - -/** @internal */ -function isGlobalScopeAugmentation(module: ModuleDeclaration): boolean { - return !!(module.flags & NodeFlags.GlobalAugmentation); -} - -/** @internal */ -export function isExternalModuleAugmentation(node: Node): node is AmbientModuleDeclaration { - return isAmbientModule(node) && isModuleAugmentationExternal(node); -} - - -/** @internal */ -function isModuleAugmentationExternal(node: AmbientModuleDeclaration) { - // external module augmentation is a ambient module declaration that is either: - // - defined in the top level scope and source file is an external module - // - defined inside ambient module declaration located in the top level scope and source file not an external module - switch (node.parent.kind) { - case SyntaxKind.SourceFile: - return isExternalModule(node.parent); - case SyntaxKind.ModuleBlock: - return isAmbientModule(node.parent.parent) && isSourceFile(node.parent.parent.parent) && !isExternalModule(node.parent.parent.parent); - } - return false; -} - -// See also `isExternalOrCommonJsModule` in utilities.ts -function isExternalModule(file: SourceFile): boolean { - return (file as any).externalModuleIndicator !== undefined; -} - -/** @internal */ -function isAmbientModule(node: Node): node is AmbientModuleDeclaration { - return isModuleDeclaration(node) && (node.name.kind === SyntaxKind.StringLiteral || isGlobalScopeAugmentation(node)); -} - - -/** @internal */ -export function hasEffectiveModifier(node: Node, flags: ModifierFlags): boolean { - return !!getSelectedEffectiveModifierFlags(node, flags); -} - -/** @internal */ -function getSelectedEffectiveModifierFlags(node: Node, flags: ModifierFlags): ModifierFlags { - return getEffectiveModifierFlags(node) & flags; -} - - -/** - * A declaration has a dynamic name if all of the following are true: - * 1. The declaration has a computed property name. - * 2. The computed name is *not* expressed as a StringLiteral. - * 3. The computed name is *not* expressed as a NumericLiteral. - * 4. The computed name is *not* expressed as a PlusToken or MinusToken - * immediately followed by a NumericLiteral. - * - * @internal - */ -export function hasDynamicName(declaration: Declaration): declaration is DynamicNamedDeclaration | DynamicNamedBinaryExpression { - const name = getNameOfDeclaration(declaration); - return !!name && isDynamicName(name); -} - -/** @internal */ -function isDynamicName(name: DeclarationName): boolean { - if (!(name.kind === SyntaxKind.ComputedPropertyName || name.kind === SyntaxKind.ElementAccessExpression)) { - return false; - } - const expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; - return !isStringOrNumericLiteralLike(expr) && - !isSignedNumericLiteral(expr); -} - -/** @internal */ -function isSignedNumericLiteral(node: Node): node is PrefixUnaryExpression & { operand: NumericLiteral } { - return isPrefixUnaryExpression(node) && (node.operator === SyntaxKind.PlusToken || node.operator === SyntaxKind.MinusToken) && isNumericLiteral(node.operand); -} - -/** @internal */ -export function isLateVisibilityPaintedStatement(node: Node): node is LateVisibilityPaintedStatement { - switch (node.kind) { - case SyntaxKind.ImportDeclaration: - case SyntaxKind.ImportEqualsDeclaration: - case SyntaxKind.VariableStatement: - case SyntaxKind.ClassDeclaration: - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.ModuleDeclaration: - case SyntaxKind.TypeAliasDeclaration: - case SyntaxKind.InterfaceDeclaration: - case SyntaxKind.EnumDeclaration: - return true; - default: - return false; - } -} - - -/** @internal */ -export function isBindingPattern(node: Node | undefined): node is BindingPattern { - if (node) { - const kind = node.kind; - return kind === SyntaxKind.ArrayBindingPattern - || kind === SyntaxKind.ObjectBindingPattern; - } - - return false; -} - -/** @internal */ -export function skipParentheses(node: Expression, excludeJSDocTypeAssertions?: boolean): Expression; -/** @internal */ -export function skipParentheses(node: Node, excludeJSDocTypeAssertions?: boolean): Node; -/** @internal */ -export function skipParentheses(node: Node, excludeJSDocTypeAssertions?: boolean): Node { - const flags = excludeJSDocTypeAssertions ? - OuterExpressionKinds.Parentheses | OuterExpressionKinds.ExcludeJSDocTypeAssertion : - OuterExpressionKinds.Parentheses; - return skipOuterExpressions(node, flags); -} - -function skipOuterExpressions(node: Expression, kinds?: OuterExpressionKinds): Expression; -function skipOuterExpressions(node: Node, kinds?: OuterExpressionKinds): Node; -function skipOuterExpressions(node: Node, kinds = OuterExpressionKinds.All) { - while (isOuterExpression(node, kinds)) { - node = node.expression; - } - return node; -} - - -/** @internal */ -function isStringOrNumericLiteralLike(node: Node): node is StringLiteralLike | NumericLiteral { - return isStringLiteralLike(node) || isNumericLiteral(node); -} - - -/** @internal */ -function isOuterExpression(node: Node, kinds = OuterExpressionKinds.All): node is OuterExpression { - switch (node.kind) { - case SyntaxKind.ParenthesizedExpression: - if (kinds & OuterExpressionKinds.ExcludeJSDocTypeAssertion && isJSDocTypeAssertion(node)) { - return false; - } - return (kinds & OuterExpressionKinds.Parentheses) !== 0; - case SyntaxKind.TypeAssertionExpression: - case SyntaxKind.AsExpression: - case SyntaxKind.SatisfiesExpression: - return (kinds & OuterExpressionKinds.TypeAssertions) !== 0; - case SyntaxKind.NonNullExpression: - return (kinds & OuterExpressionKinds.NonNullAssertions) !== 0; - case SyntaxKind.PartiallyEmittedExpression: - return (kinds & OuterExpressionKinds.PartiallyEmittedExpressions) !== 0; - } - return false; -} - -/** @internal */ -function isJSDocTypeAssertion(node: Node): node is JSDocTypeAssertion { - return isParenthesizedExpression(node) - && isInJSFile(node) - && !!getJSDocTypeTag(node); -} - - - /** @internal */ export function getDeclarationEmitExtensionForPath(path: string) { return fileExtensionIsOneOf(path, [Extension.Mjs, Extension.Mts]) ? Extension.Dmts : @@ -370,35 +27,6 @@ export function getOutputExtension(fileName: string, options: CompilerOptions): } -/** @internal */ -export function getEmitModuleResolutionKind(compilerOptions: CompilerOptions) { - let moduleResolution = compilerOptions.moduleResolution; - if (moduleResolution === undefined) { - switch (getEmitModuleKind(compilerOptions)) { - case ModuleKind.CommonJS: - moduleResolution = ModuleResolutionKind.NodeJs; - break; - case ModuleKind.Node16: - moduleResolution = ModuleResolutionKind.Node16; - break; - case ModuleKind.NodeNext: - moduleResolution = ModuleResolutionKind.NodeNext; - break; - default: - moduleResolution = ModuleResolutionKind.Classic; - break; - } - } - return moduleResolution; -} -/** @internal */ -export function getEmitModuleKind(compilerOptions: {module?: CompilerOptions["module"], target?: CompilerOptions["target"]}) { - return typeof compilerOptions.module === "number" ? - compilerOptions.module : - getEmitScriptTarget(compilerOptions) >= ScriptTarget.ES2015 ? ModuleKind.ES2015 : ModuleKind.CommonJS; -} - - /** @internal */ export function getEmitScriptTarget(compilerOptions: {module?: CompilerOptions["module"], target?: CompilerOptions["target"]}) { return compilerOptions.target || @@ -430,148 +58,6 @@ export function hasTSFileExtension(fileName: string): boolean { return some(supportedTSExtensionsFlat, extension => fileExtensionIs(fileName, extension)); } -export function getFirstIdentifier(node: EntityNameOrEntityNameExpression): Identifier { - switch (node.kind) { - case SyntaxKind.Identifier: - return node; - case SyntaxKind.QualifiedName: - do { - node = node.left; - } while (node.kind !== SyntaxKind.Identifier); - return node; - case SyntaxKind.PropertyAccessExpression: - do { - node = node.expression; - } while (node.kind !== SyntaxKind.Identifier); - return node; - } -} - - -/** @internal */ -export function isPartOfTypeNode(node: Node): boolean { - if (SyntaxKind.FirstTypeNode <= node.kind && node.kind <= SyntaxKind.LastTypeNode) { - return true; - } - - switch (node.kind) { - case SyntaxKind.AnyKeyword: - case SyntaxKind.UnknownKeyword: - case SyntaxKind.NumberKeyword: - case SyntaxKind.BigIntKeyword: - case SyntaxKind.StringKeyword: - case SyntaxKind.BooleanKeyword: - case SyntaxKind.SymbolKeyword: - case SyntaxKind.ObjectKeyword: - case SyntaxKind.UndefinedKeyword: - case SyntaxKind.NeverKeyword: - return true; - case SyntaxKind.VoidKeyword: - return node.parent.kind !== SyntaxKind.VoidExpression; - case SyntaxKind.ExpressionWithTypeArguments: - return isHeritageClause(node.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(node); - case SyntaxKind.TypeParameter: - return node.parent.kind === SyntaxKind.MappedType || node.parent.kind === SyntaxKind.InferType; - - // Identifiers and qualified names may be type nodes, depending on their context. Climb - // above them to find the lowest container - case SyntaxKind.Identifier: - // If the identifier is the RHS of a qualified name, then it's a type iff its parent is. - if (node.parent.kind === SyntaxKind.QualifiedName && (node.parent as QualifiedName).right === node) { - node = node.parent; - } - else if (node.parent.kind === SyntaxKind.PropertyAccessExpression && (node.parent as PropertyAccessExpression).name === node) { - node = node.parent; - } - // At this point, node is either a qualified name or an identifier - Debug.assert(node.kind === SyntaxKind.Identifier || node.kind === SyntaxKind.QualifiedName || node.kind === SyntaxKind.PropertyAccessExpression, - "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'."); - // falls through - - case SyntaxKind.QualifiedName: - case SyntaxKind.PropertyAccessExpression: - case SyntaxKind.ThisKeyword: { - const { parent } = node; - if (parent.kind === SyntaxKind.TypeQuery) { - return false; - } - if (parent.kind === SyntaxKind.ImportType) { - return !(parent as ImportTypeNode).isTypeOf; - } - // Do not recursively call isPartOfTypeNode on the parent. In the example: - // - // let a: A.B.C; - // - // Calling isPartOfTypeNode would consider the qualified name A.B a type node. - // Only C and A.B.C are type nodes. - if (SyntaxKind.FirstTypeNode <= parent.kind && parent.kind <= SyntaxKind.LastTypeNode) { - return true; - } - switch (parent.kind) { - case SyntaxKind.ExpressionWithTypeArguments: - return isHeritageClause(parent.parent) && !isExpressionWithTypeArgumentsInClassExtendsClause(parent); - case SyntaxKind.TypeParameter: - return node === (parent as TypeParameterDeclaration).constraint; - case SyntaxKind.JSDocTemplateTag: - return node === (parent as JSDocTemplateTag).constraint; - case SyntaxKind.PropertyDeclaration: - case SyntaxKind.PropertySignature: - case SyntaxKind.Parameter: - case SyntaxKind.VariableDeclaration: - return node === (parent as HasType).type; - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.FunctionExpression: - case SyntaxKind.ArrowFunction: - case SyntaxKind.Constructor: - case SyntaxKind.MethodDeclaration: - case SyntaxKind.MethodSignature: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - return node === (parent as FunctionLikeDeclaration).type; - case SyntaxKind.CallSignature: - case SyntaxKind.ConstructSignature: - case SyntaxKind.IndexSignature: - return node === (parent as SignatureDeclaration).type; - case SyntaxKind.TypeAssertionExpression: - return node === (parent as TypeAssertion).type; - case SyntaxKind.CallExpression: - case SyntaxKind.NewExpression: - return contains((parent as CallExpression).typeArguments, node); - case SyntaxKind.TaggedTemplateExpression: - // TODO (drosen): TaggedTemplateExpressions may eventually support type arguments. - return false; - } - } - } - - return false; -} -/** @internal */ -function isExpressionWithTypeArgumentsInClassExtendsClause(node: Node): node is ExpressionWithTypeArguments { - return tryGetClassExtendingExpressionWithTypeArguments(node) !== undefined; -} -function tryGetClassExtendingExpressionWithTypeArguments(node: Node): ClassLikeDeclaration | undefined { - const cls = tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node); - return cls && !cls.isImplements ? cls.class : undefined; -} - -/** @internal */ -interface ClassImplementingOrExtendingExpressionWithTypeArguments { - readonly class: ClassLikeDeclaration; - readonly isImplements: boolean; -} -/** @internal */ -function tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node: Node): ClassImplementingOrExtendingExpressionWithTypeArguments | undefined { - return isExpressionWithTypeArguments(node) - && isHeritageClause(node.parent) - && isClassLike(node.parent.parent) - ? { class: node.parent.parent, isImplements: node.parent.token === SyntaxKind.ImplementsKeyword } - : undefined; -} -function isClassLike(node: Node): node is ClassLikeDeclaration { - return node && (node.kind === SyntaxKind.ClassDeclaration || node.kind === SyntaxKind.ClassExpression); -} - const supportedDeclarationExtensions: readonly Extension[] = [Extension.Dts, Extension.Dcts, Extension.Dmts]; /** @internal */ export function isDeclarationFileName(fileName: string): boolean { @@ -607,106 +93,4 @@ export function getNewLineCharacter(options: CompilerOptions | PrinterOptions, g } -export function isAmbientDeclaration(node: Node) { - // @ts-expect-error NodeFlags.Ambient is not exposed - return node.flags & NodeFlags.Ambient; -} - -export function isEnumConst(node: EnumDeclaration): boolean { - return !!(getSyntacticModifierFlags(node) & ModifierFlags.Const); -} - - -function idText(id: Identifier) { - return id.escapedText; -} -/** @internal */ -export function nodeHasName(statement: Node, name: Identifier) { - if (isNamedDeclaration(statement) && isIdentifier(statement.name) && idText(statement.name as Identifier) === idText(name)) { - return true; - } - if (isVariableStatement(statement) && some(statement.declarationList.declarations, d => nodeHasName(d, name))) { - return true; - } - return false; -} - -/** @internal */ -function isNamedDeclaration(node: Node): node is NamedDeclaration & { name: DeclarationName } { - return !!(node as NamedDeclaration).name; // A 'name' property should always be a DeclarationName. -} - -export type MemberKey = string & { - __memberKey: void -} - -export function getMemberKey(name: string | Exclude | ts.NoSubstitutionTemplateLiteral): MemberKey -export function getMemberKey(name: string | ts.PropertyName | ts.NoSubstitutionTemplateLiteral | undefined): MemberKey | undefined -export function getMemberKey(name: string | ts.PropertyName | ts.NoSubstitutionTemplateLiteral | undefined): string | undefined { - if(name === undefined) { - return undefined; - } - if(typeof name === "string") { - return ("I:" + name); - } - if(isPrivateIdentifier(name)) { - return ("P:" + name.escapedText); - } - if (isIdentifier(name)) { - return ("I:" + name.escapedText); - } - if (isStringLiteralLike(name)) { - return ("I:" + name.text); - } - if (isNumericLiteral(name)) { - return ("I:" + (+name.text)); - } - if (ts.isComputedPropertyName(name)) { - let computedName = name.expression; - - if (isStringLiteral(computedName)) { - return ("I:" + computedName.text); - } - if (isNumericLiteral(computedName)) { - return ("I:" + (+computedName.text)); - } - if (isPrefixUnaryExpression(computedName) - && isNumericLiteral(computedName.operand)) { - if(computedName.operator === SyntaxKind.MinusToken){ - return ("I:" + (-computedName.operand.text)); - } - else if(computedName.operator === SyntaxKind.PlusToken){ - return ("I:" + (-computedName.operand.text)); - } - else { - return undefined; - } - } - let fullId = "C:"; - // We only support dotted identifiers as property keys - while (true) { - if (isIdentifier(computedName)) { - fullId += computedName.escapedText; - break; - } - else if (ts.isPropertyAccessExpression(computedName)) { - fullId += computedName.name.escapedText; - computedName = computedName.expression; - } - else { - // Can't compute a property key, bail - return undefined; - } - } - return fullId - } - return undefined; -} - -export function isPropertyAccessEntityNameExpression(node: Node): node is PropertyAccessEntityNameExpression { - return ts.isPropertyAccessExpression(node) && isIdentifier(node.name) && isEntityNameExpression(node.expression); -} -export function isEntityNameExpression(node: Node): node is ts.EntityNameExpression { - return node.kind === SyntaxKind.Identifier || isPropertyAccessEntityNameExpression(node); -} diff --git a/external-declarations/src/test-runner/cli-arg-config.ts b/external-declarations/src/test-runner/cli-arg-config.ts index 02020ee9c6f6e..a68f58329c357 100644 --- a/external-declarations/src/test-runner/cli-arg-config.ts +++ b/external-declarations/src/test-runner/cli-arg-config.ts @@ -6,18 +6,17 @@ export const testRunnerCLIConfiguration = parserConfiguration({ description: "Test filter to run", }, type: { - type: ArgType.Enum("all", "tsc", "i"), + type: ArgType.Enum("all", "tsc", "dte"), description: "Type of run (Typescript, all, or isolated)", }, shard: ArgType.Number(), shardCount: ArgType.Number(), - histFolder: ArgType.String(), libPath: ArgType.String(), + outputPath: ArgType.String(), rootPaths: ArgType.StringArray(), configFile: ArgType.String(), category: ArgType.String(), forceIsolatedDeclarations: ArgType.Boolean(), - keepHistory: ArgType.Boolean(), }); diff --git a/external-declarations/src/test-runner/parallel-run.ts b/external-declarations/src/test-runner/parallel-run.ts index b2ce3acb9bd6f..2fac400e2d29c 100644 --- a/external-declarations/src/test-runner/parallel-run.ts +++ b/external-declarations/src/test-runner/parallel-run.ts @@ -59,9 +59,7 @@ const shardCount = parsedArgs.shardCount ?? 6; async function main() { let runCount = 0; - const date = new Date(); - const histFolder = `${date.toISOString().replace(/:/g, "-")}-${parsedArgs.type}`; - const commandLine = `node ./build/test-runner/test-runner-main.js --histFolder=${histFolder} ${process.argv.slice(2).join(" ")} `; + const commandLine = `node ./build/test-runner/test-runner-main.js ${process.argv.slice(2).join(" ")} `; let lastWrite = new Date().getTime(); const startTime = new Date().getTime(); const elapsedTime = (now: number) => `${((now - startTime) / 1000 / 60).toFixed(2)} minutes`; diff --git a/external-declarations/src/test-runner/test-runner-main.ts b/external-declarations/src/test-runner/test-runner-main.ts index deb89a052591b..09603f742e8a0 100644 --- a/external-declarations/src/test-runner/test-runner-main.ts +++ b/external-declarations/src/test-runner/test-runner-main.ts @@ -15,13 +15,11 @@ import { IO } from "./tsc-infrastructure/io"; import { CompilerSettings, TestCaseContent } from "./tsc-infrastructure/test-file-parser"; import { getFileBasedTestConfigurationDescription, getFileBasedTestConfigurations } from "./tsc-infrastructure/vary-by"; import { changeExtension } from "./tsc-infrastructure/vpath"; -import { loadTestCase, readDirRecursive, runIsolated, runTypeScript,TestCompilationResult } from "./utils"; +import { loadTestCase, readDirRecursive, runIsolated as runDeclarationTransformEmitter, runTypeScript,TestCompilationResult } from "./utils"; const excludeFilter =/\/fourslash\//; - - const shard = parsedArgs.shard; const shardCount = parsedArgs.shardCount; let prefix: string | undefined; @@ -33,14 +31,15 @@ if(prefixed) { testVersionFilter = prefixed.groups?.options; } +const outputPath = parsedArgs.outputPath ?? "./tsc-tests/run" const rootCasePaths = parsedArgs.rootPaths ?? [ "./tests/source" ]; const libFolder = parsedArgs.libPath ?? path.join(rootCasePaths[0], "../lib"); const filter = parsedArgs.default ? new RegExp(parsedArgs.default) : /.*\.ts/; const runType = - parsedArgs.type === "all" ? { tsc: true, isolated: true } : - parsedArgs.type === "tsc" ? { tsc: true, isolated: false } : - { tsc: false, isolated: true }; + parsedArgs.type === "all" ? { tsc: true, dte: true } : + parsedArgs.type === "tsc" ? { tsc: true, dte: false } : + { tsc: false, dte: true }; const allTests = rootCasePaths .map(r => readAllFiles(r, filter)) @@ -49,9 +48,6 @@ const allTests = rootCasePaths (ts as any).Debug.enableDebugInfo(); -const date = new Date(); -const historical = (parsedArgs.histFolder && `/${parsedArgs.histFolder}/`) ?? `/${date.toISOString().replace(/:/g, "-")}-${parsedArgs.type}/`; - function pad(num: number, size: number) { return ("000000000" + num).substr(-size); } @@ -95,9 +91,9 @@ async function main() { if (testVersionFilter && varConfigDescription !== testVersionFilter) continue; const file = (prefix ?? pad(count, 5)) + "-" + changeExtension(path.basename(testFile), varConfigDescription + ".d.ts"); - if (runType.tsc) runAndWrite(testName, path.join("./tsc-tests/$now/tsc", file), varConfig, runTypeScript); + if (runType.tsc) runAndWrite(testName, path.join(outputPath, "tsc", file), varConfig, runTypeScript); - if (runType.isolated) runAndWrite(testName, path.join("./tsc-tests/$now/isolated", file), varConfig, (t, s) => runIsolated(t, libFiles, s)); + if (runType.dte) runAndWrite(testName, path.join(outputPath, "dte", file), varConfig, (t, s) => runDeclarationTransformEmitter(t, libFiles, s)); } console.log(` Ran: ${pad(count, 5)}/${allTests.length}`); @@ -155,9 +151,6 @@ async function main() { ); } } - if (allTests.length > 5 && parsedArgs.keepHistory) { - writeResults(file.replace("/$now/", historical), resultText); - } writeResults(file, resultText); } diff --git a/external-declarations/src/test-runner/utils.ts b/external-declarations/src/test-runner/utils.ts index 2e161a86e17ba..264e041520307 100644 --- a/external-declarations/src/test-runner/utils.ts +++ b/external-declarations/src/test-runner/utils.ts @@ -2,18 +2,13 @@ import * as fsp from "fs/promises"; import * as JSON from "json5"; import * as path from "path"; import * as ts from "typescript"; -import { - ModuleKind, -} from "typescript"; import { getDeclarationExtension, isDeclarationFile, isTypeScriptFile, } from "../compiler/path-utils"; -import { - transformFile, -} from "../compiler/transform-file"; +import { emitDeclarationsForFile } from "../compiler/transform-project"; import { compileFiles, TestFile, @@ -93,12 +88,6 @@ export function runIsolated(caseData: TestCaseParser.TestCaseContent, libFiles: isolatedDeclarations: true, }; - const packageJson = caseData.testUnitData.find(f => f.name === "/package.json"); - let packageResolution: ts.ResolutionMode = ts.ModuleKind.CommonJS; - if (packageJson) { - packageResolution = JSON.parse(packageJson.content)?.type === "module" ? ModuleKind.ESNext : ModuleKind.CommonJS; - } - const diagnostics: ts.Diagnostic[] = []; const files = caseData.testUnitData .filter(isRelevantTestFile) @@ -110,7 +99,7 @@ export function runIsolated(caseData: TestCaseParser.TestCaseContent, libFiles: /*setParentNodes*/ true, file.name.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS, ); - const declaration = transformFile(sourceFile, projectFiles, libs, settings, packageResolution); + const declaration = emitDeclarationsForFile(sourceFile, projectFiles, libs, settings); diagnostics.push(...declaration.diagnostics); return { content: declaration.code, diff --git a/src/compiler/_namespaces/ts.ts b/src/compiler/_namespaces/ts.ts index 34d731e880695..9c726f91e1a3b 100644 --- a/src/compiler/_namespaces/ts.ts +++ b/src/compiler/_namespaces/ts.ts @@ -57,6 +57,10 @@ export * from "../transformers/module/system"; export * from "../transformers/module/esnextAnd2015"; export * from "../transformers/module/node"; export * from "../transformers/declarations/diagnostics"; +export * from "../transformers/declarations/emit-binder"; +export * from "../transformers/declarations/emit-host"; +export * from "../transformers/declarations/emit-resolver"; +export * from "../transformers/declarations/types"; export * from "../transformers/declarations"; export * from "../transformer"; export * from "../emitter"; diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 7e9b088237551..625c6fc8df9d4 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -133,6 +133,7 @@ import { defaultMaximumTruncationLength, DeferredTypeReference, DeleteExpression, + determineIfDeclarationIsVisible, Diagnostic, DiagnosticAndArguments, DiagnosticArguments, @@ -252,6 +253,7 @@ import { getContainingClassStaticBlock, getContainingFunction, getContainingFunctionOrClassStaticBlock, + getDeclarationContainer, getDeclarationModifierFlagsFromSymbol, getDeclarationOfKind, getDeclarationsOfKind, @@ -540,6 +542,7 @@ import { isGetAccessorDeclaration, isGetOrSetAccessorDeclaration, isGlobalScopeAugmentation, + isGlobalSourceFile, isHeritageClause, isIdentifier, isIdentifierText, @@ -2707,10 +2710,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)); @@ -10264,109 +10263,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 { @@ -10487,22 +10389,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', @@ -10833,7 +10719,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 diff --git a/external-declarations/src/compiler/emit-binder.ts b/src/compiler/transformers/declarations/emit-binder.ts similarity index 52% rename from external-declarations/src/compiler/emit-binder.ts rename to src/compiler/transformers/declarations/emit-binder.ts index f49f47fdae8c7..398b79cfae276 100644 --- a/external-declarations/src/compiler/emit-binder.ts +++ b/src/compiler/transformers/declarations/emit-binder.ts @@ -1,47 +1,99 @@ -import { __String, ArrayBindingElement, BindingPattern, ClassDeclaration, ClassElement, CompilerOptions, EnumDeclaration, EnumMember, ExportDeclaration, ExportSpecifier, Extension, findAncestor, forEachChild, FunctionDeclaration, Identifier, InterfaceDeclaration, isBlock, isClassDeclaration, isConditionalTypeNode, isConstructorDeclaration, isConstructSignatureDeclaration, isEnumDeclaration, isExportAssignment, isExportDeclaration, isExternalModuleReference, isFunctionDeclaration, isIdentifier, isImportDeclaration, isImportEqualsDeclaration, isInferTypeNode, isInterfaceDeclaration, isJsxFragment, isJsxOpeningLikeElement, isMappedTypeNode, isMetaProperty, isModuleBlock, isModuleDeclaration, isNamedExports, isSourceFile, isTypeAliasDeclaration, isVariableDeclaration,isVariableStatement, JsxEmit, ModifierFlags, ModuleDeclaration, ModuleDetectionKind, ModuleKind, ModuleResolutionKind, Node, NodeArray, ParameterDeclaration, ResolutionMode, SourceFile, Symbol, SymbolFlags, SyntaxKind, TypeElement, TypeParameterDeclaration, VariableDeclaration } from "typescript"; - -import { Debug } from "./debug"; -import { forEach } from "./lang-utils"; -import { getEmitModuleKind, getEmitModuleResolutionKind, getMemberKey, getNodeId, hasSyntacticModifier, isBindingPattern, isEnumConst, MemberKey, nodeHasName } from "./utils"; - - -export interface NodeLinks { +import { + forEachChild, + getImpliedNodeFormatForFile, + getModuleInstanceState, + isBlock, + isClassDeclaration, + isConditionalTypeNode, + isConstructorDeclaration, + isConstructSignatureDeclaration, + isEnumDeclaration, + isExportAssignment, + isExportDeclaration, + isFunctionDeclaration, + isIdentifier, + isImportDeclaration, + isImportEqualsDeclaration, + isInferTypeNode, + isInterfaceDeclaration, + isMappedTypeNode, + isModuleBlock, + isModuleDeclaration, + isNamedExports, + isSourceFile, + isTypeAliasDeclaration, + isVariableDeclaration, + isVariableStatement, + ModuleInstanceState, + Symbol, + toPath, +} from "../../_namespaces/ts"; +import { + getNodeId, +} from "../../checker"; +import { + Debug, +} from "../../debug"; +import { + __String, + ArrayBindingElement, + BindingPattern, + ClassDeclaration, + ClassElement, + CompilerOptions, + Declaration, + EnumDeclaration, + EnumMember, + FunctionDeclaration, + InterfaceDeclaration, + ModifierFlags, + ModuleDeclaration, + Node, + NodeArray, + ParameterDeclaration, + SourceFile, + SymbolFlags, + SyntaxKind, + TypeElement, + TypeParameterDeclaration, + VariableDeclaration, +} from "../../types"; +import { + getSetExternalModuleIndicator, + hasSyntacticModifier, + hostGetCanonicalFileName, + isEnumConst, +} from "../../utilities"; +import { + findAncestor, + isBindingPattern, +} from "../../utilitiesPublic"; +import { + IsolatedEmitHost, +} from "./types"; +import { + getMemberKey, + MemberKey, +} from "./utils"; + +export interface EmitDeclarationNodeLinks { isVisible?: boolean; - symbol?: BasicSymbol; - localSymbol?: BasicSymbol; - locals?: SymbolTable; + symbol?: EmitDeclarationSymbol; + localSymbol?: EmitDeclarationSymbol; + locals?: EmitDeclarationSymbolTable; enumValue?: string | number | undefined; } -type SymbolTable = Map; -export interface BasicSymbol { +type EmitDeclarationSymbolTable = Map; +export interface EmitDeclarationSymbol { name?: MemberKey; - exportSymbol?: BasicSymbol; - declarations: Node[]; + exportSymbol?: EmitDeclarationSymbol; + declarations: Declaration[]; signatureDeclarations?: Node[]; flags: SymbolFlags; isVisible?: boolean; - members?: SymbolTable; - exports?: SymbolTable; -} - -function assertNever(o: never): never { - throw new Error("Should never happen"); -} - -type InternalNode = Node; -type InternalNodeArray = NodeArray; -type InternalSourceFile = SourceFile; -declare module "typescript" { - interface SourceFile { - externalModuleIndicator?: InternalNode | true; - } - export function forEachChildRecursively(rootNode: InternalNode, cbNode: (node: InternalNode, parent: InternalNode) => T | "skip" | undefined, cbNodes?: (nodes: InternalNodeArray, parent: InternalNode) => T | "skip" | undefined): T | undefined; - export function getTokenPosOfNode(node: InternalNode, sourceFile?: InternalSourceFile, includeJsDoc?: boolean): number; -} -function getEmitModuleDetectionKind(options: CompilerOptions) { - return options.moduleDetection || - (getEmitModuleKind(options) === ModuleKind.Node16 || getEmitModuleKind(options) === ModuleKind.NodeNext ? ModuleDetectionKind.Force : ModuleDetectionKind.Auto); + members?: EmitDeclarationSymbolTable; + exports?: EmitDeclarationSymbolTable; } type SymbolRegistrationFlags = readonly [flags: SymbolFlags, forbiddenFlags: SymbolFlags]; @@ -84,22 +136,26 @@ const syntaxKindToSymbolMap = { [SyntaxKind.ImportClause]: [SymbolFlags.Alias, SymbolFlags.AliasExcludes], } as const satisfies Partial>>; -export function bindSourceFile(file: SourceFile, options: CompilerOptions, packageModuleType: ResolutionMode) { - const nodeLinks: NodeLinks[] = []; - function tryGetNodeLinks(node: Node): NodeLinks | undefined { +export function bindSourceFileForDeclarationEmit(file: SourceFile, host: IsolatedEmitHost) { + const options: CompilerOptions = host.getCompilerOptions(); + const nodeLinks: EmitDeclarationNodeLinks[] = []; + function tryGetNodeLinks(node: Node): EmitDeclarationNodeLinks | undefined { const id = (node as any).id; - if(!id) return undefined; + if (!id) return undefined; return nodeLinks[id]; } - function getNodeLinks(node: Node): NodeLinks { + function getNodeLinks(node: Node): EmitDeclarationNodeLinks { const nodeId = getNodeId(node); return nodeLinks[nodeId] || (nodeLinks[nodeId] = {}); } - - const [isFileAModule, isNodeAModuleIndicator] = getSetExternalModuleIndicator(options); - file.externalModuleIndicator = - isFileAModule(file) || isExternalModuleWorker(file, isNodeAModuleIndicator); - file.impliedNodeFormat = getImpliedNodeFormat(file.fileName, options, packageModuleType); + const setExternalModuleIndicator = getSetExternalModuleIndicator(options); + setExternalModuleIndicator(file); + file.impliedNodeFormat = getImpliedNodeFormatForFile( + toPath(file.fileName, host.getCurrentDirectory(), hostGetCanonicalFileName(host)), + /*packageJsonInfoCache*/ undefined, + host, + options, + ); bind(); @@ -111,47 +167,46 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa getMemberNameFromElement, }; - function resolveName(enclosingDeclaration: Node, escapedText: __String, meaning: SymbolFlags) { return resolveMemberKey(enclosingDeclaration, getMemberKey(escapedText as string), meaning); } function resolveMemberKey(enclosingDeclaration: Node, key: MemberKey, meaning: SymbolFlags) { - function getSymbolFromScope(table: SymbolTable | undefined) { + function getSymbolFromScope(table: EmitDeclarationSymbolTable | undefined) { const symbol = table?.get(key); - if(symbol && ((symbol.flags & meaning) || (symbol.flags & SymbolFlags.Alias))) { + if (symbol && ((symbol.flags & meaning) || (symbol.flags & SymbolFlags.Alias))) { return symbol; } } let currentScope = enclosingDeclaration; - while(currentScope) { + while (currentScope) { const links = tryGetNodeLinks(currentScope); let symbol = getSymbolFromScope(links?.locals); - if(!symbol && (isModuleDeclaration(currentScope) || isSourceFile(currentScope))) { + if (!symbol && (isModuleDeclaration(currentScope) || isSourceFile(currentScope))) { symbol = getSymbolFromScope(links?.symbol?.exports); } - if(symbol) return symbol; + if (symbol) return symbol; currentScope = currentScope.parent; } return undefined; } - function getSymbolFlagsForNode(node: Node & { kind: keyof typeof syntaxKindToSymbolMap }) { - if(node.kind === SyntaxKind.EnumDeclaration) { + function getSymbolFlagsForNode(node: Node & { kind: keyof typeof syntaxKindToSymbolMap; }) { + if (node.kind === SyntaxKind.EnumDeclaration) { return isEnumConst(node as EnumDeclaration) ? - syntaxKindToSymbolMap[node.kind].const: + syntaxKindToSymbolMap[node.kind].const : syntaxKindToSymbolMap[node.kind].regular; } - if(node.kind === SyntaxKind.ModuleDeclaration) { + if (node.kind === SyntaxKind.ModuleDeclaration) { return getModuleInstanceState(node as ModuleDeclaration) === ModuleInstanceState.Instantiated ? - syntaxKindToSymbolMap[node.kind].value: + syntaxKindToSymbolMap[node.kind].value : syntaxKindToSymbolMap[node.kind].namespace; } return syntaxKindToSymbolMap[node.kind]; } function getElementFlagsOrThrow(node: Node) { - const result = getSymbolFlagsForNode(node as Node & { kind: keyof typeof syntaxKindToSymbolMap }); - if(!result) { + const result = getSymbolFlagsForNode(node as Node & { kind: keyof typeof syntaxKindToSymbolMap; }); + if (!result) { throw new Error("Unknown binding element type"); } return result; @@ -159,33 +214,33 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa function bind() { let currentScope: Node = undefined!; - let currentSymbol: BasicSymbol = undefined!; - let currentLocalSymbolTable: SymbolTable = undefined!; - let currentExportsSymbolTable: SymbolTable | undefined; + let currentSymbol: EmitDeclarationSymbol = undefined!; + let currentLocalSymbolTable: EmitDeclarationSymbolTable = undefined!; + let currentExportsSymbolTable: EmitDeclarationSymbolTable | undefined; const postBindingAction: (() => void)[] = []; const fileLinks = getNodeLinks(file).symbol = newSymbol(); fileLinks.exports = new Map(); - withScope(file, fileLinks.exports, ()=> bindEachFunctionsFirst(file.statements)); + withScope(file, fileLinks.exports, () => bindEachFunctionsFirst(file.statements)); postBindingAction.forEach(fn => fn()); - function newSymbol(): BasicSymbol { + function newSymbol(): EmitDeclarationSymbol { return { declarations: [], flags: 0, }; } - function getSymbol(table: SymbolTable, name: MemberKey) { + function getSymbol(table: EmitDeclarationSymbolTable, name: MemberKey) { let symbol = table.get(name); - if(!symbol) { + if (!symbol) { symbol = newSymbol(); symbol.name = name; table.set(name, symbol); } return symbol; } - function addLocalAndExportDeclaration(name: MemberKey | undefined, node: Node, [flags, forbiddenFlags]: SymbolRegistrationFlags, isExport: boolean) { - if(isExport) { + function addLocalAndExportDeclaration(name: MemberKey | undefined, node: Declaration, [flags, forbiddenFlags]: SymbolRegistrationFlags, isExport: boolean) { + if (isExport) { const exportKind = flags & SymbolFlags.Value ? SymbolFlags.ExportValue : 0; const localSymbol = addLocalOnlyDeclaration(name, node, [exportKind, forbiddenFlags]); const exportSymbol = addExportOnlyDeclaration(name, node, [flags, forbiddenFlags]); @@ -196,51 +251,51 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa return addLocalOnlyDeclaration(name, node, [flags, forbiddenFlags]); } } - function addExportOnlyDeclaration(name: MemberKey | undefined, node: Node, flagsAndForbiddenFlags: SymbolRegistrationFlags) { - if(!currentExportsSymbolTable) { + function addExportOnlyDeclaration(name: MemberKey | undefined, node: Declaration, flagsAndForbiddenFlags: SymbolRegistrationFlags) { + if (!currentExportsSymbolTable) { throw new Error("Exporting symbol from a context that does not support it"); } return addDeclaration(currentExportsSymbolTable, name, node, flagsAndForbiddenFlags); } - function addLocalOnlyDeclaration(name: MemberKey | undefined, node: Node, flagsAndForbiddenFlags: SymbolRegistrationFlags) { + function addLocalOnlyDeclaration(name: MemberKey | undefined, node: Declaration, flagsAndForbiddenFlags: SymbolRegistrationFlags) { return addDeclaration(currentLocalSymbolTable, name, node, flagsAndForbiddenFlags); } - function addDeclaration(table: SymbolTable, name: MemberKey | undefined, node: Node, [flags, forbiddenFlags]: SymbolRegistrationFlags) { + function addDeclaration(table: EmitDeclarationSymbolTable, name: MemberKey | undefined, node: Declaration, [flags, forbiddenFlags]: SymbolRegistrationFlags) { let symbol = name !== undefined ? getSymbol(table, name) : newSymbol(); // Symbols don't merge, create new one - if(forbiddenFlags & symbol.flags) { + if (forbiddenFlags & symbol.flags) { symbol = newSymbol(); } symbol.declarations.push(node); symbol.flags |= flags; getNodeLinks(node).symbol = symbol; - node.symbol = symbol as unknown as Symbol; + // Some parts of declarations.ts use the symbol directly. We provide enough of it for everything to work. + node.symbol = symbol as Symbol; return symbol; } - function withScope(scope: Node, exports: SymbolTable | undefined, fn: () => void) { + function withScope(scope: Node, exports: EmitDeclarationSymbolTable | undefined, fn: () => void) { const old = [currentScope, currentLocalSymbolTable, currentExportsSymbolTable] as const; currentScope = scope; const links = getNodeLinks(scope); - currentLocalSymbolTable = (links.locals ??= new Map()); + currentLocalSymbolTable = links.locals ??= new Map(); currentExportsSymbolTable = exports; fn(); [currentScope, currentLocalSymbolTable, currentExportsSymbolTable] = old; } - function withMembers(symbol: BasicSymbol, fn: () => void, table: "members" | "exports" = "members") { + function withMembers(symbol: EmitDeclarationSymbol, fn: () => void, table: "members" | "exports" = "members") { const old = [currentLocalSymbolTable, currentSymbol] as const; currentSymbol = symbol; - currentLocalSymbolTable = (symbol[table] ??= new Map()); + currentLocalSymbolTable = symbol[table] ??= new Map(); fn(); [currentLocalSymbolTable, currentSymbol] = old; } - function getStatementName(s: InterfaceDeclaration | ClassDeclaration | FunctionDeclaration) { - if(hasSyntacticModifier(s, ModifierFlags.Export) && hasSyntacticModifier(s, ModifierFlags.Default)) { + if (hasSyntacticModifier(s, ModifierFlags.Export) && hasSyntacticModifier(s, ModifierFlags.Default)) { return "@default" as MemberKey; } - if(s.name) { + if (s.name) { return getMemberKey(s.name); } } @@ -250,8 +305,8 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa forEachChild(node, bindWorker, arr => arr.forEach(bindWorker)); } function bindWorker(node?: Node) { - if(!node) return; - if(isMappedTypeNode(node)) { + if (!node) return; + if (isMappedTypeNode(node)) { const mappedType = node; withScope(node, /*exports*/ undefined, () => { bindTypeParameters([mappedType.typeParameter]); @@ -259,7 +314,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa bindWorker(mappedType.nameType); bindWorker(mappedType.type); } - else if(isConditionalTypeNode(node)) { + else if (isConditionalTypeNode(node)) { withScope(node.extendsType, /*exports*/ undefined, () => { bindWorker(node.extendsType); }); @@ -268,18 +323,18 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa getNodeLinks(node.trueType).locals = getNodeLinks(node.extendsType).locals; bindWorker(node.trueType); } - else if(isInferTypeNode(node)) { + else if (isInferTypeNode(node)) { const conditionalTypeOwner = findAncestor(node, isConditionalTypeNode); // Probably an error, infer not in a conditional type context // Try to bind the rest of it - if(conditionalTypeOwner) { + if (conditionalTypeOwner) { withScope(conditionalTypeOwner, /*exports*/ undefined, () => { bindTypeParameters([node.typeParameter]); }); } bindChildren(node); } - else if(isBlock(node)) { + else if (isBlock(node)) { // Do not go into bodies return; } @@ -295,17 +350,17 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa function bindVariable(d: VariableDeclaration | ParameterDeclaration) { bindTypeExpressions(d.type); const isExported = isVariableDeclaration(d) && hasSyntacticModifier(d.parent.parent, ModifierFlags.Export); - if(isIdentifier(d.name)) { + if (isIdentifier(d.name)) { addLocalAndExportDeclaration(getMemberKey(d.name), d, getSymbolFlagsForNode(d), isExported); } - else if(isBindingPattern(d.name)) { + else if (isBindingPattern(d.name)) { function bindBindingPattern(pattern: BindingPattern) { // type BindingPattern = ObjectBindingPattern | ArrayBindingPattern; (pattern.elements as NodeArray).forEach(b => { - if(b.kind === SyntaxKind.OmittedExpression) return; - if(!b.name) return; + if (b.kind === SyntaxKind.OmittedExpression) return; + if (!b.name) return; - if(isIdentifier(b.name)) { + if (isIdentifier(b.name)) { addLocalAndExportDeclaration(getMemberKey(b.name), b, getSymbolFlagsForNode(b), isExported); } else { @@ -316,11 +371,11 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa bindBindingPattern(d.name); } else { - assertNever(d.name); + Debug.assertNever(d.name); } } function bindEachFunctionsFirst(nodes: NodeArray | undefined): void { - if(!nodes) return; + if (!nodes) return; bindContainer(nodes.filter(n => n.kind === SyntaxKind.FunctionDeclaration)); bindContainer(nodes.filter(n => n.kind !== SyntaxKind.FunctionDeclaration)); } @@ -328,24 +383,24 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa function bindContainer(statements: NodeArray | Node[]) { statements.forEach(statement => { const isExported = hasSyntacticModifier(statement, ModifierFlags.Export); - if(isImportEqualsDeclaration(statement)) { + if (isImportEqualsDeclaration(statement)) { addLocalOnlyDeclaration(getMemberKey(statement.name), statement, getSymbolFlagsForNode(statement)); } - if(isImportDeclaration(statement)) { - if(!statement.importClause) { + if (isImportDeclaration(statement)) { + if (!statement.importClause) { return; } - if(statement.importClause.name) { + if (statement.importClause.name) { addLocalOnlyDeclaration(getMemberKey(statement.importClause.name), statement.importClause, getSymbolFlagsForNode(statement.importClause)); } - if(statement.importClause.namedBindings) { + if (statement.importClause.namedBindings) { const namedBindings = statement.importClause.namedBindings; - if(namedBindings.kind === SyntaxKind.NamedImports) { + if (namedBindings.kind === SyntaxKind.NamedImports) { namedBindings.elements.forEach(v => { addLocalOnlyDeclaration(getMemberKey(v.name), v, getSymbolFlagsForNode(v)); }); } - else if(namedBindings.kind === SyntaxKind.NamespaceImport) { + else if (namedBindings.kind === SyntaxKind.NamespaceImport) { addLocalOnlyDeclaration(getMemberKey(namedBindings.name), namedBindings, getSymbolFlagsForNode(namedBindings)); } else { @@ -353,10 +408,10 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa } } } - if(isVariableStatement(statement)) { + if (isVariableStatement(statement)) { statement.declarationList.declarations.forEach(bindVariable); } - if(isFunctionDeclaration(statement)) { + if (isFunctionDeclaration(statement)) { bindTypeParameters(statement.typeParameters); bindTypeExpressions(statement.type); withScope(statement, /*exports*/ undefined, () => { @@ -366,7 +421,7 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa addLocalAndExportDeclaration(getStatementName(statement), statement, getSymbolFlagsForNode(statement), isExported); } - if(isTypeAliasDeclaration(statement)) { + if (isTypeAliasDeclaration(statement)) { addLocalAndExportDeclaration(getMemberKey(statement.name), statement, getSymbolFlagsForNode(statement), isExported); withScope(statement, /*exports*/ undefined, () => { bindTypeParameters(statement.typeParameters); @@ -374,34 +429,34 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa bindTypeExpressions(statement.type); } // Default export declarations set isVisible on true on associated symbols in the type checker. - if(isExportAssignment(statement)) { - if(statement.expression && isIdentifier(statement.expression)) { + if (isExportAssignment(statement)) { + if (statement.expression && isIdentifier(statement.expression)) { const name = statement.expression.escapedText; postBindingAction.push(() => { const resolvedSymbol = resolveName(statement.expression, name, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias); - if(resolvedSymbol) { + if (resolvedSymbol) { resolvedSymbol.isVisible = true; resolvedSymbol.declarations.forEach(d => getNodeLinks(d).isVisible = true); } }); } } - if(isExportDeclaration(statement)) { - if(statement.exportClause && isNamedExports(statement.exportClause)) { + if (isExportDeclaration(statement)) { + if (statement.exportClause && isNamedExports(statement.exportClause)) { const elements = statement.exportClause.elements; if (statement.moduleSpecifier) { // TODO is currentExportsSymbolTable ok here? withScope(statement, /*exports*/ undefined, () => { elements.forEach(e => { const [flags, forbiddenFlags] = getSymbolFlagsForNode(e); - addLocalOnlyDeclaration(getMemberKey(e.propertyName ?? e.name), e, [flags | SymbolFlags.ExportValue , forbiddenFlags]); + addLocalOnlyDeclaration(getMemberKey(e.propertyName ?? e.name), e, [flags | SymbolFlags.ExportValue, forbiddenFlags]); }); }); } elements.forEach(e => { postBindingAction.push(() => { - const resolvedSymbol = resolveName(e,(e.propertyName ?? e.name).escapedText, ~0); - if(resolvedSymbol) { + const resolvedSymbol = resolveName(e, (e.propertyName ?? e.name).escapedText, ~0); + if (resolvedSymbol) { resolvedSymbol.isVisible = true; resolvedSymbol.declarations.forEach(d => getNodeLinks(d).isVisible = true); } @@ -409,26 +464,26 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa }); } } - if(isEnumDeclaration(statement)) { + if (isEnumDeclaration(statement)) { addLocalAndExportDeclaration(getMemberKey(statement.name), statement, getSymbolFlagsForNode(statement), isExported); withScope(statement, /*exports*/ undefined, () => { statement.members.forEach(m => { - addLocalOnlyDeclaration(getMemberNameFromElement(m), m, getSymbolFlagsForNode(m)) - }); - }) + addLocalOnlyDeclaration(getMemberNameFromElement(m), m, getSymbolFlagsForNode(m)); + }); + }); } - if(isModuleDeclaration(statement)) { + if (isModuleDeclaration(statement)) { function bindModuleDeclaration(moduleDeclaration: ModuleDeclaration) { - const name = isIdentifier(moduleDeclaration.name) ? moduleDeclaration.name: undefined; + const name = isIdentifier(moduleDeclaration.name) ? moduleDeclaration.name : undefined; const moduleSymbol = addLocalAndExportDeclaration(getMemberKey(name), moduleDeclaration, getSymbolFlagsForNode(moduleDeclaration), isExported); moduleSymbol.exports ??= new Map(); withScope(moduleDeclaration, moduleSymbol.exports, () => { - if(moduleDeclaration.body) { - if(isModuleBlock(moduleDeclaration.body)) { + if (moduleDeclaration.body) { + if (isModuleBlock(moduleDeclaration.body)) { const moduleBlock = moduleDeclaration.body; bindEachFunctionsFirst(moduleBlock.statements); } - else if(isModuleDeclaration(moduleDeclaration.body)) { + else if (isModuleDeclaration(moduleDeclaration.body)) { const subModule = moduleDeclaration.body; bindModuleDeclaration(subModule); } @@ -440,10 +495,10 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa } bindModuleDeclaration(statement); } - if(isInterfaceDeclaration(statement)) { + if (isInterfaceDeclaration(statement)) { const interfaceDeclaration = statement; const interfaceSymbol = addLocalAndExportDeclaration(getMemberKey(interfaceDeclaration.name), interfaceDeclaration, getSymbolFlagsForNode(interfaceDeclaration), isExported); - withScope(interfaceDeclaration, /*exports*/ undefined, () =>{ + withScope(interfaceDeclaration, /*exports*/ undefined, () => { bindTypeParameters(interfaceDeclaration.typeParameters); }); withMembers(interfaceSymbol, () => { @@ -454,16 +509,16 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa }); } - if(isClassDeclaration(statement)) { + if (isClassDeclaration(statement)) { const classDeclaration = statement; const classSymbol = addLocalAndExportDeclaration(getMemberKey(classDeclaration.name), classDeclaration, getSymbolFlagsForNode(classDeclaration), isExported); - withScope(classDeclaration, /*exports*/ undefined, () =>{ + withScope(classDeclaration, /*exports*/ undefined, () => { bindTypeParameters(classDeclaration.typeParameters); }); withMembers(classSymbol, () => { classDeclaration.members.forEach(m => { - if(hasSyntacticModifier(m, ModifierFlags.Static)) return; - if(m.kind === SyntaxKind.SemicolonClassElement || m.kind === SyntaxKind.ClassStaticBlockDeclaration) return; + if (hasSyntacticModifier(m, ModifierFlags.Static)) return; + if (m.kind === SyntaxKind.SemicolonClassElement || m.kind === SyntaxKind.ClassStaticBlockDeclaration) return; addLocalOnlyDeclaration(getMemberNameFromElement(m), m, getElementFlagsOrThrow(m)); bindTypeExpressions(m); @@ -471,9 +526,11 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa }); withMembers(classSymbol, () => { classDeclaration.members.forEach(m => { - if(!hasSyntacticModifier(m, ModifierFlags.Static)) return; - if(m.kind === SyntaxKind.SemicolonClassElement - || m.kind === SyntaxKind.ClassStaticBlockDeclaration) return; + if (!hasSyntacticModifier(m, ModifierFlags.Static)) return; + if ( + m.kind === SyntaxKind.SemicolonClassElement + || m.kind === SyntaxKind.ClassStaticBlockDeclaration + ) return; addLocalOnlyDeclaration(getMemberNameFromElement(m), m, getElementFlagsOrThrow(m)); bindTypeExpressions(m); @@ -485,206 +542,14 @@ export function bindSourceFile(file: SourceFile, options: CompilerOptions, packa } } -function isExternalModuleWorker(file: SourceFile, isModuleIndicatorNode: (node: Node) => boolean): Node | undefined { - return ( - forEach(file.statements, isAnExternalModuleIndicatorNode) || walkTreeForModuleIndicator(file, isModuleIndicatorNode) - // TODO: isolatedDeclarations: find a away to detect commonJS modules - ); -} - -function isAnExternalModuleIndicatorNode(node: Node) { - return hasSyntacticModifier(node, ModifierFlags.Export) - || isImportEqualsDeclaration(node) && isExternalModuleReference(node.moduleReference) - || isImportDeclaration(node) - || isExportAssignment(node) - || isExportDeclaration(node) ? node : undefined; -} - -function walkTreeForModuleIndicator(node: Node, isModuleIndicatorNode: (node: Node) => boolean) { - function walkTreeForModuleIndicatorWorker(node: Node): Node | undefined { - return isModuleIndicatorNode(node) ? node : forEachChild(node, walkTreeForModuleIndicatorWorker); - } - return walkTreeForModuleIndicatorWorker(node); -} -function isImportMeta(node: Node): boolean { - return isMetaProperty(node) && node.keywordToken === SyntaxKind.ImportKeyword && node.name.escapedText === "meta"; -} - - - -/** @internal */ -function getSetExternalModuleIndicator(options: CompilerOptions): [(node: SourceFile) => true | undefined, (node: Node) => boolean] { - - function isFileForcedToBeModuleByFormat(file: SourceFile): true | undefined { - // Excludes declaration files - they still require an explicit `export {}` or the like - // for back compat purposes. The only non-declaration files _not_ forced to be a module are `.js` files - // that aren't esm-mode (meaning not in a `type: module` scope). - return ([Extension.Cjs, Extension.Cts, Extension.Mjs, Extension.Mts].some(e => file.fileName.endsWith(e)) ? true : undefined); - } - - // TODO: Should this callback be cached? - switch (getEmitModuleDetectionKind(options)) { - case ModuleDetectionKind.Force: - // All non-declaration files are modules, declaration files still do the usual isFileProbablyExternalModule - return [(file) => !file.isDeclarationFile || undefined, () => true]; - - case ModuleDetectionKind.Legacy: - // Files are modules if they have imports, exports, or import.meta - return [isFileForcedToBeModuleByFormat, isImportMeta]; - - case ModuleDetectionKind.Auto: - - return [ - isFileForcedToBeModuleByFormat, - options.jsx === JsxEmit.ReactJSX || options.jsx === JsxEmit.ReactJSXDev? - n => isImportMeta(n) || isJsxOpeningLikeElement(n) || isJsxFragment(n): - isImportMeta - ]; - } -} - -function getImpliedNodeFormat(fileName: string, options: CompilerOptions, packageJsonFormat: ResolutionMode) { - switch (getEmitModuleResolutionKind(options)) { - case ModuleResolutionKind.Node16: - case ModuleResolutionKind.NodeNext: - return [Extension.Dmts, Extension.Mts, Extension.Mjs].some(e => fileName.endsWith(e)) ? ModuleKind.ESNext : - [Extension.Dcts, Extension.Cts, Extension.Cjs].some(e => fileName.endsWith(e)) ? ModuleKind.CommonJS : - [Extension.Dts, Extension.Ts, Extension.Tsx, Extension.Js, Extension.Jsx].some(e => fileName.endsWith(e)) ? packageJsonFormat : - undefined; // other extensions, like `json` or `tsbuildinfo`, are set as `undefined` here but they should never be fed through the transformer pipeline - default: - return undefined; - } -} - -const enum ModuleInstanceState { - NonInstantiated = 0, - Instantiated = 1, - ConstEnumOnly = 2 -} - -function getModuleInstanceState(node: ModuleDeclaration, visited?: Map): ModuleInstanceState { - return node.body ? getModuleInstanceStateCached(node.body, visited) : ModuleInstanceState.Instantiated; -} - -function getModuleInstanceStateCached(node: Node, visited = new Map()) { - const nodeId = getNodeId(node); - if (visited.has(nodeId)) { - return visited.get(nodeId) || ModuleInstanceState.NonInstantiated; - } - visited.set(nodeId, undefined); - const result = getModuleInstanceStateWorker(node, visited); - visited.set(nodeId, result); - return result; -} - -function getModuleInstanceStateWorker(node: Node, visited: Map): ModuleInstanceState { - // A module is uninstantiated if it contains only - switch (node.kind) { - // 1. interface declarations, type alias declarations - case SyntaxKind.InterfaceDeclaration: - case SyntaxKind.TypeAliasDeclaration: - return ModuleInstanceState.NonInstantiated; - // 2. const enum declarations - case SyntaxKind.EnumDeclaration: - if (isEnumConst(node as EnumDeclaration)) { - return ModuleInstanceState.ConstEnumOnly; - } - break; - // 3. non-exported import declarations - case SyntaxKind.ImportDeclaration: - case SyntaxKind.ImportEqualsDeclaration: - if (!(hasSyntacticModifier(node, ModifierFlags.Export))) { - return ModuleInstanceState.NonInstantiated; - } - break; - // 4. Export alias declarations pointing at only uninstantiated modules or things uninstantiated modules contain - case SyntaxKind.ExportDeclaration: - const exportDeclaration = node as ExportDeclaration; - if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === SyntaxKind.NamedExports) { - let state = ModuleInstanceState.NonInstantiated; - for (const specifier of exportDeclaration.exportClause.elements) { - const specifierState = getModuleInstanceStateForAliasTarget(specifier, visited); - if (specifierState > state) { - state = specifierState; - } - if (state === ModuleInstanceState.Instantiated) { - return state; - } - } - return state; - } - break; - // 5. other uninstantiated module declarations. - case SyntaxKind.ModuleBlock: { - let state = ModuleInstanceState.NonInstantiated; - forEachChild(node, n => { - const childState = getModuleInstanceStateCached(n, visited); - switch (childState) { - case ModuleInstanceState.NonInstantiated: - // child is non-instantiated - continue searching - return; - case ModuleInstanceState.ConstEnumOnly: - // child is const enum only - record state and continue searching - state = ModuleInstanceState.ConstEnumOnly; - return; - case ModuleInstanceState.Instantiated: - // child is instantiated - record state and stop - state = ModuleInstanceState.Instantiated; - return true; - default: - Debug.assertNever(childState); - } - }); - return state; - } - case SyntaxKind.ModuleDeclaration: - return getModuleInstanceState(node as ModuleDeclaration, visited); - case SyntaxKind.Identifier: - // Only jsdoc typedef definition can exist in jsdoc namespace, and it should - // be considered the same as type alias - if ((node as Identifier).isInJSDocNamespace) { - return ModuleInstanceState.NonInstantiated; - } - } - return ModuleInstanceState.Instantiated; -} - -function getModuleInstanceStateForAliasTarget(specifier: ExportSpecifier, visited: Map) { - const name = specifier.propertyName || specifier.name; - let p: Node | undefined = specifier.parent; - while (p) { - if (isBlock(p) || isModuleBlock(p) || isSourceFile(p)) { - const statements = p.statements; - let found: ModuleInstanceState | undefined; - for (const statement of statements) { - if (nodeHasName(statement, name)) { - const state = getModuleInstanceStateCached(statement, visited); - if (found === undefined || state > found) { - found = state; - } - if (found === ModuleInstanceState.Instantiated) { - return found; - } - } - } - if (found !== undefined) { - return found; - } - } - p = p.parent; - } - return ModuleInstanceState.Instantiated; // Couldn't locate, assume could refer to a value -} - - /** * Gets the symbolic name for a member from its type. */ -function getMemberNameFromElement(element: TypeElement | ClassElement | EnumMember): MemberKey | undefined{ +function getMemberNameFromElement(element: TypeElement | ClassElement | EnumMember): MemberKey | undefined { if (isConstructorDeclaration(element) || isConstructSignatureDeclaration(element)) { return "@constructor" as MemberKey; } const name = element.name; - if(!name) return undefined; + if (!name) return undefined; return getMemberKey(name) as MemberKey; } diff --git a/src/compiler/transformers/declarations/emit-host.ts b/src/compiler/transformers/declarations/emit-host.ts new file mode 100644 index 0000000000000..baa185f3eb495 --- /dev/null +++ b/src/compiler/transformers/declarations/emit-host.ts @@ -0,0 +1,94 @@ +import { + changeExtension, + CompilerOptions, + Extension, + fileExtensionIsOneOf, + getDeclarationEmitExtensionForPath, + getDirectoryPath, + getNodeId, + getRelativePathFromDirectory, + hasExtension, + resolvePath, + SourceFile, + SyntaxKind, + System, +} from "../../_namespaces/ts"; +import { + IsolatedEmitHost, +} from "./types"; + +export function createEmitDeclarationHost(allProjectFiles: string[], tsLibFiles: string[], options: CompilerOptions, sys: System): IsolatedEmitHost { + const getCompilerOptions = () => options; + const getCurrentDirectory = () => "."; + const getCommonSourceDirectory = () => "."; + const getCanonicalFileName = (f: string) => `./${f}`; + const projectFileMap = new Map( + allProjectFiles + .map(f => ({ kind: SyntaxKind.SourceFile, fileName: f } as SourceFile)) + .map(f => [f.fileName, getNodeId(f)]), + ); + const tsLibFileSet = new Set(tsLibFiles); + + return { + redirectTargetsMap: new Map(), + fileExists: sys.fileExists, + readFile: sys.readFile, + directoryExists: sys.directoryExists, + getDirectories: sys.getDirectories, + realpath: sys.realpath, + useCaseSensitiveFileNames: () => options.forceConsistentCasingInFileNames || sys.useCaseSensitiveFileNames, + // redirectTargetsMap: new Map(), + getSourceFiles() { + throw new Error("Not needed"); + }, + getCompilerOptions, + getCurrentDirectory, + getCommonSourceDirectory, + getCanonicalFileName, + getLibFileFromReference(ref) { + if (options.noLib) { + return undefined; + } + if (!tsLibFileSet.has(ref.fileName)) { + return; + } + return { + fileName: ref.fileName, + } as SourceFile; + }, + getSourceFileFromReference(referencingFile, ref) { + if (ref.fileName.startsWith("node_modules/") || ref.fileName.indexOf("/node_modules/") !== -1) { + return undefined; + } + if (fileExtensionIsOneOf(ref.fileName, [Extension.Cjs, Extension.Mjs, Extension.Js]) && !options.allowJs) { + return undefined; + } + let resolvedFile: string | undefined = resolvePath(getDirectoryPath(referencingFile.fileName), ref.fileName); + let resolvedFileId = projectFileMap.get(resolvedFile); + if (!hasExtension(resolvedFile) && resolvedFileId === undefined) { + [resolvedFile, resolvedFileId] = [Extension.Dts, Extension.Dmts, Extension.Dcts, Extension.Ts, Extension.Mts, Extension.Cts] + .map(e => resolvedFile + e) + .map(f => [f, projectFileMap.get(f)] as const) + .find(([_, id]) => id !== undefined) ?? []; + + if (!resolvedFile) return undefined; + } + if (!projectFileMap.has(resolvedFile)) { + return undefined; + } + const resolvedDeclarationFile = fileExtensionIsOneOf(resolvedFile, [Extension.Dts, Extension.Dmts, Extension.Dcts]) ? resolvedFile : + changeExtension(resolvedFile, getDeclarationEmitExtensionForPath(resolvedFile)); + return { + fileName: getRelativePathFromDirectory( + getDirectoryPath(referencingFile.fileName), + resolvedDeclarationFile, + /*ignoreCase*/ false, + ), + id: resolvedFileId, + } as any as SourceFile; + }, + isSourceOfProjectReferenceRedirect() { + return false; + }, + }; +} diff --git a/external-declarations/src/compiler/emit-resolver.ts b/src/compiler/transformers/declarations/emit-resolver.ts similarity index 76% rename from external-declarations/src/compiler/emit-resolver.ts rename to src/compiler/transformers/declarations/emit-resolver.ts index b7dd841659069..429d0a4b8b7e5 100644 --- a/external-declarations/src/compiler/emit-resolver.ts +++ b/src/compiler/transformers/declarations/emit-resolver.ts @@ -1,24 +1,32 @@ import { - __String, - AccessorDeclaration, - BindingPattern, - CompilerOptions, + AnyImportSyntax, + appendIfUnique, ComputedPropertyName, + Debug, Declaration, DeclarationName, + determineIfDeclarationIsVisible, ElementAccessExpression, + emptyArray, EntityNameOrEntityNameExpression, EnumDeclaration, EnumMember, + every, Expression, factory, + filter, findAncestor, FunctionDeclaration, FunctionLikeDeclaration, getCombinedModifierFlags, getCombinedNodeFlags, + getFirstIdentifier, getNameOfDeclaration, getParseTreeNode, + getTextOfNode, + hasDynamicName, + hasProperty, + hasSyntacticModifier, Identifier, ImportClause, ImportEqualsDeclaration, @@ -29,6 +37,7 @@ import { isBinaryExpression, isBindingElement, isElementAccessExpression, + isEntityNameExpression, isEnumDeclaration, isEnumMember, isExpressionStatement, @@ -38,80 +47,59 @@ import { isGetAccessor, isGetAccessorDeclaration, isIdentifier, + isInJSFile, + isLateVisibilityPaintedStatement, isNumericLiteral, isParameterPropertyDeclaration, + isPartOfTypeNode, isPrefixUnaryExpression, isPropertyAccessExpression, isSetAccessor, isSetAccessorDeclaration, - isSourceFile, isStringLiteralLike, isTemplateExpression, + isThisIdentifier, isVariableDeclaration, isVariableStatement, + LateBoundDeclaration, + LateVisibilityPaintedStatement, ModifierFlags, NamespaceImport, Node, NodeArray, NodeFlags, + nodeIsPresent, NoSubstitutionTemplateLiteral, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertyName, PropertySignature, - ResolutionMode, + skipParentheses, SourceFile, Statement, + SymbolAccessibility, SymbolFlags, + SymbolVisibilityResult, SyntaxKind, VariableDeclaration, VariableDeclarationList, -} from "typescript"; - -import { - Debug, -} from "./debug"; +} from "../../_namespaces/ts"; import { - BasicSymbol, - bindSourceFile, - NodeLinks, + bindSourceFileForDeclarationEmit, + EmitDeclarationNodeLinks, + EmitDeclarationSymbol, } from "./emit-binder"; import { makeEvaluator, } from "./evaluator"; import { - appendIfUnique, - emptyArray, - every, - filter, - hasProperty, -} from "./lang-utils"; -import { + IsolatedEmitHost, IsolatedEmitResolver, - LateBoundDeclaration, - LateVisibilityPaintedStatement, - SymbolAccessibility, - SymbolVisibilityResult, } from "./types"; import { - AnyImportSyntax, - getFirstIdentifier, getMemberKey, - hasDynamicName, - hasEffectiveModifier, - hasSyntacticModifier, - isAmbientDeclaration, - isBindingPattern, - isEntityNameExpression, - isExternalModuleAugmentation, - isInJSFile, - isLateVisibilityPaintedStatement, - isPartOfTypeNode, - isThisIdentifier, MemberKey, - nodeIsPresent, - skipParentheses, } from "./utils"; const knownFunctionMembers = new Set([ @@ -122,8 +110,8 @@ const knownFunctionMembers = new Set([ "I:prototype", "I:length", ]); -export function createEmitResolver(file: SourceFile, options: CompilerOptions, packageModuleType: ResolutionMode): IsolatedEmitResolver { - const { getNodeLinks, resolveMemberKey, resolveName } = bindSourceFile(file, options, packageModuleType); +export function createEmitDeclarationResolver(file: SourceFile, host: IsolatedEmitHost): IsolatedEmitResolver { + const { getNodeLinks, resolveMemberKey, resolveName } = bindSourceFileForDeclarationEmit(file, host); function getEnumValueFromName(name: PropertyName | NoSubstitutionTemplateLiteral, location: EnumDeclaration) { const enumKey = getMemberKey(name); @@ -328,16 +316,16 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p const declaredAccessors = symbol?.declarations.filter(isAccessor); const declarations = declaredAccessors?.length ? declaredAccessors : [declaration]; return { - firstAccessor: declarations[0] as AccessorDeclaration, - secondAccessor: declarations[1] as AccessorDeclaration, + 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: NodeLinks | undefined; - const isDeclaration = isAmbientDeclaration(node) && !hasSyntacticModifier(node, ModifierFlags.Const); + 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) { @@ -384,11 +372,8 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p const name = getNameOfDeclaration(node); return !hasDynamicName(node) || isIdentifierComputedName(name); }, - getPropertiesOfContainerFunction(node: Declaration) { - return []; - }, isImplementationOfOverload(node) { - function getSignaturesOfSymbol(symbol: BasicSymbol | undefined): Node[] { + function getSignaturesOfSymbol(symbol: EmitDeclarationSymbol | undefined): Node[] { if (!symbol) return emptyArray; if (symbol.signatureDeclarations) return symbol.signatureDeclarations; @@ -422,8 +407,8 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p 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 = node.symbol; - const signaturesOfSymbol = getSignaturesOfSymbol(symbol as unknown as BasicSymbol); + const symbol = getNodeLinks(node).symbol; + 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; @@ -456,7 +441,7 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p return true; }, isEntityNameVisible, - getTypeReferenceDirectivesForEntityName(name) { + getTypeReferenceDirectivesForEntityName() { return undefined; }, isExpandoFunction, @@ -481,114 +466,17 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p if (node) { const links = getNodeLinks(node); if (links.isVisible === undefined) { - links.isVisible = links.symbol?.isVisible ?? !!determineIfDeclarationIsVisible(); + links.isVisible = links.symbol?.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 ( - !(getCombinedModifierFlags(node as Declaration) & ModifierFlags.Export) && - !(node.kind !== SyntaxKind.ImportEqualsDeclaration && parent.kind !== SyntaxKind.SourceFile && isAmbientDeclaration(parent)) - ) { - 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 hasVisibleDeclarations(symbol: BasicSymbol, shouldComputeAliasToMakeVisible: boolean): SymbolVisibilityResult | undefined { + function hasVisibleDeclarations(symbol: EmitDeclarationSymbol, shouldComputeAliasToMakeVisible: boolean): SymbolVisibilityResult | undefined { let aliasesToMakeVisible: LateVisibilityPaintedStatement[] | undefined; - if (!every(filter(symbol.declarations, d => d.kind !== SyntaxKind.Identifier), getIsDeclarationVisible)) { + if (!every(filter(symbol.declarations, d => d.kind !== SyntaxKind.Identifier), n => getIsDeclarationVisible(n))) { return undefined; } return { accessibility: SymbolAccessibility.Accessible, aliasesToMakeVisible }; @@ -706,43 +594,12 @@ export function createEmitResolver(file: SourceFile, options: CompilerOptions, p // We don't actually keep enough information for full accessibility, // We just do this to mark accessible imports accessibility: SymbolAccessibility.Accessible, - errorSymbolName: firstIdentifier.text, + errorSymbolName: getTextOfNode(firstIdentifier), errorNode: firstIdentifier, }; } } -function getRootDeclaration(node: Node): Node { - while (node.kind === SyntaxKind.BindingElement) { - node = node.parent.parent; - } - return node; -} - -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; -} - -// Isolated declarations never support global source files. -function isGlobalSourceFile(node: Node) { - return isSourceFile(node) && !isExternalModule(node); -} -function isExternalModule(file: SourceFile): boolean { - return file.externalModuleIndicator !== undefined; -} - function getAnyImportSyntax(node: Node): AnyImportSyntax | undefined { switch (node.kind) { case SyntaxKind.ImportEqualsDeclaration: diff --git a/external-declarations/src/compiler/evaluator.ts b/src/compiler/transformers/declarations/evaluator.ts similarity index 88% rename from external-declarations/src/compiler/evaluator.ts rename to src/compiler/transformers/declarations/evaluator.ts index 1f6cec04ef545..1b95ac7ef562d 100644 --- a/external-declarations/src/compiler/evaluator.ts +++ b/src/compiler/transformers/declarations/evaluator.ts @@ -1,11 +1,23 @@ -import { __String, BinaryExpression, Declaration, ElementAccessExpression, EntityNameExpression, Expression, NumericLiteral, ParenthesizedExpression, PrefixUnaryExpression, StringLiteralLike, SyntaxKind, TemplateExpression } from "typescript"; +import { + BinaryExpression, + Declaration, + ElementAccessExpression, + EntityNameExpression, + Expression, + NumericLiteral, + ParenthesizedExpression, + PrefixUnaryExpression, + StringLiteralLike, + SyntaxKind, + TemplateExpression, +} from "../../_namespaces/ts"; interface EvaluationResolver { evaluateEntityNameExpression(expr: EntityNameExpression, location: Declaration | undefined): string | number | undefined; evaluateElementAccessExpression(expr: ElementAccessExpression, location: Declaration | undefined): string | number | undefined; onNumericLiteral(expr: NumericLiteral): void; } -export function makeEvaluator ({ evaluateElementAccessExpression, evaluateEntityNameExpression, onNumericLiteral }: EvaluationResolver) { +export function makeEvaluator({ evaluateElementAccessExpression, evaluateEntityNameExpression, onNumericLiteral }: EvaluationResolver) { function evaluate(expr: Expression, location?: Declaration): string | number | undefined { switch (expr.kind) { case SyntaxKind.PrefixUnaryExpression: @@ -70,7 +82,7 @@ export function makeEvaluator ({ evaluateElementAccessExpression, evaluateEntity return +(expr as NumericLiteral).text; case SyntaxKind.ParenthesizedExpression: return evaluate((expr as ParenthesizedExpression).expression, location); - case SyntaxKind.Identifier: + case SyntaxKind.Identifier: case SyntaxKind.PropertyAccessExpression: return evaluateEntityNameExpression(expr as EntityNameExpression, location); case SyntaxKind.ElementAccessExpression: diff --git a/src/compiler/transformers/declarations/types.ts b/src/compiler/transformers/declarations/types.ts new file mode 100644 index 0000000000000..94775e51d3a0e --- /dev/null +++ b/src/compiler/transformers/declarations/types.ts @@ -0,0 +1,61 @@ +import { + AccessorDeclaration, + AllAccessorDeclarations, + AnyImportSyntax, + CompilerOptions, + ComputedPropertyName, + Declaration, + ElementAccessExpression, + EntityNameOrEntityNameExpression, + EnumMember, + Expression, + FileReference, + FunctionDeclaration, + ImportDeclaration, + LateBoundDeclaration, + ModuleResolutionHost, + Node, + ParameterDeclaration, + PropertyAccessExpression, + PropertyDeclaration, + PropertySignature, + RedirectTargetsMap, + ResolutionMode, + SignatureDeclaration, + SourceFile, + StringLiteralLike, + Symbol, + SymbolTracker, + SymbolVisibilityResult, + VariableDeclaration, +} from "../../_namespaces/ts"; + +export interface IsolatedEmitHost extends ModuleResolutionHost { + readonly redirectTargetsMap: RedirectTargetsMap; + getCommonSourceDirectory(): string; + getCompilerOptions(): CompilerOptions; + getSourceFiles(): SourceFile[]; + getSourceFileFromReference(referencingFile: SourceFile, ref: FileReference): SourceFile | undefined; + getLibFileFromReference(ref: FileReference): SourceFile | undefined; + isSourceOfProjectReferenceRedirect(fileName: string): boolean; + getCanonicalFileName(p: string): string; + getCurrentDirectory(): string; + useCaseSensitiveFileNames?(): boolean; +} + +export interface IsolatedEmitResolver { + 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; +} diff --git a/src/compiler/transformers/declarations/utils.ts b/src/compiler/transformers/declarations/utils.ts new file mode 100644 index 0000000000000..3f39d4519c095 --- /dev/null +++ b/src/compiler/transformers/declarations/utils.ts @@ -0,0 +1,85 @@ +import { + isComputedPropertyName, + isIdentifier, + isNumericLiteral, + isPrefixUnaryExpression, + isPrivateIdentifier, + isPropertyAccessExpression, + isStringLiteral, + isStringLiteralLike, +} from "../../_namespaces/ts"; +import { + ComputedPropertyName, + NoSubstitutionTemplateLiteral, + PropertyName, + SyntaxKind, +} from "../../types"; + +export type MemberKey = string & { + __memberKey: void; +}; + +export function getMemberKey(name: string | Exclude | NoSubstitutionTemplateLiteral): MemberKey; +export function getMemberKey(name: string | PropertyName | NoSubstitutionTemplateLiteral | undefined): MemberKey | undefined; +export function getMemberKey(name: string | PropertyName | NoSubstitutionTemplateLiteral | undefined): string | undefined { + if (name === undefined) { + return undefined; + } + if (typeof name === "string") { + return ("I:" + name); + } + if (isPrivateIdentifier(name)) { + return ("P:" + name.escapedText); + } + if (isIdentifier(name)) { + return ("I:" + name.escapedText); + } + if (isStringLiteralLike(name)) { + return ("I:" + name.text); + } + if (isNumericLiteral(name)) { + return ("I:" + (+name.text)); + } + if (isComputedPropertyName(name)) { + let computedName = name.expression; + + if (isStringLiteral(computedName)) { + return ("I:" + computedName.text); + } + if (isNumericLiteral(computedName)) { + return ("I:" + (+computedName.text)); + } + if ( + isPrefixUnaryExpression(computedName) + && isNumericLiteral(computedName.operand) + ) { + if (computedName.operator === SyntaxKind.MinusToken) { + return ("I:" + (-computedName.operand.text)); + } + else if (computedName.operator === SyntaxKind.PlusToken) { + return ("I:" + (-computedName.operand.text)); + } + else { + return undefined; + } + } + let fullId = "C:"; + // We only support dotted identifiers as property keys + while (true) { + if (isIdentifier(computedName)) { + fullId += computedName.escapedText; + break; + } + else if (isPropertyAccessExpression(computedName)) { + fullId += computedName.name.escapedText; + computedName = computedName.expression; + } + else { + // Can't compute a property key, bail + return undefined; + } + } + return fullId; + } + return undefined; +} diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 1f5437a728b90..f115a4d516ce2 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1359,7 +1359,6 @@ export type HasIllegalModifiers = | MissingDeclaration | NamespaceExportDeclaration; - export type HasInferredType = | FunctionDeclaration | MethodDeclaration diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 9a0071937e7e3..8414b584129e2 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -33,6 +33,7 @@ import { BindableStaticNameExpression, BindingElement, BindingElementOfBareOrAccessedRequire, + BindingPattern, Block, BundleFileSection, BundleFileSectionKind, @@ -5080,7 +5081,6 @@ export function isDynamicName(name: DeclarationName): boolean { } /** - * * @internal */ export function hasIdentifierComputedName(declaration: Declaration): declaration is DynamicNamedDeclaration | DynamicNamedBinaryExpression { @@ -5093,13 +5093,12 @@ export function isIdentifierComputedName(name: DeclarationName): boolean { return false; } let expr = isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression; - while(isPropertyAccessExpression(expr)) { + while (isPropertyAccessExpression(expr)) { expr = expr.expression; } return isIdentifier(expr); } - /** @internal */ export function getPropertyNameForPropertyNameNode(name: PropertyName | JsxAttributeName): __String | undefined { switch (name.kind) { @@ -10453,3 +10452,119 @@ export function getPropertyNameFromType(type: StringLiteralType | NumberLiteralT } return Debug.fail(); } + +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; +} +export function isGlobalSourceFile(node: Node) { + return node.kind === SyntaxKind.SourceFile && !isExternalOrCommonJsModule(node as SourceFile); +} + +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; + } +} From 7abf074481f408ce815cc047881458938f11ab3a Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 12 Oct 2023 12:58:29 +0100 Subject: [PATCH 094/224] Moved transform project api to TS. Improve fixer performance Signed-off-by: Titian Cernicova-Dragomir --- external-declarations/fixed-tests.jsonc | 5 +- .../src/code-mod/fixer/code-fixer-applier.ts | 30 +++-- .../src/code-mod/fixer/snapshots.ts | 2 +- external-declarations/src/code-mod/index.ts | 4 +- .../run-test-updater-parallel.ts | 2 +- .../tsc-test-fixer/run-test-updater.ts | 20 +++- .../src/code-mod/tsc-test-fixer/test-fixer.ts | 34 +++++- external-declarations/src/main.ts | 39 +++--- .../src/test-runner/test-runner-main.ts | 112 +++++++++++------- .../tsc-infrastructure/compiler.ts | 25 ++-- .../src/test-runner/utils.ts | 8 +- src/compiler/_namespaces/ts.ts | 1 + src/compiler/transformers/declarations.ts | 2 +- .../declarations}/transform-project.ts | 79 ++++++------ src/compiler/types.ts | 3 + .../fixMissingTypeAnnotationOnExports.ts | 15 ++- src/services/types.ts | 2 +- 17 files changed, 245 insertions(+), 138 deletions(-) rename {external-declarations/src/compiler => src/compiler/transformers/declarations}/transform-project.ts (51%) diff --git a/external-declarations/fixed-tests.jsonc b/external-declarations/fixed-tests.jsonc index f5d06f728ab74..7626f305afda5 100644 --- a/external-declarations/fixed-tests.jsonc +++ b/external-declarations/fixed-tests.jsonc @@ -55,8 +55,6 @@ "not-fixed-with-unreliable-errors": [ // Language service crash on computing diagnostic (call stack size exceeded) "binderBinaryExpressionStress", - // Language service crashes on testing base type abstractness (only in test not in tsc or vs code) - "noCrashOnMixin", // Bad syntax beyond recovery "destructuringParameterDeclaration6", "thisTypeInFunctionsNegative", @@ -99,6 +97,7 @@ "overloadsWithComputedNames", // A_computed_property_name_must_be_of_type_string_number_symbol_or_any, "bigintIndex", + "giant", "symbolProperty59", "computedPropertyNames14_ES5", "computedPropertyNames14_ES6", @@ -116,6 +115,8 @@ "typeUsedAsTypeLiteralIndex", "parser.asyncGenerators.classMethods.es2018", "decoratorsOnComputedProperties", + "indexSignatureMustHaveTypeAnnotation", + "intTypeCheck", // Invalid escape sequences "invalidTaggedTemplateEscapeSequences", "objectTypeWithStringNamedPropertyOfIllegalCharacters", diff --git a/external-declarations/src/code-mod/fixer/code-fixer-applier.ts b/external-declarations/src/code-mod/fixer/code-fixer-applier.ts index b59bf962025f7..9e0d266f788ae 100644 --- a/external-declarations/src/code-mod/fixer/code-fixer-applier.ts +++ b/external-declarations/src/code-mod/fixer/code-fixer-applier.ts @@ -4,6 +4,7 @@ import ts, { createCompilerHost, createDocumentRegistry, DocumentRegistry, + UserPreferences, } from "typescript"; import { CodeFixAction, @@ -31,20 +32,20 @@ export async function fixProjectRaw( documentRegistry: DocumentRegistry | undefined, snapShotRegistry: VersionedFileRegistry, fixableErrors: Set, - selectFix: (service: LanguageService, diag: Diagnostic, fixes: readonly CodeFixAction[], files: VersionedFileRegistry, signal: BasicAbortSignal) => Promise, + userPreferences: ts.UserPreferences, + selectFix: (service: LanguageService, diag: Diagnostic, fixes: readonly CodeFixAction[], files: VersionedFileRegistry, signal: BasicAbortSignal) => Promise | (number | undefined), validateFix?: (service: LanguageService) => Promise, onProjectLoaded?: (service: LanguageService, documentRegistry: DocumentRegistry, files: VersionedFileRegistry, signal: BasicAbortSignal) => Promise, ) { documentRegistry = documentRegistry ?? createDocumentRegistry( host.useCaseSensitiveFileNames?.(), host.getCurrentDirectory(), - ) + ); const service = ts.createLanguageService(host, documentRegistry); - const program = service.getProgram()!; const signal: BasicAbortSignal = { isAborted: false }; - await onProjectLoaded?.(service, documentRegistry, snapShotRegistry, signal); + onProjectLoaded && (await onProjectLoaded?.(service, documentRegistry, snapShotRegistry, signal)); const files = program.getSourceFiles(); const skips = new Map(); const defaultFormatOptions = ts.getDefaultFormatCodeSettings(); @@ -61,7 +62,6 @@ export async function fixProjectRaw( let stuckCount = 0; while (diagnostics.length > skipCount) { const diag = diagnostics[skipCount]; - // Ensure we break out of a unfixable loop if (lastFixedDiagnostic?.start === diag.start) { stuckCount++; @@ -76,11 +76,12 @@ TS${diag.code}: ${diag.messageText} ${diag.file?.text.substring(diag.start ?? 0, (diag.start ?? 0) + (diag.length ?? 0))} `); } - const fixes = service.getCodeFixesAtPosition(file.fileName, diag.start!, diag.start! + diag.length!, [diag.code], defaultFormatOptions, {}); + const fixes = service.getCodeFixesAtPosition(file.fileName, diag.start!, diag.start! + diag.length!, [diag.code], defaultFormatOptions, userPreferences); signal.isAborted = false; let selectedFix: number | undefined = -1; if (fixes.length) { - selectedFix = await selectFix(service, diag, fixes, snapShotRegistry, signal); + const fixResult = selectFix(service, diag, fixes, snapShotRegistry, signal); + selectedFix = typeof fixResult === "number" || fixResult === undefined ? fixResult : (await fixResult); if (signal.isAborted || selectedFix === undefined) { // Restart files. index = -1; @@ -99,6 +100,7 @@ ${diag.file?.text.substring(diag.start ?? 0, (diag.start ?? 0) + (diag.length ?? old: VersionedScriptSnapshot; new: VersionedScriptSnapshot; }[] = []; + for (const fileChanges of fix.changes) { const snapshot = snapShotRegistry.getSnapshot(fileChanges.fileName)!; const newSnapShot = applyChangesSnapShot(snapshot, fileChanges.textChanges); @@ -121,13 +123,17 @@ ${diag.file?.text.substring(diag.start ?? 0, (diag.start ?? 0) + (diag.length ?? } service.dispose(); function getIsolatedDeclarationsErrors(fileName: string) { - return service.getSemanticDiagnostics(fileName).filter(d => fixableErrors.has(d.code)); + const program = service.getProgram(); + if (!program) return []; + const sourceFile = program.getSourceFile(fileName); + return program.getDeclarationDiagnostics(sourceFile).filter(d => fixableErrors.has(d.code)) ?? []; } } export async function fixProject( tsconfigPath: string, fixableErrors: Set, + userPreferences: UserPreferences, selectFix: (service: LanguageService, diag: Diagnostic, fixes: readonly CodeFixAction[], files: VersionedFileRegistry, signal: BasicAbortSignal) => Promise, validateFix?: (service: LanguageService) => Promise, onProjectLoaded?: (service: LanguageService, documentRegistry: DocumentRegistry, files: VersionedFileRegistry, signal: BasicAbortSignal) => Promise, @@ -146,7 +152,7 @@ export async function fixProject( const compilerHost = createCompilerHost(cmdLine.options); const langHost = createLanguageHost(snapShotRegistry, cmdLine, compilerHost); - fixProjectRaw(langHost, /*documentRegistry*/ undefined, snapShotRegistry, fixableErrors, selectFix, validateFix, onProjectLoaded); + fixProjectRaw(langHost, /*documentRegistry*/ undefined, snapShotRegistry, fixableErrors, userPreferences, selectFix, validateFix, onProjectLoaded); } export function createLanguageHost( @@ -180,6 +186,12 @@ export function createLanguageHost( writeFile(fileName, content) { compilerHost.writeFile(fileName, content, !!cmdLine.options.emitBOM); }, + directoryExists(directoryName) { + return compilerHost.directoryExists!(directoryName); + }, + getDirectories(directoryName) { + return compilerHost.getDirectories!(directoryName); + }, }; return langHost; } diff --git a/external-declarations/src/code-mod/fixer/snapshots.ts b/external-declarations/src/code-mod/fixer/snapshots.ts index 91c051aeceb63..45ac164aaa279 100644 --- a/external-declarations/src/code-mod/fixer/snapshots.ts +++ b/external-declarations/src/code-mod/fixer/snapshots.ts @@ -30,7 +30,7 @@ export function createSnapshotRegistry(sys: Pick 0); + await fixProject(config, isolatedDeclarationsErrors, {}, async () => 0); } } diff --git a/external-declarations/src/code-mod/tsc-test-fixer/run-test-updater-parallel.ts b/external-declarations/src/code-mod/tsc-test-fixer/run-test-updater-parallel.ts index f9786ab909978..07b86bc876a5c 100644 --- a/external-declarations/src/code-mod/tsc-test-fixer/run-test-updater-parallel.ts +++ b/external-declarations/src/code-mod/tsc-test-fixer/run-test-updater-parallel.ts @@ -68,7 +68,7 @@ const shardCount = parsedArgs.shardCount ?? 6; async function main() { let runCount = 0; - const commandLine = `node ./build/code-mod/test-fixer/run-test-updater.js ${process.argv.slice(2).join(" ")} ${parsedArgs.shardCount === undefined ? `--shardCount=${shardCount} ` : ""}`; + const commandLine = `node ./build/code-mod/tsc-test-fixer/run-test-updater.js ${process.argv.slice(2).join(" ")} ${parsedArgs.shardCount === undefined ? `--shardCount=${shardCount} ` : ""}`; let lastWrite = new Date().getTime(); const startTime = new Date().getTime(); const elapsedTime = (now: number) => `${((now - startTime) / 1000 / 60).toFixed(2)} minutes`; diff --git a/external-declarations/src/code-mod/tsc-test-fixer/run-test-updater.ts b/external-declarations/src/code-mod/tsc-test-fixer/run-test-updater.ts index 6ff780ab4d6a5..9e88b0be9405a 100644 --- a/external-declarations/src/code-mod/tsc-test-fixer/run-test-updater.ts +++ b/external-declarations/src/code-mod/tsc-test-fixer/run-test-updater.ts @@ -1,7 +1,7 @@ import "source-map-support/register"; import * as fs from "fs/promises"; -import * as fsPath from "path"; +import path, * as fsPath from "path"; import ts from "typescript"; import { @@ -34,7 +34,6 @@ export const testRunnerCLIConfiguration = parserConfiguration({ description: "Test filter to run", }, rootPaths: ArgType.StringArray(), - originalOutputPath: ArgType.String(), updatedOutputPath: ArgType.String(), shard: ArgType.Number(), shardCount: ArgType.Number(), @@ -55,22 +54,31 @@ const allTests = rootCasePaths .flatMap(r => readAllFiles(r, filter).map(file => ({ file, root: r }))) .filter(f => !excludeFilter.exec(f.file)); +async function measureAndReport(name: string, fn: () => Promise) { + const start = Date.now(); + try { + return await fn(); + } + finally { + const time = Date.now() - start; + if (time > 300) { + console.log(`Test ${name} took ${time}`); + } + } +} async function main() { const testsPerShared = shardCount && Math.round(allTests.length / shardCount); const [start, end] = shard === undefined || shardCount === undefined || testsPerShared === undefined ? [0, allTests.length] : [shard * testsPerShared, (shard === shardCount - 1) ? allTests.length : (shard + 1) * testsPerShared]; - - // const libFiles = (await readDirRecursive(libFolder)).map(n => normalizePath(path.join("/.lib", n))); for (let count = start; count < end; count++) { const testFile = normalizePath(allTests[count].file); const rootPath = normalizePath(allTests[count].root); const caseData = await loadTestCase(testFile); - await writeTestCase(caseData, testFile.replace(rootPath, parsedArgs.originalOutputPath ?? "./tsc-tests/original-tests")); const updatedTestFileName = testFile.replace(rootPath, parsedArgs.updatedOutputPath ?? "./tsc-tests/updated-tests"); - const result = await fixTestCase(caseData, {}); + const result = await measureAndReport(path.basename(testFile), () => fixTestCase(caseData, {})); if (result instanceof Error) { await ensureDir(fsPath.dirname(updatedTestFileName)); await fs.writeFile( diff --git a/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts b/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts index 526f6de8af670..dc969b278c21b 100644 --- a/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts +++ b/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts @@ -1,4 +1,8 @@ -import ts from "typescript"; +import ts, { + DocumentRegistry, + Path, + SourceFile, +} from "typescript"; import { prepareTestOptionsAndFs, @@ -43,6 +47,29 @@ export async function fixTestCase(caseData: TestCaseWithBOM, settings: ts.Compil } } +export interface ExternalDocumentCache { + setDocument(key: string, path: Path, sourceFile: SourceFile): void; + getDocument(key: string, path: Path): SourceFile | undefined; +} +const cache = new Map>(); +const isCashablePath = (path: string) => path.startsWith("/.ts") || path.startsWith("/.lib"); +const registry: ExternalDocumentCache = { + getDocument(key, path) { + if (!isCashablePath(path)) return; + const sourceFile = cache.get(key)?.get(path); + return sourceFile; + }, + setDocument(key, path, sourceFile) { + if (!isCashablePath(path)) return; + let byKey = cache.get(key); + if (!byKey) { + cache.set(key, byKey = new Map()); + } + byKey.set(path, sourceFile); + }, +}; +const createDocumentRegistryInternal: (useCaseSensitiveFileNames: boolean, currentDirectory: string, externalCache?: ExternalDocumentCache) => DocumentRegistry = (ts as any).createDocumentRegistryInternal; + async function fixTestFiles(toBeCompiled: TestFile[], settings: ts.CompilerOptions) { const { fs, options, programFileNames } = prepareTestOptionsAndFs( toBeCompiled, @@ -66,10 +93,11 @@ async function fixTestFiles(toBeCompiled: TestFile[], settings: ts.CompilerOptio await fixProjectRaw( langHost, - /*documentRegistry*/ undefined, + createDocumentRegistryInternal(host.useCaseSensitiveFileNames(), host.getCurrentDirectory(), registry), snapShotRegistry, isolatedDeclarationsErrors, - async () => 0, + { includeRelativeTypeFixes: false, includeInlineTypeFixes: false }, + () => 0, ); return toBeCompiled.map(unit => ({ diff --git a/external-declarations/src/main.ts b/external-declarations/src/main.ts index aa0fd98a8861a..b75cb7e20d229 100644 --- a/external-declarations/src/main.ts +++ b/external-declarations/src/main.ts @@ -2,21 +2,25 @@ import * as fs from "fs"; import * as path from "path"; import * as ts from "typescript"; -import { normalizePath } from "./compiler/path-utils"; -import { installTracer, tracer } from "./compiler/perf-tracer"; -import { transformProject } from "./compiler/transform-project"; -import { ArgType, parseArgs } from "./utils/cli-parser"; - +import { + normalizePath, +} from "./compiler/path-utils"; +import { + ArgType, + parseArgs, +} from "./utils/cli-parser"; (ts as any).Debug.enableDebugInfo(); -interface CancellationToken { isCancelled: boolean } +interface CancellationToken { + isCancelled: boolean; +} const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), { default: ArgType.StringArray(), project: { type: ArgType.String(), description: "Project configuration", - required: true + required: true, }, watch: { type: ArgType.Boolean(), @@ -25,7 +29,7 @@ const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2 declarationDir: { type: ArgType.String(), description: "Output dir", - } + }, }); printUsageOnErrors(); @@ -34,10 +38,9 @@ if (path.extname(projectConfig) !== ".json") { projectConfig = normalizePath(path.join(projectConfig, "tsconfig.json")); } - let watched: { - watcher: fs.FSWatcher, - path: string, + watcher: fs.FSWatcher; + path: string; }[] = []; function watch(rootDir: string) { @@ -49,14 +52,13 @@ function watch(rootDir: string) { else { newWatched = [rootDir]; } - if(watched.length !== newWatched.length || !watched.every((v, index) => v.path === newWatched[index])) { + if (watched.length !== newWatched.length || !watched.every((v, index) => v.path === newWatched[index])) { watched.forEach(f => f.watcher.close()); watched = newWatched.map(f => ({ path: f, watcher: fs.watch(f, { persistent: true, recursive: true }, cancelAndRestart), })); } - } } let lastRunCancellation: CancellationToken = { isCancelled: false }; @@ -65,28 +67,25 @@ async function delay(ms: number) { return new Promise(r => setTimeout(r, ms)); } function cancelAndRestart(event: fs.WatchEventType, filename: string) { - console.log(event, filename); lastRunCancellation.isCancelled = true; lastRunCancellation = { isCancelled: false }; main(lastRunCancellation, 50); } async function main(cancellationToken: CancellationToken, msDelay: number) { await delay(msDelay); - if(cancellationToken.isCancelled) return; + if (cancellationToken.isCancelled) return; console.log("Detected changes rebuilding"); - installTracer(); const tsconfig = ts.readConfigFile(projectConfig, ts.sys.readFile); const parsed = ts.parseJsonConfigFileContent(tsconfig.config, ts.sys, "./"); const options = parsed.options; - if(parsedArgs.declarationDir) { + if (parsedArgs.declarationDir) { options.declarationDir = parsedArgs.declarationDir; } const host = ts.createCompilerHost(options, /*setParentNodes*/ true); - const rootDir = await transformProject(path.dirname(projectConfig), /*files*/ undefined, options, host); - console.log(tracer.current?.times); + const rootDir = await ts.emitDeclarationsForProject(path.dirname(projectConfig), /*files*/ undefined, options, host); watch(rootDir); - if(cancellationToken.isCancelled) return; + if (cancellationToken.isCancelled) return; } main(lastRunCancellation, 0); diff --git a/external-declarations/src/test-runner/test-runner-main.ts b/external-declarations/src/test-runner/test-runner-main.ts index 09603f742e8a0..f99f0f28f3902 100644 --- a/external-declarations/src/test-runner/test-runner-main.ts +++ b/external-declarations/src/test-runner/test-runner-main.ts @@ -1,43 +1,73 @@ import "source-map-support/register"; import * as fs from "fs/promises"; -import * as JSON from 'json5'; +import * as JSON from "json5"; import * as path from "path"; import * as ts from "typescript"; -import { firstDefined } from "../compiler/lang-utils"; -import { normalizePath, removeExtension } from "../compiler/path-utils"; -import { addToQueue, ensureDir, flushQueue, readAllFiles } from "../utils/fs-utils"; -import { parsedCliArgs as parsedArgs } from "./cli-arg-config"; -import { excludedTsTests } from "./excluded-ts-tests"; -import { setCompilerOptionsFromHarnessSetting } from "./tsc-infrastructure/compiler-run"; -import { IO } from "./tsc-infrastructure/io"; -import { CompilerSettings, TestCaseContent } from "./tsc-infrastructure/test-file-parser"; -import { getFileBasedTestConfigurationDescription, getFileBasedTestConfigurations } from "./tsc-infrastructure/vary-by"; -import { changeExtension } from "./tsc-infrastructure/vpath"; -import { loadTestCase, readDirRecursive, runIsolated as runDeclarationTransformEmitter, runTypeScript,TestCompilationResult } from "./utils"; - - -const excludeFilter =/\/fourslash\//; +import { + firstDefined, +} from "../compiler/lang-utils"; +import { + normalizePath, + removeExtension, +} from "../compiler/path-utils"; +import { + addToQueue, + ensureDir, + flushQueue, + readAllFiles, +} from "../utils/fs-utils"; +import { + parsedCliArgs as parsedArgs, +} from "./cli-arg-config"; +import { + excludedTsTests, +} from "./excluded-ts-tests"; +import { + setCompilerOptionsFromHarnessSetting, +} from "./tsc-infrastructure/compiler-run"; +import { + IO, +} from "./tsc-infrastructure/io"; +import { + CompilerSettings, + TestCaseContent, +} from "./tsc-infrastructure/test-file-parser"; +import { + getFileBasedTestConfigurationDescription, + getFileBasedTestConfigurations, +} from "./tsc-infrastructure/vary-by"; +import { + changeExtension, +} from "./tsc-infrastructure/vpath"; +import { + loadTestCase, + readDirRecursive, + runDeclarationTransformEmitter, + runTypeScript, + TestCompilationResult, +} from "./utils"; + +const excludeFilter = /\/fourslash\//; const shard = parsedArgs.shard; const shardCount = parsedArgs.shardCount; let prefix: string | undefined; const prefixed = parsedArgs.default && /(?[0-9]{5})-(((?.*)\.(?(.*=.*)+)(\.d\.ts))|(?.*))/.exec(parsedArgs.default); let testVersionFilter: string | undefined; -if(prefixed) { +if (prefixed) { prefix = prefixed.groups?.index; parsedArgs.default = prefixed.groups?.name ?? prefixed.groups?.nameSimple; testVersionFilter = prefixed.groups?.options; } -const outputPath = parsedArgs.outputPath ?? "./tsc-tests/run" -const rootCasePaths = parsedArgs.rootPaths ?? [ "./tests/source" ]; +const outputPath = parsedArgs.outputPath ?? "./tsc-tests/run"; +const rootCasePaths = parsedArgs.rootPaths ?? ["./tests/source"]; const libFolder = parsedArgs.libPath ?? path.join(rootCasePaths[0], "../lib"); const filter = parsedArgs.default ? new RegExp(parsedArgs.default) : /.*\.ts/; -const runType = - parsedArgs.type === "all" ? { tsc: true, dte: true } : +const runType = parsedArgs.type === "all" ? { tsc: true, dte: true } : parsedArgs.type === "tsc" ? { tsc: true, dte: false } : { tsc: false, dte: true }; @@ -52,16 +82,14 @@ function pad(num: number, size: number) { return ("000000000" + num).substr(-size); } - async function main() { - let fileConfiguration: undefined | { - "error-categories": Record, - "test-categories": Record, + "error-categories": Record; + "test-categories": Record; }; const testCategories = new Map(); const errorCategories = new Map(); - if(parsedArgs.configFile) { + if (parsedArgs.configFile) { fileConfiguration = JSON.parse(await fs.readFile(parsedArgs.configFile, { encoding: "utf8" })); Object.entries(fileConfiguration?.["error-categories"] ?? {}).forEach(([name, codes]) => codes.forEach(c => errorCategories.set(c, name))); Object.entries(fileConfiguration?.["test-categories"] ?? {}).forEach(([name, tests]) => tests.forEach(t => testCategories.set(t, name))); @@ -77,16 +105,16 @@ async function main() { for (let count = start; count < end; count++) { const testFile = normalizePath(allTests[count]); const testFileNoExtension = removeExtension(path.basename(testFile), path.extname(testFile)); - if(excludedTsTests.has(testFileNoExtension)) { + if (excludedTsTests.has(testFileNoExtension)) { continue; } const testName = removeExtension(path.basename(testFile), path.extname(testFile)); - if(parsedArgs.category && testCategories.get(testName) !== parsedArgs.category) { + if (parsedArgs.category && testCategories.get(testName) !== parsedArgs.category) { continue; } const data = await loadTestCase(testFile); const variedConfiguration = getFileBasedTestConfigurations(data.settings) ?? [{}]; - for(const varConfig of variedConfiguration) { + for (const varConfig of variedConfiguration) { const varConfigDescription = getFileBasedTestConfigurationDescription(varConfig); if (testVersionFilter && varConfigDescription !== testVersionFilter) continue; const file = (prefix ?? pad(count, 5)) + "-" + changeExtension(path.basename(testFile), varConfigDescription + ".d.ts"); @@ -94,7 +122,6 @@ async function main() { if (runType.tsc) runAndWrite(testName, path.join(outputPath, "tsc", file), varConfig, runTypeScript); if (runType.dte) runAndWrite(testName, path.join(outputPath, "dte", file), varConfig, (t, s) => runDeclarationTransformEmitter(t, libFiles, s)); - } console.log(` Ran: ${pad(count, 5)}/${allTests.length}`); @@ -103,7 +130,7 @@ async function main() { setCompilerOptionsFromHarnessSetting(data.settings, settings); setCompilerOptionsFromHarnessSetting(varySettings, settings); - if(parsedArgs.forceIsolatedDeclarations) { + if (parsedArgs.forceIsolatedDeclarations) { settings.isolatedDeclarations = true; } // Not supported @@ -113,13 +140,14 @@ async function main() { delete settings.declarationDir; const results = safeRun(d => fn(d, settings)); - file = normalizePath(file) + file = normalizePath(file); const resultText = results.files .flatMap(r => [ "// " + r.fileName, - r.content + r.content, ]) - .join(IO.newLine()) + ` + .join(IO.newLine()) + + ` // ================== // Original test file: ${testFile} // ` + data.code.split("\n").join(` @@ -129,25 +157,25 @@ async function main() { file = path.join( path.dirname(file), "critical-errors", - path.basename(file) + path.basename(file), ); - } else { - + } + else { let category = testCategories.get(testName); - if(!category) { + if (!category) { const error = firstDefined(results.diagnostics, d => { const category = errorCategories.get(d.code); - return category ? { category, code: d.code }: undefined; + return category ? { category, code: d.code } : undefined; }); - if(error) { + if (error) { category = path.join(error.category, error.code.toString()); } } - if(category) { + if (category) { file = path.join( path.dirname(file), category, - path.basename(file) + path.basename(file), ); } } @@ -168,7 +196,7 @@ async function main() { message: ${e.message}, ${e.stack}, `, - }] + }], }; } } diff --git a/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts b/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts index a6d11240f7f48..b1c7b3102712a 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts @@ -1,8 +1,13 @@ import * as ts from "typescript"; import * as lang from "../../compiler/lang-utils"; -import { fileExtensionIs } from "../../compiler/path-utils"; -import { getDeclarationEmitExtensionForPath, getOutputExtension } from "../../compiler/utils"; +import { + fileExtensionIs, +} from "../../compiler/path-utils"; +import { + getDeclarationEmitExtensionForPath, + getOutputExtension, +} from "../../compiler/utils"; import * as collections from "./collections"; import * as fakes from "./fakesHosts"; import * as documents from "./test-document"; @@ -25,7 +30,7 @@ export function readProject(host: fakes.ParseConfigHost, project: string | undef } else { [project] = host.vfs.scanSync(".", "ancestors-or-self", { - accept: (path, stats) => stats.isFile() && host.vfs.stringComparer(vpath.basename(path), "tsconfig.json") === 0 + accept: (path, stats) => stats.isFile() && host.vfs.stringComparer(vpath.basename(path), "tsconfig.json") === 0, }); } @@ -112,7 +117,7 @@ export class CompilationResult { inputs, js: js.get(outFile), dts: dts.get(vpath.changeExtension(outFile, ".d.ts")), - map: maps.get(outFile + ".map") + map: maps.get(outFile + ".map"), }; if (outputs.js) this._inputsAndOutputs.set(outputs.js.file, outputs); @@ -134,7 +139,7 @@ export class CompilationResult { inputs: [input], js: js.get(this.getOutputPath(sourceFile.fileName, extname)), dts: dts.get(this.getOutputPath(sourceFile.fileName, getDeclarationEmitExtensionForPath(sourceFile.fileName))), - map: maps.get(this.getOutputPath(sourceFile.fileName, extname + ".map")) + map: maps.get(this.getOutputPath(sourceFile.fileName, extname + ".map")), }; this._inputsAndOutputs.set(sourceFile.fileName, outputs); @@ -251,24 +256,26 @@ export function compileFiles(host: fakes.CompilerHost, rootFiles: string[] | und const skipErrorComparison = lang.length(rootFiles) >= 100 || (!!compilerOptions.skipLibCheck && !!compilerOptions.declaration); const preProgram = !skipErrorComparison ? ts.createProgram(rootFiles || [], { ...compilerOptions, configFile: compilerOptions.configFile, traceResolution: false }, host) : undefined; - const preErrors = preProgram && ts.getPreEmitDiagnostics(preProgram); + const preErrors = preProgram && ts.getPreEmitDiagnostics(preProgram); const program = ts.createProgram(rootFiles || [], compilerOptions, host); + const emitResult = program.emit( /*targetSourceFile*/ undefined, (fileName, text, writeByteOrderMark) => { // If there are errors TS will ot emit declaration files. We want then regardless of errors. - if(!vpath.isAbsolute(fileName)) { + if (!vpath.isAbsolute(fileName)) { fileName = vpath.resolve(host.vfs.cwd(), fileName); } - if(host.outputs.some(d => d.file === fileName)) return; + if (host.outputs.some(d => d.file === fileName)) return; host.writeFile(fileName, text, writeByteOrderMark); }, /*cancellationToken*/ undefined, /*emitOnlyDtsFiles*/ undefined, /*customTransformers*/ undefined, // @ts-expect-error We use forceDts emit documented flag - /*forceEmit*/ true); + /*forceEmit*/ true, + ); const postErrors = ts.getPreEmitDiagnostics(program); const longerErrors = lang.length(preErrors) > postErrors.length ? preErrors : postErrors; const shorterErrors = longerErrors === preErrors ? postErrors : preErrors; diff --git a/external-declarations/src/test-runner/utils.ts b/external-declarations/src/test-runner/utils.ts index 264e041520307..cdba1df4e122c 100644 --- a/external-declarations/src/test-runner/utils.ts +++ b/external-declarations/src/test-runner/utils.ts @@ -1,5 +1,4 @@ import * as fsp from "fs/promises"; -import * as JSON from "json5"; import * as path from "path"; import * as ts from "typescript"; @@ -8,7 +7,6 @@ import { isDeclarationFile, isTypeScriptFile, } from "../compiler/path-utils"; -import { emitDeclarationsForFile } from "../compiler/transform-project"; import { compileFiles, TestFile, @@ -80,7 +78,7 @@ export function isRelevantTestFile(f: TestCaseParser.TestUnitData) { return isTypeScriptFile(f.name) && !isDeclarationFile(f.name) && f.content !== undefined; } -export function runIsolated(caseData: TestCaseParser.TestCaseContent, libFiles: string[], settings: ts.CompilerOptions): TestCompilationResult { +export function runDeclarationTransformEmitter(caseData: TestCaseParser.TestCaseContent, libFiles: string[], settings: ts.CompilerOptions): TestCompilationResult { const toSrc = (n: string) => vpath.combine("/src", n); const projectFiles = [...caseData.testUnitData.map(o => toSrc(o.name)), ...libFiles]; settings = { @@ -99,10 +97,10 @@ export function runIsolated(caseData: TestCaseParser.TestCaseContent, libFiles: /*setParentNodes*/ true, file.name.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS, ); - const declaration = emitDeclarationsForFile(sourceFile, projectFiles, libs, settings); + const declaration = ts.emitDeclarationsForFile(sourceFile, projectFiles, libs, settings); diagnostics.push(...declaration.diagnostics); return { - content: declaration.code, + content: settings.emitBOM ? Utils.addUTF8ByteOrderMark(declaration.code) : declaration.code, fileName: changeExtension(file.name, getDeclarationExtension(file.name)), }; }); diff --git a/src/compiler/_namespaces/ts.ts b/src/compiler/_namespaces/ts.ts index 9c726f91e1a3b..96985e09555e7 100644 --- a/src/compiler/_namespaces/ts.ts +++ b/src/compiler/_namespaces/ts.ts @@ -60,6 +60,7 @@ export * from "../transformers/declarations/diagnostics"; export * from "../transformers/declarations/emit-binder"; export * from "../transformers/declarations/emit-host"; export * from "../transformers/declarations/emit-resolver"; +export * from "../transformers/declarations/transform-project"; export * from "../transformers/declarations/types"; export * from "../transformers/declarations"; export * from "../transformer"; diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index af3e558dd6ccf..d5d82634a8afb 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -373,7 +373,7 @@ export function transformDeclarations(context: TransformationContext) { // If it is visible via `// `, then we should just use that const directives = resolver.getTypeReferenceDirectivesForSymbol(symbol, SymbolFlags.All); if (length(directives)) { - return recordTypeReferenceDirectivesIfNecessary(directives, node); + return recordTypeReferenceDirectivesIfNecessary(directives, /*requestingNode*/ undefined); } // Otherwise we should emit a path-based reference const container = getSourceFileOfNode(node); diff --git a/external-declarations/src/compiler/transform-project.ts b/src/compiler/transformers/declarations/transform-project.ts similarity index 51% rename from external-declarations/src/compiler/transform-project.ts rename to src/compiler/transformers/declarations/transform-project.ts index 3b71b07db31ea..dbce718bc72ac 100644 --- a/external-declarations/src/compiler/transform-project.ts +++ b/src/compiler/transformers/declarations/transform-project.ts @@ -1,57 +1,72 @@ -import * as path from "path"; -import * as ts from "typescript"; - -import { Utils } from "../test-runner/tsc-infrastructure/compiler-run"; import { changeAnyExtension, + combinePaths, + CompilerHost, + CompilerOptions, + createEmitDeclarationHost, + createEmitDeclarationResolver, + createPrinter, + Diagnostic, + EmitHost, + EmitResolver, + factory, + getDirectoryPath, + NewLineKind, normalizePath, -} from "./path-utils"; + pathIsAbsolute, + PrinterOptions, + ScriptTarget, + SourceFile, + sys, + TransformationContext, + transformDeclarations, +} from "../../_namespaces/ts"; -export function transformProject( +export function emitDeclarationsForProject( projectPath: string, files: string[] | undefined, - options: ts.CompilerOptions, - host: ts.CompilerHost, + options: CompilerOptions, + host: CompilerHost, ) { - const rootDir = options.rootDir ? normalizePath(path.resolve(path.join(projectPath, options.rootDir))) : normalizePath(projectPath); + const rootDir = options.rootDir ? normalizePath(sys.resolvePath(combinePaths(projectPath, options.rootDir))) : normalizePath(projectPath); files ??= host.readDirectory!(rootDir, [".ts", ".tsx"], ["**/*.d.ts"], []); emitDeclarationsForAllFiles(rootDir, files, host, options); return rootDir; } -function ensureDirRecursive(dirPath: string, host: ts.CompilerHost) { +function ensureDirRecursive(dirPath: string, host: CompilerHost) { if (!host.directoryExists!(dirPath)) { - const parent = path.dirname(dirPath); + const parent = getDirectoryPath(dirPath); ensureDirRecursive(parent, host); (host as any).createDirectory(dirPath); } } function joinToRootIfNeeded(rootDir: string, existingPath: string) { - return normalizePath(path.isAbsolute(existingPath) ? existingPath : path.resolve(path.join(rootDir, existingPath))); + return normalizePath(pathIsAbsolute(existingPath) ? existingPath : sys.resolvePath(combinePaths(rootDir, existingPath))); } -export function createIsolatedDeclarationsEmitter(rootDir: string, options: ts.CompilerOptions) { +export function createIsolatedDeclarationsEmitter(rootDir: string, options: CompilerOptions) { const declarationDir = options.declarationDir ? joinToRootIfNeeded(rootDir, options.declarationDir) : options.outDir ? joinToRootIfNeeded(rootDir, options.outDir) : undefined; rootDir = normalizePath(rootDir); - return (file: string, host: ts.CompilerHost) => { + return (file: string, host: CompilerHost) => { file = normalizePath(file); - const source = host.getSourceFile(file, options.target ?? ts.ScriptTarget.ES2015); + const source = host.getSourceFile(file, options.target ?? ScriptTarget.ES2015); if (!source) return; const actualDeclaration = emitDeclarationsForFile(source, [], [], options); const output = declarationDir ? changeAnyExtension(file.replace(rootDir, declarationDir), ".d.ts") : changeAnyExtension(file, ".d.ts"); - const dirPath = path.dirname(output); + const dirPath = getDirectoryPath(output); ensureDirRecursive(dirPath, host); - host.writeFile(output, actualDeclaration.code, /*writeByteOrderMark*/ false); + host.writeFile(output, actualDeclaration.code, !!options.emitBOM); return output; }; } -export function emitDeclarationsForAllFiles(rootDir: string, files: string[], host: ts.CompilerHost, options: ts.CompilerOptions) { +export function emitDeclarationsForAllFiles(rootDir: string, files: string[], host: CompilerHost, options: CompilerOptions) { const transformer = createIsolatedDeclarationsEmitter(rootDir, options); for (const file of files) { try { @@ -64,37 +79,35 @@ export function emitDeclarationsForAllFiles(rootDir: string, files: string[], ho return { rootDir }; } -const transformDeclarations: (context: ts.TransformationContext) => (node: ts.SourceFile) => ts.SourceFile = (ts as any).transformDeclarations; - -export function emitDeclarationsForFile(sourceFile: ts.SourceFile, allProjectFiles: string[], tsLibFiles: string[], options: ts.CompilerOptions) { +export function emitDeclarationsForFile(sourceFile: SourceFile, allProjectFiles: string[], tsLibFiles: string[], options: CompilerOptions) { const getCompilerOptions = () => options; - const emitHost = ts.createEmitDeclarationHost(allProjectFiles, tsLibFiles, options, ts.sys); - const emitResolver = ts.createEmitDeclarationResolver(sourceFile, emitHost); - const diagnostics: ts.Diagnostic[] = []; + const emitHost = createEmitDeclarationHost(allProjectFiles, tsLibFiles, options, sys); + const emitResolver = createEmitDeclarationResolver(sourceFile, emitHost); + const diagnostics: Diagnostic[] = []; const transformer = transformDeclarations({ getEmitHost() { - return emitHost; + return emitHost as never as EmitHost; }, getEmitResolver() { - return emitResolver; + return emitResolver as EmitResolver; }, getCompilerOptions, - factory: ts.factory, + factory, addDiagnostic(diag: any) { diagnostics.push(diag); }, - } as Partial as ts.TransformationContext); + } as Partial as TransformationContext); const result = transformer(sourceFile); - const printer = ts.createPrinter({ + const printer = createPrinter({ onlyPrintJsDocStyle: true, - newLine: options.newLine ?? ts.NewLineKind.CarriageReturnLineFeed, + newLine: options.newLine ?? NewLineKind.CarriageReturnLineFeed, target: options.target, - } as ts.PrinterOptions); - + } as PrinterOptions); + const code = printer.printFile(result); return { - code: options.emitBOM ? Utils.addUTF8ByteOrderMark(code) : code, + code, diagnostics, }; } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index f115a4d516ce2..37f94f1233a46 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -9951,6 +9951,9 @@ export interface UserPreferences { readonly organizeImportsNumericCollation?: boolean; readonly organizeImportsAccentCollation?: boolean; readonly organizeImportsCaseFirst?: "upper" | "lower" | false; + + readonly includeInlineTypeFixes?: boolean; + readonly includeRelativeTypeFixes?: boolean; } /** Represents a bigint literal value without requiring bigint support */ diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 14dde8f2e4342..e3c625630b098 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -133,10 +133,19 @@ registerCodeFix({ fixIds: [fixId], getCodeActions(context) { const fixes: CodeFixAction[] = []; + const { includeRelativeTypeFixes, includeInlineTypeFixes } = context.preferences; + addCodeAction(addAnnotationFix, fixes, context, "full", f => f.addFullAnnotation(context.span)); - addCodeAction(addAnnotationFix, fixes, context, "relative", f => f.addFullAnnotation(context.span)); - addCodeAction(addInlineTypeAssertion, fixes, context, "full", f => f.addInlineAnnotation(context.span)); - addCodeAction(addInlineTypeAssertion, fixes, context, "relative", f => f.addInlineAnnotation(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; }, diff --git a/src/services/types.ts b/src/services/types.ts index 9c1fe3a73eb73..f9206d1a4005a 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -631,7 +631,7 @@ export interface LanguageService { /** @internal */ clearSourceMapperCache(): void; - getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: readonly number[], formatOptions: FormatCodeSettings, preferences: UserPreferences): readonly CodeFixAction[]; + getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: readonly number[], formatOptions: FormatCodeSettings, preferences: UserPreferences, withDiagnostics?: Diagnostic[]): readonly CodeFixAction[]; getCombinedCodeFix(scope: CombinedCodeFixScope, fixId: {}, formatOptions: FormatCodeSettings, preferences: UserPreferences): CombinedCodeActions; applyCodeActionCommand(action: CodeActionCommand, formatSettings?: FormatCodeSettings): Promise; From 61b1ea7c80adf42727cc7f84114c4190c8c83190 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 12 Oct 2023 14:41:31 +0100 Subject: [PATCH 095/224] Fix tests. --- external-declarations/original-tests.jsonc | 2 ++ .../src/code-mod/tsc-test-fixer/test-fixer.ts | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/external-declarations/original-tests.jsonc b/external-declarations/original-tests.jsonc index dbd67cee51a9f..ce0b6c2a99972 100644 --- a/external-declarations/original-tests.jsonc +++ b/external-declarations/original-tests.jsonc @@ -37,6 +37,8 @@ // error on used to be indexer, now it is a computed property "propertyAssignment", "invalidTaggedTemplateEscapeSequences", // Invalid escape sequences + // duplicate field/accessor + "symbolDeclarationEmit12" ], "ts-bugs": [ // https://github.com/microsoft/TypeScript/issues/55571 diff --git a/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts b/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts index dc969b278c21b..bd9c2a1a8fe7b 100644 --- a/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts +++ b/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts @@ -68,7 +68,7 @@ const registry: ExternalDocumentCache = { byKey.set(path, sourceFile); }, }; -const createDocumentRegistryInternal: (useCaseSensitiveFileNames: boolean, currentDirectory: string, externalCache?: ExternalDocumentCache) => DocumentRegistry = (ts as any).createDocumentRegistryInternal; +const createDocumentRegistryInternal: (...a: [...a: Parameters, externalCache?: ExternalDocumentCache]) => DocumentRegistry = (ts as any).createDocumentRegistryInternal; async function fixTestFiles(toBeCompiled: TestFile[], settings: ts.CompilerOptions) { const { fs, options, programFileNames } = prepareTestOptionsAndFs( @@ -93,7 +93,12 @@ async function fixTestFiles(toBeCompiled: TestFile[], settings: ts.CompilerOptio await fixProjectRaw( langHost, - createDocumentRegistryInternal(host.useCaseSensitiveFileNames(), host.getCurrentDirectory(), registry), + createDocumentRegistryInternal( + host.useCaseSensitiveFileNames(), + host.getCurrentDirectory(), + /*jsDocParsingMode*/ undefined, + registry, + ), snapShotRegistry, isolatedDeclarationsErrors, { includeRelativeTypeFixes: false, includeInlineTypeFixes: false }, From 3b8e896d5c6b872d4d4e454590ee08401f1a2d4b Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 12 Oct 2023 14:40:22 +0100 Subject: [PATCH 096/224] Address code review. Signed-off-by: Titian Cernicova-Dragomir --- external-declarations/src/code-mod/fixer/code-fixer-applier.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external-declarations/src/code-mod/fixer/code-fixer-applier.ts b/external-declarations/src/code-mod/fixer/code-fixer-applier.ts index 9e0d266f788ae..5aa6c66d594d6 100644 --- a/external-declarations/src/code-mod/fixer/code-fixer-applier.ts +++ b/external-declarations/src/code-mod/fixer/code-fixer-applier.ts @@ -45,7 +45,7 @@ export async function fixProjectRaw( const program = service.getProgram()!; const signal: BasicAbortSignal = { isAborted: false }; - onProjectLoaded && (await onProjectLoaded?.(service, documentRegistry, snapShotRegistry, signal)); + onProjectLoaded && (await onProjectLoaded(service, documentRegistry, snapShotRegistry, signal)); const files = program.getSourceFiles(); const skips = new Map(); const defaultFormatOptions = ts.getDefaultFormatCodeSettings(); From 32d02ccc4564df339668bafeab9ea64c4bfbf102 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Mon, 16 Oct 2023 20:59:01 +0000 Subject: [PATCH 097/224] Be explicit of the flag AND operation to see where it's actually being used. Signed-off-by: Hana Joo --- .../transformers/declarations/localInferenceResolver.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index eb49b12062149..76ddf7dfe63ab 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -212,10 +212,9 @@ export function createLocalInferenceResolver({ return invalid(getAccessor ?? setAccessor!); } function localInference(node: Node, inferenceFlags: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { - const nextInferenceFlags = inferenceFlags & NarrowBehavior.NotKeepLiterals; switch (node.kind) { case SyntaxKind.ParenthesizedExpression: - return localInference((node as ParenthesizedExpression).expression, nextInferenceFlags); + return localInference((node as ParenthesizedExpression).expression, inferenceFlags & NarrowBehavior.NotKeepLiterals); case SyntaxKind.Identifier: { if ((node as Identifier).escapedText === "undefined") { return createUndefinedTypeNode(node); @@ -330,7 +329,7 @@ export function createLocalInferenceResolver({ ); } else { - const elementType = localInference(element, nextInferenceFlags); + const elementType = localInference(element, inferenceFlags & NarrowBehavior.NotKeepLiterals); inheritedArrayTypeFlags = mergeFlags(inheritedArrayTypeFlags, elementType.flags); elementTypesInfo.push(elementType); } @@ -425,7 +424,7 @@ export function createLocalInferenceResolver({ const modifiers = inferenceFlags & NarrowBehavior.AsConst ? [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : []; - const { typeNode, flags: propTypeFlags } = localInference(prop.initializer, nextInferenceFlags); + const { typeNode, flags: propTypeFlags } = localInference(prop.initializer, inferenceFlags & NarrowBehavior.NotKeepLiterals); inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, propTypeFlags); newProp = factory.createPropertySignature( modifiers, From 72451bbc20166aa067028b08905d7aa27c046d9a Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Sun, 15 Oct 2023 19:48:28 +0000 Subject: [PATCH 098/224] Move ObjectLiteral handling into a function This is a non-functional move. Signed-off-by: Hana Joo --- .../declarations/localInferenceResolver.ts | 273 +++++++++--------- 1 file changed, 137 insertions(+), 136 deletions(-) diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 76ddf7dfe63ab..c7eb7f3e8d463 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -339,161 +339,162 @@ export function createLocalInferenceResolver({ ); tupleType.emitNode = { flags: 1, autoGenerate: undefined, internalFlags: 0 }; return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node, inheritedArrayTypeFlags); + case SyntaxKind.ObjectLiteralExpression: + return getTypeForObjectLiteralExpression(node as ObjectLiteralExpression, inferenceFlags); + } - case SyntaxKind.ObjectLiteralExpression: { - const objectLiteral = node as ObjectLiteralExpression; - const properties: TypeElement[] = []; - let inheritedObjectTypeFlags = LocalTypeInfoFlags.None; - const members = new Map(); - let replaceWithInvalid = false; - for (let propIndex = 0, length = objectLiteral.properties.length; propIndex < length; propIndex++) { - const prop = objectLiteral.properties[propIndex]; - - if (isShorthandPropertyAssignment(prop)) { - invalid(prop); - inheritedObjectTypeFlags |= LocalTypeInfoFlags.Invalid; - continue; - } - else if (isSpreadAssignment(prop)) { - invalid(prop); - inheritedObjectTypeFlags |= LocalTypeInfoFlags.Invalid; - continue; - } + return invalid(node); + } + function invalid(sourceNode: Node): LocalTypeInfo { + return { typeNode: makeInvalidTypeAndReport(sourceNode), flags: LocalTypeInfoFlags.Invalid, sourceNode }; + } + function regular(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { + return { typeNode, flags, sourceNode }; + } + function getTypeForObjectLiteralExpression(node: ObjectLiteralExpression, inferenceFlags: NarrowBehavior) { + const objectLiteral = node; + const properties: TypeElement[] = []; + let inheritedObjectTypeFlags = LocalTypeInfoFlags.None; + const members = new Map(); + let replaceWithInvalid = false; + for (let propIndex = 0, length = objectLiteral.properties.length; propIndex < length; propIndex++) { + const prop = objectLiteral.properties[propIndex]; + + if (isShorthandPropertyAssignment(prop)) { + invalid(prop); + inheritedObjectTypeFlags |= LocalTypeInfoFlags.Invalid; + continue; + } + else if (isSpreadAssignment(prop)) { + invalid(prop); + inheritedObjectTypeFlags |= LocalTypeInfoFlags.Invalid; + continue; + } - if (isPrivateIdentifier(prop.name)) { - // 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)) { - reportIsolatedDeclarationError(node); - replaceWithInvalid = true; - continue; - } - if (isEntityNameExpression(prop.name.expression)) { - checkEntityNameVisibility(prop.name.expression, prop); - } - } + if (isPrivateIdentifier(prop.name)) { + // 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)) { + reportIsolatedDeclarationError(node); + replaceWithInvalid = true; + continue; + } + if (isEntityNameExpression(prop.name.expression)) { + checkEntityNameVisibility(prop.name.expression, prop); + } + } - const nameKey = getMemberKey(prop); - const existingMember = nameKey ? members.get(nameKey) : undefined; - const name = simplifyComputedPropertyName(prop.name, existingMember?.name) ?? - deepClone(visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!); + const nameKey = getMemberKey(prop); + const existingMember = nameKey ? members.get(nameKey) : undefined; + const name = simplifyComputedPropertyName(prop.name, existingMember?.name) ?? + deepClone(visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!); - let newProp; - if (isMethodDeclaration(prop)) { - const oldEnclosingDeclaration = setEnclosingDeclarations(prop); - try { - const returnType = visitTypeAndClone(prop.type, prop); + let newProp; + if (isMethodDeclaration(prop)) { + const oldEnclosingDeclaration = setEnclosingDeclarations(prop); + try { + const returnType = visitTypeAndClone(prop.type, prop); - const typeParameters = visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone); - // TODO: We need to see about inheriting flags from parameters - const parameters = prop.parameters.map(p => deepClone(ensureParameter(p))); - inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, returnType.flags); - if (inferenceFlags & NarrowBehavior.AsConst) { - newProp = factory.createPropertySignature( - [factory.createModifier(SyntaxKind.ReadonlyKeyword)], - name, - /*questionToken*/ undefined, - factory.createFunctionTypeNode( - typeParameters, - parameters, - returnType.typeNode, - ), - ); - } - else { - newProp = factory.createMethodSignature( - [], - name, - /*questionToken*/ undefined, - typeParameters, - parameters, - returnType.typeNode, - ); - } - } - finally { - setEnclosingDeclarations(oldEnclosingDeclaration); - } - } - else if (isPropertyAssignment(prop)) { - const modifiers = inferenceFlags & NarrowBehavior.AsConst ? - [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : - []; - const { typeNode, flags: propTypeFlags } = localInference(prop.initializer, inferenceFlags & NarrowBehavior.NotKeepLiterals); - inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, propTypeFlags); + const typeParameters = visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone); + // TODO: We need to see about inheriting flags from parameters + const parameters = prop.parameters.map(p => deepClone(ensureParameter(p))); + inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, returnType.flags); + if (inferenceFlags & NarrowBehavior.AsConst) { newProp = factory.createPropertySignature( - modifiers, + [factory.createModifier(SyntaxKind.ReadonlyKeyword)], name, /*questionToken*/ undefined, - typeNode, + factory.createFunctionTypeNode( + typeParameters, + parameters, + returnType.typeNode, + ), ); } else { - if (!isGetAccessorDeclaration(prop) && !isSetAccessorDeclaration(prop)) { - Debug.assertNever(prop); - } - if (!nameKey) { - return invalid(prop); - } - const { getAccessor, setAccessor, otherAccessorIndex } = getAccessorInfo(objectLiteral.properties, prop); - if (otherAccessorIndex === -1 || otherAccessorIndex > propIndex) { - const accessorType = inferAccessorType(getAccessor, setAccessor); - const modifiers: Modifier[] = []; - if (!setAccessor) { - modifiers.push(factory.createModifier(SyntaxKind.ReadonlyKeyword)); - } - inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, accessorType.flags); - newProp = factory.createPropertySignature( - modifiers, - name, - /*questionToken*/ undefined, - accessorType.typeNode, - ); - } + newProp = factory.createMethodSignature( + [], + name, + /*questionToken*/ undefined, + typeParameters, + parameters, + returnType.typeNode, + ); + } + } + finally { + setEnclosingDeclarations(oldEnclosingDeclaration); + } + } + else if (isPropertyAssignment(prop)) { + const modifiers = inferenceFlags & NarrowBehavior.AsConst ? + [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : + []; + const { typeNode, flags: propTypeFlags } = localInference(prop.initializer, inferenceFlags & NarrowBehavior.NotKeepLiterals); + inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, propTypeFlags); + newProp = factory.createPropertySignature( + modifiers, + name, + /*questionToken*/ undefined, + typeNode, + ); + } + else { + if (!isGetAccessorDeclaration(prop) && !isSetAccessorDeclaration(prop)) { + Debug.assertNever(prop); + } + if (!nameKey) { + return invalid(prop); + } + const { getAccessor, setAccessor, otherAccessorIndex } = getAccessorInfo(objectLiteral.properties, prop); + if (otherAccessorIndex === -1 || otherAccessorIndex > propIndex) { + const accessorType = inferAccessorType(getAccessor, setAccessor); + const modifiers: Modifier[] = []; + if (!setAccessor) { + modifiers.push(factory.createModifier(SyntaxKind.ReadonlyKeyword)); } + inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, accessorType.flags); + newProp = factory.createPropertySignature( + modifiers, + name, + /*questionToken*/ undefined, + accessorType.typeNode, + ); + } + } - if (newProp) { - const commentRange = getCommentRange(prop); - setCommentRange(newProp, { - pos: commentRange.pos, - end: newProp.name.end, - }); + if (newProp) { + const commentRange = getCommentRange(prop); + setCommentRange(newProp, { + pos: commentRange.pos, + end: newProp.name.end, + }); - if (nameKey) { - if (existingMember !== undefined && !isMethodDeclaration(prop)) { - properties[existingMember.location] = newProp; - } - else { - members.set(nameKey, { - location: properties.length, - name, - }); - properties.push(newProp); - } - } - else { - properties.push(newProp); - } + if (nameKey) { + if (existingMember !== undefined && !isMethodDeclaration(prop)) { + properties[existingMember.location] = newProp; + } + else { + members.set(nameKey, { + location: properties.length, + name, + }); + properties.push(newProp); } } - - const typeNode: TypeNode = replaceWithInvalid ? makeInvalidType() : factory.createTypeLiteralNode(properties); - return regular(typeNode, objectLiteral, inheritedObjectTypeFlags); + else { + properties.push(newProp); + } } } - return invalid(node); - } - function invalid(sourceNode: Node): LocalTypeInfo { - return { typeNode: makeInvalidTypeAndReport(sourceNode), flags: LocalTypeInfoFlags.Invalid, sourceNode }; - } - function regular(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { - return { typeNode, flags, sourceNode }; + const typeNode: TypeNode = replaceWithInvalid ? makeInvalidType() : factory.createTypeLiteralNode(properties); + return regular(typeNode, objectLiteral, inheritedObjectTypeFlags); } function normalizeLiteralValue(literal: LiteralExpression) { switch (literal.kind) { From ae1646e62e5f06cf36be415f4e52588f29aa3f80 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Mon, 16 Oct 2023 19:26:50 +0000 Subject: [PATCH 099/224] Remove the function mergeFlags as it's doing trivial bitwise OR operation, also some other parts of the code is doing |= instead, so try to be consistent. Signed-off-by: Hana Joo --- .../declarations/localInferenceResolver.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index c7eb7f3e8d463..34dd37b880e06 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -175,9 +175,6 @@ export function createLocalInferenceResolver({ flags: LocalTypeInfoFlags; } - function mergeFlags(existing: LocalTypeInfoFlags, newFlags: LocalTypeInfoFlags): LocalTypeInfoFlags { - return existing | newFlags; - } function getAccessorInfo(properties: NodeArray, knownAccessor: SetAccessorDeclaration | GetAccessorDeclaration) { const nameKey = getMemberKey(knownAccessor); const knownIsGetAccessor = isGetAccessorDeclaration(knownAccessor); @@ -239,8 +236,7 @@ export function createLocalInferenceResolver({ fnNode.parameters.map(p => deepClone(ensureParameter(p))), returnType.typeNode, ); - const flags = mergeFlags(LocalTypeInfoFlags.None, returnType.flags); - return regular(fnTypeNode, node, flags); + return regular(fnTypeNode, node, LocalTypeInfoFlags.None | returnType.flags); } finally { setEnclosingDeclarations(oldEnclosingDeclaration); @@ -330,7 +326,7 @@ export function createLocalInferenceResolver({ } else { const elementType = localInference(element, inferenceFlags & NarrowBehavior.NotKeepLiterals); - inheritedArrayTypeFlags = mergeFlags(inheritedArrayTypeFlags, elementType.flags); + inheritedArrayTypeFlags |= elementType.flags; elementTypesInfo.push(elementType); } } @@ -403,7 +399,7 @@ export function createLocalInferenceResolver({ const typeParameters = visitNodes(prop.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone); // TODO: We need to see about inheriting flags from parameters const parameters = prop.parameters.map(p => deepClone(ensureParameter(p))); - inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, returnType.flags); + inheritedObjectTypeFlags |= returnType.flags; if (inferenceFlags & NarrowBehavior.AsConst) { newProp = factory.createPropertySignature( [factory.createModifier(SyntaxKind.ReadonlyKeyword)], @@ -436,7 +432,7 @@ export function createLocalInferenceResolver({ [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : []; const { typeNode, flags: propTypeFlags } = localInference(prop.initializer, inferenceFlags & NarrowBehavior.NotKeepLiterals); - inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, propTypeFlags); + inheritedObjectTypeFlags |= propTypeFlags; newProp = factory.createPropertySignature( modifiers, name, @@ -458,7 +454,7 @@ export function createLocalInferenceResolver({ if (!setAccessor) { modifiers.push(factory.createModifier(SyntaxKind.ReadonlyKeyword)); } - inheritedObjectTypeFlags = mergeFlags(inheritedObjectTypeFlags, accessorType.flags); + inheritedObjectTypeFlags |= accessorType.flags; newProp = factory.createPropertySignature( modifiers, name, From b50c8778301e3cad7ff31feca839aa947e317088 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Mon, 16 Oct 2023 20:09:31 +0000 Subject: [PATCH 100/224] Do not attempt to generate d.ts files if there's any error reported. Signed-off-by: Hana Joo --- .../transformers/declarations/transform-project.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compiler/transformers/declarations/transform-project.ts b/src/compiler/transformers/declarations/transform-project.ts index dbce718bc72ac..813ab401487b9 100644 --- a/src/compiler/transformers/declarations/transform-project.ts +++ b/src/compiler/transformers/declarations/transform-project.ts @@ -56,12 +56,15 @@ export function createIsolatedDeclarationsEmitter(rootDir: string, options: Comp if (!source) return; - const actualDeclaration = emitDeclarationsForFile(source, [], [], options); + const {code, diagnostics} = emitDeclarationsForFile(source, [], [], options); + if (diagnostics.length > 0) { + throw new Error(`Cannot transform file '${source.fileName}' due to ${diagnostics.length} diagnostics`); + } const output = declarationDir ? changeAnyExtension(file.replace(rootDir, declarationDir), ".d.ts") : changeAnyExtension(file, ".d.ts"); const dirPath = getDirectoryPath(output); ensureDirRecursive(dirPath, host); - host.writeFile(output, actualDeclaration.code, !!options.emitBOM); + host.writeFile(output, code, !!options.emitBOM); return output; }; } From 10724ece56d5eb1b7860158d78a942135b557d1b Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Mon, 16 Oct 2023 20:28:00 +0000 Subject: [PATCH 101/224] Improve type aesthetics to reduce unncessary type checks Signed-off-by: Hana Joo --- src/compiler/transformers/declarations.ts | 7 ++-- .../declarations/localInferenceResolver.ts | 39 ++++++++++--------- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index e3a29cb79541a..ddb4eed08549a 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -331,7 +331,7 @@ export function transformDeclarations(context: TransformationContext) { 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 = createLocalInferenceResolver({ + const {resolver: localInferenceResolver, isolatedDeclarations} = createLocalInferenceResolver({ ensureParameter, context, visitDeclarationSubtree, @@ -346,7 +346,6 @@ export function transformDeclarations(context: TransformationContext) { }); const options = context.getCompilerOptions(); const { noResolve, stripInternal } = options; - const isolatedDeclarations = options.isolatedDeclarations; return transformRoot; function reportIsolatedDeclarationError(node: Node) { @@ -852,7 +851,7 @@ export function transformDeclarations(context: TransformationContext) { // Literal const declarations will have an initializer ensured rather than a type return; } - if (isolatedDeclarations && localInferenceResolver) { + if (isolatedDeclarations) { return localInferenceResolver.fromInitializer(node, type, currentSourceFile); } const shouldUseResolverType = node.kind === SyntaxKind.Parameter && @@ -1502,7 +1501,7 @@ export function transformDeclarations(context: TransformationContext) { }); errorFallbackNode = input; const type = isolatedDeclarations ? - localInferenceResolver?.fromInitializer(input, /*type*/ undefined, currentSourceFile) : + localInferenceResolver.fromInitializer(input, /*type*/ undefined, currentSourceFile) : resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker); const varDecl = factory.createVariableDeclaration(newId, /*exclamationToken*/ undefined, type, /*initializer*/ undefined); errorFallbackNode = undefined; diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 34dd37b880e06..a222460e0fef5 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -127,35 +127,38 @@ export function createLocalInferenceResolver({ checkEntityNameVisibility(name: EntityNameOrEntityNameExpression, container?: Node): void; ensureParameter(p: ParameterDeclaration): ParameterDeclaration; context: TransformationContext; -}): LocalInferenceResolver | undefined { +}): { resolver: LocalInferenceResolver, isolatedDeclarations: true } | { resolver: undefined, isolatedDeclarations: false } { let currentSourceFile: SourceFile | undefined; const options = context.getCompilerOptions(); const resolver = context.getEmitResolver(); if (!options.isolatedDeclarations) { - return undefined; + return { resolver: undefined, isolatedDeclarations: false }; } const { factory } = context; const strictNullChecks = !!options.strict || !!options.strictNullChecks; return { - fromInitializer(node: HasInferredType, type: TypeNode | undefined, sourceFile: SourceFile) { - const oldSourceFile = currentSourceFile; - currentSourceFile = sourceFile; - try { - const localType = localInferenceFromInitializer(node, type); - if (localType !== undefined) { - return localType; + resolver: { + fromInitializer(node: HasInferredType, type: TypeNode | undefined, sourceFile: SourceFile) { + const oldSourceFile = currentSourceFile; + currentSourceFile = sourceFile; + try { + const localType = localInferenceFromInitializer(node, type); + if (localType !== undefined) { + return localType; + } + if (type) { + return visitNode(type, visitDeclarationSubtree, isTypeNode)!; + } + return makeInvalidType(); } - if (type) { - return visitNode(type, visitDeclarationSubtree, isTypeNode)!; + finally { + currentSourceFile = oldSourceFile; } - return makeInvalidType(); - } - finally { - currentSourceFile = oldSourceFile; - } + }, + makeInvalidType, }, - makeInvalidType, + isolatedDeclarations: options.isolatedDeclarations }; function reportIsolatedDeclarationError(node: Node) { const message = createDiagnosticForNode( @@ -713,7 +716,7 @@ export function createLocalInferenceResolver({ else if (type) { return visitNode(type, visitDeclarationSubtree, isTypeNode); } - else if (isExportAssignment(node) && node.expression) { + else if (isExportAssignment(node)) { localType = localInference(node.expression, NarrowBehavior.KeepLiterals); } else if (isVariableDeclaration(node) && node.initializer) { From 98fb92aaff729d3322f52f3eefbceb3afe9d47e1 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Mon, 16 Oct 2023 20:38:34 +0000 Subject: [PATCH 102/224] Merge single use function into it's caller Also, avoid unncessary work caused by calling invalid(), rather call reportIsolatedDeclarationError instead as it was the only thing intended. Signed-off-by: Hana Joo --- .../declarations/localInferenceResolver.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index a222460e0fef5..33490514274c4 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -344,8 +344,9 @@ export function createLocalInferenceResolver({ return invalid(node); } - function invalid(sourceNode: Node): LocalTypeInfo { - return { typeNode: makeInvalidTypeAndReport(sourceNode), flags: LocalTypeInfoFlags.Invalid, sourceNode }; + function invalid(sourceNode: Node): LocalTypeInfo { + reportIsolatedDeclarationError(sourceNode); + return { typeNode: makeInvalidType(), flags: LocalTypeInfoFlags.Invalid, sourceNode }; } function regular(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { return { typeNode, flags, sourceNode }; @@ -363,12 +364,12 @@ export function createLocalInferenceResolver({ const prop = objectLiteral.properties[propIndex]; if (isShorthandPropertyAssignment(prop)) { - invalid(prop); + reportIsolatedDeclarationError(prop); inheritedObjectTypeFlags |= LocalTypeInfoFlags.Invalid; continue; } else if (isSpreadAssignment(prop)) { - invalid(prop); + reportIsolatedDeclarationError(prop); inheritedObjectTypeFlags |= LocalTypeInfoFlags.Invalid; continue; } @@ -539,10 +540,7 @@ export function createLocalInferenceResolver({ ); } } - function makeInvalidTypeAndReport(node: Node) { - reportIsolatedDeclarationError(node); - return makeInvalidType(); - } + function visitTypeAndClone(type: TypeNode | undefined, owner: Node) { const visitedType = visitNode(type, visitDeclarationSubtree, isTypeNode); if (!visitedType) return invalid(owner); From 307759211ba239d649ab82fe8015c4ee56c31f8b Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Tue, 17 Oct 2023 11:26:36 +0000 Subject: [PATCH 103/224] Tidy up the public interfaces and accept baseline Signed-off-by: Hana Joo --- .../transformers/declarations/emit-binder.ts | 12 +++++++++--- src/compiler/transformers/declarations/emit-host.ts | 1 + .../transformers/declarations/emit-resolver.ts | 4 +++- .../transformers/declarations/transform-project.ts | 4 ++-- src/compiler/transformers/declarations/types.ts | 7 +++++++ src/compiler/transformers/declarations/utils.ts | 7 +++---- src/compiler/utilities.ts | 4 ++++ tests/baselines/reference/api/typescript.d.ts | 9 ++++++++- 8 files changed, 37 insertions(+), 11 deletions(-) diff --git a/src/compiler/transformers/declarations/emit-binder.ts b/src/compiler/transformers/declarations/emit-binder.ts index 398b79cfae276..ea3da2b676a55 100644 --- a/src/compiler/transformers/declarations/emit-binder.ts +++ b/src/compiler/transformers/declarations/emit-binder.ts @@ -70,12 +70,13 @@ import { } from "../../utilitiesPublic"; import { IsolatedEmitHost, + MemberKey, } from "./types"; import { getMemberKey, - MemberKey, } from "./utils"; +/** @internal */ export interface EmitDeclarationNodeLinks { isVisible?: boolean; symbol?: EmitDeclarationSymbol; @@ -84,7 +85,10 @@ export interface EmitDeclarationNodeLinks { enumValue?: string | number | undefined; } -type EmitDeclarationSymbolTable = Map; +/** @internal */ +export type EmitDeclarationSymbolTable = Map; + +/** @internal */ export interface EmitDeclarationSymbol { name?: MemberKey; exportSymbol?: EmitDeclarationSymbol; @@ -136,6 +140,7 @@ const syntaxKindToSymbolMap = { [SyntaxKind.ImportClause]: [SymbolFlags.Alias, SymbolFlags.AliasExcludes], } as const satisfies Partial>>; +/** @internal */ export function bindSourceFileForDeclarationEmit(file: SourceFile, host: IsolatedEmitHost) { const options: CompilerOptions = host.getCompilerOptions(); const nodeLinks: EmitDeclarationNodeLinks[] = []; @@ -544,8 +549,9 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile, host: Isolate /** * Gets the symbolic name for a member from its type. + * @internal */ -function getMemberNameFromElement(element: TypeElement | ClassElement | EnumMember): MemberKey | undefined { +export function getMemberNameFromElement(element: TypeElement | ClassElement | EnumMember): MemberKey | undefined { if (isConstructorDeclaration(element) || isConstructSignatureDeclaration(element)) { return "@constructor" as MemberKey; } diff --git a/src/compiler/transformers/declarations/emit-host.ts b/src/compiler/transformers/declarations/emit-host.ts index baa185f3eb495..db57fcea12f64 100644 --- a/src/compiler/transformers/declarations/emit-host.ts +++ b/src/compiler/transformers/declarations/emit-host.ts @@ -17,6 +17,7 @@ import { IsolatedEmitHost, } from "./types"; +/** @internal */ export function createEmitDeclarationHost(allProjectFiles: string[], tsLibFiles: string[], options: CompilerOptions, sys: System): IsolatedEmitHost { const getCompilerOptions = () => options; const getCurrentDirectory = () => "."; diff --git a/src/compiler/transformers/declarations/emit-resolver.ts b/src/compiler/transformers/declarations/emit-resolver.ts index 429d0a4b8b7e5..5371411cd7a6e 100644 --- a/src/compiler/transformers/declarations/emit-resolver.ts +++ b/src/compiler/transformers/declarations/emit-resolver.ts @@ -96,10 +96,10 @@ import { import { IsolatedEmitHost, IsolatedEmitResolver, + MemberKey, } from "./types"; import { getMemberKey, - MemberKey, } from "./utils"; const knownFunctionMembers = new Set([ @@ -110,6 +110,8 @@ const knownFunctionMembers = new Set([ "I:prototype", "I:length", ]); + +/** @internal */ export function createEmitDeclarationResolver(file: SourceFile, host: IsolatedEmitHost): IsolatedEmitResolver { const { getNodeLinks, resolveMemberKey, resolveName } = bindSourceFileForDeclarationEmit(file, host); diff --git a/src/compiler/transformers/declarations/transform-project.ts b/src/compiler/transformers/declarations/transform-project.ts index 813ab401487b9..9120a083b4b2f 100644 --- a/src/compiler/transformers/declarations/transform-project.ts +++ b/src/compiler/transformers/declarations/transform-project.ts @@ -45,7 +45,7 @@ function joinToRootIfNeeded(rootDir: string, existingPath: string) { return normalizePath(pathIsAbsolute(existingPath) ? existingPath : sys.resolvePath(combinePaths(rootDir, existingPath))); } -export function createIsolatedDeclarationsEmitter(rootDir: string, options: CompilerOptions) { +function createIsolatedDeclarationsEmitter(rootDir: string, options: CompilerOptions) { const declarationDir = options.declarationDir ? joinToRootIfNeeded(rootDir, options.declarationDir) : options.outDir ? joinToRootIfNeeded(rootDir, options.outDir) : undefined; @@ -69,7 +69,7 @@ export function createIsolatedDeclarationsEmitter(rootDir: string, options: Comp }; } -export function emitDeclarationsForAllFiles(rootDir: string, files: string[], host: CompilerHost, options: CompilerOptions) { +function emitDeclarationsForAllFiles(rootDir: string, files: string[], host: CompilerHost, options: CompilerOptions) { const transformer = createIsolatedDeclarationsEmitter(rootDir, options); for (const file of files) { try { diff --git a/src/compiler/transformers/declarations/types.ts b/src/compiler/transformers/declarations/types.ts index 94775e51d3a0e..5133b5e9946d3 100644 --- a/src/compiler/transformers/declarations/types.ts +++ b/src/compiler/transformers/declarations/types.ts @@ -30,6 +30,7 @@ import { VariableDeclaration, } from "../../_namespaces/ts"; +/** @internal */ export interface IsolatedEmitHost extends ModuleResolutionHost { readonly redirectTargetsMap: RedirectTargetsMap; getCommonSourceDirectory(): string; @@ -43,6 +44,12 @@ export interface IsolatedEmitHost extends ModuleResolutionHost { useCaseSensitiveFileNames?(): boolean; } +/** @internal */ +export type MemberKey = string & { + __memberKey: void; +}; + +/** @internal */ export interface IsolatedEmitResolver { isLiteralComputedName(node: ComputedPropertyName): boolean; isDeclarationVisible(node: Declaration | AnyImportSyntax): boolean; diff --git a/src/compiler/transformers/declarations/utils.ts b/src/compiler/transformers/declarations/utils.ts index 3f39d4519c095..34d6eb6fc4a90 100644 --- a/src/compiler/transformers/declarations/utils.ts +++ b/src/compiler/transformers/declarations/utils.ts @@ -14,10 +14,9 @@ import { PropertyName, SyntaxKind, } from "../../types"; - -export type MemberKey = string & { - __memberKey: void; -}; +import { + MemberKey +} from "./types"; export function getMemberKey(name: string | Exclude | NoSubstitutionTemplateLiteral): MemberKey; export function getMemberKey(name: string | PropertyName | NoSubstitutionTemplateLiteral | undefined): MemberKey | undefined; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 1f0ab667417c5..96c1a36045324 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -10486,6 +10486,7 @@ export function hasResolutionModeOverride(node: ImportTypeNode | ImportDeclarati return !!getResolutionModeOverride(node.attributes); } +/** @internal */ export function getDeclarationContainer(node: Node): Node { return findAncestor(getRootDeclaration(node), node => { switch (node.kind) { @@ -10501,10 +10502,13 @@ export function getDeclarationContainer(node: Node): Node { } })!.parent; } + +/** @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: diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 96b90b44696a5..bb6c36fe3516e 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -8752,6 +8752,8 @@ declare namespace ts { readonly organizeImportsAccentCollation?: boolean; readonly organizeImportsCaseFirst?: "upper" | "lower" | false; readonly excludeLibrarySymbolsInNavTo?: boolean; + readonly includeInlineTypeFixes?: boolean; + readonly includeRelativeTypeFixes?: boolean; } /** Represents a bigint literal value without requiring bigint support */ interface PseudoBigInt { @@ -9827,6 +9829,11 @@ declare namespace ts { * @param context A lexical environment context for the visitor. */ function visitEachChild(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; + function emitDeclarationsForProject(projectPath: string, files: string[] | undefined, options: CompilerOptions, host: CompilerHost): string; + function emitDeclarationsForFile(sourceFile: SourceFile, allProjectFiles: string[], tsLibFiles: string[], options: CompilerOptions): { + code: string; + diagnostics: Diagnostic[]; + }; function getTsBuildInfoEmitOutputFilePath(options: CompilerOptions): string | undefined; function getOutputFileNames(commandLine: ParsedCommandLine, inputFileName: string, ignoreCase: boolean): readonly string[]; function createPrinter(printerOptions?: PrinterOptions, handlers?: PrintHandlers): Printer; @@ -10554,7 +10561,7 @@ declare namespace ts { getLinkedEditingRangeAtPosition(fileName: string, position: number): LinkedEditingInfo | undefined; getSpanOfEnclosingComment(fileName: string, position: number, onlyMultiLine: boolean): TextSpan | undefined; toLineColumnOffset?(fileName: string, position: number): LineAndCharacter; - getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: readonly number[], formatOptions: FormatCodeSettings, preferences: UserPreferences): readonly CodeFixAction[]; + getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: readonly number[], formatOptions: FormatCodeSettings, preferences: UserPreferences, withDiagnostics?: Diagnostic[]): readonly CodeFixAction[]; getCombinedCodeFix(scope: CombinedCodeFixScope, fixId: {}, formatOptions: FormatCodeSettings, preferences: UserPreferences): CombinedCodeActions; applyCodeActionCommand(action: CodeActionCommand, formatSettings?: FormatCodeSettings): Promise; applyCodeActionCommand(action: CodeActionCommand[], formatSettings?: FormatCodeSettings): Promise; From fb324e5b4a7c20035a3046f9d0c8891f47e592e2 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Tue, 17 Oct 2023 12:04:35 +0000 Subject: [PATCH 104/224] Fix test cases which were failing due to typos Signed-off-by: Hana Joo --- ...eFixMissingTypeAnnotationOnExports29-fn-in-object-literal.ts | 2 +- ...eFixMissingTypeAnnotationOnExports30-non-exported-bidings.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports29-fn-in-object-literal.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports29-fn-in-object-literal.ts index 458ccbc385d51..5a345c904e0a0 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports29-fn-in-object-literal.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports29-fn-in-object-literal.ts @@ -16,7 +16,7 @@ verify.codeFixAll({ fixId: "fixMissingTypeAnnotationOnExports", - fixAllDescription: ts.Diagnostics.Add_all_missing_tye_annotations.message, + fixAllDescription: ts.Diagnostics.Add_all_missing_type_annotations.message, newFileContent: `export const extensions = { /** diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports30-non-exported-bidings.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports30-non-exported-bidings.ts index e7c70367baa6f..aaeaa5c4b6b95 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports30-non-exported-bidings.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports30-non-exported-bidings.ts @@ -10,7 +10,7 @@ verify.codeFixAll({ fixId: "fixMissingTypeAnnotationOnExports", - fixAllDescription: ts.Diagnostics.Add_all_missing_tye_annotations.message, + fixAllDescription: ts.Diagnostics.Add_all_missing_type_annotations.message, newFileContent: `let p = { x: 1, y: 2} const x: number = p.x; From 6c2a8d3d15144d18d6e8864c27734e7d589aea0b Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Tue, 17 Oct 2023 15:55:26 +0000 Subject: [PATCH 105/224] Update baselines These seems all reasonable, we might have missed something before that was not updated. Signed-off-by: Hana Joo --- ...cessorNoUseDefineForClassFields.errors.txt | 22 +++++++++---------- ...oAccessorNoUseDefineForClassFields.symbols | 9 ++++---- ...utoAccessorNoUseDefineForClassFields.types | 6 +++-- .../computedPropertiesNarrowed.errors.txt | 14 ++++++------ .../reference/computedPropertiesNarrowed.js | 2 ++ .../computedPropertiesNarrowed.symbols | 4 +++- .../computedPropertiesNarrowed.types | 4 +++- ...laration-setFunctionName(target=es2015).js | 7 ++++-- ...laration-setFunctionName(target=es2022).js | 8 +++++-- ...Declaration-setFunctionName(target=es5).js | 5 +++-- 10 files changed, 49 insertions(+), 32 deletions(-) diff --git a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.errors.txt b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.errors.txt index 02e3da7fc0a3a..89a2e0e0c32e5 100644 --- a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.errors.txt +++ b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.errors.txt @@ -1,47 +1,47 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/file3-2.ts(1,7): error TS2300: Duplicate identifier 'C3'. -tests/cases/conformance/classes/propertyMemberDeclarations/file3.ts(1,7): error TS2300: Duplicate identifier 'C3'. +file3-2.ts(1,7): error TS2300: Duplicate identifier 'C3'. +file3.ts(1,7): error TS2300: Duplicate identifier 'C3'. -==== tests/cases/conformance/classes/propertyMemberDeclarations/file1.ts (0 errors) ==== +==== file1.ts (0 errors) ==== // https://github.com/microsoft/TypeScript/issues/51528 class C1 { static accessor x = 0; } -==== tests/cases/conformance/classes/propertyMemberDeclarations/file2.ts (0 errors) ==== +==== file2.ts (0 errors) ==== class C2 { static accessor #x = 0; } -==== tests/cases/conformance/classes/propertyMemberDeclarations/file3.ts (1 errors) ==== +==== file3.ts (1 errors) ==== class C3 { ~~ !!! error TS2300: Duplicate identifier 'C3'. -!!! related TS6203 tests/cases/conformance/classes/propertyMemberDeclarations/file3-2.ts:1:7: 'C3' was also declared here. +!!! related TS6203 file3-2.ts:1:7: 'C3' was also declared here. static accessor #x = 0; accessor #y = 0; } -==== tests/cases/conformance/classes/propertyMemberDeclarations/file3-2.ts (1 errors) ==== +==== file3-2.ts (1 errors) ==== class C3 { ~~ !!! error TS2300: Duplicate identifier 'C3'. -!!! related TS6203 tests/cases/conformance/classes/propertyMemberDeclarations/file3.ts:1:7: 'C3' was also declared here. +!!! related TS6203 file3.ts:1:7: 'C3' was also declared here. accessor x = 0; } -==== tests/cases/conformance/classes/propertyMemberDeclarations/file4.ts (0 errors) ==== +==== file4.ts (0 errors) ==== class C4 { accessor #x = 0; } -==== tests/cases/conformance/classes/propertyMemberDeclarations/file5.ts (0 errors) ==== +==== file5.ts (0 errors) ==== class C5 { x = 0; accessor #x = 1; } -==== tests/cases/conformance/classes/propertyMemberDeclarations/file6.ts (0 errors) ==== +==== file6.ts (0 errors) ==== class C6 { accessor #x = 0; x = 1; diff --git a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.symbols b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.symbols index 4739c303d907a..2df26cb704247 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 === +=== file3-2.ts === class C3 { ->C3 : Symbol(C3, Decl(file3.ts, 0, 0)) +>C3 : Symbol(C3, Decl(file3-2.ts, 0, 0)) accessor x = 0; ->x : Symbol(C3.x, Decl(file3.ts, 0, 10)) +>x : Symbol(C3.x, Decl(file3-2.ts, 0, 10)) } === file4.ts === diff --git a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.types b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.types index c7ddf4f10e403..62a0c7691f7ab 100644 --- a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.types +++ b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.types @@ -24,13 +24,15 @@ class C3 { >C3 : C3 static accessor #x = 0; ->x : number +>#x : number >0 : 0 accessor #y = 0; +>#y : number +>0 : 0 } -=== file3.ts === +=== file3-2.ts === class C3 { >C3 : C3 diff --git a/tests/baselines/reference/computedPropertiesNarrowed.errors.txt b/tests/baselines/reference/computedPropertiesNarrowed.errors.txt index d487673a3dceb..01efbad233e71 100644 --- a/tests/baselines/reference/computedPropertiesNarrowed.errors.txt +++ b/tests/baselines/reference/computedPropertiesNarrowed.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/computedPropertiesNarrowed.ts(4,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -tests/cases/compiler/computedPropertiesNarrowed.ts(18,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -tests/cases/compiler/computedPropertiesNarrowed.ts(21,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -tests/cases/compiler/computedPropertiesNarrowed.ts(25,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -tests/cases/compiler/computedPropertiesNarrowed.ts(36,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -tests/cases/compiler/computedPropertiesNarrowed.ts(46,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(4,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(18,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(21,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(25,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(36,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(46,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== tests/cases/compiler/computedPropertiesNarrowed.ts (6 errors) ==== +==== computedPropertiesNarrowed.ts (6 errors) ==== const x: 0 | 1 = Math.random()? 0: 1; declare function assert(n: number): asserts n is 1; assert(x); diff --git a/tests/baselines/reference/computedPropertiesNarrowed.js b/tests/baselines/reference/computedPropertiesNarrowed.js index d02723f3345d0..832b9aae4ac8c 100644 --- a/tests/baselines/reference/computedPropertiesNarrowed.js +++ b/tests/baselines/reference/computedPropertiesNarrowed.js @@ -1,3 +1,5 @@ +//// [tests/cases/compiler/computedPropertiesNarrowed.ts] //// + //// [computedPropertiesNarrowed.ts] const x: 0 | 1 = Math.random()? 0: 1; declare function assert(n: number): asserts n is 1; diff --git a/tests/baselines/reference/computedPropertiesNarrowed.symbols b/tests/baselines/reference/computedPropertiesNarrowed.symbols index 10f68a1bf3d46..0e46b6ff9ae97 100644 --- a/tests/baselines/reference/computedPropertiesNarrowed.symbols +++ b/tests/baselines/reference/computedPropertiesNarrowed.symbols @@ -1,4 +1,6 @@ -=== tests/cases/compiler/computedPropertiesNarrowed.ts === +//// [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, --, --)) diff --git a/tests/baselines/reference/computedPropertiesNarrowed.types b/tests/baselines/reference/computedPropertiesNarrowed.types index d363ed47e7baa..82efb67ffb230 100644 --- a/tests/baselines/reference/computedPropertiesNarrowed.types +++ b/tests/baselines/reference/computedPropertiesNarrowed.types @@ -1,4 +1,6 @@ -=== tests/cases/compiler/computedPropertiesNarrowed.ts === +//// [tests/cases/compiler/computedPropertiesNarrowed.ts] //// + +=== computedPropertiesNarrowed.ts === const x: 0 | 1 = Math.random()? 0: 1; >x : 0 | 1 >Math.random()? 0: 1 : 0 | 1 diff --git a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2015).js b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2015).js index 23534aae989a0..961de87f1f567 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2015).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2015).js @@ -62,7 +62,7 @@ let C = (() => { })(); export { C }; //// [c.js] -export default (() => { +let C = (() => { let _classDecorators = [dec]; let _classDescriptor; let _classExtraInitializers = []; @@ -71,12 +71,15 @@ export default (() => { }; __setFunctionName(_classThis, "C"); (() => { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + 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]; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2022).js b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2022).js index a0d7009e4e915..1d20151d0028e 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2022).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es2022).js @@ -62,20 +62,24 @@ let C = (() => { })(); export { C }; //// [c.js] -export default (() => { +let C = (() => { let _classDecorators = [dec]; let _classDescriptor; let _classExtraInitializers = []; let _classThis; var C = class { + static { _classThis = this; } static { - __esDecorate(null, _classDescriptor = { value: this }, _classDecorators, { kind: "class", name: this.name }, null, _classExtraInitializers); + 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]; diff --git a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es5).js b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es5).js index 835f6c4893283..53320d7ba25a8 100644 --- a/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es5).js +++ b/tests/baselines/reference/esDecorators-classDeclaration-setFunctionName(target=es5).js @@ -86,8 +86,10 @@ var C = function () { }()); __setFunctionName(_classThis, "C"); (function () { - __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers); + 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; @@ -95,7 +97,6 @@ var C = function () { exports.default = C; //// [d.js] "use strict"; -var _this = this; Object.defineProperty(exports, "__esModule", { value: true }); var default_1 = function () { var _classDecorators = [dec]; From e9ca3d4d36924a880dda29ed3e1f0348f03ca092 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Tue, 17 Oct 2023 16:09:20 +0000 Subject: [PATCH 106/224] Support class expressions in DTE Signed-off-by: Hana Joo --- external-declarations/fixed-tests.jsonc | 1 + .../fixer/isolated-declarations-errors.ts | 1 + src/compiler/diagnosticMessages.json | 4 + .../declarations/localInferenceResolver.ts | 156 +++++++++++++++++- 4 files changed, 157 insertions(+), 5 deletions(-) diff --git a/external-declarations/fixed-tests.jsonc b/external-declarations/fixed-tests.jsonc index 7626f305afda5..8f1b3fc01d16e 100644 --- a/external-declarations/fixed-tests.jsonc +++ b/external-declarations/fixed-tests.jsonc @@ -5,6 +5,7 @@ 9008, // Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit 9009, // Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function 9010, // Reference directives are not supported in isolated declaration mode. + 9011, // Heritage_clause_for_Class_Expressions_is_not_allowed_with_isolatedDeclarations ], "with-unreliable-errors": [ 2784, // 'get' and 'set' accessors cannot declare 'this' parameters. diff --git a/external-declarations/src/code-mod/fixer/isolated-declarations-errors.ts b/external-declarations/src/code-mod/fixer/isolated-declarations-errors.ts index 20f2edfb725f2..e933c29440287 100644 --- a/external-declarations/src/code-mod/fixer/isolated-declarations-errors.ts +++ b/external-declarations/src/code-mod/fixer/isolated-declarations-errors.ts @@ -3,4 +3,5 @@ export const isolatedDeclarationsErrors = new Set([ 9008, 9009, 9010, + 9011, ]); diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 38287315fb7b1..ace4101d34ce4 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -6710,6 +6710,10 @@ "category": "Error", "code": 9010 }, + "Heritage clauses in class expressions are not allowed with --isolatedDeclarations": { + "category": "Error", + "code": 9011 + }, "JSX attributes must only be assigned a non-empty 'expression'.": { "category": "Error", "code": 17000 diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 33490514274c4..5756c9678e78c 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -10,9 +10,11 @@ import { } from "../../diagnosticInformationMap.generated"; import { isComputedPropertyName, + isConstructorDeclaration, isExportAssignment, isGetAccessorDeclaration, isIdentifier, + isIndexSignatureDeclaration, isInterfaceDeclaration, isLiteralTypeNode, isMethodDeclaration, @@ -49,6 +51,7 @@ import { ArrayLiteralExpression, ArrowFunction, AsExpression, + ClassExpression, EntityNameOrEntityNameExpression, ExportAssignment, Expression, @@ -62,6 +65,7 @@ import { MethodDeclaration, MethodSignature, Modifier, + ModifierLike, Node, NodeArray, NodeFlags, @@ -85,6 +89,7 @@ import { } from "../../types"; import { createDiagnosticForNode, + createDiagnosticForRange, isEntityNameExpression, } from "../../utilities"; import { @@ -110,6 +115,7 @@ enum LocalTypeInfoFlags { None = 0, Invalid = 1 << 1, } +const propertyLikeModifiers = new Set([SyntaxKind.ReadonlyKeyword, SyntaxKind.PublicKeyword]); interface LocalInferenceResolver { makeInvalidType(): Node; @@ -128,7 +134,7 @@ export function createLocalInferenceResolver({ ensureParameter(p: ParameterDeclaration): ParameterDeclaration; context: TransformationContext; }): { resolver: LocalInferenceResolver, isolatedDeclarations: true } | { resolver: undefined, isolatedDeclarations: false } { - let currentSourceFile: SourceFile | undefined; + let currentSourceFile: SourceFile; const options = context.getCompilerOptions(); const resolver = context.getEmitResolver(); if (!options.isolatedDeclarations) { @@ -187,10 +193,10 @@ export function createLocalInferenceResolver({ const getAccessor = knownIsGetAccessor ? knownAccessor : otherAccessor && isGetAccessorDeclaration(otherAccessor) ? otherAccessor : - undefined; + undefined; const setAccessor = !knownIsGetAccessor ? knownAccessor : otherAccessor && isSetAccessorDeclaration(otherAccessor) ? otherAccessor : - undefined; + undefined; return { otherAccessorIndex, @@ -338,13 +344,15 @@ export function createLocalInferenceResolver({ ); tupleType.emitNode = { flags: 1, autoGenerate: undefined, internalFlags: 0 }; return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node, inheritedArrayTypeFlags); - case SyntaxKind.ObjectLiteralExpression: + case SyntaxKind.ObjectLiteralExpression: return getTypeForObjectLiteralExpression(node as ObjectLiteralExpression, inferenceFlags); + case SyntaxKind.ClassExpression: + return getClassExpressionTypeNode(node as ClassExpression); } return invalid(node); } - function invalid(sourceNode: Node): LocalTypeInfo { + function invalid(sourceNode: Node): LocalTypeInfo { reportIsolatedDeclarationError(sourceNode); return { typeNode: makeInvalidType(), flags: LocalTypeInfoFlags.Invalid, sourceNode }; } @@ -496,6 +504,144 @@ export function createLocalInferenceResolver({ const typeNode: TypeNode = replaceWithInvalid ? makeInvalidType() : factory.createTypeLiteralNode(properties); return regular(typeNode, objectLiteral, inheritedObjectTypeFlags); } + + function getClassExpressionTypeNode(node: ClassExpression): LocalTypeInfo { + let invalid = false; + let hasGetSetAccessor = false; + const staticMembers: TypeElement[] = []; + const nonStaticMembers: TypeElement[] = []; + const constructorParameters: ParameterDeclaration[] = []; + + if (node.heritageClauses && node.heritageClauses.length > 0) { + context.addDiagnostic({ + ...createDiagnosticForNode(node, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit), + relatedInformation: [ + createDiagnosticForRange( + currentSourceFile, + { + pos: node.heritageClauses[0].pos, + end: node.heritageClauses[node.heritageClauses.length - 1].end + }, + Diagnostics.Heritage_clauses_in_class_expressions_are_not_allowed_with_isolatedDeclarations) + ], + }); + invalid = true; + } + + for (const member of node.members) { + if (isConstructorDeclaration(member)) { + for (const parameter of member.parameters) { + const type = localInferenceFromInitializer(parameter, parameter.type); + if (!type) { + invalid = true; + } + // TODO: See what happens on private modifiers. + if (parameter.modifiers?.some((modifier) => propertyLikeModifiers.has(modifier.kind))) { + nonStaticMembers.push(factory.createPropertySignature( + keepReadonlyKeyword(parameter.modifiers), + parameter.name as Identifier, + parameter.questionToken, + type, + )); + } + constructorParameters.push(factory.createParameterDeclaration( + /*modifiers*/ undefined, + parameter.dotDotDotToken, + parameter.name, + parameter.questionToken, + type, + parameter.initializer, + )); + } + } else if (isMethodDeclaration(member)) { + const type = localInferenceFromInitializer(member, member.type); + if (!type) { + invalid = true; + } + const methodSignature = factory.createMethodSignature( + /*modifiers*/ undefined, + member.name, + member.questionToken, + member.typeParameters, + member.parameters, + type, + ); + if (member.modifiers?.some((modifier) => modifier.kind === SyntaxKind.StaticKeyword)) { + staticMembers.push(methodSignature); + } else { + nonStaticMembers.push(methodSignature); + } + } else if (isGetAccessorDeclaration(member) || isSetAccessorDeclaration(member)) { + if (!hasGetSetAccessor) { + hasGetSetAccessor = true; + let type; + if (isGetAccessorDeclaration(member)) { + type = localInferenceFromInitializer(member, member.type); + } else { + type = localInferenceFromInitializer(member.parameters[0], member.parameters[0].type) + } + if (!type) { + invalid = true; + } + nonStaticMembers.push( + factory.createPropertySignature( + [], + member.name, + /*questionToken*/ undefined, + type, + ) + ); + } + } else if (isIndexSignatureDeclaration(member)) { + nonStaticMembers.push(member); + } else if (isPropertyDeclaration(member)) { + const name = isPrivateIdentifier(member.name) ? + // imitating the behavior from utilities.ts : getSymbolNameForPrivateIdentifier, but as we don't have + // a Symbol & SymbolId in hand, we use NodeId of the declaration instead as an approximiation and to provide uniqueness. + // TODO: This seems to have a high collision possibilitiy than the vanilla implementation as we have much less + // ids for nodes in DTE. + factory.createStringLiteral(`__#${node.parent.id}@${member.name.escapedText}`) : + member.name; + const type = localInferenceFromInitializer(member, member.type); + if (!type) { + invalid = true; + } + const propertySignature = factory.createPropertySignature( + keepReadonlyKeyword(member.modifiers), + name, + member.questionToken, + type, + ) + if (member.modifiers?.some((modifier) => modifier.kind === SyntaxKind.StaticKeyword)) { + staticMembers.push(propertySignature); + } else { + nonStaticMembers.push(propertySignature); + } + } + } + + if (invalid) { + return { typeNode: makeInvalidType(), flags: LocalTypeInfoFlags.Invalid, sourceNode: node }; + } + else { + const constructorSignature = factory.createConstructSignature( + node.typeParameters, + constructorParameters, + factory.createTypeLiteralNode(nonStaticMembers) + ); + const typeNode = factory.createTypeLiteralNode([constructorSignature, ...staticMembers]); + return { typeNode, flags: LocalTypeInfoFlags.None, sourceNode: node }; + } + } + + function keepReadonlyKeyword(modifiers?: NodeArray): Modifier[] { + if (modifiers?.some((modifier) => modifier.kind === SyntaxKind.ReadonlyKeyword)) { + return [factory.createModifier(SyntaxKind.ReadonlyKeyword)]; + } else { + return []; + } + } + function normalizeLiteralValue(literal: LiteralExpression) { switch (literal.kind) { case SyntaxKind.BigIntLiteral: From 5c82583865892086d56ca3816308ae35e158a87e Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Tue, 17 Oct 2023 16:44:12 +0000 Subject: [PATCH 107/224] Format files with hereby format This commit is totally non-functional Signed-off-by: Hana Joo --- external-declarations/fixed-tests.jsonc | 50 +- external-declarations/original-tests.jsonc | 21 +- external-declarations/package.json | 60 +-- .../src/code-mod/fixer-test.ts | 36 +- .../src/code-mod/fixer/utils.ts | 21 +- .../tsc-test-fixer/test-case-utils.ts | 2 +- .../src/compiler/lang-utils.ts | 283 +++++------ .../src/compiler/path-utils.ts | 52 ++- .../src/compiler/perf-tracer.ts | 4 +- external-declarations/src/compiler/utils.ts | 47 +- .../src/test-runner/cli-arg-config.ts | 8 +- .../src/test-runner/excluded-ts-tests.ts | 2 +- .../src/test-runner/parallel-run.ts | 34 +- .../tsc-infrastructure/collections.ts | 12 +- .../tsc-infrastructure/fakesHosts.ts | 441 +++++++++--------- .../src/test-runner/tsc-infrastructure/io.ts | 28 +- .../test-runner/tsc-infrastructure/options.ts | 142 +++--- .../tsc-infrastructure/test-document.ts | 21 +- .../tsc-infrastructure/test-file-parser.ts | 24 +- .../test-runner/tsc-infrastructure/vary-by.ts | 24 +- .../src/test-runner/tsc-infrastructure/vfs.ts | 91 ++-- .../test-runner/tsc-infrastructure/vpath.ts | 44 +- external-declarations/src/tsconfig.json | 3 +- external-declarations/src/utils/cli-parser.ts | 119 ++--- external-declarations/src/utils/fs-utils.ts | 19 +- parallel-build/package.json | 36 +- .../dep-builder/dep-builder-tsconfig.json.ts | 3 +- parallel-build/src/main.ts | 4 +- parallel-build/src/run-all-tasks.ts | 2 +- parallel-build/tsconfig.json | 6 +- src/compiler/transformers/declarations.ts | 2 +- .../declarations/localInferenceResolver.ts | 53 ++- .../declarations/transform-project.ts | 2 +- .../transformers/declarations/utils.ts | 2 +- 34 files changed, 907 insertions(+), 791 deletions(-) diff --git a/external-declarations/fixed-tests.jsonc b/external-declarations/fixed-tests.jsonc index 8f1b3fc01d16e..e4961773ebb53 100644 --- a/external-declarations/fixed-tests.jsonc +++ b/external-declarations/fixed-tests.jsonc @@ -5,11 +5,11 @@ 9008, // Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit 9009, // Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function 9010, // Reference directives are not supported in isolated declaration mode. - 9011, // Heritage_clause_for_Class_Expressions_is_not_allowed_with_isolatedDeclarations - ], + 9011 // Heritage_clause_for_Class_Expressions_is_not_allowed_with_isolatedDeclarations + ], "with-unreliable-errors": [ 2784, // 'get' and 'set' accessors cannot declare 'this' parameters. - 1162, // An object member cannot be declared optional. + 1162 // An object member cannot be declared optional. ] }, "test-categories": { @@ -27,9 +27,9 @@ "enumErrors", "enumExportMergingES6", "verbatimModuleSyntaxConstEnumUsage", - "templateLiteralTypes4", + "templateLiteralTypes4" ], - "code-fixer-issues" : [ + "code-fixer-issues": [ "arrayFakeFlatNoCrashInferenceDeclarations", "commonJsImportClassExpression", "constEnumNamespaceReferenceCausesNoImport2", @@ -51,20 +51,20 @@ "reexportClassDefinition", "parserEqualsGreaterThanAfterFunction1", "parserSkippedTokens16", - "declarationFiles", + "declarationFiles" ], "not-fixed-with-unreliable-errors": [ // Language service crash on computing diagnostic (call stack size exceeded) "binderBinaryExpressionStress", - // Bad syntax beyond recovery + // Bad syntax beyond recovery "destructuringParameterDeclaration6", - "thisTypeInFunctionsNegative", + "thisTypeInFunctionsNegative" ], "with-unreliable-errors": [ "thisTypeErrors", // Assertion to this in static context produces this in DTE and any in TSC "parseInvalidNonNullableTypes", // Prefix ! operator - "thisInConstructorParameter2", // this type used in invalid context - "parseInvalidNullableTypes", // Prefix ? operator + "thisInConstructorParameter2", // this type used in invalid context + "parseInvalidNullableTypes", // Prefix ? operator "ArrowFunction1", // Missing type annotation syntax error "parserX_ArrowFunction1", // Missing type annotation syntax error "typeParameterDirectlyConstrainedToItself", // Circular type constraints makes emit unreliable @@ -81,10 +81,10 @@ "duplicatePropertiesInTypeAssertions02", "parserCastVersusArrowFunction1", "invalidMultipleVariableDeclarations", - "validMultipleVariableDeclarations", + "validMultipleVariableDeclarations", "augmentedTypesVar", "objectLiteralErrors", - "duplicateObjectLiteralProperty_computedName2", + "duplicateObjectLiteralProperty_computedName2", "arrowFunctionExpressions", "castingTuple", // contains both duplicate variables and print differences. // Identifier expected. @@ -118,18 +118,18 @@ "decoratorsOnComputedProperties", "indexSignatureMustHaveTypeAnnotation", "intTypeCheck", - // Invalid escape sequences + // Invalid escape sequences "invalidTaggedTemplateEscapeSequences", "objectTypeWithStringNamedPropertyOfIllegalCharacters", "noUsedBeforeDefinedErrorInTypeContext", // Variable used before definition in type context - "accessorBodyInTypeContext", //An implementation cannot be declared in ambient contexts. + "accessorBodyInTypeContext", // An implementation cannot be declared in ambient contexts. "commonJsExportTypeDeclarationError", // Duplicate name, TS resolves to the type alias symbol, DTE resolves to import. Neither is wrong, code is wrong. "parseAssertEntriesError", // Syntactic invalid import assertions. "decoratorMetadataWithImportDeclarationNameCollision7", // Import does not have the accessed member. TS removes the import as unused. A DTE will keep it as it is syntactically used. "classExtendingNonConstructor", // Not reported as isolated declaration error, but the extends clause is invalid. "nodeModulesImportTypeModeDeclarationEmitErrors1", // Invalid import asserts - "wellKnownSymbolExpando", // Expando function with well known symbols error in TS, but generate the expando function namepsace, DTE does not. - "genericsWithDuplicateTypeParameters1", // Duplicate type parameters + "wellKnownSymbolExpando", // Expando function with well known symbols error in TS, but generate the expando function namepsace, DTE does not. + "genericsWithDuplicateTypeParameters1" // Duplicate type parameters ], "with-isolated-declaration-errors/9008": [ "declarationEmitHasTypesRefOnNamespaceUse", @@ -143,13 +143,12 @@ // Will not actually error because of https://github.com/microsoft/TypeScript/issues/55636 // In isolated declarations we walk the type in the return as if it was hand written in the variable // This triggers the difference in behavior described in the issue. - "jsxNamespaceGlobalReexport", - + "jsxNamespaceGlobalReexport" ], "with-isolated-declaration-errors": [ "typeFromPropertyAssignment38", // Nested expando functions. Can in principle be detected, but are not yet implemented "contextualReturnTypeOfIIFE2", // Nested expando functions. Can in principle be detected, but are not yet implemented - // Computed property errors a DTE can't detect + // Computed property errors a DTE can't detect "complicatedPrivacy", "computedPropertyNames12_ES5", "computedPropertyNames12_ES6", @@ -217,15 +216,15 @@ "declarationEmitForModuleImportingModuleAugmentationRetainsImport" // Import augments and must be kept ], "ts-bugs": [ - // Type parameter renamed - // Reported as https://github.com/microsoft/TypeScript/issues/55653 + // Type parameter renamed + // Reported as https://github.com/microsoft/TypeScript/issues/55653 "objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts", "objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames", "objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts", "typeAssertionToGenericFunctionType", // Default type parameters is written in declarations - "conditionalTypesSimplifyWhenTrivial", - // https://github.com/microsoft/TypeScript/issues/55571 + "conditionalTypesSimplifyWhenTrivial", + // https://github.com/microsoft/TypeScript/issues/55571 "reExportAliasMakesInstantiated" ], // Needs TS Fix @@ -307,8 +306,7 @@ "declarationEmitPropertyNumericStringKey", "templateLiteralsSourceMap", // template literal is evaluated in constant value. "nodeModulesImportTypeModeDeclarationEmit1", // resolution-mode in assert from type assertion is preserved - "literalTypesAndTypeAssertions", // (0 | 1) written in code is preserved by dte - ], + "literalTypesAndTypeAssertions" // (0 | 1) written in code is preserved by dte + ] } } - diff --git a/external-declarations/original-tests.jsonc b/external-declarations/original-tests.jsonc index ce0b6c2a99972..ca5b1dbcc128d 100644 --- a/external-declarations/original-tests.jsonc +++ b/external-declarations/original-tests.jsonc @@ -36,18 +36,18 @@ "computedPropertiesNarrowed", // error on used to be indexer, now it is a computed property "propertyAssignment", - "invalidTaggedTemplateEscapeSequences", // Invalid escape sequences + "invalidTaggedTemplateEscapeSequences", // Invalid escape sequences // duplicate field/accessor "symbolDeclarationEmit12" ], "ts-bugs": [ - // https://github.com/microsoft/TypeScript/issues/55571 - "reExportAliasMakesInstantiated" - ], + // https://github.com/microsoft/TypeScript/issues/55571 + "reExportAliasMakesInstantiated" + ], // Just Printing differences "print-differences": [ - "parseBigInt", // number literals are normalized by ts - "templateLiteralsSourceMap", // template literal is evaluated in constant value. + "parseBigInt", // number literals are normalized by ts + "templateLiteralsSourceMap" // template literal is evaluated in constant value. ], "enums-issues": [ // External eval @@ -60,12 +60,12 @@ "verbatimModuleSyntaxConstEnumUsage", "templateLiteralTypes4", "enumConstantMembers", - // merge + // merge "mergedEnumDeclarationCodeGen", "enumExportMergingES6", - "mergedDeclarations2", + "mergedDeclarations2" ], - // Some 9007 errors will result in differences. This is fine. + // Some 9007 errors will result in differences. This is fine. "with-isolated-declaration-errors/9007": [ // computed property differences "complicatedPrivacy", @@ -74,8 +74,7 @@ "overloadsWithComputedNames", "typeUsedAsTypeLiteralIndex", // computed property errors but in type aliases "forwardRefInEnum", // Circular enums result in different values - "enumErrors", + "enumErrors" ] } } - diff --git a/external-declarations/package.json b/external-declarations/package.json index 6b18e1fe3bf1b..3dda5983edc39 100644 --- a/external-declarations/package.json +++ b/external-declarations/package.json @@ -1,32 +1,32 @@ { - "name": "external-declarations", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "build": "node ../built/local/tsc.js -p ./src", - "watch": "node ../built/local/tsc.js -w -p ./src", - "run-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=../tests/cases --libPath=../tests/lib --type=all --shardCount=8 --forceIsolatedDeclarations --outputPath=./tsc-tests/$original --configFile=./original-tests.jsonc", - "run-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=../tests/cases --outputPath=./tsc-tests/$original --configFile=./original-tests.jsonc", - "transform-tests-parallel": "node ./build/code-mod/tsc-test-fixer/run-test-updater-parallel.js --rootPaths=../tests/cases --shardCount=8", - "transform-tests": "node ./build/code-mod/tsc-test-fixer/run-test-updater.js --rootPaths=../tests/cases", - "run-transformed-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=./tsc-tests/updated-tests --libPath=../tests/lib --type=all --shardCount=8 --outputPath=./tsc-tests/$transformed --configFile=./fixed-tests.jsonc", - "run-transformed-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=./tsc-tests/updated-tests --libPath=../tests/lib --outputPath=./tsc-tests/$transformed --configFile=./fixed-tests.jsonc", - "fixer-tests": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source ", - "fixer-tests-update": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source --update " - }, - "author": "", - "license": "ISC", - "dependencies": { - "json5": "^2.2.3", - "source-map-support": "^0.5.21", - "typescript": "../", - "@types/inquirer": "^8.2.6", - "@types/node": "^20.7.1", - "chalk": "^4.1.2", - "inquirer": "^8.2.6" - }, - "devDependencies": { - "@types/node": "^18.11.18" - } + "name": "external-declarations", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "build": "node ../built/local/tsc.js -p ./src", + "watch": "node ../built/local/tsc.js -w -p ./src", + "run-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=../tests/cases --libPath=../tests/lib --type=all --shardCount=8 --forceIsolatedDeclarations --outputPath=./tsc-tests/$original --configFile=./original-tests.jsonc", + "run-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=../tests/cases --outputPath=./tsc-tests/$original --configFile=./original-tests.jsonc", + "transform-tests-parallel": "node ./build/code-mod/tsc-test-fixer/run-test-updater-parallel.js --rootPaths=../tests/cases --shardCount=8", + "transform-tests": "node ./build/code-mod/tsc-test-fixer/run-test-updater.js --rootPaths=../tests/cases", + "run-transformed-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=./tsc-tests/updated-tests --libPath=../tests/lib --type=all --shardCount=8 --outputPath=./tsc-tests/$transformed --configFile=./fixed-tests.jsonc", + "run-transformed-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=./tsc-tests/updated-tests --libPath=../tests/lib --outputPath=./tsc-tests/$transformed --configFile=./fixed-tests.jsonc", + "fixer-tests": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source ", + "fixer-tests-update": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source --update " + }, + "author": "", + "license": "ISC", + "dependencies": { + "json5": "^2.2.3", + "source-map-support": "^0.5.21", + "typescript": "../", + "@types/inquirer": "^8.2.6", + "@types/node": "^20.7.1", + "chalk": "^4.1.2", + "inquirer": "^8.2.6" + }, + "devDependencies": { + "@types/node": "^18.11.18" + } } diff --git a/external-declarations/src/code-mod/fixer-test.ts b/external-declarations/src/code-mod/fixer-test.ts index b34b7bbea3952..643c9b94d7d89 100644 --- a/external-declarations/src/code-mod/fixer-test.ts +++ b/external-declarations/src/code-mod/fixer-test.ts @@ -7,7 +7,9 @@ import ts from "typescript"; import { normalizePath, } from "../compiler/path-utils"; -import { TestCaseContent } from "../test-runner/tsc-infrastructure/test-file-parser"; +import { + TestCaseContent, +} from "../test-runner/tsc-infrastructure/test-file-parser"; import { loadTestCase, } from "../test-runner/utils"; @@ -57,11 +59,11 @@ async function main() { const updatedTestFileName = testFile.replace(rootPath, "./fixer-test/expected"); const result = await fixTestCase(caseData, { - target: ts.ScriptTarget.ES2019 + target: ts.ScriptTarget.ES2019, }); - const resultFiles = !(result instanceof Error)? result : [{ - unitName: caseData.testUnitData[0].name, - content: ` + const resultFiles = !(result instanceof Error) ? result : [{ + unitName: caseData.testUnitData[0].name, + content: ` ================= CODE MOD ERROR ============== ${result.message} ${result.stack} @@ -71,21 +73,24 @@ ${result.stack} // ${caseData.code.split("\n").join("\n// ")} `, }]; - await compareTestCase({ - ...caseData, - testUnitData: caseData.testUnitData.map(u => ({ - ...u, - content: resultFiles.find(o => o.unitName === u.name)?.content!, - })), - }, updatedTestFileName, !!parsedArgs.update); + await compareTestCase( + { + ...caseData, + testUnitData: caseData.testUnitData.map(u => ({ + ...u, + content: resultFiles.find(o => o.unitName === u.name)?.content!, + })), + }, + updatedTestFileName, + !!parsedArgs.update, + ); console.log(`Ran: ${count}`); } } -async function compareTestCase(testData: TestCaseContent & { BOM: string }, path: string, update: boolean) { +async function compareTestCase(testData: TestCaseContent & { BOM: string; }, path: string, update: boolean) { const content = await testCaseToString(testData); - const original = - !fsSync.existsSync(path) ? undefined: await fs.readFile(path, "utf-8"); + const original = !fsSync.existsSync(path) ? undefined : await fs.readFile(path, "utf-8"); if (content !== original) { if (!update) { throw new Error(`Expected \n${original}\n for file ${path} but seen \n${content}`); @@ -96,5 +101,4 @@ async function compareTestCase(testData: TestCaseContent & { BOM: string }, path } } - main(); diff --git a/external-declarations/src/code-mod/fixer/utils.ts b/external-declarations/src/code-mod/fixer/utils.ts index d64775dfca587..886105e320dba 100644 --- a/external-declarations/src/code-mod/fixer/utils.ts +++ b/external-declarations/src/code-mod/fixer/utils.ts @@ -1,22 +1,23 @@ import chalk from "chalk"; import * as path from "path"; -import { Diagnostic } from "typescript"; - +import { + Diagnostic, +} from "typescript"; export function printDiagnostics(diag: Diagnostic) { - const pos = getLineColumn(diag) + const pos = getLineColumn(diag); const relative = path.relative(process.cwd(), diag.file?.fileName!); console.log(`${chalk.blueBright(relative)}:${pos.line}:${pos.col} - ${diag.messageText}`); } export function getLineColumn(diag: Diagnostic) { - const text = diag.file?.text! - let line = 1; + const text = diag.file?.text!; + let line = 1; let lineStart = text.lastIndexOf("\n", diag.start); - const col = lineStart === -1 ? diag.start!: diag.start!- lineStart; - while(lineStart > 0) { - line++ + const col = lineStart === -1 ? diag.start! : diag.start! - lineStart; + while (lineStart > 0) { + line++; lineStart = text.lastIndexOf("\n", lineStart - 1); } - return { line, col } -} \ No newline at end of file + return { line, col }; +} diff --git a/external-declarations/src/code-mod/tsc-test-fixer/test-case-utils.ts b/external-declarations/src/code-mod/tsc-test-fixer/test-case-utils.ts index 5d90b49793a7e..dafe58bdacc4a 100644 --- a/external-declarations/src/code-mod/tsc-test-fixer/test-case-utils.ts +++ b/external-declarations/src/code-mod/tsc-test-fixer/test-case-utils.ts @@ -10,7 +10,7 @@ import { } from "../../utils/fs-utils"; export async function writeTestCase(testData: TestCaseContent & { BOM: string; }, path: string) { - await ensureDir(fsPath.dirname(path)) + await ensureDir(fsPath.dirname(path)); await fs.writeFile(path, await testCaseToString(testData)); } export async function testCaseToString(testData: TestCaseContent & { BOM: string; }) { diff --git a/external-declarations/src/compiler/lang-utils.ts b/external-declarations/src/compiler/lang-utils.ts index 68f9f7d1e93d3..77336aacfd812 100644 --- a/external-declarations/src/compiler/lang-utils.ts +++ b/external-declarations/src/compiler/lang-utils.ts @@ -1,8 +1,10 @@ -import { MapLike, SortedArray, SortedReadonlyArray } from "typescript"; - - -export type Mutable = { -readonly [K in keyof T]: T[K] }; +import { + MapLike, + SortedArray, + SortedReadonlyArray, +} from "typescript"; +export type Mutable = { -readonly [K in keyof T]: T[K]; }; /** @internal */ export type EqualityComparer = (a: T, b: T) => boolean; @@ -22,7 +24,6 @@ export function forEach(array: readonly T[] | undefined, callback: (elemen return undefined; } - /** @internal */ export function some(array: readonly T[] | undefined): array is readonly T[]; /** @internal */ @@ -44,18 +45,16 @@ export function some(array: readonly T[] | undefined, predicate?: (value: T) return false; } - /** @internal */ export function stringContains(str: string, substring: string): boolean { return str.indexOf(substring) !== -1; } - - /** - * @return Whether the value was added. - * - * @internal - */ +/** + * @return Whether the value was added. + * + * @internal + */ export function pushIfUnique(array: T[], toAdd: T, equalityComparer?: EqualityComparer): boolean { if (contains(array, toAdd, equalityComparer)) { return false; @@ -78,12 +77,11 @@ export function contains(array: readonly T[] | undefined, value: T, equalityC return false; } - /** @internal */ export const enum Comparison { - LessThan = -1, - EqualTo = 0, - GreaterThan = 1 + LessThan = -1, + EqualTo = 0, + GreaterThan = 1, } export function equateValues(a: T, b: T) { return a === b; @@ -94,7 +92,6 @@ export function length(array: readonly any[] | undefined): number { return array ? array.length : 0; } - /** * Flattens an array containing a mix of array or non-array elements. * @@ -102,7 +99,7 @@ export function length(array: readonly any[] | undefined): number { * * @internal */ - export function flatten(array: T[][] | readonly (T | readonly T[] | undefined)[]): T[] { +export function flatten(array: T[][] | readonly (T | readonly T[] | undefined)[]): T[] { const result: T[] = []; for (const v of array) { if (v) { @@ -117,20 +114,15 @@ export function length(array: readonly any[] | undefined): number { return result; } - - /** * Tests whether a value is an array. * * @internal */ - export function isArray(value: any): value is readonly unknown[] { +export function isArray(value: any): value is readonly unknown[] { return Array.isArray ? Array.isArray(value) : value instanceof Array; } - - - /** * Appends a range of value to an array, returning the array. * @@ -143,22 +135,22 @@ export function length(array: readonly any[] | undefined): number { * * @internal */ - export function addRange(to: T[], from: readonly T[] | undefined, start?: number, end?: number): T[]; - /** @internal */ - export function addRange(to: T[] | undefined, from: readonly T[] | undefined, start?: number, end?: number): T[] | undefined; - /** @internal */ - export function addRange(to: T[] | undefined, from: readonly T[] | undefined, start?: number, end?: number): T[] | undefined { - if (from === undefined || from.length === 0) return to; - if (to === undefined) return from.slice(start, end); - start = start === undefined ? 0 : toOffset(from, start); - end = end === undefined ? from.length : toOffset(from, end); - for (let i = start; i < end && i < from.length; i++) { - if (from[i] !== undefined) { - to.push(from[i]); - } - } - return to; - } +export function addRange(to: T[], from: readonly T[] | undefined, start?: number, end?: number): T[]; +/** @internal */ +export function addRange(to: T[] | undefined, from: readonly T[] | undefined, start?: number, end?: number): T[] | undefined; +/** @internal */ +export function addRange(to: T[] | undefined, from: readonly T[] | undefined, start?: number, end?: number): T[] | undefined { + if (from === undefined || from.length === 0) return to; + if (to === undefined) return from.slice(start, end); + start = start === undefined ? 0 : toOffset(from, start); + end = end === undefined ? from.length : toOffset(from, end); + for (let i = start; i < end && i < from.length; i++) { + if (from[i] !== undefined) { + to.push(from[i]); + } + } + return to; +} /** * Gets the actual offset into an array for a relative offset. Negative offsets indicate a @@ -168,7 +160,6 @@ function toOffset(array: readonly any[], offset: number) { return offset < 0 ? array.length + offset : offset; } - /** @internal */ export function map(array: readonly T[], f: (x: T, i: number) => U): U[]; /** @internal */ @@ -185,46 +176,41 @@ export function map(array: readonly T[] | undefined, f: (x: T, i: number) return result; } - - /** * Compacts an array, removing any falsey elements. * * @internal */ - export function compact(array: (T | undefined | null | false | 0 | "")[]): T[]; - /** @internal */ - export function compact(array: readonly (T | undefined | null | false | 0 | "")[]): readonly T[]; - // ESLint thinks these can be combined with the above - they cannot; they'd produce higher-priority inferences and prevent the falsey types from being stripped - /** @internal */ - export function compact(array: T[]): T[]; // eslint-disable-line @typescript-eslint/unified-signatures - /** @internal */ - export function compact(array: readonly T[]): readonly T[]; // eslint-disable-line @typescript-eslint/unified-signatures - /** @internal */ - export function compact(array: T[]): T[] { - let result: T[] | undefined; - if (array) { - for (let i = 0; i < array.length; i++) { - const v = array[i]; - if (result || !v) { - if (!result) { - result = array.slice(0, i); - } - if (v) { - result.push(v); - } - } - } - } - return result || array; - } - +export function compact(array: (T | undefined | null | false | 0 | "")[]): T[]; +/** @internal */ +export function compact(array: readonly (T | undefined | null | false | 0 | "")[]): readonly T[]; +// ESLint thinks these can be combined with the above - they cannot; they'd produce higher-priority inferences and prevent the falsey types from being stripped +/** @internal */ +export function compact(array: T[]): T[]; // eslint-disable-line @typescript-eslint/unified-signatures +/** @internal */ +export function compact(array: readonly T[]): readonly T[]; // eslint-disable-line @typescript-eslint/unified-signatures +/** @internal */ +export function compact(array: T[]): T[] { + let result: T[] | undefined; + if (array) { + for (let i = 0; i < array.length; i++) { + const v = array[i]; + if (result || !v) { + if (!result) { + result = array.slice(0, i); + } + if (v) { + result.push(v); + } + } + } + } + return result || array; +} /** @internal */ export const emptyArray: never[] = [] as never[]; - - /** * Appends a value to an array, returning the array. * @@ -235,22 +221,22 @@ export const emptyArray: never[] = [] as never[]; * * @internal */ - export function append[number] | undefined>(to: TArray, value: TValue): [undefined, undefined] extends [TArray, TValue] ? TArray : NonNullable[number][]; - /** @internal */ - export function append(to: T[], value: T | undefined): T[]; - /** @internal */ - export function append(to: T[] | undefined, value: T): T[]; - /** @internal */ - export function append(to: T[] | undefined, value: T | undefined): T[] | undefined; - /** @internal */ - export function append(to: Push, value: T | undefined): void; - /** @internal */ - export function append(to: T[], value: T | undefined): T[] | undefined { - if (value === undefined) return to; - if (to === undefined) return [value]; - to.push(value); - return to; - } +export function append[number] | undefined>(to: TArray, value: TValue): [undefined, undefined] extends [TArray, TValue] ? TArray : NonNullable[number][]; +/** @internal */ +export function append(to: T[], value: T | undefined): T[]; +/** @internal */ +export function append(to: T[] | undefined, value: T): T[]; +/** @internal */ +export function append(to: T[] | undefined, value: T | undefined): T[] | undefined; +/** @internal */ +export function append(to: Push, value: T | undefined): void; +/** @internal */ +export function append(to: T[], value: T | undefined): T[] | undefined { + if (value === undefined) return to; + if (to === undefined) return [value]; + to.push(value); + return to; +} /** Array that is only intended to be pushed to, never read. */ export interface Push { @@ -258,13 +244,12 @@ export interface Push { /** @internal */ readonly length: number; } - /** * Stable sort of an array. Elements equal to each other maintain their relative position in the array. * * @internal */ - export function stableSort(array: readonly T[], comparer: Comparer): SortedReadonlyArray { +export function stableSort(array: readonly T[], comparer: Comparer): SortedReadonlyArray { const indices = indicesOf(array); stableSortIndices(array, indices, comparer); return indices.map(i => array[i]) as SortedArray as SortedReadonlyArray; @@ -283,28 +268,27 @@ function stableSortIndices(array: readonly T[], indices: number[], comparer: * * @internal */ - export function find(array: readonly T[] | undefined, predicate: (element: T, index: number) => element is U, startIndex?: number): U | undefined; - /** @internal */ - export function find(array: readonly T[] | undefined, predicate: (element: T, index: number) => boolean, startIndex?: number): T | undefined; - /** @internal */ - export function find(array: readonly T[] | undefined, predicate: (element: T, index: number) => boolean, startIndex?: number): T | undefined { - if (array === undefined) return undefined; - for (let i = startIndex ?? 0; i < array.length; i++) { - const value = array[i]; - if (predicate(value, i)) { - return value; - } - } - return undefined; - } - +export function find(array: readonly T[] | undefined, predicate: (element: T, index: number) => element is U, startIndex?: number): U | undefined; +/** @internal */ +export function find(array: readonly T[] | undefined, predicate: (element: T, index: number) => boolean, startIndex?: number): T | undefined; +/** @internal */ +export function find(array: readonly T[] | undefined, predicate: (element: T, index: number) => boolean, startIndex?: number): T | undefined { + if (array === undefined) return undefined; + for (let i = startIndex ?? 0; i < array.length; i++) { + const value = array[i]; + if (predicate(value, i)) { + return value; + } + } + return undefined; +} /** * Returns the last element of an array if non-empty, `undefined` otherwise. * * @internal */ - export function lastOrUndefined(array: readonly T[] | undefined): T | undefined { +export function lastOrUndefined(array: readonly T[] | undefined): T | undefined { return array === undefined || array.length === 0 ? undefined : array[array.length - 1]; } @@ -339,11 +323,11 @@ export function findLastIndex(array: readonly T[] | undefined, predicate: (el * * @internal */ - export function equateStringsCaseInsensitive(a: string, b: string) { +export function equateStringsCaseInsensitive(a: string, b: string) { return a === b || a !== undefined - && b !== undefined - && a.toUpperCase() === b.toUpperCase(); + && b !== undefined + && a.toUpperCase() === b.toUpperCase(); } /** @@ -354,7 +338,7 @@ export function findLastIndex(array: readonly T[] | undefined, predicate: (el * * @internal */ - export function equateStringsCaseSensitive(a: string, b: string) { +export function equateStringsCaseSensitive(a: string, b: string) { return equateValues(a, b); } @@ -378,7 +362,6 @@ export function compareValues(a: number | undefined, b: number | undefined): Com return compareComparableValues(a, b); } - /** * Compare two strings using a case-insensitive ordinal comparison. * @@ -393,7 +376,7 @@ export function compareValues(a: number | undefined, b: number | undefined): Com * * @internal */ - export function compareStringsCaseInsensitive(a: string, b: string) { +export function compareStringsCaseInsensitive(a: string, b: string) { if (a === b) return Comparison.EqualTo; if (a === undefined) return Comparison.LessThan; if (b === undefined) return Comparison.GreaterThan; @@ -414,7 +397,7 @@ export function compareValues(a: number | undefined, b: number | undefined): Com * * @internal */ - export function compareStringsCaseSensitive(a: string | undefined, b: string | undefined): Comparison { +export function compareStringsCaseSensitive(a: string | undefined, b: string | undefined): Comparison { return compareComparableValues(a, b); } @@ -423,7 +406,6 @@ export function getStringComparer(ignoreCase?: boolean) { return ignoreCase ? compareStringsCaseInsensitive : compareStringsCaseSensitive; } - /** * Iterates through `array` by index and performs the callback on each element of array until the callback * returns a falsey value, then returns false. @@ -431,7 +413,7 @@ export function getStringComparer(ignoreCase?: boolean) { * * @internal */ - export function every(array: readonly T[] | undefined, callback: (element: T, index: number) => boolean): boolean { +export function every(array: readonly T[] | undefined, callback: (element: T, index: number) => boolean): boolean { if (array) { for (let i = 0; i < array.length; i++) { if (!callback(array[i], i)) { @@ -443,7 +425,6 @@ export function getStringComparer(ignoreCase?: boolean) { return true; } - /** @internal */ export function mapDefined(array: readonly T[] | undefined, mapFn: (x: T, i: number) => U | undefined): U[] { const result: U[] = []; @@ -458,30 +439,28 @@ export function mapDefined(array: readonly T[] | undefined, mapFn: (x: T, return result; } - /** * Shims `Array.from`. * * @internal */ - export function arrayFrom(iterator: Iterator | IterableIterator, map: (t: T) => U): U[]; - /** @internal */ - export function arrayFrom(iterator: Iterator | IterableIterator): T[]; - /** @internal */ - export function arrayFrom(iterator: Iterator | IterableIterator, map?: (t: T) => U): (T | U)[] { - const result: (T | U)[] = []; - for (let iterResult = iterator.next(); !iterResult.done; iterResult = iterator.next()) { - result.push(map ? map(iterResult.value) : iterResult.value); - } - return result; - } +export function arrayFrom(iterator: Iterator | IterableIterator, map: (t: T) => U): U[]; +/** @internal */ +export function arrayFrom(iterator: Iterator | IterableIterator): T[]; +/** @internal */ +export function arrayFrom(iterator: Iterator | IterableIterator, map?: (t: T) => U): (T | U)[] { + const result: (T | U)[] = []; + for (let iterResult = iterator.next(); !iterResult.done; iterResult = iterator.next()) { + result.push(map ? map(iterResult.value) : iterResult.value); + } + return result; +} - /** @internal */ +/** @internal */ export function startsWith(str: string, prefix: string): boolean { return str.lastIndexOf(prefix, 0) === 0; } - /** @internal */ export function endsWith(str: string, suffix: string): boolean { const expectedPos = str.length - suffix.length; @@ -498,33 +477,30 @@ export function tryRemoveSuffix(str: string, suffix: string): string | undefined return endsWith(str, suffix) ? str.slice(0, str.length - suffix.length) : undefined; } - /** * Returns lower case string * * @internal */ - export function toLowerCase(x: string) { +export function toLowerCase(x: string) { return x.toLowerCase(); } - /** * Returns its argument. * * @internal */ - export function identity(x: T) { +export function identity(x: T) { return x; } - /** * Remove an item from an array, moving everything to its right one space left. * * @internal */ - export function orderedRemoveItem(array: T[], item: T): boolean { +export function orderedRemoveItem(array: T[], item: T): boolean { for (let i = 0; i < array.length; i++) { if (array[i] === item) { orderedRemoveItemAt(array, i); @@ -534,13 +510,12 @@ export function tryRemoveSuffix(str: string, suffix: string): string | undefined return false; } - /** * Remove an item by index from an array, moving everything to its right one space left. * * @internal */ - export function orderedRemoveItemAt(array: T[], index: number): void { +export function orderedRemoveItemAt(array: T[], index: number): void { // This seems to be faster than either `array.splice(i, 1)` or `array.copyWithin(i, i+ 1)`. for (let i = index; i < array.length - 1; i++) { array[i] = array[i + 1]; @@ -571,19 +546,18 @@ const hasOwnProperty = Object.prototype.hasOwnProperty; * * @internal */ -export function hasProperty(map: T, key: K): map is Extract>>; +export function hasProperty(map: T, key: K): map is Extract>>; export function hasProperty(map: MapLike, key: string): boolean; export function hasProperty(map: MapLike, key: string): boolean { return hasOwnProperty.call(map, key); } - /** * Gets the owned, enumerable property keys of a map-like. * * @internal */ - export function getOwnKeys(map: MapLike): string[] { +export function getOwnKeys(map: MapLike): string[] { const keys: string[] = []; for (const key in map) { if (hasOwnProperty.call(map, key)) { @@ -603,13 +577,12 @@ export function tryCast(value: T, test: (value: T) => boolean): T | undefined return value !== undefined && test(value) ? value : undefined; } - /** * Like `forEach`, but suitable for use with numbers and strings (which may be falsy). * * @internal */ - export function firstDefined(array: readonly T[] | undefined, callback: (element: T, index: number) => U | undefined): U | undefined { +export function firstDefined(array: readonly T[] | undefined, callback: (element: T, index: number) => U | undefined): U | undefined { if (array === undefined) { return undefined; } @@ -628,7 +601,7 @@ export function tryCast(value: T, test: (value: T) => boolean): T | undefined * * @internal */ - export function compareBooleans(a: boolean, b: boolean): Comparison { +export function compareBooleans(a: boolean, b: boolean): Comparison { return compareValues(a ? 1 : 0, b ? 1 : 0); } @@ -637,7 +610,7 @@ export function tryCast(value: T, test: (value: T) => boolean): T | undefined * * @internal */ - export function isString(text: unknown): text is string { +export function isString(text: unknown): text is string { return typeof text === "string"; } /** @internal */ @@ -645,7 +618,6 @@ export function isNumber(x: unknown): x is number { return typeof x === "number"; } - /** * patternOrStrings contains both patterns (containing "*") and regular strings. * Return an exact match if possible, or a pattern match, or undefined. @@ -653,7 +625,7 @@ export function isNumber(x: unknown): x is number { * * @internal */ - export function matchPatternOrExact(patternOrStrings: readonly (string | Pattern)[], candidate: string): string | Pattern | undefined { +export function matchPatternOrExact(patternOrStrings: readonly (string | Pattern)[], candidate: string): string | Pattern | undefined { const patterns: Pattern[] = []; for (const patternOrString of patternOrStrings) { if (patternOrString === candidate) { @@ -673,18 +645,17 @@ export function isNumber(x: unknown): x is number { * * @internal */ - export interface Pattern { +export interface Pattern { prefix: string; suffix: string; } - /** * Return the object corresponding to the best pattern to match `candidate`. * * @internal */ - export function findBestPatternMatch(values: readonly T[], getPattern: (value: T) => Pattern, candidate: string): T | undefined { +export function findBestPatternMatch(values: readonly T[], getPattern: (value: T) => Pattern, candidate: string): T | undefined { let matchedValue: T | undefined; // use length of prefix as betterness criteria let longestMatchPrefixLength = -1; @@ -726,11 +697,10 @@ export function tryParsePattern(pattern: string): string | Pattern | undefined { ? undefined : { prefix: pattern.substr(0, indexOfStar), - suffix: pattern.substr(indexOfStar + 1) + suffix: pattern.substr(indexOfStar + 1), }; } - /** @internal */ export function min(items: readonly [T, ...T[]], compare: Comparer): T; /** @internal */ @@ -775,7 +745,6 @@ export function isNullOrUndefined(x: any): x is null | undefined { return x === undefined || x === null; // eslint-disable-line no-null/no-null } - /** * Performs a binary search, finding the index at which `value` occurs in `array`. * If no such index is found, returns the 2's-complement of first index at which @@ -789,7 +758,7 @@ export function isNullOrUndefined(x: any): x is null | undefined { * * @internal */ - export function binarySearch(array: readonly T[], value: T, keySelector: (v: T) => U, keyComparer: Comparer, offset?: number): number { +export function binarySearch(array: readonly T[], value: T, keySelector: (v: T) => U, keyComparer: Comparer, offset?: number): number { return binarySearchKey(array, keySelector(value), keySelector, keyComparer, offset); } @@ -830,13 +799,12 @@ export function binarySearchKey(array: readonly T[], key: U, keySelector: return ~low; } - /** * Works like Array.prototype.findIndex, returning `-1` if no element satisfying the predicate is found. * * @internal */ - export function findIndex(array: readonly T[] | undefined, predicate: (element: T, index: number) => boolean, startIndex?: number): number { +export function findIndex(array: readonly T[] | undefined, predicate: (element: T, index: number) => boolean, startIndex?: number): number { if (array === undefined) return -1; for (let i = startIndex ?? 0; i < array.length; i++) { if (predicate(array[i], i)) { @@ -846,7 +814,6 @@ export function binarySearchKey(array: readonly T[], key: U, keySelector: return -1; } - /** @internal */ export function clone(object: T): T { const result: any = {}; @@ -857,5 +824,3 @@ export function clone(object: T): T { } return result; } - - diff --git a/external-declarations/src/compiler/path-utils.ts b/external-declarations/src/compiler/path-utils.ts index 67862199dc201..b194bbab5a186 100644 --- a/external-declarations/src/compiler/path-utils.ts +++ b/external-declarations/src/compiler/path-utils.ts @@ -1,8 +1,31 @@ -import { Extension, Path } from "typescript"; - -import { Debug } from "./debug"; -import { compareStringsCaseInsensitive, compareStringsCaseSensitive, compareValues, Comparison, endsWith, equateStringsCaseInsensitive, equateStringsCaseSensitive, getStringComparer, identity, lastOrUndefined, some, startsWith, stringContains, toLowerCase } from "./lang-utils"; -import { CharacterCodes, GetCanonicalFileName } from "./types"; +import { + Extension, + Path, +} from "typescript"; + +import { + Debug, +} from "./debug"; +import { + compareStringsCaseInsensitive, + compareStringsCaseSensitive, + compareValues, + Comparison, + endsWith, + equateStringsCaseInsensitive, + equateStringsCaseSensitive, + getStringComparer, + identity, + lastOrUndefined, + some, + startsWith, + stringContains, + toLowerCase, +} from "./lang-utils"; +import { + CharacterCodes, + GetCanonicalFileName, +} from "./types"; /** * Internally, we represent paths as strings with '/' as the directory separator. @@ -131,8 +154,10 @@ function getEncodedRootLength(path: string): number { // special case interpreted as "the machine from which the URL is being interpreted". const scheme = path.slice(0, schemeEnd); const authority = path.slice(authorityStart, authorityEnd); - if (scheme === "file" && (authority === "" || authority === "localhost") && - isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { + if ( + scheme === "file" && (authority === "" || authority === "localhost") && + isVolumeCharacter(path.charCodeAt(authorityEnd + 1)) + ) { const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); if (volumeSeparatorEnd !== -1) { if (path.charCodeAt(volumeSeparatorEnd) === CharacterCodes.slash) { @@ -577,7 +602,6 @@ export function normalizePath(path: string): string { return normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized; } - /** @internal */ export function toPath(fileName: string, basePath: string | undefined, getCanonicalFileName: (path: string) => string): Path { const nonCanonicalizedPath = isRootedDiskPath(fileName) @@ -787,10 +811,8 @@ export function getRelativePathFromDirectory(fromDirectory: string, to: string, return getPathFromPathComponents(pathComponents); } - //// Path Traversal - /** * Case insensitive file systems have descripencies in how they handle some characters (eg. turkish Upper case I with dot on top - \u0130) * This function is used in places where we want to make file name as a key on these systems @@ -810,7 +832,6 @@ function toFileNameLowerCase(x: string) { x; } - // We convert the file names to lower case as key for file name on case insensitive file system // While doing so we need to handle special characters (eg \u0130) to ensure that we dont convert // it to lower case, fileName with its lowercase form can exist along side it. @@ -835,13 +856,11 @@ function toFileNameLowerCase(x: string) { // a-z, 0-9, \u0131, \u00DF, \, /, ., : and space const fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_. ]+/g; - /** @internal */ export function removeExtension(path: string, extension: string): string { return path.substring(0, path.length - extension.length); } - /** @internal */ export function createGetCanonicalFileName(useCaseSensitiveFileNames: boolean): GetCanonicalFileName { return useCaseSensitiveFileNames ? identity : toFileNameLowerCase; @@ -869,11 +888,10 @@ export function isJavaScriptFile(f: string) { || f.endsWith(Extension.Mjs); } - export function getDeclarationExtension(path: string) { return ( - path.endsWith(Extension.Mjs) || path.endsWith(Extension.Mts) ? Extension.Dmts: - path.endsWith(Extension.Cjs) || path.endsWith(Extension.Cts) ? Extension.Dcts: - Extension.Dts + path.endsWith(Extension.Mjs) || path.endsWith(Extension.Mts) ? Extension.Dmts : + path.endsWith(Extension.Cjs) || path.endsWith(Extension.Cts) ? Extension.Dcts : + Extension.Dts ); } diff --git a/external-declarations/src/compiler/perf-tracer.ts b/external-declarations/src/compiler/perf-tracer.ts index 175a04692a1df..7e86fdf8df40b 100644 --- a/external-declarations/src/compiler/perf-tracer.ts +++ b/external-declarations/src/compiler/perf-tracer.ts @@ -6,7 +6,7 @@ export const tracer: { end(name: string): void; }; } = { - current: undefined + current: undefined, }; export function installTracer() { @@ -26,4 +26,4 @@ export function installTracer() { startTimes[name] = undefined; }, }; -} \ No newline at end of file +} diff --git a/external-declarations/src/compiler/utils.ts b/external-declarations/src/compiler/utils.ts index 43f516318838e..c4f4bb50c6990 100644 --- a/external-declarations/src/compiler/utils.ts +++ b/external-declarations/src/compiler/utils.ts @@ -1,7 +1,27 @@ -import { __String, CompilerOptions, Extension, JsxEmit, ModuleKind, NewLineKind, Node, NodeFlags, PrinterOptions, ScriptTarget, sys, TsConfigSourceFile } from "typescript"; - -import { clone, flatten, some } from "./lang-utils"; -import { fileExtensionIs, fileExtensionIsOneOf } from "./path-utils"; +import { + __String, + CompilerOptions, + Extension, + JsxEmit, + ModuleKind, + NewLineKind, + Node, + NodeFlags, + PrinterOptions, + ScriptTarget, + sys, + TsConfigSourceFile, +} from "typescript"; + +import { + clone, + flatten, + some, +} from "./lang-utils"; +import { + fileExtensionIs, + fileExtensionIsOneOf, +} from "./path-utils"; /** @internal */ export function isInJSFile(node: Node | undefined): boolean { @@ -16,19 +36,17 @@ export function getDeclarationEmitExtensionForPath(path: string) { Extension.Dts; } - /** @internal */ export function getOutputExtension(fileName: string, options: CompilerOptions): Extension { return fileExtensionIs(fileName, Extension.Json) ? Extension.Json : - options.jsx === JsxEmit.Preserve && fileExtensionIsOneOf(fileName, [Extension.Jsx, Extension.Tsx]) ? Extension.Jsx : - fileExtensionIsOneOf(fileName, [Extension.Mts, Extension.Mjs]) ? Extension.Mjs : - fileExtensionIsOneOf(fileName, [Extension.Cts, Extension.Cjs]) ? Extension.Cjs : - Extension.Js; + options.jsx === JsxEmit.Preserve && fileExtensionIsOneOf(fileName, [Extension.Jsx, Extension.Tsx]) ? Extension.Jsx : + fileExtensionIsOneOf(fileName, [Extension.Mts, Extension.Mjs]) ? Extension.Mjs : + fileExtensionIsOneOf(fileName, [Extension.Cts, Extension.Cjs]) ? Extension.Cjs : + Extension.Js; } - /** @internal */ -export function getEmitScriptTarget(compilerOptions: {module?: CompilerOptions["module"], target?: CompilerOptions["target"]}) { +export function getEmitScriptTarget(compilerOptions: { module?: CompilerOptions["module"]; target?: CompilerOptions["target"]; }) { return compilerOptions.target || (compilerOptions.module === ModuleKind.Node16 && ScriptTarget.ES2022) || (compilerOptions.module === ModuleKind.NodeNext && ScriptTarget.ESNext) || @@ -45,7 +63,7 @@ const supportedJSExtensionsFlat: readonly Extension[] = flatten(supportedJSExten * @internal */ const supportedTSExtensions: readonly Extension[][] = [[Extension.Ts, Extension.Tsx, Extension.Dts], [Extension.Cts, Extension.Dcts], [Extension.Mts, Extension.Dmts]]; - /** @internal */ +/** @internal */ const supportedTSExtensionsFlat: readonly Extension[] = flatten(supportedTSExtensions); /** @internal */ @@ -64,8 +82,6 @@ export function isDeclarationFileName(fileName: string): boolean { return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions); } - - /** @internal */ export function cloneCompilerOptions(options: CompilerOptions): CompilerOptions { const result = clone(options); @@ -91,6 +107,3 @@ export function getNewLineCharacter(options: CompilerOptions | PrinterOptions, g } return getNewLine ? getNewLine() : sys ? sys.newLine : carriageReturnLineFeed; } - - - diff --git a/external-declarations/src/test-runner/cli-arg-config.ts b/external-declarations/src/test-runner/cli-arg-config.ts index a68f58329c357..17651c43439f6 100644 --- a/external-declarations/src/test-runner/cli-arg-config.ts +++ b/external-declarations/src/test-runner/cli-arg-config.ts @@ -1,4 +1,8 @@ -import { ArgType,parseArgs,parserConfiguration } from "../utils/cli-parser"; +import { + ArgType, + parseArgs, + parserConfiguration, +} from "../utils/cli-parser"; export const testRunnerCLIConfiguration = parserConfiguration({ default: { @@ -19,8 +23,6 @@ export const testRunnerCLIConfiguration = parserConfiguration({ forceIsolatedDeclarations: ArgType.Boolean(), }); - - const { value, printUsageOnErrors } = parseArgs(process.argv.slice(2), testRunnerCLIConfiguration); printUsageOnErrors(); diff --git a/external-declarations/src/test-runner/excluded-ts-tests.ts b/external-declarations/src/test-runner/excluded-ts-tests.ts index 878fc2e5c3eeb..ee3977776acff 100644 --- a/external-declarations/src/test-runner/excluded-ts-tests.ts +++ b/external-declarations/src/test-runner/excluded-ts-tests.ts @@ -18,4 +18,4 @@ export const excludedTsTests = new Set([ // The function is elided because the eval function is merged with eval from libs into a single symbol // We can't reproduce this behavior "parserStrictMode8", -]); \ No newline at end of file +]); diff --git a/external-declarations/src/test-runner/parallel-run.ts b/external-declarations/src/test-runner/parallel-run.ts index 2fac400e2d29c..c1540be7cfa60 100644 --- a/external-declarations/src/test-runner/parallel-run.ts +++ b/external-declarations/src/test-runner/parallel-run.ts @@ -1,27 +1,31 @@ import * as childProcess from "child_process"; import * as path from "path"; -import { parseArgs } from "../utils/cli-parser"; -import { testRunnerCLIConfiguration } from "./cli-arg-config"; +import { + parseArgs, +} from "../utils/cli-parser"; +import { + testRunnerCLIConfiguration, +} from "./cli-arg-config"; interface ExecuteResult { - error: childProcess.ExecException | undefined - stdout: string, - stderr: string, + error: childProcess.ExecException | undefined; + stdout: string; + stderr: string; } function exec(cmd: string, dir: string, onStdOut: (s: string) => void) { - return new Promise((resolve) => { + return new Promise(resolve => { console.log(`In ${dir} Executing: ${cmd}`); - const ls = childProcess.spawn(cmd, [], { + const ls = childProcess.spawn(cmd, [], { cwd: path.resolve(path.join(process.cwd(), dir)), - shell: true + shell: true, }); let stdout = ""; let stderr = ""; - ls.stdout.on("data", (data) => { - if(!onStdOut) { + ls.stdout.on("data", data => { + if (!onStdOut) { process.stdout.write(data.toString()); } else { @@ -30,15 +34,15 @@ function exec(cmd: string, dir: string, onStdOut: (s: string) => void) { stdout += data.toString(); }); - ls.stderr.on("data", (data) => { + ls.stderr.on("data", data => { process.stderr.write(data.toString()); stderr += data.toString(); }); - ls.on("error", (err) => { + ls.on("error", err => { console.log(err); }); - ls.on("exit", (code) => { + ls.on("exit", code => { console.log("exited:" + code?.toString()); resolve({ error: !code ? undefined : Object.assign(new Error(""), { @@ -46,7 +50,7 @@ function exec(cmd: string, dir: string, onStdOut: (s: string) => void) { cmd, }), stderr, - stdout + stdout, }); }); }); @@ -66,7 +70,7 @@ async function main() { const promisees = Array.from({ length: shardCount }).map(async (_, index) => { await exec(commandLine + ` --shard=${index}`, "./", out => { runCount += (out.match(/Ran:/g) || []).length; - if(new Date().getTime() - lastWrite > 2000) { + if (new Date().getTime() - lastWrite > 2000) { lastWrite = new Date().getTime(); console.log(`Run count: ${runCount} after ${elapsedTime(lastWrite)}`); } diff --git a/external-declarations/src/test-runner/tsc-infrastructure/collections.ts b/external-declarations/src/test-runner/tsc-infrastructure/collections.ts index 8adffb7804207..658eb1d3358df 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/collections.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/collections.ts @@ -51,9 +51,9 @@ export class SortedMap { return index >= 0 ? this._values[index] : undefined; } - public getEntry(key: K): [ K, V ] | undefined { + public getEntry(key: K): [K, V] | undefined { const index = ts.binarySearch(this._keys, key, ts.identity, this._comparer); - return index >= 0 ? [ this._keys[index], this._values[index] ] : undefined; + return index >= 0 ? [this._keys[index], this._values[index]] : undefined; } public set(key: K, value: V) { @@ -119,7 +119,7 @@ export class SortedMap { } } - public * keys() { + public *keys() { const keys = this._keys; const indices = this.getIterationOrder(); const version = this._version; @@ -141,7 +141,7 @@ export class SortedMap { } } - public * values() { + public *values() { const values = this._values; const indices = this.getIterationOrder(); const version = this._version; @@ -163,7 +163,7 @@ export class SortedMap { } } - public * entries() { + public *entries() { const keys = this._keys; const values = this._values; const indices = this.getIterationOrder(); @@ -251,7 +251,7 @@ export function closeIterator(iterator: Iterator) { export class Metadata { private static readonly _undefinedValue = {}; private _parent: Metadata | undefined; - private _map: { [key: string]: any }; + private _map: { [key: string]: any; }; private _version = 0; private _size = -1; private _parentVersion: number | undefined; diff --git a/external-declarations/src/test-runner/tsc-infrastructure/fakesHosts.ts b/external-declarations/src/test-runner/tsc-infrastructure/fakesHosts.ts index 7eb2dedda4f48..9ed2adec6e71e 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/fakesHosts.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/fakesHosts.ts @@ -1,235 +1,238 @@ import * as ts from "typescript"; -import { getNewLineCharacter } from "../../compiler/utils"; +import { + getNewLineCharacter, +} from "../../compiler/utils"; import * as collections from "./collections"; -import { Utils } from "./compiler-run"; +import { + Utils, +} from "./compiler-run"; import * as documents from "./test-document"; import * as vfs from "./vfs"; import * as vpath from "./vpath"; - /** * Fake implementations of various compiler dependencies. */ - const processExitSentinel = new Error("System exit"); - - export interface SystemOptions { - executingFilePath?: string; - newLine?: "\r\n" | "\n"; - env?: Record; - } - - /** - * A fake `ts.System` that leverages a virtual file system. - */ - export class System implements ts.System { - public readonly vfs: vfs.FileSystem; - public readonly args: string[] = []; - public readonly output: string[] = []; - public readonly newLine: string; - public readonly useCaseSensitiveFileNames: boolean; - public exitCode: number | undefined; - - private readonly _executingFilePath: string | undefined; - private readonly _env: Record | undefined; - - constructor(vfs: vfs.FileSystem, { executingFilePath, newLine = "\r\n", env }: SystemOptions = {}) { - this.vfs = vfs.isReadonly ? vfs.shadow() : vfs; - this.useCaseSensitiveFileNames = !this.vfs.ignoreCase; - this.newLine = newLine; - this._executingFilePath = executingFilePath; - this._env = env; - } - - private testTerminalWidth = Number.parseInt(this.getEnvironmentVariable("TS_TEST_TERMINAL_WIDTH")); - getWidthOfTerminal = Number.isNaN(this.testTerminalWidth) ? undefined : () => this.testTerminalWidth; - - // Pretty output - writeOutputIsTTY() { - return true; - } - - public write(message: string) { - console.log(message); - this.output.push(message); - } - - public readFile(path: string) { - try { - const content = this.vfs.readFileSync(path, "utf8"); - return content === undefined ? undefined : Utils.removeByteOrderMark(content); - } - catch { - return undefined; - } - } - - public writeFile(path: string, data: string, writeByteOrderMark?: boolean): void { - this.vfs.mkdirpSync(vpath.dirname(path)); - this.vfs.writeFileSync(path, writeByteOrderMark ? Utils.addUTF8ByteOrderMark(data) : data); - } - - public deleteFile(path: string) { - this.vfs.unlinkSync(path); - } - - public fileExists(path: string) { - const stats = this._getStats(path); - return stats ? stats.isFile() : false; - } - - public directoryExists(path: string) { - const stats = this._getStats(path); - return stats ? stats.isDirectory() : false; - } - - public createDirectory(path: string): void { - this.vfs.mkdirpSync(path); - } - - public getCurrentDirectory() { - return this.vfs.cwd(); - } - - public getDirectories(path: string) { - const result: string[] = []; - try { - for (const file of this.vfs.readdirSync(path)) { - if (this.vfs.statSync(vpath.combine(path, file)).isDirectory()) { - result.push(file); - } - } - } - catch { /*ignore*/ } - return result; - } - - public readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[] { +const processExitSentinel = new Error("System exit"); + +export interface SystemOptions { + executingFilePath?: string; + newLine?: "\r\n" | "\n"; + env?: Record; +} + +/** + * A fake `ts.System` that leverages a virtual file system. + */ +export class System implements ts.System { + public readonly vfs: vfs.FileSystem; + public readonly args: string[] = []; + public readonly output: string[] = []; + public readonly newLine: string; + public readonly useCaseSensitiveFileNames: boolean; + public exitCode: number | undefined; + + private readonly _executingFilePath: string | undefined; + private readonly _env: Record | undefined; + + constructor(vfs: vfs.FileSystem, { executingFilePath, newLine = "\r\n", env }: SystemOptions = {}) { + this.vfs = vfs.isReadonly ? vfs.shadow() : vfs; + this.useCaseSensitiveFileNames = !this.vfs.ignoreCase; + this.newLine = newLine; + this._executingFilePath = executingFilePath; + this._env = env; + } + + private testTerminalWidth = Number.parseInt(this.getEnvironmentVariable("TS_TEST_TERMINAL_WIDTH")); + getWidthOfTerminal = Number.isNaN(this.testTerminalWidth) ? undefined : () => this.testTerminalWidth; + + // Pretty output + writeOutputIsTTY() { + return true; + } + + public write(message: string) { + console.log(message); + this.output.push(message); + } + + public readFile(path: string) { + try { + const content = this.vfs.readFileSync(path, "utf8"); + return content === undefined ? undefined : Utils.removeByteOrderMark(content); + } + catch { + return undefined; + } + } + + public writeFile(path: string, data: string, writeByteOrderMark?: boolean): void { + this.vfs.mkdirpSync(vpath.dirname(path)); + this.vfs.writeFileSync(path, writeByteOrderMark ? Utils.addUTF8ByteOrderMark(data) : data); + } + + public deleteFile(path: string) { + this.vfs.unlinkSync(path); + } + + public fileExists(path: string) { + const stats = this._getStats(path); + return stats ? stats.isFile() : false; + } + + public directoryExists(path: string) { + const stats = this._getStats(path); + return stats ? stats.isDirectory() : false; + } + + public createDirectory(path: string): void { + this.vfs.mkdirpSync(path); + } + + public getCurrentDirectory() { + return this.vfs.cwd(); + } + + public getDirectories(path: string) { + const result: string[] = []; + try { + for (const file of this.vfs.readdirSync(path)) { + if (this.vfs.statSync(vpath.combine(path, file)).isDirectory()) { + result.push(file); + } + } + } + catch { /*ignore*/ } + return result; + } + + public readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[] { throw new Error("Not implemented"); // return matchFiles(path, extensions, exclude, include, this.useCaseSensitiveFileNames, this.getCurrentDirectory(), depth, path => this.getAccessibleFileSystemEntries(path), path => this.realpath(path)); - } - - public getAccessibleFileSystemEntries(path: string): vfs.FileSystemEntries { - const files: string[] = []; - const directories: string[] = []; - try { - for (const file of this.vfs.readdirSync(path)) { - try { - const stats = this.vfs.statSync(vpath.combine(path, file)); - if (stats.isFile()) { - files.push(file); - } - else if (stats.isDirectory()) { - directories.push(file); - } - } - catch { /*ignored*/ } - } - } - catch { /*ignored*/ } - return { files, directories }; - } - - public exit(exitCode?: number) { - this.exitCode = exitCode; - throw processExitSentinel; - } - - public getFileSize(path: string) { - const stats = this._getStats(path); - return stats && stats.isFile() ? stats.size : 0; - } - - public resolvePath(path: string) { - return vpath.resolve(this.vfs.cwd(), path); - } - - public getExecutingFilePath() { - if (this._executingFilePath === undefined) throw new Error("ts.notImplemented"); - return this._executingFilePath; - } - - public getModifiedTime(path: string) { - const stats = this._getStats(path); - return stats ? stats.mtime : undefined!; // TODO: GH#18217 - } - - public setModifiedTime(path: string, time: Date) { - this.vfs.utimesSync(path, time, time); - } - - public createHash(data: string): string { - return `${generateDjb2Hash(data)}-${data}`; - } - - public realpath(path: string) { - try { - return this.vfs.realpathSync(path); - } - catch { - return path; - } - } - - public getEnvironmentVariable(name: string): string { - return (this._env && this._env[name])!; // TODO: GH#18217 - } - - private _getStats(path: string) { - try { - return this.vfs.existsSync(path) ? this.vfs.statSync(path) : undefined; - } - catch { - return undefined; - } - } - - now() { - return new Date(this.vfs.time()); - } - } - - /** - * A fake `ts.ParseConfigHost` that leverages a virtual file system. - */ - export class ParseConfigHost implements ts.ParseConfigHost { - public readonly sys: System; - - constructor(sys: System | vfs.FileSystem) { - if (sys instanceof vfs.FileSystem) sys = new System(sys); - this.sys = sys; - } - - public get vfs() { - return this.sys.vfs; - } - - public get useCaseSensitiveFileNames() { - return this.sys.useCaseSensitiveFileNames; - } - - public fileExists(fileName: string): boolean { - return this.sys.fileExists(fileName); - } - - public directoryExists(directoryName: string): boolean { - return this.sys.directoryExists(directoryName); - } - - public readFile(path: string): string | undefined { - return this.sys.readFile(path); - } - - public readDirectory(path: string, extensions: string[], excludes: string[], includes: string[], depth: number): string[] { - return this.sys.readDirectory(path, extensions, excludes, includes, depth); - } - } + } + + public getAccessibleFileSystemEntries(path: string): vfs.FileSystemEntries { + const files: string[] = []; + const directories: string[] = []; + try { + for (const file of this.vfs.readdirSync(path)) { + try { + const stats = this.vfs.statSync(vpath.combine(path, file)); + if (stats.isFile()) { + files.push(file); + } + else if (stats.isDirectory()) { + directories.push(file); + } + } + catch { /*ignored*/ } + } + } + catch { /*ignored*/ } + return { files, directories }; + } + + public exit(exitCode?: number) { + this.exitCode = exitCode; + throw processExitSentinel; + } + + public getFileSize(path: string) { + const stats = this._getStats(path); + return stats && stats.isFile() ? stats.size : 0; + } + + public resolvePath(path: string) { + return vpath.resolve(this.vfs.cwd(), path); + } + + public getExecutingFilePath() { + if (this._executingFilePath === undefined) throw new Error("ts.notImplemented"); + return this._executingFilePath; + } + + public getModifiedTime(path: string) { + const stats = this._getStats(path); + return stats ? stats.mtime : undefined!; // TODO: GH#18217 + } + + public setModifiedTime(path: string, time: Date) { + this.vfs.utimesSync(path, time, time); + } + + public createHash(data: string): string { + return `${generateDjb2Hash(data)}-${data}`; + } + + public realpath(path: string) { + try { + return this.vfs.realpathSync(path); + } + catch { + return path; + } + } + + public getEnvironmentVariable(name: string): string { + return (this._env && this._env[name])!; // TODO: GH#18217 + } + + private _getStats(path: string) { + try { + return this.vfs.existsSync(path) ? this.vfs.statSync(path) : undefined; + } + catch { + return undefined; + } + } + + now() { + return new Date(this.vfs.time()); + } +} + +/** + * A fake `ts.ParseConfigHost` that leverages a virtual file system. + */ +export class ParseConfigHost implements ts.ParseConfigHost { + public readonly sys: System; + + constructor(sys: System | vfs.FileSystem) { + if (sys instanceof vfs.FileSystem) sys = new System(sys); + this.sys = sys; + } + + public get vfs() { + return this.sys.vfs; + } + + public get useCaseSensitiveFileNames() { + return this.sys.useCaseSensitiveFileNames; + } + + public fileExists(fileName: string): boolean { + return this.sys.fileExists(fileName); + } + + public directoryExists(directoryName: string): boolean { + return this.sys.directoryExists(directoryName); + } + + public readFile(path: string): string | undefined { + return this.sys.readFile(path); + } + + public readDirectory(path: string, extensions: string[], excludes: string[], includes: string[], depth: number): string[] { + return this.sys.readDirectory(path, extensions, excludes, includes, depth); + } +} /** * A fake `ts.CompilerHost` that leverages a virtual file system. */ - export class CompilerHost implements ts.CompilerHost { +export class CompilerHost implements ts.CompilerHost { public readonly sys: System; public readonly defaultLibLocation: string; public readonly outputs: documents.TextDocument[] = []; @@ -374,9 +377,11 @@ import * as vpath from "./vpath"; while (fs.shadowRoot) { try { const shadowRootStats = fs.shadowRoot.existsSync(canonicalFileName) ? fs.shadowRoot.statSync(canonicalFileName) : undefined!; // TODO: GH#18217 - if (shadowRootStats.dev !== stats.dev || + if ( + shadowRootStats.dev !== stats.dev || shadowRootStats.ino !== stats.ino || - shadowRootStats.mtimeMs !== stats.mtimeMs) { + shadowRootStats.mtimeMs !== stats.mtimeMs + ) { break; } @@ -401,7 +406,7 @@ import * as vpath from "./vpath"; * * @internal */ - export function generateDjb2Hash(data: string): string { +export function generateDjb2Hash(data: string): string { let acc = 5381; for (let i = 0; i < data.length; i++) { acc = ((acc << 5) + acc) + data.charCodeAt(i); diff --git a/external-declarations/src/test-runner/tsc-infrastructure/io.ts b/external-declarations/src/test-runner/tsc-infrastructure/io.ts index 2cdda290ccb4c..8e23ded2d7381 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/io.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/io.ts @@ -1,7 +1,14 @@ -import { sys } from "typescript"; - -import { compareStringsCaseInsensitive,compareStringsCaseSensitive } from "../../compiler/lang-utils"; -import { FileSystemEntries } from "./vfs"; +import { + sys, +} from "typescript"; + +import { + compareStringsCaseInsensitive, + compareStringsCaseSensitive, +} from "../../compiler/lang-utils"; +import { + FileSystemEntries, +} from "./vfs"; import * as vpath from "./vpath"; export interface IO { @@ -18,7 +25,7 @@ export interface IO { fileExists(fileName: string): boolean; directoryExists(path: string): boolean; deleteFile(fileName: string): void; - listFiles(path: string, filter?: RegExp, options?: { recursive?: boolean }): string[]; + listFiles(path: string, filter?: RegExp, options?: { recursive?: boolean; }): string[]; log(text: string): void; args(): string[]; getExecutingFilePath(): string; @@ -29,7 +36,7 @@ export interface IO { tryEnableSourceMapsForHost?(): void; getEnvironmentVariable?(name: string): string; getMemoryUsage?(): number | undefined; - joinPath(...components: string[]): string + joinPath(...components: string[]): string; } // harness always uses one kind of new line @@ -65,7 +72,7 @@ function createNodeIO(): IO { return pathModule.join(...components); } - function listFiles(path: string, spec: RegExp, options: { recursive?: boolean } = {}) { + function listFiles(path: string, spec: RegExp, options: { recursive?: boolean; } = {}) { function filesInFolder(folder: string): string[] { let paths: string[] = []; @@ -151,14 +158,15 @@ function createNodeIO(): IO { exit: exitCode => sys.exit(exitCode), readDirectory: (path, extension, exclude, include, depth) => sys.readDirectory(path, extension, exclude, include, depth), getAccessibleFileSystemEntries, - tryEnableSourceMapsForHost: () => { throw new Error("Not supported");}, + tryEnableSourceMapsForHost: () => { + throw new Error("Not supported"); + }, getMemoryUsage: () => sys.getMemoryUsage && sys.getMemoryUsage(), getEnvironmentVariable(name: string) { return process.env[name] || ""; }, - joinPath + joinPath, }; } - export const IO = createNodeIO(); diff --git a/external-declarations/src/test-runner/tsc-infrastructure/options.ts b/external-declarations/src/test-runner/tsc-infrastructure/options.ts index 4427c9ee8a738..43ac31fe4c433 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/options.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/options.ts @@ -1,10 +1,31 @@ - // Watch related options -import { CompilerOptionsValue, Diagnostic,DiagnosticMessage, ImportsNotUsedAsValues, JsxEmit, ModuleDetectionKind, ModuleKind, ModuleResolutionKind, NewLineKind, PollingWatchKind, ScriptTarget, WatchDirectoryKind, WatchFileKind } from "typescript"; +import { + CompilerOptionsValue, + Diagnostic, + DiagnosticMessage, + ImportsNotUsedAsValues, + JsxEmit, + ModuleDetectionKind, + ModuleKind, + ModuleResolutionKind, + NewLineKind, + PollingWatchKind, + ScriptTarget, + WatchDirectoryKind, + WatchFileKind, +} from "typescript"; -import { getEntries, isNullOrUndefined, mapDefined, startsWith, trimString } from "../../compiler/lang-utils"; -import { Diagnostics } from "./diagnosticInformationMap.generated"; +import { + getEntries, + isNullOrUndefined, + mapDefined, + startsWith, + trimString, +} from "../../compiler/lang-utils"; +import { + Diagnostics, +} from "./diagnosticInformationMap.generated"; const jsxOptionMap = new Map(getEntries({ "preserve": JsxEmit.Preserve, @@ -14,7 +35,6 @@ const jsxOptionMap = new Map(getEntries({ "react-jsxdev": JsxEmit.ReactJSXDev, })); - // NOTE: The order here is important to default lib ordering as entries will have the same // order in the generated program (see `getDefaultLibPriority` in program.ts). This // order also affects overload resolution when a type declared in one lib is @@ -91,7 +111,7 @@ const libEntries: [string, string][] = [ ["esnext.bigint", "lib.es2020.bigint.d.ts"], ["esnext.string", "lib.es2022.string.d.ts"], ["esnext.promise", "lib.es2021.promise.d.ts"], - ["esnext.weakref", "lib.es2021.weakref.d.ts"] + ["esnext.weakref", "lib.es2021.weakref.d.ts"], ]; /** @@ -111,7 +131,6 @@ export const libs = libEntries.map(entry => entry[0]); */ export const libMap = new Map(libEntries); - /** @internal */ export const optionsForWatch = [ { @@ -278,7 +297,7 @@ export const commonOptionsWithBuild = [ paramType: Diagnostics.FILE_OR_DIRECTORY, category: Diagnostics.Compiler_Diagnostics, description: Diagnostics.Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging, - defaultValueDescription: "profile.cpuprofile" + defaultValueDescription: "profile.cpuprofile", }, { name: "generateTrace", @@ -287,7 +306,7 @@ export const commonOptionsWithBuild = [ isCommandLineOnly: true, paramType: Diagnostics.DIRECTORY, category: Diagnostics.Compiler_Diagnostics, - description: Diagnostics.Generates_an_event_trace_and_a_list_of_types + description: Diagnostics.Generates_an_event_trace_and_a_list_of_types, }, { name: "incremental", @@ -296,7 +315,7 @@ export const commonOptionsWithBuild = [ category: Diagnostics.Projects, description: Diagnostics.Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects, transpileOptionValue: undefined, - defaultValueDescription: Diagnostics.false_unless_composite_is_set + defaultValueDescription: Diagnostics.false_unless_composite_is_set, }, { name: "declaration", @@ -319,7 +338,7 @@ export const commonOptionsWithBuild = [ category: Diagnostics.Emit, transpileOptionValue: undefined, defaultValueDescription: false, - description: Diagnostics.Create_sourcemaps_for_d_ts_files + description: Diagnostics.Create_sourcemaps_for_d_ts_files, }, { name: "emitDeclarationOnly", @@ -367,7 +386,7 @@ export const commonOptionsWithBuild = [ category: Diagnostics.Command_line_Options, isCommandLineOnly: true, description: Diagnostics.Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit, - defaultValueDescription: Diagnostics.Platform_specific + defaultValueDescription: Diagnostics.Platform_specific, }, ] as const; @@ -507,7 +526,7 @@ const commandOptionsWithoutBuild = [ showInSimplifiedHelpView: true, category: Diagnostics.Language_and_Environment, description: Diagnostics.Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment, - transpileOptionValue: undefined + transpileOptionValue: undefined, }, { name: "allowJs", @@ -574,7 +593,7 @@ const commandOptionsWithoutBuild = [ paramType: Diagnostics.LOCATION, category: Diagnostics.Modules, description: Diagnostics.Specify_the_root_folder_within_your_source_files, - defaultValueDescription: Diagnostics.Computed_from_the_list_of_input_files + defaultValueDescription: Diagnostics.Computed_from_the_list_of_input_files, }, { name: "composite", @@ -689,7 +708,7 @@ const commandOptionsWithoutBuild = [ strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type, - defaultValueDescription: Diagnostics.false_unless_strict_is_set + defaultValueDescription: Diagnostics.false_unless_strict_is_set, }, { name: "strictNullChecks", @@ -699,7 +718,7 @@ const commandOptionsWithoutBuild = [ strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.When_type_checking_take_into_account_null_and_undefined, - defaultValueDescription: Diagnostics.false_unless_strict_is_set + defaultValueDescription: Diagnostics.false_unless_strict_is_set, }, { name: "strictFunctionTypes", @@ -709,7 +728,7 @@ const commandOptionsWithoutBuild = [ strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible, - defaultValueDescription: Diagnostics.false_unless_strict_is_set + defaultValueDescription: Diagnostics.false_unless_strict_is_set, }, { name: "strictBindCallApply", @@ -719,7 +738,7 @@ const commandOptionsWithoutBuild = [ strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function, - defaultValueDescription: Diagnostics.false_unless_strict_is_set + defaultValueDescription: Diagnostics.false_unless_strict_is_set, }, { name: "strictPropertyInitialization", @@ -729,7 +748,7 @@ const commandOptionsWithoutBuild = [ strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor, - defaultValueDescription: Diagnostics.false_unless_strict_is_set + defaultValueDescription: Diagnostics.false_unless_strict_is_set, }, { name: "noImplicitThis", @@ -739,7 +758,7 @@ const commandOptionsWithoutBuild = [ strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any, - defaultValueDescription: Diagnostics.false_unless_strict_is_set + defaultValueDescription: Diagnostics.false_unless_strict_is_set, }, { name: "useUnknownInCatchVariables", @@ -760,7 +779,7 @@ const commandOptionsWithoutBuild = [ strictFlag: true, category: Diagnostics.Type_Checking, description: Diagnostics.Ensure_use_strict_is_always_emitted, - defaultValueDescription: Diagnostics.false_unless_strict_is_set + defaultValueDescription: Diagnostics.false_unless_strict_is_set, }, // Additional Checks @@ -852,7 +871,7 @@ const commandOptionsWithoutBuild = [ paramType: Diagnostics.STRATEGY, category: Diagnostics.Modules, description: Diagnostics.Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier, - defaultValueDescription: Diagnostics.module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node + defaultValueDescription: Diagnostics.module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node, }, { name: "baseUrl", @@ -860,7 +879,7 @@ const commandOptionsWithoutBuild = [ affectsModuleResolution: true, isFilePath: true, category: Diagnostics.Modules, - description: Diagnostics.Specify_the_base_directory_to_resolve_non_relative_module_names + description: Diagnostics.Specify_the_base_directory_to_resolve_non_relative_module_names, }, { // this option can only be specified in tsconfig.json @@ -871,7 +890,7 @@ const commandOptionsWithoutBuild = [ isTSConfigOnly: true, category: Diagnostics.Modules, description: Diagnostics.Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations, - transpileOptionValue: undefined + transpileOptionValue: undefined, }, { // this option can only be specified in tsconfig.json @@ -882,13 +901,13 @@ const commandOptionsWithoutBuild = [ element: { name: "rootDirs", type: "string", - isFilePath: true + isFilePath: true, }, affectsModuleResolution: true, category: Diagnostics.Modules, description: Diagnostics.Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules, transpileOptionValue: undefined, - defaultValueDescription: Diagnostics.Computed_from_the_list_of_input_files + defaultValueDescription: Diagnostics.Computed_from_the_list_of_input_files, }, { name: "typeRoots", @@ -896,24 +915,24 @@ const commandOptionsWithoutBuild = [ element: { name: "typeRoots", type: "string", - isFilePath: true + isFilePath: true, }, affectsModuleResolution: true, category: Diagnostics.Modules, - description: Diagnostics.Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types + description: Diagnostics.Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types, }, { name: "types", type: "list", element: { name: "types", - type: "string" + type: "string", }, affectsProgramStructure: true, showInSimplifiedHelpView: true, category: Diagnostics.Modules, description: Diagnostics.Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file, - transpileOptionValue: undefined + transpileOptionValue: undefined, }, { name: "allowSyntheticDefaultImports", @@ -922,7 +941,7 @@ const commandOptionsWithoutBuild = [ affectsBuildInfo: true, category: Diagnostics.Interop_Constraints, description: Diagnostics.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export, - defaultValueDescription: Diagnostics.module_system_or_esModuleInterop + defaultValueDescription: Diagnostics.module_system_or_esModuleInterop, }, { name: "esModuleInterop", @@ -1020,7 +1039,7 @@ const commandOptionsWithoutBuild = [ type: "string", category: Diagnostics.Language_and_Environment, description: Diagnostics.Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h, - defaultValueDescription: "`React.createElement`" + defaultValueDescription: "`React.createElement`", }, { name: "jsxFragmentFactory", @@ -1038,7 +1057,7 @@ const commandOptionsWithoutBuild = [ affectsModuleResolution: true, category: Diagnostics.Language_and_Environment, description: Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk, - defaultValueDescription: "react" + defaultValueDescription: "react", }, { name: "resolveJsonModule", @@ -1085,7 +1104,7 @@ const commandOptionsWithoutBuild = [ type: "string", category: Diagnostics.Backwards_Compatibility, description: Diagnostics.No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files, - defaultValueDescription: "utf8" + defaultValueDescription: "utf8", }, { name: "emitBOM", @@ -1100,14 +1119,14 @@ const commandOptionsWithoutBuild = [ name: "newLine", type: new Map(getEntries({ crlf: NewLineKind.CarriageReturnLineFeed, - lf: NewLineKind.LineFeed + lf: NewLineKind.LineFeed, })), affectsEmit: true, affectsBuildInfo: true, paramType: Diagnostics.NEWLINE, category: Diagnostics.Emit, description: Diagnostics.Set_the_newline_character_for_emitting_files, - defaultValueDescription: Diagnostics.Platform_specific + defaultValueDescription: Diagnostics.Platform_specific, }, { name: "noErrorTruncation", @@ -1310,7 +1329,7 @@ const commandOptionsWithoutBuild = [ affectsBuildInfo: true, category: Diagnostics.Language_and_Environment, description: Diagnostics.Emit_ECMAScript_standard_compliant_class_fields, - defaultValueDescription: Diagnostics.true_for_ES2022_and_above_including_ESNext + defaultValueDescription: Diagnostics.true_for_ES2022_and_above_including_ESNext, }, { name: "preserveValueImports", @@ -1336,11 +1355,10 @@ const commandOptionsWithoutBuild = [ isTSConfigOnly: true, element: { name: "plugin", - type: "object" + type: "object", }, description: Diagnostics.Specify_a_list_of_language_service_plugins_to_include, category: Diagnostics.Editor_Support, - }, { name: "moduleDetection", @@ -1353,7 +1371,7 @@ const commandOptionsWithoutBuild = [ description: Diagnostics.Control_what_method_is_used_to_detect_module_format_JS_files, category: Diagnostics.Language_and_Environment, defaultValueDescription: Diagnostics.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules, - } + }, ] as const; /** @internal */ @@ -1362,10 +1380,8 @@ export const optionDeclarations = [ ...commandOptionsWithoutBuild, ]; - export type CommandLineOption = CommandLineOptionOfCustomType | CommandLineOptionOfStringType | CommandLineOptionOfNumberType | CommandLineOptionOfBooleanType | TsConfigOnlyOption | CommandLineOptionOfListType; - /** @internal */ export interface CommandLineOptionOfStringType extends CommandLineOptionBase { type: "string"; @@ -1386,11 +1402,10 @@ export interface CommandLineOptionOfBooleanType extends CommandLineOptionBase { /** @internal */ export interface CommandLineOptionOfCustomType extends CommandLineOptionBase { - type: Map; // an object literal mapping named values to actual values + type: Map; // an object literal mapping named values to actual values defaultValueDescription: number | string | undefined | DiagnosticMessage; } - /** @internal */ export interface TsConfigOnlyOption extends CommandLineOptionBase { type: "object"; @@ -1404,34 +1419,31 @@ export interface CommandLineOptionOfListType extends CommandLineOptionBase { listPreserveFalsyValues?: boolean; } - /** @internal */ export interface CommandLineOptionBase { name: string; - type: "string" | "number" | "boolean" | "object" | "list" | Map; // a value of a primitive type, or an object literal mapping named values to actual values - isFilePath?: boolean; // True if option value is a path or fileName - shortName?: string; // A short mnemonic for convenience - for instance, 'h' can be used in place of 'help' - description?: DiagnosticMessage; // The message describing what the command line switch does. - defaultValueDescription?: string | number | boolean | DiagnosticMessage; // The message describing what the dafault value is. string type is prepared for fixed chosen like "false" which do not need I18n. - paramType?: DiagnosticMessage; // The name to be used for a non-boolean option's parameter - isTSConfigOnly?: boolean; // True if option can only be specified via tsconfig.json file + type: "string" | "number" | "boolean" | "object" | "list" | Map; // a value of a primitive type, or an object literal mapping named values to actual values + isFilePath?: boolean; // True if option value is a path or fileName + shortName?: string; // A short mnemonic for convenience - for instance, 'h' can be used in place of 'help' + description?: DiagnosticMessage; // The message describing what the command line switch does. + defaultValueDescription?: string | number | boolean | DiagnosticMessage; // The message describing what the dafault value is. string type is prepared for fixed chosen like "false" which do not need I18n. + paramType?: DiagnosticMessage; // The name to be used for a non-boolean option's parameter + isTSConfigOnly?: boolean; // True if option can only be specified via tsconfig.json file isCommandLineOnly?: boolean; showInSimplifiedHelpView?: boolean; category?: DiagnosticMessage; - strictFlag?: true; // true if the option is one of the flag under strict - affectsSourceFile?: true; // true if we should recreate SourceFiles after this option changes - affectsModuleResolution?: true; // currently same effect as `affectsSourceFile` - affectsBindDiagnostics?: true; // true if this affects binding (currently same effect as `affectsSourceFile`) - affectsSemanticDiagnostics?: true; // true if option affects semantic diagnostics - affectsEmit?: true; // true if the options affects emit - affectsProgramStructure?: true; // true if program should be reconstructed from root files if option changes and does not affect module resolution as affectsModuleResolution indirectly means program needs to reconstructed - affectsDeclarationPath?: true; // true if the options affects declaration file path computed - affectsBuildInfo?: true; // true if this options should be emitted in buildInfo - transpileOptionValue?: boolean | undefined; // If set this means that the option should be set to this value when transpiling + strictFlag?: true; // true if the option is one of the flag under strict + affectsSourceFile?: true; // true if we should recreate SourceFiles after this option changes + affectsModuleResolution?: true; // currently same effect as `affectsSourceFile` + affectsBindDiagnostics?: true; // true if this affects binding (currently same effect as `affectsSourceFile`) + affectsSemanticDiagnostics?: true; // true if option affects semantic diagnostics + affectsEmit?: true; // true if the options affects emit + affectsProgramStructure?: true; // true if program should be reconstructed from root files if option changes and does not affect module resolution as affectsModuleResolution indirectly means program needs to reconstructed + affectsDeclarationPath?: true; // true if the options affects declaration file path computed + affectsBuildInfo?: true; // true if this options should be emitted in buildInfo + transpileOptionValue?: boolean | undefined; // If set this means that the option should be set to this value when transpiling } - - function convertJsonOptionOfCustomType(opt: CommandLineOptionOfCustomType, value: string, errors: Diagnostic[]) { if (isNullOrUndefined(value)) return undefined; const key = value.toLowerCase(); @@ -1444,13 +1456,11 @@ function convertJsonOptionOfCustomType(opt: CommandLineOptionOfCustomType, value } } - function validateJsonOptionValue(opt: CommandLineOption, value: T, errors: Diagnostic[]): T | undefined { if (isNullOrUndefined(value)) return undefined; return value; } - /** @internal */ export function parseCustomTypeOption(opt: CommandLineOptionOfCustomType, value: string, errors: Diagnostic[]) { return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors); diff --git a/external-declarations/src/test-runner/tsc-infrastructure/test-document.ts b/external-declarations/src/test-runner/tsc-infrastructure/test-document.ts index f39a68544861c..b8eba7f719c64 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/test-document.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/test-document.ts @@ -1,9 +1,13 @@ -import { isLineBreak } from "typescript"; - -import { CharacterCodes } from "../../compiler/types"; -import { TestFile } from "./compiler-run"; - +import { + isLineBreak, +} from "typescript"; +import { + CharacterCodes, +} from "../../compiler/types"; +import { + TestFile, +} from "./compiler-run"; /** @internal */ export function computeLineStarts(text: string): number[] { @@ -58,7 +62,8 @@ export class TextDocument { file.unitName, file.content, file.fileOptions && Object.keys(file.fileOptions) - .reduce((meta, key) => meta.set(key, file.fileOptions[key]), new Map())); + .reduce((meta, key) => meta.set(key, file.fileOptions[key]), new Map()), + ); } public asTestFile() { @@ -66,7 +71,7 @@ export class TextDocument { unitName: this.file, content: this.text, fileOptions: Array.from(this.meta) - .reduce((obj, [key, value]) => (obj[key] = value, obj), {} as Record) + .reduce((obj, [key, value]) => (obj[key] = value, obj), {} as Record), }); } -} \ No newline at end of file +} diff --git a/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts b/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts index d5bdab0fe8d3f..e2c90f851b8ba 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts @@ -1,8 +1,19 @@ import * as ts from "typescript"; -import { Path } from "typescript"; - -import { find, forEach, orderedRemoveItemAt } from "../../compiler/lang-utils"; -import { getBaseFileName, getDirectoryPath, getNormalizedAbsolutePath, normalizePath } from "../../compiler/path-utils"; +import { + Path, +} from "typescript"; + +import { + find, + forEach, + orderedRemoveItemAt, +} from "../../compiler/lang-utils"; +import { + getBaseFileName, + getDirectoryPath, + getNormalizedAbsolutePath, + normalizePath, +} from "../../compiler/path-utils"; import * as vfs from "./vfs"; /** all the necessary information to set the right compiler settings */ @@ -65,13 +76,11 @@ export function splitContentByNewlines(content: string) { return lines; } - export function getConfigNameFromFileName(filename: string): "tsconfig.json" | "jsconfig.json" | undefined { const flc = getBaseFileName(filename).toLowerCase(); return find(["tsconfig.json" as const, "jsconfig.json" as const], x => x === flc); } - export function parseSymlinkFromTest(line: string, symlinks: vfs.FileSet | undefined) { const linkMetaData = linkRegex.exec(line); linkRegex.lastIndex = 0; @@ -82,7 +91,6 @@ export function parseSymlinkFromTest(line: string, symlinks: vfs.FileSet | undef return symlinks; } - export interface TestCaseContent { settings: CompilerSettings; testUnitData: TestUnitData[]; @@ -188,7 +196,7 @@ export function makeUnitsFromTest(code: string, fileName: string, rootDir?: stri useCaseSensitiveFileNames: false, readDirectory: () => [], fileExists: () => true, - readFile: (name) => forEach(testUnitData, data => data.name.toLowerCase() === name.toLowerCase() ? data.content : undefined) + readFile: name => forEach(testUnitData, data => data.name.toLowerCase() === name.toLowerCase() ? data.content : undefined), }; // check if project has tsconfig.json in the list of files diff --git a/external-declarations/src/test-runner/tsc-infrastructure/vary-by.ts b/external-declarations/src/test-runner/tsc-infrastructure/vary-by.ts index 5092a3072d552..36b24de5e79c9 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/vary-by.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/vary-by.ts @@ -1,6 +1,20 @@ -import { arrayFrom, equateStringsCaseInsensitive, findIndex, forEach, getEntries, hasProperty,map, orderedRemoveItemAt, startsWith } from "../../compiler/lang-utils"; -import { optionDeclarations } from "./options"; -import { CompilerSettings } from "./test-file-parser"; +import { + arrayFrom, + equateStringsCaseInsensitive, + findIndex, + forEach, + getEntries, + hasProperty, + map, + orderedRemoveItemAt, + startsWith, +} from "../../compiler/lang-utils"; +import { + optionDeclarations, +} from "./options"; +import { + CompilerSettings, +} from "./test-file-parser"; interface FileBasedTestConfiguration { [key: string]: string; @@ -104,7 +118,7 @@ function splitVaryBySettingValue(text: string, varyBy: string): string[] | undef return undefined; } - const variations: { key: string, value?: string | number }[] = []; + const variations: { key: string; value?: string | number; }[] = []; const values = getVaryByStarSettingValues(varyBy); // add (and deduplicate) all included entries @@ -151,7 +165,7 @@ function getVaryByStarSettingValues(varyBy: string): ReadonlyMap | undefined; - constructor(files: FileSet, { meta }: { meta?: Record } = {}) { + constructor(files: FileSet, { meta }: { meta?: Record; } = {}) { this.files = files; this.meta = meta; } @@ -1404,7 +1423,7 @@ export class File { public readonly data: Buffer | string; public readonly encoding: string | undefined; public readonly meta: Record | undefined; - constructor(data: Buffer | string, { meta, encoding }: { encoding?: string, meta?: Record } = {}) { + constructor(data: Buffer | string, { meta, encoding }: { encoding?: string; meta?: Record; } = {}) { this.data = data; this.encoding = encoding; this.meta = meta; @@ -1412,13 +1431,13 @@ export class File { } export class SameFileContentFile extends File { - constructor(data: Buffer | string, metaAndEncoding?: { encoding?: string, meta?: Record }) { + constructor(data: Buffer | string, metaAndEncoding?: { encoding?: string; meta?: Record; }) { super(data, metaAndEncoding); } } export class SameFileWithModifiedTime extends File { - constructor(data: Buffer | string, metaAndEncoding?: { encoding?: string, meta?: Record }) { + constructor(data: Buffer | string, metaAndEncoding?: { encoding?: string; meta?: Record; }) { super(data, metaAndEncoding); } } @@ -1445,7 +1464,7 @@ export class Unlink { export class Symlink { public readonly symlink: string; public readonly meta: Record | undefined; - constructor(symlink: string, { meta }: { meta?: Record } = {}) { + constructor(symlink: string, { meta }: { meta?: Record; } = {}) { this.symlink = symlink; this.meta = meta; } @@ -1456,7 +1475,7 @@ export class Mount { public readonly source: string; public readonly resolver: FileSystemResolver; public readonly meta: Record | undefined; - constructor(source: string, resolver: FileSystemResolver, { meta }: { meta?: Record } = {}) { + constructor(source: string, resolver: FileSystemResolver, { meta }: { meta?: Record; } = {}) { this.source = source; this.resolver = resolver; this.meta = meta; @@ -1558,10 +1577,10 @@ function getBuiltLocal(host: FileSystemResolverHost, ignoreCase: boolean): FileS [builtFolder]: new Mount(vpath.resolve(host.getWorkspaceRoot(), "built/local"), resolver), [testLibFolder]: new Mount(vpath.resolve(host.getWorkspaceRoot(), "tests/lib"), resolver), [projectsFolder]: new Mount(vpath.resolve(host.getWorkspaceRoot(), "tests/projects"), resolver), - [srcFolder]: {} + [srcFolder]: {}, }, cwd: srcFolder, - meta: { defaultLibLocation: builtFolder } + meta: { defaultLibLocation: builtFolder }, }); builtLocalCI.makeReadonly(); } @@ -1575,7 +1594,8 @@ function getBuiltLocal(host: FileSystemResolverHost, ignoreCase: boolean): FileS /* eslint-disable no-null/no-null */ function normalizeFileSetEntry(value: FileSet[string]) { - if (value === undefined || + if ( + value === undefined || value === null || value instanceof Directory || value instanceof File || @@ -1583,7 +1603,8 @@ function normalizeFileSetEntry(value: FileSet[string]) { value instanceof Symlink || value instanceof Mount || value instanceof Rmdir || - value instanceof Unlink) { + value instanceof Unlink + ) { return value; } return typeof value === "string" || Buffer.isBuffer(value) ? new File(value) : new Directory(value); diff --git a/external-declarations/src/test-runner/tsc-infrastructure/vpath.ts b/external-declarations/src/test-runner/tsc-infrastructure/vpath.ts index 3fe922615d1a4..f15cf2186c0ca 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/vpath.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/vpath.ts @@ -1,8 +1,31 @@ -import { Path } from "typescript"; - -import { changeAnyExtension, comparePaths, comparePathsCaseInsensitive, comparePathsCaseSensitive, getAnyExtensionFromPath, getBaseFileName, getDirectoryPath, getPathComponents, getPathFromPathComponents, getRelativePathFromDirectory, isDiskPathRoot, isRootedDiskPath, reducePathComponents, resolvePath } from "../../compiler/path-utils"; -import { CharacterCodes } from "../../compiler/types"; -import { hasJSFileExtension, hasTSFileExtension, isDeclarationFileName } from "../../compiler/utils"; +import { + Path, +} from "typescript"; + +import { + changeAnyExtension, + comparePaths, + comparePathsCaseInsensitive, + comparePathsCaseSensitive, + getAnyExtensionFromPath, + getBaseFileName, + getDirectoryPath, + getPathComponents, + getPathFromPathComponents, + getRelativePathFromDirectory, + isDiskPathRoot, + isRootedDiskPath, + reducePathComponents, + resolvePath, +} from "../../compiler/path-utils"; +import { + CharacterCodes, +} from "../../compiler/types"; +import { + hasJSFileExtension, + hasTSFileExtension, + isDeclarationFileName, +} from "../../compiler/utils"; import * as vfs from "./vfs"; /** @@ -19,8 +42,6 @@ const urlSchemeSeparator = "://"; const backslashRegExp = /\\/g; export const sep = directorySeparator; - - /** * Combines paths. If a path is absolute, it replaces any previous path. Relative paths are not simplified. * @@ -67,7 +88,6 @@ export function normalizeSlashes(path: string): string { : path; } - /** * Adds a trailing directory separator to a path, if it does not already have one. * @@ -107,7 +127,6 @@ export function isAnyDirectorySeparator(charCode: number): boolean { return charCode === CharacterCodes.slash || charCode === CharacterCodes.backslash; } - /** * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). * @@ -176,8 +195,10 @@ function getEncodedRootLength(path: string): number { // special case interpreted as "the machine from which the URL is being interpreted". const scheme = path.slice(0, schemeEnd); const authority = path.slice(authorityStart, authorityEnd); - if (scheme === "file" && (authority === "" || authority === "localhost") && - isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) { + if ( + scheme === "file" && (authority === "" || authority === "localhost") && + isVolumeCharacter(path.charCodeAt(authorityEnd + 1)) + ) { const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); if (volumeSeparatorEnd !== -1) { if (path.charCodeAt(volumeSeparatorEnd) === CharacterCodes.slash) { @@ -287,7 +308,6 @@ export function validate(path: string, flags: ValidationFlags = ValidationFlags. return components.length > 1 && trailing ? format(reduce(components)) + sep : format(reduce(components)); } - const invalidRootComponentRegExp = /^(?!(\/|\/\/\w+\/|[a-zA-Z]:\/?|)$)/; const invalidNavigableComponentRegExp = /[:*?"<>|]/; const invalidNavigableComponentWithWildcardsRegExp = /[:"<>|]/; diff --git a/external-declarations/src/tsconfig.json b/external-declarations/src/tsconfig.json index b7c2046ebd846..aaf9a80a1d38f 100644 --- a/external-declarations/src/tsconfig.json +++ b/external-declarations/src/tsconfig.json @@ -1,6 +1,5 @@ { "compilerOptions": { - "pretty": true, "lib": ["ES2021"], "target": "ES2021", @@ -25,4 +24,4 @@ "outDir": "../build", "noUnusedLocals": true } -} \ No newline at end of file +} diff --git a/external-declarations/src/utils/cli-parser.ts b/external-declarations/src/utils/cli-parser.ts index 5ba27b877a8a9..3279d43889d3e 100644 --- a/external-declarations/src/utils/cli-parser.ts +++ b/external-declarations/src/utils/cli-parser.ts @@ -1,5 +1,6 @@ -import { hasProperty } from "../compiler/lang-utils"; - +import { + hasProperty, +} from "../compiler/lang-utils"; type ArgTypeParser = (name: string, value: string | undefined, existingValue: T | undefined) => T; function mustNotExist(fn: ArgTypeParser): ArgTypeParser { @@ -11,36 +12,40 @@ function mustNotExist(fn: ArgTypeParser): ArgTypeParser { }; } export const ArgType = { - String: () => mustNotExist((name, value) => { - if (value) { - return value; - } - throw new Error(`String value was not specified for ${name}`); - }), - Boolean: () => mustNotExist((name, value) => { - if (value === undefined) { - return true; - } - if (value.toLowerCase() === "false") { - return false; - } - if (value.toLowerCase() === "true") { - return true; - } - throw new Error(`Invalid Boolean Value ${value} for ${name}`); - }), - Enum: (...values: T[]) => mustNotExist((name, value,) => { - if (values.includes(value as T)) { - return value as T; - } - throw new Error(`Invalid Enum value, Expected one of ${values.join(",")}`); - }), - Number: () => mustNotExist((name, value) => { - if (value && !Number.isNaN(+value)) { - return +value; - } - throw new Error(`Invalid Number value, found ${value}`); - }), + String: () => + mustNotExist((name, value) => { + if (value) { + return value; + } + throw new Error(`String value was not specified for ${name}`); + }), + Boolean: () => + mustNotExist((name, value) => { + if (value === undefined) { + return true; + } + if (value.toLowerCase() === "false") { + return false; + } + if (value.toLowerCase() === "true") { + return true; + } + throw new Error(`Invalid Boolean Value ${value} for ${name}`); + }), + Enum: (...values: T[]) => + mustNotExist((name, value) => { + if (values.includes(value as T)) { + return value as T; + } + throw new Error(`Invalid Enum value, Expected one of ${values.join(",")}`); + }), + Number: () => + mustNotExist((name, value) => { + if (value && !Number.isNaN(+value)) { + return +value; + } + throw new Error(`Invalid Number value, found ${value}`); + }), StringArray: () => (name, value, existingValue: string[] | undefined) => { existingValue ??= []; if (value) { @@ -51,28 +56,30 @@ export const ArgType = { }, } satisfies Record ArgTypeParser>; - -type ParserConfiguration = Record | { - type: ArgTypeParser, - required?: V, - description: string, -}>; +type ParserConfiguration = Record< + string, + ArgTypeParser | { + type: ArgTypeParser; + required?: V; + description: string; + } +>; type ParsedValue> = { - [P in keyof T]: - T[P] extends ArgTypeParser ? A | undefined : + [P in keyof T]: T[P] extends ArgTypeParser ? A | undefined : T[P] extends { - type: ArgTypeParser, - required?: infer R - } ? R extends true ? A : A | undefined : never + type: ArgTypeParser; + required?: infer R; + } ? R extends true ? A : A | undefined : + never; }; export function parserConfiguration>(config: T) { return config; } export function parseArgs>(args: string[], types: T): { - value: ParsedValue, - diagnostics: string[], - usage: () => string + value: ParsedValue; + diagnostics: string[]; + usage: () => string; printUsageOnErrors: () => void; } { const config: Record = {}; @@ -80,17 +87,17 @@ export function parseArgs>(a function parseArgument(name: string, value: string | undefined) { const existingValue = config[name]; const parser = types[name]; - if(!parser) { + if (!parser) { diagnostics.push(`Parameter ${name} was unexpected`); return; } - const parserFn = typeof parser === "function" ? parser: parser.type; + const parserFn = typeof parser === "function" ? parser : parser.type; try { const newValue = parserFn(name, value, existingValue); config[name] = newValue; } - catch(e) { - if(e instanceof Error) { + catch (e) { + if (e instanceof Error) { diagnostics.push(e.message); } throw e; @@ -102,7 +109,7 @@ export function parseArgs>(a parseArgument(named.groups?.name!, named.groups?.value); } else { - const flagParam =/--(?.*)/.exec(arg); + const flagParam = /--(?.*)/.exec(arg); if (flagParam) { parseArgument(flagParam.groups?.name!, /*value*/ undefined); } @@ -112,9 +119,9 @@ export function parseArgs>(a } } - for(const key of Object.keys(types)) { + for (const key of Object.keys(types)) { const cfg = types[key]; - if(!(hasProperty(config, key)) && typeof cfg !== "function" && cfg.required) { + if (!(hasProperty(config, key)) && typeof cfg !== "function" && cfg.required) { diagnostics.push(`Parameters ${key} is required`); } } @@ -122,10 +129,10 @@ export function parseArgs>(a return Object.entries(types) .map(([name, v]) => ({ name, - ...(typeof v === "object" ? v: { }) + ...(typeof v === "object" ? v : {}), })) .filter(o => !!o.description) - .map(({ name, description, required }) => `--${name} \t ${description} \t ${required? "required": ""}`) + .map(({ name, description, required }) => `--${name} \t ${description} \t ${required ? "required" : ""}`) .join("\n"); } return { @@ -133,7 +140,7 @@ export function parseArgs>(a diagnostics, usage, printUsageOnErrors() { - if(diagnostics.length) { + if (diagnostics.length) { diagnostics.forEach(s => console.log(s)); console.log(usage()); process.exit(); diff --git a/external-declarations/src/utils/fs-utils.ts b/external-declarations/src/utils/fs-utils.ts index 6c324b3c724ab..4dc7d1b05a6bb 100644 --- a/external-declarations/src/utils/fs-utils.ts +++ b/external-declarations/src/utils/fs-utils.ts @@ -1,13 +1,22 @@ import * as fs from "fs"; import * as fsp from "fs/promises"; -import { compareStringsCaseSensitive,flatten, stableSort } from "../compiler/lang-utils"; -import { combinePaths,createGetCanonicalFileName, normalizePath } from "../compiler/path-utils"; -import { FileSystemEntries } from "../test-runner/tsc-infrastructure/vfs"; +import { + compareStringsCaseSensitive, + flatten, + stableSort, +} from "../compiler/lang-utils"; +import { + combinePaths, + createGetCanonicalFileName, + normalizePath, +} from "../compiler/path-utils"; +import { + FileSystemEntries, +} from "../test-runner/tsc-infrastructure/vfs"; const cache: Record = {}; export async function ensureDir(dirName: string) { - const exists = cache[dirName] ?? (await fsp.access(dirName).then(() => true, () => false)); @@ -30,7 +39,6 @@ export function flushQueue() { return Promise.all(writeQueue); } - /** * @param path directory of the tsconfig.json * @@ -117,4 +125,3 @@ function getAccessibleFileSystemEntries(path: string): FileSystemEntries { return { files: [], directories: [] }; } } - diff --git a/parallel-build/package.json b/parallel-build/package.json index f37ac6a9bd7ee..029e18a56a527 100644 --- a/parallel-build/package.json +++ b/parallel-build/package.json @@ -1,20 +1,20 @@ { - "name": "parallel-build", - "version": "1.0.0", - "description": "", - "main": "index.js", - "type": "module", - "scripts": { - "build": "tsc -p ./", - "watch": "tsc -w -p ./" - }, - "author": "", - "license": "ISC", - "dependencies": { - "@types/node": "^20.1.3", - "external-declarations": "file:../external-declarations", - "json5": "^2.2.3", - "systeminformation": "^5.21.8", - "typescript": "file:.." - } + "name": "parallel-build", + "version": "1.0.0", + "description": "", + "main": "index.js", + "type": "module", + "scripts": { + "build": "tsc -p ./", + "watch": "tsc -w -p ./" + }, + "author": "", + "license": "ISC", + "dependencies": { + "@types/node": "^20.1.3", + "external-declarations": "file:../external-declarations", + "json5": "^2.2.3", + "systeminformation": "^5.21.8", + "typescript": "file:.." + } } diff --git a/parallel-build/src/dep-builder/dep-builder-tsconfig.json.ts b/parallel-build/src/dep-builder/dep-builder-tsconfig.json.ts index feeef0f01996c..fc5234437b6ac 100644 --- a/parallel-build/src/dep-builder/dep-builder-tsconfig.json.ts +++ b/parallel-build/src/dep-builder/dep-builder-tsconfig.json.ts @@ -73,8 +73,7 @@ async function loadBundlesDependencies(tsConfigs: string[]) { if (entry === undefined) return 0; if (entry.depth) return entry.depth; - - entry.depth = 1 + (entry.dependencies.length === 0? 0: Math.max(...entry.dependencies.map(depth))); + entry.depth = 1 + (entry.dependencies.length === 0 ? 0 : Math.max(...entry.dependencies.map(depth))); return entry.depth; } diff --git a/parallel-build/src/main.ts b/parallel-build/src/main.ts index 3219a3b8de455..bedbb3cb81930 100644 --- a/parallel-build/src/main.ts +++ b/parallel-build/src/main.ts @@ -112,8 +112,8 @@ async function main() { const nextTasks = tasks.filter(t => t.dependencies.every(d => completedTasks.has(d))); if (nextTasks.length === 0) { console.log(`${taskNameLog("NONE")}: Waiting for deps to finish. Unscheduled Tasks: ${tasks.length}`); - if(activeTasks.length === 0) { - throw new Error(`No tasks are running but tasks still have required dependencies. Check your task file. Sample uncompleted task: ${tasks[0].dependencies.find(o => !completedTasks.has(o))}`) + if (activeTasks.length === 0) { + throw new Error(`No tasks are running but tasks still have required dependencies. Check your task file. Sample uncompleted task: ${tasks[0].dependencies.find(o => !completedTasks.has(o))}`); } await waitForTaskCompletion(); continue; diff --git a/parallel-build/src/run-all-tasks.ts b/parallel-build/src/run-all-tasks.ts index 067fcc2f9a241..474dc8d9982f9 100644 --- a/parallel-build/src/run-all-tasks.ts +++ b/parallel-build/src/run-all-tasks.ts @@ -2,7 +2,7 @@ import * as child from "node:child_process"; import path from "node:path"; import * as fs from "fs/promises"; -import * as sys from "systeminformation" +import * as sys from "systeminformation"; const taskDir = "./tasks"; const statsDir = taskDir + "-stats"; diff --git a/parallel-build/tsconfig.json b/parallel-build/tsconfig.json index b3dca25527a24..66764f422db67 100644 --- a/parallel-build/tsconfig.json +++ b/parallel-build/tsconfig.json @@ -5,8 +5,8 @@ "target": "ESNext", "rootDir": "./src", "outDir": "./build", - "moduleResolution":"nodenext", + "moduleResolution": "nodenext", "sourceMap": true, - "allowSyntheticDefaultImports": true, + "allowSyntheticDefaultImports": true } -} \ No newline at end of file +} diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index ddb4eed08549a..f18c75e012f89 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -331,7 +331,7 @@ export function transformDeclarations(context: TransformationContext) { 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 {resolver: localInferenceResolver, isolatedDeclarations} = createLocalInferenceResolver({ + const { resolver: localInferenceResolver, isolatedDeclarations } = createLocalInferenceResolver({ ensureParameter, context, visitDeclarationSubtree, diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 5756c9678e78c..03d896b3a8bca 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -133,7 +133,7 @@ export function createLocalInferenceResolver({ checkEntityNameVisibility(name: EntityNameOrEntityNameExpression, container?: Node): void; ensureParameter(p: ParameterDeclaration): ParameterDeclaration; context: TransformationContext; -}): { resolver: LocalInferenceResolver, isolatedDeclarations: true } | { resolver: undefined, isolatedDeclarations: false } { +}): { resolver: LocalInferenceResolver; isolatedDeclarations: true; } | { resolver: undefined; isolatedDeclarations: false; } { let currentSourceFile: SourceFile; const options = context.getCompilerOptions(); const resolver = context.getEmitResolver(); @@ -164,7 +164,7 @@ export function createLocalInferenceResolver({ }, makeInvalidType, }, - isolatedDeclarations: options.isolatedDeclarations + isolatedDeclarations: options.isolatedDeclarations, }; function reportIsolatedDeclarationError(node: Node) { const message = createDiagnosticForNode( @@ -193,10 +193,10 @@ export function createLocalInferenceResolver({ const getAccessor = knownIsGetAccessor ? knownAccessor : otherAccessor && isGetAccessorDeclaration(otherAccessor) ? otherAccessor : - undefined; + undefined; const setAccessor = !knownIsGetAccessor ? knownAccessor : otherAccessor && isSetAccessorDeclaration(otherAccessor) ? otherAccessor : - undefined; + undefined; return { otherAccessorIndex, @@ -520,9 +520,10 @@ export function createLocalInferenceResolver({ currentSourceFile, { pos: node.heritageClauses[0].pos, - end: node.heritageClauses[node.heritageClauses.length - 1].end + end: node.heritageClauses[node.heritageClauses.length - 1].end, }, - Diagnostics.Heritage_clauses_in_class_expressions_are_not_allowed_with_isolatedDeclarations) + Diagnostics.Heritage_clauses_in_class_expressions_are_not_allowed_with_isolatedDeclarations, + ), ], }); invalid = true; @@ -536,7 +537,7 @@ export function createLocalInferenceResolver({ invalid = true; } // TODO: See what happens on private modifiers. - if (parameter.modifiers?.some((modifier) => propertyLikeModifiers.has(modifier.kind))) { + if (parameter.modifiers?.some(modifier => propertyLikeModifiers.has(modifier.kind))) { nonStaticMembers.push(factory.createPropertySignature( keepReadonlyKeyword(parameter.modifiers), parameter.name as Identifier, @@ -553,7 +554,8 @@ export function createLocalInferenceResolver({ parameter.initializer, )); } - } else if (isMethodDeclaration(member)) { + } + else if (isMethodDeclaration(member)) { const type = localInferenceFromInitializer(member, member.type); if (!type) { invalid = true; @@ -566,19 +568,22 @@ export function createLocalInferenceResolver({ member.parameters, type, ); - if (member.modifiers?.some((modifier) => modifier.kind === SyntaxKind.StaticKeyword)) { + if (member.modifiers?.some(modifier => modifier.kind === SyntaxKind.StaticKeyword)) { staticMembers.push(methodSignature); - } else { + } + else { nonStaticMembers.push(methodSignature); } - } else if (isGetAccessorDeclaration(member) || isSetAccessorDeclaration(member)) { + } + else if (isGetAccessorDeclaration(member) || isSetAccessorDeclaration(member)) { if (!hasGetSetAccessor) { hasGetSetAccessor = true; let type; if (isGetAccessorDeclaration(member)) { type = localInferenceFromInitializer(member, member.type); - } else { - type = localInferenceFromInitializer(member.parameters[0], member.parameters[0].type) + } + else { + type = localInferenceFromInitializer(member.parameters[0], member.parameters[0].type); } if (!type) { invalid = true; @@ -589,12 +594,14 @@ export function createLocalInferenceResolver({ member.name, /*questionToken*/ undefined, type, - ) + ), ); } - } else if (isIndexSignatureDeclaration(member)) { + } + else if (isIndexSignatureDeclaration(member)) { nonStaticMembers.push(member); - } else if (isPropertyDeclaration(member)) { + } + else if (isPropertyDeclaration(member)) { const name = isPrivateIdentifier(member.name) ? // imitating the behavior from utilities.ts : getSymbolNameForPrivateIdentifier, but as we don't have // a Symbol & SymbolId in hand, we use NodeId of the declaration instead as an approximiation and to provide uniqueness. @@ -611,10 +618,11 @@ export function createLocalInferenceResolver({ name, member.questionToken, type, - ) - if (member.modifiers?.some((modifier) => modifier.kind === SyntaxKind.StaticKeyword)) { + ); + if (member.modifiers?.some(modifier => modifier.kind === SyntaxKind.StaticKeyword)) { staticMembers.push(propertySignature); - } else { + } + else { nonStaticMembers.push(propertySignature); } } @@ -627,7 +635,7 @@ export function createLocalInferenceResolver({ const constructorSignature = factory.createConstructSignature( node.typeParameters, constructorParameters, - factory.createTypeLiteralNode(nonStaticMembers) + factory.createTypeLiteralNode(nonStaticMembers), ); const typeNode = factory.createTypeLiteralNode([constructorSignature, ...staticMembers]); return { typeNode, flags: LocalTypeInfoFlags.None, sourceNode: node }; @@ -635,9 +643,10 @@ export function createLocalInferenceResolver({ } function keepReadonlyKeyword(modifiers?: NodeArray): Modifier[] { - if (modifiers?.some((modifier) => modifier.kind === SyntaxKind.ReadonlyKeyword)) { + if (modifiers?.some(modifier => modifier.kind === SyntaxKind.ReadonlyKeyword)) { return [factory.createModifier(SyntaxKind.ReadonlyKeyword)]; - } else { + } + else { return []; } } diff --git a/src/compiler/transformers/declarations/transform-project.ts b/src/compiler/transformers/declarations/transform-project.ts index 9120a083b4b2f..55f188a53cfd5 100644 --- a/src/compiler/transformers/declarations/transform-project.ts +++ b/src/compiler/transformers/declarations/transform-project.ts @@ -56,7 +56,7 @@ function createIsolatedDeclarationsEmitter(rootDir: string, options: CompilerOpt if (!source) return; - const {code, diagnostics} = emitDeclarationsForFile(source, [], [], options); + const { code, diagnostics } = emitDeclarationsForFile(source, [], [], options); if (diagnostics.length > 0) { throw new Error(`Cannot transform file '${source.fileName}' due to ${diagnostics.length} diagnostics`); } diff --git a/src/compiler/transformers/declarations/utils.ts b/src/compiler/transformers/declarations/utils.ts index 34d6eb6fc4a90..9ae47e0368be1 100644 --- a/src/compiler/transformers/declarations/utils.ts +++ b/src/compiler/transformers/declarations/utils.ts @@ -15,7 +15,7 @@ import { SyntaxKind, } from "../../types"; import { - MemberKey + MemberKey, } from "./types"; export function getMemberKey(name: string | Exclude | NoSubstitutionTemplateLiteral): MemberKey; From a7c15af4d45370fa8694e26550cffea7922eb0d5 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Wed, 18 Oct 2023 16:25:03 +0000 Subject: [PATCH 108/224] Fix PR Comments 1. Reuse reusable chunk of code. 2. Proper handling of accessors, before it treated as if there were only a single accessor in the class. 3. Improve wording in the error message for heritage clauses Signed-off-by: Hana Joo --- src/compiler/diagnosticMessages.json | 2 +- .../declarations/localInferenceResolver.ts | 230 +++++++++--------- 2 files changed, 122 insertions(+), 110 deletions(-) diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index ace4101d34ce4..a683cdb4806be 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -6710,7 +6710,7 @@ "category": "Error", "code": 9010 }, - "Heritage clauses in class expressions are not allowed with --isolatedDeclarations": { + "To use heritage clauses in class expressions with --isolatedDeclarations, you need explicit type annotation on the variable.": { "category": "Error", "code": 9011 }, diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 03d896b3a8bca..2fd4c4ea0cd81 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -2,13 +2,11 @@ import { getCommentRange, setCommentRange, } from "../../_namespaces/ts"; -import { - Debug, -} from "../../debug"; import { Diagnostics, } from "../../diagnosticInformationMap.generated"; import { + isClassExpression, isComputedPropertyName, isConstructorDeclaration, isExportAssignment, @@ -58,6 +56,7 @@ import { FunctionExpression, GetAccessorDeclaration, HasInferredType, + HasModifiers, Identifier, KeywordTypeSyntaxKind, LanguageVariant, @@ -69,7 +68,6 @@ import { Node, NodeArray, NodeFlags, - ObjectLiteralElementLike, ObjectLiteralExpression, ParameterDeclaration, ParenthesizedExpression, @@ -184,25 +182,38 @@ export function createLocalInferenceResolver({ flags: LocalTypeInfoFlags; } - function getAccessorInfo(properties: NodeArray, knownAccessor: SetAccessorDeclaration | GetAccessorDeclaration) { + function getAccessorInfo(parent: ClassExpression | ObjectLiteralExpression, knownAccessor: SetAccessorDeclaration | GetAccessorDeclaration) { const nameKey = getMemberKey(knownAccessor); - const knownIsGetAccessor = isGetAccessorDeclaration(knownAccessor); - const otherAccessorTest = knownIsGetAccessor ? isSetAccessorDeclaration : isGetAccessorDeclaration; - const otherAccessorIndex = properties.findIndex(n => otherAccessorTest(n) && getMemberKey(n) === nameKey); - const otherAccessor = properties[otherAccessorIndex] as SetAccessorDeclaration | GetAccessorDeclaration | undefined; - - const getAccessor = knownIsGetAccessor ? knownAccessor : - otherAccessor && isGetAccessorDeclaration(otherAccessor) ? otherAccessor : - undefined; - const setAccessor = !knownIsGetAccessor ? knownAccessor : - otherAccessor && isSetAccessorDeclaration(otherAccessor) ? otherAccessor : - undefined; + const members = isClassExpression(parent) ? parent.members : parent.properties; + let getAccessor, setAccessor; + let otherAccessorIdx = -1, knownAccessorIdx = -1; + for (let i = 0; i < members.length; ++i) { + const member = members[i]; + if (isGetAccessorDeclaration(member) && getMemberKey(member) === nameKey) { + getAccessor = member; + if (knownAccessor !== member) { + otherAccessorIdx = i; + } + else { + knownAccessorIdx = i; + } + } + else if (isSetAccessorDeclaration(member) && getMemberKey(member) === nameKey) { + setAccessor = member; + if (knownAccessor !== member) { + otherAccessorIdx = i; + } + else { + knownAccessorIdx = i; + } + } + } return { - otherAccessorIndex, - otherAccessor, getAccessor, setAccessor, + otherAccessorIdx, + knownAccessorIdx, }; } function inferAccessorType(getAccessor?: GetAccessorDeclaration, setAccessor?: SetAccessorDeclaration): LocalTypeInfo { @@ -359,8 +370,7 @@ export function createLocalInferenceResolver({ function regular(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { return { typeNode, flags, sourceNode }; } - function getTypeForObjectLiteralExpression(node: ObjectLiteralExpression, inferenceFlags: NarrowBehavior) { - const objectLiteral = node; + function getTypeForObjectLiteralExpression(objectLiteral: ObjectLiteralExpression, inferenceFlags: NarrowBehavior) { const properties: TypeElement[] = []; let inheritedObjectTypeFlags = LocalTypeInfoFlags.None; const members = new Map deepClone(ensureParameter(p))); - inheritedObjectTypeFlags |= returnType.flags; - if (inferenceFlags & NarrowBehavior.AsConst) { - newProp = factory.createPropertySignature( - [factory.createModifier(SyntaxKind.ReadonlyKeyword)], - name, - /*questionToken*/ undefined, - factory.createFunctionTypeNode( - typeParameters, - parameters, - returnType.typeNode, - ), - ); - } - else { - newProp = factory.createMethodSignature( - [], - name, - /*questionToken*/ undefined, - typeParameters, - parameters, - returnType.typeNode, - ); - } - } - finally { - setEnclosingDeclarations(oldEnclosingDeclaration); - } + const { method, flags } = handleMethodDeclaration(prop, name, inferenceFlags); + newProp = method; + inheritedObjectTypeFlags |= flags; } else if (isPropertyAssignment(prop)) { const modifiers = inferenceFlags & NarrowBehavior.AsConst ? @@ -453,27 +432,14 @@ export function createLocalInferenceResolver({ ); } else { - if (!isGetAccessorDeclaration(prop) && !isSetAccessorDeclaration(prop)) { - Debug.assertNever(prop); + const accessorType = handleAccessors(prop, objectLiteral, name, nameKey); + if (accessorType) { + inheritedObjectTypeFlags |= accessorType.flags; + newProp = accessorType.type; } - if (!nameKey) { + else { return invalid(prop); } - const { getAccessor, setAccessor, otherAccessorIndex } = getAccessorInfo(objectLiteral.properties, prop); - if (otherAccessorIndex === -1 || otherAccessorIndex > propIndex) { - const accessorType = inferAccessorType(getAccessor, setAccessor); - const modifiers: Modifier[] = []; - if (!setAccessor) { - modifiers.push(factory.createModifier(SyntaxKind.ReadonlyKeyword)); - } - inheritedObjectTypeFlags |= accessorType.flags; - newProp = factory.createPropertySignature( - modifiers, - name, - /*questionToken*/ undefined, - accessorType.typeNode, - ); - } } if (newProp) { @@ -505,9 +471,69 @@ export function createLocalInferenceResolver({ return regular(typeNode, objectLiteral, inheritedObjectTypeFlags); } + function handleMethodDeclaration(method: MethodDeclaration, name: PropertyName, inferenceFlags: NarrowBehavior) { + const oldEnclosingDeclaration = setEnclosingDeclarations(method); + try { + const returnType = visitTypeAndClone(method.type, method); + const typeParameters = visitNodes(method.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone); + // TODO: We need to see about inheriting flags from parameters + const parameters = method.parameters.map(p => deepClone(ensureParameter(p))); + if (inferenceFlags & NarrowBehavior.AsConst) { + return { + flags: returnType.flags, + method: factory.createPropertySignature( + [factory.createModifier(SyntaxKind.ReadonlyKeyword)], + name, + /*questionToken*/ undefined, + factory.createFunctionTypeNode( + typeParameters, + parameters, + returnType.typeNode, + ), + ), + }; + } + else { + return { + flags: returnType.flags, + method: factory.createMethodSignature( + [], + name, + /*questionToken*/ undefined, + typeParameters, + parameters, + returnType.typeNode, + ), + }; + } + } + finally { + setEnclosingDeclarations(oldEnclosingDeclaration); + } + } + + function handleAccessors(accessor: GetAccessorDeclaration | SetAccessorDeclaration, parent: ObjectLiteralExpression | ClassExpression, name: PropertyName, nameKey: string | undefined) { + if (!nameKey) { + return; + } + + const { getAccessor, setAccessor, knownAccessorIdx, otherAccessorIdx } = getAccessorInfo(parent, accessor); + if (otherAccessorIdx === -1 || otherAccessorIdx > knownAccessorIdx) { + const accessorType = inferAccessorType(getAccessor, setAccessor); + return { + flags: accessorType.flags, + type: factory.createPropertySignature( + setAccessor ? [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : [], + name, + /*questionToken*/ undefined, + accessorType.typeNode, + ), + }; + } + } + function getClassExpressionTypeNode(node: ClassExpression): LocalTypeInfo { let invalid = false; - let hasGetSetAccessor = false; const staticMembers: TypeElement[] = []; const nonStaticMembers: TypeElement[] = []; const constructorParameters: ParameterDeclaration[] = []; @@ -522,7 +548,7 @@ export function createLocalInferenceResolver({ pos: node.heritageClauses[0].pos, end: node.heritageClauses[node.heritageClauses.length - 1].end, }, - Diagnostics.Heritage_clauses_in_class_expressions_are_not_allowed_with_isolatedDeclarations, + Diagnostics.To_use_heritage_clauses_in_class_expressions_with_isolatedDeclarations_you_need_explicit_type_annotation_on_the_variable, ), ], }); @@ -535,6 +561,7 @@ export function createLocalInferenceResolver({ const type = localInferenceFromInitializer(parameter, parameter.type); if (!type) { invalid = true; + continue; } // TODO: See what happens on private modifiers. if (parameter.modifiers?.some(modifier => propertyLikeModifiers.has(modifier.kind))) { @@ -556,46 +583,26 @@ export function createLocalInferenceResolver({ } } else if (isMethodDeclaration(member)) { - const type = localInferenceFromInitializer(member, member.type); - if (!type) { + const { method, flags } = handleMethodDeclaration(member, member.name, NarrowBehavior.None); + if (flags === LocalTypeInfoFlags.Invalid) { invalid = true; + continue; } - const methodSignature = factory.createMethodSignature( - /*modifiers*/ undefined, - member.name, - member.questionToken, - member.typeParameters, - member.parameters, - type, - ); - if (member.modifiers?.some(modifier => modifier.kind === SyntaxKind.StaticKeyword)) { - staticMembers.push(methodSignature); + if (hasStaticModifier(member)) { + staticMembers.push(method); } else { - nonStaticMembers.push(methodSignature); + nonStaticMembers.push(method); } } else if (isGetAccessorDeclaration(member) || isSetAccessorDeclaration(member)) { - if (!hasGetSetAccessor) { - hasGetSetAccessor = true; - let type; - if (isGetAccessorDeclaration(member)) { - type = localInferenceFromInitializer(member, member.type); - } - else { - type = localInferenceFromInitializer(member.parameters[0], member.parameters[0].type); - } - if (!type) { - invalid = true; - } - nonStaticMembers.push( - factory.createPropertySignature( - [], - member.name, - /*questionToken*/ undefined, - type, - ), - ); + const accessorType = handleAccessors(member, node, member.name, getMemberKey(member)); + if (accessorType && accessorType.flags !== LocalTypeInfoFlags.None) { + nonStaticMembers.push(accessorType.type); + } + else { + invalid = true; + continue; } } else if (isIndexSignatureDeclaration(member)) { @@ -612,6 +619,7 @@ export function createLocalInferenceResolver({ const type = localInferenceFromInitializer(member, member.type); if (!type) { invalid = true; + continue; } const propertySignature = factory.createPropertySignature( keepReadonlyKeyword(member.modifiers), @@ -619,7 +627,7 @@ export function createLocalInferenceResolver({ member.questionToken, type, ); - if (member.modifiers?.some(modifier => modifier.kind === SyntaxKind.StaticKeyword)) { + if (hasStaticModifier(member)) { staticMembers.push(propertySignature); } else { @@ -642,6 +650,10 @@ export function createLocalInferenceResolver({ } } + function hasStaticModifier(node: HasModifiers) { + return node.modifiers?.some(modifier => modifier.kind === SyntaxKind.StaticKeyword); + } + function keepReadonlyKeyword(modifiers?: NodeArray): Modifier[] { if (modifiers?.some(modifier => modifier.kind === SyntaxKind.ReadonlyKeyword)) { return [factory.createModifier(SyntaxKind.ReadonlyKeyword)]; From 5e2e6d0c1f46e2e98eff75566a6464ad03a3fac3 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Fri, 20 Oct 2023 06:56:05 +0000 Subject: [PATCH 109/224] Fix more PR Comments 1. use bitwise AND instead of comparison 2. report errors on property name for object literals instead of the object literal Signed-off-by: Hana Joo --- .../declarations/localInferenceResolver.ts | 4 +- .../computedPropertiesNarrowed.errors.txt | 44 +++++++------------ 2 files changed, 19 insertions(+), 29 deletions(-) diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 2fd4c4ea0cd81..6a541b0a02b20 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -398,7 +398,7 @@ export function createLocalInferenceResolver({ } if (isComputedPropertyName(prop.name)) { if (!resolver.isLiteralComputedName(prop.name)) { - reportIsolatedDeclarationError(objectLiteral); + reportIsolatedDeclarationError(prop.name); replaceWithInvalid = true; continue; } @@ -584,7 +584,7 @@ export function createLocalInferenceResolver({ } else if (isMethodDeclaration(member)) { const { method, flags } = handleMethodDeclaration(member, member.name, NarrowBehavior.None); - if (flags === LocalTypeInfoFlags.Invalid) { + if (flags & LocalTypeInfoFlags.Invalid) { invalid = true; continue; } diff --git a/tests/baselines/reference/computedPropertiesNarrowed.errors.txt b/tests/baselines/reference/computedPropertiesNarrowed.errors.txt index 01efbad233e71..90be07ce96394 100644 --- a/tests/baselines/reference/computedPropertiesNarrowed.errors.txt +++ b/tests/baselines/reference/computedPropertiesNarrowed.errors.txt @@ -1,9 +1,9 @@ -computedPropertiesNarrowed.ts(4,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertiesNarrowed.ts(18,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertiesNarrowed.ts(21,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertiesNarrowed.ts(25,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertiesNarrowed.ts(36,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertiesNarrowed.ts(46,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(47,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ==== computedPropertiesNarrowed.ts (6 errors) ==== @@ -11,12 +11,10 @@ computedPropertiesNarrowed.ts(46,19): error TS9007: Declaration emit for this fi declare function assert(n: number): asserts n is 1; assert(x); export let o = { - ~ [x]: 1 // error narrow type !== declared type - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~ + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } const y: 0 = 0 @@ -29,25 +27,21 @@ computedPropertiesNarrowed.ts(46,19): error TS9007: Declaration emit for this fi export let o31 = { [-1]: 1 } export let o32 = { [1-1]: 1 } // error number - ~~~~~~~~~~~~ + ~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. let u = Symbol(); export let o4 = { - ~ [u]: 1 // Should error, nut a unique symbol - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~ + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } export let o5 ={ - ~ [Symbol()]: 1 // Should error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - } - ~ + ~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } const uu: unique symbol = Symbol(); export let o6 = { @@ -57,12 +51,10 @@ computedPropertiesNarrowed.ts(46,19): error TS9007: Declaration emit for this fi function foo (): 1 { return 1; } export let o7 = { - ~ [foo()]: 1 // Should error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - }; - ~ + ~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + }; let E = { A: 1 } as const export const o8 = { @@ -71,10 +63,8 @@ computedPropertiesNarrowed.ts(46,19): error TS9007: Declaration emit for this fi function ns() { return { v: 0 } as const } export const o9 = { - ~ [ns().v]: 1 - ~~~~~~~~~~~~~~~ - } - ~ + ~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file From 981e948247652708461b60bdf493525baec3c0ab Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Thu, 19 Oct 2023 09:57:09 +0000 Subject: [PATCH 110/224] In the declaration emitter, enforce flag for ID as the declaration emitter is missing some properties from the emitResolver, it fails weirdly in a way that it'd be confusing for the users, so always turn on ID to avoid from failing unexpectedly. Signed-off-by: Hana Joo --- external-declarations/src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external-declarations/src/main.ts b/external-declarations/src/main.ts index b75cb7e20d229..a02598a816565 100644 --- a/external-declarations/src/main.ts +++ b/external-declarations/src/main.ts @@ -79,7 +79,7 @@ async function main(cancellationToken: CancellationToken, msDelay: number) { const tsconfig = ts.readConfigFile(projectConfig, ts.sys.readFile); const parsed = ts.parseJsonConfigFileContent(tsconfig.config, ts.sys, "./"); - const options = parsed.options; + const options = { ...parsed.options, isolatedDeclarations: true }; if (parsedArgs.declarationDir) { options.declarationDir = parsedArgs.declarationDir; } From ef231d910dd59ce32f29df5bae72457d60c3bfa6 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Thu, 19 Oct 2023 11:02:01 +0000 Subject: [PATCH 111/224] Only allow type inference on local members during enum emit. Signed-off-by: Hana Joo --- src/compiler/checker.ts | 81 ++++++++++++++--------- src/compiler/transformers/declarations.ts | 15 ++--- 2 files changed, 56 insertions(+), 40 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 384c2bb7f2712..5ab5be5382e63 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -44752,44 +44752,63 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { 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 - } + case SyntaxKind.Identifier: 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); - } - } + return evaluateEntityNameExpression(expr as EntityNameExpression, location); + case SyntaxKind.ElementAccessExpression: + return evaluateElementAccessExpression(expr as ElementAccessExpression, location); + } + return undefined; + } + + 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); } - 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 getEnumMemberValue(enumMember); + } + 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); + } + } + } + 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) { diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index f18c75e012f89..7cd402ac4554a 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -1927,17 +1927,14 @@ export function transformDeclarations(context: TransformationContext) { input.name, factory.createNodeArray(mapDefined(input.members, m => { if (shouldStripInternal(m)) return; - if (isolatedDeclarations) { - if ( - m.initializer && !resolver.isLiteralConstDeclaration(m) && - // This will be its own compiler error instead, so don't report. - !isComputedPropertyName(m.name) - ) { - reportIsolatedDeclarationError(m); - } - } // 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) + ) { + reportIsolatedDeclarationError(m); + } const newInitializer = constValue === undefined ? undefined : typeof constValue === "string" From 6faac4fcdfa004c40aedcbe2c5f65ff469d2517c Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 23 Oct 2023 16:11:15 +0100 Subject: [PATCH 112/224] Integrated dte tests into tsc tests. Signed-off-by: Titian Cernicova-Dragomir --- external-declarations/fixed-tests.jsonc | 20 +++ external-declarations/original-tests.jsonc | 6 +- external-declarations/package.json | 60 +++---- .../src/test-runner/cli-arg-config.ts | 1 - .../src/test-runner/test-runner-main.ts | 6 +- .../tsc-infrastructure/compiler.ts | 9 +- .../src/test-runner/utils.ts | 29 +--- src/compiler/transformers/declarations.ts | 9 +- .../transformers/declarations/emit-host.ts | 63 +------ .../declarations/emit-resolver.ts | 1 + .../declarations/transform-project.ts | 43 ++--- .../transformers/declarations/types.ts | 1 + src/harness/compilerImpl.ts | 11 +- src/harness/harnessIO.ts | 146 +++++++++++++++- src/testRunner/compilerRunner.ts | 163 ++++++++++++++++-- 15 files changed, 390 insertions(+), 178 deletions(-) diff --git a/external-declarations/fixed-tests.jsonc b/external-declarations/fixed-tests.jsonc index e4961773ebb53..4b5bfd5ab4ecd 100644 --- a/external-declarations/fixed-tests.jsonc +++ b/external-declarations/fixed-tests.jsonc @@ -13,6 +13,26 @@ ] }, "test-categories": { + "to-investigate": [ + "declarationEmitObjectLiteralAccessors1", + "declarationsWithRecursiveInternalTypesProduceUniqueTypeParams", + ], + "new-issue": [ + "emitMethodCalledNew", + "indexTypeNoSubstitutionTemplateLiteral", + "staticPropertyNameConflicts", + "objectTypesIdentityWithConstructSignatures2", + "objectTypesIdentityWithConstructSignaturesDifferingParamCounts", + "objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints", + "objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2", + "objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3", + "objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType", + "objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2", + "objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames", + "objectTypesIdentityWithGenericConstructSignaturesOptionalParams", + "objectTypesIdentityWithGenericConstructSignaturesOptionalParams2", + "objectTypesIdentityWithGenericConstructSignaturesOptionalParams3", + ], "enum-issues": [ "ambientConstLiterals", "constEnumErrors", diff --git a/external-declarations/original-tests.jsonc b/external-declarations/original-tests.jsonc index ca5b1dbcc128d..0d55f0fe8ed1b 100644 --- a/external-declarations/original-tests.jsonc +++ b/external-declarations/original-tests.jsonc @@ -32,13 +32,17 @@ "parserIndexSignature11", "ES5SymbolProperty1", "indexSignatureMustHaveTypeAnnotation", + "computedPropertyNamesOnOverloads_ES5", + "computedPropertyNamesOnOverloads_ES6", // Computed property type is narrowed "computedPropertiesNarrowed", // error on used to be indexer, now it is a computed property "propertyAssignment", "invalidTaggedTemplateEscapeSequences", // Invalid escape sequences // duplicate field/accessor - "symbolDeclarationEmit12" + "symbolDeclarationEmit12", + // symbol merges with global eval and is not written to declarations. + "parserStrictMode8", ], "ts-bugs": [ // https://github.com/microsoft/TypeScript/issues/55571 diff --git a/external-declarations/package.json b/external-declarations/package.json index 3dda5983edc39..9f61d6b892ce6 100644 --- a/external-declarations/package.json +++ b/external-declarations/package.json @@ -1,32 +1,32 @@ { - "name": "external-declarations", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "build": "node ../built/local/tsc.js -p ./src", - "watch": "node ../built/local/tsc.js -w -p ./src", - "run-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=../tests/cases --libPath=../tests/lib --type=all --shardCount=8 --forceIsolatedDeclarations --outputPath=./tsc-tests/$original --configFile=./original-tests.jsonc", - "run-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=../tests/cases --outputPath=./tsc-tests/$original --configFile=./original-tests.jsonc", - "transform-tests-parallel": "node ./build/code-mod/tsc-test-fixer/run-test-updater-parallel.js --rootPaths=../tests/cases --shardCount=8", - "transform-tests": "node ./build/code-mod/tsc-test-fixer/run-test-updater.js --rootPaths=../tests/cases", - "run-transformed-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=./tsc-tests/updated-tests --libPath=../tests/lib --type=all --shardCount=8 --outputPath=./tsc-tests/$transformed --configFile=./fixed-tests.jsonc", - "run-transformed-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=./tsc-tests/updated-tests --libPath=../tests/lib --outputPath=./tsc-tests/$transformed --configFile=./fixed-tests.jsonc", - "fixer-tests": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source ", - "fixer-tests-update": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source --update " - }, - "author": "", - "license": "ISC", - "dependencies": { - "json5": "^2.2.3", - "source-map-support": "^0.5.21", - "typescript": "../", - "@types/inquirer": "^8.2.6", - "@types/node": "^20.7.1", - "chalk": "^4.1.2", - "inquirer": "^8.2.6" - }, - "devDependencies": { - "@types/node": "^18.11.18" - } + "name": "external-declarations", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "build": "node ../built/local/tsc.js -p ./src", + "watch": "node ../built/local/tsc.js -w -p ./src", + "run-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=../tests/cases --type=all --shardCount=8 --forceIsolatedDeclarations --outputPath=./tsc-tests/$original --configFile=./original-tests.jsonc", + "run-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=../tests/cases --outputPath=./tsc-tests/$original --configFile=./original-tests.jsonc", + "transform-tests-parallel": "node ./build/code-mod/tsc-test-fixer/run-test-updater-parallel.js --rootPaths=../tests/cases --shardCount=8", + "transform-tests": "node ./build/code-mod/tsc-test-fixer/run-test-updater.js --rootPaths=../tests/cases", + "run-transformed-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=./tsc-tests/updated-tests --type=all --shardCount=8 --outputPath=./tsc-tests/$transformed --configFile=./fixed-tests.jsonc", + "run-transformed-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=./tsc-tests/updated-tests --outputPath=./tsc-tests/$transformed --configFile=./fixed-tests.jsonc", + "fixer-tests": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source ", + "fixer-tests-update": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source --update " + }, + "author": "", + "license": "ISC", + "dependencies": { + "json5": "^2.2.3", + "source-map-support": "^0.5.21", + "typescript": "../", + "@types/inquirer": "^8.2.6", + "@types/node": "^20.7.1", + "chalk": "^4.1.2", + "inquirer": "^8.2.6" + }, + "devDependencies": { + "@types/node": "^18.11.18" + } } diff --git a/external-declarations/src/test-runner/cli-arg-config.ts b/external-declarations/src/test-runner/cli-arg-config.ts index 17651c43439f6..3b57765063caf 100644 --- a/external-declarations/src/test-runner/cli-arg-config.ts +++ b/external-declarations/src/test-runner/cli-arg-config.ts @@ -15,7 +15,6 @@ export const testRunnerCLIConfiguration = parserConfiguration({ }, shard: ArgType.Number(), shardCount: ArgType.Number(), - libPath: ArgType.String(), outputPath: ArgType.String(), rootPaths: ArgType.StringArray(), configFile: ArgType.String(), diff --git a/external-declarations/src/test-runner/test-runner-main.ts b/external-declarations/src/test-runner/test-runner-main.ts index f99f0f28f3902..dfa51572532c9 100644 --- a/external-declarations/src/test-runner/test-runner-main.ts +++ b/external-declarations/src/test-runner/test-runner-main.ts @@ -43,7 +43,6 @@ import { } from "./tsc-infrastructure/vpath"; import { loadTestCase, - readDirRecursive, runDeclarationTransformEmitter, runTypeScript, TestCompilationResult, @@ -64,7 +63,6 @@ if (prefixed) { const outputPath = parsedArgs.outputPath ?? "./tsc-tests/run"; const rootCasePaths = parsedArgs.rootPaths ?? ["./tests/source"]; -const libFolder = parsedArgs.libPath ?? path.join(rootCasePaths[0], "../lib"); const filter = parsedArgs.default ? new RegExp(parsedArgs.default) : /.*\.ts/; const runType = parsedArgs.type === "all" ? { tsc: true, dte: true } : @@ -95,8 +93,6 @@ async function main() { Object.entries(fileConfiguration?.["test-categories"] ?? {}).forEach(([name, tests]) => tests.forEach(t => testCategories.set(t, name))); } - const libFiles = (await readDirRecursive(libFolder)).map(n => normalizePath(path.join("/.lib", n))); - const testsPerShared = shardCount && Math.round(allTests.length / shardCount); const [start, end] = shard === undefined || shardCount === undefined || testsPerShared === undefined ? [0, allTests.length] : @@ -121,7 +117,7 @@ async function main() { if (runType.tsc) runAndWrite(testName, path.join(outputPath, "tsc", file), varConfig, runTypeScript); - if (runType.dte) runAndWrite(testName, path.join(outputPath, "dte", file), varConfig, (t, s) => runDeclarationTransformEmitter(t, libFiles, s)); + if (runType.dte) runAndWrite(testName, path.join(outputPath, "dte", file), varConfig, (t, s) => runDeclarationTransformEmitter(t, s)); } console.log(` Ran: ${pad(count, 5)}/${allTests.length}`); diff --git a/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts b/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts index b1c7b3102712a..660fdab85af57 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts @@ -262,14 +262,7 @@ export function compileFiles(host: fakes.CompilerHost, rootFiles: string[] | und const emitResult = program.emit( /*targetSourceFile*/ undefined, - (fileName, text, writeByteOrderMark) => { - // If there are errors TS will ot emit declaration files. We want then regardless of errors. - if (!vpath.isAbsolute(fileName)) { - fileName = vpath.resolve(host.vfs.cwd(), fileName); - } - if (host.outputs.some(d => d.file === fileName)) return; - host.writeFile(fileName, text, writeByteOrderMark); - }, + /*writeFile*/ undefined, /*cancellationToken*/ undefined, /*emitOnlyDtsFiles*/ undefined, /*customTransformers*/ undefined, diff --git a/external-declarations/src/test-runner/utils.ts b/external-declarations/src/test-runner/utils.ts index cdba1df4e122c..a5211891a2791 100644 --- a/external-declarations/src/test-runner/utils.ts +++ b/external-declarations/src/test-runner/utils.ts @@ -1,5 +1,4 @@ import * as fsp from "fs/promises"; -import * as path from "path"; import * as ts from "typescript"; import { @@ -12,9 +11,6 @@ import { TestFile, Utils, } from "./tsc-infrastructure/compiler-run"; -import { - libs, -} from "./tsc-infrastructure/options"; import * as TestCaseParser from "./tsc-infrastructure/test-file-parser"; import { changeExtension, @@ -78,9 +74,7 @@ export function isRelevantTestFile(f: TestCaseParser.TestUnitData) { return isTypeScriptFile(f.name) && !isDeclarationFile(f.name) && f.content !== undefined; } -export function runDeclarationTransformEmitter(caseData: TestCaseParser.TestCaseContent, libFiles: string[], settings: ts.CompilerOptions): TestCompilationResult { - const toSrc = (n: string) => vpath.combine("/src", n); - const projectFiles = [...caseData.testUnitData.map(o => toSrc(o.name)), ...libFiles]; +export function runDeclarationTransformEmitter(caseData: TestCaseParser.TestCaseContent, settings: ts.CompilerOptions): TestCompilationResult { settings = { ...settings, isolatedDeclarations: true, @@ -91,13 +85,13 @@ export function runDeclarationTransformEmitter(caseData: TestCaseParser.TestCase .filter(isRelevantTestFile) .map(file => { const sourceFile = ts.createSourceFile( - toSrc(file.name), + file.name, Utils.removeByteOrderMark(file.content), settings.target ?? ts.ScriptTarget.ES2015, /*setParentNodes*/ true, file.name.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS, ); - const declaration = ts.emitDeclarationsForFile(sourceFile, projectFiles, libs, settings); + const declaration = ts.emitDeclarationsForFile(sourceFile, settings); diagnostics.push(...declaration.diagnostics); return { content: settings.emitBOM ? Utils.addUTF8ByteOrderMark(declaration.code) : declaration.code, @@ -106,20 +100,3 @@ export function runDeclarationTransformEmitter(caseData: TestCaseParser.TestCase }); return { files, diagnostics }; } - -export async function readDirRecursive(dir: string, relativePath = ""): Promise { - const content = await fsp.readdir(dir); - const result: string[] = []; - for (const entry of content) { - const relativeChildPath = path.join(relativePath, entry); - const fsPath = path.join(dir, entry); - const stat = await fsp.stat(fsPath); - if (stat.isDirectory()) { - result.push(...await readDirRecursive(fsPath, relativeChildPath)); - } - else { - result.push(relativeChildPath); - } - } - return result; -} diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index f18c75e012f89..2124462cc7033 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -406,6 +406,13 @@ export function transformDeclarations(context: TransformationContext) { Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode, )); }); + file.referencedFiles.forEach(ref => { + context.addDiagnostic(createDiagnosticForRange( + file, + ref, + Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode, + )); + }); } function handleTypeReferenceError(typeReferenceDirective: [specifier: string, mode: ResolutionMode], requestingNode: Node) { @@ -660,7 +667,7 @@ export function transformDeclarations(context: TransformationContext) { node, combinedStatements, /*isDeclarationFile*/ true, - references, + isolatedDeclarations ? [] : references, isolatedDeclarations ? [] : typeReferences, node.hasNoDefaultLib, isolatedDeclarations ? [] : libReferences, diff --git a/src/compiler/transformers/declarations/emit-host.ts b/src/compiler/transformers/declarations/emit-host.ts index db57fcea12f64..bf0e60d3e20af 100644 --- a/src/compiler/transformers/declarations/emit-host.ts +++ b/src/compiler/transformers/declarations/emit-host.ts @@ -1,16 +1,5 @@ import { - changeExtension, CompilerOptions, - Extension, - fileExtensionIsOneOf, - getDeclarationEmitExtensionForPath, - getDirectoryPath, - getNodeId, - getRelativePathFromDirectory, - hasExtension, - resolvePath, - SourceFile, - SyntaxKind, System, } from "../../_namespaces/ts"; import { @@ -18,17 +7,11 @@ import { } from "./types"; /** @internal */ -export function createEmitDeclarationHost(allProjectFiles: string[], tsLibFiles: string[], options: CompilerOptions, sys: System): IsolatedEmitHost { +export function createEmitDeclarationHost(options: CompilerOptions, sys: System): IsolatedEmitHost { const getCompilerOptions = () => options; const getCurrentDirectory = () => "."; const getCommonSourceDirectory = () => "."; const getCanonicalFileName = (f: string) => `./${f}`; - const projectFileMap = new Map( - allProjectFiles - .map(f => ({ kind: SyntaxKind.SourceFile, fileName: f } as SourceFile)) - .map(f => [f.fileName, getNodeId(f)]), - ); - const tsLibFileSet = new Set(tsLibFiles); return { redirectTargetsMap: new Map(), @@ -46,47 +29,11 @@ export function createEmitDeclarationHost(allProjectFiles: string[], tsLibFiles: getCurrentDirectory, getCommonSourceDirectory, getCanonicalFileName, - getLibFileFromReference(ref) { - if (options.noLib) { - return undefined; - } - if (!tsLibFileSet.has(ref.fileName)) { - return; - } - return { - fileName: ref.fileName, - } as SourceFile; + getLibFileFromReference() { + return undefined; }, - getSourceFileFromReference(referencingFile, ref) { - if (ref.fileName.startsWith("node_modules/") || ref.fileName.indexOf("/node_modules/") !== -1) { - return undefined; - } - if (fileExtensionIsOneOf(ref.fileName, [Extension.Cjs, Extension.Mjs, Extension.Js]) && !options.allowJs) { - return undefined; - } - let resolvedFile: string | undefined = resolvePath(getDirectoryPath(referencingFile.fileName), ref.fileName); - let resolvedFileId = projectFileMap.get(resolvedFile); - if (!hasExtension(resolvedFile) && resolvedFileId === undefined) { - [resolvedFile, resolvedFileId] = [Extension.Dts, Extension.Dmts, Extension.Dcts, Extension.Ts, Extension.Mts, Extension.Cts] - .map(e => resolvedFile + e) - .map(f => [f, projectFileMap.get(f)] as const) - .find(([_, id]) => id !== undefined) ?? []; - - if (!resolvedFile) return undefined; - } - if (!projectFileMap.has(resolvedFile)) { - return undefined; - } - const resolvedDeclarationFile = fileExtensionIsOneOf(resolvedFile, [Extension.Dts, Extension.Dmts, Extension.Dcts]) ? resolvedFile : - changeExtension(resolvedFile, getDeclarationEmitExtensionForPath(resolvedFile)); - return { - fileName: getRelativePathFromDirectory( - getDirectoryPath(referencingFile.fileName), - resolvedDeclarationFile, - /*ignoreCase*/ false, - ), - id: resolvedFileId, - } as any as SourceFile; + getSourceFileFromReference() { + return undefined; }, isSourceOfProjectReferenceRedirect() { return false; diff --git a/src/compiler/transformers/declarations/emit-resolver.ts b/src/compiler/transformers/declarations/emit-resolver.ts index 5371411cd7a6e..d2362ab9d0239 100644 --- a/src/compiler/transformers/declarations/emit-resolver.ts +++ b/src/compiler/transformers/declarations/emit-resolver.ts @@ -308,6 +308,7 @@ export function createEmitDeclarationResolver(file: SourceFile, host: IsolatedEm isDeclarationVisible, isLiteralConstDeclaration, isLiteralComputedName, + tryFindAmbientModule() { return undefined }, getAllAccessorDeclarations(declaration) { const parentLinks = getNodeLinks(declaration.parent); const key = getMemberKey(declaration.name); diff --git a/src/compiler/transformers/declarations/transform-project.ts b/src/compiler/transformers/declarations/transform-project.ts index 55f188a53cfd5..f27fd2ccce7b4 100644 --- a/src/compiler/transformers/declarations/transform-project.ts +++ b/src/compiler/transformers/declarations/transform-project.ts @@ -10,7 +10,9 @@ import { EmitHost, EmitResolver, factory, - getDirectoryPath, + getDeclarationEmitExtensionForPath, + getNormalizedAbsolutePath, + getRelativePathFromDirectory, NewLineKind, normalizePath, pathIsAbsolute, @@ -34,15 +36,8 @@ export function emitDeclarationsForProject( return rootDir; } -function ensureDirRecursive(dirPath: string, host: CompilerHost) { - if (!host.directoryExists!(dirPath)) { - const parent = getDirectoryPath(dirPath); - ensureDirRecursive(parent, host); - (host as any).createDirectory(dirPath); - } -} function joinToRootIfNeeded(rootDir: string, existingPath: string) { - return normalizePath(pathIsAbsolute(existingPath) ? existingPath : sys.resolvePath(combinePaths(rootDir, existingPath))); + return normalizePath(pathIsAbsolute(existingPath) ? existingPath : combinePaths(rootDir, existingPath)); } function createIsolatedDeclarationsEmitter(rootDir: string, options: CompilerOptions) { @@ -54,37 +49,28 @@ function createIsolatedDeclarationsEmitter(rootDir: string, options: CompilerOpt file = normalizePath(file); const source = host.getSourceFile(file, options.target ?? ScriptTarget.ES2015); - if (!source) return; + if (!source) return {}; - const { code, diagnostics } = emitDeclarationsForFile(source, [], [], options); - if (diagnostics.length > 0) { - throw new Error(`Cannot transform file '${source.fileName}' due to ${diagnostics.length} diagnostics`); - } - const output = declarationDir ? changeAnyExtension(file.replace(rootDir, declarationDir), ".d.ts") : - changeAnyExtension(file, ".d.ts"); - const dirPath = getDirectoryPath(output); - ensureDirRecursive(dirPath, host); + const { code, diagnostics } = emitDeclarationsForFile(source, options); + const extension = getDeclarationEmitExtensionForPath(file); + const relativeToRoot = getRelativePathFromDirectory(rootDir, file, !host.useCaseSensitiveFileNames()); + const declarationPath = !declarationDir ? file : getNormalizedAbsolutePath(combinePaths(declarationDir, relativeToRoot), host.getCurrentDirectory()); + const output = changeAnyExtension(declarationPath, extension); host.writeFile(output, code, !!options.emitBOM); - return output; + return { output, diagnostics }; }; } function emitDeclarationsForAllFiles(rootDir: string, files: string[], host: CompilerHost, options: CompilerOptions) { const transformer = createIsolatedDeclarationsEmitter(rootDir, options); for (const file of files) { - try { - transformer(file, host); - } - catch (e) { - console.error(`Failed to transform: ${file}`, e); - } + transformer(file, host); } - return { rootDir }; } -export function emitDeclarationsForFile(sourceFile: SourceFile, allProjectFiles: string[], tsLibFiles: string[], options: CompilerOptions) { +export function emitDeclarationsForFile(sourceFile: SourceFile, options: CompilerOptions) { const getCompilerOptions = () => options; - const emitHost = createEmitDeclarationHost(allProjectFiles, tsLibFiles, options, sys); + const emitHost = createEmitDeclarationHost(options, sys); const emitResolver = createEmitDeclarationResolver(sourceFile, emitHost); const diagnostics: Diagnostic[] = []; const transformer = transformDeclarations({ @@ -106,6 +92,7 @@ export function emitDeclarationsForFile(sourceFile: SourceFile, allProjectFiles: onlyPrintJsDocStyle: true, newLine: options.newLine ?? NewLineKind.CarriageReturnLineFeed, target: options.target, + removeComments: options.removeComments, } as PrinterOptions); const code = printer.printFile(result); diff --git a/src/compiler/transformers/declarations/types.ts b/src/compiler/transformers/declarations/types.ts index 5133b5e9946d3..16f9160896809 100644 --- a/src/compiler/transformers/declarations/types.ts +++ b/src/compiler/transformers/declarations/types.ts @@ -65,4 +65,5 @@ export interface IsolatedEmitResolver { isImportRequiredByAugmentation(decl: ImportDeclaration): boolean; getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined; getAllAccessorDeclarations(declaration: AccessorDeclaration): AllAccessorDeclarations; + tryFindAmbientModule(moduleReferenceExpression: Expression): Symbol | undefined; } diff --git a/src/harness/compilerImpl.ts b/src/harness/compilerImpl.ts index 370f09bcf69e2..d6ec7334d38ae 100644 --- a/src/harness/compilerImpl.ts +++ b/src/harness/compilerImpl.ts @@ -241,7 +241,7 @@ 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): CompilationResult { if (compilerOptions.project || !rootFiles || rootFiles.length === 0) { const project = readProject(host.parseConfigHost, compilerOptions.project, compilerOptions); if (project) { @@ -269,7 +269,14 @@ export function compileFiles(host: fakes.CompilerHost, rootFiles: string[] | und 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/harnessIO.ts b/src/harness/harnessIO.ts index 3ef0e2d0beaf6..5bc88230ffd36 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,9 @@ import { TypeWriterWalker, } from "./_namespaces/Harness"; import * as ts from "./_namespaces/ts"; +import { + mapDefined, +} from "./_namespaces/ts"; import * as Utils from "./_namespaces/Utils"; import * as vfs from "./_namespaces/vfs"; import * as vpath from "./_namespaces/vpath"; @@ -311,6 +315,7 @@ export namespace Compiler { baselineFile?: string; libFiles?: string; noTypesAndSymbols?: boolean; + forceDtsEmit?: boolean; } // Additional options not already in ts.optionDeclarations @@ -330,6 +335,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; @@ -453,7 +459,7 @@ 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); + const result = compiler.compileFiles(host, programFileNames, options, typeScriptVersion, options.forceDtsEmit); result.symlinks = symlinks; return result; } @@ -541,6 +547,96 @@ 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 host = new fakes.CompilerHost(tscHost.vfs, options, /*setParentNodes*/ true); + const getCanonicalFileName = (f: string) => host.getCanonicalFileName(f); + const commonSourceDirectory = ts.getCommonSourceDirectory( + options, + () => programFileNames.filter(f => !vpath.isDeclaration(f)), + currentDirectory, + getCanonicalFileName, + ); + + const diagnostics: ts.Diagnostic[] = []; + const transformer = ts.createIsolatedDeclarationsEmitter(commonSourceDirectory ?? currentDirectory, options); + programFileNames.forEach(fileName => { + if (vpath.isDeclaration(fileName)) { + return; + } + const { diagnostics: fileDiagnostics = [] } = transformer(fileName, host); + diagnostics.push(...fileDiagnostics); + }); + const dts = new collections.SortedMap({ comparer: host.vfs.stringComparer, sort: "insertion" }); + host.outputs.forEach(d => dts.set(d.file, new documents.TextDocument(d.file, d.text))); + return { dts, diagnostics }; + } + export function compileDeclarationFiles(context: DeclarationCompilationContext | undefined, symlinks: vfs.FileSet | undefined) { if (!context) { return; @@ -902,6 +998,54 @@ export namespace Compiler { return "\n//// https://sokra.github.io/source-map-visualization" + hash + "\n"; } + export function doDeclarationDiffBaseline( + baselinePath: string, + type: string, + header: string, + dteDeclarationFiles: readonly TestFile[], + tscDeclarationFiles: readonly TestFile[], + ) { + const Diff = require("diff"); + const dteContent = declarationContent(dteDeclarationFiles); + const tscContent = declarationContent(tscDeclarationFiles); + + let fullDiff = "// [[Reason: ]] ////\r\n\r\n"; + fullDiff += "//// [" + header + "] ////\r\n\r\n"; + fullDiff += Diff.createTwoFilesPatch("DTE", "TSC", dteContent, tscContent, "DTE output", "TSC output"); + + Baseline.runBaseline(type + "/" + baselinePath.replace(/\.tsx?/, `.d.ts`), fullDiff); + } + function declarationContent(declarationFiles: readonly TestFile[]) { + 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" : ""); + } + } + return dtsCode; + } + export function doDeclarationBaseline(baselinePath: string, type: string, header: string, declarationFiles: readonly TestFile[], errors: readonly ts.Diagnostic[], toBeCompiled: readonly TestFile[], otherFiles: readonly TestFile[], prettyErrors?: boolean) { + let tsCode = ""; + const tsSources = otherFiles.concat(toBeCompiled); + tsCode += "//// [" + header + "] ////\r\n\r\n"; + + for (let i = 0; i < tsSources.length; i++) { + tsCode += "//// [" + tsSources[i].unitName + "]\r\n"; + tsCode += tsSources[i].content + (i < (tsSources.length - 1) ? "\r\n" : ""); + } + + let dtsCode = "/// [Declarations] ////\r\n\r\n"; + dtsCode += declarationContent(declarationFiles); + if (errors.length > 0) { + dtsCode += getErrorBaseline(tsSources, errors, prettyErrors); + } + // eslint-disable-next-line no-null/no-null + Baseline.runBaseline(type + "/" + baselinePath.replace(/\.tsx?/, `.d.ts`), tsCode.length > 0 ? tsCode + "\r\n\r\n" + dtsCode : 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."); diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index d287bec994046..7851d2994045c 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -90,11 +90,15 @@ 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 isolatedTest!: IsolatedDeclarationTest; before(() => { let payload; if (test && test.content) { payload = TestCaseParser.makeUnitsFromTest(test.content, test.file); } + if (payload) { + isolatedTest = new IsolatedDeclarationTest(fileName, payload, configuration); + } compilerTest = new CompilerTest(fileName, payload, configuration); }); it(`Correct errors for ${fileName}`, () => compilerTest.verifyDiagnostics()); @@ -103,8 +107,12 @@ 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()); + it(`Correct dte emit for ${fileName}`, () => isolatedTest?.verifyDteOutput()); + it(`Correct tsc emit for ${fileName}`, () => isolatedTest?.verifyTscOutput()); + it(`Correct dte/tsc diff ${fileName}`, () => isolatedTest?.verifyDiff()); after(() => { compilerTest = undefined!; + isolatedTest = undefined!; }); } @@ -126,7 +134,7 @@ export class CompilerBaselineRunner extends RunnerBase { } } -class CompilerTest { +class CompilerTestBase { private static varyBy: readonly string[] = [ "module", "moduleResolution", @@ -164,18 +172,18 @@ 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[]; constructor(fileName: string, testCaseContent?: TestCaseParser.TestCaseContent, configurationOverrides?: TestCaseParser.CompilerSettings) { const absoluteRootDir = vfs.srcFolder; @@ -277,6 +285,15 @@ class CompilerTest { return { file, configurations, content }; } + private 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( @@ -351,12 +368,124 @@ class CompilerTest { !!ts.length(this.result.diagnostics), ); } +} - private createHarnessTestFile(unit: TestCaseParser.TestUnitData): Compiler.TestFile { - return { - unitName: unit.name, - content: unit.content, - fileOptions: unit.fileOptions, - }; +function changeSettingForIsolatedDeclarations(settings: TestCaseParser.CompilerSettings) { + const clone: TestCaseParser.CompilerSettings = { + ...settings, + allowJS: "false", + checkJS: "false", + declaration: "true", + isolatedDeclarations: "true", + forceDtsEmit: "true", + }; + delete clone.outFile; + delete clone.outfile; + delete clone.out; + return clone; +} + +function removeOutFromOptions(tsConfig: ts.ParsedCommandLine | undefined) { + if (!tsConfig) return undefined; + + const clone: ts.ParsedCommandLine = { + ...tsConfig, + options: tsConfig.options, + }; + delete clone.options.outFile; + delete clone.options.out; + return clone; +} +export class IsolatedDeclarationTest extends CompilerTestBase { + private dteDiagnostics: ts.Diagnostic[]; + private isOutputEquivalent: boolean; + private dteDtsFile: Compiler.TestFile[]; + private tscDtsFiles: Compiler.TestFile[]; + constructor(fileName: string, testCaseContent: TestCaseParser.TestCaseContent, configurationOverrides?: TestCaseParser.CompilerSettings) { + super( + fileName, + { + ...testCaseContent, + settings: changeSettingForIsolatedDeclarations(testCaseContent.settings), + tsConfig: removeOutFromOptions(testCaseContent.tsConfig), + }, + configurationOverrides, + // /*forceIncludeAllFiles*/ true, + ); + const options = { ...this.options }; + ts.setConfigFileInOptions(options, options && options.configFile); + + const currentDirectory = this.harnessSettings.currentDirectory ?? vfs.srcFolder; + const dteResult = Compiler.compileDeclarationFilesWithIsolatedEmitter( + this.toBeCompiled, + this.otherFiles, + this.result.host, + this.options, + currentDirectory, + ); + this.dteDiagnostics = dteResult.diagnostics; + this.dteDtsFile = [...ts.mapDefinedIterator(dteResult.dts, ([, f]) => ({ + unitName: this.result.host.vfs.realpathSync(f.file), + content: f.text, + }))]; + this.dteDtsFile.sort((a, b) => this.result.host.vfs.stringComparer(a.unitName, b.unitName)); + + // With force get JSON definition files we need to ignore + this.tscDtsFiles = [...ts.mapDefinedIterator(this.result.dts, ([name, f]) => + name.endsWith(".d.json.ts") ? undefined : { + unitName: this.result.host.vfs.realpathSync(f.file), + content: f.text, + })]; + this.tscDtsFiles.sort((a, b) => this.result.host.vfs.stringComparer(a.unitName, b.unitName)); + + // If DTE is the same as TS output we don't need to do any extra checks. + this.isOutputEquivalent = this.dteDtsFile.length === this.tscDtsFiles.length && this.dteDtsFile + .every((dteDecl, index) => { + const tscDecl = this.tscDtsFiles[index]; + return tscDecl.unitName === dteDecl.unitName && dteDecl.content === tscDecl.content; + }); + } + private static dteDiagnosticErrors = new Set([ + ts.Diagnostics.Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit.code, + ts.Diagnostics.Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit.code, + ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.code, + // ts.Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit.code, + ]); + + verifyDteOutput() { + if (this.isOutputEquivalent) return; + Compiler.doDeclarationBaseline( + this.configuredName, + "isolated-declarations/original/dte", + this.fileName, + this.dteDtsFile, + this.dteDiagnostics, + this.toBeCompiled, + this.otherFiles, + this.options.pretty, + ); + } + verifyTscOutput() { + if (this.isOutputEquivalent) return; + Compiler.doDeclarationBaseline( + this.configuredName, + "isolated-declarations/original/tsc", + this.fileName, + this.tscDtsFiles, + this.result.diagnostics.filter(p => IsolatedDeclarationTest.dteDiagnosticErrors.has(p.code)), + this.toBeCompiled, + this.otherFiles, + this.options.pretty, + ); + } + verifyDiff() { + if (this.isOutputEquivalent) return; + Compiler.doDeclarationDiffBaseline( + this.configuredName, + "isolated-declarations/original/diff", + this.fileName, + this.dteDtsFile, + this.tscDtsFiles, + ); } } From 852c2a8de6d7ad9e689876a0861cc5fbbb019299 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 23 Oct 2023 17:57:56 +0100 Subject: [PATCH 113/224] Fixed tests. Added baseline for original isolated declarations tests. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/checker.ts | 2 +- .../declarations/transform-project.ts | 2 +- src/harness/harnessIO.ts | 8 +- src/testRunner/compilerRunner.ts | 11 +- tests/baselines/reference/api/typescript.d.ts | 9 +- .../original/diff/ES5SymbolProperty1.d.ts | 16 + .../original/diff/bigintIndex.d.ts | 16 + .../original/diff/complicatedPrivacy.d.ts | 20 + .../diff/computedPropertiesNarrowed.d.ts | 34 + .../diff/computedPropertyNames6_ES5.d.ts | 18 + .../diff/computedPropertyNames6_ES6.d.ts | 18 + .../computedPropertyNamesOnOverloads_ES5.d.ts | 14 + .../computedPropertyNamesOnOverloads_ES6.d.ts | 14 + .../original/diff/constEnum2.d.ts | 15 + .../original/diff/constEnumErrors.d.ts | 18 + .../original/diff/constEnums.d.ts | 45 + .../original/diff/enumBasics2.d.ts | 17 + .../original/diff/enumBasics3.d.ts | 18 + .../original/diff/enumConstantMembers.d.ts | 31 + .../original/diff/enumErrors.d.ts | 20 + .../original/diff/enumExportMergingES6.d.ts | 15 + .../original/diff/forwardRefInEnum.d.ts | 24 + .../original/diff/giant.d.ts | 47 + .../indexSignatureMustHaveTypeAnnotation.d.ts | 17 + .../original/diff/intTypeCheck.d.ts | 27 + ...emplateEscapeSequences(target=es2015).d.ts | 18 + ...edTemplateEscapeSequences(target=es5).d.ts | 18 + ...emplateEscapeSequences(target=esnext).d.ts | 18 + ...olatedModulesGlobalNamespacesAndEnums.d.ts | 28 + .../original/diff/mergedDeclarations2.d.ts | 18 + .../diff/mergedEnumDeclarationCodeGen.d.ts | 15 + .../diff/overloadsWithComputedNames.d.ts | 28 + .../original/diff/parseBigInt.d.ts | 43 + .../diff/parserComputedPropertyName13.d.ts | 15 + .../diff/parserComputedPropertyName14.d.ts | 15 + .../diff/parserComputedPropertyName15.d.ts | 14 + .../diff/parserComputedPropertyName18.d.ts | 15 + .../diff/parserComputedPropertyName19.d.ts | 15 + .../diff/parserComputedPropertyName2.d.ts | 15 + .../diff/parserComputedPropertyName20.d.ts | 14 + .../diff/parserComputedPropertyName21.d.ts | 14 + .../diff/parserComputedPropertyName37.d.ts | 15 + .../diff/parserES5ComputedPropertyName2.d.ts | 15 + .../diff/parserES5ComputedPropertyName5.d.ts | 14 + .../diff/parserES5ComputedPropertyName8.d.ts | 15 + .../diff/parserES5SymbolProperty1.d.ts | 14 + .../diff/parserES5SymbolProperty2.d.ts | 14 + .../diff/parserES5SymbolProperty8.d.ts | 15 + .../diff/parserES5SymbolProperty9.d.ts | 15 + .../original/diff/parserIndexSignature11.d.ts | 16 + .../original/diff/parserIndexSignature5.d.ts | 14 + .../original/diff/parserStrictMode8.d.ts | 12 + .../original/diff/propertyAssignment.d.ts | 20 + .../diff/reExportAliasMakesInstantiated.d.ts | 17 + .../diff/symbolDeclarationEmit12.d.ts | 17 + .../original/diff/symbolProperty52.d.ts | 15 + .../original/diff/symbolProperty53.d.ts | 15 + .../original/diff/symbolProperty54.d.ts | 15 + .../original/diff/symbolProperty58.d.ts | 16 + .../original/diff/symbolProperty59.d.ts | 14 + .../original/diff/templateLiteralTypes4.d.ts | 20 + .../diff/templateLiteralsSourceMap.d.ts | 13 + .../diff/typeUsedAsTypeLiteralIndex.d.ts | 35 + .../verbatimModuleSyntaxConstEnumUsage.d.ts | 20 + .../original/dte/ES5SymbolProperty1.d.ts | 26 + .../original/dte/bigintIndex.d.ts | 94 + .../original/dte/complicatedPrivacy.d.ts | 299 +++ .../dte/computedPropertiesNarrowed.d.ts | 160 ++ .../dte/computedPropertyNames6_ES5.d.ts | 25 + .../dte/computedPropertyNames6_ES6.d.ts | 25 + .../computedPropertyNamesOnOverloads_ES5.d.ts | 40 + .../computedPropertyNamesOnOverloads_ES6.d.ts | 40 + .../original/dte/constEnum2.d.ts | 59 + .../original/dte/constEnumErrors.d.ts | 177 ++ .../original/dte/constEnums.d.ts | 557 +++++ .../original/dte/enumBasics2.d.ts | 78 + .../original/dte/enumBasics3.d.ts | 75 + .../original/dte/enumConstantMembers.d.ts | 171 ++ .../original/dte/enumErrors.d.ts | 213 ++ .../original/dte/enumExportMergingES6.d.ts | 46 + .../original/dte/forwardRefInEnum.d.ts | 63 + .../original/dte/giant.d.ts | 1973 +++++++++++++++++ .../indexSignatureMustHaveTypeAnnotation.d.ts | 34 + .../original/dte/intTypeCheck.d.ts | 614 +++++ ...emplateEscapeSequences(target=es2015).d.ts | 138 ++ ...edTemplateEscapeSequences(target=es5).d.ts | 138 ++ ...emplateEscapeSequences(target=esnext).d.ts | 138 ++ ...olatedModulesGlobalNamespacesAndEnums.d.ts | 127 ++ .../original/dte/mergedDeclarations2.d.ts | 49 + .../dte/mergedEnumDeclarationCodeGen.d.ts | 41 + .../dte/overloadsWithComputedNames.d.ts | 178 ++ .../original/dte/parseBigInt.d.ts | 201 ++ .../dte/parserComputedPropertyName13.d.ts | 13 + .../dte/parserComputedPropertyName14.d.ts | 13 + .../dte/parserComputedPropertyName15.d.ts | 14 + .../dte/parserComputedPropertyName18.d.ts | 13 + .../dte/parserComputedPropertyName19.d.ts | 13 + .../dte/parserComputedPropertyName2.d.ts | 13 + .../dte/parserComputedPropertyName20.d.ts | 15 + .../dte/parserComputedPropertyName21.d.ts | 15 + .../dte/parserComputedPropertyName37.d.ts | 15 + .../dte/parserES5ComputedPropertyName2.d.ts | 13 + .../dte/parserES5ComputedPropertyName5.d.ts | 15 + .../dte/parserES5ComputedPropertyName8.d.ts | 13 + .../dte/parserES5SymbolProperty1.d.ts | 15 + .../dte/parserES5SymbolProperty2.d.ts | 15 + .../dte/parserES5SymbolProperty8.d.ts | 15 + .../dte/parserES5SymbolProperty9.d.ts | 15 + .../original/dte/parserIndexSignature11.d.ts | 19 + .../original/dte/parserIndexSignature5.d.ts | 15 + .../original/dte/parserStrictMode8.d.ts | 24 + .../original/dte/propertyAssignment.d.ts | 41 + .../dte/reExportAliasMakesInstantiated.d.ts | 39 + .../original/dte/symbolDeclarationEmit12.d.ts | 56 + .../original/dte/symbolProperty52.d.ts | 19 + .../original/dte/symbolProperty53.d.ts | 17 + .../original/dte/symbolProperty54.d.ts | 15 + .../original/dte/symbolProperty58.d.ts | 22 + .../original/dte/symbolProperty59.d.ts | 15 + .../original/dte/templateLiteralTypes4.d.ts | 783 +++++++ .../dte/templateLiteralsSourceMap.d.ts | 12 + .../dte/typeUsedAsTypeLiteralIndex.d.ts | 90 + .../verbatimModuleSyntaxConstEnumUsage.d.ts | 60 + .../original/tsc/ES5SymbolProperty1.d.ts | 42 + .../original/tsc/bigintIndex.d.ts | 95 + .../original/tsc/complicatedPrivacy.d.ts | 297 +++ .../tsc/computedPropertiesNarrowed.d.ts | 157 ++ .../tsc/computedPropertyNames6_ES5.d.ts | 43 + .../tsc/computedPropertyNames6_ES6.d.ts | 43 + .../computedPropertyNamesOnOverloads_ES5.d.ts | 44 + .../computedPropertyNamesOnOverloads_ES6.d.ts | 44 + .../original/tsc/constEnum2.d.ts | 59 + .../original/tsc/constEnumErrors.d.ts | 177 ++ .../original/tsc/constEnums.d.ts | 557 +++++ .../original/tsc/enumBasics2.d.ts | 78 + .../original/tsc/enumBasics3.d.ts | 75 + .../original/tsc/enumConstantMembers.d.ts | 171 ++ .../original/tsc/enumErrors.d.ts | 213 ++ .../original/tsc/enumExportMergingES6.d.ts | 46 + .../original/tsc/forwardRefInEnum.d.ts | 63 + .../original/tsc/giant.d.ts | 1969 ++++++++++++++++ .../indexSignatureMustHaveTypeAnnotation.d.ts | 56 + .../original/tsc/intTypeCheck.d.ts | 612 +++++ ...emplateEscapeSequences(target=es2015).d.ts | 138 ++ ...edTemplateEscapeSequences(target=es5).d.ts | 138 ++ ...emplateEscapeSequences(target=esnext).d.ts | 138 ++ ...olatedModulesGlobalNamespacesAndEnums.d.ts | 127 ++ .../original/tsc/mergedDeclarations2.d.ts | 49 + .../tsc/mergedEnumDeclarationCodeGen.d.ts | 41 + .../tsc/overloadsWithComputedNames.d.ts | 194 ++ .../original/tsc/parseBigInt.d.ts | 201 ++ .../tsc/parserComputedPropertyName13.d.ts | 11 + .../tsc/parserComputedPropertyName14.d.ts | 11 + .../tsc/parserComputedPropertyName15.d.ts | 13 + .../tsc/parserComputedPropertyName18.d.ts | 11 + .../tsc/parserComputedPropertyName19.d.ts | 11 + .../tsc/parserComputedPropertyName2.d.ts | 20 + .../tsc/parserComputedPropertyName20.d.ts | 14 + .../tsc/parserComputedPropertyName21.d.ts | 14 + .../tsc/parserComputedPropertyName37.d.ts | 24 + .../tsc/parserES5ComputedPropertyName2.d.ts | 20 + .../tsc/parserES5ComputedPropertyName5.d.ts | 14 + .../tsc/parserES5ComputedPropertyName8.d.ts | 11 + .../tsc/parserES5SymbolProperty1.d.ts | 14 + .../tsc/parserES5SymbolProperty2.d.ts | 14 + .../tsc/parserES5SymbolProperty8.d.ts | 13 + .../tsc/parserES5SymbolProperty9.d.ts | 13 + .../original/tsc/parserIndexSignature11.d.ts | 18 + .../original/tsc/parserIndexSignature5.d.ts | 14 + .../original/tsc/parserStrictMode8.d.ts | 12 + .../original/tsc/propertyAssignment.d.ts | 39 + .../tsc/reExportAliasMakesInstantiated.d.ts | 43 + .../original/tsc/symbolDeclarationEmit12.d.ts | 52 + .../original/tsc/symbolProperty52.d.ts | 32 + .../original/tsc/symbolProperty53.d.ts | 28 + .../original/tsc/symbolProperty54.d.ts | 24 + .../original/tsc/symbolProperty58.d.ts | 35 + .../original/tsc/symbolProperty59.d.ts | 14 + .../original/tsc/templateLiteralTypes4.d.ts | 783 +++++++ .../tsc/templateLiteralsSourceMap.d.ts | 12 + .../tsc/typeUsedAsTypeLiteralIndex.d.ts | 83 + .../verbatimModuleSyntaxConstEnumUsage.d.ts | 60 + 182 files changed, 15721 insertions(+), 9 deletions(-) create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/complicatedPrivacy.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/enumBasics3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/enumErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/giant.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/intTypeCheck.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es5).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/mergedDeclarations2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/propertyAssignment.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/reExportAliasMakesInstantiated.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/templateLiteralTypes4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/templateLiteralsSourceMap.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/verbatimModuleSyntaxConstEnumUsage.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/constEnum2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/constEnums.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/enumBasics2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/enumBasics3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/enumErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/enumExportMergingES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es5).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/mergedDeclarations2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/mergedEnumDeclarationCodeGen.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName13.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName14.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName15.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName18.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName19.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName20.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName21.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName37.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName8.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty9.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature11.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/propertyAssignment.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/reExportAliasMakesInstantiated.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/symbolDeclarationEmit12.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/symbolProperty52.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/symbolProperty53.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/symbolProperty54.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/symbolProperty58.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/symbolProperty59.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/templateLiteralTypes4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/templateLiteralsSourceMap.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/verbatimModuleSyntaxConstEnumUsage.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/constEnum2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/constEnums.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/enumBasics2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/enumBasics3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/enumErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/enumExportMergingES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es5).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/mergedDeclarations2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/mergedEnumDeclarationCodeGen.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parseBigInt.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName13.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName14.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName15.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName18.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName19.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName20.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName21.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName8.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty9.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature11.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserStrictMode8.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/propertyAssignment.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/reExportAliasMakesInstantiated.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/symbolDeclarationEmit12.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty59.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralTypes4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralsSourceMap.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 384c2bb7f2712..68d9a98608578 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -7274,7 +7274,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { anyType : getNonMissingTypeOfSymbol(propertySymbol); const saveEnclosingDeclaration = context.enclosingDeclaration; context.enclosingDeclaration = undefined; - const decl = propertySymbol.declarations && first(propertySymbol.declarations); + const decl = propertySymbol.declarations && firstOrUndefined(propertySymbol.declarations); function hasAccessibleLateBindableName(decl: Declaration, enclosingDeclaration: Node | undefined) { const name = getNameOfDeclaration(decl); diff --git a/src/compiler/transformers/declarations/transform-project.ts b/src/compiler/transformers/declarations/transform-project.ts index f27fd2ccce7b4..17217e232ddfc 100644 --- a/src/compiler/transformers/declarations/transform-project.ts +++ b/src/compiler/transformers/declarations/transform-project.ts @@ -40,7 +40,7 @@ function joinToRootIfNeeded(rootDir: string, existingPath: string) { return normalizePath(pathIsAbsolute(existingPath) ? existingPath : combinePaths(rootDir, existingPath)); } -function createIsolatedDeclarationsEmitter(rootDir: string, options: CompilerOptions) { +export function createIsolatedDeclarationsEmitter(rootDir: string, options: CompilerOptions) { const declarationDir = options.declarationDir ? joinToRootIfNeeded(rootDir, options.declarationDir) : options.outDir ? joinToRootIfNeeded(rootDir, options.outDir) : undefined; diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index 5bc88230ffd36..1126beb2c1141 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -616,15 +616,18 @@ export namespace Compiler { const host = new fakes.CompilerHost(tscHost.vfs, options, /*setParentNodes*/ true); const getCanonicalFileName = (f: string) => host.getCanonicalFileName(f); - const commonSourceDirectory = ts.getCommonSourceDirectory( + let commonSourceDirectory = ts.getCommonSourceDirectory( options, () => programFileNames.filter(f => !vpath.isDeclaration(f)), currentDirectory, getCanonicalFileName, ); + if (commonSourceDirectory.length === 0) { + commonSourceDirectory = currentDirectory; + } const diagnostics: ts.Diagnostic[] = []; - const transformer = ts.createIsolatedDeclarationsEmitter(commonSourceDirectory ?? currentDirectory, options); + const transformer = ts.createIsolatedDeclarationsEmitter(commonSourceDirectory, options); programFileNames.forEach(fileName => { if (vpath.isDeclaration(fileName)) { return; @@ -1040,6 +1043,7 @@ export namespace Compiler { let dtsCode = "/// [Declarations] ////\r\n\r\n"; dtsCode += declarationContent(declarationFiles); if (errors.length > 0) { + dtsCode += "/// [Errors] ////\r\n\r\n"; dtsCode += getErrorBaseline(tsSources, errors, prettyErrors); } // eslint-disable-next-line no-null/no-null diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 7851d2994045c..23562c4e783a6 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -390,7 +390,7 @@ function removeOutFromOptions(tsConfig: ts.ParsedCommandLine | undefined) { const clone: ts.ParsedCommandLine = { ...tsConfig, - options: tsConfig.options, + options: ts.cloneCompilerOptions(tsConfig.options), }; delete clone.options.outFile; delete clone.options.out; @@ -398,9 +398,11 @@ function removeOutFromOptions(tsConfig: ts.ParsedCommandLine | undefined) { } export class IsolatedDeclarationTest extends CompilerTestBase { private dteDiagnostics: ts.Diagnostic[]; + tscNonIsolatedDeclarationsErrors: ts.Diagnostic[]; private isOutputEquivalent: boolean; private dteDtsFile: Compiler.TestFile[]; private tscDtsFiles: Compiler.TestFile[]; + tscIsolatedDeclarationsErrors: ts.Diagnostic[]; constructor(fileName: string, testCaseContent: TestCaseParser.TestCaseContent, configurationOverrides?: TestCaseParser.CompilerSettings) { super( fileName, @@ -412,8 +414,6 @@ export class IsolatedDeclarationTest extends CompilerTestBase { configurationOverrides, // /*forceIncludeAllFiles*/ true, ); - const options = { ...this.options }; - ts.setConfigFileInOptions(options, options && options.configFile); const currentDirectory = this.harnessSettings.currentDirectory ?? vfs.srcFolder; const dteResult = Compiler.compileDeclarationFilesWithIsolatedEmitter( @@ -436,7 +436,10 @@ export class IsolatedDeclarationTest extends CompilerTestBase { unitName: this.result.host.vfs.realpathSync(f.file), content: f.text, })]; + this.tscDtsFiles.sort((a, b) => this.result.host.vfs.stringComparer(a.unitName, b.unitName)); + this.tscNonIsolatedDeclarationsErrors = this.result.diagnostics.filter(d => !IsolatedDeclarationTest.dteDiagnosticErrors.has(d.code)); + this.tscIsolatedDeclarationsErrors = this.result.diagnostics.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.dteDtsFile.length === this.tscDtsFiles.length && this.dteDtsFile @@ -472,7 +475,7 @@ export class IsolatedDeclarationTest extends CompilerTestBase { "isolated-declarations/original/tsc", this.fileName, this.tscDtsFiles, - this.result.diagnostics.filter(p => IsolatedDeclarationTest.dteDiagnosticErrors.has(p.code)), + this.tscIsolatedDeclarationsErrors, this.toBeCompiled, this.otherFiles, this.options.pretty, diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index bb6c36fe3516e..c762541ed80ab 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -9830,7 +9830,14 @@ declare namespace ts { */ function visitEachChild(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; function emitDeclarationsForProject(projectPath: string, files: string[] | undefined, options: CompilerOptions, host: CompilerHost): string; - function emitDeclarationsForFile(sourceFile: SourceFile, allProjectFiles: string[], tsLibFiles: string[], options: CompilerOptions): { + function createIsolatedDeclarationsEmitter(rootDir: string, options: CompilerOptions): (file: string, host: CompilerHost) => { + output?: undefined; + diagnostics?: undefined; + } | { + output: string; + diagnostics: Diagnostic[]; + }; + function emitDeclarationsForFile(sourceFile: SourceFile, options: CompilerOptions): { code: string; diagnostics: Diagnostic[]; }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts new file mode 100644 index 0000000000000..c3da55b80d136 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts @@ -0,0 +1,16 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/Symbols/ES5SymbolProperty1.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -4,7 +4,5 @@ + interface SymbolConstructor { + foo: string; + } + declare var Symbol: SymbolConstructor; +-declare var obj: { +- [Symbol.foo]: number; +-}; ++declare var obj: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts new file mode 100644 index 0000000000000..c98d5c9391369 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts @@ -0,0 +1,16 @@ +// [[Reason: ]] //// + +//// [tests/cases/compiler/bigintIndex.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -14,7 +14,5 @@ + declare const a: {}; + declare const b: { + [1n]: number; + }; +-declare const c: { +- [bigNum]: number; +-}; ++declare const c: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/complicatedPrivacy.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/complicatedPrivacy.d.ts new file mode 100644 index 0000000000000..ca82cdaf68769 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/complicatedPrivacy.d.ts @@ -0,0 +1,20 @@ +// [[Reason: ]] //// + +//// [tests/cases/compiler/complicatedPrivacy.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -17,11 +17,9 @@ + }): invalid; + export function f3(): { + (a: number): C1; + }; +- export function f4(arg1: { +- [number]: C1; +- }): invalid; ++ export function f4(arg1: {}): invalid; + export function f5(arg2: { + new (arg1: C1): C1; + }): invalid; + namespace m3 { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts new file mode 100644 index 0000000000000..6b3925d7bc85c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts @@ -0,0 +1,34 @@ +// [[Reason: ]] //// + +//// [tests/cases/compiler/computedPropertiesNarrowed.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,11 +1,8 @@ + + + //// [/.src/computedPropertiesNarrowed.d.ts] +-declare const x: 0 | 1; +-export declare let o: { +- [x]: number; +-}; ++export declare let o: invalid; + declare const y: 0; + export declare let o2: { + [y]: number; + }; +@@ -15,12 +12,9 @@ + export declare let o31: { + [-1]: number; + }; + export declare let o32: invalid; +-declare let u: invalid; +-export declare let o4: { +- [u]: number; +-}; ++export declare let o4: invalid; + export declare let o5: invalid; + declare const uu: unique symbol; + export declare let o6: { + [uu]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts new file mode 100644 index 0000000000000..b74158ecf4d03 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts @@ -0,0 +1,18 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES5.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -3,9 +3,5 @@ + //// [/.src/computedPropertyNames6_ES5.d.ts] + declare var p1: number | string; + declare var p2: number | number[]; + declare var p3: string | boolean; +-declare var v: { +- [p1]: number; +- [p2]: number; +- [p3]: number; +-}; ++declare var v: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts new file mode 100644 index 0000000000000..27712d55ec329 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts @@ -0,0 +1,18 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES6.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -3,9 +3,5 @@ + //// [/.src/computedPropertyNames6_ES6.d.ts] + declare var p1: number | string; + declare var p2: number | number[]; + declare var p3: string | boolean; +-declare var v: { +- [p1]: number; +- [p2]: number; +- [p3]: number; +-}; ++declare var v: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts new file mode 100644 index 0000000000000..20d9263602317 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts @@ -0,0 +1,14 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -5,5 +5,6 @@ + declare var accessorName: string; + declare class C { + [methodName](v: string): invalid; + [methodName](): invalid; ++ [methodName](v?: string): invalid; + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts new file mode 100644 index 0000000000000..27941c8725b8b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts @@ -0,0 +1,14 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -5,5 +5,6 @@ + declare var accessorName: string; + declare class C { + [methodName](v: string): invalid; + [methodName](): invalid; ++ [methodName](v?: string): invalid; + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts new file mode 100644 index 0000000000000..e5acad6cd674f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts @@ -0,0 +1,15 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/constEnums/constEnum2.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -5,6 +5,6 @@ + declare const enum D { + d = 10, + e, + f, +- g ++ g = 0 + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts new file mode 100644 index 0000000000000..63fbce67c446b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts @@ -0,0 +1,18 @@ +// [[Reason: ]] //// + +//// [tests/cases/compiler/constEnumErrors.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -6,9 +6,9 @@ + } + declare namespace E { + } + declare const enum E1 { +- X, ++ X = 0, + Y, + Y1 + } + declare const enum E2 { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts new file mode 100644 index 0000000000000..1c805cef8de52 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts @@ -0,0 +1,45 @@ +// [[Reason: ]] //// + +//// [tests/cases/compiler/constEnums.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -28,11 +28,11 @@ + T = 11, + U = 11, + V = 11, + W = 11, +- W1, +- W2, +- W3, ++ W1 = 100, ++ W2 = 100, ++ W3 = 100, + W4 = 11, + W5 = 11 + } + declare const enum Comments { +@@ -48,19 +48,19 @@ + namespace B { + namespace C { + const enum E { + V1 = 1, +- V2 ++ V2 = 101 + } + } + } + } + declare namespace A { + namespace B { + namespace C { + const enum E { +- V3, +- V4 ++ V3 = 64, ++ V4 = 2 + } + } + } + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts new file mode 100644 index 0000000000000..63a3be33889da --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts @@ -0,0 +1,17 @@ +// [[Reason: ]] //// + +//// [tests/cases/compiler/enumBasics2.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -9,8 +9,8 @@ + z + } + declare enum Bar { + a,// ok +- b,// ok ++ b = 2,// ok + c,// ok + d + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumBasics3.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/enumBasics3.d.ts new file mode 100644 index 0000000000000..6533e4e2005d4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/enumBasics3.d.ts @@ -0,0 +1,18 @@ +// [[Reason: ]] //// + +//// [tests/cases/compiler/enumBasics3.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -11,9 +11,9 @@ + } + declare namespace M { + namespace N { + enum E2 { +- b, ++ b = 1, + c + } + } + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts new file mode 100644 index 0000000000000..426a85bda3b05 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts @@ -0,0 +1,31 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/enums/enumConstantMembers.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -22,17 +22,17 @@ + a = Infinity, + b = Infinity, + c = Infinity, + d = NaN, +- e, +- f, +- g ++ e = NaN, ++ f = Infinity, ++ g = -Infinity + } + declare const enum E6 { + a = Infinity, + b = Infinity, + c = Infinity, + d = NaN, +- e, +- f, +- g ++ e = NaN, ++ f = Infinity, ++ g = -Infinity + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/enumErrors.d.ts new file mode 100644 index 0000000000000..fbe6aefe5e7c8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/enumErrors.d.ts @@ -0,0 +1,20 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/enums/enumErrors.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -16,10 +16,10 @@ + A = 0, + B = 0 + } + declare enum E10 { +- A, +- B ++ A = 0, ++ B = 0 + } + declare enum E11 { + A, + B, diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts new file mode 100644 index 0000000000000..c325d9cfcf389 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts @@ -0,0 +1,15 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/enums/enumExportMergingES6.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -7,6 +7,6 @@ + export declare enum Animals { + Dog = 2 + } + export declare enum Animals { +- CatDog ++ CatDog = 3 + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts new file mode 100644 index 0000000000000..42cf8c4bca023 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts @@ -0,0 +1,24 @@ +// [[Reason: ]] //// + +//// [tests/cases/compiler/forwardRefInEnum.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,12 +1,12 @@ + + + //// [/.src/forwardRefInEnum.d.ts] + declare enum E1 { +- X, +- X1, +- Y, +- Y1 ++ X = 0, ++ X1 = 0, ++ Y = 0, ++ Y1 = 0 + } + declare enum E1 { + Z = 4 + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/giant.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/giant.d.ts new file mode 100644 index 0000000000000..dcde739e40f07 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/giant.d.ts @@ -0,0 +1,47 @@ +// [[Reason: ]] //// + +//// [tests/cases/compiler/giant.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -39,9 +39,8 @@ + 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; +@@ -92,9 +91,8 @@ + 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; +@@ -208,9 +206,8 @@ + 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; +@@ -268,9 +265,8 @@ + 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/indexSignatureMustHaveTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts new file mode 100644 index 0000000000000..dcf6af651ba61 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts @@ -0,0 +1,17 @@ +// [[Reason: ]] //// + +//// [tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,9 +1,8 @@ + + + //// [/.src/indexSignatureMustHaveTypeAnnotation.d.ts] + interface I { +- [x]: string; + [x: string]: any; + } + declare class C { + [x]: string; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/intTypeCheck.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/intTypeCheck.d.ts new file mode 100644 index 0000000000000..6b227bac21bdc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/intTypeCheck.d.ts @@ -0,0 +1,27 @@ +// [[Reason: ]] //// + +//// [tests/cases/compiler/intTypeCheck.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -30,9 +30,8 @@ + new (p4: string, p5?: string): any; + new (p6: string, ...p7: any[]): any; + } + interface i4 { +- [p]: any; + [p1: string]: any; + [p2: string, p3: number]: any; + } + interface i5 extends i1 { +@@ -63,9 +62,8 @@ + 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/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts b/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts new file mode 100644 index 0000000000000..f98ed569d4bc4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts @@ -0,0 +1,18 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -4,9 +4,9 @@ + declare function tag(str: any, ...args: any[]): any; + declare const a: invalid; + declare const b: invalid; + declare const x: invalid; +-declare const y = `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; ++declare const y = "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld"; + declare const z: invalid; + declare const a1: invalid; + declare const a2: invalid; + declare const a3: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es5).d.ts b/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es5).d.ts new file mode 100644 index 0000000000000..f98ed569d4bc4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es5).d.ts @@ -0,0 +1,18 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -4,9 +4,9 @@ + declare function tag(str: any, ...args: any[]): any; + declare const a: invalid; + declare const b: invalid; + declare const x: invalid; +-declare const y = `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; ++declare const y = "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld"; + declare const z: invalid; + declare const a1: invalid; + declare const a2: invalid; + declare const a3: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts b/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts new file mode 100644 index 0000000000000..f98ed569d4bc4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts @@ -0,0 +1,18 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -4,9 +4,9 @@ + declare function tag(str: any, ...args: any[]): any; + declare const a: invalid; + declare const b: invalid; + declare const x: invalid; +-declare const y = `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; ++declare const y = "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld"; + declare const z: invalid; + declare const a1: invalid; + declare const a2: invalid; + declare const a3: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts new file mode 100644 index 0000000000000..8d670df92a63c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts @@ -0,0 +1,28 @@ +// [[Reason: ]] //// + +//// [tests/cases/compiler/isolatedModulesGlobalNamespacesAndEnums.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -12,15 +12,15 @@ + declare const d = "d"; + + //// [/.src/enum2.d.ts] + declare enum Enum { +- D, +- E,// error +- Y,// error +- Z ++ D = "d", ++ E = 0,// error ++ Y = 1000000,// error ++ Z = 0 + } + declare enum Enum { +- F ++ F = 0 + } + + //// [/.src/module-namespaces.d.ts] + export declare namespace Instantiated { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/mergedDeclarations2.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/mergedDeclarations2.d.ts new file mode 100644 index 0000000000000..946fa374876a9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/mergedDeclarations2.d.ts @@ -0,0 +1,18 @@ +// [[Reason: ]] //// + +//// [tests/cases/compiler/mergedDeclarations2.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -4,9 +4,9 @@ + declare enum Foo { + b = 0 + } + declare enum Foo { +- a ++ a = 0 + } + declare namespace Foo { + var x: invalid; + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts new file mode 100644 index 0000000000000..b68bfa797fe28 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts @@ -0,0 +1,15 @@ +// [[Reason: ]] //// + +//// [tests/cases/compiler/mergedEnumDeclarationCodeGen.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -5,6 +5,6 @@ + a = 0, + b = 0 + } + declare enum E { +- c ++ c = 0 + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts new file mode 100644 index 0000000000000..827315ed74279 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts @@ -0,0 +1,28 @@ +// [[Reason: ]] //// + +//// [tests/cases/compiler/overloadsWithComputedNames.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -19,18 +19,19 @@ + [uniqueSym2](): void; + [uniqueSym](): void; + } + interface I1 { +- [sym](): void; + [uniqueSym2](): void; + [uniqueSym](): void; + [uniqueSym](): void; + } + declare class C2 { + [strUnion](): void; ++ [strUnion](): invalid; + } + declare class I2 { + [strUnion](): void; ++ [strUnion](): invalid; + } + declare class C3 { + [1](): void; + [2](): void; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts new file mode 100644 index 0000000000000..e50856872e8aa --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts @@ -0,0 +1,43 @@ +// [[Reason: ]] //// + +//// [tests/cases/compiler/parseBigInt.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,19 +1,19 @@ + + + //// [/.src/parseBigInt.d.ts] +-declare const bin = 0b101, binBig = 5n; +-declare const oct = 0o567, octBig = 375n; +-declare const hex = 0xC0B, hexBig = 0xc0bn; ++declare const bin = 5, binBig = 5n; ++declare const oct = 375, octBig = 375n; ++declare const hex = 3083, hexBig = 3083n; + declare const dec = 123, decBig = 123n; + declare const largeBin = 384307168202282325n; + declare const largeOct = 1505852261029722487n; + declare const largeDec = 12345678091234567890n; +-declare const largeHex = 0x1234567890abcdefn; ++declare const largeHex = 1311768467294899695n; + declare const separatedBin = 21n; + declare const separatedOct = 342391n; + declare const separatedDec = 123456789n; +-declare const separatedHex = 0x0abcdefn; ++declare const separatedHex = 11259375n; + declare const zero = 0n; + declare const oneBit = 1n; + declare const twoBit = 3n; + declare const threeBit = 7n; +@@ -39,9 +39,9 @@ + declare const unaryPlus: number; + declare const unaryPlusHex: number; + declare const emptyBinary = 0n; + declare const emptyOct = 0n; +-declare const emptyHex = 0x0n; ++declare const emptyHex = 0n; + declare const leadingSeparator: invalid; + declare const trailingSeparator = 123n; + declare const doubleSeparator = 123456789n; + declare const oneTwoOrThree: (x: 1n | 2n | 3n) => bigint; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts new file mode 100644 index 0000000000000..ea46fee0fc8e5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts @@ -0,0 +1,15 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,6 +1,4 @@ + + + //// [/.src/parserComputedPropertyName13.d.ts] +-declare var v: { +- [e]: number; +-}; ++declare var v: {}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts new file mode 100644 index 0000000000000..22b10265a5197 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts @@ -0,0 +1,15 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,6 +1,4 @@ + + + //// [/.src/parserComputedPropertyName14.d.ts] +-declare var v: { +- [e](): number; +-}; ++declare var v: {}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts new file mode 100644 index 0000000000000..4e5258582105f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts @@ -0,0 +1,14 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -2,6 +2,5 @@ + + //// [/.src/parserComputedPropertyName15.d.ts] + declare var v: { + [e: number]: string; +- [e]: number; + }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts new file mode 100644 index 0000000000000..ff8c47c55b77a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts @@ -0,0 +1,15 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,6 +1,4 @@ + + + //// [/.src/parserComputedPropertyName18.d.ts] +-declare var v: { +- [e]?(): number; +-}; ++declare var v: {}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts new file mode 100644 index 0000000000000..1f4119acf7a72 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts @@ -0,0 +1,15 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,6 +1,4 @@ + + + //// [/.src/parserComputedPropertyName19.d.ts] +-declare var v: { +- [e]?: any; +-}; ++declare var v: {}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts new file mode 100644 index 0000000000000..8f07b4f906a01 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts @@ -0,0 +1,15 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,6 +1,4 @@ + + + //// [/.src/parserComputedPropertyName2.d.ts] +-declare var v: { +- [e]: number; +-}; ++declare var v: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts new file mode 100644 index 0000000000000..a2a53dbb51d35 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts @@ -0,0 +1,14 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,6 +1,5 @@ + + + //// [/.src/parserComputedPropertyName20.d.ts] + interface I { +- [e](): number; + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts new file mode 100644 index 0000000000000..e33cb2650c88c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts @@ -0,0 +1,14 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,6 +1,5 @@ + + + //// [/.src/parserComputedPropertyName21.d.ts] + interface I { +- [e]: number; + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts new file mode 100644 index 0000000000000..e3da54139c11c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts @@ -0,0 +1,15 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,6 +1,4 @@ + + + //// [/.src/parserComputedPropertyName37.d.ts] +-declare var v: { +- [public]: number; +-}; ++declare var v: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts new file mode 100644 index 0000000000000..d7ab24a969428 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts @@ -0,0 +1,15 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,6 +1,4 @@ + + + //// [/.src/parserES5ComputedPropertyName2.d.ts] +-declare var v: { +- [e]: number; +-}; ++declare var v: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts new file mode 100644 index 0000000000000..e641620f49de9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts @@ -0,0 +1,14 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,6 +1,5 @@ + + + //// [/.src/parserES5ComputedPropertyName5.d.ts] + interface I { +- [e]: number; + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts new file mode 100644 index 0000000000000..02990efdb6f3c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts @@ -0,0 +1,15 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,6 +1,4 @@ + + + //// [/.src/parserES5ComputedPropertyName8.d.ts] +-declare var v: { +- [e]: number; +-}; ++declare var v: {}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts new file mode 100644 index 0000000000000..67c3f328b6005 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts @@ -0,0 +1,14 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty1.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,6 +1,5 @@ + + + //// [/.src/parserES5SymbolProperty1.d.ts] + interface I { +- [Symbol.iterator]: string; + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts new file mode 100644 index 0000000000000..04184a604250f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts @@ -0,0 +1,14 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty2.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,6 +1,5 @@ + + + //// [/.src/parserES5SymbolProperty2.d.ts] + interface I { +- [Symbol.unscopables](): string; + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts new file mode 100644 index 0000000000000..01844a02d66e5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts @@ -0,0 +1,15 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,6 +1,4 @@ + + + //// [/.src/parserES5SymbolProperty8.d.ts] +-declare var x: { +- [Symbol.toPrimitive](): string; +-}; ++declare var x: {}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts new file mode 100644 index 0000000000000..3e80b65417aa3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts @@ -0,0 +1,15 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty9.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,6 +1,4 @@ + + + //// [/.src/parserES5SymbolProperty9.d.ts] +-declare var x: { +- [Symbol.toPrimitive]: string; +-}; ++declare var x: {}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts new file mode 100644 index 0000000000000..941063a96caff --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts @@ -0,0 +1,16 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,8 +1,7 @@ + + + //// [/.src/parserIndexSignature11.d.ts] + interface I { +- [p]: any; + [p1: string]: any; + [p2: string, p3: number]: any; + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts new file mode 100644 index 0000000000000..edc582b90afe9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts @@ -0,0 +1,14 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,6 +1,5 @@ + + + //// [/.src/parserIndexSignature5.d.ts] + interface I { +- [a]: any; + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts new file mode 100644 index 0000000000000..3332b4f5c4c01 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts @@ -0,0 +1,12 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,4 +1,3 @@ + + + //// [/.src/parserStrictMode8.d.ts] +-declare function eval(): invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/propertyAssignment.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/propertyAssignment.d.ts new file mode 100644 index 0000000000000..553324d649d15 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/propertyAssignment.d.ts @@ -0,0 +1,20 @@ +// [[Reason: ]] //// + +//// [tests/cases/compiler/propertyAssignment.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -6,11 +6,9 @@ + }; + declare var bar1: { + x: number; + }; +-declare var foo2: { +- [index]: any; +-}; ++declare var foo2: {}; + declare var bar2: { + x: number; + }; + declare var foo3: { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/reExportAliasMakesInstantiated.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/reExportAliasMakesInstantiated.d.ts new file mode 100644 index 0000000000000..525e97b72f085 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/reExportAliasMakesInstantiated.d.ts @@ -0,0 +1,17 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/internalModules/moduleDeclarations/reExportAliasMakesInstantiated.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -9,5 +9,9 @@ + import test1 = pack1.test1; + export { test1 }; + } + export import test1 = pack2.test1; ++declare namespace mod1 { ++ type test1 = string; ++ export { test1 }; ++} + export {}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts new file mode 100644 index 0000000000000..eedb001736f5d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts @@ -0,0 +1,17 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -5,9 +5,8 @@ + 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); + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts new file mode 100644 index 0000000000000..428fc2e5b7c8e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts @@ -0,0 +1,15 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/es6/Symbols/symbolProperty52.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,6 +1,4 @@ + + + //// [/.src/symbolProperty52.d.ts] +-declare var obj: { +- [Symbol.nonsense]: number; +-}; ++declare var obj: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts new file mode 100644 index 0000000000000..89d7fe53ba6b5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts @@ -0,0 +1,15 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/es6/Symbols/symbolProperty53.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,6 +1,4 @@ + + + //// [/.src/symbolProperty53.d.ts] +-declare var obj: { +- [Symbol.for]: number; +-}; ++declare var obj: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts new file mode 100644 index 0000000000000..ff5f0cc032c8b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts @@ -0,0 +1,15 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/es6/Symbols/symbolProperty54.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,6 +1,4 @@ + + + //// [/.src/symbolProperty54.d.ts] +-declare var obj: { +- [Symbol.prototype]: number; +-}; ++declare var obj: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts new file mode 100644 index 0000000000000..319c62c397f1a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts @@ -0,0 +1,16 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/es6/Symbols/symbolProperty58.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -3,7 +3,5 @@ + //// [/.src/symbolProperty58.d.ts] + interface SymbolConstructor { + foo: string; + } +-declare var obj: { +- [Symbol.foo]: number; +-}; ++declare var obj: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts new file mode 100644 index 0000000000000..e9e8ddc0b65d7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts @@ -0,0 +1,14 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/es6/Symbols/symbolProperty59.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,6 +1,5 @@ + + + //// [/.src/symbolProperty59.d.ts] + interface I { +- [Symbol.keyFor]: string; + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralTypes4.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralTypes4.d.ts new file mode 100644 index 0000000000000..f32eca5207838 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralTypes4.d.ts @@ -0,0 +1,20 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/types/literal/templateLiteralTypes4.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -38,10 +38,10 @@ + One = 1 + } + type TNumberLiteralEnum0 = "0" extends `${infer T extends NumberLiteralEnum}` ? T : never; + declare const enum NonLiteralEnum { +- Zero, +- One ++ 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; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralsSourceMap.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralsSourceMap.d.ts new file mode 100644 index 0000000000000..d5387e3d9058f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralsSourceMap.d.ts @@ -0,0 +1,13 @@ +// [[Reason: ]] //// + +//// [tests/cases/compiler/templateLiteralsSourceMap.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,4 +1,4 @@ + + + //// [/.src/templateLiteralsSourceMap.d.ts] +-declare const s = `a${0}b${1}c${2}`; ++declare const s = "a0b1c2"; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts new file mode 100644 index 0000000000000..a64af8e922f8a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts @@ -0,0 +1,35 @@ +// [[Reason: ]] //// + +//// [tests/cases/compiler/typeUsedAsTypeLiteralIndex.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,24 +1,17 @@ + + + //// [/.src/typeUsedAsTypeLiteralIndex.d.ts] + type K = number | string; +-type T = { +- [K]: number; +-}; ++type T = {}; + declare const K1: invalid; + type T1 = { + [K1]: number; + }; + type K2 = "x" | "y"; +-type T2 = { +- [K2]: number; +-}; ++type T2 = {}; + type K3 = number | string; +-type T3 = { +- [K3]: number; +-}; ++type T3 = {}; + type K4 = number | string; + type T4 = { +- [K4]: number; + k4: string; + }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/verbatimModuleSyntaxConstEnumUsage.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/verbatimModuleSyntaxConstEnumUsage.d.ts new file mode 100644 index 0000000000000..4f39049bd750c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/verbatimModuleSyntaxConstEnumUsage.d.ts @@ -0,0 +1,20 @@ +// [[Reason: ]] //// + +//// [tests/cases/conformance/externalModules/verbatimModuleSyntaxConstEnumUsage.ts] //// + +=================================================================== +--- DTE DTE output ++++ TSC TSC output +@@ -1,10 +1,10 @@ + + + //// [/.src/bar.d.ts] + export declare enum Bar { +- a, +- c, ++ a = 1, ++ c = 3, + e = 5 + } + + //// [/.src/foo.d.ts] diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty1.d.ts new file mode 100644 index 0000000000000..20dddbce71f8e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty1.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty1.ts] //// + +//// [ES5SymbolProperty1.ts] +interface SymbolConstructor { + foo: string; +} +var Symbol: SymbolConstructor; + +var obj = { + [Symbol.foo]: 0 +} + +obj[Symbol.foo]; + +/// [Declarations] //// + + + +//// [/.src/ES5SymbolProperty1.d.ts] +interface SymbolConstructor { + foo: string; +} +declare var Symbol: SymbolConstructor; +declare var obj: { + [Symbol.foo]: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts new file mode 100644 index 0000000000000..067ac4e11f5cb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts @@ -0,0 +1,94 @@ +//// [tests/cases/compiler/bigintIndex.ts] //// + +//// [a.ts] +interface BigIntIndex { + [index: bigint]: E; // should error +} + +const arr: number[] = [1, 2, 3]; +let num: number = arr[1]; +num = arr["1"]; +num = arr[1n]; // should error + +let key: keyof any; // should be type "string | number | symbol" +key = 123; +key = "abc"; +key = Symbol(); +key = 123n; // should error + +// Show correct usage of bigint index: explicitly convert to string +const bigNum: bigint = 0n; +const typedArray = new Uint8Array(3); +typedArray[bigNum] = 0xAA; // should error +typedArray[String(bigNum)] = 0xAA; +typedArray["1"] = 0xBB; +typedArray[2] = 0xCC; + +// {1n: 123} is a syntax error; must go in separate file so BigIntIndex error is shown +//// [b.ts] +// BigInt cannot be used as an object literal property +const a = {1n: 123}; +const b = {[1n]: 456}; +const c = {[bigNum]: 789}; + + +/// [Declarations] //// + + + +//// [/.src/a.d.ts] +interface BigIntIndex { + [index: bigint]: E; +} +declare const arr: number[]; +declare let num: number; +declare let key: keyof any; +declare const bigNum: bigint; +declare const typedArray: invalid; + +//// [/.src/b.d.ts] +declare const a: {}; +declare const b: { + [1n]: number; +}; +declare const c: { + [bigNum]: number; +}; +/// [Errors] //// + +a.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== a.ts (1 errors) ==== + interface BigIntIndex { + [index: bigint]: E; // should error + } + + const arr: number[] = [1, 2, 3]; + let num: number = arr[1]; + num = arr["1"]; + num = arr[1n]; // should error + + let key: keyof any; // should be type "string | number | symbol" + key = 123; + key = "abc"; + key = Symbol(); + key = 123n; // should error + + // Show correct usage of bigint index: explicitly convert to string + const bigNum: bigint = 0n; + const typedArray = new Uint8Array(3); + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + typedArray[bigNum] = 0xAA; // should error + typedArray[String(bigNum)] = 0xAA; + typedArray["1"] = 0xBB; + typedArray[2] = 0xCC; + + // {1n: 123} is a syntax error; must go in separate file so BigIntIndex error is shown +==== b.ts (0 errors) ==== + // BigInt cannot be used as an object literal property + const a = {1n: 123}; + const b = {[1n]: 456}; + const c = {[bigNum]: 789}; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts new file mode 100644 index 0000000000000..592513c8597fb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts @@ -0,0 +1,299 @@ +//// [tests/cases/compiler/complicatedPrivacy.ts] //// + +//// [complicatedPrivacy.ts] +module m1 { + export module m2 { + + + export function f1(c1: C1) { + } + export function f2(c2: C2) { + } + + export class C2 implements m3.i3 { + public get p1(arg) { + return new C1(); + } + + public set p1(arg1: C1) { + } + + public f55() { + return "Hello world"; + } + } + } + + export function f2(arg1: { x?: C1, y: number }) { + } + + export function f3(): { + (a: number) : C1; + } { + return null; + } + + export function f4(arg1: + { + [number]: C1; // Used to be indexer, now it is a computed property + }) { + } + + + export function f5(arg2: { + new (arg1: C1) : C1 + }) { + } + module m3 { + function f2(f1: C1) { + } + + export interface i3 { + f55(): string; + } + } + + class C1 { + } + + interface i { + x: number; + } + + export class C5 implements i { + public x: number; + } + + export var v2: C1[]; +} + +class C2 { +} + +module m2 { + export module m3 { + + export class c_pr implements mglo5.i5, mglo5.i6 { + f1() { + return "Hello"; + } + } + + module m4 { + class C { + } + module m5 { + + export module m6 { + function f1() { + return new C(); + } + } + } + } + + } +} + +module mglo5 { + export interface i5 { + f1(): string; + } + + interface i6 { + f6(): number; + } +} + + +/// [Declarations] //// + + + +//// [/.src/complicatedPrivacy.d.ts] +declare namespace m1 { + export namespace m2 { + function f1(c1: C1): invalid; + function f2(c2: C2): invalid; + class C2 implements m3.i3 { + get p1(): invalid; + set p1(arg1: C1); + f55(): invalid; + } + } + export function f2(arg1: { + x?: C1; + y: number; + }): invalid; + export function f3(): { + (a: number): C1; + }; + export function f4(arg1: { + [number]: C1; + }): invalid; + export function f5(arg2: { + new (arg1: C1): C1; + }): invalid; + namespace m3 { + interface i3 { + f55(): string; + } + } + class C1 { + } + interface i { + x: number; + } + export class C5 implements i { + x: number; + } + export var v2: C1[]; + export {}; +} +declare class C2 { +} +declare namespace m2 { + namespace m3 { + class c_pr implements mglo5.i5, mglo5.i6 { + f1(): invalid; + } + } +} +declare namespace mglo5 { + interface i5 { + f1(): string; + } +} +/// [Errors] //// + +complicatedPrivacy.ts(5,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(7,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(11,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(24,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(33,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(40,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== complicatedPrivacy.ts (8 errors) ==== + module m1 { + export module m2 { + + + export function f1(c1: C1) { + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + export function f2(c2: C2) { + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export class C2 implements m3.i3 { + public get p1(arg) { + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return new C1(); + } + + public set p1(arg1: C1) { + } + + public f55() { + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return "Hello world"; + } + } + } + + export function f2(arg1: { x?: C1, y: number }) { + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export function f3(): { + (a: number) : C1; + } { + return null; + } + + export function f4(arg1: + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + { + [number]: C1; // Used to be indexer, now it is a computed property + }) { + } + + + export function f5(arg2: { + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + new (arg1: C1) : C1 + }) { + } + module m3 { + function f2(f1: C1) { + } + + export interface i3 { + f55(): string; + } + } + + class C1 { + } + + interface i { + x: number; + } + + export class C5 implements i { + public x: number; + } + + export var v2: C1[]; + } + + class C2 { + } + + module m2 { + export module m3 { + + export class c_pr implements mglo5.i5, mglo5.i6 { + f1() { + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return "Hello"; + } + } + + module m4 { + class C { + } + module m5 { + + export module m6 { + function f1() { + return new C(); + } + } + } + } + + } + } + + module mglo5 { + export interface i5 { + f1(): string; + } + + interface i6 { + f6(): number; + } + } + \ 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..0010544716750 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts @@ -0,0 +1,160 @@ +//// [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] //// + + + +//// [/.src/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(20,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(47,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + let u = Symbol(); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export let o4 = { + [u]: 1 // Should error, nut a unique symbol + } + + export let o5 ={ + [Symbol()]: 1 // Should error + ~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + }; + + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES5.d.ts new file mode 100644 index 0000000000000..8b836aba0e325 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES5.d.ts @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES5.ts] //// + +//// [computedPropertyNames6_ES5.ts] +var p1: number | string; +var p2: number | number[]; +var p3: string | boolean; +var v = { + [p1]: 0, + [p2]: 1, + [p3]: 2 +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames6_ES5.d.ts] +declare var p1: number | string; +declare var p2: number | number[]; +declare var p3: string | boolean; +declare var v: { + [p1]: number; + [p2]: number; + [p3]: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES6.d.ts new file mode 100644 index 0000000000000..155f867985f59 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES6.d.ts @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES6.ts] //// + +//// [computedPropertyNames6_ES6.ts] +var p1: number | string; +var p2: number | number[]; +var p3: string | boolean; +var v = { + [p1]: 0, + [p2]: 1, + [p3]: 2 +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames6_ES6.d.ts] +declare var p1: number | string; +declare var p2: number | number[]; +declare var p3: string | boolean; +declare var v: { + [p1]: number; + [p2]: number; + [p3]: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts new file mode 100644 index 0000000000000..99446332b19f4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts] //// + +//// [computedPropertyNamesOnOverloads_ES5.ts] +var methodName = "method"; +var accessorName = "accessor"; +class C { + [methodName](v: string); + [methodName](); + [methodName](v?: string) { } +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNamesOnOverloads_ES5.d.ts] +declare var methodName: string; +declare var accessorName: string; +declare class C { + [methodName](v: string): invalid; + [methodName](): invalid; +} +/// [Errors] //// + +computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNamesOnOverloads_ES5.ts (2 errors) ==== + var methodName = "method"; + var accessorName = "accessor"; + class C { + [methodName](v: string); + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [methodName](); + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [methodName](v?: string) { } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts new file mode 100644 index 0000000000000..ebbfa6e096626 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts] //// + +//// [computedPropertyNamesOnOverloads_ES6.ts] +var methodName = "method"; +var accessorName = "accessor"; +class C { + [methodName](v: string); + [methodName](); + [methodName](v?: string) { } +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNamesOnOverloads_ES6.d.ts] +declare var methodName: string; +declare var accessorName: string; +declare class C { + [methodName](v: string): invalid; + [methodName](): invalid; +} +/// [Errors] //// + +computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNamesOnOverloads_ES6.ts (2 errors) ==== + var methodName = "method"; + var accessorName = "accessor"; + class C { + [methodName](v: string); + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [methodName](); + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [methodName](v?: string) { } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/constEnum2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/constEnum2.d.ts new file mode 100644 index 0000000000000..a23121133f301 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/constEnum2.d.ts @@ -0,0 +1,59 @@ +//// [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 = 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] //// + + + +//// [/.src/constEnum2.d.ts] +declare const CONST: invalid; +declare const enum D { + d = 10, + e, + f, + g +} +/// [Errors] //// + +constEnum2.ts(7,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnum2.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnum2.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnum2.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== constEnum2.ts (4 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 = 9000 % 2; + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const enum D { + d = 10, + e = 199 * Math.floor(Math.random() * 1000), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + f = d - (100 * Math.floor(Math.random() % 8)), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + g = CONST, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts new file mode 100644 index 0000000000000..1869a79df6e56 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts @@ -0,0 +1,177 @@ +//// [tests/cases/compiler/constEnumErrors.ts] //// + +//// [constEnumErrors.ts] +const enum E { + A +} + +module E { + var x = 1; +} + +const enum E1 { + // illegal case + // forward reference to the element of the same enum + X = Y, + // forward reference to the element of the same enum + Y = E1.Z, + Y1 = E1["Z"] +} + +const enum E2 { + A +} + +var y0 = E2[1] +var name = "A"; +var y1 = E2[name]; +var y2 = E2[`${name}`]; + +var x = E2; +var y = [E2]; + +function foo(t: any): void { +} + +foo(E2); + +const enum NaNOrInfinity { + A = 9007199254740992, + B = A * A, + C = B * B, + D = C * C, + E = D * D, + F = E * E, // overflow + G = 1 / 0, // overflow + H = 0 / 0 // NaN +} + +/// [Declarations] //// + + + +//// [/.src/constEnumErrors.d.ts] +declare const enum E { + A = 0 +} +declare namespace E { +} +declare const enum E1 { + X, + Y, + Y1 +} +declare const enum E2 { + A = 0 +} +declare var y0: invalid; +declare var name: string; +declare var y1: invalid; +declare var y2: invalid; +declare var x: invalid; +declare var y: invalid; +declare function foo(t: any): void; +declare const enum NaNOrInfinity { + A = 9007199254740992, + B = 8.112963841460668e+31, + C = 6.582018229284824e+63, + D = 4.332296397063773e+127, + E = 1.876879207201175e+255, + F = Infinity,// overflow + G = Infinity,// overflow + H = NaN +} +/// [Errors] //// + +constEnumErrors.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(22,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(24,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(25,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(27,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(28,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(39,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(41,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(43,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== constEnumErrors.ts (15 errors) ==== + const enum E { + A + } + + module E { + var x = 1; + } + + const enum E1 { + // illegal case + // forward reference to the element of the same enum + X = Y, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + // forward reference to the element of the same enum + Y = E1.Z, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Y1 = E1["Z"] + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + const enum E2 { + A + } + + var y0 = E2[1] + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var name = "A"; + var y1 = E2[name]; + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var y2 = E2[`${name}`]; + ~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + var x = E2; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var y = [E2]; + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + function foo(t: any): void { + } + + foo(E2); + + const enum NaNOrInfinity { + A = 9007199254740992, + B = A * A, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + C = B * B, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + D = C * C, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + E = D * D, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + F = E * E, // overflow + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + G = 1 / 0, // overflow + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + H = 0 / 0 // NaN + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/constEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/constEnums.d.ts new file mode 100644 index 0000000000000..7b096c146a202 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/constEnums.d.ts @@ -0,0 +1,557 @@ +//// [tests/cases/compiler/constEnums.ts] //// + +//// [constEnums.ts] +const enum Enum1 { + A0 = 100, +} + +const enum Enum1 { + // correct cases + A, + B, + C = 10, + D = A | B, + E = A | 1, + F = 1 | A, + G = (1 & 1), + H = ~(A | B), + I = A >>> 1, + J = 1 & A, + K = ~(1 | 5), + L = ~D, + M = E << B, + N = E << 1, + O = E >> B, + P = E >> 1, + PQ = E ** 2, + Q = -D, + R = C & 5, + S = 5 & C, + T = C | D, + U = C | 1, + V = 10 | D, + W = Enum1.V, + + // correct cases: reference to the enum member from different enum declaration + W1 = A0, + W2 = Enum1.A0, + W3 = Enum1["A0"], + W4 = Enum1["W"], + W5 = Enum1[`V`], +} + +const enum Comments { + "//", + "/*", + "*/", + "///", + "#", + "", +} + +module A { + export module B { + export module C { + export const enum E { + V1 = 1, + V2 = A.B.C.E.V1 | 100 + } + } + } +} + +module A { + export module B { + export module C { + export const enum E { + V3 = A.B.C.E["V2"] & 200, + V4 = A.B.C.E[`V1`] << 1, + } + } + } +} + +module A1 { + export module B { + export module C { + export const enum E { + V1 = 10, + V2 = 110, + } + } + } +} + +module A2 { + export module B { + export module C { + export const enum E { + V1 = 10, + V2 = 110, + } + } + // module C will be classified as value + export module C { + var x = 1 + } + } +} + +import I = A.B.C.E; +import I1 = A1.B; +import I2 = A2.B; + +function foo0(e: I): void { + if (e === I.V1) { + } + else if (e === I.V2) { + } +} + +function foo1(e: I1.C.E): void { + if (e === I1.C.E.V1) { + } + else if (e === I1.C.E.V2) { + } +} + +function foo2(e: I2.C.E): void { + if (e === I2.C.E.V1) { + } + else if (e === I2.C.E.V2) { + } +} + + +function foo(x: Enum1) { + switch (x) { + case Enum1.A: + case Enum1.B: + case Enum1.C: + case Enum1.D: + case Enum1.E: + case Enum1.F: + case Enum1.G: + case Enum1.H: + case Enum1.I: + case Enum1.J: + case Enum1.K: + case Enum1.L: + case Enum1.M: + case Enum1.N: + case Enum1.O: + case Enum1.P: + case Enum1.PQ: + case Enum1.Q: + case Enum1.R: + case Enum1.S: + case Enum1["T"]: + case Enum1[`U`]: + case Enum1.V: + case Enum1.W: + case Enum1.W1: + case Enum1.W2: + case Enum1.W3: + case Enum1.W4: + break; + } +} + +function bar(e: A.B.C.E): number { + switch (e) { + case A.B.C.E.V1: return 1; + case A.B.C.E.V2: return 1; + case A.B.C.E.V3: return 1; + } +} + +function baz(c: Comments) { + switch (c) { + case Comments["//"]: + case Comments["/*"]: + case Comments["*/"]: + case Comments["///"]: + case Comments["#"]: + case Comments[""]: + break; + } +} + + +/// [Declarations] //// + + + +//// [/.src/constEnums.d.ts] +declare const enum Enum1 { + A0 = 100 +} +declare const enum Enum1 { + A = 0, + B = 1, + C = 10, + D = 1, + E = 1, + F = 1, + G = 1, + H = -2, + I = 0, + J = 0, + K = -6, + L = -2, + M = 2, + N = 2, + O = 0, + P = 0, + PQ = 1, + Q = -1, + R = 0, + S = 0, + T = 11, + U = 11, + V = 11, + W = 11, + W1, + W2, + W3, + W4 = 11, + W5 = 11 +} +declare const enum Comments { + "//" = 0, + "/*" = 1, + "*/" = 2, + "///" = 3, + "#" = 4, + "" = 6 +} +declare namespace A { + namespace B { + namespace C { + const enum E { + V1 = 1, + V2 + } + } + } +} +declare namespace A { + namespace B { + namespace C { + const enum E { + V3, + V4 + } + } + } +} +declare namespace A1 { + namespace B { + namespace C { + const enum E { + V1 = 10, + V2 = 110 + } + } + } +} +declare namespace A2 { + namespace B { + namespace C { + const enum E { + V1 = 10, + V2 = 110 + } + } + namespace C { + } + } +} +import I = A.B.C.E; +import I1 = A1.B; +import I2 = A2.B; +declare function foo0(e: I): void; +declare function foo1(e: I1.C.E): void; +declare function foo2(e: I2.C.E): void; +declare function foo(x: Enum1): invalid; +declare function bar(e: A.B.C.E): number; +declare function baz(c: Comments): invalid; +/// [Errors] //// + +constEnums.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(16,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(17,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(18,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(19,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(23,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(24,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(55,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(65,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(66,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(124,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(166,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== constEnums.ts (31 errors) ==== + const enum Enum1 { + A0 = 100, + } + + const enum Enum1 { + // correct cases + A, + B, + C = 10, + D = A | B, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + E = A | 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + F = 1 | A, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + G = (1 & 1), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + H = ~(A | B), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + I = A >>> 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + J = 1 & A, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + K = ~(1 | 5), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + L = ~D, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + M = E << B, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + N = E << 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + O = E >> B, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + P = E >> 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + PQ = E ** 2, + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Q = -D, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + R = C & 5, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + S = 5 & C, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + T = C | D, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + U = C | 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + V = 10 | D, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + W = Enum1.V, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // correct cases: reference to the enum member from different enum declaration + W1 = A0, + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + W2 = Enum1.A0, + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + W3 = Enum1["A0"], + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + W4 = Enum1["W"], + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + W5 = Enum1[`V`], + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + const enum Comments { + "//", + "/*", + "*/", + "///", + "#", + "", + } + + module A { + export module B { + export module C { + export const enum E { + V1 = 1, + V2 = A.B.C.E.V1 | 100 + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + } + } + + module A { + export module B { + export module C { + export const enum E { + V3 = A.B.C.E["V2"] & 200, + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + V4 = A.B.C.E[`V1`] << 1, + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + } + } + + module A1 { + export module B { + export module C { + export const enum E { + V1 = 10, + V2 = 110, + } + } + } + } + + module A2 { + export module B { + export module C { + export const enum E { + V1 = 10, + V2 = 110, + } + } + // module C will be classified as value + export module C { + var x = 1 + } + } + } + + import I = A.B.C.E; + import I1 = A1.B; + import I2 = A2.B; + + function foo0(e: I): void { + if (e === I.V1) { + } + else if (e === I.V2) { + } + } + + function foo1(e: I1.C.E): void { + if (e === I1.C.E.V1) { + } + else if (e === I1.C.E.V2) { + } + } + + function foo2(e: I2.C.E): void { + if (e === I2.C.E.V1) { + } + else if (e === I2.C.E.V2) { + } + } + + + function foo(x: Enum1) { + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + switch (x) { + case Enum1.A: + case Enum1.B: + case Enum1.C: + case Enum1.D: + case Enum1.E: + case Enum1.F: + case Enum1.G: + case Enum1.H: + case Enum1.I: + case Enum1.J: + case Enum1.K: + case Enum1.L: + case Enum1.M: + case Enum1.N: + case Enum1.O: + case Enum1.P: + case Enum1.PQ: + case Enum1.Q: + case Enum1.R: + case Enum1.S: + case Enum1["T"]: + case Enum1[`U`]: + case Enum1.V: + case Enum1.W: + case Enum1.W1: + case Enum1.W2: + case Enum1.W3: + case Enum1.W4: + break; + } + } + + function bar(e: A.B.C.E): number { + switch (e) { + case A.B.C.E.V1: return 1; + case A.B.C.E.V2: return 1; + case A.B.C.E.V3: return 1; + } + } + + function baz(c: Comments) { + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + switch (c) { + case Comments["//"]: + case Comments["/*"]: + case Comments["*/"]: + case Comments["///"]: + case Comments["#"]: + case Comments[""]: + break; + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumBasics2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumBasics2.d.ts new file mode 100644 index 0000000000000..fe9de6decc5be --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/enumBasics2.d.ts @@ -0,0 +1,78 @@ +//// [tests/cases/compiler/enumBasics2.ts] //// + +//// [enumBasics2.ts] +enum Foo { + a = 2, + b = 3, + x = a.b, // should error + y = b.a, // should error + z = y.x * a.x, // should error +} + +enum Bar { + a = (1).valueOf(), // ok + b = Foo.a, // ok + c = Foo.a.valueOf(), // ok + d = Foo.a.a, // should error +} + + +/// [Declarations] //// + + + +//// [/.src/enumBasics2.d.ts] +declare enum Foo { + a = 2, + b = 3, + x,// should error + y,// should error + z +} +declare enum Bar { + a,// ok + b,// ok + c,// ok + d +} +/// [Errors] //// + +enumBasics2.ts(4,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(5,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(6,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(10,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(11,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(12,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(13,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== enumBasics2.ts (7 errors) ==== + enum Foo { + a = 2, + b = 3, + x = a.b, // should error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + y = b.a, // should error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + z = y.x * a.x, // should error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum Bar { + a = (1).valueOf(), // ok + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + b = Foo.a, // ok + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = Foo.a.valueOf(), // ok + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = Foo.a.a, // should error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumBasics3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumBasics3.d.ts new file mode 100644 index 0000000000000..4059193c59e18 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/enumBasics3.d.ts @@ -0,0 +1,75 @@ +//// [tests/cases/compiler/enumBasics3.ts] //// + +//// [enumBasics3.ts] +module M { + export namespace N { + export enum E1 { + a = 1, + b = a.a, // should error + } + } +} + +module M { + export namespace N { + export enum E2 { + b = M.N.E1.a, + c = M.N.E1.a.a, // should error + } + } +} + + +/// [Declarations] //// + + + +//// [/.src/enumBasics3.d.ts] +declare namespace M { + namespace N { + enum E1 { + a = 1, + b + } + } +} +declare namespace M { + namespace N { + enum E2 { + b, + c + } + } +} +/// [Errors] //// + +enumBasics3.ts(5,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics3.ts(13,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics3.ts(14,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== enumBasics3.ts (3 errors) ==== + module M { + export namespace N { + export enum E1 { + a = 1, + b = a.a, // should error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + } + + module M { + export namespace N { + export enum E2 { + b = M.N.E1.a, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = M.N.E1.a.a, // should error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts new file mode 100644 index 0000000000000..12a1edf420009 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts @@ -0,0 +1,171 @@ +//// [tests/cases/conformance/enums/enumConstantMembers.ts] //// + +//// [enumConstantMembers.ts] +// Constant members allow negatives, but not decimals. Also hex literals are allowed +enum E1 { + a = 1, + b +} +enum E2 { + a = - 1, + b +} +enum E3 { + a = 0.1, + b // Error because 0.1 is not a constant +} + +declare enum E4 { + a = 1, + b = -1, + c = 0.1 // Not a constant +} + +enum E5 { + a = 1 / 0, + b = 2 / 0.0, + c = 1.0 / 0.0, + d = 0.0 / 0.0, + e = NaN, + f = Infinity, + g = -Infinity +} + +const enum E6 { + a = 1 / 0, + b = 2 / 0.0, + c = 1.0 / 0.0, + d = 0.0 / 0.0, + e = NaN, + f = Infinity, + g = -Infinity +} + + +/// [Declarations] //// + + + +//// [/.src/enumConstantMembers.d.ts] +declare enum E1 { + a = 1, + b = 2 +} +declare enum E2 { + a = -1, + b = 0 +} +declare enum E3 { + a = 0.1, + b = 1.1 +} +declare enum E4 { + a = 1, + b = -1, + c = 0.1 +} +declare enum E5 { + a = Infinity, + b = Infinity, + c = Infinity, + d = NaN, + e, + f, + g +} +declare const enum E6 { + a = Infinity, + b = Infinity, + c = Infinity, + d = NaN, + e, + f, + g +} +/// [Errors] //// + +enumConstantMembers.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(23,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(24,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(32,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== enumConstantMembers.ts (14 errors) ==== + // Constant members allow negatives, but not decimals. Also hex literals are allowed + enum E1 { + a = 1, + b + } + enum E2 { + a = - 1, + b + } + enum E3 { + a = 0.1, + b // Error because 0.1 is not a constant + } + + declare enum E4 { + a = 1, + b = -1, + c = 0.1 // Not a constant + } + + enum E5 { + a = 1 / 0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + b = 2 / 0.0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = 1.0 / 0.0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = 0.0 / 0.0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + e = NaN, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + f = Infinity, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + g = -Infinity + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + const enum E6 { + a = 1 / 0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + b = 2 / 0.0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = 1.0 / 0.0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = 0.0 / 0.0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + e = NaN, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + f = Infinity, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + g = -Infinity + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumErrors.d.ts new file mode 100644 index 0000000000000..e84fe764d1ec6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/enumErrors.d.ts @@ -0,0 +1,213 @@ +//// [tests/cases/conformance/enums/enumErrors.ts] //// + +//// [enumErrors.ts] +// Enum named with PredefinedTypes +enum any { } +enum number { } +enum string { } +enum boolean { } + +// Enum with computed member initializer of type Number +enum E5 { + C = new Number(30) +} + +enum E9 { + A, + B = A +} + +//Enum with computed member intializer of different enum type +// Bug 707850: This should be allowed +enum E10 { + A = E9.A, + B = E9.B +} + +// Enum with computed member intializer of other types +enum E11 { + A = true, + B = new Date(), + C = window, + D = {}, + E = (() => 'foo')(), +} + +// Enum with string valued member and computed member initializers +enum E12 { + A = '', + B = new Date(), + C = window, + D = {}, + E = 1 + 1, + F = (() => 'foo')(), +} + +// Enum with incorrect syntax +enum E13 { + postComma, + postValueComma = 1, + + postSemicolon; + postColonValueComma: 2, + postColonValueSemicolon: 3; +}; + +enum E14 { a, b: any "hello" += 1, c, d} + + +/// [Declarations] //// + + + +//// [/.src/enumErrors.d.ts] +declare enum any { +} +declare enum number { +} +declare enum string { +} +declare enum boolean { +} +declare enum E5 { + C +} +declare enum E9 { + A = 0, + B = 0 +} +declare enum E10 { + A, + B +} +declare enum E11 { + A, + B, + C, + D, + E +} +declare enum E12 { + A = "", + B, + C, + D, + E = 2, + F +} +declare enum E13 { + postComma = 0, + postValueComma = 1, + postSemicolon = 2, + postColonValueComma = 3, + 2 = 4, + postColonValueSemicolon = 5, + 3 = 6 +} +declare enum E14 { + a = 0, + b = 1, + any = 2, + "hello" = 3, + 1 = 4, + c = 5, + d = 6 +} +/// [Errors] //// + +enumErrors.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(39,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== enumErrors.ts (13 errors) ==== + // Enum named with PredefinedTypes + enum any { } + enum number { } + enum string { } + enum boolean { } + + // Enum with computed member initializer of type Number + enum E5 { + C = new Number(30) + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum E9 { + A, + B = A + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + //Enum with computed member intializer of different enum type + // Bug 707850: This should be allowed + enum E10 { + A = E9.A, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + B = E9.B + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Enum with computed member intializer of other types + enum E11 { + A = true, + B = new Date(), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + C = window, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + D = {}, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + E = (() => 'foo')(), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Enum with string valued member and computed member initializers + enum E12 { + A = '', + B = new Date(), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + C = window, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + D = {}, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + E = 1 + 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + F = (() => 'foo')(), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Enum with incorrect syntax + enum E13 { + postComma, + postValueComma = 1, + + postSemicolon; + postColonValueComma: 2, + postColonValueSemicolon: 3; + }; + + enum E14 { a, b: any "hello" += 1, c, d} + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumExportMergingES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumExportMergingES6.d.ts new file mode 100644 index 0000000000000..8cb7979d28f0c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/enumExportMergingES6.d.ts @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/enums/enumExportMergingES6.ts] //// + +//// [enumExportMergingES6.ts] +export enum Animals { + Cat = 1 +} +export enum Animals { + Dog = 2 +} +export enum Animals { + CatDog = Cat | Dog +} + + +/// [Declarations] //// + + + +//// [/.src/enumExportMergingES6.d.ts] +export declare enum Animals { + Cat = 1 +} +export declare enum Animals { + Dog = 2 +} +export declare enum Animals { + CatDog +} +/// [Errors] //// + +enumExportMergingES6.ts(8,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== enumExportMergingES6.ts (1 errors) ==== + export enum Animals { + Cat = 1 + } + export enum Animals { + Dog = 2 + } + export enum Animals { + CatDog = Cat | Dog + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts new file mode 100644 index 0000000000000..adbfc541b2689 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts @@ -0,0 +1,63 @@ +//// [tests/cases/compiler/forwardRefInEnum.ts] //// + +//// [forwardRefInEnum.ts] +enum E1 { + // illegal case + // forward reference to the element of the same enum + X = Y, + X1 = E1["Y"], + // forward reference to the element of the same enum + Y = E1.Z, + Y1 = E1["Z"] +} + +enum E1 { + Z = 4 +} + + +/// [Declarations] //// + + + +//// [/.src/forwardRefInEnum.d.ts] +declare enum E1 { + X, + X1, + Y, + Y1 +} +declare enum E1 { + Z = 4 +} +/// [Errors] //// + +forwardRefInEnum.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== forwardRefInEnum.ts (4 errors) ==== + enum E1 { + // illegal case + // forward reference to the element of the same enum + X = Y, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + X1 = E1["Y"], + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + // forward reference to the element of the same enum + Y = E1.Z, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Y1 = E1["Z"] + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum E1 { + Z = 4 + } + \ 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..b05111b2c4b0f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts @@ -0,0 +1,1973 @@ +//// [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] //// + + + +//// [/.src/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(272,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(273,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(276,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(278,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(280,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(281,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(282,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(288,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(289,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(290,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(292,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(293,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(299,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(331,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(332,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(332,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(333,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(333,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(415,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(416,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(419,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(421,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(423,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(424,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(425,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(431,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(432,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(433,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(435,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(436,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(442,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(474,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(475,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(475,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(476,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(476,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(484,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(485,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(489,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(490,33): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(494,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(495,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(498,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(500,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(502,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(503,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(504,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(510,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(511,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(512,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(514,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(515,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(518,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(519,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(523,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(524,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(530,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(531,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(534,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(536,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(538,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(539,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(540,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(546,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(547,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(548,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(550,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(551,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(554,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(555,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(558,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(560,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(561,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(562,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(599,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(600,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(600,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(601,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(601,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(604,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(605,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(609,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(610,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(614,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(615,33): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(619,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(620,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(623,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(625,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(626,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(627,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(633,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(665,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(666,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(666,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(667,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(667,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(670,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(671,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(674,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(675,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== giant.ts (101 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() { } + 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; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export function eF() { }; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export class eC { + constructor () { } + public pV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + private rV; + public pF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + private rF() { } + public pgF() { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public get pgF() + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public psF(param:any) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tsF(param:any) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static set tsF(param:any) + static tgF() { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get tgF() + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + export interface eI { + //Call Signature + (); + (): number; + (p); + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + (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; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7(pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7? (pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + 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; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export function eF() { }; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export class eC { + constructor () { } + public pV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + private rV; + public pF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + private rF() { } + public pgF() { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public get pgF() + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public psF(param:any) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tsF(param:any) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static set tsF(param:any) + static tgF() { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get tgF() + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + export interface eI { + //Call Signature + (); + (): number; + (p); + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + (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; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7(pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7? (pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + export module eM { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export function eF() { }; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export declare function eaF() { }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export declare class eaC { }; + export declare module eaM { }; + } + export declare var eaV; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export declare function eaF() { }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export declare class eaC { + constructor () { } + public pV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + private rV; + public pF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + private rF() { } + public pgF() { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public get pgF() + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public psF(param:any) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tsF(param:any) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static set tsF(param:any) + static tgF() { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get tgF() + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + export declare module eaM { + var V; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function F() { }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + class C { } + interface I { } + module M { } + export var eV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export function eF() { }; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export class eC { } + export interface eI { } + export module eM { } + } + } + export declare var eaV; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export declare function eaF() { }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export declare class eaC { + constructor () { } + public pV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + private rV; + public pF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + private rF() { } + public pgF() { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public get pgF() + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public psF(param:any) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tsF(param:any) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static set tsF(param:any) + static tgF() { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get tgF() + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + export declare module eaM { + var V; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function F() { }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + class C { + constructor () { } + public pV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + private rV; + public pF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + 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; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7(pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7? (pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + module M { + var V; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function F() { }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + class C { } + interface I { } + module M { } + export var eV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export function eF() { }; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export class eC { } + export interface eI { } + export module eM { } + export declare var eaV + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export declare function eaF() { }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export declare class eaC { } + export declare module eaM { } + } + export var eV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export function eF() { }; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export class eC { + constructor () { } + public pV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + private rV; + public pF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tV + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + export interface eI { + //Call Signature + (); + (): number; + (p); + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + (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; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7(pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7? (pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + export module eM { + var V; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function F() { }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + class C { } + module M { } + export var eV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export function eF() { }; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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/indexSignatureMustHaveTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts new file mode 100644 index 0000000000000..ffb7439194093 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts] //// + +//// [indexSignatureMustHaveTypeAnnotation.ts] +interface I { + // Used to be indexer, now it is a computed property + [x]: string; + [x: string]; +} + +class C { + // Used to be indexer, now it is a computed property + [x]: string + +} + +class C2 { + [x: string] +} + +/// [Declarations] //// + + + +//// [/.src/indexSignatureMustHaveTypeAnnotation.d.ts] +interface I { + [x]: string; + [x: string]: any; +} +declare class C { + [x]: string; +} +declare class C2 { + [x: string]: any; +} diff --git a/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts new file mode 100644 index 0000000000000..7cbaa6e180a95 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts @@ -0,0 +1,614 @@ +//// [tests/cases/compiler/intTypeCheck.ts] //// + +//// [intTypeCheck.ts] +interface i1 { + //Property Signatures + p; + p1?; + p2?: string; + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7? (pa1, pa2): void; +} +interface i2 { + //Call Signatures + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); +} +interface i3 { + //Construct Signatures + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); +} +interface i4 { + // Used to be indexer, now it is a computed property + [p]; + //Index Signatures + [p1: string]; + [p2: string, p3: number]; +} +interface i5 extends i1 { } +interface i6 extends i2 { } +interface i7 extends i3 { } +interface i8 extends i4 { } +interface i9 { } + +class Base { foo() { } } + +interface i11 { + //Call Signatures + (); + (): 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 Signatures + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + // Used to be indexer, now it is a computed property + [p]; + //Index Signatures + [p1: string]; + [p2: string, p3: number]; + + //Property Signatures + p; + p1?; + p2?: string; + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; +} + +var anyVar: any; +// +// Property signatures +// +var obj0: i1; +var obj1: i1 = { + p: null, + p3: function ():any { return 0; }, + p6: function (pa1):any { return 0; }, + p7: function (pa1, pa2):any { return 0; } +}; +var obj2: i1 = new Object(); +var obj3: i1 = new obj0; +var obj4: i1 = new Base; +var obj5: i1 = null; +var obj6: i1 = function () { }; +//var obj7: i1 = function foo() { }; +var obj8: i1 = anyVar; +var obj9: i1 = new anyVar; +var obj10: i1 = new {}; +// +// Call signatures +// +var obj11: i2; +var obj12: i2 = {}; +var obj13: i2 = new Object(); +var obj14: i2 = new obj11; +var obj15: i2 = new Base; +var obj16: i2 = null; +var obj17: i2 = function ():any { return 0; }; +//var obj18: i2 = function foo() { }; +var obj19: i2 = anyVar; +var obj20: i2 = new anyVar; +var obj21: i2 = new {}; +// +// Construct Signatures +// +var obj22: i3; +var obj23: i3 = {}; +var obj24: i3 = new Object(); +var obj25: i3 = new obj22; +var obj26: i3 = new Base; +var obj27: i3 = null; +var obj28: i3 = function () { }; +//var obj29: i3 = function foo() { }; +var obj30: i3 = anyVar; +var obj31: i3 = new anyVar; +var obj32: i3 = new {}; +// +// Index Signatures +// +var obj33: i4; +var obj34: i4 = {}; +var obj35: i4 = new Object(); +var obj36: i4 = new obj33; +var obj37: i4 = new Base; +var obj38: i4 = null; +var obj39: i4 = function () { }; +//var obj40: i4 = function foo() { }; +var obj41: i4 = anyVar; +var obj42: i4 = new anyVar; +var obj43: i4 = new {}; +// +// Interface Derived I1 +// +var obj44: i5; +var obj45: i5 = {}; +var obj46: i5 = new Object(); +var obj47: i5 = new obj44; +var obj48: i5 = new Base; +var obj49: i5 = null; +var obj50: i5 = function () { }; +//var obj51: i5 = function foo() { }; +var obj52: i5 = anyVar; +var obj53: i5 = new anyVar; +var obj54: i5 = new {}; +// +// Interface Derived I2 +// +var obj55: i6; +var obj56: i6 = {}; +var obj57: i6 = new Object(); +var obj58: i6 = new obj55; +var obj59: i6 = new Base; +var obj60: i6 = null; +var obj61: i6 = function () { }; +//var obj62: i6 = function foo() { }; +var obj63: i6 = anyVar; +var obj64: i6 = new anyVar; +var obj65: i6 = new {}; +// +// Interface Derived I3 +// +var obj66: i7; +var obj67: i7 = {}; +var obj68: i7 = new Object(); +var obj69: i7 = new obj66; +var obj70: i7 = new Base; +var obj71: i7 = null; +var obj72: i7 = function () { }; +//var obj73: i7 = function foo() { }; +var obj74: i7 = anyVar; +var obj75: i7 = new anyVar; +var obj76: i7 = new {}; +// +// Interface Derived I4 +// +var obj77: i8; +var obj78: i8 = {}; +var obj79: i8 = new Object(); +var obj80: i8 = new obj77; +var obj81: i8 = new Base; +var obj82: i8 = null; +var obj83: i8 = function () { }; +//var obj84: i8 = function foo() { }; +var obj85: i8 = anyVar; +var obj86: i8 = new anyVar; +var obj87: i8 = new {}; + +/// [Declarations] //// + + + +//// [/.src/intTypeCheck.d.ts] +interface i1 { + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: invalid): void; + p7?(pa1: invalid, pa2: invalid): void; +} +interface i2 { + (): any; + (): number; + (p: invalid): any; + (p1: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; +} +interface i3 { + 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; +} +interface i4 { + [p]: any; + [p1: string]: any; + [p2: string, p3: number]: any; +} +interface i5 extends i1 { +} +interface i6 extends i2 { +} +interface i7 extends i3 { +} +interface i8 extends i4 { +} +interface i9 { +} +declare class Base { + foo(): invalid; +} +interface i11 { + (): 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; +} +declare var anyVar: any; +declare var obj0: i1; +declare var obj1: i1; +declare var obj2: i1; +declare var obj3: i1; +declare var obj4: i1; +declare var obj5: i1; +declare var obj6: i1; +declare var obj8: i1; +declare var obj9: i1; +declare var obj10: i1; +declare var obj11: i2; +declare var obj12: i2; +declare var obj13: i2; +declare var obj14: i2; +declare var obj15: i2; +declare var obj16: i2; +declare var obj17: i2; +declare var obj19: i2; +declare var obj20: i2; +declare var obj21: i2; +declare var obj22: i3; +declare var obj23: i3; +declare var obj24: i3; +declare var obj25: i3; +declare var obj26: i3; +declare var obj27: i3; +declare var obj28: i3; +declare var obj30: i3; +declare var obj31: i3; +declare var obj32: i3; +declare var obj33: i4; +declare var obj34: i4; +declare var obj35: i4; +declare var obj36: i4; +declare var obj37: i4; +declare var obj38: i4; +declare var obj39: i4; +declare var obj41: i4; +declare var obj42: i4; +declare var obj43: i4; +declare var obj44: i5; +declare var obj45: i5; +declare var obj46: i5; +declare var obj47: i5; +declare var obj48: i5; +declare var obj49: i5; +declare var obj50: i5; +declare var obj52: i5; +declare var obj53: i5; +declare var obj54: i5; +declare var obj55: i6; +declare var obj56: i6; +declare var obj57: i6; +declare var obj58: i6; +declare var obj59: i6; +declare var obj60: i6; +declare var obj61: i6; +declare var obj63: i6; +declare var obj64: i6; +declare var obj65: i6; +declare var obj66: i7; +declare var obj67: i7; +declare var obj68: i7; +declare var obj69: i7; +declare var obj70: i7; +declare var obj71: i7; +declare var obj72: i7; +declare var obj74: i7; +declare var obj75: i7; +declare var obj76: i7; +declare var obj77: i8; +declare var obj78: i8; +declare var obj79: i8; +declare var obj80: i8; +declare var obj81: i8; +declare var obj82: i8; +declare var obj83: i8; +declare var obj85: i8; +declare var obj86: i8; +declare var obj87: i8; +/// [Errors] //// + +intTypeCheck.ts(9,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(10,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(10,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(16,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(46,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(52,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(83,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(84,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(84,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(85,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(85,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== intTypeCheck.ts (11 errors) ==== + interface i1 { + //Property Signatures + p; + p1?; + p2?: string; + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7? (pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + interface i2 { + //Call Signatures + (); + (): number; + (p); + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + } + interface i3 { + //Construct Signatures + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + } + interface i4 { + // Used to be indexer, now it is a computed property + [p]; + //Index Signatures + [p1: string]; + [p2: string, p3: number]; + } + interface i5 extends i1 { } + interface i6 extends i2 { } + interface i7 extends i3 { } + interface i8 extends i4 { } + interface i9 { } + + class Base { foo() { } } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + interface i11 { + //Call Signatures + (); + (): number; + (p); + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + (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 Signatures + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + // Used to be indexer, now it is a computed property + [p]; + //Index Signatures + [p1: string]; + [p2: string, p3: number]; + + //Property Signatures + p; + p1?; + p2?: string; + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7(pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7? (pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + var anyVar: any; + // + // Property signatures + // + var obj0: i1; + var obj1: i1 = { + p: null, + p3: function ():any { return 0; }, + p6: function (pa1):any { return 0; }, + p7: function (pa1, pa2):any { return 0; } + }; + var obj2: i1 = new Object(); + var obj3: i1 = new obj0; + var obj4: i1 = new Base; + var obj5: i1 = null; + var obj6: i1 = function () { }; + //var obj7: i1 = function foo() { }; + var obj8: i1 = anyVar; + var obj9: i1 = new anyVar; + var obj10: i1 = new {}; + // + // Call signatures + // + var obj11: i2; + var obj12: i2 = {}; + var obj13: i2 = new Object(); + var obj14: i2 = new obj11; + var obj15: i2 = new Base; + var obj16: i2 = null; + var obj17: i2 = function ():any { return 0; }; + //var obj18: i2 = function foo() { }; + var obj19: i2 = anyVar; + var obj20: i2 = new anyVar; + var obj21: i2 = new {}; + // + // Construct Signatures + // + var obj22: i3; + var obj23: i3 = {}; + var obj24: i3 = new Object(); + var obj25: i3 = new obj22; + var obj26: i3 = new Base; + var obj27: i3 = null; + var obj28: i3 = function () { }; + //var obj29: i3 = function foo() { }; + var obj30: i3 = anyVar; + var obj31: i3 = new anyVar; + var obj32: i3 = new {}; + // + // Index Signatures + // + var obj33: i4; + var obj34: i4 = {}; + var obj35: i4 = new Object(); + var obj36: i4 = new obj33; + var obj37: i4 = new Base; + var obj38: i4 = null; + var obj39: i4 = function () { }; + //var obj40: i4 = function foo() { }; + var obj41: i4 = anyVar; + var obj42: i4 = new anyVar; + var obj43: i4 = new {}; + // + // Interface Derived I1 + // + var obj44: i5; + var obj45: i5 = {}; + var obj46: i5 = new Object(); + var obj47: i5 = new obj44; + var obj48: i5 = new Base; + var obj49: i5 = null; + var obj50: i5 = function () { }; + //var obj51: i5 = function foo() { }; + var obj52: i5 = anyVar; + var obj53: i5 = new anyVar; + var obj54: i5 = new {}; + // + // Interface Derived I2 + // + var obj55: i6; + var obj56: i6 = {}; + var obj57: i6 = new Object(); + var obj58: i6 = new obj55; + var obj59: i6 = new Base; + var obj60: i6 = null; + var obj61: i6 = function () { }; + //var obj62: i6 = function foo() { }; + var obj63: i6 = anyVar; + var obj64: i6 = new anyVar; + var obj65: i6 = new {}; + // + // Interface Derived I3 + // + var obj66: i7; + var obj67: i7 = {}; + var obj68: i7 = new Object(); + var obj69: i7 = new obj66; + var obj70: i7 = new Base; + var obj71: i7 = null; + var obj72: i7 = function () { }; + //var obj73: i7 = function foo() { }; + var obj74: i7 = anyVar; + var obj75: i7 = new anyVar; + var obj76: i7 = new {}; + // + // Interface Derived I4 + // + var obj77: i8; + var obj78: i8 = {}; + var obj79: i8 = new Object(); + var obj80: i8 = new obj77; + var obj81: i8 = new Base; + var obj82: i8 = null; + var obj83: i8 = function () { }; + //var obj84: i8 = function foo() { }; + var obj85: i8 = anyVar; + var obj86: i8 = new anyVar; + var obj87: i8 = new {}; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts new file mode 100644 index 0000000000000..f94cb01969784 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts @@ -0,0 +1,138 @@ +//// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// + +//// [invalidTaggedTemplateEscapeSequences.ts] +function tag (str: any, ...args: any[]): any { + return str +} + +const a = tag`123` +const b = tag`123 ${100}` +const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; +const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate +const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + +const a1 = tag`${ 100 }\0` // \0 +const a2 = tag`${ 100 }\00` // \\00 +const a3 = tag`${ 100 }\u` // \\u +const a4 = tag`${ 100 }\u0` // \\u0 +const a5 = tag`${ 100 }\u00` // \\u00 +const a6 = tag`${ 100 }\u000` // \\u000 +const a7 = tag`${ 100 }\u0000` // \u0000 +const a8 = tag`${ 100 }\u{` // \\u{ +const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF +const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 +const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} +const a12 = tag`${ 100 }\x` // \\x +const a13 = tag`${ 100 }\x0` // \\x0 +const a14 = tag`${ 100 }\x00` // \x00 + + +/// [Declarations] //// + + + +//// [/.src/invalidTaggedTemplateEscapeSequences.d.ts] +declare function tag(str: any, ...args: any[]): any; +declare const a: invalid; +declare const b: invalid; +declare const x: invalid; +declare const y = `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; +declare const z: invalid; +declare const a1: invalid; +declare const a2: invalid; +declare const a3: invalid; +declare const a4: invalid; +declare const a5: invalid; +declare const a6: invalid; +declare const a7: invalid; +declare const a8: invalid; +declare const a9: invalid; +declare const a10: invalid; +declare const a11: invalid; +declare const a12: invalid; +declare const a13: invalid; +declare const a14: invalid; +/// [Errors] //// + +invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(7,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(9,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(11,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(13,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(14,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(15,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(16,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(17,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(18,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(19,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(20,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(21,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(22,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(23,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== invalidTaggedTemplateEscapeSequences.ts (18 errors) ==== + function tag (str: any, ...args: any[]): any { + return str + } + + const a = tag`123` + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const b = tag`123 ${100}` + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate + const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + const a1 = tag`${ 100 }\0` // \0 + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a2 = tag`${ 100 }\00` // \\00 + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a3 = tag`${ 100 }\u` // \\u + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a4 = tag`${ 100 }\u0` // \\u0 + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a5 = tag`${ 100 }\u00` // \\u00 + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a6 = tag`${ 100 }\u000` // \\u000 + ~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a7 = tag`${ 100 }\u0000` // \u0000 + ~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a8 = tag`${ 100 }\u{` // \\u{ + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a12 = tag`${ 100 }\x` // \\x + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a13 = tag`${ 100 }\x0` // \\x0 + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a14 = tag`${ 100 }\x00` // \x00 + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es5).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es5).d.ts new file mode 100644 index 0000000000000..f94cb01969784 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es5).d.ts @@ -0,0 +1,138 @@ +//// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// + +//// [invalidTaggedTemplateEscapeSequences.ts] +function tag (str: any, ...args: any[]): any { + return str +} + +const a = tag`123` +const b = tag`123 ${100}` +const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; +const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate +const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + +const a1 = tag`${ 100 }\0` // \0 +const a2 = tag`${ 100 }\00` // \\00 +const a3 = tag`${ 100 }\u` // \\u +const a4 = tag`${ 100 }\u0` // \\u0 +const a5 = tag`${ 100 }\u00` // \\u00 +const a6 = tag`${ 100 }\u000` // \\u000 +const a7 = tag`${ 100 }\u0000` // \u0000 +const a8 = tag`${ 100 }\u{` // \\u{ +const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF +const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 +const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} +const a12 = tag`${ 100 }\x` // \\x +const a13 = tag`${ 100 }\x0` // \\x0 +const a14 = tag`${ 100 }\x00` // \x00 + + +/// [Declarations] //// + + + +//// [/.src/invalidTaggedTemplateEscapeSequences.d.ts] +declare function tag(str: any, ...args: any[]): any; +declare const a: invalid; +declare const b: invalid; +declare const x: invalid; +declare const y = `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; +declare const z: invalid; +declare const a1: invalid; +declare const a2: invalid; +declare const a3: invalid; +declare const a4: invalid; +declare const a5: invalid; +declare const a6: invalid; +declare const a7: invalid; +declare const a8: invalid; +declare const a9: invalid; +declare const a10: invalid; +declare const a11: invalid; +declare const a12: invalid; +declare const a13: invalid; +declare const a14: invalid; +/// [Errors] //// + +invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(7,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(9,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(11,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(13,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(14,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(15,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(16,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(17,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(18,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(19,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(20,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(21,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(22,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(23,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== invalidTaggedTemplateEscapeSequences.ts (18 errors) ==== + function tag (str: any, ...args: any[]): any { + return str + } + + const a = tag`123` + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const b = tag`123 ${100}` + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate + const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + const a1 = tag`${ 100 }\0` // \0 + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a2 = tag`${ 100 }\00` // \\00 + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a3 = tag`${ 100 }\u` // \\u + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a4 = tag`${ 100 }\u0` // \\u0 + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a5 = tag`${ 100 }\u00` // \\u00 + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a6 = tag`${ 100 }\u000` // \\u000 + ~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a7 = tag`${ 100 }\u0000` // \u0000 + ~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a8 = tag`${ 100 }\u{` // \\u{ + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a12 = tag`${ 100 }\x` // \\x + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a13 = tag`${ 100 }\x0` // \\x0 + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a14 = tag`${ 100 }\x00` // \x00 + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts new file mode 100644 index 0000000000000..f94cb01969784 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts @@ -0,0 +1,138 @@ +//// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// + +//// [invalidTaggedTemplateEscapeSequences.ts] +function tag (str: any, ...args: any[]): any { + return str +} + +const a = tag`123` +const b = tag`123 ${100}` +const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; +const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate +const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + +const a1 = tag`${ 100 }\0` // \0 +const a2 = tag`${ 100 }\00` // \\00 +const a3 = tag`${ 100 }\u` // \\u +const a4 = tag`${ 100 }\u0` // \\u0 +const a5 = tag`${ 100 }\u00` // \\u00 +const a6 = tag`${ 100 }\u000` // \\u000 +const a7 = tag`${ 100 }\u0000` // \u0000 +const a8 = tag`${ 100 }\u{` // \\u{ +const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF +const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 +const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} +const a12 = tag`${ 100 }\x` // \\x +const a13 = tag`${ 100 }\x0` // \\x0 +const a14 = tag`${ 100 }\x00` // \x00 + + +/// [Declarations] //// + + + +//// [/.src/invalidTaggedTemplateEscapeSequences.d.ts] +declare function tag(str: any, ...args: any[]): any; +declare const a: invalid; +declare const b: invalid; +declare const x: invalid; +declare const y = `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; +declare const z: invalid; +declare const a1: invalid; +declare const a2: invalid; +declare const a3: invalid; +declare const a4: invalid; +declare const a5: invalid; +declare const a6: invalid; +declare const a7: invalid; +declare const a8: invalid; +declare const a9: invalid; +declare const a10: invalid; +declare const a11: invalid; +declare const a12: invalid; +declare const a13: invalid; +declare const a14: invalid; +/// [Errors] //// + +invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(7,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(9,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(11,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(13,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(14,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(15,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(16,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(17,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(18,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(19,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(20,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(21,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(22,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(23,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== invalidTaggedTemplateEscapeSequences.ts (18 errors) ==== + function tag (str: any, ...args: any[]): any { + return str + } + + const a = tag`123` + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const b = tag`123 ${100}` + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate + const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + const a1 = tag`${ 100 }\0` // \0 + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a2 = tag`${ 100 }\00` // \\00 + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a3 = tag`${ 100 }\u` // \\u + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a4 = tag`${ 100 }\u0` // \\u0 + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a5 = tag`${ 100 }\u00` // \\u00 + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a6 = tag`${ 100 }\u000` // \\u000 + ~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a7 = tag`${ 100 }\u0000` // \u0000 + ~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a8 = tag`${ 100 }\u{` // \\u{ + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a12 = tag`${ 100 }\x` // \\x + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a13 = tag`${ 100 }\x0` // \\x0 + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a14 = tag`${ 100 }\x00` // \x00 + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts new file mode 100644 index 0000000000000..e67574d789964 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts @@ -0,0 +1,127 @@ +//// [tests/cases/compiler/isolatedModulesGlobalNamespacesAndEnums.ts] //// + +//// [script-namespaces.ts] +namespace Instantiated { + export const x = 1; +} +namespace Uninstantiated { + export type T = number; +} +declare namespace Ambient { + export const x: number; +} + +//// [module-namespaces.ts] +export namespace Instantiated { + export const x = 1; +} + +//// [enum1.ts] +enum Enum { A, B, C } +declare enum Enum { X = 1_000_000 } +const d = 'd'; + +//// [enum2.ts] +enum Enum { + D = d, + E = A, // error + Y = X, // error + Z = Enum.A +} + +declare enum Enum { + F = A +} + +/// [Declarations] //// + + + +//// [/.src/enum1.d.ts] +declare enum Enum { + A = 0, + B = 1, + C = 2 +} +declare enum Enum { + X = 1000000 +} +declare const d = "d"; + +//// [/.src/enum2.d.ts] +declare enum Enum { + D, + E,// error + Y,// error + Z +} +declare enum Enum { + F +} + +//// [/.src/module-namespaces.d.ts] +export declare namespace Instantiated { + const x = 1; +} + +//// [/.src/script-namespaces.d.ts] +declare namespace Instantiated { + const x = 1; +} +declare namespace Uninstantiated { + type T = number; +} +declare namespace Ambient { + const x: number; +} +/// [Errors] //// + +enum2.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enum2.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enum2.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enum2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enum2.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== script-namespaces.ts (0 errors) ==== + namespace Instantiated { + export const x = 1; + } + namespace Uninstantiated { + export type T = number; + } + declare namespace Ambient { + export const x: number; + } + +==== module-namespaces.ts (0 errors) ==== + export namespace Instantiated { + export const x = 1; + } + +==== enum1.ts (0 errors) ==== + enum Enum { A, B, C } + declare enum Enum { X = 1_000_000 } + const d = 'd'; + +==== enum2.ts (5 errors) ==== + enum Enum { + D = d, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + E = A, // error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Y = X, // error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Z = Enum.A + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + declare enum Enum { + F = A + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/mergedDeclarations2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/mergedDeclarations2.d.ts new file mode 100644 index 0000000000000..06d1968d7bd03 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/mergedDeclarations2.d.ts @@ -0,0 +1,49 @@ +//// [tests/cases/compiler/mergedDeclarations2.ts] //// + +//// [mergedDeclarations2.ts] +enum Foo { + b +} +enum Foo { + a = b +} + +module Foo { + export var x = b +} + +/// [Declarations] //// + + + +//// [/.src/mergedDeclarations2.d.ts] +declare enum Foo { + b = 0 +} +declare enum Foo { + a +} +declare namespace Foo { + var x: invalid; +} +/// [Errors] //// + +mergedDeclarations2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +mergedDeclarations2.ts(9,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== mergedDeclarations2.ts (2 errors) ==== + enum Foo { + b + } + enum Foo { + a = b + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + module Foo { + export var x = b + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/mergedEnumDeclarationCodeGen.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/mergedEnumDeclarationCodeGen.d.ts new file mode 100644 index 0000000000000..f27b4072b9315 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/mergedEnumDeclarationCodeGen.d.ts @@ -0,0 +1,41 @@ +//// [tests/cases/compiler/mergedEnumDeclarationCodeGen.ts] //// + +//// [mergedEnumDeclarationCodeGen.ts] +enum E { + a, + b = a +} +enum E { + c = a +} + +/// [Declarations] //// + + + +//// [/.src/mergedEnumDeclarationCodeGen.d.ts] +declare enum E { + a = 0, + b = 0 +} +declare enum E { + c +} +/// [Errors] //// + +mergedEnumDeclarationCodeGen.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +mergedEnumDeclarationCodeGen.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== mergedEnumDeclarationCodeGen.ts (2 errors) ==== + enum E { + a, + b = a + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + enum E { + c = a + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts new file mode 100644 index 0000000000000..7c55ab601cfc3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts @@ -0,0 +1,178 @@ +//// [tests/cases/compiler/overloadsWithComputedNames.ts] //// + +//// [overloadsWithComputedNames.ts] +// https://github.com/microsoft/TypeScript/issues/52329 +class Person { + ["B"](a: number): string; + ["A"](a: string|number): number | string { + return 0; + } +} +let p = new Person(); +p.A(0) +p.B(0) + +// https://github.com/microsoft/TypeScript/issues/17345 +class C { + ["foo"](): void + ["bar"](): void; + ["foo"]() { + return 0; + } +} + +declare const uniqueSym: unique symbol; +declare const uniqueSym2: unique symbol; +declare const sym: symbol; + +declare const strUnion: 'foo' | 'bar'; + +class C1 { + [sym](): void; // should error + [uniqueSym2](): void; // should error + [uniqueSym](): void; + [uniqueSym]() { } +} + +interface I1 { + [sym](): void; // should error + [uniqueSym2](): void; + [uniqueSym](): void; + [uniqueSym](): void; +} + +class C2 { + [strUnion](): void; // should error + [strUnion]() { } +} + +class I2 { + [strUnion](): void; // should error + [strUnion]() { } +} + +class C3 { + [1](): void; // should error + [2](): void; + [2]() { } +} + +interface I3 { + [1](): void; + [2](): void; + [2](): void; +} + +/// [Declarations] //// + + + +//// [/.src/overloadsWithComputedNames.d.ts] +declare class Person { + ["B"](a: number): string; + ["A"](a: string | number): number | string; +} +declare let p: invalid; +declare class C { + ["foo"](): void; + ["bar"](): void; +} +declare const uniqueSym: unique symbol; +declare const uniqueSym2: unique symbol; +declare const sym: symbol; +declare const strUnion: 'foo' | 'bar'; +declare class C1 { + [sym](): void; + [uniqueSym2](): void; + [uniqueSym](): void; +} +interface I1 { + [sym](): void; + [uniqueSym2](): void; + [uniqueSym](): void; + [uniqueSym](): void; +} +declare class C2 { + [strUnion](): void; +} +declare class I2 { + [strUnion](): void; +} +declare class C3 { + [1](): void; + [2](): void; +} +interface I3 { + [1](): void; + [2](): void; + [2](): void; +} +/// [Errors] //// + +overloadsWithComputedNames.ts(8,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== overloadsWithComputedNames.ts (1 errors) ==== + // https://github.com/microsoft/TypeScript/issues/52329 + class Person { + ["B"](a: number): string; + ["A"](a: string|number): number | string { + return 0; + } + } + let p = new Person(); + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p.A(0) + p.B(0) + + // https://github.com/microsoft/TypeScript/issues/17345 + class C { + ["foo"](): void + ["bar"](): void; + ["foo"]() { + return 0; + } + } + + declare const uniqueSym: unique symbol; + declare const uniqueSym2: unique symbol; + declare const sym: symbol; + + declare const strUnion: 'foo' | 'bar'; + + class C1 { + [sym](): void; // should error + [uniqueSym2](): void; // should error + [uniqueSym](): void; + [uniqueSym]() { } + } + + interface I1 { + [sym](): void; // should error + [uniqueSym2](): void; + [uniqueSym](): void; + [uniqueSym](): void; + } + + class C2 { + [strUnion](): void; // should error + [strUnion]() { } + } + + class I2 { + [strUnion](): void; // should error + [strUnion]() { } + } + + class C3 { + [1](): void; // should error + [2](): void; + [2]() { } + } + + interface I3 { + [1](): void; + [2](): void; + [2](): void; + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts new file mode 100644 index 0000000000000..3207f63890fd6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts @@ -0,0 +1,201 @@ +//// [tests/cases/compiler/parseBigInt.ts] //// + +//// [parseBigInt.ts] +// All bases should allow "n" suffix +const bin = 0b101, binBig = 0b101n; // 5, 5n +const oct = 0o567, octBig = 0o567n; // 375, 375n +const hex = 0xC0B, hexBig = 0xC0Bn; // 3083, 3083n +const dec = 123, decBig = 123n; + +// Test literals whose values overflow a 53-bit integer +// These should be represented exactly in the emitted JS +const largeBin = 0b10101010101010101010101010101010101010101010101010101010101n; // 384307168202282325n +const largeOct = 0o123456712345671234567n; // 1505852261029722487n +const largeDec = 12345678091234567890n; +const largeHex = 0x1234567890abcdefn; // 1311768467294899695n + +// Test literals with separators +const separatedBin = 0b010_10_1n; // 21n +const separatedOct = 0o1234_567n; // 342391n +const separatedDec = 123_456_789n; +const separatedHex = 0x0_abcdefn; // 11259375n + +// Test parsing literals of different bit sizes +// to ensure that parsePseudoBigInt() allocates enough space +const zero = 0b0n; +const oneBit = 0b1n; +const twoBit = 0b11n; // 3n +const threeBit = 0b111n; // 7n +const fourBit = 0b1111n; // 15n +const fiveBit = 0b11111n; // 31n +const sixBit = 0b111111n; // 63n +const sevenBit = 0b1111111n; // 127n +const eightBit = 0b11111111n; // 255n +const nineBit = 0b111111111n; // 511n +const tenBit = 0b1111111111n; // 1023n +const elevenBit = 0b11111111111n; // 2047n +const twelveBit = 0b111111111111n; // 4095n +const thirteenBit = 0b1111111111111n; // 8191n +const fourteenBit = 0b11111111111111n; // 16383n +const fifteenBit = 0b111111111111111n; // 32767n +const sixteenBit = 0b1111111111111111n; // 65535n +const seventeenBit = 0b11111111111111111n; // 131071n + +// Test negative literals +const neg = -123n; +const negHex: -16n = -0x10n; + +// Test normalization of bigints -- all of these should succeed +const negZero: 0n = -0n; +const baseChange: 255n = 0xFFn; +const leadingZeros: 0xFFn = 0x000000FFn; + +// Plus not allowed on literals +const unaryPlus = +123n; +const unaryPlusHex = +0x123n; + +// Parsing errors +// In separate blocks because they each declare an "n" variable +{ const legacyOct = 0123n; } +{ const scientific = 1e2n; } +{ const decimal = 4.1n; } +{ const leadingDecimal = .1n; } +const emptyBinary = 0bn; // should error but infer 0n +const emptyOct = 0on; // should error but infer 0n +const emptyHex = 0xn; // should error but infer 0n +const leadingSeparator = _123n; +const trailingSeparator = 123_n; +const doubleSeparator = 123_456__789n; + +// Using literals as types +const oneTwoOrThree = (x: 1n | 2n | 3n): bigint => x ** 2n; +oneTwoOrThree(0n); oneTwoOrThree(1n); oneTwoOrThree(2n); oneTwoOrThree(3n); +oneTwoOrThree(0); oneTwoOrThree(1); oneTwoOrThree(2); oneTwoOrThree(3); + +/// [Declarations] //// + + + +//// [/.src/parseBigInt.d.ts] +declare const bin = 0b101, binBig = 5n; +declare const oct = 0o567, octBig = 375n; +declare const hex = 0xC0B, hexBig = 0xc0bn; +declare const dec = 123, decBig = 123n; +declare const largeBin = 384307168202282325n; +declare const largeOct = 1505852261029722487n; +declare const largeDec = 12345678091234567890n; +declare const largeHex = 0x1234567890abcdefn; +declare const separatedBin = 21n; +declare const separatedOct = 342391n; +declare const separatedDec = 123456789n; +declare const separatedHex = 0x0abcdefn; +declare const zero = 0n; +declare const oneBit = 1n; +declare const twoBit = 3n; +declare const threeBit = 7n; +declare const fourBit = 15n; +declare const fiveBit = 31n; +declare const sixBit = 63n; +declare const sevenBit = 127n; +declare const eightBit = 255n; +declare const nineBit = 511n; +declare const tenBit = 1023n; +declare const elevenBit = 2047n; +declare const twelveBit = 4095n; +declare const thirteenBit = 8191n; +declare const fourteenBit = 16383n; +declare const fifteenBit = 32767n; +declare const sixteenBit = 65535n; +declare const seventeenBit = 131071n; +declare const neg = -123n; +declare const negHex: -16n; +declare const negZero: 0n; +declare const baseChange: 255n; +declare const leadingZeros: 0xffn; +declare const unaryPlus: number; +declare const unaryPlusHex: number; +declare const emptyBinary = 0n; +declare const emptyOct = 0n; +declare const emptyHex = 0x0n; +declare const leadingSeparator: invalid; +declare const trailingSeparator = 123n; +declare const doubleSeparator = 123456789n; +declare const oneTwoOrThree: (x: 1n | 2n | 3n) => bigint; +/// [Errors] //// + +parseBigInt.ts(63,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== parseBigInt.ts (1 errors) ==== + // All bases should allow "n" suffix + const bin = 0b101, binBig = 0b101n; // 5, 5n + const oct = 0o567, octBig = 0o567n; // 375, 375n + const hex = 0xC0B, hexBig = 0xC0Bn; // 3083, 3083n + const dec = 123, decBig = 123n; + + // Test literals whose values overflow a 53-bit integer + // These should be represented exactly in the emitted JS + const largeBin = 0b10101010101010101010101010101010101010101010101010101010101n; // 384307168202282325n + const largeOct = 0o123456712345671234567n; // 1505852261029722487n + const largeDec = 12345678091234567890n; + const largeHex = 0x1234567890abcdefn; // 1311768467294899695n + + // Test literals with separators + const separatedBin = 0b010_10_1n; // 21n + const separatedOct = 0o1234_567n; // 342391n + const separatedDec = 123_456_789n; + const separatedHex = 0x0_abcdefn; // 11259375n + + // Test parsing literals of different bit sizes + // to ensure that parsePseudoBigInt() allocates enough space + const zero = 0b0n; + const oneBit = 0b1n; + const twoBit = 0b11n; // 3n + const threeBit = 0b111n; // 7n + const fourBit = 0b1111n; // 15n + const fiveBit = 0b11111n; // 31n + const sixBit = 0b111111n; // 63n + const sevenBit = 0b1111111n; // 127n + const eightBit = 0b11111111n; // 255n + const nineBit = 0b111111111n; // 511n + const tenBit = 0b1111111111n; // 1023n + const elevenBit = 0b11111111111n; // 2047n + const twelveBit = 0b111111111111n; // 4095n + const thirteenBit = 0b1111111111111n; // 8191n + const fourteenBit = 0b11111111111111n; // 16383n + const fifteenBit = 0b111111111111111n; // 32767n + const sixteenBit = 0b1111111111111111n; // 65535n + const seventeenBit = 0b11111111111111111n; // 131071n + + // Test negative literals + const neg = -123n; + const negHex: -16n = -0x10n; + + // Test normalization of bigints -- all of these should succeed + const negZero: 0n = -0n; + const baseChange: 255n = 0xFFn; + const leadingZeros: 0xFFn = 0x000000FFn; + + // Plus not allowed on literals + const unaryPlus = +123n; + const unaryPlusHex = +0x123n; + + // Parsing errors + // In separate blocks because they each declare an "n" variable + { const legacyOct = 0123n; } + { const scientific = 1e2n; } + { const decimal = 4.1n; } + { const leadingDecimal = .1n; } + const emptyBinary = 0bn; // should error but infer 0n + const emptyOct = 0on; // should error but infer 0n + const emptyHex = 0xn; // should error but infer 0n + const leadingSeparator = _123n; + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const trailingSeparator = 123_n; + const doubleSeparator = 123_456__789n; + + // Using literals as types + const oneTwoOrThree = (x: 1n | 2n | 3n): bigint => x ** 2n; + oneTwoOrThree(0n); oneTwoOrThree(1n); oneTwoOrThree(2n); oneTwoOrThree(3n); + oneTwoOrThree(0); oneTwoOrThree(1); oneTwoOrThree(2); oneTwoOrThree(3); \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName13.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName13.d.ts new file mode 100644 index 0000000000000..274b939a560b8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName13.d.ts @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts] //// + +//// [parserComputedPropertyName13.ts] +var v: { [e]: number }; + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName13.d.ts] +declare var v: { + [e]: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName14.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName14.d.ts new file mode 100644 index 0000000000000..5d1567549207c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName14.d.ts @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts] //// + +//// [parserComputedPropertyName14.ts] +var v: { [e](): number }; + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName14.d.ts] +declare var v: { + [e](): number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName15.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName15.d.ts new file mode 100644 index 0000000000000..24a73c7b8f467 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName15.d.ts @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts] //// + +//// [parserComputedPropertyName15.ts] +var v: { [e: number]: string; [e]: number }; + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName15.d.ts] +declare var v: { + [e: number]: string; + [e]: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName18.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName18.d.ts new file mode 100644 index 0000000000000..e75902f92667a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName18.d.ts @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts] //// + +//// [parserComputedPropertyName18.ts] +var v: { [e]?(): number }; + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName18.d.ts] +declare var v: { + [e]?(): number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName19.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName19.d.ts new file mode 100644 index 0000000000000..3507928e7c66c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName19.d.ts @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts] //// + +//// [parserComputedPropertyName19.ts] +var v: { [e]? }; + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName19.d.ts] +declare var v: { + [e]?: any; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName2.d.ts new file mode 100644 index 0000000000000..96fdddeaf6c2c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName2.d.ts @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts] //// + +//// [parserComputedPropertyName2.ts] +var v = { [e]: 1 }; + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName2.d.ts] +declare var v: { + [e]: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName20.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName20.d.ts new file mode 100644 index 0000000000000..50e2cc9e060bd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName20.d.ts @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts] //// + +//// [parserComputedPropertyName20.ts] +interface I { + [e](): number +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName20.d.ts] +interface I { + [e](): number; +} diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName21.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName21.d.ts new file mode 100644 index 0000000000000..beff363c673be --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName21.d.ts @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts] //// + +//// [parserComputedPropertyName21.ts] +interface I { + [e]: number +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName21.d.ts] +interface I { + [e]: number; +} diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName37.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName37.d.ts new file mode 100644 index 0000000000000..f4d0a277c16a1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName37.d.ts @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts] //// + +//// [parserComputedPropertyName37.ts] +var v = { + [public]: 0 +}; + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName37.d.ts] +declare var v: { + [public]: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName2.d.ts new file mode 100644 index 0000000000000..f2f036ddccf86 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName2.d.ts @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts] //// + +//// [parserES5ComputedPropertyName2.ts] +var v = { [e]: 1 }; + +/// [Declarations] //// + + + +//// [/.src/parserES5ComputedPropertyName2.d.ts] +declare var v: { + [e]: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName5.d.ts new file mode 100644 index 0000000000000..75c0bb66d7b2e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName5.d.ts @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts] //// + +//// [parserES5ComputedPropertyName5.ts] +interface I { + [e]: number +} + +/// [Declarations] //// + + + +//// [/.src/parserES5ComputedPropertyName5.d.ts] +interface I { + [e]: number; +} diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName8.d.ts new file mode 100644 index 0000000000000..88fb60249b607 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName8.d.ts @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts] //// + +//// [parserES5ComputedPropertyName8.ts] +var v: { [e]: number }; + +/// [Declarations] //// + + + +//// [/.src/parserES5ComputedPropertyName8.d.ts] +declare var v: { + [e]: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty1.d.ts new file mode 100644 index 0000000000000..f14a18feaa42a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty1.d.ts @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty1.ts] //// + +//// [parserES5SymbolProperty1.ts] +interface I { + [Symbol.iterator]: string; +} + +/// [Declarations] //// + + + +//// [/.src/parserES5SymbolProperty1.d.ts] +interface I { + [Symbol.iterator]: string; +} diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty2.d.ts new file mode 100644 index 0000000000000..c1d6233287497 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty2.d.ts @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty2.ts] //// + +//// [parserES5SymbolProperty2.ts] +interface I { + [Symbol.unscopables](): string; +} + +/// [Declarations] //// + + + +//// [/.src/parserES5SymbolProperty2.d.ts] +interface I { + [Symbol.unscopables](): string; +} diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts new file mode 100644 index 0000000000000..1f7de4bd3ef3e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts] //// + +//// [parserES5SymbolProperty8.ts] +var x: { + [Symbol.toPrimitive](): string +} + +/// [Declarations] //// + + + +//// [/.src/parserES5SymbolProperty8.d.ts] +declare var x: { + [Symbol.toPrimitive](): string; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty9.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty9.d.ts new file mode 100644 index 0000000000000..13a9ab736d5e7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty9.d.ts @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty9.ts] //// + +//// [parserES5SymbolProperty9.ts] +var x: { + [Symbol.toPrimitive]: string +} + +/// [Declarations] //// + + + +//// [/.src/parserES5SymbolProperty9.d.ts] +declare var x: { + [Symbol.toPrimitive]: string; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature11.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature11.d.ts new file mode 100644 index 0000000000000..b9428e208f95e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature11.d.ts @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts] //// + +//// [parserIndexSignature11.ts] +interface I { + [p]; // Used to be indexer, now it is a computed property + [p1: string]; + [p2: string, p3: number]; +} + +/// [Declarations] //// + + + +//// [/.src/parserIndexSignature11.d.ts] +interface I { + [p]: any; + [p1: string]: any; + [p2: string, p3: number]: any; +} diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature5.d.ts new file mode 100644 index 0000000000000..74f8a4f5a32ac --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature5.d.ts @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts] //// + +//// [parserIndexSignature5.ts] +interface I { + [a] // Used to be indexer, now it is a computed property +} + +/// [Declarations] //// + + + +//// [/.src/parserIndexSignature5.d.ts] +interface I { + [a]: any; +} diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts new file mode 100644 index 0000000000000..095a14fe11d5a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts] //// + +//// [parserStrictMode8.ts] +"use strict"; +function eval() { +} + +/// [Declarations] //// + + + +//// [/.src/parserStrictMode8.d.ts] +declare function eval(): invalid; +/// [Errors] //// + +parserStrictMode8.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== parserStrictMode8.ts (1 errors) ==== + "use strict"; + function eval() { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/propertyAssignment.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/propertyAssignment.d.ts new file mode 100644 index 0000000000000..681ec74de21be --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/propertyAssignment.d.ts @@ -0,0 +1,41 @@ +//// [tests/cases/compiler/propertyAssignment.ts] //// + +//// [propertyAssignment.ts] +var foo1: { new ():any; } +var bar1: { x : number; } + +var foo2: { [index]; } // should be an error, used to be indexer, now it is a computed property +var bar2: { x : number; } + +var foo3: { ():void; } +var bar3: { x : number; } + + + +foo1 = bar1; // should be an error +foo2 = bar2; +foo3 = bar3; // should be an error + +/// [Declarations] //// + + + +//// [/.src/propertyAssignment.d.ts] +declare var foo1: { + new (): any; +}; +declare var bar1: { + x: number; +}; +declare var foo2: { + [index]: any; +}; +declare var bar2: { + x: number; +}; +declare var foo3: { + (): void; +}; +declare var bar3: { + x: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/reExportAliasMakesInstantiated.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/reExportAliasMakesInstantiated.d.ts new file mode 100644 index 0000000000000..69399d7a1c552 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/reExportAliasMakesInstantiated.d.ts @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/internalModules/moduleDeclarations/reExportAliasMakesInstantiated.ts] //// + +//// [reExportAliasMakesInstantiated.ts] +declare module pack1 { + const test1: string; + export { test1 }; +} +declare module pack2 { + import test1 = pack1.test1; + export { test1 }; +} +export import test1 = pack2.test1; + +declare module mod1 { + type test1 = string; + export { test1 }; +} +declare module mod2 { + import test1 = mod1.test1; + export { test1 }; +} +const test2 = mod2; // Possible false positive instantiation, but ok + + +/// [Declarations] //// + + + +//// [/.src/reExportAliasMakesInstantiated.d.ts] +declare namespace pack1 { + const test1: string; + export { test1 }; +} +declare namespace pack2 { + import test1 = pack1.test1; + export { test1 }; +} +export import test1 = pack2.test1; +export {}; 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..bec440e3f7cf1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/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] //// + + + +//// [/.src/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolDeclarationEmit12.ts(9,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== symbolDeclarationEmit12.ts (2 errors) ==== + module M { + interface I { } + export class C { + [Symbol.iterator]: I; + [Symbol.toPrimitive](x: I) { } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [Symbol.isConcatSpreadable](): I { + return undefined + } + get [Symbol.toPrimitive]() { return undefined; } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set [Symbol.toPrimitive](x: I) { } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty52.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty52.d.ts new file mode 100644 index 0000000000000..4e823724a75b6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty52.d.ts @@ -0,0 +1,19 @@ +//// [tests/cases/conformance/es6/Symbols/symbolProperty52.ts] //// + +//// [symbolProperty52.ts] +var obj = { + [Symbol.nonsense]: 0 +}; + +obj = {}; + +obj[Symbol.nonsense]; + +/// [Declarations] //// + + + +//// [/.src/symbolProperty52.d.ts] +declare var obj: { + [Symbol.nonsense]: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty53.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty53.d.ts new file mode 100644 index 0000000000000..c6b68fffe1f72 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty53.d.ts @@ -0,0 +1,17 @@ +//// [tests/cases/conformance/es6/Symbols/symbolProperty53.ts] //// + +//// [symbolProperty53.ts] +var obj = { + [Symbol.for]: 0 +}; + +obj[Symbol.for]; + +/// [Declarations] //// + + + +//// [/.src/symbolProperty53.d.ts] +declare var obj: { + [Symbol.for]: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty54.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty54.d.ts new file mode 100644 index 0000000000000..8729d899e95d3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty54.d.ts @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/es6/Symbols/symbolProperty54.ts] //// + +//// [symbolProperty54.ts] +var obj = { + [Symbol.prototype]: 0 +}; + +/// [Declarations] //// + + + +//// [/.src/symbolProperty54.d.ts] +declare var obj: { + [Symbol.prototype]: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty58.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty58.d.ts new file mode 100644 index 0000000000000..f48fbf1c10bec --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty58.d.ts @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/es6/Symbols/symbolProperty58.ts] //// + +//// [symbolProperty58.ts] +interface SymbolConstructor { + foo: string; +} + +var obj = { + [Symbol.foo]: 0 +} + +/// [Declarations] //// + + + +//// [/.src/symbolProperty58.d.ts] +interface SymbolConstructor { + foo: string; +} +declare var obj: { + [Symbol.foo]: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty59.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty59.d.ts new file mode 100644 index 0000000000000..b345cc42ca46f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty59.d.ts @@ -0,0 +1,15 @@ +//// [tests/cases/conformance/es6/Symbols/symbolProperty59.ts] //// + +//// [symbolProperty59.ts] +interface I { + [Symbol.keyFor]: string; +} + +/// [Declarations] //// + + + +//// [/.src/symbolProperty59.d.ts] +interface I { + [Symbol.keyFor]: string; +} diff --git a/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralTypes4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralTypes4.d.ts new file mode 100644 index 0000000000000..27fab631422b1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralTypes4.d.ts @@ -0,0 +1,783 @@ +//// [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] //// + + + +//// [/.src/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; +/// [Errors] //// + +templateLiteralTypes4.ts(43,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +templateLiteralTypes4.ts(43,60): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== 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 } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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" + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralsSourceMap.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralsSourceMap.d.ts new file mode 100644 index 0000000000000..7cfa0414ef3ed --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralsSourceMap.d.ts @@ -0,0 +1,12 @@ +//// [tests/cases/compiler/templateLiteralsSourceMap.ts] //// + +//// [templateLiteralsSourceMap.ts] +const s = `a${0}b${1}c${2}`; + + +/// [Declarations] //// + + + +//// [/.src/templateLiteralsSourceMap.d.ts] +declare const s = `a${0}b${1}c${2}`; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts new file mode 100644 index 0000000000000..22e05e55eaa71 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts @@ -0,0 +1,90 @@ +//// [tests/cases/compiler/typeUsedAsTypeLiteralIndex.ts] //// + +//// [typeUsedAsTypeLiteralIndex.ts] +type K = number | string; +type T = { + [K]: number; // Did you mean to use 'P in K'? +} + +const K1 = Symbol(); +type T1 = { + [K1]: number; +} + +type K2 = "x" | "y"; +type T2 = { + [K2]: number; // Did you mean to use 'K in K2'? +} + +type K3 = number | string; +type T3 = { + [K3]: number; // Did you mean to use 'K in K3'? +} + +type K4 = number | string; +type T4 = { + [K4]: number; + k4: string; +} + + +/// [Declarations] //// + + + +//// [/.src/typeUsedAsTypeLiteralIndex.d.ts] +type K = number | string; +type T = { + [K]: number; +}; +declare const K1: invalid; +type T1 = { + [K1]: number; +}; +type K2 = "x" | "y"; +type T2 = { + [K2]: number; +}; +type K3 = number | string; +type T3 = { + [K3]: number; +}; +type K4 = number | string; +type T4 = { + [K4]: number; + k4: string; +}; +/// [Errors] //// + +typeUsedAsTypeLiteralIndex.ts(6,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== typeUsedAsTypeLiteralIndex.ts (1 errors) ==== + type K = number | string; + type T = { + [K]: number; // Did you mean to use 'P in K'? + } + + const K1 = Symbol(); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + type T1 = { + [K1]: number; + } + + type K2 = "x" | "y"; + type T2 = { + [K2]: number; // Did you mean to use 'K in K2'? + } + + type K3 = number | string; + type T3 = { + [K3]: number; // Did you mean to use 'K in K3'? + } + + type K4 = number | string; + type T4 = { + [K4]: number; + k4: string; + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/verbatimModuleSyntaxConstEnumUsage.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/verbatimModuleSyntaxConstEnumUsage.d.ts new file mode 100644 index 0000000000000..3d327c6e9786c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/verbatimModuleSyntaxConstEnumUsage.d.ts @@ -0,0 +1,60 @@ +//// [tests/cases/conformance/externalModules/verbatimModuleSyntaxConstEnumUsage.ts] //// + +//// [foo.ts] +export enum Foo { + a = 1, + b, + c, +} + +//// [bar.ts] +import {Foo} from './foo.js'; + +export enum Bar { + a = Foo.a, + c = Foo.c, + e = 5, +} + +/// [Declarations] //// + + + +//// [/.src/bar.d.ts] +export declare enum Bar { + a, + c, + e = 5 +} + +//// [/.src/foo.d.ts] +export declare enum Foo { + a = 1, + b = 2, + c = 3 +} +/// [Errors] //// + +bar.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +bar.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== foo.ts (0 errors) ==== + export enum Foo { + a = 1, + b, + c, + } + +==== bar.ts (2 errors) ==== + import {Foo} from './foo.js'; + + export enum Bar { + a = Foo.a, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = Foo.c, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + e = 5, + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts new file mode 100644 index 0000000000000..24acd03411277 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty1.ts] //// + +//// [ES5SymbolProperty1.ts] +interface SymbolConstructor { + foo: string; +} +var Symbol: SymbolConstructor; + +var obj = { + [Symbol.foo]: 0 +} + +obj[Symbol.foo]; + +/// [Declarations] //// + + + +//// [/.src/ES5SymbolProperty1.d.ts] +interface SymbolConstructor { + foo: string; +} +declare var Symbol: SymbolConstructor; +declare var obj: invalid; +/// [Errors] //// + +ES5SymbolProperty1.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== ES5SymbolProperty1.ts (1 errors) ==== + interface SymbolConstructor { + foo: string; + } + var Symbol: SymbolConstructor; + + var obj = { + [Symbol.foo]: 0 + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + obj[Symbol.foo]; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts new file mode 100644 index 0000000000000..4f43c7d1e1c32 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts @@ -0,0 +1,95 @@ +//// [tests/cases/compiler/bigintIndex.ts] //// + +//// [a.ts] +interface BigIntIndex { + [index: bigint]: E; // should error +} + +const arr: number[] = [1, 2, 3]; +let num: number = arr[1]; +num = arr["1"]; +num = arr[1n]; // should error + +let key: keyof any; // should be type "string | number | symbol" +key = 123; +key = "abc"; +key = Symbol(); +key = 123n; // should error + +// Show correct usage of bigint index: explicitly convert to string +const bigNum: bigint = 0n; +const typedArray = new Uint8Array(3); +typedArray[bigNum] = 0xAA; // should error +typedArray[String(bigNum)] = 0xAA; +typedArray["1"] = 0xBB; +typedArray[2] = 0xCC; + +// {1n: 123} is a syntax error; must go in separate file so BigIntIndex error is shown +//// [b.ts] +// BigInt cannot be used as an object literal property +const a = {1n: 123}; +const b = {[1n]: 456}; +const c = {[bigNum]: 789}; + + +/// [Declarations] //// + + + +//// [/.src/a.d.ts] +interface BigIntIndex { + [index: bigint]: E; +} +declare const arr: number[]; +declare let num: number; +declare let key: keyof any; +declare const bigNum: bigint; +declare const typedArray: invalid; + +//// [/.src/b.d.ts] +declare const a: {}; +declare const b: { + [1n]: number; +}; +declare const c: invalid; +/// [Errors] //// + +a.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +b.ts(4,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== a.ts (1 errors) ==== + interface BigIntIndex { + [index: bigint]: E; // should error + } + + const arr: number[] = [1, 2, 3]; + let num: number = arr[1]; + num = arr["1"]; + num = arr[1n]; // should error + + let key: keyof any; // should be type "string | number | symbol" + key = 123; + key = "abc"; + key = Symbol(); + key = 123n; // should error + + // Show correct usage of bigint index: explicitly convert to string + const bigNum: bigint = 0n; + const typedArray = new Uint8Array(3); + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + typedArray[bigNum] = 0xAA; // should error + typedArray[String(bigNum)] = 0xAA; + typedArray["1"] = 0xBB; + typedArray[2] = 0xCC; + + // {1n: 123} is a syntax error; must go in separate file so BigIntIndex error is shown +==== b.ts (1 errors) ==== + // BigInt cannot be used as an object literal property + const a = {1n: 123}; + const b = {[1n]: 456}; + const c = {[bigNum]: 789}; + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts new file mode 100644 index 0000000000000..3b7f82967cdcf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts @@ -0,0 +1,297 @@ +//// [tests/cases/compiler/complicatedPrivacy.ts] //// + +//// [complicatedPrivacy.ts] +module m1 { + export module m2 { + + + export function f1(c1: C1) { + } + export function f2(c2: C2) { + } + + export class C2 implements m3.i3 { + public get p1(arg) { + return new C1(); + } + + public set p1(arg1: C1) { + } + + public f55() { + return "Hello world"; + } + } + } + + export function f2(arg1: { x?: C1, y: number }) { + } + + export function f3(): { + (a: number) : C1; + } { + return null; + } + + export function f4(arg1: + { + [number]: C1; // Used to be indexer, now it is a computed property + }) { + } + + + export function f5(arg2: { + new (arg1: C1) : C1 + }) { + } + module m3 { + function f2(f1: C1) { + } + + export interface i3 { + f55(): string; + } + } + + class C1 { + } + + interface i { + x: number; + } + + export class C5 implements i { + public x: number; + } + + export var v2: C1[]; +} + +class C2 { +} + +module m2 { + export module m3 { + + export class c_pr implements mglo5.i5, mglo5.i6 { + f1() { + return "Hello"; + } + } + + module m4 { + class C { + } + module m5 { + + export module m6 { + function f1() { + return new C(); + } + } + } + } + + } +} + +module mglo5 { + export interface i5 { + f1(): string; + } + + interface i6 { + f6(): number; + } +} + + +/// [Declarations] //// + + + +//// [/.src/complicatedPrivacy.d.ts] +declare namespace m1 { + export namespace m2 { + function f1(c1: C1): invalid; + function f2(c2: C2): invalid; + class C2 implements m3.i3 { + get p1(): invalid; + set p1(arg1: C1); + f55(): invalid; + } + } + export function f2(arg1: { + x?: C1; + y: number; + }): invalid; + export function f3(): { + (a: number): C1; + }; + export function f4(arg1: {}): invalid; + export function f5(arg2: { + new (arg1: C1): C1; + }): invalid; + namespace m3 { + interface i3 { + f55(): string; + } + } + class C1 { + } + interface i { + x: number; + } + export class C5 implements i { + x: number; + } + export var v2: C1[]; + export {}; +} +declare class C2 { +} +declare namespace m2 { + namespace m3 { + class c_pr implements mglo5.i5, mglo5.i6 { + f1(): invalid; + } + } +} +declare namespace mglo5 { + interface i5 { + f1(): string; + } +} +/// [Errors] //// + +complicatedPrivacy.ts(5,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(7,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(11,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(24,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(33,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(40,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== complicatedPrivacy.ts (8 errors) ==== + module m1 { + export module m2 { + + + export function f1(c1: C1) { + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + export function f2(c2: C2) { + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export class C2 implements m3.i3 { + public get p1(arg) { + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return new C1(); + } + + public set p1(arg1: C1) { + } + + public f55() { + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return "Hello world"; + } + } + } + + export function f2(arg1: { x?: C1, y: number }) { + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export function f3(): { + (a: number) : C1; + } { + return null; + } + + export function f4(arg1: + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + { + [number]: C1; // Used to be indexer, now it is a computed property + }) { + } + + + export function f5(arg2: { + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + new (arg1: C1) : C1 + }) { + } + module m3 { + function f2(f1: C1) { + } + + export interface i3 { + f55(): string; + } + } + + class C1 { + } + + interface i { + x: number; + } + + export class C5 implements i { + public x: number; + } + + export var v2: C1[]; + } + + class C2 { + } + + module m2 { + export module m3 { + + export class c_pr implements mglo5.i5, mglo5.i6 { + f1() { + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return "Hello"; + } + } + + module m4 { + class C { + } + module m5 { + + export module m6 { + function f1() { + return new C(); + } + } + } + } + + } + } + + module mglo5 { + export interface i5 { + f1(): string; + } + + interface i6 { + f6(): number; + } + } + \ 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..3c7be90d96014 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts @@ -0,0 +1,157 @@ +//// [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] //// + + + +//// [/.src/computedPropertiesNarrowed.d.ts] +export declare let o: invalid; +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; +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: { + [E.A]: number; +}; +export declare const o9: invalid; +export {}; +/// [Errors] //// + +computedPropertiesNarrowed.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertiesNarrowed.ts(47,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + let u = Symbol(); + export let o4 = { + [u]: 1 // Should error, nut a unique symbol + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export let o5 ={ + [Symbol()]: 1 // Should error + ~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + }; + + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts new file mode 100644 index 0000000000000..ba908211cc531 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES5.ts] //// + +//// [computedPropertyNames6_ES5.ts] +var p1: number | string; +var p2: number | number[]; +var p3: string | boolean; +var v = { + [p1]: 0, + [p2]: 1, + [p3]: 2 +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames6_ES5.d.ts] +declare var p1: number | string; +declare var p2: number | number[]; +declare var p3: string | boolean; +declare var v: invalid; +/// [Errors] //// + +computedPropertyNames6_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames6_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames6_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNames6_ES5.ts (3 errors) ==== + var p1: number | string; + var p2: number | number[]; + var p3: string | boolean; + var v = { + [p1]: 0, + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [p2]: 1, + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [p3]: 2 + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts new file mode 100644 index 0000000000000..1c0f11d37b5e8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES6.ts] //// + +//// [computedPropertyNames6_ES6.ts] +var p1: number | string; +var p2: number | number[]; +var p3: string | boolean; +var v = { + [p1]: 0, + [p2]: 1, + [p3]: 2 +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames6_ES6.d.ts] +declare var p1: number | string; +declare var p2: number | number[]; +declare var p3: string | boolean; +declare var v: invalid; +/// [Errors] //// + +computedPropertyNames6_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames6_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames6_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNames6_ES6.ts (3 errors) ==== + var p1: number | string; + var p2: number | number[]; + var p3: string | boolean; + var v = { + [p1]: 0, + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [p2]: 1, + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [p3]: 2 + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts new file mode 100644 index 0000000000000..b293d3d0140f2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts @@ -0,0 +1,44 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts] //// + +//// [computedPropertyNamesOnOverloads_ES5.ts] +var methodName = "method"; +var accessorName = "accessor"; +class C { + [methodName](v: string); + [methodName](); + [methodName](v?: string) { } +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNamesOnOverloads_ES5.d.ts] +declare var methodName: string; +declare var accessorName: string; +declare class C { + [methodName](v: string): invalid; + [methodName](): invalid; + [methodName](v?: string): invalid; +} +/// [Errors] //// + +computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNamesOnOverloads_ES5.ts (3 errors) ==== + var methodName = "method"; + var accessorName = "accessor"; + class C { + [methodName](v: string); + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [methodName](); + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [methodName](v?: string) { } + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts new file mode 100644 index 0000000000000..0be0c83c675a6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts @@ -0,0 +1,44 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts] //// + +//// [computedPropertyNamesOnOverloads_ES6.ts] +var methodName = "method"; +var accessorName = "accessor"; +class C { + [methodName](v: string); + [methodName](); + [methodName](v?: string) { } +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNamesOnOverloads_ES6.d.ts] +declare var methodName: string; +declare var accessorName: string; +declare class C { + [methodName](v: string): invalid; + [methodName](): invalid; + [methodName](v?: string): invalid; +} +/// [Errors] //// + +computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNamesOnOverloads_ES6.ts (3 errors) ==== + var methodName = "method"; + var accessorName = "accessor"; + class C { + [methodName](v: string); + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [methodName](); + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [methodName](v?: string) { } + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/constEnum2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/constEnum2.d.ts new file mode 100644 index 0000000000000..173d8226c8bc9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/constEnum2.d.ts @@ -0,0 +1,59 @@ +//// [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 = 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] //// + + + +//// [/.src/constEnum2.d.ts] +declare const CONST: invalid; +declare const enum D { + d = 10, + e, + f, + g = 0 +} +/// [Errors] //// + +constEnum2.ts(7,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnum2.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnum2.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnum2.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== constEnum2.ts (4 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 = 9000 % 2; + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const enum D { + d = 10, + e = 199 * Math.floor(Math.random() * 1000), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + f = d - (100 * Math.floor(Math.random() % 8)), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + g = CONST, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts new file mode 100644 index 0000000000000..c6981d08f350e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts @@ -0,0 +1,177 @@ +//// [tests/cases/compiler/constEnumErrors.ts] //// + +//// [constEnumErrors.ts] +const enum E { + A +} + +module E { + var x = 1; +} + +const enum E1 { + // illegal case + // forward reference to the element of the same enum + X = Y, + // forward reference to the element of the same enum + Y = E1.Z, + Y1 = E1["Z"] +} + +const enum E2 { + A +} + +var y0 = E2[1] +var name = "A"; +var y1 = E2[name]; +var y2 = E2[`${name}`]; + +var x = E2; +var y = [E2]; + +function foo(t: any): void { +} + +foo(E2); + +const enum NaNOrInfinity { + A = 9007199254740992, + B = A * A, + C = B * B, + D = C * C, + E = D * D, + F = E * E, // overflow + G = 1 / 0, // overflow + H = 0 / 0 // NaN +} + +/// [Declarations] //// + + + +//// [/.src/constEnumErrors.d.ts] +declare const enum E { + A = 0 +} +declare namespace E { +} +declare const enum E1 { + X = 0, + Y, + Y1 +} +declare const enum E2 { + A = 0 +} +declare var y0: invalid; +declare var name: string; +declare var y1: invalid; +declare var y2: invalid; +declare var x: invalid; +declare var y: invalid; +declare function foo(t: any): void; +declare const enum NaNOrInfinity { + A = 9007199254740992, + B = 8.112963841460668e+31, + C = 6.582018229284824e+63, + D = 4.332296397063773e+127, + E = 1.876879207201175e+255, + F = Infinity,// overflow + G = Infinity,// overflow + H = NaN +} +/// [Errors] //// + +constEnumErrors.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(22,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(24,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(25,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(27,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(28,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(39,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(41,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(43,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== constEnumErrors.ts (15 errors) ==== + const enum E { + A + } + + module E { + var x = 1; + } + + const enum E1 { + // illegal case + // forward reference to the element of the same enum + X = Y, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + // forward reference to the element of the same enum + Y = E1.Z, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Y1 = E1["Z"] + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + const enum E2 { + A + } + + var y0 = E2[1] + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var name = "A"; + var y1 = E2[name]; + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var y2 = E2[`${name}`]; + ~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + var x = E2; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var y = [E2]; + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + function foo(t: any): void { + } + + foo(E2); + + const enum NaNOrInfinity { + A = 9007199254740992, + B = A * A, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + C = B * B, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + D = C * C, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + E = D * D, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + F = E * E, // overflow + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + G = 1 / 0, // overflow + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + H = 0 / 0 // NaN + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/constEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/constEnums.d.ts new file mode 100644 index 0000000000000..ddbb46d7e9372 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/constEnums.d.ts @@ -0,0 +1,557 @@ +//// [tests/cases/compiler/constEnums.ts] //// + +//// [constEnums.ts] +const enum Enum1 { + A0 = 100, +} + +const enum Enum1 { + // correct cases + A, + B, + C = 10, + D = A | B, + E = A | 1, + F = 1 | A, + G = (1 & 1), + H = ~(A | B), + I = A >>> 1, + J = 1 & A, + K = ~(1 | 5), + L = ~D, + M = E << B, + N = E << 1, + O = E >> B, + P = E >> 1, + PQ = E ** 2, + Q = -D, + R = C & 5, + S = 5 & C, + T = C | D, + U = C | 1, + V = 10 | D, + W = Enum1.V, + + // correct cases: reference to the enum member from different enum declaration + W1 = A0, + W2 = Enum1.A0, + W3 = Enum1["A0"], + W4 = Enum1["W"], + W5 = Enum1[`V`], +} + +const enum Comments { + "//", + "/*", + "*/", + "///", + "#", + "", +} + +module A { + export module B { + export module C { + export const enum E { + V1 = 1, + V2 = A.B.C.E.V1 | 100 + } + } + } +} + +module A { + export module B { + export module C { + export const enum E { + V3 = A.B.C.E["V2"] & 200, + V4 = A.B.C.E[`V1`] << 1, + } + } + } +} + +module A1 { + export module B { + export module C { + export const enum E { + V1 = 10, + V2 = 110, + } + } + } +} + +module A2 { + export module B { + export module C { + export const enum E { + V1 = 10, + V2 = 110, + } + } + // module C will be classified as value + export module C { + var x = 1 + } + } +} + +import I = A.B.C.E; +import I1 = A1.B; +import I2 = A2.B; + +function foo0(e: I): void { + if (e === I.V1) { + } + else if (e === I.V2) { + } +} + +function foo1(e: I1.C.E): void { + if (e === I1.C.E.V1) { + } + else if (e === I1.C.E.V2) { + } +} + +function foo2(e: I2.C.E): void { + if (e === I2.C.E.V1) { + } + else if (e === I2.C.E.V2) { + } +} + + +function foo(x: Enum1) { + switch (x) { + case Enum1.A: + case Enum1.B: + case Enum1.C: + case Enum1.D: + case Enum1.E: + case Enum1.F: + case Enum1.G: + case Enum1.H: + case Enum1.I: + case Enum1.J: + case Enum1.K: + case Enum1.L: + case Enum1.M: + case Enum1.N: + case Enum1.O: + case Enum1.P: + case Enum1.PQ: + case Enum1.Q: + case Enum1.R: + case Enum1.S: + case Enum1["T"]: + case Enum1[`U`]: + case Enum1.V: + case Enum1.W: + case Enum1.W1: + case Enum1.W2: + case Enum1.W3: + case Enum1.W4: + break; + } +} + +function bar(e: A.B.C.E): number { + switch (e) { + case A.B.C.E.V1: return 1; + case A.B.C.E.V2: return 1; + case A.B.C.E.V3: return 1; + } +} + +function baz(c: Comments) { + switch (c) { + case Comments["//"]: + case Comments["/*"]: + case Comments["*/"]: + case Comments["///"]: + case Comments["#"]: + case Comments[""]: + break; + } +} + + +/// [Declarations] //// + + + +//// [/.src/constEnums.d.ts] +declare const enum Enum1 { + A0 = 100 +} +declare const enum Enum1 { + A = 0, + B = 1, + C = 10, + D = 1, + E = 1, + F = 1, + G = 1, + H = -2, + I = 0, + J = 0, + K = -6, + L = -2, + M = 2, + N = 2, + O = 0, + P = 0, + PQ = 1, + Q = -1, + R = 0, + S = 0, + T = 11, + U = 11, + V = 11, + W = 11, + W1 = 100, + W2 = 100, + W3 = 100, + W4 = 11, + W5 = 11 +} +declare const enum Comments { + "//" = 0, + "/*" = 1, + "*/" = 2, + "///" = 3, + "#" = 4, + "" = 6 +} +declare namespace A { + namespace B { + namespace C { + const enum E { + V1 = 1, + V2 = 101 + } + } + } +} +declare namespace A { + namespace B { + namespace C { + const enum E { + V3 = 64, + V4 = 2 + } + } + } +} +declare namespace A1 { + namespace B { + namespace C { + const enum E { + V1 = 10, + V2 = 110 + } + } + } +} +declare namespace A2 { + namespace B { + namespace C { + const enum E { + V1 = 10, + V2 = 110 + } + } + namespace C { + } + } +} +import I = A.B.C.E; +import I1 = A1.B; +import I2 = A2.B; +declare function foo0(e: I): void; +declare function foo1(e: I1.C.E): void; +declare function foo2(e: I2.C.E): void; +declare function foo(x: Enum1): invalid; +declare function bar(e: A.B.C.E): number; +declare function baz(c: Comments): invalid; +/// [Errors] //// + +constEnums.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(16,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(17,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(18,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(19,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(23,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(24,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(55,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(65,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(66,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(124,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(166,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== constEnums.ts (31 errors) ==== + const enum Enum1 { + A0 = 100, + } + + const enum Enum1 { + // correct cases + A, + B, + C = 10, + D = A | B, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + E = A | 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + F = 1 | A, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + G = (1 & 1), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + H = ~(A | B), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + I = A >>> 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + J = 1 & A, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + K = ~(1 | 5), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + L = ~D, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + M = E << B, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + N = E << 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + O = E >> B, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + P = E >> 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + PQ = E ** 2, + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Q = -D, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + R = C & 5, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + S = 5 & C, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + T = C | D, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + U = C | 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + V = 10 | D, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + W = Enum1.V, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // correct cases: reference to the enum member from different enum declaration + W1 = A0, + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + W2 = Enum1.A0, + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + W3 = Enum1["A0"], + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + W4 = Enum1["W"], + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + W5 = Enum1[`V`], + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + const enum Comments { + "//", + "/*", + "*/", + "///", + "#", + "", + } + + module A { + export module B { + export module C { + export const enum E { + V1 = 1, + V2 = A.B.C.E.V1 | 100 + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + } + } + + module A { + export module B { + export module C { + export const enum E { + V3 = A.B.C.E["V2"] & 200, + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + V4 = A.B.C.E[`V1`] << 1, + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + } + } + + module A1 { + export module B { + export module C { + export const enum E { + V1 = 10, + V2 = 110, + } + } + } + } + + module A2 { + export module B { + export module C { + export const enum E { + V1 = 10, + V2 = 110, + } + } + // module C will be classified as value + export module C { + var x = 1 + } + } + } + + import I = A.B.C.E; + import I1 = A1.B; + import I2 = A2.B; + + function foo0(e: I): void { + if (e === I.V1) { + } + else if (e === I.V2) { + } + } + + function foo1(e: I1.C.E): void { + if (e === I1.C.E.V1) { + } + else if (e === I1.C.E.V2) { + } + } + + function foo2(e: I2.C.E): void { + if (e === I2.C.E.V1) { + } + else if (e === I2.C.E.V2) { + } + } + + + function foo(x: Enum1) { + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + switch (x) { + case Enum1.A: + case Enum1.B: + case Enum1.C: + case Enum1.D: + case Enum1.E: + case Enum1.F: + case Enum1.G: + case Enum1.H: + case Enum1.I: + case Enum1.J: + case Enum1.K: + case Enum1.L: + case Enum1.M: + case Enum1.N: + case Enum1.O: + case Enum1.P: + case Enum1.PQ: + case Enum1.Q: + case Enum1.R: + case Enum1.S: + case Enum1["T"]: + case Enum1[`U`]: + case Enum1.V: + case Enum1.W: + case Enum1.W1: + case Enum1.W2: + case Enum1.W3: + case Enum1.W4: + break; + } + } + + function bar(e: A.B.C.E): number { + switch (e) { + case A.B.C.E.V1: return 1; + case A.B.C.E.V2: return 1; + case A.B.C.E.V3: return 1; + } + } + + function baz(c: Comments) { + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + switch (c) { + case Comments["//"]: + case Comments["/*"]: + case Comments["*/"]: + case Comments["///"]: + case Comments["#"]: + case Comments[""]: + break; + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics2.d.ts new file mode 100644 index 0000000000000..f8914af11377f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics2.d.ts @@ -0,0 +1,78 @@ +//// [tests/cases/compiler/enumBasics2.ts] //// + +//// [enumBasics2.ts] +enum Foo { + a = 2, + b = 3, + x = a.b, // should error + y = b.a, // should error + z = y.x * a.x, // should error +} + +enum Bar { + a = (1).valueOf(), // ok + b = Foo.a, // ok + c = Foo.a.valueOf(), // ok + d = Foo.a.a, // should error +} + + +/// [Declarations] //// + + + +//// [/.src/enumBasics2.d.ts] +declare enum Foo { + a = 2, + b = 3, + x,// should error + y,// should error + z +} +declare enum Bar { + a,// ok + b = 2,// ok + c,// ok + d +} +/// [Errors] //// + +enumBasics2.ts(4,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(5,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(6,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(10,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(11,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(12,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(13,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== enumBasics2.ts (7 errors) ==== + enum Foo { + a = 2, + b = 3, + x = a.b, // should error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + y = b.a, // should error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + z = y.x * a.x, // should error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum Bar { + a = (1).valueOf(), // ok + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + b = Foo.a, // ok + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = Foo.a.valueOf(), // ok + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = Foo.a.a, // should error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics3.d.ts new file mode 100644 index 0000000000000..b4fa605ff054d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics3.d.ts @@ -0,0 +1,75 @@ +//// [tests/cases/compiler/enumBasics3.ts] //// + +//// [enumBasics3.ts] +module M { + export namespace N { + export enum E1 { + a = 1, + b = a.a, // should error + } + } +} + +module M { + export namespace N { + export enum E2 { + b = M.N.E1.a, + c = M.N.E1.a.a, // should error + } + } +} + + +/// [Declarations] //// + + + +//// [/.src/enumBasics3.d.ts] +declare namespace M { + namespace N { + enum E1 { + a = 1, + b + } + } +} +declare namespace M { + namespace N { + enum E2 { + b = 1, + c + } + } +} +/// [Errors] //// + +enumBasics3.ts(5,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics3.ts(13,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics3.ts(14,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== enumBasics3.ts (3 errors) ==== + module M { + export namespace N { + export enum E1 { + a = 1, + b = a.a, // should error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + } + + module M { + export namespace N { + export enum E2 { + b = M.N.E1.a, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = M.N.E1.a.a, // should error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts new file mode 100644 index 0000000000000..95f801e43a3b9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts @@ -0,0 +1,171 @@ +//// [tests/cases/conformance/enums/enumConstantMembers.ts] //// + +//// [enumConstantMembers.ts] +// Constant members allow negatives, but not decimals. Also hex literals are allowed +enum E1 { + a = 1, + b +} +enum E2 { + a = - 1, + b +} +enum E3 { + a = 0.1, + b // Error because 0.1 is not a constant +} + +declare enum E4 { + a = 1, + b = -1, + c = 0.1 // Not a constant +} + +enum E5 { + a = 1 / 0, + b = 2 / 0.0, + c = 1.0 / 0.0, + d = 0.0 / 0.0, + e = NaN, + f = Infinity, + g = -Infinity +} + +const enum E6 { + a = 1 / 0, + b = 2 / 0.0, + c = 1.0 / 0.0, + d = 0.0 / 0.0, + e = NaN, + f = Infinity, + g = -Infinity +} + + +/// [Declarations] //// + + + +//// [/.src/enumConstantMembers.d.ts] +declare enum E1 { + a = 1, + b = 2 +} +declare enum E2 { + a = -1, + b = 0 +} +declare enum E3 { + a = 0.1, + b = 1.1 +} +declare enum E4 { + a = 1, + b = -1, + c = 0.1 +} +declare enum E5 { + a = Infinity, + b = Infinity, + c = Infinity, + d = NaN, + e = NaN, + f = Infinity, + g = -Infinity +} +declare const enum E6 { + a = Infinity, + b = Infinity, + c = Infinity, + d = NaN, + e = NaN, + f = Infinity, + g = -Infinity +} +/// [Errors] //// + +enumConstantMembers.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(23,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(24,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(32,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== enumConstantMembers.ts (14 errors) ==== + // Constant members allow negatives, but not decimals. Also hex literals are allowed + enum E1 { + a = 1, + b + } + enum E2 { + a = - 1, + b + } + enum E3 { + a = 0.1, + b // Error because 0.1 is not a constant + } + + declare enum E4 { + a = 1, + b = -1, + c = 0.1 // Not a constant + } + + enum E5 { + a = 1 / 0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + b = 2 / 0.0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = 1.0 / 0.0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = 0.0 / 0.0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + e = NaN, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + f = Infinity, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + g = -Infinity + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + const enum E6 { + a = 1 / 0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + b = 2 / 0.0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = 1.0 / 0.0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = 0.0 / 0.0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + e = NaN, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + f = Infinity, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + g = -Infinity + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumErrors.d.ts new file mode 100644 index 0000000000000..6ea893920e0ce --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/enumErrors.d.ts @@ -0,0 +1,213 @@ +//// [tests/cases/conformance/enums/enumErrors.ts] //// + +//// [enumErrors.ts] +// Enum named with PredefinedTypes +enum any { } +enum number { } +enum string { } +enum boolean { } + +// Enum with computed member initializer of type Number +enum E5 { + C = new Number(30) +} + +enum E9 { + A, + B = A +} + +//Enum with computed member intializer of different enum type +// Bug 707850: This should be allowed +enum E10 { + A = E9.A, + B = E9.B +} + +// Enum with computed member intializer of other types +enum E11 { + A = true, + B = new Date(), + C = window, + D = {}, + E = (() => 'foo')(), +} + +// Enum with string valued member and computed member initializers +enum E12 { + A = '', + B = new Date(), + C = window, + D = {}, + E = 1 + 1, + F = (() => 'foo')(), +} + +// Enum with incorrect syntax +enum E13 { + postComma, + postValueComma = 1, + + postSemicolon; + postColonValueComma: 2, + postColonValueSemicolon: 3; +}; + +enum E14 { a, b: any "hello" += 1, c, d} + + +/// [Declarations] //// + + + +//// [/.src/enumErrors.d.ts] +declare enum any { +} +declare enum number { +} +declare enum string { +} +declare enum boolean { +} +declare enum E5 { + C +} +declare enum E9 { + A = 0, + B = 0 +} +declare enum E10 { + A = 0, + B = 0 +} +declare enum E11 { + A, + B, + C, + D, + E +} +declare enum E12 { + A = "", + B, + C, + D, + E = 2, + F +} +declare enum E13 { + postComma = 0, + postValueComma = 1, + postSemicolon = 2, + postColonValueComma = 3, + 2 = 4, + postColonValueSemicolon = 5, + 3 = 6 +} +declare enum E14 { + a = 0, + b = 1, + any = 2, + "hello" = 3, + 1 = 4, + c = 5, + d = 6 +} +/// [Errors] //// + +enumErrors.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(39,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== enumErrors.ts (13 errors) ==== + // Enum named with PredefinedTypes + enum any { } + enum number { } + enum string { } + enum boolean { } + + // Enum with computed member initializer of type Number + enum E5 { + C = new Number(30) + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum E9 { + A, + B = A + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + //Enum with computed member intializer of different enum type + // Bug 707850: This should be allowed + enum E10 { + A = E9.A, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + B = E9.B + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Enum with computed member intializer of other types + enum E11 { + A = true, + B = new Date(), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + C = window, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + D = {}, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + E = (() => 'foo')(), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Enum with string valued member and computed member initializers + enum E12 { + A = '', + B = new Date(), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + C = window, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + D = {}, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + E = 1 + 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + F = (() => 'foo')(), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Enum with incorrect syntax + enum E13 { + postComma, + postValueComma = 1, + + postSemicolon; + postColonValueComma: 2, + postColonValueSemicolon: 3; + }; + + enum E14 { a, b: any "hello" += 1, c, d} + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumExportMergingES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumExportMergingES6.d.ts new file mode 100644 index 0000000000000..20e2331b66096 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/enumExportMergingES6.d.ts @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/enums/enumExportMergingES6.ts] //// + +//// [enumExportMergingES6.ts] +export enum Animals { + Cat = 1 +} +export enum Animals { + Dog = 2 +} +export enum Animals { + CatDog = Cat | Dog +} + + +/// [Declarations] //// + + + +//// [/.src/enumExportMergingES6.d.ts] +export declare enum Animals { + Cat = 1 +} +export declare enum Animals { + Dog = 2 +} +export declare enum Animals { + CatDog = 3 +} +/// [Errors] //// + +enumExportMergingES6.ts(8,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== enumExportMergingES6.ts (1 errors) ==== + export enum Animals { + Cat = 1 + } + export enum Animals { + Dog = 2 + } + export enum Animals { + CatDog = Cat | Dog + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts new file mode 100644 index 0000000000000..6158426de52ce --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts @@ -0,0 +1,63 @@ +//// [tests/cases/compiler/forwardRefInEnum.ts] //// + +//// [forwardRefInEnum.ts] +enum E1 { + // illegal case + // forward reference to the element of the same enum + X = Y, + X1 = E1["Y"], + // forward reference to the element of the same enum + Y = E1.Z, + Y1 = E1["Z"] +} + +enum E1 { + Z = 4 +} + + +/// [Declarations] //// + + + +//// [/.src/forwardRefInEnum.d.ts] +declare enum E1 { + X = 0, + X1 = 0, + Y = 0, + Y1 = 0 +} +declare enum E1 { + Z = 4 +} +/// [Errors] //// + +forwardRefInEnum.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== forwardRefInEnum.ts (4 errors) ==== + enum E1 { + // illegal case + // forward reference to the element of the same enum + X = Y, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + X1 = E1["Y"], + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + // forward reference to the element of the same enum + Y = E1.Z, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Y1 = E1["Z"] + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum E1 { + Z = 4 + } + \ 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..9f55eab03facb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts @@ -0,0 +1,1969 @@ +//// [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] //// + + + +//// [/.src/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(272,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(273,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(276,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(278,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(280,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(281,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(282,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(288,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(289,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(290,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(292,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(293,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(299,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(331,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(332,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(332,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(333,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(333,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(415,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(416,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(419,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(421,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(423,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(424,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(425,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(431,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(432,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(433,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(435,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(436,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(442,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(474,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(475,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(475,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(476,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(476,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(484,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(485,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(489,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(490,33): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(494,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(495,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(498,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(500,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(502,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(503,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(504,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(510,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(511,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(512,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(514,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(515,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(518,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(519,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(523,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(524,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(530,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(531,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(534,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(536,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(538,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(539,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(540,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(546,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(547,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(548,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(550,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(551,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(554,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(555,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(558,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(560,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(561,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(562,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(599,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(600,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(600,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(601,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(601,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(604,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(605,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(609,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(610,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(614,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(615,33): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(619,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(620,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(623,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(625,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(626,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(627,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(633,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(665,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(666,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(666,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(667,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(667,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(670,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(671,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(674,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(675,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== giant.ts (101 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() { } + 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; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export function eF() { }; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export class eC { + constructor () { } + public pV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + private rV; + public pF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + private rF() { } + public pgF() { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public get pgF() + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public psF(param:any) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tsF(param:any) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static set tsF(param:any) + static tgF() { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get tgF() + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + export interface eI { + //Call Signature + (); + (): number; + (p); + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + (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; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7(pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7? (pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + 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; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export function eF() { }; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export class eC { + constructor () { } + public pV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + private rV; + public pF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + private rF() { } + public pgF() { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public get pgF() + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public psF(param:any) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tsF(param:any) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static set tsF(param:any) + static tgF() { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get tgF() + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + export interface eI { + //Call Signature + (); + (): number; + (p); + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + (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; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7(pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7? (pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + export module eM { + var V; + function F() { }; + class C { }; + interface I { }; + module M { }; + export var eV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export function eF() { }; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export class eC { }; + export interface eI { }; + export module eM { }; + export declare var eaV; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export declare function eaF() { }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export declare class eaC { }; + export declare module eaM { }; + } + export declare var eaV; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export declare function eaF() { }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export declare class eaC { + constructor () { } + public pV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + private rV; + public pF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + private rF() { } + public pgF() { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public get pgF() + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public psF(param:any) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tsF(param:any) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static set tsF(param:any) + static tgF() { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get tgF() + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + export declare module eaM { + var V; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function F() { }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + class C { } + interface I { } + module M { } + export var eV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export function eF() { }; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export class eC { } + export interface eI { } + export module eM { } + } + } + export declare var eaV; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export declare function eaF() { }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export declare class eaC { + constructor () { } + public pV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + private rV; + public pF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + private rF() { } + public pgF() { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public get pgF() + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public psF(param:any) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public set psF(param:any) + private rgF() { } + private get rgF() + private rsF(param:any) { } + private set rsF(param:any) + static tV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tsF(param:any) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static set tsF(param:any) + static tgF() { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get tgF() + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + export declare module eaM { + var V; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function F() { }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + class C { + constructor () { } + public pV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + private rV; + public pF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + 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; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7(pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7? (pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + module M { + var V; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function F() { }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + class C { } + interface I { } + module M { } + export var eV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export function eF() { }; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export class eC { } + export interface eI { } + export module eM { } + export declare var eaV + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export declare function eaF() { }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export declare class eaC { } + export declare module eaM { } + } + export var eV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export function eF() { }; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export class eC { + constructor () { } + public pV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + private rV; + public pF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tV + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static tF() { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + export interface eI { + //Call Signature + (); + (): number; + (p); + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + (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; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7(pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7? (pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + export module eM { + var V; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function F() { }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + class C { } + module M { } + export var eV; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export function eF() { }; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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/indexSignatureMustHaveTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts new file mode 100644 index 0000000000000..ebc9f816cad01 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts @@ -0,0 +1,56 @@ +//// [tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts] //// + +//// [indexSignatureMustHaveTypeAnnotation.ts] +interface I { + // Used to be indexer, now it is a computed property + [x]: string; + [x: string]; +} + +class C { + // Used to be indexer, now it is a computed property + [x]: string + +} + +class C2 { + [x: string] +} + +/// [Declarations] //// + + + +//// [/.src/indexSignatureMustHaveTypeAnnotation.d.ts] +interface I { + [x: string]: any; +} +declare class C { + [x]: string; +} +declare class C2 { + [x: string]: any; +} +/// [Errors] //// + +indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== indexSignatureMustHaveTypeAnnotation.ts (1 errors) ==== + interface I { + // Used to be indexer, now it is a computed property + [x]: string; + [x: string]; + } + + class C { + // Used to be indexer, now it is a computed property + [x]: string + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + } + + class C2 { + [x: string] + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts new file mode 100644 index 0000000000000..f30e49159901f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts @@ -0,0 +1,612 @@ +//// [tests/cases/compiler/intTypeCheck.ts] //// + +//// [intTypeCheck.ts] +interface i1 { + //Property Signatures + p; + p1?; + p2?: string; + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7? (pa1, pa2): void; +} +interface i2 { + //Call Signatures + (); + (): number; + (p); + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); +} +interface i3 { + //Construct Signatures + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); +} +interface i4 { + // Used to be indexer, now it is a computed property + [p]; + //Index Signatures + [p1: string]; + [p2: string, p3: number]; +} +interface i5 extends i1 { } +interface i6 extends i2 { } +interface i7 extends i3 { } +interface i8 extends i4 { } +interface i9 { } + +class Base { foo() { } } + +interface i11 { + //Call Signatures + (); + (): 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 Signatures + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + // Used to be indexer, now it is a computed property + [p]; + //Index Signatures + [p1: string]; + [p2: string, p3: number]; + + //Property Signatures + p; + p1?; + p2?: string; + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + p7(pa1, pa2): void; + p7? (pa1, pa2): void; +} + +var anyVar: any; +// +// Property signatures +// +var obj0: i1; +var obj1: i1 = { + p: null, + p3: function ():any { return 0; }, + p6: function (pa1):any { return 0; }, + p7: function (pa1, pa2):any { return 0; } +}; +var obj2: i1 = new Object(); +var obj3: i1 = new obj0; +var obj4: i1 = new Base; +var obj5: i1 = null; +var obj6: i1 = function () { }; +//var obj7: i1 = function foo() { }; +var obj8: i1 = anyVar; +var obj9: i1 = new anyVar; +var obj10: i1 = new {}; +// +// Call signatures +// +var obj11: i2; +var obj12: i2 = {}; +var obj13: i2 = new Object(); +var obj14: i2 = new obj11; +var obj15: i2 = new Base; +var obj16: i2 = null; +var obj17: i2 = function ():any { return 0; }; +//var obj18: i2 = function foo() { }; +var obj19: i2 = anyVar; +var obj20: i2 = new anyVar; +var obj21: i2 = new {}; +// +// Construct Signatures +// +var obj22: i3; +var obj23: i3 = {}; +var obj24: i3 = new Object(); +var obj25: i3 = new obj22; +var obj26: i3 = new Base; +var obj27: i3 = null; +var obj28: i3 = function () { }; +//var obj29: i3 = function foo() { }; +var obj30: i3 = anyVar; +var obj31: i3 = new anyVar; +var obj32: i3 = new {}; +// +// Index Signatures +// +var obj33: i4; +var obj34: i4 = {}; +var obj35: i4 = new Object(); +var obj36: i4 = new obj33; +var obj37: i4 = new Base; +var obj38: i4 = null; +var obj39: i4 = function () { }; +//var obj40: i4 = function foo() { }; +var obj41: i4 = anyVar; +var obj42: i4 = new anyVar; +var obj43: i4 = new {}; +// +// Interface Derived I1 +// +var obj44: i5; +var obj45: i5 = {}; +var obj46: i5 = new Object(); +var obj47: i5 = new obj44; +var obj48: i5 = new Base; +var obj49: i5 = null; +var obj50: i5 = function () { }; +//var obj51: i5 = function foo() { }; +var obj52: i5 = anyVar; +var obj53: i5 = new anyVar; +var obj54: i5 = new {}; +// +// Interface Derived I2 +// +var obj55: i6; +var obj56: i6 = {}; +var obj57: i6 = new Object(); +var obj58: i6 = new obj55; +var obj59: i6 = new Base; +var obj60: i6 = null; +var obj61: i6 = function () { }; +//var obj62: i6 = function foo() { }; +var obj63: i6 = anyVar; +var obj64: i6 = new anyVar; +var obj65: i6 = new {}; +// +// Interface Derived I3 +// +var obj66: i7; +var obj67: i7 = {}; +var obj68: i7 = new Object(); +var obj69: i7 = new obj66; +var obj70: i7 = new Base; +var obj71: i7 = null; +var obj72: i7 = function () { }; +//var obj73: i7 = function foo() { }; +var obj74: i7 = anyVar; +var obj75: i7 = new anyVar; +var obj76: i7 = new {}; +// +// Interface Derived I4 +// +var obj77: i8; +var obj78: i8 = {}; +var obj79: i8 = new Object(); +var obj80: i8 = new obj77; +var obj81: i8 = new Base; +var obj82: i8 = null; +var obj83: i8 = function () { }; +//var obj84: i8 = function foo() { }; +var obj85: i8 = anyVar; +var obj86: i8 = new anyVar; +var obj87: i8 = new {}; + +/// [Declarations] //// + + + +//// [/.src/intTypeCheck.d.ts] +interface i1 { + p: any; + p1?: any; + p2?: string; + p3(): any; + p4?(): any; + p5?(): void; + p6(pa1: invalid): void; + p7?(pa1: invalid, pa2: invalid): void; +} +interface i2 { + (): any; + (): number; + (p: invalid): any; + (p1: string): any; + (p2?: string): any; + (...p3: any[]): any; + (p4: string, p5?: string): any; + (p6: string, ...p7: any[]): any; +} +interface i3 { + 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; +} +interface i4 { + [p1: string]: any; + [p2: string, p3: number]: any; +} +interface i5 extends i1 { +} +interface i6 extends i2 { +} +interface i7 extends i3 { +} +interface i8 extends i4 { +} +interface i9 { +} +declare class Base { + foo(): invalid; +} +interface i11 { + (): 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; +} +declare var anyVar: any; +declare var obj0: i1; +declare var obj1: i1; +declare var obj2: i1; +declare var obj3: i1; +declare var obj4: i1; +declare var obj5: i1; +declare var obj6: i1; +declare var obj8: i1; +declare var obj9: i1; +declare var obj10: i1; +declare var obj11: i2; +declare var obj12: i2; +declare var obj13: i2; +declare var obj14: i2; +declare var obj15: i2; +declare var obj16: i2; +declare var obj17: i2; +declare var obj19: i2; +declare var obj20: i2; +declare var obj21: i2; +declare var obj22: i3; +declare var obj23: i3; +declare var obj24: i3; +declare var obj25: i3; +declare var obj26: i3; +declare var obj27: i3; +declare var obj28: i3; +declare var obj30: i3; +declare var obj31: i3; +declare var obj32: i3; +declare var obj33: i4; +declare var obj34: i4; +declare var obj35: i4; +declare var obj36: i4; +declare var obj37: i4; +declare var obj38: i4; +declare var obj39: i4; +declare var obj41: i4; +declare var obj42: i4; +declare var obj43: i4; +declare var obj44: i5; +declare var obj45: i5; +declare var obj46: i5; +declare var obj47: i5; +declare var obj48: i5; +declare var obj49: i5; +declare var obj50: i5; +declare var obj52: i5; +declare var obj53: i5; +declare var obj54: i5; +declare var obj55: i6; +declare var obj56: i6; +declare var obj57: i6; +declare var obj58: i6; +declare var obj59: i6; +declare var obj60: i6; +declare var obj61: i6; +declare var obj63: i6; +declare var obj64: i6; +declare var obj65: i6; +declare var obj66: i7; +declare var obj67: i7; +declare var obj68: i7; +declare var obj69: i7; +declare var obj70: i7; +declare var obj71: i7; +declare var obj72: i7; +declare var obj74: i7; +declare var obj75: i7; +declare var obj76: i7; +declare var obj77: i8; +declare var obj78: i8; +declare var obj79: i8; +declare var obj80: i8; +declare var obj81: i8; +declare var obj82: i8; +declare var obj83: i8; +declare var obj85: i8; +declare var obj86: i8; +declare var obj87: i8; +/// [Errors] //// + +intTypeCheck.ts(9,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(10,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(10,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(16,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(46,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(52,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(83,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(84,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(84,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(85,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(85,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== intTypeCheck.ts (11 errors) ==== + interface i1 { + //Property Signatures + p; + p1?; + p2?: string; + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7? (pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + interface i2 { + //Call Signatures + (); + (): number; + (p); + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + (p1: string); + (p2?: string); + (...p3: any[]); + (p4: string, p5?: string); + (p6: string, ...p7: any[]); + } + interface i3 { + //Construct Signatures + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + } + interface i4 { + // Used to be indexer, now it is a computed property + [p]; + //Index Signatures + [p1: string]; + [p2: string, p3: number]; + } + interface i5 extends i1 { } + interface i6 extends i2 { } + interface i7 extends i3 { } + interface i8 extends i4 { } + interface i9 { } + + class Base { foo() { } } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + interface i11 { + //Call Signatures + (); + (): number; + (p); + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + (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 Signatures + new (); + new (): number; + new (p: string); + new (p2?: string); + new (...p3: any[]); + new (p4: string, p5?: string); + new (p6: string, ...p7: any[]); + + // Used to be indexer, now it is a computed property + [p]; + //Index Signatures + [p1: string]; + [p2: string, p3: number]; + + //Property Signatures + p; + p1?; + p2?: string; + p3(); + p4? (); + p5? (): void; + p6(pa1): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7(pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p7? (pa1, pa2): void; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + var anyVar: any; + // + // Property signatures + // + var obj0: i1; + var obj1: i1 = { + p: null, + p3: function ():any { return 0; }, + p6: function (pa1):any { return 0; }, + p7: function (pa1, pa2):any { return 0; } + }; + var obj2: i1 = new Object(); + var obj3: i1 = new obj0; + var obj4: i1 = new Base; + var obj5: i1 = null; + var obj6: i1 = function () { }; + //var obj7: i1 = function foo() { }; + var obj8: i1 = anyVar; + var obj9: i1 = new anyVar; + var obj10: i1 = new {}; + // + // Call signatures + // + var obj11: i2; + var obj12: i2 = {}; + var obj13: i2 = new Object(); + var obj14: i2 = new obj11; + var obj15: i2 = new Base; + var obj16: i2 = null; + var obj17: i2 = function ():any { return 0; }; + //var obj18: i2 = function foo() { }; + var obj19: i2 = anyVar; + var obj20: i2 = new anyVar; + var obj21: i2 = new {}; + // + // Construct Signatures + // + var obj22: i3; + var obj23: i3 = {}; + var obj24: i3 = new Object(); + var obj25: i3 = new obj22; + var obj26: i3 = new Base; + var obj27: i3 = null; + var obj28: i3 = function () { }; + //var obj29: i3 = function foo() { }; + var obj30: i3 = anyVar; + var obj31: i3 = new anyVar; + var obj32: i3 = new {}; + // + // Index Signatures + // + var obj33: i4; + var obj34: i4 = {}; + var obj35: i4 = new Object(); + var obj36: i4 = new obj33; + var obj37: i4 = new Base; + var obj38: i4 = null; + var obj39: i4 = function () { }; + //var obj40: i4 = function foo() { }; + var obj41: i4 = anyVar; + var obj42: i4 = new anyVar; + var obj43: i4 = new {}; + // + // Interface Derived I1 + // + var obj44: i5; + var obj45: i5 = {}; + var obj46: i5 = new Object(); + var obj47: i5 = new obj44; + var obj48: i5 = new Base; + var obj49: i5 = null; + var obj50: i5 = function () { }; + //var obj51: i5 = function foo() { }; + var obj52: i5 = anyVar; + var obj53: i5 = new anyVar; + var obj54: i5 = new {}; + // + // Interface Derived I2 + // + var obj55: i6; + var obj56: i6 = {}; + var obj57: i6 = new Object(); + var obj58: i6 = new obj55; + var obj59: i6 = new Base; + var obj60: i6 = null; + var obj61: i6 = function () { }; + //var obj62: i6 = function foo() { }; + var obj63: i6 = anyVar; + var obj64: i6 = new anyVar; + var obj65: i6 = new {}; + // + // Interface Derived I3 + // + var obj66: i7; + var obj67: i7 = {}; + var obj68: i7 = new Object(); + var obj69: i7 = new obj66; + var obj70: i7 = new Base; + var obj71: i7 = null; + var obj72: i7 = function () { }; + //var obj73: i7 = function foo() { }; + var obj74: i7 = anyVar; + var obj75: i7 = new anyVar; + var obj76: i7 = new {}; + // + // Interface Derived I4 + // + var obj77: i8; + var obj78: i8 = {}; + var obj79: i8 = new Object(); + var obj80: i8 = new obj77; + var obj81: i8 = new Base; + var obj82: i8 = null; + var obj83: i8 = function () { }; + //var obj84: i8 = function foo() { }; + var obj85: i8 = anyVar; + var obj86: i8 = new anyVar; + var obj87: i8 = new {}; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts new file mode 100644 index 0000000000000..0cc07940c1adc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts @@ -0,0 +1,138 @@ +//// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// + +//// [invalidTaggedTemplateEscapeSequences.ts] +function tag (str: any, ...args: any[]): any { + return str +} + +const a = tag`123` +const b = tag`123 ${100}` +const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; +const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate +const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + +const a1 = tag`${ 100 }\0` // \0 +const a2 = tag`${ 100 }\00` // \\00 +const a3 = tag`${ 100 }\u` // \\u +const a4 = tag`${ 100 }\u0` // \\u0 +const a5 = tag`${ 100 }\u00` // \\u00 +const a6 = tag`${ 100 }\u000` // \\u000 +const a7 = tag`${ 100 }\u0000` // \u0000 +const a8 = tag`${ 100 }\u{` // \\u{ +const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF +const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 +const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} +const a12 = tag`${ 100 }\x` // \\x +const a13 = tag`${ 100 }\x0` // \\x0 +const a14 = tag`${ 100 }\x00` // \x00 + + +/// [Declarations] //// + + + +//// [/.src/invalidTaggedTemplateEscapeSequences.d.ts] +declare function tag(str: any, ...args: any[]): any; +declare const a: invalid; +declare const b: invalid; +declare const x: invalid; +declare const y = "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld"; +declare const z: invalid; +declare const a1: invalid; +declare const a2: invalid; +declare const a3: invalid; +declare const a4: invalid; +declare const a5: invalid; +declare const a6: invalid; +declare const a7: invalid; +declare const a8: invalid; +declare const a9: invalid; +declare const a10: invalid; +declare const a11: invalid; +declare const a12: invalid; +declare const a13: invalid; +declare const a14: invalid; +/// [Errors] //// + +invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(7,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(9,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(11,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(13,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(14,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(15,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(16,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(17,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(18,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(19,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(20,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(21,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(22,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(23,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== invalidTaggedTemplateEscapeSequences.ts (18 errors) ==== + function tag (str: any, ...args: any[]): any { + return str + } + + const a = tag`123` + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const b = tag`123 ${100}` + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate + const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + const a1 = tag`${ 100 }\0` // \0 + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a2 = tag`${ 100 }\00` // \\00 + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a3 = tag`${ 100 }\u` // \\u + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a4 = tag`${ 100 }\u0` // \\u0 + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a5 = tag`${ 100 }\u00` // \\u00 + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a6 = tag`${ 100 }\u000` // \\u000 + ~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a7 = tag`${ 100 }\u0000` // \u0000 + ~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a8 = tag`${ 100 }\u{` // \\u{ + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a12 = tag`${ 100 }\x` // \\x + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a13 = tag`${ 100 }\x0` // \\x0 + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a14 = tag`${ 100 }\x00` // \x00 + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es5).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es5).d.ts new file mode 100644 index 0000000000000..0cc07940c1adc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es5).d.ts @@ -0,0 +1,138 @@ +//// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// + +//// [invalidTaggedTemplateEscapeSequences.ts] +function tag (str: any, ...args: any[]): any { + return str +} + +const a = tag`123` +const b = tag`123 ${100}` +const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; +const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate +const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + +const a1 = tag`${ 100 }\0` // \0 +const a2 = tag`${ 100 }\00` // \\00 +const a3 = tag`${ 100 }\u` // \\u +const a4 = tag`${ 100 }\u0` // \\u0 +const a5 = tag`${ 100 }\u00` // \\u00 +const a6 = tag`${ 100 }\u000` // \\u000 +const a7 = tag`${ 100 }\u0000` // \u0000 +const a8 = tag`${ 100 }\u{` // \\u{ +const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF +const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 +const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} +const a12 = tag`${ 100 }\x` // \\x +const a13 = tag`${ 100 }\x0` // \\x0 +const a14 = tag`${ 100 }\x00` // \x00 + + +/// [Declarations] //// + + + +//// [/.src/invalidTaggedTemplateEscapeSequences.d.ts] +declare function tag(str: any, ...args: any[]): any; +declare const a: invalid; +declare const b: invalid; +declare const x: invalid; +declare const y = "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld"; +declare const z: invalid; +declare const a1: invalid; +declare const a2: invalid; +declare const a3: invalid; +declare const a4: invalid; +declare const a5: invalid; +declare const a6: invalid; +declare const a7: invalid; +declare const a8: invalid; +declare const a9: invalid; +declare const a10: invalid; +declare const a11: invalid; +declare const a12: invalid; +declare const a13: invalid; +declare const a14: invalid; +/// [Errors] //// + +invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(7,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(9,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(11,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(13,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(14,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(15,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(16,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(17,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(18,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(19,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(20,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(21,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(22,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(23,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== invalidTaggedTemplateEscapeSequences.ts (18 errors) ==== + function tag (str: any, ...args: any[]): any { + return str + } + + const a = tag`123` + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const b = tag`123 ${100}` + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate + const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + const a1 = tag`${ 100 }\0` // \0 + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a2 = tag`${ 100 }\00` // \\00 + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a3 = tag`${ 100 }\u` // \\u + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a4 = tag`${ 100 }\u0` // \\u0 + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a5 = tag`${ 100 }\u00` // \\u00 + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a6 = tag`${ 100 }\u000` // \\u000 + ~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a7 = tag`${ 100 }\u0000` // \u0000 + ~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a8 = tag`${ 100 }\u{` // \\u{ + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a12 = tag`${ 100 }\x` // \\x + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a13 = tag`${ 100 }\x0` // \\x0 + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a14 = tag`${ 100 }\x00` // \x00 + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts new file mode 100644 index 0000000000000..0cc07940c1adc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts @@ -0,0 +1,138 @@ +//// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// + +//// [invalidTaggedTemplateEscapeSequences.ts] +function tag (str: any, ...args: any[]): any { + return str +} + +const a = tag`123` +const b = tag`123 ${100}` +const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; +const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate +const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + +const a1 = tag`${ 100 }\0` // \0 +const a2 = tag`${ 100 }\00` // \\00 +const a3 = tag`${ 100 }\u` // \\u +const a4 = tag`${ 100 }\u0` // \\u0 +const a5 = tag`${ 100 }\u00` // \\u00 +const a6 = tag`${ 100 }\u000` // \\u000 +const a7 = tag`${ 100 }\u0000` // \u0000 +const a8 = tag`${ 100 }\u{` // \\u{ +const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF +const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 +const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} +const a12 = tag`${ 100 }\x` // \\x +const a13 = tag`${ 100 }\x0` // \\x0 +const a14 = tag`${ 100 }\x00` // \x00 + + +/// [Declarations] //// + + + +//// [/.src/invalidTaggedTemplateEscapeSequences.d.ts] +declare function tag(str: any, ...args: any[]): any; +declare const a: invalid; +declare const b: invalid; +declare const x: invalid; +declare const y = "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld"; +declare const z: invalid; +declare const a1: invalid; +declare const a2: invalid; +declare const a3: invalid; +declare const a4: invalid; +declare const a5: invalid; +declare const a6: invalid; +declare const a7: invalid; +declare const a8: invalid; +declare const a9: invalid; +declare const a10: invalid; +declare const a11: invalid; +declare const a12: invalid; +declare const a13: invalid; +declare const a14: invalid; +/// [Errors] //// + +invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(7,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(9,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(11,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(13,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(14,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(15,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(16,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(17,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(18,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(19,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(20,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(21,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(22,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(23,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== invalidTaggedTemplateEscapeSequences.ts (18 errors) ==== + function tag (str: any, ...args: any[]): any { + return str + } + + const a = tag`123` + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const b = tag`123 ${100}` + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate + const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + const a1 = tag`${ 100 }\0` // \0 + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a2 = tag`${ 100 }\00` // \\00 + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a3 = tag`${ 100 }\u` // \\u + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a4 = tag`${ 100 }\u0` // \\u0 + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a5 = tag`${ 100 }\u00` // \\u00 + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a6 = tag`${ 100 }\u000` // \\u000 + ~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a7 = tag`${ 100 }\u0000` // \u0000 + ~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a8 = tag`${ 100 }\u{` // \\u{ + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a12 = tag`${ 100 }\x` // \\x + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a13 = tag`${ 100 }\x0` // \\x0 + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const a14 = tag`${ 100 }\x00` // \x00 + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts new file mode 100644 index 0000000000000..20168e8bbe31d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts @@ -0,0 +1,127 @@ +//// [tests/cases/compiler/isolatedModulesGlobalNamespacesAndEnums.ts] //// + +//// [script-namespaces.ts] +namespace Instantiated { + export const x = 1; +} +namespace Uninstantiated { + export type T = number; +} +declare namespace Ambient { + export const x: number; +} + +//// [module-namespaces.ts] +export namespace Instantiated { + export const x = 1; +} + +//// [enum1.ts] +enum Enum { A, B, C } +declare enum Enum { X = 1_000_000 } +const d = 'd'; + +//// [enum2.ts] +enum Enum { + D = d, + E = A, // error + Y = X, // error + Z = Enum.A +} + +declare enum Enum { + F = A +} + +/// [Declarations] //// + + + +//// [/.src/enum1.d.ts] +declare enum Enum { + A = 0, + B = 1, + C = 2 +} +declare enum Enum { + X = 1000000 +} +declare const d = "d"; + +//// [/.src/enum2.d.ts] +declare enum Enum { + D = "d", + E = 0,// error + Y = 1000000,// error + Z = 0 +} +declare enum Enum { + F = 0 +} + +//// [/.src/module-namespaces.d.ts] +export declare namespace Instantiated { + const x = 1; +} + +//// [/.src/script-namespaces.d.ts] +declare namespace Instantiated { + const x = 1; +} +declare namespace Uninstantiated { + type T = number; +} +declare namespace Ambient { + const x: number; +} +/// [Errors] //// + +enum2.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enum2.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enum2.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enum2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enum2.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== script-namespaces.ts (0 errors) ==== + namespace Instantiated { + export const x = 1; + } + namespace Uninstantiated { + export type T = number; + } + declare namespace Ambient { + export const x: number; + } + +==== module-namespaces.ts (0 errors) ==== + export namespace Instantiated { + export const x = 1; + } + +==== enum1.ts (0 errors) ==== + enum Enum { A, B, C } + declare enum Enum { X = 1_000_000 } + const d = 'd'; + +==== enum2.ts (5 errors) ==== + enum Enum { + D = d, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + E = A, // error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Y = X, // error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Z = Enum.A + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + declare enum Enum { + F = A + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/mergedDeclarations2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/mergedDeclarations2.d.ts new file mode 100644 index 0000000000000..9e1c87ce0126b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/mergedDeclarations2.d.ts @@ -0,0 +1,49 @@ +//// [tests/cases/compiler/mergedDeclarations2.ts] //// + +//// [mergedDeclarations2.ts] +enum Foo { + b +} +enum Foo { + a = b +} + +module Foo { + export var x = b +} + +/// [Declarations] //// + + + +//// [/.src/mergedDeclarations2.d.ts] +declare enum Foo { + b = 0 +} +declare enum Foo { + a = 0 +} +declare namespace Foo { + var x: invalid; +} +/// [Errors] //// + +mergedDeclarations2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +mergedDeclarations2.ts(9,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== mergedDeclarations2.ts (2 errors) ==== + enum Foo { + b + } + enum Foo { + a = b + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + module Foo { + export var x = b + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/mergedEnumDeclarationCodeGen.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/mergedEnumDeclarationCodeGen.d.ts new file mode 100644 index 0000000000000..27a9f79431424 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/mergedEnumDeclarationCodeGen.d.ts @@ -0,0 +1,41 @@ +//// [tests/cases/compiler/mergedEnumDeclarationCodeGen.ts] //// + +//// [mergedEnumDeclarationCodeGen.ts] +enum E { + a, + b = a +} +enum E { + c = a +} + +/// [Declarations] //// + + + +//// [/.src/mergedEnumDeclarationCodeGen.d.ts] +declare enum E { + a = 0, + b = 0 +} +declare enum E { + c = 0 +} +/// [Errors] //// + +mergedEnumDeclarationCodeGen.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +mergedEnumDeclarationCodeGen.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== mergedEnumDeclarationCodeGen.ts (2 errors) ==== + enum E { + a, + b = a + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + enum E { + c = a + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts new file mode 100644 index 0000000000000..d1126b4c81ad9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts @@ -0,0 +1,194 @@ +//// [tests/cases/compiler/overloadsWithComputedNames.ts] //// + +//// [overloadsWithComputedNames.ts] +// https://github.com/microsoft/TypeScript/issues/52329 +class Person { + ["B"](a: number): string; + ["A"](a: string|number): number | string { + return 0; + } +} +let p = new Person(); +p.A(0) +p.B(0) + +// https://github.com/microsoft/TypeScript/issues/17345 +class C { + ["foo"](): void + ["bar"](): void; + ["foo"]() { + return 0; + } +} + +declare const uniqueSym: unique symbol; +declare const uniqueSym2: unique symbol; +declare const sym: symbol; + +declare const strUnion: 'foo' | 'bar'; + +class C1 { + [sym](): void; // should error + [uniqueSym2](): void; // should error + [uniqueSym](): void; + [uniqueSym]() { } +} + +interface I1 { + [sym](): void; // should error + [uniqueSym2](): void; + [uniqueSym](): void; + [uniqueSym](): void; +} + +class C2 { + [strUnion](): void; // should error + [strUnion]() { } +} + +class I2 { + [strUnion](): void; // should error + [strUnion]() { } +} + +class C3 { + [1](): void; // should error + [2](): void; + [2]() { } +} + +interface I3 { + [1](): void; + [2](): void; + [2](): void; +} + +/// [Declarations] //// + + + +//// [/.src/overloadsWithComputedNames.d.ts] +declare class Person { + ["B"](a: number): string; + ["A"](a: string | number): number | string; +} +declare let p: invalid; +declare class C { + ["foo"](): void; + ["bar"](): void; +} +declare const uniqueSym: unique symbol; +declare const uniqueSym2: unique symbol; +declare const sym: symbol; +declare const strUnion: 'foo' | 'bar'; +declare class C1 { + [sym](): void; + [uniqueSym2](): void; + [uniqueSym](): void; +} +interface I1 { + [uniqueSym2](): void; + [uniqueSym](): void; + [uniqueSym](): void; +} +declare class C2 { + [strUnion](): void; + [strUnion](): invalid; +} +declare class I2 { + [strUnion](): void; + [strUnion](): invalid; +} +declare class C3 { + [1](): void; + [2](): void; +} +interface I3 { + [1](): void; + [2](): void; + [2](): void; +} +/// [Errors] //// + +overloadsWithComputedNames.ts(8,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +overloadsWithComputedNames.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +overloadsWithComputedNames.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +overloadsWithComputedNames.ts(43,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +overloadsWithComputedNames.ts(47,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +overloadsWithComputedNames.ts(48,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== overloadsWithComputedNames.ts (6 errors) ==== + // https://github.com/microsoft/TypeScript/issues/52329 + class Person { + ["B"](a: number): string; + ["A"](a: string|number): number | string { + return 0; + } + } + let p = new Person(); + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + p.A(0) + p.B(0) + + // https://github.com/microsoft/TypeScript/issues/17345 + class C { + ["foo"](): void + ["bar"](): void; + ["foo"]() { + return 0; + } + } + + declare const uniqueSym: unique symbol; + declare const uniqueSym2: unique symbol; + declare const sym: symbol; + + declare const strUnion: 'foo' | 'bar'; + + class C1 { + [sym](): void; // should error + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [uniqueSym2](): void; // should error + [uniqueSym](): void; + [uniqueSym]() { } + } + + interface I1 { + [sym](): void; // should error + [uniqueSym2](): void; + [uniqueSym](): void; + [uniqueSym](): void; + } + + class C2 { + [strUnion](): void; // should error + ~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [strUnion]() { } + ~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + class I2 { + [strUnion](): void; // should error + ~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [strUnion]() { } + ~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + class C3 { + [1](): void; // should error + [2](): void; + [2]() { } + } + + interface I3 { + [1](): void; + [2](): void; + [2](): void; + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parseBigInt.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseBigInt.d.ts new file mode 100644 index 0000000000000..57e7c803bae83 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parseBigInt.d.ts @@ -0,0 +1,201 @@ +//// [tests/cases/compiler/parseBigInt.ts] //// + +//// [parseBigInt.ts] +// All bases should allow "n" suffix +const bin = 0b101, binBig = 0b101n; // 5, 5n +const oct = 0o567, octBig = 0o567n; // 375, 375n +const hex = 0xC0B, hexBig = 0xC0Bn; // 3083, 3083n +const dec = 123, decBig = 123n; + +// Test literals whose values overflow a 53-bit integer +// These should be represented exactly in the emitted JS +const largeBin = 0b10101010101010101010101010101010101010101010101010101010101n; // 384307168202282325n +const largeOct = 0o123456712345671234567n; // 1505852261029722487n +const largeDec = 12345678091234567890n; +const largeHex = 0x1234567890abcdefn; // 1311768467294899695n + +// Test literals with separators +const separatedBin = 0b010_10_1n; // 21n +const separatedOct = 0o1234_567n; // 342391n +const separatedDec = 123_456_789n; +const separatedHex = 0x0_abcdefn; // 11259375n + +// Test parsing literals of different bit sizes +// to ensure that parsePseudoBigInt() allocates enough space +const zero = 0b0n; +const oneBit = 0b1n; +const twoBit = 0b11n; // 3n +const threeBit = 0b111n; // 7n +const fourBit = 0b1111n; // 15n +const fiveBit = 0b11111n; // 31n +const sixBit = 0b111111n; // 63n +const sevenBit = 0b1111111n; // 127n +const eightBit = 0b11111111n; // 255n +const nineBit = 0b111111111n; // 511n +const tenBit = 0b1111111111n; // 1023n +const elevenBit = 0b11111111111n; // 2047n +const twelveBit = 0b111111111111n; // 4095n +const thirteenBit = 0b1111111111111n; // 8191n +const fourteenBit = 0b11111111111111n; // 16383n +const fifteenBit = 0b111111111111111n; // 32767n +const sixteenBit = 0b1111111111111111n; // 65535n +const seventeenBit = 0b11111111111111111n; // 131071n + +// Test negative literals +const neg = -123n; +const negHex: -16n = -0x10n; + +// Test normalization of bigints -- all of these should succeed +const negZero: 0n = -0n; +const baseChange: 255n = 0xFFn; +const leadingZeros: 0xFFn = 0x000000FFn; + +// Plus not allowed on literals +const unaryPlus = +123n; +const unaryPlusHex = +0x123n; + +// Parsing errors +// In separate blocks because they each declare an "n" variable +{ const legacyOct = 0123n; } +{ const scientific = 1e2n; } +{ const decimal = 4.1n; } +{ const leadingDecimal = .1n; } +const emptyBinary = 0bn; // should error but infer 0n +const emptyOct = 0on; // should error but infer 0n +const emptyHex = 0xn; // should error but infer 0n +const leadingSeparator = _123n; +const trailingSeparator = 123_n; +const doubleSeparator = 123_456__789n; + +// Using literals as types +const oneTwoOrThree = (x: 1n | 2n | 3n): bigint => x ** 2n; +oneTwoOrThree(0n); oneTwoOrThree(1n); oneTwoOrThree(2n); oneTwoOrThree(3n); +oneTwoOrThree(0); oneTwoOrThree(1); oneTwoOrThree(2); oneTwoOrThree(3); + +/// [Declarations] //// + + + +//// [/.src/parseBigInt.d.ts] +declare const bin = 5, binBig = 5n; +declare const oct = 375, octBig = 375n; +declare const hex = 3083, hexBig = 3083n; +declare const dec = 123, decBig = 123n; +declare const largeBin = 384307168202282325n; +declare const largeOct = 1505852261029722487n; +declare const largeDec = 12345678091234567890n; +declare const largeHex = 1311768467294899695n; +declare const separatedBin = 21n; +declare const separatedOct = 342391n; +declare const separatedDec = 123456789n; +declare const separatedHex = 11259375n; +declare const zero = 0n; +declare const oneBit = 1n; +declare const twoBit = 3n; +declare const threeBit = 7n; +declare const fourBit = 15n; +declare const fiveBit = 31n; +declare const sixBit = 63n; +declare const sevenBit = 127n; +declare const eightBit = 255n; +declare const nineBit = 511n; +declare const tenBit = 1023n; +declare const elevenBit = 2047n; +declare const twelveBit = 4095n; +declare const thirteenBit = 8191n; +declare const fourteenBit = 16383n; +declare const fifteenBit = 32767n; +declare const sixteenBit = 65535n; +declare const seventeenBit = 131071n; +declare const neg = -123n; +declare const negHex: -16n; +declare const negZero: 0n; +declare const baseChange: 255n; +declare const leadingZeros: 0xffn; +declare const unaryPlus: number; +declare const unaryPlusHex: number; +declare const emptyBinary = 0n; +declare const emptyOct = 0n; +declare const emptyHex = 0n; +declare const leadingSeparator: invalid; +declare const trailingSeparator = 123n; +declare const doubleSeparator = 123456789n; +declare const oneTwoOrThree: (x: 1n | 2n | 3n) => bigint; +/// [Errors] //// + +parseBigInt.ts(63,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== parseBigInt.ts (1 errors) ==== + // All bases should allow "n" suffix + const bin = 0b101, binBig = 0b101n; // 5, 5n + const oct = 0o567, octBig = 0o567n; // 375, 375n + const hex = 0xC0B, hexBig = 0xC0Bn; // 3083, 3083n + const dec = 123, decBig = 123n; + + // Test literals whose values overflow a 53-bit integer + // These should be represented exactly in the emitted JS + const largeBin = 0b10101010101010101010101010101010101010101010101010101010101n; // 384307168202282325n + const largeOct = 0o123456712345671234567n; // 1505852261029722487n + const largeDec = 12345678091234567890n; + const largeHex = 0x1234567890abcdefn; // 1311768467294899695n + + // Test literals with separators + const separatedBin = 0b010_10_1n; // 21n + const separatedOct = 0o1234_567n; // 342391n + const separatedDec = 123_456_789n; + const separatedHex = 0x0_abcdefn; // 11259375n + + // Test parsing literals of different bit sizes + // to ensure that parsePseudoBigInt() allocates enough space + const zero = 0b0n; + const oneBit = 0b1n; + const twoBit = 0b11n; // 3n + const threeBit = 0b111n; // 7n + const fourBit = 0b1111n; // 15n + const fiveBit = 0b11111n; // 31n + const sixBit = 0b111111n; // 63n + const sevenBit = 0b1111111n; // 127n + const eightBit = 0b11111111n; // 255n + const nineBit = 0b111111111n; // 511n + const tenBit = 0b1111111111n; // 1023n + const elevenBit = 0b11111111111n; // 2047n + const twelveBit = 0b111111111111n; // 4095n + const thirteenBit = 0b1111111111111n; // 8191n + const fourteenBit = 0b11111111111111n; // 16383n + const fifteenBit = 0b111111111111111n; // 32767n + const sixteenBit = 0b1111111111111111n; // 65535n + const seventeenBit = 0b11111111111111111n; // 131071n + + // Test negative literals + const neg = -123n; + const negHex: -16n = -0x10n; + + // Test normalization of bigints -- all of these should succeed + const negZero: 0n = -0n; + const baseChange: 255n = 0xFFn; + const leadingZeros: 0xFFn = 0x000000FFn; + + // Plus not allowed on literals + const unaryPlus = +123n; + const unaryPlusHex = +0x123n; + + // Parsing errors + // In separate blocks because they each declare an "n" variable + { const legacyOct = 0123n; } + { const scientific = 1e2n; } + { const decimal = 4.1n; } + { const leadingDecimal = .1n; } + const emptyBinary = 0bn; // should error but infer 0n + const emptyOct = 0on; // should error but infer 0n + const emptyHex = 0xn; // should error but infer 0n + const leadingSeparator = _123n; + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const trailingSeparator = 123_n; + const doubleSeparator = 123_456__789n; + + // Using literals as types + const oneTwoOrThree = (x: 1n | 2n | 3n): bigint => x ** 2n; + oneTwoOrThree(0n); oneTwoOrThree(1n); oneTwoOrThree(2n); oneTwoOrThree(3n); + oneTwoOrThree(0); oneTwoOrThree(1); oneTwoOrThree(2); oneTwoOrThree(3); \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName13.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName13.d.ts new file mode 100644 index 0000000000000..46cbd4a7e2428 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName13.d.ts @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts] //// + +//// [parserComputedPropertyName13.ts] +var v: { [e]: number }; + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName13.d.ts] +declare var v: {}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName14.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName14.d.ts new file mode 100644 index 0000000000000..d3bea74cb77f7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName14.d.ts @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts] //// + +//// [parserComputedPropertyName14.ts] +var v: { [e](): number }; + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName14.d.ts] +declare var v: {}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName15.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName15.d.ts new file mode 100644 index 0000000000000..f7fbb4d4a28d2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName15.d.ts @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts] //// + +//// [parserComputedPropertyName15.ts] +var v: { [e: number]: string; [e]: number }; + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName15.d.ts] +declare var v: { + [e: number]: string; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName18.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName18.d.ts new file mode 100644 index 0000000000000..c2ff0de6b974e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName18.d.ts @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts] //// + +//// [parserComputedPropertyName18.ts] +var v: { [e]?(): number }; + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName18.d.ts] +declare var v: {}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName19.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName19.d.ts new file mode 100644 index 0000000000000..93fe310982f1f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName19.d.ts @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts] //// + +//// [parserComputedPropertyName19.ts] +var v: { [e]? }; + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName19.d.ts] +declare var v: {}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts new file mode 100644 index 0000000000000..c2cdb7a8504cb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts] //// + +//// [parserComputedPropertyName2.ts] +var v = { [e]: 1 }; + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName2.d.ts] +declare var v: invalid; +/// [Errors] //// + +parserComputedPropertyName2.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== parserComputedPropertyName2.ts (1 errors) ==== + var v = { [e]: 1 }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName20.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName20.d.ts new file mode 100644 index 0000000000000..737bba90587b0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName20.d.ts @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts] //// + +//// [parserComputedPropertyName20.ts] +interface I { + [e](): number +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName20.d.ts] +interface I { +} diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName21.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName21.d.ts new file mode 100644 index 0000000000000..9474bab3ffdcb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName21.d.ts @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts] //// + +//// [parserComputedPropertyName21.ts] +interface I { + [e]: number +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName21.d.ts] +interface I { +} diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts new file mode 100644 index 0000000000000..5a39bc368ad82 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts] //// + +//// [parserComputedPropertyName37.ts] +var v = { + [public]: 0 +}; + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName37.d.ts] +declare var v: invalid; +/// [Errors] //// + +parserComputedPropertyName37.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== parserComputedPropertyName37.ts (1 errors) ==== + var v = { + [public]: 0 + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts new file mode 100644 index 0000000000000..1c53301119927 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts] //// + +//// [parserES5ComputedPropertyName2.ts] +var v = { [e]: 1 }; + +/// [Declarations] //// + + + +//// [/.src/parserES5ComputedPropertyName2.d.ts] +declare var v: invalid; +/// [Errors] //// + +parserES5ComputedPropertyName2.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== parserES5ComputedPropertyName2.ts (1 errors) ==== + var v = { [e]: 1 }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName5.d.ts new file mode 100644 index 0000000000000..4d3422cafe828 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName5.d.ts @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts] //// + +//// [parserES5ComputedPropertyName5.ts] +interface I { + [e]: number +} + +/// [Declarations] //// + + + +//// [/.src/parserES5ComputedPropertyName5.d.ts] +interface I { +} diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName8.d.ts new file mode 100644 index 0000000000000..c72fd69d4fe9f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName8.d.ts @@ -0,0 +1,11 @@ +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts] //// + +//// [parserES5ComputedPropertyName8.ts] +var v: { [e]: number }; + +/// [Declarations] //// + + + +//// [/.src/parserES5ComputedPropertyName8.d.ts] +declare var v: {}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty1.d.ts new file mode 100644 index 0000000000000..942380af088f6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty1.d.ts @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty1.ts] //// + +//// [parserES5SymbolProperty1.ts] +interface I { + [Symbol.iterator]: string; +} + +/// [Declarations] //// + + + +//// [/.src/parserES5SymbolProperty1.d.ts] +interface I { +} diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty2.d.ts new file mode 100644 index 0000000000000..8cc1a9039bfb1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty2.d.ts @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty2.ts] //// + +//// [parserES5SymbolProperty2.ts] +interface I { + [Symbol.unscopables](): string; +} + +/// [Declarations] //// + + + +//// [/.src/parserES5SymbolProperty2.d.ts] +interface I { +} diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts new file mode 100644 index 0000000000000..bce65a18fd716 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts] //// + +//// [parserES5SymbolProperty8.ts] +var x: { + [Symbol.toPrimitive](): string +} + +/// [Declarations] //// + + + +//// [/.src/parserES5SymbolProperty8.d.ts] +declare var x: {}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty9.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty9.d.ts new file mode 100644 index 0000000000000..ad8d7357d22e6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty9.d.ts @@ -0,0 +1,13 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty9.ts] //// + +//// [parserES5SymbolProperty9.ts] +var x: { + [Symbol.toPrimitive]: string +} + +/// [Declarations] //// + + + +//// [/.src/parserES5SymbolProperty9.d.ts] +declare var x: {}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature11.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature11.d.ts new file mode 100644 index 0000000000000..300e1716170ec --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature11.d.ts @@ -0,0 +1,18 @@ +//// [tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts] //// + +//// [parserIndexSignature11.ts] +interface I { + [p]; // Used to be indexer, now it is a computed property + [p1: string]; + [p2: string, p3: number]; +} + +/// [Declarations] //// + + + +//// [/.src/parserIndexSignature11.d.ts] +interface I { + [p1: string]: any; + [p2: string, p3: number]: any; +} diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature5.d.ts new file mode 100644 index 0000000000000..be1a2d6f46bcf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature5.d.ts @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts] //// + +//// [parserIndexSignature5.ts] +interface I { + [a] // Used to be indexer, now it is a computed property +} + +/// [Declarations] //// + + + +//// [/.src/parserIndexSignature5.d.ts] +interface I { +} diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserStrictMode8.d.ts new file mode 100644 index 0000000000000..0cfecd667308d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserStrictMode8.d.ts @@ -0,0 +1,12 @@ +//// [tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts] //// + +//// [parserStrictMode8.ts] +"use strict"; +function eval() { +} + +/// [Declarations] //// + + + +//// [/.src/parserStrictMode8.d.ts] diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/propertyAssignment.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/propertyAssignment.d.ts new file mode 100644 index 0000000000000..f84ecc29dce75 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/propertyAssignment.d.ts @@ -0,0 +1,39 @@ +//// [tests/cases/compiler/propertyAssignment.ts] //// + +//// [propertyAssignment.ts] +var foo1: { new ():any; } +var bar1: { x : number; } + +var foo2: { [index]; } // should be an error, used to be indexer, now it is a computed property +var bar2: { x : number; } + +var foo3: { ():void; } +var bar3: { x : number; } + + + +foo1 = bar1; // should be an error +foo2 = bar2; +foo3 = bar3; // should be an error + +/// [Declarations] //// + + + +//// [/.src/propertyAssignment.d.ts] +declare var foo1: { + new (): any; +}; +declare var bar1: { + x: number; +}; +declare var foo2: {}; +declare var bar2: { + x: number; +}; +declare var foo3: { + (): void; +}; +declare var bar3: { + x: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/reExportAliasMakesInstantiated.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/reExportAliasMakesInstantiated.d.ts new file mode 100644 index 0000000000000..b0a63495a287d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/reExportAliasMakesInstantiated.d.ts @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/internalModules/moduleDeclarations/reExportAliasMakesInstantiated.ts] //// + +//// [reExportAliasMakesInstantiated.ts] +declare module pack1 { + const test1: string; + export { test1 }; +} +declare module pack2 { + import test1 = pack1.test1; + export { test1 }; +} +export import test1 = pack2.test1; + +declare module mod1 { + type test1 = string; + export { test1 }; +} +declare module mod2 { + import test1 = mod1.test1; + export { test1 }; +} +const test2 = mod2; // Possible false positive instantiation, but ok + + +/// [Declarations] //// + + + +//// [/.src/reExportAliasMakesInstantiated.d.ts] +declare namespace pack1 { + const test1: string; + export { test1 }; +} +declare namespace pack2 { + import test1 = pack1.test1; + export { test1 }; +} +export import test1 = pack2.test1; +declare namespace mod1 { + type test1 = string; + export { test1 }; +} +export {}; 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..eea393b64dae2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolDeclarationEmit12.d.ts @@ -0,0 +1,52 @@ +//// [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] //// + + + +//// [/.src/symbolDeclarationEmit12.d.ts] +declare namespace M { + interface I { + } + export class C { + [Symbol.iterator]: I; + [Symbol.isConcatSpreadable](): I; + get [Symbol.toPrimitive](): invalid; + set [Symbol.toPrimitive](x: I); + } + export {}; +} +/// [Errors] //// + +symbolDeclarationEmit12.ts(9,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== symbolDeclarationEmit12.ts (1 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set [Symbol.toPrimitive](x: I) { } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts new file mode 100644 index 0000000000000..304df99a76216 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/es6/Symbols/symbolProperty52.ts] //// + +//// [symbolProperty52.ts] +var obj = { + [Symbol.nonsense]: 0 +}; + +obj = {}; + +obj[Symbol.nonsense]; + +/// [Declarations] //// + + + +//// [/.src/symbolProperty52.d.ts] +declare var obj: invalid; +/// [Errors] //// + +symbolProperty52.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== symbolProperty52.ts (1 errors) ==== + var obj = { + [Symbol.nonsense]: 0 + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + }; + + obj = {}; + + obj[Symbol.nonsense]; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts new file mode 100644 index 0000000000000..f3a38db1e104e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/es6/Symbols/symbolProperty53.ts] //// + +//// [symbolProperty53.ts] +var obj = { + [Symbol.for]: 0 +}; + +obj[Symbol.for]; + +/// [Declarations] //// + + + +//// [/.src/symbolProperty53.d.ts] +declare var obj: invalid; +/// [Errors] //// + +symbolProperty53.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== symbolProperty53.ts (1 errors) ==== + var obj = { + [Symbol.for]: 0 + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + }; + + obj[Symbol.for]; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts new file mode 100644 index 0000000000000..fc5287a177ebc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/es6/Symbols/symbolProperty54.ts] //// + +//// [symbolProperty54.ts] +var obj = { + [Symbol.prototype]: 0 +}; + +/// [Declarations] //// + + + +//// [/.src/symbolProperty54.d.ts] +declare var obj: invalid; +/// [Errors] //// + +symbolProperty54.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== symbolProperty54.ts (1 errors) ==== + var obj = { + [Symbol.prototype]: 0 + ~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts new file mode 100644 index 0000000000000..2b4241f6351fe --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/es6/Symbols/symbolProperty58.ts] //// + +//// [symbolProperty58.ts] +interface SymbolConstructor { + foo: string; +} + +var obj = { + [Symbol.foo]: 0 +} + +/// [Declarations] //// + + + +//// [/.src/symbolProperty58.d.ts] +interface SymbolConstructor { + foo: string; +} +declare var obj: invalid; +/// [Errors] //// + +symbolProperty58.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== symbolProperty58.ts (1 errors) ==== + interface SymbolConstructor { + foo: string; + } + + var obj = { + [Symbol.foo]: 0 + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty59.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty59.d.ts new file mode 100644 index 0000000000000..85348df6cd058 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty59.d.ts @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/Symbols/symbolProperty59.ts] //// + +//// [symbolProperty59.ts] +interface I { + [Symbol.keyFor]: string; +} + +/// [Declarations] //// + + + +//// [/.src/symbolProperty59.d.ts] +interface I { +} diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralTypes4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralTypes4.d.ts new file mode 100644 index 0000000000000..4e2bceb201d1c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralTypes4.d.ts @@ -0,0 +1,783 @@ +//// [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] //// + + + +//// [/.src/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; +/// [Errors] //// + +templateLiteralTypes4.ts(43,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +templateLiteralTypes4.ts(43,60): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== 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 } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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" + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralsSourceMap.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralsSourceMap.d.ts new file mode 100644 index 0000000000000..ce0af0f17d45c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralsSourceMap.d.ts @@ -0,0 +1,12 @@ +//// [tests/cases/compiler/templateLiteralsSourceMap.ts] //// + +//// [templateLiteralsSourceMap.ts] +const s = `a${0}b${1}c${2}`; + + +/// [Declarations] //// + + + +//// [/.src/templateLiteralsSourceMap.d.ts] +declare const s = "a0b1c2"; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts new file mode 100644 index 0000000000000..a2a8a0c2cad2e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts @@ -0,0 +1,83 @@ +//// [tests/cases/compiler/typeUsedAsTypeLiteralIndex.ts] //// + +//// [typeUsedAsTypeLiteralIndex.ts] +type K = number | string; +type T = { + [K]: number; // Did you mean to use 'P in K'? +} + +const K1 = Symbol(); +type T1 = { + [K1]: number; +} + +type K2 = "x" | "y"; +type T2 = { + [K2]: number; // Did you mean to use 'K in K2'? +} + +type K3 = number | string; +type T3 = { + [K3]: number; // Did you mean to use 'K in K3'? +} + +type K4 = number | string; +type T4 = { + [K4]: number; + k4: string; +} + + +/// [Declarations] //// + + + +//// [/.src/typeUsedAsTypeLiteralIndex.d.ts] +type K = number | string; +type T = {}; +declare const K1: invalid; +type T1 = { + [K1]: number; +}; +type K2 = "x" | "y"; +type T2 = {}; +type K3 = number | string; +type T3 = {}; +type K4 = number | string; +type T4 = { + k4: string; +}; +/// [Errors] //// + +typeUsedAsTypeLiteralIndex.ts(6,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== typeUsedAsTypeLiteralIndex.ts (1 errors) ==== + type K = number | string; + type T = { + [K]: number; // Did you mean to use 'P in K'? + } + + const K1 = Symbol(); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + type T1 = { + [K1]: number; + } + + type K2 = "x" | "y"; + type T2 = { + [K2]: number; // Did you mean to use 'K in K2'? + } + + type K3 = number | string; + type T3 = { + [K3]: number; // Did you mean to use 'K in K3'? + } + + type K4 = number | string; + type T4 = { + [K4]: number; + k4: string; + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts new file mode 100644 index 0000000000000..2e63864fcb961 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts @@ -0,0 +1,60 @@ +//// [tests/cases/conformance/externalModules/verbatimModuleSyntaxConstEnumUsage.ts] //// + +//// [foo.ts] +export enum Foo { + a = 1, + b, + c, +} + +//// [bar.ts] +import {Foo} from './foo.js'; + +export enum Bar { + a = Foo.a, + c = Foo.c, + e = 5, +} + +/// [Declarations] //// + + + +//// [/.src/bar.d.ts] +export declare enum Bar { + a = 1, + c = 3, + e = 5 +} + +//// [/.src/foo.d.ts] +export declare enum Foo { + a = 1, + b = 2, + c = 3 +} +/// [Errors] //// + +bar.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +bar.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== foo.ts (0 errors) ==== + export enum Foo { + a = 1, + b, + c, + } + +==== bar.ts (2 errors) ==== + import {Foo} from './foo.js'; + + export enum Bar { + a = Foo.a, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = Foo.c, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + e = 5, + } \ No newline at end of file From 2c8eaf5a5e4930167d269c12fc56b6702145214d Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 24 Oct 2023 15:44:47 +0100 Subject: [PATCH 114/224] Improve test performance. Signed-off-by: Titian Cernicova-Dragomir --- .../declarations/transform-project.ts | 4 +- src/harness/fakesHosts.ts | 2 +- src/harness/harnessIO.ts | 53 ++++- src/testRunner/compilerRunner.ts | 217 ++++++++++++------ ...rty1.d.ts => ES5SymbolProperty1.d.ts.diff} | 16 +- ...bigintIndex.d.ts => bigintIndex.d.ts.diff} | 16 +- ...vacy.d.ts => complicatedPrivacy.d.ts.diff} | 16 +- ...s => computedPropertiesNarrowed.d.ts.diff} | 30 +-- ...s => computedPropertyNames6_ES5.d.ts.diff} | 20 +- ...s => computedPropertyNames6_ES6.d.ts.diff} | 20 +- ...tedPropertyNamesOnOverloads_ES5.d.ts.diff} | 10 +- ...tedPropertyNamesOnOverloads_ES6.d.ts.diff} | 10 +- .../{constEnum2.d.ts => constEnum2.d.ts.diff} | 10 +- ...mErrors.d.ts => constEnumErrors.d.ts.diff} | 10 +- .../{constEnums.d.ts => constEnums.d.ts.diff} | 30 +-- ...enumBasics2.d.ts => enumBasics2.d.ts.diff} | 10 +- ...enumBasics3.d.ts => enumBasics3.d.ts.diff} | 10 +- ...ers.d.ts => enumConstantMembers.d.ts.diff} | 30 +-- .../{enumErrors.d.ts => enumErrors.d.ts.diff} | 14 +- ...S6.d.ts => enumExportMergingES6.d.ts.diff} | 10 +- ...InEnum.d.ts => forwardRefInEnum.d.ts.diff} | 22 +- .../diff/{giant.d.ts => giant.d.ts.diff} | 22 +- ...SignatureMustHaveTypeAnnotation.d.ts.diff} | 10 +- ...tTypeCheck.d.ts => intTypeCheck.d.ts.diff} | 14 +- ...eEscapeSequences(target=es2015).d.ts.diff} | 10 +- ...lateEscapeSequences(target=es5).d.ts.diff} | 10 +- ...eEscapeSequences(target=esnext).d.ts.diff} | 10 +- ...ModulesGlobalNamespacesAndEnums.d.ts.diff} | 26 +-- ...ns2.d.ts => mergedDeclarations2.d.ts.diff} | 10 +- ...=> mergedEnumDeclarationCodeGen.d.ts.diff} | 10 +- ...s => overloadsWithComputedNames.d.ts.diff} | 14 +- ...parseBigInt.d.ts => parseBigInt.d.ts.diff} | 30 +-- ...=> parserComputedPropertyName13.d.ts.diff} | 16 +- ...=> parserComputedPropertyName14.d.ts.diff} | 16 +- ...=> parserComputedPropertyName15.d.ts.diff} | 10 +- ...=> parserComputedPropertyName18.d.ts.diff} | 16 +- ...=> parserComputedPropertyName19.d.ts.diff} | 16 +- ... => parserComputedPropertyName2.d.ts.diff} | 16 +- ...=> parserComputedPropertyName20.d.ts.diff} | 10 +- ...=> parserComputedPropertyName21.d.ts.diff} | 10 +- ...=> parserComputedPropertyName37.d.ts.diff} | 16 +- ... parserES5ComputedPropertyName2.d.ts.diff} | 16 +- ... parserES5ComputedPropertyName5.d.ts.diff} | 10 +- ... parserES5ComputedPropertyName8.d.ts.diff} | 16 +- ....ts => parserES5SymbolProperty1.d.ts.diff} | 10 +- ....ts => parserES5SymbolProperty2.d.ts.diff} | 10 +- ....ts => parserES5SymbolProperty8.d.ts.diff} | 16 +- ....ts => parserES5SymbolProperty9.d.ts.diff} | 16 +- ....d.ts => parserIndexSignature11.d.ts.diff} | 10 +- ...5.d.ts => parserIndexSignature5.d.ts.diff} | 10 +- ...Mode8.d.ts => parserStrictMode8.d.ts.diff} | 10 +- ...ment.d.ts => propertyAssignment.d.ts.diff} | 16 +- ... reExportAliasMakesInstantiated.d.ts.diff} | 16 +- ...d.ts => symbolDeclarationEmit12.d.ts.diff} | 10 +- .../original/diff/symbolProperty52.d.ts | 15 -- .../original/diff/symbolProperty52.d.ts.diff | 15 ++ ...erty53.d.ts => symbolProperty53.d.ts.diff} | 16 +- .../original/diff/symbolProperty54.d.ts | 15 -- .../original/diff/symbolProperty54.d.ts.diff | 15 ++ ...erty58.d.ts => symbolProperty58.d.ts.diff} | 16 +- ...erty59.d.ts => symbolProperty59.d.ts.diff} | 10 +- ...4.d.ts => templateLiteralTypes4.d.ts.diff} | 14 +- ...ts => templateLiteralsSourceMap.d.ts.diff} | 10 +- ...s => typeUsedAsTypeLiteralIndex.d.ts.diff} | 34 +-- ...batimModuleSyntaxConstEnumUsage.d.ts.diff} | 14 +- 65 files changed, 647 insertions(+), 545 deletions(-) rename tests/baselines/reference/isolated-declarations/original/diff/{ES5SymbolProperty1.d.ts => ES5SymbolProperty1.d.ts.diff} (56%) rename tests/baselines/reference/isolated-declarations/original/diff/{bigintIndex.d.ts => bigintIndex.d.ts.diff} (50%) rename tests/baselines/reference/isolated-declarations/original/diff/{complicatedPrivacy.d.ts => complicatedPrivacy.d.ts.diff} (57%) rename tests/baselines/reference/isolated-declarations/original/diff/{computedPropertiesNarrowed.d.ts => computedPropertiesNarrowed.d.ts.diff} (56%) rename tests/baselines/reference/isolated-declarations/original/diff/{computedPropertyNames6_ES5.d.ts => computedPropertyNames6_ES5.d.ts.diff} (60%) rename tests/baselines/reference/isolated-declarations/original/diff/{computedPropertyNames6_ES6.d.ts => computedPropertyNames6_ES6.d.ts.diff} (60%) rename tests/baselines/reference/isolated-declarations/original/diff/{computedPropertyNamesOnOverloads_ES5.d.ts => computedPropertyNamesOnOverloads_ES5.d.ts.diff} (68%) rename tests/baselines/reference/isolated-declarations/original/diff/{computedPropertyNamesOnOverloads_ES6.d.ts => computedPropertyNamesOnOverloads_ES6.d.ts.diff} (68%) rename tests/baselines/reference/isolated-declarations/original/diff/{constEnum2.d.ts => constEnum2.d.ts.diff} (66%) rename tests/baselines/reference/isolated-declarations/original/diff/{constEnumErrors.d.ts => constEnumErrors.d.ts.diff} (69%) rename tests/baselines/reference/isolated-declarations/original/diff/{constEnums.d.ts => constEnums.d.ts.diff} (62%) rename tests/baselines/reference/isolated-declarations/original/diff/{enumBasics2.d.ts => enumBasics2.d.ts.diff} (63%) rename tests/baselines/reference/isolated-declarations/original/diff/{enumBasics3.d.ts => enumBasics3.d.ts.diff} (65%) rename tests/baselines/reference/isolated-declarations/original/diff/{enumConstantMembers.d.ts => enumConstantMembers.d.ts.diff} (56%) rename tests/baselines/reference/isolated-declarations/original/diff/{enumErrors.d.ts => enumErrors.d.ts.diff} (64%) rename tests/baselines/reference/isolated-declarations/original/diff/{enumExportMergingES6.d.ts => enumExportMergingES6.d.ts.diff} (67%) rename tests/baselines/reference/isolated-declarations/original/diff/{forwardRefInEnum.d.ts => forwardRefInEnum.d.ts.diff} (57%) rename tests/baselines/reference/isolated-declarations/original/diff/{giant.d.ts => giant.d.ts.diff} (81%) rename tests/baselines/reference/isolated-declarations/original/diff/{indexSignatureMustHaveTypeAnnotation.d.ts => indexSignatureMustHaveTypeAnnotation.d.ts.diff} (70%) rename tests/baselines/reference/isolated-declarations/original/diff/{intTypeCheck.d.ts => intTypeCheck.d.ts.diff} (77%) rename tests/baselines/reference/isolated-declarations/original/diff/{invalidTaggedTemplateEscapeSequences(target=es2015).d.ts => invalidTaggedTemplateEscapeSequences(target=es2015).d.ts.diff} (67%) rename tests/baselines/reference/isolated-declarations/original/diff/{invalidTaggedTemplateEscapeSequences(target=es5).d.ts => invalidTaggedTemplateEscapeSequences(target=es5).d.ts.diff} (67%) rename tests/baselines/reference/isolated-declarations/original/diff/{invalidTaggedTemplateEscapeSequences(target=esnext).d.ts => invalidTaggedTemplateEscapeSequences(target=esnext).d.ts.diff} (67%) rename tests/baselines/reference/isolated-declarations/original/diff/{isolatedModulesGlobalNamespacesAndEnums.d.ts => isolatedModulesGlobalNamespacesAndEnums.d.ts.diff} (59%) rename tests/baselines/reference/isolated-declarations/original/diff/{mergedDeclarations2.d.ts => mergedDeclarations2.d.ts.diff} (70%) rename tests/baselines/reference/isolated-declarations/original/diff/{mergedEnumDeclarationCodeGen.d.ts => mergedEnumDeclarationCodeGen.d.ts.diff} (66%) rename tests/baselines/reference/isolated-declarations/original/diff/{overloadsWithComputedNames.d.ts => overloadsWithComputedNames.d.ts.diff} (69%) rename tests/baselines/reference/isolated-declarations/original/diff/{parseBigInt.d.ts => parseBigInt.d.ts.diff} (60%) rename tests/baselines/reference/isolated-declarations/original/diff/{parserComputedPropertyName13.d.ts => parserComputedPropertyName13.d.ts.diff} (59%) rename tests/baselines/reference/isolated-declarations/original/diff/{parserComputedPropertyName14.d.ts => parserComputedPropertyName14.d.ts.diff} (58%) rename tests/baselines/reference/isolated-declarations/original/diff/{parserComputedPropertyName15.d.ts => parserComputedPropertyName15.d.ts.diff} (70%) rename tests/baselines/reference/isolated-declarations/original/diff/{parserComputedPropertyName18.d.ts => parserComputedPropertyName18.d.ts.diff} (58%) rename tests/baselines/reference/isolated-declarations/original/diff/{parserComputedPropertyName19.d.ts => parserComputedPropertyName19.d.ts.diff} (59%) rename tests/baselines/reference/isolated-declarations/original/diff/{parserComputedPropertyName2.d.ts => parserComputedPropertyName2.d.ts.diff} (58%) rename tests/baselines/reference/isolated-declarations/original/diff/{parserComputedPropertyName20.d.ts => parserComputedPropertyName20.d.ts.diff} (67%) rename tests/baselines/reference/isolated-declarations/original/diff/{parserComputedPropertyName21.d.ts => parserComputedPropertyName21.d.ts.diff} (68%) rename tests/baselines/reference/isolated-declarations/original/diff/{parserComputedPropertyName37.d.ts => parserComputedPropertyName37.d.ts.diff} (57%) rename tests/baselines/reference/isolated-declarations/original/diff/{parserES5ComputedPropertyName2.d.ts => parserES5ComputedPropertyName2.d.ts.diff} (58%) rename tests/baselines/reference/isolated-declarations/original/diff/{parserES5ComputedPropertyName5.d.ts => parserES5ComputedPropertyName5.d.ts.diff} (68%) rename tests/baselines/reference/isolated-declarations/original/diff/{parserES5ComputedPropertyName8.d.ts => parserES5ComputedPropertyName8.d.ts.diff} (59%) rename tests/baselines/reference/isolated-declarations/original/diff/{parserES5SymbolProperty1.d.ts => parserES5SymbolProperty1.d.ts.diff} (63%) rename tests/baselines/reference/isolated-declarations/original/diff/{parserES5SymbolProperty2.d.ts => parserES5SymbolProperty2.d.ts.diff} (62%) rename tests/baselines/reference/isolated-declarations/original/diff/{parserES5SymbolProperty8.d.ts => parserES5SymbolProperty8.d.ts.diff} (54%) rename tests/baselines/reference/isolated-declarations/original/diff/{parserES5SymbolProperty9.d.ts => parserES5SymbolProperty9.d.ts.diff} (54%) rename tests/baselines/reference/isolated-declarations/original/diff/{parserIndexSignature11.d.ts => parserIndexSignature11.d.ts.diff} (71%) rename tests/baselines/reference/isolated-declarations/original/diff/{parserIndexSignature5.d.ts => parserIndexSignature5.d.ts.diff} (66%) rename tests/baselines/reference/isolated-declarations/original/diff/{parserStrictMode8.d.ts => parserStrictMode8.d.ts.diff} (60%) rename tests/baselines/reference/isolated-declarations/original/diff/{propertyAssignment.d.ts => propertyAssignment.d.ts.diff} (57%) rename tests/baselines/reference/isolated-declarations/original/diff/{reExportAliasMakesInstantiated.d.ts => reExportAliasMakesInstantiated.d.ts.diff} (61%) rename tests/baselines/reference/isolated-declarations/original/diff/{symbolDeclarationEmit12.d.ts => symbolDeclarationEmit12.d.ts.diff} (71%) delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff rename tests/baselines/reference/isolated-declarations/original/diff/{symbolProperty53.d.ts => symbolProperty53.d.ts.diff} (50%) delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff rename tests/baselines/reference/isolated-declarations/original/diff/{symbolProperty58.d.ts => symbolProperty58.d.ts.diff} (55%) rename tests/baselines/reference/isolated-declarations/original/diff/{symbolProperty59.d.ts => symbolProperty59.d.ts.diff} (60%) rename tests/baselines/reference/isolated-declarations/original/diff/{templateLiteralTypes4.d.ts => templateLiteralTypes4.d.ts.diff} (80%) rename tests/baselines/reference/isolated-declarations/original/diff/{templateLiteralsSourceMap.d.ts => templateLiteralsSourceMap.d.ts.diff} (57%) rename tests/baselines/reference/isolated-declarations/original/diff/{typeUsedAsTypeLiteralIndex.d.ts => typeUsedAsTypeLiteralIndex.d.ts.diff} (57%) rename tests/baselines/reference/isolated-declarations/original/diff/{verbatimModuleSyntaxConstEnumUsage.d.ts => verbatimModuleSyntaxConstEnumUsage.d.ts.diff} (67%) diff --git a/src/compiler/transformers/declarations/transform-project.ts b/src/compiler/transformers/declarations/transform-project.ts index 17217e232ddfc..13cfb7c3519ec 100644 --- a/src/compiler/transformers/declarations/transform-project.ts +++ b/src/compiler/transformers/declarations/transform-project.ts @@ -47,7 +47,9 @@ export function createIsolatedDeclarationsEmitter(rootDir: string, options: Comp rootDir = normalizePath(rootDir); return (file: string, host: CompilerHost) => { file = normalizePath(file); - const source = host.getSourceFile(file, options.target ?? ScriptTarget.ES2015); + const source = host.getSourceFile(file, { + languageVersion: options.target ?? ScriptTarget.ES2015, + }); if (!source) return {}; 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 1126beb2c1141..51bf722ed76c0 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -309,7 +309,7 @@ export namespace Compiler { return fileName; } - interface HarnessOptions { + export interface HarnessOptions { useCaseSensitiveFileNames?: boolean; includeBuiltFile?: string; baselineFile?: string; @@ -357,7 +357,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") { continue; } const option = getCommandLineOption(name); @@ -403,7 +403,7 @@ export namespace Compiler { fileOptions?: any; } - export function compileFiles( + export function prepareEnvironment( inputFiles: TestFile[], otherFiles: TestFile[], harnessSettings: TestCaseParser.CompilerSettings | undefined, @@ -411,7 +411,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; @@ -458,8 +458,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, options.forceDtsEmit); + + 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); result.symlinks = symlinks; return result; } @@ -614,7 +645,8 @@ export namespace Compiler { }); } - const host = new fakes.CompilerHost(tscHost.vfs, options, /*setParentNodes*/ true); + const fs = tscHost.vfs.shadowRoot ? tscHost.vfs.shadowRoot.shadow() : tscHost.vfs; + const host = new fakes.CompilerHost(fs, options, /*setParentNodes*/ false); const getCanonicalFileName = (f: string) => host.getCanonicalFileName(f); let commonSourceDirectory = ts.getCommonSourceDirectory( options, @@ -1007,16 +1039,17 @@ export namespace Compiler { header: string, dteDeclarationFiles: readonly TestFile[], tscDeclarationFiles: readonly TestFile[], + reason: string, ) { const Diff = require("diff"); const dteContent = declarationContent(dteDeclarationFiles); const tscContent = declarationContent(tscDeclarationFiles); - let fullDiff = "// [[Reason: ]] ////\r\n\r\n"; + let fullDiff = "// [[Reason: " + reason +"]] ////\r\n\r\n"; fullDiff += "//// [" + header + "] ////\r\n\r\n"; - fullDiff += Diff.createTwoFilesPatch("DTE", "TSC", dteContent, tscContent, "DTE output", "TSC output"); + fullDiff += Diff.createTwoFilesPatch("TSC", "DTE", tscContent, dteContent, "declarations", "declarations"); - Baseline.runBaseline(type + "/" + baselinePath.replace(/\.tsx?/, `.d.ts`), fullDiff); + Baseline.runBaseline(type + "/" + baselinePath.replace(/\.tsx?/, `.d.ts.diff`), fullDiff); } function declarationContent(declarationFiles: readonly TestFile[]) { let dtsCode = ""; diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 23562c4e783a6..9c7a6934a1245 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -90,16 +90,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 isolatedTest!: IsolatedDeclarationTest; + let environment!: CompilerTestEnvironment; before(() => { let payload; if (test && test.content) { payload = TestCaseParser.makeUnitsFromTest(test.content, test.file); } - if (payload) { - isolatedTest = new IsolatedDeclarationTest(fileName, payload, configuration); - } - 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()); @@ -107,12 +110,30 @@ 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()); - it(`Correct dte emit for ${fileName}`, () => isolatedTest?.verifyDteOutput()); - it(`Correct tsc emit for ${fileName}`, () => isolatedTest?.verifyTscOutput()); - it(`Correct dte/tsc diff ${fileName}`, () => isolatedTest?.verifyDiff()); + + // We share all ASTs between the two runs to improve performance + // To ensure the tests don't interfere with each other, we run the isolated tests after + // node.symbol can be a source of interference. + describe("isolated declarations", () => { + let isolatedTest: IsolatedDeclarationTest; + before(() => { + isolatedTest = new IsolatedDeclarationTest({ + ...environment, + fileSystem: environment.fileSystem.shadow(), + }); + }); + it(`Correct dte emit for ${fileName}`, () => isolatedTest.verifyDteOutput()); + it(`Correct tsc emit for ${fileName}`, () => isolatedTest.verifyTscOutput()); + it(`Correct dte/tsc diff ${fileName}`, () => isolatedTest.verifyDiff()); + + after(() => { + isolatedTest = undefined!; + }); + }); + after(() => { compilerTest = undefined!; - isolatedTest = undefined!; + environment = undefined!; }); } @@ -133,6 +154,22 @@ export class CompilerBaselineRunner extends RunnerBase { } } } +interface CompilerTestEnvironment { + fileName: string; + justName: string; + toBeCompiled: Compiler.TestFile[]; + otherFiles: Compiler.TestFile[]; + tsConfigFiles: 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 CompilerTestBase { private static varyBy: readonly string[] = [ @@ -185,13 +222,27 @@ class CompilerTestBase { // equivalent to other files on the file system not directly passed to the compiler (ie things that are referenced by other files) protected otherFiles: 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.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(); @@ -202,9 +253,9 @@ class CompilerTestBase { 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}`; } } @@ -216,29 +267,30 @@ class CompilerTestBase { 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]; @@ -247,15 +299,15 @@ class CompilerTestBase { // 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); }); } @@ -265,16 +317,31 @@ class CompilerTestBase { 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, + }; } public static getConfigurations(file: string): CompilerFileBasedTest { @@ -285,7 +352,7 @@ class CompilerTestBase { return { file, configurations, content }; } - private createHarnessTestFile(unit: TestCaseParser.TestUnitData): Compiler.TestFile { + private static createHarnessTestFile(unit: TestCaseParser.TestUnitData): Compiler.TestFile { return { unitName: unit.name, content: unit.content, @@ -370,32 +437,6 @@ class CompilerTest extends CompilerTestBase { } } -function changeSettingForIsolatedDeclarations(settings: TestCaseParser.CompilerSettings) { - const clone: TestCaseParser.CompilerSettings = { - ...settings, - allowJS: "false", - checkJS: "false", - declaration: "true", - isolatedDeclarations: "true", - forceDtsEmit: "true", - }; - delete clone.outFile; - delete clone.outfile; - delete clone.out; - return clone; -} - -function removeOutFromOptions(tsConfig: ts.ParsedCommandLine | undefined) { - if (!tsConfig) return undefined; - - const clone: ts.ParsedCommandLine = { - ...tsConfig, - options: ts.cloneCompilerOptions(tsConfig.options), - }; - delete clone.options.outFile; - delete clone.options.out; - return clone; -} export class IsolatedDeclarationTest extends CompilerTestBase { private dteDiagnostics: ts.Diagnostic[]; tscNonIsolatedDeclarationsErrors: ts.Diagnostic[]; @@ -403,17 +444,42 @@ export class IsolatedDeclarationTest extends CompilerTestBase { private dteDtsFile: Compiler.TestFile[]; private tscDtsFiles: Compiler.TestFile[]; tscIsolatedDeclarationsErrors: ts.Diagnostic[]; - constructor(fileName: string, testCaseContent: TestCaseParser.TestCaseContent, configurationOverrides?: TestCaseParser.CompilerSettings) { - super( - fileName, - { - ...testCaseContent, - settings: changeSettingForIsolatedDeclarations(testCaseContent.settings), - tsConfig: removeOutFromOptions(testCaseContent.tsConfig), + + static transformEnvironment(compilerEnvironment: CompilerTestEnvironment): CompilerTestEnvironment { + const clonedOptions: ts.CompilerOptions & Compiler.HarnessOptions = ts.cloneCompilerOptions(compilerEnvironment.compilerOptions); + clonedOptions.declaration = true; + clonedOptions.isolatedDeclarations = true; + clonedOptions.allowJs = false; + clonedOptions.checkJs = false; + clonedOptions.skipLibCheck = true; + clonedOptions.forceDtsEmit = true; + delete clonedOptions.outFile; + delete clonedOptions.out; + + const clonedSettings: TestCaseParser.CompilerSettings = { + ...compilerEnvironment.testCaseContent.settings, + allowJS: "false", + checkJS: "false", + declaration: "true", + isolatedDeclarations: "true", + forceDtsEmit: "true", + skipLibCheck: "true", + }; + delete clonedSettings.outFile; + delete clonedSettings.outfile; + delete clonedSettings.out; + + return { + ...compilerEnvironment, + testCaseContent: { + ...compilerEnvironment.testCaseContent, + settings: clonedSettings, }, - configurationOverrides, - // /*forceIncludeAllFiles*/ true, - ); + compilerOptions: clonedOptions, + }; + } + constructor(compilerEnvironment: CompilerTestEnvironment) { + super(IsolatedDeclarationTest.transformEnvironment(compilerEnvironment)); const currentDirectory = this.harnessSettings.currentDirectory ?? vfs.srcFolder; const dteResult = Compiler.compileDeclarationFilesWithIsolatedEmitter( @@ -489,6 +555,7 @@ export class IsolatedDeclarationTest extends CompilerTestBase { this.fileName, this.dteDtsFile, this.tscDtsFiles, + this.harnessSettings.isolatedDeclarationDiffReason, ); } } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff similarity index 56% rename from tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff index c3da55b80d136..b854bab73e51b 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff @@ -1,16 +1,16 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/Symbols/ES5SymbolProperty1.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -4,7 +4,5 @@ +--- TSC declarations ++++ DTE declarations +@@ -4,5 +4,7 @@ interface SymbolConstructor { foo: string; } declare var Symbol: SymbolConstructor; --declare var obj: { -- [Symbol.foo]: number; --}; -+declare var obj: invalid; +-declare var obj: invalid; ++declare var obj: { ++ [Symbol.foo]: number; ++}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff similarity index 50% rename from tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff index c98d5c9391369..6a7005c8dbb6d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff @@ -1,16 +1,16 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/compiler/bigintIndex.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -14,7 +14,5 @@ +--- TSC declarations ++++ DTE declarations +@@ -14,5 +14,7 @@ declare const a: {}; declare const b: { [1n]: number; }; --declare const c: { -- [bigNum]: number; --}; -+declare const c: invalid; +-declare const c: invalid; ++declare const c: { ++ [bigNum]: number; ++}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/complicatedPrivacy.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/complicatedPrivacy.d.ts.diff similarity index 57% rename from tests/baselines/reference/isolated-declarations/original/diff/complicatedPrivacy.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/complicatedPrivacy.d.ts.diff index ca82cdaf68769..01a6f65a012ab 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/complicatedPrivacy.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/complicatedPrivacy.d.ts.diff @@ -1,19 +1,19 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/compiler/complicatedPrivacy.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -17,11 +17,9 @@ +--- TSC declarations ++++ DTE declarations +@@ -17,9 +17,11 @@ }): invalid; export function f3(): { (a: number): C1; }; -- export function f4(arg1: { -- [number]: C1; -- }): invalid; -+ export function f4(arg1: {}): invalid; +- export function f4(arg1: {}): invalid; ++ export function f4(arg1: { ++ [number]: C1; ++ }): invalid; export function f5(arg2: { new (arg1: C1): C1; }): invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff similarity index 56% rename from tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff index 6b3925d7bc85c..79a7df7e900fb 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff @@ -1,33 +1,33 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/compiler/computedPropertiesNarrowed.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,11 +1,8 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,11 @@ //// [/.src/computedPropertiesNarrowed.d.ts] --declare const x: 0 | 1; --export declare let o: { -- [x]: number; --}; -+export declare let o: invalid; +-export declare let o: invalid; ++declare const x: 0 | 1; ++export declare let o: { ++ [x]: number; ++}; declare const y: 0; export declare let o2: { [y]: number; }; -@@ -15,12 +12,9 @@ +@@ -12,9 +15,12 @@ export declare let o31: { [-1]: number; }; export declare let o32: invalid; --declare let u: invalid; --export declare let o4: { -- [u]: number; --}; -+export declare let o4: 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: { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff similarity index 60% rename from tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff index b74158ecf4d03..0dfd7fe84f0b5 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff @@ -1,18 +1,18 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES5.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -3,9 +3,5 @@ +--- TSC declarations ++++ DTE declarations +@@ -3,5 +3,9 @@ //// [/.src/computedPropertyNames6_ES5.d.ts] declare var p1: number | string; declare var p2: number | number[]; declare var p3: string | boolean; --declare var v: { -- [p1]: number; -- [p2]: number; -- [p3]: number; --}; -+declare var v: invalid; +-declare var v: invalid; ++declare var v: { ++ [p1]: number; ++ [p2]: number; ++ [p3]: number; ++}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff similarity index 60% rename from tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff index 27712d55ec329..37c56b3d27b85 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff @@ -1,18 +1,18 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES6.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -3,9 +3,5 @@ +--- TSC declarations ++++ DTE declarations +@@ -3,5 +3,9 @@ //// [/.src/computedPropertyNames6_ES6.d.ts] declare var p1: number | string; declare var p2: number | number[]; declare var p3: string | boolean; --declare var v: { -- [p1]: number; -- [p2]: number; -- [p3]: number; --}; -+declare var v: invalid; +-declare var v: invalid; ++declare var v: { ++ [p1]: number; ++ [p2]: number; ++ [p3]: number; ++}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff similarity index 68% rename from tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff index 20d9263602317..888aaadda6bab 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff @@ -1,14 +1,14 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -5,5 +5,6 @@ +--- TSC declarations ++++ DTE declarations +@@ -5,6 +5,5 @@ declare var accessorName: string; declare class C { [methodName](v: string): invalid; [methodName](): invalid; -+ [methodName](v?: string): invalid; +- [methodName](v?: string): invalid; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff similarity index 68% rename from tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff index 27941c8725b8b..5bf715486e6b8 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff @@ -1,14 +1,14 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -5,5 +5,6 @@ +--- TSC declarations ++++ DTE declarations +@@ -5,6 +5,5 @@ declare var accessorName: string; declare class C { [methodName](v: string): invalid; [methodName](): invalid; -+ [methodName](v?: string): invalid; +- [methodName](v?: string): invalid; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts.diff similarity index 66% rename from tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts.diff index e5acad6cd674f..48fd8eec5ca83 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts.diff @@ -1,15 +1,15 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/constEnums/constEnum2.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output +--- TSC declarations ++++ DTE declarations @@ -5,6 +5,6 @@ declare const enum D { d = 10, e, f, -- g -+ g = 0 +- g = 0 ++ g } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff similarity index 69% rename from tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff index 63fbce67c446b..f2c3eb3acd422 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff @@ -1,17 +1,17 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/compiler/constEnumErrors.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output +--- TSC declarations ++++ DTE declarations @@ -6,9 +6,9 @@ } declare namespace E { } declare const enum E1 { -- X, -+ X = 0, +- X = 0, ++ X, Y, Y1 } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts.diff similarity index 62% rename from tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts.diff index 1c805cef8de52..ccae77e13405b 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts.diff @@ -1,21 +1,21 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/compiler/constEnums.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output +--- TSC declarations ++++ DTE declarations @@ -28,11 +28,11 @@ T = 11, U = 11, V = 11, W = 11, -- W1, -- W2, -- W3, -+ W1 = 100, -+ W2 = 100, -+ W3 = 100, +- W1 = 100, +- W2 = 100, +- W3 = 100, ++ W1, ++ W2, ++ W3, W4 = 11, W5 = 11 } @@ -25,8 +25,8 @@ namespace C { const enum E { V1 = 1, -- V2 -+ V2 = 101 +- V2 = 101 ++ V2 } } } @@ -35,10 +35,10 @@ namespace B { namespace C { const enum E { -- V3, -- V4 -+ V3 = 64, -+ V4 = 2 +- V3 = 64, +- V4 = 2 ++ V3, ++ V4 } } } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts.diff similarity index 63% rename from tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts.diff index 63a3be33889da..545833c50921b 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts.diff @@ -1,17 +1,17 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/compiler/enumBasics2.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output +--- TSC declarations ++++ DTE declarations @@ -9,8 +9,8 @@ z } declare enum Bar { a,// ok -- b,// ok -+ b = 2,// ok +- b = 2,// ok ++ b,// ok c,// ok d } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumBasics3.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/enumBasics3.d.ts.diff similarity index 65% rename from tests/baselines/reference/isolated-declarations/original/diff/enumBasics3.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/enumBasics3.d.ts.diff index 6533e4e2005d4..459a7d2660127 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/enumBasics3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/enumBasics3.d.ts.diff @@ -1,17 +1,17 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/compiler/enumBasics3.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output +--- TSC declarations ++++ DTE declarations @@ -11,9 +11,9 @@ } declare namespace M { namespace N { enum E2 { -- b, -+ b = 1, +- b = 1, ++ b, c } } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts.diff similarity index 56% rename from tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts.diff index 426a85bda3b05..ba26b1fde278e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts.diff @@ -1,31 +1,31 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/enums/enumConstantMembers.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output +--- TSC declarations ++++ DTE declarations @@ -22,17 +22,17 @@ a = Infinity, b = Infinity, c = Infinity, d = NaN, -- e, -- f, -- g -+ e = NaN, -+ f = Infinity, -+ g = -Infinity +- e = NaN, +- f = Infinity, +- g = -Infinity ++ e, ++ f, ++ g } declare const enum E6 { a = Infinity, b = Infinity, c = Infinity, d = NaN, -- e, -- f, -- g -+ e = NaN, -+ f = Infinity, -+ g = -Infinity +- e = NaN, +- f = Infinity, +- g = -Infinity ++ e, ++ f, ++ g } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/enumErrors.d.ts.diff similarity index 64% rename from tests/baselines/reference/isolated-declarations/original/diff/enumErrors.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/enumErrors.d.ts.diff index fbe6aefe5e7c8..ab8a64ad19da1 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/enumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/enumErrors.d.ts.diff @@ -1,19 +1,19 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/enums/enumErrors.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output +--- TSC declarations ++++ DTE declarations @@ -16,10 +16,10 @@ A = 0, B = 0 } declare enum E10 { -- A, -- B -+ A = 0, -+ B = 0 +- A = 0, +- B = 0 ++ A, ++ B } declare enum E11 { A, diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts.diff similarity index 67% rename from tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts.diff index c325d9cfcf389..df5b0318915ff 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts.diff @@ -1,15 +1,15 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/enums/enumExportMergingES6.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output +--- TSC declarations ++++ DTE declarations @@ -7,6 +7,6 @@ export declare enum Animals { Dog = 2 } export declare enum Animals { -- CatDog -+ CatDog = 3 +- CatDog = 3 ++ CatDog } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff similarity index 57% rename from tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff index 42cf8c4bca023..4ff1f216f7dec 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff @@ -1,23 +1,23 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/compiler/forwardRefInEnum.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output +--- TSC declarations ++++ DTE declarations @@ -1,12 +1,12 @@ //// [/.src/forwardRefInEnum.d.ts] declare enum E1 { -- X, -- X1, -- Y, -- Y1 -+ X = 0, -+ X1 = 0, -+ Y = 0, -+ Y1 = 0 +- X = 0, +- X1 = 0, +- Y = 0, +- Y1 = 0 ++ X, ++ X1, ++ Y, ++ Y1 } declare enum E1 { Z = 4 diff --git a/tests/baselines/reference/isolated-declarations/original/diff/giant.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/giant.d.ts.diff similarity index 81% rename from tests/baselines/reference/isolated-declarations/original/diff/giant.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/giant.d.ts.diff index dcde739e40f07..5f35d4162828e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/giant.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/giant.d.ts.diff @@ -1,46 +1,46 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/compiler/giant.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -39,9 +39,8 @@ +--- 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; ++ [p]: any; [p1: string]: any; [p2: string, p3: number]: any; p: any; p1?: any; -@@ -92,9 +91,8 @@ +@@ -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; ++ [p]: any; [p1: string]: any; [p2: string, p3: number]: any; p: any; p1?: any; -@@ -208,9 +206,8 @@ +@@ -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; ++ [p]: any; [p1: string]: any; [p2: string, p3: number]: any; p: any; p1?: any; -@@ -268,9 +265,8 @@ +@@ -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; ++ [p]: any; [p1: string]: any; [p2: string, p3: number]: any; p: any; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff similarity index 70% rename from tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff index dcf6af651ba61..b6627275330eb 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff @@ -1,16 +1,16 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,9 +1,8 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,9 @@ //// [/.src/indexSignatureMustHaveTypeAnnotation.d.ts] interface I { -- [x]: string; ++ [x]: string; [x: string]: any; } declare class C { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/intTypeCheck.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/intTypeCheck.d.ts.diff similarity index 77% rename from tests/baselines/reference/isolated-declarations/original/diff/intTypeCheck.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/intTypeCheck.d.ts.diff index 6b227bac21bdc..6e38197012121 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/intTypeCheck.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/intTypeCheck.d.ts.diff @@ -1,26 +1,26 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/compiler/intTypeCheck.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -30,9 +30,8 @@ +--- TSC declarations ++++ DTE declarations +@@ -30,8 +30,9 @@ new (p4: string, p5?: string): any; new (p6: string, ...p7: any[]): any; } interface i4 { -- [p]: any; ++ [p]: any; [p1: string]: any; [p2: string, p3: number]: any; } interface i5 extends i1 { -@@ -63,9 +62,8 @@ +@@ -62,8 +63,9 @@ new (p2?: string): any; new (...p3: any[]): any; new (p4: string, p5?: string): any; new (p6: string, ...p7: any[]): any; -- [p]: any; ++ [p]: any; [p1: string]: any; [p2: string, p3: number]: any; p: any; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts b/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts.diff similarity index 67% rename from tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts.diff index f98ed569d4bc4..a529644e9c834 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts.diff @@ -1,17 +1,17 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output +--- TSC declarations ++++ DTE declarations @@ -4,9 +4,9 @@ declare function tag(str: any, ...args: any[]): any; declare const a: invalid; declare const b: invalid; declare const x: invalid; --declare const y = `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; -+declare const y = "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld"; +-declare const y = "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld"; ++declare const y = `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; declare const z: invalid; declare const a1: invalid; declare const a2: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es5).d.ts b/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es5).d.ts.diff similarity index 67% rename from tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es5).d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es5).d.ts.diff index f98ed569d4bc4..a529644e9c834 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es5).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es5).d.ts.diff @@ -1,17 +1,17 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output +--- TSC declarations ++++ DTE declarations @@ -4,9 +4,9 @@ declare function tag(str: any, ...args: any[]): any; declare const a: invalid; declare const b: invalid; declare const x: invalid; --declare const y = `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; -+declare const y = "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld"; +-declare const y = "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld"; ++declare const y = `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; declare const z: invalid; declare const a1: invalid; declare const a2: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts b/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts.diff similarity index 67% rename from tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts.diff index f98ed569d4bc4..a529644e9c834 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts.diff @@ -1,17 +1,17 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output +--- TSC declarations ++++ DTE declarations @@ -4,9 +4,9 @@ declare function tag(str: any, ...args: any[]): any; declare const a: invalid; declare const b: invalid; declare const x: invalid; --declare const y = `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; -+declare const y = "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld"; +-declare const y = "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld"; ++declare const y = `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; declare const z: invalid; declare const a1: invalid; declare const a2: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff similarity index 59% rename from tests/baselines/reference/isolated-declarations/original/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff index 8d670df92a63c..cc69f28c8eb5b 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff @@ -1,27 +1,27 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/compiler/isolatedModulesGlobalNamespacesAndEnums.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output +--- TSC declarations ++++ DTE declarations @@ -12,15 +12,15 @@ declare const d = "d"; //// [/.src/enum2.d.ts] declare enum Enum { -- D, -- E,// error -- Y,// error -- Z -+ D = "d", -+ E = 0,// error -+ Y = 1000000,// error -+ Z = 0 +- D = "d", +- E = 0,// error +- Y = 1000000,// error +- Z = 0 ++ D, ++ E,// error ++ Y,// error ++ Z } declare enum Enum { -- F -+ F = 0 +- F = 0 ++ F } //// [/.src/module-namespaces.d.ts] diff --git a/tests/baselines/reference/isolated-declarations/original/diff/mergedDeclarations2.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/mergedDeclarations2.d.ts.diff similarity index 70% rename from tests/baselines/reference/isolated-declarations/original/diff/mergedDeclarations2.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/mergedDeclarations2.d.ts.diff index 946fa374876a9..75d89e0276bf2 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/mergedDeclarations2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/mergedDeclarations2.d.ts.diff @@ -1,17 +1,17 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/compiler/mergedDeclarations2.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output +--- TSC declarations ++++ DTE declarations @@ -4,9 +4,9 @@ declare enum Foo { b = 0 } declare enum Foo { -- a -+ a = 0 +- a = 0 ++ a } declare namespace Foo { var x: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts.diff similarity index 66% rename from tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts.diff index b68bfa797fe28..df69baaba4a5c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts.diff @@ -1,15 +1,15 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/compiler/mergedEnumDeclarationCodeGen.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output +--- TSC declarations ++++ DTE declarations @@ -5,6 +5,6 @@ a = 0, b = 0 } declare enum E { -- c -+ c = 0 +- c = 0 ++ c } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff similarity index 69% rename from tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff index 827315ed74279..09efd0043dcc6 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff @@ -1,27 +1,27 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/compiler/overloadsWithComputedNames.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -19,18 +19,19 @@ +--- TSC declarations ++++ DTE declarations +@@ -19,19 +19,18 @@ [uniqueSym2](): void; [uniqueSym](): void; } interface I1 { -- [sym](): void; ++ [sym](): void; [uniqueSym2](): void; [uniqueSym](): void; [uniqueSym](): void; } declare class C2 { [strUnion](): void; -+ [strUnion](): invalid; +- [strUnion](): invalid; } declare class I2 { [strUnion](): void; -+ [strUnion](): invalid; +- [strUnion](): invalid; } declare class C3 { [1](): void; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts.diff similarity index 60% rename from tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts.diff index e50856872e8aa..7ddb6a5dc941e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts.diff @@ -1,31 +1,31 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/compiler/parseBigInt.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output +--- TSC declarations ++++ DTE declarations @@ -1,19 +1,19 @@ //// [/.src/parseBigInt.d.ts] --declare const bin = 0b101, binBig = 5n; --declare const oct = 0o567, octBig = 375n; --declare const hex = 0xC0B, hexBig = 0xc0bn; -+declare const bin = 5, binBig = 5n; -+declare const oct = 375, octBig = 375n; -+declare const hex = 3083, hexBig = 3083n; +-declare const bin = 5, binBig = 5n; +-declare const oct = 375, octBig = 375n; +-declare const hex = 3083, hexBig = 3083n; ++declare const bin = 0b101, binBig = 5n; ++declare const oct = 0o567, octBig = 375n; ++declare const hex = 0xC0B, hexBig = 0xc0bn; declare const dec = 123, decBig = 123n; declare const largeBin = 384307168202282325n; declare const largeOct = 1505852261029722487n; declare const largeDec = 12345678091234567890n; --declare const largeHex = 0x1234567890abcdefn; -+declare const largeHex = 1311768467294899695n; +-declare const largeHex = 1311768467294899695n; ++declare const largeHex = 0x1234567890abcdefn; declare const separatedBin = 21n; declare const separatedOct = 342391n; declare const separatedDec = 123456789n; --declare const separatedHex = 0x0abcdefn; -+declare const separatedHex = 11259375n; +-declare const separatedHex = 11259375n; ++declare const separatedHex = 0x0abcdefn; declare const zero = 0n; declare const oneBit = 1n; declare const twoBit = 3n; @@ -35,8 +35,8 @@ declare const unaryPlusHex: number; declare const emptyBinary = 0n; declare const emptyOct = 0n; --declare const emptyHex = 0x0n; -+declare const emptyHex = 0n; +-declare const emptyHex = 0n; ++declare const emptyHex = 0x0n; declare const leadingSeparator: invalid; declare const trailingSeparator = 123n; declare const doubleSeparator = 123456789n; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff similarity index 59% rename from tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff index ea46fee0fc8e5..015584b0510ba 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff @@ -1,15 +1,15 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,6 +1,4 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,6 @@ //// [/.src/parserComputedPropertyName13.d.ts] --declare var v: { -- [e]: number; --}; -+declare var v: {}; +-declare var v: {}; ++declare var v: { ++ [e]: number; ++}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff similarity index 58% rename from tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff index 22b10265a5197..bd3e8946417cf 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff @@ -1,15 +1,15 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,6 +1,4 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,6 @@ //// [/.src/parserComputedPropertyName14.d.ts] --declare var v: { -- [e](): number; --}; -+declare var v: {}; +-declare var v: {}; ++declare var v: { ++ [e](): number; ++}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff similarity index 70% rename from tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff index 4e5258582105f..97ef91d847f6e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff @@ -1,14 +1,14 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -2,6 +2,5 @@ +--- TSC declarations ++++ DTE declarations +@@ -2,5 +2,6 @@ //// [/.src/parserComputedPropertyName15.d.ts] declare var v: { [e: number]: string; -- [e]: number; ++ [e]: number; }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff similarity index 58% rename from tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff index ff8c47c55b77a..a08220ed9ad77 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff @@ -1,15 +1,15 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,6 +1,4 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,6 @@ //// [/.src/parserComputedPropertyName18.d.ts] --declare var v: { -- [e]?(): number; --}; -+declare var v: {}; +-declare var v: {}; ++declare var v: { ++ [e]?(): number; ++}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff similarity index 59% rename from tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff index 1f4119acf7a72..ea0230d0144ad 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff @@ -1,15 +1,15 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,6 +1,4 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,6 @@ //// [/.src/parserComputedPropertyName19.d.ts] --declare var v: { -- [e]?: any; --}; -+declare var v: {}; +-declare var v: {}; ++declare var v: { ++ [e]?: any; ++}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff similarity index 58% rename from tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff index 8f07b4f906a01..9c330abe8cb20 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff @@ -1,15 +1,15 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,6 +1,4 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,6 @@ //// [/.src/parserComputedPropertyName2.d.ts] --declare var v: { -- [e]: number; --}; -+declare var v: invalid; +-declare var v: invalid; ++declare var v: { ++ [e]: number; ++}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff similarity index 67% rename from tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff index a2a53dbb51d35..dec089a9e3985 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff @@ -1,14 +1,14 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,6 +1,5 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,6 @@ //// [/.src/parserComputedPropertyName20.d.ts] interface I { -- [e](): number; ++ [e](): number; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff similarity index 68% rename from tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff index e33cb2650c88c..a3e221ffcd53a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff @@ -1,14 +1,14 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,6 +1,5 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,6 @@ //// [/.src/parserComputedPropertyName21.d.ts] interface I { -- [e]: number; ++ [e]: number; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff similarity index 57% rename from tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff index e3da54139c11c..c2baa831dc0ac 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff @@ -1,15 +1,15 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,6 +1,4 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,6 @@ //// [/.src/parserComputedPropertyName37.d.ts] --declare var v: { -- [public]: number; --}; -+declare var v: invalid; +-declare var v: invalid; ++declare var v: { ++ [public]: number; ++}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff similarity index 58% rename from tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff index d7ab24a969428..845d52988ac89 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff @@ -1,15 +1,15 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,6 +1,4 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,6 @@ //// [/.src/parserES5ComputedPropertyName2.d.ts] --declare var v: { -- [e]: number; --}; -+declare var v: invalid; +-declare var v: invalid; ++declare var v: { ++ [e]: number; ++}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff similarity index 68% rename from tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff index e641620f49de9..85c7c11af1752 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff @@ -1,14 +1,14 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,6 +1,5 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,6 @@ //// [/.src/parserES5ComputedPropertyName5.d.ts] interface I { -- [e]: number; ++ [e]: number; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff similarity index 59% rename from tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff index 02990efdb6f3c..2272c887d0dd6 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff @@ -1,15 +1,15 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,6 +1,4 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,6 @@ //// [/.src/parserES5ComputedPropertyName8.d.ts] --declare var v: { -- [e]: number; --}; -+declare var v: {}; +-declare var v: {}; ++declare var v: { ++ [e]: number; ++}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff similarity index 63% rename from tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff index 67c3f328b6005..dbf0d91abc3ab 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff @@ -1,14 +1,14 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty1.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,6 +1,5 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,6 @@ //// [/.src/parserES5SymbolProperty1.d.ts] interface I { -- [Symbol.iterator]: string; ++ [Symbol.iterator]: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff similarity index 62% rename from tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff index 04184a604250f..04b38fcb12994 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff @@ -1,14 +1,14 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty2.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,6 +1,5 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,6 @@ //// [/.src/parserES5SymbolProperty2.d.ts] interface I { -- [Symbol.unscopables](): string; ++ [Symbol.unscopables](): string; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff similarity index 54% rename from tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff index 01844a02d66e5..ce3920b212a94 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff @@ -1,15 +1,15 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,6 +1,4 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,6 @@ //// [/.src/parserES5SymbolProperty8.d.ts] --declare var x: { -- [Symbol.toPrimitive](): string; --}; -+declare var x: {}; +-declare var x: {}; ++declare var x: { ++ [Symbol.toPrimitive](): string; ++}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff similarity index 54% rename from tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff index 3e80b65417aa3..159dee57316e9 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff @@ -1,15 +1,15 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty9.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,6 +1,4 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,6 @@ //// [/.src/parserES5SymbolProperty9.d.ts] --declare var x: { -- [Symbol.toPrimitive]: string; --}; -+declare var x: {}; +-declare var x: {}; ++declare var x: { ++ [Symbol.toPrimitive]: string; ++}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff similarity index 71% rename from tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff index 941063a96caff..db5df3271bcf7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff @@ -1,16 +1,16 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,8 +1,7 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,7 +1,8 @@ //// [/.src/parserIndexSignature11.d.ts] interface I { -- [p]: any; ++ [p]: any; [p1: string]: any; [p2: string, p3: number]: any; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff similarity index 66% rename from tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff index edc582b90afe9..eda4a775f5885 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff @@ -1,14 +1,14 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,6 +1,5 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,6 @@ //// [/.src/parserIndexSignature5.d.ts] interface I { -- [a]: any; ++ [a]: any; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff similarity index 60% rename from tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff index 3332b4f5c4c01..48d9cc9f5286a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff @@ -1,12 +1,12 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,4 +1,3 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,3 +1,4 @@ //// [/.src/parserStrictMode8.d.ts] --declare function eval(): invalid; ++declare function eval(): invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/propertyAssignment.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/propertyAssignment.d.ts.diff similarity index 57% rename from tests/baselines/reference/isolated-declarations/original/diff/propertyAssignment.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/propertyAssignment.d.ts.diff index 553324d649d15..1b97a9e0b3c8c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/propertyAssignment.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/propertyAssignment.d.ts.diff @@ -1,19 +1,19 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/compiler/propertyAssignment.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -6,11 +6,9 @@ +--- TSC declarations ++++ DTE declarations +@@ -6,9 +6,11 @@ }; declare var bar1: { x: number; }; --declare var foo2: { -- [index]: any; --}; -+declare var foo2: {}; +-declare var foo2: {}; ++declare var foo2: { ++ [index]: any; ++}; declare var bar2: { x: number; }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/reExportAliasMakesInstantiated.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/reExportAliasMakesInstantiated.d.ts.diff similarity index 61% rename from tests/baselines/reference/isolated-declarations/original/diff/reExportAliasMakesInstantiated.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/reExportAliasMakesInstantiated.d.ts.diff index 525e97b72f085..3db2a2702e1ed 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/reExportAliasMakesInstantiated.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/reExportAliasMakesInstantiated.d.ts.diff @@ -1,17 +1,17 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/internalModules/moduleDeclarations/reExportAliasMakesInstantiated.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -9,5 +9,9 @@ +--- TSC declarations ++++ DTE declarations +@@ -9,9 +9,5 @@ import test1 = pack1.test1; export { test1 }; } export import test1 = pack2.test1; -+declare namespace mod1 { -+ type test1 = string; -+ export { test1 }; -+} +-declare namespace mod1 { +- type test1 = string; +- export { test1 }; +-} export {}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts.diff similarity index 71% rename from tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts.diff index eedb001736f5d..9b09992508980 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts.diff @@ -1,16 +1,16 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -5,9 +5,8 @@ +--- TSC declarations ++++ DTE declarations +@@ -5,8 +5,9 @@ interface I { } export class C { [Symbol.iterator]: I; -- [Symbol.toPrimitive](x: I): invalid; ++ [Symbol.toPrimitive](x: I): invalid; [Symbol.isConcatSpreadable](): I; get [Symbol.toPrimitive](): invalid; set [Symbol.toPrimitive](x: I); diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts deleted file mode 100644 index 428fc2e5b7c8e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -// [[Reason: ]] //// - -//// [tests/cases/conformance/es6/Symbols/symbolProperty52.ts] //// - -=================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,6 +1,4 @@ - - - //// [/.src/symbolProperty52.d.ts] --declare var obj: { -- [Symbol.nonsense]: number; --}; -+declare var obj: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff new file mode 100644 index 0000000000000..d13fc51db5cd6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff @@ -0,0 +1,15 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/Symbols/symbolProperty52.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,6 @@ + + + //// [/.src/symbolProperty52.d.ts] +-declare var obj: invalid; ++declare var obj: { ++ [Symbol.nonsense]: number; ++}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff similarity index 50% rename from tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff index 89d7fe53ba6b5..4ba1e39ff55e6 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff @@ -1,15 +1,15 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/es6/Symbols/symbolProperty53.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,6 +1,4 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,6 @@ //// [/.src/symbolProperty53.d.ts] --declare var obj: { -- [Symbol.for]: number; --}; -+declare var obj: invalid; +-declare var obj: invalid; ++declare var obj: { ++ [Symbol.for]: number; ++}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts deleted file mode 100644 index ff5f0cc032c8b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -// [[Reason: ]] //// - -//// [tests/cases/conformance/es6/Symbols/symbolProperty54.ts] //// - -=================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,6 +1,4 @@ - - - //// [/.src/symbolProperty54.d.ts] --declare var obj: { -- [Symbol.prototype]: number; --}; -+declare var obj: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff new file mode 100644 index 0000000000000..eaf4492a2dc93 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff @@ -0,0 +1,15 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/Symbols/symbolProperty54.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,6 @@ + + + //// [/.src/symbolProperty54.d.ts] +-declare var obj: invalid; ++declare var obj: { ++ [Symbol.prototype]: number; ++}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff similarity index 55% rename from tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff index 319c62c397f1a..731e29e5bae30 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff @@ -1,16 +1,16 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/es6/Symbols/symbolProperty58.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -3,7 +3,5 @@ +--- TSC declarations ++++ DTE declarations +@@ -3,5 +3,7 @@ //// [/.src/symbolProperty58.d.ts] interface SymbolConstructor { foo: string; } --declare var obj: { -- [Symbol.foo]: number; --}; -+declare var obj: invalid; +-declare var obj: invalid; ++declare var obj: { ++ [Symbol.foo]: number; ++}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff similarity index 60% rename from tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff index e9e8ddc0b65d7..b9c0f369134a2 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff @@ -1,14 +1,14 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/es6/Symbols/symbolProperty59.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,6 +1,5 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,6 @@ //// [/.src/symbolProperty59.d.ts] interface I { -- [Symbol.keyFor]: string; ++ [Symbol.keyFor]: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralTypes4.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralTypes4.d.ts.diff similarity index 80% rename from tests/baselines/reference/isolated-declarations/original/diff/templateLiteralTypes4.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/templateLiteralTypes4.d.ts.diff index f32eca5207838..95401ac8ca9dc 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralTypes4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralTypes4.d.ts.diff @@ -1,19 +1,19 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/types/literal/templateLiteralTypes4.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output +--- 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, -- One -+ Zero = 0, -+ One = 1 +- 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; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralsSourceMap.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralsSourceMap.d.ts.diff similarity index 57% rename from tests/baselines/reference/isolated-declarations/original/diff/templateLiteralsSourceMap.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/templateLiteralsSourceMap.d.ts.diff index d5387e3d9058f..4b31d7fd6f49c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralsSourceMap.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralsSourceMap.d.ts.diff @@ -1,13 +1,13 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/compiler/templateLiteralsSourceMap.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output +--- TSC declarations ++++ DTE declarations @@ -1,4 +1,4 @@ //// [/.src/templateLiteralsSourceMap.d.ts] --declare const s = `a${0}b${1}c${2}`; -+declare const s = "a0b1c2"; +-declare const s = "a0b1c2"; ++declare const s = `a${0}b${1}c${2}`; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff similarity index 57% rename from tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff index a64af8e922f8a..38012f3f814fd 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff @@ -1,35 +1,35 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/compiler/typeUsedAsTypeLiteralIndex.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output -@@ -1,24 +1,17 @@ +--- TSC declarations ++++ DTE declarations +@@ -1,17 +1,24 @@ //// [/.src/typeUsedAsTypeLiteralIndex.d.ts] type K = number | string; --type T = { -- [K]: number; --}; -+type T = {}; +-type T = {}; ++type T = { ++ [K]: number; ++}; declare const K1: invalid; type T1 = { [K1]: number; }; type K2 = "x" | "y"; --type T2 = { -- [K2]: number; --}; -+type T2 = {}; +-type T2 = {}; ++type T2 = { ++ [K2]: number; ++}; type K3 = number | string; --type T3 = { -- [K3]: number; --}; -+type T3 = {}; +-type T3 = {}; ++type T3 = { ++ [K3]: number; ++}; type K4 = number | string; type T4 = { -- [K4]: number; ++ [K4]: number; k4: string; }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/verbatimModuleSyntaxConstEnumUsage.d.ts b/tests/baselines/reference/isolated-declarations/original/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff similarity index 67% rename from tests/baselines/reference/isolated-declarations/original/diff/verbatimModuleSyntaxConstEnumUsage.d.ts rename to tests/baselines/reference/isolated-declarations/original/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff index 4f39049bd750c..410511fe0a51e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/verbatimModuleSyntaxConstEnumUsage.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff @@ -1,19 +1,19 @@ -// [[Reason: ]] //// +// [[Reason: undefined]] //// //// [tests/cases/conformance/externalModules/verbatimModuleSyntaxConstEnumUsage.ts] //// =================================================================== ---- DTE DTE output -+++ TSC TSC output +--- TSC declarations ++++ DTE declarations @@ -1,10 +1,10 @@ //// [/.src/bar.d.ts] export declare enum Bar { -- a, -- c, -+ a = 1, -+ c = 3, +- a = 1, +- c = 3, ++ a, ++ c, e = 5 } From 24fd81076cfb7710542f0b44a126ad5f14fc5e20 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 24 Oct 2023 20:31:29 +0100 Subject: [PATCH 115/224] Added errors in isolated declarations baseline. Signed-off-by: Titian Cernicova-Dragomir --- src/harness/harnessIO.ts | 28 +- src/testRunner/compilerRunner.ts | 18 +- .../diff/ES5SymbolProperty1.d.ts.diff | 21 +- .../original/diff/bigintIndex.d.ts.diff | 36 +- .../diff/computedPropertiesNarrowed.d.ts.diff | 42 + .../diff/computedPropertyNames6_ES5.d.ts.diff | 32 +- .../diff/computedPropertyNames6_ES6.d.ts.diff | 32 +- ...utedPropertyNamesOnOverloads_ES5.d.ts.diff | 26 +- ...utedPropertyNamesOnOverloads_ES6.d.ts.diff | 26 +- .../original/diff/constEnum2.d.ts.diff | 5 +- .../original/diff/enumBasics2.d.ts.diff | 3 +- .../diff/enumConstantMembers.d.ts.diff | 5 +- .../diff/enumExportMergingES6.d.ts.diff | 5 +- ...xSignatureMustHaveTypeAnnotation.d.ts.diff | 28 + .../mergedEnumDeclarationCodeGen.d.ts.diff | 5 +- .../diff/overloadsWithComputedNames.d.ts.diff | 59 ++ .../parserComputedPropertyName13.d.ts.diff | 6 +- .../parserComputedPropertyName14.d.ts.diff | 6 +- .../parserComputedPropertyName15.d.ts.diff | 5 +- .../parserComputedPropertyName18.d.ts.diff | 6 +- .../parserComputedPropertyName19.d.ts.diff | 6 +- .../parserComputedPropertyName2.d.ts.diff | 16 +- .../parserComputedPropertyName20.d.ts.diff | 5 +- .../parserComputedPropertyName21.d.ts.diff | 5 +- .../parserComputedPropertyName37.d.ts.diff | 18 +- .../parserES5ComputedPropertyName2.d.ts.diff | 16 +- .../parserES5ComputedPropertyName5.d.ts.diff | 5 +- .../parserES5ComputedPropertyName8.d.ts.diff | 6 +- .../diff/parserES5SymbolProperty1.d.ts.diff | 5 +- .../diff/parserES5SymbolProperty2.d.ts.diff | 5 +- .../diff/parserES5SymbolProperty8.d.ts.diff | 6 +- .../diff/parserES5SymbolProperty9.d.ts.diff | 6 +- .../diff/parserIndexSignature11.d.ts.diff | 3 +- .../diff/parserIndexSignature5.d.ts.diff | 5 +- .../original/diff/parserStrictMode8.d.ts.diff | 18 +- .../diff/symbolDeclarationEmit12.d.ts.diff | 25 +- .../original/diff/symbolProperty52.d.ts.diff | 19 +- .../original/diff/symbolProperty53.d.ts.diff | 21 +- .../original/diff/symbolProperty54.d.ts.diff | 18 +- .../original/diff/symbolProperty58.d.ts.diff | 18 +- .../original/diff/symbolProperty59.d.ts.diff | 5 +- .../diff/typeUsedAsTypeLiteralIndex.d.ts.diff | 4 +- .../original/dte/bigintIndex.d.ts | 31 +- .../original/dte/complicatedPrivacy.d.ts | 14 +- .../dte/computedPropertyNames6_ES5.d.ts | 19 + .../dte/computedPropertyNames6_ES6.d.ts | 19 + .../computedPropertyNamesOnOverloads_ES5.d.ts | 8 +- .../computedPropertyNamesOnOverloads_ES6.d.ts | 8 +- .../original/dte/constEnum2.d.ts | 8 +- .../original/dte/constEnumErrors.d.ts | 50 +- .../original/dte/enumBasics2.d.ts | 17 +- .../original/dte/enumBasics3.d.ts | 8 +- .../original/dte/enumConstantMembers.d.ts | 23 +- .../original/dte/enumErrors.d.ts | 76 +- .../original/dte/forwardRefInEnum.d.ts | 14 +- .../original/dte/giant.d.ts | 743 +++++++++++++++++- .../indexSignatureMustHaveTypeAnnotation.d.ts | 41 + .../original/dte/intTypeCheck.d.ts | 259 +++++- ...emplateEscapeSequences(target=es2015).d.ts | 11 +- ...edTemplateEscapeSequences(target=es5).d.ts | 11 +- ...emplateEscapeSequences(target=esnext).d.ts | 11 +- ...olatedModulesGlobalNamespacesAndEnums.d.ts | 13 +- .../original/dte/mergedDeclarations2.d.ts | 5 +- .../dte/overloadsWithComputedNames.d.ts | 29 +- .../original/dte/parseBigInt.d.ts | 58 +- .../dte/parserComputedPropertyName13.d.ts | 12 + .../dte/parserComputedPropertyName14.d.ts | 12 + .../dte/parserComputedPropertyName15.d.ts | 12 + .../dte/parserComputedPropertyName18.d.ts | 12 + .../dte/parserComputedPropertyName19.d.ts | 12 + .../dte/parserComputedPropertyName2.d.ts | 9 + .../dte/parserComputedPropertyName20.d.ts | 14 + .../dte/parserComputedPropertyName21.d.ts | 14 + .../dte/parserComputedPropertyName37.d.ts | 11 + .../dte/parserES5ComputedPropertyName2.d.ts | 9 + .../dte/parserES5ComputedPropertyName5.d.ts | 14 + .../dte/parserES5ComputedPropertyName8.d.ts | 12 + .../dte/parserES5SymbolProperty1.d.ts | 14 + .../dte/parserES5SymbolProperty2.d.ts | 14 + .../dte/parserES5SymbolProperty8.d.ts | 14 + .../dte/parserES5SymbolProperty9.d.ts | 14 + .../original/dte/parserIndexSignature11.d.ts | 22 + .../original/dte/parserIndexSignature5.d.ts | 14 + .../original/dte/parserStrictMode8.d.ts | 5 +- .../original/dte/propertyAssignment.d.ts | 35 + .../original/dte/symbolDeclarationEmit12.d.ts | 8 +- .../original/dte/symbolProperty52.d.ts | 18 + .../original/dte/symbolProperty53.d.ts | 16 + .../original/dte/symbolProperty54.d.ts | 11 + .../original/dte/symbolProperty59.d.ts | 14 + .../original/dte/templateLiteralTypes4.d.ts | 8 +- .../dte/typeUsedAsTypeLiteralIndex.d.ts | 26 +- .../original/tsc/bigintIndex.d.ts | 31 +- .../original/tsc/complicatedPrivacy.d.ts | 14 +- .../tsc/computedPropertyNames6_ES5.d.ts | 8 +- .../tsc/computedPropertyNames6_ES6.d.ts | 8 +- .../computedPropertyNamesOnOverloads_ES5.d.ts | 8 +- .../computedPropertyNamesOnOverloads_ES6.d.ts | 8 +- .../original/tsc/constEnum2.d.ts | 8 +- .../original/tsc/constEnumErrors.d.ts | 50 +- .../original/tsc/enumBasics2.d.ts | 17 +- .../original/tsc/enumBasics3.d.ts | 8 +- .../original/tsc/enumConstantMembers.d.ts | 23 +- .../original/tsc/enumErrors.d.ts | 76 +- .../original/tsc/forwardRefInEnum.d.ts | 14 +- .../original/tsc/giant.d.ts | 743 +++++++++++++++++- .../indexSignatureMustHaveTypeAnnotation.d.ts | 23 +- .../original/tsc/intTypeCheck.d.ts | 259 +++++- ...emplateEscapeSequences(target=es2015).d.ts | 11 +- ...edTemplateEscapeSequences(target=es5).d.ts | 11 +- ...emplateEscapeSequences(target=esnext).d.ts | 11 +- ...olatedModulesGlobalNamespacesAndEnums.d.ts | 13 +- .../original/tsc/mergedDeclarations2.d.ts | 5 +- .../tsc/overloadsWithComputedNames.d.ts | 29 +- .../original/tsc/parseBigInt.d.ts | 58 +- .../tsc/parserComputedPropertyName13.d.ts | 12 + .../tsc/parserComputedPropertyName14.d.ts | 12 + .../tsc/parserComputedPropertyName15.d.ts | 12 + .../tsc/parserComputedPropertyName18.d.ts | 12 + .../tsc/parserComputedPropertyName19.d.ts | 12 + .../tsc/parserComputedPropertyName2.d.ts | 7 +- .../tsc/parserComputedPropertyName20.d.ts | 14 + .../tsc/parserComputedPropertyName21.d.ts | 14 + .../tsc/parserComputedPropertyName37.d.ts | 5 +- .../tsc/parserES5ComputedPropertyName2.d.ts | 7 +- .../tsc/parserES5ComputedPropertyName5.d.ts | 14 + .../tsc/parserES5ComputedPropertyName8.d.ts | 12 + .../tsc/parserES5SymbolProperty1.d.ts | 14 + .../tsc/parserES5SymbolProperty2.d.ts | 14 + .../tsc/parserES5SymbolProperty8.d.ts | 14 + .../tsc/parserES5SymbolProperty9.d.ts | 14 + .../original/tsc/parserIndexSignature11.d.ts | 22 + .../original/tsc/parserIndexSignature5.d.ts | 14 + .../original/tsc/parserStrictMode8.d.ts | 11 + .../original/tsc/propertyAssignment.d.ts | 35 + .../original/tsc/symbolDeclarationEmit12.d.ts | 8 +- .../original/tsc/symbolProperty52.d.ts | 10 +- .../original/tsc/symbolProperty53.d.ts | 10 +- .../original/tsc/symbolProperty54.d.ts | 5 +- .../original/tsc/symbolProperty59.d.ts | 14 + .../original/tsc/templateLiteralTypes4.d.ts | 8 +- .../tsc/typeUsedAsTypeLiteralIndex.d.ts | 26 +- 142 files changed, 4146 insertions(+), 123 deletions(-) diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index 51bf722ed76c0..8b7c30abee569 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -1038,20 +1038,24 @@ export namespace Compiler { type: string, header: string, dteDeclarationFiles: readonly TestFile[], + dteDiagnostics: readonly ts.Diagnostic[], tscDeclarationFiles: readonly TestFile[], - reason: string, + tscDiagnostics: readonly ts.Diagnostic[], + tsSources: readonly TestFile[], + prettyErrors: boolean | undefined, + reason: string | undefined, ) { const Diff = require("diff"); - const dteContent = declarationContent(dteDeclarationFiles); - const tscContent = declarationContent(tscDeclarationFiles); + const dteContent = declarationContent(dteDeclarationFiles, tsSources, dteDiagnostics, prettyErrors); + const tscContent = declarationContent(tscDeclarationFiles, tsSources, tscDiagnostics, prettyErrors); - let fullDiff = "// [[Reason: " + reason +"]] ////\r\n\r\n"; + 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 declarationContent(declarationFiles: readonly TestFile[]) { + 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"; @@ -1061,11 +1065,14 @@ export namespace Compiler { dtsCode += declFile.content + (i < (declarationFiles.length - 1) ? "\r\n" : ""); } } + if (errors.length > 0) { + dtsCode += "/// [Errors] ////\r\n\r\n"; + dtsCode += getErrorBaseline(tsSources, errors, prettyErrors); + } return dtsCode; } - export function doDeclarationBaseline(baselinePath: string, type: string, header: string, declarationFiles: readonly TestFile[], errors: readonly ts.Diagnostic[], toBeCompiled: readonly TestFile[], otherFiles: readonly TestFile[], prettyErrors?: boolean) { + export function doDeclarationBaseline(baselinePath: string, type: string, header: string, declarationFiles: readonly TestFile[], errors: readonly ts.Diagnostic[], tsSources: readonly TestFile[], prettyErrors?: boolean) { let tsCode = ""; - const tsSources = otherFiles.concat(toBeCompiled); tsCode += "//// [" + header + "] ////\r\n\r\n"; for (let i = 0; i < tsSources.length; i++) { @@ -1074,11 +1081,8 @@ export namespace Compiler { } let dtsCode = "/// [Declarations] ////\r\n\r\n"; - dtsCode += declarationContent(declarationFiles); - if (errors.length > 0) { - dtsCode += "/// [Errors] ////\r\n\r\n"; - dtsCode += getErrorBaseline(tsSources, errors, prettyErrors); - } + dtsCode += declarationContent(declarationFiles, tsSources, errors, prettyErrors); + // eslint-disable-next-line no-null/no-null Baseline.runBaseline(type + "/" + baselinePath.replace(/\.tsx?/, `.d.ts`), tsCode.length > 0 ? tsCode + "\r\n\r\n" + dtsCode : null); } diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 9c7a6934a1245..d4d0fa03a513a 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -160,6 +160,7 @@ interface CompilerTestEnvironment { toBeCompiled: Compiler.TestFile[]; otherFiles: Compiler.TestFile[]; tsConfigFiles: Compiler.TestFile[]; + allFiles: Compiler.TestFile[]; compilerOptions: ts.CompilerOptions & Compiler.HarnessOptions; configuredName: string; hasNonDtsFiles: boolean; @@ -221,6 +222,7 @@ class CompilerTestBase { 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) protected otherFiles: Compiler.TestFile[]; + protected allFiles: Compiler.TestFile[]; constructor(compilerEnvironment: CompilerTestEnvironment) { this.fileName = compilerEnvironment.fileName; @@ -229,6 +231,7 @@ class CompilerTestBase { 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; @@ -341,6 +344,7 @@ class CompilerTestBase { configurationOverrides, typeScriptVersion, symlinks: testCaseContent.symlinks, + allFiles: ts.concatenate(toBeCompiled, otherFiles), }; } @@ -528,9 +532,8 @@ export class IsolatedDeclarationTest extends CompilerTestBase { "isolated-declarations/original/dte", this.fileName, this.dteDtsFile, - this.dteDiagnostics, - this.toBeCompiled, - this.otherFiles, + ts.concatenate(this.dteDiagnostics, this.tscNonIsolatedDeclarationsErrors), + this.allFiles, this.options.pretty, ); } @@ -541,9 +544,8 @@ export class IsolatedDeclarationTest extends CompilerTestBase { "isolated-declarations/original/tsc", this.fileName, this.tscDtsFiles, - this.tscIsolatedDeclarationsErrors, - this.toBeCompiled, - this.otherFiles, + ts.concatenate(this.tscIsolatedDeclarationsErrors, this.tscNonIsolatedDeclarationsErrors), + this.allFiles, this.options.pretty, ); } @@ -554,7 +556,11 @@ export class IsolatedDeclarationTest extends CompilerTestBase { "isolated-declarations/original/diff", this.fileName, this.dteDtsFile, + ts.concatenate(this.dteDiagnostics, this.tscNonIsolatedDeclarationsErrors), this.tscDtsFiles, + ts.concatenate(this.tscIsolatedDeclarationsErrors, this.tscNonIsolatedDeclarationsErrors), + this.allFiles, + this.options.pretty, this.harnessSettings.isolatedDeclarationDiffReason, ); } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff index b854bab73e51b..e12ad2dba0d76 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff @@ -5,12 +5,31 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -4,5 +4,7 @@ +@@ -4,23 +4,7 @@ interface SymbolConstructor { foo: string; } declare var Symbol: SymbolConstructor; -declare var obj: invalid; +-/// [Errors] //// +- +-ES5SymbolProperty1.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +- +- +-==== ES5SymbolProperty1.ts (1 errors) ==== +- interface SymbolConstructor { +- foo: string; +- } +- var Symbol: SymbolConstructor; +- +- var obj = { +- [Symbol.foo]: 0 +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +- } +- +- obj[Symbol.foo]; +\ No newline at end of file +declare var obj: { + [Symbol.foo]: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff index 6a7005c8dbb6d..d72a5bd3980ae 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -14,5 +14,7 @@ +@@ -14,9 +14,11 @@ declare const a: {}; declare const b: { [1n]: number; @@ -14,3 +14,37 @@ +declare const c: { + [bigNum]: number; +}; + /// [Errors] //// + + a.ts(2,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. + a.ts(8,11): error TS2538: Type '1n' cannot be used as an index type. +@@ -27,9 +29,8 @@ + b.ts(2,14): error TS1005: ';' expected. + b.ts(2,19): error TS1128: Declaration or statement expected. + b.ts(3,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +-b.ts(4,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + + ==== a.ts (5 errors) ==== + interface BigIntIndex { +@@ -65,9 +66,9 @@ + typedArray["1"] = 0xBB; + typedArray[2] = 0xCC; + + // {1n: 123} is a syntax error; must go in separate file so BigIntIndex error is shown +-==== b.ts (6 errors) ==== ++==== b.ts (5 errors) ==== + // BigInt cannot be used as an object literal property + const a = {1n: 123}; + ~~ + !!! error TS1136: Property assignment expected. +@@ -80,7 +81,5 @@ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + const c = {[bigNum]: 789}; + ~~~~~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +- ~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +\ No newline at end of file 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 index 79a7df7e900fb..690958e4bd223 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff @@ -32,3 +32,45 @@ declare const uu: unique symbol; export declare let o6: { [uu]: number; +@@ -29,24 +35,21 @@ + export declare const o9: invalid; + export {}; + /// [Errors] //// + +-computedPropertiesNarrowed.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertiesNarrowed.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertiesNarrowed.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++computedPropertiesNarrowed.ts(20,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertiesNarrowed.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertiesNarrowed.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertiesNarrowed.ts(47,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + + const y: 0 = 0 +@@ -62,12 +65,12 @@ + ~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + let u = Symbol(); ++ ~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export let o4 = { + [u]: 1 // Should error, nut a unique symbol +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export let o5 ={ + [Symbol()]: 1 // Should error diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff index 0dfd7fe84f0b5..0426389f986fe 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,5 +3,9 @@ +@@ -3,33 +3,28 @@ //// [/.src/computedPropertyNames6_ES5.d.ts] declare var p1: number | string; declare var p2: number | number[]; @@ -16,3 +16,33 @@ + [p2]: number; + [p3]: number; +}; + /// [Errors] //// + +-computedPropertyNames6_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames6_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +-computedPropertyNames6_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames6_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +-computedPropertyNames6_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== computedPropertyNames6_ES5.ts (5 errors) ==== ++==== computedPropertyNames6_ES5.ts (2 errors) ==== + var p1: number | string; + var p2: number | number[]; + var p3: string | boolean; + var v = { + [p1]: 0, +- ~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [p2]: 1, + ~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +- ~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [p3]: 2 + ~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +- ~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff index 37c56b3d27b85..e8269da792ca2 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,5 +3,9 @@ +@@ -3,33 +3,28 @@ //// [/.src/computedPropertyNames6_ES6.d.ts] declare var p1: number | string; declare var p2: number | number[]; @@ -16,3 +16,33 @@ + [p2]: number; + [p3]: number; +}; + /// [Errors] //// + +-computedPropertyNames6_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames6_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +-computedPropertyNames6_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames6_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +-computedPropertyNames6_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== computedPropertyNames6_ES6.ts (5 errors) ==== ++==== computedPropertyNames6_ES6.ts (2 errors) ==== + var p1: number | string; + var p2: number | number[]; + var p3: string | boolean; + var v = { + [p1]: 0, +- ~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [p2]: 1, + ~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +- ~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [p3]: 2 + ~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +- ~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff index 888aaadda6bab..023a899ab6350 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff @@ -5,10 +5,34 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,6 +5,5 @@ +@@ -5,20 +5,18 @@ declare var accessorName: string; declare class C { [methodName](v: string): invalid; [methodName](): invalid; - [methodName](v?: string): invalid; } + /// [Errors] //// + + computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== computedPropertyNamesOnOverloads_ES5.ts (5 errors) ==== ++==== computedPropertyNamesOnOverloads_ES5.ts (4 errors) ==== + var methodName = "method"; + var accessorName = "accessor"; + class C { + [methodName](v: string); +@@ -31,7 +29,5 @@ + !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [methodName](v?: string) { } +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff index 5bf715486e6b8..54fa188030e65 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff @@ -5,10 +5,34 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,6 +5,5 @@ +@@ -5,20 +5,18 @@ declare var accessorName: string; declare class C { [methodName](v: string): invalid; [methodName](): invalid; - [methodName](v?: string): invalid; } + /// [Errors] //// + + computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== computedPropertyNamesOnOverloads_ES6.ts (5 errors) ==== ++==== computedPropertyNamesOnOverloads_ES6.ts (4 errors) ==== + var methodName = "method"; + var accessorName = "accessor"; + class C { + [methodName](v: string); +@@ -31,7 +29,5 @@ + !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [methodName](v?: string) { } +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts.diff index 48fd8eec5ca83..2eb851a0025ca 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,6 +5,6 @@ +@@ -5,9 +5,9 @@ declare const enum D { d = 10, e, @@ -13,3 +13,6 @@ - g = 0 + g } + /// [Errors] //// + + constEnum2.ts(7,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts.diff index 545833c50921b..9e693cb91ca34 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -9,8 +9,8 @@ +@@ -9,9 +9,9 @@ z } declare enum Bar { @@ -15,3 +15,4 @@ c,// ok d } + /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts.diff index ba26b1fde278e..e9ebac4ddfe71 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -22,17 +22,17 @@ +@@ -22,20 +22,20 @@ a = Infinity, b = Infinity, c = Infinity, @@ -29,3 +29,6 @@ + f, + g } + /// [Errors] //// + + enumConstantMembers.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts.diff index df5b0318915ff..9890619a57640 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,6 +7,6 @@ +@@ -7,9 +7,9 @@ export declare enum Animals { Dog = 2 } @@ -13,3 +13,6 @@ - CatDog = 3 + CatDog } + /// [Errors] //// + + enumExportMergingES6.ts(8,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff index b6627275330eb..f9bbd970e93b0 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff @@ -15,3 +15,31 @@ } declare class C { [x]: string; +@@ -15,15 +16,14 @@ + indexSignatureMustHaveTypeAnnotation.ts(3,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. + indexSignatureMustHaveTypeAnnotation.ts(3,6): error TS2304: Cannot find name 'x'. + indexSignatureMustHaveTypeAnnotation.ts(4,5): error TS1021: An index signature must have a type annotation. + indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS2304: Cannot find name 'x'. + indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS4031: Public property '[x]' of exported class has or is using private name 'x'. + indexSignatureMustHaveTypeAnnotation.ts(14,5): error TS1021: An index signature must have a type annotation. + + +-==== indexSignatureMustHaveTypeAnnotation.ts (8 errors) ==== ++==== indexSignatureMustHaveTypeAnnotation.ts (7 errors) ==== + interface I { + // Used to be indexer, now it is a computed property + [x]: string; + ~~~ +@@ -39,10 +39,8 @@ + // Used to be indexer, now it is a computed property + [x]: string + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'x'. + ~ + !!! error TS4031: Public property '[x]' of exported class has or is using private name 'x'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts.diff index df69baaba4a5c..90f869a204aa7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,6 +5,6 @@ +@@ -5,9 +5,9 @@ a = 0, b = 0 } @@ -13,3 +13,6 @@ - c = 0 + c } + /// [Errors] //// + + mergedEnumDeclarationCodeGen.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff index 09efd0043dcc6..245a9f5f7b196 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff @@ -26,3 +26,62 @@ declare class C3 { [1](): void; [2](): void; +@@ -47,21 +46,16 @@ + overloadsWithComputedNames.ts(8,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + overloadsWithComputedNames.ts(14,5): error TS2391: Function implementation is missing or not immediately following the declaration. + overloadsWithComputedNames.ts(16,5): error TS2389: Function implementation name must be '["bar"]'. + overloadsWithComputedNames.ts(28,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. +-overloadsWithComputedNames.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + overloadsWithComputedNames.ts(29,5): error TS2391: Function implementation is missing or not immediately following the declaration. + overloadsWithComputedNames.ts(35,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. + overloadsWithComputedNames.ts(42,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. +-overloadsWithComputedNames.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-overloadsWithComputedNames.ts(43,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + overloadsWithComputedNames.ts(47,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. +-overloadsWithComputedNames.ts(47,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-overloadsWithComputedNames.ts(48,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is missing or not immediately following the declaration. + + +-==== overloadsWithComputedNames.ts (15 errors) ==== ++==== overloadsWithComputedNames.ts (10 errors) ==== + // https://github.com/microsoft/TypeScript/issues/52329 + class Person { + ["B"](a: number): string; + ["A"](a: string|number): number | string { +@@ -98,10 +92,8 @@ + class C1 { + [sym](): void; // should error + ~~~~~ + !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. +- ~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [uniqueSym2](): void; // should error + ~~~~~~~~~~~~ + !!! error TS2391: Function implementation is missing or not immediately following the declaration. + [uniqueSym](): void; +@@ -120,24 +112,16 @@ + class C2 { + [strUnion](): void; // should error + ~~~~~~~~~~ + !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. +- ~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [strUnion]() { } +- ~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + class I2 { + [strUnion](): void; // should error + ~~~~~~~~~~ + !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. +- ~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [strUnion]() { } +- ~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + class C3 { + [1](): void; // should error diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff index 015584b0510ba..6d7bab3e11dc4 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,4 +1,6 @@ +@@ -1,8 +1,10 @@ //// [/.src/parserComputedPropertyName13.d.ts] @@ -13,3 +13,7 @@ +declare var v: { + [e]: number; +}; + /// [Errors] //// + + parserComputedPropertyName13.ts(1,10): 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. + parserComputedPropertyName13.ts(1,11): error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff index bd3e8946417cf..82762785e99d7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,4 +1,6 @@ +@@ -1,8 +1,10 @@ //// [/.src/parserComputedPropertyName14.d.ts] @@ -13,3 +13,7 @@ +declare var v: { + [e](): number; +}; + /// [Errors] //// + + parserComputedPropertyName14.ts(1,10): 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. + parserComputedPropertyName14.ts(1,11): error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff index 97ef91d847f6e..73e5aede21da2 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff @@ -5,10 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -2,5 +2,6 @@ +@@ -2,8 +2,9 @@ //// [/.src/parserComputedPropertyName15.d.ts] declare var v: { [e: number]: string; + [e]: number; }; + /// [Errors] //// + + parserComputedPropertyName15.ts(1,31): 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/original/diff/parserComputedPropertyName18.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff index a08220ed9ad77..9809ad3befa25 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,4 +1,6 @@ +@@ -1,8 +1,10 @@ //// [/.src/parserComputedPropertyName18.d.ts] @@ -13,3 +13,7 @@ +declare var v: { + [e]?(): number; +}; + /// [Errors] //// + + parserComputedPropertyName18.ts(1,10): 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. + parserComputedPropertyName18.ts(1,11): error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff index ea0230d0144ad..38292d30e4286 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,4 +1,6 @@ +@@ -1,8 +1,10 @@ //// [/.src/parserComputedPropertyName19.d.ts] @@ -13,3 +13,7 @@ +declare var v: { + [e]?: any; +}; + /// [Errors] //// + + parserComputedPropertyName19.ts(1,10): 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. + parserComputedPropertyName19.ts(1,11): error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff index 9c330abe8cb20..47291ce0e9c00 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,4 +1,6 @@ +@@ -1,16 +1,15 @@ //// [/.src/parserComputedPropertyName2.d.ts] @@ -13,3 +13,17 @@ +declare var v: { + [e]: number; +}; + /// [Errors] //// + +-parserComputedPropertyName2.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. + + +-==== parserComputedPropertyName2.ts (2 errors) ==== ++==== parserComputedPropertyName2.ts (1 errors) ==== + var v = { [e]: 1 }; +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'e'. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff index dec089a9e3985..fa023a17006b6 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff @@ -5,10 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,5 +1,6 @@ +@@ -1,8 +1,9 @@ //// [/.src/parserComputedPropertyName20.d.ts] interface I { + [e](): number; } + /// [Errors] //// + + parserComputedPropertyName20.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff index a3e221ffcd53a..470172aad988f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff @@ -5,10 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,5 +1,6 @@ +@@ -1,8 +1,9 @@ //// [/.src/parserComputedPropertyName21.d.ts] interface I { + [e]: number; } + /// [Errors] //// + + parserComputedPropertyName21.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff index c2baa831dc0ac..6a48cdc26edf3 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,4 +1,6 @@ +@@ -1,18 +1,17 @@ //// [/.src/parserComputedPropertyName37.d.ts] @@ -13,3 +13,19 @@ +declare var v: { + [public]: number; +}; + /// [Errors] //// + +-parserComputedPropertyName37.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName37.ts(2,6): error TS2304: Cannot find name 'public'. + + +-==== parserComputedPropertyName37.ts (2 errors) ==== ++==== parserComputedPropertyName37.ts (1 errors) ==== + var v = { + [public]: 0 +- ~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ + !!! error TS2304: Cannot find name 'public'. + }; +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff index 845d52988ac89..d01d193f5f1c0 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,4 +1,6 @@ +@@ -1,16 +1,15 @@ //// [/.src/parserES5ComputedPropertyName2.d.ts] @@ -13,3 +13,17 @@ +declare var v: { + [e]: number; +}; + /// [Errors] //// + +-parserES5ComputedPropertyName2.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserES5ComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. + + +-==== parserES5ComputedPropertyName2.ts (2 errors) ==== ++==== parserES5ComputedPropertyName2.ts (1 errors) ==== + var v = { [e]: 1 }; +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'e'. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff index 85c7c11af1752..83873e204d52d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff @@ -5,10 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,5 +1,6 @@ +@@ -1,8 +1,9 @@ //// [/.src/parserES5ComputedPropertyName5.d.ts] interface I { + [e]: number; } + /// [Errors] //// + + parserES5ComputedPropertyName5.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff index 2272c887d0dd6..10b52d64d4a07 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,4 +1,6 @@ +@@ -1,8 +1,10 @@ //// [/.src/parserES5ComputedPropertyName8.d.ts] @@ -13,3 +13,7 @@ +declare var v: { + [e]: number; +}; + /// [Errors] //// + + parserES5ComputedPropertyName8.ts(1,10): 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. + parserES5ComputedPropertyName8.ts(1,11): error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff index dbf0d91abc3ab..95d1c19b4f340 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff @@ -5,10 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,5 +1,6 @@ +@@ -1,8 +1,9 @@ //// [/.src/parserES5SymbolProperty1.d.ts] interface I { + [Symbol.iterator]: string; } + /// [Errors] //// + + parserES5SymbolProperty1.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff index 04b38fcb12994..6ea9e47e73083 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff @@ -5,10 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,5 +1,6 @@ +@@ -1,8 +1,9 @@ //// [/.src/parserES5SymbolProperty2.d.ts] interface I { + [Symbol.unscopables](): string; } + /// [Errors] //// + + parserES5SymbolProperty2.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff index ce3920b212a94..744ecdc21c170 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,4 +1,6 @@ +@@ -1,8 +1,10 @@ //// [/.src/parserES5SymbolProperty8.d.ts] @@ -13,3 +13,7 @@ +declare var x: { + [Symbol.toPrimitive](): string; +}; + /// [Errors] //// + + parserES5SymbolProperty8.ts(2,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. + parserES5SymbolProperty8.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff index 159dee57316e9..cecfb878ed415 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,4 +1,6 @@ +@@ -1,8 +1,10 @@ //// [/.src/parserES5SymbolProperty9.d.ts] @@ -13,3 +13,7 @@ +declare var x: { + [Symbol.toPrimitive]: string; +}; + /// [Errors] //// + + parserES5SymbolProperty9.ts(2,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. + parserES5SymbolProperty9.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff index db5df3271bcf7..352003a2795de 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,7 +1,8 @@ +@@ -1,8 +1,9 @@ //// [/.src/parserIndexSignature11.d.ts] @@ -14,3 +14,4 @@ [p1: string]: any; [p2: string, p3: number]: any; } + /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff index eda4a775f5885..01109555e4d58 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff @@ -5,10 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,5 +1,6 @@ +@@ -1,8 +1,9 @@ //// [/.src/parserIndexSignature5.d.ts] interface I { + [a]: any; } + /// [Errors] //// + + parserIndexSignature5.ts(2,3): 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. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff index 48d9cc9f5286a..861c2195ab9ce 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff @@ -5,8 +5,24 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,3 +1,4 @@ +@@ -1,14 +1,18 @@ //// [/.src/parserStrictMode8.d.ts] +declare function eval(): invalid; + /// [Errors] //// + + parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. ++parserStrictMode8.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== parserStrictMode8.ts (1 errors) ==== ++==== parserStrictMode8.ts (2 errors) ==== + "use strict"; + function eval() { + ~~~~ + !!! error TS1100: Invalid use of 'eval' in strict mode. ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } +\ No newline at end of file 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 index 9b09992508980..a7e6ed3e05140 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,8 +5,9 @@ +@@ -5,27 +5,31 @@ interface I { } export class C { @@ -15,3 +15,26 @@ get [Symbol.toPrimitive](): invalid; set [Symbol.toPrimitive](x: I); } + export {}; + } + /// [Errors] //// + ++symbolDeclarationEmit12.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + symbolDeclarationEmit12.ts(9,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + symbolDeclarationEmit12.ts(9,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + symbolDeclarationEmit12.ts(10,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + + +-==== symbolDeclarationEmit12.ts (3 errors) ==== ++==== symbolDeclarationEmit12.ts (4 errors) ==== + module M { + interface I { } + export class C { + [Symbol.iterator]: I; + [Symbol.toPrimitive](x: I) { } ++ ~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [Symbol.isConcatSpreadable](): I { + return undefined + } + get [Symbol.toPrimitive]() { return undefined; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff index d13fc51db5cd6..9fc142660fd4d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,4 +1,6 @@ +@@ -1,20 +1,19 @@ //// [/.src/symbolProperty52.d.ts] @@ -13,3 +13,20 @@ +declare var obj: { + [Symbol.nonsense]: number; +}; + /// [Errors] //// + +-symbolProperty52.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + symbolProperty52.ts(2,13): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. + symbolProperty52.ts(7,12): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. + + +-==== symbolProperty52.ts (3 errors) ==== ++==== symbolProperty52.ts (2 errors) ==== + var obj = { + [Symbol.nonsense]: 0 +- ~~~~~~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~ + !!! error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. + }; + diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff index 4ba1e39ff55e6..ca604e9b47636 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,4 +1,6 @@ +@@ -1,22 +1,21 @@ //// [/.src/symbolProperty53.d.ts] @@ -13,3 +13,22 @@ +declare var obj: { + [Symbol.for]: number; +}; + /// [Errors] //// + + symbolProperty53.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +-symbolProperty53.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + symbolProperty53.ts(5,5): error TS2538: Type '(key: string) => symbol' cannot be used as an index type. + + +-==== symbolProperty53.ts (3 errors) ==== ++==== symbolProperty53.ts (2 errors) ==== + var obj = { + [Symbol.for]: 0 + ~~~~~~~~~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + }; + + obj[Symbol.for]; + ~~~~~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff index eaf4492a2dc93..db990af71b03e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,4 +1,6 @@ +@@ -1,18 +1,17 @@ //// [/.src/symbolProperty54.d.ts] @@ -13,3 +13,19 @@ +declare var obj: { + [Symbol.prototype]: number; +}; + /// [Errors] //// + + symbolProperty54.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +-symbolProperty54.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== symbolProperty54.ts (2 errors) ==== ++==== symbolProperty54.ts (1 errors) ==== + var obj = { + [Symbol.prototype]: 0 + ~~~~~~~~~~~~~~~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +- ~~~~~~~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + }; +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff index 731e29e5bae30..a71442a5d7f89 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff @@ -5,12 +5,28 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,5 +3,7 @@ +@@ -3,20 +3,7 @@ //// [/.src/symbolProperty58.d.ts] interface SymbolConstructor { foo: string; } -declare var obj: invalid; +-/// [Errors] //// +- +-symbolProperty58.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +- +- +-==== symbolProperty58.ts (1 errors) ==== +- interface SymbolConstructor { +- foo: string; +- } +- +- var obj = { +- [Symbol.foo]: 0 +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +- } +\ No newline at end of file +declare var obj: { + [Symbol.foo]: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff index b9c0f369134a2..6d99cc04bc9f7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff @@ -5,10 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,5 +1,6 @@ +@@ -1,8 +1,9 @@ //// [/.src/symbolProperty59.d.ts] interface I { + [Symbol.keyFor]: string; } + /// [Errors] //// + + symbolProperty59.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff index 38012f3f814fd..ba442a8bdb438 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,17 +1,24 @@ +@@ -1,19 +1,26 @@ //// [/.src/typeUsedAsTypeLiteralIndex.d.ts] @@ -33,3 +33,5 @@ + [K4]: number; k4: string; }; + /// [Errors] //// + diff --git a/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts index 067ac4e11f5cb..29950f0e1478f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts @@ -56,24 +56,39 @@ declare const c: { }; /// [Errors] //// +a.ts(2,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. +a.ts(8,11): error TS2538: Type '1n' cannot be used as an index type. +a.ts(14,1): error TS2322: Type 'bigint' is not assignable to type 'string | number | symbol'. a.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +a.ts(19,12): error TS2538: Type 'bigint' cannot be used as an index type. +b.ts(2,12): error TS1136: Property assignment expected. +b.ts(2,14): error TS1005: ';' expected. +b.ts(2,19): error TS1128: Declaration or statement expected. +b.ts(3,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -==== a.ts (1 errors) ==== +==== a.ts (5 errors) ==== interface BigIntIndex { [index: bigint]: E; // should error + ~~~~~ +!!! error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. } const arr: number[] = [1, 2, 3]; let num: number = arr[1]; num = arr["1"]; num = arr[1n]; // should error + ~~ +!!! error TS2538: Type '1n' cannot be used as an index type. let key: keyof any; // should be type "string | number | symbol" key = 123; key = "abc"; key = Symbol(); key = 123n; // should error + ~~~ +!!! error TS2322: Type 'bigint' is not assignable to type 'string | number | symbol'. // Show correct usage of bigint index: explicitly convert to string const bigNum: bigint = 0n; @@ -81,14 +96,26 @@ a.ts(18,20): error TS9007: Declaration emit for this file requires type resoluti ~~~~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. typedArray[bigNum] = 0xAA; // should error + ~~~~~~ +!!! error TS2538: Type 'bigint' cannot be used as an index type. typedArray[String(bigNum)] = 0xAA; typedArray["1"] = 0xBB; typedArray[2] = 0xCC; // {1n: 123} is a syntax error; must go in separate file so BigIntIndex error is shown -==== b.ts (0 errors) ==== +==== b.ts (5 errors) ==== // BigInt cannot be used as an object literal property const a = {1n: 123}; + ~~ +!!! error TS1136: Property assignment expected. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. const b = {[1n]: 456}; + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. const c = {[bigNum]: 789}; + ~~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts index 592513c8597fb..de86a1bafea11 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts @@ -168,15 +168,19 @@ declare namespace mglo5 { complicatedPrivacy.ts(5,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. complicatedPrivacy.ts(7,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(11,24): error TS1054: A 'get' accessor cannot have parameters. complicatedPrivacy.ts(11,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. complicatedPrivacy.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. complicatedPrivacy.ts(24,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. complicatedPrivacy.ts(33,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(35,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. +complicatedPrivacy.ts(35,6): error TS2693: 'number' only refers to a type, but is being used as a value here. complicatedPrivacy.ts(40,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported member 'i6'. complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== complicatedPrivacy.ts (8 errors) ==== +==== complicatedPrivacy.ts (12 errors) ==== module m1 { export module m2 { @@ -193,6 +197,8 @@ complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requi export class C2 implements m3.i3 { public get p1(arg) { ~~ +!!! error TS1054: A 'get' accessor cannot have parameters. + ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. return new C1(); } @@ -224,6 +230,10 @@ complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requi !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. { [number]: C1; // Used to be indexer, now it is a computed property + ~~~~~~~~ +!!! 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 TS2693: 'number' only refers to a type, but is being used as a value here. }) { } @@ -264,6 +274,8 @@ complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requi export module m3 { export class c_pr implements mglo5.i5, mglo5.i6 { + ~~ +!!! error TS2694: Namespace 'mglo5' has no exported member 'i6'. f1() { ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES5.d.ts index 8b836aba0e325..7e1c60c9ce885 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES5.d.ts @@ -23,3 +23,22 @@ declare var v: { [p2]: number; [p3]: number; }; +/// [Errors] //// + +computedPropertyNames6_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames6_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + + +==== computedPropertyNames6_ES5.ts (2 errors) ==== + var p1: number | string; + var p2: number | number[]; + var p3: string | boolean; + var v = { + [p1]: 0, + [p2]: 1, + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [p3]: 2 + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES6.d.ts index 155f867985f59..8fad937eaaf22 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES6.d.ts @@ -23,3 +23,22 @@ declare var v: { [p2]: number; [p3]: number; }; +/// [Errors] //// + +computedPropertyNames6_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames6_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + + +==== computedPropertyNames6_ES6.ts (2 errors) ==== + var p1: number | string; + var p2: number | number[]; + var p3: string | boolean; + var v = { + [p1]: 0, + [p2]: 1, + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [p3]: 2 + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts index 99446332b19f4..cea7452d4f3d7 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts @@ -22,19 +22,25 @@ declare class C { } /// [Errors] //// +computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== computedPropertyNamesOnOverloads_ES5.ts (2 errors) ==== +==== computedPropertyNamesOnOverloads_ES5.ts (4 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { [methodName](v: string); ~~~~~~~~~~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. [methodName](); ~~~~~~~~~~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. [methodName](v?: string) { } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts index ebbfa6e096626..436a47ed54995 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts @@ -22,19 +22,25 @@ declare class C { } /// [Errors] //// +computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== computedPropertyNamesOnOverloads_ES6.ts (2 errors) ==== +==== computedPropertyNamesOnOverloads_ES6.ts (4 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { [methodName](v: string); ~~~~~~~~~~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. [methodName](); ~~~~~~~~~~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. [methodName](v?: string) { } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/constEnum2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/constEnum2.d.ts index a23121133f301..43d3404a4983e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/constEnum2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/constEnum2.d.ts @@ -31,11 +31,13 @@ declare const enum D { constEnum2.ts(7,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnum2.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnum2.ts(10,9): error TS2474: const enum member initializers must be constant expressions. constEnum2.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnum2.ts(11,9): error TS2474: const enum member initializers must be constant expressions. constEnum2.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== constEnum2.ts (4 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. @@ -50,9 +52,13 @@ constEnum2.ts(12,5): error TS9007: Declaration emit for this file requires type e = 199 * Math.floor(Math.random() * 1000), ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. f = d - (100 * Math.floor(Math.random() % 8)), ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. g = CONST, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts index 1869a79df6e56..33bc368283a22 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts @@ -83,29 +83,49 @@ declare const enum NaNOrInfinity { } /// [Errors] //// +constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. constEnumErrors.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. constEnumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. +constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. constEnumErrors.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(15,10): error TS2474: const enum member initializers must be constant expressions. +constEnumErrors.ts(15,13): error TS2339: Property 'Z' does not exist on type 'typeof E1'. constEnumErrors.ts(22,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(22,13): error TS2476: A const enum member can only be accessed using a string literal. constEnumErrors.ts(24,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(24,13): error TS2476: A const enum member can only be accessed using a string literal. constEnumErrors.ts(25,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(25,13): error TS2476: A const enum member can only be accessed using a string literal. +constEnumErrors.ts(27,9): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. constEnumErrors.ts(27,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(28,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(28,10): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. +constEnumErrors.ts(33,5): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. constEnumErrors.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(39,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(41,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(41,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. constEnumErrors.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(42,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. constEnumErrors.ts(43,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. -==== constEnumErrors.ts (15 errors) ==== +==== constEnumErrors.ts (31 errors) ==== const enum E { + ~ +!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. A } module E { + ~ +!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. var x = 1; } @@ -115,13 +135,23 @@ constEnumErrors.ts(43,5): error TS9007: Declaration emit for this file requires X = Y, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. // forward reference to the element of the same enum Y = E1.Z, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. + ~ +!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. Y1 = E1["Z"] ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. + ~~~ +!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. } const enum E2 { @@ -131,25 +161,37 @@ constEnumErrors.ts(43,5): error TS9007: Declaration emit for this file requires var y0 = E2[1] ~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2476: A const enum member can only be accessed using a string literal. var name = "A"; var y1 = E2[name]; ~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ +!!! error TS2476: A const enum member can only be accessed using a string literal. var y2 = E2[`${name}`]; ~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~ +!!! error TS2476: A const enum member can only be accessed using a string literal. var x = E2; ~~ +!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. + ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. var y = [E2]; ~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. function foo(t: any): void { } foo(E2); + ~~ +!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. const enum NaNOrInfinity { A = 9007199254740992, @@ -168,10 +210,16 @@ constEnumErrors.ts(43,5): error TS9007: Declaration emit for this file requires F = E * E, // overflow ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. G = 1 / 0, // overflow ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. H = 0 / 0 // NaN ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumBasics2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumBasics2.d.ts index fe9de6decc5be..f342130374e47 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/enumBasics2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/enumBasics2.d.ts @@ -38,27 +38,40 @@ declare enum Bar { /// [Errors] //// enumBasics2.ts(4,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(4,9): error TS2339: Property 'b' does not exist on type 'Foo.a'. enumBasics2.ts(5,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(5,9): error TS2339: Property 'a' does not exist on type 'Foo.b'. enumBasics2.ts(6,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(6,9): error TS2339: Property 'x' does not exist on type 'Foo.y'. +enumBasics2.ts(6,15): error TS2339: Property 'x' does not exist on type 'Foo.a'. enumBasics2.ts(10,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumBasics2.ts(11,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumBasics2.ts(12,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumBasics2.ts(13,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(13,13): error TS2339: Property 'a' does not exist on type 'Foo.a'. -==== enumBasics2.ts (7 errors) ==== +==== enumBasics2.ts (12 errors) ==== enum Foo { a = 2, b = 3, x = a.b, // should error ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2339: Property 'b' does not exist on type 'Foo.a'. y = b.a, // should error ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2339: Property 'a' does not exist on type 'Foo.b'. z = y.x * a.x, // should error ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2339: Property 'x' does not exist on type 'Foo.y'. + ~ +!!! error TS2339: Property 'x' does not exist on type 'Foo.a'. } enum Bar { @@ -74,5 +87,7 @@ enumBasics2.ts(13,3): error TS9007: Declaration emit for this file requires type d = Foo.a.a, // should error ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2339: Property 'a' does not exist on type 'Foo.a'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumBasics3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumBasics3.d.ts index 4059193c59e18..cee89f3324213 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/enumBasics3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/enumBasics3.d.ts @@ -44,11 +44,13 @@ declare namespace M { /// [Errors] //// enumBasics3.ts(5,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics3.ts(5,13): error TS2339: Property 'a' does not exist on type 'E1.a'. enumBasics3.ts(13,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumBasics3.ts(14,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics3.ts(14,20): error TS2339: Property 'a' does not exist on type 'E1.a'. -==== enumBasics3.ts (3 errors) ==== +==== enumBasics3.ts (5 errors) ==== module M { export namespace N { export enum E1 { @@ -56,6 +58,8 @@ enumBasics3.ts(14,7): error TS9007: Declaration emit for this file requires type b = a.a, // should error ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2339: Property 'a' does not exist on type 'E1.a'. } } } @@ -69,6 +73,8 @@ enumBasics3.ts(14,7): error TS9007: Declaration emit for this file requires type c = M.N.E1.a.a, // should error ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2339: Property 'a' does not exist on type 'E1.a'. } } } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts index 12a1edf420009..fc6bb6bcca91e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts @@ -92,15 +92,22 @@ enumConstantMembers.ts(26,5): error TS9007: Declaration emit for this file requi enumConstantMembers.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumConstantMembers.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumConstantMembers.ts(32,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(32,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. enumConstantMembers.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(33,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. enumConstantMembers.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(34,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. enumConstantMembers.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(35,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. enumConstantMembers.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(36,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. enumConstantMembers.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(37,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. enumConstantMembers.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(38,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -==== enumConstantMembers.ts (14 errors) ==== +==== enumConstantMembers.ts (21 errors) ==== // Constant members allow negatives, but not decimals. Also hex literals are allowed enum E1 { a = 1, @@ -149,23 +156,37 @@ enumConstantMembers.ts(38,5): error TS9007: Declaration emit for this file requi a = 1 / 0, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. b = 2 / 0.0, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. c = 1.0 / 0.0, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. d = 0.0 / 0.0, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~ +!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. e = NaN, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. f = Infinity, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. g = -Infinity ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumErrors.d.ts index e84fe764d1ec6..6d64848171f04 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/enumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/enumErrors.d.ts @@ -115,33 +115,69 @@ declare enum E14 { } /// [Errors] //// +enumErrors.ts(2,6): error TS2431: Enum name cannot be 'any'. +enumErrors.ts(3,6): error TS2431: Enum name cannot be 'number'. +enumErrors.ts(4,6): error TS2431: Enum name cannot be 'string'. +enumErrors.ts(5,6): error TS2431: Enum name cannot be 'boolean'. enumErrors.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(9,9): error TS18033: Type 'Number' is not assignable to type 'number' as required for computed enum member values. + 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. enumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumErrors.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumErrors.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(26,9): error TS18033: Type 'boolean' is not assignable to type 'number' as required for computed enum member values. enumErrors.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(27,9): error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. enumErrors.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(28,9): error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. enumErrors.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(29,9): error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. enumErrors.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(30,9): error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. enumErrors.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(36,9): error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. enumErrors.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(37,9): error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. enumErrors.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(38,9): error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. enumErrors.ts(39,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(40,9): error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. +enumErrors.ts(48,18): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(49,24): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(49,26): error TS2452: An enum member cannot have a numeric name. +enumErrors.ts(50,28): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(50,30): error TS2452: An enum member cannot have a numeric name. +enumErrors.ts(50,31): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(53,16): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(53,22): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(53,30): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(53,33): error TS2452: An enum member cannot have a numeric name. -==== enumErrors.ts (13 errors) ==== +==== enumErrors.ts (37 errors) ==== // Enum named with PredefinedTypes enum any { } + ~~~ +!!! error TS2431: Enum name cannot be 'any'. enum number { } + ~~~~~~ +!!! error TS2431: Enum name cannot be 'number'. enum string { } + ~~~~~~ +!!! error TS2431: Enum name cannot be 'string'. enum boolean { } + ~~~~~~~ +!!! error TS2431: Enum name cannot be 'boolean'. // Enum with computed member initializer of type Number enum E5 { C = new Number(30) ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~ +!!! error TS18033: Type 'Number' is not assignable to type 'number' as required for computed enum member values. +!!! error TS18033: 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. } enum E9 { @@ -165,18 +201,28 @@ enumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type // Enum with computed member intializer of other types enum E11 { A = true, + ~~~~ +!!! error TS18033: Type 'boolean' is not assignable to type 'number' as required for computed enum member values. B = new Date(), ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~ +!!! error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. C = window, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. D = {}, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. E = (() => 'foo')(), ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~ +!!! error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. } // Enum with string valued member and computed member initializers @@ -185,18 +231,26 @@ enumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type B = new Date(), ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~ +!!! error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. C = window, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. D = {}, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. E = 1 + 1, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. F = (() => 'foo')(), ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~ +!!! error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. } // Enum with incorrect syntax @@ -205,9 +259,29 @@ enumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type postValueComma = 1, postSemicolon; + ~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. postColonValueComma: 2, + ~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + ~ +!!! error TS2452: An enum member cannot have a numeric name. postColonValueSemicolon: 3; + ~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + ~ +!!! error TS2452: An enum member cannot have a numeric name. + ~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. }; enum E14 { a, b: any "hello" += 1, c, d} + ~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + ~~~~~~~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + ~~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + ~ +!!! error TS2452: An enum member cannot have a numeric name. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts index adbfc541b2689..b26b75e3fc0e9 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts @@ -33,28 +33,40 @@ declare enum E1 { /// [Errors] //// forwardRefInEnum.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. forwardRefInEnum.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(5,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. forwardRefInEnum.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(7,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. forwardRefInEnum.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(8,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -==== forwardRefInEnum.ts (4 errors) ==== +==== forwardRefInEnum.ts (8 errors) ==== enum E1 { // illegal case // forward reference to the element of the same enum X = Y, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. X1 = E1["Y"], ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. // forward reference to the element of the same enum Y = E1.Z, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. Y1 = E1["Z"] ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. } enum E1 { diff --git a/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts index b05111b2c4b0f..419456fea937c 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts @@ -985,110 +985,357 @@ export declare namespace eaM { } /// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(273,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(276,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(278,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(280,12): error TS2300: Duplicate identifier 'pgF'. giant.ts(280,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(281,16): error TS2300: Duplicate identifier 'pgF'. giant.ts(281,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(281,20): error TS1005: '{' expected. +giant.ts(282,12): error TS2300: Duplicate identifier 'psF'. giant.ts(282,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(289,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(290,12): error TS2300: Duplicate identifier 'tsF'. giant.ts(290,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(293,16): error TS2300: Duplicate identifier 'tgF'. giant.ts(293,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(293,20): error TS1005: '{' expected. giant.ts(299,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(332,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(332,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(333,5): error TS2386: Overload signatures must all be optional or required. giant.ts(333,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(333,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(416,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(419,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(421,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(423,16): error TS2300: Duplicate identifier 'pgF'. giant.ts(423,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(424,20): error TS2300: Duplicate identifier 'pgF'. giant.ts(424,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(424,24): error TS1005: '{' expected. +giant.ts(425,16): error TS2300: Duplicate identifier 'psF'. giant.ts(425,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(432,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(433,16): error TS2300: Duplicate identifier 'tsF'. giant.ts(433,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(436,20): error TS2300: Duplicate identifier 'tgF'. giant.ts(436,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(436,24): error TS1005: '{' expected. giant.ts(442,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(475,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(475,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(476,9): error TS2386: Overload signatures must all be optional or required. giant.ts(476,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(476,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(484,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(485,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(489,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(490,33): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(490,39): error TS1183: An implementation cannot be declared in ambient contexts. giant.ts(494,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(495,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(500,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(504,16): error TS2300: Duplicate identifier 'psF'. giant.ts(504,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(511,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(518,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(519,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(524,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(524,30): error TS1183: An implementation cannot be declared in ambient contexts. giant.ts(530,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(531,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(536,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(540,12): error TS2300: Duplicate identifier 'psF'. giant.ts(540,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(547,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(554,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(555,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(560,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(560,21): error TS1183: An implementation cannot be declared in ambient contexts. giant.ts(561,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(562,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(600,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(600,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(601,9): error TS2386: Overload signatures must all be optional or required. giant.ts(601,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(601,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(604,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(605,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(610,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(615,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. giant.ts(615,33): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(620,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(625,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(625,21): error TS1183: An implementation cannot be declared in ambient contexts. giant.ts(626,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(627,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(627,21): error TS1183: An implementation cannot be declared in ambient contexts. giant.ts(633,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(666,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(666,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(667,9): error TS2386: Overload signatures must all be optional or required. giant.ts(667,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(667,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(670,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(671,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(675,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient contexts. -==== giant.ts (101 errors) ==== +==== giant.ts (348 errors) ==== /* Prefixes p -> public @@ -1111,19 +1358,55 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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 @@ -1149,8 +1432,16 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res //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; @@ -1164,6 +1455,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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; @@ -1175,19 +1468,55 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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 @@ -1213,8 +1542,16 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res //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; @@ -1228,6 +1565,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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; @@ -1242,6 +1581,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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 { }; } @@ -1254,19 +1595,55 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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 @@ -1292,8 +1669,16 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res //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; @@ -1307,6 +1692,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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; @@ -1321,40 +1708,94 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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 { } @@ -1378,18 +1819,42 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res private rF() { } public pgF() { } ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. public get pgF() ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: '{' expected. public psF(param:any) { } ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -1398,14 +1863,26 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static tsF(param:any) { } ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. static tgF() { } ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static get tgF() ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: '{' expected. } export interface eI { //Call Signature @@ -1433,8 +1910,16 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res //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; @@ -1454,6 +1939,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~ @@ -1469,19 +1956,55 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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 @@ -1507,8 +2030,16 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res //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; @@ -1522,6 +2053,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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; @@ -1536,6 +2069,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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 { }; } @@ -1557,18 +2092,42 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res private rF() { } public pgF() { } ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. public get pgF() ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: '{' expected. public psF(param:any) { } ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -1577,14 +2136,26 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static tsF(param:any) { } ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. static tgF() { } ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static get tgF() ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: '{' expected. } export interface eI { //Call Signature @@ -1612,8 +2183,16 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res //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; @@ -1633,6 +2212,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~ @@ -1659,6 +2240,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res export declare function eaF() { }; ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. export declare class eaC { }; export declare module eaM { }; } @@ -1668,8 +2251,12 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res export declare function eaF() { }; ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -1677,36 +2264,78 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res public pF() { } ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. public get pgF() ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. public psF(param:any) { } ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static tF() { } ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. static tsF(param:any) { } ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. static get tgF() ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } export declare module eaM { @@ -1716,6 +2345,10 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res function F() { }; ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 { } @@ -1725,6 +2358,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res export function eF() { }; ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. export class eC { } export interface eI { } export module eM { } @@ -1736,8 +2371,12 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res export declare function eaF() { }; ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -1745,36 +2384,78 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res public pF() { } ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. public get pgF() ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. public psF(param:any) { } ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static tF() { } ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. static tsF(param:any) { } ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. static get tgF() ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } export declare module eaM { @@ -1784,8 +2465,14 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res function F() { }; ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -1793,12 +2480,16 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res public pF() { } ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. static tV; ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static tF() { } ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. } interface I { //Call Signature @@ -1823,8 +2514,16 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res //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; @@ -1844,6 +2543,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~ @@ -1856,6 +2557,10 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res function F() { }; ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 { } @@ -1865,17 +2570,29 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res export function eF() { }; ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. export declare function eaF() { }; + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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; ~~ @@ -1883,8 +2600,12 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res export function eF() { }; ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -1892,12 +2613,16 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res public pF() { } ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. static tV ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static tF() { } ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. } export interface eI { //Call Signature @@ -1925,8 +2650,16 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res //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; @@ -1946,6 +2679,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~ @@ -1958,6 +2693,10 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res function F() { }; ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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; @@ -1966,6 +2705,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res export function eF() { }; ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. export class eC { } export interface eI { } export module eM { } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts index ffb7439194093..652c00ddc1b77 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts @@ -32,3 +32,44 @@ declare class C { declare class C2 { [x: string]: any; } +/// [Errors] //// + +indexSignatureMustHaveTypeAnnotation.ts(3,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. +indexSignatureMustHaveTypeAnnotation.ts(3,6): error TS2304: Cannot find name 'x'. +indexSignatureMustHaveTypeAnnotation.ts(4,5): error TS1021: An index signature must have a type annotation. +indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS2304: Cannot find name 'x'. +indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS4031: Public property '[x]' of exported class has or is using private name 'x'. +indexSignatureMustHaveTypeAnnotation.ts(14,5): error TS1021: An index signature must have a type annotation. + + +==== indexSignatureMustHaveTypeAnnotation.ts (7 errors) ==== + interface I { + // Used to be indexer, now it is a computed property + [x]: string; + ~~~ +!!! 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 'x'. + [x: string]; + ~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + } + + class C { + // Used to be indexer, now it is a computed property + [x]: string + ~~~ +!!! 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 'x'. + ~ +!!! error TS4031: Public property '[x]' of exported class has or is using private name 'x'. + + } + + class C2 { + [x: string] + ~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts index 7cbaa6e180a95..2128cfc5da764 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts @@ -375,16 +375,112 @@ intTypeCheck.ts(9,8): error TS9007: Declaration emit for this file requires type intTypeCheck.ts(10,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. intTypeCheck.ts(10,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. intTypeCheck.ts(16,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(35,6): error TS2304: Cannot find name 'p'. intTypeCheck.ts(46,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. intTypeCheck.ts(52,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(71,6): error TS2304: Cannot find name 'p'. intTypeCheck.ts(83,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. intTypeCheck.ts(84,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. intTypeCheck.ts(84,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(85,5): error TS2386: Overload signatures must all be optional or required. intTypeCheck.ts(85,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. intTypeCheck.ts(85,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(99,5): error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? + Type 'Object' is missing the following properties from type 'i1': p, p3, p6 +intTypeCheck.ts(100,20): error TS2351: This expression is not constructable. + Type 'i1' has no construct signatures. +intTypeCheck.ts(101,5): error TS2739: Type 'Base' is missing the following properties from type 'i1': p, p3, p6 +intTypeCheck.ts(103,5): error TS2322: Type '() => void' is not assignable to type 'i1'. +intTypeCheck.ts(106,5): error TS2322: Type 'boolean' is not assignable to type 'i1'. +intTypeCheck.ts(106,20): error TS1109: Expression expected. +intTypeCheck.ts(106,21): error TS2693: 'i1' only refers to a type, but is being used as a value here. +intTypeCheck.ts(107,21): error TS2351: This expression is not constructable. + Type '{}' has no construct signatures. +intTypeCheck.ts(112,5): error TS2322: Type '{}' is not assignable to type 'i2'. + Type '{}' provides no match for the signature '(): any'. +intTypeCheck.ts(113,5): error TS2322: Type 'Object' is not assignable to type 'i2'. + The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? + Type 'Object' provides no match for the signature '(): any'. +intTypeCheck.ts(114,17): error TS2350: Only a void function can be called with the 'new' keyword. +intTypeCheck.ts(115,5): error TS2322: Type 'Base' is not assignable to type 'i2'. + Type 'Base' provides no match for the signature '(): any'. +intTypeCheck.ts(120,5): error TS2322: Type 'boolean' is not assignable to type 'i2'. +intTypeCheck.ts(120,21): error TS1109: Expression expected. +intTypeCheck.ts(120,22): error TS2693: 'i2' only refers to a type, but is being used as a value here. +intTypeCheck.ts(121,21): error TS2351: This expression is not constructable. + Type '{}' has no construct signatures. +intTypeCheck.ts(126,5): error TS2322: Type '{}' is not assignable to type 'i3'. + Type '{}' provides no match for the signature 'new (): any'. +intTypeCheck.ts(127,5): error TS2322: Type 'Object' is not assignable to type 'i3'. + The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? + Type 'Object' provides no match for the signature 'new (): any'. +intTypeCheck.ts(129,5): error TS2322: Type 'Base' is not assignable to type 'i3'. + Type 'Base' provides no match for the signature 'new (): any'. +intTypeCheck.ts(131,5): error TS2322: Type '() => void' is not assignable to type 'i3'. + Type '() => void' provides no match for the signature 'new (): any'. +intTypeCheck.ts(134,5): error TS2322: Type 'boolean' is not assignable to type 'i3'. +intTypeCheck.ts(134,21): error TS1109: Expression expected. +intTypeCheck.ts(134,22): error TS2693: 'i3' only refers to a type, but is being used as a value here. +intTypeCheck.ts(135,21): error TS2351: This expression is not constructable. + Type '{}' has no construct signatures. +intTypeCheck.ts(142,21): error TS2351: This expression is not constructable. + Type 'i4' has no construct signatures. +intTypeCheck.ts(148,5): error TS2322: Type 'boolean' is not assignable to type 'i4'. +intTypeCheck.ts(148,21): error TS1109: Expression expected. +intTypeCheck.ts(148,22): error TS2693: 'i4' only refers to a type, but is being used as a value here. +intTypeCheck.ts(149,21): error TS2351: This expression is not constructable. + Type '{}' has no construct signatures. +intTypeCheck.ts(154,5): error TS2739: Type '{}' is missing the following properties from type 'i5': p, p3, p6 +intTypeCheck.ts(155,5): error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? + Type 'Object' is missing the following properties from type 'i5': p, p3, p6 +intTypeCheck.ts(156,21): error TS2351: This expression is not constructable. + Type 'i5' has no construct signatures. +intTypeCheck.ts(157,5): error TS2739: Type 'Base' is missing the following properties from type 'i5': p, p3, p6 +intTypeCheck.ts(159,5): error TS2322: Type '() => void' is not assignable to type 'i5'. +intTypeCheck.ts(162,5): error TS2322: Type 'boolean' is not assignable to type 'i5'. +intTypeCheck.ts(162,21): error TS1109: Expression expected. +intTypeCheck.ts(162,22): error TS2693: 'i5' only refers to a type, but is being used as a value here. +intTypeCheck.ts(163,21): error TS2351: This expression is not constructable. + Type '{}' has no construct signatures. +intTypeCheck.ts(168,5): error TS2322: Type '{}' is not assignable to type 'i6'. + Type '{}' provides no match for the signature '(): any'. +intTypeCheck.ts(169,5): error TS2322: Type 'Object' is not assignable to type 'i6'. + The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? + Type 'Object' provides no match for the signature '(): any'. +intTypeCheck.ts(170,17): error TS2350: Only a void function can be called with the 'new' keyword. +intTypeCheck.ts(171,5): error TS2322: Type 'Base' is not assignable to type 'i6'. + Type 'Base' provides no match for the signature '(): any'. +intTypeCheck.ts(173,5): error TS2322: Type '() => void' is not assignable to type 'i6'. + Type 'void' is not assignable to type 'number'. +intTypeCheck.ts(176,5): error TS2322: Type 'boolean' is not assignable to type 'i6'. +intTypeCheck.ts(176,21): error TS1109: Expression expected. +intTypeCheck.ts(176,22): error TS2693: 'i6' only refers to a type, but is being used as a value here. +intTypeCheck.ts(177,21): error TS2351: This expression is not constructable. + Type '{}' has no construct signatures. +intTypeCheck.ts(182,5): error TS2322: Type '{}' is not assignable to type 'i7'. + Type '{}' provides no match for the signature 'new (): any'. +intTypeCheck.ts(183,5): error TS2322: Type 'Object' is not assignable to type 'i7'. + The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? + Type 'Object' provides no match for the signature 'new (): any'. +intTypeCheck.ts(185,17): error TS2352: Conversion of type 'Base' to type 'i7' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. + Type 'Base' provides no match for the signature 'new (): any'. +intTypeCheck.ts(187,5): error TS2322: Type '() => void' is not assignable to type 'i7'. + Type '() => void' provides no match for the signature 'new (): any'. +intTypeCheck.ts(190,5): error TS2322: Type 'boolean' is not assignable to type 'i7'. +intTypeCheck.ts(190,21): error TS1109: Expression expected. +intTypeCheck.ts(190,22): error TS2693: 'i7' only refers to a type, but is being used as a value here. +intTypeCheck.ts(191,21): error TS2351: This expression is not constructable. + Type '{}' has no construct signatures. +intTypeCheck.ts(198,21): error TS2351: This expression is not constructable. + Type 'i8' has no construct signatures. +intTypeCheck.ts(204,5): error TS2322: Type 'boolean' is not assignable to type 'i8'. +intTypeCheck.ts(204,21): error TS1109: Expression expected. +intTypeCheck.ts(204,22): error TS2693: 'i8' only refers to a type, but is being used as a value here. +intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. + Type '{}' has no construct signatures. -==== intTypeCheck.ts (11 errors) ==== +==== intTypeCheck.ts (74 errors) ==== interface i1 { //Property Signatures p; @@ -428,6 +524,8 @@ intTypeCheck.ts(85,15): error TS9007: Declaration emit for this file requires ty interface i4 { // Used to be indexer, now it is a computed property [p]; + ~ +!!! error TS2304: Cannot find name 'p'. //Index Signatures [p1: string]; [p2: string, p3: number]; @@ -468,6 +566,8 @@ intTypeCheck.ts(85,15): error TS9007: Declaration emit for this file requires ty // Used to be indexer, now it is a computed property [p]; + ~ +!!! error TS2304: Cannot find name 'p'. //Index Signatures [p1: string]; [p2: string, p3: number]; @@ -488,6 +588,8 @@ intTypeCheck.ts(85,15): error TS9007: Declaration emit for this file requires ty ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~ @@ -506,42 +608,104 @@ intTypeCheck.ts(85,15): error TS9007: Declaration emit for this file requires ty p7: function (pa1, pa2):any { return 0; } }; var obj2: i1 = new Object(); + ~~~~ +!!! error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? +!!! error TS2696: Type 'Object' is missing the following properties from type 'i1': p, p3, p6 var obj3: i1 = new obj0; + ~~~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type 'i1' has no construct signatures. var obj4: i1 = new Base; + ~~~~ +!!! error TS2739: Type 'Base' is missing the following properties from type 'i1': p, p3, p6 var obj5: i1 = null; var obj6: i1 = function () { }; + ~~~~ +!!! error TS2322: Type '() => void' is not assignable to type 'i1'. //var obj7: i1 = function foo() { }; var obj8: i1 = anyVar; var obj9: i1 = new anyVar; + ~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'i1'. + ~ +!!! error TS1109: Expression expected. + ~~ +!!! error TS2693: 'i1' only refers to a type, but is being used as a value here. var obj10: i1 = new {}; + ~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type '{}' has no construct signatures. // // Call signatures // var obj11: i2; var obj12: i2 = {}; + ~~~~~ +!!! error TS2322: Type '{}' is not assignable to type 'i2'. +!!! error TS2322: Type '{}' provides no match for the signature '(): any'. var obj13: i2 = new Object(); + ~~~~~ +!!! error TS2322: Type 'Object' is not assignable to type 'i2'. +!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? +!!! error TS2322: Type 'Object' provides no match for the signature '(): any'. var obj14: i2 = new obj11; + ~~~~~~~~~ +!!! error TS2350: Only a void function can be called with the 'new' keyword. var obj15: i2 = new Base; + ~~~~~ +!!! error TS2322: Type 'Base' is not assignable to type 'i2'. +!!! error TS2322: Type 'Base' provides no match for the signature '(): any'. var obj16: i2 = null; var obj17: i2 = function ():any { return 0; }; //var obj18: i2 = function foo() { }; var obj19: i2 = anyVar; var obj20: i2 = new anyVar; + ~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'i2'. + ~ +!!! error TS1109: Expression expected. + ~~ +!!! error TS2693: 'i2' only refers to a type, but is being used as a value here. var obj21: i2 = new {}; + ~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type '{}' has no construct signatures. // // Construct Signatures // var obj22: i3; var obj23: i3 = {}; + ~~~~~ +!!! error TS2322: Type '{}' is not assignable to type 'i3'. +!!! error TS2322: Type '{}' provides no match for the signature 'new (): any'. var obj24: i3 = new Object(); + ~~~~~ +!!! error TS2322: Type 'Object' is not assignable to type 'i3'. +!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? +!!! error TS2322: Type 'Object' provides no match for the signature 'new (): any'. var obj25: i3 = new obj22; var obj26: i3 = new Base; + ~~~~~ +!!! error TS2322: Type 'Base' is not assignable to type 'i3'. +!!! error TS2322: Type 'Base' provides no match for the signature 'new (): any'. var obj27: i3 = null; var obj28: i3 = function () { }; + ~~~~~ +!!! error TS2322: Type '() => void' is not assignable to type 'i3'. +!!! error TS2322: Type '() => void' provides no match for the signature 'new (): any'. //var obj29: i3 = function foo() { }; var obj30: i3 = anyVar; var obj31: i3 = new anyVar; + ~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'i3'. + ~ +!!! error TS1109: Expression expected. + ~~ +!!! error TS2693: 'i3' only refers to a type, but is being used as a value here. var obj32: i3 = new {}; + ~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type '{}' has no construct signatures. // // Index Signatures // @@ -549,55 +713,134 @@ intTypeCheck.ts(85,15): error TS9007: Declaration emit for this file requires ty var obj34: i4 = {}; var obj35: i4 = new Object(); var obj36: i4 = new obj33; + ~~~~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type 'i4' has no construct signatures. var obj37: i4 = new Base; var obj38: i4 = null; var obj39: i4 = function () { }; //var obj40: i4 = function foo() { }; var obj41: i4 = anyVar; var obj42: i4 = new anyVar; + ~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'i4'. + ~ +!!! error TS1109: Expression expected. + ~~ +!!! error TS2693: 'i4' only refers to a type, but is being used as a value here. var obj43: i4 = new {}; + ~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type '{}' has no construct signatures. // // Interface Derived I1 // var obj44: i5; var obj45: i5 = {}; + ~~~~~ +!!! error TS2739: Type '{}' is missing the following properties from type 'i5': p, p3, p6 var obj46: i5 = new Object(); + ~~~~~ +!!! error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? +!!! error TS2696: Type 'Object' is missing the following properties from type 'i5': p, p3, p6 var obj47: i5 = new obj44; + ~~~~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type 'i5' has no construct signatures. var obj48: i5 = new Base; + ~~~~~ +!!! error TS2739: Type 'Base' is missing the following properties from type 'i5': p, p3, p6 var obj49: i5 = null; var obj50: i5 = function () { }; + ~~~~~ +!!! error TS2322: Type '() => void' is not assignable to type 'i5'. //var obj51: i5 = function foo() { }; var obj52: i5 = anyVar; var obj53: i5 = new anyVar; + ~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'i5'. + ~ +!!! error TS1109: Expression expected. + ~~ +!!! error TS2693: 'i5' only refers to a type, but is being used as a value here. var obj54: i5 = new {}; + ~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type '{}' has no construct signatures. // // Interface Derived I2 // var obj55: i6; var obj56: i6 = {}; + ~~~~~ +!!! error TS2322: Type '{}' is not assignable to type 'i6'. +!!! error TS2322: Type '{}' provides no match for the signature '(): any'. var obj57: i6 = new Object(); + ~~~~~ +!!! error TS2322: Type 'Object' is not assignable to type 'i6'. +!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? +!!! error TS2322: Type 'Object' provides no match for the signature '(): any'. var obj58: i6 = new obj55; + ~~~~~~~~~ +!!! error TS2350: Only a void function can be called with the 'new' keyword. var obj59: i6 = new Base; + ~~~~~ +!!! error TS2322: Type 'Base' is not assignable to type 'i6'. +!!! error TS2322: Type 'Base' provides no match for the signature '(): any'. var obj60: i6 = null; var obj61: i6 = function () { }; + ~~~~~ +!!! error TS2322: Type '() => void' is not assignable to type 'i6'. +!!! error TS2322: Type 'void' is not assignable to type 'number'. //var obj62: i6 = function foo() { }; var obj63: i6 = anyVar; var obj64: i6 = new anyVar; + ~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'i6'. + ~ +!!! error TS1109: Expression expected. + ~~ +!!! error TS2693: 'i6' only refers to a type, but is being used as a value here. var obj65: i6 = new {}; + ~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type '{}' has no construct signatures. // // Interface Derived I3 // var obj66: i7; var obj67: i7 = {}; + ~~~~~ +!!! error TS2322: Type '{}' is not assignable to type 'i7'. +!!! error TS2322: Type '{}' provides no match for the signature 'new (): any'. var obj68: i7 = new Object(); + ~~~~~ +!!! error TS2322: Type 'Object' is not assignable to type 'i7'. +!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? +!!! error TS2322: Type 'Object' provides no match for the signature 'new (): any'. var obj69: i7 = new obj66; var obj70: i7 = new Base; + ~~~~~~~~~~~~ +!!! error TS2352: Conversion of type 'Base' to type 'i7' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Type 'Base' provides no match for the signature 'new (): any'. var obj71: i7 = null; var obj72: i7 = function () { }; + ~~~~~ +!!! error TS2322: Type '() => void' is not assignable to type 'i7'. +!!! error TS2322: Type '() => void' provides no match for the signature 'new (): any'. //var obj73: i7 = function foo() { }; var obj74: i7 = anyVar; var obj75: i7 = new anyVar; + ~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'i7'. + ~ +!!! error TS1109: Expression expected. + ~~ +!!! error TS2693: 'i7' only refers to a type, but is being used as a value here. var obj76: i7 = new {}; + ~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type '{}' has no construct signatures. // // Interface Derived I4 // @@ -605,10 +848,22 @@ intTypeCheck.ts(85,15): error TS9007: Declaration emit for this file requires ty var obj78: i8 = {}; var obj79: i8 = new Object(); var obj80: i8 = new obj77; + ~~~~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type 'i8' has no construct signatures. var obj81: i8 = new Base; var obj82: i8 = null; var obj83: i8 = function () { }; //var obj84: i8 = function foo() { }; var obj85: i8 = anyVar; var obj86: i8 = new anyVar; - var obj87: i8 = new {}; \ No newline at end of file + ~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'i8'. + ~ +!!! error TS1109: Expression expected. + ~~ +!!! error TS2693: 'i8' only refers to a type, but is being used as a value here. + var obj87: i8 = new {}; + ~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type '{}' has no construct signatures. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts index f94cb01969784..cbc60396a013d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts @@ -57,6 +57,9 @@ declare const a14: invalid; invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(7,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(8,15): error TS1125: Hexadecimal digit expected. +invalidTaggedTemplateEscapeSequences.ts(8,33): error TS1125: Hexadecimal digit expected. +invalidTaggedTemplateEscapeSequences.ts(8,75): error TS1125: Hexadecimal digit expected. invalidTaggedTemplateEscapeSequences.ts(9,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(11,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -74,7 +77,7 @@ invalidTaggedTemplateEscapeSequences.ts(23,13): error TS9007: Declaration emit f invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== invalidTaggedTemplateEscapeSequences.ts (18 errors) ==== +==== invalidTaggedTemplateEscapeSequences.ts (21 errors) ==== function tag (str: any, ...args: any[]): any { return str } @@ -89,6 +92,12 @@ invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es5).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es5).d.ts index f94cb01969784..cbc60396a013d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es5).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es5).d.ts @@ -57,6 +57,9 @@ declare const a14: invalid; invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(7,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(8,15): error TS1125: Hexadecimal digit expected. +invalidTaggedTemplateEscapeSequences.ts(8,33): error TS1125: Hexadecimal digit expected. +invalidTaggedTemplateEscapeSequences.ts(8,75): error TS1125: Hexadecimal digit expected. invalidTaggedTemplateEscapeSequences.ts(9,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(11,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -74,7 +77,7 @@ invalidTaggedTemplateEscapeSequences.ts(23,13): error TS9007: Declaration emit f invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== invalidTaggedTemplateEscapeSequences.ts (18 errors) ==== +==== invalidTaggedTemplateEscapeSequences.ts (21 errors) ==== function tag (str: any, ...args: any[]): any { return str } @@ -89,6 +92,12 @@ invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts index f94cb01969784..cbc60396a013d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts @@ -57,6 +57,9 @@ declare const a14: invalid; invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(7,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(8,15): error TS1125: Hexadecimal digit expected. +invalidTaggedTemplateEscapeSequences.ts(8,33): error TS1125: Hexadecimal digit expected. +invalidTaggedTemplateEscapeSequences.ts(8,75): error TS1125: Hexadecimal digit expected. invalidTaggedTemplateEscapeSequences.ts(9,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(11,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -74,7 +77,7 @@ invalidTaggedTemplateEscapeSequences.ts(23,13): error TS9007: Declaration emit f invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== invalidTaggedTemplateEscapeSequences.ts (18 errors) ==== +==== invalidTaggedTemplateEscapeSequences.ts (21 errors) ==== function tag (str: any, ...args: any[]): any { return str } @@ -89,6 +92,12 @@ invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts index e67574d789964..67292291dc3d6 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts @@ -78,13 +78,18 @@ declare namespace Ambient { enum2.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enum2.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enum2.ts(3,9): error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. enum2.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enum2.ts(4,9): error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. enum2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enum2.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +script-namespaces.ts(1,11): error TS1280: Namespaces are not allowed in global script files when 'isolatedModules' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement. -==== script-namespaces.ts (0 errors) ==== +==== script-namespaces.ts (1 errors) ==== namespace Instantiated { + ~~~~~~~~~~~~ +!!! error TS1280: Namespaces are not allowed in global script files when 'isolatedModules' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement. export const x = 1; } namespace Uninstantiated { @@ -104,7 +109,7 @@ enum2.ts(9,5): error TS9007: Declaration emit for this file requires type resolu declare enum Enum { X = 1_000_000 } const d = 'd'; -==== enum2.ts (5 errors) ==== +==== enum2.ts (7 errors) ==== enum Enum { D = d, ~ @@ -112,9 +117,13 @@ enum2.ts(9,5): error TS9007: Declaration emit for this file requires type resolu E = A, // error ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. Y = X, // error ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. Z = Enum.A ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/mergedDeclarations2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/mergedDeclarations2.d.ts index 06d1968d7bd03..928eaccd91bcb 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/mergedDeclarations2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/mergedDeclarations2.d.ts @@ -29,10 +29,11 @@ declare namespace Foo { /// [Errors] //// mergedDeclarations2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +mergedDeclarations2.ts(9,20): error TS2304: Cannot find name 'b'. mergedDeclarations2.ts(9,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== mergedDeclarations2.ts (2 errors) ==== +==== mergedDeclarations2.ts (3 errors) ==== enum Foo { b } @@ -45,5 +46,7 @@ mergedDeclarations2.ts(9,20): error TS9007: Declaration emit for this file requi module Foo { export var x = b ~ +!!! error TS2304: Cannot find name 'b'. + ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts index 7c55ab601cfc3..bc4fa0c18682e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts @@ -109,14 +109,25 @@ interface I3 { } /// [Errors] //// +overloadsWithComputedNames.ts(4,5): error TS2389: Function implementation name must be '["B"]'. overloadsWithComputedNames.ts(8,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +overloadsWithComputedNames.ts(14,5): error TS2391: Function implementation is missing or not immediately following the declaration. +overloadsWithComputedNames.ts(16,5): error TS2389: Function implementation name must be '["bar"]'. +overloadsWithComputedNames.ts(28,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. +overloadsWithComputedNames.ts(29,5): error TS2391: Function implementation is missing or not immediately following the declaration. +overloadsWithComputedNames.ts(35,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. +overloadsWithComputedNames.ts(42,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. +overloadsWithComputedNames.ts(47,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. +overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is missing or not immediately following the declaration. -==== overloadsWithComputedNames.ts (1 errors) ==== +==== overloadsWithComputedNames.ts (10 errors) ==== // https://github.com/microsoft/TypeScript/issues/52329 class Person { ["B"](a: number): string; ["A"](a: string|number): number | string { + ~~~~~ +!!! error TS2389: Function implementation name must be '["B"]'. return 0; } } @@ -129,8 +140,12 @@ overloadsWithComputedNames.ts(8,9): error TS9007: Declaration emit for this file // https://github.com/microsoft/TypeScript/issues/17345 class C { ["foo"](): void + ~~~~~~~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. ["bar"](): void; ["foo"]() { + ~~~~~~~ +!!! error TS2389: Function implementation name must be '["bar"]'. return 0; } } @@ -143,13 +158,19 @@ overloadsWithComputedNames.ts(8,9): error TS9007: Declaration emit for this file class C1 { [sym](): void; // should error + ~~~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. [uniqueSym2](): void; // should error + ~~~~~~~~~~~~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. [uniqueSym](): void; [uniqueSym]() { } } interface I1 { [sym](): void; // should error + ~~~~~ +!!! 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. [uniqueSym2](): void; [uniqueSym](): void; [uniqueSym](): void; @@ -157,16 +178,22 @@ overloadsWithComputedNames.ts(8,9): error TS9007: Declaration emit for this file class C2 { [strUnion](): void; // should error + ~~~~~~~~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. [strUnion]() { } } class I2 { [strUnion](): void; // should error + ~~~~~~~~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. [strUnion]() { } } class C3 { [1](): void; // should error + ~~~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. [2](): void; [2]() { } } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts index 3207f63890fd6..f8e2c7d863c97 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts @@ -123,10 +123,28 @@ declare const doubleSeparator = 123456789n; declare const oneTwoOrThree: (x: 1n | 2n | 3n) => bigint; /// [Errors] //// +parseBigInt.ts(51,20): error TS2736: Operator '+' cannot be applied to type 'bigint'. +parseBigInt.ts(52,23): error TS2736: Operator '+' cannot be applied to type 'bigint'. +parseBigInt.ts(56,21): error TS1121: Octal literals are not allowed. Use the syntax '0o123'. +parseBigInt.ts(56,25): error TS1005: ',' expected. +parseBigInt.ts(57,22): error TS1352: A bigint literal cannot use exponential notation. +parseBigInt.ts(58,19): error TS1353: A bigint literal must be an integer. +parseBigInt.ts(59,26): error TS1353: A bigint literal must be an integer. +parseBigInt.ts(60,23): error TS1177: Binary digit expected. +parseBigInt.ts(61,20): error TS1178: Octal digit expected. +parseBigInt.ts(62,20): error TS1125: Hexadecimal digit expected. +parseBigInt.ts(63,26): error TS2304: Cannot find name '_123n'. parseBigInt.ts(63,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseBigInt.ts(64,30): error TS6188: Numeric separators are not allowed here. +parseBigInt.ts(65,33): error TS6189: Multiple consecutive numeric separators are not permitted. +parseBigInt.ts(69,15): error TS2345: Argument of type '0n' is not assignable to parameter of type '1n | 3n | 2n'. +parseBigInt.ts(70,15): error TS2345: Argument of type '0' is not assignable to parameter of type '1n | 3n | 2n'. +parseBigInt.ts(70,34): error TS2345: Argument of type '1' is not assignable to parameter of type '1n | 3n | 2n'. +parseBigInt.ts(70,53): error TS2345: Argument of type '2' is not assignable to parameter of type '1n | 3n | 2n'. +parseBigInt.ts(70,72): error TS2345: Argument of type '3' is not assignable to parameter of type '1n | 3n | 2n'. -==== parseBigInt.ts (1 errors) ==== +==== parseBigInt.ts (19 errors) ==== // All bases should allow "n" suffix const bin = 0b101, binBig = 0b101n; // 5, 5n const oct = 0o567, octBig = 0o567n; // 375, 375n @@ -178,24 +196,60 @@ parseBigInt.ts(63,26): error TS9007: Declaration emit for this file requires typ // Plus not allowed on literals const unaryPlus = +123n; + ~~~~ +!!! error TS2736: Operator '+' cannot be applied to type 'bigint'. const unaryPlusHex = +0x123n; + ~~~~~~ +!!! error TS2736: Operator '+' cannot be applied to type 'bigint'. // Parsing errors // In separate blocks because they each declare an "n" variable { const legacyOct = 0123n; } + ~~~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o123'. + ~ +!!! error TS1005: ',' expected. { const scientific = 1e2n; } + ~~~~ +!!! error TS1352: A bigint literal cannot use exponential notation. { const decimal = 4.1n; } + ~~~~ +!!! error TS1353: A bigint literal must be an integer. { const leadingDecimal = .1n; } + ~~~ +!!! error TS1353: A bigint literal must be an integer. const emptyBinary = 0bn; // should error but infer 0n + +!!! error TS1177: Binary digit expected. const emptyOct = 0on; // should error but infer 0n + +!!! error TS1178: Octal digit expected. const emptyHex = 0xn; // should error but infer 0n + +!!! error TS1125: Hexadecimal digit expected. const leadingSeparator = _123n; ~~~~~ +!!! error TS2304: Cannot find name '_123n'. + ~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. const trailingSeparator = 123_n; + ~ +!!! error TS6188: Numeric separators are not allowed here. const doubleSeparator = 123_456__789n; + ~ +!!! error TS6189: Multiple consecutive numeric separators are not permitted. // Using literals as types const oneTwoOrThree = (x: 1n | 2n | 3n): bigint => x ** 2n; oneTwoOrThree(0n); oneTwoOrThree(1n); oneTwoOrThree(2n); oneTwoOrThree(3n); - oneTwoOrThree(0); oneTwoOrThree(1); oneTwoOrThree(2); oneTwoOrThree(3); \ No newline at end of file + ~~ +!!! error TS2345: Argument of type '0n' is not assignable to parameter of type '1n | 3n | 2n'. + oneTwoOrThree(0); oneTwoOrThree(1); oneTwoOrThree(2); oneTwoOrThree(3); + ~ +!!! error TS2345: Argument of type '0' is not assignable to parameter of type '1n | 3n | 2n'. + ~ +!!! error TS2345: Argument of type '1' is not assignable to parameter of type '1n | 3n | 2n'. + ~ +!!! error TS2345: Argument of type '2' is not assignable to parameter of type '1n | 3n | 2n'. + ~ +!!! error TS2345: Argument of type '3' is not assignable to parameter of type '1n | 3n | 2n'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName13.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName13.d.ts index 274b939a560b8..b996c505b7221 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName13.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName13.d.ts @@ -11,3 +11,15 @@ var v: { [e]: number }; declare var v: { [e]: number; }; +/// [Errors] //// + +parserComputedPropertyName13.ts(1,10): 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. +parserComputedPropertyName13.ts(1,11): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName13.ts (2 errors) ==== + var v: { [e]: number }; + ~~~ +!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName14.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName14.d.ts index 5d1567549207c..b234c83506ecf 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName14.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName14.d.ts @@ -11,3 +11,15 @@ var v: { [e](): number }; declare var v: { [e](): number; }; +/// [Errors] //// + +parserComputedPropertyName14.ts(1,10): 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. +parserComputedPropertyName14.ts(1,11): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName14.ts (2 errors) ==== + var v: { [e](): number }; + ~~~ +!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName15.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName15.d.ts index 24a73c7b8f467..d34ac2da091fb 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName15.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName15.d.ts @@ -12,3 +12,15 @@ declare var v: { [e: number]: string; [e]: number; }; +/// [Errors] //// + +parserComputedPropertyName15.ts(1,31): 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. +parserComputedPropertyName15.ts(1,32): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName15.ts (2 errors) ==== + var v: { [e: number]: string; [e]: number }; + ~~~ +!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName18.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName18.d.ts index e75902f92667a..b7d74491774bc 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName18.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName18.d.ts @@ -11,3 +11,15 @@ var v: { [e]?(): number }; declare var v: { [e]?(): number; }; +/// [Errors] //// + +parserComputedPropertyName18.ts(1,10): 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. +parserComputedPropertyName18.ts(1,11): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName18.ts (2 errors) ==== + var v: { [e]?(): number }; + ~~~ +!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName19.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName19.d.ts index 3507928e7c66c..d4bc36feb3b3b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName19.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName19.d.ts @@ -11,3 +11,15 @@ var v: { [e]? }; declare var v: { [e]?: any; }; +/// [Errors] //// + +parserComputedPropertyName19.ts(1,10): 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. +parserComputedPropertyName19.ts(1,11): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName19.ts (2 errors) ==== + var v: { [e]? }; + ~~~ +!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName2.d.ts index 96fdddeaf6c2c..219286fbc0310 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName2.d.ts @@ -11,3 +11,12 @@ var v = { [e]: 1 }; declare var v: { [e]: number; }; +/// [Errors] //// + +parserComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName2.ts (1 errors) ==== + var v = { [e]: 1 }; + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName20.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName20.d.ts index 50e2cc9e060bd..2e8268b88f932 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName20.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName20.d.ts @@ -13,3 +13,17 @@ interface I { interface I { [e](): number; } +/// [Errors] //// + +parserComputedPropertyName20.ts(2,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. +parserComputedPropertyName20.ts(2,6): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName20.ts (2 errors) ==== + interface I { + [e](): number + ~~~ +!!! 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 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName21.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName21.d.ts index beff363c673be..0ad21a0c372b1 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName21.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName21.d.ts @@ -13,3 +13,17 @@ interface I { interface I { [e]: number; } +/// [Errors] //// + +parserComputedPropertyName21.ts(2,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. +parserComputedPropertyName21.ts(2,6): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName21.ts (2 errors) ==== + interface I { + [e]: number + ~~~ +!!! 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 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName37.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName37.d.ts index f4d0a277c16a1..2668bb5b41aed 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName37.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName37.d.ts @@ -13,3 +13,14 @@ var v = { declare var v: { [public]: number; }; +/// [Errors] //// + +parserComputedPropertyName37.ts(2,6): error TS2304: Cannot find name 'public'. + + +==== parserComputedPropertyName37.ts (1 errors) ==== + var v = { + [public]: 0 + ~~~~~~ +!!! error TS2304: Cannot find name 'public'. + }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName2.d.ts index f2f036ddccf86..704eb7616d12d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName2.d.ts @@ -11,3 +11,12 @@ var v = { [e]: 1 }; declare var v: { [e]: number; }; +/// [Errors] //// + +parserES5ComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. + + +==== parserES5ComputedPropertyName2.ts (1 errors) ==== + var v = { [e]: 1 }; + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName5.d.ts index 75c0bb66d7b2e..d210ebd488042 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName5.d.ts @@ -13,3 +13,17 @@ interface I { interface I { [e]: number; } +/// [Errors] //// + +parserES5ComputedPropertyName5.ts(2,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. +parserES5ComputedPropertyName5.ts(2,6): error TS2304: Cannot find name 'e'. + + +==== parserES5ComputedPropertyName5.ts (2 errors) ==== + interface I { + [e]: number + ~~~ +!!! 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 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName8.d.ts index 88fb60249b607..07c39b13dbdfb 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName8.d.ts @@ -11,3 +11,15 @@ var v: { [e]: number }; declare var v: { [e]: number; }; +/// [Errors] //// + +parserES5ComputedPropertyName8.ts(1,10): 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. +parserES5ComputedPropertyName8.ts(1,11): error TS2304: Cannot find name 'e'. + + +==== parserES5ComputedPropertyName8.ts (2 errors) ==== + var v: { [e]: number }; + ~~~ +!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty1.d.ts index f14a18feaa42a..072954cf6554d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty1.d.ts @@ -13,3 +13,17 @@ interface I { interface I { [Symbol.iterator]: string; } +/// [Errors] //// + +parserES5SymbolProperty1.ts(2,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. +parserES5SymbolProperty1.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + +==== parserES5SymbolProperty1.ts (2 errors) ==== + interface I { + [Symbol.iterator]: string; + ~~~~~~~~~~~~~~~~~ +!!! 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 TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty2.d.ts index c1d6233287497..27bcad616f284 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty2.d.ts @@ -13,3 +13,17 @@ interface I { interface I { [Symbol.unscopables](): string; } +/// [Errors] //// + +parserES5SymbolProperty2.ts(2,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. +parserES5SymbolProperty2.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + +==== parserES5SymbolProperty2.ts (2 errors) ==== + interface I { + [Symbol.unscopables](): string; + ~~~~~~~~~~~~~~~~~~~~ +!!! 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 TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts index 1f7de4bd3ef3e..85843535213a6 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts @@ -13,3 +13,17 @@ var x: { declare var x: { [Symbol.toPrimitive](): string; }; +/// [Errors] //// + +parserES5SymbolProperty8.ts(2,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. +parserES5SymbolProperty8.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + +==== parserES5SymbolProperty8.ts (2 errors) ==== + var x: { + [Symbol.toPrimitive](): 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 TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty9.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty9.d.ts index 13a9ab736d5e7..da3520a8e6559 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty9.d.ts @@ -13,3 +13,17 @@ var x: { declare var x: { [Symbol.toPrimitive]: string; }; +/// [Errors] //// + +parserES5SymbolProperty9.ts(2,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. +parserES5SymbolProperty9.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + +==== parserES5SymbolProperty9.ts (2 errors) ==== + var x: { + [Symbol.toPrimitive]: 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 TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature11.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature11.d.ts index b9428e208f95e..821317598fbbf 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature11.d.ts @@ -17,3 +17,25 @@ interface I { [p1: string]: any; [p2: string, p3: number]: any; } +/// [Errors] //// + +parserIndexSignature11.ts(2,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. +parserIndexSignature11.ts(2,10): error TS2304: Cannot find name 'p'. +parserIndexSignature11.ts(3,9): error TS1021: An index signature must have a type annotation. +parserIndexSignature11.ts(4,10): error TS1096: An index signature must have exactly one parameter. + + +==== parserIndexSignature11.ts (4 errors) ==== + interface I { + [p]; // Used to be indexer, now it is a computed property + ~~~ +!!! 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. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature5.d.ts index 74f8a4f5a32ac..38473325d903d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature5.d.ts @@ -13,3 +13,17 @@ interface I { interface I { [a]: any; } +/// [Errors] //// + +parserIndexSignature5.ts(2,3): 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. +parserIndexSignature5.ts(2,4): error TS2304: Cannot find name 'a'. + + +==== parserIndexSignature5.ts (2 errors) ==== + interface I { + [a] // Used to be indexer, now it is a computed property + ~~~ +!!! 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 'a'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts index 095a14fe11d5a..052f40aaafc0f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts @@ -13,12 +13,15 @@ function eval() { declare function eval(): invalid; /// [Errors] //// +parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. parserStrictMode8.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== parserStrictMode8.ts (1 errors) ==== +==== parserStrictMode8.ts (2 errors) ==== "use strict"; function eval() { ~~~~ +!!! error TS1100: Invalid use of 'eval' in strict mode. + ~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/propertyAssignment.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/propertyAssignment.d.ts index 681ec74de21be..2d732e067150c 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/propertyAssignment.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/propertyAssignment.d.ts @@ -39,3 +39,38 @@ declare var foo3: { declare var bar3: { x: number; }; +/// [Errors] //// + +propertyAssignment.ts(4,13): 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. +propertyAssignment.ts(4,14): error TS2304: Cannot find name 'index'. +propertyAssignment.ts(12,1): error TS2322: Type '{ x: number; }' is not assignable to type 'new () => any'. + Type '{ x: number; }' provides no match for the signature 'new (): any'. +propertyAssignment.ts(14,1): error TS2322: Type '{ x: number; }' is not assignable to type '() => void'. + Type '{ x: number; }' provides no match for the signature '(): void'. + + +==== propertyAssignment.ts (4 errors) ==== + var foo1: { new ():any; } + var bar1: { x : number; } + + var foo2: { [index]; } // should be an error, used to be indexer, now it is a computed property + ~~~~~~~ +!!! 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 'index'. + var bar2: { x : number; } + + var foo3: { ():void; } + var bar3: { x : number; } + + + + foo1 = bar1; // should be an error + ~~~~ +!!! error TS2322: Type '{ x: number; }' is not assignable to type 'new () => any'. +!!! error TS2322: Type '{ x: number; }' provides no match for the signature 'new (): any'. + foo2 = bar2; + foo3 = bar3; // should be an error + ~~~~ +!!! error TS2322: Type '{ x: number; }' is not assignable to type '() => void'. +!!! error TS2322: Type '{ x: number; }' provides no match for the signature '(): void'. \ 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 index bec440e3f7cf1..ae3f6a71b4f04 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolDeclarationEmit12.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolDeclarationEmit12.d.ts @@ -34,10 +34,12 @@ declare namespace M { /// [Errors] //// symbolDeclarationEmit12.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolDeclarationEmit12.ts(9,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. symbolDeclarationEmit12.ts(9,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 { @@ -50,7 +52,11 @@ symbolDeclarationEmit12.ts(9,13): error TS9007: Declaration emit for this file r } get [Symbol.toPrimitive]() { return undefined; } ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + ~~~~~~~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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/symbolProperty52.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty52.d.ts index 4e823724a75b6..e962fac90cd45 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty52.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty52.d.ts @@ -17,3 +17,21 @@ obj[Symbol.nonsense]; declare var obj: { [Symbol.nonsense]: number; }; +/// [Errors] //// + +symbolProperty52.ts(2,13): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. +symbolProperty52.ts(7,12): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. + + +==== symbolProperty52.ts (2 errors) ==== + var obj = { + [Symbol.nonsense]: 0 + ~~~~~~~~ +!!! error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. + }; + + obj = {}; + + obj[Symbol.nonsense]; + ~~~~~~~~ +!!! error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty53.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty53.d.ts index c6b68fffe1f72..4429de47e04aa 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty53.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty53.d.ts @@ -15,3 +15,19 @@ obj[Symbol.for]; declare var obj: { [Symbol.for]: number; }; +/// [Errors] //// + +symbolProperty53.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +symbolProperty53.ts(5,5): error TS2538: Type '(key: string) => symbol' cannot be used as an index type. + + +==== symbolProperty53.ts (2 errors) ==== + var obj = { + [Symbol.for]: 0 + ~~~~~~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + }; + + obj[Symbol.for]; + ~~~~~~~~~~ +!!! error TS2538: Type '(key: string) => symbol' cannot be used as an index type. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty54.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty54.d.ts index 8729d899e95d3..fd6db59c79120 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty54.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty54.d.ts @@ -13,3 +13,14 @@ var obj = { declare var obj: { [Symbol.prototype]: number; }; +/// [Errors] //// + +symbolProperty54.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + + +==== symbolProperty54.ts (1 errors) ==== + var obj = { + [Symbol.prototype]: 0 + ~~~~~~~~~~~~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty59.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty59.d.ts index b345cc42ca46f..165461c59e98c 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty59.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty59.d.ts @@ -13,3 +13,17 @@ interface I { interface I { [Symbol.keyFor]: string; } +/// [Errors] //// + +symbolProperty59.ts(2,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. +symbolProperty59.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + + +==== symbolProperty59.ts (2 errors) ==== + interface I { + [Symbol.keyFor]: string; + ~~~~~~~~~~~~~~~ +!!! 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 TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralTypes4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralTypes4.d.ts index 27fab631422b1..c39fc7941bed3 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralTypes4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralTypes4.d.ts @@ -470,9 +470,11 @@ declare function f4(s: `**${T}**`): T; templateLiteralTypes4.ts(43,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. templateLiteralTypes4.ts(43,60): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 @@ -762,10 +764,14 @@ templateLiteralTypes4.ts(43,60): error TS9007: Declaration emit for this file re 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; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts index 22e05e55eaa71..365b7d29b7714 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts @@ -56,13 +56,25 @@ type T4 = { }; /// [Errors] //// +typeUsedAsTypeLiteralIndex.ts(3,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. +typeUsedAsTypeLiteralIndex.ts(3,6): error TS2690: 'K' only refers to a type, but is being used as a value here. Did you mean to use 'P in K'? typeUsedAsTypeLiteralIndex.ts(6,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +typeUsedAsTypeLiteralIndex.ts(13,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. +typeUsedAsTypeLiteralIndex.ts(13,6): error TS2690: 'K2' only refers to a type, but is being used as a value here. Did you mean to use 'K in K2'? +typeUsedAsTypeLiteralIndex.ts(18,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. +typeUsedAsTypeLiteralIndex.ts(18,6): error TS2690: 'K3' only refers to a type, but is being used as a value here. Did you mean to use 'K in K3'? +typeUsedAsTypeLiteralIndex.ts(23,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. +typeUsedAsTypeLiteralIndex.ts(23,6): error TS2693: 'K4' only refers to a type, but is being used as a value here. -==== typeUsedAsTypeLiteralIndex.ts (1 errors) ==== +==== typeUsedAsTypeLiteralIndex.ts (9 errors) ==== type K = number | string; type T = { [K]: number; // Did you mean to use 'P in K'? + ~~~ +!!! 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 TS2690: 'K' only refers to a type, but is being used as a value here. Did you mean to use 'P in K'? } const K1 = Symbol(); @@ -75,16 +87,28 @@ typeUsedAsTypeLiteralIndex.ts(6,12): error TS9007: Declaration emit for this fil type K2 = "x" | "y"; type T2 = { [K2]: number; // Did you mean to use 'K in K2'? + ~~~~ +!!! 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 TS2690: 'K2' only refers to a type, but is being used as a value here. Did you mean to use 'K in K2'? } type K3 = number | string; type T3 = { [K3]: number; // Did you mean to use 'K in K3'? + ~~~~ +!!! 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 TS2690: 'K3' only refers to a type, but is being used as a value here. Did you mean to use 'K in K3'? } type K4 = number | string; type T4 = { [K4]: number; + ~~~~ +!!! 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 TS2693: 'K4' only refers to a type, but is being used as a value here. k4: string; } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts index 4f43c7d1e1c32..64c2bad4ffe22 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts @@ -54,25 +54,40 @@ declare const b: { declare const c: invalid; /// [Errors] //// +a.ts(2,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. +a.ts(8,11): error TS2538: Type '1n' cannot be used as an index type. +a.ts(14,1): error TS2322: Type 'bigint' is not assignable to type 'string | number | symbol'. a.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +a.ts(19,12): error TS2538: Type 'bigint' cannot be used as an index type. +b.ts(2,12): error TS1136: Property assignment expected. +b.ts(2,14): error TS1005: ';' expected. +b.ts(2,19): error TS1128: Declaration or statement expected. +b.ts(3,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. b.ts(4,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== a.ts (1 errors) ==== +==== a.ts (5 errors) ==== interface BigIntIndex { [index: bigint]: E; // should error + ~~~~~ +!!! error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. } const arr: number[] = [1, 2, 3]; let num: number = arr[1]; num = arr["1"]; num = arr[1n]; // should error + ~~ +!!! error TS2538: Type '1n' cannot be used as an index type. let key: keyof any; // should be type "string | number | symbol" key = 123; key = "abc"; key = Symbol(); key = 123n; // should error + ~~~ +!!! error TS2322: Type 'bigint' is not assignable to type 'string | number | symbol'. // Show correct usage of bigint index: explicitly convert to string const bigNum: bigint = 0n; @@ -80,16 +95,28 @@ b.ts(4,12): error TS9007: Declaration emit for this file requires type resolutio ~~~~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. typedArray[bigNum] = 0xAA; // should error + ~~~~~~ +!!! error TS2538: Type 'bigint' cannot be used as an index type. typedArray[String(bigNum)] = 0xAA; typedArray["1"] = 0xBB; typedArray[2] = 0xCC; // {1n: 123} is a syntax error; must go in separate file so BigIntIndex error is shown -==== b.ts (1 errors) ==== +==== b.ts (6 errors) ==== // BigInt cannot be used as an object literal property const a = {1n: 123}; + ~~ +!!! error TS1136: Property assignment expected. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. const b = {[1n]: 456}; + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. const c = {[bigNum]: 789}; ~~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts index 3b7f82967cdcf..c58f24ec480fd 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts @@ -166,15 +166,19 @@ declare namespace mglo5 { complicatedPrivacy.ts(5,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. complicatedPrivacy.ts(7,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(11,24): error TS1054: A 'get' accessor cannot have parameters. complicatedPrivacy.ts(11,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. complicatedPrivacy.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. complicatedPrivacy.ts(24,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. complicatedPrivacy.ts(33,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(35,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. +complicatedPrivacy.ts(35,6): error TS2693: 'number' only refers to a type, but is being used as a value here. complicatedPrivacy.ts(40,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported member 'i6'. complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== complicatedPrivacy.ts (8 errors) ==== +==== complicatedPrivacy.ts (12 errors) ==== module m1 { export module m2 { @@ -191,6 +195,8 @@ complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requi export class C2 implements m3.i3 { public get p1(arg) { ~~ +!!! error TS1054: A 'get' accessor cannot have parameters. + ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. return new C1(); } @@ -222,6 +228,10 @@ complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requi !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. { [number]: C1; // Used to be indexer, now it is a computed property + ~~~~~~~~ +!!! 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 TS2693: 'number' only refers to a type, but is being used as a value here. }) { } @@ -262,6 +272,8 @@ complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requi export module m3 { export class c_pr implements mglo5.i5, mglo5.i6 { + ~~ +!!! error TS2694: Namespace 'mglo5' has no exported member 'i6'. f1() { ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts index ba908211cc531..dbe7ce0a3cdb3 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts @@ -22,11 +22,13 @@ declare var v: invalid; /// [Errors] //// computedPropertyNames6_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames6_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames6_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames6_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames6_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== computedPropertyNames6_ES5.ts (3 errors) ==== +==== computedPropertyNames6_ES5.ts (5 errors) ==== var p1: number | string; var p2: number | number[]; var p3: string | boolean; @@ -36,8 +38,12 @@ computedPropertyNames6_ES5.ts(7,5): error TS9007: Declaration emit for this file !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. [p2]: 1, ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. [p3]: 2 ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts index 1c0f11d37b5e8..c031a79290566 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts @@ -22,11 +22,13 @@ declare var v: invalid; /// [Errors] //// computedPropertyNames6_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames6_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames6_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames6_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames6_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== computedPropertyNames6_ES6.ts (3 errors) ==== +==== computedPropertyNames6_ES6.ts (5 errors) ==== var p1: number | string; var p2: number | number[]; var p3: string | boolean; @@ -36,8 +38,12 @@ computedPropertyNames6_ES6.ts(7,5): error TS9007: Declaration emit for this file !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. [p2]: 1, ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. [p3]: 2 ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts index b293d3d0140f2..4e7710dc827d7 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts @@ -23,20 +23,26 @@ declare class C { } /// [Errors] //// +computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== computedPropertyNamesOnOverloads_ES5.ts (3 errors) ==== +==== computedPropertyNamesOnOverloads_ES5.ts (5 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { [methodName](v: string); ~~~~~~~~~~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. [methodName](); ~~~~~~~~~~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. [methodName](v?: string) { } ~~~~~~~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts index 0be0c83c675a6..6da1c1cecd108 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts @@ -23,20 +23,26 @@ declare class C { } /// [Errors] //// +computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== computedPropertyNamesOnOverloads_ES6.ts (3 errors) ==== +==== computedPropertyNamesOnOverloads_ES6.ts (5 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { [methodName](v: string); ~~~~~~~~~~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. [methodName](); ~~~~~~~~~~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. [methodName](v?: string) { } ~~~~~~~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/constEnum2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/constEnum2.d.ts index 173d8226c8bc9..f457ecb42e0bf 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/constEnum2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/constEnum2.d.ts @@ -31,11 +31,13 @@ declare const enum D { constEnum2.ts(7,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnum2.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnum2.ts(10,9): error TS2474: const enum member initializers must be constant expressions. constEnum2.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnum2.ts(11,9): error TS2474: const enum member initializers must be constant expressions. constEnum2.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== constEnum2.ts (4 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. @@ -50,9 +52,13 @@ constEnum2.ts(12,5): error TS9007: Declaration emit for this file requires type e = 199 * Math.floor(Math.random() * 1000), ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. f = d - (100 * Math.floor(Math.random() % 8)), ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. g = CONST, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts index c6981d08f350e..6da8de432c55a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts @@ -83,29 +83,49 @@ declare const enum NaNOrInfinity { } /// [Errors] //// +constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. constEnumErrors.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. constEnumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. +constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. constEnumErrors.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(15,10): error TS2474: const enum member initializers must be constant expressions. +constEnumErrors.ts(15,13): error TS2339: Property 'Z' does not exist on type 'typeof E1'. constEnumErrors.ts(22,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(22,13): error TS2476: A const enum member can only be accessed using a string literal. constEnumErrors.ts(24,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(24,13): error TS2476: A const enum member can only be accessed using a string literal. constEnumErrors.ts(25,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(25,13): error TS2476: A const enum member can only be accessed using a string literal. +constEnumErrors.ts(27,9): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. constEnumErrors.ts(27,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(28,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(28,10): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. +constEnumErrors.ts(33,5): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. constEnumErrors.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(39,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(41,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(41,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. constEnumErrors.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(42,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. constEnumErrors.ts(43,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. -==== constEnumErrors.ts (15 errors) ==== +==== constEnumErrors.ts (31 errors) ==== const enum E { + ~ +!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. A } module E { + ~ +!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. var x = 1; } @@ -115,13 +135,23 @@ constEnumErrors.ts(43,5): error TS9007: Declaration emit for this file requires X = Y, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. // forward reference to the element of the same enum Y = E1.Z, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. + ~ +!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. Y1 = E1["Z"] ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. + ~~~ +!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. } const enum E2 { @@ -131,25 +161,37 @@ constEnumErrors.ts(43,5): error TS9007: Declaration emit for this file requires var y0 = E2[1] ~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2476: A const enum member can only be accessed using a string literal. var name = "A"; var y1 = E2[name]; ~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ +!!! error TS2476: A const enum member can only be accessed using a string literal. var y2 = E2[`${name}`]; ~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~ +!!! error TS2476: A const enum member can only be accessed using a string literal. var x = E2; ~~ +!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. + ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. var y = [E2]; ~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. function foo(t: any): void { } foo(E2); + ~~ +!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. const enum NaNOrInfinity { A = 9007199254740992, @@ -168,10 +210,16 @@ constEnumErrors.ts(43,5): error TS9007: Declaration emit for this file requires F = E * E, // overflow ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. G = 1 / 0, // overflow ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. H = 0 / 0 // NaN ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics2.d.ts index f8914af11377f..d57a775eddc2a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics2.d.ts @@ -38,27 +38,40 @@ declare enum Bar { /// [Errors] //// enumBasics2.ts(4,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(4,9): error TS2339: Property 'b' does not exist on type 'Foo.a'. enumBasics2.ts(5,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(5,9): error TS2339: Property 'a' does not exist on type 'Foo.b'. enumBasics2.ts(6,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(6,9): error TS2339: Property 'x' does not exist on type 'Foo.y'. +enumBasics2.ts(6,15): error TS2339: Property 'x' does not exist on type 'Foo.a'. enumBasics2.ts(10,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumBasics2.ts(11,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumBasics2.ts(12,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumBasics2.ts(13,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(13,13): error TS2339: Property 'a' does not exist on type 'Foo.a'. -==== enumBasics2.ts (7 errors) ==== +==== enumBasics2.ts (12 errors) ==== enum Foo { a = 2, b = 3, x = a.b, // should error ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2339: Property 'b' does not exist on type 'Foo.a'. y = b.a, // should error ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2339: Property 'a' does not exist on type 'Foo.b'. z = y.x * a.x, // should error ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2339: Property 'x' does not exist on type 'Foo.y'. + ~ +!!! error TS2339: Property 'x' does not exist on type 'Foo.a'. } enum Bar { @@ -74,5 +87,7 @@ enumBasics2.ts(13,3): error TS9007: Declaration emit for this file requires type d = Foo.a.a, // should error ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2339: Property 'a' does not exist on type 'Foo.a'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics3.d.ts index b4fa605ff054d..fdd076957554e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics3.d.ts @@ -44,11 +44,13 @@ declare namespace M { /// [Errors] //// enumBasics3.ts(5,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics3.ts(5,13): error TS2339: Property 'a' does not exist on type 'E1.a'. enumBasics3.ts(13,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumBasics3.ts(14,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics3.ts(14,20): error TS2339: Property 'a' does not exist on type 'E1.a'. -==== enumBasics3.ts (3 errors) ==== +==== enumBasics3.ts (5 errors) ==== module M { export namespace N { export enum E1 { @@ -56,6 +58,8 @@ enumBasics3.ts(14,7): error TS9007: Declaration emit for this file requires type b = a.a, // should error ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2339: Property 'a' does not exist on type 'E1.a'. } } } @@ -69,6 +73,8 @@ enumBasics3.ts(14,7): error TS9007: Declaration emit for this file requires type c = M.N.E1.a.a, // should error ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2339: Property 'a' does not exist on type 'E1.a'. } } } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts index 95f801e43a3b9..c23fe2384c588 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts @@ -92,15 +92,22 @@ enumConstantMembers.ts(26,5): error TS9007: Declaration emit for this file requi enumConstantMembers.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumConstantMembers.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumConstantMembers.ts(32,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(32,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. enumConstantMembers.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(33,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. enumConstantMembers.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(34,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. enumConstantMembers.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(35,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. enumConstantMembers.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(36,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. enumConstantMembers.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(37,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. enumConstantMembers.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(38,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -==== enumConstantMembers.ts (14 errors) ==== +==== enumConstantMembers.ts (21 errors) ==== // Constant members allow negatives, but not decimals. Also hex literals are allowed enum E1 { a = 1, @@ -149,23 +156,37 @@ enumConstantMembers.ts(38,5): error TS9007: Declaration emit for this file requi a = 1 / 0, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. b = 2 / 0.0, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. c = 1.0 / 0.0, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. d = 0.0 / 0.0, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~ +!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. e = NaN, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. f = Infinity, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. g = -Infinity ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumErrors.d.ts index 6ea893920e0ce..a24c21dc0e0b0 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/enumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/enumErrors.d.ts @@ -115,33 +115,69 @@ declare enum E14 { } /// [Errors] //// +enumErrors.ts(2,6): error TS2431: Enum name cannot be 'any'. +enumErrors.ts(3,6): error TS2431: Enum name cannot be 'number'. +enumErrors.ts(4,6): error TS2431: Enum name cannot be 'string'. +enumErrors.ts(5,6): error TS2431: Enum name cannot be 'boolean'. enumErrors.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(9,9): error TS18033: Type 'Number' is not assignable to type 'number' as required for computed enum member values. + 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. enumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumErrors.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumErrors.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(26,9): error TS18033: Type 'boolean' is not assignable to type 'number' as required for computed enum member values. enumErrors.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(27,9): error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. enumErrors.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(28,9): error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. enumErrors.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(29,9): error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. enumErrors.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(30,9): error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. enumErrors.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(36,9): error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. enumErrors.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(37,9): error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. enumErrors.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(38,9): error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. enumErrors.ts(39,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(40,9): error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. +enumErrors.ts(48,18): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(49,24): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(49,26): error TS2452: An enum member cannot have a numeric name. +enumErrors.ts(50,28): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(50,30): error TS2452: An enum member cannot have a numeric name. +enumErrors.ts(50,31): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(53,16): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(53,22): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(53,30): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(53,33): error TS2452: An enum member cannot have a numeric name. -==== enumErrors.ts (13 errors) ==== +==== enumErrors.ts (37 errors) ==== // Enum named with PredefinedTypes enum any { } + ~~~ +!!! error TS2431: Enum name cannot be 'any'. enum number { } + ~~~~~~ +!!! error TS2431: Enum name cannot be 'number'. enum string { } + ~~~~~~ +!!! error TS2431: Enum name cannot be 'string'. enum boolean { } + ~~~~~~~ +!!! error TS2431: Enum name cannot be 'boolean'. // Enum with computed member initializer of type Number enum E5 { C = new Number(30) ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~ +!!! error TS18033: Type 'Number' is not assignable to type 'number' as required for computed enum member values. +!!! error TS18033: 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. } enum E9 { @@ -165,18 +201,28 @@ enumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type // Enum with computed member intializer of other types enum E11 { A = true, + ~~~~ +!!! error TS18033: Type 'boolean' is not assignable to type 'number' as required for computed enum member values. B = new Date(), ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~ +!!! error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. C = window, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. D = {}, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. E = (() => 'foo')(), ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~ +!!! error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. } // Enum with string valued member and computed member initializers @@ -185,18 +231,26 @@ enumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type B = new Date(), ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~ +!!! error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. C = window, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. D = {}, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. E = 1 + 1, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. F = (() => 'foo')(), ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~ +!!! error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. } // Enum with incorrect syntax @@ -205,9 +259,29 @@ enumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type postValueComma = 1, postSemicolon; + ~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. postColonValueComma: 2, + ~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + ~ +!!! error TS2452: An enum member cannot have a numeric name. postColonValueSemicolon: 3; + ~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + ~ +!!! error TS2452: An enum member cannot have a numeric name. + ~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. }; enum E14 { a, b: any "hello" += 1, c, d} + ~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + ~~~~~~~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + ~~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + ~ +!!! error TS2452: An enum member cannot have a numeric name. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts index 6158426de52ce..ad1eaad0ba2da 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts @@ -33,28 +33,40 @@ declare enum E1 { /// [Errors] //// forwardRefInEnum.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. forwardRefInEnum.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(5,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. forwardRefInEnum.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(7,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. forwardRefInEnum.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(8,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -==== forwardRefInEnum.ts (4 errors) ==== +==== forwardRefInEnum.ts (8 errors) ==== enum E1 { // illegal case // forward reference to the element of the same enum X = Y, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. X1 = E1["Y"], ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. // forward reference to the element of the same enum Y = E1.Z, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. Y1 = E1["Z"] ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. } enum E1 { diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts index 9f55eab03facb..2e4e7435cfbbe 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts @@ -981,110 +981,357 @@ export declare namespace eaM { } /// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(273,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(276,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(278,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(280,12): error TS2300: Duplicate identifier 'pgF'. giant.ts(280,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(281,16): error TS2300: Duplicate identifier 'pgF'. giant.ts(281,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(281,20): error TS1005: '{' expected. +giant.ts(282,12): error TS2300: Duplicate identifier 'psF'. giant.ts(282,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(289,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(290,12): error TS2300: Duplicate identifier 'tsF'. giant.ts(290,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(293,16): error TS2300: Duplicate identifier 'tgF'. giant.ts(293,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(293,20): error TS1005: '{' expected. giant.ts(299,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(332,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(332,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(333,5): error TS2386: Overload signatures must all be optional or required. giant.ts(333,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(333,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(416,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(419,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(421,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(423,16): error TS2300: Duplicate identifier 'pgF'. giant.ts(423,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(424,20): error TS2300: Duplicate identifier 'pgF'. giant.ts(424,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(424,24): error TS1005: '{' expected. +giant.ts(425,16): error TS2300: Duplicate identifier 'psF'. giant.ts(425,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(432,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(433,16): error TS2300: Duplicate identifier 'tsF'. giant.ts(433,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(436,20): error TS2300: Duplicate identifier 'tgF'. giant.ts(436,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(436,24): error TS1005: '{' expected. giant.ts(442,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(475,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(475,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(476,9): error TS2386: Overload signatures must all be optional or required. giant.ts(476,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(476,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(484,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(485,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(489,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(490,33): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(490,39): error TS1183: An implementation cannot be declared in ambient contexts. giant.ts(494,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(495,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(500,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(504,16): error TS2300: Duplicate identifier 'psF'. giant.ts(504,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(511,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(518,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(519,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(524,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(524,30): error TS1183: An implementation cannot be declared in ambient contexts. giant.ts(530,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(531,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(536,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(540,12): error TS2300: Duplicate identifier 'psF'. giant.ts(540,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(547,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(554,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(555,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(560,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(560,21): error TS1183: An implementation cannot be declared in ambient contexts. giant.ts(561,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(562,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(600,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(600,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(601,9): error TS2386: Overload signatures must all be optional or required. giant.ts(601,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(601,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(604,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(605,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(610,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(615,16): error TS1038: A 'declare' modifier cannot be used in an already ambient context. giant.ts(615,33): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(620,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(625,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(625,21): error TS1183: An implementation cannot be declared in ambient contexts. giant.ts(626,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(627,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(627,21): error TS1183: An implementation cannot be declared in ambient contexts. giant.ts(633,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(666,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(666,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(667,9): error TS2386: Overload signatures must all be optional or required. giant.ts(667,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(667,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(670,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(671,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. giant.ts(675,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient contexts. -==== giant.ts (101 errors) ==== +==== giant.ts (348 errors) ==== /* Prefixes p -> public @@ -1107,19 +1354,55 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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 @@ -1145,8 +1428,16 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res //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; @@ -1160,6 +1451,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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; @@ -1171,19 +1464,55 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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 @@ -1209,8 +1538,16 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res //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; @@ -1224,6 +1561,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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; @@ -1238,6 +1577,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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 { }; } @@ -1250,19 +1591,55 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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 @@ -1288,8 +1665,16 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res //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; @@ -1303,6 +1688,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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; @@ -1317,40 +1704,94 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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 { } @@ -1374,18 +1815,42 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res private rF() { } public pgF() { } ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. public get pgF() ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: '{' expected. public psF(param:any) { } ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -1394,14 +1859,26 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static tsF(param:any) { } ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. static tgF() { } ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static get tgF() ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: '{' expected. } export interface eI { //Call Signature @@ -1429,8 +1906,16 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res //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; @@ -1450,6 +1935,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~ @@ -1465,19 +1952,55 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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 @@ -1503,8 +2026,16 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res //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; @@ -1518,6 +2049,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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; @@ -1532,6 +2065,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res 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 { }; } @@ -1553,18 +2088,42 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res private rF() { } public pgF() { } ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. public get pgF() ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: '{' expected. public psF(param:any) { } ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -1573,14 +2132,26 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static tsF(param:any) { } ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static set tsF(param:any) + ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~ +!!! error TS1005: '{' expected. static tgF() { } ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static get tgF() ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: '{' expected. } export interface eI { //Call Signature @@ -1608,8 +2179,16 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res //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; @@ -1629,6 +2208,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~ @@ -1655,6 +2236,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res export declare function eaF() { }; ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. export declare class eaC { }; export declare module eaM { }; } @@ -1664,8 +2247,12 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res export declare function eaF() { }; ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -1673,36 +2260,78 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res public pF() { } ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. public get pgF() ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. public psF(param:any) { } ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static tF() { } ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. static tsF(param:any) { } ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. static get tgF() ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } export declare module eaM { @@ -1712,6 +2341,10 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res function F() { }; ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 { } @@ -1721,6 +2354,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res export function eF() { }; ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. export class eC { } export interface eI { } export module eM { } @@ -1732,8 +2367,12 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res export declare function eaF() { }; ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -1741,36 +2380,78 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res public pF() { } ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. public get pgF() ~~~ +!!! error TS2300: Duplicate identifier 'pgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. public psF(param:any) { } ~~~ +!!! error TS2300: Duplicate identifier 'psF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static tF() { } ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. static tsF(param:any) { } ~~~ +!!! error TS2300: Duplicate identifier 'tsF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. static get tgF() ~~~ +!!! error TS2300: Duplicate identifier 'tgF'. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } export declare module eaM { @@ -1780,8 +2461,14 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res function F() { }; ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -1789,12 +2476,16 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res public pF() { } ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. static tV; ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static tF() { } ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. } interface I { //Call Signature @@ -1819,8 +2510,16 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res //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; @@ -1840,6 +2539,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~ @@ -1852,6 +2553,10 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res function F() { }; ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 { } @@ -1861,17 +2566,29 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res export function eF() { }; ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. export declare function eaF() { }; + ~~~~~~~ +!!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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; ~~ @@ -1879,8 +2596,12 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res export function eF() { }; ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -1888,12 +2609,16 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res public pF() { } ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. static tV ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static tF() { } ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. } export interface eI { //Call Signature @@ -1921,8 +2646,16 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res //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; @@ -1942,6 +2675,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~ @@ -1954,6 +2689,10 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res function F() { }; ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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; @@ -1962,6 +2701,8 @@ giant.ts(675,25): error TS9007: Declaration emit for this file requires type res export function eF() { }; ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. export class eC { } export interface eI { } export module eM { } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts index ebc9f816cad01..5afa3be184af0 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts @@ -33,24 +33,45 @@ declare class C2 { } /// [Errors] //// +indexSignatureMustHaveTypeAnnotation.ts(3,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. +indexSignatureMustHaveTypeAnnotation.ts(3,6): error TS2304: Cannot find name 'x'. +indexSignatureMustHaveTypeAnnotation.ts(4,5): error TS1021: An index signature must have a type annotation. +indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS2304: Cannot find name 'x'. +indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS4031: Public property '[x]' of exported class has or is using private name 'x'. +indexSignatureMustHaveTypeAnnotation.ts(14,5): error TS1021: An index signature must have a type annotation. -==== indexSignatureMustHaveTypeAnnotation.ts (1 errors) ==== +==== indexSignatureMustHaveTypeAnnotation.ts (8 errors) ==== interface I { // Used to be indexer, now it is a computed property [x]: string; + ~~~ +!!! 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 'x'. [x: string]; + ~~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. } class C { // Used to be indexer, now it is a computed property [x]: string ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'x'. + ~ +!!! error TS4031: Public property '[x]' of exported class has or is using private name 'x'. } class C2 { [x: string] + ~~~~~~~~~~~ +!!! error TS1021: An index signature must have a type annotation. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts index f30e49159901f..b3c81481dc5df 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts @@ -373,16 +373,112 @@ intTypeCheck.ts(9,8): error TS9007: Declaration emit for this file requires type intTypeCheck.ts(10,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. intTypeCheck.ts(10,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. intTypeCheck.ts(16,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(35,6): error TS2304: Cannot find name 'p'. intTypeCheck.ts(46,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. intTypeCheck.ts(52,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(71,6): error TS2304: Cannot find name 'p'. intTypeCheck.ts(83,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. intTypeCheck.ts(84,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. intTypeCheck.ts(84,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(85,5): error TS2386: Overload signatures must all be optional or required. intTypeCheck.ts(85,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. intTypeCheck.ts(85,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(99,5): error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? + Type 'Object' is missing the following properties from type 'i1': p, p3, p6 +intTypeCheck.ts(100,20): error TS2351: This expression is not constructable. + Type 'i1' has no construct signatures. +intTypeCheck.ts(101,5): error TS2739: Type 'Base' is missing the following properties from type 'i1': p, p3, p6 +intTypeCheck.ts(103,5): error TS2322: Type '() => void' is not assignable to type 'i1'. +intTypeCheck.ts(106,5): error TS2322: Type 'boolean' is not assignable to type 'i1'. +intTypeCheck.ts(106,20): error TS1109: Expression expected. +intTypeCheck.ts(106,21): error TS2693: 'i1' only refers to a type, but is being used as a value here. +intTypeCheck.ts(107,21): error TS2351: This expression is not constructable. + Type '{}' has no construct signatures. +intTypeCheck.ts(112,5): error TS2322: Type '{}' is not assignable to type 'i2'. + Type '{}' provides no match for the signature '(): any'. +intTypeCheck.ts(113,5): error TS2322: Type 'Object' is not assignable to type 'i2'. + The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? + Type 'Object' provides no match for the signature '(): any'. +intTypeCheck.ts(114,17): error TS2350: Only a void function can be called with the 'new' keyword. +intTypeCheck.ts(115,5): error TS2322: Type 'Base' is not assignable to type 'i2'. + Type 'Base' provides no match for the signature '(): any'. +intTypeCheck.ts(120,5): error TS2322: Type 'boolean' is not assignable to type 'i2'. +intTypeCheck.ts(120,21): error TS1109: Expression expected. +intTypeCheck.ts(120,22): error TS2693: 'i2' only refers to a type, but is being used as a value here. +intTypeCheck.ts(121,21): error TS2351: This expression is not constructable. + Type '{}' has no construct signatures. +intTypeCheck.ts(126,5): error TS2322: Type '{}' is not assignable to type 'i3'. + Type '{}' provides no match for the signature 'new (): any'. +intTypeCheck.ts(127,5): error TS2322: Type 'Object' is not assignable to type 'i3'. + The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? + Type 'Object' provides no match for the signature 'new (): any'. +intTypeCheck.ts(129,5): error TS2322: Type 'Base' is not assignable to type 'i3'. + Type 'Base' provides no match for the signature 'new (): any'. +intTypeCheck.ts(131,5): error TS2322: Type '() => void' is not assignable to type 'i3'. + Type '() => void' provides no match for the signature 'new (): any'. +intTypeCheck.ts(134,5): error TS2322: Type 'boolean' is not assignable to type 'i3'. +intTypeCheck.ts(134,21): error TS1109: Expression expected. +intTypeCheck.ts(134,22): error TS2693: 'i3' only refers to a type, but is being used as a value here. +intTypeCheck.ts(135,21): error TS2351: This expression is not constructable. + Type '{}' has no construct signatures. +intTypeCheck.ts(142,21): error TS2351: This expression is not constructable. + Type 'i4' has no construct signatures. +intTypeCheck.ts(148,5): error TS2322: Type 'boolean' is not assignable to type 'i4'. +intTypeCheck.ts(148,21): error TS1109: Expression expected. +intTypeCheck.ts(148,22): error TS2693: 'i4' only refers to a type, but is being used as a value here. +intTypeCheck.ts(149,21): error TS2351: This expression is not constructable. + Type '{}' has no construct signatures. +intTypeCheck.ts(154,5): error TS2739: Type '{}' is missing the following properties from type 'i5': p, p3, p6 +intTypeCheck.ts(155,5): error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? + Type 'Object' is missing the following properties from type 'i5': p, p3, p6 +intTypeCheck.ts(156,21): error TS2351: This expression is not constructable. + Type 'i5' has no construct signatures. +intTypeCheck.ts(157,5): error TS2739: Type 'Base' is missing the following properties from type 'i5': p, p3, p6 +intTypeCheck.ts(159,5): error TS2322: Type '() => void' is not assignable to type 'i5'. +intTypeCheck.ts(162,5): error TS2322: Type 'boolean' is not assignable to type 'i5'. +intTypeCheck.ts(162,21): error TS1109: Expression expected. +intTypeCheck.ts(162,22): error TS2693: 'i5' only refers to a type, but is being used as a value here. +intTypeCheck.ts(163,21): error TS2351: This expression is not constructable. + Type '{}' has no construct signatures. +intTypeCheck.ts(168,5): error TS2322: Type '{}' is not assignable to type 'i6'. + Type '{}' provides no match for the signature '(): any'. +intTypeCheck.ts(169,5): error TS2322: Type 'Object' is not assignable to type 'i6'. + The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? + Type 'Object' provides no match for the signature '(): any'. +intTypeCheck.ts(170,17): error TS2350: Only a void function can be called with the 'new' keyword. +intTypeCheck.ts(171,5): error TS2322: Type 'Base' is not assignable to type 'i6'. + Type 'Base' provides no match for the signature '(): any'. +intTypeCheck.ts(173,5): error TS2322: Type '() => void' is not assignable to type 'i6'. + Type 'void' is not assignable to type 'number'. +intTypeCheck.ts(176,5): error TS2322: Type 'boolean' is not assignable to type 'i6'. +intTypeCheck.ts(176,21): error TS1109: Expression expected. +intTypeCheck.ts(176,22): error TS2693: 'i6' only refers to a type, but is being used as a value here. +intTypeCheck.ts(177,21): error TS2351: This expression is not constructable. + Type '{}' has no construct signatures. +intTypeCheck.ts(182,5): error TS2322: Type '{}' is not assignable to type 'i7'. + Type '{}' provides no match for the signature 'new (): any'. +intTypeCheck.ts(183,5): error TS2322: Type 'Object' is not assignable to type 'i7'. + The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? + Type 'Object' provides no match for the signature 'new (): any'. +intTypeCheck.ts(185,17): error TS2352: Conversion of type 'Base' to type 'i7' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. + Type 'Base' provides no match for the signature 'new (): any'. +intTypeCheck.ts(187,5): error TS2322: Type '() => void' is not assignable to type 'i7'. + Type '() => void' provides no match for the signature 'new (): any'. +intTypeCheck.ts(190,5): error TS2322: Type 'boolean' is not assignable to type 'i7'. +intTypeCheck.ts(190,21): error TS1109: Expression expected. +intTypeCheck.ts(190,22): error TS2693: 'i7' only refers to a type, but is being used as a value here. +intTypeCheck.ts(191,21): error TS2351: This expression is not constructable. + Type '{}' has no construct signatures. +intTypeCheck.ts(198,21): error TS2351: This expression is not constructable. + Type 'i8' has no construct signatures. +intTypeCheck.ts(204,5): error TS2322: Type 'boolean' is not assignable to type 'i8'. +intTypeCheck.ts(204,21): error TS1109: Expression expected. +intTypeCheck.ts(204,22): error TS2693: 'i8' only refers to a type, but is being used as a value here. +intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. + Type '{}' has no construct signatures. -==== intTypeCheck.ts (11 errors) ==== +==== intTypeCheck.ts (74 errors) ==== interface i1 { //Property Signatures p; @@ -426,6 +522,8 @@ intTypeCheck.ts(85,15): error TS9007: Declaration emit for this file requires ty interface i4 { // Used to be indexer, now it is a computed property [p]; + ~ +!!! error TS2304: Cannot find name 'p'. //Index Signatures [p1: string]; [p2: string, p3: number]; @@ -466,6 +564,8 @@ intTypeCheck.ts(85,15): error TS9007: Declaration emit for this file requires ty // Used to be indexer, now it is a computed property [p]; + ~ +!!! error TS2304: Cannot find name 'p'. //Index Signatures [p1: string]; [p2: string, p3: number]; @@ -486,6 +586,8 @@ intTypeCheck.ts(85,15): error TS9007: Declaration emit for this file requires ty ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. p7? (pa1, pa2): void; + ~~ +!!! error TS2386: Overload signatures must all be optional or required. ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~ @@ -504,42 +606,104 @@ intTypeCheck.ts(85,15): error TS9007: Declaration emit for this file requires ty p7: function (pa1, pa2):any { return 0; } }; var obj2: i1 = new Object(); + ~~~~ +!!! error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? +!!! error TS2696: Type 'Object' is missing the following properties from type 'i1': p, p3, p6 var obj3: i1 = new obj0; + ~~~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type 'i1' has no construct signatures. var obj4: i1 = new Base; + ~~~~ +!!! error TS2739: Type 'Base' is missing the following properties from type 'i1': p, p3, p6 var obj5: i1 = null; var obj6: i1 = function () { }; + ~~~~ +!!! error TS2322: Type '() => void' is not assignable to type 'i1'. //var obj7: i1 = function foo() { }; var obj8: i1 = anyVar; var obj9: i1 = new anyVar; + ~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'i1'. + ~ +!!! error TS1109: Expression expected. + ~~ +!!! error TS2693: 'i1' only refers to a type, but is being used as a value here. var obj10: i1 = new {}; + ~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type '{}' has no construct signatures. // // Call signatures // var obj11: i2; var obj12: i2 = {}; + ~~~~~ +!!! error TS2322: Type '{}' is not assignable to type 'i2'. +!!! error TS2322: Type '{}' provides no match for the signature '(): any'. var obj13: i2 = new Object(); + ~~~~~ +!!! error TS2322: Type 'Object' is not assignable to type 'i2'. +!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? +!!! error TS2322: Type 'Object' provides no match for the signature '(): any'. var obj14: i2 = new obj11; + ~~~~~~~~~ +!!! error TS2350: Only a void function can be called with the 'new' keyword. var obj15: i2 = new Base; + ~~~~~ +!!! error TS2322: Type 'Base' is not assignable to type 'i2'. +!!! error TS2322: Type 'Base' provides no match for the signature '(): any'. var obj16: i2 = null; var obj17: i2 = function ():any { return 0; }; //var obj18: i2 = function foo() { }; var obj19: i2 = anyVar; var obj20: i2 = new anyVar; + ~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'i2'. + ~ +!!! error TS1109: Expression expected. + ~~ +!!! error TS2693: 'i2' only refers to a type, but is being used as a value here. var obj21: i2 = new {}; + ~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type '{}' has no construct signatures. // // Construct Signatures // var obj22: i3; var obj23: i3 = {}; + ~~~~~ +!!! error TS2322: Type '{}' is not assignable to type 'i3'. +!!! error TS2322: Type '{}' provides no match for the signature 'new (): any'. var obj24: i3 = new Object(); + ~~~~~ +!!! error TS2322: Type 'Object' is not assignable to type 'i3'. +!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? +!!! error TS2322: Type 'Object' provides no match for the signature 'new (): any'. var obj25: i3 = new obj22; var obj26: i3 = new Base; + ~~~~~ +!!! error TS2322: Type 'Base' is not assignable to type 'i3'. +!!! error TS2322: Type 'Base' provides no match for the signature 'new (): any'. var obj27: i3 = null; var obj28: i3 = function () { }; + ~~~~~ +!!! error TS2322: Type '() => void' is not assignable to type 'i3'. +!!! error TS2322: Type '() => void' provides no match for the signature 'new (): any'. //var obj29: i3 = function foo() { }; var obj30: i3 = anyVar; var obj31: i3 = new anyVar; + ~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'i3'. + ~ +!!! error TS1109: Expression expected. + ~~ +!!! error TS2693: 'i3' only refers to a type, but is being used as a value here. var obj32: i3 = new {}; + ~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type '{}' has no construct signatures. // // Index Signatures // @@ -547,55 +711,134 @@ intTypeCheck.ts(85,15): error TS9007: Declaration emit for this file requires ty var obj34: i4 = {}; var obj35: i4 = new Object(); var obj36: i4 = new obj33; + ~~~~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type 'i4' has no construct signatures. var obj37: i4 = new Base; var obj38: i4 = null; var obj39: i4 = function () { }; //var obj40: i4 = function foo() { }; var obj41: i4 = anyVar; var obj42: i4 = new anyVar; + ~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'i4'. + ~ +!!! error TS1109: Expression expected. + ~~ +!!! error TS2693: 'i4' only refers to a type, but is being used as a value here. var obj43: i4 = new {}; + ~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type '{}' has no construct signatures. // // Interface Derived I1 // var obj44: i5; var obj45: i5 = {}; + ~~~~~ +!!! error TS2739: Type '{}' is missing the following properties from type 'i5': p, p3, p6 var obj46: i5 = new Object(); + ~~~~~ +!!! error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? +!!! error TS2696: Type 'Object' is missing the following properties from type 'i5': p, p3, p6 var obj47: i5 = new obj44; + ~~~~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type 'i5' has no construct signatures. var obj48: i5 = new Base; + ~~~~~ +!!! error TS2739: Type 'Base' is missing the following properties from type 'i5': p, p3, p6 var obj49: i5 = null; var obj50: i5 = function () { }; + ~~~~~ +!!! error TS2322: Type '() => void' is not assignable to type 'i5'. //var obj51: i5 = function foo() { }; var obj52: i5 = anyVar; var obj53: i5 = new anyVar; + ~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'i5'. + ~ +!!! error TS1109: Expression expected. + ~~ +!!! error TS2693: 'i5' only refers to a type, but is being used as a value here. var obj54: i5 = new {}; + ~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type '{}' has no construct signatures. // // Interface Derived I2 // var obj55: i6; var obj56: i6 = {}; + ~~~~~ +!!! error TS2322: Type '{}' is not assignable to type 'i6'. +!!! error TS2322: Type '{}' provides no match for the signature '(): any'. var obj57: i6 = new Object(); + ~~~~~ +!!! error TS2322: Type 'Object' is not assignable to type 'i6'. +!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? +!!! error TS2322: Type 'Object' provides no match for the signature '(): any'. var obj58: i6 = new obj55; + ~~~~~~~~~ +!!! error TS2350: Only a void function can be called with the 'new' keyword. var obj59: i6 = new Base; + ~~~~~ +!!! error TS2322: Type 'Base' is not assignable to type 'i6'. +!!! error TS2322: Type 'Base' provides no match for the signature '(): any'. var obj60: i6 = null; var obj61: i6 = function () { }; + ~~~~~ +!!! error TS2322: Type '() => void' is not assignable to type 'i6'. +!!! error TS2322: Type 'void' is not assignable to type 'number'. //var obj62: i6 = function foo() { }; var obj63: i6 = anyVar; var obj64: i6 = new anyVar; + ~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'i6'. + ~ +!!! error TS1109: Expression expected. + ~~ +!!! error TS2693: 'i6' only refers to a type, but is being used as a value here. var obj65: i6 = new {}; + ~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type '{}' has no construct signatures. // // Interface Derived I3 // var obj66: i7; var obj67: i7 = {}; + ~~~~~ +!!! error TS2322: Type '{}' is not assignable to type 'i7'. +!!! error TS2322: Type '{}' provides no match for the signature 'new (): any'. var obj68: i7 = new Object(); + ~~~~~ +!!! error TS2322: Type 'Object' is not assignable to type 'i7'. +!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? +!!! error TS2322: Type 'Object' provides no match for the signature 'new (): any'. var obj69: i7 = new obj66; var obj70: i7 = new Base; + ~~~~~~~~~~~~ +!!! error TS2352: Conversion of type 'Base' to type 'i7' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Type 'Base' provides no match for the signature 'new (): any'. var obj71: i7 = null; var obj72: i7 = function () { }; + ~~~~~ +!!! error TS2322: Type '() => void' is not assignable to type 'i7'. +!!! error TS2322: Type '() => void' provides no match for the signature 'new (): any'. //var obj73: i7 = function foo() { }; var obj74: i7 = anyVar; var obj75: i7 = new anyVar; + ~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'i7'. + ~ +!!! error TS1109: Expression expected. + ~~ +!!! error TS2693: 'i7' only refers to a type, but is being used as a value here. var obj76: i7 = new {}; + ~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type '{}' has no construct signatures. // // Interface Derived I4 // @@ -603,10 +846,22 @@ intTypeCheck.ts(85,15): error TS9007: Declaration emit for this file requires ty var obj78: i8 = {}; var obj79: i8 = new Object(); var obj80: i8 = new obj77; + ~~~~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type 'i8' has no construct signatures. var obj81: i8 = new Base; var obj82: i8 = null; var obj83: i8 = function () { }; //var obj84: i8 = function foo() { }; var obj85: i8 = anyVar; var obj86: i8 = new anyVar; - var obj87: i8 = new {}; \ No newline at end of file + ~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'i8'. + ~ +!!! error TS1109: Expression expected. + ~~ +!!! error TS2693: 'i8' only refers to a type, but is being used as a value here. + var obj87: i8 = new {}; + ~~ +!!! error TS2351: This expression is not constructable. +!!! error TS2351: Type '{}' has no construct signatures. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts index 0cc07940c1adc..b07709498fc5e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts @@ -57,6 +57,9 @@ declare const a14: invalid; invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(7,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(8,15): error TS1125: Hexadecimal digit expected. +invalidTaggedTemplateEscapeSequences.ts(8,33): error TS1125: Hexadecimal digit expected. +invalidTaggedTemplateEscapeSequences.ts(8,75): error TS1125: Hexadecimal digit expected. invalidTaggedTemplateEscapeSequences.ts(9,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(11,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -74,7 +77,7 @@ invalidTaggedTemplateEscapeSequences.ts(23,13): error TS9007: Declaration emit f invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== invalidTaggedTemplateEscapeSequences.ts (18 errors) ==== +==== invalidTaggedTemplateEscapeSequences.ts (21 errors) ==== function tag (str: any, ...args: any[]): any { return str } @@ -89,6 +92,12 @@ invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es5).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es5).d.ts index 0cc07940c1adc..b07709498fc5e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es5).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es5).d.ts @@ -57,6 +57,9 @@ declare const a14: invalid; invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(7,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(8,15): error TS1125: Hexadecimal digit expected. +invalidTaggedTemplateEscapeSequences.ts(8,33): error TS1125: Hexadecimal digit expected. +invalidTaggedTemplateEscapeSequences.ts(8,75): error TS1125: Hexadecimal digit expected. invalidTaggedTemplateEscapeSequences.ts(9,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(11,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -74,7 +77,7 @@ invalidTaggedTemplateEscapeSequences.ts(23,13): error TS9007: Declaration emit f invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== invalidTaggedTemplateEscapeSequences.ts (18 errors) ==== +==== invalidTaggedTemplateEscapeSequences.ts (21 errors) ==== function tag (str: any, ...args: any[]): any { return str } @@ -89,6 +92,12 @@ invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts index 0cc07940c1adc..b07709498fc5e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts @@ -57,6 +57,9 @@ declare const a14: invalid; invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(7,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +invalidTaggedTemplateEscapeSequences.ts(8,15): error TS1125: Hexadecimal digit expected. +invalidTaggedTemplateEscapeSequences.ts(8,33): error TS1125: Hexadecimal digit expected. +invalidTaggedTemplateEscapeSequences.ts(8,75): error TS1125: Hexadecimal digit expected. invalidTaggedTemplateEscapeSequences.ts(9,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(11,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. invalidTaggedTemplateEscapeSequences.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -74,7 +77,7 @@ invalidTaggedTemplateEscapeSequences.ts(23,13): error TS9007: Declaration emit f invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== invalidTaggedTemplateEscapeSequences.ts (18 errors) ==== +==== invalidTaggedTemplateEscapeSequences.ts (21 errors) ==== function tag (str: any, ...args: any[]): any { return str } @@ -89,6 +92,12 @@ invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. + +!!! error TS1125: Hexadecimal digit expected. const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts index 20168e8bbe31d..acd906cf5ea1b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts @@ -78,13 +78,18 @@ declare namespace Ambient { enum2.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enum2.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enum2.ts(3,9): error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. enum2.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enum2.ts(4,9): error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. enum2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enum2.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +script-namespaces.ts(1,11): error TS1280: Namespaces are not allowed in global script files when 'isolatedModules' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement. -==== script-namespaces.ts (0 errors) ==== +==== script-namespaces.ts (1 errors) ==== namespace Instantiated { + ~~~~~~~~~~~~ +!!! error TS1280: Namespaces are not allowed in global script files when 'isolatedModules' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement. export const x = 1; } namespace Uninstantiated { @@ -104,7 +109,7 @@ enum2.ts(9,5): error TS9007: Declaration emit for this file requires type resolu declare enum Enum { X = 1_000_000 } const d = 'd'; -==== enum2.ts (5 errors) ==== +==== enum2.ts (7 errors) ==== enum Enum { D = d, ~ @@ -112,9 +117,13 @@ enum2.ts(9,5): error TS9007: Declaration emit for this file requires type resolu E = A, // error ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. Y = X, // error ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. Z = Enum.A ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/mergedDeclarations2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/mergedDeclarations2.d.ts index 9e1c87ce0126b..65abc5d2c5e50 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/mergedDeclarations2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/mergedDeclarations2.d.ts @@ -29,10 +29,11 @@ declare namespace Foo { /// [Errors] //// mergedDeclarations2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +mergedDeclarations2.ts(9,20): error TS2304: Cannot find name 'b'. mergedDeclarations2.ts(9,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== mergedDeclarations2.ts (2 errors) ==== +==== mergedDeclarations2.ts (3 errors) ==== enum Foo { b } @@ -45,5 +46,7 @@ mergedDeclarations2.ts(9,20): error TS9007: Declaration emit for this file requi module Foo { export var x = b ~ +!!! error TS2304: Cannot find name 'b'. + ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts index d1126b4c81ad9..92bbde6b610c1 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts @@ -110,19 +110,30 @@ interface I3 { } /// [Errors] //// +overloadsWithComputedNames.ts(4,5): error TS2389: Function implementation name must be '["B"]'. overloadsWithComputedNames.ts(8,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +overloadsWithComputedNames.ts(14,5): error TS2391: Function implementation is missing or not immediately following the declaration. +overloadsWithComputedNames.ts(16,5): error TS2389: Function implementation name must be '["bar"]'. +overloadsWithComputedNames.ts(28,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. overloadsWithComputedNames.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +overloadsWithComputedNames.ts(29,5): error TS2391: Function implementation is missing or not immediately following the declaration. +overloadsWithComputedNames.ts(35,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. +overloadsWithComputedNames.ts(42,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. overloadsWithComputedNames.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. overloadsWithComputedNames.ts(43,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +overloadsWithComputedNames.ts(47,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. overloadsWithComputedNames.ts(47,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. overloadsWithComputedNames.ts(48,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is missing or not immediately following the declaration. -==== overloadsWithComputedNames.ts (6 errors) ==== +==== overloadsWithComputedNames.ts (15 errors) ==== // https://github.com/microsoft/TypeScript/issues/52329 class Person { ["B"](a: number): string; ["A"](a: string|number): number | string { + ~~~~~ +!!! error TS2389: Function implementation name must be '["B"]'. return 0; } } @@ -135,8 +146,12 @@ overloadsWithComputedNames.ts(48,5): error TS9007: Declaration emit for this fil // https://github.com/microsoft/TypeScript/issues/17345 class C { ["foo"](): void + ~~~~~~~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. ["bar"](): void; ["foo"]() { + ~~~~~~~ +!!! error TS2389: Function implementation name must be '["bar"]'. return 0; } } @@ -150,14 +165,20 @@ overloadsWithComputedNames.ts(48,5): error TS9007: Declaration emit for this fil class C1 { [sym](): void; // should error ~~~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. [uniqueSym2](): void; // should error + ~~~~~~~~~~~~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. [uniqueSym](): void; [uniqueSym]() { } } interface I1 { [sym](): void; // should error + ~~~~~ +!!! 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. [uniqueSym2](): void; [uniqueSym](): void; [uniqueSym](): void; @@ -166,6 +187,8 @@ overloadsWithComputedNames.ts(48,5): error TS9007: Declaration emit for this fil class C2 { [strUnion](): void; // should error ~~~~~~~~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. [strUnion]() { } ~~~~~~~~~~ @@ -175,6 +198,8 @@ overloadsWithComputedNames.ts(48,5): error TS9007: Declaration emit for this fil class I2 { [strUnion](): void; // should error ~~~~~~~~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. [strUnion]() { } ~~~~~~~~~~ @@ -183,6 +208,8 @@ overloadsWithComputedNames.ts(48,5): error TS9007: Declaration emit for this fil class C3 { [1](): void; // should error + ~~~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. [2](): void; [2]() { } } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parseBigInt.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseBigInt.d.ts index 57e7c803bae83..38fb67429f08d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parseBigInt.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parseBigInt.d.ts @@ -123,10 +123,28 @@ declare const doubleSeparator = 123456789n; declare const oneTwoOrThree: (x: 1n | 2n | 3n) => bigint; /// [Errors] //// +parseBigInt.ts(51,20): error TS2736: Operator '+' cannot be applied to type 'bigint'. +parseBigInt.ts(52,23): error TS2736: Operator '+' cannot be applied to type 'bigint'. +parseBigInt.ts(56,21): error TS1121: Octal literals are not allowed. Use the syntax '0o123'. +parseBigInt.ts(56,25): error TS1005: ',' expected. +parseBigInt.ts(57,22): error TS1352: A bigint literal cannot use exponential notation. +parseBigInt.ts(58,19): error TS1353: A bigint literal must be an integer. +parseBigInt.ts(59,26): error TS1353: A bigint literal must be an integer. +parseBigInt.ts(60,23): error TS1177: Binary digit expected. +parseBigInt.ts(61,20): error TS1178: Octal digit expected. +parseBigInt.ts(62,20): error TS1125: Hexadecimal digit expected. +parseBigInt.ts(63,26): error TS2304: Cannot find name '_123n'. parseBigInt.ts(63,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseBigInt.ts(64,30): error TS6188: Numeric separators are not allowed here. +parseBigInt.ts(65,33): error TS6189: Multiple consecutive numeric separators are not permitted. +parseBigInt.ts(69,15): error TS2345: Argument of type '0n' is not assignable to parameter of type '1n | 3n | 2n'. +parseBigInt.ts(70,15): error TS2345: Argument of type '0' is not assignable to parameter of type '1n | 3n | 2n'. +parseBigInt.ts(70,34): error TS2345: Argument of type '1' is not assignable to parameter of type '1n | 3n | 2n'. +parseBigInt.ts(70,53): error TS2345: Argument of type '2' is not assignable to parameter of type '1n | 3n | 2n'. +parseBigInt.ts(70,72): error TS2345: Argument of type '3' is not assignable to parameter of type '1n | 3n | 2n'. -==== parseBigInt.ts (1 errors) ==== +==== parseBigInt.ts (19 errors) ==== // All bases should allow "n" suffix const bin = 0b101, binBig = 0b101n; // 5, 5n const oct = 0o567, octBig = 0o567n; // 375, 375n @@ -178,24 +196,60 @@ parseBigInt.ts(63,26): error TS9007: Declaration emit for this file requires typ // Plus not allowed on literals const unaryPlus = +123n; + ~~~~ +!!! error TS2736: Operator '+' cannot be applied to type 'bigint'. const unaryPlusHex = +0x123n; + ~~~~~~ +!!! error TS2736: Operator '+' cannot be applied to type 'bigint'. // Parsing errors // In separate blocks because they each declare an "n" variable { const legacyOct = 0123n; } + ~~~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o123'. + ~ +!!! error TS1005: ',' expected. { const scientific = 1e2n; } + ~~~~ +!!! error TS1352: A bigint literal cannot use exponential notation. { const decimal = 4.1n; } + ~~~~ +!!! error TS1353: A bigint literal must be an integer. { const leadingDecimal = .1n; } + ~~~ +!!! error TS1353: A bigint literal must be an integer. const emptyBinary = 0bn; // should error but infer 0n + +!!! error TS1177: Binary digit expected. const emptyOct = 0on; // should error but infer 0n + +!!! error TS1178: Octal digit expected. const emptyHex = 0xn; // should error but infer 0n + +!!! error TS1125: Hexadecimal digit expected. const leadingSeparator = _123n; ~~~~~ +!!! error TS2304: Cannot find name '_123n'. + ~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. const trailingSeparator = 123_n; + ~ +!!! error TS6188: Numeric separators are not allowed here. const doubleSeparator = 123_456__789n; + ~ +!!! error TS6189: Multiple consecutive numeric separators are not permitted. // Using literals as types const oneTwoOrThree = (x: 1n | 2n | 3n): bigint => x ** 2n; oneTwoOrThree(0n); oneTwoOrThree(1n); oneTwoOrThree(2n); oneTwoOrThree(3n); - oneTwoOrThree(0); oneTwoOrThree(1); oneTwoOrThree(2); oneTwoOrThree(3); \ No newline at end of file + ~~ +!!! error TS2345: Argument of type '0n' is not assignable to parameter of type '1n | 3n | 2n'. + oneTwoOrThree(0); oneTwoOrThree(1); oneTwoOrThree(2); oneTwoOrThree(3); + ~ +!!! error TS2345: Argument of type '0' is not assignable to parameter of type '1n | 3n | 2n'. + ~ +!!! error TS2345: Argument of type '1' is not assignable to parameter of type '1n | 3n | 2n'. + ~ +!!! error TS2345: Argument of type '2' is not assignable to parameter of type '1n | 3n | 2n'. + ~ +!!! error TS2345: Argument of type '3' is not assignable to parameter of type '1n | 3n | 2n'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName13.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName13.d.ts index 46cbd4a7e2428..e5d15e3fd10d5 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName13.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName13.d.ts @@ -9,3 +9,15 @@ var v: { [e]: number }; //// [/.src/parserComputedPropertyName13.d.ts] declare var v: {}; +/// [Errors] //// + +parserComputedPropertyName13.ts(1,10): 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. +parserComputedPropertyName13.ts(1,11): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName13.ts (2 errors) ==== + var v: { [e]: number }; + ~~~ +!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName14.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName14.d.ts index d3bea74cb77f7..1f117a7ab4151 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName14.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName14.d.ts @@ -9,3 +9,15 @@ var v: { [e](): number }; //// [/.src/parserComputedPropertyName14.d.ts] declare var v: {}; +/// [Errors] //// + +parserComputedPropertyName14.ts(1,10): 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. +parserComputedPropertyName14.ts(1,11): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName14.ts (2 errors) ==== + var v: { [e](): number }; + ~~~ +!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName15.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName15.d.ts index f7fbb4d4a28d2..ee29c0fee930e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName15.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName15.d.ts @@ -11,3 +11,15 @@ var v: { [e: number]: string; [e]: number }; declare var v: { [e: number]: string; }; +/// [Errors] //// + +parserComputedPropertyName15.ts(1,31): 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. +parserComputedPropertyName15.ts(1,32): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName15.ts (2 errors) ==== + var v: { [e: number]: string; [e]: number }; + ~~~ +!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName18.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName18.d.ts index c2ff0de6b974e..4fbf77d7da09a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName18.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName18.d.ts @@ -9,3 +9,15 @@ var v: { [e]?(): number }; //// [/.src/parserComputedPropertyName18.d.ts] declare var v: {}; +/// [Errors] //// + +parserComputedPropertyName18.ts(1,10): 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. +parserComputedPropertyName18.ts(1,11): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName18.ts (2 errors) ==== + var v: { [e]?(): number }; + ~~~ +!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName19.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName19.d.ts index 93fe310982f1f..e58feb817303e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName19.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName19.d.ts @@ -9,3 +9,15 @@ var v: { [e]? }; //// [/.src/parserComputedPropertyName19.d.ts] declare var v: {}; +/// [Errors] //// + +parserComputedPropertyName19.ts(1,10): 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. +parserComputedPropertyName19.ts(1,11): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName19.ts (2 errors) ==== + var v: { [e]? }; + ~~~ +!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts index c2cdb7a8504cb..51d1cac16faa0 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts @@ -12,9 +12,12 @@ declare var v: invalid; /// [Errors] //// parserComputedPropertyName2.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. -==== parserComputedPropertyName2.ts (1 errors) ==== +==== parserComputedPropertyName2.ts (2 errors) ==== var v = { [e]: 1 }; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName20.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName20.d.ts index 737bba90587b0..3d3c78e4067a3 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName20.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName20.d.ts @@ -12,3 +12,17 @@ interface I { //// [/.src/parserComputedPropertyName20.d.ts] interface I { } +/// [Errors] //// + +parserComputedPropertyName20.ts(2,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. +parserComputedPropertyName20.ts(2,6): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName20.ts (2 errors) ==== + interface I { + [e](): number + ~~~ +!!! 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 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName21.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName21.d.ts index 9474bab3ffdcb..7d121fddb1fc4 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName21.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName21.d.ts @@ -12,3 +12,17 @@ interface I { //// [/.src/parserComputedPropertyName21.d.ts] interface I { } +/// [Errors] //// + +parserComputedPropertyName21.ts(2,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. +parserComputedPropertyName21.ts(2,6): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName21.ts (2 errors) ==== + interface I { + [e]: number + ~~~ +!!! 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 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts index 5a39bc368ad82..a6b582a7c6928 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts @@ -14,11 +14,14 @@ declare var v: invalid; /// [Errors] //// parserComputedPropertyName37.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName37.ts(2,6): error TS2304: Cannot find name 'public'. -==== parserComputedPropertyName37.ts (1 errors) ==== +==== parserComputedPropertyName37.ts (2 errors) ==== var v = { [public]: 0 ~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS2304: Cannot find name 'public'. }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts index 1c53301119927..3d0153e5a9fdb 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts @@ -12,9 +12,12 @@ declare var v: invalid; /// [Errors] //// parserES5ComputedPropertyName2.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserES5ComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. -==== parserES5ComputedPropertyName2.ts (1 errors) ==== +==== parserES5ComputedPropertyName2.ts (2 errors) ==== var v = { [e]: 1 }; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName5.d.ts index 4d3422cafe828..025456a1a8da5 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName5.d.ts @@ -12,3 +12,17 @@ interface I { //// [/.src/parserES5ComputedPropertyName5.d.ts] interface I { } +/// [Errors] //// + +parserES5ComputedPropertyName5.ts(2,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. +parserES5ComputedPropertyName5.ts(2,6): error TS2304: Cannot find name 'e'. + + +==== parserES5ComputedPropertyName5.ts (2 errors) ==== + interface I { + [e]: number + ~~~ +!!! 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 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName8.d.ts index c72fd69d4fe9f..4e5d4129768a7 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName8.d.ts @@ -9,3 +9,15 @@ var v: { [e]: number }; //// [/.src/parserES5ComputedPropertyName8.d.ts] declare var v: {}; +/// [Errors] //// + +parserES5ComputedPropertyName8.ts(1,10): 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. +parserES5ComputedPropertyName8.ts(1,11): error TS2304: Cannot find name 'e'. + + +==== parserES5ComputedPropertyName8.ts (2 errors) ==== + var v: { [e]: number }; + ~~~ +!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty1.d.ts index 942380af088f6..42ecaacff1746 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty1.d.ts @@ -12,3 +12,17 @@ interface I { //// [/.src/parserES5SymbolProperty1.d.ts] interface I { } +/// [Errors] //// + +parserES5SymbolProperty1.ts(2,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. +parserES5SymbolProperty1.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + +==== parserES5SymbolProperty1.ts (2 errors) ==== + interface I { + [Symbol.iterator]: string; + ~~~~~~~~~~~~~~~~~ +!!! 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 TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty2.d.ts index 8cc1a9039bfb1..266fc31c6f441 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty2.d.ts @@ -12,3 +12,17 @@ interface I { //// [/.src/parserES5SymbolProperty2.d.ts] interface I { } +/// [Errors] //// + +parserES5SymbolProperty2.ts(2,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. +parserES5SymbolProperty2.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + +==== parserES5SymbolProperty2.ts (2 errors) ==== + interface I { + [Symbol.unscopables](): string; + ~~~~~~~~~~~~~~~~~~~~ +!!! 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 TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts index bce65a18fd716..6633242865ed5 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts @@ -11,3 +11,17 @@ var x: { //// [/.src/parserES5SymbolProperty8.d.ts] declare var x: {}; +/// [Errors] //// + +parserES5SymbolProperty8.ts(2,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. +parserES5SymbolProperty8.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + +==== parserES5SymbolProperty8.ts (2 errors) ==== + var x: { + [Symbol.toPrimitive](): 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 TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty9.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty9.d.ts index ad8d7357d22e6..defbff2c89491 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty9.d.ts @@ -11,3 +11,17 @@ var x: { //// [/.src/parserES5SymbolProperty9.d.ts] declare var x: {}; +/// [Errors] //// + +parserES5SymbolProperty9.ts(2,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. +parserES5SymbolProperty9.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + +==== parserES5SymbolProperty9.ts (2 errors) ==== + var x: { + [Symbol.toPrimitive]: 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 TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature11.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature11.d.ts index 300e1716170ec..a1ee1f9f64bbd 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature11.d.ts @@ -16,3 +16,25 @@ interface I { [p1: string]: any; [p2: string, p3: number]: any; } +/// [Errors] //// + +parserIndexSignature11.ts(2,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. +parserIndexSignature11.ts(2,10): error TS2304: Cannot find name 'p'. +parserIndexSignature11.ts(3,9): error TS1021: An index signature must have a type annotation. +parserIndexSignature11.ts(4,10): error TS1096: An index signature must have exactly one parameter. + + +==== parserIndexSignature11.ts (4 errors) ==== + interface I { + [p]; // Used to be indexer, now it is a computed property + ~~~ +!!! 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. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature5.d.ts index be1a2d6f46bcf..05c4b88e46d6c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature5.d.ts @@ -12,3 +12,17 @@ interface I { //// [/.src/parserIndexSignature5.d.ts] interface I { } +/// [Errors] //// + +parserIndexSignature5.ts(2,3): 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. +parserIndexSignature5.ts(2,4): error TS2304: Cannot find name 'a'. + + +==== parserIndexSignature5.ts (2 errors) ==== + interface I { + [a] // Used to be indexer, now it is a computed property + ~~~ +!!! 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 'a'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserStrictMode8.d.ts index 0cfecd667308d..0c243fd4851c5 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserStrictMode8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserStrictMode8.d.ts @@ -10,3 +10,14 @@ function eval() { //// [/.src/parserStrictMode8.d.ts] +/// [Errors] //// + +parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. + + +==== parserStrictMode8.ts (1 errors) ==== + "use strict"; + function eval() { + ~~~~ +!!! error TS1100: Invalid use of 'eval' in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/propertyAssignment.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/propertyAssignment.d.ts index f84ecc29dce75..979b5324d067b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/propertyAssignment.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/propertyAssignment.d.ts @@ -37,3 +37,38 @@ declare var foo3: { declare var bar3: { x: number; }; +/// [Errors] //// + +propertyAssignment.ts(4,13): 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. +propertyAssignment.ts(4,14): error TS2304: Cannot find name 'index'. +propertyAssignment.ts(12,1): error TS2322: Type '{ x: number; }' is not assignable to type 'new () => any'. + Type '{ x: number; }' provides no match for the signature 'new (): any'. +propertyAssignment.ts(14,1): error TS2322: Type '{ x: number; }' is not assignable to type '() => void'. + Type '{ x: number; }' provides no match for the signature '(): void'. + + +==== propertyAssignment.ts (4 errors) ==== + var foo1: { new ():any; } + var bar1: { x : number; } + + var foo2: { [index]; } // should be an error, used to be indexer, now it is a computed property + ~~~~~~~ +!!! 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 'index'. + var bar2: { x : number; } + + var foo3: { ():void; } + var bar3: { x : number; } + + + + foo1 = bar1; // should be an error + ~~~~ +!!! error TS2322: Type '{ x: number; }' is not assignable to type 'new () => any'. +!!! error TS2322: Type '{ x: number; }' provides no match for the signature 'new (): any'. + foo2 = bar2; + foo3 = bar3; // should be an error + ~~~~ +!!! error TS2322: Type '{ x: number; }' is not assignable to type '() => void'. +!!! error TS2322: Type '{ x: number; }' provides no match for the signature '(): void'. \ 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 index eea393b64dae2..e49a746b5d16c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolDeclarationEmit12.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolDeclarationEmit12.d.ts @@ -32,10 +32,12 @@ declare namespace M { } /// [Errors] //// +symbolDeclarationEmit12.ts(9,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. symbolDeclarationEmit12.ts(9,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolDeclarationEmit12.ts(10,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. -==== symbolDeclarationEmit12.ts (1 errors) ==== +==== symbolDeclarationEmit12.ts (3 errors) ==== module M { interface I { } export class C { @@ -46,7 +48,11 @@ symbolDeclarationEmit12.ts(9,13): error TS9007: Declaration emit for this file r } get [Symbol.toPrimitive]() { return undefined; } ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + ~~~~~~~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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/symbolProperty52.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts index 304df99a76216..4089ed0534c6b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts @@ -18,15 +18,21 @@ declare var obj: invalid; /// [Errors] //// symbolProperty52.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty52.ts(2,13): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. +symbolProperty52.ts(7,12): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. -==== symbolProperty52.ts (1 errors) ==== +==== symbolProperty52.ts (3 errors) ==== var obj = { [Symbol.nonsense]: 0 ~~~~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~ +!!! error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. }; obj = {}; - obj[Symbol.nonsense]; \ No newline at end of file + obj[Symbol.nonsense]; + ~~~~~~~~ +!!! error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts index f3a38db1e104e..9185d3e40a8ab 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts @@ -15,14 +15,20 @@ obj[Symbol.for]; declare var obj: invalid; /// [Errors] //// +symbolProperty53.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. symbolProperty53.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty53.ts(5,5): error TS2538: Type '(key: string) => symbol' cannot be used as an index type. -==== symbolProperty53.ts (1 errors) ==== +==== symbolProperty53.ts (3 errors) ==== var obj = { [Symbol.for]: 0 ~~~~~~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. }; - obj[Symbol.for]; \ No newline at end of file + obj[Symbol.for]; + ~~~~~~~~~~ +!!! error TS2538: Type '(key: string) => symbol' cannot be used as an index type. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts index fc5287a177ebc..8969c4f7839c0 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts @@ -13,12 +13,15 @@ var obj = { declare var obj: invalid; /// [Errors] //// +symbolProperty54.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. symbolProperty54.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== symbolProperty54.ts (1 errors) ==== +==== symbolProperty54.ts (2 errors) ==== var obj = { [Symbol.prototype]: 0 ~~~~~~~~~~~~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty59.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty59.d.ts index 85348df6cd058..1ed95d21acc96 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty59.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty59.d.ts @@ -12,3 +12,17 @@ interface I { //// [/.src/symbolProperty59.d.ts] interface I { } +/// [Errors] //// + +symbolProperty59.ts(2,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. +symbolProperty59.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + + +==== symbolProperty59.ts (2 errors) ==== + interface I { + [Symbol.keyFor]: string; + ~~~~~~~~~~~~~~~ +!!! 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 TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralTypes4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralTypes4.d.ts index 4e2bceb201d1c..9627e370ef297 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralTypes4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralTypes4.d.ts @@ -470,9 +470,11 @@ declare function f4(s: `**${T}**`): T; templateLiteralTypes4.ts(43,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. templateLiteralTypes4.ts(43,60): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 @@ -762,10 +764,14 @@ templateLiteralTypes4.ts(43,60): error TS9007: Declaration emit for this file re 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; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts index a2a8a0c2cad2e..2da686f7e5480 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts @@ -49,13 +49,25 @@ type T4 = { }; /// [Errors] //// +typeUsedAsTypeLiteralIndex.ts(3,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. +typeUsedAsTypeLiteralIndex.ts(3,6): error TS2690: 'K' only refers to a type, but is being used as a value here. Did you mean to use 'P in K'? typeUsedAsTypeLiteralIndex.ts(6,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +typeUsedAsTypeLiteralIndex.ts(13,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. +typeUsedAsTypeLiteralIndex.ts(13,6): error TS2690: 'K2' only refers to a type, but is being used as a value here. Did you mean to use 'K in K2'? +typeUsedAsTypeLiteralIndex.ts(18,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. +typeUsedAsTypeLiteralIndex.ts(18,6): error TS2690: 'K3' only refers to a type, but is being used as a value here. Did you mean to use 'K in K3'? +typeUsedAsTypeLiteralIndex.ts(23,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. +typeUsedAsTypeLiteralIndex.ts(23,6): error TS2693: 'K4' only refers to a type, but is being used as a value here. -==== typeUsedAsTypeLiteralIndex.ts (1 errors) ==== +==== typeUsedAsTypeLiteralIndex.ts (9 errors) ==== type K = number | string; type T = { [K]: number; // Did you mean to use 'P in K'? + ~~~ +!!! 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 TS2690: 'K' only refers to a type, but is being used as a value here. Did you mean to use 'P in K'? } const K1 = Symbol(); @@ -68,16 +80,28 @@ typeUsedAsTypeLiteralIndex.ts(6,12): error TS9007: Declaration emit for this fil type K2 = "x" | "y"; type T2 = { [K2]: number; // Did you mean to use 'K in K2'? + ~~~~ +!!! 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 TS2690: 'K2' only refers to a type, but is being used as a value here. Did you mean to use 'K in K2'? } type K3 = number | string; type T3 = { [K3]: number; // Did you mean to use 'K in K3'? + ~~~~ +!!! 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 TS2690: 'K3' only refers to a type, but is being used as a value here. Did you mean to use 'K in K3'? } type K4 = number | string; type T4 = { [K4]: number; + ~~~~ +!!! 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 TS2693: 'K4' only refers to a type, but is being used as a value here. k4: string; } \ No newline at end of file From 04cedfe68434f899a059409aca8823d6d11a4584 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 24 Oct 2023 21:23:11 +0100 Subject: [PATCH 116/224] Added baseline for cases where DTE errors differ from TSC errors for isolated declaration errors. Signed-off-by: Titian Cernicova-Dragomir --- src/testRunner/compilerRunner.ts | 33 +- .../diff/FunctionDeclaration8_es6.d.ts.diff | 31 + ...asyncFunctionDeclaration8_es2017.d.ts.diff | 31 + .../asyncFunctionDeclaration8_es5.d.ts.diff | 31 + .../asyncFunctionDeclaration8_es6.d.ts.diff | 31 + .../computedPropertyNames12_ES5.d.ts.diff | 56 + .../computedPropertyNames12_ES6.d.ts.diff | 56 + .../computedPropertyNames16_ES5.d.ts.diff | 48 + .../computedPropertyNames16_ES6.d.ts.diff | 48 + .../diff/computedPropertyNames2_ES5.d.ts.diff | 47 + .../diff/computedPropertyNames2_ES6.d.ts.diff | 47 + .../diff/computedPropertyNames4_ES5.d.ts.diff | 50 + .../diff/computedPropertyNames4_ES6.d.ts.diff | 50 + .../diff/computedPropertyNames5_ES5.d.ts.diff | 48 + .../diff/computedPropertyNames5_ES6.d.ts.diff | 48 + ...dPropertyNamesWithStaticProperty.d.ts.diff | 35 + .../contextualReturnTypeOfIIFE2.d.ts.diff | 32 + ...gModuleAugmentationRetainsImport.d.ts.diff | 32 + ...ionEmitHasTypesRefOnNamespaceUse.d.ts.diff | 32 + ...arationEmitLateBoundAssignments2.d.ts.diff | 112 ++ ...larationFilesWithTypeReferences2.d.ts.diff | 29 + .../decoratorsOnComputedProperties.d.ts.diff | 195 ++++ ...ctionExpressionsWithDynamicNames.d.ts.diff | 43 + ...ypeNoSubstitutionTemplateLiteral.d.ts.diff | 26 + .../diff/indexWithoutParamType2.d.ts.diff | 30 + ...ithSuffixes_one_externalTSModule.d.ts.diff | 27 + .../parserComputedPropertyName1.d.ts.diff | 29 + .../parserComputedPropertyName10.d.ts.diff | 29 + .../parserComputedPropertyName22.d.ts.diff | 29 + .../parserComputedPropertyName23.d.ts.diff | 27 + .../parserComputedPropertyName24.d.ts.diff | 28 + .../parserComputedPropertyName25.d.ts.diff | 32 + .../parserComputedPropertyName27.d.ts.diff | 31 + .../parserComputedPropertyName28.d.ts.diff | 42 + .../parserComputedPropertyName29.d.ts.diff | 47 + .../parserComputedPropertyName31.d.ts.diff | 43 + .../parserComputedPropertyName32.d.ts.diff | 29 + .../parserComputedPropertyName33.d.ts.diff | 32 + .../parserComputedPropertyName36.d.ts.diff | 30 + .../parserComputedPropertyName6.d.ts.diff | 28 + .../parserComputedPropertyName9.d.ts.diff | 31 + .../parserES5ComputedPropertyName1.d.ts.diff | 29 + .../parserES5ComputedPropertyName10.d.ts.diff | 29 + .../parserES5ComputedPropertyName9.d.ts.diff | 31 + .../diff/parserES5SymbolProperty3.d.ts.diff | 29 + .../diff/parserES5SymbolProperty4.d.ts.diff | 29 + .../diff/parserES5SymbolProperty5.d.ts.diff | 29 + .../diff/parserES5SymbolProperty6.d.ts.diff | 29 + .../diff/parserES5SymbolProperty7.d.ts.diff | 27 + .../diff/parserSymbolIndexer5.d.ts.diff | 41 + .../original/diff/privateIndexer2.d.ts.diff | 37 + ...s(usedefineforclassfields=false).d.ts.diff | 39 + ...ts(usedefineforclassfields=true).d.ts.diff | 39 + .../original/diff/symbolProperty1.d.ts.diff | 28 + .../original/diff/symbolProperty2.d.ts.diff | 30 + .../original/diff/symbolProperty3.d.ts.diff | 34 + .../typeFromPropertyAssignment36.d.ts.diff | 38 + .../diff/typeReferenceDirectives11.d.ts.diff | 29 + .../diff/typeReferenceDirectives2.d.ts.diff | 27 + .../diff/typeReferenceDirectives8.d.ts.diff | 29 + .../dte/FunctionDeclaration8_es6.d.ts | 26 + .../dte/asyncFunctionDeclaration8_es2017.d.ts | 26 + .../dte/asyncFunctionDeclaration8_es5.d.ts | 26 + .../dte/asyncFunctionDeclaration8_es6.d.ts | 26 + .../dte/computedPropertyNames12_ES5.d.ts | 84 ++ .../dte/computedPropertyNames12_ES6.d.ts | 84 ++ .../dte/computedPropertyNames16_ES5.d.ts | 75 ++ .../dte/computedPropertyNames16_ES6.d.ts | 75 ++ .../dte/computedPropertyNames2_ES5.d.ts | 68 ++ .../dte/computedPropertyNames2_ES6.d.ts | 68 ++ .../dte/computedPropertyNames4_ES5.d.ts | 68 ++ .../dte/computedPropertyNames4_ES6.d.ts | 68 ++ .../dte/computedPropertyNames5_ES5.d.ts | 61 + .../dte/computedPropertyNames5_ES6.d.ts | 61 + ...mputedPropertyNamesWithStaticProperty.d.ts | 58 + .../dte/contextualReturnTypeOfIIFE2.d.ts | 23 + ...ortingModuleAugmentationRetainsImport.d.ts | 64 ++ ...larationEmitHasTypesRefOnNamespaceUse.d.ts | 22 + .../declarationEmitLateBoundAssignments2.d.ts | 290 +++++ .../declarationFilesWithTypeReferences2.d.ts | 18 + .../dte/decoratorsOnComputedProperties.d.ts | 709 ++++++++++++ ...doFunctionExpressionsWithDynamicNames.d.ts | 48 + ...ndexTypeNoSubstitutionTemplateLiteral.d.ts | 31 + .../original/dte/indexWithoutParamType2.d.ts | 34 + ...tionWithSuffixes_one_externalTSModule.d.ts | 16 + .../dte/parserComputedPropertyName1.d.ts | 26 + .../dte/parserComputedPropertyName10.d.ts | 32 + .../dte/parserComputedPropertyName22.d.ts | 32 + .../dte/parserComputedPropertyName23.d.ts | 29 + .../dte/parserComputedPropertyName24.d.ts | 32 + .../dte/parserComputedPropertyName25.d.ts | 43 + .../dte/parserComputedPropertyName27.d.ts | 43 + .../dte/parserComputedPropertyName28.d.ts | 44 + .../dte/parserComputedPropertyName29.d.ts | 52 + .../dte/parserComputedPropertyName31.d.ts | 46 + .../dte/parserComputedPropertyName32.d.ts | 32 + .../dte/parserComputedPropertyName33.d.ts | 46 + .../dte/parserComputedPropertyName36.d.ts | 35 + .../dte/parserComputedPropertyName6.d.ts | 29 + .../dte/parserComputedPropertyName9.d.ts | 38 + .../dte/parserES5ComputedPropertyName1.d.ts | 32 + .../dte/parserES5ComputedPropertyName10.d.ts | 32 + .../dte/parserES5ComputedPropertyName9.d.ts | 38 + .../dte/parserES5SymbolProperty3.d.ts | 32 + .../dte/parserES5SymbolProperty4.d.ts | 32 + .../dte/parserES5SymbolProperty5.d.ts | 32 + .../dte/parserES5SymbolProperty6.d.ts | 32 + .../dte/parserES5SymbolProperty7.d.ts | 29 + .../original/dte/parserSymbolIndexer5.d.ts | 46 + .../original/dte/privateIndexer2.d.ts | 60 + ...flicts(usedefineforclassfields=false).d.ts | 1010 ++++++++++++++++ ...nflicts(usedefineforclassfields=true).d.ts | 866 ++++++++++++++ .../original/dte/symbolProperty1.d.ts | 38 + .../original/dte/symbolProperty2.d.ts | 41 + .../original/dte/symbolProperty3.d.ts | 50 + .../dte/typeFromPropertyAssignment36.d.ts | 188 +++ .../dte/typeReferenceDirectives11.d.ts | 39 + .../dte/typeReferenceDirectives2.d.ts | 18 + .../dte/typeReferenceDirectives8.d.ts | 37 + .../tsc/FunctionDeclaration8_es6.d.ts | 26 + .../tsc/asyncFunctionDeclaration8_es2017.d.ts | 26 + .../tsc/asyncFunctionDeclaration8_es5.d.ts | 26 + .../tsc/asyncFunctionDeclaration8_es6.d.ts | 26 + .../tsc/computedPropertyNames12_ES5.d.ts | 93 ++ .../tsc/computedPropertyNames12_ES6.d.ts | 93 ++ .../tsc/computedPropertyNames16_ES5.d.ts | 81 ++ .../tsc/computedPropertyNames16_ES6.d.ts | 81 ++ .../tsc/computedPropertyNames2_ES5.d.ts | 74 ++ .../tsc/computedPropertyNames2_ES6.d.ts | 74 ++ .../tsc/computedPropertyNames4_ES5.d.ts | 74 ++ .../tsc/computedPropertyNames4_ES6.d.ts | 74 ++ .../tsc/computedPropertyNames5_ES5.d.ts | 67 ++ .../tsc/computedPropertyNames5_ES6.d.ts | 67 ++ ...mputedPropertyNamesWithStaticProperty.d.ts | 61 + .../tsc/contextualReturnTypeOfIIFE2.d.ts | 42 + ...ortingModuleAugmentationRetainsImport.d.ts | 67 ++ ...larationEmitHasTypesRefOnNamespaceUse.d.ts | 41 + .../declarationEmitLateBoundAssignments2.d.ts | 275 +++++ .../declarationFilesWithTypeReferences2.d.ts | 34 + .../tsc/decoratorsOnComputedProperties.d.ts | 754 ++++++++++++ ...doFunctionExpressionsWithDynamicNames.d.ts | 42 + ...ndexTypeNoSubstitutionTemplateLiteral.d.ts | 34 + .../original/tsc/indexWithoutParamType2.d.ts | 37 + ...tionWithSuffixes_one_externalTSModule.d.ts | 30 + .../tsc/parserComputedPropertyName1.d.ts | 26 + .../tsc/parserComputedPropertyName10.d.ts | 35 + .../tsc/parserComputedPropertyName22.d.ts | 35 + .../tsc/parserComputedPropertyName23.d.ts | 32 + .../tsc/parserComputedPropertyName24.d.ts | 35 + .../tsc/parserComputedPropertyName25.d.ts | 46 + .../tsc/parserComputedPropertyName27.d.ts | 46 + .../tsc/parserComputedPropertyName28.d.ts | 50 + .../tsc/parserComputedPropertyName29.d.ts | 58 + .../tsc/parserComputedPropertyName31.d.ts | 52 + .../tsc/parserComputedPropertyName32.d.ts | 35 + .../tsc/parserComputedPropertyName33.d.ts | 49 + .../tsc/parserComputedPropertyName36.d.ts | 38 + .../tsc/parserComputedPropertyName6.d.ts | 32 + .../tsc/parserComputedPropertyName9.d.ts | 41 + .../tsc/parserES5ComputedPropertyName1.d.ts | 35 + .../tsc/parserES5ComputedPropertyName10.d.ts | 35 + .../tsc/parserES5ComputedPropertyName9.d.ts | 41 + .../tsc/parserES5SymbolProperty3.d.ts | 35 + .../tsc/parserES5SymbolProperty4.d.ts | 35 + .../tsc/parserES5SymbolProperty5.d.ts | 35 + .../tsc/parserES5SymbolProperty6.d.ts | 35 + .../tsc/parserES5SymbolProperty7.d.ts | 32 + .../original/tsc/parserSymbolIndexer5.d.ts | 46 + .../original/tsc/privateIndexer2.d.ts | 60 + ...flicts(usedefineforclassfields=false).d.ts | 1013 +++++++++++++++++ ...nflicts(usedefineforclassfields=true).d.ts | 869 ++++++++++++++ .../original/tsc/symbolProperty1.d.ts | 41 + .../original/tsc/symbolProperty2.d.ts | 44 + .../original/tsc/symbolProperty3.d.ts | 53 + .../tsc/typeFromPropertyAssignment36.d.ts | 191 ++++ .../tsc/typeReferenceDirectives11.d.ts | 42 + .../tsc/typeReferenceDirectives2.d.ts | 32 + .../tsc/typeReferenceDirectives8.d.ts | 40 + 178 files changed, 13291 insertions(+), 10 deletions(-) create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/declarationEmitHasTypesRefOnNamespaceUse.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/declarationEmitLateBoundAssignments2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/declarationFilesWithTypeReferences2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/indexTypeNoSubstitutionTemplateLiteral.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserSymbolIndexer5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/privateIndexer2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment36.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives11.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives8.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/contextualReturnTypeOfIIFE2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/declarationEmitHasTypesRefOnNamespaceUse.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/declarationEmitLateBoundAssignments2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/declarationFilesWithTypeReferences2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/expandoFunctionExpressionsWithDynamicNames.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/indexTypeNoSubstitutionTemplateLiteral.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/indexWithoutParamType2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/moduleResolutionWithSuffixes_one_externalTSModule.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName10.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName22.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName23.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName28.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName31.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName32.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName36.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName9.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName10.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName9.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty7.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserSymbolIndexer5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/privateIndexer2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment36.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives11.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitHasTypesRefOnNamespaceUse.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitLateBoundAssignments2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/declarationFilesWithTypeReferences2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/indexTypeNoSubstitutionTemplateLiteral.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/moduleResolutionWithSuffixes_one_externalTSModule.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserSymbolIndexer5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/privateIndexer2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment36.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives11.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index d4d0fa03a513a..7344a026c0d04 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -442,12 +442,13 @@ class CompilerTest extends CompilerTestBase { } export class IsolatedDeclarationTest extends CompilerTestBase { - private dteDiagnostics: ts.Diagnostic[]; - tscNonIsolatedDeclarationsErrors: ts.Diagnostic[]; + private dteDiagnostics: readonly ts.Diagnostic[]; + private tscNonIsolatedDeclarationsErrors: readonly ts.Diagnostic[]; private isOutputEquivalent: boolean; private dteDtsFile: Compiler.TestFile[]; private tscDtsFiles: Compiler.TestFile[]; - tscIsolatedDeclarationsErrors: ts.Diagnostic[]; + private tscIsolatedDeclarationsErrors: readonly ts.Diagnostic[]; + private isDiagnosticEquivalent: boolean; static transformEnvironment(compilerEnvironment: CompilerTestEnvironment): CompilerTestEnvironment { const clonedOptions: ts.CompilerOptions & Compiler.HarnessOptions = ts.cloneCompilerOptions(compilerEnvironment.compilerOptions); @@ -493,7 +494,7 @@ export class IsolatedDeclarationTest extends CompilerTestBase { this.options, currentDirectory, ); - this.dteDiagnostics = dteResult.diagnostics; + this.dteDiagnostics = ts.sortAndDeduplicateDiagnostics(dteResult.diagnostics); this.dteDtsFile = [...ts.mapDefinedIterator(dteResult.dts, ([, f]) => ({ unitName: this.result.host.vfs.realpathSync(f.file), content: f.text, @@ -508,8 +509,9 @@ export class IsolatedDeclarationTest extends CompilerTestBase { })]; this.tscDtsFiles.sort((a, b) => this.result.host.vfs.stringComparer(a.unitName, b.unitName)); - this.tscNonIsolatedDeclarationsErrors = this.result.diagnostics.filter(d => !IsolatedDeclarationTest.dteDiagnosticErrors.has(d.code)); - this.tscIsolatedDeclarationsErrors = this.result.diagnostics.filter(d => IsolatedDeclarationTest.dteDiagnosticErrors.has(d.code)); + 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.dteDtsFile.length === this.tscDtsFiles.length && this.dteDtsFile @@ -517,16 +519,27 @@ export class IsolatedDeclarationTest extends CompilerTestBase { const tscDecl = this.tscDtsFiles[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.Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit.code, ts.Diagnostics.Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit.code, ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.code, - // ts.Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit.code, + ts.Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit.code, + ts.Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode.code, + 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.code, ]); verifyDteOutput() { - if (this.isOutputEquivalent) return; + if (this.isOutputEquivalent && this.isDiagnosticEquivalent) return; Compiler.doDeclarationBaseline( this.configuredName, "isolated-declarations/original/dte", @@ -538,7 +551,7 @@ export class IsolatedDeclarationTest extends CompilerTestBase { ); } verifyTscOutput() { - if (this.isOutputEquivalent) return; + if (this.isOutputEquivalent && this.isDiagnosticEquivalent) return; Compiler.doDeclarationBaseline( this.configuredName, "isolated-declarations/original/tsc", @@ -550,7 +563,7 @@ export class IsolatedDeclarationTest extends CompilerTestBase { ); } verifyDiff() { - if (this.isOutputEquivalent) return; + if (this.isOutputEquivalent && this.isDiagnosticEquivalent) return; Compiler.doDeclarationDiffBaseline( this.configuredName, "isolated-declarations/original/diff", diff --git a/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff new file mode 100644 index 0000000000000..02ae5c6719a3e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff @@ -0,0 +1,31 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,17 +3,17 @@ + //// [/.src/FunctionDeclaration8_es6.d.ts] + declare var v: invalid; + /// [Errors] //// + +-FunctionDeclaration8_es6.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + FunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'yield'. + FunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. ++FunctionDeclaration8_es6.ts(1,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + + ==== FunctionDeclaration8_es6.ts (3 errors) ==== + var v = { [yield]: foo } +- ~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! error TS2304: Cannot find name 'yield'. + ~~~ +\ No newline at end of file +-!!! error TS2304: Cannot find name 'foo'. ++!!! error TS2304: Cannot find name 'foo'. ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff new file mode 100644 index 0000000000000..42009f35f7fa3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff @@ -0,0 +1,31 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,17 +3,17 @@ + //// [/.src/asyncFunctionDeclaration8_es2017.d.ts] + declare var v: invalid; + /// [Errors] //// + +-asyncFunctionDeclaration8_es2017.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + asyncFunctionDeclaration8_es2017.ts(1,12): error TS2304: Cannot find name 'await'. + asyncFunctionDeclaration8_es2017.ts(1,20): error TS2304: Cannot find name 'foo'. ++asyncFunctionDeclaration8_es2017.ts(1,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + + ==== asyncFunctionDeclaration8_es2017.ts (3 errors) ==== + var v = { [await]: foo } +- ~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! error TS2304: Cannot find name 'await'. + ~~~ +\ No newline at end of file +-!!! error TS2304: Cannot find name 'foo'. ++!!! error TS2304: Cannot find name 'foo'. ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff new file mode 100644 index 0000000000000..ddd1b980ec981 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff @@ -0,0 +1,31 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,17 +3,17 @@ + //// [/.src/asyncFunctionDeclaration8_es5.d.ts] + declare var v: invalid; + /// [Errors] //// + +-asyncFunctionDeclaration8_es5.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + asyncFunctionDeclaration8_es5.ts(1,12): error TS2304: Cannot find name 'await'. + asyncFunctionDeclaration8_es5.ts(1,20): error TS2304: Cannot find name 'foo'. ++asyncFunctionDeclaration8_es5.ts(1,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + + ==== asyncFunctionDeclaration8_es5.ts (3 errors) ==== + var v = { [await]: foo } +- ~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! error TS2304: Cannot find name 'await'. + ~~~ +\ No newline at end of file +-!!! error TS2304: Cannot find name 'foo'. ++!!! error TS2304: Cannot find name 'foo'. ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff new file mode 100644 index 0000000000000..67ca18f23443c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff @@ -0,0 +1,31 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,17 +3,17 @@ + //// [/.src/asyncFunctionDeclaration8_es6.d.ts] + declare var v: invalid; + /// [Errors] //// + +-asyncFunctionDeclaration8_es6.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + asyncFunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'await'. + asyncFunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. ++asyncFunctionDeclaration8_es6.ts(1,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + + ==== asyncFunctionDeclaration8_es6.ts (3 errors) ==== + var v = { [await]: foo } +- ~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! error TS2304: Cannot find name 'await'. + ~~~ +\ No newline at end of file +-!!! error TS2304: Cannot find name 'foo'. ++!!! error TS2304: Cannot find name 'foo'. ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff new file mode 100644 index 0000000000000..6fa5ec29ea32c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff @@ -0,0 +1,56 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -14,36 +14,29 @@ + } + /// [Errors] //// + + computedPropertyNames12_ES5.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-computedPropertyNames12_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames12_ES5.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-computedPropertyNames12_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames12_ES5.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames12_ES5.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + computedPropertyNames12_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + computedPropertyNames12_ES5.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + computedPropertyNames12_ES5.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-computedPropertyNames12_ES5.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames12_ES5.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + + +-==== computedPropertyNames12_ES5.ts (12 errors) ==== ++==== computedPropertyNames12_ES5.ts (9 errors) ==== + var s: string; + var n: number; + var a: any; + class C { + [s]: number; + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [n] = n; + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static [s + s]: string; + ~~~~~~~ +@@ -58,10 +51,8 @@ + [0]: number; + [a]: number; + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static [true]: number; + ~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [`hello bye`] = 0; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff new file mode 100644 index 0000000000000..9246d8c8f142c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff @@ -0,0 +1,56 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -14,36 +14,29 @@ + } + /// [Errors] //// + + computedPropertyNames12_ES6.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-computedPropertyNames12_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames12_ES6.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-computedPropertyNames12_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames12_ES6.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames12_ES6.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + computedPropertyNames12_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + computedPropertyNames12_ES6.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + computedPropertyNames12_ES6.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-computedPropertyNames12_ES6.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames12_ES6.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + + +-==== computedPropertyNames12_ES6.ts (12 errors) ==== ++==== computedPropertyNames12_ES6.ts (9 errors) ==== + var s: string; + var n: number; + var a: any; + class C { + [s]: number; + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [n] = n; + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static [s + s]: string; + ~~~~~~~ +@@ -58,10 +51,8 @@ + [0]: number; + [a]: number; + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static [true]: number; + ~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [`hello bye`] = 0; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff new file mode 100644 index 0000000000000..d014386ba3bcd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff @@ -0,0 +1,48 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -14,28 +14,24 @@ + } + /// [Errors] //// + + computedPropertyNames16_ES5.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames16_ES5.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames16_ES5.ts(6,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames16_ES5.ts(10,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames16_ES5.ts(11,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames16_ES5.ts(12,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames16_ES5.ts(12,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames16_ES5.ts(14,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== computedPropertyNames16_ES5.ts (8 errors) ==== ++==== computedPropertyNames16_ES5.ts (6 errors) ==== + var s: string; + var n: number; + var a: any; + class C { + get [s]() { return 0;} + ~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set [n](v) { } +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get [s + s]() { return 0; } + set [s + n](v) { } +@@ -46,10 +42,8 @@ + get [0]() { return 0; } + ~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set [a](v) { } +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get [true]() { return 0; } + set [`hello bye`](v) { } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff new file mode 100644 index 0000000000000..5f20ed70ef8a4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff @@ -0,0 +1,48 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -14,28 +14,24 @@ + } + /// [Errors] //// + + computedPropertyNames16_ES6.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames16_ES6.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames16_ES6.ts(6,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames16_ES6.ts(10,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames16_ES6.ts(11,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames16_ES6.ts(12,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames16_ES6.ts(12,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames16_ES6.ts(14,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== computedPropertyNames16_ES6.ts (8 errors) ==== ++==== computedPropertyNames16_ES6.ts (6 errors) ==== + var s: string; + var n: number; + var a: any; + class C { + get [s]() { return 0;} + ~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set [n](v) { } +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get [s + s]() { return 0; } + set [s + n](v) { } +@@ -46,10 +42,8 @@ + get [0]() { return 0; } + ~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set [a](v) { } +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get [true]() { return 0; } + set [`hello bye`](v) { } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff new file mode 100644 index 0000000000000..2cad76805463d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff @@ -0,0 +1,47 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -16,17 +16,15 @@ + computedPropertyNames2_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames2_ES5.ts(5,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames2_ES5.ts(6,9): error TS2378: A 'get' accessor must return a value. + computedPropertyNames2_ES5.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames2_ES5.ts(7,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames2_ES5.ts(7,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames2_ES5.ts(8,16): error TS2378: A 'get' accessor must return a value. + computedPropertyNames2_ES5.ts(8,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames2_ES5.ts(9,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames2_ES5.ts(9,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== computedPropertyNames2_ES5.ts (10 errors) ==== ++==== computedPropertyNames2_ES5.ts (8 errors) ==== + var methodName = "method"; + var accessorName = "accessor"; + class C { + [methodName]() { } +@@ -40,19 +38,15 @@ + !!! error TS2378: A 'get' accessor must return a value. + ~~~~~~~~~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set [accessorName](v) { } +- ~~~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get [accessorName]() { } + ~~~~~~~~~~~~~~ + !!! error TS2378: A 'get' accessor must return a value. + ~~~~~~~~~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static set [accessorName](v) { } +- ~~~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff new file mode 100644 index 0000000000000..cc34975295c2c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff @@ -0,0 +1,47 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -16,17 +16,15 @@ + computedPropertyNames2_ES6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames2_ES6.ts(5,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames2_ES6.ts(6,9): error TS2378: A 'get' accessor must return a value. + computedPropertyNames2_ES6.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames2_ES6.ts(7,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames2_ES6.ts(7,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames2_ES6.ts(8,16): error TS2378: A 'get' accessor must return a value. + computedPropertyNames2_ES6.ts(8,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames2_ES6.ts(9,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames2_ES6.ts(9,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== computedPropertyNames2_ES6.ts (10 errors) ==== ++==== computedPropertyNames2_ES6.ts (8 errors) ==== + var methodName = "method"; + var accessorName = "accessor"; + class C { + [methodName]() { } +@@ -40,19 +38,15 @@ + !!! error TS2378: A 'get' accessor must return a value. + ~~~~~~~~~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set [accessorName](v) { } +- ~~~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get [accessorName]() { } + ~~~~~~~~~~~~~~ + !!! error TS2378: A 'get' accessor must return a value. + ~~~~~~~~~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static set [accessorName](v) { } +- ~~~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff new file mode 100644 index 0000000000000..b96b4122e8f3e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff @@ -0,0 +1,50 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,28 +6,24 @@ + declare var a: any; + declare var v: invalid; + /// [Errors] //// + +-computedPropertyNames4_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames4_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++computedPropertyNames4_ES5.ts(6,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames4_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames4_ES5.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames4_ES5.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames4_ES5.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames4_ES5.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames4_ES5.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== computedPropertyNames4_ES5.ts (8 errors) ==== ++==== computedPropertyNames4_ES5.ts (6 errors) ==== + var s: string; + var n: number; + var a: any; + var v = { + [s]: 0, +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [n]: n, +- ~~~ ++ ~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [s + s]: 1, + ~~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +@@ -39,10 +35,8 @@ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [""]: 0, + [0]: 0, + [a]: 1, +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [true]: 0, + ~~~~~~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [`hello bye`]: 0, diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff new file mode 100644 index 0000000000000..fec1e4f3b2efd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff @@ -0,0 +1,50 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,28 +6,24 @@ + declare var a: any; + declare var v: invalid; + /// [Errors] //// + +-computedPropertyNames4_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames4_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++computedPropertyNames4_ES6.ts(6,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames4_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames4_ES6.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames4_ES6.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames4_ES6.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames4_ES6.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames4_ES6.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== computedPropertyNames4_ES6.ts (8 errors) ==== ++==== computedPropertyNames4_ES6.ts (6 errors) ==== + var s: string; + var n: number; + var a: any; + var v = { + [s]: 0, +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [n]: n, +- ~~~ ++ ~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [s + s]: 1, + ~~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +@@ -39,10 +35,8 @@ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [""]: 0, + [0]: 0, + [a]: 1, +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [true]: 0, + ~~~~~~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [`hello bye`]: 0, diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff new file mode 100644 index 0000000000000..7117a2f9a072d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff @@ -0,0 +1,48 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,28 +5,24 @@ + declare var v: invalid; + /// [Errors] //// + + computedPropertyNames5_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +-computedPropertyNames5_ES5.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames5_ES5.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames5_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames5_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames5_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames5_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames5_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +-computedPropertyNames5_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames5_ES5.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames5_ES5.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== computedPropertyNames5_ES5.ts (11 errors) ==== ++==== computedPropertyNames5_ES5.ts (9 errors) ==== + var b: boolean; + var v = { + [b]: 0, + ~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [true]: 1, + ~~~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [[]]: 0, +@@ -41,10 +37,8 @@ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [undefined]: undefined, + ~~~~~~~~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +- ~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [null]: null + ~~~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff new file mode 100644 index 0000000000000..c3535441f7de6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff @@ -0,0 +1,48 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,28 +5,24 @@ + declare var v: invalid; + /// [Errors] //// + + computedPropertyNames5_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +-computedPropertyNames5_ES6.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames5_ES6.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames5_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames5_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames5_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames5_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames5_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +-computedPropertyNames5_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames5_ES6.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames5_ES6.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== computedPropertyNames5_ES6.ts (11 errors) ==== ++==== computedPropertyNames5_ES6.ts (9 errors) ==== + var b: boolean; + var v = { + [b]: 0, + ~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [true]: 1, + ~~~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [[]]: 0, +@@ -41,10 +37,8 @@ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [undefined]: undefined, + ~~~~~~~~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +- ~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [null]: null + ~~~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff new file mode 100644 index 0000000000000..052d2505d1fb0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff @@ -0,0 +1,35 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -10,15 +10,14 @@ + /// [Errors] //// + + computedPropertyNamesWithStaticProperty.ts(3,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNamesWithStaticProperty.ts(3,10): error TS2449: Class 'C' used before its declaration. +-computedPropertyNamesWithStaticProperty.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNamesWithStaticProperty.ts(6,10): error TS2449: Class 'C' used before its declaration. + computedPropertyNamesWithStaticProperty.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNamesWithStaticProperty.ts(9,6): error TS2449: Class 'C' used before its declaration. + + +-==== computedPropertyNamesWithStaticProperty.ts (6 errors) ==== ++==== computedPropertyNamesWithStaticProperty.ts (5 errors) ==== + class C { + static staticProp = 10; + get [C.staticProp]() { + ~~~~~~~~~~~~~~ +@@ -28,10 +27,8 @@ + !!! related TS2728 computedPropertyNamesWithStaticProperty.ts:1:7: 'C' is declared here. + return "hello"; + } + set [C.staticProp](x: string) { +- ~~~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2449: Class 'C' used before its declaration. + !!! related TS2728 computedPropertyNamesWithStaticProperty.ts:1:7: 'C' is declared here. + var y = x; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff new file mode 100644 index 0000000000000..af18076cc9c65 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff @@ -0,0 +1,32 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/contextualReturnTypeOfIIFE2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,23 +3,4 @@ + //// [/.src/contextualReturnTypeOfIIFE2.d.ts] + declare namespace app { + function foo(): void; + } +-/// [Errors] //// +- +-contextualReturnTypeOfIIFE2.ts(2,12): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +- +- +-==== contextualReturnTypeOfIIFE2.ts (1 errors) ==== +- declare namespace app { +- function foo(): void; +- ~~~ +-!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +- } +- +- app.foo.bar = (function () { +- const someFun = (arg: number) => {}; +- return { someFun }; +- })(); +- +- app.foo.bar.someFun(1); +- +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff new file mode 100644 index 0000000000000..89703bf35065d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff @@ -0,0 +1,32 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -14,9 +14,8 @@ + } + /// [Errors] //// + + child1.ts(9,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parent.ts(1,1): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + + ==== child1.ts (1 errors) ==== + import { ParentThing } from './parent'; +@@ -32,12 +31,10 @@ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + prototype.add = (a: number, b: number) => a + b; + } + +-==== parent.ts (1 errors) ==== ++==== parent.ts (0 errors) ==== + import { child1 } from './child1'; // this import should still exist in some form in the output, since it augments this module +- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + export class ParentThing implements ParentThing {} + + child1(ParentThing.prototype); +\ No newline at end of file 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..9ab1bc5811353 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitHasTypesRefOnNamespaceUse.d.ts.diff @@ -0,0 +1,32 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/declarationEmitHasTypesRefOnNamespaceUse.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,23 +2,4 @@ + + //// [/src/index.d.ts] + declare class Src implements NS.Dep { + } +-/// [Errors] //// +- +-/src/index.ts(1,22): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to dep to unblock declaration emit. +- +- +-==== /src/index.ts (1 errors) ==== +- class Src implements NS.Dep { } +- ~~~~~~ +-!!! error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to dep to unblock declaration emit. +- +-==== /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/declarationEmitLateBoundAssignments2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitLateBoundAssignments2.d.ts.diff new file mode 100644 index 0000000000000..82cd92a08488d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitLateBoundAssignments2.d.ts.diff @@ -0,0 +1,112 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/declarationEmitLateBoundAssignments2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -44,24 +44,29 @@ + declarationEmitLateBoundAssignments2.ts(36,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + declarationEmitLateBoundAssignments2.ts(36,17): error TS9009: 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(39,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + declarationEmitLateBoundAssignments2.ts(39,14): error TS9009: 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(42,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitLateBoundAssignments2.ts(42,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitLateBoundAssignments2.ts(42,14): error TS9009: 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(45,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + declarationEmitLateBoundAssignments2.ts(45,14): error TS9009: 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(48,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitLateBoundAssignments2.ts(48,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitLateBoundAssignments2.ts(48,14): error TS9009: 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(51,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + declarationEmitLateBoundAssignments2.ts(51,14): error TS9009: 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(54,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitLateBoundAssignments2.ts(54,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitLateBoundAssignments2.ts(54,14): error TS9009: 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(57,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + declarationEmitLateBoundAssignments2.ts(57,14): error TS9009: 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(60,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitLateBoundAssignments2.ts(60,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitLateBoundAssignments2.ts(60,14): error TS9009: 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(63,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + declarationEmitLateBoundAssignments2.ts(63,14): error TS9009: 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(66,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitLateBoundAssignments2.ts(66,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitLateBoundAssignments2.ts(66,14): error TS9009: 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 (35 errors) ==== ++==== declarationEmitLateBoundAssignments2.ts (40 errors) ==== + // https://github.com/microsoft/TypeScript/issues/54811 + + const c = "C" + const num = 1 +@@ -146,10 +151,12 @@ + !!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow["B"] = 'bar' + + export const arrow2 = () => {} +- ~~~~~~~~ ++ ~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow2[c] = 100 + + export const arrow3 = () => {} + ~~~~~~ +@@ -158,10 +165,12 @@ + !!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow3[77] = 0 + + export const arrow4 = () => {} +- ~~~~~~~~ ++ ~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow4[num] = 0 + + export const arrow5 = () => {} + ~~~~~~ +@@ -170,10 +179,12 @@ + !!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow5["101"] = 0 + + export const arrow6 = () => {} +- ~~~~~~~~ ++ ~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow6[numStr] = 0 + + export const arrow7 = () => {} + ~~~~~~ +@@ -182,10 +193,12 @@ + !!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow7["qwe rty"] = 0 + + export const arrow8 = () => {} +- ~~~~~~~~ ++ ~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow8[withWhitespace] = 0 + + export const arrow9 = () => {} + ~~~~~~ +@@ -194,8 +207,10 @@ + !!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow9["🤪"] = 0 + + export const arrow10 = () => {} +- ~~~~~~~~ ++ ~~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow10[emoji] = 0 + +\ No newline at end of file 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..822ca547b6667 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationFilesWithTypeReferences2.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/declarationFilesWithTypeReferences2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,20 +1,4 @@ + + + //// [/app.d.ts] + declare function foo(): Error2; +-/// [Errors] //// +- +-/app.ts(1,17): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to node to unblock declaration emit. +- +- +-==== /node_modules/@types/node/index.d.ts (0 errors) ==== +- interface Error2 { +- stack2: string; +- } +- +-==== /app.ts (1 errors) ==== +- function foo(): Error2 { +- ~~~~~~ +-!!! error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to node to unblock declaration emit. +- return undefined; +- } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff new file mode 100644 index 0000000000000..3992c876bdca2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff @@ -0,0 +1,195 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/decoratorsOnComputedProperties.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -78,13 +78,10 @@ + decoratorsOnComputedProperties.ts(18,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + decoratorsOnComputedProperties.ts(19,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + decoratorsOnComputedProperties.ts(20,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + decoratorsOnComputedProperties.ts(21,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-decoratorsOnComputedProperties.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + decoratorsOnComputedProperties.ts(22,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-decoratorsOnComputedProperties.ts(22,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + decoratorsOnComputedProperties.ts(23,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-decoratorsOnComputedProperties.ts(23,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + decoratorsOnComputedProperties.ts(27,5): error TS1206: Decorators are not valid here. + decoratorsOnComputedProperties.ts(28,5): error TS1206: Decorators are not valid here. + decoratorsOnComputedProperties.ts(29,5): error TS1206: Decorators are not valid here. + decoratorsOnComputedProperties.ts(30,5): error TS1206: Decorators are not valid here. +@@ -97,13 +94,10 @@ + decoratorsOnComputedProperties.ts(52,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + decoratorsOnComputedProperties.ts(53,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + decoratorsOnComputedProperties.ts(54,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + decoratorsOnComputedProperties.ts(55,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-decoratorsOnComputedProperties.ts(55,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + decoratorsOnComputedProperties.ts(56,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-decoratorsOnComputedProperties.ts(56,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + decoratorsOnComputedProperties.ts(57,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-decoratorsOnComputedProperties.ts(57,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + decoratorsOnComputedProperties.ts(62,5): error TS1206: Decorators are not valid here. + decoratorsOnComputedProperties.ts(63,5): error TS1206: Decorators are not valid here. + decoratorsOnComputedProperties.ts(64,5): error TS1206: Decorators are not valid here. + decoratorsOnComputedProperties.ts(65,5): error TS1206: Decorators are not valid here. +@@ -116,13 +110,10 @@ + decoratorsOnComputedProperties.ts(88,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + decoratorsOnComputedProperties.ts(89,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + decoratorsOnComputedProperties.ts(90,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + decoratorsOnComputedProperties.ts(92,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-decoratorsOnComputedProperties.ts(92,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + decoratorsOnComputedProperties.ts(93,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-decoratorsOnComputedProperties.ts(93,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + decoratorsOnComputedProperties.ts(94,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-decoratorsOnComputedProperties.ts(94,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + decoratorsOnComputedProperties.ts(98,5): error TS1206: Decorators are not valid here. + decoratorsOnComputedProperties.ts(99,5): error TS1206: Decorators are not valid here. + decoratorsOnComputedProperties.ts(100,5): error TS1206: Decorators are not valid here. + decoratorsOnComputedProperties.ts(101,5): error TS1206: Decorators are not valid here. +@@ -135,13 +126,10 @@ + decoratorsOnComputedProperties.ts(124,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + decoratorsOnComputedProperties.ts(125,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + decoratorsOnComputedProperties.ts(126,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + decoratorsOnComputedProperties.ts(128,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-decoratorsOnComputedProperties.ts(128,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + decoratorsOnComputedProperties.ts(129,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-decoratorsOnComputedProperties.ts(129,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + decoratorsOnComputedProperties.ts(131,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-decoratorsOnComputedProperties.ts(131,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + decoratorsOnComputedProperties.ts(135,5): error TS1206: Decorators are not valid here. + decoratorsOnComputedProperties.ts(136,5): error TS1206: Decorators are not valid here. + decoratorsOnComputedProperties.ts(137,5): error TS1206: Decorators are not valid here. + decoratorsOnComputedProperties.ts(138,5): error TS1206: Decorators are not valid here. +@@ -154,13 +142,10 @@ + decoratorsOnComputedProperties.ts(162,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + decoratorsOnComputedProperties.ts(163,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + decoratorsOnComputedProperties.ts(164,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + decoratorsOnComputedProperties.ts(166,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-decoratorsOnComputedProperties.ts(166,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + decoratorsOnComputedProperties.ts(167,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-decoratorsOnComputedProperties.ts(167,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + decoratorsOnComputedProperties.ts(169,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-decoratorsOnComputedProperties.ts(169,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + decoratorsOnComputedProperties.ts(173,5): error TS1206: Decorators are not valid here. + decoratorsOnComputedProperties.ts(174,5): error TS1206: Decorators are not valid here. + decoratorsOnComputedProperties.ts(175,5): error TS1206: Decorators are not valid here. + decoratorsOnComputedProperties.ts(176,5): error TS1206: Decorators are not valid here. +@@ -172,9 +157,9 @@ + decoratorsOnComputedProperties.ts(186,5): error TS1206: Decorators are not valid here. + decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid here. + + +-==== decoratorsOnComputedProperties.ts (97 errors) ==== ++==== decoratorsOnComputedProperties.ts (82 errors) ==== + function x(o: object, k: PropertyKey) { } + ~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + let i = 0; +@@ -204,20 +189,14 @@ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [fieldNameA]: any; + ~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + @x [fieldNameB]: any; + ~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + @x [fieldNameC]: any = null; + ~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + void class B { + @x ["property"]: any; +@@ -276,20 +255,14 @@ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [fieldNameA]: any; + ~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + @x [fieldNameB]: any; + ~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + @x [fieldNameC]: any = null; + ~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ["some" + "method"]() {} + } + + void class D { +@@ -351,20 +324,14 @@ + ["some" + "method"]() {} + [fieldNameA]: any; + ~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + @x [fieldNameB]: any; + ~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + @x [fieldNameC]: any = null; + ~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + void class F { + @x ["property"]: any; +@@ -425,21 +392,15 @@ + ["some" + "method"]() {} + [fieldNameA]: any; + ~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + @x [fieldNameB]: any; + ~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ["some" + "method2"]() {} + @x [fieldNameC]: any = null; + ~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + void class H { + @x ["property"]: any; +@@ -501,21 +462,15 @@ + @x ["some" + "method"]() {} + [fieldNameA]: any; + ~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + @x [fieldNameB]: any; + ~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ["some" + "method2"]() {} + @x [fieldNameC]: any = null; + ~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + void class J { + @x ["property"]: any; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff new file mode 100644 index 0000000000000..735ea6e689fa5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff @@ -0,0 +1,43 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/expandoFunctionExpressionsWithDynamicNames.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,23 +4,29 @@ + export declare const expr: invalid; + export declare const expr2: invalid; + /// [Errors] //// + +-expandoFunctionExpressionsWithDynamicNames.ts(5,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-expandoFunctionExpressionsWithDynamicNames.ts(8,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionExpressionsWithDynamicNames.ts(8,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++expandoFunctionExpressionsWithDynamicNames.ts(8,14): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +-==== expandoFunctionExpressionsWithDynamicNames.ts (2 errors) ==== ++==== expandoFunctionExpressionsWithDynamicNames.ts (4 errors) ==== + // https://github.com/microsoft/TypeScript/issues/54809 + + const s = "X"; + + export const expr = () => {} +- ~~~~~~~~ ++ ~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + expr[s] = 0 + + export const expr2 = function () {} +- ~~~~~~~~ ++ ~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + expr2[s] = 0 + +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/indexTypeNoSubstitutionTemplateLiteral.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/indexTypeNoSubstitutionTemplateLiteral.d.ts.diff new file mode 100644 index 0000000000000..7653ebdf52469 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/indexTypeNoSubstitutionTemplateLiteral.d.ts.diff @@ -0,0 +1,26 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/indexTypeNoSubstitutionTemplateLiteral.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,17 +5,14 @@ + type Test = keyof typeof Foo; + /// [Errors] //// + + indexTypeNoSubstitutionTemplateLiteral.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-indexTypeNoSubstitutionTemplateLiteral.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +-==== indexTypeNoSubstitutionTemplateLiteral.ts (2 errors) ==== ++==== indexTypeNoSubstitutionTemplateLiteral.ts (1 errors) ==== + function Foo() {} + ~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +- ~~~ +-!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + Foo[`b`] = function () {}; + + type Test = keyof typeof Foo; + diff --git a/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff new file mode 100644 index 0000000000000..cb26ce1341c7d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff @@ -0,0 +1,30 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/indexWithoutParamType2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,21 +6,18 @@ + } + /// [Errors] //// + + indexWithoutParamType2.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-indexWithoutParamType2.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + indexWithoutParamType2.ts(3,6): error TS2304: Cannot find name 'x'. + indexWithoutParamType2.ts(3,6): error TS4031: Public property '[x]' of exported class has or is using private name 'x'. + + +-==== indexWithoutParamType2.ts (4 errors) ==== ++==== indexWithoutParamType2.ts (3 errors) ==== + class C { + // Used to be indexer, now it is a computed property + [x]: string + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'x'. + ~ + !!! error TS4031: Public property '[x]' of exported class has or is using private name 'x'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff new file mode 100644 index 0000000000000..aa1c824bd7457 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff @@ -0,0 +1,27 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,18 +1,4 @@ + + + //// [/bin/test.d.ts] + export {}; +-/// [Errors] //// +- +-/node_modules/some-library/index.ios.ts(1,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +- +- +-==== /test.ts (0 errors) ==== +- import { ios } from "some-library"; +- +-==== /node_modules/some-library/index.ios.ts (1 errors) ==== +- export function ios() {} +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-==== /node_modules/some-library/index.ts (0 errors) ==== +- export function base() {} +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff new file mode 100644 index 0000000000000..34d62b6bbe331 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,17 +3,17 @@ + //// [/.src/parserComputedPropertyName1.d.ts] + declare var v: invalid; + /// [Errors] //// + +-parserComputedPropertyName1.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName1.ts(1,12): error TS2304: Cannot find name 'e'. ++parserComputedPropertyName1.ts(1,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName1.ts(1,15): error TS1005: ':' expected. + + + ==== parserComputedPropertyName1.ts (3 errors) ==== + var v = { [e] }; +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'e'. ++ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1005: ':' expected. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff new file mode 100644 index 0000000000000..05a25c7b9969a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,20 +6,17 @@ + } + /// [Errors] //// + + parserComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-parserComputedPropertyName10.ts(2,4): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. + parserComputedPropertyName10.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +-==== parserComputedPropertyName10.ts (4 errors) ==== ++==== parserComputedPropertyName10.ts (3 errors) ==== + class C { + [e] = 1 + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff new file mode 100644 index 0000000000000..adecf7a3deded --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,20 +6,17 @@ + } + /// [Errors] //// + + parserComputedPropertyName22.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-parserComputedPropertyName22.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName22.ts(2,6): error TS2304: Cannot find name 'e'. + parserComputedPropertyName22.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +-==== parserComputedPropertyName22.ts (4 errors) ==== ++==== parserComputedPropertyName22.ts (3 errors) ==== + declare class C { + [e]: number + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff new file mode 100644 index 0000000000000..99f600c0762aa --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff @@ -0,0 +1,27 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,18 +5,15 @@ + get [e](): number; + } + /// [Errors] //// + +-parserComputedPropertyName23.ts(2,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName23.ts(2,10): error TS2304: Cannot find name 'e'. + parserComputedPropertyName23.ts(2,10): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +-==== parserComputedPropertyName23.ts (3 errors) ==== ++==== parserComputedPropertyName23.ts (2 errors) ==== + declare class C { + get [e](): number +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff new file mode 100644 index 0000000000000..9a5dcba82363f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff @@ -0,0 +1,28 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,19 +5,16 @@ + set [e](v: invalid); + } + /// [Errors] //// + +-parserComputedPropertyName24.ts(2,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName24.ts(2,10): error TS2304: Cannot find name 'e'. + parserComputedPropertyName24.ts(2,10): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + parserComputedPropertyName24.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== parserComputedPropertyName24.ts (4 errors) ==== ++==== parserComputedPropertyName24.ts (3 errors) ==== + class C { + set [e](v) { } +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff new file mode 100644 index 0000000000000..6df0261404921 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff @@ -0,0 +1,32 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,23 +6,20 @@ + } + /// [Errors] //// + + parserComputedPropertyName25.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-parserComputedPropertyName25.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName25.ts(3,6): error TS2304: Cannot find name 'e'. + parserComputedPropertyName25.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + parserComputedPropertyName25.ts(3,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. + + +-==== parserComputedPropertyName25.ts (6 errors) ==== ++==== parserComputedPropertyName25.ts (5 errors) ==== + class C { + // No ASI + [e] = 0 + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff new file mode 100644 index 0000000000000..ec1c3439ff599 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff @@ -0,0 +1,31 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,22 +6,19 @@ + number: invalid; + } + /// [Errors] //// + +-parserComputedPropertyName27.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName27.ts(3,6): error TS2304: Cannot find name 'e'. + parserComputedPropertyName27.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + parserComputedPropertyName27.ts(4,6): error TS2304: Cannot find name 'e2'. + parserComputedPropertyName27.ts(4,9): error TS1005: ';' expected. + parserComputedPropertyName27.ts(4,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== parserComputedPropertyName27.ts (6 errors) ==== ++==== parserComputedPropertyName27.ts (5 errors) ==== + class C { + // No ASI + [e]: number = 0 +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff new file mode 100644 index 0000000000000..34a5e2603443e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff @@ -0,0 +1,42 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,33 +7,27 @@ + } + /// [Errors] //// + + parserComputedPropertyName28.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-parserComputedPropertyName28.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName28.ts(2,6): error TS2304: Cannot find name 'e'. + parserComputedPropertyName28.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + parserComputedPropertyName28.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-parserComputedPropertyName28.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName28.ts(3,6): error TS2304: Cannot find name 'e2'. + parserComputedPropertyName28.ts(3,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. + + +-==== parserComputedPropertyName28.ts (8 errors) ==== ++==== parserComputedPropertyName28.ts (6 errors) ==== + class C { + [e]: number = 0; + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + [e2]: number + ~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ + !!! error TS2304: Cannot find name 'e2'. + ~~ + !!! error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff new file mode 100644 index 0000000000000..3ebb53ef8e400 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff @@ -0,0 +1,47 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,27 +7,23 @@ + } + /// [Errors] //// + + parserComputedPropertyName29.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-parserComputedPropertyName29.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName29.ts(3,6): error TS2304: Cannot find name 'e'. + parserComputedPropertyName29.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + parserComputedPropertyName29.ts(3,11): error TS2304: Cannot find name 'id'. + parserComputedPropertyName29.ts(3,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName29.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-parserComputedPropertyName29.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName29.ts(4,6): error TS2304: Cannot find name 'e2'. + parserComputedPropertyName29.ts(4,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. + + +-==== parserComputedPropertyName29.ts (10 errors) ==== ++==== parserComputedPropertyName29.ts (8 errors) ==== + class C { + // yes ASI + [e] = id++ + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. +@@ -37,10 +33,8 @@ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [e2]: number + ~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ + !!! error TS2304: Cannot find name 'e2'. + ~~ + !!! error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff new file mode 100644 index 0000000000000..d05bc5641fde6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff @@ -0,0 +1,43 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,34 +7,28 @@ + } + /// [Errors] //// + + parserComputedPropertyName31.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-parserComputedPropertyName31.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName31.ts(3,6): error TS2304: Cannot find name 'e'. + parserComputedPropertyName31.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + parserComputedPropertyName31.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-parserComputedPropertyName31.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName31.ts(4,6): error TS2304: Cannot find name 'e2'. + parserComputedPropertyName31.ts(4,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. + + +-==== parserComputedPropertyName31.ts (8 errors) ==== ++==== parserComputedPropertyName31.ts (6 errors) ==== + class C { + // yes ASI + [e]: number + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + [e2]: number + ~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ + !!! error TS2304: Cannot find name 'e2'. + ~~ + !!! error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff new file mode 100644 index 0000000000000..a7e1fbb37c3b7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,20 +6,17 @@ + } + /// [Errors] //// + + parserComputedPropertyName32.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. +-parserComputedPropertyName32.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName32.ts(2,6): error TS2304: Cannot find name 'e'. + parserComputedPropertyName32.ts(2,6): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + + +-==== parserComputedPropertyName32.ts (4 errors) ==== ++==== parserComputedPropertyName32.ts (3 errors) ==== + declare class C { + [e](): number + ~~~ + !!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff new file mode 100644 index 0000000000000..646f99089fa72 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff @@ -0,0 +1,32 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,23 +5,20 @@ + [e]: invalid; + } + /// [Errors] //// + +-parserComputedPropertyName33.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName33.ts(3,6): error TS2304: Cannot find name 'e'. + parserComputedPropertyName33.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + parserComputedPropertyName33.ts(3,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName33.ts(4,6): error TS2304: Cannot find name 'e2'. + parserComputedPropertyName33.ts(4,12): error TS1005: ';' expected. + parserComputedPropertyName33.ts(5,1): error TS1128: Declaration or statement expected. + + +-==== parserComputedPropertyName33.ts (7 errors) ==== ++==== parserComputedPropertyName33.ts (6 errors) ==== + class C { + // No ASI + [e] = 0 +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff new file mode 100644 index 0000000000000..d3de69b84cf54 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff @@ -0,0 +1,30 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,21 +6,18 @@ + } + /// [Errors] //// + + parserComputedPropertyName36.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-parserComputedPropertyName36.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName36.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. + parserComputedPropertyName36.ts(2,6): error TS2304: Cannot find name 'public'. + parserComputedPropertyName36.ts(2,6): error TS4031: Public property '[public ]' of exported class has or is using private name 'public'. + + +-==== parserComputedPropertyName36.ts (5 errors) ==== ++==== parserComputedPropertyName36.ts (4 errors) ==== + class C { + [public ]: string; + ~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ + !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. + ~~~~~~ + !!! error TS2304: Cannot find name 'public'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff new file mode 100644 index 0000000000000..50632d3d71edc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff @@ -0,0 +1,28 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,19 +3,16 @@ + //// [/.src/parserComputedPropertyName6.d.ts] + declare var v: invalid; + /// [Errors] //// + +-parserComputedPropertyName6.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName6.ts(1,12): error TS2304: Cannot find name 'e'. + parserComputedPropertyName6.ts(1,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName6.ts(1,20): error TS2304: Cannot find name 'e'. + parserComputedPropertyName6.ts(1,24): error TS2304: Cannot find name 'e'. + + +-==== parserComputedPropertyName6.ts (5 errors) ==== ++==== parserComputedPropertyName6.ts (4 errors) ==== + var v = { [e]: 1, [e + e]: 2 }; +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'e'. + ~~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff new file mode 100644 index 0000000000000..5e65e70073858 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff @@ -0,0 +1,31 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,22 +6,19 @@ + } + /// [Errors] //// + + parserComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-parserComputedPropertyName9.ts(2,4): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. + parserComputedPropertyName9.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + parserComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. + parserComputedPropertyName9.ts(2,9): error TS4031: Public property '[e]' of exported class has or is using private name 'Type'. + + +-==== parserComputedPropertyName9.ts (6 errors) ==== ++==== parserComputedPropertyName9.ts (5 errors) ==== + class C { + [e]: Type + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff new file mode 100644 index 0000000000000..ea387c05bfc93 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,20 +6,17 @@ + } + /// [Errors] //// + + parserES5ComputedPropertyName1.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-parserES5ComputedPropertyName1.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserES5ComputedPropertyName1.ts(2,6): error TS2304: Cannot find name 'e'. + parserES5ComputedPropertyName1.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +-==== parserES5ComputedPropertyName1.ts (4 errors) ==== ++==== parserES5ComputedPropertyName1.ts (3 errors) ==== + declare class C { + [e]: number + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff new file mode 100644 index 0000000000000..fb437f1343c74 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,20 +6,17 @@ + } + /// [Errors] //// + + parserES5ComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-parserES5ComputedPropertyName10.ts(2,4): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserES5ComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. + parserES5ComputedPropertyName10.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +-==== parserES5ComputedPropertyName10.ts (4 errors) ==== ++==== parserES5ComputedPropertyName10.ts (3 errors) ==== + class C { + [e] = 1 + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff new file mode 100644 index 0000000000000..9a93b9825fba7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff @@ -0,0 +1,31 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,22 +6,19 @@ + } + /// [Errors] //// + + parserES5ComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-parserES5ComputedPropertyName9.ts(2,4): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserES5ComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. + parserES5ComputedPropertyName9.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + parserES5ComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. + parserES5ComputedPropertyName9.ts(2,9): error TS4031: Public property '[e]' of exported class has or is using private name 'Type'. + + +-==== parserES5ComputedPropertyName9.ts (6 errors) ==== ++==== parserES5ComputedPropertyName9.ts (5 errors) ==== + class C { + [e]: Type + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff new file mode 100644 index 0000000000000..6307138903598 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty3.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,20 +6,17 @@ + } + /// [Errors] //// + + parserES5SymbolProperty3.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. +-parserES5SymbolProperty3.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserES5SymbolProperty3.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + parserES5SymbolProperty3.ts(2,6): error TS4100: Public method '[Symbol.unscopables]' of exported class has or is using private name 'Symbol'. + + +-==== parserES5SymbolProperty3.ts (4 errors) ==== ++==== parserES5SymbolProperty3.ts (3 errors) ==== + declare class C { + [Symbol.unscopables](): string; + ~~~~~~~~~~~~~~~~~~~~ + !!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. +- ~~~~~~~~~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ + !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ + !!! error TS4100: Public method '[Symbol.unscopables]' of exported class has or is using private name 'Symbol'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff new file mode 100644 index 0000000000000..396217b340c56 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,20 +6,17 @@ + } + /// [Errors] //// + + parserES5SymbolProperty4.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-parserES5SymbolProperty4.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserES5SymbolProperty4.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + parserES5SymbolProperty4.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. + + +-==== parserES5SymbolProperty4.ts (4 errors) ==== ++==== parserES5SymbolProperty4.ts (3 errors) ==== + declare class C { + [Symbol.isRegExp]: string; + ~~~~~~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~~~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ + !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ + !!! error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff new file mode 100644 index 0000000000000..a49775338162d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,20 +6,17 @@ + } + /// [Errors] //// + + parserES5SymbolProperty5.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-parserES5SymbolProperty5.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserES5SymbolProperty5.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + parserES5SymbolProperty5.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. + + +-==== parserES5SymbolProperty5.ts (4 errors) ==== ++==== parserES5SymbolProperty5.ts (3 errors) ==== + class C { + [Symbol.isRegExp]: string; + ~~~~~~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~~~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ + !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ + !!! error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff new file mode 100644 index 0000000000000..aa0d41299177a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,20 +6,17 @@ + } + /// [Errors] //// + + parserES5SymbolProperty6.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-parserES5SymbolProperty6.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + parserES5SymbolProperty6.ts(2,6): error TS4031: Public property '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. + + +-==== parserES5SymbolProperty6.ts (4 errors) ==== ++==== parserES5SymbolProperty6.ts (3 errors) ==== + class C { + [Symbol.toStringTag]: string = ""; + ~~~~~~~~~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~~~~~~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ + !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ + !!! error TS4031: Public property '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff new file mode 100644 index 0000000000000..a101938f625d7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff @@ -0,0 +1,27 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty7.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,18 +5,15 @@ + [Symbol.toStringTag](): void; + } + /// [Errors] //// + +-parserES5SymbolProperty7.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserES5SymbolProperty7.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + parserES5SymbolProperty7.ts(2,6): error TS4100: Public method '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. + + +-==== parserES5SymbolProperty7.ts (3 errors) ==== ++==== parserES5SymbolProperty7.ts (2 errors) ==== + class C { + [Symbol.toStringTag](): void { } +- ~~~~~~~~~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ + !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ + !!! error TS4100: Public method '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserSymbolIndexer5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserSymbolIndexer5.d.ts.diff new file mode 100644 index 0000000000000..2e2085c77bc98 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserSymbolIndexer5.d.ts.diff @@ -0,0 +1,41 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,12 +3,12 @@ + //// [/.src/parserSymbolIndexer5.d.ts] + declare var x: invalid; + /// [Errors] //// + +-parserSymbolIndexer5.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserSymbolIndexer5.ts(2,6): error TS2304: Cannot find name 's'. + parserSymbolIndexer5.ts(2,7): error TS1005: ']' expected. + parserSymbolIndexer5.ts(2,9): error TS2552: Cannot find name 'symbol'. Did you mean 'Symbol'? ++parserSymbolIndexer5.ts(2,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserSymbolIndexer5.ts(2,15): error TS1005: ',' expected. + parserSymbolIndexer5.ts(2,16): error TS1136: Property assignment expected. + parserSymbolIndexer5.ts(2,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserSymbolIndexer5.ts(3,1): error TS1005: ':' expected. +@@ -16,17 +16,17 @@ + + ==== parserSymbolIndexer5.ts (8 errors) ==== + var x = { + [s: symbol]: "" +- ~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 's'. + ~ + !!! error TS1005: ']' expected. + ~~~~~~ + !!! error TS2552: Cannot find name 'symbol'. Did you mean 'Symbol'? + !!! related TS2728 lib.es2015.symbol.d.ts:--:--: 'Symbol' is declared here. ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1005: ',' expected. + ~ + !!! error TS1136: Property assignment expected. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/privateIndexer2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/privateIndexer2.d.ts.diff new file mode 100644 index 0000000000000..8d9f06fcb3300 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/privateIndexer2.d.ts.diff @@ -0,0 +1,37 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,11 +6,11 @@ + private []: string; + }; + /// [Errors] //// + +-privateIndexer2.ts(4,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + privateIndexer2.ts(4,15): error TS1005: ']' expected. + privateIndexer2.ts(4,17): error TS2693: 'string' only refers to a type, but is being used as a value here. ++privateIndexer2.ts(4,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + privateIndexer2.ts(4,23): error TS1005: ',' expected. + privateIndexer2.ts(4,24): error TS1136: Property assignment expected. + privateIndexer2.ts(4,26): error TS2693: 'string' only refers to a type, but is being used as a value here. + privateIndexer2.ts(4,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +@@ -21,14 +21,14 @@ + // private indexers not allowed + + var x = { + private [x: string]: string; +- ~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1005: ']' expected. + ~~~~~~ + !!! error TS2693: 'string' only refers to a type, but is being used as a value here. ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1005: ',' expected. + ~ + !!! error TS1136: Property assignment expected. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff new file mode 100644 index 0000000000000..a60a8e2de6e3c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff @@ -0,0 +1,39 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -111,9 +111,8 @@ + staticPropertyNameConflicts.ts(272,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. + staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. + staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. +-staticPropertyNameConflicts.ts(284,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + staticPropertyNameConflicts.ts(289,12): error TS1319: A default export can only be used in an ECMAScript-style module. + staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prototype'. + staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. + staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. +@@ -137,9 +136,9 @@ + staticPropertyNameConflicts.ts(346,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== staticPropertyNameConflicts.ts (85 errors) ==== ++==== staticPropertyNameConflicts.ts (84 errors) ==== + const FunctionPropertyNames = { + name: 'name', + length: 'length', + prototype: 'prototype', +@@ -544,10 +543,8 @@ + export class ExportedStaticPrototype { + static [FunctionPropertyNames.prototype]: number; // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. +- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.prototype]: string; // ok + } + + module TestOnDefaultExportedClass_6 { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff new file mode 100644 index 0000000000000..2d303feb3fdb8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff @@ -0,0 +1,39 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -71,9 +71,8 @@ + staticPropertyNameConflicts.ts(272,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. + staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. + staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. +-staticPropertyNameConflicts.ts(284,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + staticPropertyNameConflicts.ts(289,12): error TS1319: A default export can only be used in an ECMAScript-style module. + staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prototype'. + staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. + staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. +@@ -89,9 +88,9 @@ + staticPropertyNameConflicts.ts(346,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== staticPropertyNameConflicts.ts (37 errors) ==== ++==== staticPropertyNameConflicts.ts (36 errors) ==== + const FunctionPropertyNames = { + name: 'name', + length: 'length', + prototype: 'prototype', +@@ -416,10 +415,8 @@ + export class ExportedStaticPrototype { + static [FunctionPropertyNames.prototype]: number; // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. +- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.prototype]: string; // ok + } + + module TestOnDefaultExportedClass_6 { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff new file mode 100644 index 0000000000000..29875a41eb50f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff @@ -0,0 +1,28 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/Symbols/symbolProperty1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,19 +4,16 @@ + declare var s: symbol; + declare var x: invalid; + /// [Errors] //// + +-symbolProperty1.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + symbolProperty1.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + symbolProperty1.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== symbolProperty1.ts (3 errors) ==== ++==== symbolProperty1.ts (2 errors) ==== + var s: symbol; + var x = { + [s]: 0, +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [s]() { }, + ~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + get [s]() { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff new file mode 100644 index 0000000000000..4e6fc4a099a54 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff @@ -0,0 +1,30 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/Symbols/symbolProperty2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,21 +5,18 @@ + declare var x: invalid; + /// [Errors] //// + + symbolProperty2.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-symbolProperty2.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + symbolProperty2.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + symbolProperty2.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== symbolProperty2.ts (4 errors) ==== ++==== symbolProperty2.ts (3 errors) ==== + var s = Symbol(); + ~~~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x = { + [s]: 0, +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [s]() { }, + ~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + get [s]() { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff new file mode 100644 index 0000000000000..fd3e6acc48be5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff @@ -0,0 +1,34 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/Symbols/symbolProperty3.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,25 +6,22 @@ + /// [Errors] //// + + symbolProperty3.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + symbolProperty3.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +-symbolProperty3.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + symbolProperty3.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + symbolProperty3.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + symbolProperty3.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + symbolProperty3.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== symbolProperty3.ts (7 errors) ==== ++==== symbolProperty3.ts (6 errors) ==== + var s = Symbol; + ~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x = { + [s]: 0, + ~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +- ~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [s]() { }, + ~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment36.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment36.d.ts.diff new file mode 100644 index 0000000000000..46d0a214a71c1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment36.d.ts.diff @@ -0,0 +1,38 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -12,14 +12,13 @@ + typeFromPropertyAssignment36.ts(32,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + typeFromPropertyAssignment36.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + typeFromPropertyAssignment36.ts(34,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + typeFromPropertyAssignment36.ts(42,3): error TS2565: Property 'q' is used before being assigned. +-typeFromPropertyAssignment36.ts(59,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-typeFromPropertyAssignment36.ts(59,7): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++typeFromPropertyAssignment36.ts(59,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + typeFromPropertyAssignment36.ts(64,3): error TS2565: Property 'expando' is used before being assigned. + + +-==== typeFromPropertyAssignment36.ts (9 errors) ==== ++==== typeFromPropertyAssignment36.ts (8 errors) ==== + function f(b: boolean) { + ~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function d() { +@@ -89,12 +88,10 @@ + d.r + + // test function expressions too + const g = function() { +- ~ ++ ~~~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +- ~ +-!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + } + if (!!false) { + g.expando = 1 + } 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..a24d26b7bc32b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives11.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/typeReferenceDirectives11.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,9 +6,8 @@ + //// [/mod2.d.ts] + export declare const bar: invalid; + /// [Errors] //// + +-/mod1.ts(1,24): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. + /mod2.ts(2,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + + ==== /mod2.ts (1 errors) ==== +@@ -19,9 +18,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 TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. + +\ No newline at end of file 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..a376176699557 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives2.d.ts.diff @@ -0,0 +1,27 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/typeReferenceDirectives2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,18 +3,4 @@ + //// [/app.d.ts] + interface A { + x: $; + } +-/// [Errors] //// +- +-/app.ts(2,8): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. +- +- +-==== /app.ts (1 errors) ==== +- interface A { +- x: $ +- ~ +-!!! error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. +- } +-==== /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/typeReferenceDirectives8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives8.d.ts.diff new file mode 100644 index 0000000000000..c05ca29b0a016 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives8.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/typeReferenceDirectives8.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,9 +6,8 @@ + //// [/mod2.d.ts] + export declare const bar: invalid; + /// [Errors] //// + +-/mod1.ts(1,24): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. + /mod2.ts(2,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + + ==== /mod2.ts (1 errors) ==== +@@ -18,9 +17,7 @@ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ==== /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 TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. + +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts new file mode 100644 index 0000000000000..260beb4d2b96e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts] //// + +//// [FunctionDeclaration8_es6.ts] +var v = { [yield]: foo } + +/// [Declarations] //// + + + +//// [/.src/FunctionDeclaration8_es6.d.ts] +declare var v: invalid; +/// [Errors] //// + +FunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'yield'. +FunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. +FunctionDeclaration8_es6.ts(1,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== FunctionDeclaration8_es6.ts (3 errors) ==== + var v = { [yield]: foo } + ~~~~~ +!!! error TS2304: Cannot find name 'yield'. + ~~~ +!!! error TS2304: Cannot find name 'foo'. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts new file mode 100644 index 0000000000000..676925cca1071 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts] //// + +//// [asyncFunctionDeclaration8_es2017.ts] +var v = { [await]: foo } + +/// [Declarations] //// + + + +//// [/.src/asyncFunctionDeclaration8_es2017.d.ts] +declare var v: invalid; +/// [Errors] //// + +asyncFunctionDeclaration8_es2017.ts(1,12): error TS2304: Cannot find name 'await'. +asyncFunctionDeclaration8_es2017.ts(1,20): error TS2304: Cannot find name 'foo'. +asyncFunctionDeclaration8_es2017.ts(1,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== asyncFunctionDeclaration8_es2017.ts (3 errors) ==== + var v = { [await]: foo } + ~~~~~ +!!! error TS2304: Cannot find name 'await'. + ~~~ +!!! error TS2304: Cannot find name 'foo'. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts new file mode 100644 index 0000000000000..839add0c7232a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts] //// + +//// [asyncFunctionDeclaration8_es5.ts] +var v = { [await]: foo } + +/// [Declarations] //// + + + +//// [/.src/asyncFunctionDeclaration8_es5.d.ts] +declare var v: invalid; +/// [Errors] //// + +asyncFunctionDeclaration8_es5.ts(1,12): error TS2304: Cannot find name 'await'. +asyncFunctionDeclaration8_es5.ts(1,20): error TS2304: Cannot find name 'foo'. +asyncFunctionDeclaration8_es5.ts(1,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== asyncFunctionDeclaration8_es5.ts (3 errors) ==== + var v = { [await]: foo } + ~~~~~ +!!! error TS2304: Cannot find name 'await'. + ~~~ +!!! error TS2304: Cannot find name 'foo'. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts new file mode 100644 index 0000000000000..1bf61db13d338 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts] //// + +//// [asyncFunctionDeclaration8_es6.ts] +var v = { [await]: foo } + +/// [Declarations] //// + + + +//// [/.src/asyncFunctionDeclaration8_es6.d.ts] +declare var v: invalid; +/// [Errors] //// + +asyncFunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'await'. +asyncFunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. +asyncFunctionDeclaration8_es6.ts(1,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== asyncFunctionDeclaration8_es6.ts (3 errors) ==== + var v = { [await]: foo } + ~~~~~ +!!! error TS2304: Cannot find name 'await'. + ~~~ +!!! error TS2304: Cannot find name 'foo'. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts new file mode 100644 index 0000000000000..66d1e64b65c0e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts @@ -0,0 +1,84 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts] //// + +//// [computedPropertyNames12_ES5.ts] +var s: string; +var n: number; +var a: any; +class C { + [s]: number; + [n] = n; + static [s + s]: string; + [s + n] = 2; + [+s]: typeof s; + static [""]: number; + [0]: number; + [a]: number; + static [true]: number; + [`hello bye`] = 0; + static [`hello ${a} bye`] = 0 +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames12_ES5.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare class C { + [s]: number; + [n]: invalid; + static [""]: number; + [0]: number; + [a]: number; + [`hello bye`]: number; +} +/// [Errors] //// + +computedPropertyNames12_ES5.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES5.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES5.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames12_ES5.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES5.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES5.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES5.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + + +==== computedPropertyNames12_ES5.ts (9 errors) ==== + var s: string; + var n: number; + var a: any; + class C { + [s]: number; + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [n] = n; + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static [s + s]: string; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [s + n] = 2; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [+s]: typeof s; + ~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + static [""]: number; + [0]: number; + [a]: number; + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + static [true]: number; + ~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [`hello bye`] = 0; + static [`hello ${a} bye`] = 0 + ~~~~~~~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts new file mode 100644 index 0000000000000..f17cdfb6784b2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts @@ -0,0 +1,84 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts] //// + +//// [computedPropertyNames12_ES6.ts] +var s: string; +var n: number; +var a: any; +class C { + [s]: number; + [n] = n; + static [s + s]: string; + [s + n] = 2; + [+s]: typeof s; + static [""]: number; + [0]: number; + [a]: number; + static [true]: number; + [`hello bye`] = 0; + static [`hello ${a} bye`] = 0 +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames12_ES6.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare class C { + [s]: number; + [n]: invalid; + static [""]: number; + [0]: number; + [a]: number; + [`hello bye`]: number; +} +/// [Errors] //// + +computedPropertyNames12_ES6.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES6.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES6.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames12_ES6.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES6.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES6.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES6.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + + +==== computedPropertyNames12_ES6.ts (9 errors) ==== + var s: string; + var n: number; + var a: any; + class C { + [s]: number; + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [n] = n; + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static [s + s]: string; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [s + n] = 2; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [+s]: typeof s; + ~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + static [""]: number; + [0]: number; + [a]: number; + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + static [true]: number; + ~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [`hello bye`] = 0; + static [`hello ${a} bye`] = 0 + ~~~~~~~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts new file mode 100644 index 0000000000000..3107062aa3b9f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts @@ -0,0 +1,75 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES5.ts] //// + +//// [computedPropertyNames16_ES5.ts] +var s: string; +var n: number; +var a: any; +class C { + get [s]() { return 0;} + set [n](v) { } + static get [s + s]() { return 0; } + set [s + n](v) { } + get [+s]() { return 0; } + static set [""](v) { } + get [0]() { return 0; } + set [a](v) { } + static get [true]() { return 0; } + set [`hello bye`](v) { } + get [`hello ${a} bye`]() { return 0; } +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames16_ES5.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare class C { + get [s](): invalid; + set [n](v: invalid); + static set [""](v: invalid); + get [0](): invalid; + set [a](v: invalid); + set [`hello bye`](v: invalid); +} +/// [Errors] //// + +computedPropertyNames16_ES5.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES5.ts(6,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES5.ts(10,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES5.ts(11,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES5.ts(12,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES5.ts(14,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNames16_ES5.ts (6 errors) ==== + var s: string; + var n: number; + var a: any; + class C { + get [s]() { return 0;} + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set [n](v) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get [s + s]() { return 0; } + set [s + n](v) { } + get [+s]() { return 0; } + static set [""](v) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + get [0]() { return 0; } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set [a](v) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get [true]() { return 0; } + set [`hello bye`](v) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + get [`hello ${a} bye`]() { return 0; } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts new file mode 100644 index 0000000000000..adf8ca3866ff0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts @@ -0,0 +1,75 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES6.ts] //// + +//// [computedPropertyNames16_ES6.ts] +var s: string; +var n: number; +var a: any; +class C { + get [s]() { return 0;} + set [n](v) { } + static get [s + s]() { return 0; } + set [s + n](v) { } + get [+s]() { return 0; } + static set [""](v) { } + get [0]() { return 0; } + set [a](v) { } + static get [true]() { return 0; } + set [`hello bye`](v) { } + get [`hello ${a} bye`]() { return 0; } +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames16_ES6.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare class C { + get [s](): invalid; + set [n](v: invalid); + static set [""](v: invalid); + get [0](): invalid; + set [a](v: invalid); + set [`hello bye`](v: invalid); +} +/// [Errors] //// + +computedPropertyNames16_ES6.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES6.ts(6,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES6.ts(10,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES6.ts(11,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES6.ts(12,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES6.ts(14,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNames16_ES6.ts (6 errors) ==== + var s: string; + var n: number; + var a: any; + class C { + get [s]() { return 0;} + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set [n](v) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get [s + s]() { return 0; } + set [s + n](v) { } + get [+s]() { return 0; } + static set [""](v) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + get [0]() { return 0; } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set [a](v) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get [true]() { return 0; } + set [`hello bye`](v) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + get [`hello ${a} bye`]() { return 0; } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts new file mode 100644 index 0000000000000..7ac9b72c9b02f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts @@ -0,0 +1,68 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES5.ts] //// + +//// [computedPropertyNames2_ES5.ts] +var methodName = "method"; +var accessorName = "accessor"; +class C { + [methodName]() { } + static [methodName]() { } + get [accessorName]() { } + set [accessorName](v) { } + static get [accessorName]() { } + static set [accessorName](v) { } +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames2_ES5.d.ts] +declare var methodName: string; +declare var accessorName: string; +declare class C { + [methodName](): invalid; + static [methodName](): invalid; + get [accessorName](): invalid; + set [accessorName](v: invalid); + static get [accessorName](): invalid; + static set [accessorName](v: invalid); +} +/// [Errors] //// + +computedPropertyNames2_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES5.ts(5,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES5.ts(6,9): error TS2378: A 'get' accessor must return a value. +computedPropertyNames2_ES5.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES5.ts(7,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES5.ts(8,16): error TS2378: A 'get' accessor must return a value. +computedPropertyNames2_ES5.ts(8,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES5.ts(9,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNames2_ES5.ts (8 errors) ==== + var methodName = "method"; + var accessorName = "accessor"; + class C { + [methodName]() { } + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static [methodName]() { } + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + get [accessorName]() { } + ~~~~~~~~~~~~~~ +!!! error TS2378: A 'get' accessor must return a value. + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set [accessorName](v) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get [accessorName]() { } + ~~~~~~~~~~~~~~ +!!! error TS2378: A 'get' accessor must return a value. + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static set [accessorName](v) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts new file mode 100644 index 0000000000000..c7296c516453e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts @@ -0,0 +1,68 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES6.ts] //// + +//// [computedPropertyNames2_ES6.ts] +var methodName = "method"; +var accessorName = "accessor"; +class C { + [methodName]() { } + static [methodName]() { } + get [accessorName]() { } + set [accessorName](v) { } + static get [accessorName]() { } + static set [accessorName](v) { } +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames2_ES6.d.ts] +declare var methodName: string; +declare var accessorName: string; +declare class C { + [methodName](): invalid; + static [methodName](): invalid; + get [accessorName](): invalid; + set [accessorName](v: invalid); + static get [accessorName](): invalid; + static set [accessorName](v: invalid); +} +/// [Errors] //// + +computedPropertyNames2_ES6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES6.ts(5,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES6.ts(6,9): error TS2378: A 'get' accessor must return a value. +computedPropertyNames2_ES6.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES6.ts(7,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES6.ts(8,16): error TS2378: A 'get' accessor must return a value. +computedPropertyNames2_ES6.ts(8,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES6.ts(9,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNames2_ES6.ts (8 errors) ==== + var methodName = "method"; + var accessorName = "accessor"; + class C { + [methodName]() { } + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static [methodName]() { } + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + get [accessorName]() { } + ~~~~~~~~~~~~~~ +!!! error TS2378: A 'get' accessor must return a value. + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set [accessorName](v) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get [accessorName]() { } + ~~~~~~~~~~~~~~ +!!! error TS2378: A 'get' accessor must return a value. + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static set [accessorName](v) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts new file mode 100644 index 0000000000000..f012a062193b5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts @@ -0,0 +1,68 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES5.ts] //// + +//// [computedPropertyNames4_ES5.ts] +var s: string; +var n: number; +var a: any; +var v = { + [s]: 0, + [n]: n, + [s + s]: 1, + [s + n]: 2, + [+s]: s, + [""]: 0, + [0]: 0, + [a]: 1, + [true]: 0, + [`hello bye`]: 0, + [`hello ${a} bye`]: 0 +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames4_ES5.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare var v: invalid; +/// [Errors] //// + +computedPropertyNames4_ES5.ts(6,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES5.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES5.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES5.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES5.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNames4_ES5.ts (6 errors) ==== + var s: string; + var n: number; + var a: any; + var v = { + [s]: 0, + [n]: n, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [s + s]: 1, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [s + n]: 2, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [+s]: s, + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [""]: 0, + [0]: 0, + [a]: 1, + [true]: 0, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [`hello bye`]: 0, + [`hello ${a} bye`]: 0 + ~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts new file mode 100644 index 0000000000000..7e2215ce13905 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts @@ -0,0 +1,68 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES6.ts] //// + +//// [computedPropertyNames4_ES6.ts] +var s: string; +var n: number; +var a: any; +var v = { + [s]: 0, + [n]: n, + [s + s]: 1, + [s + n]: 2, + [+s]: s, + [""]: 0, + [0]: 0, + [a]: 1, + [true]: 0, + [`hello bye`]: 0, + [`hello ${a} bye`]: 0 +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames4_ES6.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare var v: invalid; +/// [Errors] //// + +computedPropertyNames4_ES6.ts(6,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES6.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES6.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES6.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES6.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNames4_ES6.ts (6 errors) ==== + var s: string; + var n: number; + var a: any; + var v = { + [s]: 0, + [n]: n, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [s + s]: 1, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [s + n]: 2, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [+s]: s, + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [""]: 0, + [0]: 0, + [a]: 1, + [true]: 0, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [`hello bye`]: 0, + [`hello ${a} bye`]: 0 + ~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts new file mode 100644 index 0000000000000..0e90f9ef725da --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts @@ -0,0 +1,61 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES5.ts] //// + +//// [computedPropertyNames5_ES5.ts] +var b: boolean; +var v = { + [b]: 0, + [true]: 1, + [[]]: 0, + [{}]: 0, + [undefined]: undefined, + [null]: null +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames5_ES5.d.ts] +declare var b: boolean; +declare var v: invalid; +/// [Errors] //// + +computedPropertyNames5_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES5.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES5.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES5.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNames5_ES5.ts (9 errors) ==== + var b: boolean; + var v = { + [b]: 0, + ~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [true]: 1, + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [[]]: 0, + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [{}]: 0, + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [undefined]: undefined, + ~~~~~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [null]: null + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts new file mode 100644 index 0000000000000..9176f569daa3a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts @@ -0,0 +1,61 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES6.ts] //// + +//// [computedPropertyNames5_ES6.ts] +var b: boolean; +var v = { + [b]: 0, + [true]: 1, + [[]]: 0, + [{}]: 0, + [undefined]: undefined, + [null]: null +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames5_ES6.d.ts] +declare var b: boolean; +declare var v: invalid; +/// [Errors] //// + +computedPropertyNames5_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES6.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES6.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES6.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNames5_ES6.ts (9 errors) ==== + var b: boolean; + var v = { + [b]: 0, + ~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [true]: 1, + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [[]]: 0, + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [{}]: 0, + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [undefined]: undefined, + ~~~~~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [null]: null + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts new file mode 100644 index 0000000000000..e314912d00bc3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts @@ -0,0 +1,58 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts] //// + +//// [computedPropertyNamesWithStaticProperty.ts] +class C { + static staticProp = 10; + get [C.staticProp]() { + return "hello"; + } + set [C.staticProp](x: string) { + var y = x; + } + [C.staticProp]() { } +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNamesWithStaticProperty.d.ts] +declare class C { + static staticProp: number; + get [C.staticProp](): invalid; + set [C.staticProp](x: string); + [C.staticProp](): invalid; +} +/// [Errors] //// + +computedPropertyNamesWithStaticProperty.ts(3,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesWithStaticProperty.ts(3,10): error TS2449: Class 'C' used before its declaration. +computedPropertyNamesWithStaticProperty.ts(6,10): error TS2449: Class 'C' used before its declaration. +computedPropertyNamesWithStaticProperty.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesWithStaticProperty.ts(9,6): error TS2449: Class 'C' used before its declaration. + + +==== computedPropertyNamesWithStaticProperty.ts (5 errors) ==== + class C { + static staticProp = 10; + get [C.staticProp]() { + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2449: Class 'C' used before its declaration. +!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:1:7: 'C' is declared here. + return "hello"; + } + set [C.staticProp](x: string) { + ~ +!!! error TS2449: Class 'C' used before its declaration. +!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:1:7: 'C' is declared here. + var y = x; + } + [C.staticProp]() { } + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2449: Class 'C' used before its declaration. +!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:1:7: 'C' is declared here. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/contextualReturnTypeOfIIFE2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/contextualReturnTypeOfIIFE2.d.ts new file mode 100644 index 0000000000000..6013ccfb69221 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/contextualReturnTypeOfIIFE2.d.ts @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/contextualReturnTypeOfIIFE2.ts] //// + +//// [contextualReturnTypeOfIIFE2.ts] +declare namespace app { + function foo(): void; +} + +app.foo.bar = (function () { + const someFun = (arg: number) => {}; + return { someFun }; +})(); + +app.foo.bar.someFun(1); + + +/// [Declarations] //// + + + +//// [/.src/contextualReturnTypeOfIIFE2.d.ts] +declare namespace app { + function foo(): void; +} diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts new file mode 100644 index 0000000000000..404d567455bb9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts @@ -0,0 +1,64 @@ +//// [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) { + 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] //// + + + +//// [/.src/child1.d.ts] +import { ParentThing } from './parent'; +declare module './parent' { + interface ParentThing { + add: (a: number, b: number) => number; + } +} +export declare function child1(prototype: ParentThing): invalid; + +//// [/.src/parent.d.ts] +export declare class ParentThing implements ParentThing { +} +/// [Errors] //// + +child1.ts(9,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== child1.ts (1 errors) ==== + import { ParentThing } from './parent'; + + declare module './parent' { + interface ParentThing { + add: (a: number, b: number) => number; + } + } + + export function child1(prototype: ParentThing) { + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + prototype.add = (a: number, b: number) => a + b; + } + +==== parent.ts (0 errors) ==== + 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); \ 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..ed4a0733aefe1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitHasTypesRefOnNamespaceUse.d.ts @@ -0,0 +1,22 @@ +//// [tests/cases/compiler/declarationEmitHasTypesRefOnNamespaceUse.ts] //// + +//// [/src/index.ts] +class Src implements NS.Dep { } + +//// [/deps/dep/dep.d.ts] +declare namespace NS { + interface Dep { + } +} +//// [/deps/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/declarationEmitLateBoundAssignments2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitLateBoundAssignments2.d.ts new file mode 100644 index 0000000000000..5dacb5b3957db --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitLateBoundAssignments2.d.ts @@ -0,0 +1,290 @@ +//// [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() {} +decl["B"] = 'foo' + +export function decl2() {} +decl2[c] = 0 + +export function decl3() {} +decl3[77] = 0 + +export function decl4() {} +decl4[num] = 0 + +export function decl5() {} +decl5["101"] = 0 + +export function decl6() {} +decl6[numStr] = 0 + +export function decl7() {} +decl7["qwe rty"] = 0 + +export function decl8() {} +decl8[withWhitespace] = 0 + +export function decl9() {} +decl9["🤪"] = 0 + +export function decl10() {} +decl10[emoji] = 0 + +export const arrow = () => {} +arrow["B"] = 'bar' + +export const arrow2 = () => {} +arrow2[c] = 100 + +export const arrow3 = () => {} +arrow3[77] = 0 + +export const arrow4 = () => {} +arrow4[num] = 0 + +export const arrow5 = () => {} +arrow5["101"] = 0 + +export const arrow6 = () => {} +arrow6[numStr] = 0 + +export const arrow7 = () => {} +arrow7["qwe rty"] = 0 + +export const arrow8 = () => {} +arrow8[withWhitespace] = 0 + +export const arrow9 = () => {} +arrow9["🤪"] = 0 + +export const arrow10 = () => {} +arrow10[emoji] = 0 + + +/// [Declarations] //// + + + +//// [/.src/declarationEmitLateBoundAssignments2.d.ts] +export declare function decl(): invalid; +export declare function decl2(): invalid; +export declare function decl3(): invalid; +export declare function decl4(): invalid; +export declare function decl5(): invalid; +export declare function decl6(): invalid; +export declare function decl7(): invalid; +export declare function decl8(): invalid; +export declare function decl9(): invalid; +export declare function decl10(): invalid; +export declare const arrow: invalid; +export declare const arrow2: invalid; +export declare const arrow3: invalid; +export declare const arrow4: invalid; +export declare const arrow5: invalid; +export declare const arrow6: invalid; +export declare const arrow7: invalid; +export declare const arrow8: invalid; +export declare const arrow9: invalid; +export declare const arrow10: invalid; +/// [Errors] //// + +declarationEmitLateBoundAssignments2.ts(9,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(9,17): error TS9009: 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(12,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(12,17): error TS9009: 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(15,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(15,17): error TS9009: 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(18,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(18,17): error TS9009: 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(21,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(21,17): error TS9009: 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(24,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(24,17): error TS9009: 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(27,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(27,17): error TS9009: 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(30,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(30,17): error TS9009: 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(33,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(33,17): error TS9009: 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(36,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(36,17): error TS9009: 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(39,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(39,14): error TS9009: 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(42,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(42,14): error TS9009: 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(45,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(45,14): error TS9009: 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(48,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(48,14): error TS9009: 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(51,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(51,14): error TS9009: 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(54,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(54,14): error TS9009: 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(57,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(57,14): error TS9009: 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(60,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(60,14): error TS9009: 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(63,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(63,14): error TS9009: 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(66,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(66,14): error TS9009: 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 (40 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() {} + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl["B"] = 'foo' + + export function decl2() {} + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl2[c] = 0 + + export function decl3() {} + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl3[77] = 0 + + export function decl4() {} + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl4[num] = 0 + + export function decl5() {} + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl5["101"] = 0 + + export function decl6() {} + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl6[numStr] = 0 + + export function decl7() {} + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl7["qwe rty"] = 0 + + export function decl8() {} + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl8[withWhitespace] = 0 + + export function decl9() {} + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl9["🤪"] = 0 + + export function decl10() {} + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl10[emoji] = 0 + + export const arrow = () => {} + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow["B"] = 'bar' + + export const arrow2 = () => {} + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow2[c] = 100 + + export const arrow3 = () => {} + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow3[77] = 0 + + export const arrow4 = () => {} + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow4[num] = 0 + + export const arrow5 = () => {} + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow5["101"] = 0 + + export const arrow6 = () => {} + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow6[numStr] = 0 + + export const arrow7 = () => {} + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow7["qwe rty"] = 0 + + export const arrow8 = () => {} + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow8[withWhitespace] = 0 + + export const arrow9 = () => {} + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow9["🤪"] = 0 + + export const arrow10 = () => {} + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow10[emoji] = 0 + \ 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..433a0b2932a6c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationFilesWithTypeReferences2.d.ts @@ -0,0 +1,18 @@ +//// [tests/cases/compiler/declarationFilesWithTypeReferences2.ts] //// + +//// [/node_modules/@types/node/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/decoratorsOnComputedProperties.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts new file mode 100644 index 0000000000000..ebdda87813fc6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts @@ -0,0 +1,709 @@ +//// [tests/cases/compiler/decoratorsOnComputedProperties.ts] //// + +//// [decoratorsOnComputedProperties.ts] +function x(o: object, k: PropertyKey) { } +let i = 0; +function foo(): string { return ++i + ""; } + +const fieldNameA: string = "fieldName1"; +const fieldNameB: string = "fieldName2"; +const fieldNameC: string = "fieldName3"; + +class A { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + @x [foo()]: any; + @x [foo()]: any = null; + [fieldNameA]: any; + @x [fieldNameB]: any; + @x [fieldNameC]: any = null; +} + +void class B { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + @x [foo()]: any; + @x [foo()]: any = null; + [fieldNameA]: any; + @x [fieldNameB]: any; + @x [fieldNameC]: any = null; +}; + +class C { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + @x [foo()]: any; + @x [foo()]: any = null; + [fieldNameA]: any; + @x [fieldNameB]: any; + @x [fieldNameC]: any = null; + ["some" + "method"]() {} +} + +void class D { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + @x [foo()]: any; + @x [foo()]: any = null; + [fieldNameA]: any; + @x [fieldNameB]: any; + @x [fieldNameC]: any = null; + ["some" + "method"]() {} +}; + +class E { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + @x [foo()]: any; + @x [foo()]: any = null; + ["some" + "method"]() {} + [fieldNameA]: any; + @x [fieldNameB]: any; + @x [fieldNameC]: any = null; +} + +void class F { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + @x [foo()]: any; + @x [foo()]: any = null; + ["some" + "method"]() {} + [fieldNameA]: any; + @x [fieldNameB]: any; + @x [fieldNameC]: any = null; +}; + +class G { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + @x [foo()]: any; + @x [foo()]: any = null; + ["some" + "method"]() {} + [fieldNameA]: any; + @x [fieldNameB]: any; + ["some" + "method2"]() {} + @x [fieldNameC]: any = null; +} + +void class H { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + @x [foo()]: any; + @x [foo()]: any = null; + ["some" + "method"]() {} + [fieldNameA]: any; + @x [fieldNameB]: any; + ["some" + "method2"]() {} + @x [fieldNameC]: any = null; +}; + +class I { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + @x [foo()]: any; + @x [foo()]: any = null; + @x ["some" + "method"]() {} + [fieldNameA]: any; + @x [fieldNameB]: any; + ["some" + "method2"]() {} + @x [fieldNameC]: any = null; +} + +void class J { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + @x [foo()]: any; + @x [foo()]: any = null; + @x ["some" + "method"]() {} + [fieldNameA]: any; + @x [fieldNameB]: any; + ["some" + "method2"]() {} + @x [fieldNameC]: any = null; +}; + +/// [Declarations] //// + + + +//// [/.src/decoratorsOnComputedProperties.d.ts] +declare function x(o: object, k: PropertyKey): invalid; +declare let i: number; +declare function foo(): string; +declare const fieldNameA: string; +declare const fieldNameB: string; +declare const fieldNameC: string; +declare class A { + ["property"]: any; + [Symbol.toStringTag]: any; + ["property2"]: any; + [Symbol.iterator]: any; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any; + [Symbol.match]: any; + [fieldNameA]: any; + [fieldNameB]: any; + [fieldNameC]: any; +} +declare class C { + ["property"]: any; + [Symbol.toStringTag]: any; + ["property2"]: any; + [Symbol.iterator]: any; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any; + [Symbol.match]: any; + [fieldNameA]: any; + [fieldNameB]: any; + [fieldNameC]: any; +} +declare class E { + ["property"]: any; + [Symbol.toStringTag]: any; + ["property2"]: any; + [Symbol.iterator]: any; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any; + [Symbol.match]: any; + [fieldNameA]: any; + [fieldNameB]: any; + [fieldNameC]: any; +} +declare class G { + ["property"]: any; + [Symbol.toStringTag]: any; + ["property2"]: any; + [Symbol.iterator]: any; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any; + [Symbol.match]: any; + [fieldNameA]: any; + [fieldNameB]: any; + [fieldNameC]: any; +} +declare class I { + ["property"]: any; + [Symbol.toStringTag]: any; + ["property2"]: any; + [Symbol.iterator]: any; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any; + [Symbol.match]: any; + [fieldNameA]: any; + [fieldNameB]: any; + [fieldNameC]: any; +} +/// [Errors] //// + +decoratorsOnComputedProperties.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(18,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(19,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(20,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(21,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(22,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(23,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(27,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(28,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(29,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(30,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(35,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(36,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(37,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(38,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(39,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(40,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(52,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(53,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(54,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(55,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(56,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(57,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(62,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(63,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(64,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(65,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(70,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(71,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(72,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(73,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(74,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(75,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(88,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(89,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(90,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(92,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(93,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(94,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(98,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(99,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(100,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(101,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(106,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(107,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(108,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(110,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(111,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(112,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(124,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(125,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(126,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(128,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(129,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(131,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(135,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(136,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(137,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(138,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(143,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(144,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(145,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(147,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(148,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(150,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(162,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(163,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(164,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(166,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(167,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(169,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(173,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(174,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(175,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(176,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(181,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(182,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(183,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(184,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(185,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(186,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid here. + + +==== decoratorsOnComputedProperties.ts (82 errors) ==== + function x(o: object, k: PropertyKey) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + let i = 0; + function foo(): string { return ++i + ""; } + + const fieldNameA: string = "fieldName1"; + const fieldNameB: string = "fieldName2"; + const fieldNameC: string = "fieldName3"; + + class A { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any = null; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [fieldNameA]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [fieldNameB]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [fieldNameC]: any = null; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + } + + void class B { + @x ["property"]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [Symbol.toStringTag]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x ["property2"]: any = 2; + ~ +!!! error TS1206: Decorators are not valid here. + @x [Symbol.iterator]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [foo()]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + [fieldNameA]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [fieldNameB]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [fieldNameC]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + }; + + class C { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any = null; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [fieldNameA]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [fieldNameB]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [fieldNameC]: any = null; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ["some" + "method"]() {} + } + + void class D { + @x ["property"]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [Symbol.toStringTag]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x ["property2"]: any = 2; + ~ +!!! error TS1206: Decorators are not valid here. + @x [Symbol.iterator]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [foo()]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + [fieldNameA]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [fieldNameB]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [fieldNameC]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + ["some" + "method"]() {} + }; + + class E { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any = null; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ["some" + "method"]() {} + [fieldNameA]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [fieldNameB]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [fieldNameC]: any = null; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + } + + void class F { + @x ["property"]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [Symbol.toStringTag]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x ["property2"]: any = 2; + ~ +!!! error TS1206: Decorators are not valid here. + @x [Symbol.iterator]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [foo()]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + ["some" + "method"]() {} + [fieldNameA]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [fieldNameB]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [fieldNameC]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + }; + + class G { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any = null; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ["some" + "method"]() {} + [fieldNameA]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [fieldNameB]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ["some" + "method2"]() {} + @x [fieldNameC]: any = null; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + } + + void class H { + @x ["property"]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [Symbol.toStringTag]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x ["property2"]: any = 2; + ~ +!!! error TS1206: Decorators are not valid here. + @x [Symbol.iterator]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [foo()]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + ["some" + "method"]() {} + [fieldNameA]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [fieldNameB]: any; + ~ +!!! error TS1206: Decorators are not valid here. + ["some" + "method2"]() {} + @x [fieldNameC]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + }; + + class I { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any = null; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x ["some" + "method"]() {} + [fieldNameA]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [fieldNameB]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ["some" + "method2"]() {} + @x [fieldNameC]: any = null; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + } + + void class J { + @x ["property"]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [Symbol.toStringTag]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x ["property2"]: any = 2; + ~ +!!! error TS1206: Decorators are not valid here. + @x [Symbol.iterator]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [foo()]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + @x ["some" + "method"]() {} + ~ +!!! error TS1206: Decorators are not valid here. + [fieldNameA]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [fieldNameB]: any; + ~ +!!! error TS1206: Decorators are not valid here. + ["some" + "method2"]() {} + @x [fieldNameC]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/expandoFunctionExpressionsWithDynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/expandoFunctionExpressionsWithDynamicNames.d.ts new file mode 100644 index 0000000000000..6d485974419e5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/expandoFunctionExpressionsWithDynamicNames.d.ts @@ -0,0 +1,48 @@ +//// [tests/cases/compiler/expandoFunctionExpressionsWithDynamicNames.ts] //// + +//// [expandoFunctionExpressionsWithDynamicNames.ts] +// https://github.com/microsoft/TypeScript/issues/54809 + +const s = "X"; + +export const expr = () => {} +expr[s] = 0 + +export const expr2 = function () {} +expr2[s] = 0 + + +/// [Declarations] //// + + + +//// [/.src/expandoFunctionExpressionsWithDynamicNames.d.ts] +export declare const expr: invalid; +export declare const expr2: invalid; +/// [Errors] //// + +expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionExpressionsWithDynamicNames.ts(8,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +expandoFunctionExpressionsWithDynamicNames.ts(8,14): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== expandoFunctionExpressionsWithDynamicNames.ts (4 errors) ==== + // https://github.com/microsoft/TypeScript/issues/54809 + + const s = "X"; + + export const expr = () => {} + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + expr[s] = 0 + + export const expr2 = function () {} + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + expr2[s] = 0 + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/indexTypeNoSubstitutionTemplateLiteral.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/indexTypeNoSubstitutionTemplateLiteral.d.ts new file mode 100644 index 0000000000000..9f4f0a6f4970a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/indexTypeNoSubstitutionTemplateLiteral.d.ts @@ -0,0 +1,31 @@ +//// [tests/cases/compiler/indexTypeNoSubstitutionTemplateLiteral.ts] //// + +//// [indexTypeNoSubstitutionTemplateLiteral.ts] +function Foo() {} +Foo[`b`] = function () {}; + +type Test = keyof typeof Foo; + + + +/// [Declarations] //// + + + +//// [/.src/indexTypeNoSubstitutionTemplateLiteral.d.ts] +declare function Foo(): invalid; +type Test = keyof typeof Foo; +/// [Errors] //// + +indexTypeNoSubstitutionTemplateLiteral.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== indexTypeNoSubstitutionTemplateLiteral.ts (1 errors) ==== + function Foo() {} + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Foo[`b`] = function () {}; + + type Test = keyof typeof Foo; + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/indexWithoutParamType2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/indexWithoutParamType2.d.ts new file mode 100644 index 0000000000000..dc800b94230ed --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/indexWithoutParamType2.d.ts @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/indexWithoutParamType2.ts] //// + +//// [indexWithoutParamType2.ts] +class C { + // Used to be indexer, now it is a computed property + [x]: string +} + +/// [Declarations] //// + + + +//// [/.src/indexWithoutParamType2.d.ts] +declare class C { + [x]: string; +} +/// [Errors] //// + +indexWithoutParamType2.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +indexWithoutParamType2.ts(3,6): error TS2304: Cannot find name 'x'. +indexWithoutParamType2.ts(3,6): error TS4031: Public property '[x]' of exported class has or is using private name 'x'. + + +==== indexWithoutParamType2.ts (3 errors) ==== + class C { + // Used to be indexer, now it is a computed property + [x]: string + ~~~ +!!! 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 'x'. + ~ +!!! error TS4031: Public property '[x]' of exported class has or is using private name 'x'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/moduleResolutionWithSuffixes_one_externalTSModule.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/moduleResolutionWithSuffixes_one_externalTSModule.d.ts new file mode 100644 index 0000000000000..f8d6a006cb2fd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/moduleResolutionWithSuffixes_one_externalTSModule.d.ts @@ -0,0 +1,16 @@ +//// [tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts] //// + +//// [/test.ts] +import { ios } from "some-library"; + +//// [/node_modules/some-library/index.ios.ts] +export function ios() {} +//// [/node_modules/some-library/index.ts] +export function base() {} + +/// [Declarations] //// + + + +//// [/bin/test.d.ts] +export {}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName1.d.ts new file mode 100644 index 0000000000000..795ef02c60524 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName1.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName1.ts] //// + +//// [parserComputedPropertyName1.ts] +var v = { [e] }; + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName1.d.ts] +declare var v: invalid; +/// [Errors] //// + +parserComputedPropertyName1.ts(1,12): error TS2304: Cannot find name 'e'. +parserComputedPropertyName1.ts(1,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName1.ts(1,15): error TS1005: ':' expected. + + +==== parserComputedPropertyName1.ts (3 errors) ==== + var v = { [e] }; + ~ +!!! error TS2304: Cannot find name 'e'. + +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ':' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName10.d.ts new file mode 100644 index 0000000000000..3656e5bd57130 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName10.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts] //// + +//// [parserComputedPropertyName10.ts] +class C { + [e] = 1 +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName10.d.ts] +declare class C { + [e]: number; +} +/// [Errors] //// + +parserComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. +parserComputedPropertyName10.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +==== parserComputedPropertyName10.ts (3 errors) ==== + class C { + [e] = 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 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName22.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName22.d.ts new file mode 100644 index 0000000000000..155c3ae13a741 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName22.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts] //// + +//// [parserComputedPropertyName22.ts] +declare class C { + [e]: number +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName22.d.ts] +declare class C { + [e]: number; +} +/// [Errors] //// + +parserComputedPropertyName22.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName22.ts(2,6): error TS2304: Cannot find name 'e'. +parserComputedPropertyName22.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +==== parserComputedPropertyName22.ts (3 errors) ==== + declare class C { + [e]: number + ~~~ +!!! 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 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName23.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName23.d.ts new file mode 100644 index 0000000000000..644f57251d4df --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName23.d.ts @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts] //// + +//// [parserComputedPropertyName23.ts] +declare class C { + get [e](): number +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName23.d.ts] +declare class C { + get [e](): number; +} +/// [Errors] //// + +parserComputedPropertyName23.ts(2,10): error TS2304: Cannot find name 'e'. +parserComputedPropertyName23.ts(2,10): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +==== parserComputedPropertyName23.ts (2 errors) ==== + declare class C { + get [e](): number + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts new file mode 100644 index 0000000000000..c0677aaf17105 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts] //// + +//// [parserComputedPropertyName24.ts] +class C { + set [e](v) { } +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName24.d.ts] +declare class C { + set [e](v: invalid); +} +/// [Errors] //// + +parserComputedPropertyName24.ts(2,10): error TS2304: Cannot find name 'e'. +parserComputedPropertyName24.ts(2,10): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. +parserComputedPropertyName24.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== parserComputedPropertyName24.ts (3 errors) ==== + class C { + set [e](v) { } + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts new file mode 100644 index 0000000000000..275cc9780dfb2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts] //// + +//// [parserComputedPropertyName25.ts] +class C { + // No ASI + [e] = 0 + [e2] = 1 +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName25.d.ts] +declare class C { + [e]: invalid; +} +/// [Errors] //// + +parserComputedPropertyName25.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName25.ts(3,6): error TS2304: Cannot find name 'e'. +parserComputedPropertyName25.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. +parserComputedPropertyName25.ts(3,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. + + +==== parserComputedPropertyName25.ts (5 errors) ==== + class C { + // No ASI + [e] = 0 + ~~~ +!!! 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 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + ~ + [e2] = 1 + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS2304: Cannot find name 'e2'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts new file mode 100644 index 0000000000000..deb1ed1f36787 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts @@ -0,0 +1,43 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts] //// + +//// [parserComputedPropertyName27.ts] +class C { + // No ASI + [e]: number = 0 + [e2]: number +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName27.d.ts] +declare class C { + [e]: number; + number: invalid; +} +/// [Errors] //// + +parserComputedPropertyName27.ts(3,6): error TS2304: Cannot find name 'e'. +parserComputedPropertyName27.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. +parserComputedPropertyName27.ts(4,6): error TS2304: Cannot find name 'e2'. +parserComputedPropertyName27.ts(4,9): error TS1005: ';' expected. +parserComputedPropertyName27.ts(4,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== parserComputedPropertyName27.ts (5 errors) ==== + class C { + // No ASI + [e]: number = 0 + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + [e2]: number + ~~ +!!! error TS2304: Cannot find name 'e2'. + ~ +!!! error TS1005: ';' expected. + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName28.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName28.d.ts new file mode 100644 index 0000000000000..2fb5fdbe51454 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName28.d.ts @@ -0,0 +1,44 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts] //// + +//// [parserComputedPropertyName28.ts] +class C { + [e]: number = 0; + [e2]: number +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName28.d.ts] +declare class C { + [e]: number; + [e2]: number; +} +/// [Errors] //// + +parserComputedPropertyName28.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName28.ts(2,6): error TS2304: Cannot find name 'e'. +parserComputedPropertyName28.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. +parserComputedPropertyName28.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName28.ts(3,6): error TS2304: Cannot find name 'e2'. +parserComputedPropertyName28.ts(3,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. + + +==== parserComputedPropertyName28.ts (6 errors) ==== + class C { + [e]: number = 0; + ~~~ +!!! 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 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + [e2]: number + ~~~~ +!!! 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 'e2'. + ~~ +!!! error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts new file mode 100644 index 0000000000000..6ad198212886e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts @@ -0,0 +1,52 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts] //// + +//// [parserComputedPropertyName29.ts] +class C { + // yes ASI + [e] = id++ + [e2]: number +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName29.d.ts] +declare class C { + [e]: invalid; + [e2]: number; +} +/// [Errors] //// + +parserComputedPropertyName29.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName29.ts(3,6): error TS2304: Cannot find name 'e'. +parserComputedPropertyName29.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. +parserComputedPropertyName29.ts(3,11): error TS2304: Cannot find name 'id'. +parserComputedPropertyName29.ts(3,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName29.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName29.ts(4,6): error TS2304: Cannot find name 'e2'. +parserComputedPropertyName29.ts(4,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. + + +==== parserComputedPropertyName29.ts (8 errors) ==== + class C { + // yes ASI + [e] = id++ + ~~~ +!!! 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 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + ~~ +!!! error TS2304: Cannot find name 'id'. + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [e2]: number + ~~~~ +!!! 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 'e2'. + ~~ +!!! error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName31.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName31.d.ts new file mode 100644 index 0000000000000..3810d06c386f8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName31.d.ts @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts] //// + +//// [parserComputedPropertyName31.ts] +class C { + // yes ASI + [e]: number + [e2]: number +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName31.d.ts] +declare class C { + [e]: number; + [e2]: number; +} +/// [Errors] //// + +parserComputedPropertyName31.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName31.ts(3,6): error TS2304: Cannot find name 'e'. +parserComputedPropertyName31.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. +parserComputedPropertyName31.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName31.ts(4,6): error TS2304: Cannot find name 'e2'. +parserComputedPropertyName31.ts(4,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. + + +==== parserComputedPropertyName31.ts (6 errors) ==== + class C { + // yes ASI + [e]: number + ~~~ +!!! 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 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + [e2]: number + ~~~~ +!!! 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 'e2'. + ~~ +!!! error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName32.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName32.d.ts new file mode 100644 index 0000000000000..e61cbddecce45 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName32.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts] //// + +//// [parserComputedPropertyName32.ts] +declare class C { + [e](): number +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName32.d.ts] +declare class C { + [e](): number; +} +/// [Errors] //// + +parserComputedPropertyName32.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. +parserComputedPropertyName32.ts(2,6): error TS2304: Cannot find name 'e'. +parserComputedPropertyName32.ts(2,6): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + + +==== parserComputedPropertyName32.ts (3 errors) ==== + declare class C { + [e](): number + ~~~ +!!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts new file mode 100644 index 0000000000000..98597b6684eb0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts] //// + +//// [parserComputedPropertyName33.ts] +class C { + // No ASI + [e] = 0 + [e2]() { } +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName33.d.ts] +declare class C { + [e]: invalid; +} +/// [Errors] //// + +parserComputedPropertyName33.ts(3,6): error TS2304: Cannot find name 'e'. +parserComputedPropertyName33.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. +parserComputedPropertyName33.ts(3,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName33.ts(4,6): error TS2304: Cannot find name 'e2'. +parserComputedPropertyName33.ts(4,12): error TS1005: ';' expected. +parserComputedPropertyName33.ts(5,1): error TS1128: Declaration or statement expected. + + +==== parserComputedPropertyName33.ts (6 errors) ==== + class C { + // No ASI + [e] = 0 + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + ~ + [e2]() { } + ~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS2304: Cannot find name 'e2'. + ~ +!!! error TS1005: ';' expected. + } + ~ +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName36.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName36.d.ts new file mode 100644 index 0000000000000..170566d110263 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName36.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts] //// + +//// [parserComputedPropertyName36.ts] +class C { + [public ]: string; +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName36.d.ts] +declare class C { + [public]: string; +} +/// [Errors] //// + +parserComputedPropertyName36.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName36.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. +parserComputedPropertyName36.ts(2,6): error TS2304: Cannot find name 'public'. +parserComputedPropertyName36.ts(2,6): error TS4031: Public property '[public ]' of exported class has or is using private name 'public'. + + +==== parserComputedPropertyName36.ts (4 errors) ==== + class C { + [public ]: string; + ~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~ +!!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. + ~~~~~~ +!!! error TS2304: Cannot find name 'public'. + ~~~~~~ +!!! error TS4031: Public property '[public ]' of exported class has or is using private name 'public'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts new file mode 100644 index 0000000000000..1508e152aa265 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts] //// + +//// [parserComputedPropertyName6.ts] +var v = { [e]: 1, [e + e]: 2 }; + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName6.d.ts] +declare var v: invalid; +/// [Errors] //// + +parserComputedPropertyName6.ts(1,12): error TS2304: Cannot find name 'e'. +parserComputedPropertyName6.ts(1,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName6.ts(1,20): error TS2304: Cannot find name 'e'. +parserComputedPropertyName6.ts(1,24): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName6.ts (4 errors) ==== + var v = { [e]: 1, [e + e]: 2 }; + ~ +!!! error TS2304: Cannot find name 'e'. + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName9.d.ts new file mode 100644 index 0000000000000..c43a5df90a15d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName9.d.ts @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts] //// + +//// [parserComputedPropertyName9.ts] +class C { + [e]: Type +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName9.d.ts] +declare class C { + [e]: Type; +} +/// [Errors] //// + +parserComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. +parserComputedPropertyName9.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. +parserComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. +parserComputedPropertyName9.ts(2,9): error TS4031: Public property '[e]' of exported class has or is using private name 'Type'. + + +==== parserComputedPropertyName9.ts (5 errors) ==== + class C { + [e]: Type + ~~~ +!!! 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 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + ~~~~ +!!! error TS2304: Cannot find name 'Type'. + ~~~~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'Type'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName1.d.ts new file mode 100644 index 0000000000000..8dba4d62c282a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName1.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts] //// + +//// [parserES5ComputedPropertyName1.ts] +declare class C { + [e]: number +} + +/// [Declarations] //// + + + +//// [/.src/parserES5ComputedPropertyName1.d.ts] +declare class C { + [e]: number; +} +/// [Errors] //// + +parserES5ComputedPropertyName1.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserES5ComputedPropertyName1.ts(2,6): error TS2304: Cannot find name 'e'. +parserES5ComputedPropertyName1.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +==== parserES5ComputedPropertyName1.ts (3 errors) ==== + declare class C { + [e]: number + ~~~ +!!! 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 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName10.d.ts new file mode 100644 index 0000000000000..a377ab468dae4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName10.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts] //// + +//// [parserES5ComputedPropertyName10.ts] +class C { + [e] = 1 +} + +/// [Declarations] //// + + + +//// [/.src/parserES5ComputedPropertyName10.d.ts] +declare class C { + [e]: number; +} +/// [Errors] //// + +parserES5ComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserES5ComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. +parserES5ComputedPropertyName10.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +==== parserES5ComputedPropertyName10.ts (3 errors) ==== + class C { + [e] = 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 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName9.d.ts new file mode 100644 index 0000000000000..0a2126d87a7eb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName9.d.ts @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts] //// + +//// [parserES5ComputedPropertyName9.ts] +class C { + [e]: Type +} + +/// [Declarations] //// + + + +//// [/.src/parserES5ComputedPropertyName9.d.ts] +declare class C { + [e]: Type; +} +/// [Errors] //// + +parserES5ComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserES5ComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. +parserES5ComputedPropertyName9.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. +parserES5ComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. +parserES5ComputedPropertyName9.ts(2,9): error TS4031: Public property '[e]' of exported class has or is using private name 'Type'. + + +==== parserES5ComputedPropertyName9.ts (5 errors) ==== + class C { + [e]: Type + ~~~ +!!! 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 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + ~~~~ +!!! error TS2304: Cannot find name 'Type'. + ~~~~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'Type'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty3.d.ts new file mode 100644 index 0000000000000..3a7c70cee73bb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty3.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty3.ts] //// + +//// [parserES5SymbolProperty3.ts] +declare class C { + [Symbol.unscopables](): string; +} + +/// [Declarations] //// + + + +//// [/.src/parserES5SymbolProperty3.d.ts] +declare class C { + [Symbol.unscopables](): string; +} +/// [Errors] //// + +parserES5SymbolProperty3.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. +parserES5SymbolProperty3.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +parserES5SymbolProperty3.ts(2,6): error TS4100: Public method '[Symbol.unscopables]' of exported class has or is using private name 'Symbol'. + + +==== parserES5SymbolProperty3.ts (3 errors) ==== + declare class C { + [Symbol.unscopables](): string; + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ +!!! error TS4100: Public method '[Symbol.unscopables]' of exported class has or is using private name 'Symbol'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts new file mode 100644 index 0000000000000..43bd1a4f3a793 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts] //// + +//// [parserES5SymbolProperty4.ts] +declare class C { + [Symbol.isRegExp]: string; +} + +/// [Declarations] //// + + + +//// [/.src/parserES5SymbolProperty4.d.ts] +declare class C { + [Symbol.isRegExp]: string; +} +/// [Errors] //// + +parserES5SymbolProperty4.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserES5SymbolProperty4.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +parserES5SymbolProperty4.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. + + +==== parserES5SymbolProperty4.ts (3 errors) ==== + declare class C { + [Symbol.isRegExp]: string; + ~~~~~~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ +!!! error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty5.d.ts new file mode 100644 index 0000000000000..ac8b6ae5c3d17 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty5.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty5.ts] //// + +//// [parserES5SymbolProperty5.ts] +class C { + [Symbol.isRegExp]: string; +} + +/// [Declarations] //// + + + +//// [/.src/parserES5SymbolProperty5.d.ts] +declare class C { + [Symbol.isRegExp]: string; +} +/// [Errors] //// + +parserES5SymbolProperty5.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserES5SymbolProperty5.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +parserES5SymbolProperty5.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. + + +==== parserES5SymbolProperty5.ts (3 errors) ==== + class C { + [Symbol.isRegExp]: string; + ~~~~~~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ +!!! error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty6.d.ts new file mode 100644 index 0000000000000..e79c424bfcefb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty6.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty6.ts] //// + +//// [parserES5SymbolProperty6.ts] +class C { + [Symbol.toStringTag]: string = ""; +} + +/// [Declarations] //// + + + +//// [/.src/parserES5SymbolProperty6.d.ts] +declare class C { + [Symbol.toStringTag]: string; +} +/// [Errors] //// + +parserES5SymbolProperty6.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +parserES5SymbolProperty6.ts(2,6): error TS4031: Public property '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. + + +==== parserES5SymbolProperty6.ts (3 errors) ==== + class C { + [Symbol.toStringTag]: string = ""; + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ +!!! error TS4031: Public property '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty7.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty7.d.ts new file mode 100644 index 0000000000000..07374e16ec4fa --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty7.d.ts @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty7.ts] //// + +//// [parserES5SymbolProperty7.ts] +class C { + [Symbol.toStringTag](): void { } +} + +/// [Declarations] //// + + + +//// [/.src/parserES5SymbolProperty7.d.ts] +declare class C { + [Symbol.toStringTag](): void; +} +/// [Errors] //// + +parserES5SymbolProperty7.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +parserES5SymbolProperty7.ts(2,6): error TS4100: Public method '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. + + +==== parserES5SymbolProperty7.ts (2 errors) ==== + class C { + [Symbol.toStringTag](): void { } + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ +!!! error TS4100: Public method '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserSymbolIndexer5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserSymbolIndexer5.d.ts new file mode 100644 index 0000000000000..1a8619c41af40 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserSymbolIndexer5.d.ts @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts] //// + +//// [parserSymbolIndexer5.ts] +var x = { + [s: symbol]: "" +} + +/// [Declarations] //// + + + +//// [/.src/parserSymbolIndexer5.d.ts] +declare var x: invalid; +/// [Errors] //// + +parserSymbolIndexer5.ts(2,6): error TS2304: Cannot find name 's'. +parserSymbolIndexer5.ts(2,7): error TS1005: ']' expected. +parserSymbolIndexer5.ts(2,9): error TS2552: Cannot find name 'symbol'. Did you mean 'Symbol'? +parserSymbolIndexer5.ts(2,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserSymbolIndexer5.ts(2,15): error TS1005: ',' expected. +parserSymbolIndexer5.ts(2,16): error TS1136: Property assignment expected. +parserSymbolIndexer5.ts(2,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserSymbolIndexer5.ts(3,1): error TS1005: ':' expected. + + +==== parserSymbolIndexer5.ts (8 errors) ==== + var x = { + [s: symbol]: "" + ~ +!!! error TS2304: Cannot find name 's'. + ~ +!!! error TS1005: ']' expected. + ~~~~~~ +!!! error TS2552: Cannot find name 'symbol'. Did you mean 'Symbol'? +!!! related TS2728 lib.es2015.symbol.d.ts:--:--: 'Symbol' is declared here. + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1136: Property assignment expected. + +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + ~ +!!! error TS1005: ':' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/privateIndexer2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/privateIndexer2.d.ts new file mode 100644 index 0000000000000..679692faacea6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/privateIndexer2.d.ts @@ -0,0 +1,60 @@ +//// [tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts] //// + +//// [privateIndexer2.ts] +// private indexers not allowed + +var x = { + private [x: string]: string; +} + +var y: { + private[x: string]: string; +} + +/// [Declarations] //// + + + +//// [/.src/privateIndexer2.d.ts] +declare var x: invalid; +declare var y: { + private []: string; +}; +/// [Errors] //// + +privateIndexer2.ts(4,15): error TS1005: ']' expected. +privateIndexer2.ts(4,17): error TS2693: 'string' only refers to a type, but is being used as a value here. +privateIndexer2.ts(4,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +privateIndexer2.ts(4,23): error TS1005: ',' expected. +privateIndexer2.ts(4,24): error TS1136: Property assignment expected. +privateIndexer2.ts(4,26): error TS2693: 'string' only refers to a type, but is being used as a value here. +privateIndexer2.ts(4,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +privateIndexer2.ts(4,32): error TS1005: ',' expected. + + +==== privateIndexer2.ts (8 errors) ==== + // private indexers not allowed + + var x = { + private [x: string]: string; + ~ +!!! error TS1005: ']' expected. + ~~~~~~ +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1136: Property assignment expected. + ~~~~~~ +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + } + + var y: { + private[x: string]: string; + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts new file mode 100644 index 0000000000000..ab042bb06cd85 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts @@ -0,0 +1,1010 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts] //// + +//// [staticPropertyNameConflicts.ts] +const FunctionPropertyNames = { + name: 'name', + length: 'length', + prototype: 'prototype', + caller: 'caller', + arguments: 'arguments', +} as const; + +// name +class StaticName { + static name: number; // error without useDefineForClassFields + name: string; // ok +} + +class StaticName2 { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + [FunctionPropertyNames.name]: number; // ok +} + +class StaticNameFn { + static name() {} // error without useDefineForClassFields + name() {} // ok +} + +class StaticNameFn2 { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + [FunctionPropertyNames.name]() {} // ok +} + +// length +class StaticLength { + static length: number; // error without useDefineForClassFields + length: string; // ok +} + +class StaticLength2 { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + [FunctionPropertyNames.length]: number; // ok +} + +class StaticLengthFn { + static length() {} // error without useDefineForClassFields + length() {} // ok +} + +class StaticLengthFn2 { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + [FunctionPropertyNames.length]() {} // ok +} + +// prototype +class StaticPrototype { + static prototype: number; // always an error + prototype: string; // ok +} + +class StaticPrototype2 { + static [FunctionPropertyNames.prototype]: number; // always an error + [FunctionPropertyNames.prototype]: string; // ok +} + +class StaticPrototypeFn { + static prototype() {} // always an error + prototype() {} // ok +} + +class StaticPrototypeFn2 { + static [FunctionPropertyNames.prototype]() {} // always an error + [FunctionPropertyNames.prototype]() {} // ok +} + +// caller +class StaticCaller { + static caller: number; // error without useDefineForClassFields + caller: string; // ok +} + +class StaticCaller2 { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + [FunctionPropertyNames.caller]: string; // ok +} + +class StaticCallerFn { + static caller() {} // error without useDefineForClassFields + caller() {} // ok +} + +class StaticCallerFn2 { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + [FunctionPropertyNames.caller]() {} // ok +} + +// arguments +class StaticArguments { + static arguments: number; // error without useDefineForClassFields + arguments: string; // ok +} + +class StaticArguments2 { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + [FunctionPropertyNames.arguments]: string; // ok +} + +class StaticArgumentsFn { + static arguments() {} // error without useDefineForClassFields + arguments() {} // ok +} + +class StaticArgumentsFn2 { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + [FunctionPropertyNames.arguments]() {} // ok +} + + +// === Static properties on anonymous classes === + +// name +var StaticName_Anonymous = class { + static name: number; // error without useDefineForClassFields + name: string; // ok +} + +var StaticName_Anonymous2 = class { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + [FunctionPropertyNames.name]: string; // ok +} + +var StaticNameFn_Anonymous = class { + static name() {} // error without useDefineForClassFields + name() {} // ok +} + +var StaticNameFn_Anonymous2 = class { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + [FunctionPropertyNames.name]() {} // ok +} + +// length +var StaticLength_Anonymous = class { + static length: number; // error without useDefineForClassFields + length: string; // ok +} + +var StaticLength_Anonymous2 = class { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + [FunctionPropertyNames.length]: string; // ok +} + +var StaticLengthFn_Anonymous = class { + static length() {} // error without useDefineForClassFields + length() {} // ok +} + +var StaticLengthFn_Anonymous2 = class { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + [FunctionPropertyNames.length]() {} // ok +} + +// prototype +var StaticPrototype_Anonymous = class { + static prototype: number; // always an error + prototype: string; // ok +} + +var StaticPrototype_Anonymous2 = class { + static [FunctionPropertyNames.prototype]: number; // always an error + [FunctionPropertyNames.prototype]: string; // ok +} + +var StaticPrototypeFn_Anonymous = class { + static prototype() {} // always an error + prototype() {} // ok +} + +var StaticPrototypeFn_Anonymous2 = class { + static [FunctionPropertyNames.prototype]() {} // always an error + [FunctionPropertyNames.prototype]() {} // ok +} + +// caller +var StaticCaller_Anonymous = class { + static caller: number; // error without useDefineForClassFields + caller: string; // ok +} + +var StaticCaller_Anonymous2 = class { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + [FunctionPropertyNames.caller]: string; // ok +} + +var StaticCallerFn_Anonymous = class { + static caller() {} // error without useDefineForClassFields + caller() {} // ok +} + +var StaticCallerFn_Anonymous2 = class { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + [FunctionPropertyNames.caller]() {} // ok +} + +// arguments +var StaticArguments_Anonymous = class { + static arguments: number; // error without useDefineForClassFields + arguments: string; // ok +} + +var StaticArguments_Anonymous2 = class { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + [FunctionPropertyNames.arguments]: string; // ok +} + +var StaticArgumentsFn_Anonymous = class { + static arguments() {} // error without useDefineForClassFields + arguments() {} // ok +} + +var StaticArgumentsFn_Anonymous2 = class { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + [FunctionPropertyNames.arguments]() {} // ok +} + + +// === Static properties on default exported classes === + +// name +module TestOnDefaultExportedClass_1 { + class StaticName { + static name: number; // error without useDefineForClassFields + name: string; // ok + } +} + +export class ExportedStaticName { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + [FunctionPropertyNames.name]: string; // ok +} + +module TestOnDefaultExportedClass_2 { + class StaticNameFn { + static name() {} // error without useDefineForClassFields + name() {} // ok + } +} + +export class ExportedStaticNameFn { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + [FunctionPropertyNames.name]() {} // ok +} + +// length +module TestOnDefaultExportedClass_3 { + export default class StaticLength { + static length: number; // error without useDefineForClassFields + length: string; // ok + } +} + +export class ExportedStaticLength { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + [FunctionPropertyNames.length]: string; // ok +} + +module TestOnDefaultExportedClass_4 { + export default class StaticLengthFn { + static length() {} // error without useDefineForClassFields + length() {} // ok + } +} + +export class ExportedStaticLengthFn { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + [FunctionPropertyNames.length]() {} // ok +} + +// prototype +module TestOnDefaultExportedClass_5 { + export default class StaticPrototype { + static prototype: number; // always an error + prototype: string; // ok + } +} + +export class ExportedStaticPrototype { + static [FunctionPropertyNames.prototype]: number; // always an error + [FunctionPropertyNames.prototype]: string; // ok +} + +module TestOnDefaultExportedClass_6 { + export default class StaticPrototypeFn { + static prototype() {} // always an error + prototype() {} // ok + } +} + +export class ExportedStaticPrototypeFn { + static [FunctionPropertyNames.prototype]() {} // always an error + [FunctionPropertyNames.prototype]() {} // ok +} + +// caller +module TestOnDefaultExportedClass_7 { + export default class StaticCaller { + static caller: number; // error without useDefineForClassFields + caller: string; // ok + } +} + +export class ExportedStaticCaller { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + [FunctionPropertyNames.caller]: string; // ok +} + +module TestOnDefaultExportedClass_8 { + export default class StaticCallerFn { + static caller() {} // error without useDefineForClassFields + caller() {} // ok + } +} + +export class ExportedStaticCallerFn { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + [FunctionPropertyNames.caller]() {} // ok +} + +// arguments +module TestOnDefaultExportedClass_9 { + export default class StaticArguments { + static arguments: number; // error without useDefineForClassFields + arguments: string; // ok + } +} + +export class ExportedStaticArguments { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + [FunctionPropertyNames.arguments]: string; // ok +} + +module TestOnDefaultExportedClass_10 { + export default class StaticArgumentsFn { + static arguments() {} // error without useDefineForClassFields + arguments() {} // ok + } +} + +export class ExportedStaticArgumentsFn { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + [FunctionPropertyNames.arguments]() {} // ok +} + +/// [Declarations] //// + + + +//// [/.src/staticPropertyNameConflicts.d.ts] +declare const FunctionPropertyNames: { + readonly name: "name"; + readonly length: "length"; + readonly prototype: "prototype"; + readonly caller: "caller"; + readonly arguments: "arguments"; +}; +export declare class ExportedStaticName { + static [FunctionPropertyNames.name]: number; + [FunctionPropertyNames.name]: string; +} +export declare class ExportedStaticNameFn { + static [FunctionPropertyNames.name](): invalid; + [FunctionPropertyNames.name](): invalid; +} +export declare class ExportedStaticLength { + static [FunctionPropertyNames.length]: number; + [FunctionPropertyNames.length]: string; +} +export declare class ExportedStaticLengthFn { + static [FunctionPropertyNames.length](): invalid; + [FunctionPropertyNames.length](): invalid; +} +export declare class ExportedStaticPrototype { + static [FunctionPropertyNames.prototype]: number; + [FunctionPropertyNames.prototype]: string; +} +export declare class ExportedStaticPrototypeFn { + static [FunctionPropertyNames.prototype](): invalid; + [FunctionPropertyNames.prototype](): invalid; +} +export declare class ExportedStaticCaller { + static [FunctionPropertyNames.caller]: number; + [FunctionPropertyNames.caller]: string; +} +export declare class ExportedStaticCallerFn { + static [FunctionPropertyNames.caller](): invalid; + [FunctionPropertyNames.caller](): invalid; +} +export declare class ExportedStaticArguments { + static [FunctionPropertyNames.arguments]: number; + [FunctionPropertyNames.arguments]: string; +} +export declare class ExportedStaticArgumentsFn { + static [FunctionPropertyNames.arguments](): invalid; + [FunctionPropertyNames.arguments](): invalid; +} +export {}; +/// [Errors] //// + +staticPropertyNameConflicts.ts(11,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. +staticPropertyNameConflicts.ts(16,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName2'. +staticPropertyNameConflicts.ts(21,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. +staticPropertyNameConflicts.ts(26,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn2'. +staticPropertyNameConflicts.ts(32,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. +staticPropertyNameConflicts.ts(37,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength2'. +staticPropertyNameConflicts.ts(42,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. +staticPropertyNameConflicts.ts(47,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn2'. +staticPropertyNameConflicts.ts(53,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. +staticPropertyNameConflicts.ts(58,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype2'. +staticPropertyNameConflicts.ts(63,12): error TS2300: Duplicate identifier 'prototype'. +staticPropertyNameConflicts.ts(63,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. +staticPropertyNameConflicts.ts(68,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. +staticPropertyNameConflicts.ts(68,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn2'. +staticPropertyNameConflicts.ts(74,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. +staticPropertyNameConflicts.ts(79,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller2'. +staticPropertyNameConflicts.ts(84,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. +staticPropertyNameConflicts.ts(89,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn2'. +staticPropertyNameConflicts.ts(95,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. +staticPropertyNameConflicts.ts(100,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments2'. +staticPropertyNameConflicts.ts(105,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. +staticPropertyNameConflicts.ts(110,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn2'. +staticPropertyNameConflicts.ts(119,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName_Anonymous'. +staticPropertyNameConflicts.ts(124,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName_Anonymous2'. +staticPropertyNameConflicts.ts(129,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn_Anonymous'. +staticPropertyNameConflicts.ts(134,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn_Anonymous2'. +staticPropertyNameConflicts.ts(140,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength_Anonymous'. +staticPropertyNameConflicts.ts(145,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength_Anonymous2'. +staticPropertyNameConflicts.ts(150,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn_Anonymous'. +staticPropertyNameConflicts.ts(155,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn_Anonymous2'. +staticPropertyNameConflicts.ts(161,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous'. +staticPropertyNameConflicts.ts(166,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous2'. +staticPropertyNameConflicts.ts(171,12): error TS2300: Duplicate identifier 'prototype'. +staticPropertyNameConflicts.ts(171,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous'. +staticPropertyNameConflicts.ts(176,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. +staticPropertyNameConflicts.ts(176,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous2'. +staticPropertyNameConflicts.ts(182,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller_Anonymous'. +staticPropertyNameConflicts.ts(187,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller_Anonymous2'. +staticPropertyNameConflicts.ts(192,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn_Anonymous'. +staticPropertyNameConflicts.ts(197,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn_Anonymous2'. +staticPropertyNameConflicts.ts(203,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments_Anonymous'. +staticPropertyNameConflicts.ts(208,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments_Anonymous2'. +staticPropertyNameConflicts.ts(213,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn_Anonymous'. +staticPropertyNameConflicts.ts(218,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn_Anonymous2'. +staticPropertyNameConflicts.ts(228,16): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. +staticPropertyNameConflicts.ts(234,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticName'. +staticPropertyNameConflicts.ts(240,16): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. +staticPropertyNameConflicts.ts(246,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticNameFn'. +staticPropertyNameConflicts.ts(246,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(247,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(252,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(253,16): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. +staticPropertyNameConflicts.ts(259,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLength'. +staticPropertyNameConflicts.ts(264,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(265,16): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. +staticPropertyNameConflicts.ts(271,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLengthFn'. +staticPropertyNameConflicts.ts(271,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(272,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. +staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. +staticPropertyNameConflicts.ts(289,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prototype'. +staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. +staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. +staticPropertyNameConflicts.ts(296,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. +staticPropertyNameConflicts.ts(296,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(297,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(302,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(303,16): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. +staticPropertyNameConflicts.ts(309,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCaller'. +staticPropertyNameConflicts.ts(314,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(315,16): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. +staticPropertyNameConflicts.ts(321,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCallerFn'. +staticPropertyNameConflicts.ts(321,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(322,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(327,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(328,16): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. +staticPropertyNameConflicts.ts(334,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArguments'. +staticPropertyNameConflicts.ts(339,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(340,16): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. +staticPropertyNameConflicts.ts(346,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArgumentsFn'. +staticPropertyNameConflicts.ts(346,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== staticPropertyNameConflicts.ts (84 errors) ==== + const FunctionPropertyNames = { + name: 'name', + length: 'length', + prototype: 'prototype', + caller: 'caller', + arguments: 'arguments', + } as const; + + // name + class StaticName { + static name: number; // error without useDefineForClassFields + ~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. + name: string; // ok + } + + class StaticName2 { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName2'. + [FunctionPropertyNames.name]: number; // ok + } + + class StaticNameFn { + static name() {} // error without useDefineForClassFields + ~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. + name() {} // ok + } + + class StaticNameFn2 { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn2'. + [FunctionPropertyNames.name]() {} // ok + } + + // length + class StaticLength { + static length: number; // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. + length: string; // ok + } + + class StaticLength2 { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength2'. + [FunctionPropertyNames.length]: number; // ok + } + + class StaticLengthFn { + static length() {} // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. + length() {} // ok + } + + class StaticLengthFn2 { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn2'. + [FunctionPropertyNames.length]() {} // ok + } + + // prototype + class StaticPrototype { + static prototype: number; // always an error + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. + prototype: string; // ok + } + + class StaticPrototype2 { + static [FunctionPropertyNames.prototype]: number; // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype2'. + [FunctionPropertyNames.prototype]: string; // ok + } + + class StaticPrototypeFn { + static prototype() {} // always an error + ~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'prototype'. + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. + prototype() {} // ok + } + + class StaticPrototypeFn2 { + static [FunctionPropertyNames.prototype]() {} // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn2'. + [FunctionPropertyNames.prototype]() {} // ok + } + + // caller + class StaticCaller { + static caller: number; // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. + caller: string; // ok + } + + class StaticCaller2 { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller2'. + [FunctionPropertyNames.caller]: string; // ok + } + + class StaticCallerFn { + static caller() {} // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. + caller() {} // ok + } + + class StaticCallerFn2 { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn2'. + [FunctionPropertyNames.caller]() {} // ok + } + + // arguments + class StaticArguments { + static arguments: number; // error without useDefineForClassFields + ~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. + arguments: string; // ok + } + + class StaticArguments2 { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments2'. + [FunctionPropertyNames.arguments]: string; // ok + } + + class StaticArgumentsFn { + static arguments() {} // error without useDefineForClassFields + ~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. + arguments() {} // ok + } + + class StaticArgumentsFn2 { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn2'. + [FunctionPropertyNames.arguments]() {} // ok + } + + + // === Static properties on anonymous classes === + + // name + var StaticName_Anonymous = class { + static name: number; // error without useDefineForClassFields + ~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName_Anonymous'. + name: string; // ok + } + + var StaticName_Anonymous2 = class { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName_Anonymous2'. + [FunctionPropertyNames.name]: string; // ok + } + + var StaticNameFn_Anonymous = class { + static name() {} // error without useDefineForClassFields + ~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn_Anonymous'. + name() {} // ok + } + + var StaticNameFn_Anonymous2 = class { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn_Anonymous2'. + [FunctionPropertyNames.name]() {} // ok + } + + // length + var StaticLength_Anonymous = class { + static length: number; // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength_Anonymous'. + length: string; // ok + } + + var StaticLength_Anonymous2 = class { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength_Anonymous2'. + [FunctionPropertyNames.length]: string; // ok + } + + var StaticLengthFn_Anonymous = class { + static length() {} // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn_Anonymous'. + length() {} // ok + } + + var StaticLengthFn_Anonymous2 = class { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn_Anonymous2'. + [FunctionPropertyNames.length]() {} // ok + } + + // prototype + var StaticPrototype_Anonymous = class { + static prototype: number; // always an error + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous'. + prototype: string; // ok + } + + var StaticPrototype_Anonymous2 = class { + static [FunctionPropertyNames.prototype]: number; // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous2'. + [FunctionPropertyNames.prototype]: string; // ok + } + + var StaticPrototypeFn_Anonymous = class { + static prototype() {} // always an error + ~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'prototype'. + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous'. + prototype() {} // ok + } + + var StaticPrototypeFn_Anonymous2 = class { + static [FunctionPropertyNames.prototype]() {} // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous2'. + [FunctionPropertyNames.prototype]() {} // ok + } + + // caller + var StaticCaller_Anonymous = class { + static caller: number; // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller_Anonymous'. + caller: string; // ok + } + + var StaticCaller_Anonymous2 = class { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller_Anonymous2'. + [FunctionPropertyNames.caller]: string; // ok + } + + var StaticCallerFn_Anonymous = class { + static caller() {} // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn_Anonymous'. + caller() {} // ok + } + + var StaticCallerFn_Anonymous2 = class { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn_Anonymous2'. + [FunctionPropertyNames.caller]() {} // ok + } + + // arguments + var StaticArguments_Anonymous = class { + static arguments: number; // error without useDefineForClassFields + ~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments_Anonymous'. + arguments: string; // ok + } + + var StaticArguments_Anonymous2 = class { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments_Anonymous2'. + [FunctionPropertyNames.arguments]: string; // ok + } + + var StaticArgumentsFn_Anonymous = class { + static arguments() {} // error without useDefineForClassFields + ~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn_Anonymous'. + arguments() {} // ok + } + + var StaticArgumentsFn_Anonymous2 = class { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn_Anonymous2'. + [FunctionPropertyNames.arguments]() {} // ok + } + + + // === Static properties on default exported classes === + + // name + module TestOnDefaultExportedClass_1 { + class StaticName { + static name: number; // error without useDefineForClassFields + ~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. + name: string; // ok + } + } + + export class ExportedStaticName { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticName'. + [FunctionPropertyNames.name]: string; // ok + } + + module TestOnDefaultExportedClass_2 { + class StaticNameFn { + static name() {} // error without useDefineForClassFields + ~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. + name() {} // ok + } + } + + export class ExportedStaticNameFn { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticNameFn'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.name]() {} // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // length + module TestOnDefaultExportedClass_3 { + export default class StaticLength { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static length: number; // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. + length: string; // ok + } + } + + export class ExportedStaticLength { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLength'. + [FunctionPropertyNames.length]: string; // ok + } + + module TestOnDefaultExportedClass_4 { + export default class StaticLengthFn { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static length() {} // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. + length() {} // ok + } + } + + export class ExportedStaticLengthFn { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLengthFn'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.length]() {} // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // prototype + module TestOnDefaultExportedClass_5 { + export default class StaticPrototype { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static prototype: number; // always an error + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. + prototype: string; // ok + } + } + + export class ExportedStaticPrototype { + static [FunctionPropertyNames.prototype]: number; // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. + [FunctionPropertyNames.prototype]: string; // ok + } + + module TestOnDefaultExportedClass_6 { + export default class StaticPrototypeFn { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static prototype() {} // always an error + ~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'prototype'. + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. + prototype() {} // ok + } + } + + export class ExportedStaticPrototypeFn { + static [FunctionPropertyNames.prototype]() {} // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.prototype]() {} // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // caller + module TestOnDefaultExportedClass_7 { + export default class StaticCaller { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static caller: number; // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. + caller: string; // ok + } + } + + export class ExportedStaticCaller { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCaller'. + [FunctionPropertyNames.caller]: string; // ok + } + + module TestOnDefaultExportedClass_8 { + export default class StaticCallerFn { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static caller() {} // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. + caller() {} // ok + } + } + + export class ExportedStaticCallerFn { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCallerFn'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.caller]() {} // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // arguments + module TestOnDefaultExportedClass_9 { + export default class StaticArguments { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static arguments: number; // error without useDefineForClassFields + ~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. + arguments: string; // ok + } + } + + export class ExportedStaticArguments { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArguments'. + [FunctionPropertyNames.arguments]: string; // ok + } + + module TestOnDefaultExportedClass_10 { + export default class StaticArgumentsFn { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static arguments() {} // error without useDefineForClassFields + ~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. + arguments() {} // ok + } + } + + export class ExportedStaticArgumentsFn { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArgumentsFn'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.arguments]() {} // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts new file mode 100644 index 0000000000000..4d7d5053a4f54 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts @@ -0,0 +1,866 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts] //// + +//// [staticPropertyNameConflicts.ts] +const FunctionPropertyNames = { + name: 'name', + length: 'length', + prototype: 'prototype', + caller: 'caller', + arguments: 'arguments', +} as const; + +// name +class StaticName { + static name: number; // error without useDefineForClassFields + name: string; // ok +} + +class StaticName2 { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + [FunctionPropertyNames.name]: number; // ok +} + +class StaticNameFn { + static name() {} // error without useDefineForClassFields + name() {} // ok +} + +class StaticNameFn2 { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + [FunctionPropertyNames.name]() {} // ok +} + +// length +class StaticLength { + static length: number; // error without useDefineForClassFields + length: string; // ok +} + +class StaticLength2 { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + [FunctionPropertyNames.length]: number; // ok +} + +class StaticLengthFn { + static length() {} // error without useDefineForClassFields + length() {} // ok +} + +class StaticLengthFn2 { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + [FunctionPropertyNames.length]() {} // ok +} + +// prototype +class StaticPrototype { + static prototype: number; // always an error + prototype: string; // ok +} + +class StaticPrototype2 { + static [FunctionPropertyNames.prototype]: number; // always an error + [FunctionPropertyNames.prototype]: string; // ok +} + +class StaticPrototypeFn { + static prototype() {} // always an error + prototype() {} // ok +} + +class StaticPrototypeFn2 { + static [FunctionPropertyNames.prototype]() {} // always an error + [FunctionPropertyNames.prototype]() {} // ok +} + +// caller +class StaticCaller { + static caller: number; // error without useDefineForClassFields + caller: string; // ok +} + +class StaticCaller2 { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + [FunctionPropertyNames.caller]: string; // ok +} + +class StaticCallerFn { + static caller() {} // error without useDefineForClassFields + caller() {} // ok +} + +class StaticCallerFn2 { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + [FunctionPropertyNames.caller]() {} // ok +} + +// arguments +class StaticArguments { + static arguments: number; // error without useDefineForClassFields + arguments: string; // ok +} + +class StaticArguments2 { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + [FunctionPropertyNames.arguments]: string; // ok +} + +class StaticArgumentsFn { + static arguments() {} // error without useDefineForClassFields + arguments() {} // ok +} + +class StaticArgumentsFn2 { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + [FunctionPropertyNames.arguments]() {} // ok +} + + +// === Static properties on anonymous classes === + +// name +var StaticName_Anonymous = class { + static name: number; // error without useDefineForClassFields + name: string; // ok +} + +var StaticName_Anonymous2 = class { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + [FunctionPropertyNames.name]: string; // ok +} + +var StaticNameFn_Anonymous = class { + static name() {} // error without useDefineForClassFields + name() {} // ok +} + +var StaticNameFn_Anonymous2 = class { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + [FunctionPropertyNames.name]() {} // ok +} + +// length +var StaticLength_Anonymous = class { + static length: number; // error without useDefineForClassFields + length: string; // ok +} + +var StaticLength_Anonymous2 = class { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + [FunctionPropertyNames.length]: string; // ok +} + +var StaticLengthFn_Anonymous = class { + static length() {} // error without useDefineForClassFields + length() {} // ok +} + +var StaticLengthFn_Anonymous2 = class { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + [FunctionPropertyNames.length]() {} // ok +} + +// prototype +var StaticPrototype_Anonymous = class { + static prototype: number; // always an error + prototype: string; // ok +} + +var StaticPrototype_Anonymous2 = class { + static [FunctionPropertyNames.prototype]: number; // always an error + [FunctionPropertyNames.prototype]: string; // ok +} + +var StaticPrototypeFn_Anonymous = class { + static prototype() {} // always an error + prototype() {} // ok +} + +var StaticPrototypeFn_Anonymous2 = class { + static [FunctionPropertyNames.prototype]() {} // always an error + [FunctionPropertyNames.prototype]() {} // ok +} + +// caller +var StaticCaller_Anonymous = class { + static caller: number; // error without useDefineForClassFields + caller: string; // ok +} + +var StaticCaller_Anonymous2 = class { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + [FunctionPropertyNames.caller]: string; // ok +} + +var StaticCallerFn_Anonymous = class { + static caller() {} // error without useDefineForClassFields + caller() {} // ok +} + +var StaticCallerFn_Anonymous2 = class { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + [FunctionPropertyNames.caller]() {} // ok +} + +// arguments +var StaticArguments_Anonymous = class { + static arguments: number; // error without useDefineForClassFields + arguments: string; // ok +} + +var StaticArguments_Anonymous2 = class { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + [FunctionPropertyNames.arguments]: string; // ok +} + +var StaticArgumentsFn_Anonymous = class { + static arguments() {} // error without useDefineForClassFields + arguments() {} // ok +} + +var StaticArgumentsFn_Anonymous2 = class { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + [FunctionPropertyNames.arguments]() {} // ok +} + + +// === Static properties on default exported classes === + +// name +module TestOnDefaultExportedClass_1 { + class StaticName { + static name: number; // error without useDefineForClassFields + name: string; // ok + } +} + +export class ExportedStaticName { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + [FunctionPropertyNames.name]: string; // ok +} + +module TestOnDefaultExportedClass_2 { + class StaticNameFn { + static name() {} // error without useDefineForClassFields + name() {} // ok + } +} + +export class ExportedStaticNameFn { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + [FunctionPropertyNames.name]() {} // ok +} + +// length +module TestOnDefaultExportedClass_3 { + export default class StaticLength { + static length: number; // error without useDefineForClassFields + length: string; // ok + } +} + +export class ExportedStaticLength { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + [FunctionPropertyNames.length]: string; // ok +} + +module TestOnDefaultExportedClass_4 { + export default class StaticLengthFn { + static length() {} // error without useDefineForClassFields + length() {} // ok + } +} + +export class ExportedStaticLengthFn { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + [FunctionPropertyNames.length]() {} // ok +} + +// prototype +module TestOnDefaultExportedClass_5 { + export default class StaticPrototype { + static prototype: number; // always an error + prototype: string; // ok + } +} + +export class ExportedStaticPrototype { + static [FunctionPropertyNames.prototype]: number; // always an error + [FunctionPropertyNames.prototype]: string; // ok +} + +module TestOnDefaultExportedClass_6 { + export default class StaticPrototypeFn { + static prototype() {} // always an error + prototype() {} // ok + } +} + +export class ExportedStaticPrototypeFn { + static [FunctionPropertyNames.prototype]() {} // always an error + [FunctionPropertyNames.prototype]() {} // ok +} + +// caller +module TestOnDefaultExportedClass_7 { + export default class StaticCaller { + static caller: number; // error without useDefineForClassFields + caller: string; // ok + } +} + +export class ExportedStaticCaller { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + [FunctionPropertyNames.caller]: string; // ok +} + +module TestOnDefaultExportedClass_8 { + export default class StaticCallerFn { + static caller() {} // error without useDefineForClassFields + caller() {} // ok + } +} + +export class ExportedStaticCallerFn { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + [FunctionPropertyNames.caller]() {} // ok +} + +// arguments +module TestOnDefaultExportedClass_9 { + export default class StaticArguments { + static arguments: number; // error without useDefineForClassFields + arguments: string; // ok + } +} + +export class ExportedStaticArguments { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + [FunctionPropertyNames.arguments]: string; // ok +} + +module TestOnDefaultExportedClass_10 { + export default class StaticArgumentsFn { + static arguments() {} // error without useDefineForClassFields + arguments() {} // ok + } +} + +export class ExportedStaticArgumentsFn { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + [FunctionPropertyNames.arguments]() {} // ok +} + +/// [Declarations] //// + + + +//// [/.src/staticPropertyNameConflicts.d.ts] +declare const FunctionPropertyNames: { + readonly name: "name"; + readonly length: "length"; + readonly prototype: "prototype"; + readonly caller: "caller"; + readonly arguments: "arguments"; +}; +export declare class ExportedStaticName { + static [FunctionPropertyNames.name]: number; + [FunctionPropertyNames.name]: string; +} +export declare class ExportedStaticNameFn { + static [FunctionPropertyNames.name](): invalid; + [FunctionPropertyNames.name](): invalid; +} +export declare class ExportedStaticLength { + static [FunctionPropertyNames.length]: number; + [FunctionPropertyNames.length]: string; +} +export declare class ExportedStaticLengthFn { + static [FunctionPropertyNames.length](): invalid; + [FunctionPropertyNames.length](): invalid; +} +export declare class ExportedStaticPrototype { + static [FunctionPropertyNames.prototype]: number; + [FunctionPropertyNames.prototype]: string; +} +export declare class ExportedStaticPrototypeFn { + static [FunctionPropertyNames.prototype](): invalid; + [FunctionPropertyNames.prototype](): invalid; +} +export declare class ExportedStaticCaller { + static [FunctionPropertyNames.caller]: number; + [FunctionPropertyNames.caller]: string; +} +export declare class ExportedStaticCallerFn { + static [FunctionPropertyNames.caller](): invalid; + [FunctionPropertyNames.caller](): invalid; +} +export declare class ExportedStaticArguments { + static [FunctionPropertyNames.arguments]: number; + [FunctionPropertyNames.arguments]: string; +} +export declare class ExportedStaticArgumentsFn { + static [FunctionPropertyNames.arguments](): invalid; + [FunctionPropertyNames.arguments](): invalid; +} +export {}; +/// [Errors] //// + +staticPropertyNameConflicts.ts(53,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. +staticPropertyNameConflicts.ts(58,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype2'. +staticPropertyNameConflicts.ts(63,12): error TS2300: Duplicate identifier 'prototype'. +staticPropertyNameConflicts.ts(63,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. +staticPropertyNameConflicts.ts(68,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. +staticPropertyNameConflicts.ts(68,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn2'. +staticPropertyNameConflicts.ts(161,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous'. +staticPropertyNameConflicts.ts(166,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous2'. +staticPropertyNameConflicts.ts(171,12): error TS2300: Duplicate identifier 'prototype'. +staticPropertyNameConflicts.ts(171,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous'. +staticPropertyNameConflicts.ts(176,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. +staticPropertyNameConflicts.ts(176,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous2'. +staticPropertyNameConflicts.ts(246,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(247,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(252,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(264,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(271,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(272,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. +staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. +staticPropertyNameConflicts.ts(289,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prototype'. +staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. +staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. +staticPropertyNameConflicts.ts(296,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. +staticPropertyNameConflicts.ts(296,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(297,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(302,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(314,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(321,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(322,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(327,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(339,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(346,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== staticPropertyNameConflicts.ts (36 errors) ==== + const FunctionPropertyNames = { + name: 'name', + length: 'length', + prototype: 'prototype', + caller: 'caller', + arguments: 'arguments', + } as const; + + // name + class StaticName { + static name: number; // error without useDefineForClassFields + name: string; // ok + } + + class StaticName2 { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + [FunctionPropertyNames.name]: number; // ok + } + + class StaticNameFn { + static name() {} // error without useDefineForClassFields + name() {} // ok + } + + class StaticNameFn2 { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + [FunctionPropertyNames.name]() {} // ok + } + + // length + class StaticLength { + static length: number; // error without useDefineForClassFields + length: string; // ok + } + + class StaticLength2 { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + [FunctionPropertyNames.length]: number; // ok + } + + class StaticLengthFn { + static length() {} // error without useDefineForClassFields + length() {} // ok + } + + class StaticLengthFn2 { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + [FunctionPropertyNames.length]() {} // ok + } + + // prototype + class StaticPrototype { + static prototype: number; // always an error + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. + prototype: string; // ok + } + + class StaticPrototype2 { + static [FunctionPropertyNames.prototype]: number; // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype2'. + [FunctionPropertyNames.prototype]: string; // ok + } + + class StaticPrototypeFn { + static prototype() {} // always an error + ~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'prototype'. + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. + prototype() {} // ok + } + + class StaticPrototypeFn2 { + static [FunctionPropertyNames.prototype]() {} // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn2'. + [FunctionPropertyNames.prototype]() {} // ok + } + + // caller + class StaticCaller { + static caller: number; // error without useDefineForClassFields + caller: string; // ok + } + + class StaticCaller2 { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + [FunctionPropertyNames.caller]: string; // ok + } + + class StaticCallerFn { + static caller() {} // error without useDefineForClassFields + caller() {} // ok + } + + class StaticCallerFn2 { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + [FunctionPropertyNames.caller]() {} // ok + } + + // arguments + class StaticArguments { + static arguments: number; // error without useDefineForClassFields + arguments: string; // ok + } + + class StaticArguments2 { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + [FunctionPropertyNames.arguments]: string; // ok + } + + class StaticArgumentsFn { + static arguments() {} // error without useDefineForClassFields + arguments() {} // ok + } + + class StaticArgumentsFn2 { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + [FunctionPropertyNames.arguments]() {} // ok + } + + + // === Static properties on anonymous classes === + + // name + var StaticName_Anonymous = class { + static name: number; // error without useDefineForClassFields + name: string; // ok + } + + var StaticName_Anonymous2 = class { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + [FunctionPropertyNames.name]: string; // ok + } + + var StaticNameFn_Anonymous = class { + static name() {} // error without useDefineForClassFields + name() {} // ok + } + + var StaticNameFn_Anonymous2 = class { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + [FunctionPropertyNames.name]() {} // ok + } + + // length + var StaticLength_Anonymous = class { + static length: number; // error without useDefineForClassFields + length: string; // ok + } + + var StaticLength_Anonymous2 = class { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + [FunctionPropertyNames.length]: string; // ok + } + + var StaticLengthFn_Anonymous = class { + static length() {} // error without useDefineForClassFields + length() {} // ok + } + + var StaticLengthFn_Anonymous2 = class { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + [FunctionPropertyNames.length]() {} // ok + } + + // prototype + var StaticPrototype_Anonymous = class { + static prototype: number; // always an error + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous'. + prototype: string; // ok + } + + var StaticPrototype_Anonymous2 = class { + static [FunctionPropertyNames.prototype]: number; // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous2'. + [FunctionPropertyNames.prototype]: string; // ok + } + + var StaticPrototypeFn_Anonymous = class { + static prototype() {} // always an error + ~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'prototype'. + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous'. + prototype() {} // ok + } + + var StaticPrototypeFn_Anonymous2 = class { + static [FunctionPropertyNames.prototype]() {} // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous2'. + [FunctionPropertyNames.prototype]() {} // ok + } + + // caller + var StaticCaller_Anonymous = class { + static caller: number; // error without useDefineForClassFields + caller: string; // ok + } + + var StaticCaller_Anonymous2 = class { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + [FunctionPropertyNames.caller]: string; // ok + } + + var StaticCallerFn_Anonymous = class { + static caller() {} // error without useDefineForClassFields + caller() {} // ok + } + + var StaticCallerFn_Anonymous2 = class { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + [FunctionPropertyNames.caller]() {} // ok + } + + // arguments + var StaticArguments_Anonymous = class { + static arguments: number; // error without useDefineForClassFields + arguments: string; // ok + } + + var StaticArguments_Anonymous2 = class { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + [FunctionPropertyNames.arguments]: string; // ok + } + + var StaticArgumentsFn_Anonymous = class { + static arguments() {} // error without useDefineForClassFields + arguments() {} // ok + } + + var StaticArgumentsFn_Anonymous2 = class { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + [FunctionPropertyNames.arguments]() {} // ok + } + + + // === Static properties on default exported classes === + + // name + module TestOnDefaultExportedClass_1 { + class StaticName { + static name: number; // error without useDefineForClassFields + name: string; // ok + } + } + + export class ExportedStaticName { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + [FunctionPropertyNames.name]: string; // ok + } + + module TestOnDefaultExportedClass_2 { + class StaticNameFn { + static name() {} // error without useDefineForClassFields + name() {} // ok + } + } + + export class ExportedStaticNameFn { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.name]() {} // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // length + module TestOnDefaultExportedClass_3 { + export default class StaticLength { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static length: number; // error without useDefineForClassFields + length: string; // ok + } + } + + export class ExportedStaticLength { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + [FunctionPropertyNames.length]: string; // ok + } + + module TestOnDefaultExportedClass_4 { + export default class StaticLengthFn { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static length() {} // error without useDefineForClassFields + length() {} // ok + } + } + + export class ExportedStaticLengthFn { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.length]() {} // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // prototype + module TestOnDefaultExportedClass_5 { + export default class StaticPrototype { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static prototype: number; // always an error + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. + prototype: string; // ok + } + } + + export class ExportedStaticPrototype { + static [FunctionPropertyNames.prototype]: number; // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. + [FunctionPropertyNames.prototype]: string; // ok + } + + module TestOnDefaultExportedClass_6 { + export default class StaticPrototypeFn { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static prototype() {} // always an error + ~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'prototype'. + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. + prototype() {} // ok + } + } + + export class ExportedStaticPrototypeFn { + static [FunctionPropertyNames.prototype]() {} // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.prototype]() {} // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // caller + module TestOnDefaultExportedClass_7 { + export default class StaticCaller { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static caller: number; // error without useDefineForClassFields + caller: string; // ok + } + } + + export class ExportedStaticCaller { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + [FunctionPropertyNames.caller]: string; // ok + } + + module TestOnDefaultExportedClass_8 { + export default class StaticCallerFn { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static caller() {} // error without useDefineForClassFields + caller() {} // ok + } + } + + export class ExportedStaticCallerFn { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.caller]() {} // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // arguments + module TestOnDefaultExportedClass_9 { + export default class StaticArguments { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static arguments: number; // error without useDefineForClassFields + arguments: string; // ok + } + } + + export class ExportedStaticArguments { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + [FunctionPropertyNames.arguments]: string; // ok + } + + module TestOnDefaultExportedClass_10 { + export default class StaticArgumentsFn { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static arguments() {} // error without useDefineForClassFields + arguments() {} // ok + } + } + + export class ExportedStaticArgumentsFn { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.arguments]() {} // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts new file mode 100644 index 0000000000000..8e55cbc2b421f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/es6/Symbols/symbolProperty1.ts] //// + +//// [symbolProperty1.ts] +var s: symbol; +var x = { + [s]: 0, + [s]() { }, + get [s]() { + return 0; + } +} + +/// [Declarations] //// + + + +//// [/.src/symbolProperty1.d.ts] +declare var s: symbol; +declare var x: invalid; +/// [Errors] //// + +symbolProperty1.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty1.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== symbolProperty1.ts (2 errors) ==== + var s: symbol; + var x = { + [s]: 0, + [s]() { }, + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + get [s]() { + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return 0; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts new file mode 100644 index 0000000000000..1e380ddbc08ae --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/es6/Symbols/symbolProperty2.ts] //// + +//// [symbolProperty2.ts] +var s = Symbol(); +var x = { + [s]: 0, + [s]() { }, + get [s]() { + return 0; + } +} + +/// [Declarations] //// + + + +//// [/.src/symbolProperty2.d.ts] +declare var s: invalid; +declare var x: invalid; +/// [Errors] //// + +symbolProperty2.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty2.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty2.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== symbolProperty2.ts (3 errors) ==== + var s = Symbol(); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x = { + [s]: 0, + [s]() { }, + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + get [s]() { + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return 0; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts new file mode 100644 index 0000000000000..99de56cfe897b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts @@ -0,0 +1,50 @@ +//// [tests/cases/conformance/es6/Symbols/symbolProperty3.ts] //// + +//// [symbolProperty3.ts] +var s = Symbol; +var x = { + [s]: 0, + [s]() { }, + get [s]() { + return 0; + } +} + +/// [Declarations] //// + + + +//// [/.src/symbolProperty3.d.ts] +declare var s: invalid; +declare var x: invalid; +/// [Errors] //// + +symbolProperty3.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty3.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +symbolProperty3.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +symbolProperty3.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty3.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +symbolProperty3.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== symbolProperty3.ts (6 errors) ==== + var s = Symbol; + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x = { + [s]: 0, + ~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [s]() { }, + ~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + get [s]() { + ~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return 0; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment36.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment36.d.ts new file mode 100644 index 0000000000000..0a95d3b595fd3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment36.d.ts @@ -0,0 +1,188 @@ +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts] //// + +//// [typeFromPropertyAssignment36.ts] +function f(b: boolean) { + function d() { + } + d.e = 12 + d.e + + if (b) { + d.q = false + } + // error d.q might not be assigned + d.q + if (b) { + d.q = false + } + else { + d.q = true + } + d.q + if (b) { + d.r = 1 + } + else { + d.r = 2 + } + d.r + if (b) { + d.s = 'hi' + } + return d +} +// OK to access possibly-unassigned properties outside the initialising scope +var test = f(true).s + +function d() { +} +d.e = 12 +d.e + +if (!!false) { + d.q = false +} +d.q +if (!!false) { + d.q = false +} +else { + d.q = true +} +d.q +if (!!false) { + d.r = 1 +} +else { + d.r = 2 +} +d.r + +// test function expressions too +const g = function() { +} +if (!!false) { + g.expando = 1 +} +g.expando // error + +if (!!false) { + g.both = 'hi' +} +else { + g.both = 0 +} +g.both + + +/// [Declarations] //// + + + +//// [/.src/typeFromPropertyAssignment36.d.ts] +declare function f(b: boolean): invalid; +declare var test: invalid; +declare function d(): invalid; +declare const g: invalid; +/// [Errors] //// + +typeFromPropertyAssignment36.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +typeFromPropertyAssignment36.ts(11,7): error TS2565: Property 'q' is used before being assigned. +typeFromPropertyAssignment36.ts(32,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +typeFromPropertyAssignment36.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +typeFromPropertyAssignment36.ts(34,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +typeFromPropertyAssignment36.ts(42,3): error TS2565: Property 'q' is used before being assigned. +typeFromPropertyAssignment36.ts(59,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +typeFromPropertyAssignment36.ts(64,3): error TS2565: Property 'expando' is used before being assigned. + + +==== typeFromPropertyAssignment36.ts (8 errors) ==== + function f(b: boolean) { + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function d() { + } + d.e = 12 + d.e + + if (b) { + d.q = false + } + // error d.q might not be assigned + d.q + ~ +!!! error TS2565: Property 'q' is used before being assigned. + if (b) { + d.q = false + } + else { + d.q = true + } + d.q + if (b) { + d.r = 1 + } + else { + d.r = 2 + } + d.r + if (b) { + d.s = 'hi' + } + return d + } + // OK to access possibly-unassigned properties outside the initialising scope + var test = f(true).s + ~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + function d() { + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + } + d.e = 12 + d.e + + if (!!false) { + d.q = false + } + d.q + ~ +!!! error TS2565: Property 'q' is used before being assigned. + if (!!false) { + d.q = false + } + else { + d.q = true + } + d.q + if (!!false) { + d.r = 1 + } + else { + d.r = 2 + } + d.r + + // test function expressions too + const g = function() { + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + if (!!false) { + g.expando = 1 + } + g.expando // error + ~~~~~~~ +!!! error TS2565: Property 'expando' is used before being assigned. + + if (!!false) { + g.both = 'hi' + } + else { + g.both = 0 + } + g.both + \ 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..7e7015ba222de --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives11.d.ts @@ -0,0 +1,39 @@ +//// [tests/cases/compiler/typeReferenceDirectives11.ts] //// + +//// [/mod2.ts] +import {foo} from "./mod1"; +export const bar = foo(); + +//// [/types/lib/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== /mod2.ts (1 errors) ==== + import {foo} from "./mod1"; + export const bar = foo(); + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +==== /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/typeReferenceDirectives2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives2.d.ts new file mode 100644 index 0000000000000..35dc5fbc5e32d --- /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: $ +} +//// [/types/lib/index.d.ts] +interface $ { x } + + +/// [Declarations] //// + + + +//// [/app.d.ts] +interface A { + x: $; +} 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..ffeda355de2dc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts @@ -0,0 +1,37 @@ +//// [tests/cases/compiler/typeReferenceDirectives8.ts] //// + +//// [/mod2.ts] +import {foo} from "./mod1"; +export const bar = foo(); +//// [/types/lib/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== /mod2.ts (1 errors) ==== + import {foo} from "./mod1"; + export const bar = foo(); + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +==== /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/FunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts new file mode 100644 index 0000000000000..7c6ae28c1c2b4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts] //// + +//// [FunctionDeclaration8_es6.ts] +var v = { [yield]: foo } + +/// [Declarations] //// + + + +//// [/.src/FunctionDeclaration8_es6.d.ts] +declare var v: invalid; +/// [Errors] //// + +FunctionDeclaration8_es6.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +FunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'yield'. +FunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. + + +==== FunctionDeclaration8_es6.ts (3 errors) ==== + var v = { [yield]: foo } + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS2304: Cannot find name 'yield'. + ~~~ +!!! error TS2304: Cannot find name 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts new file mode 100644 index 0000000000000..f42de377a098c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts] //// + +//// [asyncFunctionDeclaration8_es2017.ts] +var v = { [await]: foo } + +/// [Declarations] //// + + + +//// [/.src/asyncFunctionDeclaration8_es2017.d.ts] +declare var v: invalid; +/// [Errors] //// + +asyncFunctionDeclaration8_es2017.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +asyncFunctionDeclaration8_es2017.ts(1,12): error TS2304: Cannot find name 'await'. +asyncFunctionDeclaration8_es2017.ts(1,20): error TS2304: Cannot find name 'foo'. + + +==== asyncFunctionDeclaration8_es2017.ts (3 errors) ==== + var v = { [await]: foo } + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS2304: Cannot find name 'await'. + ~~~ +!!! error TS2304: Cannot find name 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts new file mode 100644 index 0000000000000..a86da6bca0199 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts] //// + +//// [asyncFunctionDeclaration8_es5.ts] +var v = { [await]: foo } + +/// [Declarations] //// + + + +//// [/.src/asyncFunctionDeclaration8_es5.d.ts] +declare var v: invalid; +/// [Errors] //// + +asyncFunctionDeclaration8_es5.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +asyncFunctionDeclaration8_es5.ts(1,12): error TS2304: Cannot find name 'await'. +asyncFunctionDeclaration8_es5.ts(1,20): error TS2304: Cannot find name 'foo'. + + +==== asyncFunctionDeclaration8_es5.ts (3 errors) ==== + var v = { [await]: foo } + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS2304: Cannot find name 'await'. + ~~~ +!!! error TS2304: Cannot find name 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts new file mode 100644 index 0000000000000..fd69a192ab893 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts] //// + +//// [asyncFunctionDeclaration8_es6.ts] +var v = { [await]: foo } + +/// [Declarations] //// + + + +//// [/.src/asyncFunctionDeclaration8_es6.d.ts] +declare var v: invalid; +/// [Errors] //// + +asyncFunctionDeclaration8_es6.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +asyncFunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'await'. +asyncFunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. + + +==== asyncFunctionDeclaration8_es6.ts (3 errors) ==== + var v = { [await]: foo } + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS2304: Cannot find name 'await'. + ~~~ +!!! error TS2304: Cannot find name 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts new file mode 100644 index 0000000000000..e9a8d05b56031 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts @@ -0,0 +1,93 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts] //// + +//// [computedPropertyNames12_ES5.ts] +var s: string; +var n: number; +var a: any; +class C { + [s]: number; + [n] = n; + static [s + s]: string; + [s + n] = 2; + [+s]: typeof s; + static [""]: number; + [0]: number; + [a]: number; + static [true]: number; + [`hello bye`] = 0; + static [`hello ${a} bye`] = 0 +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames12_ES5.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare class C { + [s]: number; + [n]: invalid; + static [""]: number; + [0]: number; + [a]: number; + [`hello bye`]: number; +} +/// [Errors] //// + +computedPropertyNames12_ES5.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames12_ES5.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames12_ES5.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames12_ES5.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES5.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES5.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES5.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames12_ES5.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + + +==== computedPropertyNames12_ES5.ts (12 errors) ==== + var s: string; + var n: number; + var a: any; + class C { + [s]: number; + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [n] = n; + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static [s + s]: string; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [s + n] = 2; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [+s]: typeof s; + ~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + static [""]: number; + [0]: number; + [a]: number; + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static [true]: number; + ~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [`hello bye`] = 0; + static [`hello ${a} bye`] = 0 + ~~~~~~~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts new file mode 100644 index 0000000000000..752a2bd078f26 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts @@ -0,0 +1,93 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts] //// + +//// [computedPropertyNames12_ES6.ts] +var s: string; +var n: number; +var a: any; +class C { + [s]: number; + [n] = n; + static [s + s]: string; + [s + n] = 2; + [+s]: typeof s; + static [""]: number; + [0]: number; + [a]: number; + static [true]: number; + [`hello bye`] = 0; + static [`hello ${a} bye`] = 0 +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames12_ES6.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare class C { + [s]: number; + [n]: invalid; + static [""]: number; + [0]: number; + [a]: number; + [`hello bye`]: number; +} +/// [Errors] //// + +computedPropertyNames12_ES6.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames12_ES6.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames12_ES6.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames12_ES6.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES6.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES6.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES6.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames12_ES6.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + + +==== computedPropertyNames12_ES6.ts (12 errors) ==== + var s: string; + var n: number; + var a: any; + class C { + [s]: number; + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [n] = n; + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static [s + s]: string; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [s + n] = 2; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [+s]: typeof s; + ~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + static [""]: number; + [0]: number; + [a]: number; + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static [true]: number; + ~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [`hello bye`] = 0; + static [`hello ${a} bye`] = 0 + ~~~~~~~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts new file mode 100644 index 0000000000000..a1fa819f8a9f8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts @@ -0,0 +1,81 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES5.ts] //// + +//// [computedPropertyNames16_ES5.ts] +var s: string; +var n: number; +var a: any; +class C { + get [s]() { return 0;} + set [n](v) { } + static get [s + s]() { return 0; } + set [s + n](v) { } + get [+s]() { return 0; } + static set [""](v) { } + get [0]() { return 0; } + set [a](v) { } + static get [true]() { return 0; } + set [`hello bye`](v) { } + get [`hello ${a} bye`]() { return 0; } +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames16_ES5.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare class C { + get [s](): invalid; + set [n](v: invalid); + static set [""](v: invalid); + get [0](): invalid; + set [a](v: invalid); + set [`hello bye`](v: invalid); +} +/// [Errors] //// + +computedPropertyNames16_ES5.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES5.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES5.ts(6,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES5.ts(10,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES5.ts(11,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES5.ts(12,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES5.ts(12,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES5.ts(14,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNames16_ES5.ts (8 errors) ==== + var s: string; + var n: number; + var a: any; + class C { + get [s]() { return 0;} + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set [n](v) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get [s + s]() { return 0; } + set [s + n](v) { } + get [+s]() { return 0; } + static set [""](v) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + get [0]() { return 0; } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set [a](v) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get [true]() { return 0; } + set [`hello bye`](v) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + get [`hello ${a} bye`]() { return 0; } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts new file mode 100644 index 0000000000000..001dca4ea9def --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts @@ -0,0 +1,81 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES6.ts] //// + +//// [computedPropertyNames16_ES6.ts] +var s: string; +var n: number; +var a: any; +class C { + get [s]() { return 0;} + set [n](v) { } + static get [s + s]() { return 0; } + set [s + n](v) { } + get [+s]() { return 0; } + static set [""](v) { } + get [0]() { return 0; } + set [a](v) { } + static get [true]() { return 0; } + set [`hello bye`](v) { } + get [`hello ${a} bye`]() { return 0; } +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames16_ES6.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare class C { + get [s](): invalid; + set [n](v: invalid); + static set [""](v: invalid); + get [0](): invalid; + set [a](v: invalid); + set [`hello bye`](v: invalid); +} +/// [Errors] //// + +computedPropertyNames16_ES6.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES6.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES6.ts(6,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES6.ts(10,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES6.ts(11,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES6.ts(12,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES6.ts(12,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES6.ts(14,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNames16_ES6.ts (8 errors) ==== + var s: string; + var n: number; + var a: any; + class C { + get [s]() { return 0;} + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set [n](v) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get [s + s]() { return 0; } + set [s + n](v) { } + get [+s]() { return 0; } + static set [""](v) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + get [0]() { return 0; } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set [a](v) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get [true]() { return 0; } + set [`hello bye`](v) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + get [`hello ${a} bye`]() { return 0; } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts new file mode 100644 index 0000000000000..53e730607cd4d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts @@ -0,0 +1,74 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES5.ts] //// + +//// [computedPropertyNames2_ES5.ts] +var methodName = "method"; +var accessorName = "accessor"; +class C { + [methodName]() { } + static [methodName]() { } + get [accessorName]() { } + set [accessorName](v) { } + static get [accessorName]() { } + static set [accessorName](v) { } +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames2_ES5.d.ts] +declare var methodName: string; +declare var accessorName: string; +declare class C { + [methodName](): invalid; + static [methodName](): invalid; + get [accessorName](): invalid; + set [accessorName](v: invalid); + static get [accessorName](): invalid; + static set [accessorName](v: invalid); +} +/// [Errors] //// + +computedPropertyNames2_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES5.ts(5,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES5.ts(6,9): error TS2378: A 'get' accessor must return a value. +computedPropertyNames2_ES5.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES5.ts(7,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES5.ts(7,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES5.ts(8,16): error TS2378: A 'get' accessor must return a value. +computedPropertyNames2_ES5.ts(8,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES5.ts(9,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES5.ts(9,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNames2_ES5.ts (10 errors) ==== + var methodName = "method"; + var accessorName = "accessor"; + class C { + [methodName]() { } + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static [methodName]() { } + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + get [accessorName]() { } + ~~~~~~~~~~~~~~ +!!! error TS2378: A 'get' accessor must return a value. + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set [accessorName](v) { } + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get [accessorName]() { } + ~~~~~~~~~~~~~~ +!!! error TS2378: A 'get' accessor must return a value. + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static set [accessorName](v) { } + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts new file mode 100644 index 0000000000000..a290a03e773e1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts @@ -0,0 +1,74 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES6.ts] //// + +//// [computedPropertyNames2_ES6.ts] +var methodName = "method"; +var accessorName = "accessor"; +class C { + [methodName]() { } + static [methodName]() { } + get [accessorName]() { } + set [accessorName](v) { } + static get [accessorName]() { } + static set [accessorName](v) { } +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames2_ES6.d.ts] +declare var methodName: string; +declare var accessorName: string; +declare class C { + [methodName](): invalid; + static [methodName](): invalid; + get [accessorName](): invalid; + set [accessorName](v: invalid); + static get [accessorName](): invalid; + static set [accessorName](v: invalid); +} +/// [Errors] //// + +computedPropertyNames2_ES6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES6.ts(5,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES6.ts(6,9): error TS2378: A 'get' accessor must return a value. +computedPropertyNames2_ES6.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES6.ts(7,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES6.ts(7,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES6.ts(8,16): error TS2378: A 'get' accessor must return a value. +computedPropertyNames2_ES6.ts(8,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES6.ts(9,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES6.ts(9,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNames2_ES6.ts (10 errors) ==== + var methodName = "method"; + var accessorName = "accessor"; + class C { + [methodName]() { } + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static [methodName]() { } + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + get [accessorName]() { } + ~~~~~~~~~~~~~~ +!!! error TS2378: A 'get' accessor must return a value. + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set [accessorName](v) { } + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static get [accessorName]() { } + ~~~~~~~~~~~~~~ +!!! error TS2378: A 'get' accessor must return a value. + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + static set [accessorName](v) { } + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts new file mode 100644 index 0000000000000..b549bae85104a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts @@ -0,0 +1,74 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES5.ts] //// + +//// [computedPropertyNames4_ES5.ts] +var s: string; +var n: number; +var a: any; +var v = { + [s]: 0, + [n]: n, + [s + s]: 1, + [s + n]: 2, + [+s]: s, + [""]: 0, + [0]: 0, + [a]: 1, + [true]: 0, + [`hello bye`]: 0, + [`hello ${a} bye`]: 0 +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames4_ES5.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare var v: invalid; +/// [Errors] //// + +computedPropertyNames4_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES5.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES5.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES5.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES5.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES5.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNames4_ES5.ts (8 errors) ==== + var s: string; + var n: number; + var a: any; + var v = { + [s]: 0, + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [n]: n, + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [s + s]: 1, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [s + n]: 2, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [+s]: s, + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [""]: 0, + [0]: 0, + [a]: 1, + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [true]: 0, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [`hello bye`]: 0, + [`hello ${a} bye`]: 0 + ~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts new file mode 100644 index 0000000000000..6c55990ad7a1c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts @@ -0,0 +1,74 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES6.ts] //// + +//// [computedPropertyNames4_ES6.ts] +var s: string; +var n: number; +var a: any; +var v = { + [s]: 0, + [n]: n, + [s + s]: 1, + [s + n]: 2, + [+s]: s, + [""]: 0, + [0]: 0, + [a]: 1, + [true]: 0, + [`hello bye`]: 0, + [`hello ${a} bye`]: 0 +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames4_ES6.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare var v: invalid; +/// [Errors] //// + +computedPropertyNames4_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES6.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES6.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES6.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES6.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES6.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNames4_ES6.ts (8 errors) ==== + var s: string; + var n: number; + var a: any; + var v = { + [s]: 0, + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [n]: n, + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [s + s]: 1, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [s + n]: 2, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [+s]: s, + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [""]: 0, + [0]: 0, + [a]: 1, + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [true]: 0, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [`hello bye`]: 0, + [`hello ${a} bye`]: 0 + ~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts new file mode 100644 index 0000000000000..23c079a6554f7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts @@ -0,0 +1,67 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES5.ts] //// + +//// [computedPropertyNames5_ES5.ts] +var b: boolean; +var v = { + [b]: 0, + [true]: 1, + [[]]: 0, + [{}]: 0, + [undefined]: undefined, + [null]: null +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames5_ES5.d.ts] +declare var b: boolean; +declare var v: invalid; +/// [Errors] //// + +computedPropertyNames5_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES5.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES5.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES5.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES5.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNames5_ES5.ts (11 errors) ==== + var b: boolean; + var v = { + [b]: 0, + ~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [true]: 1, + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [[]]: 0, + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [{}]: 0, + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [undefined]: undefined, + ~~~~~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [null]: null + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts new file mode 100644 index 0000000000000..3d3e0d51646ef --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts @@ -0,0 +1,67 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES6.ts] //// + +//// [computedPropertyNames5_ES6.ts] +var b: boolean; +var v = { + [b]: 0, + [true]: 1, + [[]]: 0, + [{}]: 0, + [undefined]: undefined, + [null]: null +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames5_ES6.d.ts] +declare var b: boolean; +declare var v: invalid; +/// [Errors] //// + +computedPropertyNames5_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES6.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES6.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES6.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames5_ES6.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNames5_ES6.ts (11 errors) ==== + var b: boolean; + var v = { + [b]: 0, + ~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [true]: 1, + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [[]]: 0, + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [{}]: 0, + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [undefined]: undefined, + ~~~~~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [null]: null + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts new file mode 100644 index 0000000000000..9e3170815ba7c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts @@ -0,0 +1,61 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts] //// + +//// [computedPropertyNamesWithStaticProperty.ts] +class C { + static staticProp = 10; + get [C.staticProp]() { + return "hello"; + } + set [C.staticProp](x: string) { + var y = x; + } + [C.staticProp]() { } +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNamesWithStaticProperty.d.ts] +declare class C { + static staticProp: number; + get [C.staticProp](): invalid; + set [C.staticProp](x: string); + [C.staticProp](): invalid; +} +/// [Errors] //// + +computedPropertyNamesWithStaticProperty.ts(3,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesWithStaticProperty.ts(3,10): error TS2449: Class 'C' used before its declaration. +computedPropertyNamesWithStaticProperty.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesWithStaticProperty.ts(6,10): error TS2449: Class 'C' used before its declaration. +computedPropertyNamesWithStaticProperty.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesWithStaticProperty.ts(9,6): error TS2449: Class 'C' used before its declaration. + + +==== computedPropertyNamesWithStaticProperty.ts (6 errors) ==== + class C { + static staticProp = 10; + get [C.staticProp]() { + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2449: Class 'C' used before its declaration. +!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:1:7: 'C' is declared here. + return "hello"; + } + set [C.staticProp](x: string) { + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2449: Class 'C' used before its declaration. +!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:1:7: 'C' is declared here. + var y = x; + } + [C.staticProp]() { } + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2449: Class 'C' used before its declaration. +!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:1:7: 'C' is declared here. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts new file mode 100644 index 0000000000000..7782052bccca3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts @@ -0,0 +1,42 @@ +//// [tests/cases/compiler/contextualReturnTypeOfIIFE2.ts] //// + +//// [contextualReturnTypeOfIIFE2.ts] +declare namespace app { + function foo(): void; +} + +app.foo.bar = (function () { + const someFun = (arg: number) => {}; + return { someFun }; +})(); + +app.foo.bar.someFun(1); + + +/// [Declarations] //// + + + +//// [/.src/contextualReturnTypeOfIIFE2.d.ts] +declare namespace app { + function foo(): void; +} +/// [Errors] //// + +contextualReturnTypeOfIIFE2.ts(2,12): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== contextualReturnTypeOfIIFE2.ts (1 errors) ==== + declare namespace app { + function foo(): void; + ~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + } + + app.foo.bar = (function () { + const someFun = (arg: number) => {}; + return { someFun }; + })(); + + app.foo.bar.someFun(1); + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts new file mode 100644 index 0000000000000..cbe73c462757c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts @@ -0,0 +1,67 @@ +//// [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) { + 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] //// + + + +//// [/.src/child1.d.ts] +import { ParentThing } from './parent'; +declare module './parent' { + interface ParentThing { + add: (a: number, b: number) => number; + } +} +export declare function child1(prototype: ParentThing): invalid; + +//// [/.src/parent.d.ts] +export declare class ParentThing implements ParentThing { +} +/// [Errors] //// + +child1.ts(9,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parent.ts(1,1): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== child1.ts (1 errors) ==== + import { ParentThing } from './parent'; + + declare module './parent' { + interface ParentThing { + add: (a: number, b: number) => number; + } + } + + export function child1(prototype: ParentThing) { + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + prototype.add = (a: number, b: number) => a + b; + } + +==== parent.ts (1 errors) ==== + import { child1 } from './child1'; // this import should still exist in some form in the output, since it augments this module + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + export class ParentThing implements ParentThing {} + + child1(ParentThing.prototype); \ 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..14f725badfd27 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitHasTypesRefOnNamespaceUse.d.ts @@ -0,0 +1,41 @@ +//// [tests/cases/compiler/declarationEmitHasTypesRefOnNamespaceUse.ts] //// + +//// [/src/index.ts] +class Src implements NS.Dep { } + +//// [/deps/dep/dep.d.ts] +declare namespace NS { + interface Dep { + } +} +//// [/deps/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 TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to dep to unblock declaration emit. + + +==== /src/index.ts (1 errors) ==== + class Src implements NS.Dep { } + ~~~~~~ +!!! error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to dep to unblock declaration emit. + +==== /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/declarationEmitLateBoundAssignments2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitLateBoundAssignments2.d.ts new file mode 100644 index 0000000000000..73924286e49dd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitLateBoundAssignments2.d.ts @@ -0,0 +1,275 @@ +//// [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() {} +decl["B"] = 'foo' + +export function decl2() {} +decl2[c] = 0 + +export function decl3() {} +decl3[77] = 0 + +export function decl4() {} +decl4[num] = 0 + +export function decl5() {} +decl5["101"] = 0 + +export function decl6() {} +decl6[numStr] = 0 + +export function decl7() {} +decl7["qwe rty"] = 0 + +export function decl8() {} +decl8[withWhitespace] = 0 + +export function decl9() {} +decl9["🤪"] = 0 + +export function decl10() {} +decl10[emoji] = 0 + +export const arrow = () => {} +arrow["B"] = 'bar' + +export const arrow2 = () => {} +arrow2[c] = 100 + +export const arrow3 = () => {} +arrow3[77] = 0 + +export const arrow4 = () => {} +arrow4[num] = 0 + +export const arrow5 = () => {} +arrow5["101"] = 0 + +export const arrow6 = () => {} +arrow6[numStr] = 0 + +export const arrow7 = () => {} +arrow7["qwe rty"] = 0 + +export const arrow8 = () => {} +arrow8[withWhitespace] = 0 + +export const arrow9 = () => {} +arrow9["🤪"] = 0 + +export const arrow10 = () => {} +arrow10[emoji] = 0 + + +/// [Declarations] //// + + + +//// [/.src/declarationEmitLateBoundAssignments2.d.ts] +export declare function decl(): invalid; +export declare function decl2(): invalid; +export declare function decl3(): invalid; +export declare function decl4(): invalid; +export declare function decl5(): invalid; +export declare function decl6(): invalid; +export declare function decl7(): invalid; +export declare function decl8(): invalid; +export declare function decl9(): invalid; +export declare function decl10(): invalid; +export declare const arrow: invalid; +export declare const arrow2: invalid; +export declare const arrow3: invalid; +export declare const arrow4: invalid; +export declare const arrow5: invalid; +export declare const arrow6: invalid; +export declare const arrow7: invalid; +export declare const arrow8: invalid; +export declare const arrow9: invalid; +export declare const arrow10: invalid; +/// [Errors] //// + +declarationEmitLateBoundAssignments2.ts(9,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(9,17): error TS9009: 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(12,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(12,17): error TS9009: 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(15,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(15,17): error TS9009: 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(18,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(18,17): error TS9009: 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(21,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(21,17): error TS9009: 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(24,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(24,17): error TS9009: 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(27,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(27,17): error TS9009: 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(30,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(30,17): error TS9009: 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(33,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(33,17): error TS9009: 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(36,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(36,17): error TS9009: 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(39,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(39,14): error TS9009: 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(42,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(45,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(45,14): error TS9009: 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(48,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(51,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(51,14): error TS9009: 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(54,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(57,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(57,14): error TS9009: 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(60,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(63,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(63,14): error TS9009: 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(66,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== declarationEmitLateBoundAssignments2.ts (35 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() {} + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl["B"] = 'foo' + + export function decl2() {} + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl2[c] = 0 + + export function decl3() {} + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl3[77] = 0 + + export function decl4() {} + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl4[num] = 0 + + export function decl5() {} + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl5["101"] = 0 + + export function decl6() {} + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl6[numStr] = 0 + + export function decl7() {} + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl7["qwe rty"] = 0 + + export function decl8() {} + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl8[withWhitespace] = 0 + + export function decl9() {} + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl9["🤪"] = 0 + + export function decl10() {} + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl10[emoji] = 0 + + export const arrow = () => {} + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow["B"] = 'bar' + + export const arrow2 = () => {} + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + arrow2[c] = 100 + + export const arrow3 = () => {} + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow3[77] = 0 + + export const arrow4 = () => {} + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + arrow4[num] = 0 + + export const arrow5 = () => {} + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow5["101"] = 0 + + export const arrow6 = () => {} + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + arrow6[numStr] = 0 + + export const arrow7 = () => {} + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow7["qwe rty"] = 0 + + export const arrow8 = () => {} + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + arrow8[withWhitespace] = 0 + + export const arrow9 = () => {} + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow9["🤪"] = 0 + + export const arrow10 = () => {} + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + arrow10[emoji] = 0 + \ 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..13a22f0d703c2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationFilesWithTypeReferences2.d.ts @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/declarationFilesWithTypeReferences2.ts] //// + +//// [/node_modules/@types/node/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 TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to node to unblock declaration emit. + + +==== /node_modules/@types/node/index.d.ts (0 errors) ==== + interface Error2 { + stack2: string; + } + +==== /app.ts (1 errors) ==== + function foo(): Error2 { + ~~~~~~ +!!! error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to node to unblock declaration emit. + return undefined; + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts new file mode 100644 index 0000000000000..7a0a57f27b13c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts @@ -0,0 +1,754 @@ +//// [tests/cases/compiler/decoratorsOnComputedProperties.ts] //// + +//// [decoratorsOnComputedProperties.ts] +function x(o: object, k: PropertyKey) { } +let i = 0; +function foo(): string { return ++i + ""; } + +const fieldNameA: string = "fieldName1"; +const fieldNameB: string = "fieldName2"; +const fieldNameC: string = "fieldName3"; + +class A { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + @x [foo()]: any; + @x [foo()]: any = null; + [fieldNameA]: any; + @x [fieldNameB]: any; + @x [fieldNameC]: any = null; +} + +void class B { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + @x [foo()]: any; + @x [foo()]: any = null; + [fieldNameA]: any; + @x [fieldNameB]: any; + @x [fieldNameC]: any = null; +}; + +class C { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + @x [foo()]: any; + @x [foo()]: any = null; + [fieldNameA]: any; + @x [fieldNameB]: any; + @x [fieldNameC]: any = null; + ["some" + "method"]() {} +} + +void class D { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + @x [foo()]: any; + @x [foo()]: any = null; + [fieldNameA]: any; + @x [fieldNameB]: any; + @x [fieldNameC]: any = null; + ["some" + "method"]() {} +}; + +class E { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + @x [foo()]: any; + @x [foo()]: any = null; + ["some" + "method"]() {} + [fieldNameA]: any; + @x [fieldNameB]: any; + @x [fieldNameC]: any = null; +} + +void class F { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + @x [foo()]: any; + @x [foo()]: any = null; + ["some" + "method"]() {} + [fieldNameA]: any; + @x [fieldNameB]: any; + @x [fieldNameC]: any = null; +}; + +class G { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + @x [foo()]: any; + @x [foo()]: any = null; + ["some" + "method"]() {} + [fieldNameA]: any; + @x [fieldNameB]: any; + ["some" + "method2"]() {} + @x [fieldNameC]: any = null; +} + +void class H { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + @x [foo()]: any; + @x [foo()]: any = null; + ["some" + "method"]() {} + [fieldNameA]: any; + @x [fieldNameB]: any; + ["some" + "method2"]() {} + @x [fieldNameC]: any = null; +}; + +class I { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + @x [foo()]: any; + @x [foo()]: any = null; + @x ["some" + "method"]() {} + [fieldNameA]: any; + @x [fieldNameB]: any; + ["some" + "method2"]() {} + @x [fieldNameC]: any = null; +} + +void class J { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + @x [foo()]: any; + @x [foo()]: any = null; + @x ["some" + "method"]() {} + [fieldNameA]: any; + @x [fieldNameB]: any; + ["some" + "method2"]() {} + @x [fieldNameC]: any = null; +}; + +/// [Declarations] //// + + + +//// [/.src/decoratorsOnComputedProperties.d.ts] +declare function x(o: object, k: PropertyKey): invalid; +declare let i: number; +declare function foo(): string; +declare const fieldNameA: string; +declare const fieldNameB: string; +declare const fieldNameC: string; +declare class A { + ["property"]: any; + [Symbol.toStringTag]: any; + ["property2"]: any; + [Symbol.iterator]: any; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any; + [Symbol.match]: any; + [fieldNameA]: any; + [fieldNameB]: any; + [fieldNameC]: any; +} +declare class C { + ["property"]: any; + [Symbol.toStringTag]: any; + ["property2"]: any; + [Symbol.iterator]: any; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any; + [Symbol.match]: any; + [fieldNameA]: any; + [fieldNameB]: any; + [fieldNameC]: any; +} +declare class E { + ["property"]: any; + [Symbol.toStringTag]: any; + ["property2"]: any; + [Symbol.iterator]: any; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any; + [Symbol.match]: any; + [fieldNameA]: any; + [fieldNameB]: any; + [fieldNameC]: any; +} +declare class G { + ["property"]: any; + [Symbol.toStringTag]: any; + ["property2"]: any; + [Symbol.iterator]: any; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any; + [Symbol.match]: any; + [fieldNameA]: any; + [fieldNameB]: any; + [fieldNameC]: any; +} +declare class I { + ["property"]: any; + [Symbol.toStringTag]: any; + ["property2"]: any; + [Symbol.iterator]: any; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any; + [Symbol.match]: any; + [fieldNameA]: any; + [fieldNameB]: any; + [fieldNameC]: any; +} +/// [Errors] //// + +decoratorsOnComputedProperties.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(18,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(19,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(20,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(21,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(22,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(22,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(23,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(23,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(27,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(28,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(29,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(30,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(35,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(36,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(37,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(38,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(39,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(40,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(52,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(53,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(54,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(55,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(55,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(56,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(56,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(57,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(57,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(62,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(63,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(64,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(65,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(70,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(71,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(72,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(73,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(74,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(75,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(88,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(89,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(90,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(92,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(92,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(93,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(93,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(94,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(94,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(98,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(99,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(100,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(101,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(106,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(107,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(108,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(110,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(111,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(112,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(124,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(125,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(126,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(128,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(128,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(129,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(129,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(131,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(131,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(135,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(136,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(137,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(138,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(143,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(144,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(145,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(147,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(148,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(150,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(162,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(163,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(164,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(166,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(166,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(167,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(167,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(169,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(169,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(173,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(174,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(175,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(176,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(181,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(182,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(183,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(184,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(185,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +decoratorsOnComputedProperties.ts(186,5): error TS1206: Decorators are not valid here. +decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid here. + + +==== decoratorsOnComputedProperties.ts (97 errors) ==== + function x(o: object, k: PropertyKey) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + let i = 0; + function foo(): string { return ++i + ""; } + + const fieldNameA: string = "fieldName1"; + const fieldNameB: string = "fieldName2"; + const fieldNameC: string = "fieldName3"; + + class A { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any = null; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [fieldNameA]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + @x [fieldNameB]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + @x [fieldNameC]: any = null; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + void class B { + @x ["property"]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [Symbol.toStringTag]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x ["property2"]: any = 2; + ~ +!!! error TS1206: Decorators are not valid here. + @x [Symbol.iterator]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [foo()]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + [fieldNameA]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [fieldNameB]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [fieldNameC]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + }; + + class C { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any = null; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [fieldNameA]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + @x [fieldNameB]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + @x [fieldNameC]: any = null; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ["some" + "method"]() {} + } + + void class D { + @x ["property"]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [Symbol.toStringTag]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x ["property2"]: any = 2; + ~ +!!! error TS1206: Decorators are not valid here. + @x [Symbol.iterator]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [foo()]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + [fieldNameA]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [fieldNameB]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [fieldNameC]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + ["some" + "method"]() {} + }; + + class E { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any = null; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ["some" + "method"]() {} + [fieldNameA]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + @x [fieldNameB]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + @x [fieldNameC]: any = null; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + void class F { + @x ["property"]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [Symbol.toStringTag]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x ["property2"]: any = 2; + ~ +!!! error TS1206: Decorators are not valid here. + @x [Symbol.iterator]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [foo()]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + ["some" + "method"]() {} + [fieldNameA]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [fieldNameB]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [fieldNameC]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + }; + + class G { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any = null; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ["some" + "method"]() {} + [fieldNameA]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + @x [fieldNameB]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ["some" + "method2"]() {} + @x [fieldNameC]: any = null; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + void class H { + @x ["property"]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [Symbol.toStringTag]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x ["property2"]: any = 2; + ~ +!!! error TS1206: Decorators are not valid here. + @x [Symbol.iterator]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [foo()]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + ["some" + "method"]() {} + [fieldNameA]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [fieldNameB]: any; + ~ +!!! error TS1206: Decorators are not valid here. + ["some" + "method2"]() {} + @x [fieldNameC]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + }; + + class I { + @x ["property"]: any; + @x [Symbol.toStringTag]: any; + @x ["property2"]: any = 2; + @x [Symbol.iterator]: any = null; + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any = null; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x ["some" + "method"]() {} + [fieldNameA]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + @x [fieldNameB]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ["some" + "method2"]() {} + @x [fieldNameC]: any = null; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + void class J { + @x ["property"]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [Symbol.toStringTag]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x ["property2"]: any = 2; + ~ +!!! error TS1206: Decorators are not valid here. + @x [Symbol.iterator]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any = 2; + [Symbol.match]: any = null; + [foo()]: any; + ~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [foo()]: any; + ~ +!!! error TS1206: Decorators are not valid here. + @x [foo()]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + @x ["some" + "method"]() {} + ~ +!!! error TS1206: Decorators are not valid here. + [fieldNameA]: any; + ~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + @x [fieldNameB]: any; + ~ +!!! error TS1206: Decorators are not valid here. + ["some" + "method2"]() {} + @x [fieldNameC]: any = null; + ~ +!!! error TS1206: Decorators are not valid here. + }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts new file mode 100644 index 0000000000000..e3604808ed93f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts @@ -0,0 +1,42 @@ +//// [tests/cases/compiler/expandoFunctionExpressionsWithDynamicNames.ts] //// + +//// [expandoFunctionExpressionsWithDynamicNames.ts] +// https://github.com/microsoft/TypeScript/issues/54809 + +const s = "X"; + +export const expr = () => {} +expr[s] = 0 + +export const expr2 = function () {} +expr2[s] = 0 + + +/// [Declarations] //// + + + +//// [/.src/expandoFunctionExpressionsWithDynamicNames.d.ts] +export declare const expr: invalid; +export declare const expr2: invalid; +/// [Errors] //// + +expandoFunctionExpressionsWithDynamicNames.ts(5,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +expandoFunctionExpressionsWithDynamicNames.ts(8,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== expandoFunctionExpressionsWithDynamicNames.ts (2 errors) ==== + // https://github.com/microsoft/TypeScript/issues/54809 + + const s = "X"; + + export const expr = () => {} + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + expr[s] = 0 + + export const expr2 = function () {} + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + expr2[s] = 0 + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/indexTypeNoSubstitutionTemplateLiteral.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/indexTypeNoSubstitutionTemplateLiteral.d.ts new file mode 100644 index 0000000000000..a3c93c1e88b61 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/indexTypeNoSubstitutionTemplateLiteral.d.ts @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/indexTypeNoSubstitutionTemplateLiteral.ts] //// + +//// [indexTypeNoSubstitutionTemplateLiteral.ts] +function Foo() {} +Foo[`b`] = function () {}; + +type Test = keyof typeof Foo; + + + +/// [Declarations] //// + + + +//// [/.src/indexTypeNoSubstitutionTemplateLiteral.d.ts] +declare function Foo(): invalid; +type Test = keyof typeof Foo; +/// [Errors] //// + +indexTypeNoSubstitutionTemplateLiteral.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +indexTypeNoSubstitutionTemplateLiteral.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== indexTypeNoSubstitutionTemplateLiteral.ts (2 errors) ==== + function Foo() {} + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + Foo[`b`] = function () {}; + + type Test = keyof typeof Foo; + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts new file mode 100644 index 0000000000000..1fe958914c370 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts @@ -0,0 +1,37 @@ +//// [tests/cases/compiler/indexWithoutParamType2.ts] //// + +//// [indexWithoutParamType2.ts] +class C { + // Used to be indexer, now it is a computed property + [x]: string +} + +/// [Declarations] //// + + + +//// [/.src/indexWithoutParamType2.d.ts] +declare class C { + [x]: string; +} +/// [Errors] //// + +indexWithoutParamType2.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +indexWithoutParamType2.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +indexWithoutParamType2.ts(3,6): error TS2304: Cannot find name 'x'. +indexWithoutParamType2.ts(3,6): error TS4031: Public property '[x]' of exported class has or is using private name 'x'. + + +==== indexWithoutParamType2.ts (4 errors) ==== + class C { + // Used to be indexer, now it is a computed property + [x]: string + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'x'. + ~ +!!! error TS4031: Public property '[x]' of exported class has or is using private name 'x'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/moduleResolutionWithSuffixes_one_externalTSModule.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/moduleResolutionWithSuffixes_one_externalTSModule.d.ts new file mode 100644 index 0000000000000..6c440e833edd0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/moduleResolutionWithSuffixes_one_externalTSModule.d.ts @@ -0,0 +1,30 @@ +//// [tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts] //// + +//// [/test.ts] +import { ios } from "some-library"; + +//// [/node_modules/some-library/index.ios.ts] +export function ios() {} +//// [/node_modules/some-library/index.ts] +export function base() {} + +/// [Declarations] //// + + + +//// [/bin/test.d.ts] +export {}; +/// [Errors] //// + +/node_modules/some-library/index.ios.ts(1,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== /test.ts (0 errors) ==== + import { ios } from "some-library"; + +==== /node_modules/some-library/index.ios.ts (1 errors) ==== + export function ios() {} + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +==== /node_modules/some-library/index.ts (0 errors) ==== + export function base() {} \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts new file mode 100644 index 0000000000000..6941925fcf029 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName1.ts] //// + +//// [parserComputedPropertyName1.ts] +var v = { [e] }; + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName1.d.ts] +declare var v: invalid; +/// [Errors] //// + +parserComputedPropertyName1.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName1.ts(1,12): error TS2304: Cannot find name 'e'. +parserComputedPropertyName1.ts(1,15): error TS1005: ':' expected. + + +==== parserComputedPropertyName1.ts (3 errors) ==== + var v = { [e] }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS1005: ':' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts new file mode 100644 index 0000000000000..c5f74f8efe9bc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts] //// + +//// [parserComputedPropertyName10.ts] +class C { + [e] = 1 +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName10.d.ts] +declare class C { + [e]: number; +} +/// [Errors] //// + +parserComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName10.ts(2,4): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. +parserComputedPropertyName10.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +==== parserComputedPropertyName10.ts (4 errors) ==== + class C { + [e] = 1 + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts new file mode 100644 index 0000000000000..f0e4dc84388cb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts] //// + +//// [parserComputedPropertyName22.ts] +declare class C { + [e]: number +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName22.d.ts] +declare class C { + [e]: number; +} +/// [Errors] //// + +parserComputedPropertyName22.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName22.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName22.ts(2,6): error TS2304: Cannot find name 'e'. +parserComputedPropertyName22.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +==== parserComputedPropertyName22.ts (4 errors) ==== + declare class C { + [e]: number + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts new file mode 100644 index 0000000000000..d751f901c9c1f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts] //// + +//// [parserComputedPropertyName23.ts] +declare class C { + get [e](): number +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName23.d.ts] +declare class C { + get [e](): number; +} +/// [Errors] //// + +parserComputedPropertyName23.ts(2,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName23.ts(2,10): error TS2304: Cannot find name 'e'. +parserComputedPropertyName23.ts(2,10): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +==== parserComputedPropertyName23.ts (3 errors) ==== + declare class C { + get [e](): number + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts new file mode 100644 index 0000000000000..f882eb339441a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts] //// + +//// [parserComputedPropertyName24.ts] +class C { + set [e](v) { } +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName24.d.ts] +declare class C { + set [e](v: invalid); +} +/// [Errors] //// + +parserComputedPropertyName24.ts(2,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName24.ts(2,10): error TS2304: Cannot find name 'e'. +parserComputedPropertyName24.ts(2,10): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. +parserComputedPropertyName24.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== parserComputedPropertyName24.ts (4 errors) ==== + class C { + set [e](v) { } + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts new file mode 100644 index 0000000000000..8328f0f9667a8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts] //// + +//// [parserComputedPropertyName25.ts] +class C { + // No ASI + [e] = 0 + [e2] = 1 +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName25.d.ts] +declare class C { + [e]: invalid; +} +/// [Errors] //// + +parserComputedPropertyName25.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName25.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName25.ts(3,6): error TS2304: Cannot find name 'e'. +parserComputedPropertyName25.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. +parserComputedPropertyName25.ts(3,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. + + +==== parserComputedPropertyName25.ts (6 errors) ==== + class C { + // No ASI + [e] = 0 + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + ~ + [e2] = 1 + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS2304: Cannot find name 'e2'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts new file mode 100644 index 0000000000000..db782c3a6f93a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts] //// + +//// [parserComputedPropertyName27.ts] +class C { + // No ASI + [e]: number = 0 + [e2]: number +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName27.d.ts] +declare class C { + [e]: number; + number: invalid; +} +/// [Errors] //// + +parserComputedPropertyName27.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName27.ts(3,6): error TS2304: Cannot find name 'e'. +parserComputedPropertyName27.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. +parserComputedPropertyName27.ts(4,6): error TS2304: Cannot find name 'e2'. +parserComputedPropertyName27.ts(4,9): error TS1005: ';' expected. +parserComputedPropertyName27.ts(4,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== parserComputedPropertyName27.ts (6 errors) ==== + class C { + // No ASI + [e]: number = 0 + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + [e2]: number + ~~ +!!! error TS2304: Cannot find name 'e2'. + ~ +!!! error TS1005: ';' expected. + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts new file mode 100644 index 0000000000000..2db629b00bcd7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts @@ -0,0 +1,50 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts] //// + +//// [parserComputedPropertyName28.ts] +class C { + [e]: number = 0; + [e2]: number +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName28.d.ts] +declare class C { + [e]: number; + [e2]: number; +} +/// [Errors] //// + +parserComputedPropertyName28.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName28.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName28.ts(2,6): error TS2304: Cannot find name 'e'. +parserComputedPropertyName28.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. +parserComputedPropertyName28.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName28.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName28.ts(3,6): error TS2304: Cannot find name 'e2'. +parserComputedPropertyName28.ts(3,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. + + +==== parserComputedPropertyName28.ts (8 errors) ==== + class C { + [e]: number = 0; + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + [e2]: number + ~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS2304: Cannot find name 'e2'. + ~~ +!!! error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts new file mode 100644 index 0000000000000..f0be74e73cdc5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts @@ -0,0 +1,58 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts] //// + +//// [parserComputedPropertyName29.ts] +class C { + // yes ASI + [e] = id++ + [e2]: number +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName29.d.ts] +declare class C { + [e]: invalid; + [e2]: number; +} +/// [Errors] //// + +parserComputedPropertyName29.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName29.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName29.ts(3,6): error TS2304: Cannot find name 'e'. +parserComputedPropertyName29.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. +parserComputedPropertyName29.ts(3,11): error TS2304: Cannot find name 'id'. +parserComputedPropertyName29.ts(3,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName29.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName29.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName29.ts(4,6): error TS2304: Cannot find name 'e2'. +parserComputedPropertyName29.ts(4,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. + + +==== parserComputedPropertyName29.ts (10 errors) ==== + class C { + // yes ASI + [e] = id++ + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + ~~ +!!! error TS2304: Cannot find name 'id'. + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [e2]: number + ~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS2304: Cannot find name 'e2'. + ~~ +!!! error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts new file mode 100644 index 0000000000000..0f7df500bdd80 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts @@ -0,0 +1,52 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts] //// + +//// [parserComputedPropertyName31.ts] +class C { + // yes ASI + [e]: number + [e2]: number +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName31.d.ts] +declare class C { + [e]: number; + [e2]: number; +} +/// [Errors] //// + +parserComputedPropertyName31.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName31.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName31.ts(3,6): error TS2304: Cannot find name 'e'. +parserComputedPropertyName31.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. +parserComputedPropertyName31.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName31.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName31.ts(4,6): error TS2304: Cannot find name 'e2'. +parserComputedPropertyName31.ts(4,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. + + +==== parserComputedPropertyName31.ts (8 errors) ==== + class C { + // yes ASI + [e]: number + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + [e2]: number + ~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS2304: Cannot find name 'e2'. + ~~ +!!! error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts new file mode 100644 index 0000000000000..bd3104ff5b76a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts] //// + +//// [parserComputedPropertyName32.ts] +declare class C { + [e](): number +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName32.d.ts] +declare class C { + [e](): number; +} +/// [Errors] //// + +parserComputedPropertyName32.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. +parserComputedPropertyName32.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName32.ts(2,6): error TS2304: Cannot find name 'e'. +parserComputedPropertyName32.ts(2,6): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + + +==== parserComputedPropertyName32.ts (4 errors) ==== + declare class C { + [e](): number + ~~~ +!!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts new file mode 100644 index 0000000000000..0971f0a9e58d2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts @@ -0,0 +1,49 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts] //// + +//// [parserComputedPropertyName33.ts] +class C { + // No ASI + [e] = 0 + [e2]() { } +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName33.d.ts] +declare class C { + [e]: invalid; +} +/// [Errors] //// + +parserComputedPropertyName33.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName33.ts(3,6): error TS2304: Cannot find name 'e'. +parserComputedPropertyName33.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. +parserComputedPropertyName33.ts(3,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName33.ts(4,6): error TS2304: Cannot find name 'e2'. +parserComputedPropertyName33.ts(4,12): error TS1005: ';' expected. +parserComputedPropertyName33.ts(5,1): error TS1128: Declaration or statement expected. + + +==== parserComputedPropertyName33.ts (7 errors) ==== + class C { + // No ASI + [e] = 0 + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + ~ + [e2]() { } + ~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS2304: Cannot find name 'e2'. + ~ +!!! error TS1005: ';' expected. + } + ~ +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts new file mode 100644 index 0000000000000..95e66fb12e2fd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts] //// + +//// [parserComputedPropertyName36.ts] +class C { + [public ]: string; +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName36.d.ts] +declare class C { + [public]: string; +} +/// [Errors] //// + +parserComputedPropertyName36.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName36.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName36.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. +parserComputedPropertyName36.ts(2,6): error TS2304: Cannot find name 'public'. +parserComputedPropertyName36.ts(2,6): error TS4031: Public property '[public ]' of exported class has or is using private name 'public'. + + +==== parserComputedPropertyName36.ts (5 errors) ==== + class C { + [public ]: string; + ~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. + ~~~~~~ +!!! error TS2304: Cannot find name 'public'. + ~~~~~~ +!!! error TS4031: Public property '[public ]' of exported class has or is using private name 'public'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts new file mode 100644 index 0000000000000..c7b84c2aa4372 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts] //// + +//// [parserComputedPropertyName6.ts] +var v = { [e]: 1, [e + e]: 2 }; + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName6.d.ts] +declare var v: invalid; +/// [Errors] //// + +parserComputedPropertyName6.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName6.ts(1,12): error TS2304: Cannot find name 'e'. +parserComputedPropertyName6.ts(1,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName6.ts(1,20): error TS2304: Cannot find name 'e'. +parserComputedPropertyName6.ts(1,24): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName6.ts (5 errors) ==== + var v = { [e]: 1, [e + e]: 2 }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts new file mode 100644 index 0000000000000..4b3f5facf403a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts] //// + +//// [parserComputedPropertyName9.ts] +class C { + [e]: Type +} + +/// [Declarations] //// + + + +//// [/.src/parserComputedPropertyName9.d.ts] +declare class C { + [e]: Type; +} +/// [Errors] //// + +parserComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName9.ts(2,4): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. +parserComputedPropertyName9.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. +parserComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. +parserComputedPropertyName9.ts(2,9): error TS4031: Public property '[e]' of exported class has or is using private name 'Type'. + + +==== parserComputedPropertyName9.ts (6 errors) ==== + class C { + [e]: Type + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + ~~~~ +!!! error TS2304: Cannot find name 'Type'. + ~~~~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'Type'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts new file mode 100644 index 0000000000000..7ce4b7eac2773 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts] //// + +//// [parserES5ComputedPropertyName1.ts] +declare class C { + [e]: number +} + +/// [Declarations] //// + + + +//// [/.src/parserES5ComputedPropertyName1.d.ts] +declare class C { + [e]: number; +} +/// [Errors] //// + +parserES5ComputedPropertyName1.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserES5ComputedPropertyName1.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserES5ComputedPropertyName1.ts(2,6): error TS2304: Cannot find name 'e'. +parserES5ComputedPropertyName1.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +==== parserES5ComputedPropertyName1.ts (4 errors) ==== + declare class C { + [e]: number + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts new file mode 100644 index 0000000000000..ebf4adc9490f4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts] //// + +//// [parserES5ComputedPropertyName10.ts] +class C { + [e] = 1 +} + +/// [Declarations] //// + + + +//// [/.src/parserES5ComputedPropertyName10.d.ts] +declare class C { + [e]: number; +} +/// [Errors] //// + +parserES5ComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserES5ComputedPropertyName10.ts(2,4): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserES5ComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. +parserES5ComputedPropertyName10.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +==== parserES5ComputedPropertyName10.ts (4 errors) ==== + class C { + [e] = 1 + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts new file mode 100644 index 0000000000000..19bd561abac7a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts] //// + +//// [parserES5ComputedPropertyName9.ts] +class C { + [e]: Type +} + +/// [Declarations] //// + + + +//// [/.src/parserES5ComputedPropertyName9.d.ts] +declare class C { + [e]: Type; +} +/// [Errors] //// + +parserES5ComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserES5ComputedPropertyName9.ts(2,4): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserES5ComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. +parserES5ComputedPropertyName9.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. +parserES5ComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. +parserES5ComputedPropertyName9.ts(2,9): error TS4031: Public property '[e]' of exported class has or is using private name 'Type'. + + +==== parserES5ComputedPropertyName9.ts (6 errors) ==== + class C { + [e]: Type + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + ~~~~ +!!! error TS2304: Cannot find name 'Type'. + ~~~~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'Type'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts new file mode 100644 index 0000000000000..0e82cec152a52 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty3.ts] //// + +//// [parserES5SymbolProperty3.ts] +declare class C { + [Symbol.unscopables](): string; +} + +/// [Declarations] //// + + + +//// [/.src/parserES5SymbolProperty3.d.ts] +declare class C { + [Symbol.unscopables](): string; +} +/// [Errors] //// + +parserES5SymbolProperty3.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. +parserES5SymbolProperty3.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserES5SymbolProperty3.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +parserES5SymbolProperty3.ts(2,6): error TS4100: Public method '[Symbol.unscopables]' of exported class has or is using private name 'Symbol'. + + +==== parserES5SymbolProperty3.ts (4 errors) ==== + declare class C { + [Symbol.unscopables](): string; + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ +!!! error TS4100: Public method '[Symbol.unscopables]' of exported class has or is using private name 'Symbol'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts new file mode 100644 index 0000000000000..0da372d695a1a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts] //// + +//// [parserES5SymbolProperty4.ts] +declare class C { + [Symbol.isRegExp]: string; +} + +/// [Declarations] //// + + + +//// [/.src/parserES5SymbolProperty4.d.ts] +declare class C { + [Symbol.isRegExp]: string; +} +/// [Errors] //// + +parserES5SymbolProperty4.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserES5SymbolProperty4.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserES5SymbolProperty4.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +parserES5SymbolProperty4.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. + + +==== parserES5SymbolProperty4.ts (4 errors) ==== + declare class C { + [Symbol.isRegExp]: string; + ~~~~~~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ +!!! error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts new file mode 100644 index 0000000000000..c5172b083d2a3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty5.ts] //// + +//// [parserES5SymbolProperty5.ts] +class C { + [Symbol.isRegExp]: string; +} + +/// [Declarations] //// + + + +//// [/.src/parserES5SymbolProperty5.d.ts] +declare class C { + [Symbol.isRegExp]: string; +} +/// [Errors] //// + +parserES5SymbolProperty5.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserES5SymbolProperty5.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserES5SymbolProperty5.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +parserES5SymbolProperty5.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. + + +==== parserES5SymbolProperty5.ts (4 errors) ==== + class C { + [Symbol.isRegExp]: string; + ~~~~~~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ +!!! error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts new file mode 100644 index 0000000000000..4fe148218b544 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty6.ts] //// + +//// [parserES5SymbolProperty6.ts] +class C { + [Symbol.toStringTag]: string = ""; +} + +/// [Declarations] //// + + + +//// [/.src/parserES5SymbolProperty6.d.ts] +declare class C { + [Symbol.toStringTag]: string; +} +/// [Errors] //// + +parserES5SymbolProperty6.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserES5SymbolProperty6.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +parserES5SymbolProperty6.ts(2,6): error TS4031: Public property '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. + + +==== parserES5SymbolProperty6.ts (4 errors) ==== + class C { + [Symbol.toStringTag]: string = ""; + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ +!!! error TS4031: Public property '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts new file mode 100644 index 0000000000000..73e205f8350b6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty7.ts] //// + +//// [parserES5SymbolProperty7.ts] +class C { + [Symbol.toStringTag](): void { } +} + +/// [Declarations] //// + + + +//// [/.src/parserES5SymbolProperty7.d.ts] +declare class C { + [Symbol.toStringTag](): void; +} +/// [Errors] //// + +parserES5SymbolProperty7.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserES5SymbolProperty7.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +parserES5SymbolProperty7.ts(2,6): error TS4100: Public method '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. + + +==== parserES5SymbolProperty7.ts (3 errors) ==== + class C { + [Symbol.toStringTag](): void { } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ +!!! error TS4100: Public method '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserSymbolIndexer5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserSymbolIndexer5.d.ts new file mode 100644 index 0000000000000..ddae6cbb73f69 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserSymbolIndexer5.d.ts @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts] //// + +//// [parserSymbolIndexer5.ts] +var x = { + [s: symbol]: "" +} + +/// [Declarations] //// + + + +//// [/.src/parserSymbolIndexer5.d.ts] +declare var x: invalid; +/// [Errors] //// + +parserSymbolIndexer5.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserSymbolIndexer5.ts(2,6): error TS2304: Cannot find name 's'. +parserSymbolIndexer5.ts(2,7): error TS1005: ']' expected. +parserSymbolIndexer5.ts(2,9): error TS2552: Cannot find name 'symbol'. Did you mean 'Symbol'? +parserSymbolIndexer5.ts(2,15): error TS1005: ',' expected. +parserSymbolIndexer5.ts(2,16): error TS1136: Property assignment expected. +parserSymbolIndexer5.ts(2,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserSymbolIndexer5.ts(3,1): error TS1005: ':' expected. + + +==== parserSymbolIndexer5.ts (8 errors) ==== + var x = { + [s: symbol]: "" + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 's'. + ~ +!!! error TS1005: ']' expected. + ~~~~~~ +!!! error TS2552: Cannot find name 'symbol'. Did you mean 'Symbol'? +!!! related TS2728 lib.es2015.symbol.d.ts:--:--: 'Symbol' is declared here. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1136: Property assignment expected. + +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + ~ +!!! error TS1005: ':' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/privateIndexer2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/privateIndexer2.d.ts new file mode 100644 index 0000000000000..f3892e35c9626 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/privateIndexer2.d.ts @@ -0,0 +1,60 @@ +//// [tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts] //// + +//// [privateIndexer2.ts] +// private indexers not allowed + +var x = { + private [x: string]: string; +} + +var y: { + private[x: string]: string; +} + +/// [Declarations] //// + + + +//// [/.src/privateIndexer2.d.ts] +declare var x: invalid; +declare var y: { + private []: string; +}; +/// [Errors] //// + +privateIndexer2.ts(4,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +privateIndexer2.ts(4,15): error TS1005: ']' expected. +privateIndexer2.ts(4,17): error TS2693: 'string' only refers to a type, but is being used as a value here. +privateIndexer2.ts(4,23): error TS1005: ',' expected. +privateIndexer2.ts(4,24): error TS1136: Property assignment expected. +privateIndexer2.ts(4,26): error TS2693: 'string' only refers to a type, but is being used as a value here. +privateIndexer2.ts(4,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +privateIndexer2.ts(4,32): error TS1005: ',' expected. + + +==== privateIndexer2.ts (8 errors) ==== + // private indexers not allowed + + var x = { + private [x: string]: string; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ']' expected. + ~~~~~~ +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1136: Property assignment expected. + ~~~~~~ +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + } + + var y: { + private[x: string]: string; + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts new file mode 100644 index 0000000000000..81af1e1f0e3f8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts @@ -0,0 +1,1013 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts] //// + +//// [staticPropertyNameConflicts.ts] +const FunctionPropertyNames = { + name: 'name', + length: 'length', + prototype: 'prototype', + caller: 'caller', + arguments: 'arguments', +} as const; + +// name +class StaticName { + static name: number; // error without useDefineForClassFields + name: string; // ok +} + +class StaticName2 { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + [FunctionPropertyNames.name]: number; // ok +} + +class StaticNameFn { + static name() {} // error without useDefineForClassFields + name() {} // ok +} + +class StaticNameFn2 { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + [FunctionPropertyNames.name]() {} // ok +} + +// length +class StaticLength { + static length: number; // error without useDefineForClassFields + length: string; // ok +} + +class StaticLength2 { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + [FunctionPropertyNames.length]: number; // ok +} + +class StaticLengthFn { + static length() {} // error without useDefineForClassFields + length() {} // ok +} + +class StaticLengthFn2 { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + [FunctionPropertyNames.length]() {} // ok +} + +// prototype +class StaticPrototype { + static prototype: number; // always an error + prototype: string; // ok +} + +class StaticPrototype2 { + static [FunctionPropertyNames.prototype]: number; // always an error + [FunctionPropertyNames.prototype]: string; // ok +} + +class StaticPrototypeFn { + static prototype() {} // always an error + prototype() {} // ok +} + +class StaticPrototypeFn2 { + static [FunctionPropertyNames.prototype]() {} // always an error + [FunctionPropertyNames.prototype]() {} // ok +} + +// caller +class StaticCaller { + static caller: number; // error without useDefineForClassFields + caller: string; // ok +} + +class StaticCaller2 { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + [FunctionPropertyNames.caller]: string; // ok +} + +class StaticCallerFn { + static caller() {} // error without useDefineForClassFields + caller() {} // ok +} + +class StaticCallerFn2 { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + [FunctionPropertyNames.caller]() {} // ok +} + +// arguments +class StaticArguments { + static arguments: number; // error without useDefineForClassFields + arguments: string; // ok +} + +class StaticArguments2 { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + [FunctionPropertyNames.arguments]: string; // ok +} + +class StaticArgumentsFn { + static arguments() {} // error without useDefineForClassFields + arguments() {} // ok +} + +class StaticArgumentsFn2 { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + [FunctionPropertyNames.arguments]() {} // ok +} + + +// === Static properties on anonymous classes === + +// name +var StaticName_Anonymous = class { + static name: number; // error without useDefineForClassFields + name: string; // ok +} + +var StaticName_Anonymous2 = class { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + [FunctionPropertyNames.name]: string; // ok +} + +var StaticNameFn_Anonymous = class { + static name() {} // error without useDefineForClassFields + name() {} // ok +} + +var StaticNameFn_Anonymous2 = class { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + [FunctionPropertyNames.name]() {} // ok +} + +// length +var StaticLength_Anonymous = class { + static length: number; // error without useDefineForClassFields + length: string; // ok +} + +var StaticLength_Anonymous2 = class { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + [FunctionPropertyNames.length]: string; // ok +} + +var StaticLengthFn_Anonymous = class { + static length() {} // error without useDefineForClassFields + length() {} // ok +} + +var StaticLengthFn_Anonymous2 = class { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + [FunctionPropertyNames.length]() {} // ok +} + +// prototype +var StaticPrototype_Anonymous = class { + static prototype: number; // always an error + prototype: string; // ok +} + +var StaticPrototype_Anonymous2 = class { + static [FunctionPropertyNames.prototype]: number; // always an error + [FunctionPropertyNames.prototype]: string; // ok +} + +var StaticPrototypeFn_Anonymous = class { + static prototype() {} // always an error + prototype() {} // ok +} + +var StaticPrototypeFn_Anonymous2 = class { + static [FunctionPropertyNames.prototype]() {} // always an error + [FunctionPropertyNames.prototype]() {} // ok +} + +// caller +var StaticCaller_Anonymous = class { + static caller: number; // error without useDefineForClassFields + caller: string; // ok +} + +var StaticCaller_Anonymous2 = class { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + [FunctionPropertyNames.caller]: string; // ok +} + +var StaticCallerFn_Anonymous = class { + static caller() {} // error without useDefineForClassFields + caller() {} // ok +} + +var StaticCallerFn_Anonymous2 = class { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + [FunctionPropertyNames.caller]() {} // ok +} + +// arguments +var StaticArguments_Anonymous = class { + static arguments: number; // error without useDefineForClassFields + arguments: string; // ok +} + +var StaticArguments_Anonymous2 = class { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + [FunctionPropertyNames.arguments]: string; // ok +} + +var StaticArgumentsFn_Anonymous = class { + static arguments() {} // error without useDefineForClassFields + arguments() {} // ok +} + +var StaticArgumentsFn_Anonymous2 = class { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + [FunctionPropertyNames.arguments]() {} // ok +} + + +// === Static properties on default exported classes === + +// name +module TestOnDefaultExportedClass_1 { + class StaticName { + static name: number; // error without useDefineForClassFields + name: string; // ok + } +} + +export class ExportedStaticName { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + [FunctionPropertyNames.name]: string; // ok +} + +module TestOnDefaultExportedClass_2 { + class StaticNameFn { + static name() {} // error without useDefineForClassFields + name() {} // ok + } +} + +export class ExportedStaticNameFn { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + [FunctionPropertyNames.name]() {} // ok +} + +// length +module TestOnDefaultExportedClass_3 { + export default class StaticLength { + static length: number; // error without useDefineForClassFields + length: string; // ok + } +} + +export class ExportedStaticLength { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + [FunctionPropertyNames.length]: string; // ok +} + +module TestOnDefaultExportedClass_4 { + export default class StaticLengthFn { + static length() {} // error without useDefineForClassFields + length() {} // ok + } +} + +export class ExportedStaticLengthFn { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + [FunctionPropertyNames.length]() {} // ok +} + +// prototype +module TestOnDefaultExportedClass_5 { + export default class StaticPrototype { + static prototype: number; // always an error + prototype: string; // ok + } +} + +export class ExportedStaticPrototype { + static [FunctionPropertyNames.prototype]: number; // always an error + [FunctionPropertyNames.prototype]: string; // ok +} + +module TestOnDefaultExportedClass_6 { + export default class StaticPrototypeFn { + static prototype() {} // always an error + prototype() {} // ok + } +} + +export class ExportedStaticPrototypeFn { + static [FunctionPropertyNames.prototype]() {} // always an error + [FunctionPropertyNames.prototype]() {} // ok +} + +// caller +module TestOnDefaultExportedClass_7 { + export default class StaticCaller { + static caller: number; // error without useDefineForClassFields + caller: string; // ok + } +} + +export class ExportedStaticCaller { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + [FunctionPropertyNames.caller]: string; // ok +} + +module TestOnDefaultExportedClass_8 { + export default class StaticCallerFn { + static caller() {} // error without useDefineForClassFields + caller() {} // ok + } +} + +export class ExportedStaticCallerFn { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + [FunctionPropertyNames.caller]() {} // ok +} + +// arguments +module TestOnDefaultExportedClass_9 { + export default class StaticArguments { + static arguments: number; // error without useDefineForClassFields + arguments: string; // ok + } +} + +export class ExportedStaticArguments { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + [FunctionPropertyNames.arguments]: string; // ok +} + +module TestOnDefaultExportedClass_10 { + export default class StaticArgumentsFn { + static arguments() {} // error without useDefineForClassFields + arguments() {} // ok + } +} + +export class ExportedStaticArgumentsFn { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + [FunctionPropertyNames.arguments]() {} // ok +} + +/// [Declarations] //// + + + +//// [/.src/staticPropertyNameConflicts.d.ts] +declare const FunctionPropertyNames: { + readonly name: "name"; + readonly length: "length"; + readonly prototype: "prototype"; + readonly caller: "caller"; + readonly arguments: "arguments"; +}; +export declare class ExportedStaticName { + static [FunctionPropertyNames.name]: number; + [FunctionPropertyNames.name]: string; +} +export declare class ExportedStaticNameFn { + static [FunctionPropertyNames.name](): invalid; + [FunctionPropertyNames.name](): invalid; +} +export declare class ExportedStaticLength { + static [FunctionPropertyNames.length]: number; + [FunctionPropertyNames.length]: string; +} +export declare class ExportedStaticLengthFn { + static [FunctionPropertyNames.length](): invalid; + [FunctionPropertyNames.length](): invalid; +} +export declare class ExportedStaticPrototype { + static [FunctionPropertyNames.prototype]: number; + [FunctionPropertyNames.prototype]: string; +} +export declare class ExportedStaticPrototypeFn { + static [FunctionPropertyNames.prototype](): invalid; + [FunctionPropertyNames.prototype](): invalid; +} +export declare class ExportedStaticCaller { + static [FunctionPropertyNames.caller]: number; + [FunctionPropertyNames.caller]: string; +} +export declare class ExportedStaticCallerFn { + static [FunctionPropertyNames.caller](): invalid; + [FunctionPropertyNames.caller](): invalid; +} +export declare class ExportedStaticArguments { + static [FunctionPropertyNames.arguments]: number; + [FunctionPropertyNames.arguments]: string; +} +export declare class ExportedStaticArgumentsFn { + static [FunctionPropertyNames.arguments](): invalid; + [FunctionPropertyNames.arguments](): invalid; +} +export {}; +/// [Errors] //// + +staticPropertyNameConflicts.ts(11,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. +staticPropertyNameConflicts.ts(16,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName2'. +staticPropertyNameConflicts.ts(21,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. +staticPropertyNameConflicts.ts(26,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn2'. +staticPropertyNameConflicts.ts(32,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. +staticPropertyNameConflicts.ts(37,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength2'. +staticPropertyNameConflicts.ts(42,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. +staticPropertyNameConflicts.ts(47,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn2'. +staticPropertyNameConflicts.ts(53,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. +staticPropertyNameConflicts.ts(58,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype2'. +staticPropertyNameConflicts.ts(63,12): error TS2300: Duplicate identifier 'prototype'. +staticPropertyNameConflicts.ts(63,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. +staticPropertyNameConflicts.ts(68,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. +staticPropertyNameConflicts.ts(68,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn2'. +staticPropertyNameConflicts.ts(74,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. +staticPropertyNameConflicts.ts(79,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller2'. +staticPropertyNameConflicts.ts(84,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. +staticPropertyNameConflicts.ts(89,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn2'. +staticPropertyNameConflicts.ts(95,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. +staticPropertyNameConflicts.ts(100,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments2'. +staticPropertyNameConflicts.ts(105,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. +staticPropertyNameConflicts.ts(110,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn2'. +staticPropertyNameConflicts.ts(119,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName_Anonymous'. +staticPropertyNameConflicts.ts(124,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName_Anonymous2'. +staticPropertyNameConflicts.ts(129,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn_Anonymous'. +staticPropertyNameConflicts.ts(134,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn_Anonymous2'. +staticPropertyNameConflicts.ts(140,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength_Anonymous'. +staticPropertyNameConflicts.ts(145,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength_Anonymous2'. +staticPropertyNameConflicts.ts(150,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn_Anonymous'. +staticPropertyNameConflicts.ts(155,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn_Anonymous2'. +staticPropertyNameConflicts.ts(161,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous'. +staticPropertyNameConflicts.ts(166,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous2'. +staticPropertyNameConflicts.ts(171,12): error TS2300: Duplicate identifier 'prototype'. +staticPropertyNameConflicts.ts(171,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous'. +staticPropertyNameConflicts.ts(176,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. +staticPropertyNameConflicts.ts(176,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous2'. +staticPropertyNameConflicts.ts(182,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller_Anonymous'. +staticPropertyNameConflicts.ts(187,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller_Anonymous2'. +staticPropertyNameConflicts.ts(192,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn_Anonymous'. +staticPropertyNameConflicts.ts(197,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn_Anonymous2'. +staticPropertyNameConflicts.ts(203,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments_Anonymous'. +staticPropertyNameConflicts.ts(208,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments_Anonymous2'. +staticPropertyNameConflicts.ts(213,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn_Anonymous'. +staticPropertyNameConflicts.ts(218,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn_Anonymous2'. +staticPropertyNameConflicts.ts(228,16): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. +staticPropertyNameConflicts.ts(234,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticName'. +staticPropertyNameConflicts.ts(240,16): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. +staticPropertyNameConflicts.ts(246,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticNameFn'. +staticPropertyNameConflicts.ts(246,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(247,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(252,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(253,16): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. +staticPropertyNameConflicts.ts(259,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLength'. +staticPropertyNameConflicts.ts(264,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(265,16): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. +staticPropertyNameConflicts.ts(271,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLengthFn'. +staticPropertyNameConflicts.ts(271,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(272,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. +staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. +staticPropertyNameConflicts.ts(284,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(289,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prototype'. +staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. +staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. +staticPropertyNameConflicts.ts(296,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. +staticPropertyNameConflicts.ts(296,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(297,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(302,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(303,16): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. +staticPropertyNameConflicts.ts(309,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCaller'. +staticPropertyNameConflicts.ts(314,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(315,16): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. +staticPropertyNameConflicts.ts(321,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCallerFn'. +staticPropertyNameConflicts.ts(321,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(322,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(327,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(328,16): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. +staticPropertyNameConflicts.ts(334,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArguments'. +staticPropertyNameConflicts.ts(339,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(340,16): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. +staticPropertyNameConflicts.ts(346,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArgumentsFn'. +staticPropertyNameConflicts.ts(346,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== staticPropertyNameConflicts.ts (85 errors) ==== + const FunctionPropertyNames = { + name: 'name', + length: 'length', + prototype: 'prototype', + caller: 'caller', + arguments: 'arguments', + } as const; + + // name + class StaticName { + static name: number; // error without useDefineForClassFields + ~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. + name: string; // ok + } + + class StaticName2 { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName2'. + [FunctionPropertyNames.name]: number; // ok + } + + class StaticNameFn { + static name() {} // error without useDefineForClassFields + ~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. + name() {} // ok + } + + class StaticNameFn2 { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn2'. + [FunctionPropertyNames.name]() {} // ok + } + + // length + class StaticLength { + static length: number; // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. + length: string; // ok + } + + class StaticLength2 { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength2'. + [FunctionPropertyNames.length]: number; // ok + } + + class StaticLengthFn { + static length() {} // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. + length() {} // ok + } + + class StaticLengthFn2 { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn2'. + [FunctionPropertyNames.length]() {} // ok + } + + // prototype + class StaticPrototype { + static prototype: number; // always an error + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. + prototype: string; // ok + } + + class StaticPrototype2 { + static [FunctionPropertyNames.prototype]: number; // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype2'. + [FunctionPropertyNames.prototype]: string; // ok + } + + class StaticPrototypeFn { + static prototype() {} // always an error + ~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'prototype'. + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. + prototype() {} // ok + } + + class StaticPrototypeFn2 { + static [FunctionPropertyNames.prototype]() {} // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn2'. + [FunctionPropertyNames.prototype]() {} // ok + } + + // caller + class StaticCaller { + static caller: number; // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. + caller: string; // ok + } + + class StaticCaller2 { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller2'. + [FunctionPropertyNames.caller]: string; // ok + } + + class StaticCallerFn { + static caller() {} // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. + caller() {} // ok + } + + class StaticCallerFn2 { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn2'. + [FunctionPropertyNames.caller]() {} // ok + } + + // arguments + class StaticArguments { + static arguments: number; // error without useDefineForClassFields + ~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. + arguments: string; // ok + } + + class StaticArguments2 { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments2'. + [FunctionPropertyNames.arguments]: string; // ok + } + + class StaticArgumentsFn { + static arguments() {} // error without useDefineForClassFields + ~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. + arguments() {} // ok + } + + class StaticArgumentsFn2 { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn2'. + [FunctionPropertyNames.arguments]() {} // ok + } + + + // === Static properties on anonymous classes === + + // name + var StaticName_Anonymous = class { + static name: number; // error without useDefineForClassFields + ~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName_Anonymous'. + name: string; // ok + } + + var StaticName_Anonymous2 = class { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName_Anonymous2'. + [FunctionPropertyNames.name]: string; // ok + } + + var StaticNameFn_Anonymous = class { + static name() {} // error without useDefineForClassFields + ~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn_Anonymous'. + name() {} // ok + } + + var StaticNameFn_Anonymous2 = class { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn_Anonymous2'. + [FunctionPropertyNames.name]() {} // ok + } + + // length + var StaticLength_Anonymous = class { + static length: number; // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength_Anonymous'. + length: string; // ok + } + + var StaticLength_Anonymous2 = class { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength_Anonymous2'. + [FunctionPropertyNames.length]: string; // ok + } + + var StaticLengthFn_Anonymous = class { + static length() {} // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn_Anonymous'. + length() {} // ok + } + + var StaticLengthFn_Anonymous2 = class { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn_Anonymous2'. + [FunctionPropertyNames.length]() {} // ok + } + + // prototype + var StaticPrototype_Anonymous = class { + static prototype: number; // always an error + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous'. + prototype: string; // ok + } + + var StaticPrototype_Anonymous2 = class { + static [FunctionPropertyNames.prototype]: number; // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous2'. + [FunctionPropertyNames.prototype]: string; // ok + } + + var StaticPrototypeFn_Anonymous = class { + static prototype() {} // always an error + ~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'prototype'. + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous'. + prototype() {} // ok + } + + var StaticPrototypeFn_Anonymous2 = class { + static [FunctionPropertyNames.prototype]() {} // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous2'. + [FunctionPropertyNames.prototype]() {} // ok + } + + // caller + var StaticCaller_Anonymous = class { + static caller: number; // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller_Anonymous'. + caller: string; // ok + } + + var StaticCaller_Anonymous2 = class { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller_Anonymous2'. + [FunctionPropertyNames.caller]: string; // ok + } + + var StaticCallerFn_Anonymous = class { + static caller() {} // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn_Anonymous'. + caller() {} // ok + } + + var StaticCallerFn_Anonymous2 = class { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn_Anonymous2'. + [FunctionPropertyNames.caller]() {} // ok + } + + // arguments + var StaticArguments_Anonymous = class { + static arguments: number; // error without useDefineForClassFields + ~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments_Anonymous'. + arguments: string; // ok + } + + var StaticArguments_Anonymous2 = class { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments_Anonymous2'. + [FunctionPropertyNames.arguments]: string; // ok + } + + var StaticArgumentsFn_Anonymous = class { + static arguments() {} // error without useDefineForClassFields + ~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn_Anonymous'. + arguments() {} // ok + } + + var StaticArgumentsFn_Anonymous2 = class { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn_Anonymous2'. + [FunctionPropertyNames.arguments]() {} // ok + } + + + // === Static properties on default exported classes === + + // name + module TestOnDefaultExportedClass_1 { + class StaticName { + static name: number; // error without useDefineForClassFields + ~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. + name: string; // ok + } + } + + export class ExportedStaticName { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticName'. + [FunctionPropertyNames.name]: string; // ok + } + + module TestOnDefaultExportedClass_2 { + class StaticNameFn { + static name() {} // error without useDefineForClassFields + ~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. + name() {} // ok + } + } + + export class ExportedStaticNameFn { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticNameFn'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.name]() {} // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // length + module TestOnDefaultExportedClass_3 { + export default class StaticLength { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static length: number; // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. + length: string; // ok + } + } + + export class ExportedStaticLength { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLength'. + [FunctionPropertyNames.length]: string; // ok + } + + module TestOnDefaultExportedClass_4 { + export default class StaticLengthFn { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static length() {} // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. + length() {} // ok + } + } + + export class ExportedStaticLengthFn { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLengthFn'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.length]() {} // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // prototype + module TestOnDefaultExportedClass_5 { + export default class StaticPrototype { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static prototype: number; // always an error + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. + prototype: string; // ok + } + } + + export class ExportedStaticPrototype { + static [FunctionPropertyNames.prototype]: number; // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.prototype]: string; // ok + } + + module TestOnDefaultExportedClass_6 { + export default class StaticPrototypeFn { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static prototype() {} // always an error + ~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'prototype'. + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. + prototype() {} // ok + } + } + + export class ExportedStaticPrototypeFn { + static [FunctionPropertyNames.prototype]() {} // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.prototype]() {} // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // caller + module TestOnDefaultExportedClass_7 { + export default class StaticCaller { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static caller: number; // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. + caller: string; // ok + } + } + + export class ExportedStaticCaller { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCaller'. + [FunctionPropertyNames.caller]: string; // ok + } + + module TestOnDefaultExportedClass_8 { + export default class StaticCallerFn { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static caller() {} // error without useDefineForClassFields + ~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. + caller() {} // ok + } + } + + export class ExportedStaticCallerFn { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCallerFn'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.caller]() {} // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // arguments + module TestOnDefaultExportedClass_9 { + export default class StaticArguments { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static arguments: number; // error without useDefineForClassFields + ~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. + arguments: string; // ok + } + } + + export class ExportedStaticArguments { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArguments'. + [FunctionPropertyNames.arguments]: string; // ok + } + + module TestOnDefaultExportedClass_10 { + export default class StaticArgumentsFn { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static arguments() {} // error without useDefineForClassFields + ~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. + arguments() {} // ok + } + } + + export class ExportedStaticArgumentsFn { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArgumentsFn'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.arguments]() {} // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts new file mode 100644 index 0000000000000..1ce33479d6447 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts @@ -0,0 +1,869 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts] //// + +//// [staticPropertyNameConflicts.ts] +const FunctionPropertyNames = { + name: 'name', + length: 'length', + prototype: 'prototype', + caller: 'caller', + arguments: 'arguments', +} as const; + +// name +class StaticName { + static name: number; // error without useDefineForClassFields + name: string; // ok +} + +class StaticName2 { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + [FunctionPropertyNames.name]: number; // ok +} + +class StaticNameFn { + static name() {} // error without useDefineForClassFields + name() {} // ok +} + +class StaticNameFn2 { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + [FunctionPropertyNames.name]() {} // ok +} + +// length +class StaticLength { + static length: number; // error without useDefineForClassFields + length: string; // ok +} + +class StaticLength2 { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + [FunctionPropertyNames.length]: number; // ok +} + +class StaticLengthFn { + static length() {} // error without useDefineForClassFields + length() {} // ok +} + +class StaticLengthFn2 { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + [FunctionPropertyNames.length]() {} // ok +} + +// prototype +class StaticPrototype { + static prototype: number; // always an error + prototype: string; // ok +} + +class StaticPrototype2 { + static [FunctionPropertyNames.prototype]: number; // always an error + [FunctionPropertyNames.prototype]: string; // ok +} + +class StaticPrototypeFn { + static prototype() {} // always an error + prototype() {} // ok +} + +class StaticPrototypeFn2 { + static [FunctionPropertyNames.prototype]() {} // always an error + [FunctionPropertyNames.prototype]() {} // ok +} + +// caller +class StaticCaller { + static caller: number; // error without useDefineForClassFields + caller: string; // ok +} + +class StaticCaller2 { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + [FunctionPropertyNames.caller]: string; // ok +} + +class StaticCallerFn { + static caller() {} // error without useDefineForClassFields + caller() {} // ok +} + +class StaticCallerFn2 { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + [FunctionPropertyNames.caller]() {} // ok +} + +// arguments +class StaticArguments { + static arguments: number; // error without useDefineForClassFields + arguments: string; // ok +} + +class StaticArguments2 { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + [FunctionPropertyNames.arguments]: string; // ok +} + +class StaticArgumentsFn { + static arguments() {} // error without useDefineForClassFields + arguments() {} // ok +} + +class StaticArgumentsFn2 { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + [FunctionPropertyNames.arguments]() {} // ok +} + + +// === Static properties on anonymous classes === + +// name +var StaticName_Anonymous = class { + static name: number; // error without useDefineForClassFields + name: string; // ok +} + +var StaticName_Anonymous2 = class { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + [FunctionPropertyNames.name]: string; // ok +} + +var StaticNameFn_Anonymous = class { + static name() {} // error without useDefineForClassFields + name() {} // ok +} + +var StaticNameFn_Anonymous2 = class { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + [FunctionPropertyNames.name]() {} // ok +} + +// length +var StaticLength_Anonymous = class { + static length: number; // error without useDefineForClassFields + length: string; // ok +} + +var StaticLength_Anonymous2 = class { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + [FunctionPropertyNames.length]: string; // ok +} + +var StaticLengthFn_Anonymous = class { + static length() {} // error without useDefineForClassFields + length() {} // ok +} + +var StaticLengthFn_Anonymous2 = class { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + [FunctionPropertyNames.length]() {} // ok +} + +// prototype +var StaticPrototype_Anonymous = class { + static prototype: number; // always an error + prototype: string; // ok +} + +var StaticPrototype_Anonymous2 = class { + static [FunctionPropertyNames.prototype]: number; // always an error + [FunctionPropertyNames.prototype]: string; // ok +} + +var StaticPrototypeFn_Anonymous = class { + static prototype() {} // always an error + prototype() {} // ok +} + +var StaticPrototypeFn_Anonymous2 = class { + static [FunctionPropertyNames.prototype]() {} // always an error + [FunctionPropertyNames.prototype]() {} // ok +} + +// caller +var StaticCaller_Anonymous = class { + static caller: number; // error without useDefineForClassFields + caller: string; // ok +} + +var StaticCaller_Anonymous2 = class { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + [FunctionPropertyNames.caller]: string; // ok +} + +var StaticCallerFn_Anonymous = class { + static caller() {} // error without useDefineForClassFields + caller() {} // ok +} + +var StaticCallerFn_Anonymous2 = class { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + [FunctionPropertyNames.caller]() {} // ok +} + +// arguments +var StaticArguments_Anonymous = class { + static arguments: number; // error without useDefineForClassFields + arguments: string; // ok +} + +var StaticArguments_Anonymous2 = class { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + [FunctionPropertyNames.arguments]: string; // ok +} + +var StaticArgumentsFn_Anonymous = class { + static arguments() {} // error without useDefineForClassFields + arguments() {} // ok +} + +var StaticArgumentsFn_Anonymous2 = class { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + [FunctionPropertyNames.arguments]() {} // ok +} + + +// === Static properties on default exported classes === + +// name +module TestOnDefaultExportedClass_1 { + class StaticName { + static name: number; // error without useDefineForClassFields + name: string; // ok + } +} + +export class ExportedStaticName { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + [FunctionPropertyNames.name]: string; // ok +} + +module TestOnDefaultExportedClass_2 { + class StaticNameFn { + static name() {} // error without useDefineForClassFields + name() {} // ok + } +} + +export class ExportedStaticNameFn { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + [FunctionPropertyNames.name]() {} // ok +} + +// length +module TestOnDefaultExportedClass_3 { + export default class StaticLength { + static length: number; // error without useDefineForClassFields + length: string; // ok + } +} + +export class ExportedStaticLength { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + [FunctionPropertyNames.length]: string; // ok +} + +module TestOnDefaultExportedClass_4 { + export default class StaticLengthFn { + static length() {} // error without useDefineForClassFields + length() {} // ok + } +} + +export class ExportedStaticLengthFn { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + [FunctionPropertyNames.length]() {} // ok +} + +// prototype +module TestOnDefaultExportedClass_5 { + export default class StaticPrototype { + static prototype: number; // always an error + prototype: string; // ok + } +} + +export class ExportedStaticPrototype { + static [FunctionPropertyNames.prototype]: number; // always an error + [FunctionPropertyNames.prototype]: string; // ok +} + +module TestOnDefaultExportedClass_6 { + export default class StaticPrototypeFn { + static prototype() {} // always an error + prototype() {} // ok + } +} + +export class ExportedStaticPrototypeFn { + static [FunctionPropertyNames.prototype]() {} // always an error + [FunctionPropertyNames.prototype]() {} // ok +} + +// caller +module TestOnDefaultExportedClass_7 { + export default class StaticCaller { + static caller: number; // error without useDefineForClassFields + caller: string; // ok + } +} + +export class ExportedStaticCaller { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + [FunctionPropertyNames.caller]: string; // ok +} + +module TestOnDefaultExportedClass_8 { + export default class StaticCallerFn { + static caller() {} // error without useDefineForClassFields + caller() {} // ok + } +} + +export class ExportedStaticCallerFn { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + [FunctionPropertyNames.caller]() {} // ok +} + +// arguments +module TestOnDefaultExportedClass_9 { + export default class StaticArguments { + static arguments: number; // error without useDefineForClassFields + arguments: string; // ok + } +} + +export class ExportedStaticArguments { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + [FunctionPropertyNames.arguments]: string; // ok +} + +module TestOnDefaultExportedClass_10 { + export default class StaticArgumentsFn { + static arguments() {} // error without useDefineForClassFields + arguments() {} // ok + } +} + +export class ExportedStaticArgumentsFn { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + [FunctionPropertyNames.arguments]() {} // ok +} + +/// [Declarations] //// + + + +//// [/.src/staticPropertyNameConflicts.d.ts] +declare const FunctionPropertyNames: { + readonly name: "name"; + readonly length: "length"; + readonly prototype: "prototype"; + readonly caller: "caller"; + readonly arguments: "arguments"; +}; +export declare class ExportedStaticName { + static [FunctionPropertyNames.name]: number; + [FunctionPropertyNames.name]: string; +} +export declare class ExportedStaticNameFn { + static [FunctionPropertyNames.name](): invalid; + [FunctionPropertyNames.name](): invalid; +} +export declare class ExportedStaticLength { + static [FunctionPropertyNames.length]: number; + [FunctionPropertyNames.length]: string; +} +export declare class ExportedStaticLengthFn { + static [FunctionPropertyNames.length](): invalid; + [FunctionPropertyNames.length](): invalid; +} +export declare class ExportedStaticPrototype { + static [FunctionPropertyNames.prototype]: number; + [FunctionPropertyNames.prototype]: string; +} +export declare class ExportedStaticPrototypeFn { + static [FunctionPropertyNames.prototype](): invalid; + [FunctionPropertyNames.prototype](): invalid; +} +export declare class ExportedStaticCaller { + static [FunctionPropertyNames.caller]: number; + [FunctionPropertyNames.caller]: string; +} +export declare class ExportedStaticCallerFn { + static [FunctionPropertyNames.caller](): invalid; + [FunctionPropertyNames.caller](): invalid; +} +export declare class ExportedStaticArguments { + static [FunctionPropertyNames.arguments]: number; + [FunctionPropertyNames.arguments]: string; +} +export declare class ExportedStaticArgumentsFn { + static [FunctionPropertyNames.arguments](): invalid; + [FunctionPropertyNames.arguments](): invalid; +} +export {}; +/// [Errors] //// + +staticPropertyNameConflicts.ts(53,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. +staticPropertyNameConflicts.ts(58,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype2'. +staticPropertyNameConflicts.ts(63,12): error TS2300: Duplicate identifier 'prototype'. +staticPropertyNameConflicts.ts(63,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. +staticPropertyNameConflicts.ts(68,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. +staticPropertyNameConflicts.ts(68,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn2'. +staticPropertyNameConflicts.ts(161,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous'. +staticPropertyNameConflicts.ts(166,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous2'. +staticPropertyNameConflicts.ts(171,12): error TS2300: Duplicate identifier 'prototype'. +staticPropertyNameConflicts.ts(171,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous'. +staticPropertyNameConflicts.ts(176,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. +staticPropertyNameConflicts.ts(176,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous2'. +staticPropertyNameConflicts.ts(246,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(247,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(252,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(264,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(271,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(272,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. +staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. +staticPropertyNameConflicts.ts(284,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(289,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prototype'. +staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. +staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. +staticPropertyNameConflicts.ts(296,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. +staticPropertyNameConflicts.ts(296,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(297,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(302,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(314,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(321,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(322,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(327,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(339,12): error TS1319: A default export can only be used in an ECMAScript-style module. +staticPropertyNameConflicts.ts(346,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== staticPropertyNameConflicts.ts (37 errors) ==== + const FunctionPropertyNames = { + name: 'name', + length: 'length', + prototype: 'prototype', + caller: 'caller', + arguments: 'arguments', + } as const; + + // name + class StaticName { + static name: number; // error without useDefineForClassFields + name: string; // ok + } + + class StaticName2 { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + [FunctionPropertyNames.name]: number; // ok + } + + class StaticNameFn { + static name() {} // error without useDefineForClassFields + name() {} // ok + } + + class StaticNameFn2 { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + [FunctionPropertyNames.name]() {} // ok + } + + // length + class StaticLength { + static length: number; // error without useDefineForClassFields + length: string; // ok + } + + class StaticLength2 { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + [FunctionPropertyNames.length]: number; // ok + } + + class StaticLengthFn { + static length() {} // error without useDefineForClassFields + length() {} // ok + } + + class StaticLengthFn2 { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + [FunctionPropertyNames.length]() {} // ok + } + + // prototype + class StaticPrototype { + static prototype: number; // always an error + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. + prototype: string; // ok + } + + class StaticPrototype2 { + static [FunctionPropertyNames.prototype]: number; // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype2'. + [FunctionPropertyNames.prototype]: string; // ok + } + + class StaticPrototypeFn { + static prototype() {} // always an error + ~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'prototype'. + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. + prototype() {} // ok + } + + class StaticPrototypeFn2 { + static [FunctionPropertyNames.prototype]() {} // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn2'. + [FunctionPropertyNames.prototype]() {} // ok + } + + // caller + class StaticCaller { + static caller: number; // error without useDefineForClassFields + caller: string; // ok + } + + class StaticCaller2 { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + [FunctionPropertyNames.caller]: string; // ok + } + + class StaticCallerFn { + static caller() {} // error without useDefineForClassFields + caller() {} // ok + } + + class StaticCallerFn2 { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + [FunctionPropertyNames.caller]() {} // ok + } + + // arguments + class StaticArguments { + static arguments: number; // error without useDefineForClassFields + arguments: string; // ok + } + + class StaticArguments2 { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + [FunctionPropertyNames.arguments]: string; // ok + } + + class StaticArgumentsFn { + static arguments() {} // error without useDefineForClassFields + arguments() {} // ok + } + + class StaticArgumentsFn2 { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + [FunctionPropertyNames.arguments]() {} // ok + } + + + // === Static properties on anonymous classes === + + // name + var StaticName_Anonymous = class { + static name: number; // error without useDefineForClassFields + name: string; // ok + } + + var StaticName_Anonymous2 = class { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + [FunctionPropertyNames.name]: string; // ok + } + + var StaticNameFn_Anonymous = class { + static name() {} // error without useDefineForClassFields + name() {} // ok + } + + var StaticNameFn_Anonymous2 = class { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + [FunctionPropertyNames.name]() {} // ok + } + + // length + var StaticLength_Anonymous = class { + static length: number; // error without useDefineForClassFields + length: string; // ok + } + + var StaticLength_Anonymous2 = class { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + [FunctionPropertyNames.length]: string; // ok + } + + var StaticLengthFn_Anonymous = class { + static length() {} // error without useDefineForClassFields + length() {} // ok + } + + var StaticLengthFn_Anonymous2 = class { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + [FunctionPropertyNames.length]() {} // ok + } + + // prototype + var StaticPrototype_Anonymous = class { + static prototype: number; // always an error + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous'. + prototype: string; // ok + } + + var StaticPrototype_Anonymous2 = class { + static [FunctionPropertyNames.prototype]: number; // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous2'. + [FunctionPropertyNames.prototype]: string; // ok + } + + var StaticPrototypeFn_Anonymous = class { + static prototype() {} // always an error + ~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'prototype'. + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous'. + prototype() {} // ok + } + + var StaticPrototypeFn_Anonymous2 = class { + static [FunctionPropertyNames.prototype]() {} // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous2'. + [FunctionPropertyNames.prototype]() {} // ok + } + + // caller + var StaticCaller_Anonymous = class { + static caller: number; // error without useDefineForClassFields + caller: string; // ok + } + + var StaticCaller_Anonymous2 = class { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + [FunctionPropertyNames.caller]: string; // ok + } + + var StaticCallerFn_Anonymous = class { + static caller() {} // error without useDefineForClassFields + caller() {} // ok + } + + var StaticCallerFn_Anonymous2 = class { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + [FunctionPropertyNames.caller]() {} // ok + } + + // arguments + var StaticArguments_Anonymous = class { + static arguments: number; // error without useDefineForClassFields + arguments: string; // ok + } + + var StaticArguments_Anonymous2 = class { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + [FunctionPropertyNames.arguments]: string; // ok + } + + var StaticArgumentsFn_Anonymous = class { + static arguments() {} // error without useDefineForClassFields + arguments() {} // ok + } + + var StaticArgumentsFn_Anonymous2 = class { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + [FunctionPropertyNames.arguments]() {} // ok + } + + + // === Static properties on default exported classes === + + // name + module TestOnDefaultExportedClass_1 { + class StaticName { + static name: number; // error without useDefineForClassFields + name: string; // ok + } + } + + export class ExportedStaticName { + static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields + [FunctionPropertyNames.name]: string; // ok + } + + module TestOnDefaultExportedClass_2 { + class StaticNameFn { + static name() {} // error without useDefineForClassFields + name() {} // ok + } + } + + export class ExportedStaticNameFn { + static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.name]() {} // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // length + module TestOnDefaultExportedClass_3 { + export default class StaticLength { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static length: number; // error without useDefineForClassFields + length: string; // ok + } + } + + export class ExportedStaticLength { + static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields + [FunctionPropertyNames.length]: string; // ok + } + + module TestOnDefaultExportedClass_4 { + export default class StaticLengthFn { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static length() {} // error without useDefineForClassFields + length() {} // ok + } + } + + export class ExportedStaticLengthFn { + static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.length]() {} // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // prototype + module TestOnDefaultExportedClass_5 { + export default class StaticPrototype { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static prototype: number; // always an error + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. + prototype: string; // ok + } + } + + export class ExportedStaticPrototype { + static [FunctionPropertyNames.prototype]: number; // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.prototype]: string; // ok + } + + module TestOnDefaultExportedClass_6 { + export default class StaticPrototypeFn { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static prototype() {} // always an error + ~~~~~~~~~ +!!! error TS2300: Duplicate identifier 'prototype'. + ~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. + prototype() {} // ok + } + } + + export class ExportedStaticPrototypeFn { + static [FunctionPropertyNames.prototype]() {} // always an error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.prototype]() {} // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // caller + module TestOnDefaultExportedClass_7 { + export default class StaticCaller { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static caller: number; // error without useDefineForClassFields + caller: string; // ok + } + } + + export class ExportedStaticCaller { + static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields + [FunctionPropertyNames.caller]: string; // ok + } + + module TestOnDefaultExportedClass_8 { + export default class StaticCallerFn { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static caller() {} // error without useDefineForClassFields + caller() {} // ok + } + } + + export class ExportedStaticCallerFn { + static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.caller]() {} // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // arguments + module TestOnDefaultExportedClass_9 { + export default class StaticArguments { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static arguments: number; // error without useDefineForClassFields + arguments: string; // ok + } + } + + export class ExportedStaticArguments { + static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields + [FunctionPropertyNames.arguments]: string; // ok + } + + module TestOnDefaultExportedClass_10 { + export default class StaticArgumentsFn { + ~~~~~~~ +!!! error TS1319: A default export can only be used in an ECMAScript-style module. + static arguments() {} // error without useDefineForClassFields + arguments() {} // ok + } + } + + export class ExportedStaticArgumentsFn { + static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [FunctionPropertyNames.arguments]() {} // ok + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts new file mode 100644 index 0000000000000..f3b75dcf6c0e9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/es6/Symbols/symbolProperty1.ts] //// + +//// [symbolProperty1.ts] +var s: symbol; +var x = { + [s]: 0, + [s]() { }, + get [s]() { + return 0; + } +} + +/// [Declarations] //// + + + +//// [/.src/symbolProperty1.d.ts] +declare var s: symbol; +declare var x: invalid; +/// [Errors] //// + +symbolProperty1.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty1.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty1.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== symbolProperty1.ts (3 errors) ==== + var s: symbol; + var x = { + [s]: 0, + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [s]() { }, + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + get [s]() { + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return 0; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts new file mode 100644 index 0000000000000..d5737bad3427e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts @@ -0,0 +1,44 @@ +//// [tests/cases/conformance/es6/Symbols/symbolProperty2.ts] //// + +//// [symbolProperty2.ts] +var s = Symbol(); +var x = { + [s]: 0, + [s]() { }, + get [s]() { + return 0; + } +} + +/// [Declarations] //// + + + +//// [/.src/symbolProperty2.d.ts] +declare var s: invalid; +declare var x: invalid; +/// [Errors] //// + +symbolProperty2.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty2.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty2.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty2.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== symbolProperty2.ts (4 errors) ==== + var s = Symbol(); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x = { + [s]: 0, + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [s]() { }, + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + get [s]() { + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return 0; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts new file mode 100644 index 0000000000000..76a1b3ea653ef --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts @@ -0,0 +1,53 @@ +//// [tests/cases/conformance/es6/Symbols/symbolProperty3.ts] //// + +//// [symbolProperty3.ts] +var s = Symbol; +var x = { + [s]: 0, + [s]() { }, + get [s]() { + return 0; + } +} + +/// [Declarations] //// + + + +//// [/.src/symbolProperty3.d.ts] +declare var s: invalid; +declare var x: invalid; +/// [Errors] //// + +symbolProperty3.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty3.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +symbolProperty3.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty3.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +symbolProperty3.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty3.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +symbolProperty3.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== symbolProperty3.ts (7 errors) ==== + var s = Symbol; + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x = { + [s]: 0, + ~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [s]() { }, + ~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + get [s]() { + ~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return 0; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment36.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment36.d.ts new file mode 100644 index 0000000000000..d1cc827c20dc4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment36.d.ts @@ -0,0 +1,191 @@ +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts] //// + +//// [typeFromPropertyAssignment36.ts] +function f(b: boolean) { + function d() { + } + d.e = 12 + d.e + + if (b) { + d.q = false + } + // error d.q might not be assigned + d.q + if (b) { + d.q = false + } + else { + d.q = true + } + d.q + if (b) { + d.r = 1 + } + else { + d.r = 2 + } + d.r + if (b) { + d.s = 'hi' + } + return d +} +// OK to access possibly-unassigned properties outside the initialising scope +var test = f(true).s + +function d() { +} +d.e = 12 +d.e + +if (!!false) { + d.q = false +} +d.q +if (!!false) { + d.q = false +} +else { + d.q = true +} +d.q +if (!!false) { + d.r = 1 +} +else { + d.r = 2 +} +d.r + +// test function expressions too +const g = function() { +} +if (!!false) { + g.expando = 1 +} +g.expando // error + +if (!!false) { + g.both = 'hi' +} +else { + g.both = 0 +} +g.both + + +/// [Declarations] //// + + + +//// [/.src/typeFromPropertyAssignment36.d.ts] +declare function f(b: boolean): invalid; +declare var test: invalid; +declare function d(): invalid; +declare const g: invalid; +/// [Errors] //// + +typeFromPropertyAssignment36.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +typeFromPropertyAssignment36.ts(11,7): error TS2565: Property 'q' is used before being assigned. +typeFromPropertyAssignment36.ts(32,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +typeFromPropertyAssignment36.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +typeFromPropertyAssignment36.ts(34,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +typeFromPropertyAssignment36.ts(42,3): error TS2565: Property 'q' is used before being assigned. +typeFromPropertyAssignment36.ts(59,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +typeFromPropertyAssignment36.ts(59,7): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +typeFromPropertyAssignment36.ts(64,3): error TS2565: Property 'expando' is used before being assigned. + + +==== typeFromPropertyAssignment36.ts (9 errors) ==== + function f(b: boolean) { + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function d() { + } + d.e = 12 + d.e + + if (b) { + d.q = false + } + // error d.q might not be assigned + d.q + ~ +!!! error TS2565: Property 'q' is used before being assigned. + if (b) { + d.q = false + } + else { + d.q = true + } + d.q + if (b) { + d.r = 1 + } + else { + d.r = 2 + } + d.r + if (b) { + d.s = 'hi' + } + return d + } + // OK to access possibly-unassigned properties outside the initialising scope + var test = f(true).s + ~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + function d() { + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + } + d.e = 12 + d.e + + if (!!false) { + d.q = false + } + d.q + ~ +!!! error TS2565: Property 'q' is used before being assigned. + if (!!false) { + d.q = false + } + else { + d.q = true + } + d.q + if (!!false) { + d.r = 1 + } + else { + d.r = 2 + } + d.r + + // test function expressions too + const g = function() { + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + } + if (!!false) { + g.expando = 1 + } + g.expando // error + ~~~~~~~ +!!! error TS2565: Property 'expando' is used before being assigned. + + if (!!false) { + g.both = 'hi' + } + else { + g.both = 0 + } + g.both + \ 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..9e4763f69a7ab --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives11.d.ts @@ -0,0 +1,42 @@ +//// [tests/cases/compiler/typeReferenceDirectives11.ts] //// + +//// [/mod2.ts] +import {foo} from "./mod1"; +export const bar = foo(); + +//// [/types/lib/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 TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. +/mod2.ts(2,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== /mod2.ts (1 errors) ==== + import {foo} from "./mod1"; + export const bar = foo(); + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +==== /types/lib/index.d.ts (0 errors) ==== + interface Lib { x } + +==== /mod1.ts (1 errors) ==== + export function foo(): Lib { return {x: 1} } + ~~~ +!!! error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. + \ 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..c51d9da68f690 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives2.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/compiler/typeReferenceDirectives2.ts] //// + +//// [/app.ts] +interface A { + x: $ +} +//// [/types/lib/index.d.ts] +interface $ { x } + + +/// [Declarations] //// + + + +//// [/app.d.ts] +interface A { + x: $; +} +/// [Errors] //// + +/app.ts(2,8): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. + + +==== /app.ts (1 errors) ==== + interface A { + x: $ + ~ +!!! error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. + } +==== /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/typeReferenceDirectives8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts new file mode 100644 index 0000000000000..f938296e49a50 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/typeReferenceDirectives8.ts] //// + +//// [/mod2.ts] +import {foo} from "./mod1"; +export const bar = foo(); +//// [/types/lib/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 TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. +/mod2.ts(2,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== /mod2.ts (1 errors) ==== + import {foo} from "./mod1"; + export const bar = foo(); + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +==== /types/lib/index.d.ts (0 errors) ==== + interface Lib { x } + +==== /mod1.ts (1 errors) ==== + export function foo(): Lib { return {x: 1} } + ~~~ +!!! error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. + \ No newline at end of file From c20406ffbeaa428e1abd0d2c79875f5a833c1a24 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Mon, 30 Oct 2023 04:36:48 +0000 Subject: [PATCH 117/224] Fix typo Signed-off-by: Hana Joo --- external-declarations/src/test-runner/parallel-run.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/external-declarations/src/test-runner/parallel-run.ts b/external-declarations/src/test-runner/parallel-run.ts index c1540be7cfa60..9bbcfeb43bff6 100644 --- a/external-declarations/src/test-runner/parallel-run.ts +++ b/external-declarations/src/test-runner/parallel-run.ts @@ -67,7 +67,7 @@ async function main() { let lastWrite = new Date().getTime(); const startTime = new Date().getTime(); const elapsedTime = (now: number) => `${((now - startTime) / 1000 / 60).toFixed(2)} minutes`; - const promisees = Array.from({ length: shardCount }).map(async (_, index) => { + const promises = Array.from({ length: shardCount }).map(async (_, index) => { await exec(commandLine + ` --shard=${index}`, "./", out => { runCount += (out.match(/Ran:/g) || []).length; if (new Date().getTime() - lastWrite > 2000) { @@ -77,7 +77,7 @@ async function main() { }); console.log(`Shard ${index} completed`); }); - await Promise.all(promisees); + await Promise.all(promises); const endTime = new Date().getTime(); console.log(`Took ${elapsedTime(endTime)} to complete ${runCount}`); } From 1c7972fb1b0b1f51e5fdcc166a254d1e05cc3cf0 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Tue, 24 Oct 2023 17:11:52 +0000 Subject: [PATCH 118/224] Generate declaration map when --declarationMap option has been provided. Signed-off-by: Hana Joo --- .../declarations/transform-project.ts | 134 +++++++++++++++++- 1 file changed, 127 insertions(+), 7 deletions(-) diff --git a/src/compiler/transformers/declarations/transform-project.ts b/src/compiler/transformers/declarations/transform-project.ts index 13cfb7c3519ec..f2258b718fd7c 100644 --- a/src/compiler/transformers/declarations/transform-project.ts +++ b/src/compiler/transformers/declarations/transform-project.ts @@ -1,27 +1,41 @@ import { - changeAnyExtension, + base64encode, combinePaths, CompilerHost, CompilerOptions, createEmitDeclarationHost, createEmitDeclarationResolver, createPrinter, + createSourceMapGenerator, + createTextWriter, + Debug, Diagnostic, EmitHost, EmitResolver, + ensureTrailingDirectorySeparator, factory, getDeclarationEmitExtensionForPath, getNormalizedAbsolutePath, getRelativePathFromDirectory, + getBaseFileName, + getDirectoryPath, + getNewLineCharacter, + getOutputPathsFor, + getRelativePathToDirectoryOrUrl, + getRootLength, + getSourceFilePathInNewDir, NewLineKind, normalizePath, - pathIsAbsolute, + normalizeSlashes, PrinterOptions, ScriptTarget, SourceFile, + SourceMapGenerator, sys, TransformationContext, transformDeclarations, + pathIsAbsolute, + changeAnyExtension, } from "../../_namespaces/ts"; export function emitDeclarationsForProject( @@ -53,12 +67,15 @@ export function createIsolatedDeclarationsEmitter(rootDir: string, options: Comp if (!source) return {}; - const { code, diagnostics } = emitDeclarationsForFile(source, options); + const { code, diagnostics, declarationMap, declarationMapPath} = emitDeclarationsForFile(source, options); const extension = getDeclarationEmitExtensionForPath(file); const relativeToRoot = getRelativePathFromDirectory(rootDir, file, !host.useCaseSensitiveFileNames()); const declarationPath = !declarationDir ? file : getNormalizedAbsolutePath(combinePaths(declarationDir, relativeToRoot), host.getCurrentDirectory()); const output = changeAnyExtension(declarationPath, extension); host.writeFile(output, code, !!options.emitBOM); + if (declarationMap) { + host.writeFile(declarationMapPath!, declarationMap, !!options.emitBOM); + } return { output, diagnostics }; }; } @@ -71,7 +88,6 @@ function emitDeclarationsForAllFiles(rootDir: string, files: string[], host: Com } export function emitDeclarationsForFile(sourceFile: SourceFile, options: CompilerOptions) { - const getCompilerOptions = () => options; const emitHost = createEmitDeclarationHost(options, sys); const emitResolver = createEmitDeclarationResolver(sourceFile, emitHost); const diagnostics: Diagnostic[] = []; @@ -82,7 +98,9 @@ export function emitDeclarationsForFile(sourceFile: SourceFile, options: Compile getEmitResolver() { return emitResolver as EmitResolver; }, - getCompilerOptions, + getCompilerOptions() { + return options; + }, factory, addDiagnostic(diag: any) { diagnostics.push(diag); @@ -97,9 +115,111 @@ export function emitDeclarationsForFile(sourceFile: SourceFile, options: Compile removeComments: options.removeComments, } as PrinterOptions); - const code = printer.printFile(result); + const writer = createTextWriter(getNewLineCharacter(options)); + const sourceMap = getSourceMapGenerator(); + printer.writeFile(result, writer, sourceMap?.sourceMapGenerator); + if (sourceMap) { + if (!writer.isAtStartOfLine()) writer.rawWrite(getNewLineCharacter(options)); + writer.writeComment(sourceMap.sourceMappingURL); + } + + if (diagnostics.length > 0) { + throw new Error(`Cannot transform file '${sourceFile.fileName}' due to ${diagnostics.length} diagnostics`); + } + const { declarationMapPath, declarationFilePath } = getOutputPathsFor(sourceFile, emitHost as unknown as EmitHost, /*forceDtsPaths*/ false); + return { - code, + code: writer.getText(), diagnostics, + declarationFilePath: declarationFilePath!, + declarationMap: sourceMap?.sourceMapGenerator.toString(), + declarationMapPath, }; + + // logic replicated from emitter.ts + function getSourceMapDirectory(mapOptions: CompilerOptions, filePath: string, sourceFile: SourceFile | undefined) { + if (mapOptions.sourceRoot) return emitHost.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, emitHost as unknown as EmitHost, sourceMapDir)); + } + if (getRootLength(sourceMapDir) === 0) { + // The relative paths are relative to the common directory + sourceMapDir = combinePaths(emitHost.getCommonSourceDirectory(), sourceMapDir); + } + return sourceMapDir; + } + return getDirectoryPath(normalizePath(filePath)); + } + + // logic replicated from emitter.ts + function getSourceMapGenerator() { + if (!options.declarationMap) return; + + const mapOptions = { + sourceRoot: options.sourceRoot, + mapRoot: options.mapRoot, + extendedDiagnostics: options.extendedDiagnostics, + // Explicitly do not passthru either `inline` option + } + + const sourceRoot = normalizeSlashes(options.sourceRoot || ""); + const { declarationMapPath, declarationFilePath } = getOutputPathsFor(sourceFile, emitHost as unknown as EmitHost, /*forceDtsPaths*/ false); + const sourceMapGenerator = createSourceMapGenerator( + emitHost as unknown as EmitHost, + getBaseFileName(normalizeSlashes(declarationFilePath!)), + sourceRoot ? ensureTrailingDirectorySeparator(sourceRoot) : sourceRoot, + getSourceMapDirectory(options, sourceFile.fileName, sourceFile), + mapOptions, + ); + + const sourceMappingURL = getSourceMappingURL( + mapOptions, + sourceMapGenerator, + declarationFilePath!, + declarationMapPath, + sourceFile, + ); + return { sourceMapGenerator, sourceMappingURL: `//# ${"sourceMappingURL"}=${sourceMappingURL}` }; + } + + // logic replicated from emitter.ts + function getSourceMappingURL(mapOptions: CompilerOptions, 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, emitHost as unknown as EmitHost, sourceMapDir)); + } + if (getRootLength(sourceMapDir) === 0) { + // The relative paths are relative to the common directory + sourceMapDir = combinePaths(emitHost.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 + emitHost.getCurrentDirectory(), + emitHost.getCanonicalFileName, + /*isAbsolutePathAnUrl*/ true, + ), + ); + } + else { + return encodeURI(combinePaths(sourceMapDir, sourceMapFile)); + } + } + return encodeURI(sourceMapFile); + } } From 87ad0928d81688eff1d7bf5771ddecf747cfb891 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Tue, 24 Oct 2023 17:24:29 +0000 Subject: [PATCH 119/224] Append declaration map to dte results in tests Signed-off-by: Hana Joo --- .../src/test-runner/test-runner-main.ts | 5 ++++- external-declarations/src/test-runner/utils.ts | 12 ++++++++---- .../transformers/declarations/transform-project.ts | 12 +++++++----- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/external-declarations/src/test-runner/test-runner-main.ts b/external-declarations/src/test-runner/test-runner-main.ts index dfa51572532c9..5ac96d9283a51 100644 --- a/external-declarations/src/test-runner/test-runner-main.ts +++ b/external-declarations/src/test-runner/test-runner-main.ts @@ -67,7 +67,7 @@ const rootCasePaths = parsedArgs.rootPaths ?? ["./tests/source"]; const filter = parsedArgs.default ? new RegExp(parsedArgs.default) : /.*\.ts/; const runType = parsedArgs.type === "all" ? { tsc: true, dte: true } : parsedArgs.type === "tsc" ? { tsc: true, dte: false } : - { tsc: false, dte: true }; + { tsc: false, dte: true }; const allTests = rootCasePaths .map(r => readAllFiles(r, filter)) @@ -128,6 +128,7 @@ async function main() { if (parsedArgs.forceIsolatedDeclarations) { settings.isolatedDeclarations = true; + settings.declarationMap = true; } // Not supported delete settings.outFile; @@ -141,6 +142,7 @@ async function main() { .flatMap(r => [ "// " + r.fileName, r.content, + r.declarationMap ?? "", ]) .join(IO.newLine()) + ` @@ -192,6 +194,7 @@ async function main() { message: ${e.message}, ${e.stack}, `, + declarationMap: undefined, }], }; } diff --git a/external-declarations/src/test-runner/utils.ts b/external-declarations/src/test-runner/utils.ts index a5211891a2791..a6ab45b73eb05 100644 --- a/external-declarations/src/test-runner/utils.ts +++ b/external-declarations/src/test-runner/utils.ts @@ -24,6 +24,7 @@ export interface TestCompilationResult { export interface FileContent { readonly content: string; readonly fileName: string; + readonly declarationMap: string|undefined; } export interface TestCaseWithBOM extends Awaited> { @@ -50,7 +51,7 @@ export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings const result = compileFiles(toBeCompiled, [], { declaration: "true", - // declarationMap: "true", + declarationMap: "true", removeComments: "false", }, settings); @@ -60,9 +61,11 @@ export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings const declarationFile = changeExtension(file.name, getDeclarationExtension(file.name)); const resolvedDeclarationFile = vpath.resolve(result.vfs.cwd(), declarationFile); const declaration = result.dts.get(resolvedDeclarationFile); + const declarationMap = result.maps.get(resolvedDeclarationFile + '.map'); return [{ content: declaration?.text ?? "", fileName: declarationFile, + declarationMap: declarationMap?.text ?? "" }]; }); return { @@ -91,11 +94,12 @@ export function runDeclarationTransformEmitter(caseData: TestCaseParser.TestCase /*setParentNodes*/ true, file.name.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS, ); - const declaration = ts.emitDeclarationsForFile(sourceFile, settings); - diagnostics.push(...declaration.diagnostics); + const {code, diagnostics, declarationMap} = ts.emitDeclarationsForFile(sourceFile, settings); + diagnostics.push(...diagnostics); return { - content: settings.emitBOM ? Utils.addUTF8ByteOrderMark(declaration.code) : declaration.code, + content: settings.emitBOM ? Utils.addUTF8ByteOrderMark(code) : code, fileName: changeExtension(file.name, getDeclarationExtension(file.name)), + declarationMap, }; }); return { files, diagnostics }; diff --git a/src/compiler/transformers/declarations/transform-project.ts b/src/compiler/transformers/declarations/transform-project.ts index f2258b718fd7c..f0eb9f7b5d48f 100644 --- a/src/compiler/transformers/declarations/transform-project.ts +++ b/src/compiler/transformers/declarations/transform-project.ts @@ -1,5 +1,6 @@ import { base64encode, + changeAnyExtension, combinePaths, CompilerHost, CompilerOptions, @@ -14,19 +15,20 @@ import { EmitResolver, ensureTrailingDirectorySeparator, factory, - getDeclarationEmitExtensionForPath, - getNormalizedAbsolutePath, - getRelativePathFromDirectory, getBaseFileName, + getDeclarationEmitExtensionForPath, getDirectoryPath, getNewLineCharacter, + getNormalizedAbsolutePath, getOutputPathsFor, + getRelativePathFromDirectory, getRelativePathToDirectoryOrUrl, getRootLength, getSourceFilePathInNewDir, NewLineKind, normalizePath, normalizeSlashes, + pathIsAbsolute, PrinterOptions, ScriptTarget, SourceFile, @@ -34,8 +36,6 @@ import { sys, TransformationContext, transformDeclarations, - pathIsAbsolute, - changeAnyExtension, } from "../../_namespaces/ts"; export function emitDeclarationsForProject( @@ -88,6 +88,8 @@ function emitDeclarationsForAllFiles(rootDir: string, files: string[], host: Com } export function emitDeclarationsForFile(sourceFile: SourceFile, options: CompilerOptions) { + options.declaration = true; + options.declarationMap = true; const emitHost = createEmitDeclarationHost(options, sys); const emitResolver = createEmitDeclarationResolver(sourceFile, emitHost); const diagnostics: Diagnostic[] = []; From d390052af3bafd94b611c9a6d68851b89455a7ab Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Sun, 29 Oct 2023 22:16:08 +0000 Subject: [PATCH 120/224] Flip forceDtsEmit to false. This was preventing from declaration map to be generated. Signed-off-by: Hana Joo --- .../src/test-runner/tsc-infrastructure/compiler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts b/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts index 660fdab85af57..e1c86124f297f 100644 --- a/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts +++ b/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts @@ -267,7 +267,7 @@ export function compileFiles(host: fakes.CompilerHost, rootFiles: string[] | und /*emitOnlyDtsFiles*/ undefined, /*customTransformers*/ undefined, // @ts-expect-error We use forceDts emit documented flag - /*forceEmit*/ true, + /*forceEmit*/ false, ); const postErrors = ts.getPreEmitDiagnostics(program); const longerErrors = lang.length(preErrors) > postErrors.length ? preErrors : postErrors; From 83ae26a304f0979b683fe491db39ff897dda3bd7 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Mon, 30 Oct 2023 05:09:23 +0000 Subject: [PATCH 121/224] Make tests compare emit results Also, as a result do not create separate directory for critical-errors, it would not be possible to do the diff. When diffing file contents, ignore the difference between tsc and dte, it's expected to show difference due to the way we visit the AST. Signed-off-by: Hana Joo --- external-declarations/package.json | 2 +- .../src/test-runner/parallel-run.ts | 6 +- .../src/test-runner/test-runner-main.ts | 64 +++++++++++-------- 3 files changed, 41 insertions(+), 31 deletions(-) diff --git a/external-declarations/package.json b/external-declarations/package.json index 9f61d6b892ce6..a26f5803933f0 100644 --- a/external-declarations/package.json +++ b/external-declarations/package.json @@ -7,7 +7,7 @@ "build": "node ../built/local/tsc.js -p ./src", "watch": "node ../built/local/tsc.js -w -p ./src", "run-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=../tests/cases --type=all --shardCount=8 --forceIsolatedDeclarations --outputPath=./tsc-tests/$original --configFile=./original-tests.jsonc", - "run-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=../tests/cases --outputPath=./tsc-tests/$original --configFile=./original-tests.jsonc", + "run-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=../tests/cases --forceIsolatedDeclarations --outputPath=./tsc-tests/$original --configFile=./original-tests.jsonc", "transform-tests-parallel": "node ./build/code-mod/tsc-test-fixer/run-test-updater-parallel.js --rootPaths=../tests/cases --shardCount=8", "transform-tests": "node ./build/code-mod/tsc-test-fixer/run-test-updater.js --rootPaths=../tests/cases", "run-transformed-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=./tsc-tests/updated-tests --type=all --shardCount=8 --outputPath=./tsc-tests/$transformed --configFile=./fixed-tests.jsonc", diff --git a/external-declarations/src/test-runner/parallel-run.ts b/external-declarations/src/test-runner/parallel-run.ts index 9bbcfeb43bff6..60585fb6401d2 100644 --- a/external-declarations/src/test-runner/parallel-run.ts +++ b/external-declarations/src/test-runner/parallel-run.ts @@ -68,7 +68,7 @@ async function main() { const startTime = new Date().getTime(); const elapsedTime = (now: number) => `${((now - startTime) / 1000 / 60).toFixed(2)} minutes`; const promises = Array.from({ length: shardCount }).map(async (_, index) => { - await exec(commandLine + ` --shard=${index}`, "./", out => { + const result = await exec(commandLine + ` --shard=${index}`, "./", out => { runCount += (out.match(/Ran:/g) || []).length; if (new Date().getTime() - lastWrite > 2000) { lastWrite = new Date().getTime(); @@ -76,10 +76,12 @@ async function main() { } }); console.log(`Shard ${index} completed`); + return result.error; }); - await Promise.all(promises); + const results = await Promise.all(promises); const endTime = new Date().getTime(); console.log(`Took ${elapsedTime(endTime)} to complete ${runCount}`); + process.exit(results.filter(error => error).length) } main(); diff --git a/external-declarations/src/test-runner/test-runner-main.ts b/external-declarations/src/test-runner/test-runner-main.ts index 5ac96d9283a51..7b8e9c94af26c 100644 --- a/external-declarations/src/test-runner/test-runner-main.ts +++ b/external-declarations/src/test-runner/test-runner-main.ts @@ -97,7 +97,7 @@ async function main() { const [start, end] = shard === undefined || shardCount === undefined || testsPerShared === undefined ? [0, allTests.length] : [shard * testsPerShared, (shard === shardCount - 1) ? allTests.length : (shard + 1) * testsPerShared]; - + const failedTests = []; for (let count = start; count < end; count++) { const testFile = normalizePath(allTests[count]); const testFileNoExtension = removeExtension(path.basename(testFile), path.extname(testFile)); @@ -114,10 +114,16 @@ async function main() { const varConfigDescription = getFileBasedTestConfigurationDescription(varConfig); if (testVersionFilter && varConfigDescription !== testVersionFilter) continue; const file = (prefix ?? pad(count, 5)) + "-" + changeExtension(path.basename(testFile), varConfigDescription + ".d.ts"); - - if (runType.tsc) runAndWrite(testName, path.join(outputPath, "tsc", file), varConfig, runTypeScript); - - if (runType.dte) runAndWrite(testName, path.join(outputPath, "dte", file), varConfig, (t, s) => runDeclarationTransformEmitter(t, s)); + let tsc, dte; + if (runType.tsc) { + tsc = runAndWrite(testName, path.join(outputPath, "tsc", file), varConfig, runTypeScript); + } + if (runType.dte) { + dte = runAndWrite(testName, path.join(outputPath, "dte", file), varConfig, (t, s) => runDeclarationTransformEmitter(t, s)); + } + if (tsc && dte && tsc !== dte) { + failedTests.push(testName); + } } console.log(` Ran: ${pad(count, 5)}/${allTests.length}`); @@ -151,16 +157,16 @@ async function main() { // ` + data.code.split("\n").join(` // `); - if (results.diagnostics instanceof Error) { - file = path.join( - path.dirname(file), - "critical-errors", - path.basename(file), - ); - } - else { - let category = testCategories.get(testName); - if (!category) { + let category = testCategories.get(testName); + + if (!category) { + if (results.diagnostics instanceof Error) { + file = path.join( + path.dirname(file), + path.basename(file), + ); + } + else { const error = firstDefined(results.diagnostics, d => { const category = errorCategories.get(d.code); return category ? { category, code: d.code } : undefined; @@ -169,15 +175,16 @@ async function main() { category = path.join(error.category, error.code.toString()); } } - if (category) { - file = path.join( - path.dirname(file), - category, - path.basename(file), - ); - } + } + if (category) { + file = path.join( + path.dirname(file), + category, + path.basename(file), + ); } writeResults(file, resultText); + return resultText; } function safeRun(fn: (data: TestCaseContent) => TestCompilationResult): TestCompilationResult { @@ -188,12 +195,11 @@ async function main() { return { diagnostics: e, files: [{ - fileName: path.basename(testFile), - content: ` -==== ERROR ==== -message: ${e.message}, -${e.stack}, -`, + fileName: changeExtension(path.basename(testFile), ".d.ts"), + // We compare the textual results between dte and tsc, it will show up + // if it's different. as tsc prints empty results when it fails, it's + // reasonable to do the same in DTE. + content: "", declarationMap: undefined, }], }; @@ -210,5 +216,7 @@ ${e.stack}, } } await flushQueue(); + console.error(`Number of failedTests: ${failedTests.length}, list : ${failedTests.join(" ")}`) + process.exit(failedTests.length); } main(); From 011f142554ab5c0eb486aa359725c69acf892e95 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Tue, 7 Nov 2023 02:00:34 +0000 Subject: [PATCH 122/224] Format files Signed-off-by: Hana Joo --- external-declarations/fixed-tests.jsonc | 4 +- external-declarations/original-tests.jsonc | 2 +- external-declarations/package.json | 60 +++++++++---------- .../src/test-runner/parallel-run.ts | 2 +- .../src/test-runner/test-runner-main.ts | 6 +- .../src/test-runner/utils.ts | 8 +-- src/compiler/checker.ts | 10 ++-- src/compiler/transformers/declarations.ts | 5 +- .../declarations/emit-resolver.ts | 4 +- .../declarations/transform-project.ts | 4 +- 10 files changed, 55 insertions(+), 50 deletions(-) diff --git a/external-declarations/fixed-tests.jsonc b/external-declarations/fixed-tests.jsonc index 4b5bfd5ab4ecd..088d5ec871188 100644 --- a/external-declarations/fixed-tests.jsonc +++ b/external-declarations/fixed-tests.jsonc @@ -15,7 +15,7 @@ "test-categories": { "to-investigate": [ "declarationEmitObjectLiteralAccessors1", - "declarationsWithRecursiveInternalTypesProduceUniqueTypeParams", + "declarationsWithRecursiveInternalTypesProduceUniqueTypeParams" ], "new-issue": [ "emitMethodCalledNew", @@ -31,7 +31,7 @@ "objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames", "objectTypesIdentityWithGenericConstructSignaturesOptionalParams", "objectTypesIdentityWithGenericConstructSignaturesOptionalParams2", - "objectTypesIdentityWithGenericConstructSignaturesOptionalParams3", + "objectTypesIdentityWithGenericConstructSignaturesOptionalParams3" ], "enum-issues": [ "ambientConstLiterals", diff --git a/external-declarations/original-tests.jsonc b/external-declarations/original-tests.jsonc index 0d55f0fe8ed1b..41d38aca45019 100644 --- a/external-declarations/original-tests.jsonc +++ b/external-declarations/original-tests.jsonc @@ -42,7 +42,7 @@ // duplicate field/accessor "symbolDeclarationEmit12", // symbol merges with global eval and is not written to declarations. - "parserStrictMode8", + "parserStrictMode8" ], "ts-bugs": [ // https://github.com/microsoft/TypeScript/issues/55571 diff --git a/external-declarations/package.json b/external-declarations/package.json index a26f5803933f0..8b2c8424e9560 100644 --- a/external-declarations/package.json +++ b/external-declarations/package.json @@ -1,32 +1,32 @@ { - "name": "external-declarations", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "build": "node ../built/local/tsc.js -p ./src", - "watch": "node ../built/local/tsc.js -w -p ./src", - "run-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=../tests/cases --type=all --shardCount=8 --forceIsolatedDeclarations --outputPath=./tsc-tests/$original --configFile=./original-tests.jsonc", - "run-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=../tests/cases --forceIsolatedDeclarations --outputPath=./tsc-tests/$original --configFile=./original-tests.jsonc", - "transform-tests-parallel": "node ./build/code-mod/tsc-test-fixer/run-test-updater-parallel.js --rootPaths=../tests/cases --shardCount=8", - "transform-tests": "node ./build/code-mod/tsc-test-fixer/run-test-updater.js --rootPaths=../tests/cases", - "run-transformed-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=./tsc-tests/updated-tests --type=all --shardCount=8 --outputPath=./tsc-tests/$transformed --configFile=./fixed-tests.jsonc", - "run-transformed-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=./tsc-tests/updated-tests --outputPath=./tsc-tests/$transformed --configFile=./fixed-tests.jsonc", - "fixer-tests": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source ", - "fixer-tests-update": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source --update " - }, - "author": "", - "license": "ISC", - "dependencies": { - "json5": "^2.2.3", - "source-map-support": "^0.5.21", - "typescript": "../", - "@types/inquirer": "^8.2.6", - "@types/node": "^20.7.1", - "chalk": "^4.1.2", - "inquirer": "^8.2.6" - }, - "devDependencies": { - "@types/node": "^18.11.18" - } + "name": "external-declarations", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "build": "node ../built/local/tsc.js -p ./src", + "watch": "node ../built/local/tsc.js -w -p ./src", + "run-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=../tests/cases --type=all --shardCount=8 --forceIsolatedDeclarations --outputPath=./tsc-tests/$original --configFile=./original-tests.jsonc", + "run-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=../tests/cases --forceIsolatedDeclarations --outputPath=./tsc-tests/$original --configFile=./original-tests.jsonc", + "transform-tests-parallel": "node ./build/code-mod/tsc-test-fixer/run-test-updater-parallel.js --rootPaths=../tests/cases --shardCount=8", + "transform-tests": "node ./build/code-mod/tsc-test-fixer/run-test-updater.js --rootPaths=../tests/cases", + "run-transformed-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=./tsc-tests/updated-tests --type=all --shardCount=8 --outputPath=./tsc-tests/$transformed --configFile=./fixed-tests.jsonc", + "run-transformed-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=./tsc-tests/updated-tests --outputPath=./tsc-tests/$transformed --configFile=./fixed-tests.jsonc", + "fixer-tests": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source ", + "fixer-tests-update": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source --update " + }, + "author": "", + "license": "ISC", + "dependencies": { + "json5": "^2.2.3", + "source-map-support": "^0.5.21", + "typescript": "../", + "@types/inquirer": "^8.2.6", + "@types/node": "^20.7.1", + "chalk": "^4.1.2", + "inquirer": "^8.2.6" + }, + "devDependencies": { + "@types/node": "^18.11.18" + } } diff --git a/external-declarations/src/test-runner/parallel-run.ts b/external-declarations/src/test-runner/parallel-run.ts index 60585fb6401d2..13484b5b9e297 100644 --- a/external-declarations/src/test-runner/parallel-run.ts +++ b/external-declarations/src/test-runner/parallel-run.ts @@ -81,7 +81,7 @@ async function main() { const results = await Promise.all(promises); const endTime = new Date().getTime(); console.log(`Took ${elapsedTime(endTime)} to complete ${runCount}`); - process.exit(results.filter(error => error).length) + process.exit(results.filter(error => error).length); } main(); diff --git a/external-declarations/src/test-runner/test-runner-main.ts b/external-declarations/src/test-runner/test-runner-main.ts index 7b8e9c94af26c..7f8f67658bbcd 100644 --- a/external-declarations/src/test-runner/test-runner-main.ts +++ b/external-declarations/src/test-runner/test-runner-main.ts @@ -67,7 +67,7 @@ const rootCasePaths = parsedArgs.rootPaths ?? ["./tests/source"]; const filter = parsedArgs.default ? new RegExp(parsedArgs.default) : /.*\.ts/; const runType = parsedArgs.type === "all" ? { tsc: true, dte: true } : parsedArgs.type === "tsc" ? { tsc: true, dte: false } : - { tsc: false, dte: true }; + { tsc: false, dte: true }; const allTests = rootCasePaths .map(r => readAllFiles(r, filter)) @@ -197,7 +197,7 @@ async function main() { files: [{ fileName: changeExtension(path.basename(testFile), ".d.ts"), // We compare the textual results between dte and tsc, it will show up - // if it's different. as tsc prints empty results when it fails, it's + // if it's different. as tsc prints empty results when it fails, it's // reasonable to do the same in DTE. content: "", declarationMap: undefined, @@ -216,7 +216,7 @@ async function main() { } } await flushQueue(); - console.error(`Number of failedTests: ${failedTests.length}, list : ${failedTests.join(" ")}`) + console.error(`Number of failedTests: ${failedTests.length}, list : ${failedTests.join(" ")}`); process.exit(failedTests.length); } main(); diff --git a/external-declarations/src/test-runner/utils.ts b/external-declarations/src/test-runner/utils.ts index a6ab45b73eb05..6aaaa1cd9b999 100644 --- a/external-declarations/src/test-runner/utils.ts +++ b/external-declarations/src/test-runner/utils.ts @@ -24,7 +24,7 @@ export interface TestCompilationResult { export interface FileContent { readonly content: string; readonly fileName: string; - readonly declarationMap: string|undefined; + readonly declarationMap: string | undefined; } export interface TestCaseWithBOM extends Awaited> { @@ -61,11 +61,11 @@ export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings const declarationFile = changeExtension(file.name, getDeclarationExtension(file.name)); const resolvedDeclarationFile = vpath.resolve(result.vfs.cwd(), declarationFile); const declaration = result.dts.get(resolvedDeclarationFile); - const declarationMap = result.maps.get(resolvedDeclarationFile + '.map'); + const declarationMap = result.maps.get(resolvedDeclarationFile + ".map"); return [{ content: declaration?.text ?? "", fileName: declarationFile, - declarationMap: declarationMap?.text ?? "" + declarationMap: declarationMap?.text ?? "", }]; }); return { @@ -94,7 +94,7 @@ export function runDeclarationTransformEmitter(caseData: TestCaseParser.TestCase /*setParentNodes*/ true, file.name.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS, ); - const {code, diagnostics, declarationMap} = ts.emitDeclarationsForFile(sourceFile, settings); + const { code, diagnostics, declarationMap } = ts.emitDeclarationsForFile(sourceFile, settings); diagnostics.push(...diagnostics); return { content: settings.emitBOM ? Utils.addUTF8ByteOrderMark(code) : code, diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 6b17e04a6b752..c592cd62a3f9a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -44762,8 +44762,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } 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))) { + 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)) { @@ -44790,7 +44792,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return undefined; } - function evaluateElementAccessExpression(expr: ElementAccessExpression, location?: Declaration) { + function evaluateElementAccessExpression(expr: ElementAccessExpression, location?: Declaration) { const root = expr.expression; if (isEntityNameExpression(root) && isStringLiteralLike(expr.argumentExpression)) { const rootSymbol = resolveEntityName(root, SymbolFlags.Value, /*ignoreErrors*/ true); @@ -44799,7 +44801,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const member = rootSymbol.exports!.get(name); if (member) { const enumMember = member.valueDeclaration as EnumMember; - if (location) { + if (location) { if (compilerOptions.isolatedDeclarations && location.parent !== enumMember.parent) { return undefined; } diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 3f981f5a13017..d30f152562c8b 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -1936,9 +1936,10 @@ 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 && + if ( + isolatedDeclarations && m.initializer && constValue === undefined && // This will be its own compiler error instead, so don't report. - !isComputedPropertyName(m.name) + !isComputedPropertyName(m.name) ) { reportIsolatedDeclarationError(m); } diff --git a/src/compiler/transformers/declarations/emit-resolver.ts b/src/compiler/transformers/declarations/emit-resolver.ts index d2362ab9d0239..54b21a154aace 100644 --- a/src/compiler/transformers/declarations/emit-resolver.ts +++ b/src/compiler/transformers/declarations/emit-resolver.ts @@ -308,7 +308,9 @@ export function createEmitDeclarationResolver(file: SourceFile, host: IsolatedEm isDeclarationVisible, isLiteralConstDeclaration, isLiteralComputedName, - tryFindAmbientModule() { return undefined }, + tryFindAmbientModule() { + return undefined; + }, getAllAccessorDeclarations(declaration) { const parentLinks = getNodeLinks(declaration.parent); const key = getMemberKey(declaration.name); diff --git a/src/compiler/transformers/declarations/transform-project.ts b/src/compiler/transformers/declarations/transform-project.ts index f0eb9f7b5d48f..7215ad0137b03 100644 --- a/src/compiler/transformers/declarations/transform-project.ts +++ b/src/compiler/transformers/declarations/transform-project.ts @@ -67,7 +67,7 @@ export function createIsolatedDeclarationsEmitter(rootDir: string, options: Comp if (!source) return {}; - const { code, diagnostics, declarationMap, declarationMapPath} = emitDeclarationsForFile(source, options); + const { code, diagnostics, declarationMap, declarationMapPath } = emitDeclarationsForFile(source, options); const extension = getDeclarationEmitExtensionForPath(file); const relativeToRoot = getRelativePathFromDirectory(rootDir, file, !host.useCaseSensitiveFileNames()); const declarationPath = !declarationDir ? file : getNormalizedAbsolutePath(combinePaths(declarationDir, relativeToRoot), host.getCurrentDirectory()); @@ -166,7 +166,7 @@ export function emitDeclarationsForFile(sourceFile: SourceFile, options: Compile mapRoot: options.mapRoot, extendedDiagnostics: options.extendedDiagnostics, // Explicitly do not passthru either `inline` option - } + }; const sourceRoot = normalizeSlashes(options.sourceRoot || ""); const { declarationMapPath, declarationFilePath } = getOutputPathsFor(sourceFile, emitHost as unknown as EmitHost, /*forceDtsPaths*/ false); From ae61dd65851ad17cabdfad7f3f8d3c9157d8d3fa Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Sat, 11 Nov 2023 01:35:48 +0000 Subject: [PATCH 123/224] Integrated fixed tests. Signed-off-by: Titian Cernicova-Dragomir --- .gitignore | 1 + src/compiler/_namespaces/ts.ts | 1 - .../transformers/declarations/emit-binder.ts | 1 + .../transformers/declarations/emit-host.ts | 42 --- .../declarations/transform-project.ts | 101 +++--- .../transformers/declarations/types.ts | 1 - src/harness/harnessIO.ts | 33 +- src/harness/isolatedDeclarationFixer.ts | 294 ++++++++++++++++++ src/testRunner/compilerRunner.ts | 161 ++++++++-- .../reference/APILibCheck.errors.txt | 34 ++ tests/baselines/reference/api/typescript.d.ts | 12 +- 11 files changed, 525 insertions(+), 156 deletions(-) delete mode 100644 src/compiler/transformers/declarations/emit-host.ts create mode 100644 src/harness/isolatedDeclarationFixer.ts create mode 100644 tests/baselines/reference/APILibCheck.errors.txt diff --git a/.gitignore b/.gitignore index b084ac14ecc28..6c946ef6507d4 100644 --- a/.gitignore +++ b/.gitignore @@ -57,6 +57,7 @@ yarn.lock yarn-error.log .parallelperf.* tests/baselines/reference/dt +tests/auto-fixed/* .failed-tests TEST-results.xml package-lock.json diff --git a/src/compiler/_namespaces/ts.ts b/src/compiler/_namespaces/ts.ts index 96985e09555e7..40c4fab806335 100644 --- a/src/compiler/_namespaces/ts.ts +++ b/src/compiler/_namespaces/ts.ts @@ -58,7 +58,6 @@ export * from "../transformers/module/esnextAnd2015"; export * from "../transformers/module/node"; export * from "../transformers/declarations/diagnostics"; export * from "../transformers/declarations/emit-binder"; -export * from "../transformers/declarations/emit-host"; export * from "../transformers/declarations/emit-resolver"; export * from "../transformers/declarations/transform-project"; export * from "../transformers/declarations/types"; diff --git a/src/compiler/transformers/declarations/emit-binder.ts b/src/compiler/transformers/declarations/emit-binder.ts index ea3da2b676a55..4feaeabb24206 100644 --- a/src/compiler/transformers/declarations/emit-binder.ts +++ b/src/compiler/transformers/declarations/emit-binder.ts @@ -157,6 +157,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile, host: Isolate setExternalModuleIndicator(file); file.impliedNodeFormat = getImpliedNodeFormatForFile( toPath(file.fileName, host.getCurrentDirectory(), hostGetCanonicalFileName(host)), + // toPath(file.resolvedPath, /*basePath*/ undefined, hostGetCanonicalFileName(host)), /*packageJsonInfoCache*/ undefined, host, options, diff --git a/src/compiler/transformers/declarations/emit-host.ts b/src/compiler/transformers/declarations/emit-host.ts deleted file mode 100644 index bf0e60d3e20af..0000000000000 --- a/src/compiler/transformers/declarations/emit-host.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { - CompilerOptions, - System, -} from "../../_namespaces/ts"; -import { - IsolatedEmitHost, -} from "./types"; - -/** @internal */ -export function createEmitDeclarationHost(options: CompilerOptions, sys: System): IsolatedEmitHost { - const getCompilerOptions = () => options; - const getCurrentDirectory = () => "."; - const getCommonSourceDirectory = () => "."; - const getCanonicalFileName = (f: string) => `./${f}`; - - return { - redirectTargetsMap: new Map(), - fileExists: sys.fileExists, - readFile: sys.readFile, - directoryExists: sys.directoryExists, - getDirectories: sys.getDirectories, - realpath: sys.realpath, - useCaseSensitiveFileNames: () => options.forceConsistentCasingInFileNames || sys.useCaseSensitiveFileNames, - // redirectTargetsMap: new Map(), - getSourceFiles() { - throw new Error("Not needed"); - }, - getCompilerOptions, - getCurrentDirectory, - getCommonSourceDirectory, - getCanonicalFileName, - getLibFileFromReference() { - return undefined; - }, - getSourceFileFromReference() { - return undefined; - }, - isSourceOfProjectReferenceRedirect() { - return false; - }, - }; -} diff --git a/src/compiler/transformers/declarations/transform-project.ts b/src/compiler/transformers/declarations/transform-project.ts index 7215ad0137b03..5342808e17245 100644 --- a/src/compiler/transformers/declarations/transform-project.ts +++ b/src/compiler/transformers/declarations/transform-project.ts @@ -1,11 +1,9 @@ import { base64encode, - changeAnyExtension, combinePaths, - CompilerHost, CompilerOptions, - createEmitDeclarationHost, createEmitDeclarationResolver, + createGetCanonicalFileName, createPrinter, createSourceMapGenerator, createTextWriter, @@ -16,81 +14,51 @@ import { ensureTrailingDirectorySeparator, factory, getBaseFileName, - getDeclarationEmitExtensionForPath, + getDeclarationEmitOutputFilePathWorker, getDirectoryPath, getNewLineCharacter, - getNormalizedAbsolutePath, getOutputPathsFor, - getRelativePathFromDirectory, getRelativePathToDirectoryOrUrl, getRootLength, getSourceFilePathInNewDir, + IsolatedEmitHost, NewLineKind, + noop, normalizePath, normalizeSlashes, - pathIsAbsolute, PrinterOptions, - ScriptTarget, + returnFalse, + returnUndefined, SourceFile, SourceMapGenerator, sys, + System, TransformationContext, transformDeclarations, } from "../../_namespaces/ts"; -export function emitDeclarationsForProject( - projectPath: string, - files: string[] | undefined, - options: CompilerOptions, - host: CompilerHost, -) { - const rootDir = options.rootDir ? normalizePath(sys.resolvePath(combinePaths(projectPath, options.rootDir))) : normalizePath(projectPath); - files ??= host.readDirectory!(rootDir, [".ts", ".tsx"], ["**/*.d.ts"], []); - emitDeclarationsForAllFiles(rootDir, files, host, options); - return rootDir; -} - -function joinToRootIfNeeded(rootDir: string, existingPath: string) { - return normalizePath(pathIsAbsolute(existingPath) ? existingPath : combinePaths(rootDir, existingPath)); -} - -export function createIsolatedDeclarationsEmitter(rootDir: string, options: CompilerOptions) { - const declarationDir = options.declarationDir ? joinToRootIfNeeded(rootDir, options.declarationDir) : - options.outDir ? joinToRootIfNeeded(rootDir, options.outDir) : - undefined; - rootDir = normalizePath(rootDir); - return (file: string, host: CompilerHost) => { - file = normalizePath(file); - const source = host.getSourceFile(file, { - languageVersion: options.target ?? ScriptTarget.ES2015, - }); - - if (!source) return {}; - - const { code, diagnostics, declarationMap, declarationMapPath } = emitDeclarationsForFile(source, options); - const extension = getDeclarationEmitExtensionForPath(file); - const relativeToRoot = getRelativePathFromDirectory(rootDir, file, !host.useCaseSensitiveFileNames()); - const declarationPath = !declarationDir ? file : getNormalizedAbsolutePath(combinePaths(declarationDir, relativeToRoot), host.getCurrentDirectory()); - const output = changeAnyExtension(declarationPath, extension); - host.writeFile(output, code, !!options.emitBOM); - if (declarationMap) { - host.writeFile(declarationMapPath!, declarationMap, !!options.emitBOM); - } - return { output, diagnostics }; +export function createEmitDeclarationHost(options: CompilerOptions, sys: System, commonSourceDirectory = sys.getCurrentDirectory()): IsolatedEmitHost { + return { + redirectTargetsMap: new Map(), + directoryExists: sys.directoryExists.bind(sys), + fileExists: sys.fileExists.bind(sys), + getDirectories: sys.getDirectories.bind(sys), + readFile: sys.readFile.bind(sys), + realpath: sys.realpath?.bind(sys), + getCurrentDirectory: sys.getCurrentDirectory.bind(sys), + getCanonicalFileName: createGetCanonicalFileName(sys.useCaseSensitiveFileNames), + useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames, + getCompilerOptions: () => options, + getCommonSourceDirectory: () => ensureTrailingDirectorySeparator(sys.resolvePath(commonSourceDirectory)), + trace: noop, + getLibFileFromReference: returnUndefined, + getSourceFileFromReference: returnUndefined, + isSourceOfProjectReferenceRedirect: returnFalse, }; } -function emitDeclarationsForAllFiles(rootDir: string, files: string[], host: CompilerHost, options: CompilerOptions) { - const transformer = createIsolatedDeclarationsEmitter(rootDir, options); - for (const file of files) { - transformer(file, host); - } -} - -export function emitDeclarationsForFile(sourceFile: SourceFile, options: CompilerOptions) { - options.declaration = true; - options.declarationMap = true; - const emitHost = createEmitDeclarationHost(options, sys); +export function transpileDeclaration(sourceFile: SourceFile, emitHost: IsolatedEmitHost) { + const options: CompilerOptions = emitHost.getCompilerOptions(); const emitResolver = createEmitDeclarationResolver(sourceFile, emitHost); const diagnostics: Diagnostic[] = []; const transformer = transformDeclarations({ @@ -101,7 +69,7 @@ export function emitDeclarationsForFile(sourceFile: SourceFile, options: Compile return emitResolver as EmitResolver; }, getCompilerOptions() { - return options; + return emitHost.getCompilerOptions(); }, factory, addDiagnostic(diag: any) { @@ -128,14 +96,21 @@ export function emitDeclarationsForFile(sourceFile: SourceFile, options: Compile if (diagnostics.length > 0) { throw new Error(`Cannot transform file '${sourceFile.fileName}' due to ${diagnostics.length} diagnostics`); } - const { declarationMapPath, declarationFilePath } = getOutputPathsFor(sourceFile, emitHost as unknown as EmitHost, /*forceDtsPaths*/ false); + const declarationPath = getDeclarationEmitOutputFilePathWorker( + sourceFile.fileName, + options, + emitHost.getCurrentDirectory(), + emitHost.getCommonSourceDirectory(), + emitHost.getCanonicalFileName, + ); + const declarationMapPath = declarationPath + ".map"; return { - code: writer.getText(), - diagnostics, - declarationFilePath: declarationFilePath!, + declaration: writer.getText(), + declarationPath, declarationMap: sourceMap?.sourceMapGenerator.toString(), declarationMapPath, + diagnostics, }; // logic replicated from emitter.ts diff --git a/src/compiler/transformers/declarations/types.ts b/src/compiler/transformers/declarations/types.ts index 16f9160896809..9adc404e6e84a 100644 --- a/src/compiler/transformers/declarations/types.ts +++ b/src/compiler/transformers/declarations/types.ts @@ -35,7 +35,6 @@ export interface IsolatedEmitHost extends ModuleResolutionHost { readonly redirectTargetsMap: RedirectTargetsMap; getCommonSourceDirectory(): string; getCompilerOptions(): CompilerOptions; - getSourceFiles(): SourceFile[]; getSourceFileFromReference(referencingFile: SourceFile, ref: FileReference): SourceFile | undefined; getLibFileFromReference(ref: FileReference): SourceFile | undefined; isSourceOfProjectReferenceRedirect(fileName: string): boolean; diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index 8b7c30abee569..96e1e04e7f27c 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -9,7 +9,9 @@ import { } from "./_namespaces/Harness"; import * as ts from "./_namespaces/ts"; import { + createGetCanonicalFileName, mapDefined, + transpileDeclaration, } from "./_namespaces/ts"; import * as Utils from "./_namespaces/Utils"; import * as vfs from "./_namespaces/vfs"; @@ -646,29 +648,35 @@ export namespace Compiler { } const fs = tscHost.vfs.shadowRoot ? tscHost.vfs.shadowRoot.shadow() : tscHost.vfs; - const host = new fakes.CompilerHost(fs, options, /*setParentNodes*/ false); - const getCanonicalFileName = (f: string) => host.getCanonicalFileName(f); - let commonSourceDirectory = ts.getCommonSourceDirectory( + const dts = 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, ); - - if (commonSourceDirectory.length === 0) { - commonSourceDirectory = currentDirectory; - } + const emitterHost = ts.createEmitDeclarationHost(options, new fakes.System(fs), commonSourceDirectory); const diagnostics: ts.Diagnostic[] = []; - const transformer = ts.createIsolatedDeclarationsEmitter(commonSourceDirectory, options); + programFileNames.forEach(fileName => { if (vpath.isDeclaration(fileName)) { return; } - const { diagnostics: fileDiagnostics = [] } = transformer(fileName, host); + const file = tscHost.getSourceFile(fileName, { + languageVersion: ts.getEmitScriptTarget(options), + }); + if (!file) { + return; + } + + const { diagnostics: fileDiagnostics = [], declaration, declarationPath } = transpileDeclaration(file, emitterHost); + // Ensure file will be rebound. + file.locals = undefined; + dts.set(declarationPath, new documents.TextDocument(declarationPath, options.emitBOM ? Utils.addUTF8ByteOrderMark(declaration) : declaration)); diagnostics.push(...fileDiagnostics); }); - const dts = new collections.SortedMap({ comparer: host.vfs.stringComparer, sort: "insertion" }); - host.outputs.forEach(d => dts.set(d.file, new documents.TextDocument(d.file, d.text))); return { dts, diagnostics }; } @@ -1393,6 +1401,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 */ @@ -1523,7 +1532,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..0fa2035b80b82 --- /dev/null +++ b/src/harness/isolatedDeclarationFixer.ts @@ -0,0 +1,294 @@ +import * as ts from "./_namespaces/ts"; +import * as vfs from "./_namespaces/vfs"; +import * as fake from "./fakesHosts"; + +export const isolatedDeclarationsErrors = new Set([ + 9007, + 9008, + 9009, + 9010, + 9011, +]); + +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); + const program = service.getProgram()!; + + const files = program.getSourceFiles(); + if (files.some(f => f.parseDiagnostics.length !== 0)) { + return false; + } + 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; + 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 false; + } + const fixes = service.getCodeFixesAtPosition(file.fileName, diag.start, diag.start + diag.length, [diag.code], defaultFormatOptions, userPreferences); + if (fixes.length === 0) { + skipCount++; + continue; + } + const fix = fixes[0]; + const changedFiles: { + file: string; + old: VersionedScriptSnapshot; + new: VersionedScriptSnapshot; + }[] = []; + + for (const fileChanges of fix.changes) { + const snapshot = snapShotRegistry.getSnapshot(fileChanges.fileName)!; + const newSnapShot = applyChangesSnapShot(snapshot, fileChanges.textChanges); + snapShotRegistry.setSnapshot(fileChanges.fileName, newSnapShot); + changedFiles.push({ + file: fileChanges.fileName, + new: newSnapShot, + old: snapshot, + }); + } + lastFixedDiagnostic = diag; + diagnostics = getIsolatedDeclarationsErrors(file.fileName); + } + } + service.dispose(); + return true; + function getIsolatedDeclarationsErrors(fileName: string) { + const program = service.getProgram(); + if (!program) return []; + const sourceFile = 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/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 7344a026c0d04..78945d93f051d 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, @@ -111,26 +114,40 @@ export class CompilerBaselineRunner extends RunnerBase { it(`Correct Sourcemap output for ${fileName}`, () => compilerTest.verifySourceMapOutput()); it(`Correct type/symbol baselines for ${fileName}`, () => compilerTest.verifyTypesAndSymbols()); - // We share all ASTs between the two runs to improve performance - // To ensure the tests don't interfere with each other, we run the isolated tests after - // node.symbol can be a source of interference. describe("isolated declarations", () => { - let isolatedTest: IsolatedDeclarationTest; + let isolatedTest: IsolatedDeclarationTest | undefined; before(() => { - isolatedTest = new IsolatedDeclarationTest({ - ...environment, - fileSystem: environment.fileSystem.shadow(), - }); + const isolatedTestEnv = IsolatedDeclarationTest.transformEnvironment(environment); + if (isolatedTestEnv) { + isolatedTest = new IsolatedDeclarationTest(isolatedTestEnv); + } }); - it(`Correct dte emit for ${fileName}`, () => isolatedTest.verifyDteOutput()); - it(`Correct tsc emit for ${fileName}`, () => isolatedTest.verifyTscOutput()); - it(`Correct dte/tsc diff ${fileName}`, () => isolatedTest.verifyDiff()); + it(`Correct dte emit for ${fileName}`, () => isolatedTest?.verifyDteOutput()); + it(`Correct tsc emit for ${fileName}`, () => isolatedTest?.verifyTscOutput()); + it(`Correct dte/tsc diff ${fileName}`, () => isolatedTest?.verifyDiff()); after(() => { isolatedTest = undefined!; }); }); + describe("isolated declarations fixed", () => { + let fixedIsolatedTest: FixedIsolatedDeclarationTest | undefined; + before(() => { + const fixedIsolatedTestEnv = FixedIsolatedDeclarationTest.fixTestProject(environment); + if (fixedIsolatedTestEnv) { + fixedIsolatedTest = new FixedIsolatedDeclarationTest(fixedIsolatedTestEnv); + } + }); + it(`Correct dte emit for ${fileName}`, () => fixedIsolatedTest?.verifyDteOutput()); + it(`Correct tsc emit for ${fileName}`, () => fixedIsolatedTest?.verifyTscOutput()); + it(`Correct dte/tsc diff ${fileName}`, () => fixedIsolatedTest?.verifyDiff()); + + after(() => { + fixedIsolatedTest = undefined!; + }); + }); + after(() => { compilerTest = undefined!; environment = undefined!; @@ -356,7 +373,7 @@ class CompilerTestBase { return { file, configurations, content }; } - private static createHarnessTestFile(unit: TestCaseParser.TestUnitData): Compiler.TestFile { + protected static createHarnessTestFile(unit: TestCaseParser.TestUnitData): Compiler.TestFile { return { unitName: unit.name, content: unit.content, @@ -441,19 +458,28 @@ class CompilerTest extends CompilerTestBase { } } -export class IsolatedDeclarationTest extends CompilerTestBase { - private dteDiagnostics: readonly ts.Diagnostic[]; - private tscNonIsolatedDeclarationsErrors: readonly ts.Diagnostic[]; - private isOutputEquivalent: boolean; - private dteDtsFile: Compiler.TestFile[]; - private tscDtsFiles: Compiler.TestFile[]; - private tscIsolatedDeclarationsErrors: readonly ts.Diagnostic[]; - private isDiagnosticEquivalent: boolean; - - static transformEnvironment(compilerEnvironment: CompilerTestEnvironment): CompilerTestEnvironment { +class IsolatedDeclarationTest extends CompilerTestBase { + protected dteDiagnostics: readonly ts.Diagnostic[]; + protected tscNonIsolatedDeclarationsErrors: readonly ts.Diagnostic[]; + protected isOutputEquivalent: boolean; + protected dteDtsFile: Compiler.TestFile[]; + protected tscDtsFiles: Compiler.TestFile[]; + protected tscIsolatedDeclarationsErrors: readonly ts.Diagnostic[]; + protected isDiagnosticEquivalent: boolean; + + static transformEnvironment(compilerEnvironment: CompilerTestEnvironment): CompilerTestEnvironment | undefined { + const options = compilerEnvironment.compilerOptions; + // 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) { + return undefined; + } const clonedOptions: ts.CompilerOptions & Compiler.HarnessOptions = ts.cloneCompilerOptions(compilerEnvironment.compilerOptions); clonedOptions.declaration = true; - clonedOptions.isolatedDeclarations = true; + if (clonedOptions.isolatedDeclarations === undefined) { + clonedOptions.isolatedDeclarations = true; + } clonedOptions.allowJs = false; clonedOptions.checkJs = false; clonedOptions.skipLibCheck = true; @@ -476,6 +502,7 @@ export class IsolatedDeclarationTest extends CompilerTestBase { return { ...compilerEnvironment, + fileSystem: compilerEnvironment.fileSystem.shadow(), testCaseContent: { ...compilerEnvironment.testCaseContent, settings: clonedSettings, @@ -484,7 +511,7 @@ export class IsolatedDeclarationTest extends CompilerTestBase { }; } constructor(compilerEnvironment: CompilerTestEnvironment) { - super(IsolatedDeclarationTest.transformEnvironment(compilerEnvironment)); + super(compilerEnvironment); const currentDirectory = this.harnessSettings.currentDirectory ?? vfs.srcFolder; const dteResult = Compiler.compileDeclarationFilesWithIsolatedEmitter( @@ -537,12 +564,14 @@ export class IsolatedDeclarationTest extends CompilerTestBase { ts.Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode.code, 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.code, ]); - + protected get baselinePath() { + return "isolated-declarations/original"; + } verifyDteOutput() { if (this.isOutputEquivalent && this.isDiagnosticEquivalent) return; Compiler.doDeclarationBaseline( this.configuredName, - "isolated-declarations/original/dte", + this.baselinePath + "/dte", this.fileName, this.dteDtsFile, ts.concatenate(this.dteDiagnostics, this.tscNonIsolatedDeclarationsErrors), @@ -554,7 +583,7 @@ export class IsolatedDeclarationTest extends CompilerTestBase { if (this.isOutputEquivalent && this.isDiagnosticEquivalent) return; Compiler.doDeclarationBaseline( this.configuredName, - "isolated-declarations/original/tsc", + this.baselinePath + "/tsc", this.fileName, this.tscDtsFiles, ts.concatenate(this.tscIsolatedDeclarationsErrors, this.tscNonIsolatedDeclarationsErrors), @@ -566,7 +595,7 @@ export class IsolatedDeclarationTest extends CompilerTestBase { if (this.isOutputEquivalent && this.isDiagnosticEquivalent) return; Compiler.doDeclarationDiffBaseline( this.configuredName, - "isolated-declarations/original/diff", + this.baselinePath + "/diff", this.fileName, this.dteDtsFile, ts.concatenate(this.dteDiagnostics, this.tscNonIsolatedDeclarationsErrors), @@ -578,3 +607,79 @@ export class IsolatedDeclarationTest extends CompilerTestBase { ); } } + +class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest { + static fixTestProject(compilerEnvironment: CompilerTestEnvironment): CompilerTestEnvironment | undefined { + // 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); + if (!env) { + return undefined; + } + + const autoFixCacheTest = ts.combinePaths("tests/auto-fixed", compilerEnvironment.configuredName); + const existingTransformedTest = IO.readFile(autoFixCacheTest); + const hash = ts.sys.createHash!(env.testCaseContent.sourceCode); + const fixedTest = existingTransformedTest && TestCaseParser.makeUnitsFromTest(existingTransformedTest, compilerEnvironment.fileName); + let transformSucceeded = false; + if (fixedTest && fixedTest.settings.hash === hash) { + transformSucceeded = fixedTest.settings.succeeded !== "false"; + if (transformSucceeded) { + env.allFiles = env.allFiles.map(f => { + const testUnit = fixedTest.testUnitData.find(t => t.name === f.unitName); + ts.Debug.assert(testUnit, "All files should be in the cached auto fixed version of the test"); + env.fileSystem.writeFileSync(testUnit.name, testUnit.content); + return this.createHarnessTestFile(testUnit); + }); + env.otherFiles = env.otherFiles.map(o => env.allFiles.find(f => f.unitName === o.unitName)!); + env.toBeCompiled = env.toBeCompiled.map(o => env.allFiles.find(f => f.unitName === o.unitName)!); + } + } + else { + transformSucceeded = fixTestFiles(env.fileSystem, env.programFileNames, env.compilerOptions); + let cachedTest = "// @hash: " + hash + "\n"; + + if (!transformSucceeded) { + cachedTest += "// @succeeded: false\n"; + } + else { + for (const file of env.allFiles) { + cachedTest += "\n// @fileName: " + file.unitName + "\n"; + const content = env.fileSystem.readFileSync(file.unitName, "utf-8"); + file.content = content; + cachedTest += content; + } + } + IO.writeFile(autoFixCacheTest, cachedTest); + } + if (!transformSucceeded) { + return undefined; + } + env.fileSystem.makeReadonly(); + env.fileSystem = env.fileSystem.shadow(); + env.compilerOptions.isolatedDeclarations = false; + return env; + } + constructor(compilerEnvironment: CompilerTestEnvironment) { + super(compilerEnvironment); + + // Suppress diff for tests with reference directives. + if ( + this.dteDiagnostics.every(d => d.code === ts.Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode.code) + && this.tscIsolatedDeclarationsErrors + ) { + this.isDiagnosticEquivalent = true; + this.isOutputEquivalent = true; + } + } + + protected override get baselinePath() { + return "isolated-declarations/auto-fixed"; + } +} diff --git a/tests/baselines/reference/APILibCheck.errors.txt b/tests/baselines/reference/APILibCheck.errors.txt new file mode 100644 index 0000000000000..58ad249705952 --- /dev/null +++ b/tests/baselines/reference/APILibCheck.errors.txt @@ -0,0 +1,34 @@ +typescript.d.ts(9832,112): error TS2304: Cannot find name 'IsolatedEmitHost'. +typescript.d.ts(9833,69): error TS2304: Cannot find name 'IsolatedEmitHost'. + + +==== index.ts (0 errors) ==== + import ts = require("typescript"); + import tsInternal = require("typescript-internal"); + import tsserverlibrary = require("tsserverlibrary"); + import tsserverlibraryInternal = require("tsserverlibrary-internal"); + +==== node_modules/typescript/package.json (0 errors) ==== + { + "name": "typescript", + "types": "/.ts/typescript.d.ts" + } + +==== node_modules/typescript-internal/package.json (0 errors) ==== + { + "name": "typescript-internal", + "types": "/.ts/typescript.internal.d.ts" + } + +==== node_modules/tsserverlibrary/package.json (0 errors) ==== + { + "name": "tsserverlibrary", + "types": "/.ts/tsserverlibrary.d.ts" + } + +==== node_modules/tsserverlibrary-internal/package.json (0 errors) ==== + { + "name": "tsserverlibrary-internal", + "types": "/.ts/tsserverlibrary.internal.d.ts" + } + \ No newline at end of file diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index c762541ed80ab..6db34f5daf7ee 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -9829,17 +9829,11 @@ declare namespace ts { * @param context A lexical environment context for the visitor. */ function visitEachChild(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; - function emitDeclarationsForProject(projectPath: string, files: string[] | undefined, options: CompilerOptions, host: CompilerHost): string; - function createIsolatedDeclarationsEmitter(rootDir: string, options: CompilerOptions): (file: string, host: CompilerHost) => { - output?: undefined; - diagnostics?: undefined; - } | { - output: string; - diagnostics: Diagnostic[]; - }; - function emitDeclarationsForFile(sourceFile: SourceFile, options: CompilerOptions): { + function createEmitDeclarationHost(options: CompilerOptions, sys: System, commonSourceDirectory?: string): IsolatedEmitHost; + function transpileDeclaration(sourceFile: SourceFile, emitHost: IsolatedEmitHost): { code: string; diagnostics: Diagnostic[]; + outputPath: string; }; function getTsBuildInfoEmitOutputFilePath(options: CompilerOptions): string | undefined; function getOutputFileNames(commandLine: ParsedCommandLine, inputFileName: string, ignoreCase: boolean): readonly string[]; From d6f9d2d9207758046ceec57ac6366dc4db8277da Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Sat, 11 Nov 2023 01:36:28 +0000 Subject: [PATCH 124/224] Added test baseline Signed-off-by: Titian Cernicova-Dragomir --- ...FunctionPropertyAssignments3_es6.d.ts.diff | 29 + ...FunctionPropertyAssignments5_es6.d.ts.diff | 29 + .../MemberFunctionDeclaration5_es6.d.ts.diff | 31 + .../MemberFunctionDeclaration6_es6.d.ts.diff | 34 + .../auto-fixed/diff/ambientEnum1.d.ts.diff | 31 + .../diff/ambientEnumDeclaration1.d.ts.diff | 39 + .../auto-fixed/diff/ambientErrors.d.ts.diff | 39 + ...FlatNoCrashInferenceDeclarations.d.ts.diff | 36 + .../diff/arrowFunctionContexts.d.ts.diff | 43 + ...classMemberWithMissingIdentifier.d.ts.diff | 35 + ...lassMemberWithMissingIdentifier2.d.ts.diff | 39 + ...odeGenEnumWithEnumMemberConflict.d.ts.diff | 25 + .../diff/commonMissingSemicolons.d.ts.diff | 50 + .../diff/computedEnumTypeWidening.d.ts.diff | 107 + .../computedPropertyNames10_ES5.d.ts.diff | 57 + .../computedPropertyNames10_ES6.d.ts.diff | 57 + .../auto-fixed/diff/constEnum1.d.ts.diff | 50 + .../auto-fixed/diff/constEnum2.d.ts.diff | 47 + .../diff/constEnumDeclarations.d.ts.diff | 32 + .../auto-fixed/diff/constEnumErrors.d.ts.diff | 112 + ...amespaceReferenceCausesNoImport2.d.ts.diff | 45 + .../diff/constEnumPropertyAccess1.d.ts.diff | 36 + .../diff/constEnumPropertyAccess2.d.ts.diff | 39 + .../diff/constEnumPropertyAccess3.d.ts.diff | 49 + .../auto-fixed/diff/constEnums.d.ts.diff | 321 +++ .../diff/constantEnumAssert.d.ts.diff | 37 + ...ctorWithIncompleteTypeAnnotation.d.ts.diff | 50 + .../auto-fixed/diff/declFileEnums.d.ts.diff | 62 + ...EmitCommonJsModuleReferencedType.d.ts.diff | 40 + ...efaultExportWithStaticAssignment.d.ts.diff | 93 + ...DestructuringParameterProperties.d.ts.diff | 103 + ...onEmitExpandoPropertyPrivateName.d.ts.diff | 36 + ...EmitForGlobalishSpecifierSymlink.d.ts.diff | 54 + ...mitForGlobalishSpecifierSymlink2.d.ts.diff | 42 + ...onEmitFunctionDuplicateNamespace.d.ts.diff | 32 + ...clarationEmitFunctionKeywordProp.d.ts.diff | 52 + ...larationEmitLateBoundAssignments.d.ts.diff | 40 + ...arationEmitLateBoundAssignments2.d.ts.diff | 229 ++ ...nEmitObjectAssignedDefaultExport.d.ts.diff | 52 + ...onEmitReexportedSymlinkReference.d.ts.diff | 65 + ...nEmitReexportedSymlinkReference2.d.ts.diff | 68 + ...nEmitReexportedSymlinkReference3.d.ts.diff | 36 + ...mitWithInvalidPackageJsonTypings.d.ts.diff | 46 + .../diff/declarationFiles.d.ts.diff | 64 + .../declarationInAmbientContext.d.ts.diff | 36 + .../declarationWithNoInitializer.d.ts.diff | 43 + ...structuringParameterDeclaration6.d.ts.diff | 151 ++ ...estructuringParameterProperties1.d.ts.diff | 117 + ...estructuringParameterProperties2.d.ts.diff | 55 + ...estructuringParameterProperties3.d.ts.diff | 55 + ...estructuringParameterProperties4.d.ts.diff | 55 + ...estructuringParameterProperties5.d.ts.diff | 82 + ...isallowLineTerminatorBeforeArrow.d.ts.diff | 35 + .../duplicateObjectLiteralProperty.d.ts.diff | 44 + .../diff/enumAssignmentCompat5.d.ts.diff | 39 + .../auto-fixed/diff/enumBasics.d.ts.diff | 119 + .../auto-fixed/diff/enumBasics2.d.ts.diff | 75 + .../auto-fixed/diff/enumBasics3.d.ts.diff | 54 + .../diff/enumClassification.d.ts.diff | 127 + .../enumConstantMemberWithString.d.ts.diff | 83 + ...tMemberWithStringEmitDeclaration.d.ts.diff | 65 + ...nstantMemberWithTemplateLiterals.d.ts.diff | 103 + ...hTemplateLiteralsEmitDeclaration.d.ts.diff | 88 + .../diff/enumConstantMembers.d.ts.diff | 128 + ...OnConstantBindingWithInitializer.d.ts.diff | 34 + .../auto-fixed/diff/enumErrors.d.ts.diff | 148 ++ .../diff/enumExportMergingES6.d.ts.diff | 34 + ...teralAssignableToEnumInsideUnion.d.ts.diff | 53 + .../auto-fixed/diff/enumMerging.d.ts.diff | 102 + .../diff/enumMergingErrors.d.ts.diff | 46 + .../auto-fixed/diff/enumNumbering1.d.ts.diff | 29 + ...ropertyAccessBeforeInitalisation.d.ts.diff | 48 + .../diff/enumWithComputedMember.d.ts.diff | 30 + .../auto-fixed/diff/enumWithExport.d.ts.diff | 29 + ...numWithParenthesizedInitializer1.d.ts.diff | 26 + ...utInitializerAfterComputedMember.d.ts.diff | 26 + .../diff/equalityWithEnumTypes.d.ts.diff | 40 + .../diff/exactSpellingSuggestion.d.ts.diff | 36 + ...FunctionContextualTypesJSDocInTs.d.ts.diff | 30 + ...doFunctionContextualTypesNoValue.d.ts.diff | 35 + ...ctionExpressionsWithDynamicNames.d.ts.diff | 49 + .../diff/exportAssignDottedName.d.ts.diff | 33 + .../diff/exportAssignNonIdentifier.d.ts.diff | 74 + ...portAssignmentWithoutIdentifier1.d.ts.diff | 31 + .../diff/exportDefaultNamespace.d.ts.diff | 32 + .../diff/exportEqualsProperty.d.ts.diff | 84 + .../diff/exportEqualsProperty2.d.ts.diff | 41 + .../diff/forwardRefInEnum.d.ts.diff | 64 + .../diff/functionImplementations.d.ts.diff | 159 ++ .../diff/initializersInAmbientEnums.d.ts.diff | 29 + ...dModulesGlobalNamespacesAndEnums.d.ts.diff | 76 + .../jsContainerMergeTsDeclaration.d.ts.diff | 39 + .../diff/jsxComponentTypeErrors.d.ts.diff | 51 + ...espaceImplicitImportJSXNamespace.d.ts.diff | 121 + ...ickedOverGlobalOne(jsx=preserve).d.ts.diff | 84 + ...ckedOverGlobalOne(jsx=react-jsx).d.ts.diff | 84 + ...aceFromPragmaPickedOverGlobalOne.d.ts.diff | 85 + ...tionMemberAssignmentDeclarations.d.ts.diff | 31 + ...rtsSpecifierGenerationConditions.d.ts.diff | 51 + .../diff/mergedDeclarations2.d.ts.diff | 37 + .../mergedEnumDeclarationCodeGen.d.ts.diff | 34 + .../methodContainingLocalFunction.d.ts.diff | 71 + .../diff/mixedTypeEnumComparison.d.ts.diff | 60 + ...AugmentationDisallowedExtensions.d.ts.diff | 65 + .../moduleAugmentationNoNewNames.d.ts.diff | 59 + .../negateOperatorInvalidOperations.d.ts.diff | 43 + .../diff/newTargetNarrowing.d.ts.diff | 34 + ...itAnyDestructuringVarDeclaration.d.ts.diff | 98 + ...nodeModuleReexportFromDottedPath.d.ts.diff | 41 + ...ecifierResolution(module=node16).d.ts.diff | 39 + ...ifierResolution(module=nodenext).d.ts.diff | 39 + ...esExportsSourceTs(module=node16).d.ts.diff | 43 + ...ExportsSourceTs(module=nodenext).d.ts.diff | 43 + ...erationConditions(module=node16).d.ts.diff | 36 + ...ationConditions(module=nodenext).d.ts.diff | 36 + ...nerationDirectory(module=node16).d.ts.diff | 36 + ...rationDirectory(module=nodenext).d.ts.diff | 36 + ...GenerationPattern(module=node16).d.ts.diff | 36 + ...nerationPattern(module=nodenext).d.ts.diff | 36 + .../diff/nullPropertyName.d.ts.diff | 185 ++ .../diff/numericEnumMappedType.d.ts.diff | 67 + .../objectLiteralGettersAndSetters.d.ts.diff | 178 ++ ...oadingStaticFunctionsInFunctions.d.ts.diff | 34 + ...ncGenerators.classMethods.es2018.d.ts.diff | 93 + ...tors.objectLiteralMethods.es2018.d.ts.diff | 71 + .../auto-fixed/diff/parserEnum1.d.ts.diff | 30 + .../auto-fixed/diff/parserEnum2.d.ts.diff | 30 + .../diff/parserEnumDeclaration6.d.ts.diff | 27 + ...rEqualsGreaterThanAfterFunction1.d.ts.diff | 27 + ...rEqualsGreaterThanAfterFunction2.d.ts.diff | 31 + ...rserErrorRecovery_ParameterList1.d.ts.diff | 32 + ...rserErrorRecovery_ParameterList2.d.ts.diff | 31 + ...SIOnCallAfterFunctionExpression1.d.ts.diff | 31 + .../diff/parserRealSource10.d.ts.diff | 80 + .../diff/parserRealSource14.d.ts.diff | 57 + .../diff/parserRealSource2.d.ts.diff | 699 +++++ .../diff/parserRealSource3.d.ts.diff | 44 + .../diff/parserSkippedTokens16.d.ts.diff | 43 + .../diff/parserStrictMode8.d.ts.diff | 28 + .../diff/preserveConstEnums.d.ts.diff | 24 + ...propertyAssignmentUseParentType3.d.ts.diff | 69 + .../diff/reexportClassDefinition.d.ts.diff | 45 + .../auto-fixed/diff/reservedWords3.d.ts.diff | 92 + .../diff/staticsInAFunction.d.ts.diff | 34 + .../diff/strictModeOctalLiterals.d.ts.diff | 28 + .../diff/symbolDeclarationEmit12.d.ts.diff | 39 + ...larationEmitModuleNamesImportRef.d.ts.diff | 40 + .../diff/templateLiteralTypes4.d.ts.diff | 50 + ...ateStringInFunctionParameterType.d.ts.diff | 32 + ...StringInFunctionParameterTypeES6.d.ts.diff | 32 + ...teStringWithEmbeddedYieldKeyword.d.ts.diff | 30 + .../diff/thisInInvalidContexts.d.ts.diff | 40 + ...sInInvalidContextsExternalModule.d.ts.diff | 42 + .../thisInPropertyBoundDeclarations.d.ts.diff | 38 + ...nside-enum-should-not-be-allowed.d.ts.diff | 27 + .../diff/twoAccessorsWithSameName.d.ts.diff | 45 + .../typeFromPropertyAssignment29.d.ts.diff | 108 + .../typeFromPropertyAssignment31.d.ts.diff | 39 + .../typeFromPropertyAssignment32.d.ts.diff | 41 + .../typeFromPropertyAssignment33.d.ts.diff | 44 + .../typeFromPropertyAssignment36.d.ts.diff | 46 + .../typeFromPropertyAssignment38.d.ts.diff | 37 + ...ersionsDeclarationEmit.multiFile.d.ts.diff | 59 + ...mit.multiFileBackReferenceToSelf.d.ts.diff | 35 + ...multiFileBackReferenceToUnmapped.d.ts.diff | 56 + .../underscoreEscapedNameInEnum.d.ts.diff | 26 + ...rbatimModuleSyntaxConstEnumUsage.d.ts.diff | 51 + .../diff/wellKnownSymbolExpando.d.ts.diff | 25 + .../dte/FunctionPropertyAssignments3_es6.d.ts | 23 + .../dte/FunctionPropertyAssignments5_es6.d.ts | 23 + .../dte/MemberFunctionDeclaration5_es6.d.ts | 29 + .../dte/MemberFunctionDeclaration6_es6.d.ts | 32 + .../auto-fixed/dte/ambientEnum1.d.ts | 42 + .../dte/ambientEnumDeclaration1.d.ts | 51 + .../auto-fixed/dte/ambientErrors.d.ts | 211 ++ ...yFakeFlatNoCrashInferenceDeclarations.d.ts | 58 + .../auto-fixed/dte/arrowFunctionContexts.d.ts | 263 ++ .../dte/classMemberWithMissingIdentifier.d.ts | 35 + .../classMemberWithMissingIdentifier2.d.ts | 47 + ...sionCodeGenEnumWithEnumMemberConflict.d.ts | 29 + .../dte/commonMissingSemicolons.d.ts | 453 ++++ .../dte/computedEnumTypeWidening.d.ts | 219 ++ .../dte/computedPropertyNames10_ES5.d.ts | 65 + .../dte/computedPropertyNames10_ES6.d.ts | 65 + .../auto-fixed/dte/constEnum1.d.ts | 70 + .../auto-fixed/dte/constEnum2.d.ts | 65 + .../auto-fixed/dte/constEnumDeclarations.d.ts | 49 + .../auto-fixed/dte/constEnumErrors.d.ts | 210 ++ ...EnumNamespaceReferenceCausesNoImport2.d.ts | 71 + .../dte/constEnumPropertyAccess1.d.ts | 100 + .../dte/constEnumPropertyAccess2.d.ts | 80 + .../dte/constEnumPropertyAccess3.d.ts | 71 + .../auto-fixed/dte/constEnums.d.ts | 551 ++++ .../auto-fixed/dte/constantEnumAssert.d.ts | 228 ++ ...nstructorWithIncompleteTypeAnnotation.d.ts | 912 +++++++ .../auto-fixed/dte/declFileEnums.d.ts | 121 + ...ationEmitCommonJsModuleReferencedType.d.ts | 67 + ...EmitDefaultExportWithStaticAssignment.d.ts | 104 + ...nEmitDestructuringParameterProperties.d.ts | 106 + ...arationEmitExpandoPropertyPrivateName.d.ts | 43 + ...ationEmitForGlobalishSpecifierSymlink.d.ts | 82 + ...tionEmitForGlobalishSpecifierSymlink2.d.ts | 58 + ...arationEmitFunctionDuplicateNamespace.d.ts | 35 + .../declarationEmitFunctionKeywordProp.d.ts | 46 + .../declarationEmitLateBoundAssignments.d.ts | 48 + .../declarationEmitLateBoundAssignments2.d.ts | 275 ++ ...rationEmitObjectAssignedDefaultExport.d.ts | 106 + ...arationEmitReexportedSymlinkReference.d.ts | 103 + ...rationEmitReexportedSymlinkReference2.d.ts | 109 + ...rationEmitReexportedSymlinkReference3.d.ts | 106 + ...tionEmitWithInvalidPackageJsonTypings.d.ts | 68 + .../auto-fixed/dte/declarationFiles.d.ts | 167 ++ .../dte/declarationInAmbientContext.d.ts | 34 + .../dte/declarationWithNoInitializer.d.ts | 40 + .../destructuringParameterDeclaration6.d.ts | 2311 +++++++++++++++++ .../destructuringParameterProperties1.d.ts | 186 ++ .../destructuringParameterProperties2.d.ts | 154 ++ .../destructuringParameterProperties3.d.ts | 192 ++ .../destructuringParameterProperties4.d.ts | 118 + .../destructuringParameterProperties5.d.ts | 139 + .../disallowLineTerminatorBeforeArrow.d.ts | 199 ++ .../dte/duplicateObjectLiteralProperty.d.ts | 84 + .../auto-fixed/dte/enumAssignmentCompat5.d.ts | 95 + .../auto-fixed/dte/enumBasics.d.ts | 248 ++ .../auto-fixed/dte/enumBasics2.d.ts | 93 + .../auto-fixed/dte/enumBasics3.d.ts | 81 + .../auto-fixed/dte/enumClassification.d.ts | 259 ++ .../dte/enumConstantMemberWithString.d.ts | 140 + ...nstantMemberWithStringEmitDeclaration.d.ts | 113 + ...numConstantMemberWithTemplateLiterals.d.ts | 184 ++ ...erWithTemplateLiteralsEmitDeclaration.d.ts | 157 ++ .../auto-fixed/dte/enumConstantMembers.d.ts | 192 ++ ...ErrorOnConstantBindingWithInitializer.d.ts | 60 + .../auto-fixed/dte/enumErrors.d.ts | 287 ++ .../auto-fixed/dte/enumExportMergingES6.d.ts | 46 + ...numLiteralAssignableToEnumInsideUnion.d.ts | 129 + .../auto-fixed/dte/enumMerging.d.ts | 218 ++ .../auto-fixed/dte/enumMergingErrors.d.ts | 176 ++ .../auto-fixed/dte/enumNumbering1.d.ts | 40 + ...enumPropertyAccessBeforeInitalisation.d.ts | 58 + .../dte/enumWithComputedMember.d.ts | 40 + .../auto-fixed/dte/enumWithExport.d.ts | 38 + .../enumWithParenthesizedInitializer1.d.ts | 29 + ...WithoutInitializerAfterComputedMember.d.ts | 32 + .../auto-fixed/dte/equalityWithEnumTypes.d.ts | 126 + .../dte/exactSpellingSuggestion.d.ts | 52 + ...pandoFunctionContextualTypesJSDocInTs.d.ts | 30 + ...expandoFunctionContextualTypesNoValue.d.ts | 35 + ...doFunctionExpressionsWithDynamicNames.d.ts | 48 + .../dte/exportAssignDottedName.d.ts | 38 + .../dte/exportAssignNonIdentifier.d.ts | 107 + .../exportAssignmentWithoutIdentifier1.d.ts | 35 + .../dte/exportDefaultNamespace.d.ts | 30 + .../auto-fixed/dte/exportEqualsProperty.d.ts | 108 + .../auto-fixed/dte/exportEqualsProperty2.d.ts | 52 + .../auto-fixed/dte/forwardRefInEnum.d.ts | 75 + .../dte/functionImplementations.d.ts | 436 ++++ .../dte/initializersInAmbientEnums.d.ts | 35 + ...olatedModulesGlobalNamespacesAndEnums.d.ts | 136 + .../dte/jsContainerMergeTsDeclaration.d.ts | 44 + .../dte/jsxComponentTypeErrors.d.ts | 191 ++ ...sxNamespaceImplicitImportJSXNamespace.d.ts | 216 ++ ...nfigPickedOverGlobalOne(jsx=preserve).d.ts | 142 + ...figPickedOverGlobalOne(jsx=react-jsx).d.ts | 142 + ...amespaceFromPragmaPickedOverGlobalOne.d.ts | 144 + ...dFunctionMemberAssignmentDeclarations.d.ts | 32 + ...sExportsSpecifierGenerationConditions.d.ts | 76 + .../auto-fixed/dte/mergedDeclarations2.d.ts | 49 + .../dte/mergedEnumDeclarationCodeGen.d.ts | 41 + .../dte/methodContainingLocalFunction.d.ts | 135 + .../dte/mixedTypeEnumComparison.d.ts | 110 + ...oduleAugmentationDisallowedExtensions.d.ts | 186 ++ .../dte/moduleAugmentationNoNewNames.d.ts | 89 + .../dte/negateOperatorInvalidOperations.d.ts | 81 + .../auto-fixed/dte/newTargetNarrowing.d.ts | 39 + ...mplicitAnyDestructuringVarDeclaration.d.ts | 127 + .../dte/nodeModuleReexportFromDottedPath.d.ts | 53 + ...cksSpecifierResolution(module=node16).d.ts | 80 + ...sSpecifierResolution(module=nodenext).d.ts | 80 + ...ModulesExportsSourceTs(module=node16).d.ts | 90 + ...dulesExportsSourceTs(module=nodenext).d.ts | 90 + ...erGenerationConditions(module=node16).d.ts | 91 + ...GenerationConditions(module=nodenext).d.ts | 91 + ...ierGenerationDirectory(module=node16).d.ts | 81 + ...rGenerationDirectory(module=nodenext).d.ts | 81 + ...ifierGenerationPattern(module=node16).d.ts | 81 + ...ierGenerationPattern(module=nodenext).d.ts | 81 + .../auto-fixed/dte/nullPropertyName.d.ts | 184 ++ .../auto-fixed/dte/numericEnumMappedType.d.ts | 139 + .../dte/objectLiteralGettersAndSetters.d.ts | 326 +++ ...overloadingStaticFunctionsInFunctions.d.ts | 70 + ...r.asyncGenerators.classMethods.es2018.d.ts | 499 ++++ ...enerators.objectLiteralMethods.es2018.d.ts | 465 ++++ .../auto-fixed/dte/parserEnum1.d.ts | 38 + .../auto-fixed/dte/parserEnum2.d.ts | 38 + .../dte/parserEnumDeclaration6.d.ts | 35 + ...parserEqualsGreaterThanAfterFunction1.d.ts | 23 + ...parserEqualsGreaterThanAfterFunction2.d.ts | 32 + .../parserErrorRecovery_ParameterList1.d.ts | 31 + .../parserErrorRecovery_ParameterList2.d.ts | 28 + ...erNoASIOnCallAfterFunctionExpression1.d.ts | 31 + .../auto-fixed/dte/parserRealSource10.d.ts | 2205 ++++++++++++++++ .../auto-fixed/dte/parserRealSource14.d.ts | 1737 +++++++++++++ .../auto-fixed/dte/parserRealSource2.d.ts | 1217 +++++++++ .../auto-fixed/dte/parserRealSource3.d.ts | 377 +++ .../auto-fixed/dte/parserSkippedTokens16.d.ts | 62 + .../auto-fixed/dte/parserStrictMode8.d.ts | 27 + .../auto-fixed/dte/preserveConstEnums.d.ts | 27 + .../dte/propertyAssignmentUseParentType3.d.ts | 76 + .../dte/reexportClassDefinition.d.ts | 57 + .../auto-fixed/dte/reservedWords3.d.ts | 90 + .../auto-fixed/dte/staticsInAFunction.d.ts | 72 + .../dte/strictModeOctalLiterals.d.ts | 39 + .../dte/symbolDeclarationEmit12.d.ts | 59 + ...nkDeclarationEmitModuleNamesImportRef.d.ts | 54 + .../auto-fixed/dte/templateLiteralTypes4.d.ts | 789 ++++++ ...templateStringInFunctionParameterType.d.ts | 35 + ...plateStringInFunctionParameterTypeES6.d.ts | 35 + ...emplateStringWithEmbeddedYieldKeyword.d.ts | 33 + .../auto-fixed/dte/thisInInvalidContexts.d.ts | 150 ++ .../thisInInvalidContextsExternalModule.d.ts | 126 + .../dte/thisInPropertyBoundDeclarations.d.ts | 184 ++ ...his_inside-enum-should-not-be-allowed.d.ts | 46 + .../dte/twoAccessorsWithSameName.d.ts | 126 + .../dte/typeFromPropertyAssignment29.d.ts | 316 +++ .../dte/typeFromPropertyAssignment31.d.ts | 91 + .../dte/typeFromPropertyAssignment32.d.ts | 103 + .../dte/typeFromPropertyAssignment33.d.ts | 107 + .../dte/typeFromPropertyAssignment36.d.ts | 203 ++ .../dte/typeFromPropertyAssignment38.d.ts | 40 + ...ypesVersionsDeclarationEmit.multiFile.d.ts | 86 + ...tionEmit.multiFileBackReferenceToSelf.d.ts | 82 + ...Emit.multiFileBackReferenceToUnmapped.d.ts | 80 + .../dte/underscoreEscapedNameInEnum.d.ts | 31 + .../verbatimModuleSyntaxConstEnumUsage.d.ts | 60 + .../dte/wellKnownSymbolExpando.d.ts | 24 + .../tsc/FunctionPropertyAssignments3_es6.d.ts | 22 + .../tsc/FunctionPropertyAssignments5_es6.d.ts | 22 + .../tsc/MemberFunctionDeclaration5_es6.d.ts | 26 + .../tsc/MemberFunctionDeclaration6_es6.d.ts | 29 + .../auto-fixed/tsc/ambientEnum1.d.ts | 39 + .../tsc/ambientEnumDeclaration1.d.ts | 25 + .../auto-fixed/tsc/ambientErrors.d.ts | 208 ++ ...yFakeFlatNoCrashInferenceDeclarations.d.ts | 55 + .../auto-fixed/tsc/arrowFunctionContexts.d.ts | 257 ++ .../tsc/classMemberWithMissingIdentifier.d.ts | 32 + .../classMemberWithMissingIdentifier2.d.ts | 44 + ...sionCodeGenEnumWithEnumMemberConflict.d.ts | 17 + .../tsc/commonMissingSemicolons.d.ts | 450 ++++ .../tsc/computedEnumTypeWidening.d.ts | 125 + .../tsc/computedPropertyNames10_ES5.d.ts | 35 + .../tsc/computedPropertyNames10_ES6.d.ts | 35 + .../auto-fixed/tsc/constEnum1.d.ts | 33 + .../auto-fixed/tsc/constEnum2.d.ts | 56 + .../auto-fixed/tsc/constEnumDeclarations.d.ts | 30 + .../auto-fixed/tsc/constEnumErrors.d.ts | 180 ++ ...EnumNamespaceReferenceCausesNoImport2.d.ts | 44 + .../tsc/constEnumPropertyAccess1.d.ts | 94 + .../tsc/constEnumPropertyAccess2.d.ts | 74 + .../tsc/constEnumPropertyAccess3.d.ts | 35 + .../auto-fixed/tsc/constEnums.d.ts | 281 ++ .../auto-fixed/tsc/constantEnumAssert.d.ts | 222 ++ ...nstructorWithIncompleteTypeAnnotation.d.ts | 909 +++++++ .../auto-fixed/tsc/declFileEnums.d.ts | 72 + ...ationEmitCommonJsModuleReferencedType.d.ts | 64 + ...EmitDefaultExportWithStaticAssignment.d.ts | 73 + ...nEmitDestructuringParameterProperties.d.ts | 79 + ...arationEmitExpandoPropertyPrivateName.d.ts | 43 + ...ationEmitForGlobalishSpecifierSymlink.d.ts | 42 + ...tionEmitForGlobalishSpecifierSymlink2.d.ts | 30 + ...arationEmitFunctionDuplicateNamespace.d.ts | 22 + .../declarationEmitFunctionKeywordProp.d.ts | 35 + .../declarationEmitLateBoundAssignments.d.ts | 29 + .../declarationEmitLateBoundAssignments2.d.ts | 156 ++ ...rationEmitObjectAssignedDefaultExport.d.ts | 100 + ...arationEmitReexportedSymlinkReference.d.ts | 55 + ...rationEmitReexportedSymlinkReference2.d.ts | 58 + ...rationEmitReexportedSymlinkReference3.d.ts | 104 + ...tionEmitWithInvalidPackageJsonTypings.d.ts | 37 + .../auto-fixed/tsc/declarationFiles.d.ts | 161 ++ .../tsc/declarationInAmbientContext.d.ts | 14 + .../tsc/declarationWithNoInitializer.d.ts | 28 + .../destructuringParameterDeclaration6.d.ts | 2290 ++++++++++++++++ .../destructuringParameterProperties1.d.ts | 159 ++ .../destructuringParameterProperties2.d.ts | 145 ++ .../destructuringParameterProperties3.d.ts | 183 ++ .../destructuringParameterProperties4.d.ts | 109 + .../destructuringParameterProperties5.d.ts | 121 + .../disallowLineTerminatorBeforeArrow.d.ts | 196 ++ .../tsc/duplicateObjectLiteralProperty.d.ts | 83 + .../auto-fixed/tsc/enumAssignmentCompat5.d.ts | 86 + .../auto-fixed/tsc/enumBasics.d.ts | 142 + .../auto-fixed/tsc/enumBasics2.d.ts | 72 + .../auto-fixed/tsc/enumBasics3.d.ts | 72 + .../auto-fixed/tsc/enumClassification.d.ts | 145 ++ .../tsc/enumConstantMemberWithString.d.ts | 113 + ...nstantMemberWithStringEmitDeclaration.d.ts | 61 + ...numConstantMemberWithTemplateLiterals.d.ts | 145 ++ ...erWithTemplateLiteralsEmitDeclaration.d.ts | 82 + .../auto-fixed/tsc/enumConstantMembers.d.ts | 150 ++ ...ErrorOnConstantBindingWithInitializer.d.ts | 57 + .../auto-fixed/tsc/enumErrors.d.ts | 248 ++ .../auto-fixed/tsc/enumExportMergingES6.d.ts | 28 + ...numLiteralAssignableToEnumInsideUnion.d.ts | 117 + .../auto-fixed/tsc/enumMerging.d.ts | 129 + .../auto-fixed/tsc/enumMergingErrors.d.ts | 167 ++ .../auto-fixed/tsc/enumNumbering1.d.ts | 24 + ...enumPropertyAccessBeforeInitalisation.d.ts | 46 + .../tsc/enumWithComputedMember.d.ts | 34 + .../auto-fixed/tsc/enumWithExport.d.ts | 35 + .../enumWithParenthesizedInitializer1.d.ts | 26 + ...WithoutInitializerAfterComputedMember.d.ts | 19 + .../auto-fixed/tsc/equalityWithEnumTypes.d.ts | 120 + .../tsc/exactSpellingSuggestion.d.ts | 43 + ...pandoFunctionContextualTypesJSDocInTs.d.ts | 19 + ...expandoFunctionContextualTypesNoValue.d.ts | 35 + ...doFunctionExpressionsWithDynamicNames.d.ts | 27 + .../tsc/exportAssignDottedName.d.ts | 23 + .../tsc/exportAssignNonIdentifier.d.ts | 98 + .../exportAssignmentWithoutIdentifier1.d.ts | 19 + .../tsc/exportDefaultNamespace.d.ts | 20 + .../auto-fixed/tsc/exportEqualsProperty.d.ts | 65 + .../auto-fixed/tsc/exportEqualsProperty2.d.ts | 29 + .../auto-fixed/tsc/forwardRefInEnum.d.ts | 63 + .../tsc/functionImplementations.d.ts | 395 +++ .../tsc/initializersInAmbientEnums.d.ts | 19 + ...olatedModulesGlobalNamespacesAndEnums.d.ts | 121 + .../tsc/jsContainerMergeTsDeclaration.d.ts | 39 + .../tsc/jsxComponentTypeErrors.d.ts | 191 ++ ...sxNamespaceImplicitImportJSXNamespace.d.ts | 109 + ...nfigPickedOverGlobalOne(jsx=preserve).d.ts | 72 + ...figPickedOverGlobalOne(jsx=react-jsx).d.ts | 72 + ...amespaceFromPragmaPickedOverGlobalOne.d.ts | 73 + ...dFunctionMemberAssignmentDeclarations.d.ts | 20 + ...sExportsSpecifierGenerationConditions.d.ts | 39 + .../auto-fixed/tsc/mergedDeclarations2.d.ts | 46 + .../tsc/mergedEnumDeclarationCodeGen.d.ts | 23 + .../tsc/methodContainingLocalFunction.d.ts | 77 + .../tsc/mixedTypeEnumComparison.d.ts | 63 + ...oduleAugmentationDisallowedExtensions.d.ts | 168 ++ .../tsc/moduleAugmentationNoNewNames.d.ts | 53 + .../tsc/negateOperatorInvalidOperations.d.ts | 78 + .../auto-fixed/tsc/newTargetNarrowing.d.ts | 24 + ...mplicitAnyDestructuringVarDeclaration.d.ts | 106 + .../tsc/nodeModuleReexportFromDottedPath.d.ts | 29 + ...cksSpecifierResolution(module=node16).d.ts | 77 + ...sSpecifierResolution(module=nodenext).d.ts | 77 + ...ModulesExportsSourceTs(module=node16).d.ts | 87 + ...dulesExportsSourceTs(module=nodenext).d.ts | 87 + ...erGenerationConditions(module=node16).d.ts | 88 + ...GenerationConditions(module=nodenext).d.ts | 88 + ...ierGenerationDirectory(module=node16).d.ts | 78 + ...rGenerationDirectory(module=nodenext).d.ts | 78 + ...ifierGenerationPattern(module=node16).d.ts | 78 + ...ierGenerationPattern(module=nodenext).d.ts | 78 + .../auto-fixed/tsc/nullPropertyName.d.ts | 174 ++ .../auto-fixed/tsc/numericEnumMappedType.d.ts | 85 + .../tsc/objectLiteralGettersAndSetters.d.ts | 209 ++ ...overloadingStaticFunctionsInFunctions.d.ts | 67 + ...r.asyncGenerators.classMethods.es2018.d.ts | 489 ++++ ...enerators.objectLiteralMethods.es2018.d.ts | 465 ++++ .../auto-fixed/tsc/parserEnum1.d.ts | 21 + .../auto-fixed/tsc/parserEnum2.d.ts | 21 + .../tsc/parserEnumDeclaration6.d.ts | 21 + ...parserEqualsGreaterThanAfterFunction1.d.ts | 20 + ...parserEqualsGreaterThanAfterFunction2.d.ts | 29 + .../parserErrorRecovery_ParameterList1.d.ts | 28 + .../parserErrorRecovery_ParameterList2.d.ts | 25 + ...erNoASIOnCallAfterFunctionExpression1.d.ts | 27 + .../auto-fixed/tsc/parserRealSource10.d.ts | 2187 ++++++++++++++++ .../auto-fixed/tsc/parserRealSource14.d.ts | 1731 ++++++++++++ .../auto-fixed/tsc/parserRealSource2.d.ts | 773 ++++++ .../auto-fixed/tsc/parserRealSource3.d.ts | 368 +++ .../auto-fixed/tsc/parserSkippedTokens16.d.ts | 59 + .../auto-fixed/tsc/parserStrictMode8.d.ts | 23 + .../auto-fixed/tsc/preserveConstEnums.d.ts | 16 + .../tsc/propertyAssignmentUseParentType3.d.ts | 49 + .../tsc/reexportClassDefinition.d.ts | 37 + .../auto-fixed/tsc/reservedWords3.d.ts | 72 + .../auto-fixed/tsc/staticsInAFunction.d.ts | 69 + .../tsc/strictModeOctalLiterals.d.ts | 36 + .../tsc/symbolDeclarationEmit12.d.ts | 55 + ...nkDeclarationEmitModuleNamesImportRef.d.ts | 28 + .../auto-fixed/tsc/templateLiteralTypes4.d.ts | 783 ++++++ ...templateStringInFunctionParameterType.d.ts | 32 + ...plateStringInFunctionParameterTypeES6.d.ts | 32 + ...emplateStringWithEmbeddedYieldKeyword.d.ts | 30 + .../auto-fixed/tsc/thisInInvalidContexts.d.ts | 144 + .../thisInInvalidContextsExternalModule.d.ts | 123 + .../tsc/thisInPropertyBoundDeclarations.d.ts | 181 ++ ...his_inside-enum-should-not-be-allowed.d.ts | 43 + .../tsc/twoAccessorsWithSameName.d.ts | 125 + .../tsc/typeFromPropertyAssignment29.d.ts | 317 +++ .../tsc/typeFromPropertyAssignment31.d.ts | 92 + .../tsc/typeFromPropertyAssignment32.d.ts | 104 + .../tsc/typeFromPropertyAssignment33.d.ts | 108 + .../tsc/typeFromPropertyAssignment36.d.ts | 205 ++ .../tsc/typeFromPropertyAssignment38.d.ts | 26 + ...ypesVersionsDeclarationEmit.multiFile.d.ts | 43 + ...tionEmit.multiFileBackReferenceToSelf.d.ts | 79 + ...Emit.multiFileBackReferenceToUnmapped.d.ts | 40 + .../tsc/underscoreEscapedNameInEnum.d.ts | 18 + .../verbatimModuleSyntaxConstEnumUsage.d.ts | 35 + .../tsc/wellKnownSymbolExpando.d.ts | 14 + 504 files changed, 59701 insertions(+) create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments3_es6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments5_es6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration5_es6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration6_es6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnum1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnumDeclaration1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientErrors.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/arrayFakeFlatNoCrashInferenceDeclarations.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/arrowFunctionContexts.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/collisionCodeGenEnumWithEnumMemberConflict.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/commonMissingSemicolons.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedEnumTypeWidening.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumDeclarations.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumErrors.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumNamespaceReferenceCausesNoImport2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess3.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnums.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constantEnumAssert.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constructorWithIncompleteTypeAnnotation.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileEnums.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitCommonJsModuleReferencedType.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDefaultExportWithStaticAssignment.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringParameterProperties.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExpandoPropertyPrivateName.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitFunctionDuplicateNamespace.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitFunctionKeywordProp.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitLateBoundAssignments.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitLateBoundAssignments2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectAssignedDefaultExport.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference3.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitWithInvalidPackageJsonTypings.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationInAmbientContext.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationWithNoInitializer.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterDeclaration6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties3.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties4.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/disallowLineTerminatorBeforeArrow.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/duplicateObjectLiteralProperty.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumAssignmentCompat5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics3.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumClassification.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithString.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithStringEmitDeclaration.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithTemplateLiterals.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMembers.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumErrorOnConstantBindingWithInitializer.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumErrors.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumExportMergingES6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumLiteralAssignableToEnumInsideUnion.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMerging.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMergingErrors.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumNumbering1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumPropertyAccessBeforeInitalisation.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithComputedMember.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithExport.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithParenthesizedInitializer1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithoutInitializerAfterComputedMember.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/equalityWithEnumTypes.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/exactSpellingSuggestion.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesJSDocInTs.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesNoValue.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignDottedName.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignNonIdentifier.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignmentWithoutIdentifier1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportDefaultNamespace.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/forwardRefInEnum.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/functionImplementations.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/initializersInAmbientEnums.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsContainerMergeTsDeclaration.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxComponentTypeErrors.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespace.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/lateBoundFunctionMemberAssignmentDeclarations.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedDeclarations2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedEnumDeclarationCodeGen.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/methodContainingLocalFunction.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/mixedTypeEnumComparison.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationDisallowedExtensions.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationNoNewNames.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/negateOperatorInvalidOperations.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/newTargetNarrowing.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/noImplicitAnyDestructuringVarDeclaration.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModuleReexportFromDottedPath.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsBlocksSpecifierResolution(module=node16).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsBlocksSpecifierResolution(module=nodenext).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSourceTs(module=node16).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSourceTs(module=nodenext).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationConditions(module=node16).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationConditions(module=nodenext).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationDirectory(module=node16).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationDirectory(module=nodenext).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationPattern(module=node16).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationPattern(module=nodenext).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nullPropertyName.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/numericEnumMappedType.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/objectLiteralGettersAndSetters.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/overloadingStaticFunctionsInFunctions.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.classMethods.es2018.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnumDeclaration6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserNoASIOnCallAfterFunctionExpression1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource10.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource14.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource3.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserSkippedTokens16.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserStrictMode8.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/preserveConstEnums.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/propertyAssignmentUseParentType3.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/reexportClassDefinition.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/reservedWords3.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/staticsInAFunction.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/strictModeOctalLiterals.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolDeclarationEmit12.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateLiteralTypes4.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterType.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterTypeES6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringWithEmbeddedYieldKeyword.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContexts.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContextsExternalModule.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInPropertyBoundDeclarations.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/this_inside-enum-should-not-be-allowed.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/twoAccessorsWithSameName.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment29.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment31.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment32.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment33.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment36.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment38.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFile.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/underscoreEscapedNameInEnum.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/wellKnownSymbolExpando.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments3_es6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments5_es6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration5_es6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration6_es6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnum1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnumDeclaration1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrayFakeFlatNoCrashInferenceDeclarations.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrowFunctionContexts.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/collisionCodeGenEnumWithEnumMemberConflict.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/commonMissingSemicolons.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedEnumTypeWidening.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumDeclarations.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumNamespaceReferenceCausesNoImport2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnums.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constantEnumAssert.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constructorWithIncompleteTypeAnnotation.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCommonJsModuleReferencedType.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDefaultExportWithStaticAssignment.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringParameterProperties.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoPropertyPrivateName.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionDuplicateNamespace.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionKeywordProp.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectAssignedDefaultExport.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithInvalidPackageJsonTypings.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationInAmbientContext.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationWithNoInitializer.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterDeclaration6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/disallowLineTerminatorBeforeArrow.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicateObjectLiteralProperty.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumAssignmentCompat5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumClassification.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithString.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithStringEmitDeclaration.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiterals.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMembers.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrorOnConstantBindingWithInitializer.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumExportMergingES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumLiteralAssignableToEnumInsideUnion.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMerging.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMergingErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumNumbering1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumPropertyAccessBeforeInitalisation.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithComputedMember.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithExport.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithParenthesizedInitializer1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithoutInitializerAfterComputedMember.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/equalityWithEnumTypes.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/exactSpellingSuggestion.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesJSDocInTs.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesNoValue.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionExpressionsWithDynamicNames.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignDottedName.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignNonIdentifier.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentWithoutIdentifier1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportDefaultNamespace.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/forwardRefInEnum.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/functionImplementations.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/initializersInAmbientEnums.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsContainerMergeTsDeclaration.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxComponentTypeErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespace.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/lateBoundFunctionMemberAssignmentDeclarations.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedDeclarations2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedEnumDeclarationCodeGen.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/methodContainingLocalFunction.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixedTypeEnumComparison.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationDisallowedExtensions.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationNoNewNames.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/negateOperatorInvalidOperations.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/newTargetNarrowing.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/noImplicitAnyDestructuringVarDeclaration.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModuleReexportFromDottedPath.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsBlocksSpecifierResolution(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsBlocksSpecifierResolution(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSourceTs(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSourceTs(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationConditions(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationConditions(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationDirectory(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationDirectory(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationPattern(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationPattern(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nullPropertyName.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/numericEnumMappedType.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/objectLiteralGettersAndSetters.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/overloadingStaticFunctionsInFunctions.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.classMethods.es2018.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnumDeclaration6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserNoASIOnCallAfterFunctionExpression1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource10.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource14.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserSkippedTokens16.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserStrictMode8.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/preserveConstEnums.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/propertyAssignmentUseParentType3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportClassDefinition.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/reservedWords3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/staticsInAFunction.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/strictModeOctalLiterals.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit12.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterType.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterTypeES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringWithEmbeddedYieldKeyword.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContexts.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContextsExternalModule.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInPropertyBoundDeclarations.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/this_inside-enum-should-not-be-allowed.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/twoAccessorsWithSameName.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment31.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment32.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment33.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment36.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment38.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/typesVersionsDeclarationEmit.multiFile.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/underscoreEscapedNameInEnum.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/verbatimModuleSyntaxConstEnumUsage.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/wellKnownSymbolExpando.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments3_es6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments5_es6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration5_es6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration6_es6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnum1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnumDeclaration1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrayFakeFlatNoCrashInferenceDeclarations.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrowFunctionContexts.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/collisionCodeGenEnumWithEnumMemberConflict.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commonMissingSemicolons.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedEnumTypeWidening.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumDeclarations.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumNamespaceReferenceCausesNoImport2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnums.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constantEnumAssert.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constructorWithIncompleteTypeAnnotation.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileEnums.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCommonJsModuleReferencedType.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDefaultExportWithStaticAssignment.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringParameterProperties.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpandoPropertyPrivateName.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForGlobalishSpecifierSymlink.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForGlobalishSpecifierSymlink2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitFunctionDuplicateNamespace.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitFunctionKeywordProp.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectAssignedDefaultExport.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitWithInvalidPackageJsonTypings.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFiles.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationInAmbientContext.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationWithNoInitializer.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterDeclaration6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/disallowLineTerminatorBeforeArrow.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicateObjectLiteralProperty.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumAssignmentCompat5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumClassification.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithString.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithStringEmitDeclaration.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiterals.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMembers.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrorOnConstantBindingWithInitializer.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumExportMergingES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumLiteralAssignableToEnumInsideUnion.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMerging.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMergingErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumNumbering1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumPropertyAccessBeforeInitalisation.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithComputedMember.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithExport.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithParenthesizedInitializer1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithoutInitializerAfterComputedMember.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/equalityWithEnumTypes.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exactSpellingSuggestion.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesJSDocInTs.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesNoValue.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignDottedName.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignNonIdentifier.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignmentWithoutIdentifier1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportDefaultNamespace.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/forwardRefInEnum.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/functionImplementations.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/initializersInAmbientEnums.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsContainerMergeTsDeclaration.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxComponentTypeErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespace.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/lateBoundFunctionMemberAssignmentDeclarations.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedDeclarations2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedEnumDeclarationCodeGen.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/methodContainingLocalFunction.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mixedTypeEnumComparison.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationDisallowedExtensions.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationNoNewNames.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/negateOperatorInvalidOperations.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/newTargetNarrowing.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noImplicitAnyDestructuringVarDeclaration.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModuleReexportFromDottedPath.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsBlocksSpecifierResolution(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsBlocksSpecifierResolution(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSourceTs(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSourceTs(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationConditions(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationConditions(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationDirectory(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationDirectory(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationPattern(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationPattern(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nullPropertyName.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/numericEnumMappedType.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/objectLiteralGettersAndSetters.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/overloadingStaticFunctionsInFunctions.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.classMethods.es2018.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnumDeclaration6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserNoASIOnCallAfterFunctionExpression1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource10.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource14.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserSkippedTokens16.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserStrictMode8.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/preserveConstEnums.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/propertyAssignmentUseParentType3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reexportClassDefinition.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reservedWords3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/staticsInAFunction.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/strictModeOctalLiterals.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit12.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralTypes4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterType.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterTypeES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringWithEmbeddedYieldKeyword.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContexts.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContextsExternalModule.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInPropertyBoundDeclarations.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/this_inside-enum-should-not-be-allowed.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/twoAccessorsWithSameName.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment31.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment32.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment33.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment36.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment38.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/underscoreEscapedNameInEnum.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/wellKnownSymbolExpando.d.ts diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments3_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments3_es6.d.ts.diff new file mode 100644 index 0000000000000..22b34c1fb0b63 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments3_es6.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments3_es6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,15 +1,16 @@ + + + //// [/.src/FunctionPropertyAssignments3_es6.d.ts] +-declare var v: { +- ""(): Generator; +-}; ++declare var v: invalid; + /// [Errors] //// + ++FunctionPropertyAssignments3_es6.ts(1,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + FunctionPropertyAssignments3_es6.ts(1,12): error TS1003: Identifier expected. + + +-==== FunctionPropertyAssignments3_es6.ts (1 errors) ==== ++==== FunctionPropertyAssignments3_es6.ts (2 errors) ==== + var v = { *{ } } ++ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1003: Identifier expected. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments5_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments5_es6.d.ts.diff new file mode 100644 index 0000000000000..4d19e70b50422 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments5_es6.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,15 +1,16 @@ + + + //// [/.src/FunctionPropertyAssignments5_es6.d.ts] +-declare var v: { +- [x: number]: () => Generator; +-}; ++declare var v: invalid; + /// [Errors] //// + ++FunctionPropertyAssignments5_es6.ts(1,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + FunctionPropertyAssignments5_es6.ts(1,13): error TS2304: Cannot find name 'foo'. + + +-==== FunctionPropertyAssignments5_es6.ts (1 errors) ==== ++==== FunctionPropertyAssignments5_es6.ts (2 errors) ==== + var v = { *[foo()](): Generator { } } ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ + !!! error TS2304: Cannot find name 'foo'. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration5_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration5_es6.d.ts.diff new file mode 100644 index 0000000000000..cf1cae265b2a0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration5_es6.d.ts.diff @@ -0,0 +1,31 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration5_es6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,17 +1,20 @@ + + + //// [/.src/MemberFunctionDeclaration5_es6.d.ts] + declare class C { +- (): any; ++ (): invalid; + } + /// [Errors] //// + ++MemberFunctionDeclaration5_es6.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + MemberFunctionDeclaration5_es6.ts(3,1): error TS1003: Identifier expected. + + +-==== MemberFunctionDeclaration5_es6.ts (1 errors) ==== ++==== MemberFunctionDeclaration5_es6.ts (2 errors) ==== + class C { + * ++ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + ~ + !!! error TS1003: Identifier expected. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration6_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration6_es6.d.ts.diff new file mode 100644 index 0000000000000..d8b39ed8412ff --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration6_es6.d.ts.diff @@ -0,0 +1,34 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration6_es6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,20 +1,23 @@ + + + //// [/.src/MemberFunctionDeclaration6_es6.d.ts] + declare class C { +- foo(): any; ++ foo(): invalid; + } + /// [Errors] //// + + MemberFunctionDeclaration6_es6.ts(2,5): error TS2391: Function implementation is missing or not immediately following the declaration. ++MemberFunctionDeclaration6_es6.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + MemberFunctionDeclaration6_es6.ts(3,1): error TS1005: '(' expected. + + +-==== MemberFunctionDeclaration6_es6.ts (2 errors) ==== ++==== MemberFunctionDeclaration6_es6.ts (3 errors) ==== + class C { + *foo + ~~~ + !!! error TS2391: Function implementation is missing or not immediately following the declaration. ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + ~ + !!! error TS1005: '(' expected. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnum1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnum1.d.ts.diff new file mode 100644 index 0000000000000..2b1cd5067fd81 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnum1.d.ts.diff @@ -0,0 +1,31 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/ambientEnum1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -8,18 +8,21 @@ + x + } + /// [Errors] //// + ++ambientEnum1.ts(7,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ambientEnum1.ts(7,13): error TS1066: In ambient enum declarations member initializer must be constant expression. + + +-==== ambientEnum1.ts (1 errors) ==== ++==== ambientEnum1.ts (2 errors) ==== + declare enum E1 { + y = 4.23 + } + + // Ambient enum with computer member + declare enum E2 { + x = 'foo'.length ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~ + !!! error TS1066: In ambient enum declarations member initializer must be constant expression. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnumDeclaration1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnumDeclaration1.d.ts.diff new file mode 100644 index 0000000000000..f64215d8dbe27 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnumDeclaration1.d.ts.diff @@ -0,0 +1,39 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/ambient/ambientEnumDeclaration1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,4 +7,30 @@ + c = 11, + d = 12, + e = 655360 + } ++/// [Errors] //// ++ ++ambientEnumDeclaration1.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ambientEnumDeclaration1.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ambientEnumDeclaration1.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ambientEnumDeclaration1.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== ambientEnumDeclaration1.ts (4 errors) ==== ++ // In ambient enum declarations, all values specified in enum member declarations must be classified as constant enum expressions. ++ ++ declare enum E { ++ a = 10, ++ b = 10 + 1, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ c = b, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ d = (c) + 1, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ e = 10 << 2 * 8, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientErrors.d.ts.diff new file mode 100644 index 0000000000000..b3bc5e1d4abfa --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientErrors.d.ts.diff @@ -0,0 +1,39 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/ambient/ambientErrors.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -39,8 +39,9 @@ + + ambientErrors.ts(2,17): error TS1039: Initializers are not allowed in ambient contexts. + ambientErrors.ts(17,22): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. + ambientErrors.ts(20,30): error TS1183: An implementation cannot be declared in ambient contexts. ++ambientErrors.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ambientErrors.ts(29,9): error TS1066: In ambient enum declarations member initializer must be constant expression. + ambientErrors.ts(34,13): error TS1039: Initializers are not allowed in ambient contexts. + ambientErrors.ts(35,25): error TS1183: An implementation cannot be declared in ambient contexts. + ambientErrors.ts(37,20): error TS1039: Initializers are not allowed in ambient contexts. +@@ -52,9 +53,9 @@ + ambientErrors.ts(51,16): error TS2436: Ambient module declaration cannot specify relative module name. + ambientErrors.ts(57,5): error TS2309: An export assignment cannot be used in a module with other exported elements. + + +-==== ambientErrors.ts (14 errors) ==== ++==== ambientErrors.ts (15 errors) ==== + // Ambient variable with an initializer + declare var x = 4; + ~ + !!! error TS1039: Initializers are not allowed in ambient contexts. +@@ -88,8 +89,10 @@ + + // Ambient enum with computer member + declare enum E2 { + x = 'foo'.length ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~ + !!! error TS1066: In ambient enum declarations member initializer must be constant expression. + } + 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..557c287645e73 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/arrayFakeFlatNoCrashInferenceDeclarations.d.ts.diff @@ -0,0 +1,36 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/arrayFakeFlatNoCrashInferenceDeclarations.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,15 +7,16 @@ + "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): any; ++declare function foo(arr: T[], depth: number): invalid; + /// [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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== arrayFakeFlatNoCrashInferenceDeclarations.ts (1 errors) ==== ++==== arrayFakeFlatNoCrashInferenceDeclarations.ts (2 errors) ==== + type BadFlatArray = {obj: { + "done": Arr, + "recur": Arr extends ReadonlyArray + ? BadFlatArray +@@ -29,6 +30,8 @@ + + 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return flat(arr, depth); + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/arrowFunctionContexts.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/arrowFunctionContexts.d.ts.diff new file mode 100644 index 0000000000000..6068307d7596e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/arrowFunctionContexts.d.ts.diff @@ -0,0 +1,43 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -38,16 +38,18 @@ + declare var asserted2: any; + /// [Errors] //// + + arrowFunctionContexts.ts(2,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. ++arrowFunctionContexts.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + arrowFunctionContexts.ts(30,9): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. ++arrowFunctionContexts.ts(31,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + arrowFunctionContexts.ts(31,16): error TS2332: 'this' cannot be referenced in current location. + arrowFunctionContexts.ts(43,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + arrowFunctionContexts.ts(71,13): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. + arrowFunctionContexts.ts(72,20): error TS2332: 'this' cannot be referenced in current location. + + +-==== arrowFunctionContexts.ts (6 errors) ==== ++==== arrowFunctionContexts.ts (8 errors) ==== + // Arrow function used in with statement + with (window) { + ~~~~~~~~~~~~~ + !!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +@@ -78,11 +80,15 @@ + + // Arrow function as enum value + enum E { + x = () => 4, // Error expected ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ + !!! error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. + y = (() => this).length // error, can't use this in enum ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ + !!! error TS2332: 'this' cannot be referenced in current location. + } + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier.d.ts.diff new file mode 100644 index 0000000000000..a3489928d8b7f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier.d.ts.diff @@ -0,0 +1,35 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/classMemberWithMissingIdentifier.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,22 +1,25 @@ + + + //// [/.src/classMemberWithMissingIdentifier.d.ts] + declare class C { +- : any; ++ : invalid; + } + /// [Errors] //// + + classMemberWithMissingIdentifier.ts(2,11): error TS1146: Declaration expected. ++classMemberWithMissingIdentifier.ts(2,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + classMemberWithMissingIdentifier.ts(2,12): error TS1005: ';' expected. + classMemberWithMissingIdentifier.ts(3,1): error TS1128: Declaration or statement expected. + + +-==== classMemberWithMissingIdentifier.ts (3 errors) ==== ++==== classMemberWithMissingIdentifier.ts (4 errors) ==== + class C { + public {}; + + !!! error TS1146: Declaration expected. ++ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1005: ';' expected. + } + ~ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier2.d.ts.diff new file mode 100644 index 0000000000000..12309b4c3ae96 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier2.d.ts.diff @@ -0,0 +1,39 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/classMemberWithMissingIdentifier2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,26 +1,29 @@ + + + //// [/.src/classMemberWithMissingIdentifier2.d.ts] + declare class C { +- : any; ++ : invalid; + } + /// [Errors] //// + + classMemberWithMissingIdentifier2.ts(2,11): error TS1146: Declaration expected. ++classMemberWithMissingIdentifier2.ts(2,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + classMemberWithMissingIdentifier2.ts(2,12): error TS1005: ';' expected. + classMemberWithMissingIdentifier2.ts(2,18): error TS1005: ',' expected. + classMemberWithMissingIdentifier2.ts(2,19): error TS2693: 'string' only refers to a type, but is being used as a value here. + classMemberWithMissingIdentifier2.ts(2,26): error TS1005: ';' expected. + classMemberWithMissingIdentifier2.ts(2,27): error TS2304: Cannot find name 'VariableDeclaration'. + classMemberWithMissingIdentifier2.ts(3,1): error TS1128: Declaration or statement expected. + + +-==== classMemberWithMissingIdentifier2.ts (7 errors) ==== ++==== classMemberWithMissingIdentifier2.ts (8 errors) ==== + class C { + public {[name:string]:VariableDeclaration}; + + !!! error TS1146: Declaration expected. ++ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1005: ';' expected. + ~ + !!! error TS1005: ',' expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/collisionCodeGenEnumWithEnumMemberConflict.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/collisionCodeGenEnumWithEnumMemberConflict.d.ts.diff new file mode 100644 index 0000000000000..c47ac8aebf786 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/collisionCodeGenEnumWithEnumMemberConflict.d.ts.diff @@ -0,0 +1,25 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/collisionCodeGenEnumWithEnumMemberConflict.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,4 +4,16 @@ + declare enum Color { + Color = 0, + Thing = 0 + } ++/// [Errors] //// ++ ++collisionCodeGenEnumWithEnumMemberConflict.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== collisionCodeGenEnumWithEnumMemberConflict.ts (1 errors) ==== ++ enum Color { ++ Color, ++ Thing = Color ++ ~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/commonMissingSemicolons.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/commonMissingSemicolons.d.ts.diff new file mode 100644 index 0000000000000..9159691abe80a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/commonMissingSemicolons.d.ts.diff @@ -0,0 +1,50 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/commonMissingSemicolons.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -11,9 +11,9 @@ + declare const myConst1 = 1; + declare const myDeclareConst1: 1; + declare const myDeclareConst2: 1; + declare function myFunction1(): void; +-declare function (): any; ++declare function (): invalid; + interface myInterface1 { + } + interface interface { + } +@@ -78,8 +78,9 @@ + commonMissingSemicolons.ts(25,1): error TS1435: Unknown keyword or identifier. Did you mean 'function'? + commonMissingSemicolons.ts(25,1): error TS2304: Cannot find name 'functiond'. + commonMissingSemicolons.ts(25,11): error TS2304: Cannot find name 'myFunction2'. + commonMissingSemicolons.ts(25,25): error TS1005: ';' expected. ++commonMissingSemicolons.ts(26,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + commonMissingSemicolons.ts(26,10): error TS1359: Identifier expected. 'function' is a reserved word that cannot be used here. + commonMissingSemicolons.ts(26,18): error TS1003: Identifier expected. + commonMissingSemicolons.ts(27,1): error TS2304: Cannot find name 'functionMyFunction'. + commonMissingSemicolons.ts(30,1): error TS1435: Unknown keyword or identifier. Did you mean 'interface'? +@@ -121,9 +122,9 @@ + commonMissingSemicolons.ts(75,11): error TS1005: ';' expected. + commonMissingSemicolons.ts(78,1): error TS1128: Declaration or statement expected. + + +-==== commonMissingSemicolons.ts (79 errors) ==== ++==== commonMissingSemicolons.ts (80 errors) ==== + async function myAsyncFunction1(): Promise {} + ~~~~~~~~~~~~~ + !!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + asynd function myAsyncFunction2(): void {} +@@ -227,8 +228,10 @@ + !!! error TS2304: Cannot find name 'myFunction2'. + ~ + !!! error TS1005: ';' expected. + function function(): void { } ++ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~ + !!! error TS1359: Identifier expected. 'function' is a reserved word that cannot be used here. + ~ + !!! error TS1003: Identifier expected. 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..bd27fc9b5c589 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedEnumTypeWidening.d.ts.diff @@ -0,0 +1,107 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/computedEnumTypeWidening.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -39,4 +39,98 @@ + B, + C + } + declare let val2: MyDeclaredEnum; ++/// [Errors] //// ++ ++computedEnumTypeWidening.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++computedEnumTypeWidening.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++computedEnumTypeWidening.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++computedEnumTypeWidening.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== computedEnumTypeWidening.ts (4 errors) ==== ++ declare function computed(x: number): number; ++ ++ enum E { ++ A = computed(0), ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ B = computed(1), ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ C = computed(2), ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ D = computed(3), ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ 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/computedPropertyNames10_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES5.d.ts.diff new file mode 100644 index 0000000000000..f8c1eaea7c31d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES5.d.ts.diff @@ -0,0 +1,57 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,11 +3,41 @@ + //// [/.src/computedPropertyNames10_ES5.d.ts] + declare var s: string; + declare var n: number; + declare var a: any; +-declare var v: { +- [x: string]: () => void; +- [x: number]: () => void; +- ""(): void; +- 0(): void; +- "hello bye"(): void; +-}; ++declare var v: invalid; ++/// [Errors] //// ++ ++computedPropertyNames10_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++computedPropertyNames10_ES5.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++computedPropertyNames10_ES5.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++computedPropertyNames10_ES5.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++computedPropertyNames10_ES5.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== computedPropertyNames10_ES5.ts (5 errors) ==== ++ var s: string; ++ var n: number; ++ var a: any; ++ var v = { ++ [s](): void { }, ++ [n](): void { }, ++ [s + s](): void { }, ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ [s + n](): void { }, ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ [+s](): void { }, ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ [""](): void { }, ++ [0](): void { }, ++ [a](): void { }, ++ [true](): void { }, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ [`hello bye`](): void { }, ++ [`hello ${a} bye`](): void { } ++ ~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES6.d.ts.diff new file mode 100644 index 0000000000000..751a20d623784 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES6.d.ts.diff @@ -0,0 +1,57 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,11 +3,41 @@ + //// [/.src/computedPropertyNames10_ES6.d.ts] + declare var s: string; + declare var n: number; + declare var a: any; +-declare var v: { +- [x: string]: () => void; +- [x: number]: () => void; +- ""(): void; +- 0(): void; +- "hello bye"(): void; +-}; ++declare var v: invalid; ++/// [Errors] //// ++ ++computedPropertyNames10_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++computedPropertyNames10_ES6.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++computedPropertyNames10_ES6.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++computedPropertyNames10_ES6.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++computedPropertyNames10_ES6.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== computedPropertyNames10_ES6.ts (5 errors) ==== ++ var s: string; ++ var n: number; ++ var a: any; ++ var v = { ++ [s](): void { }, ++ [n](): void { }, ++ [s + s](): void { }, ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ [s + n](): void { }, ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ [+s](): void { }, ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ [""](): void { }, ++ [0](): void { }, ++ [a](): void { }, ++ [true](): void { }, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ [`hello bye`](): void { }, ++ [`hello ${a} bye`](): void { } ++ ~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum1.d.ts.diff new file mode 100644 index 0000000000000..1829be5b55fbb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum1.d.ts.diff @@ -0,0 +1,50 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/constEnums/constEnum1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -10,4 +10,41 @@ + f = 20, + g = 20, + h = 10 + } ++/// [Errors] //// ++ ++constEnum1.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnum1.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnum1.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnum1.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnum1.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnum1.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== constEnum1.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. ++ ++ const enum E { ++ a = 10, ++ b = a, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ c = (a+1), ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ e, ++ d = ~e, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ f = a << 2 >> 1, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ g = a << 2 >>> 1, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ h = a | b ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } +\ No newline at end of file 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..2630bbb297165 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum2.d.ts.diff @@ -0,0 +1,47 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/constEnums/constEnum2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -9,14 +9,17 @@ + g + } + /// [Errors] //// + ++constEnum2.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnum2.ts(10,9): error TS2474: const enum member initializers must be constant expressions. ++constEnum2.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnum2.ts(11,9): error TS2474: const enum member initializers must be constant expressions. ++constEnum2.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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. + +@@ -25,13 +28,19 @@ + const CONST: number = 9000 % 2; + const enum D { + d = 10, + e = 199 * Math.floor(Math.random() * 1000), ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS2474: const enum member initializers must be constant expressions. + f = d - (100 * Math.floor(Math.random() % 8)), ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS2474: const enum member initializers must be constant expressions. + g = CONST, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! 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/constEnumDeclarations.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumDeclarations.d.ts.diff new file mode 100644 index 0000000000000..86cc364b9dcd1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumDeclarations.d.ts.diff @@ -0,0 +1,32 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/constEnumDeclarations.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -10,4 +10,23 @@ + A = 1, + B = 2, + C = 3 + } ++/// [Errors] //// ++ ++constEnumDeclarations.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== constEnumDeclarations.ts (1 errors) ==== ++ const enum E { ++ A = 1, ++ B = 2, ++ C = A | B ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ const enum E2 { ++ A = 1, ++ B, ++ C ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumErrors.d.ts.diff new file mode 100644 index 0000000000000..42d73b3a1f5d0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumErrors.d.ts.diff @@ -0,0 +1,112 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/constEnumErrors.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,9 +6,9 @@ + } + declare namespace E { + } + declare const enum E1 { +- X = 0, ++ X, + Y, + Y1 + } + declare const enum E2 { +@@ -34,25 +34,35 @@ + /// [Errors] //// + + constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. + constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. ++constEnumErrors.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. ++constEnumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. + constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. ++constEnumErrors.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnumErrors.ts(15,10): error TS2474: const enum member initializers must be constant expressions. + constEnumErrors.ts(15,13): error TS2339: Property 'Z' does not exist on type 'typeof E1'. + constEnumErrors.ts(22,18): error TS2476: A const enum member can only be accessed using a string literal. + constEnumErrors.ts(24,18): error TS2476: A const enum member can only be accessed using a string literal. + constEnumErrors.ts(25,18): error TS2476: A const enum member can only be accessed using a string literal. + constEnumErrors.ts(27,20): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. + constEnumErrors.ts(28,25): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. + constEnumErrors.ts(33,5): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. ++constEnumErrors.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnumErrors.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnumErrors.ts(39,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnumErrors.ts(41,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnumErrors.ts(41,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. ++constEnumErrors.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnumErrors.ts(42,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. ++constEnumErrors.ts(43,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. + + +-==== constEnumErrors.ts (16 errors) ==== ++==== constEnumErrors.ts (26 errors) ==== + const enum E { + ~ + !!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. + A +@@ -67,17 +77,23 @@ + const enum E1 { + // illegal case + // forward reference to the element of the same enum + X = Y, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + // forward reference to the element of the same enum + Y = E1.Z, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ + !!! error TS2474: const enum member initializers must be constant expressions. + ~ + !!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. + Y1 = E1["Z"] ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ + !!! error TS2474: const enum member initializers must be constant expressions. + ~~~ + !!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. +@@ -114,17 +130,31 @@ + + const enum NaNOrInfinity { + A = 9007199254740992, + B = A * A, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + C = B * B, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + D = C * C, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + E = D * D, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + F = E * E, // overflow ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + G = 1 / 0, // overflow ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + H = 0 / 0 // NaN ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumNamespaceReferenceCausesNoImport2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumNamespaceReferenceCausesNoImport2.d.ts.diff new file mode 100644 index 0000000000000..a681bcc7dce76 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumNamespaceReferenceCausesNoImport2.d.ts.diff @@ -0,0 +1,45 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/constEnumNamespaceReferenceCausesNoImport2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -12,7 +12,34 @@ + //// [/.src/index.d.ts] + export {}; + + //// [/.src/reexport.d.ts] +-import * as Foo from "./foo"; +-declare const _default: typeof Foo.ConstEnumOnlyModule; ++declare const _default: invalid; + export = _default; ++/// [Errors] //// ++ ++reexport.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== index.ts (0 errors) ==== ++ import Foo = require("./reexport"); ++ function check(x: Foo.ConstFooEnum): void { ++ switch (x) { ++ case Foo.ConstFooEnum.Some: ++ break; ++ } ++ } ++==== foo.ts (0 errors) ==== ++ export module ConstEnumOnlyModule { ++ export const enum ConstFooEnum { ++ Some, ++ Values, ++ Here ++ } ++ } ++ ++==== reexport.ts (1 errors) ==== ++ import * as Foo from "./foo"; ++ export = Foo.ConstEnumOnlyModule; ++ ~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess1.d.ts.diff new file mode 100644 index 0000000000000..8ca203ca99422 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess1.d.ts.diff @@ -0,0 +1,36 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/constEnums/constEnumPropertyAccess1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -19,21 +19,27 @@ + set [G.B](x: number); + } + /// [Errors] //// + ++constEnumPropertyAccess1.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnumPropertyAccess1.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnumPropertyAccess1.ts(25,9): error TS2322: Type 'boolean' is not assignable to type 'number'. + + +-==== constEnumPropertyAccess1.ts (1 errors) ==== ++==== constEnumPropertyAccess1.ts (3 errors) ==== + // constant enum declarations are completely erased in the emitted JavaScript code. + // it is an error to reference a constant enum object in any other context + // than a property access that selects one of the enum's members + + const enum G { + A = 1, + B = 2, + C = A + B, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + D = A * 2 ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + var o: { + [idx: number]: boolean diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess2.d.ts.diff new file mode 100644 index 0000000000000..72a20735bd65a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess2.d.ts.diff @@ -0,0 +1,39 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -12,24 +12,30 @@ + declare var g: G; + declare function foo(x: G): void; + /// [Errors] //// + ++constEnumPropertyAccess2.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnumPropertyAccess2.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnumPropertyAccess2.ts(13,19): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. + constEnumPropertyAccess2.ts(14,17): error TS2476: A const enum member can only be accessed using a string literal. + constEnumPropertyAccess2.ts(16,1): error TS2322: Type '"string"' is not assignable to type 'G'. + constEnumPropertyAccess2.ts(18,3): error TS2540: Cannot assign to 'B' because it is a read-only property. + + +-==== constEnumPropertyAccess2.ts (4 errors) ==== ++==== constEnumPropertyAccess2.ts (6 errors) ==== + // constant enum declarations are completely erased in the emitted JavaScript code. + // it is an error to reference a constant enum object in any other context + // than a property access that selects one of the enum's members + + const enum G { + A = 1, + B = 2, + C = A + B, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + D = A * 2 ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Error from referring constant enum in any other context than a property access + var z: typeof G = G; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess3.d.ts.diff new file mode 100644 index 0000000000000..0fad77c3f59a7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess3.d.ts.diff @@ -0,0 +1,49 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/constEnums/constEnumPropertyAccess3.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,4 +7,40 @@ + C = -3, + D = -3, + E = -9 + } ++/// [Errors] //// ++ ++constEnumPropertyAccess3.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnumPropertyAccess3.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnumPropertyAccess3.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnumPropertyAccess3.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== constEnumPropertyAccess3.ts (4 errors) ==== ++ const enum E { ++ A = ~1, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ B = -1, ++ C = ~(1 + 1), ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ D = -(1 + 2), ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ E = 1 - 10, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ E.A.toString(); ++ E.B.toString(); ++ E.C.toString(); ++ E.D.toString(); ++ ++ E["A"].toString(); ++ E["B"].toString(); ++ E["C"].toString(); ++ E["D"].toString(); ++ E["E"].toString(); ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnums.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnums.d.ts.diff new file mode 100644 index 0000000000000..85b677e0626e7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnums.d.ts.diff @@ -0,0 +1,321 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/constEnums.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -28,11 +28,11 @@ + T = 11, + U = 11, + V = 11, + W = 11, +- W1 = 100, +- W2 = 100, +- W3 = 100, ++ W1, ++ W2, ++ W3, + W4 = 11, + W5 = 11 + } + declare const enum Comments { +@@ -48,19 +48,19 @@ + namespace B { + namespace C { + const enum E { + V1 = 1, +- V2 = 101 ++ V2 + } + } + } + } + declare namespace A { + namespace B { + namespace C { + const enum E { +- V3 = 64, +- V4 = 2 ++ V3, ++ V4 + } + } + } + } +@@ -94,4 +94,274 @@ + declare function foo2(e: I2.C.E): void; + declare function foo(x: Enum1): void; + declare function bar(e: A.B.C.E): number; + declare function baz(c: Comments): void; ++/// [Errors] //// ++ ++constEnums.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(16,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(17,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(18,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(19,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(23,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(24,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(55,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(65,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnums.ts(66,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== constEnums.ts (29 errors) ==== ++ const enum Enum1 { ++ A0 = 100, ++ } ++ ++ const enum Enum1 { ++ // correct cases ++ A, ++ B, ++ C = 10, ++ D = A | B, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ E = A | 1, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ F = 1 | A, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ G = (1 & 1), ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ H = ~(A | B), ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ I = A >>> 1, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ J = 1 & A, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ K = ~(1 | 5), ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ L = ~D, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ M = E << B, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ N = E << 1, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ O = E >> B, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ P = E >> 1, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ PQ = E ** 2, ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ Q = -D, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ R = C & 5, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ S = 5 & C, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ T = C | D, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ U = C | 1, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ V = 10 | D, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ W = Enum1.V, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ // correct cases: reference to the enum member from different enum declaration ++ W1 = A0, ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ W2 = Enum1.A0, ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ W3 = Enum1["A0"], ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ W4 = Enum1["W"], ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ W5 = Enum1[`V`], ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ const enum Comments { ++ "//", ++ "/*", ++ "*/", ++ "///", ++ "#", ++ "", ++ } ++ ++ module A { ++ export module B { ++ export module C { ++ export const enum E { ++ V1 = 1, ++ V2 = A.B.C.E.V1 | 100 ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ } ++ } ++ } ++ ++ module A { ++ export module B { ++ export module C { ++ export const enum E { ++ V3 = A.B.C.E["V2"] & 200, ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ V4 = A.B.C.E[`V1`] << 1, ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ } ++ } ++ } ++ ++ module A1 { ++ export module B { ++ export module C { ++ export const enum E { ++ V1 = 10, ++ V2 = 110, ++ } ++ } ++ } ++ } ++ ++ module A2 { ++ export module B { ++ export module C { ++ export const enum E { ++ V1 = 10, ++ V2 = 110, ++ } ++ } ++ // module C will be classified as value ++ export module C { ++ var x = 1 ++ } ++ } ++ } ++ ++ import I = A.B.C.E; ++ import I1 = A1.B; ++ import I2 = A2.B; ++ ++ function foo0(e: I): void { ++ if (e === I.V1) { ++ } ++ else if (e === I.V2) { ++ } ++ } ++ ++ function foo1(e: I1.C.E): void { ++ if (e === I1.C.E.V1) { ++ } ++ else if (e === I1.C.E.V2) { ++ } ++ } ++ ++ function foo2(e: I2.C.E): void { ++ if (e === I2.C.E.V1) { ++ } ++ else if (e === I2.C.E.V2) { ++ } ++ } ++ ++ ++ function foo(x: Enum1): void { ++ switch (x) { ++ case Enum1.A: ++ case Enum1.B: ++ case Enum1.C: ++ case Enum1.D: ++ case Enum1.E: ++ case Enum1.F: ++ case Enum1.G: ++ case Enum1.H: ++ case Enum1.I: ++ case Enum1.J: ++ case Enum1.K: ++ case Enum1.L: ++ case Enum1.M: ++ case Enum1.N: ++ case Enum1.O: ++ case Enum1.P: ++ case Enum1.PQ: ++ case Enum1.Q: ++ case Enum1.R: ++ case Enum1.S: ++ case Enum1["T"]: ++ case Enum1[`U`]: ++ case Enum1.V: ++ case Enum1.W: ++ case Enum1.W1: ++ case Enum1.W2: ++ case Enum1.W3: ++ case Enum1.W4: ++ break; ++ } ++ } ++ ++ function bar(e: A.B.C.E): number { ++ switch (e) { ++ case A.B.C.E.V1: return 1; ++ case A.B.C.E.V2: return 1; ++ case A.B.C.E.V3: return 1; ++ } ++ } ++ ++ function baz(c: Comments): void { ++ switch (c) { ++ case Comments["//"]: ++ case Comments["/*"]: ++ case Comments["*/"]: ++ case Comments["///"]: ++ case Comments["#"]: ++ case Comments[""]: ++ break; ++ } ++ } ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constantEnumAssert.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constantEnumAssert.d.ts.diff new file mode 100644 index 0000000000000..f4e428ad92f7e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constantEnumAssert.d.ts.diff @@ -0,0 +1,37 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/constantEnumAssert.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -59,12 +59,14 @@ + a: string; + }; + /// [Errors] //// + ++constantEnumAssert.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constantEnumAssert.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constantEnumAssert.ts(73,10): error TS1355: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. + + +-==== constantEnumAssert.ts (1 errors) ==== ++==== constantEnumAssert.ts (3 errors) ==== + enum E1 { + a, + b + } +@@ -76,9 +78,13 @@ + + enum E3 { + a = 1, + b = a << 1, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = a << 2, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + const enum E4 { + a, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constructorWithIncompleteTypeAnnotation.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constructorWithIncompleteTypeAnnotation.d.ts.diff new file mode 100644 index 0000000000000..3bbf0fa39bd83 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constructorWithIncompleteTypeAnnotation.d.ts.diff @@ -0,0 +1,50 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -14,9 +14,9 @@ + declare namespace TypeScriptAllInOne { + class Program { + static Main(...args: string[]): void; + case: any; +- if(retValue: any): any; ++ if(retValue: any): invalid; + } + } + declare class BasicFeatures { + VARIABLES(): number; +@@ -65,8 +65,9 @@ + constructorWithIncompleteTypeAnnotation.ts(24,28): error TS1005: ':' expected. + constructorWithIncompleteTypeAnnotation.ts(24,29): error TS1005: ',' expected. + constructorWithIncompleteTypeAnnotation.ts(27,18): error TS1128: Declaration or statement expected. + constructorWithIncompleteTypeAnnotation.ts(27,31): error TS2304: Cannot find name 'bfs'. ++constructorWithIncompleteTypeAnnotation.ts(28,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constructorWithIncompleteTypeAnnotation.ts(28,35): error TS1005: ',' expected. + constructorWithIncompleteTypeAnnotation.ts(28,39): error TS1005: ';' expected. + constructorWithIncompleteTypeAnnotation.ts(31,18): error TS1109: Expression expected. + constructorWithIncompleteTypeAnnotation.ts(34,17): error TS2304: Cannot find name 'retValue'. +@@ -150,9 +151,9 @@ + constructorWithIncompleteTypeAnnotation.ts(259,55): error TS1005: ';' expected. + constructorWithIncompleteTypeAnnotation.ts(261,1): error TS1128: Declaration or statement expected. + + +-==== constructorWithIncompleteTypeAnnotation.ts (93 errors) ==== ++==== constructorWithIncompleteTypeAnnotation.ts (94 errors) ==== + declare module "fs" { + export class File { + constructor(filename: string); + public ReadAllText(): string; +@@ -203,8 +204,10 @@ + !!! error TS1128: Declaration or statement expected. + ~~~ + !!! error TS2304: Cannot find name 'bfs'. + if (retValue: any != 0) { ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ + !!! error TS1005: ',' expected. + ~ + !!! error TS1005: ';' expected. 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..97de0e36e1a1d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileEnums.d.ts.diff @@ -0,0 +1,62 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/declFileEnums.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -28,4 +28,53 @@ + "Saturday" = 1, + "Sunday" = 2, + "Weekend days" = 3 + } ++/// [Errors] //// ++ ++declFileEnums.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declFileEnums.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declFileEnums.ts(16,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== declFileEnums.ts (3 errors) ==== ++ enum e1 { ++ a, ++ b, ++ c ++ } ++ ++ enum e2 { ++ a = 10, ++ b = a + 2, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ c = 10, ++ } ++ ++ enum e3 { ++ a = 10, ++ b = Math.PI, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ c = a + 3 ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ 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/declarationEmitCommonJsModuleReferencedType.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitCommonJsModuleReferencedType.d.ts.diff new file mode 100644 index 0000000000000..228573c6aa951 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitCommonJsModuleReferencedType.d.ts.diff @@ -0,0 +1,40 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,13 +1,14 @@ + + + //// [/.src/r/entry.d.ts] + import { RootProps } from "root"; +-export declare const x: any; ++export declare const x: invalid; + export declare const y: RootProps; + /// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + + ==== r/node_modules/foo/node_modules/nested/index.d.ts (0 errors) ==== + export interface NestedProps {} +@@ -25,12 +26,14 @@ + ==== 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export const y: RootProps = bar(); + +\ 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..5225d09d88cfd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDefaultExportWithStaticAssignment.d.ts.diff @@ -0,0 +1,93 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/declarationEmitDefaultExportWithStaticAssignment.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,34 +4,65 @@ + export declare class Foo { + } + + //// [/.src/index1.d.ts] +-declare function Example(): void; +-declare namespace Example { +- var Foo: typeof import("./foo").Foo; +-} +-export default Example; ++export default function Example(): void; + + //// [/.src/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; + + //// [/.src/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; + + //// [/.src/index4.d.ts] + export declare function C(): any; +-export declare namespace C { +- var A: () => void; +- var B: () => void; +-} ++/// [Errors] //// ++ ++index1.ts(2,25): error TS9009: 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(3,25): error TS9009: 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(2,25): error TS9009: 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(5,17): error TS9009: 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 {} ++ ~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ Example.Foo = Foo ++ ++==== index2.ts (1 errors) ==== ++ import {Foo} from './foo'; ++ export {Foo}; ++ export default function Example(): void {} ++ ~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ Example.Foo = Foo ++ ++==== index3.ts (1 errors) ==== ++ export class Bar {} ++ export default function Example(): void {} ++ ~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ Example.Bar = Bar ++ ++==== index4.ts (1 errors) ==== ++ function A() { } ++ ++ function B() { } ++ ++ export function C(): any { ++ ~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ return null; ++ } ++ ++ C.A = A; ++ C.B = B; +\ 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..521cd9b7a5c68 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringParameterProperties.d.ts.diff @@ -0,0 +1,103 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/declarationEmitDestructuringParameterProperties.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,57 +1,84 @@ + + + //// [/.src/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); + } + /// [Errors] //// + + declarationEmitDestructuringParameterProperties.ts(2,17): error TS1187: A parameter property may not be declared using a binding pattern. ++declarationEmitDestructuringParameterProperties.ts(2,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitDestructuringParameterProperties.ts(2,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitDestructuringParameterProperties.ts(2,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + declarationEmitDestructuringParameterProperties.ts(8,17): error TS1187: A parameter property may not be declared using a binding pattern. ++declarationEmitDestructuringParameterProperties.ts(8,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitDestructuringParameterProperties.ts(8,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitDestructuringParameterProperties.ts(8,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + declarationEmitDestructuringParameterProperties.ts(14,17): error TS1187: A parameter property may not be declared using a binding pattern. ++declarationEmitDestructuringParameterProperties.ts(14,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitDestructuringParameterProperties.ts(14,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitDestructuringParameterProperties.ts(14,32): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== declarationEmitDestructuringParameterProperties.ts (3 errors) ==== ++==== declarationEmitDestructuringParameterProperties.ts (12 errors) ==== + class C1 { + constructor(public [x, y, z]: string[]) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS1187: A parameter property may not be declared using a binding pattern. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + + 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. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + + 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. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } +\ No newline at end of file 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..63e5e30ece543 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExpandoPropertyPrivateName.d.ts.diff @@ -0,0 +1,36 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/declarationEmitExpandoPropertyPrivateName.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,23 +7,23 @@ + export {}; + + //// [/.src/b.d.ts] + export declare function q(): void; +-export declare namespace q { +- var val: I; +-} + /// [Errors] //// + ++b.ts(3,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + 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) ==== ++==== b.ts (2 errors) ==== + import {f} from "./a"; + + export function q(): void {} ++ ~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + 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/diff/declarationEmitForGlobalishSpecifierSymlink.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink.d.ts.diff new file mode 100644 index 0000000000000..6bebef79b7ae1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink.d.ts.diff @@ -0,0 +1,54 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,44 @@ + + + //// [/p1/index.d.ts] +-export declare const a: import("typescript-fsa").A; ++export declare const a: invalid; ++/// [Errors] //// ++ ++/p1/index.ts(4,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++==== /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..0480c0e3a9e74 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink2.d.ts.diff @@ -0,0 +1,42 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,32 @@ + + + //// [/p1/index.d.ts] +-export declare const a: import("typescript-fsa").A; ++export declare const a: invalid; ++/// [Errors] //// ++ ++/p1/index.ts(4,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++==== /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/declarationEmitFunctionDuplicateNamespace.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitFunctionDuplicateNamespace.d.ts.diff new file mode 100644 index 0000000000000..61fca475447ea --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitFunctionDuplicateNamespace.d.ts.diff @@ -0,0 +1,32 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/declarationEmitFunctionDuplicateNamespace.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,7 +2,20 @@ + + //// [/.src/declarationEmitFunctionDuplicateNamespace.d.ts] + declare function f(a: 0): 0; + declare function f(a: 1): 1; +-declare namespace f { +- var x: number; +-} ++/// [Errors] //// ++ ++declarationEmitFunctionDuplicateNamespace.ts(2,10): error TS9009: 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; ++ ~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ function f(a: 0 | 1) { ++ return a; ++ } ++ ++ f.x = 2; ++ +\ 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..ee7645643b145 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitFunctionKeywordProp.d.ts.diff @@ -0,0 +1,52 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/declarationEmitFunctionKeywordProp.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,19 +1,30 @@ + + + //// [/.src/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 }; +-} ++/// [Errors] //// ++ ++declarationEmitFunctionKeywordProp.ts(1,10): error TS9009: 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(4,10): error TS9009: 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(8,10): error TS9009: 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 (3 errors) ==== ++ function foo(): void {} ++ ~~~ ++!!! error TS9009: 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 = true; ++ ++ function bar(): void {} ++ ~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ bar.async = true; ++ bar.normal = false; ++ ++ function baz(): void {} ++ ~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ baz.class = true; ++ baz.normal = false; +\ No newline at end of file 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..0b69ed4398153 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitLateBoundAssignments.d.ts.diff @@ -0,0 +1,40 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/declarationEmitLateBoundAssignments.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,27 @@ + + + //// [/.src/declarationEmitLateBoundAssignments.d.ts] + export declare function foo(): void; +-export declare namespace foo { +- var bar: number; +- var strMemName: string; +-} ++/// [Errors] //// ++ ++declarationEmitLateBoundAssignments.ts(1,17): error TS9009: 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 (1 errors) ==== ++ export function foo(): void {} ++ ~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ 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]; +\ 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..b915afd5972fe --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitLateBoundAssignments2.d.ts.diff @@ -0,0 +1,229 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/declarationEmitLateBoundAssignments2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,67 +1,186 @@ + + + //// [/.src/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 arrow2: invalid; + export declare const arrow3: { + (): void; + 77: number; + }; +-export declare const arrow4: { +- (): void; +- 1: number; +-}; ++export declare const arrow4: invalid; + export declare const arrow5: { + (): void; + "101": number; + }; +-export declare const arrow6: { +- (): void; +- "10": number; +-}; ++export declare const arrow6: invalid; + export declare const arrow7: { + (): void; + "qwe rty": number; + }; +-export declare const arrow8: { +- (): void; +- "foo bar": number; +-}; ++export declare const arrow8: invalid; + export declare const arrow9: { + (): void; + "🤪": number; + }; +-export declare const arrow10: { +- (): void; +- "\uD83E\uDD37\u200D\u2642\uFE0F": number; +-}; ++export declare const arrow10: invalid; ++/// [Errors] //// ++ ++declarationEmitLateBoundAssignments2.ts(9,17): error TS9009: 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(12,17): error TS9009: 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(15,17): error TS9009: 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(18,17): error TS9009: 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(21,17): error TS9009: 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(24,17): error TS9009: 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(27,17): error TS9009: 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(30,17): error TS9009: 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(33,17): error TS9009: 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(36,17): error TS9009: 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(45,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitLateBoundAssignments2.ts(45,14): error TS9009: 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(54,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitLateBoundAssignments2.ts(54,14): error TS9009: 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(63,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitLateBoundAssignments2.ts(63,14): error TS9009: 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(72,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitLateBoundAssignments2.ts(72,14): error TS9009: 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(81,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationEmitLateBoundAssignments2.ts(81,14): error TS9009: 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 (20 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 {} ++ ~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ decl["B"] = 'foo' ++ ++ export function decl2(): void {} ++ ~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ decl2[c] = 0 ++ ++ export function decl3(): void {} ++ ~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ decl3[77] = 0 ++ ++ export function decl4(): void {} ++ ~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ decl4[num] = 0 ++ ++ export function decl5(): void {} ++ ~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ decl5["101"] = 0 ++ ++ export function decl6(): void {} ++ ~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ decl6[numStr] = 0 ++ ++ export function decl7(): void {} ++ ~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ decl7["qwe rty"] = 0 ++ ++ export function decl8(): void {} ++ ~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ decl8[withWhitespace] = 0 ++ ++ export function decl9(): void {} ++ ~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ decl9["🤪"] = 0 ++ ++ export function decl10(): void {} ++ ~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ decl10[emoji] = 0 ++ ++ export const arrow: { ++ (): void ++ B: string ++ } = () => {} ++ arrow["B"] = 'bar' ++ ++ export const arrow2 = (): void => {} ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ arrow2[c] = 100 ++ ++ export const arrow3: { ++ (): void ++ 77: number ++ } = () => {} ++ arrow3[77] = 0 ++ ++ export const arrow4 = (): void => {} ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ arrow4[num] = 0 ++ ++ export const arrow5: { ++ (): void ++ "101": number ++ } = () => {} ++ arrow5["101"] = 0 ++ ++ export const arrow6 = (): void => {} ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ arrow6[numStr] = 0 ++ ++ export const arrow7: { ++ (): void ++ "qwe rty": number ++ } = () => {} ++ arrow7["qwe rty"] = 0 ++ ++ export const arrow8 = (): void => {} ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ arrow8[withWhitespace] = 0 ++ ++ export const arrow9: { ++ (): void ++ "🤪": number ++ } = () => {} ++ arrow9["🤪"] = 0 ++ ++ export const arrow10 = (): void => {} ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ arrow10[emoji] = 0 ++ +\ 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..8fdaeb34b5a0e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectAssignedDefaultExport.d.ts.diff @@ -0,0 +1,52 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,13 +2,14 @@ + + //// [/.src/index.d.ts] + import { DefaultTheme, StyledComponent } from "styled-components"; + export declare const C: StyledComponent<"div", DefaultTheme, {}, never>; +-declare const _default; ++declare const _default: invalid; + export default _default; + /// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + + ==== node_modules/styled-components/node_modules/hoist-non-react-statics/index.d.ts (0 errors) ==== + interface Statics { +@@ -36,21 +37,26 @@ + } + + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +\ No newline at end of file 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..badd4f090a1ac --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference.d.ts.diff @@ -0,0 +1,65 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,6 +3,54 @@ + //// [/.src/monorepo/pkg3/dist/index.d.ts] + export * from './keys'; + + //// [/.src/monorepo/pkg3/dist/keys.d.ts] +-import { MetadataAccessor } from "@raymondfeng/pkg2"; +-export declare const ADMIN: MetadataAccessor; ++export declare const ADMIN: invalid; ++/// [Errors] //// ++ ++monorepo/pkg3/src/keys.ts(3,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++==== 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..e66893a56042d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference2.d.ts.diff @@ -0,0 +1,68 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,6 +3,57 @@ + //// [/.src/monorepo/pkg3/dist/index.d.ts] + export * from './keys'; + + //// [/.src/monorepo/pkg3/dist/keys.d.ts] +-import { MetadataAccessor } from "@raymondfeng/pkg2"; +-export declare const ADMIN: MetadataAccessor; ++export declare const ADMIN: invalid; ++/// [Errors] //// ++ ++monorepo/pkg3/src/keys.ts(3,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++==== 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..faf88fe6b4260 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReexportedSymlinkReference3.d.ts.diff @@ -0,0 +1,36 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,23 +3,25 @@ + //// [/.src/monorepo/pkg3/dist/index.d.ts] + export * from './keys'; + + //// [/.src/monorepo/pkg3/dist/keys.d.ts] +-import { MetadataAccessor } from "@raymondfeng/pkg2"; +-export declare const ADMIN: any; ++export declare const ADMIN: invalid; + /// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + + ==== 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ==== 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/declarationEmitWithInvalidPackageJsonTypings.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitWithInvalidPackageJsonTypings.d.ts.diff new file mode 100644 index 0000000000000..7fa616a4516a8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitWithInvalidPackageJsonTypings.d.ts.diff @@ -0,0 +1,46 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,5 +4,36 @@ + export interface MutableRefObject { + current: T; + } + export declare function useRef(current: T): MutableRefObject; +-export declare const useCsvParser: () => MutableRefObject; ++export declare const useCsvParser: invalid; ++/// [Errors] //// ++ ++/p1/index.ts(7,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== /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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ const parserRef = useRef(null); ++ return parserRef; ++ }; ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff new file mode 100644 index 0000000000000..821c140a712b1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff @@ -0,0 +1,64 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/types/thisType/declarationFiles.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -28,28 +28,30 @@ + declare const x3_a: typeof globalThis; + declare const x1_a: typeof globalThis; + declare class C4 { + x1: { +- a: typeof globalThis; ++ a: typeof x1_a; + }; + x2: this[]; + x3: readonly [{ +- readonly a: typeof globalThis; ++ readonly a: typeof x3_a; + }]; + x4: () => this; +- f1(): any; ++ f1(): invalid; + f2(): this[]; +- f3(): any; ++ f3(): invalid; + f4(): () => this; + } + /// [Errors] //// + + declarationFiles.ts(4,20): error TS2526: A 'this' type is available only in a non-static member of a class or interface. + declarationFiles.ts(36,5): error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. ++declarationFiles.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + declarationFiles.ts(42,5): error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. ++declarationFiles.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== declarationFiles.ts (3 errors) ==== ++==== declarationFiles.ts (5 errors) ==== + class C1 { + x: this; + f(x: this): this { return undefined; } + constructor(x: this) { } +@@ -88,16 +90,20 @@ + x4 = (): this => this; + f1() { + ~~ + !!! error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return { a: this }; + } + f2(): this[] { + return [this]; + } + f3() { + ~~ + !!! error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return [{ a: this }]; + } + f4(): () => this { + return () => this; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationInAmbientContext.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationInAmbientContext.d.ts.diff new file mode 100644 index 0000000000000..964dcbd3222a0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationInAmbientContext.d.ts.diff @@ -0,0 +1,36 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/destructuring/declarationInAmbientContext.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,25 @@ + + + //// [/.src/declarationInAmbientContext.d.ts] +-declare var a: any, b: any; +-declare var c: any, d: any; ++declare var a: invalid, b: invalid; ++declare var c: invalid, d: invalid; ++/// [Errors] //// ++ ++declarationInAmbientContext.ts(1,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationInAmbientContext.ts(1,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationInAmbientContext.ts(2,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationInAmbientContext.ts(2,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== declarationInAmbientContext.ts (4 errors) ==== ++ declare var [a, b]; // Error, destructuring declaration not allowed in ambient context ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ declare var {c, d}; // Error, destructuring declaration not allowed in ambient context ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationWithNoInitializer.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationWithNoInitializer.d.ts.diff new file mode 100644 index 0000000000000..e3d958d6548ef --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationWithNoInitializer.d.ts.diff @@ -0,0 +1,43 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/destructuring/declarationWithNoInitializer.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,19 +1,31 @@ + + + //// [/.src/declarationWithNoInitializer.d.ts] +-declare var a: any, b: any; +-declare var c: any, d: any; ++declare var a: invalid, b: invalid; ++declare var c: invalid, d: invalid; + /// [Errors] //// + + declarationWithNoInitializer.ts(1,5): error TS1182: A destructuring declaration must have an initializer. ++declarationWithNoInitializer.ts(1,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationWithNoInitializer.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + declarationWithNoInitializer.ts(2,5): error TS1182: A destructuring declaration must have an initializer. ++declarationWithNoInitializer.ts(2,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationWithNoInitializer.ts(2,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== declarationWithNoInitializer.ts (2 errors) ==== ++==== declarationWithNoInitializer.ts (6 errors) ==== + var [a, b]; // Error, no initializer + ~~~~~~ + !!! error TS1182: A destructuring declaration must have an initializer. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var {c, d}; // Error, no initializer + ~~~~~~ + !!! error TS1182: A destructuring declaration must have an initializer. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterDeclaration6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterDeclaration6.d.ts.diff new file mode 100644 index 0000000000000..f5836f76af530 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterDeclaration6.d.ts.diff @@ -0,0 +1,151 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,10 +6,10 @@ + }): void; + declare function a1({ public }: { + public: any; + }): void; +-declare function a4([any, [], [any, any, []], [any, any, [], [any, any, any, []]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []], [any, any, any, any, any, any, any, [], [any, any, any, any, any, any, any, any, []]]]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any, any[]]]]]]]]]): any; +-declare function a5(...: any[]): any; ++declare function a4([any, [], [any, any, []], [any, any, [], [any, any, any, []]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []], [any, any, any, any, any, any, any, [], [any, any, any, any, any, any, any, any, []]]]]]]]]: invalid): invalid; ++declare function a5(...: any[]): invalid; + declare function a6(...public: any[]): void; + declare function a7(...a: string): void; + declare function b1({ public: x }: { + public: any; +@@ -19,8 +19,10 @@ + }): void; + /// [Errors] //// + + destructuringParameterDeclaration6.ts(7,18): error TS1005: ':' expected. ++destructuringParameterDeclaration6.ts(13,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++destructuringParameterDeclaration6.ts(13,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + destructuringParameterDeclaration6.ts(13,14): error TS1181: Array element destructuring pattern expected. + destructuringParameterDeclaration6.ts(13,16): error TS2300: Duplicate identifier 'any'. + destructuringParameterDeclaration6.ts(13,19): error TS1005: ',' expected. + destructuringParameterDeclaration6.ts(13,21): error TS1005: ',' expected. +@@ -740,15 +742,16 @@ + destructuringParameterDeclaration6.ts(25,3276): error TS1005: '(' expected. + destructuringParameterDeclaration6.ts(25,3278): error TS2304: Cannot find name 'public'. + destructuringParameterDeclaration6.ts(25,3284): error TS1005: ';' expected. + destructuringParameterDeclaration6.ts(25,3285): error TS1128: Declaration or statement expected. ++destructuringParameterDeclaration6.ts(26,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + destructuringParameterDeclaration6.ts(26,16): error TS1003: Identifier expected. + destructuringParameterDeclaration6.ts(26,23): error TS1005: ',' expected. + destructuringParameterDeclaration6.ts(26,28): error TS1005: '(' expected. + destructuringParameterDeclaration6.ts(28,13): error TS2370: A rest parameter must be of an array type. + + +-==== destructuringParameterDeclaration6.ts (726 errors) ==== ++==== destructuringParameterDeclaration6.ts (729 errors) ==== + // A parameter declaration may specify either an identifier or a binding pattern. + + // Reserved words are not allowed to be used as an identifier in parameter declaration + "use strict" +@@ -762,8 +765,11 @@ + function a1({public}: { + public: any; + }): void { } + function a4([: any[]: [ ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~~~~~~~~~~ + ~ + !!! error TS1181: Array element destructuring pattern expected. + ~~~ + !!! error TS2300: Duplicate identifier 'any'. +@@ -771,27 +777,33 @@ + !!! error TS1005: ',' expected. + ~ + !!! error TS1005: ',' expected. + any, ++ ~~~~~~~~~~~~ + ~~~ + !!! error TS2300: Duplicate identifier 'any'. + any[] ++ ~~~~~~~~~~~~~ + ~~~ + !!! error TS2300: Duplicate identifier 'any'. + ~ + !!! error TS1005: ',' expected. + ]: [ ++ ~~~~~~~~ + ~ + !!! error TS1005: ',' expected. + any, ++ ~~~~~~~~~~~~ + ~~~ + !!! error TS2300: Duplicate identifier 'any'. + any[], ++ ~~~~~~~~~~~~~~ + ~~~ + !!! error TS2300: Duplicate identifier 'any'. + ~ + !!! error TS1005: ',' expected. + [any, any, any[]] ++ ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ + !!! error TS2300: Duplicate identifier 'any'. + ~~~ + !!! error TS2300: Duplicate identifier 'any'. +@@ -799,19 +811,23 @@ + !!! error TS2300: Duplicate identifier 'any'. + ~ + !!! error TS1005: ',' expected. + ]: [ ++ ~~~~~~~~ + ~ + !!! error TS1005: ',' expected. + any, ++ ~~~~~~~~~~~~ + ~~~ + !!! error TS2300: Duplicate identifier 'any'. + any[], ++ ~~~~~~~~~~~~~~ + ~~~ + !!! error TS2300: Duplicate identifier 'any'. + ~ + !!! error TS1005: ',' expected. + [any, any, any[]], ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ + !!! error TS2300: Duplicate identifier 'any'. + ~~~ + !!! error TS2300: Duplicate identifier 'any'. +@@ -819,8 +835,9 @@ + !!! error TS2300: Duplicate identifier 'any'. + ~ + !!! error TS1005: ',' expected. + [any, any, any[], [any, any, any, any[]]] ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ + !!! error TS2300: Duplicate identifier 'any'. + ~~~ + !!! error TS2300: Duplicate identifier 'any'. +@@ -838,8 +855,10 @@ + !!! error TS2300: Duplicate identifier 'any'. + ~ + !!! error TS1005: ',' expected. + ]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]]]]]while, for, public]){ } ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~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~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1005: ',' expected. + ~~~ + !!! error TS2300: Duplicate identifier 'any'. +@@ -2217,8 +2236,10 @@ + !!! error TS1005: ';' expected. + ~ + !!! error TS1128: Declaration or statement expected. + function a5(...: any[]while) { } ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1003: Identifier expected. + ~~~~~ + !!! error TS1005: ',' expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties1.d.ts.diff new file mode 100644 index 0000000000000..0a5181874a73f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties1.d.ts.diff @@ -0,0 +1,117 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,29 +1,29 @@ + + + //// [/.src/destructuringParameterProperties1.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); + } + declare var c1: C1; + declare var useC1Properties: boolean; +@@ -39,10 +39,19 @@ + declare const c3_z: any; + /// [Errors] //// + + destructuringParameterProperties1.ts(2,17): error TS1187: A parameter property may not be declared using a binding pattern. ++destructuringParameterProperties1.ts(2,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++destructuringParameterProperties1.ts(2,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++destructuringParameterProperties1.ts(2,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + destructuringParameterProperties1.ts(9,17): error TS1187: A parameter property may not be declared using a binding pattern. ++destructuringParameterProperties1.ts(9,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++destructuringParameterProperties1.ts(9,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++destructuringParameterProperties1.ts(9,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + destructuringParameterProperties1.ts(16,17): error TS1187: A parameter property may not be declared using a binding pattern. ++destructuringParameterProperties1.ts(16,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++destructuringParameterProperties1.ts(16,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++destructuringParameterProperties1.ts(16,32): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + destructuringParameterProperties1.ts(22,35): error TS2339: Property 'x' does not exist on type 'C1'. + destructuringParameterProperties1.ts(22,44): error TS2339: Property 'y' does not exist on type 'C1'. + destructuringParameterProperties1.ts(22,52): error TS2339: Property 'y' does not exist on type 'C1'. + destructuringParameterProperties1.ts(22,61): error TS2339: Property 'z' does not exist on type 'C1'. +@@ -53,13 +62,19 @@ + destructuringParameterProperties1.ts(32,33): error TS2339: Property 'y' does not exist on type 'C3'. + destructuringParameterProperties1.ts(32,39): error TS2339: Property 'z' does not exist on type 'C3'. + + +-==== destructuringParameterProperties1.ts (13 errors) ==== ++==== destructuringParameterProperties1.ts (22 errors) ==== + class C1 { + constructor(public [x, y, z]: string[]) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS1187: A parameter property may not be declared using a binding pattern. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + + type TupleType1 = [string, number, boolean]; +@@ -67,8 +82,14 @@ + class C2 { + constructor(public [x, y, z]: TupleType1) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS1187: A parameter property may not be declared using a binding pattern. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + + type ObjType1 = { x: number; y: string; z: boolean } +@@ -76,8 +97,14 @@ + class C3 { + constructor(public { x, y, z }: ObjType1) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS1187: A parameter property may not be declared using a binding pattern. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + + var c1: C1 = new C1([]); diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties2.d.ts.diff new file mode 100644 index 0000000000000..e2d8462913543 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties2.d.ts.diff @@ -0,0 +1,55 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,11 +2,11 @@ + + //// [/.src/destructuringParameterProperties2.d.ts] + declare class C1 { + private k; +- private a: number; +- private b: string; +- private c: boolean; ++ private a: invalid; ++ private b: invalid; ++ private c: invalid; + constructor(k: number, [a, b, c]: [number, string, boolean]); + getA(): any; + getB(): any; + getC(): any; +@@ -28,8 +28,11 @@ + declare const z_c: any; + /// [Errors] //// + + destructuringParameterProperties2.ts(2,36): error TS1187: A parameter property may not be declared using a binding pattern. ++destructuringParameterProperties2.ts(2,45): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++destructuringParameterProperties2.ts(2,48): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++destructuringParameterProperties2.ts(2,51): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + destructuringParameterProperties2.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. + destructuringParameterProperties2.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. + destructuringParameterProperties2.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. + destructuringParameterProperties2.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. +@@ -39,13 +42,19 @@ + destructuringParameterProperties2.ts(22,7): error TS2451: Cannot redeclare block-scoped variable 'dest'. + destructuringParameterProperties2.ts(34,7): error TS2451: Cannot redeclare block-scoped variable 'dest'. + + +-==== destructuringParameterProperties2.ts (10 errors) ==== ++==== destructuringParameterProperties2.ts (13 errors) ==== + class C1 { + constructor(private k: number, private [a, b, c]: [number, string, boolean]) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS1187: A parameter property may not be declared using a binding pattern. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { + ~ + !!! error TS2339: Property 'b' does not exist on type 'C1'. + ~ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties3.d.ts.diff new file mode 100644 index 0000000000000..370e31bf7233f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties3.d.ts.diff @@ -0,0 +1,55 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,11 +2,11 @@ + + //// [/.src/destructuringParameterProperties3.d.ts] + declare class C1 { + private k; +- private a: T; +- private b: U; +- private c: V; ++ private a: invalid; ++ private b: invalid; ++ private c: invalid; + constructor(k: T, [a, b, c]: [T, U, V]); + getA(): any; + getB(): any; + getC(): any; +@@ -33,8 +33,11 @@ + declare const z_c: any; + /// [Errors] //// + + destructuringParameterProperties3.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. ++destructuringParameterProperties3.ts(2,40): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++destructuringParameterProperties3.ts(2,43): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++destructuringParameterProperties3.ts(2,46): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + destructuringParameterProperties3.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. + destructuringParameterProperties3.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. + destructuringParameterProperties3.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. + destructuringParameterProperties3.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. +@@ -51,13 +54,19 @@ + destructuringParameterProperties3.ts(42,7): error TS2451: Cannot redeclare block-scoped variable 'z_b'. + destructuringParameterProperties3.ts(43,7): error TS2451: Cannot redeclare block-scoped variable 'z_c'. + + +-==== destructuringParameterProperties3.ts (17 errors) ==== ++==== destructuringParameterProperties3.ts (20 errors) ==== + class C1 { + constructor(private k: T, private [a, b, c]: [T,U,V]) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS1187: A parameter property may not be declared using a binding pattern. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { + ~ + !!! error TS2339: Property 'b' does not exist on type 'C1'. + ~ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties4.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties4.d.ts.diff new file mode 100644 index 0000000000000..bafb7eb0d4bdc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties4.d.ts.diff @@ -0,0 +1,55 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties4.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,11 +2,11 @@ + + //// [/.src/destructuringParameterProperties4.d.ts] + declare class C1 { + private k; +- protected a: T; +- protected b: U; +- protected c: V; ++ protected a: invalid; ++ protected b: invalid; ++ protected c: invalid; + constructor(k: T, [a, b, c]: [T, U, V]); + getA(): any; + getB(): any; + getC(): any; +@@ -16,8 +16,11 @@ + } + /// [Errors] //// + + destructuringParameterProperties4.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. ++destructuringParameterProperties4.ts(2,42): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++destructuringParameterProperties4.ts(2,45): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++destructuringParameterProperties4.ts(2,48): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + destructuringParameterProperties4.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. + destructuringParameterProperties4.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. + destructuringParameterProperties4.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. + destructuringParameterProperties4.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. +@@ -27,13 +30,19 @@ + destructuringParameterProperties4.ts(23,34): error TS2339: Property 'b' does not exist on type 'C2'. + destructuringParameterProperties4.ts(23,44): error TS2339: Property 'c' does not exist on type 'C2'. + + +-==== destructuringParameterProperties4.ts (10 errors) ==== ++==== destructuringParameterProperties4.ts (13 errors) ==== + class C1 { + constructor(private k: T, protected [a, b, c]: [T,U,V]) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS1187: A parameter property may not be declared using a binding pattern. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { + ~ + !!! error TS2339: Property 'b' does not exist on type 'C1'. + ~ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties5.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties5.d.ts.diff new file mode 100644 index 0000000000000..f76037736112a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties5.d.ts.diff @@ -0,0 +1,82 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,14 +7,14 @@ + z: boolean; + }; + type TupleType1 = [ObjType1, number, string]; + declare class C1 { +- x1: any; +- x2: any; +- x3: any; +- { x1, x2, x3 }: any; +- y: number; +- z: string; ++ x1: invalid; ++ x2: invalid; ++ x3: invalid; ++ { x1, x2, x3 }: invalid; ++ y: invalid; ++ z: invalid; + constructor([{ x1, x2, x3 }, y, z]: TupleType1); + } + declare var a: C1; + declare const dest: any[]; +@@ -25,11 +25,17 @@ + declare const a_z: any; + /// [Errors] //// + + destructuringParameterProperties5.ts(5,17): error TS1187: A parameter property may not be declared using a binding pattern. ++destructuringParameterProperties5.ts(5,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + destructuringParameterProperties5.ts(5,27): error TS2339: Property 'x1' does not exist on type 'ObjType1'. ++destructuringParameterProperties5.ts(5,27): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + destructuringParameterProperties5.ts(5,31): error TS2339: Property 'x2' does not exist on type 'ObjType1'. ++destructuringParameterProperties5.ts(5,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + destructuringParameterProperties5.ts(5,35): error TS2339: Property 'x3' does not exist on type 'ObjType1'. ++destructuringParameterProperties5.ts(5,35): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++destructuringParameterProperties5.ts(5,41): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++destructuringParameterProperties5.ts(5,44): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + destructuringParameterProperties5.ts(7,29): error TS2339: Property 'x1' does not exist on type 'C1'. + destructuringParameterProperties5.ts(7,40): error TS2339: Property 'x2' does not exist on type 'C1'. + destructuringParameterProperties5.ts(7,51): error TS2339: Property 'x3' does not exist on type 'C1'. + destructuringParameterProperties5.ts(7,62): error TS2339: Property 'y' does not exist on type 'C1'. +@@ -43,22 +49,34 @@ + destructuringParameterProperties5.ts(12,42): error TS2339: Property 'y' does not exist on type 'C1'. + destructuringParameterProperties5.ts(12,47): error TS2339: Property 'z' does not exist on type 'C1'. + + +-==== destructuringParameterProperties5.ts (17 errors) ==== ++==== destructuringParameterProperties5.ts (23 errors) ==== + type ObjType1 = { x: number; y: string; z: boolean } + type TupleType1 = [ObjType1, number, string] + + class C1 { + constructor(public [{ x1, x2, x3 }, y, z]: TupleType1) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS1187: A parameter property may not be declared using a binding pattern. ++ ~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ + !!! error TS2339: Property 'x1' does not exist on type 'ObjType1'. ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ + !!! error TS2339: Property 'x2' does not exist on type 'ObjType1'. ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ + !!! error TS2339: Property 'x3' does not exist on type 'ObjType1'. ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var foo: any = x1 || x2 || x3 || y || z; + var bar: any = this.x1 || this.x2 || this.x3 || this.y || this.z; + ~~ + !!! error TS2339: Property 'x1' does not exist on type 'C1'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/disallowLineTerminatorBeforeArrow.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/disallowLineTerminatorBeforeArrow.d.ts.diff new file mode 100644 index 0000000000000..3af651a6068d4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/disallowLineTerminatorBeforeArrow.d.ts.diff @@ -0,0 +1,35 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -27,14 +27,15 @@ + var v: any, any: any; + } + /// [Errors] //// + ++disallowLineTerminatorBeforeArrow.ts(67,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + disallowLineTerminatorBeforeArrow.ts(71,25): error TS2304: Cannot find name 'x'. + disallowLineTerminatorBeforeArrow.ts(71,26): error TS1005: ',' expected. + disallowLineTerminatorBeforeArrow.ts(72,9): error TS1128: Declaration or statement expected. + + +-==== disallowLineTerminatorBeforeArrow.ts (3 errors) ==== ++==== disallowLineTerminatorBeforeArrow.ts (4 errors) ==== + var f1 = (): void + => { } + var f2 = (x: string, y: string): void /* + */ => { } +@@ -100,8 +101,10 @@ + } + + export enum Enum { + claw = (() ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + => 10)() + } + + export var v: any = x: any: any diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/duplicateObjectLiteralProperty.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/duplicateObjectLiteralProperty.d.ts.diff new file mode 100644 index 0000000000000..dff880fb9a957 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/duplicateObjectLiteralProperty.d.ts.diff @@ -0,0 +1,44 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/duplicateObjectLiteralProperty.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,11 +6,9 @@ + c: number; + }; + b: boolean; + }; +-declare var y: { +- readonly a: number; +-}; ++declare var y: invalid; + /// [Errors] //// + + duplicateObjectLiteralProperty.ts(4,5): error TS1117: An object literal cannot have multiple properties with the same name. + duplicateObjectLiteralProperty.ts(5,5): error TS1117: An object literal cannot have multiple properties with the same name. +@@ -19,11 +17,12 @@ + duplicateObjectLiteralProperty.ts(14,9): error TS2300: Duplicate identifier 'a'. + duplicateObjectLiteralProperty.ts(15,9): error TS2300: Duplicate identifier 'a'. + duplicateObjectLiteralProperty.ts(16,9): error TS1118: An object literal cannot have multiple get/set accessors with the same name. + duplicateObjectLiteralProperty.ts(16,9): error TS2300: Duplicate identifier 'a'. ++duplicateObjectLiteralProperty.ts(16,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== duplicateObjectLiteralProperty.ts (8 errors) ==== ++==== duplicateObjectLiteralProperty.ts (9 errors) ==== + var x = { + a: 1, + b: true, // OK + a: 56, // Duplicate +@@ -54,6 +53,8 @@ + ~ + !!! error TS1118: An object literal cannot have multiple get/set accessors with the same name. + ~ + !!! error TS2300: Duplicate identifier 'a'. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + }; + +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumAssignmentCompat5.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumAssignmentCompat5.d.ts.diff new file mode 100644 index 0000000000000..d0cec522a5969 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumAssignmentCompat5.d.ts.diff @@ -0,0 +1,39 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/enumAssignmentCompat5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -17,21 +17,30 @@ + declare let c: Computed; + declare let ca: Computed.A; + /// [Errors] //// + ++enumAssignmentCompat5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumAssignmentCompat5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumAssignmentCompat5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumAssignmentCompat5.ts(12,1): error TS2322: Type '4' is not assignable to type 'E'. + enumAssignmentCompat5.ts(14,1): error TS2322: Type '2' is not assignable to type 'E.A'. + enumAssignmentCompat5.ts(20,5): error TS2322: Type '1' is not assignable to type 'Computed.A'. + + +-==== enumAssignmentCompat5.ts (3 errors) ==== ++==== enumAssignmentCompat5.ts (6 errors) ==== + enum E { + A, B, C + } + enum Computed { + A = 1 << 1, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + B = 1 << 2, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + C = 1 << 3, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + let n: number; + let e: E = n; // ok because it's too inconvenient otherwise + e = 0; // ok, in range diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics.d.ts.diff new file mode 100644 index 0000000000000..3559e34bf40c9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics.d.ts.diff @@ -0,0 +1,119 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/enums/enumBasics.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -53,4 +53,110 @@ + B = 0 + } + declare var doNotPropagate: (E8 | E7 | E4 | E3)[]; + declare var doPropagate: (E9 | E6 | E5)[]; ++/// [Errors] //// ++ ++enumBasics.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumBasics.ts(33,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumBasics.ts(33,34): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumBasics.ts(38,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumBasics.ts(56,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumBasics.ts(61,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumBasics.ts(67,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== enumBasics.ts (7 errors) ==== ++ // Enum without initializers have first member = 0 and successive members = N + 1 ++ enum E1 { ++ A, ++ B, ++ C ++ } ++ ++ // Enum type is a subtype of Number ++ var x: number = E1.A; ++ ++ // Enum object type is anonymous with properties of the enum type and numeric indexer ++ var e: typeof E1 = E1; ++ var e: { ++ readonly A: E1.A; ++ readonly B: E1.B; ++ readonly C: E1.C; ++ readonly [n: number]: string; ++ }; ++ var e: typeof E1; ++ ++ // Reverse mapping of enum returns string name of property ++ var s: string = E1[e.A]; ++ var s: string; ++ ++ ++ // Enum with only constant members ++ enum E2 { ++ A = 1, B = 2, C = 3 ++ } ++ ++ // Enum with only computed members ++ enum E3 { ++ X = 'foo'.length, Y = 4 + 3, Z = +'foo' ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ // Enum with constant members followed by computed members ++ enum E4 { ++ X = 0, Y, Z = 'foo'.length ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ // Enum with > 2 constant members with no initializer for first member, non zero initializer for second element ++ enum E5 { ++ A, ++ B = 3, ++ C // 4 ++ } ++ ++ enum E6 { ++ A, ++ B = 0, ++ C // 1 ++ } ++ ++ // Enum with computed member initializer of type 'any' ++ enum E7 { ++ A = 'foo'['foo'] ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ // Enum with computed member initializer of type number ++ enum E8 { ++ B = 'foo'['foo'] ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ //Enum with computed member intializer of same enum type ++ enum E9 { ++ A, ++ B = A ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ // (refer to .js to validate) ++ // Enum constant members are propagated ++ var doNotPropagate: (E8 | E7 | E4 | E3)[] = [ ++ E8.B, E7.A, E4.Z, E3.X, E3.Y, E3.Z ++ ]; ++ // Enum computed members are not propagated ++ var doPropagate: (E9 | E6 | E5)[] = [ ++ E9.A, E9.B, E6.B, E6.C, E6.A, E5.A, E5.B, E5.C ++ ]; ++ ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics2.d.ts.diff new file mode 100644 index 0000000000000..d7448224bdb58 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics2.d.ts.diff @@ -0,0 +1,75 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/enumBasics2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -9,43 +9,64 @@ + z + } + declare enum Bar { + a,// ok +- b = 2,// ok ++ b,// ok + c,// ok + d + } + /// [Errors] //// + ++enumBasics2.ts(4,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumBasics2.ts(4,9): error TS2339: Property 'b' does not exist on type 'Foo.a'. ++enumBasics2.ts(5,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumBasics2.ts(5,9): error TS2339: Property 'a' does not exist on type 'Foo.b'. ++enumBasics2.ts(6,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumBasics2.ts(6,9): error TS2339: Property 'x' does not exist on type 'Foo.y'. + enumBasics2.ts(6,15): error TS2339: Property 'x' does not exist on type 'Foo.a'. ++enumBasics2.ts(10,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumBasics2.ts(11,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumBasics2.ts(12,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumBasics2.ts(13,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumBasics2.ts(13,13): error TS2339: Property 'a' does not exist on type 'Foo.a'. + + +-==== enumBasics2.ts (5 errors) ==== ++==== enumBasics2.ts (12 errors) ==== + enum Foo { + a = 2, + b = 3, + x = a.b, // should error ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2339: Property 'b' does not exist on type 'Foo.a'. + y = b.a, // should error ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2339: Property 'a' does not exist on type 'Foo.b'. + z = y.x * a.x, // should error ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2339: Property 'x' does not exist on type 'Foo.y'. + ~ + !!! error TS2339: Property 'x' does not exist on type 'Foo.a'. + } + + enum Bar { + a = (1).valueOf(), // ok ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + b = Foo.a, // ok ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = Foo.a.valueOf(), // ok ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = Foo.a.a, // should error ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2339: Property 'a' does not exist on type 'Foo.a'. + } + +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics3.d.ts.diff new file mode 100644 index 0000000000000..6199f0aeb8aed --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics3.d.ts.diff @@ -0,0 +1,54 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/enumBasics3.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -11,25 +11,30 @@ + } + declare namespace M { + namespace N { + enum E2 { +- b = 1, ++ b, + c + } + } + } + /// [Errors] //// + ++enumBasics3.ts(5,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumBasics3.ts(5,13): error TS2339: Property 'a' does not exist on type 'E1.a'. ++enumBasics3.ts(13,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumBasics3.ts(14,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumBasics3.ts(14,20): error TS2339: Property 'a' does not exist on type 'E1.a'. + + +-==== enumBasics3.ts (2 errors) ==== ++==== enumBasics3.ts (5 errors) ==== + module M { + export namespace N { + export enum E1 { + a = 1, + b = a.a, // should error ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2339: Property 'a' does not exist on type 'E1.a'. + } + } +@@ -38,9 +43,13 @@ + module M { + export namespace N { + export enum E2 { + b = M.N.E1.a, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = M.N.E1.a.a, // should error ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2339: Property 'a' does not exist on type 'E1.a'. + } + } 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..792536ba7efc0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumClassification.d.ts.diff @@ -0,0 +1,127 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/enums/enumClassification.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -57,4 +57,118 @@ + B, + C, + D + } ++/// [Errors] //// ++ ++enumClassification.ts(50,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumClassification.ts(51,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumClassification.ts(52,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumClassification.ts(66,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumClassification.ts(67,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumClassification.ts(68,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumClassification.ts(74,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumClassification.ts(75,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumClassification.ts(76,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumClassification.ts(77,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== enumClassification.ts (10 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, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ D = B, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ E = C, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ // Examples of numeric enum types with only constant members ++ ++ enum E10 {} ++ ++ enum E11 { ++ A = +0, ++ B, ++ C ++ } ++ ++ enum E12 { ++ A = 1 << 0, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ B = 1 << 1, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ C = 1 << 2 ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ // Examples of numeric enum types with constant and computed members ++ ++ enum E20 { ++ A = "foo".length, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ B = A + 1, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ C = +"123", ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ D = Math.sin(1) ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithString.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithString.d.ts.diff new file mode 100644 index 0000000000000..86d55a234c712 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithString.d.ts.diff @@ -0,0 +1,83 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/enums/enumConstantMemberWithString.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -29,46 +29,73 @@ + b = "12" + } + /// [Errors] //// + ++enumConstantMemberWithString.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithString.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithString.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumConstantMemberWithString.ts(5,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + enumConstantMemberWithString.ts(5,15): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ++enumConstantMemberWithString.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithString.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithString.ts(16,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithString.ts(18,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithString.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithString.ts(31,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== enumConstantMemberWithString.ts (2 errors) ==== ++==== enumConstantMemberWithString.ts (11 errors) ==== + enum T1 { + a = "1", + b = "1" + "2", ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = "1" + "2" + "3", ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = "a" - "a", ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ + !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + ~~~ + !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + e = "a" + 1 ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum T2 { + a = "1", + b = "1" + "2" ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum T3 { + a = "1", + b = "1" + "2", ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = 1, + d = 1 + 2 ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum T4 { + a = "1" + } + + enum T5 { + a = "1" + "2" ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + declare enum T6 { + a = "1", + b = "1" + "2" ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithStringEmitDeclaration.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithStringEmitDeclaration.d.ts.diff new file mode 100644 index 0000000000000..fe4101a8c7eed --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithStringEmitDeclaration.d.ts.diff @@ -0,0 +1,65 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/enums/enumConstantMemberWithStringEmitDeclaration.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -23,4 +23,56 @@ + declare enum T6 { + a = "1", + b = "12" + } ++/// [Errors] //// ++ ++enumConstantMemberWithStringEmitDeclaration.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithStringEmitDeclaration.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithStringEmitDeclaration.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithStringEmitDeclaration.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithStringEmitDeclaration.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithStringEmitDeclaration.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== enumConstantMemberWithStringEmitDeclaration.ts (6 errors) ==== ++ enum T1 { ++ a = "1", ++ b = "1" + "2", ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ c = "1" + "2" + "3" ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ enum T2 { ++ a = "1", ++ b = "1" + "2" ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ enum T3 { ++ a = "1", ++ b = "1" + "2" ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ enum T4 { ++ a = "1" ++ } ++ ++ enum T5 { ++ a = "1" + "2" ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ declare enum T6 { ++ a = "1", ++ b = "1" + "2" ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithTemplateLiterals.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithTemplateLiterals.d.ts.diff new file mode 100644 index 0000000000000..640106f84ce22 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithTemplateLiterals.d.ts.diff @@ -0,0 +1,103 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/enums/enumConstantMemberWithTemplateLiterals.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -39,13 +39,26 @@ + c = "21" + } + /// [Errors] //// + ++enumConstantMemberWithTemplateLiterals.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiterals.ts(17,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiterals.ts(18,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiterals.ts(19,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiterals.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiterals.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiterals.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiterals.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumConstantMemberWithTemplateLiterals.ts(28,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + enumConstantMemberWithTemplateLiterals.ts(28,15): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. ++enumConstantMemberWithTemplateLiterals.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiterals.ts(31,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiterals.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiterals.ts(41,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiterals.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== enumConstantMemberWithTemplateLiterals.ts (2 errors) ==== ++==== enumConstantMemberWithTemplateLiterals.ts (15 errors) ==== + enum T1 { + a = `1` + } + +@@ -56,40 +69,66 @@ + } + + enum T3 { + a = `1` + `1` ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum T4 { + a = `1`, + b = `1` + `1`, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = `1` + "2", ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = "2" + `1`, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + e = "2" + `1` + `1` ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum T5 { + a = `1`, + b = `1` + `2`, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = `1` + `2` + `3`, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = 1, + e = `1` - `1`, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ + !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + ~~~ + !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + f = `1` + 1, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + g = `1${"2"}3`, + h = `1`.length ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum T6 { + a = 1, + b = `12`.length ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + declare enum T7 { + a = `1`, + b = `1` + `1`, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = "2" + `1` ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + +\ 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..fe342018bd99f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts.diff @@ -0,0 +1,88 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/enums/enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -33,4 +33,79 @@ + a = "1", + b = "11", + c = "21" + } ++/// [Errors] //// ++ ++enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(17,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(18,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(19,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(32,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts (10 errors) ==== ++ enum T1 { ++ a = `1` ++ } ++ ++ enum T2 { ++ a = `1`, ++ b = "2", ++ c = 3 ++ } ++ ++ enum T3 { ++ a = `1` + `1` ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ enum T4 { ++ a = `1`, ++ b = `1` + `1`, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ c = `1` + "2", ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ d = "2" + `1`, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ e = "2" + `1` + `1` ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ enum T5 { ++ a = `1`, ++ b = `1` + `2`, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ c = `1` + `2` + `3`, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ d = 1 ++ } ++ ++ enum T6 { ++ a = 1, ++ b = `12`.length ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ declare enum T7 { ++ a = `1`, ++ b = `1` + `1`, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ c = "2" + `1` ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMembers.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMembers.d.ts.diff new file mode 100644 index 0000000000000..de33c4861266a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMembers.d.ts.diff @@ -0,0 +1,128 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/enums/enumConstantMembers.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -22,33 +22,47 @@ + a = Infinity, + b = Infinity, + c = Infinity, + d = NaN, +- e = NaN, +- f = Infinity, +- g = -Infinity ++ e, ++ f, ++ g + } + declare const enum E6 { + a = Infinity, + b = Infinity, + c = Infinity, + d = NaN, +- e = NaN, +- f = Infinity, +- g = -Infinity ++ e, ++ f, ++ g + } + /// [Errors] //// + ++enumConstantMembers.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMembers.ts(23,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMembers.ts(24,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMembers.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMembers.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMembers.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMembers.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMembers.ts(32,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumConstantMembers.ts(32,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. ++enumConstantMembers.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumConstantMembers.ts(33,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. ++enumConstantMembers.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumConstantMembers.ts(34,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. ++enumConstantMembers.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumConstantMembers.ts(35,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. ++enumConstantMembers.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumConstantMembers.ts(36,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. ++enumConstantMembers.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumConstantMembers.ts(37,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. ++enumConstantMembers.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumConstantMembers.ts(38,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + + +-==== enumConstantMembers.ts (7 errors) ==== ++==== enumConstantMembers.ts (21 errors) ==== + // Constant members allow negatives, but not decimals. Also hex literals are allowed + enum E1 { + a = 1, + b +@@ -69,36 +83,64 @@ + } + + enum E5 { + a = 1 / 0, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + b = 2 / 0.0, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = 1.0 / 0.0, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = 0.0 / 0.0, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + e = NaN, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + f = Infinity, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + g = -Infinity ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + const enum E6 { + a = 1 / 0, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + b = 2 / 0.0, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ + !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + c = 1.0 / 0.0, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~ + !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + d = 0.0 / 0.0, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~ + !!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. + e = NaN, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ + !!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. + f = Infinity, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~ + !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + g = -Infinity ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~ + !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + } + +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumErrorOnConstantBindingWithInitializer.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumErrorOnConstantBindingWithInitializer.d.ts.diff new file mode 100644 index 0000000000000..2d04d2a7d8ff6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumErrorOnConstantBindingWithInitializer.d.ts.diff @@ -0,0 +1,34 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/enums/enumErrorOnConstantBindingWithInitializer.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -13,13 +13,14 @@ + /// [Errors] //// + + enumErrorOnConstantBindingWithInitializer.ts(7,7): error TS2322: Type 'string | number | undefined' is not assignable to type 'string | number'. + Type 'undefined' is not assignable to type 'string | number'. ++enumErrorOnConstantBindingWithInitializer.ts(10,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumErrorOnConstantBindingWithInitializer.ts(10,10): error TS18033: Type 'string | number' is not assignable to type 'number' as required for computed enum member values. + Type 'string' is not assignable to type 'number'. + + +-==== enumErrorOnConstantBindingWithInitializer.ts (2 errors) ==== ++==== enumErrorOnConstantBindingWithInitializer.ts (3 errors) ==== + type Thing = { + value?: string | number; + }; + +@@ -31,8 +32,10 @@ + !!! error TS2322: Type 'undefined' is not assignable to type 'string | number'. + + enum E { + test = value, ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! error TS18033: Type 'string | number' is not assignable to type 'number' as required for computed enum member values. + !!! error TS18033: Type 'string' is not assignable to type 'number'. + } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumErrors.d.ts.diff new file mode 100644 index 0000000000000..ee6b67377f54e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumErrors.d.ts.diff @@ -0,0 +1,148 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/enums/enumErrors.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -16,10 +16,10 @@ + A = 0, + B = 0 + } + declare enum E10 { +- A = 0, +- B = 0 ++ A, ++ B + } + declare enum E11 { + A, + B, +@@ -58,18 +58,31 @@ + enumErrors.ts(2,6): error TS2431: Enum name cannot be 'any'. + enumErrors.ts(3,6): error TS2431: Enum name cannot be 'number'. + enumErrors.ts(4,6): error TS2431: Enum name cannot be 'string'. + enumErrors.ts(5,6): error TS2431: Enum name cannot be 'boolean'. ++enumErrors.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumErrors.ts(9,9): error TS18033: Type 'Number' is not assignable to type 'number' as required for computed enum member values. + 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. ++enumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumErrors.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumErrors.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumErrors.ts(26,9): error TS18033: Type 'boolean' is not assignable to type 'number' as required for computed enum member values. ++enumErrors.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumErrors.ts(27,9): error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. ++enumErrors.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumErrors.ts(28,9): error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. ++enumErrors.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumErrors.ts(29,9): error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. ++enumErrors.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumErrors.ts(30,9): error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. ++enumErrors.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumErrors.ts(36,9): error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. ++enumErrors.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumErrors.ts(37,9): error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. ++enumErrors.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumErrors.ts(38,9): error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. ++enumErrors.ts(39,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumErrors.ts(40,9): error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. + enumErrors.ts(48,18): error TS1357: An enum member name must be followed by a ',', '=', or '}'. + enumErrors.ts(49,24): error TS1357: An enum member name must be followed by a ',', '=', or '}'. + enumErrors.ts(49,26): error TS2452: An enum member cannot have a numeric name. +@@ -81,9 +94,9 @@ + enumErrors.ts(53,30): error TS1357: An enum member name must be followed by a ',', '=', or '}'. + enumErrors.ts(53,33): error TS2452: An enum member cannot have a numeric name. + + +-==== enumErrors.ts (24 errors) ==== ++==== enumErrors.ts (37 errors) ==== + // Enum named with PredefinedTypes + enum any { } + ~~~ + !!! error TS2431: Enum name cannot be 'any'. +@@ -99,58 +112,84 @@ + + // Enum with computed member initializer of type Number + enum E5 { + C = new Number(30) ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~ + !!! error TS18033: Type 'Number' is not assignable to type 'number' as required for computed enum member values. + !!! error TS18033: 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. + } + + enum E9 { + A, + B = A ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + //Enum with computed member intializer of different enum type + // Bug 707850: This should be allowed + enum E10 { + A = E9.A, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + B = E9.B ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Enum with computed member intializer of other types + enum E11 { + A = true, + ~~~~ + !!! error TS18033: Type 'boolean' is not assignable to type 'number' as required for computed enum member values. + B = new Date(), ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~ + !!! error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. + C = window, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ + !!! error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. + D = {}, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ + !!! error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. + E = (() => 'foo')(), ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~ + !!! error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. + } + + // Enum with string valued member and computed member initializers + enum E12 { + A = '', + B = new Date(), ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~ + !!! error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. + C = window, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ + !!! error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. + D = {}, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ + !!! error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. + E = 1 + 1, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + F = (() => 'foo')(), ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~ + !!! error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. + } + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumExportMergingES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumExportMergingES6.d.ts.diff new file mode 100644 index 0000000000000..8a9f55b53955c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumExportMergingES6.d.ts.diff @@ -0,0 +1,34 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/enums/enumExportMergingES6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,6 +7,24 @@ + export declare enum Animals { + Dog = 2 + } + export declare enum Animals { +- CatDog = 3 ++ CatDog + } ++/// [Errors] //// ++ ++enumExportMergingES6.ts(8,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== enumExportMergingES6.ts (1 errors) ==== ++ export enum Animals { ++ Cat = 1 ++ } ++ export enum Animals { ++ Dog = 2 ++ } ++ export enum Animals { ++ CatDog = Cat | Dog ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumLiteralAssignableToEnumInsideUnion.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumLiteralAssignableToEnumInsideUnion.d.ts.diff new file mode 100644 index 0000000000000..46ce524ff56cf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumLiteralAssignableToEnumInsideUnion.d.ts.diff @@ -0,0 +1,53 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -32,16 +32,20 @@ + declare const e4: X.Foo.A | boolean; + declare const e5: Ka.Foo | boolean; + /// [Errors] //// + ++enumLiteralAssignableToEnumInsideUnion.ts(13,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumLiteralAssignableToEnumInsideUnion.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumLiteralAssignableToEnumInsideUnion.ts(19,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumLiteralAssignableToEnumInsideUnion.ts(20,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumLiteralAssignableToEnumInsideUnion.ts(24,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. + enumLiteralAssignableToEnumInsideUnion.ts(25,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. + enumLiteralAssignableToEnumInsideUnion.ts(26,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo.B'. + enumLiteralAssignableToEnumInsideUnion.ts(27,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo.A'. + enumLiteralAssignableToEnumInsideUnion.ts(28,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. + + +-==== enumLiteralAssignableToEnumInsideUnion.ts (5 errors) ==== ++==== enumLiteralAssignableToEnumInsideUnion.ts (9 errors) ==== + module X { + export enum Foo { + A, B + } +@@ -53,15 +57,23 @@ + } + module Z { + export enum Foo { + A = 1 << 1, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + B = 1 << 2, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + module Ka { + export enum Foo { + A = 1 << 10, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + B = 1 << 11, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + const e0: X.Foo | boolean = Y.Foo.A; // ok + const e1: X.Foo | boolean = Z.Foo.A; // not legal, Z is computed diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMerging.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMerging.d.ts.diff new file mode 100644 index 0000000000000..1398c70175f31 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMerging.d.ts.diff @@ -0,0 +1,102 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/enums/enumMerging.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -54,4 +54,93 @@ + Yellow = 1 + } + } + } ++/// [Errors] //// ++ ++enumMerging.ts(26,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumMerging.ts(26,27): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumMerging.ts(26,45): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumMerging.ts(30,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumMerging.ts(30,27): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumMerging.ts(30,45): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== enumMerging.ts (6 errors) ==== ++ // Enum with only constant members across 2 declarations with the same root module ++ // Enum with initializer in all declarations with constant members with the same root module ++ module M1 { ++ enum EImpl1 { ++ A, B, C ++ } ++ ++ enum EImpl1 { ++ D = 1, E, F ++ } ++ ++ export enum EConst1 { ++ A = 3, B = 2, C = 1 ++ } ++ ++ export enum EConst1 { ++ D = 7, E = 9, F = 8 ++ } ++ ++ var x = [EConst1.A, EConst1.B, EConst1.C, EConst1.D, EConst1.E, EConst1.F]; ++ } ++ ++ // Enum with only computed members across 2 declarations with the same root module ++ module M2 { ++ export enum EComp2 { ++ A = 'foo'.length, B = 'foo'.length, C = 'foo'.length ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ export enum EComp2 { ++ D = 'foo'.length, E = 'foo'.length, F = 'foo'.length ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ var x = [EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F]; ++ } ++ ++ // Enum with initializer in only one of two declarations with constant members with the same root module ++ module M3 { ++ enum EInit { ++ A, ++ B ++ } ++ ++ enum EInit { ++ C = 1, D, E ++ } ++ } ++ ++ // Enums with same name but different root module ++ module M4 { ++ export enum Color { Red, Green, Blue } ++ } ++ module M5 { ++ export enum Color { Red, Green, Blue } ++ } ++ ++ module M6.A { ++ export enum Color { Red, Green, Blue } ++ } ++ module M6 { ++ export module A { ++ export enum Color { Yellow = 1 } ++ } ++ var t = A.Color.Yellow; ++ t = A.Color.Red; ++ } ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMergingErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMergingErrors.d.ts.diff new file mode 100644 index 0000000000000..ecfb4e3a62381 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMergingErrors.d.ts.diff @@ -0,0 +1,46 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/enums/enumMergingErrors.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -65,28 +65,37 @@ + } + } + /// [Errors] //// + ++enumMergingErrors.ts(8,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumMergingErrors.ts(9,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumMergingErrors.ts(15,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumMergingErrors.ts(26,22): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. + enumMergingErrors.ts(38,22): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. + + +-==== enumMergingErrors.ts (2 errors) ==== ++==== enumMergingErrors.ts (5 errors) ==== + // Enum with constant, computed, constant members split across 3 declarations with the same root module + module M { + export enum E1 { A = 0 } + export enum E2 { C } + export enum E3 { A = 0 } + } + module M { + export enum E1 { B = 'foo'.length } ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export enum E2 { B = 'foo'.length } ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export enum E3 { C } + } + module M { + export enum E1 { C } + export enum E2 { A = 0 } + export enum E3 { B = 'foo'.length } ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Enum with no initializer in either declaration with constant members with the same root module + module M1 { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumNumbering1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumNumbering1.d.ts.diff new file mode 100644 index 0000000000000..e533152a691e3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumNumbering1.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/enumNumbering1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,4 +7,20 @@ + C, + D = 10, + E = 11 + } ++/// [Errors] //// ++ ++enumNumbering1.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== enumNumbering1.ts (1 errors) ==== ++ enum Test { ++ A, ++ B, ++ C = Math.floor(Math.random() * 1000), ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ D = 10, ++ E // Error but shouldn't be ++ } ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumPropertyAccessBeforeInitalisation.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumPropertyAccessBeforeInitalisation.d.ts.diff new file mode 100644 index 0000000000000..43d7a57fbaedf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumPropertyAccessBeforeInitalisation.d.ts.diff @@ -0,0 +1,48 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/enumPropertyAccessBeforeInitalisation.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -8,26 +8,38 @@ + D + } + /// [Errors] //// + ++enumPropertyAccessBeforeInitalisation.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumPropertyAccessBeforeInitalisation.ts(2,9): error TS2565: Property 'A' is used before being assigned. ++enumPropertyAccessBeforeInitalisation.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumPropertyAccessBeforeInitalisation.ts(3,9): error TS2565: Property 'B' is used before being assigned. ++enumPropertyAccessBeforeInitalisation.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumPropertyAccessBeforeInitalisation.ts(4,9): error TS2565: Property 'C' is used before being assigned. ++enumPropertyAccessBeforeInitalisation.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumPropertyAccessBeforeInitalisation.ts(5,13): error TS2565: Property 'D' is used before being assigned. + + +-==== enumPropertyAccessBeforeInitalisation.ts (4 errors) ==== ++==== enumPropertyAccessBeforeInitalisation.ts (8 errors) ==== + enum E { + A = A, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2565: Property 'A' is used before being assigned. + B = E.B, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ + !!! error TS2565: Property 'B' is used before being assigned. + C = E["C"], ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ + !!! error TS2565: Property 'C' is used before being assigned. + D = 1 + D ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2565: Property 'D' is used before being assigned. + } + +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithComputedMember.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithComputedMember.d.ts.diff new file mode 100644 index 0000000000000..c03adbbf84c66 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithComputedMember.d.ts.diff @@ -0,0 +1,30 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/enumWithComputedMember.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,15 +7,21 @@ + Z + } + /// [Errors] //// + ++enumWithComputedMember.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumWithComputedMember.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumWithComputedMember.ts(4,5): error TS1061: Enum member must have initializer. + + +-==== enumWithComputedMember.ts (1 errors) ==== ++==== enumWithComputedMember.ts (3 errors) ==== + enum A { + X = "".length, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Y = X, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Z + ~ + !!! error TS1061: Enum member must have initializer. + } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithExport.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithExport.d.ts.diff new file mode 100644 index 0000000000000..00f5ab242fc22 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithExport.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/enumWithExport.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -8,16 +8,19 @@ + z + } + /// [Errors] //// + ++enumWithExport.ts(5,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumWithExport.ts(5,7): error TS2304: Cannot find name 'y'. + + +-==== enumWithExport.ts (1 errors) ==== ++==== enumWithExport.ts (2 errors) ==== + namespace x { + export let y = 123 + } + enum x { + z = y ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2304: Cannot find name 'y'. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithParenthesizedInitializer1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithParenthesizedInitializer1.d.ts.diff new file mode 100644 index 0000000000000..269e29c18edf4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithParenthesizedInitializer1.d.ts.diff @@ -0,0 +1,26 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/enumWithParenthesizedInitializer1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,13 +5,16 @@ + e = -3 + } + /// [Errors] //// + ++enumWithParenthesizedInitializer1.ts(2,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumWithParenthesizedInitializer1.ts(3,1): error TS1005: ')' expected. + + +-==== enumWithParenthesizedInitializer1.ts (1 errors) ==== ++==== enumWithParenthesizedInitializer1.ts (2 errors) ==== + enum E { + e = -(3 ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + ~ + !!! error TS1005: ')' expected. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithoutInitializerAfterComputedMember.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithoutInitializerAfterComputedMember.d.ts.diff new file mode 100644 index 0000000000000..beacc33eae0e2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithoutInitializerAfterComputedMember.d.ts.diff @@ -0,0 +1,26 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/enumWithoutInitializerAfterComputedMember.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,4 +5,17 @@ + a = 0, + b = 0, + c = 1 + } ++/// [Errors] //// ++ ++enumWithoutInitializerAfterComputedMember.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== enumWithoutInitializerAfterComputedMember.ts (1 errors) ==== ++ enum E { ++ a, ++ b = a, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ c ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/equalityWithEnumTypes.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/equalityWithEnumTypes.d.ts.diff new file mode 100644 index 0000000000000..8bce1c585ee41 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/equalityWithEnumTypes.d.ts.diff @@ -0,0 +1,40 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/types/typeRelationships/comparable/equalityWithEnumTypes.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -12,15 +12,17 @@ + declare function f1(v: E1): void; + declare function f2(v: E2): void; + /// [Errors] //// + ++equalityWithEnumTypes.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++equalityWithEnumTypes.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + equalityWithEnumTypes.ts(14,9): error TS2367: This comparison appears to be unintentional because the types 'E1' and '0' have no overlap. + equalityWithEnumTypes.ts(23,9): error TS2367: This comparison appears to be unintentional because the types 'E1' and '3' have no overlap. + equalityWithEnumTypes.ts(29,9): error TS2367: This comparison appears to be unintentional because the types 'E2' and '0' have no overlap. + equalityWithEnumTypes.ts(38,9): error TS2367: This comparison appears to be unintentional because the types 'E2' and '3' have no overlap. + + +-==== equalityWithEnumTypes.ts (4 errors) ==== ++==== equalityWithEnumTypes.ts (6 errors) ==== + // Literal enum type + enum E1 { + a = 1, + b = 2, +@@ -28,9 +30,13 @@ + + // Numeric enum type + enum E2 { + a = 1 << 0, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + b = 1 << 1 ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + function f1(v: E1): void { + if (v !== 0) { // Error diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exactSpellingSuggestion.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exactSpellingSuggestion.d.ts.diff new file mode 100644 index 0000000000000..31a9aaa980316 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exactSpellingSuggestion.d.ts.diff @@ -0,0 +1,36 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/exactSpellingSuggestion.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,18 +7,27 @@ + BIT_2 = 4 + } + /// [Errors] //// + ++exactSpellingSuggestion.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++exactSpellingSuggestion.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++exactSpellingSuggestion.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + exactSpellingSuggestion.ts(9,4): error TS2551: Property 'bit_2' does not exist on type 'typeof U8'. Did you mean 'BIT_2'? + + +-==== exactSpellingSuggestion.ts (1 errors) ==== ++==== exactSpellingSuggestion.ts (4 errors) ==== + // Fixes #16245 -- always suggest the exact match, even when + // other options are very close + enum U8 { + BIT_0 = 1 << 0, ++ ~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + BIT_1 = 1 << 1, ++ ~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + BIT_2 = 1 << 2 ++ ~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + U8.bit_2 + ~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesJSDocInTs.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesJSDocInTs.d.ts.diff new file mode 100644 index 0000000000000..a0cab2d7ce398 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesJSDocInTs.d.ts.diff @@ -0,0 +1,30 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/expandoFunctionContextualTypesJSDocInTs.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,7 +1,18 @@ + + + //// [/.src/expandoFunctionContextualTypesJSDocInTs.d.ts] + export declare function Foo(): void; +-export declare namespace Foo { +- var bar: () => void; +-} ++/// [Errors] //// ++ ++expandoFunctionContextualTypesJSDocInTs.ts(1,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ ++==== expandoFunctionContextualTypesJSDocInTs.ts (1 errors) ==== ++ export function Foo(): void { } ++ ~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ // This comment should have no effect; this is a TS file. ++ /** @type {never} */ ++ Foo.bar = () => { }; ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesNoValue.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesNoValue.d.ts.diff new file mode 100644 index 0000000000000..7eea53fa30edc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesNoValue.d.ts.diff @@ -0,0 +1,35 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/expandoFunctionContextualTypesNoValue.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,22 +1,22 @@ + + + //// [/.src/expandoFunctionContextualTypesNoValue.d.ts] + export declare function Foo(): void; +-export declare namespace Foo { +- var bar: () => void; +-} + /// [Errors] //// + + expandoFunctionContextualTypesNoValue.ts(2,17): error TS2307: Cannot find module 'blah' or its corresponding type declarations. ++expandoFunctionContextualTypesNoValue.ts(4,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +-==== expandoFunctionContextualTypesNoValue.ts (1 errors) ==== ++==== expandoFunctionContextualTypesNoValue.ts (2 errors) ==== + // GH #38532 + import Foo from "blah"; + ~~~~~~ + !!! error TS2307: Cannot find module 'blah' or its corresponding type declarations. + + export function Foo(): void { } ++ ~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + Foo.bar = () => { }; + +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff new file mode 100644 index 0000000000000..e05b0e2a3ed75 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff @@ -0,0 +1,49 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/expandoFunctionExpressionsWithDynamicNames.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,11 +1,32 @@ + + + //// [/.src/expandoFunctionExpressionsWithDynamicNames.d.ts] +-export declare const expr: { +- (): void; +- X: number; +-}; +-export declare const expr2: { +- (): void; +- X: number; +-}; ++export declare const expr: invalid; ++export declare const expr2: invalid; ++/// [Errors] //// ++ ++expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expandoFunctionExpressionsWithDynamicNames.ts(8,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++expandoFunctionExpressionsWithDynamicNames.ts(8,14): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ ++==== expandoFunctionExpressionsWithDynamicNames.ts (4 errors) ==== ++ // https://github.com/microsoft/TypeScript/issues/54809 ++ ++ const s = "X"; ++ ++ export const expr = (): void => {} ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ expr[s] = 0 ++ ++ export const expr2 = function (): void {} ++ ~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ expr2[s] = 0 ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignDottedName.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignDottedName.d.ts.diff new file mode 100644 index 0000000000000..efc9a6bed7714 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignDottedName.d.ts.diff @@ -0,0 +1,33 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/externalModules/exportAssignDottedName.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,7 +3,22 @@ + //// [/.src/foo1.d.ts] + export declare function x(): boolean; + + //// [/.src/foo2.d.ts] +-import foo1 = require('./foo1'); +-declare const _default: typeof foo1.x; ++declare const _default: invalid; + export = _default; ++/// [Errors] //// ++ ++foo2.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== foo2.ts (1 errors) ==== ++ import foo1 = require('./foo1'); ++ export = foo1.x; // Ok ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++==== foo1.ts (0 errors) ==== ++ export function x(): boolean{ ++ return true; ++ } ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignNonIdentifier.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignNonIdentifier.d.ts.diff new file mode 100644 index 0000000000000..2ab796c60daf2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignNonIdentifier.d.ts.diff @@ -0,0 +1,74 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/externalModules/exportAssignNonIdentifier.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,8 @@ + + + //// [/.src/foo1.d.ts] +-declare const _default: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"; ++declare const _default: invalid; + export = _default; + + //// [/.src/foo2.d.ts] + declare const _default: "sausages"; +@@ -21,26 +21,31 @@ + //// [/.src/foo5.d.ts] + export = undefined; + + //// [/.src/foo6.d.ts] +-declare const _default: any; ++declare const _default: invalid; + export = _default; + + //// [/.src/foo7.d.ts] +-declare const _default: DateConstructor | StringConstructor; ++declare const _default: invalid; + export = _default; + + //// [/.src/foo8.d.ts] + declare const _default: any; + export = _default; + /// [Errors] //// + ++foo1.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++foo6.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + foo6.ts(1,14): error TS1109: Expression expected. ++foo7.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== foo1.ts (0 errors) ==== ++==== foo1.ts (1 errors) ==== + var x = 10; + export = typeof x; // Ok ++ ~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + ==== foo2.ts (0 errors) ==== + export = "sausages"; // Ok + +@@ -52,15 +57,19 @@ + + ==== foo5.ts (0 errors) ==== + export = undefined; // Valid. undefined is an identifier in JavaScript/TypeScript + +-==== foo6.ts (1 errors) ==== ++==== foo6.ts (2 errors) ==== + export = void; // Error, void operator requires an argument ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1109: Expression expected. + +-==== foo7.ts (0 errors) ==== ++==== foo7.ts (1 errors) ==== + export = Date || String; // Ok ++ ~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + ==== foo8.ts (0 errors) ==== + export = null; // Ok + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignmentWithoutIdentifier1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignmentWithoutIdentifier1.d.ts.diff new file mode 100644 index 0000000000000..cda8bcbb1e264 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignmentWithoutIdentifier1.d.ts.diff @@ -0,0 +1,31 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/exportAssignmentWithoutIdentifier1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,21 @@ + + + //// [/.src/exportAssignmentWithoutIdentifier1.d.ts] +-declare const _default: any; ++declare const _default: invalid; + export = _default; ++/// [Errors] //// ++ ++exportAssignmentWithoutIdentifier1.ts(7,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== exportAssignmentWithoutIdentifier1.ts (1 errors) ==== ++ function Greeter() { ++ //... ++ } ++ Greeter.prototype.greet = function () { ++ //... ++ } ++ export = new Greeter(); ++ ~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ +\ No newline at end of file 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..e82aa169e0905 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportDefaultNamespace.d.ts.diff @@ -0,0 +1,32 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/declarationEmit/exportDefaultNamespace.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,18 @@ + + + //// [/.src/exportDefaultNamespace.d.ts] +-declare function someFunc(): string; +-declare namespace someFunc { +- var someProp: string; +-} +-export default someFunc; ++export default function someFunc(): string; ++/// [Errors] //// ++ ++exportDefaultNamespace.ts(1,25): error TS9009: 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 { ++ ~~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ return 'hello!'; ++ } ++ ++ someFunc.someProp = 'yo'; ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty.d.ts.diff new file mode 100644 index 0000000000000..18e67f1b2b760 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty.d.ts.diff @@ -0,0 +1,84 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/exportEqualsProperty.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,21 +1,64 @@ + + + //// [/.src/a.d.ts] +-declare namespace A { +- class B { +- constructor(b: number); +- } +- namespace B { +- const b: number; +- } +-} +-declare const _default: typeof A.B; ++declare const _default: invalid; + export = _default; + + //// [/.src/b.d.ts] +-declare const _default: number; ++declare const _default: invalid; + export = _default; + + //// [/.src/index.d.ts] +-/// + export {}; ++/// [Errors] //// ++ ++a.ts(5,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++b.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++index.ts(1,22): error TS9010: Reference directives are not supported in isolated declaration mode. ++ ++ ++==== index.ts (1 errors) ==== ++ /// ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS9010: Reference directives are not supported in isolated declaration mode. ++ import { X } from "foobar"; ++ import X2 = require("foobarx"); ++ const x: X = X; ++ const x2: X2 = X2; ++ ++ import B = require("./a"); ++ const b: B = new B(B.b); ++ ++ import fooLength = require("./b"); ++ fooLength + 1; ++ ++==== declarations.d.ts (0 errors) ==== ++ // This test is just like exportDefaultProperty, but with `export =`. ++ ++ declare namespace foo.bar { ++ export type X = number; ++ export const X: number; ++ } ++ ++ declare module "foobar" { ++ export = foo.bar; ++ } ++ ++ declare module "foobarx" { ++ export = foo.bar.X; ++ } ++ ++==== a.ts (1 errors) ==== ++ namespace A { ++ export class B { constructor(b: number) {} } ++ export namespace B { export const b: number = 0; } ++ } ++ export = A.B; ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++==== b.ts (1 errors) ==== ++ export = "foo".length; ++ ~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty2.d.ts.diff new file mode 100644 index 0000000000000..73ce8f164f69f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty2.d.ts.diff @@ -0,0 +1,41 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/exportEqualsProperty2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,31 @@ + + + //// [/.src/a.d.ts] +-declare const _default: number; ++declare const _default: invalid; + export = _default; + + //// [/.src/b.d.ts] + export {}; ++/// [Errors] //// ++ ++a.ts(10,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== b.ts (0 errors) ==== ++ import B = require("./a"); ++ const x: B = { c: B }; ++ ++==== a.ts (1 errors) ==== ++ // This test is just like exportDefaultProperty2, but with `export =`. ++ ++ class C { ++ static B: number; ++ } ++ namespace C { ++ export interface B { c: number } ++ } ++ ++ export = C.B; ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/forwardRefInEnum.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/forwardRefInEnum.d.ts.diff new file mode 100644 index 0000000000000..159451a1f8207 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/forwardRefInEnum.d.ts.diff @@ -0,0 +1,64 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/forwardRefInEnum.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,39 +1,51 @@ + + + //// [/.src/forwardRefInEnum.d.ts] + declare enum E1 { +- X = 0, +- X1 = 0, +- Y = 0, +- Y1 = 0 ++ X, ++ X1, ++ Y, ++ Y1 + } + declare enum E1 { + Z = 4 + } + /// [Errors] //// + ++forwardRefInEnum.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. ++forwardRefInEnum.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + forwardRefInEnum.ts(5,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. ++forwardRefInEnum.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + forwardRefInEnum.ts(7,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. ++forwardRefInEnum.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + forwardRefInEnum.ts(8,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + + +-==== forwardRefInEnum.ts (4 errors) ==== ++==== forwardRefInEnum.ts (8 errors) ==== + enum E1 { + // illegal case + // forward reference to the element of the same enum + X = Y, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + X1 = E1["Y"], ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ + !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + // forward reference to the element of the same enum + Y = E1.Z, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ + !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + Y1 = E1["Z"] ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ + !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + } + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/functionImplementations.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/functionImplementations.d.ts.diff new file mode 100644 index 0000000000000..51c7b2f289b4e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/functionImplementations.d.ts.diff @@ -0,0 +1,159 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/functions/functionImplementations.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -13,25 +13,25 @@ + declare function rec4(): number; + declare var n: number; + declare var n: number; + declare var n: number; +-declare var n: number; ++declare var n: invalid; + declare var nu: any; +-declare var nu: any; ++declare var nu: invalid; + declare var un: any; +-declare var un: any; +-declare var n: number; +-declare var n: number; +-declare var n: number; ++declare var un: invalid; ++declare var n: invalid; ++declare var n: invalid; ++declare var n: invalid; + declare class Base { + private m; + } + declare class Derived extends Base { + private q; + } + declare var b: Base; +-declare var b: Base; +-declare var a: any; ++declare var b: invalid; ++declare var a: invalid; + declare function thisFunc(): void; + declare function opt1(n?: number): void; + declare function opt2(n?: { + x: any; +@@ -52,14 +52,22 @@ + declare var f11: (x: number) => any; + declare var f12: (x: number) => any; + /// [Errors] //// + ++functionImplementations.ts(40,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++functionImplementations.ts(46,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++functionImplementations.ts(52,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++functionImplementations.ts(57,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++functionImplementations.ts(62,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + functionImplementations.ts(67,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type '3 | 5'. ++functionImplementations.ts(67,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++functionImplementations.ts(80,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + functionImplementations.ts(85,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'Base'. ++functionImplementations.ts(85,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + functionImplementations.ts(90,1): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value. + + +-==== functionImplementations.ts (3 errors) ==== ++==== functionImplementations.ts (11 errors) ==== + // FunctionExpression with no return type annotation and no return statement returns void + var v: void = function () { } (); + + // FunctionExpression f with no return type annotation and directly references f in its body returns any +@@ -98,41 +106,66 @@ + var n: number = rec4(); + + // FunctionExpression with no return type annotation and returns a number + var n = function (): number { ++ ~~~~~~~~~~~~~~~~~~~~~ + return 3; ++ ~~~~~~~~~~~~~ + } (); ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // FunctionExpression with no return type annotation and returns null + var nu = null; + var nu = function (): any { ++ ~~~~~~~~~~~~~~~~~~ + return null; ++ ~~~~~~~~~~~~~~~~ + } (); ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // FunctionExpression with no return type annotation and returns undefined + var un = undefined; + var un = function (): any { ++ ~~~~~~~~~~~~~~~~~~ + return undefined; ++ ~~~~~~~~~~~~~~~~~~~~~ + } (); ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // FunctionExpression with no return type annotation and returns a type parameter type + var n = function (x: T): T { ++ ~~~~~~~~~~~~~~~~~~~~~~~ + return x; ++ ~~~~~~~~~~~~~ + } (4); ++ ~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // FunctionExpression with no return type annotation and returns a constrained type parameter type + var n = function (x: T): T { ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + return x; ++ ~~~~~~~~~~~~~ + } (4); ++ ~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // FunctionExpression with no return type annotation with multiple return statements with identical types + var n = function (): 3 | 5 { + ~ + !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type '3 | 5'. + !!! related TS6203 functionImplementations.ts:35:5: 'n' was also declared here. ++ ~~~~~~~~~~~~~~~~~~~~ + return 3; ++ ~~~~~~~~~~~~~ + return 5; ++ ~~~~~~~~~~~~~ + }(); ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // Otherwise, the inferred return type is the first of the types of the return statement expressions + // in the function body that is a supertype of each of the others, + // ignoring return statements with no expressions. +@@ -141,18 +174,26 @@ + class Base { private m; } + class Derived extends Base { private q; } + var b: Base; + var b = function (): Base { ++ ~~~~~~~~~~~~~~~~~~~ + return new Base(); return new Derived(); ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + } (); ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // FunctionExpression with no return type annotation with multiple return statements with one a recursive call + var a = function f(): Base { + ~ + !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'Base'. + !!! related TS6203 functionImplementations.ts:5:5: 'a' was also declared here. ++ ~~~~~~~~~~~~~~~~~~~~ + return new Base(); return new Derived(); return f(); // ? ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + } (); ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // FunctionExpression with non -void return type annotation with a single throw statement + undefined === function (): number { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/initializersInAmbientEnums.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/initializersInAmbientEnums.d.ts.diff new file mode 100644 index 0000000000000..040b51c046a4c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/initializersInAmbientEnums.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/initializersInAmbientEnums.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,4 +5,20 @@ + a = 10, + b = 10, + e = 655360 + } ++/// [Errors] //// ++ ++initializersInAmbientEnums.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++initializersInAmbientEnums.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== initializersInAmbientEnums.ts (2 errors) ==== ++ declare enum E { ++ a = 10, ++ b = a, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ e = 10 << 2 * 8, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff new file mode 100644 index 0000000000000..e8f0a99d93c99 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff @@ -0,0 +1,76 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/isolatedModulesGlobalNamespacesAndEnums.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -12,15 +12,15 @@ + declare const d = "d"; + + //// [/.src/enum2.d.ts] + declare enum Enum { +- D = "d", +- E = 0,// error +- Y = 1000000,// error +- Z = 0 ++ D, ++ E,// error ++ Y,// error ++ Z + } + declare enum Enum { +- F = 0 ++ F + } + + //// [/.src/module-namespaces.d.ts] + export declare namespace Instantiated { +@@ -38,10 +38,15 @@ + const x: number; + } + /// [Errors] //// + ++enum2.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enum2.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enum2.ts(3,9): error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. ++enum2.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enum2.ts(4,9): error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. ++enum2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enum2.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + script-namespaces.ts(1,11): error TS1280: Namespaces are not allowed in global script files when 'isolatedModules' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement. + + + ==== script-namespaces.ts (1 errors) ==== +@@ -66,19 +71,29 @@ + enum Enum { A, B, C } + declare enum Enum { X = 1_000_000 } + const d = 'd'; + +-==== enum2.ts (2 errors) ==== ++==== enum2.ts (7 errors) ==== + enum Enum { + D = d, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + E = A, // error ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. + Y = X, // error ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. + Z = Enum.A ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + declare enum Enum { + F = A ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsContainerMergeTsDeclaration.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsContainerMergeTsDeclaration.d.ts.diff new file mode 100644 index 0000000000000..bc684eca87d1a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsContainerMergeTsDeclaration.d.ts.diff @@ -0,0 +1,39 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/salsa/jsContainerMergeTsDeclaration.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,13 +1,14 @@ + + + //// [/.src/b.d.ts] +-declare var x: number; ++declare var x: invalid; + /// [Errors] //// + + error TS6504: File 'a.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 ++b.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + + !!! error TS6504: File 'a.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? + !!! error TS6504: The file is in the program because: +@@ -16,9 +17,13 @@ + var /*1*/x = function foo() { + } + x.a = function bar() { + } +-==== b.ts (0 errors) ==== ++==== b.ts (1 errors) ==== + var x = function (): number { ++ ~~~~~~~~~~~~~~~~~~~~~ + return 1; ++ ~~~~~~~~~~~~~ + }(); ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxComponentTypeErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxComponentTypeErrors.d.ts.diff new file mode 100644 index 0000000000000..513d4bef557ca --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxComponentTypeErrors.d.ts.diff @@ -0,0 +1,51 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/jsxComponentTypeErrors.tsx] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -13,11 +13,8 @@ + type?: T; + }): { + type: T | undefined; + }; +-declare namespace FunctionComponent { +- var useThis: () => JSX.Element; +-} + declare class ClassComponent { + type: string; + } + declare const MixedComponent: typeof FunctionComponent | typeof ClassComponent; +@@ -34,8 +31,9 @@ + declare const elem5: JSX.Element; + declare const elem6: JSX.Element; + /// [Errors] //// + ++jsxComponentTypeErrors.tsx(10,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + jsxComponentTypeErrors.tsx(18,11): error TS2786: 'this' cannot be used as a JSX component. + Its return type '{ type: "foo" | undefined; }' is not a valid JSX element. + Types of property 'type' are incompatible. + Type '"foo" | undefined' is not assignable to type '"element"'. +@@ -63,9 +61,9 @@ + Its instance type 'MemberClassComponent' is not a valid JSX element. + Property 'type' is missing in type 'MemberClassComponent' but required in type 'ElementClass'. + + +-==== jsxComponentTypeErrors.tsx (7 errors) ==== ++==== jsxComponentTypeErrors.tsx (8 errors) ==== + namespace JSX { + export interface Element { + type: 'element'; + } +@@ -74,8 +72,10 @@ + } + } + + function FunctionComponent({type}: {type?: T}): { ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + type: T | undefined; + } { + return { + type diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespace.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespace.d.ts.diff new file mode 100644 index 0000000000000..2b545e0771b1b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespace.d.ts.diff @@ -0,0 +1,121 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespace.tsx] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,111 @@ + + + //// [/index.d.ts] +-export declare const Comp: () => import("preact").JSXInternal.Element; ++export declare const Comp: invalid; ++/// [Errors] //// ++ ++/index.tsx(1,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== /node_modules/preact/index.d.ts (0 errors) ==== ++ type Defaultize = ++ // Distribute over unions ++ Props extends any // Make any properties included in Default optional ++ ? Partial>> & ++ // Include the remaining properties from Props ++ Pick> ++ : never; ++ export namespace JSXInternal { ++ interface HTMLAttributes { } ++ interface SVGAttributes { } ++ type LibraryManagedAttributes = Component extends { ++ defaultProps: infer Defaults; ++ } ++ ? Defaultize ++ : Props; ++ ++ interface IntrinsicAttributes { ++ key?: any; ++ } ++ ++ interface Element extends VNode { } ++ ++ interface ElementClass extends Component { } ++ ++ interface ElementAttributesProperty { ++ props: any; ++ } ++ ++ interface ElementChildrenAttribute { ++ children: any; ++ } ++ ++ interface IntrinsicElements { ++ div: HTMLAttributes; ++ } ++ } ++ export const Fragment: unique symbol; ++ export type ComponentType = {}; ++ export type ComponentChild = {}; ++ export type ComponentChildren = {}; ++ export type VNode = {}; ++ export type Attributes = {}; ++ export type Component = {}; ++==== /node_modules/preact/jsx-runtime/index.d.ts (0 errors) ==== ++ export { Fragment } from '..'; ++ import { ++ ComponentType, ++ ComponentChild, ++ ComponentChildren, ++ VNode, ++ Attributes ++ } from '..'; ++ import { JSXInternal } from '..'; ++ ++ export function jsx( ++ type: string, ++ props: JSXInternal.HTMLAttributes & ++ JSXInternal.SVGAttributes & ++ Record & { children?: ComponentChild }, ++ key?: string ++ ): VNode; ++ export function jsx

( ++ type: ComponentType

, ++ props: Attributes & P & { children?: ComponentChild }, ++ key?: string ++ ): VNode; ++ ++ ++ export function jsxs( ++ type: string, ++ props: JSXInternal.HTMLAttributes & ++ JSXInternal.SVGAttributes & ++ Record & { children?: ComponentChild[] }, ++ key?: string ++ ): VNode; ++ export function jsxs

( ++ type: ComponentType

, ++ props: Attributes & P & { children?: ComponentChild[] }, ++ key?: string ++ ): VNode; ++ ++ ++ export function jsxDEV( ++ type: string, ++ props: JSXInternal.HTMLAttributes & ++ JSXInternal.SVGAttributes & ++ Record & { children?: ComponentChildren }, ++ key?: string ++ ): VNode; ++ export function jsxDEV

( ++ type: ComponentType

, ++ props: Attributes & P & { children?: ComponentChildren }, ++ key?: string ++ ): VNode; ++ ++ export import JSX = JSXInternal; ++ ++==== /index.tsx (1 errors) ==== ++ export const Comp = () =>

; ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts.diff new file mode 100644 index 0000000000000..75e7c5f6e7615 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts.diff @@ -0,0 +1,84 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne.tsx] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,74 @@ + + + //// [/index.d.ts] +-export declare const Comp: () => import("@emotion/react/jsx-runtime").JSX.Element; ++export declare const Comp: invalid; ++/// [Errors] //// ++ ++/index.tsx(1,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== /node_modules/react/index.d.ts (0 errors) ==== ++ export = React; ++ export as namespace React; ++ ++ declare namespace React {} ++ ++ declare global { ++ namespace JSX { ++ interface Element {} ++ interface ElementClass {} ++ interface ElementAttributesProperty {} ++ interface ElementChildrenAttribute {} ++ type LibraryManagedAttributes = {} ++ interface IntrinsicAttributes {} ++ interface IntrinsicClassAttributes {} ++ interface IntrinsicElements { ++ div: {} ++ } ++ } ++ } ++==== /node_modules/@emotion/react/jsx-runtime/index.d.ts (0 errors) ==== ++ export { EmotionJSX as JSX } from './jsx-namespace' ++ ++==== /node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts (0 errors) ==== ++ import 'react' ++ ++ type WithConditionalCSSProp

= 'className' extends keyof P ++ ? (P extends { className?: string } ? P & { css?: string } : P) ++ : P ++ ++ type ReactJSXElement = JSX.Element ++ type ReactJSXElementClass = JSX.ElementClass ++ type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty ++ type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute ++ type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes ++ type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes ++ type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes ++ type ReactJSXIntrinsicElements = JSX.IntrinsicElements ++ ++ export namespace EmotionJSX { ++ interface Element extends ReactJSXElement {} ++ interface ElementClass extends ReactJSXElementClass {} ++ interface ElementAttributesProperty ++ extends ReactJSXElementAttributesProperty {} ++ interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute {} ++ ++ type LibraryManagedAttributes = WithConditionalCSSProp

& ++ ReactJSXLibraryManagedAttributes ++ ++ interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes {} ++ interface IntrinsicClassAttributes ++ extends ReactJSXIntrinsicClassAttributes {} ++ ++ type IntrinsicElements = { ++ [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { ++ css?: string ++ } ++ } ++ } ++ ++==== /index.tsx (1 errors) ==== ++ export const Comp = () =>

; ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts.diff new file mode 100644 index 0000000000000..75e7c5f6e7615 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts.diff @@ -0,0 +1,84 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne.tsx] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,74 @@ + + + //// [/index.d.ts] +-export declare const Comp: () => import("@emotion/react/jsx-runtime").JSX.Element; ++export declare const Comp: invalid; ++/// [Errors] //// ++ ++/index.tsx(1,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== /node_modules/react/index.d.ts (0 errors) ==== ++ export = React; ++ export as namespace React; ++ ++ declare namespace React {} ++ ++ declare global { ++ namespace JSX { ++ interface Element {} ++ interface ElementClass {} ++ interface ElementAttributesProperty {} ++ interface ElementChildrenAttribute {} ++ type LibraryManagedAttributes = {} ++ interface IntrinsicAttributes {} ++ interface IntrinsicClassAttributes {} ++ interface IntrinsicElements { ++ div: {} ++ } ++ } ++ } ++==== /node_modules/@emotion/react/jsx-runtime/index.d.ts (0 errors) ==== ++ export { EmotionJSX as JSX } from './jsx-namespace' ++ ++==== /node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts (0 errors) ==== ++ import 'react' ++ ++ type WithConditionalCSSProp

= 'className' extends keyof P ++ ? (P extends { className?: string } ? P & { css?: string } : P) ++ : P ++ ++ type ReactJSXElement = JSX.Element ++ type ReactJSXElementClass = JSX.ElementClass ++ type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty ++ type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute ++ type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes ++ type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes ++ type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes ++ type ReactJSXIntrinsicElements = JSX.IntrinsicElements ++ ++ export namespace EmotionJSX { ++ interface Element extends ReactJSXElement {} ++ interface ElementClass extends ReactJSXElementClass {} ++ interface ElementAttributesProperty ++ extends ReactJSXElementAttributesProperty {} ++ interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute {} ++ ++ type LibraryManagedAttributes = WithConditionalCSSProp

& ++ ReactJSXLibraryManagedAttributes ++ ++ interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes {} ++ interface IntrinsicClassAttributes ++ extends ReactJSXIntrinsicClassAttributes {} ++ ++ type IntrinsicElements = { ++ [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { ++ css?: string ++ } ++ } ++ } ++ ++==== /index.tsx (1 errors) ==== ++ export const Comp = () =>

; ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts.diff new file mode 100644 index 0000000000000..81fbe031b08d6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts.diff @@ -0,0 +1,85 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.tsx] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,75 @@ + + + //// [/index.d.ts] +-export declare const Comp: () => import("@emotion/react/jsx-runtime").JSX.Element; ++export declare const Comp: invalid; ++/// [Errors] //// ++ ++/index.tsx(2,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== /node_modules/react/index.d.ts (0 errors) ==== ++ export = React; ++ export as namespace React; ++ ++ declare namespace React { } ++ ++ declare global { ++ namespace JSX { ++ interface Element { } ++ interface ElementClass { } ++ interface ElementAttributesProperty { } ++ interface ElementChildrenAttribute { } ++ type LibraryManagedAttributes = {} ++ interface IntrinsicAttributes { } ++ interface IntrinsicClassAttributes { } ++ interface IntrinsicElements { ++ div: {} ++ } ++ } ++ } ++==== /node_modules/@emotion/react/jsx-runtime/index.d.ts (0 errors) ==== ++ export { EmotionJSX as JSX } from './jsx-namespace' ++ ++==== /node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts (0 errors) ==== ++ import 'react' ++ ++ type WithConditionalCSSProp

= 'className' extends keyof P ++ ? (P extends { className?: string } ? P & { css?: string } : P) ++ : P ++ ++ type ReactJSXElement = JSX.Element ++ type ReactJSXElementClass = JSX.ElementClass ++ type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty ++ type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute ++ type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes ++ type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes ++ type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes ++ type ReactJSXIntrinsicElements = JSX.IntrinsicElements ++ ++ export namespace EmotionJSX { ++ interface Element extends ReactJSXElement { } ++ interface ElementClass extends ReactJSXElementClass { } ++ interface ElementAttributesProperty ++ extends ReactJSXElementAttributesProperty { } ++ interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute { } ++ ++ type LibraryManagedAttributes = WithConditionalCSSProp

& ++ ReactJSXLibraryManagedAttributes ++ ++ interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes { } ++ interface IntrinsicClassAttributes ++ extends ReactJSXIntrinsicClassAttributes { } ++ ++ type IntrinsicElements = { ++ [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { ++ css?: string ++ } ++ } ++ } ++ ++==== /index.tsx (1 errors) ==== ++ /* @jsxImportSource @emotion/react */ ++ export const Comp = () =>

; ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ +\ No newline at end of file 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..7da43b7419eb6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/lateBoundFunctionMemberAssignmentDeclarations.d.ts.diff @@ -0,0 +1,31 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/lateBoundFunctionMemberAssignmentDeclarations.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,7 +1,19 @@ + + + //// [/.src/index.d.ts] + export declare function foo(): void; +-export declare namespace foo { +- var bar: number; +-} ++/// [Errors] //// ++ ++index.ts(1,17): error TS9009: 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 (1 errors) ==== ++ export function foo(): void {} ++ ~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ foo.bar = 12; ++ const _private = Symbol(); ++ foo[_private] = "ok"; ++ ++ const x: string = foo[_private]; ++ +\ No newline at end of file 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..8f3002b288df3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts.diff @@ -0,0 +1,51 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,41 @@ + + + //// [/.src/index.d.ts] +-export declare const a: () => Promise; ++export declare const a: invalid; ++/// [Errors] //// ++ ++index.ts(1,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== index.ts (1 errors) ==== ++ export const a = async () => (await import("inner")).x(); ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++==== 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/mergedDeclarations2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedDeclarations2.d.ts.diff new file mode 100644 index 0000000000000..b17b7bdd65a3a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedDeclarations2.d.ts.diff @@ -0,0 +1,37 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/mergedDeclarations2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,24 +4,27 @@ + declare enum Foo { + b = 0 + } + declare enum Foo { +- a = 0 ++ a + } + declare namespace Foo { + var x: any; + } + /// [Errors] //// + ++mergedDeclarations2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + mergedDeclarations2.ts(9,25): error TS2304: Cannot find name 'b'. + + +-==== mergedDeclarations2.ts (1 errors) ==== ++==== mergedDeclarations2.ts (2 errors) ==== + enum Foo { + b + } + enum Foo { + a = b ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + module Foo { + export var x: any = b diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedEnumDeclarationCodeGen.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedEnumDeclarationCodeGen.d.ts.diff new file mode 100644 index 0000000000000..1d2c73ae0b439 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedEnumDeclarationCodeGen.d.ts.diff @@ -0,0 +1,34 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/mergedEnumDeclarationCodeGen.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,6 +5,24 @@ + a = 0, + b = 0 + } + declare enum E { +- c = 0 ++ c + } ++/// [Errors] //// ++ ++mergedEnumDeclarationCodeGen.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++mergedEnumDeclarationCodeGen.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== mergedEnumDeclarationCodeGen.ts (2 errors) ==== ++ enum E { ++ a, ++ b = a ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ enum E { ++ c = a ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/methodContainingLocalFunction.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/methodContainingLocalFunction.d.ts.diff new file mode 100644 index 0000000000000..2fff9bb66ba6f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/methodContainingLocalFunction.d.ts.diff @@ -0,0 +1,71 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/methodContainingLocalFunction.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -18,4 +18,62 @@ + } + declare enum E { + A + } ++/// [Errors] //// ++ ++methodContainingLocalFunction.ts(44,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== methodContainingLocalFunction.ts (1 errors) ==== ++ // The first case here (BugExhibition) caused a crash. Try with different permutations of features. ++ class BugExhibition { ++ public exhibitBug(): void { ++ function localFunction() { } ++ var x: { (): void; }; ++ x = localFunction; ++ } ++ } ++ ++ class BugExhibition2 { ++ private static get exhibitBug() { ++ function localFunction() { } ++ var x: { (): void; }; ++ x = localFunction; ++ return null; ++ } ++ } ++ ++ class BugExhibition3 { ++ public exhibitBug(): void { ++ function localGenericFunction(u?: U) { } ++ var x: { (): void; }; ++ x = localGenericFunction; ++ } ++ } ++ ++ class C { ++ exhibit(): void { ++ var funcExpr = (u?: U) => { }; ++ var x: { (): void; }; ++ x = funcExpr; ++ } ++ } ++ ++ module M { ++ export function exhibitBug(): void { ++ function localFunction() { } ++ var x: { (): void; }; ++ x = localFunction; ++ } ++ } ++ ++ enum E { ++ A = (() => { ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ function localFunction() { } ++ var x: { (): void; }; ++ x = localFunction; ++ return 0; ++ })() ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mixedTypeEnumComparison.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mixedTypeEnumComparison.d.ts.diff new file mode 100644 index 0000000000000..fdba5f9d12e0b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mixedTypeEnumComparison.d.ts.diff @@ -0,0 +1,60 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/mixedTypeEnumComparison.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -15,4 +15,51 @@ + S1 = "foo", + N1 = 1000, + C1 + } ++/// [Errors] //// ++ ++mixedTypeEnumComparison.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== mixedTypeEnumComparison.ts (1 errors) ==== ++ const enum E { ++ S1 = "foo", ++ S2 = "bar", ++ ++ N1 = 1000, ++ N2 = 25, ++ } ++ ++ declare var someNumber: number ++ ++ if (someNumber > E.N2) { ++ someNumber = E.N2; ++ } ++ ++ declare const unionOfEnum: E.N1 | E.N2; ++ ++ if (someNumber > unionOfEnum) { ++ someNumber = E.N2; ++ } ++ ++ declare var someString: string ++ ++ if (someString > E.S1) { ++ someString = E.S2; ++ } ++ ++ ++ declare function someValue(): number; ++ ++ enum E2 { ++ S1 = "foo", ++ N1 = 1000, ++ C1 = someValue(), ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ ++ someString > E2.S1; ++ someNumber > E2.N1; ++ someNumber > E2.C1; ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationDisallowedExtensions.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationDisallowedExtensions.d.ts.diff new file mode 100644 index 0000000000000..f6b65734fd074 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationDisallowedExtensions.d.ts.diff @@ -0,0 +1,65 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/moduleAugmentationDisallowedExtensions.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -19,9 +19,9 @@ + declare module "./observable" { + var x: number; + let y: number; + const z: number; +- let x1: number, y1: string, n: number, el1: number, el2: number, el3: number; ++ let x1: invalid, y1: invalid, n: invalid, el1: invalid, el2: invalid, el3: invalid; + interface A { + x: any; + } + namespace N { +@@ -43,8 +43,14 @@ + //// [/.src/x0.d.ts] + export declare let a: number; + /// [Errors] //// + ++x.ts(9,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++x.ts(9,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++x.ts(9,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++x.ts(9,38): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++x.ts(9,43): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++x.ts(9,48): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + x.ts(17,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. + x.ts(17,26): error TS2307: Cannot find module './x0' or its corresponding type declarations. + x.ts(18,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. + x.ts(18,21): error TS2307: Cannot find module './x0' or its corresponding type declarations. +@@ -57,9 +63,9 @@ + + ==== x0.ts (0 errors) ==== + export let a = 1; + +-==== x.ts (9 errors) ==== ++==== x.ts (15 errors) ==== + namespace N1 { + export let x = 1; + } + +@@ -67,8 +73,20 @@ + var x: number; + let y: number; + const z: number; + let {x1, y1, z0: {n}, z1: {arr: [el1, el2, el3]}}: {x1: number, y1: string, z0: {n: number}, z1: {arr: number[]} } ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + interface A { x } + namespace N { + export class C {} + } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationNoNewNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationNoNewNames.d.ts.diff new file mode 100644 index 0000000000000..d4e4ca8825da3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationNoNewNames.d.ts.diff @@ -0,0 +1,59 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/moduleAugmentationNoNewNames.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -10,13 +10,49 @@ + } + class Bar { + } + let y: number, z: string; +- let x: number, x1: number; ++ let x: invalid, x1: invalid; + namespace Z { } + } + export {}; + + //// [/.src/observable.d.ts] + export declare class Observable { + filter(pred: (e: T) => boolean): Observable; + } ++/// [Errors] //// ++ ++map.ts(11,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++map.ts(11,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== map.ts (2 errors) ==== ++ import { Observable } from "./observable" ++ ++ (Observable.prototype).map = function() { } ++ ++ declare module "./observable" { ++ interface Observable { ++ map(proj: (e:T) => U): Observable ++ } ++ class Bar {} ++ let y: number, z: string; ++ let {a: x, b: x1}: {a: number, b: number}; ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ module Z {} ++ } ++ ++==== observable.ts (0 errors) ==== ++ export declare class Observable { ++ filter(pred: (e:T) => boolean): Observable; ++ } ++ ++==== main.ts (0 errors) ==== ++ import { Observable } from "./observable" ++ import "./map"; ++ ++ let x: Observable; ++ let y = x.map(x => x + 1); +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/negateOperatorInvalidOperations.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/negateOperatorInvalidOperations.d.ts.diff new file mode 100644 index 0000000000000..968417e90b43c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/negateOperatorInvalidOperations.d.ts.diff @@ -0,0 +1,43 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,15 +1,16 @@ + + + //// [/.src/negateOperatorInvalidOperations.d.ts] +-declare var NUMBER1: any; ++declare var NUMBER1: invalid; + declare var NUMBER: any; + declare var NUMBER2: number; + declare var NUMBER3: number; + declare var NUMBER4: number; +-declare var NUMBER: any; ++declare var NUMBER: number; + /// [Errors] //// + ++negateOperatorInvalidOperations.ts(4,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + negateOperatorInvalidOperations.ts(4,15): error TS1109: Expression expected. + negateOperatorInvalidOperations.ts(4,30): error TS1005: ',' expected. + negateOperatorInvalidOperations.ts(4,31): error TS1109: Expression expected. + negateOperatorInvalidOperations.ts(7,17): error TS18050: The value 'null' cannot be used here. +@@ -21,13 +22,15 @@ + negateOperatorInvalidOperations.ts(12,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'NUMBER' must be of type 'any', but here has type 'number'. + negateOperatorInvalidOperations.ts(12,14): error TS1109: Expression expected. + + +-==== negateOperatorInvalidOperations.ts (11 errors) ==== ++==== negateOperatorInvalidOperations.ts (12 errors) ==== + // Unary operator - + + // operand before - + var NUMBER1 = var NUMBER: any-; //expect error ++ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ + !!! error TS1109: Expression expected. + ~ + !!! error TS1005: ',' expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/newTargetNarrowing.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/newTargetNarrowing.d.ts.diff new file mode 100644 index 0000000000000..46b847717d488 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/newTargetNarrowing.d.ts.diff @@ -0,0 +1,34 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/newTarget/newTargetNarrowing.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,7 +2,22 @@ + + //// [/.src/newTargetNarrowing.d.ts] + declare function foo(x: true): void; + declare function f(): void; +-declare namespace f { +- var marked: boolean; +-} ++/// [Errors] //// ++ ++newTargetNarrowing.ts(3,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ ++==== newTargetNarrowing.ts (1 errors) ==== ++ function foo(x: true): void { } ++ ++ function f(): void { ++ ~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ if (new.target.marked === true) { ++ foo(new.target.marked); ++ } ++ } ++ ++ f.marked = true; ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/noImplicitAnyDestructuringVarDeclaration.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/noImplicitAnyDestructuringVarDeclaration.d.ts.diff new file mode 100644 index 0000000000000..08fd684527084 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/noImplicitAnyDestructuringVarDeclaration.d.ts.diff @@ -0,0 +1,98 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,11 +1,11 @@ + + + //// [/.src/noImplicitAnyDestructuringVarDeclaration.d.ts] +-declare var a: any, b: any, c: any, d: any; +-declare var a1: any, b1: any, c1: any, d1: any; +-declare var a2: any, b2: any, c2: any, d2: any; +-declare var b3: any, c3: { ++declare var a: invalid, b: invalid, c: any, d: any; ++declare var a1: invalid, b1: invalid, c1: any, d1: any; ++declare var a2: invalid, b2: invalid, c2: any, d2: any; ++declare var b3: invalid, c3: { + b3: any; + }; + declare const dest: any[]; + declare const a4: any; +@@ -20,52 +20,73 @@ + /// [Errors] //// + + noImplicitAnyDestructuringVarDeclaration.ts(1,5): error TS1182: A destructuring declaration must have an initializer. + noImplicitAnyDestructuringVarDeclaration.ts(1,6): error TS7031: Binding element 'a' implicitly has an 'any' type. ++noImplicitAnyDestructuringVarDeclaration.ts(1,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + noImplicitAnyDestructuringVarDeclaration.ts(1,10): error TS1182: A destructuring declaration must have an initializer. + noImplicitAnyDestructuringVarDeclaration.ts(1,11): error TS7031: Binding element 'b' implicitly has an 'any' type. ++noImplicitAnyDestructuringVarDeclaration.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + noImplicitAnyDestructuringVarDeclaration.ts(3,5): error TS1182: A destructuring declaration must have an initializer. + noImplicitAnyDestructuringVarDeclaration.ts(3,6): error TS7031: Binding element 'a1' implicitly has an 'any' type. ++noImplicitAnyDestructuringVarDeclaration.ts(3,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + noImplicitAnyDestructuringVarDeclaration.ts(3,23): error TS1182: A destructuring declaration must have an initializer. + noImplicitAnyDestructuringVarDeclaration.ts(3,24): error TS7031: Binding element 'b1' implicitly has an 'any' type. ++noImplicitAnyDestructuringVarDeclaration.ts(3,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + noImplicitAnyDestructuringVarDeclaration.ts(5,5): error TS1182: A destructuring declaration must have an initializer. ++noImplicitAnyDestructuringVarDeclaration.ts(5,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + noImplicitAnyDestructuringVarDeclaration.ts(5,18): error TS1182: A destructuring declaration must have an initializer. ++noImplicitAnyDestructuringVarDeclaration.ts(5,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + noImplicitAnyDestructuringVarDeclaration.ts(7,5): error TS1182: A destructuring declaration must have an initializer. ++noImplicitAnyDestructuringVarDeclaration.ts(7,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + noImplicitAnyDestructuringVarDeclaration.ts(7,13): error TS7008: Member 'b3' implicitly has an 'any' type. + noImplicitAnyDestructuringVarDeclaration.ts(7,25): error TS7008: Member 'b3' implicitly has an 'any' type. + noImplicitAnyDestructuringVarDeclaration.ts(11,18): error TS7018: Object literal's property 'b4' implicitly has an 'any' type. + + +-==== noImplicitAnyDestructuringVarDeclaration.ts (14 errors) ==== ++==== noImplicitAnyDestructuringVarDeclaration.ts (21 errors) ==== + var [a], {b}, c: any, d: any; // error + ~~~ + !!! error TS1182: A destructuring declaration must have an initializer. + ~ + !!! error TS7031: Binding element 'a' implicitly has an 'any' type. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ + !!! error TS1182: A destructuring declaration must have an initializer. + ~ + !!! error TS7031: Binding element 'b' implicitly has an 'any' type. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + var [a1 = undefined], {b1 = null}, c1 = undefined, d1 = null; // error + ~~~~~~~~~~~~~~~~ + !!! error TS1182: A destructuring declaration must have an initializer. + ~~ + !!! error TS7031: Binding element 'a1' implicitly has an 'any' type. ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~ + !!! error TS1182: A destructuring declaration must have an initializer. + ~~ + !!! error TS7031: Binding element 'b1' implicitly has an 'any' type. ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + var [a2]: [any], {b2}: { b2: any }, c2: any, d2: any; + ~~~~ + !!! error TS1182: A destructuring declaration must have an initializer. ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ + !!! error TS1182: A destructuring declaration must have an initializer. ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + var {b3}: { b3 }, c3: { b3 }; // error in type instead + ~~~~ + !!! error TS1182: A destructuring declaration must have an initializer. ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ + !!! error TS7008: Member 'b3' implicitly has an 'any' type. + ~~ + !!! error TS7008: Member 'b3' implicitly has an 'any' type. 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..7721a91eea2d4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModuleReexportFromDottedPath.d.ts.diff @@ -0,0 +1,41 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/nodeModuleReexportFromDottedPath.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,30 @@ + + + //// [/index.d.ts] +-import { PrismaClient } from "@prisma/client"; +-declare const _default: PrismaClient; ++declare const _default: invalid; + export default _default; ++/// [Errors] //// ++ ++/index.ts(4,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ +\ No newline at end of file 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..572c367ca78c8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsBlocksSpecifierResolution(module=node16).d.ts.diff @@ -0,0 +1,39 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,26 +1,29 @@ + + + //// [/.src/index.d.ts] +-export declare const a: any; ++export declare const a: invalid; + /// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! 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..572c367ca78c8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsBlocksSpecifierResolution(module=nodenext).d.ts.diff @@ -0,0 +1,39 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,26 +1,29 @@ + + + //// [/.src/index.d.ts] +-export declare const a: any; ++export declare const a: invalid; + /// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! 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..fe8ec26a19d1d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSourceTs(module=node16).d.ts.diff @@ -0,0 +1,43 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/node/nodeModulesExportsSourceTs.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,8 @@ + + + //// [/.src/index.d.ts] +-export declare const a: any; ++export declare const a: invalid; + + //// [/.src/node_modules/inner/index.d.ts] + export { x } from "./other.js"; + +@@ -14,21 +14,24 @@ + + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! 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..fe8ec26a19d1d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSourceTs(module=nodenext).d.ts.diff @@ -0,0 +1,43 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/node/nodeModulesExportsSourceTs.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,8 @@ + + + //// [/.src/index.d.ts] +-export declare const a: any; ++export declare const a: invalid; + + //// [/.src/node_modules/inner/index.d.ts] + export { x } from "./other.js"; + +@@ -14,21 +14,24 @@ + + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! 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..b86a07cfdd13b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationConditions(module=node16).d.ts.diff @@ -0,0 +1,36 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,23 +1,26 @@ + + + //// [/.src/index.d.ts] +-export declare const a: import("inner/other").Thing; ++export declare const a: invalid; + /// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! 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..b86a07cfdd13b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationConditions(module=nodenext).d.ts.diff @@ -0,0 +1,36 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,23 +1,26 @@ + + + //// [/.src/index.d.ts] +-export declare const a: import("inner/other").Thing; ++export declare const a: invalid; + /// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! 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..3a3655739be5d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationDirectory(module=node16).d.ts.diff @@ -0,0 +1,36 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,23 +1,26 @@ + + + //// [/.src/index.d.ts] +-export declare const a: import("inner/other.js").Thing; ++export declare const a: invalid; + /// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! 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..3a3655739be5d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationDirectory(module=nodenext).d.ts.diff @@ -0,0 +1,36 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,23 +1,26 @@ + + + //// [/.src/index.d.ts] +-export declare const a: import("inner/other.js").Thing; ++export declare const a: invalid; + /// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! 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..550bed5da943b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationPattern(module=node16).d.ts.diff @@ -0,0 +1,36 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,23 +1,26 @@ + + + //// [/.src/index.d.ts] +-export declare const a: import("inner/other.js").Thing; ++export declare const a: invalid; + /// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! 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..550bed5da943b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesExportsSpecifierGenerationPattern(module=nodenext).d.ts.diff @@ -0,0 +1,36 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,23 +1,26 @@ + + + //// [/.src/index.d.ts] +-export declare const a: import("inner/other.js").Thing; ++export declare const a: invalid; + /// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! 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/nullPropertyName.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nullPropertyName.d.ts.diff new file mode 100644 index 0000000000000..ff41c65d8f04a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nullPropertyName.d.ts.diff @@ -0,0 +1,185 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/declarationEmit/nullPropertyName.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,85 +1,95 @@ + + + //// [/.src/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 }; +-} ++/// [Errors] //// ++ ++nullPropertyName.ts(1,10): error TS9009: 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 (1 errors) ==== ++ function foo(): void {} ++ ~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ // 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; ++ +\ 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..428e97077ecad --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/numericEnumMappedType.d.ts.diff @@ -0,0 +1,67 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/numericEnumMappedType.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -39,4 +39,58 @@ + THREE = "x" + } + declare const e: E; + declare const x: E.ONE; ++/// [Errors] //// ++ ++numericEnumMappedType.ts(25,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++numericEnumMappedType.ts(25,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++numericEnumMappedType.ts(26,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++numericEnumMappedType.ts(26,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ enum N2 { C = val(), D = val() } ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ 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/objectLiteralGettersAndSetters.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/objectLiteralGettersAndSetters.d.ts.diff new file mode 100644 index 0000000000000..98bf4f7ceac76 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/objectLiteralGettersAndSetters.d.ts.diff @@ -0,0 +1,178 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -37,21 +37,21 @@ + declare var callSig3: { + num: (n: number) => string; + }; + declare var getter1: { +- readonly x: string; ++ x: string; + }; + declare var getter1: { + readonly x: string; + }; + declare var getter2: { +- readonly x: string; ++ x: string; + }; + declare var getter2: { + readonly x: string; + }; + declare var setter1: { +- x: number; ++ readonly x: number; + }; + declare var setter1: { + x: number; + }; +@@ -73,20 +73,137 @@ + }; + declare var sameType4: { + x: Date; + }; +-declare var setParamType1: { +- get n(): (t: string) => void; +- set n(x: (t: string) => void); +-}; ++declare var setParamType1: invalid; + declare var setParamType2: { + n: (t: string) => void; + }; +-declare var getParamType1: { +- n: string; +-}; ++declare var getParamType1: invalid; + declare var getParamType2: { + n: string; + }; + declare var getParamType3: { + n: string; + }; ++/// [Errors] //// ++ ++objectLiteralGettersAndSetters.ts(65,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++objectLiteralGettersAndSetters.ts(88,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== objectLiteralGettersAndSetters.ts (2 errors) ==== ++ // Get and set accessor with the same name ++ var sameName1a: { ++ a: string; ++ } = { get 'a'(): string { return ''; }, set a(n) { var p = n; var p: string; } }; ++ var sameName2a: { ++ 0: string; ++ } = { get 0.0(): string { return ''; }, set 0(n) { var p = n; var p: string; } }; ++ var sameName3a: { ++ 32: string; ++ } = { get 0x20(): string { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; ++ var sameName4a: { ++ "": string; ++ } = { get ''(): string { return ''; }, set ""(n) { var p = n; var p: string; } }; ++ var sameName5a: { ++ '\t': string; ++ } = { get '\t'(): string { return ''; }, set '\t'(n) { var p = n; var p: string; } }; ++ var sameName6a: { ++ a: string; ++ } = { get 'a'(): string { return ''; }, set a(n) { var p = n; var p: string; } }; ++ ++ // PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} ++ var callSig1 = { num(n: number): string { return '' } }; ++ var callSig1: { num: (n: number) => string; }; ++ var callSig2 = { num: function (n: number): string { return '' } }; ++ var callSig2: { num: (n: number) => string; }; ++ var callSig3 = { num: (n: number): string => '' }; ++ var callSig3: { num: (n: number) => string; }; ++ ++ // Get accessor only, type of the property is the annotated return type of the get accessor ++ var getter1 = { get x(): string { return undefined; } }; ++ var getter1: { readonly x: string; } ++ ++ // Get accessor only, type of the property is the inferred return type of the get accessor ++ var getter2 = { get x(): string { return ''; } }; ++ var getter2: { readonly x: string; } ++ ++ // Set accessor only, type of the property is the param type of the set accessor ++ var setter1 = { set x(n: number) { } }; ++ var setter1: { x: number }; ++ ++ // Set accessor only, type of the property is Any for an unannotated set accessor ++ var setter2: { ++ x: any; ++ } = { set x(n) { } }; ++ var setter2: { x: any }; ++ ++ var anyVar: any; ++ // Get and set accessor with matching type annotations ++ var sameType1: { ++ x: string; ++ } = { get x(): string { return undefined; }, set x(n: string) { } }; ++ var sameType2: { ++ x: number[]; ++ } = { get x(): Array { return undefined; }, set x(n: number[]) { } }; ++ var sameType3: { ++ x: any; ++ } = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; ++ var sameType4: { ++ x: Date; ++ } = { get x(): Date { return undefined; }, set x(n: Date) { } }; ++ ++ // Type of unannotated get accessor return type is the type annotation of the set accessor param ++ var setParamType1 = { ++ set n(x: (t: string) => void) { }, ++ get n(): (t: string) => void { return (t) => { ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ var p: string; ++ var p = t; ++ } ++ } ++ }; ++ var setParamType2: { ++ n: (t: string) => void; ++ } = { ++ get n() { return (t) => { ++ var p: string; ++ var p = t; ++ } ++ }, ++ set n(x: (t: string) => void) { } ++ }; ++ ++ // Type of unannotated set accessor parameter is the return type annotation of the get accessor ++ var getParamType1 = { ++ set n(x) { ++ var y = x; ++ var y: string; ++ }, ++ get n(): string { return ''; } ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ }; ++ var getParamType2: { ++ n: string; ++ } = { ++ get n(): string { return ''; }, ++ set n(x) { ++ var y = x; ++ var y: string; ++ } ++ }; ++ ++ // Type of unannotated accessors is the inferred return type of the get accessor ++ var getParamType3: { ++ n: string; ++ } = { ++ get n(): string { return ''; }, ++ set n(x) { ++ var y = x; ++ var y: string; ++ } ++ }; ++ ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/overloadingStaticFunctionsInFunctions.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/overloadingStaticFunctionsInFunctions.d.ts.diff new file mode 100644 index 0000000000000..a00abcd27420a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/overloadingStaticFunctionsInFunctions.d.ts.diff @@ -0,0 +1,34 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,10 +1,11 @@ + + + //// [/.src/overloadingStaticFunctionsInFunctions.d.ts] +-declare function boo(): void; ++declare function boo(): invalid; + /// [Errors] //// + ++overloadingStaticFunctionsInFunctions.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + overloadingStaticFunctionsInFunctions.ts(1,14): error TS1005: '(' expected. + overloadingStaticFunctionsInFunctions.ts(2,3): error TS1128: Declaration or statement expected. + overloadingStaticFunctionsInFunctions.ts(2,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. + overloadingStaticFunctionsInFunctions.ts(3,3): error TS1128: Declaration or statement expected. +@@ -19,10 +20,12 @@ + overloadingStaticFunctionsInFunctions.ts(4,21): error TS2693: 'any' only refers to a type, but is being used as a value here. + overloadingStaticFunctionsInFunctions.ts(4,25): error TS1005: ';' expected. + + +-==== overloadingStaticFunctionsInFunctions.ts (14 errors) ==== ++==== overloadingStaticFunctionsInFunctions.ts (15 errors) ==== + function boo { ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1005: '(' expected. + static test() + ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.classMethods.es2018.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.classMethods.es2018.d.ts.diff new file mode 100644 index 0000000000000..7c2a6e991078c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.classMethods.es2018.d.ts.diff @@ -0,0 +1,93 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.classMethods.es2018.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,21 +1,21 @@ + + + //// [/.src/asyncGeneratorGetAccessorIsError.d.ts] + declare class C23 { +- get(): any; ++ get(): invalid; + x(): number; + } + + //// [/.src/asyncGeneratorPropertyIsError.d.ts] + declare class C25 { +- x(): any; ++ x(): invalid; + 1: any; + } + + //// [/.src/asyncGeneratorSetAccessorIsError.d.ts] + declare class C24 { +- set(): any; ++ set(): invalid; + x(value: number): void; + } + + //// [/.src/awaitAsTypeIsOk.d.ts] +@@ -88,8 +88,9 @@ + } + + //// [/.src/yieldInClassComputedPropertyIsError.d.ts] + declare class C21 { ++ [yield](): AsyncGenerator; + } + + //// [/.src/yieldInNestedComputedPropertyIsOk.d.ts] + declare class C22 { +@@ -131,10 +132,13 @@ + f(): AsyncGenerator; + } + /// [Errors] //// + ++asyncGeneratorGetAccessorIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. ++asyncGeneratorPropertyIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + asyncGeneratorPropertyIsError.ts(2,15): error TS1005: '(' expected. ++asyncGeneratorSetAccessorIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected. + awaitInParameterInitializerIsError.ts(2,27): error TS2524: 'await' expressions cannot be used in a parameter initializer. + awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected. + awaitParameterIsError.ts(2,15): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +@@ -312,26 +316,32 @@ + ~~~~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } + } +-==== asyncGeneratorGetAccessorIsError.ts (1 errors) ==== ++==== asyncGeneratorGetAccessorIsError.ts (2 errors) ==== + class C23 { + async * get x(): number { ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1005: '(' expected. + return 1; + } + } +-==== asyncGeneratorSetAccessorIsError.ts (1 errors) ==== ++==== asyncGeneratorSetAccessorIsError.ts (2 errors) ==== + class C24 { + async * set x(value: number): void { ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1005: '(' expected. + } + } +-==== asyncGeneratorPropertyIsError.ts (1 errors) ==== ++==== asyncGeneratorPropertyIsError.ts (2 errors) ==== + class C25 { + async * x = 1: any; ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1005: '(' expected. + } + +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts.diff new file mode 100644 index 0000000000000..c15c914745b28 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts.diff @@ -0,0 +1,71 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.es2018.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,22 +1,16 @@ + + + //// [/.src/asyncGeneratorGetAccessorIsError.d.ts] +-declare const o22: { +- get(): any; +- x(): number; +-}; ++declare const o22: invalid; + + //// [/.src/asyncGeneratorPropertyIsError.d.ts] + declare const o24: { + x(): 1; + }; + + //// [/.src/asyncGeneratorSetAccessorIsError.d.ts] +-declare const o23: { +- set(): any; +- x(value: number): void; +-}; ++declare const o23: invalid; + + //// [/.src/awaitAsTypeIsOk.d.ts] + interface await { + } +@@ -126,10 +120,12 @@ + f(): AsyncGenerator; + }; + /// [Errors] //// + ++asyncGeneratorGetAccessorIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. + asyncGeneratorPropertyIsError.ts(2,14): error TS1005: '(' expected. ++asyncGeneratorSetAccessorIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected. + awaitInParameterInitializerIsError.ts(2,27): error TS2524: 'await' expressions cannot be used in a parameter initializer. + awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected. + awaitParameterIsError.ts(2,15): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +@@ -293,19 +289,23 @@ + ~~~~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } + }; +-==== asyncGeneratorGetAccessorIsError.ts (1 errors) ==== ++==== asyncGeneratorGetAccessorIsError.ts (2 errors) ==== + const o22 = { + async * get x(): number { ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1005: '(' expected. + return 1; + } + }; +-==== asyncGeneratorSetAccessorIsError.ts (1 errors) ==== ++==== asyncGeneratorSetAccessorIsError.ts (2 errors) ==== + const o23 = { + async * set x(value: number): void { ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1005: '(' expected. + } + }; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum1.d.ts.diff new file mode 100644 index 0000000000000..2525475ef7730 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum1.d.ts.diff @@ -0,0 +1,30 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,4 +6,21 @@ + IsIndexer = 1, + IsStringIndexer = 2, + IsNumberIndexer = 4 + } ++/// [Errors] //// ++ ++parserEnum1.ts(4,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserEnum1.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== parserEnum1.ts (2 errors) ==== ++ export enum SignatureFlags { ++ None = 0, ++ IsIndexer = 1, ++ IsStringIndexer = 1 << 1, ++ ~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ IsNumberIndexer = 1 << 2, ++ ~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum2.d.ts.diff new file mode 100644 index 0000000000000..88dfa55378c95 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum2.d.ts.diff @@ -0,0 +1,30 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,4 +6,21 @@ + IsIndexer = 1, + IsStringIndexer = 2, + IsNumberIndexer = 4 + } ++/// [Errors] //// ++ ++parserEnum2.ts(4,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserEnum2.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== parserEnum2.ts (2 errors) ==== ++ export enum SignatureFlags { ++ None = 0, ++ IsIndexer = 1, ++ IsStringIndexer = 1 << 1, ++ ~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ IsNumberIndexer = 1 << 2 ++ ~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnumDeclaration6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnumDeclaration6.d.ts.diff new file mode 100644 index 0000000000000..466de7e17e22e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnumDeclaration6.d.ts.diff @@ -0,0 +1,27 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnumDeclaration6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,4 +6,18 @@ + B = 2, + C = 2, + D = 3 + } ++/// [Errors] //// ++ ++parserEnumDeclaration6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== parserEnumDeclaration6.ts (1 errors) ==== ++ enum E { ++ A = 1, ++ B, ++ C = 1 << 1, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ D, ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction1.d.ts.diff new file mode 100644 index 0000000000000..ca1d0af494d62 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction1.d.ts.diff @@ -0,0 +1,27 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserEqualsGreaterThanAfterFunction1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,13 +1,16 @@ + + + //// [/.src/parserEqualsGreaterThanAfterFunction1.d.ts] +-declare function (): any; ++declare function (): invalid; + /// [Errors] //// + ++parserEqualsGreaterThanAfterFunction1.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserEqualsGreaterThanAfterFunction1.ts(1,10): error TS1003: Identifier expected. + + +-==== parserEqualsGreaterThanAfterFunction1.ts (1 errors) ==== ++==== parserEqualsGreaterThanAfterFunction1.ts (2 errors) ==== + function => ++ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ + !!! error TS1003: Identifier expected. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction2.d.ts.diff new file mode 100644 index 0000000000000..d94e031cb9128 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction2.d.ts.diff @@ -0,0 +1,31 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserEqualsGreaterThanAfterFunction2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,18 +1,21 @@ + + + //// [/.src/parserEqualsGreaterThanAfterFunction2.d.ts] +-declare function (a: any, b: any): any; ++declare function (a: any, b: any): invalid; + /// [Errors] //// + ++parserEqualsGreaterThanAfterFunction2.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserEqualsGreaterThanAfterFunction2.ts(1,10): error TS1003: Identifier expected. + parserEqualsGreaterThanAfterFunction2.ts(1,18): error TS1005: ',' expected. + parserEqualsGreaterThanAfterFunction2.ts(1,27): error TS1005: ',' expected. + parserEqualsGreaterThanAfterFunction2.ts(1,28): error TS1005: ')' expected. + + +-==== parserEqualsGreaterThanAfterFunction2.ts (4 errors) ==== ++==== parserEqualsGreaterThanAfterFunction2.ts (5 errors) ==== + function (a: any => b: any; ++ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1003: Identifier expected. + ~~ + !!! error TS1005: ',' expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList1.d.ts.diff new file mode 100644 index 0000000000000..1328b5e86abb3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList1.d.ts.diff @@ -0,0 +1,32 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ParameterLists/parserErrorRecovery_ParameterList1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,19 +1,22 @@ + + + //// [/.src/parserErrorRecovery_ParameterList1.d.ts] +-declare function f(a: any, {}: {}): any; ++declare function f(a: any, {}: {}): invalid; + /// [Errors] //// + + parserErrorRecovery_ParameterList1.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. ++parserErrorRecovery_ParameterList1.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserErrorRecovery_ParameterList1.ts(1,19): error TS1005: ',' expected. + parserErrorRecovery_ParameterList1.ts(2,6): error TS1005: ')' expected. + + +-==== parserErrorRecovery_ParameterList1.ts (3 errors) ==== ++==== parserErrorRecovery_ParameterList1.ts (4 errors) ==== + function f(a: any { + ~ + !!! error TS2391: Function implementation is missing or not immediately following the declaration. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1005: ',' expected. + }: {} + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList2.d.ts.diff new file mode 100644 index 0000000000000..ae9cfae65dcf6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList2.d.ts.diff @@ -0,0 +1,31 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ParameterLists/parserErrorRecovery_ParameterList2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,17 +1,20 @@ + + + //// [/.src/parserErrorRecovery_ParameterList2.d.ts] +-declare function f(a: any, {}: {}): any; ++declare function f(a: any, {}: {}): invalid; + /// [Errors] //// + + parserErrorRecovery_ParameterList2.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. ++parserErrorRecovery_ParameterList2.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserErrorRecovery_ParameterList2.ts(2,6): error TS1005: ')' expected. + + +-==== parserErrorRecovery_ParameterList2.ts (2 errors) ==== ++==== parserErrorRecovery_ParameterList2.ts (3 errors) ==== + function f(a: any, { + ~ + !!! error TS2391: Function implementation is missing or not immediately following the declaration. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + }: {} + + !!! error TS1005: ')' expected. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserNoASIOnCallAfterFunctionExpression1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserNoASIOnCallAfterFunctionExpression1.d.ts.diff new file mode 100644 index 0000000000000..5a2cf88e4f646 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserNoASIOnCallAfterFunctionExpression1.d.ts.diff @@ -0,0 +1,31 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/parserNoASIOnCallAfterFunctionExpression1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,17 +1,21 @@ + + + //// [/.src/parserNoASIOnCallAfterFunctionExpression1.d.ts] +-declare var x: any; ++declare var x: invalid; + /// [Errors] //// + ++parserNoASIOnCallAfterFunctionExpression1.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserNoASIOnCallAfterFunctionExpression1.ts(2,2): error TS2554: Expected 0 arguments, but got 1. + parserNoASIOnCallAfterFunctionExpression1.ts(2,15): error TS2339: Property 'foo' does not exist on type 'void'. + + +-==== parserNoASIOnCallAfterFunctionExpression1.ts (2 errors) ==== ++==== parserNoASIOnCallAfterFunctionExpression1.ts (3 errors) ==== + var x = function (): void { } ++ ~~~~~~~~~~~~~~~~~~~~~ + (window).foo; ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~ + !!! error TS2554: Expected 0 arguments, but got 1. + ~~~ + !!! error TS2339: Property 'foo' does not exist on type 'void'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource10.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource10.d.ts.diff new file mode 100644 index 0000000000000..8e3494150df52 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource10.d.ts.diff @@ -0,0 +1,80 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -233,16 +233,22 @@ + } + /// [Errors] //// + + parserRealSource10.ts(4,21): error TS6053: File 'typescript.ts' not found. ++parserRealSource10.ts(4,21): error TS9010: Reference directives are not supported in isolated declaration mode. ++parserRealSource10.ts(123,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource10.ts(124,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserRealSource10.ts(127,38): error TS2449: Class 'TokenInfo' used before its declaration. + parserRealSource10.ts(127,48): error TS1011: An element access expression should take an argument. + parserRealSource10.ts(128,41): error TS2693: 'string' only refers to a type, but is being used as a value here. + parserRealSource10.ts(128,48): error TS1011: An element access expression should take an argument. + parserRealSource10.ts(129,46): error TS2693: 'number' only refers to a type, but is being used as a value here. + parserRealSource10.ts(129,53): error TS1011: An element access expression should take an argument. + parserRealSource10.ts(130,40): error TS2693: 'boolean' only refers to a type, but is being used as a value here. + parserRealSource10.ts(130,48): error TS1011: An element access expression should take an argument. ++parserRealSource10.ts(170,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource10.ts(171,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource10.ts(172,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserRealSource10.ts(179,54): error TS2304: Cannot find name 'ErrorRecoverySet'. + parserRealSource10.ts(179,54): error TS4063: Parameter 'ers' of constructor from exported class has or is using private name 'ErrorRecoverySet'. + parserRealSource10.ts(184,28): error TS2304: Cannot find name 'ErrorRecoverySet'. + parserRealSource10.ts(188,34): error TS2304: Cannot find name 'NodeType'. +@@ -578,15 +584,17 @@ + parserRealSource10.ts(356,53): error TS2304: Cannot find name 'NodeType'. + parserRealSource10.ts(449,46): error TS1011: An element access expression should take an argument. + + +-==== parserRealSource10.ts (344 errors) ==== ++==== parserRealSource10.ts (350 errors) ==== + // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. + // See LICENSE.txt in the project root for complete license information. + + /// + ~~~~~~~~~~~~~ + !!! error TS6053: File 'typescript.ts' not found. ++ ~~~~~~~~~~~~~ ++!!! error TS9010: Reference directives are not supported in isolated declaration mode. + + module TypeScript { + export enum TokenID { + // Keywords +@@ -704,9 +712,13 @@ + Whitespace, + Comment, + Lim, + LimFixed = EqualsGreaterThan, ++ ~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + LimKeyword = Yield, ++ ~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export var tokenTable: any = new TokenInfo[]; + ~~~~~~~~~ +@@ -768,10 +780,16 @@ + JavascriptFuture = 2, + TypeScript = 4, + JavascriptFutureStrict = 8, + TypeScriptAndJS = Javascript | TypeScript, ++ ~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + TypeScriptAndJSFuture = JavascriptFuture | TypeScript, ++ ~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + TypeScriptAndJSFutureStrict = JavascriptFutureStrict | TypeScript, ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export class TokenInfo { + constructor (public tokenId: TokenID, public reservation: Reservation, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource14.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource14.d.ts.diff new file mode 100644 index 0000000000000..d42585a583eb9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource14.d.ts.diff @@ -0,0 +1,57 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -84,8 +84,9 @@ + } + /// [Errors] //// + + parserRealSource14.ts(4,21): error TS6053: File 'typescript.ts' not found. ++parserRealSource14.ts(4,21): error TS9010: Reference directives are not supported in isolated declaration mode. + parserRealSource14.ts(24,33): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + parserRealSource14.ts(38,34): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + parserRealSource14.ts(48,37): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + parserRealSource14.ts(68,39): error TS2694: Namespace 'TypeScript' has no exported member 'NodeType'. +@@ -221,8 +222,9 @@ + parserRealSource14.ts(422,30): error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'. + parserRealSource14.ts(427,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + parserRealSource14.ts(428,30): error TS2694: Namespace 'TypeScript' has no exported member 'Block'. + parserRealSource14.ts(432,52): error TS2694: Namespace 'TypeScript' has no exported member 'ASTSpan'. ++parserRealSource14.ts(456,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserRealSource14.ts(462,61): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + parserRealSource14.ts(463,52): error TS2694: Namespace 'TypeScript' has no exported member 'Comment'. + parserRealSource14.ts(478,45): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + parserRealSource14.ts(478,69): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +@@ -247,15 +249,17 @@ + parserRealSource14.ts(565,94): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. + parserRealSource14.ts(572,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. + + +-==== parserRealSource14.ts (162 errors) ==== ++==== parserRealSource14.ts (164 errors) ==== + // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. + // See LICENSE.txt in the project root for complete license information. + + /// + ~~~~~~~~~~~~~ + !!! error TS6053: File 'typescript.ts' not found. ++ ~~~~~~~~~~~~~ ++!!! error TS9010: Reference directives are not supported in isolated declaration mode. + + module TypeScript { + export function lastOf(items: any[]): any { + return (items === null || items.length === 0) ? null : items[items.length - 1]; +@@ -980,8 +984,10 @@ + // the "{" character, meaning we don't traverse the tree down to the stmt list of the class, meaning + // we don't find the "precomment" attached to the errorneous empty stmt. + //TODO: It would be nice to be able to get rid of this. + DontPruneSearchBasedOnPosition = 1 << 1, ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + /// + /// Return the stack of AST nodes containing "position" diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource2.d.ts.diff new file mode 100644 index 0000000000000..a44536d6caa94 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource2.d.ts.diff @@ -0,0 +1,699 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/parserRealSource2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -217,17 +217,167 @@ + } + /// [Errors] //// + + parserRealSource2.ts(4,21): error TS6053: File 'typescript.ts' not found. ++parserRealSource2.ts(4,21): error TS9010: Reference directives are not supported in isolated declaration mode. ++parserRealSource2.ts(15,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(16,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(17,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(20,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(21,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(22,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(23,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(24,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(25,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(26,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(27,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(28,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(29,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(30,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(31,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(32,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(33,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(34,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(35,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(36,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(37,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(38,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(39,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(40,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(41,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(42,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(43,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(44,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(45,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(48,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(49,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(50,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(51,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(56,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(57,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(58,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(59,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(60,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(62,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(63,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(69,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(70,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(71,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(72,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(73,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(74,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(75,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(81,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(82,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(83,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(84,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(85,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(86,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(87,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(88,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(89,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(90,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(94,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(100,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(101,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(102,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(103,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(104,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(105,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(106,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(112,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(113,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(114,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(115,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(116,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(117,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(118,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(119,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(120,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(121,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(122,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(123,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(129,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(130,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(131,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(132,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(133,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(134,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(135,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(136,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(137,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(138,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(139,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(140,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(141,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(142,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(143,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(144,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(145,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(146,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(147,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(153,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(154,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(155,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(156,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(157,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(158,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(159,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(160,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(161,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(162,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(163,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(164,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(165,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(166,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(167,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(168,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(169,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(175,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(176,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(177,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(178,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(179,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(180,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(181,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(182,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(183,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(184,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(185,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(186,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(187,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(188,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(189,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(190,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(191,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(192,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(193,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(199,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(200,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(214,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(215,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(216,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(217,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(218,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(219,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(220,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(226,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(227,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(229,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(230,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(231,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource2.ts(242,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== parserRealSource2.ts (1 errors) ==== ++==== parserRealSource2.ts (149 errors) ==== + // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. + // See LICENSE.txt in the project root for complete license information. + + /// + ~~~~~~~~~~~~~ + !!! error TS6053: File 'typescript.ts' not found. ++ ~~~~~~~~~~~~~ ++!!! error TS9010: Reference directives are not supported in isolated declaration mode. + + module TypeScript { + + export function hasFlag(val: number, flag: number): boolean { +@@ -237,193 +387,461 @@ + export enum ErrorRecoverySet { + None = 0, + Comma = 1, // Comma + SColon = 1 << 1, // SColon ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Asg = 1 << 2, // Asg ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + BinOp = 1 << 3, // Lsh, Rsh, Rs2, Le, Ge, INSTANCEOF, EQ, NE, Eqv, NEqv, LogAnd, LogOr, AsgMul, AsgDiv ++ ~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + // AsgMod, AsgAdd, AsgSub, AsgLsh, AsgRsh, AsgRs2, AsgAnd, AsgXor, AsgOr, QMark, Mult, Div, + // Pct, GT, LT, And, Xor, Or + RBrack = 1 << 4, // RBrack ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + RCurly = 1 << 5, // RCurly ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + RParen = 1 << 6, // RParen ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Dot = 1 << 7, // Dot ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Colon = 1 << 8, // Colon ++ ~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + PrimType = 1 << 9, // number, string, boolean ++ ~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + AddOp = 1 << 10, // Add, Sub ++ ~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + LCurly = 1 << 11, // LCurly ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + PreOp = 1 << 12, // Tilde, Bang, Inc, Dec ++ ~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + RegExp = 1 << 13, // RegExp ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + LParen = 1 << 14, // LParen ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + LBrack = 1 << 15, // LBrack ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Scope = 1 << 16, // Scope ++ ~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + In = 1 << 17, // IN ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + SCase = 1 << 18, // CASE, DEFAULT ++ ~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Else = 1 << 19, // ELSE ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Catch = 1 << 20, // CATCH, FINALLY ++ ~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Var = 1 << 21, // ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Stmt = 1 << 22, // BREAK, RETURN, THROW, DEBUGGER, FOR, SWITCH, DO, IF, TRY, WITH ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + While = 1 << 23, // WHILE ++ ~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ID = 1 << 24, // ID ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Prefix = 1 << 25, // VOID, DELETE, TYPEOF, AWAIT ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Literal = 1 << 26, // IntCon, FltCon, StrCon ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + RLit = 1 << 27, // THIS, TRUE, FALSE, NULL ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Func = 1 << 28, // FUNCTION ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + EOF = 1 << 29, // EOF ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // REVIEW: Name this something clearer. + TypeScriptS = 1 << 30, // PROPERTY, PRIVATE, STATIC, INTERFACE, CLASS, MODULE, EXPORT, IMPORT ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ExprStart = SColon | AddOp | LCurly | PreOp | RegExp | LParen | LBrack | ID | Prefix | RLit | Func | Literal, ++ ~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + StmtStart = ExprStart | SColon | Var | Stmt | While | TypeScriptS, ++ ~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Postfix = Dot | LParen | LBrack, ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum AllowedElements { + None = 0, + ModuleDeclarations = 1 << 2, ++ ~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ClassDeclarations = 1 << 3, ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + InterfaceDeclarations = 1 << 4, ++ ~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + AmbientDeclarations = 1 << 10, ++ ~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Properties = 1 << 11, ++ ~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + Global = ModuleDeclarations | ClassDeclarations | InterfaceDeclarations | AmbientDeclarations, ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + QuickParse = Global | Properties, ++ ~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum Modifiers { + None = 0, + Private = 1, + Public = 1 << 1, ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Readonly = 1 << 2, ++ ~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Ambient = 1 << 3, ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Exported = 1 << 4, ++ ~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Getter = 1 << 5, ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Setter = 1 << 6, ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Static = 1 << 7, ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum ASTFlags { + None = 0, + ExplicitSemicolon = 1, // statment terminated by an explicit semicolon + AutomaticSemicolon = 1 << 1, // statment terminated by an automatic semicolon ++ ~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Writeable = 1 << 2, // node is lhs that can be modified ++ ~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Error = 1 << 3, // node has an error ++ ~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + DotLHSPartial = 1 << 4, // node is the lhs of an incomplete dot expr at cursor ++ ~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + DotLHS = 1 << 5, // node is the lhs of a dot expr ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IsStatement = 1 << 6, // node is a statement ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + StrictMode = 1 << 7, // node is in the strict mode environment ++ ~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + PossibleOptionalParameter = 1 << 8, ++ ~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ClassBaseConstructorCall = 1 << 9, ++ ~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + OptionalName = 1 << 10, ++ ~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + // REVIEW: This flag is to mark lambda nodes to note that the LParen of an expression has already been matched in the lambda header. + // The flag is used to communicate this piece of information to the calling parseTerm, which intern will remove it. + // Once we have a better way to associate information with nodes, this flag should not be used. + SkipNextRParen = 1 << 11, ++ ~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum DeclFlags { + None = 0, + Exported = 1, + Private = 1 << 1, ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Public = 1 << 2, ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Ambient = 1 << 3, ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Static = 1 << 4, ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + LocalStatic = 1 << 5, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + GetAccessor = 1 << 6, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + SetAccessor = 1 << 7, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum ModuleFlags { + None = 0, + Exported = 1, + Private = 1 << 1, ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Public = 1 << 2, ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Ambient = 1 << 3, ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Static = 1 << 4, ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + LocalStatic = 1 << 5, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + GetAccessor = 1 << 6, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + SetAccessor = 1 << 7, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IsEnum = 1 << 8, ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ShouldEmitModuleDecl = 1 << 9, ++ ~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IsWholeFile = 1 << 10, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IsDynamic = 1 << 11, ++ ~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + MustCaptureThis = 1 << 12, ++ ~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum SymbolFlags { + None = 0, + Exported = 1, + Private = 1 << 1, ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Public = 1 << 2, ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Ambient = 1 << 3, ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Static = 1 << 4, ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + LocalStatic = 1 << 5, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + GetAccessor = 1 << 6, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + SetAccessor = 1 << 7, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Property = 1 << 8, ++ ~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Readonly = 1 << 9, ++ ~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ModuleMember = 1 << 10, ++ ~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + InterfaceMember = 1 << 11, ++ ~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ClassMember = 1 << 12, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + BuiltIn = 1 << 13, ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + TypeSetDuringScopeAssignment = 1 << 14, ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Constant = 1 << 15, ++ ~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Optional = 1 << 16, ++ ~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + RecursivelyReferenced = 1 << 17, ++ ~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Bound = 1 << 18, ++ ~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + CompilerGenerated = 1 << 19, ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum VarFlags { + None = 0, + Exported = 1, + Private = 1 << 1, ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Public = 1 << 2, ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Ambient = 1 << 3, ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Static = 1 << 4, ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + LocalStatic = 1 << 5, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + GetAccessor = 1 << 6, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + SetAccessor = 1 << 7, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + AutoInit = 1 << 8, ++ ~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Property = 1 << 9, ++ ~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Readonly = 1 << 10, ++ ~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Class = 1 << 11, ++ ~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ClassProperty = 1 << 12, ++ ~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ClassBodyProperty = 1 << 13, ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ClassConstructorProperty = 1 << 14, ++ ~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ClassSuperMustBeFirstCallInConstructor = 1 << 15, ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Constant = 1 << 16, ++ ~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + MustCaptureThis = 1 << 17, ++ ~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum FncFlags { + None = 0, + Exported = 1, + Private = 1 << 1, ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Public = 1 << 2, ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Ambient = 1 << 3, ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Static = 1 << 4, ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + LocalStatic = 1 << 5, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + GetAccessor = 1 << 6, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + SetAccessor = 1 << 7, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Definition = 1 << 8, ++ ~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Signature = 1 << 9, ++ ~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Method = 1 << 10, ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + HasReturnExpression = 1 << 11, ++ ~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + CallMember = 1 << 12, ++ ~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ConstructMember = 1 << 13, ++ ~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + HasSelfReference = 1 << 14, ++ ~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IsFatArrowFunction = 1 << 15, ++ ~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IndexerMember = 1 << 16, ++ ~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IsFunctionExpression = 1 << 17, ++ ~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ClassMethod = 1 << 18, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ClassPropertyMethodExported = 1 << 19, ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum SignatureFlags { + None = 0, + IsIndexer = 1, + IsStringIndexer = 1 << 1, ++ ~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IsNumberIndexer = 1 << 2, ++ ~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export function ToDeclFlags(fncFlags: FncFlags) : DeclFlags; + export function ToDeclFlags(varFlags: VarFlags) : DeclFlags; +@@ -436,25 +854,49 @@ + export enum TypeFlags { + None = 0, + HasImplementation = 1, + HasSelfReference = 1 << 1, ++ ~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + MergeResult = 1 << 2, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IsEnum = 1 << 3, ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + BuildingName = 1 << 4, ++ ~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + HasBaseType = 1 << 5, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + HasBaseTypeOfObject = 1 << 6, ++ ~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IsClass = 1 << 7, ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum TypeRelationshipFlags { + SuccessfulComparison = 0, + SourceIsNullTargetIsVoidOrUndefined = 1, + RequiredPropertyIsMissing = 1 << 1, ++ ~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IncompatibleSignatures = 1 << 2, ++ ~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + SourceSignatureHasTooManyParameters = 3, + IncompatibleReturnTypes = 1 << 4, ++ ~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IncompatiblePropertyTypes = 1 << 5, ++ ~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IncompatibleParameterTypes = 1 << 6, ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum CodeGenTarget { + ES3 = 0, +@@ -464,8 +906,10 @@ + export enum ModuleGenTarget { + Synchronous = 0, + Asynchronous = 1, + Local = 1 << 1, ++ ~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Compiler defaults to generating ES5-compliant code for + // - getters and setters diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource3.d.ts.diff new file mode 100644 index 0000000000000..ff5f8a5b20015 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource3.d.ts.diff @@ -0,0 +1,44 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/parserRealSource3.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -116,17 +116,22 @@ + } + /// [Errors] //// + + parserRealSource3.ts(4,21): error TS6053: File 'typescript.ts' not found. ++parserRealSource3.ts(4,21): error TS9010: Reference directives are not supported in isolated declaration mode. ++parserRealSource3.ts(116,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserRealSource3.ts(117,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== parserRealSource3.ts (1 errors) ==== ++==== parserRealSource3.ts (4 errors) ==== + // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. + // See LICENSE.txt in the project root for complete license information. + + /// + ~~~~~~~~~~~~~ + !!! error TS6053: File 'typescript.ts' not found. ++ ~~~~~~~~~~~~~ ++!!! error TS9010: Reference directives are not supported in isolated declaration mode. + + module TypeScript { + // Note: Any addition to the NodeType should also be supported with addition to AstWalkerDetailCallback + export enum NodeType { +@@ -237,7 +242,11 @@ + Error, + Comment, + Debugger, + GeneralNode = FuncDecl, ++ ~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + LastAsg = AsgRs2, ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserSkippedTokens16.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserSkippedTokens16.d.ts.diff new file mode 100644 index 0000000000000..2c73c1d90a82d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserSkippedTokens16.d.ts.diff @@ -0,0 +1,43 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens16.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,9 +3,9 @@ + //// [/.src/parserSkippedTokens16.d.ts] + declare function Foo(): any; + declare namespace M { + } +-declare var x: any; ++declare var x: invalid; + /// [Errors] //// + + parserSkippedTokens16.ts(1,1): error TS2552: Cannot find name 'foo'. Did you mean 'Foo'? + parserSkippedTokens16.ts(1,6): error TS1005: ';' expected. +@@ -14,11 +14,12 @@ + parserSkippedTokens16.ts(2,27): error TS1127: Invalid character. + parserSkippedTokens16.ts(3,3): error TS1109: Expression expected. + parserSkippedTokens16.ts(6,5): error TS1138: Parameter declaration expected. + parserSkippedTokens16.ts(8,14): error TS1109: Expression expected. ++parserSkippedTokens16.ts(8,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== parserSkippedTokens16.ts (8 errors) ==== ++==== parserSkippedTokens16.ts (9 errors) ==== + foo(): Bar { } + ~~~ + !!! error TS2552: Cannot find name 'foo'. Did you mean 'Foo'? + !!! related TS2728 parserSkippedTokens16.ts:2:10: 'Foo' is declared here. +@@ -41,5 +42,7 @@ + !!! error TS1138: Parameter declaration expected. + } + var x = + +-!!! error TS1109: Expression expected. +\ No newline at end of file ++!!! error TS1109: Expression expected. ++ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserStrictMode8.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserStrictMode8.d.ts.diff new file mode 100644 index 0000000000000..861c2195ab9ce --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserStrictMode8.d.ts.diff @@ -0,0 +1,28 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,14 +1,18 @@ + + + //// [/.src/parserStrictMode8.d.ts] ++declare function eval(): invalid; + /// [Errors] //// + + parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. ++parserStrictMode8.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== parserStrictMode8.ts (1 errors) ==== ++==== parserStrictMode8.ts (2 errors) ==== + "use strict"; + function eval() { + ~~~~ + !!! error TS1100: Invalid use of 'eval' in strict mode. ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/preserveConstEnums.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/preserveConstEnums.d.ts.diff new file mode 100644 index 0000000000000..2c958e0619382 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/preserveConstEnums.d.ts.diff @@ -0,0 +1,24 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/preserveConstEnums.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,4 +4,15 @@ + declare const enum E { + Value = 1, + Value2 = 1 + } ++/// [Errors] //// ++ ++preserveConstEnums.ts(2,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== preserveConstEnums.ts (1 errors) ==== ++ const enum E { ++ Value = 1, Value2 = Value ++ ~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/propertyAssignmentUseParentType3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/propertyAssignmentUseParentType3.d.ts.diff new file mode 100644 index 0000000000000..ca83d79e5664c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/propertyAssignmentUseParentType3.d.ts.diff @@ -0,0 +1,69 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/salsa/propertyAssignmentUseParentType3.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,21 +1,48 @@ + + + //// [/.src/propertyAssignmentUseParentType3.d.ts] + declare function foo1(): number; +-declare namespace foo1 { +- var toFixed: string; +-} + declare function foo2(): any[]; +-declare namespace foo2 { +- var join: string; +-} + declare function foo3(): string; +-declare namespace foo3 { +- var trim: string; +-} + declare function foo4(): ({ + x: number; + }); +-declare namespace foo4 { +- var x: string; +-} ++/// [Errors] //// ++ ++propertyAssignmentUseParentType3.ts(3,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++propertyAssignmentUseParentType3.ts(8,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++propertyAssignmentUseParentType3.ts(13,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++propertyAssignmentUseParentType3.ts(18,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ ++==== propertyAssignmentUseParentType3.ts (4 errors) ==== ++ // don't use the parent type if it's a function declaration (#33741) ++ ++ function foo1(): number { ++ ~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ return 123; ++ } ++ foo1.toFixed = ""; ++ ++ function foo2(): any[] { ++ ~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ return []; ++ } ++ foo2.join = ""; ++ ++ function foo3(): string { ++ ~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ return ""; ++ } ++ foo3.trim = ""; ++ ++ function foo4(): ({x: number}) { ++ ~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ return {x: 123}; ++ } ++ foo4.x = "456"; ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reexportClassDefinition.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reexportClassDefinition.d.ts.diff new file mode 100644 index 0000000000000..a1d3b78c75fc1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reexportClassDefinition.d.ts.diff @@ -0,0 +1,45 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/externalModules/reexportClassDefinition.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,12 +5,32 @@ + } + export = x; + + //// [/.src/foo2.d.ts] +-import foo1 = require('./foo1'); +-declare const _default: { +- x: typeof foo1; +-}; ++declare const _default: invalid; + export = _default; + + //// [/.src/foo3.d.ts] + export {}; ++/// [Errors] //// ++ ++foo2.ts(4,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== foo3.ts (0 errors) ==== ++ import foo2 = require('./foo2') ++ class x extends foo2.x {} ++ ++ ++==== foo1.ts (0 errors) ==== ++ class x{} ++ export = x; ++ ++==== foo2.ts (1 errors) ==== ++ import foo1 = require('./foo1'); ++ ++ export = { ++ x: foo1 ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reservedWords3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reservedWords3.d.ts.diff new file mode 100644 index 0000000000000..037f3dbf1cd93 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reservedWords3.d.ts.diff @@ -0,0 +1,92 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/reservedWords3.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,59 +1,77 @@ + + + //// [/.src/reservedWords3.d.ts] +-declare function f1(): any; ++declare function f1(): invalid; + declare enum { + } +-declare function f2(): any; ++declare function f2(): invalid; + declare class { + } +-declare function f3(): any; +-declare function (): any; +-declare function f4(): any; +-declare function f5(): any; ++declare function f3(): invalid; ++declare function (): invalid; ++declare function f4(): invalid; ++declare function f5(): invalid; + /// [Errors] //// + ++reservedWords3.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + reservedWords3.ts(1,13): error TS1390: 'enum' is not allowed as a parameter name. + reservedWords3.ts(1,17): error TS2567: Enum declarations can only merge with namespace or other enum declarations. + reservedWords3.ts(1,17): error TS1003: Identifier expected. ++reservedWords3.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + reservedWords3.ts(2,13): error TS1390: 'class' is not allowed as a parameter name. + reservedWords3.ts(2,18): error TS1005: '{' expected. ++reservedWords3.ts(3,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + reservedWords3.ts(3,13): error TS1390: 'function' is not allowed as a parameter name. + reservedWords3.ts(3,21): error TS2567: Enum declarations can only merge with namespace or other enum declarations. ++reservedWords3.ts(3,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + reservedWords3.ts(3,21): error TS1003: Identifier expected. ++reservedWords3.ts(4,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + reservedWords3.ts(4,13): error TS1390: 'while' is not allowed as a parameter name. + reservedWords3.ts(4,18): error TS1005: '(' expected. ++reservedWords3.ts(5,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + reservedWords3.ts(5,13): error TS1390: 'for' is not allowed as a parameter name. + reservedWords3.ts(5,16): error TS1005: '(' expected. + + +-==== reservedWords3.ts (12 errors) ==== ++==== reservedWords3.ts (18 errors) ==== + function f1(enum) {} ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ + !!! error TS1390: 'enum' is not allowed as a parameter name. + + !!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. + ~ + !!! error TS1003: Identifier expected. + function f2(class) {} ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! error TS1390: 'class' is not allowed as a parameter name. + ~ + !!! error TS1005: '{' expected. + function f3(function) {} ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~ + !!! error TS1390: 'function' is not allowed as a parameter name. + + !!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. ++ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1003: Identifier expected. + function f4(while) {} ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! error TS1390: 'while' is not allowed as a parameter name. + ~ + !!! error TS1005: '(' expected. + function f5(for) {} ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ + !!! error TS1390: 'for' is not allowed as a parameter name. + ~ + !!! error TS1005: '(' expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/staticsInAFunction.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/staticsInAFunction.d.ts.diff new file mode 100644 index 0000000000000..ffbc322d1d3b5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/staticsInAFunction.d.ts.diff @@ -0,0 +1,34 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/staticsInAFunction.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,10 +1,11 @@ + + + //// [/.src/staticsInAFunction.d.ts] +-declare function boo(): void; ++declare function boo(): invalid; + /// [Errors] //// + ++staticsInAFunction.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + staticsInAFunction.ts(1,13): error TS1005: '(' expected. + staticsInAFunction.ts(2,4): error TS1128: Declaration or statement expected. + staticsInAFunction.ts(2,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. + staticsInAFunction.ts(3,4): error TS1128: Declaration or statement expected. +@@ -19,10 +20,12 @@ + staticsInAFunction.ts(4,22): error TS2693: 'any' only refers to a type, but is being used as a value here. + staticsInAFunction.ts(4,26): error TS1005: ';' expected. + + +-==== staticsInAFunction.ts (14 errors) ==== ++==== staticsInAFunction.ts (15 errors) ==== + function boo{ ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1005: '(' expected. + static test() + ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/strictModeOctalLiterals.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/strictModeOctalLiterals.d.ts.diff new file mode 100644 index 0000000000000..a820e44aee0a4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/strictModeOctalLiterals.d.ts.diff @@ -0,0 +1,28 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/expressions/literals/strictModeOctalLiterals.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,16 +5,19 @@ + A = 13 + } + /// [Errors] //// + ++strictModeOctalLiterals.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + strictModeOctalLiterals.ts(2,14): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. + strictModeOctalLiterals.ts(4,16): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. + strictModeOctalLiterals.ts(4,21): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. + + +-==== strictModeOctalLiterals.ts (3 errors) ==== ++==== strictModeOctalLiterals.ts (4 errors) ==== + export enum E { + A = 12 + 01 ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ + !!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'. + } + const orbitol: 01 = 01 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..b0f6d74d27356 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolDeclarationEmit12.d.ts.diff @@ -0,0 +1,39 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,26 +5,30 @@ + interface I { + } + export class C { + [Symbol.iterator]: I; ++ [Symbol.toPrimitive](x: I): invalid; + [Symbol.isConcatSpreadable](): I; + get [Symbol.toPrimitive](): I; + set [Symbol.toPrimitive](x: I); + } + export {}; + } + /// [Errors] //// + ++symbolDeclarationEmit12.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + symbolDeclarationEmit12.ts(9,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + symbolDeclarationEmit12.ts(10,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + + +-==== symbolDeclarationEmit12.ts (2 errors) ==== ++==== symbolDeclarationEmit12.ts (3 errors) ==== + module M { + interface I { } + export class C { + [Symbol.iterator]: I; + [Symbol.toPrimitive](x: I) { } ++ ~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [Symbol.isConcatSpreadable](): I { + return undefined + } + get [Symbol.toPrimitive](): I { return undefined; } 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..3f12eced320a5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts.diff @@ -0,0 +1,40 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,30 @@ + + + //// [/.src/Folder/monorepo/core/index.d.ts] +-export declare function getStyles(): import("styled-components").InterpolationValue[]; ++export declare function getStyles(): invalid; ++/// [Errors] //// ++ ++Folder/monorepo/core/index.ts(3,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== Folder/monorepo/core/index.ts (1 errors) ==== ++ import { styles } from "package-a"; ++ ++ export function getStyles() { ++ ~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ 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/templateLiteralTypes4.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateLiteralTypes4.d.ts.diff new file mode 100644 index 0000000000000..66df896d0d8bc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateLiteralTypes4.d.ts.diff @@ -0,0 +1,50 @@ +// [[Reason: undefined]] //// + +//// [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; +@@ -157,13 +157,15 @@ + declare function f3(s: `**${T}**`): T; + declare function f4(s: `**${T}**`): T; + /// [Errors] //// + ++templateLiteralTypes4.ts(43,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++templateLiteralTypes4.ts(43,60): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 +@@ -205,8 +207,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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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/templateStringInFunctionParameterType.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterType.d.ts.diff new file mode 100644 index 0000000000000..14e260607610a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterType.d.ts.diff @@ -0,0 +1,32 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,19 +1,22 @@ + + + //// [/.src/templateStringInFunctionParameterType.d.ts] +-declare function f(any: any, : any): any; ++declare function f(any: any, : invalid): any; + declare function f(x: string): any; + /// [Errors] //// + + templateStringInFunctionParameterType.ts(1,12): error TS1138: Parameter declaration expected. ++templateStringInFunctionParameterType.ts(1,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + templateStringInFunctionParameterType.ts(1,22): error TS1005: ',' expected. + + +-==== templateStringInFunctionParameterType.ts (2 errors) ==== ++==== templateStringInFunctionParameterType.ts (3 errors) ==== + function f(: any: any`hello`): any; + ~ + !!! error TS1138: Parameter declaration expected. ++ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ + !!! error TS1005: ',' expected. + function f(x: string): any; + function f(x: string) { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterTypeES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterTypeES6.d.ts.diff new file mode 100644 index 0000000000000..52419c91c3a11 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterTypeES6.d.ts.diff @@ -0,0 +1,32 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,19 +1,22 @@ + + + //// [/.src/templateStringInFunctionParameterTypeES6.d.ts] +-declare function f(any: any, : any): any; ++declare function f(any: any, : invalid): any; + declare function f(x: string): any; + /// [Errors] //// + + templateStringInFunctionParameterTypeES6.ts(1,12): error TS1138: Parameter declaration expected. ++templateStringInFunctionParameterTypeES6.ts(1,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + templateStringInFunctionParameterTypeES6.ts(1,22): error TS1005: ',' expected. + + +-==== templateStringInFunctionParameterTypeES6.ts (2 errors) ==== ++==== templateStringInFunctionParameterTypeES6.ts (3 errors) ==== + function f(: any: any`hello`): any; + ~ + !!! error TS1138: Parameter declaration expected. ++ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ + !!! error TS1005: ',' expected. + function f(x: string): any; + function f(x: string) { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringWithEmbeddedYieldKeyword.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringWithEmbeddedYieldKeyword.d.ts.diff new file mode 100644 index 0000000000000..5a489d1bead12 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringWithEmbeddedYieldKeyword.d.ts.diff @@ -0,0 +1,30 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,17 +1,20 @@ + + + //// [/.src/templateStringWithEmbeddedYieldKeyword.d.ts] +-declare function gen(): {}; ++declare function gen(): invalid; + /// [Errors] //// + + error TS2318: Cannot find global type 'IterableIterator'. ++templateStringWithEmbeddedYieldKeyword.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + templateStringWithEmbeddedYieldKeyword.ts(1,15): error TS1005: '(' expected. + + + !!! error TS2318: Cannot find global type 'IterableIterator'. +-==== templateStringWithEmbeddedYieldKeyword.ts (1 errors) ==== ++==== templateStringWithEmbeddedYieldKeyword.ts (2 errors) ==== + function* gen { ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS1005: '(' expected. + // Once this is supported, yield *must* be parenthesized. + var x = `abc${ yield 10 }def`; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContexts.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContexts.d.ts.diff new file mode 100644 index 0000000000000..225001a6ef6e5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContexts.d.ts.diff @@ -0,0 +1,40 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -28,13 +28,15 @@ + thisInInvalidContexts.ts(17,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. + thisInInvalidContexts.ts(23,13): error TS2331: 'this' cannot be referenced in a module or namespace body. + thisInInvalidContexts.ts(31,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. + thisInInvalidContexts.ts(34,25): error TS2507: Type 'typeof globalThis' is not a constructor function type. ++thisInInvalidContexts.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + thisInInvalidContexts.ts(40,9): error TS2332: 'this' cannot be referenced in current location. ++thisInInvalidContexts.ts(41,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + thisInInvalidContexts.ts(41,9): error TS2332: 'this' cannot be referenced in current location. + + +-==== thisInInvalidContexts.ts (7 errors) ==== ++==== thisInInvalidContexts.ts (9 errors) ==== + class BaseErrClass { + constructor(t: any) { } + } + +@@ -83,11 +85,15 @@ + + //'this' as a computed enum value + enum SomeEnum { + A = this, // Should not be allowed ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ + !!! error TS2332: 'this' cannot be referenced in current location. + B = this.spaaaace // Also should not be allowed ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ + !!! error TS2332: 'this' cannot be referenced in current location. + } + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContextsExternalModule.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContextsExternalModule.d.ts.diff new file mode 100644 index 0000000000000..6a68521b83f11 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContextsExternalModule.d.ts.diff @@ -0,0 +1,42 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,8 @@ + + + //// [/.src/thisInInvalidContextsExternalModule.d.ts] +-declare const _default: undefined; ++declare const _default: invalid; + export = _default; + /// [Errors] //// + + thisInInvalidContextsExternalModule.ts(9,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +@@ -11,11 +11,12 @@ + thisInInvalidContextsExternalModule.ts(31,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. + thisInInvalidContextsExternalModule.ts(33,25): error TS2507: Type 'undefined' is not a constructor function type. + thisInInvalidContextsExternalModule.ts(39,9): error TS2332: 'this' cannot be referenced in current location. + thisInInvalidContextsExternalModule.ts(40,9): error TS2332: 'this' cannot be referenced in current location. ++thisInInvalidContextsExternalModule.ts(43,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== thisInInvalidContextsExternalModule.ts (7 errors) ==== ++==== thisInInvalidContextsExternalModule.ts (8 errors) ==== + class BaseErrClass { + constructor(t: any) { } + } + +@@ -70,5 +71,7 @@ + ~~~~ + !!! error TS2332: 'this' cannot be referenced in current location. + } + +- export = this; // Should be an error +\ No newline at end of file ++ export = this; // Should be an error ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInPropertyBoundDeclarations.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInPropertyBoundDeclarations.d.ts.diff new file mode 100644 index 0000000000000..6c30e0036a88a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInPropertyBoundDeclarations.d.ts.diff @@ -0,0 +1,38 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/thisInPropertyBoundDeclarations.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -24,16 +24,17 @@ + prop4: string; + prop5: { + a: () => this; + }; +- prop6: any; ++ prop6: invalid; + } + /// [Errors] //// + + thisInPropertyBoundDeclarations.ts(64,5): error TS2527: The inferred type of 'prop6' references an inaccessible 'this' type. A type annotation is necessary. ++thisInPropertyBoundDeclarations.ts(64,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== thisInPropertyBoundDeclarations.ts (1 errors) ==== ++==== thisInPropertyBoundDeclarations.ts (2 errors) ==== + class Bug { + private name: string; + + private static func: Function[] = [ +@@ -98,8 +99,10 @@ + + prop6 = () => { + ~~~~~ + !!! error TS2527: The inferred type of 'prop6' references an inaccessible 'this' type. A type annotation is necessary. ++ ~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return { + a: () => { return this; } + }; + }; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/this_inside-enum-should-not-be-allowed.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/this_inside-enum-should-not-be-allowed.d.ts.diff new file mode 100644 index 0000000000000..5d91ed92fd288 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/this_inside-enum-should-not-be-allowed.d.ts.diff @@ -0,0 +1,27 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/this_inside-enum-should-not-be-allowed.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,15 +7,18 @@ + declare namespace ModuleEnum { + } + /// [Errors] //// + ++this_inside-enum-should-not-be-allowed.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + this_inside-enum-should-not-be-allowed.ts(2,36): error TS2332: 'this' cannot be referenced in current location. + this_inside-enum-should-not-be-allowed.ts(7,30): error TS2332: 'this' cannot be referenced in current location. + + +-==== this_inside-enum-should-not-be-allowed.ts (2 errors) ==== ++==== this_inside-enum-should-not-be-allowed.ts (3 errors) ==== + enum TopLevelEnum { + ThisWasAllowedButShouldNotBe = this // Should not be allowed ++ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ + !!! error TS2332: 'this' cannot be referenced in current location. + } + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/twoAccessorsWithSameName.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/twoAccessorsWithSameName.d.ts.diff new file mode 100644 index 0000000000000..215283577962f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/twoAccessorsWithSameName.d.ts.diff @@ -0,0 +1,45 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -12,11 +12,9 @@ + declare class E { + get x(): number; + set x(v: number); + } +-declare var x: { +- readonly x: number; +-}; ++declare var x: invalid; + declare var y: { + x: number; + }; + /// [Errors] //// +@@ -27,11 +25,12 @@ + twoAccessorsWithSameName.ts(8,9): error TS2300: Duplicate identifier 'x'. + twoAccessorsWithSameName.ts(19,9): error TS2300: Duplicate identifier 'x'. + twoAccessorsWithSameName.ts(24,9): error TS1118: An object literal cannot have multiple get/set accessors with the same name. + twoAccessorsWithSameName.ts(24,9): error TS2300: Duplicate identifier 'x'. ++twoAccessorsWithSameName.ts(24,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== twoAccessorsWithSameName.ts (7 errors) ==== ++==== twoAccessorsWithSameName.ts (8 errors) ==== + class C { + get x(): number { return 1; } + ~ + !!! error TS2300: Duplicate identifier 'x'. +@@ -68,8 +67,10 @@ + ~ + !!! error TS1118: An object literal cannot have multiple get/set accessors with the same name. + ~ + !!! error TS2300: Duplicate identifier 'x'. ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return 1; + } + } + 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..530a3c011bd3d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment29.d.ts.diff @@ -0,0 +1,108 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment29.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,12 +1,8 @@ + + + //// [/.src/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; +@@ -63,8 +50,12 @@ + }; + declare var n: number; + /// [Errors] //// + ++typeFromPropertyAssignment29.ts(1,10): error TS9009: 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(41,10): error TS9009: 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(53,10): error TS9009: 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(66,14): error TS9009: 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,30): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. + typeFromPropertyAssignment29.ts(81,50): error TS2339: Property 'm' does not exist on type '(n: number) => string'. +@@ -77,10 +68,12 @@ + typeFromPropertyAssignment29.ts(101,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. + typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. + + +-==== typeFromPropertyAssignment29.ts (12 errors) ==== ++==== typeFromPropertyAssignment29.ts (16 errors) ==== + function ExpandoDecl(n: number): string { ++ ~~~~~~~~~~~ ++!!! error TS9009: 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.toString(); + } + ExpandoDecl.prop = 2 + ExpandoDecl.m = function(n: number) { +@@ -119,8 +112,10 @@ + + } + + function ExpandoNested(n: number): { ++ ~~~~~~~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + (m: number): number; + total: number; + } { + const nested = function (m: number) { +@@ -131,8 +126,10 @@ + } + ExpandoNested.also = -1; + + function ExpandoMerge(n: number): number { ++ ~~~~~~~~~~~~ ++!!! error TS9009: 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 * 100; + } + ExpandoMerge.p1 = 111 + namespace ExpandoMerge { +@@ -144,8 +141,10 @@ + var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); + + namespace Ns { + function ExpandoNamespace(): void {} ++ ~~~~~~~~~~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoNamespace.p6 = 42; + export function foo(): typeof ExpandoNamespace { + return ExpandoNamespace; + } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment31.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment31.d.ts.diff new file mode 100644 index 0000000000000..00e0662a801bc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment31.d.ts.diff @@ -0,0 +1,39 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment31.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,12 +2,8 @@ + + //// [/.src/typeFromPropertyAssignment31.d.ts] + declare function ExpandoMerge(n: number): number; + declare namespace ExpandoMerge { +- var p1: number; +- var m: (n: number) => number; +-} +-declare namespace ExpandoMerge { + var p2: number; + } + declare namespace ExpandoMerge { + var p3: number; +@@ -20,14 +16,17 @@ + } + declare var n: number; + /// [Errors] //// + ++typeFromPropertyAssignment31.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + typeFromPropertyAssignment31.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. + typeFromPropertyAssignment31.ts(25,1): error TS2322: Type 'boolean' is not assignable to type 'number'. + + +-==== typeFromPropertyAssignment31.ts (2 errors) ==== ++==== typeFromPropertyAssignment31.ts (3 errors) ==== + function ExpandoMerge(n: number): number { ++ ~~~~~~~~~~~~ ++!!! error TS9009: 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; + } + ExpandoMerge.p1 = 111 + ExpandoMerge.m = function(n: number) { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment32.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment32.d.ts.diff new file mode 100644 index 0000000000000..b15dbbbff1f63 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment32.d.ts.diff @@ -0,0 +1,41 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,12 +1,8 @@ + + + //// [/.src/expando.d.ts] + declare function ExpandoMerge(n: number): number; +-declare namespace ExpandoMerge { +- var p1: number; +- var m: (n: number) => number; +-} + declare var n: number; + + //// [/.src/ns.d.ts] + declare namespace ExpandoMerge { +@@ -22,16 +18,19 @@ + var p2: number; + } + /// [Errors] //// + ++expando.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. + expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. + ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + + +-==== expando.ts (2 errors) ==== ++==== expando.ts (3 errors) ==== + function ExpandoMerge(n: number): number { ++ ~~~~~~~~~~~~ ++!!! error TS9009: 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; + } + ExpandoMerge.p1 = 111 + ExpandoMerge.m = function(n: number) { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment33.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment33.d.ts.diff new file mode 100644 index 0000000000000..e6665c79f91e3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment33.d.ts.diff @@ -0,0 +1,44 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,12 +1,8 @@ + + + //// [/.src/expando.d.ts] + declare function ExpandoMerge(n: number): number; +-declare namespace ExpandoMerge { +- var p1: number; +- var m: (n: number) => number; +-} + declare var n: number; + + //// [/.src/ns.d.ts] + declare namespace ExpandoMerge { +@@ -22,8 +18,9 @@ + var p2: number; + } + /// [Errors] //// + ++expando.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. + expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. + ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. +@@ -47,10 +44,12 @@ + export var p2 = 222; + } + + +-==== expando.ts (2 errors) ==== ++==== expando.ts (3 errors) ==== + function ExpandoMerge(n: number): number { ++ ~~~~~~~~~~~~ ++!!! error TS9009: 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; + } + ExpandoMerge.p1 = 111 + ExpandoMerge.m = function(n: number) { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment36.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment36.d.ts.diff new file mode 100644 index 0000000000000..126b5ee4c70df --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment36.d.ts.diff @@ -0,0 +1,46 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -9,25 +9,21 @@ + s: string; + }; + declare var test: string; + declare function d(): void; +-declare namespace d { +- var e: number; +- var q: boolean; +- var r: number; +-} + declare const g: { + (): void; + expando: number; + both: string | number; + }; + /// [Errors] //// + + typeFromPropertyAssignment36.ts(17,7): error TS2565: Property 'q' is used before being assigned. ++typeFromPropertyAssignment36.ts(40,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + typeFromPropertyAssignment36.ts(48,3): error TS2565: Property 'q' is used before being assigned. + + +-==== typeFromPropertyAssignment36.ts (2 errors) ==== ++==== typeFromPropertyAssignment36.ts (3 errors) ==== + function f(b: boolean): { + (): void + e: number + q: boolean +@@ -68,8 +64,10 @@ + // OK to access possibly-unassigned properties outside the initialising scope + var test: string = f(true).s + + function d(): void { ++ ~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + } + d.e = 12 + d.e + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment38.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment38.d.ts.diff new file mode 100644 index 0000000000000..f5a973b287de0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment38.d.ts.diff @@ -0,0 +1,37 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment38.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,11 +1,25 @@ + + + //// [/.src/typeFromPropertyAssignment38.d.ts] + declare function F(): void; +-declare namespace F { +- var prop: number; +-} + declare const f: { + (): void; + prop: number; + }; ++/// [Errors] //// ++ ++typeFromPropertyAssignment38.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ ++==== typeFromPropertyAssignment38.ts (1 errors) ==== ++ function F(): void {} ++ ~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ F["prop"] = 3; ++ ++ const f: { ++ (): void; ++ prop: number; ++ } = function () {}; ++ f["prop"] = 3; ++ +\ No newline at end of file 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..0227e4259048e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFile.d.ts.diff @@ -0,0 +1,59 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,48 @@ + + + //// [/.src/main.d.ts] +-export declare const va: import("ext").A; +-export declare const vb: import("ext/other").B; ++export declare const va: invalid; ++export declare const vb: invalid; ++/// [Errors] //// ++ ++main.ts(4,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++main.ts(5,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== main.ts (2 errors) ==== ++ import { fa } from "ext"; ++ import { fb } from "ext/other"; ++ ++ export const va = fa(); ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ export const vb = fb(); ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++==== 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..dd59ea3397f67 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.d.ts.diff @@ -0,0 +1,35 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,22 +1,25 @@ + + + //// [/.src/main.d.ts] + export declare const va: any; +-export declare const vb: import("ext/other").B; ++export declare const vb: invalid; + /// [Errors] //// + + main.ts(1,10): error TS2305: Module '"ext"' has no exported member 'fa'. ++main.ts(5,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + ==== 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..bb763512217df --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.d.ts.diff @@ -0,0 +1,56 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,45 @@ + + + //// [/.src/main.d.ts] +-export declare const va: import("ext").A2; +-export declare const va2: import("ext").A2; ++export declare const va: invalid; ++export declare const va2: invalid; ++/// [Errors] //// ++ ++main.ts(4,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++main.ts(5,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== main.ts (2 errors) ==== ++ import { fa } from "ext"; ++ import { fa as fa2 } from "ext/other"; ++ ++ export const va = fa(); ++ ~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ export const va2 = fa2(); ++ ~~~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++==== 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/underscoreEscapedNameInEnum.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/underscoreEscapedNameInEnum.d.ts.diff new file mode 100644 index 0000000000000..82940b1e03558 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/underscoreEscapedNameInEnum.d.ts.diff @@ -0,0 +1,26 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/underscoreEscapedNameInEnum.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,4 +4,17 @@ + declare enum E { + "__foo" = 1, + bar = 2 + } ++/// [Errors] //// ++ ++underscoreEscapedNameInEnum.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== underscoreEscapedNameInEnum.ts (1 errors) ==== ++ enum E { ++ "__foo" = 1, ++ bar = E["__foo"] + 1 ++ ~~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ } ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff new file mode 100644 index 0000000000000..15455a6c2925c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff @@ -0,0 +1,51 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/externalModules/verbatimModuleSyntaxConstEnumUsage.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,10 +1,10 @@ + + + //// [/.src/bar.d.ts] + export declare enum Bar { +- a = 1, +- c = 3, ++ a, ++ c, + e = 5 + } + + //// [/.src/foo.d.ts] +@@ -12,4 +12,29 @@ + a = 1, + b = 2, + c = 3 + } ++/// [Errors] //// ++ ++bar.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++bar.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ ++ ++==== foo.ts (0 errors) ==== ++ export enum Foo { ++ a = 1, ++ b, ++ c, ++ } ++ ++==== bar.ts (2 errors) ==== ++ import {Foo} from './foo.js'; ++ ++ export enum Bar { ++ a = Foo.a, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ c = Foo.c, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++ e = 5, ++ } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/wellKnownSymbolExpando.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/wellKnownSymbolExpando.d.ts.diff new file mode 100644 index 0000000000000..7b7fadedeb675 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/wellKnownSymbolExpando.d.ts.diff @@ -0,0 +1,25 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/wellKnownSymbolExpando.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,15 @@ + + + //// [/.src/wellKnownSymbolExpando.d.ts] + declare function f(): void; +-declare namespace f { } ++/// [Errors] //// ++ ++wellKnownSymbolExpando.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ++ ++==== wellKnownSymbolExpando.ts (1 errors) ==== ++ function f(): void {} ++ ~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ f[Symbol.iterator] = function() {} ++ +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments3_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments3_es6.d.ts new file mode 100644 index 0000000000000..5e52e6b9560c6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments3_es6.d.ts @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments3_es6.ts] //// + +//// [FunctionPropertyAssignments3_es6.ts] +var v = { *{ } } + +/// [Declarations] //// + + + +//// [/.src/FunctionPropertyAssignments3_es6.d.ts] +declare var v: invalid; +/// [Errors] //// + +FunctionPropertyAssignments3_es6.ts(1,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +FunctionPropertyAssignments3_es6.ts(1,12): error TS1003: Identifier expected. + + +==== FunctionPropertyAssignments3_es6.ts (2 errors) ==== + var v = { *{ } } + +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments5_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments5_es6.d.ts new file mode 100644 index 0000000000000..e621564268173 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments5_es6.d.ts @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts] //// + +//// [FunctionPropertyAssignments5_es6.ts] +var v = { *[foo()](): Generator { } } + +/// [Declarations] //// + + + +//// [/.src/FunctionPropertyAssignments5_es6.d.ts] +declare var v: invalid; +/// [Errors] //// + +FunctionPropertyAssignments5_es6.ts(1,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +FunctionPropertyAssignments5_es6.ts(1,13): error TS2304: Cannot find name 'foo'. + + +==== FunctionPropertyAssignments5_es6.ts (2 errors) ==== + var v = { *[foo()](): Generator { } } + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS2304: Cannot find name 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration5_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration5_es6.d.ts new file mode 100644 index 0000000000000..25945b5c96142 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration5_es6.d.ts @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration5_es6.ts] //// + +//// [MemberFunctionDeclaration5_es6.ts] +class C { + * +} + +/// [Declarations] //// + + + +//// [/.src/MemberFunctionDeclaration5_es6.d.ts] +declare class C { + (): invalid; +} +/// [Errors] //// + +MemberFunctionDeclaration5_es6.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +MemberFunctionDeclaration5_es6.ts(3,1): error TS1003: Identifier expected. + + +==== MemberFunctionDeclaration5_es6.ts (2 errors) ==== + class C { + * + +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + ~ +!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration6_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration6_es6.d.ts new file mode 100644 index 0000000000000..561aee9050358 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration6_es6.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration6_es6.ts] //// + +//// [MemberFunctionDeclaration6_es6.ts] +class C { + *foo +} + +/// [Declarations] //// + + + +//// [/.src/MemberFunctionDeclaration6_es6.d.ts] +declare class C { + foo(): invalid; +} +/// [Errors] //// + +MemberFunctionDeclaration6_es6.ts(2,5): error TS2391: Function implementation is missing or not immediately following the declaration. +MemberFunctionDeclaration6_es6.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +MemberFunctionDeclaration6_es6.ts(3,1): error TS1005: '(' expected. + + +==== MemberFunctionDeclaration6_es6.ts (3 errors) ==== + class C { + *foo + ~~~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + ~ +!!! error TS1005: '(' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnum1.d.ts new file mode 100644 index 0000000000000..150da67d6308b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnum1.d.ts @@ -0,0 +1,42 @@ +//// [tests/cases/compiler/ambientEnum1.ts] //// + +//// [ambientEnum1.ts] + declare enum E1 { + y = 4.23 + } + + // Ambient enum with computer member + declare enum E2 { + x = 'foo'.length + } + +/// [Declarations] //// + + + +//// [/.src/ambientEnum1.d.ts] +declare enum E1 { + y = 4.23 +} +declare enum E2 { + x +} +/// [Errors] //// + +ambientEnum1.ts(7,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +ambientEnum1.ts(7,13): error TS1066: In ambient enum declarations member initializer must be constant expression. + + +==== ambientEnum1.ts (2 errors) ==== + declare enum E1 { + y = 4.23 + } + + // Ambient enum with computer member + declare enum E2 { + x = 'foo'.length + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~ +!!! error TS1066: In ambient enum declarations member initializer must be constant expression. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnumDeclaration1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnumDeclaration1.d.ts new file mode 100644 index 0000000000000..0306136ba9cec --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnumDeclaration1.d.ts @@ -0,0 +1,51 @@ +//// [tests/cases/conformance/ambient/ambientEnumDeclaration1.ts] //// + +//// [ambientEnumDeclaration1.ts] +// In ambient enum declarations, all values specified in enum member declarations must be classified as constant enum expressions. + +declare enum E { + a = 10, + b = 10 + 1, + c = b, + d = (c) + 1, + e = 10 << 2 * 8, +} + +/// [Declarations] //// + + + +//// [/.src/ambientEnumDeclaration1.d.ts] +declare enum E { + a = 10, + b = 11, + c = 11, + d = 12, + e = 655360 +} +/// [Errors] //// + +ambientEnumDeclaration1.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +ambientEnumDeclaration1.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +ambientEnumDeclaration1.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +ambientEnumDeclaration1.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== ambientEnumDeclaration1.ts (4 errors) ==== + // In ambient enum declarations, all values specified in enum member declarations must be classified as constant enum expressions. + + declare enum E { + a = 10, + b = 10 + 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = b, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = (c) + 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + e = 10 << 2 * 8, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientErrors.d.ts new file mode 100644 index 0000000000000..048126c6cdfa4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientErrors.d.ts @@ -0,0 +1,211 @@ +//// [tests/cases/conformance/ambient/ambientErrors.ts] //// + +//// [ambientErrors.ts] +// Ambient variable with an initializer +declare var x = 4; + +// Ambient functions with invalid overloads +declare function fn(x: number): string; +declare function fn(x: 'foo'): number; + +// Ambient functions with duplicate signatures +declare function fn1(x: number): string; +declare function fn1(x: number): string; + +// Ambient function overloads that differ only by return type +declare function fn2(x: number): string; +declare function fn2(x: number): number; + +// Ambient function with default parameter values +declare function fn3(x: number = 3): any; + +// Ambient function with function body +declare function fn4(): void { }; + +// Ambient enum with non - integer literal constant member +declare enum E1 { + y = 4.23 +} + +// Ambient enum with computer member +declare enum E2 { + x = 'foo'.length +} + +// Ambient module with initializers for values, bodies for functions / classes +declare module M1 { + var x = 3; + function fn(): void { } + class C { + static x = 3; + y = 4; + constructor() { } + fn(): void { } + static sfn(): void { } + } +} + +// Ambient external module not in the global module +module M2 { + declare module 'nope' { } +} + +// Ambient external module with a string literal name that isn't a top level external module name +declare module '../foo' { } + +// Ambient external module with export assignment and other exported members +declare module 'bar' { + var n: any; + export var q: any; + export = n; +} + + +/// [Declarations] //// + + + +//// [/.src/ambientErrors.d.ts] +declare var x: number; +declare function fn(x: number): string; +declare function fn(x: 'foo'): number; +declare function fn1(x: number): string; +declare function fn1(x: number): string; +declare function fn2(x: number): string; +declare function fn2(x: number): number; +declare function fn3(x?: number): any; +declare function fn4(): void; +declare enum E1 { + y = 4.23 +} +declare enum E2 { + x +} +declare namespace M1 { + var x: number; + function fn(): void; + class C { + static x: number; + y: number; + constructor(); + fn(): void; + static sfn(): void; + } +} +declare namespace M2 { +} +declare module '../foo' { } +declare module 'bar' { + var n: any; + export var q: any; + export = n; +} +/// [Errors] //// + +ambientErrors.ts(2,17): error TS1039: Initializers are not allowed in ambient contexts. +ambientErrors.ts(17,22): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +ambientErrors.ts(20,30): error TS1183: An implementation cannot be declared in ambient contexts. +ambientErrors.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +ambientErrors.ts(29,9): error TS1066: In ambient enum declarations member initializer must be constant expression. +ambientErrors.ts(34,13): error TS1039: Initializers are not allowed in ambient contexts. +ambientErrors.ts(35,25): error TS1183: An implementation cannot be declared in ambient contexts. +ambientErrors.ts(37,20): error TS1039: Initializers are not allowed in ambient contexts. +ambientErrors.ts(38,13): error TS1039: Initializers are not allowed in ambient contexts. +ambientErrors.ts(39,23): error TS1183: An implementation cannot be declared in ambient contexts. +ambientErrors.ts(40,20): error TS1183: An implementation cannot be declared in ambient contexts. +ambientErrors.ts(41,28): error TS1183: An implementation cannot be declared in ambient contexts. +ambientErrors.ts(47,20): error TS2435: Ambient modules cannot be nested in other modules or namespaces. +ambientErrors.ts(51,16): error TS2436: Ambient module declaration cannot specify relative module name. +ambientErrors.ts(57,5): error TS2309: An export assignment cannot be used in a module with other exported elements. + + +==== ambientErrors.ts (15 errors) ==== + // Ambient variable with an initializer + declare var x = 4; + ~ +!!! error TS1039: Initializers are not allowed in ambient contexts. + + // Ambient functions with invalid overloads + declare function fn(x: number): string; + declare function fn(x: 'foo'): number; + + // Ambient functions with duplicate signatures + declare function fn1(x: number): string; + declare function fn1(x: number): string; + + // Ambient function overloads that differ only by return type + declare function fn2(x: number): string; + declare function fn2(x: number): number; + + // Ambient function with default parameter values + declare function fn3(x: number = 3): any; + ~~~~~~~~~~~~~ +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. + + // Ambient function with function body + declare function fn4(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + + // Ambient enum with non - integer literal constant member + declare enum E1 { + y = 4.23 + } + + // Ambient enum with computer member + declare enum E2 { + x = 'foo'.length + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~ +!!! error TS1066: In ambient enum declarations member initializer must be constant expression. + } + + // Ambient module with initializers for values, bodies for functions / classes + declare module M1 { + var x = 3; + ~ +!!! error TS1039: Initializers are not allowed in ambient contexts. + function fn(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + class C { + static x = 3; + ~ +!!! error TS1039: Initializers are not allowed in ambient contexts. + y = 4; + ~ +!!! error TS1039: Initializers are not allowed in ambient contexts. + constructor() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + fn(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static sfn(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + } + } + + // Ambient external module not in the global module + module M2 { + declare module 'nope' { } + ~~~~~~ +!!! error TS2435: Ambient modules cannot be nested in other modules or namespaces. + } + + // Ambient external module with a string literal name that isn't a top level external module name + declare module '../foo' { } + ~~~~~~~~ +!!! error TS2436: Ambient module declaration cannot specify relative module name. + + // Ambient external module with export assignment and other exported members + declare module 'bar' { + var n: any; + export var q: any; + export = n; + ~~~~~~~~~~~ +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. + } + \ 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..6a7bb8fae08f7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrayFakeFlatNoCrashInferenceDeclarations.d.ts @@ -0,0 +1,58 @@ +//// [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] //// + + + +//// [/.src/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; +/// [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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return flat(arr, depth); + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrowFunctionContexts.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrowFunctionContexts.d.ts new file mode 100644 index 0000000000000..28111ed0871ab --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrowFunctionContexts.d.ts @@ -0,0 +1,263 @@ +//// [tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts] //// + +//// [arrowFunctionContexts.ts] +// Arrow function used in with statement +with (window) { + var p = () => this; +} + +// Arrow function as argument to super call +class Base { + constructor(n: any) { } +} + +class Derived extends Base { + constructor() { + super(() => this); + } +} + +// Arrow function as function argument +window.setTimeout(() => null, 100); + +// Arrow function as value in array literal + +var obj = (n: number): string => ''; +var obj: { (n: number): string; }; // OK + +var arr: ((n: number) => string)[] = [(n: number) => '']; +var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) + +// Arrow function as enum value +enum E { + x = () => 4, // Error expected + y = (() => this).length // error, can't use this in enum +} + +// Arrow function as module variable initializer +module M { + export var a = (s: any): string => ''; + var b = (s) => s; +} + +// Repeat above for module members that are functions? (necessary to redo all of them?) +module M2 { + // Arrow function used in with statement + with (window) { + var p = () => this; + } + + // Arrow function as argument to super call + class Base { + constructor(n: any) { } + } + + class Derived extends Base { + constructor() { + super(() => this); + } + } + + // Arrow function as function argument + window.setTimeout(() => null, 100); + + // Arrow function as value in array literal + + var obj = (n: number) => ''; + var obj: { (n: number): string; }; // OK + + var arr = [(n: number) => '']; + var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) + + // Arrow function as enum value + enum E { + x = () => 4, // Error expected + y = (() => this).length + } + + // Arrow function as module variable initializer + module M { + export var a = (s) => ''; + var b = (s) => s; + } + +} + +// (ParamList) => { ... } is a generic arrow function +var generic1 = (n: T): T[] => [n]; +var generic1: { (n: T): T[] }; // Incorrect error, Bug 829597 +var generic2 = (n: T): T[] => { return [n]; }; +var generic2: { (n: T): T[] }; + +// ((ParamList) => { ... } ) is a type assertion to an arrow function +var asserted1 = ((n) => [n]); +var asserted1: any; +var asserted2 = ((n) => { return n; }); +var asserted2: any; + + + +/// [Declarations] //// + + + +//// [/.src/arrowFunctionContexts.d.ts] +declare class Base { + constructor(n: any); +} +declare class Derived extends Base { + constructor(); +} +declare var obj: (n: number) => string; +declare var obj: { + (n: number): string; +}; +declare var arr: ((n: number) => string)[]; +declare var arr: { + (n: number): string; +}[]; +declare enum E { + x,// Error expected + y +} +declare namespace M { + var a: (s: any) => string; +} +declare namespace M2 { +} +declare var generic1: (n: T) => T[]; +declare var generic1: { + (n: T): T[]; +}; +declare var generic2: (n: T) => T[]; +declare var generic2: { + (n: T): T[]; +}; +declare var asserted1: any; +declare var asserted1: any; +declare var asserted2: any; +declare var asserted2: any; +/// [Errors] //// + +arrowFunctionContexts.ts(2,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +arrowFunctionContexts.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +arrowFunctionContexts.ts(30,9): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. +arrowFunctionContexts.ts(31,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +arrowFunctionContexts.ts(31,16): error TS2332: 'this' cannot be referenced in current location. +arrowFunctionContexts.ts(43,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +arrowFunctionContexts.ts(71,13): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. +arrowFunctionContexts.ts(72,20): error TS2332: 'this' cannot be referenced in current location. + + +==== arrowFunctionContexts.ts (8 errors) ==== + // Arrow function used in with statement + with (window) { + ~~~~~~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + var p = () => this; + } + + // Arrow function as argument to super call + class Base { + constructor(n: any) { } + } + + class Derived extends Base { + constructor() { + super(() => this); + } + } + + // Arrow function as function argument + window.setTimeout(() => null, 100); + + // Arrow function as value in array literal + + var obj = (n: number): string => ''; + var obj: { (n: number): string; }; // OK + + var arr: ((n: number) => string)[] = [(n: number) => '']; + var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) + + // Arrow function as enum value + enum E { + x = () => 4, // Error expected + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. + y = (() => this).length // error, can't use this in enum + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ +!!! error TS2332: 'this' cannot be referenced in current location. + } + + // Arrow function as module variable initializer + module M { + export var a = (s: any): string => ''; + var b = (s) => s; + } + + // Repeat above for module members that are functions? (necessary to redo all of them?) + module M2 { + // Arrow function used in with statement + with (window) { + ~~~~~~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + var p = () => this; + } + + // Arrow function as argument to super call + class Base { + constructor(n: any) { } + } + + class Derived extends Base { + constructor() { + super(() => this); + } + } + + // Arrow function as function argument + window.setTimeout(() => null, 100); + + // Arrow function as value in array literal + + var obj = (n: number) => ''; + var obj: { (n: number): string; }; // OK + + var arr = [(n: number) => '']; + var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) + + // Arrow function as enum value + enum E { + x = () => 4, // Error expected + ~~~~~~~ +!!! error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. + y = (() => this).length + ~~~~ +!!! error TS2332: 'this' cannot be referenced in current location. + } + + // Arrow function as module variable initializer + module M { + export var a = (s) => ''; + var b = (s) => s; + } + + } + + // (ParamList) => { ... } is a generic arrow function + var generic1 = (n: T): T[] => [n]; + var generic1: { (n: T): T[] }; // Incorrect error, Bug 829597 + var generic2 = (n: T): T[] => { return [n]; }; + var generic2: { (n: T): T[] }; + + // ((ParamList) => { ... } ) is a type assertion to an arrow function + var asserted1 = ((n) => [n]); + var asserted1: any; + var asserted2 = ((n) => { return n; }); + var asserted2: any; + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier.d.ts new file mode 100644 index 0000000000000..7ce81bd8649a5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/compiler/classMemberWithMissingIdentifier.ts] //// + +//// [classMemberWithMissingIdentifier.ts] +class C { + public {}; +} + +/// [Declarations] //// + + + +//// [/.src/classMemberWithMissingIdentifier.d.ts] +declare class C { + : invalid; +} +/// [Errors] //// + +classMemberWithMissingIdentifier.ts(2,11): error TS1146: Declaration expected. +classMemberWithMissingIdentifier.ts(2,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +classMemberWithMissingIdentifier.ts(2,12): error TS1005: ';' expected. +classMemberWithMissingIdentifier.ts(3,1): error TS1128: Declaration or statement expected. + + +==== classMemberWithMissingIdentifier.ts (4 errors) ==== + class C { + public {}; + +!!! error TS1146: Declaration expected. + +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ';' expected. + } + ~ +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier2.d.ts new file mode 100644 index 0000000000000..6de5d29ec843e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier2.d.ts @@ -0,0 +1,47 @@ +//// [tests/cases/compiler/classMemberWithMissingIdentifier2.ts] //// + +//// [classMemberWithMissingIdentifier2.ts] +class C { + public {[name:string]:VariableDeclaration}; +} + +/// [Declarations] //// + + + +//// [/.src/classMemberWithMissingIdentifier2.d.ts] +declare class C { + : invalid; +} +/// [Errors] //// + +classMemberWithMissingIdentifier2.ts(2,11): error TS1146: Declaration expected. +classMemberWithMissingIdentifier2.ts(2,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +classMemberWithMissingIdentifier2.ts(2,12): error TS1005: ';' expected. +classMemberWithMissingIdentifier2.ts(2,18): error TS1005: ',' expected. +classMemberWithMissingIdentifier2.ts(2,19): error TS2693: 'string' only refers to a type, but is being used as a value here. +classMemberWithMissingIdentifier2.ts(2,26): error TS1005: ';' expected. +classMemberWithMissingIdentifier2.ts(2,27): error TS2304: Cannot find name 'VariableDeclaration'. +classMemberWithMissingIdentifier2.ts(3,1): error TS1128: Declaration or statement expected. + + +==== classMemberWithMissingIdentifier2.ts (8 errors) ==== + class C { + public {[name:string]:VariableDeclaration}; + +!!! error TS1146: Declaration expected. + +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1005: ',' expected. + ~~~~~~ +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. + ~ +!!! error TS1005: ';' expected. + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'VariableDeclaration'. + } + ~ +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/collisionCodeGenEnumWithEnumMemberConflict.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/collisionCodeGenEnumWithEnumMemberConflict.d.ts new file mode 100644 index 0000000000000..d3ec86bcde043 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/collisionCodeGenEnumWithEnumMemberConflict.d.ts @@ -0,0 +1,29 @@ +//// [tests/cases/compiler/collisionCodeGenEnumWithEnumMemberConflict.ts] //// + +//// [collisionCodeGenEnumWithEnumMemberConflict.ts] +enum Color { + Color, + Thing = Color +} + +/// [Declarations] //// + + + +//// [/.src/collisionCodeGenEnumWithEnumMemberConflict.d.ts] +declare enum Color { + Color = 0, + Thing = 0 +} +/// [Errors] //// + +collisionCodeGenEnumWithEnumMemberConflict.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== collisionCodeGenEnumWithEnumMemberConflict.ts (1 errors) ==== + enum Color { + Color, + Thing = Color + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commonMissingSemicolons.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commonMissingSemicolons.d.ts new file mode 100644 index 0000000000000..af2bdf01876ff --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commonMissingSemicolons.d.ts @@ -0,0 +1,453 @@ +//// [tests/cases/compiler/commonMissingSemicolons.ts] //// + +//// [commonMissingSemicolons.ts] +async function myAsyncFunction1(): Promise {} +asynd function myAsyncFunction2(): void {} +sasync function myAsyncFunction3(): void {} + +// Arrow functions don't (yet?) parse as nicely as standalone functions. +// Eventually it would be good to get them the same "did you mean" for typos such as "asyncd". +const myAsyncArrow1 = async (): Promise => 3; +const myAsyncArrow2: any = asyncd () => 3; + +class MyClass1 {} +clasd MyClass2 {} +classs MyClass3 {} + +const myConst1 = 1; +consd myConst2 = 1; +constd myConst3 = 1; + +declare const myDeclareConst1: 1; +declared const myDeclareConst2: 1; +declare constd myDeclareConst3: 1; +declared constd myDeclareConst4: 1; +declareconst myDeclareConst5; + +function myFunction1(): void { } +functiond myFunction2() { } +function function(): void { } +functionMyFunction; + +interface myInterface1 { } +interfaced myInterface2 { } +interface interface { } +interface { } +interface void { } +interfaceMyInterface { } + +let let = 1; +let let1 = 1; +letd let2 = 1; +letMyLet; + +type type; +type type1 = {}; +type type2 = type; +type type3 = {}; +typed type4 = {} +typed type5 = type; +typeMyType; + +var myVar1 = 1; +vard myVar2 = 1; +varMyVar; + +class NoSemicolonClassA { + ['a'] = 0 + {} +} + +class NoSemicolonClassB { + ['a'] = 0 + {} +} + +class NoSemicolonClassC { + ['a'] = 0; + {} +} + +class NoSemicolonClassD { + ['a']: any = 0 + ['b']() {} +} + +class NoSemicolonClassE { + ['a']: any = 0 + ['b']() { + c: true + } +} + + +/// [Declarations] //// + + + +//// [/.src/commonMissingSemicolons.d.ts] +declare function myAsyncFunction1(): Promise; +declare function myAsyncFunction2(): void; +declare function myAsyncFunction3(): void; +declare const myAsyncArrow1: () => Promise; +declare const myAsyncArrow2: any; +declare class MyClass1 { +} +declare const myConst1 = 1; +declare const myDeclareConst1: 1; +declare const myDeclareConst2: 1; +declare function myFunction1(): void; +declare function (): invalid; +interface myInterface1 { +} +interface interface { +} +declare let let: number; +declare let let1: number; +type type = ; +type type1 = {}; +type type2 = type; +type type3 = {}; +declare var myVar1: number; +declare class NoSemicolonClassA { + ['a']: number; +} +declare class NoSemicolonClassB { + ['a']: number; +} +declare class NoSemicolonClassC { + ['a']: number; +} +declare class NoSemicolonClassD { + ['a']: any; +} +declare class NoSemicolonClassE { + ['a']: any; +} +/// [Errors] //// + +commonMissingSemicolons.ts(1,36): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +commonMissingSemicolons.ts(2,1): error TS1435: Unknown keyword or identifier. Did you mean 'async'? +commonMissingSemicolons.ts(2,1): error TS2304: Cannot find name 'asynd'. +commonMissingSemicolons.ts(3,1): error TS1435: Unknown keyword or identifier. Did you mean 'async'? +commonMissingSemicolons.ts(3,1): error TS2304: Cannot find name 'sasync'. +commonMissingSemicolons.ts(7,33): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +commonMissingSemicolons.ts(8,28): error TS2304: Cannot find name 'asyncd'. +commonMissingSemicolons.ts(8,38): error TS1005: ';' expected. +commonMissingSemicolons.ts(11,1): error TS1435: Unknown keyword or identifier. Did you mean 'class'? +commonMissingSemicolons.ts(11,1): error TS2304: Cannot find name 'clasd'. +commonMissingSemicolons.ts(11,7): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(11,7): error TS2552: Cannot find name 'MyClass2'. Did you mean 'MyClass1'? +commonMissingSemicolons.ts(12,1): error TS1435: Unknown keyword or identifier. Did you mean 'class'? +commonMissingSemicolons.ts(12,1): error TS2304: Cannot find name 'classs'. +commonMissingSemicolons.ts(12,8): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(12,8): error TS2552: Cannot find name 'MyClass3'. Did you mean 'MyClass1'? +commonMissingSemicolons.ts(15,1): error TS1435: Unknown keyword or identifier. Did you mean 'const'? +commonMissingSemicolons.ts(15,1): error TS2304: Cannot find name 'consd'. +commonMissingSemicolons.ts(15,7): error TS2552: Cannot find name 'myConst2'. Did you mean 'myConst1'? +commonMissingSemicolons.ts(16,1): error TS1435: Unknown keyword or identifier. Did you mean 'const'? +commonMissingSemicolons.ts(16,1): error TS2304: Cannot find name 'constd'. +commonMissingSemicolons.ts(16,8): error TS2304: Cannot find name 'myConst3'. +commonMissingSemicolons.ts(19,1): error TS1435: Unknown keyword or identifier. Did you mean 'declare'? +commonMissingSemicolons.ts(19,1): error TS2304: Cannot find name 'declared'. +commonMissingSemicolons.ts(20,1): error TS2304: Cannot find name 'declare'. +commonMissingSemicolons.ts(20,9): error TS1435: Unknown keyword or identifier. Did you mean 'const'? +commonMissingSemicolons.ts(20,9): error TS2304: Cannot find name 'constd'. +commonMissingSemicolons.ts(21,1): error TS1435: Unknown keyword or identifier. Did you mean 'declare'? +commonMissingSemicolons.ts(21,1): error TS2304: Cannot find name 'declared'. +commonMissingSemicolons.ts(21,10): error TS1435: Unknown keyword or identifier. Did you mean 'const'? +commonMissingSemicolons.ts(21,10): error TS2304: Cannot find name 'constd'. +commonMissingSemicolons.ts(22,1): error TS1435: Unknown keyword or identifier. Did you mean 'declare const'? +commonMissingSemicolons.ts(22,1): error TS2304: Cannot find name 'declareconst'. +commonMissingSemicolons.ts(22,14): error TS2304: Cannot find name 'myDeclareConst5'. +commonMissingSemicolons.ts(25,1): error TS1435: Unknown keyword or identifier. Did you mean 'function'? +commonMissingSemicolons.ts(25,1): error TS2304: Cannot find name 'functiond'. +commonMissingSemicolons.ts(25,11): error TS2304: Cannot find name 'myFunction2'. +commonMissingSemicolons.ts(25,25): error TS1005: ';' expected. +commonMissingSemicolons.ts(26,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +commonMissingSemicolons.ts(26,10): error TS1359: Identifier expected. 'function' is a reserved word that cannot be used here. +commonMissingSemicolons.ts(26,18): error TS1003: Identifier expected. +commonMissingSemicolons.ts(27,1): error TS2304: Cannot find name 'functionMyFunction'. +commonMissingSemicolons.ts(30,1): error TS1435: Unknown keyword or identifier. Did you mean 'interface'? +commonMissingSemicolons.ts(30,1): error TS2304: Cannot find name 'interfaced'. +commonMissingSemicolons.ts(30,12): error TS1435: Unknown keyword or identifier. Did you mean 'interface'? +commonMissingSemicolons.ts(30,12): error TS2304: Cannot find name 'myInterface2'. +commonMissingSemicolons.ts(32,1): error TS2693: 'interface' only refers to a type, but is being used as a value here. +commonMissingSemicolons.ts(32,11): error TS1438: Interface must be given a name. +commonMissingSemicolons.ts(33,1): error TS2693: 'interface' only refers to a type, but is being used as a value here. +commonMissingSemicolons.ts(33,11): error TS2427: Interface name cannot be 'void'. +commonMissingSemicolons.ts(34,1): error TS1435: Unknown keyword or identifier. Did you mean 'interface MyInterface'? +commonMissingSemicolons.ts(34,1): error TS2304: Cannot find name 'interfaceMyInterface'. +commonMissingSemicolons.ts(38,1): error TS1435: Unknown keyword or identifier. Did you mean 'let'? +commonMissingSemicolons.ts(38,1): error TS2304: Cannot find name 'letd'. +commonMissingSemicolons.ts(38,6): error TS2304: Cannot find name 'let2'. +commonMissingSemicolons.ts(39,1): error TS2304: Cannot find name 'letMyLet'. +commonMissingSemicolons.ts(41,10): error TS4081: Exported type alias 'type' has or is using private name ''. +commonMissingSemicolons.ts(41,10): error TS1005: '=' expected. +commonMissingSemicolons.ts(45,1): error TS1435: Unknown keyword or identifier. Did you mean 'type'? +commonMissingSemicolons.ts(45,1): error TS2304: Cannot find name 'typed'. +commonMissingSemicolons.ts(45,7): error TS2304: Cannot find name 'type4'. +commonMissingSemicolons.ts(46,1): error TS1435: Unknown keyword or identifier. Did you mean 'type'? +commonMissingSemicolons.ts(46,1): error TS2304: Cannot find name 'typed'. +commonMissingSemicolons.ts(46,7): error TS2304: Cannot find name 'type5'. +commonMissingSemicolons.ts(46,15): error TS2693: 'type' only refers to a type, but is being used as a value here. +commonMissingSemicolons.ts(47,1): error TS2304: Cannot find name 'typeMyType'. +commonMissingSemicolons.ts(50,1): error TS1435: Unknown keyword or identifier. Did you mean 'var'? +commonMissingSemicolons.ts(50,1): error TS2304: Cannot find name 'vard'. +commonMissingSemicolons.ts(50,6): error TS2304: Cannot find name 'myVar2'. +commonMissingSemicolons.ts(51,1): error TS2304: Cannot find name 'varMyVar'. +commonMissingSemicolons.ts(55,3): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +commonMissingSemicolons.ts(56,1): error TS1128: Declaration or statement expected. +commonMissingSemicolons.ts(60,3): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +commonMissingSemicolons.ts(61,1): error TS1128: Declaration or statement expected. +commonMissingSemicolons.ts(65,3): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +commonMissingSemicolons.ts(66,1): error TS1128: Declaration or statement expected. +commonMissingSemicolons.ts(70,11): error TS1005: ';' expected. +commonMissingSemicolons.ts(71,1): error TS1128: Declaration or statement expected. +commonMissingSemicolons.ts(75,11): error TS1005: ';' expected. +commonMissingSemicolons.ts(78,1): error TS1128: Declaration or statement expected. + + +==== commonMissingSemicolons.ts (80 errors) ==== + async function myAsyncFunction1(): Promise {} + ~~~~~~~~~~~~~ +!!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + asynd function myAsyncFunction2(): void {} + ~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'async'? + ~~~~~ +!!! error TS2304: Cannot find name 'asynd'. + sasync function myAsyncFunction3(): void {} + ~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'async'? + ~~~~~~ +!!! error TS2304: Cannot find name 'sasync'. + + // Arrow functions don't (yet?) parse as nicely as standalone functions. + // Eventually it would be good to get them the same "did you mean" for typos such as "asyncd". + const myAsyncArrow1 = async (): Promise => 3; + ~~~~~~~~~~~~~~~ +!!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + const myAsyncArrow2: any = asyncd () => 3; + ~~~~~~ +!!! error TS2304: Cannot find name 'asyncd'. + ~~ +!!! error TS1005: ';' expected. + + class MyClass1 {} + clasd MyClass2 {} + ~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'class'? + ~~~~~ +!!! error TS2304: Cannot find name 'clasd'. + ~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~ +!!! error TS2552: Cannot find name 'MyClass2'. Did you mean 'MyClass1'? +!!! related TS2728 commonMissingSemicolons.ts:10:7: 'MyClass1' is declared here. + classs MyClass3 {} + ~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'class'? + ~~~~~~ +!!! error TS2304: Cannot find name 'classs'. + ~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~ +!!! error TS2552: Cannot find name 'MyClass3'. Did you mean 'MyClass1'? +!!! related TS2728 commonMissingSemicolons.ts:10:7: 'MyClass1' is declared here. + + const myConst1 = 1; + consd myConst2 = 1; + ~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? + ~~~~~ +!!! error TS2304: Cannot find name 'consd'. + ~~~~~~~~ +!!! error TS2552: Cannot find name 'myConst2'. Did you mean 'myConst1'? +!!! related TS2728 commonMissingSemicolons.ts:14:7: 'myConst1' is declared here. + constd myConst3 = 1; + ~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? + ~~~~~~ +!!! error TS2304: Cannot find name 'constd'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'myConst3'. + + declare const myDeclareConst1: 1; + declared const myDeclareConst2: 1; + ~~~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'declare'? + ~~~~~~~~ +!!! error TS2304: Cannot find name 'declared'. + declare constd myDeclareConst3: 1; + ~~~~~~~ +!!! error TS2304: Cannot find name 'declare'. + ~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? + ~~~~~~ +!!! error TS2304: Cannot find name 'constd'. + declared constd myDeclareConst4: 1; + ~~~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'declare'? + ~~~~~~~~ +!!! error TS2304: Cannot find name 'declared'. + ~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? + ~~~~~~ +!!! error TS2304: Cannot find name 'constd'. + declareconst myDeclareConst5; + ~~~~~~~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'declare const'? + ~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'declareconst'. + ~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'myDeclareConst5'. + + function myFunction1(): void { } + functiond myFunction2() { } + ~~~~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'function'? + ~~~~~~~~~ +!!! error TS2304: Cannot find name 'functiond'. + ~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'myFunction2'. + ~ +!!! error TS1005: ';' expected. + function function(): void { } + +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~ +!!! error TS1359: Identifier expected. 'function' is a reserved word that cannot be used here. + ~ +!!! error TS1003: Identifier expected. + functionMyFunction; + ~~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'functionMyFunction'. + + interface myInterface1 { } + interfaced myInterface2 { } + ~~~~~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'interface'? + ~~~~~~~~~~ +!!! error TS2304: Cannot find name 'interfaced'. + ~~~~~~~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'interface'? + ~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'myInterface2'. + interface interface { } + interface { } + ~~~~~~~~~ +!!! error TS2693: 'interface' only refers to a type, but is being used as a value here. + ~ +!!! error TS1438: Interface must be given a name. + interface void { } + ~~~~~~~~~ +!!! error TS2693: 'interface' only refers to a type, but is being used as a value here. + ~~~~ +!!! error TS2427: Interface name cannot be 'void'. + interfaceMyInterface { } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'interface MyInterface'? + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'interfaceMyInterface'. + + let let = 1; + let let1 = 1; + letd let2 = 1; + ~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'let'? + ~~~~ +!!! error TS2304: Cannot find name 'letd'. + ~~~~ +!!! error TS2304: Cannot find name 'let2'. + letMyLet; + ~~~~~~~~ +!!! error TS2304: Cannot find name 'letMyLet'. + + type type; + +!!! error TS4081: Exported type alias 'type' has or is using private name ''. + ~ +!!! error TS1005: '=' expected. + type type1 = {}; + type type2 = type; + type type3 = {}; + typed type4 = {} + ~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'type'? + ~~~~~ +!!! error TS2304: Cannot find name 'typed'. + ~~~~~ +!!! error TS2304: Cannot find name 'type4'. + typed type5 = type; + ~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'type'? + ~~~~~ +!!! error TS2304: Cannot find name 'typed'. + ~~~~~ +!!! error TS2304: Cannot find name 'type5'. + ~~~~ +!!! error TS2693: 'type' only refers to a type, but is being used as a value here. + typeMyType; + ~~~~~~~~~~ +!!! error TS2304: Cannot find name 'typeMyType'. + + var myVar1 = 1; + vard myVar2 = 1; + ~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'var'? + ~~~~ +!!! error TS2304: Cannot find name 'vard'. + ~~~~~~ +!!! error TS2304: Cannot find name 'myVar2'. + varMyVar; + ~~~~~~~~ +!!! error TS2304: Cannot find name 'varMyVar'. + + class NoSemicolonClassA { + ['a'] = 0 + {} + ~ +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. + } + ~ +!!! error TS1128: Declaration or statement expected. + + class NoSemicolonClassB { + ['a'] = 0 + {} + ~ +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. + } + ~ +!!! error TS1128: Declaration or statement expected. + + class NoSemicolonClassC { + ['a'] = 0; + {} + ~ +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. + } + ~ +!!! error TS1128: Declaration or statement expected. + + class NoSemicolonClassD { + ['a']: any = 0 + ['b']() {} + ~ +!!! error TS1005: ';' expected. + } + ~ +!!! error TS1128: Declaration or statement expected. + + class NoSemicolonClassE { + ['a']: any = 0 + ['b']() { + ~ +!!! error TS1005: ';' expected. + c: true + } + } + ~ +!!! error TS1128: Declaration or statement expected. + \ No newline at end of file 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..86b8bb9a8978b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedEnumTypeWidening.d.ts @@ -0,0 +1,219 @@ +//// [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] //// + + + +//// [/.src/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; +/// [Errors] //// + +computedEnumTypeWidening.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedEnumTypeWidening.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedEnumTypeWidening.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedEnumTypeWidening.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedEnumTypeWidening.ts (4 errors) ==== + declare function computed(x: number): number; + + enum E { + A = computed(0), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + B = computed(1), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + C = computed(2), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + D = computed(3), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + 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/computedPropertyNames10_ES5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES5.d.ts new file mode 100644 index 0000000000000..697f07a9dd975 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES5.d.ts @@ -0,0 +1,65 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts] //// + +//// [computedPropertyNames10_ES5.ts] +var s: string; +var n: number; +var a: any; +var v = { + [s](): void { }, + [n](): void { }, + [s + s](): void { }, + [s + n](): void { }, + [+s](): void { }, + [""](): void { }, + [0](): void { }, + [a](): void { }, + [true](): void { }, + [`hello bye`](): void { }, + [`hello ${a} bye`](): void { } +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames10_ES5.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare var v: invalid; +/// [Errors] //// + +computedPropertyNames10_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames10_ES5.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames10_ES5.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames10_ES5.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames10_ES5.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNames10_ES5.ts (5 errors) ==== + var s: string; + var n: number; + var a: any; + var v = { + [s](): void { }, + [n](): void { }, + [s + s](): void { }, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [s + n](): void { }, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [+s](): void { }, + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [""](): void { }, + [0](): void { }, + [a](): void { }, + [true](): void { }, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [`hello bye`](): void { }, + [`hello ${a} bye`](): void { } + ~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES6.d.ts new file mode 100644 index 0000000000000..ff9d52be28a5d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES6.d.ts @@ -0,0 +1,65 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts] //// + +//// [computedPropertyNames10_ES6.ts] +var s: string; +var n: number; +var a: any; +var v = { + [s](): void { }, + [n](): void { }, + [s + s](): void { }, + [s + n](): void { }, + [+s](): void { }, + [""](): void { }, + [0](): void { }, + [a](): void { }, + [true](): void { }, + [`hello bye`](): void { }, + [`hello ${a} bye`](): void { } +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames10_ES6.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare var v: invalid; +/// [Errors] //// + +computedPropertyNames10_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames10_ES6.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames10_ES6.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames10_ES6.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames10_ES6.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNames10_ES6.ts (5 errors) ==== + var s: string; + var n: number; + var a: any; + var v = { + [s](): void { }, + [n](): void { }, + [s + s](): void { }, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [s + n](): void { }, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [+s](): void { }, + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [""](): void { }, + [0](): void { }, + [a](): void { }, + [true](): void { }, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [`hello bye`](): void { }, + [`hello ${a} bye`](): void { } + ~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum1.d.ts new file mode 100644 index 0000000000000..c0d04796805ba --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum1.d.ts @@ -0,0 +1,70 @@ +//// [tests/cases/conformance/constEnums/constEnum1.ts] //// + +//// [constEnum1.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. + +const enum E { + a = 10, + b = a, + c = (a+1), + e, + d = ~e, + f = a << 2 >> 1, + g = a << 2 >>> 1, + h = a | b +} + +/// [Declarations] //// + + + +//// [/.src/constEnum1.d.ts] +declare const enum E { + a = 10, + b = 10, + c = 11, + e = 12, + d = -13, + f = 20, + g = 20, + h = 10 +} +/// [Errors] //// + +constEnum1.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnum1.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnum1.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnum1.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnum1.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnum1.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== constEnum1.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. + + const enum E { + a = 10, + b = a, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = (a+1), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + e, + d = ~e, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + f = a << 2 >> 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + g = a << 2 >>> 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + h = a | b + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file 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..5b73750a54411 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum2.d.ts @@ -0,0 +1,65 @@ +//// [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] //// + + + +//// [/.src/constEnum2.d.ts] +declare const CONST: number; +declare const enum D { + d = 10, + e, + f, + g +} +/// [Errors] //// + +constEnum2.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnum2.ts(10,9): error TS2474: const enum member initializers must be constant expressions. +constEnum2.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnum2.ts(11,9): error TS2474: const enum member initializers must be constant expressions. +constEnum2.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. + f = d - (100 * Math.floor(Math.random() % 8)), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. + g = CONST, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! 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/constEnumDeclarations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumDeclarations.d.ts new file mode 100644 index 0000000000000..930d923417de0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumDeclarations.d.ts @@ -0,0 +1,49 @@ +//// [tests/cases/compiler/constEnumDeclarations.ts] //// + +//// [constEnumDeclarations.ts] +const enum E { + A = 1, + B = 2, + C = A | B +} + +const enum E2 { + A = 1, + B, + C +} + +/// [Declarations] //// + + + +//// [/.src/constEnumDeclarations.d.ts] +declare const enum E { + A = 1, + B = 2, + C = 3 +} +declare const enum E2 { + A = 1, + B = 2, + C = 3 +} +/// [Errors] //// + +constEnumDeclarations.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== constEnumDeclarations.ts (1 errors) ==== + const enum E { + A = 1, + B = 2, + C = A | B + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + const enum E2 { + A = 1, + B, + C + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumErrors.d.ts new file mode 100644 index 0000000000000..2c39c8fb13529 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumErrors.d.ts @@ -0,0 +1,210 @@ +//// [tests/cases/compiler/constEnumErrors.ts] //// + +//// [constEnumErrors.ts] +const enum E { + A +} + +module E { + var x = 1; +} + +const enum E1 { + // illegal case + // forward reference to the element of the same enum + X = Y, + // forward reference to the element of the same enum + Y = E1.Z, + Y1 = E1["Z"] +} + +const enum E2 { + A +} + +var y0: any = E2[1] +var name = "A"; +var y1: any = E2[name]; +var y2: any = E2[`${name}`]; + +var x: typeof E2 = E2; +var y: (typeof E2)[] = [E2]; + +function foo(t: any): void { +} + +foo(E2); + +const enum NaNOrInfinity { + A = 9007199254740992, + B = A * A, + C = B * B, + D = C * C, + E = D * D, + F = E * E, // overflow + G = 1 / 0, // overflow + H = 0 / 0 // NaN +} + +/// [Declarations] //// + + + +//// [/.src/constEnumErrors.d.ts] +declare const enum E { + A = 0 +} +declare namespace E { +} +declare const enum E1 { + X, + Y, + Y1 +} +declare const enum E2 { + A = 0 +} +declare var y0: any; +declare var name: string; +declare var y1: any; +declare var y2: any; +declare var x: typeof E2; +declare var y: (typeof E2)[]; +declare function foo(t: any): void; +declare const enum NaNOrInfinity { + A = 9007199254740992, + B = 8.112963841460668e+31, + C = 6.582018229284824e+63, + D = 4.332296397063773e+127, + E = 1.876879207201175e+255, + F = Infinity,// overflow + G = Infinity,// overflow + H = NaN +} +/// [Errors] //// + +constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +constEnumErrors.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. +constEnumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. +constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. +constEnumErrors.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(15,10): error TS2474: const enum member initializers must be constant expressions. +constEnumErrors.ts(15,13): error TS2339: Property 'Z' does not exist on type 'typeof E1'. +constEnumErrors.ts(22,18): error TS2476: A const enum member can only be accessed using a string literal. +constEnumErrors.ts(24,18): error TS2476: A const enum member can only be accessed using a string literal. +constEnumErrors.ts(25,18): error TS2476: A const enum member can only be accessed using a string literal. +constEnumErrors.ts(27,20): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. +constEnumErrors.ts(28,25): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. +constEnumErrors.ts(33,5): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. +constEnumErrors.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(39,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(41,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(41,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. +constEnumErrors.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(42,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. +constEnumErrors.ts(43,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. + + +==== constEnumErrors.ts (26 errors) ==== + const enum E { + ~ +!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. + A + } + + module E { + ~ +!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. + var x = 1; + } + + const enum E1 { + // illegal case + // forward reference to the element of the same enum + X = Y, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + // forward reference to the element of the same enum + Y = E1.Z, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. + ~ +!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. + Y1 = E1["Z"] + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. + ~~~ +!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. + } + + const enum E2 { + A + } + + var y0: any = E2[1] + ~ +!!! error TS2476: A const enum member can only be accessed using a string literal. + var name = "A"; + var y1: any = E2[name]; + ~~~~ +!!! error TS2476: A const enum member can only be accessed using a string literal. + var y2: any = E2[`${name}`]; + ~~~~~~~~~ +!!! error TS2476: A const enum member can only be accessed using a string literal. + + var x: typeof E2 = E2; + ~~ +!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. + var y: (typeof E2)[] = [E2]; + ~~ +!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. + + function foo(t: any): void { + } + + foo(E2); + ~~ +!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. + + const enum NaNOrInfinity { + A = 9007199254740992, + B = A * A, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + C = B * B, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + D = C * C, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + E = D * D, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + F = E * E, // overflow + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + G = 1 / 0, // overflow + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + H = 0 / 0 // NaN + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumNamespaceReferenceCausesNoImport2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumNamespaceReferenceCausesNoImport2.d.ts new file mode 100644 index 0000000000000..6f7abd48e29a4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumNamespaceReferenceCausesNoImport2.d.ts @@ -0,0 +1,71 @@ +//// [tests/cases/compiler/constEnumNamespaceReferenceCausesNoImport2.ts] //// + +//// [index.ts] +import Foo = require("./reexport"); +function check(x: Foo.ConstFooEnum): void { + switch (x) { + case Foo.ConstFooEnum.Some: + break; + } +} +//// [foo.ts] +export module ConstEnumOnlyModule { + export const enum ConstFooEnum { + Some, + Values, + Here + } +} + +//// [reexport.ts] +import * as Foo from "./foo"; +export = Foo.ConstEnumOnlyModule; + + +/// [Declarations] //// + + + +//// [/.src/foo.d.ts] +export declare namespace ConstEnumOnlyModule { + const enum ConstFooEnum { + Some = 0, + Values = 1, + Here = 2 + } +} + +//// [/.src/index.d.ts] +export {}; + +//// [/.src/reexport.d.ts] +declare const _default: invalid; +export = _default; +/// [Errors] //// + +reexport.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== index.ts (0 errors) ==== + import Foo = require("./reexport"); + function check(x: Foo.ConstFooEnum): void { + switch (x) { + case Foo.ConstFooEnum.Some: + break; + } + } +==== foo.ts (0 errors) ==== + export module ConstEnumOnlyModule { + export const enum ConstFooEnum { + Some, + Values, + Here + } + } + +==== reexport.ts (1 errors) ==== + import * as Foo from "./foo"; + export = Foo.ConstEnumOnlyModule; + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess1.d.ts new file mode 100644 index 0000000000000..6b295e1503a18 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess1.d.ts @@ -0,0 +1,100 @@ +//// [tests/cases/conformance/constEnums/constEnumPropertyAccess1.ts] //// + +//// [constEnumPropertyAccess1.ts] +// constant enum declarations are completely erased in the emitted JavaScript code. +// it is an error to reference a constant enum object in any other context +// than a property access that selects one of the enum's members + +const enum G { + A = 1, + B = 2, + C = A + B, + D = A * 2 +} + +var o: { + [idx: number]: boolean +} = { + 1: true + }; + +var a: G = G.A; +var a1: G = G["A"]; +var g: boolean = o[G.A]; + +class C { + [G.A](): void { } + get [G.B](): number { + return true; + } + set [G.B](x: number) { } +} + + + +/// [Declarations] //// + + + +//// [/.src/constEnumPropertyAccess1.d.ts] +declare const enum G { + A = 1, + B = 2, + C = 3, + D = 2 +} +declare var o: { + [idx: number]: boolean; +}; +declare var a: G; +declare var a1: G; +declare var g: boolean; +declare class C { + [G.A](): void; + get [G.B](): number; + set [G.B](x: number); +} +/// [Errors] //// + +constEnumPropertyAccess1.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumPropertyAccess1.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumPropertyAccess1.ts(25,9): error TS2322: Type 'boolean' is not assignable to type 'number'. + + +==== constEnumPropertyAccess1.ts (3 errors) ==== + // constant enum declarations are completely erased in the emitted JavaScript code. + // it is an error to reference a constant enum object in any other context + // than a property access that selects one of the enum's members + + const enum G { + A = 1, + B = 2, + C = A + B, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + D = A * 2 + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + var o: { + [idx: number]: boolean + } = { + 1: true + }; + + var a: G = G.A; + var a1: G = G["A"]; + var g: boolean = o[G.A]; + + class C { + [G.A](): void { } + get [G.B](): number { + return true; + ~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + } + set [G.B](x: number) { } + } + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess2.d.ts new file mode 100644 index 0000000000000..981f27784e941 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess2.d.ts @@ -0,0 +1,80 @@ +//// [tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts] //// + +//// [constEnumPropertyAccess2.ts] +// constant enum declarations are completely erased in the emitted JavaScript code. +// it is an error to reference a constant enum object in any other context +// than a property access that selects one of the enum's members + +const enum G { + A = 1, + B = 2, + C = A + B, + D = A * 2 +} + +// Error from referring constant enum in any other context than a property access +var z: typeof G = G; +var z1: any = G[G.A]; +var g: G; +g = "string"; +function foo(x: G): void { } +G.B = 3; + + +/// [Declarations] //// + + + +//// [/.src/constEnumPropertyAccess2.d.ts] +declare const enum G { + A = 1, + B = 2, + C = 3, + D = 2 +} +declare var z: typeof G; +declare var z1: any; +declare var g: G; +declare function foo(x: G): void; +/// [Errors] //// + +constEnumPropertyAccess2.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumPropertyAccess2.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumPropertyAccess2.ts(13,19): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. +constEnumPropertyAccess2.ts(14,17): error TS2476: A const enum member can only be accessed using a string literal. +constEnumPropertyAccess2.ts(16,1): error TS2322: Type '"string"' is not assignable to type 'G'. +constEnumPropertyAccess2.ts(18,3): error TS2540: Cannot assign to 'B' because it is a read-only property. + + +==== constEnumPropertyAccess2.ts (6 errors) ==== + // constant enum declarations are completely erased in the emitted JavaScript code. + // it is an error to reference a constant enum object in any other context + // than a property access that selects one of the enum's members + + const enum G { + A = 1, + B = 2, + C = A + B, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + D = A * 2 + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Error from referring constant enum in any other context than a property access + var z: typeof G = G; + ~ +!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. + var z1: any = G[G.A]; + ~~~ +!!! error TS2476: A const enum member can only be accessed using a string literal. + var g: G; + g = "string"; + ~ +!!! error TS2322: Type '"string"' is not assignable to type 'G'. + function foo(x: G): void { } + G.B = 3; + ~ +!!! error TS2540: Cannot assign to 'B' because it is a read-only property. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess3.d.ts new file mode 100644 index 0000000000000..c0467afcb1f54 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess3.d.ts @@ -0,0 +1,71 @@ +//// [tests/cases/conformance/constEnums/constEnumPropertyAccess3.ts] //// + +//// [constEnumPropertyAccess3.ts] +const enum E { + A = ~1, + B = -1, + C = ~(1 + 1), + D = -(1 + 2), + E = 1 - 10, +} + +E.A.toString(); +E.B.toString(); +E.C.toString(); +E.D.toString(); + +E["A"].toString(); +E["B"].toString(); +E["C"].toString(); +E["D"].toString(); +E["E"].toString(); + + +/// [Declarations] //// + + + +//// [/.src/constEnumPropertyAccess3.d.ts] +declare const enum E { + A = -2, + B = -1, + C = -3, + D = -3, + E = -9 +} +/// [Errors] //// + +constEnumPropertyAccess3.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumPropertyAccess3.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumPropertyAccess3.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumPropertyAccess3.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== constEnumPropertyAccess3.ts (4 errors) ==== + const enum E { + A = ~1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + B = -1, + C = ~(1 + 1), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + D = -(1 + 2), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + E = 1 - 10, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + E.A.toString(); + E.B.toString(); + E.C.toString(); + E.D.toString(); + + E["A"].toString(); + E["B"].toString(); + E["C"].toString(); + E["D"].toString(); + E["E"].toString(); + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnums.d.ts new file mode 100644 index 0000000000000..3fb972e27db4a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnums.d.ts @@ -0,0 +1,551 @@ +//// [tests/cases/compiler/constEnums.ts] //// + +//// [constEnums.ts] +const enum Enum1 { + A0 = 100, +} + +const enum Enum1 { + // correct cases + A, + B, + C = 10, + D = A | B, + E = A | 1, + F = 1 | A, + G = (1 & 1), + H = ~(A | B), + I = A >>> 1, + J = 1 & A, + K = ~(1 | 5), + L = ~D, + M = E << B, + N = E << 1, + O = E >> B, + P = E >> 1, + PQ = E ** 2, + Q = -D, + R = C & 5, + S = 5 & C, + T = C | D, + U = C | 1, + V = 10 | D, + W = Enum1.V, + + // correct cases: reference to the enum member from different enum declaration + W1 = A0, + W2 = Enum1.A0, + W3 = Enum1["A0"], + W4 = Enum1["W"], + W5 = Enum1[`V`], +} + +const enum Comments { + "//", + "/*", + "*/", + "///", + "#", + "", +} + +module A { + export module B { + export module C { + export const enum E { + V1 = 1, + V2 = A.B.C.E.V1 | 100 + } + } + } +} + +module A { + export module B { + export module C { + export const enum E { + V3 = A.B.C.E["V2"] & 200, + V4 = A.B.C.E[`V1`] << 1, + } + } + } +} + +module A1 { + export module B { + export module C { + export const enum E { + V1 = 10, + V2 = 110, + } + } + } +} + +module A2 { + export module B { + export module C { + export const enum E { + V1 = 10, + V2 = 110, + } + } + // module C will be classified as value + export module C { + var x = 1 + } + } +} + +import I = A.B.C.E; +import I1 = A1.B; +import I2 = A2.B; + +function foo0(e: I): void { + if (e === I.V1) { + } + else if (e === I.V2) { + } +} + +function foo1(e: I1.C.E): void { + if (e === I1.C.E.V1) { + } + else if (e === I1.C.E.V2) { + } +} + +function foo2(e: I2.C.E): void { + if (e === I2.C.E.V1) { + } + else if (e === I2.C.E.V2) { + } +} + + +function foo(x: Enum1): void { + switch (x) { + case Enum1.A: + case Enum1.B: + case Enum1.C: + case Enum1.D: + case Enum1.E: + case Enum1.F: + case Enum1.G: + case Enum1.H: + case Enum1.I: + case Enum1.J: + case Enum1.K: + case Enum1.L: + case Enum1.M: + case Enum1.N: + case Enum1.O: + case Enum1.P: + case Enum1.PQ: + case Enum1.Q: + case Enum1.R: + case Enum1.S: + case Enum1["T"]: + case Enum1[`U`]: + case Enum1.V: + case Enum1.W: + case Enum1.W1: + case Enum1.W2: + case Enum1.W3: + case Enum1.W4: + break; + } +} + +function bar(e: A.B.C.E): number { + switch (e) { + case A.B.C.E.V1: return 1; + case A.B.C.E.V2: return 1; + case A.B.C.E.V3: return 1; + } +} + +function baz(c: Comments): void { + switch (c) { + case Comments["//"]: + case Comments["/*"]: + case Comments["*/"]: + case Comments["///"]: + case Comments["#"]: + case Comments[""]: + break; + } +} + + +/// [Declarations] //// + + + +//// [/.src/constEnums.d.ts] +declare const enum Enum1 { + A0 = 100 +} +declare const enum Enum1 { + A = 0, + B = 1, + C = 10, + D = 1, + E = 1, + F = 1, + G = 1, + H = -2, + I = 0, + J = 0, + K = -6, + L = -2, + M = 2, + N = 2, + O = 0, + P = 0, + PQ = 1, + Q = -1, + R = 0, + S = 0, + T = 11, + U = 11, + V = 11, + W = 11, + W1, + W2, + W3, + W4 = 11, + W5 = 11 +} +declare const enum Comments { + "//" = 0, + "/*" = 1, + "*/" = 2, + "///" = 3, + "#" = 4, + "" = 6 +} +declare namespace A { + namespace B { + namespace C { + const enum E { + V1 = 1, + V2 + } + } + } +} +declare namespace A { + namespace B { + namespace C { + const enum E { + V3, + V4 + } + } + } +} +declare namespace A1 { + namespace B { + namespace C { + const enum E { + V1 = 10, + V2 = 110 + } + } + } +} +declare namespace A2 { + namespace B { + namespace C { + const enum E { + V1 = 10, + V2 = 110 + } + } + namespace C { + } + } +} +import I = A.B.C.E; +import I1 = A1.B; +import I2 = A2.B; +declare function foo0(e: I): void; +declare function foo1(e: I1.C.E): void; +declare function foo2(e: I2.C.E): void; +declare function foo(x: Enum1): void; +declare function bar(e: A.B.C.E): number; +declare function baz(c: Comments): void; +/// [Errors] //// + +constEnums.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(16,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(17,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(18,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(19,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(23,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(24,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(55,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(65,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(66,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== constEnums.ts (29 errors) ==== + const enum Enum1 { + A0 = 100, + } + + const enum Enum1 { + // correct cases + A, + B, + C = 10, + D = A | B, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + E = A | 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + F = 1 | A, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + G = (1 & 1), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + H = ~(A | B), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + I = A >>> 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + J = 1 & A, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + K = ~(1 | 5), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + L = ~D, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + M = E << B, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + N = E << 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + O = E >> B, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + P = E >> 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + PQ = E ** 2, + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Q = -D, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + R = C & 5, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + S = 5 & C, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + T = C | D, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + U = C | 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + V = 10 | D, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + W = Enum1.V, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // correct cases: reference to the enum member from different enum declaration + W1 = A0, + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + W2 = Enum1.A0, + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + W3 = Enum1["A0"], + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + W4 = Enum1["W"], + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + W5 = Enum1[`V`], + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + const enum Comments { + "//", + "/*", + "*/", + "///", + "#", + "", + } + + module A { + export module B { + export module C { + export const enum E { + V1 = 1, + V2 = A.B.C.E.V1 | 100 + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + } + } + + module A { + export module B { + export module C { + export const enum E { + V3 = A.B.C.E["V2"] & 200, + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + V4 = A.B.C.E[`V1`] << 1, + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + } + } + + module A1 { + export module B { + export module C { + export const enum E { + V1 = 10, + V2 = 110, + } + } + } + } + + module A2 { + export module B { + export module C { + export const enum E { + V1 = 10, + V2 = 110, + } + } + // module C will be classified as value + export module C { + var x = 1 + } + } + } + + import I = A.B.C.E; + import I1 = A1.B; + import I2 = A2.B; + + function foo0(e: I): void { + if (e === I.V1) { + } + else if (e === I.V2) { + } + } + + function foo1(e: I1.C.E): void { + if (e === I1.C.E.V1) { + } + else if (e === I1.C.E.V2) { + } + } + + function foo2(e: I2.C.E): void { + if (e === I2.C.E.V1) { + } + else if (e === I2.C.E.V2) { + } + } + + + function foo(x: Enum1): void { + switch (x) { + case Enum1.A: + case Enum1.B: + case Enum1.C: + case Enum1.D: + case Enum1.E: + case Enum1.F: + case Enum1.G: + case Enum1.H: + case Enum1.I: + case Enum1.J: + case Enum1.K: + case Enum1.L: + case Enum1.M: + case Enum1.N: + case Enum1.O: + case Enum1.P: + case Enum1.PQ: + case Enum1.Q: + case Enum1.R: + case Enum1.S: + case Enum1["T"]: + case Enum1[`U`]: + case Enum1.V: + case Enum1.W: + case Enum1.W1: + case Enum1.W2: + case Enum1.W3: + case Enum1.W4: + break; + } + } + + function bar(e: A.B.C.E): number { + switch (e) { + case A.B.C.E.V1: return 1; + case A.B.C.E.V2: return 1; + case A.B.C.E.V3: return 1; + } + } + + function baz(c: Comments): void { + switch (c) { + case Comments["//"]: + case Comments["/*"]: + case Comments["*/"]: + case Comments["///"]: + case Comments["#"]: + case Comments[""]: + break; + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constantEnumAssert.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constantEnumAssert.d.ts new file mode 100644 index 0000000000000..4a24aebc5db24 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constantEnumAssert.d.ts @@ -0,0 +1,228 @@ +//// [tests/cases/compiler/constantEnumAssert.ts] //// + +//// [constantEnumAssert.ts] +enum E1 { + a, + b +} + +enum E2 { + a = 'a', + b = 'b' +} + +enum E3 { + a = 1, + b = a << 1, + c = a << 2, +} + +const enum E4 { + a, + b +} + +const E5 = { + a: 'a', + b: 'b' +} + +const foo1: { + a: E1 +} = { a: E1.a } + +const foo2: { + a: E2 +} = { a: E2.a } + +const foo3: { + readonly a: E1.a +} = { a: E1.a } as const + +const foo4: { + readonly a: E2.a +} = { a: E2.a } as const + +const foo5: { + readonly a: E3.a +} = { a: E3.a } as const + +const foo6: { + readonly a: E4.a +} = { a: E4.a } as const + +const foo7: { + readonly a: string +} = { a: E5.a } as const + +const foo8: { + a: E1.a +} = { a: E1.a as const } + +const foo9: { + a: E2.a +} = { a: E2.a as const } + +const foo10: { + a: E3.a +} = { a: E3.a as const } + +const foo11: { + a: E4.a +} = { a: E4.a as const } + +const foo12: { + a: string +} = { a: E5.a as const } + + +/// [Declarations] //// + + + +//// [/.src/constantEnumAssert.d.ts] +declare enum E1 { + a = 0, + b = 1 +} +declare enum E2 { + a = "a", + b = "b" +} +declare enum E3 { + a = 1, + b = 2, + c = 4 +} +declare const enum E4 { + a = 0, + b = 1 +} +declare const E5: { + a: string; + b: string; +}; +declare const foo1: { + a: E1; +}; +declare const foo2: { + a: E2; +}; +declare const foo3: { + readonly a: E1.a; +}; +declare const foo4: { + readonly a: E2.a; +}; +declare const foo5: { + readonly a: E3.a; +}; +declare const foo6: { + readonly a: E4.a; +}; +declare const foo7: { + readonly a: string; +}; +declare const foo8: { + a: E1.a; +}; +declare const foo9: { + a: E2.a; +}; +declare const foo10: { + a: E3.a; +}; +declare const foo11: { + a: E4.a; +}; +declare const foo12: { + a: string; +}; +/// [Errors] //// + +constantEnumAssert.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constantEnumAssert.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constantEnumAssert.ts(73,10): error TS1355: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. + + +==== constantEnumAssert.ts (3 errors) ==== + enum E1 { + a, + b + } + + enum E2 { + a = 'a', + b = 'b' + } + + enum E3 { + a = 1, + b = a << 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = a << 2, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + const enum E4 { + a, + b + } + + const E5 = { + a: 'a', + b: 'b' + } + + const foo1: { + a: E1 + } = { a: E1.a } + + const foo2: { + a: E2 + } = { a: E2.a } + + const foo3: { + readonly a: E1.a + } = { a: E1.a } as const + + const foo4: { + readonly a: E2.a + } = { a: E2.a } as const + + const foo5: { + readonly a: E3.a + } = { a: E3.a } as const + + const foo6: { + readonly a: E4.a + } = { a: E4.a } as const + + const foo7: { + readonly a: string + } = { a: E5.a } as const + + const foo8: { + a: E1.a + } = { a: E1.a as const } + + const foo9: { + a: E2.a + } = { a: E2.a as const } + + const foo10: { + a: E3.a + } = { a: E3.a as const } + + const foo11: { + a: E4.a + } = { a: E4.a as const } + + const foo12: { + a: string + } = { a: E5.a as const } + ~~~~ +!!! error TS1355: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constructorWithIncompleteTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constructorWithIncompleteTypeAnnotation.d.ts new file mode 100644 index 0000000000000..ba3ee2754e18d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constructorWithIncompleteTypeAnnotation.d.ts @@ -0,0 +1,912 @@ +//// [tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts] //// + +//// [constructorWithIncompleteTypeAnnotation.ts] +declare module "fs" { + export class File { + constructor(filename: string); + public ReadAllText(): string; + } + export interface IFile { + [index: number]: string; + } +} + +import fs = module("fs"); + + +module TypeScriptAllInOne { + export class Program { + static Main(...args: string[]): void { + try { + var bfs = new BasicFeatures(); + var retValue: number = 0; + + retValue = bfs.VARIABLES(); + if (retValue != 0 ^= { + + return 1; + } + + case: any = bfs.STATEMENTS(4); + if (retValue: any != 0) { + + return 1; + ^ + + + retValue = bfs.TYPES(); + if (retValue != 0) { + + return 1 && + } + + retValue = bfs.OPERATOR ' ); + if (retValue != 0) { + + return 1; + } + } + catch (e) { + console.log(e); + } + finally { + + } + + console.log('Done'); + + return 0; + + } + } + + class BasicFeatures { + /// + /// Test various of variables. Including nullable,key world as variable,special format + /// + /// + public VARIABLES(): number { + var local = Number.MAX_VALUE; + var min = Number.MIN_VALUE; + var inf = Number.NEGATIVE_INFINITY - + var nan = Number.NaN; + var undef = undefined; + + var _\uD4A5\u7204\uC316\uE59F = local; + var мир = local; + + var local5 = null; + var local6 = local5 instanceof fs.File; + + var hex = 0xBADC0DE, Hex = 0XDEADBEEF; + var float = 6.02e23, float2 = 6.02E-23 + var char = 'c', \u0066 = '\u0066', hexchar = '\x42' != + var quoted = '"', quoted2 = "'"; + var reg = /\w*/; + var objLit = { "var": number = 42, equals: function (x) { return x["var"] === 42; }, instanceof : () => 'objLit{42}' }; + var weekday = Weekdays.Monday; + + var con = char + f + hexchar + float.toString() + float2.toString() + reg.toString() + objLit + weekday; + + // + var any = 0 ^= + var bool = 0; + var declare = 0; + var constructor = 0; + var get = 0; + var implements = 0; + var interface = 0; + var let = 0; + var module = 0; + var number = 0; + var package = 0; + var private = 0; + var protected = 0; + var public = 0; + var set = 0; + var static = 0; + var string = 0 /> + var yield = 0; + + var sum3 = any + bool + declare + constructor + get + implements + interface + let + module + number + package + private + protected + public + set + static + string + yield; + + return 0; + } + + /// + /// Test different statements. Including if-else,swith,foreach,(un)checked,lock,using,try-catch-finally + /// + /// + /// + STATEMENTS(i: number): number { + var retVal = 0; + if (i == 1) + retVal = 1; + else + retVal = 0; + switch (i) { + case 2: + retVal = 1; + break; + case 3: + retVal = 1; + break; + default: + break; + } + + for (var x in { x: 0, y: 1 }) { + ! + + try { + throw null; + } + catch (Exception) ? + } + finally { + try { } + catch (Exception) { } + } + + return retVal; + } + + /// + /// Test types in ts language. Including class,struct,interface,delegate,anonymous type + /// + /// + public TYPES(): number { + var retVal = 0; + var c = new CLASS(); + var xx: IF = c; + retVal += catch .Property; + retVal += c.Member(); + retVal += xx.Foo() ? 0 : 1; + + //anonymous type + var anony = { a: new CLASS() }; + + retVal += anony.a.d(); + + return retVal; + } + + + ///// + ///// Test different operators + ///// + ///// + public OPERATOR(): number { + var a: number[] = [1, 2, 3, 4, 5, ];/*[] bug*/ // YES [] + var i = a[1];/*[]*/ + i = i + i - i * i / i % i & i | i ^ i;/*+ - * / % & | ^*/ + var b = true && false || true ^ false;/*& | ^*/ + b = !b;/*!*/ + i = ~i;/*~i*/ + b = i < (i - 1) && (i + 1) > i;/*< && >*/ + var f = true ? 1 : 0;/*? :*/ // YES : + i++;/*++*/ + i--;/*--*/ + b = true && false || true;/*&& ||*/ + i = i << 5;/*<<*/ + i = i >> 5;/*>>*/ + var j = i; + b = i == j && i != j && i <= j && i >= j;/*= == && != <= >=*/ + i += 5.0;/*+=*/ + i -= i;/*-=*/ + i *= i;/**=*/ + if (i == 0) + i++; + i /= i;/*/=*/ + i %= i;/*%=*/ + i &= i;/*&=*/ + i |= i;/*|=*/ + i ^= i;/*^=*/ + i <<= i;/*<<=*/ + i >>= i;/*>>=*/ + + if (i == 0 && != b && f == 1) + return 0; + else return 1; + } + + } + + interface IF { + Foo(): bool; + } + + class CLASS implements IF { + + case d = (): void => { yield 0; }; + public get Property(): number { return 0; } + public Member(): number { + return 0; + } + public Foo(): bool { + var myEvent = () => { return 1; }; + if (myEvent() == 1) + return true ? + else + return false; + } + } + + + // todo: use these + class A . + public method1(val:number) { + return val; + } + public method2() { + return 2 * this.method1(2); + } + } + + class B extends A { + + public method2(): any { + return this.method1(2); + } + } + + class Overloading { + + private otherValue = 42; + + constructor(private value: number, public name: string) : } + + public Overloads(value: string); + public Overloads( while : string, ...rest: string[]) { & + + public DefaultValue(value?: string = "Hello") { } + } +} + +enum Weekdays { + Monday, + Tuesday, + Weekend, +} + +enum Fruit { + Apple, + Pear +} + +interface IDisposable { + Dispose(): void; +} + +TypeScriptAllInOne.Program.Main(); + + +/// [Declarations] //// + + + +//// [/.src/constructorWithIncompleteTypeAnnotation.d.ts] +declare module "fs" { + class File { + constructor(filename: string); + ReadAllText(): string; + } + interface IFile { + [index: number]: string; + } +} +import fs = module; +declare namespace TypeScriptAllInOne { + class Program { + static Main(...args: string[]): void; + case: any; + if(retValue: any): invalid; + } +} +declare class BasicFeatures { + VARIABLES(): number; + STATEMENTS(i: number): number; + TYPES(): number; + OPERATOR(): number; +} +interface IF { + Foo(): bool; +} +declare class CLASS implements IF { + d: () => void; + get Property(): number; + Member(): number; + Foo(): bool; +} +declare class A { +} +declare class B extends A { + method2(): any; +} +declare class Overloading { + private otherValue; + constructor(value: number, name: string); +} +declare enum Weekdays { + Monday = 0, + Tuesday = 1, + Weekend = 2 +} +declare enum Fruit { + Apple = 0, + Pear = 1 +} +interface IDisposable { + Dispose(): void; +} +/// [Errors] //// + +constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2503: Cannot find namespace 'module'. +constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +constructorWithIncompleteTypeAnnotation.ts(11,13): error TS4000: Import declaration 'fs' is using private name 'module'. +constructorWithIncompleteTypeAnnotation.ts(11,19): error TS1005: ';' expected. +constructorWithIncompleteTypeAnnotation.ts(22,35): error TS1005: ')' expected. +constructorWithIncompleteTypeAnnotation.ts(22,39): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +constructorWithIncompleteTypeAnnotation.ts(24,28): error TS1005: ':' expected. +constructorWithIncompleteTypeAnnotation.ts(24,29): error TS1005: ',' expected. +constructorWithIncompleteTypeAnnotation.ts(27,18): error TS1128: Declaration or statement expected. +constructorWithIncompleteTypeAnnotation.ts(27,31): error TS2304: Cannot find name 'bfs'. +constructorWithIncompleteTypeAnnotation.ts(28,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constructorWithIncompleteTypeAnnotation.ts(28,35): error TS1005: ',' expected. +constructorWithIncompleteTypeAnnotation.ts(28,39): error TS1005: ';' expected. +constructorWithIncompleteTypeAnnotation.ts(31,18): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(34,17): error TS2304: Cannot find name 'retValue'. +constructorWithIncompleteTypeAnnotation.ts(34,26): error TS1005: ';' expected. +constructorWithIncompleteTypeAnnotation.ts(34,28): error TS2304: Cannot find name 'bfs'. +constructorWithIncompleteTypeAnnotation.ts(35,21): error TS2304: Cannot find name 'retValue'. +constructorWithIncompleteTypeAnnotation.ts(38,17): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(40,17): error TS2304: Cannot find name 'retValue'. +constructorWithIncompleteTypeAnnotation.ts(40,28): error TS2304: Cannot find name 'bfs'. +constructorWithIncompleteTypeAnnotation.ts(40,41): error TS1005: ';' expected. +constructorWithIncompleteTypeAnnotation.ts(40,45): error TS1002: Unterminated string literal. +constructorWithIncompleteTypeAnnotation.ts(41,21): error TS2304: Cannot find name 'retValue'. +constructorWithIncompleteTypeAnnotation.ts(46,13): error TS1005: 'try' expected. +constructorWithIncompleteTypeAnnotation.ts(47,17): error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. +constructorWithIncompleteTypeAnnotation.ts(53,13): error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. +constructorWithIncompleteTypeAnnotation.ts(58,5): error TS1128: Declaration or statement expected. +constructorWithIncompleteTypeAnnotation.ts(69,13): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(72,37): error TS1127: Invalid character. +constructorWithIncompleteTypeAnnotation.ts(81,13): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(89,23): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +constructorWithIncompleteTypeAnnotation.ts(90,13): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(105,29): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(106,13): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(108,24): error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. +constructorWithIncompleteTypeAnnotation.ts(138,13): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(141,32): error TS1005: '{' expected. +constructorWithIncompleteTypeAnnotation.ts(143,13): error TS1005: 'try' expected. +constructorWithIncompleteTypeAnnotation.ts(159,24): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(159,30): error TS1005: '{' expected. +constructorWithIncompleteTypeAnnotation.ts(159,31): error TS2304: Cannot find name 'Property'. +constructorWithIncompleteTypeAnnotation.ts(166,13): error TS2365: Operator '+=' cannot be applied to types 'number' and 'void'. +constructorWithIncompleteTypeAnnotation.ts(180,40): error TS2447: The '^' operator is not allowed for boolean types. Consider using '!==' instead. +constructorWithIncompleteTypeAnnotation.ts(181,13): error TS2322: Type 'boolean' is not assignable to type 'number'. +constructorWithIncompleteTypeAnnotation.ts(183,13): error TS2322: Type 'boolean' is not assignable to type 'number'. +constructorWithIncompleteTypeAnnotation.ts(187,13): error TS2322: Type 'boolean' is not assignable to type 'number'. +constructorWithIncompleteTypeAnnotation.ts(191,13): error TS2322: Type 'boolean' is not assignable to type 'number'. +constructorWithIncompleteTypeAnnotation.ts(205,28): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(213,16): error TS2304: Cannot find name 'bool'. +constructorWithIncompleteTypeAnnotation.ts(213,16): error TS4057: Return type of method from exported interface has or is using private name 'bool'. +constructorWithIncompleteTypeAnnotation.ts(218,10): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +constructorWithIncompleteTypeAnnotation.ts(223,23): error TS2304: Cannot find name 'bool'. +constructorWithIncompleteTypeAnnotation.ts(223,23): error TS4055: Return type of public method from exported class has or is using private name 'bool'. +constructorWithIncompleteTypeAnnotation.ts(227,13): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(234,14): error TS1005: '{' expected. +constructorWithIncompleteTypeAnnotation.ts(235,9): error TS1128: Declaration or statement expected. +constructorWithIncompleteTypeAnnotation.ts(235,16): error TS2304: Cannot find name 'method1'. +constructorWithIncompleteTypeAnnotation.ts(235,24): error TS2304: Cannot find name 'val'. +constructorWithIncompleteTypeAnnotation.ts(235,27): error TS1005: ',' expected. +constructorWithIncompleteTypeAnnotation.ts(235,28): error TS2693: 'number' only refers to a type, but is being used as a value here. +constructorWithIncompleteTypeAnnotation.ts(235,36): error TS1005: ';' expected. +constructorWithIncompleteTypeAnnotation.ts(238,9): error TS1128: Declaration or statement expected. +constructorWithIncompleteTypeAnnotation.ts(238,16): error TS2304: Cannot find name 'method2'. +constructorWithIncompleteTypeAnnotation.ts(238,26): error TS1005: ';' expected. +constructorWithIncompleteTypeAnnotation.ts(241,5): error TS1128: Declaration or statement expected. +constructorWithIncompleteTypeAnnotation.ts(246,25): error TS2551: Property 'method1' does not exist on type 'B'. Did you mean 'method2'? +constructorWithIncompleteTypeAnnotation.ts(254,9): error TS2390: Constructor implementation is missing. +constructorWithIncompleteTypeAnnotation.ts(254,21): error TS2369: A parameter property is only allowed in a constructor implementation. +constructorWithIncompleteTypeAnnotation.ts(254,44): error TS2369: A parameter property is only allowed in a constructor implementation. +constructorWithIncompleteTypeAnnotation.ts(254,69): error TS1110: Type expected. +constructorWithIncompleteTypeAnnotation.ts(256,9): error TS1128: Declaration or statement expected. +constructorWithIncompleteTypeAnnotation.ts(256,16): error TS2304: Cannot find name 'Overloads'. +constructorWithIncompleteTypeAnnotation.ts(256,26): error TS2304: Cannot find name 'value'. +constructorWithIncompleteTypeAnnotation.ts(256,31): error TS1005: ',' expected. +constructorWithIncompleteTypeAnnotation.ts(256,33): error TS2693: 'string' only refers to a type, but is being used as a value here. +constructorWithIncompleteTypeAnnotation.ts(257,9): error TS1128: Declaration or statement expected. +constructorWithIncompleteTypeAnnotation.ts(257,16): error TS2304: Cannot find name 'Overloads'. +constructorWithIncompleteTypeAnnotation.ts(257,27): error TS1135: Argument expression expected. +constructorWithIncompleteTypeAnnotation.ts(257,33): error TS1005: '(' expected. +constructorWithIncompleteTypeAnnotation.ts(257,35): error TS2693: 'string' only refers to a type, but is being used as a value here. +constructorWithIncompleteTypeAnnotation.ts(257,43): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(257,52): error TS2693: 'string' only refers to a type, but is being used as a value here. +constructorWithIncompleteTypeAnnotation.ts(257,59): error TS1011: An element access expression should take an argument. +constructorWithIncompleteTypeAnnotation.ts(257,60): error TS1005: ';' expected. +constructorWithIncompleteTypeAnnotation.ts(257,65): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(259,9): error TS2304: Cannot find name 'public'. +constructorWithIncompleteTypeAnnotation.ts(259,16): error TS1005: ';' expected. +constructorWithIncompleteTypeAnnotation.ts(259,16): error TS2304: Cannot find name 'DefaultValue'. +constructorWithIncompleteTypeAnnotation.ts(259,29): error TS2304: Cannot find name 'value'. +constructorWithIncompleteTypeAnnotation.ts(259,35): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(259,37): error TS2693: 'string' only refers to a type, but is being used as a value here. +constructorWithIncompleteTypeAnnotation.ts(259,55): error TS1005: ';' expected. +constructorWithIncompleteTypeAnnotation.ts(261,1): error TS1128: Declaration or statement expected. + + +==== constructorWithIncompleteTypeAnnotation.ts (94 errors) ==== + declare module "fs" { + export class File { + constructor(filename: string); + public ReadAllText(): string; + } + export interface IFile { + [index: number]: string; + } + } + + import fs = module("fs"); + ~~~~~~ +!!! error TS2503: Cannot find namespace 'module'. + ~~~~~~ +!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. + ~~~~~~ +!!! error TS4000: Import declaration 'fs' is using private name 'module'. + ~ +!!! error TS1005: ';' expected. + + + module TypeScriptAllInOne { + export class Program { + static Main(...args: string[]): void { + try { + var bfs = new BasicFeatures(); + var retValue: number = 0; + + retValue = bfs.VARIABLES(); + if (retValue != 0 ^= { + ~~ +!!! error TS1005: ')' expected. +!!! related TS1007 constructorWithIncompleteTypeAnnotation.ts:22:20: The parser expected to find a ')' to match the '(' token here. + ~ + + + return 1; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ +!!! error TS1005: ':' expected. + ~ +!!! error TS1005: ',' expected. + } + ~~~~~~~~~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + + case: any = bfs.STATEMENTS(4); + ~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~ +!!! error TS2304: Cannot find name 'bfs'. + if (retValue: any != 0) { + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1005: ';' expected. + + return 1; + ^ + ~ +!!! error TS1109: Expression expected. + + + retValue = bfs.TYPES(); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'retValue'. + ~ +!!! error TS1005: ';' expected. + ~~~ +!!! error TS2304: Cannot find name 'bfs'. + if (retValue != 0) { + ~~~~~~~~ +!!! error TS2304: Cannot find name 'retValue'. + + return 1 && + } + ~ +!!! error TS1109: Expression expected. + + retValue = bfs.OPERATOR ' ); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'retValue'. + ~~~ +!!! error TS2304: Cannot find name 'bfs'. + ~~~~ +!!! error TS1005: ';' expected. + +!!! error TS1002: Unterminated string literal. + if (retValue != 0) { + ~~~~~~~~ +!!! error TS2304: Cannot find name 'retValue'. + + return 1; + } + } + catch (e) { + ~~~~~ +!!! error TS1005: 'try' expected. + console.log(e); + ~~~~~~~ +!!! error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. + } + finally { + + } + + console.log('Done'); + ~~~~~~~ +!!! error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. + + return 0; + + } + } + ~ +!!! error TS1128: Declaration or statement expected. + + class BasicFeatures { + /// + /// Test various of variables. Including nullable,key world as variable,special format + /// + /// + public VARIABLES(): number { + var local = Number.MAX_VALUE; + var min = Number.MIN_VALUE; + var inf = Number.NEGATIVE_INFINITY - + var nan = Number.NaN; + ~~~ +!!! error TS1109: Expression expected. + var undef = undefined; + + var _\uD4A5\u7204\uC316\uE59F = local; + +!!! error TS1127: Invalid character. + var мир = local; + + var local5 = null; + var local6 = local5 instanceof fs.File; + + var hex = 0xBADC0DE, Hex = 0XDEADBEEF; + var float = 6.02e23, float2 = 6.02E-23 + var char = 'c', \u0066 = '\u0066', hexchar = '\x42' != + var quoted = '"', quoted2 = "'"; + ~~~ +!!! error TS1109: Expression expected. + var reg = /\w*/; + var objLit = { "var": number = 42, equals: function (x) { return x["var"] === 42; }, instanceof : () => 'objLit{42}' }; + var weekday = Weekdays.Monday; + + var con = char + f + hexchar + float.toString() + float2.toString() + reg.toString() + objLit + weekday; + + // + var any = 0 ^= + ~ +!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. + var bool = 0; + ~~~ +!!! error TS1109: Expression expected. + var declare = 0; + var constructor = 0; + var get = 0; + var implements = 0; + var interface = 0; + var let = 0; + var module = 0; + var number = 0; + var package = 0; + var private = 0; + var protected = 0; + var public = 0; + var set = 0; + var static = 0; + var string = 0 /> + ~ +!!! error TS1109: Expression expected. + var yield = 0; + ~~~ +!!! error TS1109: Expression expected. + + var sum3 = any + bool + declare + constructor + get + implements + interface + let + module + number + package + private + protected + public + set + static + string + yield; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. + + return 0; + } + + /// + /// Test different statements. Including if-else,swith,foreach,(un)checked,lock,using,try-catch-finally + /// + /// + /// + STATEMENTS(i: number): number { + var retVal = 0; + if (i == 1) + retVal = 1; + else + retVal = 0; + switch (i) { + case 2: + retVal = 1; + break; + case 3: + retVal = 1; + break; + default: + break; + } + + for (var x in { x: 0, y: 1 }) { + ! + + try { + ~~~ +!!! error TS1109: Expression expected. + throw null; + } + catch (Exception) ? + ~ +!!! error TS1005: '{' expected. + } + finally { + ~~~~~~~ +!!! error TS1005: 'try' expected. + try { } + catch (Exception) { } + } + + return retVal; + } + + /// + /// Test types in ts language. Including class,struct,interface,delegate,anonymous type + /// + /// + public TYPES(): number { + var retVal = 0; + var c = new CLASS(); + var xx: IF = c; + retVal += catch .Property; + ~~~~~ +!!! error TS1109: Expression expected. + ~ +!!! error TS1005: '{' expected. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'Property'. + retVal += c.Member(); + retVal += xx.Foo() ? 0 : 1; + + //anonymous type + var anony = { a: new CLASS() }; + + retVal += anony.a.d(); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2365: Operator '+=' cannot be applied to types 'number' and 'void'. + + return retVal; + } + + + ///// + ///// Test different operators + ///// + ///// + public OPERATOR(): number { + var a: number[] = [1, 2, 3, 4, 5, ];/*[] bug*/ // YES [] + var i = a[1];/*[]*/ + i = i + i - i * i / i % i & i | i ^ i;/*+ - * / % & | ^*/ + var b = true && false || true ^ false;/*& | ^*/ + ~~~~~~~~~~~~ +!!! error TS2447: The '^' operator is not allowed for boolean types. Consider using '!==' instead. + b = !b;/*!*/ + ~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + i = ~i;/*~i*/ + b = i < (i - 1) && (i + 1) > i;/*< && >*/ + ~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + var f = true ? 1 : 0;/*? :*/ // YES : + i++;/*++*/ + i--;/*--*/ + b = true && false || true;/*&& ||*/ + ~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + i = i << 5;/*<<*/ + i = i >> 5;/*>>*/ + var j = i; + b = i == j && i != j && i <= j && i >= j;/*= == && != <= >=*/ + ~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + i += 5.0;/*+=*/ + i -= i;/*-=*/ + i *= i;/**=*/ + if (i == 0) + i++; + i /= i;/*/=*/ + i %= i;/*%=*/ + i &= i;/*&=*/ + i |= i;/*|=*/ + i ^= i;/*^=*/ + i <<= i;/*<<=*/ + i >>= i;/*>>=*/ + + if (i == 0 && != b && f == 1) + ~~ +!!! error TS1109: Expression expected. + return 0; + else return 1; + } + + } + + interface IF { + Foo(): bool; + ~~~~ +!!! error TS2304: Cannot find name 'bool'. + ~~~~ +!!! error TS4057: Return type of method from exported interface has or is using private name 'bool'. + } + + class CLASS implements IF { + + case d = (): void => { yield 0; }; + ~~~~ +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. + public get Property(): number { return 0; } + public Member(): number { + return 0; + } + public Foo(): bool { + ~~~~ +!!! error TS2304: Cannot find name 'bool'. + ~~~~ +!!! error TS4055: Return type of public method from exported class has or is using private name 'bool'. + var myEvent = () => { return 1; }; + if (myEvent() == 1) + return true ? + else + ~~~~ +!!! error TS1109: Expression expected. + return false; + } + } + + + // todo: use these + class A . + ~ +!!! error TS1005: '{' expected. + public method1(val:number) { + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~ +!!! error TS2304: Cannot find name 'method1'. + ~~~ +!!! error TS2304: Cannot find name 'val'. + ~ +!!! error TS1005: ',' expected. + ~~~~~~ +!!! error TS2693: 'number' only refers to a type, but is being used as a value here. + ~ +!!! error TS1005: ';' expected. + return val; + } + public method2() { + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~ +!!! error TS2304: Cannot find name 'method2'. + ~ +!!! error TS1005: ';' expected. + return 2 * this.method1(2); + } + } + ~ +!!! error TS1128: Declaration or statement expected. + + class B extends A { + + public method2(): any { + return this.method1(2); + ~~~~~~~ +!!! error TS2551: Property 'method1' does not exist on type 'B'. Did you mean 'method2'? +!!! related TS2728 constructorWithIncompleteTypeAnnotation.ts:245:16: 'method2' is declared here. + } + } + + class Overloading { + + private otherValue = 42; + + constructor(private value: number, public name: string) : } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2390: Constructor implementation is missing. + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2369: A parameter property is only allowed in a constructor implementation. + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2369: A parameter property is only allowed in a constructor implementation. + ~ +!!! error TS1110: Type expected. + + public Overloads(value: string); + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~ +!!! error TS2304: Cannot find name 'Overloads'. + ~~~~~ +!!! error TS2304: Cannot find name 'value'. + ~ +!!! error TS1005: ',' expected. + ~~~~~~ +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. + public Overloads( while : string, ...rest: string[]) { & + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~ +!!! error TS2304: Cannot find name 'Overloads'. + ~~~~~ +!!! error TS1135: Argument expression expected. + ~ +!!! error TS1005: '(' expected. + ~~~~~~ +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. + ~~~ +!!! error TS1109: Expression expected. + ~~~~~~ +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. + +!!! error TS1011: An element access expression should take an argument. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. + + public DefaultValue(value?: string = "Hello") { } + ~~~~~~ +!!! error TS2304: Cannot find name 'public'. + ~~~~~~~~~~~~ +!!! error TS1005: ';' expected. + ~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'DefaultValue'. + ~~~~~ +!!! error TS2304: Cannot find name 'value'. + ~ +!!! error TS1109: Expression expected. + ~~~~~~ +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. + ~ +!!! error TS1005: ';' expected. + } + } + ~ +!!! error TS1128: Declaration or statement expected. + + enum Weekdays { + Monday, + Tuesday, + Weekend, + } + + enum Fruit { + Apple, + Pear + } + + interface IDisposable { + Dispose(): void; + } + + TypeScriptAllInOne.Program.Main(); + \ No newline at end of file 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..505817e1d0fa8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts @@ -0,0 +1,121 @@ +//// [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] //// + + + +//// [/.src/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 +} +/// [Errors] //// + +declFileEnums.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declFileEnums.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declFileEnums.ts(16,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== declFileEnums.ts (3 errors) ==== + enum e1 { + a, + b, + c + } + + enum e2 { + a = 10, + b = a + 2, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = 10, + } + + enum e3 { + a = 10, + b = Math.PI, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = a + 3 + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + 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/declarationEmitCommonJsModuleReferencedType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCommonJsModuleReferencedType.d.ts new file mode 100644 index 0000000000000..3396d36c9187b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCommonJsModuleReferencedType.d.ts @@ -0,0 +1,67 @@ +//// [tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts] //// + +//// [r/node_modules/foo/node_modules/nested/index.d.ts] +export interface NestedProps {} +//// [r/node_modules/foo/other/index.d.ts] +export interface OtherIndexProps {} +//// [r/node_modules/foo/other.d.ts] +export interface OtherProps {} +//// [r/node_modules/foo/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]; +//// [node_modules/root/index.d.ts] +export interface RootProps {} + +export function bar(): RootProps; +//// [r/entry.ts] +import { foo } from "foo"; +import { RootProps, bar } from "root"; +export const x = foo(); +export const y: RootProps = bar(); + + +/// [Declarations] //// + + + +//// [/.src/r/entry.d.ts] +import { RootProps } from "root"; +export declare const x: invalid; +export declare const y: RootProps; +/// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export const y: RootProps = bar(); + \ 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..8f4835e4c8f8d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDefaultExportWithStaticAssignment.d.ts @@ -0,0 +1,104 @@ +//// [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] //// + + + +//// [/.src/foo.d.ts] +export declare class Foo { +} + +//// [/.src/index1.d.ts] +export default function Example(): void; + +//// [/.src/index2.d.ts] +import { Foo } from './foo'; +export { Foo }; +export default function Example(): void; + +//// [/.src/index3.d.ts] +export declare class Bar { +} +export default function Example(): void; + +//// [/.src/index4.d.ts] +export declare function C(): any; +/// [Errors] //// + +index1.ts(2,25): error TS9009: 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(3,25): error TS9009: 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(2,25): error TS9009: 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(5,17): error TS9009: 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 {} + ~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + Example.Foo = Foo + +==== index2.ts (1 errors) ==== + import {Foo} from './foo'; + export {Foo}; + export default function Example(): void {} + ~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + Example.Foo = Foo + +==== index3.ts (1 errors) ==== + export class Bar {} + export default function Example(): void {} + ~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + Example.Bar = Bar + +==== index4.ts (1 errors) ==== + function A() { } + + function B() { } + + export function C(): any { + ~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + return null; + } + + C.A = A; + C.B = B; \ 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..bd99b2f347418 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringParameterProperties.d.ts @@ -0,0 +1,106 @@ +//// [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] //// + + + +//// [/.src/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); +} +/// [Errors] //// + +declarationEmitDestructuringParameterProperties.ts(2,17): error TS1187: A parameter property may not be declared using a binding pattern. +declarationEmitDestructuringParameterProperties.ts(2,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitDestructuringParameterProperties.ts(2,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitDestructuringParameterProperties.ts(2,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitDestructuringParameterProperties.ts(8,17): error TS1187: A parameter property may not be declared using a binding pattern. +declarationEmitDestructuringParameterProperties.ts(8,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitDestructuringParameterProperties.ts(8,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitDestructuringParameterProperties.ts(8,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitDestructuringParameterProperties.ts(14,17): error TS1187: A parameter property may not be declared using a binding pattern. +declarationEmitDestructuringParameterProperties.ts(14,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitDestructuringParameterProperties.ts(14,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitDestructuringParameterProperties.ts(14,32): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== declarationEmitDestructuringParameterProperties.ts (12 errors) ==== + class C1 { + constructor(public [x, y, z]: string[]) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1187: A parameter property may not be declared using a binding pattern. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + + 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. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + + 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. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } \ No newline at end of file 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..3f9b1c92cf33c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoPropertyPrivateName.d.ts @@ -0,0 +1,43 @@ +//// [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] //// + + + +//// [/.src/a.d.ts] +interface I { +} +export declare function f(): I; +export {}; + +//// [/.src/b.d.ts] +export declare function q(): void; +/// [Errors] //// + +b.ts(3,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +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 (2 errors) ==== + import {f} from "./a"; + + export function q(): void {} + ~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + 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/dte/declarationEmitForGlobalishSpecifierSymlink.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink.d.ts new file mode 100644 index 0000000000000..c2d837d2a3086 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink.d.ts @@ -0,0 +1,82 @@ +//// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts] //// + +//// [/p1/node_modules/typescript-fsa/src/impl.d.ts] +export function getA(): A; +export enum A { + Val +} +//// [/p1/node_modules/typescript-fsa/index.d.ts] +export * from "./src/impl"; +//// [/p1/node_modules/typescript-fsa/package.json] +{ + "name": "typescript-fsa", + "version": "1.0.0" +} +//// [/p2/node_modules/typescript-fsa/src/impl.d.ts] +export function getA(): A; +export enum A { + Val +} +//// [/p2/node_modules/typescript-fsa/index.d.ts] +export * from "./src/impl"; +//// [/p2/node_modules/typescript-fsa/package.json] +{ + "name": "typescript-fsa", + "version": "1.0.0" +} +//// [/p1/index.ts] +import * as _whatever from "p2"; +import { getA } from "typescript-fsa"; + +export const a = getA(); +//// [/p2/index.d.ts] +export const a: import("typescript-fsa").A; + + + +/// [Declarations] //// + + + +//// [/p1/index.d.ts] +export declare const a: invalid; +/// [Errors] //// + +/p1/index.ts(4,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +==== /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..77a5720c5c3b1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink2.d.ts @@ -0,0 +1,58 @@ +//// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts] //// + +//// [/cache/typescript-fsa/src/impl.d.ts] +export function getA(): A; +export enum A { + Val +} +//// [/cache/typescript-fsa/index.d.ts] +export * from "./src/impl"; +//// [/cache/typescript-fsa/package.json] +{ + "name": "typescript-fsa", + "version": "1.0.0" +} +//// [/p1/index.ts] +import * as _whatever from "p2"; +import { getA } from "typescript-fsa"; + +export const a = getA(); +//// [/p2/index.d.ts] +export const a: import("typescript-fsa").A; + + + +/// [Declarations] //// + + + +//// [/p1/index.d.ts] +export declare const a: invalid; +/// [Errors] //// + +/p1/index.ts(4,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +==== /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/declarationEmitFunctionDuplicateNamespace.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionDuplicateNamespace.d.ts new file mode 100644 index 0000000000000..145c6a867735d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionDuplicateNamespace.d.ts @@ -0,0 +1,35 @@ +//// [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] //// + + + +//// [/.src/declarationEmitFunctionDuplicateNamespace.d.ts] +declare function f(a: 0): 0; +declare function f(a: 1): 1; +/// [Errors] //// + +declarationEmitFunctionDuplicateNamespace.ts(2,10): error TS9009: 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; + ~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + function f(a: 0 | 1) { + return a; + } + + f.x = 2; + \ 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..3fc79ed15f206 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionKeywordProp.d.ts @@ -0,0 +1,46 @@ +//// [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] //// + + + +//// [/.src/declarationEmitFunctionKeywordProp.d.ts] +declare function foo(): void; +declare function bar(): void; +declare function baz(): void; +/// [Errors] //// + +declarationEmitFunctionKeywordProp.ts(1,10): error TS9009: 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(4,10): error TS9009: 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(8,10): error TS9009: 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 (3 errors) ==== + function foo(): void {} + ~~~ +!!! error TS9009: 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 = true; + + function bar(): void {} + ~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + bar.async = true; + bar.normal = false; + + function baz(): void {} + ~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + baz.class = true; + baz.normal = false; \ 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..8b2f3601b1195 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments.d.ts @@ -0,0 +1,48 @@ +//// [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] //// + + + +//// [/.src/declarationEmitLateBoundAssignments.d.ts] +export declare function foo(): void; +/// [Errors] //// + +declarationEmitLateBoundAssignments.ts(1,17): error TS9009: 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 (1 errors) ==== + export function foo(): void {} + ~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + 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]; \ 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..7a79d209eff8f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts @@ -0,0 +1,275 @@ +//// [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 +} = () => {} +arrow["B"] = 'bar' + +export const arrow2 = (): void => {} +arrow2[c] = 100 + +export const arrow3: { + (): void + 77: number +} = () => {} +arrow3[77] = 0 + +export const arrow4 = (): void => {} +arrow4[num] = 0 + +export const arrow5: { + (): void + "101": number +} = () => {} +arrow5["101"] = 0 + +export const arrow6 = (): void => {} +arrow6[numStr] = 0 + +export const arrow7: { + (): void + "qwe rty": number +} = () => {} +arrow7["qwe rty"] = 0 + +export const arrow8 = (): void => {} +arrow8[withWhitespace] = 0 + +export const arrow9: { + (): void + "🤪": number +} = () => {} +arrow9["🤪"] = 0 + +export const arrow10 = (): void => {} +arrow10[emoji] = 0 + + +/// [Declarations] //// + + + +//// [/.src/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: invalid; +export declare const arrow3: { + (): void; + 77: number; +}; +export declare const arrow4: invalid; +export declare const arrow5: { + (): void; + "101": number; +}; +export declare const arrow6: invalid; +export declare const arrow7: { + (): void; + "qwe rty": number; +}; +export declare const arrow8: invalid; +export declare const arrow9: { + (): void; + "🤪": number; +}; +export declare const arrow10: invalid; +/// [Errors] //// + +declarationEmitLateBoundAssignments2.ts(9,17): error TS9009: 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(12,17): error TS9009: 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(15,17): error TS9009: 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(18,17): error TS9009: 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(21,17): error TS9009: 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(24,17): error TS9009: 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(27,17): error TS9009: 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(30,17): error TS9009: 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(33,17): error TS9009: 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(36,17): error TS9009: 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(45,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(45,14): error TS9009: 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(54,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(54,14): error TS9009: 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(63,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(63,14): error TS9009: 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(72,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(72,14): error TS9009: 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(81,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationEmitLateBoundAssignments2.ts(81,14): error TS9009: 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 (20 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 {} + ~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl["B"] = 'foo' + + export function decl2(): void {} + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl2[c] = 0 + + export function decl3(): void {} + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl3[77] = 0 + + export function decl4(): void {} + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl4[num] = 0 + + export function decl5(): void {} + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl5["101"] = 0 + + export function decl6(): void {} + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl6[numStr] = 0 + + export function decl7(): void {} + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl7["qwe rty"] = 0 + + export function decl8(): void {} + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl8[withWhitespace] = 0 + + export function decl9(): void {} + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl9["🤪"] = 0 + + export function decl10(): void {} + ~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl10[emoji] = 0 + + export const arrow: { + (): void + B: string + } = () => {} + arrow["B"] = 'bar' + + export const arrow2 = (): void => {} + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow2[c] = 100 + + export const arrow3: { + (): void + 77: number + } = () => {} + arrow3[77] = 0 + + export const arrow4 = (): void => {} + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow4[num] = 0 + + export const arrow5: { + (): void + "101": number + } = () => {} + arrow5["101"] = 0 + + export const arrow6 = (): void => {} + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow6[numStr] = 0 + + export const arrow7: { + (): void + "qwe rty": number + } = () => {} + arrow7["qwe rty"] = 0 + + export const arrow8 = (): void => {} + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow8[withWhitespace] = 0 + + export const arrow9: { + (): void + "🤪": number + } = () => {} + arrow9["🤪"] = 0 + + export const arrow10 = (): void => {} + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + arrow10[emoji] = 0 + \ 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..5dfaefc8ac0fc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectAssignedDefaultExport.d.ts @@ -0,0 +1,106 @@ +//// [tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts] //// + +//// [node_modules/styled-components/node_modules/hoist-non-react-statics/index.d.ts] +interface Statics { + "$$whatever": string; +} +declare namespace hoistNonReactStatics { + type NonReactStatics = {[X in Exclude]: T[X]} +} +export = hoistNonReactStatics; +//// [node_modules/styled-components/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] //// + + + +//// [/.src/index.d.ts] +import { DefaultTheme, StyledComponent } from "styled-components"; +export declare const C: StyledComponent<"div", DefaultTheme, {}, never>; +declare const _default: invalid; +export default _default; +/// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ No newline at end of file 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..6ca15dfe67aff --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference.d.ts @@ -0,0 +1,103 @@ +//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts] //// + +//// [monorepo/pkg3/src/index.ts] +export * from './keys'; +//// [monorepo/pkg3/src/keys.ts] +import {MetadataAccessor} from "@raymondfeng/pkg2"; + +export const ADMIN = MetadataAccessor.create('1'); +//// [monorepo/pkg1/dist/index.d.ts] +export * from './types'; +//// [monorepo/pkg1/dist/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; +} +//// [monorepo/pkg1/package.json] +{ + "name": "@raymondfeng/pkg1", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" +} +//// [monorepo/pkg2/dist/index.d.ts] +export * from './types'; +//// [monorepo/pkg2/dist/types.d.ts] +export * from '@raymondfeng/pkg1'; +//// [monorepo/pkg2/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'; + +//// [/.src/monorepo/pkg3/dist/keys.d.ts] +export declare const ADMIN: invalid; +/// [Errors] //// + +monorepo/pkg3/src/keys.ts(3,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +==== 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..8d2c50ab4d1b3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference2.d.ts @@ -0,0 +1,109 @@ +//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts] //// + +//// [monorepo/pkg3/src/index.ts] +export * from './keys'; +//// [monorepo/pkg3/src/keys.ts] +import {MetadataAccessor} from "@raymondfeng/pkg2"; + +export const ADMIN = MetadataAccessor.create('1'); +//// [monorepo/pkg1/dist/index.d.ts] +export * from './types'; +//// [monorepo/pkg1/dist/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; +} +//// [monorepo/pkg1/package.json] +{ + "name": "@raymondfeng/pkg1", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" +} +//// [monorepo/pkg2/dist/index.d.ts] +import "./secondary"; +export * from './types'; +//// [monorepo/pkg2/dist/types.d.ts] +export {MetadataAccessor} from '@raymondfeng/pkg1'; +//// [monorepo/pkg2/dist/secondary.d.ts] +export {IdType} from '@raymondfeng/pkg1'; +//// [monorepo/pkg2/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'; + +//// [/.src/monorepo/pkg3/dist/keys.d.ts] +export declare const ADMIN: invalid; +/// [Errors] //// + +monorepo/pkg3/src/keys.ts(3,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +==== 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..1d99e64dbcb05 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference3.d.ts @@ -0,0 +1,106 @@ +//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts] //// + +//// [monorepo/pkg3/src/index.ts] +export * from './keys'; +//// [monorepo/pkg3/src/keys.ts] +import {MetadataAccessor} from "@raymondfeng/pkg2"; + +export const ADMIN = MetadataAccessor.create('1'); +//// [monorepo/pkg1/dist/index.d.ts] +export * from './types'; +//// [monorepo/pkg1/dist/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; +} +//// [monorepo/pkg1/package.json] +{ + "name": "@raymondfeng/pkg1", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" +} +//// [monorepo/pkg2/dist/index.d.ts] +export * from './types'; +//// [monorepo/pkg2/dist/types.d.ts] +export {MetadataAccessor} from '@raymondfeng/pkg1'; +//// [monorepo/pkg2/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'; + +//// [/.src/monorepo/pkg3/dist/keys.d.ts] +export declare const ADMIN: invalid; +/// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +==== 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/declarationEmitWithInvalidPackageJsonTypings.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithInvalidPackageJsonTypings.d.ts new file mode 100644 index 0000000000000..79890f33b2da8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithInvalidPackageJsonTypings.d.ts @@ -0,0 +1,68 @@ +//// [tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts] //// + +//// [/p1/node_modules/csv-parse/lib/index.d.ts] +export function bar(): number; +//// [/p1/node_modules/csv-parse/package.json] +{ + "main": "./lib", + "name": "csv-parse", + "types": [ + "./lib/index.d.ts", + "./lib/sync.d.ts" + ], + "version": "4.8.2" +} +//// [/p1/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; +/// [Errors] //// + +/p1/index.ts(7,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== /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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const parserRef = useRef(null); + return parserRef; + }; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts new file mode 100644 index 0000000000000..03e34d9347c04 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts @@ -0,0 +1,167 @@ +//// [tests/cases/conformance/types/thisType/declarationFiles.ts] //// + +//// [declarationFiles.ts] +class C1 { + x: this; + f(x: this): this { return undefined; } + constructor(x: this) { } +} + +class C2 { + [x: string]: this; +} + +interface Foo { + x: T; + y: this; +} + +class C3 { + a: this[]; + b: [this, this]; + c: this | Date; + d: this & Date; + e: (((this))); + f: (x: this) => this; + g: new (x: this) => this; + h: Foo; + i: Foo this)>; + j: (x: any) => x is this; +} + +const x3_a: typeof globalThis = this; +const x1_a: typeof globalThis = this; +class C4 { + x1 = { a: x1_a as typeof x1_a }; + x2: this[] = [this]; + x3 = [{ a: x3_a as typeof x3_a }] as const; + x4 = (): this => this; + f1() { + return { a: this }; + } + f2(): this[] { + return [this]; + } + f3() { + return [{ a: this }]; + } + f4(): () => this { + return () => this; + } +} + + +/// [Declarations] //// + + + +//// [/.src/declarationFiles.d.ts] +declare class C1 { + x: this; + f(x: this): this; + constructor(x: this); +} +declare class C2 { + [x: string]: this; +} +interface Foo { + x: T; + y: this; +} +declare class C3 { + a: this[]; + b: [this, this]; + c: this | Date; + d: this & Date; + e: (((this))); + f: (x: this) => this; + g: new (x: this) => this; + h: Foo; + i: Foo this)>; + j: (x: any) => x is this; +} +declare const x3_a: typeof globalThis; +declare const x1_a: typeof globalThis; +declare class C4 { + x1: { + a: typeof x1_a; + }; + x2: this[]; + x3: readonly [{ + readonly a: typeof x3_a; + }]; + x4: () => this; + f1(): invalid; + f2(): this[]; + f3(): invalid; + f4(): () => this; +} +/// [Errors] //// + +declarationFiles.ts(4,20): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +declarationFiles.ts(36,5): error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. +declarationFiles.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationFiles.ts(42,5): error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. +declarationFiles.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== declarationFiles.ts (5 errors) ==== + class C1 { + x: this; + f(x: this): this { return undefined; } + constructor(x: this) { } + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + } + + class C2 { + [x: string]: this; + } + + interface Foo { + x: T; + y: this; + } + + class C3 { + a: this[]; + b: [this, this]; + c: this | Date; + d: this & Date; + e: (((this))); + f: (x: this) => this; + g: new (x: this) => this; + h: Foo; + i: Foo this)>; + j: (x: any) => x is this; + } + + const x3_a: typeof globalThis = this; + const x1_a: typeof globalThis = this; + class C4 { + x1 = { a: x1_a as typeof x1_a }; + x2: this[] = [this]; + x3 = [{ a: x3_a as typeof x3_a }] as const; + x4 = (): this => this; + f1() { + ~~ +!!! error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return { a: this }; + } + f2(): this[] { + return [this]; + } + f3() { + ~~ +!!! error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return [{ a: this }]; + } + f4(): () => this { + return () => this; + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationInAmbientContext.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationInAmbientContext.d.ts new file mode 100644 index 0000000000000..fd2298a3fb6c3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationInAmbientContext.d.ts @@ -0,0 +1,34 @@ +//// [tests/cases/conformance/es6/destructuring/declarationInAmbientContext.ts] //// + +//// [declarationInAmbientContext.ts] +declare var [a, b]; // Error, destructuring declaration not allowed in ambient context +declare var {c, d}; // Error, destructuring declaration not allowed in ambient context + + +/// [Declarations] //// + + + +//// [/.src/declarationInAmbientContext.d.ts] +declare var a: invalid, b: invalid; +declare var c: invalid, d: invalid; +/// [Errors] //// + +declarationInAmbientContext.ts(1,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationInAmbientContext.ts(1,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationInAmbientContext.ts(2,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationInAmbientContext.ts(2,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== declarationInAmbientContext.ts (4 errors) ==== + declare var [a, b]; // Error, destructuring declaration not allowed in ambient context + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + declare var {c, d}; // Error, destructuring declaration not allowed in ambient context + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationWithNoInitializer.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationWithNoInitializer.d.ts new file mode 100644 index 0000000000000..0e4dbb4f404e8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationWithNoInitializer.d.ts @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/es6/destructuring/declarationWithNoInitializer.ts] //// + +//// [declarationWithNoInitializer.ts] +var [a, b]; // Error, no initializer +var {c, d}; // Error, no initializer + + +/// [Declarations] //// + + + +//// [/.src/declarationWithNoInitializer.d.ts] +declare var a: invalid, b: invalid; +declare var c: invalid, d: invalid; +/// [Errors] //// + +declarationWithNoInitializer.ts(1,5): error TS1182: A destructuring declaration must have an initializer. +declarationWithNoInitializer.ts(1,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationWithNoInitializer.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationWithNoInitializer.ts(2,5): error TS1182: A destructuring declaration must have an initializer. +declarationWithNoInitializer.ts(2,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationWithNoInitializer.ts(2,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== declarationWithNoInitializer.ts (6 errors) ==== + var [a, b]; // Error, no initializer + ~~~~~~ +!!! error TS1182: A destructuring declaration must have an initializer. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var {c, d}; // Error, no initializer + ~~~~~~ +!!! error TS1182: A destructuring declaration must have an initializer. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterDeclaration6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterDeclaration6.d.ts new file mode 100644 index 0000000000000..af08eec021aff --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterDeclaration6.d.ts @@ -0,0 +1,2311 @@ +//// [tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts] //// + +//// [destructuringParameterDeclaration6.ts] +// A parameter declaration may specify either an identifier or a binding pattern. + +// Reserved words are not allowed to be used as an identifier in parameter declaration +"use strict" + +// Error +function a({while}: { + while: any; + }): void { } +function a1({public}: { + public: any; + }): void { } +function a4([: any[]: [ + any, + any[] + ]: [ + any, + any[], + [any, any, any[]] + ]: [ + any, + any[], + [any, any, any[]], + [any, any, any[], [any, any, any, any[]]] + ]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]]]]]while, for, public]){ } +function a5(...: any[]while) { } +function a6(...public: any[]): void { } +function a7(...a: string): void { } +a({ while: 1 }); + +// No Error +function b1({public: x}: { + public: any; + }): void { } +function b2({while: y}: { + while: any; + }): void { } +b1({ public: 1 }); +b2({ while: 1 }); + + + +/// [Declarations] //// + + + +//// [/.src/destructuringParameterDeclaration6.d.ts] +declare function a({ while: }: { + while: any; +}): void; +declare function a1({ public }: { + public: any; +}): void; +declare function a4([any, [], [any, any, []], [any, any, [], [any, any, any, []]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []], [any, any, any, any, any, any, any, [], [any, any, any, any, any, any, any, any, []]]]]]]]]: invalid): invalid; +declare function a5(...: any[]): invalid; +declare function a6(...public: any[]): void; +declare function a7(...a: string): void; +declare function b1({ public: x }: { + public: any; +}): void; +declare function b2({ while: y }: { + while: any; +}): void; +/// [Errors] //// + +destructuringParameterDeclaration6.ts(7,18): error TS1005: ':' expected. +destructuringParameterDeclaration6.ts(13,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterDeclaration6.ts(13,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterDeclaration6.ts(13,14): error TS1181: Array element destructuring pattern expected. +destructuringParameterDeclaration6.ts(13,16): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(13,19): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(13,21): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(14,9): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(15,9): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(15,12): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(16,6): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(17,9): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(18,9): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(18,12): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(19,10): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(19,15): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(19,20): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(19,23): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(20,6): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(21,9): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(22,9): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(22,12): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(23,10): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(23,15): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(23,20): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(23,23): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(24,10): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(24,15): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(24,20): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(24,23): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(24,28): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(24,33): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(24,38): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(24,43): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(24,46): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,6): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,9): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,14): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,17): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,22): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,27): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,32): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,35): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,41): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,46): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,51): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,54): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,59): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,64): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,69): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,74): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,77): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,84): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,89): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,94): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,97): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,102): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,107): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,112): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,117): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,120): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,126): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,131): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,136): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,141): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,144): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,149): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,154): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,159): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,164): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,169): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,172): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,178): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,181): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,186): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,189): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,194): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,199): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,204): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,207): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,213): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,218): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,223): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,226): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,231): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,236): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,241): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,246): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,249): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,256): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,261): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,266): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,269): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,274): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,279): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,284): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,289): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,292): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,298): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,303): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,308): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,313): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,316): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,321): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,326): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,331): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,336): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,341): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,344): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,352): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,357): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,362): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,365): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,370): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,375): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,380): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,385): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,388): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,394): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,399): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,404): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,409): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,412): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,417): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,422): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,427): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,432): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,437): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,440): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,447): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,452): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,457): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,462): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,465): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,470): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,475): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,480): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,485): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,490): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,493): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,499): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,504): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,509): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,514): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,519): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,522): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,527): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,532): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,537): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,542): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,547): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,552): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,555): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,562): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,565): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,570): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,573): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,578): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,583): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,588): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,591): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,597): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,602): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,607): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,610): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,615): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,620): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,625): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,630): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,633): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,640): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,645): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,650): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,653): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,658): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,663): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,668): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,673): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,676): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,682): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,687): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,692): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,697): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,700): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,705): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,710): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,715): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,720): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,725): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,728): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,736): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,741): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,746): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,749): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,754): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,759): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,764): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,769): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,772): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,778): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,783): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,788): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,793): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,796): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,801): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,806): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,811): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,816): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,821): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,824): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,831): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,836): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,841): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,846): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,849): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,854): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,859): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,864): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,869): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,874): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,877): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,883): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,888): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,893): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,898): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,903): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,906): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,911): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,916): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,921): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,926): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,931): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,936): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,939): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,948): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,953): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,958): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,961): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,966): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,971): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,976): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,981): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,984): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,990): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,995): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1000): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1005): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1008): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1013): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1018): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1023): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1028): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1033): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1036): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1043): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1048): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1053): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1058): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1061): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1066): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1071): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1076): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1081): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1086): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1089): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1095): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1100): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1105): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1110): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1115): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1118): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1123): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1128): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1133): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1138): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1143): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1148): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1151): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1159): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1164): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1169): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1174): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1177): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1182): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1187): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1192): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1197): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1202): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1205): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1211): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1216): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1221): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1226): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1231): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1234): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1239): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1244): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1249): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1254): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1259): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1264): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1267): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1274): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1279): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1284): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1289): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1294): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1297): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1302): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1307): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1312): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1317): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1322): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1327): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1330): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1336): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1341): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1346): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1351): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1356): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1361): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1364): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1369): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1374): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1379): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1384): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1389): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1394): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1399): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1402): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1410): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1413): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1418): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1421): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1426): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1431): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1436): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1439): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1445): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1450): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1455): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1458): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1463): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1468): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1473): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1478): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1481): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1488): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1493): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1498): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1501): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1506): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1511): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1516): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1521): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1524): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1530): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1535): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1540): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1545): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1548): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1553): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1558): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1563): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1568): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1573): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1576): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1584): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1589): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1594): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1597): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1602): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1607): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1612): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1617): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1620): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1626): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1631): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1636): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1641): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1644): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1649): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1654): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1659): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1664): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1669): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1672): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1679): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1684): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1689): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1694): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1697): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1702): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1707): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1712): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1717): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1722): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1725): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1731): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1736): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1741): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1746): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1751): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1754): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1759): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1764): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1769): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1774): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1779): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1784): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1787): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1796): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1801): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1806): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1809): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1814): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1819): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1824): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1829): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1832): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1838): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1843): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1848): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1853): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1856): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1861): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1866): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1871): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1876): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1881): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1884): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1891): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1896): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1901): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1906): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1909): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1914): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1919): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1924): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1929): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1934): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1937): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1943): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1948): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1953): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1958): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1963): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1966): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1971): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1976): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1981): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1986): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1991): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1996): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1999): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2007): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2012): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2017): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2022): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2025): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2030): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2035): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2040): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2045): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2050): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2053): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2059): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2064): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2069): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2074): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2079): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2082): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2087): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2092): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2097): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2102): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2107): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2112): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2115): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2122): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2127): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2132): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2137): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2142): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2145): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2150): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2155): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2160): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2165): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2170): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2175): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2178): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2184): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2189): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2194): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2199): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2204): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2209): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2212): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2217): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2222): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2227): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2232): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2237): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2242): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2247): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2250): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2260): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2265): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2270): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2273): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2278): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2283): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2288): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2293): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2296): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2302): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2307): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2312): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2317): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2320): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2325): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2330): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2335): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2340): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2345): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2348): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2355): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2360): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2365): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2370): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2373): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2378): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2383): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2388): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2393): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2398): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2401): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2407): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2412): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2417): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2422): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2427): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2430): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2435): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2440): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2445): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2450): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2455): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2460): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2463): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2471): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2476): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2481): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2486): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2489): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2494): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2499): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2504): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2509): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2514): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2517): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2523): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2528): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2533): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2538): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2543): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2546): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2551): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2556): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2561): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2566): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2571): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2576): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2579): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2586): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2591): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2596): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2601): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2606): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2609): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2614): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2619): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2624): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2629): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2634): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2639): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2642): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2648): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2653): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2658): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2663): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2668): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2673): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2676): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2681): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2686): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2691): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2696): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2701): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2706): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2711): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2714): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2723): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2728): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2733): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2738): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2741): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2746): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2751): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2756): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2761): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2766): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2769): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2775): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2780): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2785): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2790): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2795): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2798): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2803): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2808): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2813): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2818): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2823): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2828): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2831): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2838): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2843): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2848): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2853): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2858): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2861): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2866): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2871): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2876): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2881): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2886): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2891): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2894): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2900): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2905): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2910): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2915): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2920): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2925): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2928): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2933): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2938): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2943): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2948): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2953): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2958): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2963): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2966): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2974): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2979): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2984): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2989): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2994): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2997): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,3002): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3007): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3012): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3017): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3022): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3027): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3030): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,3036): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3041): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3046): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3051): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3056): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3061): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3064): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,3069): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3074): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3079): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3084): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3089): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3094): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3099): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3102): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,3109): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3114): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3119): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3124): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3129): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3134): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3137): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,3142): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3147): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3152): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3157): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3162): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3167): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3172): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3175): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,3181): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3186): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3191): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3196): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3201): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3206): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3211): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3214): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,3219): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3224): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3229): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3234): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3239): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3244): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3249): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3254): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3257): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,3266): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,3271): error TS2695: Left side of comma operator is unused and has no side effects. +destructuringParameterDeclaration6.ts(25,3271): error TS1005: '(' expected. +destructuringParameterDeclaration6.ts(25,3273): error TS1109: Expression expected. +destructuringParameterDeclaration6.ts(25,3276): error TS2695: Left side of comma operator is unused and has no side effects. +destructuringParameterDeclaration6.ts(25,3276): error TS1005: '(' expected. +destructuringParameterDeclaration6.ts(25,3278): error TS2304: Cannot find name 'public'. +destructuringParameterDeclaration6.ts(25,3284): error TS1005: ';' expected. +destructuringParameterDeclaration6.ts(25,3285): error TS1128: Declaration or statement expected. +destructuringParameterDeclaration6.ts(26,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterDeclaration6.ts(26,16): error TS1003: Identifier expected. +destructuringParameterDeclaration6.ts(26,23): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(26,28): error TS1005: '(' expected. +destructuringParameterDeclaration6.ts(28,13): error TS2370: A rest parameter must be of an array type. + + +==== destructuringParameterDeclaration6.ts (729 errors) ==== + // A parameter declaration may specify either an identifier or a binding pattern. + + // Reserved words are not allowed to be used as an identifier in parameter declaration + "use strict" + + // Error + function a({while}: { + ~ +!!! error TS1005: ':' expected. + while: any; + }): void { } + function a1({public}: { + public: any; + }): void { } + function a4([: any[]: [ + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~ + ~ +!!! error TS1181: Array element destructuring pattern expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1005: ',' expected. + any, + ~~~~~~~~~~~~ + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + any[] + ~~~~~~~~~~~~~ + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ]: [ + ~~~~~~~~ + ~ +!!! error TS1005: ',' expected. + any, + ~~~~~~~~~~~~ + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + any[], + ~~~~~~~~~~~~~~ + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + [any, any, any[]] + ~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ]: [ + ~~~~~~~~ + ~ +!!! error TS1005: ',' expected. + any, + ~~~~~~~~~~~~ + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + any[], + ~~~~~~~~~~~~~~ + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + [any, any, any[]], + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + [any, any, any[], [any, any, any, any[]]] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]]]]]while, for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~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~~~ +!!! error TS1005: ',' expected. + +!!! error TS2695: Left side of comma operator is unused and has no side effects. + ~ +!!! error TS1005: '(' expected. + ~~~ +!!! error TS1109: Expression expected. + +!!! error TS2695: Left side of comma operator is unused and has no side effects. + ~ +!!! error TS1005: '(' expected. + ~~~~~~ +!!! error TS2304: Cannot find name 'public'. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + function a5(...: any[]while) { } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1003: Identifier expected. + ~~~~~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1005: '(' expected. + function a6(...public: any[]): void { } + function a7(...a: string): void { } + ~~~~~~~~~~~~ +!!! error TS2370: A rest parameter must be of an array type. + a({ while: 1 }); + + // No Error + function b1({public: x}: { + public: any; + }): void { } + function b2({while: y}: { + while: any; + }): void { } + b1({ public: 1 }); + b2({ while: 1 }); + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties1.d.ts new file mode 100644 index 0000000000000..ae979f797c6f4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties1.d.ts @@ -0,0 +1,186 @@ +//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties1.ts] //// + +//// [destructuringParameterProperties1.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) { + } +} + +var c1: C1 = new C1([]); +c1 = new C1(["larry", "{curly}", "moe"]); +var useC1Properties: boolean = c1.x === c1.y && c1.y === c1.z; + +var c2: C2 = new C2(["10", 10, !!10]); +const dest: any[] = [c2.x, c2.y, c2.z]; +const c2_x: any = dest[0]; +const c2_y: any = dest[1]; +const c2_z: any = dest[2]; + +var c3: C3 = new C3({x: 0, y: "", z: false}); +c3 = new C3({x: 0, "y": "y", z: true}); +const dest_1: any[] = [c3.x, c3.y, c3.z]; +const c3_x: any = dest_1[0]; +const c3_y: any = dest_1[1]; +const c3_z: any = dest_1[2]; + +/// [Declarations] //// + + + +//// [/.src/destructuringParameterProperties1.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); +} +declare var c1: C1; +declare var useC1Properties: boolean; +declare var c2: C2; +declare const dest: any[]; +declare const c2_x: any; +declare const c2_y: any; +declare const c2_z: any; +declare var c3: C3; +declare const dest_1: any[]; +declare const c3_x: any; +declare const c3_y: any; +declare const c3_z: any; +/// [Errors] //// + +destructuringParameterProperties1.ts(2,17): error TS1187: A parameter property may not be declared using a binding pattern. +destructuringParameterProperties1.ts(2,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties1.ts(2,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties1.ts(2,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties1.ts(9,17): error TS1187: A parameter property may not be declared using a binding pattern. +destructuringParameterProperties1.ts(9,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties1.ts(9,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties1.ts(9,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties1.ts(16,17): error TS1187: A parameter property may not be declared using a binding pattern. +destructuringParameterProperties1.ts(16,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties1.ts(16,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties1.ts(16,32): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties1.ts(22,35): error TS2339: Property 'x' does not exist on type 'C1'. +destructuringParameterProperties1.ts(22,44): error TS2339: Property 'y' does not exist on type 'C1'. +destructuringParameterProperties1.ts(22,52): error TS2339: Property 'y' does not exist on type 'C1'. +destructuringParameterProperties1.ts(22,61): error TS2339: Property 'z' does not exist on type 'C1'. +destructuringParameterProperties1.ts(25,25): error TS2339: Property 'x' does not exist on type 'C2'. +destructuringParameterProperties1.ts(25,31): error TS2339: Property 'y' does not exist on type 'C2'. +destructuringParameterProperties1.ts(25,37): error TS2339: Property 'z' does not exist on type 'C2'. +destructuringParameterProperties1.ts(32,27): error TS2339: Property 'x' does not exist on type 'C3'. +destructuringParameterProperties1.ts(32,33): error TS2339: Property 'y' does not exist on type 'C3'. +destructuringParameterProperties1.ts(32,39): error TS2339: Property 'z' does not exist on type 'C3'. + + +==== destructuringParameterProperties1.ts (22 errors) ==== + class C1 { + constructor(public [x, y, z]: string[]) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1187: A parameter property may not be declared using a binding pattern. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + + 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. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + + 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. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + + var c1: C1 = new C1([]); + c1 = new C1(["larry", "{curly}", "moe"]); + var useC1Properties: boolean = c1.x === c1.y && c1.y === c1.z; + ~ +!!! error TS2339: Property 'x' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'y' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'y' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'z' does not exist on type 'C1'. + + var c2: C2 = new C2(["10", 10, !!10]); + const dest: any[] = [c2.x, c2.y, c2.z]; + ~ +!!! error TS2339: Property 'x' does not exist on type 'C2'. + ~ +!!! error TS2339: Property 'y' does not exist on type 'C2'. + ~ +!!! error TS2339: Property 'z' does not exist on type 'C2'. + const c2_x: any = dest[0]; + const c2_y: any = dest[1]; + const c2_z: any = dest[2]; + + var c3: C3 = new C3({x: 0, y: "", z: false}); + c3 = new C3({x: 0, "y": "y", z: true}); + const dest_1: any[] = [c3.x, c3.y, c3.z]; + ~ +!!! error TS2339: Property 'x' does not exist on type 'C3'. + ~ +!!! error TS2339: Property 'y' does not exist on type 'C3'. + ~ +!!! error TS2339: Property 'z' does not exist on type 'C3'. + const c3_x: any = dest_1[0]; + const c3_y: any = dest_1[1]; + const c3_z: any = dest_1[2]; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties2.d.ts new file mode 100644 index 0000000000000..2d90d4b9c360c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties2.d.ts @@ -0,0 +1,154 @@ +//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties2.ts] //// + +//// [destructuringParameterProperties2.ts] +class C1 { + constructor(private k: number, private [a, b, c]: [number, string, boolean]) { + if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { + this.a = a || k; + } + } + + public getA(): any { + return this.a + } + + public getB(): any { + return this.b + } + + public getC(): any { + return this.c; + } +} + +var x: C1 = new C1(undefined, [0, undefined, ""]); +const dest: any[] = [x.getA(), x.getB(), x.getC()]; +const x_a: any = dest[0]; +const x_b: any = dest[1]; +const x_c: any = dest[2]; + +var y: C1 = new C1(10, [0, "", true]); +const dest_1: any[] = [y.getA(), y.getB(), y.getC()]; +const y_a: any = dest_1[0]; +const y_b: any = dest_1[1]; +const y_c: any = dest_1[2]; + +var z: C1 = new C1(10, [undefined, "", null]); +const dest: any[] = [z.getA(), z.getB(), z.getC()]; +const z_a: any = dest[0]; +const z_b: any = dest[1]; +const z_c: any = dest[2]; + + +/// [Declarations] //// + + + +//// [/.src/destructuringParameterProperties2.d.ts] +declare class C1 { + private k; + private a: invalid; + private b: invalid; + private c: invalid; + constructor(k: number, [a, b, c]: [number, string, boolean]); + getA(): any; + getB(): any; + getC(): any; +} +declare var x: C1; +declare const dest: any[]; +declare const x_a: any; +declare const x_b: any; +declare const x_c: any; +declare var y: C1; +declare const dest_1: any[]; +declare const y_a: any; +declare const y_b: any; +declare const y_c: any; +declare var z: C1; +declare const dest: any[]; +declare const z_a: any; +declare const z_b: any; +declare const z_c: any; +/// [Errors] //// + +destructuringParameterProperties2.ts(2,36): error TS1187: A parameter property may not be declared using a binding pattern. +destructuringParameterProperties2.ts(2,45): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties2.ts(2,48): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties2.ts(2,51): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties2.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. +destructuringParameterProperties2.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. +destructuringParameterProperties2.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. +destructuringParameterProperties2.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. +destructuringParameterProperties2.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. +destructuringParameterProperties2.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. +destructuringParameterProperties2.ts(21,46): error TS2322: Type 'string' is not assignable to type 'boolean'. +destructuringParameterProperties2.ts(22,7): error TS2451: Cannot redeclare block-scoped variable 'dest'. +destructuringParameterProperties2.ts(34,7): error TS2451: Cannot redeclare block-scoped variable 'dest'. + + +==== destructuringParameterProperties2.ts (13 errors) ==== + class C1 { + constructor(private k: number, private [a, b, c]: [number, string, boolean]) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1187: A parameter property may not be declared using a binding pattern. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { + ~ +!!! error TS2339: Property 'b' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'c' does not exist on type 'C1'. + this.a = a || k; + ~ +!!! error TS2339: Property 'a' does not exist on type 'C1'. + } + } + + public getA(): any { + return this.a + ~ +!!! error TS2339: Property 'a' does not exist on type 'C1'. + } + + public getB(): any { + return this.b + ~ +!!! error TS2339: Property 'b' does not exist on type 'C1'. + } + + public getC(): any { + return this.c; + ~ +!!! error TS2339: Property 'c' does not exist on type 'C1'. + } + } + + var x: C1 = new C1(undefined, [0, undefined, ""]); + ~~ +!!! error TS2322: Type 'string' is not assignable to type 'boolean'. + const dest: any[] = [x.getA(), x.getB(), x.getC()]; + ~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'dest'. + const x_a: any = dest[0]; + const x_b: any = dest[1]; + const x_c: any = dest[2]; + + var y: C1 = new C1(10, [0, "", true]); + const dest_1: any[] = [y.getA(), y.getB(), y.getC()]; + const y_a: any = dest_1[0]; + const y_b: any = dest_1[1]; + const y_c: any = dest_1[2]; + + var z: C1 = new C1(10, [undefined, "", null]); + const dest: any[] = [z.getA(), z.getB(), z.getC()]; + ~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'dest'. + const z_a: any = dest[0]; + const z_b: any = dest[1]; + const z_c: any = dest[2]; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties3.d.ts new file mode 100644 index 0000000000000..9ded56095c154 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties3.d.ts @@ -0,0 +1,192 @@ +//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts] //// + +//// [destructuringParameterProperties3.ts] +class C1 { + constructor(private k: T, private [a, b, c]: [T,U,V]) { + if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { + this.a = a || k; + } + } + + public getA(): any { + return this.a + } + + public getB(): any { + return this.b + } + + public getC(): any { + return this.c; + } +} + +var x: C1 = new C1(undefined, [0, true, ""]); +const dest: any[] = [x.getA(), x.getB(), x.getC()]; +const x_a: any = dest[0]; +const x_b: any = dest[1]; +const x_c: any = dest[2]; + +var y: C1 = new C1(10, [0, true, true]); +const dest_1: any[] = [y.getA(), y.getB(), y.getC()]; +const y_a: any = dest_1[0]; +const y_b: any = dest_1[1]; +const y_c: any = dest_1[2]; + +var z: C1<10, string, string> = new C1(10, [undefined, "", ""]); +const dest: any[] = [z.getA(), z.getB(), z.getC()]; +const z_a: any = dest[0]; +const z_b: any = dest[1]; +const z_c: any = dest[2]; + +var w: C1<10, any, any> = new C1(10, [undefined, undefined, undefined]); +const dest_1: any[] = [z.getA(), z.getB(), z.getC()]; +const z_a: any = dest_1[0]; +const z_b: any = dest_1[1]; +const z_c: any = dest_1[2]; + + +/// [Declarations] //// + + + +//// [/.src/destructuringParameterProperties3.d.ts] +declare class C1 { + private k; + private a: invalid; + private b: invalid; + private c: invalid; + constructor(k: T, [a, b, c]: [T, U, V]); + getA(): any; + getB(): any; + getC(): any; +} +declare var x: C1; +declare const dest: any[]; +declare const x_a: any; +declare const x_b: any; +declare const x_c: any; +declare var y: C1; +declare const dest_1: any[]; +declare const y_a: any; +declare const y_b: any; +declare const y_c: any; +declare var z: C1<10, string, string>; +declare const dest: any[]; +declare const z_a: any; +declare const z_b: any; +declare const z_c: any; +declare var w: C1<10, any, any>; +declare const dest_1: any[]; +declare const z_a: any; +declare const z_b: any; +declare const z_c: any; +/// [Errors] //// + +destructuringParameterProperties3.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. +destructuringParameterProperties3.ts(2,40): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties3.ts(2,43): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties3.ts(2,46): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties3.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. +destructuringParameterProperties3.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. +destructuringParameterProperties3.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. +destructuringParameterProperties3.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. +destructuringParameterProperties3.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. +destructuringParameterProperties3.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. +destructuringParameterProperties3.ts(22,7): error TS2451: Cannot redeclare block-scoped variable 'dest'. +destructuringParameterProperties3.ts(28,7): error TS2451: Cannot redeclare block-scoped variable 'dest_1'. +destructuringParameterProperties3.ts(34,7): error TS2451: Cannot redeclare block-scoped variable 'dest'. +destructuringParameterProperties3.ts(35,7): error TS2451: Cannot redeclare block-scoped variable 'z_a'. +destructuringParameterProperties3.ts(36,7): error TS2451: Cannot redeclare block-scoped variable 'z_b'. +destructuringParameterProperties3.ts(37,7): error TS2451: Cannot redeclare block-scoped variable 'z_c'. +destructuringParameterProperties3.ts(40,7): error TS2451: Cannot redeclare block-scoped variable 'dest_1'. +destructuringParameterProperties3.ts(41,7): error TS2451: Cannot redeclare block-scoped variable 'z_a'. +destructuringParameterProperties3.ts(42,7): error TS2451: Cannot redeclare block-scoped variable 'z_b'. +destructuringParameterProperties3.ts(43,7): error TS2451: Cannot redeclare block-scoped variable 'z_c'. + + +==== destructuringParameterProperties3.ts (20 errors) ==== + class C1 { + constructor(private k: T, private [a, b, c]: [T,U,V]) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1187: A parameter property may not be declared using a binding pattern. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { + ~ +!!! error TS2339: Property 'b' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'c' does not exist on type 'C1'. + this.a = a || k; + ~ +!!! error TS2339: Property 'a' does not exist on type 'C1'. + } + } + + public getA(): any { + return this.a + ~ +!!! error TS2339: Property 'a' does not exist on type 'C1'. + } + + public getB(): any { + return this.b + ~ +!!! error TS2339: Property 'b' does not exist on type 'C1'. + } + + public getC(): any { + return this.c; + ~ +!!! error TS2339: Property 'c' does not exist on type 'C1'. + } + } + + var x: C1 = new C1(undefined, [0, true, ""]); + const dest: any[] = [x.getA(), x.getB(), x.getC()]; + ~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'dest'. + const x_a: any = dest[0]; + const x_b: any = dest[1]; + const x_c: any = dest[2]; + + var y: C1 = new C1(10, [0, true, true]); + const dest_1: any[] = [y.getA(), y.getB(), y.getC()]; + ~~~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'dest_1'. + const y_a: any = dest_1[0]; + const y_b: any = dest_1[1]; + const y_c: any = dest_1[2]; + + var z: C1<10, string, string> = new C1(10, [undefined, "", ""]); + const dest: any[] = [z.getA(), z.getB(), z.getC()]; + ~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'dest'. + const z_a: any = dest[0]; + ~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'z_a'. + const z_b: any = dest[1]; + ~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'z_b'. + const z_c: any = dest[2]; + ~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'z_c'. + + var w: C1<10, any, any> = new C1(10, [undefined, undefined, undefined]); + const dest_1: any[] = [z.getA(), z.getB(), z.getC()]; + ~~~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'dest_1'. + const z_a: any = dest_1[0]; + ~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'z_a'. + const z_b: any = dest_1[1]; + ~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'z_b'. + const z_c: any = dest_1[2]; + ~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'z_c'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties4.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties4.d.ts new file mode 100644 index 0000000000000..6f0e057d997f9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties4.d.ts @@ -0,0 +1,118 @@ +//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties4.ts] //// + +//// [destructuringParameterProperties4.ts] +class C1 { + constructor(private k: T, protected [a, b, c]: [T,U,V]) { + if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { + this.a = a || k; + } + } + + public getA(): any { + return this.a + } + + public getB(): any { + return this.b + } + + public getC(): any { + return this.c; + } +} + +class C2 extends C1 { + public doSomethingWithSuperProperties(): string { + return `${this.a} ${this.b} ${this.c}`; + } +} + + +/// [Declarations] //// + + + +//// [/.src/destructuringParameterProperties4.d.ts] +declare class C1 { + private k; + protected a: invalid; + protected b: invalid; + protected c: invalid; + constructor(k: T, [a, b, c]: [T, U, V]); + getA(): any; + getB(): any; + getC(): any; +} +declare class C2 extends C1 { + doSomethingWithSuperProperties(): string; +} +/// [Errors] //// + +destructuringParameterProperties4.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. +destructuringParameterProperties4.ts(2,42): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties4.ts(2,45): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties4.ts(2,48): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties4.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. +destructuringParameterProperties4.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. +destructuringParameterProperties4.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. +destructuringParameterProperties4.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. +destructuringParameterProperties4.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. +destructuringParameterProperties4.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. +destructuringParameterProperties4.ts(23,24): error TS2339: Property 'a' does not exist on type 'C2'. +destructuringParameterProperties4.ts(23,34): error TS2339: Property 'b' does not exist on type 'C2'. +destructuringParameterProperties4.ts(23,44): error TS2339: Property 'c' does not exist on type 'C2'. + + +==== destructuringParameterProperties4.ts (13 errors) ==== + class C1 { + constructor(private k: T, protected [a, b, c]: [T,U,V]) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1187: A parameter property may not be declared using a binding pattern. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { + ~ +!!! error TS2339: Property 'b' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'c' does not exist on type 'C1'. + this.a = a || k; + ~ +!!! error TS2339: Property 'a' does not exist on type 'C1'. + } + } + + public getA(): any { + return this.a + ~ +!!! error TS2339: Property 'a' does not exist on type 'C1'. + } + + public getB(): any { + return this.b + ~ +!!! error TS2339: Property 'b' does not exist on type 'C1'. + } + + public getC(): any { + return this.c; + ~ +!!! error TS2339: Property 'c' does not exist on type 'C1'. + } + } + + class C2 extends C1 { + public doSomethingWithSuperProperties(): string { + return `${this.a} ${this.b} ${this.c}`; + ~ +!!! error TS2339: Property 'a' does not exist on type 'C2'. + ~ +!!! error TS2339: Property 'b' does not exist on type 'C2'. + ~ +!!! error TS2339: Property 'c' does not exist on type 'C2'. + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties5.d.ts new file mode 100644 index 0000000000000..1d5b21b6a2077 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties5.d.ts @@ -0,0 +1,139 @@ +//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts] //// + +//// [destructuringParameterProperties5.ts] +type ObjType1 = { x: number; y: string; z: boolean } +type TupleType1 = [ObjType1, number, string] + +class C1 { + constructor(public [{ x1, x2, x3 }, y, z]: TupleType1) { + var foo: any = x1 || x2 || x3 || y || z; + var bar: any = this.x1 || this.x2 || this.x3 || this.y || this.z; + } +} + +var a: C1 = new C1([{ x1: 10, x2: "", x3: true }, "", false]); +const dest: any[] = [a.x1, a.x2, a.x3, a.y, a.z]; +const a_x1: any = dest[0]; +const a_x2: any = dest[1]; +const a_x3: any = dest[2]; +const a_y: any = dest[3]; +const a_z: any = dest[4]; + +/// [Declarations] //// + + + +//// [/.src/destructuringParameterProperties5.d.ts] +type ObjType1 = { + x: number; + y: string; + z: boolean; +}; +type TupleType1 = [ObjType1, number, string]; +declare class C1 { + x1: invalid; + x2: invalid; + x3: invalid; + { x1, x2, x3 }: invalid; + y: invalid; + z: invalid; + constructor([{ x1, x2, x3 }, y, z]: TupleType1); +} +declare var a: C1; +declare const dest: any[]; +declare const a_x1: any; +declare const a_x2: any; +declare const a_x3: any; +declare const a_y: any; +declare const a_z: any; +/// [Errors] //// + +destructuringParameterProperties5.ts(5,17): error TS1187: A parameter property may not be declared using a binding pattern. +destructuringParameterProperties5.ts(5,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties5.ts(5,27): error TS2339: Property 'x1' does not exist on type 'ObjType1'. +destructuringParameterProperties5.ts(5,27): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties5.ts(5,31): error TS2339: Property 'x2' does not exist on type 'ObjType1'. +destructuringParameterProperties5.ts(5,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties5.ts(5,35): error TS2339: Property 'x3' does not exist on type 'ObjType1'. +destructuringParameterProperties5.ts(5,35): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties5.ts(5,41): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties5.ts(5,44): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +destructuringParameterProperties5.ts(7,29): error TS2339: Property 'x1' does not exist on type 'C1'. +destructuringParameterProperties5.ts(7,40): error TS2339: Property 'x2' does not exist on type 'C1'. +destructuringParameterProperties5.ts(7,51): error TS2339: Property 'x3' does not exist on type 'C1'. +destructuringParameterProperties5.ts(7,62): error TS2339: Property 'y' does not exist on type 'C1'. +destructuringParameterProperties5.ts(7,72): error TS2339: Property 'z' does not exist on type 'C1'. +destructuringParameterProperties5.ts(11,23): error TS2353: Object literal may only specify known properties, and 'x1' does not exist in type 'ObjType1'. +destructuringParameterProperties5.ts(11,51): error TS2322: Type 'string' is not assignable to type 'number'. +destructuringParameterProperties5.ts(11,55): error TS2322: Type 'boolean' is not assignable to type 'string'. +destructuringParameterProperties5.ts(12,24): error TS2339: Property 'x1' does not exist on type 'C1'. +destructuringParameterProperties5.ts(12,30): error TS2339: Property 'x2' does not exist on type 'C1'. +destructuringParameterProperties5.ts(12,36): error TS2339: Property 'x3' does not exist on type 'C1'. +destructuringParameterProperties5.ts(12,42): error TS2339: Property 'y' does not exist on type 'C1'. +destructuringParameterProperties5.ts(12,47): error TS2339: Property 'z' does not exist on type 'C1'. + + +==== destructuringParameterProperties5.ts (23 errors) ==== + type ObjType1 = { x: number; y: string; z: boolean } + type TupleType1 = [ObjType1, number, string] + + class C1 { + constructor(public [{ x1, x2, x3 }, y, z]: TupleType1) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1187: A parameter property may not be declared using a binding pattern. + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS2339: Property 'x1' does not exist on type 'ObjType1'. + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS2339: Property 'x2' does not exist on type 'ObjType1'. + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS2339: Property 'x3' does not exist on type 'ObjType1'. + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var foo: any = x1 || x2 || x3 || y || z; + var bar: any = this.x1 || this.x2 || this.x3 || this.y || this.z; + ~~ +!!! error TS2339: Property 'x1' does not exist on type 'C1'. + ~~ +!!! error TS2339: Property 'x2' does not exist on type 'C1'. + ~~ +!!! error TS2339: Property 'x3' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'y' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'z' does not exist on type 'C1'. + } + } + + var a: C1 = new C1([{ x1: 10, x2: "", x3: true }, "", false]); + ~~ +!!! error TS2353: Object literal may only specify known properties, and 'x1' does not exist in type 'ObjType1'. + ~~ +!!! error TS2322: Type 'string' is not assignable to type 'number'. + ~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'string'. + const dest: any[] = [a.x1, a.x2, a.x3, a.y, a.z]; + ~~ +!!! error TS2339: Property 'x1' does not exist on type 'C1'. + ~~ +!!! error TS2339: Property 'x2' does not exist on type 'C1'. + ~~ +!!! error TS2339: Property 'x3' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'y' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'z' does not exist on type 'C1'. + const a_x1: any = dest[0]; + const a_x2: any = dest[1]; + const a_x3: any = dest[2]; + const a_y: any = dest[3]; + const a_z: any = dest[4]; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/disallowLineTerminatorBeforeArrow.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/disallowLineTerminatorBeforeArrow.d.ts new file mode 100644 index 0000000000000..b2f70aca7e2bb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/disallowLineTerminatorBeforeArrow.d.ts @@ -0,0 +1,199 @@ +//// [tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts] //// + +//// [disallowLineTerminatorBeforeArrow.ts] +var f1 = (): void + => { } +var f2 = (x: string, y: string): void /* + */ => { } +var f3 = (x: string, y: number, ...rest: any[]): void + => { } +var f4 = (x: string, y: number, ...rest: any[]): void /* + */ => { } +var f5 = (...rest: any[]): void + => { } +var f6 = (...rest: any[]): void /* + */ => { } +var f7 = (x: string, y: number, z: number = 10): void + => { } +var f8 = (x: string, y: number, z: number = 10): void /* + */ => { } +var f9 = (a: number): number + => a; +var f10 = (a: number) : + number + => a +var f11 = (a: number): number /* + */ => a; +var f12 = (a: number) : + number /* + */ => a + +// Should be valid. +var f11 = (a: number + ): number => a; + +// Should be valid. +var f12 = (a: number) + : number => a; + +// Should be valid. +var f13 = (a: number): + number => a; + +// Should be valid. +var f14 = (): void /* */ => {} + +// Should be valid. +var f15 = (a: number): number /* */ => a + +// Should be valid. +var f16 = (a: number, b = 10): + number /* */ => a + b; + +function foo(func: () => boolean): void { } +foo(() + => true); +foo(() + => { return false; }); + +module m { + class City { + constructor(x: number, thing = () + => 100) { + } + + public m = () + => 2 * 2 * 2 + } + + export enum Enum { + claw = (() + => 10)() + } + + export var v: any = x: any: any + => new City(Enum.claw); +} + + +/// [Declarations] //// + + + +//// [/.src/disallowLineTerminatorBeforeArrow.d.ts] +declare var f1: () => void; +declare var f2: (x: string, y: string) => void; +declare var f3: (x: string, y: number, ...rest: any[]) => void; +declare var f4: (x: string, y: number, ...rest: any[]) => void; +declare var f5: (...rest: any[]) => void; +declare var f6: (...rest: any[]) => void; +declare var f7: (x: string, y: number, z?: number) => void; +declare var f8: (x: string, y: number, z?: number) => void; +declare var f9: (a: number) => number; +declare var f10: (a: number) => number; +declare var f11: (a: number) => number; +declare var f12: (a: number) => number; +declare var f11: (a: number) => number; +declare var f12: (a: number) => number; +declare var f13: (a: number) => number; +declare var f14: () => void; +declare var f15: (a: number) => number; +declare var f16: (a: number, b?: number) => number; +declare function foo(func: () => boolean): void; +declare namespace m { + enum Enum { + claw + } + var v: any, any: any; +} +/// [Errors] //// + +disallowLineTerminatorBeforeArrow.ts(67,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +disallowLineTerminatorBeforeArrow.ts(71,25): error TS2304: Cannot find name 'x'. +disallowLineTerminatorBeforeArrow.ts(71,26): error TS1005: ',' expected. +disallowLineTerminatorBeforeArrow.ts(72,9): error TS1128: Declaration or statement expected. + + +==== disallowLineTerminatorBeforeArrow.ts (4 errors) ==== + var f1 = (): void + => { } + var f2 = (x: string, y: string): void /* + */ => { } + var f3 = (x: string, y: number, ...rest: any[]): void + => { } + var f4 = (x: string, y: number, ...rest: any[]): void /* + */ => { } + var f5 = (...rest: any[]): void + => { } + var f6 = (...rest: any[]): void /* + */ => { } + var f7 = (x: string, y: number, z: number = 10): void + => { } + var f8 = (x: string, y: number, z: number = 10): void /* + */ => { } + var f9 = (a: number): number + => a; + var f10 = (a: number) : + number + => a + var f11 = (a: number): number /* + */ => a; + var f12 = (a: number) : + number /* + */ => a + + // Should be valid. + var f11 = (a: number + ): number => a; + + // Should be valid. + var f12 = (a: number) + : number => a; + + // Should be valid. + var f13 = (a: number): + number => a; + + // Should be valid. + var f14 = (): void /* */ => {} + + // Should be valid. + var f15 = (a: number): number /* */ => a + + // Should be valid. + var f16 = (a: number, b = 10): + number /* */ => a + b; + + function foo(func: () => boolean): void { } + foo(() + => true); + foo(() + => { return false; }); + + module m { + class City { + constructor(x: number, thing = () + => 100) { + } + + public m = () + => 2 * 2 * 2 + } + + export enum Enum { + claw = (() + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + => 10)() + } + + export var v: any = x: any: any + ~ +!!! error TS2304: Cannot find name 'x'. + ~ +!!! error TS1005: ',' expected. + => new City(Enum.claw); + ~~ +!!! error TS1128: Declaration or statement expected. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicateObjectLiteralProperty.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicateObjectLiteralProperty.d.ts new file mode 100644 index 0000000000000..d3351a40397fa --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicateObjectLiteralProperty.d.ts @@ -0,0 +1,84 @@ +//// [tests/cases/compiler/duplicateObjectLiteralProperty.ts] //// + +//// [duplicateObjectLiteralProperty.ts] +var x = { + a: 1, + b: true, // OK + a: 56, // Duplicate + \u0061: "ss", // Duplicate + a: { + c: 1, + "c": 56, // Duplicate + } +}; + + +var y = { + get a() { return 0; }, + set a(v: number) { }, + get a(): number { return 0; } +}; + + +/// [Declarations] //// + + + +//// [/.src/duplicateObjectLiteralProperty.d.ts] +declare var x: { + a: { + c: number; + }; + b: boolean; +}; +declare var y: invalid; +/// [Errors] //// + +duplicateObjectLiteralProperty.ts(4,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty.ts(5,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty.ts(6,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty.ts(8,9): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty.ts(14,9): error TS2300: Duplicate identifier 'a'. +duplicateObjectLiteralProperty.ts(15,9): error TS2300: Duplicate identifier 'a'. +duplicateObjectLiteralProperty.ts(16,9): error TS1118: An object literal cannot have multiple get/set accessors with the same name. +duplicateObjectLiteralProperty.ts(16,9): error TS2300: Duplicate identifier 'a'. +duplicateObjectLiteralProperty.ts(16,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== duplicateObjectLiteralProperty.ts (9 errors) ==== + var x = { + a: 1, + b: true, // OK + a: 56, // Duplicate + ~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + \u0061: "ss", // Duplicate + ~~~~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + a: { + ~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + c: 1, + "c": 56, // Duplicate + ~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + }; + + + var y = { + get a() { return 0; }, + ~ +!!! error TS2300: Duplicate identifier 'a'. + set a(v: number) { }, + ~ +!!! error TS2300: Duplicate identifier 'a'. + get a(): number { return 0; } + ~ +!!! error TS1118: An object literal cannot have multiple get/set accessors with the same name. + ~ +!!! error TS2300: Duplicate identifier 'a'. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + }; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumAssignmentCompat5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumAssignmentCompat5.d.ts new file mode 100644 index 0000000000000..2ed2bfe5c334d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumAssignmentCompat5.d.ts @@ -0,0 +1,95 @@ +//// [tests/cases/compiler/enumAssignmentCompat5.ts] //// + +//// [enumAssignmentCompat5.ts] +enum E { + A, B, C +} +enum Computed { + A = 1 << 1, + B = 1 << 2, + C = 1 << 3, +} +let n: number; +let e: E = n; // ok because it's too inconvenient otherwise +e = 0; // ok, in range +e = 4; // ok, out of range, but allowed computed enums don't have all members +let a: E.A = 0; // ok, A === 0 +a = 2; // error, 2 !== 0 +a = n; // ok + +let c: Computed = n; // ok +c = n; // ok +c = 4; // ok +let ca: Computed.A = 1; // error, Computed.A isn't a literal type because Computed has no enum literals + + + + + +/// [Declarations] //// + + + +//// [/.src/enumAssignmentCompat5.d.ts] +declare enum E { + A = 0, + B = 1, + C = 2 +} +declare enum Computed { + A = 2, + B = 4, + C = 8 +} +declare let n: number; +declare let e: E; +declare let a: E.A; +declare let c: Computed; +declare let ca: Computed.A; +/// [Errors] //// + +enumAssignmentCompat5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumAssignmentCompat5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumAssignmentCompat5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumAssignmentCompat5.ts(12,1): error TS2322: Type '4' is not assignable to type 'E'. +enumAssignmentCompat5.ts(14,1): error TS2322: Type '2' is not assignable to type 'E.A'. +enumAssignmentCompat5.ts(20,5): error TS2322: Type '1' is not assignable to type 'Computed.A'. + + +==== enumAssignmentCompat5.ts (6 errors) ==== + enum E { + A, B, C + } + enum Computed { + A = 1 << 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + B = 1 << 2, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + C = 1 << 3, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + let n: number; + let e: E = n; // ok because it's too inconvenient otherwise + e = 0; // ok, in range + e = 4; // ok, out of range, but allowed computed enums don't have all members + ~ +!!! error TS2322: Type '4' is not assignable to type 'E'. + let a: E.A = 0; // ok, A === 0 + a = 2; // error, 2 !== 0 + ~ +!!! error TS2322: Type '2' is not assignable to type 'E.A'. + a = n; // ok + + let c: Computed = n; // ok + c = n; // ok + c = 4; // ok + let ca: Computed.A = 1; // error, Computed.A isn't a literal type because Computed has no enum literals + ~~ +!!! error TS2322: Type '1' is not assignable to type 'Computed.A'. + + + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics.d.ts new file mode 100644 index 0000000000000..32515bf3471d8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics.d.ts @@ -0,0 +1,248 @@ +//// [tests/cases/conformance/enums/enumBasics.ts] //// + +//// [enumBasics.ts] +// Enum without initializers have first member = 0 and successive members = N + 1 +enum E1 { + A, + B, + C +} + +// Enum type is a subtype of Number +var x: number = E1.A; + +// Enum object type is anonymous with properties of the enum type and numeric indexer +var e: typeof E1 = E1; +var e: { + readonly A: E1.A; + readonly B: E1.B; + readonly C: E1.C; + readonly [n: number]: string; +}; +var e: typeof E1; + +// Reverse mapping of enum returns string name of property +var s: string = E1[e.A]; +var s: string; + + +// Enum with only constant members +enum E2 { + A = 1, B = 2, C = 3 +} + +// Enum with only computed members +enum E3 { + X = 'foo'.length, Y = 4 + 3, Z = +'foo' +} + +// Enum with constant members followed by computed members +enum E4 { + X = 0, Y, Z = 'foo'.length +} + +// Enum with > 2 constant members with no initializer for first member, non zero initializer for second element +enum E5 { + A, + B = 3, + C // 4 +} + +enum E6 { + A, + B = 0, + C // 1 +} + +// Enum with computed member initializer of type 'any' +enum E7 { + A = 'foo'['foo'] +} + +// Enum with computed member initializer of type number +enum E8 { + B = 'foo'['foo'] +} + +//Enum with computed member intializer of same enum type +enum E9 { + A, + B = A +} + +// (refer to .js to validate) +// Enum constant members are propagated +var doNotPropagate: (E8 | E7 | E4 | E3)[] = [ + E8.B, E7.A, E4.Z, E3.X, E3.Y, E3.Z +]; +// Enum computed members are not propagated +var doPropagate: (E9 | E6 | E5)[] = [ + E9.A, E9.B, E6.B, E6.C, E6.A, E5.A, E5.B, E5.C +]; + + + +/// [Declarations] //// + + + +//// [/.src/enumBasics.d.ts] +declare enum E1 { + A = 0, + B = 1, + C = 2 +} +declare var x: number; +declare var e: typeof E1; +declare var e: { + readonly A: E1.A; + readonly B: E1.B; + readonly C: E1.C; + readonly [n: number]: string; +}; +declare var e: typeof E1; +declare var s: string; +declare var s: string; +declare enum E2 { + A = 1, + B = 2, + C = 3 +} +declare enum E3 { + X, + Y = 7, + Z +} +declare enum E4 { + X = 0, + Y = 1, + Z +} +declare enum E5 { + A = 0, + B = 3, + C = 4 +} +declare enum E6 { + A = 0, + B = 0, + C = 1 +} +declare enum E7 { + A +} +declare enum E8 { + B +} +declare enum E9 { + A = 0, + B = 0 +} +declare var doNotPropagate: (E8 | E7 | E4 | E3)[]; +declare var doPropagate: (E9 | E6 | E5)[]; +/// [Errors] //// + +enumBasics.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics.ts(33,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics.ts(33,34): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics.ts(38,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics.ts(56,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics.ts(61,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics.ts(67,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== enumBasics.ts (7 errors) ==== + // Enum without initializers have first member = 0 and successive members = N + 1 + enum E1 { + A, + B, + C + } + + // Enum type is a subtype of Number + var x: number = E1.A; + + // Enum object type is anonymous with properties of the enum type and numeric indexer + var e: typeof E1 = E1; + var e: { + readonly A: E1.A; + readonly B: E1.B; + readonly C: E1.C; + readonly [n: number]: string; + }; + var e: typeof E1; + + // Reverse mapping of enum returns string name of property + var s: string = E1[e.A]; + var s: string; + + + // Enum with only constant members + enum E2 { + A = 1, B = 2, C = 3 + } + + // Enum with only computed members + enum E3 { + X = 'foo'.length, Y = 4 + 3, Z = +'foo' + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Enum with constant members followed by computed members + enum E4 { + X = 0, Y, Z = 'foo'.length + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Enum with > 2 constant members with no initializer for first member, non zero initializer for second element + enum E5 { + A, + B = 3, + C // 4 + } + + enum E6 { + A, + B = 0, + C // 1 + } + + // Enum with computed member initializer of type 'any' + enum E7 { + A = 'foo'['foo'] + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Enum with computed member initializer of type number + enum E8 { + B = 'foo'['foo'] + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + //Enum with computed member intializer of same enum type + enum E9 { + A, + B = A + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // (refer to .js to validate) + // Enum constant members are propagated + var doNotPropagate: (E8 | E7 | E4 | E3)[] = [ + E8.B, E7.A, E4.Z, E3.X, E3.Y, E3.Z + ]; + // Enum computed members are not propagated + var doPropagate: (E9 | E6 | E5)[] = [ + E9.A, E9.B, E6.B, E6.C, E6.A, E5.A, E5.B, E5.C + ]; + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics2.d.ts new file mode 100644 index 0000000000000..f342130374e47 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics2.d.ts @@ -0,0 +1,93 @@ +//// [tests/cases/compiler/enumBasics2.ts] //// + +//// [enumBasics2.ts] +enum Foo { + a = 2, + b = 3, + x = a.b, // should error + y = b.a, // should error + z = y.x * a.x, // should error +} + +enum Bar { + a = (1).valueOf(), // ok + b = Foo.a, // ok + c = Foo.a.valueOf(), // ok + d = Foo.a.a, // should error +} + + +/// [Declarations] //// + + + +//// [/.src/enumBasics2.d.ts] +declare enum Foo { + a = 2, + b = 3, + x,// should error + y,// should error + z +} +declare enum Bar { + a,// ok + b,// ok + c,// ok + d +} +/// [Errors] //// + +enumBasics2.ts(4,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(4,9): error TS2339: Property 'b' does not exist on type 'Foo.a'. +enumBasics2.ts(5,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(5,9): error TS2339: Property 'a' does not exist on type 'Foo.b'. +enumBasics2.ts(6,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(6,9): error TS2339: Property 'x' does not exist on type 'Foo.y'. +enumBasics2.ts(6,15): error TS2339: Property 'x' does not exist on type 'Foo.a'. +enumBasics2.ts(10,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(11,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(12,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(13,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics2.ts(13,13): error TS2339: Property 'a' does not exist on type 'Foo.a'. + + +==== enumBasics2.ts (12 errors) ==== + enum Foo { + a = 2, + b = 3, + x = a.b, // should error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2339: Property 'b' does not exist on type 'Foo.a'. + y = b.a, // should error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2339: Property 'a' does not exist on type 'Foo.b'. + z = y.x * a.x, // should error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2339: Property 'x' does not exist on type 'Foo.y'. + ~ +!!! error TS2339: Property 'x' does not exist on type 'Foo.a'. + } + + enum Bar { + a = (1).valueOf(), // ok + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + b = Foo.a, // ok + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = Foo.a.valueOf(), // ok + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = Foo.a.a, // should error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2339: Property 'a' does not exist on type 'Foo.a'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics3.d.ts new file mode 100644 index 0000000000000..cee89f3324213 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics3.d.ts @@ -0,0 +1,81 @@ +//// [tests/cases/compiler/enumBasics3.ts] //// + +//// [enumBasics3.ts] +module M { + export namespace N { + export enum E1 { + a = 1, + b = a.a, // should error + } + } +} + +module M { + export namespace N { + export enum E2 { + b = M.N.E1.a, + c = M.N.E1.a.a, // should error + } + } +} + + +/// [Declarations] //// + + + +//// [/.src/enumBasics3.d.ts] +declare namespace M { + namespace N { + enum E1 { + a = 1, + b + } + } +} +declare namespace M { + namespace N { + enum E2 { + b, + c + } + } +} +/// [Errors] //// + +enumBasics3.ts(5,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics3.ts(5,13): error TS2339: Property 'a' does not exist on type 'E1.a'. +enumBasics3.ts(13,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics3.ts(14,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics3.ts(14,20): error TS2339: Property 'a' does not exist on type 'E1.a'. + + +==== enumBasics3.ts (5 errors) ==== + module M { + export namespace N { + export enum E1 { + a = 1, + b = a.a, // should error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2339: Property 'a' does not exist on type 'E1.a'. + } + } + } + + module M { + export namespace N { + export enum E2 { + b = M.N.E1.a, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = M.N.E1.a.a, // should error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2339: Property 'a' does not exist on type 'E1.a'. + } + } + } + \ No newline at end of file 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..5bec709ae8a94 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumClassification.d.ts @@ -0,0 +1,259 @@ +//// [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] //// + + + +//// [/.src/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 +} +/// [Errors] //// + +enumClassification.ts(50,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumClassification.ts(51,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumClassification.ts(52,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumClassification.ts(66,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumClassification.ts(67,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumClassification.ts(68,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumClassification.ts(74,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumClassification.ts(75,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumClassification.ts(76,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumClassification.ts(77,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== enumClassification.ts (10 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, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + D = B, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + E = C, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Examples of numeric enum types with only constant members + + enum E10 {} + + enum E11 { + A = +0, + B, + C + } + + enum E12 { + A = 1 << 0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + B = 1 << 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + C = 1 << 2 + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Examples of numeric enum types with constant and computed members + + enum E20 { + A = "foo".length, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + B = A + 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + C = +"123", + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + D = Math.sin(1) + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithString.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithString.d.ts new file mode 100644 index 0000000000000..cd52936c91652 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithString.d.ts @@ -0,0 +1,140 @@ +//// [tests/cases/conformance/enums/enumConstantMemberWithString.ts] //// + +//// [enumConstantMemberWithString.ts] +enum T1 { + a = "1", + b = "1" + "2", + c = "1" + "2" + "3", + d = "a" - "a", + e = "a" + 1 +} + +enum T2 { + a = "1", + b = "1" + "2" +} + +enum T3 { + a = "1", + b = "1" + "2", + c = 1, + d = 1 + 2 +} + +enum T4 { + a = "1" +} + +enum T5 { + a = "1" + "2" +} + +declare enum T6 { + a = "1", + b = "1" + "2" +} + + +/// [Declarations] //// + + + +//// [/.src/enumConstantMemberWithString.d.ts] +declare enum T1 { + a = "1", + b = "12", + c = "123", + d, + e = "a1" +} +declare enum T2 { + a = "1", + b = "12" +} +declare enum T3 { + a = "1", + b = "12", + c = 1, + d = 3 +} +declare enum T4 { + a = "1" +} +declare enum T5 { + a = "12" +} +declare enum T6 { + a = "1", + b = "12" +} +/// [Errors] //// + +enumConstantMemberWithString.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithString.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithString.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithString.ts(5,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +enumConstantMemberWithString.ts(5,15): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +enumConstantMemberWithString.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithString.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithString.ts(16,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithString.ts(18,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithString.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithString.ts(31,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== enumConstantMemberWithString.ts (11 errors) ==== + enum T1 { + a = "1", + b = "1" + "2", + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = "1" + "2" + "3", + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = "a" - "a", + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + ~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + e = "a" + 1 + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum T2 { + a = "1", + b = "1" + "2" + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum T3 { + a = "1", + b = "1" + "2", + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = 1, + d = 1 + 2 + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum T4 { + a = "1" + } + + enum T5 { + a = "1" + "2" + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + declare enum T6 { + a = "1", + b = "1" + "2" + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithStringEmitDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithStringEmitDeclaration.d.ts new file mode 100644 index 0000000000000..32e7055e63f2f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithStringEmitDeclaration.d.ts @@ -0,0 +1,113 @@ +//// [tests/cases/conformance/enums/enumConstantMemberWithStringEmitDeclaration.ts] //// + +//// [enumConstantMemberWithStringEmitDeclaration.ts] +enum T1 { + a = "1", + b = "1" + "2", + c = "1" + "2" + "3" +} + +enum T2 { + a = "1", + b = "1" + "2" +} + +enum T3 { + a = "1", + b = "1" + "2" +} + +enum T4 { + a = "1" +} + +enum T5 { + a = "1" + "2" +} + +declare enum T6 { + a = "1", + b = "1" + "2" +} + + +/// [Declarations] //// + + + +//// [/.src/enumConstantMemberWithStringEmitDeclaration.d.ts] +declare enum T1 { + a = "1", + b = "12", + c = "123" +} +declare enum T2 { + a = "1", + b = "12" +} +declare enum T3 { + a = "1", + b = "12" +} +declare enum T4 { + a = "1" +} +declare enum T5 { + a = "12" +} +declare enum T6 { + a = "1", + b = "12" +} +/// [Errors] //// + +enumConstantMemberWithStringEmitDeclaration.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithStringEmitDeclaration.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithStringEmitDeclaration.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithStringEmitDeclaration.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithStringEmitDeclaration.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithStringEmitDeclaration.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== enumConstantMemberWithStringEmitDeclaration.ts (6 errors) ==== + enum T1 { + a = "1", + b = "1" + "2", + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = "1" + "2" + "3" + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum T2 { + a = "1", + b = "1" + "2" + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum T3 { + a = "1", + b = "1" + "2" + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum T4 { + a = "1" + } + + enum T5 { + a = "1" + "2" + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + declare enum T6 { + a = "1", + b = "1" + "2" + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiterals.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiterals.d.ts new file mode 100644 index 0000000000000..c773a2140bb9c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiterals.d.ts @@ -0,0 +1,184 @@ +//// [tests/cases/conformance/enums/enumConstantMemberWithTemplateLiterals.ts] //// + +//// [enumConstantMemberWithTemplateLiterals.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, + e = `1` - `1`, + f = `1` + 1, + g = `1${"2"}3`, + h = `1`.length +} + +enum T6 { + a = 1, + b = `12`.length +} + +declare enum T7 { + a = `1`, + b = `1` + `1`, + c = "2" + `1` +} + + +/// [Declarations] //// + + + +//// [/.src/enumConstantMemberWithTemplateLiterals.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, + e, + f = "11", + g = "123", + h +} +declare enum T6 { + a = 1, + b +} +declare enum T7 { + a = "1", + b = "11", + c = "21" +} +/// [Errors] //// + +enumConstantMemberWithTemplateLiterals.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiterals.ts(17,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiterals.ts(18,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiterals.ts(19,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiterals.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiterals.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiterals.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiterals.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiterals.ts(28,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +enumConstantMemberWithTemplateLiterals.ts(28,15): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +enumConstantMemberWithTemplateLiterals.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiterals.ts(31,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiterals.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiterals.ts(41,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiterals.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== enumConstantMemberWithTemplateLiterals.ts (15 errors) ==== + enum T1 { + a = `1` + } + + enum T2 { + a = `1`, + b = "2", + c = 3 + } + + enum T3 { + a = `1` + `1` + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum T4 { + a = `1`, + b = `1` + `1`, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = `1` + "2", + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = "2" + `1`, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + e = "2" + `1` + `1` + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum T5 { + a = `1`, + b = `1` + `2`, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = `1` + `2` + `3`, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = 1, + e = `1` - `1`, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + ~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + f = `1` + 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + g = `1${"2"}3`, + h = `1`.length + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum T6 { + a = 1, + b = `12`.length + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + declare enum T7 { + a = `1`, + b = `1` + `1`, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = "2" + `1` + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + \ 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..d48f4530a5832 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts @@ -0,0 +1,157 @@ +//// [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] //// + + + +//// [/.src/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" +} +/// [Errors] //// + +enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(17,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(18,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(19,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(32,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts (10 errors) ==== + enum T1 { + a = `1` + } + + enum T2 { + a = `1`, + b = "2", + c = 3 + } + + enum T3 { + a = `1` + `1` + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum T4 { + a = `1`, + b = `1` + `1`, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = `1` + "2", + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = "2" + `1`, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + e = "2" + `1` + `1` + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum T5 { + a = `1`, + b = `1` + `2`, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = `1` + `2` + `3`, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = 1 + } + + enum T6 { + a = 1, + b = `12`.length + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + declare enum T7 { + a = `1`, + b = `1` + `1`, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = "2" + `1` + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMembers.d.ts new file mode 100644 index 0000000000000..fc6bb6bcca91e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMembers.d.ts @@ -0,0 +1,192 @@ +//// [tests/cases/conformance/enums/enumConstantMembers.ts] //// + +//// [enumConstantMembers.ts] +// Constant members allow negatives, but not decimals. Also hex literals are allowed +enum E1 { + a = 1, + b +} +enum E2 { + a = - 1, + b +} +enum E3 { + a = 0.1, + b // Error because 0.1 is not a constant +} + +declare enum E4 { + a = 1, + b = -1, + c = 0.1 // Not a constant +} + +enum E5 { + a = 1 / 0, + b = 2 / 0.0, + c = 1.0 / 0.0, + d = 0.0 / 0.0, + e = NaN, + f = Infinity, + g = -Infinity +} + +const enum E6 { + a = 1 / 0, + b = 2 / 0.0, + c = 1.0 / 0.0, + d = 0.0 / 0.0, + e = NaN, + f = Infinity, + g = -Infinity +} + + +/// [Declarations] //// + + + +//// [/.src/enumConstantMembers.d.ts] +declare enum E1 { + a = 1, + b = 2 +} +declare enum E2 { + a = -1, + b = 0 +} +declare enum E3 { + a = 0.1, + b = 1.1 +} +declare enum E4 { + a = 1, + b = -1, + c = 0.1 +} +declare enum E5 { + a = Infinity, + b = Infinity, + c = Infinity, + d = NaN, + e, + f, + g +} +declare const enum E6 { + a = Infinity, + b = Infinity, + c = Infinity, + d = NaN, + e, + f, + g +} +/// [Errors] //// + +enumConstantMembers.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(23,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(24,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(32,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(32,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. +enumConstantMembers.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(33,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. +enumConstantMembers.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(34,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. +enumConstantMembers.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(35,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. +enumConstantMembers.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(36,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. +enumConstantMembers.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(37,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. +enumConstantMembers.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMembers.ts(38,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + + +==== enumConstantMembers.ts (21 errors) ==== + // Constant members allow negatives, but not decimals. Also hex literals are allowed + enum E1 { + a = 1, + b + } + enum E2 { + a = - 1, + b + } + enum E3 { + a = 0.1, + b // Error because 0.1 is not a constant + } + + declare enum E4 { + a = 1, + b = -1, + c = 0.1 // Not a constant + } + + enum E5 { + a = 1 / 0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + b = 2 / 0.0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = 1.0 / 0.0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = 0.0 / 0.0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + e = NaN, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + f = Infinity, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + g = -Infinity + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + const enum E6 { + a = 1 / 0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + b = 2 / 0.0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + c = 1.0 / 0.0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + d = 0.0 / 0.0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~ +!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. + e = NaN, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. + f = Infinity, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + g = -Infinity + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrorOnConstantBindingWithInitializer.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrorOnConstantBindingWithInitializer.d.ts new file mode 100644 index 0000000000000..5a6f553d380a6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrorOnConstantBindingWithInitializer.d.ts @@ -0,0 +1,60 @@ +//// [tests/cases/conformance/enums/enumErrorOnConstantBindingWithInitializer.ts] //// + +//// [enumErrorOnConstantBindingWithInitializer.ts] +type Thing = { + value?: string | number; +}; + +declare const thing: Thing; +const temp: string | number | undefined = thing.value; +const value: string | number = temp === undefined ? "123" : thing.value; + +enum E { + test = value, +} + + +/// [Declarations] //// + + + +//// [/.src/enumErrorOnConstantBindingWithInitializer.d.ts] +type Thing = { + value?: string | number; +}; +declare const thing: Thing; +declare const temp: string | number | undefined; +declare const value: string | number; +declare enum E { + test +} +/// [Errors] //// + +enumErrorOnConstantBindingWithInitializer.ts(7,7): error TS2322: Type 'string | number | undefined' is not assignable to type 'string | number'. + Type 'undefined' is not assignable to type 'string | number'. +enumErrorOnConstantBindingWithInitializer.ts(10,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrorOnConstantBindingWithInitializer.ts(10,10): error TS18033: Type 'string | number' is not assignable to type 'number' as required for computed enum member values. + Type 'string' is not assignable to type 'number'. + + +==== enumErrorOnConstantBindingWithInitializer.ts (3 errors) ==== + type Thing = { + value?: string | number; + }; + + declare const thing: Thing; + const temp: string | number | undefined = thing.value; + const value: string | number = temp === undefined ? "123" : thing.value; + ~~~~~ +!!! error TS2322: Type 'string | number | undefined' is not assignable to type 'string | number'. +!!! error TS2322: Type 'undefined' is not assignable to type 'string | number'. + + enum E { + test = value, + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS18033: Type 'string | number' is not assignable to type 'number' as required for computed enum member values. +!!! error TS18033: 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/enumErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrors.d.ts new file mode 100644 index 0000000000000..6d64848171f04 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrors.d.ts @@ -0,0 +1,287 @@ +//// [tests/cases/conformance/enums/enumErrors.ts] //// + +//// [enumErrors.ts] +// Enum named with PredefinedTypes +enum any { } +enum number { } +enum string { } +enum boolean { } + +// Enum with computed member initializer of type Number +enum E5 { + C = new Number(30) +} + +enum E9 { + A, + B = A +} + +//Enum with computed member intializer of different enum type +// Bug 707850: This should be allowed +enum E10 { + A = E9.A, + B = E9.B +} + +// Enum with computed member intializer of other types +enum E11 { + A = true, + B = new Date(), + C = window, + D = {}, + E = (() => 'foo')(), +} + +// Enum with string valued member and computed member initializers +enum E12 { + A = '', + B = new Date(), + C = window, + D = {}, + E = 1 + 1, + F = (() => 'foo')(), +} + +// Enum with incorrect syntax +enum E13 { + postComma, + postValueComma = 1, + + postSemicolon; + postColonValueComma: 2, + postColonValueSemicolon: 3; +}; + +enum E14 { a, b: any "hello" += 1, c, d} + + +/// [Declarations] //// + + + +//// [/.src/enumErrors.d.ts] +declare enum any { +} +declare enum number { +} +declare enum string { +} +declare enum boolean { +} +declare enum E5 { + C +} +declare enum E9 { + A = 0, + B = 0 +} +declare enum E10 { + A, + B +} +declare enum E11 { + A, + B, + C, + D, + E +} +declare enum E12 { + A = "", + B, + C, + D, + E = 2, + F +} +declare enum E13 { + postComma = 0, + postValueComma = 1, + postSemicolon = 2, + postColonValueComma = 3, + 2 = 4, + postColonValueSemicolon = 5, + 3 = 6 +} +declare enum E14 { + a = 0, + b = 1, + any = 2, + "hello" = 3, + 1 = 4, + c = 5, + d = 6 +} +/// [Errors] //// + +enumErrors.ts(2,6): error TS2431: Enum name cannot be 'any'. +enumErrors.ts(3,6): error TS2431: Enum name cannot be 'number'. +enumErrors.ts(4,6): error TS2431: Enum name cannot be 'string'. +enumErrors.ts(5,6): error TS2431: Enum name cannot be 'boolean'. +enumErrors.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(9,9): error TS18033: Type 'Number' is not assignable to type 'number' as required for computed enum member values. + 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. +enumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(26,9): error TS18033: Type 'boolean' is not assignable to type 'number' as required for computed enum member values. +enumErrors.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(27,9): error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. +enumErrors.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(28,9): error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. +enumErrors.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(29,9): error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. +enumErrors.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(30,9): error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. +enumErrors.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(36,9): error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. +enumErrors.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(37,9): error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. +enumErrors.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(38,9): error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. +enumErrors.ts(39,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumErrors.ts(40,9): error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. +enumErrors.ts(48,18): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(49,24): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(49,26): error TS2452: An enum member cannot have a numeric name. +enumErrors.ts(50,28): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(50,30): error TS2452: An enum member cannot have a numeric name. +enumErrors.ts(50,31): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(53,16): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(53,22): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(53,30): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(53,33): error TS2452: An enum member cannot have a numeric name. + + +==== enumErrors.ts (37 errors) ==== + // Enum named with PredefinedTypes + enum any { } + ~~~ +!!! error TS2431: Enum name cannot be 'any'. + enum number { } + ~~~~~~ +!!! error TS2431: Enum name cannot be 'number'. + enum string { } + ~~~~~~ +!!! error TS2431: Enum name cannot be 'string'. + enum boolean { } + ~~~~~~~ +!!! error TS2431: Enum name cannot be 'boolean'. + + // Enum with computed member initializer of type Number + enum E5 { + C = new Number(30) + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~ +!!! error TS18033: Type 'Number' is not assignable to type 'number' as required for computed enum member values. +!!! error TS18033: 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. + } + + enum E9 { + A, + B = A + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + //Enum with computed member intializer of different enum type + // Bug 707850: This should be allowed + enum E10 { + A = E9.A, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + B = E9.B + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Enum with computed member intializer of other types + enum E11 { + A = true, + ~~~~ +!!! error TS18033: Type 'boolean' is not assignable to type 'number' as required for computed enum member values. + B = new Date(), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~ +!!! error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. + C = window, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. + D = {}, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. + E = (() => 'foo')(), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~ +!!! error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. + } + + // Enum with string valued member and computed member initializers + enum E12 { + A = '', + B = new Date(), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~ +!!! error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. + C = window, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. + D = {}, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. + E = 1 + 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + F = (() => 'foo')(), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~ +!!! error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. + } + + // Enum with incorrect syntax + enum E13 { + postComma, + postValueComma = 1, + + postSemicolon; + ~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + postColonValueComma: 2, + ~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + ~ +!!! error TS2452: An enum member cannot have a numeric name. + postColonValueSemicolon: 3; + ~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + ~ +!!! error TS2452: An enum member cannot have a numeric name. + ~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + }; + + enum E14 { a, b: any "hello" += 1, c, d} + ~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + ~~~~~~~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + ~~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + ~ +!!! error TS2452: An enum member cannot have a numeric name. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumExportMergingES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumExportMergingES6.d.ts new file mode 100644 index 0000000000000..8cb7979d28f0c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumExportMergingES6.d.ts @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/enums/enumExportMergingES6.ts] //// + +//// [enumExportMergingES6.ts] +export enum Animals { + Cat = 1 +} +export enum Animals { + Dog = 2 +} +export enum Animals { + CatDog = Cat | Dog +} + + +/// [Declarations] //// + + + +//// [/.src/enumExportMergingES6.d.ts] +export declare enum Animals { + Cat = 1 +} +export declare enum Animals { + Dog = 2 +} +export declare enum Animals { + CatDog +} +/// [Errors] //// + +enumExportMergingES6.ts(8,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== enumExportMergingES6.ts (1 errors) ==== + export enum Animals { + Cat = 1 + } + export enum Animals { + Dog = 2 + } + export enum Animals { + CatDog = Cat | Dog + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumLiteralAssignableToEnumInsideUnion.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumLiteralAssignableToEnumInsideUnion.d.ts new file mode 100644 index 0000000000000..180af5b153e5b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumLiteralAssignableToEnumInsideUnion.d.ts @@ -0,0 +1,129 @@ +//// [tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts] //// + +//// [enumLiteralAssignableToEnumInsideUnion.ts] +module X { + export enum Foo { + A, B + } +} +module Y { + export enum Foo { + A, B + } +} +module Z { + export enum Foo { + A = 1 << 1, + B = 1 << 2, + } +} +module Ka { + export enum Foo { + A = 1 << 10, + B = 1 << 11, + } +} +const e0: X.Foo | boolean = Y.Foo.A; // ok +const e1: X.Foo | boolean = Z.Foo.A; // not legal, Z is computed +const e2: X.Foo.A | X.Foo.B | boolean = Z.Foo.A; // still not legal +const e3: X.Foo.B | boolean = Z.Foo.A; // not legal +const e4: X.Foo.A | boolean = Z.Foo.A; // not legal either because Z.Foo is computed and Z.Foo.A is not necessarily assignable to X.Foo.A +const e5: Ka.Foo | boolean = Z.Foo.A; // ok + + +/// [Declarations] //// + + + +//// [/.src/enumLiteralAssignableToEnumInsideUnion.d.ts] +declare namespace X { + enum Foo { + A = 0, + B = 1 + } +} +declare namespace Y { + enum Foo { + A = 0, + B = 1 + } +} +declare namespace Z { + enum Foo { + A = 2, + B = 4 + } +} +declare namespace Ka { + enum Foo { + A = 1024, + B = 2048 + } +} +declare const e0: X.Foo | boolean; +declare const e1: X.Foo | boolean; +declare const e2: X.Foo.A | X.Foo.B | boolean; +declare const e3: X.Foo.B | boolean; +declare const e4: X.Foo.A | boolean; +declare const e5: Ka.Foo | boolean; +/// [Errors] //// + +enumLiteralAssignableToEnumInsideUnion.ts(13,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumLiteralAssignableToEnumInsideUnion.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumLiteralAssignableToEnumInsideUnion.ts(19,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumLiteralAssignableToEnumInsideUnion.ts(20,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumLiteralAssignableToEnumInsideUnion.ts(24,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. +enumLiteralAssignableToEnumInsideUnion.ts(25,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. +enumLiteralAssignableToEnumInsideUnion.ts(26,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo.B'. +enumLiteralAssignableToEnumInsideUnion.ts(27,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo.A'. +enumLiteralAssignableToEnumInsideUnion.ts(28,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. + + +==== enumLiteralAssignableToEnumInsideUnion.ts (9 errors) ==== + module X { + export enum Foo { + A, B + } + } + module Y { + export enum Foo { + A, B + } + } + module Z { + export enum Foo { + A = 1 << 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + B = 1 << 2, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + module Ka { + export enum Foo { + A = 1 << 10, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + B = 1 << 11, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + const e0: X.Foo | boolean = Y.Foo.A; // ok + const e1: X.Foo | boolean = Z.Foo.A; // not legal, Z is computed + ~~ +!!! error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. + const e2: X.Foo.A | X.Foo.B | boolean = Z.Foo.A; // still not legal + ~~ +!!! error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. + const e3: X.Foo.B | boolean = Z.Foo.A; // not legal + ~~ +!!! error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo.B'. + const e4: X.Foo.A | boolean = Z.Foo.A; // not legal either because Z.Foo is computed and Z.Foo.A is not necessarily assignable to X.Foo.A + ~~ +!!! error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo.A'. + const e5: Ka.Foo | boolean = Z.Foo.A; // ok + ~~ +!!! error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMerging.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMerging.d.ts new file mode 100644 index 0000000000000..bd6bf78674f6e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMerging.d.ts @@ -0,0 +1,218 @@ +//// [tests/cases/conformance/enums/enumMerging.ts] //// + +//// [enumMerging.ts] +// Enum with only constant members across 2 declarations with the same root module +// Enum with initializer in all declarations with constant members with the same root module +module M1 { + enum EImpl1 { + A, B, C + } + + enum EImpl1 { + D = 1, E, F + } + + export enum EConst1 { + A = 3, B = 2, C = 1 + } + + export enum EConst1 { + D = 7, E = 9, F = 8 + } + + var x = [EConst1.A, EConst1.B, EConst1.C, EConst1.D, EConst1.E, EConst1.F]; +} + +// Enum with only computed members across 2 declarations with the same root module +module M2 { + export enum EComp2 { + A = 'foo'.length, B = 'foo'.length, C = 'foo'.length + } + + export enum EComp2 { + D = 'foo'.length, E = 'foo'.length, F = 'foo'.length + } + + var x = [EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F]; +} + +// Enum with initializer in only one of two declarations with constant members with the same root module +module M3 { + enum EInit { + A, + B + } + + enum EInit { + C = 1, D, E + } +} + +// Enums with same name but different root module +module M4 { + export enum Color { Red, Green, Blue } +} +module M5 { + export enum Color { Red, Green, Blue } +} + +module M6.A { + export enum Color { Red, Green, Blue } +} +module M6 { + export module A { + export enum Color { Yellow = 1 } + } + var t = A.Color.Yellow; + t = A.Color.Red; +} + + +/// [Declarations] //// + + + +//// [/.src/enumMerging.d.ts] +declare namespace M1 { + enum EConst1 { + A = 3, + B = 2, + C = 1 + } + enum EConst1 { + D = 7, + E = 9, + F = 8 + } +} +declare namespace M2 { + enum EComp2 { + A, + B, + C + } + enum EComp2 { + D, + E, + F + } +} +declare namespace M3 { +} +declare namespace M4 { + enum Color { + Red = 0, + Green = 1, + Blue = 2 + } +} +declare namespace M5 { + enum Color { + Red = 0, + Green = 1, + Blue = 2 + } +} +declare namespace M6.A { + enum Color { + Red = 0, + Green = 1, + Blue = 2 + } +} +declare namespace M6 { + namespace A { + enum Color { + Yellow = 1 + } + } +} +/// [Errors] //// + +enumMerging.ts(26,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumMerging.ts(26,27): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumMerging.ts(26,45): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumMerging.ts(30,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumMerging.ts(30,27): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumMerging.ts(30,45): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== enumMerging.ts (6 errors) ==== + // Enum with only constant members across 2 declarations with the same root module + // Enum with initializer in all declarations with constant members with the same root module + module M1 { + enum EImpl1 { + A, B, C + } + + enum EImpl1 { + D = 1, E, F + } + + export enum EConst1 { + A = 3, B = 2, C = 1 + } + + export enum EConst1 { + D = 7, E = 9, F = 8 + } + + var x = [EConst1.A, EConst1.B, EConst1.C, EConst1.D, EConst1.E, EConst1.F]; + } + + // Enum with only computed members across 2 declarations with the same root module + module M2 { + export enum EComp2 { + A = 'foo'.length, B = 'foo'.length, C = 'foo'.length + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum EComp2 { + D = 'foo'.length, E = 'foo'.length, F = 'foo'.length + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + var x = [EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F]; + } + + // Enum with initializer in only one of two declarations with constant members with the same root module + module M3 { + enum EInit { + A, + B + } + + enum EInit { + C = 1, D, E + } + } + + // Enums with same name but different root module + module M4 { + export enum Color { Red, Green, Blue } + } + module M5 { + export enum Color { Red, Green, Blue } + } + + module M6.A { + export enum Color { Red, Green, Blue } + } + module M6 { + export module A { + export enum Color { Yellow = 1 } + } + var t = A.Color.Yellow; + t = A.Color.Red; + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMergingErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMergingErrors.d.ts new file mode 100644 index 0000000000000..31cb16774a076 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMergingErrors.d.ts @@ -0,0 +1,176 @@ +//// [tests/cases/conformance/enums/enumMergingErrors.ts] //// + +//// [enumMergingErrors.ts] +// Enum with constant, computed, constant members split across 3 declarations with the same root module +module M { + export enum E1 { A = 0 } + export enum E2 { C } + export enum E3 { A = 0 } +} +module M { + export enum E1 { B = 'foo'.length } + export enum E2 { B = 'foo'.length } + export enum E3 { C } +} +module M { + export enum E1 { C } + export enum E2 { A = 0 } + export enum E3 { B = 'foo'.length } +} + +// Enum with no initializer in either declaration with constant members with the same root module +module M1 { + export enum E1 { A = 0 } +} +module M1 { + export enum E1 { B } +} +module M1 { + export enum E1 { C } +} + + +// Enum with initializer in only one of three declarations with constant members with the same root module +module M2 { + export enum E1 { A } +} +module M2 { + export enum E1 { B = 0 } +} +module M2 { + export enum E1 { C } +} + + + + +/// [Declarations] //// + + + +//// [/.src/enumMergingErrors.d.ts] +declare namespace M { + enum E1 { + A = 0 + } + enum E2 { + C = 0 + } + enum E3 { + A = 0 + } +} +declare namespace M { + enum E1 { + B + } + enum E2 { + B + } + enum E3 { + C = 0 + } +} +declare namespace M { + enum E1 { + C = 0 + } + enum E2 { + A = 0 + } + enum E3 { + B + } +} +declare namespace M1 { + enum E1 { + A = 0 + } +} +declare namespace M1 { + enum E1 { + B = 0 + } +} +declare namespace M1 { + enum E1 { + C = 0 + } +} +declare namespace M2 { + enum E1 { + A = 0 + } +} +declare namespace M2 { + enum E1 { + B = 0 + } +} +declare namespace M2 { + enum E1 { + C = 0 + } +} +/// [Errors] //// + +enumMergingErrors.ts(8,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumMergingErrors.ts(9,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumMergingErrors.ts(15,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumMergingErrors.ts(26,22): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +enumMergingErrors.ts(38,22): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. + + +==== enumMergingErrors.ts (5 errors) ==== + // Enum with constant, computed, constant members split across 3 declarations with the same root module + module M { + export enum E1 { A = 0 } + export enum E2 { C } + export enum E3 { A = 0 } + } + module M { + export enum E1 { B = 'foo'.length } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export enum E2 { B = 'foo'.length } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export enum E3 { C } + } + module M { + export enum E1 { C } + export enum E2 { A = 0 } + export enum E3 { B = 'foo'.length } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Enum with no initializer in either declaration with constant members with the same root module + module M1 { + export enum E1 { A = 0 } + } + module M1 { + export enum E1 { B } + } + module M1 { + export enum E1 { C } + ~ +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. + } + + + // Enum with initializer in only one of three declarations with constant members with the same root module + module M2 { + export enum E1 { A } + } + module M2 { + export enum E1 { B = 0 } + } + module M2 { + export enum E1 { C } + ~ +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. + } + + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumNumbering1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumNumbering1.d.ts new file mode 100644 index 0000000000000..318255210e113 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumNumbering1.d.ts @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/enumNumbering1.ts] //// + +//// [enumNumbering1.ts] +enum Test { + A, + B, + C = Math.floor(Math.random() * 1000), + D = 10, + E // Error but shouldn't be +} + + +/// [Declarations] //// + + + +//// [/.src/enumNumbering1.d.ts] +declare enum Test { + A = 0, + B = 1, + C, + D = 10, + E = 11 +} +/// [Errors] //// + +enumNumbering1.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== enumNumbering1.ts (1 errors) ==== + enum Test { + A, + B, + C = Math.floor(Math.random() * 1000), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + D = 10, + E // Error but shouldn't be + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumPropertyAccessBeforeInitalisation.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumPropertyAccessBeforeInitalisation.d.ts new file mode 100644 index 0000000000000..2a7275505d30e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumPropertyAccessBeforeInitalisation.d.ts @@ -0,0 +1,58 @@ +//// [tests/cases/compiler/enumPropertyAccessBeforeInitalisation.ts] //// + +//// [enumPropertyAccessBeforeInitalisation.ts] +enum E { + A = A, + B = E.B, + C = E["C"], + D = 1 + D +} + + +/// [Declarations] //// + + + +//// [/.src/enumPropertyAccessBeforeInitalisation.d.ts] +declare enum E { + A, + B, + C, + D +} +/// [Errors] //// + +enumPropertyAccessBeforeInitalisation.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumPropertyAccessBeforeInitalisation.ts(2,9): error TS2565: Property 'A' is used before being assigned. +enumPropertyAccessBeforeInitalisation.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumPropertyAccessBeforeInitalisation.ts(3,9): error TS2565: Property 'B' is used before being assigned. +enumPropertyAccessBeforeInitalisation.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumPropertyAccessBeforeInitalisation.ts(4,9): error TS2565: Property 'C' is used before being assigned. +enumPropertyAccessBeforeInitalisation.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumPropertyAccessBeforeInitalisation.ts(5,13): error TS2565: Property 'D' is used before being assigned. + + +==== enumPropertyAccessBeforeInitalisation.ts (8 errors) ==== + enum E { + A = A, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2565: Property 'A' is used before being assigned. + B = E.B, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS2565: Property 'B' is used before being assigned. + C = E["C"], + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS2565: Property 'C' is used before being assigned. + D = 1 + D + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2565: Property 'D' is used before being assigned. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithComputedMember.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithComputedMember.d.ts new file mode 100644 index 0000000000000..c9809cd357a53 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithComputedMember.d.ts @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/enumWithComputedMember.ts] //// + +//// [enumWithComputedMember.ts] +enum A { + X = "".length, + Y = X, + Z +} + + +/// [Declarations] //// + + + +//// [/.src/enumWithComputedMember.d.ts] +declare enum A { + X, + Y, + Z +} +/// [Errors] //// + +enumWithComputedMember.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumWithComputedMember.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumWithComputedMember.ts(4,5): error TS1061: Enum member must have initializer. + + +==== enumWithComputedMember.ts (3 errors) ==== + enum A { + X = "".length, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Y = X, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Z + ~ +!!! error TS1061: Enum member must have initializer. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithExport.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithExport.d.ts new file mode 100644 index 0000000000000..695b9bdd7b4dc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithExport.d.ts @@ -0,0 +1,38 @@ +//// [tests/cases/compiler/enumWithExport.ts] //// + +//// [enumWithExport.ts] +namespace x { + export let y = 123 +} +enum x { + z = y +} + +/// [Declarations] //// + + + +//// [/.src/enumWithExport.d.ts] +declare namespace x { + let y: number; +} +declare enum x { + z +} +/// [Errors] //// + +enumWithExport.ts(5,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumWithExport.ts(5,7): error TS2304: Cannot find name 'y'. + + +==== enumWithExport.ts (2 errors) ==== + namespace x { + export let y = 123 + } + enum x { + z = y + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2304: Cannot find name 'y'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithParenthesizedInitializer1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithParenthesizedInitializer1.d.ts new file mode 100644 index 0000000000000..531743aa079c7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithParenthesizedInitializer1.d.ts @@ -0,0 +1,29 @@ +//// [tests/cases/compiler/enumWithParenthesizedInitializer1.ts] //// + +//// [enumWithParenthesizedInitializer1.ts] +enum E { + e = -(3 +} + +/// [Declarations] //// + + + +//// [/.src/enumWithParenthesizedInitializer1.d.ts] +declare enum E { + e = -3 +} +/// [Errors] //// + +enumWithParenthesizedInitializer1.ts(2,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumWithParenthesizedInitializer1.ts(3,1): error TS1005: ')' expected. + + +==== enumWithParenthesizedInitializer1.ts (2 errors) ==== + enum E { + e = -(3 + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + ~ +!!! error TS1005: ')' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithoutInitializerAfterComputedMember.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithoutInitializerAfterComputedMember.d.ts new file mode 100644 index 0000000000000..3300c2940da86 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithoutInitializerAfterComputedMember.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/compiler/enumWithoutInitializerAfterComputedMember.ts] //// + +//// [enumWithoutInitializerAfterComputedMember.ts] +enum E { + a, + b = a, + c +} + +/// [Declarations] //// + + + +//// [/.src/enumWithoutInitializerAfterComputedMember.d.ts] +declare enum E { + a = 0, + b = 0, + c = 1 +} +/// [Errors] //// + +enumWithoutInitializerAfterComputedMember.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== enumWithoutInitializerAfterComputedMember.ts (1 errors) ==== + enum E { + a, + b = a, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/equalityWithEnumTypes.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/equalityWithEnumTypes.d.ts new file mode 100644 index 0000000000000..5628481c0f48f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/equalityWithEnumTypes.d.ts @@ -0,0 +1,126 @@ +//// [tests/cases/conformance/types/typeRelationships/comparable/equalityWithEnumTypes.ts] //// + +//// [equalityWithEnumTypes.ts] +// Literal enum type +enum E1 { + a = 1, + b = 2, +} + +// Numeric enum type +enum E2 { + a = 1 << 0, + b = 1 << 1 +} + +function f1(v: E1): void { + if (v !== 0) { // Error + v; + } + if (v !== 1) { + v; + } + if (v !== 2) { + v; + } + if (v !== 3) { // Error + v; + } +} + +function f2(v: E2): void { + if (v !== 0) { + v; + } + if (v !== 1) { + v; + } + if (v !== 2) { + v; + } + if (v !== 3) { + v; + } +} + + +/// [Declarations] //// + + + +//// [/.src/equalityWithEnumTypes.d.ts] +declare enum E1 { + a = 1, + b = 2 +} +declare enum E2 { + a = 1, + b = 2 +} +declare function f1(v: E1): void; +declare function f2(v: E2): void; +/// [Errors] //// + +equalityWithEnumTypes.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +equalityWithEnumTypes.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +equalityWithEnumTypes.ts(14,9): error TS2367: This comparison appears to be unintentional because the types 'E1' and '0' have no overlap. +equalityWithEnumTypes.ts(23,9): error TS2367: This comparison appears to be unintentional because the types 'E1' and '3' have no overlap. +equalityWithEnumTypes.ts(29,9): error TS2367: This comparison appears to be unintentional because the types 'E2' and '0' have no overlap. +equalityWithEnumTypes.ts(38,9): error TS2367: This comparison appears to be unintentional because the types 'E2' and '3' have no overlap. + + +==== equalityWithEnumTypes.ts (6 errors) ==== + // Literal enum type + enum E1 { + a = 1, + b = 2, + } + + // Numeric enum type + enum E2 { + a = 1 << 0, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + b = 1 << 1 + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + function f1(v: E1): void { + if (v !== 0) { // Error + ~~~~~~~ +!!! error TS2367: This comparison appears to be unintentional because the types 'E1' and '0' have no overlap. + v; + } + if (v !== 1) { + v; + } + if (v !== 2) { + v; + } + if (v !== 3) { // Error + ~~~~~~~ +!!! error TS2367: This comparison appears to be unintentional because the types 'E1' and '3' have no overlap. + v; + } + } + + function f2(v: E2): void { + if (v !== 0) { + ~~~~~~~ +!!! error TS2367: This comparison appears to be unintentional because the types 'E2' and '0' have no overlap. + v; + } + if (v !== 1) { + v; + } + if (v !== 2) { + v; + } + if (v !== 3) { + ~~~~~~~ +!!! error TS2367: This comparison appears to be unintentional because the types 'E2' and '3' have no overlap. + v; + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exactSpellingSuggestion.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exactSpellingSuggestion.d.ts new file mode 100644 index 0000000000000..6aca239d04d0f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exactSpellingSuggestion.d.ts @@ -0,0 +1,52 @@ +//// [tests/cases/compiler/exactSpellingSuggestion.ts] //// + +//// [exactSpellingSuggestion.ts] +// Fixes #16245 -- always suggest the exact match, even when +// other options are very close +enum U8 { + BIT_0 = 1 << 0, + BIT_1 = 1 << 1, + BIT_2 = 1 << 2 +} + +U8.bit_2 + + +/// [Declarations] //// + + + +//// [/.src/exactSpellingSuggestion.d.ts] +declare enum U8 { + BIT_0 = 1, + BIT_1 = 2, + BIT_2 = 4 +} +/// [Errors] //// + +exactSpellingSuggestion.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +exactSpellingSuggestion.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +exactSpellingSuggestion.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +exactSpellingSuggestion.ts(9,4): error TS2551: Property 'bit_2' does not exist on type 'typeof U8'. Did you mean 'BIT_2'? + + +==== exactSpellingSuggestion.ts (4 errors) ==== + // Fixes #16245 -- always suggest the exact match, even when + // other options are very close + enum U8 { + BIT_0 = 1 << 0, + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + BIT_1 = 1 << 1, + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + BIT_2 = 1 << 2 + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + U8.bit_2 + ~~~~~ +!!! error TS2551: Property 'bit_2' does not exist on type 'typeof U8'. Did you mean 'BIT_2'? +!!! related TS2728 exactSpellingSuggestion.ts:6:5: 'BIT_2' is declared here. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesJSDocInTs.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesJSDocInTs.d.ts new file mode 100644 index 0000000000000..988bdb83a1fce --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesJSDocInTs.d.ts @@ -0,0 +1,30 @@ +//// [tests/cases/compiler/expandoFunctionContextualTypesJSDocInTs.ts] //// + +//// [expandoFunctionContextualTypesJSDocInTs.ts] +export function Foo(): void { } + +// This comment should have no effect; this is a TS file. +/** @type {never} */ +Foo.bar = () => { }; + + +/// [Declarations] //// + + + +//// [/.src/expandoFunctionContextualTypesJSDocInTs.d.ts] +export declare function Foo(): void; +/// [Errors] //// + +expandoFunctionContextualTypesJSDocInTs.ts(1,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== expandoFunctionContextualTypesJSDocInTs.ts (1 errors) ==== + export function Foo(): void { } + ~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + // This comment should have no effect; this is a TS file. + /** @type {never} */ + Foo.bar = () => { }; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesNoValue.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesNoValue.d.ts new file mode 100644 index 0000000000000..f6dcde9a2bb8e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesNoValue.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/compiler/expandoFunctionContextualTypesNoValue.ts] //// + +//// [expandoFunctionContextualTypesNoValue.ts] +// GH #38532 +import Foo from "blah"; + +export function Foo(): void { } + +Foo.bar = () => { }; + + +/// [Declarations] //// + + + +//// [/.src/expandoFunctionContextualTypesNoValue.d.ts] +export declare function Foo(): void; +/// [Errors] //// + +expandoFunctionContextualTypesNoValue.ts(2,17): error TS2307: Cannot find module 'blah' or its corresponding type declarations. +expandoFunctionContextualTypesNoValue.ts(4,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== expandoFunctionContextualTypesNoValue.ts (2 errors) ==== + // GH #38532 + import Foo from "blah"; + ~~~~~~ +!!! error TS2307: Cannot find module 'blah' or its corresponding type declarations. + + export function Foo(): void { } + ~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + Foo.bar = () => { }; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionExpressionsWithDynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionExpressionsWithDynamicNames.d.ts new file mode 100644 index 0000000000000..fcb616dbf2ae8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionExpressionsWithDynamicNames.d.ts @@ -0,0 +1,48 @@ +//// [tests/cases/compiler/expandoFunctionExpressionsWithDynamicNames.ts] //// + +//// [expandoFunctionExpressionsWithDynamicNames.ts] +// https://github.com/microsoft/TypeScript/issues/54809 + +const s = "X"; + +export const expr = (): void => {} +expr[s] = 0 + +export const expr2 = function (): void {} +expr2[s] = 0 + + +/// [Declarations] //// + + + +//// [/.src/expandoFunctionExpressionsWithDynamicNames.d.ts] +export declare const expr: invalid; +export declare const expr2: invalid; +/// [Errors] //// + +expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expandoFunctionExpressionsWithDynamicNames.ts(8,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +expandoFunctionExpressionsWithDynamicNames.ts(8,14): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== expandoFunctionExpressionsWithDynamicNames.ts (4 errors) ==== + // https://github.com/microsoft/TypeScript/issues/54809 + + const s = "X"; + + export const expr = (): void => {} + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + expr[s] = 0 + + export const expr2 = function (): void {} + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + expr2[s] = 0 + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignDottedName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignDottedName.d.ts new file mode 100644 index 0000000000000..905ea5b67dddf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignDottedName.d.ts @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/externalModules/exportAssignDottedName.ts] //// + +//// [foo2.ts] +import foo1 = require('./foo1'); +export = foo1.x; // Ok + +//// [foo1.ts] +export function x(): boolean{ + return true; +} + + +/// [Declarations] //// + + + +//// [/.src/foo1.d.ts] +export declare function x(): boolean; + +//// [/.src/foo2.d.ts] +declare const _default: invalid; +export = _default; +/// [Errors] //// + +foo2.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== foo2.ts (1 errors) ==== + import foo1 = require('./foo1'); + export = foo1.x; // Ok + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +==== foo1.ts (0 errors) ==== + export function x(): boolean{ + return true; + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignNonIdentifier.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignNonIdentifier.d.ts new file mode 100644 index 0000000000000..9aaf0a60d84d7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignNonIdentifier.d.ts @@ -0,0 +1,107 @@ +//// [tests/cases/conformance/externalModules/exportAssignNonIdentifier.ts] //// + +//// [foo1.ts] +var x = 10; +export = typeof x; // Ok + +//// [foo2.ts] +export = "sausages"; // Ok + +//// [foo3.ts] +export = class Foo3 {}; // Error, not an expression + +//// [foo4.ts] +export = true; // Ok + +//// [foo5.ts] +export = undefined; // Valid. undefined is an identifier in JavaScript/TypeScript + +//// [foo6.ts] +export = void; // Error, void operator requires an argument + +//// [foo7.ts] +export = Date || String; // Ok + +//// [foo8.ts] +export = null; // Ok + + + +/// [Declarations] //// + + + +//// [/.src/foo1.d.ts] +declare const _default: invalid; +export = _default; + +//// [/.src/foo2.d.ts] +declare const _default: "sausages"; +export = _default; + +//// [/.src/foo3.d.ts] +declare const _default: { + new (): {}; +}; +export = _default; + +//// [/.src/foo4.d.ts] +declare const _default: true; +export = _default; + +//// [/.src/foo5.d.ts] +export = undefined; + +//// [/.src/foo6.d.ts] +declare const _default: invalid; +export = _default; + +//// [/.src/foo7.d.ts] +declare const _default: invalid; +export = _default; + +//// [/.src/foo8.d.ts] +declare const _default: any; +export = _default; +/// [Errors] //// + +foo1.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +foo6.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +foo6.ts(1,14): error TS1109: Expression expected. +foo7.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== foo1.ts (1 errors) ==== + var x = 10; + export = typeof x; // Ok + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +==== foo2.ts (0 errors) ==== + export = "sausages"; // Ok + +==== foo3.ts (0 errors) ==== + export = class Foo3 {}; // Error, not an expression + +==== foo4.ts (0 errors) ==== + export = true; // Ok + +==== foo5.ts (0 errors) ==== + export = undefined; // Valid. undefined is an identifier in JavaScript/TypeScript + +==== foo6.ts (2 errors) ==== + export = void; // Error, void operator requires an argument + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1109: Expression expected. + +==== foo7.ts (1 errors) ==== + export = Date || String; // Ok + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +==== foo8.ts (0 errors) ==== + export = null; // Ok + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentWithoutIdentifier1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentWithoutIdentifier1.d.ts new file mode 100644 index 0000000000000..73ba1fbbbc1b4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentWithoutIdentifier1.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/compiler/exportAssignmentWithoutIdentifier1.ts] //// + +//// [exportAssignmentWithoutIdentifier1.ts] +function Greeter() { + //... +} +Greeter.prototype.greet = function () { + //... +} +export = new Greeter(); + + +/// [Declarations] //// + + + +//// [/.src/exportAssignmentWithoutIdentifier1.d.ts] +declare const _default: invalid; +export = _default; +/// [Errors] //// + +exportAssignmentWithoutIdentifier1.ts(7,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== exportAssignmentWithoutIdentifier1.ts (1 errors) ==== + function Greeter() { + //... + } + Greeter.prototype.greet = function () { + //... + } + export = new Greeter(); + ~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ 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..abf3b0b00e448 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportDefaultNamespace.d.ts @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/declarationEmit/exportDefaultNamespace.ts] //// + +//// [exportDefaultNamespace.ts] +export default function someFunc(): string { + return 'hello!'; +} + +someFunc.someProp = 'yo'; + + +/// [Declarations] //// + + + +//// [/.src/exportDefaultNamespace.d.ts] +export default function someFunc(): string; +/// [Errors] //// + +exportDefaultNamespace.ts(1,25): error TS9009: 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 { + ~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + return 'hello!'; + } + + someFunc.someProp = 'yo'; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty.d.ts new file mode 100644 index 0000000000000..6c7464190a99a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty.d.ts @@ -0,0 +1,108 @@ +//// [tests/cases/compiler/exportEqualsProperty.ts] //// + +//// [index.ts] +/// +import { X } from "foobar"; +import X2 = require("foobarx"); +const x: X = X; +const x2: X2 = X2; + +import B = require("./a"); +const b: B = new B(B.b); + +import fooLength = require("./b"); +fooLength + 1; + +//// [declarations.d.ts] +// This test is just like exportDefaultProperty, but with `export =`. + +declare namespace foo.bar { + export type X = number; + export const X: number; +} + +declare module "foobar" { + export = foo.bar; +} + +declare module "foobarx" { + export = foo.bar.X; +} + +//// [a.ts] +namespace A { + export class B { constructor(b: number) {} } + export namespace B { export const b: number = 0; } +} +export = A.B; + +//// [b.ts] +export = "foo".length; + + +/// [Declarations] //// + + + +//// [/.src/a.d.ts] +declare const _default: invalid; +export = _default; + +//// [/.src/b.d.ts] +declare const _default: invalid; +export = _default; + +//// [/.src/index.d.ts] +export {}; +/// [Errors] //// + +a.ts(5,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +b.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +index.ts(1,22): error TS9010: Reference directives are not supported in isolated declaration mode. + + +==== index.ts (1 errors) ==== + /// + ~~~~~~~~~~~~~~~~~ +!!! error TS9010: Reference directives are not supported in isolated declaration mode. + import { X } from "foobar"; + import X2 = require("foobarx"); + const x: X = X; + const x2: X2 = X2; + + import B = require("./a"); + const b: B = new B(B.b); + + import fooLength = require("./b"); + fooLength + 1; + +==== declarations.d.ts (0 errors) ==== + // This test is just like exportDefaultProperty, but with `export =`. + + declare namespace foo.bar { + export type X = number; + export const X: number; + } + + declare module "foobar" { + export = foo.bar; + } + + declare module "foobarx" { + export = foo.bar.X; + } + +==== a.ts (1 errors) ==== + namespace A { + export class B { constructor(b: number) {} } + export namespace B { export const b: number = 0; } + } + export = A.B; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +==== b.ts (1 errors) ==== + export = "foo".length; + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty2.d.ts new file mode 100644 index 0000000000000..eda322790f768 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty2.d.ts @@ -0,0 +1,52 @@ +//// [tests/cases/compiler/exportEqualsProperty2.ts] //// + +//// [b.ts] +import B = require("./a"); +const x: B = { c: B }; + +//// [a.ts] +// This test is just like exportDefaultProperty2, but with `export =`. + +class C { + static B: number; +} +namespace C { + export interface B { c: number } +} + +export = C.B; + + +/// [Declarations] //// + + + +//// [/.src/a.d.ts] +declare const _default: invalid; +export = _default; + +//// [/.src/b.d.ts] +export {}; +/// [Errors] //// + +a.ts(10,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== b.ts (0 errors) ==== + import B = require("./a"); + const x: B = { c: B }; + +==== a.ts (1 errors) ==== + // This test is just like exportDefaultProperty2, but with `export =`. + + class C { + static B: number; + } + namespace C { + export interface B { c: number } + } + + export = C.B; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/forwardRefInEnum.d.ts new file mode 100644 index 0000000000000..b26b75e3fc0e9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/forwardRefInEnum.d.ts @@ -0,0 +1,75 @@ +//// [tests/cases/compiler/forwardRefInEnum.ts] //// + +//// [forwardRefInEnum.ts] +enum E1 { + // illegal case + // forward reference to the element of the same enum + X = Y, + X1 = E1["Y"], + // forward reference to the element of the same enum + Y = E1.Z, + Y1 = E1["Z"] +} + +enum E1 { + Z = 4 +} + + +/// [Declarations] //// + + + +//// [/.src/forwardRefInEnum.d.ts] +declare enum E1 { + X, + X1, + Y, + Y1 +} +declare enum E1 { + Z = 4 +} +/// [Errors] //// + +forwardRefInEnum.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. +forwardRefInEnum.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(5,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. +forwardRefInEnum.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(7,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. +forwardRefInEnum.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(8,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + + +==== forwardRefInEnum.ts (8 errors) ==== + enum E1 { + // illegal case + // forward reference to the element of the same enum + X = Y, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + X1 = E1["Y"], + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + // forward reference to the element of the same enum + Y = E1.Z, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + Y1 = E1["Z"] + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + } + + enum E1 { + Z = 4 + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/functionImplementations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/functionImplementations.d.ts new file mode 100644 index 0000000000000..7d8dc2dcdfaea --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/functionImplementations.d.ts @@ -0,0 +1,436 @@ +//// [tests/cases/conformance/functions/functionImplementations.ts] //// + +//// [functionImplementations.ts] +// FunctionExpression with no return type annotation and no return statement returns void +var v: void = function () { } (); + +// FunctionExpression f with no return type annotation and directly references f in its body returns any +var a: any = function f() { + return f; +}; +var a: any = function f() { + return f(); +}; + +// FunctionExpression f with no return type annotation and indirectly references f in its body returns any +var a: any = function f() { + var x = f; + return x; +}; + +// Two mutually recursive function implementations with no return type annotations +function rec1(): any { + return rec2(); +} +function rec2(): any { + return rec1(); +} +var a: any = rec1(); +var a: any = rec2(); + +// Two mutually recursive function implementations with return type annotation in one +function rec3(): number { + return rec4(); +} +function rec4(): number { + return rec3(); +} +var n: number; +var n: number = rec3(); +var n: number = rec4(); + +// FunctionExpression with no return type annotation and returns a number +var n = function (): number { + return 3; +} (); + +// FunctionExpression with no return type annotation and returns null +var nu = null; +var nu = function (): any { + return null; +} (); + +// FunctionExpression with no return type annotation and returns undefined +var un = undefined; +var un = function (): any { + return undefined; +} (); + +// FunctionExpression with no return type annotation and returns a type parameter type +var n = function (x: T): T { + return x; +} (4); + +// FunctionExpression with no return type annotation and returns a constrained type parameter type +var n = function (x: T): T { + return x; +} (4); + +// FunctionExpression with no return type annotation with multiple return statements with identical types +var n = function (): 3 | 5 { + return 3; + return 5; +}(); + +// Otherwise, the inferred return type is the first of the types of the return statement expressions +// in the function body that is a supertype of each of the others, +// ignoring return statements with no expressions. +// A compile - time error occurs if no return statement expression has a type that is a supertype of each of the others. +// FunctionExpression with no return type annotation with multiple return statements with subtype relation between returns +class Base { private m; } +class Derived extends Base { private q; } +var b: Base; +var b = function (): Base { + return new Base(); return new Derived(); +} (); + +// FunctionExpression with no return type annotation with multiple return statements with one a recursive call +var a = function f(): Base { + return new Base(); return new Derived(); return f(); // ? +} (); + +// FunctionExpression with non -void return type annotation with a single throw statement +undefined === function (): number { + throw undefined; +}; + +// Type of 'this' in function implementation is 'any' +function thisFunc(): void { + var x = this; + var x: any; +} + +// Function signature with optional parameter, no type annotation and initializer has initializer's type +function opt1(n: number = 4): void { + var m = n; + var m: number; +} + +// Function signature with optional parameter, no type annotation and initializer has initializer's widened type +function opt2(n: { + x: any; + y: any; +} = { x: null, y: undefined }): void { + var m = n; + var m: { x: any; y: any }; +} + +// Function signature with initializer referencing other parameter to the left +function opt3(n: number, m: number = n): void { + var y = m; + var y: number; +} + +// Function signature with optional parameter has correct codegen +// (tested above) + +// FunctionExpression with non -void return type annotation return with no expression +function f6(): number { + return; +} + +class Derived2 extends Base { private r: string; } +class AnotherClass { private x } +// if f is a contextually typed function expression, the inferred return type is the union type +// of the types of the return statement expressions in the function body, +// ignoring return statements with no expressions. +var f7: (x: number) => string | number = x => { // should be (x: number) => number | string + if (x < 0) { return x; } + return x.toString(); +} +var f8: (x: number) => any = x => { // should be (x: number) => Base + return new Base(); + return new Derived2(); +} +var f9: (x: number) => any = x => { // should be (x: number) => Base + return new Base(); + return new Derived(); + return new Derived2(); +} +var f10: (x: number) => any = x => { // should be (x: number) => Derived | Derived1 + return new Derived(); + return new Derived2(); +} +var f11: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass + return new Base(); + return new AnotherClass(); +} +var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass + return new Base(); + return; // should be ignored + return new AnotherClass(); +} + +/// [Declarations] //// + + + +//// [/.src/functionImplementations.d.ts] +declare var v: void; +declare var a: any; +declare var a: any; +declare var a: any; +declare function rec1(): any; +declare function rec2(): any; +declare var a: any; +declare var a: any; +declare function rec3(): number; +declare function rec4(): number; +declare var n: number; +declare var n: number; +declare var n: number; +declare var n: invalid; +declare var nu: any; +declare var nu: invalid; +declare var un: any; +declare var un: invalid; +declare var n: invalid; +declare var n: invalid; +declare var n: invalid; +declare class Base { + private m; +} +declare class Derived extends Base { + private q; +} +declare var b: Base; +declare var b: invalid; +declare var a: invalid; +declare function thisFunc(): void; +declare function opt1(n?: number): void; +declare function opt2(n?: { + x: any; + y: any; +}): void; +declare function opt3(n: number, m?: number): void; +declare function f6(): number; +declare class Derived2 extends Base { + private r; +} +declare class AnotherClass { + private x; +} +declare var f7: (x: number) => string | number; +declare var f8: (x: number) => any; +declare var f9: (x: number) => any; +declare var f10: (x: number) => any; +declare var f11: (x: number) => any; +declare var f12: (x: number) => any; +/// [Errors] //// + +functionImplementations.ts(40,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +functionImplementations.ts(46,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +functionImplementations.ts(52,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +functionImplementations.ts(57,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +functionImplementations.ts(62,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +functionImplementations.ts(67,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type '3 | 5'. +functionImplementations.ts(67,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +functionImplementations.ts(80,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +functionImplementations.ts(85,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'Base'. +functionImplementations.ts(85,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +functionImplementations.ts(90,1): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value. + + +==== functionImplementations.ts (11 errors) ==== + // FunctionExpression with no return type annotation and no return statement returns void + var v: void = function () { } (); + + // FunctionExpression f with no return type annotation and directly references f in its body returns any + var a: any = function f() { + return f; + }; + var a: any = function f() { + return f(); + }; + + // FunctionExpression f with no return type annotation and indirectly references f in its body returns any + var a: any = function f() { + var x = f; + return x; + }; + + // Two mutually recursive function implementations with no return type annotations + function rec1(): any { + return rec2(); + } + function rec2(): any { + return rec1(); + } + var a: any = rec1(); + var a: any = rec2(); + + // Two mutually recursive function implementations with return type annotation in one + function rec3(): number { + return rec4(); + } + function rec4(): number { + return rec3(); + } + var n: number; + var n: number = rec3(); + var n: number = rec4(); + + // FunctionExpression with no return type annotation and returns a number + var n = function (): number { + ~~~~~~~~~~~~~~~~~~~~~ + return 3; + ~~~~~~~~~~~~~ + } (); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // FunctionExpression with no return type annotation and returns null + var nu = null; + var nu = function (): any { + ~~~~~~~~~~~~~~~~~~ + return null; + ~~~~~~~~~~~~~~~~ + } (); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // FunctionExpression with no return type annotation and returns undefined + var un = undefined; + var un = function (): any { + ~~~~~~~~~~~~~~~~~~ + return undefined; + ~~~~~~~~~~~~~~~~~~~~~ + } (); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // FunctionExpression with no return type annotation and returns a type parameter type + var n = function (x: T): T { + ~~~~~~~~~~~~~~~~~~~~~~~ + return x; + ~~~~~~~~~~~~~ + } (4); + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // FunctionExpression with no return type annotation and returns a constrained type parameter type + var n = function (x: T): T { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + return x; + ~~~~~~~~~~~~~ + } (4); + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // FunctionExpression with no return type annotation with multiple return statements with identical types + var n = function (): 3 | 5 { + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type '3 | 5'. +!!! related TS6203 functionImplementations.ts:35:5: 'n' was also declared here. + ~~~~~~~~~~~~~~~~~~~~ + return 3; + ~~~~~~~~~~~~~ + return 5; + ~~~~~~~~~~~~~ + }(); + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // Otherwise, the inferred return type is the first of the types of the return statement expressions + // in the function body that is a supertype of each of the others, + // ignoring return statements with no expressions. + // A compile - time error occurs if no return statement expression has a type that is a supertype of each of the others. + // FunctionExpression with no return type annotation with multiple return statements with subtype relation between returns + class Base { private m; } + class Derived extends Base { private q; } + var b: Base; + var b = function (): Base { + ~~~~~~~~~~~~~~~~~~~ + return new Base(); return new Derived(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + } (); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // FunctionExpression with no return type annotation with multiple return statements with one a recursive call + var a = function f(): Base { + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'Base'. +!!! related TS6203 functionImplementations.ts:5:5: 'a' was also declared here. + ~~~~~~~~~~~~~~~~~~~~ + return new Base(); return new Derived(); return f(); // ? + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + } (); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // FunctionExpression with non -void return type annotation with a single throw statement + undefined === function (): number { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + throw undefined; + ~~~~~~~~~~~~~~~~~~~~ + }; + ~ +!!! error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value. + + // Type of 'this' in function implementation is 'any' + function thisFunc(): void { + var x = this; + var x: any; + } + + // Function signature with optional parameter, no type annotation and initializer has initializer's type + function opt1(n: number = 4): void { + var m = n; + var m: number; + } + + // Function signature with optional parameter, no type annotation and initializer has initializer's widened type + function opt2(n: { + x: any; + y: any; + } = { x: null, y: undefined }): void { + var m = n; + var m: { x: any; y: any }; + } + + // Function signature with initializer referencing other parameter to the left + function opt3(n: number, m: number = n): void { + var y = m; + var y: number; + } + + // Function signature with optional parameter has correct codegen + // (tested above) + + // FunctionExpression with non -void return type annotation return with no expression + function f6(): number { + return; + } + + class Derived2 extends Base { private r: string; } + class AnotherClass { private x } + // if f is a contextually typed function expression, the inferred return type is the union type + // of the types of the return statement expressions in the function body, + // ignoring return statements with no expressions. + var f7: (x: number) => string | number = x => { // should be (x: number) => number | string + if (x < 0) { return x; } + return x.toString(); + } + var f8: (x: number) => any = x => { // should be (x: number) => Base + return new Base(); + return new Derived2(); + } + var f9: (x: number) => any = x => { // should be (x: number) => Base + return new Base(); + return new Derived(); + return new Derived2(); + } + var f10: (x: number) => any = x => { // should be (x: number) => Derived | Derived1 + return new Derived(); + return new Derived2(); + } + var f11: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass + return new Base(); + return new AnotherClass(); + } + var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass + return new Base(); + return; // should be ignored + return new AnotherClass(); + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/initializersInAmbientEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/initializersInAmbientEnums.d.ts new file mode 100644 index 0000000000000..9b5d314fc9878 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/initializersInAmbientEnums.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/compiler/initializersInAmbientEnums.ts] //// + +//// [initializersInAmbientEnums.ts] +declare enum E { + a = 10, + b = a, + e = 10 << 2 * 8, +} + +/// [Declarations] //// + + + +//// [/.src/initializersInAmbientEnums.d.ts] +declare enum E { + a = 10, + b = 10, + e = 655360 +} +/// [Errors] //// + +initializersInAmbientEnums.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +initializersInAmbientEnums.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== initializersInAmbientEnums.ts (2 errors) ==== + declare enum E { + a = 10, + b = a, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + e = 10 << 2 * 8, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts new file mode 100644 index 0000000000000..67292291dc3d6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts @@ -0,0 +1,136 @@ +//// [tests/cases/compiler/isolatedModulesGlobalNamespacesAndEnums.ts] //// + +//// [script-namespaces.ts] +namespace Instantiated { + export const x = 1; +} +namespace Uninstantiated { + export type T = number; +} +declare namespace Ambient { + export const x: number; +} + +//// [module-namespaces.ts] +export namespace Instantiated { + export const x = 1; +} + +//// [enum1.ts] +enum Enum { A, B, C } +declare enum Enum { X = 1_000_000 } +const d = 'd'; + +//// [enum2.ts] +enum Enum { + D = d, + E = A, // error + Y = X, // error + Z = Enum.A +} + +declare enum Enum { + F = A +} + +/// [Declarations] //// + + + +//// [/.src/enum1.d.ts] +declare enum Enum { + A = 0, + B = 1, + C = 2 +} +declare enum Enum { + X = 1000000 +} +declare const d = "d"; + +//// [/.src/enum2.d.ts] +declare enum Enum { + D, + E,// error + Y,// error + Z +} +declare enum Enum { + F +} + +//// [/.src/module-namespaces.d.ts] +export declare namespace Instantiated { + const x = 1; +} + +//// [/.src/script-namespaces.d.ts] +declare namespace Instantiated { + const x = 1; +} +declare namespace Uninstantiated { + type T = number; +} +declare namespace Ambient { + const x: number; +} +/// [Errors] //// + +enum2.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enum2.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enum2.ts(3,9): error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. +enum2.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enum2.ts(4,9): error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. +enum2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enum2.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +script-namespaces.ts(1,11): error TS1280: Namespaces are not allowed in global script files when 'isolatedModules' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement. + + +==== script-namespaces.ts (1 errors) ==== + namespace Instantiated { + ~~~~~~~~~~~~ +!!! error TS1280: Namespaces are not allowed in global script files when 'isolatedModules' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement. + export const x = 1; + } + namespace Uninstantiated { + export type T = number; + } + declare namespace Ambient { + export const x: number; + } + +==== module-namespaces.ts (0 errors) ==== + export namespace Instantiated { + export const x = 1; + } + +==== enum1.ts (0 errors) ==== + enum Enum { A, B, C } + declare enum Enum { X = 1_000_000 } + const d = 'd'; + +==== enum2.ts (7 errors) ==== + enum Enum { + D = d, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + E = A, // error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. + Y = X, // error + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. + Z = Enum.A + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + declare enum Enum { + F = A + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsContainerMergeTsDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsContainerMergeTsDeclaration.d.ts new file mode 100644 index 0000000000000..66a69e921078f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsContainerMergeTsDeclaration.d.ts @@ -0,0 +1,44 @@ +//// [tests/cases/conformance/salsa/jsContainerMergeTsDeclaration.ts] //// + +//// [a.js] +var /*1*/x = function foo() { +} +x.a = function bar() { +} +//// [b.ts] +var x = function (): number { + return 1; +}(); + + +/// [Declarations] //// + + + +//// [/.src/b.d.ts] +declare var x: invalid; +/// [Errors] //// + +error TS6504: File 'a.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 +b.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +!!! error TS6504: File 'a.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 +==== a.js (0 errors) ==== + var /*1*/x = function foo() { + } + x.a = function bar() { + } +==== b.ts (1 errors) ==== + var x = function (): number { + ~~~~~~~~~~~~~~~~~~~~~ + return 1; + ~~~~~~~~~~~~~ + }(); + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxComponentTypeErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxComponentTypeErrors.d.ts new file mode 100644 index 0000000000000..293efbc972cfb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxComponentTypeErrors.d.ts @@ -0,0 +1,191 @@ +//// [tests/cases/compiler/jsxComponentTypeErrors.tsx] //// + +//// [jsxComponentTypeErrors.tsx] +namespace JSX { + export interface Element { + type: 'element'; + } + export interface ElementClass { + type: 'element-class'; + } +} + +function FunctionComponent({type}: {type?: T}): { + type: T | undefined; +} { + return { + type + } +} +FunctionComponent.useThis = function() { + return ; +} + +class ClassComponent { + type = 'string'; +} + +const MixedComponent: typeof FunctionComponent | typeof ClassComponent = Math.random() ? FunctionComponent : ClassComponent; + +const elem1: JSX.Element = ; +const elem2: JSX.Element = />; +const elem3: JSX.Element = ; +const elem4: JSX.Element = ; + +const obj = { + MemberFunctionComponent(): {} { + return {}; + }, + MemberClassComponent: class {}, +}; + +const elem5: JSX.Element = ; +const elem6: JSX.Element = ; + + +/// [Declarations] //// + + + +//// [/.src/jsxComponentTypeErrors.d.ts] +declare namespace JSX { + interface Element { + type: 'element'; + } + interface ElementClass { + type: 'element-class'; + } +} +declare function FunctionComponent({ type }: { + type?: T; +}): { + type: T | undefined; +}; +declare class ClassComponent { + type: string; +} +declare const MixedComponent: typeof FunctionComponent | typeof ClassComponent; +declare const elem1: JSX.Element; +declare const elem2: JSX.Element; +declare const elem3: JSX.Element; +declare const elem4: JSX.Element; +declare const obj: { + MemberFunctionComponent(): {}; + MemberClassComponent: { + new (): {}; + }; +}; +declare const elem5: JSX.Element; +declare const elem6: JSX.Element; +/// [Errors] //// + +jsxComponentTypeErrors.tsx(10,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +jsxComponentTypeErrors.tsx(18,11): error TS2786: 'this' cannot be used as a JSX component. + Its return type '{ type: "foo" | undefined; }' is not a valid JSX element. + Types of property 'type' are incompatible. + Type '"foo" | undefined' is not assignable to type '"element"'. + Type 'undefined' is not assignable to type '"element"'. +jsxComponentTypeErrors.tsx(27,29): error TS2786: 'FunctionComponent' cannot be used as a JSX component. + Its return type '{ type: "abc" | undefined; }' is not a valid JSX element. + Types of property 'type' are incompatible. + Type '"abc" | undefined' is not assignable to type '"element"'. + Type 'undefined' is not assignable to type '"element"'. +jsxComponentTypeErrors.tsx(28,29): error TS2786: 'FunctionComponent' cannot be used as a JSX component. + Its return type '{ type: "abc" | undefined; }' is not a valid JSX element. +jsxComponentTypeErrors.tsx(29,29): error TS2786: 'ClassComponent' cannot be used as a JSX component. + Its instance type 'ClassComponent' is not a valid JSX element. + Types of property 'type' are incompatible. + Type 'string' is not assignable to type '"element-class"'. +jsxComponentTypeErrors.tsx(30,29): error TS2786: 'MixedComponent' cannot be used as a JSX component. + Its element type 'ClassComponent | { type: string | undefined; }' is not a valid JSX element. + Type 'ClassComponent' is not assignable to type 'Element | ElementClass | null'. + Type 'ClassComponent' is not assignable to type 'Element | ElementClass'. + Type 'ClassComponent' is not assignable to type 'ElementClass'. +jsxComponentTypeErrors.tsx(39,29): error TS2786: 'obj.MemberFunctionComponent' cannot be used as a JSX component. + Its return type '{}' is not a valid JSX element. + Property 'type' is missing in type '{}' but required in type 'Element'. +jsxComponentTypeErrors.tsx(40,29): error TS2786: 'obj. MemberClassComponent' cannot be used as a JSX component. + Its instance type 'MemberClassComponent' is not a valid JSX element. + Property 'type' is missing in type 'MemberClassComponent' but required in type 'ElementClass'. + + +==== jsxComponentTypeErrors.tsx (8 errors) ==== + namespace JSX { + export interface Element { + type: 'element'; + } + export interface ElementClass { + type: 'element-class'; + } + } + + function FunctionComponent({type}: {type?: T}): { + ~~~~~~~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + type: T | undefined; + } { + return { + type + } + } + FunctionComponent.useThis = function() { + return ; + ~~~~ +!!! error TS2786: 'this' cannot be used as a JSX component. +!!! error TS2786: Its return type '{ type: "foo" | undefined; }' is not a valid JSX element. +!!! error TS2786: Types of property 'type' are incompatible. +!!! error TS2786: Type '"foo" | undefined' is not assignable to type '"element"'. +!!! error TS2786: Type 'undefined' is not assignable to type '"element"'. + } + + class ClassComponent { + type = 'string'; + } + + const MixedComponent: typeof FunctionComponent | typeof ClassComponent = Math.random() ? FunctionComponent : ClassComponent; + + const elem1: JSX.Element = ; + ~~~~~~~~~~~~~~~~~ +!!! error TS2786: 'FunctionComponent' cannot be used as a JSX component. +!!! error TS2786: Its return type '{ type: "abc" | undefined; }' is not a valid JSX element. +!!! error TS2786: Types of property 'type' are incompatible. +!!! error TS2786: Type '"abc" | undefined' is not assignable to type '"element"'. +!!! error TS2786: Type 'undefined' is not assignable to type '"element"'. + const elem2: JSX.Element = />; + ~~~~~~~~~~~~~~~~~ +!!! error TS2786: 'FunctionComponent' cannot be used as a JSX component. +!!! error TS2786: Its return type '{ type: "abc" | undefined; }' is not a valid JSX element. + const elem3: JSX.Element = ; + ~~~~~~~~~~~~~~ +!!! error TS2786: 'ClassComponent' cannot be used as a JSX component. +!!! error TS2786: Its instance type 'ClassComponent' is not a valid JSX element. +!!! error TS2786: Types of property 'type' are incompatible. +!!! error TS2786: Type 'string' is not assignable to type '"element-class"'. + const elem4: JSX.Element = ; + ~~~~~~~~~~~~~~ +!!! error TS2786: 'MixedComponent' cannot be used as a JSX component. +!!! error TS2786: Its element type 'ClassComponent | { type: string | undefined; }' is not a valid JSX element. +!!! error TS2786: Type 'ClassComponent' is not assignable to type 'Element | ElementClass | null'. +!!! error TS2786: Type 'ClassComponent' is not assignable to type 'Element | ElementClass'. +!!! error TS2786: Type 'ClassComponent' is not assignable to type 'ElementClass'. + + const obj = { + MemberFunctionComponent(): {} { + return {}; + }, + MemberClassComponent: class {}, + }; + + const elem5: JSX.Element = ; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2786: 'obj.MemberFunctionComponent' cannot be used as a JSX component. +!!! error TS2786: Its return type '{}' is not a valid JSX element. +!!! error TS2786: Property 'type' is missing in type '{}' but required in type 'Element'. +!!! related TS2728 jsxComponentTypeErrors.tsx:3:5: 'type' is declared here. + const elem6: JSX.Element = ; + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2786: 'obj. MemberClassComponent' cannot be used as a JSX component. +!!! error TS2786: Its instance type 'MemberClassComponent' is not a valid JSX element. +!!! error TS2786: Property 'type' is missing in type 'MemberClassComponent' but required in type 'ElementClass'. +!!! related TS2728 jsxComponentTypeErrors.tsx:6:5: 'type' is declared here. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespace.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespace.d.ts new file mode 100644 index 0000000000000..b7490c293acb8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespace.d.ts @@ -0,0 +1,216 @@ +//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespace.tsx] //// + +//// [/node_modules/preact/index.d.ts] +type Defaultize = + // Distribute over unions + Props extends any // Make any properties included in Default optional + ? Partial>> & + // Include the remaining properties from Props + Pick> + : never; +export namespace JSXInternal { + interface HTMLAttributes { } + interface SVGAttributes { } + type LibraryManagedAttributes = Component extends { + defaultProps: infer Defaults; + } + ? Defaultize + : Props; + + interface IntrinsicAttributes { + key?: any; + } + + interface Element extends VNode { } + + interface ElementClass extends Component { } + + interface ElementAttributesProperty { + props: any; + } + + interface ElementChildrenAttribute { + children: any; + } + + interface IntrinsicElements { + div: HTMLAttributes; + } +} +export const Fragment: unique symbol; +export type ComponentType = {}; +export type ComponentChild = {}; +export type ComponentChildren = {}; +export type VNode = {}; +export type Attributes = {}; +export type Component = {}; +//// [/node_modules/preact/jsx-runtime/index.d.ts] +export { Fragment } from '..'; +import { + ComponentType, + ComponentChild, + ComponentChildren, + VNode, + Attributes +} from '..'; +import { JSXInternal } from '..'; + +export function jsx( + type: string, + props: JSXInternal.HTMLAttributes & + JSXInternal.SVGAttributes & + Record & { children?: ComponentChild }, + key?: string +): VNode; +export function jsx

( + type: ComponentType

, + props: Attributes & P & { children?: ComponentChild }, + key?: string +): VNode; + + +export function jsxs( + type: string, + props: JSXInternal.HTMLAttributes & + JSXInternal.SVGAttributes & + Record & { children?: ComponentChild[] }, + key?: string +): VNode; +export function jsxs

( + type: ComponentType

, + props: Attributes & P & { children?: ComponentChild[] }, + key?: string +): VNode; + + +export function jsxDEV( + type: string, + props: JSXInternal.HTMLAttributes & + JSXInternal.SVGAttributes & + Record & { children?: ComponentChildren }, + key?: string +): VNode; +export function jsxDEV

( + type: ComponentType

, + props: Attributes & P & { children?: ComponentChildren }, + key?: string +): VNode; + +export import JSX = JSXInternal; + +//// [/index.tsx] +export const Comp = () =>

; + +/// [Declarations] //// + + + +//// [/index.d.ts] +export declare const Comp: invalid; +/// [Errors] //// + +/index.tsx(1,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== /node_modules/preact/index.d.ts (0 errors) ==== + type Defaultize = + // Distribute over unions + Props extends any // Make any properties included in Default optional + ? Partial>> & + // Include the remaining properties from Props + Pick> + : never; + export namespace JSXInternal { + interface HTMLAttributes { } + interface SVGAttributes { } + type LibraryManagedAttributes = Component extends { + defaultProps: infer Defaults; + } + ? Defaultize + : Props; + + interface IntrinsicAttributes { + key?: any; + } + + interface Element extends VNode { } + + interface ElementClass extends Component { } + + interface ElementAttributesProperty { + props: any; + } + + interface ElementChildrenAttribute { + children: any; + } + + interface IntrinsicElements { + div: HTMLAttributes; + } + } + export const Fragment: unique symbol; + export type ComponentType = {}; + export type ComponentChild = {}; + export type ComponentChildren = {}; + export type VNode = {}; + export type Attributes = {}; + export type Component = {}; +==== /node_modules/preact/jsx-runtime/index.d.ts (0 errors) ==== + export { Fragment } from '..'; + import { + ComponentType, + ComponentChild, + ComponentChildren, + VNode, + Attributes + } from '..'; + import { JSXInternal } from '..'; + + export function jsx( + type: string, + props: JSXInternal.HTMLAttributes & + JSXInternal.SVGAttributes & + Record & { children?: ComponentChild }, + key?: string + ): VNode; + export function jsx

( + type: ComponentType

, + props: Attributes & P & { children?: ComponentChild }, + key?: string + ): VNode; + + + export function jsxs( + type: string, + props: JSXInternal.HTMLAttributes & + JSXInternal.SVGAttributes & + Record & { children?: ComponentChild[] }, + key?: string + ): VNode; + export function jsxs

( + type: ComponentType

, + props: Attributes & P & { children?: ComponentChild[] }, + key?: string + ): VNode; + + + export function jsxDEV( + type: string, + props: JSXInternal.HTMLAttributes & + JSXInternal.SVGAttributes & + Record & { children?: ComponentChildren }, + key?: string + ): VNode; + export function jsxDEV

( + type: ComponentType

, + props: Attributes & P & { children?: ComponentChildren }, + key?: string + ): VNode; + + export import JSX = JSXInternal; + +==== /index.tsx (1 errors) ==== + export const Comp = () =>

; + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts new file mode 100644 index 0000000000000..a3510b55d8dd0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts @@ -0,0 +1,142 @@ +//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne.tsx] //// + +//// [/node_modules/react/index.d.ts] +export = React; +export as namespace React; + +declare namespace React {} + +declare global { + namespace JSX { + interface Element {} + interface ElementClass {} + interface ElementAttributesProperty {} + interface ElementChildrenAttribute {} + type LibraryManagedAttributes = {} + interface IntrinsicAttributes {} + interface IntrinsicClassAttributes {} + interface IntrinsicElements { + div: {} + } + } +} +//// [/node_modules/@emotion/react/jsx-runtime/index.d.ts] +export { EmotionJSX as JSX } from './jsx-namespace' + +//// [/node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts] +import 'react' + +type WithConditionalCSSProp

= 'className' extends keyof P + ? (P extends { className?: string } ? P & { css?: string } : P) + : P + +type ReactJSXElement = JSX.Element +type ReactJSXElementClass = JSX.ElementClass +type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty +type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute +type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes +type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes +type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes +type ReactJSXIntrinsicElements = JSX.IntrinsicElements + +export namespace EmotionJSX { + interface Element extends ReactJSXElement {} + interface ElementClass extends ReactJSXElementClass {} + interface ElementAttributesProperty + extends ReactJSXElementAttributesProperty {} + interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute {} + + type LibraryManagedAttributes = WithConditionalCSSProp

& + ReactJSXLibraryManagedAttributes + + interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes {} + interface IntrinsicClassAttributes + extends ReactJSXIntrinsicClassAttributes {} + + type IntrinsicElements = { + [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { + css?: string + } + } +} + +//// [/index.tsx] +export const Comp = () =>

; + + +/// [Declarations] //// + + + +//// [/index.d.ts] +export declare const Comp: invalid; +/// [Errors] //// + +/index.tsx(1,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== /node_modules/react/index.d.ts (0 errors) ==== + export = React; + export as namespace React; + + declare namespace React {} + + declare global { + namespace JSX { + interface Element {} + interface ElementClass {} + interface ElementAttributesProperty {} + interface ElementChildrenAttribute {} + type LibraryManagedAttributes = {} + interface IntrinsicAttributes {} + interface IntrinsicClassAttributes {} + interface IntrinsicElements { + div: {} + } + } + } +==== /node_modules/@emotion/react/jsx-runtime/index.d.ts (0 errors) ==== + export { EmotionJSX as JSX } from './jsx-namespace' + +==== /node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts (0 errors) ==== + import 'react' + + type WithConditionalCSSProp

= 'className' extends keyof P + ? (P extends { className?: string } ? P & { css?: string } : P) + : P + + type ReactJSXElement = JSX.Element + type ReactJSXElementClass = JSX.ElementClass + type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty + type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute + type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes + type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes + type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes + type ReactJSXIntrinsicElements = JSX.IntrinsicElements + + export namespace EmotionJSX { + interface Element extends ReactJSXElement {} + interface ElementClass extends ReactJSXElementClass {} + interface ElementAttributesProperty + extends ReactJSXElementAttributesProperty {} + interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute {} + + type LibraryManagedAttributes = WithConditionalCSSProp

& + ReactJSXLibraryManagedAttributes + + interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes {} + interface IntrinsicClassAttributes + extends ReactJSXIntrinsicClassAttributes {} + + type IntrinsicElements = { + [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { + css?: string + } + } + } + +==== /index.tsx (1 errors) ==== + export const Comp = () =>

; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts new file mode 100644 index 0000000000000..a3510b55d8dd0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts @@ -0,0 +1,142 @@ +//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne.tsx] //// + +//// [/node_modules/react/index.d.ts] +export = React; +export as namespace React; + +declare namespace React {} + +declare global { + namespace JSX { + interface Element {} + interface ElementClass {} + interface ElementAttributesProperty {} + interface ElementChildrenAttribute {} + type LibraryManagedAttributes = {} + interface IntrinsicAttributes {} + interface IntrinsicClassAttributes {} + interface IntrinsicElements { + div: {} + } + } +} +//// [/node_modules/@emotion/react/jsx-runtime/index.d.ts] +export { EmotionJSX as JSX } from './jsx-namespace' + +//// [/node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts] +import 'react' + +type WithConditionalCSSProp

= 'className' extends keyof P + ? (P extends { className?: string } ? P & { css?: string } : P) + : P + +type ReactJSXElement = JSX.Element +type ReactJSXElementClass = JSX.ElementClass +type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty +type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute +type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes +type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes +type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes +type ReactJSXIntrinsicElements = JSX.IntrinsicElements + +export namespace EmotionJSX { + interface Element extends ReactJSXElement {} + interface ElementClass extends ReactJSXElementClass {} + interface ElementAttributesProperty + extends ReactJSXElementAttributesProperty {} + interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute {} + + type LibraryManagedAttributes = WithConditionalCSSProp

& + ReactJSXLibraryManagedAttributes + + interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes {} + interface IntrinsicClassAttributes + extends ReactJSXIntrinsicClassAttributes {} + + type IntrinsicElements = { + [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { + css?: string + } + } +} + +//// [/index.tsx] +export const Comp = () =>

; + + +/// [Declarations] //// + + + +//// [/index.d.ts] +export declare const Comp: invalid; +/// [Errors] //// + +/index.tsx(1,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== /node_modules/react/index.d.ts (0 errors) ==== + export = React; + export as namespace React; + + declare namespace React {} + + declare global { + namespace JSX { + interface Element {} + interface ElementClass {} + interface ElementAttributesProperty {} + interface ElementChildrenAttribute {} + type LibraryManagedAttributes = {} + interface IntrinsicAttributes {} + interface IntrinsicClassAttributes {} + interface IntrinsicElements { + div: {} + } + } + } +==== /node_modules/@emotion/react/jsx-runtime/index.d.ts (0 errors) ==== + export { EmotionJSX as JSX } from './jsx-namespace' + +==== /node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts (0 errors) ==== + import 'react' + + type WithConditionalCSSProp

= 'className' extends keyof P + ? (P extends { className?: string } ? P & { css?: string } : P) + : P + + type ReactJSXElement = JSX.Element + type ReactJSXElementClass = JSX.ElementClass + type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty + type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute + type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes + type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes + type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes + type ReactJSXIntrinsicElements = JSX.IntrinsicElements + + export namespace EmotionJSX { + interface Element extends ReactJSXElement {} + interface ElementClass extends ReactJSXElementClass {} + interface ElementAttributesProperty + extends ReactJSXElementAttributesProperty {} + interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute {} + + type LibraryManagedAttributes = WithConditionalCSSProp

& + ReactJSXLibraryManagedAttributes + + interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes {} + interface IntrinsicClassAttributes + extends ReactJSXIntrinsicClassAttributes {} + + type IntrinsicElements = { + [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { + css?: string + } + } + } + +==== /index.tsx (1 errors) ==== + export const Comp = () =>

; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts new file mode 100644 index 0000000000000..9f96337fc48f8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts @@ -0,0 +1,144 @@ +//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.tsx] //// + +//// [/node_modules/react/index.d.ts] +export = React; +export as namespace React; + +declare namespace React { } + +declare global { + namespace JSX { + interface Element { } + interface ElementClass { } + interface ElementAttributesProperty { } + interface ElementChildrenAttribute { } + type LibraryManagedAttributes = {} + interface IntrinsicAttributes { } + interface IntrinsicClassAttributes { } + interface IntrinsicElements { + div: {} + } + } +} +//// [/node_modules/@emotion/react/jsx-runtime/index.d.ts] +export { EmotionJSX as JSX } from './jsx-namespace' + +//// [/node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts] +import 'react' + +type WithConditionalCSSProp

= 'className' extends keyof P + ? (P extends { className?: string } ? P & { css?: string } : P) + : P + +type ReactJSXElement = JSX.Element +type ReactJSXElementClass = JSX.ElementClass +type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty +type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute +type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes +type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes +type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes +type ReactJSXIntrinsicElements = JSX.IntrinsicElements + +export namespace EmotionJSX { + interface Element extends ReactJSXElement { } + interface ElementClass extends ReactJSXElementClass { } + interface ElementAttributesProperty + extends ReactJSXElementAttributesProperty { } + interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute { } + + type LibraryManagedAttributes = WithConditionalCSSProp

& + ReactJSXLibraryManagedAttributes + + interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes { } + interface IntrinsicClassAttributes + extends ReactJSXIntrinsicClassAttributes { } + + type IntrinsicElements = { + [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { + css?: string + } + } +} + +//// [/index.tsx] +/* @jsxImportSource @emotion/react */ +export const Comp = () =>

; + + +/// [Declarations] //// + + + +//// [/index.d.ts] +export declare const Comp: invalid; +/// [Errors] //// + +/index.tsx(2,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== /node_modules/react/index.d.ts (0 errors) ==== + export = React; + export as namespace React; + + declare namespace React { } + + declare global { + namespace JSX { + interface Element { } + interface ElementClass { } + interface ElementAttributesProperty { } + interface ElementChildrenAttribute { } + type LibraryManagedAttributes = {} + interface IntrinsicAttributes { } + interface IntrinsicClassAttributes { } + interface IntrinsicElements { + div: {} + } + } + } +==== /node_modules/@emotion/react/jsx-runtime/index.d.ts (0 errors) ==== + export { EmotionJSX as JSX } from './jsx-namespace' + +==== /node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts (0 errors) ==== + import 'react' + + type WithConditionalCSSProp

= 'className' extends keyof P + ? (P extends { className?: string } ? P & { css?: string } : P) + : P + + type ReactJSXElement = JSX.Element + type ReactJSXElementClass = JSX.ElementClass + type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty + type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute + type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes + type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes + type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes + type ReactJSXIntrinsicElements = JSX.IntrinsicElements + + export namespace EmotionJSX { + interface Element extends ReactJSXElement { } + interface ElementClass extends ReactJSXElementClass { } + interface ElementAttributesProperty + extends ReactJSXElementAttributesProperty { } + interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute { } + + type LibraryManagedAttributes = WithConditionalCSSProp

& + ReactJSXLibraryManagedAttributes + + interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes { } + interface IntrinsicClassAttributes + extends ReactJSXIntrinsicClassAttributes { } + + type IntrinsicElements = { + [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { + css?: string + } + } + } + +==== /index.tsx (1 errors) ==== + /* @jsxImportSource @emotion/react */ + export const Comp = () =>

; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ 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..a3d8bcfb51c47 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/lateBoundFunctionMemberAssignmentDeclarations.d.ts @@ -0,0 +1,32 @@ +//// [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] //// + + + +//// [/.src/index.d.ts] +export declare function foo(): void; +/// [Errors] //// + +index.ts(1,17): error TS9009: 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 (1 errors) ==== + export function foo(): void {} + ~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.bar = 12; + const _private = Symbol(); + foo[_private] = "ok"; + + const x: string = foo[_private]; + \ No newline at end of file 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..57556633abc7e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts @@ -0,0 +1,76 @@ +//// [tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts] //// + +//// [index.ts] +export const a = async () => (await import("inner")).x(); +//// [node_modules/inner/index.d.ts] +export { x } from "./other.js"; +//// [node_modules/inner/other.d.ts] +import { Thing } from "./private.js" +export const x: () => Thing; +//// [node_modules/inner/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" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + ".": { + "default": "./index.js" + }, + "./other": { + "default": "./other.js" + } + } +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: invalid; +/// [Errors] //// + +index.ts(1,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== index.ts (1 errors) ==== + export const a = async () => (await import("inner")).x(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +==== 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/mergedDeclarations2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedDeclarations2.d.ts new file mode 100644 index 0000000000000..5dbd7b59fb89c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedDeclarations2.d.ts @@ -0,0 +1,49 @@ +//// [tests/cases/compiler/mergedDeclarations2.ts] //// + +//// [mergedDeclarations2.ts] +enum Foo { + b +} +enum Foo { + a = b +} + +module Foo { + export var x: any = b +} + +/// [Declarations] //// + + + +//// [/.src/mergedDeclarations2.d.ts] +declare enum Foo { + b = 0 +} +declare enum Foo { + a +} +declare namespace Foo { + var x: any; +} +/// [Errors] //// + +mergedDeclarations2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +mergedDeclarations2.ts(9,25): error TS2304: Cannot find name 'b'. + + +==== mergedDeclarations2.ts (2 errors) ==== + enum Foo { + b + } + enum Foo { + a = b + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + module Foo { + export var x: any = b + ~ +!!! error TS2304: Cannot find name 'b'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedEnumDeclarationCodeGen.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedEnumDeclarationCodeGen.d.ts new file mode 100644 index 0000000000000..f27b4072b9315 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedEnumDeclarationCodeGen.d.ts @@ -0,0 +1,41 @@ +//// [tests/cases/compiler/mergedEnumDeclarationCodeGen.ts] //// + +//// [mergedEnumDeclarationCodeGen.ts] +enum E { + a, + b = a +} +enum E { + c = a +} + +/// [Declarations] //// + + + +//// [/.src/mergedEnumDeclarationCodeGen.d.ts] +declare enum E { + a = 0, + b = 0 +} +declare enum E { + c +} +/// [Errors] //// + +mergedEnumDeclarationCodeGen.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +mergedEnumDeclarationCodeGen.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== mergedEnumDeclarationCodeGen.ts (2 errors) ==== + enum E { + a, + b = a + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + enum E { + c = a + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/methodContainingLocalFunction.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/methodContainingLocalFunction.d.ts new file mode 100644 index 0000000000000..f4d5dfaeb63e4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/methodContainingLocalFunction.d.ts @@ -0,0 +1,135 @@ +//// [tests/cases/compiler/methodContainingLocalFunction.ts] //// + +//// [methodContainingLocalFunction.ts] +// The first case here (BugExhibition) caused a crash. Try with different permutations of features. +class BugExhibition { + public exhibitBug(): void { + function localFunction() { } + var x: { (): void; }; + x = localFunction; + } +} + +class BugExhibition2 { + private static get exhibitBug() { + function localFunction() { } + var x: { (): void; }; + x = localFunction; + return null; + } +} + +class BugExhibition3 { + public exhibitBug(): void { + function localGenericFunction(u?: U) { } + var x: { (): void; }; + x = localGenericFunction; + } +} + +class C { + exhibit(): void { + var funcExpr = (u?: U) => { }; + var x: { (): void; }; + x = funcExpr; + } +} + +module M { + export function exhibitBug(): void { + function localFunction() { } + var x: { (): void; }; + x = localFunction; + } +} + +enum E { + A = (() => { + function localFunction() { } + var x: { (): void; }; + x = localFunction; + return 0; + })() +} + +/// [Declarations] //// + + + +//// [/.src/methodContainingLocalFunction.d.ts] +declare class BugExhibition { + exhibitBug(): void; +} +declare class BugExhibition2 { + private static get exhibitBug(); +} +declare class BugExhibition3 { + exhibitBug(): void; +} +declare class C { + exhibit(): void; +} +declare namespace M { + function exhibitBug(): void; +} +declare enum E { + A +} +/// [Errors] //// + +methodContainingLocalFunction.ts(44,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== methodContainingLocalFunction.ts (1 errors) ==== + // The first case here (BugExhibition) caused a crash. Try with different permutations of features. + class BugExhibition { + public exhibitBug(): void { + function localFunction() { } + var x: { (): void; }; + x = localFunction; + } + } + + class BugExhibition2 { + private static get exhibitBug() { + function localFunction() { } + var x: { (): void; }; + x = localFunction; + return null; + } + } + + class BugExhibition3 { + public exhibitBug(): void { + function localGenericFunction(u?: U) { } + var x: { (): void; }; + x = localGenericFunction; + } + } + + class C { + exhibit(): void { + var funcExpr = (u?: U) => { }; + var x: { (): void; }; + x = funcExpr; + } + } + + module M { + export function exhibitBug(): void { + function localFunction() { } + var x: { (): void; }; + x = localFunction; + } + } + + enum E { + A = (() => { + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function localFunction() { } + var x: { (): void; }; + x = localFunction; + return 0; + })() + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixedTypeEnumComparison.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixedTypeEnumComparison.d.ts new file mode 100644 index 0000000000000..5eb830ac04ef6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixedTypeEnumComparison.d.ts @@ -0,0 +1,110 @@ +//// [tests/cases/compiler/mixedTypeEnumComparison.ts] //// + +//// [mixedTypeEnumComparison.ts] +const enum E { + S1 = "foo", + S2 = "bar", + + N1 = 1000, + N2 = 25, +} + +declare var someNumber: number + +if (someNumber > E.N2) { + someNumber = E.N2; +} + +declare const unionOfEnum: E.N1 | E.N2; + +if (someNumber > unionOfEnum) { + someNumber = E.N2; +} + +declare var someString: string + +if (someString > E.S1) { + someString = E.S2; +} + + +declare function someValue(): number; + +enum E2 { + S1 = "foo", + N1 = 1000, + C1 = someValue(), +} + +someString > E2.S1; +someNumber > E2.N1; +someNumber > E2.C1; + + +/// [Declarations] //// + + + +//// [/.src/mixedTypeEnumComparison.d.ts] +declare const enum E { + S1 = "foo", + S2 = "bar", + N1 = 1000, + N2 = 25 +} +declare var someNumber: number; +declare const unionOfEnum: E.N1 | E.N2; +declare var someString: string; +declare function someValue(): number; +declare enum E2 { + S1 = "foo", + N1 = 1000, + C1 +} +/// [Errors] //// + +mixedTypeEnumComparison.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== mixedTypeEnumComparison.ts (1 errors) ==== + const enum E { + S1 = "foo", + S2 = "bar", + + N1 = 1000, + N2 = 25, + } + + declare var someNumber: number + + if (someNumber > E.N2) { + someNumber = E.N2; + } + + declare const unionOfEnum: E.N1 | E.N2; + + if (someNumber > unionOfEnum) { + someNumber = E.N2; + } + + declare var someString: string + + if (someString > E.S1) { + someString = E.S2; + } + + + declare function someValue(): number; + + enum E2 { + S1 = "foo", + N1 = 1000, + C1 = someValue(), + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + someString > E2.S1; + someNumber > E2.N1; + someNumber > E2.C1; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationDisallowedExtensions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationDisallowedExtensions.d.ts new file mode 100644 index 0000000000000..5a6392d8cca31 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationDisallowedExtensions.d.ts @@ -0,0 +1,186 @@ +//// [tests/cases/compiler/moduleAugmentationDisallowedExtensions.ts] //// + +//// [x0.ts] +export let a = 1; + +//// [x.ts] +namespace N1 { + export let x = 1; +} + +declare module "./observable" { + var x: number; + let y: number; + const z: number; + let {x1, y1, z0: {n}, z1: {arr: [el1, el2, el3]}}: {x1: number, y1: string, z0: {n: number}, z1: {arr: number[]} } + interface A { x } + namespace N { + export class C {} + } + class Cls {} + function foo(): number; + type T = number; + import * as all from "./x0"; + import {a} from "./x0"; + export * from "./x0"; + export {a} from "./x0"; +} + +declare module "./test" { + export = N1; +} +export {} + +//// [observable.ts] +export declare class Observable { + filter(pred: (e:T) => boolean): Observable; +} +export var x = 1; + +//// [test.ts] +export let b = 1; + +//// [main.ts] +import { Observable } from "./observable" +import "./x"; + + +/// [Declarations] //// + + + +//// [/.src/main.d.ts] +import "./x"; + +//// [/.src/observable.d.ts] +export declare class Observable { + filter(pred: (e: T) => boolean): Observable; +} +export declare var x: number; + +//// [/.src/test.d.ts] +export declare let b: number; + +//// [/.src/x.d.ts] +declare namespace N1 { + let x: number; +} +declare module "./observable" { + var x: number; + let y: number; + const z: number; + let x1: invalid, y1: invalid, n: invalid, el1: invalid, el2: invalid, el3: invalid; + interface A { + x: any; + } + namespace N { + class C { + } + } + class Cls { + } + function foo(): number; + type T = number; + export * from "./x0"; + export { a } from "./x0"; +} +declare module "./test" { + export = N1; +} +export {}; + +//// [/.src/x0.d.ts] +export declare let a: number; +/// [Errors] //// + +x.ts(9,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +x.ts(9,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +x.ts(9,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +x.ts(9,38): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +x.ts(9,43): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +x.ts(9,48): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +x.ts(17,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. +x.ts(17,26): error TS2307: Cannot find module './x0' or its corresponding type declarations. +x.ts(18,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. +x.ts(18,21): error TS2307: Cannot find module './x0' or its corresponding type declarations. +x.ts(19,5): error TS2666: Exports and export assignments are not permitted in module augmentations. +x.ts(19,19): error TS2307: Cannot find module './x0' or its corresponding type declarations. +x.ts(20,5): error TS2666: Exports and export assignments are not permitted in module augmentations. +x.ts(20,21): error TS2307: Cannot find module './x0' or its corresponding type declarations. +x.ts(24,5): error TS2666: Exports and export assignments are not permitted in module augmentations. + + +==== x0.ts (0 errors) ==== + export let a = 1; + +==== x.ts (15 errors) ==== + namespace N1 { + export let x = 1; + } + + declare module "./observable" { + var x: number; + let y: number; + const z: number; + let {x1, y1, z0: {n}, z1: {arr: [el1, el2, el3]}}: {x1: number, y1: string, z0: {n: number}, z1: {arr: number[]} } + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + interface A { x } + namespace N { + export class C {} + } + class Cls {} + function foo(): number; + type T = number; + import * as all from "./x0"; + ~~~~~~ +!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. + ~~~~~~ +!!! error TS2307: Cannot find module './x0' or its corresponding type declarations. + import {a} from "./x0"; + ~~~~~~ +!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. + ~~~~~~ +!!! error TS2307: Cannot find module './x0' or its corresponding type declarations. + export * from "./x0"; + ~~~~~~ +!!! error TS2666: Exports and export assignments are not permitted in module augmentations. + ~~~~~~ +!!! error TS2307: Cannot find module './x0' or its corresponding type declarations. + export {a} from "./x0"; + ~~~~~~ +!!! error TS2666: Exports and export assignments are not permitted in module augmentations. + ~~~~~~ +!!! error TS2307: Cannot find module './x0' or its corresponding type declarations. + } + + declare module "./test" { + export = N1; + ~~~~~~ +!!! error TS2666: Exports and export assignments are not permitted in module augmentations. + } + export {} + +==== observable.ts (0 errors) ==== + export declare class Observable { + filter(pred: (e:T) => boolean): Observable; + } + export var x = 1; + +==== test.ts (0 errors) ==== + export let b = 1; + +==== main.ts (0 errors) ==== + import { Observable } from "./observable" + import "./x"; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationNoNewNames.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationNoNewNames.d.ts new file mode 100644 index 0000000000000..3b251f99650f9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationNoNewNames.d.ts @@ -0,0 +1,89 @@ +//// [tests/cases/compiler/moduleAugmentationNoNewNames.ts] //// + +//// [map.ts] +import { Observable } from "./observable" + +(Observable.prototype).map = function() { } + +declare module "./observable" { + interface Observable { + map(proj: (e:T) => U): Observable + } + class Bar {} + let y: number, z: string; + let {a: x, b: x1}: {a: number, b: number}; + module Z {} +} + +//// [observable.ts] +export declare class Observable { + filter(pred: (e:T) => boolean): Observable; +} + +//// [main.ts] +import { Observable } from "./observable" +import "./map"; + +let x: Observable; +let y = x.map(x => x + 1); + +/// [Declarations] //// + + + +//// [/.src/main.d.ts] +import "./map"; + +//// [/.src/map.d.ts] +declare module "./observable" { + interface Observable { + map(proj: (e: T) => U): Observable; + } + class Bar { + } + let y: number, z: string; + let x: invalid, x1: invalid; + namespace Z { } +} +export {}; + +//// [/.src/observable.d.ts] +export declare class Observable { + filter(pred: (e: T) => boolean): Observable; +} +/// [Errors] //// + +map.ts(11,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +map.ts(11,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== map.ts (2 errors) ==== + import { Observable } from "./observable" + + (Observable.prototype).map = function() { } + + declare module "./observable" { + interface Observable { + map(proj: (e:T) => U): Observable + } + class Bar {} + let y: number, z: string; + let {a: x, b: x1}: {a: number, b: number}; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + module Z {} + } + +==== observable.ts (0 errors) ==== + export declare class Observable { + filter(pred: (e:T) => boolean): Observable; + } + +==== main.ts (0 errors) ==== + import { Observable } from "./observable" + import "./map"; + + let x: Observable; + let y = x.map(x => x + 1); \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/negateOperatorInvalidOperations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/negateOperatorInvalidOperations.d.ts new file mode 100644 index 0000000000000..5e45b58b73160 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/negateOperatorInvalidOperations.d.ts @@ -0,0 +1,81 @@ +//// [tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts] //// + +//// [negateOperatorInvalidOperations.ts] +// Unary operator - + +// operand before - +var NUMBER1 = var NUMBER: any-; //expect error + +// invalid expressions +var NUMBER2 = -(null - undefined); +var NUMBER3 = -(null - null); +var NUMBER4 = -(undefined - undefined); + +// miss operand +var NUMBER =-; + +/// [Declarations] //// + + + +//// [/.src/negateOperatorInvalidOperations.d.ts] +declare var NUMBER1: invalid; +declare var NUMBER: any; +declare var NUMBER2: number; +declare var NUMBER3: number; +declare var NUMBER4: number; +declare var NUMBER: number; +/// [Errors] //// + +negateOperatorInvalidOperations.ts(4,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +negateOperatorInvalidOperations.ts(4,15): error TS1109: Expression expected. +negateOperatorInvalidOperations.ts(4,30): error TS1005: ',' expected. +negateOperatorInvalidOperations.ts(4,31): error TS1109: Expression expected. +negateOperatorInvalidOperations.ts(7,17): error TS18050: The value 'null' cannot be used here. +negateOperatorInvalidOperations.ts(7,24): error TS18050: The value 'undefined' cannot be used here. +negateOperatorInvalidOperations.ts(8,17): error TS18050: The value 'null' cannot be used here. +negateOperatorInvalidOperations.ts(8,24): error TS18050: The value 'null' cannot be used here. +negateOperatorInvalidOperations.ts(9,17): error TS18050: The value 'undefined' cannot be used here. +negateOperatorInvalidOperations.ts(9,29): error TS18050: The value 'undefined' cannot be used here. +negateOperatorInvalidOperations.ts(12,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'NUMBER' must be of type 'any', but here has type 'number'. +negateOperatorInvalidOperations.ts(12,14): error TS1109: Expression expected. + + +==== negateOperatorInvalidOperations.ts (12 errors) ==== + // Unary operator - + + // operand before - + var NUMBER1 = var NUMBER: any-; //expect error + +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS1109: Expression expected. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1109: Expression expected. + + // invalid expressions + var NUMBER2 = -(null - undefined); + ~~~~ +!!! error TS18050: The value 'null' cannot be used here. + ~~~~~~~~~ +!!! error TS18050: The value 'undefined' cannot be used here. + var NUMBER3 = -(null - null); + ~~~~ +!!! error TS18050: The value 'null' cannot be used here. + ~~~~ +!!! error TS18050: The value 'null' cannot be used here. + var NUMBER4 = -(undefined - undefined); + ~~~~~~~~~ +!!! error TS18050: The value 'undefined' cannot be used here. + ~~~~~~~~~ +!!! error TS18050: The value 'undefined' cannot be used here. + + // miss operand + var NUMBER =-; + ~~~~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'NUMBER' must be of type 'any', but here has type 'number'. +!!! related TS6203 negateOperatorInvalidOperations.ts:4:19: 'NUMBER' was also declared here. + ~ +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/newTargetNarrowing.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/newTargetNarrowing.d.ts new file mode 100644 index 0000000000000..5e8716bbc61e5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/newTargetNarrowing.d.ts @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/es6/newTarget/newTargetNarrowing.ts] //// + +//// [newTargetNarrowing.ts] +function foo(x: true): void { } + +function f(): void { + if (new.target.marked === true) { + foo(new.target.marked); + } +} + +f.marked = true; + + +/// [Declarations] //// + + + +//// [/.src/newTargetNarrowing.d.ts] +declare function foo(x: true): void; +declare function f(): void; +/// [Errors] //// + +newTargetNarrowing.ts(3,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== newTargetNarrowing.ts (1 errors) ==== + function foo(x: true): void { } + + function f(): void { + ~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + if (new.target.marked === true) { + foo(new.target.marked); + } + } + + f.marked = true; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/noImplicitAnyDestructuringVarDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/noImplicitAnyDestructuringVarDeclaration.d.ts new file mode 100644 index 0000000000000..19727625db4ef --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/noImplicitAnyDestructuringVarDeclaration.d.ts @@ -0,0 +1,127 @@ +//// [tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts] //// + +//// [noImplicitAnyDestructuringVarDeclaration.ts] +var [a], {b}, c: any, d: any; // error + +var [a1 = undefined], {b1 = null}, c1 = undefined, d1 = null; // error + +var [a2]: [any], {b2}: { b2: any }, c2: any, d2: any; + +var {b3}: { b3 }, c3: { b3 }; // error in type instead + +const dest: any[] = [undefined]; +const a4: any = dest[0]; +const dest_1 = { b4: null }; +const b4: any = dest_1.b4; +var c4 = undefined, d4 = null; // error // error // error // error + +const dest_2: any[] = []; +const temp: any = dest_2[0]; +const a5: any = temp === undefined ? undefined : dest_2[0]; // error + +/// [Declarations] //// + + + +//// [/.src/noImplicitAnyDestructuringVarDeclaration.d.ts] +declare var a: invalid, b: invalid, c: any, d: any; +declare var a1: invalid, b1: invalid, c1: any, d1: any; +declare var a2: invalid, b2: invalid, c2: any, d2: any; +declare var b3: invalid, c3: { + b3: any; +}; +declare const dest: any[]; +declare const a4: any; +declare const dest_1: { + b4: any; +}; +declare const b4: any; +declare var c4: any, d4: any; +declare const dest_2: any[]; +declare const temp: any; +declare const a5: any; +/// [Errors] //// + +noImplicitAnyDestructuringVarDeclaration.ts(1,5): error TS1182: A destructuring declaration must have an initializer. +noImplicitAnyDestructuringVarDeclaration.ts(1,6): error TS7031: Binding element 'a' implicitly has an 'any' type. +noImplicitAnyDestructuringVarDeclaration.ts(1,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +noImplicitAnyDestructuringVarDeclaration.ts(1,10): error TS1182: A destructuring declaration must have an initializer. +noImplicitAnyDestructuringVarDeclaration.ts(1,11): error TS7031: Binding element 'b' implicitly has an 'any' type. +noImplicitAnyDestructuringVarDeclaration.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +noImplicitAnyDestructuringVarDeclaration.ts(3,5): error TS1182: A destructuring declaration must have an initializer. +noImplicitAnyDestructuringVarDeclaration.ts(3,6): error TS7031: Binding element 'a1' implicitly has an 'any' type. +noImplicitAnyDestructuringVarDeclaration.ts(3,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +noImplicitAnyDestructuringVarDeclaration.ts(3,23): error TS1182: A destructuring declaration must have an initializer. +noImplicitAnyDestructuringVarDeclaration.ts(3,24): error TS7031: Binding element 'b1' implicitly has an 'any' type. +noImplicitAnyDestructuringVarDeclaration.ts(3,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +noImplicitAnyDestructuringVarDeclaration.ts(5,5): error TS1182: A destructuring declaration must have an initializer. +noImplicitAnyDestructuringVarDeclaration.ts(5,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +noImplicitAnyDestructuringVarDeclaration.ts(5,18): error TS1182: A destructuring declaration must have an initializer. +noImplicitAnyDestructuringVarDeclaration.ts(5,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +noImplicitAnyDestructuringVarDeclaration.ts(7,5): error TS1182: A destructuring declaration must have an initializer. +noImplicitAnyDestructuringVarDeclaration.ts(7,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +noImplicitAnyDestructuringVarDeclaration.ts(7,13): error TS7008: Member 'b3' implicitly has an 'any' type. +noImplicitAnyDestructuringVarDeclaration.ts(7,25): error TS7008: Member 'b3' implicitly has an 'any' type. +noImplicitAnyDestructuringVarDeclaration.ts(11,18): error TS7018: Object literal's property 'b4' implicitly has an 'any' type. + + +==== noImplicitAnyDestructuringVarDeclaration.ts (21 errors) ==== + var [a], {b}, c: any, d: any; // error + ~~~ +!!! error TS1182: A destructuring declaration must have an initializer. + ~ +!!! error TS7031: Binding element 'a' implicitly has an 'any' type. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS1182: A destructuring declaration must have an initializer. + ~ +!!! error TS7031: Binding element 'b' implicitly has an 'any' type. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + var [a1 = undefined], {b1 = null}, c1 = undefined, d1 = null; // error + ~~~~~~~~~~~~~~~~ +!!! error TS1182: A destructuring declaration must have an initializer. + ~~ +!!! error TS7031: Binding element 'a1' implicitly has an 'any' type. + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~ +!!! error TS1182: A destructuring declaration must have an initializer. + ~~ +!!! error TS7031: Binding element 'b1' implicitly has an 'any' type. + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + var [a2]: [any], {b2}: { b2: any }, c2: any, d2: any; + ~~~~ +!!! error TS1182: A destructuring declaration must have an initializer. + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ +!!! error TS1182: A destructuring declaration must have an initializer. + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + var {b3}: { b3 }, c3: { b3 }; // error in type instead + ~~~~ +!!! error TS1182: A destructuring declaration must have an initializer. + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS7008: Member 'b3' implicitly has an 'any' type. + ~~ +!!! error TS7008: Member 'b3' implicitly has an 'any' type. + + const dest: any[] = [undefined]; + const a4: any = dest[0]; + const dest_1 = { b4: null }; + ~~~~~~~~ +!!! error TS7018: Object literal's property 'b4' implicitly has an 'any' type. + const b4: any = dest_1.b4; + var c4 = undefined, d4 = null; // error // error // error // error + + const dest_2: any[] = []; + const temp: any = dest_2[0]; + const a5: any = temp === undefined ? undefined : dest_2[0]; // error \ No newline at end of file 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..ab71888fca1a6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModuleReexportFromDottedPath.d.ts @@ -0,0 +1,53 @@ +//// [tests/cases/compiler/nodeModuleReexportFromDottedPath.ts] //// + +//// [/node_modules/.prisma/client/index.d.ts] +export interface PrismaClientOptions { + rejectOnNotFound?: any; +} + +export class PrismaClient { + private fetcher; +} + +//// [/node_modules/@prisma/client/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; +/// [Errors] //// + +/index.ts(4,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ 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..20298cd9cd9f6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsBlocksSpecifierResolution(module=node16).d.ts @@ -0,0 +1,80 @@ +//// [tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other"; +export const a = (await import("inner")).x(); +//// [node_modules/inner/index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [node_modules/inner/other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.js" +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: invalid; +/// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! 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..20298cd9cd9f6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsBlocksSpecifierResolution(module=nodenext).d.ts @@ -0,0 +1,80 @@ +//// [tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other"; +export const a = (await import("inner")).x(); +//// [node_modules/inner/index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [node_modules/inner/other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.js" +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: invalid; +/// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! 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..90c5e5fffd84b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSourceTs(module=node16).d.ts @@ -0,0 +1,90 @@ +//// [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"; +//// [node_modules/inner/index.ts] +// esm format file +export { x } from "./other.js"; +//// [node_modules/inner/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" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.ts" +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: invalid; + +//// [/.src/node_modules/inner/index.d.ts] +export { x } from "./other.js"; + +//// [/.src/node_modules/inner/other.d.ts] +export interface Thing { +} +export declare const x: () => Thing; +/// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! 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..90c5e5fffd84b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSourceTs(module=nodenext).d.ts @@ -0,0 +1,90 @@ +//// [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"; +//// [node_modules/inner/index.ts] +// esm format file +export { x } from "./other.js"; +//// [node_modules/inner/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" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.ts" +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: invalid; + +//// [/.src/node_modules/inner/index.d.ts] +export { x } from "./other.js"; + +//// [/.src/node_modules/inner/other.d.ts] +export interface Thing { +} +export declare const x: () => Thing; +/// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! 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..8059b49e93d90 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationConditions(module=node16).d.ts @@ -0,0 +1,91 @@ +//// [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(); +//// [node_modules/inner/index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [node_modules/inner/other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + ".": { + "default": "./index.js" + }, + "./other": { + "default": "./other.js" + } + } +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: invalid; +/// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! 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..8059b49e93d90 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationConditions(module=nodenext).d.ts @@ -0,0 +1,91 @@ +//// [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(); +//// [node_modules/inner/index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [node_modules/inner/other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + ".": { + "default": "./index.js" + }, + "./other": { + "default": "./other.js" + } + } +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: invalid; +/// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! 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..75a5766dbec32 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationDirectory(module=node16).d.ts @@ -0,0 +1,81 @@ +//// [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(); +//// [node_modules/inner/index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [node_modules/inner/other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./": "./" + } +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: invalid; +/// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! 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..75a5766dbec32 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationDirectory(module=nodenext).d.ts @@ -0,0 +1,81 @@ +//// [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(); +//// [node_modules/inner/index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [node_modules/inner/other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./": "./" + } +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: invalid; +/// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! 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..3c911b0071687 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationPattern(module=node16).d.ts @@ -0,0 +1,81 @@ +//// [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(); +//// [node_modules/inner/index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [node_modules/inner/other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./*.js": "./*.js" + } +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: invalid; +/// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! 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..3c911b0071687 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesExportsSpecifierGenerationPattern(module=nodenext).d.ts @@ -0,0 +1,81 @@ +//// [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(); +//// [node_modules/inner/index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [node_modules/inner/other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./*.js": "./*.js" + } +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: invalid; +/// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! 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/nullPropertyName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nullPropertyName.d.ts new file mode 100644 index 0000000000000..714d85e029fc0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nullPropertyName.d.ts @@ -0,0 +1,184 @@ +//// [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] //// + + + +//// [/.src/nullPropertyName.d.ts] +declare function foo(): void; +/// [Errors] //// + +nullPropertyName.ts(1,10): error TS9009: 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 (1 errors) ==== + function foo(): void {} + ~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + // 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; + \ 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..938e6051630c4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/numericEnumMappedType.d.ts @@ -0,0 +1,139 @@ +//// [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] //// + + + +//// [/.src/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; +/// [Errors] //// + +numericEnumMappedType.ts(25,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +numericEnumMappedType.ts(25,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +numericEnumMappedType.ts(26,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +numericEnumMappedType.ts(26,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enum N2 { C = val(), D = val() } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + 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/objectLiteralGettersAndSetters.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/objectLiteralGettersAndSetters.d.ts new file mode 100644 index 0000000000000..1c959022f297c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/objectLiteralGettersAndSetters.d.ts @@ -0,0 +1,326 @@ +//// [tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts] //// + +//// [objectLiteralGettersAndSetters.ts] +// Get and set accessor with the same name +var sameName1a: { + a: string; +} = { get 'a'(): string { return ''; }, set a(n) { var p = n; var p: string; } }; +var sameName2a: { + 0: string; +} = { get 0.0(): string { return ''; }, set 0(n) { var p = n; var p: string; } }; +var sameName3a: { + 32: string; +} = { get 0x20(): string { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; +var sameName4a: { + "": string; +} = { get ''(): string { return ''; }, set ""(n) { var p = n; var p: string; } }; +var sameName5a: { + '\t': string; +} = { get '\t'(): string { return ''; }, set '\t'(n) { var p = n; var p: string; } }; +var sameName6a: { + a: string; +} = { get 'a'(): string { return ''; }, set a(n) { var p = n; var p: string; } }; + +// PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} +var callSig1 = { num(n: number): string { return '' } }; +var callSig1: { num: (n: number) => string; }; +var callSig2 = { num: function (n: number): string { return '' } }; +var callSig2: { num: (n: number) => string; }; +var callSig3 = { num: (n: number): string => '' }; +var callSig3: { num: (n: number) => string; }; + +// Get accessor only, type of the property is the annotated return type of the get accessor +var getter1 = { get x(): string { return undefined; } }; +var getter1: { readonly x: string; } + +// Get accessor only, type of the property is the inferred return type of the get accessor +var getter2 = { get x(): string { return ''; } }; +var getter2: { readonly x: string; } + +// Set accessor only, type of the property is the param type of the set accessor +var setter1 = { set x(n: number) { } }; +var setter1: { x: number }; + +// Set accessor only, type of the property is Any for an unannotated set accessor +var setter2: { + x: any; +} = { set x(n) { } }; +var setter2: { x: any }; + +var anyVar: any; +// Get and set accessor with matching type annotations +var sameType1: { + x: string; +} = { get x(): string { return undefined; }, set x(n: string) { } }; +var sameType2: { + x: number[]; +} = { get x(): Array { return undefined; }, set x(n: number[]) { } }; +var sameType3: { + x: any; +} = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; +var sameType4: { + x: Date; +} = { get x(): Date { return undefined; }, set x(n: Date) { } }; + +// Type of unannotated get accessor return type is the type annotation of the set accessor param +var setParamType1 = { + set n(x: (t: string) => void) { }, + get n(): (t: string) => void { return (t) => { + var p: string; + var p = t; + } + } +}; +var setParamType2: { + n: (t: string) => void; +} = { + get n() { return (t) => { + var p: string; + var p = t; + } + }, + set n(x: (t: string) => void) { } +}; + +// Type of unannotated set accessor parameter is the return type annotation of the get accessor +var getParamType1 = { + set n(x) { + var y = x; + var y: string; + }, + get n(): string { return ''; } +}; +var getParamType2: { + n: string; +} = { + get n(): string { return ''; }, + set n(x) { + var y = x; + var y: string; + } +}; + +// Type of unannotated accessors is the inferred return type of the get accessor +var getParamType3: { + n: string; +} = { + get n(): string { return ''; }, + set n(x) { + var y = x; + var y: string; + } +}; + + + +/// [Declarations] //// + + + +//// [/.src/objectLiteralGettersAndSetters.d.ts] +declare var sameName1a: { + a: string; +}; +declare var sameName2a: { + 0: string; +}; +declare var sameName3a: { + 32: string; +}; +declare var sameName4a: { + "": string; +}; +declare var sameName5a: { + '\t': string; +}; +declare var sameName6a: { + a: string; +}; +declare var callSig1: { + num(n: number): string; +}; +declare var callSig1: { + num: (n: number) => string; +}; +declare var callSig2: { + num: (n: number) => string; +}; +declare var callSig2: { + num: (n: number) => string; +}; +declare var callSig3: { + num: (n: number) => string; +}; +declare var callSig3: { + num: (n: number) => string; +}; +declare var getter1: { + x: string; +}; +declare var getter1: { + readonly x: string; +}; +declare var getter2: { + x: string; +}; +declare var getter2: { + readonly x: string; +}; +declare var setter1: { + readonly x: number; +}; +declare var setter1: { + x: number; +}; +declare var setter2: { + x: any; +}; +declare var setter2: { + x: any; +}; +declare var anyVar: any; +declare var sameType1: { + x: string; +}; +declare var sameType2: { + x: number[]; +}; +declare var sameType3: { + x: any; +}; +declare var sameType4: { + x: Date; +}; +declare var setParamType1: invalid; +declare var setParamType2: { + n: (t: string) => void; +}; +declare var getParamType1: invalid; +declare var getParamType2: { + n: string; +}; +declare var getParamType3: { + n: string; +}; +/// [Errors] //// + +objectLiteralGettersAndSetters.ts(65,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(88,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== objectLiteralGettersAndSetters.ts (2 errors) ==== + // Get and set accessor with the same name + var sameName1a: { + a: string; + } = { get 'a'(): string { return ''; }, set a(n) { var p = n; var p: string; } }; + var sameName2a: { + 0: string; + } = { get 0.0(): string { return ''; }, set 0(n) { var p = n; var p: string; } }; + var sameName3a: { + 32: string; + } = { get 0x20(): string { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; + var sameName4a: { + "": string; + } = { get ''(): string { return ''; }, set ""(n) { var p = n; var p: string; } }; + var sameName5a: { + '\t': string; + } = { get '\t'(): string { return ''; }, set '\t'(n) { var p = n; var p: string; } }; + var sameName6a: { + a: string; + } = { get 'a'(): string { return ''; }, set a(n) { var p = n; var p: string; } }; + + // PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} + var callSig1 = { num(n: number): string { return '' } }; + var callSig1: { num: (n: number) => string; }; + var callSig2 = { num: function (n: number): string { return '' } }; + var callSig2: { num: (n: number) => string; }; + var callSig3 = { num: (n: number): string => '' }; + var callSig3: { num: (n: number) => string; }; + + // Get accessor only, type of the property is the annotated return type of the get accessor + var getter1 = { get x(): string { return undefined; } }; + var getter1: { readonly x: string; } + + // Get accessor only, type of the property is the inferred return type of the get accessor + var getter2 = { get x(): string { return ''; } }; + var getter2: { readonly x: string; } + + // Set accessor only, type of the property is the param type of the set accessor + var setter1 = { set x(n: number) { } }; + var setter1: { x: number }; + + // Set accessor only, type of the property is Any for an unannotated set accessor + var setter2: { + x: any; + } = { set x(n) { } }; + var setter2: { x: any }; + + var anyVar: any; + // Get and set accessor with matching type annotations + var sameType1: { + x: string; + } = { get x(): string { return undefined; }, set x(n: string) { } }; + var sameType2: { + x: number[]; + } = { get x(): Array { return undefined; }, set x(n: number[]) { } }; + var sameType3: { + x: any; + } = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; + var sameType4: { + x: Date; + } = { get x(): Date { return undefined; }, set x(n: Date) { } }; + + // Type of unannotated get accessor return type is the type annotation of the set accessor param + var setParamType1 = { + set n(x: (t: string) => void) { }, + get n(): (t: string) => void { return (t) => { + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var p: string; + var p = t; + } + } + }; + var setParamType2: { + n: (t: string) => void; + } = { + get n() { return (t) => { + var p: string; + var p = t; + } + }, + set n(x: (t: string) => void) { } + }; + + // Type of unannotated set accessor parameter is the return type annotation of the get accessor + var getParamType1 = { + set n(x) { + var y = x; + var y: string; + }, + get n(): string { return ''; } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + }; + var getParamType2: { + n: string; + } = { + get n(): string { return ''; }, + set n(x) { + var y = x; + var y: string; + } + }; + + // Type of unannotated accessors is the inferred return type of the get accessor + var getParamType3: { + n: string; + } = { + get n(): string { return ''; }, + set n(x) { + var y = x; + var y: string; + } + }; + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/overloadingStaticFunctionsInFunctions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/overloadingStaticFunctionsInFunctions.d.ts new file mode 100644 index 0000000000000..c3a3ab5080b9d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/overloadingStaticFunctionsInFunctions.d.ts @@ -0,0 +1,70 @@ +//// [tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts] //// + +//// [overloadingStaticFunctionsInFunctions.ts] +function boo { + static test() + static test(name:string) + static test(name?:any){ } +} + +/// [Declarations] //// + + + +//// [/.src/overloadingStaticFunctionsInFunctions.d.ts] +declare function boo(): invalid; +/// [Errors] //// + +overloadingStaticFunctionsInFunctions.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +overloadingStaticFunctionsInFunctions.ts(1,14): error TS1005: '(' expected. +overloadingStaticFunctionsInFunctions.ts(2,3): error TS1128: Declaration or statement expected. +overloadingStaticFunctionsInFunctions.ts(2,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +overloadingStaticFunctionsInFunctions.ts(3,3): error TS1128: Declaration or statement expected. +overloadingStaticFunctionsInFunctions.ts(3,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +overloadingStaticFunctionsInFunctions.ts(3,15): error TS2304: Cannot find name 'name'. +overloadingStaticFunctionsInFunctions.ts(3,19): error TS1005: ',' expected. +overloadingStaticFunctionsInFunctions.ts(3,20): error TS2693: 'string' only refers to a type, but is being used as a value here. +overloadingStaticFunctionsInFunctions.ts(4,3): error TS1128: Declaration or statement expected. +overloadingStaticFunctionsInFunctions.ts(4,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +overloadingStaticFunctionsInFunctions.ts(4,15): error TS2304: Cannot find name 'name'. +overloadingStaticFunctionsInFunctions.ts(4,20): error TS1109: Expression expected. +overloadingStaticFunctionsInFunctions.ts(4,21): error TS2693: 'any' only refers to a type, but is being used as a value here. +overloadingStaticFunctionsInFunctions.ts(4,25): error TS1005: ';' expected. + + +==== overloadingStaticFunctionsInFunctions.ts (15 errors) ==== + function boo { + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: '(' expected. + static test() + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~ +!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. + static test(name:string) + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~ +!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. + ~~~~ +!!! error TS2304: Cannot find name 'name'. + ~ +!!! error TS1005: ',' expected. + ~~~~~~ +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. + static test(name?:any){ } + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~ +!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. + ~~~~ +!!! error TS2304: Cannot find name 'name'. + ~ +!!! error TS1109: Expression expected. + ~~~ +!!! error TS2693: 'any' only refers to a type, but is being used as a value here. + ~ +!!! error TS1005: ';' expected. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.classMethods.es2018.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.classMethods.es2018.d.ts new file mode 100644 index 0000000000000..6f86bdc1f5156 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.classMethods.es2018.d.ts @@ -0,0 +1,499 @@ +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.classMethods.es2018.ts] //// + +//// [methodIsOk.ts] +class C1 { + async * f(): AsyncGenerator { + } +} +//// [awaitMethodNameIsOk.ts] +class C2 { + async * await(): AsyncGenerator { + } +} +//// [yieldMethodNameIsOk.ts] +class C3 { + async * yield(): AsyncGenerator { + } +} +//// [awaitParameterIsError.ts] +class C4 { + async * f(await: any): AsyncGenerator { + } +} +//// [yieldParameterIsError.ts] +class C5 { + async * f(yield: any): AsyncGenerator { + } +} +//// [awaitInParameterInitializerIsError.ts] +class C6 { + async * f(a: number = await 1): AsyncGenerator { + } +} +//// [yieldInParameterInitializerIsError.ts] +class C7 { + async * f(a: any = yield): AsyncGenerator { + } +} +//// [nestedAsyncGeneratorIsOk.ts] +class C8 { + async * f(): AsyncGenerator { + async function * g() { + } + } +} +//// [nestedFunctionDeclarationNamedYieldIsError.ts] +class C9 { + async * f(): AsyncGenerator { + function yield() { + } + } +} +//// [nestedFunctionExpressionNamedYieldIsError.ts] +class C10 { + async * f(): AsyncGenerator { + const x = function yield() { + }; + } +} +//// [nestedFunctionDeclarationNamedAwaitIsError.ts] +class C11 { + async * f(): AsyncGenerator { + function await() { + } + } +} +//// [nestedFunctionExpressionNamedAwaitIsError.ts] +class C12 { + async * f(): AsyncGenerator { + const x = function await() { + }; + } +} +//// [yieldIsOk.ts] +class C13 { + async * f(): AsyncGenerator { + yield; + } +} +//// [yieldWithValueIsOk.ts] +class C14 { + async * f(): AsyncGenerator { + yield 1; + } +} +//// [yieldStarMissingValueIsError.ts] +class C15 { + async * f(): AsyncGenerator { + yield *; + } +} +//// [yieldStarWithValueIsOk.ts] +class C16 { + async * f(): AsyncGenerator { + yield * []; + } +} +//// [awaitWithValueIsOk.ts] +class C17 { + async * f(): AsyncGenerator { + await 1; + } +} +//// [awaitMissingValueIsError.ts] +class C18 { + async * f(): AsyncGenerator { + await; + } +} +//// [awaitAsTypeIsOk.ts] +interface await {} +class C19 { + async * f(): AsyncGenerator { + let x: await; + } +} +//// [yieldAsTypeIsStrictError.ts] +interface yield {} +class C20 { + async * f(): AsyncGenerator { + let x: yield; + } +} +//// [yieldInClassComputedPropertyIsError.ts] +class C21 { + async * [yield](): AsyncGenerator { + } +} +//// [yieldInNestedComputedPropertyIsOk.ts] +class C22 { + async * f(): AsyncGenerator { + const x = { [yield]: 1 }; + } +} +//// [asyncGeneratorGetAccessorIsError.ts] +class C23 { + async * get x(): number { + return 1; + } +} +//// [asyncGeneratorSetAccessorIsError.ts] +class C24 { + async * set x(value: number): void { + } +} +//// [asyncGeneratorPropertyIsError.ts] +class C25 { + async * x = 1: any; +} + + +/// [Declarations] //// + + + +//// [/.src/asyncGeneratorGetAccessorIsError.d.ts] +declare class C23 { + get(): invalid; + x(): number; +} + +//// [/.src/asyncGeneratorPropertyIsError.d.ts] +declare class C25 { + x(): invalid; + 1: any; +} + +//// [/.src/asyncGeneratorSetAccessorIsError.d.ts] +declare class C24 { + set(): invalid; + x(value: number): void; +} + +//// [/.src/awaitAsTypeIsOk.d.ts] +interface await { +} +declare class C19 { + f(): AsyncGenerator; +} + +//// [/.src/awaitInParameterInitializerIsError.d.ts] +declare class C6 { + f(a?: number): AsyncGenerator; +} + +//// [/.src/awaitMethodNameIsOk.d.ts] +declare class C2 { + await(): AsyncGenerator; +} + +//// [/.src/awaitMissingValueIsError.d.ts] +declare class C18 { + f(): AsyncGenerator; +} + +//// [/.src/awaitParameterIsError.d.ts] +declare class C4 { + f(await: any): AsyncGenerator; +} + +//// [/.src/awaitWithValueIsOk.d.ts] +declare class C17 { + f(): AsyncGenerator; +} + +//// [/.src/methodIsOk.d.ts] +declare class C1 { + f(): AsyncGenerator; +} + +//// [/.src/nestedAsyncGeneratorIsOk.d.ts] +declare class C8 { + f(): AsyncGenerator; +} + +//// [/.src/nestedFunctionDeclarationNamedAwaitIsError.d.ts] +declare class C11 { + f(): AsyncGenerator; +} + +//// [/.src/nestedFunctionDeclarationNamedYieldIsError.d.ts] +declare class C9 { + f(): AsyncGenerator; +} + +//// [/.src/nestedFunctionExpressionNamedAwaitIsError.d.ts] +declare class C12 { + f(): AsyncGenerator; +} + +//// [/.src/nestedFunctionExpressionNamedYieldIsError.d.ts] +declare class C10 { + f(): AsyncGenerator; +} + +//// [/.src/yieldAsTypeIsStrictError.d.ts] +interface yield { +} +declare class C20 { + f(): AsyncGenerator; +} + +//// [/.src/yieldInClassComputedPropertyIsError.d.ts] +declare class C21 { + [yield](): AsyncGenerator; +} + +//// [/.src/yieldInNestedComputedPropertyIsOk.d.ts] +declare class C22 { + f(): AsyncGenerator; +} + +//// [/.src/yieldInParameterInitializerIsError.d.ts] +declare class C7 { + f(a?: any): AsyncGenerator; +} + +//// [/.src/yieldIsOk.d.ts] +declare class C13 { + f(): AsyncGenerator; +} + +//// [/.src/yieldMethodNameIsOk.d.ts] +declare class C3 { + yield(): AsyncGenerator; +} + +//// [/.src/yieldParameterIsError.d.ts] +declare class C5 { + f(yield: any): AsyncGenerator; +} + +//// [/.src/yieldStarMissingValueIsError.d.ts] +declare class C15 { + f(): AsyncGenerator; +} + +//// [/.src/yieldStarWithValueIsOk.d.ts] +declare class C16 { + f(): AsyncGenerator; +} + +//// [/.src/yieldWithValueIsOk.d.ts] +declare class C14 { + f(): AsyncGenerator; +} +/// [Errors] //// + +asyncGeneratorGetAccessorIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. +asyncGeneratorPropertyIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +asyncGeneratorPropertyIsError.ts(2,15): error TS1005: '(' expected. +asyncGeneratorSetAccessorIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected. +awaitInParameterInitializerIsError.ts(2,27): error TS2524: 'await' expressions cannot be used in a parameter initializer. +awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected. +awaitParameterIsError.ts(2,15): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedAwaitIsError.ts(3,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedYieldIsError.ts(3,18): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +nestedFunctionExpressionNamedAwaitIsError.ts(3,28): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionExpressionNamedYieldIsError.ts(3,28): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +yieldAsTypeIsStrictError.ts(4,16): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +yieldInClassComputedPropertyIsError.ts(2,14): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +yieldInClassComputedPropertyIsError.ts(2,14): error TS2693: 'yield' only refers to a type, but is being used as a value here. +yieldInNestedComputedPropertyIsOk.ts(3,21): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +yieldInParameterInitializerIsError.ts(2,24): error TS2322: Type 'undefined' is not assignable to type 'never'. +yieldInParameterInitializerIsError.ts(2,24): error TS2523: 'yield' expressions cannot be used in a parameter initializer. +yieldParameterIsError.ts(2,15): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +yieldStarMissingValueIsError.ts(3,16): error TS1109: Expression expected. + + +==== methodIsOk.ts (0 errors) ==== + class C1 { + async * f(): AsyncGenerator { + } + } +==== awaitMethodNameIsOk.ts (0 errors) ==== + class C2 { + async * await(): AsyncGenerator { + } + } +==== yieldMethodNameIsOk.ts (0 errors) ==== + class C3 { + async * yield(): AsyncGenerator { + } + } +==== awaitParameterIsError.ts (1 errors) ==== + class C4 { + async * f(await: any): AsyncGenerator { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } + } +==== yieldParameterIsError.ts (1 errors) ==== + class C5 { + async * f(yield: any): AsyncGenerator { + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + } + } +==== awaitInParameterInitializerIsError.ts (1 errors) ==== + class C6 { + async * f(a: number = await 1): AsyncGenerator { + ~~~~~~~ +!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. + } + } +==== yieldInParameterInitializerIsError.ts (2 errors) ==== + class C7 { + async * f(a: any = yield): AsyncGenerator { + ~~~~~ +!!! error TS2322: Type 'undefined' is not assignable to type 'never'. + ~~~~~ +!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. + } + } +==== nestedAsyncGeneratorIsOk.ts (0 errors) ==== + class C8 { + async * f(): AsyncGenerator { + async function * g() { + } + } + } +==== nestedFunctionDeclarationNamedYieldIsError.ts (1 errors) ==== + class C9 { + async * f(): AsyncGenerator { + function yield() { + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + } + } + } +==== nestedFunctionExpressionNamedYieldIsError.ts (1 errors) ==== + class C10 { + async * f(): AsyncGenerator { + const x = function yield() { + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + }; + } + } +==== nestedFunctionDeclarationNamedAwaitIsError.ts (1 errors) ==== + class C11 { + async * f(): AsyncGenerator { + function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } + } + } +==== nestedFunctionExpressionNamedAwaitIsError.ts (1 errors) ==== + class C12 { + async * f(): AsyncGenerator { + const x = function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + }; + } + } +==== yieldIsOk.ts (0 errors) ==== + class C13 { + async * f(): AsyncGenerator { + yield; + } + } +==== yieldWithValueIsOk.ts (0 errors) ==== + class C14 { + async * f(): AsyncGenerator { + yield 1; + } + } +==== yieldStarMissingValueIsError.ts (1 errors) ==== + class C15 { + async * f(): AsyncGenerator { + yield *; + ~ +!!! error TS1109: Expression expected. + } + } +==== yieldStarWithValueIsOk.ts (0 errors) ==== + class C16 { + async * f(): AsyncGenerator { + yield * []; + } + } +==== awaitWithValueIsOk.ts (0 errors) ==== + class C17 { + async * f(): AsyncGenerator { + await 1; + } + } +==== awaitMissingValueIsError.ts (1 errors) ==== + class C18 { + async * f(): AsyncGenerator { + await; + ~ +!!! error TS1109: Expression expected. + } + } +==== awaitAsTypeIsOk.ts (0 errors) ==== + interface await {} + class C19 { + async * f(): AsyncGenerator { + let x: await; + } + } +==== yieldAsTypeIsStrictError.ts (1 errors) ==== + interface yield {} + class C20 { + async * f(): AsyncGenerator { + let x: yield; + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + } + } +==== yieldInClassComputedPropertyIsError.ts (2 errors) ==== + class C21 { + async * [yield](): AsyncGenerator { + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + ~~~~~ +!!! error TS2693: 'yield' only refers to a type, but is being used as a value here. + } + } +==== yieldInNestedComputedPropertyIsOk.ts (1 errors) ==== + class C22 { + async * f(): AsyncGenerator { + const x = { [yield]: 1 }; + ~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } + } +==== asyncGeneratorGetAccessorIsError.ts (2 errors) ==== + class C23 { + async * get x(): number { + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: '(' expected. + return 1; + } + } +==== asyncGeneratorSetAccessorIsError.ts (2 errors) ==== + class C24 { + async * set x(value: number): void { + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: '(' expected. + } + } +==== asyncGeneratorPropertyIsError.ts (2 errors) ==== + class C25 { + async * x = 1: any; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: '(' expected. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts new file mode 100644 index 0000000000000..f77c3cb1d7f44 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts @@ -0,0 +1,465 @@ +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.es2018.ts] //// + +//// [methodIsOk.ts] +const o1 = { + async * f(): AsyncGenerator { + } +}; +//// [awaitMethodNameIsOk.ts] +const o2 = { + async * await(): AsyncGenerator { + } +}; +//// [yieldMethodNameIsOk.ts] +const o3 = { + async * yield(): AsyncGenerator { + } +}; +//// [awaitParameterIsError.ts] +const o4 = { + async * f(await: any): AsyncGenerator { + } +}; +//// [yieldParameterIsError.ts] +const o5 = { + async * f(yield: any): AsyncGenerator { + } +}; +//// [awaitInParameterInitializerIsError.ts] +const o6 = { + async * f(a: number = await 1): AsyncGenerator { + } +}; +//// [yieldInParameterInitializerIsError.ts] +const o7 = { + async * f(a: any = yield): AsyncGenerator { + } +}; +//// [nestedAsyncGeneratorIsOk.ts] +const o8 = { + async * f(): AsyncGenerator { + async function * g() { + } + } +}; +//// [nestedFunctionDeclarationNamedYieldIsError.ts] +const o9 = { + async * f(): AsyncGenerator { + function yield() { + } + } +}; +//// [nestedFunctionExpressionNamedYieldIsError.ts] +const o10 = { + async * f(): AsyncGenerator { + const x = function yield() { + }; + } +}; +//// [nestedFunctionDeclarationNamedAwaitIsError.ts] +const o11 = { + async * f(): AsyncGenerator { + function await() { + } + } +}; +//// [nestedFunctionExpressionNamedAwaitIsError.ts] +const o12 = { + async * f(): AsyncGenerator { + const x = function await() { + }; + } +}; +//// [yieldIsOk.ts] +const o13 = { + async * f(): AsyncGenerator { + yield; + } +}; +//// [yieldWithValueIsOk.ts] +const o14 = { + async * f(): AsyncGenerator { + yield 1; + } +}; +//// [yieldStarMissingValueIsError.ts] +const o15 = { + async * f(): AsyncGenerator { + yield *; + } +}; +//// [yieldStarWithValueIsOk.ts] +const o16 = { + async * f(): AsyncGenerator { + yield * []; + } +}; +//// [awaitWithValueIsOk.ts] +const o17 = { + async * f(): AsyncGenerator { + await 1; + } +}; +//// [awaitMissingValueIsError.ts] +const o18 = { + async * f(): AsyncGenerator { + await; + } +}; +//// [awaitAsTypeIsOk.ts] +interface await {} +const o19 = { + async * f(): AsyncGenerator { + let x: await; + } +}; +//// [yieldAsTypeIsOk.ts] +interface yield {} +const o20 = { + async * f(): AsyncGenerator { + let x: yield; + } +}; +//// [yieldInNestedComputedPropertyIsOk.ts] +const o21 = { + async * f(): AsyncGenerator { + const x = { [yield]: 1 }; + } +}; +//// [asyncGeneratorGetAccessorIsError.ts] +const o22 = { + async * get x(): number { + return 1; + } +}; +//// [asyncGeneratorSetAccessorIsError.ts] +const o23 = { + async * set x(value: number): void { + } +}; +//// [asyncGeneratorPropertyIsError.ts] +const o24 = { + async * x: 1; +}; + + +/// [Declarations] //// + + + +//// [/.src/asyncGeneratorGetAccessorIsError.d.ts] +declare const o22: invalid; + +//// [/.src/asyncGeneratorPropertyIsError.d.ts] +declare const o24: { + x(): 1; +}; + +//// [/.src/asyncGeneratorSetAccessorIsError.d.ts] +declare const o23: invalid; + +//// [/.src/awaitAsTypeIsOk.d.ts] +interface await { +} +declare const o19: { + f(): AsyncGenerator; +}; + +//// [/.src/awaitInParameterInitializerIsError.d.ts] +declare const o6: { + f(a?: number): AsyncGenerator; +}; + +//// [/.src/awaitMethodNameIsOk.d.ts] +declare const o2: { + await(): AsyncGenerator; +}; + +//// [/.src/awaitMissingValueIsError.d.ts] +declare const o18: { + f(): AsyncGenerator; +}; + +//// [/.src/awaitParameterIsError.d.ts] +declare const o4: { + f(await: any): AsyncGenerator; +}; + +//// [/.src/awaitWithValueIsOk.d.ts] +declare const o17: { + f(): AsyncGenerator; +}; + +//// [/.src/methodIsOk.d.ts] +declare const o1: { + f(): AsyncGenerator; +}; + +//// [/.src/nestedAsyncGeneratorIsOk.d.ts] +declare const o8: { + f(): AsyncGenerator; +}; + +//// [/.src/nestedFunctionDeclarationNamedAwaitIsError.d.ts] +declare const o11: { + f(): AsyncGenerator; +}; + +//// [/.src/nestedFunctionDeclarationNamedYieldIsError.d.ts] +declare const o9: { + f(): AsyncGenerator; +}; + +//// [/.src/nestedFunctionExpressionNamedAwaitIsError.d.ts] +declare const o12: { + f(): AsyncGenerator; +}; + +//// [/.src/nestedFunctionExpressionNamedYieldIsError.d.ts] +declare const o10: { + f(): AsyncGenerator; +}; + +//// [/.src/yieldAsTypeIsOk.d.ts] +interface yield { +} +declare const o20: { + f(): AsyncGenerator; +}; + +//// [/.src/yieldInNestedComputedPropertyIsOk.d.ts] +declare const o21: { + f(): AsyncGenerator; +}; + +//// [/.src/yieldInParameterInitializerIsError.d.ts] +declare const o7: { + f(a?: any): AsyncGenerator; +}; + +//// [/.src/yieldIsOk.d.ts] +declare const o13: { + f(): AsyncGenerator; +}; + +//// [/.src/yieldMethodNameIsOk.d.ts] +declare const o3: { + yield(): AsyncGenerator; +}; + +//// [/.src/yieldParameterIsError.d.ts] +declare const o5: { + f(yield: any): AsyncGenerator; +}; + +//// [/.src/yieldStarMissingValueIsError.d.ts] +declare const o15: { + f(): AsyncGenerator; +}; + +//// [/.src/yieldStarWithValueIsOk.d.ts] +declare const o16: { + f(): AsyncGenerator; +}; + +//// [/.src/yieldWithValueIsOk.d.ts] +declare const o14: { + f(): AsyncGenerator; +}; +/// [Errors] //// + +asyncGeneratorGetAccessorIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. +asyncGeneratorPropertyIsError.ts(2,14): error TS1005: '(' expected. +asyncGeneratorSetAccessorIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected. +awaitInParameterInitializerIsError.ts(2,27): error TS2524: 'await' expressions cannot be used in a parameter initializer. +awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected. +awaitParameterIsError.ts(2,15): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedAwaitIsError.ts(3,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedYieldIsError.ts(3,18): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +nestedFunctionExpressionNamedAwaitIsError.ts(3,28): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionExpressionNamedYieldIsError.ts(3,28): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +yieldInNestedComputedPropertyIsOk.ts(3,21): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +yieldInParameterInitializerIsError.ts(2,24): error TS2322: Type 'undefined' is not assignable to type 'never'. +yieldInParameterInitializerIsError.ts(2,24): error TS2523: 'yield' expressions cannot be used in a parameter initializer. +yieldParameterIsError.ts(2,15): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +yieldStarMissingValueIsError.ts(3,16): error TS1109: Expression expected. + + +==== methodIsOk.ts (0 errors) ==== + const o1 = { + async * f(): AsyncGenerator { + } + }; +==== awaitMethodNameIsOk.ts (0 errors) ==== + const o2 = { + async * await(): AsyncGenerator { + } + }; +==== yieldMethodNameIsOk.ts (0 errors) ==== + const o3 = { + async * yield(): AsyncGenerator { + } + }; +==== awaitParameterIsError.ts (1 errors) ==== + const o4 = { + async * f(await: any): AsyncGenerator { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } + }; +==== yieldParameterIsError.ts (1 errors) ==== + const o5 = { + async * f(yield: any): AsyncGenerator { + ~~~~~ +!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. + } + }; +==== awaitInParameterInitializerIsError.ts (1 errors) ==== + const o6 = { + async * f(a: number = await 1): AsyncGenerator { + ~~~~~~~ +!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. + } + }; +==== yieldInParameterInitializerIsError.ts (2 errors) ==== + const o7 = { + async * f(a: any = yield): AsyncGenerator { + ~~~~~ +!!! error TS2322: Type 'undefined' is not assignable to type 'never'. + ~~~~~ +!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. + } + }; +==== nestedAsyncGeneratorIsOk.ts (0 errors) ==== + const o8 = { + async * f(): AsyncGenerator { + async function * g() { + } + } + }; +==== nestedFunctionDeclarationNamedYieldIsError.ts (1 errors) ==== + const o9 = { + async * f(): AsyncGenerator { + function yield() { + ~~~~~ +!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. + } + } + }; +==== nestedFunctionExpressionNamedYieldIsError.ts (1 errors) ==== + const o10 = { + async * f(): AsyncGenerator { + const x = function yield() { + ~~~~~ +!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. + }; + } + }; +==== nestedFunctionDeclarationNamedAwaitIsError.ts (1 errors) ==== + const o11 = { + async * f(): AsyncGenerator { + function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } + } + }; +==== nestedFunctionExpressionNamedAwaitIsError.ts (1 errors) ==== + const o12 = { + async * f(): AsyncGenerator { + const x = function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + }; + } + }; +==== yieldIsOk.ts (0 errors) ==== + const o13 = { + async * f(): AsyncGenerator { + yield; + } + }; +==== yieldWithValueIsOk.ts (0 errors) ==== + const o14 = { + async * f(): AsyncGenerator { + yield 1; + } + }; +==== yieldStarMissingValueIsError.ts (1 errors) ==== + const o15 = { + async * f(): AsyncGenerator { + yield *; + ~ +!!! error TS1109: Expression expected. + } + }; +==== yieldStarWithValueIsOk.ts (0 errors) ==== + const o16 = { + async * f(): AsyncGenerator { + yield * []; + } + }; +==== awaitWithValueIsOk.ts (0 errors) ==== + const o17 = { + async * f(): AsyncGenerator { + await 1; + } + }; +==== awaitMissingValueIsError.ts (1 errors) ==== + const o18 = { + async * f(): AsyncGenerator { + await; + ~ +!!! error TS1109: Expression expected. + } + }; +==== awaitAsTypeIsOk.ts (0 errors) ==== + interface await {} + const o19 = { + async * f(): AsyncGenerator { + let x: await; + } + }; +==== yieldAsTypeIsOk.ts (0 errors) ==== + interface yield {} + const o20 = { + async * f(): AsyncGenerator { + let x: yield; + } + }; +==== yieldInNestedComputedPropertyIsOk.ts (1 errors) ==== + const o21 = { + async * f(): AsyncGenerator { + const x = { [yield]: 1 }; + ~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } + }; +==== asyncGeneratorGetAccessorIsError.ts (2 errors) ==== + const o22 = { + async * get x(): number { + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: '(' expected. + return 1; + } + }; +==== asyncGeneratorSetAccessorIsError.ts (2 errors) ==== + const o23 = { + async * set x(value: number): void { + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: '(' expected. + } + }; +==== asyncGeneratorPropertyIsError.ts (1 errors) ==== + const o24 = { + async * x: 1; + ~ +!!! error TS1005: '(' expected. + }; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum1.d.ts new file mode 100644 index 0000000000000..78c0345fd65fc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum1.d.ts @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts] //// + +//// [parserEnum1.ts] + export enum SignatureFlags { + None = 0, + IsIndexer = 1, + IsStringIndexer = 1 << 1, + IsNumberIndexer = 1 << 2, + } + +/// [Declarations] //// + + + +//// [/.src/parserEnum1.d.ts] +export declare enum SignatureFlags { + None = 0, + IsIndexer = 1, + IsStringIndexer = 2, + IsNumberIndexer = 4 +} +/// [Errors] //// + +parserEnum1.ts(4,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserEnum1.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== parserEnum1.ts (2 errors) ==== + export enum SignatureFlags { + None = 0, + IsIndexer = 1, + IsStringIndexer = 1 << 1, + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IsNumberIndexer = 1 << 2, + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum2.d.ts new file mode 100644 index 0000000000000..54c87c29d703f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum2.d.ts @@ -0,0 +1,38 @@ +//// [tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts] //// + +//// [parserEnum2.ts] + export enum SignatureFlags { + None = 0, + IsIndexer = 1, + IsStringIndexer = 1 << 1, + IsNumberIndexer = 1 << 2 + } + +/// [Declarations] //// + + + +//// [/.src/parserEnum2.d.ts] +export declare enum SignatureFlags { + None = 0, + IsIndexer = 1, + IsStringIndexer = 2, + IsNumberIndexer = 4 +} +/// [Errors] //// + +parserEnum2.ts(4,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserEnum2.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== parserEnum2.ts (2 errors) ==== + export enum SignatureFlags { + None = 0, + IsIndexer = 1, + IsStringIndexer = 1 << 1, + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IsNumberIndexer = 1 << 2 + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnumDeclaration6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnumDeclaration6.d.ts new file mode 100644 index 0000000000000..6141424630422 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnumDeclaration6.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnumDeclaration6.ts] //// + +//// [parserEnumDeclaration6.ts] +enum E { + A = 1, + B, + C = 1 << 1, + D, +} + +/// [Declarations] //// + + + +//// [/.src/parserEnumDeclaration6.d.ts] +declare enum E { + A = 1, + B = 2, + C = 2, + D = 3 +} +/// [Errors] //// + +parserEnumDeclaration6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== parserEnumDeclaration6.ts (1 errors) ==== + enum E { + A = 1, + B, + C = 1 << 1, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + D, + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction1.d.ts new file mode 100644 index 0000000000000..e09649b16c8cc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction1.d.ts @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserEqualsGreaterThanAfterFunction1.ts] //// + +//// [parserEqualsGreaterThanAfterFunction1.ts] +function => + +/// [Declarations] //// + + + +//// [/.src/parserEqualsGreaterThanAfterFunction1.d.ts] +declare function (): invalid; +/// [Errors] //// + +parserEqualsGreaterThanAfterFunction1.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserEqualsGreaterThanAfterFunction1.ts(1,10): error TS1003: Identifier expected. + + +==== parserEqualsGreaterThanAfterFunction1.ts (2 errors) ==== + function => + +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction2.d.ts new file mode 100644 index 0000000000000..c8680aa5fc69d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction2.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserEqualsGreaterThanAfterFunction2.ts] //// + +//// [parserEqualsGreaterThanAfterFunction2.ts] +function (a: any => b: any; + +/// [Declarations] //// + + + +//// [/.src/parserEqualsGreaterThanAfterFunction2.d.ts] +declare function (a: any, b: any): invalid; +/// [Errors] //// + +parserEqualsGreaterThanAfterFunction2.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserEqualsGreaterThanAfterFunction2.ts(1,10): error TS1003: Identifier expected. +parserEqualsGreaterThanAfterFunction2.ts(1,18): error TS1005: ',' expected. +parserEqualsGreaterThanAfterFunction2.ts(1,27): error TS1005: ',' expected. +parserEqualsGreaterThanAfterFunction2.ts(1,28): error TS1005: ')' expected. + + +==== parserEqualsGreaterThanAfterFunction2.ts (5 errors) ==== + function (a: any => b: any; + +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1003: Identifier expected. + ~~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1005: ',' expected. + +!!! error TS1005: ')' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList1.d.ts new file mode 100644 index 0000000000000..7beaff5e884b1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList1.d.ts @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ParameterLists/parserErrorRecovery_ParameterList1.ts] //// + +//// [parserErrorRecovery_ParameterList1.ts] +function f(a: any { +}: {} + +/// [Declarations] //// + + + +//// [/.src/parserErrorRecovery_ParameterList1.d.ts] +declare function f(a: any, {}: {}): invalid; +/// [Errors] //// + +parserErrorRecovery_ParameterList1.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. +parserErrorRecovery_ParameterList1.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserErrorRecovery_ParameterList1.ts(1,19): error TS1005: ',' expected. +parserErrorRecovery_ParameterList1.ts(2,6): error TS1005: ')' expected. + + +==== parserErrorRecovery_ParameterList1.ts (4 errors) ==== + function f(a: any { + ~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + }: {} + +!!! error TS1005: ')' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList2.d.ts new file mode 100644 index 0000000000000..2121f34448e66 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList2.d.ts @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ParameterLists/parserErrorRecovery_ParameterList2.ts] //// + +//// [parserErrorRecovery_ParameterList2.ts] +function f(a: any, { +}: {} + +/// [Declarations] //// + + + +//// [/.src/parserErrorRecovery_ParameterList2.d.ts] +declare function f(a: any, {}: {}): invalid; +/// [Errors] //// + +parserErrorRecovery_ParameterList2.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. +parserErrorRecovery_ParameterList2.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserErrorRecovery_ParameterList2.ts(2,6): error TS1005: ')' expected. + + +==== parserErrorRecovery_ParameterList2.ts (3 errors) ==== + function f(a: any, { + ~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + }: {} + +!!! error TS1005: ')' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserNoASIOnCallAfterFunctionExpression1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserNoASIOnCallAfterFunctionExpression1.d.ts new file mode 100644 index 0000000000000..f5c44ddd89b49 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserNoASIOnCallAfterFunctionExpression1.d.ts @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/parser/ecmascript5/parserNoASIOnCallAfterFunctionExpression1.ts] //// + +//// [parserNoASIOnCallAfterFunctionExpression1.ts] +var x = function (): void { } +(window).foo; + + +/// [Declarations] //// + + + +//// [/.src/parserNoASIOnCallAfterFunctionExpression1.d.ts] +declare var x: invalid; +/// [Errors] //// + +parserNoASIOnCallAfterFunctionExpression1.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserNoASIOnCallAfterFunctionExpression1.ts(2,2): error TS2554: Expected 0 arguments, but got 1. +parserNoASIOnCallAfterFunctionExpression1.ts(2,15): error TS2339: Property 'foo' does not exist on type 'void'. + + +==== parserNoASIOnCallAfterFunctionExpression1.ts (3 errors) ==== + var x = function (): void { } + ~~~~~~~~~~~~~~~~~~~~~ + (window).foo; + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 1. + ~~~ +!!! error TS2339: Property 'foo' does not exist on type 'void'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource10.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource10.d.ts new file mode 100644 index 0000000000000..ac4279c2e3dcb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource10.d.ts @@ -0,0 +1,2205 @@ +//// [tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts] //// + +//// [parserRealSource10.ts] +// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. +// See LICENSE.txt in the project root for complete license information. + +/// + +module TypeScript { + export enum TokenID { + // Keywords + Any, + Bool, + Break, + Case, + Catch, + Class, + Const, + Continue, + Debugger, + Default, + Delete, + Do, + Else, + Enum, + Export, + Extends, + Declare, + False, + Finally, + For, + Function, + Constructor, + Get, + If, + Implements, + Import, + In, + InstanceOf, + Interface, + Let, + Module, + New, + Number, + Null, + Package, + Private, + Protected, + Public, + Return, + Set, + Static, + String, + Super, + Switch, + This, + Throw, + True, + Try, + TypeOf, + Var, + Void, + With, + While, + Yield, + // Punctuation + Semicolon, + OpenParen, + CloseParen, + OpenBracket, + CloseBracket, + OpenBrace, + CloseBrace, + Comma, + Equals, + PlusEquals, + MinusEquals, + AsteriskEquals, + SlashEquals, + PercentEquals, + AmpersandEquals, + CaretEquals, + BarEquals, + LessThanLessThanEquals, + GreaterThanGreaterThanEquals, + GreaterThanGreaterThanGreaterThanEquals, + Question, + Colon, + BarBar, + AmpersandAmpersand, + Bar, + Caret, + And, + EqualsEquals, + ExclamationEquals, + EqualsEqualsEquals, + ExclamationEqualsEquals, + LessThan, + LessThanEquals, + GreaterThan, + GreaterThanEquals, + LessThanLessThan, + GreaterThanGreaterThan, + GreaterThanGreaterThanGreaterThan, + Plus, + Minus, + Asterisk, + Slash, + Percent, + Tilde, + Exclamation, + PlusPlus, + MinusMinus, + Dot, + DotDotDot, + Error, + EndOfFile, + EqualsGreaterThan, + Identifier, + StringLiteral, + RegularExpressionLiteral, + NumberLiteral, + Whitespace, + Comment, + Lim, + LimFixed = EqualsGreaterThan, + LimKeyword = Yield, + } + + export var tokenTable: any = new TokenInfo[]; + export var nodeTypeTable: any = new string[]; + export var nodeTypeToTokTable: any = new number[]; + export var noRegexTable: any = new boolean[]; + + noRegexTable[TokenID.Identifier] = true; + noRegexTable[TokenID.StringLiteral] = true; + noRegexTable[TokenID.NumberLiteral] = true; + noRegexTable[TokenID.RegularExpressionLiteral] = true; + noRegexTable[TokenID.This] = true; + noRegexTable[TokenID.PlusPlus] = true; + noRegexTable[TokenID.MinusMinus] = true; + noRegexTable[TokenID.CloseParen] = true; + noRegexTable[TokenID.CloseBracket] = true; + noRegexTable[TokenID.CloseBrace] = true; + noRegexTable[TokenID.True] = true; + noRegexTable[TokenID.False] = true; + + export enum OperatorPrecedence { + None, + Comma, + Assignment, + Conditional, + LogicalOr, + LogicalAnd, + BitwiseOr, + BitwiseExclusiveOr, + BitwiseAnd, + Equality, + Relational, + Shift, + Additive, + Multiplicative, + Unary, + Lim + } + + export enum Reservation { + None = 0, + Javascript = 1, + JavascriptFuture = 2, + TypeScript = 4, + JavascriptFutureStrict = 8, + TypeScriptAndJS = Javascript | TypeScript, + TypeScriptAndJSFuture = JavascriptFuture | TypeScript, + TypeScriptAndJSFutureStrict = JavascriptFutureStrict | TypeScript, + } + + export class TokenInfo { + constructor (public tokenId: TokenID, public reservation: Reservation, + public binopPrecedence: number, public binopNodeType: number, + public unopPrecedence: number, public unopNodeType: number, + public text: string, public ers: ErrorRecoverySet) { } + } + + function setTokenInfo(tokenId: TokenID, reservation: number, binopPrecedence: number, + binopNodeType: number, unopPrecedence: number, unopNodeType: number, + text: string, ers: ErrorRecoverySet) { + if (tokenId !== undefined) { + tokenTable[tokenId] = new TokenInfo(tokenId, reservation, binopPrecedence, + binopNodeType, unopPrecedence, unopNodeType, text, ers); + if (binopNodeType != NodeType.None) { + nodeTypeTable[binopNodeType] = text; + nodeTypeToTokTable[binopNodeType] = tokenId; + } + if (unopNodeType != NodeType.None) { + nodeTypeTable[unopNodeType] = text; + } + } + } + + setTokenInfo(TokenID.Any, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "any", ErrorRecoverySet.PrimType); + setTokenInfo(TokenID.Bool, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "boolean", ErrorRecoverySet.PrimType); + setTokenInfo(TokenID.Break, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "break", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.Case, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "case", ErrorRecoverySet.SCase); + setTokenInfo(TokenID.Catch, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "catch", ErrorRecoverySet.Catch); + setTokenInfo(TokenID.Class, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "class", ErrorRecoverySet.TypeScriptS); + setTokenInfo(TokenID.Const, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "const", ErrorRecoverySet.Var); + setTokenInfo(TokenID.Continue, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "continue", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.Debugger, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.Debugger, "debugger", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.Default, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "default", ErrorRecoverySet.SCase); + setTokenInfo(TokenID.Delete, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Delete, "delete", ErrorRecoverySet.Prefix); + setTokenInfo(TokenID.Do, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "do", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.Else, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "else", ErrorRecoverySet.Else); + setTokenInfo(TokenID.Enum, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "enum", ErrorRecoverySet.TypeScriptS); + setTokenInfo(TokenID.Export, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "export", ErrorRecoverySet.TypeScriptS); + setTokenInfo(TokenID.Extends, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "extends", ErrorRecoverySet.None); + setTokenInfo(TokenID.Declare, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "declare", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.False, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "false", ErrorRecoverySet.RLit); + setTokenInfo(TokenID.Finally, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "finally", ErrorRecoverySet.Catch); + setTokenInfo(TokenID.For, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "for", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.Function, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "function", ErrorRecoverySet.Func); + setTokenInfo(TokenID.Constructor, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "constructor", ErrorRecoverySet.Func); + setTokenInfo(TokenID.Get, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "get", ErrorRecoverySet.Func); + setTokenInfo(TokenID.Set, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "set", ErrorRecoverySet.Func); + setTokenInfo(TokenID.If, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "if", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.Implements, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "implements", ErrorRecoverySet.None); + setTokenInfo(TokenID.Import, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "import", ErrorRecoverySet.TypeScriptS); + setTokenInfo(TokenID.In, Reservation.TypeScriptAndJS, OperatorPrecedence.Relational, NodeType.In, OperatorPrecedence.None, NodeType.None, "in", ErrorRecoverySet.None); + setTokenInfo(TokenID.InstanceOf, Reservation.TypeScriptAndJS, OperatorPrecedence.Relational, NodeType.InstOf, OperatorPrecedence.None, NodeType.None, "instanceof", ErrorRecoverySet.BinOp); + setTokenInfo(TokenID.Interface, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "interface", ErrorRecoverySet.TypeScriptS); + setTokenInfo(TokenID.Let, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "let", ErrorRecoverySet.None); + setTokenInfo(TokenID.Module, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "module", ErrorRecoverySet.TypeScriptS); + setTokenInfo(TokenID.New, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "new", ErrorRecoverySet.PreOp); + setTokenInfo(TokenID.Number, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "number", ErrorRecoverySet.PrimType); + setTokenInfo(TokenID.Null, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "null", ErrorRecoverySet.RLit); + setTokenInfo(TokenID.Package, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "package", ErrorRecoverySet.None); + setTokenInfo(TokenID.Private, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "private", ErrorRecoverySet.TypeScriptS); + setTokenInfo(TokenID.Protected, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "protected", ErrorRecoverySet.None); + setTokenInfo(TokenID.Public, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "public", ErrorRecoverySet.TypeScriptS); + setTokenInfo(TokenID.Return, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "return", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.Static, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "static", ErrorRecoverySet.None); + setTokenInfo(TokenID.String, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "string", ErrorRecoverySet.PrimType); + setTokenInfo(TokenID.Super, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "super", ErrorRecoverySet.RLit); + setTokenInfo(TokenID.Switch, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "switch", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.This, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "this", ErrorRecoverySet.RLit); + setTokenInfo(TokenID.Throw, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "throw", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.True, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "true", ErrorRecoverySet.RLit); + setTokenInfo(TokenID.Try, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "try", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.TypeOf, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Typeof, "typeof", ErrorRecoverySet.Prefix); + setTokenInfo(TokenID.Var, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "var", ErrorRecoverySet.Var); + setTokenInfo(TokenID.Void, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Void, "void", ErrorRecoverySet.Prefix); + setTokenInfo(TokenID.With, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.With, "with", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.While, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "while", ErrorRecoverySet.While); + setTokenInfo(TokenID.Yield, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "yield", ErrorRecoverySet.None); + + setTokenInfo(TokenID.Identifier, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "identifier", ErrorRecoverySet.ID); + setTokenInfo(TokenID.NumberLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "numberLiteral", ErrorRecoverySet.Literal); + setTokenInfo(TokenID.RegularExpressionLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "regex", ErrorRecoverySet.RegExp); + setTokenInfo(TokenID.StringLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "qstring", ErrorRecoverySet.Literal); + + // Non-operator non-identifier tokens + setTokenInfo(TokenID.Semicolon, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ";", ErrorRecoverySet.SColon); // ; + setTokenInfo(TokenID.CloseParen, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ")", ErrorRecoverySet.RParen); // ) + setTokenInfo(TokenID.CloseBracket, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "]", ErrorRecoverySet.RBrack); // ] + setTokenInfo(TokenID.OpenBrace, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "{", ErrorRecoverySet.LCurly); // { + setTokenInfo(TokenID.CloseBrace, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "}", ErrorRecoverySet.RCurly); // } + setTokenInfo(TokenID.DotDotDot, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "...", ErrorRecoverySet.None); // ... + + // Operator non-identifier tokens + setTokenInfo(TokenID.Comma, Reservation.None, OperatorPrecedence.Comma, NodeType.Comma, OperatorPrecedence.None, NodeType.None, ",", ErrorRecoverySet.Comma); // , + setTokenInfo(TokenID.Equals, Reservation.None, OperatorPrecedence.Assignment, NodeType.Asg, OperatorPrecedence.None, NodeType.None, "=", ErrorRecoverySet.Asg); // = + setTokenInfo(TokenID.PlusEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgAdd, OperatorPrecedence.None, NodeType.None, "+=", ErrorRecoverySet.BinOp); // += + setTokenInfo(TokenID.MinusEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgSub, OperatorPrecedence.None, NodeType.None, "-=", ErrorRecoverySet.BinOp); // -= + setTokenInfo(TokenID.AsteriskEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgMul, OperatorPrecedence.None, NodeType.None, "*=", ErrorRecoverySet.BinOp); // *= + + setTokenInfo(TokenID.SlashEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgDiv, OperatorPrecedence.None, NodeType.None, "/=", ErrorRecoverySet.BinOp); // /= + setTokenInfo(TokenID.PercentEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgMod, OperatorPrecedence.None, NodeType.None, "%=", ErrorRecoverySet.BinOp); // %= + setTokenInfo(TokenID.AmpersandEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgAnd, OperatorPrecedence.None, NodeType.None, "&=", ErrorRecoverySet.BinOp); // &= + setTokenInfo(TokenID.CaretEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgXor, OperatorPrecedence.None, NodeType.None, "^=", ErrorRecoverySet.BinOp); // ^= + setTokenInfo(TokenID.BarEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgOr, OperatorPrecedence.None, NodeType.None, "|=", ErrorRecoverySet.BinOp); // |= + setTokenInfo(TokenID.LessThanLessThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgLsh, OperatorPrecedence.None, NodeType.None, "<<=", ErrorRecoverySet.BinOp); // <<= + setTokenInfo(TokenID.GreaterThanGreaterThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgRsh, OperatorPrecedence.None, NodeType.None, ">>=", ErrorRecoverySet.BinOp); // >>= + setTokenInfo(TokenID.GreaterThanGreaterThanGreaterThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgRs2, OperatorPrecedence.None, NodeType.None, ">>>=", ErrorRecoverySet.BinOp); // >>>= + setTokenInfo(TokenID.Question, Reservation.None, OperatorPrecedence.Conditional, NodeType.ConditionalExpression, OperatorPrecedence.None, NodeType.None, "?", ErrorRecoverySet.BinOp); // ? + setTokenInfo(TokenID.Colon, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ":", ErrorRecoverySet.Colon); // : + setTokenInfo(TokenID.BarBar, Reservation.None, OperatorPrecedence.LogicalOr, NodeType.LogOr, OperatorPrecedence.None, NodeType.None, "||", ErrorRecoverySet.BinOp); // || + setTokenInfo(TokenID.AmpersandAmpersand, Reservation.None, OperatorPrecedence.LogicalAnd, NodeType.LogAnd, OperatorPrecedence.None, NodeType.None, "&&", ErrorRecoverySet.BinOp); // && + setTokenInfo(TokenID.Bar, Reservation.None, OperatorPrecedence.BitwiseOr, NodeType.Or, OperatorPrecedence.None, NodeType.None, "|", ErrorRecoverySet.BinOp); // | + setTokenInfo(TokenID.Caret, Reservation.None, OperatorPrecedence.BitwiseExclusiveOr, NodeType.Xor, OperatorPrecedence.None, NodeType.None, "^", ErrorRecoverySet.BinOp); // ^ + setTokenInfo(TokenID.And, Reservation.None, OperatorPrecedence.BitwiseAnd, NodeType.And, OperatorPrecedence.None, NodeType.None, "&", ErrorRecoverySet.BinOp); // & + setTokenInfo(TokenID.EqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Eq, OperatorPrecedence.None, NodeType.None, "==", ErrorRecoverySet.BinOp); // == + setTokenInfo(TokenID.ExclamationEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Ne, OperatorPrecedence.None, NodeType.None, "!=", ErrorRecoverySet.BinOp); // != + setTokenInfo(TokenID.EqualsEqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Eqv, OperatorPrecedence.None, NodeType.None, "===", ErrorRecoverySet.BinOp); // === + setTokenInfo(TokenID.ExclamationEqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.NEqv, OperatorPrecedence.None, NodeType.None, "!==", ErrorRecoverySet.BinOp); // !== + setTokenInfo(TokenID.LessThan, Reservation.None, OperatorPrecedence.Relational, NodeType.Lt, OperatorPrecedence.None, NodeType.None, "<", ErrorRecoverySet.BinOp); // < + setTokenInfo(TokenID.LessThanEquals, Reservation.None, OperatorPrecedence.Relational, NodeType.Le, OperatorPrecedence.None, NodeType.None, "<=", ErrorRecoverySet.BinOp); // <= + setTokenInfo(TokenID.GreaterThan, Reservation.None, OperatorPrecedence.Relational, NodeType.Gt, OperatorPrecedence.None, NodeType.None, ">", ErrorRecoverySet.BinOp); // > + setTokenInfo(TokenID.GreaterThanEquals, Reservation.None, OperatorPrecedence.Relational, NodeType.Ge, OperatorPrecedence.None, NodeType.None, ">=", ErrorRecoverySet.BinOp); // >= + setTokenInfo(TokenID.LessThanLessThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Lsh, OperatorPrecedence.None, NodeType.None, "<<", ErrorRecoverySet.BinOp); // << + setTokenInfo(TokenID.GreaterThanGreaterThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Rsh, OperatorPrecedence.None, NodeType.None, ">>", ErrorRecoverySet.BinOp); // >> + setTokenInfo(TokenID.GreaterThanGreaterThanGreaterThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Rs2, OperatorPrecedence.None, NodeType.None, ">>>", ErrorRecoverySet.BinOp); // >>> + setTokenInfo(TokenID.Plus, Reservation.None, OperatorPrecedence.Additive, NodeType.Add, OperatorPrecedence.Unary, NodeType.Pos, "+", ErrorRecoverySet.AddOp); // + + setTokenInfo(TokenID.Minus, Reservation.None, OperatorPrecedence.Additive, NodeType.Sub, OperatorPrecedence.Unary, NodeType.Neg, "-", ErrorRecoverySet.AddOp); // - + setTokenInfo(TokenID.Asterisk, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Mul, OperatorPrecedence.None, NodeType.None, "*", ErrorRecoverySet.BinOp); // * + setTokenInfo(TokenID.Slash, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Div, OperatorPrecedence.None, NodeType.None, "/", ErrorRecoverySet.BinOp); // / + setTokenInfo(TokenID.Percent, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Mod, OperatorPrecedence.None, NodeType.None, "%", ErrorRecoverySet.BinOp); // % + setTokenInfo(TokenID.Tilde, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Not, "~", ErrorRecoverySet.PreOp); // ~ + setTokenInfo(TokenID.Exclamation, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.LogNot, "!", ErrorRecoverySet.PreOp); // ! + setTokenInfo(TokenID.PlusPlus, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.IncPre, "++", ErrorRecoverySet.PreOp); // ++ + setTokenInfo(TokenID.MinusMinus, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.DecPre, "--", ErrorRecoverySet.PreOp); // -- + setTokenInfo(TokenID.OpenParen, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "(", ErrorRecoverySet.LParen); // ( + setTokenInfo(TokenID.OpenBracket, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "[", ErrorRecoverySet.LBrack); // [ + setTokenInfo(TokenID.Dot, Reservation.None, OperatorPrecedence.Unary, NodeType.None, OperatorPrecedence.None, NodeType.None, ".", ErrorRecoverySet.Dot); // . + setTokenInfo(TokenID.EndOfFile, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "", ErrorRecoverySet.EOF); // EOF + setTokenInfo(TokenID.EqualsGreaterThan, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "=>", ErrorRecoverySet.None); // => + + export function lookupToken(tokenId: TokenID): TokenInfo { + return tokenTable[tokenId]; + } + + export enum TokenClass { + Punctuation, + Keyword, + Operator, + Comment, + Whitespace, + Identifier, + Literal, + } + + export class SavedToken { + constructor (public tok: Token, public minChar: number, public limChar: number) { } + } + + export class Token { + constructor (public tokenId: TokenID) { + } + + public toString(): string { + return "token: " + this.tokenId + " " + this.getText() + " (" + (TokenID)._map[this.tokenId] + ")"; + } + + public print(line: number, outfile: any): void { + outfile.WriteLine(this.toString() + ",on line" + line); + } + + public getText(): string { + return tokenTable[this.tokenId].text; + } + + public classification(): TokenClass { + if (this.tokenId <= TokenID.LimKeyword) { + return TokenClass.Keyword; + } + else { + var tokenInfo = lookupToken(this.tokenId); + if (tokenInfo != undefined) { + if ((tokenInfo.unopNodeType != NodeType.None) || + (tokenInfo.binopNodeType != NodeType.None)) { + return TokenClass.Operator; + } + } + } + + return TokenClass.Punctuation; + } + } + + export class NumberLiteralToken extends Token { + constructor (public value: number, public hasEmptyFraction?: boolean) { + super(TokenID.NumberLiteral); + } + + public getText(): string { + return this.hasEmptyFraction ? this.value.toString() + ".0" : this.value.toString(); + } + + public classification(): TokenClass { + return TokenClass.Literal; + } + } + + export class StringLiteralToken extends Token { + constructor (public value: string) { + super(TokenID.StringLiteral); + } + + public getText(): string { + return this.value; + } + + public classification(): TokenClass { + return TokenClass.Literal; + } + } + + export class IdentifierToken extends Token { + constructor (public value: string, public hasEscapeSequence : boolean) { + super(TokenID.Identifier); + } + public getText(): string { + return this.value; + } + public classification(): TokenClass { + return TokenClass.Identifier; + } + } + + export class WhitespaceToken extends Token { + constructor (tokenId: TokenID, public value: string) { + super(tokenId); + } + + public getText(): string { + return this.value; + } + + public classification(): TokenClass { + return TokenClass.Whitespace; + } + } + + export class CommentToken extends Token { + constructor (tokenID: TokenID, public value: string, public isBlock: boolean, public startPos: number, public line: number, public endsLine: boolean) { + super(tokenID); + } + + public getText(): string { + return this.value; + } + + public classification(): TokenClass { + return TokenClass.Comment; + } + } + + export class RegularExpressionLiteralToken extends Token { + constructor(public regex: any) { + super(TokenID.RegularExpressionLiteral); + } + + public getText(): string { + return this.regex.toString(); + } + + public classification(): TokenClass { + return TokenClass.Literal; + } + } + + // TODO: new with length TokenID.LimFixed + export var staticTokens: any = new Token[]; + export function initializeStaticTokens(): void { + for (var i = 0; i <= TokenID.LimFixed; i++) { + staticTokens[i] = new Token(i); + } + } +} + +/// [Declarations] //// + + + +//// [/.src/parserRealSource10.d.ts] +declare namespace TypeScript { + enum TokenID { + Any = 0, + Bool = 1, + Break = 2, + Case = 3, + Catch = 4, + Class = 5, + Const = 6, + Continue = 7, + Debugger = 8, + Default = 9, + Delete = 10, + Do = 11, + Else = 12, + Enum = 13, + Export = 14, + Extends = 15, + Declare = 16, + False = 17, + Finally = 18, + For = 19, + Function = 20, + Constructor = 21, + Get = 22, + If = 23, + Implements = 24, + Import = 25, + In = 26, + InstanceOf = 27, + Interface = 28, + Let = 29, + Module = 30, + New = 31, + Number = 32, + Null = 33, + Package = 34, + Private = 35, + Protected = 36, + Public = 37, + Return = 38, + Set = 39, + Static = 40, + String = 41, + Super = 42, + Switch = 43, + This = 44, + Throw = 45, + True = 46, + Try = 47, + TypeOf = 48, + Var = 49, + Void = 50, + With = 51, + While = 52, + Yield = 53, + Semicolon = 54, + OpenParen = 55, + CloseParen = 56, + OpenBracket = 57, + CloseBracket = 58, + OpenBrace = 59, + CloseBrace = 60, + Comma = 61, + Equals = 62, + PlusEquals = 63, + MinusEquals = 64, + AsteriskEquals = 65, + SlashEquals = 66, + PercentEquals = 67, + AmpersandEquals = 68, + CaretEquals = 69, + BarEquals = 70, + LessThanLessThanEquals = 71, + GreaterThanGreaterThanEquals = 72, + GreaterThanGreaterThanGreaterThanEquals = 73, + Question = 74, + Colon = 75, + BarBar = 76, + AmpersandAmpersand = 77, + Bar = 78, + Caret = 79, + And = 80, + EqualsEquals = 81, + ExclamationEquals = 82, + EqualsEqualsEquals = 83, + ExclamationEqualsEquals = 84, + LessThan = 85, + LessThanEquals = 86, + GreaterThan = 87, + GreaterThanEquals = 88, + LessThanLessThan = 89, + GreaterThanGreaterThan = 90, + GreaterThanGreaterThanGreaterThan = 91, + Plus = 92, + Minus = 93, + Asterisk = 94, + Slash = 95, + Percent = 96, + Tilde = 97, + Exclamation = 98, + PlusPlus = 99, + MinusMinus = 100, + Dot = 101, + DotDotDot = 102, + Error = 103, + EndOfFile = 104, + EqualsGreaterThan = 105, + Identifier = 106, + StringLiteral = 107, + RegularExpressionLiteral = 108, + NumberLiteral = 109, + Whitespace = 110, + Comment = 111, + Lim = 112, + LimFixed = 105, + LimKeyword = 53 + } + var tokenTable: any; + var nodeTypeTable: any; + var nodeTypeToTokTable: any; + var noRegexTable: any; + enum OperatorPrecedence { + None = 0, + Comma = 1, + Assignment = 2, + Conditional = 3, + LogicalOr = 4, + LogicalAnd = 5, + BitwiseOr = 6, + BitwiseExclusiveOr = 7, + BitwiseAnd = 8, + Equality = 9, + Relational = 10, + Shift = 11, + Additive = 12, + Multiplicative = 13, + Unary = 14, + Lim = 15 + } + enum Reservation { + None = 0, + Javascript = 1, + JavascriptFuture = 2, + TypeScript = 4, + JavascriptFutureStrict = 8, + TypeScriptAndJS = 5, + TypeScriptAndJSFuture = 6, + TypeScriptAndJSFutureStrict = 12 + } + class TokenInfo { + tokenId: TokenID; + reservation: Reservation; + binopPrecedence: number; + binopNodeType: number; + unopPrecedence: number; + unopNodeType: number; + text: string; + ers: ErrorRecoverySet; + constructor(tokenId: TokenID, reservation: Reservation, binopPrecedence: number, binopNodeType: number, unopPrecedence: number, unopNodeType: number, text: string, ers: ErrorRecoverySet); + } + function lookupToken(tokenId: TokenID): TokenInfo; + enum TokenClass { + Punctuation = 0, + Keyword = 1, + Operator = 2, + Comment = 3, + Whitespace = 4, + Identifier = 5, + Literal = 6 + } + class SavedToken { + tok: Token; + minChar: number; + limChar: number; + constructor(tok: Token, minChar: number, limChar: number); + } + class Token { + tokenId: TokenID; + constructor(tokenId: TokenID); + toString(): string; + print(line: number, outfile: any): void; + getText(): string; + classification(): TokenClass; + } + class NumberLiteralToken extends Token { + value: number; + hasEmptyFraction?: boolean; + constructor(value: number, hasEmptyFraction?: boolean); + getText(): string; + classification(): TokenClass; + } + class StringLiteralToken extends Token { + value: string; + constructor(value: string); + getText(): string; + classification(): TokenClass; + } + class IdentifierToken extends Token { + value: string; + hasEscapeSequence: boolean; + constructor(value: string, hasEscapeSequence: boolean); + getText(): string; + classification(): TokenClass; + } + class WhitespaceToken extends Token { + value: string; + constructor(tokenId: TokenID, value: string); + getText(): string; + classification(): TokenClass; + } + class CommentToken extends Token { + value: string; + isBlock: boolean; + startPos: number; + line: number; + endsLine: boolean; + constructor(tokenID: TokenID, value: string, isBlock: boolean, startPos: number, line: number, endsLine: boolean); + getText(): string; + classification(): TokenClass; + } + class RegularExpressionLiteralToken extends Token { + regex: any; + constructor(regex: any); + getText(): string; + classification(): TokenClass; + } + var staticTokens: any; + function initializeStaticTokens(): void; +} +/// [Errors] //// + +parserRealSource10.ts(4,21): error TS6053: File 'typescript.ts' not found. +parserRealSource10.ts(4,21): error TS9010: Reference directives are not supported in isolated declaration mode. +parserRealSource10.ts(123,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource10.ts(124,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource10.ts(127,38): error TS2449: Class 'TokenInfo' used before its declaration. +parserRealSource10.ts(127,48): error TS1011: An element access expression should take an argument. +parserRealSource10.ts(128,41): error TS2693: 'string' only refers to a type, but is being used as a value here. +parserRealSource10.ts(128,48): error TS1011: An element access expression should take an argument. +parserRealSource10.ts(129,46): error TS2693: 'number' only refers to a type, but is being used as a value here. +parserRealSource10.ts(129,53): error TS1011: An element access expression should take an argument. +parserRealSource10.ts(130,40): error TS2693: 'boolean' only refers to a type, but is being used as a value here. +parserRealSource10.ts(130,48): error TS1011: An element access expression should take an argument. +parserRealSource10.ts(170,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource10.ts(171,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource10.ts(172,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource10.ts(179,54): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(179,54): error TS4063: Parameter 'ers' of constructor from exported class has or is using private name 'ErrorRecoverySet'. +parserRealSource10.ts(184,28): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(188,34): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(192,33): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(198,80): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(198,120): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(198,142): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(199,81): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(199,121): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(199,147): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(200,87): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(200,127): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(200,151): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(201,86): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(201,126): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(201,149): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(202,87): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(202,127): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(202,151): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(203,93): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(203,133): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(203,157): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(204,93): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(204,133): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(204,157): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(205,90): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(205,130): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(205,157): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(206,90): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(206,130): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(206,161): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(207,89): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(207,129): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(207,155): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(208,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(208,129): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(208,156): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(209,84): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(209,124): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(209,145): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(210,86): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(210,126): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(210,149): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(211,92): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(211,132): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(211,155): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(212,94): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(212,134): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(212,159): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(213,95): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(213,135): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(213,161): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(214,84): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(214,124): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(214,150): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(215,87): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(215,127): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(215,151): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(216,89): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(216,129): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(216,155): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(217,85): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(217,125): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(217,147): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(218,90): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(218,130): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(218,157): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(219,105): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(219,145): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(219,175): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(220,80): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(220,120): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(220,142): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(221,80): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(221,120): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(221,142): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(222,84): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(222,124): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(222,145): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(223,104): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(223,144): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(223,173): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(224,94): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(224,134): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(224,159): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(225,90): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(225,128): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(225,149): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(226,98): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(226,140): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(226,169): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(227,103): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(227,143): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(227,171): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(228,92): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(228,132): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(228,154): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(229,83): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(229,123): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(229,148): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(230,85): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(230,125): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(230,147): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(231,83): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(231,123): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(231,148): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(232,86): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(232,126): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(232,149): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(233,96): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(233,136): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(233,162): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(234,101): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(234,141): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(234,167): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(235,98): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(235,138): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(235,166): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(236,100): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(236,140): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(236,165): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(237,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(237,128): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(237,153): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(238,100): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(238,140): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(238,165): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(239,83): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(239,123): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(239,148): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(240,93): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(240,133): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(240,157): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(241,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(241,128): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(241,153): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(242,86): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(242,126): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(242,149): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(243,87): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(243,127): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(243,151): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(244,86): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(244,126): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(244,149): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(245,85): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(245,125): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(245,147): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(246,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(246,129): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(246,156): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(247,85): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(247,125): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(247,147): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(248,86): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(248,127): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(248,150): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(249,86): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(249,126): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(249,149): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(250,87): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(250,127): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(250,151): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(251,94): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(251,134): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(251,158): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(253,81): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(253,121): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(253,150): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(254,84): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(254,124): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(254,156): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(255,95): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(255,135): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(255,159): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(256,84): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(256,124): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(256,150): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(259,80): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(259,120): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(259,140): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(260,81): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(260,121): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(260,141): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(261,83): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(261,123): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(261,143): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(262,80): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(262,120): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(262,140): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(263,81): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(263,121): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(263,141): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(264,80): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(264,120): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(264,142): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(267,77): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(267,118): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(267,138): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(268,83): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(268,122): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(268,142): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(269,87): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(269,129): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(269,150): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(270,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(270,130): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(270,151): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(271,91): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(271,133): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(271,154): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(273,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(273,130): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(273,151): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(274,90): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(274,132): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(274,153): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(275,92): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(275,134): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(275,155): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(276,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(276,130): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(276,151): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(277,86): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(277,127): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(277,148): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(278,99): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(278,141): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(278,163): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(279,105): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(279,147): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(279,169): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(280,116): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(280,158): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(280,181): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(281,86): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(281,143): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(281,163): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(282,76): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(282,116): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(282,136): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(283,82): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(283,123): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(283,144): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(284,95): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(284,137): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(284,158): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(285,79): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(285,117): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(285,137): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(286,90): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(286,129): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(286,149): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(287,80): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(287,119): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(287,139): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(288,87): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(288,125): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(288,146): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(289,92): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(289,130): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(289,151): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(290,93): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(290,132): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(290,154): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(291,98): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(291,138): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(291,160): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(292,85): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(292,123): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(292,143): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(293,91): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(293,129): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(293,150): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(294,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(294,126): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(294,146): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(295,94): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(295,132): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(295,153): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(296,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(296,127): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(296,148): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(297,94): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(297,133): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(297,154): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(298,105): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(298,144): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(298,166): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(299,79): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(299,119): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(299,138): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(300,80): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(300,120): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(300,139): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(301,89): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(301,128): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(301,148): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(302,86): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(302,125): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(302,145): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(303,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(303,127): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(303,147): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(304,76): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(304,117): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(304,136): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(305,82): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(305,123): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(305,145): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(306,79): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(306,120): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(306,143): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(307,81): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(307,122): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(307,145): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(308,80): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(308,120): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(308,140): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(309,82): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(309,122): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(309,142): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(310,75): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(310,115): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(310,135): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(311,80): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(311,120): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(311,144): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(312,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(312,128): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(312,149): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(355,52): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(356,53): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(449,46): error TS1011: An element access expression should take an argument. + + +==== parserRealSource10.ts (350 errors) ==== + // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. + // See LICENSE.txt in the project root for complete license information. + + /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. + ~~~~~~~~~~~~~ +!!! error TS9010: Reference directives are not supported in isolated declaration mode. + + module TypeScript { + export enum TokenID { + // Keywords + Any, + Bool, + Break, + Case, + Catch, + Class, + Const, + Continue, + Debugger, + Default, + Delete, + Do, + Else, + Enum, + Export, + Extends, + Declare, + False, + Finally, + For, + Function, + Constructor, + Get, + If, + Implements, + Import, + In, + InstanceOf, + Interface, + Let, + Module, + New, + Number, + Null, + Package, + Private, + Protected, + Public, + Return, + Set, + Static, + String, + Super, + Switch, + This, + Throw, + True, + Try, + TypeOf, + Var, + Void, + With, + While, + Yield, + // Punctuation + Semicolon, + OpenParen, + CloseParen, + OpenBracket, + CloseBracket, + OpenBrace, + CloseBrace, + Comma, + Equals, + PlusEquals, + MinusEquals, + AsteriskEquals, + SlashEquals, + PercentEquals, + AmpersandEquals, + CaretEquals, + BarEquals, + LessThanLessThanEquals, + GreaterThanGreaterThanEquals, + GreaterThanGreaterThanGreaterThanEquals, + Question, + Colon, + BarBar, + AmpersandAmpersand, + Bar, + Caret, + And, + EqualsEquals, + ExclamationEquals, + EqualsEqualsEquals, + ExclamationEqualsEquals, + LessThan, + LessThanEquals, + GreaterThan, + GreaterThanEquals, + LessThanLessThan, + GreaterThanGreaterThan, + GreaterThanGreaterThanGreaterThan, + Plus, + Minus, + Asterisk, + Slash, + Percent, + Tilde, + Exclamation, + PlusPlus, + MinusMinus, + Dot, + DotDotDot, + Error, + EndOfFile, + EqualsGreaterThan, + Identifier, + StringLiteral, + RegularExpressionLiteral, + NumberLiteral, + Whitespace, + Comment, + Lim, + LimFixed = EqualsGreaterThan, + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + LimKeyword = Yield, + ~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export var tokenTable: any = new TokenInfo[]; + ~~~~~~~~~ +!!! error TS2449: Class 'TokenInfo' used before its declaration. +!!! related TS2728 parserRealSource10.ts:175:18: 'TokenInfo' is declared here. + +!!! error TS1011: An element access expression should take an argument. + export var nodeTypeTable: any = new string[]; + ~~~~~~ +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. + +!!! error TS1011: An element access expression should take an argument. + export var nodeTypeToTokTable: any = new number[]; + ~~~~~~ +!!! error TS2693: 'number' only refers to a type, but is being used as a value here. + +!!! error TS1011: An element access expression should take an argument. + export var noRegexTable: any = new boolean[]; + ~~~~~~~ +!!! error TS2693: 'boolean' only refers to a type, but is being used as a value here. + +!!! error TS1011: An element access expression should take an argument. + + noRegexTable[TokenID.Identifier] = true; + noRegexTable[TokenID.StringLiteral] = true; + noRegexTable[TokenID.NumberLiteral] = true; + noRegexTable[TokenID.RegularExpressionLiteral] = true; + noRegexTable[TokenID.This] = true; + noRegexTable[TokenID.PlusPlus] = true; + noRegexTable[TokenID.MinusMinus] = true; + noRegexTable[TokenID.CloseParen] = true; + noRegexTable[TokenID.CloseBracket] = true; + noRegexTable[TokenID.CloseBrace] = true; + noRegexTable[TokenID.True] = true; + noRegexTable[TokenID.False] = true; + + export enum OperatorPrecedence { + None, + Comma, + Assignment, + Conditional, + LogicalOr, + LogicalAnd, + BitwiseOr, + BitwiseExclusiveOr, + BitwiseAnd, + Equality, + Relational, + Shift, + Additive, + Multiplicative, + Unary, + Lim + } + + export enum Reservation { + None = 0, + Javascript = 1, + JavascriptFuture = 2, + TypeScript = 4, + JavascriptFutureStrict = 8, + TypeScriptAndJS = Javascript | TypeScript, + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + TypeScriptAndJSFuture = JavascriptFuture | TypeScript, + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + TypeScriptAndJSFutureStrict = JavascriptFutureStrict | TypeScript, + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export class TokenInfo { + constructor (public tokenId: TokenID, public reservation: Reservation, + public binopPrecedence: number, public binopNodeType: number, + public unopPrecedence: number, public unopNodeType: number, + public text: string, public ers: ErrorRecoverySet) { } + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + ~~~~~~~~~~~~~~~~ +!!! error TS4063: Parameter 'ers' of constructor from exported class has or is using private name 'ErrorRecoverySet'. + } + + function setTokenInfo(tokenId: TokenID, reservation: number, binopPrecedence: number, + binopNodeType: number, unopPrecedence: number, unopNodeType: number, + text: string, ers: ErrorRecoverySet) { + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + if (tokenId !== undefined) { + tokenTable[tokenId] = new TokenInfo(tokenId, reservation, binopPrecedence, + binopNodeType, unopPrecedence, unopNodeType, text, ers); + if (binopNodeType != NodeType.None) { + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + nodeTypeTable[binopNodeType] = text; + nodeTypeToTokTable[binopNodeType] = tokenId; + } + if (unopNodeType != NodeType.None) { + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + nodeTypeTable[unopNodeType] = text; + } + } + } + + setTokenInfo(TokenID.Any, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "any", ErrorRecoverySet.PrimType); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Bool, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "boolean", ErrorRecoverySet.PrimType); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Break, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "break", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Case, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "case", ErrorRecoverySet.SCase); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Catch, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "catch", ErrorRecoverySet.Catch); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Class, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "class", ErrorRecoverySet.TypeScriptS); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Const, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "const", ErrorRecoverySet.Var); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Continue, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "continue", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Debugger, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.Debugger, "debugger", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Default, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "default", ErrorRecoverySet.SCase); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Delete, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Delete, "delete", ErrorRecoverySet.Prefix); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Do, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "do", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Else, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "else", ErrorRecoverySet.Else); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Enum, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "enum", ErrorRecoverySet.TypeScriptS); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Export, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "export", ErrorRecoverySet.TypeScriptS); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Extends, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "extends", ErrorRecoverySet.None); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Declare, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "declare", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.False, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "false", ErrorRecoverySet.RLit); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Finally, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "finally", ErrorRecoverySet.Catch); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.For, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "for", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Function, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "function", ErrorRecoverySet.Func); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Constructor, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "constructor", ErrorRecoverySet.Func); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Get, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "get", ErrorRecoverySet.Func); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Set, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "set", ErrorRecoverySet.Func); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.If, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "if", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Implements, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "implements", ErrorRecoverySet.None); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Import, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "import", ErrorRecoverySet.TypeScriptS); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.In, Reservation.TypeScriptAndJS, OperatorPrecedence.Relational, NodeType.In, OperatorPrecedence.None, NodeType.None, "in", ErrorRecoverySet.None); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.InstanceOf, Reservation.TypeScriptAndJS, OperatorPrecedence.Relational, NodeType.InstOf, OperatorPrecedence.None, NodeType.None, "instanceof", ErrorRecoverySet.BinOp); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Interface, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "interface", ErrorRecoverySet.TypeScriptS); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Let, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "let", ErrorRecoverySet.None); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Module, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "module", ErrorRecoverySet.TypeScriptS); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.New, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "new", ErrorRecoverySet.PreOp); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Number, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "number", ErrorRecoverySet.PrimType); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Null, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "null", ErrorRecoverySet.RLit); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Package, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "package", ErrorRecoverySet.None); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Private, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "private", ErrorRecoverySet.TypeScriptS); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Protected, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "protected", ErrorRecoverySet.None); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Public, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "public", ErrorRecoverySet.TypeScriptS); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Return, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "return", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Static, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "static", ErrorRecoverySet.None); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.String, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "string", ErrorRecoverySet.PrimType); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Super, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "super", ErrorRecoverySet.RLit); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Switch, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "switch", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.This, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "this", ErrorRecoverySet.RLit); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Throw, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "throw", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.True, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "true", ErrorRecoverySet.RLit); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Try, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "try", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.TypeOf, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Typeof, "typeof", ErrorRecoverySet.Prefix); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Var, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "var", ErrorRecoverySet.Var); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Void, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Void, "void", ErrorRecoverySet.Prefix); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.With, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.With, "with", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.While, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "while", ErrorRecoverySet.While); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Yield, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "yield", ErrorRecoverySet.None); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + + setTokenInfo(TokenID.Identifier, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "identifier", ErrorRecoverySet.ID); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.NumberLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "numberLiteral", ErrorRecoverySet.Literal); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.RegularExpressionLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "regex", ErrorRecoverySet.RegExp); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.StringLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "qstring", ErrorRecoverySet.Literal); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + + // Non-operator non-identifier tokens + setTokenInfo(TokenID.Semicolon, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ";", ErrorRecoverySet.SColon); // ; + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.CloseParen, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ")", ErrorRecoverySet.RParen); // ) + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.CloseBracket, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "]", ErrorRecoverySet.RBrack); // ] + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.OpenBrace, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "{", ErrorRecoverySet.LCurly); // { + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.CloseBrace, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "}", ErrorRecoverySet.RCurly); // } + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.DotDotDot, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "...", ErrorRecoverySet.None); // ... + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + + // Operator non-identifier tokens + setTokenInfo(TokenID.Comma, Reservation.None, OperatorPrecedence.Comma, NodeType.Comma, OperatorPrecedence.None, NodeType.None, ",", ErrorRecoverySet.Comma); // , + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Equals, Reservation.None, OperatorPrecedence.Assignment, NodeType.Asg, OperatorPrecedence.None, NodeType.None, "=", ErrorRecoverySet.Asg); // = + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.PlusEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgAdd, OperatorPrecedence.None, NodeType.None, "+=", ErrorRecoverySet.BinOp); // += + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.MinusEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgSub, OperatorPrecedence.None, NodeType.None, "-=", ErrorRecoverySet.BinOp); // -= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.AsteriskEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgMul, OperatorPrecedence.None, NodeType.None, "*=", ErrorRecoverySet.BinOp); // *= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + + setTokenInfo(TokenID.SlashEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgDiv, OperatorPrecedence.None, NodeType.None, "/=", ErrorRecoverySet.BinOp); // /= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.PercentEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgMod, OperatorPrecedence.None, NodeType.None, "%=", ErrorRecoverySet.BinOp); // %= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.AmpersandEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgAnd, OperatorPrecedence.None, NodeType.None, "&=", ErrorRecoverySet.BinOp); // &= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.CaretEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgXor, OperatorPrecedence.None, NodeType.None, "^=", ErrorRecoverySet.BinOp); // ^= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.BarEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgOr, OperatorPrecedence.None, NodeType.None, "|=", ErrorRecoverySet.BinOp); // |= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.LessThanLessThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgLsh, OperatorPrecedence.None, NodeType.None, "<<=", ErrorRecoverySet.BinOp); // <<= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.GreaterThanGreaterThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgRsh, OperatorPrecedence.None, NodeType.None, ">>=", ErrorRecoverySet.BinOp); // >>= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.GreaterThanGreaterThanGreaterThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgRs2, OperatorPrecedence.None, NodeType.None, ">>>=", ErrorRecoverySet.BinOp); // >>>= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Question, Reservation.None, OperatorPrecedence.Conditional, NodeType.ConditionalExpression, OperatorPrecedence.None, NodeType.None, "?", ErrorRecoverySet.BinOp); // ? + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Colon, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ":", ErrorRecoverySet.Colon); // : + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.BarBar, Reservation.None, OperatorPrecedence.LogicalOr, NodeType.LogOr, OperatorPrecedence.None, NodeType.None, "||", ErrorRecoverySet.BinOp); // || + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.AmpersandAmpersand, Reservation.None, OperatorPrecedence.LogicalAnd, NodeType.LogAnd, OperatorPrecedence.None, NodeType.None, "&&", ErrorRecoverySet.BinOp); // && + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Bar, Reservation.None, OperatorPrecedence.BitwiseOr, NodeType.Or, OperatorPrecedence.None, NodeType.None, "|", ErrorRecoverySet.BinOp); // | + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Caret, Reservation.None, OperatorPrecedence.BitwiseExclusiveOr, NodeType.Xor, OperatorPrecedence.None, NodeType.None, "^", ErrorRecoverySet.BinOp); // ^ + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.And, Reservation.None, OperatorPrecedence.BitwiseAnd, NodeType.And, OperatorPrecedence.None, NodeType.None, "&", ErrorRecoverySet.BinOp); // & + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.EqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Eq, OperatorPrecedence.None, NodeType.None, "==", ErrorRecoverySet.BinOp); // == + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.ExclamationEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Ne, OperatorPrecedence.None, NodeType.None, "!=", ErrorRecoverySet.BinOp); // != + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.EqualsEqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Eqv, OperatorPrecedence.None, NodeType.None, "===", ErrorRecoverySet.BinOp); // === + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.ExclamationEqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.NEqv, OperatorPrecedence.None, NodeType.None, "!==", ErrorRecoverySet.BinOp); // !== + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.LessThan, Reservation.None, OperatorPrecedence.Relational, NodeType.Lt, OperatorPrecedence.None, NodeType.None, "<", ErrorRecoverySet.BinOp); // < + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.LessThanEquals, Reservation.None, OperatorPrecedence.Relational, NodeType.Le, OperatorPrecedence.None, NodeType.None, "<=", ErrorRecoverySet.BinOp); // <= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.GreaterThan, Reservation.None, OperatorPrecedence.Relational, NodeType.Gt, OperatorPrecedence.None, NodeType.None, ">", ErrorRecoverySet.BinOp); // > + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.GreaterThanEquals, Reservation.None, OperatorPrecedence.Relational, NodeType.Ge, OperatorPrecedence.None, NodeType.None, ">=", ErrorRecoverySet.BinOp); // >= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.LessThanLessThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Lsh, OperatorPrecedence.None, NodeType.None, "<<", ErrorRecoverySet.BinOp); // << + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.GreaterThanGreaterThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Rsh, OperatorPrecedence.None, NodeType.None, ">>", ErrorRecoverySet.BinOp); // >> + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.GreaterThanGreaterThanGreaterThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Rs2, OperatorPrecedence.None, NodeType.None, ">>>", ErrorRecoverySet.BinOp); // >>> + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Plus, Reservation.None, OperatorPrecedence.Additive, NodeType.Add, OperatorPrecedence.Unary, NodeType.Pos, "+", ErrorRecoverySet.AddOp); // + + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Minus, Reservation.None, OperatorPrecedence.Additive, NodeType.Sub, OperatorPrecedence.Unary, NodeType.Neg, "-", ErrorRecoverySet.AddOp); // - + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Asterisk, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Mul, OperatorPrecedence.None, NodeType.None, "*", ErrorRecoverySet.BinOp); // * + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Slash, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Div, OperatorPrecedence.None, NodeType.None, "/", ErrorRecoverySet.BinOp); // / + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Percent, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Mod, OperatorPrecedence.None, NodeType.None, "%", ErrorRecoverySet.BinOp); // % + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Tilde, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Not, "~", ErrorRecoverySet.PreOp); // ~ + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Exclamation, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.LogNot, "!", ErrorRecoverySet.PreOp); // ! + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.PlusPlus, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.IncPre, "++", ErrorRecoverySet.PreOp); // ++ + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.MinusMinus, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.DecPre, "--", ErrorRecoverySet.PreOp); // -- + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.OpenParen, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "(", ErrorRecoverySet.LParen); // ( + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.OpenBracket, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "[", ErrorRecoverySet.LBrack); // [ + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Dot, Reservation.None, OperatorPrecedence.Unary, NodeType.None, OperatorPrecedence.None, NodeType.None, ".", ErrorRecoverySet.Dot); // . + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.EndOfFile, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "", ErrorRecoverySet.EOF); // EOF + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.EqualsGreaterThan, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "=>", ErrorRecoverySet.None); // => + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + + export function lookupToken(tokenId: TokenID): TokenInfo { + return tokenTable[tokenId]; + } + + export enum TokenClass { + Punctuation, + Keyword, + Operator, + Comment, + Whitespace, + Identifier, + Literal, + } + + export class SavedToken { + constructor (public tok: Token, public minChar: number, public limChar: number) { } + } + + export class Token { + constructor (public tokenId: TokenID) { + } + + public toString(): string { + return "token: " + this.tokenId + " " + this.getText() + " (" + (TokenID)._map[this.tokenId] + ")"; + } + + public print(line: number, outfile: any): void { + outfile.WriteLine(this.toString() + ",on line" + line); + } + + public getText(): string { + return tokenTable[this.tokenId].text; + } + + public classification(): TokenClass { + if (this.tokenId <= TokenID.LimKeyword) { + return TokenClass.Keyword; + } + else { + var tokenInfo = lookupToken(this.tokenId); + if (tokenInfo != undefined) { + if ((tokenInfo.unopNodeType != NodeType.None) || + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + (tokenInfo.binopNodeType != NodeType.None)) { + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + return TokenClass.Operator; + } + } + } + + return TokenClass.Punctuation; + } + } + + export class NumberLiteralToken extends Token { + constructor (public value: number, public hasEmptyFraction?: boolean) { + super(TokenID.NumberLiteral); + } + + public getText(): string { + return this.hasEmptyFraction ? this.value.toString() + ".0" : this.value.toString(); + } + + public classification(): TokenClass { + return TokenClass.Literal; + } + } + + export class StringLiteralToken extends Token { + constructor (public value: string) { + super(TokenID.StringLiteral); + } + + public getText(): string { + return this.value; + } + + public classification(): TokenClass { + return TokenClass.Literal; + } + } + + export class IdentifierToken extends Token { + constructor (public value: string, public hasEscapeSequence : boolean) { + super(TokenID.Identifier); + } + public getText(): string { + return this.value; + } + public classification(): TokenClass { + return TokenClass.Identifier; + } + } + + export class WhitespaceToken extends Token { + constructor (tokenId: TokenID, public value: string) { + super(tokenId); + } + + public getText(): string { + return this.value; + } + + public classification(): TokenClass { + return TokenClass.Whitespace; + } + } + + export class CommentToken extends Token { + constructor (tokenID: TokenID, public value: string, public isBlock: boolean, public startPos: number, public line: number, public endsLine: boolean) { + super(tokenID); + } + + public getText(): string { + return this.value; + } + + public classification(): TokenClass { + return TokenClass.Comment; + } + } + + export class RegularExpressionLiteralToken extends Token { + constructor(public regex: any) { + super(TokenID.RegularExpressionLiteral); + } + + public getText(): string { + return this.regex.toString(); + } + + public classification(): TokenClass { + return TokenClass.Literal; + } + } + + // TODO: new with length TokenID.LimFixed + export var staticTokens: any = new Token[]; + +!!! error TS1011: An element access expression should take an argument. + export function initializeStaticTokens(): void { + for (var i = 0; i <= TokenID.LimFixed; i++) { + staticTokens[i] = new Token(i); + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource14.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource14.d.ts new file mode 100644 index 0000000000000..b3129daf4ee5c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource14.d.ts @@ -0,0 +1,1737 @@ +//// [tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts] //// + +//// [parserRealSource14.ts] +// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. +// See LICENSE.txt in the project root for complete license information. + +/// + +module TypeScript { + export function lastOf(items: any[]): any { + return (items === null || items.length === 0) ? null : items[items.length - 1]; + } + + export function max(a: number, b: number): number { + return a >= b ? a : b; + } + + export function min(a: number, b: number): number { + return a <= b ? a : b; + } + + // + // Helper class representing a path from a root ast node to a (grand)child ast node. + // This is helpful as our tree don't have parents. + // + export class AstPath { + public asts: TypeScript.AST[] = []; + public top: number = -1; + + static reverseIndexOf(items: any[], index: number): any { + return (items === null || items.length <= index) ? null : items[items.length - index - 1]; + } + + public clone(): AstPath { + var clone = new AstPath(); + clone.asts = this.asts.map((value) => { return value; }); + clone.top = this.top; + return clone; + } + + public pop(): TypeScript.AST { + var head = this.ast(); + this.up(); + + while (this.asts.length > this.count()) { + this.asts.pop(); + } + return head; + } + + public push(ast: TypeScript.AST): void { + while (this.asts.length > this.count()) { + this.asts.pop(); + } + this.top = this.asts.length; + this.asts.push(ast); + } + + public up(): void { + if (this.top <= -1) + throw new Error("Invalid call to 'up'"); + this.top--; + } + + public down(): void { + if (this.top == this.ast.length - 1) + throw new Error("Invalid call to 'down'"); + this.top++; + } + + public nodeType(): TypeScript.NodeType { + if (this.ast() == null) + return TypeScript.NodeType.None; + return this.ast().nodeType; + } + + public ast(): TypeScript.AST { + return AstPath.reverseIndexOf(this.asts, this.asts.length - (this.top + 1)); + } + + public parent(): TypeScript.AST { + return AstPath.reverseIndexOf(this.asts, this.asts.length - this.top); + } + + public count(): number { + return this.top + 1; + } + + public get(index: number): TypeScript.AST { + return this.asts[index]; + } + + public isNameOfClass(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + (this.parent().nodeType === TypeScript.NodeType.ClassDeclaration) && + ((this.parent()).name === this.ast()); + } + + public isNameOfInterface(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + (this.parent().nodeType === TypeScript.NodeType.InterfaceDeclaration) && + ((this.parent()).name === this.ast()); + } + + public isNameOfArgument(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + (this.parent().nodeType === TypeScript.NodeType.ArgDecl) && + ((this.parent()).id === this.ast()); + } + + public isNameOfVariable(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + (this.parent().nodeType === TypeScript.NodeType.VarDecl) && + ((this.parent()).id === this.ast()); + } + + public isNameOfModule(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + (this.parent().nodeType === TypeScript.NodeType.ModuleDeclaration) && + ((this.parent()).name === this.ast()); + } + + public isNameOfFunction(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + (this.parent().nodeType === TypeScript.NodeType.FuncDecl) && + ((this.parent()).name === this.ast()); + } + + public isChildOfScript(): boolean { + var ast = lastOf(this.asts); + return this.count() >= 3 && + this.asts[this.top] === ast && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.Script; + } + + public isChildOfModule(): boolean { + var ast = lastOf(this.asts); + return this.count() >= 3 && + this.asts[this.top] === ast && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.ModuleDeclaration; + } + + public isChildOfClass(): boolean { + var ast = lastOf(this.asts); + return this.count() >= 3 && + this.asts[this.top] === ast && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.ClassDeclaration; + } + + public isArgumentOfClassConstructor(): boolean { + var ast = lastOf(this.asts); + return this.count() >= 5 && + this.asts[this.top] === ast && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && + this.asts[this.top - 3].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 4].nodeType === TypeScript.NodeType.ClassDeclaration && + ((this.asts[this.top - 2]).isConstructor) && + ((this.asts[this.top - 2]).arguments === this.asts[this.top - 1]) && + ((this.asts[this.top - 4]).constructorDecl === this.asts[this.top - 2]); + } + + public isChildOfInterface(): boolean { + var ast = lastOf(this.asts); + return this.count() >= 3 && + this.asts[this.top] === ast && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.InterfaceDeclaration; + } + + public isTopLevelImplicitModule(): any { + return this.count() >= 1 && + this.asts[this.top].nodeType === TypeScript.NodeType.ModuleDeclaration && + TypeScript.hasFlag((this.asts[this.top]).modFlags, TypeScript.ModuleFlags.IsWholeFile); + } + + public isBodyOfTopLevelImplicitModule(): any { + return this.count() >= 2 && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && + (this.asts[this.top - 1]).members == this.asts[this.top - 0] && + TypeScript.hasFlag((this.asts[this.top - 1]).modFlags, TypeScript.ModuleFlags.IsWholeFile); + } + + public isBodyOfScript(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Script && + (this.asts[this.top - 1]).bod == this.asts[this.top - 0]; + } + + public isBodyOfSwitch(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Switch && + (this.asts[this.top - 1]).caseList == this.asts[this.top - 0]; + } + + public isBodyOfModule(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && + (this.asts[this.top - 1]).members == this.asts[this.top - 0]; + } + + public isBodyOfClass(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ClassDeclaration && + (this.asts[this.top - 1]).members == this.asts[this.top - 0]; + } + + public isBodyOfFunction(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && + (this.asts[this.top - 1]).bod == this.asts[this.top - 0]; + } + + public isBodyOfInterface(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.InterfaceDeclaration && + (this.asts[this.top - 1]).members == this.asts[this.top - 0]; + } + + public isBodyOfBlock(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Block && + (this.asts[this.top - 1]).statements == this.asts[this.top - 0]; + } + + public isBodyOfFor(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.For && + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + } + + public isBodyOfCase(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Case && + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + } + + public isBodyOfTry(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Try && + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + } + + public isBodyOfCatch(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Catch && + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + } + + public isBodyOfDoWhile(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.DoWhile && + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + } + + public isBodyOfWhile(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.While && + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + } + + public isBodyOfForIn(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ForIn && + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + } + + public isBodyOfWith(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.With && + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + } + + public isBodyOfFinally(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Finally && + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + } + + public isCaseOfSwitch(): boolean { + return this.count() >= 3 && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + (this.asts[this.top - 2]).caseList == this.asts[this.top - 1]; + } + + public isDefaultCaseOfSwitch(): boolean { + return this.count() >= 3 && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + (this.asts[this.top - 2]).caseList == this.asts[this.top - 1] && + (this.asts[this.top - 2]).defaultCase == this.asts[this.top - 0]; + } + + public isListOfObjectLit(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + (this.asts[this.top - 1]).operand == this.asts[this.top - 0]; + } + + public isBodyOfObjectLit(): boolean { + return this.isListOfObjectLit(); + } + + public isEmptyListOfObjectLit(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + (this.asts[this.top - 1]).operand == this.asts[this.top - 0] && + (this.asts[this.top - 0]).members.length == 0; + } + + public isMemberOfObjectLit(): boolean { + return this.count() >= 3 && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.ObjectLit && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.Member && + (this.asts[this.top - 2]).operand == this.asts[this.top - 1]; + } + + public isNameOfMemberOfObjectLit(): boolean { + return this.count() >= 4 && + this.asts[this.top - 3].nodeType === TypeScript.NodeType.ObjectLit && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.Name && + (this.asts[this.top - 3]).operand == this.asts[this.top - 2]; + } + + public isListOfArrayLit(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ArrayLit && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + (this.asts[this.top - 1]).operand == this.asts[this.top - 0]; + } + + public isTargetOfMember(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && + (this.asts[this.top - 1]).operand1 === this.asts[this.top - 0]; + } + + public isMemberOfMember(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && + (this.asts[this.top - 1]).operand2 === this.asts[this.top - 0]; + } + + public isItemOfList(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List; + //(this.asts[this.top - 1]).operand2 === this.asts[this.top - 0]; + } + + public isThenOfIf(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && + (this.asts[this.top - 1]).thenBod == this.asts[this.top - 0]; + } + + public isElseOfIf(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && + (this.asts[this.top - 1]).elseBod == this.asts[this.top - 0]; + } + + public isBodyOfDefaultCase(): boolean { + return this.isBodyOfCase(); + } + + public isSingleStatementList(): boolean { + return this.count() >= 1 && + this.asts[this.top].nodeType === TypeScript.NodeType.List && + (this.asts[this.top]).members.length === 1; + } + + public isArgumentListOfFunction(): boolean { + return this.count() >= 2 && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && + (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; + } + + public isArgumentOfFunction(): boolean { + return this.count() >= 3 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && + (this.asts[this.top - 2]).arguments === this.asts[this.top - 1]; + } + + public isArgumentListOfCall(): boolean { + return this.count() >= 2 && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Call && + (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; + } + + public isArgumentListOfNew(): boolean { + return this.count() >= 2 && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.New && + (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; + } + + public isSynthesizedBlock(): boolean { + return this.count() >= 1 && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.Block && + (this.asts[this.top - 0]).isStatementBlock === false; + } + } + + export function isValidAstNode(ast: TypeScript.ASTSpan): boolean { + if (ast === null) + return false; + + if (ast.minChar === -1 || ast.limChar === -1) + return false; + + return true; + } + + export class AstPathContext { + public path: AstPath = new TypeScript.AstPath(); + } + + export enum GetAstPathOptions { + Default = 0, + EdgeInclusive = 1, + //We need this options dealing with an AST coming from an incomplete AST. For example: + // class foo { // r + // If we ask for the AST at the position after the "r" character, we won't see we are + // inside a comment, because the "class" AST node has a limChar corresponding to the position of + // the "{" character, meaning we don't traverse the tree down to the stmt list of the class, meaning + // we don't find the "precomment" attached to the errorneous empty stmt. + //TODO: It would be nice to be able to get rid of this. + DontPruneSearchBasedOnPosition = 1 << 1, + } + + /// + /// Return the stack of AST nodes containing "position" + /// + export function getAstPathToPosition(script: TypeScript.AST, pos: number, options: GetAstPathOptions = GetAstPathOptions.Default): TypeScript.AstPath { + var lookInComments = (comments: TypeScript.Comment[]) => { + if (comments && comments.length > 0) { + for (var i = 0; i < comments.length; i++) { + var minChar = comments[i].minChar; + var limChar = comments[i].limChar; + if (!comments[i].isBlockComment) { + limChar++; // For single line comments, include 1 more character (for the newline) + } + if (pos >= minChar && pos < limChar) { + ctx.path.push(comments[i]); + } + } + } + } + + var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: IAstWalker) { + if (isValidAstNode(cur)) { + + // Add "cur" to the stack if it contains our position + // For "identifier" nodes, we need a special case: A position equal to "limChar" is + // valid, since the position corresponds to a caret position (in between characters) + // For example: + // bar + // 0123 + // If "position == 3", the caret is at the "right" of the "r" character, which should be considered valid + var inclusive = + hasFlag(options, GetAstPathOptions.EdgeInclusive) || + cur.nodeType === TypeScript.NodeType.Name || + pos === script.limChar; // Special "EOF" case + + var minChar = cur.minChar; + var limChar = cur.limChar + (inclusive ? 1 : 0) + if (pos >= minChar && pos < limChar) { + + // TODO: Since AST is sometimes not correct wrt to position, only add "cur" if it's better + // than top of the stack. + var previous = ctx.path.ast(); + if (previous == null || (cur.minChar >= previous.minChar && cur.limChar <= previous.limChar)) { + ctx.path.push(cur); + } + else { + //logger.log("TODO: Ignoring node because minChar, limChar not better than previous node in stack"); + } + } + + // The AST walker skips comments, but we might be in one, so check the pre/post comments for this node manually + if (pos < limChar) { + lookInComments(cur.preComments); + } + if (pos >= minChar) { + lookInComments(cur.postComments); + } + + if (!hasFlag(options, GetAstPathOptions.DontPruneSearchBasedOnPosition)) { + // Don't go further down the tree if pos is outside of [minChar, limChar] + walker.options.goChildren = (minChar <= pos && pos <= limChar); + } + } + return cur; + } + + var ctx = new AstPathContext(); + TypeScript.getAstWalkerFactory().walk(script, pre, null, null, ctx); + return ctx.path; + } + + // + // Find a source text offset that is safe for lexing tokens at the given position. + // This is used when "position" might be inside a comment or string, etc. + // + export function getTokenizationOffset(script: TypeScript.Script, position: number): number { + var bestOffset = 0; + var pre = (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker): TypeScript.AST => { + if (TypeScript.isValidAstNode(cur)) { + // Did we find a closer offset? + if (cur.minChar <= position) { + bestOffset = max(bestOffset, cur.minChar); + } + + // Stop the walk if this node is not related to "minChar" + if (cur.minChar > position || cur.limChar < bestOffset) { + walker.options.goChildren = false; + } + } + + return cur; + } + + TypeScript.getAstWalkerFactory().walk(script, pre); + return bestOffset; + } + + /// + /// Simple function to Walk an AST using a simple callback function. + /// + export function walkAST(ast: TypeScript.AST, callback: (path: AstPath, walker: TypeScript.IAstWalker) => void ): void { + var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) { + var path: TypeScript.AstPath = walker.state; + path.push(cur); + callback(path, walker); + return cur; + } + var post = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) { + var path: TypeScript.AstPath = walker.state; + path.pop(); + return cur; + } + + var path = new AstPath(); + TypeScript.getAstWalkerFactory().walk(ast, pre, post, null, path); + } +} + + +/// [Declarations] //// + + + +//// [/.src/parserRealSource14.d.ts] +declare namespace TypeScript { + function lastOf(items: any[]): any; + function max(a: number, b: number): number; + function min(a: number, b: number): number; + class AstPath { + asts: TypeScript.AST[]; + top: number; + static reverseIndexOf(items: any[], index: number): any; + clone(): AstPath; + pop(): TypeScript.AST; + push(ast: TypeScript.AST): void; + up(): void; + down(): void; + nodeType(): TypeScript.NodeType; + ast(): TypeScript.AST; + parent(): TypeScript.AST; + count(): number; + get(index: number): TypeScript.AST; + isNameOfClass(): boolean; + isNameOfInterface(): boolean; + isNameOfArgument(): boolean; + isNameOfVariable(): boolean; + isNameOfModule(): boolean; + isNameOfFunction(): boolean; + isChildOfScript(): boolean; + isChildOfModule(): boolean; + isChildOfClass(): boolean; + isArgumentOfClassConstructor(): boolean; + isChildOfInterface(): boolean; + isTopLevelImplicitModule(): any; + isBodyOfTopLevelImplicitModule(): any; + isBodyOfScript(): boolean; + isBodyOfSwitch(): boolean; + isBodyOfModule(): boolean; + isBodyOfClass(): boolean; + isBodyOfFunction(): boolean; + isBodyOfInterface(): boolean; + isBodyOfBlock(): boolean; + isBodyOfFor(): boolean; + isBodyOfCase(): boolean; + isBodyOfTry(): boolean; + isBodyOfCatch(): boolean; + isBodyOfDoWhile(): boolean; + isBodyOfWhile(): boolean; + isBodyOfForIn(): boolean; + isBodyOfWith(): boolean; + isBodyOfFinally(): boolean; + isCaseOfSwitch(): boolean; + isDefaultCaseOfSwitch(): boolean; + isListOfObjectLit(): boolean; + isBodyOfObjectLit(): boolean; + isEmptyListOfObjectLit(): boolean; + isMemberOfObjectLit(): boolean; + isNameOfMemberOfObjectLit(): boolean; + isListOfArrayLit(): boolean; + isTargetOfMember(): boolean; + isMemberOfMember(): boolean; + isItemOfList(): boolean; + isThenOfIf(): boolean; + isElseOfIf(): boolean; + isBodyOfDefaultCase(): boolean; + isSingleStatementList(): boolean; + isArgumentListOfFunction(): boolean; + isArgumentOfFunction(): boolean; + isArgumentListOfCall(): boolean; + isArgumentListOfNew(): boolean; + isSynthesizedBlock(): boolean; + } + function isValidAstNode(ast: TypeScript.ASTSpan): boolean; + class AstPathContext { + path: AstPath; + } + enum GetAstPathOptions { + Default = 0, + EdgeInclusive = 1, + DontPruneSearchBasedOnPosition = 2 + } + function getAstPathToPosition(script: TypeScript.AST, pos: number, options?: GetAstPathOptions): TypeScript.AstPath; + function getTokenizationOffset(script: TypeScript.Script, position: number): number; + function walkAST(ast: TypeScript.AST, callback: (path: AstPath, walker: TypeScript.IAstWalker) => void): void; +} +/// [Errors] //// + +parserRealSource14.ts(4,21): error TS6053: File 'typescript.ts' not found. +parserRealSource14.ts(4,21): error TS9010: Reference directives are not supported in isolated declaration mode. +parserRealSource14.ts(24,33): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(38,34): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(48,37): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(68,39): error TS2694: Namespace 'TypeScript' has no exported member 'NodeType'. +parserRealSource14.ts(70,35): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(74,34): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(75,32): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(78,37): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(79,32): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(86,47): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(94,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(95,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(96,31): error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. +parserRealSource14.ts(103,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(104,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(105,31): error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. +parserRealSource14.ts(112,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(113,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(114,31): error TS2694: Namespace 'TypeScript' has no exported member 'ArgDecl'. +parserRealSource14.ts(121,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(122,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(123,31): error TS2694: Namespace 'TypeScript' has no exported member 'VarDecl'. +parserRealSource14.ts(130,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(131,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(132,31): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. +parserRealSource14.ts(139,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(140,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(141,31): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. +parserRealSource14.ts(148,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(149,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(156,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(157,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(164,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(165,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(172,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(173,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(174,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(175,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(176,31): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. +parserRealSource14.ts(177,31): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. +parserRealSource14.ts(178,31): error TS2694: Namespace 'TypeScript' has no exported member 'ClassDeclaration'. +parserRealSource14.ts(185,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(186,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(191,61): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(192,28): error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(192,49): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. +parserRealSource14.ts(192,109): error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(197,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(198,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(199,31): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. +parserRealSource14.ts(200,28): error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(200,49): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. +parserRealSource14.ts(200,113): error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(205,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(206,31): error TS2694: Namespace 'TypeScript' has no exported member 'Script'. +parserRealSource14.ts(211,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(212,31): error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. +parserRealSource14.ts(217,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(218,31): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. +parserRealSource14.ts(223,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(224,31): error TS2694: Namespace 'TypeScript' has no exported member 'ClassDeclaration'. +parserRealSource14.ts(229,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(230,31): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. +parserRealSource14.ts(235,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(236,31): error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. +parserRealSource14.ts(241,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(242,30): error TS2694: Namespace 'TypeScript' has no exported member 'Block'. +parserRealSource14.ts(247,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(248,30): error TS2694: Namespace 'TypeScript' has no exported member 'ForStatement'. +parserRealSource14.ts(253,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(254,30): error TS2694: Namespace 'TypeScript' has no exported member 'CaseStatement'. +parserRealSource14.ts(259,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(260,30): error TS2694: Namespace 'TypeScript' has no exported member 'Try'. +parserRealSource14.ts(265,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(266,30): error TS2694: Namespace 'TypeScript' has no exported member 'Catch'. +parserRealSource14.ts(271,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(272,30): error TS2694: Namespace 'TypeScript' has no exported member 'DoWhileStatement'. +parserRealSource14.ts(277,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(278,30): error TS2694: Namespace 'TypeScript' has no exported member 'WhileStatement'. +parserRealSource14.ts(283,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(284,30): error TS2694: Namespace 'TypeScript' has no exported member 'ForInStatement'. +parserRealSource14.ts(289,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(290,30): error TS2694: Namespace 'TypeScript' has no exported member 'WithStatement'. +parserRealSource14.ts(295,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(296,30): error TS2694: Namespace 'TypeScript' has no exported member 'Finally'. +parserRealSource14.ts(301,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(302,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(303,30): error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. +parserRealSource14.ts(308,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(309,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(310,30): error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. +parserRealSource14.ts(311,30): error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. +parserRealSource14.ts(316,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(317,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(318,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. +parserRealSource14.ts(327,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(328,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(329,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. +parserRealSource14.ts(330,30): error TS2694: Namespace 'TypeScript' has no exported member 'ASTList'. +parserRealSource14.ts(335,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(336,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(337,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(338,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. +parserRealSource14.ts(343,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(344,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(345,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(346,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(347,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. +parserRealSource14.ts(352,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(353,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(354,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. +parserRealSource14.ts(359,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(360,30): error TS2694: Namespace 'TypeScript' has no exported member 'BinaryExpression'. +parserRealSource14.ts(365,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(366,30): error TS2694: Namespace 'TypeScript' has no exported member 'BinaryExpression'. +parserRealSource14.ts(371,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(377,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(378,30): error TS2694: Namespace 'TypeScript' has no exported member 'IfStatement'. +parserRealSource14.ts(383,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(384,30): error TS2694: Namespace 'TypeScript' has no exported member 'IfStatement'. +parserRealSource14.ts(393,61): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(394,30): error TS2694: Namespace 'TypeScript' has no exported member 'ASTList'. +parserRealSource14.ts(399,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(400,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(401,30): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. +parserRealSource14.ts(406,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(407,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(408,30): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. +parserRealSource14.ts(413,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(414,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(415,30): error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'. +parserRealSource14.ts(420,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(421,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(422,30): error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'. +parserRealSource14.ts(427,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(428,30): error TS2694: Namespace 'TypeScript' has no exported member 'Block'. +parserRealSource14.ts(432,52): error TS2694: Namespace 'TypeScript' has no exported member 'ASTSpan'. +parserRealSource14.ts(456,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource14.ts(462,61): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(463,52): error TS2694: Namespace 'TypeScript' has no exported member 'Comment'. +parserRealSource14.ts(478,45): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(478,69): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(478,82): error TS2304: Cannot find name 'IAstWalker'. +parserRealSource14.ts(489,21): error TS2304: Cannot find name 'hasFlag'. +parserRealSource14.ts(490,49): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(516,22): error TS2304: Cannot find name 'hasFlag'. +parserRealSource14.ts(525,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(533,62): error TS2694: Namespace 'TypeScript' has no exported member 'Script'. +parserRealSource14.ts(535,36): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(535,60): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(535,84): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. +parserRealSource14.ts(535,108): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(551,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(558,45): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(558,95): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. +parserRealSource14.ts(559,45): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(559,69): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(559,93): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. +parserRealSource14.ts(565,46): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(565,70): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(565,94): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. +parserRealSource14.ts(572,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. + + +==== parserRealSource14.ts (164 errors) ==== + // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. + // See LICENSE.txt in the project root for complete license information. + + /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. + ~~~~~~~~~~~~~ +!!! error TS9010: Reference directives are not supported in isolated declaration mode. + + module TypeScript { + export function lastOf(items: any[]): any { + return (items === null || items.length === 0) ? null : items[items.length - 1]; + } + + export function max(a: number, b: number): number { + return a >= b ? a : b; + } + + export function min(a: number, b: number): number { + return a <= b ? a : b; + } + + // + // Helper class representing a path from a root ast node to a (grand)child ast node. + // This is helpful as our tree don't have parents. + // + export class AstPath { + public asts: TypeScript.AST[] = []; + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + public top: number = -1; + + static reverseIndexOf(items: any[], index: number): any { + return (items === null || items.length <= index) ? null : items[items.length - index - 1]; + } + + public clone(): AstPath { + var clone = new AstPath(); + clone.asts = this.asts.map((value) => { return value; }); + clone.top = this.top; + return clone; + } + + public pop(): TypeScript.AST { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + var head = this.ast(); + this.up(); + + while (this.asts.length > this.count()) { + this.asts.pop(); + } + return head; + } + + public push(ast: TypeScript.AST): void { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + while (this.asts.length > this.count()) { + this.asts.pop(); + } + this.top = this.asts.length; + this.asts.push(ast); + } + + public up(): void { + if (this.top <= -1) + throw new Error("Invalid call to 'up'"); + this.top--; + } + + public down(): void { + if (this.top == this.ast.length - 1) + throw new Error("Invalid call to 'down'"); + this.top++; + } + + public nodeType(): TypeScript.NodeType { + ~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'NodeType'. + if (this.ast() == null) + return TypeScript.NodeType.None; + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + return this.ast().nodeType; + } + + public ast(): TypeScript.AST { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + return AstPath.reverseIndexOf(this.asts, this.asts.length - (this.top + 1)); + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + } + + public parent(): TypeScript.AST { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + return AstPath.reverseIndexOf(this.asts, this.asts.length - this.top); + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + } + + public count(): number { + return this.top + 1; + } + + public get(index: number): TypeScript.AST { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + return this.asts[index]; + } + + public isNameOfClass(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.parent().nodeType === TypeScript.NodeType.ClassDeclaration) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + ((this.parent()).name === this.ast()); + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. + } + + public isNameOfInterface(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.parent().nodeType === TypeScript.NodeType.InterfaceDeclaration) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + ((this.parent()).name === this.ast()); + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. + } + + public isNameOfArgument(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.parent().nodeType === TypeScript.NodeType.ArgDecl) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + ((this.parent()).id === this.ast()); + ~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ArgDecl'. + } + + public isNameOfVariable(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.parent().nodeType === TypeScript.NodeType.VarDecl) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + ((this.parent()).id === this.ast()); + ~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'VarDecl'. + } + + public isNameOfModule(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.parent().nodeType === TypeScript.NodeType.ModuleDeclaration) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + ((this.parent()).name === this.ast()); + ~~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. + } + + public isNameOfFunction(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.parent().nodeType === TypeScript.NodeType.FuncDecl) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + ((this.parent()).name === this.ast()); + ~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. + } + + public isChildOfScript(): boolean { + var ast = lastOf(this.asts); + return this.count() >= 3 && + this.asts[this.top] === ast && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 2].nodeType === TypeScript.NodeType.Script; + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + } + + public isChildOfModule(): boolean { + var ast = lastOf(this.asts); + return this.count() >= 3 && + this.asts[this.top] === ast && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 2].nodeType === TypeScript.NodeType.ModuleDeclaration; + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + } + + public isChildOfClass(): boolean { + var ast = lastOf(this.asts); + return this.count() >= 3 && + this.asts[this.top] === ast && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 2].nodeType === TypeScript.NodeType.ClassDeclaration; + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + } + + public isArgumentOfClassConstructor(): boolean { + var ast = lastOf(this.asts); + return this.count() >= 5 && + this.asts[this.top] === ast && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 3].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 4].nodeType === TypeScript.NodeType.ClassDeclaration && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + ((this.asts[this.top - 2]).isConstructor) && + ~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. + ((this.asts[this.top - 2]).arguments === this.asts[this.top - 1]) && + ~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. + ((this.asts[this.top - 4]).constructorDecl === this.asts[this.top - 2]); + ~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ClassDeclaration'. + } + + public isChildOfInterface(): boolean { + var ast = lastOf(this.asts); + return this.count() >= 3 && + this.asts[this.top] === ast && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 2].nodeType === TypeScript.NodeType.InterfaceDeclaration; + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + } + + public isTopLevelImplicitModule(): any { + return this.count() >= 1 && + this.asts[this.top].nodeType === TypeScript.NodeType.ModuleDeclaration && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + TypeScript.hasFlag((this.asts[this.top]).modFlags, TypeScript.ModuleFlags.IsWholeFile); + ~~~~~~~ +!!! error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'. + ~~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. + ~~~~~~~~~~~ +!!! error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'. + } + + public isBodyOfTopLevelImplicitModule(): any { + return this.count() >= 2 && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).members == this.asts[this.top - 0] && + ~~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. + TypeScript.hasFlag((this.asts[this.top - 1]).modFlags, TypeScript.ModuleFlags.IsWholeFile); + ~~~~~~~ +!!! error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'. + ~~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. + ~~~~~~~~~~~ +!!! error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'. + } + + public isBodyOfScript(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Script && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).bod == this.asts[this.top - 0]; + ~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'Script'. + } + + public isBodyOfSwitch(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Switch && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).caseList == this.asts[this.top - 0]; + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. + } + + public isBodyOfModule(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).members == this.asts[this.top - 0]; + ~~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. + } + + public isBodyOfClass(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ClassDeclaration && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).members == this.asts[this.top - 0]; + ~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ClassDeclaration'. + } + + public isBodyOfFunction(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).bod == this.asts[this.top - 0]; + ~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. + } + + public isBodyOfInterface(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.InterfaceDeclaration && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).members == this.asts[this.top - 0]; + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. + } + + public isBodyOfBlock(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Block && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).statements == this.asts[this.top - 0]; + ~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'Block'. + } + + public isBodyOfFor(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.For && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + ~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ForStatement'. + } + + public isBodyOfCase(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Case && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + ~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'CaseStatement'. + } + + public isBodyOfTry(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Try && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'Try'. + } + + public isBodyOfCatch(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Catch && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + ~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'Catch'. + } + + public isBodyOfDoWhile(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.DoWhile && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + ~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'DoWhileStatement'. + } + + public isBodyOfWhile(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.While && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + ~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'WhileStatement'. + } + + public isBodyOfForIn(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ForIn && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + ~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ForInStatement'. + } + + public isBodyOfWith(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.With && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + ~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'WithStatement'. + } + + public isBodyOfFinally(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Finally && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + ~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'Finally'. + } + + public isCaseOfSwitch(): boolean { + return this.count() >= 3 && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 2]).caseList == this.asts[this.top - 1]; + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. + } + + public isDefaultCaseOfSwitch(): boolean { + return this.count() >= 3 && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 2]).caseList == this.asts[this.top - 1] && + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. + (this.asts[this.top - 2]).defaultCase == this.asts[this.top - 0]; + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. + } + + public isListOfObjectLit(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).operand == this.asts[this.top - 0]; + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. + } + + public isBodyOfObjectLit(): boolean { + return this.isListOfObjectLit(); + } + + public isEmptyListOfObjectLit(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).operand == this.asts[this.top - 0] && + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. + (this.asts[this.top - 0]).members.length == 0; + ~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ASTList'. + } + + public isMemberOfObjectLit(): boolean { + return this.count() >= 3 && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.ObjectLit && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 0].nodeType === TypeScript.NodeType.Member && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 2]).operand == this.asts[this.top - 1]; + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. + } + + public isNameOfMemberOfObjectLit(): boolean { + return this.count() >= 4 && + this.asts[this.top - 3].nodeType === TypeScript.NodeType.ObjectLit && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 2].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 0].nodeType === TypeScript.NodeType.Name && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 3]).operand == this.asts[this.top - 2]; + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. + } + + public isListOfArrayLit(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ArrayLit && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).operand == this.asts[this.top - 0]; + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. + } + + public isTargetOfMember(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).operand1 === this.asts[this.top - 0]; + ~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'BinaryExpression'. + } + + public isMemberOfMember(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).operand2 === this.asts[this.top - 0]; + ~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'BinaryExpression'. + } + + public isItemOfList(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List; + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + //(this.asts[this.top - 1]).operand2 === this.asts[this.top - 0]; + } + + public isThenOfIf(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).thenBod == this.asts[this.top - 0]; + ~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'IfStatement'. + } + + public isElseOfIf(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).elseBod == this.asts[this.top - 0]; + ~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'IfStatement'. + } + + public isBodyOfDefaultCase(): boolean { + return this.isBodyOfCase(); + } + + public isSingleStatementList(): boolean { + return this.count() >= 1 && + this.asts[this.top].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top]).members.length === 1; + ~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ASTList'. + } + + public isArgumentListOfFunction(): boolean { + return this.count() >= 2 && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; + ~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. + } + + public isArgumentOfFunction(): boolean { + return this.count() >= 3 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 2]).arguments === this.asts[this.top - 1]; + ~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. + } + + public isArgumentListOfCall(): boolean { + return this.count() >= 2 && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Call && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; + ~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'. + } + + public isArgumentListOfNew(): boolean { + return this.count() >= 2 && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 1].nodeType === TypeScript.NodeType.New && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; + ~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'. + } + + public isSynthesizedBlock(): boolean { + return this.count() >= 1 && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.Block && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 0]).isStatementBlock === false; + ~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'Block'. + } + } + + export function isValidAstNode(ast: TypeScript.ASTSpan): boolean { + ~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ASTSpan'. + if (ast === null) + return false; + + if (ast.minChar === -1 || ast.limChar === -1) + return false; + + return true; + } + + export class AstPathContext { + public path: AstPath = new TypeScript.AstPath(); + } + + export enum GetAstPathOptions { + Default = 0, + EdgeInclusive = 1, + //We need this options dealing with an AST coming from an incomplete AST. For example: + // class foo { // r + // If we ask for the AST at the position after the "r" character, we won't see we are + // inside a comment, because the "class" AST node has a limChar corresponding to the position of + // the "{" character, meaning we don't traverse the tree down to the stmt list of the class, meaning + // we don't find the "precomment" attached to the errorneous empty stmt. + //TODO: It would be nice to be able to get rid of this. + DontPruneSearchBasedOnPosition = 1 << 1, + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + /// + /// Return the stack of AST nodes containing "position" + /// + export function getAstPathToPosition(script: TypeScript.AST, pos: number, options: GetAstPathOptions = GetAstPathOptions.Default): TypeScript.AstPath { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + var lookInComments = (comments: TypeScript.Comment[]) => { + ~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'Comment'. + if (comments && comments.length > 0) { + for (var i = 0; i < comments.length; i++) { + var minChar = comments[i].minChar; + var limChar = comments[i].limChar; + if (!comments[i].isBlockComment) { + limChar++; // For single line comments, include 1 more character (for the newline) + } + if (pos >= minChar && pos < limChar) { + ctx.path.push(comments[i]); + } + } + } + } + + var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: IAstWalker) { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + ~~~~~~~~~~ +!!! error TS2304: Cannot find name 'IAstWalker'. + if (isValidAstNode(cur)) { + + // Add "cur" to the stack if it contains our position + // For "identifier" nodes, we need a special case: A position equal to "limChar" is + // valid, since the position corresponds to a caret position (in between characters) + // For example: + // bar + // 0123 + // If "position == 3", the caret is at the "right" of the "r" character, which should be considered valid + var inclusive = + hasFlag(options, GetAstPathOptions.EdgeInclusive) || + ~~~~~~~ +!!! error TS2304: Cannot find name 'hasFlag'. + cur.nodeType === TypeScript.NodeType.Name || + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + pos === script.limChar; // Special "EOF" case + + var minChar = cur.minChar; + var limChar = cur.limChar + (inclusive ? 1 : 0) + if (pos >= minChar && pos < limChar) { + + // TODO: Since AST is sometimes not correct wrt to position, only add "cur" if it's better + // than top of the stack. + var previous = ctx.path.ast(); + if (previous == null || (cur.minChar >= previous.minChar && cur.limChar <= previous.limChar)) { + ctx.path.push(cur); + } + else { + //logger.log("TODO: Ignoring node because minChar, limChar not better than previous node in stack"); + } + } + + // The AST walker skips comments, but we might be in one, so check the pre/post comments for this node manually + if (pos < limChar) { + lookInComments(cur.preComments); + } + if (pos >= minChar) { + lookInComments(cur.postComments); + } + + if (!hasFlag(options, GetAstPathOptions.DontPruneSearchBasedOnPosition)) { + ~~~~~~~ +!!! error TS2304: Cannot find name 'hasFlag'. + // Don't go further down the tree if pos is outside of [minChar, limChar] + walker.options.goChildren = (minChar <= pos && pos <= limChar); + } + } + return cur; + } + + var ctx = new AstPathContext(); + TypeScript.getAstWalkerFactory().walk(script, pre, null, null, ctx); + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. + return ctx.path; + } + + // + // Find a source text offset that is safe for lexing tokens at the given position. + // This is used when "position" might be inside a comment or string, etc. + // + export function getTokenizationOffset(script: TypeScript.Script, position: number): number { + ~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'Script'. + var bestOffset = 0; + var pre = (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker): TypeScript.AST => { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + ~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + if (TypeScript.isValidAstNode(cur)) { + // Did we find a closer offset? + if (cur.minChar <= position) { + bestOffset = max(bestOffset, cur.minChar); + } + + // Stop the walk if this node is not related to "minChar" + if (cur.minChar > position || cur.limChar < bestOffset) { + walker.options.goChildren = false; + } + } + + return cur; + } + + TypeScript.getAstWalkerFactory().walk(script, pre); + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. + return bestOffset; + } + + /// + /// Simple function to Walk an AST using a simple callback function. + /// + export function walkAST(ast: TypeScript.AST, callback: (path: AstPath, walker: TypeScript.IAstWalker) => void ): void { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + ~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. + var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + ~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. + var path: TypeScript.AstPath = walker.state; + path.push(cur); + callback(path, walker); + return cur; + } + var post = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + ~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. + var path: TypeScript.AstPath = walker.state; + path.pop(); + return cur; + } + + var path = new AstPath(); + TypeScript.getAstWalkerFactory().walk(ast, pre, post, null, path); + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource2.d.ts new file mode 100644 index 0000000000000..cd8cc6ac6d127 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource2.d.ts @@ -0,0 +1,1217 @@ +//// [tests/cases/conformance/parser/ecmascript5/parserRealSource2.ts] //// + +//// [parserRealSource2.ts] +// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. +// See LICENSE.txt in the project root for complete license information. + +/// + +module TypeScript { + + export function hasFlag(val: number, flag: number): boolean { + return (val & flag) != 0; + } + + export enum ErrorRecoverySet { + None = 0, + Comma = 1, // Comma + SColon = 1 << 1, // SColon + Asg = 1 << 2, // Asg + BinOp = 1 << 3, // Lsh, Rsh, Rs2, Le, Ge, INSTANCEOF, EQ, NE, Eqv, NEqv, LogAnd, LogOr, AsgMul, AsgDiv + // AsgMod, AsgAdd, AsgSub, AsgLsh, AsgRsh, AsgRs2, AsgAnd, AsgXor, AsgOr, QMark, Mult, Div, + // Pct, GT, LT, And, Xor, Or + RBrack = 1 << 4, // RBrack + RCurly = 1 << 5, // RCurly + RParen = 1 << 6, // RParen + Dot = 1 << 7, // Dot + Colon = 1 << 8, // Colon + PrimType = 1 << 9, // number, string, boolean + AddOp = 1 << 10, // Add, Sub + LCurly = 1 << 11, // LCurly + PreOp = 1 << 12, // Tilde, Bang, Inc, Dec + RegExp = 1 << 13, // RegExp + LParen = 1 << 14, // LParen + LBrack = 1 << 15, // LBrack + Scope = 1 << 16, // Scope + In = 1 << 17, // IN + SCase = 1 << 18, // CASE, DEFAULT + Else = 1 << 19, // ELSE + Catch = 1 << 20, // CATCH, FINALLY + Var = 1 << 21, // + Stmt = 1 << 22, // BREAK, RETURN, THROW, DEBUGGER, FOR, SWITCH, DO, IF, TRY, WITH + While = 1 << 23, // WHILE + ID = 1 << 24, // ID + Prefix = 1 << 25, // VOID, DELETE, TYPEOF, AWAIT + Literal = 1 << 26, // IntCon, FltCon, StrCon + RLit = 1 << 27, // THIS, TRUE, FALSE, NULL + Func = 1 << 28, // FUNCTION + EOF = 1 << 29, // EOF + + // REVIEW: Name this something clearer. + TypeScriptS = 1 << 30, // PROPERTY, PRIVATE, STATIC, INTERFACE, CLASS, MODULE, EXPORT, IMPORT + ExprStart = SColon | AddOp | LCurly | PreOp | RegExp | LParen | LBrack | ID | Prefix | RLit | Func | Literal, + StmtStart = ExprStart | SColon | Var | Stmt | While | TypeScriptS, + Postfix = Dot | LParen | LBrack, + } + + export enum AllowedElements { + None = 0, + ModuleDeclarations = 1 << 2, + ClassDeclarations = 1 << 3, + InterfaceDeclarations = 1 << 4, + AmbientDeclarations = 1 << 10, + Properties = 1 << 11, + + Global = ModuleDeclarations | ClassDeclarations | InterfaceDeclarations | AmbientDeclarations, + QuickParse = Global | Properties, + } + + export enum Modifiers { + None = 0, + Private = 1, + Public = 1 << 1, + Readonly = 1 << 2, + Ambient = 1 << 3, + Exported = 1 << 4, + Getter = 1 << 5, + Setter = 1 << 6, + Static = 1 << 7, + } + + export enum ASTFlags { + None = 0, + ExplicitSemicolon = 1, // statment terminated by an explicit semicolon + AutomaticSemicolon = 1 << 1, // statment terminated by an automatic semicolon + Writeable = 1 << 2, // node is lhs that can be modified + Error = 1 << 3, // node has an error + DotLHSPartial = 1 << 4, // node is the lhs of an incomplete dot expr at cursor + DotLHS = 1 << 5, // node is the lhs of a dot expr + IsStatement = 1 << 6, // node is a statement + StrictMode = 1 << 7, // node is in the strict mode environment + PossibleOptionalParameter = 1 << 8, + ClassBaseConstructorCall = 1 << 9, + OptionalName = 1 << 10, + // REVIEW: This flag is to mark lambda nodes to note that the LParen of an expression has already been matched in the lambda header. + // The flag is used to communicate this piece of information to the calling parseTerm, which intern will remove it. + // Once we have a better way to associate information with nodes, this flag should not be used. + SkipNextRParen = 1 << 11, + } + + export enum DeclFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + Public = 1 << 2, + Ambient = 1 << 3, + Static = 1 << 4, + LocalStatic = 1 << 5, + GetAccessor = 1 << 6, + SetAccessor = 1 << 7, + } + + export enum ModuleFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + Public = 1 << 2, + Ambient = 1 << 3, + Static = 1 << 4, + LocalStatic = 1 << 5, + GetAccessor = 1 << 6, + SetAccessor = 1 << 7, + IsEnum = 1 << 8, + ShouldEmitModuleDecl = 1 << 9, + IsWholeFile = 1 << 10, + IsDynamic = 1 << 11, + MustCaptureThis = 1 << 12, + } + + export enum SymbolFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + Public = 1 << 2, + Ambient = 1 << 3, + Static = 1 << 4, + LocalStatic = 1 << 5, + GetAccessor = 1 << 6, + SetAccessor = 1 << 7, + Property = 1 << 8, + Readonly = 1 << 9, + ModuleMember = 1 << 10, + InterfaceMember = 1 << 11, + ClassMember = 1 << 12, + BuiltIn = 1 << 13, + TypeSetDuringScopeAssignment = 1 << 14, + Constant = 1 << 15, + Optional = 1 << 16, + RecursivelyReferenced = 1 << 17, + Bound = 1 << 18, + CompilerGenerated = 1 << 19, + } + + export enum VarFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + Public = 1 << 2, + Ambient = 1 << 3, + Static = 1 << 4, + LocalStatic = 1 << 5, + GetAccessor = 1 << 6, + SetAccessor = 1 << 7, + AutoInit = 1 << 8, + Property = 1 << 9, + Readonly = 1 << 10, + Class = 1 << 11, + ClassProperty = 1 << 12, + ClassBodyProperty = 1 << 13, + ClassConstructorProperty = 1 << 14, + ClassSuperMustBeFirstCallInConstructor = 1 << 15, + Constant = 1 << 16, + MustCaptureThis = 1 << 17, + } + + export enum FncFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + Public = 1 << 2, + Ambient = 1 << 3, + Static = 1 << 4, + LocalStatic = 1 << 5, + GetAccessor = 1 << 6, + SetAccessor = 1 << 7, + Definition = 1 << 8, + Signature = 1 << 9, + Method = 1 << 10, + HasReturnExpression = 1 << 11, + CallMember = 1 << 12, + ConstructMember = 1 << 13, + HasSelfReference = 1 << 14, + IsFatArrowFunction = 1 << 15, + IndexerMember = 1 << 16, + IsFunctionExpression = 1 << 17, + ClassMethod = 1 << 18, + ClassPropertyMethodExported = 1 << 19, + } + + export enum SignatureFlags { + None = 0, + IsIndexer = 1, + IsStringIndexer = 1 << 1, + IsNumberIndexer = 1 << 2, + } + + export function ToDeclFlags(fncFlags: FncFlags) : DeclFlags; + export function ToDeclFlags(varFlags: VarFlags) : DeclFlags; + export function ToDeclFlags(symFlags: SymbolFlags): DeclFlags; + export function ToDeclFlags(moduleFlags: ModuleFlags): DeclFlags; + export function ToDeclFlags(fncOrVarOrSymbolOrModuleFlags: any) { + return fncOrVarOrSymbolOrModuleFlags; + } + + export enum TypeFlags { + None = 0, + HasImplementation = 1, + HasSelfReference = 1 << 1, + MergeResult = 1 << 2, + IsEnum = 1 << 3, + BuildingName = 1 << 4, + HasBaseType = 1 << 5, + HasBaseTypeOfObject = 1 << 6, + IsClass = 1 << 7, + } + + export enum TypeRelationshipFlags { + SuccessfulComparison = 0, + SourceIsNullTargetIsVoidOrUndefined = 1, + RequiredPropertyIsMissing = 1 << 1, + IncompatibleSignatures = 1 << 2, + SourceSignatureHasTooManyParameters = 3, + IncompatibleReturnTypes = 1 << 4, + IncompatiblePropertyTypes = 1 << 5, + IncompatibleParameterTypes = 1 << 6, + } + + export enum CodeGenTarget { + ES3 = 0, + ES5 = 1, + } + + export enum ModuleGenTarget { + Synchronous = 0, + Asynchronous = 1, + Local = 1 << 1, + } + + // Compiler defaults to generating ES5-compliant code for + // - getters and setters + export var codeGenTarget: CodeGenTarget = CodeGenTarget.ES3; + + export var moduleGenTarget: ModuleGenTarget = ModuleGenTarget.Synchronous; + + export var optimizeModuleCodeGen = true; + + export function flagsToString(e: any, flags: number): string { + var builder = ""; + for (var i = 1; i < (1 << 31) ; i = i << 1) { + if ((flags & i) != 0) { + for (var k in e) { + if (e[k] == i) { + if (builder.length > 0) { + builder += "|"; + } + builder += k; + break; + } + } + } + } + return builder; + } + +} + +/// [Declarations] //// + + + +//// [/.src/parserRealSource2.d.ts] +declare namespace TypeScript { + function hasFlag(val: number, flag: number): boolean; + enum ErrorRecoverySet { + None = 0, + Comma = 1,// Comma + SColon = 2,// SColon + Asg = 4,// Asg + BinOp = 8,// Lsh, Rsh, Rs2, Le, Ge, INSTANCEOF, EQ, NE, Eqv, NEqv, LogAnd, LogOr, AsgMul, AsgDiv + RBrack = 16,// RBrack + RCurly = 32,// RCurly + RParen = 64,// RParen + Dot = 128,// Dot + Colon = 256,// Colon + PrimType = 512,// number, string, boolean + AddOp = 1024,// Add, Sub + LCurly = 2048,// LCurly + PreOp = 4096,// Tilde, Bang, Inc, Dec + RegExp = 8192,// RegExp + LParen = 16384,// LParen + LBrack = 32768,// LBrack + Scope = 65536,// Scope + In = 131072,// IN + SCase = 262144,// CASE, DEFAULT + Else = 524288,// ELSE + Catch = 1048576,// CATCH, FINALLY + Var = 2097152,// + Stmt = 4194304,// BREAK, RETURN, THROW, DEBUGGER, FOR, SWITCH, DO, IF, TRY, WITH + While = 8388608,// WHILE + ID = 16777216,// ID + Prefix = 33554432,// VOID, DELETE, TYPEOF, AWAIT + Literal = 67108864,// IntCon, FltCon, StrCon + RLit = 134217728,// THIS, TRUE, FALSE, NULL + Func = 268435456,// FUNCTION + EOF = 536870912,// EOF + TypeScriptS = 1073741824,// PROPERTY, PRIVATE, STATIC, INTERFACE, CLASS, MODULE, EXPORT, IMPORT + ExprStart = 520158210, + StmtStart = 1608580098, + Postfix = 49280 + } + enum AllowedElements { + None = 0, + ModuleDeclarations = 4, + ClassDeclarations = 8, + InterfaceDeclarations = 16, + AmbientDeclarations = 1024, + Properties = 2048, + Global = 1052, + QuickParse = 3100 + } + enum Modifiers { + None = 0, + Private = 1, + Public = 2, + Readonly = 4, + Ambient = 8, + Exported = 16, + Getter = 32, + Setter = 64, + Static = 128 + } + enum ASTFlags { + None = 0, + ExplicitSemicolon = 1,// statment terminated by an explicit semicolon + AutomaticSemicolon = 2,// statment terminated by an automatic semicolon + Writeable = 4,// node is lhs that can be modified + Error = 8,// node has an error + DotLHSPartial = 16,// node is the lhs of an incomplete dot expr at cursor + DotLHS = 32,// node is the lhs of a dot expr + IsStatement = 64,// node is a statement + StrictMode = 128,// node is in the strict mode environment + PossibleOptionalParameter = 256, + ClassBaseConstructorCall = 512, + OptionalName = 1024, + SkipNextRParen = 2048 + } + enum DeclFlags { + None = 0, + Exported = 1, + Private = 2, + Public = 4, + Ambient = 8, + Static = 16, + LocalStatic = 32, + GetAccessor = 64, + SetAccessor = 128 + } + enum ModuleFlags { + None = 0, + Exported = 1, + Private = 2, + Public = 4, + Ambient = 8, + Static = 16, + LocalStatic = 32, + GetAccessor = 64, + SetAccessor = 128, + IsEnum = 256, + ShouldEmitModuleDecl = 512, + IsWholeFile = 1024, + IsDynamic = 2048, + MustCaptureThis = 4096 + } + enum SymbolFlags { + None = 0, + Exported = 1, + Private = 2, + Public = 4, + Ambient = 8, + Static = 16, + LocalStatic = 32, + GetAccessor = 64, + SetAccessor = 128, + Property = 256, + Readonly = 512, + ModuleMember = 1024, + InterfaceMember = 2048, + ClassMember = 4096, + BuiltIn = 8192, + TypeSetDuringScopeAssignment = 16384, + Constant = 32768, + Optional = 65536, + RecursivelyReferenced = 131072, + Bound = 262144, + CompilerGenerated = 524288 + } + enum VarFlags { + None = 0, + Exported = 1, + Private = 2, + Public = 4, + Ambient = 8, + Static = 16, + LocalStatic = 32, + GetAccessor = 64, + SetAccessor = 128, + AutoInit = 256, + Property = 512, + Readonly = 1024, + Class = 2048, + ClassProperty = 4096, + ClassBodyProperty = 8192, + ClassConstructorProperty = 16384, + ClassSuperMustBeFirstCallInConstructor = 32768, + Constant = 65536, + MustCaptureThis = 131072 + } + enum FncFlags { + None = 0, + Exported = 1, + Private = 2, + Public = 4, + Ambient = 8, + Static = 16, + LocalStatic = 32, + GetAccessor = 64, + SetAccessor = 128, + Definition = 256, + Signature = 512, + Method = 1024, + HasReturnExpression = 2048, + CallMember = 4096, + ConstructMember = 8192, + HasSelfReference = 16384, + IsFatArrowFunction = 32768, + IndexerMember = 65536, + IsFunctionExpression = 131072, + ClassMethod = 262144, + ClassPropertyMethodExported = 524288 + } + enum SignatureFlags { + None = 0, + IsIndexer = 1, + IsStringIndexer = 2, + IsNumberIndexer = 4 + } + function ToDeclFlags(fncFlags: FncFlags): DeclFlags; + function ToDeclFlags(varFlags: VarFlags): DeclFlags; + function ToDeclFlags(symFlags: SymbolFlags): DeclFlags; + function ToDeclFlags(moduleFlags: ModuleFlags): DeclFlags; + enum TypeFlags { + None = 0, + HasImplementation = 1, + HasSelfReference = 2, + MergeResult = 4, + IsEnum = 8, + BuildingName = 16, + HasBaseType = 32, + HasBaseTypeOfObject = 64, + IsClass = 128 + } + enum TypeRelationshipFlags { + SuccessfulComparison = 0, + SourceIsNullTargetIsVoidOrUndefined = 1, + RequiredPropertyIsMissing = 2, + IncompatibleSignatures = 4, + SourceSignatureHasTooManyParameters = 3, + IncompatibleReturnTypes = 16, + IncompatiblePropertyTypes = 32, + IncompatibleParameterTypes = 64 + } + enum CodeGenTarget { + ES3 = 0, + ES5 = 1 + } + enum ModuleGenTarget { + Synchronous = 0, + Asynchronous = 1, + Local = 2 + } + var codeGenTarget: CodeGenTarget; + var moduleGenTarget: ModuleGenTarget; + var optimizeModuleCodeGen: boolean; + function flagsToString(e: any, flags: number): string; +} +/// [Errors] //// + +parserRealSource2.ts(4,21): error TS6053: File 'typescript.ts' not found. +parserRealSource2.ts(4,21): error TS9010: Reference directives are not supported in isolated declaration mode. +parserRealSource2.ts(15,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(16,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(17,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(20,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(21,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(22,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(23,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(24,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(25,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(26,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(27,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(28,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(29,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(30,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(31,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(32,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(33,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(34,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(35,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(36,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(37,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(38,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(39,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(40,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(41,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(42,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(43,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(44,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(45,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(48,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(49,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(50,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(51,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(56,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(57,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(58,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(59,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(60,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(62,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(63,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(69,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(70,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(71,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(72,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(73,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(74,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(75,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(81,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(82,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(83,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(84,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(85,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(86,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(87,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(88,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(89,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(90,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(94,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(100,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(101,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(102,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(103,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(104,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(105,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(106,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(112,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(113,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(114,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(115,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(116,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(117,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(118,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(119,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(120,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(121,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(122,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(123,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(129,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(130,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(131,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(132,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(133,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(134,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(135,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(136,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(137,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(138,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(139,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(140,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(141,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(142,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(143,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(144,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(145,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(146,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(147,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(153,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(154,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(155,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(156,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(157,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(158,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(159,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(160,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(161,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(162,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(163,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(164,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(165,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(166,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(167,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(168,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(169,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(175,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(176,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(177,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(178,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(179,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(180,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(181,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(182,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(183,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(184,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(185,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(186,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(187,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(188,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(189,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(190,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(191,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(192,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(193,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(199,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(200,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(214,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(215,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(216,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(217,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(218,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(219,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(220,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(226,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(227,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(229,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(230,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(231,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource2.ts(242,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== parserRealSource2.ts (149 errors) ==== + // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. + // See LICENSE.txt in the project root for complete license information. + + /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. + ~~~~~~~~~~~~~ +!!! error TS9010: Reference directives are not supported in isolated declaration mode. + + module TypeScript { + + export function hasFlag(val: number, flag: number): boolean { + return (val & flag) != 0; + } + + export enum ErrorRecoverySet { + None = 0, + Comma = 1, // Comma + SColon = 1 << 1, // SColon + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Asg = 1 << 2, // Asg + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + BinOp = 1 << 3, // Lsh, Rsh, Rs2, Le, Ge, INSTANCEOF, EQ, NE, Eqv, NEqv, LogAnd, LogOr, AsgMul, AsgDiv + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + // AsgMod, AsgAdd, AsgSub, AsgLsh, AsgRsh, AsgRs2, AsgAnd, AsgXor, AsgOr, QMark, Mult, Div, + // Pct, GT, LT, And, Xor, Or + RBrack = 1 << 4, // RBrack + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + RCurly = 1 << 5, // RCurly + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + RParen = 1 << 6, // RParen + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Dot = 1 << 7, // Dot + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Colon = 1 << 8, // Colon + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + PrimType = 1 << 9, // number, string, boolean + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + AddOp = 1 << 10, // Add, Sub + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + LCurly = 1 << 11, // LCurly + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + PreOp = 1 << 12, // Tilde, Bang, Inc, Dec + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + RegExp = 1 << 13, // RegExp + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + LParen = 1 << 14, // LParen + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + LBrack = 1 << 15, // LBrack + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Scope = 1 << 16, // Scope + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + In = 1 << 17, // IN + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + SCase = 1 << 18, // CASE, DEFAULT + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Else = 1 << 19, // ELSE + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Catch = 1 << 20, // CATCH, FINALLY + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Var = 1 << 21, // + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Stmt = 1 << 22, // BREAK, RETURN, THROW, DEBUGGER, FOR, SWITCH, DO, IF, TRY, WITH + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + While = 1 << 23, // WHILE + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ID = 1 << 24, // ID + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Prefix = 1 << 25, // VOID, DELETE, TYPEOF, AWAIT + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Literal = 1 << 26, // IntCon, FltCon, StrCon + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + RLit = 1 << 27, // THIS, TRUE, FALSE, NULL + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Func = 1 << 28, // FUNCTION + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + EOF = 1 << 29, // EOF + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // REVIEW: Name this something clearer. + TypeScriptS = 1 << 30, // PROPERTY, PRIVATE, STATIC, INTERFACE, CLASS, MODULE, EXPORT, IMPORT + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ExprStart = SColon | AddOp | LCurly | PreOp | RegExp | LParen | LBrack | ID | Prefix | RLit | Func | Literal, + ~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + StmtStart = ExprStart | SColon | Var | Stmt | While | TypeScriptS, + ~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Postfix = Dot | LParen | LBrack, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum AllowedElements { + None = 0, + ModuleDeclarations = 1 << 2, + ~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ClassDeclarations = 1 << 3, + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + InterfaceDeclarations = 1 << 4, + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + AmbientDeclarations = 1 << 10, + ~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Properties = 1 << 11, + ~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + Global = ModuleDeclarations | ClassDeclarations | InterfaceDeclarations | AmbientDeclarations, + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + QuickParse = Global | Properties, + ~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum Modifiers { + None = 0, + Private = 1, + Public = 1 << 1, + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Readonly = 1 << 2, + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Ambient = 1 << 3, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Exported = 1 << 4, + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Getter = 1 << 5, + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Setter = 1 << 6, + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Static = 1 << 7, + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum ASTFlags { + None = 0, + ExplicitSemicolon = 1, // statment terminated by an explicit semicolon + AutomaticSemicolon = 1 << 1, // statment terminated by an automatic semicolon + ~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Writeable = 1 << 2, // node is lhs that can be modified + ~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Error = 1 << 3, // node has an error + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + DotLHSPartial = 1 << 4, // node is the lhs of an incomplete dot expr at cursor + ~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + DotLHS = 1 << 5, // node is the lhs of a dot expr + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IsStatement = 1 << 6, // node is a statement + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + StrictMode = 1 << 7, // node is in the strict mode environment + ~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + PossibleOptionalParameter = 1 << 8, + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ClassBaseConstructorCall = 1 << 9, + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + OptionalName = 1 << 10, + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + // REVIEW: This flag is to mark lambda nodes to note that the LParen of an expression has already been matched in the lambda header. + // The flag is used to communicate this piece of information to the calling parseTerm, which intern will remove it. + // Once we have a better way to associate information with nodes, this flag should not be used. + SkipNextRParen = 1 << 11, + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum DeclFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Public = 1 << 2, + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Ambient = 1 << 3, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Static = 1 << 4, + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + LocalStatic = 1 << 5, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + GetAccessor = 1 << 6, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + SetAccessor = 1 << 7, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum ModuleFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Public = 1 << 2, + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Ambient = 1 << 3, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Static = 1 << 4, + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + LocalStatic = 1 << 5, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + GetAccessor = 1 << 6, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + SetAccessor = 1 << 7, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IsEnum = 1 << 8, + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ShouldEmitModuleDecl = 1 << 9, + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IsWholeFile = 1 << 10, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IsDynamic = 1 << 11, + ~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + MustCaptureThis = 1 << 12, + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum SymbolFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Public = 1 << 2, + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Ambient = 1 << 3, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Static = 1 << 4, + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + LocalStatic = 1 << 5, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + GetAccessor = 1 << 6, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + SetAccessor = 1 << 7, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Property = 1 << 8, + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Readonly = 1 << 9, + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ModuleMember = 1 << 10, + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + InterfaceMember = 1 << 11, + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ClassMember = 1 << 12, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + BuiltIn = 1 << 13, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + TypeSetDuringScopeAssignment = 1 << 14, + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Constant = 1 << 15, + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Optional = 1 << 16, + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + RecursivelyReferenced = 1 << 17, + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Bound = 1 << 18, + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + CompilerGenerated = 1 << 19, + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum VarFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Public = 1 << 2, + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Ambient = 1 << 3, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Static = 1 << 4, + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + LocalStatic = 1 << 5, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + GetAccessor = 1 << 6, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + SetAccessor = 1 << 7, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + AutoInit = 1 << 8, + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Property = 1 << 9, + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Readonly = 1 << 10, + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Class = 1 << 11, + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ClassProperty = 1 << 12, + ~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ClassBodyProperty = 1 << 13, + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ClassConstructorProperty = 1 << 14, + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ClassSuperMustBeFirstCallInConstructor = 1 << 15, + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Constant = 1 << 16, + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + MustCaptureThis = 1 << 17, + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum FncFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Public = 1 << 2, + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Ambient = 1 << 3, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Static = 1 << 4, + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + LocalStatic = 1 << 5, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + GetAccessor = 1 << 6, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + SetAccessor = 1 << 7, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Definition = 1 << 8, + ~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Signature = 1 << 9, + ~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + Method = 1 << 10, + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + HasReturnExpression = 1 << 11, + ~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + CallMember = 1 << 12, + ~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ConstructMember = 1 << 13, + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + HasSelfReference = 1 << 14, + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IsFatArrowFunction = 1 << 15, + ~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IndexerMember = 1 << 16, + ~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IsFunctionExpression = 1 << 17, + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ClassMethod = 1 << 18, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ClassPropertyMethodExported = 1 << 19, + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum SignatureFlags { + None = 0, + IsIndexer = 1, + IsStringIndexer = 1 << 1, + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IsNumberIndexer = 1 << 2, + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export function ToDeclFlags(fncFlags: FncFlags) : DeclFlags; + export function ToDeclFlags(varFlags: VarFlags) : DeclFlags; + export function ToDeclFlags(symFlags: SymbolFlags): DeclFlags; + export function ToDeclFlags(moduleFlags: ModuleFlags): DeclFlags; + export function ToDeclFlags(fncOrVarOrSymbolOrModuleFlags: any) { + return fncOrVarOrSymbolOrModuleFlags; + } + + export enum TypeFlags { + None = 0, + HasImplementation = 1, + HasSelfReference = 1 << 1, + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + MergeResult = 1 << 2, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IsEnum = 1 << 3, + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + BuildingName = 1 << 4, + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + HasBaseType = 1 << 5, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + HasBaseTypeOfObject = 1 << 6, + ~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IsClass = 1 << 7, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum TypeRelationshipFlags { + SuccessfulComparison = 0, + SourceIsNullTargetIsVoidOrUndefined = 1, + RequiredPropertyIsMissing = 1 << 1, + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IncompatibleSignatures = 1 << 2, + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + SourceSignatureHasTooManyParameters = 3, + IncompatibleReturnTypes = 1 << 4, + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IncompatiblePropertyTypes = 1 << 5, + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + IncompatibleParameterTypes = 1 << 6, + ~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + export enum CodeGenTarget { + ES3 = 0, + ES5 = 1, + } + + export enum ModuleGenTarget { + Synchronous = 0, + Asynchronous = 1, + Local = 1 << 1, + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Compiler defaults to generating ES5-compliant code for + // - getters and setters + export var codeGenTarget: CodeGenTarget = CodeGenTarget.ES3; + + export var moduleGenTarget: ModuleGenTarget = ModuleGenTarget.Synchronous; + + export var optimizeModuleCodeGen = true; + + export function flagsToString(e: any, flags: number): string { + var builder = ""; + for (var i = 1; i < (1 << 31) ; i = i << 1) { + if ((flags & i) != 0) { + for (var k in e) { + if (e[k] == i) { + if (builder.length > 0) { + builder += "|"; + } + builder += k; + break; + } + } + } + } + return builder; + } + + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource3.d.ts new file mode 100644 index 0000000000000..3c6ab4270491f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource3.d.ts @@ -0,0 +1,377 @@ +//// [tests/cases/conformance/parser/ecmascript5/parserRealSource3.ts] //// + +//// [parserRealSource3.ts] +// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. +// See LICENSE.txt in the project root for complete license information. + +/// + +module TypeScript { + // Note: Any addition to the NodeType should also be supported with addition to AstWalkerDetailCallback + export enum NodeType { + None, + Empty, + EmptyExpr, + True, + False, + This, + Super, + QString, + Regex, + Null, + ArrayLit, + ObjectLit, + Void, + Comma, + Pos, + Neg, + Delete, + Await, + In, + Dot, + From, + Is, + InstOf, + Typeof, + NumberLit, + Name, + TypeRef, + Index, + Call, + New, + Asg, + AsgAdd, + AsgSub, + AsgDiv, + AsgMul, + AsgMod, + AsgAnd, + AsgXor, + AsgOr, + AsgLsh, + AsgRsh, + AsgRs2, + ConditionalExpression, + LogOr, + LogAnd, + Or, + Xor, + And, + Eq, + Ne, + Eqv, + NEqv, + Lt, + Le, + Gt, + Ge, + Add, + Sub, + Mul, + Div, + Mod, + Lsh, + Rsh, + Rs2, + Not, + LogNot, + IncPre, + DecPre, + IncPost, + DecPost, + TypeAssertion, + FuncDecl, + Member, + VarDecl, + ArgDecl, + Return, + Break, + Continue, + Throw, + For, + ForIn, + If, + While, + DoWhile, + Block, + Case, + Switch, + Try, + TryCatch, + TryFinally, + Finally, + Catch, + List, + Script, + ClassDeclaration, + InterfaceDeclaration, + ModuleDeclaration, + ImportDeclaration, + With, + Label, + LabeledStatement, + EBStart, + GotoEB, + EndCode, + Error, + Comment, + Debugger, + GeneralNode = FuncDecl, + LastAsg = AsgRs2, + } +} + +/// [Declarations] //// + + + +//// [/.src/parserRealSource3.d.ts] +declare namespace TypeScript { + enum NodeType { + None = 0, + Empty = 1, + EmptyExpr = 2, + True = 3, + False = 4, + This = 5, + Super = 6, + QString = 7, + Regex = 8, + Null = 9, + ArrayLit = 10, + ObjectLit = 11, + Void = 12, + Comma = 13, + Pos = 14, + Neg = 15, + Delete = 16, + Await = 17, + In = 18, + Dot = 19, + From = 20, + Is = 21, + InstOf = 22, + Typeof = 23, + NumberLit = 24, + Name = 25, + TypeRef = 26, + Index = 27, + Call = 28, + New = 29, + Asg = 30, + AsgAdd = 31, + AsgSub = 32, + AsgDiv = 33, + AsgMul = 34, + AsgMod = 35, + AsgAnd = 36, + AsgXor = 37, + AsgOr = 38, + AsgLsh = 39, + AsgRsh = 40, + AsgRs2 = 41, + ConditionalExpression = 42, + LogOr = 43, + LogAnd = 44, + Or = 45, + Xor = 46, + And = 47, + Eq = 48, + Ne = 49, + Eqv = 50, + NEqv = 51, + Lt = 52, + Le = 53, + Gt = 54, + Ge = 55, + Add = 56, + Sub = 57, + Mul = 58, + Div = 59, + Mod = 60, + Lsh = 61, + Rsh = 62, + Rs2 = 63, + Not = 64, + LogNot = 65, + IncPre = 66, + DecPre = 67, + IncPost = 68, + DecPost = 69, + TypeAssertion = 70, + FuncDecl = 71, + Member = 72, + VarDecl = 73, + ArgDecl = 74, + Return = 75, + Break = 76, + Continue = 77, + Throw = 78, + For = 79, + ForIn = 80, + If = 81, + While = 82, + DoWhile = 83, + Block = 84, + Case = 85, + Switch = 86, + Try = 87, + TryCatch = 88, + TryFinally = 89, + Finally = 90, + Catch = 91, + List = 92, + Script = 93, + ClassDeclaration = 94, + InterfaceDeclaration = 95, + ModuleDeclaration = 96, + ImportDeclaration = 97, + With = 98, + Label = 99, + LabeledStatement = 100, + EBStart = 101, + GotoEB = 102, + EndCode = 103, + Error = 104, + Comment = 105, + Debugger = 106, + GeneralNode = 71, + LastAsg = 41 + } +} +/// [Errors] //// + +parserRealSource3.ts(4,21): error TS6053: File 'typescript.ts' not found. +parserRealSource3.ts(4,21): error TS9010: Reference directives are not supported in isolated declaration mode. +parserRealSource3.ts(116,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserRealSource3.ts(117,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== parserRealSource3.ts (4 errors) ==== + // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. + // See LICENSE.txt in the project root for complete license information. + + /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. + ~~~~~~~~~~~~~ +!!! error TS9010: Reference directives are not supported in isolated declaration mode. + + module TypeScript { + // Note: Any addition to the NodeType should also be supported with addition to AstWalkerDetailCallback + export enum NodeType { + None, + Empty, + EmptyExpr, + True, + False, + This, + Super, + QString, + Regex, + Null, + ArrayLit, + ObjectLit, + Void, + Comma, + Pos, + Neg, + Delete, + Await, + In, + Dot, + From, + Is, + InstOf, + Typeof, + NumberLit, + Name, + TypeRef, + Index, + Call, + New, + Asg, + AsgAdd, + AsgSub, + AsgDiv, + AsgMul, + AsgMod, + AsgAnd, + AsgXor, + AsgOr, + AsgLsh, + AsgRsh, + AsgRs2, + ConditionalExpression, + LogOr, + LogAnd, + Or, + Xor, + And, + Eq, + Ne, + Eqv, + NEqv, + Lt, + Le, + Gt, + Ge, + Add, + Sub, + Mul, + Div, + Mod, + Lsh, + Rsh, + Rs2, + Not, + LogNot, + IncPre, + DecPre, + IncPost, + DecPost, + TypeAssertion, + FuncDecl, + Member, + VarDecl, + ArgDecl, + Return, + Break, + Continue, + Throw, + For, + ForIn, + If, + While, + DoWhile, + Block, + Case, + Switch, + Try, + TryCatch, + TryFinally, + Finally, + Catch, + List, + Script, + ClassDeclaration, + InterfaceDeclaration, + ModuleDeclaration, + ImportDeclaration, + With, + Label, + LabeledStatement, + EBStart, + GotoEB, + EndCode, + Error, + Comment, + Debugger, + GeneralNode = FuncDecl, + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + LastAsg = AsgRs2, + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserSkippedTokens16.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserSkippedTokens16.d.ts new file mode 100644 index 0000000000000..5a23bab73017e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserSkippedTokens16.d.ts @@ -0,0 +1,62 @@ +//// [tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens16.ts] //// + +//// [parserSkippedTokens16.ts] +foo(): Bar { } +function Foo (): any ¬ { } +4+:5 +module M { +function a( + : T) { } +} +var x = + +/// [Declarations] //// + + + +//// [/.src/parserSkippedTokens16.d.ts] +declare function Foo(): any; +declare namespace M { +} +declare var x: invalid; +/// [Errors] //// + +parserSkippedTokens16.ts(1,1): error TS2552: Cannot find name 'foo'. Did you mean 'Foo'? +parserSkippedTokens16.ts(1,6): error TS1005: ';' expected. +parserSkippedTokens16.ts(1,8): error TS1434: Unexpected keyword or identifier. +parserSkippedTokens16.ts(1,8): error TS2304: Cannot find name 'Bar'. +parserSkippedTokens16.ts(2,27): error TS1127: Invalid character. +parserSkippedTokens16.ts(3,3): error TS1109: Expression expected. +parserSkippedTokens16.ts(6,5): error TS1138: Parameter declaration expected. +parserSkippedTokens16.ts(8,14): error TS1109: Expression expected. +parserSkippedTokens16.ts(8,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== parserSkippedTokens16.ts (9 errors) ==== + foo(): Bar { } + ~~~ +!!! error TS2552: Cannot find name 'foo'. Did you mean 'Foo'? +!!! related TS2728 parserSkippedTokens16.ts:2:10: 'Foo' is declared here. + ~ +!!! error TS1005: ';' expected. + ~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~ +!!! error TS2304: Cannot find name 'Bar'. + function Foo (): any ¬ { } + ~ +!!! error TS1127: Invalid character. + 4+:5 + ~ +!!! error TS1109: Expression expected. + module M { + function a( + : T) { } + ~ +!!! error TS1138: Parameter declaration expected. + } + var x = + +!!! error TS1109: Expression expected. + +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserStrictMode8.d.ts new file mode 100644 index 0000000000000..052f40aaafc0f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserStrictMode8.d.ts @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts] //// + +//// [parserStrictMode8.ts] +"use strict"; +function eval() { +} + +/// [Declarations] //// + + + +//// [/.src/parserStrictMode8.d.ts] +declare function eval(): invalid; +/// [Errors] //// + +parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. +parserStrictMode8.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== parserStrictMode8.ts (2 errors) ==== + "use strict"; + function eval() { + ~~~~ +!!! error TS1100: Invalid use of 'eval' in strict mode. + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/preserveConstEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/preserveConstEnums.d.ts new file mode 100644 index 0000000000000..9caca3c726e94 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/preserveConstEnums.d.ts @@ -0,0 +1,27 @@ +//// [tests/cases/compiler/preserveConstEnums.ts] //// + +//// [preserveConstEnums.ts] +const enum E { + Value = 1, Value2 = Value +} + +/// [Declarations] //// + + + +//// [/.src/preserveConstEnums.d.ts] +declare const enum E { + Value = 1, + Value2 = 1 +} +/// [Errors] //// + +preserveConstEnums.ts(2,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== preserveConstEnums.ts (1 errors) ==== + const enum E { + Value = 1, Value2 = Value + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/propertyAssignmentUseParentType3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/propertyAssignmentUseParentType3.d.ts new file mode 100644 index 0000000000000..5277f5208909d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/propertyAssignmentUseParentType3.d.ts @@ -0,0 +1,76 @@ +//// [tests/cases/conformance/salsa/propertyAssignmentUseParentType3.ts] //// + +//// [propertyAssignmentUseParentType3.ts] +// don't use the parent type if it's a function declaration (#33741) + +function foo1(): number { + return 123; +} +foo1.toFixed = ""; + +function foo2(): any[] { + return []; +} +foo2.join = ""; + +function foo3(): string { + return ""; +} +foo3.trim = ""; + +function foo4(): ({x: number}) { + return {x: 123}; +} +foo4.x = "456"; + + +/// [Declarations] //// + + + +//// [/.src/propertyAssignmentUseParentType3.d.ts] +declare function foo1(): number; +declare function foo2(): any[]; +declare function foo3(): string; +declare function foo4(): ({ + x: number; +}); +/// [Errors] //// + +propertyAssignmentUseParentType3.ts(3,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +propertyAssignmentUseParentType3.ts(8,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +propertyAssignmentUseParentType3.ts(13,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +propertyAssignmentUseParentType3.ts(18,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== propertyAssignmentUseParentType3.ts (4 errors) ==== + // don't use the parent type if it's a function declaration (#33741) + + function foo1(): number { + ~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + return 123; + } + foo1.toFixed = ""; + + function foo2(): any[] { + ~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + return []; + } + foo2.join = ""; + + function foo3(): string { + ~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + return ""; + } + foo3.trim = ""; + + function foo4(): ({x: number}) { + ~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + return {x: 123}; + } + foo4.x = "456"; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportClassDefinition.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportClassDefinition.d.ts new file mode 100644 index 0000000000000..4bb58f10d75ec --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportClassDefinition.d.ts @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/externalModules/reexportClassDefinition.ts] //// + +//// [foo3.ts] +import foo2 = require('./foo2') +class x extends foo2.x {} + + +//// [foo1.ts] +class x{} +export = x; + +//// [foo2.ts] +import foo1 = require('./foo1'); + +export = { + x: foo1 +} + + +/// [Declarations] //// + + + +//// [/.src/foo1.d.ts] +declare class x { +} +export = x; + +//// [/.src/foo2.d.ts] +declare const _default: invalid; +export = _default; + +//// [/.src/foo3.d.ts] +export {}; +/// [Errors] //// + +foo2.ts(4,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== foo3.ts (0 errors) ==== + import foo2 = require('./foo2') + class x extends foo2.x {} + + +==== foo1.ts (0 errors) ==== + class x{} + export = x; + +==== foo2.ts (1 errors) ==== + import foo1 = require('./foo1'); + + export = { + x: foo1 + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reservedWords3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reservedWords3.d.ts new file mode 100644 index 0000000000000..ce5370bf3e703 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reservedWords3.d.ts @@ -0,0 +1,90 @@ +//// [tests/cases/compiler/reservedWords3.ts] //// + +//// [reservedWords3.ts] +function f1(enum) {} +function f2(class) {} +function f3(function) {} +function f4(while) {} +function f5(for) {} + + +/// [Declarations] //// + + + +//// [/.src/reservedWords3.d.ts] +declare function f1(): invalid; +declare enum { +} +declare function f2(): invalid; +declare class { +} +declare function f3(): invalid; +declare function (): invalid; +declare function f4(): invalid; +declare function f5(): invalid; +/// [Errors] //// + +reservedWords3.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +reservedWords3.ts(1,13): error TS1390: 'enum' is not allowed as a parameter name. +reservedWords3.ts(1,17): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +reservedWords3.ts(1,17): error TS1003: Identifier expected. +reservedWords3.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +reservedWords3.ts(2,13): error TS1390: 'class' is not allowed as a parameter name. +reservedWords3.ts(2,18): error TS1005: '{' expected. +reservedWords3.ts(3,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +reservedWords3.ts(3,13): error TS1390: 'function' is not allowed as a parameter name. +reservedWords3.ts(3,21): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +reservedWords3.ts(3,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +reservedWords3.ts(3,21): error TS1003: Identifier expected. +reservedWords3.ts(4,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +reservedWords3.ts(4,13): error TS1390: 'while' is not allowed as a parameter name. +reservedWords3.ts(4,18): error TS1005: '(' expected. +reservedWords3.ts(5,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +reservedWords3.ts(5,13): error TS1390: 'for' is not allowed as a parameter name. +reservedWords3.ts(5,16): error TS1005: '(' expected. + + +==== reservedWords3.ts (18 errors) ==== + function f1(enum) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ +!!! error TS1390: 'enum' is not allowed as a parameter name. + +!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. + ~ +!!! error TS1003: Identifier expected. + function f2(class) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS1390: 'class' is not allowed as a parameter name. + ~ +!!! error TS1005: '{' expected. + function f3(function) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~ +!!! error TS1390: 'function' is not allowed as a parameter name. + +!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. + +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1003: Identifier expected. + function f4(while) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS1390: 'while' is not allowed as a parameter name. + ~ +!!! error TS1005: '(' expected. + function f5(for) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS1390: 'for' is not allowed as a parameter name. + ~ +!!! error TS1005: '(' expected. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/staticsInAFunction.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/staticsInAFunction.d.ts new file mode 100644 index 0000000000000..17e63bfc2ce0f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/staticsInAFunction.d.ts @@ -0,0 +1,72 @@ +//// [tests/cases/compiler/staticsInAFunction.ts] //// + +//// [staticsInAFunction.ts] +function boo{ + static test() + static test(name:string) + static test(name?:any){} +} + + +/// [Declarations] //// + + + +//// [/.src/staticsInAFunction.d.ts] +declare function boo(): invalid; +/// [Errors] //// + +staticsInAFunction.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticsInAFunction.ts(1,13): error TS1005: '(' expected. +staticsInAFunction.ts(2,4): error TS1128: Declaration or statement expected. +staticsInAFunction.ts(2,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +staticsInAFunction.ts(3,4): error TS1128: Declaration or statement expected. +staticsInAFunction.ts(3,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +staticsInAFunction.ts(3,16): error TS2304: Cannot find name 'name'. +staticsInAFunction.ts(3,20): error TS1005: ',' expected. +staticsInAFunction.ts(3,21): error TS2693: 'string' only refers to a type, but is being used as a value here. +staticsInAFunction.ts(4,4): error TS1128: Declaration or statement expected. +staticsInAFunction.ts(4,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +staticsInAFunction.ts(4,16): error TS2304: Cannot find name 'name'. +staticsInAFunction.ts(4,21): error TS1109: Expression expected. +staticsInAFunction.ts(4,22): error TS2693: 'any' only refers to a type, but is being used as a value here. +staticsInAFunction.ts(4,26): error TS1005: ';' expected. + + +==== staticsInAFunction.ts (15 errors) ==== + function boo{ + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: '(' expected. + static test() + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~ +!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. + static test(name:string) + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~ +!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. + ~~~~ +!!! error TS2304: Cannot find name 'name'. + ~ +!!! error TS1005: ',' expected. + ~~~~~~ +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. + static test(name?:any){} + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~ +!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. + ~~~~ +!!! error TS2304: Cannot find name 'name'. + ~ +!!! error TS1109: Expression expected. + ~~~ +!!! error TS2693: 'any' only refers to a type, but is being used as a value here. + ~ +!!! error TS1005: ';' expected. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/strictModeOctalLiterals.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/strictModeOctalLiterals.d.ts new file mode 100644 index 0000000000000..064c2e3f40e0a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/strictModeOctalLiterals.d.ts @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/expressions/literals/strictModeOctalLiterals.ts] //// + +//// [strictModeOctalLiterals.ts] +export enum E { + A = 12 + 01 +} +const orbitol: 01 = 01 + + +/// [Declarations] //// + + + +//// [/.src/strictModeOctalLiterals.d.ts] +export declare enum E { + A = 13 +} +/// [Errors] //// + +strictModeOctalLiterals.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +strictModeOctalLiterals.ts(2,14): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. +strictModeOctalLiterals.ts(4,16): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. +strictModeOctalLiterals.ts(4,21): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. + + +==== strictModeOctalLiterals.ts (4 errors) ==== + export enum E { + A = 12 + 01 + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'. + } + const orbitol: 01 = 01 + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'. + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'. + \ No newline at end of file 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..656e97560f05a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit12.d.ts @@ -0,0 +1,59 @@ +//// [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](): I { return undefined; } + set [Symbol.toPrimitive](x: I) { } + } +} + +/// [Declarations] //// + + + +//// [/.src/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](): I; + set [Symbol.toPrimitive](x: I); + } + export {}; +} +/// [Errors] //// + +symbolDeclarationEmit12.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolDeclarationEmit12.ts(9,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. +symbolDeclarationEmit12.ts(10,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. + + +==== symbolDeclarationEmit12.ts (3 errors) ==== + module M { + interface I { } + export class C { + [Symbol.iterator]: I; + [Symbol.toPrimitive](x: I) { } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [Symbol.isConcatSpreadable](): I { + return undefined + } + get [Symbol.toPrimitive](): I { 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/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts new file mode 100644 index 0000000000000..cfc7e475ae33e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts @@ -0,0 +1,54 @@ +//// [tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts] //// + +//// [Folder/monorepo/core/index.ts] +import { styles } from "package-a"; + +export function getStyles() { + return styles; +} + +//// [Folder/monorepo/package-a/index.d.ts] +export declare const styles: import("styled-components").InterpolationValue[]; + +//// [Folder/node_modules/styled-components/package.json] +{ + "name": "styled-components", + "version": "3.3.3", + "typings": "typings/styled-components.d.ts" +} + +//// [Folder/node_modules/styled-components/typings/styled-components.d.ts] +export interface InterpolationValue {} + +/// [Declarations] //// + + + +//// [/.src/Folder/monorepo/core/index.d.ts] +export declare function getStyles(): invalid; +/// [Errors] //// + +Folder/monorepo/core/index.ts(3,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== Folder/monorepo/core/index.ts (1 errors) ==== + import { styles } from "package-a"; + + export function getStyles() { + ~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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/templateLiteralTypes4.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes4.d.ts new file mode 100644 index 0000000000000..c39fc7941bed3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes4.d.ts @@ -0,0 +1,789 @@ +//// [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] //// + + + +//// [/.src/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; +/// [Errors] //// + +templateLiteralTypes4.ts(43,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +templateLiteralTypes4.ts(43,60): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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/templateStringInFunctionParameterType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterType.d.ts new file mode 100644 index 0000000000000..e27b6a77c6b8e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterType.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts] //// + +//// [templateStringInFunctionParameterType.ts] +function f(: any: any`hello`): any; +function f(x: string): any; +function f(x: string) { + return x; +} + +/// [Declarations] //// + + + +//// [/.src/templateStringInFunctionParameterType.d.ts] +declare function f(any: any, : invalid): any; +declare function f(x: string): any; +/// [Errors] //// + +templateStringInFunctionParameterType.ts(1,12): error TS1138: Parameter declaration expected. +templateStringInFunctionParameterType.ts(1,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +templateStringInFunctionParameterType.ts(1,22): error TS1005: ',' expected. + + +==== templateStringInFunctionParameterType.ts (3 errors) ==== + function f(: any: any`hello`): any; + ~ +!!! error TS1138: Parameter declaration expected. + +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS1005: ',' expected. + function f(x: string): any; + function f(x: string) { + return x; + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterTypeES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterTypeES6.d.ts new file mode 100644 index 0000000000000..833f4d71e19a2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterTypeES6.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts] //// + +//// [templateStringInFunctionParameterTypeES6.ts] +function f(: any: any`hello`): any; +function f(x: string): any; +function f(x: string) { + return x; +} + +/// [Declarations] //// + + + +//// [/.src/templateStringInFunctionParameterTypeES6.d.ts] +declare function f(any: any, : invalid): any; +declare function f(x: string): any; +/// [Errors] //// + +templateStringInFunctionParameterTypeES6.ts(1,12): error TS1138: Parameter declaration expected. +templateStringInFunctionParameterTypeES6.ts(1,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +templateStringInFunctionParameterTypeES6.ts(1,22): error TS1005: ',' expected. + + +==== templateStringInFunctionParameterTypeES6.ts (3 errors) ==== + function f(: any: any`hello`): any; + ~ +!!! error TS1138: Parameter declaration expected. + +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS1005: ',' expected. + function f(x: string): any; + function f(x: string) { + return x; + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringWithEmbeddedYieldKeyword.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringWithEmbeddedYieldKeyword.d.ts new file mode 100644 index 0000000000000..9d202e5a353b7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringWithEmbeddedYieldKeyword.d.ts @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts] //// + +//// [templateStringWithEmbeddedYieldKeyword.ts] +function* gen { + // Once this is supported, yield *must* be parenthesized. + var x = `abc${ yield 10 }def`; +} + + +/// [Declarations] //// + + + +//// [/.src/templateStringWithEmbeddedYieldKeyword.d.ts] +declare function gen(): invalid; +/// [Errors] //// + +error TS2318: Cannot find global type 'IterableIterator'. +templateStringWithEmbeddedYieldKeyword.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +templateStringWithEmbeddedYieldKeyword.ts(1,15): error TS1005: '(' expected. + + +!!! error TS2318: Cannot find global type 'IterableIterator'. +==== templateStringWithEmbeddedYieldKeyword.ts (2 errors) ==== + function* gen { + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: '(' expected. + // Once this is supported, yield *must* be parenthesized. + var x = `abc${ yield 10 }def`; + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContexts.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContexts.d.ts new file mode 100644 index 0000000000000..c82d50ac8207b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContexts.d.ts @@ -0,0 +1,150 @@ +//// [tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts] //// + +//// [thisInInvalidContexts.ts] +class BaseErrClass { + constructor(t: any) { } +} + +class ClassWithNoInitializer extends BaseErrClass { + t: any; + //'this' in optional super call + constructor() { + super(this); // Error + } +} + +class ClassWithInitializer extends BaseErrClass { + t = 4; + //'this' in required super call + constructor() { + super(this); // Error + } +} + +module M { + //'this' in module variable + var x = this; // Error +} + +//'this' as type parameter constraint +// function fn() { } // Error + +//'this' as a type argument +function genericFunc(x: T): void { } +genericFunc(undefined); // Should be an error + +const ErrClass3Base: typeof globalThis = this; +class ErrClass3 extends ErrClass3Base { + +} + +//'this' as a computed enum value +enum SomeEnum { + A = this, // Should not be allowed + B = this.spaaaace // Also should not be allowed +} + + + +/// [Declarations] //// + + + +//// [/.src/thisInInvalidContexts.d.ts] +declare class BaseErrClass { + constructor(t: any); +} +declare class ClassWithNoInitializer extends BaseErrClass { + t: any; + constructor(); +} +declare class ClassWithInitializer extends BaseErrClass { + t: number; + constructor(); +} +declare namespace M { +} +declare function genericFunc(x: T): void; +declare const ErrClass3Base: typeof globalThis; +declare class ErrClass3 extends ErrClass3Base { +} +declare enum SomeEnum { + A,// Should not be allowed + B +} +/// [Errors] //// + +thisInInvalidContexts.ts(9,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +thisInInvalidContexts.ts(17,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +thisInInvalidContexts.ts(23,13): error TS2331: 'this' cannot be referenced in a module or namespace body. +thisInInvalidContexts.ts(31,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisInInvalidContexts.ts(34,25): error TS2507: Type 'typeof globalThis' is not a constructor function type. +thisInInvalidContexts.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +thisInInvalidContexts.ts(40,9): error TS2332: 'this' cannot be referenced in current location. +thisInInvalidContexts.ts(41,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +thisInInvalidContexts.ts(41,9): error TS2332: 'this' cannot be referenced in current location. + + +==== thisInInvalidContexts.ts (9 errors) ==== + class BaseErrClass { + constructor(t: any) { } + } + + class ClassWithNoInitializer extends BaseErrClass { + t: any; + //'this' in optional super call + constructor() { + super(this); // Error + ~~~~ +!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. + } + } + + class ClassWithInitializer extends BaseErrClass { + t = 4; + //'this' in required super call + constructor() { + super(this); // Error + ~~~~ +!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. + } + } + + module M { + //'this' in module variable + var x = this; // Error + ~~~~ +!!! error TS2331: 'this' cannot be referenced in a module or namespace body. + } + + //'this' as type parameter constraint + // function fn() { } // Error + + //'this' as a type argument + function genericFunc(x: T): void { } + genericFunc(undefined); // Should be an error + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + + const ErrClass3Base: typeof globalThis = this; + class ErrClass3 extends ErrClass3Base { + ~~~~~~~~~~~~~ +!!! error TS2507: Type 'typeof globalThis' is not a constructor function type. + + } + + //'this' as a computed enum value + enum SomeEnum { + A = this, // Should not be allowed + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ +!!! error TS2332: 'this' cannot be referenced in current location. + B = this.spaaaace // Also should not be allowed + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ +!!! error TS2332: 'this' cannot be referenced in current location. + } + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContextsExternalModule.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContextsExternalModule.d.ts new file mode 100644 index 0000000000000..3b36bfec995d1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContextsExternalModule.d.ts @@ -0,0 +1,126 @@ +//// [tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts] //// + +//// [thisInInvalidContextsExternalModule.ts] +class BaseErrClass { + constructor(t: any) { } +} + +class ClassWithNoInitializer extends BaseErrClass { + t; + //'this' in optional super call + constructor() { + super(this); // error: "super" has to be called before "this" accessing + } +} + +class ClassWithInitializer extends BaseErrClass { + t = 4; + //'this' in required super call + constructor() { + super(this); // Error + } +} + +module M { + //'this' in module variable + var x = this; // Error +} + +//'this' as type parameter constraint +// function fn() { } // Error + +//'this' as a type argument +function genericFunc(x: T) { } +genericFunc(undefined); // Should be an error + +class ErrClass3 extends this { + +} + +//'this' as a computed enum value +enum SomeEnum { + A = this, // Should not be allowed + B = this.spaaaace // Also should not be allowed +} + +export = this; // Should be an error + +/// [Declarations] //// + + + +//// [/.src/thisInInvalidContextsExternalModule.d.ts] +declare const _default: invalid; +export = _default; +/// [Errors] //// + +thisInInvalidContextsExternalModule.ts(9,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +thisInInvalidContextsExternalModule.ts(17,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +thisInInvalidContextsExternalModule.ts(23,13): error TS2331: 'this' cannot be referenced in a module or namespace body. +thisInInvalidContextsExternalModule.ts(31,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisInInvalidContextsExternalModule.ts(33,25): error TS2507: Type 'undefined' is not a constructor function type. +thisInInvalidContextsExternalModule.ts(39,9): error TS2332: 'this' cannot be referenced in current location. +thisInInvalidContextsExternalModule.ts(40,9): error TS2332: 'this' cannot be referenced in current location. +thisInInvalidContextsExternalModule.ts(43,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== thisInInvalidContextsExternalModule.ts (8 errors) ==== + class BaseErrClass { + constructor(t: any) { } + } + + class ClassWithNoInitializer extends BaseErrClass { + t; + //'this' in optional super call + constructor() { + super(this); // error: "super" has to be called before "this" accessing + ~~~~ +!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. + } + } + + class ClassWithInitializer extends BaseErrClass { + t = 4; + //'this' in required super call + constructor() { + super(this); // Error + ~~~~ +!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. + } + } + + module M { + //'this' in module variable + var x = this; // Error + ~~~~ +!!! error TS2331: 'this' cannot be referenced in a module or namespace body. + } + + //'this' as type parameter constraint + // function fn() { } // Error + + //'this' as a type argument + function genericFunc(x: T) { } + genericFunc(undefined); // Should be an error + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + + class ErrClass3 extends this { + ~~~~ +!!! error TS2507: Type 'undefined' is not a constructor function type. + + } + + //'this' as a computed enum value + enum SomeEnum { + A = this, // Should not be allowed + ~~~~ +!!! error TS2332: 'this' cannot be referenced in current location. + B = this.spaaaace // Also should not be allowed + ~~~~ +!!! error TS2332: 'this' cannot be referenced in current location. + } + + export = this; // Should be an error + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInPropertyBoundDeclarations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInPropertyBoundDeclarations.d.ts new file mode 100644 index 0000000000000..9bdf8047bf31b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInPropertyBoundDeclarations.d.ts @@ -0,0 +1,184 @@ +//// [tests/cases/compiler/thisInPropertyBoundDeclarations.ts] //// + +//// [thisInPropertyBoundDeclarations.ts] +class Bug { + private name: string; + + private static func: Function[] = [ + (that: Bug, name: string) => { + that.foo(name); + } + ]; + + private foo(name: string) { + this.name = name; + } +} + +// Valid use of this in a property bound decl +class A { + prop1 = function(): void { + this; + }; + + prop2 = function(): void { + function inner() { + this; + } + () => this; + }; + + prop3 = (): void => { + function inner() { + this; + } + }; + + prop4 = { + a: function(): any { return this; }, + }; + + prop5 = (): { + a: () => any; + } => { + return { + a: function() { return this; }, + }; + }; +} + +class B { + prop1: this = this; + + prop2 = (): this => this; + + prop3 = (): () => () => () => this => () => () => () => this; + + prop4: string = ' ' + + function() { + } + + ' ' + + (() => () => () => this); + + prop5 = { + a: (): this => { return this; } + }; + + prop6 = () => { + return { + a: () => { return this; } + }; + }; +} + +/// [Declarations] //// + + + +//// [/.src/thisInPropertyBoundDeclarations.d.ts] +declare class Bug { + private name; + private static func; + private foo; +} +declare class A { + prop1: () => void; + prop2: () => void; + prop3: () => void; + prop4: { + a: () => any; + }; + prop5: () => { + a: () => any; + }; +} +declare class B { + prop1: this; + prop2: () => this; + prop3: () => () => () => () => this; + prop4: string; + prop5: { + a: () => this; + }; + prop6: invalid; +} +/// [Errors] //// + +thisInPropertyBoundDeclarations.ts(64,5): error TS2527: The inferred type of 'prop6' references an inaccessible 'this' type. A type annotation is necessary. +thisInPropertyBoundDeclarations.ts(64,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== thisInPropertyBoundDeclarations.ts (2 errors) ==== + class Bug { + private name: string; + + private static func: Function[] = [ + (that: Bug, name: string) => { + that.foo(name); + } + ]; + + private foo(name: string) { + this.name = name; + } + } + + // Valid use of this in a property bound decl + class A { + prop1 = function(): void { + this; + }; + + prop2 = function(): void { + function inner() { + this; + } + () => this; + }; + + prop3 = (): void => { + function inner() { + this; + } + }; + + prop4 = { + a: function(): any { return this; }, + }; + + prop5 = (): { + a: () => any; + } => { + return { + a: function() { return this; }, + }; + }; + } + + class B { + prop1: this = this; + + prop2 = (): this => this; + + prop3 = (): () => () => () => this => () => () => () => this; + + prop4: string = ' ' + + function() { + } + + ' ' + + (() => () => () => this); + + prop5 = { + a: (): this => { return this; } + }; + + prop6 = () => { + ~~~~~ +!!! error TS2527: The inferred type of 'prop6' references an inaccessible 'this' type. A type annotation is necessary. + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return { + a: () => { return this; } + }; + }; + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/this_inside-enum-should-not-be-allowed.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/this_inside-enum-should-not-be-allowed.d.ts new file mode 100644 index 0000000000000..511c3cc272a26 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/this_inside-enum-should-not-be-allowed.d.ts @@ -0,0 +1,46 @@ +//// [tests/cases/compiler/this_inside-enum-should-not-be-allowed.ts] //// + +//// [this_inside-enum-should-not-be-allowed.ts] +enum TopLevelEnum { + ThisWasAllowedButShouldNotBe = this // Should not be allowed +} + +module ModuleEnum { + enum EnumInModule { + WasADifferentError = this // this was handled as if this was in a module + } +} + +/// [Declarations] //// + + + +//// [/.src/this_inside-enum-should-not-be-allowed.d.ts] +declare enum TopLevelEnum { + ThisWasAllowedButShouldNotBe +} +declare namespace ModuleEnum { +} +/// [Errors] //// + +this_inside-enum-should-not-be-allowed.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +this_inside-enum-should-not-be-allowed.ts(2,36): error TS2332: 'this' cannot be referenced in current location. +this_inside-enum-should-not-be-allowed.ts(7,30): error TS2332: 'this' cannot be referenced in current location. + + +==== this_inside-enum-should-not-be-allowed.ts (3 errors) ==== + enum TopLevelEnum { + ThisWasAllowedButShouldNotBe = this // Should not be allowed + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~ +!!! error TS2332: 'this' cannot be referenced in current location. + } + + module ModuleEnum { + enum EnumInModule { + WasADifferentError = this // this was handled as if this was in a module + ~~~~ +!!! error TS2332: 'this' cannot be referenced in current location. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/twoAccessorsWithSameName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/twoAccessorsWithSameName.d.ts new file mode 100644 index 0000000000000..b081bd2329856 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/twoAccessorsWithSameName.d.ts @@ -0,0 +1,126 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts] //// + +//// [twoAccessorsWithSameName.ts] +class C { + get x(): number { return 1; } + get x(): number { return 1; } // error +} + +class D { + set x(v: any) { } + set x(v: any) { } // error +} + +class E { + get x(): number { + return 1; + } + set x(v) { } +} + +var x = { + get x() { + return 1; + }, + + // error + get x(): number { + return 1; + } +} + +var y: { + x: number; +} = { + get x(): number { + return 1; + }, + set x(v) { } +} + +/// [Declarations] //// + + + +//// [/.src/twoAccessorsWithSameName.d.ts] +declare class C { + get x(): number; + get x(): number; +} +declare class D { + set x(v: any); + set x(v: any); +} +declare class E { + get x(): number; + set x(v: number); +} +declare var x: invalid; +declare var y: { + x: number; +}; +/// [Errors] //// + +twoAccessorsWithSameName.ts(2,9): error TS2300: Duplicate identifier 'x'. +twoAccessorsWithSameName.ts(3,9): error TS2300: Duplicate identifier 'x'. +twoAccessorsWithSameName.ts(7,9): error TS2300: Duplicate identifier 'x'. +twoAccessorsWithSameName.ts(8,9): error TS2300: Duplicate identifier 'x'. +twoAccessorsWithSameName.ts(19,9): error TS2300: Duplicate identifier 'x'. +twoAccessorsWithSameName.ts(24,9): error TS1118: An object literal cannot have multiple get/set accessors with the same name. +twoAccessorsWithSameName.ts(24,9): error TS2300: Duplicate identifier 'x'. +twoAccessorsWithSameName.ts(24,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== twoAccessorsWithSameName.ts (8 errors) ==== + class C { + get x(): number { return 1; } + ~ +!!! error TS2300: Duplicate identifier 'x'. + get x(): number { return 1; } // error + ~ +!!! error TS2300: Duplicate identifier 'x'. + } + + class D { + set x(v: any) { } + ~ +!!! error TS2300: Duplicate identifier 'x'. + set x(v: any) { } // error + ~ +!!! error TS2300: Duplicate identifier 'x'. + } + + class E { + get x(): number { + return 1; + } + set x(v) { } + } + + var x = { + get x() { + ~ +!!! error TS2300: Duplicate identifier 'x'. + return 1; + }, + + // error + get x(): number { + ~ +!!! error TS1118: An object literal cannot have multiple get/set accessors with the same name. + ~ +!!! error TS2300: Duplicate identifier 'x'. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return 1; + } + } + + var y: { + x: number; + } = { + get x(): number { + return 1; + }, + set x(v) { } + } \ No newline at end of file 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..c3caf61a07bde --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts @@ -0,0 +1,316 @@ +//// [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) { + return n.toString(); +} +ExpandoExpr.prop = { x: 2 } +ExpandoExpr.prop = { y: "" } +ExpandoExpr.m = function(n: number) { + return n + 1; +} +var n: number = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length + +const ExpandoArrow: { + (n: number): string; + prop: number; + m(n: number): number; +} = (n: number) => 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: number = 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: (n: number) => string = function (n: number) { + return n.toString(); +} +ExpandoExpr2.prop = 2 +ExpandoExpr2.m = function(n: number) { + return n + 1; +} +var n: number = 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: number = 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: number = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n + + + +/// [Declarations] //// + + + +//// [/.src/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: { + new (): { + n: number; + }; +}; +declare var n: number; +/// [Errors] //// + +typeFromPropertyAssignment29.ts(1,10): error TS9009: 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(41,10): error TS9009: 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(53,10): error TS9009: 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(66,14): error TS9009: 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,30): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. +typeFromPropertyAssignment29.ts(81,50): 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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. +typeFromPropertyAssignment29.ts(91,50): 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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. +typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. + + +==== typeFromPropertyAssignment29.ts (16 errors) ==== + function ExpandoDecl(n: number): string { + ~~~~~~~~~~~ +!!! error TS9009: 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.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) { + return n.toString(); + } + ExpandoExpr.prop = { x: 2 } + ExpandoExpr.prop = { y: "" } + ExpandoExpr.m = function(n: number) { + return n + 1; + } + var n: number = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length + + const ExpandoArrow: { + (n: number): string; + prop: number; + m(n: number): number; + } = (n: number) => n.toString(); + ExpandoArrow.prop = 2 + ExpandoArrow.m = function(n: number) { + return n + 1; + + } + + function ExpandoNested(n: number): { + ~~~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + (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 { + ~~~~~~~~~~~~ +!!! error TS9009: 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 * 100; + } + ExpandoMerge.p1 = 111 + namespace ExpandoMerge { + export var p2 = 222; + } + namespace ExpandoMerge { + export var p3 = 333; + } + var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); + + namespace Ns { + function ExpandoNamespace(): void {} + ~~~~~~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoNamespace.p6 = 42; + export function foo(): typeof ExpandoNamespace { + return ExpandoNamespace; + } + } + + // Should not work in Typescript -- must be const + var ExpandoExpr2: (n: number) => string = function (n: number) { + 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: number = 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: number = 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: number = 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/typeFromPropertyAssignment31.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment31.d.ts new file mode 100644 index 0000000000000..ad5dc9bce7902 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment31.d.ts @@ -0,0 +1,91 @@ +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment31.ts] //// + +//// [typeFromPropertyAssignment31.ts] +function ExpandoMerge(n: number): number { + return n; +} +ExpandoMerge.p1 = 111 +ExpandoMerge.m = function(n: number) { + return n + 1; +} +namespace ExpandoMerge { + export var p2 = 222; +} +ExpandoMerge.p4 = 44444; // ok +ExpandoMerge.p6 = 66666; // ok +ExpandoMerge.p8 = false; // type error +namespace ExpandoMerge { + export var p3 = 333; + export var p4 = 4; + export var p5 = 5; + export let p6 = 6; + export let p7 = 7; + export var p8 = 6; + export let p9 = 7; +} +ExpandoMerge.p5 = 555555; // ok +ExpandoMerge.p7 = 777777; // ok +ExpandoMerge.p9 = false; // type error +var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + + +/// [Declarations] //// + + + +//// [/.src/typeFromPropertyAssignment31.d.ts] +declare function ExpandoMerge(n: number): number; +declare namespace ExpandoMerge { + var p2: number; +} +declare namespace ExpandoMerge { + var p3: number; + var p4: number; + var p5: number; + let p6: number; + let p7: number; + var p8: number; + let p9: number; +} +declare var n: number; +/// [Errors] //// + +typeFromPropertyAssignment31.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +typeFromPropertyAssignment31.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. +typeFromPropertyAssignment31.ts(25,1): error TS2322: Type 'boolean' is not assignable to type 'number'. + + +==== typeFromPropertyAssignment31.ts (3 errors) ==== + function ExpandoMerge(n: number): number { + ~~~~~~~~~~~~ +!!! error TS9009: 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; + } + ExpandoMerge.p1 = 111 + ExpandoMerge.m = function(n: number) { + return n + 1; + } + namespace ExpandoMerge { + export var p2 = 222; + } + ExpandoMerge.p4 = 44444; // ok + ExpandoMerge.p6 = 66666; // ok + ExpandoMerge.p8 = false; // type error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + namespace ExpandoMerge { + export var p3 = 333; + export var p4 = 4; + export var p5 = 5; + export let p6 = 6; + export let p7 = 7; + export var p8 = 6; + export let p9 = 7; + } + ExpandoMerge.p5 = 555555; // ok + ExpandoMerge.p7 = 777777; // ok + ExpandoMerge.p9 = false; // type error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment32.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment32.d.ts new file mode 100644 index 0000000000000..ae7c34f96c5e9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment32.d.ts @@ -0,0 +1,103 @@ +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts] //// + +//// [expando.ts] +function ExpandoMerge(n: number): number { + return n; +} +ExpandoMerge.p1 = 111 +ExpandoMerge.m = function(n: number) { + return n + 1; +} +ExpandoMerge.p4 = 44444; +ExpandoMerge.p5 = 555555; +ExpandoMerge.p6 = 66666; +ExpandoMerge.p7 = 777777; +ExpandoMerge.p8 = false; // type error +ExpandoMerge.p9 = false; // type error +var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + +//// [ns.ts] +namespace ExpandoMerge { + export var p3 = 333; + export var p4 = 4; + export var p5 = 5; + export let p6 = 6; + export let p7 = 7; + export var p8 = 6; + export let p9 = 7; +} +namespace ExpandoMerge { + export var p2 = 222; +} + + +/// [Declarations] //// + + + +//// [/.src/expando.d.ts] +declare function ExpandoMerge(n: number): number; +declare var n: number; + +//// [/.src/ns.d.ts] +declare namespace ExpandoMerge { + var p3: number; + var p4: number; + var p5: number; + let p6: number; + let p7: number; + var p8: number; + let p9: number; +} +declare namespace ExpandoMerge { + var p2: number; +} +/// [Errors] //// + +expando.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. +expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. +ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. +ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + + +==== expando.ts (3 errors) ==== + function ExpandoMerge(n: number): number { + ~~~~~~~~~~~~ +!!! error TS9009: 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; + } + ExpandoMerge.p1 = 111 + ExpandoMerge.m = function(n: number) { + return n + 1; + } + ExpandoMerge.p4 = 44444; + ExpandoMerge.p5 = 555555; + ExpandoMerge.p6 = 66666; + ExpandoMerge.p7 = 777777; + ExpandoMerge.p8 = false; // type error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + ExpandoMerge.p9 = false; // type error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + +==== ns.ts (2 errors) ==== + namespace ExpandoMerge { + ~~~~~~~~~~~~ +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + export var p3 = 333; + export var p4 = 4; + export var p5 = 5; + export let p6 = 6; + export let p7 = 7; + export var p8 = 6; + export let p9 = 7; + } + namespace ExpandoMerge { + ~~~~~~~~~~~~ +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + export var p2 = 222; + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment33.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment33.d.ts new file mode 100644 index 0000000000000..1d6102a6d77b8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment33.d.ts @@ -0,0 +1,107 @@ +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts] //// + +//// [ns.ts] +namespace ExpandoMerge { + export var p3 = 333; + export var p4 = 4; + export var p5 = 5; + export let p6 = 6; + export let p7 = 7; + export var p8 = 6; + export let p9 = 7; +} +namespace ExpandoMerge { + export var p2 = 222; +} + + +//// [expando.ts] +function ExpandoMerge(n: number): number { + return n; +} +ExpandoMerge.p1 = 111 +ExpandoMerge.m = function(n: number) { + return n + 1; +} +ExpandoMerge.p4 = 44444; +ExpandoMerge.p5 = 555555; +ExpandoMerge.p6 = 66666; +ExpandoMerge.p7 = 777777; +ExpandoMerge.p8 = false; // type error +ExpandoMerge.p9 = false; // type error +var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + + + +/// [Declarations] //// + + + +//// [/.src/expando.d.ts] +declare function ExpandoMerge(n: number): number; +declare var n: number; + +//// [/.src/ns.d.ts] +declare namespace ExpandoMerge { + var p3: number; + var p4: number; + var p5: number; + let p6: number; + let p7: number; + var p8: number; + let p9: number; +} +declare namespace ExpandoMerge { + var p2: number; +} +/// [Errors] //// + +expando.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. +expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. +ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. +ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + + +==== ns.ts (2 errors) ==== + namespace ExpandoMerge { + ~~~~~~~~~~~~ +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + export var p3 = 333; + export var p4 = 4; + export var p5 = 5; + export let p6 = 6; + export let p7 = 7; + export var p8 = 6; + export let p9 = 7; + } + namespace ExpandoMerge { + ~~~~~~~~~~~~ +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + export var p2 = 222; + } + + +==== expando.ts (3 errors) ==== + function ExpandoMerge(n: number): number { + ~~~~~~~~~~~~ +!!! error TS9009: 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; + } + ExpandoMerge.p1 = 111 + ExpandoMerge.m = function(n: number) { + return n + 1; + } + ExpandoMerge.p4 = 44444; + ExpandoMerge.p5 = 555555; + ExpandoMerge.p6 = 66666; + ExpandoMerge.p7 = 777777; + ExpandoMerge.p8 = false; // type error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + ExpandoMerge.p9 = false; // type error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment36.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment36.d.ts new file mode 100644 index 0000000000000..f21fc5549195f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment36.d.ts @@ -0,0 +1,203 @@ +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts] //// + +//// [typeFromPropertyAssignment36.ts] +function f(b: boolean): { + (): void + e: number + q: boolean + r: number + s: string +} { + function d() { + } + d.e = 12 + d.e + + if (b) { + d.q = false + } + // error d.q might not be assigned + d.q + if (b) { + d.q = false + } + else { + d.q = true + } + d.q + if (b) { + d.r = 1 + } + else { + d.r = 2 + } + d.r + if (b) { + d.s = 'hi' + } + return d +} +// OK to access possibly-unassigned properties outside the initialising scope +var test: string = f(true).s + +function d(): void { +} +d.e = 12 +d.e + +if (!!false) { + d.q = false +} +d.q +if (!!false) { + d.q = false +} +else { + d.q = true +} +d.q +if (!!false) { + d.r = 1 +} +else { + d.r = 2 +} +d.r + +// test function expressions too +const g: { + (): void + expando: number + both: string | number +} = function() { +} +if (!!false) { + g.expando = 1 +} +g.expando // error + +if (!!false) { + g.both = 'hi' +} +else { + g.both = 0 +} +g.both + + +/// [Declarations] //// + + + +//// [/.src/typeFromPropertyAssignment36.d.ts] +declare function f(b: boolean): { + (): void; + e: number; + q: boolean; + r: number; + s: string; +}; +declare var test: string; +declare function d(): void; +declare const g: { + (): void; + expando: number; + both: string | number; +}; +/// [Errors] //// + +typeFromPropertyAssignment36.ts(17,7): error TS2565: Property 'q' is used before being assigned. +typeFromPropertyAssignment36.ts(40,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +typeFromPropertyAssignment36.ts(48,3): error TS2565: Property 'q' is used before being assigned. + + +==== typeFromPropertyAssignment36.ts (3 errors) ==== + function f(b: boolean): { + (): void + e: number + q: boolean + r: number + s: string + } { + function d() { + } + d.e = 12 + d.e + + if (b) { + d.q = false + } + // error d.q might not be assigned + d.q + ~ +!!! error TS2565: Property 'q' is used before being assigned. + if (b) { + d.q = false + } + else { + d.q = true + } + d.q + if (b) { + d.r = 1 + } + else { + d.r = 2 + } + d.r + if (b) { + d.s = 'hi' + } + return d + } + // OK to access possibly-unassigned properties outside the initialising scope + var test: string = f(true).s + + function d(): void { + ~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + } + d.e = 12 + d.e + + if (!!false) { + d.q = false + } + d.q + ~ +!!! error TS2565: Property 'q' is used before being assigned. + if (!!false) { + d.q = false + } + else { + d.q = true + } + d.q + if (!!false) { + d.r = 1 + } + else { + d.r = 2 + } + d.r + + // test function expressions too + const g: { + (): void + expando: number + both: string | number + } = function() { + } + if (!!false) { + g.expando = 1 + } + g.expando // error + + if (!!false) { + g.both = 'hi' + } + else { + g.both = 0 + } + g.both + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment38.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment38.d.ts new file mode 100644 index 0000000000000..50d352256d9a2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment38.d.ts @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment38.ts] //// + +//// [typeFromPropertyAssignment38.ts] +function F(): void {} +F["prop"] = 3; + +const f: { + (): void; + prop: number; +} = function () {}; +f["prop"] = 3; + + +/// [Declarations] //// + + + +//// [/.src/typeFromPropertyAssignment38.d.ts] +declare function F(): void; +declare const f: { + (): void; + prop: number; +}; +/// [Errors] //// + +typeFromPropertyAssignment38.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== typeFromPropertyAssignment38.ts (1 errors) ==== + function F(): void {} + ~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + F["prop"] = 3; + + const f: { + (): void; + prop: number; + } = function () {}; + f["prop"] = 3; + \ No newline at end of file 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..9e6551a534b77 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typesVersionsDeclarationEmit.multiFile.d.ts @@ -0,0 +1,86 @@ +//// [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(); + +//// [node_modules/ext/package.json] +{ + "name": "ext", + "version": "1.0.0", + "types": "index", + "typesVersions": { + ">=3.1.0-0": { "*" : ["ts3.1/*"] } + } +} + +//// [node_modules/ext/index.d.ts] +export interface A {} +export function fa(): A; + +//// [node_modules/ext/other.d.ts] +export interface B {} +export function fb(): B; + +//// [node_modules/ext/ts3.1/index.d.ts] +export interface A {} +export function fa(): A; + +//// [node_modules/ext/ts3.1/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; +/// [Errors] //// + +main.ts(4,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +main.ts(5,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== main.ts (2 errors) ==== + import { fa } from "ext"; + import { fb } from "ext/other"; + + export const va = fa(); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export const vb = fb(); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +==== 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..bb5fe73fc8186 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.d.ts @@ -0,0 +1,82 @@ +//// [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(); + +//// [node_modules/ext/package.json] +{ + "name": "ext", + "version": "1.0.0", + "types": "index", + "typesVersions": { + ">=3.1.0-0": { "*" : ["ts3.1/*"] } + } +} + +//// [node_modules/ext/index.d.ts] +export interface A {} +export function fa(): A; + +//// [node_modules/ext/other.d.ts] +export interface B {} +export function fb(): B; + +//// [node_modules/ext/ts3.1/index.d.ts] +export * from "../"; + +//// [node_modules/ext/ts3.1/other.d.ts] +export * from "../other"; + + +/// [Declarations] //// + + + +//// [/.src/main.d.ts] +export declare const va: any; +export declare const vb: invalid; +/// [Errors] //// + +main.ts(1,10): error TS2305: Module '"ext"' has no exported member 'fa'. +main.ts(5,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +==== 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..7581f4031ae9f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.d.ts @@ -0,0 +1,80 @@ +//// [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(); + +//// [node_modules/ext/package.json] +{ + "name": "ext", + "version": "1.0.0", + "types": "index", + "typesVersions": { + ">=3.1.0-0": { + "index" : ["ts3.1/index"] + } + } +} + +//// [node_modules/ext/index.d.ts] +export interface A {} +export function fa(): A; + +//// [node_modules/ext/other.d.ts] +export interface A2 {} +export function fa(): A2; + +//// [node_modules/ext/ts3.1/index.d.ts] +export * from "../other"; + + +/// [Declarations] //// + + + +//// [/.src/main.d.ts] +export declare const va: invalid; +export declare const va2: invalid; +/// [Errors] //// + +main.ts(4,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +main.ts(5,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== main.ts (2 errors) ==== + import { fa } from "ext"; + import { fa as fa2 } from "ext/other"; + + export const va = fa(); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export const va2 = fa2(); + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +==== 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/underscoreEscapedNameInEnum.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/underscoreEscapedNameInEnum.d.ts new file mode 100644 index 0000000000000..dae64b34c1cc3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/underscoreEscapedNameInEnum.d.ts @@ -0,0 +1,31 @@ +//// [tests/cases/compiler/underscoreEscapedNameInEnum.ts] //// + +//// [underscoreEscapedNameInEnum.ts] +enum E { + "__foo" = 1, + bar = E["__foo"] + 1 +} + + +/// [Declarations] //// + + + +//// [/.src/underscoreEscapedNameInEnum.d.ts] +declare enum E { + "__foo" = 1, + bar = 2 +} +/// [Errors] //// + +underscoreEscapedNameInEnum.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== underscoreEscapedNameInEnum.ts (1 errors) ==== + enum E { + "__foo" = 1, + bar = E["__foo"] + 1 + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/verbatimModuleSyntaxConstEnumUsage.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/verbatimModuleSyntaxConstEnumUsage.d.ts new file mode 100644 index 0000000000000..3d327c6e9786c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/verbatimModuleSyntaxConstEnumUsage.d.ts @@ -0,0 +1,60 @@ +//// [tests/cases/conformance/externalModules/verbatimModuleSyntaxConstEnumUsage.ts] //// + +//// [foo.ts] +export enum Foo { + a = 1, + b, + c, +} + +//// [bar.ts] +import {Foo} from './foo.js'; + +export enum Bar { + a = Foo.a, + c = Foo.c, + e = 5, +} + +/// [Declarations] //// + + + +//// [/.src/bar.d.ts] +export declare enum Bar { + a, + c, + e = 5 +} + +//// [/.src/foo.d.ts] +export declare enum Foo { + a = 1, + b = 2, + c = 3 +} +/// [Errors] //// + +bar.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +bar.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== foo.ts (0 errors) ==== + export enum Foo { + a = 1, + b, + c, + } + +==== bar.ts (2 errors) ==== + import {Foo} from './foo.js'; + + export enum Bar { + a = Foo.a, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = Foo.c, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + e = 5, + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/wellKnownSymbolExpando.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/wellKnownSymbolExpando.d.ts new file mode 100644 index 0000000000000..749bf20ac9627 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/wellKnownSymbolExpando.d.ts @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/wellKnownSymbolExpando.ts] //// + +//// [wellKnownSymbolExpando.ts] +function f(): void {} +f[Symbol.iterator] = function() {} + + +/// [Declarations] //// + + + +//// [/.src/wellKnownSymbolExpando.d.ts] +declare function f(): void; +/// [Errors] //// + +wellKnownSymbolExpando.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + +==== wellKnownSymbolExpando.ts (1 errors) ==== + function f(): void {} + ~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + f[Symbol.iterator] = function() {} + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments3_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments3_es6.d.ts new file mode 100644 index 0000000000000..a96697d1c9246 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments3_es6.d.ts @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments3_es6.ts] //// + +//// [FunctionPropertyAssignments3_es6.ts] +var v = { *{ } } + +/// [Declarations] //// + + + +//// [/.src/FunctionPropertyAssignments3_es6.d.ts] +declare var v: { + ""(): Generator; +}; +/// [Errors] //// + +FunctionPropertyAssignments3_es6.ts(1,12): error TS1003: Identifier expected. + + +==== FunctionPropertyAssignments3_es6.ts (1 errors) ==== + var v = { *{ } } + ~ +!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments5_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments5_es6.d.ts new file mode 100644 index 0000000000000..9d313da277a8a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments5_es6.d.ts @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts] //// + +//// [FunctionPropertyAssignments5_es6.ts] +var v = { *[foo()](): Generator { } } + +/// [Declarations] //// + + + +//// [/.src/FunctionPropertyAssignments5_es6.d.ts] +declare var v: { + [x: number]: () => Generator; +}; +/// [Errors] //// + +FunctionPropertyAssignments5_es6.ts(1,13): error TS2304: Cannot find name 'foo'. + + +==== FunctionPropertyAssignments5_es6.ts (1 errors) ==== + var v = { *[foo()](): Generator { } } + ~~~ +!!! error TS2304: Cannot find name 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration5_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration5_es6.d.ts new file mode 100644 index 0000000000000..170783205d996 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration5_es6.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration5_es6.ts] //// + +//// [MemberFunctionDeclaration5_es6.ts] +class C { + * +} + +/// [Declarations] //// + + + +//// [/.src/MemberFunctionDeclaration5_es6.d.ts] +declare class C { + (): any; +} +/// [Errors] //// + +MemberFunctionDeclaration5_es6.ts(3,1): error TS1003: Identifier expected. + + +==== MemberFunctionDeclaration5_es6.ts (1 errors) ==== + class C { + * + } + ~ +!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration6_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration6_es6.d.ts new file mode 100644 index 0000000000000..ecc66be5a2733 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration6_es6.d.ts @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration6_es6.ts] //// + +//// [MemberFunctionDeclaration6_es6.ts] +class C { + *foo +} + +/// [Declarations] //// + + + +//// [/.src/MemberFunctionDeclaration6_es6.d.ts] +declare class C { + foo(): any; +} +/// [Errors] //// + +MemberFunctionDeclaration6_es6.ts(2,5): error TS2391: Function implementation is missing or not immediately following the declaration. +MemberFunctionDeclaration6_es6.ts(3,1): error TS1005: '(' expected. + + +==== MemberFunctionDeclaration6_es6.ts (2 errors) ==== + class C { + *foo + ~~~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. + } + ~ +!!! error TS1005: '(' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnum1.d.ts new file mode 100644 index 0000000000000..284e559918e9a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnum1.d.ts @@ -0,0 +1,39 @@ +//// [tests/cases/compiler/ambientEnum1.ts] //// + +//// [ambientEnum1.ts] + declare enum E1 { + y = 4.23 + } + + // Ambient enum with computer member + declare enum E2 { + x = 'foo'.length + } + +/// [Declarations] //// + + + +//// [/.src/ambientEnum1.d.ts] +declare enum E1 { + y = 4.23 +} +declare enum E2 { + x +} +/// [Errors] //// + +ambientEnum1.ts(7,13): error TS1066: In ambient enum declarations member initializer must be constant expression. + + +==== ambientEnum1.ts (1 errors) ==== + declare enum E1 { + y = 4.23 + } + + // Ambient enum with computer member + declare enum E2 { + x = 'foo'.length + ~~~~~~~~~~~~ +!!! error TS1066: In ambient enum declarations member initializer must be constant expression. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnumDeclaration1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnumDeclaration1.d.ts new file mode 100644 index 0000000000000..7ffe81958ecb8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnumDeclaration1.d.ts @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/ambient/ambientEnumDeclaration1.ts] //// + +//// [ambientEnumDeclaration1.ts] +// In ambient enum declarations, all values specified in enum member declarations must be classified as constant enum expressions. + +declare enum E { + a = 10, + b = 10 + 1, + c = b, + d = (c) + 1, + e = 10 << 2 * 8, +} + +/// [Declarations] //// + + + +//// [/.src/ambientEnumDeclaration1.d.ts] +declare enum E { + a = 10, + b = 11, + c = 11, + d = 12, + e = 655360 +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientErrors.d.ts new file mode 100644 index 0000000000000..6338a532ad6f4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientErrors.d.ts @@ -0,0 +1,208 @@ +//// [tests/cases/conformance/ambient/ambientErrors.ts] //// + +//// [ambientErrors.ts] +// Ambient variable with an initializer +declare var x = 4; + +// Ambient functions with invalid overloads +declare function fn(x: number): string; +declare function fn(x: 'foo'): number; + +// Ambient functions with duplicate signatures +declare function fn1(x: number): string; +declare function fn1(x: number): string; + +// Ambient function overloads that differ only by return type +declare function fn2(x: number): string; +declare function fn2(x: number): number; + +// Ambient function with default parameter values +declare function fn3(x: number = 3): any; + +// Ambient function with function body +declare function fn4(): void { }; + +// Ambient enum with non - integer literal constant member +declare enum E1 { + y = 4.23 +} + +// Ambient enum with computer member +declare enum E2 { + x = 'foo'.length +} + +// Ambient module with initializers for values, bodies for functions / classes +declare module M1 { + var x = 3; + function fn(): void { } + class C { + static x = 3; + y = 4; + constructor() { } + fn(): void { } + static sfn(): void { } + } +} + +// Ambient external module not in the global module +module M2 { + declare module 'nope' { } +} + +// Ambient external module with a string literal name that isn't a top level external module name +declare module '../foo' { } + +// Ambient external module with export assignment and other exported members +declare module 'bar' { + var n: any; + export var q: any; + export = n; +} + + +/// [Declarations] //// + + + +//// [/.src/ambientErrors.d.ts] +declare var x: number; +declare function fn(x: number): string; +declare function fn(x: 'foo'): number; +declare function fn1(x: number): string; +declare function fn1(x: number): string; +declare function fn2(x: number): string; +declare function fn2(x: number): number; +declare function fn3(x?: number): any; +declare function fn4(): void; +declare enum E1 { + y = 4.23 +} +declare enum E2 { + x +} +declare namespace M1 { + var x: number; + function fn(): void; + class C { + static x: number; + y: number; + constructor(); + fn(): void; + static sfn(): void; + } +} +declare namespace M2 { +} +declare module '../foo' { } +declare module 'bar' { + var n: any; + export var q: any; + export = n; +} +/// [Errors] //// + +ambientErrors.ts(2,17): error TS1039: Initializers are not allowed in ambient contexts. +ambientErrors.ts(17,22): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. +ambientErrors.ts(20,30): error TS1183: An implementation cannot be declared in ambient contexts. +ambientErrors.ts(29,9): error TS1066: In ambient enum declarations member initializer must be constant expression. +ambientErrors.ts(34,13): error TS1039: Initializers are not allowed in ambient contexts. +ambientErrors.ts(35,25): error TS1183: An implementation cannot be declared in ambient contexts. +ambientErrors.ts(37,20): error TS1039: Initializers are not allowed in ambient contexts. +ambientErrors.ts(38,13): error TS1039: Initializers are not allowed in ambient contexts. +ambientErrors.ts(39,23): error TS1183: An implementation cannot be declared in ambient contexts. +ambientErrors.ts(40,20): error TS1183: An implementation cannot be declared in ambient contexts. +ambientErrors.ts(41,28): error TS1183: An implementation cannot be declared in ambient contexts. +ambientErrors.ts(47,20): error TS2435: Ambient modules cannot be nested in other modules or namespaces. +ambientErrors.ts(51,16): error TS2436: Ambient module declaration cannot specify relative module name. +ambientErrors.ts(57,5): error TS2309: An export assignment cannot be used in a module with other exported elements. + + +==== ambientErrors.ts (14 errors) ==== + // Ambient variable with an initializer + declare var x = 4; + ~ +!!! error TS1039: Initializers are not allowed in ambient contexts. + + // Ambient functions with invalid overloads + declare function fn(x: number): string; + declare function fn(x: 'foo'): number; + + // Ambient functions with duplicate signatures + declare function fn1(x: number): string; + declare function fn1(x: number): string; + + // Ambient function overloads that differ only by return type + declare function fn2(x: number): string; + declare function fn2(x: number): number; + + // Ambient function with default parameter values + declare function fn3(x: number = 3): any; + ~~~~~~~~~~~~~ +!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. + + // Ambient function with function body + declare function fn4(): void { }; + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + + // Ambient enum with non - integer literal constant member + declare enum E1 { + y = 4.23 + } + + // Ambient enum with computer member + declare enum E2 { + x = 'foo'.length + ~~~~~~~~~~~~ +!!! error TS1066: In ambient enum declarations member initializer must be constant expression. + } + + // Ambient module with initializers for values, bodies for functions / classes + declare module M1 { + var x = 3; + ~ +!!! error TS1039: Initializers are not allowed in ambient contexts. + function fn(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + class C { + static x = 3; + ~ +!!! error TS1039: Initializers are not allowed in ambient contexts. + y = 4; + ~ +!!! error TS1039: Initializers are not allowed in ambient contexts. + constructor() { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + fn(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + static sfn(): void { } + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + } + } + + // Ambient external module not in the global module + module M2 { + declare module 'nope' { } + ~~~~~~ +!!! error TS2435: Ambient modules cannot be nested in other modules or namespaces. + } + + // Ambient external module with a string literal name that isn't a top level external module name + declare module '../foo' { } + ~~~~~~~~ +!!! error TS2436: Ambient module declaration cannot specify relative module name. + + // Ambient external module with export assignment and other exported members + declare module 'bar' { + var n: any; + export var q: any; + export = n; + ~~~~~~~~~~~ +!!! error TS2309: An export assignment cannot be used in a module with other exported elements. + } + \ 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..893b14ffd244d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrayFakeFlatNoCrashInferenceDeclarations.d.ts @@ -0,0 +1,55 @@ +//// [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] //// + + + +//// [/.src/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): any; +/// [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/arrowFunctionContexts.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrowFunctionContexts.d.ts new file mode 100644 index 0000000000000..36f9b3ad7fae1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrowFunctionContexts.d.ts @@ -0,0 +1,257 @@ +//// [tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts] //// + +//// [arrowFunctionContexts.ts] +// Arrow function used in with statement +with (window) { + var p = () => this; +} + +// Arrow function as argument to super call +class Base { + constructor(n: any) { } +} + +class Derived extends Base { + constructor() { + super(() => this); + } +} + +// Arrow function as function argument +window.setTimeout(() => null, 100); + +// Arrow function as value in array literal + +var obj = (n: number): string => ''; +var obj: { (n: number): string; }; // OK + +var arr: ((n: number) => string)[] = [(n: number) => '']; +var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) + +// Arrow function as enum value +enum E { + x = () => 4, // Error expected + y = (() => this).length // error, can't use this in enum +} + +// Arrow function as module variable initializer +module M { + export var a = (s: any): string => ''; + var b = (s) => s; +} + +// Repeat above for module members that are functions? (necessary to redo all of them?) +module M2 { + // Arrow function used in with statement + with (window) { + var p = () => this; + } + + // Arrow function as argument to super call + class Base { + constructor(n: any) { } + } + + class Derived extends Base { + constructor() { + super(() => this); + } + } + + // Arrow function as function argument + window.setTimeout(() => null, 100); + + // Arrow function as value in array literal + + var obj = (n: number) => ''; + var obj: { (n: number): string; }; // OK + + var arr = [(n: number) => '']; + var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) + + // Arrow function as enum value + enum E { + x = () => 4, // Error expected + y = (() => this).length + } + + // Arrow function as module variable initializer + module M { + export var a = (s) => ''; + var b = (s) => s; + } + +} + +// (ParamList) => { ... } is a generic arrow function +var generic1 = (n: T): T[] => [n]; +var generic1: { (n: T): T[] }; // Incorrect error, Bug 829597 +var generic2 = (n: T): T[] => { return [n]; }; +var generic2: { (n: T): T[] }; + +// ((ParamList) => { ... } ) is a type assertion to an arrow function +var asserted1 = ((n) => [n]); +var asserted1: any; +var asserted2 = ((n) => { return n; }); +var asserted2: any; + + + +/// [Declarations] //// + + + +//// [/.src/arrowFunctionContexts.d.ts] +declare class Base { + constructor(n: any); +} +declare class Derived extends Base { + constructor(); +} +declare var obj: (n: number) => string; +declare var obj: { + (n: number): string; +}; +declare var arr: ((n: number) => string)[]; +declare var arr: { + (n: number): string; +}[]; +declare enum E { + x,// Error expected + y +} +declare namespace M { + var a: (s: any) => string; +} +declare namespace M2 { +} +declare var generic1: (n: T) => T[]; +declare var generic1: { + (n: T): T[]; +}; +declare var generic2: (n: T) => T[]; +declare var generic2: { + (n: T): T[]; +}; +declare var asserted1: any; +declare var asserted1: any; +declare var asserted2: any; +declare var asserted2: any; +/// [Errors] //// + +arrowFunctionContexts.ts(2,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +arrowFunctionContexts.ts(30,9): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. +arrowFunctionContexts.ts(31,16): error TS2332: 'this' cannot be referenced in current location. +arrowFunctionContexts.ts(43,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. +arrowFunctionContexts.ts(71,13): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. +arrowFunctionContexts.ts(72,20): error TS2332: 'this' cannot be referenced in current location. + + +==== arrowFunctionContexts.ts (6 errors) ==== + // Arrow function used in with statement + with (window) { + ~~~~~~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + var p = () => this; + } + + // Arrow function as argument to super call + class Base { + constructor(n: any) { } + } + + class Derived extends Base { + constructor() { + super(() => this); + } + } + + // Arrow function as function argument + window.setTimeout(() => null, 100); + + // Arrow function as value in array literal + + var obj = (n: number): string => ''; + var obj: { (n: number): string; }; // OK + + var arr: ((n: number) => string)[] = [(n: number) => '']; + var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) + + // Arrow function as enum value + enum E { + x = () => 4, // Error expected + ~~~~~~~ +!!! error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. + y = (() => this).length // error, can't use this in enum + ~~~~ +!!! error TS2332: 'this' cannot be referenced in current location. + } + + // Arrow function as module variable initializer + module M { + export var a = (s: any): string => ''; + var b = (s) => s; + } + + // Repeat above for module members that are functions? (necessary to redo all of them?) + module M2 { + // Arrow function used in with statement + with (window) { + ~~~~~~~~~~~~~ +!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. + var p = () => this; + } + + // Arrow function as argument to super call + class Base { + constructor(n: any) { } + } + + class Derived extends Base { + constructor() { + super(() => this); + } + } + + // Arrow function as function argument + window.setTimeout(() => null, 100); + + // Arrow function as value in array literal + + var obj = (n: number) => ''; + var obj: { (n: number): string; }; // OK + + var arr = [(n: number) => '']; + var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) + + // Arrow function as enum value + enum E { + x = () => 4, // Error expected + ~~~~~~~ +!!! error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. + y = (() => this).length + ~~~~ +!!! error TS2332: 'this' cannot be referenced in current location. + } + + // Arrow function as module variable initializer + module M { + export var a = (s) => ''; + var b = (s) => s; + } + + } + + // (ParamList) => { ... } is a generic arrow function + var generic1 = (n: T): T[] => [n]; + var generic1: { (n: T): T[] }; // Incorrect error, Bug 829597 + var generic2 = (n: T): T[] => { return [n]; }; + var generic2: { (n: T): T[] }; + + // ((ParamList) => { ... } ) is a type assertion to an arrow function + var asserted1 = ((n) => [n]); + var asserted1: any; + var asserted2 = ((n) => { return n; }); + var asserted2: any; + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier.d.ts new file mode 100644 index 0000000000000..3ed6dbb2aab03 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/compiler/classMemberWithMissingIdentifier.ts] //// + +//// [classMemberWithMissingIdentifier.ts] +class C { + public {}; +} + +/// [Declarations] //// + + + +//// [/.src/classMemberWithMissingIdentifier.d.ts] +declare class C { + : any; +} +/// [Errors] //// + +classMemberWithMissingIdentifier.ts(2,11): error TS1146: Declaration expected. +classMemberWithMissingIdentifier.ts(2,12): error TS1005: ';' expected. +classMemberWithMissingIdentifier.ts(3,1): error TS1128: Declaration or statement expected. + + +==== classMemberWithMissingIdentifier.ts (3 errors) ==== + class C { + public {}; + +!!! error TS1146: Declaration expected. + ~ +!!! error TS1005: ';' expected. + } + ~ +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier2.d.ts new file mode 100644 index 0000000000000..3d44a88f0fae9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier2.d.ts @@ -0,0 +1,44 @@ +//// [tests/cases/compiler/classMemberWithMissingIdentifier2.ts] //// + +//// [classMemberWithMissingIdentifier2.ts] +class C { + public {[name:string]:VariableDeclaration}; +} + +/// [Declarations] //// + + + +//// [/.src/classMemberWithMissingIdentifier2.d.ts] +declare class C { + : any; +} +/// [Errors] //// + +classMemberWithMissingIdentifier2.ts(2,11): error TS1146: Declaration expected. +classMemberWithMissingIdentifier2.ts(2,12): error TS1005: ';' expected. +classMemberWithMissingIdentifier2.ts(2,18): error TS1005: ',' expected. +classMemberWithMissingIdentifier2.ts(2,19): error TS2693: 'string' only refers to a type, but is being used as a value here. +classMemberWithMissingIdentifier2.ts(2,26): error TS1005: ';' expected. +classMemberWithMissingIdentifier2.ts(2,27): error TS2304: Cannot find name 'VariableDeclaration'. +classMemberWithMissingIdentifier2.ts(3,1): error TS1128: Declaration or statement expected. + + +==== classMemberWithMissingIdentifier2.ts (7 errors) ==== + class C { + public {[name:string]:VariableDeclaration}; + +!!! error TS1146: Declaration expected. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1005: ',' expected. + ~~~~~~ +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. + ~ +!!! error TS1005: ';' expected. + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'VariableDeclaration'. + } + ~ +!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/collisionCodeGenEnumWithEnumMemberConflict.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/collisionCodeGenEnumWithEnumMemberConflict.d.ts new file mode 100644 index 0000000000000..5883b38d30d64 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/collisionCodeGenEnumWithEnumMemberConflict.d.ts @@ -0,0 +1,17 @@ +//// [tests/cases/compiler/collisionCodeGenEnumWithEnumMemberConflict.ts] //// + +//// [collisionCodeGenEnumWithEnumMemberConflict.ts] +enum Color { + Color, + Thing = Color +} + +/// [Declarations] //// + + + +//// [/.src/collisionCodeGenEnumWithEnumMemberConflict.d.ts] +declare enum Color { + Color = 0, + Thing = 0 +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commonMissingSemicolons.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commonMissingSemicolons.d.ts new file mode 100644 index 0000000000000..45adff59b8202 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commonMissingSemicolons.d.ts @@ -0,0 +1,450 @@ +//// [tests/cases/compiler/commonMissingSemicolons.ts] //// + +//// [commonMissingSemicolons.ts] +async function myAsyncFunction1(): Promise {} +asynd function myAsyncFunction2(): void {} +sasync function myAsyncFunction3(): void {} + +// Arrow functions don't (yet?) parse as nicely as standalone functions. +// Eventually it would be good to get them the same "did you mean" for typos such as "asyncd". +const myAsyncArrow1 = async (): Promise => 3; +const myAsyncArrow2: any = asyncd () => 3; + +class MyClass1 {} +clasd MyClass2 {} +classs MyClass3 {} + +const myConst1 = 1; +consd myConst2 = 1; +constd myConst3 = 1; + +declare const myDeclareConst1: 1; +declared const myDeclareConst2: 1; +declare constd myDeclareConst3: 1; +declared constd myDeclareConst4: 1; +declareconst myDeclareConst5; + +function myFunction1(): void { } +functiond myFunction2() { } +function function(): void { } +functionMyFunction; + +interface myInterface1 { } +interfaced myInterface2 { } +interface interface { } +interface { } +interface void { } +interfaceMyInterface { } + +let let = 1; +let let1 = 1; +letd let2 = 1; +letMyLet; + +type type; +type type1 = {}; +type type2 = type; +type type3 = {}; +typed type4 = {} +typed type5 = type; +typeMyType; + +var myVar1 = 1; +vard myVar2 = 1; +varMyVar; + +class NoSemicolonClassA { + ['a'] = 0 + {} +} + +class NoSemicolonClassB { + ['a'] = 0 + {} +} + +class NoSemicolonClassC { + ['a'] = 0; + {} +} + +class NoSemicolonClassD { + ['a']: any = 0 + ['b']() {} +} + +class NoSemicolonClassE { + ['a']: any = 0 + ['b']() { + c: true + } +} + + +/// [Declarations] //// + + + +//// [/.src/commonMissingSemicolons.d.ts] +declare function myAsyncFunction1(): Promise; +declare function myAsyncFunction2(): void; +declare function myAsyncFunction3(): void; +declare const myAsyncArrow1: () => Promise; +declare const myAsyncArrow2: any; +declare class MyClass1 { +} +declare const myConst1 = 1; +declare const myDeclareConst1: 1; +declare const myDeclareConst2: 1; +declare function myFunction1(): void; +declare function (): any; +interface myInterface1 { +} +interface interface { +} +declare let let: number; +declare let let1: number; +type type = ; +type type1 = {}; +type type2 = type; +type type3 = {}; +declare var myVar1: number; +declare class NoSemicolonClassA { + ['a']: number; +} +declare class NoSemicolonClassB { + ['a']: number; +} +declare class NoSemicolonClassC { + ['a']: number; +} +declare class NoSemicolonClassD { + ['a']: any; +} +declare class NoSemicolonClassE { + ['a']: any; +} +/// [Errors] //// + +commonMissingSemicolons.ts(1,36): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +commonMissingSemicolons.ts(2,1): error TS1435: Unknown keyword or identifier. Did you mean 'async'? +commonMissingSemicolons.ts(2,1): error TS2304: Cannot find name 'asynd'. +commonMissingSemicolons.ts(3,1): error TS1435: Unknown keyword or identifier. Did you mean 'async'? +commonMissingSemicolons.ts(3,1): error TS2304: Cannot find name 'sasync'. +commonMissingSemicolons.ts(7,33): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. +commonMissingSemicolons.ts(8,28): error TS2304: Cannot find name 'asyncd'. +commonMissingSemicolons.ts(8,38): error TS1005: ';' expected. +commonMissingSemicolons.ts(11,1): error TS1435: Unknown keyword or identifier. Did you mean 'class'? +commonMissingSemicolons.ts(11,1): error TS2304: Cannot find name 'clasd'. +commonMissingSemicolons.ts(11,7): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(11,7): error TS2552: Cannot find name 'MyClass2'. Did you mean 'MyClass1'? +commonMissingSemicolons.ts(12,1): error TS1435: Unknown keyword or identifier. Did you mean 'class'? +commonMissingSemicolons.ts(12,1): error TS2304: Cannot find name 'classs'. +commonMissingSemicolons.ts(12,8): error TS1434: Unexpected keyword or identifier. +commonMissingSemicolons.ts(12,8): error TS2552: Cannot find name 'MyClass3'. Did you mean 'MyClass1'? +commonMissingSemicolons.ts(15,1): error TS1435: Unknown keyword or identifier. Did you mean 'const'? +commonMissingSemicolons.ts(15,1): error TS2304: Cannot find name 'consd'. +commonMissingSemicolons.ts(15,7): error TS2552: Cannot find name 'myConst2'. Did you mean 'myConst1'? +commonMissingSemicolons.ts(16,1): error TS1435: Unknown keyword or identifier. Did you mean 'const'? +commonMissingSemicolons.ts(16,1): error TS2304: Cannot find name 'constd'. +commonMissingSemicolons.ts(16,8): error TS2304: Cannot find name 'myConst3'. +commonMissingSemicolons.ts(19,1): error TS1435: Unknown keyword or identifier. Did you mean 'declare'? +commonMissingSemicolons.ts(19,1): error TS2304: Cannot find name 'declared'. +commonMissingSemicolons.ts(20,1): error TS2304: Cannot find name 'declare'. +commonMissingSemicolons.ts(20,9): error TS1435: Unknown keyword or identifier. Did you mean 'const'? +commonMissingSemicolons.ts(20,9): error TS2304: Cannot find name 'constd'. +commonMissingSemicolons.ts(21,1): error TS1435: Unknown keyword or identifier. Did you mean 'declare'? +commonMissingSemicolons.ts(21,1): error TS2304: Cannot find name 'declared'. +commonMissingSemicolons.ts(21,10): error TS1435: Unknown keyword or identifier. Did you mean 'const'? +commonMissingSemicolons.ts(21,10): error TS2304: Cannot find name 'constd'. +commonMissingSemicolons.ts(22,1): error TS1435: Unknown keyword or identifier. Did you mean 'declare const'? +commonMissingSemicolons.ts(22,1): error TS2304: Cannot find name 'declareconst'. +commonMissingSemicolons.ts(22,14): error TS2304: Cannot find name 'myDeclareConst5'. +commonMissingSemicolons.ts(25,1): error TS1435: Unknown keyword or identifier. Did you mean 'function'? +commonMissingSemicolons.ts(25,1): error TS2304: Cannot find name 'functiond'. +commonMissingSemicolons.ts(25,11): error TS2304: Cannot find name 'myFunction2'. +commonMissingSemicolons.ts(25,25): error TS1005: ';' expected. +commonMissingSemicolons.ts(26,10): error TS1359: Identifier expected. 'function' is a reserved word that cannot be used here. +commonMissingSemicolons.ts(26,18): error TS1003: Identifier expected. +commonMissingSemicolons.ts(27,1): error TS2304: Cannot find name 'functionMyFunction'. +commonMissingSemicolons.ts(30,1): error TS1435: Unknown keyword or identifier. Did you mean 'interface'? +commonMissingSemicolons.ts(30,1): error TS2304: Cannot find name 'interfaced'. +commonMissingSemicolons.ts(30,12): error TS1435: Unknown keyword or identifier. Did you mean 'interface'? +commonMissingSemicolons.ts(30,12): error TS2304: Cannot find name 'myInterface2'. +commonMissingSemicolons.ts(32,1): error TS2693: 'interface' only refers to a type, but is being used as a value here. +commonMissingSemicolons.ts(32,11): error TS1438: Interface must be given a name. +commonMissingSemicolons.ts(33,1): error TS2693: 'interface' only refers to a type, but is being used as a value here. +commonMissingSemicolons.ts(33,11): error TS2427: Interface name cannot be 'void'. +commonMissingSemicolons.ts(34,1): error TS1435: Unknown keyword or identifier. Did you mean 'interface MyInterface'? +commonMissingSemicolons.ts(34,1): error TS2304: Cannot find name 'interfaceMyInterface'. +commonMissingSemicolons.ts(38,1): error TS1435: Unknown keyword or identifier. Did you mean 'let'? +commonMissingSemicolons.ts(38,1): error TS2304: Cannot find name 'letd'. +commonMissingSemicolons.ts(38,6): error TS2304: Cannot find name 'let2'. +commonMissingSemicolons.ts(39,1): error TS2304: Cannot find name 'letMyLet'. +commonMissingSemicolons.ts(41,10): error TS4081: Exported type alias 'type' has or is using private name ''. +commonMissingSemicolons.ts(41,10): error TS1005: '=' expected. +commonMissingSemicolons.ts(45,1): error TS1435: Unknown keyword or identifier. Did you mean 'type'? +commonMissingSemicolons.ts(45,1): error TS2304: Cannot find name 'typed'. +commonMissingSemicolons.ts(45,7): error TS2304: Cannot find name 'type4'. +commonMissingSemicolons.ts(46,1): error TS1435: Unknown keyword or identifier. Did you mean 'type'? +commonMissingSemicolons.ts(46,1): error TS2304: Cannot find name 'typed'. +commonMissingSemicolons.ts(46,7): error TS2304: Cannot find name 'type5'. +commonMissingSemicolons.ts(46,15): error TS2693: 'type' only refers to a type, but is being used as a value here. +commonMissingSemicolons.ts(47,1): error TS2304: Cannot find name 'typeMyType'. +commonMissingSemicolons.ts(50,1): error TS1435: Unknown keyword or identifier. Did you mean 'var'? +commonMissingSemicolons.ts(50,1): error TS2304: Cannot find name 'vard'. +commonMissingSemicolons.ts(50,6): error TS2304: Cannot find name 'myVar2'. +commonMissingSemicolons.ts(51,1): error TS2304: Cannot find name 'varMyVar'. +commonMissingSemicolons.ts(55,3): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +commonMissingSemicolons.ts(56,1): error TS1128: Declaration or statement expected. +commonMissingSemicolons.ts(60,3): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +commonMissingSemicolons.ts(61,1): error TS1128: Declaration or statement expected. +commonMissingSemicolons.ts(65,3): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +commonMissingSemicolons.ts(66,1): error TS1128: Declaration or statement expected. +commonMissingSemicolons.ts(70,11): error TS1005: ';' expected. +commonMissingSemicolons.ts(71,1): error TS1128: Declaration or statement expected. +commonMissingSemicolons.ts(75,11): error TS1005: ';' expected. +commonMissingSemicolons.ts(78,1): error TS1128: Declaration or statement expected. + + +==== commonMissingSemicolons.ts (79 errors) ==== + async function myAsyncFunction1(): Promise {} + ~~~~~~~~~~~~~ +!!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + asynd function myAsyncFunction2(): void {} + ~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'async'? + ~~~~~ +!!! error TS2304: Cannot find name 'asynd'. + sasync function myAsyncFunction3(): void {} + ~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'async'? + ~~~~~~ +!!! error TS2304: Cannot find name 'sasync'. + + // Arrow functions don't (yet?) parse as nicely as standalone functions. + // Eventually it would be good to get them the same "did you mean" for typos such as "asyncd". + const myAsyncArrow1 = async (): Promise => 3; + ~~~~~~~~~~~~~~~ +!!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. + const myAsyncArrow2: any = asyncd () => 3; + ~~~~~~ +!!! error TS2304: Cannot find name 'asyncd'. + ~~ +!!! error TS1005: ';' expected. + + class MyClass1 {} + clasd MyClass2 {} + ~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'class'? + ~~~~~ +!!! error TS2304: Cannot find name 'clasd'. + ~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~ +!!! error TS2552: Cannot find name 'MyClass2'. Did you mean 'MyClass1'? +!!! related TS2728 commonMissingSemicolons.ts:10:7: 'MyClass1' is declared here. + classs MyClass3 {} + ~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'class'? + ~~~~~~ +!!! error TS2304: Cannot find name 'classs'. + ~~~~~~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~~~~~~ +!!! error TS2552: Cannot find name 'MyClass3'. Did you mean 'MyClass1'? +!!! related TS2728 commonMissingSemicolons.ts:10:7: 'MyClass1' is declared here. + + const myConst1 = 1; + consd myConst2 = 1; + ~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? + ~~~~~ +!!! error TS2304: Cannot find name 'consd'. + ~~~~~~~~ +!!! error TS2552: Cannot find name 'myConst2'. Did you mean 'myConst1'? +!!! related TS2728 commonMissingSemicolons.ts:14:7: 'myConst1' is declared here. + constd myConst3 = 1; + ~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? + ~~~~~~ +!!! error TS2304: Cannot find name 'constd'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'myConst3'. + + declare const myDeclareConst1: 1; + declared const myDeclareConst2: 1; + ~~~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'declare'? + ~~~~~~~~ +!!! error TS2304: Cannot find name 'declared'. + declare constd myDeclareConst3: 1; + ~~~~~~~ +!!! error TS2304: Cannot find name 'declare'. + ~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? + ~~~~~~ +!!! error TS2304: Cannot find name 'constd'. + declared constd myDeclareConst4: 1; + ~~~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'declare'? + ~~~~~~~~ +!!! error TS2304: Cannot find name 'declared'. + ~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? + ~~~~~~ +!!! error TS2304: Cannot find name 'constd'. + declareconst myDeclareConst5; + ~~~~~~~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'declare const'? + ~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'declareconst'. + ~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'myDeclareConst5'. + + function myFunction1(): void { } + functiond myFunction2() { } + ~~~~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'function'? + ~~~~~~~~~ +!!! error TS2304: Cannot find name 'functiond'. + ~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'myFunction2'. + ~ +!!! error TS1005: ';' expected. + function function(): void { } + ~~~~~~~~ +!!! error TS1359: Identifier expected. 'function' is a reserved word that cannot be used here. + ~ +!!! error TS1003: Identifier expected. + functionMyFunction; + ~~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'functionMyFunction'. + + interface myInterface1 { } + interfaced myInterface2 { } + ~~~~~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'interface'? + ~~~~~~~~~~ +!!! error TS2304: Cannot find name 'interfaced'. + ~~~~~~~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'interface'? + ~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'myInterface2'. + interface interface { } + interface { } + ~~~~~~~~~ +!!! error TS2693: 'interface' only refers to a type, but is being used as a value here. + ~ +!!! error TS1438: Interface must be given a name. + interface void { } + ~~~~~~~~~ +!!! error TS2693: 'interface' only refers to a type, but is being used as a value here. + ~~~~ +!!! error TS2427: Interface name cannot be 'void'. + interfaceMyInterface { } + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'interface MyInterface'? + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'interfaceMyInterface'. + + let let = 1; + let let1 = 1; + letd let2 = 1; + ~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'let'? + ~~~~ +!!! error TS2304: Cannot find name 'letd'. + ~~~~ +!!! error TS2304: Cannot find name 'let2'. + letMyLet; + ~~~~~~~~ +!!! error TS2304: Cannot find name 'letMyLet'. + + type type; + +!!! error TS4081: Exported type alias 'type' has or is using private name ''. + ~ +!!! error TS1005: '=' expected. + type type1 = {}; + type type2 = type; + type type3 = {}; + typed type4 = {} + ~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'type'? + ~~~~~ +!!! error TS2304: Cannot find name 'typed'. + ~~~~~ +!!! error TS2304: Cannot find name 'type4'. + typed type5 = type; + ~~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'type'? + ~~~~~ +!!! error TS2304: Cannot find name 'typed'. + ~~~~~ +!!! error TS2304: Cannot find name 'type5'. + ~~~~ +!!! error TS2693: 'type' only refers to a type, but is being used as a value here. + typeMyType; + ~~~~~~~~~~ +!!! error TS2304: Cannot find name 'typeMyType'. + + var myVar1 = 1; + vard myVar2 = 1; + ~~~~ +!!! error TS1435: Unknown keyword or identifier. Did you mean 'var'? + ~~~~ +!!! error TS2304: Cannot find name 'vard'. + ~~~~~~ +!!! error TS2304: Cannot find name 'myVar2'. + varMyVar; + ~~~~~~~~ +!!! error TS2304: Cannot find name 'varMyVar'. + + class NoSemicolonClassA { + ['a'] = 0 + {} + ~ +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. + } + ~ +!!! error TS1128: Declaration or statement expected. + + class NoSemicolonClassB { + ['a'] = 0 + {} + ~ +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. + } + ~ +!!! error TS1128: Declaration or statement expected. + + class NoSemicolonClassC { + ['a'] = 0; + {} + ~ +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. + } + ~ +!!! error TS1128: Declaration or statement expected. + + class NoSemicolonClassD { + ['a']: any = 0 + ['b']() {} + ~ +!!! error TS1005: ';' expected. + } + ~ +!!! error TS1128: Declaration or statement expected. + + class NoSemicolonClassE { + ['a']: any = 0 + ['b']() { + ~ +!!! error TS1005: ';' expected. + c: true + } + } + ~ +!!! error TS1128: Declaration or statement expected. + \ No newline at end of file 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..e85152d395fa4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedEnumTypeWidening.d.ts @@ -0,0 +1,125 @@ +//// [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] //// + + + +//// [/.src/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; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES5.d.ts new file mode 100644 index 0000000000000..03921269d45b9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES5.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts] //// + +//// [computedPropertyNames10_ES5.ts] +var s: string; +var n: number; +var a: any; +var v = { + [s](): void { }, + [n](): void { }, + [s + s](): void { }, + [s + n](): void { }, + [+s](): void { }, + [""](): void { }, + [0](): void { }, + [a](): void { }, + [true](): void { }, + [`hello bye`](): void { }, + [`hello ${a} bye`](): void { } +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames10_ES5.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare var v: { + [x: string]: () => void; + [x: number]: () => void; + ""(): void; + 0(): void; + "hello bye"(): void; +}; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES6.d.ts new file mode 100644 index 0000000000000..49ff540bd7859 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES6.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts] //// + +//// [computedPropertyNames10_ES6.ts] +var s: string; +var n: number; +var a: any; +var v = { + [s](): void { }, + [n](): void { }, + [s + s](): void { }, + [s + n](): void { }, + [+s](): void { }, + [""](): void { }, + [0](): void { }, + [a](): void { }, + [true](): void { }, + [`hello bye`](): void { }, + [`hello ${a} bye`](): void { } +} + +/// [Declarations] //// + + + +//// [/.src/computedPropertyNames10_ES6.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare var v: { + [x: string]: () => void; + [x: number]: () => void; + ""(): void; + 0(): void; + "hello bye"(): void; +}; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum1.d.ts new file mode 100644 index 0000000000000..5803b4864924e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum1.d.ts @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/constEnums/constEnum1.ts] //// + +//// [constEnum1.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. + +const enum E { + a = 10, + b = a, + c = (a+1), + e, + d = ~e, + f = a << 2 >> 1, + g = a << 2 >>> 1, + h = a | b +} + +/// [Declarations] //// + + + +//// [/.src/constEnum1.d.ts] +declare const enum E { + a = 10, + b = 10, + c = 11, + e = 12, + d = -13, + f = 20, + g = 20, + h = 10 +} 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..9af680c6a31bd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum2.d.ts @@ -0,0 +1,56 @@ +//// [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] //// + + + +//// [/.src/constEnum2.d.ts] +declare const CONST: number; +declare const enum D { + d = 10, + e, + f, + g +} +/// [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/constEnumDeclarations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumDeclarations.d.ts new file mode 100644 index 0000000000000..7dbf6474286eb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumDeclarations.d.ts @@ -0,0 +1,30 @@ +//// [tests/cases/compiler/constEnumDeclarations.ts] //// + +//// [constEnumDeclarations.ts] +const enum E { + A = 1, + B = 2, + C = A | B +} + +const enum E2 { + A = 1, + B, + C +} + +/// [Declarations] //// + + + +//// [/.src/constEnumDeclarations.d.ts] +declare const enum E { + A = 1, + B = 2, + C = 3 +} +declare const enum E2 { + A = 1, + B = 2, + C = 3 +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumErrors.d.ts new file mode 100644 index 0000000000000..fa2fccdce931c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumErrors.d.ts @@ -0,0 +1,180 @@ +//// [tests/cases/compiler/constEnumErrors.ts] //// + +//// [constEnumErrors.ts] +const enum E { + A +} + +module E { + var x = 1; +} + +const enum E1 { + // illegal case + // forward reference to the element of the same enum + X = Y, + // forward reference to the element of the same enum + Y = E1.Z, + Y1 = E1["Z"] +} + +const enum E2 { + A +} + +var y0: any = E2[1] +var name = "A"; +var y1: any = E2[name]; +var y2: any = E2[`${name}`]; + +var x: typeof E2 = E2; +var y: (typeof E2)[] = [E2]; + +function foo(t: any): void { +} + +foo(E2); + +const enum NaNOrInfinity { + A = 9007199254740992, + B = A * A, + C = B * B, + D = C * C, + E = D * D, + F = E * E, // overflow + G = 1 / 0, // overflow + H = 0 / 0 // NaN +} + +/// [Declarations] //// + + + +//// [/.src/constEnumErrors.d.ts] +declare const enum E { + A = 0 +} +declare namespace E { +} +declare const enum E1 { + X = 0, + Y, + Y1 +} +declare const enum E2 { + A = 0 +} +declare var y0: any; +declare var name: string; +declare var y1: any; +declare var y2: any; +declare var x: typeof E2; +declare var y: (typeof E2)[]; +declare function foo(t: any): void; +declare const enum NaNOrInfinity { + A = 9007199254740992, + B = 8.112963841460668e+31, + C = 6.582018229284824e+63, + D = 4.332296397063773e+127, + E = 1.876879207201175e+255, + F = Infinity,// overflow + G = Infinity,// overflow + H = NaN +} +/// [Errors] //// + +constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. +constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. +constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. +constEnumErrors.ts(15,10): error TS2474: const enum member initializers must be constant expressions. +constEnumErrors.ts(15,13): error TS2339: Property 'Z' does not exist on type 'typeof E1'. +constEnumErrors.ts(22,18): error TS2476: A const enum member can only be accessed using a string literal. +constEnumErrors.ts(24,18): error TS2476: A const enum member can only be accessed using a string literal. +constEnumErrors.ts(25,18): error TS2476: A const enum member can only be accessed using a string literal. +constEnumErrors.ts(27,20): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. +constEnumErrors.ts(28,25): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. +constEnumErrors.ts(33,5): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. +constEnumErrors.ts(41,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. +constEnumErrors.ts(42,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. +constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. + + +==== constEnumErrors.ts (16 errors) ==== + const enum E { + ~ +!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. + A + } + + module E { + ~ +!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. + var x = 1; + } + + const enum E1 { + // illegal case + // forward reference to the element of the same enum + X = Y, + ~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + // forward reference to the element of the same enum + Y = E1.Z, + ~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. + ~ +!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. + Y1 = E1["Z"] + ~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. + ~~~ +!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. + } + + const enum E2 { + A + } + + var y0: any = E2[1] + ~ +!!! error TS2476: A const enum member can only be accessed using a string literal. + var name = "A"; + var y1: any = E2[name]; + ~~~~ +!!! error TS2476: A const enum member can only be accessed using a string literal. + var y2: any = E2[`${name}`]; + ~~~~~~~~~ +!!! error TS2476: A const enum member can only be accessed using a string literal. + + var x: typeof E2 = E2; + ~~ +!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. + var y: (typeof E2)[] = [E2]; + ~~ +!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. + + function foo(t: any): void { + } + + foo(E2); + ~~ +!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. + + const enum NaNOrInfinity { + A = 9007199254740992, + B = A * A, + C = B * B, + D = C * C, + E = D * D, + F = E * E, // overflow + ~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + G = 1 / 0, // overflow + ~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + H = 0 / 0 // NaN + ~~~~~ +!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumNamespaceReferenceCausesNoImport2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumNamespaceReferenceCausesNoImport2.d.ts new file mode 100644 index 0000000000000..fe6cf08046852 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumNamespaceReferenceCausesNoImport2.d.ts @@ -0,0 +1,44 @@ +//// [tests/cases/compiler/constEnumNamespaceReferenceCausesNoImport2.ts] //// + +//// [index.ts] +import Foo = require("./reexport"); +function check(x: Foo.ConstFooEnum): void { + switch (x) { + case Foo.ConstFooEnum.Some: + break; + } +} +//// [foo.ts] +export module ConstEnumOnlyModule { + export const enum ConstFooEnum { + Some, + Values, + Here + } +} + +//// [reexport.ts] +import * as Foo from "./foo"; +export = Foo.ConstEnumOnlyModule; + + +/// [Declarations] //// + + + +//// [/.src/foo.d.ts] +export declare namespace ConstEnumOnlyModule { + const enum ConstFooEnum { + Some = 0, + Values = 1, + Here = 2 + } +} + +//// [/.src/index.d.ts] +export {}; + +//// [/.src/reexport.d.ts] +import * as Foo from "./foo"; +declare const _default: typeof Foo.ConstEnumOnlyModule; +export = _default; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess1.d.ts new file mode 100644 index 0000000000000..418a0272256c8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess1.d.ts @@ -0,0 +1,94 @@ +//// [tests/cases/conformance/constEnums/constEnumPropertyAccess1.ts] //// + +//// [constEnumPropertyAccess1.ts] +// constant enum declarations are completely erased in the emitted JavaScript code. +// it is an error to reference a constant enum object in any other context +// than a property access that selects one of the enum's members + +const enum G { + A = 1, + B = 2, + C = A + B, + D = A * 2 +} + +var o: { + [idx: number]: boolean +} = { + 1: true + }; + +var a: G = G.A; +var a1: G = G["A"]; +var g: boolean = o[G.A]; + +class C { + [G.A](): void { } + get [G.B](): number { + return true; + } + set [G.B](x: number) { } +} + + + +/// [Declarations] //// + + + +//// [/.src/constEnumPropertyAccess1.d.ts] +declare const enum G { + A = 1, + B = 2, + C = 3, + D = 2 +} +declare var o: { + [idx: number]: boolean; +}; +declare var a: G; +declare var a1: G; +declare var g: boolean; +declare class C { + [G.A](): void; + get [G.B](): number; + set [G.B](x: number); +} +/// [Errors] //// + +constEnumPropertyAccess1.ts(25,9): error TS2322: Type 'boolean' is not assignable to type 'number'. + + +==== constEnumPropertyAccess1.ts (1 errors) ==== + // constant enum declarations are completely erased in the emitted JavaScript code. + // it is an error to reference a constant enum object in any other context + // than a property access that selects one of the enum's members + + const enum G { + A = 1, + B = 2, + C = A + B, + D = A * 2 + } + + var o: { + [idx: number]: boolean + } = { + 1: true + }; + + var a: G = G.A; + var a1: G = G["A"]; + var g: boolean = o[G.A]; + + class C { + [G.A](): void { } + get [G.B](): number { + return true; + ~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + } + set [G.B](x: number) { } + } + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess2.d.ts new file mode 100644 index 0000000000000..28875101abf43 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess2.d.ts @@ -0,0 +1,74 @@ +//// [tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts] //// + +//// [constEnumPropertyAccess2.ts] +// constant enum declarations are completely erased in the emitted JavaScript code. +// it is an error to reference a constant enum object in any other context +// than a property access that selects one of the enum's members + +const enum G { + A = 1, + B = 2, + C = A + B, + D = A * 2 +} + +// Error from referring constant enum in any other context than a property access +var z: typeof G = G; +var z1: any = G[G.A]; +var g: G; +g = "string"; +function foo(x: G): void { } +G.B = 3; + + +/// [Declarations] //// + + + +//// [/.src/constEnumPropertyAccess2.d.ts] +declare const enum G { + A = 1, + B = 2, + C = 3, + D = 2 +} +declare var z: typeof G; +declare var z1: any; +declare var g: G; +declare function foo(x: G): void; +/// [Errors] //// + +constEnumPropertyAccess2.ts(13,19): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. +constEnumPropertyAccess2.ts(14,17): error TS2476: A const enum member can only be accessed using a string literal. +constEnumPropertyAccess2.ts(16,1): error TS2322: Type '"string"' is not assignable to type 'G'. +constEnumPropertyAccess2.ts(18,3): error TS2540: Cannot assign to 'B' because it is a read-only property. + + +==== constEnumPropertyAccess2.ts (4 errors) ==== + // constant enum declarations are completely erased in the emitted JavaScript code. + // it is an error to reference a constant enum object in any other context + // than a property access that selects one of the enum's members + + const enum G { + A = 1, + B = 2, + C = A + B, + D = A * 2 + } + + // Error from referring constant enum in any other context than a property access + var z: typeof G = G; + ~ +!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. + var z1: any = G[G.A]; + ~~~ +!!! error TS2476: A const enum member can only be accessed using a string literal. + var g: G; + g = "string"; + ~ +!!! error TS2322: Type '"string"' is not assignable to type 'G'. + function foo(x: G): void { } + G.B = 3; + ~ +!!! error TS2540: Cannot assign to 'B' because it is a read-only property. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess3.d.ts new file mode 100644 index 0000000000000..5704ab7b737df --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess3.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/constEnums/constEnumPropertyAccess3.ts] //// + +//// [constEnumPropertyAccess3.ts] +const enum E { + A = ~1, + B = -1, + C = ~(1 + 1), + D = -(1 + 2), + E = 1 - 10, +} + +E.A.toString(); +E.B.toString(); +E.C.toString(); +E.D.toString(); + +E["A"].toString(); +E["B"].toString(); +E["C"].toString(); +E["D"].toString(); +E["E"].toString(); + + +/// [Declarations] //// + + + +//// [/.src/constEnumPropertyAccess3.d.ts] +declare const enum E { + A = -2, + B = -1, + C = -3, + D = -3, + E = -9 +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnums.d.ts new file mode 100644 index 0000000000000..0f0a494c85f6f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnums.d.ts @@ -0,0 +1,281 @@ +//// [tests/cases/compiler/constEnums.ts] //// + +//// [constEnums.ts] +const enum Enum1 { + A0 = 100, +} + +const enum Enum1 { + // correct cases + A, + B, + C = 10, + D = A | B, + E = A | 1, + F = 1 | A, + G = (1 & 1), + H = ~(A | B), + I = A >>> 1, + J = 1 & A, + K = ~(1 | 5), + L = ~D, + M = E << B, + N = E << 1, + O = E >> B, + P = E >> 1, + PQ = E ** 2, + Q = -D, + R = C & 5, + S = 5 & C, + T = C | D, + U = C | 1, + V = 10 | D, + W = Enum1.V, + + // correct cases: reference to the enum member from different enum declaration + W1 = A0, + W2 = Enum1.A0, + W3 = Enum1["A0"], + W4 = Enum1["W"], + W5 = Enum1[`V`], +} + +const enum Comments { + "//", + "/*", + "*/", + "///", + "#", + "", +} + +module A { + export module B { + export module C { + export const enum E { + V1 = 1, + V2 = A.B.C.E.V1 | 100 + } + } + } +} + +module A { + export module B { + export module C { + export const enum E { + V3 = A.B.C.E["V2"] & 200, + V4 = A.B.C.E[`V1`] << 1, + } + } + } +} + +module A1 { + export module B { + export module C { + export const enum E { + V1 = 10, + V2 = 110, + } + } + } +} + +module A2 { + export module B { + export module C { + export const enum E { + V1 = 10, + V2 = 110, + } + } + // module C will be classified as value + export module C { + var x = 1 + } + } +} + +import I = A.B.C.E; +import I1 = A1.B; +import I2 = A2.B; + +function foo0(e: I): void { + if (e === I.V1) { + } + else if (e === I.V2) { + } +} + +function foo1(e: I1.C.E): void { + if (e === I1.C.E.V1) { + } + else if (e === I1.C.E.V2) { + } +} + +function foo2(e: I2.C.E): void { + if (e === I2.C.E.V1) { + } + else if (e === I2.C.E.V2) { + } +} + + +function foo(x: Enum1): void { + switch (x) { + case Enum1.A: + case Enum1.B: + case Enum1.C: + case Enum1.D: + case Enum1.E: + case Enum1.F: + case Enum1.G: + case Enum1.H: + case Enum1.I: + case Enum1.J: + case Enum1.K: + case Enum1.L: + case Enum1.M: + case Enum1.N: + case Enum1.O: + case Enum1.P: + case Enum1.PQ: + case Enum1.Q: + case Enum1.R: + case Enum1.S: + case Enum1["T"]: + case Enum1[`U`]: + case Enum1.V: + case Enum1.W: + case Enum1.W1: + case Enum1.W2: + case Enum1.W3: + case Enum1.W4: + break; + } +} + +function bar(e: A.B.C.E): number { + switch (e) { + case A.B.C.E.V1: return 1; + case A.B.C.E.V2: return 1; + case A.B.C.E.V3: return 1; + } +} + +function baz(c: Comments): void { + switch (c) { + case Comments["//"]: + case Comments["/*"]: + case Comments["*/"]: + case Comments["///"]: + case Comments["#"]: + case Comments[""]: + break; + } +} + + +/// [Declarations] //// + + + +//// [/.src/constEnums.d.ts] +declare const enum Enum1 { + A0 = 100 +} +declare const enum Enum1 { + A = 0, + B = 1, + C = 10, + D = 1, + E = 1, + F = 1, + G = 1, + H = -2, + I = 0, + J = 0, + K = -6, + L = -2, + M = 2, + N = 2, + O = 0, + P = 0, + PQ = 1, + Q = -1, + R = 0, + S = 0, + T = 11, + U = 11, + V = 11, + W = 11, + W1 = 100, + W2 = 100, + W3 = 100, + W4 = 11, + W5 = 11 +} +declare const enum Comments { + "//" = 0, + "/*" = 1, + "*/" = 2, + "///" = 3, + "#" = 4, + "" = 6 +} +declare namespace A { + namespace B { + namespace C { + const enum E { + V1 = 1, + V2 = 101 + } + } + } +} +declare namespace A { + namespace B { + namespace C { + const enum E { + V3 = 64, + V4 = 2 + } + } + } +} +declare namespace A1 { + namespace B { + namespace C { + const enum E { + V1 = 10, + V2 = 110 + } + } + } +} +declare namespace A2 { + namespace B { + namespace C { + const enum E { + V1 = 10, + V2 = 110 + } + } + namespace C { + } + } +} +import I = A.B.C.E; +import I1 = A1.B; +import I2 = A2.B; +declare function foo0(e: I): void; +declare function foo1(e: I1.C.E): void; +declare function foo2(e: I2.C.E): void; +declare function foo(x: Enum1): void; +declare function bar(e: A.B.C.E): number; +declare function baz(c: Comments): void; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constantEnumAssert.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constantEnumAssert.d.ts new file mode 100644 index 0000000000000..155dfe8288c96 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constantEnumAssert.d.ts @@ -0,0 +1,222 @@ +//// [tests/cases/compiler/constantEnumAssert.ts] //// + +//// [constantEnumAssert.ts] +enum E1 { + a, + b +} + +enum E2 { + a = 'a', + b = 'b' +} + +enum E3 { + a = 1, + b = a << 1, + c = a << 2, +} + +const enum E4 { + a, + b +} + +const E5 = { + a: 'a', + b: 'b' +} + +const foo1: { + a: E1 +} = { a: E1.a } + +const foo2: { + a: E2 +} = { a: E2.a } + +const foo3: { + readonly a: E1.a +} = { a: E1.a } as const + +const foo4: { + readonly a: E2.a +} = { a: E2.a } as const + +const foo5: { + readonly a: E3.a +} = { a: E3.a } as const + +const foo6: { + readonly a: E4.a +} = { a: E4.a } as const + +const foo7: { + readonly a: string +} = { a: E5.a } as const + +const foo8: { + a: E1.a +} = { a: E1.a as const } + +const foo9: { + a: E2.a +} = { a: E2.a as const } + +const foo10: { + a: E3.a +} = { a: E3.a as const } + +const foo11: { + a: E4.a +} = { a: E4.a as const } + +const foo12: { + a: string +} = { a: E5.a as const } + + +/// [Declarations] //// + + + +//// [/.src/constantEnumAssert.d.ts] +declare enum E1 { + a = 0, + b = 1 +} +declare enum E2 { + a = "a", + b = "b" +} +declare enum E3 { + a = 1, + b = 2, + c = 4 +} +declare const enum E4 { + a = 0, + b = 1 +} +declare const E5: { + a: string; + b: string; +}; +declare const foo1: { + a: E1; +}; +declare const foo2: { + a: E2; +}; +declare const foo3: { + readonly a: E1.a; +}; +declare const foo4: { + readonly a: E2.a; +}; +declare const foo5: { + readonly a: E3.a; +}; +declare const foo6: { + readonly a: E4.a; +}; +declare const foo7: { + readonly a: string; +}; +declare const foo8: { + a: E1.a; +}; +declare const foo9: { + a: E2.a; +}; +declare const foo10: { + a: E3.a; +}; +declare const foo11: { + a: E4.a; +}; +declare const foo12: { + a: string; +}; +/// [Errors] //// + +constantEnumAssert.ts(73,10): error TS1355: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. + + +==== constantEnumAssert.ts (1 errors) ==== + enum E1 { + a, + b + } + + enum E2 { + a = 'a', + b = 'b' + } + + enum E3 { + a = 1, + b = a << 1, + c = a << 2, + } + + const enum E4 { + a, + b + } + + const E5 = { + a: 'a', + b: 'b' + } + + const foo1: { + a: E1 + } = { a: E1.a } + + const foo2: { + a: E2 + } = { a: E2.a } + + const foo3: { + readonly a: E1.a + } = { a: E1.a } as const + + const foo4: { + readonly a: E2.a + } = { a: E2.a } as const + + const foo5: { + readonly a: E3.a + } = { a: E3.a } as const + + const foo6: { + readonly a: E4.a + } = { a: E4.a } as const + + const foo7: { + readonly a: string + } = { a: E5.a } as const + + const foo8: { + a: E1.a + } = { a: E1.a as const } + + const foo9: { + a: E2.a + } = { a: E2.a as const } + + const foo10: { + a: E3.a + } = { a: E3.a as const } + + const foo11: { + a: E4.a + } = { a: E4.a as const } + + const foo12: { + a: string + } = { a: E5.a as const } + ~~~~ +!!! error TS1355: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constructorWithIncompleteTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constructorWithIncompleteTypeAnnotation.d.ts new file mode 100644 index 0000000000000..b04945e1e1b4b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constructorWithIncompleteTypeAnnotation.d.ts @@ -0,0 +1,909 @@ +//// [tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts] //// + +//// [constructorWithIncompleteTypeAnnotation.ts] +declare module "fs" { + export class File { + constructor(filename: string); + public ReadAllText(): string; + } + export interface IFile { + [index: number]: string; + } +} + +import fs = module("fs"); + + +module TypeScriptAllInOne { + export class Program { + static Main(...args: string[]): void { + try { + var bfs = new BasicFeatures(); + var retValue: number = 0; + + retValue = bfs.VARIABLES(); + if (retValue != 0 ^= { + + return 1; + } + + case: any = bfs.STATEMENTS(4); + if (retValue: any != 0) { + + return 1; + ^ + + + retValue = bfs.TYPES(); + if (retValue != 0) { + + return 1 && + } + + retValue = bfs.OPERATOR ' ); + if (retValue != 0) { + + return 1; + } + } + catch (e) { + console.log(e); + } + finally { + + } + + console.log('Done'); + + return 0; + + } + } + + class BasicFeatures { + /// + /// Test various of variables. Including nullable,key world as variable,special format + /// + /// + public VARIABLES(): number { + var local = Number.MAX_VALUE; + var min = Number.MIN_VALUE; + var inf = Number.NEGATIVE_INFINITY - + var nan = Number.NaN; + var undef = undefined; + + var _\uD4A5\u7204\uC316\uE59F = local; + var мир = local; + + var local5 = null; + var local6 = local5 instanceof fs.File; + + var hex = 0xBADC0DE, Hex = 0XDEADBEEF; + var float = 6.02e23, float2 = 6.02E-23 + var char = 'c', \u0066 = '\u0066', hexchar = '\x42' != + var quoted = '"', quoted2 = "'"; + var reg = /\w*/; + var objLit = { "var": number = 42, equals: function (x) { return x["var"] === 42; }, instanceof : () => 'objLit{42}' }; + var weekday = Weekdays.Monday; + + var con = char + f + hexchar + float.toString() + float2.toString() + reg.toString() + objLit + weekday; + + // + var any = 0 ^= + var bool = 0; + var declare = 0; + var constructor = 0; + var get = 0; + var implements = 0; + var interface = 0; + var let = 0; + var module = 0; + var number = 0; + var package = 0; + var private = 0; + var protected = 0; + var public = 0; + var set = 0; + var static = 0; + var string = 0 /> + var yield = 0; + + var sum3 = any + bool + declare + constructor + get + implements + interface + let + module + number + package + private + protected + public + set + static + string + yield; + + return 0; + } + + /// + /// Test different statements. Including if-else,swith,foreach,(un)checked,lock,using,try-catch-finally + /// + /// + /// + STATEMENTS(i: number): number { + var retVal = 0; + if (i == 1) + retVal = 1; + else + retVal = 0; + switch (i) { + case 2: + retVal = 1; + break; + case 3: + retVal = 1; + break; + default: + break; + } + + for (var x in { x: 0, y: 1 }) { + ! + + try { + throw null; + } + catch (Exception) ? + } + finally { + try { } + catch (Exception) { } + } + + return retVal; + } + + /// + /// Test types in ts language. Including class,struct,interface,delegate,anonymous type + /// + /// + public TYPES(): number { + var retVal = 0; + var c = new CLASS(); + var xx: IF = c; + retVal += catch .Property; + retVal += c.Member(); + retVal += xx.Foo() ? 0 : 1; + + //anonymous type + var anony = { a: new CLASS() }; + + retVal += anony.a.d(); + + return retVal; + } + + + ///// + ///// Test different operators + ///// + ///// + public OPERATOR(): number { + var a: number[] = [1, 2, 3, 4, 5, ];/*[] bug*/ // YES [] + var i = a[1];/*[]*/ + i = i + i - i * i / i % i & i | i ^ i;/*+ - * / % & | ^*/ + var b = true && false || true ^ false;/*& | ^*/ + b = !b;/*!*/ + i = ~i;/*~i*/ + b = i < (i - 1) && (i + 1) > i;/*< && >*/ + var f = true ? 1 : 0;/*? :*/ // YES : + i++;/*++*/ + i--;/*--*/ + b = true && false || true;/*&& ||*/ + i = i << 5;/*<<*/ + i = i >> 5;/*>>*/ + var j = i; + b = i == j && i != j && i <= j && i >= j;/*= == && != <= >=*/ + i += 5.0;/*+=*/ + i -= i;/*-=*/ + i *= i;/**=*/ + if (i == 0) + i++; + i /= i;/*/=*/ + i %= i;/*%=*/ + i &= i;/*&=*/ + i |= i;/*|=*/ + i ^= i;/*^=*/ + i <<= i;/*<<=*/ + i >>= i;/*>>=*/ + + if (i == 0 && != b && f == 1) + return 0; + else return 1; + } + + } + + interface IF { + Foo(): bool; + } + + class CLASS implements IF { + + case d = (): void => { yield 0; }; + public get Property(): number { return 0; } + public Member(): number { + return 0; + } + public Foo(): bool { + var myEvent = () => { return 1; }; + if (myEvent() == 1) + return true ? + else + return false; + } + } + + + // todo: use these + class A . + public method1(val:number) { + return val; + } + public method2() { + return 2 * this.method1(2); + } + } + + class B extends A { + + public method2(): any { + return this.method1(2); + } + } + + class Overloading { + + private otherValue = 42; + + constructor(private value: number, public name: string) : } + + public Overloads(value: string); + public Overloads( while : string, ...rest: string[]) { & + + public DefaultValue(value?: string = "Hello") { } + } +} + +enum Weekdays { + Monday, + Tuesday, + Weekend, +} + +enum Fruit { + Apple, + Pear +} + +interface IDisposable { + Dispose(): void; +} + +TypeScriptAllInOne.Program.Main(); + + +/// [Declarations] //// + + + +//// [/.src/constructorWithIncompleteTypeAnnotation.d.ts] +declare module "fs" { + class File { + constructor(filename: string); + ReadAllText(): string; + } + interface IFile { + [index: number]: string; + } +} +import fs = module; +declare namespace TypeScriptAllInOne { + class Program { + static Main(...args: string[]): void; + case: any; + if(retValue: any): any; + } +} +declare class BasicFeatures { + VARIABLES(): number; + STATEMENTS(i: number): number; + TYPES(): number; + OPERATOR(): number; +} +interface IF { + Foo(): bool; +} +declare class CLASS implements IF { + d: () => void; + get Property(): number; + Member(): number; + Foo(): bool; +} +declare class A { +} +declare class B extends A { + method2(): any; +} +declare class Overloading { + private otherValue; + constructor(value: number, name: string); +} +declare enum Weekdays { + Monday = 0, + Tuesday = 1, + Weekend = 2 +} +declare enum Fruit { + Apple = 0, + Pear = 1 +} +interface IDisposable { + Dispose(): void; +} +/// [Errors] //// + +constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2503: Cannot find namespace 'module'. +constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +constructorWithIncompleteTypeAnnotation.ts(11,13): error TS4000: Import declaration 'fs' is using private name 'module'. +constructorWithIncompleteTypeAnnotation.ts(11,19): error TS1005: ';' expected. +constructorWithIncompleteTypeAnnotation.ts(22,35): error TS1005: ')' expected. +constructorWithIncompleteTypeAnnotation.ts(22,39): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +constructorWithIncompleteTypeAnnotation.ts(24,28): error TS1005: ':' expected. +constructorWithIncompleteTypeAnnotation.ts(24,29): error TS1005: ',' expected. +constructorWithIncompleteTypeAnnotation.ts(27,18): error TS1128: Declaration or statement expected. +constructorWithIncompleteTypeAnnotation.ts(27,31): error TS2304: Cannot find name 'bfs'. +constructorWithIncompleteTypeAnnotation.ts(28,35): error TS1005: ',' expected. +constructorWithIncompleteTypeAnnotation.ts(28,39): error TS1005: ';' expected. +constructorWithIncompleteTypeAnnotation.ts(31,18): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(34,17): error TS2304: Cannot find name 'retValue'. +constructorWithIncompleteTypeAnnotation.ts(34,26): error TS1005: ';' expected. +constructorWithIncompleteTypeAnnotation.ts(34,28): error TS2304: Cannot find name 'bfs'. +constructorWithIncompleteTypeAnnotation.ts(35,21): error TS2304: Cannot find name 'retValue'. +constructorWithIncompleteTypeAnnotation.ts(38,17): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(40,17): error TS2304: Cannot find name 'retValue'. +constructorWithIncompleteTypeAnnotation.ts(40,28): error TS2304: Cannot find name 'bfs'. +constructorWithIncompleteTypeAnnotation.ts(40,41): error TS1005: ';' expected. +constructorWithIncompleteTypeAnnotation.ts(40,45): error TS1002: Unterminated string literal. +constructorWithIncompleteTypeAnnotation.ts(41,21): error TS2304: Cannot find name 'retValue'. +constructorWithIncompleteTypeAnnotation.ts(46,13): error TS1005: 'try' expected. +constructorWithIncompleteTypeAnnotation.ts(47,17): error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. +constructorWithIncompleteTypeAnnotation.ts(53,13): error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. +constructorWithIncompleteTypeAnnotation.ts(58,5): error TS1128: Declaration or statement expected. +constructorWithIncompleteTypeAnnotation.ts(69,13): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(72,37): error TS1127: Invalid character. +constructorWithIncompleteTypeAnnotation.ts(81,13): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(89,23): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. +constructorWithIncompleteTypeAnnotation.ts(90,13): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(105,29): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(106,13): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(108,24): error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. +constructorWithIncompleteTypeAnnotation.ts(138,13): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(141,32): error TS1005: '{' expected. +constructorWithIncompleteTypeAnnotation.ts(143,13): error TS1005: 'try' expected. +constructorWithIncompleteTypeAnnotation.ts(159,24): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(159,30): error TS1005: '{' expected. +constructorWithIncompleteTypeAnnotation.ts(159,31): error TS2304: Cannot find name 'Property'. +constructorWithIncompleteTypeAnnotation.ts(166,13): error TS2365: Operator '+=' cannot be applied to types 'number' and 'void'. +constructorWithIncompleteTypeAnnotation.ts(180,40): error TS2447: The '^' operator is not allowed for boolean types. Consider using '!==' instead. +constructorWithIncompleteTypeAnnotation.ts(181,13): error TS2322: Type 'boolean' is not assignable to type 'number'. +constructorWithIncompleteTypeAnnotation.ts(183,13): error TS2322: Type 'boolean' is not assignable to type 'number'. +constructorWithIncompleteTypeAnnotation.ts(187,13): error TS2322: Type 'boolean' is not assignable to type 'number'. +constructorWithIncompleteTypeAnnotation.ts(191,13): error TS2322: Type 'boolean' is not assignable to type 'number'. +constructorWithIncompleteTypeAnnotation.ts(205,28): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(213,16): error TS2304: Cannot find name 'bool'. +constructorWithIncompleteTypeAnnotation.ts(213,16): error TS4057: Return type of method from exported interface has or is using private name 'bool'. +constructorWithIncompleteTypeAnnotation.ts(218,10): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. +constructorWithIncompleteTypeAnnotation.ts(223,23): error TS2304: Cannot find name 'bool'. +constructorWithIncompleteTypeAnnotation.ts(223,23): error TS4055: Return type of public method from exported class has or is using private name 'bool'. +constructorWithIncompleteTypeAnnotation.ts(227,13): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(234,14): error TS1005: '{' expected. +constructorWithIncompleteTypeAnnotation.ts(235,9): error TS1128: Declaration or statement expected. +constructorWithIncompleteTypeAnnotation.ts(235,16): error TS2304: Cannot find name 'method1'. +constructorWithIncompleteTypeAnnotation.ts(235,24): error TS2304: Cannot find name 'val'. +constructorWithIncompleteTypeAnnotation.ts(235,27): error TS1005: ',' expected. +constructorWithIncompleteTypeAnnotation.ts(235,28): error TS2693: 'number' only refers to a type, but is being used as a value here. +constructorWithIncompleteTypeAnnotation.ts(235,36): error TS1005: ';' expected. +constructorWithIncompleteTypeAnnotation.ts(238,9): error TS1128: Declaration or statement expected. +constructorWithIncompleteTypeAnnotation.ts(238,16): error TS2304: Cannot find name 'method2'. +constructorWithIncompleteTypeAnnotation.ts(238,26): error TS1005: ';' expected. +constructorWithIncompleteTypeAnnotation.ts(241,5): error TS1128: Declaration or statement expected. +constructorWithIncompleteTypeAnnotation.ts(246,25): error TS2551: Property 'method1' does not exist on type 'B'. Did you mean 'method2'? +constructorWithIncompleteTypeAnnotation.ts(254,9): error TS2390: Constructor implementation is missing. +constructorWithIncompleteTypeAnnotation.ts(254,21): error TS2369: A parameter property is only allowed in a constructor implementation. +constructorWithIncompleteTypeAnnotation.ts(254,44): error TS2369: A parameter property is only allowed in a constructor implementation. +constructorWithIncompleteTypeAnnotation.ts(254,69): error TS1110: Type expected. +constructorWithIncompleteTypeAnnotation.ts(256,9): error TS1128: Declaration or statement expected. +constructorWithIncompleteTypeAnnotation.ts(256,16): error TS2304: Cannot find name 'Overloads'. +constructorWithIncompleteTypeAnnotation.ts(256,26): error TS2304: Cannot find name 'value'. +constructorWithIncompleteTypeAnnotation.ts(256,31): error TS1005: ',' expected. +constructorWithIncompleteTypeAnnotation.ts(256,33): error TS2693: 'string' only refers to a type, but is being used as a value here. +constructorWithIncompleteTypeAnnotation.ts(257,9): error TS1128: Declaration or statement expected. +constructorWithIncompleteTypeAnnotation.ts(257,16): error TS2304: Cannot find name 'Overloads'. +constructorWithIncompleteTypeAnnotation.ts(257,27): error TS1135: Argument expression expected. +constructorWithIncompleteTypeAnnotation.ts(257,33): error TS1005: '(' expected. +constructorWithIncompleteTypeAnnotation.ts(257,35): error TS2693: 'string' only refers to a type, but is being used as a value here. +constructorWithIncompleteTypeAnnotation.ts(257,43): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(257,52): error TS2693: 'string' only refers to a type, but is being used as a value here. +constructorWithIncompleteTypeAnnotation.ts(257,59): error TS1011: An element access expression should take an argument. +constructorWithIncompleteTypeAnnotation.ts(257,60): error TS1005: ';' expected. +constructorWithIncompleteTypeAnnotation.ts(257,65): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(259,9): error TS2304: Cannot find name 'public'. +constructorWithIncompleteTypeAnnotation.ts(259,16): error TS1005: ';' expected. +constructorWithIncompleteTypeAnnotation.ts(259,16): error TS2304: Cannot find name 'DefaultValue'. +constructorWithIncompleteTypeAnnotation.ts(259,29): error TS2304: Cannot find name 'value'. +constructorWithIncompleteTypeAnnotation.ts(259,35): error TS1109: Expression expected. +constructorWithIncompleteTypeAnnotation.ts(259,37): error TS2693: 'string' only refers to a type, but is being used as a value here. +constructorWithIncompleteTypeAnnotation.ts(259,55): error TS1005: ';' expected. +constructorWithIncompleteTypeAnnotation.ts(261,1): error TS1128: Declaration or statement expected. + + +==== constructorWithIncompleteTypeAnnotation.ts (93 errors) ==== + declare module "fs" { + export class File { + constructor(filename: string); + public ReadAllText(): string; + } + export interface IFile { + [index: number]: string; + } + } + + import fs = module("fs"); + ~~~~~~ +!!! error TS2503: Cannot find namespace 'module'. + ~~~~~~ +!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. + ~~~~~~ +!!! error TS4000: Import declaration 'fs' is using private name 'module'. + ~ +!!! error TS1005: ';' expected. + + + module TypeScriptAllInOne { + export class Program { + static Main(...args: string[]): void { + try { + var bfs = new BasicFeatures(); + var retValue: number = 0; + + retValue = bfs.VARIABLES(); + if (retValue != 0 ^= { + ~~ +!!! error TS1005: ')' expected. +!!! related TS1007 constructorWithIncompleteTypeAnnotation.ts:22:20: The parser expected to find a ')' to match the '(' token here. + ~ + + + return 1; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ +!!! error TS1005: ':' expected. + ~ +!!! error TS1005: ',' expected. + } + ~~~~~~~~~~~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + + case: any = bfs.STATEMENTS(4); + ~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~ +!!! error TS2304: Cannot find name 'bfs'. + if (retValue: any != 0) { + ~~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1005: ';' expected. + + return 1; + ^ + ~ +!!! error TS1109: Expression expected. + + + retValue = bfs.TYPES(); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'retValue'. + ~ +!!! error TS1005: ';' expected. + ~~~ +!!! error TS2304: Cannot find name 'bfs'. + if (retValue != 0) { + ~~~~~~~~ +!!! error TS2304: Cannot find name 'retValue'. + + return 1 && + } + ~ +!!! error TS1109: Expression expected. + + retValue = bfs.OPERATOR ' ); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'retValue'. + ~~~ +!!! error TS2304: Cannot find name 'bfs'. + ~~~~ +!!! error TS1005: ';' expected. + +!!! error TS1002: Unterminated string literal. + if (retValue != 0) { + ~~~~~~~~ +!!! error TS2304: Cannot find name 'retValue'. + + return 1; + } + } + catch (e) { + ~~~~~ +!!! error TS1005: 'try' expected. + console.log(e); + ~~~~~~~ +!!! error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. + } + finally { + + } + + console.log('Done'); + ~~~~~~~ +!!! error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. + + return 0; + + } + } + ~ +!!! error TS1128: Declaration or statement expected. + + class BasicFeatures { + /// + /// Test various of variables. Including nullable,key world as variable,special format + /// + /// + public VARIABLES(): number { + var local = Number.MAX_VALUE; + var min = Number.MIN_VALUE; + var inf = Number.NEGATIVE_INFINITY - + var nan = Number.NaN; + ~~~ +!!! error TS1109: Expression expected. + var undef = undefined; + + var _\uD4A5\u7204\uC316\uE59F = local; + +!!! error TS1127: Invalid character. + var мир = local; + + var local5 = null; + var local6 = local5 instanceof fs.File; + + var hex = 0xBADC0DE, Hex = 0XDEADBEEF; + var float = 6.02e23, float2 = 6.02E-23 + var char = 'c', \u0066 = '\u0066', hexchar = '\x42' != + var quoted = '"', quoted2 = "'"; + ~~~ +!!! error TS1109: Expression expected. + var reg = /\w*/; + var objLit = { "var": number = 42, equals: function (x) { return x["var"] === 42; }, instanceof : () => 'objLit{42}' }; + var weekday = Weekdays.Monday; + + var con = char + f + hexchar + float.toString() + float2.toString() + reg.toString() + objLit + weekday; + + // + var any = 0 ^= + ~ +!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. + var bool = 0; + ~~~ +!!! error TS1109: Expression expected. + var declare = 0; + var constructor = 0; + var get = 0; + var implements = 0; + var interface = 0; + var let = 0; + var module = 0; + var number = 0; + var package = 0; + var private = 0; + var protected = 0; + var public = 0; + var set = 0; + var static = 0; + var string = 0 /> + ~ +!!! error TS1109: Expression expected. + var yield = 0; + ~~~ +!!! error TS1109: Expression expected. + + var sum3 = any + bool + declare + constructor + get + implements + interface + let + module + number + package + private + protected + public + set + static + string + yield; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. + + return 0; + } + + /// + /// Test different statements. Including if-else,swith,foreach,(un)checked,lock,using,try-catch-finally + /// + /// + /// + STATEMENTS(i: number): number { + var retVal = 0; + if (i == 1) + retVal = 1; + else + retVal = 0; + switch (i) { + case 2: + retVal = 1; + break; + case 3: + retVal = 1; + break; + default: + break; + } + + for (var x in { x: 0, y: 1 }) { + ! + + try { + ~~~ +!!! error TS1109: Expression expected. + throw null; + } + catch (Exception) ? + ~ +!!! error TS1005: '{' expected. + } + finally { + ~~~~~~~ +!!! error TS1005: 'try' expected. + try { } + catch (Exception) { } + } + + return retVal; + } + + /// + /// Test types in ts language. Including class,struct,interface,delegate,anonymous type + /// + /// + public TYPES(): number { + var retVal = 0; + var c = new CLASS(); + var xx: IF = c; + retVal += catch .Property; + ~~~~~ +!!! error TS1109: Expression expected. + ~ +!!! error TS1005: '{' expected. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'Property'. + retVal += c.Member(); + retVal += xx.Foo() ? 0 : 1; + + //anonymous type + var anony = { a: new CLASS() }; + + retVal += anony.a.d(); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2365: Operator '+=' cannot be applied to types 'number' and 'void'. + + return retVal; + } + + + ///// + ///// Test different operators + ///// + ///// + public OPERATOR(): number { + var a: number[] = [1, 2, 3, 4, 5, ];/*[] bug*/ // YES [] + var i = a[1];/*[]*/ + i = i + i - i * i / i % i & i | i ^ i;/*+ - * / % & | ^*/ + var b = true && false || true ^ false;/*& | ^*/ + ~~~~~~~~~~~~ +!!! error TS2447: The '^' operator is not allowed for boolean types. Consider using '!==' instead. + b = !b;/*!*/ + ~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + i = ~i;/*~i*/ + b = i < (i - 1) && (i + 1) > i;/*< && >*/ + ~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + var f = true ? 1 : 0;/*? :*/ // YES : + i++;/*++*/ + i--;/*--*/ + b = true && false || true;/*&& ||*/ + ~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + i = i << 5;/*<<*/ + i = i >> 5;/*>>*/ + var j = i; + b = i == j && i != j && i <= j && i >= j;/*= == && != <= >=*/ + ~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + i += 5.0;/*+=*/ + i -= i;/*-=*/ + i *= i;/**=*/ + if (i == 0) + i++; + i /= i;/*/=*/ + i %= i;/*%=*/ + i &= i;/*&=*/ + i |= i;/*|=*/ + i ^= i;/*^=*/ + i <<= i;/*<<=*/ + i >>= i;/*>>=*/ + + if (i == 0 && != b && f == 1) + ~~ +!!! error TS1109: Expression expected. + return 0; + else return 1; + } + + } + + interface IF { + Foo(): bool; + ~~~~ +!!! error TS2304: Cannot find name 'bool'. + ~~~~ +!!! error TS4057: Return type of method from exported interface has or is using private name 'bool'. + } + + class CLASS implements IF { + + case d = (): void => { yield 0; }; + ~~~~ +!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. + public get Property(): number { return 0; } + public Member(): number { + return 0; + } + public Foo(): bool { + ~~~~ +!!! error TS2304: Cannot find name 'bool'. + ~~~~ +!!! error TS4055: Return type of public method from exported class has or is using private name 'bool'. + var myEvent = () => { return 1; }; + if (myEvent() == 1) + return true ? + else + ~~~~ +!!! error TS1109: Expression expected. + return false; + } + } + + + // todo: use these + class A . + ~ +!!! error TS1005: '{' expected. + public method1(val:number) { + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~ +!!! error TS2304: Cannot find name 'method1'. + ~~~ +!!! error TS2304: Cannot find name 'val'. + ~ +!!! error TS1005: ',' expected. + ~~~~~~ +!!! error TS2693: 'number' only refers to a type, but is being used as a value here. + ~ +!!! error TS1005: ';' expected. + return val; + } + public method2() { + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~ +!!! error TS2304: Cannot find name 'method2'. + ~ +!!! error TS1005: ';' expected. + return 2 * this.method1(2); + } + } + ~ +!!! error TS1128: Declaration or statement expected. + + class B extends A { + + public method2(): any { + return this.method1(2); + ~~~~~~~ +!!! error TS2551: Property 'method1' does not exist on type 'B'. Did you mean 'method2'? +!!! related TS2728 constructorWithIncompleteTypeAnnotation.ts:245:16: 'method2' is declared here. + } + } + + class Overloading { + + private otherValue = 42; + + constructor(private value: number, public name: string) : } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2390: Constructor implementation is missing. + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2369: A parameter property is only allowed in a constructor implementation. + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2369: A parameter property is only allowed in a constructor implementation. + ~ +!!! error TS1110: Type expected. + + public Overloads(value: string); + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~ +!!! error TS2304: Cannot find name 'Overloads'. + ~~~~~ +!!! error TS2304: Cannot find name 'value'. + ~ +!!! error TS1005: ',' expected. + ~~~~~~ +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. + public Overloads( while : string, ...rest: string[]) { & + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~~~~~~ +!!! error TS2304: Cannot find name 'Overloads'. + ~~~~~ +!!! error TS1135: Argument expression expected. + ~ +!!! error TS1005: '(' expected. + ~~~~~~ +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. + ~~~ +!!! error TS1109: Expression expected. + ~~~~~~ +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. + +!!! error TS1011: An element access expression should take an argument. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1109: Expression expected. + + public DefaultValue(value?: string = "Hello") { } + ~~~~~~ +!!! error TS2304: Cannot find name 'public'. + ~~~~~~~~~~~~ +!!! error TS1005: ';' expected. + ~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'DefaultValue'. + ~~~~~ +!!! error TS2304: Cannot find name 'value'. + ~ +!!! error TS1109: Expression expected. + ~~~~~~ +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. + ~ +!!! error TS1005: ';' expected. + } + } + ~ +!!! error TS1128: Declaration or statement expected. + + enum Weekdays { + Monday, + Tuesday, + Weekend, + } + + enum Fruit { + Apple, + Pear + } + + interface IDisposable { + Dispose(): void; + } + + TypeScriptAllInOne.Program.Main(); + \ No newline at end of file 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..f228a1bade30c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileEnums.d.ts @@ -0,0 +1,72 @@ +//// [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] //// + + + +//// [/.src/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 +} 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..a5f0da9958eb7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCommonJsModuleReferencedType.d.ts @@ -0,0 +1,64 @@ +//// [tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts] //// + +//// [r/node_modules/foo/node_modules/nested/index.d.ts] +export interface NestedProps {} +//// [r/node_modules/foo/other/index.d.ts] +export interface OtherIndexProps {} +//// [r/node_modules/foo/other.d.ts] +export interface OtherProps {} +//// [r/node_modules/foo/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]; +//// [node_modules/root/index.d.ts] +export interface RootProps {} + +export function bar(): RootProps; +//// [r/entry.ts] +import { foo } from "foo"; +import { RootProps, bar } from "root"; +export const x = foo(); +export const y: RootProps = bar(); + + +/// [Declarations] //// + + + +//// [/.src/r/entry.d.ts] +import { RootProps } from "root"; +export declare const x: any; +export declare const y: RootProps; +/// [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/declarationEmitDefaultExportWithStaticAssignment.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDefaultExportWithStaticAssignment.d.ts new file mode 100644 index 0000000000000..b2543d2456cd3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDefaultExportWithStaticAssignment.d.ts @@ -0,0 +1,73 @@ +//// [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] //// + + + +//// [/.src/foo.d.ts] +export declare class Foo { +} + +//// [/.src/index1.d.ts] +declare function Example(): void; +declare namespace Example { + var Foo: typeof import("./foo").Foo; +} +export default Example; + +//// [/.src/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; + +//// [/.src/index3.d.ts] +export declare class Bar { +} +declare function Example(): void; +declare namespace Example { + var Bar: typeof import("./index3").Bar; +} +export default Example; + +//// [/.src/index4.d.ts] +export declare function C(): any; +export declare namespace C { + var A: () => void; + var B: () => void; +} 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..c2efdf93b7088 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringParameterProperties.d.ts @@ -0,0 +1,79 @@ +//// [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] //// + + + +//// [/.src/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); +} +/// [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/declarationEmitExpandoPropertyPrivateName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpandoPropertyPrivateName.d.ts new file mode 100644 index 0000000000000..351b9d8e9eb87 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpandoPropertyPrivateName.d.ts @@ -0,0 +1,43 @@ +//// [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] //// + + + +//// [/.src/a.d.ts] +interface I { +} +export declare function f(): I; +export {}; + +//// [/.src/b.d.ts] +export declare function q(): void; +export declare namespace q { + var val: I; +} +/// [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/declarationEmitForGlobalishSpecifierSymlink.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForGlobalishSpecifierSymlink.d.ts new file mode 100644 index 0000000000000..d59fe8e1ac575 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForGlobalishSpecifierSymlink.d.ts @@ -0,0 +1,42 @@ +//// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts] //// + +//// [/p1/node_modules/typescript-fsa/src/impl.d.ts] +export function getA(): A; +export enum A { + Val +} +//// [/p1/node_modules/typescript-fsa/index.d.ts] +export * from "./src/impl"; +//// [/p1/node_modules/typescript-fsa/package.json] +{ + "name": "typescript-fsa", + "version": "1.0.0" +} +//// [/p2/node_modules/typescript-fsa/src/impl.d.ts] +export function getA(): A; +export enum A { + Val +} +//// [/p2/node_modules/typescript-fsa/index.d.ts] +export * from "./src/impl"; +//// [/p2/node_modules/typescript-fsa/package.json] +{ + "name": "typescript-fsa", + "version": "1.0.0" +} +//// [/p1/index.ts] +import * as _whatever from "p2"; +import { getA } from "typescript-fsa"; + +export const a = getA(); +//// [/p2/index.d.ts] +export const a: import("typescript-fsa").A; + + + +/// [Declarations] //// + + + +//// [/p1/index.d.ts] +export declare const a: import("typescript-fsa").A; 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..64e62bad21606 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForGlobalishSpecifierSymlink2.d.ts @@ -0,0 +1,30 @@ +//// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts] //// + +//// [/cache/typescript-fsa/src/impl.d.ts] +export function getA(): A; +export enum A { + Val +} +//// [/cache/typescript-fsa/index.d.ts] +export * from "./src/impl"; +//// [/cache/typescript-fsa/package.json] +{ + "name": "typescript-fsa", + "version": "1.0.0" +} +//// [/p1/index.ts] +import * as _whatever from "p2"; +import { getA } from "typescript-fsa"; + +export const a = getA(); +//// [/p2/index.d.ts] +export const a: import("typescript-fsa").A; + + + +/// [Declarations] //// + + + +//// [/p1/index.d.ts] +export declare const a: import("typescript-fsa").A; 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..316faf5baa8e9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitFunctionDuplicateNamespace.d.ts @@ -0,0 +1,22 @@ +//// [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] //// + + + +//// [/.src/declarationEmitFunctionDuplicateNamespace.d.ts] +declare function f(a: 0): 0; +declare function f(a: 1): 1; +declare namespace f { + var x: number; +} 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..998880ed9403b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitFunctionKeywordProp.d.ts @@ -0,0 +1,35 @@ +//// [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] //// + + + +//// [/.src/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 }; +} 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..f8f322b0430f5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments.d.ts @@ -0,0 +1,29 @@ +//// [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] //// + + + +//// [/.src/declarationEmitLateBoundAssignments.d.ts] +export declare function foo(): void; +export declare namespace foo { + var bar: number; + var strMemName: string; +} 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..939afc01293d9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments2.d.ts @@ -0,0 +1,156 @@ +//// [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 +} = () => {} +arrow["B"] = 'bar' + +export const arrow2 = (): void => {} +arrow2[c] = 100 + +export const arrow3: { + (): void + 77: number +} = () => {} +arrow3[77] = 0 + +export const arrow4 = (): void => {} +arrow4[num] = 0 + +export const arrow5: { + (): void + "101": number +} = () => {} +arrow5["101"] = 0 + +export const arrow6 = (): void => {} +arrow6[numStr] = 0 + +export const arrow7: { + (): void + "qwe rty": number +} = () => {} +arrow7["qwe rty"] = 0 + +export const arrow8 = (): void => {} +arrow8[withWhitespace] = 0 + +export const arrow9: { + (): void + "🤪": number +} = () => {} +arrow9["🤪"] = 0 + +export const arrow10 = (): void => {} +arrow10[emoji] = 0 + + +/// [Declarations] //// + + + +//// [/.src/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; + "\uD83E\uDD37\u200D\u2642\uFE0F": number; +}; 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..378b863c08485 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectAssignedDefaultExport.d.ts @@ -0,0 +1,100 @@ +//// [tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts] //// + +//// [node_modules/styled-components/node_modules/hoist-non-react-statics/index.d.ts] +interface Statics { + "$$whatever": string; +} +declare namespace hoistNonReactStatics { + type NonReactStatics = {[X in Exclude]: T[X]} +} +export = hoistNonReactStatics; +//// [node_modules/styled-components/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] //// + + + +//// [/.src/index.d.ts] +import { DefaultTheme, StyledComponent } from "styled-components"; +export declare const C: StyledComponent<"div", DefaultTheme, {}, never>; +declare const _default; +export default _default; +/// [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/declarationEmitReexportedSymlinkReference.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference.d.ts new file mode 100644 index 0000000000000..7fe057b4ff9a9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference.d.ts @@ -0,0 +1,55 @@ +//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts] //// + +//// [monorepo/pkg3/src/index.ts] +export * from './keys'; +//// [monorepo/pkg3/src/keys.ts] +import {MetadataAccessor} from "@raymondfeng/pkg2"; + +export const ADMIN = MetadataAccessor.create('1'); +//// [monorepo/pkg1/dist/index.d.ts] +export * from './types'; +//// [monorepo/pkg1/dist/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; +} +//// [monorepo/pkg1/package.json] +{ + "name": "@raymondfeng/pkg1", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" +} +//// [monorepo/pkg2/dist/index.d.ts] +export * from './types'; +//// [monorepo/pkg2/dist/types.d.ts] +export * from '@raymondfeng/pkg1'; +//// [monorepo/pkg2/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'; + +//// [/.src/monorepo/pkg3/dist/keys.d.ts] +import { MetadataAccessor } from "@raymondfeng/pkg2"; +export declare const ADMIN: MetadataAccessor; 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..2133d61361d0b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference2.d.ts @@ -0,0 +1,58 @@ +//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts] //// + +//// [monorepo/pkg3/src/index.ts] +export * from './keys'; +//// [monorepo/pkg3/src/keys.ts] +import {MetadataAccessor} from "@raymondfeng/pkg2"; + +export const ADMIN = MetadataAccessor.create('1'); +//// [monorepo/pkg1/dist/index.d.ts] +export * from './types'; +//// [monorepo/pkg1/dist/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; +} +//// [monorepo/pkg1/package.json] +{ + "name": "@raymondfeng/pkg1", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" +} +//// [monorepo/pkg2/dist/index.d.ts] +import "./secondary"; +export * from './types'; +//// [monorepo/pkg2/dist/types.d.ts] +export {MetadataAccessor} from '@raymondfeng/pkg1'; +//// [monorepo/pkg2/dist/secondary.d.ts] +export {IdType} from '@raymondfeng/pkg1'; +//// [monorepo/pkg2/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'; + +//// [/.src/monorepo/pkg3/dist/keys.d.ts] +import { MetadataAccessor } from "@raymondfeng/pkg2"; +export declare const ADMIN: MetadataAccessor; 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..ef2a88b5ec948 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference3.d.ts @@ -0,0 +1,104 @@ +//// [tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts] //// + +//// [monorepo/pkg3/src/index.ts] +export * from './keys'; +//// [monorepo/pkg3/src/keys.ts] +import {MetadataAccessor} from "@raymondfeng/pkg2"; + +export const ADMIN = MetadataAccessor.create('1'); +//// [monorepo/pkg1/dist/index.d.ts] +export * from './types'; +//// [monorepo/pkg1/dist/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; +} +//// [monorepo/pkg1/package.json] +{ + "name": "@raymondfeng/pkg1", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" +} +//// [monorepo/pkg2/dist/index.d.ts] +export * from './types'; +//// [monorepo/pkg2/dist/types.d.ts] +export {MetadataAccessor} from '@raymondfeng/pkg1'; +//// [monorepo/pkg2/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'; + +//// [/.src/monorepo/pkg3/dist/keys.d.ts] +import { MetadataAccessor } from "@raymondfeng/pkg2"; +export declare const ADMIN: any; +/// [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/declarationEmitWithInvalidPackageJsonTypings.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitWithInvalidPackageJsonTypings.d.ts new file mode 100644 index 0000000000000..6dbc86989859f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitWithInvalidPackageJsonTypings.d.ts @@ -0,0 +1,37 @@ +//// [tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts] //// + +//// [/p1/node_modules/csv-parse/lib/index.d.ts] +export function bar(): number; +//// [/p1/node_modules/csv-parse/package.json] +{ + "main": "./lib", + "name": "csv-parse", + "types": [ + "./lib/index.d.ts", + "./lib/sync.d.ts" + ], + "version": "4.8.2" +} +//// [/p1/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; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFiles.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFiles.d.ts new file mode 100644 index 0000000000000..2220cf8f84de1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFiles.d.ts @@ -0,0 +1,161 @@ +//// [tests/cases/conformance/types/thisType/declarationFiles.ts] //// + +//// [declarationFiles.ts] +class C1 { + x: this; + f(x: this): this { return undefined; } + constructor(x: this) { } +} + +class C2 { + [x: string]: this; +} + +interface Foo { + x: T; + y: this; +} + +class C3 { + a: this[]; + b: [this, this]; + c: this | Date; + d: this & Date; + e: (((this))); + f: (x: this) => this; + g: new (x: this) => this; + h: Foo; + i: Foo this)>; + j: (x: any) => x is this; +} + +const x3_a: typeof globalThis = this; +const x1_a: typeof globalThis = this; +class C4 { + x1 = { a: x1_a as typeof x1_a }; + x2: this[] = [this]; + x3 = [{ a: x3_a as typeof x3_a }] as const; + x4 = (): this => this; + f1() { + return { a: this }; + } + f2(): this[] { + return [this]; + } + f3() { + return [{ a: this }]; + } + f4(): () => this { + return () => this; + } +} + + +/// [Declarations] //// + + + +//// [/.src/declarationFiles.d.ts] +declare class C1 { + x: this; + f(x: this): this; + constructor(x: this); +} +declare class C2 { + [x: string]: this; +} +interface Foo { + x: T; + y: this; +} +declare class C3 { + a: this[]; + b: [this, this]; + c: this | Date; + d: this & Date; + e: (((this))); + f: (x: this) => this; + g: new (x: this) => this; + h: Foo; + i: Foo this)>; + j: (x: any) => x is this; +} +declare const x3_a: typeof globalThis; +declare const x1_a: typeof globalThis; +declare class C4 { + x1: { + a: typeof globalThis; + }; + x2: this[]; + x3: readonly [{ + readonly a: typeof globalThis; + }]; + x4: () => this; + f1(): any; + f2(): this[]; + f3(): any; + f4(): () => this; +} +/// [Errors] //// + +declarationFiles.ts(4,20): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +declarationFiles.ts(36,5): error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. +declarationFiles.ts(42,5): error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. + + +==== declarationFiles.ts (3 errors) ==== + class C1 { + x: this; + f(x: this): this { return undefined; } + constructor(x: this) { } + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + } + + class C2 { + [x: string]: this; + } + + interface Foo { + x: T; + y: this; + } + + class C3 { + a: this[]; + b: [this, this]; + c: this | Date; + d: this & Date; + e: (((this))); + f: (x: this) => this; + g: new (x: this) => this; + h: Foo; + i: Foo this)>; + j: (x: any) => x is this; + } + + const x3_a: typeof globalThis = this; + const x1_a: typeof globalThis = this; + class C4 { + x1 = { a: x1_a as typeof x1_a }; + x2: this[] = [this]; + x3 = [{ a: x3_a as typeof x3_a }] as const; + x4 = (): this => this; + f1() { + ~~ +!!! error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. + return { a: this }; + } + f2(): this[] { + return [this]; + } + f3() { + ~~ +!!! error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. + return [{ a: this }]; + } + f4(): () => this { + return () => this; + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationInAmbientContext.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationInAmbientContext.d.ts new file mode 100644 index 0000000000000..fdd8f1a151282 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationInAmbientContext.d.ts @@ -0,0 +1,14 @@ +//// [tests/cases/conformance/es6/destructuring/declarationInAmbientContext.ts] //// + +//// [declarationInAmbientContext.ts] +declare var [a, b]; // Error, destructuring declaration not allowed in ambient context +declare var {c, d}; // Error, destructuring declaration not allowed in ambient context + + +/// [Declarations] //// + + + +//// [/.src/declarationInAmbientContext.d.ts] +declare var a: any, b: any; +declare var c: any, d: any; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationWithNoInitializer.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationWithNoInitializer.d.ts new file mode 100644 index 0000000000000..883da0c8cd795 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationWithNoInitializer.d.ts @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/es6/destructuring/declarationWithNoInitializer.ts] //// + +//// [declarationWithNoInitializer.ts] +var [a, b]; // Error, no initializer +var {c, d}; // Error, no initializer + + +/// [Declarations] //// + + + +//// [/.src/declarationWithNoInitializer.d.ts] +declare var a: any, b: any; +declare var c: any, d: any; +/// [Errors] //// + +declarationWithNoInitializer.ts(1,5): error TS1182: A destructuring declaration must have an initializer. +declarationWithNoInitializer.ts(2,5): error TS1182: A destructuring declaration must have an initializer. + + +==== declarationWithNoInitializer.ts (2 errors) ==== + var [a, b]; // Error, no initializer + ~~~~~~ +!!! error TS1182: A destructuring declaration must have an initializer. + var {c, d}; // Error, no initializer + ~~~~~~ +!!! error TS1182: A destructuring declaration must have an initializer. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterDeclaration6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterDeclaration6.d.ts new file mode 100644 index 0000000000000..4ef498f2a271f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterDeclaration6.d.ts @@ -0,0 +1,2290 @@ +//// [tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts] //// + +//// [destructuringParameterDeclaration6.ts] +// A parameter declaration may specify either an identifier or a binding pattern. + +// Reserved words are not allowed to be used as an identifier in parameter declaration +"use strict" + +// Error +function a({while}: { + while: any; + }): void { } +function a1({public}: { + public: any; + }): void { } +function a4([: any[]: [ + any, + any[] + ]: [ + any, + any[], + [any, any, any[]] + ]: [ + any, + any[], + [any, any, any[]], + [any, any, any[], [any, any, any, any[]]] + ]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]]]]]while, for, public]){ } +function a5(...: any[]while) { } +function a6(...public: any[]): void { } +function a7(...a: string): void { } +a({ while: 1 }); + +// No Error +function b1({public: x}: { + public: any; + }): void { } +function b2({while: y}: { + while: any; + }): void { } +b1({ public: 1 }); +b2({ while: 1 }); + + + +/// [Declarations] //// + + + +//// [/.src/destructuringParameterDeclaration6.d.ts] +declare function a({ while: }: { + while: any; +}): void; +declare function a1({ public }: { + public: any; +}): void; +declare function a4([any, [], [any, any, []], [any, any, [], [any, any, any, []]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []], [any, any, any, any, any, any, any, [], [any, any, any, any, any, any, any, any, []]]]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any, any[]]]]]]]]]): any; +declare function a5(...: any[]): any; +declare function a6(...public: any[]): void; +declare function a7(...a: string): void; +declare function b1({ public: x }: { + public: any; +}): void; +declare function b2({ while: y }: { + while: any; +}): void; +/// [Errors] //// + +destructuringParameterDeclaration6.ts(7,18): error TS1005: ':' expected. +destructuringParameterDeclaration6.ts(13,14): error TS1181: Array element destructuring pattern expected. +destructuringParameterDeclaration6.ts(13,16): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(13,19): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(13,21): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(14,9): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(15,9): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(15,12): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(16,6): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(17,9): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(18,9): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(18,12): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(19,10): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(19,15): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(19,20): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(19,23): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(20,6): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(21,9): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(22,9): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(22,12): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(23,10): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(23,15): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(23,20): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(23,23): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(24,10): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(24,15): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(24,20): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(24,23): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(24,28): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(24,33): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(24,38): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(24,43): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(24,46): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,6): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,9): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,14): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,17): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,22): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,27): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,32): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,35): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,41): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,46): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,51): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,54): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,59): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,64): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,69): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,74): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,77): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,84): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,89): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,94): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,97): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,102): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,107): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,112): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,117): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,120): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,126): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,131): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,136): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,141): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,144): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,149): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,154): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,159): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,164): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,169): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,172): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,178): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,181): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,186): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,189): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,194): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,199): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,204): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,207): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,213): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,218): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,223): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,226): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,231): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,236): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,241): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,246): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,249): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,256): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,261): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,266): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,269): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,274): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,279): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,284): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,289): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,292): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,298): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,303): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,308): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,313): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,316): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,321): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,326): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,331): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,336): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,341): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,344): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,352): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,357): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,362): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,365): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,370): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,375): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,380): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,385): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,388): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,394): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,399): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,404): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,409): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,412): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,417): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,422): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,427): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,432): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,437): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,440): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,447): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,452): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,457): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,462): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,465): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,470): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,475): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,480): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,485): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,490): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,493): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,499): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,504): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,509): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,514): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,519): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,522): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,527): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,532): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,537): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,542): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,547): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,552): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,555): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,562): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,565): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,570): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,573): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,578): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,583): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,588): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,591): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,597): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,602): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,607): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,610): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,615): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,620): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,625): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,630): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,633): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,640): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,645): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,650): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,653): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,658): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,663): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,668): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,673): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,676): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,682): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,687): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,692): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,697): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,700): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,705): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,710): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,715): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,720): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,725): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,728): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,736): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,741): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,746): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,749): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,754): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,759): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,764): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,769): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,772): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,778): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,783): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,788): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,793): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,796): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,801): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,806): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,811): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,816): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,821): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,824): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,831): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,836): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,841): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,846): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,849): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,854): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,859): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,864): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,869): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,874): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,877): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,883): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,888): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,893): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,898): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,903): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,906): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,911): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,916): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,921): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,926): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,931): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,936): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,939): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,948): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,953): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,958): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,961): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,966): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,971): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,976): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,981): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,984): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,990): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,995): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1000): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1005): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1008): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1013): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1018): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1023): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1028): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1033): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1036): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1043): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1048): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1053): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1058): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1061): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1066): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1071): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1076): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1081): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1086): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1089): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1095): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1100): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1105): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1110): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1115): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1118): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1123): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1128): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1133): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1138): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1143): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1148): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1151): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1159): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1164): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1169): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1174): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1177): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1182): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1187): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1192): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1197): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1202): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1205): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1211): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1216): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1221): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1226): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1231): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1234): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1239): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1244): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1249): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1254): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1259): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1264): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1267): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1274): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1279): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1284): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1289): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1294): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1297): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1302): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1307): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1312): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1317): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1322): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1327): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1330): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1336): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1341): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1346): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1351): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1356): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1361): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1364): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1369): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1374): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1379): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1384): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1389): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1394): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1399): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1402): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1410): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1413): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1418): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1421): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1426): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1431): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1436): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1439): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1445): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1450): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1455): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1458): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1463): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1468): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1473): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1478): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1481): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1488): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1493): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1498): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1501): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1506): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1511): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1516): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1521): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1524): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1530): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1535): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1540): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1545): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1548): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1553): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1558): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1563): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1568): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1573): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1576): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1584): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1589): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1594): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1597): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1602): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1607): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1612): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1617): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1620): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1626): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1631): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1636): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1641): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1644): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1649): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1654): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1659): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1664): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1669): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1672): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1679): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1684): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1689): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1694): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1697): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1702): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1707): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1712): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1717): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1722): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1725): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1731): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1736): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1741): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1746): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1751): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1754): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1759): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1764): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1769): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1774): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1779): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1784): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1787): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1796): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1801): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1806): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1809): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1814): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1819): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1824): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1829): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1832): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1838): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1843): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1848): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1853): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1856): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1861): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1866): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1871): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1876): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1881): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1884): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1891): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1896): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1901): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1906): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1909): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1914): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1919): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1924): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1929): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1934): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1937): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1943): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1948): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1953): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1958): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1963): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1966): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,1971): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1976): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1981): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1986): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1991): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1996): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,1999): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2007): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2012): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2017): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2022): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2025): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2030): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2035): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2040): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2045): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2050): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2053): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2059): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2064): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2069): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2074): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2079): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2082): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2087): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2092): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2097): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2102): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2107): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2112): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2115): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2122): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2127): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2132): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2137): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2142): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2145): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2150): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2155): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2160): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2165): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2170): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2175): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2178): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2184): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2189): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2194): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2199): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2204): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2209): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2212): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2217): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2222): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2227): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2232): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2237): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2242): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2247): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2250): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2260): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2265): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2270): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2273): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2278): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2283): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2288): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2293): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2296): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2302): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2307): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2312): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2317): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2320): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2325): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2330): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2335): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2340): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2345): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2348): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2355): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2360): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2365): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2370): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2373): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2378): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2383): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2388): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2393): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2398): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2401): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2407): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2412): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2417): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2422): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2427): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2430): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2435): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2440): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2445): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2450): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2455): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2460): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2463): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2471): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2476): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2481): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2486): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2489): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2494): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2499): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2504): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2509): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2514): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2517): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2523): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2528): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2533): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2538): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2543): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2546): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2551): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2556): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2561): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2566): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2571): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2576): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2579): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2586): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2591): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2596): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2601): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2606): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2609): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2614): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2619): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2624): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2629): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2634): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2639): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2642): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2648): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2653): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2658): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2663): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2668): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2673): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2676): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2681): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2686): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2691): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2696): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2701): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2706): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2711): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2714): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2723): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2728): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2733): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2738): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2741): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2746): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2751): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2756): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2761): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2766): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2769): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2775): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2780): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2785): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2790): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2795): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2798): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2803): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2808): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2813): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2818): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2823): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2828): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2831): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2838): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2843): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2848): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2853): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2858): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2861): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2866): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2871): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2876): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2881): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2886): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2891): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2894): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2900): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2905): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2910): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2915): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2920): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2925): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2928): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2933): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2938): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2943): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2948): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2953): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2958): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2963): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2966): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,2974): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2979): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2984): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2989): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2994): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,2997): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,3002): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3007): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3012): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3017): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3022): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3027): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3030): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,3036): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3041): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3046): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3051): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3056): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3061): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3064): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,3069): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3074): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3079): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3084): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3089): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3094): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3099): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3102): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,3109): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3114): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3119): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3124): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3129): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3134): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3137): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,3142): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3147): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3152): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3157): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3162): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3167): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3172): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3175): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,3181): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3186): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3191): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3196): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3201): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3206): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3211): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3214): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,3219): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3224): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3229): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3234): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3239): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3244): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3249): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3254): error TS2300: Duplicate identifier 'any'. +destructuringParameterDeclaration6.ts(25,3257): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,3266): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(25,3271): error TS2695: Left side of comma operator is unused and has no side effects. +destructuringParameterDeclaration6.ts(25,3271): error TS1005: '(' expected. +destructuringParameterDeclaration6.ts(25,3273): error TS1109: Expression expected. +destructuringParameterDeclaration6.ts(25,3276): error TS2695: Left side of comma operator is unused and has no side effects. +destructuringParameterDeclaration6.ts(25,3276): error TS1005: '(' expected. +destructuringParameterDeclaration6.ts(25,3278): error TS2304: Cannot find name 'public'. +destructuringParameterDeclaration6.ts(25,3284): error TS1005: ';' expected. +destructuringParameterDeclaration6.ts(25,3285): error TS1128: Declaration or statement expected. +destructuringParameterDeclaration6.ts(26,16): error TS1003: Identifier expected. +destructuringParameterDeclaration6.ts(26,23): error TS1005: ',' expected. +destructuringParameterDeclaration6.ts(26,28): error TS1005: '(' expected. +destructuringParameterDeclaration6.ts(28,13): error TS2370: A rest parameter must be of an array type. + + +==== destructuringParameterDeclaration6.ts (726 errors) ==== + // A parameter declaration may specify either an identifier or a binding pattern. + + // Reserved words are not allowed to be used as an identifier in parameter declaration + "use strict" + + // Error + function a({while}: { + ~ +!!! error TS1005: ':' expected. + while: any; + }): void { } + function a1({public}: { + public: any; + }): void { } + function a4([: any[]: [ + ~ +!!! error TS1181: Array element destructuring pattern expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1005: ',' expected. + any, + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + any[] + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ]: [ + ~ +!!! error TS1005: ',' expected. + any, + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + any[], + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + [any, any, any[]] + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ]: [ + ~ +!!! error TS1005: ',' expected. + any, + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + any[], + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + [any, any, any[]], + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + [any, any, any[], [any, any, any, any[]]] + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]]]]]while, for, public]){ } + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~~~ +!!! error TS2300: Duplicate identifier 'any'. + ~ +!!! error TS1005: ',' expected. + ~~~~~ +!!! error TS1005: ',' expected. + +!!! error TS2695: Left side of comma operator is unused and has no side effects. + ~ +!!! error TS1005: '(' expected. + ~~~ +!!! error TS1109: Expression expected. + +!!! error TS2695: Left side of comma operator is unused and has no side effects. + ~ +!!! error TS1005: '(' expected. + ~~~~~~ +!!! error TS2304: Cannot find name 'public'. + ~ +!!! error TS1005: ';' expected. + ~ +!!! error TS1128: Declaration or statement expected. + function a5(...: any[]while) { } + ~ +!!! error TS1003: Identifier expected. + ~~~~~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1005: '(' expected. + function a6(...public: any[]): void { } + function a7(...a: string): void { } + ~~~~~~~~~~~~ +!!! error TS2370: A rest parameter must be of an array type. + a({ while: 1 }); + + // No Error + function b1({public: x}: { + public: any; + }): void { } + function b2({while: y}: { + while: any; + }): void { } + b1({ public: 1 }); + b2({ while: 1 }); + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties1.d.ts new file mode 100644 index 0000000000000..c481abdbb344d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties1.d.ts @@ -0,0 +1,159 @@ +//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties1.ts] //// + +//// [destructuringParameterProperties1.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) { + } +} + +var c1: C1 = new C1([]); +c1 = new C1(["larry", "{curly}", "moe"]); +var useC1Properties: boolean = c1.x === c1.y && c1.y === c1.z; + +var c2: C2 = new C2(["10", 10, !!10]); +const dest: any[] = [c2.x, c2.y, c2.z]; +const c2_x: any = dest[0]; +const c2_y: any = dest[1]; +const c2_z: any = dest[2]; + +var c3: C3 = new C3({x: 0, y: "", z: false}); +c3 = new C3({x: 0, "y": "y", z: true}); +const dest_1: any[] = [c3.x, c3.y, c3.z]; +const c3_x: any = dest_1[0]; +const c3_y: any = dest_1[1]; +const c3_z: any = dest_1[2]; + +/// [Declarations] //// + + + +//// [/.src/destructuringParameterProperties1.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); +} +declare var c1: C1; +declare var useC1Properties: boolean; +declare var c2: C2; +declare const dest: any[]; +declare const c2_x: any; +declare const c2_y: any; +declare const c2_z: any; +declare var c3: C3; +declare const dest_1: any[]; +declare const c3_x: any; +declare const c3_y: any; +declare const c3_z: any; +/// [Errors] //// + +destructuringParameterProperties1.ts(2,17): error TS1187: A parameter property may not be declared using a binding pattern. +destructuringParameterProperties1.ts(9,17): error TS1187: A parameter property may not be declared using a binding pattern. +destructuringParameterProperties1.ts(16,17): error TS1187: A parameter property may not be declared using a binding pattern. +destructuringParameterProperties1.ts(22,35): error TS2339: Property 'x' does not exist on type 'C1'. +destructuringParameterProperties1.ts(22,44): error TS2339: Property 'y' does not exist on type 'C1'. +destructuringParameterProperties1.ts(22,52): error TS2339: Property 'y' does not exist on type 'C1'. +destructuringParameterProperties1.ts(22,61): error TS2339: Property 'z' does not exist on type 'C1'. +destructuringParameterProperties1.ts(25,25): error TS2339: Property 'x' does not exist on type 'C2'. +destructuringParameterProperties1.ts(25,31): error TS2339: Property 'y' does not exist on type 'C2'. +destructuringParameterProperties1.ts(25,37): error TS2339: Property 'z' does not exist on type 'C2'. +destructuringParameterProperties1.ts(32,27): error TS2339: Property 'x' does not exist on type 'C3'. +destructuringParameterProperties1.ts(32,33): error TS2339: Property 'y' does not exist on type 'C3'. +destructuringParameterProperties1.ts(32,39): error TS2339: Property 'z' does not exist on type 'C3'. + + +==== destructuringParameterProperties1.ts (13 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. + } + } + + var c1: C1 = new C1([]); + c1 = new C1(["larry", "{curly}", "moe"]); + var useC1Properties: boolean = c1.x === c1.y && c1.y === c1.z; + ~ +!!! error TS2339: Property 'x' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'y' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'y' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'z' does not exist on type 'C1'. + + var c2: C2 = new C2(["10", 10, !!10]); + const dest: any[] = [c2.x, c2.y, c2.z]; + ~ +!!! error TS2339: Property 'x' does not exist on type 'C2'. + ~ +!!! error TS2339: Property 'y' does not exist on type 'C2'. + ~ +!!! error TS2339: Property 'z' does not exist on type 'C2'. + const c2_x: any = dest[0]; + const c2_y: any = dest[1]; + const c2_z: any = dest[2]; + + var c3: C3 = new C3({x: 0, y: "", z: false}); + c3 = new C3({x: 0, "y": "y", z: true}); + const dest_1: any[] = [c3.x, c3.y, c3.z]; + ~ +!!! error TS2339: Property 'x' does not exist on type 'C3'. + ~ +!!! error TS2339: Property 'y' does not exist on type 'C3'. + ~ +!!! error TS2339: Property 'z' does not exist on type 'C3'. + const c3_x: any = dest_1[0]; + const c3_y: any = dest_1[1]; + const c3_z: any = dest_1[2]; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties2.d.ts new file mode 100644 index 0000000000000..5f99d88772b83 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties2.d.ts @@ -0,0 +1,145 @@ +//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties2.ts] //// + +//// [destructuringParameterProperties2.ts] +class C1 { + constructor(private k: number, private [a, b, c]: [number, string, boolean]) { + if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { + this.a = a || k; + } + } + + public getA(): any { + return this.a + } + + public getB(): any { + return this.b + } + + public getC(): any { + return this.c; + } +} + +var x: C1 = new C1(undefined, [0, undefined, ""]); +const dest: any[] = [x.getA(), x.getB(), x.getC()]; +const x_a: any = dest[0]; +const x_b: any = dest[1]; +const x_c: any = dest[2]; + +var y: C1 = new C1(10, [0, "", true]); +const dest_1: any[] = [y.getA(), y.getB(), y.getC()]; +const y_a: any = dest_1[0]; +const y_b: any = dest_1[1]; +const y_c: any = dest_1[2]; + +var z: C1 = new C1(10, [undefined, "", null]); +const dest: any[] = [z.getA(), z.getB(), z.getC()]; +const z_a: any = dest[0]; +const z_b: any = dest[1]; +const z_c: any = dest[2]; + + +/// [Declarations] //// + + + +//// [/.src/destructuringParameterProperties2.d.ts] +declare class C1 { + private k; + private a: number; + private b: string; + private c: boolean; + constructor(k: number, [a, b, c]: [number, string, boolean]); + getA(): any; + getB(): any; + getC(): any; +} +declare var x: C1; +declare const dest: any[]; +declare const x_a: any; +declare const x_b: any; +declare const x_c: any; +declare var y: C1; +declare const dest_1: any[]; +declare const y_a: any; +declare const y_b: any; +declare const y_c: any; +declare var z: C1; +declare const dest: any[]; +declare const z_a: any; +declare const z_b: any; +declare const z_c: any; +/// [Errors] //// + +destructuringParameterProperties2.ts(2,36): error TS1187: A parameter property may not be declared using a binding pattern. +destructuringParameterProperties2.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. +destructuringParameterProperties2.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. +destructuringParameterProperties2.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. +destructuringParameterProperties2.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. +destructuringParameterProperties2.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. +destructuringParameterProperties2.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. +destructuringParameterProperties2.ts(21,46): error TS2322: Type 'string' is not assignable to type 'boolean'. +destructuringParameterProperties2.ts(22,7): error TS2451: Cannot redeclare block-scoped variable 'dest'. +destructuringParameterProperties2.ts(34,7): error TS2451: Cannot redeclare block-scoped variable 'dest'. + + +==== destructuringParameterProperties2.ts (10 errors) ==== + class C1 { + constructor(private k: number, private [a, b, c]: [number, string, boolean]) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1187: A parameter property may not be declared using a binding pattern. + if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { + ~ +!!! error TS2339: Property 'b' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'c' does not exist on type 'C1'. + this.a = a || k; + ~ +!!! error TS2339: Property 'a' does not exist on type 'C1'. + } + } + + public getA(): any { + return this.a + ~ +!!! error TS2339: Property 'a' does not exist on type 'C1'. + } + + public getB(): any { + return this.b + ~ +!!! error TS2339: Property 'b' does not exist on type 'C1'. + } + + public getC(): any { + return this.c; + ~ +!!! error TS2339: Property 'c' does not exist on type 'C1'. + } + } + + var x: C1 = new C1(undefined, [0, undefined, ""]); + ~~ +!!! error TS2322: Type 'string' is not assignable to type 'boolean'. + const dest: any[] = [x.getA(), x.getB(), x.getC()]; + ~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'dest'. + const x_a: any = dest[0]; + const x_b: any = dest[1]; + const x_c: any = dest[2]; + + var y: C1 = new C1(10, [0, "", true]); + const dest_1: any[] = [y.getA(), y.getB(), y.getC()]; + const y_a: any = dest_1[0]; + const y_b: any = dest_1[1]; + const y_c: any = dest_1[2]; + + var z: C1 = new C1(10, [undefined, "", null]); + const dest: any[] = [z.getA(), z.getB(), z.getC()]; + ~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'dest'. + const z_a: any = dest[0]; + const z_b: any = dest[1]; + const z_c: any = dest[2]; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties3.d.ts new file mode 100644 index 0000000000000..e7e4e66b12606 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties3.d.ts @@ -0,0 +1,183 @@ +//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts] //// + +//// [destructuringParameterProperties3.ts] +class C1 { + constructor(private k: T, private [a, b, c]: [T,U,V]) { + if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { + this.a = a || k; + } + } + + public getA(): any { + return this.a + } + + public getB(): any { + return this.b + } + + public getC(): any { + return this.c; + } +} + +var x: C1 = new C1(undefined, [0, true, ""]); +const dest: any[] = [x.getA(), x.getB(), x.getC()]; +const x_a: any = dest[0]; +const x_b: any = dest[1]; +const x_c: any = dest[2]; + +var y: C1 = new C1(10, [0, true, true]); +const dest_1: any[] = [y.getA(), y.getB(), y.getC()]; +const y_a: any = dest_1[0]; +const y_b: any = dest_1[1]; +const y_c: any = dest_1[2]; + +var z: C1<10, string, string> = new C1(10, [undefined, "", ""]); +const dest: any[] = [z.getA(), z.getB(), z.getC()]; +const z_a: any = dest[0]; +const z_b: any = dest[1]; +const z_c: any = dest[2]; + +var w: C1<10, any, any> = new C1(10, [undefined, undefined, undefined]); +const dest_1: any[] = [z.getA(), z.getB(), z.getC()]; +const z_a: any = dest_1[0]; +const z_b: any = dest_1[1]; +const z_c: any = dest_1[2]; + + +/// [Declarations] //// + + + +//// [/.src/destructuringParameterProperties3.d.ts] +declare class C1 { + private k; + private a: T; + private b: U; + private c: V; + constructor(k: T, [a, b, c]: [T, U, V]); + getA(): any; + getB(): any; + getC(): any; +} +declare var x: C1; +declare const dest: any[]; +declare const x_a: any; +declare const x_b: any; +declare const x_c: any; +declare var y: C1; +declare const dest_1: any[]; +declare const y_a: any; +declare const y_b: any; +declare const y_c: any; +declare var z: C1<10, string, string>; +declare const dest: any[]; +declare const z_a: any; +declare const z_b: any; +declare const z_c: any; +declare var w: C1<10, any, any>; +declare const dest_1: any[]; +declare const z_a: any; +declare const z_b: any; +declare const z_c: any; +/// [Errors] //// + +destructuringParameterProperties3.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. +destructuringParameterProperties3.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. +destructuringParameterProperties3.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. +destructuringParameterProperties3.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. +destructuringParameterProperties3.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. +destructuringParameterProperties3.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. +destructuringParameterProperties3.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. +destructuringParameterProperties3.ts(22,7): error TS2451: Cannot redeclare block-scoped variable 'dest'. +destructuringParameterProperties3.ts(28,7): error TS2451: Cannot redeclare block-scoped variable 'dest_1'. +destructuringParameterProperties3.ts(34,7): error TS2451: Cannot redeclare block-scoped variable 'dest'. +destructuringParameterProperties3.ts(35,7): error TS2451: Cannot redeclare block-scoped variable 'z_a'. +destructuringParameterProperties3.ts(36,7): error TS2451: Cannot redeclare block-scoped variable 'z_b'. +destructuringParameterProperties3.ts(37,7): error TS2451: Cannot redeclare block-scoped variable 'z_c'. +destructuringParameterProperties3.ts(40,7): error TS2451: Cannot redeclare block-scoped variable 'dest_1'. +destructuringParameterProperties3.ts(41,7): error TS2451: Cannot redeclare block-scoped variable 'z_a'. +destructuringParameterProperties3.ts(42,7): error TS2451: Cannot redeclare block-scoped variable 'z_b'. +destructuringParameterProperties3.ts(43,7): error TS2451: Cannot redeclare block-scoped variable 'z_c'. + + +==== destructuringParameterProperties3.ts (17 errors) ==== + class C1 { + constructor(private k: T, private [a, b, c]: [T,U,V]) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1187: A parameter property may not be declared using a binding pattern. + if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { + ~ +!!! error TS2339: Property 'b' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'c' does not exist on type 'C1'. + this.a = a || k; + ~ +!!! error TS2339: Property 'a' does not exist on type 'C1'. + } + } + + public getA(): any { + return this.a + ~ +!!! error TS2339: Property 'a' does not exist on type 'C1'. + } + + public getB(): any { + return this.b + ~ +!!! error TS2339: Property 'b' does not exist on type 'C1'. + } + + public getC(): any { + return this.c; + ~ +!!! error TS2339: Property 'c' does not exist on type 'C1'. + } + } + + var x: C1 = new C1(undefined, [0, true, ""]); + const dest: any[] = [x.getA(), x.getB(), x.getC()]; + ~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'dest'. + const x_a: any = dest[0]; + const x_b: any = dest[1]; + const x_c: any = dest[2]; + + var y: C1 = new C1(10, [0, true, true]); + const dest_1: any[] = [y.getA(), y.getB(), y.getC()]; + ~~~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'dest_1'. + const y_a: any = dest_1[0]; + const y_b: any = dest_1[1]; + const y_c: any = dest_1[2]; + + var z: C1<10, string, string> = new C1(10, [undefined, "", ""]); + const dest: any[] = [z.getA(), z.getB(), z.getC()]; + ~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'dest'. + const z_a: any = dest[0]; + ~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'z_a'. + const z_b: any = dest[1]; + ~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'z_b'. + const z_c: any = dest[2]; + ~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'z_c'. + + var w: C1<10, any, any> = new C1(10, [undefined, undefined, undefined]); + const dest_1: any[] = [z.getA(), z.getB(), z.getC()]; + ~~~~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'dest_1'. + const z_a: any = dest_1[0]; + ~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'z_a'. + const z_b: any = dest_1[1]; + ~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'z_b'. + const z_c: any = dest_1[2]; + ~~~ +!!! error TS2451: Cannot redeclare block-scoped variable 'z_c'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties4.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties4.d.ts new file mode 100644 index 0000000000000..58d6de3d40616 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties4.d.ts @@ -0,0 +1,109 @@ +//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties4.ts] //// + +//// [destructuringParameterProperties4.ts] +class C1 { + constructor(private k: T, protected [a, b, c]: [T,U,V]) { + if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { + this.a = a || k; + } + } + + public getA(): any { + return this.a + } + + public getB(): any { + return this.b + } + + public getC(): any { + return this.c; + } +} + +class C2 extends C1 { + public doSomethingWithSuperProperties(): string { + return `${this.a} ${this.b} ${this.c}`; + } +} + + +/// [Declarations] //// + + + +//// [/.src/destructuringParameterProperties4.d.ts] +declare class C1 { + private k; + protected a: T; + protected b: U; + protected c: V; + constructor(k: T, [a, b, c]: [T, U, V]); + getA(): any; + getB(): any; + getC(): any; +} +declare class C2 extends C1 { + doSomethingWithSuperProperties(): string; +} +/// [Errors] //// + +destructuringParameterProperties4.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. +destructuringParameterProperties4.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. +destructuringParameterProperties4.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. +destructuringParameterProperties4.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. +destructuringParameterProperties4.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. +destructuringParameterProperties4.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. +destructuringParameterProperties4.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. +destructuringParameterProperties4.ts(23,24): error TS2339: Property 'a' does not exist on type 'C2'. +destructuringParameterProperties4.ts(23,34): error TS2339: Property 'b' does not exist on type 'C2'. +destructuringParameterProperties4.ts(23,44): error TS2339: Property 'c' does not exist on type 'C2'. + + +==== destructuringParameterProperties4.ts (10 errors) ==== + class C1 { + constructor(private k: T, protected [a, b, c]: [T,U,V]) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1187: A parameter property may not be declared using a binding pattern. + if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { + ~ +!!! error TS2339: Property 'b' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'c' does not exist on type 'C1'. + this.a = a || k; + ~ +!!! error TS2339: Property 'a' does not exist on type 'C1'. + } + } + + public getA(): any { + return this.a + ~ +!!! error TS2339: Property 'a' does not exist on type 'C1'. + } + + public getB(): any { + return this.b + ~ +!!! error TS2339: Property 'b' does not exist on type 'C1'. + } + + public getC(): any { + return this.c; + ~ +!!! error TS2339: Property 'c' does not exist on type 'C1'. + } + } + + class C2 extends C1 { + public doSomethingWithSuperProperties(): string { + return `${this.a} ${this.b} ${this.c}`; + ~ +!!! error TS2339: Property 'a' does not exist on type 'C2'. + ~ +!!! error TS2339: Property 'b' does not exist on type 'C2'. + ~ +!!! error TS2339: Property 'c' does not exist on type 'C2'. + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties5.d.ts new file mode 100644 index 0000000000000..b16895f70e1c7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties5.d.ts @@ -0,0 +1,121 @@ +//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts] //// + +//// [destructuringParameterProperties5.ts] +type ObjType1 = { x: number; y: string; z: boolean } +type TupleType1 = [ObjType1, number, string] + +class C1 { + constructor(public [{ x1, x2, x3 }, y, z]: TupleType1) { + var foo: any = x1 || x2 || x3 || y || z; + var bar: any = this.x1 || this.x2 || this.x3 || this.y || this.z; + } +} + +var a: C1 = new C1([{ x1: 10, x2: "", x3: true }, "", false]); +const dest: any[] = [a.x1, a.x2, a.x3, a.y, a.z]; +const a_x1: any = dest[0]; +const a_x2: any = dest[1]; +const a_x3: any = dest[2]; +const a_y: any = dest[3]; +const a_z: any = dest[4]; + +/// [Declarations] //// + + + +//// [/.src/destructuringParameterProperties5.d.ts] +type ObjType1 = { + x: number; + y: string; + z: boolean; +}; +type TupleType1 = [ObjType1, number, string]; +declare class C1 { + x1: any; + x2: any; + x3: any; + { x1, x2, x3 }: any; + y: number; + z: string; + constructor([{ x1, x2, x3 }, y, z]: TupleType1); +} +declare var a: C1; +declare const dest: any[]; +declare const a_x1: any; +declare const a_x2: any; +declare const a_x3: any; +declare const a_y: any; +declare const a_z: any; +/// [Errors] //// + +destructuringParameterProperties5.ts(5,17): error TS1187: A parameter property may not be declared using a binding pattern. +destructuringParameterProperties5.ts(5,27): error TS2339: Property 'x1' does not exist on type 'ObjType1'. +destructuringParameterProperties5.ts(5,31): error TS2339: Property 'x2' does not exist on type 'ObjType1'. +destructuringParameterProperties5.ts(5,35): error TS2339: Property 'x3' does not exist on type 'ObjType1'. +destructuringParameterProperties5.ts(7,29): error TS2339: Property 'x1' does not exist on type 'C1'. +destructuringParameterProperties5.ts(7,40): error TS2339: Property 'x2' does not exist on type 'C1'. +destructuringParameterProperties5.ts(7,51): error TS2339: Property 'x3' does not exist on type 'C1'. +destructuringParameterProperties5.ts(7,62): error TS2339: Property 'y' does not exist on type 'C1'. +destructuringParameterProperties5.ts(7,72): error TS2339: Property 'z' does not exist on type 'C1'. +destructuringParameterProperties5.ts(11,23): error TS2353: Object literal may only specify known properties, and 'x1' does not exist in type 'ObjType1'. +destructuringParameterProperties5.ts(11,51): error TS2322: Type 'string' is not assignable to type 'number'. +destructuringParameterProperties5.ts(11,55): error TS2322: Type 'boolean' is not assignable to type 'string'. +destructuringParameterProperties5.ts(12,24): error TS2339: Property 'x1' does not exist on type 'C1'. +destructuringParameterProperties5.ts(12,30): error TS2339: Property 'x2' does not exist on type 'C1'. +destructuringParameterProperties5.ts(12,36): error TS2339: Property 'x3' does not exist on type 'C1'. +destructuringParameterProperties5.ts(12,42): error TS2339: Property 'y' does not exist on type 'C1'. +destructuringParameterProperties5.ts(12,47): error TS2339: Property 'z' does not exist on type 'C1'. + + +==== destructuringParameterProperties5.ts (17 errors) ==== + type ObjType1 = { x: number; y: string; z: boolean } + type TupleType1 = [ObjType1, number, string] + + class C1 { + constructor(public [{ x1, x2, x3 }, y, z]: TupleType1) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS1187: A parameter property may not be declared using a binding pattern. + ~~ +!!! error TS2339: Property 'x1' does not exist on type 'ObjType1'. + ~~ +!!! error TS2339: Property 'x2' does not exist on type 'ObjType1'. + ~~ +!!! error TS2339: Property 'x3' does not exist on type 'ObjType1'. + var foo: any = x1 || x2 || x3 || y || z; + var bar: any = this.x1 || this.x2 || this.x3 || this.y || this.z; + ~~ +!!! error TS2339: Property 'x1' does not exist on type 'C1'. + ~~ +!!! error TS2339: Property 'x2' does not exist on type 'C1'. + ~~ +!!! error TS2339: Property 'x3' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'y' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'z' does not exist on type 'C1'. + } + } + + var a: C1 = new C1([{ x1: 10, x2: "", x3: true }, "", false]); + ~~ +!!! error TS2353: Object literal may only specify known properties, and 'x1' does not exist in type 'ObjType1'. + ~~ +!!! error TS2322: Type 'string' is not assignable to type 'number'. + ~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'string'. + const dest: any[] = [a.x1, a.x2, a.x3, a.y, a.z]; + ~~ +!!! error TS2339: Property 'x1' does not exist on type 'C1'. + ~~ +!!! error TS2339: Property 'x2' does not exist on type 'C1'. + ~~ +!!! error TS2339: Property 'x3' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'y' does not exist on type 'C1'. + ~ +!!! error TS2339: Property 'z' does not exist on type 'C1'. + const a_x1: any = dest[0]; + const a_x2: any = dest[1]; + const a_x3: any = dest[2]; + const a_y: any = dest[3]; + const a_z: any = dest[4]; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/disallowLineTerminatorBeforeArrow.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/disallowLineTerminatorBeforeArrow.d.ts new file mode 100644 index 0000000000000..84aa9b47d880b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/disallowLineTerminatorBeforeArrow.d.ts @@ -0,0 +1,196 @@ +//// [tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts] //// + +//// [disallowLineTerminatorBeforeArrow.ts] +var f1 = (): void + => { } +var f2 = (x: string, y: string): void /* + */ => { } +var f3 = (x: string, y: number, ...rest: any[]): void + => { } +var f4 = (x: string, y: number, ...rest: any[]): void /* + */ => { } +var f5 = (...rest: any[]): void + => { } +var f6 = (...rest: any[]): void /* + */ => { } +var f7 = (x: string, y: number, z: number = 10): void + => { } +var f8 = (x: string, y: number, z: number = 10): void /* + */ => { } +var f9 = (a: number): number + => a; +var f10 = (a: number) : + number + => a +var f11 = (a: number): number /* + */ => a; +var f12 = (a: number) : + number /* + */ => a + +// Should be valid. +var f11 = (a: number + ): number => a; + +// Should be valid. +var f12 = (a: number) + : number => a; + +// Should be valid. +var f13 = (a: number): + number => a; + +// Should be valid. +var f14 = (): void /* */ => {} + +// Should be valid. +var f15 = (a: number): number /* */ => a + +// Should be valid. +var f16 = (a: number, b = 10): + number /* */ => a + b; + +function foo(func: () => boolean): void { } +foo(() + => true); +foo(() + => { return false; }); + +module m { + class City { + constructor(x: number, thing = () + => 100) { + } + + public m = () + => 2 * 2 * 2 + } + + export enum Enum { + claw = (() + => 10)() + } + + export var v: any = x: any: any + => new City(Enum.claw); +} + + +/// [Declarations] //// + + + +//// [/.src/disallowLineTerminatorBeforeArrow.d.ts] +declare var f1: () => void; +declare var f2: (x: string, y: string) => void; +declare var f3: (x: string, y: number, ...rest: any[]) => void; +declare var f4: (x: string, y: number, ...rest: any[]) => void; +declare var f5: (...rest: any[]) => void; +declare var f6: (...rest: any[]) => void; +declare var f7: (x: string, y: number, z?: number) => void; +declare var f8: (x: string, y: number, z?: number) => void; +declare var f9: (a: number) => number; +declare var f10: (a: number) => number; +declare var f11: (a: number) => number; +declare var f12: (a: number) => number; +declare var f11: (a: number) => number; +declare var f12: (a: number) => number; +declare var f13: (a: number) => number; +declare var f14: () => void; +declare var f15: (a: number) => number; +declare var f16: (a: number, b?: number) => number; +declare function foo(func: () => boolean): void; +declare namespace m { + enum Enum { + claw + } + var v: any, any: any; +} +/// [Errors] //// + +disallowLineTerminatorBeforeArrow.ts(71,25): error TS2304: Cannot find name 'x'. +disallowLineTerminatorBeforeArrow.ts(71,26): error TS1005: ',' expected. +disallowLineTerminatorBeforeArrow.ts(72,9): error TS1128: Declaration or statement expected. + + +==== disallowLineTerminatorBeforeArrow.ts (3 errors) ==== + var f1 = (): void + => { } + var f2 = (x: string, y: string): void /* + */ => { } + var f3 = (x: string, y: number, ...rest: any[]): void + => { } + var f4 = (x: string, y: number, ...rest: any[]): void /* + */ => { } + var f5 = (...rest: any[]): void + => { } + var f6 = (...rest: any[]): void /* + */ => { } + var f7 = (x: string, y: number, z: number = 10): void + => { } + var f8 = (x: string, y: number, z: number = 10): void /* + */ => { } + var f9 = (a: number): number + => a; + var f10 = (a: number) : + number + => a + var f11 = (a: number): number /* + */ => a; + var f12 = (a: number) : + number /* + */ => a + + // Should be valid. + var f11 = (a: number + ): number => a; + + // Should be valid. + var f12 = (a: number) + : number => a; + + // Should be valid. + var f13 = (a: number): + number => a; + + // Should be valid. + var f14 = (): void /* */ => {} + + // Should be valid. + var f15 = (a: number): number /* */ => a + + // Should be valid. + var f16 = (a: number, b = 10): + number /* */ => a + b; + + function foo(func: () => boolean): void { } + foo(() + => true); + foo(() + => { return false; }); + + module m { + class City { + constructor(x: number, thing = () + => 100) { + } + + public m = () + => 2 * 2 * 2 + } + + export enum Enum { + claw = (() + => 10)() + } + + export var v: any = x: any: any + ~ +!!! error TS2304: Cannot find name 'x'. + ~ +!!! error TS1005: ',' expected. + => new City(Enum.claw); + ~~ +!!! error TS1128: Declaration or statement expected. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicateObjectLiteralProperty.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicateObjectLiteralProperty.d.ts new file mode 100644 index 0000000000000..e2ef204594e60 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicateObjectLiteralProperty.d.ts @@ -0,0 +1,83 @@ +//// [tests/cases/compiler/duplicateObjectLiteralProperty.ts] //// + +//// [duplicateObjectLiteralProperty.ts] +var x = { + a: 1, + b: true, // OK + a: 56, // Duplicate + \u0061: "ss", // Duplicate + a: { + c: 1, + "c": 56, // Duplicate + } +}; + + +var y = { + get a() { return 0; }, + set a(v: number) { }, + get a(): number { return 0; } +}; + + +/// [Declarations] //// + + + +//// [/.src/duplicateObjectLiteralProperty.d.ts] +declare var x: { + a: { + c: number; + }; + b: boolean; +}; +declare var y: { + readonly a: number; +}; +/// [Errors] //// + +duplicateObjectLiteralProperty.ts(4,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty.ts(5,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty.ts(6,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty.ts(8,9): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty.ts(14,9): error TS2300: Duplicate identifier 'a'. +duplicateObjectLiteralProperty.ts(15,9): error TS2300: Duplicate identifier 'a'. +duplicateObjectLiteralProperty.ts(16,9): error TS1118: An object literal cannot have multiple get/set accessors with the same name. +duplicateObjectLiteralProperty.ts(16,9): error TS2300: Duplicate identifier 'a'. + + +==== duplicateObjectLiteralProperty.ts (8 errors) ==== + var x = { + a: 1, + b: true, // OK + a: 56, // Duplicate + ~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + \u0061: "ss", // Duplicate + ~~~~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + a: { + ~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + c: 1, + "c": 56, // Duplicate + ~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + }; + + + var y = { + get a() { return 0; }, + ~ +!!! error TS2300: Duplicate identifier 'a'. + set a(v: number) { }, + ~ +!!! error TS2300: Duplicate identifier 'a'. + get a(): number { return 0; } + ~ +!!! error TS1118: An object literal cannot have multiple get/set accessors with the same name. + ~ +!!! error TS2300: Duplicate identifier 'a'. + }; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumAssignmentCompat5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumAssignmentCompat5.d.ts new file mode 100644 index 0000000000000..e242919ed6952 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumAssignmentCompat5.d.ts @@ -0,0 +1,86 @@ +//// [tests/cases/compiler/enumAssignmentCompat5.ts] //// + +//// [enumAssignmentCompat5.ts] +enum E { + A, B, C +} +enum Computed { + A = 1 << 1, + B = 1 << 2, + C = 1 << 3, +} +let n: number; +let e: E = n; // ok because it's too inconvenient otherwise +e = 0; // ok, in range +e = 4; // ok, out of range, but allowed computed enums don't have all members +let a: E.A = 0; // ok, A === 0 +a = 2; // error, 2 !== 0 +a = n; // ok + +let c: Computed = n; // ok +c = n; // ok +c = 4; // ok +let ca: Computed.A = 1; // error, Computed.A isn't a literal type because Computed has no enum literals + + + + + +/// [Declarations] //// + + + +//// [/.src/enumAssignmentCompat5.d.ts] +declare enum E { + A = 0, + B = 1, + C = 2 +} +declare enum Computed { + A = 2, + B = 4, + C = 8 +} +declare let n: number; +declare let e: E; +declare let a: E.A; +declare let c: Computed; +declare let ca: Computed.A; +/// [Errors] //// + +enumAssignmentCompat5.ts(12,1): error TS2322: Type '4' is not assignable to type 'E'. +enumAssignmentCompat5.ts(14,1): error TS2322: Type '2' is not assignable to type 'E.A'. +enumAssignmentCompat5.ts(20,5): error TS2322: Type '1' is not assignable to type 'Computed.A'. + + +==== enumAssignmentCompat5.ts (3 errors) ==== + enum E { + A, B, C + } + enum Computed { + A = 1 << 1, + B = 1 << 2, + C = 1 << 3, + } + let n: number; + let e: E = n; // ok because it's too inconvenient otherwise + e = 0; // ok, in range + e = 4; // ok, out of range, but allowed computed enums don't have all members + ~ +!!! error TS2322: Type '4' is not assignable to type 'E'. + let a: E.A = 0; // ok, A === 0 + a = 2; // error, 2 !== 0 + ~ +!!! error TS2322: Type '2' is not assignable to type 'E.A'. + a = n; // ok + + let c: Computed = n; // ok + c = n; // ok + c = 4; // ok + let ca: Computed.A = 1; // error, Computed.A isn't a literal type because Computed has no enum literals + ~~ +!!! error TS2322: Type '1' is not assignable to type 'Computed.A'. + + + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics.d.ts new file mode 100644 index 0000000000000..3bb40f0475433 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics.d.ts @@ -0,0 +1,142 @@ +//// [tests/cases/conformance/enums/enumBasics.ts] //// + +//// [enumBasics.ts] +// Enum without initializers have first member = 0 and successive members = N + 1 +enum E1 { + A, + B, + C +} + +// Enum type is a subtype of Number +var x: number = E1.A; + +// Enum object type is anonymous with properties of the enum type and numeric indexer +var e: typeof E1 = E1; +var e: { + readonly A: E1.A; + readonly B: E1.B; + readonly C: E1.C; + readonly [n: number]: string; +}; +var e: typeof E1; + +// Reverse mapping of enum returns string name of property +var s: string = E1[e.A]; +var s: string; + + +// Enum with only constant members +enum E2 { + A = 1, B = 2, C = 3 +} + +// Enum with only computed members +enum E3 { + X = 'foo'.length, Y = 4 + 3, Z = +'foo' +} + +// Enum with constant members followed by computed members +enum E4 { + X = 0, Y, Z = 'foo'.length +} + +// Enum with > 2 constant members with no initializer for first member, non zero initializer for second element +enum E5 { + A, + B = 3, + C // 4 +} + +enum E6 { + A, + B = 0, + C // 1 +} + +// Enum with computed member initializer of type 'any' +enum E7 { + A = 'foo'['foo'] +} + +// Enum with computed member initializer of type number +enum E8 { + B = 'foo'['foo'] +} + +//Enum with computed member intializer of same enum type +enum E9 { + A, + B = A +} + +// (refer to .js to validate) +// Enum constant members are propagated +var doNotPropagate: (E8 | E7 | E4 | E3)[] = [ + E8.B, E7.A, E4.Z, E3.X, E3.Y, E3.Z +]; +// Enum computed members are not propagated +var doPropagate: (E9 | E6 | E5)[] = [ + E9.A, E9.B, E6.B, E6.C, E6.A, E5.A, E5.B, E5.C +]; + + + +/// [Declarations] //// + + + +//// [/.src/enumBasics.d.ts] +declare enum E1 { + A = 0, + B = 1, + C = 2 +} +declare var x: number; +declare var e: typeof E1; +declare var e: { + readonly A: E1.A; + readonly B: E1.B; + readonly C: E1.C; + readonly [n: number]: string; +}; +declare var e: typeof E1; +declare var s: string; +declare var s: string; +declare enum E2 { + A = 1, + B = 2, + C = 3 +} +declare enum E3 { + X, + Y = 7, + Z +} +declare enum E4 { + X = 0, + Y = 1, + Z +} +declare enum E5 { + A = 0, + B = 3, + C = 4 +} +declare enum E6 { + A = 0, + B = 0, + C = 1 +} +declare enum E7 { + A +} +declare enum E8 { + B +} +declare enum E9 { + A = 0, + B = 0 +} +declare var doNotPropagate: (E8 | E7 | E4 | E3)[]; +declare var doPropagate: (E9 | E6 | E5)[]; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics2.d.ts new file mode 100644 index 0000000000000..5d6b3e9e13785 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics2.d.ts @@ -0,0 +1,72 @@ +//// [tests/cases/compiler/enumBasics2.ts] //// + +//// [enumBasics2.ts] +enum Foo { + a = 2, + b = 3, + x = a.b, // should error + y = b.a, // should error + z = y.x * a.x, // should error +} + +enum Bar { + a = (1).valueOf(), // ok + b = Foo.a, // ok + c = Foo.a.valueOf(), // ok + d = Foo.a.a, // should error +} + + +/// [Declarations] //// + + + +//// [/.src/enumBasics2.d.ts] +declare enum Foo { + a = 2, + b = 3, + x,// should error + y,// should error + z +} +declare enum Bar { + a,// ok + b = 2,// ok + c,// ok + d +} +/// [Errors] //// + +enumBasics2.ts(4,9): error TS2339: Property 'b' does not exist on type 'Foo.a'. +enumBasics2.ts(5,9): error TS2339: Property 'a' does not exist on type 'Foo.b'. +enumBasics2.ts(6,9): error TS2339: Property 'x' does not exist on type 'Foo.y'. +enumBasics2.ts(6,15): error TS2339: Property 'x' does not exist on type 'Foo.a'. +enumBasics2.ts(13,13): error TS2339: Property 'a' does not exist on type 'Foo.a'. + + +==== enumBasics2.ts (5 errors) ==== + enum Foo { + a = 2, + b = 3, + x = a.b, // should error + ~ +!!! error TS2339: Property 'b' does not exist on type 'Foo.a'. + y = b.a, // should error + ~ +!!! error TS2339: Property 'a' does not exist on type 'Foo.b'. + z = y.x * a.x, // should error + ~ +!!! error TS2339: Property 'x' does not exist on type 'Foo.y'. + ~ +!!! error TS2339: Property 'x' does not exist on type 'Foo.a'. + } + + enum Bar { + a = (1).valueOf(), // ok + b = Foo.a, // ok + c = Foo.a.valueOf(), // ok + d = Foo.a.a, // should error + ~ +!!! error TS2339: Property 'a' does not exist on type 'Foo.a'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics3.d.ts new file mode 100644 index 0000000000000..8b8aa31f937a6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics3.d.ts @@ -0,0 +1,72 @@ +//// [tests/cases/compiler/enumBasics3.ts] //// + +//// [enumBasics3.ts] +module M { + export namespace N { + export enum E1 { + a = 1, + b = a.a, // should error + } + } +} + +module M { + export namespace N { + export enum E2 { + b = M.N.E1.a, + c = M.N.E1.a.a, // should error + } + } +} + + +/// [Declarations] //// + + + +//// [/.src/enumBasics3.d.ts] +declare namespace M { + namespace N { + enum E1 { + a = 1, + b + } + } +} +declare namespace M { + namespace N { + enum E2 { + b = 1, + c + } + } +} +/// [Errors] //// + +enumBasics3.ts(5,13): error TS2339: Property 'a' does not exist on type 'E1.a'. +enumBasics3.ts(14,20): error TS2339: Property 'a' does not exist on type 'E1.a'. + + +==== enumBasics3.ts (2 errors) ==== + module M { + export namespace N { + export enum E1 { + a = 1, + b = a.a, // should error + ~ +!!! error TS2339: Property 'a' does not exist on type 'E1.a'. + } + } + } + + module M { + export namespace N { + export enum E2 { + b = M.N.E1.a, + c = M.N.E1.a.a, // should error + ~ +!!! error TS2339: Property 'a' does not exist on type 'E1.a'. + } + } + } + \ No newline at end of file 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..00bc16c94a1e5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumClassification.d.ts @@ -0,0 +1,145 @@ +//// [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] //// + + + +//// [/.src/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 +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithString.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithString.d.ts new file mode 100644 index 0000000000000..4c6475c3819c5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithString.d.ts @@ -0,0 +1,113 @@ +//// [tests/cases/conformance/enums/enumConstantMemberWithString.ts] //// + +//// [enumConstantMemberWithString.ts] +enum T1 { + a = "1", + b = "1" + "2", + c = "1" + "2" + "3", + d = "a" - "a", + e = "a" + 1 +} + +enum T2 { + a = "1", + b = "1" + "2" +} + +enum T3 { + a = "1", + b = "1" + "2", + c = 1, + d = 1 + 2 +} + +enum T4 { + a = "1" +} + +enum T5 { + a = "1" + "2" +} + +declare enum T6 { + a = "1", + b = "1" + "2" +} + + +/// [Declarations] //// + + + +//// [/.src/enumConstantMemberWithString.d.ts] +declare enum T1 { + a = "1", + b = "12", + c = "123", + d, + e = "a1" +} +declare enum T2 { + a = "1", + b = "12" +} +declare enum T3 { + a = "1", + b = "12", + c = 1, + d = 3 +} +declare enum T4 { + a = "1" +} +declare enum T5 { + a = "12" +} +declare enum T6 { + a = "1", + b = "12" +} +/// [Errors] //// + +enumConstantMemberWithString.ts(5,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +enumConstantMemberWithString.ts(5,15): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + + +==== enumConstantMemberWithString.ts (2 errors) ==== + enum T1 { + a = "1", + b = "1" + "2", + c = "1" + "2" + "3", + d = "a" - "a", + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + ~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + e = "a" + 1 + } + + enum T2 { + a = "1", + b = "1" + "2" + } + + enum T3 { + a = "1", + b = "1" + "2", + c = 1, + d = 1 + 2 + } + + enum T4 { + a = "1" + } + + enum T5 { + a = "1" + "2" + } + + declare enum T6 { + a = "1", + b = "1" + "2" + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithStringEmitDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithStringEmitDeclaration.d.ts new file mode 100644 index 0000000000000..12fbd3d767ed7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithStringEmitDeclaration.d.ts @@ -0,0 +1,61 @@ +//// [tests/cases/conformance/enums/enumConstantMemberWithStringEmitDeclaration.ts] //// + +//// [enumConstantMemberWithStringEmitDeclaration.ts] +enum T1 { + a = "1", + b = "1" + "2", + c = "1" + "2" + "3" +} + +enum T2 { + a = "1", + b = "1" + "2" +} + +enum T3 { + a = "1", + b = "1" + "2" +} + +enum T4 { + a = "1" +} + +enum T5 { + a = "1" + "2" +} + +declare enum T6 { + a = "1", + b = "1" + "2" +} + + +/// [Declarations] //// + + + +//// [/.src/enumConstantMemberWithStringEmitDeclaration.d.ts] +declare enum T1 { + a = "1", + b = "12", + c = "123" +} +declare enum T2 { + a = "1", + b = "12" +} +declare enum T3 { + a = "1", + b = "12" +} +declare enum T4 { + a = "1" +} +declare enum T5 { + a = "12" +} +declare enum T6 { + a = "1", + b = "12" +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiterals.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiterals.d.ts new file mode 100644 index 0000000000000..fdddc71f6225b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiterals.d.ts @@ -0,0 +1,145 @@ +//// [tests/cases/conformance/enums/enumConstantMemberWithTemplateLiterals.ts] //// + +//// [enumConstantMemberWithTemplateLiterals.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, + e = `1` - `1`, + f = `1` + 1, + g = `1${"2"}3`, + h = `1`.length +} + +enum T6 { + a = 1, + b = `12`.length +} + +declare enum T7 { + a = `1`, + b = `1` + `1`, + c = "2" + `1` +} + + +/// [Declarations] //// + + + +//// [/.src/enumConstantMemberWithTemplateLiterals.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, + e, + f = "11", + g = "123", + h +} +declare enum T6 { + a = 1, + b +} +declare enum T7 { + a = "1", + b = "11", + c = "21" +} +/// [Errors] //// + +enumConstantMemberWithTemplateLiterals.ts(28,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +enumConstantMemberWithTemplateLiterals.ts(28,15): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + + +==== enumConstantMemberWithTemplateLiterals.ts (2 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, + e = `1` - `1`, + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + ~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. + f = `1` + 1, + g = `1${"2"}3`, + h = `1`.length + } + + enum T6 { + a = 1, + b = `12`.length + } + + 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/tsc/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts new file mode 100644 index 0000000000000..5e210e3f73fd8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts @@ -0,0 +1,82 @@ +//// [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] //// + + + +//// [/.src/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" +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMembers.d.ts new file mode 100644 index 0000000000000..7e4fe201c2dad --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMembers.d.ts @@ -0,0 +1,150 @@ +//// [tests/cases/conformance/enums/enumConstantMembers.ts] //// + +//// [enumConstantMembers.ts] +// Constant members allow negatives, but not decimals. Also hex literals are allowed +enum E1 { + a = 1, + b +} +enum E2 { + a = - 1, + b +} +enum E3 { + a = 0.1, + b // Error because 0.1 is not a constant +} + +declare enum E4 { + a = 1, + b = -1, + c = 0.1 // Not a constant +} + +enum E5 { + a = 1 / 0, + b = 2 / 0.0, + c = 1.0 / 0.0, + d = 0.0 / 0.0, + e = NaN, + f = Infinity, + g = -Infinity +} + +const enum E6 { + a = 1 / 0, + b = 2 / 0.0, + c = 1.0 / 0.0, + d = 0.0 / 0.0, + e = NaN, + f = Infinity, + g = -Infinity +} + + +/// [Declarations] //// + + + +//// [/.src/enumConstantMembers.d.ts] +declare enum E1 { + a = 1, + b = 2 +} +declare enum E2 { + a = -1, + b = 0 +} +declare enum E3 { + a = 0.1, + b = 1.1 +} +declare enum E4 { + a = 1, + b = -1, + c = 0.1 +} +declare enum E5 { + a = Infinity, + b = Infinity, + c = Infinity, + d = NaN, + e = NaN, + f = Infinity, + g = -Infinity +} +declare const enum E6 { + a = Infinity, + b = Infinity, + c = Infinity, + d = NaN, + e = NaN, + f = Infinity, + g = -Infinity +} +/// [Errors] //// + +enumConstantMembers.ts(32,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. +enumConstantMembers.ts(33,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. +enumConstantMembers.ts(34,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. +enumConstantMembers.ts(35,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. +enumConstantMembers.ts(36,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. +enumConstantMembers.ts(37,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. +enumConstantMembers.ts(38,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + + +==== enumConstantMembers.ts (7 errors) ==== + // Constant members allow negatives, but not decimals. Also hex literals are allowed + enum E1 { + a = 1, + b + } + enum E2 { + a = - 1, + b + } + enum E3 { + a = 0.1, + b // Error because 0.1 is not a constant + } + + declare enum E4 { + a = 1, + b = -1, + c = 0.1 // Not a constant + } + + enum E5 { + a = 1 / 0, + b = 2 / 0.0, + c = 1.0 / 0.0, + d = 0.0 / 0.0, + e = NaN, + f = Infinity, + g = -Infinity + } + + const enum E6 { + a = 1 / 0, + ~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + b = 2 / 0.0, + ~~~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + c = 1.0 / 0.0, + ~~~~~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + d = 0.0 / 0.0, + ~~~~~~~~~ +!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. + e = NaN, + ~~~ +!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. + f = Infinity, + ~~~~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + g = -Infinity + ~~~~~~~~~ +!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrorOnConstantBindingWithInitializer.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrorOnConstantBindingWithInitializer.d.ts new file mode 100644 index 0000000000000..d5b8b9cb4951b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrorOnConstantBindingWithInitializer.d.ts @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/enums/enumErrorOnConstantBindingWithInitializer.ts] //// + +//// [enumErrorOnConstantBindingWithInitializer.ts] +type Thing = { + value?: string | number; +}; + +declare const thing: Thing; +const temp: string | number | undefined = thing.value; +const value: string | number = temp === undefined ? "123" : thing.value; + +enum E { + test = value, +} + + +/// [Declarations] //// + + + +//// [/.src/enumErrorOnConstantBindingWithInitializer.d.ts] +type Thing = { + value?: string | number; +}; +declare const thing: Thing; +declare const temp: string | number | undefined; +declare const value: string | number; +declare enum E { + test +} +/// [Errors] //// + +enumErrorOnConstantBindingWithInitializer.ts(7,7): error TS2322: Type 'string | number | undefined' is not assignable to type 'string | number'. + Type 'undefined' is not assignable to type 'string | number'. +enumErrorOnConstantBindingWithInitializer.ts(10,10): error TS18033: Type 'string | number' is not assignable to type 'number' as required for computed enum member values. + Type 'string' is not assignable to type 'number'. + + +==== enumErrorOnConstantBindingWithInitializer.ts (2 errors) ==== + type Thing = { + value?: string | number; + }; + + declare const thing: Thing; + const temp: string | number | undefined = thing.value; + const value: string | number = temp === undefined ? "123" : thing.value; + ~~~~~ +!!! error TS2322: Type 'string | number | undefined' is not assignable to type 'string | number'. +!!! error TS2322: Type 'undefined' is not assignable to type 'string | number'. + + enum E { + test = value, + ~~~~~ +!!! error TS18033: Type 'string | number' is not assignable to type 'number' as required for computed enum member values. +!!! error TS18033: 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/enumErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrors.d.ts new file mode 100644 index 0000000000000..5060fdd3abaf9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrors.d.ts @@ -0,0 +1,248 @@ +//// [tests/cases/conformance/enums/enumErrors.ts] //// + +//// [enumErrors.ts] +// Enum named with PredefinedTypes +enum any { } +enum number { } +enum string { } +enum boolean { } + +// Enum with computed member initializer of type Number +enum E5 { + C = new Number(30) +} + +enum E9 { + A, + B = A +} + +//Enum with computed member intializer of different enum type +// Bug 707850: This should be allowed +enum E10 { + A = E9.A, + B = E9.B +} + +// Enum with computed member intializer of other types +enum E11 { + A = true, + B = new Date(), + C = window, + D = {}, + E = (() => 'foo')(), +} + +// Enum with string valued member and computed member initializers +enum E12 { + A = '', + B = new Date(), + C = window, + D = {}, + E = 1 + 1, + F = (() => 'foo')(), +} + +// Enum with incorrect syntax +enum E13 { + postComma, + postValueComma = 1, + + postSemicolon; + postColonValueComma: 2, + postColonValueSemicolon: 3; +}; + +enum E14 { a, b: any "hello" += 1, c, d} + + +/// [Declarations] //// + + + +//// [/.src/enumErrors.d.ts] +declare enum any { +} +declare enum number { +} +declare enum string { +} +declare enum boolean { +} +declare enum E5 { + C +} +declare enum E9 { + A = 0, + B = 0 +} +declare enum E10 { + A = 0, + B = 0 +} +declare enum E11 { + A, + B, + C, + D, + E +} +declare enum E12 { + A = "", + B, + C, + D, + E = 2, + F +} +declare enum E13 { + postComma = 0, + postValueComma = 1, + postSemicolon = 2, + postColonValueComma = 3, + 2 = 4, + postColonValueSemicolon = 5, + 3 = 6 +} +declare enum E14 { + a = 0, + b = 1, + any = 2, + "hello" = 3, + 1 = 4, + c = 5, + d = 6 +} +/// [Errors] //// + +enumErrors.ts(2,6): error TS2431: Enum name cannot be 'any'. +enumErrors.ts(3,6): error TS2431: Enum name cannot be 'number'. +enumErrors.ts(4,6): error TS2431: Enum name cannot be 'string'. +enumErrors.ts(5,6): error TS2431: Enum name cannot be 'boolean'. +enumErrors.ts(9,9): error TS18033: Type 'Number' is not assignable to type 'number' as required for computed enum member values. + 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. +enumErrors.ts(26,9): error TS18033: Type 'boolean' is not assignable to type 'number' as required for computed enum member values. +enumErrors.ts(27,9): error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. +enumErrors.ts(28,9): error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. +enumErrors.ts(29,9): error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. +enumErrors.ts(30,9): error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. +enumErrors.ts(36,9): error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. +enumErrors.ts(37,9): error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. +enumErrors.ts(38,9): error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. +enumErrors.ts(40,9): error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. +enumErrors.ts(48,18): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(49,24): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(49,26): error TS2452: An enum member cannot have a numeric name. +enumErrors.ts(50,28): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(50,30): error TS2452: An enum member cannot have a numeric name. +enumErrors.ts(50,31): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(53,16): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(53,22): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(53,30): error TS1357: An enum member name must be followed by a ',', '=', or '}'. +enumErrors.ts(53,33): error TS2452: An enum member cannot have a numeric name. + + +==== enumErrors.ts (24 errors) ==== + // Enum named with PredefinedTypes + enum any { } + ~~~ +!!! error TS2431: Enum name cannot be 'any'. + enum number { } + ~~~~~~ +!!! error TS2431: Enum name cannot be 'number'. + enum string { } + ~~~~~~ +!!! error TS2431: Enum name cannot be 'string'. + enum boolean { } + ~~~~~~~ +!!! error TS2431: Enum name cannot be 'boolean'. + + // Enum with computed member initializer of type Number + enum E5 { + C = new Number(30) + ~~~~~~~~~~~~~~ +!!! error TS18033: Type 'Number' is not assignable to type 'number' as required for computed enum member values. +!!! error TS18033: 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. + } + + enum E9 { + A, + B = A + } + + //Enum with computed member intializer of different enum type + // Bug 707850: This should be allowed + enum E10 { + A = E9.A, + B = E9.B + } + + // Enum with computed member intializer of other types + enum E11 { + A = true, + ~~~~ +!!! error TS18033: Type 'boolean' is not assignable to type 'number' as required for computed enum member values. + B = new Date(), + ~~~~~~~~~~ +!!! error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. + C = window, + ~~~~~~ +!!! error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. + D = {}, + ~~ +!!! error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. + E = (() => 'foo')(), + ~~~~~~~~~~~~~~~ +!!! error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. + } + + // Enum with string valued member and computed member initializers + enum E12 { + A = '', + B = new Date(), + ~~~~~~~~~~ +!!! error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. + C = window, + ~~~~~~ +!!! error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. + D = {}, + ~~ +!!! error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. + E = 1 + 1, + F = (() => 'foo')(), + ~~~~~~~~~~~~~~~ +!!! error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. + } + + // Enum with incorrect syntax + enum E13 { + postComma, + postValueComma = 1, + + postSemicolon; + ~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + postColonValueComma: 2, + ~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + ~ +!!! error TS2452: An enum member cannot have a numeric name. + postColonValueSemicolon: 3; + ~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + ~ +!!! error TS2452: An enum member cannot have a numeric name. + ~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + }; + + enum E14 { a, b: any "hello" += 1, c, d} + ~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + ~~~~~~~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + ~~ +!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. + ~ +!!! error TS2452: An enum member cannot have a numeric name. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumExportMergingES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumExportMergingES6.d.ts new file mode 100644 index 0000000000000..23ed53e9a5741 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumExportMergingES6.d.ts @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/enums/enumExportMergingES6.ts] //// + +//// [enumExportMergingES6.ts] +export enum Animals { + Cat = 1 +} +export enum Animals { + Dog = 2 +} +export enum Animals { + CatDog = Cat | Dog +} + + +/// [Declarations] //// + + + +//// [/.src/enumExportMergingES6.d.ts] +export declare enum Animals { + Cat = 1 +} +export declare enum Animals { + Dog = 2 +} +export declare enum Animals { + CatDog = 3 +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumLiteralAssignableToEnumInsideUnion.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumLiteralAssignableToEnumInsideUnion.d.ts new file mode 100644 index 0000000000000..5da8504c6ca17 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumLiteralAssignableToEnumInsideUnion.d.ts @@ -0,0 +1,117 @@ +//// [tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts] //// + +//// [enumLiteralAssignableToEnumInsideUnion.ts] +module X { + export enum Foo { + A, B + } +} +module Y { + export enum Foo { + A, B + } +} +module Z { + export enum Foo { + A = 1 << 1, + B = 1 << 2, + } +} +module Ka { + export enum Foo { + A = 1 << 10, + B = 1 << 11, + } +} +const e0: X.Foo | boolean = Y.Foo.A; // ok +const e1: X.Foo | boolean = Z.Foo.A; // not legal, Z is computed +const e2: X.Foo.A | X.Foo.B | boolean = Z.Foo.A; // still not legal +const e3: X.Foo.B | boolean = Z.Foo.A; // not legal +const e4: X.Foo.A | boolean = Z.Foo.A; // not legal either because Z.Foo is computed and Z.Foo.A is not necessarily assignable to X.Foo.A +const e5: Ka.Foo | boolean = Z.Foo.A; // ok + + +/// [Declarations] //// + + + +//// [/.src/enumLiteralAssignableToEnumInsideUnion.d.ts] +declare namespace X { + enum Foo { + A = 0, + B = 1 + } +} +declare namespace Y { + enum Foo { + A = 0, + B = 1 + } +} +declare namespace Z { + enum Foo { + A = 2, + B = 4 + } +} +declare namespace Ka { + enum Foo { + A = 1024, + B = 2048 + } +} +declare const e0: X.Foo | boolean; +declare const e1: X.Foo | boolean; +declare const e2: X.Foo.A | X.Foo.B | boolean; +declare const e3: X.Foo.B | boolean; +declare const e4: X.Foo.A | boolean; +declare const e5: Ka.Foo | boolean; +/// [Errors] //// + +enumLiteralAssignableToEnumInsideUnion.ts(24,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. +enumLiteralAssignableToEnumInsideUnion.ts(25,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. +enumLiteralAssignableToEnumInsideUnion.ts(26,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo.B'. +enumLiteralAssignableToEnumInsideUnion.ts(27,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo.A'. +enumLiteralAssignableToEnumInsideUnion.ts(28,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. + + +==== enumLiteralAssignableToEnumInsideUnion.ts (5 errors) ==== + module X { + export enum Foo { + A, B + } + } + module Y { + export enum Foo { + A, B + } + } + module Z { + export enum Foo { + A = 1 << 1, + B = 1 << 2, + } + } + module Ka { + export enum Foo { + A = 1 << 10, + B = 1 << 11, + } + } + const e0: X.Foo | boolean = Y.Foo.A; // ok + const e1: X.Foo | boolean = Z.Foo.A; // not legal, Z is computed + ~~ +!!! error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. + const e2: X.Foo.A | X.Foo.B | boolean = Z.Foo.A; // still not legal + ~~ +!!! error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. + const e3: X.Foo.B | boolean = Z.Foo.A; // not legal + ~~ +!!! error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo.B'. + const e4: X.Foo.A | boolean = Z.Foo.A; // not legal either because Z.Foo is computed and Z.Foo.A is not necessarily assignable to X.Foo.A + ~~ +!!! error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo.A'. + const e5: Ka.Foo | boolean = Z.Foo.A; // ok + ~~ +!!! error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMerging.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMerging.d.ts new file mode 100644 index 0000000000000..6a9ba1ce228b1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMerging.d.ts @@ -0,0 +1,129 @@ +//// [tests/cases/conformance/enums/enumMerging.ts] //// + +//// [enumMerging.ts] +// Enum with only constant members across 2 declarations with the same root module +// Enum with initializer in all declarations with constant members with the same root module +module M1 { + enum EImpl1 { + A, B, C + } + + enum EImpl1 { + D = 1, E, F + } + + export enum EConst1 { + A = 3, B = 2, C = 1 + } + + export enum EConst1 { + D = 7, E = 9, F = 8 + } + + var x = [EConst1.A, EConst1.B, EConst1.C, EConst1.D, EConst1.E, EConst1.F]; +} + +// Enum with only computed members across 2 declarations with the same root module +module M2 { + export enum EComp2 { + A = 'foo'.length, B = 'foo'.length, C = 'foo'.length + } + + export enum EComp2 { + D = 'foo'.length, E = 'foo'.length, F = 'foo'.length + } + + var x = [EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F]; +} + +// Enum with initializer in only one of two declarations with constant members with the same root module +module M3 { + enum EInit { + A, + B + } + + enum EInit { + C = 1, D, E + } +} + +// Enums with same name but different root module +module M4 { + export enum Color { Red, Green, Blue } +} +module M5 { + export enum Color { Red, Green, Blue } +} + +module M6.A { + export enum Color { Red, Green, Blue } +} +module M6 { + export module A { + export enum Color { Yellow = 1 } + } + var t = A.Color.Yellow; + t = A.Color.Red; +} + + +/// [Declarations] //// + + + +//// [/.src/enumMerging.d.ts] +declare namespace M1 { + enum EConst1 { + A = 3, + B = 2, + C = 1 + } + enum EConst1 { + D = 7, + E = 9, + F = 8 + } +} +declare namespace M2 { + enum EComp2 { + A, + B, + C + } + enum EComp2 { + D, + E, + F + } +} +declare namespace M3 { +} +declare namespace M4 { + enum Color { + Red = 0, + Green = 1, + Blue = 2 + } +} +declare namespace M5 { + enum Color { + Red = 0, + Green = 1, + Blue = 2 + } +} +declare namespace M6.A { + enum Color { + Red = 0, + Green = 1, + Blue = 2 + } +} +declare namespace M6 { + namespace A { + enum Color { + Yellow = 1 + } + } +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMergingErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMergingErrors.d.ts new file mode 100644 index 0000000000000..f28d4aa2751dd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMergingErrors.d.ts @@ -0,0 +1,167 @@ +//// [tests/cases/conformance/enums/enumMergingErrors.ts] //// + +//// [enumMergingErrors.ts] +// Enum with constant, computed, constant members split across 3 declarations with the same root module +module M { + export enum E1 { A = 0 } + export enum E2 { C } + export enum E3 { A = 0 } +} +module M { + export enum E1 { B = 'foo'.length } + export enum E2 { B = 'foo'.length } + export enum E3 { C } +} +module M { + export enum E1 { C } + export enum E2 { A = 0 } + export enum E3 { B = 'foo'.length } +} + +// Enum with no initializer in either declaration with constant members with the same root module +module M1 { + export enum E1 { A = 0 } +} +module M1 { + export enum E1 { B } +} +module M1 { + export enum E1 { C } +} + + +// Enum with initializer in only one of three declarations with constant members with the same root module +module M2 { + export enum E1 { A } +} +module M2 { + export enum E1 { B = 0 } +} +module M2 { + export enum E1 { C } +} + + + + +/// [Declarations] //// + + + +//// [/.src/enumMergingErrors.d.ts] +declare namespace M { + enum E1 { + A = 0 + } + enum E2 { + C = 0 + } + enum E3 { + A = 0 + } +} +declare namespace M { + enum E1 { + B + } + enum E2 { + B + } + enum E3 { + C = 0 + } +} +declare namespace M { + enum E1 { + C = 0 + } + enum E2 { + A = 0 + } + enum E3 { + B + } +} +declare namespace M1 { + enum E1 { + A = 0 + } +} +declare namespace M1 { + enum E1 { + B = 0 + } +} +declare namespace M1 { + enum E1 { + C = 0 + } +} +declare namespace M2 { + enum E1 { + A = 0 + } +} +declare namespace M2 { + enum E1 { + B = 0 + } +} +declare namespace M2 { + enum E1 { + C = 0 + } +} +/// [Errors] //// + +enumMergingErrors.ts(26,22): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. +enumMergingErrors.ts(38,22): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. + + +==== enumMergingErrors.ts (2 errors) ==== + // Enum with constant, computed, constant members split across 3 declarations with the same root module + module M { + export enum E1 { A = 0 } + export enum E2 { C } + export enum E3 { A = 0 } + } + module M { + export enum E1 { B = 'foo'.length } + export enum E2 { B = 'foo'.length } + export enum E3 { C } + } + module M { + export enum E1 { C } + export enum E2 { A = 0 } + export enum E3 { B = 'foo'.length } + } + + // Enum with no initializer in either declaration with constant members with the same root module + module M1 { + export enum E1 { A = 0 } + } + module M1 { + export enum E1 { B } + } + module M1 { + export enum E1 { C } + ~ +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. + } + + + // Enum with initializer in only one of three declarations with constant members with the same root module + module M2 { + export enum E1 { A } + } + module M2 { + export enum E1 { B = 0 } + } + module M2 { + export enum E1 { C } + ~ +!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. + } + + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumNumbering1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumNumbering1.d.ts new file mode 100644 index 0000000000000..6ef573ce0082f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumNumbering1.d.ts @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/enumNumbering1.ts] //// + +//// [enumNumbering1.ts] +enum Test { + A, + B, + C = Math.floor(Math.random() * 1000), + D = 10, + E // Error but shouldn't be +} + + +/// [Declarations] //// + + + +//// [/.src/enumNumbering1.d.ts] +declare enum Test { + A = 0, + B = 1, + C, + D = 10, + E = 11 +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumPropertyAccessBeforeInitalisation.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumPropertyAccessBeforeInitalisation.d.ts new file mode 100644 index 0000000000000..1bf6dcf5bdcce --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumPropertyAccessBeforeInitalisation.d.ts @@ -0,0 +1,46 @@ +//// [tests/cases/compiler/enumPropertyAccessBeforeInitalisation.ts] //// + +//// [enumPropertyAccessBeforeInitalisation.ts] +enum E { + A = A, + B = E.B, + C = E["C"], + D = 1 + D +} + + +/// [Declarations] //// + + + +//// [/.src/enumPropertyAccessBeforeInitalisation.d.ts] +declare enum E { + A, + B, + C, + D +} +/// [Errors] //// + +enumPropertyAccessBeforeInitalisation.ts(2,9): error TS2565: Property 'A' is used before being assigned. +enumPropertyAccessBeforeInitalisation.ts(3,9): error TS2565: Property 'B' is used before being assigned. +enumPropertyAccessBeforeInitalisation.ts(4,9): error TS2565: Property 'C' is used before being assigned. +enumPropertyAccessBeforeInitalisation.ts(5,13): error TS2565: Property 'D' is used before being assigned. + + +==== enumPropertyAccessBeforeInitalisation.ts (4 errors) ==== + enum E { + A = A, + ~ +!!! error TS2565: Property 'A' is used before being assigned. + B = E.B, + ~~~ +!!! error TS2565: Property 'B' is used before being assigned. + C = E["C"], + ~~~~~~ +!!! error TS2565: Property 'C' is used before being assigned. + D = 1 + D + ~ +!!! error TS2565: Property 'D' is used before being assigned. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithComputedMember.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithComputedMember.d.ts new file mode 100644 index 0000000000000..f5f09ee4d54e8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithComputedMember.d.ts @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/enumWithComputedMember.ts] //// + +//// [enumWithComputedMember.ts] +enum A { + X = "".length, + Y = X, + Z +} + + +/// [Declarations] //// + + + +//// [/.src/enumWithComputedMember.d.ts] +declare enum A { + X, + Y, + Z +} +/// [Errors] //// + +enumWithComputedMember.ts(4,5): error TS1061: Enum member must have initializer. + + +==== enumWithComputedMember.ts (1 errors) ==== + enum A { + X = "".length, + Y = X, + Z + ~ +!!! error TS1061: Enum member must have initializer. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithExport.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithExport.d.ts new file mode 100644 index 0000000000000..4480f3c3aaac0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithExport.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/compiler/enumWithExport.ts] //// + +//// [enumWithExport.ts] +namespace x { + export let y = 123 +} +enum x { + z = y +} + +/// [Declarations] //// + + + +//// [/.src/enumWithExport.d.ts] +declare namespace x { + let y: number; +} +declare enum x { + z +} +/// [Errors] //// + +enumWithExport.ts(5,7): error TS2304: Cannot find name 'y'. + + +==== enumWithExport.ts (1 errors) ==== + namespace x { + export let y = 123 + } + enum x { + z = y + ~ +!!! error TS2304: Cannot find name 'y'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithParenthesizedInitializer1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithParenthesizedInitializer1.d.ts new file mode 100644 index 0000000000000..f80bb0017582f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithParenthesizedInitializer1.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/compiler/enumWithParenthesizedInitializer1.ts] //// + +//// [enumWithParenthesizedInitializer1.ts] +enum E { + e = -(3 +} + +/// [Declarations] //// + + + +//// [/.src/enumWithParenthesizedInitializer1.d.ts] +declare enum E { + e = -3 +} +/// [Errors] //// + +enumWithParenthesizedInitializer1.ts(3,1): error TS1005: ')' expected. + + +==== enumWithParenthesizedInitializer1.ts (1 errors) ==== + enum E { + e = -(3 + } + ~ +!!! error TS1005: ')' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithoutInitializerAfterComputedMember.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithoutInitializerAfterComputedMember.d.ts new file mode 100644 index 0000000000000..15273844eaed8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithoutInitializerAfterComputedMember.d.ts @@ -0,0 +1,19 @@ +//// [tests/cases/compiler/enumWithoutInitializerAfterComputedMember.ts] //// + +//// [enumWithoutInitializerAfterComputedMember.ts] +enum E { + a, + b = a, + c +} + +/// [Declarations] //// + + + +//// [/.src/enumWithoutInitializerAfterComputedMember.d.ts] +declare enum E { + a = 0, + b = 0, + c = 1 +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/equalityWithEnumTypes.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/equalityWithEnumTypes.d.ts new file mode 100644 index 0000000000000..22f96265c0cc1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/equalityWithEnumTypes.d.ts @@ -0,0 +1,120 @@ +//// [tests/cases/conformance/types/typeRelationships/comparable/equalityWithEnumTypes.ts] //// + +//// [equalityWithEnumTypes.ts] +// Literal enum type +enum E1 { + a = 1, + b = 2, +} + +// Numeric enum type +enum E2 { + a = 1 << 0, + b = 1 << 1 +} + +function f1(v: E1): void { + if (v !== 0) { // Error + v; + } + if (v !== 1) { + v; + } + if (v !== 2) { + v; + } + if (v !== 3) { // Error + v; + } +} + +function f2(v: E2): void { + if (v !== 0) { + v; + } + if (v !== 1) { + v; + } + if (v !== 2) { + v; + } + if (v !== 3) { + v; + } +} + + +/// [Declarations] //// + + + +//// [/.src/equalityWithEnumTypes.d.ts] +declare enum E1 { + a = 1, + b = 2 +} +declare enum E2 { + a = 1, + b = 2 +} +declare function f1(v: E1): void; +declare function f2(v: E2): void; +/// [Errors] //// + +equalityWithEnumTypes.ts(14,9): error TS2367: This comparison appears to be unintentional because the types 'E1' and '0' have no overlap. +equalityWithEnumTypes.ts(23,9): error TS2367: This comparison appears to be unintentional because the types 'E1' and '3' have no overlap. +equalityWithEnumTypes.ts(29,9): error TS2367: This comparison appears to be unintentional because the types 'E2' and '0' have no overlap. +equalityWithEnumTypes.ts(38,9): error TS2367: This comparison appears to be unintentional because the types 'E2' and '3' have no overlap. + + +==== equalityWithEnumTypes.ts (4 errors) ==== + // Literal enum type + enum E1 { + a = 1, + b = 2, + } + + // Numeric enum type + enum E2 { + a = 1 << 0, + b = 1 << 1 + } + + function f1(v: E1): void { + if (v !== 0) { // Error + ~~~~~~~ +!!! error TS2367: This comparison appears to be unintentional because the types 'E1' and '0' have no overlap. + v; + } + if (v !== 1) { + v; + } + if (v !== 2) { + v; + } + if (v !== 3) { // Error + ~~~~~~~ +!!! error TS2367: This comparison appears to be unintentional because the types 'E1' and '3' have no overlap. + v; + } + } + + function f2(v: E2): void { + if (v !== 0) { + ~~~~~~~ +!!! error TS2367: This comparison appears to be unintentional because the types 'E2' and '0' have no overlap. + v; + } + if (v !== 1) { + v; + } + if (v !== 2) { + v; + } + if (v !== 3) { + ~~~~~~~ +!!! error TS2367: This comparison appears to be unintentional because the types 'E2' and '3' have no overlap. + v; + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exactSpellingSuggestion.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exactSpellingSuggestion.d.ts new file mode 100644 index 0000000000000..e7dbd9381fe9d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exactSpellingSuggestion.d.ts @@ -0,0 +1,43 @@ +//// [tests/cases/compiler/exactSpellingSuggestion.ts] //// + +//// [exactSpellingSuggestion.ts] +// Fixes #16245 -- always suggest the exact match, even when +// other options are very close +enum U8 { + BIT_0 = 1 << 0, + BIT_1 = 1 << 1, + BIT_2 = 1 << 2 +} + +U8.bit_2 + + +/// [Declarations] //// + + + +//// [/.src/exactSpellingSuggestion.d.ts] +declare enum U8 { + BIT_0 = 1, + BIT_1 = 2, + BIT_2 = 4 +} +/// [Errors] //// + +exactSpellingSuggestion.ts(9,4): error TS2551: Property 'bit_2' does not exist on type 'typeof U8'. Did you mean 'BIT_2'? + + +==== exactSpellingSuggestion.ts (1 errors) ==== + // Fixes #16245 -- always suggest the exact match, even when + // other options are very close + enum U8 { + BIT_0 = 1 << 0, + BIT_1 = 1 << 1, + BIT_2 = 1 << 2 + } + + U8.bit_2 + ~~~~~ +!!! error TS2551: Property 'bit_2' does not exist on type 'typeof U8'. Did you mean 'BIT_2'? +!!! related TS2728 exactSpellingSuggestion.ts:6:5: 'BIT_2' is declared here. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesJSDocInTs.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesJSDocInTs.d.ts new file mode 100644 index 0000000000000..b5817c419fbc1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesJSDocInTs.d.ts @@ -0,0 +1,19 @@ +//// [tests/cases/compiler/expandoFunctionContextualTypesJSDocInTs.ts] //// + +//// [expandoFunctionContextualTypesJSDocInTs.ts] +export function Foo(): void { } + +// This comment should have no effect; this is a TS file. +/** @type {never} */ +Foo.bar = () => { }; + + +/// [Declarations] //// + + + +//// [/.src/expandoFunctionContextualTypesJSDocInTs.d.ts] +export declare function Foo(): void; +export declare namespace Foo { + var bar: () => void; +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesNoValue.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesNoValue.d.ts new file mode 100644 index 0000000000000..9d06d3a92a995 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesNoValue.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/compiler/expandoFunctionContextualTypesNoValue.ts] //// + +//// [expandoFunctionContextualTypesNoValue.ts] +// GH #38532 +import Foo from "blah"; + +export function Foo(): void { } + +Foo.bar = () => { }; + + +/// [Declarations] //// + + + +//// [/.src/expandoFunctionContextualTypesNoValue.d.ts] +export declare function Foo(): void; +export declare namespace Foo { + var bar: () => void; +} +/// [Errors] //// + +expandoFunctionContextualTypesNoValue.ts(2,17): error TS2307: Cannot find module 'blah' or its corresponding type declarations. + + +==== expandoFunctionContextualTypesNoValue.ts (1 errors) ==== + // GH #38532 + import Foo from "blah"; + ~~~~~~ +!!! error TS2307: Cannot find module 'blah' or its corresponding type declarations. + + export function Foo(): void { } + + Foo.bar = () => { }; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts new file mode 100644 index 0000000000000..ef921c5fc3bdc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts @@ -0,0 +1,27 @@ +//// [tests/cases/compiler/expandoFunctionExpressionsWithDynamicNames.ts] //// + +//// [expandoFunctionExpressionsWithDynamicNames.ts] +// https://github.com/microsoft/TypeScript/issues/54809 + +const s = "X"; + +export const expr = (): void => {} +expr[s] = 0 + +export const expr2 = function (): void {} +expr2[s] = 0 + + +/// [Declarations] //// + + + +//// [/.src/expandoFunctionExpressionsWithDynamicNames.d.ts] +export declare const expr: { + (): void; + X: number; +}; +export declare const expr2: { + (): void; + X: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignDottedName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignDottedName.d.ts new file mode 100644 index 0000000000000..2770032361817 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignDottedName.d.ts @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/externalModules/exportAssignDottedName.ts] //// + +//// [foo2.ts] +import foo1 = require('./foo1'); +export = foo1.x; // Ok + +//// [foo1.ts] +export function x(): boolean{ + return true; +} + + +/// [Declarations] //// + + + +//// [/.src/foo1.d.ts] +export declare function x(): boolean; + +//// [/.src/foo2.d.ts] +import foo1 = require('./foo1'); +declare const _default: typeof foo1.x; +export = _default; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignNonIdentifier.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignNonIdentifier.d.ts new file mode 100644 index 0000000000000..24a6737b70081 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignNonIdentifier.d.ts @@ -0,0 +1,98 @@ +//// [tests/cases/conformance/externalModules/exportAssignNonIdentifier.ts] //// + +//// [foo1.ts] +var x = 10; +export = typeof x; // Ok + +//// [foo2.ts] +export = "sausages"; // Ok + +//// [foo3.ts] +export = class Foo3 {}; // Error, not an expression + +//// [foo4.ts] +export = true; // Ok + +//// [foo5.ts] +export = undefined; // Valid. undefined is an identifier in JavaScript/TypeScript + +//// [foo6.ts] +export = void; // Error, void operator requires an argument + +//// [foo7.ts] +export = Date || String; // Ok + +//// [foo8.ts] +export = null; // Ok + + + +/// [Declarations] //// + + + +//// [/.src/foo1.d.ts] +declare const _default: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"; +export = _default; + +//// [/.src/foo2.d.ts] +declare const _default: "sausages"; +export = _default; + +//// [/.src/foo3.d.ts] +declare const _default: { + new (): {}; +}; +export = _default; + +//// [/.src/foo4.d.ts] +declare const _default: true; +export = _default; + +//// [/.src/foo5.d.ts] +export = undefined; + +//// [/.src/foo6.d.ts] +declare const _default: any; +export = _default; + +//// [/.src/foo7.d.ts] +declare const _default: DateConstructor | StringConstructor; +export = _default; + +//// [/.src/foo8.d.ts] +declare const _default: any; +export = _default; +/// [Errors] //// + +foo6.ts(1,14): error TS1109: Expression expected. + + +==== foo1.ts (0 errors) ==== + var x = 10; + export = typeof x; // Ok + +==== foo2.ts (0 errors) ==== + export = "sausages"; // Ok + +==== foo3.ts (0 errors) ==== + export = class Foo3 {}; // Error, not an expression + +==== foo4.ts (0 errors) ==== + export = true; // Ok + +==== foo5.ts (0 errors) ==== + export = undefined; // Valid. undefined is an identifier in JavaScript/TypeScript + +==== foo6.ts (1 errors) ==== + export = void; // Error, void operator requires an argument + ~ +!!! error TS1109: Expression expected. + +==== foo7.ts (0 errors) ==== + export = Date || String; // Ok + +==== foo8.ts (0 errors) ==== + export = null; // Ok + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignmentWithoutIdentifier1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignmentWithoutIdentifier1.d.ts new file mode 100644 index 0000000000000..9483c0a28cb99 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignmentWithoutIdentifier1.d.ts @@ -0,0 +1,19 @@ +//// [tests/cases/compiler/exportAssignmentWithoutIdentifier1.ts] //// + +//// [exportAssignmentWithoutIdentifier1.ts] +function Greeter() { + //... +} +Greeter.prototype.greet = function () { + //... +} +export = new Greeter(); + + +/// [Declarations] //// + + + +//// [/.src/exportAssignmentWithoutIdentifier1.d.ts] +declare const _default: any; +export = _default; 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..4b4d2af3d99b8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportDefaultNamespace.d.ts @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/declarationEmit/exportDefaultNamespace.ts] //// + +//// [exportDefaultNamespace.ts] +export default function someFunc(): string { + return 'hello!'; +} + +someFunc.someProp = 'yo'; + + +/// [Declarations] //// + + + +//// [/.src/exportDefaultNamespace.d.ts] +declare function someFunc(): string; +declare namespace someFunc { + var someProp: string; +} +export default someFunc; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty.d.ts new file mode 100644 index 0000000000000..8acfe7b4ef417 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty.d.ts @@ -0,0 +1,65 @@ +//// [tests/cases/compiler/exportEqualsProperty.ts] //// + +//// [index.ts] +/// +import { X } from "foobar"; +import X2 = require("foobarx"); +const x: X = X; +const x2: X2 = X2; + +import B = require("./a"); +const b: B = new B(B.b); + +import fooLength = require("./b"); +fooLength + 1; + +//// [declarations.d.ts] +// This test is just like exportDefaultProperty, but with `export =`. + +declare namespace foo.bar { + export type X = number; + export const X: number; +} + +declare module "foobar" { + export = foo.bar; +} + +declare module "foobarx" { + export = foo.bar.X; +} + +//// [a.ts] +namespace A { + export class B { constructor(b: number) {} } + export namespace B { export const b: number = 0; } +} +export = A.B; + +//// [b.ts] +export = "foo".length; + + +/// [Declarations] //// + + + +//// [/.src/a.d.ts] +declare namespace A { + class B { + constructor(b: number); + } + namespace B { + const b: number; + } +} +declare const _default: typeof A.B; +export = _default; + +//// [/.src/b.d.ts] +declare const _default: number; +export = _default; + +//// [/.src/index.d.ts] +/// +export {}; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty2.d.ts new file mode 100644 index 0000000000000..96f7bca2a8b3b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty2.d.ts @@ -0,0 +1,29 @@ +//// [tests/cases/compiler/exportEqualsProperty2.ts] //// + +//// [b.ts] +import B = require("./a"); +const x: B = { c: B }; + +//// [a.ts] +// This test is just like exportDefaultProperty2, but with `export =`. + +class C { + static B: number; +} +namespace C { + export interface B { c: number } +} + +export = C.B; + + +/// [Declarations] //// + + + +//// [/.src/a.d.ts] +declare const _default: number; +export = _default; + +//// [/.src/b.d.ts] +export {}; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/forwardRefInEnum.d.ts new file mode 100644 index 0000000000000..c65b22d19c955 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/forwardRefInEnum.d.ts @@ -0,0 +1,63 @@ +//// [tests/cases/compiler/forwardRefInEnum.ts] //// + +//// [forwardRefInEnum.ts] +enum E1 { + // illegal case + // forward reference to the element of the same enum + X = Y, + X1 = E1["Y"], + // forward reference to the element of the same enum + Y = E1.Z, + Y1 = E1["Z"] +} + +enum E1 { + Z = 4 +} + + +/// [Declarations] //// + + + +//// [/.src/forwardRefInEnum.d.ts] +declare enum E1 { + X = 0, + X1 = 0, + Y = 0, + Y1 = 0 +} +declare enum E1 { + Z = 4 +} +/// [Errors] //// + +forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. +forwardRefInEnum.ts(5,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. +forwardRefInEnum.ts(7,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. +forwardRefInEnum.ts(8,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + + +==== forwardRefInEnum.ts (4 errors) ==== + enum E1 { + // illegal case + // forward reference to the element of the same enum + X = Y, + ~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + X1 = E1["Y"], + ~~~~~~~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + // forward reference to the element of the same enum + Y = E1.Z, + ~~~~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + Y1 = E1["Z"] + ~~~~~~~ +!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + } + + enum E1 { + Z = 4 + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/functionImplementations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/functionImplementations.d.ts new file mode 100644 index 0000000000000..815f82dbdfd89 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/functionImplementations.d.ts @@ -0,0 +1,395 @@ +//// [tests/cases/conformance/functions/functionImplementations.ts] //// + +//// [functionImplementations.ts] +// FunctionExpression with no return type annotation and no return statement returns void +var v: void = function () { } (); + +// FunctionExpression f with no return type annotation and directly references f in its body returns any +var a: any = function f() { + return f; +}; +var a: any = function f() { + return f(); +}; + +// FunctionExpression f with no return type annotation and indirectly references f in its body returns any +var a: any = function f() { + var x = f; + return x; +}; + +// Two mutually recursive function implementations with no return type annotations +function rec1(): any { + return rec2(); +} +function rec2(): any { + return rec1(); +} +var a: any = rec1(); +var a: any = rec2(); + +// Two mutually recursive function implementations with return type annotation in one +function rec3(): number { + return rec4(); +} +function rec4(): number { + return rec3(); +} +var n: number; +var n: number = rec3(); +var n: number = rec4(); + +// FunctionExpression with no return type annotation and returns a number +var n = function (): number { + return 3; +} (); + +// FunctionExpression with no return type annotation and returns null +var nu = null; +var nu = function (): any { + return null; +} (); + +// FunctionExpression with no return type annotation and returns undefined +var un = undefined; +var un = function (): any { + return undefined; +} (); + +// FunctionExpression with no return type annotation and returns a type parameter type +var n = function (x: T): T { + return x; +} (4); + +// FunctionExpression with no return type annotation and returns a constrained type parameter type +var n = function (x: T): T { + return x; +} (4); + +// FunctionExpression with no return type annotation with multiple return statements with identical types +var n = function (): 3 | 5 { + return 3; + return 5; +}(); + +// Otherwise, the inferred return type is the first of the types of the return statement expressions +// in the function body that is a supertype of each of the others, +// ignoring return statements with no expressions. +// A compile - time error occurs if no return statement expression has a type that is a supertype of each of the others. +// FunctionExpression with no return type annotation with multiple return statements with subtype relation between returns +class Base { private m; } +class Derived extends Base { private q; } +var b: Base; +var b = function (): Base { + return new Base(); return new Derived(); +} (); + +// FunctionExpression with no return type annotation with multiple return statements with one a recursive call +var a = function f(): Base { + return new Base(); return new Derived(); return f(); // ? +} (); + +// FunctionExpression with non -void return type annotation with a single throw statement +undefined === function (): number { + throw undefined; +}; + +// Type of 'this' in function implementation is 'any' +function thisFunc(): void { + var x = this; + var x: any; +} + +// Function signature with optional parameter, no type annotation and initializer has initializer's type +function opt1(n: number = 4): void { + var m = n; + var m: number; +} + +// Function signature with optional parameter, no type annotation and initializer has initializer's widened type +function opt2(n: { + x: any; + y: any; +} = { x: null, y: undefined }): void { + var m = n; + var m: { x: any; y: any }; +} + +// Function signature with initializer referencing other parameter to the left +function opt3(n: number, m: number = n): void { + var y = m; + var y: number; +} + +// Function signature with optional parameter has correct codegen +// (tested above) + +// FunctionExpression with non -void return type annotation return with no expression +function f6(): number { + return; +} + +class Derived2 extends Base { private r: string; } +class AnotherClass { private x } +// if f is a contextually typed function expression, the inferred return type is the union type +// of the types of the return statement expressions in the function body, +// ignoring return statements with no expressions. +var f7: (x: number) => string | number = x => { // should be (x: number) => number | string + if (x < 0) { return x; } + return x.toString(); +} +var f8: (x: number) => any = x => { // should be (x: number) => Base + return new Base(); + return new Derived2(); +} +var f9: (x: number) => any = x => { // should be (x: number) => Base + return new Base(); + return new Derived(); + return new Derived2(); +} +var f10: (x: number) => any = x => { // should be (x: number) => Derived | Derived1 + return new Derived(); + return new Derived2(); +} +var f11: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass + return new Base(); + return new AnotherClass(); +} +var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass + return new Base(); + return; // should be ignored + return new AnotherClass(); +} + +/// [Declarations] //// + + + +//// [/.src/functionImplementations.d.ts] +declare var v: void; +declare var a: any; +declare var a: any; +declare var a: any; +declare function rec1(): any; +declare function rec2(): any; +declare var a: any; +declare var a: any; +declare function rec3(): number; +declare function rec4(): number; +declare var n: number; +declare var n: number; +declare var n: number; +declare var n: number; +declare var nu: any; +declare var nu: any; +declare var un: any; +declare var un: any; +declare var n: number; +declare var n: number; +declare var n: number; +declare class Base { + private m; +} +declare class Derived extends Base { + private q; +} +declare var b: Base; +declare var b: Base; +declare var a: any; +declare function thisFunc(): void; +declare function opt1(n?: number): void; +declare function opt2(n?: { + x: any; + y: any; +}): void; +declare function opt3(n: number, m?: number): void; +declare function f6(): number; +declare class Derived2 extends Base { + private r; +} +declare class AnotherClass { + private x; +} +declare var f7: (x: number) => string | number; +declare var f8: (x: number) => any; +declare var f9: (x: number) => any; +declare var f10: (x: number) => any; +declare var f11: (x: number) => any; +declare var f12: (x: number) => any; +/// [Errors] //// + +functionImplementations.ts(67,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type '3 | 5'. +functionImplementations.ts(85,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'Base'. +functionImplementations.ts(90,1): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value. + + +==== functionImplementations.ts (3 errors) ==== + // FunctionExpression with no return type annotation and no return statement returns void + var v: void = function () { } (); + + // FunctionExpression f with no return type annotation and directly references f in its body returns any + var a: any = function f() { + return f; + }; + var a: any = function f() { + return f(); + }; + + // FunctionExpression f with no return type annotation and indirectly references f in its body returns any + var a: any = function f() { + var x = f; + return x; + }; + + // Two mutually recursive function implementations with no return type annotations + function rec1(): any { + return rec2(); + } + function rec2(): any { + return rec1(); + } + var a: any = rec1(); + var a: any = rec2(); + + // Two mutually recursive function implementations with return type annotation in one + function rec3(): number { + return rec4(); + } + function rec4(): number { + return rec3(); + } + var n: number; + var n: number = rec3(); + var n: number = rec4(); + + // FunctionExpression with no return type annotation and returns a number + var n = function (): number { + return 3; + } (); + + // FunctionExpression with no return type annotation and returns null + var nu = null; + var nu = function (): any { + return null; + } (); + + // FunctionExpression with no return type annotation and returns undefined + var un = undefined; + var un = function (): any { + return undefined; + } (); + + // FunctionExpression with no return type annotation and returns a type parameter type + var n = function (x: T): T { + return x; + } (4); + + // FunctionExpression with no return type annotation and returns a constrained type parameter type + var n = function (x: T): T { + return x; + } (4); + + // FunctionExpression with no return type annotation with multiple return statements with identical types + var n = function (): 3 | 5 { + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type '3 | 5'. +!!! related TS6203 functionImplementations.ts:35:5: 'n' was also declared here. + return 3; + return 5; + }(); + + // Otherwise, the inferred return type is the first of the types of the return statement expressions + // in the function body that is a supertype of each of the others, + // ignoring return statements with no expressions. + // A compile - time error occurs if no return statement expression has a type that is a supertype of each of the others. + // FunctionExpression with no return type annotation with multiple return statements with subtype relation between returns + class Base { private m; } + class Derived extends Base { private q; } + var b: Base; + var b = function (): Base { + return new Base(); return new Derived(); + } (); + + // FunctionExpression with no return type annotation with multiple return statements with one a recursive call + var a = function f(): Base { + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'Base'. +!!! related TS6203 functionImplementations.ts:5:5: 'a' was also declared here. + return new Base(); return new Derived(); return f(); // ? + } (); + + // FunctionExpression with non -void return type annotation with a single throw statement + undefined === function (): number { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + throw undefined; + ~~~~~~~~~~~~~~~~~~~~ + }; + ~ +!!! error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value. + + // Type of 'this' in function implementation is 'any' + function thisFunc(): void { + var x = this; + var x: any; + } + + // Function signature with optional parameter, no type annotation and initializer has initializer's type + function opt1(n: number = 4): void { + var m = n; + var m: number; + } + + // Function signature with optional parameter, no type annotation and initializer has initializer's widened type + function opt2(n: { + x: any; + y: any; + } = { x: null, y: undefined }): void { + var m = n; + var m: { x: any; y: any }; + } + + // Function signature with initializer referencing other parameter to the left + function opt3(n: number, m: number = n): void { + var y = m; + var y: number; + } + + // Function signature with optional parameter has correct codegen + // (tested above) + + // FunctionExpression with non -void return type annotation return with no expression + function f6(): number { + return; + } + + class Derived2 extends Base { private r: string; } + class AnotherClass { private x } + // if f is a contextually typed function expression, the inferred return type is the union type + // of the types of the return statement expressions in the function body, + // ignoring return statements with no expressions. + var f7: (x: number) => string | number = x => { // should be (x: number) => number | string + if (x < 0) { return x; } + return x.toString(); + } + var f8: (x: number) => any = x => { // should be (x: number) => Base + return new Base(); + return new Derived2(); + } + var f9: (x: number) => any = x => { // should be (x: number) => Base + return new Base(); + return new Derived(); + return new Derived2(); + } + var f10: (x: number) => any = x => { // should be (x: number) => Derived | Derived1 + return new Derived(); + return new Derived2(); + } + var f11: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass + return new Base(); + return new AnotherClass(); + } + var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass + return new Base(); + return; // should be ignored + return new AnotherClass(); + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/initializersInAmbientEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/initializersInAmbientEnums.d.ts new file mode 100644 index 0000000000000..2938aac5c5e75 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/initializersInAmbientEnums.d.ts @@ -0,0 +1,19 @@ +//// [tests/cases/compiler/initializersInAmbientEnums.ts] //// + +//// [initializersInAmbientEnums.ts] +declare enum E { + a = 10, + b = a, + e = 10 << 2 * 8, +} + +/// [Declarations] //// + + + +//// [/.src/initializersInAmbientEnums.d.ts] +declare enum E { + a = 10, + b = 10, + e = 655360 +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts new file mode 100644 index 0000000000000..ac4d898541483 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts @@ -0,0 +1,121 @@ +//// [tests/cases/compiler/isolatedModulesGlobalNamespacesAndEnums.ts] //// + +//// [script-namespaces.ts] +namespace Instantiated { + export const x = 1; +} +namespace Uninstantiated { + export type T = number; +} +declare namespace Ambient { + export const x: number; +} + +//// [module-namespaces.ts] +export namespace Instantiated { + export const x = 1; +} + +//// [enum1.ts] +enum Enum { A, B, C } +declare enum Enum { X = 1_000_000 } +const d = 'd'; + +//// [enum2.ts] +enum Enum { + D = d, + E = A, // error + Y = X, // error + Z = Enum.A +} + +declare enum Enum { + F = A +} + +/// [Declarations] //// + + + +//// [/.src/enum1.d.ts] +declare enum Enum { + A = 0, + B = 1, + C = 2 +} +declare enum Enum { + X = 1000000 +} +declare const d = "d"; + +//// [/.src/enum2.d.ts] +declare enum Enum { + D = "d", + E = 0,// error + Y = 1000000,// error + Z = 0 +} +declare enum Enum { + F = 0 +} + +//// [/.src/module-namespaces.d.ts] +export declare namespace Instantiated { + const x = 1; +} + +//// [/.src/script-namespaces.d.ts] +declare namespace Instantiated { + const x = 1; +} +declare namespace Uninstantiated { + type T = number; +} +declare namespace Ambient { + const x: number; +} +/// [Errors] //// + +enum2.ts(3,9): error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. +enum2.ts(4,9): error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. +script-namespaces.ts(1,11): error TS1280: Namespaces are not allowed in global script files when 'isolatedModules' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement. + + +==== script-namespaces.ts (1 errors) ==== + namespace Instantiated { + ~~~~~~~~~~~~ +!!! error TS1280: Namespaces are not allowed in global script files when 'isolatedModules' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement. + export const x = 1; + } + namespace Uninstantiated { + export type T = number; + } + declare namespace Ambient { + export const x: number; + } + +==== module-namespaces.ts (0 errors) ==== + export namespace Instantiated { + export const x = 1; + } + +==== enum1.ts (0 errors) ==== + enum Enum { A, B, C } + declare enum Enum { X = 1_000_000 } + const d = 'd'; + +==== enum2.ts (2 errors) ==== + enum Enum { + D = d, + E = A, // error + ~ +!!! error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. + Y = X, // error + ~ +!!! error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. + Z = Enum.A + } + + declare enum Enum { + F = A + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsContainerMergeTsDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsContainerMergeTsDeclaration.d.ts new file mode 100644 index 0000000000000..8cb634a5df4ad --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsContainerMergeTsDeclaration.d.ts @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/salsa/jsContainerMergeTsDeclaration.ts] //// + +//// [a.js] +var /*1*/x = function foo() { +} +x.a = function bar() { +} +//// [b.ts] +var x = function (): number { + return 1; +}(); + + +/// [Declarations] //// + + + +//// [/.src/b.d.ts] +declare var x: number; +/// [Errors] //// + +error TS6504: File 'a.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 + + +!!! error TS6504: File 'a.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 +==== a.js (0 errors) ==== + var /*1*/x = function foo() { + } + x.a = function bar() { + } +==== b.ts (0 errors) ==== + var x = function (): number { + return 1; + }(); + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxComponentTypeErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxComponentTypeErrors.d.ts new file mode 100644 index 0000000000000..f99a47d647805 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxComponentTypeErrors.d.ts @@ -0,0 +1,191 @@ +//// [tests/cases/compiler/jsxComponentTypeErrors.tsx] //// + +//// [jsxComponentTypeErrors.tsx] +namespace JSX { + export interface Element { + type: 'element'; + } + export interface ElementClass { + type: 'element-class'; + } +} + +function FunctionComponent({type}: {type?: T}): { + type: T | undefined; +} { + return { + type + } +} +FunctionComponent.useThis = function() { + return ; +} + +class ClassComponent { + type = 'string'; +} + +const MixedComponent: typeof FunctionComponent | typeof ClassComponent = Math.random() ? FunctionComponent : ClassComponent; + +const elem1: JSX.Element = ; +const elem2: JSX.Element = />; +const elem3: JSX.Element = ; +const elem4: JSX.Element = ; + +const obj = { + MemberFunctionComponent(): {} { + return {}; + }, + MemberClassComponent: class {}, +}; + +const elem5: JSX.Element = ; +const elem6: JSX.Element = ; + + +/// [Declarations] //// + + + +//// [/.src/jsxComponentTypeErrors.d.ts] +declare namespace JSX { + interface Element { + type: 'element'; + } + interface ElementClass { + type: 'element-class'; + } +} +declare function FunctionComponent({ type }: { + type?: T; +}): { + type: T | undefined; +}; +declare namespace FunctionComponent { + var useThis: () => JSX.Element; +} +declare class ClassComponent { + type: string; +} +declare const MixedComponent: typeof FunctionComponent | typeof ClassComponent; +declare const elem1: JSX.Element; +declare const elem2: JSX.Element; +declare const elem3: JSX.Element; +declare const elem4: JSX.Element; +declare const obj: { + MemberFunctionComponent(): {}; + MemberClassComponent: { + new (): {}; + }; +}; +declare const elem5: JSX.Element; +declare const elem6: JSX.Element; +/// [Errors] //// + +jsxComponentTypeErrors.tsx(18,11): error TS2786: 'this' cannot be used as a JSX component. + Its return type '{ type: "foo" | undefined; }' is not a valid JSX element. + Types of property 'type' are incompatible. + Type '"foo" | undefined' is not assignable to type '"element"'. + Type 'undefined' is not assignable to type '"element"'. +jsxComponentTypeErrors.tsx(27,29): error TS2786: 'FunctionComponent' cannot be used as a JSX component. + Its return type '{ type: "abc" | undefined; }' is not a valid JSX element. + Types of property 'type' are incompatible. + Type '"abc" | undefined' is not assignable to type '"element"'. + Type 'undefined' is not assignable to type '"element"'. +jsxComponentTypeErrors.tsx(28,29): error TS2786: 'FunctionComponent' cannot be used as a JSX component. + Its return type '{ type: "abc" | undefined; }' is not a valid JSX element. +jsxComponentTypeErrors.tsx(29,29): error TS2786: 'ClassComponent' cannot be used as a JSX component. + Its instance type 'ClassComponent' is not a valid JSX element. + Types of property 'type' are incompatible. + Type 'string' is not assignable to type '"element-class"'. +jsxComponentTypeErrors.tsx(30,29): error TS2786: 'MixedComponent' cannot be used as a JSX component. + Its element type 'ClassComponent | { type: string | undefined; }' is not a valid JSX element. + Type 'ClassComponent' is not assignable to type 'Element | ElementClass | null'. + Type 'ClassComponent' is not assignable to type 'Element | ElementClass'. + Type 'ClassComponent' is not assignable to type 'ElementClass'. +jsxComponentTypeErrors.tsx(39,29): error TS2786: 'obj.MemberFunctionComponent' cannot be used as a JSX component. + Its return type '{}' is not a valid JSX element. + Property 'type' is missing in type '{}' but required in type 'Element'. +jsxComponentTypeErrors.tsx(40,29): error TS2786: 'obj. MemberClassComponent' cannot be used as a JSX component. + Its instance type 'MemberClassComponent' is not a valid JSX element. + Property 'type' is missing in type 'MemberClassComponent' but required in type 'ElementClass'. + + +==== jsxComponentTypeErrors.tsx (7 errors) ==== + namespace JSX { + export interface Element { + type: 'element'; + } + export interface ElementClass { + type: 'element-class'; + } + } + + function FunctionComponent({type}: {type?: T}): { + type: T | undefined; + } { + return { + type + } + } + FunctionComponent.useThis = function() { + return ; + ~~~~ +!!! error TS2786: 'this' cannot be used as a JSX component. +!!! error TS2786: Its return type '{ type: "foo" | undefined; }' is not a valid JSX element. +!!! error TS2786: Types of property 'type' are incompatible. +!!! error TS2786: Type '"foo" | undefined' is not assignable to type '"element"'. +!!! error TS2786: Type 'undefined' is not assignable to type '"element"'. + } + + class ClassComponent { + type = 'string'; + } + + const MixedComponent: typeof FunctionComponent | typeof ClassComponent = Math.random() ? FunctionComponent : ClassComponent; + + const elem1: JSX.Element = ; + ~~~~~~~~~~~~~~~~~ +!!! error TS2786: 'FunctionComponent' cannot be used as a JSX component. +!!! error TS2786: Its return type '{ type: "abc" | undefined; }' is not a valid JSX element. +!!! error TS2786: Types of property 'type' are incompatible. +!!! error TS2786: Type '"abc" | undefined' is not assignable to type '"element"'. +!!! error TS2786: Type 'undefined' is not assignable to type '"element"'. + const elem2: JSX.Element = />; + ~~~~~~~~~~~~~~~~~ +!!! error TS2786: 'FunctionComponent' cannot be used as a JSX component. +!!! error TS2786: Its return type '{ type: "abc" | undefined; }' is not a valid JSX element. + const elem3: JSX.Element = ; + ~~~~~~~~~~~~~~ +!!! error TS2786: 'ClassComponent' cannot be used as a JSX component. +!!! error TS2786: Its instance type 'ClassComponent' is not a valid JSX element. +!!! error TS2786: Types of property 'type' are incompatible. +!!! error TS2786: Type 'string' is not assignable to type '"element-class"'. + const elem4: JSX.Element = ; + ~~~~~~~~~~~~~~ +!!! error TS2786: 'MixedComponent' cannot be used as a JSX component. +!!! error TS2786: Its element type 'ClassComponent | { type: string | undefined; }' is not a valid JSX element. +!!! error TS2786: Type 'ClassComponent' is not assignable to type 'Element | ElementClass | null'. +!!! error TS2786: Type 'ClassComponent' is not assignable to type 'Element | ElementClass'. +!!! error TS2786: Type 'ClassComponent' is not assignable to type 'ElementClass'. + + const obj = { + MemberFunctionComponent(): {} { + return {}; + }, + MemberClassComponent: class {}, + }; + + const elem5: JSX.Element = ; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2786: 'obj.MemberFunctionComponent' cannot be used as a JSX component. +!!! error TS2786: Its return type '{}' is not a valid JSX element. +!!! error TS2786: Property 'type' is missing in type '{}' but required in type 'Element'. +!!! related TS2728 jsxComponentTypeErrors.tsx:3:5: 'type' is declared here. + const elem6: JSX.Element = ; + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2786: 'obj. MemberClassComponent' cannot be used as a JSX component. +!!! error TS2786: Its instance type 'MemberClassComponent' is not a valid JSX element. +!!! error TS2786: Property 'type' is missing in type 'MemberClassComponent' but required in type 'ElementClass'. +!!! related TS2728 jsxComponentTypeErrors.tsx:6:5: 'type' is declared here. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespace.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespace.d.ts new file mode 100644 index 0000000000000..6408eee09fcca --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespace.d.ts @@ -0,0 +1,109 @@ +//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespace.tsx] //// + +//// [/node_modules/preact/index.d.ts] +type Defaultize = + // Distribute over unions + Props extends any // Make any properties included in Default optional + ? Partial>> & + // Include the remaining properties from Props + Pick> + : never; +export namespace JSXInternal { + interface HTMLAttributes { } + interface SVGAttributes { } + type LibraryManagedAttributes = Component extends { + defaultProps: infer Defaults; + } + ? Defaultize + : Props; + + interface IntrinsicAttributes { + key?: any; + } + + interface Element extends VNode { } + + interface ElementClass extends Component { } + + interface ElementAttributesProperty { + props: any; + } + + interface ElementChildrenAttribute { + children: any; + } + + interface IntrinsicElements { + div: HTMLAttributes; + } +} +export const Fragment: unique symbol; +export type ComponentType = {}; +export type ComponentChild = {}; +export type ComponentChildren = {}; +export type VNode = {}; +export type Attributes = {}; +export type Component = {}; +//// [/node_modules/preact/jsx-runtime/index.d.ts] +export { Fragment } from '..'; +import { + ComponentType, + ComponentChild, + ComponentChildren, + VNode, + Attributes +} from '..'; +import { JSXInternal } from '..'; + +export function jsx( + type: string, + props: JSXInternal.HTMLAttributes & + JSXInternal.SVGAttributes & + Record & { children?: ComponentChild }, + key?: string +): VNode; +export function jsx

( + type: ComponentType

, + props: Attributes & P & { children?: ComponentChild }, + key?: string +): VNode; + + +export function jsxs( + type: string, + props: JSXInternal.HTMLAttributes & + JSXInternal.SVGAttributes & + Record & { children?: ComponentChild[] }, + key?: string +): VNode; +export function jsxs

( + type: ComponentType

, + props: Attributes & P & { children?: ComponentChild[] }, + key?: string +): VNode; + + +export function jsxDEV( + type: string, + props: JSXInternal.HTMLAttributes & + JSXInternal.SVGAttributes & + Record & { children?: ComponentChildren }, + key?: string +): VNode; +export function jsxDEV

( + type: ComponentType

, + props: Attributes & P & { children?: ComponentChildren }, + key?: string +): VNode; + +export import JSX = JSXInternal; + +//// [/index.tsx] +export const Comp = () =>

; + +/// [Declarations] //// + + + +//// [/index.d.ts] +export declare const Comp: () => import("preact").JSXInternal.Element; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts new file mode 100644 index 0000000000000..09e084d8b0ee0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts @@ -0,0 +1,72 @@ +//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne.tsx] //// + +//// [/node_modules/react/index.d.ts] +export = React; +export as namespace React; + +declare namespace React {} + +declare global { + namespace JSX { + interface Element {} + interface ElementClass {} + interface ElementAttributesProperty {} + interface ElementChildrenAttribute {} + type LibraryManagedAttributes = {} + interface IntrinsicAttributes {} + interface IntrinsicClassAttributes {} + interface IntrinsicElements { + div: {} + } + } +} +//// [/node_modules/@emotion/react/jsx-runtime/index.d.ts] +export { EmotionJSX as JSX } from './jsx-namespace' + +//// [/node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts] +import 'react' + +type WithConditionalCSSProp

= 'className' extends keyof P + ? (P extends { className?: string } ? P & { css?: string } : P) + : P + +type ReactJSXElement = JSX.Element +type ReactJSXElementClass = JSX.ElementClass +type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty +type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute +type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes +type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes +type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes +type ReactJSXIntrinsicElements = JSX.IntrinsicElements + +export namespace EmotionJSX { + interface Element extends ReactJSXElement {} + interface ElementClass extends ReactJSXElementClass {} + interface ElementAttributesProperty + extends ReactJSXElementAttributesProperty {} + interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute {} + + type LibraryManagedAttributes = WithConditionalCSSProp

& + ReactJSXLibraryManagedAttributes + + interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes {} + interface IntrinsicClassAttributes + extends ReactJSXIntrinsicClassAttributes {} + + type IntrinsicElements = { + [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { + css?: string + } + } +} + +//// [/index.tsx] +export const Comp = () =>

; + + +/// [Declarations] //// + + + +//// [/index.d.ts] +export declare const Comp: () => import("@emotion/react/jsx-runtime").JSX.Element; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts new file mode 100644 index 0000000000000..09e084d8b0ee0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts @@ -0,0 +1,72 @@ +//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne.tsx] //// + +//// [/node_modules/react/index.d.ts] +export = React; +export as namespace React; + +declare namespace React {} + +declare global { + namespace JSX { + interface Element {} + interface ElementClass {} + interface ElementAttributesProperty {} + interface ElementChildrenAttribute {} + type LibraryManagedAttributes = {} + interface IntrinsicAttributes {} + interface IntrinsicClassAttributes {} + interface IntrinsicElements { + div: {} + } + } +} +//// [/node_modules/@emotion/react/jsx-runtime/index.d.ts] +export { EmotionJSX as JSX } from './jsx-namespace' + +//// [/node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts] +import 'react' + +type WithConditionalCSSProp

= 'className' extends keyof P + ? (P extends { className?: string } ? P & { css?: string } : P) + : P + +type ReactJSXElement = JSX.Element +type ReactJSXElementClass = JSX.ElementClass +type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty +type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute +type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes +type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes +type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes +type ReactJSXIntrinsicElements = JSX.IntrinsicElements + +export namespace EmotionJSX { + interface Element extends ReactJSXElement {} + interface ElementClass extends ReactJSXElementClass {} + interface ElementAttributesProperty + extends ReactJSXElementAttributesProperty {} + interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute {} + + type LibraryManagedAttributes = WithConditionalCSSProp

& + ReactJSXLibraryManagedAttributes + + interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes {} + interface IntrinsicClassAttributes + extends ReactJSXIntrinsicClassAttributes {} + + type IntrinsicElements = { + [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { + css?: string + } + } +} + +//// [/index.tsx] +export const Comp = () =>

; + + +/// [Declarations] //// + + + +//// [/index.d.ts] +export declare const Comp: () => import("@emotion/react/jsx-runtime").JSX.Element; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts new file mode 100644 index 0000000000000..267e1b92349dd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts @@ -0,0 +1,73 @@ +//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.tsx] //// + +//// [/node_modules/react/index.d.ts] +export = React; +export as namespace React; + +declare namespace React { } + +declare global { + namespace JSX { + interface Element { } + interface ElementClass { } + interface ElementAttributesProperty { } + interface ElementChildrenAttribute { } + type LibraryManagedAttributes = {} + interface IntrinsicAttributes { } + interface IntrinsicClassAttributes { } + interface IntrinsicElements { + div: {} + } + } +} +//// [/node_modules/@emotion/react/jsx-runtime/index.d.ts] +export { EmotionJSX as JSX } from './jsx-namespace' + +//// [/node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts] +import 'react' + +type WithConditionalCSSProp

= 'className' extends keyof P + ? (P extends { className?: string } ? P & { css?: string } : P) + : P + +type ReactJSXElement = JSX.Element +type ReactJSXElementClass = JSX.ElementClass +type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty +type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute +type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes +type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes +type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes +type ReactJSXIntrinsicElements = JSX.IntrinsicElements + +export namespace EmotionJSX { + interface Element extends ReactJSXElement { } + interface ElementClass extends ReactJSXElementClass { } + interface ElementAttributesProperty + extends ReactJSXElementAttributesProperty { } + interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute { } + + type LibraryManagedAttributes = WithConditionalCSSProp

& + ReactJSXLibraryManagedAttributes + + interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes { } + interface IntrinsicClassAttributes + extends ReactJSXIntrinsicClassAttributes { } + + type IntrinsicElements = { + [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { + css?: string + } + } +} + +//// [/index.tsx] +/* @jsxImportSource @emotion/react */ +export const Comp = () =>

; + + +/// [Declarations] //// + + + +//// [/index.d.ts] +export declare const Comp: () => import("@emotion/react/jsx-runtime").JSX.Element; 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..f2a295c2ea79c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/lateBoundFunctionMemberAssignmentDeclarations.d.ts @@ -0,0 +1,20 @@ +//// [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] //// + + + +//// [/.src/index.d.ts] +export declare function foo(): void; +export declare namespace foo { + var bar: number; +} 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..2a49b4ae39027 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts] //// + +//// [index.ts] +export const a = async () => (await import("inner")).x(); +//// [node_modules/inner/index.d.ts] +export { x } from "./other.js"; +//// [node_modules/inner/other.d.ts] +import { Thing } from "./private.js" +export const x: () => Thing; +//// [node_modules/inner/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" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + ".": { + "default": "./index.js" + }, + "./other": { + "default": "./other.js" + } + } +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: () => Promise; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedDeclarations2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedDeclarations2.d.ts new file mode 100644 index 0000000000000..3e28dc2212610 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedDeclarations2.d.ts @@ -0,0 +1,46 @@ +//// [tests/cases/compiler/mergedDeclarations2.ts] //// + +//// [mergedDeclarations2.ts] +enum Foo { + b +} +enum Foo { + a = b +} + +module Foo { + export var x: any = b +} + +/// [Declarations] //// + + + +//// [/.src/mergedDeclarations2.d.ts] +declare enum Foo { + b = 0 +} +declare enum Foo { + a = 0 +} +declare namespace Foo { + var x: any; +} +/// [Errors] //// + +mergedDeclarations2.ts(9,25): error TS2304: Cannot find name 'b'. + + +==== mergedDeclarations2.ts (1 errors) ==== + enum Foo { + b + } + enum Foo { + a = b + } + + module Foo { + export var x: any = b + ~ +!!! error TS2304: Cannot find name 'b'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedEnumDeclarationCodeGen.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedEnumDeclarationCodeGen.d.ts new file mode 100644 index 0000000000000..0eff544e844f4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedEnumDeclarationCodeGen.d.ts @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/mergedEnumDeclarationCodeGen.ts] //// + +//// [mergedEnumDeclarationCodeGen.ts] +enum E { + a, + b = a +} +enum E { + c = a +} + +/// [Declarations] //// + + + +//// [/.src/mergedEnumDeclarationCodeGen.d.ts] +declare enum E { + a = 0, + b = 0 +} +declare enum E { + c = 0 +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/methodContainingLocalFunction.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/methodContainingLocalFunction.d.ts new file mode 100644 index 0000000000000..6a61f7d4eac42 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/methodContainingLocalFunction.d.ts @@ -0,0 +1,77 @@ +//// [tests/cases/compiler/methodContainingLocalFunction.ts] //// + +//// [methodContainingLocalFunction.ts] +// The first case here (BugExhibition) caused a crash. Try with different permutations of features. +class BugExhibition { + public exhibitBug(): void { + function localFunction() { } + var x: { (): void; }; + x = localFunction; + } +} + +class BugExhibition2 { + private static get exhibitBug() { + function localFunction() { } + var x: { (): void; }; + x = localFunction; + return null; + } +} + +class BugExhibition3 { + public exhibitBug(): void { + function localGenericFunction(u?: U) { } + var x: { (): void; }; + x = localGenericFunction; + } +} + +class C { + exhibit(): void { + var funcExpr = (u?: U) => { }; + var x: { (): void; }; + x = funcExpr; + } +} + +module M { + export function exhibitBug(): void { + function localFunction() { } + var x: { (): void; }; + x = localFunction; + } +} + +enum E { + A = (() => { + function localFunction() { } + var x: { (): void; }; + x = localFunction; + return 0; + })() +} + +/// [Declarations] //// + + + +//// [/.src/methodContainingLocalFunction.d.ts] +declare class BugExhibition { + exhibitBug(): void; +} +declare class BugExhibition2 { + private static get exhibitBug(); +} +declare class BugExhibition3 { + exhibitBug(): void; +} +declare class C { + exhibit(): void; +} +declare namespace M { + function exhibitBug(): void; +} +declare enum E { + A +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mixedTypeEnumComparison.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mixedTypeEnumComparison.d.ts new file mode 100644 index 0000000000000..bfe525b77eb3c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mixedTypeEnumComparison.d.ts @@ -0,0 +1,63 @@ +//// [tests/cases/compiler/mixedTypeEnumComparison.ts] //// + +//// [mixedTypeEnumComparison.ts] +const enum E { + S1 = "foo", + S2 = "bar", + + N1 = 1000, + N2 = 25, +} + +declare var someNumber: number + +if (someNumber > E.N2) { + someNumber = E.N2; +} + +declare const unionOfEnum: E.N1 | E.N2; + +if (someNumber > unionOfEnum) { + someNumber = E.N2; +} + +declare var someString: string + +if (someString > E.S1) { + someString = E.S2; +} + + +declare function someValue(): number; + +enum E2 { + S1 = "foo", + N1 = 1000, + C1 = someValue(), +} + +someString > E2.S1; +someNumber > E2.N1; +someNumber > E2.C1; + + +/// [Declarations] //// + + + +//// [/.src/mixedTypeEnumComparison.d.ts] +declare const enum E { + S1 = "foo", + S2 = "bar", + N1 = 1000, + N2 = 25 +} +declare var someNumber: number; +declare const unionOfEnum: E.N1 | E.N2; +declare var someString: string; +declare function someValue(): number; +declare enum E2 { + S1 = "foo", + N1 = 1000, + C1 +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationDisallowedExtensions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationDisallowedExtensions.d.ts new file mode 100644 index 0000000000000..becfea5a7020e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationDisallowedExtensions.d.ts @@ -0,0 +1,168 @@ +//// [tests/cases/compiler/moduleAugmentationDisallowedExtensions.ts] //// + +//// [x0.ts] +export let a = 1; + +//// [x.ts] +namespace N1 { + export let x = 1; +} + +declare module "./observable" { + var x: number; + let y: number; + const z: number; + let {x1, y1, z0: {n}, z1: {arr: [el1, el2, el3]}}: {x1: number, y1: string, z0: {n: number}, z1: {arr: number[]} } + interface A { x } + namespace N { + export class C {} + } + class Cls {} + function foo(): number; + type T = number; + import * as all from "./x0"; + import {a} from "./x0"; + export * from "./x0"; + export {a} from "./x0"; +} + +declare module "./test" { + export = N1; +} +export {} + +//// [observable.ts] +export declare class Observable { + filter(pred: (e:T) => boolean): Observable; +} +export var x = 1; + +//// [test.ts] +export let b = 1; + +//// [main.ts] +import { Observable } from "./observable" +import "./x"; + + +/// [Declarations] //// + + + +//// [/.src/main.d.ts] +import "./x"; + +//// [/.src/observable.d.ts] +export declare class Observable { + filter(pred: (e: T) => boolean): Observable; +} +export declare var x: number; + +//// [/.src/test.d.ts] +export declare let b: number; + +//// [/.src/x.d.ts] +declare namespace N1 { + let x: number; +} +declare module "./observable" { + var x: number; + let y: number; + const z: number; + let x1: number, y1: string, n: number, el1: number, el2: number, el3: number; + interface A { + x: any; + } + namespace N { + class C { + } + } + class Cls { + } + function foo(): number; + type T = number; + export * from "./x0"; + export { a } from "./x0"; +} +declare module "./test" { + export = N1; +} +export {}; + +//// [/.src/x0.d.ts] +export declare let a: number; +/// [Errors] //// + +x.ts(17,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. +x.ts(17,26): error TS2307: Cannot find module './x0' or its corresponding type declarations. +x.ts(18,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. +x.ts(18,21): error TS2307: Cannot find module './x0' or its corresponding type declarations. +x.ts(19,5): error TS2666: Exports and export assignments are not permitted in module augmentations. +x.ts(19,19): error TS2307: Cannot find module './x0' or its corresponding type declarations. +x.ts(20,5): error TS2666: Exports and export assignments are not permitted in module augmentations. +x.ts(20,21): error TS2307: Cannot find module './x0' or its corresponding type declarations. +x.ts(24,5): error TS2666: Exports and export assignments are not permitted in module augmentations. + + +==== x0.ts (0 errors) ==== + export let a = 1; + +==== x.ts (9 errors) ==== + namespace N1 { + export let x = 1; + } + + declare module "./observable" { + var x: number; + let y: number; + const z: number; + let {x1, y1, z0: {n}, z1: {arr: [el1, el2, el3]}}: {x1: number, y1: string, z0: {n: number}, z1: {arr: number[]} } + interface A { x } + namespace N { + export class C {} + } + class Cls {} + function foo(): number; + type T = number; + import * as all from "./x0"; + ~~~~~~ +!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. + ~~~~~~ +!!! error TS2307: Cannot find module './x0' or its corresponding type declarations. + import {a} from "./x0"; + ~~~~~~ +!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. + ~~~~~~ +!!! error TS2307: Cannot find module './x0' or its corresponding type declarations. + export * from "./x0"; + ~~~~~~ +!!! error TS2666: Exports and export assignments are not permitted in module augmentations. + ~~~~~~ +!!! error TS2307: Cannot find module './x0' or its corresponding type declarations. + export {a} from "./x0"; + ~~~~~~ +!!! error TS2666: Exports and export assignments are not permitted in module augmentations. + ~~~~~~ +!!! error TS2307: Cannot find module './x0' or its corresponding type declarations. + } + + declare module "./test" { + export = N1; + ~~~~~~ +!!! error TS2666: Exports and export assignments are not permitted in module augmentations. + } + export {} + +==== observable.ts (0 errors) ==== + export declare class Observable { + filter(pred: (e:T) => boolean): Observable; + } + export var x = 1; + +==== test.ts (0 errors) ==== + export let b = 1; + +==== main.ts (0 errors) ==== + import { Observable } from "./observable" + import "./x"; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationNoNewNames.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationNoNewNames.d.ts new file mode 100644 index 0000000000000..f11bfdc6f4f0d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationNoNewNames.d.ts @@ -0,0 +1,53 @@ +//// [tests/cases/compiler/moduleAugmentationNoNewNames.ts] //// + +//// [map.ts] +import { Observable } from "./observable" + +(Observable.prototype).map = function() { } + +declare module "./observable" { + interface Observable { + map(proj: (e:T) => U): Observable + } + class Bar {} + let y: number, z: string; + let {a: x, b: x1}: {a: number, b: number}; + module Z {} +} + +//// [observable.ts] +export declare class Observable { + filter(pred: (e:T) => boolean): Observable; +} + +//// [main.ts] +import { Observable } from "./observable" +import "./map"; + +let x: Observable; +let y = x.map(x => x + 1); + +/// [Declarations] //// + + + +//// [/.src/main.d.ts] +import "./map"; + +//// [/.src/map.d.ts] +declare module "./observable" { + interface Observable { + map(proj: (e: T) => U): Observable; + } + class Bar { + } + let y: number, z: string; + let x: number, x1: number; + namespace Z { } +} +export {}; + +//// [/.src/observable.d.ts] +export declare class Observable { + filter(pred: (e: T) => boolean): Observable; +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/negateOperatorInvalidOperations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/negateOperatorInvalidOperations.d.ts new file mode 100644 index 0000000000000..f576aad39e1e5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/negateOperatorInvalidOperations.d.ts @@ -0,0 +1,78 @@ +//// [tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts] //// + +//// [negateOperatorInvalidOperations.ts] +// Unary operator - + +// operand before - +var NUMBER1 = var NUMBER: any-; //expect error + +// invalid expressions +var NUMBER2 = -(null - undefined); +var NUMBER3 = -(null - null); +var NUMBER4 = -(undefined - undefined); + +// miss operand +var NUMBER =-; + +/// [Declarations] //// + + + +//// [/.src/negateOperatorInvalidOperations.d.ts] +declare var NUMBER1: any; +declare var NUMBER: any; +declare var NUMBER2: number; +declare var NUMBER3: number; +declare var NUMBER4: number; +declare var NUMBER: any; +/// [Errors] //// + +negateOperatorInvalidOperations.ts(4,15): error TS1109: Expression expected. +negateOperatorInvalidOperations.ts(4,30): error TS1005: ',' expected. +negateOperatorInvalidOperations.ts(4,31): error TS1109: Expression expected. +negateOperatorInvalidOperations.ts(7,17): error TS18050: The value 'null' cannot be used here. +negateOperatorInvalidOperations.ts(7,24): error TS18050: The value 'undefined' cannot be used here. +negateOperatorInvalidOperations.ts(8,17): error TS18050: The value 'null' cannot be used here. +negateOperatorInvalidOperations.ts(8,24): error TS18050: The value 'null' cannot be used here. +negateOperatorInvalidOperations.ts(9,17): error TS18050: The value 'undefined' cannot be used here. +negateOperatorInvalidOperations.ts(9,29): error TS18050: The value 'undefined' cannot be used here. +negateOperatorInvalidOperations.ts(12,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'NUMBER' must be of type 'any', but here has type 'number'. +negateOperatorInvalidOperations.ts(12,14): error TS1109: Expression expected. + + +==== negateOperatorInvalidOperations.ts (11 errors) ==== + // Unary operator - + + // operand before - + var NUMBER1 = var NUMBER: any-; //expect error + ~~~ +!!! error TS1109: Expression expected. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1109: Expression expected. + + // invalid expressions + var NUMBER2 = -(null - undefined); + ~~~~ +!!! error TS18050: The value 'null' cannot be used here. + ~~~~~~~~~ +!!! error TS18050: The value 'undefined' cannot be used here. + var NUMBER3 = -(null - null); + ~~~~ +!!! error TS18050: The value 'null' cannot be used here. + ~~~~ +!!! error TS18050: The value 'null' cannot be used here. + var NUMBER4 = -(undefined - undefined); + ~~~~~~~~~ +!!! error TS18050: The value 'undefined' cannot be used here. + ~~~~~~~~~ +!!! error TS18050: The value 'undefined' cannot be used here. + + // miss operand + var NUMBER =-; + ~~~~~~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'NUMBER' must be of type 'any', but here has type 'number'. +!!! related TS6203 negateOperatorInvalidOperations.ts:4:19: 'NUMBER' was also declared here. + ~ +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/newTargetNarrowing.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/newTargetNarrowing.d.ts new file mode 100644 index 0000000000000..60db291144a98 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/newTargetNarrowing.d.ts @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/es6/newTarget/newTargetNarrowing.ts] //// + +//// [newTargetNarrowing.ts] +function foo(x: true): void { } + +function f(): void { + if (new.target.marked === true) { + foo(new.target.marked); + } +} + +f.marked = true; + + +/// [Declarations] //// + + + +//// [/.src/newTargetNarrowing.d.ts] +declare function foo(x: true): void; +declare function f(): void; +declare namespace f { + var marked: boolean; +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noImplicitAnyDestructuringVarDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noImplicitAnyDestructuringVarDeclaration.d.ts new file mode 100644 index 0000000000000..21794fd1f0040 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noImplicitAnyDestructuringVarDeclaration.d.ts @@ -0,0 +1,106 @@ +//// [tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts] //// + +//// [noImplicitAnyDestructuringVarDeclaration.ts] +var [a], {b}, c: any, d: any; // error + +var [a1 = undefined], {b1 = null}, c1 = undefined, d1 = null; // error + +var [a2]: [any], {b2}: { b2: any }, c2: any, d2: any; + +var {b3}: { b3 }, c3: { b3 }; // error in type instead + +const dest: any[] = [undefined]; +const a4: any = dest[0]; +const dest_1 = { b4: null }; +const b4: any = dest_1.b4; +var c4 = undefined, d4 = null; // error // error // error // error + +const dest_2: any[] = []; +const temp: any = dest_2[0]; +const a5: any = temp === undefined ? undefined : dest_2[0]; // error + +/// [Declarations] //// + + + +//// [/.src/noImplicitAnyDestructuringVarDeclaration.d.ts] +declare var a: any, b: any, c: any, d: any; +declare var a1: any, b1: any, c1: any, d1: any; +declare var a2: any, b2: any, c2: any, d2: any; +declare var b3: any, c3: { + b3: any; +}; +declare const dest: any[]; +declare const a4: any; +declare const dest_1: { + b4: any; +}; +declare const b4: any; +declare var c4: any, d4: any; +declare const dest_2: any[]; +declare const temp: any; +declare const a5: any; +/// [Errors] //// + +noImplicitAnyDestructuringVarDeclaration.ts(1,5): error TS1182: A destructuring declaration must have an initializer. +noImplicitAnyDestructuringVarDeclaration.ts(1,6): error TS7031: Binding element 'a' implicitly has an 'any' type. +noImplicitAnyDestructuringVarDeclaration.ts(1,10): error TS1182: A destructuring declaration must have an initializer. +noImplicitAnyDestructuringVarDeclaration.ts(1,11): error TS7031: Binding element 'b' implicitly has an 'any' type. +noImplicitAnyDestructuringVarDeclaration.ts(3,5): error TS1182: A destructuring declaration must have an initializer. +noImplicitAnyDestructuringVarDeclaration.ts(3,6): error TS7031: Binding element 'a1' implicitly has an 'any' type. +noImplicitAnyDestructuringVarDeclaration.ts(3,23): error TS1182: A destructuring declaration must have an initializer. +noImplicitAnyDestructuringVarDeclaration.ts(3,24): error TS7031: Binding element 'b1' implicitly has an 'any' type. +noImplicitAnyDestructuringVarDeclaration.ts(5,5): error TS1182: A destructuring declaration must have an initializer. +noImplicitAnyDestructuringVarDeclaration.ts(5,18): error TS1182: A destructuring declaration must have an initializer. +noImplicitAnyDestructuringVarDeclaration.ts(7,5): error TS1182: A destructuring declaration must have an initializer. +noImplicitAnyDestructuringVarDeclaration.ts(7,13): error TS7008: Member 'b3' implicitly has an 'any' type. +noImplicitAnyDestructuringVarDeclaration.ts(7,25): error TS7008: Member 'b3' implicitly has an 'any' type. +noImplicitAnyDestructuringVarDeclaration.ts(11,18): error TS7018: Object literal's property 'b4' implicitly has an 'any' type. + + +==== noImplicitAnyDestructuringVarDeclaration.ts (14 errors) ==== + var [a], {b}, c: any, d: any; // error + ~~~ +!!! error TS1182: A destructuring declaration must have an initializer. + ~ +!!! error TS7031: Binding element 'a' implicitly has an 'any' type. + ~~~ +!!! error TS1182: A destructuring declaration must have an initializer. + ~ +!!! error TS7031: Binding element 'b' implicitly has an 'any' type. + + var [a1 = undefined], {b1 = null}, c1 = undefined, d1 = null; // error + ~~~~~~~~~~~~~~~~ +!!! error TS1182: A destructuring declaration must have an initializer. + ~~ +!!! error TS7031: Binding element 'a1' implicitly has an 'any' type. + ~~~~~~~~~~~ +!!! error TS1182: A destructuring declaration must have an initializer. + ~~ +!!! error TS7031: Binding element 'b1' implicitly has an 'any' type. + + var [a2]: [any], {b2}: { b2: any }, c2: any, d2: any; + ~~~~ +!!! error TS1182: A destructuring declaration must have an initializer. + ~~~~ +!!! error TS1182: A destructuring declaration must have an initializer. + + var {b3}: { b3 }, c3: { b3 }; // error in type instead + ~~~~ +!!! error TS1182: A destructuring declaration must have an initializer. + ~~ +!!! error TS7008: Member 'b3' implicitly has an 'any' type. + ~~ +!!! error TS7008: Member 'b3' implicitly has an 'any' type. + + const dest: any[] = [undefined]; + const a4: any = dest[0]; + const dest_1 = { b4: null }; + ~~~~~~~~ +!!! error TS7018: Object literal's property 'b4' implicitly has an 'any' type. + const b4: any = dest_1.b4; + var c4 = undefined, d4 = null; // error // error // error // error + + const dest_2: any[] = []; + const temp: any = dest_2[0]; + const a5: any = temp === undefined ? undefined : dest_2[0]; // error \ No newline at end of file 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..7c06bad53c4d1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModuleReexportFromDottedPath.d.ts @@ -0,0 +1,29 @@ +//// [tests/cases/compiler/nodeModuleReexportFromDottedPath.ts] //// + +//// [/node_modules/.prisma/client/index.d.ts] +export interface PrismaClientOptions { + rejectOnNotFound?: any; +} + +export class PrismaClient { + private fetcher; +} + +//// [/node_modules/@prisma/client/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; 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..b4d92bc71cc73 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsBlocksSpecifierResolution(module=node16).d.ts @@ -0,0 +1,77 @@ +//// [tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other"; +export const a = (await import("inner")).x(); +//// [node_modules/inner/index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [node_modules/inner/other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.js" +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: any; +/// [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..b4d92bc71cc73 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsBlocksSpecifierResolution(module=nodenext).d.ts @@ -0,0 +1,77 @@ +//// [tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts] //// + +//// [index.ts] +// esm format file +import { Thing } from "inner/other"; +export const a = (await import("inner")).x(); +//// [node_modules/inner/index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [node_modules/inner/other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.js" +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: any; +/// [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..03a8145730b47 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSourceTs(module=node16).d.ts @@ -0,0 +1,87 @@ +//// [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"; +//// [node_modules/inner/index.ts] +// esm format file +export { x } from "./other.js"; +//// [node_modules/inner/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" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.ts" +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: any; + +//// [/.src/node_modules/inner/index.d.ts] +export { x } from "./other.js"; + +//// [/.src/node_modules/inner/other.d.ts] +export interface Thing { +} +export declare const x: () => Thing; +/// [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..03a8145730b47 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSourceTs(module=nodenext).d.ts @@ -0,0 +1,87 @@ +//// [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"; +//// [node_modules/inner/index.ts] +// esm format file +export { x } from "./other.js"; +//// [node_modules/inner/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" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": "./index.ts" +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: any; + +//// [/.src/node_modules/inner/index.d.ts] +export { x } from "./other.js"; + +//// [/.src/node_modules/inner/other.d.ts] +export interface Thing { +} +export declare const x: () => Thing; +/// [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..55c156c2d058f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationConditions(module=node16).d.ts @@ -0,0 +1,88 @@ +//// [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(); +//// [node_modules/inner/index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [node_modules/inner/other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + ".": { + "default": "./index.js" + }, + "./other": { + "default": "./other.js" + } + } +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: import("inner/other").Thing; +/// [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..55c156c2d058f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationConditions(module=nodenext).d.ts @@ -0,0 +1,88 @@ +//// [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(); +//// [node_modules/inner/index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [node_modules/inner/other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + ".": { + "default": "./index.js" + }, + "./other": { + "default": "./other.js" + } + } +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: import("inner/other").Thing; +/// [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..a65ce642166f3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationDirectory(module=node16).d.ts @@ -0,0 +1,78 @@ +//// [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(); +//// [node_modules/inner/index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [node_modules/inner/other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./": "./" + } +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: import("inner/other.js").Thing; +/// [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..a65ce642166f3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationDirectory(module=nodenext).d.ts @@ -0,0 +1,78 @@ +//// [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(); +//// [node_modules/inner/index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [node_modules/inner/other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./": "./" + } +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: import("inner/other.js").Thing; +/// [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..bf63481d87b58 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationPattern(module=node16).d.ts @@ -0,0 +1,78 @@ +//// [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(); +//// [node_modules/inner/index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [node_modules/inner/other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./*.js": "./*.js" + } +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: import("inner/other.js").Thing; +/// [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..bf63481d87b58 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSpecifierGenerationPattern(module=nodenext).d.ts @@ -0,0 +1,78 @@ +//// [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(); +//// [node_modules/inner/index.d.ts] +// esm format file +export { x } from "./other.js"; +//// [node_modules/inner/other.d.ts] +// esm format file +export interface Thing {} +export const x: () => Thing; +//// [package.json] +{ + "name": "package", + "private": true, + "type": "module", + "exports": "./index.js" +} +//// [node_modules/inner/package.json] +{ + "name": "inner", + "private": true, + "type": "module", + "exports": { + "./*.js": "./*.js" + } +} + +/// [Declarations] //// + + + +//// [/.src/index.d.ts] +export declare const a: import("inner/other.js").Thing; +/// [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/nullPropertyName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nullPropertyName.d.ts new file mode 100644 index 0000000000000..1bbb242cd6569 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nullPropertyName.d.ts @@ -0,0 +1,174 @@ +//// [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] //// + + + +//// [/.src/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 }; +} 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..84105f8da7b08 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/numericEnumMappedType.d.ts @@ -0,0 +1,85 @@ +//// [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] //// + + + +//// [/.src/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; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/objectLiteralGettersAndSetters.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/objectLiteralGettersAndSetters.d.ts new file mode 100644 index 0000000000000..8610c092c1ca3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/objectLiteralGettersAndSetters.d.ts @@ -0,0 +1,209 @@ +//// [tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts] //// + +//// [objectLiteralGettersAndSetters.ts] +// Get and set accessor with the same name +var sameName1a: { + a: string; +} = { get 'a'(): string { return ''; }, set a(n) { var p = n; var p: string; } }; +var sameName2a: { + 0: string; +} = { get 0.0(): string { return ''; }, set 0(n) { var p = n; var p: string; } }; +var sameName3a: { + 32: string; +} = { get 0x20(): string { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; +var sameName4a: { + "": string; +} = { get ''(): string { return ''; }, set ""(n) { var p = n; var p: string; } }; +var sameName5a: { + '\t': string; +} = { get '\t'(): string { return ''; }, set '\t'(n) { var p = n; var p: string; } }; +var sameName6a: { + a: string; +} = { get 'a'(): string { return ''; }, set a(n) { var p = n; var p: string; } }; + +// PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} +var callSig1 = { num(n: number): string { return '' } }; +var callSig1: { num: (n: number) => string; }; +var callSig2 = { num: function (n: number): string { return '' } }; +var callSig2: { num: (n: number) => string; }; +var callSig3 = { num: (n: number): string => '' }; +var callSig3: { num: (n: number) => string; }; + +// Get accessor only, type of the property is the annotated return type of the get accessor +var getter1 = { get x(): string { return undefined; } }; +var getter1: { readonly x: string; } + +// Get accessor only, type of the property is the inferred return type of the get accessor +var getter2 = { get x(): string { return ''; } }; +var getter2: { readonly x: string; } + +// Set accessor only, type of the property is the param type of the set accessor +var setter1 = { set x(n: number) { } }; +var setter1: { x: number }; + +// Set accessor only, type of the property is Any for an unannotated set accessor +var setter2: { + x: any; +} = { set x(n) { } }; +var setter2: { x: any }; + +var anyVar: any; +// Get and set accessor with matching type annotations +var sameType1: { + x: string; +} = { get x(): string { return undefined; }, set x(n: string) { } }; +var sameType2: { + x: number[]; +} = { get x(): Array { return undefined; }, set x(n: number[]) { } }; +var sameType3: { + x: any; +} = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; +var sameType4: { + x: Date; +} = { get x(): Date { return undefined; }, set x(n: Date) { } }; + +// Type of unannotated get accessor return type is the type annotation of the set accessor param +var setParamType1 = { + set n(x: (t: string) => void) { }, + get n(): (t: string) => void { return (t) => { + var p: string; + var p = t; + } + } +}; +var setParamType2: { + n: (t: string) => void; +} = { + get n() { return (t) => { + var p: string; + var p = t; + } + }, + set n(x: (t: string) => void) { } +}; + +// Type of unannotated set accessor parameter is the return type annotation of the get accessor +var getParamType1 = { + set n(x) { + var y = x; + var y: string; + }, + get n(): string { return ''; } +}; +var getParamType2: { + n: string; +} = { + get n(): string { return ''; }, + set n(x) { + var y = x; + var y: string; + } +}; + +// Type of unannotated accessors is the inferred return type of the get accessor +var getParamType3: { + n: string; +} = { + get n(): string { return ''; }, + set n(x) { + var y = x; + var y: string; + } +}; + + + +/// [Declarations] //// + + + +//// [/.src/objectLiteralGettersAndSetters.d.ts] +declare var sameName1a: { + a: string; +}; +declare var sameName2a: { + 0: string; +}; +declare var sameName3a: { + 32: string; +}; +declare var sameName4a: { + "": string; +}; +declare var sameName5a: { + '\t': string; +}; +declare var sameName6a: { + a: string; +}; +declare var callSig1: { + num(n: number): string; +}; +declare var callSig1: { + num: (n: number) => string; +}; +declare var callSig2: { + num: (n: number) => string; +}; +declare var callSig2: { + num: (n: number) => string; +}; +declare var callSig3: { + num: (n: number) => string; +}; +declare var callSig3: { + num: (n: number) => string; +}; +declare var getter1: { + readonly x: string; +}; +declare var getter1: { + readonly x: string; +}; +declare var getter2: { + readonly x: string; +}; +declare var getter2: { + readonly x: string; +}; +declare var setter1: { + x: number; +}; +declare var setter1: { + x: number; +}; +declare var setter2: { + x: any; +}; +declare var setter2: { + x: any; +}; +declare var anyVar: any; +declare var sameType1: { + x: string; +}; +declare var sameType2: { + x: number[]; +}; +declare var sameType3: { + x: any; +}; +declare var sameType4: { + x: Date; +}; +declare var setParamType1: { + get n(): (t: string) => void; + set n(x: (t: string) => void); +}; +declare var setParamType2: { + n: (t: string) => void; +}; +declare var getParamType1: { + n: string; +}; +declare var getParamType2: { + n: string; +}; +declare var getParamType3: { + n: string; +}; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/overloadingStaticFunctionsInFunctions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/overloadingStaticFunctionsInFunctions.d.ts new file mode 100644 index 0000000000000..d0862428fb2bc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/overloadingStaticFunctionsInFunctions.d.ts @@ -0,0 +1,67 @@ +//// [tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts] //// + +//// [overloadingStaticFunctionsInFunctions.ts] +function boo { + static test() + static test(name:string) + static test(name?:any){ } +} + +/// [Declarations] //// + + + +//// [/.src/overloadingStaticFunctionsInFunctions.d.ts] +declare function boo(): void; +/// [Errors] //// + +overloadingStaticFunctionsInFunctions.ts(1,14): error TS1005: '(' expected. +overloadingStaticFunctionsInFunctions.ts(2,3): error TS1128: Declaration or statement expected. +overloadingStaticFunctionsInFunctions.ts(2,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +overloadingStaticFunctionsInFunctions.ts(3,3): error TS1128: Declaration or statement expected. +overloadingStaticFunctionsInFunctions.ts(3,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +overloadingStaticFunctionsInFunctions.ts(3,15): error TS2304: Cannot find name 'name'. +overloadingStaticFunctionsInFunctions.ts(3,19): error TS1005: ',' expected. +overloadingStaticFunctionsInFunctions.ts(3,20): error TS2693: 'string' only refers to a type, but is being used as a value here. +overloadingStaticFunctionsInFunctions.ts(4,3): error TS1128: Declaration or statement expected. +overloadingStaticFunctionsInFunctions.ts(4,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +overloadingStaticFunctionsInFunctions.ts(4,15): error TS2304: Cannot find name 'name'. +overloadingStaticFunctionsInFunctions.ts(4,20): error TS1109: Expression expected. +overloadingStaticFunctionsInFunctions.ts(4,21): error TS2693: 'any' only refers to a type, but is being used as a value here. +overloadingStaticFunctionsInFunctions.ts(4,25): error TS1005: ';' expected. + + +==== overloadingStaticFunctionsInFunctions.ts (14 errors) ==== + function boo { + ~ +!!! error TS1005: '(' expected. + static test() + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~ +!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. + static test(name:string) + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~ +!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. + ~~~~ +!!! error TS2304: Cannot find name 'name'. + ~ +!!! error TS1005: ',' expected. + ~~~~~~ +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. + static test(name?:any){ } + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~ +!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. + ~~~~ +!!! error TS2304: Cannot find name 'name'. + ~ +!!! error TS1109: Expression expected. + ~~~ +!!! error TS2693: 'any' only refers to a type, but is being used as a value here. + ~ +!!! error TS1005: ';' expected. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.classMethods.es2018.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.classMethods.es2018.d.ts new file mode 100644 index 0000000000000..83d2c04a1cede --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.classMethods.es2018.d.ts @@ -0,0 +1,489 @@ +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.classMethods.es2018.ts] //// + +//// [methodIsOk.ts] +class C1 { + async * f(): AsyncGenerator { + } +} +//// [awaitMethodNameIsOk.ts] +class C2 { + async * await(): AsyncGenerator { + } +} +//// [yieldMethodNameIsOk.ts] +class C3 { + async * yield(): AsyncGenerator { + } +} +//// [awaitParameterIsError.ts] +class C4 { + async * f(await: any): AsyncGenerator { + } +} +//// [yieldParameterIsError.ts] +class C5 { + async * f(yield: any): AsyncGenerator { + } +} +//// [awaitInParameterInitializerIsError.ts] +class C6 { + async * f(a: number = await 1): AsyncGenerator { + } +} +//// [yieldInParameterInitializerIsError.ts] +class C7 { + async * f(a: any = yield): AsyncGenerator { + } +} +//// [nestedAsyncGeneratorIsOk.ts] +class C8 { + async * f(): AsyncGenerator { + async function * g() { + } + } +} +//// [nestedFunctionDeclarationNamedYieldIsError.ts] +class C9 { + async * f(): AsyncGenerator { + function yield() { + } + } +} +//// [nestedFunctionExpressionNamedYieldIsError.ts] +class C10 { + async * f(): AsyncGenerator { + const x = function yield() { + }; + } +} +//// [nestedFunctionDeclarationNamedAwaitIsError.ts] +class C11 { + async * f(): AsyncGenerator { + function await() { + } + } +} +//// [nestedFunctionExpressionNamedAwaitIsError.ts] +class C12 { + async * f(): AsyncGenerator { + const x = function await() { + }; + } +} +//// [yieldIsOk.ts] +class C13 { + async * f(): AsyncGenerator { + yield; + } +} +//// [yieldWithValueIsOk.ts] +class C14 { + async * f(): AsyncGenerator { + yield 1; + } +} +//// [yieldStarMissingValueIsError.ts] +class C15 { + async * f(): AsyncGenerator { + yield *; + } +} +//// [yieldStarWithValueIsOk.ts] +class C16 { + async * f(): AsyncGenerator { + yield * []; + } +} +//// [awaitWithValueIsOk.ts] +class C17 { + async * f(): AsyncGenerator { + await 1; + } +} +//// [awaitMissingValueIsError.ts] +class C18 { + async * f(): AsyncGenerator { + await; + } +} +//// [awaitAsTypeIsOk.ts] +interface await {} +class C19 { + async * f(): AsyncGenerator { + let x: await; + } +} +//// [yieldAsTypeIsStrictError.ts] +interface yield {} +class C20 { + async * f(): AsyncGenerator { + let x: yield; + } +} +//// [yieldInClassComputedPropertyIsError.ts] +class C21 { + async * [yield](): AsyncGenerator { + } +} +//// [yieldInNestedComputedPropertyIsOk.ts] +class C22 { + async * f(): AsyncGenerator { + const x = { [yield]: 1 }; + } +} +//// [asyncGeneratorGetAccessorIsError.ts] +class C23 { + async * get x(): number { + return 1; + } +} +//// [asyncGeneratorSetAccessorIsError.ts] +class C24 { + async * set x(value: number): void { + } +} +//// [asyncGeneratorPropertyIsError.ts] +class C25 { + async * x = 1: any; +} + + +/// [Declarations] //// + + + +//// [/.src/asyncGeneratorGetAccessorIsError.d.ts] +declare class C23 { + get(): any; + x(): number; +} + +//// [/.src/asyncGeneratorPropertyIsError.d.ts] +declare class C25 { + x(): any; + 1: any; +} + +//// [/.src/asyncGeneratorSetAccessorIsError.d.ts] +declare class C24 { + set(): any; + x(value: number): void; +} + +//// [/.src/awaitAsTypeIsOk.d.ts] +interface await { +} +declare class C19 { + f(): AsyncGenerator; +} + +//// [/.src/awaitInParameterInitializerIsError.d.ts] +declare class C6 { + f(a?: number): AsyncGenerator; +} + +//// [/.src/awaitMethodNameIsOk.d.ts] +declare class C2 { + await(): AsyncGenerator; +} + +//// [/.src/awaitMissingValueIsError.d.ts] +declare class C18 { + f(): AsyncGenerator; +} + +//// [/.src/awaitParameterIsError.d.ts] +declare class C4 { + f(await: any): AsyncGenerator; +} + +//// [/.src/awaitWithValueIsOk.d.ts] +declare class C17 { + f(): AsyncGenerator; +} + +//// [/.src/methodIsOk.d.ts] +declare class C1 { + f(): AsyncGenerator; +} + +//// [/.src/nestedAsyncGeneratorIsOk.d.ts] +declare class C8 { + f(): AsyncGenerator; +} + +//// [/.src/nestedFunctionDeclarationNamedAwaitIsError.d.ts] +declare class C11 { + f(): AsyncGenerator; +} + +//// [/.src/nestedFunctionDeclarationNamedYieldIsError.d.ts] +declare class C9 { + f(): AsyncGenerator; +} + +//// [/.src/nestedFunctionExpressionNamedAwaitIsError.d.ts] +declare class C12 { + f(): AsyncGenerator; +} + +//// [/.src/nestedFunctionExpressionNamedYieldIsError.d.ts] +declare class C10 { + f(): AsyncGenerator; +} + +//// [/.src/yieldAsTypeIsStrictError.d.ts] +interface yield { +} +declare class C20 { + f(): AsyncGenerator; +} + +//// [/.src/yieldInClassComputedPropertyIsError.d.ts] +declare class C21 { +} + +//// [/.src/yieldInNestedComputedPropertyIsOk.d.ts] +declare class C22 { + f(): AsyncGenerator; +} + +//// [/.src/yieldInParameterInitializerIsError.d.ts] +declare class C7 { + f(a?: any): AsyncGenerator; +} + +//// [/.src/yieldIsOk.d.ts] +declare class C13 { + f(): AsyncGenerator; +} + +//// [/.src/yieldMethodNameIsOk.d.ts] +declare class C3 { + yield(): AsyncGenerator; +} + +//// [/.src/yieldParameterIsError.d.ts] +declare class C5 { + f(yield: any): AsyncGenerator; +} + +//// [/.src/yieldStarMissingValueIsError.d.ts] +declare class C15 { + f(): AsyncGenerator; +} + +//// [/.src/yieldStarWithValueIsOk.d.ts] +declare class C16 { + f(): AsyncGenerator; +} + +//// [/.src/yieldWithValueIsOk.d.ts] +declare class C14 { + f(): AsyncGenerator; +} +/// [Errors] //// + +asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. +asyncGeneratorPropertyIsError.ts(2,15): error TS1005: '(' expected. +asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected. +awaitInParameterInitializerIsError.ts(2,27): error TS2524: 'await' expressions cannot be used in a parameter initializer. +awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected. +awaitParameterIsError.ts(2,15): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedAwaitIsError.ts(3,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedYieldIsError.ts(3,18): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +nestedFunctionExpressionNamedAwaitIsError.ts(3,28): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionExpressionNamedYieldIsError.ts(3,28): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +yieldAsTypeIsStrictError.ts(4,16): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +yieldInClassComputedPropertyIsError.ts(2,14): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +yieldInClassComputedPropertyIsError.ts(2,14): error TS2693: 'yield' only refers to a type, but is being used as a value here. +yieldInNestedComputedPropertyIsOk.ts(3,21): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +yieldInParameterInitializerIsError.ts(2,24): error TS2322: Type 'undefined' is not assignable to type 'never'. +yieldInParameterInitializerIsError.ts(2,24): error TS2523: 'yield' expressions cannot be used in a parameter initializer. +yieldParameterIsError.ts(2,15): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. +yieldStarMissingValueIsError.ts(3,16): error TS1109: Expression expected. + + +==== methodIsOk.ts (0 errors) ==== + class C1 { + async * f(): AsyncGenerator { + } + } +==== awaitMethodNameIsOk.ts (0 errors) ==== + class C2 { + async * await(): AsyncGenerator { + } + } +==== yieldMethodNameIsOk.ts (0 errors) ==== + class C3 { + async * yield(): AsyncGenerator { + } + } +==== awaitParameterIsError.ts (1 errors) ==== + class C4 { + async * f(await: any): AsyncGenerator { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } + } +==== yieldParameterIsError.ts (1 errors) ==== + class C5 { + async * f(yield: any): AsyncGenerator { + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + } + } +==== awaitInParameterInitializerIsError.ts (1 errors) ==== + class C6 { + async * f(a: number = await 1): AsyncGenerator { + ~~~~~~~ +!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. + } + } +==== yieldInParameterInitializerIsError.ts (2 errors) ==== + class C7 { + async * f(a: any = yield): AsyncGenerator { + ~~~~~ +!!! error TS2322: Type 'undefined' is not assignable to type 'never'. + ~~~~~ +!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. + } + } +==== nestedAsyncGeneratorIsOk.ts (0 errors) ==== + class C8 { + async * f(): AsyncGenerator { + async function * g() { + } + } + } +==== nestedFunctionDeclarationNamedYieldIsError.ts (1 errors) ==== + class C9 { + async * f(): AsyncGenerator { + function yield() { + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + } + } + } +==== nestedFunctionExpressionNamedYieldIsError.ts (1 errors) ==== + class C10 { + async * f(): AsyncGenerator { + const x = function yield() { + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + }; + } + } +==== nestedFunctionDeclarationNamedAwaitIsError.ts (1 errors) ==== + class C11 { + async * f(): AsyncGenerator { + function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } + } + } +==== nestedFunctionExpressionNamedAwaitIsError.ts (1 errors) ==== + class C12 { + async * f(): AsyncGenerator { + const x = function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + }; + } + } +==== yieldIsOk.ts (0 errors) ==== + class C13 { + async * f(): AsyncGenerator { + yield; + } + } +==== yieldWithValueIsOk.ts (0 errors) ==== + class C14 { + async * f(): AsyncGenerator { + yield 1; + } + } +==== yieldStarMissingValueIsError.ts (1 errors) ==== + class C15 { + async * f(): AsyncGenerator { + yield *; + ~ +!!! error TS1109: Expression expected. + } + } +==== yieldStarWithValueIsOk.ts (0 errors) ==== + class C16 { + async * f(): AsyncGenerator { + yield * []; + } + } +==== awaitWithValueIsOk.ts (0 errors) ==== + class C17 { + async * f(): AsyncGenerator { + await 1; + } + } +==== awaitMissingValueIsError.ts (1 errors) ==== + class C18 { + async * f(): AsyncGenerator { + await; + ~ +!!! error TS1109: Expression expected. + } + } +==== awaitAsTypeIsOk.ts (0 errors) ==== + interface await {} + class C19 { + async * f(): AsyncGenerator { + let x: await; + } + } +==== yieldAsTypeIsStrictError.ts (1 errors) ==== + interface yield {} + class C20 { + async * f(): AsyncGenerator { + let x: yield; + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + } + } +==== yieldInClassComputedPropertyIsError.ts (2 errors) ==== + class C21 { + async * [yield](): AsyncGenerator { + ~~~~~ +!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. + ~~~~~ +!!! error TS2693: 'yield' only refers to a type, but is being used as a value here. + } + } +==== yieldInNestedComputedPropertyIsOk.ts (1 errors) ==== + class C22 { + async * f(): AsyncGenerator { + const x = { [yield]: 1 }; + ~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } + } +==== asyncGeneratorGetAccessorIsError.ts (1 errors) ==== + class C23 { + async * get x(): number { + ~ +!!! error TS1005: '(' expected. + return 1; + } + } +==== asyncGeneratorSetAccessorIsError.ts (1 errors) ==== + class C24 { + async * set x(value: number): void { + ~ +!!! error TS1005: '(' expected. + } + } +==== asyncGeneratorPropertyIsError.ts (1 errors) ==== + class C25 { + async * x = 1: any; + ~ +!!! error TS1005: '(' expected. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts new file mode 100644 index 0000000000000..542c428572abe --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts @@ -0,0 +1,465 @@ +//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.es2018.ts] //// + +//// [methodIsOk.ts] +const o1 = { + async * f(): AsyncGenerator { + } +}; +//// [awaitMethodNameIsOk.ts] +const o2 = { + async * await(): AsyncGenerator { + } +}; +//// [yieldMethodNameIsOk.ts] +const o3 = { + async * yield(): AsyncGenerator { + } +}; +//// [awaitParameterIsError.ts] +const o4 = { + async * f(await: any): AsyncGenerator { + } +}; +//// [yieldParameterIsError.ts] +const o5 = { + async * f(yield: any): AsyncGenerator { + } +}; +//// [awaitInParameterInitializerIsError.ts] +const o6 = { + async * f(a: number = await 1): AsyncGenerator { + } +}; +//// [yieldInParameterInitializerIsError.ts] +const o7 = { + async * f(a: any = yield): AsyncGenerator { + } +}; +//// [nestedAsyncGeneratorIsOk.ts] +const o8 = { + async * f(): AsyncGenerator { + async function * g() { + } + } +}; +//// [nestedFunctionDeclarationNamedYieldIsError.ts] +const o9 = { + async * f(): AsyncGenerator { + function yield() { + } + } +}; +//// [nestedFunctionExpressionNamedYieldIsError.ts] +const o10 = { + async * f(): AsyncGenerator { + const x = function yield() { + }; + } +}; +//// [nestedFunctionDeclarationNamedAwaitIsError.ts] +const o11 = { + async * f(): AsyncGenerator { + function await() { + } + } +}; +//// [nestedFunctionExpressionNamedAwaitIsError.ts] +const o12 = { + async * f(): AsyncGenerator { + const x = function await() { + }; + } +}; +//// [yieldIsOk.ts] +const o13 = { + async * f(): AsyncGenerator { + yield; + } +}; +//// [yieldWithValueIsOk.ts] +const o14 = { + async * f(): AsyncGenerator { + yield 1; + } +}; +//// [yieldStarMissingValueIsError.ts] +const o15 = { + async * f(): AsyncGenerator { + yield *; + } +}; +//// [yieldStarWithValueIsOk.ts] +const o16 = { + async * f(): AsyncGenerator { + yield * []; + } +}; +//// [awaitWithValueIsOk.ts] +const o17 = { + async * f(): AsyncGenerator { + await 1; + } +}; +//// [awaitMissingValueIsError.ts] +const o18 = { + async * f(): AsyncGenerator { + await; + } +}; +//// [awaitAsTypeIsOk.ts] +interface await {} +const o19 = { + async * f(): AsyncGenerator { + let x: await; + } +}; +//// [yieldAsTypeIsOk.ts] +interface yield {} +const o20 = { + async * f(): AsyncGenerator { + let x: yield; + } +}; +//// [yieldInNestedComputedPropertyIsOk.ts] +const o21 = { + async * f(): AsyncGenerator { + const x = { [yield]: 1 }; + } +}; +//// [asyncGeneratorGetAccessorIsError.ts] +const o22 = { + async * get x(): number { + return 1; + } +}; +//// [asyncGeneratorSetAccessorIsError.ts] +const o23 = { + async * set x(value: number): void { + } +}; +//// [asyncGeneratorPropertyIsError.ts] +const o24 = { + async * x: 1; +}; + + +/// [Declarations] //// + + + +//// [/.src/asyncGeneratorGetAccessorIsError.d.ts] +declare const o22: { + get(): any; + x(): number; +}; + +//// [/.src/asyncGeneratorPropertyIsError.d.ts] +declare const o24: { + x(): 1; +}; + +//// [/.src/asyncGeneratorSetAccessorIsError.d.ts] +declare const o23: { + set(): any; + x(value: number): void; +}; + +//// [/.src/awaitAsTypeIsOk.d.ts] +interface await { +} +declare const o19: { + f(): AsyncGenerator; +}; + +//// [/.src/awaitInParameterInitializerIsError.d.ts] +declare const o6: { + f(a?: number): AsyncGenerator; +}; + +//// [/.src/awaitMethodNameIsOk.d.ts] +declare const o2: { + await(): AsyncGenerator; +}; + +//// [/.src/awaitMissingValueIsError.d.ts] +declare const o18: { + f(): AsyncGenerator; +}; + +//// [/.src/awaitParameterIsError.d.ts] +declare const o4: { + f(await: any): AsyncGenerator; +}; + +//// [/.src/awaitWithValueIsOk.d.ts] +declare const o17: { + f(): AsyncGenerator; +}; + +//// [/.src/methodIsOk.d.ts] +declare const o1: { + f(): AsyncGenerator; +}; + +//// [/.src/nestedAsyncGeneratorIsOk.d.ts] +declare const o8: { + f(): AsyncGenerator; +}; + +//// [/.src/nestedFunctionDeclarationNamedAwaitIsError.d.ts] +declare const o11: { + f(): AsyncGenerator; +}; + +//// [/.src/nestedFunctionDeclarationNamedYieldIsError.d.ts] +declare const o9: { + f(): AsyncGenerator; +}; + +//// [/.src/nestedFunctionExpressionNamedAwaitIsError.d.ts] +declare const o12: { + f(): AsyncGenerator; +}; + +//// [/.src/nestedFunctionExpressionNamedYieldIsError.d.ts] +declare const o10: { + f(): AsyncGenerator; +}; + +//// [/.src/yieldAsTypeIsOk.d.ts] +interface yield { +} +declare const o20: { + f(): AsyncGenerator; +}; + +//// [/.src/yieldInNestedComputedPropertyIsOk.d.ts] +declare const o21: { + f(): AsyncGenerator; +}; + +//// [/.src/yieldInParameterInitializerIsError.d.ts] +declare const o7: { + f(a?: any): AsyncGenerator; +}; + +//// [/.src/yieldIsOk.d.ts] +declare const o13: { + f(): AsyncGenerator; +}; + +//// [/.src/yieldMethodNameIsOk.d.ts] +declare const o3: { + yield(): AsyncGenerator; +}; + +//// [/.src/yieldParameterIsError.d.ts] +declare const o5: { + f(yield: any): AsyncGenerator; +}; + +//// [/.src/yieldStarMissingValueIsError.d.ts] +declare const o15: { + f(): AsyncGenerator; +}; + +//// [/.src/yieldStarWithValueIsOk.d.ts] +declare const o16: { + f(): AsyncGenerator; +}; + +//// [/.src/yieldWithValueIsOk.d.ts] +declare const o14: { + f(): AsyncGenerator; +}; +/// [Errors] //// + +asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. +asyncGeneratorPropertyIsError.ts(2,14): error TS1005: '(' expected. +asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected. +awaitInParameterInitializerIsError.ts(2,27): error TS2524: 'await' expressions cannot be used in a parameter initializer. +awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected. +awaitParameterIsError.ts(2,15): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedAwaitIsError.ts(3,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionDeclarationNamedYieldIsError.ts(3,18): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +nestedFunctionExpressionNamedAwaitIsError.ts(3,28): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. +nestedFunctionExpressionNamedYieldIsError.ts(3,28): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +yieldInNestedComputedPropertyIsOk.ts(3,21): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +yieldInParameterInitializerIsError.ts(2,24): error TS2322: Type 'undefined' is not assignable to type 'never'. +yieldInParameterInitializerIsError.ts(2,24): error TS2523: 'yield' expressions cannot be used in a parameter initializer. +yieldParameterIsError.ts(2,15): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. +yieldStarMissingValueIsError.ts(3,16): error TS1109: Expression expected. + + +==== methodIsOk.ts (0 errors) ==== + const o1 = { + async * f(): AsyncGenerator { + } + }; +==== awaitMethodNameIsOk.ts (0 errors) ==== + const o2 = { + async * await(): AsyncGenerator { + } + }; +==== yieldMethodNameIsOk.ts (0 errors) ==== + const o3 = { + async * yield(): AsyncGenerator { + } + }; +==== awaitParameterIsError.ts (1 errors) ==== + const o4 = { + async * f(await: any): AsyncGenerator { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } + }; +==== yieldParameterIsError.ts (1 errors) ==== + const o5 = { + async * f(yield: any): AsyncGenerator { + ~~~~~ +!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. + } + }; +==== awaitInParameterInitializerIsError.ts (1 errors) ==== + const o6 = { + async * f(a: number = await 1): AsyncGenerator { + ~~~~~~~ +!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. + } + }; +==== yieldInParameterInitializerIsError.ts (2 errors) ==== + const o7 = { + async * f(a: any = yield): AsyncGenerator { + ~~~~~ +!!! error TS2322: Type 'undefined' is not assignable to type 'never'. + ~~~~~ +!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. + } + }; +==== nestedAsyncGeneratorIsOk.ts (0 errors) ==== + const o8 = { + async * f(): AsyncGenerator { + async function * g() { + } + } + }; +==== nestedFunctionDeclarationNamedYieldIsError.ts (1 errors) ==== + const o9 = { + async * f(): AsyncGenerator { + function yield() { + ~~~~~ +!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. + } + } + }; +==== nestedFunctionExpressionNamedYieldIsError.ts (1 errors) ==== + const o10 = { + async * f(): AsyncGenerator { + const x = function yield() { + ~~~~~ +!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. + }; + } + }; +==== nestedFunctionDeclarationNamedAwaitIsError.ts (1 errors) ==== + const o11 = { + async * f(): AsyncGenerator { + function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + } + } + }; +==== nestedFunctionExpressionNamedAwaitIsError.ts (1 errors) ==== + const o12 = { + async * f(): AsyncGenerator { + const x = function await() { + ~~~~~ +!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. + }; + } + }; +==== yieldIsOk.ts (0 errors) ==== + const o13 = { + async * f(): AsyncGenerator { + yield; + } + }; +==== yieldWithValueIsOk.ts (0 errors) ==== + const o14 = { + async * f(): AsyncGenerator { + yield 1; + } + }; +==== yieldStarMissingValueIsError.ts (1 errors) ==== + const o15 = { + async * f(): AsyncGenerator { + yield *; + ~ +!!! error TS1109: Expression expected. + } + }; +==== yieldStarWithValueIsOk.ts (0 errors) ==== + const o16 = { + async * f(): AsyncGenerator { + yield * []; + } + }; +==== awaitWithValueIsOk.ts (0 errors) ==== + const o17 = { + async * f(): AsyncGenerator { + await 1; + } + }; +==== awaitMissingValueIsError.ts (1 errors) ==== + const o18 = { + async * f(): AsyncGenerator { + await; + ~ +!!! error TS1109: Expression expected. + } + }; +==== awaitAsTypeIsOk.ts (0 errors) ==== + interface await {} + const o19 = { + async * f(): AsyncGenerator { + let x: await; + } + }; +==== yieldAsTypeIsOk.ts (0 errors) ==== + interface yield {} + const o20 = { + async * f(): AsyncGenerator { + let x: yield; + } + }; +==== yieldInNestedComputedPropertyIsOk.ts (1 errors) ==== + const o21 = { + async * f(): AsyncGenerator { + const x = { [yield]: 1 }; + ~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } + }; +==== asyncGeneratorGetAccessorIsError.ts (1 errors) ==== + const o22 = { + async * get x(): number { + ~ +!!! error TS1005: '(' expected. + return 1; + } + }; +==== asyncGeneratorSetAccessorIsError.ts (1 errors) ==== + const o23 = { + async * set x(value: number): void { + ~ +!!! error TS1005: '(' expected. + } + }; +==== asyncGeneratorPropertyIsError.ts (1 errors) ==== + const o24 = { + async * x: 1; + ~ +!!! error TS1005: '(' expected. + }; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum1.d.ts new file mode 100644 index 0000000000000..37f316a19cbd8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum1.d.ts @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts] //// + +//// [parserEnum1.ts] + export enum SignatureFlags { + None = 0, + IsIndexer = 1, + IsStringIndexer = 1 << 1, + IsNumberIndexer = 1 << 2, + } + +/// [Declarations] //// + + + +//// [/.src/parserEnum1.d.ts] +export declare enum SignatureFlags { + None = 0, + IsIndexer = 1, + IsStringIndexer = 2, + IsNumberIndexer = 4 +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum2.d.ts new file mode 100644 index 0000000000000..20406fea350cc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum2.d.ts @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts] //// + +//// [parserEnum2.ts] + export enum SignatureFlags { + None = 0, + IsIndexer = 1, + IsStringIndexer = 1 << 1, + IsNumberIndexer = 1 << 2 + } + +/// [Declarations] //// + + + +//// [/.src/parserEnum2.d.ts] +export declare enum SignatureFlags { + None = 0, + IsIndexer = 1, + IsStringIndexer = 2, + IsNumberIndexer = 4 +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnumDeclaration6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnumDeclaration6.d.ts new file mode 100644 index 0000000000000..66fbdc21243b6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnumDeclaration6.d.ts @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnumDeclaration6.ts] //// + +//// [parserEnumDeclaration6.ts] +enum E { + A = 1, + B, + C = 1 << 1, + D, +} + +/// [Declarations] //// + + + +//// [/.src/parserEnumDeclaration6.d.ts] +declare enum E { + A = 1, + B = 2, + C = 2, + D = 3 +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction1.d.ts new file mode 100644 index 0000000000000..07a592e5ffbc6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction1.d.ts @@ -0,0 +1,20 @@ +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserEqualsGreaterThanAfterFunction1.ts] //// + +//// [parserEqualsGreaterThanAfterFunction1.ts] +function => + +/// [Declarations] //// + + + +//// [/.src/parserEqualsGreaterThanAfterFunction1.d.ts] +declare function (): any; +/// [Errors] //// + +parserEqualsGreaterThanAfterFunction1.ts(1,10): error TS1003: Identifier expected. + + +==== parserEqualsGreaterThanAfterFunction1.ts (1 errors) ==== + function => + ~~ +!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction2.d.ts new file mode 100644 index 0000000000000..a1437cdd3dbb5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction2.d.ts @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserEqualsGreaterThanAfterFunction2.ts] //// + +//// [parserEqualsGreaterThanAfterFunction2.ts] +function (a: any => b: any; + +/// [Declarations] //// + + + +//// [/.src/parserEqualsGreaterThanAfterFunction2.d.ts] +declare function (a: any, b: any): any; +/// [Errors] //// + +parserEqualsGreaterThanAfterFunction2.ts(1,10): error TS1003: Identifier expected. +parserEqualsGreaterThanAfterFunction2.ts(1,18): error TS1005: ',' expected. +parserEqualsGreaterThanAfterFunction2.ts(1,27): error TS1005: ',' expected. +parserEqualsGreaterThanAfterFunction2.ts(1,28): error TS1005: ')' expected. + + +==== parserEqualsGreaterThanAfterFunction2.ts (4 errors) ==== + function (a: any => b: any; + ~ +!!! error TS1003: Identifier expected. + ~~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1005: ',' expected. + +!!! error TS1005: ')' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList1.d.ts new file mode 100644 index 0000000000000..d7671987fb8a3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList1.d.ts @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ParameterLists/parserErrorRecovery_ParameterList1.ts] //// + +//// [parserErrorRecovery_ParameterList1.ts] +function f(a: any { +}: {} + +/// [Declarations] //// + + + +//// [/.src/parserErrorRecovery_ParameterList1.d.ts] +declare function f(a: any, {}: {}): any; +/// [Errors] //// + +parserErrorRecovery_ParameterList1.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. +parserErrorRecovery_ParameterList1.ts(1,19): error TS1005: ',' expected. +parserErrorRecovery_ParameterList1.ts(2,6): error TS1005: ')' expected. + + +==== parserErrorRecovery_ParameterList1.ts (3 errors) ==== + function f(a: any { + ~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. + ~ +!!! error TS1005: ',' expected. + }: {} + +!!! error TS1005: ')' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList2.d.ts new file mode 100644 index 0000000000000..4d232cbcc46d8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList2.d.ts @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ParameterLists/parserErrorRecovery_ParameterList2.ts] //// + +//// [parserErrorRecovery_ParameterList2.ts] +function f(a: any, { +}: {} + +/// [Declarations] //// + + + +//// [/.src/parserErrorRecovery_ParameterList2.d.ts] +declare function f(a: any, {}: {}): any; +/// [Errors] //// + +parserErrorRecovery_ParameterList2.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. +parserErrorRecovery_ParameterList2.ts(2,6): error TS1005: ')' expected. + + +==== parserErrorRecovery_ParameterList2.ts (2 errors) ==== + function f(a: any, { + ~ +!!! error TS2391: Function implementation is missing or not immediately following the declaration. + }: {} + +!!! error TS1005: ')' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserNoASIOnCallAfterFunctionExpression1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserNoASIOnCallAfterFunctionExpression1.d.ts new file mode 100644 index 0000000000000..b4af8351b8cb0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserNoASIOnCallAfterFunctionExpression1.d.ts @@ -0,0 +1,27 @@ +//// [tests/cases/conformance/parser/ecmascript5/parserNoASIOnCallAfterFunctionExpression1.ts] //// + +//// [parserNoASIOnCallAfterFunctionExpression1.ts] +var x = function (): void { } +(window).foo; + + +/// [Declarations] //// + + + +//// [/.src/parserNoASIOnCallAfterFunctionExpression1.d.ts] +declare var x: any; +/// [Errors] //// + +parserNoASIOnCallAfterFunctionExpression1.ts(2,2): error TS2554: Expected 0 arguments, but got 1. +parserNoASIOnCallAfterFunctionExpression1.ts(2,15): error TS2339: Property 'foo' does not exist on type 'void'. + + +==== parserNoASIOnCallAfterFunctionExpression1.ts (2 errors) ==== + var x = function (): void { } + (window).foo; + ~~~~~~~~~~~ +!!! error TS2554: Expected 0 arguments, but got 1. + ~~~ +!!! error TS2339: Property 'foo' does not exist on type 'void'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource10.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource10.d.ts new file mode 100644 index 0000000000000..c7126af45e433 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource10.d.ts @@ -0,0 +1,2187 @@ +//// [tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts] //// + +//// [parserRealSource10.ts] +// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. +// See LICENSE.txt in the project root for complete license information. + +/// + +module TypeScript { + export enum TokenID { + // Keywords + Any, + Bool, + Break, + Case, + Catch, + Class, + Const, + Continue, + Debugger, + Default, + Delete, + Do, + Else, + Enum, + Export, + Extends, + Declare, + False, + Finally, + For, + Function, + Constructor, + Get, + If, + Implements, + Import, + In, + InstanceOf, + Interface, + Let, + Module, + New, + Number, + Null, + Package, + Private, + Protected, + Public, + Return, + Set, + Static, + String, + Super, + Switch, + This, + Throw, + True, + Try, + TypeOf, + Var, + Void, + With, + While, + Yield, + // Punctuation + Semicolon, + OpenParen, + CloseParen, + OpenBracket, + CloseBracket, + OpenBrace, + CloseBrace, + Comma, + Equals, + PlusEquals, + MinusEquals, + AsteriskEquals, + SlashEquals, + PercentEquals, + AmpersandEquals, + CaretEquals, + BarEquals, + LessThanLessThanEquals, + GreaterThanGreaterThanEquals, + GreaterThanGreaterThanGreaterThanEquals, + Question, + Colon, + BarBar, + AmpersandAmpersand, + Bar, + Caret, + And, + EqualsEquals, + ExclamationEquals, + EqualsEqualsEquals, + ExclamationEqualsEquals, + LessThan, + LessThanEquals, + GreaterThan, + GreaterThanEquals, + LessThanLessThan, + GreaterThanGreaterThan, + GreaterThanGreaterThanGreaterThan, + Plus, + Minus, + Asterisk, + Slash, + Percent, + Tilde, + Exclamation, + PlusPlus, + MinusMinus, + Dot, + DotDotDot, + Error, + EndOfFile, + EqualsGreaterThan, + Identifier, + StringLiteral, + RegularExpressionLiteral, + NumberLiteral, + Whitespace, + Comment, + Lim, + LimFixed = EqualsGreaterThan, + LimKeyword = Yield, + } + + export var tokenTable: any = new TokenInfo[]; + export var nodeTypeTable: any = new string[]; + export var nodeTypeToTokTable: any = new number[]; + export var noRegexTable: any = new boolean[]; + + noRegexTable[TokenID.Identifier] = true; + noRegexTable[TokenID.StringLiteral] = true; + noRegexTable[TokenID.NumberLiteral] = true; + noRegexTable[TokenID.RegularExpressionLiteral] = true; + noRegexTable[TokenID.This] = true; + noRegexTable[TokenID.PlusPlus] = true; + noRegexTable[TokenID.MinusMinus] = true; + noRegexTable[TokenID.CloseParen] = true; + noRegexTable[TokenID.CloseBracket] = true; + noRegexTable[TokenID.CloseBrace] = true; + noRegexTable[TokenID.True] = true; + noRegexTable[TokenID.False] = true; + + export enum OperatorPrecedence { + None, + Comma, + Assignment, + Conditional, + LogicalOr, + LogicalAnd, + BitwiseOr, + BitwiseExclusiveOr, + BitwiseAnd, + Equality, + Relational, + Shift, + Additive, + Multiplicative, + Unary, + Lim + } + + export enum Reservation { + None = 0, + Javascript = 1, + JavascriptFuture = 2, + TypeScript = 4, + JavascriptFutureStrict = 8, + TypeScriptAndJS = Javascript | TypeScript, + TypeScriptAndJSFuture = JavascriptFuture | TypeScript, + TypeScriptAndJSFutureStrict = JavascriptFutureStrict | TypeScript, + } + + export class TokenInfo { + constructor (public tokenId: TokenID, public reservation: Reservation, + public binopPrecedence: number, public binopNodeType: number, + public unopPrecedence: number, public unopNodeType: number, + public text: string, public ers: ErrorRecoverySet) { } + } + + function setTokenInfo(tokenId: TokenID, reservation: number, binopPrecedence: number, + binopNodeType: number, unopPrecedence: number, unopNodeType: number, + text: string, ers: ErrorRecoverySet) { + if (tokenId !== undefined) { + tokenTable[tokenId] = new TokenInfo(tokenId, reservation, binopPrecedence, + binopNodeType, unopPrecedence, unopNodeType, text, ers); + if (binopNodeType != NodeType.None) { + nodeTypeTable[binopNodeType] = text; + nodeTypeToTokTable[binopNodeType] = tokenId; + } + if (unopNodeType != NodeType.None) { + nodeTypeTable[unopNodeType] = text; + } + } + } + + setTokenInfo(TokenID.Any, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "any", ErrorRecoverySet.PrimType); + setTokenInfo(TokenID.Bool, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "boolean", ErrorRecoverySet.PrimType); + setTokenInfo(TokenID.Break, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "break", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.Case, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "case", ErrorRecoverySet.SCase); + setTokenInfo(TokenID.Catch, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "catch", ErrorRecoverySet.Catch); + setTokenInfo(TokenID.Class, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "class", ErrorRecoverySet.TypeScriptS); + setTokenInfo(TokenID.Const, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "const", ErrorRecoverySet.Var); + setTokenInfo(TokenID.Continue, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "continue", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.Debugger, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.Debugger, "debugger", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.Default, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "default", ErrorRecoverySet.SCase); + setTokenInfo(TokenID.Delete, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Delete, "delete", ErrorRecoverySet.Prefix); + setTokenInfo(TokenID.Do, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "do", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.Else, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "else", ErrorRecoverySet.Else); + setTokenInfo(TokenID.Enum, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "enum", ErrorRecoverySet.TypeScriptS); + setTokenInfo(TokenID.Export, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "export", ErrorRecoverySet.TypeScriptS); + setTokenInfo(TokenID.Extends, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "extends", ErrorRecoverySet.None); + setTokenInfo(TokenID.Declare, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "declare", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.False, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "false", ErrorRecoverySet.RLit); + setTokenInfo(TokenID.Finally, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "finally", ErrorRecoverySet.Catch); + setTokenInfo(TokenID.For, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "for", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.Function, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "function", ErrorRecoverySet.Func); + setTokenInfo(TokenID.Constructor, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "constructor", ErrorRecoverySet.Func); + setTokenInfo(TokenID.Get, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "get", ErrorRecoverySet.Func); + setTokenInfo(TokenID.Set, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "set", ErrorRecoverySet.Func); + setTokenInfo(TokenID.If, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "if", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.Implements, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "implements", ErrorRecoverySet.None); + setTokenInfo(TokenID.Import, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "import", ErrorRecoverySet.TypeScriptS); + setTokenInfo(TokenID.In, Reservation.TypeScriptAndJS, OperatorPrecedence.Relational, NodeType.In, OperatorPrecedence.None, NodeType.None, "in", ErrorRecoverySet.None); + setTokenInfo(TokenID.InstanceOf, Reservation.TypeScriptAndJS, OperatorPrecedence.Relational, NodeType.InstOf, OperatorPrecedence.None, NodeType.None, "instanceof", ErrorRecoverySet.BinOp); + setTokenInfo(TokenID.Interface, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "interface", ErrorRecoverySet.TypeScriptS); + setTokenInfo(TokenID.Let, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "let", ErrorRecoverySet.None); + setTokenInfo(TokenID.Module, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "module", ErrorRecoverySet.TypeScriptS); + setTokenInfo(TokenID.New, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "new", ErrorRecoverySet.PreOp); + setTokenInfo(TokenID.Number, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "number", ErrorRecoverySet.PrimType); + setTokenInfo(TokenID.Null, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "null", ErrorRecoverySet.RLit); + setTokenInfo(TokenID.Package, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "package", ErrorRecoverySet.None); + setTokenInfo(TokenID.Private, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "private", ErrorRecoverySet.TypeScriptS); + setTokenInfo(TokenID.Protected, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "protected", ErrorRecoverySet.None); + setTokenInfo(TokenID.Public, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "public", ErrorRecoverySet.TypeScriptS); + setTokenInfo(TokenID.Return, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "return", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.Static, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "static", ErrorRecoverySet.None); + setTokenInfo(TokenID.String, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "string", ErrorRecoverySet.PrimType); + setTokenInfo(TokenID.Super, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "super", ErrorRecoverySet.RLit); + setTokenInfo(TokenID.Switch, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "switch", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.This, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "this", ErrorRecoverySet.RLit); + setTokenInfo(TokenID.Throw, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "throw", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.True, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "true", ErrorRecoverySet.RLit); + setTokenInfo(TokenID.Try, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "try", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.TypeOf, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Typeof, "typeof", ErrorRecoverySet.Prefix); + setTokenInfo(TokenID.Var, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "var", ErrorRecoverySet.Var); + setTokenInfo(TokenID.Void, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Void, "void", ErrorRecoverySet.Prefix); + setTokenInfo(TokenID.With, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.With, "with", ErrorRecoverySet.Stmt); + setTokenInfo(TokenID.While, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "while", ErrorRecoverySet.While); + setTokenInfo(TokenID.Yield, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "yield", ErrorRecoverySet.None); + + setTokenInfo(TokenID.Identifier, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "identifier", ErrorRecoverySet.ID); + setTokenInfo(TokenID.NumberLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "numberLiteral", ErrorRecoverySet.Literal); + setTokenInfo(TokenID.RegularExpressionLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "regex", ErrorRecoverySet.RegExp); + setTokenInfo(TokenID.StringLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "qstring", ErrorRecoverySet.Literal); + + // Non-operator non-identifier tokens + setTokenInfo(TokenID.Semicolon, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ";", ErrorRecoverySet.SColon); // ; + setTokenInfo(TokenID.CloseParen, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ")", ErrorRecoverySet.RParen); // ) + setTokenInfo(TokenID.CloseBracket, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "]", ErrorRecoverySet.RBrack); // ] + setTokenInfo(TokenID.OpenBrace, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "{", ErrorRecoverySet.LCurly); // { + setTokenInfo(TokenID.CloseBrace, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "}", ErrorRecoverySet.RCurly); // } + setTokenInfo(TokenID.DotDotDot, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "...", ErrorRecoverySet.None); // ... + + // Operator non-identifier tokens + setTokenInfo(TokenID.Comma, Reservation.None, OperatorPrecedence.Comma, NodeType.Comma, OperatorPrecedence.None, NodeType.None, ",", ErrorRecoverySet.Comma); // , + setTokenInfo(TokenID.Equals, Reservation.None, OperatorPrecedence.Assignment, NodeType.Asg, OperatorPrecedence.None, NodeType.None, "=", ErrorRecoverySet.Asg); // = + setTokenInfo(TokenID.PlusEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgAdd, OperatorPrecedence.None, NodeType.None, "+=", ErrorRecoverySet.BinOp); // += + setTokenInfo(TokenID.MinusEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgSub, OperatorPrecedence.None, NodeType.None, "-=", ErrorRecoverySet.BinOp); // -= + setTokenInfo(TokenID.AsteriskEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgMul, OperatorPrecedence.None, NodeType.None, "*=", ErrorRecoverySet.BinOp); // *= + + setTokenInfo(TokenID.SlashEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgDiv, OperatorPrecedence.None, NodeType.None, "/=", ErrorRecoverySet.BinOp); // /= + setTokenInfo(TokenID.PercentEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgMod, OperatorPrecedence.None, NodeType.None, "%=", ErrorRecoverySet.BinOp); // %= + setTokenInfo(TokenID.AmpersandEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgAnd, OperatorPrecedence.None, NodeType.None, "&=", ErrorRecoverySet.BinOp); // &= + setTokenInfo(TokenID.CaretEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgXor, OperatorPrecedence.None, NodeType.None, "^=", ErrorRecoverySet.BinOp); // ^= + setTokenInfo(TokenID.BarEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgOr, OperatorPrecedence.None, NodeType.None, "|=", ErrorRecoverySet.BinOp); // |= + setTokenInfo(TokenID.LessThanLessThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgLsh, OperatorPrecedence.None, NodeType.None, "<<=", ErrorRecoverySet.BinOp); // <<= + setTokenInfo(TokenID.GreaterThanGreaterThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgRsh, OperatorPrecedence.None, NodeType.None, ">>=", ErrorRecoverySet.BinOp); // >>= + setTokenInfo(TokenID.GreaterThanGreaterThanGreaterThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgRs2, OperatorPrecedence.None, NodeType.None, ">>>=", ErrorRecoverySet.BinOp); // >>>= + setTokenInfo(TokenID.Question, Reservation.None, OperatorPrecedence.Conditional, NodeType.ConditionalExpression, OperatorPrecedence.None, NodeType.None, "?", ErrorRecoverySet.BinOp); // ? + setTokenInfo(TokenID.Colon, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ":", ErrorRecoverySet.Colon); // : + setTokenInfo(TokenID.BarBar, Reservation.None, OperatorPrecedence.LogicalOr, NodeType.LogOr, OperatorPrecedence.None, NodeType.None, "||", ErrorRecoverySet.BinOp); // || + setTokenInfo(TokenID.AmpersandAmpersand, Reservation.None, OperatorPrecedence.LogicalAnd, NodeType.LogAnd, OperatorPrecedence.None, NodeType.None, "&&", ErrorRecoverySet.BinOp); // && + setTokenInfo(TokenID.Bar, Reservation.None, OperatorPrecedence.BitwiseOr, NodeType.Or, OperatorPrecedence.None, NodeType.None, "|", ErrorRecoverySet.BinOp); // | + setTokenInfo(TokenID.Caret, Reservation.None, OperatorPrecedence.BitwiseExclusiveOr, NodeType.Xor, OperatorPrecedence.None, NodeType.None, "^", ErrorRecoverySet.BinOp); // ^ + setTokenInfo(TokenID.And, Reservation.None, OperatorPrecedence.BitwiseAnd, NodeType.And, OperatorPrecedence.None, NodeType.None, "&", ErrorRecoverySet.BinOp); // & + setTokenInfo(TokenID.EqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Eq, OperatorPrecedence.None, NodeType.None, "==", ErrorRecoverySet.BinOp); // == + setTokenInfo(TokenID.ExclamationEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Ne, OperatorPrecedence.None, NodeType.None, "!=", ErrorRecoverySet.BinOp); // != + setTokenInfo(TokenID.EqualsEqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Eqv, OperatorPrecedence.None, NodeType.None, "===", ErrorRecoverySet.BinOp); // === + setTokenInfo(TokenID.ExclamationEqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.NEqv, OperatorPrecedence.None, NodeType.None, "!==", ErrorRecoverySet.BinOp); // !== + setTokenInfo(TokenID.LessThan, Reservation.None, OperatorPrecedence.Relational, NodeType.Lt, OperatorPrecedence.None, NodeType.None, "<", ErrorRecoverySet.BinOp); // < + setTokenInfo(TokenID.LessThanEquals, Reservation.None, OperatorPrecedence.Relational, NodeType.Le, OperatorPrecedence.None, NodeType.None, "<=", ErrorRecoverySet.BinOp); // <= + setTokenInfo(TokenID.GreaterThan, Reservation.None, OperatorPrecedence.Relational, NodeType.Gt, OperatorPrecedence.None, NodeType.None, ">", ErrorRecoverySet.BinOp); // > + setTokenInfo(TokenID.GreaterThanEquals, Reservation.None, OperatorPrecedence.Relational, NodeType.Ge, OperatorPrecedence.None, NodeType.None, ">=", ErrorRecoverySet.BinOp); // >= + setTokenInfo(TokenID.LessThanLessThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Lsh, OperatorPrecedence.None, NodeType.None, "<<", ErrorRecoverySet.BinOp); // << + setTokenInfo(TokenID.GreaterThanGreaterThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Rsh, OperatorPrecedence.None, NodeType.None, ">>", ErrorRecoverySet.BinOp); // >> + setTokenInfo(TokenID.GreaterThanGreaterThanGreaterThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Rs2, OperatorPrecedence.None, NodeType.None, ">>>", ErrorRecoverySet.BinOp); // >>> + setTokenInfo(TokenID.Plus, Reservation.None, OperatorPrecedence.Additive, NodeType.Add, OperatorPrecedence.Unary, NodeType.Pos, "+", ErrorRecoverySet.AddOp); // + + setTokenInfo(TokenID.Minus, Reservation.None, OperatorPrecedence.Additive, NodeType.Sub, OperatorPrecedence.Unary, NodeType.Neg, "-", ErrorRecoverySet.AddOp); // - + setTokenInfo(TokenID.Asterisk, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Mul, OperatorPrecedence.None, NodeType.None, "*", ErrorRecoverySet.BinOp); // * + setTokenInfo(TokenID.Slash, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Div, OperatorPrecedence.None, NodeType.None, "/", ErrorRecoverySet.BinOp); // / + setTokenInfo(TokenID.Percent, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Mod, OperatorPrecedence.None, NodeType.None, "%", ErrorRecoverySet.BinOp); // % + setTokenInfo(TokenID.Tilde, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Not, "~", ErrorRecoverySet.PreOp); // ~ + setTokenInfo(TokenID.Exclamation, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.LogNot, "!", ErrorRecoverySet.PreOp); // ! + setTokenInfo(TokenID.PlusPlus, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.IncPre, "++", ErrorRecoverySet.PreOp); // ++ + setTokenInfo(TokenID.MinusMinus, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.DecPre, "--", ErrorRecoverySet.PreOp); // -- + setTokenInfo(TokenID.OpenParen, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "(", ErrorRecoverySet.LParen); // ( + setTokenInfo(TokenID.OpenBracket, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "[", ErrorRecoverySet.LBrack); // [ + setTokenInfo(TokenID.Dot, Reservation.None, OperatorPrecedence.Unary, NodeType.None, OperatorPrecedence.None, NodeType.None, ".", ErrorRecoverySet.Dot); // . + setTokenInfo(TokenID.EndOfFile, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "", ErrorRecoverySet.EOF); // EOF + setTokenInfo(TokenID.EqualsGreaterThan, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "=>", ErrorRecoverySet.None); // => + + export function lookupToken(tokenId: TokenID): TokenInfo { + return tokenTable[tokenId]; + } + + export enum TokenClass { + Punctuation, + Keyword, + Operator, + Comment, + Whitespace, + Identifier, + Literal, + } + + export class SavedToken { + constructor (public tok: Token, public minChar: number, public limChar: number) { } + } + + export class Token { + constructor (public tokenId: TokenID) { + } + + public toString(): string { + return "token: " + this.tokenId + " " + this.getText() + " (" + (TokenID)._map[this.tokenId] + ")"; + } + + public print(line: number, outfile: any): void { + outfile.WriteLine(this.toString() + ",on line" + line); + } + + public getText(): string { + return tokenTable[this.tokenId].text; + } + + public classification(): TokenClass { + if (this.tokenId <= TokenID.LimKeyword) { + return TokenClass.Keyword; + } + else { + var tokenInfo = lookupToken(this.tokenId); + if (tokenInfo != undefined) { + if ((tokenInfo.unopNodeType != NodeType.None) || + (tokenInfo.binopNodeType != NodeType.None)) { + return TokenClass.Operator; + } + } + } + + return TokenClass.Punctuation; + } + } + + export class NumberLiteralToken extends Token { + constructor (public value: number, public hasEmptyFraction?: boolean) { + super(TokenID.NumberLiteral); + } + + public getText(): string { + return this.hasEmptyFraction ? this.value.toString() + ".0" : this.value.toString(); + } + + public classification(): TokenClass { + return TokenClass.Literal; + } + } + + export class StringLiteralToken extends Token { + constructor (public value: string) { + super(TokenID.StringLiteral); + } + + public getText(): string { + return this.value; + } + + public classification(): TokenClass { + return TokenClass.Literal; + } + } + + export class IdentifierToken extends Token { + constructor (public value: string, public hasEscapeSequence : boolean) { + super(TokenID.Identifier); + } + public getText(): string { + return this.value; + } + public classification(): TokenClass { + return TokenClass.Identifier; + } + } + + export class WhitespaceToken extends Token { + constructor (tokenId: TokenID, public value: string) { + super(tokenId); + } + + public getText(): string { + return this.value; + } + + public classification(): TokenClass { + return TokenClass.Whitespace; + } + } + + export class CommentToken extends Token { + constructor (tokenID: TokenID, public value: string, public isBlock: boolean, public startPos: number, public line: number, public endsLine: boolean) { + super(tokenID); + } + + public getText(): string { + return this.value; + } + + public classification(): TokenClass { + return TokenClass.Comment; + } + } + + export class RegularExpressionLiteralToken extends Token { + constructor(public regex: any) { + super(TokenID.RegularExpressionLiteral); + } + + public getText(): string { + return this.regex.toString(); + } + + public classification(): TokenClass { + return TokenClass.Literal; + } + } + + // TODO: new with length TokenID.LimFixed + export var staticTokens: any = new Token[]; + export function initializeStaticTokens(): void { + for (var i = 0; i <= TokenID.LimFixed; i++) { + staticTokens[i] = new Token(i); + } + } +} + +/// [Declarations] //// + + + +//// [/.src/parserRealSource10.d.ts] +declare namespace TypeScript { + enum TokenID { + Any = 0, + Bool = 1, + Break = 2, + Case = 3, + Catch = 4, + Class = 5, + Const = 6, + Continue = 7, + Debugger = 8, + Default = 9, + Delete = 10, + Do = 11, + Else = 12, + Enum = 13, + Export = 14, + Extends = 15, + Declare = 16, + False = 17, + Finally = 18, + For = 19, + Function = 20, + Constructor = 21, + Get = 22, + If = 23, + Implements = 24, + Import = 25, + In = 26, + InstanceOf = 27, + Interface = 28, + Let = 29, + Module = 30, + New = 31, + Number = 32, + Null = 33, + Package = 34, + Private = 35, + Protected = 36, + Public = 37, + Return = 38, + Set = 39, + Static = 40, + String = 41, + Super = 42, + Switch = 43, + This = 44, + Throw = 45, + True = 46, + Try = 47, + TypeOf = 48, + Var = 49, + Void = 50, + With = 51, + While = 52, + Yield = 53, + Semicolon = 54, + OpenParen = 55, + CloseParen = 56, + OpenBracket = 57, + CloseBracket = 58, + OpenBrace = 59, + CloseBrace = 60, + Comma = 61, + Equals = 62, + PlusEquals = 63, + MinusEquals = 64, + AsteriskEquals = 65, + SlashEquals = 66, + PercentEquals = 67, + AmpersandEquals = 68, + CaretEquals = 69, + BarEquals = 70, + LessThanLessThanEquals = 71, + GreaterThanGreaterThanEquals = 72, + GreaterThanGreaterThanGreaterThanEquals = 73, + Question = 74, + Colon = 75, + BarBar = 76, + AmpersandAmpersand = 77, + Bar = 78, + Caret = 79, + And = 80, + EqualsEquals = 81, + ExclamationEquals = 82, + EqualsEqualsEquals = 83, + ExclamationEqualsEquals = 84, + LessThan = 85, + LessThanEquals = 86, + GreaterThan = 87, + GreaterThanEquals = 88, + LessThanLessThan = 89, + GreaterThanGreaterThan = 90, + GreaterThanGreaterThanGreaterThan = 91, + Plus = 92, + Minus = 93, + Asterisk = 94, + Slash = 95, + Percent = 96, + Tilde = 97, + Exclamation = 98, + PlusPlus = 99, + MinusMinus = 100, + Dot = 101, + DotDotDot = 102, + Error = 103, + EndOfFile = 104, + EqualsGreaterThan = 105, + Identifier = 106, + StringLiteral = 107, + RegularExpressionLiteral = 108, + NumberLiteral = 109, + Whitespace = 110, + Comment = 111, + Lim = 112, + LimFixed = 105, + LimKeyword = 53 + } + var tokenTable: any; + var nodeTypeTable: any; + var nodeTypeToTokTable: any; + var noRegexTable: any; + enum OperatorPrecedence { + None = 0, + Comma = 1, + Assignment = 2, + Conditional = 3, + LogicalOr = 4, + LogicalAnd = 5, + BitwiseOr = 6, + BitwiseExclusiveOr = 7, + BitwiseAnd = 8, + Equality = 9, + Relational = 10, + Shift = 11, + Additive = 12, + Multiplicative = 13, + Unary = 14, + Lim = 15 + } + enum Reservation { + None = 0, + Javascript = 1, + JavascriptFuture = 2, + TypeScript = 4, + JavascriptFutureStrict = 8, + TypeScriptAndJS = 5, + TypeScriptAndJSFuture = 6, + TypeScriptAndJSFutureStrict = 12 + } + class TokenInfo { + tokenId: TokenID; + reservation: Reservation; + binopPrecedence: number; + binopNodeType: number; + unopPrecedence: number; + unopNodeType: number; + text: string; + ers: ErrorRecoverySet; + constructor(tokenId: TokenID, reservation: Reservation, binopPrecedence: number, binopNodeType: number, unopPrecedence: number, unopNodeType: number, text: string, ers: ErrorRecoverySet); + } + function lookupToken(tokenId: TokenID): TokenInfo; + enum TokenClass { + Punctuation = 0, + Keyword = 1, + Operator = 2, + Comment = 3, + Whitespace = 4, + Identifier = 5, + Literal = 6 + } + class SavedToken { + tok: Token; + minChar: number; + limChar: number; + constructor(tok: Token, minChar: number, limChar: number); + } + class Token { + tokenId: TokenID; + constructor(tokenId: TokenID); + toString(): string; + print(line: number, outfile: any): void; + getText(): string; + classification(): TokenClass; + } + class NumberLiteralToken extends Token { + value: number; + hasEmptyFraction?: boolean; + constructor(value: number, hasEmptyFraction?: boolean); + getText(): string; + classification(): TokenClass; + } + class StringLiteralToken extends Token { + value: string; + constructor(value: string); + getText(): string; + classification(): TokenClass; + } + class IdentifierToken extends Token { + value: string; + hasEscapeSequence: boolean; + constructor(value: string, hasEscapeSequence: boolean); + getText(): string; + classification(): TokenClass; + } + class WhitespaceToken extends Token { + value: string; + constructor(tokenId: TokenID, value: string); + getText(): string; + classification(): TokenClass; + } + class CommentToken extends Token { + value: string; + isBlock: boolean; + startPos: number; + line: number; + endsLine: boolean; + constructor(tokenID: TokenID, value: string, isBlock: boolean, startPos: number, line: number, endsLine: boolean); + getText(): string; + classification(): TokenClass; + } + class RegularExpressionLiteralToken extends Token { + regex: any; + constructor(regex: any); + getText(): string; + classification(): TokenClass; + } + var staticTokens: any; + function initializeStaticTokens(): void; +} +/// [Errors] //// + +parserRealSource10.ts(4,21): error TS6053: File 'typescript.ts' not found. +parserRealSource10.ts(127,38): error TS2449: Class 'TokenInfo' used before its declaration. +parserRealSource10.ts(127,48): error TS1011: An element access expression should take an argument. +parserRealSource10.ts(128,41): error TS2693: 'string' only refers to a type, but is being used as a value here. +parserRealSource10.ts(128,48): error TS1011: An element access expression should take an argument. +parserRealSource10.ts(129,46): error TS2693: 'number' only refers to a type, but is being used as a value here. +parserRealSource10.ts(129,53): error TS1011: An element access expression should take an argument. +parserRealSource10.ts(130,40): error TS2693: 'boolean' only refers to a type, but is being used as a value here. +parserRealSource10.ts(130,48): error TS1011: An element access expression should take an argument. +parserRealSource10.ts(179,54): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(179,54): error TS4063: Parameter 'ers' of constructor from exported class has or is using private name 'ErrorRecoverySet'. +parserRealSource10.ts(184,28): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(188,34): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(192,33): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(198,80): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(198,120): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(198,142): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(199,81): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(199,121): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(199,147): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(200,87): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(200,127): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(200,151): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(201,86): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(201,126): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(201,149): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(202,87): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(202,127): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(202,151): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(203,93): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(203,133): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(203,157): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(204,93): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(204,133): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(204,157): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(205,90): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(205,130): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(205,157): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(206,90): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(206,130): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(206,161): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(207,89): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(207,129): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(207,155): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(208,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(208,129): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(208,156): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(209,84): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(209,124): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(209,145): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(210,86): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(210,126): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(210,149): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(211,92): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(211,132): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(211,155): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(212,94): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(212,134): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(212,159): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(213,95): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(213,135): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(213,161): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(214,84): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(214,124): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(214,150): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(215,87): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(215,127): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(215,151): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(216,89): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(216,129): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(216,155): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(217,85): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(217,125): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(217,147): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(218,90): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(218,130): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(218,157): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(219,105): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(219,145): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(219,175): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(220,80): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(220,120): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(220,142): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(221,80): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(221,120): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(221,142): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(222,84): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(222,124): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(222,145): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(223,104): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(223,144): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(223,173): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(224,94): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(224,134): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(224,159): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(225,90): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(225,128): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(225,149): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(226,98): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(226,140): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(226,169): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(227,103): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(227,143): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(227,171): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(228,92): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(228,132): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(228,154): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(229,83): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(229,123): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(229,148): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(230,85): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(230,125): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(230,147): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(231,83): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(231,123): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(231,148): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(232,86): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(232,126): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(232,149): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(233,96): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(233,136): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(233,162): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(234,101): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(234,141): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(234,167): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(235,98): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(235,138): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(235,166): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(236,100): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(236,140): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(236,165): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(237,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(237,128): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(237,153): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(238,100): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(238,140): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(238,165): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(239,83): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(239,123): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(239,148): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(240,93): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(240,133): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(240,157): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(241,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(241,128): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(241,153): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(242,86): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(242,126): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(242,149): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(243,87): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(243,127): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(243,151): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(244,86): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(244,126): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(244,149): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(245,85): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(245,125): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(245,147): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(246,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(246,129): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(246,156): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(247,85): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(247,125): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(247,147): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(248,86): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(248,127): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(248,150): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(249,86): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(249,126): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(249,149): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(250,87): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(250,127): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(250,151): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(251,94): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(251,134): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(251,158): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(253,81): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(253,121): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(253,150): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(254,84): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(254,124): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(254,156): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(255,95): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(255,135): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(255,159): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(256,84): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(256,124): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(256,150): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(259,80): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(259,120): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(259,140): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(260,81): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(260,121): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(260,141): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(261,83): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(261,123): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(261,143): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(262,80): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(262,120): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(262,140): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(263,81): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(263,121): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(263,141): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(264,80): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(264,120): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(264,142): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(267,77): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(267,118): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(267,138): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(268,83): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(268,122): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(268,142): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(269,87): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(269,129): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(269,150): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(270,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(270,130): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(270,151): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(271,91): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(271,133): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(271,154): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(273,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(273,130): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(273,151): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(274,90): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(274,132): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(274,153): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(275,92): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(275,134): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(275,155): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(276,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(276,130): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(276,151): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(277,86): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(277,127): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(277,148): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(278,99): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(278,141): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(278,163): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(279,105): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(279,147): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(279,169): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(280,116): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(280,158): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(280,181): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(281,86): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(281,143): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(281,163): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(282,76): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(282,116): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(282,136): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(283,82): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(283,123): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(283,144): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(284,95): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(284,137): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(284,158): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(285,79): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(285,117): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(285,137): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(286,90): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(286,129): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(286,149): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(287,80): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(287,119): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(287,139): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(288,87): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(288,125): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(288,146): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(289,92): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(289,130): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(289,151): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(290,93): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(290,132): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(290,154): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(291,98): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(291,138): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(291,160): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(292,85): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(292,123): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(292,143): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(293,91): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(293,129): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(293,150): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(294,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(294,126): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(294,146): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(295,94): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(295,132): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(295,153): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(296,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(296,127): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(296,148): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(297,94): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(297,133): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(297,154): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(298,105): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(298,144): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(298,166): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(299,79): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(299,119): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(299,138): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(300,80): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(300,120): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(300,139): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(301,89): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(301,128): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(301,148): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(302,86): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(302,125): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(302,145): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(303,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(303,127): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(303,147): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(304,76): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(304,117): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(304,136): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(305,82): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(305,123): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(305,145): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(306,79): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(306,120): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(306,143): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(307,81): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(307,122): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(307,145): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(308,80): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(308,120): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(308,140): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(309,82): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(309,122): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(309,142): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(310,75): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(310,115): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(310,135): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(311,80): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(311,120): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(311,144): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(312,88): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(312,128): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(312,149): error TS2304: Cannot find name 'ErrorRecoverySet'. +parserRealSource10.ts(355,52): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(356,53): error TS2304: Cannot find name 'NodeType'. +parserRealSource10.ts(449,46): error TS1011: An element access expression should take an argument. + + +==== parserRealSource10.ts (344 errors) ==== + // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. + // See LICENSE.txt in the project root for complete license information. + + /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. + + module TypeScript { + export enum TokenID { + // Keywords + Any, + Bool, + Break, + Case, + Catch, + Class, + Const, + Continue, + Debugger, + Default, + Delete, + Do, + Else, + Enum, + Export, + Extends, + Declare, + False, + Finally, + For, + Function, + Constructor, + Get, + If, + Implements, + Import, + In, + InstanceOf, + Interface, + Let, + Module, + New, + Number, + Null, + Package, + Private, + Protected, + Public, + Return, + Set, + Static, + String, + Super, + Switch, + This, + Throw, + True, + Try, + TypeOf, + Var, + Void, + With, + While, + Yield, + // Punctuation + Semicolon, + OpenParen, + CloseParen, + OpenBracket, + CloseBracket, + OpenBrace, + CloseBrace, + Comma, + Equals, + PlusEquals, + MinusEquals, + AsteriskEquals, + SlashEquals, + PercentEquals, + AmpersandEquals, + CaretEquals, + BarEquals, + LessThanLessThanEquals, + GreaterThanGreaterThanEquals, + GreaterThanGreaterThanGreaterThanEquals, + Question, + Colon, + BarBar, + AmpersandAmpersand, + Bar, + Caret, + And, + EqualsEquals, + ExclamationEquals, + EqualsEqualsEquals, + ExclamationEqualsEquals, + LessThan, + LessThanEquals, + GreaterThan, + GreaterThanEquals, + LessThanLessThan, + GreaterThanGreaterThan, + GreaterThanGreaterThanGreaterThan, + Plus, + Minus, + Asterisk, + Slash, + Percent, + Tilde, + Exclamation, + PlusPlus, + MinusMinus, + Dot, + DotDotDot, + Error, + EndOfFile, + EqualsGreaterThan, + Identifier, + StringLiteral, + RegularExpressionLiteral, + NumberLiteral, + Whitespace, + Comment, + Lim, + LimFixed = EqualsGreaterThan, + LimKeyword = Yield, + } + + export var tokenTable: any = new TokenInfo[]; + ~~~~~~~~~ +!!! error TS2449: Class 'TokenInfo' used before its declaration. +!!! related TS2728 parserRealSource10.ts:175:18: 'TokenInfo' is declared here. + +!!! error TS1011: An element access expression should take an argument. + export var nodeTypeTable: any = new string[]; + ~~~~~~ +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. + +!!! error TS1011: An element access expression should take an argument. + export var nodeTypeToTokTable: any = new number[]; + ~~~~~~ +!!! error TS2693: 'number' only refers to a type, but is being used as a value here. + +!!! error TS1011: An element access expression should take an argument. + export var noRegexTable: any = new boolean[]; + ~~~~~~~ +!!! error TS2693: 'boolean' only refers to a type, but is being used as a value here. + +!!! error TS1011: An element access expression should take an argument. + + noRegexTable[TokenID.Identifier] = true; + noRegexTable[TokenID.StringLiteral] = true; + noRegexTable[TokenID.NumberLiteral] = true; + noRegexTable[TokenID.RegularExpressionLiteral] = true; + noRegexTable[TokenID.This] = true; + noRegexTable[TokenID.PlusPlus] = true; + noRegexTable[TokenID.MinusMinus] = true; + noRegexTable[TokenID.CloseParen] = true; + noRegexTable[TokenID.CloseBracket] = true; + noRegexTable[TokenID.CloseBrace] = true; + noRegexTable[TokenID.True] = true; + noRegexTable[TokenID.False] = true; + + export enum OperatorPrecedence { + None, + Comma, + Assignment, + Conditional, + LogicalOr, + LogicalAnd, + BitwiseOr, + BitwiseExclusiveOr, + BitwiseAnd, + Equality, + Relational, + Shift, + Additive, + Multiplicative, + Unary, + Lim + } + + export enum Reservation { + None = 0, + Javascript = 1, + JavascriptFuture = 2, + TypeScript = 4, + JavascriptFutureStrict = 8, + TypeScriptAndJS = Javascript | TypeScript, + TypeScriptAndJSFuture = JavascriptFuture | TypeScript, + TypeScriptAndJSFutureStrict = JavascriptFutureStrict | TypeScript, + } + + export class TokenInfo { + constructor (public tokenId: TokenID, public reservation: Reservation, + public binopPrecedence: number, public binopNodeType: number, + public unopPrecedence: number, public unopNodeType: number, + public text: string, public ers: ErrorRecoverySet) { } + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + ~~~~~~~~~~~~~~~~ +!!! error TS4063: Parameter 'ers' of constructor from exported class has or is using private name 'ErrorRecoverySet'. + } + + function setTokenInfo(tokenId: TokenID, reservation: number, binopPrecedence: number, + binopNodeType: number, unopPrecedence: number, unopNodeType: number, + text: string, ers: ErrorRecoverySet) { + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + if (tokenId !== undefined) { + tokenTable[tokenId] = new TokenInfo(tokenId, reservation, binopPrecedence, + binopNodeType, unopPrecedence, unopNodeType, text, ers); + if (binopNodeType != NodeType.None) { + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + nodeTypeTable[binopNodeType] = text; + nodeTypeToTokTable[binopNodeType] = tokenId; + } + if (unopNodeType != NodeType.None) { + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + nodeTypeTable[unopNodeType] = text; + } + } + } + + setTokenInfo(TokenID.Any, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "any", ErrorRecoverySet.PrimType); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Bool, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "boolean", ErrorRecoverySet.PrimType); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Break, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "break", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Case, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "case", ErrorRecoverySet.SCase); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Catch, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "catch", ErrorRecoverySet.Catch); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Class, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "class", ErrorRecoverySet.TypeScriptS); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Const, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "const", ErrorRecoverySet.Var); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Continue, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "continue", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Debugger, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.Debugger, "debugger", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Default, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "default", ErrorRecoverySet.SCase); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Delete, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Delete, "delete", ErrorRecoverySet.Prefix); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Do, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "do", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Else, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "else", ErrorRecoverySet.Else); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Enum, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "enum", ErrorRecoverySet.TypeScriptS); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Export, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "export", ErrorRecoverySet.TypeScriptS); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Extends, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "extends", ErrorRecoverySet.None); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Declare, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "declare", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.False, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "false", ErrorRecoverySet.RLit); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Finally, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "finally", ErrorRecoverySet.Catch); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.For, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "for", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Function, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "function", ErrorRecoverySet.Func); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Constructor, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "constructor", ErrorRecoverySet.Func); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Get, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "get", ErrorRecoverySet.Func); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Set, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "set", ErrorRecoverySet.Func); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.If, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "if", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Implements, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "implements", ErrorRecoverySet.None); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Import, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "import", ErrorRecoverySet.TypeScriptS); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.In, Reservation.TypeScriptAndJS, OperatorPrecedence.Relational, NodeType.In, OperatorPrecedence.None, NodeType.None, "in", ErrorRecoverySet.None); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.InstanceOf, Reservation.TypeScriptAndJS, OperatorPrecedence.Relational, NodeType.InstOf, OperatorPrecedence.None, NodeType.None, "instanceof", ErrorRecoverySet.BinOp); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Interface, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "interface", ErrorRecoverySet.TypeScriptS); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Let, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "let", ErrorRecoverySet.None); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Module, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "module", ErrorRecoverySet.TypeScriptS); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.New, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "new", ErrorRecoverySet.PreOp); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Number, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "number", ErrorRecoverySet.PrimType); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Null, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "null", ErrorRecoverySet.RLit); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Package, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "package", ErrorRecoverySet.None); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Private, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "private", ErrorRecoverySet.TypeScriptS); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Protected, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "protected", ErrorRecoverySet.None); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Public, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "public", ErrorRecoverySet.TypeScriptS); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Return, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "return", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Static, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "static", ErrorRecoverySet.None); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.String, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "string", ErrorRecoverySet.PrimType); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Super, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "super", ErrorRecoverySet.RLit); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Switch, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "switch", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.This, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "this", ErrorRecoverySet.RLit); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Throw, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "throw", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.True, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "true", ErrorRecoverySet.RLit); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Try, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "try", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.TypeOf, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Typeof, "typeof", ErrorRecoverySet.Prefix); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Var, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "var", ErrorRecoverySet.Var); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Void, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Void, "void", ErrorRecoverySet.Prefix); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.With, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.With, "with", ErrorRecoverySet.Stmt); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.While, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "while", ErrorRecoverySet.While); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Yield, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "yield", ErrorRecoverySet.None); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + + setTokenInfo(TokenID.Identifier, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "identifier", ErrorRecoverySet.ID); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.NumberLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "numberLiteral", ErrorRecoverySet.Literal); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.RegularExpressionLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "regex", ErrorRecoverySet.RegExp); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.StringLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "qstring", ErrorRecoverySet.Literal); + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + + // Non-operator non-identifier tokens + setTokenInfo(TokenID.Semicolon, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ";", ErrorRecoverySet.SColon); // ; + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.CloseParen, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ")", ErrorRecoverySet.RParen); // ) + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.CloseBracket, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "]", ErrorRecoverySet.RBrack); // ] + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.OpenBrace, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "{", ErrorRecoverySet.LCurly); // { + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.CloseBrace, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "}", ErrorRecoverySet.RCurly); // } + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.DotDotDot, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "...", ErrorRecoverySet.None); // ... + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + + // Operator non-identifier tokens + setTokenInfo(TokenID.Comma, Reservation.None, OperatorPrecedence.Comma, NodeType.Comma, OperatorPrecedence.None, NodeType.None, ",", ErrorRecoverySet.Comma); // , + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Equals, Reservation.None, OperatorPrecedence.Assignment, NodeType.Asg, OperatorPrecedence.None, NodeType.None, "=", ErrorRecoverySet.Asg); // = + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.PlusEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgAdd, OperatorPrecedence.None, NodeType.None, "+=", ErrorRecoverySet.BinOp); // += + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.MinusEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgSub, OperatorPrecedence.None, NodeType.None, "-=", ErrorRecoverySet.BinOp); // -= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.AsteriskEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgMul, OperatorPrecedence.None, NodeType.None, "*=", ErrorRecoverySet.BinOp); // *= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + + setTokenInfo(TokenID.SlashEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgDiv, OperatorPrecedence.None, NodeType.None, "/=", ErrorRecoverySet.BinOp); // /= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.PercentEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgMod, OperatorPrecedence.None, NodeType.None, "%=", ErrorRecoverySet.BinOp); // %= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.AmpersandEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgAnd, OperatorPrecedence.None, NodeType.None, "&=", ErrorRecoverySet.BinOp); // &= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.CaretEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgXor, OperatorPrecedence.None, NodeType.None, "^=", ErrorRecoverySet.BinOp); // ^= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.BarEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgOr, OperatorPrecedence.None, NodeType.None, "|=", ErrorRecoverySet.BinOp); // |= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.LessThanLessThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgLsh, OperatorPrecedence.None, NodeType.None, "<<=", ErrorRecoverySet.BinOp); // <<= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.GreaterThanGreaterThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgRsh, OperatorPrecedence.None, NodeType.None, ">>=", ErrorRecoverySet.BinOp); // >>= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.GreaterThanGreaterThanGreaterThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgRs2, OperatorPrecedence.None, NodeType.None, ">>>=", ErrorRecoverySet.BinOp); // >>>= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Question, Reservation.None, OperatorPrecedence.Conditional, NodeType.ConditionalExpression, OperatorPrecedence.None, NodeType.None, "?", ErrorRecoverySet.BinOp); // ? + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Colon, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ":", ErrorRecoverySet.Colon); // : + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.BarBar, Reservation.None, OperatorPrecedence.LogicalOr, NodeType.LogOr, OperatorPrecedence.None, NodeType.None, "||", ErrorRecoverySet.BinOp); // || + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.AmpersandAmpersand, Reservation.None, OperatorPrecedence.LogicalAnd, NodeType.LogAnd, OperatorPrecedence.None, NodeType.None, "&&", ErrorRecoverySet.BinOp); // && + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Bar, Reservation.None, OperatorPrecedence.BitwiseOr, NodeType.Or, OperatorPrecedence.None, NodeType.None, "|", ErrorRecoverySet.BinOp); // | + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Caret, Reservation.None, OperatorPrecedence.BitwiseExclusiveOr, NodeType.Xor, OperatorPrecedence.None, NodeType.None, "^", ErrorRecoverySet.BinOp); // ^ + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.And, Reservation.None, OperatorPrecedence.BitwiseAnd, NodeType.And, OperatorPrecedence.None, NodeType.None, "&", ErrorRecoverySet.BinOp); // & + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.EqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Eq, OperatorPrecedence.None, NodeType.None, "==", ErrorRecoverySet.BinOp); // == + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.ExclamationEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Ne, OperatorPrecedence.None, NodeType.None, "!=", ErrorRecoverySet.BinOp); // != + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.EqualsEqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Eqv, OperatorPrecedence.None, NodeType.None, "===", ErrorRecoverySet.BinOp); // === + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.ExclamationEqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.NEqv, OperatorPrecedence.None, NodeType.None, "!==", ErrorRecoverySet.BinOp); // !== + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.LessThan, Reservation.None, OperatorPrecedence.Relational, NodeType.Lt, OperatorPrecedence.None, NodeType.None, "<", ErrorRecoverySet.BinOp); // < + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.LessThanEquals, Reservation.None, OperatorPrecedence.Relational, NodeType.Le, OperatorPrecedence.None, NodeType.None, "<=", ErrorRecoverySet.BinOp); // <= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.GreaterThan, Reservation.None, OperatorPrecedence.Relational, NodeType.Gt, OperatorPrecedence.None, NodeType.None, ">", ErrorRecoverySet.BinOp); // > + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.GreaterThanEquals, Reservation.None, OperatorPrecedence.Relational, NodeType.Ge, OperatorPrecedence.None, NodeType.None, ">=", ErrorRecoverySet.BinOp); // >= + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.LessThanLessThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Lsh, OperatorPrecedence.None, NodeType.None, "<<", ErrorRecoverySet.BinOp); // << + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.GreaterThanGreaterThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Rsh, OperatorPrecedence.None, NodeType.None, ">>", ErrorRecoverySet.BinOp); // >> + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.GreaterThanGreaterThanGreaterThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Rs2, OperatorPrecedence.None, NodeType.None, ">>>", ErrorRecoverySet.BinOp); // >>> + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Plus, Reservation.None, OperatorPrecedence.Additive, NodeType.Add, OperatorPrecedence.Unary, NodeType.Pos, "+", ErrorRecoverySet.AddOp); // + + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Minus, Reservation.None, OperatorPrecedence.Additive, NodeType.Sub, OperatorPrecedence.Unary, NodeType.Neg, "-", ErrorRecoverySet.AddOp); // - + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Asterisk, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Mul, OperatorPrecedence.None, NodeType.None, "*", ErrorRecoverySet.BinOp); // * + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Slash, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Div, OperatorPrecedence.None, NodeType.None, "/", ErrorRecoverySet.BinOp); // / + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Percent, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Mod, OperatorPrecedence.None, NodeType.None, "%", ErrorRecoverySet.BinOp); // % + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Tilde, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Not, "~", ErrorRecoverySet.PreOp); // ~ + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Exclamation, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.LogNot, "!", ErrorRecoverySet.PreOp); // ! + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.PlusPlus, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.IncPre, "++", ErrorRecoverySet.PreOp); // ++ + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.MinusMinus, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.DecPre, "--", ErrorRecoverySet.PreOp); // -- + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.OpenParen, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "(", ErrorRecoverySet.LParen); // ( + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.OpenBracket, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "[", ErrorRecoverySet.LBrack); // [ + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.Dot, Reservation.None, OperatorPrecedence.Unary, NodeType.None, OperatorPrecedence.None, NodeType.None, ".", ErrorRecoverySet.Dot); // . + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.EndOfFile, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "", ErrorRecoverySet.EOF); // EOF + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + setTokenInfo(TokenID.EqualsGreaterThan, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "=>", ErrorRecoverySet.None); // => + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + ~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'ErrorRecoverySet'. + + export function lookupToken(tokenId: TokenID): TokenInfo { + return tokenTable[tokenId]; + } + + export enum TokenClass { + Punctuation, + Keyword, + Operator, + Comment, + Whitespace, + Identifier, + Literal, + } + + export class SavedToken { + constructor (public tok: Token, public minChar: number, public limChar: number) { } + } + + export class Token { + constructor (public tokenId: TokenID) { + } + + public toString(): string { + return "token: " + this.tokenId + " " + this.getText() + " (" + (TokenID)._map[this.tokenId] + ")"; + } + + public print(line: number, outfile: any): void { + outfile.WriteLine(this.toString() + ",on line" + line); + } + + public getText(): string { + return tokenTable[this.tokenId].text; + } + + public classification(): TokenClass { + if (this.tokenId <= TokenID.LimKeyword) { + return TokenClass.Keyword; + } + else { + var tokenInfo = lookupToken(this.tokenId); + if (tokenInfo != undefined) { + if ((tokenInfo.unopNodeType != NodeType.None) || + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + (tokenInfo.binopNodeType != NodeType.None)) { + ~~~~~~~~ +!!! error TS2304: Cannot find name 'NodeType'. + return TokenClass.Operator; + } + } + } + + return TokenClass.Punctuation; + } + } + + export class NumberLiteralToken extends Token { + constructor (public value: number, public hasEmptyFraction?: boolean) { + super(TokenID.NumberLiteral); + } + + public getText(): string { + return this.hasEmptyFraction ? this.value.toString() + ".0" : this.value.toString(); + } + + public classification(): TokenClass { + return TokenClass.Literal; + } + } + + export class StringLiteralToken extends Token { + constructor (public value: string) { + super(TokenID.StringLiteral); + } + + public getText(): string { + return this.value; + } + + public classification(): TokenClass { + return TokenClass.Literal; + } + } + + export class IdentifierToken extends Token { + constructor (public value: string, public hasEscapeSequence : boolean) { + super(TokenID.Identifier); + } + public getText(): string { + return this.value; + } + public classification(): TokenClass { + return TokenClass.Identifier; + } + } + + export class WhitespaceToken extends Token { + constructor (tokenId: TokenID, public value: string) { + super(tokenId); + } + + public getText(): string { + return this.value; + } + + public classification(): TokenClass { + return TokenClass.Whitespace; + } + } + + export class CommentToken extends Token { + constructor (tokenID: TokenID, public value: string, public isBlock: boolean, public startPos: number, public line: number, public endsLine: boolean) { + super(tokenID); + } + + public getText(): string { + return this.value; + } + + public classification(): TokenClass { + return TokenClass.Comment; + } + } + + export class RegularExpressionLiteralToken extends Token { + constructor(public regex: any) { + super(TokenID.RegularExpressionLiteral); + } + + public getText(): string { + return this.regex.toString(); + } + + public classification(): TokenClass { + return TokenClass.Literal; + } + } + + // TODO: new with length TokenID.LimFixed + export var staticTokens: any = new Token[]; + +!!! error TS1011: An element access expression should take an argument. + export function initializeStaticTokens(): void { + for (var i = 0; i <= TokenID.LimFixed; i++) { + staticTokens[i] = new Token(i); + } + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource14.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource14.d.ts new file mode 100644 index 0000000000000..14cb2847ec661 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource14.d.ts @@ -0,0 +1,1731 @@ +//// [tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts] //// + +//// [parserRealSource14.ts] +// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. +// See LICENSE.txt in the project root for complete license information. + +/// + +module TypeScript { + export function lastOf(items: any[]): any { + return (items === null || items.length === 0) ? null : items[items.length - 1]; + } + + export function max(a: number, b: number): number { + return a >= b ? a : b; + } + + export function min(a: number, b: number): number { + return a <= b ? a : b; + } + + // + // Helper class representing a path from a root ast node to a (grand)child ast node. + // This is helpful as our tree don't have parents. + // + export class AstPath { + public asts: TypeScript.AST[] = []; + public top: number = -1; + + static reverseIndexOf(items: any[], index: number): any { + return (items === null || items.length <= index) ? null : items[items.length - index - 1]; + } + + public clone(): AstPath { + var clone = new AstPath(); + clone.asts = this.asts.map((value) => { return value; }); + clone.top = this.top; + return clone; + } + + public pop(): TypeScript.AST { + var head = this.ast(); + this.up(); + + while (this.asts.length > this.count()) { + this.asts.pop(); + } + return head; + } + + public push(ast: TypeScript.AST): void { + while (this.asts.length > this.count()) { + this.asts.pop(); + } + this.top = this.asts.length; + this.asts.push(ast); + } + + public up(): void { + if (this.top <= -1) + throw new Error("Invalid call to 'up'"); + this.top--; + } + + public down(): void { + if (this.top == this.ast.length - 1) + throw new Error("Invalid call to 'down'"); + this.top++; + } + + public nodeType(): TypeScript.NodeType { + if (this.ast() == null) + return TypeScript.NodeType.None; + return this.ast().nodeType; + } + + public ast(): TypeScript.AST { + return AstPath.reverseIndexOf(this.asts, this.asts.length - (this.top + 1)); + } + + public parent(): TypeScript.AST { + return AstPath.reverseIndexOf(this.asts, this.asts.length - this.top); + } + + public count(): number { + return this.top + 1; + } + + public get(index: number): TypeScript.AST { + return this.asts[index]; + } + + public isNameOfClass(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + (this.parent().nodeType === TypeScript.NodeType.ClassDeclaration) && + ((this.parent()).name === this.ast()); + } + + public isNameOfInterface(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + (this.parent().nodeType === TypeScript.NodeType.InterfaceDeclaration) && + ((this.parent()).name === this.ast()); + } + + public isNameOfArgument(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + (this.parent().nodeType === TypeScript.NodeType.ArgDecl) && + ((this.parent()).id === this.ast()); + } + + public isNameOfVariable(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + (this.parent().nodeType === TypeScript.NodeType.VarDecl) && + ((this.parent()).id === this.ast()); + } + + public isNameOfModule(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + (this.parent().nodeType === TypeScript.NodeType.ModuleDeclaration) && + ((this.parent()).name === this.ast()); + } + + public isNameOfFunction(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + (this.parent().nodeType === TypeScript.NodeType.FuncDecl) && + ((this.parent()).name === this.ast()); + } + + public isChildOfScript(): boolean { + var ast = lastOf(this.asts); + return this.count() >= 3 && + this.asts[this.top] === ast && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.Script; + } + + public isChildOfModule(): boolean { + var ast = lastOf(this.asts); + return this.count() >= 3 && + this.asts[this.top] === ast && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.ModuleDeclaration; + } + + public isChildOfClass(): boolean { + var ast = lastOf(this.asts); + return this.count() >= 3 && + this.asts[this.top] === ast && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.ClassDeclaration; + } + + public isArgumentOfClassConstructor(): boolean { + var ast = lastOf(this.asts); + return this.count() >= 5 && + this.asts[this.top] === ast && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && + this.asts[this.top - 3].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 4].nodeType === TypeScript.NodeType.ClassDeclaration && + ((this.asts[this.top - 2]).isConstructor) && + ((this.asts[this.top - 2]).arguments === this.asts[this.top - 1]) && + ((this.asts[this.top - 4]).constructorDecl === this.asts[this.top - 2]); + } + + public isChildOfInterface(): boolean { + var ast = lastOf(this.asts); + return this.count() >= 3 && + this.asts[this.top] === ast && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.InterfaceDeclaration; + } + + public isTopLevelImplicitModule(): any { + return this.count() >= 1 && + this.asts[this.top].nodeType === TypeScript.NodeType.ModuleDeclaration && + TypeScript.hasFlag((this.asts[this.top]).modFlags, TypeScript.ModuleFlags.IsWholeFile); + } + + public isBodyOfTopLevelImplicitModule(): any { + return this.count() >= 2 && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && + (this.asts[this.top - 1]).members == this.asts[this.top - 0] && + TypeScript.hasFlag((this.asts[this.top - 1]).modFlags, TypeScript.ModuleFlags.IsWholeFile); + } + + public isBodyOfScript(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Script && + (this.asts[this.top - 1]).bod == this.asts[this.top - 0]; + } + + public isBodyOfSwitch(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Switch && + (this.asts[this.top - 1]).caseList == this.asts[this.top - 0]; + } + + public isBodyOfModule(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && + (this.asts[this.top - 1]).members == this.asts[this.top - 0]; + } + + public isBodyOfClass(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ClassDeclaration && + (this.asts[this.top - 1]).members == this.asts[this.top - 0]; + } + + public isBodyOfFunction(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && + (this.asts[this.top - 1]).bod == this.asts[this.top - 0]; + } + + public isBodyOfInterface(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.InterfaceDeclaration && + (this.asts[this.top - 1]).members == this.asts[this.top - 0]; + } + + public isBodyOfBlock(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Block && + (this.asts[this.top - 1]).statements == this.asts[this.top - 0]; + } + + public isBodyOfFor(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.For && + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + } + + public isBodyOfCase(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Case && + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + } + + public isBodyOfTry(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Try && + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + } + + public isBodyOfCatch(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Catch && + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + } + + public isBodyOfDoWhile(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.DoWhile && + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + } + + public isBodyOfWhile(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.While && + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + } + + public isBodyOfForIn(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ForIn && + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + } + + public isBodyOfWith(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.With && + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + } + + public isBodyOfFinally(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Finally && + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + } + + public isCaseOfSwitch(): boolean { + return this.count() >= 3 && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + (this.asts[this.top - 2]).caseList == this.asts[this.top - 1]; + } + + public isDefaultCaseOfSwitch(): boolean { + return this.count() >= 3 && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + (this.asts[this.top - 2]).caseList == this.asts[this.top - 1] && + (this.asts[this.top - 2]).defaultCase == this.asts[this.top - 0]; + } + + public isListOfObjectLit(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + (this.asts[this.top - 1]).operand == this.asts[this.top - 0]; + } + + public isBodyOfObjectLit(): boolean { + return this.isListOfObjectLit(); + } + + public isEmptyListOfObjectLit(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + (this.asts[this.top - 1]).operand == this.asts[this.top - 0] && + (this.asts[this.top - 0]).members.length == 0; + } + + public isMemberOfObjectLit(): boolean { + return this.count() >= 3 && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.ObjectLit && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.Member && + (this.asts[this.top - 2]).operand == this.asts[this.top - 1]; + } + + public isNameOfMemberOfObjectLit(): boolean { + return this.count() >= 4 && + this.asts[this.top - 3].nodeType === TypeScript.NodeType.ObjectLit && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.Name && + (this.asts[this.top - 3]).operand == this.asts[this.top - 2]; + } + + public isListOfArrayLit(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ArrayLit && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + (this.asts[this.top - 1]).operand == this.asts[this.top - 0]; + } + + public isTargetOfMember(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && + (this.asts[this.top - 1]).operand1 === this.asts[this.top - 0]; + } + + public isMemberOfMember(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && + (this.asts[this.top - 1]).operand2 === this.asts[this.top - 0]; + } + + public isItemOfList(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List; + //(this.asts[this.top - 1]).operand2 === this.asts[this.top - 0]; + } + + public isThenOfIf(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && + (this.asts[this.top - 1]).thenBod == this.asts[this.top - 0]; + } + + public isElseOfIf(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && + (this.asts[this.top - 1]).elseBod == this.asts[this.top - 0]; + } + + public isBodyOfDefaultCase(): boolean { + return this.isBodyOfCase(); + } + + public isSingleStatementList(): boolean { + return this.count() >= 1 && + this.asts[this.top].nodeType === TypeScript.NodeType.List && + (this.asts[this.top]).members.length === 1; + } + + public isArgumentListOfFunction(): boolean { + return this.count() >= 2 && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && + (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; + } + + public isArgumentOfFunction(): boolean { + return this.count() >= 3 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && + (this.asts[this.top - 2]).arguments === this.asts[this.top - 1]; + } + + public isArgumentListOfCall(): boolean { + return this.count() >= 2 && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Call && + (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; + } + + public isArgumentListOfNew(): boolean { + return this.count() >= 2 && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.New && + (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; + } + + public isSynthesizedBlock(): boolean { + return this.count() >= 1 && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.Block && + (this.asts[this.top - 0]).isStatementBlock === false; + } + } + + export function isValidAstNode(ast: TypeScript.ASTSpan): boolean { + if (ast === null) + return false; + + if (ast.minChar === -1 || ast.limChar === -1) + return false; + + return true; + } + + export class AstPathContext { + public path: AstPath = new TypeScript.AstPath(); + } + + export enum GetAstPathOptions { + Default = 0, + EdgeInclusive = 1, + //We need this options dealing with an AST coming from an incomplete AST. For example: + // class foo { // r + // If we ask for the AST at the position after the "r" character, we won't see we are + // inside a comment, because the "class" AST node has a limChar corresponding to the position of + // the "{" character, meaning we don't traverse the tree down to the stmt list of the class, meaning + // we don't find the "precomment" attached to the errorneous empty stmt. + //TODO: It would be nice to be able to get rid of this. + DontPruneSearchBasedOnPosition = 1 << 1, + } + + /// + /// Return the stack of AST nodes containing "position" + /// + export function getAstPathToPosition(script: TypeScript.AST, pos: number, options: GetAstPathOptions = GetAstPathOptions.Default): TypeScript.AstPath { + var lookInComments = (comments: TypeScript.Comment[]) => { + if (comments && comments.length > 0) { + for (var i = 0; i < comments.length; i++) { + var minChar = comments[i].minChar; + var limChar = comments[i].limChar; + if (!comments[i].isBlockComment) { + limChar++; // For single line comments, include 1 more character (for the newline) + } + if (pos >= minChar && pos < limChar) { + ctx.path.push(comments[i]); + } + } + } + } + + var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: IAstWalker) { + if (isValidAstNode(cur)) { + + // Add "cur" to the stack if it contains our position + // For "identifier" nodes, we need a special case: A position equal to "limChar" is + // valid, since the position corresponds to a caret position (in between characters) + // For example: + // bar + // 0123 + // If "position == 3", the caret is at the "right" of the "r" character, which should be considered valid + var inclusive = + hasFlag(options, GetAstPathOptions.EdgeInclusive) || + cur.nodeType === TypeScript.NodeType.Name || + pos === script.limChar; // Special "EOF" case + + var minChar = cur.minChar; + var limChar = cur.limChar + (inclusive ? 1 : 0) + if (pos >= minChar && pos < limChar) { + + // TODO: Since AST is sometimes not correct wrt to position, only add "cur" if it's better + // than top of the stack. + var previous = ctx.path.ast(); + if (previous == null || (cur.minChar >= previous.minChar && cur.limChar <= previous.limChar)) { + ctx.path.push(cur); + } + else { + //logger.log("TODO: Ignoring node because minChar, limChar not better than previous node in stack"); + } + } + + // The AST walker skips comments, but we might be in one, so check the pre/post comments for this node manually + if (pos < limChar) { + lookInComments(cur.preComments); + } + if (pos >= minChar) { + lookInComments(cur.postComments); + } + + if (!hasFlag(options, GetAstPathOptions.DontPruneSearchBasedOnPosition)) { + // Don't go further down the tree if pos is outside of [minChar, limChar] + walker.options.goChildren = (minChar <= pos && pos <= limChar); + } + } + return cur; + } + + var ctx = new AstPathContext(); + TypeScript.getAstWalkerFactory().walk(script, pre, null, null, ctx); + return ctx.path; + } + + // + // Find a source text offset that is safe for lexing tokens at the given position. + // This is used when "position" might be inside a comment or string, etc. + // + export function getTokenizationOffset(script: TypeScript.Script, position: number): number { + var bestOffset = 0; + var pre = (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker): TypeScript.AST => { + if (TypeScript.isValidAstNode(cur)) { + // Did we find a closer offset? + if (cur.minChar <= position) { + bestOffset = max(bestOffset, cur.minChar); + } + + // Stop the walk if this node is not related to "minChar" + if (cur.minChar > position || cur.limChar < bestOffset) { + walker.options.goChildren = false; + } + } + + return cur; + } + + TypeScript.getAstWalkerFactory().walk(script, pre); + return bestOffset; + } + + /// + /// Simple function to Walk an AST using a simple callback function. + /// + export function walkAST(ast: TypeScript.AST, callback: (path: AstPath, walker: TypeScript.IAstWalker) => void ): void { + var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) { + var path: TypeScript.AstPath = walker.state; + path.push(cur); + callback(path, walker); + return cur; + } + var post = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) { + var path: TypeScript.AstPath = walker.state; + path.pop(); + return cur; + } + + var path = new AstPath(); + TypeScript.getAstWalkerFactory().walk(ast, pre, post, null, path); + } +} + + +/// [Declarations] //// + + + +//// [/.src/parserRealSource14.d.ts] +declare namespace TypeScript { + function lastOf(items: any[]): any; + function max(a: number, b: number): number; + function min(a: number, b: number): number; + class AstPath { + asts: TypeScript.AST[]; + top: number; + static reverseIndexOf(items: any[], index: number): any; + clone(): AstPath; + pop(): TypeScript.AST; + push(ast: TypeScript.AST): void; + up(): void; + down(): void; + nodeType(): TypeScript.NodeType; + ast(): TypeScript.AST; + parent(): TypeScript.AST; + count(): number; + get(index: number): TypeScript.AST; + isNameOfClass(): boolean; + isNameOfInterface(): boolean; + isNameOfArgument(): boolean; + isNameOfVariable(): boolean; + isNameOfModule(): boolean; + isNameOfFunction(): boolean; + isChildOfScript(): boolean; + isChildOfModule(): boolean; + isChildOfClass(): boolean; + isArgumentOfClassConstructor(): boolean; + isChildOfInterface(): boolean; + isTopLevelImplicitModule(): any; + isBodyOfTopLevelImplicitModule(): any; + isBodyOfScript(): boolean; + isBodyOfSwitch(): boolean; + isBodyOfModule(): boolean; + isBodyOfClass(): boolean; + isBodyOfFunction(): boolean; + isBodyOfInterface(): boolean; + isBodyOfBlock(): boolean; + isBodyOfFor(): boolean; + isBodyOfCase(): boolean; + isBodyOfTry(): boolean; + isBodyOfCatch(): boolean; + isBodyOfDoWhile(): boolean; + isBodyOfWhile(): boolean; + isBodyOfForIn(): boolean; + isBodyOfWith(): boolean; + isBodyOfFinally(): boolean; + isCaseOfSwitch(): boolean; + isDefaultCaseOfSwitch(): boolean; + isListOfObjectLit(): boolean; + isBodyOfObjectLit(): boolean; + isEmptyListOfObjectLit(): boolean; + isMemberOfObjectLit(): boolean; + isNameOfMemberOfObjectLit(): boolean; + isListOfArrayLit(): boolean; + isTargetOfMember(): boolean; + isMemberOfMember(): boolean; + isItemOfList(): boolean; + isThenOfIf(): boolean; + isElseOfIf(): boolean; + isBodyOfDefaultCase(): boolean; + isSingleStatementList(): boolean; + isArgumentListOfFunction(): boolean; + isArgumentOfFunction(): boolean; + isArgumentListOfCall(): boolean; + isArgumentListOfNew(): boolean; + isSynthesizedBlock(): boolean; + } + function isValidAstNode(ast: TypeScript.ASTSpan): boolean; + class AstPathContext { + path: AstPath; + } + enum GetAstPathOptions { + Default = 0, + EdgeInclusive = 1, + DontPruneSearchBasedOnPosition = 2 + } + function getAstPathToPosition(script: TypeScript.AST, pos: number, options?: GetAstPathOptions): TypeScript.AstPath; + function getTokenizationOffset(script: TypeScript.Script, position: number): number; + function walkAST(ast: TypeScript.AST, callback: (path: AstPath, walker: TypeScript.IAstWalker) => void): void; +} +/// [Errors] //// + +parserRealSource14.ts(4,21): error TS6053: File 'typescript.ts' not found. +parserRealSource14.ts(24,33): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(38,34): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(48,37): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(68,39): error TS2694: Namespace 'TypeScript' has no exported member 'NodeType'. +parserRealSource14.ts(70,35): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(74,34): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(75,32): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(78,37): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(79,32): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(86,47): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(94,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(95,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(96,31): error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. +parserRealSource14.ts(103,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(104,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(105,31): error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. +parserRealSource14.ts(112,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(113,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(114,31): error TS2694: Namespace 'TypeScript' has no exported member 'ArgDecl'. +parserRealSource14.ts(121,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(122,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(123,31): error TS2694: Namespace 'TypeScript' has no exported member 'VarDecl'. +parserRealSource14.ts(130,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(131,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(132,31): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. +parserRealSource14.ts(139,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(140,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(141,31): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. +parserRealSource14.ts(148,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(149,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(156,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(157,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(164,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(165,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(172,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(173,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(174,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(175,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(176,31): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. +parserRealSource14.ts(177,31): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. +parserRealSource14.ts(178,31): error TS2694: Namespace 'TypeScript' has no exported member 'ClassDeclaration'. +parserRealSource14.ts(185,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(186,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(191,61): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(192,28): error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(192,49): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. +parserRealSource14.ts(192,109): error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(197,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(198,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(199,31): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. +parserRealSource14.ts(200,28): error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(200,49): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. +parserRealSource14.ts(200,113): error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(205,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(206,31): error TS2694: Namespace 'TypeScript' has no exported member 'Script'. +parserRealSource14.ts(211,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(212,31): error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. +parserRealSource14.ts(217,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(218,31): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. +parserRealSource14.ts(223,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(224,31): error TS2694: Namespace 'TypeScript' has no exported member 'ClassDeclaration'. +parserRealSource14.ts(229,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(230,31): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. +parserRealSource14.ts(235,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(236,31): error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. +parserRealSource14.ts(241,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(242,30): error TS2694: Namespace 'TypeScript' has no exported member 'Block'. +parserRealSource14.ts(247,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(248,30): error TS2694: Namespace 'TypeScript' has no exported member 'ForStatement'. +parserRealSource14.ts(253,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(254,30): error TS2694: Namespace 'TypeScript' has no exported member 'CaseStatement'. +parserRealSource14.ts(259,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(260,30): error TS2694: Namespace 'TypeScript' has no exported member 'Try'. +parserRealSource14.ts(265,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(266,30): error TS2694: Namespace 'TypeScript' has no exported member 'Catch'. +parserRealSource14.ts(271,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(272,30): error TS2694: Namespace 'TypeScript' has no exported member 'DoWhileStatement'. +parserRealSource14.ts(277,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(278,30): error TS2694: Namespace 'TypeScript' has no exported member 'WhileStatement'. +parserRealSource14.ts(283,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(284,30): error TS2694: Namespace 'TypeScript' has no exported member 'ForInStatement'. +parserRealSource14.ts(289,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(290,30): error TS2694: Namespace 'TypeScript' has no exported member 'WithStatement'. +parserRealSource14.ts(295,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(296,30): error TS2694: Namespace 'TypeScript' has no exported member 'Finally'. +parserRealSource14.ts(301,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(302,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(303,30): error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. +parserRealSource14.ts(308,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(309,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(310,30): error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. +parserRealSource14.ts(311,30): error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. +parserRealSource14.ts(316,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(317,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(318,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. +parserRealSource14.ts(327,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(328,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(329,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. +parserRealSource14.ts(330,30): error TS2694: Namespace 'TypeScript' has no exported member 'ASTList'. +parserRealSource14.ts(335,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(336,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(337,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(338,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. +parserRealSource14.ts(343,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(344,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(345,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(346,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(347,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. +parserRealSource14.ts(352,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(353,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(354,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. +parserRealSource14.ts(359,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(360,30): error TS2694: Namespace 'TypeScript' has no exported member 'BinaryExpression'. +parserRealSource14.ts(365,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(366,30): error TS2694: Namespace 'TypeScript' has no exported member 'BinaryExpression'. +parserRealSource14.ts(371,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(377,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(378,30): error TS2694: Namespace 'TypeScript' has no exported member 'IfStatement'. +parserRealSource14.ts(383,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(384,30): error TS2694: Namespace 'TypeScript' has no exported member 'IfStatement'. +parserRealSource14.ts(393,61): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(394,30): error TS2694: Namespace 'TypeScript' has no exported member 'ASTList'. +parserRealSource14.ts(399,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(400,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(401,30): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. +parserRealSource14.ts(406,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(407,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(408,30): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. +parserRealSource14.ts(413,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(414,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(415,30): error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'. +parserRealSource14.ts(420,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(421,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(422,30): error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'. +parserRealSource14.ts(427,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(428,30): error TS2694: Namespace 'TypeScript' has no exported member 'Block'. +parserRealSource14.ts(432,52): error TS2694: Namespace 'TypeScript' has no exported member 'ASTSpan'. +parserRealSource14.ts(462,61): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(463,52): error TS2694: Namespace 'TypeScript' has no exported member 'Comment'. +parserRealSource14.ts(478,45): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(478,69): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(478,82): error TS2304: Cannot find name 'IAstWalker'. +parserRealSource14.ts(489,21): error TS2304: Cannot find name 'hasFlag'. +parserRealSource14.ts(490,49): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(516,22): error TS2304: Cannot find name 'hasFlag'. +parserRealSource14.ts(525,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(533,62): error TS2694: Namespace 'TypeScript' has no exported member 'Script'. +parserRealSource14.ts(535,36): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(535,60): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(535,84): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. +parserRealSource14.ts(535,108): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(551,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. +parserRealSource14.ts(558,45): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(558,95): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. +parserRealSource14.ts(559,45): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(559,69): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(559,93): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. +parserRealSource14.ts(565,46): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(565,70): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. +parserRealSource14.ts(565,94): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. +parserRealSource14.ts(572,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. + + +==== parserRealSource14.ts (162 errors) ==== + // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. + // See LICENSE.txt in the project root for complete license information. + + /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. + + module TypeScript { + export function lastOf(items: any[]): any { + return (items === null || items.length === 0) ? null : items[items.length - 1]; + } + + export function max(a: number, b: number): number { + return a >= b ? a : b; + } + + export function min(a: number, b: number): number { + return a <= b ? a : b; + } + + // + // Helper class representing a path from a root ast node to a (grand)child ast node. + // This is helpful as our tree don't have parents. + // + export class AstPath { + public asts: TypeScript.AST[] = []; + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + public top: number = -1; + + static reverseIndexOf(items: any[], index: number): any { + return (items === null || items.length <= index) ? null : items[items.length - index - 1]; + } + + public clone(): AstPath { + var clone = new AstPath(); + clone.asts = this.asts.map((value) => { return value; }); + clone.top = this.top; + return clone; + } + + public pop(): TypeScript.AST { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + var head = this.ast(); + this.up(); + + while (this.asts.length > this.count()) { + this.asts.pop(); + } + return head; + } + + public push(ast: TypeScript.AST): void { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + while (this.asts.length > this.count()) { + this.asts.pop(); + } + this.top = this.asts.length; + this.asts.push(ast); + } + + public up(): void { + if (this.top <= -1) + throw new Error("Invalid call to 'up'"); + this.top--; + } + + public down(): void { + if (this.top == this.ast.length - 1) + throw new Error("Invalid call to 'down'"); + this.top++; + } + + public nodeType(): TypeScript.NodeType { + ~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'NodeType'. + if (this.ast() == null) + return TypeScript.NodeType.None; + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + return this.ast().nodeType; + } + + public ast(): TypeScript.AST { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + return AstPath.reverseIndexOf(this.asts, this.asts.length - (this.top + 1)); + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + } + + public parent(): TypeScript.AST { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + return AstPath.reverseIndexOf(this.asts, this.asts.length - this.top); + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + } + + public count(): number { + return this.top + 1; + } + + public get(index: number): TypeScript.AST { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + return this.asts[index]; + } + + public isNameOfClass(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.parent().nodeType === TypeScript.NodeType.ClassDeclaration) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + ((this.parent()).name === this.ast()); + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. + } + + public isNameOfInterface(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.parent().nodeType === TypeScript.NodeType.InterfaceDeclaration) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + ((this.parent()).name === this.ast()); + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. + } + + public isNameOfArgument(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.parent().nodeType === TypeScript.NodeType.ArgDecl) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + ((this.parent()).id === this.ast()); + ~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ArgDecl'. + } + + public isNameOfVariable(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.parent().nodeType === TypeScript.NodeType.VarDecl) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + ((this.parent()).id === this.ast()); + ~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'VarDecl'. + } + + public isNameOfModule(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.parent().nodeType === TypeScript.NodeType.ModuleDeclaration) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + ((this.parent()).name === this.ast()); + ~~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. + } + + public isNameOfFunction(): boolean { + if (this.ast() === null || this.parent() === null) + return false; + + return (this.ast().nodeType === TypeScript.NodeType.Name) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.parent().nodeType === TypeScript.NodeType.FuncDecl) && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + ((this.parent()).name === this.ast()); + ~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. + } + + public isChildOfScript(): boolean { + var ast = lastOf(this.asts); + return this.count() >= 3 && + this.asts[this.top] === ast && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 2].nodeType === TypeScript.NodeType.Script; + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + } + + public isChildOfModule(): boolean { + var ast = lastOf(this.asts); + return this.count() >= 3 && + this.asts[this.top] === ast && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 2].nodeType === TypeScript.NodeType.ModuleDeclaration; + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + } + + public isChildOfClass(): boolean { + var ast = lastOf(this.asts); + return this.count() >= 3 && + this.asts[this.top] === ast && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 2].nodeType === TypeScript.NodeType.ClassDeclaration; + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + } + + public isArgumentOfClassConstructor(): boolean { + var ast = lastOf(this.asts); + return this.count() >= 5 && + this.asts[this.top] === ast && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 3].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 4].nodeType === TypeScript.NodeType.ClassDeclaration && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + ((this.asts[this.top - 2]).isConstructor) && + ~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. + ((this.asts[this.top - 2]).arguments === this.asts[this.top - 1]) && + ~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. + ((this.asts[this.top - 4]).constructorDecl === this.asts[this.top - 2]); + ~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ClassDeclaration'. + } + + public isChildOfInterface(): boolean { + var ast = lastOf(this.asts); + return this.count() >= 3 && + this.asts[this.top] === ast && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 2].nodeType === TypeScript.NodeType.InterfaceDeclaration; + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + } + + public isTopLevelImplicitModule(): any { + return this.count() >= 1 && + this.asts[this.top].nodeType === TypeScript.NodeType.ModuleDeclaration && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + TypeScript.hasFlag((this.asts[this.top]).modFlags, TypeScript.ModuleFlags.IsWholeFile); + ~~~~~~~ +!!! error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'. + ~~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. + ~~~~~~~~~~~ +!!! error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'. + } + + public isBodyOfTopLevelImplicitModule(): any { + return this.count() >= 2 && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).members == this.asts[this.top - 0] && + ~~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. + TypeScript.hasFlag((this.asts[this.top - 1]).modFlags, TypeScript.ModuleFlags.IsWholeFile); + ~~~~~~~ +!!! error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'. + ~~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. + ~~~~~~~~~~~ +!!! error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'. + } + + public isBodyOfScript(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Script && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).bod == this.asts[this.top - 0]; + ~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'Script'. + } + + public isBodyOfSwitch(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Switch && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).caseList == this.asts[this.top - 0]; + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. + } + + public isBodyOfModule(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).members == this.asts[this.top - 0]; + ~~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. + } + + public isBodyOfClass(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ClassDeclaration && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).members == this.asts[this.top - 0]; + ~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ClassDeclaration'. + } + + public isBodyOfFunction(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).bod == this.asts[this.top - 0]; + ~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. + } + + public isBodyOfInterface(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.InterfaceDeclaration && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).members == this.asts[this.top - 0]; + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. + } + + public isBodyOfBlock(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Block && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).statements == this.asts[this.top - 0]; + ~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'Block'. + } + + public isBodyOfFor(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.For && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + ~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ForStatement'. + } + + public isBodyOfCase(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Case && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + ~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'CaseStatement'. + } + + public isBodyOfTry(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Try && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'Try'. + } + + public isBodyOfCatch(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Catch && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + ~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'Catch'. + } + + public isBodyOfDoWhile(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.DoWhile && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + ~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'DoWhileStatement'. + } + + public isBodyOfWhile(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.While && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + ~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'WhileStatement'. + } + + public isBodyOfForIn(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ForIn && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + ~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ForInStatement'. + } + + public isBodyOfWith(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.With && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + ~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'WithStatement'. + } + + public isBodyOfFinally(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Finally && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).body == this.asts[this.top - 0]; + ~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'Finally'. + } + + public isCaseOfSwitch(): boolean { + return this.count() >= 3 && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 2]).caseList == this.asts[this.top - 1]; + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. + } + + public isDefaultCaseOfSwitch(): boolean { + return this.count() >= 3 && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 2]).caseList == this.asts[this.top - 1] && + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. + (this.asts[this.top - 2]).defaultCase == this.asts[this.top - 0]; + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. + } + + public isListOfObjectLit(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).operand == this.asts[this.top - 0]; + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. + } + + public isBodyOfObjectLit(): boolean { + return this.isListOfObjectLit(); + } + + public isEmptyListOfObjectLit(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).operand == this.asts[this.top - 0] && + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. + (this.asts[this.top - 0]).members.length == 0; + ~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ASTList'. + } + + public isMemberOfObjectLit(): boolean { + return this.count() >= 3 && + this.asts[this.top - 2].nodeType === TypeScript.NodeType.ObjectLit && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 0].nodeType === TypeScript.NodeType.Member && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 2]).operand == this.asts[this.top - 1]; + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. + } + + public isNameOfMemberOfObjectLit(): boolean { + return this.count() >= 4 && + this.asts[this.top - 3].nodeType === TypeScript.NodeType.ObjectLit && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 2].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 0].nodeType === TypeScript.NodeType.Name && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 3]).operand == this.asts[this.top - 2]; + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. + } + + public isListOfArrayLit(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.ArrayLit && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).operand == this.asts[this.top - 0]; + ~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. + } + + public isTargetOfMember(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).operand1 === this.asts[this.top - 0]; + ~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'BinaryExpression'. + } + + public isMemberOfMember(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).operand2 === this.asts[this.top - 0]; + ~~~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'BinaryExpression'. + } + + public isItemOfList(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List; + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + //(this.asts[this.top - 1]).operand2 === this.asts[this.top - 0]; + } + + public isThenOfIf(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).thenBod == this.asts[this.top - 0]; + ~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'IfStatement'. + } + + public isElseOfIf(): boolean { + return this.count() >= 2 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).elseBod == this.asts[this.top - 0]; + ~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'IfStatement'. + } + + public isBodyOfDefaultCase(): boolean { + return this.isBodyOfCase(); + } + + public isSingleStatementList(): boolean { + return this.count() >= 1 && + this.asts[this.top].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top]).members.length === 1; + ~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ASTList'. + } + + public isArgumentListOfFunction(): boolean { + return this.count() >= 2 && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; + ~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. + } + + public isArgumentOfFunction(): boolean { + return this.count() >= 3 && + this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 2]).arguments === this.asts[this.top - 1]; + ~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. + } + + public isArgumentListOfCall(): boolean { + return this.count() >= 2 && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 1].nodeType === TypeScript.NodeType.Call && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; + ~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'. + } + + public isArgumentListOfNew(): boolean { + return this.count() >= 2 && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + this.asts[this.top - 1].nodeType === TypeScript.NodeType.New && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; + ~~~~~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'. + } + + public isSynthesizedBlock(): boolean { + return this.count() >= 1 && + this.asts[this.top - 0].nodeType === TypeScript.NodeType.Block && + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + (this.asts[this.top - 0]).isStatementBlock === false; + ~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'Block'. + } + } + + export function isValidAstNode(ast: TypeScript.ASTSpan): boolean { + ~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'ASTSpan'. + if (ast === null) + return false; + + if (ast.minChar === -1 || ast.limChar === -1) + return false; + + return true; + } + + export class AstPathContext { + public path: AstPath = new TypeScript.AstPath(); + } + + export enum GetAstPathOptions { + Default = 0, + EdgeInclusive = 1, + //We need this options dealing with an AST coming from an incomplete AST. For example: + // class foo { // r + // If we ask for the AST at the position after the "r" character, we won't see we are + // inside a comment, because the "class" AST node has a limChar corresponding to the position of + // the "{" character, meaning we don't traverse the tree down to the stmt list of the class, meaning + // we don't find the "precomment" attached to the errorneous empty stmt. + //TODO: It would be nice to be able to get rid of this. + DontPruneSearchBasedOnPosition = 1 << 1, + } + + /// + /// Return the stack of AST nodes containing "position" + /// + export function getAstPathToPosition(script: TypeScript.AST, pos: number, options: GetAstPathOptions = GetAstPathOptions.Default): TypeScript.AstPath { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + var lookInComments = (comments: TypeScript.Comment[]) => { + ~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'Comment'. + if (comments && comments.length > 0) { + for (var i = 0; i < comments.length; i++) { + var minChar = comments[i].minChar; + var limChar = comments[i].limChar; + if (!comments[i].isBlockComment) { + limChar++; // For single line comments, include 1 more character (for the newline) + } + if (pos >= minChar && pos < limChar) { + ctx.path.push(comments[i]); + } + } + } + } + + var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: IAstWalker) { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + ~~~~~~~~~~ +!!! error TS2304: Cannot find name 'IAstWalker'. + if (isValidAstNode(cur)) { + + // Add "cur" to the stack if it contains our position + // For "identifier" nodes, we need a special case: A position equal to "limChar" is + // valid, since the position corresponds to a caret position (in between characters) + // For example: + // bar + // 0123 + // If "position == 3", the caret is at the "right" of the "r" character, which should be considered valid + var inclusive = + hasFlag(options, GetAstPathOptions.EdgeInclusive) || + ~~~~~~~ +!!! error TS2304: Cannot find name 'hasFlag'. + cur.nodeType === TypeScript.NodeType.Name || + ~~~~~~~~ +!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. + pos === script.limChar; // Special "EOF" case + + var minChar = cur.minChar; + var limChar = cur.limChar + (inclusive ? 1 : 0) + if (pos >= minChar && pos < limChar) { + + // TODO: Since AST is sometimes not correct wrt to position, only add "cur" if it's better + // than top of the stack. + var previous = ctx.path.ast(); + if (previous == null || (cur.minChar >= previous.minChar && cur.limChar <= previous.limChar)) { + ctx.path.push(cur); + } + else { + //logger.log("TODO: Ignoring node because minChar, limChar not better than previous node in stack"); + } + } + + // The AST walker skips comments, but we might be in one, so check the pre/post comments for this node manually + if (pos < limChar) { + lookInComments(cur.preComments); + } + if (pos >= minChar) { + lookInComments(cur.postComments); + } + + if (!hasFlag(options, GetAstPathOptions.DontPruneSearchBasedOnPosition)) { + ~~~~~~~ +!!! error TS2304: Cannot find name 'hasFlag'. + // Don't go further down the tree if pos is outside of [minChar, limChar] + walker.options.goChildren = (minChar <= pos && pos <= limChar); + } + } + return cur; + } + + var ctx = new AstPathContext(); + TypeScript.getAstWalkerFactory().walk(script, pre, null, null, ctx); + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. + return ctx.path; + } + + // + // Find a source text offset that is safe for lexing tokens at the given position. + // This is used when "position" might be inside a comment or string, etc. + // + export function getTokenizationOffset(script: TypeScript.Script, position: number): number { + ~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'Script'. + var bestOffset = 0; + var pre = (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker): TypeScript.AST => { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + ~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + if (TypeScript.isValidAstNode(cur)) { + // Did we find a closer offset? + if (cur.minChar <= position) { + bestOffset = max(bestOffset, cur.minChar); + } + + // Stop the walk if this node is not related to "minChar" + if (cur.minChar > position || cur.limChar < bestOffset) { + walker.options.goChildren = false; + } + } + + return cur; + } + + TypeScript.getAstWalkerFactory().walk(script, pre); + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. + return bestOffset; + } + + /// + /// Simple function to Walk an AST using a simple callback function. + /// + export function walkAST(ast: TypeScript.AST, callback: (path: AstPath, walker: TypeScript.IAstWalker) => void ): void { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + ~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. + var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + ~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. + var path: TypeScript.AstPath = walker.state; + path.push(cur); + callback(path, walker); + return cur; + } + var post = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) { + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + ~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. + ~~~~~~~~~~ +!!! error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. + var path: TypeScript.AstPath = walker.state; + path.pop(); + return cur; + } + + var path = new AstPath(); + TypeScript.getAstWalkerFactory().walk(ast, pre, post, null, path); + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource2.d.ts new file mode 100644 index 0000000000000..5060c18f593ac --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource2.d.ts @@ -0,0 +1,773 @@ +//// [tests/cases/conformance/parser/ecmascript5/parserRealSource2.ts] //// + +//// [parserRealSource2.ts] +// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. +// See LICENSE.txt in the project root for complete license information. + +/// + +module TypeScript { + + export function hasFlag(val: number, flag: number): boolean { + return (val & flag) != 0; + } + + export enum ErrorRecoverySet { + None = 0, + Comma = 1, // Comma + SColon = 1 << 1, // SColon + Asg = 1 << 2, // Asg + BinOp = 1 << 3, // Lsh, Rsh, Rs2, Le, Ge, INSTANCEOF, EQ, NE, Eqv, NEqv, LogAnd, LogOr, AsgMul, AsgDiv + // AsgMod, AsgAdd, AsgSub, AsgLsh, AsgRsh, AsgRs2, AsgAnd, AsgXor, AsgOr, QMark, Mult, Div, + // Pct, GT, LT, And, Xor, Or + RBrack = 1 << 4, // RBrack + RCurly = 1 << 5, // RCurly + RParen = 1 << 6, // RParen + Dot = 1 << 7, // Dot + Colon = 1 << 8, // Colon + PrimType = 1 << 9, // number, string, boolean + AddOp = 1 << 10, // Add, Sub + LCurly = 1 << 11, // LCurly + PreOp = 1 << 12, // Tilde, Bang, Inc, Dec + RegExp = 1 << 13, // RegExp + LParen = 1 << 14, // LParen + LBrack = 1 << 15, // LBrack + Scope = 1 << 16, // Scope + In = 1 << 17, // IN + SCase = 1 << 18, // CASE, DEFAULT + Else = 1 << 19, // ELSE + Catch = 1 << 20, // CATCH, FINALLY + Var = 1 << 21, // + Stmt = 1 << 22, // BREAK, RETURN, THROW, DEBUGGER, FOR, SWITCH, DO, IF, TRY, WITH + While = 1 << 23, // WHILE + ID = 1 << 24, // ID + Prefix = 1 << 25, // VOID, DELETE, TYPEOF, AWAIT + Literal = 1 << 26, // IntCon, FltCon, StrCon + RLit = 1 << 27, // THIS, TRUE, FALSE, NULL + Func = 1 << 28, // FUNCTION + EOF = 1 << 29, // EOF + + // REVIEW: Name this something clearer. + TypeScriptS = 1 << 30, // PROPERTY, PRIVATE, STATIC, INTERFACE, CLASS, MODULE, EXPORT, IMPORT + ExprStart = SColon | AddOp | LCurly | PreOp | RegExp | LParen | LBrack | ID | Prefix | RLit | Func | Literal, + StmtStart = ExprStart | SColon | Var | Stmt | While | TypeScriptS, + Postfix = Dot | LParen | LBrack, + } + + export enum AllowedElements { + None = 0, + ModuleDeclarations = 1 << 2, + ClassDeclarations = 1 << 3, + InterfaceDeclarations = 1 << 4, + AmbientDeclarations = 1 << 10, + Properties = 1 << 11, + + Global = ModuleDeclarations | ClassDeclarations | InterfaceDeclarations | AmbientDeclarations, + QuickParse = Global | Properties, + } + + export enum Modifiers { + None = 0, + Private = 1, + Public = 1 << 1, + Readonly = 1 << 2, + Ambient = 1 << 3, + Exported = 1 << 4, + Getter = 1 << 5, + Setter = 1 << 6, + Static = 1 << 7, + } + + export enum ASTFlags { + None = 0, + ExplicitSemicolon = 1, // statment terminated by an explicit semicolon + AutomaticSemicolon = 1 << 1, // statment terminated by an automatic semicolon + Writeable = 1 << 2, // node is lhs that can be modified + Error = 1 << 3, // node has an error + DotLHSPartial = 1 << 4, // node is the lhs of an incomplete dot expr at cursor + DotLHS = 1 << 5, // node is the lhs of a dot expr + IsStatement = 1 << 6, // node is a statement + StrictMode = 1 << 7, // node is in the strict mode environment + PossibleOptionalParameter = 1 << 8, + ClassBaseConstructorCall = 1 << 9, + OptionalName = 1 << 10, + // REVIEW: This flag is to mark lambda nodes to note that the LParen of an expression has already been matched in the lambda header. + // The flag is used to communicate this piece of information to the calling parseTerm, which intern will remove it. + // Once we have a better way to associate information with nodes, this flag should not be used. + SkipNextRParen = 1 << 11, + } + + export enum DeclFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + Public = 1 << 2, + Ambient = 1 << 3, + Static = 1 << 4, + LocalStatic = 1 << 5, + GetAccessor = 1 << 6, + SetAccessor = 1 << 7, + } + + export enum ModuleFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + Public = 1 << 2, + Ambient = 1 << 3, + Static = 1 << 4, + LocalStatic = 1 << 5, + GetAccessor = 1 << 6, + SetAccessor = 1 << 7, + IsEnum = 1 << 8, + ShouldEmitModuleDecl = 1 << 9, + IsWholeFile = 1 << 10, + IsDynamic = 1 << 11, + MustCaptureThis = 1 << 12, + } + + export enum SymbolFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + Public = 1 << 2, + Ambient = 1 << 3, + Static = 1 << 4, + LocalStatic = 1 << 5, + GetAccessor = 1 << 6, + SetAccessor = 1 << 7, + Property = 1 << 8, + Readonly = 1 << 9, + ModuleMember = 1 << 10, + InterfaceMember = 1 << 11, + ClassMember = 1 << 12, + BuiltIn = 1 << 13, + TypeSetDuringScopeAssignment = 1 << 14, + Constant = 1 << 15, + Optional = 1 << 16, + RecursivelyReferenced = 1 << 17, + Bound = 1 << 18, + CompilerGenerated = 1 << 19, + } + + export enum VarFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + Public = 1 << 2, + Ambient = 1 << 3, + Static = 1 << 4, + LocalStatic = 1 << 5, + GetAccessor = 1 << 6, + SetAccessor = 1 << 7, + AutoInit = 1 << 8, + Property = 1 << 9, + Readonly = 1 << 10, + Class = 1 << 11, + ClassProperty = 1 << 12, + ClassBodyProperty = 1 << 13, + ClassConstructorProperty = 1 << 14, + ClassSuperMustBeFirstCallInConstructor = 1 << 15, + Constant = 1 << 16, + MustCaptureThis = 1 << 17, + } + + export enum FncFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + Public = 1 << 2, + Ambient = 1 << 3, + Static = 1 << 4, + LocalStatic = 1 << 5, + GetAccessor = 1 << 6, + SetAccessor = 1 << 7, + Definition = 1 << 8, + Signature = 1 << 9, + Method = 1 << 10, + HasReturnExpression = 1 << 11, + CallMember = 1 << 12, + ConstructMember = 1 << 13, + HasSelfReference = 1 << 14, + IsFatArrowFunction = 1 << 15, + IndexerMember = 1 << 16, + IsFunctionExpression = 1 << 17, + ClassMethod = 1 << 18, + ClassPropertyMethodExported = 1 << 19, + } + + export enum SignatureFlags { + None = 0, + IsIndexer = 1, + IsStringIndexer = 1 << 1, + IsNumberIndexer = 1 << 2, + } + + export function ToDeclFlags(fncFlags: FncFlags) : DeclFlags; + export function ToDeclFlags(varFlags: VarFlags) : DeclFlags; + export function ToDeclFlags(symFlags: SymbolFlags): DeclFlags; + export function ToDeclFlags(moduleFlags: ModuleFlags): DeclFlags; + export function ToDeclFlags(fncOrVarOrSymbolOrModuleFlags: any) { + return fncOrVarOrSymbolOrModuleFlags; + } + + export enum TypeFlags { + None = 0, + HasImplementation = 1, + HasSelfReference = 1 << 1, + MergeResult = 1 << 2, + IsEnum = 1 << 3, + BuildingName = 1 << 4, + HasBaseType = 1 << 5, + HasBaseTypeOfObject = 1 << 6, + IsClass = 1 << 7, + } + + export enum TypeRelationshipFlags { + SuccessfulComparison = 0, + SourceIsNullTargetIsVoidOrUndefined = 1, + RequiredPropertyIsMissing = 1 << 1, + IncompatibleSignatures = 1 << 2, + SourceSignatureHasTooManyParameters = 3, + IncompatibleReturnTypes = 1 << 4, + IncompatiblePropertyTypes = 1 << 5, + IncompatibleParameterTypes = 1 << 6, + } + + export enum CodeGenTarget { + ES3 = 0, + ES5 = 1, + } + + export enum ModuleGenTarget { + Synchronous = 0, + Asynchronous = 1, + Local = 1 << 1, + } + + // Compiler defaults to generating ES5-compliant code for + // - getters and setters + export var codeGenTarget: CodeGenTarget = CodeGenTarget.ES3; + + export var moduleGenTarget: ModuleGenTarget = ModuleGenTarget.Synchronous; + + export var optimizeModuleCodeGen = true; + + export function flagsToString(e: any, flags: number): string { + var builder = ""; + for (var i = 1; i < (1 << 31) ; i = i << 1) { + if ((flags & i) != 0) { + for (var k in e) { + if (e[k] == i) { + if (builder.length > 0) { + builder += "|"; + } + builder += k; + break; + } + } + } + } + return builder; + } + +} + +/// [Declarations] //// + + + +//// [/.src/parserRealSource2.d.ts] +declare namespace TypeScript { + function hasFlag(val: number, flag: number): boolean; + enum ErrorRecoverySet { + None = 0, + Comma = 1,// Comma + SColon = 2,// SColon + Asg = 4,// Asg + BinOp = 8,// Lsh, Rsh, Rs2, Le, Ge, INSTANCEOF, EQ, NE, Eqv, NEqv, LogAnd, LogOr, AsgMul, AsgDiv + RBrack = 16,// RBrack + RCurly = 32,// RCurly + RParen = 64,// RParen + Dot = 128,// Dot + Colon = 256,// Colon + PrimType = 512,// number, string, boolean + AddOp = 1024,// Add, Sub + LCurly = 2048,// LCurly + PreOp = 4096,// Tilde, Bang, Inc, Dec + RegExp = 8192,// RegExp + LParen = 16384,// LParen + LBrack = 32768,// LBrack + Scope = 65536,// Scope + In = 131072,// IN + SCase = 262144,// CASE, DEFAULT + Else = 524288,// ELSE + Catch = 1048576,// CATCH, FINALLY + Var = 2097152,// + Stmt = 4194304,// BREAK, RETURN, THROW, DEBUGGER, FOR, SWITCH, DO, IF, TRY, WITH + While = 8388608,// WHILE + ID = 16777216,// ID + Prefix = 33554432,// VOID, DELETE, TYPEOF, AWAIT + Literal = 67108864,// IntCon, FltCon, StrCon + RLit = 134217728,// THIS, TRUE, FALSE, NULL + Func = 268435456,// FUNCTION + EOF = 536870912,// EOF + TypeScriptS = 1073741824,// PROPERTY, PRIVATE, STATIC, INTERFACE, CLASS, MODULE, EXPORT, IMPORT + ExprStart = 520158210, + StmtStart = 1608580098, + Postfix = 49280 + } + enum AllowedElements { + None = 0, + ModuleDeclarations = 4, + ClassDeclarations = 8, + InterfaceDeclarations = 16, + AmbientDeclarations = 1024, + Properties = 2048, + Global = 1052, + QuickParse = 3100 + } + enum Modifiers { + None = 0, + Private = 1, + Public = 2, + Readonly = 4, + Ambient = 8, + Exported = 16, + Getter = 32, + Setter = 64, + Static = 128 + } + enum ASTFlags { + None = 0, + ExplicitSemicolon = 1,// statment terminated by an explicit semicolon + AutomaticSemicolon = 2,// statment terminated by an automatic semicolon + Writeable = 4,// node is lhs that can be modified + Error = 8,// node has an error + DotLHSPartial = 16,// node is the lhs of an incomplete dot expr at cursor + DotLHS = 32,// node is the lhs of a dot expr + IsStatement = 64,// node is a statement + StrictMode = 128,// node is in the strict mode environment + PossibleOptionalParameter = 256, + ClassBaseConstructorCall = 512, + OptionalName = 1024, + SkipNextRParen = 2048 + } + enum DeclFlags { + None = 0, + Exported = 1, + Private = 2, + Public = 4, + Ambient = 8, + Static = 16, + LocalStatic = 32, + GetAccessor = 64, + SetAccessor = 128 + } + enum ModuleFlags { + None = 0, + Exported = 1, + Private = 2, + Public = 4, + Ambient = 8, + Static = 16, + LocalStatic = 32, + GetAccessor = 64, + SetAccessor = 128, + IsEnum = 256, + ShouldEmitModuleDecl = 512, + IsWholeFile = 1024, + IsDynamic = 2048, + MustCaptureThis = 4096 + } + enum SymbolFlags { + None = 0, + Exported = 1, + Private = 2, + Public = 4, + Ambient = 8, + Static = 16, + LocalStatic = 32, + GetAccessor = 64, + SetAccessor = 128, + Property = 256, + Readonly = 512, + ModuleMember = 1024, + InterfaceMember = 2048, + ClassMember = 4096, + BuiltIn = 8192, + TypeSetDuringScopeAssignment = 16384, + Constant = 32768, + Optional = 65536, + RecursivelyReferenced = 131072, + Bound = 262144, + CompilerGenerated = 524288 + } + enum VarFlags { + None = 0, + Exported = 1, + Private = 2, + Public = 4, + Ambient = 8, + Static = 16, + LocalStatic = 32, + GetAccessor = 64, + SetAccessor = 128, + AutoInit = 256, + Property = 512, + Readonly = 1024, + Class = 2048, + ClassProperty = 4096, + ClassBodyProperty = 8192, + ClassConstructorProperty = 16384, + ClassSuperMustBeFirstCallInConstructor = 32768, + Constant = 65536, + MustCaptureThis = 131072 + } + enum FncFlags { + None = 0, + Exported = 1, + Private = 2, + Public = 4, + Ambient = 8, + Static = 16, + LocalStatic = 32, + GetAccessor = 64, + SetAccessor = 128, + Definition = 256, + Signature = 512, + Method = 1024, + HasReturnExpression = 2048, + CallMember = 4096, + ConstructMember = 8192, + HasSelfReference = 16384, + IsFatArrowFunction = 32768, + IndexerMember = 65536, + IsFunctionExpression = 131072, + ClassMethod = 262144, + ClassPropertyMethodExported = 524288 + } + enum SignatureFlags { + None = 0, + IsIndexer = 1, + IsStringIndexer = 2, + IsNumberIndexer = 4 + } + function ToDeclFlags(fncFlags: FncFlags): DeclFlags; + function ToDeclFlags(varFlags: VarFlags): DeclFlags; + function ToDeclFlags(symFlags: SymbolFlags): DeclFlags; + function ToDeclFlags(moduleFlags: ModuleFlags): DeclFlags; + enum TypeFlags { + None = 0, + HasImplementation = 1, + HasSelfReference = 2, + MergeResult = 4, + IsEnum = 8, + BuildingName = 16, + HasBaseType = 32, + HasBaseTypeOfObject = 64, + IsClass = 128 + } + enum TypeRelationshipFlags { + SuccessfulComparison = 0, + SourceIsNullTargetIsVoidOrUndefined = 1, + RequiredPropertyIsMissing = 2, + IncompatibleSignatures = 4, + SourceSignatureHasTooManyParameters = 3, + IncompatibleReturnTypes = 16, + IncompatiblePropertyTypes = 32, + IncompatibleParameterTypes = 64 + } + enum CodeGenTarget { + ES3 = 0, + ES5 = 1 + } + enum ModuleGenTarget { + Synchronous = 0, + Asynchronous = 1, + Local = 2 + } + var codeGenTarget: CodeGenTarget; + var moduleGenTarget: ModuleGenTarget; + var optimizeModuleCodeGen: boolean; + function flagsToString(e: any, flags: number): string; +} +/// [Errors] //// + +parserRealSource2.ts(4,21): error TS6053: File 'typescript.ts' not found. + + +==== parserRealSource2.ts (1 errors) ==== + // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. + // See LICENSE.txt in the project root for complete license information. + + /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. + + module TypeScript { + + export function hasFlag(val: number, flag: number): boolean { + return (val & flag) != 0; + } + + export enum ErrorRecoverySet { + None = 0, + Comma = 1, // Comma + SColon = 1 << 1, // SColon + Asg = 1 << 2, // Asg + BinOp = 1 << 3, // Lsh, Rsh, Rs2, Le, Ge, INSTANCEOF, EQ, NE, Eqv, NEqv, LogAnd, LogOr, AsgMul, AsgDiv + // AsgMod, AsgAdd, AsgSub, AsgLsh, AsgRsh, AsgRs2, AsgAnd, AsgXor, AsgOr, QMark, Mult, Div, + // Pct, GT, LT, And, Xor, Or + RBrack = 1 << 4, // RBrack + RCurly = 1 << 5, // RCurly + RParen = 1 << 6, // RParen + Dot = 1 << 7, // Dot + Colon = 1 << 8, // Colon + PrimType = 1 << 9, // number, string, boolean + AddOp = 1 << 10, // Add, Sub + LCurly = 1 << 11, // LCurly + PreOp = 1 << 12, // Tilde, Bang, Inc, Dec + RegExp = 1 << 13, // RegExp + LParen = 1 << 14, // LParen + LBrack = 1 << 15, // LBrack + Scope = 1 << 16, // Scope + In = 1 << 17, // IN + SCase = 1 << 18, // CASE, DEFAULT + Else = 1 << 19, // ELSE + Catch = 1 << 20, // CATCH, FINALLY + Var = 1 << 21, // + Stmt = 1 << 22, // BREAK, RETURN, THROW, DEBUGGER, FOR, SWITCH, DO, IF, TRY, WITH + While = 1 << 23, // WHILE + ID = 1 << 24, // ID + Prefix = 1 << 25, // VOID, DELETE, TYPEOF, AWAIT + Literal = 1 << 26, // IntCon, FltCon, StrCon + RLit = 1 << 27, // THIS, TRUE, FALSE, NULL + Func = 1 << 28, // FUNCTION + EOF = 1 << 29, // EOF + + // REVIEW: Name this something clearer. + TypeScriptS = 1 << 30, // PROPERTY, PRIVATE, STATIC, INTERFACE, CLASS, MODULE, EXPORT, IMPORT + ExprStart = SColon | AddOp | LCurly | PreOp | RegExp | LParen | LBrack | ID | Prefix | RLit | Func | Literal, + StmtStart = ExprStart | SColon | Var | Stmt | While | TypeScriptS, + Postfix = Dot | LParen | LBrack, + } + + export enum AllowedElements { + None = 0, + ModuleDeclarations = 1 << 2, + ClassDeclarations = 1 << 3, + InterfaceDeclarations = 1 << 4, + AmbientDeclarations = 1 << 10, + Properties = 1 << 11, + + Global = ModuleDeclarations | ClassDeclarations | InterfaceDeclarations | AmbientDeclarations, + QuickParse = Global | Properties, + } + + export enum Modifiers { + None = 0, + Private = 1, + Public = 1 << 1, + Readonly = 1 << 2, + Ambient = 1 << 3, + Exported = 1 << 4, + Getter = 1 << 5, + Setter = 1 << 6, + Static = 1 << 7, + } + + export enum ASTFlags { + None = 0, + ExplicitSemicolon = 1, // statment terminated by an explicit semicolon + AutomaticSemicolon = 1 << 1, // statment terminated by an automatic semicolon + Writeable = 1 << 2, // node is lhs that can be modified + Error = 1 << 3, // node has an error + DotLHSPartial = 1 << 4, // node is the lhs of an incomplete dot expr at cursor + DotLHS = 1 << 5, // node is the lhs of a dot expr + IsStatement = 1 << 6, // node is a statement + StrictMode = 1 << 7, // node is in the strict mode environment + PossibleOptionalParameter = 1 << 8, + ClassBaseConstructorCall = 1 << 9, + OptionalName = 1 << 10, + // REVIEW: This flag is to mark lambda nodes to note that the LParen of an expression has already been matched in the lambda header. + // The flag is used to communicate this piece of information to the calling parseTerm, which intern will remove it. + // Once we have a better way to associate information with nodes, this flag should not be used. + SkipNextRParen = 1 << 11, + } + + export enum DeclFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + Public = 1 << 2, + Ambient = 1 << 3, + Static = 1 << 4, + LocalStatic = 1 << 5, + GetAccessor = 1 << 6, + SetAccessor = 1 << 7, + } + + export enum ModuleFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + Public = 1 << 2, + Ambient = 1 << 3, + Static = 1 << 4, + LocalStatic = 1 << 5, + GetAccessor = 1 << 6, + SetAccessor = 1 << 7, + IsEnum = 1 << 8, + ShouldEmitModuleDecl = 1 << 9, + IsWholeFile = 1 << 10, + IsDynamic = 1 << 11, + MustCaptureThis = 1 << 12, + } + + export enum SymbolFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + Public = 1 << 2, + Ambient = 1 << 3, + Static = 1 << 4, + LocalStatic = 1 << 5, + GetAccessor = 1 << 6, + SetAccessor = 1 << 7, + Property = 1 << 8, + Readonly = 1 << 9, + ModuleMember = 1 << 10, + InterfaceMember = 1 << 11, + ClassMember = 1 << 12, + BuiltIn = 1 << 13, + TypeSetDuringScopeAssignment = 1 << 14, + Constant = 1 << 15, + Optional = 1 << 16, + RecursivelyReferenced = 1 << 17, + Bound = 1 << 18, + CompilerGenerated = 1 << 19, + } + + export enum VarFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + Public = 1 << 2, + Ambient = 1 << 3, + Static = 1 << 4, + LocalStatic = 1 << 5, + GetAccessor = 1 << 6, + SetAccessor = 1 << 7, + AutoInit = 1 << 8, + Property = 1 << 9, + Readonly = 1 << 10, + Class = 1 << 11, + ClassProperty = 1 << 12, + ClassBodyProperty = 1 << 13, + ClassConstructorProperty = 1 << 14, + ClassSuperMustBeFirstCallInConstructor = 1 << 15, + Constant = 1 << 16, + MustCaptureThis = 1 << 17, + } + + export enum FncFlags { + None = 0, + Exported = 1, + Private = 1 << 1, + Public = 1 << 2, + Ambient = 1 << 3, + Static = 1 << 4, + LocalStatic = 1 << 5, + GetAccessor = 1 << 6, + SetAccessor = 1 << 7, + Definition = 1 << 8, + Signature = 1 << 9, + Method = 1 << 10, + HasReturnExpression = 1 << 11, + CallMember = 1 << 12, + ConstructMember = 1 << 13, + HasSelfReference = 1 << 14, + IsFatArrowFunction = 1 << 15, + IndexerMember = 1 << 16, + IsFunctionExpression = 1 << 17, + ClassMethod = 1 << 18, + ClassPropertyMethodExported = 1 << 19, + } + + export enum SignatureFlags { + None = 0, + IsIndexer = 1, + IsStringIndexer = 1 << 1, + IsNumberIndexer = 1 << 2, + } + + export function ToDeclFlags(fncFlags: FncFlags) : DeclFlags; + export function ToDeclFlags(varFlags: VarFlags) : DeclFlags; + export function ToDeclFlags(symFlags: SymbolFlags): DeclFlags; + export function ToDeclFlags(moduleFlags: ModuleFlags): DeclFlags; + export function ToDeclFlags(fncOrVarOrSymbolOrModuleFlags: any) { + return fncOrVarOrSymbolOrModuleFlags; + } + + export enum TypeFlags { + None = 0, + HasImplementation = 1, + HasSelfReference = 1 << 1, + MergeResult = 1 << 2, + IsEnum = 1 << 3, + BuildingName = 1 << 4, + HasBaseType = 1 << 5, + HasBaseTypeOfObject = 1 << 6, + IsClass = 1 << 7, + } + + export enum TypeRelationshipFlags { + SuccessfulComparison = 0, + SourceIsNullTargetIsVoidOrUndefined = 1, + RequiredPropertyIsMissing = 1 << 1, + IncompatibleSignatures = 1 << 2, + SourceSignatureHasTooManyParameters = 3, + IncompatibleReturnTypes = 1 << 4, + IncompatiblePropertyTypes = 1 << 5, + IncompatibleParameterTypes = 1 << 6, + } + + export enum CodeGenTarget { + ES3 = 0, + ES5 = 1, + } + + export enum ModuleGenTarget { + Synchronous = 0, + Asynchronous = 1, + Local = 1 << 1, + } + + // Compiler defaults to generating ES5-compliant code for + // - getters and setters + export var codeGenTarget: CodeGenTarget = CodeGenTarget.ES3; + + export var moduleGenTarget: ModuleGenTarget = ModuleGenTarget.Synchronous; + + export var optimizeModuleCodeGen = true; + + export function flagsToString(e: any, flags: number): string { + var builder = ""; + for (var i = 1; i < (1 << 31) ; i = i << 1) { + if ((flags & i) != 0) { + for (var k in e) { + if (e[k] == i) { + if (builder.length > 0) { + builder += "|"; + } + builder += k; + break; + } + } + } + } + return builder; + } + + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource3.d.ts new file mode 100644 index 0000000000000..f4c9508128d4a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource3.d.ts @@ -0,0 +1,368 @@ +//// [tests/cases/conformance/parser/ecmascript5/parserRealSource3.ts] //// + +//// [parserRealSource3.ts] +// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. +// See LICENSE.txt in the project root for complete license information. + +/// + +module TypeScript { + // Note: Any addition to the NodeType should also be supported with addition to AstWalkerDetailCallback + export enum NodeType { + None, + Empty, + EmptyExpr, + True, + False, + This, + Super, + QString, + Regex, + Null, + ArrayLit, + ObjectLit, + Void, + Comma, + Pos, + Neg, + Delete, + Await, + In, + Dot, + From, + Is, + InstOf, + Typeof, + NumberLit, + Name, + TypeRef, + Index, + Call, + New, + Asg, + AsgAdd, + AsgSub, + AsgDiv, + AsgMul, + AsgMod, + AsgAnd, + AsgXor, + AsgOr, + AsgLsh, + AsgRsh, + AsgRs2, + ConditionalExpression, + LogOr, + LogAnd, + Or, + Xor, + And, + Eq, + Ne, + Eqv, + NEqv, + Lt, + Le, + Gt, + Ge, + Add, + Sub, + Mul, + Div, + Mod, + Lsh, + Rsh, + Rs2, + Not, + LogNot, + IncPre, + DecPre, + IncPost, + DecPost, + TypeAssertion, + FuncDecl, + Member, + VarDecl, + ArgDecl, + Return, + Break, + Continue, + Throw, + For, + ForIn, + If, + While, + DoWhile, + Block, + Case, + Switch, + Try, + TryCatch, + TryFinally, + Finally, + Catch, + List, + Script, + ClassDeclaration, + InterfaceDeclaration, + ModuleDeclaration, + ImportDeclaration, + With, + Label, + LabeledStatement, + EBStart, + GotoEB, + EndCode, + Error, + Comment, + Debugger, + GeneralNode = FuncDecl, + LastAsg = AsgRs2, + } +} + +/// [Declarations] //// + + + +//// [/.src/parserRealSource3.d.ts] +declare namespace TypeScript { + enum NodeType { + None = 0, + Empty = 1, + EmptyExpr = 2, + True = 3, + False = 4, + This = 5, + Super = 6, + QString = 7, + Regex = 8, + Null = 9, + ArrayLit = 10, + ObjectLit = 11, + Void = 12, + Comma = 13, + Pos = 14, + Neg = 15, + Delete = 16, + Await = 17, + In = 18, + Dot = 19, + From = 20, + Is = 21, + InstOf = 22, + Typeof = 23, + NumberLit = 24, + Name = 25, + TypeRef = 26, + Index = 27, + Call = 28, + New = 29, + Asg = 30, + AsgAdd = 31, + AsgSub = 32, + AsgDiv = 33, + AsgMul = 34, + AsgMod = 35, + AsgAnd = 36, + AsgXor = 37, + AsgOr = 38, + AsgLsh = 39, + AsgRsh = 40, + AsgRs2 = 41, + ConditionalExpression = 42, + LogOr = 43, + LogAnd = 44, + Or = 45, + Xor = 46, + And = 47, + Eq = 48, + Ne = 49, + Eqv = 50, + NEqv = 51, + Lt = 52, + Le = 53, + Gt = 54, + Ge = 55, + Add = 56, + Sub = 57, + Mul = 58, + Div = 59, + Mod = 60, + Lsh = 61, + Rsh = 62, + Rs2 = 63, + Not = 64, + LogNot = 65, + IncPre = 66, + DecPre = 67, + IncPost = 68, + DecPost = 69, + TypeAssertion = 70, + FuncDecl = 71, + Member = 72, + VarDecl = 73, + ArgDecl = 74, + Return = 75, + Break = 76, + Continue = 77, + Throw = 78, + For = 79, + ForIn = 80, + If = 81, + While = 82, + DoWhile = 83, + Block = 84, + Case = 85, + Switch = 86, + Try = 87, + TryCatch = 88, + TryFinally = 89, + Finally = 90, + Catch = 91, + List = 92, + Script = 93, + ClassDeclaration = 94, + InterfaceDeclaration = 95, + ModuleDeclaration = 96, + ImportDeclaration = 97, + With = 98, + Label = 99, + LabeledStatement = 100, + EBStart = 101, + GotoEB = 102, + EndCode = 103, + Error = 104, + Comment = 105, + Debugger = 106, + GeneralNode = 71, + LastAsg = 41 + } +} +/// [Errors] //// + +parserRealSource3.ts(4,21): error TS6053: File 'typescript.ts' not found. + + +==== parserRealSource3.ts (1 errors) ==== + // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. + // See LICENSE.txt in the project root for complete license information. + + /// + ~~~~~~~~~~~~~ +!!! error TS6053: File 'typescript.ts' not found. + + module TypeScript { + // Note: Any addition to the NodeType should also be supported with addition to AstWalkerDetailCallback + export enum NodeType { + None, + Empty, + EmptyExpr, + True, + False, + This, + Super, + QString, + Regex, + Null, + ArrayLit, + ObjectLit, + Void, + Comma, + Pos, + Neg, + Delete, + Await, + In, + Dot, + From, + Is, + InstOf, + Typeof, + NumberLit, + Name, + TypeRef, + Index, + Call, + New, + Asg, + AsgAdd, + AsgSub, + AsgDiv, + AsgMul, + AsgMod, + AsgAnd, + AsgXor, + AsgOr, + AsgLsh, + AsgRsh, + AsgRs2, + ConditionalExpression, + LogOr, + LogAnd, + Or, + Xor, + And, + Eq, + Ne, + Eqv, + NEqv, + Lt, + Le, + Gt, + Ge, + Add, + Sub, + Mul, + Div, + Mod, + Lsh, + Rsh, + Rs2, + Not, + LogNot, + IncPre, + DecPre, + IncPost, + DecPost, + TypeAssertion, + FuncDecl, + Member, + VarDecl, + ArgDecl, + Return, + Break, + Continue, + Throw, + For, + ForIn, + If, + While, + DoWhile, + Block, + Case, + Switch, + Try, + TryCatch, + TryFinally, + Finally, + Catch, + List, + Script, + ClassDeclaration, + InterfaceDeclaration, + ModuleDeclaration, + ImportDeclaration, + With, + Label, + LabeledStatement, + EBStart, + GotoEB, + EndCode, + Error, + Comment, + Debugger, + GeneralNode = FuncDecl, + LastAsg = AsgRs2, + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserSkippedTokens16.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserSkippedTokens16.d.ts new file mode 100644 index 0000000000000..18e9262a405e7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserSkippedTokens16.d.ts @@ -0,0 +1,59 @@ +//// [tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens16.ts] //// + +//// [parserSkippedTokens16.ts] +foo(): Bar { } +function Foo (): any ¬ { } +4+:5 +module M { +function a( + : T) { } +} +var x = + +/// [Declarations] //// + + + +//// [/.src/parserSkippedTokens16.d.ts] +declare function Foo(): any; +declare namespace M { +} +declare var x: any; +/// [Errors] //// + +parserSkippedTokens16.ts(1,1): error TS2552: Cannot find name 'foo'. Did you mean 'Foo'? +parserSkippedTokens16.ts(1,6): error TS1005: ';' expected. +parserSkippedTokens16.ts(1,8): error TS1434: Unexpected keyword or identifier. +parserSkippedTokens16.ts(1,8): error TS2304: Cannot find name 'Bar'. +parserSkippedTokens16.ts(2,27): error TS1127: Invalid character. +parserSkippedTokens16.ts(3,3): error TS1109: Expression expected. +parserSkippedTokens16.ts(6,5): error TS1138: Parameter declaration expected. +parserSkippedTokens16.ts(8,14): error TS1109: Expression expected. + + +==== parserSkippedTokens16.ts (8 errors) ==== + foo(): Bar { } + ~~~ +!!! error TS2552: Cannot find name 'foo'. Did you mean 'Foo'? +!!! related TS2728 parserSkippedTokens16.ts:2:10: 'Foo' is declared here. + ~ +!!! error TS1005: ';' expected. + ~~~ +!!! error TS1434: Unexpected keyword or identifier. + ~~~ +!!! error TS2304: Cannot find name 'Bar'. + function Foo (): any ¬ { } + ~ +!!! error TS1127: Invalid character. + 4+:5 + ~ +!!! error TS1109: Expression expected. + module M { + function a( + : T) { } + ~ +!!! error TS1138: Parameter declaration expected. + } + var x = + +!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserStrictMode8.d.ts new file mode 100644 index 0000000000000..0c243fd4851c5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserStrictMode8.d.ts @@ -0,0 +1,23 @@ +//// [tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts] //// + +//// [parserStrictMode8.ts] +"use strict"; +function eval() { +} + +/// [Declarations] //// + + + +//// [/.src/parserStrictMode8.d.ts] +/// [Errors] //// + +parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. + + +==== parserStrictMode8.ts (1 errors) ==== + "use strict"; + function eval() { + ~~~~ +!!! error TS1100: Invalid use of 'eval' in strict mode. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/preserveConstEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/preserveConstEnums.d.ts new file mode 100644 index 0000000000000..9bbe65b5001c8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/preserveConstEnums.d.ts @@ -0,0 +1,16 @@ +//// [tests/cases/compiler/preserveConstEnums.ts] //// + +//// [preserveConstEnums.ts] +const enum E { + Value = 1, Value2 = Value +} + +/// [Declarations] //// + + + +//// [/.src/preserveConstEnums.d.ts] +declare const enum E { + Value = 1, + Value2 = 1 +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/propertyAssignmentUseParentType3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/propertyAssignmentUseParentType3.d.ts new file mode 100644 index 0000000000000..4a331d41d74fb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/propertyAssignmentUseParentType3.d.ts @@ -0,0 +1,49 @@ +//// [tests/cases/conformance/salsa/propertyAssignmentUseParentType3.ts] //// + +//// [propertyAssignmentUseParentType3.ts] +// don't use the parent type if it's a function declaration (#33741) + +function foo1(): number { + return 123; +} +foo1.toFixed = ""; + +function foo2(): any[] { + return []; +} +foo2.join = ""; + +function foo3(): string { + return ""; +} +foo3.trim = ""; + +function foo4(): ({x: number}) { + return {x: 123}; +} +foo4.x = "456"; + + +/// [Declarations] //// + + + +//// [/.src/propertyAssignmentUseParentType3.d.ts] +declare function foo1(): number; +declare namespace foo1 { + var toFixed: string; +} +declare function foo2(): any[]; +declare namespace foo2 { + var join: string; +} +declare function foo3(): string; +declare namespace foo3 { + var trim: string; +} +declare function foo4(): ({ + x: number; +}); +declare namespace foo4 { + var x: string; +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reexportClassDefinition.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reexportClassDefinition.d.ts new file mode 100644 index 0000000000000..d817ee19799ab --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reexportClassDefinition.d.ts @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/externalModules/reexportClassDefinition.ts] //// + +//// [foo3.ts] +import foo2 = require('./foo2') +class x extends foo2.x {} + + +//// [foo1.ts] +class x{} +export = x; + +//// [foo2.ts] +import foo1 = require('./foo1'); + +export = { + x: foo1 +} + + +/// [Declarations] //// + + + +//// [/.src/foo1.d.ts] +declare class x { +} +export = x; + +//// [/.src/foo2.d.ts] +import foo1 = require('./foo1'); +declare const _default: { + x: typeof foo1; +}; +export = _default; + +//// [/.src/foo3.d.ts] +export {}; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reservedWords3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reservedWords3.d.ts new file mode 100644 index 0000000000000..c75ea1e04b74b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reservedWords3.d.ts @@ -0,0 +1,72 @@ +//// [tests/cases/compiler/reservedWords3.ts] //// + +//// [reservedWords3.ts] +function f1(enum) {} +function f2(class) {} +function f3(function) {} +function f4(while) {} +function f5(for) {} + + +/// [Declarations] //// + + + +//// [/.src/reservedWords3.d.ts] +declare function f1(): any; +declare enum { +} +declare function f2(): any; +declare class { +} +declare function f3(): any; +declare function (): any; +declare function f4(): any; +declare function f5(): any; +/// [Errors] //// + +reservedWords3.ts(1,13): error TS1390: 'enum' is not allowed as a parameter name. +reservedWords3.ts(1,17): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +reservedWords3.ts(1,17): error TS1003: Identifier expected. +reservedWords3.ts(2,13): error TS1390: 'class' is not allowed as a parameter name. +reservedWords3.ts(2,18): error TS1005: '{' expected. +reservedWords3.ts(3,13): error TS1390: 'function' is not allowed as a parameter name. +reservedWords3.ts(3,21): error TS2567: Enum declarations can only merge with namespace or other enum declarations. +reservedWords3.ts(3,21): error TS1003: Identifier expected. +reservedWords3.ts(4,13): error TS1390: 'while' is not allowed as a parameter name. +reservedWords3.ts(4,18): error TS1005: '(' expected. +reservedWords3.ts(5,13): error TS1390: 'for' is not allowed as a parameter name. +reservedWords3.ts(5,16): error TS1005: '(' expected. + + +==== reservedWords3.ts (12 errors) ==== + function f1(enum) {} + ~~~~ +!!! error TS1390: 'enum' is not allowed as a parameter name. + +!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. + ~ +!!! error TS1003: Identifier expected. + function f2(class) {} + ~~~~~ +!!! error TS1390: 'class' is not allowed as a parameter name. + ~ +!!! error TS1005: '{' expected. + function f3(function) {} + ~~~~~~~~ +!!! error TS1390: 'function' is not allowed as a parameter name. + +!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. + ~ +!!! error TS1003: Identifier expected. + function f4(while) {} + ~~~~~ +!!! error TS1390: 'while' is not allowed as a parameter name. + ~ +!!! error TS1005: '(' expected. + function f5(for) {} + ~~~ +!!! error TS1390: 'for' is not allowed as a parameter name. + ~ +!!! error TS1005: '(' expected. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/staticsInAFunction.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/staticsInAFunction.d.ts new file mode 100644 index 0000000000000..cb69d542727a5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/staticsInAFunction.d.ts @@ -0,0 +1,69 @@ +//// [tests/cases/compiler/staticsInAFunction.ts] //// + +//// [staticsInAFunction.ts] +function boo{ + static test() + static test(name:string) + static test(name?:any){} +} + + +/// [Declarations] //// + + + +//// [/.src/staticsInAFunction.d.ts] +declare function boo(): void; +/// [Errors] //// + +staticsInAFunction.ts(1,13): error TS1005: '(' expected. +staticsInAFunction.ts(2,4): error TS1128: Declaration or statement expected. +staticsInAFunction.ts(2,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +staticsInAFunction.ts(3,4): error TS1128: Declaration or statement expected. +staticsInAFunction.ts(3,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +staticsInAFunction.ts(3,16): error TS2304: Cannot find name 'name'. +staticsInAFunction.ts(3,20): error TS1005: ',' expected. +staticsInAFunction.ts(3,21): error TS2693: 'string' only refers to a type, but is being used as a value here. +staticsInAFunction.ts(4,4): error TS1128: Declaration or statement expected. +staticsInAFunction.ts(4,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +staticsInAFunction.ts(4,16): error TS2304: Cannot find name 'name'. +staticsInAFunction.ts(4,21): error TS1109: Expression expected. +staticsInAFunction.ts(4,22): error TS2693: 'any' only refers to a type, but is being used as a value here. +staticsInAFunction.ts(4,26): error TS1005: ';' expected. + + +==== staticsInAFunction.ts (14 errors) ==== + function boo{ + ~ +!!! error TS1005: '(' expected. + static test() + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~ +!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. + static test(name:string) + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~ +!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. + ~~~~ +!!! error TS2304: Cannot find name 'name'. + ~ +!!! error TS1005: ',' expected. + ~~~~~~ +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. + static test(name?:any){} + ~~~~~~ +!!! error TS1128: Declaration or statement expected. + ~~~~ +!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. + ~~~~ +!!! error TS2304: Cannot find name 'name'. + ~ +!!! error TS1109: Expression expected. + ~~~ +!!! error TS2693: 'any' only refers to a type, but is being used as a value here. + ~ +!!! error TS1005: ';' expected. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/strictModeOctalLiterals.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/strictModeOctalLiterals.d.ts new file mode 100644 index 0000000000000..0839c150bff2d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/strictModeOctalLiterals.d.ts @@ -0,0 +1,36 @@ +//// [tests/cases/conformance/expressions/literals/strictModeOctalLiterals.ts] //// + +//// [strictModeOctalLiterals.ts] +export enum E { + A = 12 + 01 +} +const orbitol: 01 = 01 + + +/// [Declarations] //// + + + +//// [/.src/strictModeOctalLiterals.d.ts] +export declare enum E { + A = 13 +} +/// [Errors] //// + +strictModeOctalLiterals.ts(2,14): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. +strictModeOctalLiterals.ts(4,16): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. +strictModeOctalLiterals.ts(4,21): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. + + +==== strictModeOctalLiterals.ts (3 errors) ==== + export enum E { + A = 12 + 01 + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'. + } + const orbitol: 01 = 01 + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'. + ~~ +!!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'. + \ No newline at end of file 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..4692ba86070fd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit12.d.ts @@ -0,0 +1,55 @@ +//// [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](): I { return undefined; } + set [Symbol.toPrimitive](x: I) { } + } +} + +/// [Declarations] //// + + + +//// [/.src/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](): I { 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/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts new file mode 100644 index 0000000000000..c7254e872a02d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts @@ -0,0 +1,28 @@ +//// [tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts] //// + +//// [Folder/monorepo/core/index.ts] +import { styles } from "package-a"; + +export function getStyles() { + return styles; +} + +//// [Folder/monorepo/package-a/index.d.ts] +export declare const styles: import("styled-components").InterpolationValue[]; + +//// [Folder/node_modules/styled-components/package.json] +{ + "name": "styled-components", + "version": "3.3.3", + "typings": "typings/styled-components.d.ts" +} + +//// [Folder/node_modules/styled-components/typings/styled-components.d.ts] +export interface InterpolationValue {} + +/// [Declarations] //// + + + +//// [/.src/Folder/monorepo/core/index.d.ts] +export declare function getStyles(): import("styled-components").InterpolationValue[]; 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..a3b616149623a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralTypes4.d.ts @@ -0,0 +1,783 @@ +//// [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] //// + + + +//// [/.src/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; +/// [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/templateStringInFunctionParameterType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterType.d.ts new file mode 100644 index 0000000000000..43090db2e46a9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterType.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts] //// + +//// [templateStringInFunctionParameterType.ts] +function f(: any: any`hello`): any; +function f(x: string): any; +function f(x: string) { + return x; +} + +/// [Declarations] //// + + + +//// [/.src/templateStringInFunctionParameterType.d.ts] +declare function f(any: any, : any): any; +declare function f(x: string): any; +/// [Errors] //// + +templateStringInFunctionParameterType.ts(1,12): error TS1138: Parameter declaration expected. +templateStringInFunctionParameterType.ts(1,22): error TS1005: ',' expected. + + +==== templateStringInFunctionParameterType.ts (2 errors) ==== + function f(: any: any`hello`): any; + ~ +!!! error TS1138: Parameter declaration expected. + ~~~~~~~ +!!! error TS1005: ',' expected. + function f(x: string): any; + function f(x: string) { + return x; + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterTypeES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterTypeES6.d.ts new file mode 100644 index 0000000000000..196e02f290f93 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterTypeES6.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts] //// + +//// [templateStringInFunctionParameterTypeES6.ts] +function f(: any: any`hello`): any; +function f(x: string): any; +function f(x: string) { + return x; +} + +/// [Declarations] //// + + + +//// [/.src/templateStringInFunctionParameterTypeES6.d.ts] +declare function f(any: any, : any): any; +declare function f(x: string): any; +/// [Errors] //// + +templateStringInFunctionParameterTypeES6.ts(1,12): error TS1138: Parameter declaration expected. +templateStringInFunctionParameterTypeES6.ts(1,22): error TS1005: ',' expected. + + +==== templateStringInFunctionParameterTypeES6.ts (2 errors) ==== + function f(: any: any`hello`): any; + ~ +!!! error TS1138: Parameter declaration expected. + ~~~~~~~ +!!! error TS1005: ',' expected. + function f(x: string): any; + function f(x: string) { + return x; + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringWithEmbeddedYieldKeyword.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringWithEmbeddedYieldKeyword.d.ts new file mode 100644 index 0000000000000..78604483ca25f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringWithEmbeddedYieldKeyword.d.ts @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts] //// + +//// [templateStringWithEmbeddedYieldKeyword.ts] +function* gen { + // Once this is supported, yield *must* be parenthesized. + var x = `abc${ yield 10 }def`; +} + + +/// [Declarations] //// + + + +//// [/.src/templateStringWithEmbeddedYieldKeyword.d.ts] +declare function gen(): {}; +/// [Errors] //// + +error TS2318: Cannot find global type 'IterableIterator'. +templateStringWithEmbeddedYieldKeyword.ts(1,15): error TS1005: '(' expected. + + +!!! error TS2318: Cannot find global type 'IterableIterator'. +==== templateStringWithEmbeddedYieldKeyword.ts (1 errors) ==== + function* gen { + ~ +!!! error TS1005: '(' expected. + // Once this is supported, yield *must* be parenthesized. + var x = `abc${ yield 10 }def`; + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContexts.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContexts.d.ts new file mode 100644 index 0000000000000..ff8e8fa05c724 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContexts.d.ts @@ -0,0 +1,144 @@ +//// [tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts] //// + +//// [thisInInvalidContexts.ts] +class BaseErrClass { + constructor(t: any) { } +} + +class ClassWithNoInitializer extends BaseErrClass { + t: any; + //'this' in optional super call + constructor() { + super(this); // Error + } +} + +class ClassWithInitializer extends BaseErrClass { + t = 4; + //'this' in required super call + constructor() { + super(this); // Error + } +} + +module M { + //'this' in module variable + var x = this; // Error +} + +//'this' as type parameter constraint +// function fn() { } // Error + +//'this' as a type argument +function genericFunc(x: T): void { } +genericFunc(undefined); // Should be an error + +const ErrClass3Base: typeof globalThis = this; +class ErrClass3 extends ErrClass3Base { + +} + +//'this' as a computed enum value +enum SomeEnum { + A = this, // Should not be allowed + B = this.spaaaace // Also should not be allowed +} + + + +/// [Declarations] //// + + + +//// [/.src/thisInInvalidContexts.d.ts] +declare class BaseErrClass { + constructor(t: any); +} +declare class ClassWithNoInitializer extends BaseErrClass { + t: any; + constructor(); +} +declare class ClassWithInitializer extends BaseErrClass { + t: number; + constructor(); +} +declare namespace M { +} +declare function genericFunc(x: T): void; +declare const ErrClass3Base: typeof globalThis; +declare class ErrClass3 extends ErrClass3Base { +} +declare enum SomeEnum { + A,// Should not be allowed + B +} +/// [Errors] //// + +thisInInvalidContexts.ts(9,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +thisInInvalidContexts.ts(17,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +thisInInvalidContexts.ts(23,13): error TS2331: 'this' cannot be referenced in a module or namespace body. +thisInInvalidContexts.ts(31,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisInInvalidContexts.ts(34,25): error TS2507: Type 'typeof globalThis' is not a constructor function type. +thisInInvalidContexts.ts(40,9): error TS2332: 'this' cannot be referenced in current location. +thisInInvalidContexts.ts(41,9): error TS2332: 'this' cannot be referenced in current location. + + +==== thisInInvalidContexts.ts (7 errors) ==== + class BaseErrClass { + constructor(t: any) { } + } + + class ClassWithNoInitializer extends BaseErrClass { + t: any; + //'this' in optional super call + constructor() { + super(this); // Error + ~~~~ +!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. + } + } + + class ClassWithInitializer extends BaseErrClass { + t = 4; + //'this' in required super call + constructor() { + super(this); // Error + ~~~~ +!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. + } + } + + module M { + //'this' in module variable + var x = this; // Error + ~~~~ +!!! error TS2331: 'this' cannot be referenced in a module or namespace body. + } + + //'this' as type parameter constraint + // function fn() { } // Error + + //'this' as a type argument + function genericFunc(x: T): void { } + genericFunc(undefined); // Should be an error + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + + const ErrClass3Base: typeof globalThis = this; + class ErrClass3 extends ErrClass3Base { + ~~~~~~~~~~~~~ +!!! error TS2507: Type 'typeof globalThis' is not a constructor function type. + + } + + //'this' as a computed enum value + enum SomeEnum { + A = this, // Should not be allowed + ~~~~ +!!! error TS2332: 'this' cannot be referenced in current location. + B = this.spaaaace // Also should not be allowed + ~~~~ +!!! error TS2332: 'this' cannot be referenced in current location. + } + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContextsExternalModule.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContextsExternalModule.d.ts new file mode 100644 index 0000000000000..d2326e31b7cc4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContextsExternalModule.d.ts @@ -0,0 +1,123 @@ +//// [tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts] //// + +//// [thisInInvalidContextsExternalModule.ts] +class BaseErrClass { + constructor(t: any) { } +} + +class ClassWithNoInitializer extends BaseErrClass { + t; + //'this' in optional super call + constructor() { + super(this); // error: "super" has to be called before "this" accessing + } +} + +class ClassWithInitializer extends BaseErrClass { + t = 4; + //'this' in required super call + constructor() { + super(this); // Error + } +} + +module M { + //'this' in module variable + var x = this; // Error +} + +//'this' as type parameter constraint +// function fn() { } // Error + +//'this' as a type argument +function genericFunc(x: T) { } +genericFunc(undefined); // Should be an error + +class ErrClass3 extends this { + +} + +//'this' as a computed enum value +enum SomeEnum { + A = this, // Should not be allowed + B = this.spaaaace // Also should not be allowed +} + +export = this; // Should be an error + +/// [Declarations] //// + + + +//// [/.src/thisInInvalidContextsExternalModule.d.ts] +declare const _default: undefined; +export = _default; +/// [Errors] //// + +thisInInvalidContextsExternalModule.ts(9,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +thisInInvalidContextsExternalModule.ts(17,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. +thisInInvalidContextsExternalModule.ts(23,13): error TS2331: 'this' cannot be referenced in a module or namespace body. +thisInInvalidContextsExternalModule.ts(31,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisInInvalidContextsExternalModule.ts(33,25): error TS2507: Type 'undefined' is not a constructor function type. +thisInInvalidContextsExternalModule.ts(39,9): error TS2332: 'this' cannot be referenced in current location. +thisInInvalidContextsExternalModule.ts(40,9): error TS2332: 'this' cannot be referenced in current location. + + +==== thisInInvalidContextsExternalModule.ts (7 errors) ==== + class BaseErrClass { + constructor(t: any) { } + } + + class ClassWithNoInitializer extends BaseErrClass { + t; + //'this' in optional super call + constructor() { + super(this); // error: "super" has to be called before "this" accessing + ~~~~ +!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. + } + } + + class ClassWithInitializer extends BaseErrClass { + t = 4; + //'this' in required super call + constructor() { + super(this); // Error + ~~~~ +!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. + } + } + + module M { + //'this' in module variable + var x = this; // Error + ~~~~ +!!! error TS2331: 'this' cannot be referenced in a module or namespace body. + } + + //'this' as type parameter constraint + // function fn() { } // Error + + //'this' as a type argument + function genericFunc(x: T) { } + genericFunc(undefined); // Should be an error + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + + class ErrClass3 extends this { + ~~~~ +!!! error TS2507: Type 'undefined' is not a constructor function type. + + } + + //'this' as a computed enum value + enum SomeEnum { + A = this, // Should not be allowed + ~~~~ +!!! error TS2332: 'this' cannot be referenced in current location. + B = this.spaaaace // Also should not be allowed + ~~~~ +!!! error TS2332: 'this' cannot be referenced in current location. + } + + export = this; // Should be an error \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInPropertyBoundDeclarations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInPropertyBoundDeclarations.d.ts new file mode 100644 index 0000000000000..6da819295b4e0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInPropertyBoundDeclarations.d.ts @@ -0,0 +1,181 @@ +//// [tests/cases/compiler/thisInPropertyBoundDeclarations.ts] //// + +//// [thisInPropertyBoundDeclarations.ts] +class Bug { + private name: string; + + private static func: Function[] = [ + (that: Bug, name: string) => { + that.foo(name); + } + ]; + + private foo(name: string) { + this.name = name; + } +} + +// Valid use of this in a property bound decl +class A { + prop1 = function(): void { + this; + }; + + prop2 = function(): void { + function inner() { + this; + } + () => this; + }; + + prop3 = (): void => { + function inner() { + this; + } + }; + + prop4 = { + a: function(): any { return this; }, + }; + + prop5 = (): { + a: () => any; + } => { + return { + a: function() { return this; }, + }; + }; +} + +class B { + prop1: this = this; + + prop2 = (): this => this; + + prop3 = (): () => () => () => this => () => () => () => this; + + prop4: string = ' ' + + function() { + } + + ' ' + + (() => () => () => this); + + prop5 = { + a: (): this => { return this; } + }; + + prop6 = () => { + return { + a: () => { return this; } + }; + }; +} + +/// [Declarations] //// + + + +//// [/.src/thisInPropertyBoundDeclarations.d.ts] +declare class Bug { + private name; + private static func; + private foo; +} +declare class A { + prop1: () => void; + prop2: () => void; + prop3: () => void; + prop4: { + a: () => any; + }; + prop5: () => { + a: () => any; + }; +} +declare class B { + prop1: this; + prop2: () => this; + prop3: () => () => () => () => this; + prop4: string; + prop5: { + a: () => this; + }; + prop6: any; +} +/// [Errors] //// + +thisInPropertyBoundDeclarations.ts(64,5): error TS2527: The inferred type of 'prop6' references an inaccessible 'this' type. A type annotation is necessary. + + +==== thisInPropertyBoundDeclarations.ts (1 errors) ==== + class Bug { + private name: string; + + private static func: Function[] = [ + (that: Bug, name: string) => { + that.foo(name); + } + ]; + + private foo(name: string) { + this.name = name; + } + } + + // Valid use of this in a property bound decl + class A { + prop1 = function(): void { + this; + }; + + prop2 = function(): void { + function inner() { + this; + } + () => this; + }; + + prop3 = (): void => { + function inner() { + this; + } + }; + + prop4 = { + a: function(): any { return this; }, + }; + + prop5 = (): { + a: () => any; + } => { + return { + a: function() { return this; }, + }; + }; + } + + class B { + prop1: this = this; + + prop2 = (): this => this; + + prop3 = (): () => () => () => this => () => () => () => this; + + prop4: string = ' ' + + function() { + } + + ' ' + + (() => () => () => this); + + prop5 = { + a: (): this => { return this; } + }; + + prop6 = () => { + ~~~~~ +!!! error TS2527: The inferred type of 'prop6' references an inaccessible 'this' type. A type annotation is necessary. + return { + a: () => { return this; } + }; + }; + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/this_inside-enum-should-not-be-allowed.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/this_inside-enum-should-not-be-allowed.d.ts new file mode 100644 index 0000000000000..ac040daa8fdcd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/this_inside-enum-should-not-be-allowed.d.ts @@ -0,0 +1,43 @@ +//// [tests/cases/compiler/this_inside-enum-should-not-be-allowed.ts] //// + +//// [this_inside-enum-should-not-be-allowed.ts] +enum TopLevelEnum { + ThisWasAllowedButShouldNotBe = this // Should not be allowed +} + +module ModuleEnum { + enum EnumInModule { + WasADifferentError = this // this was handled as if this was in a module + } +} + +/// [Declarations] //// + + + +//// [/.src/this_inside-enum-should-not-be-allowed.d.ts] +declare enum TopLevelEnum { + ThisWasAllowedButShouldNotBe +} +declare namespace ModuleEnum { +} +/// [Errors] //// + +this_inside-enum-should-not-be-allowed.ts(2,36): error TS2332: 'this' cannot be referenced in current location. +this_inside-enum-should-not-be-allowed.ts(7,30): error TS2332: 'this' cannot be referenced in current location. + + +==== this_inside-enum-should-not-be-allowed.ts (2 errors) ==== + enum TopLevelEnum { + ThisWasAllowedButShouldNotBe = this // Should not be allowed + ~~~~ +!!! error TS2332: 'this' cannot be referenced in current location. + } + + module ModuleEnum { + enum EnumInModule { + WasADifferentError = this // this was handled as if this was in a module + ~~~~ +!!! error TS2332: 'this' cannot be referenced in current location. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/twoAccessorsWithSameName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/twoAccessorsWithSameName.d.ts new file mode 100644 index 0000000000000..8aa4dd0d0ad05 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/twoAccessorsWithSameName.d.ts @@ -0,0 +1,125 @@ +//// [tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts] //// + +//// [twoAccessorsWithSameName.ts] +class C { + get x(): number { return 1; } + get x(): number { return 1; } // error +} + +class D { + set x(v: any) { } + set x(v: any) { } // error +} + +class E { + get x(): number { + return 1; + } + set x(v) { } +} + +var x = { + get x() { + return 1; + }, + + // error + get x(): number { + return 1; + } +} + +var y: { + x: number; +} = { + get x(): number { + return 1; + }, + set x(v) { } +} + +/// [Declarations] //// + + + +//// [/.src/twoAccessorsWithSameName.d.ts] +declare class C { + get x(): number; + get x(): number; +} +declare class D { + set x(v: any); + set x(v: any); +} +declare class E { + get x(): number; + set x(v: number); +} +declare var x: { + readonly x: number; +}; +declare var y: { + x: number; +}; +/// [Errors] //// + +twoAccessorsWithSameName.ts(2,9): error TS2300: Duplicate identifier 'x'. +twoAccessorsWithSameName.ts(3,9): error TS2300: Duplicate identifier 'x'. +twoAccessorsWithSameName.ts(7,9): error TS2300: Duplicate identifier 'x'. +twoAccessorsWithSameName.ts(8,9): error TS2300: Duplicate identifier 'x'. +twoAccessorsWithSameName.ts(19,9): error TS2300: Duplicate identifier 'x'. +twoAccessorsWithSameName.ts(24,9): error TS1118: An object literal cannot have multiple get/set accessors with the same name. +twoAccessorsWithSameName.ts(24,9): error TS2300: Duplicate identifier 'x'. + + +==== twoAccessorsWithSameName.ts (7 errors) ==== + class C { + get x(): number { return 1; } + ~ +!!! error TS2300: Duplicate identifier 'x'. + get x(): number { return 1; } // error + ~ +!!! error TS2300: Duplicate identifier 'x'. + } + + class D { + set x(v: any) { } + ~ +!!! error TS2300: Duplicate identifier 'x'. + set x(v: any) { } // error + ~ +!!! error TS2300: Duplicate identifier 'x'. + } + + class E { + get x(): number { + return 1; + } + set x(v) { } + } + + var x = { + get x() { + ~ +!!! error TS2300: Duplicate identifier 'x'. + return 1; + }, + + // error + get x(): number { + ~ +!!! error TS1118: An object literal cannot have multiple get/set accessors with the same name. + ~ +!!! error TS2300: Duplicate identifier 'x'. + return 1; + } + } + + var y: { + x: number; + } = { + get x(): number { + return 1; + }, + set x(v) { } + } \ No newline at end of file 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..29e4a035ada7d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts @@ -0,0 +1,317 @@ +//// [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) { + return n.toString(); +} +ExpandoExpr.prop = { x: 2 } +ExpandoExpr.prop = { y: "" } +ExpandoExpr.m = function(n: number) { + return n + 1; +} +var n: number = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length + +const ExpandoArrow: { + (n: number): string; + prop: number; + m(n: number): number; +} = (n: number) => 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: number = 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: (n: number) => string = function (n: number) { + return n.toString(); +} +ExpandoExpr2.prop = 2 +ExpandoExpr2.m = function(n: number) { + return n + 1; +} +var n: number = 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: number = 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: number = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n + + + +/// [Declarations] //// + + + +//// [/.src/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; +/// [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,30): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. +typeFromPropertyAssignment29.ts(81,50): 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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. +typeFromPropertyAssignment29.ts(91,50): 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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. +typeFromPropertyAssignment29.ts(101,50): 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) { + return n.toString(); + } + ExpandoExpr.prop = { x: 2 } + ExpandoExpr.prop = { y: "" } + ExpandoExpr.m = function(n: number) { + return n + 1; + } + var n: number = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length + + const ExpandoArrow: { + (n: number): string; + prop: number; + m(n: number): number; + } = (n: number) => 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: number = 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: (n: number) => string = function (n: number) { + 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: number = 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: number = 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: number = 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/typeFromPropertyAssignment31.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment31.d.ts new file mode 100644 index 0000000000000..5f6bd9c9acd0b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment31.d.ts @@ -0,0 +1,92 @@ +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment31.ts] //// + +//// [typeFromPropertyAssignment31.ts] +function ExpandoMerge(n: number): number { + return n; +} +ExpandoMerge.p1 = 111 +ExpandoMerge.m = function(n: number) { + return n + 1; +} +namespace ExpandoMerge { + export var p2 = 222; +} +ExpandoMerge.p4 = 44444; // ok +ExpandoMerge.p6 = 66666; // ok +ExpandoMerge.p8 = false; // type error +namespace ExpandoMerge { + export var p3 = 333; + export var p4 = 4; + export var p5 = 5; + export let p6 = 6; + export let p7 = 7; + export var p8 = 6; + export let p9 = 7; +} +ExpandoMerge.p5 = 555555; // ok +ExpandoMerge.p7 = 777777; // ok +ExpandoMerge.p9 = false; // type error +var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + + +/// [Declarations] //// + + + +//// [/.src/typeFromPropertyAssignment31.d.ts] +declare function ExpandoMerge(n: number): number; +declare namespace ExpandoMerge { + var p1: number; + var m: (n: number) => number; +} +declare namespace ExpandoMerge { + var p2: number; +} +declare namespace ExpandoMerge { + var p3: number; + var p4: number; + var p5: number; + let p6: number; + let p7: number; + var p8: number; + let p9: number; +} +declare var n: number; +/// [Errors] //// + +typeFromPropertyAssignment31.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. +typeFromPropertyAssignment31.ts(25,1): error TS2322: Type 'boolean' is not assignable to type 'number'. + + +==== typeFromPropertyAssignment31.ts (2 errors) ==== + function ExpandoMerge(n: number): number { + return n; + } + ExpandoMerge.p1 = 111 + ExpandoMerge.m = function(n: number) { + return n + 1; + } + namespace ExpandoMerge { + export var p2 = 222; + } + ExpandoMerge.p4 = 44444; // ok + ExpandoMerge.p6 = 66666; // ok + ExpandoMerge.p8 = false; // type error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + namespace ExpandoMerge { + export var p3 = 333; + export var p4 = 4; + export var p5 = 5; + export let p6 = 6; + export let p7 = 7; + export var p8 = 6; + export let p9 = 7; + } + ExpandoMerge.p5 = 555555; // ok + ExpandoMerge.p7 = 777777; // ok + ExpandoMerge.p9 = false; // type error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment32.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment32.d.ts new file mode 100644 index 0000000000000..50908a236ae63 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment32.d.ts @@ -0,0 +1,104 @@ +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts] //// + +//// [expando.ts] +function ExpandoMerge(n: number): number { + return n; +} +ExpandoMerge.p1 = 111 +ExpandoMerge.m = function(n: number) { + return n + 1; +} +ExpandoMerge.p4 = 44444; +ExpandoMerge.p5 = 555555; +ExpandoMerge.p6 = 66666; +ExpandoMerge.p7 = 777777; +ExpandoMerge.p8 = false; // type error +ExpandoMerge.p9 = false; // type error +var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + +//// [ns.ts] +namespace ExpandoMerge { + export var p3 = 333; + export var p4 = 4; + export var p5 = 5; + export let p6 = 6; + export let p7 = 7; + export var p8 = 6; + export let p9 = 7; +} +namespace ExpandoMerge { + export var p2 = 222; +} + + +/// [Declarations] //// + + + +//// [/.src/expando.d.ts] +declare function ExpandoMerge(n: number): number; +declare namespace ExpandoMerge { + var p1: number; + var m: (n: number) => number; +} +declare var n: number; + +//// [/.src/ns.d.ts] +declare namespace ExpandoMerge { + var p3: number; + var p4: number; + var p5: number; + let p6: number; + let p7: number; + var p8: number; + let p9: number; +} +declare namespace ExpandoMerge { + var p2: number; +} +/// [Errors] //// + +expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. +expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. +ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. +ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + + +==== expando.ts (2 errors) ==== + function ExpandoMerge(n: number): number { + return n; + } + ExpandoMerge.p1 = 111 + ExpandoMerge.m = function(n: number) { + return n + 1; + } + ExpandoMerge.p4 = 44444; + ExpandoMerge.p5 = 555555; + ExpandoMerge.p6 = 66666; + ExpandoMerge.p7 = 777777; + ExpandoMerge.p8 = false; // type error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + ExpandoMerge.p9 = false; // type error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + +==== ns.ts (2 errors) ==== + namespace ExpandoMerge { + ~~~~~~~~~~~~ +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + export var p3 = 333; + export var p4 = 4; + export var p5 = 5; + export let p6 = 6; + export let p7 = 7; + export var p8 = 6; + export let p9 = 7; + } + namespace ExpandoMerge { + ~~~~~~~~~~~~ +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + export var p2 = 222; + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment33.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment33.d.ts new file mode 100644 index 0000000000000..0e9bf57f314e6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment33.d.ts @@ -0,0 +1,108 @@ +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts] //// + +//// [ns.ts] +namespace ExpandoMerge { + export var p3 = 333; + export var p4 = 4; + export var p5 = 5; + export let p6 = 6; + export let p7 = 7; + export var p8 = 6; + export let p9 = 7; +} +namespace ExpandoMerge { + export var p2 = 222; +} + + +//// [expando.ts] +function ExpandoMerge(n: number): number { + return n; +} +ExpandoMerge.p1 = 111 +ExpandoMerge.m = function(n: number) { + return n + 1; +} +ExpandoMerge.p4 = 44444; +ExpandoMerge.p5 = 555555; +ExpandoMerge.p6 = 66666; +ExpandoMerge.p7 = 777777; +ExpandoMerge.p8 = false; // type error +ExpandoMerge.p9 = false; // type error +var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + + + +/// [Declarations] //// + + + +//// [/.src/expando.d.ts] +declare function ExpandoMerge(n: number): number; +declare namespace ExpandoMerge { + var p1: number; + var m: (n: number) => number; +} +declare var n: number; + +//// [/.src/ns.d.ts] +declare namespace ExpandoMerge { + var p3: number; + var p4: number; + var p5: number; + let p6: number; + let p7: number; + var p8: number; + let p9: number; +} +declare namespace ExpandoMerge { + var p2: number; +} +/// [Errors] //// + +expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. +expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. +ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. +ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + + +==== ns.ts (2 errors) ==== + namespace ExpandoMerge { + ~~~~~~~~~~~~ +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + export var p3 = 333; + export var p4 = 4; + export var p5 = 5; + export let p6 = 6; + export let p7 = 7; + export var p8 = 6; + export let p9 = 7; + } + namespace ExpandoMerge { + ~~~~~~~~~~~~ +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + export var p2 = 222; + } + + +==== expando.ts (2 errors) ==== + function ExpandoMerge(n: number): number { + return n; + } + ExpandoMerge.p1 = 111 + ExpandoMerge.m = function(n: number) { + return n + 1; + } + ExpandoMerge.p4 = 44444; + ExpandoMerge.p5 = 555555; + ExpandoMerge.p6 = 66666; + ExpandoMerge.p7 = 777777; + ExpandoMerge.p8 = false; // type error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + ExpandoMerge.p9 = false; // type error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment36.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment36.d.ts new file mode 100644 index 0000000000000..d879f57b05155 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment36.d.ts @@ -0,0 +1,205 @@ +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts] //// + +//// [typeFromPropertyAssignment36.ts] +function f(b: boolean): { + (): void + e: number + q: boolean + r: number + s: string +} { + function d() { + } + d.e = 12 + d.e + + if (b) { + d.q = false + } + // error d.q might not be assigned + d.q + if (b) { + d.q = false + } + else { + d.q = true + } + d.q + if (b) { + d.r = 1 + } + else { + d.r = 2 + } + d.r + if (b) { + d.s = 'hi' + } + return d +} +// OK to access possibly-unassigned properties outside the initialising scope +var test: string = f(true).s + +function d(): void { +} +d.e = 12 +d.e + +if (!!false) { + d.q = false +} +d.q +if (!!false) { + d.q = false +} +else { + d.q = true +} +d.q +if (!!false) { + d.r = 1 +} +else { + d.r = 2 +} +d.r + +// test function expressions too +const g: { + (): void + expando: number + both: string | number +} = function() { +} +if (!!false) { + g.expando = 1 +} +g.expando // error + +if (!!false) { + g.both = 'hi' +} +else { + g.both = 0 +} +g.both + + +/// [Declarations] //// + + + +//// [/.src/typeFromPropertyAssignment36.d.ts] +declare function f(b: boolean): { + (): void; + e: number; + q: boolean; + r: number; + s: string; +}; +declare var test: string; +declare function d(): void; +declare namespace d { + var e: number; + var q: boolean; + var r: number; +} +declare const g: { + (): void; + expando: number; + both: string | number; +}; +/// [Errors] //// + +typeFromPropertyAssignment36.ts(17,7): error TS2565: Property 'q' is used before being assigned. +typeFromPropertyAssignment36.ts(48,3): error TS2565: Property 'q' is used before being assigned. + + +==== typeFromPropertyAssignment36.ts (2 errors) ==== + function f(b: boolean): { + (): void + e: number + q: boolean + r: number + s: string + } { + function d() { + } + d.e = 12 + d.e + + if (b) { + d.q = false + } + // error d.q might not be assigned + d.q + ~ +!!! error TS2565: Property 'q' is used before being assigned. + if (b) { + d.q = false + } + else { + d.q = true + } + d.q + if (b) { + d.r = 1 + } + else { + d.r = 2 + } + d.r + if (b) { + d.s = 'hi' + } + return d + } + // OK to access possibly-unassigned properties outside the initialising scope + var test: string = f(true).s + + function d(): void { + } + d.e = 12 + d.e + + if (!!false) { + d.q = false + } + d.q + ~ +!!! error TS2565: Property 'q' is used before being assigned. + if (!!false) { + d.q = false + } + else { + d.q = true + } + d.q + if (!!false) { + d.r = 1 + } + else { + d.r = 2 + } + d.r + + // test function expressions too + const g: { + (): void + expando: number + both: string | number + } = function() { + } + if (!!false) { + g.expando = 1 + } + g.expando // error + + if (!!false) { + g.both = 'hi' + } + else { + g.both = 0 + } + g.both + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment38.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment38.d.ts new file mode 100644 index 0000000000000..ede16c55c37bf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment38.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment38.ts] //// + +//// [typeFromPropertyAssignment38.ts] +function F(): void {} +F["prop"] = 3; + +const f: { + (): void; + prop: number; +} = function () {}; +f["prop"] = 3; + + +/// [Declarations] //// + + + +//// [/.src/typeFromPropertyAssignment38.d.ts] +declare function F(): void; +declare namespace F { + var prop: number; +} +declare const f: { + (): void; + prop: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts new file mode 100644 index 0000000000000..34c44ad2b25d5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts @@ -0,0 +1,43 @@ +//// [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(); + +//// [node_modules/ext/package.json] +{ + "name": "ext", + "version": "1.0.0", + "types": "index", + "typesVersions": { + ">=3.1.0-0": { "*" : ["ts3.1/*"] } + } +} + +//// [node_modules/ext/index.d.ts] +export interface A {} +export function fa(): A; + +//// [node_modules/ext/other.d.ts] +export interface B {} +export function fb(): B; + +//// [node_modules/ext/ts3.1/index.d.ts] +export interface A {} +export function fa(): A; + +//// [node_modules/ext/ts3.1/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; 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..5ffefecdc2b65 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.d.ts @@ -0,0 +1,79 @@ +//// [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(); + +//// [node_modules/ext/package.json] +{ + "name": "ext", + "version": "1.0.0", + "types": "index", + "typesVersions": { + ">=3.1.0-0": { "*" : ["ts3.1/*"] } + } +} + +//// [node_modules/ext/index.d.ts] +export interface A {} +export function fa(): A; + +//// [node_modules/ext/other.d.ts] +export interface B {} +export function fb(): B; + +//// [node_modules/ext/ts3.1/index.d.ts] +export * from "../"; + +//// [node_modules/ext/ts3.1/other.d.ts] +export * from "../other"; + + +/// [Declarations] //// + + + +//// [/.src/main.d.ts] +export declare const va: any; +export declare const vb: import("ext/other").B; +/// [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..7f3fe426fe10c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.d.ts @@ -0,0 +1,40 @@ +//// [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(); + +//// [node_modules/ext/package.json] +{ + "name": "ext", + "version": "1.0.0", + "types": "index", + "typesVersions": { + ">=3.1.0-0": { + "index" : ["ts3.1/index"] + } + } +} + +//// [node_modules/ext/index.d.ts] +export interface A {} +export function fa(): A; + +//// [node_modules/ext/other.d.ts] +export interface A2 {} +export function fa(): A2; + +//// [node_modules/ext/ts3.1/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; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/underscoreEscapedNameInEnum.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/underscoreEscapedNameInEnum.d.ts new file mode 100644 index 0000000000000..fb6f2cc576c80 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/underscoreEscapedNameInEnum.d.ts @@ -0,0 +1,18 @@ +//// [tests/cases/compiler/underscoreEscapedNameInEnum.ts] //// + +//// [underscoreEscapedNameInEnum.ts] +enum E { + "__foo" = 1, + bar = E["__foo"] + 1 +} + + +/// [Declarations] //// + + + +//// [/.src/underscoreEscapedNameInEnum.d.ts] +declare enum E { + "__foo" = 1, + bar = 2 +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts new file mode 100644 index 0000000000000..af4dbc9e24e6f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/externalModules/verbatimModuleSyntaxConstEnumUsage.ts] //// + +//// [foo.ts] +export enum Foo { + a = 1, + b, + c, +} + +//// [bar.ts] +import {Foo} from './foo.js'; + +export enum Bar { + a = Foo.a, + c = Foo.c, + e = 5, +} + +/// [Declarations] //// + + + +//// [/.src/bar.d.ts] +export declare enum Bar { + a = 1, + c = 3, + e = 5 +} + +//// [/.src/foo.d.ts] +export declare enum Foo { + a = 1, + b = 2, + c = 3 +} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/wellKnownSymbolExpando.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/wellKnownSymbolExpando.d.ts new file mode 100644 index 0000000000000..bcd1325d7cdcf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/wellKnownSymbolExpando.d.ts @@ -0,0 +1,14 @@ +//// [tests/cases/compiler/wellKnownSymbolExpando.ts] //// + +//// [wellKnownSymbolExpando.ts] +function f(): void {} +f[Symbol.iterator] = function() {} + + +/// [Declarations] //// + + + +//// [/.src/wellKnownSymbolExpando.d.ts] +declare function f(): void; +declare namespace f { } From 9c80f7674ff56c2a89efb7baa5c3aefed9a870d4 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Sun, 12 Nov 2023 21:32:19 +0000 Subject: [PATCH 125/224] Fixed most tests after merging features. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/sourcemap.ts | 2 +- .../declarations/transform-project.ts | 10 +- src/testRunner/compilerRunner.ts | 2 + tests/baselines/reference/api/typescript.d.ts | 6 +- .../auto-fixed/diff/declFileEnums.d.ts.diff | 10 +- .../diff/enumClassification.d.ts.diff | 22 +---- ...hTemplateLiteralsEmitDeclaration.d.ts.diff | 31 +----- .../auto-fixed/dte/declFileEnums.d.ts | 8 +- .../auto-fixed/dte/enumClassification.d.ts | 20 +--- ...erWithTemplateLiteralsEmitDeclaration.d.ts | 29 +----- .../original/diff/constEnumErrors.d.ts.diff | 32 ++++++ .../original/diff/constEnums.d.ts.diff | 54 +++++----- .../diff/enumConstantMembers.d.ts.diff | 63 +++++++++++- .../original/diff/forwardRefInEnum.d.ts.diff | 35 ++++++- .../original/dte/constEnumErrors.d.ts | 23 +---- .../original/dte/constEnums.d.ts | 86 +++------------- .../original/dte/enumConstantMembers.d.ts | 26 +---- .../original/dte/forwardRefInEnum.d.ts | 8 +- .../original/tsc/constEnumErrors.d.ts | 26 +---- .../original/tsc/constEnums.d.ts | 99 ++++--------------- .../original/tsc/enumConstantMembers.d.ts | 44 +-------- .../original/tsc/forwardRefInEnum.d.ts | 18 +--- 22 files changed, 217 insertions(+), 437 deletions(-) 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/transformers/declarations/transform-project.ts b/src/compiler/transformers/declarations/transform-project.ts index 5342808e17245..d0685852356b8 100644 --- a/src/compiler/transformers/declarations/transform-project.ts +++ b/src/compiler/transformers/declarations/transform-project.ts @@ -13,6 +13,7 @@ import { EmitResolver, ensureTrailingDirectorySeparator, factory, + getAreDeclarationMapsEnabled, getBaseFileName, getDeclarationEmitOutputFilePathWorker, getDirectoryPath, @@ -89,13 +90,10 @@ export function transpileDeclaration(sourceFile: SourceFile, emitHost: IsolatedE const sourceMap = getSourceMapGenerator(); printer.writeFile(result, writer, sourceMap?.sourceMapGenerator); if (sourceMap) { - if (!writer.isAtStartOfLine()) writer.rawWrite(getNewLineCharacter(options)); + if (!writer.isAtStartOfLine()) writer.writeLine(); writer.writeComment(sourceMap.sourceMappingURL); } - if (diagnostics.length > 0) { - throw new Error(`Cannot transform file '${sourceFile.fileName}' due to ${diagnostics.length} diagnostics`); - } const declarationPath = getDeclarationEmitOutputFilePathWorker( sourceFile.fileName, options, @@ -134,7 +132,7 @@ export function transpileDeclaration(sourceFile: SourceFile, emitHost: IsolatedE // logic replicated from emitter.ts function getSourceMapGenerator() { - if (!options.declarationMap) return; + if (!getAreDeclarationMapsEnabled(options)) return; const mapOptions = { sourceRoot: options.sourceRoot, @@ -146,7 +144,7 @@ export function transpileDeclaration(sourceFile: SourceFile, emitHost: IsolatedE const sourceRoot = normalizeSlashes(options.sourceRoot || ""); const { declarationMapPath, declarationFilePath } = getOutputPathsFor(sourceFile, emitHost as unknown as EmitHost, /*forceDtsPaths*/ false); const sourceMapGenerator = createSourceMapGenerator( - emitHost as unknown as EmitHost, + emitHost, getBaseFileName(normalizeSlashes(declarationFilePath!)), sourceRoot ? ensureTrailingDirectorySeparator(sourceRoot) : sourceRoot, getSourceMapDirectory(options, sourceFile.fileName, sourceFile), diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 78945d93f051d..1a3375d8fe1b5 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -486,6 +486,7 @@ class IsolatedDeclarationTest extends CompilerTestBase { clonedOptions.forceDtsEmit = true; delete clonedOptions.outFile; delete clonedOptions.out; + delete clonedOptions.declarationMap; const clonedSettings: TestCaseParser.CompilerSettings = { ...compilerEnvironment.testCaseContent.settings, @@ -497,6 +498,7 @@ class IsolatedDeclarationTest extends CompilerTestBase { skipLibCheck: "true", }; delete clonedSettings.outFile; + delete clonedSettings.declarationMap; delete clonedSettings.outfile; delete clonedSettings.out; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 6db34f5daf7ee..965e4423c54fb 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -9831,9 +9831,11 @@ declare namespace ts { function visitEachChild(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; function createEmitDeclarationHost(options: CompilerOptions, sys: System, commonSourceDirectory?: string): IsolatedEmitHost; function transpileDeclaration(sourceFile: SourceFile, emitHost: IsolatedEmitHost): { - code: string; + declaration: string; + declarationPath: string; + declarationMap: string | undefined; + declarationMapPath: string; diagnostics: Diagnostic[]; - outputPath: string; }; function getTsBuildInfoEmitOutputFilePath(options: CompilerOptions): string | undefined; function getOutputFileNames(commandLine: ParsedCommandLine, inputFileName: string, ignoreCase: boolean): readonly string[]; 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 index 97de0e36e1a1d..e0a47b0fb6f45 100644 --- 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 @@ -5,19 +5,17 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -28,4 +28,53 @@ +@@ -28,4 +28,47 @@ "Saturday" = 1, "Sunday" = 2, "Weekend days" = 3 } +/// [Errors] //// + -+declFileEnums.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declFileEnums.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declFileEnums.ts(16,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + -+==== declFileEnums.ts (3 errors) ==== ++==== declFileEnums.ts (1 errors) ==== + enum e1 { + a, + b, @@ -27,8 +25,6 @@ + enum e2 { + a = 10, + b = a + 2, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = 10, + } + @@ -38,8 +34,6 @@ + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = a + 3 -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum e4 { 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 index 792536ba7efc0..fe11d6f59c784 100644 --- 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 @@ -5,26 +5,20 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -57,4 +57,118 @@ +@@ -57,4 +57,100 @@ B, C, D } +/// [Errors] //// + -+enumClassification.ts(50,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumClassification.ts(51,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumClassification.ts(52,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumClassification.ts(66,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumClassification.ts(67,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumClassification.ts(68,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumClassification.ts(74,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumClassification.ts(75,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumClassification.ts(76,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumClassification.ts(77,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + -+==== enumClassification.ts (10 errors) ==== ++==== 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 @@ -75,14 +69,8 @@ + A = 10, + B = "hello", + C = A, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + D = B, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + E = C, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Examples of numeric enum types with only constant members @@ -97,14 +85,8 @@ + + enum E12 { + A = 1 << 0, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + B = 1 << 1, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + C = 1 << 2 -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // Examples of numeric enum types with constant and computed members 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 index fe342018bd99f..573d4dc318314 100644 --- 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 @@ -5,26 +5,17 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -33,4 +33,79 @@ +@@ -33,4 +33,52 @@ a = "1", b = "11", c = "21" } +/// [Errors] //// + -+enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(17,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(18,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(19,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(32,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + -+==== enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts (10 errors) ==== ++==== enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts (1 errors) ==== + enum T1 { + a = `1` + } @@ -37,34 +28,20 @@ + + enum T3 { + a = `1` + `1` -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum T4 { + a = `1`, + b = `1` + `1`, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = `1` + "2", -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = "2" + `1`, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + e = "2" + `1` + `1` -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + enum T5 { + a = `1`, + b = `1` + `2`, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = `1` + `2` + `3`, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + d = 1 + } + @@ -78,11 +55,7 @@ + declare enum T7 { + a = `1`, + b = `1` + `1`, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c = "2" + `1` -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + \ No newline at end of file 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 index 505817e1d0fa8..6f3d4b5cf0690 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts @@ -72,12 +72,10 @@ declare enum e5 { } /// [Errors] //// -declFileEnums.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. declFileEnums.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declFileEnums.ts(16,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== declFileEnums.ts (3 errors) ==== +==== declFileEnums.ts (1 errors) ==== enum e1 { a, b, @@ -87,8 +85,6 @@ declFileEnums.ts(16,5): error TS9007: Declaration emit for this file requires ty enum e2 { a = 10, b = a + 2, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. c = 10, } @@ -98,8 +94,6 @@ declFileEnums.ts(16,5): error TS9007: Declaration emit for this file requires ty ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. c = a + 3 - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } enum e4 { 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 index 5bec709ae8a94..758df90a0193d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumClassification.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumClassification.d.ts @@ -145,19 +145,13 @@ declare enum E20 { } /// [Errors] //// -enumClassification.ts(50,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumClassification.ts(51,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumClassification.ts(52,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumClassification.ts(66,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumClassification.ts(67,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumClassification.ts(68,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumClassification.ts(74,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumClassification.ts(75,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumClassification.ts(76,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumClassification.ts(77,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== enumClassification.ts (10 errors) ==== +==== 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 @@ -208,14 +202,8 @@ enumClassification.ts(77,5): error TS9007: Declaration emit for this file requir A = 10, B = "hello", C = A, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. D = B, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. E = C, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } // Examples of numeric enum types with only constant members @@ -230,14 +218,8 @@ enumClassification.ts(77,5): error TS9007: Declaration emit for this file requir enum E12 { A = 1 << 0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. B = 1 << 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. C = 1 << 2 - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } // Examples of numeric enum types with constant and computed members 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 index d48f4530a5832..71199923f4141 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts @@ -82,19 +82,10 @@ declare enum T7 { } /// [Errors] //// -enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(17,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(18,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(19,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(32,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts (10 errors) ==== +==== enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts (1 errors) ==== enum T1 { a = `1` } @@ -107,34 +98,20 @@ enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(38,5): error TS9007: De enum T3 { a = `1` + `1` - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } enum T4 { a = `1`, b = `1` + `1`, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. c = `1` + "2", - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. d = "2" + `1`, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. e = "2" + `1` + `1` - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } enum T5 { a = `1`, b = `1` + `2`, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. c = `1` + `2` + `3`, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. d = 1 } @@ -148,10 +125,6 @@ enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(38,5): error TS9007: De declare enum T7 { a = `1`, b = `1` + `1`, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. c = "2" + `1` - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff index f2c3eb3acd422..d43d07e20b5d4 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff @@ -16,3 +16,35 @@ Y1 } declare const enum E2 { +@@ -34,8 +34,9 @@ + /// [Errors] //// + + constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. + constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. ++constEnumErrors.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + constEnumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. + constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. +@@ -57,9 +58,9 @@ + constEnumErrors.ts(42,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. + + +-==== constEnumErrors.ts (23 errors) ==== ++==== constEnumErrors.ts (24 errors) ==== + const enum E { + ~ + !!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. + A +@@ -74,8 +75,10 @@ + const enum E1 { + // illegal case + // forward reference to the element of the same enum + X = Y, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + // forward reference to the element of the same enum + Y = E1.Z, diff --git a/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts.diff index ccae77e13405b..d3829b4e2464d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts.diff @@ -5,22 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -28,11 +28,11 @@ - T = 11, - U = 11, - V = 11, - W = 11, -- W1 = 100, -- W2 = 100, -- W3 = 100, -+ W1, -+ W2, -+ W3, - W4 = 11, - W5 = 11 - } - declare const enum Comments { -@@ -48,19 +48,19 @@ +@@ -48,9 +48,9 @@ namespace B { namespace C { const enum E { @@ -31,15 +16,34 @@ } } } - declare namespace A { - namespace B { - namespace C { - const enum E { -- V3 = 64, -- V4 = 2 -+ V3, -+ V4 +@@ -102,17 +102,18 @@ + constEnums.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnums.ts(34,10): error TS2474: const enum member initializers must be constant expressions. + constEnums.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnums.ts(35,10): error TS2474: const enum member initializers must be constant expressions. ++constEnums.ts(55,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnums.ts(65,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnums.ts(65,22): error TS2474: const enum member initializers must be constant expressions. + constEnums.ts(66,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnums.ts(66,22): error TS2474: const enum member initializers must be constant expressions. + constEnums.ts(124,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnums.ts(166,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== constEnums.ts (12 errors) ==== ++==== constEnums.ts (13 errors) ==== + const enum Enum1 { + A0 = 100, + } + +@@ -178,8 +179,10 @@ + export module C { + export const enum E { + V1 = 1, + V2 = A.B.C.E.V1 | 100 ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } } } } - } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts.diff index e9ebac4ddfe71..8c9ccd76257ef 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -22,20 +22,20 @@ +@@ -22,33 +22,39 @@ a = Infinity, b = Infinity, c = Infinity, @@ -31,4 +31,63 @@ } /// [Errors] //// - enumConstantMembers.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMembers.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMembers.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMembers.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumConstantMembers.ts(32,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + enumConstantMembers.ts(33,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + enumConstantMembers.ts(34,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + enumConstantMembers.ts(35,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. ++enumConstantMembers.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumConstantMembers.ts(36,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. ++enumConstantMembers.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumConstantMembers.ts(37,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. ++enumConstantMembers.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + enumConstantMembers.ts(38,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + + +-==== enumConstantMembers.ts (7 errors) ==== ++==== enumConstantMembers.ts (13 errors) ==== + // Constant members allow negatives, but not decimals. Also hex literals are allowed + enum E1 { + a = 1, + b +@@ -73,10 +79,16 @@ + b = 2 / 0.0, + c = 1.0 / 0.0, + d = 0.0 / 0.0, + e = NaN, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + f = Infinity, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + g = -Infinity ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + const enum E6 { + a = 1 / 0, +@@ -91,14 +103,20 @@ + d = 0.0 / 0.0, + ~~~~~~~~~ + !!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. + e = NaN, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ + !!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. + f = Infinity, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~ + !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + g = -Infinity ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~ + !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. + } + +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff index 4ff1f216f7dec..aaea688a7af84 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff @@ -5,20 +5,45 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,12 +1,12 @@ +@@ -1,32 +1,38 @@ //// [/.src/forwardRefInEnum.d.ts] declare enum E1 { - X = 0, - X1 = 0, -- Y = 0, -- Y1 = 0 + X, + X1, -+ Y, -+ Y1 + Y, + Y1 } declare enum E1 { Z = 4 } + /// [Errors] //// + ++forwardRefInEnum.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. ++forwardRefInEnum.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + forwardRefInEnum.ts(5,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + forwardRefInEnum.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + forwardRefInEnum.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== forwardRefInEnum.ts (4 errors) ==== ++==== forwardRefInEnum.ts (6 errors) ==== + enum E1 { + // illegal case + // forward reference to the element of the same enum + X = Y, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ + !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + X1 = E1["Y"], ++ ~~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ + !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. + // forward reference to the element of the same enum + Y = E1.Z, diff --git a/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts index 33bc368283a22..842c7ed0703ae 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts @@ -104,19 +104,12 @@ constEnumErrors.ts(27,9): error TS9007: Declaration emit for this file requires constEnumErrors.ts(28,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(28,10): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. constEnumErrors.ts(33,5): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -constEnumErrors.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumErrors.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumErrors.ts(39,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumErrors.ts(41,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(41,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -constEnumErrors.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(42,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -constEnumErrors.ts(43,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. -==== constEnumErrors.ts (31 errors) ==== +==== constEnumErrors.ts (24 errors) ==== const enum E { ~ !!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. @@ -196,30 +189,16 @@ constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was eval const enum NaNOrInfinity { A = 9007199254740992, B = A * A, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. C = B * B, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. D = C * C, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. E = D * D, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. F = E * E, // overflow - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~ !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. G = 1 / 0, // overflow - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~ !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. H = 0 / 0 // NaN - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~ !!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/constEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/constEnums.d.ts index 7b096c146a202..48ac0e23f08dc 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/constEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/constEnums.d.ts @@ -281,40 +281,22 @@ declare function bar(e: A.B.C.E): number; declare function baz(c: Comments): invalid; /// [Errors] //// -constEnums.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(16,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(17,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(18,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(19,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(23,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(24,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnums.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(33,10): error TS2474: const enum member initializers must be constant expressions. constEnums.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(34,10): error TS2474: const enum member initializers must be constant expressions. constEnums.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(35,10): error TS2474: const enum member initializers must be constant expressions. constEnums.ts(55,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnums.ts(65,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(65,22): error TS2474: const enum member initializers must be constant expressions. constEnums.ts(66,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(66,22): error TS2474: const enum member initializers must be constant expressions. constEnums.ts(124,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnums.ts(166,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== constEnums.ts (31 errors) ==== +==== constEnums.ts (13 errors) ==== const enum Enum1 { A0 = 100, } @@ -325,85 +307,45 @@ constEnums.ts(166,10): error TS9007: Declaration emit for this file requires typ B, C = 10, D = A | B, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. E = A | 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. F = 1 | A, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. G = (1 & 1), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. H = ~(A | B), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. I = A >>> 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. J = 1 & A, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. K = ~(1 | 5), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. L = ~D, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. M = E << B, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. N = E << 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. O = E >> B, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. P = E >> 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. PQ = E ** 2, - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. Q = -D, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. R = C & 5, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. S = 5 & C, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. T = C | D, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. U = C | 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. V = 10 | D, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. W = Enum1.V, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. // correct cases: reference to the enum member from different enum declaration W1 = A0, ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS2474: const enum member initializers must be constant expressions. W2 = Enum1.A0, ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. W3 = Enum1["A0"], ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. W4 = Enum1["W"], - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. W5 = Enum1[`V`], - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } const enum Comments { @@ -436,9 +378,13 @@ constEnums.ts(166,10): error TS9007: Declaration emit for this file requires typ V3 = A.B.C.E["V2"] & 200, ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. V4 = A.B.C.E[`V1`] << 1, ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. } } } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts index fc6bb6bcca91e..1580c205246bd 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts @@ -84,20 +84,12 @@ declare const enum E6 { } /// [Errors] //// -enumConstantMembers.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(23,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(24,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumConstantMembers.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumConstantMembers.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumConstantMembers.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(32,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumConstantMembers.ts(32,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumConstantMembers.ts(33,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumConstantMembers.ts(34,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumConstantMembers.ts(35,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. enumConstantMembers.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumConstantMembers.ts(36,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. @@ -107,7 +99,7 @@ enumConstantMembers.ts(38,5): error TS9007: Declaration emit for this file requi enumConstantMembers.ts(38,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -==== enumConstantMembers.ts (21 errors) ==== +==== enumConstantMembers.ts (13 errors) ==== // Constant members allow negatives, but not decimals. Also hex literals are allowed enum E1 { a = 1, @@ -130,17 +122,9 @@ enumConstantMembers.ts(38,9): error TS2477: 'const' enum member initializer was enum E5 { a = 1 / 0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. b = 2 / 0.0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. c = 1.0 / 0.0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. d = 0.0 / 0.0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. e = NaN, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -154,23 +138,15 @@ enumConstantMembers.ts(38,9): error TS2477: 'const' enum member initializer was const enum E6 { a = 1 / 0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~ !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. b = 2 / 0.0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~~~ !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. c = 1.0 / 0.0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~~~~~ !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. d = 0.0 / 0.0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~~~~~ !!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. e = NaN, diff --git a/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts index b26b75e3fc0e9..e18c9c0b69666 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts @@ -37,12 +37,10 @@ forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declarati forwardRefInEnum.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. forwardRefInEnum.ts(5,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. forwardRefInEnum.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -forwardRefInEnum.ts(7,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. forwardRefInEnum.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -forwardRefInEnum.ts(8,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -==== forwardRefInEnum.ts (8 errors) ==== +==== forwardRefInEnum.ts (6 errors) ==== enum E1 { // illegal case // forward reference to the element of the same enum @@ -60,13 +58,9 @@ forwardRefInEnum.ts(8,10): error TS2651: A member initializer in a enum declarat Y = E1.Z, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. Y1 = E1["Z"] ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. } enum E1 { diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts index 6da8de432c55a..74d745c13222c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts @@ -85,7 +85,6 @@ declare const enum NaNOrInfinity { constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -constEnumErrors.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. constEnumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. @@ -104,19 +103,12 @@ constEnumErrors.ts(27,9): error TS9007: Declaration emit for this file requires constEnumErrors.ts(28,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(28,10): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. constEnumErrors.ts(33,5): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -constEnumErrors.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumErrors.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumErrors.ts(39,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumErrors.ts(41,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(41,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -constEnumErrors.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(42,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -constEnumErrors.ts(43,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. -==== constEnumErrors.ts (31 errors) ==== +==== constEnumErrors.ts (23 errors) ==== const enum E { ~ !!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. @@ -133,8 +125,6 @@ constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was eval // illegal case // forward reference to the element of the same enum X = Y, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~ !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. // forward reference to the element of the same enum @@ -196,30 +186,16 @@ constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was eval const enum NaNOrInfinity { A = 9007199254740992, B = A * A, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. C = B * B, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. D = C * C, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. E = D * D, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. F = E * E, // overflow - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~ !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. G = 1 / 0, // overflow - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~ !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. H = 0 / 0 // NaN - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~ !!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/constEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/constEnums.d.ts index ddbb46d7e9372..6141be78da785 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/constEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/constEnums.d.ts @@ -213,9 +213,9 @@ declare const enum Enum1 { U = 11, V = 11, W = 11, - W1 = 100, - W2 = 100, - W3 = 100, + W1, + W2, + W3, W4 = 11, W5 = 11 } @@ -242,8 +242,8 @@ declare namespace A { namespace B { namespace C { const enum E { - V3 = 64, - V4 = 2 + V3, + V4 } } } @@ -281,40 +281,21 @@ declare function bar(e: A.B.C.E): number; declare function baz(c: Comments): invalid; /// [Errors] //// -constEnums.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(16,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(17,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(18,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(19,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(23,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(24,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnums.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(33,10): error TS2474: const enum member initializers must be constant expressions. constEnums.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(34,10): error TS2474: const enum member initializers must be constant expressions. constEnums.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(55,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(35,10): error TS2474: const enum member initializers must be constant expressions. constEnums.ts(65,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(65,22): error TS2474: const enum member initializers must be constant expressions. constEnums.ts(66,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(66,22): error TS2474: const enum member initializers must be constant expressions. constEnums.ts(124,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnums.ts(166,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== constEnums.ts (31 errors) ==== +==== constEnums.ts (12 errors) ==== const enum Enum1 { A0 = 100, } @@ -325,85 +306,45 @@ constEnums.ts(166,10): error TS9007: Declaration emit for this file requires typ B, C = 10, D = A | B, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. E = A | 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. F = 1 | A, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. G = (1 & 1), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. H = ~(A | B), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. I = A >>> 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. J = 1 & A, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. K = ~(1 | 5), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. L = ~D, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. M = E << B, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. N = E << 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. O = E >> B, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. P = E >> 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. PQ = E ** 2, - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. Q = -D, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. R = C & 5, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. S = 5 & C, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. T = C | D, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. U = C | 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. V = 10 | D, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. W = Enum1.V, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. // correct cases: reference to the enum member from different enum declaration W1 = A0, ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~ +!!! error TS2474: const enum member initializers must be constant expressions. W2 = Enum1.A0, ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. W3 = Enum1["A0"], ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. W4 = Enum1["W"], - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. W5 = Enum1[`V`], - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } const enum Comments { @@ -422,8 +363,6 @@ constEnums.ts(166,10): error TS9007: Declaration emit for this file requires typ export const enum E { V1 = 1, V2 = A.B.C.E.V1 | 100 - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } } } @@ -436,9 +375,13 @@ constEnums.ts(166,10): error TS9007: Declaration emit for this file requires typ V3 = A.B.C.E["V2"] & 200, ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. V4 = A.B.C.E[`V1`] << 1, ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. } } } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts index c23fe2384c588..7e4fe201c2dad 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts @@ -84,30 +84,16 @@ declare const enum E6 { } /// [Errors] //// -enumConstantMembers.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(23,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(24,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(32,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumConstantMembers.ts(32,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumConstantMembers.ts(33,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumConstantMembers.ts(34,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumConstantMembers.ts(35,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. -enumConstantMembers.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumConstantMembers.ts(36,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. -enumConstantMembers.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumConstantMembers.ts(37,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. enumConstantMembers.ts(38,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -==== enumConstantMembers.ts (21 errors) ==== +==== enumConstantMembers.ts (7 errors) ==== // Constant members allow negatives, but not decimals. Also hex literals are allowed enum E1 { a = 1, @@ -130,62 +116,34 @@ enumConstantMembers.ts(38,9): error TS2477: 'const' enum member initializer was enum E5 { a = 1 / 0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. b = 2 / 0.0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. c = 1.0 / 0.0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. d = 0.0 / 0.0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. e = NaN, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. f = Infinity, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. g = -Infinity - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } const enum E6 { a = 1 / 0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~ !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. b = 2 / 0.0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~~~ !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. c = 1.0 / 0.0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~~~~~ !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. d = 0.0 / 0.0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~~~~~ !!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. e = NaN, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~ !!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. f = Infinity, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~~~~ !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. g = -Infinity - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~~~~~ !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts index ad1eaad0ba2da..7f82231c4f756 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts @@ -24,49 +24,37 @@ enum E1 { declare enum E1 { X = 0, X1 = 0, - Y = 0, - Y1 = 0 + Y, + Y1 } declare enum E1 { Z = 4 } /// [Errors] //// -forwardRefInEnum.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -forwardRefInEnum.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. forwardRefInEnum.ts(5,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. forwardRefInEnum.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -forwardRefInEnum.ts(7,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. forwardRefInEnum.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -forwardRefInEnum.ts(8,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -==== forwardRefInEnum.ts (8 errors) ==== +==== forwardRefInEnum.ts (4 errors) ==== enum E1 { // illegal case // forward reference to the element of the same enum X = Y, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~ !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. X1 = E1["Y"], - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~~~ !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. // forward reference to the element of the same enum Y = E1.Z, ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. Y1 = E1["Z"] ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. } enum E1 { From ea7b82a4c5e03233ccda094ddc13d58ff4cfeebc Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 13 Nov 2023 10:14:37 +0000 Subject: [PATCH 126/224] Remove path from test. Signed-off-by: Titian Cernicova-Dragomir --- ...FunctionPropertyAssignments3_es6.d.ts.diff | 2 +- ...FunctionPropertyAssignments5_es6.d.ts.diff | 2 +- .../MemberFunctionDeclaration5_es6.d.ts.diff | 2 +- .../MemberFunctionDeclaration6_es6.d.ts.diff | 2 +- ...classMemberWithMissingIdentifier.d.ts.diff | 2 +- ...lassMemberWithMissingIdentifier2.d.ts.diff | 2 +- .../computedPropertyNames10_ES5.d.ts.diff | 2 +- .../computedPropertyNames10_ES6.d.ts.diff | 2 +- ...amespaceReferenceCausesNoImport2.d.ts.diff | 4 +- ...EmitCommonJsModuleReferencedType.d.ts.diff | 2 +- ...efaultExportWithStaticAssignment.d.ts.diff | 8 +-- ...DestructuringParameterProperties.d.ts.diff | 2 +- ...onEmitExpandoPropertyPrivateName.d.ts.diff | 2 +- ...onEmitFunctionDuplicateNamespace.d.ts.diff | 2 +- ...clarationEmitFunctionKeywordProp.d.ts.diff | 2 +- ...larationEmitLateBoundAssignments.d.ts.diff | 2 +- ...arationEmitLateBoundAssignments2.d.ts.diff | 2 +- ...nEmitObjectAssignedDefaultExport.d.ts.diff | 2 +- ...onEmitReexportedSymlinkReference.d.ts.diff | 4 +- ...nEmitReexportedSymlinkReference2.d.ts.diff | 4 +- ...nEmitReexportedSymlinkReference3.d.ts.diff | 4 +- .../declarationInAmbientContext.d.ts.diff | 2 +- .../declarationWithNoInitializer.d.ts.diff | 2 +- ...estructuringParameterProperties1.d.ts.diff | 2 +- ...estructuringParameterProperties2.d.ts.diff | 2 +- ...estructuringParameterProperties3.d.ts.diff | 2 +- ...estructuringParameterProperties4.d.ts.diff | 2 +- ...FunctionContextualTypesJSDocInTs.d.ts.diff | 2 +- ...doFunctionContextualTypesNoValue.d.ts.diff | 2 +- ...ctionExpressionsWithDynamicNames.d.ts.diff | 2 +- .../diff/exportAssignDottedName.d.ts.diff | 4 +- .../diff/exportAssignNonIdentifier.d.ts.diff | 12 ++--- ...portAssignmentWithoutIdentifier1.d.ts.diff | 2 +- .../diff/exportDefaultNamespace.d.ts.diff | 2 +- .../diff/exportEqualsProperty.d.ts.diff | 6 +-- .../diff/exportEqualsProperty2.d.ts.diff | 4 +- .../diff/forwardRefInEnum.d.ts.diff | 2 +- ...dModulesGlobalNamespacesAndEnums.d.ts.diff | 4 +- .../jsContainerMergeTsDeclaration.d.ts.diff | 2 +- ...tionMemberAssignmentDeclarations.d.ts.diff | 2 +- ...rtsSpecifierGenerationConditions.d.ts.diff | 2 +- ...AugmentationDisallowedExtensions.d.ts.diff | 2 +- .../moduleAugmentationNoNewNames.d.ts.diff | 2 +- .../negateOperatorInvalidOperations.d.ts.diff | 2 +- .../diff/newTargetNarrowing.d.ts.diff | 2 +- ...itAnyDestructuringVarDeclaration.d.ts.diff | 2 +- ...ecifierResolution(module=node16).d.ts.diff | 2 +- ...ifierResolution(module=nodenext).d.ts.diff | 2 +- ...esExportsSourceTs(module=node16).d.ts.diff | 2 +- ...ExportsSourceTs(module=nodenext).d.ts.diff | 2 +- ...erationConditions(module=node16).d.ts.diff | 2 +- ...ationConditions(module=nodenext).d.ts.diff | 2 +- ...nerationDirectory(module=node16).d.ts.diff | 2 +- ...rationDirectory(module=nodenext).d.ts.diff | 2 +- ...GenerationPattern(module=node16).d.ts.diff | 2 +- ...nerationPattern(module=nodenext).d.ts.diff | 2 +- .../diff/nullPropertyName.d.ts.diff | 2 +- ...oadingStaticFunctionsInFunctions.d.ts.diff | 2 +- ...ncGenerators.classMethods.es2018.d.ts.diff | 12 ++--- ...tors.objectLiteralMethods.es2018.d.ts.diff | 8 +-- ...rEqualsGreaterThanAfterFunction1.d.ts.diff | 2 +- ...rEqualsGreaterThanAfterFunction2.d.ts.diff | 2 +- ...rserErrorRecovery_ParameterList1.d.ts.diff | 2 +- ...rserErrorRecovery_ParameterList2.d.ts.diff | 2 +- ...SIOnCallAfterFunctionExpression1.d.ts.diff | 2 +- .../diff/parserSkippedTokens16.d.ts.diff | 2 +- .../diff/parserStrictMode8.d.ts.diff | 2 +- ...propertyAssignmentUseParentType3.d.ts.diff | 2 +- .../diff/reexportClassDefinition.d.ts.diff | 4 +- .../auto-fixed/diff/reservedWords3.d.ts.diff | 2 +- .../diff/staticsInAFunction.d.ts.diff | 2 +- ...larationEmitModuleNamesImportRef.d.ts.diff | 2 +- ...ateStringInFunctionParameterType.d.ts.diff | 2 +- ...StringInFunctionParameterTypeES6.d.ts.diff | 2 +- ...teStringWithEmbeddedYieldKeyword.d.ts.diff | 2 +- ...sInInvalidContextsExternalModule.d.ts.diff | 2 +- .../typeFromPropertyAssignment29.d.ts.diff | 2 +- .../typeFromPropertyAssignment31.d.ts.diff | 2 +- .../typeFromPropertyAssignment32.d.ts.diff | 4 +- .../typeFromPropertyAssignment33.d.ts.diff | 4 +- .../typeFromPropertyAssignment38.d.ts.diff | 2 +- ...ersionsDeclarationEmit.multiFile.d.ts.diff | 2 +- ...mit.multiFileBackReferenceToSelf.d.ts.diff | 2 +- ...multiFileBackReferenceToUnmapped.d.ts.diff | 2 +- ...rbatimModuleSyntaxConstEnumUsage.d.ts.diff | 4 +- .../diff/wellKnownSymbolExpando.d.ts.diff | 2 +- .../dte/FunctionPropertyAssignments3_es6.d.ts | 2 +- .../dte/FunctionPropertyAssignments5_es6.d.ts | 2 +- .../dte/MemberFunctionDeclaration5_es6.d.ts | 2 +- .../dte/MemberFunctionDeclaration6_es6.d.ts | 2 +- .../auto-fixed/dte/ambientEnum1.d.ts | 2 +- .../dte/ambientEnumDeclaration1.d.ts | 2 +- .../auto-fixed/dte/ambientErrors.d.ts | 2 +- ...yFakeFlatNoCrashInferenceDeclarations.d.ts | 2 +- .../auto-fixed/dte/arrowFunctionContexts.d.ts | 2 +- .../dte/classMemberWithMissingIdentifier.d.ts | 2 +- .../classMemberWithMissingIdentifier2.d.ts | 2 +- ...sionCodeGenEnumWithEnumMemberConflict.d.ts | 2 +- .../dte/commonMissingSemicolons.d.ts | 2 +- .../dte/computedEnumTypeWidening.d.ts | 2 +- .../dte/computedPropertyNames10_ES5.d.ts | 2 +- .../dte/computedPropertyNames10_ES6.d.ts | 2 +- .../auto-fixed/dte/constEnum1.d.ts | 2 +- .../auto-fixed/dte/constEnum2.d.ts | 2 +- .../auto-fixed/dte/constEnumDeclarations.d.ts | 2 +- .../auto-fixed/dte/constEnumErrors.d.ts | 2 +- ...EnumNamespaceReferenceCausesNoImport2.d.ts | 6 +-- .../dte/constEnumPropertyAccess1.d.ts | 2 +- .../dte/constEnumPropertyAccess2.d.ts | 2 +- .../dte/constEnumPropertyAccess3.d.ts | 2 +- .../auto-fixed/dte/constEnums.d.ts | 2 +- .../auto-fixed/dte/constantEnumAssert.d.ts | 2 +- ...nstructorWithIncompleteTypeAnnotation.d.ts | 2 +- .../auto-fixed/dte/declFileEnums.d.ts | 2 +- ...ationEmitCommonJsModuleReferencedType.d.ts | 2 +- ...EmitDefaultExportWithStaticAssignment.d.ts | 10 ++-- ...nEmitDestructuringParameterProperties.d.ts | 2 +- ...arationEmitExpandoPropertyPrivateName.d.ts | 4 +- ...arationEmitFunctionDuplicateNamespace.d.ts | 2 +- .../declarationEmitFunctionKeywordProp.d.ts | 2 +- .../declarationEmitLateBoundAssignments.d.ts | 2 +- .../declarationEmitLateBoundAssignments2.d.ts | 2 +- ...rationEmitObjectAssignedDefaultExport.d.ts | 2 +- ...arationEmitReexportedSymlinkReference.d.ts | 4 +- ...rationEmitReexportedSymlinkReference2.d.ts | 4 +- ...rationEmitReexportedSymlinkReference3.d.ts | 4 +- .../auto-fixed/dte/declarationFiles.d.ts | 2 +- .../dte/declarationInAmbientContext.d.ts | 2 +- .../dte/declarationWithNoInitializer.d.ts | 2 +- .../destructuringParameterDeclaration6.d.ts | 2 +- .../destructuringParameterProperties1.d.ts | 2 +- .../destructuringParameterProperties2.d.ts | 2 +- .../destructuringParameterProperties3.d.ts | 2 +- .../destructuringParameterProperties4.d.ts | 2 +- .../destructuringParameterProperties5.d.ts | 2 +- .../disallowLineTerminatorBeforeArrow.d.ts | 2 +- .../dte/duplicateObjectLiteralProperty.d.ts | 2 +- .../auto-fixed/dte/enumAssignmentCompat5.d.ts | 2 +- .../auto-fixed/dte/enumBasics.d.ts | 2 +- .../auto-fixed/dte/enumBasics2.d.ts | 2 +- .../auto-fixed/dte/enumBasics3.d.ts | 2 +- .../auto-fixed/dte/enumClassification.d.ts | 2 +- .../dte/enumConstantMemberWithString.d.ts | 2 +- ...nstantMemberWithStringEmitDeclaration.d.ts | 2 +- ...numConstantMemberWithTemplateLiterals.d.ts | 2 +- ...erWithTemplateLiteralsEmitDeclaration.d.ts | 2 +- .../auto-fixed/dte/enumConstantMembers.d.ts | 2 +- ...ErrorOnConstantBindingWithInitializer.d.ts | 2 +- .../auto-fixed/dte/enumErrors.d.ts | 2 +- .../auto-fixed/dte/enumExportMergingES6.d.ts | 2 +- ...numLiteralAssignableToEnumInsideUnion.d.ts | 2 +- .../auto-fixed/dte/enumMerging.d.ts | 2 +- .../auto-fixed/dte/enumMergingErrors.d.ts | 2 +- .../auto-fixed/dte/enumNumbering1.d.ts | 2 +- ...enumPropertyAccessBeforeInitalisation.d.ts | 2 +- .../dte/enumWithComputedMember.d.ts | 2 +- .../auto-fixed/dte/enumWithExport.d.ts | 2 +- .../enumWithParenthesizedInitializer1.d.ts | 2 +- ...WithoutInitializerAfterComputedMember.d.ts | 2 +- .../auto-fixed/dte/equalityWithEnumTypes.d.ts | 2 +- .../dte/exactSpellingSuggestion.d.ts | 2 +- ...pandoFunctionContextualTypesJSDocInTs.d.ts | 2 +- ...expandoFunctionContextualTypesNoValue.d.ts | 2 +- ...doFunctionExpressionsWithDynamicNames.d.ts | 2 +- .../dte/exportAssignDottedName.d.ts | 4 +- .../dte/exportAssignNonIdentifier.d.ts | 16 +++--- .../exportAssignmentWithoutIdentifier1.d.ts | 2 +- .../dte/exportDefaultNamespace.d.ts | 2 +- .../auto-fixed/dte/exportEqualsProperty.d.ts | 6 +-- .../auto-fixed/dte/exportEqualsProperty2.d.ts | 4 +- .../auto-fixed/dte/forwardRefInEnum.d.ts | 2 +- .../dte/functionImplementations.d.ts | 2 +- .../dte/initializersInAmbientEnums.d.ts | 2 +- ...olatedModulesGlobalNamespacesAndEnums.d.ts | 8 +-- .../dte/jsContainerMergeTsDeclaration.d.ts | 2 +- .../dte/jsxComponentTypeErrors.d.ts | 2 +- ...dFunctionMemberAssignmentDeclarations.d.ts | 2 +- ...sExportsSpecifierGenerationConditions.d.ts | 2 +- .../auto-fixed/dte/mergedDeclarations2.d.ts | 2 +- .../dte/mergedEnumDeclarationCodeGen.d.ts | 2 +- .../dte/methodContainingLocalFunction.d.ts | 2 +- .../dte/mixedTypeEnumComparison.d.ts | 2 +- ...oduleAugmentationDisallowedExtensions.d.ts | 10 ++-- .../dte/moduleAugmentationNoNewNames.d.ts | 6 +-- .../dte/negateOperatorInvalidOperations.d.ts | 2 +- .../auto-fixed/dte/newTargetNarrowing.d.ts | 2 +- ...mplicitAnyDestructuringVarDeclaration.d.ts | 2 +- ...cksSpecifierResolution(module=node16).d.ts | 2 +- ...sSpecifierResolution(module=nodenext).d.ts | 2 +- ...ModulesExportsSourceTs(module=node16).d.ts | 2 +- ...dulesExportsSourceTs(module=nodenext).d.ts | 2 +- ...erGenerationConditions(module=node16).d.ts | 2 +- ...GenerationConditions(module=nodenext).d.ts | 2 +- ...ierGenerationDirectory(module=node16).d.ts | 2 +- ...rGenerationDirectory(module=nodenext).d.ts | 2 +- ...ifierGenerationPattern(module=node16).d.ts | 2 +- ...ierGenerationPattern(module=nodenext).d.ts | 2 +- .../auto-fixed/dte/nullPropertyName.d.ts | 2 +- .../auto-fixed/dte/numericEnumMappedType.d.ts | 2 +- .../dte/objectLiteralGettersAndSetters.d.ts | 2 +- ...overloadingStaticFunctionsInFunctions.d.ts | 2 +- ...r.asyncGenerators.classMethods.es2018.d.ts | 50 +++++++++---------- ...enerators.objectLiteralMethods.es2018.d.ts | 48 +++++++++--------- .../auto-fixed/dte/parserEnum1.d.ts | 2 +- .../auto-fixed/dte/parserEnum2.d.ts | 2 +- .../dte/parserEnumDeclaration6.d.ts | 2 +- ...parserEqualsGreaterThanAfterFunction1.d.ts | 2 +- ...parserEqualsGreaterThanAfterFunction2.d.ts | 2 +- .../parserErrorRecovery_ParameterList1.d.ts | 2 +- .../parserErrorRecovery_ParameterList2.d.ts | 2 +- ...erNoASIOnCallAfterFunctionExpression1.d.ts | 2 +- .../auto-fixed/dte/parserRealSource10.d.ts | 2 +- .../auto-fixed/dte/parserRealSource14.d.ts | 2 +- .../auto-fixed/dte/parserRealSource2.d.ts | 2 +- .../auto-fixed/dte/parserRealSource3.d.ts | 2 +- .../auto-fixed/dte/parserSkippedTokens16.d.ts | 2 +- .../auto-fixed/dte/parserStrictMode8.d.ts | 2 +- .../auto-fixed/dte/preserveConstEnums.d.ts | 2 +- .../dte/propertyAssignmentUseParentType3.d.ts | 2 +- .../dte/reexportClassDefinition.d.ts | 6 +-- .../auto-fixed/dte/reservedWords3.d.ts | 2 +- .../auto-fixed/dte/staticsInAFunction.d.ts | 2 +- .../dte/strictModeOctalLiterals.d.ts | 2 +- .../dte/symbolDeclarationEmit12.d.ts | 2 +- ...nkDeclarationEmitModuleNamesImportRef.d.ts | 2 +- .../auto-fixed/dte/templateLiteralTypes4.d.ts | 2 +- ...templateStringInFunctionParameterType.d.ts | 2 +- ...plateStringInFunctionParameterTypeES6.d.ts | 2 +- ...emplateStringWithEmbeddedYieldKeyword.d.ts | 2 +- .../auto-fixed/dte/thisInInvalidContexts.d.ts | 2 +- .../thisInInvalidContextsExternalModule.d.ts | 2 +- .../dte/thisInPropertyBoundDeclarations.d.ts | 2 +- ...his_inside-enum-should-not-be-allowed.d.ts | 2 +- .../dte/twoAccessorsWithSameName.d.ts | 2 +- .../dte/typeFromPropertyAssignment29.d.ts | 2 +- .../dte/typeFromPropertyAssignment31.d.ts | 2 +- .../dte/typeFromPropertyAssignment32.d.ts | 4 +- .../dte/typeFromPropertyAssignment33.d.ts | 4 +- .../dte/typeFromPropertyAssignment36.d.ts | 2 +- .../dte/typeFromPropertyAssignment38.d.ts | 2 +- ...ypesVersionsDeclarationEmit.multiFile.d.ts | 2 +- ...tionEmit.multiFileBackReferenceToSelf.d.ts | 2 +- ...Emit.multiFileBackReferenceToUnmapped.d.ts | 2 +- .../dte/underscoreEscapedNameInEnum.d.ts | 2 +- .../verbatimModuleSyntaxConstEnumUsage.d.ts | 4 +- .../dte/wellKnownSymbolExpando.d.ts | 2 +- .../tsc/FunctionPropertyAssignments3_es6.d.ts | 2 +- .../tsc/FunctionPropertyAssignments5_es6.d.ts | 2 +- .../tsc/MemberFunctionDeclaration5_es6.d.ts | 2 +- .../tsc/MemberFunctionDeclaration6_es6.d.ts | 2 +- .../auto-fixed/tsc/ambientEnum1.d.ts | 2 +- .../tsc/ambientEnumDeclaration1.d.ts | 2 +- .../auto-fixed/tsc/ambientErrors.d.ts | 2 +- ...yFakeFlatNoCrashInferenceDeclarations.d.ts | 2 +- .../auto-fixed/tsc/arrowFunctionContexts.d.ts | 2 +- .../tsc/classMemberWithMissingIdentifier.d.ts | 2 +- .../classMemberWithMissingIdentifier2.d.ts | 2 +- ...sionCodeGenEnumWithEnumMemberConflict.d.ts | 2 +- .../tsc/commonMissingSemicolons.d.ts | 2 +- .../tsc/computedEnumTypeWidening.d.ts | 2 +- .../tsc/computedPropertyNames10_ES5.d.ts | 2 +- .../tsc/computedPropertyNames10_ES6.d.ts | 2 +- .../auto-fixed/tsc/constEnum1.d.ts | 2 +- .../auto-fixed/tsc/constEnum2.d.ts | 2 +- .../auto-fixed/tsc/constEnumDeclarations.d.ts | 2 +- .../auto-fixed/tsc/constEnumErrors.d.ts | 2 +- ...EnumNamespaceReferenceCausesNoImport2.d.ts | 6 +-- .../tsc/constEnumPropertyAccess1.d.ts | 2 +- .../tsc/constEnumPropertyAccess2.d.ts | 2 +- .../tsc/constEnumPropertyAccess3.d.ts | 2 +- .../auto-fixed/tsc/constEnums.d.ts | 2 +- .../auto-fixed/tsc/constantEnumAssert.d.ts | 2 +- ...nstructorWithIncompleteTypeAnnotation.d.ts | 2 +- .../auto-fixed/tsc/declFileEnums.d.ts | 2 +- ...ationEmitCommonJsModuleReferencedType.d.ts | 2 +- ...EmitDefaultExportWithStaticAssignment.d.ts | 10 ++-- ...nEmitDestructuringParameterProperties.d.ts | 2 +- ...arationEmitExpandoPropertyPrivateName.d.ts | 4 +- ...arationEmitFunctionDuplicateNamespace.d.ts | 2 +- .../declarationEmitFunctionKeywordProp.d.ts | 2 +- .../declarationEmitLateBoundAssignments.d.ts | 2 +- .../declarationEmitLateBoundAssignments2.d.ts | 2 +- ...rationEmitObjectAssignedDefaultExport.d.ts | 2 +- ...arationEmitReexportedSymlinkReference.d.ts | 4 +- ...rationEmitReexportedSymlinkReference2.d.ts | 4 +- ...rationEmitReexportedSymlinkReference3.d.ts | 4 +- .../auto-fixed/tsc/declarationFiles.d.ts | 2 +- .../tsc/declarationInAmbientContext.d.ts | 2 +- .../tsc/declarationWithNoInitializer.d.ts | 2 +- .../destructuringParameterDeclaration6.d.ts | 2 +- .../destructuringParameterProperties1.d.ts | 2 +- .../destructuringParameterProperties2.d.ts | 2 +- .../destructuringParameterProperties3.d.ts | 2 +- .../destructuringParameterProperties4.d.ts | 2 +- .../destructuringParameterProperties5.d.ts | 2 +- .../disallowLineTerminatorBeforeArrow.d.ts | 2 +- .../tsc/duplicateObjectLiteralProperty.d.ts | 2 +- .../auto-fixed/tsc/enumAssignmentCompat5.d.ts | 2 +- .../auto-fixed/tsc/enumBasics.d.ts | 2 +- .../auto-fixed/tsc/enumBasics2.d.ts | 2 +- .../auto-fixed/tsc/enumBasics3.d.ts | 2 +- .../auto-fixed/tsc/enumClassification.d.ts | 2 +- .../tsc/enumConstantMemberWithString.d.ts | 2 +- ...nstantMemberWithStringEmitDeclaration.d.ts | 2 +- ...numConstantMemberWithTemplateLiterals.d.ts | 2 +- ...erWithTemplateLiteralsEmitDeclaration.d.ts | 2 +- .../auto-fixed/tsc/enumConstantMembers.d.ts | 2 +- ...ErrorOnConstantBindingWithInitializer.d.ts | 2 +- .../auto-fixed/tsc/enumErrors.d.ts | 2 +- .../auto-fixed/tsc/enumExportMergingES6.d.ts | 2 +- ...numLiteralAssignableToEnumInsideUnion.d.ts | 2 +- .../auto-fixed/tsc/enumMerging.d.ts | 2 +- .../auto-fixed/tsc/enumMergingErrors.d.ts | 2 +- .../auto-fixed/tsc/enumNumbering1.d.ts | 2 +- ...enumPropertyAccessBeforeInitalisation.d.ts | 2 +- .../tsc/enumWithComputedMember.d.ts | 2 +- .../auto-fixed/tsc/enumWithExport.d.ts | 2 +- .../enumWithParenthesizedInitializer1.d.ts | 2 +- ...WithoutInitializerAfterComputedMember.d.ts | 2 +- .../auto-fixed/tsc/equalityWithEnumTypes.d.ts | 2 +- .../tsc/exactSpellingSuggestion.d.ts | 2 +- ...pandoFunctionContextualTypesJSDocInTs.d.ts | 2 +- ...expandoFunctionContextualTypesNoValue.d.ts | 2 +- ...doFunctionExpressionsWithDynamicNames.d.ts | 2 +- .../tsc/exportAssignDottedName.d.ts | 4 +- .../tsc/exportAssignNonIdentifier.d.ts | 16 +++--- .../exportAssignmentWithoutIdentifier1.d.ts | 2 +- .../tsc/exportDefaultNamespace.d.ts | 2 +- .../auto-fixed/tsc/exportEqualsProperty.d.ts | 6 +-- .../auto-fixed/tsc/exportEqualsProperty2.d.ts | 4 +- .../auto-fixed/tsc/forwardRefInEnum.d.ts | 2 +- .../tsc/functionImplementations.d.ts | 2 +- .../tsc/initializersInAmbientEnums.d.ts | 2 +- ...olatedModulesGlobalNamespacesAndEnums.d.ts | 8 +-- .../tsc/jsContainerMergeTsDeclaration.d.ts | 2 +- .../tsc/jsxComponentTypeErrors.d.ts | 2 +- ...dFunctionMemberAssignmentDeclarations.d.ts | 2 +- ...sExportsSpecifierGenerationConditions.d.ts | 2 +- .../auto-fixed/tsc/mergedDeclarations2.d.ts | 2 +- .../tsc/mergedEnumDeclarationCodeGen.d.ts | 2 +- .../tsc/methodContainingLocalFunction.d.ts | 2 +- .../tsc/mixedTypeEnumComparison.d.ts | 2 +- ...oduleAugmentationDisallowedExtensions.d.ts | 10 ++-- .../tsc/moduleAugmentationNoNewNames.d.ts | 6 +-- .../tsc/negateOperatorInvalidOperations.d.ts | 2 +- .../auto-fixed/tsc/newTargetNarrowing.d.ts | 2 +- ...mplicitAnyDestructuringVarDeclaration.d.ts | 2 +- ...cksSpecifierResolution(module=node16).d.ts | 2 +- ...sSpecifierResolution(module=nodenext).d.ts | 2 +- ...ModulesExportsSourceTs(module=node16).d.ts | 2 +- ...dulesExportsSourceTs(module=nodenext).d.ts | 2 +- ...erGenerationConditions(module=node16).d.ts | 2 +- ...GenerationConditions(module=nodenext).d.ts | 2 +- ...ierGenerationDirectory(module=node16).d.ts | 2 +- ...rGenerationDirectory(module=nodenext).d.ts | 2 +- ...ifierGenerationPattern(module=node16).d.ts | 2 +- ...ierGenerationPattern(module=nodenext).d.ts | 2 +- .../auto-fixed/tsc/nullPropertyName.d.ts | 2 +- .../auto-fixed/tsc/numericEnumMappedType.d.ts | 2 +- .../tsc/objectLiteralGettersAndSetters.d.ts | 2 +- ...overloadingStaticFunctionsInFunctions.d.ts | 2 +- ...r.asyncGenerators.classMethods.es2018.d.ts | 50 +++++++++---------- ...enerators.objectLiteralMethods.es2018.d.ts | 48 +++++++++--------- .../auto-fixed/tsc/parserEnum1.d.ts | 2 +- .../auto-fixed/tsc/parserEnum2.d.ts | 2 +- .../tsc/parserEnumDeclaration6.d.ts | 2 +- ...parserEqualsGreaterThanAfterFunction1.d.ts | 2 +- ...parserEqualsGreaterThanAfterFunction2.d.ts | 2 +- .../parserErrorRecovery_ParameterList1.d.ts | 2 +- .../parserErrorRecovery_ParameterList2.d.ts | 2 +- ...erNoASIOnCallAfterFunctionExpression1.d.ts | 2 +- .../auto-fixed/tsc/parserRealSource10.d.ts | 2 +- .../auto-fixed/tsc/parserRealSource14.d.ts | 2 +- .../auto-fixed/tsc/parserRealSource2.d.ts | 2 +- .../auto-fixed/tsc/parserRealSource3.d.ts | 2 +- .../auto-fixed/tsc/parserSkippedTokens16.d.ts | 2 +- .../auto-fixed/tsc/parserStrictMode8.d.ts | 2 +- .../auto-fixed/tsc/preserveConstEnums.d.ts | 2 +- .../tsc/propertyAssignmentUseParentType3.d.ts | 2 +- .../tsc/reexportClassDefinition.d.ts | 6 +-- .../auto-fixed/tsc/reservedWords3.d.ts | 2 +- .../auto-fixed/tsc/staticsInAFunction.d.ts | 2 +- .../tsc/strictModeOctalLiterals.d.ts | 2 +- .../tsc/symbolDeclarationEmit12.d.ts | 2 +- ...nkDeclarationEmitModuleNamesImportRef.d.ts | 2 +- .../auto-fixed/tsc/templateLiteralTypes4.d.ts | 2 +- ...templateStringInFunctionParameterType.d.ts | 2 +- ...plateStringInFunctionParameterTypeES6.d.ts | 2 +- ...emplateStringWithEmbeddedYieldKeyword.d.ts | 2 +- .../auto-fixed/tsc/thisInInvalidContexts.d.ts | 2 +- .../thisInInvalidContextsExternalModule.d.ts | 2 +- .../tsc/thisInPropertyBoundDeclarations.d.ts | 2 +- ...his_inside-enum-should-not-be-allowed.d.ts | 2 +- .../tsc/twoAccessorsWithSameName.d.ts | 2 +- .../tsc/typeFromPropertyAssignment29.d.ts | 2 +- .../tsc/typeFromPropertyAssignment31.d.ts | 2 +- .../tsc/typeFromPropertyAssignment32.d.ts | 4 +- .../tsc/typeFromPropertyAssignment33.d.ts | 4 +- .../tsc/typeFromPropertyAssignment36.d.ts | 2 +- .../tsc/typeFromPropertyAssignment38.d.ts | 2 +- ...ypesVersionsDeclarationEmit.multiFile.d.ts | 2 +- ...tionEmit.multiFileBackReferenceToSelf.d.ts | 2 +- ...Emit.multiFileBackReferenceToUnmapped.d.ts | 2 +- .../tsc/underscoreEscapedNameInEnum.d.ts | 2 +- .../verbatimModuleSyntaxConstEnumUsage.d.ts | 4 +- .../tsc/wellKnownSymbolExpando.d.ts | 2 +- .../diff/FunctionDeclaration8_es6.d.ts.diff | 2 +- ...asyncFunctionDeclaration8_es2017.d.ts.diff | 2 +- .../asyncFunctionDeclaration8_es5.d.ts.diff | 2 +- .../asyncFunctionDeclaration8_es6.d.ts.diff | 2 +- .../diff/computedPropertiesNarrowed.d.ts.diff | 2 +- .../diff/computedPropertyNames6_ES5.d.ts.diff | 2 +- .../diff/computedPropertyNames6_ES6.d.ts.diff | 2 +- .../contextualReturnTypeOfIIFE2.d.ts.diff | 2 +- .../original/diff/forwardRefInEnum.d.ts.diff | 2 +- ...xSignatureMustHaveTypeAnnotation.d.ts.diff | 2 +- ...dModulesGlobalNamespacesAndEnums.d.ts.diff | 4 +- .../original/diff/parseBigInt.d.ts.diff | 2 +- .../parserComputedPropertyName1.d.ts.diff | 2 +- .../parserComputedPropertyName13.d.ts.diff | 2 +- .../parserComputedPropertyName14.d.ts.diff | 2 +- .../parserComputedPropertyName15.d.ts.diff | 2 +- .../parserComputedPropertyName18.d.ts.diff | 2 +- .../parserComputedPropertyName19.d.ts.diff | 2 +- .../parserComputedPropertyName2.d.ts.diff | 2 +- .../parserComputedPropertyName20.d.ts.diff | 2 +- .../parserComputedPropertyName21.d.ts.diff | 2 +- .../parserComputedPropertyName37.d.ts.diff | 2 +- .../parserComputedPropertyName6.d.ts.diff | 2 +- .../parserES5ComputedPropertyName2.d.ts.diff | 2 +- .../parserES5ComputedPropertyName5.d.ts.diff | 2 +- .../parserES5ComputedPropertyName8.d.ts.diff | 2 +- .../diff/parserES5SymbolProperty1.d.ts.diff | 2 +- .../diff/parserES5SymbolProperty2.d.ts.diff | 2 +- .../diff/parserES5SymbolProperty8.d.ts.diff | 2 +- .../diff/parserES5SymbolProperty9.d.ts.diff | 2 +- .../diff/parserIndexSignature11.d.ts.diff | 2 +- .../diff/parserIndexSignature5.d.ts.diff | 2 +- .../original/diff/parserStrictMode8.d.ts.diff | 2 +- .../diff/parserSymbolIndexer5.d.ts.diff | 2 +- .../original/diff/symbolProperty52.d.ts.diff | 2 +- .../original/diff/symbolProperty53.d.ts.diff | 2 +- .../original/diff/symbolProperty54.d.ts.diff | 2 +- .../original/diff/symbolProperty58.d.ts.diff | 2 +- .../original/diff/symbolProperty59.d.ts.diff | 2 +- .../diff/templateLiteralsSourceMap.d.ts.diff | 2 +- .../diff/typeUsedAsTypeLiteralIndex.d.ts.diff | 2 +- ...rbatimModuleSyntaxConstEnumUsage.d.ts.diff | 4 +- .../original/dte/ES5SymbolProperty1.d.ts | 2 +- .../dte/FunctionDeclaration8_es6.d.ts | 2 +- .../dte/asyncFunctionDeclaration8_es2017.d.ts | 2 +- .../dte/asyncFunctionDeclaration8_es5.d.ts | 2 +- .../dte/asyncFunctionDeclaration8_es6.d.ts | 2 +- .../original/dte/bigintIndex.d.ts | 4 +- .../original/dte/complicatedPrivacy.d.ts | 2 +- .../dte/computedPropertiesNarrowed.d.ts | 2 +- .../dte/computedPropertyNames12_ES5.d.ts | 2 +- .../dte/computedPropertyNames12_ES6.d.ts | 2 +- .../dte/computedPropertyNames16_ES5.d.ts | 2 +- .../dte/computedPropertyNames16_ES6.d.ts | 2 +- .../dte/computedPropertyNames2_ES5.d.ts | 2 +- .../dte/computedPropertyNames2_ES6.d.ts | 2 +- .../dte/computedPropertyNames4_ES5.d.ts | 2 +- .../dte/computedPropertyNames4_ES6.d.ts | 2 +- .../dte/computedPropertyNames5_ES5.d.ts | 2 +- .../dte/computedPropertyNames5_ES6.d.ts | 2 +- .../dte/computedPropertyNames6_ES5.d.ts | 2 +- .../dte/computedPropertyNames6_ES6.d.ts | 2 +- .../computedPropertyNamesOnOverloads_ES5.d.ts | 2 +- .../computedPropertyNamesOnOverloads_ES6.d.ts | 2 +- ...mputedPropertyNamesWithStaticProperty.d.ts | 2 +- .../original/dte/constEnum2.d.ts | 2 +- .../original/dte/constEnumErrors.d.ts | 2 +- .../original/dte/constEnums.d.ts | 2 +- .../dte/contextualReturnTypeOfIIFE2.d.ts | 2 +- ...ortingModuleAugmentationRetainsImport.d.ts | 4 +- .../declarationEmitLateBoundAssignments2.d.ts | 2 +- .../dte/decoratorsOnComputedProperties.d.ts | 2 +- .../original/dte/enumBasics2.d.ts | 2 +- .../original/dte/enumBasics3.d.ts | 2 +- .../original/dte/enumConstantMembers.d.ts | 2 +- .../original/dte/enumErrors.d.ts | 2 +- .../original/dte/enumExportMergingES6.d.ts | 2 +- ...doFunctionExpressionsWithDynamicNames.d.ts | 2 +- .../original/dte/forwardRefInEnum.d.ts | 2 +- .../original/dte/giant.d.ts | 2 +- .../indexSignatureMustHaveTypeAnnotation.d.ts | 2 +- ...ndexTypeNoSubstitutionTemplateLiteral.d.ts | 2 +- .../original/dte/indexWithoutParamType2.d.ts | 2 +- .../original/dte/intTypeCheck.d.ts | 2 +- ...emplateEscapeSequences(target=es2015).d.ts | 2 +- ...edTemplateEscapeSequences(target=es5).d.ts | 2 +- ...emplateEscapeSequences(target=esnext).d.ts | 2 +- ...olatedModulesGlobalNamespacesAndEnums.d.ts | 8 +-- .../original/dte/mergedDeclarations2.d.ts | 2 +- .../dte/mergedEnumDeclarationCodeGen.d.ts | 2 +- .../dte/overloadsWithComputedNames.d.ts | 2 +- .../original/dte/parseBigInt.d.ts | 2 +- .../dte/parserComputedPropertyName1.d.ts | 2 +- .../dte/parserComputedPropertyName10.d.ts | 2 +- .../dte/parserComputedPropertyName13.d.ts | 2 +- .../dte/parserComputedPropertyName14.d.ts | 2 +- .../dte/parserComputedPropertyName15.d.ts | 2 +- .../dte/parserComputedPropertyName18.d.ts | 2 +- .../dte/parserComputedPropertyName19.d.ts | 2 +- .../dte/parserComputedPropertyName2.d.ts | 2 +- .../dte/parserComputedPropertyName20.d.ts | 2 +- .../dte/parserComputedPropertyName21.d.ts | 2 +- .../dte/parserComputedPropertyName22.d.ts | 2 +- .../dte/parserComputedPropertyName23.d.ts | 2 +- .../dte/parserComputedPropertyName24.d.ts | 2 +- .../dte/parserComputedPropertyName25.d.ts | 2 +- .../dte/parserComputedPropertyName27.d.ts | 2 +- .../dte/parserComputedPropertyName28.d.ts | 2 +- .../dte/parserComputedPropertyName29.d.ts | 2 +- .../dte/parserComputedPropertyName31.d.ts | 2 +- .../dte/parserComputedPropertyName32.d.ts | 2 +- .../dte/parserComputedPropertyName33.d.ts | 2 +- .../dte/parserComputedPropertyName36.d.ts | 2 +- .../dte/parserComputedPropertyName37.d.ts | 2 +- .../dte/parserComputedPropertyName6.d.ts | 2 +- .../dte/parserComputedPropertyName9.d.ts | 2 +- .../dte/parserES5ComputedPropertyName1.d.ts | 2 +- .../dte/parserES5ComputedPropertyName10.d.ts | 2 +- .../dte/parserES5ComputedPropertyName2.d.ts | 2 +- .../dte/parserES5ComputedPropertyName5.d.ts | 2 +- .../dte/parserES5ComputedPropertyName8.d.ts | 2 +- .../dte/parserES5ComputedPropertyName9.d.ts | 2 +- .../dte/parserES5SymbolProperty1.d.ts | 2 +- .../dte/parserES5SymbolProperty2.d.ts | 2 +- .../dte/parserES5SymbolProperty3.d.ts | 2 +- .../dte/parserES5SymbolProperty4.d.ts | 2 +- .../dte/parserES5SymbolProperty5.d.ts | 2 +- .../dte/parserES5SymbolProperty6.d.ts | 2 +- .../dte/parserES5SymbolProperty7.d.ts | 2 +- .../dte/parserES5SymbolProperty8.d.ts | 2 +- .../dte/parserES5SymbolProperty9.d.ts | 2 +- .../original/dte/parserIndexSignature11.d.ts | 2 +- .../original/dte/parserIndexSignature5.d.ts | 2 +- .../original/dte/parserStrictMode8.d.ts | 2 +- .../original/dte/parserSymbolIndexer5.d.ts | 2 +- .../original/dte/privateIndexer2.d.ts | 2 +- .../original/dte/propertyAssignment.d.ts | 2 +- .../dte/reExportAliasMakesInstantiated.d.ts | 2 +- ...flicts(usedefineforclassfields=false).d.ts | 2 +- ...nflicts(usedefineforclassfields=true).d.ts | 2 +- .../original/dte/symbolDeclarationEmit12.d.ts | 2 +- .../original/dte/symbolProperty1.d.ts | 2 +- .../original/dte/symbolProperty2.d.ts | 2 +- .../original/dte/symbolProperty3.d.ts | 2 +- .../original/dte/symbolProperty52.d.ts | 2 +- .../original/dte/symbolProperty53.d.ts | 2 +- .../original/dte/symbolProperty54.d.ts | 2 +- .../original/dte/symbolProperty58.d.ts | 2 +- .../original/dte/symbolProperty59.d.ts | 2 +- .../original/dte/templateLiteralTypes4.d.ts | 2 +- .../dte/templateLiteralsSourceMap.d.ts | 2 +- .../dte/typeFromPropertyAssignment36.d.ts | 2 +- .../dte/typeUsedAsTypeLiteralIndex.d.ts | 2 +- .../verbatimModuleSyntaxConstEnumUsage.d.ts | 4 +- .../original/tsc/ES5SymbolProperty1.d.ts | 2 +- .../tsc/FunctionDeclaration8_es6.d.ts | 2 +- .../tsc/asyncFunctionDeclaration8_es2017.d.ts | 2 +- .../tsc/asyncFunctionDeclaration8_es5.d.ts | 2 +- .../tsc/asyncFunctionDeclaration8_es6.d.ts | 2 +- .../original/tsc/bigintIndex.d.ts | 4 +- .../original/tsc/complicatedPrivacy.d.ts | 2 +- .../tsc/computedPropertiesNarrowed.d.ts | 2 +- .../tsc/computedPropertyNames12_ES5.d.ts | 2 +- .../tsc/computedPropertyNames12_ES6.d.ts | 2 +- .../tsc/computedPropertyNames16_ES5.d.ts | 2 +- .../tsc/computedPropertyNames16_ES6.d.ts | 2 +- .../tsc/computedPropertyNames2_ES5.d.ts | 2 +- .../tsc/computedPropertyNames2_ES6.d.ts | 2 +- .../tsc/computedPropertyNames4_ES5.d.ts | 2 +- .../tsc/computedPropertyNames4_ES6.d.ts | 2 +- .../tsc/computedPropertyNames5_ES5.d.ts | 2 +- .../tsc/computedPropertyNames5_ES6.d.ts | 2 +- .../tsc/computedPropertyNames6_ES5.d.ts | 2 +- .../tsc/computedPropertyNames6_ES6.d.ts | 2 +- .../computedPropertyNamesOnOverloads_ES5.d.ts | 2 +- .../computedPropertyNamesOnOverloads_ES6.d.ts | 2 +- ...mputedPropertyNamesWithStaticProperty.d.ts | 2 +- .../original/tsc/constEnum2.d.ts | 2 +- .../original/tsc/constEnumErrors.d.ts | 2 +- .../original/tsc/constEnums.d.ts | 2 +- .../tsc/contextualReturnTypeOfIIFE2.d.ts | 2 +- ...ortingModuleAugmentationRetainsImport.d.ts | 4 +- .../declarationEmitLateBoundAssignments2.d.ts | 2 +- .../tsc/decoratorsOnComputedProperties.d.ts | 2 +- .../original/tsc/enumBasics2.d.ts | 2 +- .../original/tsc/enumBasics3.d.ts | 2 +- .../original/tsc/enumConstantMembers.d.ts | 2 +- .../original/tsc/enumErrors.d.ts | 2 +- .../original/tsc/enumExportMergingES6.d.ts | 2 +- ...doFunctionExpressionsWithDynamicNames.d.ts | 2 +- .../original/tsc/forwardRefInEnum.d.ts | 2 +- .../original/tsc/giant.d.ts | 2 +- .../indexSignatureMustHaveTypeAnnotation.d.ts | 2 +- ...ndexTypeNoSubstitutionTemplateLiteral.d.ts | 2 +- .../original/tsc/indexWithoutParamType2.d.ts | 2 +- .../original/tsc/intTypeCheck.d.ts | 2 +- ...emplateEscapeSequences(target=es2015).d.ts | 2 +- ...edTemplateEscapeSequences(target=es5).d.ts | 2 +- ...emplateEscapeSequences(target=esnext).d.ts | 2 +- ...olatedModulesGlobalNamespacesAndEnums.d.ts | 8 +-- .../original/tsc/mergedDeclarations2.d.ts | 2 +- .../tsc/mergedEnumDeclarationCodeGen.d.ts | 2 +- .../tsc/overloadsWithComputedNames.d.ts | 2 +- .../original/tsc/parseBigInt.d.ts | 2 +- .../tsc/parserComputedPropertyName1.d.ts | 2 +- .../tsc/parserComputedPropertyName10.d.ts | 2 +- .../tsc/parserComputedPropertyName13.d.ts | 2 +- .../tsc/parserComputedPropertyName14.d.ts | 2 +- .../tsc/parserComputedPropertyName15.d.ts | 2 +- .../tsc/parserComputedPropertyName18.d.ts | 2 +- .../tsc/parserComputedPropertyName19.d.ts | 2 +- .../tsc/parserComputedPropertyName2.d.ts | 2 +- .../tsc/parserComputedPropertyName20.d.ts | 2 +- .../tsc/parserComputedPropertyName21.d.ts | 2 +- .../tsc/parserComputedPropertyName22.d.ts | 2 +- .../tsc/parserComputedPropertyName23.d.ts | 2 +- .../tsc/parserComputedPropertyName24.d.ts | 2 +- .../tsc/parserComputedPropertyName25.d.ts | 2 +- .../tsc/parserComputedPropertyName27.d.ts | 2 +- .../tsc/parserComputedPropertyName28.d.ts | 2 +- .../tsc/parserComputedPropertyName29.d.ts | 2 +- .../tsc/parserComputedPropertyName31.d.ts | 2 +- .../tsc/parserComputedPropertyName32.d.ts | 2 +- .../tsc/parserComputedPropertyName33.d.ts | 2 +- .../tsc/parserComputedPropertyName36.d.ts | 2 +- .../tsc/parserComputedPropertyName37.d.ts | 2 +- .../tsc/parserComputedPropertyName6.d.ts | 2 +- .../tsc/parserComputedPropertyName9.d.ts | 2 +- .../tsc/parserES5ComputedPropertyName1.d.ts | 2 +- .../tsc/parserES5ComputedPropertyName10.d.ts | 2 +- .../tsc/parserES5ComputedPropertyName2.d.ts | 2 +- .../tsc/parserES5ComputedPropertyName5.d.ts | 2 +- .../tsc/parserES5ComputedPropertyName8.d.ts | 2 +- .../tsc/parserES5ComputedPropertyName9.d.ts | 2 +- .../tsc/parserES5SymbolProperty1.d.ts | 2 +- .../tsc/parserES5SymbolProperty2.d.ts | 2 +- .../tsc/parserES5SymbolProperty3.d.ts | 2 +- .../tsc/parserES5SymbolProperty4.d.ts | 2 +- .../tsc/parserES5SymbolProperty5.d.ts | 2 +- .../tsc/parserES5SymbolProperty6.d.ts | 2 +- .../tsc/parserES5SymbolProperty7.d.ts | 2 +- .../tsc/parserES5SymbolProperty8.d.ts | 2 +- .../tsc/parserES5SymbolProperty9.d.ts | 2 +- .../original/tsc/parserIndexSignature11.d.ts | 2 +- .../original/tsc/parserIndexSignature5.d.ts | 2 +- .../original/tsc/parserStrictMode8.d.ts | 2 +- .../original/tsc/parserSymbolIndexer5.d.ts | 2 +- .../original/tsc/privateIndexer2.d.ts | 2 +- .../original/tsc/propertyAssignment.d.ts | 2 +- .../tsc/reExportAliasMakesInstantiated.d.ts | 2 +- ...flicts(usedefineforclassfields=false).d.ts | 2 +- ...nflicts(usedefineforclassfields=true).d.ts | 2 +- .../original/tsc/symbolDeclarationEmit12.d.ts | 2 +- .../original/tsc/symbolProperty1.d.ts | 2 +- .../original/tsc/symbolProperty2.d.ts | 2 +- .../original/tsc/symbolProperty3.d.ts | 2 +- .../original/tsc/symbolProperty52.d.ts | 2 +- .../original/tsc/symbolProperty53.d.ts | 2 +- .../original/tsc/symbolProperty54.d.ts | 2 +- .../original/tsc/symbolProperty58.d.ts | 2 +- .../original/tsc/symbolProperty59.d.ts | 2 +- .../original/tsc/templateLiteralTypes4.d.ts | 2 +- .../tsc/templateLiteralsSourceMap.d.ts | 2 +- .../tsc/typeFromPropertyAssignment36.d.ts | 2 +- .../tsc/typeUsedAsTypeLiteralIndex.d.ts | 2 +- .../verbatimModuleSyntaxConstEnumUsage.d.ts | 4 +- 672 files changed, 879 insertions(+), 879 deletions(-) diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments3_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments3_es6.d.ts.diff index 22b34c1fb0b63..6771f4eb61f82 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments3_es6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments3_es6.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,15 +1,16 @@ - //// [/.src/FunctionPropertyAssignments3_es6.d.ts] + //// [FunctionPropertyAssignments3_es6.d.ts] -declare var v: { - ""(): Generator; -}; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments5_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments5_es6.d.ts.diff index 4d19e70b50422..a68e132eb97a8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments5_es6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments5_es6.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,15 +1,16 @@ - //// [/.src/FunctionPropertyAssignments5_es6.d.ts] + //// [FunctionPropertyAssignments5_es6.d.ts] -declare var v: { - [x: number]: () => Generator; -}; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration5_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration5_es6.d.ts.diff index cf1cae265b2a0..872450a5aa428 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration5_es6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration5_es6.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,17 +1,20 @@ - //// [/.src/MemberFunctionDeclaration5_es6.d.ts] + //// [MemberFunctionDeclaration5_es6.d.ts] declare class C { - (): any; + (): invalid; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration6_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration6_es6.d.ts.diff index d8b39ed8412ff..b8876b4f26db8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration6_es6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration6_es6.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,20 +1,23 @@ - //// [/.src/MemberFunctionDeclaration6_es6.d.ts] + //// [MemberFunctionDeclaration6_es6.d.ts] declare class C { - foo(): any; + foo(): invalid; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier.d.ts.diff index a3489928d8b7f..d9581a9f1963f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,22 +1,25 @@ - //// [/.src/classMemberWithMissingIdentifier.d.ts] + //// [classMemberWithMissingIdentifier.d.ts] declare class C { - : any; + : invalid; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier2.d.ts.diff index 12309b4c3ae96..65ab810dba8b3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier2.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,26 +1,29 @@ - //// [/.src/classMemberWithMissingIdentifier2.d.ts] + //// [classMemberWithMissingIdentifier2.d.ts] declare class C { - : any; + : invalid; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES5.d.ts.diff index f8c1eaea7c31d..ddddf0f14197b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES5.d.ts.diff @@ -6,7 +6,7 @@ --- TSC declarations +++ DTE declarations @@ -3,11 +3,41 @@ - //// [/.src/computedPropertyNames10_ES5.d.ts] + //// [computedPropertyNames10_ES5.d.ts] declare var s: string; declare var n: number; declare var a: any; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES6.d.ts.diff index 751a20d623784..bd14c4f5e1801 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES6.d.ts.diff @@ -6,7 +6,7 @@ --- TSC declarations +++ DTE declarations @@ -3,11 +3,41 @@ - //// [/.src/computedPropertyNames10_ES6.d.ts] + //// [computedPropertyNames10_ES6.d.ts] declare var s: string; declare var n: number; declare var a: any; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumNamespaceReferenceCausesNoImport2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumNamespaceReferenceCausesNoImport2.d.ts.diff index a681bcc7dce76..5c76af35925d8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumNamespaceReferenceCausesNoImport2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumNamespaceReferenceCausesNoImport2.d.ts.diff @@ -6,10 +6,10 @@ --- TSC declarations +++ DTE declarations @@ -12,7 +12,34 @@ - //// [/.src/index.d.ts] + //// [index.d.ts] export {}; - //// [/.src/reexport.d.ts] + //// [reexport.d.ts] -import * as Foo from "./foo"; -declare const _default: typeof Foo.ConstEnumOnlyModule; +declare const _default: invalid; 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 index 228573c6aa951..4dcb1151b471b 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,13 +1,14 @@ - //// [/.src/r/entry.d.ts] + //// [r/entry.d.ts] import { RootProps } from "root"; -export declare const x: any; +export declare const x: invalid; 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 index 5225d09d88cfd..c3149fe2bcdef 100644 --- 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 @@ -9,7 +9,7 @@ export declare class Foo { } - //// [/.src/index1.d.ts] + //// [index1.d.ts] -declare function Example(): void; -declare namespace Example { - var Foo: typeof import("./foo").Foo; @@ -17,7 +17,7 @@ -export default Example; +export default function Example(): void; - //// [/.src/index2.d.ts] + //// [index2.d.ts] import { Foo } from './foo'; export { Foo }; -declare function Example(): void; @@ -27,7 +27,7 @@ -export default Example; +export default function Example(): void; - //// [/.src/index3.d.ts] + //// [index3.d.ts] export declare class Bar { } -declare function Example(): void; @@ -37,7 +37,7 @@ -export default Example; +export default function Example(): void; - //// [/.src/index4.d.ts] + //// [index4.d.ts] export declare function C(): any; -export declare namespace C { - var A: () => void; 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 index 521cd9b7a5c68..4300b3b8d67ba 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,57 +1,84 @@ - //// [/.src/declarationEmitDestructuringParameterProperties.d.ts] + //// [declarationEmitDestructuringParameterProperties.d.ts] declare class C1 { - x: string; - y: string; 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 index 63e5e30ece543..c133dfd5fb639 100644 --- 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 @@ -8,7 +8,7 @@ @@ -7,23 +7,23 @@ export {}; - //// [/.src/b.d.ts] + //// [b.d.ts] export declare function q(): void; -export declare namespace q { - var val: I; 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 index 61fca475447ea..9d91186056676 100644 --- 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 @@ -7,7 +7,7 @@ +++ DTE declarations @@ -2,7 +2,20 @@ - //// [/.src/declarationEmitFunctionDuplicateNamespace.d.ts] + //// [declarationEmitFunctionDuplicateNamespace.d.ts] declare function f(a: 0): 0; declare function f(a: 1): 1; -declare namespace f { 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 index ee7645643b145..5ddbf0732c1d1 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,19 +1,30 @@ - //// [/.src/declarationEmitFunctionKeywordProp.d.ts] + //// [declarationEmitFunctionKeywordProp.d.ts] declare function foo(): void; -declare namespace foo { - var _a: boolean; 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 index 0b69ed4398153..3e8620617bb58 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,8 +1,27 @@ - //// [/.src/declarationEmitLateBoundAssignments.d.ts] + //// [declarationEmitLateBoundAssignments.d.ts] export declare function foo(): void; -export declare namespace foo { - var bar: number; 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 index b915afd5972fe..1808ab900eb79 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,67 +1,186 @@ - //// [/.src/declarationEmitLateBoundAssignments2.d.ts] + //// [declarationEmitLateBoundAssignments2.d.ts] export declare function decl(): void; -export declare namespace decl { - var B: string; 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 index 8fdaeb34b5a0e..77dd6402f4464 100644 --- 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 @@ -7,7 +7,7 @@ +++ DTE declarations @@ -2,13 +2,14 @@ - //// [/.src/index.d.ts] + //// [index.d.ts] import { DefaultTheme, StyledComponent } from "styled-components"; export declare const C: StyledComponent<"div", DefaultTheme, {}, never>; -declare const _default; 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 index badd4f090a1ac..5a5bebcea411f 100644 --- 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 @@ -6,10 +6,10 @@ --- TSC declarations +++ DTE declarations @@ -3,6 +3,54 @@ - //// [/.src/monorepo/pkg3/dist/index.d.ts] + //// [monorepo/pkg3/dist/index.d.ts] export * from './keys'; - //// [/.src/monorepo/pkg3/dist/keys.d.ts] + //// [monorepo/pkg3/dist/keys.d.ts] -import { MetadataAccessor } from "@raymondfeng/pkg2"; -export declare const ADMIN: MetadataAccessor; +export declare const ADMIN: invalid; 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 index e66893a56042d..9d8a6174b7254 100644 --- 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 @@ -6,10 +6,10 @@ --- TSC declarations +++ DTE declarations @@ -3,6 +3,57 @@ - //// [/.src/monorepo/pkg3/dist/index.d.ts] + //// [monorepo/pkg3/dist/index.d.ts] export * from './keys'; - //// [/.src/monorepo/pkg3/dist/keys.d.ts] + //// [monorepo/pkg3/dist/keys.d.ts] -import { MetadataAccessor } from "@raymondfeng/pkg2"; -export declare const ADMIN: MetadataAccessor; +export declare const ADMIN: invalid; 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 index faf88fe6b4260..cc773487ad1e7 100644 --- 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 @@ -6,10 +6,10 @@ --- TSC declarations +++ DTE declarations @@ -3,23 +3,25 @@ - //// [/.src/monorepo/pkg3/dist/index.d.ts] + //// [monorepo/pkg3/dist/index.d.ts] export * from './keys'; - //// [/.src/monorepo/pkg3/dist/keys.d.ts] + //// [monorepo/pkg3/dist/keys.d.ts] -import { MetadataAccessor } from "@raymondfeng/pkg2"; -export declare const ADMIN: any; +export declare const ADMIN: invalid; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationInAmbientContext.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationInAmbientContext.d.ts.diff index 964dcbd3222a0..8a84f90053665 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationInAmbientContext.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationInAmbientContext.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,5 +1,25 @@ - //// [/.src/declarationInAmbientContext.d.ts] + //// [declarationInAmbientContext.d.ts] -declare var a: any, b: any; -declare var c: any, d: any; +declare var a: invalid, b: invalid; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationWithNoInitializer.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationWithNoInitializer.d.ts.diff index e3d958d6548ef..3d2263f6aef21 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationWithNoInitializer.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationWithNoInitializer.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,19 +1,31 @@ - //// [/.src/declarationWithNoInitializer.d.ts] + //// [declarationWithNoInitializer.d.ts] -declare var a: any, b: any; -declare var c: any, d: any; +declare var a: invalid, b: invalid; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties1.d.ts.diff index 0a5181874a73f..b89360f47f32a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties1.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,29 +1,29 @@ - //// [/.src/destructuringParameterProperties1.d.ts] + //// [destructuringParameterProperties1.d.ts] declare class C1 { - x: string; - y: string; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties2.d.ts.diff index e2d8462913543..b3a6971ed2a58 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties2.d.ts.diff @@ -7,7 +7,7 @@ +++ DTE declarations @@ -2,11 +2,11 @@ - //// [/.src/destructuringParameterProperties2.d.ts] + //// [destructuringParameterProperties2.d.ts] declare class C1 { private k; - private a: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties3.d.ts.diff index 370e31bf7233f..26969c0b6bc0a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties3.d.ts.diff @@ -7,7 +7,7 @@ +++ DTE declarations @@ -2,11 +2,11 @@ - //// [/.src/destructuringParameterProperties3.d.ts] + //// [destructuringParameterProperties3.d.ts] declare class C1 { private k; - private a: T; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties4.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties4.d.ts.diff index bafb7eb0d4bdc..12793358a00a2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties4.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties4.d.ts.diff @@ -7,7 +7,7 @@ +++ DTE declarations @@ -2,11 +2,11 @@ - //// [/.src/destructuringParameterProperties4.d.ts] + //// [destructuringParameterProperties4.d.ts] declare class C1 { private k; - protected a: T; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesJSDocInTs.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesJSDocInTs.d.ts.diff index a0cab2d7ce398..86b4c33d85dff 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesJSDocInTs.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesJSDocInTs.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,7 +1,18 @@ - //// [/.src/expandoFunctionContextualTypesJSDocInTs.d.ts] + //// [expandoFunctionContextualTypesJSDocInTs.d.ts] export declare function Foo(): void; -export declare namespace Foo { - var bar: () => void; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesNoValue.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesNoValue.d.ts.diff index 7eea53fa30edc..fa98831a90678 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesNoValue.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesNoValue.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,22 +1,22 @@ - //// [/.src/expandoFunctionContextualTypesNoValue.d.ts] + //// [expandoFunctionContextualTypesNoValue.d.ts] export declare function Foo(): void; -export declare namespace Foo { - var bar: () => void; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff index e05b0e2a3ed75..e48d013e68e37 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,11 +1,32 @@ - //// [/.src/expandoFunctionExpressionsWithDynamicNames.d.ts] + //// [expandoFunctionExpressionsWithDynamicNames.d.ts] -export declare const expr: { - (): void; - X: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignDottedName.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignDottedName.d.ts.diff index efc9a6bed7714..3aa433a5ea9e0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignDottedName.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignDottedName.d.ts.diff @@ -6,10 +6,10 @@ --- TSC declarations +++ DTE declarations @@ -3,7 +3,22 @@ - //// [/.src/foo1.d.ts] + //// [foo1.d.ts] export declare function x(): boolean; - //// [/.src/foo2.d.ts] + //// [foo2.d.ts] -import foo1 = require('./foo1'); -declare const _default: typeof foo1.x; +declare const _default: invalid; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignNonIdentifier.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignNonIdentifier.d.ts.diff index 2ab796c60daf2..860004b4193cd 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignNonIdentifier.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignNonIdentifier.d.ts.diff @@ -8,28 +8,28 @@ @@ -1,8 +1,8 @@ - //// [/.src/foo1.d.ts] + //// [foo1.d.ts] -declare const _default: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"; +declare const _default: invalid; export = _default; - //// [/.src/foo2.d.ts] + //// [foo2.d.ts] declare const _default: "sausages"; @@ -21,26 +21,31 @@ - //// [/.src/foo5.d.ts] + //// [foo5.d.ts] export = undefined; - //// [/.src/foo6.d.ts] + //// [foo6.d.ts] -declare const _default: any; +declare const _default: invalid; export = _default; - //// [/.src/foo7.d.ts] + //// [foo7.d.ts] -declare const _default: DateConstructor | StringConstructor; +declare const _default: invalid; export = _default; - //// [/.src/foo8.d.ts] + //// [foo8.d.ts] declare const _default: any; export = _default; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignmentWithoutIdentifier1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignmentWithoutIdentifier1.d.ts.diff index cda8bcbb1e264..2a6d1e44f1f86 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignmentWithoutIdentifier1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignmentWithoutIdentifier1.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,5 +1,21 @@ - //// [/.src/exportAssignmentWithoutIdentifier1.d.ts] + //// [exportAssignmentWithoutIdentifier1.d.ts] -declare const _default: any; +declare const _default: invalid; export = _default; 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 index e82aa169e0905..56d83cea6f181 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,8 +1,18 @@ - //// [/.src/exportDefaultNamespace.d.ts] + //// [exportDefaultNamespace.d.ts] -declare function someFunc(): string; -declare namespace someFunc { - var someProp: string; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty.d.ts.diff index 18e67f1b2b760..dd50b45349319 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,21 +1,64 @@ - //// [/.src/a.d.ts] + //// [a.d.ts] -declare namespace A { - class B { - constructor(b: number); @@ -21,12 +21,12 @@ +declare const _default: invalid; export = _default; - //// [/.src/b.d.ts] + //// [b.d.ts] -declare const _default: number; +declare const _default: invalid; export = _default; - //// [/.src/index.d.ts] + //// [index.d.ts] -/// export {}; +/// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty2.d.ts.diff index 73ce8f164f69f..09beb0848d71a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty2.d.ts.diff @@ -8,12 +8,12 @@ @@ -1,8 +1,31 @@ - //// [/.src/a.d.ts] + //// [a.d.ts] -declare const _default: number; +declare const _default: invalid; export = _default; - //// [/.src/b.d.ts] + //// [b.d.ts] export {}; +/// [Errors] //// + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/forwardRefInEnum.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/forwardRefInEnum.d.ts.diff index 159451a1f8207..0d0e31a25f34a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/forwardRefInEnum.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/forwardRefInEnum.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,39 +1,51 @@ - //// [/.src/forwardRefInEnum.d.ts] + //// [forwardRefInEnum.d.ts] declare enum E1 { - X = 0, - X1 = 0, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff index e8f0a99d93c99..03b1a7b8f76f7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff @@ -8,7 +8,7 @@ @@ -12,15 +12,15 @@ declare const d = "d"; - //// [/.src/enum2.d.ts] + //// [enum2.d.ts] declare enum Enum { - D = "d", - E = 0,// error @@ -24,7 +24,7 @@ + F } - //// [/.src/module-namespaces.d.ts] + //// [module-namespaces.d.ts] export declare namespace Instantiated { @@ -38,10 +38,15 @@ const x: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsContainerMergeTsDeclaration.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsContainerMergeTsDeclaration.d.ts.diff index bc684eca87d1a..f33ff27010d02 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsContainerMergeTsDeclaration.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsContainerMergeTsDeclaration.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,13 +1,14 @@ - //// [/.src/b.d.ts] + //// [b.d.ts] -declare var x: number; +declare var x: invalid; /// [Errors] //// 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 index 7da43b7419eb6..c8d64120c9c4e 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,7 +1,19 @@ - //// [/.src/index.d.ts] + //// [index.d.ts] export declare function foo(): void; -export declare namespace foo { - var bar: number; 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 index 8f3002b288df3..cf1f6f9d6db20 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,4 +1,41 @@ - //// [/.src/index.d.ts] + //// [index.d.ts] -export declare const a: () => Promise; +export declare const a: invalid; +/// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationDisallowedExtensions.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationDisallowedExtensions.d.ts.diff index f6b65734fd074..0f10832b9a3e4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationDisallowedExtensions.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationDisallowedExtensions.d.ts.diff @@ -17,7 +17,7 @@ } namespace N { @@ -43,8 +43,14 @@ - //// [/.src/x0.d.ts] + //// [x0.d.ts] export declare let a: number; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationNoNewNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationNoNewNames.d.ts.diff index d4e4ca8825da3..5ccaa88e474a2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationNoNewNames.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationNoNewNames.d.ts.diff @@ -16,7 +16,7 @@ } export {}; - //// [/.src/observable.d.ts] + //// [observable.d.ts] export declare class Observable { filter(pred: (e: T) => boolean): Observable; } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/negateOperatorInvalidOperations.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/negateOperatorInvalidOperations.d.ts.diff index 968417e90b43c..85e8a66399c42 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/negateOperatorInvalidOperations.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/negateOperatorInvalidOperations.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,15 +1,16 @@ - //// [/.src/negateOperatorInvalidOperations.d.ts] + //// [negateOperatorInvalidOperations.d.ts] -declare var NUMBER1: any; +declare var NUMBER1: invalid; declare var NUMBER: any; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/newTargetNarrowing.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/newTargetNarrowing.d.ts.diff index 46b847717d488..9d142cf0a63ea 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/newTargetNarrowing.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/newTargetNarrowing.d.ts.diff @@ -7,7 +7,7 @@ +++ DTE declarations @@ -2,7 +2,22 @@ - //// [/.src/newTargetNarrowing.d.ts] + //// [newTargetNarrowing.d.ts] declare function foo(x: true): void; declare function f(): void; -declare namespace f { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/noImplicitAnyDestructuringVarDeclaration.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/noImplicitAnyDestructuringVarDeclaration.d.ts.diff index 08fd684527084..fe5a98c198a02 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/noImplicitAnyDestructuringVarDeclaration.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/noImplicitAnyDestructuringVarDeclaration.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,11 +1,11 @@ - //// [/.src/noImplicitAnyDestructuringVarDeclaration.d.ts] + //// [noImplicitAnyDestructuringVarDeclaration.d.ts] -declare var a: any, b: any, c: any, d: any; -declare var a1: any, b1: any, c1: any, d1: any; -declare var a2: any, b2: any, c2: any, d2: any; 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 index 572c367ca78c8..90a94b482e4a5 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,26 +1,29 @@ - //// [/.src/index.d.ts] + //// [index.d.ts] -export declare const a: any; +export declare const a: invalid; /// [Errors] //// 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 index 572c367ca78c8..90a94b482e4a5 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,26 +1,29 @@ - //// [/.src/index.d.ts] + //// [index.d.ts] -export declare const a: any; +export declare const a: invalid; /// [Errors] //// 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 index fe8ec26a19d1d..59d31eb042590 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,8 +1,8 @@ - //// [/.src/index.d.ts] + //// [index.d.ts] -export declare const a: any; +export declare const a: invalid; 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 index fe8ec26a19d1d..59d31eb042590 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,8 +1,8 @@ - //// [/.src/index.d.ts] + //// [index.d.ts] -export declare const a: any; +export declare const a: invalid; 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 index b86a07cfdd13b..4f3c0630c493f 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,23 +1,26 @@ - //// [/.src/index.d.ts] + //// [index.d.ts] -export declare const a: import("inner/other").Thing; +export declare const a: invalid; /// [Errors] //// 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 index b86a07cfdd13b..4f3c0630c493f 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,23 +1,26 @@ - //// [/.src/index.d.ts] + //// [index.d.ts] -export declare const a: import("inner/other").Thing; +export declare const a: invalid; /// [Errors] //// 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 index 3a3655739be5d..98c8b384b078c 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,23 +1,26 @@ - //// [/.src/index.d.ts] + //// [index.d.ts] -export declare const a: import("inner/other.js").Thing; +export declare const a: invalid; /// [Errors] //// 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 index 3a3655739be5d..98c8b384b078c 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,23 +1,26 @@ - //// [/.src/index.d.ts] + //// [index.d.ts] -export declare const a: import("inner/other.js").Thing; +export declare const a: invalid; /// [Errors] //// 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 index 550bed5da943b..18b3a43f95208 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,23 +1,26 @@ - //// [/.src/index.d.ts] + //// [index.d.ts] -export declare const a: import("inner/other.js").Thing; +export declare const a: invalid; /// [Errors] //// 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 index 550bed5da943b..18b3a43f95208 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,23 +1,26 @@ - //// [/.src/index.d.ts] + //// [index.d.ts] -export declare const a: import("inner/other.js").Thing; +export declare const a: invalid; /// [Errors] //// 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 index ff41c65d8f04a..468b85ad0687f 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,85 +1,95 @@ - //// [/.src/nullPropertyName.d.ts] + //// [nullPropertyName.d.ts] declare function foo(): void; -declare namespace foo { - export var x: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/overloadingStaticFunctionsInFunctions.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/overloadingStaticFunctionsInFunctions.d.ts.diff index a00abcd27420a..48f3713c3e53d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/overloadingStaticFunctionsInFunctions.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/overloadingStaticFunctionsInFunctions.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,10 +1,11 @@ - //// [/.src/overloadingStaticFunctionsInFunctions.d.ts] + //// [overloadingStaticFunctionsInFunctions.d.ts] -declare function boo(): void; +declare function boo(): invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.classMethods.es2018.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.classMethods.es2018.d.ts.diff index 7c2a6e991078c..2a5b9b0c7f53a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.classMethods.es2018.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.classMethods.es2018.d.ts.diff @@ -8,37 +8,37 @@ @@ -1,21 +1,21 @@ - //// [/.src/asyncGeneratorGetAccessorIsError.d.ts] + //// [asyncGeneratorGetAccessorIsError.d.ts] declare class C23 { - get(): any; + get(): invalid; x(): number; } - //// [/.src/asyncGeneratorPropertyIsError.d.ts] + //// [asyncGeneratorPropertyIsError.d.ts] declare class C25 { - x(): any; + x(): invalid; 1: any; } - //// [/.src/asyncGeneratorSetAccessorIsError.d.ts] + //// [asyncGeneratorSetAccessorIsError.d.ts] declare class C24 { - set(): any; + set(): invalid; x(value: number): void; } - //// [/.src/awaitAsTypeIsOk.d.ts] + //// [awaitAsTypeIsOk.d.ts] @@ -88,8 +88,9 @@ } - //// [/.src/yieldInClassComputedPropertyIsError.d.ts] + //// [yieldInClassComputedPropertyIsError.d.ts] declare class C21 { + [yield](): AsyncGenerator; } - //// [/.src/yieldInNestedComputedPropertyIsOk.d.ts] + //// [yieldInNestedComputedPropertyIsOk.d.ts] declare class C22 { @@ -131,10 +132,13 @@ f(): AsyncGenerator; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts.diff index c15c914745b28..4fb6823cc17a2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts.diff @@ -8,26 +8,26 @@ @@ -1,22 +1,16 @@ - //// [/.src/asyncGeneratorGetAccessorIsError.d.ts] + //// [asyncGeneratorGetAccessorIsError.d.ts] -declare const o22: { - get(): any; - x(): number; -}; +declare const o22: invalid; - //// [/.src/asyncGeneratorPropertyIsError.d.ts] + //// [asyncGeneratorPropertyIsError.d.ts] declare const o24: { x(): 1; }; - //// [/.src/asyncGeneratorSetAccessorIsError.d.ts] + //// [asyncGeneratorSetAccessorIsError.d.ts] -declare const o23: { - set(): any; - x(value: number): void; -}; +declare const o23: invalid; - //// [/.src/awaitAsTypeIsOk.d.ts] + //// [awaitAsTypeIsOk.d.ts] interface await { } @@ -126,10 +120,12 @@ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction1.d.ts.diff index ca1d0af494d62..951b57e5ebc15 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction1.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,13 +1,16 @@ - //// [/.src/parserEqualsGreaterThanAfterFunction1.d.ts] + //// [parserEqualsGreaterThanAfterFunction1.d.ts] -declare function (): any; +declare function (): invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction2.d.ts.diff index d94e031cb9128..c6a6e1e45b71e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction2.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,18 +1,21 @@ - //// [/.src/parserEqualsGreaterThanAfterFunction2.d.ts] + //// [parserEqualsGreaterThanAfterFunction2.d.ts] -declare function (a: any, b: any): any; +declare function (a: any, b: any): invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList1.d.ts.diff index 1328b5e86abb3..a77e976779f8e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList1.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,19 +1,22 @@ - //// [/.src/parserErrorRecovery_ParameterList1.d.ts] + //// [parserErrorRecovery_ParameterList1.d.ts] -declare function f(a: any, {}: {}): any; +declare function f(a: any, {}: {}): invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList2.d.ts.diff index ae9cfae65dcf6..af2717c6fa4c7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList2.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,17 +1,20 @@ - //// [/.src/parserErrorRecovery_ParameterList2.d.ts] + //// [parserErrorRecovery_ParameterList2.d.ts] -declare function f(a: any, {}: {}): any; +declare function f(a: any, {}: {}): invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserNoASIOnCallAfterFunctionExpression1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserNoASIOnCallAfterFunctionExpression1.d.ts.diff index 5a2cf88e4f646..5de20edb25919 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserNoASIOnCallAfterFunctionExpression1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserNoASIOnCallAfterFunctionExpression1.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,17 +1,21 @@ - //// [/.src/parserNoASIOnCallAfterFunctionExpression1.d.ts] + //// [parserNoASIOnCallAfterFunctionExpression1.d.ts] -declare var x: any; +declare var x: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserSkippedTokens16.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserSkippedTokens16.d.ts.diff index 2c73c1d90a82d..b203e06bbb0d5 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserSkippedTokens16.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserSkippedTokens16.d.ts.diff @@ -6,7 +6,7 @@ --- TSC declarations +++ DTE declarations @@ -3,9 +3,9 @@ - //// [/.src/parserSkippedTokens16.d.ts] + //// [parserSkippedTokens16.d.ts] declare function Foo(): any; declare namespace M { } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserStrictMode8.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserStrictMode8.d.ts.diff index 861c2195ab9ce..9b94bfcfa886f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserStrictMode8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserStrictMode8.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,14 +1,18 @@ - //// [/.src/parserStrictMode8.d.ts] + //// [parserStrictMode8.d.ts] +declare function eval(): invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/propertyAssignmentUseParentType3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/propertyAssignmentUseParentType3.d.ts.diff index ca83d79e5664c..75f445eccffb2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/propertyAssignmentUseParentType3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/propertyAssignmentUseParentType3.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,21 +1,48 @@ - //// [/.src/propertyAssignmentUseParentType3.d.ts] + //// [propertyAssignmentUseParentType3.d.ts] declare function foo1(): number; -declare namespace foo1 { - var toFixed: string; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reexportClassDefinition.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reexportClassDefinition.d.ts.diff index a1d3b78c75fc1..1c3251e1f6170 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reexportClassDefinition.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reexportClassDefinition.d.ts.diff @@ -9,7 +9,7 @@ } export = x; - //// [/.src/foo2.d.ts] + //// [foo2.d.ts] -import foo1 = require('./foo1'); -declare const _default: { - x: typeof foo1; @@ -17,7 +17,7 @@ +declare const _default: invalid; export = _default; - //// [/.src/foo3.d.ts] + //// [foo3.d.ts] export {}; +/// [Errors] //// + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reservedWords3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reservedWords3.d.ts.diff index 037f3dbf1cd93..a69e4f2b6a57d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reservedWords3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reservedWords3.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,59 +1,77 @@ - //// [/.src/reservedWords3.d.ts] + //// [reservedWords3.d.ts] -declare function f1(): any; +declare function f1(): invalid; declare enum { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/staticsInAFunction.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/staticsInAFunction.d.ts.diff index ffbc322d1d3b5..cb9fb809c656e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/staticsInAFunction.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/staticsInAFunction.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,10 +1,11 @@ - //// [/.src/staticsInAFunction.d.ts] + //// [staticsInAFunction.d.ts] -declare function boo(): void; +declare function boo(): invalid; /// [Errors] //// 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 index 3f12eced320a5..e41dc71048600 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,4 +1,30 @@ - //// [/.src/Folder/monorepo/core/index.d.ts] + //// [Folder/monorepo/core/index.d.ts] -export declare function getStyles(): import("styled-components").InterpolationValue[]; +export declare function getStyles(): invalid; +/// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterType.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterType.d.ts.diff index 14e260607610a..76197408bcd62 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterType.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterType.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,19 +1,22 @@ - //// [/.src/templateStringInFunctionParameterType.d.ts] + //// [templateStringInFunctionParameterType.d.ts] -declare function f(any: any, : any): any; +declare function f(any: any, : invalid): any; declare function f(x: string): any; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterTypeES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterTypeES6.d.ts.diff index 52419c91c3a11..5476af17704ad 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterTypeES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterTypeES6.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,19 +1,22 @@ - //// [/.src/templateStringInFunctionParameterTypeES6.d.ts] + //// [templateStringInFunctionParameterTypeES6.d.ts] -declare function f(any: any, : any): any; +declare function f(any: any, : invalid): any; declare function f(x: string): any; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringWithEmbeddedYieldKeyword.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringWithEmbeddedYieldKeyword.d.ts.diff index 5a489d1bead12..b52435d995663 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringWithEmbeddedYieldKeyword.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringWithEmbeddedYieldKeyword.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,17 +1,20 @@ - //// [/.src/templateStringWithEmbeddedYieldKeyword.d.ts] + //// [templateStringWithEmbeddedYieldKeyword.d.ts] -declare function gen(): {}; +declare function gen(): invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContextsExternalModule.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContextsExternalModule.d.ts.diff index 6a68521b83f11..ad0c229a3e0b8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContextsExternalModule.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContextsExternalModule.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,8 +1,8 @@ - //// [/.src/thisInInvalidContextsExternalModule.d.ts] + //// [thisInInvalidContextsExternalModule.d.ts] -declare const _default: undefined; +declare const _default: invalid; export = _default; 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 index 530a3c011bd3d..e1e4fb11846ad 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,12 +1,8 @@ - //// [/.src/typeFromPropertyAssignment29.d.ts] + //// [typeFromPropertyAssignment29.d.ts] declare function ExpandoDecl(n: number): string; -declare namespace ExpandoDecl { - var prop: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment31.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment31.d.ts.diff index 00e0662a801bc..d699c49e155b4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment31.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment31.d.ts.diff @@ -7,7 +7,7 @@ +++ DTE declarations @@ -2,12 +2,8 @@ - //// [/.src/typeFromPropertyAssignment31.d.ts] + //// [typeFromPropertyAssignment31.d.ts] declare function ExpandoMerge(n: number): number; declare namespace ExpandoMerge { - var p1: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment32.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment32.d.ts.diff index b15dbbbff1f63..5cad5b71fd6f0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment32.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment32.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,12 +1,8 @@ - //// [/.src/expando.d.ts] + //// [expando.d.ts] declare function ExpandoMerge(n: number): number; -declare namespace ExpandoMerge { - var p1: number; @@ -16,7 +16,7 @@ -} declare var n: number; - //// [/.src/ns.d.ts] + //// [ns.d.ts] declare namespace ExpandoMerge { @@ -22,16 +18,19 @@ var p2: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment33.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment33.d.ts.diff index e6665c79f91e3..a3c033b7b137b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment33.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment33.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,12 +1,8 @@ - //// [/.src/expando.d.ts] + //// [expando.d.ts] declare function ExpandoMerge(n: number): number; -declare namespace ExpandoMerge { - var p1: number; @@ -16,7 +16,7 @@ -} declare var n: number; - //// [/.src/ns.d.ts] + //// [ns.d.ts] declare namespace ExpandoMerge { @@ -22,8 +18,9 @@ var p2: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment38.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment38.d.ts.diff index f5a973b287de0..d7de9f68155d0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment38.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment38.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,11 +1,25 @@ - //// [/.src/typeFromPropertyAssignment38.d.ts] + //// [typeFromPropertyAssignment38.d.ts] declare function F(): void; -declare namespace F { - var prop: number; 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 index 0227e4259048e..da09f96be5386 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,5 +1,48 @@ - //// [/.src/main.d.ts] + //// [main.d.ts] -export declare const va: import("ext").A; -export declare const vb: import("ext/other").B; +export declare const va: invalid; 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 index dd59ea3397f67..f8736e16b3a92 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,22 +1,25 @@ - //// [/.src/main.d.ts] + //// [main.d.ts] export declare const va: any; -export declare const vb: import("ext/other").B; +export declare const vb: invalid; 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 index bb763512217df..d6426a648f50b 100644 --- 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 @@ -8,7 +8,7 @@ @@ -1,5 +1,45 @@ - //// [/.src/main.d.ts] + //// [main.d.ts] -export declare const va: import("ext").A2; -export declare const va2: import("ext").A2; +export declare const va: invalid; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff index 15455a6c2925c..fce3ded890dbd 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,10 +1,10 @@ - //// [/.src/bar.d.ts] + //// [bar.d.ts] export declare enum Bar { - a = 1, - c = 3, @@ -17,7 +17,7 @@ e = 5 } - //// [/.src/foo.d.ts] + //// [foo.d.ts] @@ -12,4 +12,29 @@ a = 1, b = 2, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/wellKnownSymbolExpando.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/wellKnownSymbolExpando.d.ts.diff index 7b7fadedeb675..9b65345d9cb43 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/wellKnownSymbolExpando.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/wellKnownSymbolExpando.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,5 +1,15 @@ - //// [/.src/wellKnownSymbolExpando.d.ts] + //// [wellKnownSymbolExpando.d.ts] declare function f(): void; -declare namespace f { } +/// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments3_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments3_es6.d.ts index 5e52e6b9560c6..68e833e4424a0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments3_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments3_es6.d.ts @@ -7,7 +7,7 @@ var v = { *{ } } -//// [/.src/FunctionPropertyAssignments3_es6.d.ts] +//// [FunctionPropertyAssignments3_es6.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments5_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments5_es6.d.ts index e621564268173..8668aaae29f45 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments5_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments5_es6.d.ts @@ -7,7 +7,7 @@ var v = { *[foo()](): Generator { } } -//// [/.src/FunctionPropertyAssignments5_es6.d.ts] +//// [FunctionPropertyAssignments5_es6.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration5_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration5_es6.d.ts index 25945b5c96142..5b2fa039e0c26 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration5_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration5_es6.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/MemberFunctionDeclaration5_es6.d.ts] +//// [MemberFunctionDeclaration5_es6.d.ts] declare class C { (): invalid; } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration6_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration6_es6.d.ts index 561aee9050358..953da93ba58b0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration6_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration6_es6.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/MemberFunctionDeclaration6_es6.d.ts] +//// [MemberFunctionDeclaration6_es6.d.ts] declare class C { foo(): invalid; } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnum1.d.ts index 150da67d6308b..162c63dddd42a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnum1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnum1.d.ts @@ -14,7 +14,7 @@ -//// [/.src/ambientEnum1.d.ts] +//// [ambientEnum1.d.ts] declare enum E1 { y = 4.23 } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnumDeclaration1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnumDeclaration1.d.ts index 0306136ba9cec..adefefb29c273 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnumDeclaration1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnumDeclaration1.d.ts @@ -15,7 +15,7 @@ declare enum E { -//// [/.src/ambientEnumDeclaration1.d.ts] +//// [ambientEnumDeclaration1.d.ts] declare enum E { a = 10, b = 11, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientErrors.d.ts index 048126c6cdfa4..d79abd6370626 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientErrors.d.ts @@ -65,7 +65,7 @@ declare module 'bar' { -//// [/.src/ambientErrors.d.ts] +//// [ambientErrors.d.ts] declare var x: number; declare function fn(x: number): string; declare function fn(x: 'foo'): number; 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 index 6a7bb8fae08f7..3ae3ea1ed25af 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrayFakeFlatNoCrashInferenceDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrayFakeFlatNoCrashInferenceDeclarations.d.ts @@ -21,7 +21,7 @@ function foo(arr: T[], depth: number) { -//// [/.src/arrayFakeFlatNoCrashInferenceDeclarations.d.ts] +//// [arrayFakeFlatNoCrashInferenceDeclarations.d.ts] type BadFlatArray = { obj: { "done": Arr; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrowFunctionContexts.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrowFunctionContexts.d.ts index 28111ed0871ab..e66b45993bffd 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrowFunctionContexts.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrowFunctionContexts.d.ts @@ -101,7 +101,7 @@ var asserted2: any; -//// [/.src/arrowFunctionContexts.d.ts] +//// [arrowFunctionContexts.d.ts] declare class Base { constructor(n: any); } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier.d.ts index 7ce81bd8649a5..cd7b5b34b7732 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/classMemberWithMissingIdentifier.d.ts] +//// [classMemberWithMissingIdentifier.d.ts] declare class C { : invalid; } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier2.d.ts index 6de5d29ec843e..5d9e2cd5fc529 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier2.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/classMemberWithMissingIdentifier2.d.ts] +//// [classMemberWithMissingIdentifier2.d.ts] declare class C { : invalid; } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/collisionCodeGenEnumWithEnumMemberConflict.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/collisionCodeGenEnumWithEnumMemberConflict.d.ts index d3ec86bcde043..226e1b3c6b216 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/collisionCodeGenEnumWithEnumMemberConflict.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/collisionCodeGenEnumWithEnumMemberConflict.d.ts @@ -10,7 +10,7 @@ enum Color { -//// [/.src/collisionCodeGenEnumWithEnumMemberConflict.d.ts] +//// [collisionCodeGenEnumWithEnumMemberConflict.d.ts] declare enum Color { Color = 0, Thing = 0 diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commonMissingSemicolons.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commonMissingSemicolons.d.ts index af2bdf01876ff..fa000feb9057f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commonMissingSemicolons.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commonMissingSemicolons.d.ts @@ -85,7 +85,7 @@ class NoSemicolonClassE { -//// [/.src/commonMissingSemicolons.d.ts] +//// [commonMissingSemicolons.d.ts] declare function myAsyncFunction1(): Promise; declare function myAsyncFunction2(): void; declare function myAsyncFunction3(): void; 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 index 86b8bb9a8978b..027ebc638bca7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedEnumTypeWidening.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedEnumTypeWidening.d.ts @@ -83,7 +83,7 @@ val2 = MyDeclaredEnum.B; -//// [/.src/computedEnumTypeWidening.d.ts] +//// [computedEnumTypeWidening.d.ts] declare function computed(x: number): number; declare enum E { A, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES5.d.ts index 697f07a9dd975..c9f8c91a1fe38 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES5.d.ts @@ -22,7 +22,7 @@ var v = { -//// [/.src/computedPropertyNames10_ES5.d.ts] +//// [computedPropertyNames10_ES5.d.ts] declare var s: string; declare var n: number; declare var a: any; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES6.d.ts index ff9d52be28a5d..82258c0879def 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES6.d.ts @@ -22,7 +22,7 @@ var v = { -//// [/.src/computedPropertyNames10_ES6.d.ts] +//// [computedPropertyNames10_ES6.d.ts] declare var s: string; declare var n: number; declare var a: any; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum1.d.ts index c0d04796805ba..2ce87d5370af1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum1.d.ts @@ -20,7 +20,7 @@ const enum E { -//// [/.src/constEnum1.d.ts] +//// [constEnum1.d.ts] declare const enum E { a = 10, b = 10, 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 index 5b73750a54411..7615ae0524124 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum2.d.ts @@ -19,7 +19,7 @@ const enum D { -//// [/.src/constEnum2.d.ts] +//// [constEnum2.d.ts] declare const CONST: number; declare const enum D { d = 10, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumDeclarations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumDeclarations.d.ts index 930d923417de0..a2fb530a09c8a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumDeclarations.d.ts @@ -17,7 +17,7 @@ const enum E2 { -//// [/.src/constEnumDeclarations.d.ts] +//// [constEnumDeclarations.d.ts] declare const enum E { A = 1, B = 2, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumErrors.d.ts index 2c39c8fb13529..6612faec81a42 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumErrors.d.ts @@ -50,7 +50,7 @@ const enum NaNOrInfinity { -//// [/.src/constEnumErrors.d.ts] +//// [constEnumErrors.d.ts] declare const enum E { A = 0 } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumNamespaceReferenceCausesNoImport2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumNamespaceReferenceCausesNoImport2.d.ts index 6f7abd48e29a4..f8c2ae6363247 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumNamespaceReferenceCausesNoImport2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumNamespaceReferenceCausesNoImport2.d.ts @@ -26,7 +26,7 @@ export = Foo.ConstEnumOnlyModule; -//// [/.src/foo.d.ts] +//// [foo.d.ts] export declare namespace ConstEnumOnlyModule { const enum ConstFooEnum { Some = 0, @@ -35,10 +35,10 @@ export declare namespace ConstEnumOnlyModule { } } -//// [/.src/index.d.ts] +//// [index.d.ts] export {}; -//// [/.src/reexport.d.ts] +//// [reexport.d.ts] declare const _default: invalid; export = _default; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess1.d.ts index 6b295e1503a18..6dc8bdd03ba8e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess1.d.ts @@ -36,7 +36,7 @@ class C { -//// [/.src/constEnumPropertyAccess1.d.ts] +//// [constEnumPropertyAccess1.d.ts] declare const enum G { A = 1, B = 2, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess2.d.ts index 981f27784e941..19867a0b97020 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess2.d.ts @@ -25,7 +25,7 @@ G.B = 3; -//// [/.src/constEnumPropertyAccess2.d.ts] +//// [constEnumPropertyAccess2.d.ts] declare const enum G { A = 1, B = 2, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess3.d.ts index c0467afcb1f54..6afcb14296e6f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess3.d.ts @@ -25,7 +25,7 @@ E["E"].toString(); -//// [/.src/constEnumPropertyAccess3.d.ts] +//// [constEnumPropertyAccess3.d.ts] declare const enum E { A = -2, B = -1, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnums.d.ts index 3fb972e27db4a..d2d5dd9f6f16a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnums.d.ts @@ -184,7 +184,7 @@ function baz(c: Comments): void { -//// [/.src/constEnums.d.ts] +//// [constEnums.d.ts] declare const enum Enum1 { A0 = 100 } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constantEnumAssert.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constantEnumAssert.d.ts index 4a24aebc5db24..d74a4b26d5d09 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constantEnumAssert.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constantEnumAssert.d.ts @@ -80,7 +80,7 @@ const foo12: { -//// [/.src/constantEnumAssert.d.ts] +//// [constantEnumAssert.d.ts] declare enum E1 { a = 0, b = 1 diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constructorWithIncompleteTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constructorWithIncompleteTypeAnnotation.d.ts index ba3ee2754e18d..fdae6199a34ae 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constructorWithIncompleteTypeAnnotation.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constructorWithIncompleteTypeAnnotation.d.ts @@ -285,7 +285,7 @@ TypeScriptAllInOne.Program.Main(); -//// [/.src/constructorWithIncompleteTypeAnnotation.d.ts] +//// [constructorWithIncompleteTypeAnnotation.d.ts] declare module "fs" { class File { constructor(filename: string); 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 index 6f3d4b5cf0690..6af2462bea0de 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts @@ -41,7 +41,7 @@ enum e5 { -//// [/.src/declFileEnums.d.ts] +//// [declFileEnums.d.ts] declare enum e1 { a = 0, b = 1, 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 index 3396d36c9187b..e79a4ff56bdec 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCommonJsModuleReferencedType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCommonJsModuleReferencedType.d.ts @@ -28,7 +28,7 @@ export const y: RootProps = bar(); -//// [/.src/r/entry.d.ts] +//// [r/entry.d.ts] import { RootProps } from "root"; export declare const x: invalid; export declare const y: RootProps; 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 index 8f4835e4c8f8d..5a1cc4d706579 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDefaultExportWithStaticAssignment.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDefaultExportWithStaticAssignment.d.ts @@ -36,24 +36,24 @@ C.B = B; -//// [/.src/foo.d.ts] +//// [foo.d.ts] export declare class Foo { } -//// [/.src/index1.d.ts] +//// [index1.d.ts] export default function Example(): void; -//// [/.src/index2.d.ts] +//// [index2.d.ts] import { Foo } from './foo'; export { Foo }; export default function Example(): void; -//// [/.src/index3.d.ts] +//// [index3.d.ts] export declare class Bar { } export default function Example(): void; -//// [/.src/index4.d.ts] +//// [index4.d.ts] export declare function C(): any; /// [Errors] //// 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 index bd99b2f347418..534ed21bc6ce7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringParameterProperties.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringParameterProperties.d.ts @@ -22,7 +22,7 @@ class C3 { -//// [/.src/declarationEmitDestructuringParameterProperties.d.ts] +//// [declarationEmitDestructuringParameterProperties.d.ts] declare class C1 { x: invalid; y: invalid; 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 index 3f9b1c92cf33c..8789026e2edbf 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoPropertyPrivateName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoPropertyPrivateName.d.ts @@ -14,13 +14,13 @@ q.val = f(); -//// [/.src/a.d.ts] +//// [a.d.ts] interface I { } export declare function f(): I; export {}; -//// [/.src/b.d.ts] +//// [b.d.ts] export declare function q(): void; /// [Errors] //// 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 index 145c6a867735d..272618efb14f8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionDuplicateNamespace.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionDuplicateNamespace.d.ts @@ -14,7 +14,7 @@ f.x = 2; -//// [/.src/declarationEmitFunctionDuplicateNamespace.d.ts] +//// [declarationEmitFunctionDuplicateNamespace.d.ts] declare function f(a: 0): 0; declare function f(a: 1): 1; /// [Errors] //// 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 index 3fc79ed15f206..759e0aaf920d8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionKeywordProp.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionKeywordProp.d.ts @@ -16,7 +16,7 @@ baz.normal = false; -//// [/.src/declarationEmitFunctionKeywordProp.d.ts] +//// [declarationEmitFunctionKeywordProp.d.ts] declare function foo(): void; declare function bar(): void; declare function baz(): void; 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 index 8b2f3601b1195..ab82fbaee7e25 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments.d.ts @@ -21,7 +21,7 @@ const a: string = foo[dashStrMem]; -//// [/.src/declarationEmitLateBoundAssignments.d.ts] +//// [declarationEmitLateBoundAssignments.d.ts] export declare function foo(): void; /// [Errors] //// 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 index 7a79d209eff8f..fd015da377348 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts @@ -89,7 +89,7 @@ arrow10[emoji] = 0 -//// [/.src/declarationEmitLateBoundAssignments2.d.ts] +//// [declarationEmitLateBoundAssignments2.d.ts] export declare function decl(): void; export declare function decl2(): void; export declare function decl3(): void; 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 index 5dfaefc8ac0fc..33fef1c1b74a0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectAssignedDefaultExport.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectAssignedDefaultExport.d.ts @@ -44,7 +44,7 @@ export default Object.assign(A, { -//// [/.src/index.d.ts] +//// [index.d.ts] import { DefaultTheme, StyledComponent } from "styled-components"; export declare const C: StyledComponent<"div", DefaultTheme, {}, never>; declare const _default: invalid; 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 index 6ca15dfe67aff..12a66a7f469d9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference.d.ts @@ -47,10 +47,10 @@ export * from '@raymondfeng/pkg1'; -//// [/.src/monorepo/pkg3/dist/index.d.ts] +//// [monorepo/pkg3/dist/index.d.ts] export * from './keys'; -//// [/.src/monorepo/pkg3/dist/keys.d.ts] +//// [monorepo/pkg3/dist/keys.d.ts] export declare const ADMIN: invalid; /// [Errors] //// 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 index 8d2c50ab4d1b3..8c9ed117f1a9d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference2.d.ts @@ -50,10 +50,10 @@ export {IdType} from '@raymondfeng/pkg1'; -//// [/.src/monorepo/pkg3/dist/index.d.ts] +//// [monorepo/pkg3/dist/index.d.ts] export * from './keys'; -//// [/.src/monorepo/pkg3/dist/keys.d.ts] +//// [monorepo/pkg3/dist/keys.d.ts] export declare const ADMIN: invalid; /// [Errors] //// 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 index 1d99e64dbcb05..24e2bd3a3b5a6 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference3.d.ts @@ -47,10 +47,10 @@ export {MetadataAccessor} from '@raymondfeng/pkg1'; -//// [/.src/monorepo/pkg3/dist/index.d.ts] +//// [monorepo/pkg3/dist/index.d.ts] export * from './keys'; -//// [/.src/monorepo/pkg3/dist/keys.d.ts] +//// [monorepo/pkg3/dist/keys.d.ts] export declare const ADMIN: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts index 03e34d9347c04..620c8480ad339 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts @@ -55,7 +55,7 @@ class C4 { -//// [/.src/declarationFiles.d.ts] +//// [declarationFiles.d.ts] declare class C1 { x: this; f(x: this): this; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationInAmbientContext.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationInAmbientContext.d.ts index fd2298a3fb6c3..1bb0306b1b6be 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationInAmbientContext.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationInAmbientContext.d.ts @@ -9,7 +9,7 @@ declare var {c, d}; // Error, destructuring declaration not allowed in ambient -//// [/.src/declarationInAmbientContext.d.ts] +//// [declarationInAmbientContext.d.ts] declare var a: invalid, b: invalid; declare var c: invalid, d: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationWithNoInitializer.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationWithNoInitializer.d.ts index 0e4dbb4f404e8..f8f4aadf71238 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationWithNoInitializer.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationWithNoInitializer.d.ts @@ -9,7 +9,7 @@ var {c, d}; // Error, no initializer -//// [/.src/declarationWithNoInitializer.d.ts] +//// [declarationWithNoInitializer.d.ts] declare var a: invalid, b: invalid; declare var c: invalid, d: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterDeclaration6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterDeclaration6.d.ts index af08eec021aff..bed4236027a15 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterDeclaration6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterDeclaration6.d.ts @@ -47,7 +47,7 @@ b2({ while: 1 }); -//// [/.src/destructuringParameterDeclaration6.d.ts] +//// [destructuringParameterDeclaration6.d.ts] declare function a({ while: }: { while: any; }): void; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties1.d.ts index ae979f797c6f4..9ef9cde4c4540 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties1.d.ts @@ -41,7 +41,7 @@ const c3_z: any = dest_1[2]; -//// [/.src/destructuringParameterProperties1.d.ts] +//// [destructuringParameterProperties1.d.ts] declare class C1 { x: invalid; y: invalid; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties2.d.ts index 2d90d4b9c360c..0af4353169e53 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties2.d.ts @@ -44,7 +44,7 @@ const z_c: any = dest[2]; -//// [/.src/destructuringParameterProperties2.d.ts] +//// [destructuringParameterProperties2.d.ts] declare class C1 { private k; private a: invalid; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties3.d.ts index 9ded56095c154..1ab8fda29f316 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties3.d.ts @@ -50,7 +50,7 @@ const z_c: any = dest_1[2]; -//// [/.src/destructuringParameterProperties3.d.ts] +//// [destructuringParameterProperties3.d.ts] declare class C1 { private k; private a: invalid; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties4.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties4.d.ts index 6f0e057d997f9..d253a3cdf5fee 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties4.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties4.d.ts @@ -32,7 +32,7 @@ class C2 extends C1 { -//// [/.src/destructuringParameterProperties4.d.ts] +//// [destructuringParameterProperties4.d.ts] declare class C1 { private k; protected a: invalid; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties5.d.ts index 1d5b21b6a2077..9ed1c42c224cc 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties5.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties5.d.ts @@ -23,7 +23,7 @@ const a_z: any = dest[4]; -//// [/.src/destructuringParameterProperties5.d.ts] +//// [destructuringParameterProperties5.d.ts] type ObjType1 = { x: number; y: string; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/disallowLineTerminatorBeforeArrow.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/disallowLineTerminatorBeforeArrow.d.ts index b2f70aca7e2bb..ccc823b3ccc4d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/disallowLineTerminatorBeforeArrow.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/disallowLineTerminatorBeforeArrow.d.ts @@ -80,7 +80,7 @@ module m { -//// [/.src/disallowLineTerminatorBeforeArrow.d.ts] +//// [disallowLineTerminatorBeforeArrow.d.ts] declare var f1: () => void; declare var f2: (x: string, y: string) => void; declare var f3: (x: string, y: number, ...rest: any[]) => void; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicateObjectLiteralProperty.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicateObjectLiteralProperty.d.ts index d3351a40397fa..6bfb06103a718 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicateObjectLiteralProperty.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicateObjectLiteralProperty.d.ts @@ -24,7 +24,7 @@ var y = { -//// [/.src/duplicateObjectLiteralProperty.d.ts] +//// [duplicateObjectLiteralProperty.d.ts] declare var x: { a: { c: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumAssignmentCompat5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumAssignmentCompat5.d.ts index 2ed2bfe5c334d..ebd91eace9039 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumAssignmentCompat5.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumAssignmentCompat5.d.ts @@ -30,7 +30,7 @@ let ca: Computed.A = 1; // error, Computed.A isn't a literal type because Comput -//// [/.src/enumAssignmentCompat5.d.ts] +//// [enumAssignmentCompat5.d.ts] declare enum E { A = 0, B = 1, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics.d.ts index 32515bf3471d8..bd7b5ba9f123d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics.d.ts @@ -86,7 +86,7 @@ var doPropagate: (E9 | E6 | E5)[] = [ -//// [/.src/enumBasics.d.ts] +//// [enumBasics.d.ts] declare enum E1 { A = 0, B = 1, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics2.d.ts index f342130374e47..b18c363e9d92f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics2.d.ts @@ -21,7 +21,7 @@ enum Bar { -//// [/.src/enumBasics2.d.ts] +//// [enumBasics2.d.ts] declare enum Foo { a = 2, b = 3, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics3.d.ts index cee89f3324213..14c0feaeb6db2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics3.d.ts @@ -24,7 +24,7 @@ module M { -//// [/.src/enumBasics3.d.ts] +//// [enumBasics3.d.ts] declare namespace M { namespace N { enum E1 { 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 index 758df90a0193d..40d27a53c46ed 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumClassification.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumClassification.d.ts @@ -85,7 +85,7 @@ enum E20 { -//// [/.src/enumClassification.d.ts] +//// [enumClassification.d.ts] declare enum E01 { A = 0 } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithString.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithString.d.ts index cd52936c91652..1c85ec9761613 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithString.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithString.d.ts @@ -39,7 +39,7 @@ declare enum T6 { -//// [/.src/enumConstantMemberWithString.d.ts] +//// [enumConstantMemberWithString.d.ts] declare enum T1 { a = "1", b = "12", diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithStringEmitDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithStringEmitDeclaration.d.ts index 32e7055e63f2f..83f7bf9d02f64 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithStringEmitDeclaration.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithStringEmitDeclaration.d.ts @@ -35,7 +35,7 @@ declare enum T6 { -//// [/.src/enumConstantMemberWithStringEmitDeclaration.d.ts] +//// [enumConstantMemberWithStringEmitDeclaration.d.ts] declare enum T1 { a = "1", b = "12", diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiterals.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiterals.d.ts index c773a2140bb9c..79c8dee36a32c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiterals.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiterals.d.ts @@ -50,7 +50,7 @@ declare enum T7 { -//// [/.src/enumConstantMemberWithTemplateLiterals.d.ts] +//// [enumConstantMemberWithTemplateLiterals.d.ts] declare enum T1 { a = "1" } 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 index 71199923f4141..22637c81be3f7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts @@ -46,7 +46,7 @@ declare enum T7 { -//// [/.src/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts] +//// [enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts] declare enum T1 { a = "1" } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMembers.d.ts index fc6bb6bcca91e..91324530eef47 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMembers.d.ts @@ -46,7 +46,7 @@ const enum E6 { -//// [/.src/enumConstantMembers.d.ts] +//// [enumConstantMembers.d.ts] declare enum E1 { a = 1, b = 2 diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrorOnConstantBindingWithInitializer.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrorOnConstantBindingWithInitializer.d.ts index 5a6f553d380a6..aa37cddf0c55d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrorOnConstantBindingWithInitializer.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrorOnConstantBindingWithInitializer.d.ts @@ -18,7 +18,7 @@ enum E { -//// [/.src/enumErrorOnConstantBindingWithInitializer.d.ts] +//// [enumErrorOnConstantBindingWithInitializer.d.ts] type Thing = { value?: string | number; }; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrors.d.ts index 6d64848171f04..599b0c13ebf3e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrors.d.ts @@ -60,7 +60,7 @@ enum E14 { a, b: any "hello" += 1, c, d} -//// [/.src/enumErrors.d.ts] +//// [enumErrors.d.ts] declare enum any { } declare enum number { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumExportMergingES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumExportMergingES6.d.ts index 8cb7979d28f0c..7fee4324b5777 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumExportMergingES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumExportMergingES6.d.ts @@ -16,7 +16,7 @@ export enum Animals { -//// [/.src/enumExportMergingES6.d.ts] +//// [enumExportMergingES6.d.ts] export declare enum Animals { Cat = 1 } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumLiteralAssignableToEnumInsideUnion.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumLiteralAssignableToEnumInsideUnion.d.ts index 180af5b153e5b..122035ba8c050 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumLiteralAssignableToEnumInsideUnion.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumLiteralAssignableToEnumInsideUnion.d.ts @@ -35,7 +35,7 @@ const e5: Ka.Foo | boolean = Z.Foo.A; // ok -//// [/.src/enumLiteralAssignableToEnumInsideUnion.d.ts] +//// [enumLiteralAssignableToEnumInsideUnion.d.ts] declare namespace X { enum Foo { A = 0, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMerging.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMerging.d.ts index bd6bf78674f6e..0b9aa771f1a97 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMerging.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMerging.d.ts @@ -72,7 +72,7 @@ module M6 { -//// [/.src/enumMerging.d.ts] +//// [enumMerging.d.ts] declare namespace M1 { enum EConst1 { A = 3, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMergingErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMergingErrors.d.ts index 31cb16774a076..1930b7708d019 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMergingErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMergingErrors.d.ts @@ -48,7 +48,7 @@ module M2 { -//// [/.src/enumMergingErrors.d.ts] +//// [enumMergingErrors.d.ts] declare namespace M { enum E1 { A = 0 diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumNumbering1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumNumbering1.d.ts index 318255210e113..5a0c9b0585a0c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumNumbering1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumNumbering1.d.ts @@ -14,7 +14,7 @@ enum Test { -//// [/.src/enumNumbering1.d.ts] +//// [enumNumbering1.d.ts] declare enum Test { A = 0, B = 1, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumPropertyAccessBeforeInitalisation.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumPropertyAccessBeforeInitalisation.d.ts index 2a7275505d30e..67209cdfb9221 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumPropertyAccessBeforeInitalisation.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumPropertyAccessBeforeInitalisation.d.ts @@ -13,7 +13,7 @@ enum E { -//// [/.src/enumPropertyAccessBeforeInitalisation.d.ts] +//// [enumPropertyAccessBeforeInitalisation.d.ts] declare enum E { A, B, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithComputedMember.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithComputedMember.d.ts index c9809cd357a53..acdbedb538395 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithComputedMember.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithComputedMember.d.ts @@ -12,7 +12,7 @@ enum A { -//// [/.src/enumWithComputedMember.d.ts] +//// [enumWithComputedMember.d.ts] declare enum A { X, Y, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithExport.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithExport.d.ts index 695b9bdd7b4dc..a078453633fa5 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithExport.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithExport.d.ts @@ -12,7 +12,7 @@ enum x { -//// [/.src/enumWithExport.d.ts] +//// [enumWithExport.d.ts] declare namespace x { let y: number; } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithParenthesizedInitializer1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithParenthesizedInitializer1.d.ts index 531743aa079c7..2267f6c3ba11f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithParenthesizedInitializer1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithParenthesizedInitializer1.d.ts @@ -9,7 +9,7 @@ enum E { -//// [/.src/enumWithParenthesizedInitializer1.d.ts] +//// [enumWithParenthesizedInitializer1.d.ts] declare enum E { e = -3 } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithoutInitializerAfterComputedMember.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithoutInitializerAfterComputedMember.d.ts index 3300c2940da86..f362f594a2c9e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithoutInitializerAfterComputedMember.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithoutInitializerAfterComputedMember.d.ts @@ -11,7 +11,7 @@ enum E { -//// [/.src/enumWithoutInitializerAfterComputedMember.d.ts] +//// [enumWithoutInitializerAfterComputedMember.d.ts] declare enum E { a = 0, b = 0, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/equalityWithEnumTypes.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/equalityWithEnumTypes.d.ts index 5628481c0f48f..8e96731cb769b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/equalityWithEnumTypes.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/equalityWithEnumTypes.d.ts @@ -48,7 +48,7 @@ function f2(v: E2): void { -//// [/.src/equalityWithEnumTypes.d.ts] +//// [equalityWithEnumTypes.d.ts] declare enum E1 { a = 1, b = 2 diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exactSpellingSuggestion.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exactSpellingSuggestion.d.ts index 6aca239d04d0f..012165eac6cb9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exactSpellingSuggestion.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exactSpellingSuggestion.d.ts @@ -16,7 +16,7 @@ U8.bit_2 -//// [/.src/exactSpellingSuggestion.d.ts] +//// [exactSpellingSuggestion.d.ts] declare enum U8 { BIT_0 = 1, BIT_1 = 2, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesJSDocInTs.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesJSDocInTs.d.ts index 988bdb83a1fce..c3ba2de8c036c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesJSDocInTs.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesJSDocInTs.d.ts @@ -12,7 +12,7 @@ Foo.bar = () => { }; -//// [/.src/expandoFunctionContextualTypesJSDocInTs.d.ts] +//// [expandoFunctionContextualTypesJSDocInTs.d.ts] export declare function Foo(): void; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesNoValue.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesNoValue.d.ts index f6dcde9a2bb8e..e5d8d12b79169 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesNoValue.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesNoValue.d.ts @@ -13,7 +13,7 @@ Foo.bar = () => { }; -//// [/.src/expandoFunctionContextualTypesNoValue.d.ts] +//// [expandoFunctionContextualTypesNoValue.d.ts] export declare function Foo(): void; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionExpressionsWithDynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionExpressionsWithDynamicNames.d.ts index fcb616dbf2ae8..70a65fa17a926 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionExpressionsWithDynamicNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionExpressionsWithDynamicNames.d.ts @@ -16,7 +16,7 @@ expr2[s] = 0 -//// [/.src/expandoFunctionExpressionsWithDynamicNames.d.ts] +//// [expandoFunctionExpressionsWithDynamicNames.d.ts] export declare const expr: invalid; export declare const expr2: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignDottedName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignDottedName.d.ts index 905ea5b67dddf..5e8b4234ce984 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignDottedName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignDottedName.d.ts @@ -14,10 +14,10 @@ export function x(): boolean{ -//// [/.src/foo1.d.ts] +//// [foo1.d.ts] export declare function x(): boolean; -//// [/.src/foo2.d.ts] +//// [foo2.d.ts] declare const _default: invalid; export = _default; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignNonIdentifier.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignNonIdentifier.d.ts index 9aaf0a60d84d7..bdbdc2d428baa 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignNonIdentifier.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignNonIdentifier.d.ts @@ -31,36 +31,36 @@ export = null; // Ok -//// [/.src/foo1.d.ts] +//// [foo1.d.ts] declare const _default: invalid; export = _default; -//// [/.src/foo2.d.ts] +//// [foo2.d.ts] declare const _default: "sausages"; export = _default; -//// [/.src/foo3.d.ts] +//// [foo3.d.ts] declare const _default: { new (): {}; }; export = _default; -//// [/.src/foo4.d.ts] +//// [foo4.d.ts] declare const _default: true; export = _default; -//// [/.src/foo5.d.ts] +//// [foo5.d.ts] export = undefined; -//// [/.src/foo6.d.ts] +//// [foo6.d.ts] declare const _default: invalid; export = _default; -//// [/.src/foo7.d.ts] +//// [foo7.d.ts] declare const _default: invalid; export = _default; -//// [/.src/foo8.d.ts] +//// [foo8.d.ts] declare const _default: any; export = _default; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentWithoutIdentifier1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentWithoutIdentifier1.d.ts index 73ba1fbbbc1b4..99f679f495acf 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentWithoutIdentifier1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentWithoutIdentifier1.d.ts @@ -14,7 +14,7 @@ export = new Greeter(); -//// [/.src/exportAssignmentWithoutIdentifier1.d.ts] +//// [exportAssignmentWithoutIdentifier1.d.ts] declare const _default: invalid; export = _default; /// [Errors] //// 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 index abf3b0b00e448..6aa14f9fce679 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportDefaultNamespace.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportDefaultNamespace.d.ts @@ -12,7 +12,7 @@ someFunc.someProp = 'yo'; -//// [/.src/exportDefaultNamespace.d.ts] +//// [exportDefaultNamespace.d.ts] export default function someFunc(): string; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty.d.ts index 6c7464190a99a..1c5515aa01be4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty.d.ts @@ -44,15 +44,15 @@ export = "foo".length; -//// [/.src/a.d.ts] +//// [a.d.ts] declare const _default: invalid; export = _default; -//// [/.src/b.d.ts] +//// [b.d.ts] declare const _default: invalid; export = _default; -//// [/.src/index.d.ts] +//// [index.d.ts] export {}; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty2.d.ts index eda322790f768..5da96ef26965e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty2.d.ts @@ -21,11 +21,11 @@ export = C.B; -//// [/.src/a.d.ts] +//// [a.d.ts] declare const _default: invalid; export = _default; -//// [/.src/b.d.ts] +//// [b.d.ts] export {}; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/forwardRefInEnum.d.ts index b26b75e3fc0e9..e8573db45a70e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/forwardRefInEnum.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/forwardRefInEnum.d.ts @@ -20,7 +20,7 @@ enum E1 { -//// [/.src/forwardRefInEnum.d.ts] +//// [forwardRefInEnum.d.ts] declare enum E1 { X, X1, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/functionImplementations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/functionImplementations.d.ts index 7d8dc2dcdfaea..485dd53631c94 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/functionImplementations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/functionImplementations.d.ts @@ -165,7 +165,7 @@ var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherC -//// [/.src/functionImplementations.d.ts] +//// [functionImplementations.d.ts] declare var v: void; declare var a: any; declare var a: any; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/initializersInAmbientEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/initializersInAmbientEnums.d.ts index 9b5d314fc9878..aa1ccab69a357 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/initializersInAmbientEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/initializersInAmbientEnums.d.ts @@ -11,7 +11,7 @@ declare enum E { -//// [/.src/initializersInAmbientEnums.d.ts] +//// [initializersInAmbientEnums.d.ts] declare enum E { a = 10, b = 10, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts index 67292291dc3d6..8891a58fb4663 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts @@ -37,7 +37,7 @@ declare enum Enum { -//// [/.src/enum1.d.ts] +//// [enum1.d.ts] declare enum Enum { A = 0, B = 1, @@ -48,7 +48,7 @@ declare enum Enum { } declare const d = "d"; -//// [/.src/enum2.d.ts] +//// [enum2.d.ts] declare enum Enum { D, E,// error @@ -59,12 +59,12 @@ declare enum Enum { F } -//// [/.src/module-namespaces.d.ts] +//// [module-namespaces.d.ts] export declare namespace Instantiated { const x = 1; } -//// [/.src/script-namespaces.d.ts] +//// [script-namespaces.d.ts] declare namespace Instantiated { const x = 1; } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsContainerMergeTsDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsContainerMergeTsDeclaration.d.ts index 66a69e921078f..8046e9732e506 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsContainerMergeTsDeclaration.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsContainerMergeTsDeclaration.d.ts @@ -15,7 +15,7 @@ var x = function (): number { -//// [/.src/b.d.ts] +//// [b.d.ts] declare var x: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxComponentTypeErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxComponentTypeErrors.d.ts index 293efbc972cfb..9d28083ef18a4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxComponentTypeErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxComponentTypeErrors.d.ts @@ -47,7 +47,7 @@ const elem6: JSX.Element = ; -//// [/.src/jsxComponentTypeErrors.d.ts] +//// [jsxComponentTypeErrors.d.ts] declare namespace JSX { interface Element { type: 'element'; 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 index a3d8bcfb51c47..0a2fb674cb0b7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/lateBoundFunctionMemberAssignmentDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/lateBoundFunctionMemberAssignmentDeclarations.d.ts @@ -13,7 +13,7 @@ const x: string = foo[_private]; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare function foo(): void; /// [Errors] //// 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 index 57556633abc7e..f3025bc4c4d49 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts @@ -35,7 +35,7 @@ export interface Thing {} // not exported in export map, inaccessible under new -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedDeclarations2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedDeclarations2.d.ts index 5dbd7b59fb89c..17bbbfa362ac7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedDeclarations2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedDeclarations2.d.ts @@ -16,7 +16,7 @@ module Foo { -//// [/.src/mergedDeclarations2.d.ts] +//// [mergedDeclarations2.d.ts] declare enum Foo { b = 0 } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedEnumDeclarationCodeGen.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedEnumDeclarationCodeGen.d.ts index f27b4072b9315..9868ce4a02269 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedEnumDeclarationCodeGen.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedEnumDeclarationCodeGen.d.ts @@ -13,7 +13,7 @@ enum E { -//// [/.src/mergedEnumDeclarationCodeGen.d.ts] +//// [mergedEnumDeclarationCodeGen.d.ts] declare enum E { a = 0, b = 0 diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/methodContainingLocalFunction.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/methodContainingLocalFunction.d.ts index f4d5dfaeb63e4..657353e97ac1c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/methodContainingLocalFunction.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/methodContainingLocalFunction.d.ts @@ -56,7 +56,7 @@ enum E { -//// [/.src/methodContainingLocalFunction.d.ts] +//// [methodContainingLocalFunction.d.ts] declare class BugExhibition { exhibitBug(): void; } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixedTypeEnumComparison.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixedTypeEnumComparison.d.ts index 5eb830ac04ef6..9bc262e0fa3d5 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixedTypeEnumComparison.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixedTypeEnumComparison.d.ts @@ -45,7 +45,7 @@ someNumber > E2.C1; -//// [/.src/mixedTypeEnumComparison.d.ts] +//// [mixedTypeEnumComparison.d.ts] declare const enum E { S1 = "foo", S2 = "bar", diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationDisallowedExtensions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationDisallowedExtensions.d.ts index 5a6392d8cca31..d929123351c1c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationDisallowedExtensions.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationDisallowedExtensions.d.ts @@ -49,19 +49,19 @@ import "./x"; -//// [/.src/main.d.ts] +//// [main.d.ts] import "./x"; -//// [/.src/observable.d.ts] +//// [observable.d.ts] export declare class Observable { filter(pred: (e: T) => boolean): Observable; } export declare var x: number; -//// [/.src/test.d.ts] +//// [test.d.ts] export declare let b: number; -//// [/.src/x.d.ts] +//// [x.d.ts] declare namespace N1 { let x: number; } @@ -89,7 +89,7 @@ declare module "./test" { } export {}; -//// [/.src/x0.d.ts] +//// [x0.d.ts] export declare let a: number; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationNoNewNames.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationNoNewNames.d.ts index 3b251f99650f9..b9f47f16215cd 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationNoNewNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationNoNewNames.d.ts @@ -31,10 +31,10 @@ let y = x.map(x => x + 1); -//// [/.src/main.d.ts] +//// [main.d.ts] import "./map"; -//// [/.src/map.d.ts] +//// [map.d.ts] declare module "./observable" { interface Observable { map(proj: (e: T) => U): Observable; @@ -47,7 +47,7 @@ declare module "./observable" { } export {}; -//// [/.src/observable.d.ts] +//// [observable.d.ts] export declare class Observable { filter(pred: (e: T) => boolean): Observable; } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/negateOperatorInvalidOperations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/negateOperatorInvalidOperations.d.ts index 5e45b58b73160..582b42abad32e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/negateOperatorInvalidOperations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/negateOperatorInvalidOperations.d.ts @@ -18,7 +18,7 @@ var NUMBER =-; -//// [/.src/negateOperatorInvalidOperations.d.ts] +//// [negateOperatorInvalidOperations.d.ts] declare var NUMBER1: invalid; declare var NUMBER: any; declare var NUMBER2: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/newTargetNarrowing.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/newTargetNarrowing.d.ts index 5e8716bbc61e5..7cbd471230969 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/newTargetNarrowing.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/newTargetNarrowing.d.ts @@ -16,7 +16,7 @@ f.marked = true; -//// [/.src/newTargetNarrowing.d.ts] +//// [newTargetNarrowing.d.ts] declare function foo(x: true): void; declare function f(): void; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/noImplicitAnyDestructuringVarDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/noImplicitAnyDestructuringVarDeclaration.d.ts index 19727625db4ef..3ec28637df243 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/noImplicitAnyDestructuringVarDeclaration.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/noImplicitAnyDestructuringVarDeclaration.d.ts @@ -23,7 +23,7 @@ const a5: any = temp === undefined ? undefined : dest_2[0]; // error -//// [/.src/noImplicitAnyDestructuringVarDeclaration.d.ts] +//// [noImplicitAnyDestructuringVarDeclaration.d.ts] declare var a: invalid, b: invalid, c: any, d: any; declare var a1: invalid, b1: invalid, c1: any, d1: any; declare var a2: invalid, b2: invalid, c2: any, d2: any; 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 index 20298cd9cd9f6..885b52a11b5bb 100644 --- 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 @@ -30,7 +30,7 @@ export const x: () => Thing; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: invalid; /// [Errors] //// 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 index 20298cd9cd9f6..885b52a11b5bb 100644 --- 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 @@ -30,7 +30,7 @@ export const x: () => Thing; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: invalid; /// [Errors] //// 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 index 90c5e5fffd84b..94633bf7dfcac 100644 --- 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 @@ -31,7 +31,7 @@ export const x: () => Thing = null as any; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: invalid; //// [/.src/node_modules/inner/index.d.ts] 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 index 90c5e5fffd84b..94633bf7dfcac 100644 --- 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 @@ -31,7 +31,7 @@ export const x: () => Thing = null as any; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: invalid; //// [/.src/node_modules/inner/index.d.ts] 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 index 8059b49e93d90..264f42f364b14 100644 --- 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 @@ -37,7 +37,7 @@ export const x: () => Thing; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: invalid; /// [Errors] //// 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 index 8059b49e93d90..264f42f364b14 100644 --- 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 @@ -37,7 +37,7 @@ export const x: () => Thing; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: invalid; /// [Errors] //// 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 index 75a5766dbec32..13860dade036c 100644 --- 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 @@ -32,7 +32,7 @@ export const x: () => Thing; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: invalid; /// [Errors] //// 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 index 75a5766dbec32..13860dade036c 100644 --- 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 @@ -32,7 +32,7 @@ export const x: () => Thing; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: invalid; /// [Errors] //// 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 index 3c911b0071687..fca3f9cde9f6e 100644 --- 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 @@ -32,7 +32,7 @@ export const x: () => Thing; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: invalid; /// [Errors] //// 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 index 3c911b0071687..fca3f9cde9f6e 100644 --- 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 @@ -32,7 +32,7 @@ export const x: () => Thing; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: invalid; /// [Errors] //// 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 index 714d85e029fc0..3bfc97c1a624a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nullPropertyName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nullPropertyName.d.ts @@ -89,7 +89,7 @@ foo.of = 1; -//// [/.src/nullPropertyName.d.ts] +//// [nullPropertyName.d.ts] declare function foo(): void; /// [Errors] //// 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 index 938e6051630c4..a95dca7e1cd86 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/numericEnumMappedType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/numericEnumMappedType.d.ts @@ -43,7 +43,7 @@ const x: E.ONE = e; -//// [/.src/numericEnumMappedType.d.ts] +//// [numericEnumMappedType.d.ts] declare enum E1 { ONE = 0, TWO = 1, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/objectLiteralGettersAndSetters.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/objectLiteralGettersAndSetters.d.ts index 1c959022f297c..2c6b2b4d03ecb 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/objectLiteralGettersAndSetters.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/objectLiteralGettersAndSetters.d.ts @@ -117,7 +117,7 @@ var getParamType3: { -//// [/.src/objectLiteralGettersAndSetters.d.ts] +//// [objectLiteralGettersAndSetters.d.ts] declare var sameName1a: { a: string; }; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/overloadingStaticFunctionsInFunctions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/overloadingStaticFunctionsInFunctions.d.ts index c3a3ab5080b9d..9df8be400e908 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/overloadingStaticFunctionsInFunctions.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/overloadingStaticFunctionsInFunctions.d.ts @@ -11,7 +11,7 @@ function boo { -//// [/.src/overloadingStaticFunctionsInFunctions.d.ts] +//// [overloadingStaticFunctionsInFunctions.d.ts] declare function boo(): invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.classMethods.es2018.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.classMethods.es2018.d.ts index 6f86bdc1f5156..f642fc0eb82ef 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.classMethods.es2018.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.classMethods.es2018.d.ts @@ -152,134 +152,134 @@ class C25 { -//// [/.src/asyncGeneratorGetAccessorIsError.d.ts] +//// [asyncGeneratorGetAccessorIsError.d.ts] declare class C23 { get(): invalid; x(): number; } -//// [/.src/asyncGeneratorPropertyIsError.d.ts] +//// [asyncGeneratorPropertyIsError.d.ts] declare class C25 { x(): invalid; 1: any; } -//// [/.src/asyncGeneratorSetAccessorIsError.d.ts] +//// [asyncGeneratorSetAccessorIsError.d.ts] declare class C24 { set(): invalid; x(value: number): void; } -//// [/.src/awaitAsTypeIsOk.d.ts] +//// [awaitAsTypeIsOk.d.ts] interface await { } declare class C19 { f(): AsyncGenerator; } -//// [/.src/awaitInParameterInitializerIsError.d.ts] +//// [awaitInParameterInitializerIsError.d.ts] declare class C6 { f(a?: number): AsyncGenerator; } -//// [/.src/awaitMethodNameIsOk.d.ts] +//// [awaitMethodNameIsOk.d.ts] declare class C2 { await(): AsyncGenerator; } -//// [/.src/awaitMissingValueIsError.d.ts] +//// [awaitMissingValueIsError.d.ts] declare class C18 { f(): AsyncGenerator; } -//// [/.src/awaitParameterIsError.d.ts] +//// [awaitParameterIsError.d.ts] declare class C4 { f(await: any): AsyncGenerator; } -//// [/.src/awaitWithValueIsOk.d.ts] +//// [awaitWithValueIsOk.d.ts] declare class C17 { f(): AsyncGenerator; } -//// [/.src/methodIsOk.d.ts] +//// [methodIsOk.d.ts] declare class C1 { f(): AsyncGenerator; } -//// [/.src/nestedAsyncGeneratorIsOk.d.ts] +//// [nestedAsyncGeneratorIsOk.d.ts] declare class C8 { f(): AsyncGenerator; } -//// [/.src/nestedFunctionDeclarationNamedAwaitIsError.d.ts] +//// [nestedFunctionDeclarationNamedAwaitIsError.d.ts] declare class C11 { f(): AsyncGenerator; } -//// [/.src/nestedFunctionDeclarationNamedYieldIsError.d.ts] +//// [nestedFunctionDeclarationNamedYieldIsError.d.ts] declare class C9 { f(): AsyncGenerator; } -//// [/.src/nestedFunctionExpressionNamedAwaitIsError.d.ts] +//// [nestedFunctionExpressionNamedAwaitIsError.d.ts] declare class C12 { f(): AsyncGenerator; } -//// [/.src/nestedFunctionExpressionNamedYieldIsError.d.ts] +//// [nestedFunctionExpressionNamedYieldIsError.d.ts] declare class C10 { f(): AsyncGenerator; } -//// [/.src/yieldAsTypeIsStrictError.d.ts] +//// [yieldAsTypeIsStrictError.d.ts] interface yield { } declare class C20 { f(): AsyncGenerator; } -//// [/.src/yieldInClassComputedPropertyIsError.d.ts] +//// [yieldInClassComputedPropertyIsError.d.ts] declare class C21 { [yield](): AsyncGenerator; } -//// [/.src/yieldInNestedComputedPropertyIsOk.d.ts] +//// [yieldInNestedComputedPropertyIsOk.d.ts] declare class C22 { f(): AsyncGenerator; } -//// [/.src/yieldInParameterInitializerIsError.d.ts] +//// [yieldInParameterInitializerIsError.d.ts] declare class C7 { f(a?: any): AsyncGenerator; } -//// [/.src/yieldIsOk.d.ts] +//// [yieldIsOk.d.ts] declare class C13 { f(): AsyncGenerator; } -//// [/.src/yieldMethodNameIsOk.d.ts] +//// [yieldMethodNameIsOk.d.ts] declare class C3 { yield(): AsyncGenerator; } -//// [/.src/yieldParameterIsError.d.ts] +//// [yieldParameterIsError.d.ts] declare class C5 { f(yield: any): AsyncGenerator; } -//// [/.src/yieldStarMissingValueIsError.d.ts] +//// [yieldStarMissingValueIsError.d.ts] declare class C15 { f(): AsyncGenerator; } -//// [/.src/yieldStarWithValueIsOk.d.ts] +//// [yieldStarWithValueIsOk.d.ts] declare class C16 { f(): AsyncGenerator; } -//// [/.src/yieldWithValueIsOk.d.ts] +//// [yieldWithValueIsOk.d.ts] declare class C14 { f(): AsyncGenerator; } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts index f77c3cb1d7f44..b9da0bea73c79 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts @@ -147,122 +147,122 @@ const o24 = { -//// [/.src/asyncGeneratorGetAccessorIsError.d.ts] +//// [asyncGeneratorGetAccessorIsError.d.ts] declare const o22: invalid; -//// [/.src/asyncGeneratorPropertyIsError.d.ts] +//// [asyncGeneratorPropertyIsError.d.ts] declare const o24: { x(): 1; }; -//// [/.src/asyncGeneratorSetAccessorIsError.d.ts] +//// [asyncGeneratorSetAccessorIsError.d.ts] declare const o23: invalid; -//// [/.src/awaitAsTypeIsOk.d.ts] +//// [awaitAsTypeIsOk.d.ts] interface await { } declare const o19: { f(): AsyncGenerator; }; -//// [/.src/awaitInParameterInitializerIsError.d.ts] +//// [awaitInParameterInitializerIsError.d.ts] declare const o6: { f(a?: number): AsyncGenerator; }; -//// [/.src/awaitMethodNameIsOk.d.ts] +//// [awaitMethodNameIsOk.d.ts] declare const o2: { await(): AsyncGenerator; }; -//// [/.src/awaitMissingValueIsError.d.ts] +//// [awaitMissingValueIsError.d.ts] declare const o18: { f(): AsyncGenerator; }; -//// [/.src/awaitParameterIsError.d.ts] +//// [awaitParameterIsError.d.ts] declare const o4: { f(await: any): AsyncGenerator; }; -//// [/.src/awaitWithValueIsOk.d.ts] +//// [awaitWithValueIsOk.d.ts] declare const o17: { f(): AsyncGenerator; }; -//// [/.src/methodIsOk.d.ts] +//// [methodIsOk.d.ts] declare const o1: { f(): AsyncGenerator; }; -//// [/.src/nestedAsyncGeneratorIsOk.d.ts] +//// [nestedAsyncGeneratorIsOk.d.ts] declare const o8: { f(): AsyncGenerator; }; -//// [/.src/nestedFunctionDeclarationNamedAwaitIsError.d.ts] +//// [nestedFunctionDeclarationNamedAwaitIsError.d.ts] declare const o11: { f(): AsyncGenerator; }; -//// [/.src/nestedFunctionDeclarationNamedYieldIsError.d.ts] +//// [nestedFunctionDeclarationNamedYieldIsError.d.ts] declare const o9: { f(): AsyncGenerator; }; -//// [/.src/nestedFunctionExpressionNamedAwaitIsError.d.ts] +//// [nestedFunctionExpressionNamedAwaitIsError.d.ts] declare const o12: { f(): AsyncGenerator; }; -//// [/.src/nestedFunctionExpressionNamedYieldIsError.d.ts] +//// [nestedFunctionExpressionNamedYieldIsError.d.ts] declare const o10: { f(): AsyncGenerator; }; -//// [/.src/yieldAsTypeIsOk.d.ts] +//// [yieldAsTypeIsOk.d.ts] interface yield { } declare const o20: { f(): AsyncGenerator; }; -//// [/.src/yieldInNestedComputedPropertyIsOk.d.ts] +//// [yieldInNestedComputedPropertyIsOk.d.ts] declare const o21: { f(): AsyncGenerator; }; -//// [/.src/yieldInParameterInitializerIsError.d.ts] +//// [yieldInParameterInitializerIsError.d.ts] declare const o7: { f(a?: any): AsyncGenerator; }; -//// [/.src/yieldIsOk.d.ts] +//// [yieldIsOk.d.ts] declare const o13: { f(): AsyncGenerator; }; -//// [/.src/yieldMethodNameIsOk.d.ts] +//// [yieldMethodNameIsOk.d.ts] declare const o3: { yield(): AsyncGenerator; }; -//// [/.src/yieldParameterIsError.d.ts] +//// [yieldParameterIsError.d.ts] declare const o5: { f(yield: any): AsyncGenerator; }; -//// [/.src/yieldStarMissingValueIsError.d.ts] +//// [yieldStarMissingValueIsError.d.ts] declare const o15: { f(): AsyncGenerator; }; -//// [/.src/yieldStarWithValueIsOk.d.ts] +//// [yieldStarWithValueIsOk.d.ts] declare const o16: { f(): AsyncGenerator; }; -//// [/.src/yieldWithValueIsOk.d.ts] +//// [yieldWithValueIsOk.d.ts] declare const o14: { f(): AsyncGenerator; }; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum1.d.ts index 78c0345fd65fc..ba053541bc513 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum1.d.ts @@ -12,7 +12,7 @@ -//// [/.src/parserEnum1.d.ts] +//// [parserEnum1.d.ts] export declare enum SignatureFlags { None = 0, IsIndexer = 1, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum2.d.ts index 54c87c29d703f..b87f150de927f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum2.d.ts @@ -12,7 +12,7 @@ -//// [/.src/parserEnum2.d.ts] +//// [parserEnum2.d.ts] export declare enum SignatureFlags { None = 0, IsIndexer = 1, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnumDeclaration6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnumDeclaration6.d.ts index 6141424630422..2629c070887ac 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnumDeclaration6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnumDeclaration6.d.ts @@ -12,7 +12,7 @@ enum E { -//// [/.src/parserEnumDeclaration6.d.ts] +//// [parserEnumDeclaration6.d.ts] declare enum E { A = 1, B = 2, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction1.d.ts index e09649b16c8cc..bd61c7f6961ee 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction1.d.ts @@ -7,7 +7,7 @@ function => -//// [/.src/parserEqualsGreaterThanAfterFunction1.d.ts] +//// [parserEqualsGreaterThanAfterFunction1.d.ts] declare function (): invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction2.d.ts index c8680aa5fc69d..857dba5548d3b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction2.d.ts @@ -7,7 +7,7 @@ function (a: any => b: any; -//// [/.src/parserEqualsGreaterThanAfterFunction2.d.ts] +//// [parserEqualsGreaterThanAfterFunction2.d.ts] declare function (a: any, b: any): invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList1.d.ts index 7beaff5e884b1..23a7f807e6840 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList1.d.ts @@ -8,7 +8,7 @@ function f(a: any { -//// [/.src/parserErrorRecovery_ParameterList1.d.ts] +//// [parserErrorRecovery_ParameterList1.d.ts] declare function f(a: any, {}: {}): invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList2.d.ts index 2121f34448e66..25551fe3b3ffa 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList2.d.ts @@ -8,7 +8,7 @@ function f(a: any, { -//// [/.src/parserErrorRecovery_ParameterList2.d.ts] +//// [parserErrorRecovery_ParameterList2.d.ts] declare function f(a: any, {}: {}): invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserNoASIOnCallAfterFunctionExpression1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserNoASIOnCallAfterFunctionExpression1.d.ts index f5c44ddd89b49..7dbfbc2fd6a20 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserNoASIOnCallAfterFunctionExpression1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserNoASIOnCallAfterFunctionExpression1.d.ts @@ -9,7 +9,7 @@ var x = function (): void { } -//// [/.src/parserNoASIOnCallAfterFunctionExpression1.d.ts] +//// [parserNoASIOnCallAfterFunctionExpression1.d.ts] declare var x: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource10.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource10.d.ts index ac4279c2e3dcb..5c3981e9bd557 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource10.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource10.d.ts @@ -461,7 +461,7 @@ module TypeScript { -//// [/.src/parserRealSource10.d.ts] +//// [parserRealSource10.d.ts] declare namespace TypeScript { enum TokenID { Any = 0, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource14.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource14.d.ts index b3129daf4ee5c..d780b9016fa45 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource14.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource14.d.ts @@ -581,7 +581,7 @@ module TypeScript { -//// [/.src/parserRealSource14.d.ts] +//// [parserRealSource14.d.ts] declare namespace TypeScript { function lastOf(items: any[]): any; function max(a: number, b: number): number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource2.d.ts index cd8cc6ac6d127..bd0168e7b4f50 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource2.d.ts @@ -277,7 +277,7 @@ module TypeScript { -//// [/.src/parserRealSource2.d.ts] +//// [parserRealSource2.d.ts] declare namespace TypeScript { function hasFlag(val: number, flag: number): boolean; enum ErrorRecoverySet { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource3.d.ts index 3c6ab4270491f..0d11728486def 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource3.d.ts @@ -125,7 +125,7 @@ module TypeScript { -//// [/.src/parserRealSource3.d.ts] +//// [parserRealSource3.d.ts] declare namespace TypeScript { enum NodeType { None = 0, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserSkippedTokens16.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserSkippedTokens16.d.ts index 5a23bab73017e..28ff4b74d3811 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserSkippedTokens16.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserSkippedTokens16.d.ts @@ -14,7 +14,7 @@ var x = -//// [/.src/parserSkippedTokens16.d.ts] +//// [parserSkippedTokens16.d.ts] declare function Foo(): any; declare namespace M { } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserStrictMode8.d.ts index 052f40aaafc0f..1ebd13b2a3a61 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserStrictMode8.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserStrictMode8.d.ts @@ -9,7 +9,7 @@ function eval() { -//// [/.src/parserStrictMode8.d.ts] +//// [parserStrictMode8.d.ts] declare function eval(): invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/preserveConstEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/preserveConstEnums.d.ts index 9caca3c726e94..cd01a83421610 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/preserveConstEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/preserveConstEnums.d.ts @@ -9,7 +9,7 @@ const enum E { -//// [/.src/preserveConstEnums.d.ts] +//// [preserveConstEnums.d.ts] declare const enum E { Value = 1, Value2 = 1 diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/propertyAssignmentUseParentType3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/propertyAssignmentUseParentType3.d.ts index 5277f5208909d..bd92e0a80dbdb 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/propertyAssignmentUseParentType3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/propertyAssignmentUseParentType3.d.ts @@ -28,7 +28,7 @@ foo4.x = "456"; -//// [/.src/propertyAssignmentUseParentType3.d.ts] +//// [propertyAssignmentUseParentType3.d.ts] declare function foo1(): number; declare function foo2(): any[]; declare function foo3(): string; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportClassDefinition.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportClassDefinition.d.ts index 4bb58f10d75ec..f904b2490407d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportClassDefinition.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportClassDefinition.d.ts @@ -21,16 +21,16 @@ export = { -//// [/.src/foo1.d.ts] +//// [foo1.d.ts] declare class x { } export = x; -//// [/.src/foo2.d.ts] +//// [foo2.d.ts] declare const _default: invalid; export = _default; -//// [/.src/foo3.d.ts] +//// [foo3.d.ts] export {}; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reservedWords3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reservedWords3.d.ts index ce5370bf3e703..4d9bcf886b591 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reservedWords3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reservedWords3.d.ts @@ -12,7 +12,7 @@ function f5(for) {} -//// [/.src/reservedWords3.d.ts] +//// [reservedWords3.d.ts] declare function f1(): invalid; declare enum { } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/staticsInAFunction.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/staticsInAFunction.d.ts index 17e63bfc2ce0f..effe510aa2d81 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/staticsInAFunction.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/staticsInAFunction.d.ts @@ -12,7 +12,7 @@ function boo{ -//// [/.src/staticsInAFunction.d.ts] +//// [staticsInAFunction.d.ts] declare function boo(): invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/strictModeOctalLiterals.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/strictModeOctalLiterals.d.ts index 064c2e3f40e0a..bb3bdb291151c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/strictModeOctalLiterals.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/strictModeOctalLiterals.d.ts @@ -11,7 +11,7 @@ const orbitol: 01 = 01 -//// [/.src/strictModeOctalLiterals.d.ts] +//// [strictModeOctalLiterals.d.ts] export declare enum E { A = 13 } 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 index 656e97560f05a..23e7a3fa48f3a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit12.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit12.d.ts @@ -18,7 +18,7 @@ module M { -//// [/.src/symbolDeclarationEmit12.d.ts] +//// [symbolDeclarationEmit12.d.ts] declare namespace M { interface I { } 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 index cfc7e475ae33e..b2b69d69279ce 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts @@ -24,7 +24,7 @@ export interface InterpolationValue {} -//// [/.src/Folder/monorepo/core/index.d.ts] +//// [Folder/monorepo/core/index.d.ts] export declare function getStyles(): invalid; /// [Errors] //// 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 index c39fc7941bed3..2d00e9b33dc22 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes4.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes4.d.ts @@ -310,7 +310,7 @@ f4("**false**"); // false | "false" -//// [/.src/templateLiteralTypes4.d.ts] +//// [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; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterType.d.ts index e27b6a77c6b8e..b151079a43d62 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterType.d.ts @@ -11,7 +11,7 @@ function f(x: string) { -//// [/.src/templateStringInFunctionParameterType.d.ts] +//// [templateStringInFunctionParameterType.d.ts] declare function f(any: any, : invalid): any; declare function f(x: string): any; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterTypeES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterTypeES6.d.ts index 833f4d71e19a2..8f505f1525009 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterTypeES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterTypeES6.d.ts @@ -11,7 +11,7 @@ function f(x: string) { -//// [/.src/templateStringInFunctionParameterTypeES6.d.ts] +//// [templateStringInFunctionParameterTypeES6.d.ts] declare function f(any: any, : invalid): any; declare function f(x: string): any; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringWithEmbeddedYieldKeyword.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringWithEmbeddedYieldKeyword.d.ts index 9d202e5a353b7..ca65728505669 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringWithEmbeddedYieldKeyword.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringWithEmbeddedYieldKeyword.d.ts @@ -11,7 +11,7 @@ function* gen { -//// [/.src/templateStringWithEmbeddedYieldKeyword.d.ts] +//// [templateStringWithEmbeddedYieldKeyword.d.ts] declare function gen(): invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContexts.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContexts.d.ts index c82d50ac8207b..391b661313aac 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContexts.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContexts.d.ts @@ -50,7 +50,7 @@ enum SomeEnum { -//// [/.src/thisInInvalidContexts.d.ts] +//// [thisInInvalidContexts.d.ts] declare class BaseErrClass { constructor(t: any); } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContextsExternalModule.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContextsExternalModule.d.ts index 3b36bfec995d1..db66ed615d01c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContextsExternalModule.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContextsExternalModule.d.ts @@ -49,7 +49,7 @@ export = this; // Should be an error -//// [/.src/thisInInvalidContextsExternalModule.d.ts] +//// [thisInInvalidContextsExternalModule.d.ts] declare const _default: invalid; export = _default; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInPropertyBoundDeclarations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInPropertyBoundDeclarations.d.ts index 9bdf8047bf31b..66e4f7a6405a8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInPropertyBoundDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInPropertyBoundDeclarations.d.ts @@ -75,7 +75,7 @@ class B { -//// [/.src/thisInPropertyBoundDeclarations.d.ts] +//// [thisInPropertyBoundDeclarations.d.ts] declare class Bug { private name; private static func; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/this_inside-enum-should-not-be-allowed.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/this_inside-enum-should-not-be-allowed.d.ts index 511c3cc272a26..2e6843c6c0c9c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/this_inside-enum-should-not-be-allowed.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/this_inside-enum-should-not-be-allowed.d.ts @@ -15,7 +15,7 @@ module ModuleEnum { -//// [/.src/this_inside-enum-should-not-be-allowed.d.ts] +//// [this_inside-enum-should-not-be-allowed.d.ts] declare enum TopLevelEnum { ThisWasAllowedButShouldNotBe } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/twoAccessorsWithSameName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/twoAccessorsWithSameName.d.ts index b081bd2329856..b2c4244fcbaee 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/twoAccessorsWithSameName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/twoAccessorsWithSameName.d.ts @@ -42,7 +42,7 @@ var y: { -//// [/.src/twoAccessorsWithSameName.d.ts] +//// [twoAccessorsWithSameName.d.ts] declare class C { get x(): number; get x(): number; 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 index c3caf61a07bde..194d9ef8f745a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts @@ -109,7 +109,7 @@ var n: number = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n -//// [/.src/typeFromPropertyAssignment29.d.ts] +//// [typeFromPropertyAssignment29.d.ts] declare function ExpandoDecl(n: number): string; declare var n: number; declare const ExpandoExpr: { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment31.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment31.d.ts index ad5dc9bce7902..21e8b0e3d955e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment31.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment31.d.ts @@ -33,7 +33,7 @@ var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMer -//// [/.src/typeFromPropertyAssignment31.d.ts] +//// [typeFromPropertyAssignment31.d.ts] declare function ExpandoMerge(n: number): number; declare namespace ExpandoMerge { var p2: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment32.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment32.d.ts index ae7c34f96c5e9..3c39d7ba8019a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment32.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment32.d.ts @@ -35,11 +35,11 @@ namespace ExpandoMerge { -//// [/.src/expando.d.ts] +//// [expando.d.ts] declare function ExpandoMerge(n: number): number; declare var n: number; -//// [/.src/ns.d.ts] +//// [ns.d.ts] declare namespace ExpandoMerge { var p3: number; var p4: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment33.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment33.d.ts index 1d6102a6d77b8..6764498ccb3af 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment33.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment33.d.ts @@ -37,11 +37,11 @@ var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMer -//// [/.src/expando.d.ts] +//// [expando.d.ts] declare function ExpandoMerge(n: number): number; declare var n: number; -//// [/.src/ns.d.ts] +//// [ns.d.ts] declare namespace ExpandoMerge { var p3: number; var p4: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment36.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment36.d.ts index f21fc5549195f..94abb629cf7c2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment36.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment36.d.ts @@ -89,7 +89,7 @@ g.both -//// [/.src/typeFromPropertyAssignment36.d.ts] +//// [typeFromPropertyAssignment36.d.ts] declare function f(b: boolean): { (): void; e: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment38.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment38.d.ts index 50d352256d9a2..dcc3500462b38 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment38.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment38.d.ts @@ -15,7 +15,7 @@ f["prop"] = 3; -//// [/.src/typeFromPropertyAssignment38.d.ts] +//// [typeFromPropertyAssignment38.d.ts] declare function F(): void; declare const f: { (): void; 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 index 9e6551a534b77..64258c05c4ae7 100644 --- 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 @@ -38,7 +38,7 @@ export function fb(): B; -//// [/.src/main.d.ts] +//// [main.d.ts] export declare const va: invalid; export declare const vb: invalid; /// [Errors] //// 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 index bb5fe73fc8186..25dadd43aeeef 100644 --- 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 @@ -36,7 +36,7 @@ export * from "../other"; -//// [/.src/main.d.ts] +//// [main.d.ts] export declare const va: any; export declare const vb: invalid; /// [Errors] //// 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 index 7581f4031ae9f..38f308e035e3d 100644 --- 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 @@ -35,7 +35,7 @@ export * from "../other"; -//// [/.src/main.d.ts] +//// [main.d.ts] export declare const va: invalid; export declare const va2: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/underscoreEscapedNameInEnum.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/underscoreEscapedNameInEnum.d.ts index dae64b34c1cc3..8a02cff8d59d3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/underscoreEscapedNameInEnum.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/underscoreEscapedNameInEnum.d.ts @@ -11,7 +11,7 @@ enum E { -//// [/.src/underscoreEscapedNameInEnum.d.ts] +//// [underscoreEscapedNameInEnum.d.ts] declare enum E { "__foo" = 1, bar = 2 diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/verbatimModuleSyntaxConstEnumUsage.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/verbatimModuleSyntaxConstEnumUsage.d.ts index 3d327c6e9786c..f336b26e59988 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/verbatimModuleSyntaxConstEnumUsage.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/verbatimModuleSyntaxConstEnumUsage.d.ts @@ -20,14 +20,14 @@ export enum Bar { -//// [/.src/bar.d.ts] +//// [bar.d.ts] export declare enum Bar { a, c, e = 5 } -//// [/.src/foo.d.ts] +//// [foo.d.ts] export declare enum Foo { a = 1, b = 2, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/wellKnownSymbolExpando.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/wellKnownSymbolExpando.d.ts index 749bf20ac9627..b0c716bc690b8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/wellKnownSymbolExpando.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/wellKnownSymbolExpando.d.ts @@ -9,7 +9,7 @@ f[Symbol.iterator] = function() {} -//// [/.src/wellKnownSymbolExpando.d.ts] +//// [wellKnownSymbolExpando.d.ts] declare function f(): void; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments3_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments3_es6.d.ts index a96697d1c9246..be6e2b15b246a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments3_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments3_es6.d.ts @@ -7,7 +7,7 @@ var v = { *{ } } -//// [/.src/FunctionPropertyAssignments3_es6.d.ts] +//// [FunctionPropertyAssignments3_es6.d.ts] declare var v: { ""(): Generator; }; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments5_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments5_es6.d.ts index 9d313da277a8a..0872d3a3f3500 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments5_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments5_es6.d.ts @@ -7,7 +7,7 @@ var v = { *[foo()](): Generator { } } -//// [/.src/FunctionPropertyAssignments5_es6.d.ts] +//// [FunctionPropertyAssignments5_es6.d.ts] declare var v: { [x: number]: () => Generator; }; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration5_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration5_es6.d.ts index 170783205d996..35aa54907e5c2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration5_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration5_es6.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/MemberFunctionDeclaration5_es6.d.ts] +//// [MemberFunctionDeclaration5_es6.d.ts] declare class C { (): any; } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration6_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration6_es6.d.ts index ecc66be5a2733..e17c1b7b1e1aa 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration6_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration6_es6.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/MemberFunctionDeclaration6_es6.d.ts] +//// [MemberFunctionDeclaration6_es6.d.ts] declare class C { foo(): any; } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnum1.d.ts index 284e559918e9a..ca2a420774649 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnum1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnum1.d.ts @@ -14,7 +14,7 @@ -//// [/.src/ambientEnum1.d.ts] +//// [ambientEnum1.d.ts] declare enum E1 { y = 4.23 } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnumDeclaration1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnumDeclaration1.d.ts index 7ffe81958ecb8..2c658752c5634 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnumDeclaration1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnumDeclaration1.d.ts @@ -15,7 +15,7 @@ declare enum E { -//// [/.src/ambientEnumDeclaration1.d.ts] +//// [ambientEnumDeclaration1.d.ts] declare enum E { a = 10, b = 11, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientErrors.d.ts index 6338a532ad6f4..63c3fac86ad4b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientErrors.d.ts @@ -65,7 +65,7 @@ declare module 'bar' { -//// [/.src/ambientErrors.d.ts] +//// [ambientErrors.d.ts] declare var x: number; declare function fn(x: number): string; declare function fn(x: 'foo'): number; 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 index 893b14ffd244d..e46d6d14b7dee 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrayFakeFlatNoCrashInferenceDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrayFakeFlatNoCrashInferenceDeclarations.d.ts @@ -21,7 +21,7 @@ function foo(arr: T[], depth: number) { -//// [/.src/arrayFakeFlatNoCrashInferenceDeclarations.d.ts] +//// [arrayFakeFlatNoCrashInferenceDeclarations.d.ts] type BadFlatArray = { obj: { "done": Arr; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrowFunctionContexts.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrowFunctionContexts.d.ts index 36f9b3ad7fae1..110c9921ffb52 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrowFunctionContexts.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrowFunctionContexts.d.ts @@ -101,7 +101,7 @@ var asserted2: any; -//// [/.src/arrowFunctionContexts.d.ts] +//// [arrowFunctionContexts.d.ts] declare class Base { constructor(n: any); } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier.d.ts index 3ed6dbb2aab03..314ab18c34143 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/classMemberWithMissingIdentifier.d.ts] +//// [classMemberWithMissingIdentifier.d.ts] declare class C { : any; } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier2.d.ts index 3d44a88f0fae9..2b30cadf50edd 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier2.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/classMemberWithMissingIdentifier2.d.ts] +//// [classMemberWithMissingIdentifier2.d.ts] declare class C { : any; } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/collisionCodeGenEnumWithEnumMemberConflict.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/collisionCodeGenEnumWithEnumMemberConflict.d.ts index 5883b38d30d64..e1cb57b872239 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/collisionCodeGenEnumWithEnumMemberConflict.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/collisionCodeGenEnumWithEnumMemberConflict.d.ts @@ -10,7 +10,7 @@ enum Color { -//// [/.src/collisionCodeGenEnumWithEnumMemberConflict.d.ts] +//// [collisionCodeGenEnumWithEnumMemberConflict.d.ts] declare enum Color { Color = 0, Thing = 0 diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commonMissingSemicolons.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commonMissingSemicolons.d.ts index 45adff59b8202..7a567231d5e8d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commonMissingSemicolons.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commonMissingSemicolons.d.ts @@ -85,7 +85,7 @@ class NoSemicolonClassE { -//// [/.src/commonMissingSemicolons.d.ts] +//// [commonMissingSemicolons.d.ts] declare function myAsyncFunction1(): Promise; declare function myAsyncFunction2(): void; declare function myAsyncFunction3(): void; 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 index e85152d395fa4..32b06fc859f3f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedEnumTypeWidening.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedEnumTypeWidening.d.ts @@ -83,7 +83,7 @@ val2 = MyDeclaredEnum.B; -//// [/.src/computedEnumTypeWidening.d.ts] +//// [computedEnumTypeWidening.d.ts] declare function computed(x: number): number; declare enum E { A, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES5.d.ts index 03921269d45b9..2103f06e621e4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES5.d.ts @@ -22,7 +22,7 @@ var v = { -//// [/.src/computedPropertyNames10_ES5.d.ts] +//// [computedPropertyNames10_ES5.d.ts] declare var s: string; declare var n: number; declare var a: any; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES6.d.ts index 49ff540bd7859..bf70a99c32c56 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES6.d.ts @@ -22,7 +22,7 @@ var v = { -//// [/.src/computedPropertyNames10_ES6.d.ts] +//// [computedPropertyNames10_ES6.d.ts] declare var s: string; declare var n: number; declare var a: any; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum1.d.ts index 5803b4864924e..8c5af71474986 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum1.d.ts @@ -20,7 +20,7 @@ const enum E { -//// [/.src/constEnum1.d.ts] +//// [constEnum1.d.ts] declare const enum E { a = 10, b = 10, 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 index 9af680c6a31bd..e412844c5b8bf 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum2.d.ts @@ -19,7 +19,7 @@ const enum D { -//// [/.src/constEnum2.d.ts] +//// [constEnum2.d.ts] declare const CONST: number; declare const enum D { d = 10, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumDeclarations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumDeclarations.d.ts index 7dbf6474286eb..25a5fe9812db8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumDeclarations.d.ts @@ -17,7 +17,7 @@ const enum E2 { -//// [/.src/constEnumDeclarations.d.ts] +//// [constEnumDeclarations.d.ts] declare const enum E { A = 1, B = 2, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumErrors.d.ts index fa2fccdce931c..809a657057447 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumErrors.d.ts @@ -50,7 +50,7 @@ const enum NaNOrInfinity { -//// [/.src/constEnumErrors.d.ts] +//// [constEnumErrors.d.ts] declare const enum E { A = 0 } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumNamespaceReferenceCausesNoImport2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumNamespaceReferenceCausesNoImport2.d.ts index fe6cf08046852..eb9054738f2f4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumNamespaceReferenceCausesNoImport2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumNamespaceReferenceCausesNoImport2.d.ts @@ -26,7 +26,7 @@ export = Foo.ConstEnumOnlyModule; -//// [/.src/foo.d.ts] +//// [foo.d.ts] export declare namespace ConstEnumOnlyModule { const enum ConstFooEnum { Some = 0, @@ -35,10 +35,10 @@ export declare namespace ConstEnumOnlyModule { } } -//// [/.src/index.d.ts] +//// [index.d.ts] export {}; -//// [/.src/reexport.d.ts] +//// [reexport.d.ts] import * as Foo from "./foo"; declare const _default: typeof Foo.ConstEnumOnlyModule; export = _default; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess1.d.ts index 418a0272256c8..f1383e4d78a84 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess1.d.ts @@ -36,7 +36,7 @@ class C { -//// [/.src/constEnumPropertyAccess1.d.ts] +//// [constEnumPropertyAccess1.d.ts] declare const enum G { A = 1, B = 2, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess2.d.ts index 28875101abf43..42f901bb47a4e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess2.d.ts @@ -25,7 +25,7 @@ G.B = 3; -//// [/.src/constEnumPropertyAccess2.d.ts] +//// [constEnumPropertyAccess2.d.ts] declare const enum G { A = 1, B = 2, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess3.d.ts index 5704ab7b737df..b53bc34d8bff7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess3.d.ts @@ -25,7 +25,7 @@ E["E"].toString(); -//// [/.src/constEnumPropertyAccess3.d.ts] +//// [constEnumPropertyAccess3.d.ts] declare const enum E { A = -2, B = -1, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnums.d.ts index 0f0a494c85f6f..2e2127f1c2653 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnums.d.ts @@ -184,7 +184,7 @@ function baz(c: Comments): void { -//// [/.src/constEnums.d.ts] +//// [constEnums.d.ts] declare const enum Enum1 { A0 = 100 } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constantEnumAssert.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constantEnumAssert.d.ts index 155dfe8288c96..b8350e1c405b2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constantEnumAssert.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constantEnumAssert.d.ts @@ -80,7 +80,7 @@ const foo12: { -//// [/.src/constantEnumAssert.d.ts] +//// [constantEnumAssert.d.ts] declare enum E1 { a = 0, b = 1 diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constructorWithIncompleteTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constructorWithIncompleteTypeAnnotation.d.ts index b04945e1e1b4b..970fc421bebf9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constructorWithIncompleteTypeAnnotation.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constructorWithIncompleteTypeAnnotation.d.ts @@ -285,7 +285,7 @@ TypeScriptAllInOne.Program.Main(); -//// [/.src/constructorWithIncompleteTypeAnnotation.d.ts] +//// [constructorWithIncompleteTypeAnnotation.d.ts] declare module "fs" { class File { constructor(filename: string); 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 index f228a1bade30c..72428c8680d5d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileEnums.d.ts @@ -41,7 +41,7 @@ enum e5 { -//// [/.src/declFileEnums.d.ts] +//// [declFileEnums.d.ts] declare enum e1 { a = 0, b = 1, 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 index a5f0da9958eb7..65a9f7bc2d3a4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCommonJsModuleReferencedType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCommonJsModuleReferencedType.d.ts @@ -28,7 +28,7 @@ export const y: RootProps = bar(); -//// [/.src/r/entry.d.ts] +//// [r/entry.d.ts] import { RootProps } from "root"; export declare const x: any; export declare const y: RootProps; 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 index b2543d2456cd3..4424e3df9b683 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDefaultExportWithStaticAssignment.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDefaultExportWithStaticAssignment.d.ts @@ -36,18 +36,18 @@ C.B = B; -//// [/.src/foo.d.ts] +//// [foo.d.ts] export declare class Foo { } -//// [/.src/index1.d.ts] +//// [index1.d.ts] declare function Example(): void; declare namespace Example { var Foo: typeof import("./foo").Foo; } export default Example; -//// [/.src/index2.d.ts] +//// [index2.d.ts] import { Foo } from './foo'; export { Foo }; declare function Example(): void; @@ -56,7 +56,7 @@ declare namespace Example { } export default Example; -//// [/.src/index3.d.ts] +//// [index3.d.ts] export declare class Bar { } declare function Example(): void; @@ -65,7 +65,7 @@ declare namespace Example { } export default Example; -//// [/.src/index4.d.ts] +//// [index4.d.ts] export declare function C(): any; export declare namespace C { var A: () => void; 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 index c2efdf93b7088..6e0c01fa8fae2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringParameterProperties.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringParameterProperties.d.ts @@ -22,7 +22,7 @@ class C3 { -//// [/.src/declarationEmitDestructuringParameterProperties.d.ts] +//// [declarationEmitDestructuringParameterProperties.d.ts] declare class C1 { x: string; y: string; 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 index 351b9d8e9eb87..b08f21f48b768 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpandoPropertyPrivateName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpandoPropertyPrivateName.d.ts @@ -14,13 +14,13 @@ q.val = f(); -//// [/.src/a.d.ts] +//// [a.d.ts] interface I { } export declare function f(): I; export {}; -//// [/.src/b.d.ts] +//// [b.d.ts] export declare function q(): void; export declare namespace q { var val: I; 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 index 316faf5baa8e9..69d6ae507f851 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitFunctionDuplicateNamespace.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitFunctionDuplicateNamespace.d.ts @@ -14,7 +14,7 @@ f.x = 2; -//// [/.src/declarationEmitFunctionDuplicateNamespace.d.ts] +//// [declarationEmitFunctionDuplicateNamespace.d.ts] declare function f(a: 0): 0; declare function f(a: 1): 1; declare namespace f { 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 index 998880ed9403b..441e2051edc13 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitFunctionKeywordProp.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitFunctionKeywordProp.d.ts @@ -16,7 +16,7 @@ baz.normal = false; -//// [/.src/declarationEmitFunctionKeywordProp.d.ts] +//// [declarationEmitFunctionKeywordProp.d.ts] declare function foo(): void; declare namespace foo { var _a: boolean; 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 index f8f322b0430f5..21cfbc23ed6bc 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments.d.ts @@ -21,7 +21,7 @@ const a: string = foo[dashStrMem]; -//// [/.src/declarationEmitLateBoundAssignments.d.ts] +//// [declarationEmitLateBoundAssignments.d.ts] export declare function foo(): void; export declare namespace foo { var bar: number; 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 index 939afc01293d9..e1acf6d54f4ca 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments2.d.ts @@ -89,7 +89,7 @@ arrow10[emoji] = 0 -//// [/.src/declarationEmitLateBoundAssignments2.d.ts] +//// [declarationEmitLateBoundAssignments2.d.ts] export declare function decl(): void; export declare namespace decl { var B: string; 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 index 378b863c08485..93fcae0c32879 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectAssignedDefaultExport.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectAssignedDefaultExport.d.ts @@ -44,7 +44,7 @@ export default Object.assign(A, { -//// [/.src/index.d.ts] +//// [index.d.ts] import { DefaultTheme, StyledComponent } from "styled-components"; export declare const C: StyledComponent<"div", DefaultTheme, {}, never>; declare const _default; 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 index 7fe057b4ff9a9..a8e02042d49fc 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference.d.ts @@ -47,9 +47,9 @@ export * from '@raymondfeng/pkg1'; -//// [/.src/monorepo/pkg3/dist/index.d.ts] +//// [monorepo/pkg3/dist/index.d.ts] export * from './keys'; -//// [/.src/monorepo/pkg3/dist/keys.d.ts] +//// [monorepo/pkg3/dist/keys.d.ts] import { MetadataAccessor } from "@raymondfeng/pkg2"; export declare const ADMIN: MetadataAccessor; 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 index 2133d61361d0b..f2a976a7a411c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference2.d.ts @@ -50,9 +50,9 @@ export {IdType} from '@raymondfeng/pkg1'; -//// [/.src/monorepo/pkg3/dist/index.d.ts] +//// [monorepo/pkg3/dist/index.d.ts] export * from './keys'; -//// [/.src/monorepo/pkg3/dist/keys.d.ts] +//// [monorepo/pkg3/dist/keys.d.ts] import { MetadataAccessor } from "@raymondfeng/pkg2"; export declare const ADMIN: MetadataAccessor; 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 index ef2a88b5ec948..04d1f0a098749 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference3.d.ts @@ -47,10 +47,10 @@ export {MetadataAccessor} from '@raymondfeng/pkg1'; -//// [/.src/monorepo/pkg3/dist/index.d.ts] +//// [monorepo/pkg3/dist/index.d.ts] export * from './keys'; -//// [/.src/monorepo/pkg3/dist/keys.d.ts] +//// [monorepo/pkg3/dist/keys.d.ts] import { MetadataAccessor } from "@raymondfeng/pkg2"; export declare const ADMIN: any; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFiles.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFiles.d.ts index 2220cf8f84de1..51cddfaf7cc67 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFiles.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFiles.d.ts @@ -55,7 +55,7 @@ class C4 { -//// [/.src/declarationFiles.d.ts] +//// [declarationFiles.d.ts] declare class C1 { x: this; f(x: this): this; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationInAmbientContext.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationInAmbientContext.d.ts index fdd8f1a151282..00aac8fdb985a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationInAmbientContext.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationInAmbientContext.d.ts @@ -9,6 +9,6 @@ declare var {c, d}; // Error, destructuring declaration not allowed in ambient -//// [/.src/declarationInAmbientContext.d.ts] +//// [declarationInAmbientContext.d.ts] declare var a: any, b: any; declare var c: any, d: any; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationWithNoInitializer.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationWithNoInitializer.d.ts index 883da0c8cd795..39f595868ba97 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationWithNoInitializer.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationWithNoInitializer.d.ts @@ -9,7 +9,7 @@ var {c, d}; // Error, no initializer -//// [/.src/declarationWithNoInitializer.d.ts] +//// [declarationWithNoInitializer.d.ts] declare var a: any, b: any; declare var c: any, d: any; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterDeclaration6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterDeclaration6.d.ts index 4ef498f2a271f..051d21d173c2f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterDeclaration6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterDeclaration6.d.ts @@ -47,7 +47,7 @@ b2({ while: 1 }); -//// [/.src/destructuringParameterDeclaration6.d.ts] +//// [destructuringParameterDeclaration6.d.ts] declare function a({ while: }: { while: any; }): void; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties1.d.ts index c481abdbb344d..c33830af89f82 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties1.d.ts @@ -41,7 +41,7 @@ const c3_z: any = dest_1[2]; -//// [/.src/destructuringParameterProperties1.d.ts] +//// [destructuringParameterProperties1.d.ts] declare class C1 { x: string; y: string; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties2.d.ts index 5f99d88772b83..c56060992a6e6 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties2.d.ts @@ -44,7 +44,7 @@ const z_c: any = dest[2]; -//// [/.src/destructuringParameterProperties2.d.ts] +//// [destructuringParameterProperties2.d.ts] declare class C1 { private k; private a: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties3.d.ts index e7e4e66b12606..1634b328a8f45 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties3.d.ts @@ -50,7 +50,7 @@ const z_c: any = dest_1[2]; -//// [/.src/destructuringParameterProperties3.d.ts] +//// [destructuringParameterProperties3.d.ts] declare class C1 { private k; private a: T; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties4.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties4.d.ts index 58d6de3d40616..f33ca3a215156 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties4.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties4.d.ts @@ -32,7 +32,7 @@ class C2 extends C1 { -//// [/.src/destructuringParameterProperties4.d.ts] +//// [destructuringParameterProperties4.d.ts] declare class C1 { private k; protected a: T; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties5.d.ts index b16895f70e1c7..9920f630d574e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties5.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties5.d.ts @@ -23,7 +23,7 @@ const a_z: any = dest[4]; -//// [/.src/destructuringParameterProperties5.d.ts] +//// [destructuringParameterProperties5.d.ts] type ObjType1 = { x: number; y: string; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/disallowLineTerminatorBeforeArrow.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/disallowLineTerminatorBeforeArrow.d.ts index 84aa9b47d880b..f7d7caebfafd9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/disallowLineTerminatorBeforeArrow.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/disallowLineTerminatorBeforeArrow.d.ts @@ -80,7 +80,7 @@ module m { -//// [/.src/disallowLineTerminatorBeforeArrow.d.ts] +//// [disallowLineTerminatorBeforeArrow.d.ts] declare var f1: () => void; declare var f2: (x: string, y: string) => void; declare var f3: (x: string, y: number, ...rest: any[]) => void; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicateObjectLiteralProperty.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicateObjectLiteralProperty.d.ts index e2ef204594e60..2c05232339a5a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicateObjectLiteralProperty.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicateObjectLiteralProperty.d.ts @@ -24,7 +24,7 @@ var y = { -//// [/.src/duplicateObjectLiteralProperty.d.ts] +//// [duplicateObjectLiteralProperty.d.ts] declare var x: { a: { c: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumAssignmentCompat5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumAssignmentCompat5.d.ts index e242919ed6952..be58d75127010 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumAssignmentCompat5.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumAssignmentCompat5.d.ts @@ -30,7 +30,7 @@ let ca: Computed.A = 1; // error, Computed.A isn't a literal type because Comput -//// [/.src/enumAssignmentCompat5.d.ts] +//// [enumAssignmentCompat5.d.ts] declare enum E { A = 0, B = 1, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics.d.ts index 3bb40f0475433..8d1e4430898ea 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics.d.ts @@ -86,7 +86,7 @@ var doPropagate: (E9 | E6 | E5)[] = [ -//// [/.src/enumBasics.d.ts] +//// [enumBasics.d.ts] declare enum E1 { A = 0, B = 1, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics2.d.ts index 5d6b3e9e13785..046d8b150de70 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics2.d.ts @@ -21,7 +21,7 @@ enum Bar { -//// [/.src/enumBasics2.d.ts] +//// [enumBasics2.d.ts] declare enum Foo { a = 2, b = 3, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics3.d.ts index 8b8aa31f937a6..61d08fb728760 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics3.d.ts @@ -24,7 +24,7 @@ module M { -//// [/.src/enumBasics3.d.ts] +//// [enumBasics3.d.ts] declare namespace M { namespace N { enum E1 { 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 index 00bc16c94a1e5..80dba0b117c3b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumClassification.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumClassification.d.ts @@ -85,7 +85,7 @@ enum E20 { -//// [/.src/enumClassification.d.ts] +//// [enumClassification.d.ts] declare enum E01 { A = 0 } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithString.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithString.d.ts index 4c6475c3819c5..4bddf7c9009dd 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithString.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithString.d.ts @@ -39,7 +39,7 @@ declare enum T6 { -//// [/.src/enumConstantMemberWithString.d.ts] +//// [enumConstantMemberWithString.d.ts] declare enum T1 { a = "1", b = "12", diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithStringEmitDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithStringEmitDeclaration.d.ts index 12fbd3d767ed7..dd4dcb9671ff0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithStringEmitDeclaration.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithStringEmitDeclaration.d.ts @@ -35,7 +35,7 @@ declare enum T6 { -//// [/.src/enumConstantMemberWithStringEmitDeclaration.d.ts] +//// [enumConstantMemberWithStringEmitDeclaration.d.ts] declare enum T1 { a = "1", b = "12", diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiterals.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiterals.d.ts index fdddc71f6225b..567ae46031463 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiterals.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiterals.d.ts @@ -50,7 +50,7 @@ declare enum T7 { -//// [/.src/enumConstantMemberWithTemplateLiterals.d.ts] +//// [enumConstantMemberWithTemplateLiterals.d.ts] declare enum T1 { a = "1" } 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 index 5e210e3f73fd8..d0ff533c66409 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts @@ -46,7 +46,7 @@ declare enum T7 { -//// [/.src/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts] +//// [enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts] declare enum T1 { a = "1" } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMembers.d.ts index 7e4fe201c2dad..28eb136e39e44 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMembers.d.ts @@ -46,7 +46,7 @@ const enum E6 { -//// [/.src/enumConstantMembers.d.ts] +//// [enumConstantMembers.d.ts] declare enum E1 { a = 1, b = 2 diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrorOnConstantBindingWithInitializer.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrorOnConstantBindingWithInitializer.d.ts index d5b8b9cb4951b..8d829c9585dd4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrorOnConstantBindingWithInitializer.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrorOnConstantBindingWithInitializer.d.ts @@ -18,7 +18,7 @@ enum E { -//// [/.src/enumErrorOnConstantBindingWithInitializer.d.ts] +//// [enumErrorOnConstantBindingWithInitializer.d.ts] type Thing = { value?: string | number; }; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrors.d.ts index 5060fdd3abaf9..b25250eaffc4c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrors.d.ts @@ -60,7 +60,7 @@ enum E14 { a, b: any "hello" += 1, c, d} -//// [/.src/enumErrors.d.ts] +//// [enumErrors.d.ts] declare enum any { } declare enum number { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumExportMergingES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumExportMergingES6.d.ts index 23ed53e9a5741..1beae892b031c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumExportMergingES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumExportMergingES6.d.ts @@ -16,7 +16,7 @@ export enum Animals { -//// [/.src/enumExportMergingES6.d.ts] +//// [enumExportMergingES6.d.ts] export declare enum Animals { Cat = 1 } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumLiteralAssignableToEnumInsideUnion.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumLiteralAssignableToEnumInsideUnion.d.ts index 5da8504c6ca17..650bb23301707 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumLiteralAssignableToEnumInsideUnion.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumLiteralAssignableToEnumInsideUnion.d.ts @@ -35,7 +35,7 @@ const e5: Ka.Foo | boolean = Z.Foo.A; // ok -//// [/.src/enumLiteralAssignableToEnumInsideUnion.d.ts] +//// [enumLiteralAssignableToEnumInsideUnion.d.ts] declare namespace X { enum Foo { A = 0, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMerging.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMerging.d.ts index 6a9ba1ce228b1..5443787b1c6a3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMerging.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMerging.d.ts @@ -72,7 +72,7 @@ module M6 { -//// [/.src/enumMerging.d.ts] +//// [enumMerging.d.ts] declare namespace M1 { enum EConst1 { A = 3, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMergingErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMergingErrors.d.ts index f28d4aa2751dd..63ef3bee3e140 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMergingErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMergingErrors.d.ts @@ -48,7 +48,7 @@ module M2 { -//// [/.src/enumMergingErrors.d.ts] +//// [enumMergingErrors.d.ts] declare namespace M { enum E1 { A = 0 diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumNumbering1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumNumbering1.d.ts index 6ef573ce0082f..32dae96ddba54 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumNumbering1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumNumbering1.d.ts @@ -14,7 +14,7 @@ enum Test { -//// [/.src/enumNumbering1.d.ts] +//// [enumNumbering1.d.ts] declare enum Test { A = 0, B = 1, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumPropertyAccessBeforeInitalisation.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumPropertyAccessBeforeInitalisation.d.ts index 1bf6dcf5bdcce..0b8d0e13a8f70 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumPropertyAccessBeforeInitalisation.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumPropertyAccessBeforeInitalisation.d.ts @@ -13,7 +13,7 @@ enum E { -//// [/.src/enumPropertyAccessBeforeInitalisation.d.ts] +//// [enumPropertyAccessBeforeInitalisation.d.ts] declare enum E { A, B, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithComputedMember.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithComputedMember.d.ts index f5f09ee4d54e8..60c8438307d5a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithComputedMember.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithComputedMember.d.ts @@ -12,7 +12,7 @@ enum A { -//// [/.src/enumWithComputedMember.d.ts] +//// [enumWithComputedMember.d.ts] declare enum A { X, Y, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithExport.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithExport.d.ts index 4480f3c3aaac0..0891c9d41f582 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithExport.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithExport.d.ts @@ -12,7 +12,7 @@ enum x { -//// [/.src/enumWithExport.d.ts] +//// [enumWithExport.d.ts] declare namespace x { let y: number; } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithParenthesizedInitializer1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithParenthesizedInitializer1.d.ts index f80bb0017582f..176013a511020 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithParenthesizedInitializer1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithParenthesizedInitializer1.d.ts @@ -9,7 +9,7 @@ enum E { -//// [/.src/enumWithParenthesizedInitializer1.d.ts] +//// [enumWithParenthesizedInitializer1.d.ts] declare enum E { e = -3 } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithoutInitializerAfterComputedMember.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithoutInitializerAfterComputedMember.d.ts index 15273844eaed8..bd94ad55e5ef6 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithoutInitializerAfterComputedMember.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithoutInitializerAfterComputedMember.d.ts @@ -11,7 +11,7 @@ enum E { -//// [/.src/enumWithoutInitializerAfterComputedMember.d.ts] +//// [enumWithoutInitializerAfterComputedMember.d.ts] declare enum E { a = 0, b = 0, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/equalityWithEnumTypes.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/equalityWithEnumTypes.d.ts index 22f96265c0cc1..ab9663b45afb6 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/equalityWithEnumTypes.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/equalityWithEnumTypes.d.ts @@ -48,7 +48,7 @@ function f2(v: E2): void { -//// [/.src/equalityWithEnumTypes.d.ts] +//// [equalityWithEnumTypes.d.ts] declare enum E1 { a = 1, b = 2 diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exactSpellingSuggestion.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exactSpellingSuggestion.d.ts index e7dbd9381fe9d..5e610cab97d38 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exactSpellingSuggestion.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exactSpellingSuggestion.d.ts @@ -16,7 +16,7 @@ U8.bit_2 -//// [/.src/exactSpellingSuggestion.d.ts] +//// [exactSpellingSuggestion.d.ts] declare enum U8 { BIT_0 = 1, BIT_1 = 2, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesJSDocInTs.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesJSDocInTs.d.ts index b5817c419fbc1..a45de190fb8f8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesJSDocInTs.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesJSDocInTs.d.ts @@ -12,7 +12,7 @@ Foo.bar = () => { }; -//// [/.src/expandoFunctionContextualTypesJSDocInTs.d.ts] +//// [expandoFunctionContextualTypesJSDocInTs.d.ts] export declare function Foo(): void; export declare namespace Foo { var bar: () => void; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesNoValue.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesNoValue.d.ts index 9d06d3a92a995..0e1bf9cb89052 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesNoValue.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesNoValue.d.ts @@ -13,7 +13,7 @@ Foo.bar = () => { }; -//// [/.src/expandoFunctionContextualTypesNoValue.d.ts] +//// [expandoFunctionContextualTypesNoValue.d.ts] export declare function Foo(): void; export declare namespace Foo { var bar: () => void; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts index ef921c5fc3bdc..19f6036730f61 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts @@ -16,7 +16,7 @@ expr2[s] = 0 -//// [/.src/expandoFunctionExpressionsWithDynamicNames.d.ts] +//// [expandoFunctionExpressionsWithDynamicNames.d.ts] export declare const expr: { (): void; X: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignDottedName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignDottedName.d.ts index 2770032361817..856553b1e77c7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignDottedName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignDottedName.d.ts @@ -14,10 +14,10 @@ export function x(): boolean{ -//// [/.src/foo1.d.ts] +//// [foo1.d.ts] export declare function x(): boolean; -//// [/.src/foo2.d.ts] +//// [foo2.d.ts] import foo1 = require('./foo1'); declare const _default: typeof foo1.x; export = _default; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignNonIdentifier.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignNonIdentifier.d.ts index 24a6737b70081..7c096dc8dbd35 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignNonIdentifier.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignNonIdentifier.d.ts @@ -31,36 +31,36 @@ export = null; // Ok -//// [/.src/foo1.d.ts] +//// [foo1.d.ts] declare const _default: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"; export = _default; -//// [/.src/foo2.d.ts] +//// [foo2.d.ts] declare const _default: "sausages"; export = _default; -//// [/.src/foo3.d.ts] +//// [foo3.d.ts] declare const _default: { new (): {}; }; export = _default; -//// [/.src/foo4.d.ts] +//// [foo4.d.ts] declare const _default: true; export = _default; -//// [/.src/foo5.d.ts] +//// [foo5.d.ts] export = undefined; -//// [/.src/foo6.d.ts] +//// [foo6.d.ts] declare const _default: any; export = _default; -//// [/.src/foo7.d.ts] +//// [foo7.d.ts] declare const _default: DateConstructor | StringConstructor; export = _default; -//// [/.src/foo8.d.ts] +//// [foo8.d.ts] declare const _default: any; export = _default; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignmentWithoutIdentifier1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignmentWithoutIdentifier1.d.ts index 9483c0a28cb99..54fdd1294b808 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignmentWithoutIdentifier1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignmentWithoutIdentifier1.d.ts @@ -14,6 +14,6 @@ export = new Greeter(); -//// [/.src/exportAssignmentWithoutIdentifier1.d.ts] +//// [exportAssignmentWithoutIdentifier1.d.ts] declare const _default: any; export = _default; 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 index 4b4d2af3d99b8..67bf4c41f8474 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportDefaultNamespace.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportDefaultNamespace.d.ts @@ -12,7 +12,7 @@ someFunc.someProp = 'yo'; -//// [/.src/exportDefaultNamespace.d.ts] +//// [exportDefaultNamespace.d.ts] declare function someFunc(): string; declare namespace someFunc { var someProp: string; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty.d.ts index 8acfe7b4ef417..fed9d43af14b0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty.d.ts @@ -44,7 +44,7 @@ export = "foo".length; -//// [/.src/a.d.ts] +//// [a.d.ts] declare namespace A { class B { constructor(b: number); @@ -56,10 +56,10 @@ declare namespace A { declare const _default: typeof A.B; export = _default; -//// [/.src/b.d.ts] +//// [b.d.ts] declare const _default: number; export = _default; -//// [/.src/index.d.ts] +//// [index.d.ts] /// export {}; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty2.d.ts index 96f7bca2a8b3b..05f294c44fbf0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty2.d.ts @@ -21,9 +21,9 @@ export = C.B; -//// [/.src/a.d.ts] +//// [a.d.ts] declare const _default: number; export = _default; -//// [/.src/b.d.ts] +//// [b.d.ts] export {}; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/forwardRefInEnum.d.ts index c65b22d19c955..f20619bca280c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/forwardRefInEnum.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/forwardRefInEnum.d.ts @@ -20,7 +20,7 @@ enum E1 { -//// [/.src/forwardRefInEnum.d.ts] +//// [forwardRefInEnum.d.ts] declare enum E1 { X = 0, X1 = 0, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/functionImplementations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/functionImplementations.d.ts index 815f82dbdfd89..41b896e931b0e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/functionImplementations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/functionImplementations.d.ts @@ -165,7 +165,7 @@ var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherC -//// [/.src/functionImplementations.d.ts] +//// [functionImplementations.d.ts] declare var v: void; declare var a: any; declare var a: any; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/initializersInAmbientEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/initializersInAmbientEnums.d.ts index 2938aac5c5e75..4d77a6a06a18e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/initializersInAmbientEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/initializersInAmbientEnums.d.ts @@ -11,7 +11,7 @@ declare enum E { -//// [/.src/initializersInAmbientEnums.d.ts] +//// [initializersInAmbientEnums.d.ts] declare enum E { a = 10, b = 10, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts index ac4d898541483..745235ed41d92 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts @@ -37,7 +37,7 @@ declare enum Enum { -//// [/.src/enum1.d.ts] +//// [enum1.d.ts] declare enum Enum { A = 0, B = 1, @@ -48,7 +48,7 @@ declare enum Enum { } declare const d = "d"; -//// [/.src/enum2.d.ts] +//// [enum2.d.ts] declare enum Enum { D = "d", E = 0,// error @@ -59,12 +59,12 @@ declare enum Enum { F = 0 } -//// [/.src/module-namespaces.d.ts] +//// [module-namespaces.d.ts] export declare namespace Instantiated { const x = 1; } -//// [/.src/script-namespaces.d.ts] +//// [script-namespaces.d.ts] declare namespace Instantiated { const x = 1; } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsContainerMergeTsDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsContainerMergeTsDeclaration.d.ts index 8cb634a5df4ad..288e12190c1d6 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsContainerMergeTsDeclaration.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsContainerMergeTsDeclaration.d.ts @@ -15,7 +15,7 @@ var x = function (): number { -//// [/.src/b.d.ts] +//// [b.d.ts] declare var x: number; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxComponentTypeErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxComponentTypeErrors.d.ts index f99a47d647805..8fe029bbf903a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxComponentTypeErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxComponentTypeErrors.d.ts @@ -47,7 +47,7 @@ const elem6: JSX.Element = ; -//// [/.src/jsxComponentTypeErrors.d.ts] +//// [jsxComponentTypeErrors.d.ts] declare namespace JSX { interface Element { type: 'element'; 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 index f2a295c2ea79c..0374f480b40bc 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/lateBoundFunctionMemberAssignmentDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/lateBoundFunctionMemberAssignmentDeclarations.d.ts @@ -13,7 +13,7 @@ const x: string = foo[_private]; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare function foo(): void; export declare namespace foo { var bar: number; 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 index 2a49b4ae39027..fe7ae296559b8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts @@ -35,5 +35,5 @@ export interface Thing {} // not exported in export map, inaccessible under new -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: () => Promise; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedDeclarations2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedDeclarations2.d.ts index 3e28dc2212610..5a03d57f922d0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedDeclarations2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedDeclarations2.d.ts @@ -16,7 +16,7 @@ module Foo { -//// [/.src/mergedDeclarations2.d.ts] +//// [mergedDeclarations2.d.ts] declare enum Foo { b = 0 } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedEnumDeclarationCodeGen.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedEnumDeclarationCodeGen.d.ts index 0eff544e844f4..54f3e5857b315 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedEnumDeclarationCodeGen.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedEnumDeclarationCodeGen.d.ts @@ -13,7 +13,7 @@ enum E { -//// [/.src/mergedEnumDeclarationCodeGen.d.ts] +//// [mergedEnumDeclarationCodeGen.d.ts] declare enum E { a = 0, b = 0 diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/methodContainingLocalFunction.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/methodContainingLocalFunction.d.ts index 6a61f7d4eac42..d35d332218c70 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/methodContainingLocalFunction.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/methodContainingLocalFunction.d.ts @@ -56,7 +56,7 @@ enum E { -//// [/.src/methodContainingLocalFunction.d.ts] +//// [methodContainingLocalFunction.d.ts] declare class BugExhibition { exhibitBug(): void; } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mixedTypeEnumComparison.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mixedTypeEnumComparison.d.ts index bfe525b77eb3c..9e81b4b2b723c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mixedTypeEnumComparison.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mixedTypeEnumComparison.d.ts @@ -45,7 +45,7 @@ someNumber > E2.C1; -//// [/.src/mixedTypeEnumComparison.d.ts] +//// [mixedTypeEnumComparison.d.ts] declare const enum E { S1 = "foo", S2 = "bar", diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationDisallowedExtensions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationDisallowedExtensions.d.ts index becfea5a7020e..93abfd3bab1a1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationDisallowedExtensions.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationDisallowedExtensions.d.ts @@ -49,19 +49,19 @@ import "./x"; -//// [/.src/main.d.ts] +//// [main.d.ts] import "./x"; -//// [/.src/observable.d.ts] +//// [observable.d.ts] export declare class Observable { filter(pred: (e: T) => boolean): Observable; } export declare var x: number; -//// [/.src/test.d.ts] +//// [test.d.ts] export declare let b: number; -//// [/.src/x.d.ts] +//// [x.d.ts] declare namespace N1 { let x: number; } @@ -89,7 +89,7 @@ declare module "./test" { } export {}; -//// [/.src/x0.d.ts] +//// [x0.d.ts] export declare let a: number; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationNoNewNames.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationNoNewNames.d.ts index f11bfdc6f4f0d..ceaf6566bb1d5 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationNoNewNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationNoNewNames.d.ts @@ -31,10 +31,10 @@ let y = x.map(x => x + 1); -//// [/.src/main.d.ts] +//// [main.d.ts] import "./map"; -//// [/.src/map.d.ts] +//// [map.d.ts] declare module "./observable" { interface Observable { map(proj: (e: T) => U): Observable; @@ -47,7 +47,7 @@ declare module "./observable" { } export {}; -//// [/.src/observable.d.ts] +//// [observable.d.ts] export declare class Observable { filter(pred: (e: T) => boolean): Observable; } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/negateOperatorInvalidOperations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/negateOperatorInvalidOperations.d.ts index f576aad39e1e5..b194e285f9fb1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/negateOperatorInvalidOperations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/negateOperatorInvalidOperations.d.ts @@ -18,7 +18,7 @@ var NUMBER =-; -//// [/.src/negateOperatorInvalidOperations.d.ts] +//// [negateOperatorInvalidOperations.d.ts] declare var NUMBER1: any; declare var NUMBER: any; declare var NUMBER2: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/newTargetNarrowing.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/newTargetNarrowing.d.ts index 60db291144a98..5330ca3f5c6a6 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/newTargetNarrowing.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/newTargetNarrowing.d.ts @@ -16,7 +16,7 @@ f.marked = true; -//// [/.src/newTargetNarrowing.d.ts] +//// [newTargetNarrowing.d.ts] declare function foo(x: true): void; declare function f(): void; declare namespace f { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noImplicitAnyDestructuringVarDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noImplicitAnyDestructuringVarDeclaration.d.ts index 21794fd1f0040..93fc779898e6e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noImplicitAnyDestructuringVarDeclaration.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noImplicitAnyDestructuringVarDeclaration.d.ts @@ -23,7 +23,7 @@ const a5: any = temp === undefined ? undefined : dest_2[0]; // error -//// [/.src/noImplicitAnyDestructuringVarDeclaration.d.ts] +//// [noImplicitAnyDestructuringVarDeclaration.d.ts] declare var a: any, b: any, c: any, d: any; declare var a1: any, b1: any, c1: any, d1: any; declare var a2: any, b2: any, c2: any, d2: any; 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 index b4d92bc71cc73..ca851d21b9aac 100644 --- 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 @@ -30,7 +30,7 @@ export const x: () => Thing; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: any; /// [Errors] //// 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 index b4d92bc71cc73..ca851d21b9aac 100644 --- 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 @@ -30,7 +30,7 @@ export const x: () => Thing; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: any; /// [Errors] //// 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 index 03a8145730b47..5c28878a50d09 100644 --- 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 @@ -31,7 +31,7 @@ export const x: () => Thing = null as any; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: any; //// [/.src/node_modules/inner/index.d.ts] 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 index 03a8145730b47..5c28878a50d09 100644 --- 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 @@ -31,7 +31,7 @@ export const x: () => Thing = null as any; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: any; //// [/.src/node_modules/inner/index.d.ts] 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 index 55c156c2d058f..59ab25560c421 100644 --- 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 @@ -37,7 +37,7 @@ export const x: () => Thing; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: import("inner/other").Thing; /// [Errors] //// 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 index 55c156c2d058f..59ab25560c421 100644 --- 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 @@ -37,7 +37,7 @@ export const x: () => Thing; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: import("inner/other").Thing; /// [Errors] //// 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 index a65ce642166f3..cd03b05c05b90 100644 --- 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 @@ -32,7 +32,7 @@ export const x: () => Thing; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: import("inner/other.js").Thing; /// [Errors] //// 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 index a65ce642166f3..cd03b05c05b90 100644 --- 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 @@ -32,7 +32,7 @@ export const x: () => Thing; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: import("inner/other.js").Thing; /// [Errors] //// 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 index bf63481d87b58..2888ee5771ac5 100644 --- 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 @@ -32,7 +32,7 @@ export const x: () => Thing; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: import("inner/other.js").Thing; /// [Errors] //// 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 index bf63481d87b58..2888ee5771ac5 100644 --- 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 @@ -32,7 +32,7 @@ export const x: () => Thing; -//// [/.src/index.d.ts] +//// [index.d.ts] export declare const a: import("inner/other.js").Thing; /// [Errors] //// 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 index 1bbb242cd6569..2be1a7840bf5d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nullPropertyName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nullPropertyName.d.ts @@ -89,7 +89,7 @@ foo.of = 1; -//// [/.src/nullPropertyName.d.ts] +//// [nullPropertyName.d.ts] declare function foo(): void; declare namespace foo { export var x: number; 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 index 84105f8da7b08..31781b79dc1ce 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/numericEnumMappedType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/numericEnumMappedType.d.ts @@ -43,7 +43,7 @@ const x: E.ONE = e; -//// [/.src/numericEnumMappedType.d.ts] +//// [numericEnumMappedType.d.ts] declare enum E1 { ONE = 0, TWO = 1, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/objectLiteralGettersAndSetters.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/objectLiteralGettersAndSetters.d.ts index 8610c092c1ca3..6fe596436a271 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/objectLiteralGettersAndSetters.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/objectLiteralGettersAndSetters.d.ts @@ -117,7 +117,7 @@ var getParamType3: { -//// [/.src/objectLiteralGettersAndSetters.d.ts] +//// [objectLiteralGettersAndSetters.d.ts] declare var sameName1a: { a: string; }; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/overloadingStaticFunctionsInFunctions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/overloadingStaticFunctionsInFunctions.d.ts index d0862428fb2bc..dab3e3f87cfa5 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/overloadingStaticFunctionsInFunctions.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/overloadingStaticFunctionsInFunctions.d.ts @@ -11,7 +11,7 @@ function boo { -//// [/.src/overloadingStaticFunctionsInFunctions.d.ts] +//// [overloadingStaticFunctionsInFunctions.d.ts] declare function boo(): void; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.classMethods.es2018.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.classMethods.es2018.d.ts index 83d2c04a1cede..dc239a83b781a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.classMethods.es2018.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.classMethods.es2018.d.ts @@ -152,133 +152,133 @@ class C25 { -//// [/.src/asyncGeneratorGetAccessorIsError.d.ts] +//// [asyncGeneratorGetAccessorIsError.d.ts] declare class C23 { get(): any; x(): number; } -//// [/.src/asyncGeneratorPropertyIsError.d.ts] +//// [asyncGeneratorPropertyIsError.d.ts] declare class C25 { x(): any; 1: any; } -//// [/.src/asyncGeneratorSetAccessorIsError.d.ts] +//// [asyncGeneratorSetAccessorIsError.d.ts] declare class C24 { set(): any; x(value: number): void; } -//// [/.src/awaitAsTypeIsOk.d.ts] +//// [awaitAsTypeIsOk.d.ts] interface await { } declare class C19 { f(): AsyncGenerator; } -//// [/.src/awaitInParameterInitializerIsError.d.ts] +//// [awaitInParameterInitializerIsError.d.ts] declare class C6 { f(a?: number): AsyncGenerator; } -//// [/.src/awaitMethodNameIsOk.d.ts] +//// [awaitMethodNameIsOk.d.ts] declare class C2 { await(): AsyncGenerator; } -//// [/.src/awaitMissingValueIsError.d.ts] +//// [awaitMissingValueIsError.d.ts] declare class C18 { f(): AsyncGenerator; } -//// [/.src/awaitParameterIsError.d.ts] +//// [awaitParameterIsError.d.ts] declare class C4 { f(await: any): AsyncGenerator; } -//// [/.src/awaitWithValueIsOk.d.ts] +//// [awaitWithValueIsOk.d.ts] declare class C17 { f(): AsyncGenerator; } -//// [/.src/methodIsOk.d.ts] +//// [methodIsOk.d.ts] declare class C1 { f(): AsyncGenerator; } -//// [/.src/nestedAsyncGeneratorIsOk.d.ts] +//// [nestedAsyncGeneratorIsOk.d.ts] declare class C8 { f(): AsyncGenerator; } -//// [/.src/nestedFunctionDeclarationNamedAwaitIsError.d.ts] +//// [nestedFunctionDeclarationNamedAwaitIsError.d.ts] declare class C11 { f(): AsyncGenerator; } -//// [/.src/nestedFunctionDeclarationNamedYieldIsError.d.ts] +//// [nestedFunctionDeclarationNamedYieldIsError.d.ts] declare class C9 { f(): AsyncGenerator; } -//// [/.src/nestedFunctionExpressionNamedAwaitIsError.d.ts] +//// [nestedFunctionExpressionNamedAwaitIsError.d.ts] declare class C12 { f(): AsyncGenerator; } -//// [/.src/nestedFunctionExpressionNamedYieldIsError.d.ts] +//// [nestedFunctionExpressionNamedYieldIsError.d.ts] declare class C10 { f(): AsyncGenerator; } -//// [/.src/yieldAsTypeIsStrictError.d.ts] +//// [yieldAsTypeIsStrictError.d.ts] interface yield { } declare class C20 { f(): AsyncGenerator; } -//// [/.src/yieldInClassComputedPropertyIsError.d.ts] +//// [yieldInClassComputedPropertyIsError.d.ts] declare class C21 { } -//// [/.src/yieldInNestedComputedPropertyIsOk.d.ts] +//// [yieldInNestedComputedPropertyIsOk.d.ts] declare class C22 { f(): AsyncGenerator; } -//// [/.src/yieldInParameterInitializerIsError.d.ts] +//// [yieldInParameterInitializerIsError.d.ts] declare class C7 { f(a?: any): AsyncGenerator; } -//// [/.src/yieldIsOk.d.ts] +//// [yieldIsOk.d.ts] declare class C13 { f(): AsyncGenerator; } -//// [/.src/yieldMethodNameIsOk.d.ts] +//// [yieldMethodNameIsOk.d.ts] declare class C3 { yield(): AsyncGenerator; } -//// [/.src/yieldParameterIsError.d.ts] +//// [yieldParameterIsError.d.ts] declare class C5 { f(yield: any): AsyncGenerator; } -//// [/.src/yieldStarMissingValueIsError.d.ts] +//// [yieldStarMissingValueIsError.d.ts] declare class C15 { f(): AsyncGenerator; } -//// [/.src/yieldStarWithValueIsOk.d.ts] +//// [yieldStarWithValueIsOk.d.ts] declare class C16 { f(): AsyncGenerator; } -//// [/.src/yieldWithValueIsOk.d.ts] +//// [yieldWithValueIsOk.d.ts] declare class C14 { f(): AsyncGenerator; } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts index 542c428572abe..30d16a5e25e0a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts @@ -147,128 +147,128 @@ const o24 = { -//// [/.src/asyncGeneratorGetAccessorIsError.d.ts] +//// [asyncGeneratorGetAccessorIsError.d.ts] declare const o22: { get(): any; x(): number; }; -//// [/.src/asyncGeneratorPropertyIsError.d.ts] +//// [asyncGeneratorPropertyIsError.d.ts] declare const o24: { x(): 1; }; -//// [/.src/asyncGeneratorSetAccessorIsError.d.ts] +//// [asyncGeneratorSetAccessorIsError.d.ts] declare const o23: { set(): any; x(value: number): void; }; -//// [/.src/awaitAsTypeIsOk.d.ts] +//// [awaitAsTypeIsOk.d.ts] interface await { } declare const o19: { f(): AsyncGenerator; }; -//// [/.src/awaitInParameterInitializerIsError.d.ts] +//// [awaitInParameterInitializerIsError.d.ts] declare const o6: { f(a?: number): AsyncGenerator; }; -//// [/.src/awaitMethodNameIsOk.d.ts] +//// [awaitMethodNameIsOk.d.ts] declare const o2: { await(): AsyncGenerator; }; -//// [/.src/awaitMissingValueIsError.d.ts] +//// [awaitMissingValueIsError.d.ts] declare const o18: { f(): AsyncGenerator; }; -//// [/.src/awaitParameterIsError.d.ts] +//// [awaitParameterIsError.d.ts] declare const o4: { f(await: any): AsyncGenerator; }; -//// [/.src/awaitWithValueIsOk.d.ts] +//// [awaitWithValueIsOk.d.ts] declare const o17: { f(): AsyncGenerator; }; -//// [/.src/methodIsOk.d.ts] +//// [methodIsOk.d.ts] declare const o1: { f(): AsyncGenerator; }; -//// [/.src/nestedAsyncGeneratorIsOk.d.ts] +//// [nestedAsyncGeneratorIsOk.d.ts] declare const o8: { f(): AsyncGenerator; }; -//// [/.src/nestedFunctionDeclarationNamedAwaitIsError.d.ts] +//// [nestedFunctionDeclarationNamedAwaitIsError.d.ts] declare const o11: { f(): AsyncGenerator; }; -//// [/.src/nestedFunctionDeclarationNamedYieldIsError.d.ts] +//// [nestedFunctionDeclarationNamedYieldIsError.d.ts] declare const o9: { f(): AsyncGenerator; }; -//// [/.src/nestedFunctionExpressionNamedAwaitIsError.d.ts] +//// [nestedFunctionExpressionNamedAwaitIsError.d.ts] declare const o12: { f(): AsyncGenerator; }; -//// [/.src/nestedFunctionExpressionNamedYieldIsError.d.ts] +//// [nestedFunctionExpressionNamedYieldIsError.d.ts] declare const o10: { f(): AsyncGenerator; }; -//// [/.src/yieldAsTypeIsOk.d.ts] +//// [yieldAsTypeIsOk.d.ts] interface yield { } declare const o20: { f(): AsyncGenerator; }; -//// [/.src/yieldInNestedComputedPropertyIsOk.d.ts] +//// [yieldInNestedComputedPropertyIsOk.d.ts] declare const o21: { f(): AsyncGenerator; }; -//// [/.src/yieldInParameterInitializerIsError.d.ts] +//// [yieldInParameterInitializerIsError.d.ts] declare const o7: { f(a?: any): AsyncGenerator; }; -//// [/.src/yieldIsOk.d.ts] +//// [yieldIsOk.d.ts] declare const o13: { f(): AsyncGenerator; }; -//// [/.src/yieldMethodNameIsOk.d.ts] +//// [yieldMethodNameIsOk.d.ts] declare const o3: { yield(): AsyncGenerator; }; -//// [/.src/yieldParameterIsError.d.ts] +//// [yieldParameterIsError.d.ts] declare const o5: { f(yield: any): AsyncGenerator; }; -//// [/.src/yieldStarMissingValueIsError.d.ts] +//// [yieldStarMissingValueIsError.d.ts] declare const o15: { f(): AsyncGenerator; }; -//// [/.src/yieldStarWithValueIsOk.d.ts] +//// [yieldStarWithValueIsOk.d.ts] declare const o16: { f(): AsyncGenerator; }; -//// [/.src/yieldWithValueIsOk.d.ts] +//// [yieldWithValueIsOk.d.ts] declare const o14: { f(): AsyncGenerator; }; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum1.d.ts index 37f316a19cbd8..107f6a110dd3a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum1.d.ts @@ -12,7 +12,7 @@ -//// [/.src/parserEnum1.d.ts] +//// [parserEnum1.d.ts] export declare enum SignatureFlags { None = 0, IsIndexer = 1, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum2.d.ts index 20406fea350cc..6805157f73588 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum2.d.ts @@ -12,7 +12,7 @@ -//// [/.src/parserEnum2.d.ts] +//// [parserEnum2.d.ts] export declare enum SignatureFlags { None = 0, IsIndexer = 1, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnumDeclaration6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnumDeclaration6.d.ts index 66fbdc21243b6..f9182d63ced3b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnumDeclaration6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnumDeclaration6.d.ts @@ -12,7 +12,7 @@ enum E { -//// [/.src/parserEnumDeclaration6.d.ts] +//// [parserEnumDeclaration6.d.ts] declare enum E { A = 1, B = 2, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction1.d.ts index 07a592e5ffbc6..c3eaadc44a7b5 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction1.d.ts @@ -7,7 +7,7 @@ function => -//// [/.src/parserEqualsGreaterThanAfterFunction1.d.ts] +//// [parserEqualsGreaterThanAfterFunction1.d.ts] declare function (): any; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction2.d.ts index a1437cdd3dbb5..c6f21ccac8b61 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction2.d.ts @@ -7,7 +7,7 @@ function (a: any => b: any; -//// [/.src/parserEqualsGreaterThanAfterFunction2.d.ts] +//// [parserEqualsGreaterThanAfterFunction2.d.ts] declare function (a: any, b: any): any; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList1.d.ts index d7671987fb8a3..a48b35aa65dfa 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList1.d.ts @@ -8,7 +8,7 @@ function f(a: any { -//// [/.src/parserErrorRecovery_ParameterList1.d.ts] +//// [parserErrorRecovery_ParameterList1.d.ts] declare function f(a: any, {}: {}): any; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList2.d.ts index 4d232cbcc46d8..0fd5c1209e388 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList2.d.ts @@ -8,7 +8,7 @@ function f(a: any, { -//// [/.src/parserErrorRecovery_ParameterList2.d.ts] +//// [parserErrorRecovery_ParameterList2.d.ts] declare function f(a: any, {}: {}): any; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserNoASIOnCallAfterFunctionExpression1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserNoASIOnCallAfterFunctionExpression1.d.ts index b4af8351b8cb0..5dd955204c219 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserNoASIOnCallAfterFunctionExpression1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserNoASIOnCallAfterFunctionExpression1.d.ts @@ -9,7 +9,7 @@ var x = function (): void { } -//// [/.src/parserNoASIOnCallAfterFunctionExpression1.d.ts] +//// [parserNoASIOnCallAfterFunctionExpression1.d.ts] declare var x: any; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource10.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource10.d.ts index c7126af45e433..2e63ab4d5daf8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource10.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource10.d.ts @@ -461,7 +461,7 @@ module TypeScript { -//// [/.src/parserRealSource10.d.ts] +//// [parserRealSource10.d.ts] declare namespace TypeScript { enum TokenID { Any = 0, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource14.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource14.d.ts index 14cb2847ec661..831966eb4a40a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource14.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource14.d.ts @@ -581,7 +581,7 @@ module TypeScript { -//// [/.src/parserRealSource14.d.ts] +//// [parserRealSource14.d.ts] declare namespace TypeScript { function lastOf(items: any[]): any; function max(a: number, b: number): number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource2.d.ts index 5060c18f593ac..9a53b5fc2516d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource2.d.ts @@ -277,7 +277,7 @@ module TypeScript { -//// [/.src/parserRealSource2.d.ts] +//// [parserRealSource2.d.ts] declare namespace TypeScript { function hasFlag(val: number, flag: number): boolean; enum ErrorRecoverySet { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource3.d.ts index f4c9508128d4a..a19cefc1b3841 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource3.d.ts @@ -125,7 +125,7 @@ module TypeScript { -//// [/.src/parserRealSource3.d.ts] +//// [parserRealSource3.d.ts] declare namespace TypeScript { enum NodeType { None = 0, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserSkippedTokens16.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserSkippedTokens16.d.ts index 18e9262a405e7..1e5bc071adf00 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserSkippedTokens16.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserSkippedTokens16.d.ts @@ -14,7 +14,7 @@ var x = -//// [/.src/parserSkippedTokens16.d.ts] +//// [parserSkippedTokens16.d.ts] declare function Foo(): any; declare namespace M { } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserStrictMode8.d.ts index 0c243fd4851c5..3710a7c6524d6 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserStrictMode8.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserStrictMode8.d.ts @@ -9,7 +9,7 @@ function eval() { -//// [/.src/parserStrictMode8.d.ts] +//// [parserStrictMode8.d.ts] /// [Errors] //// parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/preserveConstEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/preserveConstEnums.d.ts index 9bbe65b5001c8..843e7ac257797 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/preserveConstEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/preserveConstEnums.d.ts @@ -9,7 +9,7 @@ const enum E { -//// [/.src/preserveConstEnums.d.ts] +//// [preserveConstEnums.d.ts] declare const enum E { Value = 1, Value2 = 1 diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/propertyAssignmentUseParentType3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/propertyAssignmentUseParentType3.d.ts index 4a331d41d74fb..1151883ffd14c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/propertyAssignmentUseParentType3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/propertyAssignmentUseParentType3.d.ts @@ -28,7 +28,7 @@ foo4.x = "456"; -//// [/.src/propertyAssignmentUseParentType3.d.ts] +//// [propertyAssignmentUseParentType3.d.ts] declare function foo1(): number; declare namespace foo1 { var toFixed: string; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reexportClassDefinition.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reexportClassDefinition.d.ts index d817ee19799ab..bffe06c31f860 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reexportClassDefinition.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reexportClassDefinition.d.ts @@ -21,17 +21,17 @@ export = { -//// [/.src/foo1.d.ts] +//// [foo1.d.ts] declare class x { } export = x; -//// [/.src/foo2.d.ts] +//// [foo2.d.ts] import foo1 = require('./foo1'); declare const _default: { x: typeof foo1; }; export = _default; -//// [/.src/foo3.d.ts] +//// [foo3.d.ts] export {}; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reservedWords3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reservedWords3.d.ts index c75ea1e04b74b..0da5a156a11bf 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reservedWords3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reservedWords3.d.ts @@ -12,7 +12,7 @@ function f5(for) {} -//// [/.src/reservedWords3.d.ts] +//// [reservedWords3.d.ts] declare function f1(): any; declare enum { } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/staticsInAFunction.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/staticsInAFunction.d.ts index cb69d542727a5..110ecc441bee1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/staticsInAFunction.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/staticsInAFunction.d.ts @@ -12,7 +12,7 @@ function boo{ -//// [/.src/staticsInAFunction.d.ts] +//// [staticsInAFunction.d.ts] declare function boo(): void; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/strictModeOctalLiterals.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/strictModeOctalLiterals.d.ts index 0839c150bff2d..be1f269bc2e10 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/strictModeOctalLiterals.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/strictModeOctalLiterals.d.ts @@ -11,7 +11,7 @@ const orbitol: 01 = 01 -//// [/.src/strictModeOctalLiterals.d.ts] +//// [strictModeOctalLiterals.d.ts] export declare enum E { A = 13 } 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 index 4692ba86070fd..faa9bf0e41f30 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit12.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit12.d.ts @@ -18,7 +18,7 @@ module M { -//// [/.src/symbolDeclarationEmit12.d.ts] +//// [symbolDeclarationEmit12.d.ts] declare namespace M { interface I { } 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 index c7254e872a02d..067ec5126a5ec 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts @@ -24,5 +24,5 @@ export interface InterpolationValue {} -//// [/.src/Folder/monorepo/core/index.d.ts] +//// [Folder/monorepo/core/index.d.ts] export declare function getStyles(): import("styled-components").InterpolationValue[]; 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 index a3b616149623a..340eb36875e59 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralTypes4.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralTypes4.d.ts @@ -310,7 +310,7 @@ f4("**false**"); // false | "false" -//// [/.src/templateLiteralTypes4.d.ts] +//// [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; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterType.d.ts index 43090db2e46a9..fc6dc27400d2d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterType.d.ts @@ -11,7 +11,7 @@ function f(x: string) { -//// [/.src/templateStringInFunctionParameterType.d.ts] +//// [templateStringInFunctionParameterType.d.ts] declare function f(any: any, : any): any; declare function f(x: string): any; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterTypeES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterTypeES6.d.ts index 196e02f290f93..2ef3e33074095 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterTypeES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterTypeES6.d.ts @@ -11,7 +11,7 @@ function f(x: string) { -//// [/.src/templateStringInFunctionParameterTypeES6.d.ts] +//// [templateStringInFunctionParameterTypeES6.d.ts] declare function f(any: any, : any): any; declare function f(x: string): any; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringWithEmbeddedYieldKeyword.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringWithEmbeddedYieldKeyword.d.ts index 78604483ca25f..f50c33de61c35 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringWithEmbeddedYieldKeyword.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringWithEmbeddedYieldKeyword.d.ts @@ -11,7 +11,7 @@ function* gen { -//// [/.src/templateStringWithEmbeddedYieldKeyword.d.ts] +//// [templateStringWithEmbeddedYieldKeyword.d.ts] declare function gen(): {}; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContexts.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContexts.d.ts index ff8e8fa05c724..a7d0a3deb7037 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContexts.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContexts.d.ts @@ -50,7 +50,7 @@ enum SomeEnum { -//// [/.src/thisInInvalidContexts.d.ts] +//// [thisInInvalidContexts.d.ts] declare class BaseErrClass { constructor(t: any); } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContextsExternalModule.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContextsExternalModule.d.ts index d2326e31b7cc4..e538d767ad5dd 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContextsExternalModule.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContextsExternalModule.d.ts @@ -49,7 +49,7 @@ export = this; // Should be an error -//// [/.src/thisInInvalidContextsExternalModule.d.ts] +//// [thisInInvalidContextsExternalModule.d.ts] declare const _default: undefined; export = _default; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInPropertyBoundDeclarations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInPropertyBoundDeclarations.d.ts index 6da819295b4e0..fb2ba52343af0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInPropertyBoundDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInPropertyBoundDeclarations.d.ts @@ -75,7 +75,7 @@ class B { -//// [/.src/thisInPropertyBoundDeclarations.d.ts] +//// [thisInPropertyBoundDeclarations.d.ts] declare class Bug { private name; private static func; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/this_inside-enum-should-not-be-allowed.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/this_inside-enum-should-not-be-allowed.d.ts index ac040daa8fdcd..76a600a471207 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/this_inside-enum-should-not-be-allowed.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/this_inside-enum-should-not-be-allowed.d.ts @@ -15,7 +15,7 @@ module ModuleEnum { -//// [/.src/this_inside-enum-should-not-be-allowed.d.ts] +//// [this_inside-enum-should-not-be-allowed.d.ts] declare enum TopLevelEnum { ThisWasAllowedButShouldNotBe } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/twoAccessorsWithSameName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/twoAccessorsWithSameName.d.ts index 8aa4dd0d0ad05..78c821fab74dd 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/twoAccessorsWithSameName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/twoAccessorsWithSameName.d.ts @@ -42,7 +42,7 @@ var y: { -//// [/.src/twoAccessorsWithSameName.d.ts] +//// [twoAccessorsWithSameName.d.ts] declare class C { get x(): number; get x(): number; 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 index 29e4a035ada7d..892949f224e31 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts @@ -109,7 +109,7 @@ var n: number = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n -//// [/.src/typeFromPropertyAssignment29.d.ts] +//// [typeFromPropertyAssignment29.d.ts] declare function ExpandoDecl(n: number): string; declare namespace ExpandoDecl { var prop: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment31.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment31.d.ts index 5f6bd9c9acd0b..613e6bc3c15bc 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment31.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment31.d.ts @@ -33,7 +33,7 @@ var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMer -//// [/.src/typeFromPropertyAssignment31.d.ts] +//// [typeFromPropertyAssignment31.d.ts] declare function ExpandoMerge(n: number): number; declare namespace ExpandoMerge { var p1: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment32.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment32.d.ts index 50908a236ae63..82715651207ce 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment32.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment32.d.ts @@ -35,7 +35,7 @@ namespace ExpandoMerge { -//// [/.src/expando.d.ts] +//// [expando.d.ts] declare function ExpandoMerge(n: number): number; declare namespace ExpandoMerge { var p1: number; @@ -43,7 +43,7 @@ declare namespace ExpandoMerge { } declare var n: number; -//// [/.src/ns.d.ts] +//// [ns.d.ts] declare namespace ExpandoMerge { var p3: number; var p4: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment33.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment33.d.ts index 0e9bf57f314e6..a3f8ce6522d12 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment33.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment33.d.ts @@ -37,7 +37,7 @@ var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMer -//// [/.src/expando.d.ts] +//// [expando.d.ts] declare function ExpandoMerge(n: number): number; declare namespace ExpandoMerge { var p1: number; @@ -45,7 +45,7 @@ declare namespace ExpandoMerge { } declare var n: number; -//// [/.src/ns.d.ts] +//// [ns.d.ts] declare namespace ExpandoMerge { var p3: number; var p4: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment36.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment36.d.ts index d879f57b05155..2dd68fc9af4ac 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment36.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment36.d.ts @@ -89,7 +89,7 @@ g.both -//// [/.src/typeFromPropertyAssignment36.d.ts] +//// [typeFromPropertyAssignment36.d.ts] declare function f(b: boolean): { (): void; e: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment38.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment38.d.ts index ede16c55c37bf..2b7718f975703 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment38.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment38.d.ts @@ -15,7 +15,7 @@ f["prop"] = 3; -//// [/.src/typeFromPropertyAssignment38.d.ts] +//// [typeFromPropertyAssignment38.d.ts] declare function F(): void; declare namespace F { var prop: number; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts index 34c44ad2b25d5..c4ef57efd9817 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts @@ -38,6 +38,6 @@ export function fb(): B; -//// [/.src/main.d.ts] +//// [main.d.ts] export declare const va: import("ext").A; export declare const vb: import("ext/other").B; 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 index 5ffefecdc2b65..80c0ce61adcc3 100644 --- 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 @@ -36,7 +36,7 @@ export * from "../other"; -//// [/.src/main.d.ts] +//// [main.d.ts] export declare const va: any; export declare const vb: import("ext/other").B; /// [Errors] //// 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 index 7f3fe426fe10c..ef9ff448498c9 100644 --- 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 @@ -35,6 +35,6 @@ export * from "../other"; -//// [/.src/main.d.ts] +//// [main.d.ts] export declare const va: import("ext").A2; export declare const va2: import("ext").A2; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/underscoreEscapedNameInEnum.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/underscoreEscapedNameInEnum.d.ts index fb6f2cc576c80..10aa965ee5fe8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/underscoreEscapedNameInEnum.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/underscoreEscapedNameInEnum.d.ts @@ -11,7 +11,7 @@ enum E { -//// [/.src/underscoreEscapedNameInEnum.d.ts] +//// [underscoreEscapedNameInEnum.d.ts] declare enum E { "__foo" = 1, bar = 2 diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts index af4dbc9e24e6f..25a46f396b06a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts @@ -20,14 +20,14 @@ export enum Bar { -//// [/.src/bar.d.ts] +//// [bar.d.ts] export declare enum Bar { a = 1, c = 3, e = 5 } -//// [/.src/foo.d.ts] +//// [foo.d.ts] export declare enum Foo { a = 1, b = 2, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/wellKnownSymbolExpando.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/wellKnownSymbolExpando.d.ts index bcd1325d7cdcf..099e0199f1afa 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/wellKnownSymbolExpando.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/wellKnownSymbolExpando.d.ts @@ -9,6 +9,6 @@ f[Symbol.iterator] = function() {} -//// [/.src/wellKnownSymbolExpando.d.ts] +//// [wellKnownSymbolExpando.d.ts] declare function f(): void; declare namespace f { } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff index 02ae5c6719a3e..30f0af54db4a7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff @@ -6,7 +6,7 @@ --- TSC declarations +++ DTE declarations @@ -3,17 +3,17 @@ - //// [/.src/FunctionDeclaration8_es6.d.ts] + //// [FunctionDeclaration8_es6.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff index 42009f35f7fa3..b14e1630b9335 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff @@ -6,7 +6,7 @@ --- TSC declarations +++ DTE declarations @@ -3,17 +3,17 @@ - //// [/.src/asyncFunctionDeclaration8_es2017.d.ts] + //// [asyncFunctionDeclaration8_es2017.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff index ddd1b980ec981..4a39c1ef1fb60 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff @@ -6,7 +6,7 @@ --- TSC declarations +++ DTE declarations @@ -3,17 +3,17 @@ - //// [/.src/asyncFunctionDeclaration8_es5.d.ts] + //// [asyncFunctionDeclaration8_es5.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff index 67ca18f23443c..afcff91cb9214 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff @@ -6,7 +6,7 @@ --- TSC declarations +++ DTE declarations @@ -3,17 +3,17 @@ - //// [/.src/asyncFunctionDeclaration8_es6.d.ts] + //// [asyncFunctionDeclaration8_es6.d.ts] declare var v: invalid; /// [Errors] //// 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 index 690958e4bd223..ea239753d09a1 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,8 +1,11 @@ - //// [/.src/computedPropertiesNarrowed.d.ts] + //// [computedPropertiesNarrowed.d.ts] -export declare let o: invalid; +declare const x: 0 | 1; +export declare let o: { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff index 0426389f986fe..53f55285857f0 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff @@ -6,7 +6,7 @@ --- TSC declarations +++ DTE declarations @@ -3,33 +3,28 @@ - //// [/.src/computedPropertyNames6_ES5.d.ts] + //// [computedPropertyNames6_ES5.d.ts] declare var p1: number | string; declare var p2: number | number[]; declare var p3: string | boolean; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff index e8269da792ca2..3347ea9aae6f7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff @@ -6,7 +6,7 @@ --- TSC declarations +++ DTE declarations @@ -3,33 +3,28 @@ - //// [/.src/computedPropertyNames6_ES6.d.ts] + //// [computedPropertyNames6_ES6.d.ts] declare var p1: number | string; declare var p2: number | number[]; declare var p3: string | boolean; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff index af18076cc9c65..5c4529ec23342 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff @@ -6,7 +6,7 @@ --- TSC declarations +++ DTE declarations @@ -3,23 +3,4 @@ - //// [/.src/contextualReturnTypeOfIIFE2.d.ts] + //// [contextualReturnTypeOfIIFE2.d.ts] declare namespace app { function foo(): void; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff index aaea688a7af84..f15b1da019ce1 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,32 +1,38 @@ - //// [/.src/forwardRefInEnum.d.ts] + //// [forwardRefInEnum.d.ts] declare enum E1 { - X = 0, - X1 = 0, diff --git a/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff index f9bbd970e93b0..bde61331a101e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,8 +1,9 @@ - //// [/.src/indexSignatureMustHaveTypeAnnotation.d.ts] + //// [indexSignatureMustHaveTypeAnnotation.d.ts] interface I { + [x]: string; [x: string]: any; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff index cc69f28c8eb5b..6916e3bfc7788 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff @@ -8,7 +8,7 @@ @@ -12,15 +12,15 @@ declare const d = "d"; - //// [/.src/enum2.d.ts] + //// [enum2.d.ts] declare enum Enum { - D = "d", - E = 0,// error @@ -24,5 +24,5 @@ + F } - //// [/.src/module-namespaces.d.ts] + //// [module-namespaces.d.ts] export declare namespace Instantiated { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts.diff index 7ddb6a5dc941e..0f27445659bc2 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,19 +1,19 @@ - //// [/.src/parseBigInt.d.ts] + //// [parseBigInt.d.ts] -declare const bin = 5, binBig = 5n; -declare const oct = 375, octBig = 375n; -declare const hex = 3083, hexBig = 3083n; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff index 34d62b6bbe331..a8fec51d7c312 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff @@ -6,7 +6,7 @@ --- TSC declarations +++ DTE declarations @@ -3,17 +3,17 @@ - //// [/.src/parserComputedPropertyName1.d.ts] + //// [parserComputedPropertyName1.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff index 6d7bab3e11dc4..663e6ba8a57c8 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,8 +1,10 @@ - //// [/.src/parserComputedPropertyName13.d.ts] + //// [parserComputedPropertyName13.d.ts] -declare var v: {}; +declare var v: { + [e]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff index 82762785e99d7..80f0f2810e22a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,8 +1,10 @@ - //// [/.src/parserComputedPropertyName14.d.ts] + //// [parserComputedPropertyName14.d.ts] -declare var v: {}; +declare var v: { + [e](): number; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff index 73e5aede21da2..d8d66850fa26c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff @@ -7,7 +7,7 @@ +++ DTE declarations @@ -2,8 +2,9 @@ - //// [/.src/parserComputedPropertyName15.d.ts] + //// [parserComputedPropertyName15.d.ts] declare var v: { [e: number]: string; + [e]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff index 9809ad3befa25..5fa4e6f763718 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,8 +1,10 @@ - //// [/.src/parserComputedPropertyName18.d.ts] + //// [parserComputedPropertyName18.d.ts] -declare var v: {}; +declare var v: { + [e]?(): number; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff index 38292d30e4286..5bb209a76d89f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,8 +1,10 @@ - //// [/.src/parserComputedPropertyName19.d.ts] + //// [parserComputedPropertyName19.d.ts] -declare var v: {}; +declare var v: { + [e]?: any; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff index 47291ce0e9c00..3671baafd7616 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,16 +1,15 @@ - //// [/.src/parserComputedPropertyName2.d.ts] + //// [parserComputedPropertyName2.d.ts] -declare var v: invalid; +declare var v: { + [e]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff index fa023a17006b6..e92bed50cbb18 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,8 +1,9 @@ - //// [/.src/parserComputedPropertyName20.d.ts] + //// [parserComputedPropertyName20.d.ts] interface I { + [e](): number; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff index 470172aad988f..33d9af9b8646c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,8 +1,9 @@ - //// [/.src/parserComputedPropertyName21.d.ts] + //// [parserComputedPropertyName21.d.ts] interface I { + [e]: number; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff index 6a48cdc26edf3..8ff87e9e0a6a5 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,18 +1,17 @@ - //// [/.src/parserComputedPropertyName37.d.ts] + //// [parserComputedPropertyName37.d.ts] -declare var v: invalid; +declare var v: { + [public]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff index 50632d3d71edc..feeb9562280aa 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff @@ -6,7 +6,7 @@ --- TSC declarations +++ DTE declarations @@ -3,19 +3,16 @@ - //// [/.src/parserComputedPropertyName6.d.ts] + //// [parserComputedPropertyName6.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff index d01d193f5f1c0..75eb2be3eaea6 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,16 +1,15 @@ - //// [/.src/parserES5ComputedPropertyName2.d.ts] + //// [parserES5ComputedPropertyName2.d.ts] -declare var v: invalid; +declare var v: { + [e]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff index 83873e204d52d..e1150ae2fce5f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,8 +1,9 @@ - //// [/.src/parserES5ComputedPropertyName5.d.ts] + //// [parserES5ComputedPropertyName5.d.ts] interface I { + [e]: number; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff index 10b52d64d4a07..c1c60918d4f77 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,8 +1,10 @@ - //// [/.src/parserES5ComputedPropertyName8.d.ts] + //// [parserES5ComputedPropertyName8.d.ts] -declare var v: {}; +declare var v: { + [e]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff index 95d1c19b4f340..81d496484885b 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,8 +1,9 @@ - //// [/.src/parserES5SymbolProperty1.d.ts] + //// [parserES5SymbolProperty1.d.ts] interface I { + [Symbol.iterator]: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff index 6ea9e47e73083..b27918dd8a778 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,8 +1,9 @@ - //// [/.src/parserES5SymbolProperty2.d.ts] + //// [parserES5SymbolProperty2.d.ts] interface I { + [Symbol.unscopables](): string; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff index 744ecdc21c170..a065acdd3d528 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,8 +1,10 @@ - //// [/.src/parserES5SymbolProperty8.d.ts] + //// [parserES5SymbolProperty8.d.ts] -declare var x: {}; +declare var x: { + [Symbol.toPrimitive](): string; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff index cecfb878ed415..198f9653f39b0 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,8 +1,10 @@ - //// [/.src/parserES5SymbolProperty9.d.ts] + //// [parserES5SymbolProperty9.d.ts] -declare var x: {}; +declare var x: { + [Symbol.toPrimitive]: string; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff index 352003a2795de..43d161a065873 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,8 +1,9 @@ - //// [/.src/parserIndexSignature11.d.ts] + //// [parserIndexSignature11.d.ts] interface I { + [p]: any; [p1: string]: any; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff index 01109555e4d58..24998fe2a5558 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,8 +1,9 @@ - //// [/.src/parserIndexSignature5.d.ts] + //// [parserIndexSignature5.d.ts] interface I { + [a]: any; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff index 861c2195ab9ce..9b94bfcfa886f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,14 +1,18 @@ - //// [/.src/parserStrictMode8.d.ts] + //// [parserStrictMode8.d.ts] +declare function eval(): invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserSymbolIndexer5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserSymbolIndexer5.d.ts.diff index 2e2085c77bc98..d52449cd4df01 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserSymbolIndexer5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserSymbolIndexer5.d.ts.diff @@ -6,7 +6,7 @@ --- TSC declarations +++ DTE declarations @@ -3,12 +3,12 @@ - //// [/.src/parserSymbolIndexer5.d.ts] + //// [parserSymbolIndexer5.d.ts] declare var x: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff index 9fc142660fd4d..f88db8d5ca7d3 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,20 +1,19 @@ - //// [/.src/symbolProperty52.d.ts] + //// [symbolProperty52.d.ts] -declare var obj: invalid; +declare var obj: { + [Symbol.nonsense]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff index ca604e9b47636..f8c7d94d1e18c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,22 +1,21 @@ - //// [/.src/symbolProperty53.d.ts] + //// [symbolProperty53.d.ts] -declare var obj: invalid; +declare var obj: { + [Symbol.for]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff index db990af71b03e..9243951042fe6 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,18 +1,17 @@ - //// [/.src/symbolProperty54.d.ts] + //// [symbolProperty54.d.ts] -declare var obj: invalid; +declare var obj: { + [Symbol.prototype]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff index a71442a5d7f89..c4261b9abf54c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff @@ -6,7 +6,7 @@ --- TSC declarations +++ DTE declarations @@ -3,20 +3,7 @@ - //// [/.src/symbolProperty58.d.ts] + //// [symbolProperty58.d.ts] interface SymbolConstructor { foo: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff index 6d99cc04bc9f7..df6904dc558d0 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,8 +1,9 @@ - //// [/.src/symbolProperty59.d.ts] + //// [symbolProperty59.d.ts] interface I { + [Symbol.keyFor]: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralsSourceMap.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralsSourceMap.d.ts.diff index 4b31d7fd6f49c..8ccfd5b750582 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralsSourceMap.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralsSourceMap.d.ts.diff @@ -8,6 +8,6 @@ @@ -1,4 +1,4 @@ - //// [/.src/templateLiteralsSourceMap.d.ts] + //// [templateLiteralsSourceMap.d.ts] -declare const s = "a0b1c2"; +declare const s = `a${0}b${1}c${2}`; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff index ba442a8bdb438..02664bbdec56b 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,19 +1,26 @@ - //// [/.src/typeUsedAsTypeLiteralIndex.d.ts] + //// [typeUsedAsTypeLiteralIndex.d.ts] type K = number | string; -type T = {}; +type T = { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff index 410511fe0a51e..4704efbcee4df 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff @@ -8,7 +8,7 @@ @@ -1,10 +1,10 @@ - //// [/.src/bar.d.ts] + //// [bar.d.ts] export declare enum Bar { - a = 1, - c = 3, @@ -17,4 +17,4 @@ e = 5 } - //// [/.src/foo.d.ts] + //// [foo.d.ts] diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty1.d.ts index 20dddbce71f8e..c677617c849c9 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty1.d.ts @@ -16,7 +16,7 @@ obj[Symbol.foo]; -//// [/.src/ES5SymbolProperty1.d.ts] +//// [ES5SymbolProperty1.d.ts] interface SymbolConstructor { foo: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts index 260beb4d2b96e..52bf96dbc1a7c 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts @@ -7,7 +7,7 @@ var v = { [yield]: foo } -//// [/.src/FunctionDeclaration8_es6.d.ts] +//// [FunctionDeclaration8_es6.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts index 676925cca1071..855de4492b911 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts @@ -7,7 +7,7 @@ var v = { [await]: foo } -//// [/.src/asyncFunctionDeclaration8_es2017.d.ts] +//// [asyncFunctionDeclaration8_es2017.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts index 839add0c7232a..3a0b9950b9d5b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts @@ -7,7 +7,7 @@ var v = { [await]: foo } -//// [/.src/asyncFunctionDeclaration8_es5.d.ts] +//// [asyncFunctionDeclaration8_es5.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts index 1bf61db13d338..d8e3f864ed373 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts @@ -7,7 +7,7 @@ var v = { [await]: foo } -//// [/.src/asyncFunctionDeclaration8_es6.d.ts] +//// [asyncFunctionDeclaration8_es6.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts index 29950f0e1478f..790fdb62b9992 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts @@ -36,7 +36,7 @@ const c = {[bigNum]: 789}; -//// [/.src/a.d.ts] +//// [a.d.ts] interface BigIntIndex { [index: bigint]: E; } @@ -46,7 +46,7 @@ declare let key: keyof any; declare const bigNum: bigint; declare const typedArray: invalid; -//// [/.src/b.d.ts] +//// [b.d.ts] declare const a: {}; declare const b: { [1n]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts index de86a1bafea11..6ae56a2508e22 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts @@ -110,7 +110,7 @@ module mglo5 { -//// [/.src/complicatedPrivacy.d.ts] +//// [complicatedPrivacy.d.ts] declare namespace m1 { export namespace m2 { function f1(c1: C1): invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts index 0010544716750..cde0977c6b495 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts @@ -55,7 +55,7 @@ export const o9 = { -//// [/.src/computedPropertiesNarrowed.d.ts] +//// [computedPropertiesNarrowed.d.ts] declare const x: 0 | 1; export declare let o: { [x]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts index 66d1e64b65c0e..44e0845f17140 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts @@ -22,7 +22,7 @@ class C { -//// [/.src/computedPropertyNames12_ES5.d.ts] +//// [computedPropertyNames12_ES5.d.ts] declare var s: string; declare var n: number; declare var a: any; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts index f17cdfb6784b2..e93cc47a0a312 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts @@ -22,7 +22,7 @@ class C { -//// [/.src/computedPropertyNames12_ES6.d.ts] +//// [computedPropertyNames12_ES6.d.ts] declare var s: string; declare var n: number; declare var a: any; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts index 3107062aa3b9f..3a47e045033e2 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts @@ -22,7 +22,7 @@ class C { -//// [/.src/computedPropertyNames16_ES5.d.ts] +//// [computedPropertyNames16_ES5.d.ts] declare var s: string; declare var n: number; declare var a: any; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts index adf8ca3866ff0..18653a2514df2 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts @@ -22,7 +22,7 @@ class C { -//// [/.src/computedPropertyNames16_ES6.d.ts] +//// [computedPropertyNames16_ES6.d.ts] declare var s: string; declare var n: number; declare var a: any; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts index 7ac9b72c9b02f..6a00d09998bed 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts @@ -16,7 +16,7 @@ class C { -//// [/.src/computedPropertyNames2_ES5.d.ts] +//// [computedPropertyNames2_ES5.d.ts] declare var methodName: string; declare var accessorName: string; declare class C { diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts index c7296c516453e..34602d2ca21ec 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts @@ -16,7 +16,7 @@ class C { -//// [/.src/computedPropertyNames2_ES6.d.ts] +//// [computedPropertyNames2_ES6.d.ts] declare var methodName: string; declare var accessorName: string; declare class C { diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts index f012a062193b5..770fec27db953 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts @@ -22,7 +22,7 @@ var v = { -//// [/.src/computedPropertyNames4_ES5.d.ts] +//// [computedPropertyNames4_ES5.d.ts] declare var s: string; declare var n: number; declare var a: any; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts index 7e2215ce13905..5a41adfcfa4e7 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts @@ -22,7 +22,7 @@ var v = { -//// [/.src/computedPropertyNames4_ES6.d.ts] +//// [computedPropertyNames4_ES6.d.ts] declare var s: string; declare var n: number; declare var a: any; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts index 0e90f9ef725da..053672a2be832 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts @@ -15,7 +15,7 @@ var v = { -//// [/.src/computedPropertyNames5_ES5.d.ts] +//// [computedPropertyNames5_ES5.d.ts] declare var b: boolean; declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts index 9176f569daa3a..6789bd5439f8d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts @@ -15,7 +15,7 @@ var v = { -//// [/.src/computedPropertyNames5_ES6.d.ts] +//// [computedPropertyNames5_ES6.d.ts] declare var b: boolean; declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES5.d.ts index 7e1c60c9ce885..bfd4b58491c17 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES5.d.ts @@ -14,7 +14,7 @@ var v = { -//// [/.src/computedPropertyNames6_ES5.d.ts] +//// [computedPropertyNames6_ES5.d.ts] declare var p1: number | string; declare var p2: number | number[]; declare var p3: string | boolean; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES6.d.ts index 8fad937eaaf22..f44882c10d642 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES6.d.ts @@ -14,7 +14,7 @@ var v = { -//// [/.src/computedPropertyNames6_ES6.d.ts] +//// [computedPropertyNames6_ES6.d.ts] declare var p1: number | string; declare var p2: number | number[]; declare var p3: string | boolean; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts index cea7452d4f3d7..28b3c63b37642 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts @@ -13,7 +13,7 @@ class C { -//// [/.src/computedPropertyNamesOnOverloads_ES5.d.ts] +//// [computedPropertyNamesOnOverloads_ES5.d.ts] declare var methodName: string; declare var accessorName: string; declare class C { diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts index 436a47ed54995..0cfa32367af92 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts @@ -13,7 +13,7 @@ class C { -//// [/.src/computedPropertyNamesOnOverloads_ES6.d.ts] +//// [computedPropertyNamesOnOverloads_ES6.d.ts] declare var methodName: string; declare var accessorName: string; declare class C { diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts index e314912d00bc3..60e4e918d8e3c 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts @@ -16,7 +16,7 @@ class C { -//// [/.src/computedPropertyNamesWithStaticProperty.d.ts] +//// [computedPropertyNamesWithStaticProperty.d.ts] declare class C { static staticProp: number; get [C.staticProp](): invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/constEnum2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/constEnum2.d.ts index 43d3404a4983e..adf89724fd875 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/constEnum2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/constEnum2.d.ts @@ -19,7 +19,7 @@ const enum D { -//// [/.src/constEnum2.d.ts] +//// [constEnum2.d.ts] declare const CONST: invalid; declare const enum D { d = 10, diff --git a/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts index 842c7ed0703ae..0ee6b9de34c0f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts @@ -50,7 +50,7 @@ const enum NaNOrInfinity { -//// [/.src/constEnumErrors.d.ts] +//// [constEnumErrors.d.ts] declare const enum E { A = 0 } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/constEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/constEnums.d.ts index 48ac0e23f08dc..f73d48e10b6c0 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/constEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/constEnums.d.ts @@ -184,7 +184,7 @@ function baz(c: Comments) { -//// [/.src/constEnums.d.ts] +//// [constEnums.d.ts] declare const enum Enum1 { A0 = 100 } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/contextualReturnTypeOfIIFE2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/contextualReturnTypeOfIIFE2.d.ts index 6013ccfb69221..cea26699b7476 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/contextualReturnTypeOfIIFE2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/contextualReturnTypeOfIIFE2.d.ts @@ -17,7 +17,7 @@ app.foo.bar.someFun(1); -//// [/.src/contextualReturnTypeOfIIFE2.d.ts] +//// [contextualReturnTypeOfIIFE2.d.ts] declare namespace app { function foo(): void; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts index 404d567455bb9..6cf971bf20cf0 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts @@ -24,7 +24,7 @@ child1(ParentThing.prototype); -//// [/.src/child1.d.ts] +//// [child1.d.ts] import { ParentThing } from './parent'; declare module './parent' { interface ParentThing { @@ -33,7 +33,7 @@ declare module './parent' { } export declare function child1(prototype: ParentThing): invalid; -//// [/.src/parent.d.ts] +//// [parent.d.ts] export declare class ParentThing implements ParentThing { } /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitLateBoundAssignments2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitLateBoundAssignments2.d.ts index 5dacb5b3957db..825879fa02ec1 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitLateBoundAssignments2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitLateBoundAssignments2.d.ts @@ -74,7 +74,7 @@ arrow10[emoji] = 0 -//// [/.src/declarationEmitLateBoundAssignments2.d.ts] +//// [declarationEmitLateBoundAssignments2.d.ts] export declare function decl(): invalid; export declare function decl2(): invalid; export declare function decl3(): invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts index ebdda87813fc6..bc7a406668a3e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts @@ -195,7 +195,7 @@ void class J { -//// [/.src/decoratorsOnComputedProperties.d.ts] +//// [decoratorsOnComputedProperties.d.ts] declare function x(o: object, k: PropertyKey): invalid; declare let i: number; declare function foo(): string; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumBasics2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumBasics2.d.ts index f342130374e47..b18c363e9d92f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/enumBasics2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/enumBasics2.d.ts @@ -21,7 +21,7 @@ enum Bar { -//// [/.src/enumBasics2.d.ts] +//// [enumBasics2.d.ts] declare enum Foo { a = 2, b = 3, diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumBasics3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumBasics3.d.ts index cee89f3324213..14c0feaeb6db2 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/enumBasics3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/enumBasics3.d.ts @@ -24,7 +24,7 @@ module M { -//// [/.src/enumBasics3.d.ts] +//// [enumBasics3.d.ts] declare namespace M { namespace N { enum E1 { diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts index 1580c205246bd..b53f12b5d4de7 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts @@ -46,7 +46,7 @@ const enum E6 { -//// [/.src/enumConstantMembers.d.ts] +//// [enumConstantMembers.d.ts] declare enum E1 { a = 1, b = 2 diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumErrors.d.ts index 6d64848171f04..599b0c13ebf3e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/enumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/enumErrors.d.ts @@ -60,7 +60,7 @@ enum E14 { a, b: any "hello" += 1, c, d} -//// [/.src/enumErrors.d.ts] +//// [enumErrors.d.ts] declare enum any { } declare enum number { diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumExportMergingES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumExportMergingES6.d.ts index 8cb7979d28f0c..7fee4324b5777 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/enumExportMergingES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/enumExportMergingES6.d.ts @@ -16,7 +16,7 @@ export enum Animals { -//// [/.src/enumExportMergingES6.d.ts] +//// [enumExportMergingES6.d.ts] export declare enum Animals { Cat = 1 } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/expandoFunctionExpressionsWithDynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/expandoFunctionExpressionsWithDynamicNames.d.ts index 6d485974419e5..568ab5131e2fd 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/expandoFunctionExpressionsWithDynamicNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/expandoFunctionExpressionsWithDynamicNames.d.ts @@ -16,7 +16,7 @@ expr2[s] = 0 -//// [/.src/expandoFunctionExpressionsWithDynamicNames.d.ts] +//// [expandoFunctionExpressionsWithDynamicNames.d.ts] export declare const expr: invalid; export declare const expr2: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts index e18c9c0b69666..c1b4fcaf943a4 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts @@ -20,7 +20,7 @@ enum E1 { -//// [/.src/forwardRefInEnum.d.ts] +//// [forwardRefInEnum.d.ts] declare enum E1 { X, X1, diff --git a/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts index 419456fea937c..8a084f73068e0 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts @@ -686,7 +686,7 @@ export declare module eaM { -//// [/.src/giant.d.ts] +//// [giant.d.ts] export declare var eV: invalid; export declare function eF(): invalid; export declare class eC { diff --git a/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts index 652c00ddc1b77..e19cfc75be78b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts @@ -21,7 +21,7 @@ class C2 { -//// [/.src/indexSignatureMustHaveTypeAnnotation.d.ts] +//// [indexSignatureMustHaveTypeAnnotation.d.ts] interface I { [x]: string; [x: string]: any; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/indexTypeNoSubstitutionTemplateLiteral.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/indexTypeNoSubstitutionTemplateLiteral.d.ts index 9f4f0a6f4970a..b037dea451cad 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/indexTypeNoSubstitutionTemplateLiteral.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/indexTypeNoSubstitutionTemplateLiteral.d.ts @@ -12,7 +12,7 @@ type Test = keyof typeof Foo; -//// [/.src/indexTypeNoSubstitutionTemplateLiteral.d.ts] +//// [indexTypeNoSubstitutionTemplateLiteral.d.ts] declare function Foo(): invalid; type Test = keyof typeof Foo; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/indexWithoutParamType2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/indexWithoutParamType2.d.ts index dc800b94230ed..e9339037db5eb 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/indexWithoutParamType2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/indexWithoutParamType2.d.ts @@ -10,7 +10,7 @@ class C { -//// [/.src/indexWithoutParamType2.d.ts] +//// [indexWithoutParamType2.d.ts] declare class C { [x]: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts index 2128cfc5da764..f646835543120 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts @@ -211,7 +211,7 @@ var obj87: i8 = new {}; -//// [/.src/intTypeCheck.d.ts] +//// [intTypeCheck.d.ts] interface i1 { p: any; p1?: any; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts index cbc60396a013d..04a77591221b6 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts @@ -31,7 +31,7 @@ const a14 = tag`${ 100 }\x00` // \x00 -//// [/.src/invalidTaggedTemplateEscapeSequences.d.ts] +//// [invalidTaggedTemplateEscapeSequences.d.ts] declare function tag(str: any, ...args: any[]): any; declare const a: invalid; declare const b: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es5).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es5).d.ts index cbc60396a013d..04a77591221b6 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es5).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es5).d.ts @@ -31,7 +31,7 @@ const a14 = tag`${ 100 }\x00` // \x00 -//// [/.src/invalidTaggedTemplateEscapeSequences.d.ts] +//// [invalidTaggedTemplateEscapeSequences.d.ts] declare function tag(str: any, ...args: any[]): any; declare const a: invalid; declare const b: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts index cbc60396a013d..04a77591221b6 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts @@ -31,7 +31,7 @@ const a14 = tag`${ 100 }\x00` // \x00 -//// [/.src/invalidTaggedTemplateEscapeSequences.d.ts] +//// [invalidTaggedTemplateEscapeSequences.d.ts] declare function tag(str: any, ...args: any[]): any; declare const a: invalid; declare const b: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts index 67292291dc3d6..8891a58fb4663 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts @@ -37,7 +37,7 @@ declare enum Enum { -//// [/.src/enum1.d.ts] +//// [enum1.d.ts] declare enum Enum { A = 0, B = 1, @@ -48,7 +48,7 @@ declare enum Enum { } declare const d = "d"; -//// [/.src/enum2.d.ts] +//// [enum2.d.ts] declare enum Enum { D, E,// error @@ -59,12 +59,12 @@ declare enum Enum { F } -//// [/.src/module-namespaces.d.ts] +//// [module-namespaces.d.ts] export declare namespace Instantiated { const x = 1; } -//// [/.src/script-namespaces.d.ts] +//// [script-namespaces.d.ts] declare namespace Instantiated { const x = 1; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/mergedDeclarations2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/mergedDeclarations2.d.ts index 928eaccd91bcb..fd2ca4baaab12 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/mergedDeclarations2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/mergedDeclarations2.d.ts @@ -16,7 +16,7 @@ module Foo { -//// [/.src/mergedDeclarations2.d.ts] +//// [mergedDeclarations2.d.ts] declare enum Foo { b = 0 } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/mergedEnumDeclarationCodeGen.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/mergedEnumDeclarationCodeGen.d.ts index f27b4072b9315..9868ce4a02269 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/mergedEnumDeclarationCodeGen.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/mergedEnumDeclarationCodeGen.d.ts @@ -13,7 +13,7 @@ enum E { -//// [/.src/mergedEnumDeclarationCodeGen.d.ts] +//// [mergedEnumDeclarationCodeGen.d.ts] declare enum E { a = 0, b = 0 diff --git a/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts index bc4fa0c18682e..01f14ab13af4e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts @@ -67,7 +67,7 @@ interface I3 { -//// [/.src/overloadsWithComputedNames.d.ts] +//// [overloadsWithComputedNames.d.ts] declare class Person { ["B"](a: number): string; ["A"](a: string | number): number | string; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts index f8e2c7d863c97..eba0724a9cfbc 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts @@ -76,7 +76,7 @@ oneTwoOrThree(0); oneTwoOrThree(1); oneTwoOrThree(2); oneTwoOrThree(3); -//// [/.src/parseBigInt.d.ts] +//// [parseBigInt.d.ts] declare const bin = 0b101, binBig = 5n; declare const oct = 0o567, octBig = 375n; declare const hex = 0xC0B, hexBig = 0xc0bn; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName1.d.ts index 795ef02c60524..155dabe9f04dc 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName1.d.ts @@ -7,7 +7,7 @@ var v = { [e] }; -//// [/.src/parserComputedPropertyName1.d.ts] +//// [parserComputedPropertyName1.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName10.d.ts index 3656e5bd57130..75eb26c5137c0 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName10.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName10.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/parserComputedPropertyName10.d.ts] +//// [parserComputedPropertyName10.d.ts] declare class C { [e]: number; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName13.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName13.d.ts index b996c505b7221..2e631a715f65f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName13.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName13.d.ts @@ -7,7 +7,7 @@ var v: { [e]: number }; -//// [/.src/parserComputedPropertyName13.d.ts] +//// [parserComputedPropertyName13.d.ts] declare var v: { [e]: number; }; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName14.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName14.d.ts index b234c83506ecf..c9fa3166b2717 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName14.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName14.d.ts @@ -7,7 +7,7 @@ var v: { [e](): number }; -//// [/.src/parserComputedPropertyName14.d.ts] +//// [parserComputedPropertyName14.d.ts] declare var v: { [e](): number; }; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName15.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName15.d.ts index d34ac2da091fb..d632e155b27fe 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName15.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName15.d.ts @@ -7,7 +7,7 @@ var v: { [e: number]: string; [e]: number }; -//// [/.src/parserComputedPropertyName15.d.ts] +//// [parserComputedPropertyName15.d.ts] declare var v: { [e: number]: string; [e]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName18.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName18.d.ts index b7d74491774bc..b22d95f3bcdc5 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName18.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName18.d.ts @@ -7,7 +7,7 @@ var v: { [e]?(): number }; -//// [/.src/parserComputedPropertyName18.d.ts] +//// [parserComputedPropertyName18.d.ts] declare var v: { [e]?(): number; }; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName19.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName19.d.ts index d4bc36feb3b3b..b0ede9b5bfa7d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName19.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName19.d.ts @@ -7,7 +7,7 @@ var v: { [e]? }; -//// [/.src/parserComputedPropertyName19.d.ts] +//// [parserComputedPropertyName19.d.ts] declare var v: { [e]?: any; }; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName2.d.ts index 219286fbc0310..4371615e22e8d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName2.d.ts @@ -7,7 +7,7 @@ var v = { [e]: 1 }; -//// [/.src/parserComputedPropertyName2.d.ts] +//// [parserComputedPropertyName2.d.ts] declare var v: { [e]: number; }; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName20.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName20.d.ts index 2e8268b88f932..0cf0920da1d53 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName20.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName20.d.ts @@ -9,7 +9,7 @@ interface I { -//// [/.src/parserComputedPropertyName20.d.ts] +//// [parserComputedPropertyName20.d.ts] interface I { [e](): number; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName21.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName21.d.ts index 0ad21a0c372b1..17146468a00ea 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName21.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName21.d.ts @@ -9,7 +9,7 @@ interface I { -//// [/.src/parserComputedPropertyName21.d.ts] +//// [parserComputedPropertyName21.d.ts] interface I { [e]: number; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName22.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName22.d.ts index 155c3ae13a741..2b61f5fce4583 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName22.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName22.d.ts @@ -9,7 +9,7 @@ declare class C { -//// [/.src/parserComputedPropertyName22.d.ts] +//// [parserComputedPropertyName22.d.ts] declare class C { [e]: number; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName23.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName23.d.ts index 644f57251d4df..7fe82c89833cb 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName23.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName23.d.ts @@ -9,7 +9,7 @@ declare class C { -//// [/.src/parserComputedPropertyName23.d.ts] +//// [parserComputedPropertyName23.d.ts] declare class C { get [e](): number; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts index c0677aaf17105..15ffae4c0426c 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/parserComputedPropertyName24.d.ts] +//// [parserComputedPropertyName24.d.ts] declare class C { set [e](v: invalid); } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts index 275cc9780dfb2..046f5423e4fcf 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts @@ -11,7 +11,7 @@ class C { -//// [/.src/parserComputedPropertyName25.d.ts] +//// [parserComputedPropertyName25.d.ts] declare class C { [e]: invalid; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts index deb1ed1f36787..453be0f65fc84 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts @@ -11,7 +11,7 @@ class C { -//// [/.src/parserComputedPropertyName27.d.ts] +//// [parserComputedPropertyName27.d.ts] declare class C { [e]: number; number: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName28.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName28.d.ts index 2fb5fdbe51454..836d1db33c614 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName28.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName28.d.ts @@ -10,7 +10,7 @@ class C { -//// [/.src/parserComputedPropertyName28.d.ts] +//// [parserComputedPropertyName28.d.ts] declare class C { [e]: number; [e2]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts index 6ad198212886e..5b33130669814 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts @@ -11,7 +11,7 @@ class C { -//// [/.src/parserComputedPropertyName29.d.ts] +//// [parserComputedPropertyName29.d.ts] declare class C { [e]: invalid; [e2]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName31.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName31.d.ts index 3810d06c386f8..fad20066c7090 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName31.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName31.d.ts @@ -11,7 +11,7 @@ class C { -//// [/.src/parserComputedPropertyName31.d.ts] +//// [parserComputedPropertyName31.d.ts] declare class C { [e]: number; [e2]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName32.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName32.d.ts index e61cbddecce45..a88a78056f10e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName32.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName32.d.ts @@ -9,7 +9,7 @@ declare class C { -//// [/.src/parserComputedPropertyName32.d.ts] +//// [parserComputedPropertyName32.d.ts] declare class C { [e](): number; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts index 98597b6684eb0..929b3027a4b01 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts @@ -11,7 +11,7 @@ class C { -//// [/.src/parserComputedPropertyName33.d.ts] +//// [parserComputedPropertyName33.d.ts] declare class C { [e]: invalid; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName36.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName36.d.ts index 170566d110263..09351b1e97f84 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName36.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName36.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/parserComputedPropertyName36.d.ts] +//// [parserComputedPropertyName36.d.ts] declare class C { [public]: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName37.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName37.d.ts index 2668bb5b41aed..bbcbb8cc77602 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName37.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName37.d.ts @@ -9,7 +9,7 @@ var v = { -//// [/.src/parserComputedPropertyName37.d.ts] +//// [parserComputedPropertyName37.d.ts] declare var v: { [public]: number; }; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts index 1508e152aa265..bddf85254ff83 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts @@ -7,7 +7,7 @@ var v = { [e]: 1, [e + e]: 2 }; -//// [/.src/parserComputedPropertyName6.d.ts] +//// [parserComputedPropertyName6.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName9.d.ts index c43a5df90a15d..0a00ed7a8c483 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName9.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/parserComputedPropertyName9.d.ts] +//// [parserComputedPropertyName9.d.ts] declare class C { [e]: Type; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName1.d.ts index 8dba4d62c282a..1b45ac912a589 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName1.d.ts @@ -9,7 +9,7 @@ declare class C { -//// [/.src/parserES5ComputedPropertyName1.d.ts] +//// [parserES5ComputedPropertyName1.d.ts] declare class C { [e]: number; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName10.d.ts index a377ab468dae4..d79c8add09fbc 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName10.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName10.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/parserES5ComputedPropertyName10.d.ts] +//// [parserES5ComputedPropertyName10.d.ts] declare class C { [e]: number; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName2.d.ts index 704eb7616d12d..c317e9a094265 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName2.d.ts @@ -7,7 +7,7 @@ var v = { [e]: 1 }; -//// [/.src/parserES5ComputedPropertyName2.d.ts] +//// [parserES5ComputedPropertyName2.d.ts] declare var v: { [e]: number; }; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName5.d.ts index d210ebd488042..418a7931cc5e7 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName5.d.ts @@ -9,7 +9,7 @@ interface I { -//// [/.src/parserES5ComputedPropertyName5.d.ts] +//// [parserES5ComputedPropertyName5.d.ts] interface I { [e]: number; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName8.d.ts index 07c39b13dbdfb..e39d11139de4e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName8.d.ts @@ -7,7 +7,7 @@ var v: { [e]: number }; -//// [/.src/parserES5ComputedPropertyName8.d.ts] +//// [parserES5ComputedPropertyName8.d.ts] declare var v: { [e]: number; }; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName9.d.ts index 0a2126d87a7eb..55d00805ea21d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName9.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/parserES5ComputedPropertyName9.d.ts] +//// [parserES5ComputedPropertyName9.d.ts] declare class C { [e]: Type; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty1.d.ts index 072954cf6554d..48d6a25e27722 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty1.d.ts @@ -9,7 +9,7 @@ interface I { -//// [/.src/parserES5SymbolProperty1.d.ts] +//// [parserES5SymbolProperty1.d.ts] interface I { [Symbol.iterator]: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty2.d.ts index 27bcad616f284..2f183238e4e20 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty2.d.ts @@ -9,7 +9,7 @@ interface I { -//// [/.src/parserES5SymbolProperty2.d.ts] +//// [parserES5SymbolProperty2.d.ts] interface I { [Symbol.unscopables](): string; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty3.d.ts index 3a7c70cee73bb..c15848d3312ab 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty3.d.ts @@ -9,7 +9,7 @@ declare class C { -//// [/.src/parserES5SymbolProperty3.d.ts] +//// [parserES5SymbolProperty3.d.ts] declare class C { [Symbol.unscopables](): string; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts index 43bd1a4f3a793..76a5bda46cc6b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts @@ -9,7 +9,7 @@ declare class C { -//// [/.src/parserES5SymbolProperty4.d.ts] +//// [parserES5SymbolProperty4.d.ts] declare class C { [Symbol.isRegExp]: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty5.d.ts index ac8b6ae5c3d17..0e1e8f42c8cf2 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty5.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/parserES5SymbolProperty5.d.ts] +//// [parserES5SymbolProperty5.d.ts] declare class C { [Symbol.isRegExp]: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty6.d.ts index e79c424bfcefb..49cea4d179a02 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty6.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/parserES5SymbolProperty6.d.ts] +//// [parserES5SymbolProperty6.d.ts] declare class C { [Symbol.toStringTag]: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty7.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty7.d.ts index 07374e16ec4fa..aba3a731aa7c4 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty7.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty7.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/parserES5SymbolProperty7.d.ts] +//// [parserES5SymbolProperty7.d.ts] declare class C { [Symbol.toStringTag](): void; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts index 85843535213a6..01eee653c8b69 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts @@ -9,7 +9,7 @@ var x: { -//// [/.src/parserES5SymbolProperty8.d.ts] +//// [parserES5SymbolProperty8.d.ts] declare var x: { [Symbol.toPrimitive](): string; }; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty9.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty9.d.ts index da3520a8e6559..f4fe0c073b469 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty9.d.ts @@ -9,7 +9,7 @@ var x: { -//// [/.src/parserES5SymbolProperty9.d.ts] +//// [parserES5SymbolProperty9.d.ts] declare var x: { [Symbol.toPrimitive]: string; }; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature11.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature11.d.ts index 821317598fbbf..16147408c0230 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature11.d.ts @@ -11,7 +11,7 @@ interface I { -//// [/.src/parserIndexSignature11.d.ts] +//// [parserIndexSignature11.d.ts] interface I { [p]: any; [p1: string]: any; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature5.d.ts index 38473325d903d..85d5178395dff 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature5.d.ts @@ -9,7 +9,7 @@ interface I { -//// [/.src/parserIndexSignature5.d.ts] +//// [parserIndexSignature5.d.ts] interface I { [a]: any; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts index 052f40aaafc0f..1ebd13b2a3a61 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts @@ -9,7 +9,7 @@ function eval() { -//// [/.src/parserStrictMode8.d.ts] +//// [parserStrictMode8.d.ts] declare function eval(): invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserSymbolIndexer5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserSymbolIndexer5.d.ts index 1a8619c41af40..921156bc486bc 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserSymbolIndexer5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserSymbolIndexer5.d.ts @@ -9,7 +9,7 @@ var x = { -//// [/.src/parserSymbolIndexer5.d.ts] +//// [parserSymbolIndexer5.d.ts] declare var x: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/privateIndexer2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/privateIndexer2.d.ts index 679692faacea6..83e5e45130f24 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/privateIndexer2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/privateIndexer2.d.ts @@ -15,7 +15,7 @@ var y: { -//// [/.src/privateIndexer2.d.ts] +//// [privateIndexer2.d.ts] declare var x: invalid; declare var y: { private []: string; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/propertyAssignment.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/propertyAssignment.d.ts index 2d732e067150c..941ea08a719da 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/propertyAssignment.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/propertyAssignment.d.ts @@ -20,7 +20,7 @@ foo3 = bar3; // should be an error -//// [/.src/propertyAssignment.d.ts] +//// [propertyAssignment.d.ts] declare var foo1: { new (): any; }; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/reExportAliasMakesInstantiated.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/reExportAliasMakesInstantiated.d.ts index 69399d7a1c552..52db356edf23b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/reExportAliasMakesInstantiated.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/reExportAliasMakesInstantiated.d.ts @@ -26,7 +26,7 @@ const test2 = mod2; // Possible false positive instantiation, but ok -//// [/.src/reExportAliasMakesInstantiated.d.ts] +//// [reExportAliasMakesInstantiated.d.ts] declare namespace pack1 { const test1: string; export { test1 }; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts index ab042bb06cd85..31f9907e67318 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts @@ -354,7 +354,7 @@ export class ExportedStaticArgumentsFn { -//// [/.src/staticPropertyNameConflicts.d.ts] +//// [staticPropertyNameConflicts.d.ts] declare const FunctionPropertyNames: { readonly name: "name"; readonly length: "length"; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts index 4d7d5053a4f54..2f9035342c9da 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts @@ -354,7 +354,7 @@ export class ExportedStaticArgumentsFn { -//// [/.src/staticPropertyNameConflicts.d.ts] +//// [staticPropertyNameConflicts.d.ts] declare const FunctionPropertyNames: { readonly name: "name"; readonly length: "length"; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolDeclarationEmit12.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolDeclarationEmit12.d.ts index ae3f6a71b4f04..bcf6d13787586 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolDeclarationEmit12.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolDeclarationEmit12.d.ts @@ -18,7 +18,7 @@ module M { -//// [/.src/symbolDeclarationEmit12.d.ts] +//// [symbolDeclarationEmit12.d.ts] declare namespace M { interface I { } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts index 8e55cbc2b421f..4c15657a0fb8e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts @@ -14,7 +14,7 @@ var x = { -//// [/.src/symbolProperty1.d.ts] +//// [symbolProperty1.d.ts] declare var s: symbol; declare var x: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts index 1e380ddbc08ae..cdfff958617a9 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts @@ -14,7 +14,7 @@ var x = { -//// [/.src/symbolProperty2.d.ts] +//// [symbolProperty2.d.ts] declare var s: invalid; declare var x: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts index 99de56cfe897b..33f689ae4805b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts @@ -14,7 +14,7 @@ var x = { -//// [/.src/symbolProperty3.d.ts] +//// [symbolProperty3.d.ts] declare var s: invalid; declare var x: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty52.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty52.d.ts index e962fac90cd45..80a09e44bb7a1 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty52.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty52.d.ts @@ -13,7 +13,7 @@ obj[Symbol.nonsense]; -//// [/.src/symbolProperty52.d.ts] +//// [symbolProperty52.d.ts] declare var obj: { [Symbol.nonsense]: number; }; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty53.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty53.d.ts index 4429de47e04aa..2e56c11e0c523 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty53.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty53.d.ts @@ -11,7 +11,7 @@ obj[Symbol.for]; -//// [/.src/symbolProperty53.d.ts] +//// [symbolProperty53.d.ts] declare var obj: { [Symbol.for]: number; }; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty54.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty54.d.ts index fd6db59c79120..59c6e5bf97247 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty54.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty54.d.ts @@ -9,7 +9,7 @@ var obj = { -//// [/.src/symbolProperty54.d.ts] +//// [symbolProperty54.d.ts] declare var obj: { [Symbol.prototype]: number; }; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty58.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty58.d.ts index f48fbf1c10bec..f87e43fc5ab04 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty58.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty58.d.ts @@ -13,7 +13,7 @@ var obj = { -//// [/.src/symbolProperty58.d.ts] +//// [symbolProperty58.d.ts] interface SymbolConstructor { foo: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty59.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty59.d.ts index 165461c59e98c..8a4c2fe82a112 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty59.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty59.d.ts @@ -9,7 +9,7 @@ interface I { -//// [/.src/symbolProperty59.d.ts] +//// [symbolProperty59.d.ts] interface I { [Symbol.keyFor]: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralTypes4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralTypes4.d.ts index c39fc7941bed3..2d00e9b33dc22 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralTypes4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralTypes4.d.ts @@ -310,7 +310,7 @@ f4("**false**"); // false | "false" -//// [/.src/templateLiteralTypes4.d.ts] +//// [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; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralsSourceMap.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralsSourceMap.d.ts index 7cfa0414ef3ed..21965d2e8db2a 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralsSourceMap.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralsSourceMap.d.ts @@ -8,5 +8,5 @@ const s = `a${0}b${1}c${2}`; -//// [/.src/templateLiteralsSourceMap.d.ts] +//// [templateLiteralsSourceMap.d.ts] declare const s = `a${0}b${1}c${2}`; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment36.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment36.d.ts index 0a95d3b595fd3..621b8fea5159e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment36.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment36.d.ts @@ -79,7 +79,7 @@ g.both -//// [/.src/typeFromPropertyAssignment36.d.ts] +//// [typeFromPropertyAssignment36.d.ts] declare function f(b: boolean): invalid; declare var test: invalid; declare function d(): invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts index 365b7d29b7714..b58456e399844 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts @@ -32,7 +32,7 @@ type T4 = { -//// [/.src/typeUsedAsTypeLiteralIndex.d.ts] +//// [typeUsedAsTypeLiteralIndex.d.ts] type K = number | string; type T = { [K]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/verbatimModuleSyntaxConstEnumUsage.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/verbatimModuleSyntaxConstEnumUsage.d.ts index 3d327c6e9786c..f336b26e59988 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/verbatimModuleSyntaxConstEnumUsage.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/verbatimModuleSyntaxConstEnumUsage.d.ts @@ -20,14 +20,14 @@ export enum Bar { -//// [/.src/bar.d.ts] +//// [bar.d.ts] export declare enum Bar { a, c, e = 5 } -//// [/.src/foo.d.ts] +//// [foo.d.ts] export declare enum Foo { a = 1, b = 2, diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts index 24acd03411277..9b4dda01f7686 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts @@ -16,7 +16,7 @@ obj[Symbol.foo]; -//// [/.src/ES5SymbolProperty1.d.ts] +//// [ES5SymbolProperty1.d.ts] interface SymbolConstructor { foo: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts index 7c6ae28c1c2b4..df4523118f4be 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts @@ -7,7 +7,7 @@ var v = { [yield]: foo } -//// [/.src/FunctionDeclaration8_es6.d.ts] +//// [FunctionDeclaration8_es6.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts index f42de377a098c..bcecfedf34e83 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts @@ -7,7 +7,7 @@ var v = { [await]: foo } -//// [/.src/asyncFunctionDeclaration8_es2017.d.ts] +//// [asyncFunctionDeclaration8_es2017.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts index a86da6bca0199..67fbc2076d781 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts @@ -7,7 +7,7 @@ var v = { [await]: foo } -//// [/.src/asyncFunctionDeclaration8_es5.d.ts] +//// [asyncFunctionDeclaration8_es5.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts index fd69a192ab893..dcca402e43dac 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts @@ -7,7 +7,7 @@ var v = { [await]: foo } -//// [/.src/asyncFunctionDeclaration8_es6.d.ts] +//// [asyncFunctionDeclaration8_es6.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts index 64c2bad4ffe22..3aa58a43a1169 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts @@ -36,7 +36,7 @@ const c = {[bigNum]: 789}; -//// [/.src/a.d.ts] +//// [a.d.ts] interface BigIntIndex { [index: bigint]: E; } @@ -46,7 +46,7 @@ declare let key: keyof any; declare const bigNum: bigint; declare const typedArray: invalid; -//// [/.src/b.d.ts] +//// [b.d.ts] declare const a: {}; declare const b: { [1n]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts index c58f24ec480fd..8baf03de2f7b0 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts @@ -110,7 +110,7 @@ module mglo5 { -//// [/.src/complicatedPrivacy.d.ts] +//// [complicatedPrivacy.d.ts] declare namespace m1 { export namespace m2 { function f1(c1: C1): invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts index 3c7be90d96014..674cc59036e19 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts @@ -55,7 +55,7 @@ export const o9 = { -//// [/.src/computedPropertiesNarrowed.d.ts] +//// [computedPropertiesNarrowed.d.ts] export declare let o: invalid; declare const y: 0; export declare let o2: { diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts index e9a8d05b56031..f0090afa676fe 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts @@ -22,7 +22,7 @@ class C { -//// [/.src/computedPropertyNames12_ES5.d.ts] +//// [computedPropertyNames12_ES5.d.ts] declare var s: string; declare var n: number; declare var a: any; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts index 752a2bd078f26..60e44e006781f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts @@ -22,7 +22,7 @@ class C { -//// [/.src/computedPropertyNames12_ES6.d.ts] +//// [computedPropertyNames12_ES6.d.ts] declare var s: string; declare var n: number; declare var a: any; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts index a1fa819f8a9f8..6c330b031001b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts @@ -22,7 +22,7 @@ class C { -//// [/.src/computedPropertyNames16_ES5.d.ts] +//// [computedPropertyNames16_ES5.d.ts] declare var s: string; declare var n: number; declare var a: any; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts index 001dca4ea9def..f6ea765dba7db 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts @@ -22,7 +22,7 @@ class C { -//// [/.src/computedPropertyNames16_ES6.d.ts] +//// [computedPropertyNames16_ES6.d.ts] declare var s: string; declare var n: number; declare var a: any; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts index 53e730607cd4d..b4a07d1cd3ef3 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts @@ -16,7 +16,7 @@ class C { -//// [/.src/computedPropertyNames2_ES5.d.ts] +//// [computedPropertyNames2_ES5.d.ts] declare var methodName: string; declare var accessorName: string; declare class C { diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts index a290a03e773e1..0bf15a5f2bc34 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts @@ -16,7 +16,7 @@ class C { -//// [/.src/computedPropertyNames2_ES6.d.ts] +//// [computedPropertyNames2_ES6.d.ts] declare var methodName: string; declare var accessorName: string; declare class C { diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts index b549bae85104a..606d4472d3517 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts @@ -22,7 +22,7 @@ var v = { -//// [/.src/computedPropertyNames4_ES5.d.ts] +//// [computedPropertyNames4_ES5.d.ts] declare var s: string; declare var n: number; declare var a: any; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts index 6c55990ad7a1c..c517a9814d584 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts @@ -22,7 +22,7 @@ var v = { -//// [/.src/computedPropertyNames4_ES6.d.ts] +//// [computedPropertyNames4_ES6.d.ts] declare var s: string; declare var n: number; declare var a: any; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts index 23c079a6554f7..f2f2438bc9e22 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts @@ -15,7 +15,7 @@ var v = { -//// [/.src/computedPropertyNames5_ES5.d.ts] +//// [computedPropertyNames5_ES5.d.ts] declare var b: boolean; declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts index 3d3e0d51646ef..48f4883a011c7 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts @@ -15,7 +15,7 @@ var v = { -//// [/.src/computedPropertyNames5_ES6.d.ts] +//// [computedPropertyNames5_ES6.d.ts] declare var b: boolean; declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts index dbe7ce0a3cdb3..25537888f6550 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts @@ -14,7 +14,7 @@ var v = { -//// [/.src/computedPropertyNames6_ES5.d.ts] +//// [computedPropertyNames6_ES5.d.ts] declare var p1: number | string; declare var p2: number | number[]; declare var p3: string | boolean; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts index c031a79290566..37869462022e2 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts @@ -14,7 +14,7 @@ var v = { -//// [/.src/computedPropertyNames6_ES6.d.ts] +//// [computedPropertyNames6_ES6.d.ts] declare var p1: number | string; declare var p2: number | number[]; declare var p3: string | boolean; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts index 4e7710dc827d7..952d3bba53d3c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts @@ -13,7 +13,7 @@ class C { -//// [/.src/computedPropertyNamesOnOverloads_ES5.d.ts] +//// [computedPropertyNamesOnOverloads_ES5.d.ts] declare var methodName: string; declare var accessorName: string; declare class C { diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts index 6da1c1cecd108..b710d2ce67bac 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts @@ -13,7 +13,7 @@ class C { -//// [/.src/computedPropertyNamesOnOverloads_ES6.d.ts] +//// [computedPropertyNamesOnOverloads_ES6.d.ts] declare var methodName: string; declare var accessorName: string; declare class C { diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts index 9e3170815ba7c..e5cdbb6c73c98 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts @@ -16,7 +16,7 @@ class C { -//// [/.src/computedPropertyNamesWithStaticProperty.d.ts] +//// [computedPropertyNamesWithStaticProperty.d.ts] declare class C { static staticProp: number; get [C.staticProp](): invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/constEnum2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/constEnum2.d.ts index f457ecb42e0bf..29dcd8b6f97d9 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/constEnum2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/constEnum2.d.ts @@ -19,7 +19,7 @@ const enum D { -//// [/.src/constEnum2.d.ts] +//// [constEnum2.d.ts] declare const CONST: invalid; declare const enum D { d = 10, diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts index 74d745c13222c..9b0ff417e5f7d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts @@ -50,7 +50,7 @@ const enum NaNOrInfinity { -//// [/.src/constEnumErrors.d.ts] +//// [constEnumErrors.d.ts] declare const enum E { A = 0 } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/constEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/constEnums.d.ts index 6141be78da785..ebeafce29c4ad 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/constEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/constEnums.d.ts @@ -184,7 +184,7 @@ function baz(c: Comments) { -//// [/.src/constEnums.d.ts] +//// [constEnums.d.ts] declare const enum Enum1 { A0 = 100 } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts index 7782052bccca3..c982c32954c22 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts @@ -17,7 +17,7 @@ app.foo.bar.someFun(1); -//// [/.src/contextualReturnTypeOfIIFE2.d.ts] +//// [contextualReturnTypeOfIIFE2.d.ts] declare namespace app { function foo(): void; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts index cbe73c462757c..0df63a1813e46 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts @@ -24,7 +24,7 @@ child1(ParentThing.prototype); -//// [/.src/child1.d.ts] +//// [child1.d.ts] import { ParentThing } from './parent'; declare module './parent' { interface ParentThing { @@ -33,7 +33,7 @@ declare module './parent' { } export declare function child1(prototype: ParentThing): invalid; -//// [/.src/parent.d.ts] +//// [parent.d.ts] export declare class ParentThing implements ParentThing { } /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitLateBoundAssignments2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitLateBoundAssignments2.d.ts index 73924286e49dd..b82c5274835cd 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitLateBoundAssignments2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitLateBoundAssignments2.d.ts @@ -74,7 +74,7 @@ arrow10[emoji] = 0 -//// [/.src/declarationEmitLateBoundAssignments2.d.ts] +//// [declarationEmitLateBoundAssignments2.d.ts] export declare function decl(): invalid; export declare function decl2(): invalid; export declare function decl3(): invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts index 7a0a57f27b13c..1bd7bee047809 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts @@ -195,7 +195,7 @@ void class J { -//// [/.src/decoratorsOnComputedProperties.d.ts] +//// [decoratorsOnComputedProperties.d.ts] declare function x(o: object, k: PropertyKey): invalid; declare let i: number; declare function foo(): string; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics2.d.ts index d57a775eddc2a..653c6c14c073f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics2.d.ts @@ -21,7 +21,7 @@ enum Bar { -//// [/.src/enumBasics2.d.ts] +//// [enumBasics2.d.ts] declare enum Foo { a = 2, b = 3, diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics3.d.ts index fdd076957554e..8440af354b653 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics3.d.ts @@ -24,7 +24,7 @@ module M { -//// [/.src/enumBasics3.d.ts] +//// [enumBasics3.d.ts] declare namespace M { namespace N { enum E1 { diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts index 7e4fe201c2dad..28eb136e39e44 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts @@ -46,7 +46,7 @@ const enum E6 { -//// [/.src/enumConstantMembers.d.ts] +//// [enumConstantMembers.d.ts] declare enum E1 { a = 1, b = 2 diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumErrors.d.ts index a24c21dc0e0b0..3716a576aea04 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/enumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/enumErrors.d.ts @@ -60,7 +60,7 @@ enum E14 { a, b: any "hello" += 1, c, d} -//// [/.src/enumErrors.d.ts] +//// [enumErrors.d.ts] declare enum any { } declare enum number { diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumExportMergingES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumExportMergingES6.d.ts index 20e2331b66096..8f9854dc8883b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/enumExportMergingES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/enumExportMergingES6.d.ts @@ -16,7 +16,7 @@ export enum Animals { -//// [/.src/enumExportMergingES6.d.ts] +//// [enumExportMergingES6.d.ts] export declare enum Animals { Cat = 1 } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts index e3604808ed93f..389051bbcaf9c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts @@ -16,7 +16,7 @@ expr2[s] = 0 -//// [/.src/expandoFunctionExpressionsWithDynamicNames.d.ts] +//// [expandoFunctionExpressionsWithDynamicNames.d.ts] export declare const expr: invalid; export declare const expr2: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts index 7f82231c4f756..098898eb7340d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts @@ -20,7 +20,7 @@ enum E1 { -//// [/.src/forwardRefInEnum.d.ts] +//// [forwardRefInEnum.d.ts] declare enum E1 { X = 0, X1 = 0, diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts index 2e4e7435cfbbe..922adc4a2d6be 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts @@ -686,7 +686,7 @@ export declare module eaM { -//// [/.src/giant.d.ts] +//// [giant.d.ts] export declare var eV: invalid; export declare function eF(): invalid; export declare class eC { diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts index 5afa3be184af0..c1f4164de4845 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts @@ -21,7 +21,7 @@ class C2 { -//// [/.src/indexSignatureMustHaveTypeAnnotation.d.ts] +//// [indexSignatureMustHaveTypeAnnotation.d.ts] interface I { [x: string]: any; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/indexTypeNoSubstitutionTemplateLiteral.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/indexTypeNoSubstitutionTemplateLiteral.d.ts index a3c93c1e88b61..12213176c3b14 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/indexTypeNoSubstitutionTemplateLiteral.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/indexTypeNoSubstitutionTemplateLiteral.d.ts @@ -12,7 +12,7 @@ type Test = keyof typeof Foo; -//// [/.src/indexTypeNoSubstitutionTemplateLiteral.d.ts] +//// [indexTypeNoSubstitutionTemplateLiteral.d.ts] declare function Foo(): invalid; type Test = keyof typeof Foo; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts index 1fe958914c370..c4f13e0776d98 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts @@ -10,7 +10,7 @@ class C { -//// [/.src/indexWithoutParamType2.d.ts] +//// [indexWithoutParamType2.d.ts] declare class C { [x]: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts index b3c81481dc5df..ef4a9aa51c356 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts @@ -211,7 +211,7 @@ var obj87: i8 = new {}; -//// [/.src/intTypeCheck.d.ts] +//// [intTypeCheck.d.ts] interface i1 { p: any; p1?: any; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts index b07709498fc5e..5bfaa350e007e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts @@ -31,7 +31,7 @@ const a14 = tag`${ 100 }\x00` // \x00 -//// [/.src/invalidTaggedTemplateEscapeSequences.d.ts] +//// [invalidTaggedTemplateEscapeSequences.d.ts] declare function tag(str: any, ...args: any[]): any; declare const a: invalid; declare const b: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es5).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es5).d.ts index b07709498fc5e..5bfaa350e007e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es5).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es5).d.ts @@ -31,7 +31,7 @@ const a14 = tag`${ 100 }\x00` // \x00 -//// [/.src/invalidTaggedTemplateEscapeSequences.d.ts] +//// [invalidTaggedTemplateEscapeSequences.d.ts] declare function tag(str: any, ...args: any[]): any; declare const a: invalid; declare const b: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts index b07709498fc5e..5bfaa350e007e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts @@ -31,7 +31,7 @@ const a14 = tag`${ 100 }\x00` // \x00 -//// [/.src/invalidTaggedTemplateEscapeSequences.d.ts] +//// [invalidTaggedTemplateEscapeSequences.d.ts] declare function tag(str: any, ...args: any[]): any; declare const a: invalid; declare const b: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts index acd906cf5ea1b..a06d4a83e1c87 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts @@ -37,7 +37,7 @@ declare enum Enum { -//// [/.src/enum1.d.ts] +//// [enum1.d.ts] declare enum Enum { A = 0, B = 1, @@ -48,7 +48,7 @@ declare enum Enum { } declare const d = "d"; -//// [/.src/enum2.d.ts] +//// [enum2.d.ts] declare enum Enum { D = "d", E = 0,// error @@ -59,12 +59,12 @@ declare enum Enum { F = 0 } -//// [/.src/module-namespaces.d.ts] +//// [module-namespaces.d.ts] export declare namespace Instantiated { const x = 1; } -//// [/.src/script-namespaces.d.ts] +//// [script-namespaces.d.ts] declare namespace Instantiated { const x = 1; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/mergedDeclarations2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/mergedDeclarations2.d.ts index 65abc5d2c5e50..66e92db0010ee 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/mergedDeclarations2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/mergedDeclarations2.d.ts @@ -16,7 +16,7 @@ module Foo { -//// [/.src/mergedDeclarations2.d.ts] +//// [mergedDeclarations2.d.ts] declare enum Foo { b = 0 } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/mergedEnumDeclarationCodeGen.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/mergedEnumDeclarationCodeGen.d.ts index 27a9f79431424..0e52af1b3639d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/mergedEnumDeclarationCodeGen.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/mergedEnumDeclarationCodeGen.d.ts @@ -13,7 +13,7 @@ enum E { -//// [/.src/mergedEnumDeclarationCodeGen.d.ts] +//// [mergedEnumDeclarationCodeGen.d.ts] declare enum E { a = 0, b = 0 diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts index 92bbde6b610c1..07c524f3d13cf 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts @@ -67,7 +67,7 @@ interface I3 { -//// [/.src/overloadsWithComputedNames.d.ts] +//// [overloadsWithComputedNames.d.ts] declare class Person { ["B"](a: number): string; ["A"](a: string | number): number | string; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parseBigInt.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseBigInt.d.ts index 38fb67429f08d..c0d5043d78450 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parseBigInt.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parseBigInt.d.ts @@ -76,7 +76,7 @@ oneTwoOrThree(0); oneTwoOrThree(1); oneTwoOrThree(2); oneTwoOrThree(3); -//// [/.src/parseBigInt.d.ts] +//// [parseBigInt.d.ts] declare const bin = 5, binBig = 5n; declare const oct = 375, octBig = 375n; declare const hex = 3083, hexBig = 3083n; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts index 6941925fcf029..c82bb6d99a6f4 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts @@ -7,7 +7,7 @@ var v = { [e] }; -//// [/.src/parserComputedPropertyName1.d.ts] +//// [parserComputedPropertyName1.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts index c5f74f8efe9bc..b77214d4fc7b4 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/parserComputedPropertyName10.d.ts] +//// [parserComputedPropertyName10.d.ts] declare class C { [e]: number; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName13.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName13.d.ts index e5d15e3fd10d5..bdc809cf6584b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName13.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName13.d.ts @@ -7,7 +7,7 @@ var v: { [e]: number }; -//// [/.src/parserComputedPropertyName13.d.ts] +//// [parserComputedPropertyName13.d.ts] declare var v: {}; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName14.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName14.d.ts index 1f117a7ab4151..fe0ba4a8d747d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName14.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName14.d.ts @@ -7,7 +7,7 @@ var v: { [e](): number }; -//// [/.src/parserComputedPropertyName14.d.ts] +//// [parserComputedPropertyName14.d.ts] declare var v: {}; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName15.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName15.d.ts index ee29c0fee930e..aabe3a0df315a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName15.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName15.d.ts @@ -7,7 +7,7 @@ var v: { [e: number]: string; [e]: number }; -//// [/.src/parserComputedPropertyName15.d.ts] +//// [parserComputedPropertyName15.d.ts] declare var v: { [e: number]: string; }; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName18.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName18.d.ts index 4fbf77d7da09a..155d92a4438a3 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName18.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName18.d.ts @@ -7,7 +7,7 @@ var v: { [e]?(): number }; -//// [/.src/parserComputedPropertyName18.d.ts] +//// [parserComputedPropertyName18.d.ts] declare var v: {}; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName19.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName19.d.ts index e58feb817303e..373c3adf173e2 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName19.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName19.d.ts @@ -7,7 +7,7 @@ var v: { [e]? }; -//// [/.src/parserComputedPropertyName19.d.ts] +//// [parserComputedPropertyName19.d.ts] declare var v: {}; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts index 51d1cac16faa0..bfbff928a15b2 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts @@ -7,7 +7,7 @@ var v = { [e]: 1 }; -//// [/.src/parserComputedPropertyName2.d.ts] +//// [parserComputedPropertyName2.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName20.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName20.d.ts index 3d3c78e4067a3..5241a7c73422f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName20.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName20.d.ts @@ -9,7 +9,7 @@ interface I { -//// [/.src/parserComputedPropertyName20.d.ts] +//// [parserComputedPropertyName20.d.ts] interface I { } /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName21.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName21.d.ts index 7d121fddb1fc4..ca15fba806420 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName21.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName21.d.ts @@ -9,7 +9,7 @@ interface I { -//// [/.src/parserComputedPropertyName21.d.ts] +//// [parserComputedPropertyName21.d.ts] interface I { } /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts index f0e4dc84388cb..34c24a32e4863 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts @@ -9,7 +9,7 @@ declare class C { -//// [/.src/parserComputedPropertyName22.d.ts] +//// [parserComputedPropertyName22.d.ts] declare class C { [e]: number; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts index d751f901c9c1f..e967dcc2177c5 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts @@ -9,7 +9,7 @@ declare class C { -//// [/.src/parserComputedPropertyName23.d.ts] +//// [parserComputedPropertyName23.d.ts] declare class C { get [e](): number; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts index f882eb339441a..2d56c21dc3758 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/parserComputedPropertyName24.d.ts] +//// [parserComputedPropertyName24.d.ts] declare class C { set [e](v: invalid); } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts index 8328f0f9667a8..3dfe893743629 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts @@ -11,7 +11,7 @@ class C { -//// [/.src/parserComputedPropertyName25.d.ts] +//// [parserComputedPropertyName25.d.ts] declare class C { [e]: invalid; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts index db782c3a6f93a..f3f44f4dc91d8 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts @@ -11,7 +11,7 @@ class C { -//// [/.src/parserComputedPropertyName27.d.ts] +//// [parserComputedPropertyName27.d.ts] declare class C { [e]: number; number: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts index 2db629b00bcd7..24b14659892bc 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts @@ -10,7 +10,7 @@ class C { -//// [/.src/parserComputedPropertyName28.d.ts] +//// [parserComputedPropertyName28.d.ts] declare class C { [e]: number; [e2]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts index f0be74e73cdc5..e4617d75f43e1 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts @@ -11,7 +11,7 @@ class C { -//// [/.src/parserComputedPropertyName29.d.ts] +//// [parserComputedPropertyName29.d.ts] declare class C { [e]: invalid; [e2]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts index 0f7df500bdd80..c1a14daf6d5d8 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts @@ -11,7 +11,7 @@ class C { -//// [/.src/parserComputedPropertyName31.d.ts] +//// [parserComputedPropertyName31.d.ts] declare class C { [e]: number; [e2]: number; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts index bd3104ff5b76a..7523b19e8af4c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts @@ -9,7 +9,7 @@ declare class C { -//// [/.src/parserComputedPropertyName32.d.ts] +//// [parserComputedPropertyName32.d.ts] declare class C { [e](): number; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts index 0971f0a9e58d2..32977adb0dd1c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts @@ -11,7 +11,7 @@ class C { -//// [/.src/parserComputedPropertyName33.d.ts] +//// [parserComputedPropertyName33.d.ts] declare class C { [e]: invalid; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts index 95e66fb12e2fd..bf955124d8253 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/parserComputedPropertyName36.d.ts] +//// [parserComputedPropertyName36.d.ts] declare class C { [public]: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts index a6b582a7c6928..21a76dfbe14aa 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts @@ -9,7 +9,7 @@ var v = { -//// [/.src/parserComputedPropertyName37.d.ts] +//// [parserComputedPropertyName37.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts index c7b84c2aa4372..f8a4b26aef4b5 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts @@ -7,7 +7,7 @@ var v = { [e]: 1, [e + e]: 2 }; -//// [/.src/parserComputedPropertyName6.d.ts] +//// [parserComputedPropertyName6.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts index 4b3f5facf403a..da72a3d2a2c60 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/parserComputedPropertyName9.d.ts] +//// [parserComputedPropertyName9.d.ts] declare class C { [e]: Type; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts index 7ce4b7eac2773..8b610b1a37778 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts @@ -9,7 +9,7 @@ declare class C { -//// [/.src/parserES5ComputedPropertyName1.d.ts] +//// [parserES5ComputedPropertyName1.d.ts] declare class C { [e]: number; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts index ebf4adc9490f4..b4a61a89dd133 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/parserES5ComputedPropertyName10.d.ts] +//// [parserES5ComputedPropertyName10.d.ts] declare class C { [e]: number; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts index 3d0153e5a9fdb..81eb404561e19 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts @@ -7,7 +7,7 @@ var v = { [e]: 1 }; -//// [/.src/parserES5ComputedPropertyName2.d.ts] +//// [parserES5ComputedPropertyName2.d.ts] declare var v: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName5.d.ts index 025456a1a8da5..223a518220655 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName5.d.ts @@ -9,7 +9,7 @@ interface I { -//// [/.src/parserES5ComputedPropertyName5.d.ts] +//// [parserES5ComputedPropertyName5.d.ts] interface I { } /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName8.d.ts index 4e5d4129768a7..9dd6d0de69f94 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName8.d.ts @@ -7,7 +7,7 @@ var v: { [e]: number }; -//// [/.src/parserES5ComputedPropertyName8.d.ts] +//// [parserES5ComputedPropertyName8.d.ts] declare var v: {}; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts index 19bd561abac7a..f84ff2aa6212c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/parserES5ComputedPropertyName9.d.ts] +//// [parserES5ComputedPropertyName9.d.ts] declare class C { [e]: Type; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty1.d.ts index 42ecaacff1746..4a8e6d3a42827 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty1.d.ts @@ -9,7 +9,7 @@ interface I { -//// [/.src/parserES5SymbolProperty1.d.ts] +//// [parserES5SymbolProperty1.d.ts] interface I { } /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty2.d.ts index 266fc31c6f441..8c346d6820f04 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty2.d.ts @@ -9,7 +9,7 @@ interface I { -//// [/.src/parserES5SymbolProperty2.d.ts] +//// [parserES5SymbolProperty2.d.ts] interface I { } /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts index 0e82cec152a52..6a9cb9129a55c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts @@ -9,7 +9,7 @@ declare class C { -//// [/.src/parserES5SymbolProperty3.d.ts] +//// [parserES5SymbolProperty3.d.ts] declare class C { [Symbol.unscopables](): string; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts index 0da372d695a1a..77de691153ad9 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts @@ -9,7 +9,7 @@ declare class C { -//// [/.src/parserES5SymbolProperty4.d.ts] +//// [parserES5SymbolProperty4.d.ts] declare class C { [Symbol.isRegExp]: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts index c5172b083d2a3..e97f78b17864f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/parserES5SymbolProperty5.d.ts] +//// [parserES5SymbolProperty5.d.ts] declare class C { [Symbol.isRegExp]: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts index 4fe148218b544..a74581c2d89ca 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/parserES5SymbolProperty6.d.ts] +//// [parserES5SymbolProperty6.d.ts] declare class C { [Symbol.toStringTag]: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts index 73e205f8350b6..c13c517ab39be 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts @@ -9,7 +9,7 @@ class C { -//// [/.src/parserES5SymbolProperty7.d.ts] +//// [parserES5SymbolProperty7.d.ts] declare class C { [Symbol.toStringTag](): void; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts index 6633242865ed5..3b3aac6192871 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts @@ -9,7 +9,7 @@ var x: { -//// [/.src/parserES5SymbolProperty8.d.ts] +//// [parserES5SymbolProperty8.d.ts] declare var x: {}; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty9.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty9.d.ts index defbff2c89491..43a77c5e6ce8a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty9.d.ts @@ -9,7 +9,7 @@ var x: { -//// [/.src/parserES5SymbolProperty9.d.ts] +//// [parserES5SymbolProperty9.d.ts] declare var x: {}; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature11.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature11.d.ts index a1ee1f9f64bbd..318dcb1ee3152 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature11.d.ts @@ -11,7 +11,7 @@ interface I { -//// [/.src/parserIndexSignature11.d.ts] +//// [parserIndexSignature11.d.ts] interface I { [p1: string]: any; [p2: string, p3: number]: any; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature5.d.ts index 05c4b88e46d6c..9abedb935aad4 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature5.d.ts @@ -9,7 +9,7 @@ interface I { -//// [/.src/parserIndexSignature5.d.ts] +//// [parserIndexSignature5.d.ts] interface I { } /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserStrictMode8.d.ts index 0c243fd4851c5..3710a7c6524d6 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserStrictMode8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserStrictMode8.d.ts @@ -9,7 +9,7 @@ function eval() { -//// [/.src/parserStrictMode8.d.ts] +//// [parserStrictMode8.d.ts] /// [Errors] //// parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserSymbolIndexer5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserSymbolIndexer5.d.ts index ddae6cbb73f69..9f8516e49a4fd 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserSymbolIndexer5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserSymbolIndexer5.d.ts @@ -9,7 +9,7 @@ var x = { -//// [/.src/parserSymbolIndexer5.d.ts] +//// [parserSymbolIndexer5.d.ts] declare var x: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/privateIndexer2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/privateIndexer2.d.ts index f3892e35c9626..3e4552fb819ab 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/privateIndexer2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/privateIndexer2.d.ts @@ -15,7 +15,7 @@ var y: { -//// [/.src/privateIndexer2.d.ts] +//// [privateIndexer2.d.ts] declare var x: invalid; declare var y: { private []: string; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/propertyAssignment.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/propertyAssignment.d.ts index 979b5324d067b..788fdb89d2f3f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/propertyAssignment.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/propertyAssignment.d.ts @@ -20,7 +20,7 @@ foo3 = bar3; // should be an error -//// [/.src/propertyAssignment.d.ts] +//// [propertyAssignment.d.ts] declare var foo1: { new (): any; }; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/reExportAliasMakesInstantiated.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/reExportAliasMakesInstantiated.d.ts index b0a63495a287d..f696deecb848a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/reExportAliasMakesInstantiated.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/reExportAliasMakesInstantiated.d.ts @@ -26,7 +26,7 @@ const test2 = mod2; // Possible false positive instantiation, but ok -//// [/.src/reExportAliasMakesInstantiated.d.ts] +//// [reExportAliasMakesInstantiated.d.ts] declare namespace pack1 { const test1: string; export { test1 }; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts index 81af1e1f0e3f8..d3906bad59603 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts @@ -354,7 +354,7 @@ export class ExportedStaticArgumentsFn { -//// [/.src/staticPropertyNameConflicts.d.ts] +//// [staticPropertyNameConflicts.d.ts] declare const FunctionPropertyNames: { readonly name: "name"; readonly length: "length"; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts index 1ce33479d6447..e708ea50a9257 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts @@ -354,7 +354,7 @@ export class ExportedStaticArgumentsFn { -//// [/.src/staticPropertyNameConflicts.d.ts] +//// [staticPropertyNameConflicts.d.ts] declare const FunctionPropertyNames: { readonly name: "name"; readonly length: "length"; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolDeclarationEmit12.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolDeclarationEmit12.d.ts index e49a746b5d16c..1a0f6cb05d5c7 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolDeclarationEmit12.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolDeclarationEmit12.d.ts @@ -18,7 +18,7 @@ module M { -//// [/.src/symbolDeclarationEmit12.d.ts] +//// [symbolDeclarationEmit12.d.ts] declare namespace M { interface I { } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts index f3b75dcf6c0e9..3cd221ebf65e4 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts @@ -14,7 +14,7 @@ var x = { -//// [/.src/symbolProperty1.d.ts] +//// [symbolProperty1.d.ts] declare var s: symbol; declare var x: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts index d5737bad3427e..3d6a4e0eceb49 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts @@ -14,7 +14,7 @@ var x = { -//// [/.src/symbolProperty2.d.ts] +//// [symbolProperty2.d.ts] declare var s: invalid; declare var x: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts index 76a1b3ea653ef..cc4e1fc9dd6d3 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts @@ -14,7 +14,7 @@ var x = { -//// [/.src/symbolProperty3.d.ts] +//// [symbolProperty3.d.ts] declare var s: invalid; declare var x: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts index 4089ed0534c6b..fd1b03d80cf1d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts @@ -13,7 +13,7 @@ obj[Symbol.nonsense]; -//// [/.src/symbolProperty52.d.ts] +//// [symbolProperty52.d.ts] declare var obj: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts index 9185d3e40a8ab..0608e99da36d2 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts @@ -11,7 +11,7 @@ obj[Symbol.for]; -//// [/.src/symbolProperty53.d.ts] +//// [symbolProperty53.d.ts] declare var obj: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts index 8969c4f7839c0..be5e3dfea154e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts @@ -9,7 +9,7 @@ var obj = { -//// [/.src/symbolProperty54.d.ts] +//// [symbolProperty54.d.ts] declare var obj: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts index 2b4241f6351fe..1b7f3d5953d68 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts @@ -13,7 +13,7 @@ var obj = { -//// [/.src/symbolProperty58.d.ts] +//// [symbolProperty58.d.ts] interface SymbolConstructor { foo: string; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty59.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty59.d.ts index 1ed95d21acc96..7682f0d293631 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty59.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty59.d.ts @@ -9,7 +9,7 @@ interface I { -//// [/.src/symbolProperty59.d.ts] +//// [symbolProperty59.d.ts] interface I { } /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralTypes4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralTypes4.d.ts index 9627e370ef297..67680e6b8a7ba 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralTypes4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralTypes4.d.ts @@ -310,7 +310,7 @@ f4("**false**"); // false | "false" -//// [/.src/templateLiteralTypes4.d.ts] +//// [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; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralsSourceMap.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralsSourceMap.d.ts index ce0af0f17d45c..5968e32cf7e8c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralsSourceMap.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralsSourceMap.d.ts @@ -8,5 +8,5 @@ const s = `a${0}b${1}c${2}`; -//// [/.src/templateLiteralsSourceMap.d.ts] +//// [templateLiteralsSourceMap.d.ts] declare const s = "a0b1c2"; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment36.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment36.d.ts index d1cc827c20dc4..08a40aaea6523 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment36.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment36.d.ts @@ -79,7 +79,7 @@ g.both -//// [/.src/typeFromPropertyAssignment36.d.ts] +//// [typeFromPropertyAssignment36.d.ts] declare function f(b: boolean): invalid; declare var test: invalid; declare function d(): invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts index 2da686f7e5480..480b3d660142b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts @@ -32,7 +32,7 @@ type T4 = { -//// [/.src/typeUsedAsTypeLiteralIndex.d.ts] +//// [typeUsedAsTypeLiteralIndex.d.ts] type K = number | string; type T = {}; declare const K1: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts index 2e63864fcb961..e717974c11829 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts @@ -20,14 +20,14 @@ export enum Bar { -//// [/.src/bar.d.ts] +//// [bar.d.ts] export declare enum Bar { a = 1, c = 3, e = 5 } -//// [/.src/foo.d.ts] +//// [foo.d.ts] export declare enum Foo { a = 1, b = 2, From 36e55053174dd2d2c83a7e320308e5a32290038d Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 13 Nov 2023 10:27:49 +0000 Subject: [PATCH 127/224] Added new line before errors. Signed-off-by: Titian Cernicova-Dragomir --- .../diff/FunctionPropertyAssignments3_es6.d.ts.diff | 1 + .../diff/FunctionPropertyAssignments5_es6.d.ts.diff | 1 + .../diff/MemberFunctionDeclaration5_es6.d.ts.diff | 1 + .../diff/MemberFunctionDeclaration6_es6.d.ts.diff | 1 + .../auto-fixed/diff/ambientEnum1.d.ts.diff | 1 + .../diff/ambientEnumDeclaration1.d.ts.diff | 3 ++- ...rayFakeFlatNoCrashInferenceDeclarations.d.ts.diff | 1 + .../auto-fixed/diff/arrowFunctionContexts.d.ts.diff | 1 + .../diff/classMemberWithMissingIdentifier.d.ts.diff | 1 + .../diff/classMemberWithMissingIdentifier2.d.ts.diff | 1 + ...lisionCodeGenEnumWithEnumMemberConflict.d.ts.diff | 3 ++- .../diff/computedEnumTypeWidening.d.ts.diff | 3 ++- .../diff/computedPropertyNames10_ES5.d.ts.diff | 3 ++- .../diff/computedPropertyNames10_ES6.d.ts.diff | 3 ++- .../auto-fixed/diff/constEnum1.d.ts.diff | 3 ++- .../auto-fixed/diff/constEnum2.d.ts.diff | 1 + .../auto-fixed/diff/constEnumDeclarations.d.ts.diff | 3 ++- .../auto-fixed/diff/constEnumErrors.d.ts.diff | 1 + ...stEnumNamespaceReferenceCausesNoImport2.d.ts.diff | 3 ++- .../diff/constEnumPropertyAccess1.d.ts.diff | 1 + .../diff/constEnumPropertyAccess2.d.ts.diff | 1 + .../diff/constEnumPropertyAccess3.d.ts.diff | 3 ++- .../auto-fixed/diff/constEnums.d.ts.diff | 3 ++- .../auto-fixed/diff/constantEnumAssert.d.ts.diff | 1 + .../auto-fixed/diff/declFileEnums.d.ts.diff | 3 ++- ...arationEmitCommonJsModuleReferencedType.d.ts.diff | 1 + ...onEmitDefaultExportWithStaticAssignment.d.ts.diff | 3 ++- ...ionEmitDestructuringParameterProperties.d.ts.diff | 1 + ...clarationEmitExpandoPropertyPrivateName.d.ts.diff | 1 + ...arationEmitForGlobalishSpecifierSymlink.d.ts.diff | 3 ++- ...rationEmitForGlobalishSpecifierSymlink2.d.ts.diff | 3 ++- ...clarationEmitFunctionDuplicateNamespace.d.ts.diff | 3 ++- .../declarationEmitFunctionKeywordProp.d.ts.diff | 3 ++- .../declarationEmitLateBoundAssignments.d.ts.diff | 3 ++- .../declarationEmitLateBoundAssignments2.d.ts.diff | 3 ++- ...larationEmitObjectAssignedDefaultExport.d.ts.diff | 1 + ...clarationEmitReexportedSymlinkReference.d.ts.diff | 3 ++- ...larationEmitReexportedSymlinkReference2.d.ts.diff | 3 ++- ...larationEmitReexportedSymlinkReference3.d.ts.diff | 1 + ...rationEmitWithInvalidPackageJsonTypings.d.ts.diff | 3 ++- .../auto-fixed/diff/declarationFiles.d.ts.diff | 5 +++-- .../diff/declarationInAmbientContext.d.ts.diff | 3 ++- .../diff/declarationWithNoInitializer.d.ts.diff | 1 + .../destructuringParameterDeclaration6.d.ts.diff | 1 + .../diff/destructuringParameterProperties1.d.ts.diff | 1 + .../diff/destructuringParameterProperties2.d.ts.diff | 1 + .../diff/destructuringParameterProperties3.d.ts.diff | 1 + .../diff/destructuringParameterProperties4.d.ts.diff | 1 + .../diff/destructuringParameterProperties5.d.ts.diff | 1 + .../diff/disallowLineTerminatorBeforeArrow.d.ts.diff | 1 + .../diff/duplicateObjectLiteralProperty.d.ts.diff | 1 + .../auto-fixed/diff/enumAssignmentCompat5.d.ts.diff | 1 + .../auto-fixed/diff/enumBasics.d.ts.diff | 3 ++- .../auto-fixed/diff/enumBasics2.d.ts.diff | 1 + .../auto-fixed/diff/enumBasics3.d.ts.diff | 1 + .../auto-fixed/diff/enumClassification.d.ts.diff | 3 ++- .../diff/enumConstantMemberWithString.d.ts.diff | 1 + ...ConstantMemberWithStringEmitDeclaration.d.ts.diff | 3 ++- .../enumConstantMemberWithTemplateLiterals.d.ts.diff | 1 + ...mberWithTemplateLiteralsEmitDeclaration.d.ts.diff | 3 ++- .../auto-fixed/diff/enumConstantMembers.d.ts.diff | 1 + ...umErrorOnConstantBindingWithInitializer.d.ts.diff | 1 + .../auto-fixed/diff/enumExportMergingES6.d.ts.diff | 3 ++- .../enumLiteralAssignableToEnumInsideUnion.d.ts.diff | 1 + .../auto-fixed/diff/enumMerging.d.ts.diff | 3 ++- .../auto-fixed/diff/enumMergingErrors.d.ts.diff | 1 + .../auto-fixed/diff/enumNumbering1.d.ts.diff | 3 ++- .../enumPropertyAccessBeforeInitalisation.d.ts.diff | 1 + .../auto-fixed/diff/enumWithComputedMember.d.ts.diff | 1 + .../auto-fixed/diff/enumWithExport.d.ts.diff | 1 + .../diff/enumWithParenthesizedInitializer1.d.ts.diff | 1 + ...umWithoutInitializerAfterComputedMember.d.ts.diff | 3 ++- .../auto-fixed/diff/equalityWithEnumTypes.d.ts.diff | 1 + .../diff/exactSpellingSuggestion.d.ts.diff | 1 + ...expandoFunctionContextualTypesJSDocInTs.d.ts.diff | 3 ++- .../expandoFunctionContextualTypesNoValue.d.ts.diff | 1 + ...andoFunctionExpressionsWithDynamicNames.d.ts.diff | 3 ++- .../auto-fixed/diff/exportAssignDottedName.d.ts.diff | 3 ++- .../diff/exportAssignNonIdentifier.d.ts.diff | 1 + .../exportAssignmentWithoutIdentifier1.d.ts.diff | 3 ++- .../auto-fixed/diff/exportDefaultNamespace.d.ts.diff | 3 ++- .../auto-fixed/diff/exportEqualsProperty.d.ts.diff | 3 ++- .../auto-fixed/diff/exportEqualsProperty2.d.ts.diff | 3 ++- .../auto-fixed/diff/forwardRefInEnum.d.ts.diff | 1 + .../diff/functionImplementations.d.ts.diff | 1 + .../diff/initializersInAmbientEnums.d.ts.diff | 3 ++- ...isolatedModulesGlobalNamespacesAndEnums.d.ts.diff | 1 + .../diff/jsContainerMergeTsDeclaration.d.ts.diff | 1 + .../auto-fixed/diff/jsxComponentTypeErrors.d.ts.diff | 1 + .../jsxNamespaceImplicitImportJSXNamespace.d.ts.diff | 3 ++- ...ConfigPickedOverGlobalOne(jsx=preserve).d.ts.diff | 3 ++- ...onfigPickedOverGlobalOne(jsx=react-jsx).d.ts.diff | 3 ++- ...XNamespaceFromPragmaPickedOverGlobalOne.d.ts.diff | 3 ++- ...undFunctionMemberAssignmentDeclarations.d.ts.diff | 3 ++- ...lesExportsSpecifierGenerationConditions.d.ts.diff | 3 ++- .../auto-fixed/diff/mergedDeclarations2.d.ts.diff | 1 + .../diff/mergedEnumDeclarationCodeGen.d.ts.diff | 3 ++- .../diff/methodContainingLocalFunction.d.ts.diff | 3 ++- .../diff/mixedTypeEnumComparison.d.ts.diff | 3 ++- .../moduleAugmentationDisallowedExtensions.d.ts.diff | 1 + .../diff/moduleAugmentationNoNewNames.d.ts.diff | 3 ++- .../diff/negateOperatorInvalidOperations.d.ts.diff | 1 + .../auto-fixed/diff/newTargetNarrowing.d.ts.diff | 3 ++- ...oImplicitAnyDestructuringVarDeclaration.d.ts.diff | 1 + .../diff/nodeModuleReexportFromDottedPath.d.ts.diff | 3 ++- ...locksSpecifierResolution(module=node16).d.ts.diff | 3 ++- ...cksSpecifierResolution(module=nodenext).d.ts.diff | 3 ++- ...deModulesExportsSourceTs(module=node16).d.ts.diff | 2 +- ...ModulesExportsSourceTs(module=nodenext).d.ts.diff | 2 +- ...fierGenerationConditions(module=node16).d.ts.diff | 3 ++- ...erGenerationConditions(module=nodenext).d.ts.diff | 3 ++- ...ifierGenerationDirectory(module=node16).d.ts.diff | 3 ++- ...ierGenerationDirectory(module=nodenext).d.ts.diff | 3 ++- ...ecifierGenerationPattern(module=node16).d.ts.diff | 3 ++- ...ifierGenerationPattern(module=nodenext).d.ts.diff | 3 ++- .../auto-fixed/diff/nullPropertyName.d.ts.diff | 3 ++- .../auto-fixed/diff/numericEnumMappedType.d.ts.diff | 3 ++- .../diff/objectLiteralGettersAndSetters.d.ts.diff | 3 ++- .../overloadingStaticFunctionsInFunctions.d.ts.diff | 1 + ...ser.asyncGenerators.classMethods.es2018.d.ts.diff | 1 + ...cGenerators.objectLiteralMethods.es2018.d.ts.diff | 1 + .../auto-fixed/diff/parserEnum1.d.ts.diff | 3 ++- .../auto-fixed/diff/parserEnum2.d.ts.diff | 3 ++- .../auto-fixed/diff/parserEnumDeclaration6.d.ts.diff | 3 ++- .../parserEqualsGreaterThanAfterFunction1.d.ts.diff | 1 + .../parserEqualsGreaterThanAfterFunction2.d.ts.diff | 1 + .../parserErrorRecovery_ParameterList1.d.ts.diff | 1 + .../parserErrorRecovery_ParameterList2.d.ts.diff | 1 + ...rserNoASIOnCallAfterFunctionExpression1.d.ts.diff | 1 + .../auto-fixed/diff/parserRealSource10.d.ts.diff | 1 + .../auto-fixed/diff/parserRealSource14.d.ts.diff | 1 + .../auto-fixed/diff/parserRealSource2.d.ts.diff | 1 + .../auto-fixed/diff/parserRealSource3.d.ts.diff | 1 + .../auto-fixed/diff/parserSkippedTokens16.d.ts.diff | 1 + .../auto-fixed/diff/parserStrictMode8.d.ts.diff | 1 + .../auto-fixed/diff/preserveConstEnums.d.ts.diff | 3 ++- .../diff/propertyAssignmentUseParentType3.d.ts.diff | 3 ++- .../diff/reexportClassDefinition.d.ts.diff | 3 ++- .../auto-fixed/diff/reservedWords3.d.ts.diff | 1 + .../auto-fixed/diff/staticsInAFunction.d.ts.diff | 1 + .../diff/strictModeOctalLiterals.d.ts.diff | 1 + .../diff/symbolDeclarationEmit12.d.ts.diff | 5 +++-- ...LinkDeclarationEmitModuleNamesImportRef.d.ts.diff | 3 ++- .../auto-fixed/diff/templateLiteralTypes4.d.ts.diff | 6 +++--- .../templateStringInFunctionParameterType.d.ts.diff | 1 + ...emplateStringInFunctionParameterTypeES6.d.ts.diff | 1 + .../templateStringWithEmbeddedYieldKeyword.d.ts.diff | 1 + .../thisInInvalidContextsExternalModule.d.ts.diff | 1 + .../diff/thisInPropertyBoundDeclarations.d.ts.diff | 1 + .../this_inside-enum-should-not-be-allowed.d.ts.diff | 1 + .../diff/twoAccessorsWithSameName.d.ts.diff | 1 + .../diff/typeFromPropertyAssignment29.d.ts.diff | 12 ++++++------ .../diff/typeFromPropertyAssignment31.d.ts.diff | 1 + .../diff/typeFromPropertyAssignment32.d.ts.diff | 1 + .../diff/typeFromPropertyAssignment33.d.ts.diff | 1 + .../diff/typeFromPropertyAssignment36.d.ts.diff | 1 + .../diff/typeFromPropertyAssignment38.d.ts.diff | 3 ++- .../typesVersionsDeclarationEmit.multiFile.d.ts.diff | 5 +++-- ...rationEmit.multiFileBackReferenceToSelf.d.ts.diff | 5 +++-- ...onEmit.multiFileBackReferenceToUnmapped.d.ts.diff | 5 +++-- .../diff/underscoreEscapedNameInEnum.d.ts.diff | 3 ++- .../verbatimModuleSyntaxConstEnumUsage.d.ts.diff | 3 ++- .../auto-fixed/diff/wellKnownSymbolExpando.d.ts.diff | 3 ++- .../dte/FunctionPropertyAssignments3_es6.d.ts | 1 + .../dte/FunctionPropertyAssignments5_es6.d.ts | 1 + .../dte/MemberFunctionDeclaration5_es6.d.ts | 1 + .../dte/MemberFunctionDeclaration6_es6.d.ts | 1 + .../auto-fixed/dte/ambientEnum1.d.ts | 1 + .../auto-fixed/dte/ambientEnumDeclaration1.d.ts | 1 + .../auto-fixed/dte/ambientErrors.d.ts | 1 + .../arrayFakeFlatNoCrashInferenceDeclarations.d.ts | 1 + .../auto-fixed/dte/arrowFunctionContexts.d.ts | 1 + .../dte/classMemberWithMissingIdentifier.d.ts | 1 + .../dte/classMemberWithMissingIdentifier2.d.ts | 1 + .../collisionCodeGenEnumWithEnumMemberConflict.d.ts | 1 + .../auto-fixed/dte/commonMissingSemicolons.d.ts | 1 + .../auto-fixed/dte/computedEnumTypeWidening.d.ts | 1 + .../auto-fixed/dte/computedPropertyNames10_ES5.d.ts | 1 + .../auto-fixed/dte/computedPropertyNames10_ES6.d.ts | 1 + .../auto-fixed/dte/constEnum1.d.ts | 1 + .../auto-fixed/dte/constEnum2.d.ts | 1 + .../auto-fixed/dte/constEnumDeclarations.d.ts | 1 + .../auto-fixed/dte/constEnumErrors.d.ts | 1 + .../constEnumNamespaceReferenceCausesNoImport2.d.ts | 1 + .../auto-fixed/dte/constEnumPropertyAccess1.d.ts | 1 + .../auto-fixed/dte/constEnumPropertyAccess2.d.ts | 1 + .../auto-fixed/dte/constEnumPropertyAccess3.d.ts | 1 + .../auto-fixed/dte/constEnums.d.ts | 1 + .../auto-fixed/dte/constantEnumAssert.d.ts | 1 + .../dte/constructorWithIncompleteTypeAnnotation.d.ts | 1 + .../auto-fixed/dte/declFileEnums.d.ts | 1 + .../declarationEmitCommonJsModuleReferencedType.d.ts | 1 + ...arationEmitDefaultExportWithStaticAssignment.d.ts | 1 + ...larationEmitDestructuringParameterProperties.d.ts | 1 + .../declarationEmitExpandoPropertyPrivateName.d.ts | 1 + .../declarationEmitForGlobalishSpecifierSymlink.d.ts | 1 + ...declarationEmitForGlobalishSpecifierSymlink2.d.ts | 1 + .../declarationEmitFunctionDuplicateNamespace.d.ts | 1 + .../dte/declarationEmitFunctionKeywordProp.d.ts | 1 + .../dte/declarationEmitLateBoundAssignments.d.ts | 1 + .../dte/declarationEmitLateBoundAssignments2.d.ts | 1 + .../declarationEmitObjectAssignedDefaultExport.d.ts | 1 + .../declarationEmitReexportedSymlinkReference.d.ts | 1 + .../declarationEmitReexportedSymlinkReference2.d.ts | 1 + .../declarationEmitReexportedSymlinkReference3.d.ts | 1 + ...declarationEmitWithInvalidPackageJsonTypings.d.ts | 1 + .../auto-fixed/dte/declarationFiles.d.ts | 1 + .../auto-fixed/dte/declarationInAmbientContext.d.ts | 1 + .../auto-fixed/dte/declarationWithNoInitializer.d.ts | 1 + .../dte/destructuringParameterDeclaration6.d.ts | 1 + .../dte/destructuringParameterProperties1.d.ts | 1 + .../dte/destructuringParameterProperties2.d.ts | 1 + .../dte/destructuringParameterProperties3.d.ts | 1 + .../dte/destructuringParameterProperties4.d.ts | 1 + .../dte/destructuringParameterProperties5.d.ts | 1 + .../dte/disallowLineTerminatorBeforeArrow.d.ts | 1 + .../dte/duplicateObjectLiteralProperty.d.ts | 1 + .../auto-fixed/dte/enumAssignmentCompat5.d.ts | 1 + .../auto-fixed/dte/enumBasics.d.ts | 1 + .../auto-fixed/dte/enumBasics2.d.ts | 1 + .../auto-fixed/dte/enumBasics3.d.ts | 1 + .../auto-fixed/dte/enumClassification.d.ts | 1 + .../auto-fixed/dte/enumConstantMemberWithString.d.ts | 1 + .../enumConstantMemberWithStringEmitDeclaration.d.ts | 1 + .../dte/enumConstantMemberWithTemplateLiterals.d.ts | 1 + ...antMemberWithTemplateLiteralsEmitDeclaration.d.ts | 1 + .../auto-fixed/dte/enumConstantMembers.d.ts | 1 + .../enumErrorOnConstantBindingWithInitializer.d.ts | 1 + .../auto-fixed/dte/enumErrors.d.ts | 1 + .../auto-fixed/dte/enumExportMergingES6.d.ts | 1 + .../dte/enumLiteralAssignableToEnumInsideUnion.d.ts | 1 + .../auto-fixed/dte/enumMerging.d.ts | 1 + .../auto-fixed/dte/enumMergingErrors.d.ts | 1 + .../auto-fixed/dte/enumNumbering1.d.ts | 1 + .../dte/enumPropertyAccessBeforeInitalisation.d.ts | 1 + .../auto-fixed/dte/enumWithComputedMember.d.ts | 1 + .../auto-fixed/dte/enumWithExport.d.ts | 1 + .../dte/enumWithParenthesizedInitializer1.d.ts | 1 + .../enumWithoutInitializerAfterComputedMember.d.ts | 1 + .../auto-fixed/dte/equalityWithEnumTypes.d.ts | 1 + .../auto-fixed/dte/exactSpellingSuggestion.d.ts | 1 + .../dte/expandoFunctionContextualTypesJSDocInTs.d.ts | 1 + .../dte/expandoFunctionContextualTypesNoValue.d.ts | 1 + .../expandoFunctionExpressionsWithDynamicNames.d.ts | 1 + .../auto-fixed/dte/exportAssignDottedName.d.ts | 1 + .../auto-fixed/dte/exportAssignNonIdentifier.d.ts | 1 + .../dte/exportAssignmentWithoutIdentifier1.d.ts | 1 + .../auto-fixed/dte/exportDefaultNamespace.d.ts | 1 + .../auto-fixed/dte/exportEqualsProperty.d.ts | 1 + .../auto-fixed/dte/exportEqualsProperty2.d.ts | 1 + .../auto-fixed/dte/forwardRefInEnum.d.ts | 1 + .../auto-fixed/dte/functionImplementations.d.ts | 1 + .../auto-fixed/dte/initializersInAmbientEnums.d.ts | 1 + .../dte/isolatedModulesGlobalNamespacesAndEnums.d.ts | 1 + .../dte/jsContainerMergeTsDeclaration.d.ts | 1 + .../auto-fixed/dte/jsxComponentTypeErrors.d.ts | 1 + .../dte/jsxNamespaceImplicitImportJSXNamespace.d.ts | 1 + ...eFromConfigPickedOverGlobalOne(jsx=preserve).d.ts | 1 + ...FromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts | 1 + ...ortJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts | 1 + ...ateBoundFunctionMemberAssignmentDeclarations.d.ts | 1 + ...eModulesExportsSpecifierGenerationConditions.d.ts | 1 + .../auto-fixed/dte/mergedDeclarations2.d.ts | 1 + .../auto-fixed/dte/mergedEnumDeclarationCodeGen.d.ts | 1 + .../dte/methodContainingLocalFunction.d.ts | 1 + .../auto-fixed/dte/mixedTypeEnumComparison.d.ts | 1 + .../dte/moduleAugmentationDisallowedExtensions.d.ts | 1 + .../auto-fixed/dte/moduleAugmentationNoNewNames.d.ts | 1 + .../dte/negateOperatorInvalidOperations.d.ts | 1 + .../auto-fixed/dte/newTargetNarrowing.d.ts | 1 + .../noImplicitAnyDestructuringVarDeclaration.d.ts | 1 + .../dte/nodeModuleReexportFromDottedPath.d.ts | 1 + ...ortsBlocksSpecifierResolution(module=node16).d.ts | 1 + ...tsBlocksSpecifierResolution(module=nodenext).d.ts | 1 + .../nodeModulesExportsSourceTs(module=node16).d.ts | 1 + .../nodeModulesExportsSourceTs(module=nodenext).d.ts | 1 + ...SpecifierGenerationConditions(module=node16).d.ts | 1 + ...ecifierGenerationConditions(module=nodenext).d.ts | 1 + ...sSpecifierGenerationDirectory(module=node16).d.ts | 1 + ...pecifierGenerationDirectory(module=nodenext).d.ts | 1 + ...rtsSpecifierGenerationPattern(module=node16).d.ts | 1 + ...sSpecifierGenerationPattern(module=nodenext).d.ts | 1 + .../auto-fixed/dte/nullPropertyName.d.ts | 1 + .../auto-fixed/dte/numericEnumMappedType.d.ts | 1 + .../dte/objectLiteralGettersAndSetters.d.ts | 1 + .../dte/overloadingStaticFunctionsInFunctions.d.ts | 1 + .../parser.asyncGenerators.classMethods.es2018.d.ts | 1 + ....asyncGenerators.objectLiteralMethods.es2018.d.ts | 1 + .../auto-fixed/dte/parserEnum1.d.ts | 1 + .../auto-fixed/dte/parserEnum2.d.ts | 1 + .../auto-fixed/dte/parserEnumDeclaration6.d.ts | 1 + .../dte/parserEqualsGreaterThanAfterFunction1.d.ts | 1 + .../dte/parserEqualsGreaterThanAfterFunction2.d.ts | 1 + .../dte/parserErrorRecovery_ParameterList1.d.ts | 1 + .../dte/parserErrorRecovery_ParameterList2.d.ts | 1 + .../parserNoASIOnCallAfterFunctionExpression1.d.ts | 1 + .../auto-fixed/dte/parserRealSource10.d.ts | 1 + .../auto-fixed/dte/parserRealSource14.d.ts | 1 + .../auto-fixed/dte/parserRealSource2.d.ts | 1 + .../auto-fixed/dte/parserRealSource3.d.ts | 1 + .../auto-fixed/dte/parserSkippedTokens16.d.ts | 1 + .../auto-fixed/dte/parserStrictMode8.d.ts | 1 + .../auto-fixed/dte/preserveConstEnums.d.ts | 1 + .../dte/propertyAssignmentUseParentType3.d.ts | 1 + .../auto-fixed/dte/reexportClassDefinition.d.ts | 1 + .../auto-fixed/dte/reservedWords3.d.ts | 1 + .../auto-fixed/dte/staticsInAFunction.d.ts | 1 + .../auto-fixed/dte/strictModeOctalLiterals.d.ts | 1 + .../auto-fixed/dte/symbolDeclarationEmit12.d.ts | 1 + ...ymbolLinkDeclarationEmitModuleNamesImportRef.d.ts | 1 + .../auto-fixed/dte/templateLiteralTypes4.d.ts | 1 + .../dte/templateStringInFunctionParameterType.d.ts | 1 + .../templateStringInFunctionParameterTypeES6.d.ts | 1 + .../dte/templateStringWithEmbeddedYieldKeyword.d.ts | 1 + .../auto-fixed/dte/thisInInvalidContexts.d.ts | 1 + .../dte/thisInInvalidContextsExternalModule.d.ts | 1 + .../dte/thisInPropertyBoundDeclarations.d.ts | 1 + .../dte/this_inside-enum-should-not-be-allowed.d.ts | 1 + .../auto-fixed/dte/twoAccessorsWithSameName.d.ts | 1 + .../auto-fixed/dte/typeFromPropertyAssignment29.d.ts | 1 + .../auto-fixed/dte/typeFromPropertyAssignment31.d.ts | 1 + .../auto-fixed/dte/typeFromPropertyAssignment32.d.ts | 1 + .../auto-fixed/dte/typeFromPropertyAssignment33.d.ts | 1 + .../auto-fixed/dte/typeFromPropertyAssignment36.d.ts | 1 + .../auto-fixed/dte/typeFromPropertyAssignment38.d.ts | 1 + .../dte/typesVersionsDeclarationEmit.multiFile.d.ts | 3 ++- ...DeclarationEmit.multiFileBackReferenceToSelf.d.ts | 3 ++- ...arationEmit.multiFileBackReferenceToUnmapped.d.ts | 3 ++- .../auto-fixed/dte/underscoreEscapedNameInEnum.d.ts | 1 + .../dte/verbatimModuleSyntaxConstEnumUsage.d.ts | 1 + .../auto-fixed/dte/wellKnownSymbolExpando.d.ts | 1 + .../tsc/FunctionPropertyAssignments3_es6.d.ts | 1 + .../tsc/FunctionPropertyAssignments5_es6.d.ts | 1 + .../tsc/MemberFunctionDeclaration5_es6.d.ts | 1 + .../tsc/MemberFunctionDeclaration6_es6.d.ts | 1 + .../auto-fixed/tsc/ambientEnum1.d.ts | 1 + .../auto-fixed/tsc/ambientErrors.d.ts | 1 + .../arrayFakeFlatNoCrashInferenceDeclarations.d.ts | 1 + .../auto-fixed/tsc/arrowFunctionContexts.d.ts | 1 + .../tsc/classMemberWithMissingIdentifier.d.ts | 1 + .../tsc/classMemberWithMissingIdentifier2.d.ts | 1 + .../auto-fixed/tsc/commonMissingSemicolons.d.ts | 1 + .../auto-fixed/tsc/constEnum2.d.ts | 1 + .../auto-fixed/tsc/constEnumErrors.d.ts | 1 + .../auto-fixed/tsc/constEnumPropertyAccess1.d.ts | 1 + .../auto-fixed/tsc/constEnumPropertyAccess2.d.ts | 1 + .../auto-fixed/tsc/constantEnumAssert.d.ts | 1 + .../tsc/constructorWithIncompleteTypeAnnotation.d.ts | 1 + .../declarationEmitCommonJsModuleReferencedType.d.ts | 1 + ...larationEmitDestructuringParameterProperties.d.ts | 1 + .../declarationEmitExpandoPropertyPrivateName.d.ts | 1 + .../declarationEmitObjectAssignedDefaultExport.d.ts | 1 + .../declarationEmitReexportedSymlinkReference3.d.ts | 1 + .../auto-fixed/tsc/declarationFiles.d.ts | 1 + .../auto-fixed/tsc/declarationWithNoInitializer.d.ts | 1 + .../tsc/destructuringParameterDeclaration6.d.ts | 1 + .../tsc/destructuringParameterProperties1.d.ts | 1 + .../tsc/destructuringParameterProperties2.d.ts | 1 + .../tsc/destructuringParameterProperties3.d.ts | 1 + .../tsc/destructuringParameterProperties4.d.ts | 1 + .../tsc/destructuringParameterProperties5.d.ts | 1 + .../tsc/disallowLineTerminatorBeforeArrow.d.ts | 1 + .../tsc/duplicateObjectLiteralProperty.d.ts | 1 + .../auto-fixed/tsc/enumAssignmentCompat5.d.ts | 1 + .../auto-fixed/tsc/enumBasics2.d.ts | 1 + .../auto-fixed/tsc/enumBasics3.d.ts | 1 + .../auto-fixed/tsc/enumConstantMemberWithString.d.ts | 1 + .../tsc/enumConstantMemberWithTemplateLiterals.d.ts | 1 + .../auto-fixed/tsc/enumConstantMembers.d.ts | 1 + .../enumErrorOnConstantBindingWithInitializer.d.ts | 1 + .../auto-fixed/tsc/enumErrors.d.ts | 1 + .../tsc/enumLiteralAssignableToEnumInsideUnion.d.ts | 1 + .../auto-fixed/tsc/enumMergingErrors.d.ts | 1 + .../tsc/enumPropertyAccessBeforeInitalisation.d.ts | 1 + .../auto-fixed/tsc/enumWithComputedMember.d.ts | 1 + .../auto-fixed/tsc/enumWithExport.d.ts | 1 + .../tsc/enumWithParenthesizedInitializer1.d.ts | 1 + .../auto-fixed/tsc/equalityWithEnumTypes.d.ts | 1 + .../auto-fixed/tsc/exactSpellingSuggestion.d.ts | 1 + .../tsc/expandoFunctionContextualTypesNoValue.d.ts | 1 + .../auto-fixed/tsc/exportAssignNonIdentifier.d.ts | 1 + .../auto-fixed/tsc/forwardRefInEnum.d.ts | 1 + .../auto-fixed/tsc/functionImplementations.d.ts | 1 + .../tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts | 1 + .../tsc/jsContainerMergeTsDeclaration.d.ts | 1 + .../auto-fixed/tsc/jsxComponentTypeErrors.d.ts | 1 + .../auto-fixed/tsc/mergedDeclarations2.d.ts | 1 + .../tsc/moduleAugmentationDisallowedExtensions.d.ts | 1 + .../tsc/negateOperatorInvalidOperations.d.ts | 1 + .../noImplicitAnyDestructuringVarDeclaration.d.ts | 1 + ...ortsBlocksSpecifierResolution(module=node16).d.ts | 1 + ...tsBlocksSpecifierResolution(module=nodenext).d.ts | 1 + .../nodeModulesExportsSourceTs(module=node16).d.ts | 1 + .../nodeModulesExportsSourceTs(module=nodenext).d.ts | 1 + ...SpecifierGenerationConditions(module=node16).d.ts | 1 + ...ecifierGenerationConditions(module=nodenext).d.ts | 1 + ...sSpecifierGenerationDirectory(module=node16).d.ts | 1 + ...pecifierGenerationDirectory(module=nodenext).d.ts | 1 + ...rtsSpecifierGenerationPattern(module=node16).d.ts | 1 + ...sSpecifierGenerationPattern(module=nodenext).d.ts | 1 + .../tsc/overloadingStaticFunctionsInFunctions.d.ts | 1 + .../parser.asyncGenerators.classMethods.es2018.d.ts | 1 + ....asyncGenerators.objectLiteralMethods.es2018.d.ts | 1 + .../tsc/parserEqualsGreaterThanAfterFunction1.d.ts | 1 + .../tsc/parserEqualsGreaterThanAfterFunction2.d.ts | 1 + .../tsc/parserErrorRecovery_ParameterList1.d.ts | 1 + .../tsc/parserErrorRecovery_ParameterList2.d.ts | 1 + .../parserNoASIOnCallAfterFunctionExpression1.d.ts | 1 + .../auto-fixed/tsc/parserRealSource10.d.ts | 1 + .../auto-fixed/tsc/parserRealSource14.d.ts | 1 + .../auto-fixed/tsc/parserRealSource2.d.ts | 1 + .../auto-fixed/tsc/parserRealSource3.d.ts | 1 + .../auto-fixed/tsc/parserSkippedTokens16.d.ts | 1 + .../auto-fixed/tsc/parserStrictMode8.d.ts | 1 + .../auto-fixed/tsc/reservedWords3.d.ts | 1 + .../auto-fixed/tsc/staticsInAFunction.d.ts | 1 + .../auto-fixed/tsc/strictModeOctalLiterals.d.ts | 1 + .../auto-fixed/tsc/symbolDeclarationEmit12.d.ts | 1 + .../auto-fixed/tsc/templateLiteralTypes4.d.ts | 1 + .../tsc/templateStringInFunctionParameterType.d.ts | 1 + .../templateStringInFunctionParameterTypeES6.d.ts | 1 + .../tsc/templateStringWithEmbeddedYieldKeyword.d.ts | 1 + .../auto-fixed/tsc/thisInInvalidContexts.d.ts | 1 + .../tsc/thisInInvalidContextsExternalModule.d.ts | 1 + .../tsc/thisInPropertyBoundDeclarations.d.ts | 1 + .../tsc/this_inside-enum-should-not-be-allowed.d.ts | 1 + .../auto-fixed/tsc/twoAccessorsWithSameName.d.ts | 1 + .../auto-fixed/tsc/typeFromPropertyAssignment29.d.ts | 1 + .../auto-fixed/tsc/typeFromPropertyAssignment31.d.ts | 1 + .../auto-fixed/tsc/typeFromPropertyAssignment32.d.ts | 1 + .../auto-fixed/tsc/typeFromPropertyAssignment33.d.ts | 1 + .../auto-fixed/tsc/typeFromPropertyAssignment36.d.ts | 1 + .../tsc/typesVersionsDeclarationEmit.multiFile.d.ts | 2 +- ...DeclarationEmit.multiFileBackReferenceToSelf.d.ts | 3 ++- ...arationEmit.multiFileBackReferenceToUnmapped.d.ts | 2 +- .../original/diff/ES5SymbolProperty1.d.ts.diff | 3 ++- .../original/diff/FunctionDeclaration8_es6.d.ts.diff | 4 ++-- .../diff/asyncFunctionDeclaration8_es2017.d.ts.diff | 4 ++-- .../diff/asyncFunctionDeclaration8_es5.d.ts.diff | 4 ++-- .../diff/asyncFunctionDeclaration8_es6.d.ts.diff | 4 ++-- .../original/diff/bigintIndex.d.ts.diff | 1 + .../diff/computedPropertiesNarrowed.d.ts.diff | 1 + .../diff/computedPropertyNames12_ES5.d.ts.diff | 6 +++--- .../diff/computedPropertyNames12_ES6.d.ts.diff | 6 +++--- .../diff/computedPropertyNames16_ES5.d.ts.diff | 6 +++--- .../diff/computedPropertyNames16_ES6.d.ts.diff | 6 +++--- .../diff/computedPropertyNames2_ES5.d.ts.diff | 4 ++-- .../diff/computedPropertyNames2_ES6.d.ts.diff | 4 ++-- .../diff/computedPropertyNames4_ES5.d.ts.diff | 6 +++--- .../diff/computedPropertyNames4_ES6.d.ts.diff | 6 +++--- .../diff/computedPropertyNames5_ES5.d.ts.diff | 6 +++--- .../diff/computedPropertyNames5_ES6.d.ts.diff | 6 +++--- .../diff/computedPropertyNames6_ES5.d.ts.diff | 3 ++- .../diff/computedPropertyNames6_ES6.d.ts.diff | 3 ++- .../computedPropertyNamesOnOverloads_ES5.d.ts.diff | 5 +++-- .../computedPropertyNamesOnOverloads_ES6.d.ts.diff | 5 +++-- ...computedPropertyNamesWithStaticProperty.d.ts.diff | 4 ++-- .../original/diff/constEnum2.d.ts.diff | 1 + .../original/diff/constEnumErrors.d.ts.diff | 1 + .../diff/contextualReturnTypeOfIIFE2.d.ts.diff | 3 ++- ...mportingModuleAugmentationRetainsImport.d.ts.diff | 1 + ...eclarationEmitHasTypesRefOnNamespaceUse.d.ts.diff | 3 ++- .../declarationFilesWithTypeReferences2.d.ts.diff | 3 ++- .../original/diff/enumBasics2.d.ts.diff | 1 + .../original/diff/enumConstantMembers.d.ts.diff | 7 ++++--- .../original/diff/enumExportMergingES6.d.ts.diff | 1 + ...andoFunctionExpressionsWithDynamicNames.d.ts.diff | 1 + .../original/diff/forwardRefInEnum.d.ts.diff | 1 + .../indexTypeNoSubstitutionTemplateLiteral.d.ts.diff | 1 + .../original/diff/indexWithoutParamType2.d.ts.diff | 1 + .../diff/mergedEnumDeclarationCodeGen.d.ts.diff | 1 + ...lutionWithSuffixes_one_externalTSModule.d.ts.diff | 3 ++- .../diff/parserComputedPropertyName1.d.ts.diff | 4 ++-- .../diff/parserComputedPropertyName10.d.ts.diff | 4 ++-- .../diff/parserComputedPropertyName13.d.ts.diff | 2 +- .../diff/parserComputedPropertyName14.d.ts.diff | 2 +- .../diff/parserComputedPropertyName15.d.ts.diff | 2 +- .../diff/parserComputedPropertyName18.d.ts.diff | 2 +- .../diff/parserComputedPropertyName19.d.ts.diff | 2 +- .../diff/parserComputedPropertyName2.d.ts.diff | 3 ++- .../diff/parserComputedPropertyName20.d.ts.diff | 2 +- .../diff/parserComputedPropertyName21.d.ts.diff | 2 +- .../diff/parserComputedPropertyName22.d.ts.diff | 4 ++-- .../diff/parserComputedPropertyName23.d.ts.diff | 4 ++-- .../diff/parserComputedPropertyName24.d.ts.diff | 4 ++-- .../diff/parserComputedPropertyName25.d.ts.diff | 4 ++-- .../diff/parserComputedPropertyName27.d.ts.diff | 4 ++-- .../diff/parserComputedPropertyName28.d.ts.diff | 4 ++-- .../diff/parserComputedPropertyName29.d.ts.diff | 6 +++--- .../diff/parserComputedPropertyName31.d.ts.diff | 4 ++-- .../diff/parserComputedPropertyName32.d.ts.diff | 4 ++-- .../diff/parserComputedPropertyName33.d.ts.diff | 4 ++-- .../diff/parserComputedPropertyName36.d.ts.diff | 4 ++-- .../diff/parserComputedPropertyName37.d.ts.diff | 3 ++- .../diff/parserComputedPropertyName6.d.ts.diff | 4 ++-- .../diff/parserComputedPropertyName9.d.ts.diff | 4 ++-- .../diff/parserES5ComputedPropertyName1.d.ts.diff | 4 ++-- .../diff/parserES5ComputedPropertyName10.d.ts.diff | 4 ++-- .../diff/parserES5ComputedPropertyName2.d.ts.diff | 3 ++- .../diff/parserES5ComputedPropertyName5.d.ts.diff | 2 +- .../diff/parserES5ComputedPropertyName8.d.ts.diff | 2 +- .../diff/parserES5ComputedPropertyName9.d.ts.diff | 4 ++-- .../original/diff/parserES5SymbolProperty1.d.ts.diff | 2 +- .../original/diff/parserES5SymbolProperty2.d.ts.diff | 2 +- .../original/diff/parserES5SymbolProperty3.d.ts.diff | 4 ++-- .../original/diff/parserES5SymbolProperty4.d.ts.diff | 4 ++-- .../original/diff/parserES5SymbolProperty5.d.ts.diff | 4 ++-- .../original/diff/parserES5SymbolProperty6.d.ts.diff | 4 ++-- .../original/diff/parserES5SymbolProperty7.d.ts.diff | 4 ++-- .../original/diff/parserES5SymbolProperty8.d.ts.diff | 2 +- .../original/diff/parserES5SymbolProperty9.d.ts.diff | 2 +- .../original/diff/parserIndexSignature11.d.ts.diff | 2 +- .../original/diff/parserIndexSignature5.d.ts.diff | 2 +- .../original/diff/parserStrictMode8.d.ts.diff | 3 ++- .../original/diff/parserSymbolIndexer5.d.ts.diff | 6 +++--- .../original/diff/privateIndexer2.d.ts.diff | 6 +++--- ...onflicts(usedefineforclassfields=false).d.ts.diff | 6 +++--- ...Conflicts(usedefineforclassfields=true).d.ts.diff | 6 +++--- .../original/diff/symbolDeclarationEmit12.d.ts.diff | 5 +++-- .../original/diff/symbolProperty1.d.ts.diff | 4 ++-- .../original/diff/symbolProperty2.d.ts.diff | 4 ++-- .../original/diff/symbolProperty3.d.ts.diff | 2 +- .../original/diff/symbolProperty52.d.ts.diff | 3 ++- .../original/diff/symbolProperty53.d.ts.diff | 3 ++- .../original/diff/symbolProperty54.d.ts.diff | 3 ++- .../original/diff/symbolProperty58.d.ts.diff | 3 ++- .../original/diff/symbolProperty59.d.ts.diff | 2 +- .../diff/typeFromPropertyAssignment36.d.ts.diff | 4 ++-- .../diff/typeReferenceDirectives11.d.ts.diff | 1 + .../original/diff/typeReferenceDirectives2.d.ts.diff | 3 ++- .../original/diff/typeReferenceDirectives8.d.ts.diff | 1 + .../diff/typeUsedAsTypeLiteralIndex.d.ts.diff | 1 + .../original/dte/FunctionDeclaration8_es6.d.ts | 1 + .../dte/asyncFunctionDeclaration8_es2017.d.ts | 1 + .../original/dte/asyncFunctionDeclaration8_es5.d.ts | 1 + .../original/dte/asyncFunctionDeclaration8_es6.d.ts | 1 + .../original/dte/bigintIndex.d.ts | 1 + .../original/dte/complicatedPrivacy.d.ts | 1 + .../original/dte/computedPropertiesNarrowed.d.ts | 1 + .../original/dte/computedPropertyNames12_ES5.d.ts | 1 + .../original/dte/computedPropertyNames12_ES6.d.ts | 1 + .../original/dte/computedPropertyNames16_ES5.d.ts | 1 + .../original/dte/computedPropertyNames16_ES6.d.ts | 1 + .../original/dte/computedPropertyNames2_ES5.d.ts | 1 + .../original/dte/computedPropertyNames2_ES6.d.ts | 1 + .../original/dte/computedPropertyNames4_ES5.d.ts | 1 + .../original/dte/computedPropertyNames4_ES6.d.ts | 1 + .../original/dte/computedPropertyNames5_ES5.d.ts | 1 + .../original/dte/computedPropertyNames5_ES6.d.ts | 1 + .../original/dte/computedPropertyNames6_ES5.d.ts | 1 + .../original/dte/computedPropertyNames6_ES6.d.ts | 1 + .../dte/computedPropertyNamesOnOverloads_ES5.d.ts | 1 + .../dte/computedPropertyNamesOnOverloads_ES6.d.ts | 1 + .../dte/computedPropertyNamesWithStaticProperty.d.ts | 1 + .../original/dte/constEnum2.d.ts | 1 + .../original/dte/constEnumErrors.d.ts | 1 + .../original/dte/constEnums.d.ts | 1 + ...duleImportingModuleAugmentationRetainsImport.d.ts | 1 + .../dte/declarationEmitLateBoundAssignments2.d.ts | 1 + .../original/dte/decoratorsOnComputedProperties.d.ts | 1 + .../original/dte/enumBasics2.d.ts | 1 + .../original/dte/enumBasics3.d.ts | 1 + .../original/dte/enumConstantMembers.d.ts | 1 + .../original/dte/enumErrors.d.ts | 1 + .../original/dte/enumExportMergingES6.d.ts | 1 + .../expandoFunctionExpressionsWithDynamicNames.d.ts | 1 + .../original/dte/forwardRefInEnum.d.ts | 1 + .../isolated-declarations/original/dte/giant.d.ts | 1 + .../dte/indexSignatureMustHaveTypeAnnotation.d.ts | 1 + .../dte/indexTypeNoSubstitutionTemplateLiteral.d.ts | 1 + .../original/dte/indexWithoutParamType2.d.ts | 1 + .../original/dte/intTypeCheck.d.ts | 1 + ...TaggedTemplateEscapeSequences(target=es2015).d.ts | 1 + ...lidTaggedTemplateEscapeSequences(target=es5).d.ts | 1 + ...TaggedTemplateEscapeSequences(target=esnext).d.ts | 1 + .../dte/isolatedModulesGlobalNamespacesAndEnums.d.ts | 1 + .../original/dte/mergedDeclarations2.d.ts | 1 + .../original/dte/mergedEnumDeclarationCodeGen.d.ts | 1 + .../original/dte/overloadsWithComputedNames.d.ts | 1 + .../original/dte/parseBigInt.d.ts | 1 + .../original/dte/parserComputedPropertyName1.d.ts | 1 + .../original/dte/parserComputedPropertyName10.d.ts | 1 + .../original/dte/parserComputedPropertyName13.d.ts | 1 + .../original/dte/parserComputedPropertyName14.d.ts | 1 + .../original/dte/parserComputedPropertyName15.d.ts | 1 + .../original/dte/parserComputedPropertyName18.d.ts | 1 + .../original/dte/parserComputedPropertyName19.d.ts | 1 + .../original/dte/parserComputedPropertyName2.d.ts | 1 + .../original/dte/parserComputedPropertyName20.d.ts | 1 + .../original/dte/parserComputedPropertyName21.d.ts | 1 + .../original/dte/parserComputedPropertyName22.d.ts | 1 + .../original/dte/parserComputedPropertyName23.d.ts | 1 + .../original/dte/parserComputedPropertyName24.d.ts | 1 + .../original/dte/parserComputedPropertyName25.d.ts | 1 + .../original/dte/parserComputedPropertyName27.d.ts | 1 + .../original/dte/parserComputedPropertyName28.d.ts | 1 + .../original/dte/parserComputedPropertyName29.d.ts | 1 + .../original/dte/parserComputedPropertyName31.d.ts | 1 + .../original/dte/parserComputedPropertyName32.d.ts | 1 + .../original/dte/parserComputedPropertyName33.d.ts | 1 + .../original/dte/parserComputedPropertyName36.d.ts | 1 + .../original/dte/parserComputedPropertyName37.d.ts | 1 + .../original/dte/parserComputedPropertyName6.d.ts | 1 + .../original/dte/parserComputedPropertyName9.d.ts | 1 + .../original/dte/parserES5ComputedPropertyName1.d.ts | 1 + .../dte/parserES5ComputedPropertyName10.d.ts | 1 + .../original/dte/parserES5ComputedPropertyName2.d.ts | 1 + .../original/dte/parserES5ComputedPropertyName5.d.ts | 1 + .../original/dte/parserES5ComputedPropertyName8.d.ts | 1 + .../original/dte/parserES5ComputedPropertyName9.d.ts | 1 + .../original/dte/parserES5SymbolProperty1.d.ts | 1 + .../original/dte/parserES5SymbolProperty2.d.ts | 1 + .../original/dte/parserES5SymbolProperty3.d.ts | 1 + .../original/dte/parserES5SymbolProperty4.d.ts | 1 + .../original/dte/parserES5SymbolProperty5.d.ts | 1 + .../original/dte/parserES5SymbolProperty6.d.ts | 1 + .../original/dte/parserES5SymbolProperty7.d.ts | 1 + .../original/dte/parserES5SymbolProperty8.d.ts | 1 + .../original/dte/parserES5SymbolProperty9.d.ts | 1 + .../original/dte/parserIndexSignature11.d.ts | 1 + .../original/dte/parserIndexSignature5.d.ts | 1 + .../original/dte/parserStrictMode8.d.ts | 1 + .../original/dte/parserSymbolIndexer5.d.ts | 1 + .../original/dte/privateIndexer2.d.ts | 1 + .../original/dte/propertyAssignment.d.ts | 1 + ...NameConflicts(usedefineforclassfields=false).d.ts | 1 + ...yNameConflicts(usedefineforclassfields=true).d.ts | 1 + .../original/dte/symbolDeclarationEmit12.d.ts | 1 + .../original/dte/symbolProperty1.d.ts | 1 + .../original/dte/symbolProperty2.d.ts | 1 + .../original/dte/symbolProperty3.d.ts | 1 + .../original/dte/symbolProperty52.d.ts | 1 + .../original/dte/symbolProperty53.d.ts | 1 + .../original/dte/symbolProperty54.d.ts | 1 + .../original/dte/symbolProperty59.d.ts | 1 + .../original/dte/templateLiteralTypes4.d.ts | 1 + .../original/dte/typeFromPropertyAssignment36.d.ts | 1 + .../original/dte/typeReferenceDirectives11.d.ts | 1 + .../original/dte/typeReferenceDirectives8.d.ts | 1 + .../original/dte/typeUsedAsTypeLiteralIndex.d.ts | 1 + .../dte/verbatimModuleSyntaxConstEnumUsage.d.ts | 1 + .../original/tsc/ES5SymbolProperty1.d.ts | 1 + .../original/tsc/FunctionDeclaration8_es6.d.ts | 1 + .../tsc/asyncFunctionDeclaration8_es2017.d.ts | 1 + .../original/tsc/asyncFunctionDeclaration8_es5.d.ts | 1 + .../original/tsc/asyncFunctionDeclaration8_es6.d.ts | 1 + .../original/tsc/bigintIndex.d.ts | 1 + .../original/tsc/complicatedPrivacy.d.ts | 1 + .../original/tsc/computedPropertiesNarrowed.d.ts | 1 + .../original/tsc/computedPropertyNames12_ES5.d.ts | 1 + .../original/tsc/computedPropertyNames12_ES6.d.ts | 1 + .../original/tsc/computedPropertyNames16_ES5.d.ts | 1 + .../original/tsc/computedPropertyNames16_ES6.d.ts | 1 + .../original/tsc/computedPropertyNames2_ES5.d.ts | 1 + .../original/tsc/computedPropertyNames2_ES6.d.ts | 1 + .../original/tsc/computedPropertyNames4_ES5.d.ts | 1 + .../original/tsc/computedPropertyNames4_ES6.d.ts | 1 + .../original/tsc/computedPropertyNames5_ES5.d.ts | 1 + .../original/tsc/computedPropertyNames5_ES6.d.ts | 1 + .../original/tsc/computedPropertyNames6_ES5.d.ts | 1 + .../original/tsc/computedPropertyNames6_ES6.d.ts | 1 + .../tsc/computedPropertyNamesOnOverloads_ES5.d.ts | 1 + .../tsc/computedPropertyNamesOnOverloads_ES6.d.ts | 1 + .../tsc/computedPropertyNamesWithStaticProperty.d.ts | 1 + .../original/tsc/constEnum2.d.ts | 1 + .../original/tsc/constEnumErrors.d.ts | 1 + .../original/tsc/constEnums.d.ts | 1 + .../original/tsc/contextualReturnTypeOfIIFE2.d.ts | 1 + ...duleImportingModuleAugmentationRetainsImport.d.ts | 1 + .../declarationEmitHasTypesRefOnNamespaceUse.d.ts | 1 + .../tsc/declarationEmitLateBoundAssignments2.d.ts | 1 + .../tsc/declarationFilesWithTypeReferences2.d.ts | 1 + .../original/tsc/decoratorsOnComputedProperties.d.ts | 1 + .../original/tsc/enumBasics2.d.ts | 1 + .../original/tsc/enumBasics3.d.ts | 1 + .../original/tsc/enumConstantMembers.d.ts | 1 + .../original/tsc/enumErrors.d.ts | 1 + .../original/tsc/enumExportMergingES6.d.ts | 1 + .../expandoFunctionExpressionsWithDynamicNames.d.ts | 1 + .../original/tsc/forwardRefInEnum.d.ts | 1 + .../isolated-declarations/original/tsc/giant.d.ts | 1 + .../tsc/indexSignatureMustHaveTypeAnnotation.d.ts | 1 + .../tsc/indexTypeNoSubstitutionTemplateLiteral.d.ts | 1 + .../original/tsc/indexWithoutParamType2.d.ts | 1 + .../original/tsc/intTypeCheck.d.ts | 1 + ...TaggedTemplateEscapeSequences(target=es2015).d.ts | 1 + ...lidTaggedTemplateEscapeSequences(target=es5).d.ts | 1 + ...TaggedTemplateEscapeSequences(target=esnext).d.ts | 1 + .../tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts | 1 + .../original/tsc/mergedDeclarations2.d.ts | 1 + .../original/tsc/mergedEnumDeclarationCodeGen.d.ts | 1 + ...eResolutionWithSuffixes_one_externalTSModule.d.ts | 1 + .../original/tsc/overloadsWithComputedNames.d.ts | 1 + .../original/tsc/parseBigInt.d.ts | 1 + .../original/tsc/parserComputedPropertyName1.d.ts | 1 + .../original/tsc/parserComputedPropertyName10.d.ts | 1 + .../original/tsc/parserComputedPropertyName13.d.ts | 1 + .../original/tsc/parserComputedPropertyName14.d.ts | 1 + .../original/tsc/parserComputedPropertyName15.d.ts | 1 + .../original/tsc/parserComputedPropertyName18.d.ts | 1 + .../original/tsc/parserComputedPropertyName19.d.ts | 1 + .../original/tsc/parserComputedPropertyName2.d.ts | 1 + .../original/tsc/parserComputedPropertyName20.d.ts | 1 + .../original/tsc/parserComputedPropertyName21.d.ts | 1 + .../original/tsc/parserComputedPropertyName22.d.ts | 1 + .../original/tsc/parserComputedPropertyName23.d.ts | 1 + .../original/tsc/parserComputedPropertyName24.d.ts | 1 + .../original/tsc/parserComputedPropertyName25.d.ts | 1 + .../original/tsc/parserComputedPropertyName27.d.ts | 1 + .../original/tsc/parserComputedPropertyName28.d.ts | 1 + .../original/tsc/parserComputedPropertyName29.d.ts | 1 + .../original/tsc/parserComputedPropertyName31.d.ts | 1 + .../original/tsc/parserComputedPropertyName32.d.ts | 1 + .../original/tsc/parserComputedPropertyName33.d.ts | 1 + .../original/tsc/parserComputedPropertyName36.d.ts | 1 + .../original/tsc/parserComputedPropertyName37.d.ts | 1 + .../original/tsc/parserComputedPropertyName6.d.ts | 1 + .../original/tsc/parserComputedPropertyName9.d.ts | 1 + .../original/tsc/parserES5ComputedPropertyName1.d.ts | 1 + .../tsc/parserES5ComputedPropertyName10.d.ts | 1 + .../original/tsc/parserES5ComputedPropertyName2.d.ts | 1 + .../original/tsc/parserES5ComputedPropertyName5.d.ts | 1 + .../original/tsc/parserES5ComputedPropertyName8.d.ts | 1 + .../original/tsc/parserES5ComputedPropertyName9.d.ts | 1 + .../original/tsc/parserES5SymbolProperty1.d.ts | 1 + .../original/tsc/parserES5SymbolProperty2.d.ts | 1 + .../original/tsc/parserES5SymbolProperty3.d.ts | 1 + .../original/tsc/parserES5SymbolProperty4.d.ts | 1 + .../original/tsc/parserES5SymbolProperty5.d.ts | 1 + .../original/tsc/parserES5SymbolProperty6.d.ts | 1 + .../original/tsc/parserES5SymbolProperty7.d.ts | 1 + .../original/tsc/parserES5SymbolProperty8.d.ts | 1 + .../original/tsc/parserES5SymbolProperty9.d.ts | 1 + .../original/tsc/parserIndexSignature11.d.ts | 1 + .../original/tsc/parserIndexSignature5.d.ts | 1 + .../original/tsc/parserStrictMode8.d.ts | 1 + .../original/tsc/parserSymbolIndexer5.d.ts | 1 + .../original/tsc/privateIndexer2.d.ts | 1 + .../original/tsc/propertyAssignment.d.ts | 1 + ...NameConflicts(usedefineforclassfields=false).d.ts | 1 + ...yNameConflicts(usedefineforclassfields=true).d.ts | 1 + .../original/tsc/symbolDeclarationEmit12.d.ts | 1 + .../original/tsc/symbolProperty1.d.ts | 1 + .../original/tsc/symbolProperty2.d.ts | 1 + .../original/tsc/symbolProperty3.d.ts | 1 + .../original/tsc/symbolProperty52.d.ts | 1 + .../original/tsc/symbolProperty53.d.ts | 1 + .../original/tsc/symbolProperty54.d.ts | 1 + .../original/tsc/symbolProperty58.d.ts | 1 + .../original/tsc/symbolProperty59.d.ts | 1 + .../original/tsc/templateLiteralTypes4.d.ts | 1 + .../original/tsc/typeFromPropertyAssignment36.d.ts | 1 + .../original/tsc/typeReferenceDirectives11.d.ts | 1 + .../original/tsc/typeReferenceDirectives2.d.ts | 1 + .../original/tsc/typeReferenceDirectives8.d.ts | 1 + .../original/tsc/typeUsedAsTypeLiteralIndex.d.ts | 1 + .../tsc/verbatimModuleSyntaxConstEnumUsage.d.ts | 1 + 757 files changed, 933 insertions(+), 244 deletions(-) diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments3_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments3_es6.d.ts.diff index 6771f4eb61f82..fd0c4783911c1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments3_es6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments3_es6.d.ts.diff @@ -13,6 +13,7 @@ - ""(): Generator; -}; +declare var v: invalid; + /// [Errors] //// +FunctionPropertyAssignments3_es6.ts(1,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments5_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments5_es6.d.ts.diff index a68e132eb97a8..d5fa34e35c8bf 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments5_es6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments5_es6.d.ts.diff @@ -13,6 +13,7 @@ - [x: number]: () => Generator; -}; +declare var v: invalid; + /// [Errors] //// +FunctionPropertyAssignments5_es6.ts(1,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration5_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration5_es6.d.ts.diff index 872450a5aa428..5ea13b1751e59 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration5_es6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration5_es6.d.ts.diff @@ -13,6 +13,7 @@ - (): any; + (): invalid; } + /// [Errors] //// +MemberFunctionDeclaration5_es6.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration6_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration6_es6.d.ts.diff index b8876b4f26db8..9e88995ce1bae 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration6_es6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration6_es6.d.ts.diff @@ -13,6 +13,7 @@ - foo(): any; + foo(): invalid; } + /// [Errors] //// MemberFunctionDeclaration6_es6.ts(2,5): error TS2391: Function implementation is missing or not immediately following the declaration. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnum1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnum1.d.ts.diff index 2b1cd5067fd81..3c28d86fc59f5 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnum1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnum1.d.ts.diff @@ -8,6 +8,7 @@ @@ -8,18 +8,21 @@ x } + /// [Errors] //// +ambientEnum1.ts(7,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnumDeclaration1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnumDeclaration1.d.ts.diff index f64215d8dbe27..62535aa18137e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnumDeclaration1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnumDeclaration1.d.ts.diff @@ -10,7 +10,8 @@ d = 12, e = 655360 } -+/// [Errors] //// ++ + /// [Errors] //// + +ambientEnumDeclaration1.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +ambientEnumDeclaration1.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 557c287645e73..68a45f6f56faa 100644 --- 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 @@ -12,6 +12,7 @@ declare function flat(arr: A, depth?: D): BadFlatArray[]; -declare function foo(arr: T[], depth: number): any; +declare function foo(arr: T[], depth: number): invalid; + /// [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. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/arrowFunctionContexts.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/arrowFunctionContexts.d.ts.diff index 6068307d7596e..7fa998bdde5da 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/arrowFunctionContexts.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/arrowFunctionContexts.d.ts.diff @@ -7,6 +7,7 @@ +++ DTE declarations @@ -38,16 +38,18 @@ declare var asserted2: any; + /// [Errors] //// arrowFunctionContexts.ts(2,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier.d.ts.diff index d9581a9f1963f..5d73aa099b18e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier.d.ts.diff @@ -13,6 +13,7 @@ - : any; + : invalid; } + /// [Errors] //// classMemberWithMissingIdentifier.ts(2,11): error TS1146: Declaration expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier2.d.ts.diff index 65ab810dba8b3..6e5979b0cebbe 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier2.d.ts.diff @@ -13,6 +13,7 @@ - : any; + : invalid; } + /// [Errors] //// classMemberWithMissingIdentifier2.ts(2,11): error TS1146: Declaration expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/collisionCodeGenEnumWithEnumMemberConflict.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/collisionCodeGenEnumWithEnumMemberConflict.d.ts.diff index c47ac8aebf786..d11150006e9a7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/collisionCodeGenEnumWithEnumMemberConflict.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/collisionCodeGenEnumWithEnumMemberConflict.d.ts.diff @@ -10,7 +10,8 @@ Color = 0, Thing = 0 } -+/// [Errors] //// ++ + /// [Errors] //// + +collisionCodeGenEnumWithEnumMemberConflict.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 index bd27fc9b5c589..d8490ee96a579 100644 --- 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 @@ -10,7 +10,8 @@ C } declare let val2: MyDeclaredEnum; -+/// [Errors] //// ++ + /// [Errors] //// + +computedEnumTypeWidening.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedEnumTypeWidening.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES5.d.ts.diff index ddddf0f14197b..43dad75e6ca89 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES5.d.ts.diff @@ -18,7 +18,8 @@ - "hello bye"(): void; -}; +declare var v: invalid; -+/// [Errors] //// ++ + /// [Errors] //// + +computedPropertyNames10_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames10_ES5.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES6.d.ts.diff index bd14c4f5e1801..12e1322abd25d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES6.d.ts.diff @@ -18,7 +18,8 @@ - "hello bye"(): void; -}; +declare var v: invalid; -+/// [Errors] //// ++ + /// [Errors] //// + +computedPropertyNames10_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames10_ES6.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum1.d.ts.diff index 1829be5b55fbb..04362c69baede 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum1.d.ts.diff @@ -10,7 +10,8 @@ g = 20, h = 10 } -+/// [Errors] //// ++ + /// [Errors] //// + +constEnum1.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnum1.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 2630bbb297165..72ee65a6652bb 100644 --- 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 @@ -8,6 +8,7 @@ @@ -9,14 +9,17 @@ g } + /// [Errors] //// +constEnum2.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumDeclarations.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumDeclarations.d.ts.diff index 86cc364b9dcd1..1a1f432d7b774 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumDeclarations.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumDeclarations.d.ts.diff @@ -10,7 +10,8 @@ B = 2, C = 3 } -+/// [Errors] //// ++ + /// [Errors] //// + +constEnumDeclarations.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumErrors.d.ts.diff index 42d73b3a1f5d0..99416796e0d41 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumErrors.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumErrors.d.ts.diff @@ -17,6 +17,7 @@ } declare const enum E2 { @@ -34,25 +34,35 @@ + /// [Errors] //// constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumNamespaceReferenceCausesNoImport2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumNamespaceReferenceCausesNoImport2.d.ts.diff index 5c76af35925d8..b0d95915c7207 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumNamespaceReferenceCausesNoImport2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumNamespaceReferenceCausesNoImport2.d.ts.diff @@ -14,7 +14,8 @@ -declare const _default: typeof Foo.ConstEnumOnlyModule; +declare const _default: invalid; export = _default; -+/// [Errors] //// ++ + /// [Errors] //// + +reexport.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess1.d.ts.diff index 8ca203ca99422..f6e23a2c303c2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess1.d.ts.diff @@ -8,6 +8,7 @@ @@ -19,21 +19,27 @@ set [G.B](x: number); } + /// [Errors] //// +constEnumPropertyAccess1.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess2.d.ts.diff index 72a20735bd65a..76aa8b22a40c6 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess2.d.ts.diff @@ -8,6 +8,7 @@ @@ -12,24 +12,30 @@ declare var g: G; declare function foo(x: G): void; + /// [Errors] //// +constEnumPropertyAccess2.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess3.d.ts.diff index 0fad77c3f59a7..e473bd323424d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess3.d.ts.diff @@ -10,7 +10,8 @@ D = -3, E = -9 } -+/// [Errors] //// ++ + /// [Errors] //// + +constEnumPropertyAccess3.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumPropertyAccess3.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnums.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnums.d.ts.diff index 85b677e0626e7..f51c1ef458b0c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnums.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnums.d.ts.diff @@ -48,7 +48,8 @@ declare function foo(x: Enum1): void; declare function bar(e: A.B.C.E): number; declare function baz(c: Comments): void; -+/// [Errors] //// ++ + /// [Errors] //// + +constEnums.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnums.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constantEnumAssert.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constantEnumAssert.d.ts.diff index f4e428ad92f7e..41c5d5fd3e602 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constantEnumAssert.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constantEnumAssert.d.ts.diff @@ -8,6 +8,7 @@ @@ -59,12 +59,14 @@ a: string; }; + /// [Errors] //// +constantEnumAssert.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index e0a47b0fb6f45..280e66d1c9f7b 100644 --- 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 @@ -10,7 +10,8 @@ "Sunday" = 2, "Weekend days" = 3 } -+/// [Errors] //// ++ + /// [Errors] //// + +declFileEnums.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 index 4dcb1151b471b..e75f43db83156 100644 --- 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 @@ -13,6 +13,7 @@ -export declare const x: any; +export declare const x: invalid; export declare const y: RootProps; + /// [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. 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 index c3149fe2bcdef..891a8d3c135b9 100644 --- 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 @@ -43,7 +43,8 @@ - var A: () => void; - var B: () => void; -} -+/// [Errors] //// ++ + /// [Errors] //// + +index1.ts(2,25): error TS9009: 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(3,25): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index 4300b3b8d67ba..f6d562fad6b4f 100644 --- 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 @@ -42,6 +42,7 @@ + z: invalid; constructor({ x, y, z }: ObjType1); } + /// [Errors] //// declarationEmitDestructuringParameterProperties.ts(2,17): error TS1187: A parameter property may not be declared using a binding pattern. 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 index c133dfd5fb639..dc9132bb6546f 100644 --- 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 @@ -13,6 +13,7 @@ -export declare namespace q { - var val: I; -} + /// [Errors] //// +b.ts(3,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index 6bebef79b7ae1..7b5b162ef75f4 100644 --- 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 @@ -11,7 +11,8 @@ //// [/p1/index.d.ts] -export declare const a: import("typescript-fsa").A; +export declare const a: invalid; -+/// [Errors] //// ++ + /// [Errors] //// + +/p1/index.ts(4,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 index 0480c0e3a9e74..38ab808e04ab1 100644 --- 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 @@ -11,7 +11,8 @@ //// [/p1/index.d.ts] -export declare const a: import("typescript-fsa").A; +export declare const a: invalid; -+/// [Errors] //// ++ + /// [Errors] //// + +/p1/index.ts(4,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 index 9d91186056676..e7866ae309947 100644 --- 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 @@ -13,7 +13,8 @@ -declare namespace f { - var x: number; -} -+/// [Errors] //// ++ + /// [Errors] //// + +declarationEmitFunctionDuplicateNamespace.ts(2,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + 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 index 5ddbf0732c1d1..cedffb5ce297b 100644 --- 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 @@ -25,7 +25,8 @@ - export var normal: boolean; - export { _a as class }; -} -+/// [Errors] //// ++ + /// [Errors] //// + +declarationEmitFunctionKeywordProp.ts(1,10): error TS9009: 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(4,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index 3e8620617bb58..0ca3afe6c8641 100644 --- 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 @@ -14,7 +14,8 @@ - var bar: number; - var strMemName: string; -} -+/// [Errors] //// ++ + /// [Errors] //// + +declarationEmitLateBoundAssignments.ts(1,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + 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 index 1808ab900eb79..8c77d9bbc9352 100644 --- 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 @@ -78,7 +78,8 @@ - "\uD83E\uDD37\u200D\u2642\uFE0F": number; -}; +export declare const arrow10: invalid; -+/// [Errors] //// ++ + /// [Errors] //// + +declarationEmitLateBoundAssignments2.ts(9,17): error TS9009: 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(12,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index 77dd6402f4464..7ac92a1bad4fd 100644 --- 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 @@ -13,6 +13,7 @@ -declare const _default; +declare const _default: invalid; export default _default; + /// [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. 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 index 5a5bebcea411f..8f2da17f1db23 100644 --- 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 @@ -13,7 +13,8 @@ -import { MetadataAccessor } from "@raymondfeng/pkg2"; -export declare const ADMIN: MetadataAccessor; +export declare const ADMIN: invalid; -+/// [Errors] //// ++ + /// [Errors] //// + +monorepo/pkg3/src/keys.ts(3,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 index 9d8a6174b7254..ba54e61118775 100644 --- 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 @@ -13,7 +13,8 @@ -import { MetadataAccessor } from "@raymondfeng/pkg2"; -export declare const ADMIN: MetadataAccessor; +export declare const ADMIN: invalid; -+/// [Errors] //// ++ + /// [Errors] //// + +monorepo/pkg3/src/keys.ts(3,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 index cc773487ad1e7..b817ee8db912b 100644 --- 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 @@ -13,6 +13,7 @@ -import { MetadataAccessor } from "@raymondfeng/pkg2"; -export declare const ADMIN: any; +export declare const ADMIN: invalid; + /// [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. 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 index 7fa616a4516a8..a49f46f6de9c3 100644 --- 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 @@ -12,7 +12,8 @@ export declare function useRef(current: T): MutableRefObject; -export declare const useCsvParser: () => MutableRefObject; +export declare const useCsvParser: invalid; -+/// [Errors] //// ++ + /// [Errors] //// + +/p1/index.ts(7,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff index 821c140a712b1..8a0a6de7155c4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -28,28 +28,30 @@ +@@ -28,29 +28,31 @@ declare const x3_a: typeof globalThis; declare const x1_a: typeof globalThis; declare class C4 { @@ -26,6 +26,7 @@ + f3(): invalid; f4(): () => this; } + /// [Errors] //// declarationFiles.ts(4,20): error TS2526: A 'this' type is available only in a non-static member of a class or interface. @@ -41,7 +42,7 @@ x: this; f(x: this): this { return undefined; } constructor(x: this) { } -@@ -88,16 +90,20 @@ +@@ -89,16 +91,20 @@ x4 = (): this => this; f1() { ~~ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationInAmbientContext.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationInAmbientContext.d.ts.diff index 8a84f90053665..ecf419216dfc0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationInAmbientContext.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationInAmbientContext.d.ts.diff @@ -13,7 +13,8 @@ -declare var c: any, d: any; +declare var a: invalid, b: invalid; +declare var c: invalid, d: invalid; -+/// [Errors] //// ++ + /// [Errors] //// + +declarationInAmbientContext.ts(1,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationInAmbientContext.ts(1,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationWithNoInitializer.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationWithNoInitializer.d.ts.diff index 3d2263f6aef21..0712019ef0b77 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationWithNoInitializer.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationWithNoInitializer.d.ts.diff @@ -13,6 +13,7 @@ -declare var c: any, d: any; +declare var a: invalid, b: invalid; +declare var c: invalid, d: invalid; + /// [Errors] //// declarationWithNoInitializer.ts(1,5): error TS1182: A destructuring declaration must have an initializer. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterDeclaration6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterDeclaration6.d.ts.diff index f5836f76af530..35667cfe7c863 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterDeclaration6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterDeclaration6.d.ts.diff @@ -20,6 +20,7 @@ public: any; @@ -19,8 +19,10 @@ }): void; + /// [Errors] //// destructuringParameterDeclaration6.ts(7,18): error TS1005: ':' expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties1.d.ts.diff index b89360f47f32a..04c05c2340079 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties1.d.ts.diff @@ -46,6 +46,7 @@ declare var useC1Properties: boolean; @@ -39,10 +39,19 @@ declare const c3_z: any; + /// [Errors] //// destructuringParameterProperties1.ts(2,17): error TS1187: A parameter property may not be declared using a binding pattern. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties2.d.ts.diff index b3a6971ed2a58..d76142ef55940 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties2.d.ts.diff @@ -22,6 +22,7 @@ getC(): any; @@ -28,8 +28,11 @@ declare const z_c: any; + /// [Errors] //// destructuringParameterProperties2.ts(2,36): error TS1187: A parameter property may not be declared using a binding pattern. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties3.d.ts.diff index 26969c0b6bc0a..917c2152ac803 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties3.d.ts.diff @@ -22,6 +22,7 @@ getC(): any; @@ -33,8 +33,11 @@ declare const z_c: any; + /// [Errors] //// destructuringParameterProperties3.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties4.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties4.d.ts.diff index 12793358a00a2..481e5069e8cca 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties4.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties4.d.ts.diff @@ -22,6 +22,7 @@ getC(): any; @@ -16,8 +16,11 @@ } + /// [Errors] //// destructuringParameterProperties4.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties5.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties5.d.ts.diff index f76037736112a..a231c5d8a6071 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties5.d.ts.diff @@ -28,6 +28,7 @@ declare const dest: any[]; @@ -25,11 +25,17 @@ declare const a_z: any; + /// [Errors] //// destructuringParameterProperties5.ts(5,17): error TS1187: A parameter property may not be declared using a binding pattern. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/disallowLineTerminatorBeforeArrow.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/disallowLineTerminatorBeforeArrow.d.ts.diff index 3af651a6068d4..93cc661bb028d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/disallowLineTerminatorBeforeArrow.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/disallowLineTerminatorBeforeArrow.d.ts.diff @@ -8,6 +8,7 @@ @@ -27,14 +27,15 @@ var v: any, any: any; } + /// [Errors] //// +disallowLineTerminatorBeforeArrow.ts(67,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/duplicateObjectLiteralProperty.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/duplicateObjectLiteralProperty.d.ts.diff index dff880fb9a957..386deede15909 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/duplicateObjectLiteralProperty.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/duplicateObjectLiteralProperty.d.ts.diff @@ -14,6 +14,7 @@ - readonly a: number; -}; +declare var y: invalid; + /// [Errors] //// duplicateObjectLiteralProperty.ts(4,5): error TS1117: An object literal cannot have multiple properties with the same name. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumAssignmentCompat5.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumAssignmentCompat5.d.ts.diff index d0cec522a5969..8b46a9d282958 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumAssignmentCompat5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumAssignmentCompat5.d.ts.diff @@ -8,6 +8,7 @@ @@ -17,21 +17,30 @@ declare let c: Computed; declare let ca: Computed.A; + /// [Errors] //// +enumAssignmentCompat5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics.d.ts.diff index 3559e34bf40c9..c4b85824b84f8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics.d.ts.diff @@ -10,7 +10,8 @@ } declare var doNotPropagate: (E8 | E7 | E4 | E3)[]; declare var doPropagate: (E9 | E6 | E5)[]; -+/// [Errors] //// ++ + /// [Errors] //// + +enumBasics.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumBasics.ts(33,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics2.d.ts.diff index d7448224bdb58..d37aaae86b377 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics2.d.ts.diff @@ -15,6 +15,7 @@ c,// ok d } + /// [Errors] //// +enumBasics2.ts(4,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics3.d.ts.diff index 6199f0aeb8aed..51bcf121989c4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics3.d.ts.diff @@ -16,6 +16,7 @@ } } } + /// [Errors] //// +enumBasics3.ts(5,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index fe11d6f59c784..a948b2e29f83d 100644 --- 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 @@ -5,11 +5,12 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -57,4 +57,100 @@ +@@ -57,4 +57,101 @@ B, C, D } ++ +/// [Errors] //// + +enumClassification.ts(74,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithString.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithString.d.ts.diff index 86d55a234c712..eff59249c9ff5 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithString.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithString.d.ts.diff @@ -8,6 +8,7 @@ @@ -29,46 +29,73 @@ b = "12" } + /// [Errors] //// +enumConstantMemberWithString.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithStringEmitDeclaration.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithStringEmitDeclaration.d.ts.diff index fe4101a8c7eed..096cc47989a5f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithStringEmitDeclaration.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithStringEmitDeclaration.d.ts.diff @@ -10,7 +10,8 @@ a = "1", b = "12" } -+/// [Errors] //// ++ + /// [Errors] //// + +enumConstantMemberWithStringEmitDeclaration.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithStringEmitDeclaration.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithTemplateLiterals.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithTemplateLiterals.d.ts.diff index 640106f84ce22..6d55b8284d65c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithTemplateLiterals.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithTemplateLiterals.d.ts.diff @@ -8,6 +8,7 @@ @@ -39,13 +39,26 @@ c = "21" } + /// [Errors] //// +enumConstantMemberWithTemplateLiterals.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 573d4dc318314..ea90c93868775 100644 --- 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 @@ -5,11 +5,12 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -33,4 +33,52 @@ +@@ -33,4 +33,53 @@ a = "1", b = "11", c = "21" } ++ +/// [Errors] //// + +enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(32,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMembers.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMembers.d.ts.diff index de33c4861266a..952a9cf5392c7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMembers.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMembers.d.ts.diff @@ -29,6 +29,7 @@ + f, + g } + /// [Errors] //// +enumConstantMembers.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumErrorOnConstantBindingWithInitializer.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumErrorOnConstantBindingWithInitializer.d.ts.diff index 2d04d2a7d8ff6..9619e3369185f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumErrorOnConstantBindingWithInitializer.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumErrorOnConstantBindingWithInitializer.d.ts.diff @@ -6,6 +6,7 @@ --- TSC declarations +++ DTE declarations @@ -13,13 +13,14 @@ + /// [Errors] //// enumErrorOnConstantBindingWithInitializer.ts(7,7): error TS2322: Type 'string | number | undefined' is not assignable to type 'string | number'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumExportMergingES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumExportMergingES6.d.ts.diff index 8a9f55b53955c..756cc34aca33a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumExportMergingES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumExportMergingES6.d.ts.diff @@ -13,7 +13,8 @@ - CatDog = 3 + CatDog } -+/// [Errors] //// ++ + /// [Errors] //// + +enumExportMergingES6.ts(8,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumLiteralAssignableToEnumInsideUnion.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumLiteralAssignableToEnumInsideUnion.d.ts.diff index 46ce524ff56cf..fa423fd31589d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumLiteralAssignableToEnumInsideUnion.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumLiteralAssignableToEnumInsideUnion.d.ts.diff @@ -8,6 +8,7 @@ @@ -32,16 +32,20 @@ declare const e4: X.Foo.A | boolean; declare const e5: Ka.Foo | boolean; + /// [Errors] //// +enumLiteralAssignableToEnumInsideUnion.ts(13,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMerging.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMerging.d.ts.diff index 1398c70175f31..ab505a17957e6 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMerging.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMerging.d.ts.diff @@ -10,7 +10,8 @@ } } } -+/// [Errors] //// ++ + /// [Errors] //// + +enumMerging.ts(26,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumMerging.ts(26,27): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMergingErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMergingErrors.d.ts.diff index ecfb4e3a62381..2556d8e0629b7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMergingErrors.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMergingErrors.d.ts.diff @@ -8,6 +8,7 @@ @@ -65,28 +65,37 @@ } } + /// [Errors] //// +enumMergingErrors.ts(8,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumNumbering1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumNumbering1.d.ts.diff index e533152a691e3..b8c83fc8e940b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumNumbering1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumNumbering1.d.ts.diff @@ -10,7 +10,8 @@ D = 10, E = 11 } -+/// [Errors] //// ++ + /// [Errors] //// + +enumNumbering1.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumPropertyAccessBeforeInitalisation.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumPropertyAccessBeforeInitalisation.d.ts.diff index 43d7a57fbaedf..19bc63da5a658 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumPropertyAccessBeforeInitalisation.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumPropertyAccessBeforeInitalisation.d.ts.diff @@ -8,6 +8,7 @@ @@ -8,26 +8,38 @@ D } + /// [Errors] //// +enumPropertyAccessBeforeInitalisation.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithComputedMember.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithComputedMember.d.ts.diff index c03adbbf84c66..ff1b9dd9ca0e0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithComputedMember.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithComputedMember.d.ts.diff @@ -8,6 +8,7 @@ @@ -7,15 +7,21 @@ Z } + /// [Errors] //// +enumWithComputedMember.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithExport.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithExport.d.ts.diff index 00f5ab242fc22..489a8e4fede24 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithExport.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithExport.d.ts.diff @@ -8,6 +8,7 @@ @@ -8,16 +8,19 @@ z } + /// [Errors] //// +enumWithExport.ts(5,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithParenthesizedInitializer1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithParenthesizedInitializer1.d.ts.diff index 269e29c18edf4..dabf64f1d28b2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithParenthesizedInitializer1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithParenthesizedInitializer1.d.ts.diff @@ -8,6 +8,7 @@ @@ -5,13 +5,16 @@ e = -3 } + /// [Errors] //// +enumWithParenthesizedInitializer1.ts(2,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithoutInitializerAfterComputedMember.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithoutInitializerAfterComputedMember.d.ts.diff index beacc33eae0e2..fea6b6eacec28 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithoutInitializerAfterComputedMember.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithoutInitializerAfterComputedMember.d.ts.diff @@ -10,7 +10,8 @@ b = 0, c = 1 } -+/// [Errors] //// ++ + /// [Errors] //// + +enumWithoutInitializerAfterComputedMember.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/equalityWithEnumTypes.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/equalityWithEnumTypes.d.ts.diff index 8bce1c585ee41..4db684f824cd9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/equalityWithEnumTypes.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/equalityWithEnumTypes.d.ts.diff @@ -8,6 +8,7 @@ @@ -12,15 +12,17 @@ declare function f1(v: E1): void; declare function f2(v: E2): void; + /// [Errors] //// +equalityWithEnumTypes.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exactSpellingSuggestion.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exactSpellingSuggestion.d.ts.diff index 31a9aaa980316..42ecc59190527 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exactSpellingSuggestion.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exactSpellingSuggestion.d.ts.diff @@ -8,6 +8,7 @@ @@ -7,18 +7,27 @@ BIT_2 = 4 } + /// [Errors] //// +exactSpellingSuggestion.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesJSDocInTs.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesJSDocInTs.d.ts.diff index 86b4c33d85dff..82ed89c64021f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesJSDocInTs.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesJSDocInTs.d.ts.diff @@ -13,7 +13,8 @@ -export declare namespace Foo { - var bar: () => void; -} -+/// [Errors] //// ++ + /// [Errors] //// + +expandoFunctionContextualTypesJSDocInTs.ts(1,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesNoValue.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesNoValue.d.ts.diff index fa98831a90678..696aac12cb204 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesNoValue.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesNoValue.d.ts.diff @@ -13,6 +13,7 @@ -export declare namespace Foo { - var bar: () => void; -} + /// [Errors] //// expandoFunctionContextualTypesNoValue.ts(2,17): error TS2307: Cannot find module 'blah' or its corresponding type declarations. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff index e48d013e68e37..ac00cfb88aba3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff @@ -19,7 +19,8 @@ -}; +export declare const expr: invalid; +export declare const expr2: invalid; -+/// [Errors] //// ++ + /// [Errors] //// + +expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignDottedName.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignDottedName.d.ts.diff index 3aa433a5ea9e0..9223a69b41609 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignDottedName.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignDottedName.d.ts.diff @@ -14,7 +14,8 @@ -declare const _default: typeof foo1.x; +declare const _default: invalid; export = _default; -+/// [Errors] //// ++ + /// [Errors] //// + +foo2.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignNonIdentifier.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignNonIdentifier.d.ts.diff index 860004b4193cd..9125e0c7032b0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignNonIdentifier.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignNonIdentifier.d.ts.diff @@ -32,6 +32,7 @@ //// [foo8.d.ts] declare const _default: any; export = _default; + /// [Errors] //// +foo1.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignmentWithoutIdentifier1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignmentWithoutIdentifier1.d.ts.diff index 2a6d1e44f1f86..c420f639e46e7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignmentWithoutIdentifier1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignmentWithoutIdentifier1.d.ts.diff @@ -12,7 +12,8 @@ -declare const _default: any; +declare const _default: invalid; export = _default; -+/// [Errors] //// ++ + /// [Errors] //// + +exportAssignmentWithoutIdentifier1.ts(7,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 index 56d83cea6f181..2fb39ffca564f 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,8 +1,18 @@ +@@ -1,8 +1,19 @@ //// [exportDefaultNamespace.d.ts] @@ -15,6 +15,7 @@ -} -export default someFunc; +export default function someFunc(): string; ++ +/// [Errors] //// + +exportDefaultNamespace.ts(1,25): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty.d.ts.diff index dd50b45349319..0271deb64e385 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty.d.ts.diff @@ -29,7 +29,8 @@ //// [index.d.ts] -/// export {}; -+/// [Errors] //// ++ + /// [Errors] //// + +a.ts(5,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +b.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty2.d.ts.diff index 09beb0848d71a..da9c5a780589b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty2.d.ts.diff @@ -15,7 +15,8 @@ //// [b.d.ts] export {}; -+/// [Errors] //// ++ + /// [Errors] //// + +a.ts(10,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/forwardRefInEnum.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/forwardRefInEnum.d.ts.diff index 0d0e31a25f34a..0c118eaa0d986 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/forwardRefInEnum.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/forwardRefInEnum.d.ts.diff @@ -22,6 +22,7 @@ declare enum E1 { Z = 4 } + /// [Errors] //// +forwardRefInEnum.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/functionImplementations.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/functionImplementations.d.ts.diff index 51c7b2f289b4e..80be9e30842a2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/functionImplementations.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/functionImplementations.d.ts.diff @@ -42,6 +42,7 @@ @@ -52,14 +52,22 @@ declare var f11: (x: number) => any; declare var f12: (x: number) => any; + /// [Errors] //// +functionImplementations.ts(40,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/initializersInAmbientEnums.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/initializersInAmbientEnums.d.ts.diff index 040b51c046a4c..59c61a57a49a8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/initializersInAmbientEnums.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/initializersInAmbientEnums.d.ts.diff @@ -10,7 +10,8 @@ b = 10, e = 655360 } -+/// [Errors] //// ++ + /// [Errors] //// + +initializersInAmbientEnums.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +initializersInAmbientEnums.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff index 03b1a7b8f76f7..730dfa53af1a4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff @@ -29,6 +29,7 @@ @@ -38,10 +38,15 @@ const x: number; } + /// [Errors] //// +enum2.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsContainerMergeTsDeclaration.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsContainerMergeTsDeclaration.d.ts.diff index f33ff27010d02..3efa1e9a5d54f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsContainerMergeTsDeclaration.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsContainerMergeTsDeclaration.d.ts.diff @@ -11,6 +11,7 @@ //// [b.d.ts] -declare var x: number; +declare var x: invalid; + /// [Errors] //// error TS6504: File 'a.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxComponentTypeErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxComponentTypeErrors.d.ts.diff index 513d4bef557ca..759597615e32c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxComponentTypeErrors.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxComponentTypeErrors.d.ts.diff @@ -20,6 +20,7 @@ @@ -34,8 +31,9 @@ declare const elem5: JSX.Element; declare const elem6: JSX.Element; + /// [Errors] //// +jsxComponentTypeErrors.tsx(10,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespace.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespace.d.ts.diff index 2b545e0771b1b..191700419fdfb 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespace.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespace.d.ts.diff @@ -11,7 +11,8 @@ //// [/index.d.ts] -export declare const Comp: () => import("preact").JSXInternal.Element; +export declare const Comp: invalid; -+/// [Errors] //// ++ + /// [Errors] //// + +/index.tsx(1,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts.diff index 75e7c5f6e7615..2edba0b26af1c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts.diff @@ -11,7 +11,8 @@ //// [/index.d.ts] -export declare const Comp: () => import("@emotion/react/jsx-runtime").JSX.Element; +export declare const Comp: invalid; -+/// [Errors] //// ++ + /// [Errors] //// + +/index.tsx(1,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts.diff index 75e7c5f6e7615..2edba0b26af1c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts.diff @@ -11,7 +11,8 @@ //// [/index.d.ts] -export declare const Comp: () => import("@emotion/react/jsx-runtime").JSX.Element; +export declare const Comp: invalid; -+/// [Errors] //// ++ + /// [Errors] //// + +/index.tsx(1,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts.diff index 81fbe031b08d6..440455adc614b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts.diff @@ -11,7 +11,8 @@ //// [/index.d.ts] -export declare const Comp: () => import("@emotion/react/jsx-runtime").JSX.Element; +export declare const Comp: invalid; -+/// [Errors] //// ++ + /// [Errors] //// + +/index.tsx(2,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 index c8d64120c9c4e..d77af008877e5 100644 --- 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 @@ -13,7 +13,8 @@ -export declare namespace foo { - var bar: number; -} -+/// [Errors] //// ++ + /// [Errors] //// + +index.ts(1,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + 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 index cf1f6f9d6db20..c14d7c5d9ee84 100644 --- 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 @@ -5,12 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,4 +1,41 @@ +@@ -1,4 +1,42 @@ //// [index.d.ts] -export declare const a: () => Promise; +export declare const a: invalid; ++ +/// [Errors] //// + +index.ts(1,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedDeclarations2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedDeclarations2.d.ts.diff index b17b7bdd65a3a..a368036a2e74f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedDeclarations2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedDeclarations2.d.ts.diff @@ -16,6 +16,7 @@ declare namespace Foo { var x: any; } + /// [Errors] //// +mergedDeclarations2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedEnumDeclarationCodeGen.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedEnumDeclarationCodeGen.d.ts.diff index 1d2c73ae0b439..7e1c6ff8d4950 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedEnumDeclarationCodeGen.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedEnumDeclarationCodeGen.d.ts.diff @@ -13,7 +13,8 @@ - c = 0 + c } -+/// [Errors] //// ++ + /// [Errors] //// + +mergedEnumDeclarationCodeGen.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +mergedEnumDeclarationCodeGen.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/methodContainingLocalFunction.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/methodContainingLocalFunction.d.ts.diff index 2fff9bb66ba6f..a9570d1172516 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/methodContainingLocalFunction.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/methodContainingLocalFunction.d.ts.diff @@ -10,7 +10,8 @@ declare enum E { A } -+/// [Errors] //// ++ + /// [Errors] //// + +methodContainingLocalFunction.ts(44,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mixedTypeEnumComparison.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mixedTypeEnumComparison.d.ts.diff index fdba5f9d12e0b..5d1134e67a75a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mixedTypeEnumComparison.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mixedTypeEnumComparison.d.ts.diff @@ -10,7 +10,8 @@ N1 = 1000, C1 } -+/// [Errors] //// ++ + /// [Errors] //// + +mixedTypeEnumComparison.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationDisallowedExtensions.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationDisallowedExtensions.d.ts.diff index 0f10832b9a3e4..2644ea8302f11 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationDisallowedExtensions.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationDisallowedExtensions.d.ts.diff @@ -19,6 +19,7 @@ @@ -43,8 +43,14 @@ //// [x0.d.ts] export declare let a: number; + /// [Errors] //// +x.ts(9,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationNoNewNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationNoNewNames.d.ts.diff index 5ccaa88e474a2..cb197f67e0d6c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationNoNewNames.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationNoNewNames.d.ts.diff @@ -20,7 +20,8 @@ export declare class Observable { filter(pred: (e: T) => boolean): Observable; } -+/// [Errors] //// ++ + /// [Errors] //// + +map.ts(11,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +map.ts(11,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/negateOperatorInvalidOperations.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/negateOperatorInvalidOperations.d.ts.diff index 85e8a66399c42..a0635a520a962 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/negateOperatorInvalidOperations.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/negateOperatorInvalidOperations.d.ts.diff @@ -17,6 +17,7 @@ declare var NUMBER4: number; -declare var NUMBER: any; +declare var NUMBER: number; + /// [Errors] //// +negateOperatorInvalidOperations.ts(4,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/newTargetNarrowing.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/newTargetNarrowing.d.ts.diff index 9d142cf0a63ea..ec8b63702166c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/newTargetNarrowing.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/newTargetNarrowing.d.ts.diff @@ -13,7 +13,8 @@ -declare namespace f { - var marked: boolean; -} -+/// [Errors] //// ++ + /// [Errors] //// + +newTargetNarrowing.ts(3,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/noImplicitAnyDestructuringVarDeclaration.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/noImplicitAnyDestructuringVarDeclaration.d.ts.diff index fe5a98c198a02..531e005677f53 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/noImplicitAnyDestructuringVarDeclaration.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/noImplicitAnyDestructuringVarDeclaration.d.ts.diff @@ -22,6 +22,7 @@ declare const dest: any[]; declare const a4: any; @@ -20,52 +20,73 @@ + /// [Errors] //// noImplicitAnyDestructuringVarDeclaration.ts(1,5): error TS1182: A destructuring declaration must have an initializer. 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 index 7721a91eea2d4..1e0a6b70f2d60 100644 --- 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 @@ -13,7 +13,8 @@ -declare const _default: PrismaClient; +declare const _default: invalid; export default _default; -+/// [Errors] //// ++ + /// [Errors] //// + +/index.ts(4,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 index 90a94b482e4a5..e3006efc5bfa5 100644 --- 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 @@ -5,12 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,26 +1,29 @@ +@@ -1,27 +1,30 @@ //// [index.d.ts] -export declare const a: any; +export declare const a: invalid; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 90a94b482e4a5..e3006efc5bfa5 100644 --- 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 @@ -5,12 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,26 +1,29 @@ +@@ -1,27 +1,30 @@ //// [index.d.ts] -export declare const a: any; +export declare const a: invalid; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 59d31eb042590..4116d2e5ee15d 100644 --- 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 @@ -15,7 +15,7 @@ //// [/.src/node_modules/inner/index.d.ts] export { x } from "./other.js"; -@@ -14,21 +14,24 @@ +@@ -15,21 +15,24 @@ error TS2468: Cannot find global value 'Promise'. index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. 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 index 59d31eb042590..4116d2e5ee15d 100644 --- 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 @@ -15,7 +15,7 @@ //// [/.src/node_modules/inner/index.d.ts] export { x } from "./other.js"; -@@ -14,21 +14,24 @@ +@@ -15,21 +15,24 @@ error TS2468: Cannot find global value 'Promise'. index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. 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 index 4f3c0630c493f..81cb55959c3b2 100644 --- 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 @@ -5,12 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,23 +1,26 @@ +@@ -1,24 +1,27 @@ //// [index.d.ts] -export declare const a: import("inner/other").Thing; +export declare const a: invalid; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 4f3c0630c493f..81cb55959c3b2 100644 --- 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 @@ -5,12 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,23 +1,26 @@ +@@ -1,24 +1,27 @@ //// [index.d.ts] -export declare const a: import("inner/other").Thing; +export declare const a: invalid; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 98c8b384b078c..0924524cf289b 100644 --- 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 @@ -5,12 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,23 +1,26 @@ +@@ -1,24 +1,27 @@ //// [index.d.ts] -export declare const a: import("inner/other.js").Thing; +export declare const a: invalid; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 98c8b384b078c..0924524cf289b 100644 --- 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 @@ -5,12 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,23 +1,26 @@ +@@ -1,24 +1,27 @@ //// [index.d.ts] -export declare const a: import("inner/other.js").Thing; +export declare const a: invalid; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 18b3a43f95208..6c072ef8d726c 100644 --- 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 @@ -5,12 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,23 +1,26 @@ +@@ -1,24 +1,27 @@ //// [index.d.ts] -export declare const a: import("inner/other.js").Thing; +export declare const a: invalid; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 18b3a43f95208..6c072ef8d726c 100644 --- 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 @@ -5,12 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,23 +1,26 @@ +@@ -1,24 +1,27 @@ //// [index.d.ts] -export declare const a: import("inner/other.js").Thing; +export declare const a: invalid; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 468b85ad0687f..59d59fd665b91 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,85 +1,95 @@ +@@ -1,85 +1,96 @@ //// [nullPropertyName.d.ts] @@ -91,6 +91,7 @@ - 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 }; -} ++ +/// [Errors] //// + +nullPropertyName.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index 428e97077ecad..cce70faaba6ec 100644 --- 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 @@ -10,7 +10,8 @@ } declare const e: E; declare const x: E.ONE; -+/// [Errors] //// ++ + /// [Errors] //// + +numericEnumMappedType.ts(25,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +numericEnumMappedType.ts(25,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/objectLiteralGettersAndSetters.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/objectLiteralGettersAndSetters.d.ts.diff index 98bf4f7ceac76..befea4474f8c9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/objectLiteralGettersAndSetters.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/objectLiteralGettersAndSetters.d.ts.diff @@ -53,7 +53,8 @@ declare var getParamType3: { n: string; }; -+/// [Errors] //// ++ + /// [Errors] //// + +objectLiteralGettersAndSetters.ts(65,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(88,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/overloadingStaticFunctionsInFunctions.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/overloadingStaticFunctionsInFunctions.d.ts.diff index 48f3713c3e53d..4a383b4c33e6c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/overloadingStaticFunctionsInFunctions.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/overloadingStaticFunctionsInFunctions.d.ts.diff @@ -11,6 +11,7 @@ //// [overloadingStaticFunctionsInFunctions.d.ts] -declare function boo(): void; +declare function boo(): invalid; + /// [Errors] //// +overloadingStaticFunctionsInFunctions.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.classMethods.es2018.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.classMethods.es2018.d.ts.diff index 2a5b9b0c7f53a..83fe6d38f0249 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.classMethods.es2018.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.classMethods.es2018.d.ts.diff @@ -43,6 +43,7 @@ @@ -131,10 +132,13 @@ f(): AsyncGenerator; } + /// [Errors] //// +asyncGeneratorGetAccessorIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts.diff index 4fb6823cc17a2..baf99e3991e59 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts.diff @@ -33,6 +33,7 @@ @@ -126,10 +120,12 @@ f(): AsyncGenerator; }; + /// [Errors] //// +asyncGeneratorGetAccessorIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum1.d.ts.diff index 2525475ef7730..c8b70c8db24e4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum1.d.ts.diff @@ -10,7 +10,8 @@ IsStringIndexer = 2, IsNumberIndexer = 4 } -+/// [Errors] //// ++ + /// [Errors] //// + +parserEnum1.ts(4,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserEnum1.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum2.d.ts.diff index 88dfa55378c95..fdc4df3c9f524 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum2.d.ts.diff @@ -10,7 +10,8 @@ IsStringIndexer = 2, IsNumberIndexer = 4 } -+/// [Errors] //// ++ + /// [Errors] //// + +parserEnum2.ts(4,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserEnum2.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnumDeclaration6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnumDeclaration6.d.ts.diff index 466de7e17e22e..5d7b7131270d9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnumDeclaration6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnumDeclaration6.d.ts.diff @@ -10,7 +10,8 @@ C = 2, D = 3 } -+/// [Errors] //// ++ + /// [Errors] //// + +parserEnumDeclaration6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction1.d.ts.diff index 951b57e5ebc15..5896ee65adce4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction1.d.ts.diff @@ -11,6 +11,7 @@ //// [parserEqualsGreaterThanAfterFunction1.d.ts] -declare function (): any; +declare function (): invalid; + /// [Errors] //// +parserEqualsGreaterThanAfterFunction1.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction2.d.ts.diff index c6a6e1e45b71e..7fe619a0041f7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction2.d.ts.diff @@ -11,6 +11,7 @@ //// [parserEqualsGreaterThanAfterFunction2.d.ts] -declare function (a: any, b: any): any; +declare function (a: any, b: any): invalid; + /// [Errors] //// +parserEqualsGreaterThanAfterFunction2.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList1.d.ts.diff index a77e976779f8e..058174e4d6ab7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList1.d.ts.diff @@ -11,6 +11,7 @@ //// [parserErrorRecovery_ParameterList1.d.ts] -declare function f(a: any, {}: {}): any; +declare function f(a: any, {}: {}): invalid; + /// [Errors] //// parserErrorRecovery_ParameterList1.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList2.d.ts.diff index af2717c6fa4c7..64189ea496daf 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList2.d.ts.diff @@ -11,6 +11,7 @@ //// [parserErrorRecovery_ParameterList2.d.ts] -declare function f(a: any, {}: {}): any; +declare function f(a: any, {}: {}): invalid; + /// [Errors] //// parserErrorRecovery_ParameterList2.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserNoASIOnCallAfterFunctionExpression1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserNoASIOnCallAfterFunctionExpression1.d.ts.diff index 5de20edb25919..f8e1bb2e01000 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserNoASIOnCallAfterFunctionExpression1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserNoASIOnCallAfterFunctionExpression1.d.ts.diff @@ -11,6 +11,7 @@ //// [parserNoASIOnCallAfterFunctionExpression1.d.ts] -declare var x: any; +declare var x: invalid; + /// [Errors] //// +parserNoASIOnCallAfterFunctionExpression1.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource10.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource10.d.ts.diff index 8e3494150df52..a36c47e1956ac 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource10.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource10.d.ts.diff @@ -7,6 +7,7 @@ +++ DTE declarations @@ -233,16 +233,22 @@ } + /// [Errors] //// parserRealSource10.ts(4,21): error TS6053: File 'typescript.ts' not found. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource14.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource14.d.ts.diff index d42585a583eb9..0966d083bef2b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource14.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource14.d.ts.diff @@ -7,6 +7,7 @@ +++ DTE declarations @@ -84,8 +84,9 @@ } + /// [Errors] //// parserRealSource14.ts(4,21): error TS6053: File 'typescript.ts' not found. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource2.d.ts.diff index a44536d6caa94..924d609ed4d06 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource2.d.ts.diff @@ -7,6 +7,7 @@ +++ DTE declarations @@ -217,17 +217,167 @@ } + /// [Errors] //// parserRealSource2.ts(4,21): error TS6053: File 'typescript.ts' not found. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource3.d.ts.diff index ff5f8a5b20015..a1cb3d3b1a581 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource3.d.ts.diff @@ -7,6 +7,7 @@ +++ DTE declarations @@ -116,17 +116,22 @@ } + /// [Errors] //// parserRealSource3.ts(4,21): error TS6053: File 'typescript.ts' not found. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserSkippedTokens16.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserSkippedTokens16.d.ts.diff index b203e06bbb0d5..2047e54e6887d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserSkippedTokens16.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserSkippedTokens16.d.ts.diff @@ -12,6 +12,7 @@ } -declare var x: any; +declare var x: invalid; + /// [Errors] //// parserSkippedTokens16.ts(1,1): error TS2552: Cannot find name 'foo'. Did you mean 'Foo'? diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserStrictMode8.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserStrictMode8.d.ts.diff index 9b94bfcfa886f..e37f158527c1c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserStrictMode8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserStrictMode8.d.ts.diff @@ -10,6 +10,7 @@ //// [parserStrictMode8.d.ts] +declare function eval(): invalid; + /// [Errors] //// parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/preserveConstEnums.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/preserveConstEnums.d.ts.diff index 2c958e0619382..5f059911f1828 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/preserveConstEnums.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/preserveConstEnums.d.ts.diff @@ -10,7 +10,8 @@ Value = 1, Value2 = 1 } -+/// [Errors] //// ++ + /// [Errors] //// + +preserveConstEnums.ts(2,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/propertyAssignmentUseParentType3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/propertyAssignmentUseParentType3.d.ts.diff index 75f445eccffb2..c1a70970e4dde 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/propertyAssignmentUseParentType3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/propertyAssignmentUseParentType3.d.ts.diff @@ -27,7 +27,8 @@ -declare namespace foo4 { - var x: string; -} -+/// [Errors] //// ++ + /// [Errors] //// + +propertyAssignmentUseParentType3.ts(3,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +propertyAssignmentUseParentType3.ts(8,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reexportClassDefinition.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reexportClassDefinition.d.ts.diff index 1c3251e1f6170..cd7f9079c9e32 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reexportClassDefinition.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reexportClassDefinition.d.ts.diff @@ -19,7 +19,8 @@ //// [foo3.d.ts] export {}; -+/// [Errors] //// ++ + /// [Errors] //// + +foo2.ts(4,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reservedWords3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reservedWords3.d.ts.diff index a69e4f2b6a57d..c39f4c45e70ea 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reservedWords3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reservedWords3.d.ts.diff @@ -25,6 +25,7 @@ +declare function (): invalid; +declare function f4(): invalid; +declare function f5(): invalid; + /// [Errors] //// +reservedWords3.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/staticsInAFunction.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/staticsInAFunction.d.ts.diff index cb9fb809c656e..2cd58391c7633 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/staticsInAFunction.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/staticsInAFunction.d.ts.diff @@ -11,6 +11,7 @@ //// [staticsInAFunction.d.ts] -declare function boo(): void; +declare function boo(): invalid; + /// [Errors] //// +staticsInAFunction.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/strictModeOctalLiterals.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/strictModeOctalLiterals.d.ts.diff index a820e44aee0a4..b2fea706dfd17 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/strictModeOctalLiterals.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/strictModeOctalLiterals.d.ts.diff @@ -8,6 +8,7 @@ @@ -5,16 +5,19 @@ A = 13 } + /// [Errors] //// +strictModeOctalLiterals.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index b0f6d74d27356..fb32d5310dc35 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,26 +5,30 @@ +@@ -5,8 +5,9 @@ interface I { } export class C { @@ -15,8 +15,9 @@ get [Symbol.toPrimitive](): I; set [Symbol.toPrimitive](x: I); } - export {}; +@@ -14,18 +15,21 @@ } + /// [Errors] //// +symbolDeclarationEmit12.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index e41dc71048600..5e9b9be6ba7e4 100644 --- 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 @@ -11,7 +11,8 @@ //// [Folder/monorepo/core/index.d.ts] -export declare function getStyles(): import("styled-components").InterpolationValue[]; +export declare function getStyles(): invalid; -+/// [Errors] //// ++ + /// [Errors] //// + +Folder/monorepo/core/index.ts(3,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 index 66df896d0d8bc..e0a430305f0d1 100644 --- 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 @@ -18,9 +18,9 @@ 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; -@@ -157,13 +157,15 @@ - declare function f3(s: `**${T}**`): T; +@@ -158,13 +158,15 @@ declare function f4(s: `**${T}**`): T; + /// [Errors] //// +templateLiteralTypes4.ts(43,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -35,7 +35,7 @@ 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 -@@ -205,8 +207,12 @@ +@@ -206,8 +208,12 @@ type TNumberLiteralEnum0 = "0" extends `${infer T extends NumberLiteralEnum}` ? T : never; // NumberLiteralEnum.Zero // infer from non-literal enums diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterType.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterType.d.ts.diff index 76197408bcd62..03e1226edab6f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterType.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterType.d.ts.diff @@ -12,6 +12,7 @@ -declare function f(any: any, : any): any; +declare function f(any: any, : invalid): any; declare function f(x: string): any; + /// [Errors] //// templateStringInFunctionParameterType.ts(1,12): error TS1138: Parameter declaration expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterTypeES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterTypeES6.d.ts.diff index 5476af17704ad..5581b1fa7f4ae 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterTypeES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterTypeES6.d.ts.diff @@ -12,6 +12,7 @@ -declare function f(any: any, : any): any; +declare function f(any: any, : invalid): any; declare function f(x: string): any; + /// [Errors] //// templateStringInFunctionParameterTypeES6.ts(1,12): error TS1138: Parameter declaration expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringWithEmbeddedYieldKeyword.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringWithEmbeddedYieldKeyword.d.ts.diff index b52435d995663..236126358e4ce 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringWithEmbeddedYieldKeyword.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringWithEmbeddedYieldKeyword.d.ts.diff @@ -11,6 +11,7 @@ //// [templateStringWithEmbeddedYieldKeyword.d.ts] -declare function gen(): {}; +declare function gen(): invalid; + /// [Errors] //// error TS2318: Cannot find global type 'IterableIterator'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContextsExternalModule.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContextsExternalModule.d.ts.diff index ad0c229a3e0b8..c0578b2f8d3b7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContextsExternalModule.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContextsExternalModule.d.ts.diff @@ -12,6 +12,7 @@ -declare const _default: undefined; +declare const _default: invalid; export = _default; + /// [Errors] //// thisInInvalidContextsExternalModule.ts(9,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInPropertyBoundDeclarations.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInPropertyBoundDeclarations.d.ts.diff index 6c30e0036a88a..6b009b2e2da04 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInPropertyBoundDeclarations.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInPropertyBoundDeclarations.d.ts.diff @@ -13,6 +13,7 @@ - prop6: any; + prop6: invalid; } + /// [Errors] //// thisInPropertyBoundDeclarations.ts(64,5): error TS2527: The inferred type of 'prop6' references an inaccessible 'this' type. A type annotation is necessary. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/this_inside-enum-should-not-be-allowed.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/this_inside-enum-should-not-be-allowed.d.ts.diff index 5d91ed92fd288..7bac25c1ebc2f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/this_inside-enum-should-not-be-allowed.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/this_inside-enum-should-not-be-allowed.d.ts.diff @@ -8,6 +8,7 @@ @@ -7,15 +7,18 @@ declare namespace ModuleEnum { } + /// [Errors] //// +this_inside-enum-should-not-be-allowed.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/twoAccessorsWithSameName.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/twoAccessorsWithSameName.d.ts.diff index 215283577962f..2e1165bb4b088 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/twoAccessorsWithSameName.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/twoAccessorsWithSameName.d.ts.diff @@ -17,6 +17,7 @@ declare var y: { x: number; }; + /// [Errors] //// @@ -27,11 +25,12 @@ twoAccessorsWithSameName.ts(8,9): error TS2300: Duplicate identifier 'x'. 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 index e1e4fb11846ad..9da241ca41357 100644 --- 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 @@ -46,9 +46,9 @@ export {}; } declare var ExpandoExpr2: (n: number) => string; -@@ -63,8 +50,12 @@ - }; +@@ -64,8 +51,12 @@ declare var n: number; + /// [Errors] //// +typeFromPropertyAssignment29.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. @@ -59,7 +59,7 @@ typeFromPropertyAssignment29.ts(78,14): error TS2339: Property 'm' does not exist on type '(n: number) => string'. typeFromPropertyAssignment29.ts(81,30): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. typeFromPropertyAssignment29.ts(81,50): error TS2339: Property 'm' does not exist on type '(n: number) => string'. -@@ -77,10 +68,12 @@ +@@ -78,10 +69,12 @@ typeFromPropertyAssignment29.ts(101,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. @@ -73,7 +73,7 @@ } ExpandoDecl.prop = 2 ExpandoDecl.m = function(n: number) { -@@ -119,8 +112,10 @@ +@@ -120,8 +113,10 @@ } @@ -84,7 +84,7 @@ total: number; } { const nested = function (m: number) { -@@ -131,8 +126,10 @@ +@@ -132,8 +127,10 @@ } ExpandoNested.also = -1; @@ -95,7 +95,7 @@ } ExpandoMerge.p1 = 111 namespace ExpandoMerge { -@@ -144,8 +141,10 @@ +@@ -145,8 +142,10 @@ var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); namespace Ns { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment31.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment31.d.ts.diff index d699c49e155b4..7e6fe96d39116 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment31.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment31.d.ts.diff @@ -21,6 +21,7 @@ @@ -20,14 +16,17 @@ } declare var n: number; + /// [Errors] //// +typeFromPropertyAssignment31.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment32.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment32.d.ts.diff index 5cad5b71fd6f0..4458c864fe3d0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment32.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment32.d.ts.diff @@ -21,6 +21,7 @@ @@ -22,16 +18,19 @@ var p2: number; } + /// [Errors] //// +expando.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment33.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment33.d.ts.diff index a3c033b7b137b..666bb0a81adfe 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment33.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment33.d.ts.diff @@ -21,6 +21,7 @@ @@ -22,8 +18,9 @@ var p2: number; } + /// [Errors] //// +expando.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment36.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment36.d.ts.diff index 126b5ee4c70df..6d17e9cfc9c52 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment36.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment36.d.ts.diff @@ -20,6 +20,7 @@ expando: number; both: string | number; }; + /// [Errors] //// typeFromPropertyAssignment36.ts(17,7): error TS2565: Property 'q' is used before being assigned. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment38.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment38.d.ts.diff index d7de9f68155d0..6a16f63473ef0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment38.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment38.d.ts.diff @@ -17,7 +17,8 @@ (): void; prop: number; }; -+/// [Errors] //// ++ + /// [Errors] //// + +typeFromPropertyAssignment38.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + 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 index da09f96be5386..299b4916100a9 100644 --- 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 @@ -5,14 +5,15 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,5 +1,48 @@ +@@ -1,5 +1,49 @@ - //// [main.d.ts] + //// [/.src/main.d.ts] -export declare const va: import("ext").A; -export declare const vb: import("ext/other").B; +export declare const va: invalid; +export declare const vb: invalid; ++ +/// [Errors] //// + +main.ts(4,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index f8736e16b3a92..0cd9fadb6b8a0 100644 --- 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 @@ -5,13 +5,14 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,22 +1,25 @@ +@@ -1,23 +1,26 @@ - //// [main.d.ts] + //// [/.src/main.d.ts] export declare const va: any; -export declare const vb: import("ext/other").B; +export declare const vb: invalid; + /// [Errors] //// main.ts(1,10): error TS2305: Module '"ext"' has no exported member 'fa'. 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 index d6426a648f50b..e928e79d152d0 100644 --- 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 @@ -5,14 +5,15 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,5 +1,45 @@ +@@ -1,5 +1,46 @@ - //// [main.d.ts] + //// [/.src/main.d.ts] -export declare const va: import("ext").A2; -export declare const va2: import("ext").A2; +export declare const va: invalid; +export declare const va2: invalid; ++ +/// [Errors] //// + +main.ts(4,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/underscoreEscapedNameInEnum.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/underscoreEscapedNameInEnum.d.ts.diff index 82940b1e03558..596524403b7aa 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/underscoreEscapedNameInEnum.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/underscoreEscapedNameInEnum.d.ts.diff @@ -10,7 +10,8 @@ "__foo" = 1, bar = 2 } -+/// [Errors] //// ++ + /// [Errors] //// + +underscoreEscapedNameInEnum.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff index fce3ded890dbd..324ba2d2859af 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff @@ -23,7 +23,8 @@ b = 2, c = 3 } -+/// [Errors] //// ++ + /// [Errors] //// + +bar.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +bar.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/wellKnownSymbolExpando.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/wellKnownSymbolExpando.d.ts.diff index 9b65345d9cb43..4e4d2b8e29e0c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/wellKnownSymbolExpando.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/wellKnownSymbolExpando.d.ts.diff @@ -11,7 +11,8 @@ //// [wellKnownSymbolExpando.d.ts] declare function f(): void; -declare namespace f { } -+/// [Errors] //// ++ + /// [Errors] //// + +wellKnownSymbolExpando.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments3_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments3_es6.d.ts index 68e833e4424a0..b8dfef89e6c11 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments3_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments3_es6.d.ts @@ -9,6 +9,7 @@ var v = { *{ } } //// [FunctionPropertyAssignments3_es6.d.ts] declare var v: invalid; + /// [Errors] //// FunctionPropertyAssignments3_es6.ts(1,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments5_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments5_es6.d.ts index 8668aaae29f45..593a00016ff44 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments5_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments5_es6.d.ts @@ -9,6 +9,7 @@ var v = { *[foo()](): Generator { } } //// [FunctionPropertyAssignments5_es6.d.ts] declare var v: invalid; + /// [Errors] //// FunctionPropertyAssignments5_es6.ts(1,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration5_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration5_es6.d.ts index 5b2fa039e0c26..887c579d907c2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration5_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration5_es6.d.ts @@ -13,6 +13,7 @@ class C { declare class C { (): invalid; } + /// [Errors] //// MemberFunctionDeclaration5_es6.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration6_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration6_es6.d.ts index 953da93ba58b0..96f656a1e05d9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration6_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration6_es6.d.ts @@ -13,6 +13,7 @@ class C { declare class C { foo(): invalid; } + /// [Errors] //// MemberFunctionDeclaration6_es6.ts(2,5): error TS2391: Function implementation is missing or not immediately following the declaration. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnum1.d.ts index 162c63dddd42a..89a97fab5c7cd 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnum1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnum1.d.ts @@ -21,6 +21,7 @@ declare enum E1 { declare enum E2 { x } + /// [Errors] //// ambientEnum1.ts(7,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnumDeclaration1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnumDeclaration1.d.ts index adefefb29c273..434ed114a0cfc 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnumDeclaration1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnumDeclaration1.d.ts @@ -23,6 +23,7 @@ declare enum E { d = 12, e = 655360 } + /// [Errors] //// ambientEnumDeclaration1.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientErrors.d.ts index d79abd6370626..cec1426fd917d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientErrors.d.ts @@ -100,6 +100,7 @@ declare module 'bar' { export var q: any; export = n; } + /// [Errors] //// ambientErrors.ts(2,17): error TS1039: Initializers are not allowed in ambient contexts. 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 index 3ae3ea1ed25af..8b8f44fd12a2c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrayFakeFlatNoCrashInferenceDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrayFakeFlatNoCrashInferenceDeclarations.d.ts @@ -30,6 +30,7 @@ type BadFlatArray = { }["obj"]; declare function flat(arr: A, depth?: D): BadFlatArray[]; declare function foo(arr: T[], depth: number): invalid; + /// [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. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrowFunctionContexts.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrowFunctionContexts.d.ts index e66b45993bffd..99829feb83115 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrowFunctionContexts.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrowFunctionContexts.d.ts @@ -137,6 +137,7 @@ declare var asserted1: any; declare var asserted1: any; declare var asserted2: any; declare var asserted2: any; + /// [Errors] //// arrowFunctionContexts.ts(2,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier.d.ts index cd7b5b34b7732..f5d71f2688043 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier.d.ts @@ -13,6 +13,7 @@ class C { declare class C { : invalid; } + /// [Errors] //// classMemberWithMissingIdentifier.ts(2,11): error TS1146: Declaration expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier2.d.ts index 5d9e2cd5fc529..b3fa760854c5f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier2.d.ts @@ -13,6 +13,7 @@ class C { declare class C { : invalid; } + /// [Errors] //// classMemberWithMissingIdentifier2.ts(2,11): error TS1146: Declaration expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/collisionCodeGenEnumWithEnumMemberConflict.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/collisionCodeGenEnumWithEnumMemberConflict.d.ts index 226e1b3c6b216..4f5817acf67d7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/collisionCodeGenEnumWithEnumMemberConflict.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/collisionCodeGenEnumWithEnumMemberConflict.d.ts @@ -15,6 +15,7 @@ declare enum Color { Color = 0, Thing = 0 } + /// [Errors] //// collisionCodeGenEnumWithEnumMemberConflict.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commonMissingSemicolons.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commonMissingSemicolons.d.ts index fa000feb9057f..2f8125c86e94d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commonMissingSemicolons.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commonMissingSemicolons.d.ts @@ -124,6 +124,7 @@ declare class NoSemicolonClassD { declare class NoSemicolonClassE { ['a']: any; } + /// [Errors] //// commonMissingSemicolons.ts(1,36): error TS2705: An async function or method 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/dte/computedEnumTypeWidening.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedEnumTypeWidening.d.ts index 027ebc638bca7..494a53136b44f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedEnumTypeWidening.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedEnumTypeWidening.d.ts @@ -123,6 +123,7 @@ declare enum MyDeclaredEnum { C } declare let val2: MyDeclaredEnum; + /// [Errors] //// computedEnumTypeWidening.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES5.d.ts index c9f8c91a1fe38..44e2cdf2490f7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES5.d.ts @@ -27,6 +27,7 @@ declare var s: string; declare var n: number; declare var a: any; declare var v: invalid; + /// [Errors] //// computedPropertyNames10_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES6.d.ts index 82258c0879def..3d34a73ff41da 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES6.d.ts @@ -27,6 +27,7 @@ declare var s: string; declare var n: number; declare var a: any; declare var v: invalid; + /// [Errors] //// computedPropertyNames10_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum1.d.ts index 2ce87d5370af1..4d1388b4c9e76 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum1.d.ts @@ -31,6 +31,7 @@ declare const enum E { g = 20, h = 10 } + /// [Errors] //// constEnum1.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 7615ae0524124..1bd94edf8fa9d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum2.d.ts @@ -27,6 +27,7 @@ declare const enum D { f, g } + /// [Errors] //// constEnum2.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumDeclarations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumDeclarations.d.ts index a2fb530a09c8a..459605de1dc51 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumDeclarations.d.ts @@ -28,6 +28,7 @@ declare const enum E2 { B = 2, C = 3 } + /// [Errors] //// constEnumDeclarations.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumErrors.d.ts index 6612faec81a42..15a5f9e3e2210 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumErrors.d.ts @@ -81,6 +81,7 @@ declare const enum NaNOrInfinity { G = Infinity,// overflow H = NaN } + /// [Errors] //// constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumNamespaceReferenceCausesNoImport2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumNamespaceReferenceCausesNoImport2.d.ts index f8c2ae6363247..a5aef4fd0189b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumNamespaceReferenceCausesNoImport2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumNamespaceReferenceCausesNoImport2.d.ts @@ -41,6 +41,7 @@ export {}; //// [reexport.d.ts] declare const _default: invalid; export = _default; + /// [Errors] //// reexport.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess1.d.ts index 6dc8bdd03ba8e..19c200322ba94 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess1.d.ts @@ -54,6 +54,7 @@ declare class C { get [G.B](): number; set [G.B](x: number); } + /// [Errors] //// constEnumPropertyAccess1.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess2.d.ts index 19867a0b97020..ae0c5165a123d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess2.d.ts @@ -36,6 +36,7 @@ declare var z: typeof G; declare var z1: any; declare var g: G; declare function foo(x: G): void; + /// [Errors] //// constEnumPropertyAccess2.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess3.d.ts index 6afcb14296e6f..3656db0ae1d91 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess3.d.ts @@ -33,6 +33,7 @@ declare const enum E { D = -3, E = -9 } + /// [Errors] //// constEnumPropertyAccess3.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnums.d.ts index d2d5dd9f6f16a..b1250a9cc5feb 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnums.d.ts @@ -279,6 +279,7 @@ declare function foo2(e: I2.C.E): void; declare function foo(x: Enum1): void; declare function bar(e: A.B.C.E): number; declare function baz(c: Comments): void; + /// [Errors] //// constEnums.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constantEnumAssert.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constantEnumAssert.d.ts index d74a4b26d5d09..3715c44979225 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constantEnumAssert.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constantEnumAssert.d.ts @@ -138,6 +138,7 @@ declare const foo11: { declare const foo12: { a: string; }; + /// [Errors] //// constantEnumAssert.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constructorWithIncompleteTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constructorWithIncompleteTypeAnnotation.d.ts index fdae6199a34ae..1a0b32786e535 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constructorWithIncompleteTypeAnnotation.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constructorWithIncompleteTypeAnnotation.d.ts @@ -339,6 +339,7 @@ declare enum Fruit { interface IDisposable { Dispose(): void; } + /// [Errors] //// constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2503: Cannot find namespace 'module'. 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 index 6af2462bea0de..11f4fcec898e9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts @@ -70,6 +70,7 @@ declare enum e5 { "Sunday" = 2, "Weekend days" = 3 } + /// [Errors] //// declFileEnums.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index e79a4ff56bdec..f5529b029ab4b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCommonJsModuleReferencedType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCommonJsModuleReferencedType.d.ts @@ -32,6 +32,7 @@ export const y: RootProps = bar(); import { RootProps } from "root"; export declare const x: invalid; export declare const y: RootProps; + /// [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. 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 index 5a1cc4d706579..be2939882c202 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDefaultExportWithStaticAssignment.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDefaultExportWithStaticAssignment.d.ts @@ -55,6 +55,7 @@ export default function Example(): void; //// [index4.d.ts] export declare function C(): any; + /// [Errors] //// index1.ts(2,25): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index 534ed21bc6ce7..e097f5f6e1ef9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringParameterProperties.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringParameterProperties.d.ts @@ -47,6 +47,7 @@ declare class C3 { z: invalid; constructor({ x, y, z }: ObjType1); } + /// [Errors] //// declarationEmitDestructuringParameterProperties.ts(2,17): error TS1187: A parameter property may not be declared using a binding pattern. 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 index 8789026e2edbf..7146718c59d3a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoPropertyPrivateName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoPropertyPrivateName.d.ts @@ -22,6 +22,7 @@ export {}; //// [b.d.ts] export declare function q(): void; + /// [Errors] //// b.ts(3,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index c2d837d2a3086..326ef3ea98833 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink.d.ts @@ -40,6 +40,7 @@ export const a: import("typescript-fsa").A; //// [/p1/index.d.ts] export declare const a: invalid; + /// [Errors] //// /p1/index.ts(4,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 77a5720c5c3b1..8478b7be51386 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink2.d.ts @@ -28,6 +28,7 @@ export const a: import("typescript-fsa").A; //// [/p1/index.d.ts] export declare const a: invalid; + /// [Errors] //// /p1/index.ts(4,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 272618efb14f8..a31877e12a5d7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionDuplicateNamespace.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionDuplicateNamespace.d.ts @@ -17,6 +17,7 @@ f.x = 2; //// [declarationEmitFunctionDuplicateNamespace.d.ts] declare function f(a: 0): 0; declare function f(a: 1): 1; + /// [Errors] //// declarationEmitFunctionDuplicateNamespace.ts(2,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index 759e0aaf920d8..e21c66e05e68f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionKeywordProp.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionKeywordProp.d.ts @@ -20,6 +20,7 @@ baz.normal = false; declare function foo(): void; declare function bar(): void; declare function baz(): void; + /// [Errors] //// declarationEmitFunctionKeywordProp.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index ab82fbaee7e25..a46df5847196b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments.d.ts @@ -23,6 +23,7 @@ const a: string = foo[dashStrMem]; //// [declarationEmitLateBoundAssignments.d.ts] export declare function foo(): void; + /// [Errors] //// declarationEmitLateBoundAssignments.ts(1,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index fd015da377348..eebaea6e6dc88 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts @@ -125,6 +125,7 @@ export declare const arrow9: { "🤪": number; }; export declare const arrow10: invalid; + /// [Errors] //// declarationEmitLateBoundAssignments2.ts(9,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index 33fef1c1b74a0..2d360dc908261 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectAssignedDefaultExport.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectAssignedDefaultExport.d.ts @@ -49,6 +49,7 @@ import { DefaultTheme, StyledComponent } from "styled-components"; export declare const C: StyledComponent<"div", DefaultTheme, {}, never>; declare const _default: invalid; export default _default; + /// [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. 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 index 12a66a7f469d9..4092fd214bfa1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference.d.ts @@ -52,6 +52,7 @@ export * from './keys'; //// [monorepo/pkg3/dist/keys.d.ts] export declare const ADMIN: invalid; + /// [Errors] //// monorepo/pkg3/src/keys.ts(3,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 8c9ed117f1a9d..81a8d4388abb9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference2.d.ts @@ -55,6 +55,7 @@ export * from './keys'; //// [monorepo/pkg3/dist/keys.d.ts] export declare const ADMIN: invalid; + /// [Errors] //// monorepo/pkg3/src/keys.ts(3,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 24e2bd3a3b5a6..d4534393d1572 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference3.d.ts @@ -52,6 +52,7 @@ export * from './keys'; //// [monorepo/pkg3/dist/keys.d.ts] export declare const ADMIN: invalid; + /// [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. 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 index 79890f33b2da8..af6edaccac2be 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithInvalidPackageJsonTypings.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithInvalidPackageJsonTypings.d.ts @@ -35,6 +35,7 @@ export interface MutableRefObject { } export declare function useRef(current: T): MutableRefObject; export declare const useCsvParser: invalid; + /// [Errors] //// /p1/index.ts(7,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts index 620c8480ad339..aedd3c07406fa 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts @@ -96,6 +96,7 @@ declare class C4 { f3(): invalid; f4(): () => this; } + /// [Errors] //// declarationFiles.ts(4,20): error TS2526: A 'this' type is available only in a non-static member of a class or interface. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationInAmbientContext.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationInAmbientContext.d.ts index 1bb0306b1b6be..41d673d466237 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationInAmbientContext.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationInAmbientContext.d.ts @@ -12,6 +12,7 @@ declare var {c, d}; // Error, destructuring declaration not allowed in ambient //// [declarationInAmbientContext.d.ts] declare var a: invalid, b: invalid; declare var c: invalid, d: invalid; + /// [Errors] //// declarationInAmbientContext.ts(1,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationWithNoInitializer.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationWithNoInitializer.d.ts index f8f4aadf71238..b6b9f16843bdc 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationWithNoInitializer.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationWithNoInitializer.d.ts @@ -12,6 +12,7 @@ var {c, d}; // Error, no initializer //// [declarationWithNoInitializer.d.ts] declare var a: invalid, b: invalid; declare var c: invalid, d: invalid; + /// [Errors] //// declarationWithNoInitializer.ts(1,5): error TS1182: A destructuring declaration must have an initializer. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterDeclaration6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterDeclaration6.d.ts index bed4236027a15..4377d24656e68 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterDeclaration6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterDeclaration6.d.ts @@ -64,6 +64,7 @@ declare function b1({ public: x }: { declare function b2({ while: y }: { while: any; }): void; + /// [Errors] //// destructuringParameterDeclaration6.ts(7,18): error TS1005: ':' expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties1.d.ts index 9ef9cde4c4540..070bfd8fa92f9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties1.d.ts @@ -78,6 +78,7 @@ declare const dest_1: any[]; declare const c3_x: any; declare const c3_y: any; declare const c3_z: any; + /// [Errors] //// destructuringParameterProperties1.ts(2,17): error TS1187: A parameter property may not be declared using a binding pattern. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties2.d.ts index 0af4353169e53..ff0fc96ba03fc 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties2.d.ts @@ -70,6 +70,7 @@ declare const dest: any[]; declare const z_a: any; declare const z_b: any; declare const z_c: any; + /// [Errors] //// destructuringParameterProperties2.ts(2,36): error TS1187: A parameter property may not be declared using a binding pattern. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties3.d.ts index 1ab8fda29f316..2be24cfbac2be 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties3.d.ts @@ -81,6 +81,7 @@ declare const dest_1: any[]; declare const z_a: any; declare const z_b: any; declare const z_c: any; + /// [Errors] //// destructuringParameterProperties3.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties4.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties4.d.ts index d253a3cdf5fee..17945919b2d21 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties4.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties4.d.ts @@ -46,6 +46,7 @@ declare class C1 { declare class C2 extends C1 { doSomethingWithSuperProperties(): string; } + /// [Errors] //// destructuringParameterProperties4.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties5.d.ts index 9ed1c42c224cc..6b1fcfea85fba 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties5.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties5.d.ts @@ -46,6 +46,7 @@ declare const a_x2: any; declare const a_x3: any; declare const a_y: any; declare const a_z: any; + /// [Errors] //// destructuringParameterProperties5.ts(5,17): error TS1187: A parameter property may not be declared using a binding pattern. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/disallowLineTerminatorBeforeArrow.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/disallowLineTerminatorBeforeArrow.d.ts index ccc823b3ccc4d..e836e947d07f3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/disallowLineTerminatorBeforeArrow.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/disallowLineTerminatorBeforeArrow.d.ts @@ -106,6 +106,7 @@ declare namespace m { } var v: any, any: any; } + /// [Errors] //// disallowLineTerminatorBeforeArrow.ts(67,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicateObjectLiteralProperty.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicateObjectLiteralProperty.d.ts index 6bfb06103a718..4356135fea96a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicateObjectLiteralProperty.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicateObjectLiteralProperty.d.ts @@ -32,6 +32,7 @@ declare var x: { b: boolean; }; declare var y: invalid; + /// [Errors] //// duplicateObjectLiteralProperty.ts(4,5): error TS1117: An object literal cannot have multiple properties with the same name. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumAssignmentCompat5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumAssignmentCompat5.d.ts index ebd91eace9039..2142b8547e252 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumAssignmentCompat5.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumAssignmentCompat5.d.ts @@ -46,6 +46,7 @@ declare let e: E; declare let a: E.A; declare let c: Computed; declare let ca: Computed.A; + /// [Errors] //// enumAssignmentCompat5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics.d.ts index bd7b5ba9f123d..9818f54dd2237 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics.d.ts @@ -140,6 +140,7 @@ declare enum E9 { } declare var doNotPropagate: (E8 | E7 | E4 | E3)[]; declare var doPropagate: (E9 | E6 | E5)[]; + /// [Errors] //// enumBasics.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics2.d.ts index b18c363e9d92f..cd76be299f30e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics2.d.ts @@ -35,6 +35,7 @@ declare enum Bar { c,// ok d } + /// [Errors] //// enumBasics2.ts(4,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics3.d.ts index 14c0feaeb6db2..ff61a9e6ef4ae 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics3.d.ts @@ -41,6 +41,7 @@ declare namespace M { } } } + /// [Errors] //// enumBasics3.ts(5,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 40d27a53c46ed..33a23a62c3f77 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumClassification.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumClassification.d.ts @@ -143,6 +143,7 @@ declare enum E20 { C, D } + /// [Errors] //// enumClassification.ts(74,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithString.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithString.d.ts index 1c85ec9761613..c9b9f13c355e1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithString.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithString.d.ts @@ -67,6 +67,7 @@ declare enum T6 { a = "1", b = "12" } + /// [Errors] //// enumConstantMemberWithString.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithStringEmitDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithStringEmitDeclaration.d.ts index 83f7bf9d02f64..a38ecce37e5d1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithStringEmitDeclaration.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithStringEmitDeclaration.d.ts @@ -59,6 +59,7 @@ declare enum T6 { a = "1", b = "12" } + /// [Errors] //// enumConstantMemberWithStringEmitDeclaration.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiterals.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiterals.d.ts index 79c8dee36a32c..aeb142660e6c1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiterals.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiterals.d.ts @@ -88,6 +88,7 @@ declare enum T7 { b = "11", c = "21" } + /// [Errors] //// enumConstantMemberWithTemplateLiterals.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 22637c81be3f7..fba09c0089f91 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts @@ -80,6 +80,7 @@ declare enum T7 { b = "11", c = "21" } + /// [Errors] //// enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(32,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMembers.d.ts index 91324530eef47..a170e0da0fc19 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMembers.d.ts @@ -82,6 +82,7 @@ declare const enum E6 { f, g } + /// [Errors] //// enumConstantMembers.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrorOnConstantBindingWithInitializer.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrorOnConstantBindingWithInitializer.d.ts index aa37cddf0c55d..0deeba8f9c401 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrorOnConstantBindingWithInitializer.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrorOnConstantBindingWithInitializer.d.ts @@ -28,6 +28,7 @@ declare const value: string | number; declare enum E { test } + /// [Errors] //// enumErrorOnConstantBindingWithInitializer.ts(7,7): error TS2322: Type 'string | number | undefined' is not assignable to type 'string | number'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrors.d.ts index 599b0c13ebf3e..2feb88ebf225d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrors.d.ts @@ -113,6 +113,7 @@ declare enum E14 { c = 5, d = 6 } + /// [Errors] //// enumErrors.ts(2,6): error TS2431: Enum name cannot be 'any'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumExportMergingES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumExportMergingES6.d.ts index 7fee4324b5777..8bfc2624275c9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumExportMergingES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumExportMergingES6.d.ts @@ -26,6 +26,7 @@ export declare enum Animals { export declare enum Animals { CatDog } + /// [Errors] //// enumExportMergingES6.ts(8,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumLiteralAssignableToEnumInsideUnion.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumLiteralAssignableToEnumInsideUnion.d.ts index 122035ba8c050..ee6dc42a4c928 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumLiteralAssignableToEnumInsideUnion.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumLiteralAssignableToEnumInsideUnion.d.ts @@ -66,6 +66,7 @@ declare const e2: X.Foo.A | X.Foo.B | boolean; declare const e3: X.Foo.B | boolean; declare const e4: X.Foo.A | boolean; declare const e5: Ka.Foo | boolean; + /// [Errors] //// enumLiteralAssignableToEnumInsideUnion.ts(13,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMerging.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMerging.d.ts index 0b9aa771f1a97..4ba5274327865 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMerging.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMerging.d.ts @@ -127,6 +127,7 @@ declare namespace M6 { } } } + /// [Errors] //// enumMerging.ts(26,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMergingErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMergingErrors.d.ts index 1930b7708d019..d27913d2bca24 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMergingErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMergingErrors.d.ts @@ -112,6 +112,7 @@ declare namespace M2 { C = 0 } } + /// [Errors] //// enumMergingErrors.ts(8,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumNumbering1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumNumbering1.d.ts index 5a0c9b0585a0c..e5630e5c9bb2b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumNumbering1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumNumbering1.d.ts @@ -22,6 +22,7 @@ declare enum Test { D = 10, E = 11 } + /// [Errors] //// enumNumbering1.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumPropertyAccessBeforeInitalisation.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumPropertyAccessBeforeInitalisation.d.ts index 67209cdfb9221..c28227718654f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumPropertyAccessBeforeInitalisation.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumPropertyAccessBeforeInitalisation.d.ts @@ -20,6 +20,7 @@ declare enum E { C, D } + /// [Errors] //// enumPropertyAccessBeforeInitalisation.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithComputedMember.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithComputedMember.d.ts index acdbedb538395..d187e300b942d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithComputedMember.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithComputedMember.d.ts @@ -18,6 +18,7 @@ declare enum A { Y, Z } + /// [Errors] //// enumWithComputedMember.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithExport.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithExport.d.ts index a078453633fa5..eddd40d2b522c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithExport.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithExport.d.ts @@ -19,6 +19,7 @@ declare namespace x { declare enum x { z } + /// [Errors] //// enumWithExport.ts(5,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithParenthesizedInitializer1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithParenthesizedInitializer1.d.ts index 2267f6c3ba11f..d7693a73095e9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithParenthesizedInitializer1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithParenthesizedInitializer1.d.ts @@ -13,6 +13,7 @@ enum E { declare enum E { e = -3 } + /// [Errors] //// enumWithParenthesizedInitializer1.ts(2,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithoutInitializerAfterComputedMember.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithoutInitializerAfterComputedMember.d.ts index f362f594a2c9e..5ba602538bebe 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithoutInitializerAfterComputedMember.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithoutInitializerAfterComputedMember.d.ts @@ -17,6 +17,7 @@ declare enum E { b = 0, c = 1 } + /// [Errors] //// enumWithoutInitializerAfterComputedMember.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/equalityWithEnumTypes.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/equalityWithEnumTypes.d.ts index 8e96731cb769b..fe4a60daf2e9e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/equalityWithEnumTypes.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/equalityWithEnumTypes.d.ts @@ -59,6 +59,7 @@ declare enum E2 { } declare function f1(v: E1): void; declare function f2(v: E2): void; + /// [Errors] //// equalityWithEnumTypes.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exactSpellingSuggestion.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exactSpellingSuggestion.d.ts index 012165eac6cb9..d20302a69538b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exactSpellingSuggestion.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exactSpellingSuggestion.d.ts @@ -22,6 +22,7 @@ declare enum U8 { BIT_1 = 2, BIT_2 = 4 } + /// [Errors] //// exactSpellingSuggestion.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesJSDocInTs.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesJSDocInTs.d.ts index c3ba2de8c036c..567ea84a15598 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesJSDocInTs.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesJSDocInTs.d.ts @@ -14,6 +14,7 @@ Foo.bar = () => { }; //// [expandoFunctionContextualTypesJSDocInTs.d.ts] export declare function Foo(): void; + /// [Errors] //// expandoFunctionContextualTypesJSDocInTs.ts(1,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesNoValue.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesNoValue.d.ts index e5d8d12b79169..eb3b39eae8959 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesNoValue.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesNoValue.d.ts @@ -15,6 +15,7 @@ Foo.bar = () => { }; //// [expandoFunctionContextualTypesNoValue.d.ts] export declare function Foo(): void; + /// [Errors] //// expandoFunctionContextualTypesNoValue.ts(2,17): error TS2307: Cannot find module 'blah' or its corresponding type declarations. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionExpressionsWithDynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionExpressionsWithDynamicNames.d.ts index 70a65fa17a926..5a6c38cf7819c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionExpressionsWithDynamicNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionExpressionsWithDynamicNames.d.ts @@ -19,6 +19,7 @@ expr2[s] = 0 //// [expandoFunctionExpressionsWithDynamicNames.d.ts] export declare const expr: invalid; export declare const expr2: invalid; + /// [Errors] //// expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignDottedName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignDottedName.d.ts index 5e8b4234ce984..4eb5e26afb7f7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignDottedName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignDottedName.d.ts @@ -20,6 +20,7 @@ export declare function x(): boolean; //// [foo2.d.ts] declare const _default: invalid; export = _default; + /// [Errors] //// foo2.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignNonIdentifier.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignNonIdentifier.d.ts index bdbdc2d428baa..18f61de716963 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignNonIdentifier.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignNonIdentifier.d.ts @@ -63,6 +63,7 @@ export = _default; //// [foo8.d.ts] declare const _default: any; export = _default; + /// [Errors] //// foo1.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentWithoutIdentifier1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentWithoutIdentifier1.d.ts index 99f679f495acf..11d5a2dbd71c7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentWithoutIdentifier1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentWithoutIdentifier1.d.ts @@ -17,6 +17,7 @@ export = new Greeter(); //// [exportAssignmentWithoutIdentifier1.d.ts] declare const _default: invalid; export = _default; + /// [Errors] //// exportAssignmentWithoutIdentifier1.ts(7,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 6aa14f9fce679..0b084e203c1bc 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportDefaultNamespace.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportDefaultNamespace.d.ts @@ -14,6 +14,7 @@ someFunc.someProp = 'yo'; //// [exportDefaultNamespace.d.ts] export default function someFunc(): string; + /// [Errors] //// exportDefaultNamespace.ts(1,25): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty.d.ts index 1c5515aa01be4..40a195c7ad11b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty.d.ts @@ -54,6 +54,7 @@ export = _default; //// [index.d.ts] export {}; + /// [Errors] //// a.ts(5,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty2.d.ts index 5da96ef26965e..e5b7f9ce11385 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty2.d.ts @@ -27,6 +27,7 @@ export = _default; //// [b.d.ts] export {}; + /// [Errors] //// a.ts(10,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/forwardRefInEnum.d.ts index e8573db45a70e..20f19dc601929 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/forwardRefInEnum.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/forwardRefInEnum.d.ts @@ -30,6 +30,7 @@ declare enum E1 { declare enum E1 { Z = 4 } + /// [Errors] //// forwardRefInEnum.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/functionImplementations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/functionImplementations.d.ts index 485dd53631c94..75ea04bd1465d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/functionImplementations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/functionImplementations.d.ts @@ -216,6 +216,7 @@ declare var f9: (x: number) => any; declare var f10: (x: number) => any; declare var f11: (x: number) => any; declare var f12: (x: number) => any; + /// [Errors] //// functionImplementations.ts(40,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/initializersInAmbientEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/initializersInAmbientEnums.d.ts index aa1ccab69a357..47ff347c254e4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/initializersInAmbientEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/initializersInAmbientEnums.d.ts @@ -17,6 +17,7 @@ declare enum E { b = 10, e = 655360 } + /// [Errors] //// initializersInAmbientEnums.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts index 8891a58fb4663..c9c1d5697566c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts @@ -74,6 +74,7 @@ declare namespace Uninstantiated { declare namespace Ambient { const x: number; } + /// [Errors] //// enum2.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsContainerMergeTsDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsContainerMergeTsDeclaration.d.ts index 8046e9732e506..327e8570e9e6b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsContainerMergeTsDeclaration.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsContainerMergeTsDeclaration.d.ts @@ -17,6 +17,7 @@ var x = function (): number { //// [b.d.ts] declare var x: invalid; + /// [Errors] //// error TS6504: File 'a.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxComponentTypeErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxComponentTypeErrors.d.ts index 9d28083ef18a4..fd34416ae3e12 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxComponentTypeErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxComponentTypeErrors.d.ts @@ -77,6 +77,7 @@ declare const obj: { }; declare const elem5: JSX.Element; declare const elem6: JSX.Element; + /// [Errors] //// jsxComponentTypeErrors.tsx(10,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespace.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespace.d.ts index b7490c293acb8..2df2bbf44fe60 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespace.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespace.d.ts @@ -107,6 +107,7 @@ export const Comp = () =>
; //// [/index.d.ts] export declare const Comp: invalid; + /// [Errors] //// /index.tsx(1,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts index a3510b55d8dd0..9c7a5ca24c905 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts @@ -70,6 +70,7 @@ export const Comp = () =>
; //// [/index.d.ts] export declare const Comp: invalid; + /// [Errors] //// /index.tsx(1,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts index a3510b55d8dd0..9c7a5ca24c905 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts @@ -70,6 +70,7 @@ export const Comp = () =>
; //// [/index.d.ts] export declare const Comp: invalid; + /// [Errors] //// /index.tsx(1,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts index 9f96337fc48f8..4d3f4e6c301a0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts @@ -71,6 +71,7 @@ export const Comp = () =>
; //// [/index.d.ts] export declare const Comp: invalid; + /// [Errors] //// /index.tsx(2,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 0a2fb674cb0b7..fc306741138b3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/lateBoundFunctionMemberAssignmentDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/lateBoundFunctionMemberAssignmentDeclarations.d.ts @@ -15,6 +15,7 @@ const x: string = foo[_private]; //// [index.d.ts] export declare function foo(): void; + /// [Errors] //// index.ts(1,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index f3025bc4c4d49..3b0038ecd7823 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts @@ -37,6 +37,7 @@ export interface Thing {} // not exported in export map, inaccessible under new //// [index.d.ts] export declare const a: invalid; + /// [Errors] //// index.ts(1,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedDeclarations2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedDeclarations2.d.ts index 17bbbfa362ac7..f64b390eb3bfa 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedDeclarations2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedDeclarations2.d.ts @@ -26,6 +26,7 @@ declare enum Foo { declare namespace Foo { var x: any; } + /// [Errors] //// mergedDeclarations2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedEnumDeclarationCodeGen.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedEnumDeclarationCodeGen.d.ts index 9868ce4a02269..6592af6dc3cf3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedEnumDeclarationCodeGen.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedEnumDeclarationCodeGen.d.ts @@ -21,6 +21,7 @@ declare enum E { declare enum E { c } + /// [Errors] //// mergedEnumDeclarationCodeGen.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/methodContainingLocalFunction.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/methodContainingLocalFunction.d.ts index 657353e97ac1c..7b3aa4e8c8937 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/methodContainingLocalFunction.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/methodContainingLocalFunction.d.ts @@ -75,6 +75,7 @@ declare namespace M { declare enum E { A } + /// [Errors] //// methodContainingLocalFunction.ts(44,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixedTypeEnumComparison.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixedTypeEnumComparison.d.ts index 9bc262e0fa3d5..5b4258dc29de4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixedTypeEnumComparison.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixedTypeEnumComparison.d.ts @@ -61,6 +61,7 @@ declare enum E2 { N1 = 1000, C1 } + /// [Errors] //// mixedTypeEnumComparison.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationDisallowedExtensions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationDisallowedExtensions.d.ts index d929123351c1c..f685143fd6ac3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationDisallowedExtensions.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationDisallowedExtensions.d.ts @@ -91,6 +91,7 @@ export {}; //// [x0.d.ts] export declare let a: number; + /// [Errors] //// x.ts(9,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationNoNewNames.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationNoNewNames.d.ts index b9f47f16215cd..e2c1380193b30 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationNoNewNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationNoNewNames.d.ts @@ -51,6 +51,7 @@ export {}; export declare class Observable { filter(pred: (e: T) => boolean): Observable; } + /// [Errors] //// map.ts(11,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/negateOperatorInvalidOperations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/negateOperatorInvalidOperations.d.ts index 582b42abad32e..75908bd6956f1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/negateOperatorInvalidOperations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/negateOperatorInvalidOperations.d.ts @@ -25,6 +25,7 @@ declare var NUMBER2: number; declare var NUMBER3: number; declare var NUMBER4: number; declare var NUMBER: number; + /// [Errors] //// negateOperatorInvalidOperations.ts(4,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/newTargetNarrowing.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/newTargetNarrowing.d.ts index 7cbd471230969..ec41a2ca1e765 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/newTargetNarrowing.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/newTargetNarrowing.d.ts @@ -19,6 +19,7 @@ f.marked = true; //// [newTargetNarrowing.d.ts] declare function foo(x: true): void; declare function f(): void; + /// [Errors] //// newTargetNarrowing.ts(3,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/noImplicitAnyDestructuringVarDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/noImplicitAnyDestructuringVarDeclaration.d.ts index 3ec28637df243..09c7d32bef6c3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/noImplicitAnyDestructuringVarDeclaration.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/noImplicitAnyDestructuringVarDeclaration.d.ts @@ -40,6 +40,7 @@ declare var c4: any, d4: any; declare const dest_2: any[]; declare const temp: any; declare const a5: any; + /// [Errors] //// noImplicitAnyDestructuringVarDeclaration.ts(1,5): error TS1182: A destructuring declaration must have an initializer. 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 index ab71888fca1a6..81d2767358127 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModuleReexportFromDottedPath.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModuleReexportFromDottedPath.d.ts @@ -26,6 +26,7 @@ export default new EnhancedPrisma(); //// [/index.d.ts] declare const _default: invalid; export default _default; + /// [Errors] //// /index.ts(4,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 885b52a11b5bb..b3e9530ded065 100644 --- 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 @@ -32,6 +32,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 885b52a11b5bb..b3e9530ded065 100644 --- 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 @@ -32,6 +32,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 94633bf7dfcac..843fa95ee9504 100644 --- 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 @@ -41,6 +41,7 @@ export { x } from "./other.js"; export interface Thing { } export declare const x: () => Thing; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 94633bf7dfcac..843fa95ee9504 100644 --- 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 @@ -41,6 +41,7 @@ export { x } from "./other.js"; export interface Thing { } export declare const x: () => Thing; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 264f42f364b14..92e5f49ba387d 100644 --- 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 @@ -39,6 +39,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 264f42f364b14..92e5f49ba387d 100644 --- 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 @@ -39,6 +39,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 13860dade036c..c872a71e6272c 100644 --- 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 @@ -34,6 +34,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 13860dade036c..c872a71e6272c 100644 --- 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 @@ -34,6 +34,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index fca3f9cde9f6e..66297fbf40405 100644 --- 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 @@ -34,6 +34,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index fca3f9cde9f6e..66297fbf40405 100644 --- 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 @@ -34,6 +34,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 3bfc97c1a624a..9436348989c52 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nullPropertyName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nullPropertyName.d.ts @@ -91,6 +91,7 @@ foo.of = 1; //// [nullPropertyName.d.ts] declare function foo(): void; + /// [Errors] //// nullPropertyName.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index a95dca7e1cd86..c85b83d6381f8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/numericEnumMappedType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/numericEnumMappedType.d.ts @@ -83,6 +83,7 @@ declare enum E { } declare const e: E; declare const x: E.ONE; + /// [Errors] //// numericEnumMappedType.ts(25,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/objectLiteralGettersAndSetters.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/objectLiteralGettersAndSetters.d.ts index 2c6b2b4d03ecb..29204015021c3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/objectLiteralGettersAndSetters.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/objectLiteralGettersAndSetters.d.ts @@ -202,6 +202,7 @@ declare var getParamType2: { declare var getParamType3: { n: string; }; + /// [Errors] //// objectLiteralGettersAndSetters.ts(65,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/overloadingStaticFunctionsInFunctions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/overloadingStaticFunctionsInFunctions.d.ts index 9df8be400e908..9b68fda442a05 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/overloadingStaticFunctionsInFunctions.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/overloadingStaticFunctionsInFunctions.d.ts @@ -13,6 +13,7 @@ function boo { //// [overloadingStaticFunctionsInFunctions.d.ts] declare function boo(): invalid; + /// [Errors] //// overloadingStaticFunctionsInFunctions.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.classMethods.es2018.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.classMethods.es2018.d.ts index f642fc0eb82ef..6c86d3d7ef199 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.classMethods.es2018.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.classMethods.es2018.d.ts @@ -283,6 +283,7 @@ declare class C16 { declare class C14 { f(): AsyncGenerator; } + /// [Errors] //// asyncGeneratorGetAccessorIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts index b9da0bea73c79..851372a6a66cb 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts @@ -266,6 +266,7 @@ declare const o16: { declare const o14: { f(): AsyncGenerator; }; + /// [Errors] //// asyncGeneratorGetAccessorIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum1.d.ts index ba053541bc513..88410a71721c1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum1.d.ts @@ -19,6 +19,7 @@ export declare enum SignatureFlags { IsStringIndexer = 2, IsNumberIndexer = 4 } + /// [Errors] //// parserEnum1.ts(4,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum2.d.ts index b87f150de927f..24e0476125a80 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum2.d.ts @@ -19,6 +19,7 @@ export declare enum SignatureFlags { IsStringIndexer = 2, IsNumberIndexer = 4 } + /// [Errors] //// parserEnum2.ts(4,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnumDeclaration6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnumDeclaration6.d.ts index 2629c070887ac..24cb08b56a424 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnumDeclaration6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnumDeclaration6.d.ts @@ -19,6 +19,7 @@ declare enum E { C = 2, D = 3 } + /// [Errors] //// parserEnumDeclaration6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction1.d.ts index bd61c7f6961ee..886d612a03723 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction1.d.ts @@ -9,6 +9,7 @@ function => //// [parserEqualsGreaterThanAfterFunction1.d.ts] declare function (): invalid; + /// [Errors] //// parserEqualsGreaterThanAfterFunction1.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction2.d.ts index 857dba5548d3b..d2daf65e89f03 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction2.d.ts @@ -9,6 +9,7 @@ function (a: any => b: any; //// [parserEqualsGreaterThanAfterFunction2.d.ts] declare function (a: any, b: any): invalid; + /// [Errors] //// parserEqualsGreaterThanAfterFunction2.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList1.d.ts index 23a7f807e6840..b203a430da73d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList1.d.ts @@ -10,6 +10,7 @@ function f(a: any { //// [parserErrorRecovery_ParameterList1.d.ts] declare function f(a: any, {}: {}): invalid; + /// [Errors] //// parserErrorRecovery_ParameterList1.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList2.d.ts index 25551fe3b3ffa..a0c8b7c6e9c06 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList2.d.ts @@ -10,6 +10,7 @@ function f(a: any, { //// [parserErrorRecovery_ParameterList2.d.ts] declare function f(a: any, {}: {}): invalid; + /// [Errors] //// parserErrorRecovery_ParameterList2.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserNoASIOnCallAfterFunctionExpression1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserNoASIOnCallAfterFunctionExpression1.d.ts index 7dbfbc2fd6a20..bac3f3587ef65 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserNoASIOnCallAfterFunctionExpression1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserNoASIOnCallAfterFunctionExpression1.d.ts @@ -11,6 +11,7 @@ var x = function (): void { } //// [parserNoASIOnCallAfterFunctionExpression1.d.ts] declare var x: invalid; + /// [Errors] //// parserNoASIOnCallAfterFunctionExpression1.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource10.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource10.d.ts index 5c3981e9bd557..b178ecda58658 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource10.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource10.d.ts @@ -692,6 +692,7 @@ declare namespace TypeScript { var staticTokens: any; function initializeStaticTokens(): void; } + /// [Errors] //// parserRealSource10.ts(4,21): error TS6053: File 'typescript.ts' not found. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource14.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource14.d.ts index d780b9016fa45..88c56705df02e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource14.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource14.d.ts @@ -663,6 +663,7 @@ declare namespace TypeScript { function getTokenizationOffset(script: TypeScript.Script, position: number): number; function walkAST(ast: TypeScript.AST, callback: (path: AstPath, walker: TypeScript.IAstWalker) => void): void; } + /// [Errors] //// parserRealSource14.ts(4,21): error TS6053: File 'typescript.ts' not found. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource2.d.ts index bd0168e7b4f50..4b7851bf04f81 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource2.d.ts @@ -492,6 +492,7 @@ declare namespace TypeScript { var optimizeModuleCodeGen: boolean; function flagsToString(e: any, flags: number): string; } + /// [Errors] //// parserRealSource2.ts(4,21): error TS6053: File 'typescript.ts' not found. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource3.d.ts index 0d11728486def..7ba31307ac4a3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource3.d.ts @@ -239,6 +239,7 @@ declare namespace TypeScript { LastAsg = 41 } } + /// [Errors] //// parserRealSource3.ts(4,21): error TS6053: File 'typescript.ts' not found. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserSkippedTokens16.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserSkippedTokens16.d.ts index 28ff4b74d3811..6162e3a5fbd7a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserSkippedTokens16.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserSkippedTokens16.d.ts @@ -19,6 +19,7 @@ declare function Foo(): any; declare namespace M { } declare var x: invalid; + /// [Errors] //// parserSkippedTokens16.ts(1,1): error TS2552: Cannot find name 'foo'. Did you mean 'Foo'? diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserStrictMode8.d.ts index 1ebd13b2a3a61..266fdfaabb347 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserStrictMode8.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserStrictMode8.d.ts @@ -11,6 +11,7 @@ function eval() { //// [parserStrictMode8.d.ts] declare function eval(): invalid; + /// [Errors] //// parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/preserveConstEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/preserveConstEnums.d.ts index cd01a83421610..43a22b123bea1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/preserveConstEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/preserveConstEnums.d.ts @@ -14,6 +14,7 @@ declare const enum E { Value = 1, Value2 = 1 } + /// [Errors] //// preserveConstEnums.ts(2,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/propertyAssignmentUseParentType3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/propertyAssignmentUseParentType3.d.ts index bd92e0a80dbdb..2b4e395387b2a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/propertyAssignmentUseParentType3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/propertyAssignmentUseParentType3.d.ts @@ -35,6 +35,7 @@ declare function foo3(): string; declare function foo4(): ({ x: number; }); + /// [Errors] //// propertyAssignmentUseParentType3.ts(3,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportClassDefinition.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportClassDefinition.d.ts index f904b2490407d..23e77e6a8f115 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportClassDefinition.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportClassDefinition.d.ts @@ -32,6 +32,7 @@ export = _default; //// [foo3.d.ts] export {}; + /// [Errors] //// foo2.ts(4,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reservedWords3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reservedWords3.d.ts index 4d9bcf886b591..029dbdc9a2ee7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reservedWords3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reservedWords3.d.ts @@ -23,6 +23,7 @@ declare function f3(): invalid; declare function (): invalid; declare function f4(): invalid; declare function f5(): invalid; + /// [Errors] //// reservedWords3.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/staticsInAFunction.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/staticsInAFunction.d.ts index effe510aa2d81..ea96a70b2588f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/staticsInAFunction.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/staticsInAFunction.d.ts @@ -14,6 +14,7 @@ function boo{ //// [staticsInAFunction.d.ts] declare function boo(): invalid; + /// [Errors] //// staticsInAFunction.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/strictModeOctalLiterals.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/strictModeOctalLiterals.d.ts index bb3bdb291151c..7869f48e086ea 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/strictModeOctalLiterals.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/strictModeOctalLiterals.d.ts @@ -15,6 +15,7 @@ const orbitol: 01 = 01 export declare enum E { A = 13 } + /// [Errors] //// strictModeOctalLiterals.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 23e7a3fa48f3a..345c50dc34416 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit12.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit12.d.ts @@ -31,6 +31,7 @@ declare namespace M { } export {}; } + /// [Errors] //// symbolDeclarationEmit12.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index b2b69d69279ce..372c378af31f1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts @@ -26,6 +26,7 @@ export interface InterpolationValue {} //// [Folder/monorepo/core/index.d.ts] export declare function getStyles(): invalid; + /// [Errors] //// Folder/monorepo/core/index.ts(3,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 2d00e9b33dc22..b81dc1e259068 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes4.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes4.d.ts @@ -466,6 +466,7 @@ declare function f1(s: `**${T}**`): T; declare function f2(s: `**${T}**`): T; declare function f3(s: `**${T}**`): T; declare function f4(s: `**${T}**`): T; + /// [Errors] //// templateLiteralTypes4.ts(43,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterType.d.ts index b151079a43d62..c4a01e97504f9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterType.d.ts @@ -14,6 +14,7 @@ function f(x: string) { //// [templateStringInFunctionParameterType.d.ts] declare function f(any: any, : invalid): any; declare function f(x: string): any; + /// [Errors] //// templateStringInFunctionParameterType.ts(1,12): error TS1138: Parameter declaration expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterTypeES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterTypeES6.d.ts index 8f505f1525009..542961e38ddaa 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterTypeES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterTypeES6.d.ts @@ -14,6 +14,7 @@ function f(x: string) { //// [templateStringInFunctionParameterTypeES6.d.ts] declare function f(any: any, : invalid): any; declare function f(x: string): any; + /// [Errors] //// templateStringInFunctionParameterTypeES6.ts(1,12): error TS1138: Parameter declaration expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringWithEmbeddedYieldKeyword.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringWithEmbeddedYieldKeyword.d.ts index ca65728505669..c4372d80a3afa 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringWithEmbeddedYieldKeyword.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringWithEmbeddedYieldKeyword.d.ts @@ -13,6 +13,7 @@ function* gen { //// [templateStringWithEmbeddedYieldKeyword.d.ts] declare function gen(): invalid; + /// [Errors] //// error TS2318: Cannot find global type 'IterableIterator'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContexts.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContexts.d.ts index 391b661313aac..b50c25e44a4a7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContexts.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContexts.d.ts @@ -72,6 +72,7 @@ declare enum SomeEnum { A,// Should not be allowed B } + /// [Errors] //// thisInInvalidContexts.ts(9,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContextsExternalModule.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContextsExternalModule.d.ts index db66ed615d01c..0186125b29007 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContextsExternalModule.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContextsExternalModule.d.ts @@ -52,6 +52,7 @@ export = this; // Should be an error //// [thisInInvalidContextsExternalModule.d.ts] declare const _default: invalid; export = _default; + /// [Errors] //// thisInInvalidContextsExternalModule.ts(9,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInPropertyBoundDeclarations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInPropertyBoundDeclarations.d.ts index 66e4f7a6405a8..74582dce20c45 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInPropertyBoundDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInPropertyBoundDeclarations.d.ts @@ -102,6 +102,7 @@ declare class B { }; prop6: invalid; } + /// [Errors] //// thisInPropertyBoundDeclarations.ts(64,5): error TS2527: The inferred type of 'prop6' references an inaccessible 'this' type. A type annotation is necessary. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/this_inside-enum-should-not-be-allowed.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/this_inside-enum-should-not-be-allowed.d.ts index 2e6843c6c0c9c..e44ae47ccfde3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/this_inside-enum-should-not-be-allowed.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/this_inside-enum-should-not-be-allowed.d.ts @@ -21,6 +21,7 @@ declare enum TopLevelEnum { } declare namespace ModuleEnum { } + /// [Errors] //// this_inside-enum-should-not-be-allowed.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/twoAccessorsWithSameName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/twoAccessorsWithSameName.d.ts index b2c4244fcbaee..da32e9a0d6543 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/twoAccessorsWithSameName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/twoAccessorsWithSameName.d.ts @@ -59,6 +59,7 @@ declare var x: invalid; declare var y: { x: number; }; + /// [Errors] //// twoAccessorsWithSameName.ts(2,9): error TS2300: Duplicate identifier 'x'. 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 index 194d9ef8f745a..664d17eff2cc8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts @@ -158,6 +158,7 @@ declare var ExpandoExpr3: { }; }; declare var n: number; + /// [Errors] //// typeFromPropertyAssignment29.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment31.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment31.d.ts index 21e8b0e3d955e..3f90b1097755c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment31.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment31.d.ts @@ -48,6 +48,7 @@ declare namespace ExpandoMerge { let p9: number; } declare var n: number; + /// [Errors] //// typeFromPropertyAssignment31.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment32.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment32.d.ts index 3c39d7ba8019a..e18d0f3bd8fe6 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment32.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment32.d.ts @@ -52,6 +52,7 @@ declare namespace ExpandoMerge { declare namespace ExpandoMerge { var p2: number; } + /// [Errors] //// expando.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment33.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment33.d.ts index 6764498ccb3af..96e4f5f6601bf 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment33.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment33.d.ts @@ -54,6 +54,7 @@ declare namespace ExpandoMerge { declare namespace ExpandoMerge { var p2: number; } + /// [Errors] //// expando.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment36.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment36.d.ts index 94abb629cf7c2..4823321e20629 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment36.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment36.d.ts @@ -104,6 +104,7 @@ declare const g: { expando: number; both: string | number; }; + /// [Errors] //// typeFromPropertyAssignment36.ts(17,7): error TS2565: Property 'q' is used before being assigned. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment38.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment38.d.ts index dcc3500462b38..6a637eef9daa2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment38.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment38.d.ts @@ -21,6 +21,7 @@ declare const f: { (): void; prop: number; }; + /// [Errors] //// typeFromPropertyAssignment38.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index 64258c05c4ae7..ce3bd587a2fb6 100644 --- 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 @@ -38,9 +38,10 @@ export function fb(): B; -//// [main.d.ts] +//// [/.src/main.d.ts] export declare const va: invalid; export declare const vb: invalid; + /// [Errors] //// main.ts(4,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 25dadd43aeeef..e8656a5ffc4f4 100644 --- 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 @@ -36,9 +36,10 @@ export * from "../other"; -//// [main.d.ts] +//// [/.src/main.d.ts] export declare const va: any; export declare const vb: invalid; + /// [Errors] //// main.ts(1,10): error TS2305: Module '"ext"' has no exported member 'fa'. 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 index 38f308e035e3d..cf6ca8193be9a 100644 --- 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 @@ -35,9 +35,10 @@ export * from "../other"; -//// [main.d.ts] +//// [/.src/main.d.ts] export declare const va: invalid; export declare const va2: invalid; + /// [Errors] //// main.ts(4,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/underscoreEscapedNameInEnum.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/underscoreEscapedNameInEnum.d.ts index 8a02cff8d59d3..bdb2111bcf296 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/underscoreEscapedNameInEnum.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/underscoreEscapedNameInEnum.d.ts @@ -16,6 +16,7 @@ declare enum E { "__foo" = 1, bar = 2 } + /// [Errors] //// underscoreEscapedNameInEnum.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/verbatimModuleSyntaxConstEnumUsage.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/verbatimModuleSyntaxConstEnumUsage.d.ts index f336b26e59988..839e8df50345c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/verbatimModuleSyntaxConstEnumUsage.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/verbatimModuleSyntaxConstEnumUsage.d.ts @@ -33,6 +33,7 @@ export declare enum Foo { b = 2, c = 3 } + /// [Errors] //// bar.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/wellKnownSymbolExpando.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/wellKnownSymbolExpando.d.ts index b0c716bc690b8..1b6e50e445274 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/wellKnownSymbolExpando.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/wellKnownSymbolExpando.d.ts @@ -11,6 +11,7 @@ f[Symbol.iterator] = function() {} //// [wellKnownSymbolExpando.d.ts] declare function f(): void; + /// [Errors] //// wellKnownSymbolExpando.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments3_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments3_es6.d.ts index be6e2b15b246a..1bf5fcef5445b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments3_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments3_es6.d.ts @@ -11,6 +11,7 @@ var v = { *{ } } declare var v: { ""(): Generator; }; + /// [Errors] //// FunctionPropertyAssignments3_es6.ts(1,12): error TS1003: Identifier expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments5_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments5_es6.d.ts index 0872d3a3f3500..031f51dfd8478 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments5_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments5_es6.d.ts @@ -11,6 +11,7 @@ var v = { *[foo()](): Generator { } } declare var v: { [x: number]: () => Generator; }; + /// [Errors] //// FunctionPropertyAssignments5_es6.ts(1,13): error TS2304: Cannot find name 'foo'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration5_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration5_es6.d.ts index 35aa54907e5c2..c7c5db4ed8982 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration5_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration5_es6.d.ts @@ -13,6 +13,7 @@ class C { declare class C { (): any; } + /// [Errors] //// MemberFunctionDeclaration5_es6.ts(3,1): error TS1003: Identifier expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration6_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration6_es6.d.ts index e17c1b7b1e1aa..01e1e47b31770 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration6_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration6_es6.d.ts @@ -13,6 +13,7 @@ class C { declare class C { foo(): any; } + /// [Errors] //// MemberFunctionDeclaration6_es6.ts(2,5): error TS2391: Function implementation is missing or not immediately following the declaration. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnum1.d.ts index ca2a420774649..0ec80dcd9d624 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnum1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnum1.d.ts @@ -21,6 +21,7 @@ declare enum E1 { declare enum E2 { x } + /// [Errors] //// ambientEnum1.ts(7,13): error TS1066: In ambient enum declarations member initializer must be constant expression. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientErrors.d.ts index 63c3fac86ad4b..997e618eedc50 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientErrors.d.ts @@ -100,6 +100,7 @@ declare module 'bar' { export var q: any; export = n; } + /// [Errors] //// ambientErrors.ts(2,17): error TS1039: Initializers are not allowed in ambient contexts. 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 index e46d6d14b7dee..23ea73c0acce1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrayFakeFlatNoCrashInferenceDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrayFakeFlatNoCrashInferenceDeclarations.d.ts @@ -30,6 +30,7 @@ type BadFlatArray = { }["obj"]; declare function flat(arr: A, depth?: D): BadFlatArray[]; declare function foo(arr: T[], depth: number): any; + /// [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. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrowFunctionContexts.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrowFunctionContexts.d.ts index 110c9921ffb52..de1c346589bd3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrowFunctionContexts.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrowFunctionContexts.d.ts @@ -137,6 +137,7 @@ declare var asserted1: any; declare var asserted1: any; declare var asserted2: any; declare var asserted2: any; + /// [Errors] //// arrowFunctionContexts.ts(2,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier.d.ts index 314ab18c34143..2b9ac4f35adb8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier.d.ts @@ -13,6 +13,7 @@ class C { declare class C { : any; } + /// [Errors] //// classMemberWithMissingIdentifier.ts(2,11): error TS1146: Declaration expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier2.d.ts index 2b30cadf50edd..bc0b4dc7d2d6d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier2.d.ts @@ -13,6 +13,7 @@ class C { declare class C { : any; } + /// [Errors] //// classMemberWithMissingIdentifier2.ts(2,11): error TS1146: Declaration expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commonMissingSemicolons.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commonMissingSemicolons.d.ts index 7a567231d5e8d..c45848eb4b1d3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commonMissingSemicolons.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commonMissingSemicolons.d.ts @@ -124,6 +124,7 @@ declare class NoSemicolonClassD { declare class NoSemicolonClassE { ['a']: any; } + /// [Errors] //// commonMissingSemicolons.ts(1,36): error TS2705: An async function or method 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/tsc/constEnum2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum2.d.ts index e412844c5b8bf..3f5acc3445c30 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum2.d.ts @@ -27,6 +27,7 @@ declare const enum D { f, g } + /// [Errors] //// constEnum2.ts(10,9): error TS2474: const enum member initializers must be constant expressions. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumErrors.d.ts index 809a657057447..62026425f9d85 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumErrors.d.ts @@ -81,6 +81,7 @@ declare const enum NaNOrInfinity { G = Infinity,// overflow H = NaN } + /// [Errors] //// constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess1.d.ts index f1383e4d78a84..f3151dd7f3b2b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess1.d.ts @@ -54,6 +54,7 @@ declare class C { get [G.B](): number; set [G.B](x: number); } + /// [Errors] //// constEnumPropertyAccess1.ts(25,9): error TS2322: Type 'boolean' is not assignable to type 'number'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess2.d.ts index 42f901bb47a4e..1e08900b22f81 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess2.d.ts @@ -36,6 +36,7 @@ declare var z: typeof G; declare var z1: any; declare var g: G; declare function foo(x: G): void; + /// [Errors] //// constEnumPropertyAccess2.ts(13,19): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constantEnumAssert.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constantEnumAssert.d.ts index b8350e1c405b2..353991bffa6d5 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constantEnumAssert.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constantEnumAssert.d.ts @@ -138,6 +138,7 @@ declare const foo11: { declare const foo12: { a: string; }; + /// [Errors] //// constantEnumAssert.ts(73,10): error TS1355: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constructorWithIncompleteTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constructorWithIncompleteTypeAnnotation.d.ts index 970fc421bebf9..a019c8006f574 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constructorWithIncompleteTypeAnnotation.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constructorWithIncompleteTypeAnnotation.d.ts @@ -339,6 +339,7 @@ declare enum Fruit { interface IDisposable { Dispose(): void; } + /// [Errors] //// constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2503: Cannot find namespace 'module'. 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 index 65a9f7bc2d3a4..8f762714c1d66 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCommonJsModuleReferencedType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCommonJsModuleReferencedType.d.ts @@ -32,6 +32,7 @@ export const y: RootProps = bar(); import { RootProps } from "root"; export declare const x: any; export declare const y: RootProps; + /// [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. 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 index 6e0c01fa8fae2..c939e3617797a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringParameterProperties.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringParameterProperties.d.ts @@ -47,6 +47,7 @@ declare class C3 { z: boolean; constructor({ x, y, z }: ObjType1); } + /// [Errors] //// declarationEmitDestructuringParameterProperties.ts(2,17): error TS1187: A parameter property may not be declared using a binding pattern. 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 index b08f21f48b768..f9c1e97ae10c5 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpandoPropertyPrivateName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpandoPropertyPrivateName.d.ts @@ -25,6 +25,7 @@ export declare function q(): void; export declare namespace q { var val: I; } + /// [Errors] //// b.ts(4,1): error TS4032: Property 'val' of exported interface has or is using name 'I' from private module '"a"'. 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 index 93fcae0c32879..0ff7bffbdd4bf 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectAssignedDefaultExport.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectAssignedDefaultExport.d.ts @@ -49,6 +49,7 @@ import { DefaultTheme, StyledComponent } from "styled-components"; export declare const C: StyledComponent<"div", DefaultTheme, {}, never>; declare const _default; export default _default; + /// [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. 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 index 04d1f0a098749..95169d05cbf18 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference3.d.ts @@ -53,6 +53,7 @@ export * from './keys'; //// [monorepo/pkg3/dist/keys.d.ts] import { MetadataAccessor } from "@raymondfeng/pkg2"; export declare const ADMIN: any; + /// [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. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFiles.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFiles.d.ts index 51cddfaf7cc67..c1bbd4869b307 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFiles.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFiles.d.ts @@ -96,6 +96,7 @@ declare class C4 { f3(): any; f4(): () => this; } + /// [Errors] //// declarationFiles.ts(4,20): error TS2526: A 'this' type is available only in a non-static member of a class or interface. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationWithNoInitializer.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationWithNoInitializer.d.ts index 39f595868ba97..077616b0ba4bd 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationWithNoInitializer.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationWithNoInitializer.d.ts @@ -12,6 +12,7 @@ var {c, d}; // Error, no initializer //// [declarationWithNoInitializer.d.ts] declare var a: any, b: any; declare var c: any, d: any; + /// [Errors] //// declarationWithNoInitializer.ts(1,5): error TS1182: A destructuring declaration must have an initializer. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterDeclaration6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterDeclaration6.d.ts index 051d21d173c2f..9f687c18d5f32 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterDeclaration6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterDeclaration6.d.ts @@ -64,6 +64,7 @@ declare function b1({ public: x }: { declare function b2({ while: y }: { while: any; }): void; + /// [Errors] //// destructuringParameterDeclaration6.ts(7,18): error TS1005: ':' expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties1.d.ts index c33830af89f82..c9b900fabdb6a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties1.d.ts @@ -78,6 +78,7 @@ declare const dest_1: any[]; declare const c3_x: any; declare const c3_y: any; declare const c3_z: any; + /// [Errors] //// destructuringParameterProperties1.ts(2,17): error TS1187: A parameter property may not be declared using a binding pattern. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties2.d.ts index c56060992a6e6..38cd10a4f2ac4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties2.d.ts @@ -70,6 +70,7 @@ declare const dest: any[]; declare const z_a: any; declare const z_b: any; declare const z_c: any; + /// [Errors] //// destructuringParameterProperties2.ts(2,36): error TS1187: A parameter property may not be declared using a binding pattern. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties3.d.ts index 1634b328a8f45..491d43061eb9a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties3.d.ts @@ -81,6 +81,7 @@ declare const dest_1: any[]; declare const z_a: any; declare const z_b: any; declare const z_c: any; + /// [Errors] //// destructuringParameterProperties3.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties4.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties4.d.ts index f33ca3a215156..b2ce11020dae7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties4.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties4.d.ts @@ -46,6 +46,7 @@ declare class C1 { declare class C2 extends C1 { doSomethingWithSuperProperties(): string; } + /// [Errors] //// destructuringParameterProperties4.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties5.d.ts index 9920f630d574e..0bbc32f554934 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties5.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties5.d.ts @@ -46,6 +46,7 @@ declare const a_x2: any; declare const a_x3: any; declare const a_y: any; declare const a_z: any; + /// [Errors] //// destructuringParameterProperties5.ts(5,17): error TS1187: A parameter property may not be declared using a binding pattern. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/disallowLineTerminatorBeforeArrow.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/disallowLineTerminatorBeforeArrow.d.ts index f7d7caebfafd9..0bdb38c4e2d8b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/disallowLineTerminatorBeforeArrow.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/disallowLineTerminatorBeforeArrow.d.ts @@ -106,6 +106,7 @@ declare namespace m { } var v: any, any: any; } + /// [Errors] //// disallowLineTerminatorBeforeArrow.ts(71,25): error TS2304: Cannot find name 'x'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicateObjectLiteralProperty.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicateObjectLiteralProperty.d.ts index 2c05232339a5a..fade6e6ed750b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicateObjectLiteralProperty.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicateObjectLiteralProperty.d.ts @@ -34,6 +34,7 @@ declare var x: { declare var y: { readonly a: number; }; + /// [Errors] //// duplicateObjectLiteralProperty.ts(4,5): error TS1117: An object literal cannot have multiple properties with the same name. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumAssignmentCompat5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumAssignmentCompat5.d.ts index be58d75127010..2d01585f6a040 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumAssignmentCompat5.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumAssignmentCompat5.d.ts @@ -46,6 +46,7 @@ declare let e: E; declare let a: E.A; declare let c: Computed; declare let ca: Computed.A; + /// [Errors] //// enumAssignmentCompat5.ts(12,1): error TS2322: Type '4' is not assignable to type 'E'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics2.d.ts index 046d8b150de70..cf6ce8354240e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics2.d.ts @@ -35,6 +35,7 @@ declare enum Bar { c,// ok d } + /// [Errors] //// enumBasics2.ts(4,9): error TS2339: Property 'b' does not exist on type 'Foo.a'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics3.d.ts index 61d08fb728760..2fcfe7ad2de83 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics3.d.ts @@ -41,6 +41,7 @@ declare namespace M { } } } + /// [Errors] //// enumBasics3.ts(5,13): error TS2339: Property 'a' does not exist on type 'E1.a'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithString.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithString.d.ts index 4bddf7c9009dd..5e2b138d45199 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithString.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithString.d.ts @@ -67,6 +67,7 @@ declare enum T6 { a = "1", b = "12" } + /// [Errors] //// enumConstantMemberWithString.ts(5,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiterals.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiterals.d.ts index 567ae46031463..9d3fade808183 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiterals.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiterals.d.ts @@ -88,6 +88,7 @@ declare enum T7 { b = "11", c = "21" } + /// [Errors] //// enumConstantMemberWithTemplateLiterals.ts(28,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMembers.d.ts index 28eb136e39e44..64d2178e0285e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMembers.d.ts @@ -82,6 +82,7 @@ declare const enum E6 { f = Infinity, g = -Infinity } + /// [Errors] //// enumConstantMembers.ts(32,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrorOnConstantBindingWithInitializer.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrorOnConstantBindingWithInitializer.d.ts index 8d829c9585dd4..14700e8d87338 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrorOnConstantBindingWithInitializer.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrorOnConstantBindingWithInitializer.d.ts @@ -28,6 +28,7 @@ declare const value: string | number; declare enum E { test } + /// [Errors] //// enumErrorOnConstantBindingWithInitializer.ts(7,7): error TS2322: Type 'string | number | undefined' is not assignable to type 'string | number'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrors.d.ts index b25250eaffc4c..d2932bebe8c78 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrors.d.ts @@ -113,6 +113,7 @@ declare enum E14 { c = 5, d = 6 } + /// [Errors] //// enumErrors.ts(2,6): error TS2431: Enum name cannot be 'any'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumLiteralAssignableToEnumInsideUnion.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumLiteralAssignableToEnumInsideUnion.d.ts index 650bb23301707..e1573aabd99e0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumLiteralAssignableToEnumInsideUnion.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumLiteralAssignableToEnumInsideUnion.d.ts @@ -66,6 +66,7 @@ declare const e2: X.Foo.A | X.Foo.B | boolean; declare const e3: X.Foo.B | boolean; declare const e4: X.Foo.A | boolean; declare const e5: Ka.Foo | boolean; + /// [Errors] //// enumLiteralAssignableToEnumInsideUnion.ts(24,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMergingErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMergingErrors.d.ts index 63ef3bee3e140..339d2d8cbfdcf 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMergingErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMergingErrors.d.ts @@ -112,6 +112,7 @@ declare namespace M2 { C = 0 } } + /// [Errors] //// enumMergingErrors.ts(26,22): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumPropertyAccessBeforeInitalisation.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumPropertyAccessBeforeInitalisation.d.ts index 0b8d0e13a8f70..ec3889cd06161 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumPropertyAccessBeforeInitalisation.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumPropertyAccessBeforeInitalisation.d.ts @@ -20,6 +20,7 @@ declare enum E { C, D } + /// [Errors] //// enumPropertyAccessBeforeInitalisation.ts(2,9): error TS2565: Property 'A' is used before being assigned. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithComputedMember.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithComputedMember.d.ts index 60c8438307d5a..8758fd55411da 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithComputedMember.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithComputedMember.d.ts @@ -18,6 +18,7 @@ declare enum A { Y, Z } + /// [Errors] //// enumWithComputedMember.ts(4,5): error TS1061: Enum member must have initializer. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithExport.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithExport.d.ts index 0891c9d41f582..1158352692f76 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithExport.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithExport.d.ts @@ -19,6 +19,7 @@ declare namespace x { declare enum x { z } + /// [Errors] //// enumWithExport.ts(5,7): error TS2304: Cannot find name 'y'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithParenthesizedInitializer1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithParenthesizedInitializer1.d.ts index 176013a511020..20264e566d839 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithParenthesizedInitializer1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithParenthesizedInitializer1.d.ts @@ -13,6 +13,7 @@ enum E { declare enum E { e = -3 } + /// [Errors] //// enumWithParenthesizedInitializer1.ts(3,1): error TS1005: ')' expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/equalityWithEnumTypes.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/equalityWithEnumTypes.d.ts index ab9663b45afb6..02723aa08d373 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/equalityWithEnumTypes.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/equalityWithEnumTypes.d.ts @@ -59,6 +59,7 @@ declare enum E2 { } declare function f1(v: E1): void; declare function f2(v: E2): void; + /// [Errors] //// equalityWithEnumTypes.ts(14,9): error TS2367: This comparison appears to be unintentional because the types 'E1' and '0' have no overlap. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exactSpellingSuggestion.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exactSpellingSuggestion.d.ts index 5e610cab97d38..5a631ff0df424 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exactSpellingSuggestion.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exactSpellingSuggestion.d.ts @@ -22,6 +22,7 @@ declare enum U8 { BIT_1 = 2, BIT_2 = 4 } + /// [Errors] //// exactSpellingSuggestion.ts(9,4): error TS2551: Property 'bit_2' does not exist on type 'typeof U8'. Did you mean 'BIT_2'? diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesNoValue.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesNoValue.d.ts index 0e1bf9cb89052..bbb154a013c84 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesNoValue.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesNoValue.d.ts @@ -18,6 +18,7 @@ export declare function Foo(): void; export declare namespace Foo { var bar: () => void; } + /// [Errors] //// expandoFunctionContextualTypesNoValue.ts(2,17): error TS2307: Cannot find module 'blah' or its corresponding type declarations. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignNonIdentifier.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignNonIdentifier.d.ts index 7c096dc8dbd35..0c8d2a0285b33 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignNonIdentifier.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignNonIdentifier.d.ts @@ -63,6 +63,7 @@ export = _default; //// [foo8.d.ts] declare const _default: any; export = _default; + /// [Errors] //// foo6.ts(1,14): error TS1109: Expression expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/forwardRefInEnum.d.ts index f20619bca280c..4ac6496fb637b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/forwardRefInEnum.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/forwardRefInEnum.d.ts @@ -30,6 +30,7 @@ declare enum E1 { declare enum E1 { Z = 4 } + /// [Errors] //// forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/functionImplementations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/functionImplementations.d.ts index 41b896e931b0e..78a2619cad0e4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/functionImplementations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/functionImplementations.d.ts @@ -216,6 +216,7 @@ declare var f9: (x: number) => any; declare var f10: (x: number) => any; declare var f11: (x: number) => any; declare var f12: (x: number) => any; + /// [Errors] //// functionImplementations.ts(67,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type '3 | 5'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts index 745235ed41d92..bf039c954e35c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts @@ -74,6 +74,7 @@ declare namespace Uninstantiated { declare namespace Ambient { const x: number; } + /// [Errors] //// enum2.ts(3,9): error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsContainerMergeTsDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsContainerMergeTsDeclaration.d.ts index 288e12190c1d6..b203843abcf8c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsContainerMergeTsDeclaration.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsContainerMergeTsDeclaration.d.ts @@ -17,6 +17,7 @@ var x = function (): number { //// [b.d.ts] declare var x: number; + /// [Errors] //// error TS6504: File 'a.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxComponentTypeErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxComponentTypeErrors.d.ts index 8fe029bbf903a..0425577ab9117 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxComponentTypeErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxComponentTypeErrors.d.ts @@ -80,6 +80,7 @@ declare const obj: { }; declare const elem5: JSX.Element; declare const elem6: JSX.Element; + /// [Errors] //// jsxComponentTypeErrors.tsx(18,11): error TS2786: 'this' cannot be used as a JSX component. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedDeclarations2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedDeclarations2.d.ts index 5a03d57f922d0..aa87b449b28f6 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedDeclarations2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedDeclarations2.d.ts @@ -26,6 +26,7 @@ declare enum Foo { declare namespace Foo { var x: any; } + /// [Errors] //// mergedDeclarations2.ts(9,25): error TS2304: Cannot find name 'b'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationDisallowedExtensions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationDisallowedExtensions.d.ts index 93abfd3bab1a1..148d64da31df8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationDisallowedExtensions.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationDisallowedExtensions.d.ts @@ -91,6 +91,7 @@ export {}; //// [x0.d.ts] export declare let a: number; + /// [Errors] //// x.ts(17,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/negateOperatorInvalidOperations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/negateOperatorInvalidOperations.d.ts index b194e285f9fb1..8dbe57f282a9d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/negateOperatorInvalidOperations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/negateOperatorInvalidOperations.d.ts @@ -25,6 +25,7 @@ declare var NUMBER2: number; declare var NUMBER3: number; declare var NUMBER4: number; declare var NUMBER: any; + /// [Errors] //// negateOperatorInvalidOperations.ts(4,15): error TS1109: Expression expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noImplicitAnyDestructuringVarDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noImplicitAnyDestructuringVarDeclaration.d.ts index 93fc779898e6e..7ce8cd4b6b779 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noImplicitAnyDestructuringVarDeclaration.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noImplicitAnyDestructuringVarDeclaration.d.ts @@ -40,6 +40,7 @@ declare var c4: any, d4: any; declare const dest_2: any[]; declare const temp: any; declare const a5: any; + /// [Errors] //// noImplicitAnyDestructuringVarDeclaration.ts(1,5): error TS1182: A destructuring declaration must have an initializer. 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 index ca851d21b9aac..18618071189b2 100644 --- 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 @@ -32,6 +32,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: any; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index ca851d21b9aac..18618071189b2 100644 --- 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 @@ -32,6 +32,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: any; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 5c28878a50d09..d0d302b81e814 100644 --- 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 @@ -41,6 +41,7 @@ export { x } from "./other.js"; export interface Thing { } export declare const x: () => Thing; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 5c28878a50d09..d0d302b81e814 100644 --- 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 @@ -41,6 +41,7 @@ export { x } from "./other.js"; export interface Thing { } export declare const x: () => Thing; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 59ab25560c421..47817966e1598 100644 --- 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 @@ -39,6 +39,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: import("inner/other").Thing; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 59ab25560c421..47817966e1598 100644 --- 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 @@ -39,6 +39,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: import("inner/other").Thing; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index cd03b05c05b90..9e9ad35186826 100644 --- 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 @@ -34,6 +34,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: import("inner/other.js").Thing; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index cd03b05c05b90..9e9ad35186826 100644 --- 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 @@ -34,6 +34,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: import("inner/other.js").Thing; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 2888ee5771ac5..a3978e2cc5028 100644 --- 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 @@ -34,6 +34,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: import("inner/other.js").Thing; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 2888ee5771ac5..a3978e2cc5028 100644 --- 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 @@ -34,6 +34,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: import("inner/other.js").Thing; + /// [Errors] //// error TS2468: Cannot find global value 'Promise'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/overloadingStaticFunctionsInFunctions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/overloadingStaticFunctionsInFunctions.d.ts index dab3e3f87cfa5..a52d0e6e35622 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/overloadingStaticFunctionsInFunctions.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/overloadingStaticFunctionsInFunctions.d.ts @@ -13,6 +13,7 @@ function boo { //// [overloadingStaticFunctionsInFunctions.d.ts] declare function boo(): void; + /// [Errors] //// overloadingStaticFunctionsInFunctions.ts(1,14): error TS1005: '(' expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.classMethods.es2018.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.classMethods.es2018.d.ts index dc239a83b781a..c0a0af39d7da1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.classMethods.es2018.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.classMethods.es2018.d.ts @@ -282,6 +282,7 @@ declare class C16 { declare class C14 { f(): AsyncGenerator; } + /// [Errors] //// asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts index 30d16a5e25e0a..5d3f3849b662d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts @@ -272,6 +272,7 @@ declare const o16: { declare const o14: { f(): AsyncGenerator; }; + /// [Errors] //// asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction1.d.ts index c3eaadc44a7b5..b5a33b8e5d7e7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction1.d.ts @@ -9,6 +9,7 @@ function => //// [parserEqualsGreaterThanAfterFunction1.d.ts] declare function (): any; + /// [Errors] //// parserEqualsGreaterThanAfterFunction1.ts(1,10): error TS1003: Identifier expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction2.d.ts index c6f21ccac8b61..865b191cdf306 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction2.d.ts @@ -9,6 +9,7 @@ function (a: any => b: any; //// [parserEqualsGreaterThanAfterFunction2.d.ts] declare function (a: any, b: any): any; + /// [Errors] //// parserEqualsGreaterThanAfterFunction2.ts(1,10): error TS1003: Identifier expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList1.d.ts index a48b35aa65dfa..fe3028eded998 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList1.d.ts @@ -10,6 +10,7 @@ function f(a: any { //// [parserErrorRecovery_ParameterList1.d.ts] declare function f(a: any, {}: {}): any; + /// [Errors] //// parserErrorRecovery_ParameterList1.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList2.d.ts index 0fd5c1209e388..e6665d96dfa70 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList2.d.ts @@ -10,6 +10,7 @@ function f(a: any, { //// [parserErrorRecovery_ParameterList2.d.ts] declare function f(a: any, {}: {}): any; + /// [Errors] //// parserErrorRecovery_ParameterList2.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserNoASIOnCallAfterFunctionExpression1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserNoASIOnCallAfterFunctionExpression1.d.ts index 5dd955204c219..52f9111982de4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserNoASIOnCallAfterFunctionExpression1.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserNoASIOnCallAfterFunctionExpression1.d.ts @@ -11,6 +11,7 @@ var x = function (): void { } //// [parserNoASIOnCallAfterFunctionExpression1.d.ts] declare var x: any; + /// [Errors] //// parserNoASIOnCallAfterFunctionExpression1.ts(2,2): error TS2554: Expected 0 arguments, but got 1. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource10.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource10.d.ts index 2e63ab4d5daf8..067d8657597b2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource10.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource10.d.ts @@ -692,6 +692,7 @@ declare namespace TypeScript { var staticTokens: any; function initializeStaticTokens(): void; } + /// [Errors] //// parserRealSource10.ts(4,21): error TS6053: File 'typescript.ts' not found. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource14.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource14.d.ts index 831966eb4a40a..51564a5d6221a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource14.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource14.d.ts @@ -663,6 +663,7 @@ declare namespace TypeScript { function getTokenizationOffset(script: TypeScript.Script, position: number): number; function walkAST(ast: TypeScript.AST, callback: (path: AstPath, walker: TypeScript.IAstWalker) => void): void; } + /// [Errors] //// parserRealSource14.ts(4,21): error TS6053: File 'typescript.ts' not found. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource2.d.ts index 9a53b5fc2516d..48a67f64e95b9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource2.d.ts @@ -492,6 +492,7 @@ declare namespace TypeScript { var optimizeModuleCodeGen: boolean; function flagsToString(e: any, flags: number): string; } + /// [Errors] //// parserRealSource2.ts(4,21): error TS6053: File 'typescript.ts' not found. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource3.d.ts index a19cefc1b3841..932f94534288c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource3.d.ts @@ -239,6 +239,7 @@ declare namespace TypeScript { LastAsg = 41 } } + /// [Errors] //// parserRealSource3.ts(4,21): error TS6053: File 'typescript.ts' not found. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserSkippedTokens16.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserSkippedTokens16.d.ts index 1e5bc071adf00..547630e82e059 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserSkippedTokens16.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserSkippedTokens16.d.ts @@ -19,6 +19,7 @@ declare function Foo(): any; declare namespace M { } declare var x: any; + /// [Errors] //// parserSkippedTokens16.ts(1,1): error TS2552: Cannot find name 'foo'. Did you mean 'Foo'? diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserStrictMode8.d.ts index 3710a7c6524d6..d3db0a9c92416 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserStrictMode8.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserStrictMode8.d.ts @@ -10,6 +10,7 @@ function eval() { //// [parserStrictMode8.d.ts] + /// [Errors] //// parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reservedWords3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reservedWords3.d.ts index 0da5a156a11bf..9bc91d8111988 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reservedWords3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reservedWords3.d.ts @@ -23,6 +23,7 @@ declare function f3(): any; declare function (): any; declare function f4(): any; declare function f5(): any; + /// [Errors] //// reservedWords3.ts(1,13): error TS1390: 'enum' is not allowed as a parameter name. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/staticsInAFunction.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/staticsInAFunction.d.ts index 110ecc441bee1..d6fee79d3da2e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/staticsInAFunction.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/staticsInAFunction.d.ts @@ -14,6 +14,7 @@ function boo{ //// [staticsInAFunction.d.ts] declare function boo(): void; + /// [Errors] //// staticsInAFunction.ts(1,13): error TS1005: '(' expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/strictModeOctalLiterals.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/strictModeOctalLiterals.d.ts index be1f269bc2e10..4549fae2c5c6e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/strictModeOctalLiterals.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/strictModeOctalLiterals.d.ts @@ -15,6 +15,7 @@ const orbitol: 01 = 01 export declare enum E { A = 13 } + /// [Errors] //// strictModeOctalLiterals.ts(2,14): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. 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 index faa9bf0e41f30..50292d77735bd 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit12.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit12.d.ts @@ -30,6 +30,7 @@ declare namespace M { } export {}; } + /// [Errors] //// symbolDeclarationEmit12.ts(9,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. 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 index 340eb36875e59..513091d44b294 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralTypes4.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralTypes4.d.ts @@ -466,6 +466,7 @@ declare function f1(s: `**${T}**`): T; declare function f2(s: `**${T}**`): T; declare function f3(s: `**${T}**`): T; declare function f4(s: `**${T}**`): T; + /// [Errors] //// templateLiteralTypes4.ts(285,12): error TS2345: Argument of type '2' is not assignable to parameter of type '0 | 1'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterType.d.ts index fc6dc27400d2d..c175d86ae5e89 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterType.d.ts @@ -14,6 +14,7 @@ function f(x: string) { //// [templateStringInFunctionParameterType.d.ts] declare function f(any: any, : any): any; declare function f(x: string): any; + /// [Errors] //// templateStringInFunctionParameterType.ts(1,12): error TS1138: Parameter declaration expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterTypeES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterTypeES6.d.ts index 2ef3e33074095..117aa96cb0ffe 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterTypeES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterTypeES6.d.ts @@ -14,6 +14,7 @@ function f(x: string) { //// [templateStringInFunctionParameterTypeES6.d.ts] declare function f(any: any, : any): any; declare function f(x: string): any; + /// [Errors] //// templateStringInFunctionParameterTypeES6.ts(1,12): error TS1138: Parameter declaration expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringWithEmbeddedYieldKeyword.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringWithEmbeddedYieldKeyword.d.ts index f50c33de61c35..5e09b432f6a46 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringWithEmbeddedYieldKeyword.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringWithEmbeddedYieldKeyword.d.ts @@ -13,6 +13,7 @@ function* gen { //// [templateStringWithEmbeddedYieldKeyword.d.ts] declare function gen(): {}; + /// [Errors] //// error TS2318: Cannot find global type 'IterableIterator'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContexts.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContexts.d.ts index a7d0a3deb7037..cf478ec2066e8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContexts.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContexts.d.ts @@ -72,6 +72,7 @@ declare enum SomeEnum { A,// Should not be allowed B } + /// [Errors] //// thisInInvalidContexts.ts(9,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContextsExternalModule.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContextsExternalModule.d.ts index e538d767ad5dd..68cbcb717d516 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContextsExternalModule.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContextsExternalModule.d.ts @@ -52,6 +52,7 @@ export = this; // Should be an error //// [thisInInvalidContextsExternalModule.d.ts] declare const _default: undefined; export = _default; + /// [Errors] //// thisInInvalidContextsExternalModule.ts(9,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInPropertyBoundDeclarations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInPropertyBoundDeclarations.d.ts index fb2ba52343af0..cc664b242403e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInPropertyBoundDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInPropertyBoundDeclarations.d.ts @@ -102,6 +102,7 @@ declare class B { }; prop6: any; } + /// [Errors] //// thisInPropertyBoundDeclarations.ts(64,5): error TS2527: The inferred type of 'prop6' references an inaccessible 'this' type. A type annotation is necessary. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/this_inside-enum-should-not-be-allowed.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/this_inside-enum-should-not-be-allowed.d.ts index 76a600a471207..6c8ebf3a5bc22 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/this_inside-enum-should-not-be-allowed.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/this_inside-enum-should-not-be-allowed.d.ts @@ -21,6 +21,7 @@ declare enum TopLevelEnum { } declare namespace ModuleEnum { } + /// [Errors] //// this_inside-enum-should-not-be-allowed.ts(2,36): error TS2332: 'this' cannot be referenced in current location. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/twoAccessorsWithSameName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/twoAccessorsWithSameName.d.ts index 78c821fab74dd..8f798a7a9ec81 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/twoAccessorsWithSameName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/twoAccessorsWithSameName.d.ts @@ -61,6 +61,7 @@ declare var x: { declare var y: { x: number; }; + /// [Errors] //// twoAccessorsWithSameName.ts(2,9): error TS2300: Duplicate identifier 'x'. 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 index 892949f224e31..03b225e20a418 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts @@ -171,6 +171,7 @@ declare var ExpandoExpr3: { }; }; declare var n: number; + /// [Errors] //// typeFromPropertyAssignment29.ts(77,14): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment31.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment31.d.ts index 613e6bc3c15bc..49649ca8bdfaf 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment31.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment31.d.ts @@ -52,6 +52,7 @@ declare namespace ExpandoMerge { let p9: number; } declare var n: number; + /// [Errors] //// typeFromPropertyAssignment31.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment32.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment32.d.ts index 82715651207ce..e982f09c14e0d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment32.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment32.d.ts @@ -56,6 +56,7 @@ declare namespace ExpandoMerge { declare namespace ExpandoMerge { var p2: number; } + /// [Errors] //// expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment33.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment33.d.ts index a3f8ce6522d12..b4ea6b8fe130c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment33.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment33.d.ts @@ -58,6 +58,7 @@ declare namespace ExpandoMerge { declare namespace ExpandoMerge { var p2: number; } + /// [Errors] //// expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment36.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment36.d.ts index 2dd68fc9af4ac..46dcaa8e0d90d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment36.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment36.d.ts @@ -109,6 +109,7 @@ declare const g: { expando: number; both: string | number; }; + /// [Errors] //// typeFromPropertyAssignment36.ts(17,7): error TS2565: Property 'q' is used before being assigned. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts index c4ef57efd9817..34c44ad2b25d5 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts @@ -38,6 +38,6 @@ export function fb(): B; -//// [main.d.ts] +//// [/.src/main.d.ts] export declare const va: import("ext").A; export declare const vb: import("ext/other").B; 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 index 80c0ce61adcc3..963cff1d7890a 100644 --- 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 @@ -36,9 +36,10 @@ export * from "../other"; -//// [main.d.ts] +//// [/.src/main.d.ts] export declare const va: any; export declare const vb: import("ext/other").B; + /// [Errors] //// main.ts(1,10): error TS2305: Module '"ext"' has no exported member 'fa'. 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 index ef9ff448498c9..7f3fe426fe10c 100644 --- 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 @@ -35,6 +35,6 @@ export * from "../other"; -//// [main.d.ts] +//// [/.src/main.d.ts] export declare const va: import("ext").A2; export declare const va2: import("ext").A2; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff index e12ad2dba0d76..d9f6ea4779927 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff @@ -5,12 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -4,23 +4,7 @@ +@@ -4,24 +4,7 @@ interface SymbolConstructor { foo: string; } declare var Symbol: SymbolConstructor; -declare var obj: invalid; +- -/// [Errors] //// - -ES5SymbolProperty1.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff index 30f0af54db4a7..6eeea6a476de4 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff @@ -5,9 +5,9 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,17 +3,17 @@ - //// [FunctionDeclaration8_es6.d.ts] +@@ -4,17 +4,17 @@ declare var v: invalid; + /// [Errors] //// -FunctionDeclaration8_es6.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff index b14e1630b9335..70d5951d52642 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff @@ -5,9 +5,9 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,17 +3,17 @@ - //// [asyncFunctionDeclaration8_es2017.d.ts] +@@ -4,17 +4,17 @@ declare var v: invalid; + /// [Errors] //// -asyncFunctionDeclaration8_es2017.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff index 4a39c1ef1fb60..8dcadfbf93c97 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff @@ -5,9 +5,9 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,17 +3,17 @@ - //// [asyncFunctionDeclaration8_es5.d.ts] +@@ -4,17 +4,17 @@ declare var v: invalid; + /// [Errors] //// -asyncFunctionDeclaration8_es5.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff index afcff91cb9214..cd91a33f4b7eb 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff @@ -5,9 +5,9 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,17 +3,17 @@ - //// [asyncFunctionDeclaration8_es6.d.ts] +@@ -4,17 +4,17 @@ declare var v: invalid; + /// [Errors] //// -asyncFunctionDeclaration8_es6.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff index d72a5bd3980ae..370c44d6a9a1b 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff @@ -14,6 +14,7 @@ +declare const c: { + [bigNum]: number; +}; + /// [Errors] //// a.ts(2,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. 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 index ea239753d09a1..1b72c418439ac 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff @@ -35,6 +35,7 @@ @@ -29,24 +35,21 @@ export declare const o9: invalid; export {}; + /// [Errors] //// -computedPropertiesNarrowed.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff index 6fa5ec29ea32c..c4902614213bc 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -14,36 +14,29 @@ - } +@@ -15,36 +15,29 @@ + /// [Errors] //// computedPropertyNames12_ES5.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -43,7 +43,7 @@ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static [s + s]: string; ~~~~~~~ -@@ -58,10 +51,8 @@ +@@ -59,10 +52,8 @@ [0]: number; [a]: number; ~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff index 9246d8c8f142c..26a606bcb7944 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -14,36 +14,29 @@ - } +@@ -15,36 +15,29 @@ + /// [Errors] //// computedPropertyNames12_ES6.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -43,7 +43,7 @@ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static [s + s]: string; ~~~~~~~ -@@ -58,10 +51,8 @@ +@@ -59,10 +52,8 @@ [0]: number; [a]: number; ~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff index d014386ba3bcd..fec7c72fd9542 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -14,28 +14,24 @@ - } +@@ -15,28 +15,24 @@ + /// [Errors] //// computedPropertyNames16_ES5.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -35,7 +35,7 @@ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static get [s + s]() { return 0; } set [s + n](v) { } -@@ -46,10 +42,8 @@ +@@ -47,10 +43,8 @@ get [0]() { return 0; } ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff index 5f20ed70ef8a4..95a4a084fc17f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -14,28 +14,24 @@ - } +@@ -15,28 +15,24 @@ + /// [Errors] //// computedPropertyNames16_ES6.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -35,7 +35,7 @@ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static get [s + s]() { return 0; } set [s + n](v) { } -@@ -46,10 +42,8 @@ +@@ -47,10 +43,8 @@ get [0]() { return 0; } ~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff index 2cad76805463d..c751dbdcf0599 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -16,17 +16,15 @@ +@@ -17,17 +17,15 @@ computedPropertyNames2_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. computedPropertyNames2_ES5.ts(5,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. computedPropertyNames2_ES5.ts(6,9): error TS2378: A 'get' accessor must return a value. @@ -24,7 +24,7 @@ var accessorName = "accessor"; class C { [methodName]() { } -@@ -40,19 +38,15 @@ +@@ -41,19 +39,15 @@ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff index cc34975295c2c..868d8ce1326df 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -16,17 +16,15 @@ +@@ -17,17 +17,15 @@ computedPropertyNames2_ES6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. computedPropertyNames2_ES6.ts(5,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. computedPropertyNames2_ES6.ts(6,9): error TS2378: A 'get' accessor must return a value. @@ -24,7 +24,7 @@ var accessorName = "accessor"; class C { [methodName]() { } -@@ -40,19 +38,15 @@ +@@ -41,19 +39,15 @@ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff index b96b4122e8f3e..07fb6ad84d86f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff @@ -5,9 +5,9 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,28 +6,24 @@ - declare var a: any; +@@ -7,28 +7,24 @@ declare var v: invalid; + /// [Errors] //// -computedPropertyNames4_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -37,7 +37,7 @@ [s + s]: 1, ~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -@@ -39,10 +35,8 @@ +@@ -40,10 +36,8 @@ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. [""]: 0, [0]: 0, diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff index fec1e4f3b2efd..196f1b440ec7a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff @@ -5,9 +5,9 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,28 +6,24 @@ - declare var a: any; +@@ -7,28 +7,24 @@ declare var v: invalid; + /// [Errors] //// -computedPropertyNames4_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -37,7 +37,7 @@ [s + s]: 1, ~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -@@ -39,10 +35,8 @@ +@@ -40,10 +36,8 @@ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. [""]: 0, [0]: 0, diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff index 7117a2f9a072d..e95b71d6e4292 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,28 +5,24 @@ - declare var v: invalid; +@@ -6,28 +6,24 @@ + /// [Errors] //// computedPropertyNames5_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -35,7 +35,7 @@ ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. [[]]: 0, -@@ -41,10 +37,8 @@ +@@ -42,10 +38,8 @@ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. [undefined]: undefined, ~~~~~~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff index c3535441f7de6..8151527a7911c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,28 +5,24 @@ - declare var v: invalid; +@@ -6,28 +6,24 @@ + /// [Errors] //// computedPropertyNames5_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -35,7 +35,7 @@ ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. [[]]: 0, -@@ -41,10 +37,8 @@ +@@ -42,10 +38,8 @@ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. [undefined]: undefined, ~~~~~~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff index 53f55285857f0..06ff582e13a84 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,33 +3,28 @@ +@@ -3,34 +3,29 @@ //// [computedPropertyNames6_ES5.d.ts] declare var p1: number | string; declare var p2: number | number[]; @@ -16,6 +16,7 @@ + [p2]: number; + [p3]: number; +}; + /// [Errors] //// -computedPropertyNames6_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff index 3347ea9aae6f7..5a3332aaf4945 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,33 +3,28 @@ +@@ -3,34 +3,29 @@ //// [computedPropertyNames6_ES6.d.ts] declare var p1: number | string; declare var p2: number | number[]; @@ -16,6 +16,7 @@ + [p2]: number; + [p3]: number; +}; + /// [Errors] //// -computedPropertyNames6_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff index 023a899ab6350..d93509e645cbf 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff @@ -5,13 +5,14 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,20 +5,18 @@ +@@ -5,21 +5,19 @@ declare var accessorName: string; declare class C { [methodName](v: string): invalid; [methodName](): invalid; - [methodName](v?: string): invalid; } + /// [Errors] //// computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. @@ -27,7 +28,7 @@ var accessorName = "accessor"; class C { [methodName](v: string); -@@ -31,7 +29,5 @@ +@@ -32,7 +30,5 @@ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff index 54fa188030e65..43b55ece438ec 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff @@ -5,13 +5,14 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,20 +5,18 @@ +@@ -5,21 +5,19 @@ declare var accessorName: string; declare class C { [methodName](v: string): invalid; [methodName](): invalid; - [methodName](v?: string): invalid; } + /// [Errors] //// computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. @@ -27,7 +28,7 @@ var accessorName = "accessor"; class C { [methodName](v: string); -@@ -31,7 +29,5 @@ +@@ -32,7 +30,5 @@ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff index 052d2505d1fb0..c689438b2dee1 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -10,15 +10,14 @@ +@@ -11,15 +11,14 @@ /// [Errors] //// computedPropertyNamesWithStaticProperty.ts(3,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -22,7 +22,7 @@ static staticProp = 10; get [C.staticProp]() { ~~~~~~~~~~~~~~ -@@ -28,10 +27,8 @@ +@@ -29,10 +28,8 @@ !!! related TS2728 computedPropertyNamesWithStaticProperty.ts:1:7: 'C' is declared here. return "hello"; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts.diff index 2eb851a0025ca..cf97e733fa4ca 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts.diff @@ -13,6 +13,7 @@ - g = 0 + g } + /// [Errors] //// constEnum2.ts(7,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff index d43d07e20b5d4..50dededc8293c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff @@ -17,6 +17,7 @@ } declare const enum E2 { @@ -34,8 +34,9 @@ + /// [Errors] //// constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff index 5c4529ec23342..a049b36c1634c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff @@ -10,7 +10,8 @@ declare namespace app { function foo(): void; } --/// [Errors] //// +- + /// [Errors] //// - -contextualReturnTypeOfIIFE2.ts(2,12): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff index 89703bf35065d..93117094d6459 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff @@ -7,6 +7,7 @@ +++ DTE declarations @@ -14,9 +14,8 @@ } + /// [Errors] //// child1.ts(9,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 9ab1bc5811353..88e150743d2b4 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitHasTypesRefOnNamespaceUse.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitHasTypesRefOnNamespaceUse.d.ts.diff @@ -10,7 +10,8 @@ //// [/src/index.d.ts] declare class Src implements NS.Dep { } --/// [Errors] //// +- + /// [Errors] //// - -/src/index.ts(1,22): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to dep to unblock declaration emit. - 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 index 822ca547b6667..b2da6e14220bc 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/declarationFilesWithTypeReferences2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationFilesWithTypeReferences2.d.ts.diff @@ -10,7 +10,8 @@ //// [/app.d.ts] declare function foo(): Error2; --/// [Errors] //// +- + /// [Errors] //// - -/app.ts(1,17): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to node to unblock declaration emit. - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts.diff index 9e693cb91ca34..2a4dff3f55d6a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts.diff @@ -15,4 +15,5 @@ c,// ok d } + /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts.diff index 8c9ccd76257ef..34a824611e1db 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -22,33 +22,39 @@ +@@ -22,34 +22,40 @@ a = Infinity, b = Infinity, c = Infinity, @@ -29,6 +29,7 @@ + f, + g } + /// [Errors] //// +enumConstantMembers.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -52,7 +53,7 @@ enum E1 { a = 1, b -@@ -73,10 +79,16 @@ +@@ -74,10 +80,16 @@ b = 2 / 0.0, c = 1.0 / 0.0, d = 0.0 / 0.0, @@ -69,7 +70,7 @@ const enum E6 { a = 1 / 0, -@@ -91,14 +103,20 @@ +@@ -92,14 +104,20 @@ d = 0.0 / 0.0, ~~~~~~~~~ !!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts.diff index 9890619a57640..9e117fe3f6daf 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts.diff @@ -13,6 +13,7 @@ - CatDog = 3 + CatDog } + /// [Errors] //// enumExportMergingES6.ts(8,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff index 735ea6e689fa5..5520baaf39075 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff @@ -8,6 +8,7 @@ @@ -4,23 +4,29 @@ export declare const expr: invalid; export declare const expr2: invalid; + /// [Errors] //// -expandoFunctionExpressionsWithDynamicNames.ts(5,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff index f15b1da019ce1..06411aac9b99e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff @@ -20,6 +20,7 @@ declare enum E1 { Z = 4 } + /// [Errors] //// +forwardRefInEnum.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/indexTypeNoSubstitutionTemplateLiteral.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/indexTypeNoSubstitutionTemplateLiteral.d.ts.diff index 7653ebdf52469..b72ee08b0cbd7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/indexTypeNoSubstitutionTemplateLiteral.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/indexTypeNoSubstitutionTemplateLiteral.d.ts.diff @@ -7,6 +7,7 @@ +++ DTE declarations @@ -5,17 +5,14 @@ type Test = keyof typeof Foo; + /// [Errors] //// indexTypeNoSubstitutionTemplateLiteral.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff index cb26ce1341c7d..86c050f1fe008 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff @@ -7,6 +7,7 @@ +++ DTE declarations @@ -6,21 +6,18 @@ } + /// [Errors] //// indexWithoutParamType2.ts(3,5): 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/mergedEnumDeclarationCodeGen.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts.diff index 90f869a204aa7..21517c33ff14f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts.diff @@ -13,6 +13,7 @@ - c = 0 + c } + /// [Errors] //// mergedEnumDeclarationCodeGen.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff index aa1c824bd7457..0e67c35e780c6 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff @@ -10,7 +10,8 @@ //// [/bin/test.d.ts] export {}; --/// [Errors] //// +- + /// [Errors] //// - -/node_modules/some-library/index.ios.ts(1,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff index a8fec51d7c312..dc023b452a36a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff @@ -5,9 +5,9 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,17 +3,17 @@ - //// [parserComputedPropertyName1.d.ts] +@@ -4,17 +4,17 @@ declare var v: invalid; + /// [Errors] //// -parserComputedPropertyName1.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff index 05a25c7b9969a..80ce5ae601982 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,20 +6,17 @@ - } +@@ -7,20 +7,17 @@ + /// [Errors] //// parserComputedPropertyName10.ts(2,4): 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/parserComputedPropertyName13.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff index 663e6ba8a57c8..e6a8f223ac823 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff @@ -13,7 +13,7 @@ +declare var v: { + [e]: number; +}; + /// [Errors] //// parserComputedPropertyName13.ts(1,10): 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. - parserComputedPropertyName13.ts(1,11): error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff index 80f0f2810e22a..613c84799c9e1 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff @@ -13,7 +13,7 @@ +declare var v: { + [e](): number; +}; + /// [Errors] //// parserComputedPropertyName14.ts(1,10): 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. - parserComputedPropertyName14.ts(1,11): error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff index d8d66850fa26c..35fe4bc771a7c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff @@ -12,6 +12,6 @@ [e: number]: string; + [e]: number; }; + /// [Errors] //// - parserComputedPropertyName15.ts(1,31): 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/original/diff/parserComputedPropertyName18.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff index 5fa4e6f763718..77aebb557d1ee 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff @@ -13,7 +13,7 @@ +declare var v: { + [e]?(): number; +}; + /// [Errors] //// parserComputedPropertyName18.ts(1,10): 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. - parserComputedPropertyName18.ts(1,11): error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff index 5bb209a76d89f..4e8dc6abe1ee4 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff @@ -13,7 +13,7 @@ +declare var v: { + [e]?: any; +}; + /// [Errors] //// parserComputedPropertyName19.ts(1,10): 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. - parserComputedPropertyName19.ts(1,11): error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff index 3671baafd7616..bdaf082b458e0 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,16 +1,15 @@ +@@ -1,17 +1,16 @@ //// [parserComputedPropertyName2.d.ts] @@ -13,6 +13,7 @@ +declare var v: { + [e]: number; +}; + /// [Errors] //// -parserComputedPropertyName2.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff index e92bed50cbb18..514c7e34bb6ab 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff @@ -12,6 +12,6 @@ interface I { + [e](): number; } + /// [Errors] //// - parserComputedPropertyName20.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff index 33d9af9b8646c..9695bc08604c3 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff @@ -12,6 +12,6 @@ interface I { + [e]: number; } + /// [Errors] //// - parserComputedPropertyName21.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff index adecf7a3deded..2562c873891fc 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,20 +6,17 @@ - } +@@ -7,20 +7,17 @@ + /// [Errors] //// parserComputedPropertyName22.ts(2,5): 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/parserComputedPropertyName23.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff index 99f600c0762aa..5b52674dfaa23 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff @@ -5,9 +5,9 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,18 +5,15 @@ - get [e](): number; +@@ -6,18 +6,15 @@ } + /// [Errors] //// -parserComputedPropertyName23.ts(2,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff index 9a5dcba82363f..41c8efb78d248 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff @@ -5,9 +5,9 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,19 +5,16 @@ - set [e](v: invalid); +@@ -6,19 +6,16 @@ } + /// [Errors] //// -parserComputedPropertyName24.ts(2,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff index 6df0261404921..1da6a72db2630 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,23 +6,20 @@ - } +@@ -7,23 +7,20 @@ + /// [Errors] //// parserComputedPropertyName25.ts(3,5): 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/parserComputedPropertyName27.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff index ec1c3439ff599..8e2b72f3fc730 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff @@ -5,9 +5,9 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,22 +6,19 @@ - number: invalid; +@@ -7,22 +7,19 @@ } + /// [Errors] //// -parserComputedPropertyName27.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff index 34a5e2603443e..73b77ac15ddc9 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,33 +7,27 @@ - } +@@ -8,33 +8,27 @@ + /// [Errors] //// parserComputedPropertyName28.ts(2,5): 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/parserComputedPropertyName29.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff index 3ebb53ef8e400..d05001efe069a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,27 +7,23 @@ - } +@@ -8,27 +8,23 @@ + /// [Errors] //// parserComputedPropertyName29.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -34,7 +34,7 @@ !!! error TS2304: Cannot find name 'e'. ~ !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -@@ -37,10 +33,8 @@ +@@ -38,10 +34,8 @@ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. [e2]: number ~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff index d05bc5641fde6..dbe6385840309 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,34 +7,28 @@ - } +@@ -8,34 +8,28 @@ + /// [Errors] //// parserComputedPropertyName31.ts(3,5): 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/parserComputedPropertyName32.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff index a7e1fbb37c3b7..1d9159f0e61e7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,20 +6,17 @@ - } +@@ -7,20 +7,17 @@ + /// [Errors] //// parserComputedPropertyName32.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff index 646f99089fa72..6d50553a48a40 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff @@ -5,9 +5,9 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,23 +5,20 @@ - [e]: invalid; +@@ -6,23 +6,20 @@ } + /// [Errors] //// -parserComputedPropertyName33.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff index d3de69b84cf54..7dfb2c75177e7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,21 +6,18 @@ - } +@@ -7,21 +7,18 @@ + /// [Errors] //// parserComputedPropertyName36.ts(2,5): 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/parserComputedPropertyName37.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff index 8ff87e9e0a6a5..333f77242a4fd 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,18 +1,17 @@ +@@ -1,19 +1,18 @@ //// [parserComputedPropertyName37.d.ts] @@ -13,6 +13,7 @@ +declare var v: { + [public]: number; +}; + /// [Errors] //// -parserComputedPropertyName37.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff index feeb9562280aa..5e1f9b2d37a23 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff @@ -5,9 +5,9 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,19 +3,16 @@ - //// [parserComputedPropertyName6.d.ts] +@@ -4,19 +4,16 @@ declare var v: invalid; + /// [Errors] //// -parserComputedPropertyName6.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff index 5e65e70073858..87d560a0af403 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,22 +6,19 @@ - } +@@ -7,22 +7,19 @@ + /// [Errors] //// parserComputedPropertyName9.ts(2,4): 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/parserES5ComputedPropertyName1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff index ea387c05bfc93..49271d95b1dd7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,20 +6,17 @@ - } +@@ -7,20 +7,17 @@ + /// [Errors] //// parserES5ComputedPropertyName1.ts(2,5): 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/parserES5ComputedPropertyName10.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff index fb437f1343c74..c1494b191971e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,20 +6,17 @@ - } +@@ -7,20 +7,17 @@ + /// [Errors] //// parserES5ComputedPropertyName10.ts(2,4): 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/parserES5ComputedPropertyName2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff index 75eb2be3eaea6..939c6bdca1c70 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,16 +1,15 @@ +@@ -1,17 +1,16 @@ //// [parserES5ComputedPropertyName2.d.ts] @@ -13,6 +13,7 @@ +declare var v: { + [e]: number; +}; + /// [Errors] //// -parserES5ComputedPropertyName2.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff index e1150ae2fce5f..b854cdc5f6384 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff @@ -12,6 +12,6 @@ interface I { + [e]: number; } + /// [Errors] //// - parserES5ComputedPropertyName5.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff index c1c60918d4f77..74eee9373e03a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff @@ -13,7 +13,7 @@ +declare var v: { + [e]: number; +}; + /// [Errors] //// parserES5ComputedPropertyName8.ts(1,10): 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. - parserES5ComputedPropertyName8.ts(1,11): error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff index 9a93b9825fba7..ef4c03a932ddc 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,22 +6,19 @@ - } +@@ -7,22 +7,19 @@ + /// [Errors] //// parserES5ComputedPropertyName9.ts(2,4): 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/parserES5SymbolProperty1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff index 81d496484885b..67b467e20e33f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff @@ -12,6 +12,6 @@ interface I { + [Symbol.iterator]: string; } + /// [Errors] //// - parserES5SymbolProperty1.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff index b27918dd8a778..9fcf4bb6fe494 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff @@ -12,6 +12,6 @@ interface I { + [Symbol.unscopables](): string; } + /// [Errors] //// - parserES5SymbolProperty2.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff index 6307138903598..fcc0d91d42058 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,20 +6,17 @@ - } +@@ -7,20 +7,17 @@ + /// [Errors] //// parserES5SymbolProperty3.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff index 396217b340c56..80b7f9ef9b597 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,20 +6,17 @@ - } +@@ -7,20 +7,17 @@ + /// [Errors] //// parserES5SymbolProperty4.ts(2,5): 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/parserES5SymbolProperty5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff index a49775338162d..cb76d1cdb2d3e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,20 +6,17 @@ - } +@@ -7,20 +7,17 @@ + /// [Errors] //// parserES5SymbolProperty5.ts(2,5): 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/parserES5SymbolProperty6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff index aa0d41299177a..c8eb6ff044733 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,20 +6,17 @@ - } +@@ -7,20 +7,17 @@ + /// [Errors] //// parserES5SymbolProperty6.ts(2,5): 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/parserES5SymbolProperty7.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff index a101938f625d7..8ca7e7fbfadea 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff @@ -5,9 +5,9 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,18 +5,15 @@ - [Symbol.toStringTag](): void; +@@ -6,18 +6,15 @@ } + /// [Errors] //// -parserES5SymbolProperty7.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff index a065acdd3d528..8b71606a57ddc 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff @@ -13,7 +13,7 @@ +declare var x: { + [Symbol.toPrimitive](): string; +}; + /// [Errors] //// parserES5SymbolProperty8.ts(2,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. - parserES5SymbolProperty8.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff index 198f9653f39b0..1667e37528408 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff @@ -13,7 +13,7 @@ +declare var x: { + [Symbol.toPrimitive]: string; +}; + /// [Errors] //// parserES5SymbolProperty9.ts(2,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. - parserES5SymbolProperty9.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff index 43d161a065873..507028f2dd683 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff @@ -14,4 +14,4 @@ [p1: string]: any; [p2: string, p3: number]: any; } - /// [Errors] //// + diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff index 24998fe2a5558..b2015068b7b84 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff @@ -12,6 +12,6 @@ interface I { + [a]: any; } + /// [Errors] //// - parserIndexSignature5.ts(2,3): 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. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff index 9b94bfcfa886f..24eef71ebcaa7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff @@ -5,11 +5,12 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,14 +1,18 @@ +@@ -1,15 +1,19 @@ //// [parserStrictMode8.d.ts] +declare function eval(): invalid; + /// [Errors] //// parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserSymbolIndexer5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserSymbolIndexer5.d.ts.diff index d52449cd4df01..45113e075ce87 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserSymbolIndexer5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserSymbolIndexer5.d.ts.diff @@ -5,9 +5,9 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,12 +3,12 @@ - //// [parserSymbolIndexer5.d.ts] +@@ -4,12 +4,12 @@ declare var x: invalid; + /// [Errors] //// -parserSymbolIndexer5.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -19,7 +19,7 @@ parserSymbolIndexer5.ts(2,16): error TS1136: Property assignment expected. parserSymbolIndexer5.ts(2,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. parserSymbolIndexer5.ts(3,1): error TS1005: ':' expected. -@@ -16,17 +16,17 @@ +@@ -17,17 +17,17 @@ ==== parserSymbolIndexer5.ts (8 errors) ==== var x = { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/privateIndexer2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/privateIndexer2.d.ts.diff index 8d9f06fcb3300..2aefc55b39f6b 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/privateIndexer2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/privateIndexer2.d.ts.diff @@ -5,9 +5,9 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,11 +6,11 @@ - private []: string; +@@ -7,11 +7,11 @@ }; + /// [Errors] //// -privateIndexer2.ts(4,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -18,7 +18,7 @@ privateIndexer2.ts(4,24): error TS1136: Property assignment expected. privateIndexer2.ts(4,26): error TS2693: 'string' only refers to a type, but is being used as a value here. privateIndexer2.ts(4,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -@@ -21,14 +21,14 @@ +@@ -22,14 +22,14 @@ // private indexers not allowed var x = { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff index a60a8e2de6e3c..c5918b723bf07 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -111,9 +111,8 @@ +@@ -112,9 +112,8 @@ staticPropertyNameConflicts.ts(272,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. @@ -15,7 +15,7 @@ staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prototype'. staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. -@@ -137,9 +136,9 @@ +@@ -138,9 +137,9 @@ staticPropertyNameConflicts.ts(346,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -26,7 +26,7 @@ name: 'name', length: 'length', prototype: 'prototype', -@@ -544,10 +543,8 @@ +@@ -545,10 +544,8 @@ export class ExportedStaticPrototype { static [FunctionPropertyNames.prototype]: number; // always an error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff index 2d303feb3fdb8..2f466bf54f15f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -71,9 +71,8 @@ +@@ -72,9 +72,8 @@ staticPropertyNameConflicts.ts(272,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. @@ -15,7 +15,7 @@ staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prototype'. staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. -@@ -89,9 +88,9 @@ +@@ -90,9 +89,9 @@ staticPropertyNameConflicts.ts(346,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -26,7 +26,7 @@ name: 'name', length: 'length', prototype: 'prototype', -@@ -416,10 +415,8 @@ +@@ -417,10 +416,8 @@ export class ExportedStaticPrototype { static [FunctionPropertyNames.prototype]: number; // always an error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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 index a7e6ed3e05140..dc41e72893bc0 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,27 +5,31 @@ +@@ -5,8 +5,9 @@ interface I { } export class C { @@ -15,8 +15,9 @@ get [Symbol.toPrimitive](): invalid; set [Symbol.toPrimitive](x: I); } - export {}; +@@ -14,19 +15,22 @@ } + /// [Errors] //// +symbolDeclarationEmit12.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff index 29875a41eb50f..0aa5e90b57627 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff @@ -5,9 +5,9 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -4,19 +4,16 @@ - declare var s: symbol; +@@ -5,19 +5,16 @@ declare var x: invalid; + /// [Errors] //// -symbolProperty1.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff index 4e6fc4a099a54..d4111d37d116a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff @@ -5,8 +5,8 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,21 +5,18 @@ - declare var x: invalid; +@@ -6,21 +6,18 @@ + /// [Errors] //// symbolProperty2.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff index fd3e6acc48be5..31d00845d5b55 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,25 +6,22 @@ +@@ -7,25 +7,22 @@ /// [Errors] //// symbolProperty3.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff index f88db8d5ca7d3..2853486e0a9ad 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,20 +1,19 @@ +@@ -1,21 +1,20 @@ //// [symbolProperty52.d.ts] @@ -13,6 +13,7 @@ +declare var obj: { + [Symbol.nonsense]: number; +}; + /// [Errors] //// -symbolProperty52.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff index f8c7d94d1e18c..eccfda0d504a9 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,22 +1,21 @@ +@@ -1,23 +1,22 @@ //// [symbolProperty53.d.ts] @@ -13,6 +13,7 @@ +declare var obj: { + [Symbol.for]: number; +}; + /// [Errors] //// symbolProperty53.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff index 9243951042fe6..00c2585ef2b58 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,18 +1,17 @@ +@@ -1,19 +1,18 @@ //// [symbolProperty54.d.ts] @@ -13,6 +13,7 @@ +declare var obj: { + [Symbol.prototype]: number; +}; + /// [Errors] //// symbolProperty54.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff index c4261b9abf54c..4ec35348c5f20 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff @@ -5,12 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,20 +3,7 @@ +@@ -3,21 +3,7 @@ //// [symbolProperty58.d.ts] interface SymbolConstructor { foo: string; } -declare var obj: invalid; +- -/// [Errors] //// - -symbolProperty58.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff index df6904dc558d0..3a0d2fcb360fd 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff @@ -12,6 +12,6 @@ interface I { + [Symbol.keyFor]: string; } + /// [Errors] //// - symbolProperty59.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment36.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment36.d.ts.diff index 46d0a214a71c1..76565560656f0 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment36.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment36.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -12,14 +12,13 @@ +@@ -13,14 +13,13 @@ typeFromPropertyAssignment36.ts(32,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. typeFromPropertyAssignment36.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. typeFromPropertyAssignment36.ts(34,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. @@ -22,7 +22,7 @@ ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. function d() { -@@ -89,12 +88,10 @@ +@@ -90,12 +89,10 @@ d.r // test function expressions too 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 index a24d26b7bc32b..6a71a33a8e177 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives11.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives11.d.ts.diff @@ -8,6 +8,7 @@ @@ -6,9 +6,8 @@ //// [/mod2.d.ts] export declare const bar: invalid; + /// [Errors] //// -/mod1.ts(1,24): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. 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 index a376176699557..97687b88457e3 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives2.d.ts.diff @@ -10,7 +10,8 @@ interface A { x: $; } --/// [Errors] //// +- + /// [Errors] //// - -/app.ts(2,8): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. - 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 index c05ca29b0a016..c3e89f1f9faee 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives8.d.ts.diff @@ -8,6 +8,7 @@ @@ -6,9 +6,8 @@ //// [/mod2.d.ts] export declare const bar: invalid; + /// [Errors] //// -/mod1.ts(1,24): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff index 02664bbdec56b..8479a423197ce 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff @@ -33,5 +33,6 @@ + [K4]: number; k4: string; }; + /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts index 52bf96dbc1a7c..4341b60171f83 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts @@ -9,6 +9,7 @@ var v = { [yield]: foo } //// [FunctionDeclaration8_es6.d.ts] declare var v: invalid; + /// [Errors] //// FunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'yield'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts index 855de4492b911..e780b280cea95 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts @@ -9,6 +9,7 @@ var v = { [await]: foo } //// [asyncFunctionDeclaration8_es2017.d.ts] declare var v: invalid; + /// [Errors] //// asyncFunctionDeclaration8_es2017.ts(1,12): error TS2304: Cannot find name 'await'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts index 3a0b9950b9d5b..d985a2e36fb69 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts @@ -9,6 +9,7 @@ var v = { [await]: foo } //// [asyncFunctionDeclaration8_es5.d.ts] declare var v: invalid; + /// [Errors] //// asyncFunctionDeclaration8_es5.ts(1,12): error TS2304: Cannot find name 'await'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts index d8e3f864ed373..7423476e957c3 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts @@ -9,6 +9,7 @@ var v = { [await]: foo } //// [asyncFunctionDeclaration8_es6.d.ts] declare var v: invalid; + /// [Errors] //// asyncFunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'await'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts index 790fdb62b9992..36dacaa423cf6 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts @@ -54,6 +54,7 @@ declare const b: { declare const c: { [bigNum]: number; }; + /// [Errors] //// a.ts(2,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts index 6ae56a2508e22..7d025827958c7 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts @@ -164,6 +164,7 @@ declare namespace mglo5 { f1(): string; } } + /// [Errors] //// complicatedPrivacy.ts(5,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts index cde0977c6b495..bce705a668f92 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts @@ -89,6 +89,7 @@ export declare const o8: { }; export declare const o9: invalid; export {}; + /// [Errors] //// computedPropertiesNarrowed.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts index 44e0845f17140..a78cbc6924a77 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts @@ -34,6 +34,7 @@ declare class C { [a]: number; [`hello bye`]: number; } + /// [Errors] //// computedPropertyNames12_ES5.ts(5,5): 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/dte/computedPropertyNames12_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts index e93cc47a0a312..29fbb1047f12b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts @@ -34,6 +34,7 @@ declare class C { [a]: number; [`hello bye`]: number; } + /// [Errors] //// computedPropertyNames12_ES6.ts(5,5): 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/dte/computedPropertyNames16_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts index 3a47e045033e2..e92bc8a2a7792 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts @@ -34,6 +34,7 @@ declare class C { set [a](v: invalid); set [`hello bye`](v: invalid); } + /// [Errors] //// computedPropertyNames16_ES5.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts index 18653a2514df2..7c0d499e47042 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts @@ -34,6 +34,7 @@ declare class C { set [a](v: invalid); set [`hello bye`](v: invalid); } + /// [Errors] //// computedPropertyNames16_ES6.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts index 6a00d09998bed..f7aff894c6295 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts @@ -27,6 +27,7 @@ declare class C { static get [accessorName](): invalid; static set [accessorName](v: invalid); } + /// [Errors] //// computedPropertyNames2_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts index 34602d2ca21ec..048e86ae27b6d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts @@ -27,6 +27,7 @@ declare class C { static get [accessorName](): invalid; static set [accessorName](v: invalid); } + /// [Errors] //// computedPropertyNames2_ES6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts index 770fec27db953..13a8f4d07962a 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts @@ -27,6 +27,7 @@ declare var s: string; declare var n: number; declare var a: any; declare var v: invalid; + /// [Errors] //// computedPropertyNames4_ES5.ts(6,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts index 5a41adfcfa4e7..16b062b1642ed 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts @@ -27,6 +27,7 @@ declare var s: string; declare var n: number; declare var a: any; declare var v: invalid; + /// [Errors] //// computedPropertyNames4_ES6.ts(6,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts index 053672a2be832..951d692364184 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts @@ -18,6 +18,7 @@ var v = { //// [computedPropertyNames5_ES5.d.ts] declare var b: boolean; declare var v: invalid; + /// [Errors] //// computedPropertyNames5_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts index 6789bd5439f8d..98098bf79adbb 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts @@ -18,6 +18,7 @@ var v = { //// [computedPropertyNames5_ES6.d.ts] declare var b: boolean; declare var v: invalid; + /// [Errors] //// computedPropertyNames5_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES5.d.ts index bfd4b58491c17..28ac4e908ccb3 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES5.d.ts @@ -23,6 +23,7 @@ declare var v: { [p2]: number; [p3]: number; }; + /// [Errors] //// computedPropertyNames6_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES6.d.ts index f44882c10d642..31c68455079fa 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES6.d.ts @@ -23,6 +23,7 @@ declare var v: { [p2]: number; [p3]: number; }; + /// [Errors] //// computedPropertyNames6_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts index 28b3c63b37642..0e70d22b6807c 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts @@ -20,6 +20,7 @@ declare class C { [methodName](v: string): invalid; [methodName](): invalid; } + /// [Errors] //// computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts index 0cfa32367af92..230f57a770d3d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts @@ -20,6 +20,7 @@ declare class C { [methodName](v: string): invalid; [methodName](): invalid; } + /// [Errors] //// computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts index 60e4e918d8e3c..f78ea2276175f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts @@ -23,6 +23,7 @@ declare class C { set [C.staticProp](x: string); [C.staticProp](): invalid; } + /// [Errors] //// computedPropertyNamesWithStaticProperty.ts(3,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/constEnum2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/constEnum2.d.ts index adf89724fd875..41f2a726ad93a 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/constEnum2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/constEnum2.d.ts @@ -27,6 +27,7 @@ declare const enum D { f, g } + /// [Errors] //// constEnum2.ts(7,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts index 0ee6b9de34c0f..49a78394d5604 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts @@ -81,6 +81,7 @@ declare const enum NaNOrInfinity { G = Infinity,// overflow H = NaN } + /// [Errors] //// constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/constEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/constEnums.d.ts index f73d48e10b6c0..a6807ef0c080d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/constEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/constEnums.d.ts @@ -279,6 +279,7 @@ declare function foo2(e: I2.C.E): void; declare function foo(x: Enum1): invalid; declare function bar(e: A.B.C.E): number; declare function baz(c: Comments): invalid; + /// [Errors] //// constEnums.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts index 6cf971bf20cf0..e4eed6020ef19 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts @@ -36,6 +36,7 @@ export declare function child1(prototype: ParentThing): invalid; //// [parent.d.ts] export declare class ParentThing implements ParentThing { } + /// [Errors] //// child1.ts(9,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitLateBoundAssignments2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitLateBoundAssignments2.d.ts index 825879fa02ec1..e0dd7333e8c6f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitLateBoundAssignments2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitLateBoundAssignments2.d.ts @@ -95,6 +95,7 @@ export declare const arrow7: invalid; export declare const arrow8: invalid; export declare const arrow9: invalid; export declare const arrow10: invalid; + /// [Errors] //// declarationEmitLateBoundAssignments2.ts(9,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts index bc7a406668a3e..8e9158dfba3dd 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts @@ -267,6 +267,7 @@ declare class I { [fieldNameB]: any; [fieldNameC]: any; } + /// [Errors] //// decoratorsOnComputedProperties.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumBasics2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumBasics2.d.ts index b18c363e9d92f..cd76be299f30e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/enumBasics2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/enumBasics2.d.ts @@ -35,6 +35,7 @@ declare enum Bar { c,// ok d } + /// [Errors] //// enumBasics2.ts(4,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumBasics3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumBasics3.d.ts index 14c0feaeb6db2..ff61a9e6ef4ae 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/enumBasics3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/enumBasics3.d.ts @@ -41,6 +41,7 @@ declare namespace M { } } } + /// [Errors] //// enumBasics3.ts(5,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts index b53f12b5d4de7..35f3779028a93 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts @@ -82,6 +82,7 @@ declare const enum E6 { f, g } + /// [Errors] //// enumConstantMembers.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumErrors.d.ts index 599b0c13ebf3e..2feb88ebf225d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/enumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/enumErrors.d.ts @@ -113,6 +113,7 @@ declare enum E14 { c = 5, d = 6 } + /// [Errors] //// enumErrors.ts(2,6): error TS2431: Enum name cannot be 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumExportMergingES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumExportMergingES6.d.ts index 7fee4324b5777..8bfc2624275c9 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/enumExportMergingES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/enumExportMergingES6.d.ts @@ -26,6 +26,7 @@ export declare enum Animals { export declare enum Animals { CatDog } + /// [Errors] //// enumExportMergingES6.ts(8,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/expandoFunctionExpressionsWithDynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/expandoFunctionExpressionsWithDynamicNames.d.ts index 568ab5131e2fd..5f8f981bc0395 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/expandoFunctionExpressionsWithDynamicNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/expandoFunctionExpressionsWithDynamicNames.d.ts @@ -19,6 +19,7 @@ expr2[s] = 0 //// [expandoFunctionExpressionsWithDynamicNames.d.ts] export declare const expr: invalid; export declare const expr2: invalid; + /// [Errors] //// expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts index c1b4fcaf943a4..cdf5631afd8b7 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts @@ -30,6 +30,7 @@ declare enum E1 { declare enum E1 { Z = 4 } + /// [Errors] //// forwardRefInEnum.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts index 8a084f73068e0..db4ed57f56993 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts @@ -983,6 +983,7 @@ export declare namespace eaM { namespace eM { } } } + /// [Errors] //// giant.ts(22,12): error TS2300: Duplicate identifier 'pgF'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts index e19cfc75be78b..e62e187e5ec0b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts @@ -32,6 +32,7 @@ declare class C { declare class C2 { [x: string]: any; } + /// [Errors] //// indexSignatureMustHaveTypeAnnotation.ts(3,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. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/indexTypeNoSubstitutionTemplateLiteral.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/indexTypeNoSubstitutionTemplateLiteral.d.ts index b037dea451cad..779ee463e1ca1 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/indexTypeNoSubstitutionTemplateLiteral.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/indexTypeNoSubstitutionTemplateLiteral.d.ts @@ -15,6 +15,7 @@ type Test = keyof typeof Foo; //// [indexTypeNoSubstitutionTemplateLiteral.d.ts] declare function Foo(): invalid; type Test = keyof typeof Foo; + /// [Errors] //// indexTypeNoSubstitutionTemplateLiteral.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/indexWithoutParamType2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/indexWithoutParamType2.d.ts index e9339037db5eb..5ad20a5ea4e56 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/indexWithoutParamType2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/indexWithoutParamType2.d.ts @@ -14,6 +14,7 @@ class C { declare class C { [x]: string; } + /// [Errors] //// indexWithoutParamType2.ts(3,5): 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/dte/intTypeCheck.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts index f646835543120..fcd5e9d4fdc9f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts @@ -369,6 +369,7 @@ declare var obj83: i8; declare var obj85: i8; declare var obj86: i8; declare var obj87: i8; + /// [Errors] //// intTypeCheck.ts(9,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts index 04a77591221b6..69fcfe2876aba 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts @@ -52,6 +52,7 @@ declare const a11: invalid; declare const a12: invalid; declare const a13: invalid; declare const a14: invalid; + /// [Errors] //// invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es5).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es5).d.ts index 04a77591221b6..69fcfe2876aba 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es5).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es5).d.ts @@ -52,6 +52,7 @@ declare const a11: invalid; declare const a12: invalid; declare const a13: invalid; declare const a14: invalid; + /// [Errors] //// invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts index 04a77591221b6..69fcfe2876aba 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts @@ -52,6 +52,7 @@ declare const a11: invalid; declare const a12: invalid; declare const a13: invalid; declare const a14: invalid; + /// [Errors] //// invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts index 8891a58fb4663..c9c1d5697566c 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts @@ -74,6 +74,7 @@ declare namespace Uninstantiated { declare namespace Ambient { const x: number; } + /// [Errors] //// enum2.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/mergedDeclarations2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/mergedDeclarations2.d.ts index fd2ca4baaab12..09190359daea0 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/mergedDeclarations2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/mergedDeclarations2.d.ts @@ -26,6 +26,7 @@ declare enum Foo { declare namespace Foo { var x: invalid; } + /// [Errors] //// mergedDeclarations2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/mergedEnumDeclarationCodeGen.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/mergedEnumDeclarationCodeGen.d.ts index 9868ce4a02269..6592af6dc3cf3 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/mergedEnumDeclarationCodeGen.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/mergedEnumDeclarationCodeGen.d.ts @@ -21,6 +21,7 @@ declare enum E { declare enum E { c } + /// [Errors] //// mergedEnumDeclarationCodeGen.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts index 01f14ab13af4e..721815effd692 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts @@ -107,6 +107,7 @@ interface I3 { [2](): void; [2](): void; } + /// [Errors] //// overloadsWithComputedNames.ts(4,5): error TS2389: Function implementation name must be '["B"]'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts index eba0724a9cfbc..a73c211a58ef5 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts @@ -121,6 +121,7 @@ declare const leadingSeparator: invalid; declare const trailingSeparator = 123n; declare const doubleSeparator = 123456789n; declare const oneTwoOrThree: (x: 1n | 2n | 3n) => bigint; + /// [Errors] //// parseBigInt.ts(51,20): error TS2736: Operator '+' cannot be applied to type 'bigint'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName1.d.ts index 155dabe9f04dc..0c3f593f66dfa 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName1.d.ts @@ -9,6 +9,7 @@ var v = { [e] }; //// [parserComputedPropertyName1.d.ts] declare var v: invalid; + /// [Errors] //// parserComputedPropertyName1.ts(1,12): error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName10.d.ts index 75eb26c5137c0..bb73ae60d1ce0 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName10.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName10.d.ts @@ -13,6 +13,7 @@ class C { declare class C { [e]: number; } + /// [Errors] //// parserComputedPropertyName10.ts(2,4): 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/dte/parserComputedPropertyName13.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName13.d.ts index 2e631a715f65f..b4a6ce40d3184 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName13.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName13.d.ts @@ -11,6 +11,7 @@ var v: { [e]: number }; declare var v: { [e]: number; }; + /// [Errors] //// parserComputedPropertyName13.ts(1,10): 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/original/dte/parserComputedPropertyName14.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName14.d.ts index c9fa3166b2717..62e2f40c3ecdf 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName14.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName14.d.ts @@ -11,6 +11,7 @@ var v: { [e](): number }; declare var v: { [e](): number; }; + /// [Errors] //// parserComputedPropertyName14.ts(1,10): 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/original/dte/parserComputedPropertyName15.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName15.d.ts index d632e155b27fe..7300b84646dca 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName15.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName15.d.ts @@ -12,6 +12,7 @@ declare var v: { [e: number]: string; [e]: number; }; + /// [Errors] //// parserComputedPropertyName15.ts(1,31): 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/original/dte/parserComputedPropertyName18.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName18.d.ts index b22d95f3bcdc5..c2bff76748ac3 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName18.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName18.d.ts @@ -11,6 +11,7 @@ var v: { [e]?(): number }; declare var v: { [e]?(): number; }; + /// [Errors] //// parserComputedPropertyName18.ts(1,10): 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/original/dte/parserComputedPropertyName19.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName19.d.ts index b0ede9b5bfa7d..8d5a0fc326d61 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName19.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName19.d.ts @@ -11,6 +11,7 @@ var v: { [e]? }; declare var v: { [e]?: any; }; + /// [Errors] //// parserComputedPropertyName19.ts(1,10): 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/original/dte/parserComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName2.d.ts index 4371615e22e8d..aa62c99329405 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName2.d.ts @@ -11,6 +11,7 @@ var v = { [e]: 1 }; declare var v: { [e]: number; }; + /// [Errors] //// parserComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName20.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName20.d.ts index 0cf0920da1d53..551b62cf8f19e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName20.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName20.d.ts @@ -13,6 +13,7 @@ interface I { interface I { [e](): number; } + /// [Errors] //// parserComputedPropertyName20.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName21.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName21.d.ts index 17146468a00ea..884032d23171e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName21.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName21.d.ts @@ -13,6 +13,7 @@ interface I { interface I { [e]: number; } + /// [Errors] //// parserComputedPropertyName21.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName22.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName22.d.ts index 2b61f5fce4583..5c4bcde714403 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName22.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName22.d.ts @@ -13,6 +13,7 @@ declare class C { declare class C { [e]: number; } + /// [Errors] //// parserComputedPropertyName22.ts(2,5): 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/dte/parserComputedPropertyName23.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName23.d.ts index 7fe82c89833cb..58be205f27105 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName23.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName23.d.ts @@ -13,6 +13,7 @@ declare class C { declare class C { get [e](): number; } + /// [Errors] //// parserComputedPropertyName23.ts(2,10): error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts index 15ffae4c0426c..a865ef5783dae 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts @@ -13,6 +13,7 @@ class C { declare class C { set [e](v: invalid); } + /// [Errors] //// parserComputedPropertyName24.ts(2,10): error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts index 046f5423e4fcf..7b6219fda8e56 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts @@ -15,6 +15,7 @@ class C { declare class C { [e]: invalid; } + /// [Errors] //// parserComputedPropertyName25.ts(3,5): 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/dte/parserComputedPropertyName27.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts index 453be0f65fc84..5cb2ff7322f92 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts @@ -16,6 +16,7 @@ declare class C { [e]: number; number: invalid; } + /// [Errors] //// parserComputedPropertyName27.ts(3,6): error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName28.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName28.d.ts index 836d1db33c614..4b22eddb12919 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName28.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName28.d.ts @@ -15,6 +15,7 @@ declare class C { [e]: number; [e2]: number; } + /// [Errors] //// parserComputedPropertyName28.ts(2,5): 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/dte/parserComputedPropertyName29.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts index 5b33130669814..bc7e8b609c3c2 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts @@ -16,6 +16,7 @@ declare class C { [e]: invalid; [e2]: number; } + /// [Errors] //// parserComputedPropertyName29.ts(3,5): 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/dte/parserComputedPropertyName31.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName31.d.ts index fad20066c7090..53b06485443c9 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName31.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName31.d.ts @@ -16,6 +16,7 @@ declare class C { [e]: number; [e2]: number; } + /// [Errors] //// parserComputedPropertyName31.ts(3,5): 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/dte/parserComputedPropertyName32.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName32.d.ts index a88a78056f10e..22c4a60361d7d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName32.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName32.d.ts @@ -13,6 +13,7 @@ declare class C { declare class C { [e](): number; } + /// [Errors] //// parserComputedPropertyName32.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts index 929b3027a4b01..ea41ffbf55077 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts @@ -15,6 +15,7 @@ class C { declare class C { [e]: invalid; } + /// [Errors] //// parserComputedPropertyName33.ts(3,6): error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName36.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName36.d.ts index 09351b1e97f84..99abfcb83e72e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName36.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName36.d.ts @@ -13,6 +13,7 @@ class C { declare class C { [public]: string; } + /// [Errors] //// parserComputedPropertyName36.ts(2,5): 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/dte/parserComputedPropertyName37.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName37.d.ts index bbcbb8cc77602..e80bfec6284d0 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName37.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName37.d.ts @@ -13,6 +13,7 @@ var v = { declare var v: { [public]: number; }; + /// [Errors] //// parserComputedPropertyName37.ts(2,6): error TS2304: Cannot find name 'public'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts index bddf85254ff83..9babd98fbfabe 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts @@ -9,6 +9,7 @@ var v = { [e]: 1, [e + e]: 2 }; //// [parserComputedPropertyName6.d.ts] declare var v: invalid; + /// [Errors] //// parserComputedPropertyName6.ts(1,12): error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName9.d.ts index 0a00ed7a8c483..7f54587bf4b63 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName9.d.ts @@ -13,6 +13,7 @@ class C { declare class C { [e]: Type; } + /// [Errors] //// parserComputedPropertyName9.ts(2,4): 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/dte/parserES5ComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName1.d.ts index 1b45ac912a589..e5acc3369844b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName1.d.ts @@ -13,6 +13,7 @@ declare class C { declare class C { [e]: number; } + /// [Errors] //// parserES5ComputedPropertyName1.ts(2,5): 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/dte/parserES5ComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName10.d.ts index d79c8add09fbc..80436820d5f08 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName10.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName10.d.ts @@ -13,6 +13,7 @@ class C { declare class C { [e]: number; } + /// [Errors] //// parserES5ComputedPropertyName10.ts(2,4): 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/dte/parserES5ComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName2.d.ts index c317e9a094265..48ec6c0d3c1e7 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName2.d.ts @@ -11,6 +11,7 @@ var v = { [e]: 1 }; declare var v: { [e]: number; }; + /// [Errors] //// parserES5ComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName5.d.ts index 418a7931cc5e7..62a8be9fe86e6 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName5.d.ts @@ -13,6 +13,7 @@ interface I { interface I { [e]: number; } + /// [Errors] //// parserES5ComputedPropertyName5.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName8.d.ts index e39d11139de4e..98ad892eadafc 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName8.d.ts @@ -11,6 +11,7 @@ var v: { [e]: number }; declare var v: { [e]: number; }; + /// [Errors] //// parserES5ComputedPropertyName8.ts(1,10): 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/original/dte/parserES5ComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName9.d.ts index 55d00805ea21d..bdd6e47bfb384 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName9.d.ts @@ -13,6 +13,7 @@ class C { declare class C { [e]: Type; } + /// [Errors] //// parserES5ComputedPropertyName9.ts(2,4): 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/dte/parserES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty1.d.ts index 48d6a25e27722..7e6ead699580e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty1.d.ts @@ -13,6 +13,7 @@ interface I { interface I { [Symbol.iterator]: string; } + /// [Errors] //// parserES5SymbolProperty1.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty2.d.ts index 2f183238e4e20..5648323fda326 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty2.d.ts @@ -13,6 +13,7 @@ interface I { interface I { [Symbol.unscopables](): string; } + /// [Errors] //// parserES5SymbolProperty2.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty3.d.ts index c15848d3312ab..9269dc869480d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty3.d.ts @@ -13,6 +13,7 @@ declare class C { declare class C { [Symbol.unscopables](): string; } + /// [Errors] //// parserES5SymbolProperty3.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts index 76a5bda46cc6b..2d96420f38230 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts @@ -13,6 +13,7 @@ declare class C { declare class C { [Symbol.isRegExp]: string; } + /// [Errors] //// parserES5SymbolProperty4.ts(2,5): 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/dte/parserES5SymbolProperty5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty5.d.ts index 0e1e8f42c8cf2..1464fdba02c9d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty5.d.ts @@ -13,6 +13,7 @@ class C { declare class C { [Symbol.isRegExp]: string; } + /// [Errors] //// parserES5SymbolProperty5.ts(2,5): 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/dte/parserES5SymbolProperty6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty6.d.ts index 49cea4d179a02..ddf3315126ea9 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty6.d.ts @@ -13,6 +13,7 @@ class C { declare class C { [Symbol.toStringTag]: string; } + /// [Errors] //// parserES5SymbolProperty6.ts(2,5): 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/dte/parserES5SymbolProperty7.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty7.d.ts index aba3a731aa7c4..513a9d1a7f4be 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty7.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty7.d.ts @@ -13,6 +13,7 @@ class C { declare class C { [Symbol.toStringTag](): void; } + /// [Errors] //// parserES5SymbolProperty7.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts index 01eee653c8b69..4934e408820f3 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts @@ -13,6 +13,7 @@ var x: { declare var x: { [Symbol.toPrimitive](): string; }; + /// [Errors] //// parserES5SymbolProperty8.ts(2,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/original/dte/parserES5SymbolProperty9.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty9.d.ts index f4fe0c073b469..3cc2ff2d00bff 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty9.d.ts @@ -13,6 +13,7 @@ var x: { declare var x: { [Symbol.toPrimitive]: string; }; + /// [Errors] //// parserES5SymbolProperty9.ts(2,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/original/dte/parserIndexSignature11.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature11.d.ts index 16147408c0230..2aee14a054d08 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature11.d.ts @@ -17,6 +17,7 @@ interface I { [p1: string]: any; [p2: string, p3: number]: any; } + /// [Errors] //// parserIndexSignature11.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature5.d.ts index 85d5178395dff..d80dc933460b2 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature5.d.ts @@ -13,6 +13,7 @@ interface I { interface I { [a]: any; } + /// [Errors] //// parserIndexSignature5.ts(2,3): 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. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts index 1ebd13b2a3a61..266fdfaabb347 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts @@ -11,6 +11,7 @@ function eval() { //// [parserStrictMode8.d.ts] declare function eval(): invalid; + /// [Errors] //// parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserSymbolIndexer5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserSymbolIndexer5.d.ts index 921156bc486bc..b425ea3161ce7 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserSymbolIndexer5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserSymbolIndexer5.d.ts @@ -11,6 +11,7 @@ var x = { //// [parserSymbolIndexer5.d.ts] declare var x: invalid; + /// [Errors] //// parserSymbolIndexer5.ts(2,6): error TS2304: Cannot find name 's'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/privateIndexer2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/privateIndexer2.d.ts index 83e5e45130f24..93d519337ce00 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/privateIndexer2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/privateIndexer2.d.ts @@ -20,6 +20,7 @@ declare var x: invalid; declare var y: { private []: string; }; + /// [Errors] //// privateIndexer2.ts(4,15): error TS1005: ']' expected. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/propertyAssignment.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/propertyAssignment.d.ts index 941ea08a719da..f9061bc2cf548 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/propertyAssignment.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/propertyAssignment.d.ts @@ -39,6 +39,7 @@ declare var foo3: { declare var bar3: { x: number; }; + /// [Errors] //// propertyAssignment.ts(4,13): 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/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts index 31f9907e67318..0fd3fcf5b7397 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts @@ -403,6 +403,7 @@ export declare class ExportedStaticArgumentsFn { [FunctionPropertyNames.arguments](): invalid; } export {}; + /// [Errors] //// staticPropertyNameConflicts.ts(11,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts index 2f9035342c9da..58b592d2a454d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts @@ -403,6 +403,7 @@ export declare class ExportedStaticArgumentsFn { [FunctionPropertyNames.arguments](): invalid; } export {}; + /// [Errors] //// staticPropertyNameConflicts.ts(53,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolDeclarationEmit12.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolDeclarationEmit12.d.ts index bcf6d13787586..2466cd6c13224 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolDeclarationEmit12.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolDeclarationEmit12.d.ts @@ -31,6 +31,7 @@ declare namespace M { } export {}; } + /// [Errors] //// symbolDeclarationEmit12.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts index 4c15657a0fb8e..5211f0c8633a6 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts @@ -17,6 +17,7 @@ var x = { //// [symbolProperty1.d.ts] declare var s: symbol; declare var x: invalid; + /// [Errors] //// symbolProperty1.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts index cdfff958617a9..4ed7089688969 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts @@ -17,6 +17,7 @@ var x = { //// [symbolProperty2.d.ts] declare var s: invalid; declare var x: invalid; + /// [Errors] //// symbolProperty2.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts index 33f689ae4805b..ee9167862be41 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts @@ -17,6 +17,7 @@ var x = { //// [symbolProperty3.d.ts] declare var s: invalid; declare var x: invalid; + /// [Errors] //// symbolProperty3.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty52.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty52.d.ts index 80a09e44bb7a1..104d711d2f769 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty52.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty52.d.ts @@ -17,6 +17,7 @@ obj[Symbol.nonsense]; declare var obj: { [Symbol.nonsense]: number; }; + /// [Errors] //// symbolProperty52.ts(2,13): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty53.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty53.d.ts index 2e56c11e0c523..fe6cb9dbd47d1 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty53.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty53.d.ts @@ -15,6 +15,7 @@ obj[Symbol.for]; declare var obj: { [Symbol.for]: number; }; + /// [Errors] //// symbolProperty53.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty54.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty54.d.ts index 59c6e5bf97247..730d3c5ba7509 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty54.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty54.d.ts @@ -13,6 +13,7 @@ var obj = { declare var obj: { [Symbol.prototype]: number; }; + /// [Errors] //// symbolProperty54.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty59.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty59.d.ts index 8a4c2fe82a112..56847aa8e3b78 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty59.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty59.d.ts @@ -13,6 +13,7 @@ interface I { interface I { [Symbol.keyFor]: string; } + /// [Errors] //// symbolProperty59.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralTypes4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralTypes4.d.ts index 2d00e9b33dc22..b81dc1e259068 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralTypes4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralTypes4.d.ts @@ -466,6 +466,7 @@ declare function f1(s: `**${T}**`): T; declare function f2(s: `**${T}**`): T; declare function f3(s: `**${T}**`): T; declare function f4(s: `**${T}**`): T; + /// [Errors] //// templateLiteralTypes4.ts(43,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment36.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment36.d.ts index 621b8fea5159e..95533f1eea99a 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment36.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment36.d.ts @@ -84,6 +84,7 @@ declare function f(b: boolean): invalid; declare var test: invalid; declare function d(): invalid; declare const g: invalid; + /// [Errors] //// typeFromPropertyAssignment36.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives11.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives11.d.ts index 7e7015ba222de..dd4145b11dd96 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives11.d.ts @@ -20,6 +20,7 @@ export declare function foo(): Lib; //// [/mod2.d.ts] export declare const bar: invalid; + /// [Errors] //// /mod2.ts(2,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts index ffeda355de2dc..114789e7f0e3b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts @@ -19,6 +19,7 @@ export declare function foo(): Lib; //// [/mod2.d.ts] export declare const bar: invalid; + /// [Errors] //// /mod2.ts(2,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts index b58456e399844..f88bc78781ab8 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts @@ -54,6 +54,7 @@ type T4 = { [K4]: number; k4: string; }; + /// [Errors] //// typeUsedAsTypeLiteralIndex.ts(3,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/original/dte/verbatimModuleSyntaxConstEnumUsage.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/verbatimModuleSyntaxConstEnumUsage.d.ts index f336b26e59988..839e8df50345c 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/verbatimModuleSyntaxConstEnumUsage.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/verbatimModuleSyntaxConstEnumUsage.d.ts @@ -33,6 +33,7 @@ export declare enum Foo { b = 2, c = 3 } + /// [Errors] //// bar.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts index 9b4dda01f7686..8f3904addf074 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts @@ -22,6 +22,7 @@ interface SymbolConstructor { } declare var Symbol: SymbolConstructor; declare var obj: invalid; + /// [Errors] //// ES5SymbolProperty1.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts index df4523118f4be..47e5d2a49bd9d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts @@ -9,6 +9,7 @@ var v = { [yield]: foo } //// [FunctionDeclaration8_es6.d.ts] declare var v: invalid; + /// [Errors] //// FunctionDeclaration8_es6.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts index bcecfedf34e83..ee53e2223c157 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts @@ -9,6 +9,7 @@ var v = { [await]: foo } //// [asyncFunctionDeclaration8_es2017.d.ts] declare var v: invalid; + /// [Errors] //// asyncFunctionDeclaration8_es2017.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts index 67fbc2076d781..5c6fa711c50ab 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts @@ -9,6 +9,7 @@ var v = { [await]: foo } //// [asyncFunctionDeclaration8_es5.d.ts] declare var v: invalid; + /// [Errors] //// asyncFunctionDeclaration8_es5.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts index dcca402e43dac..7d5b2453477d4 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts @@ -9,6 +9,7 @@ var v = { [await]: foo } //// [asyncFunctionDeclaration8_es6.d.ts] declare var v: invalid; + /// [Errors] //// asyncFunctionDeclaration8_es6.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts index 3aa58a43a1169..b474584b3458a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts @@ -52,6 +52,7 @@ declare const b: { [1n]: number; }; declare const c: invalid; + /// [Errors] //// a.ts(2,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts index 8baf03de2f7b0..2ec9ceba777a1 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts @@ -162,6 +162,7 @@ declare namespace mglo5 { f1(): string; } } + /// [Errors] //// complicatedPrivacy.ts(5,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts index 674cc59036e19..0f9d2d8865148 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts @@ -83,6 +83,7 @@ export declare const o8: { }; export declare const o9: invalid; export {}; + /// [Errors] //// computedPropertiesNarrowed.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts index f0090afa676fe..8da0faef43857 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts @@ -34,6 +34,7 @@ declare class C { [a]: number; [`hello bye`]: number; } + /// [Errors] //// computedPropertyNames12_ES5.ts(5,5): 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/tsc/computedPropertyNames12_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts index 60e44e006781f..9031721f1aa77 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts @@ -34,6 +34,7 @@ declare class C { [a]: number; [`hello bye`]: number; } + /// [Errors] //// computedPropertyNames12_ES6.ts(5,5): 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/tsc/computedPropertyNames16_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts index 6c330b031001b..3ad2143f2b9c5 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts @@ -34,6 +34,7 @@ declare class C { set [a](v: invalid); set [`hello bye`](v: invalid); } + /// [Errors] //// computedPropertyNames16_ES5.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts index f6ea765dba7db..9f5ab9633a99b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts @@ -34,6 +34,7 @@ declare class C { set [a](v: invalid); set [`hello bye`](v: invalid); } + /// [Errors] //// computedPropertyNames16_ES6.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts index b4a07d1cd3ef3..e1ed989cdfd84 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts @@ -27,6 +27,7 @@ declare class C { static get [accessorName](): invalid; static set [accessorName](v: invalid); } + /// [Errors] //// computedPropertyNames2_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts index 0bf15a5f2bc34..afd514f26ce95 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts @@ -27,6 +27,7 @@ declare class C { static get [accessorName](): invalid; static set [accessorName](v: invalid); } + /// [Errors] //// computedPropertyNames2_ES6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts index 606d4472d3517..44f3a81010ddb 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts @@ -27,6 +27,7 @@ declare var s: string; declare var n: number; declare var a: any; declare var v: invalid; + /// [Errors] //// computedPropertyNames4_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts index c517a9814d584..b5d6865a3e0f9 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts @@ -27,6 +27,7 @@ declare var s: string; declare var n: number; declare var a: any; declare var v: invalid; + /// [Errors] //// computedPropertyNames4_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts index f2f2438bc9e22..9a624c0bf7a45 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts @@ -18,6 +18,7 @@ var v = { //// [computedPropertyNames5_ES5.d.ts] declare var b: boolean; declare var v: invalid; + /// [Errors] //// computedPropertyNames5_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts index 48f4883a011c7..9aaeb97ec0a85 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts @@ -18,6 +18,7 @@ var v = { //// [computedPropertyNames5_ES6.d.ts] declare var b: boolean; declare var v: invalid; + /// [Errors] //// computedPropertyNames5_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts index 25537888f6550..083b60320f903 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts @@ -19,6 +19,7 @@ declare var p1: number | string; declare var p2: number | number[]; declare var p3: string | boolean; declare var v: invalid; + /// [Errors] //// computedPropertyNames6_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts index 37869462022e2..49275578669ef 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts @@ -19,6 +19,7 @@ declare var p1: number | string; declare var p2: number | number[]; declare var p3: string | boolean; declare var v: invalid; + /// [Errors] //// computedPropertyNames6_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts index 952d3bba53d3c..c048cce9b8d89 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts @@ -21,6 +21,7 @@ declare class C { [methodName](): invalid; [methodName](v?: string): invalid; } + /// [Errors] //// computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts index b710d2ce67bac..7d628a92d1a98 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts @@ -21,6 +21,7 @@ declare class C { [methodName](): invalid; [methodName](v?: string): invalid; } + /// [Errors] //// computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts index e5cdbb6c73c98..359300edc2909 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts @@ -23,6 +23,7 @@ declare class C { set [C.staticProp](x: string); [C.staticProp](): invalid; } + /// [Errors] //// computedPropertyNamesWithStaticProperty.ts(3,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/constEnum2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/constEnum2.d.ts index 29dcd8b6f97d9..77e166ad91736 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/constEnum2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/constEnum2.d.ts @@ -27,6 +27,7 @@ declare const enum D { f, g = 0 } + /// [Errors] //// constEnum2.ts(7,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts index 9b0ff417e5f7d..675a12bcdb255 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts @@ -81,6 +81,7 @@ declare const enum NaNOrInfinity { G = Infinity,// overflow H = NaN } + /// [Errors] //// constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/constEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/constEnums.d.ts index ebeafce29c4ad..ccb410b083f91 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/constEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/constEnums.d.ts @@ -279,6 +279,7 @@ declare function foo2(e: I2.C.E): void; declare function foo(x: Enum1): invalid; declare function bar(e: A.B.C.E): number; declare function baz(c: Comments): invalid; + /// [Errors] //// constEnums.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts index c982c32954c22..52641ca7bc1a4 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts @@ -21,6 +21,7 @@ app.foo.bar.someFun(1); declare namespace app { function foo(): void; } + /// [Errors] //// contextualReturnTypeOfIIFE2.ts(2,12): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts index 0df63a1813e46..f1d286362a64e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts @@ -36,6 +36,7 @@ export declare function child1(prototype: ParentThing): invalid; //// [parent.d.ts] export declare class ParentThing implements ParentThing { } + /// [Errors] //// child1.ts(9,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitHasTypesRefOnNamespaceUse.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitHasTypesRefOnNamespaceUse.d.ts index 14f725badfd27..1b545ed50901a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitHasTypesRefOnNamespaceUse.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitHasTypesRefOnNamespaceUse.d.ts @@ -20,6 +20,7 @@ declare namespace NS { //// [/src/index.d.ts] declare class Src implements NS.Dep { } + /// [Errors] //// /src/index.ts(1,22): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to dep to unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitLateBoundAssignments2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitLateBoundAssignments2.d.ts index b82c5274835cd..62377b129dde4 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitLateBoundAssignments2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitLateBoundAssignments2.d.ts @@ -95,6 +95,7 @@ export declare const arrow7: invalid; export declare const arrow8: invalid; export declare const arrow9: invalid; export declare const arrow10: invalid; + /// [Errors] //// declarationEmitLateBoundAssignments2.ts(9,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationFilesWithTypeReferences2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationFilesWithTypeReferences2.d.ts index 13a22f0d703c2..118d9a58b5a11 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/declarationFilesWithTypeReferences2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationFilesWithTypeReferences2.d.ts @@ -16,6 +16,7 @@ function foo(): Error2 { //// [/app.d.ts] declare function foo(): Error2; + /// [Errors] //// /app.ts(1,17): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to node to unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts index 1bd7bee047809..d84d143a8a5f6 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts @@ -267,6 +267,7 @@ declare class I { [fieldNameB]: any; [fieldNameC]: any; } + /// [Errors] //// decoratorsOnComputedProperties.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics2.d.ts index 653c6c14c073f..0de0b2bbff37a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics2.d.ts @@ -35,6 +35,7 @@ declare enum Bar { c,// ok d } + /// [Errors] //// enumBasics2.ts(4,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics3.d.ts index 8440af354b653..1b2cd54d53551 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics3.d.ts @@ -41,6 +41,7 @@ declare namespace M { } } } + /// [Errors] //// enumBasics3.ts(5,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts index 28eb136e39e44..64d2178e0285e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts @@ -82,6 +82,7 @@ declare const enum E6 { f = Infinity, g = -Infinity } + /// [Errors] //// enumConstantMembers.ts(32,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumErrors.d.ts index 3716a576aea04..0c014056bd4fe 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/enumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/enumErrors.d.ts @@ -113,6 +113,7 @@ declare enum E14 { c = 5, d = 6 } + /// [Errors] //// enumErrors.ts(2,6): error TS2431: Enum name cannot be 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumExportMergingES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumExportMergingES6.d.ts index 8f9854dc8883b..32a52fb266109 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/enumExportMergingES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/enumExportMergingES6.d.ts @@ -26,6 +26,7 @@ export declare enum Animals { export declare enum Animals { CatDog = 3 } + /// [Errors] //// enumExportMergingES6.ts(8,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts index 389051bbcaf9c..72871bace9952 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts @@ -19,6 +19,7 @@ expr2[s] = 0 //// [expandoFunctionExpressionsWithDynamicNames.d.ts] export declare const expr: invalid; export declare const expr2: invalid; + /// [Errors] //// expandoFunctionExpressionsWithDynamicNames.ts(5,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts index 098898eb7340d..78f4569ca9d76 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts @@ -30,6 +30,7 @@ declare enum E1 { declare enum E1 { Z = 4 } + /// [Errors] //// forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts index 922adc4a2d6be..f8be2aa8c2693 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts @@ -979,6 +979,7 @@ export declare namespace eaM { namespace eM { } } } + /// [Errors] //// giant.ts(22,12): error TS2300: Duplicate identifier 'pgF'. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts index c1f4164de4845..425ad4ace6024 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts @@ -31,6 +31,7 @@ declare class C { declare class C2 { [x: string]: any; } + /// [Errors] //// indexSignatureMustHaveTypeAnnotation.ts(3,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. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/indexTypeNoSubstitutionTemplateLiteral.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/indexTypeNoSubstitutionTemplateLiteral.d.ts index 12213176c3b14..d51ae2c5321b7 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/indexTypeNoSubstitutionTemplateLiteral.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/indexTypeNoSubstitutionTemplateLiteral.d.ts @@ -15,6 +15,7 @@ type Test = keyof typeof Foo; //// [indexTypeNoSubstitutionTemplateLiteral.d.ts] declare function Foo(): invalid; type Test = keyof typeof Foo; + /// [Errors] //// indexTypeNoSubstitutionTemplateLiteral.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts index c4f13e0776d98..6ba310ce761a4 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts @@ -14,6 +14,7 @@ class C { declare class C { [x]: string; } + /// [Errors] //// indexWithoutParamType2.ts(3,5): 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/tsc/intTypeCheck.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts index ef4a9aa51c356..7fff6d9192fb8 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts @@ -367,6 +367,7 @@ declare var obj83: i8; declare var obj85: i8; declare var obj86: i8; declare var obj87: i8; + /// [Errors] //// intTypeCheck.ts(9,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts index 5bfaa350e007e..84bd3297ccf3a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts @@ -52,6 +52,7 @@ declare const a11: invalid; declare const a12: invalid; declare const a13: invalid; declare const a14: invalid; + /// [Errors] //// invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es5).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es5).d.ts index 5bfaa350e007e..84bd3297ccf3a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es5).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es5).d.ts @@ -52,6 +52,7 @@ declare const a11: invalid; declare const a12: invalid; declare const a13: invalid; declare const a14: invalid; + /// [Errors] //// invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts index 5bfaa350e007e..84bd3297ccf3a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts @@ -52,6 +52,7 @@ declare const a11: invalid; declare const a12: invalid; declare const a13: invalid; declare const a14: invalid; + /// [Errors] //// invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts index a06d4a83e1c87..f98082cc871c7 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts @@ -74,6 +74,7 @@ declare namespace Uninstantiated { declare namespace Ambient { const x: number; } + /// [Errors] //// enum2.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/mergedDeclarations2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/mergedDeclarations2.d.ts index 66e92db0010ee..955154dcd7d18 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/mergedDeclarations2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/mergedDeclarations2.d.ts @@ -26,6 +26,7 @@ declare enum Foo { declare namespace Foo { var x: invalid; } + /// [Errors] //// mergedDeclarations2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/mergedEnumDeclarationCodeGen.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/mergedEnumDeclarationCodeGen.d.ts index 0e52af1b3639d..fc8380f719ed9 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/mergedEnumDeclarationCodeGen.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/mergedEnumDeclarationCodeGen.d.ts @@ -21,6 +21,7 @@ declare enum E { declare enum E { c = 0 } + /// [Errors] //// mergedEnumDeclarationCodeGen.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/moduleResolutionWithSuffixes_one_externalTSModule.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/moduleResolutionWithSuffixes_one_externalTSModule.d.ts index 6c440e833edd0..40de3e7fa9c03 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/moduleResolutionWithSuffixes_one_externalTSModule.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/moduleResolutionWithSuffixes_one_externalTSModule.d.ts @@ -14,6 +14,7 @@ export function base() {} //// [/bin/test.d.ts] export {}; + /// [Errors] //// /node_modules/some-library/index.ios.ts(1,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts index 07c524f3d13cf..0ed296293e2d4 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts @@ -108,6 +108,7 @@ interface I3 { [2](): void; [2](): void; } + /// [Errors] //// overloadsWithComputedNames.ts(4,5): error TS2389: Function implementation name must be '["B"]'. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parseBigInt.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseBigInt.d.ts index c0d5043d78450..6de495f9bfb1e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parseBigInt.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parseBigInt.d.ts @@ -121,6 +121,7 @@ declare const leadingSeparator: invalid; declare const trailingSeparator = 123n; declare const doubleSeparator = 123456789n; declare const oneTwoOrThree: (x: 1n | 2n | 3n) => bigint; + /// [Errors] //// parseBigInt.ts(51,20): error TS2736: Operator '+' cannot be applied to type 'bigint'. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts index c82bb6d99a6f4..e53ae7321066b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts @@ -9,6 +9,7 @@ var v = { [e] }; //// [parserComputedPropertyName1.d.ts] declare var v: invalid; + /// [Errors] //// parserComputedPropertyName1.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts index b77214d4fc7b4..c31d09460edc1 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts @@ -13,6 +13,7 @@ class C { declare class C { [e]: number; } + /// [Errors] //// parserComputedPropertyName10.ts(2,4): 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/tsc/parserComputedPropertyName13.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName13.d.ts index bdc809cf6584b..86cba9272e562 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName13.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName13.d.ts @@ -9,6 +9,7 @@ var v: { [e]: number }; //// [parserComputedPropertyName13.d.ts] declare var v: {}; + /// [Errors] //// parserComputedPropertyName13.ts(1,10): 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/original/tsc/parserComputedPropertyName14.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName14.d.ts index fe0ba4a8d747d..663e2b65cf44a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName14.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName14.d.ts @@ -9,6 +9,7 @@ var v: { [e](): number }; //// [parserComputedPropertyName14.d.ts] declare var v: {}; + /// [Errors] //// parserComputedPropertyName14.ts(1,10): 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/original/tsc/parserComputedPropertyName15.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName15.d.ts index aabe3a0df315a..4fc173ae75abd 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName15.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName15.d.ts @@ -11,6 +11,7 @@ var v: { [e: number]: string; [e]: number }; declare var v: { [e: number]: string; }; + /// [Errors] //// parserComputedPropertyName15.ts(1,31): 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/original/tsc/parserComputedPropertyName18.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName18.d.ts index 155d92a4438a3..6982238d125bb 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName18.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName18.d.ts @@ -9,6 +9,7 @@ var v: { [e]?(): number }; //// [parserComputedPropertyName18.d.ts] declare var v: {}; + /// [Errors] //// parserComputedPropertyName18.ts(1,10): 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/original/tsc/parserComputedPropertyName19.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName19.d.ts index 373c3adf173e2..3944a152a14ff 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName19.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName19.d.ts @@ -9,6 +9,7 @@ var v: { [e]? }; //// [parserComputedPropertyName19.d.ts] declare var v: {}; + /// [Errors] //// parserComputedPropertyName19.ts(1,10): 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/original/tsc/parserComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts index bfbff928a15b2..15f5b1b1e74fa 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts @@ -9,6 +9,7 @@ var v = { [e]: 1 }; //// [parserComputedPropertyName2.d.ts] declare var v: invalid; + /// [Errors] //// parserComputedPropertyName2.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName20.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName20.d.ts index 5241a7c73422f..7aa1ea0b45b49 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName20.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName20.d.ts @@ -12,6 +12,7 @@ interface I { //// [parserComputedPropertyName20.d.ts] interface I { } + /// [Errors] //// parserComputedPropertyName20.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName21.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName21.d.ts index ca15fba806420..432e578489aa7 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName21.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName21.d.ts @@ -12,6 +12,7 @@ interface I { //// [parserComputedPropertyName21.d.ts] interface I { } + /// [Errors] //// parserComputedPropertyName21.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts index 34c24a32e4863..2adfd1d271910 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts @@ -13,6 +13,7 @@ declare class C { declare class C { [e]: number; } + /// [Errors] //// parserComputedPropertyName22.ts(2,5): 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/tsc/parserComputedPropertyName23.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts index e967dcc2177c5..7402f13ac85b0 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts @@ -13,6 +13,7 @@ declare class C { declare class C { get [e](): number; } + /// [Errors] //// parserComputedPropertyName23.ts(2,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts index 2d56c21dc3758..2f4af09dc4bc2 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts @@ -13,6 +13,7 @@ class C { declare class C { set [e](v: invalid); } + /// [Errors] //// parserComputedPropertyName24.ts(2,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts index 3dfe893743629..59aa0181ad47b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts @@ -15,6 +15,7 @@ class C { declare class C { [e]: invalid; } + /// [Errors] //// parserComputedPropertyName25.ts(3,5): 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/tsc/parserComputedPropertyName27.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts index f3f44f4dc91d8..06c906e820daf 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts @@ -16,6 +16,7 @@ declare class C { [e]: number; number: invalid; } + /// [Errors] //// parserComputedPropertyName27.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts index 24b14659892bc..1b427ea69fc7c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts @@ -15,6 +15,7 @@ declare class C { [e]: number; [e2]: number; } + /// [Errors] //// parserComputedPropertyName28.ts(2,5): 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/tsc/parserComputedPropertyName29.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts index e4617d75f43e1..f633e68502474 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts @@ -16,6 +16,7 @@ declare class C { [e]: invalid; [e2]: number; } + /// [Errors] //// parserComputedPropertyName29.ts(3,5): 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/tsc/parserComputedPropertyName31.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts index c1a14daf6d5d8..a9b92b608f813 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts @@ -16,6 +16,7 @@ declare class C { [e]: number; [e2]: number; } + /// [Errors] //// parserComputedPropertyName31.ts(3,5): 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/tsc/parserComputedPropertyName32.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts index 7523b19e8af4c..cc717cdc1ae45 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts @@ -13,6 +13,7 @@ declare class C { declare class C { [e](): number; } + /// [Errors] //// parserComputedPropertyName32.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts index 32977adb0dd1c..f4a60f5eb5b40 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts @@ -15,6 +15,7 @@ class C { declare class C { [e]: invalid; } + /// [Errors] //// parserComputedPropertyName33.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts index bf955124d8253..aae2e7644c51d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts @@ -13,6 +13,7 @@ class C { declare class C { [public]: string; } + /// [Errors] //// parserComputedPropertyName36.ts(2,5): 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/tsc/parserComputedPropertyName37.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts index 21a76dfbe14aa..7b3235ee281cf 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts @@ -11,6 +11,7 @@ var v = { //// [parserComputedPropertyName37.d.ts] declare var v: invalid; + /// [Errors] //// parserComputedPropertyName37.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts index f8a4b26aef4b5..4af3c097df185 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts @@ -9,6 +9,7 @@ var v = { [e]: 1, [e + e]: 2 }; //// [parserComputedPropertyName6.d.ts] declare var v: invalid; + /// [Errors] //// parserComputedPropertyName6.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts index da72a3d2a2c60..bce04c64b1f39 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts @@ -13,6 +13,7 @@ class C { declare class C { [e]: Type; } + /// [Errors] //// parserComputedPropertyName9.ts(2,4): 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/tsc/parserES5ComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts index 8b610b1a37778..3dcbb3215890c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts @@ -13,6 +13,7 @@ declare class C { declare class C { [e]: number; } + /// [Errors] //// parserES5ComputedPropertyName1.ts(2,5): 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/tsc/parserES5ComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts index b4a61a89dd133..2021982f96afa 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts @@ -13,6 +13,7 @@ class C { declare class C { [e]: number; } + /// [Errors] //// parserES5ComputedPropertyName10.ts(2,4): 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/tsc/parserES5ComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts index 81eb404561e19..d6ed17c275e4c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts @@ -9,6 +9,7 @@ var v = { [e]: 1 }; //// [parserES5ComputedPropertyName2.d.ts] declare var v: invalid; + /// [Errors] //// parserES5ComputedPropertyName2.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName5.d.ts index 223a518220655..58bc644c433d6 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName5.d.ts @@ -12,6 +12,7 @@ interface I { //// [parserES5ComputedPropertyName5.d.ts] interface I { } + /// [Errors] //// parserES5ComputedPropertyName5.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName8.d.ts index 9dd6d0de69f94..a9fd50bb1b5cd 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName8.d.ts @@ -9,6 +9,7 @@ var v: { [e]: number }; //// [parserES5ComputedPropertyName8.d.ts] declare var v: {}; + /// [Errors] //// parserES5ComputedPropertyName8.ts(1,10): 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/original/tsc/parserES5ComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts index f84ff2aa6212c..43f7feab6ce0d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts @@ -13,6 +13,7 @@ class C { declare class C { [e]: Type; } + /// [Errors] //// parserES5ComputedPropertyName9.ts(2,4): 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/tsc/parserES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty1.d.ts index 4a8e6d3a42827..cc205d900fd85 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty1.d.ts @@ -12,6 +12,7 @@ interface I { //// [parserES5SymbolProperty1.d.ts] interface I { } + /// [Errors] //// parserES5SymbolProperty1.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty2.d.ts index 8c346d6820f04..2fcdaaad96fc7 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty2.d.ts @@ -12,6 +12,7 @@ interface I { //// [parserES5SymbolProperty2.d.ts] interface I { } + /// [Errors] //// parserES5SymbolProperty2.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts index 6a9cb9129a55c..6cbb47f63df31 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts @@ -13,6 +13,7 @@ declare class C { declare class C { [Symbol.unscopables](): string; } + /// [Errors] //// parserES5SymbolProperty3.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts index 77de691153ad9..999eb03262bca 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts @@ -13,6 +13,7 @@ declare class C { declare class C { [Symbol.isRegExp]: string; } + /// [Errors] //// parserES5SymbolProperty4.ts(2,5): 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/tsc/parserES5SymbolProperty5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts index e97f78b17864f..3405fa376a222 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts @@ -13,6 +13,7 @@ class C { declare class C { [Symbol.isRegExp]: string; } + /// [Errors] //// parserES5SymbolProperty5.ts(2,5): 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/tsc/parserES5SymbolProperty6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts index a74581c2d89ca..c32c53f400432 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts @@ -13,6 +13,7 @@ class C { declare class C { [Symbol.toStringTag]: string; } + /// [Errors] //// parserES5SymbolProperty6.ts(2,5): 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/tsc/parserES5SymbolProperty7.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts index c13c517ab39be..f7a44aa7a24da 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts @@ -13,6 +13,7 @@ class C { declare class C { [Symbol.toStringTag](): void; } + /// [Errors] //// parserES5SymbolProperty7.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts index 3b3aac6192871..516618b30e4a8 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts @@ -11,6 +11,7 @@ var x: { //// [parserES5SymbolProperty8.d.ts] declare var x: {}; + /// [Errors] //// parserES5SymbolProperty8.ts(2,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/original/tsc/parserES5SymbolProperty9.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty9.d.ts index 43a77c5e6ce8a..548bf2597544b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty9.d.ts @@ -11,6 +11,7 @@ var x: { //// [parserES5SymbolProperty9.d.ts] declare var x: {}; + /// [Errors] //// parserES5SymbolProperty9.ts(2,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/original/tsc/parserIndexSignature11.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature11.d.ts index 318dcb1ee3152..9bac2defb1b3b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature11.d.ts @@ -16,6 +16,7 @@ interface I { [p1: string]: any; [p2: string, p3: number]: any; } + /// [Errors] //// parserIndexSignature11.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature5.d.ts index 9abedb935aad4..e4e31a3cee77b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature5.d.ts @@ -12,6 +12,7 @@ interface I { //// [parserIndexSignature5.d.ts] interface I { } + /// [Errors] //// parserIndexSignature5.ts(2,3): 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. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserStrictMode8.d.ts index 3710a7c6524d6..d3db0a9c92416 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserStrictMode8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserStrictMode8.d.ts @@ -10,6 +10,7 @@ function eval() { //// [parserStrictMode8.d.ts] + /// [Errors] //// parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserSymbolIndexer5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserSymbolIndexer5.d.ts index 9f8516e49a4fd..13f57ce590180 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserSymbolIndexer5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserSymbolIndexer5.d.ts @@ -11,6 +11,7 @@ var x = { //// [parserSymbolIndexer5.d.ts] declare var x: invalid; + /// [Errors] //// parserSymbolIndexer5.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/privateIndexer2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/privateIndexer2.d.ts index 3e4552fb819ab..93561f1ab198c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/privateIndexer2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/privateIndexer2.d.ts @@ -20,6 +20,7 @@ declare var x: invalid; declare var y: { private []: string; }; + /// [Errors] //// privateIndexer2.ts(4,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/propertyAssignment.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/propertyAssignment.d.ts index 788fdb89d2f3f..888039f7736fb 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/propertyAssignment.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/propertyAssignment.d.ts @@ -37,6 +37,7 @@ declare var foo3: { declare var bar3: { x: number; }; + /// [Errors] //// propertyAssignment.ts(4,13): 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/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts index d3906bad59603..d542b56acd3b6 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts @@ -403,6 +403,7 @@ export declare class ExportedStaticArgumentsFn { [FunctionPropertyNames.arguments](): invalid; } export {}; + /// [Errors] //// staticPropertyNameConflicts.ts(11,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts index e708ea50a9257..7ed02b43ffe05 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts @@ -403,6 +403,7 @@ export declare class ExportedStaticArgumentsFn { [FunctionPropertyNames.arguments](): invalid; } export {}; + /// [Errors] //// staticPropertyNameConflicts.ts(53,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolDeclarationEmit12.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolDeclarationEmit12.d.ts index 1a0f6cb05d5c7..4cecb3179e7f1 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolDeclarationEmit12.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolDeclarationEmit12.d.ts @@ -30,6 +30,7 @@ declare namespace M { } export {}; } + /// [Errors] //// symbolDeclarationEmit12.ts(9,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts index 3cd221ebf65e4..fd8e6b4c2df90 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts @@ -17,6 +17,7 @@ var x = { //// [symbolProperty1.d.ts] declare var s: symbol; declare var x: invalid; + /// [Errors] //// symbolProperty1.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts index 3d6a4e0eceb49..aaadfbfe72d81 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts @@ -17,6 +17,7 @@ var x = { //// [symbolProperty2.d.ts] declare var s: invalid; declare var x: invalid; + /// [Errors] //// symbolProperty2.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts index cc4e1fc9dd6d3..4c59aefbd6a4d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts @@ -17,6 +17,7 @@ var x = { //// [symbolProperty3.d.ts] declare var s: invalid; declare var x: invalid; + /// [Errors] //// symbolProperty3.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts index fd1b03d80cf1d..8007a6863297d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts @@ -15,6 +15,7 @@ obj[Symbol.nonsense]; //// [symbolProperty52.d.ts] declare var obj: invalid; + /// [Errors] //// symbolProperty52.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts index 0608e99da36d2..a1570d96938d2 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts @@ -13,6 +13,7 @@ obj[Symbol.for]; //// [symbolProperty53.d.ts] declare var obj: invalid; + /// [Errors] //// symbolProperty53.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts index be5e3dfea154e..3f13c10638280 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts @@ -11,6 +11,7 @@ var obj = { //// [symbolProperty54.d.ts] declare var obj: invalid; + /// [Errors] //// symbolProperty54.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts index 1b7f3d5953d68..43b8e49bc7b7f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts @@ -18,6 +18,7 @@ interface SymbolConstructor { foo: string; } declare var obj: invalid; + /// [Errors] //// symbolProperty58.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty59.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty59.d.ts index 7682f0d293631..4ccec59cc3e39 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty59.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty59.d.ts @@ -12,6 +12,7 @@ interface I { //// [symbolProperty59.d.ts] interface I { } + /// [Errors] //// symbolProperty59.ts(2,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. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralTypes4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralTypes4.d.ts index 67680e6b8a7ba..24d3ae0808a4d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralTypes4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralTypes4.d.ts @@ -466,6 +466,7 @@ declare function f1(s: `**${T}**`): T; declare function f2(s: `**${T}**`): T; declare function f3(s: `**${T}**`): T; declare function f4(s: `**${T}**`): T; + /// [Errors] //// templateLiteralTypes4.ts(43,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment36.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment36.d.ts index 08a40aaea6523..83014f3117d86 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment36.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment36.d.ts @@ -84,6 +84,7 @@ declare function f(b: boolean): invalid; declare var test: invalid; declare function d(): invalid; declare const g: invalid; + /// [Errors] //// typeFromPropertyAssignment36.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives11.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives11.d.ts index 9e4763f69a7ab..7e8dde130b1b3 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives11.d.ts @@ -20,6 +20,7 @@ export declare function foo(): Lib; //// [/mod2.d.ts] export declare const bar: invalid; + /// [Errors] //// /mod1.ts(1,24): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives2.d.ts index c51d9da68f690..fdad9b16876e9 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives2.d.ts @@ -16,6 +16,7 @@ interface $ { x } interface A { x: $; } + /// [Errors] //// /app.ts(2,8): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts index f938296e49a50..8c22009f6cafd 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts @@ -19,6 +19,7 @@ export declare function foo(): Lib; //// [/mod2.d.ts] export declare const bar: invalid; + /// [Errors] //// /mod1.ts(1,24): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts index 480b3d660142b..0df2f72b95d23 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts @@ -47,6 +47,7 @@ type K4 = number | string; type T4 = { k4: string; }; + /// [Errors] //// typeUsedAsTypeLiteralIndex.ts(3,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/original/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts index e717974c11829..f10315cd501ad 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts @@ -33,6 +33,7 @@ export declare enum Foo { b = 2, c = 3 } + /// [Errors] //// bar.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. From 4a4312facb288d29da06d4cee0cce8bf40ca50fb Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 13 Nov 2023 10:39:58 +0000 Subject: [PATCH 128/224] Disable forceDtsEmit for fixed tests. Signed-off-by: Titian Cernicova-Dragomir --- .../declarations/transform-project.ts | 17 ++- src/harness/harnessIO.ts | 103 +++++++++++++++--- src/testRunner/compilerRunner.ts | 79 +++++++++++--- .../diff/declarationFiles.d.ts.diff | 61 +++++++---- ...ecifierResolution(module=node16).d.ts.diff | 9 +- ...ifierResolution(module=nodenext).d.ts.diff | 9 +- ...esExportsSourceTs(module=node16).d.ts.diff | 10 +- ...ExportsSourceTs(module=nodenext).d.ts.diff | 10 +- .../auto-fixed/tsc/declarationFiles.d.ts | 43 -------- ...cksSpecifierResolution(module=node16).d.ts | 4 - ...sSpecifierResolution(module=nodenext).d.ts | 4 - ...ModulesExportsSourceTs(module=node16).d.ts | 3 - ...dulesExportsSourceTs(module=nodenext).d.ts | 3 - 13 files changed, 222 insertions(+), 133 deletions(-) diff --git a/src/compiler/transformers/declarations/transform-project.ts b/src/compiler/transformers/declarations/transform-project.ts index d0685852356b8..fe6834f0097cc 100644 --- a/src/compiler/transformers/declarations/transform-project.ts +++ b/src/compiler/transformers/declarations/transform-project.ts @@ -23,7 +23,6 @@ import { getRootLength, getSourceFilePathInNewDir, IsolatedEmitHost, - NewLineKind, noop, normalizePath, normalizeSlashes, @@ -80,10 +79,16 @@ export function transpileDeclaration(sourceFile: SourceFile, emitHost: IsolatedE const result = transformer(sourceFile); const printer = createPrinter({ - onlyPrintJsDocStyle: true, - newLine: options.newLine ?? NewLineKind.CarriageReturnLineFeed, - target: options.target, removeComments: options.removeComments, + newLine: options.newLine, + noEmitHelpers: true, + module: options.module, + target: options.target, + sourceMap: options.declarationMap, + inlineSourceMap: options.inlineSourceMap, + extendedDiagnostics: options.extendedDiagnostics, + onlyPrintJsDocStyle: true, + omitBraceSourceMapPositions: true, } as PrinterOptions); const writer = createTextWriter(getNewLineCharacter(options)); @@ -92,6 +97,7 @@ export function transpileDeclaration(sourceFile: SourceFile, emitHost: IsolatedE if (sourceMap) { if (!writer.isAtStartOfLine()) writer.writeLine(); writer.writeComment(sourceMap.sourceMappingURL); + writer.writeLine(); } const declarationPath = getDeclarationEmitOutputFilePathWorker( @@ -101,13 +107,12 @@ export function transpileDeclaration(sourceFile: SourceFile, emitHost: IsolatedE emitHost.getCommonSourceDirectory(), emitHost.getCanonicalFileName, ); - const declarationMapPath = declarationPath + ".map"; return { declaration: writer.getText(), declarationPath, declarationMap: sourceMap?.sourceMapGenerator.toString(), - declarationMapPath, + declarationMapPath: sourceMap && declarationPath + ".map", diagnostics, }; diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index 96e1e04e7f27c..75ba41ba7562d 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -649,6 +649,7 @@ export namespace Compiler { 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( @@ -671,13 +672,22 @@ export namespace Compiler { return; } - const { diagnostics: fileDiagnostics = [], declaration, declarationPath } = transpileDeclaration(file, emitterHost); + const { + diagnostics: fileDiagnostics = [], + declaration, + declarationPath, + declarationMap, + declarationMapPath, + } = transpileDeclaration(file, emitterHost); // 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, options.emitBOM ? Utils.addUTF8ByteOrderMark(declarationMap) : declarationMap)); + } diagnostics.push(...fileDiagnostics); }); - return { dts, diagnostics }; + return { dts, dtsMap, diagnostics }; } export function compileDeclarationFiles(context: DeclarationCompilationContext | undefined, symlinks: vfs.FileSet | undefined) { @@ -1020,7 +1030,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); } }); } @@ -1028,12 +1038,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 ""; @@ -1041,6 +1051,28 @@ 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, @@ -1074,25 +1106,66 @@ export namespace Compiler { } } if (errors.length > 0) { - dtsCode += "/// [Errors] ////\r\n\r\n"; + dtsCode += "\r\n/// [Errors] ////\r\n\r\n"; dtsCode += getErrorBaseline(tsSources, errors, prettyErrors); } return dtsCode; } - export function doDeclarationBaseline(baselinePath: string, type: string, header: string, declarationFiles: readonly TestFile[], errors: readonly ts.Diagnostic[], tsSources: readonly TestFile[], prettyErrors?: boolean) { - let tsCode = ""; - tsCode += "//// [" + header + "] ////\r\n\r\n"; + + 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"; for (let i = 0; i < tsSources.length; i++) { - tsCode += "//// [" + tsSources[i].unitName + "]\r\n"; - tsCode += tsSources[i].content + (i < (tsSources.length - 1) ? "\r\n" : ""); + code += "//// [" + tsSources[i].unitName + "]\r\n"; + code += tsSources[i].content + (i < (tsSources.length - 1) ? "\r\n" : ""); } - let dtsCode = "/// [Declarations] ////\r\n\r\n"; - dtsCode += declarationContent(declarationFiles, tsSources, errors, prettyErrors); + 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 += "\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`), tsCode.length > 0 ? tsCode + "\r\n\r\n" + dtsCode : 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) { diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 1a3375d8fe1b5..91add970b62dd 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -462,10 +462,13 @@ class IsolatedDeclarationTest extends CompilerTestBase { protected dteDiagnostics: readonly ts.Diagnostic[]; protected tscNonIsolatedDeclarationsErrors: readonly ts.Diagnostic[]; protected isOutputEquivalent: boolean; - protected dteDtsFile: Compiler.TestFile[]; + 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): CompilerTestEnvironment | undefined { const options = compilerEnvironment.compilerOptions; @@ -515,40 +518,43 @@ class IsolatedDeclarationTest extends CompilerTestBase { 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, - this.result.host, + tscResult.host, this.options, currentDirectory, ); this.dteDiagnostics = ts.sortAndDeduplicateDiagnostics(dteResult.diagnostics); - this.dteDtsFile = [...ts.mapDefinedIterator(dteResult.dts, ([, f]) => ({ - unitName: this.result.host.vfs.realpathSync(f.file), - content: f.text, - }))]; - this.dteDtsFile.sort((a, b) => this.result.host.vfs.stringComparer(a.unitName, b.unitName)); + this.dteDtsFiles = [...ts.mapDefinedIterator(dteResult.dts, ([, f]) => f.asTestFile())]; + this.dteDtsFiles.sort(fileCompare); + this.dteDtsMapFiles = [...ts.mapDefinedIterator(dteResult.dtsMap, ([, f]) => f.asTestFile())]; // With force get JSON definition files we need to ignore - this.tscDtsFiles = [...ts.mapDefinedIterator(this.result.dts, ([name, f]) => - name.endsWith(".d.json.ts") ? undefined : { - unitName: this.result.host.vfs.realpathSync(f.file), - content: f.text, - })]; + 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.tscDtsFiles.sort((a, b) => this.result.host.vfs.stringComparer(a.unitName, b.unitName)); 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.dteDtsFile.length === this.tscDtsFiles.length && this.dteDtsFile + 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]; @@ -575,7 +581,7 @@ class IsolatedDeclarationTest extends CompilerTestBase { this.configuredName, this.baselinePath + "/dte", this.fileName, - this.dteDtsFile, + this.dteDtsFiles, ts.concatenate(this.dteDiagnostics, this.tscNonIsolatedDeclarationsErrors), this.allFiles, this.options.pretty, @@ -593,13 +599,36 @@ class IsolatedDeclarationTest extends CompilerTestBase { this.options.pretty, ); } + verifyDteMapOutput() { + if (this.isOutputMapEquivalent) return; + Compiler.doDeclarationMapBaseline( + this.configuredName, + this.baselinePath + "/dte", + this.fileName, + this.dteDtsFiles, + this.dteDtsMapFiles, + this.allFiles, + ); + } + verifyTscMapOutput() { + if (this.isOutputMapEquivalent) return; + Compiler.doDeclarationMapBaseline( + this.configuredName, + this.baselinePath + "/tsc", + this.fileName, + this.tscDtsFiles, + this.tscDtsMapFiles, + this.allFiles, + ); + } + verifyDiff() { if (this.isOutputEquivalent && this.isDiagnosticEquivalent) return; Compiler.doDeclarationDiffBaseline( this.configuredName, this.baselinePath + "/diff", this.fileName, - this.dteDtsFile, + this.dteDtsFiles, ts.concatenate(this.dteDiagnostics, this.tscNonIsolatedDeclarationsErrors), this.tscDtsFiles, ts.concatenate(this.tscIsolatedDeclarationsErrors, this.tscNonIsolatedDeclarationsErrors), @@ -608,6 +637,21 @@ class IsolatedDeclarationTest extends CompilerTestBase { this.harnessSettings.isolatedDeclarationDiffReason, ); } + + verifySourceMapDiff() { + if (this.isOutputMapEquivalent) return; + Compiler.doDeclarationMapDiffBaseline( + this.configuredName, + this.baselinePath + "/diff", + this.fileName, + this.dteDtsFiles, + this.dteDtsMapFiles, + this.tscDtsFiles, + this.tscDtsMapFiles, + this.allFiles, + this.harnessSettings.isolatedDeclarationDiffReason, + ); + } } class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest { @@ -625,6 +669,9 @@ class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest { return undefined; } + env.compilerOptions.declarationMap = false; + env.compilerOptions.forceDtsEmit = false; + const autoFixCacheTest = ts.combinePaths("tests/auto-fixed", compilerEnvironment.configuredName); const existingTransformedTest = IO.readFile(autoFixCacheTest); const hash = ts.sys.createHash!(env.testCaseContent.sourceCode); diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff index 8a0a6de7155c4..a44639af71b4f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff @@ -5,28 +5,51 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -28,29 +28,31 @@ - declare const x3_a: typeof globalThis; - declare const x1_a: typeof globalThis; - declare class C4 { - x1: { -- a: typeof globalThis; +@@ -1,13 +1,58 @@ + ++ ++//// [declarationFiles.d.ts] ++declare class C1 { ++ x: this; ++ f(x: this): this; ++ constructor(x: this); ++} ++declare class C2 { ++ [x: string]: this; ++} ++interface Foo { ++ x: T; ++ y: this; ++} ++declare class C3 { ++ a: this[]; ++ b: [this, this]; ++ c: this | Date; ++ d: this & Date; ++ e: (((this))); ++ f: (x: this) => this; ++ g: new (x: this) => this; ++ h: Foo; ++ i: Foo this)>; ++ j: (x: any) => x is this; ++} ++declare const x3_a: typeof globalThis; ++declare const x1_a: typeof globalThis; ++declare class C4 { ++ x1: { + a: typeof x1_a; - }; - x2: this[]; - x3: readonly [{ -- readonly a: typeof globalThis; ++ }; ++ x2: this[]; ++ x3: readonly [{ + readonly a: typeof x3_a; - }]; - x4: () => this; -- f1(): any; ++ }]; ++ x4: () => this; + f1(): invalid; - f2(): this[]; -- f3(): any; ++ f2(): this[]; + f3(): invalid; - f4(): () => this; - } - ++ f4(): () => this; ++} ++ /// [Errors] //// declarationFiles.ts(4,20): error TS2526: A 'this' type is available only in a non-static member of a class or interface. @@ -42,7 +65,7 @@ x: this; f(x: this): this { return undefined; } constructor(x: this) { } -@@ -89,16 +91,20 @@ +@@ -46,16 +91,20 @@ x4 = (): this => this; f1() { ~~ 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 index e3006efc5bfa5..04ceb59c1e1ad 100644 --- 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 @@ -5,13 +5,12 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,27 +1,30 @@ +@@ -1,23 +1,30 @@ - - //// [index.d.ts] --export declare const a: any; ++ ++//// [index.d.ts] +export declare const a: invalid; - ++ /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index e3006efc5bfa5..04ceb59c1e1ad 100644 --- 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 @@ -5,13 +5,12 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,27 +1,30 @@ +@@ -1,23 +1,30 @@ - - //// [index.d.ts] --export declare const a: any; ++ ++//// [index.d.ts] +export declare const a: invalid; - ++ /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 4116d2e5ee15d..3c130d82fa347 100644 --- 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 @@ -5,17 +5,17 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,8 +1,8 @@ +@@ -1,6 +1,9 @@ - //// [index.d.ts] --export declare const a: any; ++//// [index.d.ts] +export declare const a: invalid; - ++ //// [/.src/node_modules/inner/index.d.ts] export { x } from "./other.js"; -@@ -15,21 +15,24 @@ + //// [/.src/node_modules/inner/other.d.ts] +@@ -12,21 +15,24 @@ error TS2468: Cannot find global value 'Promise'. index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. 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 index 4116d2e5ee15d..3c130d82fa347 100644 --- 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 @@ -5,17 +5,17 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,8 +1,8 @@ +@@ -1,6 +1,9 @@ - //// [index.d.ts] --export declare const a: any; ++//// [index.d.ts] +export declare const a: invalid; - ++ //// [/.src/node_modules/inner/index.d.ts] export { x } from "./other.js"; -@@ -15,21 +15,24 @@ + //// [/.src/node_modules/inner/other.d.ts] +@@ -12,21 +15,24 @@ error TS2468: Cannot find global value 'Promise'. index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFiles.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFiles.d.ts index c1bbd4869b307..ff4f06ecdf3af 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFiles.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFiles.d.ts @@ -54,49 +54,6 @@ class C4 { /// [Declarations] //// - -//// [declarationFiles.d.ts] -declare class C1 { - x: this; - f(x: this): this; - constructor(x: this); -} -declare class C2 { - [x: string]: this; -} -interface Foo { - x: T; - y: this; -} -declare class C3 { - a: this[]; - b: [this, this]; - c: this | Date; - d: this & Date; - e: (((this))); - f: (x: this) => this; - g: new (x: this) => this; - h: Foo; - i: Foo this)>; - j: (x: any) => x is this; -} -declare const x3_a: typeof globalThis; -declare const x1_a: typeof globalThis; -declare class C4 { - x1: { - a: typeof globalThis; - }; - x2: this[]; - x3: readonly [{ - readonly a: typeof globalThis; - }]; - x4: () => this; - f1(): any; - f2(): this[]; - f3(): any; - f4(): () => this; -} - /// [Errors] //// declarationFiles.ts(4,20): error TS2526: A 'this' type is available only in a non-static member of a class or interface. 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 index 18618071189b2..967ff7329f9cd 100644 --- 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 @@ -29,10 +29,6 @@ export const x: () => Thing; /// [Declarations] //// - -//// [index.d.ts] -export declare const a: any; - /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 18618071189b2..967ff7329f9cd 100644 --- 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 @@ -29,10 +29,6 @@ export const x: () => Thing; /// [Declarations] //// - -//// [index.d.ts] -export declare const a: any; - /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index d0d302b81e814..69df9a568f767 100644 --- 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 @@ -31,9 +31,6 @@ export const x: () => Thing = null as any; -//// [index.d.ts] -export declare const a: any; - //// [/.src/node_modules/inner/index.d.ts] export { x } from "./other.js"; 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 index d0d302b81e814..69df9a568f767 100644 --- 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 @@ -31,9 +31,6 @@ export const x: () => Thing = null as any; -//// [index.d.ts] -export declare const a: any; - //// [/.src/node_modules/inner/index.d.ts] export { x } from "./other.js"; From 5a7784c4dca12bc9fd7f853a7c32d4222643f500 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 13 Nov 2023 14:53:58 +0000 Subject: [PATCH 129/224] Fixed source maps differences. Signed-off-by: Titian Cernicova-Dragomir --- .../declarations/emit-resolver.ts | 47 +++++++++++++++++-- .../declarations/transform-project.ts | 28 +++++------ src/testRunner/compilerRunner.ts | 20 +++++--- .../diff/declarationFiles.d.ts.diff | 5 +- .../diff/enumClassification.d.ts.diff | 5 +- ...hTemplateLiteralsEmitDeclaration.d.ts.diff | 5 +- .../diff/exportDefaultNamespace.d.ts.diff | 5 +- ...rtsSpecifierGenerationConditions.d.ts.diff | 5 +- ...ecifierResolution(module=node16).d.ts.diff | 3 +- ...ifierResolution(module=nodenext).d.ts.diff | 3 +- ...esExportsSourceTs(module=node16).d.ts.diff | 13 +++-- ...ExportsSourceTs(module=nodenext).d.ts.diff | 13 +++-- ...erationConditions(module=node16).d.ts.diff | 5 +- ...ationConditions(module=nodenext).d.ts.diff | 5 +- ...nerationDirectory(module=node16).d.ts.diff | 5 +- ...rationDirectory(module=nodenext).d.ts.diff | 5 +- ...GenerationPattern(module=node16).d.ts.diff | 5 +- ...nerationPattern(module=nodenext).d.ts.diff | 5 +- .../diff/nullPropertyName.d.ts.diff | 5 +- .../diff/symbolDeclarationEmit12.d.ts.diff | 7 +-- .../diff/templateLiteralTypes4.d.ts.diff | 9 ++-- .../typeFromPropertyAssignment29.d.ts.diff | 15 +++--- ...ersionsDeclarationEmit.multiFile.d.ts.diff | 5 +- ...mit.multiFileBackReferenceToSelf.d.ts.diff | 5 +- ...multiFileBackReferenceToUnmapped.d.ts.diff | 5 +- .../auto-fixed/dte/declarationFiles.d.ts | 1 + .../auto-fixed/dte/enumClassification.d.ts | 1 + ...erWithTemplateLiteralsEmitDeclaration.d.ts | 1 + .../dte/exportDefaultNamespace.d.ts | 1 + ...sExportsSpecifierGenerationConditions.d.ts | 1 + ...cksSpecifierResolution(module=node16).d.ts | 1 + ...sSpecifierResolution(module=nodenext).d.ts | 1 + ...ModulesExportsSourceTs(module=node16).d.ts | 3 ++ ...dulesExportsSourceTs(module=nodenext).d.ts | 3 ++ ...erGenerationConditions(module=node16).d.ts | 1 + ...GenerationConditions(module=nodenext).d.ts | 1 + ...ierGenerationDirectory(module=node16).d.ts | 1 + ...rGenerationDirectory(module=nodenext).d.ts | 1 + ...ifierGenerationPattern(module=node16).d.ts | 1 + ...ierGenerationPattern(module=nodenext).d.ts | 1 + .../auto-fixed/dte/nullPropertyName.d.ts | 1 + .../dte/symbolDeclarationEmit12.d.ts | 1 + .../auto-fixed/dte/templateLiteralTypes4.d.ts | 1 + .../dte/typeFromPropertyAssignment29.d.ts | 1 + ...ypesVersionsDeclarationEmit.multiFile.d.ts | 1 + ...tionEmit.multiFileBackReferenceToSelf.d.ts | 1 + ...Emit.multiFileBackReferenceToUnmapped.d.ts | 1 + .../auto-fixed/tsc/enumClassification.d.ts | 1 + ...erWithTemplateLiteralsEmitDeclaration.d.ts | 1 + .../tsc/exportDefaultNamespace.d.ts | 1 + ...sExportsSpecifierGenerationConditions.d.ts | 1 + ...ModulesExportsSourceTs(module=node16).d.ts | 4 +- ...dulesExportsSourceTs(module=nodenext).d.ts | 4 +- ...erGenerationConditions(module=node16).d.ts | 2 +- ...GenerationConditions(module=nodenext).d.ts | 2 +- ...ierGenerationDirectory(module=node16).d.ts | 2 +- ...rGenerationDirectory(module=nodenext).d.ts | 2 +- ...ifierGenerationPattern(module=node16).d.ts | 2 +- ...ierGenerationPattern(module=nodenext).d.ts | 2 +- .../auto-fixed/tsc/nullPropertyName.d.ts | 1 + .../tsc/symbolDeclarationEmit12.d.ts | 2 +- .../auto-fixed/tsc/templateLiteralTypes4.d.ts | 2 +- .../tsc/typeFromPropertyAssignment29.d.ts | 2 +- ...ypesVersionsDeclarationEmit.multiFile.d.ts | 1 + ...tionEmit.multiFileBackReferenceToSelf.d.ts | 2 +- ...Emit.multiFileBackReferenceToUnmapped.d.ts | 1 + 66 files changed, 211 insertions(+), 83 deletions(-) diff --git a/src/compiler/transformers/declarations/emit-resolver.ts b/src/compiler/transformers/declarations/emit-resolver.ts index 54b21a154aace..8fd370c608cc4 100644 --- a/src/compiler/transformers/declarations/emit-resolver.ts +++ b/src/compiler/transformers/declarations/emit-resolver.ts @@ -174,6 +174,47 @@ export function createEmitDeclarationResolver(file: SourceFile, host: IsolatedEm } return false; } + function clonePrimitiveLiteralValue(node: Expression): Expression { + if (isNumericLiteral(node)) { + return factory.createNumericLiteral(node.text, node.numericLiteralFlags); + } + if (isBigIntLiteral(node)) { + return factory.createBigIntLiteral(node.text); + } + if (isStringLiteralLike(node)) { + return factory.createStringLiteral(node.text); + } + + if (node.kind === SyntaxKind.FalseKeyword) { + return factory.createFalse(); + } + + if (node.kind === SyntaxKind.TrueKeyword) { + return factory.createTrue(); + } + + if (isPrefixUnaryExpression(node)) { + return factory.createPrefixUnaryExpression( + node.operator, + clonePrimitiveLiteralValue(node.operand), + ); + } + if (isTemplateExpression(node)) { + return factory.createTemplateExpression( + factory.createTemplateHead(node.head.text, node.head.rawText, node.head.templateFlags), + node.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), + ) + ), + ); + } + 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; @@ -365,11 +406,7 @@ export function createEmitDeclarationResolver(file: SourceFile, host: IsolatedEm }, createLiteralConstValue(node) { if (hasProperty(node, "initializer") && node.initializer) { - const initializer = node.initializer; - if (isStringLiteralLike(initializer)) { - return factory.createStringLiteral(initializer.text); - } - return node.initializer; + return clonePrimitiveLiteralValue(node.initializer); } Debug.fail(); }, diff --git a/src/compiler/transformers/declarations/transform-project.ts b/src/compiler/transformers/declarations/transform-project.ts index fe6834f0097cc..488406039e8b4 100644 --- a/src/compiler/transformers/declarations/transform-project.ts +++ b/src/compiler/transformers/declarations/transform-project.ts @@ -18,7 +18,6 @@ import { getDeclarationEmitOutputFilePathWorker, getDirectoryPath, getNewLineCharacter, - getOutputPathsFor, getRelativePathToDirectoryOrUrl, getRootLength, getSourceFilePathInNewDir, @@ -92,14 +91,6 @@ export function transpileDeclaration(sourceFile: SourceFile, emitHost: IsolatedE } as PrinterOptions); const writer = createTextWriter(getNewLineCharacter(options)); - const sourceMap = getSourceMapGenerator(); - printer.writeFile(result, writer, sourceMap?.sourceMapGenerator); - if (sourceMap) { - if (!writer.isAtStartOfLine()) writer.writeLine(); - writer.writeComment(sourceMap.sourceMappingURL); - writer.writeLine(); - } - const declarationPath = getDeclarationEmitOutputFilePathWorker( sourceFile.fileName, options, @@ -107,12 +98,20 @@ export function transpileDeclaration(sourceFile: SourceFile, emitHost: IsolatedE 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); + writer.writeLine(); + } return { declaration: writer.getText(), declarationPath, declarationMap: sourceMap?.sourceMapGenerator.toString(), - declarationMapPath: sourceMap && declarationPath + ".map", + declarationMapPath: sourceMap && declarationMapPath, diagnostics, }; @@ -136,7 +135,7 @@ export function transpileDeclaration(sourceFile: SourceFile, emitHost: IsolatedE } // logic replicated from emitter.ts - function getSourceMapGenerator() { + function getSourceMapGenerator(declarationFilePath: string, declarationMapPath: string) { if (!getAreDeclarationMapsEnabled(options)) return; const mapOptions = { @@ -147,19 +146,18 @@ export function transpileDeclaration(sourceFile: SourceFile, emitHost: IsolatedE }; const sourceRoot = normalizeSlashes(options.sourceRoot || ""); - const { declarationMapPath, declarationFilePath } = getOutputPathsFor(sourceFile, emitHost as unknown as EmitHost, /*forceDtsPaths*/ false); const sourceMapGenerator = createSourceMapGenerator( emitHost, - getBaseFileName(normalizeSlashes(declarationFilePath!)), + getBaseFileName(normalizeSlashes(declarationFilePath)), sourceRoot ? ensureTrailingDirectorySeparator(sourceRoot) : sourceRoot, - getSourceMapDirectory(options, sourceFile.fileName, sourceFile), + getSourceMapDirectory(options, declarationFilePath, sourceFile), mapOptions, ); const sourceMappingURL = getSourceMappingURL( mapOptions, sourceMapGenerator, - declarationFilePath!, + declarationFilePath, declarationMapPath, sourceFile, ); diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 91add970b62dd..354d479dee53b 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -142,6 +142,9 @@ export class CompilerBaselineRunner extends RunnerBase { it(`Correct dte emit for ${fileName}`, () => fixedIsolatedTest?.verifyDteOutput()); it(`Correct tsc emit for ${fileName}`, () => fixedIsolatedTest?.verifyTscOutput()); it(`Correct dte/tsc diff ${fileName}`, () => fixedIsolatedTest?.verifyDiff()); + it(`Correct dte map emit for ${fileName}`, () => fixedIsolatedTest?.verifyDteMapOutput()); + it(`Correct tsc map emit for ${fileName}`, () => fixedIsolatedTest?.verifyTscMapOutput()); + it(`Correct dte/tsc map diff ${fileName}`, () => fixedIsolatedTest?.verifyMapDiff()); after(() => { fixedIsolatedTest = undefined!; @@ -555,6 +558,7 @@ class IsolatedDeclarationTest extends CompilerTestBase { 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]; @@ -600,7 +604,8 @@ class IsolatedDeclarationTest extends CompilerTestBase { ); } verifyDteMapOutput() { - if (this.isOutputMapEquivalent) return; + // No point to check maps if output is different + if (this.isOutputMapEquivalent || !this.isOutputEquivalent) return; Compiler.doDeclarationMapBaseline( this.configuredName, this.baselinePath + "/dte", @@ -611,7 +616,8 @@ class IsolatedDeclarationTest extends CompilerTestBase { ); } verifyTscMapOutput() { - if (this.isOutputMapEquivalent) return; + // No point to check maps if output is different + if (this.isOutputMapEquivalent || !this.isOutputEquivalent) return; Compiler.doDeclarationMapBaseline( this.configuredName, this.baselinePath + "/tsc", @@ -638,8 +644,9 @@ class IsolatedDeclarationTest extends CompilerTestBase { ); } - verifySourceMapDiff() { - if (this.isOutputMapEquivalent) return; + verifyMapDiff() { + // No point to check maps if output is different + if (this.isOutputMapEquivalent || !this.isOutputEquivalent) return; Compiler.doDeclarationMapDiffBaseline( this.configuredName, this.baselinePath + "/diff", @@ -669,7 +676,8 @@ class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest { return undefined; } - env.compilerOptions.declarationMap = false; + env.compilerOptions.isolatedDeclarations = false; + env.compilerOptions.declarationMap = true; env.compilerOptions.forceDtsEmit = false; const autoFixCacheTest = ts.combinePaths("tests/auto-fixed", compilerEnvironment.configuredName); @@ -712,7 +720,6 @@ class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest { } env.fileSystem.makeReadonly(); env.fileSystem = env.fileSystem.shadow(); - env.compilerOptions.isolatedDeclarations = false; return env; } constructor(compilerEnvironment: CompilerTestEnvironment) { @@ -723,6 +730,7 @@ class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest { this.dteDiagnostics.every(d => d.code === ts.Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode.code) && this.tscIsolatedDeclarationsErrors ) { + this.isOutputMapEquivalent = true; this.isDiagnosticEquivalent = true; this.isOutputEquivalent = true; } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff index a44639af71b4f..87af171000582 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,13 +1,58 @@ +@@ -1,13 +1,59 @@ + +//// [declarationFiles.d.ts] @@ -49,6 +49,7 @@ + f3(): invalid; + f4(): () => this; +} ++//# sourceMappingURL=declarationFiles.d.ts.map + /// [Errors] //// @@ -65,7 +66,7 @@ x: this; f(x: this): this { return undefined; } constructor(x: this) { } -@@ -46,16 +91,20 @@ +@@ -46,16 +92,20 @@ x4 = (): this => this; f1() { ~~ 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 index a948b2e29f83d..8e1a71719352e 100644 --- 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 @@ -5,11 +5,14 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -57,4 +57,101 @@ +@@ -57,5 +57,102 @@ B, C, D } +-//# sourceMappingURL=enumClassification.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=enumClassification.d.ts.map + +/// [Errors] //// + 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 index ea90c93868775..667802729baf3 100644 --- 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 @@ -5,11 +5,14 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -33,4 +33,53 @@ +@@ -33,5 +33,54 @@ a = "1", b = "11", c = "21" } +-//# sourceMappingURL=enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts.map + +/// [Errors] //// + 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 index 2fb39ffca564f..c0784bc9a7fe5 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,8 +1,19 @@ +@@ -1,9 +1,20 @@ //// [exportDefaultNamespace.d.ts] @@ -14,7 +14,10 @@ - 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] //// + 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 index c14d7c5d9ee84..7bcd0e18d5e74 100644 --- 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 @@ -5,12 +5,15 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,4 +1,42 @@ +@@ -1,5 +1,43 @@ //// [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] //// + 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 index 04ceb59c1e1ad..273561fdf74dd 100644 --- 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 @@ -5,11 +5,12 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,23 +1,30 @@ +@@ -1,23 +1,31 @@ + +//// [index.d.ts] +export declare const a: invalid; ++//# sourceMappingURL=index.d.ts.map + /// [Errors] //// 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 index 04ceb59c1e1ad..273561fdf74dd 100644 --- 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 @@ -5,11 +5,12 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,23 +1,30 @@ +@@ -1,23 +1,31 @@ + +//// [index.d.ts] +export declare const a: invalid; ++//# sourceMappingURL=index.d.ts.map + /// [Errors] //// 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 index 3c130d82fa347..cc4c36524a6bc 100644 --- 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 @@ -5,17 +5,24 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,6 +1,9 @@ +@@ -1,32 +1,41 @@ +//// [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,24 @@ + 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. 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 index 3c130d82fa347..cc4c36524a6bc 100644 --- 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 @@ -5,17 +5,24 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,6 +1,9 @@ +@@ -1,32 +1,41 @@ +//// [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,24 @@ + 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. 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 index 81cb55959c3b2..d8438086d78eb 100644 --- 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 @@ -5,13 +5,14 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,24 +1,27 @@ +@@ -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'. 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 index 81cb55959c3b2..d8438086d78eb 100644 --- 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 @@ -5,13 +5,14 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,24 +1,27 @@ +@@ -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'. 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 index 0924524cf289b..8c34cca240485 100644 --- 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 @@ -5,13 +5,14 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,24 +1,27 @@ +@@ -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'. 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 index 0924524cf289b..8c34cca240485 100644 --- 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 @@ -5,13 +5,14 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,24 +1,27 @@ +@@ -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'. 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 index 6c072ef8d726c..ab68852cac5f6 100644 --- 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 @@ -5,13 +5,14 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,24 +1,27 @@ +@@ -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'. 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 index 6c072ef8d726c..ab68852cac5f6 100644 --- 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 @@ -5,13 +5,14 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,24 +1,27 @@ +@@ -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'. 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 index 59d59fd665b91..9f5f0be6120a2 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,85 +1,96 @@ +@@ -1,86 +1,97 @@ //// [nullPropertyName.d.ts] @@ -91,6 +91,9 @@ - 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] //// + 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 index fb32d5310dc35..9329ada2a83a0 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,8 +5,9 @@ +@@ -5,27 +5,32 @@ interface I { } export class C { @@ -15,9 +15,10 @@ get [Symbol.toPrimitive](): I; set [Symbol.toPrimitive](x: I); } -@@ -14,18 +15,21 @@ + export {}; } - + //# sourceMappingURL=symbolDeclarationEmit12.d.ts.map ++ /// [Errors] //// +symbolDeclarationEmit12.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index e0a430305f0d1..0dfed6818da95 100644 --- 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 @@ -18,9 +18,12 @@ 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 @@ +@@ -156,15 +156,18 @@ + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -35,7 +38,7 @@ 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 @@ +@@ -206,8 +209,12 @@ type TNumberLiteralEnum0 = "0" extends `${infer T extends NumberLiteralEnum}` ? T : never; // NumberLiteralEnum.Zero // infer from non-literal enums 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 index 9da241ca41357..587bea0a3438d 100644 --- 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 @@ -46,9 +46,12 @@ export {}; } declare var ExpandoExpr2: (n: number) => string; -@@ -64,8 +51,12 @@ +@@ -62,10 +49,15 @@ + }; + }; declare var n: number; - + //# sourceMappingURL=typeFromPropertyAssignment29.d.ts.map ++ /// [Errors] //// +typeFromPropertyAssignment29.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. @@ -59,7 +62,7 @@ typeFromPropertyAssignment29.ts(78,14): error TS2339: Property 'm' does not exist on type '(n: number) => string'. typeFromPropertyAssignment29.ts(81,30): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. typeFromPropertyAssignment29.ts(81,50): error TS2339: Property 'm' does not exist on type '(n: number) => string'. -@@ -78,10 +69,12 @@ +@@ -78,10 +70,12 @@ typeFromPropertyAssignment29.ts(101,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. @@ -73,7 +76,7 @@ } ExpandoDecl.prop = 2 ExpandoDecl.m = function(n: number) { -@@ -120,8 +113,10 @@ +@@ -120,8 +114,10 @@ } @@ -84,7 +87,7 @@ total: number; } { const nested = function (m: number) { -@@ -132,8 +127,10 @@ +@@ -132,8 +128,10 @@ } ExpandoNested.also = -1; @@ -95,7 +98,7 @@ } ExpandoMerge.p1 = 111 namespace ExpandoMerge { -@@ -145,8 +142,10 @@ +@@ -145,8 +143,10 @@ var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); namespace Ns { 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 index 299b4916100a9..c45e0fe2c8b5c 100644 --- 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 @@ -5,14 +5,17 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,5 +1,49 @@ +@@ -1,6 +1,50 @@ //// [/.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] //// + 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 index 0cd9fadb6b8a0..74afd1b71c460 100644 --- 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 @@ -5,14 +5,15 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,23 +1,26 @@ +@@ -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'. 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 index e928e79d152d0..254ad26d3e4da 100644 --- 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 @@ -5,14 +5,17 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,5 +1,46 @@ +@@ -1,6 +1,47 @@ //// [/.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] //// + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts index aedd3c07406fa..c51e19a453d6d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts @@ -96,6 +96,7 @@ declare class C4 { f3(): invalid; f4(): () => this; } +//# sourceMappingURL=declarationFiles.d.ts.map /// [Errors] //// 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 index 33a23a62c3f77..a3e3678bc2ca7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumClassification.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumClassification.d.ts @@ -143,6 +143,7 @@ declare enum E20 { C, D } +//# sourceMappingURL=enumClassification.d.ts.map /// [Errors] //// 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 index fba09c0089f91..5d8f52b5e1cf0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts @@ -80,6 +80,7 @@ declare enum T7 { b = "11", c = "21" } +//# sourceMappingURL=enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts.map /// [Errors] //// 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 index 0b084e203c1bc..7df31eb65bb0a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportDefaultNamespace.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportDefaultNamespace.d.ts @@ -14,6 +14,7 @@ someFunc.someProp = 'yo'; //// [exportDefaultNamespace.d.ts] export default function someFunc(): string; +//# sourceMappingURL=exportDefaultNamespace.d.ts.map /// [Errors] //// 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 index 3b0038ecd7823..03929c76ff0bf 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts @@ -37,6 +37,7 @@ export interface Thing {} // not exported in export map, inaccessible under new //// [index.d.ts] export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map /// [Errors] //// 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 index b3e9530ded065..404a4d01d329b 100644 --- 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 @@ -32,6 +32,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map /// [Errors] //// 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 index b3e9530ded065..404a4d01d329b 100644 --- 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 @@ -32,6 +32,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map /// [Errors] //// 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 index 843fa95ee9504..282a222c27882 100644 --- 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 @@ -33,14 +33,17 @@ export const x: () => Thing = null as any; //// [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] //// 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 index 843fa95ee9504..282a222c27882 100644 --- 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 @@ -33,14 +33,17 @@ export const x: () => Thing = null as any; //// [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] //// 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 index 92e5f49ba387d..1a91cdff6e298 100644 --- 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 @@ -39,6 +39,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map /// [Errors] //// 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 index 92e5f49ba387d..1a91cdff6e298 100644 --- 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 @@ -39,6 +39,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map /// [Errors] //// 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 index c872a71e6272c..91a9114902939 100644 --- 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 @@ -34,6 +34,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map /// [Errors] //// 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 index c872a71e6272c..91a9114902939 100644 --- 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 @@ -34,6 +34,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map /// [Errors] //// 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 index 66297fbf40405..a211cd95faddd 100644 --- 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 @@ -34,6 +34,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map /// [Errors] //// 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 index 66297fbf40405..a211cd95faddd 100644 --- 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 @@ -34,6 +34,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map /// [Errors] //// 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 index 9436348989c52..de7dd626574b5 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nullPropertyName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nullPropertyName.d.ts @@ -91,6 +91,7 @@ foo.of = 1; //// [nullPropertyName.d.ts] declare function foo(): void; +//# sourceMappingURL=nullPropertyName.d.ts.map /// [Errors] //// 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 index 345c50dc34416..21f7415bf8c0f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit12.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit12.d.ts @@ -31,6 +31,7 @@ declare namespace M { } export {}; } +//# sourceMappingURL=symbolDeclarationEmit12.d.ts.map /// [Errors] //// 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 index b81dc1e259068..5860c44da6799 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes4.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes4.d.ts @@ -466,6 +466,7 @@ 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] //// 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 index 664d17eff2cc8..7ad5ef7dad9f8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts @@ -158,6 +158,7 @@ declare var ExpandoExpr3: { }; }; declare var n: number; +//# sourceMappingURL=typeFromPropertyAssignment29.d.ts.map /// [Errors] //// 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 index ce3bd587a2fb6..1dea3b73a02c8 100644 --- 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 @@ -41,6 +41,7 @@ export function fb(): B; //// [/.src/main.d.ts] export declare const va: invalid; export declare const vb: invalid; +//# sourceMappingURL=main.d.ts.map /// [Errors] //// 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 index e8656a5ffc4f4..77b8109f9bd6c 100644 --- 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 @@ -39,6 +39,7 @@ export * from "../other"; //// [/.src/main.d.ts] export declare const va: any; export declare const vb: invalid; +//# sourceMappingURL=main.d.ts.map /// [Errors] //// 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 index cf6ca8193be9a..a28b9a08608a8 100644 --- 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 @@ -38,6 +38,7 @@ export * from "../other"; //// [/.src/main.d.ts] export declare const va: invalid; export declare const va2: invalid; +//# sourceMappingURL=main.d.ts.map /// [Errors] //// 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 index 80dba0b117c3b..8bc9c25572dc0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumClassification.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumClassification.d.ts @@ -143,3 +143,4 @@ declare enum E20 { 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 index d0ff533c66409..4074bd930025d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts @@ -80,3 +80,4 @@ declare enum T7 { 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/exportDefaultNamespace.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportDefaultNamespace.d.ts index 67bf4c41f8474..8e65254083f49 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportDefaultNamespace.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportDefaultNamespace.d.ts @@ -18,3 +18,4 @@ 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/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts index fe7ae296559b8..1006c0aac5c3b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts @@ -37,3 +37,4 @@ export interface Thing {} // not exported in export map, inaccessible under new //// [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/nodeModulesExportsSourceTs(module=node16).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesExportsSourceTs(module=node16).d.ts index 69df9a568f767..273bad68355d1 100644 --- 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 @@ -33,12 +33,12 @@ export const x: () => Thing = null as any; //// [/.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'. 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 index 69df9a568f767..273bad68355d1 100644 --- 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 @@ -33,12 +33,12 @@ export const x: () => Thing = null as any; //// [/.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'. 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 index 47817966e1598..8288d6861a252 100644 --- 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 @@ -39,7 +39,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: import("inner/other").Thing; - +//# sourceMappingURL=index.d.ts.map /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 47817966e1598..8288d6861a252 100644 --- 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 @@ -39,7 +39,7 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: import("inner/other").Thing; - +//# sourceMappingURL=index.d.ts.map /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 9e9ad35186826..ba6bad2f86986 100644 --- 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 @@ -34,7 +34,7 @@ export const x: () => Thing; //// [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'. 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 index 9e9ad35186826..ba6bad2f86986 100644 --- 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 @@ -34,7 +34,7 @@ export const x: () => Thing; //// [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'. 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 index a3978e2cc5028..4aa3f9b74a602 100644 --- 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 @@ -34,7 +34,7 @@ export const x: () => Thing; //// [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'. 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 index a3978e2cc5028..4aa3f9b74a602 100644 --- 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 @@ -34,7 +34,7 @@ export const x: () => Thing; //// [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'. 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 index 2be1a7840bf5d..64f7388d0ac9b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nullPropertyName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nullPropertyName.d.ts @@ -172,3 +172,4 @@ declare namespace foo { 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/symbolDeclarationEmit12.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit12.d.ts index 50292d77735bd..19c4a5c25641d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit12.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit12.d.ts @@ -30,7 +30,7 @@ declare namespace M { } export {}; } - +//# sourceMappingURL=symbolDeclarationEmit12.d.ts.map /// [Errors] //// symbolDeclarationEmit12.ts(9,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. 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 index 513091d44b294..73ff81f28b957 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralTypes4.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralTypes4.d.ts @@ -466,7 +466,7 @@ 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'. 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 index 03b225e20a418..6034f95305856 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts @@ -171,7 +171,7 @@ declare var ExpandoExpr3: { }; }; 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'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts index 34c44ad2b25d5..8493db557b857 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts @@ -41,3 +41,4 @@ export function fb(): B; //// [/.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 index 963cff1d7890a..b96204e8aa7c1 100644 --- 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 @@ -39,7 +39,7 @@ export * from "../other"; //// [/.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'. 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 index 7f3fe426fe10c..5d6d44aac8399 100644 --- 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 @@ -38,3 +38,4 @@ export * from "../other"; //// [/.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 From 9856f976695f2ae8e765ae5ae25876fc0a62ebf7 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 13 Nov 2023 15:18:59 +0000 Subject: [PATCH 130/224] Removed comment Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/transformers/declarations/emit-binder.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/compiler/transformers/declarations/emit-binder.ts b/src/compiler/transformers/declarations/emit-binder.ts index 4feaeabb24206..ea3da2b676a55 100644 --- a/src/compiler/transformers/declarations/emit-binder.ts +++ b/src/compiler/transformers/declarations/emit-binder.ts @@ -157,7 +157,6 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile, host: Isolate setExternalModuleIndicator(file); file.impliedNodeFormat = getImpliedNodeFormatForFile( toPath(file.fileName, host.getCurrentDirectory(), hostGetCanonicalFileName(host)), - // toPath(file.resolvedPath, /*basePath*/ undefined, hostGetCanonicalFileName(host)), /*packageJsonInfoCache*/ undefined, host, options, From e1a230494bd5479f01a1d2eb37920ea6fef47525 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 13 Nov 2023 15:32:21 +0000 Subject: [PATCH 131/224] Removed parallel-build and external-declarations folders. Signed-off-by: Titian Cernicova-Dragomir --- .dprint.jsonc | 3 - external-declarations/.gitignore | 5 - .../docs/example-project-structure.png | Bin 2796 -> 0 bytes .../docs/example-workflow.png | Bin 24106 -> 0 bytes .../docs/local-inferences.md | 1063 --------- external-declarations/fixed-tests.jsonc | 332 --- .../fixer-test/expected/array_literals.ts | 5 - .../fixer-test/expected/basic_types.ts | 15 - .../fixer-test/expected/classes.ts | 6 - .../fixer-test/expected/default_exports.ts | 8 - .../fixer-test/expected/destructuring.ts | 8 - .../expected/expressions_in_objects.ts | 35 - .../expected/function_expressions.ts | 11 - .../fixer-test/expected/function_return.ts | 65 - .../expected/function_signatures_objects.ts | 63 - .../fixer-test/expected/object_literals.ts | 22 - .../fixer-test/expected/symbols.ts | 18 - .../fixer-test/source/array_literals.ts | 5 - .../fixer-test/source/basic_types.ts | 15 - .../fixer-test/source/classes.ts | 5 - .../fixer-test/source/default_exports.ts | 4 - .../fixer-test/source/destructuring.ts | 4 - .../source/expressions_in_objects.ts | 27 - .../fixer-test/source/function_expressions.ts | 11 - .../fixer-test/source/function_return.ts | 59 - .../source/function_signatures_objects.ts | 51 - .../fixer-test/source/object_literals.ts | 19 - .../fixer-test/source/symbols.ts | 14 - external-declarations/original-tests.jsonc | 84 - external-declarations/package.json | 32 - external-declarations/readme.md | 18 - .../src/code-mod/fixer-test.ts | 104 - .../src/code-mod/fixer/code-fixer-applier.ts | 197 -- .../fixer/interactive-fix-selector.ts | 232 -- .../fixer/isolated-declarations-errors.ts | 7 - .../src/code-mod/fixer/snapshots.ts | 125 -- .../src/code-mod/fixer/utils.ts | 23 - .../src/code-mod/fixer/watch.ts | 28 - external-declarations/src/code-mod/index.ts | 26 - .../run-test-updater-parallel.ts | 90 - .../tsc-test-fixer/run-test-updater.ts | 109 - .../tsc-test-fixer/test-case-utils.ts | 37 - .../src/code-mod/tsc-test-fixer/test-fixer.ts | 112 - external-declarations/src/compiler/debug.ts | 28 - .../src/compiler/lang-utils.ts | 826 ------- .../src/compiler/path-utils.ts | 897 -------- .../src/compiler/perf-tracer.ts | 29 - external-declarations/src/compiler/types.ts | 246 --- external-declarations/src/compiler/utils.ts | 109 - external-declarations/src/main.ts | 91 - .../src/test-runner/cli-arg-config.ts | 29 - .../src/test-runner/excluded-ts-tests.ts | 21 - .../src/test-runner/parallel-run.ts | 87 - .../src/test-runner/test-runner-main.ts | 222 -- .../tsc-infrastructure/collections.ts | 326 --- .../tsc-infrastructure/compiler-run.ts | 249 --- .../tsc-infrastructure/compiler.ts | 277 --- .../diagnosticInformationMap.generated.ts | 1893 ----------------- .../tsc-infrastructure/fakesHosts.ts | 415 ---- .../src/test-runner/tsc-infrastructure/io.ts | 172 -- .../test-runner/tsc-infrastructure/options.ts | 1487 ------------- .../tsc-infrastructure/test-document.ts | 77 - .../tsc-infrastructure/test-file-parser.ts | 224 -- .../test-runner/tsc-infrastructure/vary-by.ts | 187 -- .../src/test-runner/tsc-infrastructure/vfs.ts | 1675 --------------- .../test-runner/tsc-infrastructure/vpath.ts | 370 ---- .../src/test-runner/utils.ts | 106 - external-declarations/src/tsconfig.json | 27 - external-declarations/src/utils/cli-parser.ts | 150 -- external-declarations/src/utils/fs-utils.ts | 127 -- .../tests/expected/class-all.d.ts | 8 - .../tests/expected/const-var-init.d.ts | 1 - .../tests/expected/const-var.d.ts | 1 - .../tests/expected/enums.d.ts | 5 - .../tests/expected/export-default.d.ts | 2 - .../tests/expected/functions.d.ts | 9 - .../tests/expected/global.d.ts | 10 - .../tests/expected/imports.d.ts | 7 - .../tests/expected/interface.d.ts | 6 - .../tests/expected/let-var.d.ts | 1 - .../expected/private-members-typeof.d.ts | 3 - .../tests/expected/transitive.d.ts | 5 - .../tests/expected/type-aliases.d.ts | 8 - external-declarations/tests/source/.gitignore | 2 - .../source/binder/conditionalTypeAliasing.ts | 36 - .../source/binder/default-class-symbol.ts | 5 - .../source/binder/default-function-symbol.ts | 5 - .../source/binder/enum-members-aliasing.ts | 5 - .../source/binder/local-and-export-symbols.ts | 5 - .../tests/source/binder/parameterAliasing.ts | 4 - .../binder/re-exported-import-visibility.ts | 8 - .../tests/source/class-all.ts | 19 - .../tests/source/const-var-init.ts | 1 - .../tests/source/const-var.ts | 1 - external-declarations/tests/source/enums.ts | 5 - .../tests/source/export-default.ts | 2 - .../tests/source/functions.ts | 31 - external-declarations/tests/source/global.ts | 15 - external-declarations/tests/source/imports.ts | 12 - .../tests/source/interface.ts | 6 - external-declarations/tests/source/let-var.ts | 1 - .../not-supported-sugegstions.ts | 24 - .../local-inference/array-literal-const.ts | 19 - .../local-inference/array-literal-mutable.ts | 70 - .../tests/source/local-inference/class.ts | 10 - .../source/local-inference/default-export.ts | 21 - .../expando-functions-declarations.ts | 10 - .../expando-functions-expressions.ts | 21 - .../expressions-with-assertions.ts | 17 - .../local-inference/function-expression.ts | 24 - .../generic-nested-function.ts | 14 - .../local-inference/literals-as-const.ts | 25 - .../source/local-inference/literals-const.ts | 23 - .../tests/source/local-inference/literals.ts | 24 - .../mark-const-contaner-as-used.ts | 15 - .../tests/source/local-inference/new-type.ts | 23 - .../local-inference/object-generic-methods.ts | 48 - .../source/local-inference/object-literal.ts | 84 - .../return-types-function-declarations.ts | 133 -- .../return-types-function-expressions.ts | 122 -- .../local-inference/return-types-methods.ts | 55 - .../return-types-object-methods.ts | 37 - .../tests/source/local-inference/scratch.ts | 22 - .../tests/source/local-inference/ternary.ts | 52 - .../tests/source/local-inference/typeof.ts | 62 - .../source/local-inference/union-collapse.ts | 53 - .../tests/source/private-members-typeof.ts | 4 - .../tests/source/transitive.ts | 4 - .../tests/source/tsconfig.json | 6 - .../tests/source/type-aliases.ts | 13 - .../tests/source/unicode-chars.ts | 3 - parallel-build/.gitignore | 12 - parallel-build/README.md | 57 - parallel-build/package.json | 20 - .../src/dep-builder/build-task-files.ts | 243 --- .../dep-builder/dep-builder-package.json.ts | 92 - .../dep-builder/dep-builder-tsconfig.json.ts | 99 - parallel-build/src/main.ts | 233 -- parallel-build/src/protocol.ts | 40 - parallel-build/src/run-all-tasks.ts | 77 - parallel-build/src/single-thread-worker.ts | 42 - parallel-build/src/utils.ts | 18 - .../src/worker-utils/build-declarations.ts | 42 - .../src/worker-utils/build-tsc-b.ts | 26 - .../src/worker-utils/build-tsc-p.ts | 77 - .../src/worker-utils/build-tsc-shard.ts | 168 -- parallel-build/src/worker-utils/cache.ts | 151 -- .../src/worker-utils/clean-project.ts | 37 - parallel-build/src/worker-utils/utils.ts | 26 - parallel-build/src/worker.ts | 77 - parallel-build/tsconfig.json | 12 - 151 files changed, 16260 deletions(-) delete mode 100644 external-declarations/.gitignore delete mode 100644 external-declarations/docs/example-project-structure.png delete mode 100644 external-declarations/docs/example-workflow.png delete mode 100644 external-declarations/docs/local-inferences.md delete mode 100644 external-declarations/fixed-tests.jsonc delete mode 100644 external-declarations/fixer-test/expected/array_literals.ts delete mode 100644 external-declarations/fixer-test/expected/basic_types.ts delete mode 100644 external-declarations/fixer-test/expected/classes.ts delete mode 100644 external-declarations/fixer-test/expected/default_exports.ts delete mode 100644 external-declarations/fixer-test/expected/destructuring.ts delete mode 100644 external-declarations/fixer-test/expected/expressions_in_objects.ts delete mode 100644 external-declarations/fixer-test/expected/function_expressions.ts delete mode 100644 external-declarations/fixer-test/expected/function_return.ts delete mode 100644 external-declarations/fixer-test/expected/function_signatures_objects.ts delete mode 100644 external-declarations/fixer-test/expected/object_literals.ts delete mode 100644 external-declarations/fixer-test/expected/symbols.ts delete mode 100644 external-declarations/fixer-test/source/array_literals.ts delete mode 100644 external-declarations/fixer-test/source/basic_types.ts delete mode 100644 external-declarations/fixer-test/source/classes.ts delete mode 100644 external-declarations/fixer-test/source/default_exports.ts delete mode 100644 external-declarations/fixer-test/source/destructuring.ts delete mode 100644 external-declarations/fixer-test/source/expressions_in_objects.ts delete mode 100644 external-declarations/fixer-test/source/function_expressions.ts delete mode 100644 external-declarations/fixer-test/source/function_return.ts delete mode 100644 external-declarations/fixer-test/source/function_signatures_objects.ts delete mode 100644 external-declarations/fixer-test/source/object_literals.ts delete mode 100644 external-declarations/fixer-test/source/symbols.ts delete mode 100644 external-declarations/original-tests.jsonc delete mode 100644 external-declarations/package.json delete mode 100644 external-declarations/readme.md delete mode 100644 external-declarations/src/code-mod/fixer-test.ts delete mode 100644 external-declarations/src/code-mod/fixer/code-fixer-applier.ts delete mode 100644 external-declarations/src/code-mod/fixer/interactive-fix-selector.ts delete mode 100644 external-declarations/src/code-mod/fixer/isolated-declarations-errors.ts delete mode 100644 external-declarations/src/code-mod/fixer/snapshots.ts delete mode 100644 external-declarations/src/code-mod/fixer/utils.ts delete mode 100644 external-declarations/src/code-mod/fixer/watch.ts delete mode 100644 external-declarations/src/code-mod/index.ts delete mode 100644 external-declarations/src/code-mod/tsc-test-fixer/run-test-updater-parallel.ts delete mode 100644 external-declarations/src/code-mod/tsc-test-fixer/run-test-updater.ts delete mode 100644 external-declarations/src/code-mod/tsc-test-fixer/test-case-utils.ts delete mode 100644 external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts delete mode 100644 external-declarations/src/compiler/debug.ts delete mode 100644 external-declarations/src/compiler/lang-utils.ts delete mode 100644 external-declarations/src/compiler/path-utils.ts delete mode 100644 external-declarations/src/compiler/perf-tracer.ts delete mode 100644 external-declarations/src/compiler/types.ts delete mode 100644 external-declarations/src/compiler/utils.ts delete mode 100644 external-declarations/src/main.ts delete mode 100644 external-declarations/src/test-runner/cli-arg-config.ts delete mode 100644 external-declarations/src/test-runner/excluded-ts-tests.ts delete mode 100644 external-declarations/src/test-runner/parallel-run.ts delete mode 100644 external-declarations/src/test-runner/test-runner-main.ts delete mode 100644 external-declarations/src/test-runner/tsc-infrastructure/collections.ts delete mode 100644 external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts delete mode 100644 external-declarations/src/test-runner/tsc-infrastructure/compiler.ts delete mode 100644 external-declarations/src/test-runner/tsc-infrastructure/diagnosticInformationMap.generated.ts delete mode 100644 external-declarations/src/test-runner/tsc-infrastructure/fakesHosts.ts delete mode 100644 external-declarations/src/test-runner/tsc-infrastructure/io.ts delete mode 100644 external-declarations/src/test-runner/tsc-infrastructure/options.ts delete mode 100644 external-declarations/src/test-runner/tsc-infrastructure/test-document.ts delete mode 100644 external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts delete mode 100644 external-declarations/src/test-runner/tsc-infrastructure/vary-by.ts delete mode 100644 external-declarations/src/test-runner/tsc-infrastructure/vfs.ts delete mode 100644 external-declarations/src/test-runner/tsc-infrastructure/vpath.ts delete mode 100644 external-declarations/src/test-runner/utils.ts delete mode 100644 external-declarations/src/tsconfig.json delete mode 100644 external-declarations/src/utils/cli-parser.ts delete mode 100644 external-declarations/src/utils/fs-utils.ts delete mode 100644 external-declarations/tests/expected/class-all.d.ts delete mode 100644 external-declarations/tests/expected/const-var-init.d.ts delete mode 100644 external-declarations/tests/expected/const-var.d.ts delete mode 100644 external-declarations/tests/expected/enums.d.ts delete mode 100644 external-declarations/tests/expected/export-default.d.ts delete mode 100644 external-declarations/tests/expected/functions.d.ts delete mode 100644 external-declarations/tests/expected/global.d.ts delete mode 100644 external-declarations/tests/expected/imports.d.ts delete mode 100644 external-declarations/tests/expected/interface.d.ts delete mode 100644 external-declarations/tests/expected/let-var.d.ts delete mode 100644 external-declarations/tests/expected/private-members-typeof.d.ts delete mode 100644 external-declarations/tests/expected/transitive.d.ts delete mode 100644 external-declarations/tests/expected/type-aliases.d.ts delete mode 100644 external-declarations/tests/source/.gitignore delete mode 100644 external-declarations/tests/source/binder/conditionalTypeAliasing.ts delete mode 100644 external-declarations/tests/source/binder/default-class-symbol.ts delete mode 100644 external-declarations/tests/source/binder/default-function-symbol.ts delete mode 100644 external-declarations/tests/source/binder/enum-members-aliasing.ts delete mode 100644 external-declarations/tests/source/binder/local-and-export-symbols.ts delete mode 100644 external-declarations/tests/source/binder/parameterAliasing.ts delete mode 100644 external-declarations/tests/source/binder/re-exported-import-visibility.ts delete mode 100644 external-declarations/tests/source/class-all.ts delete mode 100644 external-declarations/tests/source/const-var-init.ts delete mode 100644 external-declarations/tests/source/const-var.ts delete mode 100644 external-declarations/tests/source/enums.ts delete mode 100644 external-declarations/tests/source/export-default.ts delete mode 100644 external-declarations/tests/source/functions.ts delete mode 100644 external-declarations/tests/source/global.ts delete mode 100644 external-declarations/tests/source/imports.ts delete mode 100644 external-declarations/tests/source/interface.ts delete mode 100644 external-declarations/tests/source/let-var.ts delete mode 100644 external-declarations/tests/source/local-inference-not-supported/not-supported-sugegstions.ts delete mode 100644 external-declarations/tests/source/local-inference/array-literal-const.ts delete mode 100644 external-declarations/tests/source/local-inference/array-literal-mutable.ts delete mode 100644 external-declarations/tests/source/local-inference/class.ts delete mode 100644 external-declarations/tests/source/local-inference/default-export.ts delete mode 100644 external-declarations/tests/source/local-inference/expando-functions-declarations.ts delete mode 100644 external-declarations/tests/source/local-inference/expando-functions-expressions.ts delete mode 100644 external-declarations/tests/source/local-inference/expressions-with-assertions.ts delete mode 100644 external-declarations/tests/source/local-inference/function-expression.ts delete mode 100644 external-declarations/tests/source/local-inference/generic-nested-function.ts delete mode 100644 external-declarations/tests/source/local-inference/literals-as-const.ts delete mode 100644 external-declarations/tests/source/local-inference/literals-const.ts delete mode 100644 external-declarations/tests/source/local-inference/literals.ts delete mode 100644 external-declarations/tests/source/local-inference/mark-const-contaner-as-used.ts delete mode 100644 external-declarations/tests/source/local-inference/new-type.ts delete mode 100644 external-declarations/tests/source/local-inference/object-generic-methods.ts delete mode 100644 external-declarations/tests/source/local-inference/object-literal.ts delete mode 100644 external-declarations/tests/source/local-inference/return-types-function-declarations.ts delete mode 100644 external-declarations/tests/source/local-inference/return-types-function-expressions.ts delete mode 100644 external-declarations/tests/source/local-inference/return-types-methods.ts delete mode 100644 external-declarations/tests/source/local-inference/return-types-object-methods.ts delete mode 100644 external-declarations/tests/source/local-inference/scratch.ts delete mode 100644 external-declarations/tests/source/local-inference/ternary.ts delete mode 100644 external-declarations/tests/source/local-inference/typeof.ts delete mode 100644 external-declarations/tests/source/local-inference/union-collapse.ts delete mode 100644 external-declarations/tests/source/private-members-typeof.ts delete mode 100644 external-declarations/tests/source/transitive.ts delete mode 100644 external-declarations/tests/source/tsconfig.json delete mode 100644 external-declarations/tests/source/type-aliases.ts delete mode 100644 external-declarations/tests/source/unicode-chars.ts delete mode 100644 parallel-build/.gitignore delete mode 100644 parallel-build/README.md delete mode 100644 parallel-build/package.json delete mode 100644 parallel-build/src/dep-builder/build-task-files.ts delete mode 100644 parallel-build/src/dep-builder/dep-builder-package.json.ts delete mode 100644 parallel-build/src/dep-builder/dep-builder-tsconfig.json.ts delete mode 100644 parallel-build/src/main.ts delete mode 100644 parallel-build/src/protocol.ts delete mode 100644 parallel-build/src/run-all-tasks.ts delete mode 100644 parallel-build/src/single-thread-worker.ts delete mode 100644 parallel-build/src/utils.ts delete mode 100644 parallel-build/src/worker-utils/build-declarations.ts delete mode 100644 parallel-build/src/worker-utils/build-tsc-b.ts delete mode 100644 parallel-build/src/worker-utils/build-tsc-p.ts delete mode 100644 parallel-build/src/worker-utils/build-tsc-shard.ts delete mode 100644 parallel-build/src/worker-utils/cache.ts delete mode 100644 parallel-build/src/worker-utils/clean-project.ts delete mode 100644 parallel-build/src/worker-utils/utils.ts delete mode 100644 parallel-build/src/worker.ts delete mode 100644 parallel-build/tsconfig.json diff --git a/.dprint.jsonc b/.dprint.jsonc index 54780b924a3f8..af7c6b774c229 100644 --- a/.dprint.jsonc +++ b/.dprint.jsonc @@ -48,9 +48,6 @@ "internal/**", "**/*.generated.*", "scripts/*.d.*", - "external-declarations/tsc-tests/**", - "external-declarations/tests/**", - "external-declarations/fixer-test/**" ], // Note: if adding new languages, make sure settings.template.json is updated too. "plugins": [ diff --git a/external-declarations/.gitignore b/external-declarations/.gitignore deleted file mode 100644 index 9ebf6aba923b5..0000000000000 --- a/external-declarations/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/build -/node_modules -/src/*.tsbuildinfo -/tests/actual -/tsc-tests diff --git a/external-declarations/docs/example-project-structure.png b/external-declarations/docs/example-project-structure.png deleted file mode 100644 index d2b8d0bc1bf7e9754456b2495728c0ff32da7305..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2796 zcmeHJc~p~E7LSUu$>N|`AR!`1P!KDWst^)Cqy~#XMktGQKnMkjEE7P$NQjLBQ3IK& zwM4c=+rp<%mSQ0$5M~VJ!(kgFk^>=t1h521K!n7EWs(uknfY)2nK@_9%pdRFchCL3 zcb9kHefK6l5NBd!Z3KhCOwRcEo`b=*3bpGi20OH~)rU& z*4ypR^lg}I|0u*M+@x~Ns3mvbqn`N! z5`CcO)Ay*@2b%}KLnXTXcJttOD35#p+v+)o!8X;z?YrTo{}{t|7Z8cguJ<%mj67MI zI~Kn6pM*VZ+oOlU;sV`uy^ku<8MO?d((g>F(VcXUk5H8o zOX03mRBG$;9Li-2(Aq}45T72MfH~{Moi#U*9qC`3ra5=3tg-QR1o_XYe2Q8wYO@ns zJAqXQ01+ikdBY_tzwExb=#Ve&p?YFSyJxe~_JhSY*rR>R%*ZwyM3m^&shk(l;yprK zqTcD6h#ah~IEkMxCeOc~t-jpVM2s+!eTl=T^6HC*JOfLn=TeScC$(qPG_WHrsia{J zSR_40S2T)l5HP+M(wY!b@GLLMazXXPR!LAG;VLs(nocmWA3S}Q;gw0uy`>;{6-RgH)wN{4%_DcZ<6v?PUv!bDbt_@z z*FovXk`;hp7(-ESX)obz3?3diqM{kQtuWZ5^C5Uh{Y&Ov$v}s72P=`j{91K&sAGMX zP+Yha0f(ZS%3lTJk@pA%MU1OEA;TAj7qK|JzBDkT%#VObm2iI^?)XBrB90PU-$JLi zY(PmL6piJ@kg(8s&*^XL*rUlceN4ll%!(j@9NY1SzWlXpDd$czYZgGXE5m9lYIZO- zf+v2WL5hjE=2@V%hiMWw_n69MP)W_)@ffWGaWwtvc~{X0SR3}?uQr|j1)J&IpWb=7Ga zuUN=!g!YzXbSzJs@o+D&)W-XrnQZ)3n`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0PAEAhNZLp;E(vy%xUP*$u9gE)hl#?`+r-%0u`qmL%YIBBuBGuJ zR$@#}ppC*TZ>sot#Z~R;4Q!14Zu{v-WB|PHtf;B@R=%4$^~0OXn!~077RHw6q8_f& zSeVHlUGPcrc30nAk4|}P z40`BpF>#E^C(<+;chY~UaIg)}23|RL5Erx9n?&f>hsI5PnBJ^NRn{hpsn+_w8(aV7 zR416;%D+|TOssjQ|0qQds}74UnV$; zfE=LdEil%KX~xIG4BW~T)_owrvg2_m7LRjLhTMo^=N=sTuY~z`>EhW80n*q^u;1Cp9Cw& z6C8;rKuU{k;W}Cl~q92eWOK*_2oaO-|~>_V$*|@)(=# z@6`WHp17Vtqd~cH8((St$x0x|>CPG3NzwD^g$JEvWTx+g`ILv1z^(sv><{2;cU@1B zoH4fVS10w*le!VdbYnzTvr*#wE&K)w{fUGkxRNNtJJlK`7UY3eehmhRagb=Qqdf-v+-mA`$ zbQ6VnuvuQbeg#~9z+t}bds_b9eFIX+(|$SxgIB(fvq)LRWs|oeWxBH(w)}@x7G*p1 zGqu`v^E6r8%p#h6OW{hz;Q{Z4+%NptCKYi$j)=0X^DS%7L!LT5>_PMGqK&oo{_9)+p@U^9~8Ne8Ol zrOl;!8Ha~jKFp$dGl$AnPJ1aVZNpp2%9yj*soembe|!MjQ%U=Ks((FLCMhhrsRSEQ z^kz?Qd*ptQCiU}6bz;#oezHO8A6NlOfx-*_2l3th|AmD@VEJDH%)GbX#fw!Q(P4?1 S5b$^3if not provided***|Complexity of the explicit types in the source code that would be needed if this inference did not exist.
This refers to the burden of a single instance and is ***not*** a measure of how often this inference pattern may occur. (`Low`, `Medium`, `High`)| -|***Emitter complexity***|Complexity of code needed in the emitter to implement this inference (`Low`, `Medium`, `High`)| - -### INF01: Primitive literal (widening and non widening) - -
SourceInferred declaration
- -```ts -let n = 1; -let s = "a"; -let b = true; -const nc = 1; -const sc = "a"; -const bc = true; -``` - - - -```ts -let n: number; -let s: string; -let b: boolean; -const nc: 1; -const sc: "a"; -const bc: true; -``` - -
- -- **Optimistic:** No -- **User complexity if not provided:** Low -- **Emitter complexity:** Low - -### INF02: null (widening and non widening) - -This is useful in the context of other inferences. - -
SourceInferred declaration
- -```ts -const n = null -let nc = null -``` - - - -```ts -const n: null -let nc: any -``` - -
- -- **Optimistic:** No -- **User complexity if not provided:** Low -- **Emitter complexity:** Low - -### INF03: undefined (widening and non widening) - -This is useful in the context of other inferences. - -
SourceInferred declaration
- -```ts -const u = undefined -let uc = undefined -``` - - - -```ts -const u: undefined -let uc: any -``` - -
- -- **Optimistic:** No -- **User complexity if not provided:** Low -- **Emitter complexity:** Low - -### INF04: Symbols (widening and non widening) - -
SourceInferred declaration
- -```ts -let sym = Symbol(); -const uniqueSym = Symbol(); -``` - - - -```ts -let sym: symbol -const uniqueSym: unique symbol -``` - -
- -- **Optimistic:** No -- **User complexity if not provided:** Low -- **Emitter complexity:** Low - -### INF05: Identifiers and dotted identifiers - -While we can’t resolve the actual type of an identifier or an entity name expression (a.b.c) we can use the typeof operator in declarations and let TypeScript resolve the actual type. -There are [cases where this optimistic inference fails](#identifiers-and-dotted-identifiers-inf05), when the type of a variable is widened. - -
SourceInferred declaration
- -```ts -const e = E.A; -export const foo = imported.foo; -let VALUE = NORTH; -``` - - - -```ts -const e: typeof E.A; -export const foo: typeof imported.foo; -let VALUE: typeof NORTH; -``` - -
- -- **Optimistic:** Yes -- **User complexity if not provided:** High -- **Emitter complexity:** Medium - -### INF06: Type assertions - -Since TypeScript uses the asserted type as the type of the expression it is safe to use it as the type of expression in isolated declarations - -
SourceInferred declaration
- -```ts -let x = "1" as "1" | "2" -let p = {} as Point -``` - - - -```ts -let x: "1" | "2" -let p: Point -``` - -
- -- **Optimistic:** No -- **User complexity if not provided:** Low -- **Emitter complexity:** Low - -### INF07: Const assertions on primitives - -
SourceInferred declaration
- -```ts -let x = "1" as const -``` - - - -```ts -let x: "1" -``` - -
- -- **Optimistic:** No -- **User complexity if not provided:** Low -- **Emitter complexity:** Low - -### INF08: Function expressions - -This helps deal with the common pattern of initializing a variable or member with a function expression. - -
SourceInferred declaration
- -```ts -let fn = (a: number): void => { } -let fn2 = function (b: string): string { - return b.toLowerCase() -} -``` - - - -```ts -let fn: (a: number) => void -let fn2: (b: string) => string - - -``` - -
- -- **Optimistic:** No -- **User complexity if not provided:** Medium -- **Emitter complexity:** Low - -### INF09: `new` operator - -As long as the constructor name is a dotted identifier name, we use it as a type. -This can be wrong if the custom constructor returns something else, but it is usually correct. - -Generic type parameters must be explicitly specified. - -
SourceInferred declaration
- -```ts -let x = new Dog() -let p2 = new Promise(...) -``` - - - -```ts -let x: Dog -let p: Promise -``` - -
- -- **Optimistic:** Yes -- **User complexity if not provided:** Low -- **Emitter complexity:** Low - -### INF10: JSX elements ***(TODO: Still under investigation)*** - -We can’t fully emulate the JSX namespace resolution TypeScript does, but we can make a reasonable guess. - -
SourceInferred declaration
- -```tsx -let jsx =
-``` - -
- -```ts -let jsx: React.JSX.Element -``` - -
- -- **Optimistic:** Yes -- **User complexity if not provided:** Medium -- **Emitter complexity:** Low - -### INF11: Object literals in non-const contexts - -We apply all inference rules to property values and create an object type from them. -While this form of local inference is not itself optimistic, if any of the inferred members have optimistic inferences, the object type itself becomes optimistic. - -
SourceInferred declaration
- -```ts -let o = { - prop: 1, - method(p: number): string { - return p.toString() - }, - value -} -``` - - - -```ts -let o: { - prop: number; - method(p: number): string; - - - value: typeof value; -}; -``` - -
- -- **Optimistic:** Maybe -- **User complexity if not provided:** High -- **Emitter complexity:** Medium - -### INF12: Object literals in const contexts - -We apply all inference rules to property values and create an object type from them. -May be optimistic if constituents are optimistic. - -
SourceInferred declaration
- -```ts -let o = { - prop: 1, - method(p: number): string { - return p.toString() - }, - value -} as const -``` - - - -```ts -let o: { - readonly prop: 1; - readonly method: (p: number) => string; - - - readonly value: typeof value; -}; -``` - -
- -- **Optimistic:** Maybe -- **User complexity if not provided:** High -- **Emitter complexity:** Medium - -### INF13: Array Literals in const contexts - -We apply all inference rules to array items and create a tuple type from the items. -May be optimistic if constituents are optimistic. - -
SourceInferred declaration
- -```ts -let values = [value, "A", 1] as const; -``` - - - -```ts -let values: readonly [typeof value, "A", 1]; -``` - -
- -- **Optimistic:** Maybe -- **User complexity if not provided:** High -- **Emitter complexity:** Medium - -### INF14: Array literals in non-const contexts - -We apply all inference rules to array items and create a union from the results. - -This requires union reduction, which we can’t ever fully emulate with just local information. We do a best effort to synthesize the appropriate union. - -
SourceInferred declaration
- -```ts -export let values = [value, "A", 1] - -export let arrNestedObjects = [{ - bar: { - baz: 1 - } -}, { - bar: { - bat: 1 - } -}]; - - -``` - - - -```ts -let values: (string | number | typeof value)[]; - -let arrNestedObjects: ({ - bar: { - baz: number; - bat?: undefined; - }; -} | { - bar: { - baz?: undefined; - bat: number; - }; -})[]; -``` - -
- -- **Optimistic:** Yes -- **User complexity if not provided:** High -- **Emitter complexity:** High - -### INF15: Return Type Inference - -We apply all inference rules to return statements and yield expressions. -We synthesize the appropriate return type based on the if the function is async and is a generator. -This requires union reduction - similar to mutable arrays. -This kind of inference should be done for function declarations, method declarations, function expressions and arrow functions. - -
SourceInferred declaration
- -```ts -async function* asyncGen() { - const input: string = yield 10; - return 123n; -} - -function returnsObjectUnion() { - if (Math.random() > 0) { - return { - foo: "", - bar: 1 - }; - } - return { - foo: "" - }; -} -``` - - - -```ts -function asyncGen(): AsyncGenerator - - - - -function returnsObjectUnion(): { - foo: string; - bar: number; -} | { - foo: string; - bar?: undefined; -}; - - - - -``` - -
- -- **Optimistic:** Yes -- **User complexity if not provided:** High -- **Emitter complexity:** High - -### INF16: Conditional expressions - -We apply all inference rules to the branches of the conditional and union the result. -This requires union reduction - similar to mutable arrays. - -
SourceInferred declaration
- -```ts -let x = Math.random() ? 0 : 1; -``` - - - -```ts -let x: number -``` - -
- -- **Optimistic:** yes -- **User complexity if not provided:** Medium -- **Emitter complexity:** High - -### INF17: `satisfies` expression - -We apply all inference rules to the value operand of satisfies. -Sometimes satisfies changes inference for the operand. -We don’t emulate this behavior, hence this is optimistic. - -
SourceInferred declaration
- -```ts -export const satisfied = { - save: () => {}, - close: () => {}, -} as const satisfies Record void> -``` - - - -```ts -const satisfied: { - readonly save: () => void; - readonly close: () => void; -}; -``` - -
- -- **Optimistic:** Yes -- **User complexity if not provided:** Medium -- **Emitter complexity:** Low - -### INF18: Template literals in non-const contexts - -In non const contexts template literals are inferred as strings - -
SourceInferred declaration
- -```ts -let t2 = `A${1}`; -``` - - - -```ts -let t2: string; -``` - -
- -- **Optimistic:** No -- **User complexity if not provided:** Low -- **Emitter complexity:** Low - -### INF19: Template literals in const contexts - -In non-const context template literal types can be generated, but we don’t exhaustively expand the template to a union. - -
SourceInferred declaration
- -```ts -let t1 = `number=${1 as 1|2}` as const; -let t2 = `mixed=${"1" as "1" | number}` as const; -``` - - - -```ts -let t1: `number=${1 | 2}`; -let t2: `mixed=${"1" | number}`; -``` - -
- -- **Optimistic:** Maybe -- **User complexity if not provided:** Medium -- **Emitter complexity:** Low - -### INF20: Spread elements in objects (in const and non-const contexts) - -We infer the type of the spread, and create an intersection between the inferred spread type and the rest of the object properties. -This does not exactly emulate the property overwriting of spread, but it gives good results in most cases. - -
SourceInferred declaration
- -```ts -const LogLevel = { - ...HappyLogLevel, - ...UnhappyLogLevel, - UNDEFINED: "UNDEFINED", -} as const; - -``` - - - -```ts -const LogLevel: - typeof HappyLogLevel -& typeof UnhappyLogLevel -& { - readonly UNDEFINED: "UNDEFINED"; -}; -``` - -
- -- **Optimistic:** Yes -- **User complexity if not provided:** High -- **Emitter complexity:** Medium - -### INF21: Rest elements within arrays in const contexts - -We infer the type of the rest element and create a tuple spread element for that position in the resulting tuple. -While the spread operation should yield a semantically equivalent type it will not be exactly the same as the TS inferred type. -We should assume the type might be wrong and check it, at least for now. - -
SourceInferred declaration
- -```ts -let tuple = [1, 2, 3] as const -const composedTuple = [0, ...tuple] as const -``` - - - -```ts - -const composedTuple: readonly [0, ...typeof tuple]; -``` - -
- -- **Optimistic:** Yes -- **User complexity if not provided:** High -- **Emitter complexity:** Medium - -### INF22: Rest elements in within arrays in non-const contexts - -We infer the type of the rest element and create a `[number]` index access for the type and add it to the union. -While the index access should yield a semantically equivalent type it will not be exactly the same as the TS inferred type. -We should assume the type might be wrong and check it, at least for now. - -
SourceInferred declaration
- -```ts -const a = [false, ...nrs, ...strs] -``` - - - -```ts -const a: (boolean | (typeof nrs)[number] | (typeof strs)[number])[]; -``` - -
- -- **Optimistic:** Yes -- **User complexity if not provided:** High -- **Emitter complexity:** Medium - -### INF23: Properties on function-typed variables _(“expando function expressions”)_ - -We can infer the types added on to function variables using the same inference we use for other initializers. -This is optimistic if any inferred property types are optimistic. - -
SourceInferred declaration
- -```ts -export const x = () => {} -x.test = 1; - - -``` - - - -```ts -export declare const x: { - (): void; - test: number; -}; -``` - -
- -- **Optimistic:** Maybe -- **User complexity if not provided:** High -- **Emitter complexity:** Medium - ---- - -## Design principles - -The following design principles guided the inferences listed above. - -### P1. Local inference - -All inference should only happen based on the currently analyzed statement. -There is no cross-file analysis (this keeps declaration emit parallelizable) and no in-file analysis beyond the current expression. -While some in-file analysis might help, it would require replicating a lot of TypeScript machinery and so is avoided. - -### P2. Optimistic emit - -Sometimes a DTE may not have enough information to determine if the naturally emitted declaration is correct. -In such cases declaration emit can proceed with a deterministic inference and rely on the user to run the type-checker to detect the error. -Meaning the emitter may complete its output but we have to wait for the type-checker to be sure the declarations are valid. - -Optimistic emit should only happen in cases where we deem that the likelihood is high that the type is correct. Some examples: - -```ts -const dog = new Dog(1); -``` - -Optimistically we can assume that the type of `dog` has the same name as the constructor. -In the common case this is true. -However, we can easily construct a scenario where this is not so. -Either through the use of inferred generics... - -```ts -class Dog { constructor(public v: T) {}} -const dog = new Dog(1) -// we could infer from the following -const dog2 = new Dog(1) -``` - -...or `Dog` might be a custom constructor signature... - -```ts -declare const Dog: new (v: number) => { value: number } -const dog = new Dog(1) -``` - -While both scenarios exist in real code, emitting the constructor name as the type helps the majority of cases. - -#### Consequences of optimistic emit on parallel build tools - -Any monorepo build tools that would use a DTE must be prepared for the eventuality that the TypeScript type-checker might fail and thus any work done based on the emitted declarations would need to be discarded. - -Consider the following project structure: - -![Example project structure for optimistic emit](./example-project-structure.png) - -##### Type-checking for project A fails - -Declaration emit for projects A & B can start and finish quickly by running the DTE in parallel. -Type-checking for projects B & C can optimistically start as soon as declarations are available, even if type-checking for project A has not yet completed. - -If project A fails to type-check correctly, the results for projects B & C should be discarded, even if the type checking for B & C was successful. -Projects B & C may have used invalid declarations, so the results of the type-check are invalid. - -![Example workflow for optimistic emit](./example-workflow.png) - -### P3. Performant declarations - -While some deviations from the classicly-generated declaration emit are inevitable, ideally there should not be a lot of extra work involved for the compiler to resolve the type. -For example, we aim to avoid conditional types. - -## Additional details on specific inferences - -### Identifiers and dotted identifiers (INF05) - -Whilst the DTE cannot resolve the actual type of an identifier or an entity name expression (`a.b.c`), it can use the `typeof` operator in declarations and let TypeScript resolve the actual type. - -There are cases where this optimistic inference fails, when the type of a variable is widened. - -
SucceedsFails
- -```ts -let x = 1; -let y = x; // y: typeof x ✅ - -enum E { A, B, C } -const o = E.A // typeof E.A ✅ -``` - - - -```ts -const x = 1; -let y = x; // y: typeof x ❌ - -enum E { A, B, C } -let o = E.A // typeof E.A ❌ -``` - -
- -#### Motivation for using `typeof` - -There are a lot of scenarios unlocked by allowing the use of `typeof` as the result of an inference. -Some examples: - -* Enums and enum like objects -* Re-exports -* Object/array literals that contain spread expressions - -There are some advantages to using `typeof`: - -* Preserves the original intent of code -* Easier to type constructs mentioned above - -Arguments against using `typeof`: - -* May decrease performance - though we have not seen this in practice - -### Inferences that use union subtype reduction (INF14, INF15, INF16) - -There are several inferences that use subtype reduction: - -* [INF14: Array literals in non-const contexts](#inf14-array-literals-in-non-const-contexts) -* [INF15: Return Type Inference](#inf15-return-type-inference) -* [INF16: Conditional expressions](#inf16-conditional-expressions) - -#### Implementation of subtype reduction - -Any inference that relies on subtype reduction will be optimistic because: - -* The necessary information to reduce subtypes isn't always available locally. -* Even if all the information exists locally, implementing full subtype reduction is a lot of complexity for not a lot of gain. - -The following kinds of reduction are implemented: - -* Primitive literal type to primitive base type reduction - Ex: `1 | number` is reduced to `number`. -* Object union normalization - If we have several object types inferred we normalize all the properties to get a common set of properties. - * Example: `[{ foo: 1 }, { bar: 2 }]` is inferred as `({ foo: number; bar?: undefined; } | { bar: number; foo?: undefined;})[]` -* Duplicate type removal - If the types are identical we only keep one copy. This applies to the following common types that can commonly occur in a locally inferred expression - * Type references - `Point | Point` is reduced to `Point` - * Keyword types - `number | number` is reduced to `number` - * Literal types - `1 | 1` is reduced to `1` - * Array types - `number[] | number[]` is reduced to `number[]` - * Literal types - `{ foo: string } | { foo: string }` is reduced to `{ foo: string }` - * Function types - `(foo: string) => void | (foo: string) => void` is reduced to `(foo: string) => void` - * Constructor types - `new (foo: string) => T | new (foo: string) => T` is reduced to `new (foo: string) => T` - * Type Queries - `typeof p | typeof p` is reduced to `typeof p` - -This could be extended to more complicated types, such as mapped conditional types, but in practice these would appear exceedingly rare in a local inference context. -They would only appear if someone were to explicitly write a conditional or mapped type inline in a type assertion. - -#### Limitations of this approach - -Only primitive and literal types can be reduced to base types. -Consider the following example: - -```ts -type Id = { id: string, foo?: string } - -// TS: let a: Id[] -let a = [ - { id: "" } as Id, - { id:"", foo: "" }, -] -``` - -TypeScript can reduce the type of the array element from `Id | { id: string, foo: string }` to just `Id`. -Local inference does not have the information about `Id` or the implementation complexity to determine that this reduction is possible. - -Possible outcomes: - -1. The local inference reduced type is the same as the TypeScript reduced type (true for a vast majority of cases we encountered in practice) -2. The local inference reduced type is equivalent to the TypeScript one, but written with redundant terms. In the example above `Id | { id: string, foo: string }` and `Id` are equivalent. We have not in practice found this to occur. -3. The locally inferred type is semantically different from TypeScript one. We have not in practice found this to occur. Example: - ```ts - type Id = { id: string } - // TS: let a: Id[] - // LI: let a: (Id | { id: string, foo?: string })[] - let a = [ - { id: "" } as Id, - { id:"", foo: "" } as { id: string, foo?: string }, - ] - ``` - -The implementation errors today on 3 but does not error on 1 or 2. - -While it is possible to contrive examples of 2 and 3, they generally require type assertions to happen, as a way to introduce external type information. -While the chances of this occurring are non-zero, they don’t usually seem to be the way such code is actually written. - -#### Motivation for using this approach - -Unlocking [the three types of inference](#inferences-that-use-union-subtype-reduction-inf14-inf15-inf16) that use the union subtype reduction described above is a big win for developer experience - especially for return types and arrays. -Once you have the machinery for union reduction, conditional expressions come almost for free. -As described above a complete solution is not possible given the constraints of local inference. -Having a solution that works in most cases seems preferable to forcing people to write type annotations. - -Some examples: - -```ts -let m = Math.random() > 0.5? "OPTION 1": "OPTION 2"; - -import * as React from 'react'; - -export function Component() { - const { isLoading } = useQuery(/* */); - if(isLoading) return <> - - return

- We have data! -
-} -``` - -### Rest elements and spread assignments (INF20, INF21, INF22) - -#### Motivation for implementation - -Our findings suggest that composing objects and arrays from other objects and arrays is not uncommon. Supporting local inference for such cases greatly reduces the amount of verbose types developers have to write. -Example: - -```ts -let defaultConfig = { - port: 80 -} -// TS: { host: string; port: number; } -// LI: typeof defaultConfig & { host: string; } -let config = { - ...defaultConfig, - host: "localhost" -} -``` - -## Future: Further possible inferences - -These inferences are not implemented. Further discussion is needed to decide if they should be included. - -### Unimplemented: Support for relational operators - -Relational operators always produce boolean results, so we can always type the results of the operators `<`, `>`, `>=`, `<=`, `!=`, `==`, `!==`, `===` as `boolean`. - -Boolean operator can also be sometimes typed as `boolean` -* `!` always produces a boolean result so it can be typed safely as boolean. -* `&&` produces a boolean if the operands are boolean, so we can type it in this case -* `||` can be typed the same as `&&` - -Examples: - -```ts -let r1 = a > 0 && b < 0 // ✅ Always boolean -let r2 = a < 0 || b < 0 // ✅ Always boolean -let r3 = !!xx && !!yy // ✅ Always boolean -let r4 = x && y // ❌ Can’t be sure result is boolean -``` - -These operators commonly appear in the return statements of functions so it would be useful to infer their types - -### Unimplemented: IIFE support - -If the return type of the IIFE can be determined, we can type the result of the function call. - -
SourceInferred declaration
- -```ts -let service = (function() { - return { - request() { - return 0; - } - }; -})() -``` - - - -```ts -declare let service: { - request(): number; -}; - - - - -``` - -
- -### Unimplemented: Inference from local variables - -We could add support for inference from local variables/parameters within a function given that symbol tables are already required. -This would help reduce the amount of typeof needed to only places where the variable was not defined in the local scope. - -
SourceInferred declaration
- -```ts -function test() { - let p: number = 1; - return () => p; -} -``` - - - -```ts -declare function test(p: number): () => number - - - -``` - -
- -## Open issues - -### ISS01: Validate type equivalence approach - -We would like to test if the local inference type is equivalent to the type TypeScript would infer in that scenario. -We initially used `checkTypeRelatedTo` with `identityRelation`. -This however proved too restrictive as it did not consider object types equivalent to a type that produces the same properties from an intersection type. -We are currently using the `strictSubtypeRelation` and checking the relationship both ways, i.e. that the locally inferred type is a strict subtype of the TS inferred type, and that the TS inferred type is a strict subtype of the locally inferred type. - -We are unsure if this is the best approach for this task. - -We would also like to validate that the way we performed type-checking for the synthetic type does is the best way we could do it. -We took several steps to type-check the synthetic types: - -1. Parent the synthetic type to the node that it will be used on. - 1. For function return types due to the way symbol visibility works, we had to create an extra fake parameter to keep the type in the scope of the function signature -2. Invoke the binder for the synthetic type node. This required some changes to the binder to allow the binding of arbitrary nodes on demand. Without this binding step, it would not be possible to type check object types that contain members for example as the type checker relies on the symbol tables built during binding. -3. Get the types of the synthetic type node and the source and compare them as described above. - -### ISS02: Investigate JSX namespace resolution - -Currently we just use `React.JSX.Element` as the type of any JSX element. -While we probably can’t emulate the whole TS algorithm for resolving the namespace, we can probably do better based on compiler settings and pragmas. - -### ISS03: Inference of expando function properties for function declarations - -Local inference does not currently support adding properties to function declarations. -It only supports variables that have a function type assigned to them. -This inference is possible to implement and should be implemented. - -### ISS04: Better support for binding patterns - -Currently we don’t support local inference for binding patterns. -We could emit in local declarations the binding patterns itself instead of separating out the variables as declaration emit currently does. -Supported example: - -
SourceInferred declaration
- -```ts -export let { x, y } = p; -``` - - - -```ts -export let { x, y }: typeof p; -``` - -
- -### ISS05: Accessor inference for classes - -We currently don’t consider the type of the related accessor in local inference in classes. -Whereas we do for object literals. - -### ISS06: Incorrect visibility for parameters of function in return clause - -We are currently facing an error where when we try to synthesize a `typeof` type query for a function parameter in a protected method, we get an error saying that the parameter is not accessible. -We think this error is probably a bit too eager. -The `typeof parameter` does not leak beyond where the method is visible anyway. - -Example: - -```ts -class X { - // Return type of public method from exported class has or is using private name 'p'.(4055) - protected m(p: string): typeof p { - return "" - } -} -``` - -### ISS07: Add better errors for optimistic inference failures - -Currently if optimistic local inference fails, we emit a generic error related to `isolatedDeclarations` and report the incompatibility of the synthetic vs actual type. -This approach provides useful information to the user but it seems a bit strange to report such information between two types TypeScript itself creates. -We will look for better DX in this area. diff --git a/external-declarations/fixed-tests.jsonc b/external-declarations/fixed-tests.jsonc deleted file mode 100644 index 088d5ec871188..0000000000000 --- a/external-declarations/fixed-tests.jsonc +++ /dev/null @@ -1,332 +0,0 @@ -{ - "error-categories": { - "with-isolated-declaration-errors": [ - 9007, // Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit - 9008, // Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit - 9009, // Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function - 9010, // Reference directives are not supported in isolated declaration mode. - 9011 // Heritage_clause_for_Class_Expressions_is_not_allowed_with_isolatedDeclarations - ], - "with-unreliable-errors": [ - 2784, // 'get' and 'set' accessors cannot declare 'this' parameters. - 1162 // An object member cannot be declared optional. - ] - }, - "test-categories": { - "to-investigate": [ - "declarationEmitObjectLiteralAccessors1", - "declarationsWithRecursiveInternalTypesProduceUniqueTypeParams" - ], - "new-issue": [ - "emitMethodCalledNew", - "indexTypeNoSubstitutionTemplateLiteral", - "staticPropertyNameConflicts", - "objectTypesIdentityWithConstructSignatures2", - "objectTypesIdentityWithConstructSignaturesDifferingParamCounts", - "objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints", - "objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2", - "objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3", - "objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType", - "objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2", - "objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames", - "objectTypesIdentityWithGenericConstructSignaturesOptionalParams", - "objectTypesIdentityWithGenericConstructSignaturesOptionalParams2", - "objectTypesIdentityWithGenericConstructSignaturesOptionalParams3" - ], - "enum-issues": [ - "ambientConstLiterals", - "constEnumErrors", - "constEnums", - "enumBasics2", - "enumBasics3", - "forwardRefInEnum", - "isolatedModulesGlobalNamespacesAndEnums", - "mergedDeclarations2", - "mergedEnumDeclarationCodeGen", - "enumConstantMembers", - "enumErrors", - "enumExportMergingES6", - "verbatimModuleSyntaxConstEnumUsage", - "templateLiteralTypes4" - ], - "code-fixer-issues": [ - "arrayFakeFlatNoCrashInferenceDeclarations", - "commonJsImportClassExpression", - "constEnumNamespaceReferenceCausesNoImport2", - "declarationEmitCommonJsModuleReferencedType", - "declarationEmitObjectAssignedDefaultExport", - "declarationEmitPrivatePromiseLikeInterface", - "doubleMixinConditionalTypeBaseClassWorks", - "exportAssignmentWithoutIdentifier1", - "exportEqualsProperty", - "exportEqualsProperty2", - "moduleAugmentationDisallowedExtensions", - "moduleAugmentationNoNewNames", - "overrideBaseIntersectionMethod", - "thisInPropertyBoundDeclarations", - "esDecorators-classExpression-namedEvaluation.9", - "thisInInvalidContextsExternalModule", - "exportAssignDottedName", - "exportAssignNonIdentifier", - "reexportClassDefinition", - "parserEqualsGreaterThanAfterFunction1", - "parserSkippedTokens16", - "declarationFiles" - ], - "not-fixed-with-unreliable-errors": [ - // Language service crash on computing diagnostic (call stack size exceeded) - "binderBinaryExpressionStress", - // Bad syntax beyond recovery - "destructuringParameterDeclaration6", - "thisTypeInFunctionsNegative" - ], - "with-unreliable-errors": [ - "thisTypeErrors", // Assertion to this in static context produces this in DTE and any in TSC - "parseInvalidNonNullableTypes", // Prefix ! operator - "thisInConstructorParameter2", // this type used in invalid context - "parseInvalidNullableTypes", // Prefix ? operator - "ArrowFunction1", // Missing type annotation syntax error - "parserX_ArrowFunction1", // Missing type annotation syntax error - "typeParameterDirectlyConstrainedToItself", // Circular type constraints makes emit unreliable - "typeParameterIndirectlyConstrainedToItself", // Circular type constraints makes emit unreliable - "callSignaturesWithAccessibilityModifiersOnParameters", // Accessibility modifiers on function parameters - // Duplicate properties and variables - "duplicateObjectLiteralProperty", - "duplicateVariablesWithAny", - "duplicateVarsAcrossFileBoundaries", - "gettersAndSettersErrors", - "jsFileCompilationDuplicateVariableErrorReported", - "varBlock", - "duplicatePropertiesInTypeAssertions01", - "duplicatePropertiesInTypeAssertions02", - "parserCastVersusArrowFunction1", - "invalidMultipleVariableDeclarations", - "validMultipleVariableDeclarations", - "augmentedTypesVar", - "objectLiteralErrors", - "duplicateObjectLiteralProperty_computedName2", - "arrowFunctionExpressions", - "castingTuple", // contains both duplicate variables and print differences. - // Identifier expected. - "FunctionPropertyAssignments2_es6", - "FunctionPropertyAssignments3_es6", - "FunctionPropertyAssignments6_es6", - // Generic type '{0}' requires {1} type argument(s) - "genericTypeReferenceWithoutTypeArgument", - "genericTypeReferenceWithoutTypeArgument2", - // A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - "overloadsWithComputedNames", - // A_computed_property_name_must_be_of_type_string_number_symbol_or_any, - "bigintIndex", - "giant", - "symbolProperty59", - "computedPropertyNames14_ES5", - "computedPropertyNames14_ES6", - "computedPropertyNames15_ES5", - "computedPropertyNames15_ES6", - "computedPropertyNames17_ES5", - "computedPropertyNames17_ES6", - "parserES5ComputedPropertyName5", - "parserIndexSignature5", - "parserIndexSignature11", - "parserES5SymbolProperty1", - "parserES5SymbolProperty2", - "parserComputedPropertyName20", - "parserComputedPropertyName21", - "typeUsedAsTypeLiteralIndex", - "parser.asyncGenerators.classMethods.es2018", - "decoratorsOnComputedProperties", - "indexSignatureMustHaveTypeAnnotation", - "intTypeCheck", - // Invalid escape sequences - "invalidTaggedTemplateEscapeSequences", - "objectTypeWithStringNamedPropertyOfIllegalCharacters", - "noUsedBeforeDefinedErrorInTypeContext", // Variable used before definition in type context - "accessorBodyInTypeContext", // An implementation cannot be declared in ambient contexts. - "commonJsExportTypeDeclarationError", // Duplicate name, TS resolves to the type alias symbol, DTE resolves to import. Neither is wrong, code is wrong. - "parseAssertEntriesError", // Syntactic invalid import assertions. - "decoratorMetadataWithImportDeclarationNameCollision7", // Import does not have the accessed member. TS removes the import as unused. A DTE will keep it as it is syntactically used. - "classExtendingNonConstructor", // Not reported as isolated declaration error, but the extends clause is invalid. - "nodeModulesImportTypeModeDeclarationEmitErrors1", // Invalid import asserts - "wellKnownSymbolExpando", // Expando function with well known symbols error in TS, but generate the expando function namepsace, DTE does not. - "genericsWithDuplicateTypeParameters1" // Duplicate type parameters - ], - "with-isolated-declaration-errors/9008": [ - "declarationEmitHasTypesRefOnNamespaceUse", - "declarationFilesWithTypeReferences2", - "typeReferenceDirectives11", - "typeReferenceDirectives12", - "typeReferenceDirectives2", - "typeReferenceDirectives8", - "typeReferenceDirectives9", - "importingExportingTypes", - // Will not actually error because of https://github.com/microsoft/TypeScript/issues/55636 - // In isolated declarations we walk the type in the return as if it was hand written in the variable - // This triggers the difference in behavior described in the issue. - "jsxNamespaceGlobalReexport" - ], - "with-isolated-declaration-errors": [ - "typeFromPropertyAssignment38", // Nested expando functions. Can in principle be detected, but are not yet implemented - "contextualReturnTypeOfIIFE2", // Nested expando functions. Can in principle be detected, but are not yet implemented - // Computed property errors a DTE can't detect - "complicatedPrivacy", - "computedPropertyNames12_ES5", - "computedPropertyNames12_ES6", - "computedPropertyNames13_ES5", - "computedPropertyNames13_ES6", - "computedPropertyNames16_ES5", - "computedPropertyNames16_ES6", - "computedPropertyNames2_ES5", - "computedPropertyNames2_ES6", - "computedPropertyNamesWithStaticProperty", - "declarationEmitMappedTypeTemplateTypeofSymbol", - "declarationEmitReadonlyComputedProperty", - "ES5For-ofTypeCheck10", - "ES5SymbolProperty2", - "ES5SymbolProperty3", - "ES5SymbolProperty4", - "ES5SymbolProperty5", - "ES5SymbolProperty6", - "ES5SymbolProperty7", - "indexWithoutParamType2", - "MemberFunctionDeclaration3_es6", - "parserComputedPropertyName10", - "parserComputedPropertyName11", - "parserComputedPropertyName12", - "parserComputedPropertyName13", - "parserComputedPropertyName14", - "parserComputedPropertyName15", - "parserComputedPropertyName18", - "parserComputedPropertyName19", - "parserComputedPropertyName22", - "parserComputedPropertyName23", - "parserComputedPropertyName24", - "parserComputedPropertyName25", - "parserComputedPropertyName27", - "parserComputedPropertyName28", - "parserComputedPropertyName29", - "parserComputedPropertyName31", - "parserComputedPropertyName32", - "parserComputedPropertyName33", - "parserComputedPropertyName36", - "parserComputedPropertyName38", - "parserComputedPropertyName39", - "parserComputedPropertyName7", - "parserComputedPropertyName8", - "parserComputedPropertyName9", - "parserES5ComputedPropertyName1", - "parserES5ComputedPropertyName10", - "parserES5ComputedPropertyName11", - "parserES5ComputedPropertyName7", - "parserES5ComputedPropertyName8", - "parserES5ComputedPropertyName9", - "parserES5SymbolProperty3", - "parserES5SymbolProperty4", - "parserES5SymbolProperty5", - "parserES5SymbolProperty6", - "parserES5SymbolProperty7", - "parserES5SymbolProperty8", - "parserES5SymbolProperty9", - "propertyAssignment", - "superSymbolIndexedAccess1", - "superSymbolIndexedAccess3", - "superSymbolIndexedAccess4", - "superSymbolIndexedAccess5", - "superSymbolIndexedAccess6", - "declarationEmitForModuleImportingModuleAugmentationRetainsImport" // Import augments and must be kept - ], - "ts-bugs": [ - // Type parameter renamed - // Reported as https://github.com/microsoft/TypeScript/issues/55653 - "objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts", - "objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames", - "objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts", - "typeAssertionToGenericFunctionType", - // Default type parameters is written in declarations - "conditionalTypesSimplifyWhenTrivial", - // https://github.com/microsoft/TypeScript/issues/55571 - "reExportAliasMakesInstantiated" - ], - // Needs TS Fix - // Reported as https://github.com/microsoft/TypeScript/issues/55654 - // Fix available - "ts-bugs/binding-patterns": [ - "declarationsAndAssignments", - "excessPropertyCheckWithSpread", - "destructuringParameterDeclaration1ES5", - "destructuringParameterDeclaration1ES5iterable", - "destructuringParameterDeclaration1ES6", - "sourceMapValidationDestructuringParameterNestedObjectBindingPattern", - "sourceMapValidationDestructuringParameterNestedObjectBindingPatternDefaultValues", - "sourceMapValidationDestructuringParameterObjectBindingPattern", - "sourceMapValidationDestructuringParameterObjectBindingPatternDefaultValues", - "declarationEmitKeywordDestructuring", - "paramterDestrcuturingDeclaration", - "renamingDestructuredPropertyInFunctionType", - "restParameterWithBindingPattern3", - "destructuringInFunctionType", - "contextuallyTypedBindingInitializerNegative" - ], - // Just Printing differences - "print-differences": [ - "arrayFind", - "contextualTyping", - "contextualTyping38", - "contextualTyping39", - "correlatedUnions", - "declarationEmitNoNonRequiredParens", - "declarationEmitShadowingInferNotRenamed", - "hugeDeclarationOutputGetsTruncatedWithError", - "inKeywordAndIntersection", - "mappedTypeInferenceAliasSubstitution", - "mappedTypeWithAsClauseAndLateBoundProperty2", - "parseArrowFunctionWithFunctionReturnType", - "parseTypes", - "asOperator1", - "generatedContextualTyping", - "objectLiteralGettersAndSetters", - "optionalChainingInference", - "noUncheckedIndexedAccess", - "conditionalTypes1", - "stringLiteralsWithTypeAssertions01", - "castingTuple", - "namedTupleMembers", - "optionalMethods", - "optionalParameterProperty", - "optionalParameterRetainsNull", - "escapedIdentifiers", - "parseBigInt", - "commentsFunction", - "declarationEmitDistributiveConditionalWithInfer", - "declarationEmitInlinedDistributiveConditional", - "declarationEmitParameterProperty", - "declarationsForFileShadowingGlobalNoError", - "mappedTypeGenericInstantiationPreservesHomomorphism", - "mappedTypeGenericInstantiationPreservesInlineForm", - "unusedTypeParametersCheckedByNoUnusedParameters", - "unusedTypeParametersNotCheckedByNoUnusedLocals", - "mixinClassesAnonymous", - "nodeModulesTripleSlashReferenceModeDeclarationEmit6", - "keyofAndIndexedAccess", - "subtypingWithCallSignatures2", - "conditionalTypesSimplifyWhenTrivial", // Default type parameter is inlined - "emitArrowFunctionES6", - "stringLiteralTypesInImplementationSignatures", - "stringLiteralTypesInImplementationSignatures2", - "computedPropertyNames7_ES6", - "computedPropertyNames7_ES5", - "objectLiteralEnumPropertyNames", - "objectLiteralComputedNameNoDeclarationError", - "identityAndDivergentNormalizedTypes", - "genericFunctionsAndConditionalInference", - "dynamicNames", - "declarationEmitWithDefaultAsComputedName2", - "declarationEmitWithDefaultAsComputedName", - "declarationEmitComputedNameConstEnumAlias", - "declarationEmitPropertyNumericStringKey", - "templateLiteralsSourceMap", // template literal is evaluated in constant value. - "nodeModulesImportTypeModeDeclarationEmit1", // resolution-mode in assert from type assertion is preserved - "literalTypesAndTypeAssertions" // (0 | 1) written in code is preserved by dte - ] - } -} diff --git a/external-declarations/fixer-test/expected/array_literals.ts b/external-declarations/fixer-test/expected/array_literals.ts deleted file mode 100644 index 7dd82a6037de9..0000000000000 --- a/external-declarations/fixer-test/expected/array_literals.ts +++ /dev/null @@ -1,5 +0,0 @@ -export const a = [42, 34] as const; -const b = [42, 34] as const; - -export const c: number[] = [42, 34]; -const d = [42, 34]; diff --git a/external-declarations/fixer-test/expected/basic_types.ts b/external-declarations/fixer-test/expected/basic_types.ts deleted file mode 100644 index 34abddfde64b9..0000000000000 --- a/external-declarations/fixer-test/expected/basic_types.ts +++ /dev/null @@ -1,15 +0,0 @@ -function foo() { - return 42; -} - -export const a: number = foo(); -const b = foo(); - -export const c = 42; -const d = 42; - -export const e = "42"; -const f = "42"; - -export const g: "42" | "43" = foo() === 0? "42": "43"; -const h = foo() === 0? "42": "43"; \ No newline at end of file diff --git a/external-declarations/fixer-test/expected/classes.ts b/external-declarations/fixer-test/expected/classes.ts deleted file mode 100644 index f5b557ceb9600..0000000000000 --- a/external-declarations/fixer-test/expected/classes.ts +++ /dev/null @@ -1,6 +0,0 @@ -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; } \ No newline at end of file diff --git a/external-declarations/fixer-test/expected/default_exports.ts b/external-declarations/fixer-test/expected/default_exports.ts deleted file mode 100644 index 421ea28b53d34..0000000000000 --- a/external-declarations/fixer-test/expected/default_exports.ts +++ /dev/null @@ -1,8 +0,0 @@ -function foo() { - return { x: 1, y: 1 }; -} -const __default: { - x: number; - y: number; -} = foo(); -export default __default; \ No newline at end of file diff --git a/external-declarations/fixer-test/expected/destructuring.ts b/external-declarations/fixer-test/expected/destructuring.ts deleted file mode 100644 index 39d33b60d79b4..0000000000000 --- a/external-declarations/fixer-test/expected/destructuring.ts +++ /dev/null @@ -1,8 +0,0 @@ -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; -export const z = 42; \ No newline at end of file diff --git a/external-declarations/fixer-test/expected/expressions_in_objects.ts b/external-declarations/fixer-test/expected/expressions_in_objects.ts deleted file mode 100644 index 768dd9598819d..0000000000000 --- a/external-declarations/fixer-test/expected/expressions_in_objects.ts +++ /dev/null @@ -1,35 +0,0 @@ -function makeResource(identifier: string): string { - return identifier; -} - -export const resourceObject: { - readonly Label: string; - readonly Button: string; -} = { - Label: makeResource("Label"), - Button: makeResource("Label") -} as const; - -const resourceObject2 = { - Label: makeResource("Label"), - Button: makeResource("Label") -} as const; - -export const nestedObjects: { - nested: { - Label: string; - Button: string; - }; -} = { - nested: { - Label: makeResource("Label"), - Button: makeResource("Label") - } -}; - -const nestedObjects2 = { - nested: { - Label: makeResource("Label"), - Button: makeResource("Label") - } -}; \ No newline at end of file diff --git a/external-declarations/fixer-test/expected/function_expressions.ts b/external-declarations/fixer-test/expected/function_expressions.ts deleted file mode 100644 index c593709c93d14..0000000000000 --- a/external-declarations/fixer-test/expected/function_expressions.ts +++ /dev/null @@ -1,11 +0,0 @@ -function foo() { - return 42; -} - -export class A { - readonly b = (): number => foo(); - readonly c = function(): number { return foo(); }; -} - -export const b = (): number => foo(); -export const c = function(): number { return foo(); }; \ No newline at end of file diff --git a/external-declarations/fixer-test/expected/function_return.ts b/external-declarations/fixer-test/expected/function_return.ts deleted file mode 100644 index b987f9eddb1cf..0000000000000 --- a/external-declarations/fixer-test/expected/function_return.ts +++ /dev/null @@ -1,65 +0,0 @@ -export function foo(a: number): string | 42 { - if (a === 3) { - return 42; - } - return String(a); -} - -function foo2(a: number) { - if (a === 3) { - return 42; - } - return String(a); -} - -export function singleReturn(): number { - return 42; -} - -function singleReturn2() { - return 42; -} - -export function singleReturnNonLiteral(): string | 42 { - return foo(2); -} - -function singleReturnNonLiteral2() { - return foo(2); -} - -export function multipleReturn(a: number): 42 | 43 { - if (a === 0) { - return 42; - } - return 43; -} - -function multipleReturn2(a: number) { - if (a === 0) { - return 42; - } - return 43; -} - -function makeResource(identifier: string): string { - return identifier; -} -export function returnObjectLiteral(): { - Label: string; - Button: string; -} { - return { - Label: makeResource("Label"), - Button: makeResource("Label") - }; -} -export function returnObjectLiteral2(): { - Label: number; - Button: string; -} { - return { - Label: 42, - Button: "42" - }; -} diff --git a/external-declarations/fixer-test/expected/function_signatures_objects.ts b/external-declarations/fixer-test/expected/function_signatures_objects.ts deleted file mode 100644 index f4987221b8577..0000000000000 --- a/external-declarations/fixer-test/expected/function_signatures_objects.ts +++ /dev/null @@ -1,63 +0,0 @@ -function foo() { - return 42; -} -export const a = { - value: 0, - array: [1, 2, 3], - fn(value: string): number { return 0; }, -} as const; - -const b = { - value: 0, - array: [1, 2, 3], - fn(value: string): number { return 0; }, -} as const; - -export const c: { - value: number; - array: number[]; - fn(value: string): number; -} = { - value: 0, - array: [1, 2, 3], - fn(value: string): number { return 0; }, -}; - -const d = { - value: 0, - array: [1, 2, 3], - fn(value: string): number { return 0; }, -}; - -export const e: { - readonly value: number; - readonly array: readonly [1, 2, 3]; - readonly fn: (value: string) => number; -} = { - value: foo(), - array: [1, 2, 3], - fn(value: string): number { return 0; }, -} as const; - -const f = { - value: foo(), - array: [1, 2, 3], - fn(value: string): number { return 0; }, -} as const; - - -export const g: { - value: number; - array: number[]; - fn(value: string): number; -} = { - value: foo(), - array: [1, 2, 3], - fn(value: string): number { return 0; }, -}; - -const h = { - value: foo(), - array: [1, 2, 3], - fn(value: string): number { return 0; }, -}; diff --git a/external-declarations/fixer-test/expected/object_literals.ts b/external-declarations/fixer-test/expected/object_literals.ts deleted file mode 100644 index 524a66581bc7a..0000000000000 --- a/external-declarations/fixer-test/expected/object_literals.ts +++ /dev/null @@ -1,22 +0,0 @@ -export const a = { - value: 0, - array: [1, 2, 3], -} as const; - -const b = { - value: 0, - array: [1, 2, 3], -} as const; - -export const c: { - value: number; - array: number[]; -} = { - value: 0, - array: [1, 2, 3], -}; - -const d = { - value: 0, - array: [1, 2, 3], -}; diff --git a/external-declarations/fixer-test/expected/symbols.ts b/external-declarations/fixer-test/expected/symbols.ts deleted file mode 100644 index 09ec9ab2737b0..0000000000000 --- a/external-declarations/fixer-test/expected/symbols.ts +++ /dev/null @@ -1,18 +0,0 @@ - -export const a: unique symbol = Symbol(); - -export function foo(): symbol { - return Symbol(); -} - -export const z: { - z: symbol; -} = { - z: Symbol(), -}; - -export const z2: { - readonly z: symbol; -} = { - z: Symbol() -} as const; \ No newline at end of file diff --git a/external-declarations/fixer-test/source/array_literals.ts b/external-declarations/fixer-test/source/array_literals.ts deleted file mode 100644 index c2c47dd0b0a75..0000000000000 --- a/external-declarations/fixer-test/source/array_literals.ts +++ /dev/null @@ -1,5 +0,0 @@ -export const a = [42, 34] as const; -const b = [42, 34] as const; - -export const c = [42, 34]; -const d = [42, 34]; diff --git a/external-declarations/fixer-test/source/basic_types.ts b/external-declarations/fixer-test/source/basic_types.ts deleted file mode 100644 index 7e291952c2ec2..0000000000000 --- a/external-declarations/fixer-test/source/basic_types.ts +++ /dev/null @@ -1,15 +0,0 @@ -function foo() { - return 42; -} - -export const a = foo(); -const b = foo(); - -export const c = 42; -const d = 42; - -export const e = "42"; -const f = "42"; - -export const g = foo() === 0? "42": "43"; -const h = foo() === 0? "42": "43"; \ No newline at end of file diff --git a/external-declarations/fixer-test/source/classes.ts b/external-declarations/fixer-test/source/classes.ts deleted file mode 100644 index cc08ff5e46bf1..0000000000000 --- a/external-declarations/fixer-test/source/classes.ts +++ /dev/null @@ -1,5 +0,0 @@ -function mixin any>(ctor: T): T { - return ctor; -} -class Point2D { x = 0; y = 0; } -export class Point3D extends mixin(Point2D) { z = 0; } \ No newline at end of file diff --git a/external-declarations/fixer-test/source/default_exports.ts b/external-declarations/fixer-test/source/default_exports.ts deleted file mode 100644 index 804753d65d7de..0000000000000 --- a/external-declarations/fixer-test/source/default_exports.ts +++ /dev/null @@ -1,4 +0,0 @@ -function foo() { - return { x: 1, y: 1 }; -} -export default foo(); \ No newline at end of file diff --git a/external-declarations/fixer-test/source/destructuring.ts b/external-declarations/fixer-test/source/destructuring.ts deleted file mode 100644 index 663a76c61814d..0000000000000 --- a/external-declarations/fixer-test/source/destructuring.ts +++ /dev/null @@ -1,4 +0,0 @@ -function foo() { - return { x: 1, y: 1 } as const; -} -export const { x, y = 0 } = foo(), z = 42; \ No newline at end of file diff --git a/external-declarations/fixer-test/source/expressions_in_objects.ts b/external-declarations/fixer-test/source/expressions_in_objects.ts deleted file mode 100644 index 77c8a2dac2421..0000000000000 --- a/external-declarations/fixer-test/source/expressions_in_objects.ts +++ /dev/null @@ -1,27 +0,0 @@ -function makeResource(identifier: string): string { - return identifier; -} - -export const resourceObject = { - Label: makeResource("Label"), - Button: makeResource("Label") -} as const; - -const resourceObject2 = { - Label: makeResource("Label"), - Button: makeResource("Label") -} as const; - -export const nestedObjects = { - nested: { - Label: makeResource("Label"), - Button: makeResource("Label") - } -}; - -const nestedObjects2 = { - nested: { - Label: makeResource("Label"), - Button: makeResource("Label") - } -}; \ No newline at end of file diff --git a/external-declarations/fixer-test/source/function_expressions.ts b/external-declarations/fixer-test/source/function_expressions.ts deleted file mode 100644 index f31fba96e223a..0000000000000 --- a/external-declarations/fixer-test/source/function_expressions.ts +++ /dev/null @@ -1,11 +0,0 @@ -function foo() { - return 42; -} - -export class A { - readonly b = () => foo(); - readonly c = function() { return foo(); }; -} - -export const b = () => foo(); -export const c = function() { return foo(); }; \ No newline at end of file diff --git a/external-declarations/fixer-test/source/function_return.ts b/external-declarations/fixer-test/source/function_return.ts deleted file mode 100644 index c5de10fe95287..0000000000000 --- a/external-declarations/fixer-test/source/function_return.ts +++ /dev/null @@ -1,59 +0,0 @@ -export function foo(a: number) { - if (a === 3) { - return 42; - } - return String(a); -} - -function foo2(a: number) { - if (a === 3) { - return 42; - } - return String(a); -} - -export function singleReturn() { - return 42; -} - -function singleReturn2() { - return 42; -} - -export function singleReturnNonLiteral() { - return foo(2); -} - -function singleReturnNonLiteral2() { - return foo(2); -} - -export function multipleReturn(a: number) { - if (a === 0) { - return 42; - } - return 43; -} - -function multipleReturn2(a: number) { - if (a === 0) { - return 42; - } - return 43; -} - -function makeResource(identifier: string): string { - return identifier; -} -export function returnObjectLiteral() { - return { - Label: makeResource("Label"), - Button: makeResource("Label") - }; -} -export function returnObjectLiteral2() { - return { - Label: 42, - Button: "42" - }; -} diff --git a/external-declarations/fixer-test/source/function_signatures_objects.ts b/external-declarations/fixer-test/source/function_signatures_objects.ts deleted file mode 100644 index 9b7c85a66794f..0000000000000 --- a/external-declarations/fixer-test/source/function_signatures_objects.ts +++ /dev/null @@ -1,51 +0,0 @@ -function foo() { - return 42; -} -export const a = { - value: 0, - array: [1, 2, 3], - fn(value: string): number { return 0; }, -} as const; - -const b = { - value: 0, - array: [1, 2, 3], - fn(value: string): number { return 0; }, -} as const; - -export const c = { - value: 0, - array: [1, 2, 3], - fn(value: string): number { return 0; }, -}; - -const d = { - value: 0, - array: [1, 2, 3], - fn(value: string): number { return 0; }, -}; - -export const e = { - value: foo(), - array: [1, 2, 3], - fn(value: string): number { return 0; }, -} as const; - -const f = { - value: foo(), - array: [1, 2, 3], - fn(value: string): number { return 0; }, -} as const; - - -export const g = { - value: foo(), - array: [1, 2, 3], - fn(value: string): number { return 0; }, -}; - -const h = { - value: foo(), - array: [1, 2, 3], - fn(value: string): number { return 0; }, -}; diff --git a/external-declarations/fixer-test/source/object_literals.ts b/external-declarations/fixer-test/source/object_literals.ts deleted file mode 100644 index cf86c77c0914f..0000000000000 --- a/external-declarations/fixer-test/source/object_literals.ts +++ /dev/null @@ -1,19 +0,0 @@ -export const a = { - value: 0, - array: [1, 2, 3], -} as const; - -const b = { - value: 0, - array: [1, 2, 3], -} as const; - -export const c = { - value: 0, - array: [1, 2, 3], -}; - -const d = { - value: 0, - array: [1, 2, 3], -}; diff --git a/external-declarations/fixer-test/source/symbols.ts b/external-declarations/fixer-test/source/symbols.ts deleted file mode 100644 index 9ae64ee1bc700..0000000000000 --- a/external-declarations/fixer-test/source/symbols.ts +++ /dev/null @@ -1,14 +0,0 @@ - -export const a = Symbol(); - -export function foo() { - return Symbol(); -} - -export const z = { - z: Symbol(), -}; - -export const z2 = { - z: Symbol() -} as const; \ No newline at end of file diff --git a/external-declarations/original-tests.jsonc b/external-declarations/original-tests.jsonc deleted file mode 100644 index 41d38aca45019..0000000000000 --- a/external-declarations/original-tests.jsonc +++ /dev/null @@ -1,84 +0,0 @@ -{ - "error-categories": { - }, - "test-categories": { - "with-unreliable-errors": [ - // A_computed_property_name_must_be_of_type_string_number_symbol_or_any, - "bigintIndex", - "parserES5ComputedPropertyName5", - "parserES5ComputedPropertyName8", - "parserIndexSignature5", - "parserES5SymbolProperty1", - "parserES5SymbolProperty2", - "parserES5SymbolProperty8", - "parserES5SymbolProperty9", - "parserComputedPropertyName13", - "parserComputedPropertyName14", - "parserComputedPropertyName15", - "parserComputedPropertyName18", - "parserComputedPropertyName19", - "parserComputedPropertyName2", - "parserComputedPropertyName20", - "parserComputedPropertyName21", - "parserComputedPropertyName37", - "symbolProperty52", - "symbolProperty53", - "symbolProperty54", - "symbolProperty58", - "symbolProperty59", - "computedPropertyNames6_ES5", - "computedPropertyNames6_ES6", - "parserES5ComputedPropertyName2", - "parserIndexSignature11", - "ES5SymbolProperty1", - "indexSignatureMustHaveTypeAnnotation", - "computedPropertyNamesOnOverloads_ES5", - "computedPropertyNamesOnOverloads_ES6", - // Computed property type is narrowed - "computedPropertiesNarrowed", - // error on used to be indexer, now it is a computed property - "propertyAssignment", - "invalidTaggedTemplateEscapeSequences", // Invalid escape sequences - // duplicate field/accessor - "symbolDeclarationEmit12", - // symbol merges with global eval and is not written to declarations. - "parserStrictMode8" - ], - "ts-bugs": [ - // https://github.com/microsoft/TypeScript/issues/55571 - "reExportAliasMakesInstantiated" - ], - // Just Printing differences - "print-differences": [ - "parseBigInt", // number literals are normalized by ts - "templateLiteralsSourceMap" // template literal is evaluated in constant value. - ], - "enums-issues": [ - // External eval - "constEnumErrors", - "constEnums", - "enumBasics2", - "isolatedModulesGlobalNamespacesAndEnums", - "constEnum2", - "enumBasics3", - "verbatimModuleSyntaxConstEnumUsage", - "templateLiteralTypes4", - "enumConstantMembers", - // merge - "mergedEnumDeclarationCodeGen", - "enumExportMergingES6", - "mergedDeclarations2" - ], - // Some 9007 errors will result in differences. This is fine. - "with-isolated-declaration-errors/9007": [ - // computed property differences - "complicatedPrivacy", - "giant", - "intTypeCheck", - "overloadsWithComputedNames", - "typeUsedAsTypeLiteralIndex", // computed property errors but in type aliases - "forwardRefInEnum", // Circular enums result in different values - "enumErrors" - ] - } -} diff --git a/external-declarations/package.json b/external-declarations/package.json deleted file mode 100644 index 8b2c8424e9560..0000000000000 --- a/external-declarations/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "external-declarations", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "build": "node ../built/local/tsc.js -p ./src", - "watch": "node ../built/local/tsc.js -w -p ./src", - "run-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=../tests/cases --type=all --shardCount=8 --forceIsolatedDeclarations --outputPath=./tsc-tests/$original --configFile=./original-tests.jsonc", - "run-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=../tests/cases --forceIsolatedDeclarations --outputPath=./tsc-tests/$original --configFile=./original-tests.jsonc", - "transform-tests-parallel": "node ./build/code-mod/tsc-test-fixer/run-test-updater-parallel.js --rootPaths=../tests/cases --shardCount=8", - "transform-tests": "node ./build/code-mod/tsc-test-fixer/run-test-updater.js --rootPaths=../tests/cases", - "run-transformed-tests-parallel": "node ./build/test-runner/parallel-run.js --rootPaths=./tsc-tests/updated-tests --type=all --shardCount=8 --outputPath=./tsc-tests/$transformed --configFile=./fixed-tests.jsonc", - "run-transformed-tests": "node ./build/test-runner/test-runner-main.js --type=all --rootPaths=./tsc-tests/updated-tests --outputPath=./tsc-tests/$transformed --configFile=./fixed-tests.jsonc", - "fixer-tests": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source ", - "fixer-tests-update": "node ./build/code-mod/fixer-test.js --rootPaths=./fixer-test/source --update " - }, - "author": "", - "license": "ISC", - "dependencies": { - "json5": "^2.2.3", - "source-map-support": "^0.5.21", - "typescript": "../", - "@types/inquirer": "^8.2.6", - "@types/node": "^20.7.1", - "chalk": "^4.1.2", - "inquirer": "^8.2.6" - }, - "devDependencies": { - "@types/node": "^18.11.18" - } -} diff --git a/external-declarations/readme.md b/external-declarations/readme.md deleted file mode 100644 index a46e89f38e6a3..0000000000000 --- a/external-declarations/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -# Implementation of declaration emit - -This implementation uses the the parser and printer from the TypeScript code base but replaces the binder and emit resolver with rewritten versions that do not depend on the type checker. - -The declaration transform itself is mostly the same as the version in TypeScript (with some code erased and different imports) - -## Package scripts - -- `build`/ `watch` - Build the code -- `run-tests-parallel` - Emits declarations using tsc and the stand alone emitter for the tests in the TypeScript code base in parallel. Outputs to `tsc-tests` -- `run-test` - Emits declarations using tsc and the stand alone emitter for the tests in the TypeScript code base on a single thread, or filtered if you specify a test name. Outputs to `tsc-tests` -- `transform-tests-parallel` - Transforms the TypeScript tests t add missing type annotations and write them to `tsc-tests\updated-tests`. Runs in parallel -- `transform-test` - Transforms the TypeScript tests t add missing type annotations and write them to `tsc-tests\updated-tests`. Runs on a single thread. Accepts a test name or regex filter -- `run-transformed-tests-parallel` - Same as `run-tests-parallel` but runs on the transformed tests in `tsc-tests\updated-tests` -- `run-transformed-test`- Same as `run-test` but runs on the transformed tests in `tsc-tests\updated-tests` - - -Note: Tests currently just output the declarations, there is no console error message. Use an external diff tool to see differences. \ No newline at end of file diff --git a/external-declarations/src/code-mod/fixer-test.ts b/external-declarations/src/code-mod/fixer-test.ts deleted file mode 100644 index 643c9b94d7d89..0000000000000 --- a/external-declarations/src/code-mod/fixer-test.ts +++ /dev/null @@ -1,104 +0,0 @@ -import "source-map-support/register"; - -import * as fsSync from "fs"; -import * as fs from "fs/promises"; -import ts from "typescript"; - -import { - normalizePath, -} from "../compiler/path-utils"; -import { - TestCaseContent, -} from "../test-runner/tsc-infrastructure/test-file-parser"; -import { - loadTestCase, -} from "../test-runner/utils"; -import { - ArgType, - parseArgs, - parserConfiguration, -} from "../utils/cli-parser"; -import { - readAllFiles, -} from "../utils/fs-utils"; -import { - testCaseToString, -} from "./tsc-test-fixer/test-case-utils"; -import { - fixTestCase, -} from "./tsc-test-fixer/test-fixer"; - -(ts as any).Debug.enableDebugInfo(); - -export const testRunnerCLIConfiguration = parserConfiguration({ - default: { - type: ArgType.String(), - description: "Test filter to run", - }, - rootPaths: ArgType.StringArray(), - update: ArgType.Boolean(), -}); - -const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), testRunnerCLIConfiguration); -printUsageOnErrors(); - -const rootCasePaths = parsedArgs.rootPaths ?? ["./fixer-test/expected"]; - -const filter = parsedArgs.default ? new RegExp(parsedArgs.default) : /.*\.ts/; - -const allTests = rootCasePaths - .flatMap(r => readAllFiles(r, filter).map(file => ({ file, root: r }))); - -async function main() { - const [start, end] = [0, allTests.length]; - - for (let count = start; count < end; count++) { - const testFile = normalizePath(allTests[count].file); - const rootPath = normalizePath(allTests[count].root); - const caseData = await loadTestCase(testFile); - - const updatedTestFileName = testFile.replace(rootPath, "./fixer-test/expected"); - const result = await fixTestCase(caseData, { - target: ts.ScriptTarget.ES2019, - }); - const resultFiles = !(result instanceof Error) ? result : [{ - unitName: caseData.testUnitData[0].name, - content: ` -================= CODE MOD ERROR ============== -${result.message} -${result.stack} - -// ================== -// Original test file: ${testFile} -// ${caseData.code.split("\n").join("\n// ")} -`, - }]; - await compareTestCase( - { - ...caseData, - testUnitData: caseData.testUnitData.map(u => ({ - ...u, - content: resultFiles.find(o => o.unitName === u.name)?.content!, - })), - }, - updatedTestFileName, - !!parsedArgs.update, - ); - console.log(`Ran: ${count}`); - } -} - -async function compareTestCase(testData: TestCaseContent & { BOM: string; }, path: string, update: boolean) { - const content = await testCaseToString(testData); - const original = !fsSync.existsSync(path) ? undefined : await fs.readFile(path, "utf-8"); - if (content !== original) { - if (!update) { - throw new Error(`Expected \n${original}\n for file ${path} but seen \n${content}`); - } - else { - fs.writeFile(path, content); - } - } -} - -main(); diff --git a/external-declarations/src/code-mod/fixer/code-fixer-applier.ts b/external-declarations/src/code-mod/fixer/code-fixer-applier.ts deleted file mode 100644 index 5aa6c66d594d6..0000000000000 --- a/external-declarations/src/code-mod/fixer/code-fixer-applier.ts +++ /dev/null @@ -1,197 +0,0 @@ -import * as path from "path"; -import ts, { - CompilerHost, - createCompilerHost, - createDocumentRegistry, - DocumentRegistry, - UserPreferences, -} from "typescript"; -import { - CodeFixAction, - Diagnostic, - LanguageService, -} from "typescript"; - -import { - applyChangesSnapShot, - createSnapshotRegistry, - revertChangeSnapShot, - VersionedFileRegistry, - VersionedScriptSnapshot, -} from "./snapshots"; -import { - getLineColumn, -} from "./utils"; - -export interface BasicAbortSignal { - isAborted: boolean; -} - -export async function fixProjectRaw( - host: ts.LanguageServiceHost, - documentRegistry: DocumentRegistry | undefined, - snapShotRegistry: VersionedFileRegistry, - fixableErrors: Set, - userPreferences: ts.UserPreferences, - selectFix: (service: LanguageService, diag: Diagnostic, fixes: readonly CodeFixAction[], files: VersionedFileRegistry, signal: BasicAbortSignal) => Promise | (number | undefined), - validateFix?: (service: LanguageService) => Promise, - onProjectLoaded?: (service: LanguageService, documentRegistry: DocumentRegistry, files: VersionedFileRegistry, signal: BasicAbortSignal) => Promise, -) { - documentRegistry = documentRegistry ?? createDocumentRegistry( - host.useCaseSensitiveFileNames?.(), - host.getCurrentDirectory(), - ); - const service = ts.createLanguageService(host, documentRegistry); - const program = service.getProgram()!; - const signal: BasicAbortSignal = { isAborted: false }; - - onProjectLoaded && (await onProjectLoaded(service, documentRegistry, snapShotRegistry, signal)); - const files = program.getSourceFiles(); - const skips = new Map(); - const defaultFormatOptions = ts.getDefaultFormatCodeSettings(); - fileLoop: - for (let index = 0; index < files.length; index++) { - const file = files[index]; - if (file.fileName.endsWith(".d.ts")) continue; - - let diagnostics = getIsolatedDeclarationsErrors(file.fileName); - - if (diagnostics.length === 0) continue; - let skipCount = skips.get(file.fileName) ?? 0; - let lastFixedDiagnostic: Diagnostic | undefined; - let stuckCount = 0; - while (diagnostics.length > skipCount) { - const diag = diagnostics[skipCount]; - // Ensure we break out of a unfixable loop - if (lastFixedDiagnostic?.start === diag.start) { - stuckCount++; - } - else { - stuckCount = 0; - } - if (stuckCount === 3) { - const { line, col } = getLineColumn(diag); - throw Error(`Could not fix file. Got stuck in a fix loop on ${diag.file?.fileName}:${line}:${col} -TS${diag.code}: ${diag.messageText} -${diag.file?.text.substring(diag.start ?? 0, (diag.start ?? 0) + (diag.length ?? 0))} -`); - } - const fixes = service.getCodeFixesAtPosition(file.fileName, diag.start!, diag.start! + diag.length!, [diag.code], defaultFormatOptions, userPreferences); - signal.isAborted = false; - let selectedFix: number | undefined = -1; - if (fixes.length) { - const fixResult = selectFix(service, diag, fixes, snapShotRegistry, signal); - selectedFix = typeof fixResult === "number" || fixResult === undefined ? fixResult : (await fixResult); - if (signal.isAborted || selectedFix === undefined) { - // Restart files. - index = -1; - continue fileLoop; - } - } - if (selectedFix === -1) { - skipCount++; - skips.set(file.fileName, skipCount); - continue; - } - - const fix = fixes[selectedFix]; - const changedFiles: { - file: string; - old: VersionedScriptSnapshot; - new: VersionedScriptSnapshot; - }[] = []; - - for (const fileChanges of fix.changes) { - const snapshot = snapShotRegistry.getSnapshot(fileChanges.fileName)!; - const newSnapShot = applyChangesSnapShot(snapshot, fileChanges.textChanges); - snapShotRegistry.setSnapshot(fileChanges.fileName, newSnapShot); - changedFiles.push({ - file: fileChanges.fileName, - new: newSnapShot, - old: snapshot, - }); - } - - if (validateFix && !await validateFix(service)) { - changedFiles.forEach(c => { - snapShotRegistry.setSnapshot(c.file, revertChangeSnapShot(c.old, c.new)); - }); - } - lastFixedDiagnostic = diag; - diagnostics = getIsolatedDeclarationsErrors(file.fileName); - } - } - service.dispose(); - function getIsolatedDeclarationsErrors(fileName: string) { - const program = service.getProgram(); - if (!program) return []; - const sourceFile = program.getSourceFile(fileName); - return program.getDeclarationDiagnostics(sourceFile).filter(d => fixableErrors.has(d.code)) ?? []; - } -} - -export async function fixProject( - tsconfigPath: string, - fixableErrors: Set, - userPreferences: UserPreferences, - selectFix: (service: LanguageService, diag: Diagnostic, fixes: readonly CodeFixAction[], files: VersionedFileRegistry, signal: BasicAbortSignal) => Promise, - validateFix?: (service: LanguageService) => Promise, - onProjectLoaded?: (service: LanguageService, documentRegistry: DocumentRegistry, files: VersionedFileRegistry, signal: BasicAbortSignal) => Promise, -) { - const resolved = path.resolve(tsconfigPath); - const resolvedDirName = path.dirname(resolved); - process.chdir(resolvedDirName); - const relativeTsConfigPath = path.relative(resolvedDirName, resolved); - - // // Read tsconfig.json file from disk - const tsconfig = ts.readConfigFile(relativeTsConfigPath, ts.sys.readFile); - // // Parse JSON content to get compiler options and file names - const cmdLine = ts.parseJsonConfigFileContent(tsconfig.config, ts.sys, resolvedDirName); - cmdLine.options.skipLibCheck = true; - const snapShotRegistry = createSnapshotRegistry(ts.sys); - const compilerHost = createCompilerHost(cmdLine.options); - const langHost = createLanguageHost(snapShotRegistry, cmdLine, compilerHost); - - fixProjectRaw(langHost, /*documentRegistry*/ undefined, snapShotRegistry, fixableErrors, userPreferences, selectFix, validateFix, onProjectLoaded); -} - -export function createLanguageHost( - snapShotRegistry: VersionedFileRegistry, - cmdLine: ts.ParsedCommandLine, - compilerHost: 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; -} diff --git a/external-declarations/src/code-mod/fixer/interactive-fix-selector.ts b/external-declarations/src/code-mod/fixer/interactive-fix-selector.ts deleted file mode 100644 index 6a47d89f6479b..0000000000000 --- a/external-declarations/src/code-mod/fixer/interactive-fix-selector.ts +++ /dev/null @@ -1,232 +0,0 @@ -import chalk from "chalk"; -import inquirer from "inquirer"; -import * as os from "os"; -import type { - ClassificationType, - CodeFixAction, - Diagnostic, - LanguageService, -} from "typescript"; -import ts from "typescript"; - -import { - BasicAbortSignal, -} from "./code-fixer-applier"; -import { - isolatedDeclarationsErrors, -} from "./isolated-declarations-errors"; -import { - VersionedFileRegistry, -} from "./snapshots"; -import { - printDiagnostics, -} from "./utils"; - -const cachedSpans: Record> = {}; -function getString(s: string, length: number) { - return ((cachedSpans[s] ??= {})[length] ??= s.repeat(length)); -} - -export async function interactiveFixSelector(service: LanguageService, diag: Diagnostic, fixes: readonly CodeFixAction[], docs: VersionedFileRegistry, signal: BasicAbortSignal) { - clearScreen(); - await printCode(service, diag); - printDiagnostics(diag); - const allDiags = service.getProgram()?.getDeclarationDiagnostics(); - console.log(`Remaining errors ${allDiags?.length}`); - - const updateFile = docs.updateFromDisk; - docs.updateFromDisk = fileName => { - const existingVersion = docs.getSnapshot(fileName); - const newSnapShot = updateFile.call(docs, fileName); - if (newSnapShot?.version !== existingVersion?.version) { - signal.isAborted = true; - } - return newSnapShot; - }; - try { - const result = inquirer.prompt([ - { - type: "list", - name: "fix", - message: "Select fix:", - default: -1, - choices: [ - ...fixes.map((f, index) => ({ - value: index, - name: f.description.replaceAll("\n", " "), - })), - { name: "Skip", value: -1 }, - ], - }, - ]); - await waitOrAbortPrompt(result, signal); - if (signal.isAborted) { - return undefined; - } - const selectedFix: number = (await result).fix; - return selectedFix; - } - catch (e) { - console.log(e); - } - finally { - docs.updateFromDisk = updateFile; - } - - async function waitOrAbortPrompt(prompt: ReturnType, signal: BasicAbortSignal): Promise { - while (!signal.isAborted) { - const result = await Promise.race([delay(500), prompt]); - if (signal.isAborted) { - // Undocumented API - (prompt as any).ui.rl.emit("line"); - return prompt; - } - if (result !== undefined) { - return result; - } - } - } -} - -const clearScreen = () => { - console.log("\x1b[2J"); -}; - -function delay(ms: number): Promise { - // eslint-disable-next-line no-restricted-globals - return new Promise(r => setTimeout(r, ms)); -} - -function printCode(service: LanguageService, diag: Diagnostic) { - const text = diag.file?.text!; - const endDiag = diag.start! + diag.length!; - const startDiag = diag.start!; - const { start, length } = computePrintStartSpan(); - const classifications = service.getEncodedSyntacticClassifications(diag.file?.fileName!, { start, length }); - printSpans(start, length, text, classifications.spans); - - function computePrintStartSpan() { - const [, maxLines] = process.stdout.getWindowSize(); - const usableLines = maxLines - 6; - const lineSpan = Math.round(usableLines / 3); - const [start, startLineCount] = skipLines(diag.start ?? 0, lineSpan, "up", 0); - - const suggestedEnd = diag.start ?? 0; - const [end] = skipLines(suggestedEnd, usableLines - startLineCount, "down", text.length); - return { start, length: end - start }; - } - function skipLines(pos: number, count: number, dir: "up" | "down", defaultPos: number) { - let skippedLines = 0; - while (count >= skippedLines) { - // Lines with errors take 2 screen lines - skippedLines += (startDiag <= pos && pos <= endDiag) ? 2 : 1; - pos = dir === "up" ? - text.lastIndexOf("\n", pos - 1) : - text.indexOf("\n", pos + 1); - if (pos === -1) { - return [defaultPos, skippedLines] as const; - } - } - return [dir === "up" ? pos + 1 : pos - 1, skippedLines] as const; - } - function printSpans(start: number, length: number, text: string, spans: number[]) { - let pos = start; - const printEnd = start + length; - let lineStart = pos; - function areSpansOverlapping(span1: { start: number; end: number; }, span2: typeof span1) { - return span1.start <= span2.end && span2.start <= span1.end; - } - function writeCode(start: number, end: number, formatter: (text: string) => string = s => s) { - const spanText = text.substring(start, end); - const lineEndChar = spanText.indexOf("\n"); - const lineEnd = pos + lineEndChar; - if (lineEndChar !== -1) { - process.stdout.write(formatter(text.substring(pos, lineEnd))); - } - else { - process.stdout.write(formatter(text.substring(pos, end))); - } - if (lineEndChar !== -1) { - if (areSpansOverlapping({ start: lineStart, end: lineEnd }, { start: startDiag, end: endDiag! })) { - process.stdout.write(os.EOL); - process.stdout.write(getString(" ", Math.max(startDiag - lineStart, 0))); - process.stdout.write(chalk.redBright(getString("~", Math.min(endDiag, lineEnd) - Math.max(startDiag, lineStart)))); - } - lineStart = lineEnd + 1; - process.stdout.write(formatter(text.substring(lineEnd, end))); - } - } - for (const span of iterateSpans(spans)) { - if (pos > span.start + span.length) continue; - if (pos !== span.start) { - writeCode(pos, span.start); - } - pos = span.start; - const end = span.start + span.length; - const formatter = chalk[colorScheme[span.type]] as (...text: string[]) => string; - - writeCode(pos, end, formatter); - - pos += span.length; - if (pos >= printEnd) break; - } - writeCode(pos, pos + 2); // add new line to flush any error ~ - } - console.log(""); -} - -const colorScheme: Record = { - [ts.ClassificationType.numericLiteral]: "red", - [ts.ClassificationType.comment]: "gray", - [ts.ClassificationType.identifier]: "white", - [ts.ClassificationType.keyword]: "blueBright", - [ts.ClassificationType.operator]: "white", - [ts.ClassificationType.stringLiteral]: "red", - [ts.ClassificationType.regularExpressionLiteral]: "red", - [ts.ClassificationType.whiteSpace]: "white", - [ts.ClassificationType.text]: "white", - [ts.ClassificationType.punctuation]: "yellow", - [ts.ClassificationType.className]: "blue", - [ts.ClassificationType.enumName]: "blue", - [ts.ClassificationType.interfaceName]: "blue", - [ts.ClassificationType.moduleName]: "blue", - [ts.ClassificationType.typeParameterName]: "blue", - [ts.ClassificationType.typeAliasName]: "blue", - [ts.ClassificationType.parameterName]: "blue", - [ts.ClassificationType.docCommentTagName]: "green", - [ts.ClassificationType.jsxOpenTagName]: "magenta", - [ts.ClassificationType.jsxCloseTagName]: "magenta", - [ts.ClassificationType.jsxSelfClosingTagName]: "magenta", - [ts.ClassificationType.jsxAttribute]: "blue", - [ts.ClassificationType.jsxText]: "white", - [ts.ClassificationType.jsxAttributeStringLiteralValue]: "red", - [ts.ClassificationType.bigintLiteral]: "white", -}; -function* iterateSpans(encodedSpans: number[]) { - for (let i = 0; i < encodedSpans.length; i += 3) { - yield { - start: encodedSpans[i], - length: encodedSpans[i + 1], - type: encodedSpans[i + 2] as ClassificationType, - }; - } -} -export async function interactiveFixValidator(service: LanguageService) { - const diagnostics = service.getProgram()?.getSemanticDiagnostics(); - const nonIsolatedErrors = diagnostics?.filter(d => !isolatedDeclarationsErrors.has(d.code)); - if (nonIsolatedErrors && nonIsolatedErrors.length !== 0) { - console.log(chalk.red("Fix caused new errors: ")); - nonIsolatedErrors.forEach(printDiagnostics); - const result = await inquirer.prompt([ - { - type: "confirm", - name: "fix", - message: "Revert fix:", - }, - ]); - if (result.fix) { - return false; - } - } - return true; -} diff --git a/external-declarations/src/code-mod/fixer/isolated-declarations-errors.ts b/external-declarations/src/code-mod/fixer/isolated-declarations-errors.ts deleted file mode 100644 index e933c29440287..0000000000000 --- a/external-declarations/src/code-mod/fixer/isolated-declarations-errors.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const isolatedDeclarationsErrors = new Set([ - 9007, - 9008, - 9009, - 9010, - 9011, -]); diff --git a/external-declarations/src/code-mod/fixer/snapshots.ts b/external-declarations/src/code-mod/fixer/snapshots.ts deleted file mode 100644 index 45ac164aaa279..0000000000000 --- a/external-declarations/src/code-mod/fixer/snapshots.ts +++ /dev/null @@ -1,125 +0,0 @@ -import type { - System, - TextSpan, -} from "typescript"; -import ts from "typescript"; - -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: 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/external-declarations/src/code-mod/fixer/utils.ts b/external-declarations/src/code-mod/fixer/utils.ts deleted file mode 100644 index 886105e320dba..0000000000000 --- a/external-declarations/src/code-mod/fixer/utils.ts +++ /dev/null @@ -1,23 +0,0 @@ -import chalk from "chalk"; -import * as path from "path"; -import { - Diagnostic, -} from "typescript"; - -export function printDiagnostics(diag: Diagnostic) { - const pos = getLineColumn(diag); - const relative = path.relative(process.cwd(), diag.file?.fileName!); - console.log(`${chalk.blueBright(relative)}:${pos.line}:${pos.col} - ${diag.messageText}`); -} - -export function getLineColumn(diag: Diagnostic) { - const text = diag.file?.text!; - let line = 1; - let lineStart = text.lastIndexOf("\n", diag.start); - const col = lineStart === -1 ? diag.start! : diag.start! - lineStart; - while (lineStart > 0) { - line++; - lineStart = text.lastIndexOf("\n", lineStart - 1); - } - return { line, col }; -} diff --git a/external-declarations/src/code-mod/fixer/watch.ts b/external-declarations/src/code-mod/fixer/watch.ts deleted file mode 100644 index 3b8a9bb4ab362..0000000000000 --- a/external-declarations/src/code-mod/fixer/watch.ts +++ /dev/null @@ -1,28 +0,0 @@ -import * as fs from "fs"; -import * as path from "path"; -import { - DocumentRegistry, - LanguageService, -} from "typescript"; - -import { - VersionedFileRegistry, -} from "./snapshots"; - -export function makeWatcher() { - let watcher: fs.FSWatcher | undefined; - async function startWatcher(_service: LanguageService, _documentRegistry: DocumentRegistry, files: VersionedFileRegistry) { - watcher = fs.watch("./", { recursive: true }, (ev, fileName) => { - if (ev === "change" && fileName) { - const normalizedPath = path.resolve(fileName).replaceAll("\\", "/"); - files.updateFromDisk(normalizedPath); - } - }); - } - return { - startWatcher, - close() { - watcher?.close(); - }, - }; -} diff --git a/external-declarations/src/code-mod/index.ts b/external-declarations/src/code-mod/index.ts deleted file mode 100644 index 1607925649879..0000000000000 --- a/external-declarations/src/code-mod/index.ts +++ /dev/null @@ -1,26 +0,0 @@ -import ts from "typescript"; - -import { - fixProject, -} from "./fixer/code-fixer-applier"; -import { - isolatedDeclarationsErrors, -} from "./fixer/isolated-declarations-errors"; - -(ts as any).Debug.enableDebugInfo(); - -async function main() { - const config = process.argv[2] ?? "./tsconfig.json"; - if (process.argv.includes("--interactive")) { - const { interactiveFixSelector, interactiveFixValidator } = await import("./fixer/interactive-fix-selector"); - const { makeWatcher } = await import("./fixer/watch"); - const watcher = makeWatcher(); - await fixProject(config, isolatedDeclarationsErrors, {}, interactiveFixSelector, interactiveFixValidator, watcher.startWatcher); - watcher.close(); - } - else { - await fixProject(config, isolatedDeclarationsErrors, {}, async () => 0); - } -} - -main(); diff --git a/external-declarations/src/code-mod/tsc-test-fixer/run-test-updater-parallel.ts b/external-declarations/src/code-mod/tsc-test-fixer/run-test-updater-parallel.ts deleted file mode 100644 index 07b86bc876a5c..0000000000000 --- a/external-declarations/src/code-mod/tsc-test-fixer/run-test-updater-parallel.ts +++ /dev/null @@ -1,90 +0,0 @@ -import * as childProcess from "child_process"; -import * as path from "path"; - -import { - ArgType, - parseArgs, -} from "../../utils/cli-parser"; - -interface ExecuteResult { - error: childProcess.ExecException | undefined; - stdout: string; - stderr: string; -} - -function exec(cmd: string, dir: string, onStdOut: (s: string) => void) { - return new Promise(resolve => { - console.log(`In ${dir} Executing: ${cmd}`); - - const ls = childProcess.spawn(cmd, [], { - cwd: path.resolve(path.join(process.cwd(), dir)), - shell: true, - }); - let stdout = ""; - let stderr = ""; - ls.stdout.on("data", data => { - if (!onStdOut) { - process.stdout.write(data.toString()); - } - else { - onStdOut(data.toString()); - } - stdout += data.toString(); - }); - - ls.stderr.on("data", data => { - process.stderr.write(data.toString()); - stderr += data.toString(); - }); - - ls.on("error", err => { - console.log(err); - }); - ls.on("exit", code => { - console.log("exited:" + code?.toString()); - resolve({ - error: !code ? undefined : Object.assign(new Error(""), { - code, - cmd, - }), - stderr, - stdout, - }); - }); - }); -} - -const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), { - default: { - type: ArgType.String(), - description: "Test filter to run", - }, - rootPaths: ArgType.StringArray(), - shardCount: ArgType.Number(), -}); -printUsageOnErrors(); - -const shardCount = parsedArgs.shardCount ?? 6; - -async function main() { - let runCount = 0; - const commandLine = `node ./build/code-mod/tsc-test-fixer/run-test-updater.js ${process.argv.slice(2).join(" ")} ${parsedArgs.shardCount === undefined ? `--shardCount=${shardCount} ` : ""}`; - let lastWrite = new Date().getTime(); - const startTime = new Date().getTime(); - const elapsedTime = (now: number) => `${((now - startTime) / 1000 / 60).toFixed(2)} minutes`; - const promisees = Array.from({ length: shardCount }).map(async (_, index) => { - await exec(commandLine + ` --shard=${index}`, "./", out => { - runCount += (out.match(/Ran:/g) || []).length; - if (new Date().getTime() - lastWrite > 2000) { - lastWrite = new Date().getTime(); - console.log(`Run count: ${runCount} after ${elapsedTime(lastWrite)}`); - } - }); - console.log(`Shard ${index} completed`); - }); - await Promise.all(promisees); - const endTime = new Date().getTime(); - console.log(`Took ${elapsedTime(endTime)} to complete ${runCount}`); -} - -main(); diff --git a/external-declarations/src/code-mod/tsc-test-fixer/run-test-updater.ts b/external-declarations/src/code-mod/tsc-test-fixer/run-test-updater.ts deleted file mode 100644 index 9e88b0be9405a..0000000000000 --- a/external-declarations/src/code-mod/tsc-test-fixer/run-test-updater.ts +++ /dev/null @@ -1,109 +0,0 @@ -import "source-map-support/register"; - -import * as fs from "fs/promises"; -import path, * as fsPath from "path"; -import ts from "typescript"; - -import { - normalizePath, -} from "../../compiler/path-utils"; -import { - loadTestCase, -} from "../../test-runner/utils"; -import { - ArgType, - parseArgs, - parserConfiguration, -} from "../../utils/cli-parser"; -import { - ensureDir, - readAllFiles, -} from "../../utils/fs-utils"; -import { - writeTestCase, -} from "./test-case-utils"; -import { - fixTestCase, -} from "./test-fixer"; - -(ts as any).Debug.enableDebugInfo(); - -export const testRunnerCLIConfiguration = parserConfiguration({ - default: { - type: ArgType.String(), - description: "Test filter to run", - }, - rootPaths: ArgType.StringArray(), - updatedOutputPath: ArgType.String(), - shard: ArgType.Number(), - shardCount: ArgType.Number(), -}); - -const excludeFilter = /\/fourslash\//; -const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), testRunnerCLIConfiguration); -printUsageOnErrors(); - -const rootCasePaths = parsedArgs.rootPaths ?? ["./tests/sources"]; - -const filter = parsedArgs.default ? new RegExp(parsedArgs.default) : /.*\.ts/; - -const shard = parsedArgs.shard; -const shardCount = parsedArgs.shardCount; - -const allTests = rootCasePaths - .flatMap(r => readAllFiles(r, filter).map(file => ({ file, root: r }))) - .filter(f => !excludeFilter.exec(f.file)); - -async function measureAndReport(name: string, fn: () => Promise) { - const start = Date.now(); - try { - return await fn(); - } - finally { - const time = Date.now() - start; - if (time > 300) { - console.log(`Test ${name} took ${time}`); - } - } -} -async function main() { - const testsPerShared = shardCount && Math.round(allTests.length / shardCount); - const [start, end] = shard === undefined || shardCount === undefined || testsPerShared === undefined ? - [0, allTests.length] : - [shard * testsPerShared, (shard === shardCount - 1) ? allTests.length : (shard + 1) * testsPerShared]; - - for (let count = start; count < end; count++) { - const testFile = normalizePath(allTests[count].file); - const rootPath = normalizePath(allTests[count].root); - const caseData = await loadTestCase(testFile); - - const updatedTestFileName = testFile.replace(rootPath, parsedArgs.updatedOutputPath ?? "./tsc-tests/updated-tests"); - const result = await measureAndReport(path.basename(testFile), () => fixTestCase(caseData, {})); - if (result instanceof Error) { - await ensureDir(fsPath.dirname(updatedTestFileName)); - await fs.writeFile( - updatedTestFileName, - ` -================= CODE MOD ERROR ============== -${result.message} -${result.stack} - -// ================== -// Original test file: ${testFile} -// ${caseData.code.split("\n").join("\n// ")} -`, - ); - continue; - } - await writeTestCase({ - ...caseData, - testUnitData: caseData.testUnitData.map(u => ({ - ...u, - content: result.find(o => o.unitName === u.name)?.content!, - })), - }, updatedTestFileName); - console.log(`Ran: ${count}`); - } -} - -main(); diff --git a/external-declarations/src/code-mod/tsc-test-fixer/test-case-utils.ts b/external-declarations/src/code-mod/tsc-test-fixer/test-case-utils.ts deleted file mode 100644 index dafe58bdacc4a..0000000000000 --- a/external-declarations/src/code-mod/tsc-test-fixer/test-case-utils.ts +++ /dev/null @@ -1,37 +0,0 @@ -import * as fs from "fs/promises"; -import * as fsPath from "path"; - -import { - splitContentByNewlines, - TestCaseContent, -} from "../../test-runner/tsc-infrastructure/test-file-parser"; -import { - ensureDir, -} from "../../utils/fs-utils"; - -export async function writeTestCase(testData: TestCaseContent & { BOM: string; }, path: string) { - await ensureDir(fsPath.dirname(path)); - await fs.writeFile(path, await testCaseToString(testData)); -} -export async function testCaseToString(testData: TestCaseContent & { BOM: string; }) { - const lines = splitContentByNewlines(testData.code); - const result: string[] = []; - let copyFrom = 0; - function pushFrom(target: string[], source: string[], from = 0, to: number = source.length) { - for (let i = from; i < to; i++) { - target.push(source[i]); - } - } - for (const file of testData.testUnitData) { - if (file.content === undefined) continue; - - pushFrom(result, lines, copyFrom, file.startLine); - - pushFrom(result, splitContentByNewlines(file.content)); - - copyFrom = file.endLine + 1; - } - pushFrom(result, lines, copyFrom, lines.length); - const content = testData.BOM + result.join(lines.delimiter); - return content; -} diff --git a/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts b/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts deleted file mode 100644 index bd9c2a1a8fe7b..0000000000000 --- a/external-declarations/src/code-mod/tsc-test-fixer/test-fixer.ts +++ /dev/null @@ -1,112 +0,0 @@ -import ts, { - DocumentRegistry, - Path, - SourceFile, -} from "typescript"; - -import { - prepareTestOptionsAndFs, - setCompilerOptionsFromHarnessSetting, - TestFile, -} from "../../test-runner/tsc-infrastructure/compiler-run"; -import * as fake from "../../test-runner/tsc-infrastructure/fakesHosts"; -import { - TestUnitData, -} from "../../test-runner/tsc-infrastructure/test-file-parser"; -import { - TestCaseWithBOM, -} from "../../test-runner/utils"; -import { - createLanguageHost, - fixProjectRaw, -} from "../fixer/code-fixer-applier"; -import { - isolatedDeclarationsErrors, -} from "../fixer/isolated-declarations-errors"; -import { - createSnapshotRegistry, -} from "../fixer/snapshots"; - -export async function fixTestCase(caseData: TestCaseWithBOM, settings: ts.CompilerOptions) { - settings = { ...settings }; - setCompilerOptionsFromHarnessSetting(caseData.settings, settings); - - function createHarnessTestFile(lastUnit: TestUnitData): TestFile { - return { unitName: lastUnit.name, content: lastUnit.content, fileOptions: lastUnit.fileOptions }; - } - - const toBeCompiled = caseData.testUnitData.map(unit => { - return createHarnessTestFile(unit); - }); - - try { - return await fixTestFiles(toBeCompiled, settings); - } - catch (e) { - return e as Error; - } -} - -export interface ExternalDocumentCache { - setDocument(key: string, path: Path, sourceFile: SourceFile): void; - getDocument(key: string, path: Path): SourceFile | undefined; -} -const cache = new Map>(); -const isCashablePath = (path: string) => path.startsWith("/.ts") || path.startsWith("/.lib"); -const registry: ExternalDocumentCache = { - getDocument(key, path) { - if (!isCashablePath(path)) return; - const sourceFile = cache.get(key)?.get(path); - return sourceFile; - }, - setDocument(key, path, sourceFile) { - if (!isCashablePath(path)) return; - let byKey = cache.get(key); - if (!byKey) { - cache.set(key, byKey = new Map()); - } - byKey.set(path, sourceFile); - }, -}; -const createDocumentRegistryInternal: (...a: [...a: Parameters, externalCache?: ExternalDocumentCache]) => DocumentRegistry = (ts as any).createDocumentRegistryInternal; - -async function fixTestFiles(toBeCompiled: TestFile[], settings: ts.CompilerOptions) { - const { fs, options, programFileNames } = prepareTestOptionsAndFs( - toBeCompiled, - [], - { - declaration: "true", - isolatedDeclarations: "true", - removeComments: "false", - }, - settings, - /**currentDirectory=*/ undefined, - ); - const host = new fake.CompilerHost(fs, options); - - const snapShotRegistry = createSnapshotRegistry(host); - const langHost = createLanguageHost(snapShotRegistry, { - fileNames: programFileNames, - options, - errors: [], - }, host); - - await fixProjectRaw( - langHost, - createDocumentRegistryInternal( - host.useCaseSensitiveFileNames(), - host.getCurrentDirectory(), - /*jsDocParsingMode*/ undefined, - registry, - ), - snapShotRegistry, - isolatedDeclarationsErrors, - { includeRelativeTypeFixes: false, includeInlineTypeFixes: false }, - () => 0, - ); - - return toBeCompiled.map(unit => ({ - ...unit, - content: fs.readFileSync(unit.unitName, "utf-8"), - })); -} diff --git a/external-declarations/src/compiler/debug.ts b/external-declarations/src/compiler/debug.ts deleted file mode 100644 index 7bbe782ec6462..0000000000000 --- a/external-declarations/src/compiler/debug.ts +++ /dev/null @@ -1,28 +0,0 @@ -type AnyFunction = (...a: any) => any; -/** @internal */ -export namespace Debug { - export function fail(message?: string, stackCrawlMark?: AnyFunction): never { - // eslint-disable-next-line no-debugger - debugger; - const e = new Error(message ? `Debug Failure. ${message}` : "Debug Failure."); - if ((Error as any).captureStackTrace) { - (Error as any).captureStackTrace(e, stackCrawlMark || fail); - } - throw e; - } - - export function assert(expression: unknown, message?: string, verboseDebugInfo?: string | (() => string), stackCrawlMark?: AnyFunction): asserts expression { - if (!expression) { - message = message ? `False expression: ${message}` : "False expression."; - if (verboseDebugInfo) { - message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo()); - } - fail(message, stackCrawlMark || assert); - } - } - - export function assertNever(member: never, message = "Illegal value:", stackCrawlMark?: AnyFunction): never { - const detail = JSON.stringify(member); - return fail(`${message} ${detail}`, stackCrawlMark || assertNever); - } -} diff --git a/external-declarations/src/compiler/lang-utils.ts b/external-declarations/src/compiler/lang-utils.ts deleted file mode 100644 index 77336aacfd812..0000000000000 --- a/external-declarations/src/compiler/lang-utils.ts +++ /dev/null @@ -1,826 +0,0 @@ -import { - MapLike, - SortedArray, - SortedReadonlyArray, -} from "typescript"; - -export type Mutable = { -readonly [K in keyof T]: T[K]; }; - -/** @internal */ -export type EqualityComparer = (a: T, b: T) => boolean; - -/** @internal */ -export type Comparer = (a: T, b: T) => Comparison; - -export function forEach(array: readonly T[] | undefined, callback: (element: T, index: number) => U | undefined): U | undefined { - if (array) { - for (let i = 0; i < array.length; i++) { - const result = callback(array[i], i); - if (result) { - return result; - } - } - } - return undefined; -} - -/** @internal */ -export function some(array: readonly T[] | undefined): array is readonly T[]; -/** @internal */ -export function some(array: readonly T[] | undefined, predicate: (value: T) => boolean): boolean; -/** @internal */ -export function some(array: readonly T[] | undefined, predicate?: (value: T) => boolean): boolean { - if (array) { - if (predicate) { - for (const v of array) { - if (predicate(v)) { - return true; - } - } - } - else { - return array.length > 0; - } - } - return false; -} - -/** @internal */ -export function stringContains(str: string, substring: string): boolean { - return str.indexOf(substring) !== -1; -} - -/** - * @return Whether the value was added. - * - * @internal - */ -export function pushIfUnique(array: T[], toAdd: T, equalityComparer?: EqualityComparer): boolean { - if (contains(array, toAdd, equalityComparer)) { - return false; - } - else { - array.push(toAdd); - return true; - } -} - -/** @internal */ -export function contains(array: readonly T[] | undefined, value: T, equalityComparer: EqualityComparer = equateValues): boolean { - if (array) { - for (const v of array) { - if (equalityComparer(v, value)) { - return true; - } - } - } - return false; -} - -/** @internal */ -export const enum Comparison { - LessThan = -1, - EqualTo = 0, - GreaterThan = 1, -} -export function equateValues(a: T, b: T) { - return a === b; -} - -/** @internal */ -export function length(array: readonly any[] | undefined): number { - return array ? array.length : 0; -} - -/** - * Flattens an array containing a mix of array or non-array elements. - * - * @param array The array to flatten. - * - * @internal - */ -export function flatten(array: T[][] | readonly (T | readonly T[] | undefined)[]): T[] { - const result: T[] = []; - for (const v of array) { - if (v) { - if (isArray(v)) { - addRange(result, v); - } - else { - result.push(v); - } - } - } - return result; -} - -/** - * Tests whether a value is an array. - * - * @internal - */ -export function isArray(value: any): value is readonly unknown[] { - return Array.isArray ? Array.isArray(value) : value instanceof Array; -} - -/** - * Appends a range of value to an array, returning the array. - * - * @param to The array to which `value` is to be appended. If `to` is `undefined`, a new array - * is created if `value` was appended. - * @param from The values to append to the array. If `from` is `undefined`, nothing is - * appended. If an element of `from` is `undefined`, that element is not appended. - * @param start The offset in `from` at which to start copying values. - * @param end The offset in `from` at which to stop copying values (non-inclusive). - * - * @internal - */ -export function addRange(to: T[], from: readonly T[] | undefined, start?: number, end?: number): T[]; -/** @internal */ -export function addRange(to: T[] | undefined, from: readonly T[] | undefined, start?: number, end?: number): T[] | undefined; -/** @internal */ -export function addRange(to: T[] | undefined, from: readonly T[] | undefined, start?: number, end?: number): T[] | undefined { - if (from === undefined || from.length === 0) return to; - if (to === undefined) return from.slice(start, end); - start = start === undefined ? 0 : toOffset(from, start); - end = end === undefined ? from.length : toOffset(from, end); - for (let i = start; i < end && i < from.length; i++) { - if (from[i] !== undefined) { - to.push(from[i]); - } - } - return to; -} - -/** - * Gets the actual offset into an array for a relative offset. Negative offsets indicate a - * position offset from the end of the array. - */ -function toOffset(array: readonly any[], offset: number) { - return offset < 0 ? array.length + offset : offset; -} - -/** @internal */ -export function map(array: readonly T[], f: (x: T, i: number) => U): U[]; -/** @internal */ -export function map(array: readonly T[] | undefined, f: (x: T, i: number) => U): U[] | undefined; -/** @internal */ -export function map(array: readonly T[] | undefined, f: (x: T, i: number) => U): U[] | undefined { - let result: U[] | undefined; - if (array) { - result = []; - for (let i = 0; i < array.length; i++) { - result.push(f(array[i], i)); - } - } - return result; -} - -/** - * Compacts an array, removing any falsey elements. - * - * @internal - */ -export function compact(array: (T | undefined | null | false | 0 | "")[]): T[]; -/** @internal */ -export function compact(array: readonly (T | undefined | null | false | 0 | "")[]): readonly T[]; -// ESLint thinks these can be combined with the above - they cannot; they'd produce higher-priority inferences and prevent the falsey types from being stripped -/** @internal */ -export function compact(array: T[]): T[]; // eslint-disable-line @typescript-eslint/unified-signatures -/** @internal */ -export function compact(array: readonly T[]): readonly T[]; // eslint-disable-line @typescript-eslint/unified-signatures -/** @internal */ -export function compact(array: T[]): T[] { - let result: T[] | undefined; - if (array) { - for (let i = 0; i < array.length; i++) { - const v = array[i]; - if (result || !v) { - if (!result) { - result = array.slice(0, i); - } - if (v) { - result.push(v); - } - } - } - } - return result || array; -} - -/** @internal */ -export const emptyArray: never[] = [] as never[]; - -/** - * Appends a value to an array, returning the array. - * - * @param to The array to which `value` is to be appended. If `to` is `undefined`, a new array - * is created if `value` was appended. - * @param value The value to append to the array. If `value` is `undefined`, nothing is - * appended. - * - * @internal - */ -export function append[number] | undefined>(to: TArray, value: TValue): [undefined, undefined] extends [TArray, TValue] ? TArray : NonNullable[number][]; -/** @internal */ -export function append(to: T[], value: T | undefined): T[]; -/** @internal */ -export function append(to: T[] | undefined, value: T): T[]; -/** @internal */ -export function append(to: T[] | undefined, value: T | undefined): T[] | undefined; -/** @internal */ -export function append(to: Push, value: T | undefined): void; -/** @internal */ -export function append(to: T[], value: T | undefined): T[] | undefined { - if (value === undefined) return to; - if (to === undefined) return [value]; - to.push(value); - return to; -} - -/** Array that is only intended to be pushed to, never read. */ -export interface Push { - push(...values: T[]): void; - /** @internal */ readonly length: number; -} - -/** - * Stable sort of an array. Elements equal to each other maintain their relative position in the array. - * - * @internal - */ -export function stableSort(array: readonly T[], comparer: Comparer): SortedReadonlyArray { - const indices = indicesOf(array); - stableSortIndices(array, indices, comparer); - return indices.map(i => array[i]) as SortedArray as SortedReadonlyArray; -} -function selectIndex(_: unknown, i: number) { - return i; -} - -function stableSortIndices(array: readonly T[], indices: number[], comparer: Comparer) { - // sort indices by value then position - indices.sort((x, y) => comparer(array[x], array[y]) || compareValues(x, y)); -} - -/** - * Works like Array.prototype.find, returning `undefined` if no element satisfying the predicate is found. - * - * @internal - */ -export function find(array: readonly T[] | undefined, predicate: (element: T, index: number) => element is U, startIndex?: number): U | undefined; -/** @internal */ -export function find(array: readonly T[] | undefined, predicate: (element: T, index: number) => boolean, startIndex?: number): T | undefined; -/** @internal */ -export function find(array: readonly T[] | undefined, predicate: (element: T, index: number) => boolean, startIndex?: number): T | undefined { - if (array === undefined) return undefined; - for (let i = startIndex ?? 0; i < array.length; i++) { - const value = array[i]; - if (predicate(value, i)) { - return value; - } - } - return undefined; -} - -/** - * Returns the last element of an array if non-empty, `undefined` otherwise. - * - * @internal - */ -export function lastOrUndefined(array: readonly T[] | undefined): T | undefined { - return array === undefined || array.length === 0 ? undefined : array[array.length - 1]; -} - -/** @internal */ -export function last(array: readonly T[]): T { - return array[array.length - 1]; -} - -/** @internal */ -export function indicesOf(array: readonly unknown[]): number[] { - return array.map(selectIndex); -} - -/** @internal */ -export function findLastIndex(array: readonly T[] | undefined, predicate: (element: T, index: number) => boolean, startIndex?: number): number { - if (array === undefined) return -1; - for (let i = startIndex ?? array.length - 1; i >= 0; i--) { - if (predicate(array[i], i)) { - return i; - } - } - return -1; -} - -/** - * Compare the equality of two strings using a case-sensitive ordinal comparison. - * - * Case-sensitive comparisons compare both strings one code-point at a time using the integer - * value of each code-point after applying `toUpperCase` to each string. We always map both - * strings to their upper-case form as some unicode characters do not properly round-trip to - * lowercase (such as `ẞ` (German sharp capital s)). - * - * @internal - */ -export function equateStringsCaseInsensitive(a: string, b: string) { - return a === b - || a !== undefined - && b !== undefined - && a.toUpperCase() === b.toUpperCase(); -} - -/** - * Compare the equality of two strings using a case-sensitive ordinal comparison. - * - * Case-sensitive comparisons compare both strings one code-point at a time using the - * integer value of each code-point. - * - * @internal - */ -export function equateStringsCaseSensitive(a: string, b: string) { - return equateValues(a, b); -} - -function compareComparableValues(a: string | undefined, b: string | undefined): Comparison; -function compareComparableValues(a: number | undefined, b: number | undefined): Comparison; -function compareComparableValues(a: string | number | undefined, b: string | number | undefined) { - return a === b ? Comparison.EqualTo : - a === undefined ? Comparison.LessThan : - b === undefined ? Comparison.GreaterThan : - a < b ? Comparison.LessThan : - Comparison.GreaterThan; -} - -/** - * Compare two numeric values for their order relative to each other. - * To compare strings, use any of the `compareStrings` functions. - * - * @internal - */ -export function compareValues(a: number | undefined, b: number | undefined): Comparison { - return compareComparableValues(a, b); -} - -/** - * Compare two strings using a case-insensitive ordinal comparison. - * - * Ordinal comparisons are based on the difference between the unicode code points of both - * strings. Characters with multiple unicode representations are considered unequal. Ordinal - * comparisons provide predictable ordering, but place "a" after "B". - * - * Case-insensitive comparisons compare both strings one code-point at a time using the integer - * value of each code-point after applying `toUpperCase` to each string. We always map both - * strings to their upper-case form as some unicode characters do not properly round-trip to - * lowercase (such as `ẞ` (German sharp capital s)). - * - * @internal - */ -export function compareStringsCaseInsensitive(a: string, b: string) { - if (a === b) return Comparison.EqualTo; - if (a === undefined) return Comparison.LessThan; - if (b === undefined) return Comparison.GreaterThan; - a = a.toUpperCase(); - b = b.toUpperCase(); - return a < b ? Comparison.LessThan : a > b ? Comparison.GreaterThan : Comparison.EqualTo; -} - -/** - * Compare two strings using a case-sensitive ordinal comparison. - * - * Ordinal comparisons are based on the difference between the unicode code points of both - * strings. Characters with multiple unicode representations are considered unequal. Ordinal - * comparisons provide predictable ordering, but place "a" after "B". - * - * Case-sensitive comparisons compare both strings one code-point at a time using the integer - * value of each code-point. - * - * @internal - */ -export function compareStringsCaseSensitive(a: string | undefined, b: string | undefined): Comparison { - return compareComparableValues(a, b); -} - -/** @internal */ -export function getStringComparer(ignoreCase?: boolean) { - return ignoreCase ? compareStringsCaseInsensitive : compareStringsCaseSensitive; -} - -/** - * Iterates through `array` by index and performs the callback on each element of array until the callback - * returns a falsey value, then returns false. - * If no such value is found, the callback is applied to each element of array and `true` is returned. - * - * @internal - */ -export function every(array: readonly T[] | undefined, callback: (element: T, index: number) => boolean): boolean { - if (array) { - for (let i = 0; i < array.length; i++) { - if (!callback(array[i], i)) { - return false; - } - } - } - - return true; -} - -/** @internal */ -export function mapDefined(array: readonly T[] | undefined, mapFn: (x: T, i: number) => U | undefined): U[] { - const result: U[] = []; - if (array) { - for (let i = 0; i < array.length; i++) { - const mapped = mapFn(array[i], i); - if (mapped !== undefined) { - result.push(mapped); - } - } - } - return result; -} - -/** - * Shims `Array.from`. - * - * @internal - */ -export function arrayFrom(iterator: Iterator | IterableIterator, map: (t: T) => U): U[]; -/** @internal */ -export function arrayFrom(iterator: Iterator | IterableIterator): T[]; -/** @internal */ -export function arrayFrom(iterator: Iterator | IterableIterator, map?: (t: T) => U): (T | U)[] { - const result: (T | U)[] = []; - for (let iterResult = iterator.next(); !iterResult.done; iterResult = iterator.next()) { - result.push(map ? map(iterResult.value) : iterResult.value); - } - return result; -} - -/** @internal */ -export function startsWith(str: string, prefix: string): boolean { - return str.lastIndexOf(prefix, 0) === 0; -} - -/** @internal */ -export function endsWith(str: string, suffix: string): boolean { - const expectedPos = str.length - suffix.length; - return expectedPos >= 0 && str.indexOf(suffix, expectedPos) === expectedPos; -} - -/** @internal */ -export function removeSuffix(str: string, suffix: string): string { - return endsWith(str, suffix) ? str.slice(0, str.length - suffix.length) : str; -} - -/** @internal */ -export function tryRemoveSuffix(str: string, suffix: string): string | undefined { - return endsWith(str, suffix) ? str.slice(0, str.length - suffix.length) : undefined; -} - -/** - * Returns lower case string - * - * @internal - */ -export function toLowerCase(x: string) { - return x.toLowerCase(); -} - -/** - * Returns its argument. - * - * @internal - */ -export function identity(x: T) { - return x; -} - -/** - * Remove an item from an array, moving everything to its right one space left. - * - * @internal - */ -export function orderedRemoveItem(array: T[], item: T): boolean { - for (let i = 0; i < array.length; i++) { - if (array[i] === item) { - orderedRemoveItemAt(array, i); - return true; - } - } - return false; -} - -/** - * Remove an item by index from an array, moving everything to its right one space left. - * - * @internal - */ -export function orderedRemoveItemAt(array: T[], index: number): void { - // This seems to be faster than either `array.splice(i, 1)` or `array.copyWithin(i, i+ 1)`. - for (let i = index; i < array.length - 1; i++) { - array[i] = array[i + 1]; - } - array.pop(); -} - -export function getEntries(obj: MapLike): [string, T][] { - return obj ? _entries(obj) : []; -} - -const _entries = Object.entries || ((obj: MapLike) => { - const keys = getOwnKeys(obj); - const result: [string, T][] = Array(keys.length); - for (let i = 0; i < keys.length; i++) { - result[i] = [keys[i], obj[keys[i]]]; - } - return result; -}); - -const hasOwnProperty = Object.prototype.hasOwnProperty; - -/** - * Indicates whether a map-like contains an own property with the specified key. - * - * @param map A map-like. - * @param key A property key. - * - * @internal - */ -export function hasProperty(map: T, key: K): map is Extract>>; -export function hasProperty(map: MapLike, key: string): boolean; -export function hasProperty(map: MapLike, key: string): boolean { - return hasOwnProperty.call(map, key); -} - -/** - * Gets the owned, enumerable property keys of a map-like. - * - * @internal - */ -export function getOwnKeys(map: MapLike): string[] { - const keys: string[] = []; - for (const key in map) { - if (hasOwnProperty.call(map, key)) { - keys.push(key); - } - } - - return keys; -} - -/** @internal */ -export function tryCast(value: TIn | undefined, test: (value: TIn) => value is TOut): TOut | undefined; -/** @internal */ -export function tryCast(value: T, test: (value: T) => boolean): T | undefined; -/** @internal */ -export function tryCast(value: T, test: (value: T) => boolean): T | undefined { - return value !== undefined && test(value) ? value : undefined; -} - -/** - * Like `forEach`, but suitable for use with numbers and strings (which may be falsy). - * - * @internal - */ -export function firstDefined(array: readonly T[] | undefined, callback: (element: T, index: number) => U | undefined): U | undefined { - if (array === undefined) { - return undefined; - } - - for (let i = 0; i < array.length; i++) { - const result = callback(array[i], i); - if (result !== undefined) { - return result; - } - } - return undefined; -} - -/** - * True is greater than false. - * - * @internal - */ -export function compareBooleans(a: boolean, b: boolean): Comparison { - return compareValues(a ? 1 : 0, b ? 1 : 0); -} - -/** - * Tests whether a value is string - * - * @internal - */ -export function isString(text: unknown): text is string { - return typeof text === "string"; -} -/** @internal */ -export function isNumber(x: unknown): x is number { - return typeof x === "number"; -} - -/** - * patternOrStrings contains both patterns (containing "*") and regular strings. - * Return an exact match if possible, or a pattern match, or undefined. - * (These are verified by verifyCompilerOptions to have 0 or 1 "*" characters.) - * - * @internal - */ -export function matchPatternOrExact(patternOrStrings: readonly (string | Pattern)[], candidate: string): string | Pattern | undefined { - const patterns: Pattern[] = []; - for (const patternOrString of patternOrStrings) { - if (patternOrString === candidate) { - return candidate; - } - - if (!isString(patternOrString)) { - patterns.push(patternOrString); - } - } - - return findBestPatternMatch(patterns, _ => _, candidate); -} - -/** - * Represents a "prefix*suffix" pattern. - * - * @internal - */ -export interface Pattern { - prefix: string; - suffix: string; -} - -/** - * Return the object corresponding to the best pattern to match `candidate`. - * - * @internal - */ -export function findBestPatternMatch(values: readonly T[], getPattern: (value: T) => Pattern, candidate: string): T | undefined { - let matchedValue: T | undefined; - // use length of prefix as betterness criteria - let longestMatchPrefixLength = -1; - - for (const v of values) { - const pattern = getPattern(v); - if (isPatternMatch(pattern, candidate) && pattern.prefix.length > longestMatchPrefixLength) { - longestMatchPrefixLength = pattern.prefix.length; - matchedValue = v; - } - } - - return matchedValue; -} - -/** @internal */ -export function isPatternMatch({ prefix, suffix }: Pattern, candidate: string) { - return candidate.length >= prefix.length + suffix.length && - startsWith(candidate, prefix) && - endsWith(candidate, suffix); -} - -/** @internal */ -export function tryParsePatterns(paths: MapLike): (string | Pattern)[] { - return mapDefined(getOwnKeys(paths), path => tryParsePattern(path)); -} -/** - * Returns the input if there are no stars, a pattern if there is exactly one, - * and undefined if there are more. - * - * @internal - */ -export function tryParsePattern(pattern: string): string | Pattern | undefined { - const indexOfStar = pattern.indexOf("*"); - if (indexOfStar === -1) { - return pattern; - } - return pattern.indexOf("*", indexOfStar + 1) !== -1 - ? undefined - : { - prefix: pattern.substr(0, indexOfStar), - suffix: pattern.substr(indexOfStar + 1), - }; -} - -/** @internal */ -export function min(items: readonly [T, ...T[]], compare: Comparer): T; -/** @internal */ -export function min(items: readonly T[], compare: Comparer): T | undefined; -/** @internal */ -export function min(items: readonly T[], compare: Comparer): T | undefined { - return reduceLeft(items, (x, y) => compare(x, y) === Comparison.LessThan ? x : y); -} - -/** @internal */ -export function reduceLeft(array: readonly T[] | undefined, f: (memo: U, value: T, i: number) => U, initial: U, start?: number, count?: number): U; -/** @internal */ -export function reduceLeft(array: readonly T[], f: (memo: T, value: T, i: number) => T): T | undefined; -/** @internal */ -export function reduceLeft(array: T[], f: (memo: T, value: T, i: number) => T, initial?: T, start?: number, count?: number): T | undefined { - if (array && array.length > 0) { - const size = array.length; - if (size > 0) { - let pos = start === undefined || start < 0 ? 0 : start; - const end = count === undefined || pos + count > size - 1 ? size - 1 : pos + count; - let result: T; - if (arguments.length <= 2) { - result = array[pos]; - pos++; - } - else { - result = initial!; - } - while (pos <= end) { - result = f(result, array[pos], pos); - pos++; - } - return result; - } - } - return initial; -} - -export const trimString = (s: string) => s.trim(); - -export function isNullOrUndefined(x: any): x is null | undefined { - return x === undefined || x === null; // eslint-disable-line no-null/no-null -} - -/** - * Performs a binary search, finding the index at which `value` occurs in `array`. - * If no such index is found, returns the 2's-complement of first index at which - * `array[index]` exceeds `value`. - * @param array A sorted array whose first element must be no larger than number - * @param value The value to be searched for in the array. - * @param keySelector A callback used to select the search key from `value` and each element of - * `array`. - * @param keyComparer A callback used to compare two keys in a sorted array. - * @param offset An offset into `array` at which to start the search. - * - * @internal - */ -export function binarySearch(array: readonly T[], value: T, keySelector: (v: T) => U, keyComparer: Comparer, offset?: number): number { - return binarySearchKey(array, keySelector(value), keySelector, keyComparer, offset); -} - -/** - * Performs a binary search, finding the index at which an object with `key` occurs in `array`. - * If no such index is found, returns the 2's-complement of first index at which - * `array[index]` exceeds `key`. - * @param array A sorted array whose first element must be no larger than number - * @param key The key to be searched for in the array. - * @param keySelector A callback used to select the search key from each element of `array`. - * @param keyComparer A callback used to compare two keys in a sorted array. - * @param offset An offset into `array` at which to start the search. - * - * @internal - */ -export function binarySearchKey(array: readonly T[], key: U, keySelector: (v: T, i: number) => U, keyComparer: Comparer, offset?: number): number { - if (!some(array)) { - return -1; - } - - let low = offset || 0; - let high = array.length - 1; - while (low <= high) { - const middle = low + ((high - low) >> 1); - const midKey = keySelector(array[middle], middle); - switch (keyComparer(midKey, key)) { - case Comparison.LessThan: - low = middle + 1; - break; - case Comparison.EqualTo: - return middle; - case Comparison.GreaterThan: - high = middle - 1; - break; - } - } - - return ~low; -} - -/** - * Works like Array.prototype.findIndex, returning `-1` if no element satisfying the predicate is found. - * - * @internal - */ -export function findIndex(array: readonly T[] | undefined, predicate: (element: T, index: number) => boolean, startIndex?: number): number { - if (array === undefined) return -1; - for (let i = startIndex ?? 0; i < array.length; i++) { - if (predicate(array[i], i)) { - return i; - } - } - return -1; -} - -/** @internal */ -export function clone(object: T): T { - const result: any = {}; - for (const id in object) { - if (hasOwnProperty.call(object, id)) { - result[id] = (object as any)[id]; - } - } - return result; -} diff --git a/external-declarations/src/compiler/path-utils.ts b/external-declarations/src/compiler/path-utils.ts deleted file mode 100644 index b194bbab5a186..0000000000000 --- a/external-declarations/src/compiler/path-utils.ts +++ /dev/null @@ -1,897 +0,0 @@ -import { - Extension, - Path, -} from "typescript"; - -import { - Debug, -} from "./debug"; -import { - compareStringsCaseInsensitive, - compareStringsCaseSensitive, - compareValues, - Comparison, - endsWith, - equateStringsCaseInsensitive, - equateStringsCaseSensitive, - getStringComparer, - identity, - lastOrUndefined, - some, - startsWith, - stringContains, - toLowerCase, -} from "./lang-utils"; -import { - CharacterCodes, - GetCanonicalFileName, -} from "./types"; - -/** - * Internally, we represent paths as strings with '/' as the directory separator. - * When we make system calls (eg: LanguageServiceHost.getDirectory()), - * we expect the host to correctly handle paths in our specified format. - * - * @internal - */ -const directorySeparator = "/"; -/** @internal */ -const altDirectorySeparator = "\\"; -const urlSchemeSeparator = "://"; -const backslashRegExp = /\\/g; - -//// Path Tests - -/** - * Determines whether a charCode corresponds to `/` or `\`. - * - * @internal - */ -function isAnyDirectorySeparator(charCode: number): boolean { - return charCode === CharacterCodes.slash || charCode === CharacterCodes.backslash; -} - -/** - * Determines whether a path is an absolute disk path (e.g. starts with `/`, or a dos path - * like `c:`, `c:\` or `c:/`). - * - * @internal - */ -export function isRootedDiskPath(path: string) { - return getEncodedRootLength(path) > 0; -} - -/** - * Determines whether a path consists only of a path root. - * - * @internal - */ -export function isDiskPathRoot(path: string) { - const rootLength = getEncodedRootLength(path); - return rootLength > 0 && rootLength === path.length; -} - -/** @internal */ -export function hasExtension(fileName: string): boolean { - return stringContains(getBaseFileName(fileName), "."); -} - -/** @internal */ -export function fileExtensionIs(path: string, extension: string): boolean { - return path.length > extension.length && endsWith(path, extension); -} - -/** @internal */ -export function fileExtensionIsOneOf(path: string, extensions: readonly string[]): boolean { - for (const extension of extensions) { - if (fileExtensionIs(path, extension)) { - return true; - } - } - - return false; -} - -/** - * Determines whether a path has a trailing separator (`/` or `\\`). - * - * @internal - */ -function hasTrailingDirectorySeparator(path: string) { - return path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1)); -} - -//// Path Parsing - -function isVolumeCharacter(charCode: number) { - return (charCode >= CharacterCodes.a && charCode <= CharacterCodes.z) || - (charCode >= CharacterCodes.A && charCode <= CharacterCodes.Z); -} - -function getFileUrlVolumeSeparatorEnd(url: string, start: number) { - const ch0 = url.charCodeAt(start); - if (ch0 === CharacterCodes.colon) return start + 1; - if (ch0 === CharacterCodes.percent && url.charCodeAt(start + 1) === CharacterCodes._3) { - const ch2 = url.charCodeAt(start + 2); - if (ch2 === CharacterCodes.a || ch2 === CharacterCodes.A) return start + 3; - } - return -1; -} - -/** - * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). - * If the root is part of a URL, the twos-complement of the root length is returned. - */ -function getEncodedRootLength(path: string): number { - if (!path) return 0; - const ch0 = path.charCodeAt(0); - - // POSIX or UNC - if (ch0 === CharacterCodes.slash || ch0 === CharacterCodes.backslash) { - if (path.charCodeAt(1) !== ch0) return 1; // POSIX: "/" (or non-normalized "\") - - const p1 = path.indexOf(ch0 === CharacterCodes.slash ? directorySeparator : altDirectorySeparator, 2); - if (p1 < 0) return path.length; // UNC: "//server" or "\\server" - - return p1 + 1; // UNC: "//server/" or "\\server\" - } - - // DOS - if (isVolumeCharacter(ch0) && path.charCodeAt(1) === CharacterCodes.colon) { - const ch2 = path.charCodeAt(2); - if (ch2 === CharacterCodes.slash || ch2 === CharacterCodes.backslash) return 3; // DOS: "c:/" or "c:\" - if (path.length === 2) return 2; // DOS: "c:" (but not "c:d") - } - - // URL - const schemeEnd = path.indexOf(urlSchemeSeparator); - if (schemeEnd !== -1) { - const authorityStart = schemeEnd + urlSchemeSeparator.length; - const authorityEnd = path.indexOf(directorySeparator, authorityStart); - if (authorityEnd !== -1) { // URL: "file:///", "file://server/", "file://server/path" - // For local "file" URLs, include the leading DOS volume (if present). - // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a - // special case interpreted as "the machine from which the URL is being interpreted". - const scheme = path.slice(0, schemeEnd); - const authority = path.slice(authorityStart, authorityEnd); - if ( - scheme === "file" && (authority === "" || authority === "localhost") && - isVolumeCharacter(path.charCodeAt(authorityEnd + 1)) - ) { - const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); - if (volumeSeparatorEnd !== -1) { - if (path.charCodeAt(volumeSeparatorEnd) === CharacterCodes.slash) { - // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/" - return ~(volumeSeparatorEnd + 1); - } - if (volumeSeparatorEnd === path.length) { - // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a" - // but not "file:///c:d" or "file:///c%3ad" - return ~volumeSeparatorEnd; - } - } - } - return ~(authorityEnd + 1); // URL: "file://server/", "http://server/" - } - return ~path.length; // URL: "file://server", "http://server" - } - - // relative - return 0; -} - -/** - * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). - * - * For example: - * ```ts - * getRootLength("a") === 0 // "" - * getRootLength("/") === 1 // "/" - * getRootLength("c:") === 2 // "c:" - * getRootLength("c:d") === 0 // "" - * getRootLength("c:/") === 3 // "c:/" - * getRootLength("c:\\") === 3 // "c:\\" - * getRootLength("//server") === 7 // "//server" - * getRootLength("//server/share") === 8 // "//server/" - * getRootLength("\\\\server") === 7 // "\\\\server" - * getRootLength("\\\\server\\share") === 8 // "\\\\server\\" - * getRootLength("file:///path") === 8 // "file:///" - * getRootLength("file:///c:") === 10 // "file:///c:" - * getRootLength("file:///c:d") === 8 // "file:///" - * getRootLength("file:///c:/path") === 11 // "file:///c:/" - * getRootLength("file://server") === 13 // "file://server" - * getRootLength("file://server/path") === 14 // "file://server/" - * getRootLength("http://server") === 13 // "http://server" - * getRootLength("http://server/path") === 14 // "http://server/" - * ``` - * - * @internal - */ -function getRootLength(path: string) { - const rootLength = getEncodedRootLength(path); - return rootLength < 0 ? ~rootLength : rootLength; -} - -/** - * Returns the path except for its basename. Semantics align with NodeJS's `path.dirname` - * except that we support URLs as well. - * - * ```ts - * // POSIX - * getDirectoryPath("/path/to/file.ext") === "/path/to" - * getDirectoryPath("/path/to/") === "/path" - * getDirectoryPath("/") === "/" - * // DOS - * getDirectoryPath("c:/path/to/file.ext") === "c:/path/to" - * getDirectoryPath("c:/path/to/") === "c:/path" - * getDirectoryPath("c:/") === "c:/" - * getDirectoryPath("c:") === "c:" - * // URL - * getDirectoryPath("http://typescriptlang.org/path/to/file.ext") === "http://typescriptlang.org/path/to" - * getDirectoryPath("http://typescriptlang.org/path/to") === "http://typescriptlang.org/path" - * getDirectoryPath("http://typescriptlang.org/") === "http://typescriptlang.org/" - * getDirectoryPath("http://typescriptlang.org") === "http://typescriptlang.org" - * ``` - * - * @internal - */ -export function getDirectoryPath(path: Path): Path; -/** - * Returns the path except for its basename. Semantics align with NodeJS's `path.dirname` - * except that we support URLs as well. - * - * ```ts - * // POSIX - * getDirectoryPath("/path/to/file.ext") === "/path/to" - * getDirectoryPath("/path/to/") === "/path" - * getDirectoryPath("/") === "/" - * // DOS - * getDirectoryPath("c:/path/to/file.ext") === "c:/path/to" - * getDirectoryPath("c:/path/to/") === "c:/path" - * getDirectoryPath("c:/") === "c:/" - * getDirectoryPath("c:") === "c:" - * // URL - * getDirectoryPath("http://typescriptlang.org/path/to/file.ext") === "http://typescriptlang.org/path/to" - * getDirectoryPath("http://typescriptlang.org/path/to") === "http://typescriptlang.org/path" - * getDirectoryPath("http://typescriptlang.org/") === "http://typescriptlang.org/" - * getDirectoryPath("http://typescriptlang.org") === "http://typescriptlang.org" - * getDirectoryPath("file://server/path/to/file.ext") === "file://server/path/to" - * getDirectoryPath("file://server/path/to") === "file://server/path" - * getDirectoryPath("file://server/") === "file://server/" - * getDirectoryPath("file://server") === "file://server" - * getDirectoryPath("file:///path/to/file.ext") === "file:///path/to" - * getDirectoryPath("file:///path/to") === "file:///path" - * getDirectoryPath("file:///") === "file:///" - * getDirectoryPath("file://") === "file://" - * ``` - * - * @internal - */ -export function getDirectoryPath(path: string): string; -/** @internal */ -export function getDirectoryPath(path: string): string { - path = normalizeSlashes(path); - - // If the path provided is itself the root, then return it. - const rootLength = getRootLength(path); - if (rootLength === path.length) return path; - - // return the leading portion of the path up to the last (non-terminal) directory separator - // but not including any trailing directory separator. - path = removeTrailingDirectorySeparator(path); - return path.slice(0, Math.max(rootLength, path.lastIndexOf(directorySeparator))); -} - -/** - * Returns the path except for its containing directory name. - * Semantics align with NodeJS's `path.basename` except that we support URL's as well. - * - * ```ts - * // POSIX - * getBaseFileName("/path/to/file.ext") === "file.ext" - * getBaseFileName("/path/to/") === "to" - * getBaseFileName("/") === "" - * // DOS - * getBaseFileName("c:/path/to/file.ext") === "file.ext" - * getBaseFileName("c:/path/to/") === "to" - * getBaseFileName("c:/") === "" - * getBaseFileName("c:") === "" - * // URL - * getBaseFileName("http://typescriptlang.org/path/to/file.ext") === "file.ext" - * getBaseFileName("http://typescriptlang.org/path/to/") === "to" - * getBaseFileName("http://typescriptlang.org/") === "" - * getBaseFileName("http://typescriptlang.org") === "" - * getBaseFileName("file://server/path/to/file.ext") === "file.ext" - * getBaseFileName("file://server/path/to/") === "to" - * getBaseFileName("file://server/") === "" - * getBaseFileName("file://server") === "" - * getBaseFileName("file:///path/to/file.ext") === "file.ext" - * getBaseFileName("file:///path/to/") === "to" - * getBaseFileName("file:///") === "" - * getBaseFileName("file://") === "" - * ``` - * - * @internal - */ -export function getBaseFileName(path: string): string; -/** - * Gets the portion of a path following the last (non-terminal) separator (`/`). - * Semantics align with NodeJS's `path.basename` except that we support URL's as well. - * If the base name has any one of the provided extensions, it is removed. - * - * ```ts - * getBaseFileName("/path/to/file.ext", ".ext", true) === "file" - * getBaseFileName("/path/to/file.js", ".ext", true) === "file.js" - * getBaseFileName("/path/to/file.js", [".ext", ".js"], true) === "file" - * getBaseFileName("/path/to/file.ext", ".EXT", false) === "file.ext" - * ``` - * - * @internal - */ -export function getBaseFileName(path: string, extensions: string | readonly string[], ignoreCase: boolean): string; -/** @internal */ -export function getBaseFileName(path: string, extensions?: string | readonly string[], ignoreCase?: boolean) { - path = normalizeSlashes(path); - - // if the path provided is itself the root, then it has not file name. - const rootLength = getRootLength(path); - if (rootLength === path.length) return ""; - - // return the trailing portion of the path starting after the last (non-terminal) directory - // separator but not including any trailing directory separator. - path = removeTrailingDirectorySeparator(path); - const name = path.slice(Math.max(getRootLength(path), path.lastIndexOf(directorySeparator) + 1)); - const extension = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(name, extensions, ignoreCase) : undefined; - return extension ? name.slice(0, name.length - extension.length) : name; -} - -function tryGetExtensionFromPath(path: string, extension: string, stringEqualityComparer: (a: string, b: string) => boolean) { - if (!startsWith(extension, ".")) extension = "." + extension; - if (path.length >= extension.length && path.charCodeAt(path.length - extension.length) === CharacterCodes.dot) { - const pathExtension = path.slice(path.length - extension.length); - if (stringEqualityComparer(pathExtension, extension)) { - return pathExtension; - } - } -} - -function getAnyExtensionFromPathWorker(path: string, extensions: string | readonly string[], stringEqualityComparer: (a: string, b: string) => boolean) { - if (typeof extensions === "string") { - return tryGetExtensionFromPath(path, extensions, stringEqualityComparer) || ""; - } - for (const extension of extensions) { - const result = tryGetExtensionFromPath(path, extension, stringEqualityComparer); - if (result) return result; - } - return ""; -} - -/** - * Gets the file extension for a path. - * - * ```ts - * getAnyExtensionFromPath("/path/to/file.ext") === ".ext" - * getAnyExtensionFromPath("/path/to/file.ext/") === ".ext" - * getAnyExtensionFromPath("/path/to/file") === "" - * getAnyExtensionFromPath("/path/to.ext/file") === "" - * ``` - * - * @internal - */ -export function getAnyExtensionFromPath(path: string): string; -/** - * Gets the file extension for a path, provided it is one of the provided extensions. - * - * ```ts - * getAnyExtensionFromPath("/path/to/file.ext", ".ext", true) === ".ext" - * getAnyExtensionFromPath("/path/to/file.js", ".ext", true) === "" - * getAnyExtensionFromPath("/path/to/file.js", [".ext", ".js"], true) === ".js" - * getAnyExtensionFromPath("/path/to/file.ext", ".EXT", false) === "" - * - * @internal - */ -export function getAnyExtensionFromPath(path: string, extensions: string | readonly string[], ignoreCase: boolean): string; -/** @internal */ -export function getAnyExtensionFromPath(path: string, extensions?: string | readonly string[], ignoreCase?: boolean): string { - // Retrieves any string from the final "." onwards from a base file name. - // Unlike extensionFromPath, which throws an exception on unrecognized extensions. - if (extensions) { - return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(path), extensions, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive); - } - const baseFileName = getBaseFileName(path); - const extensionIndex = baseFileName.lastIndexOf("."); - if (extensionIndex >= 0) { - return baseFileName.substring(extensionIndex); - } - return ""; -} - -function pathComponents(path: string, rootLength: number) { - const root = path.substring(0, rootLength); - const rest = path.substring(rootLength).split(directorySeparator); - if (rest.length && !lastOrUndefined(rest)) rest.pop(); - return [root, ...rest]; -} - -/** - * Parse a path into an array containing a root component (at index 0) and zero or more path - * components (at indices > 0). The result is not normalized. - * If the path is relative, the root component is `""`. - * If the path is absolute, the root component includes the first path separator (`/`). - * - * ```ts - * // POSIX - * getPathComponents("/path/to/file.ext") === ["/", "path", "to", "file.ext"] - * getPathComponents("/path/to/") === ["/", "path", "to"] - * getPathComponents("/") === ["/"] - * // DOS - * getPathComponents("c:/path/to/file.ext") === ["c:/", "path", "to", "file.ext"] - * getPathComponents("c:/path/to/") === ["c:/", "path", "to"] - * getPathComponents("c:/") === ["c:/"] - * getPathComponents("c:") === ["c:"] - * // URL - * getPathComponents("http://typescriptlang.org/path/to/file.ext") === ["http://typescriptlang.org/", "path", "to", "file.ext"] - * getPathComponents("http://typescriptlang.org/path/to/") === ["http://typescriptlang.org/", "path", "to"] - * getPathComponents("http://typescriptlang.org/") === ["http://typescriptlang.org/"] - * getPathComponents("http://typescriptlang.org") === ["http://typescriptlang.org"] - * getPathComponents("file://server/path/to/file.ext") === ["file://server/", "path", "to", "file.ext"] - * getPathComponents("file://server/path/to/") === ["file://server/", "path", "to"] - * getPathComponents("file://server/") === ["file://server/"] - * getPathComponents("file://server") === ["file://server"] - * getPathComponents("file:///path/to/file.ext") === ["file:///", "path", "to", "file.ext"] - * getPathComponents("file:///path/to/") === ["file:///", "path", "to"] - * getPathComponents("file:///") === ["file:///"] - * getPathComponents("file://") === ["file://"] - * ``` - * - * @internal - */ -export function getPathComponents(path: string, currentDirectory = "") { - path = combinePaths(currentDirectory, path); - return pathComponents(path, getRootLength(path)); -} - -//// Path Formatting - -/** - * Formats a parsed path consisting of a root component (at index 0) and zero or more path - * segments (at indices > 0). - * - * ```ts - * getPathFromPathComponents(["/", "path", "to", "file.ext"]) === "/path/to/file.ext" - * ``` - * - * @internal - */ -export function getPathFromPathComponents(pathComponents: readonly string[]) { - if (pathComponents.length === 0) return ""; - - const root = pathComponents[0] && ensureTrailingDirectorySeparator(pathComponents[0]); - return root + pathComponents.slice(1).join(directorySeparator); -} - -//// Path Normalization - -/** - * Normalize path separators, converting `\` into `/`. - * - * @internal - */ -export function normalizeSlashes(path: string): string { - return path.indexOf("\\") !== -1 - ? path.replace(backslashRegExp, directorySeparator) - : path; -} - -/** - * Reduce an array of path components to a more simplified path by navigating any - * `"."` or `".."` entries in the path. - * - * @internal - */ -export function reducePathComponents(components: readonly string[]) { - if (!some(components)) return []; - const reduced = [components[0]]; - for (let i = 1; i < components.length; i++) { - const component = components[i]; - if (!component) continue; - if (component === ".") continue; - if (component === "..") { - if (reduced.length > 1) { - if (reduced[reduced.length - 1] !== "..") { - reduced.pop(); - continue; - } - } - else if (reduced[0]) continue; - } - reduced.push(component); - } - return reduced; -} - -/** - * Combines paths. If a path is absolute, it replaces any previous path. Relative paths are not simplified. - * - * ```ts - * // Non-rooted - * combinePaths("path", "to", "file.ext") === "path/to/file.ext" - * combinePaths("path", "dir", "..", "to", "file.ext") === "path/dir/../to/file.ext" - * // POSIX - * combinePaths("/path", "to", "file.ext") === "/path/to/file.ext" - * combinePaths("/path", "/to", "file.ext") === "/to/file.ext" - * // DOS - * combinePaths("c:/path", "to", "file.ext") === "c:/path/to/file.ext" - * combinePaths("c:/path", "c:/to", "file.ext") === "c:/to/file.ext" - * // URL - * combinePaths("file:///path", "to", "file.ext") === "file:///path/to/file.ext" - * combinePaths("file:///path", "file:///to", "file.ext") === "file:///to/file.ext" - * ``` - * - * @internal - */ -export function combinePaths(path: string, ...paths: (string | undefined)[]): string { - if (path) path = normalizeSlashes(path); - for (let relativePath of paths) { - if (!relativePath) continue; - relativePath = normalizeSlashes(relativePath); - if (!path || getRootLength(relativePath) !== 0) { - path = relativePath; - } - else { - path = ensureTrailingDirectorySeparator(path) + relativePath; - } - } - return path; -} - -/** - * Combines and resolves paths. If a path is absolute, it replaces any previous path. Any - * `.` and `..` path components are resolved. Trailing directory separators are preserved. - * - * ```ts - * resolvePath("/path", "to", "file.ext") === "path/to/file.ext" - * resolvePath("/path", "to", "file.ext/") === "path/to/file.ext/" - * resolvePath("/path", "dir", "..", "to", "file.ext") === "path/to/file.ext" - * ``` - * - * @internal - */ -export function resolvePath(path: string, ...paths: (string | undefined)[]): string { - return normalizePath(some(paths) ? combinePaths(path, ...paths) : normalizeSlashes(path)); -} - -/** - * Parse a path into an array containing a root component (at index 0) and zero or more path - * components (at indices > 0). The result is normalized. - * If the path is relative, the root component is `""`. - * If the path is absolute, the root component includes the first path separator (`/`). - * - * ```ts - * getNormalizedPathComponents("to/dir/../file.ext", "/path/") === ["/", "path", "to", "file.ext"] - * ``` - * - * @internal - */ -function getNormalizedPathComponents(path: string, currentDirectory: string | undefined) { - return reducePathComponents(getPathComponents(path, currentDirectory)); -} - -/** @internal */ -export function getNormalizedAbsolutePath(fileName: string, currentDirectory: string | undefined) { - return getPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); -} - -/** @internal */ -export function normalizePath(path: string): string { - path = normalizeSlashes(path); - // Most paths don't require normalization - if (!relativePathSegmentRegExp.test(path)) { - return path; - } - // Some paths only require cleanup of `/./` or leading `./` - const simplified = path.replace(/\/\.\//g, "/").replace(/^\.\//, ""); - if (simplified !== path) { - path = simplified; - if (!relativePathSegmentRegExp.test(path)) { - return path; - } - } - // Other paths require full normalization - const normalized = getPathFromPathComponents(reducePathComponents(getPathComponents(path))); - return normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized; -} - -/** @internal */ -export function toPath(fileName: string, basePath: string | undefined, getCanonicalFileName: (path: string) => string): Path { - const nonCanonicalizedPath = isRootedDiskPath(fileName) - ? normalizePath(fileName) - : getNormalizedAbsolutePath(fileName, basePath); - return getCanonicalFileName(nonCanonicalizedPath) as Path; -} - -//// Path Mutation - -/** - * Removes a trailing directory separator from a path, if it does not already have one. - * - * ```ts - * removeTrailingDirectorySeparator("/path/to/file.ext") === "/path/to/file.ext" - * removeTrailingDirectorySeparator("/path/to/file.ext/") === "/path/to/file.ext" - * ``` - * - * @internal - */ -function removeTrailingDirectorySeparator(path: Path): Path; -/** @internal */ -function removeTrailingDirectorySeparator(path: string): string; -/** @internal */ -function removeTrailingDirectorySeparator(path: string) { - if (hasTrailingDirectorySeparator(path)) { - return path.substr(0, path.length - 1); - } - - return path; -} - -/** - * Adds a trailing directory separator to a path, if it does not already have one. - * - * ```ts - * ensureTrailingDirectorySeparator("/path/to/file.ext") === "/path/to/file.ext/" - * ensureTrailingDirectorySeparator("/path/to/file.ext/") === "/path/to/file.ext/" - * ``` - * - * @internal - */ -function ensureTrailingDirectorySeparator(path: Path): Path; -/** @internal */ -function ensureTrailingDirectorySeparator(path: string): string; -/** @internal */ -function ensureTrailingDirectorySeparator(path: string) { - if (!hasTrailingDirectorySeparator(path)) { - return path + directorySeparator; - } - - return path; -} - -/** - * Changes the extension of a path to the provided extension. - * - * ```ts - * changeAnyExtension("/path/to/file.ext", ".js") === "/path/to/file.js" - * ``` - * - * @internal - */ -export function changeAnyExtension(path: string, ext: string): string; -/** - * Changes the extension of a path to the provided extension if it has one of the provided extensions. - * - * ```ts - * changeAnyExtension("/path/to/file.ext", ".js", ".ext") === "/path/to/file.js" - * changeAnyExtension("/path/to/file.ext", ".js", ".ts") === "/path/to/file.ext" - * changeAnyExtension("/path/to/file.ext", ".js", [".ext", ".ts"]) === "/path/to/file.js" - * ``` - * - * @internal - */ -export function changeAnyExtension(path: string, ext: string, extensions: string | readonly string[], ignoreCase: boolean): string; -/** @internal */ -export function changeAnyExtension(path: string, ext: string, extensions?: string | readonly string[], ignoreCase?: boolean) { - const pathext = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(path, extensions, ignoreCase) : getAnyExtensionFromPath(path); - return pathext ? path.slice(0, path.length - pathext.length) + (startsWith(ext, ".") ? ext : "." + ext) : path; -} - -//// Path Comparisons - -// check path for these segments: '', '.'. '..' -const relativePathSegmentRegExp = /(?:\/\/)|(?:^|\/)\.\.?(?:$|\/)/; - -function comparePathsWorker(a: string, b: string, componentComparer: (a: string, b: string) => Comparison) { - if (a === b) return Comparison.EqualTo; - if (a === undefined) return Comparison.LessThan; - if (b === undefined) return Comparison.GreaterThan; - - // NOTE: Performance optimization - shortcut if the root segments differ as there would be no - // need to perform path reduction. - const aRoot = a.substring(0, getRootLength(a)); - const bRoot = b.substring(0, getRootLength(b)); - const result = compareStringsCaseInsensitive(aRoot, bRoot); - if (result !== Comparison.EqualTo) { - return result; - } - - // NOTE: Performance optimization - shortcut if there are no relative path segments in - // the non-root portion of the path - const aRest = a.substring(aRoot.length); - const bRest = b.substring(bRoot.length); - if (!relativePathSegmentRegExp.test(aRest) && !relativePathSegmentRegExp.test(bRest)) { - return componentComparer(aRest, bRest); - } - - // The path contains a relative path segment. Normalize the paths and perform a slower component - // by component comparison. - const aComponents = reducePathComponents(getPathComponents(a)); - const bComponents = reducePathComponents(getPathComponents(b)); - const sharedLength = Math.min(aComponents.length, bComponents.length); - for (let i = 1; i < sharedLength; i++) { - const result = componentComparer(aComponents[i], bComponents[i]); - if (result !== Comparison.EqualTo) { - return result; - } - } - return compareValues(aComponents.length, bComponents.length); -} - -/** - * Performs a case-sensitive comparison of two paths. Path roots are always compared case-insensitively. - * - * @internal - */ -export function comparePathsCaseSensitive(a: string, b: string) { - return comparePathsWorker(a, b, compareStringsCaseSensitive); -} - -/** - * Performs a case-insensitive comparison of two paths. - * - * @internal - */ -export function comparePathsCaseInsensitive(a: string, b: string) { - return comparePathsWorker(a, b, compareStringsCaseInsensitive); -} - -/** - * Compare two paths using the provided case sensitivity. - * - * @internal - */ -export function comparePaths(a: string, b: string, ignoreCase?: boolean): Comparison; -/** @internal */ -export function comparePaths(a: string, b: string, currentDirectory: string, ignoreCase?: boolean): Comparison; -/** @internal */ -export function comparePaths(a: string, b: string, currentDirectory?: string | boolean, ignoreCase?: boolean) { - if (typeof currentDirectory === "string") { - a = combinePaths(currentDirectory, a); - b = combinePaths(currentDirectory, b); - } - else if (typeof currentDirectory === "boolean") { - ignoreCase = currentDirectory; - } - return comparePathsWorker(a, b, getStringComparer(ignoreCase)); -} - -//// Relative Paths - -/** @internal */ -function getPathComponentsRelativeTo(from: string, to: string, stringEqualityComparer: (a: string, b: string) => boolean, getCanonicalFileName: GetCanonicalFileName) { - const fromComponents = reducePathComponents(getPathComponents(from)); - const toComponents = reducePathComponents(getPathComponents(to)); - - let start: number; - for (start = 0; start < fromComponents.length && start < toComponents.length; start++) { - const fromComponent = getCanonicalFileName(fromComponents[start]); - const toComponent = getCanonicalFileName(toComponents[start]); - const comparer = start === 0 ? equateStringsCaseInsensitive : stringEqualityComparer; - if (!comparer(fromComponent, toComponent)) break; - } - - if (start === 0) { - return toComponents; - } - - const components = toComponents.slice(start); - const relative: string[] = []; - for (; start < fromComponents.length; start++) { - relative.push(".."); - } - return ["", ...relative, ...components]; -} - -/** - * Gets a relative path that can be used to traverse between `from` and `to`. - * - * @internal - */ -export function getRelativePathFromDirectory(from: string, to: string, ignoreCase: boolean): string; -/** - * Gets a relative path that can be used to traverse between `from` and `to`. - * - * @internal - */ -export function getRelativePathFromDirectory(fromDirectory: string, to: string, getCanonicalFileName: GetCanonicalFileName): string; // eslint-disable-line @typescript-eslint/unified-signatures -/** @internal */ -export function getRelativePathFromDirectory(fromDirectory: string, to: string, getCanonicalFileNameOrIgnoreCase: GetCanonicalFileName | boolean) { - Debug.assert((getRootLength(fromDirectory) > 0) === (getRootLength(to) > 0), "Paths must either both be absolute or both be relative"); - const getCanonicalFileName = typeof getCanonicalFileNameOrIgnoreCase === "function" ? getCanonicalFileNameOrIgnoreCase : identity; - const ignoreCase = typeof getCanonicalFileNameOrIgnoreCase === "boolean" ? getCanonicalFileNameOrIgnoreCase : false; - const pathComponents = getPathComponentsRelativeTo(fromDirectory, to, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive, getCanonicalFileName); - return getPathFromPathComponents(pathComponents); -} - -//// Path Traversal - -/** - * Case insensitive file systems have descripencies in how they handle some characters (eg. turkish Upper case I with dot on top - \u0130) - * This function is used in places where we want to make file name as a key on these systems - * It is possible on mac to be able to refer to file name with I with dot on top as a fileName with its lower case form - * But on windows we cannot. Windows can have fileName with I with dot on top next to its lower case and they can not each be referred with the lowercase forms - * Technically we would want this function to be platform sepcific as well but - * our api has till now only taken caseSensitive as the only input and just for some characters we dont want to update API and ensure all customers use those api - * We could use upper case and we would still need to deal with the descripencies but - * we want to continue using lower case since in most cases filenames are lowercasewe and wont need any case changes and avoid having to store another string for the key - * So for this function purpose, we go ahead and assume character I with dot on top it as case sensitive since its very unlikely to use lower case form of that special character - * - * @internal - */ -function toFileNameLowerCase(x: string) { - return fileNameLowerCaseRegExp.test(x) ? - x.replace(fileNameLowerCaseRegExp, toLowerCase) : - x; -} - -// We convert the file names to lower case as key for file name on case insensitive file system -// While doing so we need to handle special characters (eg \u0130) to ensure that we dont convert -// it to lower case, fileName with its lowercase form can exist along side it. -// Handle special characters and make those case sensitive instead -// -// |-#--|-Unicode--|-Char code-|-Desc-------------------------------------------------------------------| -// | 1. | i | 105 | Ascii i | -// | 2. | I | 73 | Ascii I | -// |-------- Special characters ------------------------------------------------------------------------| -// | 3. | \u0130 | 304 | Upper case I with dot above | -// | 4. | i,\u0307 | 105,775 | i, followed by 775: Lower case of (3rd item) | -// | 5. | I,\u0307 | 73,775 | I, followed by 775: Upper case of (4th item), lower case is (4th item) | -// | 6. | \u0131 | 305 | Lower case i without dot, upper case is I (2nd item) | -// | 7. | \u00DF | 223 | Lower case sharp s | -// -// Because item 3 is special where in its lowercase character has its own -// upper case form we cant convert its case. -// Rest special characters are either already in lower case format or -// they have corresponding upper case character so they dont need special handling -// -// But to avoid having to do string building for most common cases, also ignore -// a-z, 0-9, \u0131, \u00DF, \, /, ., : and space -const fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_. ]+/g; - -/** @internal */ -export function removeExtension(path: string, extension: string): string { - return path.substring(0, path.length - extension.length); -} - -/** @internal */ -export function createGetCanonicalFileName(useCaseSensitiveFileNames: boolean): GetCanonicalFileName { - return useCaseSensitiveFileNames ? identity : toFileNameLowerCase; -} - -export function isTypeScriptFile(f: string) { - return f.endsWith(Extension.Ts) - || f.endsWith(Extension.Tsx) - || f.endsWith(Extension.Mts) - || f.endsWith(Extension.Cts); -} - -export function isDeclarationFile(f: string) { - return f.endsWith(Extension.Dts) - || f.endsWith(Extension.Dmts) - || f.endsWith(Extension.Dcts) - || /\.d\.[A-z]{1,5}\.mts$/.exec(f) - || /\.d\.[A-z]{1,5}\.cts$/.exec(f) - || /\.d\.[A-z]{1,5}\.ts$/.exec(f); -} -export function isJavaScriptFile(f: string) { - return f.endsWith(Extension.Js) - || f.endsWith(Extension.Jsx) - || f.endsWith(Extension.Cjs) - || f.endsWith(Extension.Mjs); -} - -export function getDeclarationExtension(path: string) { - return ( - path.endsWith(Extension.Mjs) || path.endsWith(Extension.Mts) ? Extension.Dmts : - path.endsWith(Extension.Cjs) || path.endsWith(Extension.Cts) ? Extension.Dcts : - Extension.Dts - ); -} diff --git a/external-declarations/src/compiler/perf-tracer.ts b/external-declarations/src/compiler/perf-tracer.ts deleted file mode 100644 index 7e86fdf8df40b..0000000000000 --- a/external-declarations/src/compiler/perf-tracer.ts +++ /dev/null @@ -1,29 +0,0 @@ -export const tracer: { - current: undefined | { - times: Record; - increment(name: string): void; - start(name: string): void; - end(name: string): void; - }; -} = { - current: undefined, -}; - -export function installTracer() { - const times: Record = {}; - const startTimes: Record = {}; - tracer.current = { - times, - start(name: string) { - startTimes[name] = Date.now(); - }, - increment(name: string) { - times[name] = (times[name] ?? 0) + 1; - }, - end(name: string) { - times[name] = (times[name] ?? 0) + - (Date.now() - (startTimes[name] ?? Date.now())); - startTimes[name] = undefined; - }, - }; -} diff --git a/external-declarations/src/compiler/types.ts b/external-declarations/src/compiler/types.ts deleted file mode 100644 index 80e0648a56c51..0000000000000 --- a/external-declarations/src/compiler/types.ts +++ /dev/null @@ -1,246 +0,0 @@ -import { - AccessorDeclaration, - AsExpression, - BinaryExpression, - ComputedPropertyName, - ElementAccessExpression, - EntityNameExpression, - GetAccessorDeclaration, - ModifierFlags, - ModuleBlock, - ModuleDeclaration, - NamedDeclaration, - Node, - NonNullExpression, - ParenthesizedExpression, - PartiallyEmittedExpression, - Path, - SatisfiesExpression, - SetAccessorDeclaration, - SourceFile, - Symbol, - SymbolFlags, - TransformationContext as _TransformationContext, - TypeAssertion, -} from "typescript"; - -export interface AllAccessorDeclarations { - firstAccessor: AccessorDeclaration; - secondAccessor: AccessorDeclaration | undefined; - getAccessor: GetAccessorDeclaration | undefined; - setAccessor: SetAccessorDeclaration | undefined; -} - -/** @internal */ -export interface AmbientModuleDeclaration extends ModuleDeclaration { - readonly body?: ModuleBlock; -} - -export interface SymbolTracker { - // Called when the symbol writer encounters a symbol to write. Currently only used by the - // declaration emitter to help determine if it should patch up the final declaration file - // with import statements it previously saw (but chose not to emit). - trackSymbol?(symbol: Symbol, enclosingDeclaration: Node | undefined, meaning: SymbolFlags): boolean; - reportInaccessibleThisError?(): void; - reportPrivateInBaseOfClassExpression?(propertyName: string): void; - reportInaccessibleUniqueSymbolError?(): void; - reportCyclicStructureError?(): void; - reportLikelyUnsafeImportRequiredError?(specifier: string): void; - reportTruncationError?(): void; - moduleResolverHost?: ModuleSpecifierResolutionHost; - trackReferencedAmbientModule?(decl: ModuleDeclaration, symbol: Symbol): void; - trackExternalModuleSymbolOfImportTypeNode?(symbol: Symbol): void; - reportNonlocalAugmentation?(containingFile: SourceFile, parentSymbol: Symbol, augmentingSymbol: Symbol): void; - reportNonSerializableProperty?(propertyName: string): void; - reportImportTypeNodeResolutionModeOverride?(): void; -} - -/** @internal */ -interface ModuleSpecifierResolutionHost { - readonly redirectTargetsMap: RedirectTargetsMap; -} - -export type RedirectTargetsMap = ReadonlyMap; - -/** @internal */ -export type GetCanonicalFileName = (fileName: string) => string; - -/** @internal */ -export const enum CharacterCodes { - nullCharacter = 0, - maxAsciiCharacter = 0x7F, - - lineFeed = 0x0A, // \n - carriageReturn = 0x0D, // \r - lineSeparator = 0x2028, - paragraphSeparator = 0x2029, - nextLine = 0x0085, - - // Unicode 3.0 space characters - space = 0x0020, // " " - nonBreakingSpace = 0x00A0, // - enQuad = 0x2000, - emQuad = 0x2001, - enSpace = 0x2002, - emSpace = 0x2003, - threePerEmSpace = 0x2004, - fourPerEmSpace = 0x2005, - sixPerEmSpace = 0x2006, - figureSpace = 0x2007, - punctuationSpace = 0x2008, - thinSpace = 0x2009, - hairSpace = 0x200A, - zeroWidthSpace = 0x200B, - narrowNoBreakSpace = 0x202F, - ideographicSpace = 0x3000, - mathematicalSpace = 0x205F, - ogham = 0x1680, - - _ = 0x5F, - $ = 0x24, - - _0 = 0x30, - _1 = 0x31, - _2 = 0x32, - _3 = 0x33, - _4 = 0x34, - _5 = 0x35, - _6 = 0x36, - _7 = 0x37, - _8 = 0x38, - _9 = 0x39, - - a = 0x61, - b = 0x62, - c = 0x63, - d = 0x64, - e = 0x65, - f = 0x66, - g = 0x67, - h = 0x68, - i = 0x69, - j = 0x6A, - k = 0x6B, - l = 0x6C, - m = 0x6D, - n = 0x6E, - o = 0x6F, - p = 0x70, - q = 0x71, - r = 0x72, - s = 0x73, - t = 0x74, - u = 0x75, - v = 0x76, - w = 0x77, - x = 0x78, - y = 0x79, - z = 0x7A, - - A = 0x41, - B = 0x42, - C = 0x43, - D = 0x44, - E = 0x45, - F = 0x46, - G = 0x47, - H = 0x48, - I = 0x49, - J = 0x4A, - K = 0x4B, - L = 0x4C, - M = 0x4D, - N = 0x4E, - O = 0x4F, - P = 0x50, - Q = 0x51, - R = 0x52, - S = 0x53, - T = 0x54, - U = 0x55, - V = 0x56, - W = 0x57, - X = 0x58, - Y = 0x59, - Z = 0x5a, - - ampersand = 0x26, // & - asterisk = 0x2A, // * - at = 0x40, // @ - backslash = 0x5C, // \ - backtick = 0x60, // ` - bar = 0x7C, // | - caret = 0x5E, // ^ - closeBrace = 0x7D, // } - closeBracket = 0x5D, // ] - closeParen = 0x29, // ) - colon = 0x3A, // : - comma = 0x2C, // , - dot = 0x2E, // . - doubleQuote = 0x22, // " - equals = 0x3D, // = - exclamation = 0x21, // ! - greaterThan = 0x3E, // > - hash = 0x23, // # - lessThan = 0x3C, // < - minus = 0x2D, // - - openBrace = 0x7B, // { - openBracket = 0x5B, // [ - openParen = 0x28, // ( - percent = 0x25, // % - plus = 0x2B, // + - question = 0x3F, // ? - semicolon = 0x3B, // ; - singleQuote = 0x27, // ' - slash = 0x2F, // / - tilde = 0x7E, // ~ - - backspace = 0x08, // \b - formFeed = 0x0C, // \f - byteOrderMark = 0xFEFF, - tab = 0x09, // \t - verticalTab = 0x0B, // \v -} - -/** @internal */ -export interface DynamicNamedDeclaration extends NamedDeclaration { - readonly name: ComputedPropertyName; -} - -/** @internal */ -export interface DynamicNamedBinaryExpression extends BinaryExpression { - readonly left: ElementAccessExpression; -} - -/** @internal */ -export interface JSDocTypeAssertion extends ParenthesizedExpression { - readonly _jsDocTypeAssertionBrand: never; -} - -export type OuterExpression = ParenthesizedExpression | TypeAssertion | SatisfiesExpression | AsExpression | NonNullExpression | PartiallyEmittedExpression; - -/** @internal */ -// A declaration that supports late-binding (used in checker) -export interface LateBoundDeclaration extends DynamicNamedDeclaration { - readonly name: LateBoundName; -} - -/** @internal */ -// A name that supports late-binding (used in checker) -interface LateBoundName extends ComputedPropertyName { - readonly expression: EntityNameExpression; -} - -export type InternalSymbol = Symbol; -type InternalModifierFlags = ModifierFlags; -declare module "typescript" { - interface Node { - symbol: InternalSymbol; - original: this; - modifierFlagsCache: InternalModifierFlags; - } - interface Symbol { - isReferenced: boolean; - parent: InternalSymbol; - } -} diff --git a/external-declarations/src/compiler/utils.ts b/external-declarations/src/compiler/utils.ts deleted file mode 100644 index c4f4bb50c6990..0000000000000 --- a/external-declarations/src/compiler/utils.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { - __String, - CompilerOptions, - Extension, - JsxEmit, - ModuleKind, - NewLineKind, - Node, - NodeFlags, - PrinterOptions, - ScriptTarget, - sys, - TsConfigSourceFile, -} from "typescript"; - -import { - clone, - flatten, - some, -} from "./lang-utils"; -import { - fileExtensionIs, - fileExtensionIsOneOf, -} from "./path-utils"; - -/** @internal */ -export function isInJSFile(node: Node | undefined): boolean { - return !!node && !!(node.flags & NodeFlags.JavaScriptFile); -} - -/** @internal */ -export function getDeclarationEmitExtensionForPath(path: string) { - return fileExtensionIsOneOf(path, [Extension.Mjs, Extension.Mts]) ? Extension.Dmts : - fileExtensionIsOneOf(path, [Extension.Cjs, Extension.Cts]) ? Extension.Dcts : - fileExtensionIsOneOf(path, [Extension.Json]) ? `.json.d.ts` : // Drive-by redefinition of json declaration file output name so if it's ever enabled, it behaves well - Extension.Dts; -} - -/** @internal */ -export function getOutputExtension(fileName: string, options: CompilerOptions): Extension { - return fileExtensionIs(fileName, Extension.Json) ? Extension.Json : - options.jsx === JsxEmit.Preserve && fileExtensionIsOneOf(fileName, [Extension.Jsx, Extension.Tsx]) ? Extension.Jsx : - fileExtensionIsOneOf(fileName, [Extension.Mts, Extension.Mjs]) ? Extension.Mjs : - fileExtensionIsOneOf(fileName, [Extension.Cts, Extension.Cjs]) ? Extension.Cjs : - Extension.Js; -} - -/** @internal */ -export function getEmitScriptTarget(compilerOptions: { module?: CompilerOptions["module"]; target?: CompilerOptions["target"]; }) { - return compilerOptions.target || - (compilerOptions.module === ModuleKind.Node16 && ScriptTarget.ES2022) || - (compilerOptions.module === ModuleKind.NodeNext && ScriptTarget.ESNext) || - ScriptTarget.ES3; -} - -/** @internal */ -const supportedJSExtensions: readonly Extension[][] = [[Extension.Js, Extension.Jsx], [Extension.Mjs], [Extension.Cjs]]; -/** @internal */ -const supportedJSExtensionsFlat: readonly Extension[] = flatten(supportedJSExtensions); -/** - * Groups of supported extensions in order of file resolution precedence. (eg, TS > TSX > DTS and seperately, CTS > DCTS) - * - * @internal - */ -const supportedTSExtensions: readonly Extension[][] = [[Extension.Ts, Extension.Tsx, Extension.Dts], [Extension.Cts, Extension.Dcts], [Extension.Mts, Extension.Dmts]]; -/** @internal */ -const supportedTSExtensionsFlat: readonly Extension[] = flatten(supportedTSExtensions); - -/** @internal */ -export function hasJSFileExtension(fileName: string): boolean { - return some(supportedJSExtensionsFlat, extension => fileExtensionIs(fileName, extension)); -} - -/** @internal */ -export function hasTSFileExtension(fileName: string): boolean { - return some(supportedTSExtensionsFlat, extension => fileExtensionIs(fileName, extension)); -} - -const supportedDeclarationExtensions: readonly Extension[] = [Extension.Dts, Extension.Dcts, Extension.Dmts]; -/** @internal */ -export function isDeclarationFileName(fileName: string): boolean { - return fileExtensionIsOneOf(fileName, supportedDeclarationExtensions); -} - -/** @internal */ -export function cloneCompilerOptions(options: CompilerOptions): CompilerOptions { - const result = clone(options); - setConfigFileInOptions(result, options && options.configFile as any); - return result; -} -/** @internal */ -function setConfigFileInOptions(options: CompilerOptions, configFile: TsConfigSourceFile | undefined) { - if (configFile) { - Object.defineProperty(options, "configFile", { enumerable: false, writable: false, value: configFile }); - } -} - -const carriageReturnLineFeed = "\r\n"; -const lineFeed = "\n"; -/** @internal */ -export function getNewLineCharacter(options: CompilerOptions | PrinterOptions, getNewLine?: () => string): string { - switch (options.newLine) { - case NewLineKind.CarriageReturnLineFeed: - return carriageReturnLineFeed; - case NewLineKind.LineFeed: - return lineFeed; - } - return getNewLine ? getNewLine() : sys ? sys.newLine : carriageReturnLineFeed; -} diff --git a/external-declarations/src/main.ts b/external-declarations/src/main.ts deleted file mode 100644 index a02598a816565..0000000000000 --- a/external-declarations/src/main.ts +++ /dev/null @@ -1,91 +0,0 @@ -import * as fs from "fs"; -import * as path from "path"; -import * as ts from "typescript"; - -import { - normalizePath, -} from "./compiler/path-utils"; -import { - ArgType, - parseArgs, -} from "./utils/cli-parser"; - -(ts as any).Debug.enableDebugInfo(); -interface CancellationToken { - isCancelled: boolean; -} - -const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), { - default: ArgType.StringArray(), - project: { - type: ArgType.String(), - description: "Project configuration", - required: true, - }, - watch: { - type: ArgType.Boolean(), - description: "Keep watching", - }, - declarationDir: { - type: ArgType.String(), - description: "Output dir", - }, -}); -printUsageOnErrors(); - -let projectConfig = normalizePath(path.resolve(parsedArgs.project)); -if (path.extname(projectConfig) !== ".json") { - projectConfig = normalizePath(path.join(projectConfig, "tsconfig.json")); -} - -let watched: { - watcher: fs.FSWatcher; - path: string; -}[] = []; - -function watch(rootDir: string) { - if (parsedArgs.watch) { - let newWatched: string[]; - if (parsedArgs.default) { - newWatched = parsedArgs.default; - } - else { - newWatched = [rootDir]; - } - if (watched.length !== newWatched.length || !watched.every((v, index) => v.path === newWatched[index])) { - watched.forEach(f => f.watcher.close()); - watched = newWatched.map(f => ({ - path: f, - watcher: fs.watch(f, { persistent: true, recursive: true }, cancelAndRestart), - })); - } - } -} -let lastRunCancellation: CancellationToken = { isCancelled: false }; -async function delay(ms: number) { - // eslint-disable-next-line no-restricted-globals - return new Promise(r => setTimeout(r, ms)); -} -function cancelAndRestart(event: fs.WatchEventType, filename: string) { - lastRunCancellation.isCancelled = true; - lastRunCancellation = { isCancelled: false }; - main(lastRunCancellation, 50); -} -async function main(cancellationToken: CancellationToken, msDelay: number) { - await delay(msDelay); - if (cancellationToken.isCancelled) return; - - console.log("Detected changes rebuilding"); - - const tsconfig = ts.readConfigFile(projectConfig, ts.sys.readFile); - const parsed = ts.parseJsonConfigFileContent(tsconfig.config, ts.sys, "./"); - const options = { ...parsed.options, isolatedDeclarations: true }; - if (parsedArgs.declarationDir) { - options.declarationDir = parsedArgs.declarationDir; - } - const host = ts.createCompilerHost(options, /*setParentNodes*/ true); - const rootDir = await ts.emitDeclarationsForProject(path.dirname(projectConfig), /*files*/ undefined, options, host); - watch(rootDir); - if (cancellationToken.isCancelled) return; -} -main(lastRunCancellation, 0); diff --git a/external-declarations/src/test-runner/cli-arg-config.ts b/external-declarations/src/test-runner/cli-arg-config.ts deleted file mode 100644 index 3b57765063caf..0000000000000 --- a/external-declarations/src/test-runner/cli-arg-config.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ArgType, - parseArgs, - parserConfiguration, -} from "../utils/cli-parser"; - -export const testRunnerCLIConfiguration = parserConfiguration({ - default: { - type: ArgType.String(), - description: "Test filter to run", - }, - type: { - type: ArgType.Enum("all", "tsc", "dte"), - description: "Type of run (Typescript, all, or isolated)", - }, - shard: ArgType.Number(), - shardCount: ArgType.Number(), - outputPath: ArgType.String(), - rootPaths: ArgType.StringArray(), - configFile: ArgType.String(), - category: ArgType.String(), - forceIsolatedDeclarations: ArgType.Boolean(), -}); - -const { value, printUsageOnErrors } = parseArgs(process.argv.slice(2), testRunnerCLIConfiguration); - -printUsageOnErrors(); - -export const parsedCliArgs = value; diff --git a/external-declarations/src/test-runner/excluded-ts-tests.ts b/external-declarations/src/test-runner/excluded-ts-tests.ts deleted file mode 100644 index ee3977776acff..0000000000000 --- a/external-declarations/src/test-runner/excluded-ts-tests.ts +++ /dev/null @@ -1,21 +0,0 @@ -export const excludedTsTests = new Set([ - // These two tests contain a declaration error - // A variable that is not of a literal type is used as a computed property name - // TS will error on this and will not merge the overloads to a singe symbol - // This means TS will not remove the implementation overload - // - // The external declaration emitter will use the variable name to merge symbols. - "computedPropertyNamesOnOverloads_ES5", - "computedPropertyNamesOnOverloads_ES6", - // Symbols are merged across files and excluded. We can't do cross file analysis - "jsFileCompilationDuplicateFunctionImplementation", - "jsFileCompilationDuplicateFunctionImplementationFileOrderReversed", - // Output emitted to same file test ios not of interest for isolated declarations - "filesEmittingIntoSameOutput", - // Error in TS, but excludes implementation in declarations. - // Generating same output if we have an error is best effort - "overloadsInDifferentContainersDisagreeOnAmbient", - // The function is elided because the eval function is merged with eval from libs into a single symbol - // We can't reproduce this behavior - "parserStrictMode8", -]); diff --git a/external-declarations/src/test-runner/parallel-run.ts b/external-declarations/src/test-runner/parallel-run.ts deleted file mode 100644 index 13484b5b9e297..0000000000000 --- a/external-declarations/src/test-runner/parallel-run.ts +++ /dev/null @@ -1,87 +0,0 @@ -import * as childProcess from "child_process"; -import * as path from "path"; - -import { - parseArgs, -} from "../utils/cli-parser"; -import { - testRunnerCLIConfiguration, -} from "./cli-arg-config"; - -interface ExecuteResult { - error: childProcess.ExecException | undefined; - stdout: string; - stderr: string; -} - -function exec(cmd: string, dir: string, onStdOut: (s: string) => void) { - return new Promise(resolve => { - console.log(`In ${dir} Executing: ${cmd}`); - - const ls = childProcess.spawn(cmd, [], { - cwd: path.resolve(path.join(process.cwd(), dir)), - shell: true, - }); - let stdout = ""; - let stderr = ""; - ls.stdout.on("data", data => { - if (!onStdOut) { - process.stdout.write(data.toString()); - } - else { - onStdOut(data.toString()); - } - stdout += data.toString(); - }); - - ls.stderr.on("data", data => { - process.stderr.write(data.toString()); - stderr += data.toString(); - }); - - ls.on("error", err => { - console.log(err); - }); - ls.on("exit", code => { - console.log("exited:" + code?.toString()); - resolve({ - error: !code ? undefined : Object.assign(new Error(""), { - code, - cmd, - }), - stderr, - stdout, - }); - }); - }); -} - -const { value: parsedArgs, printUsageOnErrors } = parseArgs(process.argv.slice(2), testRunnerCLIConfiguration); -printUsageOnErrors(); - -const shardCount = parsedArgs.shardCount ?? 6; - -async function main() { - let runCount = 0; - const commandLine = `node ./build/test-runner/test-runner-main.js ${process.argv.slice(2).join(" ")} `; - let lastWrite = new Date().getTime(); - const startTime = new Date().getTime(); - const elapsedTime = (now: number) => `${((now - startTime) / 1000 / 60).toFixed(2)} minutes`; - const promises = Array.from({ length: shardCount }).map(async (_, index) => { - const result = await exec(commandLine + ` --shard=${index}`, "./", out => { - runCount += (out.match(/Ran:/g) || []).length; - if (new Date().getTime() - lastWrite > 2000) { - lastWrite = new Date().getTime(); - console.log(`Run count: ${runCount} after ${elapsedTime(lastWrite)}`); - } - }); - console.log(`Shard ${index} completed`); - return result.error; - }); - const results = await Promise.all(promises); - const endTime = new Date().getTime(); - console.log(`Took ${elapsedTime(endTime)} to complete ${runCount}`); - process.exit(results.filter(error => error).length); -} - -main(); diff --git a/external-declarations/src/test-runner/test-runner-main.ts b/external-declarations/src/test-runner/test-runner-main.ts deleted file mode 100644 index 7f8f67658bbcd..0000000000000 --- a/external-declarations/src/test-runner/test-runner-main.ts +++ /dev/null @@ -1,222 +0,0 @@ -import "source-map-support/register"; - -import * as fs from "fs/promises"; -import * as JSON from "json5"; -import * as path from "path"; -import * as ts from "typescript"; - -import { - firstDefined, -} from "../compiler/lang-utils"; -import { - normalizePath, - removeExtension, -} from "../compiler/path-utils"; -import { - addToQueue, - ensureDir, - flushQueue, - readAllFiles, -} from "../utils/fs-utils"; -import { - parsedCliArgs as parsedArgs, -} from "./cli-arg-config"; -import { - excludedTsTests, -} from "./excluded-ts-tests"; -import { - setCompilerOptionsFromHarnessSetting, -} from "./tsc-infrastructure/compiler-run"; -import { - IO, -} from "./tsc-infrastructure/io"; -import { - CompilerSettings, - TestCaseContent, -} from "./tsc-infrastructure/test-file-parser"; -import { - getFileBasedTestConfigurationDescription, - getFileBasedTestConfigurations, -} from "./tsc-infrastructure/vary-by"; -import { - changeExtension, -} from "./tsc-infrastructure/vpath"; -import { - loadTestCase, - runDeclarationTransformEmitter, - runTypeScript, - TestCompilationResult, -} from "./utils"; - -const excludeFilter = /\/fourslash\//; - -const shard = parsedArgs.shard; -const shardCount = parsedArgs.shardCount; -let prefix: string | undefined; -const prefixed = parsedArgs.default && /(?[0-9]{5})-(((?.*)\.(?(.*=.*)+)(\.d\.ts))|(?.*))/.exec(parsedArgs.default); -let testVersionFilter: string | undefined; -if (prefixed) { - prefix = prefixed.groups?.index; - parsedArgs.default = prefixed.groups?.name ?? prefixed.groups?.nameSimple; - testVersionFilter = prefixed.groups?.options; -} - -const outputPath = parsedArgs.outputPath ?? "./tsc-tests/run"; -const rootCasePaths = parsedArgs.rootPaths ?? ["./tests/source"]; - -const filter = parsedArgs.default ? new RegExp(parsedArgs.default) : /.*\.ts/; -const runType = parsedArgs.type === "all" ? { tsc: true, dte: true } : - parsedArgs.type === "tsc" ? { tsc: true, dte: false } : - { tsc: false, dte: true }; - -const allTests = rootCasePaths - .map(r => readAllFiles(r, filter)) - .flat() - .filter(f => !excludeFilter.exec(f)); - -(ts as any).Debug.enableDebugInfo(); - -function pad(num: number, size: number) { - return ("000000000" + num).substr(-size); -} - -async function main() { - let fileConfiguration: undefined | { - "error-categories": Record; - "test-categories": Record; - }; - const testCategories = new Map(); - const errorCategories = new Map(); - if (parsedArgs.configFile) { - fileConfiguration = JSON.parse(await fs.readFile(parsedArgs.configFile, { encoding: "utf8" })); - Object.entries(fileConfiguration?.["error-categories"] ?? {}).forEach(([name, codes]) => codes.forEach(c => errorCategories.set(c, name))); - Object.entries(fileConfiguration?.["test-categories"] ?? {}).forEach(([name, tests]) => tests.forEach(t => testCategories.set(t, name))); - } - - const testsPerShared = shardCount && Math.round(allTests.length / shardCount); - const [start, end] = shard === undefined || shardCount === undefined || testsPerShared === undefined ? - [0, allTests.length] : - [shard * testsPerShared, (shard === shardCount - 1) ? allTests.length : (shard + 1) * testsPerShared]; - const failedTests = []; - for (let count = start; count < end; count++) { - const testFile = normalizePath(allTests[count]); - const testFileNoExtension = removeExtension(path.basename(testFile), path.extname(testFile)); - if (excludedTsTests.has(testFileNoExtension)) { - continue; - } - const testName = removeExtension(path.basename(testFile), path.extname(testFile)); - if (parsedArgs.category && testCategories.get(testName) !== parsedArgs.category) { - continue; - } - const data = await loadTestCase(testFile); - const variedConfiguration = getFileBasedTestConfigurations(data.settings) ?? [{}]; - for (const varConfig of variedConfiguration) { - const varConfigDescription = getFileBasedTestConfigurationDescription(varConfig); - if (testVersionFilter && varConfigDescription !== testVersionFilter) continue; - const file = (prefix ?? pad(count, 5)) + "-" + changeExtension(path.basename(testFile), varConfigDescription + ".d.ts"); - let tsc, dte; - if (runType.tsc) { - tsc = runAndWrite(testName, path.join(outputPath, "tsc", file), varConfig, runTypeScript); - } - if (runType.dte) { - dte = runAndWrite(testName, path.join(outputPath, "dte", file), varConfig, (t, s) => runDeclarationTransformEmitter(t, s)); - } - if (tsc && dte && tsc !== dte) { - failedTests.push(testName); - } - } - console.log(` Ran: ${pad(count, 5)}/${allTests.length}`); - - function runAndWrite(testName: string, file: string, varySettings: CompilerSettings, fn: (data: TestCaseContent, opts: ts.CompilerOptions) => TestCompilationResult) { - const settings: ts.CompilerOptions = {}; - setCompilerOptionsFromHarnessSetting(data.settings, settings); - setCompilerOptionsFromHarnessSetting(varySettings, settings); - - if (parsedArgs.forceIsolatedDeclarations) { - settings.isolatedDeclarations = true; - settings.declarationMap = true; - } - // Not supported - delete settings.outFile; - delete settings.out; - delete settings.outDir; - delete settings.declarationDir; - - const results = safeRun(d => fn(d, settings)); - file = normalizePath(file); - const resultText = results.files - .flatMap(r => [ - "// " + r.fileName, - r.content, - r.declarationMap ?? "", - ]) - .join(IO.newLine()) + - ` -// ================== -// Original test file: ${testFile} -// ` + data.code.split("\n").join(` -// `); - - let category = testCategories.get(testName); - - if (!category) { - if (results.diagnostics instanceof Error) { - file = path.join( - path.dirname(file), - path.basename(file), - ); - } - else { - const error = firstDefined(results.diagnostics, d => { - const category = errorCategories.get(d.code); - return category ? { category, code: d.code } : undefined; - }); - if (error) { - category = path.join(error.category, error.code.toString()); - } - } - } - if (category) { - file = path.join( - path.dirname(file), - category, - path.basename(file), - ); - } - writeResults(file, resultText); - return resultText; - } - - function safeRun(fn: (data: TestCaseContent) => TestCompilationResult): TestCompilationResult { - try { - return fn(data); - } - catch (e) { - return { - diagnostics: e, - files: [{ - fileName: changeExtension(path.basename(testFile), ".d.ts"), - // We compare the textual results between dte and tsc, it will show up - // if it's different. as tsc prints empty results when it fails, it's - // reasonable to do the same in DTE. - content: "", - declarationMap: undefined, - }], - }; - } - } - - async function writeResults(fileName: string, results: string) { - addToQueue(async () => { - const dirName = path.dirname(fileName); - await ensureDir(dirName); - await fs.writeFile(fileName, results); - console.log(`Written: ${pad(count, 5)}/${allTests.length}`); - }); - } - } - await flushQueue(); - console.error(`Number of failedTests: ${failedTests.length}, list : ${failedTests.join(" ")}`); - process.exit(failedTests.length); -} -main(); diff --git a/external-declarations/src/test-runner/tsc-infrastructure/collections.ts b/external-declarations/src/test-runner/tsc-infrastructure/collections.ts deleted file mode 100644 index 658eb1d3358df..0000000000000 --- a/external-declarations/src/test-runner/tsc-infrastructure/collections.ts +++ /dev/null @@ -1,326 +0,0 @@ -import * as ts from "../../compiler/lang-utils"; - -export interface SortOptions { - comparer: (a: T, b: T) => number; - sort: "insertion" | "comparison"; -} - -export class SortedMap { - private _comparer: (a: K, b: K) => number; - private _keys: K[] = []; - private _values: V[] = []; - private _order: number[] | undefined; - private _version = 0; - private _copyOnWrite = false; - - constructor(comparer: ((a: K, b: K) => number) | SortOptions, iterable?: Iterable<[K, V]>) { - this._comparer = typeof comparer === "object" ? comparer.comparer : comparer; - this._order = typeof comparer === "object" && comparer.sort === "insertion" ? [] : undefined; - if (iterable) { - const iterator = getIterator(iterable); - try { - for (let i = nextResult(iterator); i; i = nextResult(iterator)) { - const [key, value] = i.value; - this.set(key, value); - } - } - finally { - closeIterator(iterator); - } - } - } - - public get size() { - return this._keys.length; - } - - public get comparer() { - return this._comparer; - } - - public get [Symbol.toStringTag]() { - return "SortedMap"; - } - - public has(key: K) { - return ts.binarySearch(this._keys, key, ts.identity, this._comparer) >= 0; - } - - public get(key: K) { - const index = ts.binarySearch(this._keys, key, ts.identity, this._comparer); - return index >= 0 ? this._values[index] : undefined; - } - - public getEntry(key: K): [K, V] | undefined { - const index = ts.binarySearch(this._keys, key, ts.identity, this._comparer); - return index >= 0 ? [this._keys[index], this._values[index]] : undefined; - } - - public set(key: K, value: V) { - const index = ts.binarySearch(this._keys, key, ts.identity, this._comparer); - if (index >= 0) { - this._values[index] = value; - } - else { - this.writePreamble(); - insertAt(this._keys, ~index, key); - insertAt(this._values, ~index, value); - if (this._order) insertAt(this._order, ~index, this._version); - this.writePostScript(); - } - return this; - } - - public delete(key: K) { - const index = ts.binarySearch(this._keys, key, ts.identity, this._comparer); - if (index >= 0) { - this.writePreamble(); - ts.orderedRemoveItemAt(this._keys, index); - ts.orderedRemoveItemAt(this._values, index); - if (this._order) ts.orderedRemoveItemAt(this._order, index); - this.writePostScript(); - return true; - } - return false; - } - - public clear() { - if (this.size > 0) { - this.writePreamble(); - this._keys.length = 0; - this._values.length = 0; - if (this._order) this._order.length = 0; - this.writePostScript(); - } - } - - public forEach(callback: (value: V, key: K, collection: this) => void, thisArg?: any) { - const keys = this._keys; - const values = this._values; - const indices = this.getIterationOrder(); - const version = this._version; - this._copyOnWrite = true; - try { - if (indices) { - for (const i of indices) { - callback.call(thisArg, values[i], keys[i], this); - } - } - else { - for (let i = 0; i < keys.length; i++) { - callback.call(thisArg, values[i], keys[i], this); - } - } - } - finally { - if (version === this._version) { - this._copyOnWrite = false; - } - } - } - - public *keys() { - const keys = this._keys; - const indices = this.getIterationOrder(); - const version = this._version; - this._copyOnWrite = true; - try { - if (indices) { - for (const i of indices) { - yield keys[i]; - } - } - else { - yield* keys; - } - } - finally { - if (version === this._version) { - this._copyOnWrite = false; - } - } - } - - public *values() { - const values = this._values; - const indices = this.getIterationOrder(); - const version = this._version; - this._copyOnWrite = true; - try { - if (indices) { - for (const i of indices) { - yield values[i]; - } - } - else { - yield* values; - } - } - finally { - if (version === this._version) { - this._copyOnWrite = false; - } - } - } - - public *entries() { - const keys = this._keys; - const values = this._values; - const indices = this.getIterationOrder(); - const version = this._version; - this._copyOnWrite = true; - try { - if (indices) { - for (const i of indices) { - yield [keys[i], values[i]] as [K, V]; - } - } - else { - for (let i = 0; i < keys.length; i++) { - yield [keys[i], values[i]] as [K, V]; - } - } - } - finally { - if (version === this._version) { - this._copyOnWrite = false; - } - } - } - - public [Symbol.iterator]() { - return this.entries(); - } - - private writePreamble() { - if (this._copyOnWrite) { - this._keys = this._keys.slice(); - this._values = this._values.slice(); - if (this._order) this._order = this._order.slice(); - this._copyOnWrite = false; - } - } - - private writePostScript() { - this._version++; - } - - private getIterationOrder() { - if (this._order) { - const order = this._order; - return this._order - .map((_, i) => i) - .sort((x, y) => order[x] - order[y]); - } - return undefined; - } -} - -export function insertAt(array: T[], index: number, value: T): void { - if (index === 0) { - array.unshift(value); - } - else if (index === array.length) { - array.push(value); - } - else { - for (let i = array.length; i > index; i--) { - array[i] = array[i - 1]; - } - array[index] = value; - } -} - -export function getIterator(iterable: Iterable): Iterator { - return iterable[Symbol.iterator](); -} - -export function nextResult(iterator: Iterator): IteratorResult | undefined { - const result = iterator.next(); - return result.done ? undefined : result; -} - -export function closeIterator(iterator: Iterator) { - const fn = iterator.return; - if (typeof fn === "function") fn.call(iterator); -} - -/** - * A collection of metadata that supports inheritance. - */ -export class Metadata { - private static readonly _undefinedValue = {}; - private _parent: Metadata | undefined; - private _map: { [key: string]: any; }; - private _version = 0; - private _size = -1; - private _parentVersion: number | undefined; - - constructor(parent?: Metadata) { - this._parent = parent; - this._map = Object.create(parent ? parent._map : null); // eslint-disable-line no-null/no-null - } - - public get size(): number { - if (this._size === -1 || (this._parent && this._parent._version !== this._parentVersion)) { - let size = 0; - for (const _ in this._map) size++; - this._size = size; - if (this._parent) { - this._parentVersion = this._parent._version; - } - } - return this._size; - } - - public get parent() { - return this._parent; - } - - public has(key: string): boolean { - return this._map[Metadata._escapeKey(key)] !== undefined; - } - - public get(key: string): any { - const value = this._map[Metadata._escapeKey(key)]; - return value === Metadata._undefinedValue ? undefined : value; - } - - public set(key: string, value: any): this { - this._map[Metadata._escapeKey(key)] = value === undefined ? Metadata._undefinedValue : value; - this._size = -1; - this._version++; - return this; - } - - public delete(key: string): boolean { - const escapedKey = Metadata._escapeKey(key); - if (this._map[escapedKey] !== undefined) { - delete this._map[escapedKey]; - this._size = -1; - this._version++; - return true; - } - return false; - } - - public clear(): void { - this._map = Object.create(this._parent ? this._parent._map : null); // eslint-disable-line no-null/no-null - this._size = -1; - this._version++; - } - - public forEach(callback: (value: any, key: string, map: this) => void) { - for (const key in this._map) { - callback(this._map[key], Metadata._unescapeKey(key), this); - } - } - - private static _escapeKey(text: string) { - return (text.length >= 2 && text.charAt(0) === "_" && text.charAt(1) === "_" ? "_" + text : text); - } - - private static _unescapeKey(text: string) { - return (text.length >= 3 && text.charAt(0) === "_" && text.charAt(1) === "_" && text.charAt(2) === "_" ? text.slice(1) : text); - } -} diff --git a/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts b/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts deleted file mode 100644 index 3c1a4ac1dbeea..0000000000000 --- a/external-declarations/src/test-runner/tsc-infrastructure/compiler-run.ts +++ /dev/null @@ -1,249 +0,0 @@ -import { - CompilerOptions, - Diagnostic, -} from "typescript"; -import * as ts from "typescript"; - -import { - compareStringsCaseSensitive, - hasProperty, - map, - startsWith, -} from "../../compiler/lang-utils"; -import { - createGetCanonicalFileName, - fileExtensionIs, - getNormalizedAbsolutePath, - normalizeSlashes, - toPath, -} from "../../compiler/path-utils"; -import { - cloneCompilerOptions, - getEmitScriptTarget, -} from "../../compiler/utils"; -import * as compiler from "./compiler"; -import * as fakes from "./fakesHosts"; -import { - IO, -} from "./io"; -import * as opts from "./options"; -import { - parseCustomTypeOption, - parseListTypeOption, -} from "./options"; -import * as documents from "./test-document"; -import * as TestCaseParser from "./test-file-parser"; -import * as vfs from "./vfs"; -import * as vpath from "./vpath"; - -interface HarnessOptions { - useCaseSensitiveFileNames?: boolean; - includeBuiltFile?: string; - baselineFile?: string; - libFiles?: string; - noTypesAndSymbols?: boolean; -} - -// Additional options not already in ts.optionDeclarations -const harnessOptionDeclarations: opts.CommandLineOption[] = [ - { name: "allowNonTsExtensions", type: "boolean", defaultValueDescription: false }, - { name: "useCaseSensitiveFileNames", type: "boolean", defaultValueDescription: false }, - { name: "baselineFile", type: "string" }, - { name: "includeBuiltFile", type: "string" }, - { name: "fileName", type: "string" }, - { name: "libFiles", type: "string" }, - { name: "noErrorTruncation", type: "boolean", defaultValueDescription: false }, - { name: "suppressOutputPathCheck", type: "boolean", defaultValueDescription: false }, - { name: "noImplicitReferences", type: "boolean", defaultValueDescription: false }, - { name: "currentDirectory", type: "string" }, - { name: "symlink", type: "string" }, - { name: "link", type: "string" }, - { name: "noTypesAndSymbols", type: "boolean", defaultValueDescription: false }, - // Emitted js baseline will print full paths for every output file - { name: "fullEmitPaths", type: "boolean", defaultValueDescription: false }, -]; - -let optionsIndex: Map; -function getCommandLineOption(name: string): opts.CommandLineOption | undefined { - if (!optionsIndex) { - optionsIndex = new Map(); - const optionDeclarations = harnessOptionDeclarations.concat(opts.optionDeclarations); - for (const option of optionDeclarations) { - optionsIndex.set(option.name.toLowerCase(), option); - } - } - return optionsIndex.get(name.toLowerCase()); -} -export function setCompilerOptionsFromHarnessSetting(settings: TestCaseParser.CompilerSettings, options: CompilerOptions & HarnessOptions): void { - for (const name in settings) { - if (hasProperty(settings, name)) { - const value = settings[name]; - if (value === undefined) { - throw new Error(`Cannot have undefined value for compiler option '${name}'.`); - } - const option = getCommandLineOption(name); - if (option) { - const errors: Diagnostic[] = []; - options[option.name] = optionValue(option, value, errors); - if (errors.length > 0) { - throw new Error(`Unknown value '${value}' for compiler option '${name}'.`); - } - } - } - } -} - -function optionValue(option: opts.CommandLineOption, value: string, errors: Diagnostic[]): any { - switch (option.type) { - case "boolean": - return value.toLowerCase() === "true"; - case "string": - return value; - case "number": { - const numverValue = parseInt(value, 10); - if (isNaN(numverValue)) { - throw new Error(`Value must be a number, got: ${JSON.stringify(value)}`); - } - return numverValue; - } - // If not a primitive, the possible types are specified in what is effectively a map of options. - case "list": - return parseListTypeOption(option, value, errors); - default: - return parseCustomTypeOption(option as opts.CommandLineOptionOfCustomType, value, errors); - } -} - -export interface TestFile { - unitName: string; - content: string; - fileOptions?: any; -} - -export function prepareTestOptionsAndFs( - 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, -) { - const options: ts.CompilerOptions & HarnessOptions = compilerOptions ? cloneCompilerOptions(compilerOptions) : { noResolve: false }; - options.target = getEmitScriptTarget(options); - options.newLine = options.newLine || ts.NewLineKind.CarriageReturnLineFeed; - options.noErrorTruncation = true; - options.skipDefaultLibCheck = typeof options.skipDefaultLibCheck === "undefined" ? true : options.skipDefaultLibCheck; - - if (typeof currentDirectory === "undefined") { - currentDirectory = vfs.srcFolder; - } - - // Parse settings - if (harnessSettings) { - setCompilerOptionsFromHarnessSetting(harnessSettings, options); - } - if (options.rootDirs) { - options.rootDirs = map(options.rootDirs, d => getNormalizedAbsolutePath(d, currentDirectory)); - } - - const useCaseSensitiveFileNames = options.useCaseSensitiveFileNames !== undefined ? options.useCaseSensitiveFileNames : true; - const programFileNames = inputFiles.map(file => file.unitName).filter(fileName => !fileExtensionIs(fileName, ts.Extension.Json)); - - // Files from built\local that are requested by test "@includeBuiltFiles" to be in the context. - // Treat them as library files, so include them in build, but not in baselines. - if (options.includeBuiltFile) { - programFileNames.push(vpath.combine(vfs.builtFolder, options.includeBuiltFile)); - } - - // Files from tests\lib that are requested by "@libFiles" - if (options.libFiles) { - for (const fileName of options.libFiles.split(",")) { - programFileNames.push(vpath.combine(vfs.testLibFolder, fileName)); - } - } - const docs = inputFiles.concat(otherFiles).map(documents.TextDocument.fromTestFile); - const fs = vfs.createFromFileSystem(IO, !useCaseSensitiveFileNames, { documents: docs, cwd: currentDirectory }); - if (symlinks) { - fs.apply(symlinks); - } - return { fs, options, programFileNames }; -} - -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, -) { - const { fs, options, programFileNames } = prepareTestOptionsAndFs(inputFiles, otherFiles, harnessSettings, compilerOptions, currentDirectory, symlinks); - const host = new fakes.CompilerHost(fs, options); - const result = compiler.compileFiles(host, programFileNames, options); - result.symlinks = symlinks; - return result; -} - -export function* iterateOutputs(outputFiles: Iterable): IterableIterator<[string, string]> { - // Collect, test, and sort the fileNames - const files = Array.from(outputFiles); - files.slice().sort((a, b) => compareStringsCaseSensitive(cleanName(a.file), cleanName(b.file))); - const dupeCase = new Map(); - // Yield them - for (const outputFile of files) { - yield [checkDuplicatedFileName(outputFile.file, dupeCase), "/*====== " + outputFile.file + " ======*/\r\n" + Utils.removeByteOrderMark(outputFile.text)]; - } - - function cleanName(fn: string) { - const lastSlash = normalizeSlashes(fn).lastIndexOf("/"); - return fn.substr(lastSlash + 1).toLowerCase(); - } -} - -function checkDuplicatedFileName(resultName: string, dupeCase: Map): string { - resultName = sanitizeTestFilePath(resultName); - if (dupeCase.has(resultName)) { - // A different baseline filename should be manufactured if the names differ only in case, for windows compat - const count = 1 + dupeCase.get(resultName)!; - dupeCase.set(resultName, count); - resultName = `${resultName}.dupe${count}`; - } - else { - dupeCase.set(resultName, 0); - } - return resultName; -} - -export function sanitizeTestFilePath(name: string) { - const path = toPath(normalizeSlashes(name.replace(/[\^<>:"|?*%]/g, "_")).replace(/\.\.\//g, "__dotdot/"), "", Utils.canonicalizeForHarness); - if (startsWith(path, "/")) { - return path.substring(1); - } - return path; -} - -export namespace Utils { - export const canonicalizeForHarness = createGetCanonicalFileName(/*caseSensitive*/ false); // This is done so tests work on windows _and_ linux - - export function removeByteOrderMark(text: string): string { - const length = getByteOrderMarkLength(text); - return length ? text.slice(length) : text; - } - - export function getByteOrderMarkLength(text: string): number { - if (text.length >= 1) { - const ch0 = text.charCodeAt(0); - if (ch0 === 0xfeff) return 1; - if (ch0 === 0xfe) return text.length >= 2 && text.charCodeAt(1) === 0xff ? 2 : 0; - if (ch0 === 0xff) return text.length >= 2 && text.charCodeAt(1) === 0xfe ? 2 : 0; - if (ch0 === 0xef) return text.length >= 3 && text.charCodeAt(1) === 0xbb && text.charCodeAt(2) === 0xbf ? 3 : 0; - } - return 0; - } - - export function addUTF8ByteOrderMark(text: string) { - return getByteOrderMarkLength(text) === 0 ? "\u00EF\u00BB\u00BF" + text : text; - } -} diff --git a/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts b/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts deleted file mode 100644 index e1c86124f297f..0000000000000 --- a/external-declarations/src/test-runner/tsc-infrastructure/compiler.ts +++ /dev/null @@ -1,277 +0,0 @@ -import * as ts from "typescript"; - -import * as lang from "../../compiler/lang-utils"; -import { - fileExtensionIs, -} from "../../compiler/path-utils"; -import { - getDeclarationEmitExtensionForPath, - getOutputExtension, -} from "../../compiler/utils"; -import * as collections from "./collections"; -import * as fakes from "./fakesHosts"; -import * as documents from "./test-document"; -import * as vfs from "./vfs"; -import * as vpath from "./vpath"; - -/** - * Test harness compiler functionality. - */ - -export interface Project { - file: string; - config?: ts.ParsedCommandLine; - errors?: ts.Diagnostic[]; -} - -export function readProject(host: fakes.ParseConfigHost, project: string | undefined, existingOptions?: ts.CompilerOptions): Project | undefined { - if (project) { - project = vpath.isTsConfigFile(project) ? project : vpath.combine(project, "tsconfig.json"); - } - else { - [project] = host.vfs.scanSync(".", "ancestors-or-self", { - accept: (path, stats) => stats.isFile() && host.vfs.stringComparer(vpath.basename(path), "tsconfig.json") === 0, - }); - } - - if (project) { - // TODO(rbuckton): Do we need to resolve this? Resolving breaks projects tests. - // project = vpath.resolve(host.vfs.currentDirectory, project); - - // read the config file - const readResult = ts.readConfigFile(project, path => host.readFile(path)); - if (readResult.error) { - return { file: project, errors: [readResult.error] }; - } - - // parse the config file - const config = ts.parseJsonConfigFileContent(readResult.config, host, vpath.dirname(project), existingOptions); - return { file: project, errors: config.errors, config }; - } -} - -/** - * Correlates compilation inputs and outputs - */ -export interface CompilationOutput { - readonly inputs: readonly documents.TextDocument[]; - readonly js: documents.TextDocument | undefined; - readonly dts: documents.TextDocument | undefined; - readonly map: documents.TextDocument | undefined; -} - -export class CompilationResult { - public readonly host: fakes.CompilerHost; - public readonly program: ts.Program | undefined; - public readonly result: ts.EmitResult | undefined; - public readonly options: ts.CompilerOptions; - public readonly diagnostics: readonly ts.Diagnostic[]; - public readonly js: ReadonlyMap; - public readonly dts: ReadonlyMap; - public readonly maps: ReadonlyMap; - public symlinks?: vfs.FileSet; // Location to store original symlinks so they may be used in both original and declaration file compilations - - private _inputs: documents.TextDocument[] = []; - private _inputsAndOutputs: collections.SortedMap; - - constructor(host: fakes.CompilerHost, options: ts.CompilerOptions, program: ts.Program | undefined, result: ts.EmitResult | undefined, diagnostics: readonly ts.Diagnostic[]) { - this.host = host; - this.program = program; - this.result = result; - this.diagnostics = diagnostics; - this.options = program ? program.getCompilerOptions() : options; - - // collect outputs - const js = this.js = new collections.SortedMap({ comparer: this.vfs.stringComparer, sort: "insertion" }); - const dts = this.dts = new collections.SortedMap({ comparer: this.vfs.stringComparer, sort: "insertion" }); - const maps = this.maps = new collections.SortedMap({ comparer: this.vfs.stringComparer, sort: "insertion" }); - for (const document of this.host.outputs) { - if (vpath.isJavaScript(document.file) || fileExtensionIs(document.file, ts.Extension.Json)) { - js.set(document.file, document); - } - else if (vpath.isDeclaration(document.file)) { - dts.set(document.file, document); - } - else if (vpath.isSourceMap(document.file)) { - maps.set(document.file, document); - } - } - - // correlate inputs and outputs - this._inputsAndOutputs = new collections.SortedMap({ comparer: this.vfs.stringComparer, sort: "insertion" }); - if (program) { - if (this.options.out || this.options.outFile) { - const outFile = vpath.resolve(this.vfs.cwd(), this.options.outFile || this.options.out); - const inputs: documents.TextDocument[] = []; - for (const sourceFile of program.getSourceFiles()) { - if (sourceFile) { - const input = new documents.TextDocument(sourceFile.fileName, sourceFile.text); - this._inputs.push(input); - if (!vpath.isDeclaration(sourceFile.fileName)) { - inputs.push(input); - } - } - } - - const outputs: CompilationOutput = { - inputs, - js: js.get(outFile), - dts: dts.get(vpath.changeExtension(outFile, ".d.ts")), - map: maps.get(outFile + ".map"), - }; - - if (outputs.js) this._inputsAndOutputs.set(outputs.js.file, outputs); - if (outputs.dts) this._inputsAndOutputs.set(outputs.dts.file, outputs); - if (outputs.map) this._inputsAndOutputs.set(outputs.map.file, outputs); - - for (const input of inputs) { - this._inputsAndOutputs.set(input.file, outputs); - } - } - else { - for (const sourceFile of program.getSourceFiles()) { - if (sourceFile) { - const input = new documents.TextDocument(sourceFile.fileName, sourceFile.text); - this._inputs.push(input); - if (!vpath.isDeclaration(sourceFile.fileName)) { - const extname = getOutputExtension(sourceFile.fileName, this.options); - const outputs: CompilationOutput = { - inputs: [input], - js: js.get(this.getOutputPath(sourceFile.fileName, extname)), - dts: dts.get(this.getOutputPath(sourceFile.fileName, getDeclarationEmitExtensionForPath(sourceFile.fileName))), - map: maps.get(this.getOutputPath(sourceFile.fileName, extname + ".map")), - }; - - this._inputsAndOutputs.set(sourceFile.fileName, outputs); - if (outputs.js) this._inputsAndOutputs.set(outputs.js.file, outputs); - if (outputs.dts) this._inputsAndOutputs.set(outputs.dts.file, outputs); - if (outputs.map) this._inputsAndOutputs.set(outputs.map.file, outputs); - } - } - } - } - } - } - - public get vfs(): vfs.FileSystem { - return this.host.vfs; - } - - public get inputs(): readonly documents.TextDocument[] { - return this._inputs; - } - - public get outputs(): readonly documents.TextDocument[] { - return this.host.outputs; - } - - public get traces(): readonly string[] { - return this.host.traces; - } - - public get emitSkipped(): boolean { - return this.result && this.result.emitSkipped || false; - } - - public get singleFile(): boolean { - return !!this.options.outFile || !!this.options.out; - } - - public get commonSourceDirectory(): string { - const common = this.program && (this.program as any).getCommonSourceDirectory() || ""; - return common && vpath.combine(this.vfs.cwd(), common); - } - - public getInputsAndOutputs(path: string): CompilationOutput | undefined { - return this._inputsAndOutputs.get(vpath.resolve(this.vfs.cwd(), path)); - } - - public getInputs(path: string): readonly documents.TextDocument[] | undefined { - const outputs = this.getInputsAndOutputs(path); - return outputs && outputs.inputs; - } - - public getOutput(path: string, kind: "js" | "dts" | "map"): documents.TextDocument | undefined { - const outputs = this.getInputsAndOutputs(path); - return outputs && outputs[kind]; - } - - public getOutputPath(path: string, ext: string): string { - if (this.options.outFile || this.options.out) { - path = vpath.resolve(this.vfs.cwd(), this.options.outFile || this.options.out); - } - else { - path = vpath.resolve(this.vfs.cwd(), path); - const outDir = ext === ".d.ts" || ext === ".json.d.ts" || ext === ".d.mts" || ext === ".d.cts" ? this.options.declarationDir || this.options.outDir : this.options.outDir; - if (outDir) { - const common = this.commonSourceDirectory; - if (common) { - path = vpath.relative(common, path, this.vfs.ignoreCase); - path = vpath.combine(vpath.resolve(this.vfs.cwd(), this.options.outDir), path); - } - } - } - return vpath.changeExtension(path, ext); - } - - public getNumberOfJsFiles(includeJson: boolean) { - if (includeJson) { - return this.js.size; - } - else { - let count = this.js.size; - this.js.forEach(document => { - if (fileExtensionIs(document.file, ts.Extension.Json)) { - count--; - } - }); - return count; - } - } -} - -export function compileFiles(host: fakes.CompilerHost, rootFiles: string[] | undefined, compilerOptions: ts.CompilerOptions): CompilationResult { - if (compilerOptions.project || !rootFiles || rootFiles.length === 0) { - const project = readProject(host.parseConfigHost, compilerOptions.project, compilerOptions); - if (project) { - if (project.errors && project.errors.length > 0) { - return new CompilationResult(host, compilerOptions, /*program*/ undefined, /*result*/ undefined, project.errors); - } - if (project.config) { - rootFiles = project.config.fileNames; - compilerOptions = project.config.options; - } - } - delete compilerOptions.project; - } - - // establish defaults (aligns with old harness) - if (compilerOptions.target === undefined && compilerOptions.module !== ts.ModuleKind.Node16 && compilerOptions.module !== ts.ModuleKind.NodeNext) compilerOptions.target = ts.ScriptTarget.ES3; - if (compilerOptions.newLine === undefined) compilerOptions.newLine = ts.NewLineKind.CarriageReturnLineFeed; - if (compilerOptions.skipDefaultLibCheck === undefined) compilerOptions.skipDefaultLibCheck = true; - if (compilerOptions.noErrorTruncation === undefined) compilerOptions.noErrorTruncation = true; - - // 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 = lang.length(rootFiles) >= 100 || (!!compilerOptions.skipLibCheck && !!compilerOptions.declaration); - - const preProgram = !skipErrorComparison ? ts.createProgram(rootFiles || [], { ...compilerOptions, configFile: compilerOptions.configFile, traceResolution: false }, host) : undefined; - - const preErrors = preProgram && ts.getPreEmitDiagnostics(preProgram); - const program = ts.createProgram(rootFiles || [], compilerOptions, host); - - const emitResult = program.emit( - /*targetSourceFile*/ undefined, - /*writeFile*/ undefined, - /*cancellationToken*/ undefined, - /*emitOnlyDtsFiles*/ undefined, - /*customTransformers*/ undefined, - // @ts-expect-error We use forceDts emit documented flag - /*forceEmit*/ false, - ); - const postErrors = ts.getPreEmitDiagnostics(program); - const longerErrors = lang.length(preErrors) > postErrors.length ? preErrors : postErrors; - const shorterErrors = longerErrors === preErrors ? postErrors : preErrors; - const errors = preErrors && (preErrors.length !== postErrors.length) ? [...shorterErrors!] : postErrors; - return new CompilationResult(host, compilerOptions, program, emitResult, errors); -} diff --git a/external-declarations/src/test-runner/tsc-infrastructure/diagnosticInformationMap.generated.ts b/external-declarations/src/test-runner/tsc-infrastructure/diagnosticInformationMap.generated.ts deleted file mode 100644 index e4d7ed614ed3f..0000000000000 --- a/external-declarations/src/test-runner/tsc-infrastructure/diagnosticInformationMap.generated.ts +++ /dev/null @@ -1,1893 +0,0 @@ -// -// generated from 'src/compiler/diagnosticMessages.json' - -import { DiagnosticCategory, DiagnosticMessage } from "typescript"; - - -function diag(code: number, category: DiagnosticCategory, key: string, message: string, reportsUnnecessary?: {}, elidedInCompatabilityPyramid?: boolean, reportsDeprecated?: {}): DiagnosticMessage { - return { code, category, key, message, reportsUnnecessary, reportsDeprecated }; -} - -/** @internal */ -export const Diagnostics = { - Unterminated_string_literal: diag(1002, DiagnosticCategory.Error, "Unterminated_string_literal_1002", "Unterminated string literal."), - Identifier_expected: diag(1003, DiagnosticCategory.Error, "Identifier_expected_1003", "Identifier expected."), - _0_expected: diag(1005, DiagnosticCategory.Error, "_0_expected_1005", "'{0}' expected."), - A_file_cannot_have_a_reference_to_itself: diag(1006, DiagnosticCategory.Error, "A_file_cannot_have_a_reference_to_itself_1006", "A file cannot have a reference to itself."), - The_parser_expected_to_find_a_1_to_match_the_0_token_here: diag(1007, DiagnosticCategory.Error, "The_parser_expected_to_find_a_1_to_match_the_0_token_here_1007", "The parser expected to find a '{1}' to match the '{0}' token here."), - Trailing_comma_not_allowed: diag(1009, DiagnosticCategory.Error, "Trailing_comma_not_allowed_1009", "Trailing comma not allowed."), - Asterisk_Slash_expected: diag(1010, DiagnosticCategory.Error, "Asterisk_Slash_expected_1010", "'*/' expected."), - An_element_access_expression_should_take_an_argument: diag(1011, DiagnosticCategory.Error, "An_element_access_expression_should_take_an_argument_1011", "An element access expression should take an argument."), - Unexpected_token: diag(1012, DiagnosticCategory.Error, "Unexpected_token_1012", "Unexpected token."), - A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma: diag(1013, DiagnosticCategory.Error, "A_rest_parameter_or_binding_pattern_may_not_have_a_trailing_comma_1013", "A rest parameter or binding pattern may not have a trailing comma."), - A_rest_parameter_must_be_last_in_a_parameter_list: diag(1014, DiagnosticCategory.Error, "A_rest_parameter_must_be_last_in_a_parameter_list_1014", "A rest parameter must be last in a parameter list."), - Parameter_cannot_have_question_mark_and_initializer: diag(1015, DiagnosticCategory.Error, "Parameter_cannot_have_question_mark_and_initializer_1015", "Parameter cannot have question mark and initializer."), - A_required_parameter_cannot_follow_an_optional_parameter: diag(1016, DiagnosticCategory.Error, "A_required_parameter_cannot_follow_an_optional_parameter_1016", "A required parameter cannot follow an optional parameter."), - An_index_signature_cannot_have_a_rest_parameter: diag(1017, DiagnosticCategory.Error, "An_index_signature_cannot_have_a_rest_parameter_1017", "An index signature cannot have a rest parameter."), - An_index_signature_parameter_cannot_have_an_accessibility_modifier: diag(1018, DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018", "An index signature parameter cannot have an accessibility modifier."), - An_index_signature_parameter_cannot_have_a_question_mark: diag(1019, DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_a_question_mark_1019", "An index signature parameter cannot have a question mark."), - An_index_signature_parameter_cannot_have_an_initializer: diag(1020, DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_an_initializer_1020", "An index signature parameter cannot have an initializer."), - An_index_signature_must_have_a_type_annotation: diag(1021, DiagnosticCategory.Error, "An_index_signature_must_have_a_type_annotation_1021", "An index signature must have a type annotation."), - An_index_signature_parameter_must_have_a_type_annotation: diag(1022, DiagnosticCategory.Error, "An_index_signature_parameter_must_have_a_type_annotation_1022", "An index signature parameter must have a type annotation."), - readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature: diag(1024, DiagnosticCategory.Error, "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", "'readonly' modifier can only appear on a property declaration or index signature."), - An_index_signature_cannot_have_a_trailing_comma: diag(1025, DiagnosticCategory.Error, "An_index_signature_cannot_have_a_trailing_comma_1025", "An index signature cannot have a trailing comma."), - Accessibility_modifier_already_seen: diag(1028, DiagnosticCategory.Error, "Accessibility_modifier_already_seen_1028", "Accessibility modifier already seen."), - _0_modifier_must_precede_1_modifier: diag(1029, DiagnosticCategory.Error, "_0_modifier_must_precede_1_modifier_1029", "'{0}' modifier must precede '{1}' modifier."), - _0_modifier_already_seen: diag(1030, DiagnosticCategory.Error, "_0_modifier_already_seen_1030", "'{0}' modifier already seen."), - _0_modifier_cannot_appear_on_class_elements_of_this_kind: diag(1031, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_class_elements_of_this_kind_1031", "'{0}' modifier cannot appear on class elements of this kind."), - super_must_be_followed_by_an_argument_list_or_member_access: diag(1034, DiagnosticCategory.Error, "super_must_be_followed_by_an_argument_list_or_member_access_1034", "'super' must be followed by an argument list or member access."), - Only_ambient_modules_can_use_quoted_names: diag(1035, DiagnosticCategory.Error, "Only_ambient_modules_can_use_quoted_names_1035", "Only ambient modules can use quoted names."), - Statements_are_not_allowed_in_ambient_contexts: diag(1036, DiagnosticCategory.Error, "Statements_are_not_allowed_in_ambient_contexts_1036", "Statements are not allowed in ambient contexts."), - A_declare_modifier_cannot_be_used_in_an_already_ambient_context: diag(1038, DiagnosticCategory.Error, "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038", "A 'declare' modifier cannot be used in an already ambient context."), - Initializers_are_not_allowed_in_ambient_contexts: diag(1039, DiagnosticCategory.Error, "Initializers_are_not_allowed_in_ambient_contexts_1039", "Initializers are not allowed in ambient contexts."), - _0_modifier_cannot_be_used_in_an_ambient_context: diag(1040, DiagnosticCategory.Error, "_0_modifier_cannot_be_used_in_an_ambient_context_1040", "'{0}' modifier cannot be used in an ambient context."), - _0_modifier_cannot_be_used_here: diag(1042, DiagnosticCategory.Error, "_0_modifier_cannot_be_used_here_1042", "'{0}' modifier cannot be used here."), - _0_modifier_cannot_appear_on_a_module_or_namespace_element: diag(1044, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044", "'{0}' modifier cannot appear on a module or namespace element."), - Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier: diag(1046, DiagnosticCategory.Error, "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046", "Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."), - A_rest_parameter_cannot_be_optional: diag(1047, DiagnosticCategory.Error, "A_rest_parameter_cannot_be_optional_1047", "A rest parameter cannot be optional."), - A_rest_parameter_cannot_have_an_initializer: diag(1048, DiagnosticCategory.Error, "A_rest_parameter_cannot_have_an_initializer_1048", "A rest parameter cannot have an initializer."), - A_set_accessor_must_have_exactly_one_parameter: diag(1049, DiagnosticCategory.Error, "A_set_accessor_must_have_exactly_one_parameter_1049", "A 'set' accessor must have exactly one parameter."), - A_set_accessor_cannot_have_an_optional_parameter: diag(1051, DiagnosticCategory.Error, "A_set_accessor_cannot_have_an_optional_parameter_1051", "A 'set' accessor cannot have an optional parameter."), - A_set_accessor_parameter_cannot_have_an_initializer: diag(1052, DiagnosticCategory.Error, "A_set_accessor_parameter_cannot_have_an_initializer_1052", "A 'set' accessor parameter cannot have an initializer."), - A_set_accessor_cannot_have_rest_parameter: diag(1053, DiagnosticCategory.Error, "A_set_accessor_cannot_have_rest_parameter_1053", "A 'set' accessor cannot have rest parameter."), - A_get_accessor_cannot_have_parameters: diag(1054, DiagnosticCategory.Error, "A_get_accessor_cannot_have_parameters_1054", "A 'get' accessor cannot have parameters."), - Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value: diag(1055, DiagnosticCategory.Error, "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055", "Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value."), - Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: diag(1056, DiagnosticCategory.Error, "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056", "Accessors are only available when targeting ECMAScript 5 and higher."), - The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1058, DiagnosticCategory.Error, "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058", "The return type of an async function must either be a valid promise or must not contain a callable 'then' member."), - A_promise_must_have_a_then_method: diag(1059, DiagnosticCategory.Error, "A_promise_must_have_a_then_method_1059", "A promise must have a 'then' method."), - The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback: diag(1060, DiagnosticCategory.Error, "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060", "The first parameter of the 'then' method of a promise must be a callback."), - Enum_member_must_have_initializer: diag(1061, DiagnosticCategory.Error, "Enum_member_must_have_initializer_1061", "Enum member must have initializer."), - Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method: diag(1062, DiagnosticCategory.Error, "Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062", "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method."), - An_export_assignment_cannot_be_used_in_a_namespace: diag(1063, DiagnosticCategory.Error, "An_export_assignment_cannot_be_used_in_a_namespace_1063", "An export assignment cannot be used in a namespace."), - The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0: diag(1064, DiagnosticCategory.Error, "The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_wri_1064", "The return type of an async function or method must be the global Promise type. Did you mean to write 'Promise<{0}>'?"), - In_ambient_enum_declarations_member_initializer_must_be_constant_expression: diag(1066, DiagnosticCategory.Error, "In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066", "In ambient enum declarations member initializer must be constant expression."), - Unexpected_token_A_constructor_method_accessor_or_property_was_expected: diag(1068, DiagnosticCategory.Error, "Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068", "Unexpected token. A constructor, method, accessor, or property was expected."), - Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces: diag(1069, DiagnosticCategory.Error, "Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces_1069", "Unexpected token. A type parameter name was expected without curly braces."), - _0_modifier_cannot_appear_on_a_type_member: diag(1070, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_type_member_1070", "'{0}' modifier cannot appear on a type member."), - _0_modifier_cannot_appear_on_an_index_signature: diag(1071, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_an_index_signature_1071", "'{0}' modifier cannot appear on an index signature."), - A_0_modifier_cannot_be_used_with_an_import_declaration: diag(1079, DiagnosticCategory.Error, "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", "A '{0}' modifier cannot be used with an import declaration."), - Invalid_reference_directive_syntax: diag(1084, DiagnosticCategory.Error, "Invalid_reference_directive_syntax_1084", "Invalid 'reference' directive syntax."), - Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0: diag(1085, DiagnosticCategory.Error, "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085", "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'."), - _0_modifier_cannot_appear_on_a_constructor_declaration: diag(1089, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_constructor_declaration_1089", "'{0}' modifier cannot appear on a constructor declaration."), - _0_modifier_cannot_appear_on_a_parameter: diag(1090, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_parameter_1090", "'{0}' modifier cannot appear on a parameter."), - Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: diag(1091, DiagnosticCategory.Error, "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091", "Only a single variable declaration is allowed in a 'for...in' statement."), - Type_parameters_cannot_appear_on_a_constructor_declaration: diag(1092, DiagnosticCategory.Error, "Type_parameters_cannot_appear_on_a_constructor_declaration_1092", "Type parameters cannot appear on a constructor declaration."), - Type_annotation_cannot_appear_on_a_constructor_declaration: diag(1093, DiagnosticCategory.Error, "Type_annotation_cannot_appear_on_a_constructor_declaration_1093", "Type annotation cannot appear on a constructor declaration."), - An_accessor_cannot_have_type_parameters: diag(1094, DiagnosticCategory.Error, "An_accessor_cannot_have_type_parameters_1094", "An accessor cannot have type parameters."), - A_set_accessor_cannot_have_a_return_type_annotation: diag(1095, DiagnosticCategory.Error, "A_set_accessor_cannot_have_a_return_type_annotation_1095", "A 'set' accessor cannot have a return type annotation."), - An_index_signature_must_have_exactly_one_parameter: diag(1096, DiagnosticCategory.Error, "An_index_signature_must_have_exactly_one_parameter_1096", "An index signature must have exactly one parameter."), - _0_list_cannot_be_empty: diag(1097, DiagnosticCategory.Error, "_0_list_cannot_be_empty_1097", "'{0}' list cannot be empty."), - Type_parameter_list_cannot_be_empty: diag(1098, DiagnosticCategory.Error, "Type_parameter_list_cannot_be_empty_1098", "Type parameter list cannot be empty."), - Type_argument_list_cannot_be_empty: diag(1099, DiagnosticCategory.Error, "Type_argument_list_cannot_be_empty_1099", "Type argument list cannot be empty."), - Invalid_use_of_0_in_strict_mode: diag(1100, DiagnosticCategory.Error, "Invalid_use_of_0_in_strict_mode_1100", "Invalid use of '{0}' in strict mode."), - with_statements_are_not_allowed_in_strict_mode: diag(1101, DiagnosticCategory.Error, "with_statements_are_not_allowed_in_strict_mode_1101", "'with' statements are not allowed in strict mode."), - delete_cannot_be_called_on_an_identifier_in_strict_mode: diag(1102, DiagnosticCategory.Error, "delete_cannot_be_called_on_an_identifier_in_strict_mode_1102", "'delete' cannot be called on an identifier in strict mode."), - for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1103, DiagnosticCategory.Error, "for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103", "'for await' loops are only allowed within async functions and at the top levels of modules."), - A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: diag(1104, DiagnosticCategory.Error, "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104", "A 'continue' statement can only be used within an enclosing iteration statement."), - A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: diag(1105, DiagnosticCategory.Error, "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105", "A 'break' statement can only be used within an enclosing iteration or switch statement."), - The_left_hand_side_of_a_for_of_statement_may_not_be_async: diag(1106, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106", "The left-hand side of a 'for...of' statement may not be 'async'."), - Jump_target_cannot_cross_function_boundary: diag(1107, DiagnosticCategory.Error, "Jump_target_cannot_cross_function_boundary_1107", "Jump target cannot cross function boundary."), - A_return_statement_can_only_be_used_within_a_function_body: diag(1108, DiagnosticCategory.Error, "A_return_statement_can_only_be_used_within_a_function_body_1108", "A 'return' statement can only be used within a function body."), - Expression_expected: diag(1109, DiagnosticCategory.Error, "Expression_expected_1109", "Expression expected."), - Type_expected: diag(1110, DiagnosticCategory.Error, "Type_expected_1110", "Type expected."), - A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: diag(1113, DiagnosticCategory.Error, "A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113", "A 'default' clause cannot appear more than once in a 'switch' statement."), - Duplicate_label_0: diag(1114, DiagnosticCategory.Error, "Duplicate_label_0_1114", "Duplicate label '{0}'."), - A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: diag(1115, DiagnosticCategory.Error, "A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115", "A 'continue' statement can only jump to a label of an enclosing iteration statement."), - A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: diag(1116, DiagnosticCategory.Error, "A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116", "A 'break' statement can only jump to a label of an enclosing statement."), - An_object_literal_cannot_have_multiple_properties_with_the_same_name: diag(1117, DiagnosticCategory.Error, "An_object_literal_cannot_have_multiple_properties_with_the_same_name_1117", "An object literal cannot have multiple properties with the same name."), - An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: diag(1118, DiagnosticCategory.Error, "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118", "An object literal cannot have multiple get/set accessors with the same name."), - An_object_literal_cannot_have_property_and_accessor_with_the_same_name: diag(1119, DiagnosticCategory.Error, "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119", "An object literal cannot have property and accessor with the same name."), - An_export_assignment_cannot_have_modifiers: diag(1120, DiagnosticCategory.Error, "An_export_assignment_cannot_have_modifiers_1120", "An export assignment cannot have modifiers."), - Octal_literals_are_not_allowed_in_strict_mode: diag(1121, DiagnosticCategory.Error, "Octal_literals_are_not_allowed_in_strict_mode_1121", "Octal literals are not allowed in strict mode."), - Variable_declaration_list_cannot_be_empty: diag(1123, DiagnosticCategory.Error, "Variable_declaration_list_cannot_be_empty_1123", "Variable declaration list cannot be empty."), - Digit_expected: diag(1124, DiagnosticCategory.Error, "Digit_expected_1124", "Digit expected."), - Hexadecimal_digit_expected: diag(1125, DiagnosticCategory.Error, "Hexadecimal_digit_expected_1125", "Hexadecimal digit expected."), - Unexpected_end_of_text: diag(1126, DiagnosticCategory.Error, "Unexpected_end_of_text_1126", "Unexpected end of text."), - Invalid_character: diag(1127, DiagnosticCategory.Error, "Invalid_character_1127", "Invalid character."), - Declaration_or_statement_expected: diag(1128, DiagnosticCategory.Error, "Declaration_or_statement_expected_1128", "Declaration or statement expected."), - Statement_expected: diag(1129, DiagnosticCategory.Error, "Statement_expected_1129", "Statement expected."), - case_or_default_expected: diag(1130, DiagnosticCategory.Error, "case_or_default_expected_1130", "'case' or 'default' expected."), - Property_or_signature_expected: diag(1131, DiagnosticCategory.Error, "Property_or_signature_expected_1131", "Property or signature expected."), - Enum_member_expected: diag(1132, DiagnosticCategory.Error, "Enum_member_expected_1132", "Enum member expected."), - Variable_declaration_expected: diag(1134, DiagnosticCategory.Error, "Variable_declaration_expected_1134", "Variable declaration expected."), - Argument_expression_expected: diag(1135, DiagnosticCategory.Error, "Argument_expression_expected_1135", "Argument expression expected."), - Property_assignment_expected: diag(1136, DiagnosticCategory.Error, "Property_assignment_expected_1136", "Property assignment expected."), - Expression_or_comma_expected: diag(1137, DiagnosticCategory.Error, "Expression_or_comma_expected_1137", "Expression or comma expected."), - Parameter_declaration_expected: diag(1138, DiagnosticCategory.Error, "Parameter_declaration_expected_1138", "Parameter declaration expected."), - Type_parameter_declaration_expected: diag(1139, DiagnosticCategory.Error, "Type_parameter_declaration_expected_1139", "Type parameter declaration expected."), - Type_argument_expected: diag(1140, DiagnosticCategory.Error, "Type_argument_expected_1140", "Type argument expected."), - String_literal_expected: diag(1141, DiagnosticCategory.Error, "String_literal_expected_1141", "String literal expected."), - Line_break_not_permitted_here: diag(1142, DiagnosticCategory.Error, "Line_break_not_permitted_here_1142", "Line break not permitted here."), - or_expected: diag(1144, DiagnosticCategory.Error, "or_expected_1144", "'{' or ';' expected."), - or_JSX_element_expected: diag(1145, DiagnosticCategory.Error, "or_JSX_element_expected_1145", "'{' or JSX element expected."), - Declaration_expected: diag(1146, DiagnosticCategory.Error, "Declaration_expected_1146", "Declaration expected."), - Import_declarations_in_a_namespace_cannot_reference_a_module: diag(1147, DiagnosticCategory.Error, "Import_declarations_in_a_namespace_cannot_reference_a_module_1147", "Import declarations in a namespace cannot reference a module."), - Cannot_use_imports_exports_or_module_augmentations_when_module_is_none: diag(1148, DiagnosticCategory.Error, "Cannot_use_imports_exports_or_module_augmentations_when_module_is_none_1148", "Cannot use imports, exports, or module augmentations when '--module' is 'none'."), - File_name_0_differs_from_already_included_file_name_1_only_in_casing: diag(1149, DiagnosticCategory.Error, "File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149", "File name '{0}' differs from already included file name '{1}' only in casing."), - const_declarations_must_be_initialized: diag(1155, DiagnosticCategory.Error, "const_declarations_must_be_initialized_1155", "'const' declarations must be initialized."), - const_declarations_can_only_be_declared_inside_a_block: diag(1156, DiagnosticCategory.Error, "const_declarations_can_only_be_declared_inside_a_block_1156", "'const' declarations can only be declared inside a block."), - let_declarations_can_only_be_declared_inside_a_block: diag(1157, DiagnosticCategory.Error, "let_declarations_can_only_be_declared_inside_a_block_1157", "'let' declarations can only be declared inside a block."), - Unterminated_template_literal: diag(1160, DiagnosticCategory.Error, "Unterminated_template_literal_1160", "Unterminated template literal."), - Unterminated_regular_expression_literal: diag(1161, DiagnosticCategory.Error, "Unterminated_regular_expression_literal_1161", "Unterminated regular expression literal."), - An_object_member_cannot_be_declared_optional: diag(1162, DiagnosticCategory.Error, "An_object_member_cannot_be_declared_optional_1162", "An object member cannot be declared optional."), - A_yield_expression_is_only_allowed_in_a_generator_body: diag(1163, DiagnosticCategory.Error, "A_yield_expression_is_only_allowed_in_a_generator_body_1163", "A 'yield' expression is only allowed in a generator body."), - Computed_property_names_are_not_allowed_in_enums: diag(1164, DiagnosticCategory.Error, "Computed_property_names_are_not_allowed_in_enums_1164", "Computed property names are not allowed in enums."), - A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1165, DiagnosticCategory.Error, "A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165", "A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."), - A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type: diag(1166, DiagnosticCategory.Error, "A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166", "A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type."), - A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1168, DiagnosticCategory.Error, "A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168", "A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."), - A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1169, DiagnosticCategory.Error, "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169", "A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."), - A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1170, DiagnosticCategory.Error, "A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170", "A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."), - A_comma_expression_is_not_allowed_in_a_computed_property_name: diag(1171, DiagnosticCategory.Error, "A_comma_expression_is_not_allowed_in_a_computed_property_name_1171", "A comma expression is not allowed in a computed property name."), - extends_clause_already_seen: diag(1172, DiagnosticCategory.Error, "extends_clause_already_seen_1172", "'extends' clause already seen."), - extends_clause_must_precede_implements_clause: diag(1173, DiagnosticCategory.Error, "extends_clause_must_precede_implements_clause_1173", "'extends' clause must precede 'implements' clause."), - Classes_can_only_extend_a_single_class: diag(1174, DiagnosticCategory.Error, "Classes_can_only_extend_a_single_class_1174", "Classes can only extend a single class."), - implements_clause_already_seen: diag(1175, DiagnosticCategory.Error, "implements_clause_already_seen_1175", "'implements' clause already seen."), - Interface_declaration_cannot_have_implements_clause: diag(1176, DiagnosticCategory.Error, "Interface_declaration_cannot_have_implements_clause_1176", "Interface declaration cannot have 'implements' clause."), - Binary_digit_expected: diag(1177, DiagnosticCategory.Error, "Binary_digit_expected_1177", "Binary digit expected."), - Octal_digit_expected: diag(1178, DiagnosticCategory.Error, "Octal_digit_expected_1178", "Octal digit expected."), - Unexpected_token_expected: diag(1179, DiagnosticCategory.Error, "Unexpected_token_expected_1179", "Unexpected token. '{' expected."), - Property_destructuring_pattern_expected: diag(1180, DiagnosticCategory.Error, "Property_destructuring_pattern_expected_1180", "Property destructuring pattern expected."), - Array_element_destructuring_pattern_expected: diag(1181, DiagnosticCategory.Error, "Array_element_destructuring_pattern_expected_1181", "Array element destructuring pattern expected."), - A_destructuring_declaration_must_have_an_initializer: diag(1182, DiagnosticCategory.Error, "A_destructuring_declaration_must_have_an_initializer_1182", "A destructuring declaration must have an initializer."), - An_implementation_cannot_be_declared_in_ambient_contexts: diag(1183, DiagnosticCategory.Error, "An_implementation_cannot_be_declared_in_ambient_contexts_1183", "An implementation cannot be declared in ambient contexts."), - Modifiers_cannot_appear_here: diag(1184, DiagnosticCategory.Error, "Modifiers_cannot_appear_here_1184", "Modifiers cannot appear here."), - Merge_conflict_marker_encountered: diag(1185, DiagnosticCategory.Error, "Merge_conflict_marker_encountered_1185", "Merge conflict marker encountered."), - A_rest_element_cannot_have_an_initializer: diag(1186, DiagnosticCategory.Error, "A_rest_element_cannot_have_an_initializer_1186", "A rest element cannot have an initializer."), - A_parameter_property_may_not_be_declared_using_a_binding_pattern: diag(1187, DiagnosticCategory.Error, "A_parameter_property_may_not_be_declared_using_a_binding_pattern_1187", "A parameter property may not be declared using a binding pattern."), - Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement: diag(1188, DiagnosticCategory.Error, "Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188", "Only a single variable declaration is allowed in a 'for...of' statement."), - The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer: diag(1189, DiagnosticCategory.Error, "The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189", "The variable declaration of a 'for...in' statement cannot have an initializer."), - The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer: diag(1190, DiagnosticCategory.Error, "The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190", "The variable declaration of a 'for...of' statement cannot have an initializer."), - An_import_declaration_cannot_have_modifiers: diag(1191, DiagnosticCategory.Error, "An_import_declaration_cannot_have_modifiers_1191", "An import declaration cannot have modifiers."), - Module_0_has_no_default_export: diag(1192, DiagnosticCategory.Error, "Module_0_has_no_default_export_1192", "Module '{0}' has no default export."), - An_export_declaration_cannot_have_modifiers: diag(1193, DiagnosticCategory.Error, "An_export_declaration_cannot_have_modifiers_1193", "An export declaration cannot have modifiers."), - Export_declarations_are_not_permitted_in_a_namespace: diag(1194, DiagnosticCategory.Error, "Export_declarations_are_not_permitted_in_a_namespace_1194", "Export declarations are not permitted in a namespace."), - export_Asterisk_does_not_re_export_a_default: diag(1195, DiagnosticCategory.Error, "export_Asterisk_does_not_re_export_a_default_1195", "'export *' does not re-export a default."), - Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified: diag(1196, DiagnosticCategory.Error, "Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified_1196", "Catch clause variable type annotation must be 'any' or 'unknown' if specified."), - Catch_clause_variable_cannot_have_an_initializer: diag(1197, DiagnosticCategory.Error, "Catch_clause_variable_cannot_have_an_initializer_1197", "Catch clause variable cannot have an initializer."), - An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: diag(1198, DiagnosticCategory.Error, "An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198", "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive."), - Unterminated_Unicode_escape_sequence: diag(1199, DiagnosticCategory.Error, "Unterminated_Unicode_escape_sequence_1199", "Unterminated Unicode escape sequence."), - Line_terminator_not_permitted_before_arrow: diag(1200, DiagnosticCategory.Error, "Line_terminator_not_permitted_before_arrow_1200", "Line terminator not permitted before arrow."), - Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead: diag(1202, DiagnosticCategory.Error, "Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_1202", "Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead."), - Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead: diag(1203, DiagnosticCategory.Error, "Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or__1203", "Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead."), - Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type: diag(1205, DiagnosticCategory.Error, "Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type_1205", "Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'."), - Decorators_are_not_valid_here: diag(1206, DiagnosticCategory.Error, "Decorators_are_not_valid_here_1206", "Decorators are not valid here."), - Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: diag(1207, DiagnosticCategory.Error, "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", "Decorators cannot be applied to multiple get/set accessors of the same name."), - _0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_import_export_or_an_empty_export_statement_to_make_it_a_module: diag(1208, DiagnosticCategory.Error, "_0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_imp_1208", "'{0}' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module."), - Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0: diag(1209, DiagnosticCategory.Error, "Invalid_optional_chain_from_new_expression_Did_you_mean_to_call_0_1209", "Invalid optional chain from new expression. Did you mean to call '{0}()'?"), - Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode: diag(1210, DiagnosticCategory.Error, "Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210", "Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."), - A_class_declaration_without_the_default_modifier_must_have_a_name: diag(1211, DiagnosticCategory.Error, "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", "A class declaration without the 'default' modifier must have a name."), - Identifier_expected_0_is_a_reserved_word_in_strict_mode: diag(1212, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", "Identifier expected. '{0}' is a reserved word in strict mode."), - Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: diag(1213, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."), - Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode: diag(1214, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214", "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode."), - Invalid_use_of_0_Modules_are_automatically_in_strict_mode: diag(1215, DiagnosticCategory.Error, "Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215", "Invalid use of '{0}'. Modules are automatically in strict mode."), - Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules: diag(1216, DiagnosticCategory.Error, "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216", "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."), - Export_assignment_is_not_supported_when_module_flag_is_system: diag(1218, DiagnosticCategory.Error, "Export_assignment_is_not_supported_when_module_flag_is_system_1218", "Export assignment is not supported when '--module' flag is 'system'."), - Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning: diag(1219, DiagnosticCategory.Error, "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219", "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning."), - Generators_are_not_allowed_in_an_ambient_context: diag(1221, DiagnosticCategory.Error, "Generators_are_not_allowed_in_an_ambient_context_1221", "Generators are not allowed in an ambient context."), - An_overload_signature_cannot_be_declared_as_a_generator: diag(1222, DiagnosticCategory.Error, "An_overload_signature_cannot_be_declared_as_a_generator_1222", "An overload signature cannot be declared as a generator."), - _0_tag_already_specified: diag(1223, DiagnosticCategory.Error, "_0_tag_already_specified_1223", "'{0}' tag already specified."), - Signature_0_must_be_a_type_predicate: diag(1224, DiagnosticCategory.Error, "Signature_0_must_be_a_type_predicate_1224", "Signature '{0}' must be a type predicate."), - Cannot_find_parameter_0: diag(1225, DiagnosticCategory.Error, "Cannot_find_parameter_0_1225", "Cannot find parameter '{0}'."), - Type_predicate_0_is_not_assignable_to_1: diag(1226, DiagnosticCategory.Error, "Type_predicate_0_is_not_assignable_to_1_1226", "Type predicate '{0}' is not assignable to '{1}'."), - Parameter_0_is_not_in_the_same_position_as_parameter_1: diag(1227, DiagnosticCategory.Error, "Parameter_0_is_not_in_the_same_position_as_parameter_1_1227", "Parameter '{0}' is not in the same position as parameter '{1}'."), - A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods: diag(1228, DiagnosticCategory.Error, "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228", "A type predicate is only allowed in return type position for functions and methods."), - A_type_predicate_cannot_reference_a_rest_parameter: diag(1229, DiagnosticCategory.Error, "A_type_predicate_cannot_reference_a_rest_parameter_1229", "A type predicate cannot reference a rest parameter."), - A_type_predicate_cannot_reference_element_0_in_a_binding_pattern: diag(1230, DiagnosticCategory.Error, "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230", "A type predicate cannot reference element '{0}' in a binding pattern."), - An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration: diag(1231, DiagnosticCategory.Error, "An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231", "An export assignment must be at the top level of a file or module declaration."), - An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module: diag(1232, DiagnosticCategory.Error, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1232", "An import declaration can only be used at the top level of a namespace or module."), - An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module: diag(1233, DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_namespace_or_module_1233", "An export declaration can only be used at the top level of a namespace or module."), - An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file: diag(1234, DiagnosticCategory.Error, "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234", "An ambient module declaration is only allowed at the top level in a file."), - A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module: diag(1235, DiagnosticCategory.Error, "A_namespace_declaration_is_only_allowed_at_the_top_level_of_a_namespace_or_module_1235", "A namespace declaration is only allowed at the top level of a namespace or module."), - The_return_type_of_a_property_decorator_function_must_be_either_void_or_any: diag(1236, DiagnosticCategory.Error, "The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236", "The return type of a property decorator function must be either 'void' or 'any'."), - The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any: diag(1237, DiagnosticCategory.Error, "The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237", "The return type of a parameter decorator function must be either 'void' or 'any'."), - Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression: diag(1238, DiagnosticCategory.Error, "Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238", "Unable to resolve signature of class decorator when called as an expression."), - Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression: diag(1239, DiagnosticCategory.Error, "Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239", "Unable to resolve signature of parameter decorator when called as an expression."), - Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression: diag(1240, DiagnosticCategory.Error, "Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240", "Unable to resolve signature of property decorator when called as an expression."), - Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression: diag(1241, DiagnosticCategory.Error, "Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241", "Unable to resolve signature of method decorator when called as an expression."), - abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration: diag(1242, DiagnosticCategory.Error, "abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration_1242", "'abstract' modifier can only appear on a class, method, or property declaration."), - _0_modifier_cannot_be_used_with_1_modifier: diag(1243, DiagnosticCategory.Error, "_0_modifier_cannot_be_used_with_1_modifier_1243", "'{0}' modifier cannot be used with '{1}' modifier."), - Abstract_methods_can_only_appear_within_an_abstract_class: diag(1244, DiagnosticCategory.Error, "Abstract_methods_can_only_appear_within_an_abstract_class_1244", "Abstract methods can only appear within an abstract class."), - Method_0_cannot_have_an_implementation_because_it_is_marked_abstract: diag(1245, DiagnosticCategory.Error, "Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245", "Method '{0}' cannot have an implementation because it is marked abstract."), - An_interface_property_cannot_have_an_initializer: diag(1246, DiagnosticCategory.Error, "An_interface_property_cannot_have_an_initializer_1246", "An interface property cannot have an initializer."), - A_type_literal_property_cannot_have_an_initializer: diag(1247, DiagnosticCategory.Error, "A_type_literal_property_cannot_have_an_initializer_1247", "A type literal property cannot have an initializer."), - A_class_member_cannot_have_the_0_keyword: diag(1248, DiagnosticCategory.Error, "A_class_member_cannot_have_the_0_keyword_1248", "A class member cannot have the '{0}' keyword."), - A_decorator_can_only_decorate_a_method_implementation_not_an_overload: diag(1249, DiagnosticCategory.Error, "A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249", "A decorator can only decorate a method implementation, not an overload."), - Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5: diag(1250, DiagnosticCategory.Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'."), - Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode: diag(1251, DiagnosticCategory.Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode."), - Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode: diag(1252, DiagnosticCategory.Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode."), - A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference: diag(1254, DiagnosticCategory.Error, "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254", "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."), - A_definite_assignment_assertion_is_not_permitted_in_this_context: diag(1255, DiagnosticCategory.Error, "A_definite_assignment_assertion_is_not_permitted_in_this_context_1255", "A definite assignment assertion '!' is not permitted in this context."), - A_required_element_cannot_follow_an_optional_element: diag(1257, DiagnosticCategory.Error, "A_required_element_cannot_follow_an_optional_element_1257", "A required element cannot follow an optional element."), - A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration: diag(1258, DiagnosticCategory.Error, "A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258", "A default export must be at the top level of a file or module declaration."), - Module_0_can_only_be_default_imported_using_the_1_flag: diag(1259, DiagnosticCategory.Error, "Module_0_can_only_be_default_imported_using_the_1_flag_1259", "Module '{0}' can only be default-imported using the '{1}' flag"), - Keywords_cannot_contain_escape_characters: diag(1260, DiagnosticCategory.Error, "Keywords_cannot_contain_escape_characters_1260", "Keywords cannot contain escape characters."), - Already_included_file_name_0_differs_from_file_name_1_only_in_casing: diag(1261, DiagnosticCategory.Error, "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261", "Already included file name '{0}' differs from file name '{1}' only in casing."), - Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module: diag(1262, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module_1262", "Identifier expected. '{0}' is a reserved word at the top-level of a module."), - Declarations_with_initializers_cannot_also_have_definite_assignment_assertions: diag(1263, DiagnosticCategory.Error, "Declarations_with_initializers_cannot_also_have_definite_assignment_assertions_1263", "Declarations with initializers cannot also have definite assignment assertions."), - Declarations_with_definite_assignment_assertions_must_also_have_type_annotations: diag(1264, DiagnosticCategory.Error, "Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264", "Declarations with definite assignment assertions must also have type annotations."), - A_rest_element_cannot_follow_another_rest_element: diag(1265, DiagnosticCategory.Error, "A_rest_element_cannot_follow_another_rest_element_1265", "A rest element cannot follow another rest element."), - An_optional_element_cannot_follow_a_rest_element: diag(1266, DiagnosticCategory.Error, "An_optional_element_cannot_follow_a_rest_element_1266", "An optional element cannot follow a rest element."), - Property_0_cannot_have_an_initializer_because_it_is_marked_abstract: diag(1267, DiagnosticCategory.Error, "Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267", "Property '{0}' cannot have an initializer because it is marked abstract."), - An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type: diag(1268, DiagnosticCategory.Error, "An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268", "An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."), - Cannot_use_export_import_on_a_type_or_type_only_namespace_when_the_isolatedModules_flag_is_provided: diag(1269, DiagnosticCategory.Error, "Cannot_use_export_import_on_a_type_or_type_only_namespace_when_the_isolatedModules_flag_is_provided_1269", "Cannot use 'export import' on a type or type-only namespace when the '--isolatedModules' flag is provided."), - Decorator_function_return_type_0_is_not_assignable_to_type_1: diag(1270, DiagnosticCategory.Error, "Decorator_function_return_type_0_is_not_assignable_to_type_1_1270", "Decorator function return type '{0}' is not assignable to type '{1}'."), - Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any: diag(1271, DiagnosticCategory.Error, "Decorator_function_return_type_is_0_but_is_expected_to_be_void_or_any_1271", "Decorator function return type is '{0}' but is expected to be 'void' or 'any'."), - A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled: diag(1272, DiagnosticCategory.Error, "A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_w_1272", "A type referenced in a decorated signature must be imported with 'import type' or a namespace import when 'isolatedModules' and 'emitDecoratorMetadata' are enabled."), - _0_modifier_cannot_appear_on_a_type_parameter: diag(1273, DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_type_parameter_1273", "'{0}' modifier cannot appear on a type parameter"), - _0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias: diag(1274, DiagnosticCategory.Error, "_0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias_1274", "'{0}' modifier can only appear on a type parameter of a class, interface or type alias"), - accessor_modifier_can_only_appear_on_a_property_declaration: diag(1275, DiagnosticCategory.Error, "accessor_modifier_can_only_appear_on_a_property_declaration_1275", "'accessor' modifier can only appear on a property declaration."), - An_accessor_property_cannot_be_declared_optional: diag(1276, DiagnosticCategory.Error, "An_accessor_property_cannot_be_declared_optional_1276", "An 'accessor' property cannot be declared optional."), - with_statements_are_not_allowed_in_an_async_function_block: diag(1300, DiagnosticCategory.Error, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."), - await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, DiagnosticCategory.Error, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."), - The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level: diag(1309, DiagnosticCategory.Error, "The_current_file_is_a_CommonJS_module_and_cannot_use_await_at_the_top_level_1309", "The current file is a CommonJS module and cannot use 'await' at the top level."), - Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern: diag(1312, DiagnosticCategory.Error, "Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312", "Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."), - The_body_of_an_if_statement_cannot_be_the_empty_statement: diag(1313, DiagnosticCategory.Error, "The_body_of_an_if_statement_cannot_be_the_empty_statement_1313", "The body of an 'if' statement cannot be the empty statement."), - Global_module_exports_may_only_appear_in_module_files: diag(1314, DiagnosticCategory.Error, "Global_module_exports_may_only_appear_in_module_files_1314", "Global module exports may only appear in module files."), - Global_module_exports_may_only_appear_in_declaration_files: diag(1315, DiagnosticCategory.Error, "Global_module_exports_may_only_appear_in_declaration_files_1315", "Global module exports may only appear in declaration files."), - Global_module_exports_may_only_appear_at_top_level: diag(1316, DiagnosticCategory.Error, "Global_module_exports_may_only_appear_at_top_level_1316", "Global module exports may only appear at top level."), - A_parameter_property_cannot_be_declared_using_a_rest_parameter: diag(1317, DiagnosticCategory.Error, "A_parameter_property_cannot_be_declared_using_a_rest_parameter_1317", "A parameter property cannot be declared using a rest parameter."), - An_abstract_accessor_cannot_have_an_implementation: diag(1318, DiagnosticCategory.Error, "An_abstract_accessor_cannot_have_an_implementation_1318", "An abstract accessor cannot have an implementation."), - A_default_export_can_only_be_used_in_an_ECMAScript_style_module: diag(1319, DiagnosticCategory.Error, "A_default_export_can_only_be_used_in_an_ECMAScript_style_module_1319", "A default export can only be used in an ECMAScript-style module."), - Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1320, DiagnosticCategory.Error, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."), - Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1321, DiagnosticCategory.Error, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."), - Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1322, DiagnosticCategory.Error, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."), - Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node16_or_nodenext: diag(1323, DiagnosticCategory.Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node16', or 'nodenext'."), - Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nodenext: diag(1324, DiagnosticCategory.Error, "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_node16_or_nod_1324", "Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'."), - Argument_of_dynamic_import_cannot_be_spread_element: diag(1325, DiagnosticCategory.Error, "Argument_of_dynamic_import_cannot_be_spread_element_1325", "Argument of dynamic import cannot be spread element."), - This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot_have_type_arguments: diag(1326, DiagnosticCategory.Error, "This_use_of_import_is_invalid_import_calls_can_be_written_but_they_must_have_parentheses_and_cannot__1326", "This use of 'import' is invalid. 'import()' calls can be written, but they must have parentheses and cannot have type arguments."), - String_literal_with_double_quotes_expected: diag(1327, DiagnosticCategory.Error, "String_literal_with_double_quotes_expected_1327", "String literal with double quotes expected."), - Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal: diag(1328, DiagnosticCategory.Error, "Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328", "Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."), - _0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0: diag(1329, DiagnosticCategory.Error, "_0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write__1329", "'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?"), - A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly: diag(1330, DiagnosticCategory.Error, "A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly_1330", "A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'."), - A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly: diag(1331, DiagnosticCategory.Error, "A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly_1331", "A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'."), - A_variable_whose_type_is_a_unique_symbol_type_must_be_const: diag(1332, DiagnosticCategory.Error, "A_variable_whose_type_is_a_unique_symbol_type_must_be_const_1332", "A variable whose type is a 'unique symbol' type must be 'const'."), - unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name: diag(1333, DiagnosticCategory.Error, "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333", "'unique symbol' types may not be used on a variable declaration with a binding name."), - unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement: diag(1334, DiagnosticCategory.Error, "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334", "'unique symbol' types are only allowed on variables in a variable statement."), - unique_symbol_types_are_not_allowed_here: diag(1335, DiagnosticCategory.Error, "unique_symbol_types_are_not_allowed_here_1335", "'unique symbol' types are not allowed here."), - An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead: diag(1337, DiagnosticCategory.Error, "An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337", "An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."), - infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type: diag(1338, DiagnosticCategory.Error, "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338", "'infer' declarations are only permitted in the 'extends' clause of a conditional type."), - Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: diag(1339, DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."), - Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"), - Class_constructor_may_not_be_an_accessor: diag(1341, DiagnosticCategory.Error, "Class_constructor_may_not_be_an_accessor_1341", "Class constructor may not be an accessor."), - Type_arguments_cannot_be_used_here: diag(1342, DiagnosticCategory.Error, "Type_arguments_cannot_be_used_here_1342", "Type arguments cannot be used here."), - The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node16_or_nodenext: diag(1343, DiagnosticCategory.Error, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'."), - A_label_is_not_allowed_here: diag(1344, DiagnosticCategory.Error, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."), - An_expression_of_type_void_cannot_be_tested_for_truthiness: diag(1345, DiagnosticCategory.Error, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."), - This_parameter_is_not_allowed_with_use_strict_directive: diag(1346, DiagnosticCategory.Error, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."), - use_strict_directive_cannot_be_used_with_non_simple_parameter_list: diag(1347, DiagnosticCategory.Error, "use_strict_directive_cannot_be_used_with_non_simple_parameter_list_1347", "'use strict' directive cannot be used with non-simple parameter list."), - Non_simple_parameter_declared_here: diag(1348, DiagnosticCategory.Error, "Non_simple_parameter_declared_here_1348", "Non-simple parameter declared here."), - use_strict_directive_used_here: diag(1349, DiagnosticCategory.Error, "use_strict_directive_used_here_1349", "'use strict' directive used here."), - Print_the_final_configuration_instead_of_building: diag(1350, DiagnosticCategory.Message, "Print_the_final_configuration_instead_of_building_1350", "Print the final configuration instead of building."), - An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal: diag(1351, DiagnosticCategory.Error, "An_identifier_or_keyword_cannot_immediately_follow_a_numeric_literal_1351", "An identifier or keyword cannot immediately follow a numeric literal."), - A_bigint_literal_cannot_use_exponential_notation: diag(1352, DiagnosticCategory.Error, "A_bigint_literal_cannot_use_exponential_notation_1352", "A bigint literal cannot use exponential notation."), - A_bigint_literal_must_be_an_integer: diag(1353, DiagnosticCategory.Error, "A_bigint_literal_must_be_an_integer_1353", "A bigint literal must be an integer."), - readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types: diag(1354, DiagnosticCategory.Error, "readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types_1354", "'readonly' type modifier is only permitted on array and tuple literal types."), - A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals: diag(1355, DiagnosticCategory.Error, "A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array__1355", "A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals."), - Did_you_mean_to_mark_this_function_as_async: diag(1356, DiagnosticCategory.Error, "Did_you_mean_to_mark_this_function_as_async_1356", "Did you mean to mark this function as 'async'?"), - An_enum_member_name_must_be_followed_by_a_or: diag(1357, DiagnosticCategory.Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."), - Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, DiagnosticCategory.Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."), - Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: diag(1359, DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."), - Type_0_does_not_satisfy_the_expected_type_1: diag(1360, DiagnosticCategory.Error, "Type_0_does_not_satisfy_the_expected_type_1_1360", "Type '{0}' does not satisfy the expected type '{1}'."), - _0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type: diag(1361, DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361", "'{0}' cannot be used as a value because it was imported using 'import type'."), - _0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type: diag(1362, DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362", "'{0}' cannot be used as a value because it was exported using 'export type'."), - A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both: diag(1363, DiagnosticCategory.Error, "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363", "A type-only import can specify a default import or named bindings, but not both."), - Convert_to_type_only_export: diag(1364, DiagnosticCategory.Message, "Convert_to_type_only_export_1364", "Convert to type-only export"), - Convert_all_re_exported_types_to_type_only_exports: diag(1365, DiagnosticCategory.Message, "Convert_all_re_exported_types_to_type_only_exports_1365", "Convert all re-exported types to type-only exports"), - Split_into_two_separate_import_declarations: diag(1366, DiagnosticCategory.Message, "Split_into_two_separate_import_declarations_1366", "Split into two separate import declarations"), - Split_all_invalid_type_only_imports: diag(1367, DiagnosticCategory.Message, "Split_all_invalid_type_only_imports_1367", "Split all invalid type-only imports"), - Class_constructor_may_not_be_a_generator: diag(1368, DiagnosticCategory.Error, "Class_constructor_may_not_be_a_generator_1368", "Class constructor may not be a generator."), - Did_you_mean_0: diag(1369, DiagnosticCategory.Message, "Did_you_mean_0_1369", "Did you mean '{0}'?"), - This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error: diag(1371, DiagnosticCategory.Error, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371", "This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'."), - Convert_to_type_only_import: diag(1373, DiagnosticCategory.Message, "Convert_to_type_only_import_1373", "Convert to type-only import"), - Convert_all_imports_not_used_as_a_value_to_type_only_imports: diag(1374, DiagnosticCategory.Message, "Convert_all_imports_not_used_as_a_value_to_type_only_imports_1374", "Convert all imports not used as a value to type-only imports"), - await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1375, DiagnosticCategory.Error, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), - _0_was_imported_here: diag(1376, DiagnosticCategory.Message, "_0_was_imported_here_1376", "'{0}' was imported here."), - _0_was_exported_here: diag(1377, DiagnosticCategory.Message, "_0_was_exported_here_1377", "'{0}' was exported here."), - 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: diag(1378, DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_n_1378", "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."), - An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."), - An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."), - Unexpected_token_Did_you_mean_or_rbrace: diag(1381, DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `}`?"), - Unexpected_token_Did_you_mean_or_gt: diag(1382, DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_gt_1382", "Unexpected token. Did you mean `{'>'}` or `>`?"), - Only_named_exports_may_use_export_type: diag(1383, DiagnosticCategory.Error, "Only_named_exports_may_use_export_type_1383", "Only named exports may use 'export type'."), - Function_type_notation_must_be_parenthesized_when_used_in_a_union_type: diag(1385, DiagnosticCategory.Error, "Function_type_notation_must_be_parenthesized_when_used_in_a_union_type_1385", "Function type notation must be parenthesized when used in a union type."), - Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type: diag(1386, DiagnosticCategory.Error, "Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type_1386", "Constructor type notation must be parenthesized when used in a union type."), - Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: diag(1387, DiagnosticCategory.Error, "Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387", "Function type notation must be parenthesized when used in an intersection type."), - Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: diag(1388, DiagnosticCategory.Error, "Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388", "Constructor type notation must be parenthesized when used in an intersection type."), - _0_is_not_allowed_as_a_variable_declaration_name: diag(1389, DiagnosticCategory.Error, "_0_is_not_allowed_as_a_variable_declaration_name_1389", "'{0}' is not allowed as a variable declaration name."), - _0_is_not_allowed_as_a_parameter_name: diag(1390, DiagnosticCategory.Error, "_0_is_not_allowed_as_a_parameter_name_1390", "'{0}' is not allowed as a parameter name."), - An_import_alias_cannot_use_import_type: diag(1392, DiagnosticCategory.Error, "An_import_alias_cannot_use_import_type_1392", "An import alias cannot use 'import type'"), - Imported_via_0_from_file_1: diag(1393, DiagnosticCategory.Message, "Imported_via_0_from_file_1_1393", "Imported via {0} from file '{1}'"), - Imported_via_0_from_file_1_with_packageId_2: diag(1394, DiagnosticCategory.Message, "Imported_via_0_from_file_1_with_packageId_2_1394", "Imported via {0} from file '{1}' with packageId '{2}'"), - Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions: diag(1395, DiagnosticCategory.Message, "Imported_via_0_from_file_1_to_import_importHelpers_as_specified_in_compilerOptions_1395", "Imported via {0} from file '{1}' to import 'importHelpers' as specified in compilerOptions"), - Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions: diag(1396, DiagnosticCategory.Message, "Imported_via_0_from_file_1_with_packageId_2_to_import_importHelpers_as_specified_in_compilerOptions_1396", "Imported via {0} from file '{1}' with packageId '{2}' to import 'importHelpers' as specified in compilerOptions"), - Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions: diag(1397, DiagnosticCategory.Message, "Imported_via_0_from_file_1_to_import_jsx_and_jsxs_factory_functions_1397", "Imported via {0} from file '{1}' to import 'jsx' and 'jsxs' factory functions"), - Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions: diag(1398, DiagnosticCategory.Message, "Imported_via_0_from_file_1_with_packageId_2_to_import_jsx_and_jsxs_factory_functions_1398", "Imported via {0} from file '{1}' with packageId '{2}' to import 'jsx' and 'jsxs' factory functions"), - File_is_included_via_import_here: diag(1399, DiagnosticCategory.Message, "File_is_included_via_import_here_1399", "File is included via import here."), - Referenced_via_0_from_file_1: diag(1400, DiagnosticCategory.Message, "Referenced_via_0_from_file_1_1400", "Referenced via '{0}' from file '{1}'"), - File_is_included_via_reference_here: diag(1401, DiagnosticCategory.Message, "File_is_included_via_reference_here_1401", "File is included via reference here."), - Type_library_referenced_via_0_from_file_1: diag(1402, DiagnosticCategory.Message, "Type_library_referenced_via_0_from_file_1_1402", "Type library referenced via '{0}' from file '{1}'"), - Type_library_referenced_via_0_from_file_1_with_packageId_2: diag(1403, DiagnosticCategory.Message, "Type_library_referenced_via_0_from_file_1_with_packageId_2_1403", "Type library referenced via '{0}' from file '{1}' with packageId '{2}'"), - File_is_included_via_type_library_reference_here: diag(1404, DiagnosticCategory.Message, "File_is_included_via_type_library_reference_here_1404", "File is included via type library reference here."), - Library_referenced_via_0_from_file_1: diag(1405, DiagnosticCategory.Message, "Library_referenced_via_0_from_file_1_1405", "Library referenced via '{0}' from file '{1}'"), - File_is_included_via_library_reference_here: diag(1406, DiagnosticCategory.Message, "File_is_included_via_library_reference_here_1406", "File is included via library reference here."), - Matched_by_include_pattern_0_in_1: diag(1407, DiagnosticCategory.Message, "Matched_by_include_pattern_0_in_1_1407", "Matched by include pattern '{0}' in '{1}'"), - File_is_matched_by_include_pattern_specified_here: diag(1408, DiagnosticCategory.Message, "File_is_matched_by_include_pattern_specified_here_1408", "File is matched by include pattern specified here."), - Part_of_files_list_in_tsconfig_json: diag(1409, DiagnosticCategory.Message, "Part_of_files_list_in_tsconfig_json_1409", "Part of 'files' list in tsconfig.json"), - File_is_matched_by_files_list_specified_here: diag(1410, DiagnosticCategory.Message, "File_is_matched_by_files_list_specified_here_1410", "File is matched by 'files' list specified here."), - Output_from_referenced_project_0_included_because_1_specified: diag(1411, DiagnosticCategory.Message, "Output_from_referenced_project_0_included_because_1_specified_1411", "Output from referenced project '{0}' included because '{1}' specified"), - Output_from_referenced_project_0_included_because_module_is_specified_as_none: diag(1412, DiagnosticCategory.Message, "Output_from_referenced_project_0_included_because_module_is_specified_as_none_1412", "Output from referenced project '{0}' included because '--module' is specified as 'none'"), - File_is_output_from_referenced_project_specified_here: diag(1413, DiagnosticCategory.Message, "File_is_output_from_referenced_project_specified_here_1413", "File is output from referenced project specified here."), - Source_from_referenced_project_0_included_because_1_specified: diag(1414, DiagnosticCategory.Message, "Source_from_referenced_project_0_included_because_1_specified_1414", "Source from referenced project '{0}' included because '{1}' specified"), - Source_from_referenced_project_0_included_because_module_is_specified_as_none: diag(1415, DiagnosticCategory.Message, "Source_from_referenced_project_0_included_because_module_is_specified_as_none_1415", "Source from referenced project '{0}' included because '--module' is specified as 'none'"), - File_is_source_from_referenced_project_specified_here: diag(1416, DiagnosticCategory.Message, "File_is_source_from_referenced_project_specified_here_1416", "File is source from referenced project specified here."), - Entry_point_of_type_library_0_specified_in_compilerOptions: diag(1417, DiagnosticCategory.Message, "Entry_point_of_type_library_0_specified_in_compilerOptions_1417", "Entry point of type library '{0}' specified in compilerOptions"), - Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1: diag(1418, DiagnosticCategory.Message, "Entry_point_of_type_library_0_specified_in_compilerOptions_with_packageId_1_1418", "Entry point of type library '{0}' specified in compilerOptions with packageId '{1}'"), - File_is_entry_point_of_type_library_specified_here: diag(1419, DiagnosticCategory.Message, "File_is_entry_point_of_type_library_specified_here_1419", "File is entry point of type library specified here."), - Entry_point_for_implicit_type_library_0: diag(1420, DiagnosticCategory.Message, "Entry_point_for_implicit_type_library_0_1420", "Entry point for implicit type library '{0}'"), - Entry_point_for_implicit_type_library_0_with_packageId_1: diag(1421, DiagnosticCategory.Message, "Entry_point_for_implicit_type_library_0_with_packageId_1_1421", "Entry point for implicit type library '{0}' with packageId '{1}'"), - Library_0_specified_in_compilerOptions: diag(1422, DiagnosticCategory.Message, "Library_0_specified_in_compilerOptions_1422", "Library '{0}' specified in compilerOptions"), - File_is_library_specified_here: diag(1423, DiagnosticCategory.Message, "File_is_library_specified_here_1423", "File is library specified here."), - Default_library: diag(1424, DiagnosticCategory.Message, "Default_library_1424", "Default library"), - Default_library_for_target_0: diag(1425, DiagnosticCategory.Message, "Default_library_for_target_0_1425", "Default library for target '{0}'"), - File_is_default_library_for_target_specified_here: diag(1426, DiagnosticCategory.Message, "File_is_default_library_for_target_specified_here_1426", "File is default library for target specified here."), - Root_file_specified_for_compilation: diag(1427, DiagnosticCategory.Message, "Root_file_specified_for_compilation_1427", "Root file specified for compilation"), - File_is_output_of_project_reference_source_0: diag(1428, DiagnosticCategory.Message, "File_is_output_of_project_reference_source_0_1428", "File is output of project reference source '{0}'"), - File_redirects_to_file_0: diag(1429, DiagnosticCategory.Message, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"), - The_file_is_in_the_program_because_Colon: diag(1430, DiagnosticCategory.Message, "The_file_is_in_the_program_because_Colon_1430", "The file is in the program because:"), - for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1431, DiagnosticCategory.Error, "for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431", "'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."), - Top_level_for_await_loops_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: diag(1432, DiagnosticCategory.Error, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_nod_1432", "Top-level 'for await' loops 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."), - Decorators_may_not_be_applied_to_this_parameters: diag(1433, DiagnosticCategory.Error, "Decorators_may_not_be_applied_to_this_parameters_1433", "Decorators may not be applied to 'this' parameters."), - Unexpected_keyword_or_identifier: diag(1434, DiagnosticCategory.Error, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."), - Unknown_keyword_or_identifier_Did_you_mean_0: diag(1435, DiagnosticCategory.Error, "Unknown_keyword_or_identifier_Did_you_mean_0_1435", "Unknown keyword or identifier. Did you mean '{0}'?"), - Decorators_must_precede_the_name_and_all_keywords_of_property_declarations: diag(1436, DiagnosticCategory.Error, "Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436", "Decorators must precede the name and all keywords of property declarations."), - Namespace_must_be_given_a_name: diag(1437, DiagnosticCategory.Error, "Namespace_must_be_given_a_name_1437", "Namespace must be given a name."), - Interface_must_be_given_a_name: diag(1438, DiagnosticCategory.Error, "Interface_must_be_given_a_name_1438", "Interface must be given a name."), - Type_alias_must_be_given_a_name: diag(1439, DiagnosticCategory.Error, "Type_alias_must_be_given_a_name_1439", "Type alias must be given a name."), - Variable_declaration_not_allowed_at_this_location: diag(1440, DiagnosticCategory.Error, "Variable_declaration_not_allowed_at_this_location_1440", "Variable declaration not allowed at this location."), - Cannot_start_a_function_call_in_a_type_annotation: diag(1441, DiagnosticCategory.Error, "Cannot_start_a_function_call_in_a_type_annotation_1441", "Cannot start a function call in a type annotation."), - Expected_for_property_initializer: diag(1442, DiagnosticCategory.Error, "Expected_for_property_initializer_1442", "Expected '=' for property initializer."), - Module_declaration_names_may_only_use_or_quoted_strings: diag(1443, DiagnosticCategory.Error, "Module_declaration_names_may_only_use_or_quoted_strings_1443", "Module declaration names may only use ' or \" quoted strings."), - _0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled: diag(1444, DiagnosticCategory.Error, "_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedMod_1444", "'{0}' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."), - _0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled: diag(1446, DiagnosticCategory.Error, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveVa_1446", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."), - _0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isolatedModules_is_enabled: diag(1448, DiagnosticCategory.Error, "_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isol_1448", "'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when 'isolatedModules' is enabled."), - Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: diag(1449, DiagnosticCategory.Message, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."), - Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments: diag(1450, DiagnosticCategory.Message, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional assertion as arguments"), - Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: diag(1451, DiagnosticCategory.Error, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"), - resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext: diag(1452, DiagnosticCategory.Error, "resolution_mode_assertions_are_only_supported_when_moduleResolution_is_node16_or_nodenext_1452", "'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`."), - resolution_mode_should_be_either_require_or_import: diag(1453, DiagnosticCategory.Error, "resolution_mode_should_be_either_require_or_import_1453", "`resolution-mode` should be either `require` or `import`."), - resolution_mode_can_only_be_set_for_type_only_imports: diag(1454, DiagnosticCategory.Error, "resolution_mode_can_only_be_set_for_type_only_imports_1454", "`resolution-mode` can only be set for type-only imports."), - resolution_mode_is_the_only_valid_key_for_type_import_assertions: diag(1455, DiagnosticCategory.Error, "resolution_mode_is_the_only_valid_key_for_type_import_assertions_1455", "`resolution-mode` is the only valid key for type import assertions."), - Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require: diag(1456, DiagnosticCategory.Error, "Type_import_assertions_should_have_exactly_one_key_resolution_mode_with_value_import_or_require_1456", "Type import assertions should have exactly one key - `resolution-mode` - with value `import` or `require`."), - Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk: diag(1457, DiagnosticCategory.Message, "Matched_by_default_include_pattern_Asterisk_Asterisk_Slash_Asterisk_1457", "Matched by default include pattern '**/*'"), - File_is_ECMAScript_module_because_0_has_field_type_with_value_module: diag(1458, DiagnosticCategory.Message, "File_is_ECMAScript_module_because_0_has_field_type_with_value_module_1458", "File is ECMAScript module because '{0}' has field \"type\" with value \"module\""), - File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module: diag(1459, DiagnosticCategory.Message, "File_is_CommonJS_module_because_0_has_field_type_whose_value_is_not_module_1459", "File is CommonJS module because '{0}' has field \"type\" whose value is not \"module\""), - File_is_CommonJS_module_because_0_does_not_have_field_type: diag(1460, DiagnosticCategory.Message, "File_is_CommonJS_module_because_0_does_not_have_field_type_1460", "File is CommonJS module because '{0}' does not have field \"type\""), - File_is_CommonJS_module_because_package_json_was_not_found: diag(1461, DiagnosticCategory.Message, "File_is_CommonJS_module_because_package_json_was_not_found_1461", "File is CommonJS module because 'package.json' was not found"), - The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, DiagnosticCategory.Error, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."), - Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_with_require_Use_an_ECMAScript_import_instead: diag(1471, DiagnosticCategory.Error, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported with 'require'. Use an ECMAScript import instead."), - catch_or_finally_expected: diag(1472, DiagnosticCategory.Error, "catch_or_finally_expected_1472", "'catch' or 'finally' expected."), - An_import_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1473, DiagnosticCategory.Error, "An_import_declaration_can_only_be_used_at_the_top_level_of_a_module_1473", "An import declaration can only be used at the top level of a module."), - An_export_declaration_can_only_be_used_at_the_top_level_of_a_module: diag(1474, DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_at_the_top_level_of_a_module_1474", "An export declaration can only be used at the top level of a module."), - Control_what_method_is_used_to_detect_module_format_JS_files: diag(1475, DiagnosticCategory.Message, "Control_what_method_is_used_to_detect_module_format_JS_files_1475", "Control what method is used to detect module-format JS files."), - auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules: diag(1476, DiagnosticCategory.Message, "auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_w_1476", "\"auto\": Treat files with imports, exports, import.meta, jsx (with jsx: react-jsx), or esm format (with module: node16+) as modules."), - An_instantiation_expression_cannot_be_followed_by_a_property_access: diag(1477, DiagnosticCategory.Error, "An_instantiation_expression_cannot_be_followed_by_a_property_access_1477", "An instantiation expression cannot be followed by a property access."), - Identifier_or_string_literal_expected: diag(1478, DiagnosticCategory.Error, "Identifier_or_string_literal_expected_1478", "Identifier or string literal expected."), - The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_referenced_file_is_an_ECMAScript_module_and_cannot_be_imported_with_require_Consider_writing_a_dynamic_import_0_call_instead: diag(1479, DiagnosticCategory.Error, "The_current_file_is_a_CommonJS_module_whose_imports_will_produce_require_calls_however_the_reference_1479", "The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import(\"{0}\")' call instead."), - To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_package_json_file_with_type_Colon_module: diag(1480, DiagnosticCategory.Message, "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_create_a_local_packag_1480", "To convert this file to an ECMAScript module, change its file extension to '{0}' or create a local package.json file with `{ \"type\": \"module\" }`."), - To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Colon_module_to_1: diag(1481, DiagnosticCategory.Message, "To_convert_this_file_to_an_ECMAScript_module_change_its_file_extension_to_0_or_add_the_field_type_Co_1481", "To convert this file to an ECMAScript module, change its file extension to '{0}', or add the field `\"type\": \"module\"` to '{1}'."), - To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0: diag(1482, DiagnosticCategory.Message, "To_convert_this_file_to_an_ECMAScript_module_add_the_field_type_Colon_module_to_0_1482", "To convert this file to an ECMAScript module, add the field `\"type\": \"module\"` to '{0}'."), - To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module: diag(1483, DiagnosticCategory.Message, "To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483", "To convert this file to an ECMAScript module, create a local package.json file with `{ \"type\": \"module\" }`."), - The_types_of_0_are_incompatible_between_these_types: diag(2200, DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."), - The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."), - Call_signature_return_types_0_and_1_are_incompatible: diag(2202, DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), - Construct_signature_return_types_0_and_1_are_incompatible: diag(2203, DiagnosticCategory.Error, "Construct_signature_return_types_0_and_1_are_incompatible_2203", "Construct signature return types '{0}' and '{1}' are incompatible.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), - Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: diag(2204, DiagnosticCategory.Error, "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204", "Call signatures with no arguments have incompatible return types '{0}' and '{1}'.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), - Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: diag(2205, DiagnosticCategory.Error, "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205", "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ true), - The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement: diag(2206, DiagnosticCategory.Error, "The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206", "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."), - The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement: diag(2207, DiagnosticCategory.Error, "The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207", "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."), - This_type_parameter_might_need_an_extends_0_constraint: diag(2208, DiagnosticCategory.Error, "This_type_parameter_might_need_an_extends_0_constraint_2208", "This type parameter might need an `extends {0}` constraint."), - The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2209, DiagnosticCategory.Error, "The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209", "The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."), - The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2210, DiagnosticCategory.Error, "The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210", "The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."), - Add_extends_constraint: diag(2211, DiagnosticCategory.Message, "Add_extends_constraint_2211", "Add `extends` constraint."), - Add_extends_constraint_to_all_type_parameters: diag(2212, DiagnosticCategory.Message, "Add_extends_constraint_to_all_type_parameters_2212", "Add `extends` constraint to all type parameters"), - Duplicate_identifier_0: diag(2300, DiagnosticCategory.Error, "Duplicate_identifier_0_2300", "Duplicate identifier '{0}'."), - Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2301, DiagnosticCategory.Error, "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."), - Static_members_cannot_reference_class_type_parameters: diag(2302, DiagnosticCategory.Error, "Static_members_cannot_reference_class_type_parameters_2302", "Static members cannot reference class type parameters."), - Circular_definition_of_import_alias_0: diag(2303, DiagnosticCategory.Error, "Circular_definition_of_import_alias_0_2303", "Circular definition of import alias '{0}'."), - Cannot_find_name_0: diag(2304, DiagnosticCategory.Error, "Cannot_find_name_0_2304", "Cannot find name '{0}'."), - Module_0_has_no_exported_member_1: diag(2305, DiagnosticCategory.Error, "Module_0_has_no_exported_member_1_2305", "Module '{0}' has no exported member '{1}'."), - File_0_is_not_a_module: diag(2306, DiagnosticCategory.Error, "File_0_is_not_a_module_2306", "File '{0}' is not a module."), - Cannot_find_module_0_or_its_corresponding_type_declarations: diag(2307, DiagnosticCategory.Error, "Cannot_find_module_0_or_its_corresponding_type_declarations_2307", "Cannot find module '{0}' or its corresponding type declarations."), - Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity: diag(2308, DiagnosticCategory.Error, "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308", "Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."), - An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: diag(2309, DiagnosticCategory.Error, "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309", "An export assignment cannot be used in a module with other exported elements."), - Type_0_recursively_references_itself_as_a_base_type: diag(2310, DiagnosticCategory.Error, "Type_0_recursively_references_itself_as_a_base_type_2310", "Type '{0}' recursively references itself as a base type."), - Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function: diag(2311, DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311", "Cannot find name '{0}'. Did you mean to write this in an async function?"), - An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2312, DiagnosticCategory.Error, "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312", "An interface can only extend an object type or intersection of object types with statically known members."), - Type_parameter_0_has_a_circular_constraint: diag(2313, DiagnosticCategory.Error, "Type_parameter_0_has_a_circular_constraint_2313", "Type parameter '{0}' has a circular constraint."), - Generic_type_0_requires_1_type_argument_s: diag(2314, DiagnosticCategory.Error, "Generic_type_0_requires_1_type_argument_s_2314", "Generic type '{0}' requires {1} type argument(s)."), - Type_0_is_not_generic: diag(2315, DiagnosticCategory.Error, "Type_0_is_not_generic_2315", "Type '{0}' is not generic."), - Global_type_0_must_be_a_class_or_interface_type: diag(2316, DiagnosticCategory.Error, "Global_type_0_must_be_a_class_or_interface_type_2316", "Global type '{0}' must be a class or interface type."), - Global_type_0_must_have_1_type_parameter_s: diag(2317, DiagnosticCategory.Error, "Global_type_0_must_have_1_type_parameter_s_2317", "Global type '{0}' must have {1} type parameter(s)."), - Cannot_find_global_type_0: diag(2318, DiagnosticCategory.Error, "Cannot_find_global_type_0_2318", "Cannot find global type '{0}'."), - Named_property_0_of_types_1_and_2_are_not_identical: diag(2319, DiagnosticCategory.Error, "Named_property_0_of_types_1_and_2_are_not_identical_2319", "Named property '{0}' of types '{1}' and '{2}' are not identical."), - Interface_0_cannot_simultaneously_extend_types_1_and_2: diag(2320, DiagnosticCategory.Error, "Interface_0_cannot_simultaneously_extend_types_1_and_2_2320", "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'."), - Excessive_stack_depth_comparing_types_0_and_1: diag(2321, DiagnosticCategory.Error, "Excessive_stack_depth_comparing_types_0_and_1_2321", "Excessive stack depth comparing types '{0}' and '{1}'."), - Type_0_is_not_assignable_to_type_1: diag(2322, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_2322", "Type '{0}' is not assignable to type '{1}'."), - Cannot_redeclare_exported_variable_0: diag(2323, DiagnosticCategory.Error, "Cannot_redeclare_exported_variable_0_2323", "Cannot redeclare exported variable '{0}'."), - Property_0_is_missing_in_type_1: diag(2324, DiagnosticCategory.Error, "Property_0_is_missing_in_type_1_2324", "Property '{0}' is missing in type '{1}'."), - Property_0_is_private_in_type_1_but_not_in_type_2: diag(2325, DiagnosticCategory.Error, "Property_0_is_private_in_type_1_but_not_in_type_2_2325", "Property '{0}' is private in type '{1}' but not in type '{2}'."), - Types_of_property_0_are_incompatible: diag(2326, DiagnosticCategory.Error, "Types_of_property_0_are_incompatible_2326", "Types of property '{0}' are incompatible."), - Property_0_is_optional_in_type_1_but_required_in_type_2: diag(2327, DiagnosticCategory.Error, "Property_0_is_optional_in_type_1_but_required_in_type_2_2327", "Property '{0}' is optional in type '{1}' but required in type '{2}'."), - Types_of_parameters_0_and_1_are_incompatible: diag(2328, DiagnosticCategory.Error, "Types_of_parameters_0_and_1_are_incompatible_2328", "Types of parameters '{0}' and '{1}' are incompatible."), - Index_signature_for_type_0_is_missing_in_type_1: diag(2329, DiagnosticCategory.Error, "Index_signature_for_type_0_is_missing_in_type_1_2329", "Index signature for type '{0}' is missing in type '{1}'."), - _0_and_1_index_signatures_are_incompatible: diag(2330, DiagnosticCategory.Error, "_0_and_1_index_signatures_are_incompatible_2330", "'{0}' and '{1}' index signatures are incompatible."), - this_cannot_be_referenced_in_a_module_or_namespace_body: diag(2331, DiagnosticCategory.Error, "this_cannot_be_referenced_in_a_module_or_namespace_body_2331", "'this' cannot be referenced in a module or namespace body."), - this_cannot_be_referenced_in_current_location: diag(2332, DiagnosticCategory.Error, "this_cannot_be_referenced_in_current_location_2332", "'this' cannot be referenced in current location."), - this_cannot_be_referenced_in_constructor_arguments: diag(2333, DiagnosticCategory.Error, "this_cannot_be_referenced_in_constructor_arguments_2333", "'this' cannot be referenced in constructor arguments."), - this_cannot_be_referenced_in_a_static_property_initializer: diag(2334, DiagnosticCategory.Error, "this_cannot_be_referenced_in_a_static_property_initializer_2334", "'this' cannot be referenced in a static property initializer."), - super_can_only_be_referenced_in_a_derived_class: diag(2335, DiagnosticCategory.Error, "super_can_only_be_referenced_in_a_derived_class_2335", "'super' can only be referenced in a derived class."), - super_cannot_be_referenced_in_constructor_arguments: diag(2336, DiagnosticCategory.Error, "super_cannot_be_referenced_in_constructor_arguments_2336", "'super' cannot be referenced in constructor arguments."), - Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: diag(2337, DiagnosticCategory.Error, "Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337", "Super calls are not permitted outside constructors or in nested functions inside constructors."), - super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: diag(2338, DiagnosticCategory.Error, "super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338", "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class."), - Property_0_does_not_exist_on_type_1: diag(2339, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_2339", "Property '{0}' does not exist on type '{1}'."), - Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: diag(2340, DiagnosticCategory.Error, "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340", "Only public and protected methods of the base class are accessible via the 'super' keyword."), - Property_0_is_private_and_only_accessible_within_class_1: diag(2341, DiagnosticCategory.Error, "Property_0_is_private_and_only_accessible_within_class_1_2341", "Property '{0}' is private and only accessible within class '{1}'."), - This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0: diag(2343, DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343", "This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."), - Type_0_does_not_satisfy_the_constraint_1: diag(2344, DiagnosticCategory.Error, "Type_0_does_not_satisfy_the_constraint_1_2344", "Type '{0}' does not satisfy the constraint '{1}'."), - Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: diag(2345, DiagnosticCategory.Error, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", "Argument of type '{0}' is not assignable to parameter of type '{1}'."), - Call_target_does_not_contain_any_signatures: diag(2346, DiagnosticCategory.Error, "Call_target_does_not_contain_any_signatures_2346", "Call target does not contain any signatures."), - Untyped_function_calls_may_not_accept_type_arguments: diag(2347, DiagnosticCategory.Error, "Untyped_function_calls_may_not_accept_type_arguments_2347", "Untyped function calls may not accept type arguments."), - Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: diag(2348, DiagnosticCategory.Error, "Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348", "Value of type '{0}' is not callable. Did you mean to include 'new'?"), - This_expression_is_not_callable: diag(2349, DiagnosticCategory.Error, "This_expression_is_not_callable_2349", "This expression is not callable."), - Only_a_void_function_can_be_called_with_the_new_keyword: diag(2350, DiagnosticCategory.Error, "Only_a_void_function_can_be_called_with_the_new_keyword_2350", "Only a void function can be called with the 'new' keyword."), - This_expression_is_not_constructable: diag(2351, DiagnosticCategory.Error, "This_expression_is_not_constructable_2351", "This expression is not constructable."), - Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first: diag(2352, DiagnosticCategory.Error, "Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the__2352", "Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first."), - Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1: diag(2353, DiagnosticCategory.Error, "Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353", "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'."), - This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found: diag(2354, DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354", "This syntax requires an imported helper but module '{0}' cannot be found."), - A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value: diag(2355, DiagnosticCategory.Error, "A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355", "A function whose declared type is neither 'void' nor 'any' must return a value."), - An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2356, DiagnosticCategory.Error, "An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type_2356", "An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type."), - The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: diag(2357, DiagnosticCategory.Error, "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", "The operand of an increment or decrement operator must be a variable or a property access."), - The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: diag(2358, DiagnosticCategory.Error, "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."), - The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: diag(2359, DiagnosticCategory.Error, "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359", "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type."), - The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2362, DiagnosticCategory.Error, "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362", "The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."), - The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2363, DiagnosticCategory.Error, "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363", "The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."), - The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access: diag(2364, DiagnosticCategory.Error, "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", "The left-hand side of an assignment expression must be a variable or a property access."), - Operator_0_cannot_be_applied_to_types_1_and_2: diag(2365, DiagnosticCategory.Error, "Operator_0_cannot_be_applied_to_types_1_and_2_2365", "Operator '{0}' cannot be applied to types '{1}' and '{2}'."), - Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined: diag(2366, DiagnosticCategory.Error, "Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined_2366", "Function lacks ending return statement and return type does not include 'undefined'."), - This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap: diag(2367, DiagnosticCategory.Error, "This_comparison_appears_to_be_unintentional_because_the_types_0_and_1_have_no_overlap_2367", "This comparison appears to be unintentional because the types '{0}' and '{1}' have no overlap."), - Type_parameter_name_cannot_be_0: diag(2368, DiagnosticCategory.Error, "Type_parameter_name_cannot_be_0_2368", "Type parameter name cannot be '{0}'."), - A_parameter_property_is_only_allowed_in_a_constructor_implementation: diag(2369, DiagnosticCategory.Error, "A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369", "A parameter property is only allowed in a constructor implementation."), - A_rest_parameter_must_be_of_an_array_type: diag(2370, DiagnosticCategory.Error, "A_rest_parameter_must_be_of_an_array_type_2370", "A rest parameter must be of an array type."), - A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: diag(2371, DiagnosticCategory.Error, "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371", "A parameter initializer is only allowed in a function or constructor implementation."), - Parameter_0_cannot_reference_itself: diag(2372, DiagnosticCategory.Error, "Parameter_0_cannot_reference_itself_2372", "Parameter '{0}' cannot reference itself."), - Parameter_0_cannot_reference_identifier_1_declared_after_it: diag(2373, DiagnosticCategory.Error, "Parameter_0_cannot_reference_identifier_1_declared_after_it_2373", "Parameter '{0}' cannot reference identifier '{1}' declared after it."), - Duplicate_index_signature_for_type_0: diag(2374, DiagnosticCategory.Error, "Duplicate_index_signature_for_type_0_2374", "Duplicate index signature for type '{0}'."), - Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: diag(2375, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."), - A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_class_contains_initialized_properties_parameter_properties_or_private_identifiers: diag(2376, DiagnosticCategory.Error, "A_super_call_must_be_the_first_statement_in_the_constructor_to_refer_to_super_or_this_when_a_derived_2376", "A 'super' call must be the first statement in the constructor to refer to 'super' or 'this' when a derived class contains initialized properties, parameter properties, or private identifiers."), - Constructors_for_derived_classes_must_contain_a_super_call: diag(2377, DiagnosticCategory.Error, "Constructors_for_derived_classes_must_contain_a_super_call_2377", "Constructors for derived classes must contain a 'super' call."), - A_get_accessor_must_return_a_value: diag(2378, DiagnosticCategory.Error, "A_get_accessor_must_return_a_value_2378", "A 'get' accessor must return a value."), - Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: diag(2379, DiagnosticCategory.Error, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379", "Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."), - The_return_type_of_a_get_accessor_must_be_assignable_to_its_set_accessor_type: diag(2380, DiagnosticCategory.Error, "The_return_type_of_a_get_accessor_must_be_assignable_to_its_set_accessor_type_2380", "The return type of a 'get' accessor must be assignable to its 'set' accessor type"), - Overload_signatures_must_all_be_exported_or_non_exported: diag(2383, DiagnosticCategory.Error, "Overload_signatures_must_all_be_exported_or_non_exported_2383", "Overload signatures must all be exported or non-exported."), - Overload_signatures_must_all_be_ambient_or_non_ambient: diag(2384, DiagnosticCategory.Error, "Overload_signatures_must_all_be_ambient_or_non_ambient_2384", "Overload signatures must all be ambient or non-ambient."), - Overload_signatures_must_all_be_public_private_or_protected: diag(2385, DiagnosticCategory.Error, "Overload_signatures_must_all_be_public_private_or_protected_2385", "Overload signatures must all be public, private or protected."), - Overload_signatures_must_all_be_optional_or_required: diag(2386, DiagnosticCategory.Error, "Overload_signatures_must_all_be_optional_or_required_2386", "Overload signatures must all be optional or required."), - Function_overload_must_be_static: diag(2387, DiagnosticCategory.Error, "Function_overload_must_be_static_2387", "Function overload must be static."), - Function_overload_must_not_be_static: diag(2388, DiagnosticCategory.Error, "Function_overload_must_not_be_static_2388", "Function overload must not be static."), - Function_implementation_name_must_be_0: diag(2389, DiagnosticCategory.Error, "Function_implementation_name_must_be_0_2389", "Function implementation name must be '{0}'."), - Constructor_implementation_is_missing: diag(2390, DiagnosticCategory.Error, "Constructor_implementation_is_missing_2390", "Constructor implementation is missing."), - Function_implementation_is_missing_or_not_immediately_following_the_declaration: diag(2391, DiagnosticCategory.Error, "Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391", "Function implementation is missing or not immediately following the declaration."), - Multiple_constructor_implementations_are_not_allowed: diag(2392, DiagnosticCategory.Error, "Multiple_constructor_implementations_are_not_allowed_2392", "Multiple constructor implementations are not allowed."), - Duplicate_function_implementation: diag(2393, DiagnosticCategory.Error, "Duplicate_function_implementation_2393", "Duplicate function implementation."), - This_overload_signature_is_not_compatible_with_its_implementation_signature: diag(2394, DiagnosticCategory.Error, "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394", "This overload signature is not compatible with its implementation signature."), - Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local: diag(2395, DiagnosticCategory.Error, "Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395", "Individual declarations in merged declaration '{0}' must be all exported or all local."), - Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: diag(2396, DiagnosticCategory.Error, "Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396", "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters."), - Declaration_name_conflicts_with_built_in_global_identifier_0: diag(2397, DiagnosticCategory.Error, "Declaration_name_conflicts_with_built_in_global_identifier_0_2397", "Declaration name conflicts with built-in global identifier '{0}'."), - constructor_cannot_be_used_as_a_parameter_property_name: diag(2398, DiagnosticCategory.Error, "constructor_cannot_be_used_as_a_parameter_property_name_2398", "'constructor' cannot be used as a parameter property name."), - Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: diag(2399, DiagnosticCategory.Error, "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399", "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."), - Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: diag(2400, DiagnosticCategory.Error, "Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400", "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."), - A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_initialized_properties_parameter_properties_or_private_identifiers: diag(2401, DiagnosticCategory.Error, "A_super_call_must_be_a_root_level_statement_within_a_constructor_of_a_derived_class_that_contains_in_2401", "A 'super' call must be a root-level statement within a constructor of a derived class that contains initialized properties, parameter properties, or private identifiers."), - Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: diag(2402, DiagnosticCategory.Error, "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402", "Expression resolves to '_super' that compiler uses to capture base class reference."), - Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: diag(2403, DiagnosticCategory.Error, "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403", "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'."), - The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: diag(2404, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404", "The left-hand side of a 'for...in' statement cannot use a type annotation."), - The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any: diag(2405, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405", "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'."), - The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access: diag(2406, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_must_be_a_variable_or_a_property_access_2406", "The left-hand side of a 'for...in' statement must be a variable or a property access."), - The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_here_has_type_0: diag(2407, DiagnosticCategory.Error, "The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_but_2407", "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'."), - Setters_cannot_return_a_value: diag(2408, DiagnosticCategory.Error, "Setters_cannot_return_a_value_2408", "Setters cannot return a value."), - Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: diag(2409, DiagnosticCategory.Error, "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", "Return type of constructor signature must be assignable to the instance type of the class."), - The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any: diag(2410, DiagnosticCategory.Error, "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410", "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."), - Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target: diag(2412, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."), - Property_0_of_type_1_is_not_assignable_to_2_index_type_3: diag(2411, DiagnosticCategory.Error, "Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411", "Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."), - _0_index_type_1_is_not_assignable_to_2_index_type_3: diag(2413, DiagnosticCategory.Error, "_0_index_type_1_is_not_assignable_to_2_index_type_3_2413", "'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."), - Class_name_cannot_be_0: diag(2414, DiagnosticCategory.Error, "Class_name_cannot_be_0_2414", "Class name cannot be '{0}'."), - Class_0_incorrectly_extends_base_class_1: diag(2415, DiagnosticCategory.Error, "Class_0_incorrectly_extends_base_class_1_2415", "Class '{0}' incorrectly extends base class '{1}'."), - Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2: diag(2416, DiagnosticCategory.Error, "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416", "Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."), - Class_static_side_0_incorrectly_extends_base_class_static_side_1: diag(2417, DiagnosticCategory.Error, "Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417", "Class static side '{0}' incorrectly extends base class static side '{1}'."), - Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1: diag(2418, DiagnosticCategory.Error, "Type_of_computed_property_s_value_is_0_which_is_not_assignable_to_type_1_2418", "Type of computed property's value is '{0}', which is not assignable to type '{1}'."), - Types_of_construct_signatures_are_incompatible: diag(2419, DiagnosticCategory.Error, "Types_of_construct_signatures_are_incompatible_2419", "Types of construct signatures are incompatible."), - Class_0_incorrectly_implements_interface_1: diag(2420, DiagnosticCategory.Error, "Class_0_incorrectly_implements_interface_1_2420", "Class '{0}' incorrectly implements interface '{1}'."), - A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2422, DiagnosticCategory.Error, "A_class_can_only_implement_an_object_type_or_intersection_of_object_types_with_statically_known_memb_2422", "A class can only implement an object type or intersection of object types with statically known members."), - Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: diag(2423, DiagnosticCategory.Error, "Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423", "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor."), - Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2425, DiagnosticCategory.Error, "Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425", "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function."), - Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: diag(2426, DiagnosticCategory.Error, "Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426", "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function."), - Interface_name_cannot_be_0: diag(2427, DiagnosticCategory.Error, "Interface_name_cannot_be_0_2427", "Interface name cannot be '{0}'."), - All_declarations_of_0_must_have_identical_type_parameters: diag(2428, DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_type_parameters_2428", "All declarations of '{0}' must have identical type parameters."), - Interface_0_incorrectly_extends_interface_1: diag(2430, DiagnosticCategory.Error, "Interface_0_incorrectly_extends_interface_1_2430", "Interface '{0}' incorrectly extends interface '{1}'."), - Enum_name_cannot_be_0: diag(2431, DiagnosticCategory.Error, "Enum_name_cannot_be_0_2431", "Enum name cannot be '{0}'."), - In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: diag(2432, DiagnosticCategory.Error, "In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432", "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element."), - A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: diag(2433, DiagnosticCategory.Error, "A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433", "A namespace declaration cannot be in a different file from a class or function with which it is merged."), - A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: diag(2434, DiagnosticCategory.Error, "A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434", "A namespace declaration cannot be located prior to a class or function with which it is merged."), - Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces: diag(2435, DiagnosticCategory.Error, "Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435", "Ambient modules cannot be nested in other modules or namespaces."), - Ambient_module_declaration_cannot_specify_relative_module_name: diag(2436, DiagnosticCategory.Error, "Ambient_module_declaration_cannot_specify_relative_module_name_2436", "Ambient module declaration cannot specify relative module name."), - Module_0_is_hidden_by_a_local_declaration_with_the_same_name: diag(2437, DiagnosticCategory.Error, "Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437", "Module '{0}' is hidden by a local declaration with the same name."), - Import_name_cannot_be_0: diag(2438, DiagnosticCategory.Error, "Import_name_cannot_be_0_2438", "Import name cannot be '{0}'."), - Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: diag(2439, DiagnosticCategory.Error, "Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439", "Import or export declaration in an ambient module declaration cannot reference module through relative module name."), - Import_declaration_conflicts_with_local_declaration_of_0: diag(2440, DiagnosticCategory.Error, "Import_declaration_conflicts_with_local_declaration_of_0_2440", "Import declaration conflicts with local declaration of '{0}'."), - Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: diag(2441, DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441", "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module."), - Types_have_separate_declarations_of_a_private_property_0: diag(2442, DiagnosticCategory.Error, "Types_have_separate_declarations_of_a_private_property_0_2442", "Types have separate declarations of a private property '{0}'."), - Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: diag(2443, DiagnosticCategory.Error, "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443", "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."), - Property_0_is_protected_in_type_1_but_public_in_type_2: diag(2444, DiagnosticCategory.Error, "Property_0_is_protected_in_type_1_but_public_in_type_2_2444", "Property '{0}' is protected in type '{1}' but public in type '{2}'."), - Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: diag(2445, DiagnosticCategory.Error, "Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445", "Property '{0}' is protected and only accessible within class '{1}' and its subclasses."), - Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2: diag(2446, DiagnosticCategory.Error, "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446", "Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."), - The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: diag(2447, DiagnosticCategory.Error, "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447", "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."), - Block_scoped_variable_0_used_before_its_declaration: diag(2448, DiagnosticCategory.Error, "Block_scoped_variable_0_used_before_its_declaration_2448", "Block-scoped variable '{0}' used before its declaration."), - Class_0_used_before_its_declaration: diag(2449, DiagnosticCategory.Error, "Class_0_used_before_its_declaration_2449", "Class '{0}' used before its declaration."), - Enum_0_used_before_its_declaration: diag(2450, DiagnosticCategory.Error, "Enum_0_used_before_its_declaration_2450", "Enum '{0}' used before its declaration."), - Cannot_redeclare_block_scoped_variable_0: diag(2451, DiagnosticCategory.Error, "Cannot_redeclare_block_scoped_variable_0_2451", "Cannot redeclare block-scoped variable '{0}'."), - An_enum_member_cannot_have_a_numeric_name: diag(2452, DiagnosticCategory.Error, "An_enum_member_cannot_have_a_numeric_name_2452", "An enum member cannot have a numeric name."), - Variable_0_is_used_before_being_assigned: diag(2454, DiagnosticCategory.Error, "Variable_0_is_used_before_being_assigned_2454", "Variable '{0}' is used before being assigned."), - Type_alias_0_circularly_references_itself: diag(2456, DiagnosticCategory.Error, "Type_alias_0_circularly_references_itself_2456", "Type alias '{0}' circularly references itself."), - Type_alias_name_cannot_be_0: diag(2457, DiagnosticCategory.Error, "Type_alias_name_cannot_be_0_2457", "Type alias name cannot be '{0}'."), - An_AMD_module_cannot_have_multiple_name_assignments: diag(2458, DiagnosticCategory.Error, "An_AMD_module_cannot_have_multiple_name_assignments_2458", "An AMD module cannot have multiple name assignments."), - Module_0_declares_1_locally_but_it_is_not_exported: diag(2459, DiagnosticCategory.Error, "Module_0_declares_1_locally_but_it_is_not_exported_2459", "Module '{0}' declares '{1}' locally, but it is not exported."), - Module_0_declares_1_locally_but_it_is_exported_as_2: diag(2460, DiagnosticCategory.Error, "Module_0_declares_1_locally_but_it_is_exported_as_2_2460", "Module '{0}' declares '{1}' locally, but it is exported as '{2}'."), - Type_0_is_not_an_array_type: diag(2461, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_2461", "Type '{0}' is not an array type."), - A_rest_element_must_be_last_in_a_destructuring_pattern: diag(2462, DiagnosticCategory.Error, "A_rest_element_must_be_last_in_a_destructuring_pattern_2462", "A rest element must be last in a destructuring pattern."), - A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: diag(2463, DiagnosticCategory.Error, "A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463", "A binding pattern parameter cannot be optional in an implementation signature."), - A_computed_property_name_must_be_of_type_string_number_symbol_or_any: diag(2464, DiagnosticCategory.Error, "A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464", "A computed property name must be of type 'string', 'number', 'symbol', or 'any'."), - this_cannot_be_referenced_in_a_computed_property_name: diag(2465, DiagnosticCategory.Error, "this_cannot_be_referenced_in_a_computed_property_name_2465", "'this' cannot be referenced in a computed property name."), - super_cannot_be_referenced_in_a_computed_property_name: diag(2466, DiagnosticCategory.Error, "super_cannot_be_referenced_in_a_computed_property_name_2466", "'super' cannot be referenced in a computed property name."), - A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type: diag(2467, DiagnosticCategory.Error, "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467", "A computed property name cannot reference a type parameter from its containing type."), - Cannot_find_global_value_0: diag(2468, DiagnosticCategory.Error, "Cannot_find_global_value_0_2468", "Cannot find global value '{0}'."), - The_0_operator_cannot_be_applied_to_type_symbol: diag(2469, DiagnosticCategory.Error, "The_0_operator_cannot_be_applied_to_type_symbol_2469", "The '{0}' operator cannot be applied to type 'symbol'."), - Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher: diag(2472, DiagnosticCategory.Error, "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472", "Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."), - Enum_declarations_must_all_be_const_or_non_const: diag(2473, DiagnosticCategory.Error, "Enum_declarations_must_all_be_const_or_non_const_2473", "Enum declarations must all be const or non-const."), - const_enum_member_initializers_must_be_constant_expressions: diag(2474, DiagnosticCategory.Error, "const_enum_member_initializers_must_be_constant_expressions_2474", "const enum member initializers must be constant expressions."), - const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query: diag(2475, DiagnosticCategory.Error, "const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475", "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query."), - A_const_enum_member_can_only_be_accessed_using_a_string_literal: diag(2476, DiagnosticCategory.Error, "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476", "A const enum member can only be accessed using a string literal."), - const_enum_member_initializer_was_evaluated_to_a_non_finite_value: diag(2477, DiagnosticCategory.Error, "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477", "'const' enum member initializer was evaluated to a non-finite value."), - const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN: diag(2478, DiagnosticCategory.Error, "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478", "'const' enum member initializer was evaluated to disallowed value 'NaN'."), - let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: diag(2480, DiagnosticCategory.Error, "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480", "'let' is not allowed to be used as a name in 'let' or 'const' declarations."), - Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: diag(2481, DiagnosticCategory.Error, "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481", "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."), - The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: diag(2483, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483", "The left-hand side of a 'for...of' statement cannot use a type annotation."), - Export_declaration_conflicts_with_exported_declaration_of_0: diag(2484, DiagnosticCategory.Error, "Export_declaration_conflicts_with_exported_declaration_of_0_2484", "Export declaration conflicts with exported declaration of '{0}'."), - The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access: diag(2487, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_must_be_a_variable_or_a_property_access_2487", "The left-hand side of a 'for...of' statement must be a variable or a property access."), - Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2488, DiagnosticCategory.Error, "Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488", "Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator."), - An_iterator_must_have_a_next_method: diag(2489, DiagnosticCategory.Error, "An_iterator_must_have_a_next_method_2489", "An iterator must have a 'next()' method."), - The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property: diag(2490, DiagnosticCategory.Error, "The_type_returned_by_the_0_method_of_an_iterator_must_have_a_value_property_2490", "The type returned by the '{0}()' method of an iterator must have a 'value' property."), - The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: diag(2491, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491", "The left-hand side of a 'for...in' statement cannot be a destructuring pattern."), - Cannot_redeclare_identifier_0_in_catch_clause: diag(2492, DiagnosticCategory.Error, "Cannot_redeclare_identifier_0_in_catch_clause_2492", "Cannot redeclare identifier '{0}' in catch clause."), - Tuple_type_0_of_length_1_has_no_element_at_index_2: diag(2493, DiagnosticCategory.Error, "Tuple_type_0_of_length_1_has_no_element_at_index_2_2493", "Tuple type '{0}' of length '{1}' has no element at index '{2}'."), - Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: diag(2494, DiagnosticCategory.Error, "Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494", "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher."), - Type_0_is_not_an_array_type_or_a_string_type: diag(2495, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_a_string_type_2495", "Type '{0}' is not an array type or a string type."), - The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression: diag(2496, DiagnosticCategory.Error, "The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496", "The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression."), - This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export: diag(2497, DiagnosticCategory.Error, "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497", "This module can only be referenced with ECMAScript imports/exports by turning on the '{0}' flag and referencing its default export."), - Module_0_uses_export_and_cannot_be_used_with_export_Asterisk: diag(2498, DiagnosticCategory.Error, "Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498", "Module '{0}' uses 'export =' and cannot be used with 'export *'."), - An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments: diag(2499, DiagnosticCategory.Error, "An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499", "An interface can only extend an identifier/qualified-name with optional type arguments."), - A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments: diag(2500, DiagnosticCategory.Error, "A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500", "A class can only implement an identifier/qualified-name with optional type arguments."), - A_rest_element_cannot_contain_a_binding_pattern: diag(2501, DiagnosticCategory.Error, "A_rest_element_cannot_contain_a_binding_pattern_2501", "A rest element cannot contain a binding pattern."), - _0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: diag(2502, DiagnosticCategory.Error, "_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502", "'{0}' is referenced directly or indirectly in its own type annotation."), - Cannot_find_namespace_0: diag(2503, DiagnosticCategory.Error, "Cannot_find_namespace_0_2503", "Cannot find namespace '{0}'."), - Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator: diag(2504, DiagnosticCategory.Error, "Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator_2504", "Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator."), - A_generator_cannot_have_a_void_type_annotation: diag(2505, DiagnosticCategory.Error, "A_generator_cannot_have_a_void_type_annotation_2505", "A generator cannot have a 'void' type annotation."), - _0_is_referenced_directly_or_indirectly_in_its_own_base_expression: diag(2506, DiagnosticCategory.Error, "_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506", "'{0}' is referenced directly or indirectly in its own base expression."), - Type_0_is_not_a_constructor_function_type: diag(2507, DiagnosticCategory.Error, "Type_0_is_not_a_constructor_function_type_2507", "Type '{0}' is not a constructor function type."), - No_base_constructor_has_the_specified_number_of_type_arguments: diag(2508, DiagnosticCategory.Error, "No_base_constructor_has_the_specified_number_of_type_arguments_2508", "No base constructor has the specified number of type arguments."), - Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2509, DiagnosticCategory.Error, "Base_constructor_return_type_0_is_not_an_object_type_or_intersection_of_object_types_with_statically_2509", "Base constructor return type '{0}' is not an object type or intersection of object types with statically known members."), - Base_constructors_must_all_have_the_same_return_type: diag(2510, DiagnosticCategory.Error, "Base_constructors_must_all_have_the_same_return_type_2510", "Base constructors must all have the same return type."), - Cannot_create_an_instance_of_an_abstract_class: diag(2511, DiagnosticCategory.Error, "Cannot_create_an_instance_of_an_abstract_class_2511", "Cannot create an instance of an abstract class."), - Overload_signatures_must_all_be_abstract_or_non_abstract: diag(2512, DiagnosticCategory.Error, "Overload_signatures_must_all_be_abstract_or_non_abstract_2512", "Overload signatures must all be abstract or non-abstract."), - Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression: diag(2513, DiagnosticCategory.Error, "Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513", "Abstract method '{0}' in class '{1}' cannot be accessed via super expression."), - A_tuple_type_cannot_be_indexed_with_a_negative_value: diag(2514, DiagnosticCategory.Error, "A_tuple_type_cannot_be_indexed_with_a_negative_value_2514", "A tuple type cannot be indexed with a negative value."), - Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: diag(2515, DiagnosticCategory.Error, "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", "Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'."), - All_declarations_of_an_abstract_method_must_be_consecutive: diag(2516, DiagnosticCategory.Error, "All_declarations_of_an_abstract_method_must_be_consecutive_2516", "All declarations of an abstract method must be consecutive."), - Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: diag(2517, DiagnosticCategory.Error, "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", "Cannot assign an abstract constructor type to a non-abstract constructor type."), - A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: diag(2518, DiagnosticCategory.Error, "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", "A 'this'-based type guard is not compatible with a parameter-based type guard."), - An_async_iterator_must_have_a_next_method: diag(2519, DiagnosticCategory.Error, "An_async_iterator_must_have_a_next_method_2519", "An async iterator must have a 'next()' method."), - Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: diag(2520, DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."), - The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method: diag(2522, DiagnosticCategory.Error, "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522", "The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method."), - yield_expressions_cannot_be_used_in_a_parameter_initializer: diag(2523, DiagnosticCategory.Error, "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523", "'yield' expressions cannot be used in a parameter initializer."), - await_expressions_cannot_be_used_in_a_parameter_initializer: diag(2524, DiagnosticCategory.Error, "await_expressions_cannot_be_used_in_a_parameter_initializer_2524", "'await' expressions cannot be used in a parameter initializer."), - Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value: diag(2525, DiagnosticCategory.Error, "Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525", "Initializer provides no value for this binding element and the binding element has no default value."), - A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface: diag(2526, DiagnosticCategory.Error, "A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526", "A 'this' type is available only in a non-static member of a class or interface."), - The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary: diag(2527, DiagnosticCategory.Error, "The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary_2527", "The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary."), - A_module_cannot_have_multiple_default_exports: diag(2528, DiagnosticCategory.Error, "A_module_cannot_have_multiple_default_exports_2528", "A module cannot have multiple default exports."), - Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions: diag(2529, DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529", "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions."), - Property_0_is_incompatible_with_index_signature: diag(2530, DiagnosticCategory.Error, "Property_0_is_incompatible_with_index_signature_2530", "Property '{0}' is incompatible with index signature."), - Object_is_possibly_null: diag(2531, DiagnosticCategory.Error, "Object_is_possibly_null_2531", "Object is possibly 'null'."), - Object_is_possibly_undefined: diag(2532, DiagnosticCategory.Error, "Object_is_possibly_undefined_2532", "Object is possibly 'undefined'."), - Object_is_possibly_null_or_undefined: diag(2533, DiagnosticCategory.Error, "Object_is_possibly_null_or_undefined_2533", "Object is possibly 'null' or 'undefined'."), - A_function_returning_never_cannot_have_a_reachable_end_point: diag(2534, DiagnosticCategory.Error, "A_function_returning_never_cannot_have_a_reachable_end_point_2534", "A function returning 'never' cannot have a reachable end point."), - Type_0_cannot_be_used_to_index_type_1: diag(2536, DiagnosticCategory.Error, "Type_0_cannot_be_used_to_index_type_1_2536", "Type '{0}' cannot be used to index type '{1}'."), - Type_0_has_no_matching_index_signature_for_type_1: diag(2537, DiagnosticCategory.Error, "Type_0_has_no_matching_index_signature_for_type_1_2537", "Type '{0}' has no matching index signature for type '{1}'."), - Type_0_cannot_be_used_as_an_index_type: diag(2538, DiagnosticCategory.Error, "Type_0_cannot_be_used_as_an_index_type_2538", "Type '{0}' cannot be used as an index type."), - Cannot_assign_to_0_because_it_is_not_a_variable: diag(2539, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_not_a_variable_2539", "Cannot assign to '{0}' because it is not a variable."), - Cannot_assign_to_0_because_it_is_a_read_only_property: diag(2540, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_read_only_property_2540", "Cannot assign to '{0}' because it is a read-only property."), - Index_signature_in_type_0_only_permits_reading: diag(2542, DiagnosticCategory.Error, "Index_signature_in_type_0_only_permits_reading_2542", "Index signature in type '{0}' only permits reading."), - Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference: diag(2543, DiagnosticCategory.Error, "Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543", "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."), - Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference: diag(2544, DiagnosticCategory.Error, "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544", "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."), - A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any: diag(2545, DiagnosticCategory.Error, "A_mixin_class_must_have_a_constructor_with_a_single_rest_parameter_of_type_any_2545", "A mixin class must have a constructor with a single rest parameter of type 'any[]'."), - The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property: diag(2547, DiagnosticCategory.Error, "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547", "The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."), - Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2548, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548", "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."), - Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2549, DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549", "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."), - Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later: diag(2550, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550", "Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{2}' or later."), - Property_0_does_not_exist_on_type_1_Did_you_mean_2: diag(2551, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551", "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"), - Cannot_find_name_0_Did_you_mean_1: diag(2552, DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_1_2552", "Cannot find name '{0}'. Did you mean '{1}'?"), - Computed_values_are_not_permitted_in_an_enum_with_string_valued_members: diag(2553, DiagnosticCategory.Error, "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553", "Computed values are not permitted in an enum with string valued members."), - Expected_0_arguments_but_got_1: diag(2554, DiagnosticCategory.Error, "Expected_0_arguments_but_got_1_2554", "Expected {0} arguments, but got {1}."), - Expected_at_least_0_arguments_but_got_1: diag(2555, DiagnosticCategory.Error, "Expected_at_least_0_arguments_but_got_1_2555", "Expected at least {0} arguments, but got {1}."), - A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter: diag(2556, DiagnosticCategory.Error, "A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556", "A spread argument must either have a tuple type or be passed to a rest parameter."), - Expected_0_type_arguments_but_got_1: diag(2558, DiagnosticCategory.Error, "Expected_0_type_arguments_but_got_1_2558", "Expected {0} type arguments, but got {1}."), - Type_0_has_no_properties_in_common_with_type_1: diag(2559, DiagnosticCategory.Error, "Type_0_has_no_properties_in_common_with_type_1_2559", "Type '{0}' has no properties in common with type '{1}'."), - Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it: diag(2560, DiagnosticCategory.Error, "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560", "Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"), - Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_write_2: diag(2561, DiagnosticCategory.Error, "Object_literal_may_only_specify_known_properties_but_0_does_not_exist_in_type_1_Did_you_mean_to_writ_2561", "Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?"), - Base_class_expressions_cannot_reference_class_type_parameters: diag(2562, DiagnosticCategory.Error, "Base_class_expressions_cannot_reference_class_type_parameters_2562", "Base class expressions cannot reference class type parameters."), - The_containing_function_or_module_body_is_too_large_for_control_flow_analysis: diag(2563, DiagnosticCategory.Error, "The_containing_function_or_module_body_is_too_large_for_control_flow_analysis_2563", "The containing function or module body is too large for control flow analysis."), - Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor: diag(2564, DiagnosticCategory.Error, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor_2564", "Property '{0}' has no initializer and is not definitely assigned in the constructor."), - Property_0_is_used_before_being_assigned: diag(2565, DiagnosticCategory.Error, "Property_0_is_used_before_being_assigned_2565", "Property '{0}' is used before being assigned."), - A_rest_element_cannot_have_a_property_name: diag(2566, DiagnosticCategory.Error, "A_rest_element_cannot_have_a_property_name_2566", "A rest element cannot have a property name."), - Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations: diag(2567, DiagnosticCategory.Error, "Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567", "Enum declarations can only merge with namespace or other enum declarations."), - Property_0_may_not_exist_on_type_1_Did_you_mean_2: diag(2568, DiagnosticCategory.Error, "Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568", "Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"), - Could_not_find_name_0_Did_you_mean_1: diag(2570, DiagnosticCategory.Error, "Could_not_find_name_0_Did_you_mean_1_2570", "Could not find name '{0}'. Did you mean '{1}'?"), - Object_is_of_type_unknown: diag(2571, DiagnosticCategory.Error, "Object_is_of_type_unknown_2571", "Object is of type 'unknown'."), - A_rest_element_type_must_be_an_array_type: diag(2574, DiagnosticCategory.Error, "A_rest_element_type_must_be_an_array_type_2574", "A rest element type must be an array type."), - No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments: diag(2575, DiagnosticCategory.Error, "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575", "No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."), - Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead: diag(2576, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576", "Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"), - Return_type_annotation_circularly_references_itself: diag(2577, DiagnosticCategory.Error, "Return_type_annotation_circularly_references_itself_2577", "Return type annotation circularly references itself."), - Unused_ts_expect_error_directive: diag(2578, DiagnosticCategory.Error, "Unused_ts_expect_error_directive_2578", "Unused '@ts-expect-error' directive."), - Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode: diag(2580, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2580", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`."), - Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery: diag(2581, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2581", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`."), - Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha: diag(2582, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`."), - Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later: diag(2583, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583", "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later."), - Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom: diag(2584, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584", "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'."), - _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later: diag(2585, DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585", "'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later."), - Cannot_assign_to_0_because_it_is_a_constant: diag(2588, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_constant_2588", "Cannot assign to '{0}' because it is a constant."), - Type_instantiation_is_excessively_deep_and_possibly_infinite: diag(2589, DiagnosticCategory.Error, "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589", "Type instantiation is excessively deep and possibly infinite."), - Expression_produces_a_union_type_that_is_too_complex_to_represent: diag(2590, DiagnosticCategory.Error, "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590", "Expression produces a union type that is too complex to represent."), - Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig: diag(2591, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig."), - Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig: diag(2592, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig."), - Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig: diag(2593, DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig."), - This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag: diag(2594, DiagnosticCategory.Error, "This_module_is_declared_with_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag_2594", "This module is declared with 'export =', and can only be used with a default import when using the '{0}' flag."), - _0_can_only_be_imported_by_using_a_default_import: diag(2595, DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_a_default_import_2595", "'{0}' can only be imported by using a default import."), - _0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: diag(2596, DiagnosticCategory.Error, "_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596", "'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import."), - _0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import: diag(2597, DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597", "'{0}' can only be imported by using a 'require' call or by using a default import."), - _0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: diag(2598, DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using__2598", "'{0}' can only be imported by using a 'require' call or by turning on the 'esModuleInterop' flag and using a default import."), - JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: diag(2602, DiagnosticCategory.Error, "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602", "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."), - Property_0_in_type_1_is_not_assignable_to_type_2: diag(2603, DiagnosticCategory.Error, "Property_0_in_type_1_is_not_assignable_to_type_2_2603", "Property '{0}' in type '{1}' is not assignable to type '{2}'."), - JSX_element_type_0_does_not_have_any_construct_or_call_signatures: diag(2604, DiagnosticCategory.Error, "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604", "JSX element type '{0}' does not have any construct or call signatures."), - Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property: diag(2606, DiagnosticCategory.Error, "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606", "Property '{0}' of JSX spread attribute is not assignable to target property."), - JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: diag(2607, DiagnosticCategory.Error, "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", "JSX element class does not support attributes because it does not have a '{0}' property."), - The_global_type_JSX_0_may_not_have_more_than_one_property: diag(2608, DiagnosticCategory.Error, "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", "The global type 'JSX.{0}' may not have more than one property."), - JSX_spread_child_must_be_an_array_type: diag(2609, DiagnosticCategory.Error, "JSX_spread_child_must_be_an_array_type_2609", "JSX spread child must be an array type."), - _0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property: diag(2610, DiagnosticCategory.Error, "_0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property_2610", "'{0}' is defined as an accessor in class '{1}', but is overridden here in '{2}' as an instance property."), - _0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor: diag(2611, DiagnosticCategory.Error, "_0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor_2611", "'{0}' is defined as a property in class '{1}', but is overridden here in '{2}' as an accessor."), - Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration: diag(2612, DiagnosticCategory.Error, "Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_2612", "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration."), - Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead: diag(2613, DiagnosticCategory.Error, "Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead_2613", "Module '{0}' has no default export. Did you mean to use 'import { {1} } from {0}' instead?"), - Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead: diag(2614, DiagnosticCategory.Error, "Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead_2614", "Module '{0}' has no exported member '{1}'. Did you mean to use 'import {1} from {0}' instead?"), - Type_of_property_0_circularly_references_itself_in_mapped_type_1: diag(2615, DiagnosticCategory.Error, "Type_of_property_0_circularly_references_itself_in_mapped_type_1_2615", "Type of property '{0}' circularly references itself in mapped type '{1}'."), - _0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import: diag(2616, DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import_2616", "'{0}' can only be imported by using 'import {1} = require({2})' or a default import."), - _0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: diag(2617, DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_us_2617", "'{0}' can only be imported by using 'import {1} = require({2})' or by turning on the 'esModuleInterop' flag and using a default import."), - Source_has_0_element_s_but_target_requires_1: diag(2618, DiagnosticCategory.Error, "Source_has_0_element_s_but_target_requires_1_2618", "Source has {0} element(s) but target requires {1}."), - Source_has_0_element_s_but_target_allows_only_1: diag(2619, DiagnosticCategory.Error, "Source_has_0_element_s_but_target_allows_only_1_2619", "Source has {0} element(s) but target allows only {1}."), - Target_requires_0_element_s_but_source_may_have_fewer: diag(2620, DiagnosticCategory.Error, "Target_requires_0_element_s_but_source_may_have_fewer_2620", "Target requires {0} element(s) but source may have fewer."), - Target_allows_only_0_element_s_but_source_may_have_more: diag(2621, DiagnosticCategory.Error, "Target_allows_only_0_element_s_but_source_may_have_more_2621", "Target allows only {0} element(s) but source may have more."), - Source_provides_no_match_for_required_element_at_position_0_in_target: diag(2623, DiagnosticCategory.Error, "Source_provides_no_match_for_required_element_at_position_0_in_target_2623", "Source provides no match for required element at position {0} in target."), - Source_provides_no_match_for_variadic_element_at_position_0_in_target: diag(2624, DiagnosticCategory.Error, "Source_provides_no_match_for_variadic_element_at_position_0_in_target_2624", "Source provides no match for variadic element at position {0} in target."), - Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target: diag(2625, DiagnosticCategory.Error, "Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625", "Variadic element at position {0} in source does not match element at position {1} in target."), - Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target: diag(2626, DiagnosticCategory.Error, "Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626", "Type at position {0} in source is not compatible with type at position {1} in target."), - Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target: diag(2627, DiagnosticCategory.Error, "Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627", "Type at positions {0} through {1} in source is not compatible with type at position {2} in target."), - Cannot_assign_to_0_because_it_is_an_enum: diag(2628, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_an_enum_2628", "Cannot assign to '{0}' because it is an enum."), - Cannot_assign_to_0_because_it_is_a_class: diag(2629, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_class_2629", "Cannot assign to '{0}' because it is a class."), - Cannot_assign_to_0_because_it_is_a_function: diag(2630, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_function_2630", "Cannot assign to '{0}' because it is a function."), - Cannot_assign_to_0_because_it_is_a_namespace: diag(2631, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_namespace_2631", "Cannot assign to '{0}' because it is a namespace."), - Cannot_assign_to_0_because_it_is_an_import: diag(2632, DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_an_import_2632", "Cannot assign to '{0}' because it is an import."), - JSX_property_access_expressions_cannot_include_JSX_namespace_names: diag(2633, DiagnosticCategory.Error, "JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633", "JSX property access expressions cannot include JSX namespace names"), - _0_index_signatures_are_incompatible: diag(2634, DiagnosticCategory.Error, "_0_index_signatures_are_incompatible_2634", "'{0}' index signatures are incompatible."), - Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable: diag(2635, DiagnosticCategory.Error, "Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635", "Type '{0}' has no signatures for which the type argument list is applicable."), - Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation: diag(2636, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636", "Type '{0}' is not assignable to type '{1}' as implied by variance annotation."), - Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types: diag(2637, DiagnosticCategory.Error, "Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637", "Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."), - Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator: diag(2638, DiagnosticCategory.Error, "Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638", "Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."), - Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: diag(2649, DiagnosticCategory.Error, "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", "Cannot augment module '{0}' with value exports because it resolves to a non-module entity."), - A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: diag(2651, DiagnosticCategory.Error, "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."), - Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: diag(2652, DiagnosticCategory.Error, "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."), - Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: diag(2653, DiagnosticCategory.Error, "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."), - JSX_expressions_must_have_one_parent_element: diag(2657, DiagnosticCategory.Error, "JSX_expressions_must_have_one_parent_element_2657", "JSX expressions must have one parent element."), - Type_0_provides_no_match_for_the_signature_1: diag(2658, DiagnosticCategory.Error, "Type_0_provides_no_match_for_the_signature_1_2658", "Type '{0}' provides no match for the signature '{1}'."), - super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: diag(2659, DiagnosticCategory.Error, "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."), - super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions: diag(2660, DiagnosticCategory.Error, "super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660", "'super' can only be referenced in members of derived classes or object literal expressions."), - Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module: diag(2661, DiagnosticCategory.Error, "Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module_2661", "Cannot export '{0}'. Only local declarations can be exported from a module."), - Cannot_find_name_0_Did_you_mean_the_static_member_1_0: diag(2662, DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662", "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?"), - Cannot_find_name_0_Did_you_mean_the_instance_member_this_0: diag(2663, DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663", "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?"), - Invalid_module_name_in_augmentation_module_0_cannot_be_found: diag(2664, DiagnosticCategory.Error, "Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664", "Invalid module name in augmentation, module '{0}' cannot be found."), - Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented: diag(2665, DiagnosticCategory.Error, "Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augm_2665", "Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented."), - Exports_and_export_assignments_are_not_permitted_in_module_augmentations: diag(2666, DiagnosticCategory.Error, "Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666", "Exports and export assignments are not permitted in module augmentations."), - Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module: diag(2667, DiagnosticCategory.Error, "Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667", "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module."), - export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible: diag(2668, DiagnosticCategory.Error, "export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668", "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible."), - Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations: diag(2669, DiagnosticCategory.Error, "Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669", "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."), - Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context: diag(2670, DiagnosticCategory.Error, "Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670", "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context."), - Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity: diag(2671, DiagnosticCategory.Error, "Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671", "Cannot augment module '{0}' because it resolves to a non-module entity."), - Cannot_assign_a_0_constructor_type_to_a_1_constructor_type: diag(2672, DiagnosticCategory.Error, "Cannot_assign_a_0_constructor_type_to_a_1_constructor_type_2672", "Cannot assign a '{0}' constructor type to a '{1}' constructor type."), - Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration: diag(2673, DiagnosticCategory.Error, "Constructor_of_class_0_is_private_and_only_accessible_within_the_class_declaration_2673", "Constructor of class '{0}' is private and only accessible within the class declaration."), - Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration: diag(2674, DiagnosticCategory.Error, "Constructor_of_class_0_is_protected_and_only_accessible_within_the_class_declaration_2674", "Constructor of class '{0}' is protected and only accessible within the class declaration."), - Cannot_extend_a_class_0_Class_constructor_is_marked_as_private: diag(2675, DiagnosticCategory.Error, "Cannot_extend_a_class_0_Class_constructor_is_marked_as_private_2675", "Cannot extend a class '{0}'. Class constructor is marked as private."), - Accessors_must_both_be_abstract_or_non_abstract: diag(2676, DiagnosticCategory.Error, "Accessors_must_both_be_abstract_or_non_abstract_2676", "Accessors must both be abstract or non-abstract."), - A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type: diag(2677, DiagnosticCategory.Error, "A_type_predicate_s_type_must_be_assignable_to_its_parameter_s_type_2677", "A type predicate's type must be assignable to its parameter's type."), - Type_0_is_not_comparable_to_type_1: diag(2678, DiagnosticCategory.Error, "Type_0_is_not_comparable_to_type_1_2678", "Type '{0}' is not comparable to type '{1}'."), - A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void: diag(2679, DiagnosticCategory.Error, "A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679", "A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."), - A_0_parameter_must_be_the_first_parameter: diag(2680, DiagnosticCategory.Error, "A_0_parameter_must_be_the_first_parameter_2680", "A '{0}' parameter must be the first parameter."), - A_constructor_cannot_have_a_this_parameter: diag(2681, DiagnosticCategory.Error, "A_constructor_cannot_have_a_this_parameter_2681", "A constructor cannot have a 'this' parameter."), - this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation: diag(2683, DiagnosticCategory.Error, "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683", "'this' implicitly has type 'any' because it does not have a type annotation."), - The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1: diag(2684, DiagnosticCategory.Error, "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684", "The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."), - The_this_types_of_each_signature_are_incompatible: diag(2685, DiagnosticCategory.Error, "The_this_types_of_each_signature_are_incompatible_2685", "The 'this' types of each signature are incompatible."), - _0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead: diag(2686, DiagnosticCategory.Error, "_0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead_2686", "'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead."), - All_declarations_of_0_must_have_identical_modifiers: diag(2687, DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_modifiers_2687", "All declarations of '{0}' must have identical modifiers."), - Cannot_find_type_definition_file_for_0: diag(2688, DiagnosticCategory.Error, "Cannot_find_type_definition_file_for_0_2688", "Cannot find type definition file for '{0}'."), - Cannot_extend_an_interface_0_Did_you_mean_implements: diag(2689, DiagnosticCategory.Error, "Cannot_extend_an_interface_0_Did_you_mean_implements_2689", "Cannot extend an interface '{0}'. Did you mean 'implements'?"), - _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0: diag(2690, DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0_2690", "'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?"), - An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead: diag(2691, DiagnosticCategory.Error, "An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead_2691", "An import path cannot end with a '{0}' extension. Consider importing '{1}' instead."), - _0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible: diag(2692, DiagnosticCategory.Error, "_0_is_a_primitive_but_1_is_a_wrapper_object_Prefer_using_0_when_possible_2692", "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible."), - _0_only_refers_to_a_type_but_is_being_used_as_a_value_here: diag(2693, DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_2693", "'{0}' only refers to a type, but is being used as a value here."), - Namespace_0_has_no_exported_member_1: diag(2694, DiagnosticCategory.Error, "Namespace_0_has_no_exported_member_1_2694", "Namespace '{0}' has no exported member '{1}'."), - Left_side_of_comma_operator_is_unused_and_has_no_side_effects: diag(2695, DiagnosticCategory.Error, "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695", "Left side of comma operator is unused and has no side effects.", /*reportsUnnecessary*/ true), - The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead: diag(2696, DiagnosticCategory.Error, "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696", "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"), - An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: diag(2697, DiagnosticCategory.Error, "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."), - Spread_types_may_only_be_created_from_object_types: diag(2698, DiagnosticCategory.Error, "Spread_types_may_only_be_created_from_object_types_2698", "Spread types may only be created from object types."), - Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1: diag(2699, DiagnosticCategory.Error, "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."), - Rest_types_may_only_be_created_from_object_types: diag(2700, DiagnosticCategory.Error, "Rest_types_may_only_be_created_from_object_types_2700", "Rest types may only be created from object types."), - The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access: diag(2701, DiagnosticCategory.Error, "The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access_2701", "The target of an object rest assignment must be a variable or a property access."), - _0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: diag(2702, DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", "'{0}' only refers to a type, but is being used as a namespace here."), - The_operand_of_a_delete_operator_must_be_a_property_reference: diag(2703, DiagnosticCategory.Error, "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", "The operand of a 'delete' operator must be a property reference."), - The_operand_of_a_delete_operator_cannot_be_a_read_only_property: diag(2704, DiagnosticCategory.Error, "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", "The operand of a 'delete' operator cannot be a read-only property."), - An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: diag(2705, DiagnosticCategory.Error, "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."), - Required_type_parameters_may_not_follow_optional_type_parameters: diag(2706, DiagnosticCategory.Error, "Required_type_parameters_may_not_follow_optional_type_parameters_2706", "Required type parameters may not follow optional type parameters."), - Generic_type_0_requires_between_1_and_2_type_arguments: diag(2707, DiagnosticCategory.Error, "Generic_type_0_requires_between_1_and_2_type_arguments_2707", "Generic type '{0}' requires between {1} and {2} type arguments."), - Cannot_use_namespace_0_as_a_value: diag(2708, DiagnosticCategory.Error, "Cannot_use_namespace_0_as_a_value_2708", "Cannot use namespace '{0}' as a value."), - Cannot_use_namespace_0_as_a_type: diag(2709, DiagnosticCategory.Error, "Cannot_use_namespace_0_as_a_type_2709", "Cannot use namespace '{0}' as a type."), - _0_are_specified_twice_The_attribute_named_0_will_be_overwritten: diag(2710, DiagnosticCategory.Error, "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", "'{0}' are specified twice. The attribute named '{0}' will be overwritten."), - A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: diag(2711, DiagnosticCategory.Error, "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711", "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."), - A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: diag(2712, DiagnosticCategory.Error, "A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712", "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."), - Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1: diag(2713, DiagnosticCategory.Error, "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713", "Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}[\"{1}\"]'?"), - The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context: diag(2714, DiagnosticCategory.Error, "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714", "The expression of an export assignment must be an identifier or qualified name in an ambient context."), - Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor: diag(2715, DiagnosticCategory.Error, "Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715", "Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."), - Type_parameter_0_has_a_circular_default: diag(2716, DiagnosticCategory.Error, "Type_parameter_0_has_a_circular_default_2716", "Type parameter '{0}' has a circular default."), - Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2: diag(2717, DiagnosticCategory.Error, "Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_t_2717", "Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'."), - Duplicate_property_0: diag(2718, DiagnosticCategory.Error, "Duplicate_property_0_2718", "Duplicate property '{0}'."), - Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated: diag(2719, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719", "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated."), - Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass: diag(2720, DiagnosticCategory.Error, "Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclas_2720", "Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?"), - Cannot_invoke_an_object_which_is_possibly_null: diag(2721, DiagnosticCategory.Error, "Cannot_invoke_an_object_which_is_possibly_null_2721", "Cannot invoke an object which is possibly 'null'."), - Cannot_invoke_an_object_which_is_possibly_undefined: diag(2722, DiagnosticCategory.Error, "Cannot_invoke_an_object_which_is_possibly_undefined_2722", "Cannot invoke an object which is possibly 'undefined'."), - Cannot_invoke_an_object_which_is_possibly_null_or_undefined: diag(2723, DiagnosticCategory.Error, "Cannot_invoke_an_object_which_is_possibly_null_or_undefined_2723", "Cannot invoke an object which is possibly 'null' or 'undefined'."), - _0_has_no_exported_member_named_1_Did_you_mean_2: diag(2724, DiagnosticCategory.Error, "_0_has_no_exported_member_named_1_Did_you_mean_2_2724", "'{0}' has no exported member named '{1}'. Did you mean '{2}'?"), - Class_name_cannot_be_Object_when_targeting_ES5_with_module_0: diag(2725, DiagnosticCategory.Error, "Class_name_cannot_be_Object_when_targeting_ES5_with_module_0_2725", "Class name cannot be 'Object' when targeting ES5 with module {0}."), - Cannot_find_lib_definition_for_0: diag(2726, DiagnosticCategory.Error, "Cannot_find_lib_definition_for_0_2726", "Cannot find lib definition for '{0}'."), - Cannot_find_lib_definition_for_0_Did_you_mean_1: diag(2727, DiagnosticCategory.Error, "Cannot_find_lib_definition_for_0_Did_you_mean_1_2727", "Cannot find lib definition for '{0}'. Did you mean '{1}'?"), - _0_is_declared_here: diag(2728, DiagnosticCategory.Message, "_0_is_declared_here_2728", "'{0}' is declared here."), - Property_0_is_used_before_its_initialization: diag(2729, DiagnosticCategory.Error, "Property_0_is_used_before_its_initialization_2729", "Property '{0}' is used before its initialization."), - An_arrow_function_cannot_have_a_this_parameter: diag(2730, DiagnosticCategory.Error, "An_arrow_function_cannot_have_a_this_parameter_2730", "An arrow function cannot have a 'this' parameter."), - Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String: diag(2731, DiagnosticCategory.Error, "Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_i_2731", "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'."), - Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension: diag(2732, DiagnosticCategory.Error, "Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension_2732", "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension."), - Property_0_was_also_declared_here: diag(2733, DiagnosticCategory.Error, "Property_0_was_also_declared_here_2733", "Property '{0}' was also declared here."), - Are_you_missing_a_semicolon: diag(2734, DiagnosticCategory.Error, "Are_you_missing_a_semicolon_2734", "Are you missing a semicolon?"), - Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1: diag(2735, DiagnosticCategory.Error, "Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1_2735", "Did you mean for '{0}' to be constrained to type 'new (...args: any[]) => {1}'?"), - Operator_0_cannot_be_applied_to_type_1: diag(2736, DiagnosticCategory.Error, "Operator_0_cannot_be_applied_to_type_1_2736", "Operator '{0}' cannot be applied to type '{1}'."), - BigInt_literals_are_not_available_when_targeting_lower_than_ES2020: diag(2737, DiagnosticCategory.Error, "BigInt_literals_are_not_available_when_targeting_lower_than_ES2020_2737", "BigInt literals are not available when targeting lower than ES2020."), - An_outer_value_of_this_is_shadowed_by_this_container: diag(2738, DiagnosticCategory.Message, "An_outer_value_of_this_is_shadowed_by_this_container_2738", "An outer value of 'this' is shadowed by this container."), - Type_0_is_missing_the_following_properties_from_type_1_Colon_2: diag(2739, DiagnosticCategory.Error, "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_2739", "Type '{0}' is missing the following properties from type '{1}': {2}"), - Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more: diag(2740, DiagnosticCategory.Error, "Type_0_is_missing_the_following_properties_from_type_1_Colon_2_and_3_more_2740", "Type '{0}' is missing the following properties from type '{1}': {2}, and {3} more."), - Property_0_is_missing_in_type_1_but_required_in_type_2: diag(2741, DiagnosticCategory.Error, "Property_0_is_missing_in_type_1_but_required_in_type_2_2741", "Property '{0}' is missing in type '{1}' but required in type '{2}'."), - The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary: diag(2742, DiagnosticCategory.Error, "The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_a_2742", "The inferred type of '{0}' cannot be named without a reference to '{1}'. This is likely not portable. A type annotation is necessary."), - No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments: diag(2743, DiagnosticCategory.Error, "No_overload_expects_0_type_arguments_but_overloads_do_exist_that_expect_either_1_or_2_type_arguments_2743", "No overload expects {0} type arguments, but overloads do exist that expect either {1} or {2} type arguments."), - Type_parameter_defaults_can_only_reference_previously_declared_type_parameters: diag(2744, DiagnosticCategory.Error, "Type_parameter_defaults_can_only_reference_previously_declared_type_parameters_2744", "Type parameter defaults can only reference previously declared type parameters."), - This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_provided: diag(2745, DiagnosticCategory.Error, "This_JSX_tag_s_0_prop_expects_type_1_which_requires_multiple_children_but_only_a_single_child_was_pr_2745", "This JSX tag's '{0}' prop expects type '{1}' which requires multiple children, but only a single child was provided."), - This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided: diag(2746, DiagnosticCategory.Error, "This_JSX_tag_s_0_prop_expects_a_single_child_of_type_1_but_multiple_children_were_provided_2746", "This JSX tag's '{0}' prop expects a single child of type '{1}', but multiple children were provided."), - _0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2: diag(2747, DiagnosticCategory.Error, "_0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_t_2747", "'{0}' components don't accept text as child elements. Text in JSX has the type 'string', but the expected type of '{1}' is '{2}'."), - Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided: diag(2748, DiagnosticCategory.Error, "Cannot_access_ambient_const_enums_when_the_isolatedModules_flag_is_provided_2748", "Cannot access ambient const enums when the '--isolatedModules' flag is provided."), - _0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0: diag(2749, DiagnosticCategory.Error, "_0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0_2749", "'{0}' refers to a value, but is being used as a type here. Did you mean 'typeof {0}'?"), - The_implementation_signature_is_declared_here: diag(2750, DiagnosticCategory.Error, "The_implementation_signature_is_declared_here_2750", "The implementation signature is declared here."), - Circularity_originates_in_type_at_this_location: diag(2751, DiagnosticCategory.Error, "Circularity_originates_in_type_at_this_location_2751", "Circularity originates in type at this location."), - The_first_export_default_is_here: diag(2752, DiagnosticCategory.Error, "The_first_export_default_is_here_2752", "The first export default is here."), - Another_export_default_is_here: diag(2753, DiagnosticCategory.Error, "Another_export_default_is_here_2753", "Another export default is here."), - super_may_not_use_type_arguments: diag(2754, DiagnosticCategory.Error, "super_may_not_use_type_arguments_2754", "'super' may not use type arguments."), - No_constituent_of_type_0_is_callable: diag(2755, DiagnosticCategory.Error, "No_constituent_of_type_0_is_callable_2755", "No constituent of type '{0}' is callable."), - Not_all_constituents_of_type_0_are_callable: diag(2756, DiagnosticCategory.Error, "Not_all_constituents_of_type_0_are_callable_2756", "Not all constituents of type '{0}' are callable."), - Type_0_has_no_call_signatures: diag(2757, DiagnosticCategory.Error, "Type_0_has_no_call_signatures_2757", "Type '{0}' has no call signatures."), - Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_other: diag(2758, DiagnosticCategory.Error, "Each_member_of_the_union_type_0_has_signatures_but_none_of_those_signatures_are_compatible_with_each_2758", "Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other."), - No_constituent_of_type_0_is_constructable: diag(2759, DiagnosticCategory.Error, "No_constituent_of_type_0_is_constructable_2759", "No constituent of type '{0}' is constructable."), - Not_all_constituents_of_type_0_are_constructable: diag(2760, DiagnosticCategory.Error, "Not_all_constituents_of_type_0_are_constructable_2760", "Not all constituents of type '{0}' are constructable."), - Type_0_has_no_construct_signatures: diag(2761, DiagnosticCategory.Error, "Type_0_has_no_construct_signatures_2761", "Type '{0}' has no construct signatures."), - Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_with_each_other: diag(2762, DiagnosticCategory.Error, "Each_member_of_the_union_type_0_has_construct_signatures_but_none_of_those_signatures_are_compatible_2762", "Each member of the union type '{0}' has construct signatures, but none of those signatures are compatible with each other."), - Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_send_0: diag(2763, DiagnosticCategory.Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_for_of_will_always_s_2763", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but for-of will always send '{0}'."), - Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_always_send_0: diag(2764, DiagnosticCategory.Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_spread_will_al_2764", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array spread will always send '{0}'."), - Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring_will_always_send_0: diag(2765, DiagnosticCategory.Error, "Cannot_iterate_value_because_the_next_method_of_its_iterator_expects_type_1_but_array_destructuring__2765", "Cannot iterate value because the 'next' method of its iterator expects type '{1}', but array destructuring will always send '{0}'."), - Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_containing_generator_will_always_send_0: diag(2766, DiagnosticCategory.Error, "Cannot_delegate_iteration_to_value_because_the_next_method_of_its_iterator_expects_type_1_but_the_co_2766", "Cannot delegate iteration to value because the 'next' method of its iterator expects type '{1}', but the containing generator will always send '{0}'."), - The_0_property_of_an_iterator_must_be_a_method: diag(2767, DiagnosticCategory.Error, "The_0_property_of_an_iterator_must_be_a_method_2767", "The '{0}' property of an iterator must be a method."), - The_0_property_of_an_async_iterator_must_be_a_method: diag(2768, DiagnosticCategory.Error, "The_0_property_of_an_async_iterator_must_be_a_method_2768", "The '{0}' property of an async iterator must be a method."), - No_overload_matches_this_call: diag(2769, DiagnosticCategory.Error, "No_overload_matches_this_call_2769", "No overload matches this call."), - The_last_overload_gave_the_following_error: diag(2770, DiagnosticCategory.Error, "The_last_overload_gave_the_following_error_2770", "The last overload gave the following error."), - The_last_overload_is_declared_here: diag(2771, DiagnosticCategory.Error, "The_last_overload_is_declared_here_2771", "The last overload is declared here."), - Overload_0_of_1_2_gave_the_following_error: diag(2772, DiagnosticCategory.Error, "Overload_0_of_1_2_gave_the_following_error_2772", "Overload {0} of {1}, '{2}', gave the following error."), - Did_you_forget_to_use_await: diag(2773, DiagnosticCategory.Error, "Did_you_forget_to_use_await_2773", "Did you forget to use 'await'?"), - This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead: diag(2774, DiagnosticCategory.Error, "This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774", "This condition will always return true since this function is always defined. Did you mean to call it instead?"), - Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation: diag(2775, DiagnosticCategory.Error, "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775", "Assertions require every name in the call target to be declared with an explicit type annotation."), - Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name: diag(2776, DiagnosticCategory.Error, "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776", "Assertions require the call target to be an identifier or qualified name."), - The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access: diag(2777, DiagnosticCategory.Error, "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777", "The operand of an increment or decrement operator may not be an optional property access."), - The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access: diag(2778, DiagnosticCategory.Error, "The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access_2778", "The target of an object rest assignment may not be an optional property access."), - The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access: diag(2779, DiagnosticCategory.Error, "The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access_2779", "The left-hand side of an assignment expression may not be an optional property access."), - The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access: diag(2780, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_may_not_be_an_optional_property_access_2780", "The left-hand side of a 'for...in' statement may not be an optional property access."), - The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access: diag(2781, DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_may_not_be_an_optional_property_access_2781", "The left-hand side of a 'for...of' statement may not be an optional property access."), - _0_needs_an_explicit_type_annotation: diag(2782, DiagnosticCategory.Message, "_0_needs_an_explicit_type_annotation_2782", "'{0}' needs an explicit type annotation."), - _0_is_specified_more_than_once_so_this_usage_will_be_overwritten: diag(2783, DiagnosticCategory.Error, "_0_is_specified_more_than_once_so_this_usage_will_be_overwritten_2783", "'{0}' is specified more than once, so this usage will be overwritten."), - get_and_set_accessors_cannot_declare_this_parameters: diag(2784, DiagnosticCategory.Error, "get_and_set_accessors_cannot_declare_this_parameters_2784", "'get' and 'set' accessors cannot declare 'this' parameters."), - This_spread_always_overwrites_this_property: diag(2785, DiagnosticCategory.Error, "This_spread_always_overwrites_this_property_2785", "This spread always overwrites this property."), - _0_cannot_be_used_as_a_JSX_component: diag(2786, DiagnosticCategory.Error, "_0_cannot_be_used_as_a_JSX_component_2786", "'{0}' cannot be used as a JSX component."), - Its_return_type_0_is_not_a_valid_JSX_element: diag(2787, DiagnosticCategory.Error, "Its_return_type_0_is_not_a_valid_JSX_element_2787", "Its return type '{0}' is not a valid JSX element."), - Its_instance_type_0_is_not_a_valid_JSX_element: diag(2788, DiagnosticCategory.Error, "Its_instance_type_0_is_not_a_valid_JSX_element_2788", "Its instance type '{0}' is not a valid JSX element."), - Its_element_type_0_is_not_a_valid_JSX_element: diag(2789, DiagnosticCategory.Error, "Its_element_type_0_is_not_a_valid_JSX_element_2789", "Its element type '{0}' is not a valid JSX element."), - The_operand_of_a_delete_operator_must_be_optional: diag(2790, DiagnosticCategory.Error, "The_operand_of_a_delete_operator_must_be_optional_2790", "The operand of a 'delete' operator must be optional."), - Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later: diag(2791, DiagnosticCategory.Error, "Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_lat_2791", "Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later."), - Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_the_paths_option: diag(2792, DiagnosticCategory.Error, "Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_th_2792", "Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?"), - The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_are_not_externally_visible: diag(2793, DiagnosticCategory.Error, "The_call_would_have_succeeded_against_this_implementation_but_implementation_signatures_of_overloads_2793", "The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible."), - Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise: diag(2794, DiagnosticCategory.Error, "Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise_2794", "Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?"), - The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types: diag(2795, DiagnosticCategory.Error, "The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types_2795", "The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types."), - It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tagged_template_expression_which_cannot_be_invoked: diag(2796, DiagnosticCategory.Error, "It_is_likely_that_you_are_missing_a_comma_to_separate_these_two_template_expressions_They_form_a_tag_2796", "It is likely that you are missing a comma to separate these two template expressions. They form a tagged template expression which cannot be invoked."), - A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_be_declared_abstract: diag(2797, DiagnosticCategory.Error, "A_mixin_class_that_extends_from_a_type_variable_containing_an_abstract_construct_signature_must_also_2797", "A mixin class that extends from a type variable containing an abstract construct signature must also be declared 'abstract'."), - The_declaration_was_marked_as_deprecated_here: diag(2798, DiagnosticCategory.Error, "The_declaration_was_marked_as_deprecated_here_2798", "The declaration was marked as deprecated here."), - Type_produces_a_tuple_type_that_is_too_large_to_represent: diag(2799, DiagnosticCategory.Error, "Type_produces_a_tuple_type_that_is_too_large_to_represent_2799", "Type produces a tuple type that is too large to represent."), - Expression_produces_a_tuple_type_that_is_too_large_to_represent: diag(2800, DiagnosticCategory.Error, "Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800", "Expression produces a tuple type that is too large to represent."), - This_condition_will_always_return_true_since_this_0_is_always_defined: diag(2801, DiagnosticCategory.Error, "This_condition_will_always_return_true_since_this_0_is_always_defined_2801", "This condition will always return true since this '{0}' is always defined."), - Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher: diag(2802, DiagnosticCategory.Error, "Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802", "Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."), - Cannot_assign_to_private_method_0_Private_methods_are_not_writable: diag(2803, DiagnosticCategory.Error, "Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803", "Cannot assign to private method '{0}'. Private methods are not writable."), - Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name: diag(2804, DiagnosticCategory.Error, "Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804", "Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."), - Private_accessor_was_defined_without_a_getter: diag(2806, DiagnosticCategory.Error, "Private_accessor_was_defined_without_a_getter_2806", "Private accessor was defined without a getter."), - This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0: diag(2807, DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807", "This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."), - A_get_accessor_must_be_at_least_as_accessible_as_the_setter: diag(2808, DiagnosticCategory.Error, "A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808", "A get accessor must be at least as accessible as the setter"), - Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_the_whole_assignment_in_parentheses: diag(2809, DiagnosticCategory.Error, "Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809", "Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the the whole assignment in parentheses."), - Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_without_arguments: diag(2810, DiagnosticCategory.Error, "Expected_1_argument_but_got_0_new_Promise_needs_a_JSDoc_hint_to_produce_a_resolve_that_can_be_called_2810", "Expected 1 argument, but got 0. 'new Promise()' needs a JSDoc hint to produce a 'resolve' that can be called without arguments."), - Initializer_for_property_0: diag(2811, DiagnosticCategory.Error, "Initializer_for_property_0_2811", "Initializer for property '{0}'"), - Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: diag(2812, DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."), - Class_declaration_cannot_implement_overload_list_for_0: diag(2813, DiagnosticCategory.Error, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."), - Function_with_bodies_can_only_merge_with_classes_that_are_ambient: diag(2814, DiagnosticCategory.Error, "Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814", "Function with bodies can only merge with classes that are ambient."), - arguments_cannot_be_referenced_in_property_initializers: diag(2815, DiagnosticCategory.Error, "arguments_cannot_be_referenced_in_property_initializers_2815", "'arguments' cannot be referenced in property initializers."), - Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class: diag(2816, DiagnosticCategory.Error, "Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816", "Cannot use 'this' in a static property initializer of a decorated class."), - Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block: diag(2817, DiagnosticCategory.Error, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817", "Property '{0}' has no initializer and is not definitely assigned in a class static block."), - Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers: diag(2818, DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818", "Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."), - Namespace_name_cannot_be_0: diag(2819, DiagnosticCategory.Error, "Namespace_name_cannot_be_0_2819", "Namespace name cannot be '{0}'."), - Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"), - Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext: diag(2821, DiagnosticCategory.Error, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_or_nodenext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'."), - Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, DiagnosticCategory.Error, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."), - Cannot_find_namespace_0_Did_you_mean_1: diag(2833, DiagnosticCategory.Error, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"), - Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path."), - Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node16_or_nodenext_Did_you_mean_0: diag(2835, DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Did you mean '{0}'?"), - Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls: diag(2836, DiagnosticCategory.Error, "Import_assertions_are_not_allowed_on_statements_that_transpile_to_commonjs_require_calls_2836", "Import assertions are not allowed on statements that transpile to commonjs 'require' calls."), - Import_assertion_values_must_be_string_literal_expressions: diag(2837, DiagnosticCategory.Error, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."), - All_declarations_of_0_must_have_identical_constraints: diag(2838, DiagnosticCategory.Error, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."), - This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, DiagnosticCategory.Error, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."), - An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes: diag(2840, DiagnosticCategory.Error, "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840", "An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"), - The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(2841, DiagnosticCategory.Error, "The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_2841", "The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), - _0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: diag(2842, DiagnosticCategory.Error, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"), - We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, DiagnosticCategory.Error, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."), - Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2844, DiagnosticCategory.Error, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."), - This_condition_will_always_return_0: diag(2845, DiagnosticCategory.Error, "This_condition_will_always_return_0_2845", "This condition will always return '{0}'."), - Import_declaration_0_is_using_private_name_1: diag(4000, DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."), - Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."), - Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."), - Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4006, DiagnosticCategory.Error, "Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006", "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."), - Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4008, DiagnosticCategory.Error, "Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008", "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'."), - Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: diag(4010, DiagnosticCategory.Error, "Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010", "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'."), - Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: diag(4012, DiagnosticCategory.Error, "Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012", "Type parameter '{0}' of public method from exported class has or is using private name '{1}'."), - Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: diag(4014, DiagnosticCategory.Error, "Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014", "Type parameter '{0}' of method from exported interface has or is using private name '{1}'."), - Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: diag(4016, DiagnosticCategory.Error, "Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016", "Type parameter '{0}' of exported function has or is using private name '{1}'."), - Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: diag(4019, DiagnosticCategory.Error, "Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019", "Implements clause of exported class '{0}' has or is using private name '{1}'."), - extends_clause_of_exported_class_0_has_or_is_using_private_name_1: diag(4020, DiagnosticCategory.Error, "extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020", "'extends' clause of exported class '{0}' has or is using private name '{1}'."), - extends_clause_of_exported_class_has_or_is_using_private_name_0: diag(4021, DiagnosticCategory.Error, "extends_clause_of_exported_class_has_or_is_using_private_name_0_4021", "'extends' clause of exported class has or is using private name '{0}'."), - extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: diag(4022, DiagnosticCategory.Error, "extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022", "'extends' clause of exported interface '{0}' has or is using private name '{1}'."), - Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4023, DiagnosticCategory.Error, "Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023", "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named."), - Exported_variable_0_has_or_is_using_name_1_from_private_module_2: diag(4024, DiagnosticCategory.Error, "Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024", "Exported variable '{0}' has or is using name '{1}' from private module '{2}'."), - Exported_variable_0_has_or_is_using_private_name_1: diag(4025, DiagnosticCategory.Error, "Exported_variable_0_has_or_is_using_private_name_1_4025", "Exported variable '{0}' has or is using private name '{1}'."), - Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4026, DiagnosticCategory.Error, "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026", "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), - Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4027, DiagnosticCategory.Error, "Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027", "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'."), - Public_static_property_0_of_exported_class_has_or_is_using_private_name_1: diag(4028, DiagnosticCategory.Error, "Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028", "Public static property '{0}' of exported class has or is using private name '{1}'."), - Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4029, DiagnosticCategory.Error, "Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029", "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), - Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4030, DiagnosticCategory.Error, "Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030", "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'."), - Public_property_0_of_exported_class_has_or_is_using_private_name_1: diag(4031, DiagnosticCategory.Error, "Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031", "Public property '{0}' of exported class has or is using private name '{1}'."), - Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4032, DiagnosticCategory.Error, "Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032", "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'."), - Property_0_of_exported_interface_has_or_is_using_private_name_1: diag(4033, DiagnosticCategory.Error, "Property_0_of_exported_interface_has_or_is_using_private_name_1_4033", "Property '{0}' of exported interface has or is using private name '{1}'."), - Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4034, DiagnosticCategory.Error, "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_mod_4034", "Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), - Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1: diag(4035, DiagnosticCategory.Error, "Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1_4035", "Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'."), - Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4036, DiagnosticCategory.Error, "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4036", "Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), - Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1: diag(4037, DiagnosticCategory.Error, "Parameter_type_of_public_setter_0_from_exported_class_has_or_is_using_private_name_1_4037", "Parameter type of public setter '{0}' from exported class has or is using private name '{1}'."), - Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4038, DiagnosticCategory.Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_modul_4038", "Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."), - Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4039, DiagnosticCategory.Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_4039", "Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), - Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1: diag(4040, DiagnosticCategory.Error, "Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_private_name_1_4040", "Return type of public static getter '{0}' from exported class has or is using private name '{1}'."), - Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4041, DiagnosticCategory.Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_4041", "Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named."), - Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4042, DiagnosticCategory.Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2_4042", "Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'."), - Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1: diag(4043, DiagnosticCategory.Error, "Return_type_of_public_getter_0_from_exported_class_has_or_is_using_private_name_1_4043", "Return type of public getter '{0}' from exported class has or is using private name '{1}'."), - Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4044, DiagnosticCategory.Error, "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044", "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'."), - Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0: diag(4045, DiagnosticCategory.Error, "Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045", "Return type of constructor signature from exported interface has or is using private name '{0}'."), - Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4046, DiagnosticCategory.Error, "Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046", "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'."), - Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0: diag(4047, DiagnosticCategory.Error, "Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047", "Return type of call signature from exported interface has or is using private name '{0}'."), - Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4048, DiagnosticCategory.Error, "Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048", "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'."), - Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0: diag(4049, DiagnosticCategory.Error, "Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049", "Return type of index signature from exported interface has or is using private name '{0}'."), - Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: diag(4050, DiagnosticCategory.Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050", "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named."), - Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: diag(4051, DiagnosticCategory.Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051", "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'."), - Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0: diag(4052, DiagnosticCategory.Error, "Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052", "Return type of public static method from exported class has or is using private name '{0}'."), - Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: diag(4053, DiagnosticCategory.Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053", "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named."), - Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: diag(4054, DiagnosticCategory.Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054", "Return type of public method from exported class has or is using name '{0}' from private module '{1}'."), - Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0: diag(4055, DiagnosticCategory.Error, "Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055", "Return type of public method from exported class has or is using private name '{0}'."), - Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: diag(4056, DiagnosticCategory.Error, "Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056", "Return type of method from exported interface has or is using name '{0}' from private module '{1}'."), - Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0: diag(4057, DiagnosticCategory.Error, "Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057", "Return type of method from exported interface has or is using private name '{0}'."), - Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: diag(4058, DiagnosticCategory.Error, "Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058", "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named."), - Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: diag(4059, DiagnosticCategory.Error, "Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059", "Return type of exported function has or is using name '{0}' from private module '{1}'."), - Return_type_of_exported_function_has_or_is_using_private_name_0: diag(4060, DiagnosticCategory.Error, "Return_type_of_exported_function_has_or_is_using_private_name_0_4060", "Return type of exported function has or is using private name '{0}'."), - Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4061, DiagnosticCategory.Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061", "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named."), - Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4062, DiagnosticCategory.Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062", "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'."), - Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1: diag(4063, DiagnosticCategory.Error, "Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063", "Parameter '{0}' of constructor from exported class has or is using private name '{1}'."), - Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4064, DiagnosticCategory.Error, "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064", "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'."), - Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4065, DiagnosticCategory.Error, "Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065", "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'."), - Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4066, DiagnosticCategory.Error, "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066", "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'."), - Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4067, DiagnosticCategory.Error, "Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067", "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'."), - Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4068, DiagnosticCategory.Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068", "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named."), - Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4069, DiagnosticCategory.Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069", "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'."), - Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: diag(4070, DiagnosticCategory.Error, "Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070", "Parameter '{0}' of public static method from exported class has or is using private name '{1}'."), - Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4071, DiagnosticCategory.Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071", "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named."), - Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4072, DiagnosticCategory.Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072", "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'."), - Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: diag(4073, DiagnosticCategory.Error, "Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073", "Parameter '{0}' of public method from exported class has or is using private name '{1}'."), - Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4074, DiagnosticCategory.Error, "Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074", "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'."), - Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: diag(4075, DiagnosticCategory.Error, "Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075", "Parameter '{0}' of method from exported interface has or is using private name '{1}'."), - Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4076, DiagnosticCategory.Error, "Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076", "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named."), - Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: diag(4077, DiagnosticCategory.Error, "Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077", "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'."), - Parameter_0_of_exported_function_has_or_is_using_private_name_1: diag(4078, DiagnosticCategory.Error, "Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078", "Parameter '{0}' of exported function has or is using private name '{1}'."), - Exported_type_alias_0_has_or_is_using_private_name_1: diag(4081, DiagnosticCategory.Error, "Exported_type_alias_0_has_or_is_using_private_name_1_4081", "Exported type alias '{0}' has or is using private name '{1}'."), - Default_export_of_the_module_has_or_is_using_private_name_0: diag(4082, DiagnosticCategory.Error, "Default_export_of_the_module_has_or_is_using_private_name_0_4082", "Default export of the module has or is using private name '{0}'."), - Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1: diag(4083, DiagnosticCategory.Error, "Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1_4083", "Type parameter '{0}' of exported type alias has or is using private name '{1}'."), - Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2: diag(4084, DiagnosticCategory.Error, "Exported_type_alias_0_has_or_is_using_private_name_1_from_module_2_4084", "Exported type alias '{0}' has or is using private name '{1}' from module {2}."), - Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_library_to_resolve_the_conflict: diag(4090, DiagnosticCategory.Error, "Conflicting_definitions_for_0_found_at_1_and_2_Consider_installing_a_specific_version_of_this_librar_4090", "Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict."), - Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4091, DiagnosticCategory.Error, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4091", "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'."), - Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1: diag(4092, DiagnosticCategory.Error, "Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1_4092", "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'."), - Property_0_of_exported_class_expression_may_not_be_private_or_protected: diag(4094, DiagnosticCategory.Error, "Property_0_of_exported_class_expression_may_not_be_private_or_protected_4094", "Property '{0}' of exported class expression may not be private or protected."), - Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4095, DiagnosticCategory.Error, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_4095", "Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), - Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4096, DiagnosticCategory.Error, "Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4096", "Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'."), - Public_static_method_0_of_exported_class_has_or_is_using_private_name_1: diag(4097, DiagnosticCategory.Error, "Public_static_method_0_of_exported_class_has_or_is_using_private_name_1_4097", "Public static method '{0}' of exported class has or is using private name '{1}'."), - Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4098, DiagnosticCategory.Error, "Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4098", "Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named."), - Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: diag(4099, DiagnosticCategory.Error, "Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4099", "Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'."), - Public_method_0_of_exported_class_has_or_is_using_private_name_1: diag(4100, DiagnosticCategory.Error, "Public_method_0_of_exported_class_has_or_is_using_private_name_1_4100", "Public method '{0}' of exported class has or is using private name '{1}'."), - Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: diag(4101, DiagnosticCategory.Error, "Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4101", "Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'."), - Method_0_of_exported_interface_has_or_is_using_private_name_1: diag(4102, DiagnosticCategory.Error, "Method_0_of_exported_interface_has_or_is_using_private_name_1_4102", "Method '{0}' of exported interface has or is using private name '{1}'."), - Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1: diag(4103, DiagnosticCategory.Error, "Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1_4103", "Type parameter '{0}' of exported mapped object type is using private name '{1}'."), - The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1: diag(4104, DiagnosticCategory.Error, "The_type_0_is_readonly_and_cannot_be_assigned_to_the_mutable_type_1_4104", "The type '{0}' is 'readonly' and cannot be assigned to the mutable type '{1}'."), - Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter: diag(4105, DiagnosticCategory.Error, "Private_or_protected_member_0_cannot_be_accessed_on_a_type_parameter_4105", "Private or protected member '{0}' cannot be accessed on a type parameter."), - Parameter_0_of_accessor_has_or_is_using_private_name_1: diag(4106, DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_private_name_1_4106", "Parameter '{0}' of accessor has or is using private name '{1}'."), - Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2: diag(4107, DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2_4107", "Parameter '{0}' of accessor has or is using name '{1}' from private module '{2}'."), - Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: diag(4108, DiagnosticCategory.Error, "Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4108", "Parameter '{0}' of accessor has or is using name '{1}' from external module '{2}' but cannot be named."), - Type_arguments_for_0_circularly_reference_themselves: diag(4109, DiagnosticCategory.Error, "Type_arguments_for_0_circularly_reference_themselves_4109", "Type arguments for '{0}' circularly reference themselves."), - Tuple_type_arguments_circularly_reference_themselves: diag(4110, DiagnosticCategory.Error, "Tuple_type_arguments_circularly_reference_themselves_4110", "Tuple type arguments circularly reference themselves."), - Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0: diag(4111, DiagnosticCategory.Error, "Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111", "Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."), - This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class: diag(4112, DiagnosticCategory.Error, "This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112", "This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."), - This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0: diag(4113, DiagnosticCategory.Error, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."), - This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0: diag(4114, DiagnosticCategory.Error, "This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114", "This member must have an 'override' modifier because it overrides a member in the base class '{0}'."), - This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0: diag(4115, DiagnosticCategory.Error, "This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115", "This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."), - This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0: diag(4116, DiagnosticCategory.Error, "This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116", "This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."), - This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4117, DiagnosticCategory.Error, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"), - The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized: diag(4118, DiagnosticCategory.Error, "The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118", "The type of this node cannot be serialized because its property '{0}' cannot be serialized."), - This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: diag(4119, DiagnosticCategory.Error, "This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119", "This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."), - This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: diag(4120, DiagnosticCategory.Error, "This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120", "This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."), - This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class: diag(4121, DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121", "This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."), - This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."), - This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"), - Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, DiagnosticCategory.Error, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), - resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4125, DiagnosticCategory.Error, "resolution_mode_assertions_are_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_wi_4125", "'resolution-mode' assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."), - The_current_host_does_not_support_the_0_option: diag(5001, DiagnosticCategory.Error, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."), - Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, DiagnosticCategory.Error, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."), - File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, DiagnosticCategory.Error, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."), - Cannot_read_file_0_Colon_1: diag(5012, DiagnosticCategory.Error, "Cannot_read_file_0_Colon_1_5012", "Cannot read file '{0}': {1}."), - Failed_to_parse_file_0_Colon_1: diag(5014, DiagnosticCategory.Error, "Failed_to_parse_file_0_Colon_1_5014", "Failed to parse file '{0}': {1}."), - Unknown_compiler_option_0: diag(5023, DiagnosticCategory.Error, "Unknown_compiler_option_0_5023", "Unknown compiler option '{0}'."), - Compiler_option_0_requires_a_value_of_type_1: diag(5024, DiagnosticCategory.Error, "Compiler_option_0_requires_a_value_of_type_1_5024", "Compiler option '{0}' requires a value of type {1}."), - Unknown_compiler_option_0_Did_you_mean_1: diag(5025, DiagnosticCategory.Error, "Unknown_compiler_option_0_Did_you_mean_1_5025", "Unknown compiler option '{0}'. Did you mean '{1}'?"), - Could_not_write_file_0_Colon_1: diag(5033, DiagnosticCategory.Error, "Could_not_write_file_0_Colon_1_5033", "Could not write file '{0}': {1}."), - Option_project_cannot_be_mixed_with_source_files_on_a_command_line: diag(5042, DiagnosticCategory.Error, "Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042", "Option 'project' cannot be mixed with source files on a command line."), - Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher: diag(5047, DiagnosticCategory.Error, "Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047", "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher."), - Option_0_cannot_be_specified_when_option_target_is_ES3: diag(5048, DiagnosticCategory.Error, "Option_0_cannot_be_specified_when_option_target_is_ES3_5048", "Option '{0}' cannot be specified when option 'target' is 'ES3'."), - Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: diag(5051, DiagnosticCategory.Error, "Option_0_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided_5051", "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided."), - Option_0_cannot_be_specified_without_specifying_option_1: diag(5052, DiagnosticCategory.Error, "Option_0_cannot_be_specified_without_specifying_option_1_5052", "Option '{0}' cannot be specified without specifying option '{1}'."), - Option_0_cannot_be_specified_with_option_1: diag(5053, DiagnosticCategory.Error, "Option_0_cannot_be_specified_with_option_1_5053", "Option '{0}' cannot be specified with option '{1}'."), - A_tsconfig_json_file_is_already_defined_at_Colon_0: diag(5054, DiagnosticCategory.Error, "A_tsconfig_json_file_is_already_defined_at_Colon_0_5054", "A 'tsconfig.json' file is already defined at: '{0}'."), - Cannot_write_file_0_because_it_would_overwrite_input_file: diag(5055, DiagnosticCategory.Error, "Cannot_write_file_0_because_it_would_overwrite_input_file_5055", "Cannot write file '{0}' because it would overwrite input file."), - Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files: diag(5056, DiagnosticCategory.Error, "Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056", "Cannot write file '{0}' because it would be overwritten by multiple input files."), - Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0: diag(5057, DiagnosticCategory.Error, "Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057", "Cannot find a tsconfig.json file at the specified directory: '{0}'."), - The_specified_path_does_not_exist_Colon_0: diag(5058, DiagnosticCategory.Error, "The_specified_path_does_not_exist_Colon_0_5058", "The specified path does not exist: '{0}'."), - Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier: diag(5059, DiagnosticCategory.Error, "Invalid_value_for_reactNamespace_0_is_not_a_valid_identifier_5059", "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier."), - Pattern_0_can_have_at_most_one_Asterisk_character: diag(5061, DiagnosticCategory.Error, "Pattern_0_can_have_at_most_one_Asterisk_character_5061", "Pattern '{0}' can have at most one '*' character."), - Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character: diag(5062, DiagnosticCategory.Error, "Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character_5062", "Substitution '{0}' in pattern '{1}' can have at most one '*' character."), - Substitutions_for_pattern_0_should_be_an_array: diag(5063, DiagnosticCategory.Error, "Substitutions_for_pattern_0_should_be_an_array_5063", "Substitutions for pattern '{0}' should be an array."), - Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2: diag(5064, DiagnosticCategory.Error, "Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2_5064", "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'."), - File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5065, DiagnosticCategory.Error, "File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildca_5065", "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'."), - Substitutions_for_pattern_0_shouldn_t_be_an_empty_array: diag(5066, DiagnosticCategory.Error, "Substitutions_for_pattern_0_shouldn_t_be_an_empty_array_5066", "Substitutions for pattern '{0}' shouldn't be an empty array."), - Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name: diag(5067, DiagnosticCategory.Error, "Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name_5067", "Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name."), - Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript_files_Learn_more_at_https_Colon_Slash_Slashaka_ms_Slashtsconfig: diag(5068, DiagnosticCategory.Error, "Adding_a_tsconfig_json_file_will_help_organize_projects_that_contain_both_TypeScript_and_JavaScript__5068", "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig."), - Option_0_cannot_be_specified_without_specifying_option_1_or_option_2: diag(5069, DiagnosticCategory.Error, "Option_0_cannot_be_specified_without_specifying_option_1_or_option_2_5069", "Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'."), - Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy: diag(5070, DiagnosticCategory.Error, "Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy_5070", "Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy."), - Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext: diag(5071, DiagnosticCategory.Error, "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071", "Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'."), - Unknown_build_option_0: diag(5072, DiagnosticCategory.Error, "Unknown_build_option_0_5072", "Unknown build option '{0}'."), - Build_option_0_requires_a_value_of_type_1: diag(5073, DiagnosticCategory.Error, "Build_option_0_requires_a_value_of_type_1_5073", "Build option '{0}' requires a value of type {1}."), - Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified: diag(5074, DiagnosticCategory.Error, "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074", "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified."), - _0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2: diag(5075, DiagnosticCategory.Error, "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075", "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."), - _0_and_1_operations_cannot_be_mixed_without_parentheses: diag(5076, DiagnosticCategory.Error, "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076", "'{0}' and '{1}' operations cannot be mixed without parentheses."), - Unknown_build_option_0_Did_you_mean_1: diag(5077, DiagnosticCategory.Error, "Unknown_build_option_0_Did_you_mean_1_5077", "Unknown build option '{0}'. Did you mean '{1}'?"), - Unknown_watch_option_0: diag(5078, DiagnosticCategory.Error, "Unknown_watch_option_0_5078", "Unknown watch option '{0}'."), - Unknown_watch_option_0_Did_you_mean_1: diag(5079, DiagnosticCategory.Error, "Unknown_watch_option_0_Did_you_mean_1_5079", "Unknown watch option '{0}'. Did you mean '{1}'?"), - Watch_option_0_requires_a_value_of_type_1: diag(5080, DiagnosticCategory.Error, "Watch_option_0_requires_a_value_of_type_1_5080", "Watch option '{0}' requires a value of type {1}."), - Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0: diag(5081, DiagnosticCategory.Error, "Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0_5081", "Cannot find a tsconfig.json file at the current directory: {0}."), - _0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1: diag(5082, DiagnosticCategory.Error, "_0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1_5082", "'{0}' could be instantiated with an arbitrary type which could be unrelated to '{1}'."), - Cannot_read_file_0: diag(5083, DiagnosticCategory.Error, "Cannot_read_file_0_5083", "Cannot read file '{0}'."), - Tuple_members_must_all_have_names_or_all_not_have_names: diag(5084, DiagnosticCategory.Error, "Tuple_members_must_all_have_names_or_all_not_have_names_5084", "Tuple members must all have names or all not have names."), - A_tuple_member_cannot_be_both_optional_and_rest: diag(5085, DiagnosticCategory.Error, "A_tuple_member_cannot_be_both_optional_and_rest_5085", "A tuple member cannot be both optional and rest."), - A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type: diag(5086, DiagnosticCategory.Error, "A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086", "A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."), - A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type: diag(5087, DiagnosticCategory.Error, "A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087", "A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."), - The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary: diag(5088, DiagnosticCategory.Error, "The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088", "The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary."), - Option_0_cannot_be_specified_when_option_jsx_is_1: diag(5089, DiagnosticCategory.Error, "Option_0_cannot_be_specified_when_option_jsx_is_1_5089", "Option '{0}' cannot be specified when option 'jsx' is '{1}'."), - Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash: diag(5090, DiagnosticCategory.Error, "Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090", "Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"), - Option_preserveConstEnums_cannot_be_disabled_when_isolatedModules_is_enabled: diag(5091, DiagnosticCategory.Error, "Option_preserveConstEnums_cannot_be_disabled_when_isolatedModules_is_enabled_5091", "Option 'preserveConstEnums' cannot be disabled when 'isolatedModules' is enabled."), - The_root_value_of_a_0_file_must_be_an_object: diag(5092, DiagnosticCategory.Error, "The_root_value_of_a_0_file_must_be_an_object_5092", "The root value of a '{0}' file must be an object."), - Compiler_option_0_may_only_be_used_with_build: diag(5093, DiagnosticCategory.Error, "Compiler_option_0_may_only_be_used_with_build_5093", "Compiler option '--{0}' may only be used with '--build'."), - Compiler_option_0_may_not_be_used_with_build: diag(5094, DiagnosticCategory.Error, "Compiler_option_0_may_not_be_used_with_build_5094", "Compiler option '--{0}' may not be used with '--build'."), - Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later: diag(5095, DiagnosticCategory.Error, "Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later_5095", "Option 'preserveValueImports' can only be used when 'module' is set to 'es2015' or later."), - Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6000, DiagnosticCategory.Message, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."), - Concatenate_and_emit_output_to_single_file: diag(6001, DiagnosticCategory.Message, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."), - Generates_corresponding_d_ts_file: diag(6002, DiagnosticCategory.Message, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."), - Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: diag(6004, DiagnosticCategory.Message, "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004", "Specify the location where debugger should locate TypeScript files instead of source locations."), - Watch_input_files: diag(6005, DiagnosticCategory.Message, "Watch_input_files_6005", "Watch input files."), - Redirect_output_structure_to_the_directory: diag(6006, DiagnosticCategory.Message, "Redirect_output_structure_to_the_directory_6006", "Redirect output structure to the directory."), - Do_not_erase_const_enum_declarations_in_generated_code: diag(6007, DiagnosticCategory.Message, "Do_not_erase_const_enum_declarations_in_generated_code_6007", "Do not erase const enum declarations in generated code."), - Do_not_emit_outputs_if_any_errors_were_reported: diag(6008, DiagnosticCategory.Message, "Do_not_emit_outputs_if_any_errors_were_reported_6008", "Do not emit outputs if any errors were reported."), - Do_not_emit_comments_to_output: diag(6009, DiagnosticCategory.Message, "Do_not_emit_comments_to_output_6009", "Do not emit comments to output."), - Do_not_emit_outputs: diag(6010, DiagnosticCategory.Message, "Do_not_emit_outputs_6010", "Do not emit outputs."), - Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking: diag(6011, DiagnosticCategory.Message, "Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011", "Allow default imports from modules with no default export. This does not affect code emit, just typechecking."), - Skip_type_checking_of_declaration_files: diag(6012, DiagnosticCategory.Message, "Skip_type_checking_of_declaration_files_6012", "Skip type checking of declaration files."), - Do_not_resolve_the_real_path_of_symlinks: diag(6013, DiagnosticCategory.Message, "Do_not_resolve_the_real_path_of_symlinks_6013", "Do not resolve the real path of symlinks."), - Only_emit_d_ts_declaration_files: diag(6014, DiagnosticCategory.Message, "Only_emit_d_ts_declaration_files_6014", "Only emit '.d.ts' declaration files."), - Specify_ECMAScript_target_version: diag(6015, DiagnosticCategory.Message, "Specify_ECMAScript_target_version_6015", "Specify ECMAScript target version."), - Specify_module_code_generation: diag(6016, DiagnosticCategory.Message, "Specify_module_code_generation_6016", "Specify module code generation."), - Print_this_message: diag(6017, DiagnosticCategory.Message, "Print_this_message_6017", "Print this message."), - Print_the_compiler_s_version: diag(6019, DiagnosticCategory.Message, "Print_the_compiler_s_version_6019", "Print the compiler's version."), - Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json: diag(6020, DiagnosticCategory.Message, "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020", "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."), - Syntax_Colon_0: diag(6023, DiagnosticCategory.Message, "Syntax_Colon_0_6023", "Syntax: {0}"), - options: diag(6024, DiagnosticCategory.Message, "options_6024", "options"), - file: diag(6025, DiagnosticCategory.Message, "file_6025", "file"), - Examples_Colon_0: diag(6026, DiagnosticCategory.Message, "Examples_Colon_0_6026", "Examples: {0}"), - Options_Colon: diag(6027, DiagnosticCategory.Message, "Options_Colon_6027", "Options:"), - Version_0: diag(6029, DiagnosticCategory.Message, "Version_0_6029", "Version {0}"), - Insert_command_line_options_and_files_from_a_file: diag(6030, DiagnosticCategory.Message, "Insert_command_line_options_and_files_from_a_file_6030", "Insert command line options and files from a file."), - Starting_compilation_in_watch_mode: diag(6031, DiagnosticCategory.Message, "Starting_compilation_in_watch_mode_6031", "Starting compilation in watch mode..."), - File_change_detected_Starting_incremental_compilation: diag(6032, DiagnosticCategory.Message, "File_change_detected_Starting_incremental_compilation_6032", "File change detected. Starting incremental compilation..."), - KIND: diag(6034, DiagnosticCategory.Message, "KIND_6034", "KIND"), - FILE: diag(6035, DiagnosticCategory.Message, "FILE_6035", "FILE"), - VERSION: diag(6036, DiagnosticCategory.Message, "VERSION_6036", "VERSION"), - LOCATION: diag(6037, DiagnosticCategory.Message, "LOCATION_6037", "LOCATION"), - DIRECTORY: diag(6038, DiagnosticCategory.Message, "DIRECTORY_6038", "DIRECTORY"), - STRATEGY: diag(6039, DiagnosticCategory.Message, "STRATEGY_6039", "STRATEGY"), - FILE_OR_DIRECTORY: diag(6040, DiagnosticCategory.Message, "FILE_OR_DIRECTORY_6040", "FILE OR DIRECTORY"), - Errors_Files: diag(6041, DiagnosticCategory.Message, "Errors_Files_6041", "Errors Files"), - Generates_corresponding_map_file: diag(6043, DiagnosticCategory.Message, "Generates_corresponding_map_file_6043", "Generates corresponding '.map' file."), - Compiler_option_0_expects_an_argument: diag(6044, DiagnosticCategory.Error, "Compiler_option_0_expects_an_argument_6044", "Compiler option '{0}' expects an argument."), - Unterminated_quoted_string_in_response_file_0: diag(6045, DiagnosticCategory.Error, "Unterminated_quoted_string_in_response_file_0_6045", "Unterminated quoted string in response file '{0}'."), - Argument_for_0_option_must_be_Colon_1: diag(6046, DiagnosticCategory.Error, "Argument_for_0_option_must_be_Colon_1_6046", "Argument for '{0}' option must be: {1}."), - Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: diag(6048, DiagnosticCategory.Error, "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048", "Locale must be of the form or -. For example '{0}' or '{1}'."), - Unable_to_open_file_0: diag(6050, DiagnosticCategory.Error, "Unable_to_open_file_0_6050", "Unable to open file '{0}'."), - Corrupted_locale_file_0: diag(6051, DiagnosticCategory.Error, "Corrupted_locale_file_0_6051", "Corrupted locale file {0}."), - Raise_error_on_expressions_and_declarations_with_an_implied_any_type: diag(6052, DiagnosticCategory.Message, "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052", "Raise error on expressions and declarations with an implied 'any' type."), - File_0_not_found: diag(6053, DiagnosticCategory.Error, "File_0_not_found_6053", "File '{0}' not found."), - File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1: diag(6054, DiagnosticCategory.Error, "File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1_6054", "File '{0}' has an unsupported extension. The only supported extensions are {1}."), - Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: diag(6055, DiagnosticCategory.Message, "Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055", "Suppress noImplicitAny errors for indexing objects lacking index signatures."), - Do_not_emit_declarations_for_code_that_has_an_internal_annotation: diag(6056, DiagnosticCategory.Message, "Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056", "Do not emit declarations for code that has an '@internal' annotation."), - Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: diag(6058, DiagnosticCategory.Message, "Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir_6058", "Specify the root directory of input files. Use to control the output directory structure with --outDir."), - File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: diag(6059, DiagnosticCategory.Error, "File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059", "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files."), - Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: diag(6060, DiagnosticCategory.Message, "Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060", "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)."), - NEWLINE: diag(6061, DiagnosticCategory.Message, "NEWLINE_6061", "NEWLINE"), - Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line: diag(6064, DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."), - Enables_experimental_support_for_ES7_decorators: diag(6065, DiagnosticCategory.Message, "Enables_experimental_support_for_ES7_decorators_6065", "Enables experimental support for ES7 decorators."), - Enables_experimental_support_for_emitting_type_metadata_for_decorators: diag(6066, DiagnosticCategory.Message, "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", "Enables experimental support for emitting type metadata for decorators."), - Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6: diag(6069, DiagnosticCategory.Message, "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069", "Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6)."), - Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: diag(6070, DiagnosticCategory.Message, "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", "Initializes a TypeScript project and creates a tsconfig.json file."), - Successfully_created_a_tsconfig_json_file: diag(6071, DiagnosticCategory.Message, "Successfully_created_a_tsconfig_json_file_6071", "Successfully created a tsconfig.json file."), - Suppress_excess_property_checks_for_object_literals: diag(6072, DiagnosticCategory.Message, "Suppress_excess_property_checks_for_object_literals_6072", "Suppress excess property checks for object literals."), - Stylize_errors_and_messages_using_color_and_context_experimental: diag(6073, DiagnosticCategory.Message, "Stylize_errors_and_messages_using_color_and_context_experimental_6073", "Stylize errors and messages using color and context (experimental)."), - Do_not_report_errors_on_unused_labels: diag(6074, DiagnosticCategory.Message, "Do_not_report_errors_on_unused_labels_6074", "Do not report errors on unused labels."), - Report_error_when_not_all_code_paths_in_function_return_a_value: diag(6075, DiagnosticCategory.Message, "Report_error_when_not_all_code_paths_in_function_return_a_value_6075", "Report error when not all code paths in function return a value."), - Report_errors_for_fallthrough_cases_in_switch_statement: diag(6076, DiagnosticCategory.Message, "Report_errors_for_fallthrough_cases_in_switch_statement_6076", "Report errors for fallthrough cases in switch statement."), - Do_not_report_errors_on_unreachable_code: diag(6077, DiagnosticCategory.Message, "Do_not_report_errors_on_unreachable_code_6077", "Do not report errors on unreachable code."), - Disallow_inconsistently_cased_references_to_the_same_file: diag(6078, DiagnosticCategory.Message, "Disallow_inconsistently_cased_references_to_the_same_file_6078", "Disallow inconsistently-cased references to the same file."), - Specify_library_files_to_be_included_in_the_compilation: diag(6079, DiagnosticCategory.Message, "Specify_library_files_to_be_included_in_the_compilation_6079", "Specify library files to be included in the compilation."), - Specify_JSX_code_generation: diag(6080, DiagnosticCategory.Message, "Specify_JSX_code_generation_6080", "Specify JSX code generation."), - File_0_has_an_unsupported_extension_so_skipping_it: diag(6081, DiagnosticCategory.Message, "File_0_has_an_unsupported_extension_so_skipping_it_6081", "File '{0}' has an unsupported extension, so skipping it."), - Only_amd_and_system_modules_are_supported_alongside_0: diag(6082, DiagnosticCategory.Error, "Only_amd_and_system_modules_are_supported_alongside_0_6082", "Only 'amd' and 'system' modules are supported alongside --{0}."), - Base_directory_to_resolve_non_absolute_module_names: diag(6083, DiagnosticCategory.Message, "Base_directory_to_resolve_non_absolute_module_names_6083", "Base directory to resolve non-absolute module names."), - Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit: diag(6084, DiagnosticCategory.Message, "Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react__6084", "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit"), - Enable_tracing_of_the_name_resolution_process: diag(6085, DiagnosticCategory.Message, "Enable_tracing_of_the_name_resolution_process_6085", "Enable tracing of the name resolution process."), - Resolving_module_0_from_1: diag(6086, DiagnosticCategory.Message, "Resolving_module_0_from_1_6086", "======== Resolving module '{0}' from '{1}'. ========"), - Explicitly_specified_module_resolution_kind_Colon_0: diag(6087, DiagnosticCategory.Message, "Explicitly_specified_module_resolution_kind_Colon_0_6087", "Explicitly specified module resolution kind: '{0}'."), - Module_resolution_kind_is_not_specified_using_0: diag(6088, DiagnosticCategory.Message, "Module_resolution_kind_is_not_specified_using_0_6088", "Module resolution kind is not specified, using '{0}'."), - Module_name_0_was_successfully_resolved_to_1: diag(6089, DiagnosticCategory.Message, "Module_name_0_was_successfully_resolved_to_1_6089", "======== Module name '{0}' was successfully resolved to '{1}'. ========"), - Module_name_0_was_not_resolved: diag(6090, DiagnosticCategory.Message, "Module_name_0_was_not_resolved_6090", "======== Module name '{0}' was not resolved. ========"), - paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0: diag(6091, DiagnosticCategory.Message, "paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0_6091", "'paths' option is specified, looking for a pattern to match module name '{0}'."), - Module_name_0_matched_pattern_1: diag(6092, DiagnosticCategory.Message, "Module_name_0_matched_pattern_1_6092", "Module name '{0}', matched pattern '{1}'."), - Trying_substitution_0_candidate_module_location_Colon_1: diag(6093, DiagnosticCategory.Message, "Trying_substitution_0_candidate_module_location_Colon_1_6093", "Trying substitution '{0}', candidate module location: '{1}'."), - Resolving_module_name_0_relative_to_base_url_1_2: diag(6094, DiagnosticCategory.Message, "Resolving_module_name_0_relative_to_base_url_1_2_6094", "Resolving module name '{0}' relative to base url '{1}' - '{2}'."), - Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1: diag(6095, DiagnosticCategory.Message, "Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_types_Colon_1_6095", "Loading module as file / folder, candidate module location '{0}', target file types: {1}."), - File_0_does_not_exist: diag(6096, DiagnosticCategory.Message, "File_0_does_not_exist_6096", "File '{0}' does not exist."), - File_0_exist_use_it_as_a_name_resolution_result: diag(6097, DiagnosticCategory.Message, "File_0_exist_use_it_as_a_name_resolution_result_6097", "File '{0}' exist - use it as a name resolution result."), - Loading_module_0_from_node_modules_folder_target_file_types_Colon_1: diag(6098, DiagnosticCategory.Message, "Loading_module_0_from_node_modules_folder_target_file_types_Colon_1_6098", "Loading module '{0}' from 'node_modules' folder, target file types: {1}."), - Found_package_json_at_0: diag(6099, DiagnosticCategory.Message, "Found_package_json_at_0_6099", "Found 'package.json' at '{0}'."), - package_json_does_not_have_a_0_field: diag(6100, DiagnosticCategory.Message, "package_json_does_not_have_a_0_field_6100", "'package.json' does not have a '{0}' field."), - package_json_has_0_field_1_that_references_2: diag(6101, DiagnosticCategory.Message, "package_json_has_0_field_1_that_references_2_6101", "'package.json' has '{0}' field '{1}' that references '{2}'."), - Allow_javascript_files_to_be_compiled: diag(6102, DiagnosticCategory.Message, "Allow_javascript_files_to_be_compiled_6102", "Allow javascript files to be compiled."), - Checking_if_0_is_the_longest_matching_prefix_for_1_2: diag(6104, DiagnosticCategory.Message, "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104", "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."), - Expected_type_of_0_field_in_package_json_to_be_1_got_2: diag(6105, DiagnosticCategory.Message, "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105", "Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."), - baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: diag(6106, DiagnosticCategory.Message, "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."), - rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0: diag(6107, DiagnosticCategory.Message, "rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0_6107", "'rootDirs' option is set, using it to resolve relative module name '{0}'."), - Longest_matching_prefix_for_0_is_1: diag(6108, DiagnosticCategory.Message, "Longest_matching_prefix_for_0_is_1_6108", "Longest matching prefix for '{0}' is '{1}'."), - Loading_0_from_the_root_dir_1_candidate_location_2: diag(6109, DiagnosticCategory.Message, "Loading_0_from_the_root_dir_1_candidate_location_2_6109", "Loading '{0}' from the root dir '{1}', candidate location '{2}'."), - Trying_other_entries_in_rootDirs: diag(6110, DiagnosticCategory.Message, "Trying_other_entries_in_rootDirs_6110", "Trying other entries in 'rootDirs'."), - Module_resolution_using_rootDirs_has_failed: diag(6111, DiagnosticCategory.Message, "Module_resolution_using_rootDirs_has_failed_6111", "Module resolution using 'rootDirs' has failed."), - Do_not_emit_use_strict_directives_in_module_output: diag(6112, DiagnosticCategory.Message, "Do_not_emit_use_strict_directives_in_module_output_6112", "Do not emit 'use strict' directives in module output."), - Enable_strict_null_checks: diag(6113, DiagnosticCategory.Message, "Enable_strict_null_checks_6113", "Enable strict null checks."), - Unknown_option_excludes_Did_you_mean_exclude: diag(6114, DiagnosticCategory.Error, "Unknown_option_excludes_Did_you_mean_exclude_6114", "Unknown option 'excludes'. Did you mean 'exclude'?"), - Raise_error_on_this_expressions_with_an_implied_any_type: diag(6115, DiagnosticCategory.Message, "Raise_error_on_this_expressions_with_an_implied_any_type_6115", "Raise error on 'this' expressions with an implied 'any' type."), - Resolving_type_reference_directive_0_containing_file_1_root_directory_2: diag(6116, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116", "======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"), - Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2: diag(6119, DiagnosticCategory.Message, "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119", "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"), - Type_reference_directive_0_was_not_resolved: diag(6120, DiagnosticCategory.Message, "Type_reference_directive_0_was_not_resolved_6120", "======== Type reference directive '{0}' was not resolved. ========"), - Resolving_with_primary_search_path_0: diag(6121, DiagnosticCategory.Message, "Resolving_with_primary_search_path_0_6121", "Resolving with primary search path '{0}'."), - Root_directory_cannot_be_determined_skipping_primary_search_paths: diag(6122, DiagnosticCategory.Message, "Root_directory_cannot_be_determined_skipping_primary_search_paths_6122", "Root directory cannot be determined, skipping primary search paths."), - Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set: diag(6123, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_1_root_directory_not_set_6123", "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========"), - Type_declaration_files_to_be_included_in_compilation: diag(6124, DiagnosticCategory.Message, "Type_declaration_files_to_be_included_in_compilation_6124", "Type declaration files to be included in compilation."), - Looking_up_in_node_modules_folder_initial_location_0: diag(6125, DiagnosticCategory.Message, "Looking_up_in_node_modules_folder_initial_location_0_6125", "Looking up in 'node_modules' folder, initial location '{0}'."), - Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_modules_folder: diag(6126, DiagnosticCategory.Message, "Containing_file_is_not_specified_and_root_directory_cannot_be_determined_skipping_lookup_in_node_mod_6126", "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder."), - Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1: diag(6127, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_1_6127", "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========"), - Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set: diag(6128, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_not_set_root_directory_not_set_6128", "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========"), - Resolving_real_path_for_0_result_1: diag(6130, DiagnosticCategory.Message, "Resolving_real_path_for_0_result_1_6130", "Resolving real path for '{0}', result '{1}'."), - Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system: diag(6131, DiagnosticCategory.Error, "Cannot_compile_modules_using_option_0_unless_the_module_flag_is_amd_or_system_6131", "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'."), - File_name_0_has_a_1_extension_stripping_it: diag(6132, DiagnosticCategory.Message, "File_name_0_has_a_1_extension_stripping_it_6132", "File name '{0}' has a '{1}' extension - stripping it."), - _0_is_declared_but_its_value_is_never_read: diag(6133, DiagnosticCategory.Error, "_0_is_declared_but_its_value_is_never_read_6133", "'{0}' is declared but its value is never read.", /*reportsUnnecessary*/ true), - Report_errors_on_unused_locals: diag(6134, DiagnosticCategory.Message, "Report_errors_on_unused_locals_6134", "Report errors on unused locals."), - Report_errors_on_unused_parameters: diag(6135, DiagnosticCategory.Message, "Report_errors_on_unused_parameters_6135", "Report errors on unused parameters."), - The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files: diag(6136, DiagnosticCategory.Message, "The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files_6136", "The maximum dependency depth to search under node_modules and load JavaScript files."), - Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1: diag(6137, DiagnosticCategory.Error, "Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1_6137", "Cannot import type declaration files. Consider importing '{0}' instead of '{1}'."), - Property_0_is_declared_but_its_value_is_never_read: diag(6138, DiagnosticCategory.Error, "Property_0_is_declared_but_its_value_is_never_read_6138", "Property '{0}' is declared but its value is never read.", /*reportsUnnecessary*/ true), - Import_emit_helpers_from_tslib: diag(6139, DiagnosticCategory.Message, "Import_emit_helpers_from_tslib_6139", "Import emit helpers from 'tslib'."), - Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2: diag(6140, DiagnosticCategory.Error, "Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using__6140", "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'."), - Parse_in_strict_mode_and_emit_use_strict_for_each_source_file: diag(6141, DiagnosticCategory.Message, "Parse_in_strict_mode_and_emit_use_strict_for_each_source_file_6141", "Parse in strict mode and emit \"use strict\" for each source file."), - Module_0_was_resolved_to_1_but_jsx_is_not_set: diag(6142, DiagnosticCategory.Error, "Module_0_was_resolved_to_1_but_jsx_is_not_set_6142", "Module '{0}' was resolved to '{1}', but '--jsx' is not set."), - Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1: diag(6144, DiagnosticCategory.Message, "Module_0_was_resolved_as_locally_declared_ambient_module_in_file_1_6144", "Module '{0}' was resolved as locally declared ambient module in file '{1}'."), - Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified: diag(6145, DiagnosticCategory.Message, "Module_0_was_resolved_as_ambient_module_declared_in_1_since_this_file_was_not_modified_6145", "Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified."), - Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h: diag(6146, DiagnosticCategory.Message, "Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h_6146", "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'."), - Resolution_for_module_0_was_found_in_cache_from_location_1: diag(6147, DiagnosticCategory.Message, "Resolution_for_module_0_was_found_in_cache_from_location_1_6147", "Resolution for module '{0}' was found in cache from location '{1}'."), - Directory_0_does_not_exist_skipping_all_lookups_in_it: diag(6148, DiagnosticCategory.Message, "Directory_0_does_not_exist_skipping_all_lookups_in_it_6148", "Directory '{0}' does not exist, skipping all lookups in it."), - Show_diagnostic_information: diag(6149, DiagnosticCategory.Message, "Show_diagnostic_information_6149", "Show diagnostic information."), - Show_verbose_diagnostic_information: diag(6150, DiagnosticCategory.Message, "Show_verbose_diagnostic_information_6150", "Show verbose diagnostic information."), - Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file: diag(6151, DiagnosticCategory.Message, "Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file_6151", "Emit a single file with source maps instead of having a separate file."), - Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set: diag(6152, DiagnosticCategory.Message, "Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap__6152", "Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set."), - Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule: diag(6153, DiagnosticCategory.Message, "Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule_6153", "Transpile each file as a separate module (similar to 'ts.transpileModule')."), - Print_names_of_generated_files_part_of_the_compilation: diag(6154, DiagnosticCategory.Message, "Print_names_of_generated_files_part_of_the_compilation_6154", "Print names of generated files part of the compilation."), - Print_names_of_files_part_of_the_compilation: diag(6155, DiagnosticCategory.Message, "Print_names_of_files_part_of_the_compilation_6155", "Print names of files part of the compilation."), - The_locale_used_when_displaying_messages_to_the_user_e_g_en_us: diag(6156, DiagnosticCategory.Message, "The_locale_used_when_displaying_messages_to_the_user_e_g_en_us_6156", "The locale used when displaying messages to the user (e.g. 'en-us')"), - Do_not_generate_custom_helper_functions_like_extends_in_compiled_output: diag(6157, DiagnosticCategory.Message, "Do_not_generate_custom_helper_functions_like_extends_in_compiled_output_6157", "Do not generate custom helper functions like '__extends' in compiled output."), - Do_not_include_the_default_library_file_lib_d_ts: diag(6158, DiagnosticCategory.Message, "Do_not_include_the_default_library_file_lib_d_ts_6158", "Do not include the default library file (lib.d.ts)."), - Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files: diag(6159, DiagnosticCategory.Message, "Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files_6159", "Do not add triple-slash references or imported modules to the list of compiled files."), - Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files: diag(6160, DiagnosticCategory.Message, "Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files_6160", "[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files."), - List_of_folders_to_include_type_definitions_from: diag(6161, DiagnosticCategory.Message, "List_of_folders_to_include_type_definitions_from_6161", "List of folders to include type definitions from."), - Disable_size_limitations_on_JavaScript_projects: diag(6162, DiagnosticCategory.Message, "Disable_size_limitations_on_JavaScript_projects_6162", "Disable size limitations on JavaScript projects."), - The_character_set_of_the_input_files: diag(6163, DiagnosticCategory.Message, "The_character_set_of_the_input_files_6163", "The character set of the input files."), - Do_not_truncate_error_messages: diag(6165, DiagnosticCategory.Message, "Do_not_truncate_error_messages_6165", "Do not truncate error messages."), - Output_directory_for_generated_declaration_files: diag(6166, DiagnosticCategory.Message, "Output_directory_for_generated_declaration_files_6166", "Output directory for generated declaration files."), - A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl: diag(6167, DiagnosticCategory.Message, "A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167", "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."), - List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime: diag(6168, DiagnosticCategory.Message, "List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime_6168", "List of root folders whose combined content represents the structure of the project at runtime."), - Show_all_compiler_options: diag(6169, DiagnosticCategory.Message, "Show_all_compiler_options_6169", "Show all compiler options."), - Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file: diag(6170, DiagnosticCategory.Message, "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170", "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"), - Command_line_Options: diag(6171, DiagnosticCategory.Message, "Command_line_Options_6171", "Command-line Options"), - Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3: diag(6179, DiagnosticCategory.Message, "Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179", "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'."), - Enable_all_strict_type_checking_options: diag(6180, DiagnosticCategory.Message, "Enable_all_strict_type_checking_options_6180", "Enable all strict type-checking options."), - Scoped_package_detected_looking_in_0: diag(6182, DiagnosticCategory.Message, "Scoped_package_detected_looking_in_0_6182", "Scoped package detected, looking in '{0}'"), - Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2: diag(6183, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."), - Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: diag(6184, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."), - Enable_strict_checking_of_function_types: diag(6186, DiagnosticCategory.Message, "Enable_strict_checking_of_function_types_6186", "Enable strict checking of function types."), - Enable_strict_checking_of_property_initialization_in_classes: diag(6187, DiagnosticCategory.Message, "Enable_strict_checking_of_property_initialization_in_classes_6187", "Enable strict checking of property initialization in classes."), - Numeric_separators_are_not_allowed_here: diag(6188, DiagnosticCategory.Error, "Numeric_separators_are_not_allowed_here_6188", "Numeric separators are not allowed here."), - Multiple_consecutive_numeric_separators_are_not_permitted: diag(6189, DiagnosticCategory.Error, "Multiple_consecutive_numeric_separators_are_not_permitted_6189", "Multiple consecutive numeric separators are not permitted."), - Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen: diag(6191, DiagnosticCategory.Message, "Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen_6191", "Whether to keep outdated console output in watch mode instead of clearing the screen."), - All_imports_in_import_declaration_are_unused: diag(6192, DiagnosticCategory.Error, "All_imports_in_import_declaration_are_unused_6192", "All imports in import declaration are unused.", /*reportsUnnecessary*/ true), - Found_1_error_Watching_for_file_changes: diag(6193, DiagnosticCategory.Message, "Found_1_error_Watching_for_file_changes_6193", "Found 1 error. Watching for file changes."), - Found_0_errors_Watching_for_file_changes: diag(6194, DiagnosticCategory.Message, "Found_0_errors_Watching_for_file_changes_6194", "Found {0} errors. Watching for file changes."), - Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols: diag(6195, DiagnosticCategory.Message, "Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols_6195", "Resolve 'keyof' to string valued property names only (no numbers or symbols)."), - _0_is_declared_but_never_used: diag(6196, DiagnosticCategory.Error, "_0_is_declared_but_never_used_6196", "'{0}' is declared but never used.", /*reportsUnnecessary*/ true), - Include_modules_imported_with_json_extension: diag(6197, DiagnosticCategory.Message, "Include_modules_imported_with_json_extension_6197", "Include modules imported with '.json' extension"), - All_destructured_elements_are_unused: diag(6198, DiagnosticCategory.Error, "All_destructured_elements_are_unused_6198", "All destructured elements are unused.", /*reportsUnnecessary*/ true), - All_variables_are_unused: diag(6199, DiagnosticCategory.Error, "All_variables_are_unused_6199", "All variables are unused.", /*reportsUnnecessary*/ true), - Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0: diag(6200, DiagnosticCategory.Error, "Definitions_of_the_following_identifiers_conflict_with_those_in_another_file_Colon_0_6200", "Definitions of the following identifiers conflict with those in another file: {0}"), - Conflicts_are_in_this_file: diag(6201, DiagnosticCategory.Message, "Conflicts_are_in_this_file_6201", "Conflicts are in this file."), - Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0: diag(6202, DiagnosticCategory.Error, "Project_references_may_not_form_a_circular_graph_Cycle_detected_Colon_0_6202", "Project references may not form a circular graph. Cycle detected: {0}"), - _0_was_also_declared_here: diag(6203, DiagnosticCategory.Message, "_0_was_also_declared_here_6203", "'{0}' was also declared here."), - and_here: diag(6204, DiagnosticCategory.Message, "and_here_6204", "and here."), - All_type_parameters_are_unused: diag(6205, DiagnosticCategory.Error, "All_type_parameters_are_unused_6205", "All type parameters are unused."), - package_json_has_a_typesVersions_field_with_version_specific_path_mappings: diag(6206, DiagnosticCategory.Message, "package_json_has_a_typesVersions_field_with_version_specific_path_mappings_6206", "'package.json' has a 'typesVersions' field with version-specific path mappings."), - package_json_does_not_have_a_typesVersions_entry_that_matches_version_0: diag(6207, DiagnosticCategory.Message, "package_json_does_not_have_a_typesVersions_entry_that_matches_version_0_6207", "'package.json' does not have a 'typesVersions' entry that matches version '{0}'."), - package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2: diag(6208, DiagnosticCategory.Message, "package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_ma_6208", "'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'."), - package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range: diag(6209, DiagnosticCategory.Message, "package_json_has_a_typesVersions_entry_0_that_is_not_a_valid_semver_range_6209", "'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range."), - An_argument_for_0_was_not_provided: diag(6210, DiagnosticCategory.Message, "An_argument_for_0_was_not_provided_6210", "An argument for '{0}' was not provided."), - An_argument_matching_this_binding_pattern_was_not_provided: diag(6211, DiagnosticCategory.Message, "An_argument_matching_this_binding_pattern_was_not_provided_6211", "An argument matching this binding pattern was not provided."), - Did_you_mean_to_call_this_expression: diag(6212, DiagnosticCategory.Message, "Did_you_mean_to_call_this_expression_6212", "Did you mean to call this expression?"), - Did_you_mean_to_use_new_with_this_expression: diag(6213, DiagnosticCategory.Message, "Did_you_mean_to_use_new_with_this_expression_6213", "Did you mean to use 'new' with this expression?"), - Enable_strict_bind_call_and_apply_methods_on_functions: diag(6214, DiagnosticCategory.Message, "Enable_strict_bind_call_and_apply_methods_on_functions_6214", "Enable strict 'bind', 'call', and 'apply' methods on functions."), - Using_compiler_options_of_project_reference_redirect_0: diag(6215, DiagnosticCategory.Message, "Using_compiler_options_of_project_reference_redirect_0_6215", "Using compiler options of project reference redirect '{0}'."), - Found_1_error: diag(6216, DiagnosticCategory.Message, "Found_1_error_6216", "Found 1 error."), - Found_0_errors: diag(6217, DiagnosticCategory.Message, "Found_0_errors_6217", "Found {0} errors."), - Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2: diag(6218, DiagnosticCategory.Message, "Module_name_0_was_successfully_resolved_to_1_with_Package_ID_2_6218", "======== Module name '{0}' was successfully resolved to '{1}' with Package ID '{2}'. ========"), - Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3: diag(6219, DiagnosticCategory.Message, "Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3_6219", "======== Type reference directive '{0}' was successfully resolved to '{1}' with Package ID '{2}', primary: {3}. ========"), - package_json_had_a_falsy_0_field: diag(6220, DiagnosticCategory.Message, "package_json_had_a_falsy_0_field_6220", "'package.json' had a falsy '{0}' field."), - Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects: diag(6221, DiagnosticCategory.Message, "Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects_6221", "Disable use of source files instead of declaration files from referenced projects."), - Emit_class_fields_with_Define_instead_of_Set: diag(6222, DiagnosticCategory.Message, "Emit_class_fields_with_Define_instead_of_Set_6222", "Emit class fields with Define instead of Set."), - Generates_a_CPU_profile: diag(6223, DiagnosticCategory.Message, "Generates_a_CPU_profile_6223", "Generates a CPU profile."), - Disable_solution_searching_for_this_project: diag(6224, DiagnosticCategory.Message, "Disable_solution_searching_for_this_project_6224", "Disable solution searching for this project."), - Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory: diag(6225, DiagnosticCategory.Message, "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225", "Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."), - Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling: diag(6226, DiagnosticCategory.Message, "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226", "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling'."), - Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize: diag(6227, DiagnosticCategory.Message, "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227", "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority', 'FixedChunkSize'."), - Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3: diag(6229, DiagnosticCategory.Error, "Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229", "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."), - Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line: diag(6230, DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."), - Could_not_resolve_the_path_0_with_the_extensions_Colon_1: diag(6231, DiagnosticCategory.Error, "Could_not_resolve_the_path_0_with_the_extensions_Colon_1_6231", "Could not resolve the path '{0}' with the extensions: {1}."), - Declaration_augments_declaration_in_another_file_This_cannot_be_serialized: diag(6232, DiagnosticCategory.Error, "Declaration_augments_declaration_in_another_file_This_cannot_be_serialized_6232", "Declaration augments declaration in another file. This cannot be serialized."), - This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file: diag(6233, DiagnosticCategory.Error, "This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233", "This is the declaration being augmented. Consider moving the augmenting declaration into the same file."), - This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without: diag(6234, DiagnosticCategory.Error, "This_expression_is_not_callable_because_it_is_a_get_accessor_Did_you_mean_to_use_it_without_6234", "This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?"), - Disable_loading_referenced_projects: diag(6235, DiagnosticCategory.Message, "Disable_loading_referenced_projects_6235", "Disable loading referenced projects."), - Arguments_for_the_rest_parameter_0_were_not_provided: diag(6236, DiagnosticCategory.Error, "Arguments_for_the_rest_parameter_0_were_not_provided_6236", "Arguments for the rest parameter '{0}' were not provided."), - Generates_an_event_trace_and_a_list_of_types: diag(6237, DiagnosticCategory.Message, "Generates_an_event_trace_and_a_list_of_types_6237", "Generates an event trace and a list of types."), - Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react: diag(6238, DiagnosticCategory.Error, "Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238", "Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react"), - File_0_exists_according_to_earlier_cached_lookups: diag(6239, DiagnosticCategory.Message, "File_0_exists_according_to_earlier_cached_lookups_6239", "File '{0}' exists according to earlier cached lookups."), - File_0_does_not_exist_according_to_earlier_cached_lookups: diag(6240, DiagnosticCategory.Message, "File_0_does_not_exist_according_to_earlier_cached_lookups_6240", "File '{0}' does not exist according to earlier cached lookups."), - Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1: diag(6241, DiagnosticCategory.Message, "Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241", "Resolution for type reference directive '{0}' was found in cache from location '{1}'."), - Resolving_type_reference_directive_0_containing_file_1: diag(6242, DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_1_6242", "======== Resolving type reference directive '{0}', containing file '{1}'. ========"), - Interpret_optional_property_types_as_written_rather_than_adding_undefined: diag(6243, DiagnosticCategory.Message, "Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243", "Interpret optional property types as written, rather than adding 'undefined'."), - Modules: diag(6244, DiagnosticCategory.Message, "Modules_6244", "Modules"), - File_Management: diag(6245, DiagnosticCategory.Message, "File_Management_6245", "File Management"), - Emit: diag(6246, DiagnosticCategory.Message, "Emit_6246", "Emit"), - JavaScript_Support: diag(6247, DiagnosticCategory.Message, "JavaScript_Support_6247", "JavaScript Support"), - Type_Checking: diag(6248, DiagnosticCategory.Message, "Type_Checking_6248", "Type Checking"), - Editor_Support: diag(6249, DiagnosticCategory.Message, "Editor_Support_6249", "Editor Support"), - Watch_and_Build_Modes: diag(6250, DiagnosticCategory.Message, "Watch_and_Build_Modes_6250", "Watch and Build Modes"), - Compiler_Diagnostics: diag(6251, DiagnosticCategory.Message, "Compiler_Diagnostics_6251", "Compiler Diagnostics"), - Interop_Constraints: diag(6252, DiagnosticCategory.Message, "Interop_Constraints_6252", "Interop Constraints"), - Backwards_Compatibility: diag(6253, DiagnosticCategory.Message, "Backwards_Compatibility_6253", "Backwards Compatibility"), - Language_and_Environment: diag(6254, DiagnosticCategory.Message, "Language_and_Environment_6254", "Language and Environment"), - Projects: diag(6255, DiagnosticCategory.Message, "Projects_6255", "Projects"), - Output_Formatting: diag(6256, DiagnosticCategory.Message, "Output_Formatting_6256", "Output Formatting"), - Completeness: diag(6257, DiagnosticCategory.Message, "Completeness_6257", "Completeness"), - _0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file: diag(6258, DiagnosticCategory.Error, "_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258", "'{0}' should be set inside the 'compilerOptions' object of the config json file"), - Found_1_error_in_1: diag(6259, DiagnosticCategory.Message, "Found_1_error_in_1_6259", "Found 1 error in {1}"), - Found_0_errors_in_the_same_file_starting_at_Colon_1: diag(6260, DiagnosticCategory.Message, "Found_0_errors_in_the_same_file_starting_at_Colon_1_6260", "Found {0} errors in the same file, starting at: {1}"), - Found_0_errors_in_1_files: diag(6261, DiagnosticCategory.Message, "Found_0_errors_in_1_files_6261", "Found {0} errors in {1} files."), - Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve: diag(6270, DiagnosticCategory.Message, "Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270", "Directory '{0}' has no containing package.json scope. Imports will not resolve."), - Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1: diag(6271, DiagnosticCategory.Message, "Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271", "Import specifier '{0}' does not exist in package.json scope at path '{1}'."), - Invalid_import_specifier_0_has_no_possible_resolutions: diag(6272, DiagnosticCategory.Message, "Invalid_import_specifier_0_has_no_possible_resolutions_6272", "Invalid import specifier '{0}' has no possible resolutions."), - package_json_scope_0_has_no_imports_defined: diag(6273, DiagnosticCategory.Message, "package_json_scope_0_has_no_imports_defined_6273", "package.json scope '{0}' has no imports defined."), - package_json_scope_0_explicitly_maps_specifier_1_to_null: diag(6274, DiagnosticCategory.Message, "package_json_scope_0_explicitly_maps_specifier_1_to_null_6274", "package.json scope '{0}' explicitly maps specifier '{1}' to null."), - package_json_scope_0_has_invalid_type_for_target_of_specifier_1: diag(6275, DiagnosticCategory.Message, "package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275", "package.json scope '{0}' has invalid type for target of specifier '{1}'"), - Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1: diag(6276, DiagnosticCategory.Message, "Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276", "Export specifier '{0}' does not exist in package.json scope at path '{1}'."), - Enable_project_compilation: diag(6302, DiagnosticCategory.Message, "Enable_project_compilation_6302", "Enable project compilation"), - Composite_projects_may_not_disable_declaration_emit: diag(6304, DiagnosticCategory.Error, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."), - Output_file_0_has_not_been_built_from_source_file_1: diag(6305, DiagnosticCategory.Error, "Output_file_0_has_not_been_built_from_source_file_1_6305", "Output file '{0}' has not been built from source file '{1}'."), - Referenced_project_0_must_have_setting_composite_Colon_true: diag(6306, DiagnosticCategory.Error, "Referenced_project_0_must_have_setting_composite_Colon_true_6306", "Referenced project '{0}' must have setting \"composite\": true."), - File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern: diag(6307, DiagnosticCategory.Error, "File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_includ_6307", "File '{0}' is not listed within the file list of project '{1}'. Projects must list all files or use an 'include' pattern."), - Cannot_prepend_project_0_because_it_does_not_have_outFile_set: diag(6308, DiagnosticCategory.Error, "Cannot_prepend_project_0_because_it_does_not_have_outFile_set_6308", "Cannot prepend project '{0}' because it does not have 'outFile' set"), - Output_file_0_from_project_1_does_not_exist: diag(6309, DiagnosticCategory.Error, "Output_file_0_from_project_1_does_not_exist_6309", "Output file '{0}' from project '{1}' does not exist"), - Referenced_project_0_may_not_disable_emit: diag(6310, DiagnosticCategory.Error, "Referenced_project_0_may_not_disable_emit_6310", "Referenced project '{0}' may not disable emit."), - Project_0_is_out_of_date_because_output_1_is_older_than_input_2: diag(6350, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_1_is_older_than_input_2_6350", "Project '{0}' is out of date because output '{1}' is older than input '{2}'"), - Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2: diag(6351, DiagnosticCategory.Message, "Project_0_is_up_to_date_because_newest_input_1_is_older_than_output_2_6351", "Project '{0}' is up to date because newest input '{1}' is older than output '{2}'"), - Project_0_is_out_of_date_because_output_file_1_does_not_exist: diag(6352, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_file_1_does_not_exist_6352", "Project '{0}' is out of date because output file '{1}' does not exist"), - Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date: diag(6353, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_its_dependency_1_is_out_of_date_6353", "Project '{0}' is out of date because its dependency '{1}' is out of date"), - Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies: diag(6354, DiagnosticCategory.Message, "Project_0_is_up_to_date_with_d_ts_files_from_its_dependencies_6354", "Project '{0}' is up to date with .d.ts files from its dependencies"), - Projects_in_this_build_Colon_0: diag(6355, DiagnosticCategory.Message, "Projects_in_this_build_Colon_0_6355", "Projects in this build: {0}"), - A_non_dry_build_would_delete_the_following_files_Colon_0: diag(6356, DiagnosticCategory.Message, "A_non_dry_build_would_delete_the_following_files_Colon_0_6356", "A non-dry build would delete the following files: {0}"), - A_non_dry_build_would_build_project_0: diag(6357, DiagnosticCategory.Message, "A_non_dry_build_would_build_project_0_6357", "A non-dry build would build project '{0}'"), - Building_project_0: diag(6358, DiagnosticCategory.Message, "Building_project_0_6358", "Building project '{0}'..."), - Updating_output_timestamps_of_project_0: diag(6359, DiagnosticCategory.Message, "Updating_output_timestamps_of_project_0_6359", "Updating output timestamps of project '{0}'..."), - Project_0_is_up_to_date: diag(6361, DiagnosticCategory.Message, "Project_0_is_up_to_date_6361", "Project '{0}' is up to date"), - Skipping_build_of_project_0_because_its_dependency_1_has_errors: diag(6362, DiagnosticCategory.Message, "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362", "Skipping build of project '{0}' because its dependency '{1}' has errors"), - Project_0_can_t_be_built_because_its_dependency_1_has_errors: diag(6363, DiagnosticCategory.Message, "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363", "Project '{0}' can't be built because its dependency '{1}' has errors"), - Build_one_or_more_projects_and_their_dependencies_if_out_of_date: diag(6364, DiagnosticCategory.Message, "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364", "Build one or more projects and their dependencies, if out of date"), - Delete_the_outputs_of_all_projects: diag(6365, DiagnosticCategory.Message, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects."), - Show_what_would_be_built_or_deleted_if_specified_with_clean: diag(6367, DiagnosticCategory.Message, "Show_what_would_be_built_or_deleted_if_specified_with_clean_6367", "Show what would be built (or deleted, if specified with '--clean')"), - Option_build_must_be_the_first_command_line_argument: diag(6369, DiagnosticCategory.Error, "Option_build_must_be_the_first_command_line_argument_6369", "Option '--build' must be the first command line argument."), - Options_0_and_1_cannot_be_combined: diag(6370, DiagnosticCategory.Error, "Options_0_and_1_cannot_be_combined_6370", "Options '{0}' and '{1}' cannot be combined."), - Updating_unchanged_output_timestamps_of_project_0: diag(6371, DiagnosticCategory.Message, "Updating_unchanged_output_timestamps_of_project_0_6371", "Updating unchanged output timestamps of project '{0}'..."), - Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed: diag(6372, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_of_its_dependency_1_has_changed_6372", "Project '{0}' is out of date because output of its dependency '{1}' has changed"), - Updating_output_of_project_0: diag(6373, DiagnosticCategory.Message, "Updating_output_of_project_0_6373", "Updating output of project '{0}'..."), - A_non_dry_build_would_update_timestamps_for_output_of_project_0: diag(6374, DiagnosticCategory.Message, "A_non_dry_build_would_update_timestamps_for_output_of_project_0_6374", "A non-dry build would update timestamps for output of project '{0}'"), - A_non_dry_build_would_update_output_of_project_0: diag(6375, DiagnosticCategory.Message, "A_non_dry_build_would_update_output_of_project_0_6375", "A non-dry build would update output of project '{0}'"), - Cannot_update_output_of_project_0_because_there_was_error_reading_file_1: diag(6376, DiagnosticCategory.Message, "Cannot_update_output_of_project_0_because_there_was_error_reading_file_1_6376", "Cannot update output of project '{0}' because there was error reading file '{1}'"), - Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1: diag(6377, DiagnosticCategory.Error, "Cannot_write_file_0_because_it_will_overwrite_tsbuildinfo_file_generated_by_referenced_project_1_6377", "Cannot write file '{0}' because it will overwrite '.tsbuildinfo' file generated by referenced project '{1}'"), - Composite_projects_may_not_disable_incremental_compilation: diag(6379, DiagnosticCategory.Error, "Composite_projects_may_not_disable_incremental_compilation_6379", "Composite projects may not disable incremental compilation."), - Specify_file_to_store_incremental_compilation_information: diag(6380, DiagnosticCategory.Message, "Specify_file_to_store_incremental_compilation_information_6380", "Specify file to store incremental compilation information"), - Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_current_version_2: diag(6381, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_output_for_it_was_generated_with_version_1_that_differs_with_curren_6381", "Project '{0}' is out of date because output for it was generated with version '{1}' that differs with current version '{2}'"), - Skipping_build_of_project_0_because_its_dependency_1_was_not_built: diag(6382, DiagnosticCategory.Message, "Skipping_build_of_project_0_because_its_dependency_1_was_not_built_6382", "Skipping build of project '{0}' because its dependency '{1}' was not built"), - Project_0_can_t_be_built_because_its_dependency_1_was_not_built: diag(6383, DiagnosticCategory.Message, "Project_0_can_t_be_built_because_its_dependency_1_was_not_built_6383", "Project '{0}' can't be built because its dependency '{1}' was not built"), - Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: diag(6384, DiagnosticCategory.Message, "Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_di_6384", "Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it."), - _0_is_deprecated: diag(6385, DiagnosticCategory.Suggestion, "_0_is_deprecated_6385", "'{0}' is deprecated.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ undefined, /*reportsDeprecated*/ true), - Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found: diag(6386, DiagnosticCategory.Message, "Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386", "Performance timings for '--diagnostics' or '--extendedDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found."), - The_signature_0_of_1_is_deprecated: diag(6387, DiagnosticCategory.Suggestion, "The_signature_0_of_1_is_deprecated_6387", "The signature '{0}' of '{1}' is deprecated.", /*reportsUnnecessary*/ undefined, /*elidedInCompatabilityPyramid*/ undefined, /*reportsDeprecated*/ true), - Project_0_is_being_forcibly_rebuilt: diag(6388, DiagnosticCategory.Message, "Project_0_is_being_forcibly_rebuilt_6388", "Project '{0}' is being forcibly rebuilt"), - Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved: diag(6389, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389", "Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."), - Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2: diag(6390, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."), - Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: diag(6391, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."), - Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved: diag(6392, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."), - Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: diag(6393, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."), - Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: diag(6394, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."), - Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: diag(6395, DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."), - Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: diag(6396, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."), - Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: diag(6397, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."), - Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: diag(6398, DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."), - Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitted: diag(6399, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_that_some_of_the_changes_were_not_emitte_6399", "Project '{0}' is out of date because buildinfo file '{1}' indicates that some of the changes were not emitted"), - Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_files: diag(6400, DiagnosticCategory.Message, "Project_0_is_up_to_date_but_needs_to_update_timestamps_of_output_files_that_are_older_than_input_fil_6400", "Project '{0}' is up to date but needs to update timestamps of output files that are older than input files"), - Project_0_is_out_of_date_because_there_was_error_reading_file_1: diag(6401, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_there_was_error_reading_file_1_6401", "Project '{0}' is out of date because there was error reading file '{1}'"), - Resolving_in_0_mode_with_conditions_1: diag(6402, DiagnosticCategory.Message, "Resolving_in_0_mode_with_conditions_1_6402", "Resolving in {0} mode with conditions {1}."), - Matched_0_condition_1: diag(6403, DiagnosticCategory.Message, "Matched_0_condition_1_6403", "Matched '{0}' condition '{1}'."), - Using_0_subpath_1_with_target_2: diag(6404, DiagnosticCategory.Message, "Using_0_subpath_1_with_target_2_6404", "Using '{0}' subpath '{1}' with target '{2}'."), - Saw_non_matching_condition_0: diag(6405, DiagnosticCategory.Message, "Saw_non_matching_condition_0_6405", "Saw non-matching condition '{0}'."), - Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions: diag(6406, DiagnosticCategory.Message, "Project_0_is_out_of_date_because_buildinfo_file_1_indicates_there_is_change_in_compilerOptions_6406", "Project '{0}' is out of date because buildinfo file '{1}' indicates there is change in compilerOptions"), - The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, DiagnosticCategory.Message, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"), - The_expected_type_comes_from_this_index_signature: diag(6501, DiagnosticCategory.Message, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."), - The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, DiagnosticCategory.Message, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."), - Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing: diag(6503, DiagnosticCategory.Message, "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503", "Print names of files that are part of the compilation and then stop processing."), - File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option: diag(6504, DiagnosticCategory.Error, "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504", "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"), - Print_names_of_files_and_the_reason_they_are_part_of_the_compilation: diag(6505, DiagnosticCategory.Message, "Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505", "Print names of files and the reason they are part of the compilation."), - Consider_adding_a_declare_modifier_to_this_class: diag(6506, DiagnosticCategory.Message, "Consider_adding_a_declare_modifier_to_this_class_6506", "Consider adding a 'declare' modifier to this class."), - Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files: diag(6600, DiagnosticCategory.Message, "Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600", "Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files."), - Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export: diag(6601, DiagnosticCategory.Message, "Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601", "Allow 'import x from y' when a module doesn't have a default export."), - Allow_accessing_UMD_globals_from_modules: diag(6602, DiagnosticCategory.Message, "Allow_accessing_UMD_globals_from_modules_6602", "Allow accessing UMD globals from modules."), - Disable_error_reporting_for_unreachable_code: diag(6603, DiagnosticCategory.Message, "Disable_error_reporting_for_unreachable_code_6603", "Disable error reporting for unreachable code."), - Disable_error_reporting_for_unused_labels: diag(6604, DiagnosticCategory.Message, "Disable_error_reporting_for_unused_labels_6604", "Disable error reporting for unused labels."), - Ensure_use_strict_is_always_emitted: diag(6605, DiagnosticCategory.Message, "Ensure_use_strict_is_always_emitted_6605", "Ensure 'use strict' is always emitted."), - Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: diag(6606, DiagnosticCategory.Message, "Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606", "Have recompiles in projects that use 'incremental' and 'watch' mode assume that changes within a file will only affect files directly depending on it."), - Specify_the_base_directory_to_resolve_non_relative_module_names: diag(6607, DiagnosticCategory.Message, "Specify_the_base_directory_to_resolve_non_relative_module_names_6607", "Specify the base directory to resolve non-relative module names."), - No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files: diag(6608, DiagnosticCategory.Message, "No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608", "No longer supported. In early versions, manually set the text encoding for reading files."), - Enable_error_reporting_in_type_checked_JavaScript_files: diag(6609, DiagnosticCategory.Message, "Enable_error_reporting_in_type_checked_JavaScript_files_6609", "Enable error reporting in type-checked JavaScript files."), - Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references: diag(6611, DiagnosticCategory.Message, "Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611", "Enable constraints that allow a TypeScript project to be used with project references."), - Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project: diag(6612, DiagnosticCategory.Message, "Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612", "Generate .d.ts files from TypeScript and JavaScript files in your project."), - Specify_the_output_directory_for_generated_declaration_files: diag(6613, DiagnosticCategory.Message, "Specify_the_output_directory_for_generated_declaration_files_6613", "Specify the output directory for generated declaration files."), - Create_sourcemaps_for_d_ts_files: diag(6614, DiagnosticCategory.Message, "Create_sourcemaps_for_d_ts_files_6614", "Create sourcemaps for d.ts files."), - Output_compiler_performance_information_after_building: diag(6615, DiagnosticCategory.Message, "Output_compiler_performance_information_after_building_6615", "Output compiler performance information after building."), - Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project: diag(6616, DiagnosticCategory.Message, "Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616", "Disables inference for type acquisition by looking at filenames in a project."), - Reduce_the_number_of_projects_loaded_automatically_by_TypeScript: diag(6617, DiagnosticCategory.Message, "Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617", "Reduce the number of projects loaded automatically by TypeScript."), - Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server: diag(6618, DiagnosticCategory.Message, "Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618", "Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."), - Opt_a_project_out_of_multi_project_reference_checking_when_editing: diag(6619, DiagnosticCategory.Message, "Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619", "Opt a project out of multi-project reference checking when editing."), - Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects: diag(6620, DiagnosticCategory.Message, "Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620", "Disable preferring source files instead of declaration files when referencing composite projects."), - Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration: diag(6621, DiagnosticCategory.Message, "Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621", "Emit more compliant, but verbose and less performant JavaScript for iteration."), - Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files: diag(6622, DiagnosticCategory.Message, "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622", "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."), - Only_output_d_ts_files_and_not_JavaScript_files: diag(6623, DiagnosticCategory.Message, "Only_output_d_ts_files_and_not_JavaScript_files_6623", "Only output d.ts files and not JavaScript files."), - Emit_design_type_metadata_for_decorated_declarations_in_source_files: diag(6624, DiagnosticCategory.Message, "Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624", "Emit design-type metadata for decorated declarations in source files."), - Disable_the_type_acquisition_for_JavaScript_projects: diag(6625, DiagnosticCategory.Message, "Disable_the_type_acquisition_for_JavaScript_projects_6625", "Disable the type acquisition for JavaScript projects"), - Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility: diag(6626, DiagnosticCategory.Message, "Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626", "Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility."), - Filters_results_from_the_include_option: diag(6627, DiagnosticCategory.Message, "Filters_results_from_the_include_option_6627", "Filters results from the `include` option."), - Remove_a_list_of_directories_from_the_watch_process: diag(6628, DiagnosticCategory.Message, "Remove_a_list_of_directories_from_the_watch_process_6628", "Remove a list of directories from the watch process."), - Remove_a_list_of_files_from_the_watch_mode_s_processing: diag(6629, DiagnosticCategory.Message, "Remove_a_list_of_files_from_the_watch_mode_s_processing_6629", "Remove a list of files from the watch mode's processing."), - Enable_experimental_support_for_TC39_stage_2_draft_decorators: diag(6630, DiagnosticCategory.Message, "Enable_experimental_support_for_TC39_stage_2_draft_decorators_6630", "Enable experimental support for TC39 stage 2 draft decorators."), - Print_files_read_during_the_compilation_including_why_it_was_included: diag(6631, DiagnosticCategory.Message, "Print_files_read_during_the_compilation_including_why_it_was_included_6631", "Print files read during the compilation including why it was included."), - Output_more_detailed_compiler_performance_information_after_building: diag(6632, DiagnosticCategory.Message, "Output_more_detailed_compiler_performance_information_after_building_6632", "Output more detailed compiler performance information after building."), - Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited: diag(6633, DiagnosticCategory.Message, "Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633", "Specify one or more path or node module references to base configuration files from which settings are inherited."), - Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers: diag(6634, DiagnosticCategory.Message, "Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634", "Specify what approach the watcher should use if the system runs out of native file watchers."), - Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include: diag(6635, DiagnosticCategory.Message, "Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635", "Include a list of files. This does not support glob patterns, as opposed to `include`."), - Build_all_projects_including_those_that_appear_to_be_up_to_date: diag(6636, DiagnosticCategory.Message, "Build_all_projects_including_those_that_appear_to_be_up_to_date_6636", "Build all projects, including those that appear to be up to date."), - Ensure_that_casing_is_correct_in_imports: diag(6637, DiagnosticCategory.Message, "Ensure_that_casing_is_correct_in_imports_6637", "Ensure that casing is correct in imports."), - Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging: diag(6638, DiagnosticCategory.Message, "Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638", "Emit a v8 CPU profile of the compiler run for debugging."), - Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file: diag(6639, DiagnosticCategory.Message, "Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639", "Allow importing helper functions from tslib once per project, instead of including them per-file."), - Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation: diag(6641, DiagnosticCategory.Message, "Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641", "Specify a list of glob patterns that match files to be included in compilation."), - Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects: diag(6642, DiagnosticCategory.Message, "Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642", "Save .tsbuildinfo files to allow for incremental compilation of projects."), - Include_sourcemap_files_inside_the_emitted_JavaScript: diag(6643, DiagnosticCategory.Message, "Include_sourcemap_files_inside_the_emitted_JavaScript_6643", "Include sourcemap files inside the emitted JavaScript."), - Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript: diag(6644, DiagnosticCategory.Message, "Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644", "Include source code in the sourcemaps inside the emitted JavaScript."), - Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports: diag(6645, DiagnosticCategory.Message, "Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645", "Ensure that each file can be safely transpiled without relying on other imports."), - Specify_what_JSX_code_is_generated: diag(6646, DiagnosticCategory.Message, "Specify_what_JSX_code_is_generated_6646", "Specify what JSX code is generated."), - Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h: diag(6647, DiagnosticCategory.Message, "Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647", "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'."), - Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment: diag(6648, DiagnosticCategory.Message, "Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648", "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."), - Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk: diag(6649, DiagnosticCategory.Message, "Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649", "Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'."), - Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option: diag(6650, DiagnosticCategory.Message, "Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650", "Make keyof only return strings instead of string, numbers or symbols. Legacy option."), - Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment: diag(6651, DiagnosticCategory.Message, "Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651", "Specify a set of bundled library declaration files that describe the target runtime environment."), - Print_the_names_of_emitted_files_after_a_compilation: diag(6652, DiagnosticCategory.Message, "Print_the_names_of_emitted_files_after_a_compilation_6652", "Print the names of emitted files after a compilation."), - Print_all_of_the_files_read_during_the_compilation: diag(6653, DiagnosticCategory.Message, "Print_all_of_the_files_read_during_the_compilation_6653", "Print all of the files read during the compilation."), - Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit: diag(6654, DiagnosticCategory.Message, "Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654", "Set the language of the messaging from TypeScript. This does not affect emit."), - Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: diag(6655, DiagnosticCategory.Message, "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655", "Specify the location where debugger should locate map files instead of generated locations."), - Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs: diag(6656, DiagnosticCategory.Message, "Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656", "Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'."), - Specify_what_module_code_is_generated: diag(6657, DiagnosticCategory.Message, "Specify_what_module_code_is_generated_6657", "Specify what module code is generated."), - Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier: diag(6658, DiagnosticCategory.Message, "Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658", "Specify how TypeScript looks up a file from a given module specifier."), - Set_the_newline_character_for_emitting_files: diag(6659, DiagnosticCategory.Message, "Set_the_newline_character_for_emitting_files_6659", "Set the newline character for emitting files."), - Disable_emitting_files_from_a_compilation: diag(6660, DiagnosticCategory.Message, "Disable_emitting_files_from_a_compilation_6660", "Disable emitting files from a compilation."), - Disable_generating_custom_helper_functions_like_extends_in_compiled_output: diag(6661, DiagnosticCategory.Message, "Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661", "Disable generating custom helper functions like '__extends' in compiled output."), - Disable_emitting_files_if_any_type_checking_errors_are_reported: diag(6662, DiagnosticCategory.Message, "Disable_emitting_files_if_any_type_checking_errors_are_reported_6662", "Disable emitting files if any type checking errors are reported."), - Disable_truncating_types_in_error_messages: diag(6663, DiagnosticCategory.Message, "Disable_truncating_types_in_error_messages_6663", "Disable truncating types in error messages."), - Enable_error_reporting_for_fallthrough_cases_in_switch_statements: diag(6664, DiagnosticCategory.Message, "Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664", "Enable error reporting for fallthrough cases in switch statements."), - Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type: diag(6665, DiagnosticCategory.Message, "Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665", "Enable error reporting for expressions and declarations with an implied 'any' type."), - Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier: diag(6666, DiagnosticCategory.Message, "Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666", "Ensure overriding members in derived classes are marked with an override modifier."), - Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function: diag(6667, DiagnosticCategory.Message, "Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667", "Enable error reporting for codepaths that do not explicitly return in a function."), - Enable_error_reporting_when_this_is_given_the_type_any: diag(6668, DiagnosticCategory.Message, "Enable_error_reporting_when_this_is_given_the_type_any_6668", "Enable error reporting when 'this' is given the type 'any'."), - Disable_adding_use_strict_directives_in_emitted_JavaScript_files: diag(6669, DiagnosticCategory.Message, "Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669", "Disable adding 'use strict' directives in emitted JavaScript files."), - Disable_including_any_library_files_including_the_default_lib_d_ts: diag(6670, DiagnosticCategory.Message, "Disable_including_any_library_files_including_the_default_lib_d_ts_6670", "Disable including any library files, including the default lib.d.ts."), - Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type: diag(6671, DiagnosticCategory.Message, "Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671", "Enforces using indexed accessors for keys declared using an indexed type."), - Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project: diag(6672, DiagnosticCategory.Message, "Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672", "Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project."), - Disable_strict_checking_of_generic_signatures_in_function_types: diag(6673, DiagnosticCategory.Message, "Disable_strict_checking_of_generic_signatures_in_function_types_6673", "Disable strict checking of generic signatures in function types."), - Add_undefined_to_a_type_when_accessed_using_an_index: diag(6674, DiagnosticCategory.Message, "Add_undefined_to_a_type_when_accessed_using_an_index_6674", "Add 'undefined' to a type when accessed using an index."), - Enable_error_reporting_when_local_variables_aren_t_read: diag(6675, DiagnosticCategory.Message, "Enable_error_reporting_when_local_variables_aren_t_read_6675", "Enable error reporting when local variables aren't read."), - Raise_an_error_when_a_function_parameter_isn_t_read: diag(6676, DiagnosticCategory.Message, "Raise_an_error_when_a_function_parameter_isn_t_read_6676", "Raise an error when a function parameter isn't read."), - Deprecated_setting_Use_outFile_instead: diag(6677, DiagnosticCategory.Message, "Deprecated_setting_Use_outFile_instead_6677", "Deprecated setting. Use 'outFile' instead."), - Specify_an_output_folder_for_all_emitted_files: diag(6678, DiagnosticCategory.Message, "Specify_an_output_folder_for_all_emitted_files_6678", "Specify an output folder for all emitted files."), - Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output: diag(6679, DiagnosticCategory.Message, "Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679", "Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output."), - Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations: diag(6680, DiagnosticCategory.Message, "Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680", "Specify a set of entries that re-map imports to additional lookup locations."), - Specify_a_list_of_language_service_plugins_to_include: diag(6681, DiagnosticCategory.Message, "Specify_a_list_of_language_service_plugins_to_include_6681", "Specify a list of language service plugins to include."), - Disable_erasing_const_enum_declarations_in_generated_code: diag(6682, DiagnosticCategory.Message, "Disable_erasing_const_enum_declarations_in_generated_code_6682", "Disable erasing 'const enum' declarations in generated code."), - Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node: diag(6683, DiagnosticCategory.Message, "Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683", "Disable resolving symlinks to their realpath. This correlates to the same flag in node."), - Disable_wiping_the_console_in_watch_mode: diag(6684, DiagnosticCategory.Message, "Disable_wiping_the_console_in_watch_mode_6684", "Disable wiping the console in watch mode."), - Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read: diag(6685, DiagnosticCategory.Message, "Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685", "Enable color and formatting in TypeScript's output to make compiler errors easier to read."), - Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit: diag(6686, DiagnosticCategory.Message, "Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686", "Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit."), - Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references: diag(6687, DiagnosticCategory.Message, "Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687", "Specify an array of objects that specify paths for projects. Used in project references."), - Disable_emitting_comments: diag(6688, DiagnosticCategory.Message, "Disable_emitting_comments_6688", "Disable emitting comments."), - Enable_importing_json_files: diag(6689, DiagnosticCategory.Message, "Enable_importing_json_files_6689", "Enable importing .json files."), - Specify_the_root_folder_within_your_source_files: diag(6690, DiagnosticCategory.Message, "Specify_the_root_folder_within_your_source_files_6690", "Specify the root folder within your source files."), - Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules: diag(6691, DiagnosticCategory.Message, "Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691", "Allow multiple folders to be treated as one when resolving modules."), - Skip_type_checking_d_ts_files_that_are_included_with_TypeScript: diag(6692, DiagnosticCategory.Message, "Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692", "Skip type checking .d.ts files that are included with TypeScript."), - Skip_type_checking_all_d_ts_files: diag(6693, DiagnosticCategory.Message, "Skip_type_checking_all_d_ts_files_6693", "Skip type checking all .d.ts files."), - Create_source_map_files_for_emitted_JavaScript_files: diag(6694, DiagnosticCategory.Message, "Create_source_map_files_for_emitted_JavaScript_files_6694", "Create source map files for emitted JavaScript files."), - Specify_the_root_path_for_debuggers_to_find_the_reference_source_code: diag(6695, DiagnosticCategory.Message, "Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695", "Specify the root path for debuggers to find the reference source code."), - Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function: diag(6697, DiagnosticCategory.Message, "Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697", "Check that the arguments for 'bind', 'call', and 'apply' methods match the original function."), - When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible: diag(6698, DiagnosticCategory.Message, "When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698", "When assigning functions, check to ensure parameters and the return values are subtype-compatible."), - When_type_checking_take_into_account_null_and_undefined: diag(6699, DiagnosticCategory.Message, "When_type_checking_take_into_account_null_and_undefined_6699", "When type checking, take into account 'null' and 'undefined'."), - Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor: diag(6700, DiagnosticCategory.Message, "Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700", "Check for class properties that are declared but not set in the constructor."), - Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments: diag(6701, DiagnosticCategory.Message, "Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701", "Disable emitting declarations that have '@internal' in their JSDoc comments."), - Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals: diag(6702, DiagnosticCategory.Message, "Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702", "Disable reporting of excess property errors during the creation of object literals."), - Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures: diag(6703, DiagnosticCategory.Message, "Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703", "Suppress 'noImplicitAny' errors when indexing objects that lack index signatures."), - Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively: diag(6704, DiagnosticCategory.Message, "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704", "Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."), - Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations: diag(6705, DiagnosticCategory.Message, "Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705", "Set the JavaScript language version for emitted JavaScript and include compatible library declarations."), - Log_paths_used_during_the_moduleResolution_process: diag(6706, DiagnosticCategory.Message, "Log_paths_used_during_the_moduleResolution_process_6706", "Log paths used during the 'moduleResolution' process."), - Specify_the_path_to_tsbuildinfo_incremental_compilation_file: diag(6707, DiagnosticCategory.Message, "Specify_the_path_to_tsbuildinfo_incremental_compilation_file_6707", "Specify the path to .tsbuildinfo incremental compilation file."), - Specify_options_for_automatic_acquisition_of_declaration_files: diag(6709, DiagnosticCategory.Message, "Specify_options_for_automatic_acquisition_of_declaration_files_6709", "Specify options for automatic acquisition of declaration files."), - Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types: diag(6710, DiagnosticCategory.Message, "Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710", "Specify multiple folders that act like './node_modules/@types'."), - Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file: diag(6711, DiagnosticCategory.Message, "Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711", "Specify type package names to be included without being referenced in a source file."), - Emit_ECMAScript_standard_compliant_class_fields: diag(6712, DiagnosticCategory.Message, "Emit_ECMAScript_standard_compliant_class_fields_6712", "Emit ECMAScript-standard-compliant class fields."), - Enable_verbose_logging: diag(6713, DiagnosticCategory.Message, "Enable_verbose_logging_6713", "Enable verbose logging."), - Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality: diag(6714, DiagnosticCategory.Message, "Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714", "Specify how directories are watched on systems that lack recursive file-watching functionality."), - Specify_how_the_TypeScript_watch_mode_works: diag(6715, DiagnosticCategory.Message, "Specify_how_the_TypeScript_watch_mode_works_6715", "Specify how the TypeScript watch mode works."), - Require_undeclared_properties_from_index_signatures_to_use_element_accesses: diag(6717, DiagnosticCategory.Message, "Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717", "Require undeclared properties from index signatures to use element accesses."), - Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: diag(6718, DiagnosticCategory.Message, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", "Specify emit/checking behavior for imports that are only used for types."), - Ensure_that_each_file_can_have_declaration_emit_generated_without_type_information: diag(6719, DiagnosticCategory.Message, "Ensure_that_each_file_can_have_declaration_emit_generated_without_type_information_6719", "Ensure that each file can have declaration emit generated without type information"), - Default_catch_clause_variables_as_unknown_instead_of_any: diag(6803, DiagnosticCategory.Message, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."), - one_of_Colon: diag(6900, DiagnosticCategory.Message, "one_of_Colon_6900", "one of:"), - one_or_more_Colon: diag(6901, DiagnosticCategory.Message, "one_or_more_Colon_6901", "one or more:"), - type_Colon: diag(6902, DiagnosticCategory.Message, "type_Colon_6902", "type:"), - default_Colon: diag(6903, DiagnosticCategory.Message, "default_Colon_6903", "default:"), - module_system_or_esModuleInterop: diag(6904, DiagnosticCategory.Message, "module_system_or_esModuleInterop_6904", "module === \"system\" or esModuleInterop"), - false_unless_strict_is_set: diag(6905, DiagnosticCategory.Message, "false_unless_strict_is_set_6905", "`false`, unless `strict` is set"), - false_unless_composite_is_set: diag(6906, DiagnosticCategory.Message, "false_unless_composite_is_set_6906", "`false`, unless `composite` is set"), - node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified: diag(6907, DiagnosticCategory.Message, "node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907", "`[\"node_modules\", \"bower_components\", \"jspm_packages\"]`, plus the value of `outDir` if one is specified."), - if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk: diag(6908, DiagnosticCategory.Message, "if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908", "`[]` if `files` is specified, otherwise `[\"**/*\"]`"), - true_if_composite_false_otherwise: diag(6909, DiagnosticCategory.Message, "true_if_composite_false_otherwise_6909", "`true` if `composite`, `false` otherwise"), - module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node: diag(69010, DiagnosticCategory.Message, "module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010", "module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"), - Computed_from_the_list_of_input_files: diag(6911, DiagnosticCategory.Message, "Computed_from_the_list_of_input_files_6911", "Computed from the list of input files"), - Platform_specific: diag(6912, DiagnosticCategory.Message, "Platform_specific_6912", "Platform specific"), - You_can_learn_about_all_of_the_compiler_options_at_0: diag(6913, DiagnosticCategory.Message, "You_can_learn_about_all_of_the_compiler_options_at_0_6913", "You can learn about all of the compiler options at {0}"), - Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon: diag(6914, DiagnosticCategory.Message, "Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914", "Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"), - Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0: diag(6915, DiagnosticCategory.Message, "Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915", "Using --build, -b will make tsc behave more like a build orchestrator than a compiler. This is used to trigger building composite projects which you can learn more about at {0}"), - COMMON_COMMANDS: diag(6916, DiagnosticCategory.Message, "COMMON_COMMANDS_6916", "COMMON COMMANDS"), - ALL_COMPILER_OPTIONS: diag(6917, DiagnosticCategory.Message, "ALL_COMPILER_OPTIONS_6917", "ALL COMPILER OPTIONS"), - WATCH_OPTIONS: diag(6918, DiagnosticCategory.Message, "WATCH_OPTIONS_6918", "WATCH OPTIONS"), - BUILD_OPTIONS: diag(6919, DiagnosticCategory.Message, "BUILD_OPTIONS_6919", "BUILD OPTIONS"), - COMMON_COMPILER_OPTIONS: diag(6920, DiagnosticCategory.Message, "COMMON_COMPILER_OPTIONS_6920", "COMMON COMPILER OPTIONS"), - COMMAND_LINE_FLAGS: diag(6921, DiagnosticCategory.Message, "COMMAND_LINE_FLAGS_6921", "COMMAND LINE FLAGS"), - tsc_Colon_The_TypeScript_Compiler: diag(6922, DiagnosticCategory.Message, "tsc_Colon_The_TypeScript_Compiler_6922", "tsc: The TypeScript Compiler"), - Compiles_the_current_project_tsconfig_json_in_the_working_directory: diag(6923, DiagnosticCategory.Message, "Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923", "Compiles the current project (tsconfig.json in the working directory.)"), - Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options: diag(6924, DiagnosticCategory.Message, "Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924", "Ignoring tsconfig.json, compiles the specified files with default compiler options."), - Build_a_composite_project_in_the_working_directory: diag(6925, DiagnosticCategory.Message, "Build_a_composite_project_in_the_working_directory_6925", "Build a composite project in the working directory."), - Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory: diag(6926, DiagnosticCategory.Message, "Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926", "Creates a tsconfig.json with the recommended settings in the working directory."), - Compiles_the_TypeScript_project_located_at_the_specified_path: diag(6927, DiagnosticCategory.Message, "Compiles_the_TypeScript_project_located_at_the_specified_path_6927", "Compiles the TypeScript project located at the specified path."), - An_expanded_version_of_this_information_showing_all_possible_compiler_options: diag(6928, DiagnosticCategory.Message, "An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928", "An expanded version of this information, showing all possible compiler options"), - Compiles_the_current_project_with_additional_settings: diag(6929, DiagnosticCategory.Message, "Compiles_the_current_project_with_additional_settings_6929", "Compiles the current project, with additional settings."), - true_for_ES2022_and_above_including_ESNext: diag(6930, DiagnosticCategory.Message, "true_for_ES2022_and_above_including_ESNext_6930", "`true` for ES2022 and above, including ESNext."), - List_of_file_name_suffixes_to_search_when_resolving_a_module: diag(6931, DiagnosticCategory.Error, "List_of_file_name_suffixes_to_search_when_resolving_a_module_6931", "List of file name suffixes to search when resolving a module."), - Variable_0_implicitly_has_an_1_type: diag(7005, DiagnosticCategory.Error, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."), - Parameter_0_implicitly_has_an_1_type: diag(7006, DiagnosticCategory.Error, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."), - Member_0_implicitly_has_an_1_type: diag(7008, DiagnosticCategory.Error, "Member_0_implicitly_has_an_1_type_7008", "Member '{0}' implicitly has an '{1}' type."), - new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: diag(7009, DiagnosticCategory.Error, "new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009", "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type."), - _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: diag(7010, DiagnosticCategory.Error, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010", "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type."), - Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7011, DiagnosticCategory.Error, "Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011", "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type."), - Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: diag(7013, DiagnosticCategory.Error, "Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013", "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type."), - Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: diag(7014, DiagnosticCategory.Error, "Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7014", "Function type, which lacks return-type annotation, implicitly has an '{0}' return type."), - Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number: diag(7015, DiagnosticCategory.Error, "Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015", "Element implicitly has an 'any' type because index expression is not of type 'number'."), - Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type: diag(7016, DiagnosticCategory.Error, "Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type_7016", "Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type."), - Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature: diag(7017, DiagnosticCategory.Error, "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_7017", "Element implicitly has an 'any' type because type '{0}' has no index signature."), - Object_literal_s_property_0_implicitly_has_an_1_type: diag(7018, DiagnosticCategory.Error, "Object_literal_s_property_0_implicitly_has_an_1_type_7018", "Object literal's property '{0}' implicitly has an '{1}' type."), - Rest_parameter_0_implicitly_has_an_any_type: diag(7019, DiagnosticCategory.Error, "Rest_parameter_0_implicitly_has_an_any_type_7019", "Rest parameter '{0}' implicitly has an 'any[]' type."), - Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: diag(7020, DiagnosticCategory.Error, "Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020", "Call signature, which lacks return-type annotation, implicitly has an 'any' return type."), - _0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: diag(7022, DiagnosticCategory.Error, "_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022", "'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer."), - _0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: diag(7023, DiagnosticCategory.Error, "_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023", "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."), - Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: diag(7024, DiagnosticCategory.Error, "Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024", "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."), - Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation: diag(7025, DiagnosticCategory.Error, "Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_retu_7025", "Generator implicitly has yield type '{0}' because it does not yield any values. Consider supplying a return type annotation."), - JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists: diag(7026, DiagnosticCategory.Error, "JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026", "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists."), - Unreachable_code_detected: diag(7027, DiagnosticCategory.Error, "Unreachable_code_detected_7027", "Unreachable code detected.", /*reportsUnnecessary*/ true), - Unused_label: diag(7028, DiagnosticCategory.Error, "Unused_label_7028", "Unused label.", /*reportsUnnecessary*/ true), - Fallthrough_case_in_switch: diag(7029, DiagnosticCategory.Error, "Fallthrough_case_in_switch_7029", "Fallthrough case in switch."), - Not_all_code_paths_return_a_value: diag(7030, DiagnosticCategory.Error, "Not_all_code_paths_return_a_value_7030", "Not all code paths return a value."), - Binding_element_0_implicitly_has_an_1_type: diag(7031, DiagnosticCategory.Error, "Binding_element_0_implicitly_has_an_1_type_7031", "Binding element '{0}' implicitly has an '{1}' type."), - Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation: diag(7032, DiagnosticCategory.Error, "Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation_7032", "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation."), - Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation: diag(7033, DiagnosticCategory.Error, "Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation_7033", "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation."), - Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined: diag(7034, DiagnosticCategory.Error, "Variable_0_implicitly_has_type_1_in_some_locations_where_its_type_cannot_be_determined_7034", "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined."), - Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0: diag(7035, DiagnosticCategory.Error, "Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare__7035", "Try `npm i --save-dev @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`"), - Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0: diag(7036, DiagnosticCategory.Error, "Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0_7036", "Dynamic import's specifier must be of type 'string', but here has type '{0}'."), - Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports: diag(7037, DiagnosticCategory.Message, "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037", "Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."), - Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead: diag(7038, DiagnosticCategory.Message, "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038", "Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."), - Mapped_object_type_implicitly_has_an_any_template_type: diag(7039, DiagnosticCategory.Error, "Mapped_object_type_implicitly_has_an_any_template_type_7039", "Mapped object type implicitly has an 'any' template type."), - If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1: diag(7040, DiagnosticCategory.Error, "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040", "If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}'"), - The_containing_arrow_function_captures_the_global_value_of_this: diag(7041, DiagnosticCategory.Error, "The_containing_arrow_function_captures_the_global_value_of_this_7041", "The containing arrow function captures the global value of 'this'."), - Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used: diag(7042, DiagnosticCategory.Error, "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042", "Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."), - Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: diag(7043, DiagnosticCategory.Suggestion, "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043", "Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), - Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: diag(7044, DiagnosticCategory.Suggestion, "Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7044", "Parameter '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), - Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: diag(7045, DiagnosticCategory.Suggestion, "Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7045", "Member '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."), - Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage: diag(7046, DiagnosticCategory.Suggestion, "Variable_0_implicitly_has_type_1_in_some_locations_but_a_better_type_may_be_inferred_from_usage_7046", "Variable '{0}' implicitly has type '{1}' in some locations, but a better type may be inferred from usage."), - Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage: diag(7047, DiagnosticCategory.Suggestion, "Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage_7047", "Rest parameter '{0}' implicitly has an 'any[]' type, but a better type may be inferred from usage."), - Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage: diag(7048, DiagnosticCategory.Suggestion, "Property_0_implicitly_has_type_any_but_a_better_type_for_its_get_accessor_may_be_inferred_from_usage_7048", "Property '{0}' implicitly has type 'any', but a better type for its get accessor may be inferred from usage."), - Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage: diag(7049, DiagnosticCategory.Suggestion, "Property_0_implicitly_has_type_any_but_a_better_type_for_its_set_accessor_may_be_inferred_from_usage_7049", "Property '{0}' implicitly has type 'any', but a better type for its set accessor may be inferred from usage."), - _0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage: diag(7050, DiagnosticCategory.Suggestion, "_0_implicitly_has_an_1_return_type_but_a_better_type_may_be_inferred_from_usage_7050", "'{0}' implicitly has an '{1}' return type, but a better type may be inferred from usage."), - Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1: diag(7051, DiagnosticCategory.Error, "Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1_7051", "Parameter has a name but no type. Did you mean '{0}: {1}'?"), - Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1: diag(7052, DiagnosticCategory.Error, "Element_implicitly_has_an_any_type_because_type_0_has_no_index_signature_Did_you_mean_to_call_1_7052", "Element implicitly has an 'any' type because type '{0}' has no index signature. Did you mean to call '{1}'?"), - Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1: diag(7053, DiagnosticCategory.Error, "Element_implicitly_has_an_any_type_because_expression_of_type_0_can_t_be_used_to_index_type_1_7053", "Element implicitly has an 'any' type because expression of type '{0}' can't be used to index type '{1}'."), - No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1: diag(7054, DiagnosticCategory.Error, "No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1_7054", "No index signature with a parameter of type '{0}' was found on type '{1}'."), - _0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type: diag(7055, DiagnosticCategory.Error, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055", "'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."), - The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed: diag(7056, DiagnosticCategory.Error, "The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056", "The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed."), - yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation: diag(7057, DiagnosticCategory.Error, "yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057", "'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."), - If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1: diag(7058, DiagnosticCategory.Error, "If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058", "If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"), - This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead: diag(7059, DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059", "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."), - This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint: diag(7060, DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060", "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."), - A_mapped_type_may_not_declare_properties_or_methods: diag(7061, DiagnosticCategory.Error, "A_mapped_type_may_not_declare_properties_or_methods_7061", "A mapped type may not declare properties or methods."), - You_cannot_rename_this_element: diag(8000, DiagnosticCategory.Error, "You_cannot_rename_this_element_8000", "You cannot rename this element."), - You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: diag(8001, DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", "You cannot rename elements that are defined in the standard TypeScript library."), - import_can_only_be_used_in_TypeScript_files: diag(8002, DiagnosticCategory.Error, "import_can_only_be_used_in_TypeScript_files_8002", "'import ... =' can only be used in TypeScript files."), - export_can_only_be_used_in_TypeScript_files: diag(8003, DiagnosticCategory.Error, "export_can_only_be_used_in_TypeScript_files_8003", "'export =' can only be used in TypeScript files."), - Type_parameter_declarations_can_only_be_used_in_TypeScript_files: diag(8004, DiagnosticCategory.Error, "Type_parameter_declarations_can_only_be_used_in_TypeScript_files_8004", "Type parameter declarations can only be used in TypeScript files."), - implements_clauses_can_only_be_used_in_TypeScript_files: diag(8005, DiagnosticCategory.Error, "implements_clauses_can_only_be_used_in_TypeScript_files_8005", "'implements' clauses can only be used in TypeScript files."), - _0_declarations_can_only_be_used_in_TypeScript_files: diag(8006, DiagnosticCategory.Error, "_0_declarations_can_only_be_used_in_TypeScript_files_8006", "'{0}' declarations can only be used in TypeScript files."), - Type_aliases_can_only_be_used_in_TypeScript_files: diag(8008, DiagnosticCategory.Error, "Type_aliases_can_only_be_used_in_TypeScript_files_8008", "Type aliases can only be used in TypeScript files."), - The_0_modifier_can_only_be_used_in_TypeScript_files: diag(8009, DiagnosticCategory.Error, "The_0_modifier_can_only_be_used_in_TypeScript_files_8009", "The '{0}' modifier can only be used in TypeScript files."), - Type_annotations_can_only_be_used_in_TypeScript_files: diag(8010, DiagnosticCategory.Error, "Type_annotations_can_only_be_used_in_TypeScript_files_8010", "Type annotations can only be used in TypeScript files."), - Type_arguments_can_only_be_used_in_TypeScript_files: diag(8011, DiagnosticCategory.Error, "Type_arguments_can_only_be_used_in_TypeScript_files_8011", "Type arguments can only be used in TypeScript files."), - Parameter_modifiers_can_only_be_used_in_TypeScript_files: diag(8012, DiagnosticCategory.Error, "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012", "Parameter modifiers can only be used in TypeScript files."), - Non_null_assertions_can_only_be_used_in_TypeScript_files: diag(8013, DiagnosticCategory.Error, "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013", "Non-null assertions can only be used in TypeScript files."), - Type_assertion_expressions_can_only_be_used_in_TypeScript_files: diag(8016, DiagnosticCategory.Error, "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016", "Type assertion expressions can only be used in TypeScript files."), - Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0: diag(8017, DiagnosticCategory.Error, "Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017", "Octal literal types must use ES2015 syntax. Use the syntax '{0}'."), - Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0: diag(8018, DiagnosticCategory.Error, "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018", "Octal literals are not allowed in enums members initializer. Use the syntax '{0}'."), - Report_errors_in_js_files: diag(8019, DiagnosticCategory.Message, "Report_errors_in_js_files_8019", "Report errors in .js files."), - JSDoc_types_can_only_be_used_inside_documentation_comments: diag(8020, DiagnosticCategory.Error, "JSDoc_types_can_only_be_used_inside_documentation_comments_8020", "JSDoc types can only be used inside documentation comments."), - JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags: diag(8021, DiagnosticCategory.Error, "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021", "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."), - JSDoc_0_is_not_attached_to_a_class: diag(8022, DiagnosticCategory.Error, "JSDoc_0_is_not_attached_to_a_class_8022", "JSDoc '@{0}' is not attached to a class."), - JSDoc_0_1_does_not_match_the_extends_2_clause: diag(8023, DiagnosticCategory.Error, "JSDoc_0_1_does_not_match_the_extends_2_clause_8023", "JSDoc '@{0} {1}' does not match the 'extends {2}' clause."), - JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name: diag(8024, DiagnosticCategory.Error, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name."), - Class_declarations_cannot_have_more_than_one_augments_or_extends_tag: diag(8025, DiagnosticCategory.Error, "Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025", "Class declarations cannot have more than one '@augments' or '@extends' tag."), - Expected_0_type_arguments_provide_these_with_an_extends_tag: diag(8026, DiagnosticCategory.Error, "Expected_0_type_arguments_provide_these_with_an_extends_tag_8026", "Expected {0} type arguments; provide these with an '@extends' tag."), - Expected_0_1_type_arguments_provide_these_with_an_extends_tag: diag(8027, DiagnosticCategory.Error, "Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027", "Expected {0}-{1} type arguments; provide these with an '@extends' tag."), - JSDoc_may_only_appear_in_the_last_parameter_of_a_signature: diag(8028, DiagnosticCategory.Error, "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028", "JSDoc '...' may only appear in the last parameter of a signature."), - JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type: diag(8029, DiagnosticCategory.Error, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_h_8029", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type."), - The_type_of_a_function_declaration_must_match_the_function_s_signature: diag(8030, DiagnosticCategory.Error, "The_type_of_a_function_declaration_must_match_the_function_s_signature_8030", "The type of a function declaration must match the function's signature."), - You_cannot_rename_a_module_via_a_global_import: diag(8031, DiagnosticCategory.Error, "You_cannot_rename_a_module_via_a_global_import_8031", "You cannot rename a module via a global import."), - Qualified_name_0_is_not_allowed_without_a_leading_param_object_1: diag(8032, DiagnosticCategory.Error, "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032", "Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."), - A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags: diag(8033, DiagnosticCategory.Error, "A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033", "A JSDoc '@typedef' comment may not contain multiple '@type' tags."), - The_tag_was_first_specified_here: diag(8034, DiagnosticCategory.Error, "The_tag_was_first_specified_here_8034", "The tag was first specified here."), - You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder: diag(8035, DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035", "You cannot rename elements that are defined in a 'node_modules' folder."), - You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder: diag(8036, DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036", "You cannot rename elements that are defined in another 'node_modules' folder."), - Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files: diag(8037, DiagnosticCategory.Error, "Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037", "Type satisfaction expressions can only be used in TypeScript files."), - Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9005, DiagnosticCategory.Error, "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005", "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."), - Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9006, DiagnosticCategory.Error, "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006", "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."), - Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9007, DiagnosticCategory.Error, "Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_decl_9007", "Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit."), - JSX_attributes_must_only_be_assigned_a_non_empty_expression: diag(17000, DiagnosticCategory.Error, "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", "JSX attributes must only be assigned a non-empty 'expression'."), - JSX_elements_cannot_have_multiple_attributes_with_the_same_name: diag(17001, DiagnosticCategory.Error, "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001", "JSX elements cannot have multiple attributes with the same name."), - Expected_corresponding_JSX_closing_tag_for_0: diag(17002, DiagnosticCategory.Error, "Expected_corresponding_JSX_closing_tag_for_0_17002", "Expected corresponding JSX closing tag for '{0}'."), - Cannot_use_JSX_unless_the_jsx_flag_is_provided: diag(17004, DiagnosticCategory.Error, "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004", "Cannot use JSX unless the '--jsx' flag is provided."), - A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: diag(17005, DiagnosticCategory.Error, "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", "A constructor cannot contain a 'super' call when its class extends 'null'."), - An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: diag(17006, DiagnosticCategory.Error, "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006", "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."), - A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: diag(17007, DiagnosticCategory.Error, "A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007", "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."), - JSX_element_0_has_no_corresponding_closing_tag: diag(17008, DiagnosticCategory.Error, "JSX_element_0_has_no_corresponding_closing_tag_17008", "JSX element '{0}' has no corresponding closing tag."), - super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class: diag(17009, DiagnosticCategory.Error, "super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009", "'super' must be called before accessing 'this' in the constructor of a derived class."), - Unknown_type_acquisition_option_0: diag(17010, DiagnosticCategory.Error, "Unknown_type_acquisition_option_0_17010", "Unknown type acquisition option '{0}'."), - super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class: diag(17011, DiagnosticCategory.Error, "super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class_17011", "'super' must be called before accessing a property of 'super' in the constructor of a derived class."), - _0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2: diag(17012, DiagnosticCategory.Error, "_0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2_17012", "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?"), - Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor: diag(17013, DiagnosticCategory.Error, "Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constru_17013", "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor."), - JSX_fragment_has_no_corresponding_closing_tag: diag(17014, DiagnosticCategory.Error, "JSX_fragment_has_no_corresponding_closing_tag_17014", "JSX fragment has no corresponding closing tag."), - Expected_corresponding_closing_tag_for_JSX_fragment: diag(17015, DiagnosticCategory.Error, "Expected_corresponding_closing_tag_for_JSX_fragment_17015", "Expected corresponding closing tag for JSX fragment."), - The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option: diag(17016, DiagnosticCategory.Error, "The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_com_17016", "The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option."), - An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments: diag(17017, DiagnosticCategory.Error, "An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017", "An @jsxFrag pragma is required when using an @jsx pragma with JSX fragments."), - Unknown_type_acquisition_option_0_Did_you_mean_1: diag(17018, DiagnosticCategory.Error, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"), - Circularity_detected_while_resolving_configuration_Colon_0: diag(18000, DiagnosticCategory.Error, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"), - The_files_list_in_config_file_0_is_empty: diag(18002, DiagnosticCategory.Error, "The_files_list_in_config_file_0_is_empty_18002", "The 'files' list in config file '{0}' is empty."), - No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: diag(18003, DiagnosticCategory.Error, "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."), - File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module: diag(80001, DiagnosticCategory.Suggestion, "File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001", "File is a CommonJS module; it may be converted to an ES module."), - This_constructor_function_may_be_converted_to_a_class_declaration: diag(80002, DiagnosticCategory.Suggestion, "This_constructor_function_may_be_converted_to_a_class_declaration_80002", "This constructor function may be converted to a class declaration."), - Import_may_be_converted_to_a_default_import: diag(80003, DiagnosticCategory.Suggestion, "Import_may_be_converted_to_a_default_import_80003", "Import may be converted to a default import."), - JSDoc_types_may_be_moved_to_TypeScript_types: diag(80004, DiagnosticCategory.Suggestion, "JSDoc_types_may_be_moved_to_TypeScript_types_80004", "JSDoc types may be moved to TypeScript types."), - require_call_may_be_converted_to_an_import: diag(80005, DiagnosticCategory.Suggestion, "require_call_may_be_converted_to_an_import_80005", "'require' call may be converted to an import."), - This_may_be_converted_to_an_async_function: diag(80006, DiagnosticCategory.Suggestion, "This_may_be_converted_to_an_async_function_80006", "This may be converted to an async function."), - await_has_no_effect_on_the_type_of_this_expression: diag(80007, DiagnosticCategory.Suggestion, "await_has_no_effect_on_the_type_of_this_expression_80007", "'await' has no effect on the type of this expression."), - Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers: diag(80008, DiagnosticCategory.Suggestion, "Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accur_80008", "Numeric literals with absolute values equal to 2^53 or greater are too large to be represented accurately as integers."), - Add_missing_super_call: diag(90001, DiagnosticCategory.Message, "Add_missing_super_call_90001", "Add missing 'super()' call"), - Make_super_call_the_first_statement_in_the_constructor: diag(90002, DiagnosticCategory.Message, "Make_super_call_the_first_statement_in_the_constructor_90002", "Make 'super()' call the first statement in the constructor"), - Change_extends_to_implements: diag(90003, DiagnosticCategory.Message, "Change_extends_to_implements_90003", "Change 'extends' to 'implements'"), - Remove_unused_declaration_for_Colon_0: diag(90004, DiagnosticCategory.Message, "Remove_unused_declaration_for_Colon_0_90004", "Remove unused declaration for: '{0}'"), - Remove_import_from_0: diag(90005, DiagnosticCategory.Message, "Remove_import_from_0_90005", "Remove import from '{0}'"), - Implement_interface_0: diag(90006, DiagnosticCategory.Message, "Implement_interface_0_90006", "Implement interface '{0}'"), - Implement_inherited_abstract_class: diag(90007, DiagnosticCategory.Message, "Implement_inherited_abstract_class_90007", "Implement inherited abstract class"), - Add_0_to_unresolved_variable: diag(90008, DiagnosticCategory.Message, "Add_0_to_unresolved_variable_90008", "Add '{0}.' to unresolved variable"), - Remove_variable_statement: diag(90010, DiagnosticCategory.Message, "Remove_variable_statement_90010", "Remove variable statement"), - Remove_template_tag: diag(90011, DiagnosticCategory.Message, "Remove_template_tag_90011", "Remove template tag"), - Remove_type_parameters: diag(90012, DiagnosticCategory.Message, "Remove_type_parameters_90012", "Remove type parameters"), - Import_0_from_1: diag(90013, DiagnosticCategory.Message, "Import_0_from_1_90013", "Import '{0}' from \"{1}\""), - Change_0_to_1: diag(90014, DiagnosticCategory.Message, "Change_0_to_1_90014", "Change '{0}' to '{1}'"), - Declare_property_0: diag(90016, DiagnosticCategory.Message, "Declare_property_0_90016", "Declare property '{0}'"), - Add_index_signature_for_property_0: diag(90017, DiagnosticCategory.Message, "Add_index_signature_for_property_0_90017", "Add index signature for property '{0}'"), - Disable_checking_for_this_file: diag(90018, DiagnosticCategory.Message, "Disable_checking_for_this_file_90018", "Disable checking for this file"), - Ignore_this_error_message: diag(90019, DiagnosticCategory.Message, "Ignore_this_error_message_90019", "Ignore this error message"), - Initialize_property_0_in_the_constructor: diag(90020, DiagnosticCategory.Message, "Initialize_property_0_in_the_constructor_90020", "Initialize property '{0}' in the constructor"), - Initialize_static_property_0: diag(90021, DiagnosticCategory.Message, "Initialize_static_property_0_90021", "Initialize static property '{0}'"), - Change_spelling_to_0: diag(90022, DiagnosticCategory.Message, "Change_spelling_to_0_90022", "Change spelling to '{0}'"), - Declare_method_0: diag(90023, DiagnosticCategory.Message, "Declare_method_0_90023", "Declare method '{0}'"), - Declare_static_method_0: diag(90024, DiagnosticCategory.Message, "Declare_static_method_0_90024", "Declare static method '{0}'"), - Prefix_0_with_an_underscore: diag(90025, DiagnosticCategory.Message, "Prefix_0_with_an_underscore_90025", "Prefix '{0}' with an underscore"), - Rewrite_as_the_indexed_access_type_0: diag(90026, DiagnosticCategory.Message, "Rewrite_as_the_indexed_access_type_0_90026", "Rewrite as the indexed access type '{0}'"), - Declare_static_property_0: diag(90027, DiagnosticCategory.Message, "Declare_static_property_0_90027", "Declare static property '{0}'"), - Call_decorator_expression: diag(90028, DiagnosticCategory.Message, "Call_decorator_expression_90028", "Call decorator expression"), - Add_async_modifier_to_containing_function: diag(90029, DiagnosticCategory.Message, "Add_async_modifier_to_containing_function_90029", "Add async modifier to containing function"), - Replace_infer_0_with_unknown: diag(90030, DiagnosticCategory.Message, "Replace_infer_0_with_unknown_90030", "Replace 'infer {0}' with 'unknown'"), - Replace_all_unused_infer_with_unknown: diag(90031, DiagnosticCategory.Message, "Replace_all_unused_infer_with_unknown_90031", "Replace all unused 'infer' with 'unknown'"), - Add_parameter_name: diag(90034, DiagnosticCategory.Message, "Add_parameter_name_90034", "Add parameter name"), - Declare_private_property_0: diag(90035, DiagnosticCategory.Message, "Declare_private_property_0_90035", "Declare private property '{0}'"), - Replace_0_with_Promise_1: diag(90036, DiagnosticCategory.Message, "Replace_0_with_Promise_1_90036", "Replace '{0}' with 'Promise<{1}>'"), - Fix_all_incorrect_return_type_of_an_async_functions: diag(90037, DiagnosticCategory.Message, "Fix_all_incorrect_return_type_of_an_async_functions_90037", "Fix all incorrect return type of an async functions"), - Declare_private_method_0: diag(90038, DiagnosticCategory.Message, "Declare_private_method_0_90038", "Declare private method '{0}'"), - Remove_unused_destructuring_declaration: diag(90039, DiagnosticCategory.Message, "Remove_unused_destructuring_declaration_90039", "Remove unused destructuring declaration"), - Remove_unused_declarations_for_Colon_0: diag(90041, DiagnosticCategory.Message, "Remove_unused_declarations_for_Colon_0_90041", "Remove unused declarations for: '{0}'"), - Declare_a_private_field_named_0: diag(90053, DiagnosticCategory.Message, "Declare_a_private_field_named_0_90053", "Declare a private field named '{0}'."), - Includes_imports_of_types_referenced_by_0: diag(90054, DiagnosticCategory.Message, "Includes_imports_of_types_referenced_by_0_90054", "Includes imports of types referenced by '{0}'"), - Remove_type_from_import_declaration_from_0: diag(90055, DiagnosticCategory.Message, "Remove_type_from_import_declaration_from_0_90055", "Remove 'type' from import declaration from \"{0}\""), - Remove_type_from_import_of_0_from_1: diag(90056, DiagnosticCategory.Message, "Remove_type_from_import_of_0_from_1_90056", "Remove 'type' from import of '{0}' from \"{1}\""), - Add_import_from_0: diag(90057, DiagnosticCategory.Message, "Add_import_from_0_90057", "Add import from \"{0}\""), - Update_import_from_0: diag(90058, DiagnosticCategory.Message, "Update_import_from_0_90058", "Update import from \"{0}\""), - Export_0_from_module_1: diag(90059, DiagnosticCategory.Message, "Export_0_from_module_1_90059", "Export '{0}' from module '{1}'"), - Export_all_referenced_locals: diag(90060, DiagnosticCategory.Message, "Export_all_referenced_locals_90060", "Export all referenced locals"), - Convert_function_to_an_ES2015_class: diag(95001, DiagnosticCategory.Message, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"), - Convert_0_to_1_in_0: diag(95003, DiagnosticCategory.Message, "Convert_0_to_1_in_0_95003", "Convert '{0}' to '{1} in {0}'"), - Extract_to_0_in_1: diag(95004, DiagnosticCategory.Message, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"), - Extract_function: diag(95005, DiagnosticCategory.Message, "Extract_function_95005", "Extract function"), - Extract_constant: diag(95006, DiagnosticCategory.Message, "Extract_constant_95006", "Extract constant"), - Extract_to_0_in_enclosing_scope: diag(95007, DiagnosticCategory.Message, "Extract_to_0_in_enclosing_scope_95007", "Extract to {0} in enclosing scope"), - Extract_to_0_in_1_scope: diag(95008, DiagnosticCategory.Message, "Extract_to_0_in_1_scope_95008", "Extract to {0} in {1} scope"), - Annotate_with_type_from_JSDoc: diag(95009, DiagnosticCategory.Message, "Annotate_with_type_from_JSDoc_95009", "Annotate with type from JSDoc"), - Infer_type_of_0_from_usage: diag(95011, DiagnosticCategory.Message, "Infer_type_of_0_from_usage_95011", "Infer type of '{0}' from usage"), - Infer_parameter_types_from_usage: diag(95012, DiagnosticCategory.Message, "Infer_parameter_types_from_usage_95012", "Infer parameter types from usage"), - Convert_to_default_import: diag(95013, DiagnosticCategory.Message, "Convert_to_default_import_95013", "Convert to default import"), - Install_0: diag(95014, DiagnosticCategory.Message, "Install_0_95014", "Install '{0}'"), - Replace_import_with_0: diag(95015, DiagnosticCategory.Message, "Replace_import_with_0_95015", "Replace import with '{0}'."), - Use_synthetic_default_member: diag(95016, DiagnosticCategory.Message, "Use_synthetic_default_member_95016", "Use synthetic 'default' member."), - Convert_to_ES_module: diag(95017, DiagnosticCategory.Message, "Convert_to_ES_module_95017", "Convert to ES module"), - Add_undefined_type_to_property_0: diag(95018, DiagnosticCategory.Message, "Add_undefined_type_to_property_0_95018", "Add 'undefined' type to property '{0}'"), - Add_initializer_to_property_0: diag(95019, DiagnosticCategory.Message, "Add_initializer_to_property_0_95019", "Add initializer to property '{0}'"), - Add_definite_assignment_assertion_to_property_0: diag(95020, DiagnosticCategory.Message, "Add_definite_assignment_assertion_to_property_0_95020", "Add definite assignment assertion to property '{0}'"), - Convert_all_type_literals_to_mapped_type: diag(95021, DiagnosticCategory.Message, "Convert_all_type_literals_to_mapped_type_95021", "Convert all type literals to mapped type"), - Add_all_missing_members: diag(95022, DiagnosticCategory.Message, "Add_all_missing_members_95022", "Add all missing members"), - Infer_all_types_from_usage: diag(95023, DiagnosticCategory.Message, "Infer_all_types_from_usage_95023", "Infer all types from usage"), - Delete_all_unused_declarations: diag(95024, DiagnosticCategory.Message, "Delete_all_unused_declarations_95024", "Delete all unused declarations"), - Prefix_all_unused_declarations_with_where_possible: diag(95025, DiagnosticCategory.Message, "Prefix_all_unused_declarations_with_where_possible_95025", "Prefix all unused declarations with '_' where possible"), - Fix_all_detected_spelling_errors: diag(95026, DiagnosticCategory.Message, "Fix_all_detected_spelling_errors_95026", "Fix all detected spelling errors"), - Add_initializers_to_all_uninitialized_properties: diag(95027, DiagnosticCategory.Message, "Add_initializers_to_all_uninitialized_properties_95027", "Add initializers to all uninitialized properties"), - Add_definite_assignment_assertions_to_all_uninitialized_properties: diag(95028, DiagnosticCategory.Message, "Add_definite_assignment_assertions_to_all_uninitialized_properties_95028", "Add definite assignment assertions to all uninitialized properties"), - Add_undefined_type_to_all_uninitialized_properties: diag(95029, DiagnosticCategory.Message, "Add_undefined_type_to_all_uninitialized_properties_95029", "Add undefined type to all uninitialized properties"), - Change_all_jsdoc_style_types_to_TypeScript: diag(95030, DiagnosticCategory.Message, "Change_all_jsdoc_style_types_to_TypeScript_95030", "Change all jsdoc-style types to TypeScript"), - Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types: diag(95031, DiagnosticCategory.Message, "Change_all_jsdoc_style_types_to_TypeScript_and_add_undefined_to_nullable_types_95031", "Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)"), - Implement_all_unimplemented_interfaces: diag(95032, DiagnosticCategory.Message, "Implement_all_unimplemented_interfaces_95032", "Implement all unimplemented interfaces"), - Install_all_missing_types_packages: diag(95033, DiagnosticCategory.Message, "Install_all_missing_types_packages_95033", "Install all missing types packages"), - Rewrite_all_as_indexed_access_types: diag(95034, DiagnosticCategory.Message, "Rewrite_all_as_indexed_access_types_95034", "Rewrite all as indexed access types"), - Convert_all_to_default_imports: diag(95035, DiagnosticCategory.Message, "Convert_all_to_default_imports_95035", "Convert all to default imports"), - Make_all_super_calls_the_first_statement_in_their_constructor: diag(95036, DiagnosticCategory.Message, "Make_all_super_calls_the_first_statement_in_their_constructor_95036", "Make all 'super()' calls the first statement in their constructor"), - Add_qualifier_to_all_unresolved_variables_matching_a_member_name: diag(95037, DiagnosticCategory.Message, "Add_qualifier_to_all_unresolved_variables_matching_a_member_name_95037", "Add qualifier to all unresolved variables matching a member name"), - Change_all_extended_interfaces_to_implements: diag(95038, DiagnosticCategory.Message, "Change_all_extended_interfaces_to_implements_95038", "Change all extended interfaces to 'implements'"), - Add_all_missing_super_calls: diag(95039, DiagnosticCategory.Message, "Add_all_missing_super_calls_95039", "Add all missing super calls"), - Implement_all_inherited_abstract_classes: diag(95040, DiagnosticCategory.Message, "Implement_all_inherited_abstract_classes_95040", "Implement all inherited abstract classes"), - Add_all_missing_async_modifiers: diag(95041, DiagnosticCategory.Message, "Add_all_missing_async_modifiers_95041", "Add all missing 'async' modifiers"), - Add_ts_ignore_to_all_error_messages: diag(95042, DiagnosticCategory.Message, "Add_ts_ignore_to_all_error_messages_95042", "Add '@ts-ignore' to all error messages"), - Annotate_everything_with_types_from_JSDoc: diag(95043, DiagnosticCategory.Message, "Annotate_everything_with_types_from_JSDoc_95043", "Annotate everything with types from JSDoc"), - Add_to_all_uncalled_decorators: diag(95044, DiagnosticCategory.Message, "Add_to_all_uncalled_decorators_95044", "Add '()' to all uncalled decorators"), - Convert_all_constructor_functions_to_classes: diag(95045, DiagnosticCategory.Message, "Convert_all_constructor_functions_to_classes_95045", "Convert all constructor functions to classes"), - Generate_get_and_set_accessors: diag(95046, DiagnosticCategory.Message, "Generate_get_and_set_accessors_95046", "Generate 'get' and 'set' accessors"), - Convert_require_to_import: diag(95047, DiagnosticCategory.Message, "Convert_require_to_import_95047", "Convert 'require' to 'import'"), - Convert_all_require_to_import: diag(95048, DiagnosticCategory.Message, "Convert_all_require_to_import_95048", "Convert all 'require' to 'import'"), - Move_to_a_new_file: diag(95049, DiagnosticCategory.Message, "Move_to_a_new_file_95049", "Move to a new file"), - Remove_unreachable_code: diag(95050, DiagnosticCategory.Message, "Remove_unreachable_code_95050", "Remove unreachable code"), - Remove_all_unreachable_code: diag(95051, DiagnosticCategory.Message, "Remove_all_unreachable_code_95051", "Remove all unreachable code"), - Add_missing_typeof: diag(95052, DiagnosticCategory.Message, "Add_missing_typeof_95052", "Add missing 'typeof'"), - Remove_unused_label: diag(95053, DiagnosticCategory.Message, "Remove_unused_label_95053", "Remove unused label"), - Remove_all_unused_labels: diag(95054, DiagnosticCategory.Message, "Remove_all_unused_labels_95054", "Remove all unused labels"), - Convert_0_to_mapped_object_type: diag(95055, DiagnosticCategory.Message, "Convert_0_to_mapped_object_type_95055", "Convert '{0}' to mapped object type"), - Convert_namespace_import_to_named_imports: diag(95056, DiagnosticCategory.Message, "Convert_namespace_import_to_named_imports_95056", "Convert namespace import to named imports"), - Convert_named_imports_to_namespace_import: diag(95057, DiagnosticCategory.Message, "Convert_named_imports_to_namespace_import_95057", "Convert named imports to namespace import"), - Add_or_remove_braces_in_an_arrow_function: diag(95058, DiagnosticCategory.Message, "Add_or_remove_braces_in_an_arrow_function_95058", "Add or remove braces in an arrow function"), - Add_braces_to_arrow_function: diag(95059, DiagnosticCategory.Message, "Add_braces_to_arrow_function_95059", "Add braces to arrow function"), - Remove_braces_from_arrow_function: diag(95060, DiagnosticCategory.Message, "Remove_braces_from_arrow_function_95060", "Remove braces from arrow function"), - Convert_default_export_to_named_export: diag(95061, DiagnosticCategory.Message, "Convert_default_export_to_named_export_95061", "Convert default export to named export"), - Convert_named_export_to_default_export: diag(95062, DiagnosticCategory.Message, "Convert_named_export_to_default_export_95062", "Convert named export to default export"), - Add_missing_enum_member_0: diag(95063, DiagnosticCategory.Message, "Add_missing_enum_member_0_95063", "Add missing enum member '{0}'"), - Add_all_missing_imports: diag(95064, DiagnosticCategory.Message, "Add_all_missing_imports_95064", "Add all missing imports"), - Convert_to_async_function: diag(95065, DiagnosticCategory.Message, "Convert_to_async_function_95065", "Convert to async function"), - Convert_all_to_async_functions: diag(95066, DiagnosticCategory.Message, "Convert_all_to_async_functions_95066", "Convert all to async functions"), - Add_missing_call_parentheses: diag(95067, DiagnosticCategory.Message, "Add_missing_call_parentheses_95067", "Add missing call parentheses"), - Add_all_missing_call_parentheses: diag(95068, DiagnosticCategory.Message, "Add_all_missing_call_parentheses_95068", "Add all missing call parentheses"), - Add_unknown_conversion_for_non_overlapping_types: diag(95069, DiagnosticCategory.Message, "Add_unknown_conversion_for_non_overlapping_types_95069", "Add 'unknown' conversion for non-overlapping types"), - Add_unknown_to_all_conversions_of_non_overlapping_types: diag(95070, DiagnosticCategory.Message, "Add_unknown_to_all_conversions_of_non_overlapping_types_95070", "Add 'unknown' to all conversions of non-overlapping types"), - Add_missing_new_operator_to_call: diag(95071, DiagnosticCategory.Message, "Add_missing_new_operator_to_call_95071", "Add missing 'new' operator to call"), - Add_missing_new_operator_to_all_calls: diag(95072, DiagnosticCategory.Message, "Add_missing_new_operator_to_all_calls_95072", "Add missing 'new' operator to all calls"), - Add_names_to_all_parameters_without_names: diag(95073, DiagnosticCategory.Message, "Add_names_to_all_parameters_without_names_95073", "Add names to all parameters without names"), - Enable_the_experimentalDecorators_option_in_your_configuration_file: diag(95074, DiagnosticCategory.Message, "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074", "Enable the 'experimentalDecorators' option in your configuration file"), - Convert_parameters_to_destructured_object: diag(95075, DiagnosticCategory.Message, "Convert_parameters_to_destructured_object_95075", "Convert parameters to destructured object"), - Extract_type: diag(95077, DiagnosticCategory.Message, "Extract_type_95077", "Extract type"), - Extract_to_type_alias: diag(95078, DiagnosticCategory.Message, "Extract_to_type_alias_95078", "Extract to type alias"), - Extract_to_typedef: diag(95079, DiagnosticCategory.Message, "Extract_to_typedef_95079", "Extract to typedef"), - Infer_this_type_of_0_from_usage: diag(95080, DiagnosticCategory.Message, "Infer_this_type_of_0_from_usage_95080", "Infer 'this' type of '{0}' from usage"), - Add_const_to_unresolved_variable: diag(95081, DiagnosticCategory.Message, "Add_const_to_unresolved_variable_95081", "Add 'const' to unresolved variable"), - Add_const_to_all_unresolved_variables: diag(95082, DiagnosticCategory.Message, "Add_const_to_all_unresolved_variables_95082", "Add 'const' to all unresolved variables"), - Add_await: diag(95083, DiagnosticCategory.Message, "Add_await_95083", "Add 'await'"), - Add_await_to_initializer_for_0: diag(95084, DiagnosticCategory.Message, "Add_await_to_initializer_for_0_95084", "Add 'await' to initializer for '{0}'"), - Fix_all_expressions_possibly_missing_await: diag(95085, DiagnosticCategory.Message, "Fix_all_expressions_possibly_missing_await_95085", "Fix all expressions possibly missing 'await'"), - Remove_unnecessary_await: diag(95086, DiagnosticCategory.Message, "Remove_unnecessary_await_95086", "Remove unnecessary 'await'"), - Remove_all_unnecessary_uses_of_await: diag(95087, DiagnosticCategory.Message, "Remove_all_unnecessary_uses_of_await_95087", "Remove all unnecessary uses of 'await'"), - Enable_the_jsx_flag_in_your_configuration_file: diag(95088, DiagnosticCategory.Message, "Enable_the_jsx_flag_in_your_configuration_file_95088", "Enable the '--jsx' flag in your configuration file"), - Add_await_to_initializers: diag(95089, DiagnosticCategory.Message, "Add_await_to_initializers_95089", "Add 'await' to initializers"), - Extract_to_interface: diag(95090, DiagnosticCategory.Message, "Extract_to_interface_95090", "Extract to interface"), - Convert_to_a_bigint_numeric_literal: diag(95091, DiagnosticCategory.Message, "Convert_to_a_bigint_numeric_literal_95091", "Convert to a bigint numeric literal"), - Convert_all_to_bigint_numeric_literals: diag(95092, DiagnosticCategory.Message, "Convert_all_to_bigint_numeric_literals_95092", "Convert all to bigint numeric literals"), - Convert_const_to_let: diag(95093, DiagnosticCategory.Message, "Convert_const_to_let_95093", "Convert 'const' to 'let'"), - Prefix_with_declare: diag(95094, DiagnosticCategory.Message, "Prefix_with_declare_95094", "Prefix with 'declare'"), - Prefix_all_incorrect_property_declarations_with_declare: diag(95095, DiagnosticCategory.Message, "Prefix_all_incorrect_property_declarations_with_declare_95095", "Prefix all incorrect property declarations with 'declare'"), - Convert_to_template_string: diag(95096, DiagnosticCategory.Message, "Convert_to_template_string_95096", "Convert to template string"), - Add_export_to_make_this_file_into_a_module: diag(95097, DiagnosticCategory.Message, "Add_export_to_make_this_file_into_a_module_95097", "Add 'export {}' to make this file into a module"), - Set_the_target_option_in_your_configuration_file_to_0: diag(95098, DiagnosticCategory.Message, "Set_the_target_option_in_your_configuration_file_to_0_95098", "Set the 'target' option in your configuration file to '{0}'"), - Set_the_module_option_in_your_configuration_file_to_0: diag(95099, DiagnosticCategory.Message, "Set_the_module_option_in_your_configuration_file_to_0_95099", "Set the 'module' option in your configuration file to '{0}'"), - Convert_invalid_character_to_its_html_entity_code: diag(95100, DiagnosticCategory.Message, "Convert_invalid_character_to_its_html_entity_code_95100", "Convert invalid character to its html entity code"), - Convert_all_invalid_characters_to_HTML_entity_code: diag(95101, DiagnosticCategory.Message, "Convert_all_invalid_characters_to_HTML_entity_code_95101", "Convert all invalid characters to HTML entity code"), - Convert_all_const_to_let: diag(95102, DiagnosticCategory.Message, "Convert_all_const_to_let_95102", "Convert all 'const' to 'let'"), - Convert_function_expression_0_to_arrow_function: diag(95105, DiagnosticCategory.Message, "Convert_function_expression_0_to_arrow_function_95105", "Convert function expression '{0}' to arrow function"), - Convert_function_declaration_0_to_arrow_function: diag(95106, DiagnosticCategory.Message, "Convert_function_declaration_0_to_arrow_function_95106", "Convert function declaration '{0}' to arrow function"), - Fix_all_implicit_this_errors: diag(95107, DiagnosticCategory.Message, "Fix_all_implicit_this_errors_95107", "Fix all implicit-'this' errors"), - Wrap_invalid_character_in_an_expression_container: diag(95108, DiagnosticCategory.Message, "Wrap_invalid_character_in_an_expression_container_95108", "Wrap invalid character in an expression container"), - Wrap_all_invalid_characters_in_an_expression_container: diag(95109, DiagnosticCategory.Message, "Wrap_all_invalid_characters_in_an_expression_container_95109", "Wrap all invalid characters in an expression container"), - Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file: diag(95110, DiagnosticCategory.Message, "Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_to_read_more_about_this_file_95110", "Visit https://aka.ms/tsconfig to read more about this file"), - Add_a_return_statement: diag(95111, DiagnosticCategory.Message, "Add_a_return_statement_95111", "Add a return statement"), - Remove_braces_from_arrow_function_body: diag(95112, DiagnosticCategory.Message, "Remove_braces_from_arrow_function_body_95112", "Remove braces from arrow function body"), - Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal: diag(95113, DiagnosticCategory.Message, "Wrap_the_following_body_with_parentheses_which_should_be_an_object_literal_95113", "Wrap the following body with parentheses which should be an object literal"), - Add_all_missing_return_statement: diag(95114, DiagnosticCategory.Message, "Add_all_missing_return_statement_95114", "Add all missing return statement"), - Remove_braces_from_all_arrow_function_bodies_with_relevant_issues: diag(95115, DiagnosticCategory.Message, "Remove_braces_from_all_arrow_function_bodies_with_relevant_issues_95115", "Remove braces from all arrow function bodies with relevant issues"), - Wrap_all_object_literal_with_parentheses: diag(95116, DiagnosticCategory.Message, "Wrap_all_object_literal_with_parentheses_95116", "Wrap all object literal with parentheses"), - Move_labeled_tuple_element_modifiers_to_labels: diag(95117, DiagnosticCategory.Message, "Move_labeled_tuple_element_modifiers_to_labels_95117", "Move labeled tuple element modifiers to labels"), - Convert_overload_list_to_single_signature: diag(95118, DiagnosticCategory.Message, "Convert_overload_list_to_single_signature_95118", "Convert overload list to single signature"), - Generate_get_and_set_accessors_for_all_overriding_properties: diag(95119, DiagnosticCategory.Message, "Generate_get_and_set_accessors_for_all_overriding_properties_95119", "Generate 'get' and 'set' accessors for all overriding properties"), - Wrap_in_JSX_fragment: diag(95120, DiagnosticCategory.Message, "Wrap_in_JSX_fragment_95120", "Wrap in JSX fragment"), - Wrap_all_unparented_JSX_in_JSX_fragment: diag(95121, DiagnosticCategory.Message, "Wrap_all_unparented_JSX_in_JSX_fragment_95121", "Wrap all unparented JSX in JSX fragment"), - Convert_arrow_function_or_function_expression: diag(95122, DiagnosticCategory.Message, "Convert_arrow_function_or_function_expression_95122", "Convert arrow function or function expression"), - Convert_to_anonymous_function: diag(95123, DiagnosticCategory.Message, "Convert_to_anonymous_function_95123", "Convert to anonymous function"), - Convert_to_named_function: diag(95124, DiagnosticCategory.Message, "Convert_to_named_function_95124", "Convert to named function"), - Convert_to_arrow_function: diag(95125, DiagnosticCategory.Message, "Convert_to_arrow_function_95125", "Convert to arrow function"), - Remove_parentheses: diag(95126, DiagnosticCategory.Message, "Remove_parentheses_95126", "Remove parentheses"), - Could_not_find_a_containing_arrow_function: diag(95127, DiagnosticCategory.Message, "Could_not_find_a_containing_arrow_function_95127", "Could not find a containing arrow function"), - Containing_function_is_not_an_arrow_function: diag(95128, DiagnosticCategory.Message, "Containing_function_is_not_an_arrow_function_95128", "Containing function is not an arrow function"), - Could_not_find_export_statement: diag(95129, DiagnosticCategory.Message, "Could_not_find_export_statement_95129", "Could not find export statement"), - This_file_already_has_a_default_export: diag(95130, DiagnosticCategory.Message, "This_file_already_has_a_default_export_95130", "This file already has a default export"), - Could_not_find_import_clause: diag(95131, DiagnosticCategory.Message, "Could_not_find_import_clause_95131", "Could not find import clause"), - Could_not_find_namespace_import_or_named_imports: diag(95132, DiagnosticCategory.Message, "Could_not_find_namespace_import_or_named_imports_95132", "Could not find namespace import or named imports"), - Selection_is_not_a_valid_type_node: diag(95133, DiagnosticCategory.Message, "Selection_is_not_a_valid_type_node_95133", "Selection is not a valid type node"), - No_type_could_be_extracted_from_this_type_node: diag(95134, DiagnosticCategory.Message, "No_type_could_be_extracted_from_this_type_node_95134", "No type could be extracted from this type node"), - Could_not_find_property_for_which_to_generate_accessor: diag(95135, DiagnosticCategory.Message, "Could_not_find_property_for_which_to_generate_accessor_95135", "Could not find property for which to generate accessor"), - Name_is_not_valid: diag(95136, DiagnosticCategory.Message, "Name_is_not_valid_95136", "Name is not valid"), - Can_only_convert_property_with_modifier: diag(95137, DiagnosticCategory.Message, "Can_only_convert_property_with_modifier_95137", "Can only convert property with modifier"), - Switch_each_misused_0_to_1: diag(95138, DiagnosticCategory.Message, "Switch_each_misused_0_to_1_95138", "Switch each misused '{0}' to '{1}'"), - Convert_to_optional_chain_expression: diag(95139, DiagnosticCategory.Message, "Convert_to_optional_chain_expression_95139", "Convert to optional chain expression"), - Could_not_find_convertible_access_expression: diag(95140, DiagnosticCategory.Message, "Could_not_find_convertible_access_expression_95140", "Could not find convertible access expression"), - Could_not_find_matching_access_expressions: diag(95141, DiagnosticCategory.Message, "Could_not_find_matching_access_expressions_95141", "Could not find matching access expressions"), - Can_only_convert_logical_AND_access_chains: diag(95142, DiagnosticCategory.Message, "Can_only_convert_logical_AND_access_chains_95142", "Can only convert logical AND access chains"), - Add_void_to_Promise_resolved_without_a_value: diag(95143, DiagnosticCategory.Message, "Add_void_to_Promise_resolved_without_a_value_95143", "Add 'void' to Promise resolved without a value"), - Add_void_to_all_Promises_resolved_without_a_value: diag(95144, DiagnosticCategory.Message, "Add_void_to_all_Promises_resolved_without_a_value_95144", "Add 'void' to all Promises resolved without a value"), - Use_element_access_for_0: diag(95145, DiagnosticCategory.Message, "Use_element_access_for_0_95145", "Use element access for '{0}'"), - Use_element_access_for_all_undeclared_properties: diag(95146, DiagnosticCategory.Message, "Use_element_access_for_all_undeclared_properties_95146", "Use element access for all undeclared properties."), - Delete_all_unused_imports: diag(95147, DiagnosticCategory.Message, "Delete_all_unused_imports_95147", "Delete all unused imports"), - Infer_function_return_type: diag(95148, DiagnosticCategory.Message, "Infer_function_return_type_95148", "Infer function return type"), - Return_type_must_be_inferred_from_a_function: diag(95149, DiagnosticCategory.Message, "Return_type_must_be_inferred_from_a_function_95149", "Return type must be inferred from a function"), - Could_not_determine_function_return_type: diag(95150, DiagnosticCategory.Message, "Could_not_determine_function_return_type_95150", "Could not determine function return type"), - Could_not_convert_to_arrow_function: diag(95151, DiagnosticCategory.Message, "Could_not_convert_to_arrow_function_95151", "Could not convert to arrow function"), - Could_not_convert_to_named_function: diag(95152, DiagnosticCategory.Message, "Could_not_convert_to_named_function_95152", "Could not convert to named function"), - Could_not_convert_to_anonymous_function: diag(95153, DiagnosticCategory.Message, "Could_not_convert_to_anonymous_function_95153", "Could not convert to anonymous function"), - Can_only_convert_string_concatenation: diag(95154, DiagnosticCategory.Message, "Can_only_convert_string_concatenation_95154", "Can only convert string concatenation"), - Selection_is_not_a_valid_statement_or_statements: diag(95155, DiagnosticCategory.Message, "Selection_is_not_a_valid_statement_or_statements_95155", "Selection is not a valid statement or statements"), - Add_missing_function_declaration_0: diag(95156, DiagnosticCategory.Message, "Add_missing_function_declaration_0_95156", "Add missing function declaration '{0}'"), - Add_all_missing_function_declarations: diag(95157, DiagnosticCategory.Message, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"), - Method_not_implemented: diag(95158, DiagnosticCategory.Message, "Method_not_implemented_95158", "Method not implemented."), - Function_not_implemented: diag(95159, DiagnosticCategory.Message, "Function_not_implemented_95159", "Function not implemented."), - Add_override_modifier: diag(95160, DiagnosticCategory.Message, "Add_override_modifier_95160", "Add 'override' modifier"), - Remove_override_modifier: diag(95161, DiagnosticCategory.Message, "Remove_override_modifier_95161", "Remove 'override' modifier"), - Add_all_missing_override_modifiers: diag(95162, DiagnosticCategory.Message, "Add_all_missing_override_modifiers_95162", "Add all missing 'override' modifiers"), - Remove_all_unnecessary_override_modifiers: diag(95163, DiagnosticCategory.Message, "Remove_all_unnecessary_override_modifiers_95163", "Remove all unnecessary 'override' modifiers"), - Can_only_convert_named_export: diag(95164, DiagnosticCategory.Message, "Can_only_convert_named_export_95164", "Can only convert named export"), - Add_missing_properties: diag(95165, DiagnosticCategory.Message, "Add_missing_properties_95165", "Add missing properties"), - Add_all_missing_properties: diag(95166, DiagnosticCategory.Message, "Add_all_missing_properties_95166", "Add all missing properties"), - Add_missing_attributes: diag(95167, DiagnosticCategory.Message, "Add_missing_attributes_95167", "Add missing attributes"), - Add_all_missing_attributes: diag(95168, DiagnosticCategory.Message, "Add_all_missing_attributes_95168", "Add all missing attributes"), - Add_undefined_to_optional_property_type: diag(95169, DiagnosticCategory.Message, "Add_undefined_to_optional_property_type_95169", "Add 'undefined' to optional property type"), - Convert_named_imports_to_default_import: diag(95170, DiagnosticCategory.Message, "Convert_named_imports_to_default_import_95170", "Convert named imports to default import"), - Delete_unused_param_tag_0: diag(95171, DiagnosticCategory.Message, "Delete_unused_param_tag_0_95171", "Delete unused '@param' tag '{0}'"), - Delete_all_unused_param_tags: diag(95172, DiagnosticCategory.Message, "Delete_all_unused_param_tags_95172", "Delete all unused '@param' tags"), - Rename_param_tag_name_0_to_1: diag(95173, DiagnosticCategory.Message, "Rename_param_tag_name_0_to_1_95173", "Rename '@param' tag name '{0}' to '{1}'"), - Use_0: diag(95174, DiagnosticCategory.Message, "Use_0_95174", "Use `{0}`."), - Use_Number_isNaN_in_all_conditions: diag(95175, DiagnosticCategory.Message, "Use_Number_isNaN_in_all_conditions_95175", "Use `Number.isNaN` in all conditions."), - No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, DiagnosticCategory.Error, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."), - Classes_may_not_have_a_field_named_constructor: diag(18006, DiagnosticCategory.Error, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."), - JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, DiagnosticCategory.Error, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"), - Private_identifiers_cannot_be_used_as_parameters: diag(18009, DiagnosticCategory.Error, "Private_identifiers_cannot_be_used_as_parameters_18009", "Private identifiers cannot be used as parameters."), - An_accessibility_modifier_cannot_be_used_with_a_private_identifier: diag(18010, DiagnosticCategory.Error, "An_accessibility_modifier_cannot_be_used_with_a_private_identifier_18010", "An accessibility modifier cannot be used with a private identifier."), - The_operand_of_a_delete_operator_cannot_be_a_private_identifier: diag(18011, DiagnosticCategory.Error, "The_operand_of_a_delete_operator_cannot_be_a_private_identifier_18011", "The operand of a 'delete' operator cannot be a private identifier."), - constructor_is_a_reserved_word: diag(18012, DiagnosticCategory.Error, "constructor_is_a_reserved_word_18012", "'#constructor' is a reserved word."), - Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier: diag(18013, DiagnosticCategory.Error, "Property_0_is_not_accessible_outside_class_1_because_it_has_a_private_identifier_18013", "Property '{0}' is not accessible outside class '{1}' because it has a private identifier."), - The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_private_identifier_with_the_same_spelling: diag(18014, DiagnosticCategory.Error, "The_property_0_cannot_be_accessed_on_type_1_within_this_class_because_it_is_shadowed_by_another_priv_18014", "The property '{0}' cannot be accessed on type '{1}' within this class because it is shadowed by another private identifier with the same spelling."), - Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2: diag(18015, DiagnosticCategory.Error, "Property_0_in_type_1_refers_to_a_different_member_that_cannot_be_accessed_from_within_type_2_18015", "Property '{0}' in type '{1}' refers to a different member that cannot be accessed from within type '{2}'."), - Private_identifiers_are_not_allowed_outside_class_bodies: diag(18016, DiagnosticCategory.Error, "Private_identifiers_are_not_allowed_outside_class_bodies_18016", "Private identifiers are not allowed outside class bodies."), - The_shadowing_declaration_of_0_is_defined_here: diag(18017, DiagnosticCategory.Error, "The_shadowing_declaration_of_0_is_defined_here_18017", "The shadowing declaration of '{0}' is defined here"), - The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here: diag(18018, DiagnosticCategory.Error, "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018", "The declaration of '{0}' that you probably intended to use is defined here"), - _0_modifier_cannot_be_used_with_a_private_identifier: diag(18019, DiagnosticCategory.Error, "_0_modifier_cannot_be_used_with_a_private_identifier_18019", "'{0}' modifier cannot be used with a private identifier."), - An_enum_member_cannot_be_named_with_a_private_identifier: diag(18024, DiagnosticCategory.Error, "An_enum_member_cannot_be_named_with_a_private_identifier_18024", "An enum member cannot be named with a private identifier."), - can_only_be_used_at_the_start_of_a_file: diag(18026, DiagnosticCategory.Error, "can_only_be_used_at_the_start_of_a_file_18026", "'#!' can only be used at the start of a file."), - Compiler_reserves_name_0_when_emitting_private_identifier_downlevel: diag(18027, DiagnosticCategory.Error, "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027", "Compiler reserves name '{0}' when emitting private identifier downlevel."), - Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher: diag(18028, DiagnosticCategory.Error, "Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher_18028", "Private identifiers are only available when targeting ECMAScript 2015 and higher."), - Private_identifiers_are_not_allowed_in_variable_declarations: diag(18029, DiagnosticCategory.Error, "Private_identifiers_are_not_allowed_in_variable_declarations_18029", "Private identifiers are not allowed in variable declarations."), - An_optional_chain_cannot_contain_private_identifiers: diag(18030, DiagnosticCategory.Error, "An_optional_chain_cannot_contain_private_identifiers_18030", "An optional chain cannot contain private identifiers."), - The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents: diag(18031, DiagnosticCategory.Error, "The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituent_18031", "The intersection '{0}' was reduced to 'never' because property '{1}' has conflicting types in some constituents."), - The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_private_in_some: diag(18032, DiagnosticCategory.Error, "The_intersection_0_was_reduced_to_never_because_property_1_exists_in_multiple_constituents_and_is_pr_18032", "The intersection '{0}' was reduced to 'never' because property '{1}' exists in multiple constituents and is private in some."), - Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values: diag(18033, DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_as_required_for_computed_enum_member_values_18033", "Type '{0}' is not assignable to type '{1}' as required for computed enum member values."), - Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment: diag(18034, DiagnosticCategory.Message, "Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034", "Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."), - Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name: diag(18035, DiagnosticCategory.Error, "Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035", "Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."), - Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator: diag(18036, DiagnosticCategory.Error, "Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036", "Class decorators can't be used with static private identifier. Consider removing the experimental decorator."), - Await_expression_cannot_be_used_inside_a_class_static_block: diag(18037, DiagnosticCategory.Error, "Await_expression_cannot_be_used_inside_a_class_static_block_18037", "Await expression cannot be used inside a class static block."), - For_await_loops_cannot_be_used_inside_a_class_static_block: diag(18038, DiagnosticCategory.Error, "For_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'For await' loops cannot be used inside a class static block."), - Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block: diag(18039, DiagnosticCategory.Error, "Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039", "Invalid use of '{0}'. It cannot be used inside a class static block."), - A_return_statement_cannot_be_used_inside_a_class_static_block: diag(18041, DiagnosticCategory.Error, "A_return_statement_cannot_be_used_inside_a_class_static_block_18041", "A 'return' statement cannot be used inside a class static block."), - _0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation: diag(18042, DiagnosticCategory.Error, "_0_is_a_type_and_cannot_be_imported_in_JavaScript_files_Use_1_in_a_JSDoc_type_annotation_18042", "'{0}' is a type and cannot be imported in JavaScript files. Use '{1}' in a JSDoc type annotation."), - Types_cannot_appear_in_export_declarations_in_JavaScript_files: diag(18043, DiagnosticCategory.Error, "Types_cannot_appear_in_export_declarations_in_JavaScript_files_18043", "Types cannot appear in export declarations in JavaScript files."), - _0_is_automatically_exported_here: diag(18044, DiagnosticCategory.Message, "_0_is_automatically_exported_here_18044", "'{0}' is automatically exported here."), - Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher: diag(18045, DiagnosticCategory.Error, "Properties_with_the_accessor_modifier_are_only_available_when_targeting_ECMAScript_2015_and_higher_18045", "Properties with the 'accessor' modifier are only available when targeting ECMAScript 2015 and higher."), - _0_is_of_type_unknown: diag(18046, DiagnosticCategory.Error, "_0_is_of_type_unknown_18046", "'{0}' is of type 'unknown'."), - _0_is_possibly_null: diag(18047, DiagnosticCategory.Error, "_0_is_possibly_null_18047", "'{0}' is possibly 'null'."), - _0_is_possibly_undefined: diag(18048, DiagnosticCategory.Error, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."), - _0_is_possibly_null_or_undefined: diag(18049, DiagnosticCategory.Error, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."), - The_value_0_cannot_be_used_here: diag(18050, DiagnosticCategory.Error, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."), -}; \ No newline at end of file diff --git a/external-declarations/src/test-runner/tsc-infrastructure/fakesHosts.ts b/external-declarations/src/test-runner/tsc-infrastructure/fakesHosts.ts deleted file mode 100644 index 9ed2adec6e71e..0000000000000 --- a/external-declarations/src/test-runner/tsc-infrastructure/fakesHosts.ts +++ /dev/null @@ -1,415 +0,0 @@ -import * as ts from "typescript"; - -import { - getNewLineCharacter, -} from "../../compiler/utils"; -import * as collections from "./collections"; -import { - Utils, -} from "./compiler-run"; -import * as documents from "./test-document"; -import * as vfs from "./vfs"; -import * as vpath from "./vpath"; - -/** - * Fake implementations of various compiler dependencies. - */ - -const processExitSentinel = new Error("System exit"); - -export interface SystemOptions { - executingFilePath?: string; - newLine?: "\r\n" | "\n"; - env?: Record; -} - -/** - * A fake `ts.System` that leverages a virtual file system. - */ -export class System implements ts.System { - public readonly vfs: vfs.FileSystem; - public readonly args: string[] = []; - public readonly output: string[] = []; - public readonly newLine: string; - public readonly useCaseSensitiveFileNames: boolean; - public exitCode: number | undefined; - - private readonly _executingFilePath: string | undefined; - private readonly _env: Record | undefined; - - constructor(vfs: vfs.FileSystem, { executingFilePath, newLine = "\r\n", env }: SystemOptions = {}) { - this.vfs = vfs.isReadonly ? vfs.shadow() : vfs; - this.useCaseSensitiveFileNames = !this.vfs.ignoreCase; - this.newLine = newLine; - this._executingFilePath = executingFilePath; - this._env = env; - } - - private testTerminalWidth = Number.parseInt(this.getEnvironmentVariable("TS_TEST_TERMINAL_WIDTH")); - getWidthOfTerminal = Number.isNaN(this.testTerminalWidth) ? undefined : () => this.testTerminalWidth; - - // Pretty output - writeOutputIsTTY() { - return true; - } - - public write(message: string) { - console.log(message); - this.output.push(message); - } - - public readFile(path: string) { - try { - const content = this.vfs.readFileSync(path, "utf8"); - return content === undefined ? undefined : Utils.removeByteOrderMark(content); - } - catch { - return undefined; - } - } - - public writeFile(path: string, data: string, writeByteOrderMark?: boolean): void { - this.vfs.mkdirpSync(vpath.dirname(path)); - this.vfs.writeFileSync(path, writeByteOrderMark ? Utils.addUTF8ByteOrderMark(data) : data); - } - - public deleteFile(path: string) { - this.vfs.unlinkSync(path); - } - - public fileExists(path: string) { - const stats = this._getStats(path); - return stats ? stats.isFile() : false; - } - - public directoryExists(path: string) { - const stats = this._getStats(path); - return stats ? stats.isDirectory() : false; - } - - public createDirectory(path: string): void { - this.vfs.mkdirpSync(path); - } - - public getCurrentDirectory() { - return this.vfs.cwd(); - } - - public getDirectories(path: string) { - const result: string[] = []; - try { - for (const file of this.vfs.readdirSync(path)) { - if (this.vfs.statSync(vpath.combine(path, file)).isDirectory()) { - result.push(file); - } - } - } - catch { /*ignore*/ } - return result; - } - - public readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[] { - throw new Error("Not implemented"); - // return matchFiles(path, extensions, exclude, include, this.useCaseSensitiveFileNames, this.getCurrentDirectory(), depth, path => this.getAccessibleFileSystemEntries(path), path => this.realpath(path)); - } - - public getAccessibleFileSystemEntries(path: string): vfs.FileSystemEntries { - const files: string[] = []; - const directories: string[] = []; - try { - for (const file of this.vfs.readdirSync(path)) { - try { - const stats = this.vfs.statSync(vpath.combine(path, file)); - if (stats.isFile()) { - files.push(file); - } - else if (stats.isDirectory()) { - directories.push(file); - } - } - catch { /*ignored*/ } - } - } - catch { /*ignored*/ } - return { files, directories }; - } - - public exit(exitCode?: number) { - this.exitCode = exitCode; - throw processExitSentinel; - } - - public getFileSize(path: string) { - const stats = this._getStats(path); - return stats && stats.isFile() ? stats.size : 0; - } - - public resolvePath(path: string) { - return vpath.resolve(this.vfs.cwd(), path); - } - - public getExecutingFilePath() { - if (this._executingFilePath === undefined) throw new Error("ts.notImplemented"); - return this._executingFilePath; - } - - public getModifiedTime(path: string) { - const stats = this._getStats(path); - return stats ? stats.mtime : undefined!; // TODO: GH#18217 - } - - public setModifiedTime(path: string, time: Date) { - this.vfs.utimesSync(path, time, time); - } - - public createHash(data: string): string { - return `${generateDjb2Hash(data)}-${data}`; - } - - public realpath(path: string) { - try { - return this.vfs.realpathSync(path); - } - catch { - return path; - } - } - - public getEnvironmentVariable(name: string): string { - return (this._env && this._env[name])!; // TODO: GH#18217 - } - - private _getStats(path: string) { - try { - return this.vfs.existsSync(path) ? this.vfs.statSync(path) : undefined; - } - catch { - return undefined; - } - } - - now() { - return new Date(this.vfs.time()); - } -} - -/** - * A fake `ts.ParseConfigHost` that leverages a virtual file system. - */ -export class ParseConfigHost implements ts.ParseConfigHost { - public readonly sys: System; - - constructor(sys: System | vfs.FileSystem) { - if (sys instanceof vfs.FileSystem) sys = new System(sys); - this.sys = sys; - } - - public get vfs() { - return this.sys.vfs; - } - - public get useCaseSensitiveFileNames() { - return this.sys.useCaseSensitiveFileNames; - } - - public fileExists(fileName: string): boolean { - return this.sys.fileExists(fileName); - } - - public directoryExists(directoryName: string): boolean { - return this.sys.directoryExists(directoryName); - } - - public readFile(path: string): string | undefined { - return this.sys.readFile(path); - } - - public readDirectory(path: string, extensions: string[], excludes: string[], includes: string[], depth: number): string[] { - return this.sys.readDirectory(path, extensions, excludes, includes, depth); - } -} - -/** - * A fake `ts.CompilerHost` that leverages a virtual file system. - */ -export class CompilerHost implements ts.CompilerHost { - public readonly sys: System; - public readonly defaultLibLocation: string; - public readonly outputs: documents.TextDocument[] = []; - private readonly _outputsMap: collections.SortedMap; - public readonly traces: string[] = []; - public readonly shouldAssertInvariants = false; - - private _setParentNodes: boolean; - private _sourceFiles: collections.SortedMap; - private _parseConfigHost: ParseConfigHost | undefined; - private _newLine: string; - - constructor(sys: System | vfs.FileSystem, options = ts.getDefaultCompilerOptions(), setParentNodes = false) { - if (sys instanceof vfs.FileSystem) sys = new System(sys); - this.sys = sys; - this.defaultLibLocation = sys.vfs.meta.get("defaultLibLocation") || ""; - this._newLine = getNewLineCharacter(options, () => this.sys.newLine); - this._sourceFiles = new collections.SortedMap({ comparer: sys.vfs.stringComparer, sort: "insertion" }); - this._setParentNodes = setParentNodes; - this._outputsMap = new collections.SortedMap(this.vfs.stringComparer); - } - - public get vfs() { - return this.sys.vfs; - } - - public get parseConfigHost() { - return this._parseConfigHost || (this._parseConfigHost = new ParseConfigHost(this.sys)); - } - - public getCurrentDirectory(): string { - return this.sys.getCurrentDirectory(); - } - - public useCaseSensitiveFileNames(): boolean { - return this.sys.useCaseSensitiveFileNames; - } - - public getNewLine(): string { - return this._newLine; - } - - public getCanonicalFileName(fileName: string): string { - return this.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); - } - - public deleteFile(fileName: string) { - this.sys.deleteFile(fileName); - } - - public fileExists(fileName: string): boolean { - return this.sys.fileExists(fileName); - } - - public directoryExists(directoryName: string): boolean { - return this.sys.directoryExists(directoryName); - } - - public getModifiedTime(fileName: string) { - return this.sys.getModifiedTime(fileName); - } - - public setModifiedTime(fileName: string, time: Date) { - return this.sys.setModifiedTime(fileName, time); - } - - public getDirectories(path: string): string[] { - return this.sys.getDirectories(path); - } - - public readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[] { - return this.sys.readDirectory(path, extensions, exclude, include, depth); - } - - public readFile(path: string): string | undefined { - return this.sys.readFile(path); - } - - public writeFile(fileName: string, content: string, writeByteOrderMark: boolean) { - if (writeByteOrderMark) content = Utils.addUTF8ByteOrderMark(content); - this.sys.writeFile(fileName, content); - - const document = new documents.TextDocument(fileName, content); - document.meta.set("fileName", fileName); - this.vfs.filemeta(fileName).set("document", document); - if (!this._outputsMap.has(document.file)) { - this._outputsMap.set(document.file, this.outputs.length); - this.outputs.push(document); - } - this.outputs[this._outputsMap.get(document.file)!] = document; - } - - public trace(s: string): void { - this.traces.push(s); - } - - public realpath(path: string): string { - return this.sys.realpath(path); - } - - public getDefaultLibLocation(): string { - return vpath.resolve(this.getCurrentDirectory(), this.defaultLibLocation); - } - - public getDefaultLibFileName(options: ts.CompilerOptions): string { - return vpath.resolve(this.getDefaultLibLocation(), ts.getDefaultLibFileName(options)); - } - - public getSourceFile(fileName: string, languageVersion: number): ts.SourceFile | undefined { - const canonicalFileName = this.getCanonicalFileName(vpath.resolve(this.getCurrentDirectory(), fileName)); - const existing = this._sourceFiles.get(canonicalFileName); - if (existing) return existing; - - const content = this.readFile(canonicalFileName); - if (content === undefined) return undefined; - - // A virtual file system may shadow another existing virtual file system. This - // allows us to reuse a common virtual file system structure across multiple - // tests. If a virtual file is a shadow, it is likely that the file will be - // reused across multiple tests. In that case, we cache the SourceFile we parse - // so that it can be reused across multiple tests to avoid the cost of - // repeatedly parsing the same file over and over (such as lib.d.ts). - const cacheKey = this.vfs.shadowRoot && `SourceFile[languageVersion=${languageVersion},setParentNodes=${this._setParentNodes}]`; - if (cacheKey) { - const meta = this.vfs.filemeta(canonicalFileName); - const sourceFileFromMetadata = meta.get(cacheKey) as ts.SourceFile | undefined; - if (sourceFileFromMetadata && sourceFileFromMetadata.getFullText() === content) { - this._sourceFiles.set(canonicalFileName, sourceFileFromMetadata); - return sourceFileFromMetadata; - } - } - - const parsed = ts.createSourceFile(fileName, content, languageVersion, this._setParentNodes || this.shouldAssertInvariants); - - this._sourceFiles.set(canonicalFileName, parsed); - - if (cacheKey) { - // store the cached source file on the unshadowed file with the same version. - const stats = this.vfs.statSync(canonicalFileName); - - let fs = this.vfs; - while (fs.shadowRoot) { - try { - const shadowRootStats = fs.shadowRoot.existsSync(canonicalFileName) ? fs.shadowRoot.statSync(canonicalFileName) : undefined!; // TODO: GH#18217 - if ( - shadowRootStats.dev !== stats.dev || - shadowRootStats.ino !== stats.ino || - shadowRootStats.mtimeMs !== stats.mtimeMs - ) { - break; - } - - fs = fs.shadowRoot; - } - catch { - break; - } - } - - if (fs !== this.vfs) { - fs.filemeta(canonicalFileName).set(cacheKey, parsed); - } - } - - return parsed; - } -} -/** - * djb2 hashing algorithm - * http://www.cse.yorku.ca/~oz/hash.html - * - * @internal - */ -export function generateDjb2Hash(data: string): string { - let acc = 5381; - for (let i = 0; i < data.length; i++) { - acc = ((acc << 5) + acc) + data.charCodeAt(i); - } - return acc.toString(); -} diff --git a/external-declarations/src/test-runner/tsc-infrastructure/io.ts b/external-declarations/src/test-runner/tsc-infrastructure/io.ts deleted file mode 100644 index 8e23ded2d7381..0000000000000 --- a/external-declarations/src/test-runner/tsc-infrastructure/io.ts +++ /dev/null @@ -1,172 +0,0 @@ -import { - sys, -} from "typescript"; - -import { - compareStringsCaseInsensitive, - compareStringsCaseSensitive, -} from "../../compiler/lang-utils"; -import { - FileSystemEntries, -} from "./vfs"; -import * as vpath from "./vpath"; - -export interface IO { - newLine(): string; - getCurrentDirectory(): string; - useCaseSensitiveFileNames(): boolean; - resolvePath(path: string): string | undefined; - getFileSize(path: string): number; - readFile(path: string): string | undefined; - writeFile(path: string, contents: string): void; - directoryName(path: string): string | undefined; - getDirectories(path: string): string[]; - createDirectory(path: string): void; - fileExists(fileName: string): boolean; - directoryExists(path: string): boolean; - deleteFile(fileName: string): void; - listFiles(path: string, filter?: RegExp, options?: { recursive?: boolean; }): string[]; - log(text: string): void; - args(): string[]; - getExecutingFilePath(): string; - getWorkspaceRoot(): string; - exit(exitCode?: number): void; - readDirectory(path: string, extension?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): readonly string[]; - getAccessibleFileSystemEntries(dirname: string): FileSystemEntries; - tryEnableSourceMapsForHost?(): void; - getEnvironmentVariable?(name: string): string; - getMemoryUsage?(): number | undefined; - joinPath(...components: string[]): string; -} - -// harness always uses one kind of new line -// But note that `parseTestData` in `fourslash.ts` uses "\n" -const harnessNewLine = "\r\n"; - -function createNodeIO(): IO { - let workspaceRoot = "./node_modules/typescript/"; - let fs: any, pathModule: any; - if (require) { - fs = require("fs"); - pathModule = require("path"); - workspaceRoot = pathModule.resolve(workspaceRoot); - } - else { - fs = pathModule = {}; - } - - function deleteFile(path: string) { - try { - fs.unlinkSync(path); - } - catch { /*ignore*/ } - } - - function directoryName(path: string) { - const dirPath = pathModule.dirname(path); - // Node will just continue to repeat the root path, rather than return null - return dirPath === path ? undefined : dirPath; - } - - function joinPath(...components: string[]) { - return pathModule.join(...components); - } - - function listFiles(path: string, spec: RegExp, options: { recursive?: boolean; } = {}) { - function filesInFolder(folder: string): string[] { - let paths: string[] = []; - - for (const file of fs.readdirSync(folder)) { - const pathToFile = pathModule.join(folder, file); - if (!fs.existsSync(pathToFile)) continue; // ignore invalid symlinks - const stat = fs.statSync(pathToFile); - if (options.recursive && stat.isDirectory()) { - paths = paths.concat(filesInFolder(pathToFile)); - } - else if (stat.isFile() && (!spec || file.match(spec))) { - paths.push(pathToFile); - } - } - - return paths; - } - - return filesInFolder(path); - } - - function getAccessibleFileSystemEntries(dirname: string): FileSystemEntries { - try { - const entries: string[] = fs.readdirSync(dirname || ".").sort(sys.useCaseSensitiveFileNames ? compareStringsCaseSensitive : compareStringsCaseInsensitive); - const files: string[] = []; - const directories: string[] = []; - for (const entry of entries) { - if (entry === "." || entry === "..") continue; - const name = vpath.combine(dirname, entry); - try { - const stat = fs.statSync(name); - if (!stat) continue; - if (stat.isFile()) { - files.push(entry); - } - else if (stat.isDirectory()) { - directories.push(entry); - } - } - catch { /*ignore*/ } - } - return { files, directories }; - } - catch (e) { - return { files: [], directories: [] }; - } - } - - function createDirectory(path: string) { - try { - fs.mkdirSync(path); - } - catch (e) { - if (e.code === "ENOENT") { - createDirectory(vpath.dirname(path)); - createDirectory(path); - } - else if (!sys.directoryExists(path)) { - throw e; - } - } - } - - return { - newLine: () => harnessNewLine, - getCurrentDirectory: () => sys.getCurrentDirectory(), - useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames, - resolvePath: (path: string) => sys.resolvePath(path), - getFileSize: (path: string) => sys.getFileSize!(path), - readFile: path => sys.readFile(path), - writeFile: (path, content) => sys.writeFile(path, content), - directoryName, - getDirectories: path => sys.getDirectories(path), - createDirectory, - fileExists: path => sys.fileExists(path), - directoryExists: path => sys.directoryExists(path), - deleteFile, - listFiles, - log: s => console.log(s), - args: () => sys.args, - getExecutingFilePath: () => sys.getExecutingFilePath(), - getWorkspaceRoot: () => workspaceRoot, - exit: exitCode => sys.exit(exitCode), - readDirectory: (path, extension, exclude, include, depth) => sys.readDirectory(path, extension, exclude, include, depth), - getAccessibleFileSystemEntries, - tryEnableSourceMapsForHost: () => { - throw new Error("Not supported"); - }, - getMemoryUsage: () => sys.getMemoryUsage && sys.getMemoryUsage(), - getEnvironmentVariable(name: string) { - return process.env[name] || ""; - }, - joinPath, - }; -} - -export const IO = createNodeIO(); diff --git a/external-declarations/src/test-runner/tsc-infrastructure/options.ts b/external-declarations/src/test-runner/tsc-infrastructure/options.ts deleted file mode 100644 index 43ac31fe4c433..0000000000000 --- a/external-declarations/src/test-runner/tsc-infrastructure/options.ts +++ /dev/null @@ -1,1487 +0,0 @@ -// Watch related options - -import { - CompilerOptionsValue, - Diagnostic, - DiagnosticMessage, - ImportsNotUsedAsValues, - JsxEmit, - ModuleDetectionKind, - ModuleKind, - ModuleResolutionKind, - NewLineKind, - PollingWatchKind, - ScriptTarget, - WatchDirectoryKind, - WatchFileKind, -} from "typescript"; - -import { - getEntries, - isNullOrUndefined, - mapDefined, - startsWith, - trimString, -} from "../../compiler/lang-utils"; -import { - Diagnostics, -} from "./diagnosticInformationMap.generated"; - -const jsxOptionMap = new Map(getEntries({ - "preserve": JsxEmit.Preserve, - "react-native": JsxEmit.ReactNative, - "react": JsxEmit.React, - "react-jsx": JsxEmit.ReactJSX, - "react-jsxdev": JsxEmit.ReactJSXDev, -})); - -// NOTE: The order here is important to default lib ordering as entries will have the same -// order in the generated program (see `getDefaultLibPriority` in program.ts). This -// order also affects overload resolution when a type declared in one lib is -// augmented in another lib. -const libEntries: [string, string][] = [ - // JavaScript only - ["es5", "lib.es5.d.ts"], - ["es6", "lib.es2015.d.ts"], - ["es2015", "lib.es2015.d.ts"], - ["es7", "lib.es2016.d.ts"], - ["es2016", "lib.es2016.d.ts"], - ["es2017", "lib.es2017.d.ts"], - ["es2018", "lib.es2018.d.ts"], - ["es2019", "lib.es2019.d.ts"], - ["es2020", "lib.es2020.d.ts"], - ["es2021", "lib.es2021.d.ts"], - ["es2022", "lib.es2022.d.ts"], - ["esnext", "lib.esnext.d.ts"], - // Host only - ["dom", "lib.dom.d.ts"], - ["dom.iterable", "lib.dom.iterable.d.ts"], - ["webworker", "lib.webworker.d.ts"], - ["webworker.importscripts", "lib.webworker.importscripts.d.ts"], - ["webworker.iterable", "lib.webworker.iterable.d.ts"], - ["scripthost", "lib.scripthost.d.ts"], - // ES2015 Or ESNext By-feature options - ["es2015.core", "lib.es2015.core.d.ts"], - ["es2015.collection", "lib.es2015.collection.d.ts"], - ["es2015.generator", "lib.es2015.generator.d.ts"], - ["es2015.iterable", "lib.es2015.iterable.d.ts"], - ["es2015.promise", "lib.es2015.promise.d.ts"], - ["es2015.proxy", "lib.es2015.proxy.d.ts"], - ["es2015.reflect", "lib.es2015.reflect.d.ts"], - ["es2015.symbol", "lib.es2015.symbol.d.ts"], - ["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"], - ["es2016.array.include", "lib.es2016.array.include.d.ts"], - ["es2017.object", "lib.es2017.object.d.ts"], - ["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"], - ["es2017.string", "lib.es2017.string.d.ts"], - ["es2017.intl", "lib.es2017.intl.d.ts"], - ["es2017.typedarrays", "lib.es2017.typedarrays.d.ts"], - ["es2018.asyncgenerator", "lib.es2018.asyncgenerator.d.ts"], - ["es2018.asynciterable", "lib.es2018.asynciterable.d.ts"], - ["es2018.intl", "lib.es2018.intl.d.ts"], - ["es2018.promise", "lib.es2018.promise.d.ts"], - ["es2018.regexp", "lib.es2018.regexp.d.ts"], - ["es2019.array", "lib.es2019.array.d.ts"], - ["es2019.object", "lib.es2019.object.d.ts"], - ["es2019.string", "lib.es2019.string.d.ts"], - ["es2019.symbol", "lib.es2019.symbol.d.ts"], - ["es2019.intl", "lib.es2019.intl.d.ts"], - ["es2020.bigint", "lib.es2020.bigint.d.ts"], - ["es2020.date", "lib.es2020.date.d.ts"], - ["es2020.promise", "lib.es2020.promise.d.ts"], - ["es2020.sharedmemory", "lib.es2020.sharedmemory.d.ts"], - ["es2020.string", "lib.es2020.string.d.ts"], - ["es2020.symbol.wellknown", "lib.es2020.symbol.wellknown.d.ts"], - ["es2020.intl", "lib.es2020.intl.d.ts"], - ["es2020.number", "lib.es2020.number.d.ts"], - ["es2021.promise", "lib.es2021.promise.d.ts"], - ["es2021.string", "lib.es2021.string.d.ts"], - ["es2021.weakref", "lib.es2021.weakref.d.ts"], - ["es2021.intl", "lib.es2021.intl.d.ts"], - ["es2022.array", "lib.es2022.array.d.ts"], - ["es2022.error", "lib.es2022.error.d.ts"], - ["es2022.intl", "lib.es2022.intl.d.ts"], - ["es2022.object", "lib.es2022.object.d.ts"], - ["es2022.sharedmemory", "lib.es2022.sharedmemory.d.ts"], - ["es2022.string", "lib.es2022.string.d.ts"], - ["esnext.array", "lib.es2022.array.d.ts"], - ["esnext.symbol", "lib.es2019.symbol.d.ts"], - ["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"], - ["esnext.intl", "lib.esnext.intl.d.ts"], - ["esnext.bigint", "lib.es2020.bigint.d.ts"], - ["esnext.string", "lib.es2022.string.d.ts"], - ["esnext.promise", "lib.es2021.promise.d.ts"], - ["esnext.weakref", "lib.es2021.weakref.d.ts"], -]; - -/** - * An array of supported "lib" reference file names used to determine the order for inclusion - * when referenced, as well as for spelling suggestions. This ensures the correct ordering for - * overload resolution when a type declared in one lib is extended by another. - * - * @internal - */ -export const libs = libEntries.map(entry => entry[0]); - -/** - * A map of lib names to lib files. This map is used both for parsing the "lib" command line - * option as well as for resolving lib reference directives. - * - * @internal - */ -export const libMap = new Map(libEntries); - -/** @internal */ -export const optionsForWatch = [ - { - name: "watchFile", - type: new Map(getEntries({ - fixedpollinginterval: WatchFileKind.FixedPollingInterval, - prioritypollinginterval: WatchFileKind.PriorityPollingInterval, - dynamicprioritypolling: WatchFileKind.DynamicPriorityPolling, - fixedchunksizepolling: WatchFileKind.FixedChunkSizePolling, - usefsevents: WatchFileKind.UseFsEvents, - usefseventsonparentdirectory: WatchFileKind.UseFsEventsOnParentDirectory, - })), - category: Diagnostics.Watch_and_Build_Modes, - description: Diagnostics.Specify_how_the_TypeScript_watch_mode_works, - defaultValueDescription: WatchFileKind.UseFsEvents, - }, - { - name: "watchDirectory", - type: new Map(getEntries({ - usefsevents: WatchDirectoryKind.UseFsEvents, - fixedpollinginterval: WatchDirectoryKind.FixedPollingInterval, - dynamicprioritypolling: WatchDirectoryKind.DynamicPriorityPolling, - fixedchunksizepolling: WatchDirectoryKind.FixedChunkSizePolling, - })), - category: Diagnostics.Watch_and_Build_Modes, - description: Diagnostics.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality, - defaultValueDescription: WatchDirectoryKind.UseFsEvents, - }, - { - name: "fallbackPolling", - type: new Map(getEntries({ - fixedinterval: PollingWatchKind.FixedInterval, - priorityinterval: PollingWatchKind.PriorityInterval, - dynamicpriority: PollingWatchKind.DynamicPriority, - fixedchunksize: PollingWatchKind.FixedChunkSize, - })), - category: Diagnostics.Watch_and_Build_Modes, - description: Diagnostics.Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers, - defaultValueDescription: PollingWatchKind.PriorityInterval, - }, - { - name: "synchronousWatchDirectory", - type: "boolean", - category: Diagnostics.Watch_and_Build_Modes, - description: Diagnostics.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively, - defaultValueDescription: false, - }, - { - name: "excludeDirectories", - type: "list", - element: { - name: "excludeDirectory", - type: "string", - isFilePath: true, - }, - category: Diagnostics.Watch_and_Build_Modes, - description: Diagnostics.Remove_a_list_of_directories_from_the_watch_process, - }, - { - name: "excludeFiles", - type: "list", - element: { - name: "excludeFile", - type: "string", - isFilePath: true, - }, - category: Diagnostics.Watch_and_Build_Modes, - description: Diagnostics.Remove_a_list_of_files_from_the_watch_mode_s_processing, - }, -]; - -/** @internal */ -export const commonOptionsWithBuild = [ - { - name: "help", - shortName: "h", - type: "boolean", - showInSimplifiedHelpView: true, - isCommandLineOnly: true, - category: Diagnostics.Command_line_Options, - description: Diagnostics.Print_this_message, - defaultValueDescription: false, - }, - { - name: "help", - shortName: "?", - type: "boolean", - isCommandLineOnly: true, - category: Diagnostics.Command_line_Options, - defaultValueDescription: false, - }, - { - name: "watch", - shortName: "w", - type: "boolean", - showInSimplifiedHelpView: true, - isCommandLineOnly: true, - category: Diagnostics.Command_line_Options, - description: Diagnostics.Watch_input_files, - defaultValueDescription: false, - }, - { - name: "preserveWatchOutput", - type: "boolean", - showInSimplifiedHelpView: false, - category: Diagnostics.Output_Formatting, - description: Diagnostics.Disable_wiping_the_console_in_watch_mode, - defaultValueDescription: false, - }, - { - name: "listFiles", - type: "boolean", - category: Diagnostics.Compiler_Diagnostics, - description: Diagnostics.Print_all_of_the_files_read_during_the_compilation, - defaultValueDescription: false, - }, - { - name: "explainFiles", - type: "boolean", - category: Diagnostics.Compiler_Diagnostics, - description: Diagnostics.Print_files_read_during_the_compilation_including_why_it_was_included, - defaultValueDescription: false, - }, - { - name: "listEmittedFiles", - type: "boolean", - category: Diagnostics.Compiler_Diagnostics, - description: Diagnostics.Print_the_names_of_emitted_files_after_a_compilation, - defaultValueDescription: false, - }, - { - name: "pretty", - type: "boolean", - showInSimplifiedHelpView: true, - category: Diagnostics.Output_Formatting, - description: Diagnostics.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read, - defaultValueDescription: true, - }, - { - name: "traceResolution", - type: "boolean", - category: Diagnostics.Compiler_Diagnostics, - description: Diagnostics.Log_paths_used_during_the_moduleResolution_process, - defaultValueDescription: false, - }, - { - name: "diagnostics", - type: "boolean", - category: Diagnostics.Compiler_Diagnostics, - description: Diagnostics.Output_compiler_performance_information_after_building, - defaultValueDescription: false, - }, - { - name: "extendedDiagnostics", - type: "boolean", - category: Diagnostics.Compiler_Diagnostics, - description: Diagnostics.Output_more_detailed_compiler_performance_information_after_building, - defaultValueDescription: false, - }, - { - name: "generateCpuProfile", - type: "string", - isFilePath: true, - paramType: Diagnostics.FILE_OR_DIRECTORY, - category: Diagnostics.Compiler_Diagnostics, - description: Diagnostics.Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging, - defaultValueDescription: "profile.cpuprofile", - }, - { - name: "generateTrace", - type: "string", - isFilePath: true, - isCommandLineOnly: true, - paramType: Diagnostics.DIRECTORY, - category: Diagnostics.Compiler_Diagnostics, - description: Diagnostics.Generates_an_event_trace_and_a_list_of_types, - }, - { - name: "incremental", - shortName: "i", - type: "boolean", - category: Diagnostics.Projects, - description: Diagnostics.Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects, - transpileOptionValue: undefined, - defaultValueDescription: Diagnostics.false_unless_composite_is_set, - }, - { - name: "declaration", - shortName: "d", - type: "boolean", - // Not setting affectsEmit because we calculate this flag might not affect full emit - affectsBuildInfo: true, - showInSimplifiedHelpView: true, - category: Diagnostics.Emit, - transpileOptionValue: undefined, - description: Diagnostics.Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project, - defaultValueDescription: Diagnostics.false_unless_composite_is_set, - }, - { - name: "declarationMap", - type: "boolean", - // Not setting affectsEmit because we calculate this flag might not affect full emit - affectsBuildInfo: true, - showInSimplifiedHelpView: true, - category: Diagnostics.Emit, - transpileOptionValue: undefined, - defaultValueDescription: false, - description: Diagnostics.Create_sourcemaps_for_d_ts_files, - }, - { - name: "emitDeclarationOnly", - type: "boolean", - // Not setting affectsEmit because we calculate this flag might not affect full emit - affectsBuildInfo: true, - showInSimplifiedHelpView: true, - category: Diagnostics.Emit, - description: Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files, - transpileOptionValue: undefined, - defaultValueDescription: false, - }, - { - name: "sourceMap", - type: "boolean", - // Not setting affectsEmit because we calculate this flag might not affect full emit - affectsBuildInfo: true, - showInSimplifiedHelpView: true, - category: Diagnostics.Emit, - defaultValueDescription: false, - description: Diagnostics.Create_source_map_files_for_emitted_JavaScript_files, - }, - { - name: "inlineSourceMap", - type: "boolean", - // Not setting affectsEmit because we calculate this flag might not affect full emit - affectsBuildInfo: true, - category: Diagnostics.Emit, - description: Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript, - defaultValueDescription: false, - }, - { - name: "assumeChangesOnlyAffectDirectDependencies", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Watch_and_Build_Modes, - description: Diagnostics.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it, - defaultValueDescription: false, - }, - { - name: "locale", - type: "string", - category: Diagnostics.Command_line_Options, - isCommandLineOnly: true, - description: Diagnostics.Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit, - defaultValueDescription: Diagnostics.Platform_specific, - }, -] as const; - -/** @internal */ -export const targetOptionDeclaration = { - name: "target", - shortName: "t", - type: new Map(getEntries({ - es3: ScriptTarget.ES3, - es5: ScriptTarget.ES5, - es6: ScriptTarget.ES2015, - es2015: ScriptTarget.ES2015, - es2016: ScriptTarget.ES2016, - es2017: ScriptTarget.ES2017, - es2018: ScriptTarget.ES2018, - es2019: ScriptTarget.ES2019, - es2020: ScriptTarget.ES2020, - es2021: ScriptTarget.ES2021, - es2022: ScriptTarget.ES2022, - esnext: ScriptTarget.ESNext, - })), - affectsSourceFile: true, - affectsModuleResolution: true, - affectsEmit: true, - affectsBuildInfo: true, - paramType: Diagnostics.VERSION, - showInSimplifiedHelpView: true, - category: Diagnostics.Language_and_Environment, - description: Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations, - defaultValueDescription: ScriptTarget.ES3, -} as const; - -/** @internal */ -export const moduleOptionDeclaration = { - name: "module", - shortName: "m", - type: new Map(getEntries({ - none: ModuleKind.None, - commonjs: ModuleKind.CommonJS, - amd: ModuleKind.AMD, - system: ModuleKind.System, - umd: ModuleKind.UMD, - es6: ModuleKind.ES2015, - es2015: ModuleKind.ES2015, - es2020: ModuleKind.ES2020, - es2022: ModuleKind.ES2022, - esnext: ModuleKind.ESNext, - node16: ModuleKind.Node16, - nodenext: ModuleKind.NodeNext, - })), - affectsModuleResolution: true, - affectsEmit: true, - affectsBuildInfo: true, - paramType: Diagnostics.KIND, - showInSimplifiedHelpView: true, - category: Diagnostics.Modules, - description: Diagnostics.Specify_what_module_code_is_generated, - defaultValueDescription: undefined, -} as const; - -const commandOptionsWithoutBuild = [ - // CommandLine only options - { - name: "all", - type: "boolean", - showInSimplifiedHelpView: true, - category: Diagnostics.Command_line_Options, - description: Diagnostics.Show_all_compiler_options, - defaultValueDescription: false, - }, - { - name: "version", - shortName: "v", - type: "boolean", - showInSimplifiedHelpView: true, - category: Diagnostics.Command_line_Options, - description: Diagnostics.Print_the_compiler_s_version, - defaultValueDescription: false, - }, - { - name: "init", - type: "boolean", - showInSimplifiedHelpView: true, - category: Diagnostics.Command_line_Options, - description: Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file, - defaultValueDescription: false, - }, - { - name: "project", - shortName: "p", - type: "string", - isFilePath: true, - showInSimplifiedHelpView: true, - category: Diagnostics.Command_line_Options, - paramType: Diagnostics.FILE_OR_DIRECTORY, - description: Diagnostics.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json, - }, - { - name: "build", - type: "boolean", - shortName: "b", - showInSimplifiedHelpView: true, - category: Diagnostics.Command_line_Options, - description: Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date, - defaultValueDescription: false, - }, - { - name: "showConfig", - type: "boolean", - showInSimplifiedHelpView: true, - category: Diagnostics.Command_line_Options, - isCommandLineOnly: true, - description: Diagnostics.Print_the_final_configuration_instead_of_building, - defaultValueDescription: false, - }, - { - name: "listFilesOnly", - type: "boolean", - category: Diagnostics.Command_line_Options, - isCommandLineOnly: true, - description: Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing, - defaultValueDescription: false, - }, - - // Basic - targetOptionDeclaration, - moduleOptionDeclaration, - { - name: "lib", - type: "list", - element: { - name: "lib", - type: libMap, - defaultValueDescription: undefined, - }, - affectsProgramStructure: true, - showInSimplifiedHelpView: true, - category: Diagnostics.Language_and_Environment, - description: Diagnostics.Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment, - transpileOptionValue: undefined, - }, - { - name: "allowJs", - type: "boolean", - affectsModuleResolution: true, - showInSimplifiedHelpView: true, - category: Diagnostics.JavaScript_Support, - description: Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files, - defaultValueDescription: false, - }, - { - name: "checkJs", - type: "boolean", - showInSimplifiedHelpView: true, - category: Diagnostics.JavaScript_Support, - description: Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files, - defaultValueDescription: false, - }, - { - name: "jsx", - type: jsxOptionMap, - affectsSourceFile: true, - affectsEmit: true, - affectsBuildInfo: true, - affectsModuleResolution: true, - paramType: Diagnostics.KIND, - showInSimplifiedHelpView: true, - category: Diagnostics.Language_and_Environment, - description: Diagnostics.Specify_what_JSX_code_is_generated, - defaultValueDescription: undefined, - }, - { - name: "outFile", - type: "string", - affectsEmit: true, - affectsBuildInfo: true, - affectsDeclarationPath: true, - isFilePath: true, - paramType: Diagnostics.FILE, - showInSimplifiedHelpView: true, - category: Diagnostics.Emit, - description: Diagnostics.Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output, - transpileOptionValue: undefined, - }, - { - name: "outDir", - type: "string", - affectsEmit: true, - affectsBuildInfo: true, - affectsDeclarationPath: true, - isFilePath: true, - paramType: Diagnostics.DIRECTORY, - showInSimplifiedHelpView: true, - category: Diagnostics.Emit, - description: Diagnostics.Specify_an_output_folder_for_all_emitted_files, - }, - { - name: "rootDir", - type: "string", - affectsEmit: true, - affectsBuildInfo: true, - affectsDeclarationPath: true, - isFilePath: true, - paramType: Diagnostics.LOCATION, - category: Diagnostics.Modules, - description: Diagnostics.Specify_the_root_folder_within_your_source_files, - defaultValueDescription: Diagnostics.Computed_from_the_list_of_input_files, - }, - { - name: "composite", - type: "boolean", - // Not setting affectsEmit because we calculate this flag might not affect full emit - affectsBuildInfo: true, - isTSConfigOnly: true, - category: Diagnostics.Projects, - transpileOptionValue: undefined, - defaultValueDescription: false, - description: Diagnostics.Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references, - }, - { - name: "tsBuildInfoFile", - type: "string", - affectsEmit: true, - affectsBuildInfo: true, - isFilePath: true, - paramType: Diagnostics.FILE, - category: Diagnostics.Projects, - transpileOptionValue: undefined, - defaultValueDescription: ".tsbuildinfo", - description: Diagnostics.Specify_the_path_to_tsbuildinfo_incremental_compilation_file, - }, - { - name: "removeComments", - type: "boolean", - affectsEmit: true, - affectsBuildInfo: true, - showInSimplifiedHelpView: true, - category: Diagnostics.Emit, - defaultValueDescription: false, - description: Diagnostics.Disable_emitting_comments, - }, - { - name: "noEmit", - type: "boolean", - showInSimplifiedHelpView: true, - category: Diagnostics.Emit, - description: Diagnostics.Disable_emitting_files_from_a_compilation, - transpileOptionValue: undefined, - defaultValueDescription: false, - }, - { - name: "importHelpers", - type: "boolean", - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Emit, - description: Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file, - defaultValueDescription: false, - }, - { - name: "importsNotUsedAsValues", - type: new Map(getEntries({ - remove: ImportsNotUsedAsValues.Remove, - preserve: ImportsNotUsedAsValues.Preserve, - error: ImportsNotUsedAsValues.Error, - })), - affectsEmit: true, - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Emit, - description: Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types, - defaultValueDescription: ImportsNotUsedAsValues.Remove, - }, - { - name: "downlevelIteration", - type: "boolean", - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Emit, - description: Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration, - defaultValueDescription: false, - }, - { - name: "isolatedModules", - type: "boolean", - category: Diagnostics.Interop_Constraints, - description: Diagnostics.Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports, - transpileOptionValue: true, - defaultValueDescription: false, - }, - { - name: "isolatedDeclarations", - type: "boolean", - category: Diagnostics.Interop_Constraints, - description: Diagnostics.Ensure_that_each_file_can_have_declaration_emit_generated_without_type_information, - transpileOptionValue: true, - defaultValueDescription: false, - }, - - // Strict Type Checks - { - name: "strict", - type: "boolean", - // Though this affects semantic diagnostics, affectsSemanticDiagnostics is not set here - // The value of each strictFlag depends on own strictFlag value or this and never accessed directly. - // But we need to store `strict` in builf info, even though it won't be examined directly, so that the - // flags it controls (e.g. `strictNullChecks`) will be retrieved correctly - affectsBuildInfo: true, - showInSimplifiedHelpView: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Enable_all_strict_type_checking_options, - defaultValueDescription: false, - }, - { - name: "noImplicitAny", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - strictFlag: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type, - defaultValueDescription: Diagnostics.false_unless_strict_is_set, - }, - { - name: "strictNullChecks", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - strictFlag: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.When_type_checking_take_into_account_null_and_undefined, - defaultValueDescription: Diagnostics.false_unless_strict_is_set, - }, - { - name: "strictFunctionTypes", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - strictFlag: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible, - defaultValueDescription: Diagnostics.false_unless_strict_is_set, - }, - { - name: "strictBindCallApply", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - strictFlag: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function, - defaultValueDescription: Diagnostics.false_unless_strict_is_set, - }, - { - name: "strictPropertyInitialization", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - strictFlag: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor, - defaultValueDescription: Diagnostics.false_unless_strict_is_set, - }, - { - name: "noImplicitThis", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - strictFlag: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any, - defaultValueDescription: Diagnostics.false_unless_strict_is_set, - }, - { - name: "useUnknownInCatchVariables", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - strictFlag: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any, - defaultValueDescription: false, - }, - { - name: "alwaysStrict", - type: "boolean", - affectsSourceFile: true, - affectsEmit: true, - affectsBuildInfo: true, - strictFlag: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Ensure_use_strict_is_always_emitted, - defaultValueDescription: Diagnostics.false_unless_strict_is_set, - }, - - // Additional Checks - { - name: "noUnusedLocals", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Enable_error_reporting_when_local_variables_aren_t_read, - defaultValueDescription: false, - }, - { - name: "noUnusedParameters", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read, - defaultValueDescription: false, - }, - { - name: "exactOptionalPropertyTypes", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined, - defaultValueDescription: false, - }, - { - name: "noImplicitReturns", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function, - defaultValueDescription: false, - }, - { - name: "noFallthroughCasesInSwitch", - type: "boolean", - affectsBindDiagnostics: true, - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements, - defaultValueDescription: false, - }, - { - name: "noUncheckedIndexedAccess", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Add_undefined_to_a_type_when_accessed_using_an_index, - defaultValueDescription: false, - }, - { - name: "noImplicitOverride", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier, - defaultValueDescription: false, - }, - { - name: "noPropertyAccessFromIndexSignature", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - showInSimplifiedHelpView: false, - category: Diagnostics.Type_Checking, - description: Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type, - defaultValueDescription: false, - }, - - // Module Resolution - { - name: "moduleResolution", - type: new Map(getEntries({ - node: ModuleResolutionKind.NodeJs, - classic: ModuleResolutionKind.Classic, - node16: ModuleResolutionKind.Node16, - nodenext: ModuleResolutionKind.NodeNext, - })), - affectsModuleResolution: true, - paramType: Diagnostics.STRATEGY, - category: Diagnostics.Modules, - description: Diagnostics.Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier, - defaultValueDescription: Diagnostics.module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node, - }, - { - name: "baseUrl", - type: "string", - affectsModuleResolution: true, - isFilePath: true, - category: Diagnostics.Modules, - description: Diagnostics.Specify_the_base_directory_to_resolve_non_relative_module_names, - }, - { - // this option can only be specified in tsconfig.json - // use type = object to copy the value as-is - name: "paths", - type: "object", - affectsModuleResolution: true, - isTSConfigOnly: true, - category: Diagnostics.Modules, - description: Diagnostics.Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations, - transpileOptionValue: undefined, - }, - { - // this option can only be specified in tsconfig.json - // use type = object to copy the value as-is - name: "rootDirs", - type: "list", - isTSConfigOnly: true, - element: { - name: "rootDirs", - type: "string", - isFilePath: true, - }, - affectsModuleResolution: true, - category: Diagnostics.Modules, - description: Diagnostics.Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules, - transpileOptionValue: undefined, - defaultValueDescription: Diagnostics.Computed_from_the_list_of_input_files, - }, - { - name: "typeRoots", - type: "list", - element: { - name: "typeRoots", - type: "string", - isFilePath: true, - }, - affectsModuleResolution: true, - category: Diagnostics.Modules, - description: Diagnostics.Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types, - }, - { - name: "types", - type: "list", - element: { - name: "types", - type: "string", - }, - affectsProgramStructure: true, - showInSimplifiedHelpView: true, - category: Diagnostics.Modules, - description: Diagnostics.Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file, - transpileOptionValue: undefined, - }, - { - name: "allowSyntheticDefaultImports", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Interop_Constraints, - description: Diagnostics.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export, - defaultValueDescription: Diagnostics.module_system_or_esModuleInterop, - }, - { - name: "esModuleInterop", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsEmit: true, - affectsBuildInfo: true, - showInSimplifiedHelpView: true, - category: Diagnostics.Interop_Constraints, - description: Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility, - defaultValueDescription: false, - }, - { - name: "preserveSymlinks", - type: "boolean", - category: Diagnostics.Interop_Constraints, - description: Diagnostics.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node, - defaultValueDescription: false, - }, - { - name: "allowUmdGlobalAccess", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Modules, - description: Diagnostics.Allow_accessing_UMD_globals_from_modules, - defaultValueDescription: false, - }, - { - name: "moduleSuffixes", - type: "list", - element: { - name: "suffix", - type: "string", - }, - listPreserveFalsyValues: true, - affectsModuleResolution: true, - category: Diagnostics.Modules, - description: Diagnostics.List_of_file_name_suffixes_to_search_when_resolving_a_module, - }, - - // Source Maps - { - name: "sourceRoot", - type: "string", - affectsEmit: true, - affectsBuildInfo: true, - paramType: Diagnostics.LOCATION, - category: Diagnostics.Emit, - description: Diagnostics.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code, - }, - { - name: "mapRoot", - type: "string", - affectsEmit: true, - affectsBuildInfo: true, - paramType: Diagnostics.LOCATION, - category: Diagnostics.Emit, - description: Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations, - }, - { - name: "inlineSources", - type: "boolean", - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Emit, - description: Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript, - defaultValueDescription: false, - }, - - // Experimental - { - name: "experimentalDecorators", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Language_and_Environment, - description: Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators, - defaultValueDescription: false, - }, - { - name: "emitDecoratorMetadata", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Language_and_Environment, - description: Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files, - defaultValueDescription: false, - }, - - // Advanced - { - name: "jsxFactory", - type: "string", - category: Diagnostics.Language_and_Environment, - description: Diagnostics.Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h, - defaultValueDescription: "`React.createElement`", - }, - { - name: "jsxFragmentFactory", - type: "string", - category: Diagnostics.Language_and_Environment, - description: Diagnostics.Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment, - defaultValueDescription: "React.Fragment", - }, - { - name: "jsxImportSource", - type: "string", - affectsSemanticDiagnostics: true, - affectsEmit: true, - affectsBuildInfo: true, - affectsModuleResolution: true, - category: Diagnostics.Language_and_Environment, - description: Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk, - defaultValueDescription: "react", - }, - { - name: "resolveJsonModule", - type: "boolean", - affectsModuleResolution: true, - category: Diagnostics.Modules, - description: Diagnostics.Enable_importing_json_files, - defaultValueDescription: false, - }, - - { - name: "out", - type: "string", - affectsEmit: true, - affectsBuildInfo: true, - affectsDeclarationPath: true, - isFilePath: false, // This is intentionally broken to support compatability with existing tsconfig files - // for correct behaviour, please use outFile - category: Diagnostics.Backwards_Compatibility, - paramType: Diagnostics.FILE, - transpileOptionValue: undefined, - description: Diagnostics.Deprecated_setting_Use_outFile_instead, - }, - { - name: "reactNamespace", - type: "string", - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Language_and_Environment, - description: Diagnostics.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit, - defaultValueDescription: "`React`", - }, - { - name: "skipDefaultLibCheck", - type: "boolean", - // We need to store these to determine whether `lib` files need to be rechecked - affectsBuildInfo: true, - category: Diagnostics.Completeness, - description: Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript, - defaultValueDescription: false, - }, - { - name: "charset", - type: "string", - category: Diagnostics.Backwards_Compatibility, - description: Diagnostics.No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files, - defaultValueDescription: "utf8", - }, - { - name: "emitBOM", - type: "boolean", - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Emit, - description: Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files, - defaultValueDescription: false, - }, - { - name: "newLine", - type: new Map(getEntries({ - crlf: NewLineKind.CarriageReturnLineFeed, - lf: NewLineKind.LineFeed, - })), - affectsEmit: true, - affectsBuildInfo: true, - paramType: Diagnostics.NEWLINE, - category: Diagnostics.Emit, - description: Diagnostics.Set_the_newline_character_for_emitting_files, - defaultValueDescription: Diagnostics.Platform_specific, - }, - { - name: "noErrorTruncation", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Output_Formatting, - description: Diagnostics.Disable_truncating_types_in_error_messages, - defaultValueDescription: false, - }, - { - name: "noLib", - type: "boolean", - category: Diagnostics.Language_and_Environment, - affectsProgramStructure: true, - description: Diagnostics.Disable_including_any_library_files_including_the_default_lib_d_ts, - // We are not returning a sourceFile for lib file when asked by the program, - // so pass --noLib to avoid reporting a file not found error. - transpileOptionValue: true, - defaultValueDescription: false, - }, - { - name: "noResolve", - type: "boolean", - affectsModuleResolution: true, - category: Diagnostics.Modules, - description: Diagnostics.Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project, - // We are not doing a full typecheck, we are not resolving the whole context, - // so pass --noResolve to avoid reporting missing file errors. - transpileOptionValue: true, - defaultValueDescription: false, - }, - { - name: "stripInternal", - type: "boolean", - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Emit, - description: Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments, - defaultValueDescription: false, - }, - { - name: "disableSizeLimit", - type: "boolean", - affectsProgramStructure: true, - category: Diagnostics.Editor_Support, - description: Diagnostics.Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server, - defaultValueDescription: false, - }, - { - name: "disableSourceOfProjectReferenceRedirect", - type: "boolean", - isTSConfigOnly: true, - category: Diagnostics.Projects, - description: Diagnostics.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects, - defaultValueDescription: false, - }, - { - name: "disableSolutionSearching", - type: "boolean", - isTSConfigOnly: true, - category: Diagnostics.Projects, - description: Diagnostics.Opt_a_project_out_of_multi_project_reference_checking_when_editing, - defaultValueDescription: false, - }, - { - name: "disableReferencedProjectLoad", - type: "boolean", - isTSConfigOnly: true, - category: Diagnostics.Projects, - description: Diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript, - defaultValueDescription: false, - }, - { - name: "noImplicitUseStrict", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Backwards_Compatibility, - description: Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files, - defaultValueDescription: false, - }, - { - name: "noEmitHelpers", - type: "boolean", - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Emit, - description: Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output, - defaultValueDescription: false, - }, - { - name: "noEmitOnError", - type: "boolean", - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Emit, - transpileOptionValue: undefined, - description: Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported, - defaultValueDescription: false, - }, - { - name: "preserveConstEnums", - type: "boolean", - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Emit, - description: Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code, - defaultValueDescription: false, - }, - { - name: "declarationDir", - type: "string", - affectsEmit: true, - affectsBuildInfo: true, - affectsDeclarationPath: true, - isFilePath: true, - paramType: Diagnostics.DIRECTORY, - category: Diagnostics.Emit, - transpileOptionValue: undefined, - description: Diagnostics.Specify_the_output_directory_for_generated_declaration_files, - }, - { - name: "skipLibCheck", - type: "boolean", - // We need to store these to determine whether `lib` files need to be rechecked - affectsBuildInfo: true, - category: Diagnostics.Completeness, - description: Diagnostics.Skip_type_checking_all_d_ts_files, - defaultValueDescription: false, - }, - { - name: "allowUnusedLabels", - type: "boolean", - affectsBindDiagnostics: true, - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Disable_error_reporting_for_unused_labels, - defaultValueDescription: undefined, - }, - { - name: "allowUnreachableCode", - type: "boolean", - affectsBindDiagnostics: true, - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Type_Checking, - description: Diagnostics.Disable_error_reporting_for_unreachable_code, - defaultValueDescription: undefined, - }, - { - name: "suppressExcessPropertyErrors", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Backwards_Compatibility, - description: Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals, - defaultValueDescription: false, - }, - { - name: "suppressImplicitAnyIndexErrors", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Backwards_Compatibility, - description: Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures, - defaultValueDescription: false, - }, - { - name: "forceConsistentCasingInFileNames", - type: "boolean", - affectsModuleResolution: true, - category: Diagnostics.Interop_Constraints, - description: Diagnostics.Ensure_that_casing_is_correct_in_imports, - defaultValueDescription: false, - }, - { - name: "maxNodeModuleJsDepth", - type: "number", - affectsModuleResolution: true, - category: Diagnostics.JavaScript_Support, - description: Diagnostics.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs, - defaultValueDescription: 0, - }, - { - name: "noStrictGenericChecks", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsBuildInfo: true, - category: Diagnostics.Backwards_Compatibility, - description: Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types, - defaultValueDescription: false, - }, - { - name: "useDefineForClassFields", - type: "boolean", - affectsSemanticDiagnostics: true, - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Language_and_Environment, - description: Diagnostics.Emit_ECMAScript_standard_compliant_class_fields, - defaultValueDescription: Diagnostics.true_for_ES2022_and_above_including_ESNext, - }, - { - name: "preserveValueImports", - type: "boolean", - affectsEmit: true, - affectsBuildInfo: true, - category: Diagnostics.Emit, - description: Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed, - defaultValueDescription: false, - }, - - { - name: "keyofStringsOnly", - type: "boolean", - category: Diagnostics.Backwards_Compatibility, - description: Diagnostics.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option, - defaultValueDescription: false, - }, - { - // A list of plugins to load in the language service - name: "plugins", - type: "list", - isTSConfigOnly: true, - element: { - name: "plugin", - type: "object", - }, - description: Diagnostics.Specify_a_list_of_language_service_plugins_to_include, - category: Diagnostics.Editor_Support, - }, - { - name: "moduleDetection", - type: new Map(getEntries({ - auto: ModuleDetectionKind.Auto, - legacy: ModuleDetectionKind.Legacy, - force: ModuleDetectionKind.Force, - })), - affectsModuleResolution: true, - description: Diagnostics.Control_what_method_is_used_to_detect_module_format_JS_files, - category: Diagnostics.Language_and_Environment, - defaultValueDescription: Diagnostics.auto_Colon_Treat_files_with_imports_exports_import_meta_jsx_with_jsx_Colon_react_jsx_or_esm_format_with_module_Colon_node16_as_modules, - }, -] as const; - -/** @internal */ -export const optionDeclarations = [ - ...commonOptionsWithBuild, - ...commandOptionsWithoutBuild, -]; - -export type CommandLineOption = CommandLineOptionOfCustomType | CommandLineOptionOfStringType | CommandLineOptionOfNumberType | CommandLineOptionOfBooleanType | TsConfigOnlyOption | CommandLineOptionOfListType; - -/** @internal */ -export interface CommandLineOptionOfStringType extends CommandLineOptionBase { - type: "string"; - defaultValueDescription?: string | undefined | DiagnosticMessage; -} - -/** @internal */ -export interface CommandLineOptionOfNumberType extends CommandLineOptionBase { - type: "number"; - defaultValueDescription: number | undefined | DiagnosticMessage; -} - -/** @internal */ -export interface CommandLineOptionOfBooleanType extends CommandLineOptionBase { - type: "boolean"; - defaultValueDescription: boolean | undefined | DiagnosticMessage; -} - -/** @internal */ -export interface CommandLineOptionOfCustomType extends CommandLineOptionBase { - type: Map; // an object literal mapping named values to actual values - defaultValueDescription: number | string | undefined | DiagnosticMessage; -} - -/** @internal */ -export interface TsConfigOnlyOption extends CommandLineOptionBase { - type: "object"; - elementOptions?: Map; -} - -/** @internal */ -export interface CommandLineOptionOfListType extends CommandLineOptionBase { - type: "list"; - element: CommandLineOptionOfCustomType | CommandLineOptionOfStringType | CommandLineOptionOfNumberType | CommandLineOptionOfBooleanType | TsConfigOnlyOption; - listPreserveFalsyValues?: boolean; -} - -/** @internal */ -export interface CommandLineOptionBase { - name: string; - type: "string" | "number" | "boolean" | "object" | "list" | Map; // a value of a primitive type, or an object literal mapping named values to actual values - isFilePath?: boolean; // True if option value is a path or fileName - shortName?: string; // A short mnemonic for convenience - for instance, 'h' can be used in place of 'help' - description?: DiagnosticMessage; // The message describing what the command line switch does. - defaultValueDescription?: string | number | boolean | DiagnosticMessage; // The message describing what the dafault value is. string type is prepared for fixed chosen like "false" which do not need I18n. - paramType?: DiagnosticMessage; // The name to be used for a non-boolean option's parameter - isTSConfigOnly?: boolean; // True if option can only be specified via tsconfig.json file - isCommandLineOnly?: boolean; - showInSimplifiedHelpView?: boolean; - category?: DiagnosticMessage; - strictFlag?: true; // true if the option is one of the flag under strict - affectsSourceFile?: true; // true if we should recreate SourceFiles after this option changes - affectsModuleResolution?: true; // currently same effect as `affectsSourceFile` - affectsBindDiagnostics?: true; // true if this affects binding (currently same effect as `affectsSourceFile`) - affectsSemanticDiagnostics?: true; // true if option affects semantic diagnostics - affectsEmit?: true; // true if the options affects emit - affectsProgramStructure?: true; // true if program should be reconstructed from root files if option changes and does not affect module resolution as affectsModuleResolution indirectly means program needs to reconstructed - affectsDeclarationPath?: true; // true if the options affects declaration file path computed - affectsBuildInfo?: true; // true if this options should be emitted in buildInfo - transpileOptionValue?: boolean | undefined; // If set this means that the option should be set to this value when transpiling -} - -function convertJsonOptionOfCustomType(opt: CommandLineOptionOfCustomType, value: string, errors: Diagnostic[]) { - if (isNullOrUndefined(value)) return undefined; - const key = value.toLowerCase(); - const val = opt.type.get(key); - if (val !== undefined) { - return validateJsonOptionValue(opt, val, errors); - } - else { - return undefined; - } -} - -function validateJsonOptionValue(opt: CommandLineOption, value: T, errors: Diagnostic[]): T | undefined { - if (isNullOrUndefined(value)) return undefined; - return value; -} - -/** @internal */ -export function parseCustomTypeOption(opt: CommandLineOptionOfCustomType, value: string, errors: Diagnostic[]) { - return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors); -} - -/** @internal */ -export function parseListTypeOption(opt: CommandLineOptionOfListType, value = "", errors: Diagnostic[]): (string | number)[] | undefined { - value = trimString(value); - if (startsWith(value, "-")) { - return undefined; - } - if (value === "") { - return []; - } - const values = value.split(","); - switch (opt.element.type) { - case "number": - return mapDefined(values, v => validateJsonOptionValue(opt.element, parseInt(v), errors)); - case "string": - return mapDefined(values, v => validateJsonOptionValue(opt.element, v || "", errors)); - default: - return mapDefined(values, v => parseCustomTypeOption(opt.element as CommandLineOptionOfCustomType, v, errors)); - } -} diff --git a/external-declarations/src/test-runner/tsc-infrastructure/test-document.ts b/external-declarations/src/test-runner/tsc-infrastructure/test-document.ts deleted file mode 100644 index b8eba7f719c64..0000000000000 --- a/external-declarations/src/test-runner/tsc-infrastructure/test-document.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { - isLineBreak, -} from "typescript"; - -import { - CharacterCodes, -} from "../../compiler/types"; -import { - TestFile, -} from "./compiler-run"; - -/** @internal */ -export function computeLineStarts(text: string): number[] { - const result: number[] = []; - let pos = 0; - let lineStart = 0; - while (pos < text.length) { - const ch = text.charCodeAt(pos); - pos++; - switch (ch) { - case CharacterCodes.carriageReturn: - if (text.charCodeAt(pos) === CharacterCodes.lineFeed) { - pos++; - } - // falls through - case CharacterCodes.lineFeed: - result.push(lineStart); - lineStart = pos; - break; - default: - if (ch > CharacterCodes.maxAsciiCharacter && isLineBreak(ch)) { - result.push(lineStart); - lineStart = pos; - } - break; - } - } - result.push(lineStart); - return result; -} - -export class TextDocument { - public readonly meta: Map; - public readonly file: string; - public readonly text: string; - - private _lineStarts: readonly number[] | undefined; - private _testFile: TestFile | undefined; - - constructor(file: string, text: string, meta?: Map) { - this.file = file; - this.text = text; - this.meta = meta || new Map(); - } - - public get lineStarts(): readonly number[] { - return this._lineStarts || (this._lineStarts = computeLineStarts(this.text)); - } - - public static fromTestFile(file: TestFile) { - return new TextDocument( - file.unitName, - file.content, - file.fileOptions && Object.keys(file.fileOptions) - .reduce((meta, key) => meta.set(key, file.fileOptions[key]), new Map()), - ); - } - - public asTestFile() { - return this._testFile || (this._testFile = { - unitName: this.file, - content: this.text, - fileOptions: Array.from(this.meta) - .reduce((obj, [key, value]) => (obj[key] = value, obj), {} as Record), - }); - } -} diff --git a/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts b/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts deleted file mode 100644 index e2c90f851b8ba..0000000000000 --- a/external-declarations/src/test-runner/tsc-infrastructure/test-file-parser.ts +++ /dev/null @@ -1,224 +0,0 @@ -import * as ts from "typescript"; -import { - Path, -} from "typescript"; - -import { - find, - forEach, - orderedRemoveItemAt, -} from "../../compiler/lang-utils"; -import { - getBaseFileName, - getDirectoryPath, - getNormalizedAbsolutePath, - normalizePath, -} from "../../compiler/path-utils"; -import * as vfs from "./vfs"; - -/** all the necessary information to set the right compiler settings */ -export interface CompilerSettings { - [name: string]: string; -} -/** All the necessary information to turn a multi file test into useful units for later compilation */ -export interface TestUnitData { - content: string; - name: string; - fileOptions: any; - originalFilePath: string; - references: string[]; - startLine: number; - endLine: number; -} -export interface ParseConfigHost { - useCaseSensitiveFileNames: boolean; - - readDirectory(rootDir: string, extensions: readonly string[], excludes: readonly string[] | undefined, includes: readonly string[], depth?: number): readonly string[]; - - /** - * Gets a value indicating whether the specified path exists and is a file. - * @param path The path to test. - */ - fileExists(path: string): boolean; - - readFile(path: string): string | undefined; - trace?(s: string): void; -} - -const optionRegex = /^[/]{2}\s*@(\w+)\s*:\s*([^\r\n]*)/gm; // multiple matches on multiple lines -const linkRegex = /^[/]{2}\s*@link\s*:\s*([^\r\n]*)\s*->\s*([^\r\n]*)/gm; // multiple matches on multiple lines - -export function extractCompilerSettings(content: string): CompilerSettings { - const opts: CompilerSettings = {}; - - let match: RegExpExecArray | null; - while ((match = optionRegex.exec(content)) !== null) { // eslint-disable-line no-null/no-null - opts[match[1]] = match[2].trim(); - } - - return opts; -} - -/** Splits the given string on \r\n, or on only \n if that fails, or on only \r if *that* fails. */ -export function splitContentByNewlines(content: string) { - const split = (delimiter: string) => Object.assign(content.split(delimiter), { delimiter }); - // Split up the input file by line - // Note: IE JS engine incorrectly handles consecutive delimiters here when using RegExp split, so - // we have to use string-based splitting instead and try to figure out the delimiting chars - let lines = split("\r\n"); - if (lines.length === 1) { - lines = split("\n"); - - if (lines.length === 1) { - lines = split("\r"); - } - } - return lines; -} - -export function getConfigNameFromFileName(filename: string): "tsconfig.json" | "jsconfig.json" | undefined { - const flc = getBaseFileName(filename).toLowerCase(); - return find(["tsconfig.json" as const, "jsconfig.json" as const], x => x === flc); -} - -export function parseSymlinkFromTest(line: string, symlinks: vfs.FileSet | undefined) { - const linkMetaData = linkRegex.exec(line); - linkRegex.lastIndex = 0; - if (!linkMetaData) return undefined; - - if (!symlinks) symlinks = {}; - symlinks[linkMetaData[2].trim()] = new vfs.Symlink(linkMetaData[1].trim()); - return symlinks; -} - -export interface TestCaseContent { - settings: CompilerSettings; - testUnitData: TestUnitData[]; - tsConfig: ts.ParsedCommandLine | undefined; - tsConfigFileUnitData: TestUnitData | undefined; - symlinks?: vfs.FileSet; - code: string; -} - -/** Given a test file containing // @FileName directives, return an array of named units of code to be added to an existing compiler instance */ -export function makeUnitsFromTest(code: string, fileName: string, rootDir?: string, settings = extractCompilerSettings(code)): TestCaseContent { - // List of all the subfiles we've parsed out - const testUnitData: TestUnitData[] = []; - - const lines = splitContentByNewlines(code); - - // Stuff related to the subfile we're parsing - let currentFileContent: string | undefined; - let currentFileOptions: any = {}; - let currentFileName: any; - let currentFileStartLine = 0; - let currentFileEndLine = 0; - let refs: string[] = []; - let symlinks: vfs.FileSet | undefined; - let lineIndex = -1; - for (const line of lines) { - lineIndex++; - let testMetaData: RegExpExecArray | null; - const possiblySymlinks = parseSymlinkFromTest(line, symlinks); - if (possiblySymlinks) { - symlinks = possiblySymlinks; - } - else if (testMetaData = optionRegex.exec(line)) { - // Comment line, check for global/file @options and record them - optionRegex.lastIndex = 0; - const metaDataName = testMetaData[1].toLowerCase(); - currentFileOptions[testMetaData[1]] = testMetaData[2].trim(); - if (metaDataName !== "filename") { - continue; - } - - // New metadata statement after having collected some code to go with the previous metadata - if (currentFileName) { - // Store result file - const newTestFile = { - content: currentFileContent!, // TODO: GH#18217 - name: currentFileName, - fileOptions: currentFileOptions, - originalFilePath: fileName, - references: refs, - startLine: currentFileStartLine, - endLine: currentFileEndLine, - }; - testUnitData.push(newTestFile); - - // Reset local data - currentFileContent = undefined; - currentFileOptions = {}; - currentFileName = testMetaData[2].trim(); - currentFileStartLine = lineIndex + 1; - refs = []; - } - else { - // First metadata marker in the file - currentFileName = testMetaData[2].trim(); - currentFileStartLine = lineIndex + 1; - currentFileContent = undefined; - } - } - else { - currentFileEndLine = lineIndex; - // Subfile content line - // Append to the current subfile content, inserting a newline needed - if (currentFileContent === undefined) { - currentFileContent = ""; - currentFileStartLine = lineIndex; - } - else { - // End-of-line - currentFileContent = currentFileContent + "\n"; - } - currentFileContent = currentFileContent + line; - } - } - - // normalize the fileName for the single file case - currentFileName = testUnitData.length > 0 || currentFileName ? currentFileName : getBaseFileName(fileName); - - // EOF, push whatever remains - const newTestFile2 = { - content: currentFileContent || "", - name: currentFileName, - fileOptions: currentFileOptions, - originalFilePath: fileName, - references: refs, - startLine: currentFileStartLine, - endLine: currentFileEndLine, - }; - testUnitData.push(newTestFile2); - - // unit tests always list files explicitly - const parseConfigHost: ts.ParseConfigHost = { - useCaseSensitiveFileNames: false, - readDirectory: () => [], - fileExists: () => true, - readFile: name => forEach(testUnitData, data => data.name.toLowerCase() === name.toLowerCase() ? data.content : undefined), - }; - - // check if project has tsconfig.json in the list of files - let tsConfig: ts.ParsedCommandLine | undefined; - let tsConfigFileUnitData: TestUnitData | undefined; - for (let i = 0; i < testUnitData.length; i++) { - const data = testUnitData[i]; - if (getConfigNameFromFileName(data.name)) { - const configJson = ts.parseJsonText(data.name, data.content); - let baseDir = normalizePath(getDirectoryPath(data.name)); - if (rootDir) { - baseDir = getNormalizedAbsolutePath(baseDir, rootDir); - } - tsConfig = ts.parseJsonSourceFileConfigFileContent(configJson, parseConfigHost, baseDir); - tsConfig.options.configFilePath = data.name as Path; - tsConfigFileUnitData = data; - - // delete entry from the list - orderedRemoveItemAt(testUnitData, i); - - break; - } - } - return { settings, testUnitData, tsConfig, tsConfigFileUnitData, symlinks, code }; -} diff --git a/external-declarations/src/test-runner/tsc-infrastructure/vary-by.ts b/external-declarations/src/test-runner/tsc-infrastructure/vary-by.ts deleted file mode 100644 index 36b24de5e79c9..0000000000000 --- a/external-declarations/src/test-runner/tsc-infrastructure/vary-by.ts +++ /dev/null @@ -1,187 +0,0 @@ -import { - arrayFrom, - equateStringsCaseInsensitive, - findIndex, - forEach, - getEntries, - hasProperty, - map, - orderedRemoveItemAt, - startsWith, -} from "../../compiler/lang-utils"; -import { - optionDeclarations, -} from "./options"; -import { - CompilerSettings, -} from "./test-file-parser"; - -interface FileBasedTestConfiguration { - [key: string]: string; -} - -const varyBy: readonly string[] = [ - "module", - "moduleResolution", - "moduleDetection", - "target", - "jsx", - "removeComments", - "importHelpers", - "importHelpers", - "downlevelIteration", - "isolatedModules", - "strict", - "noImplicitAny", - "strictNullChecks", - "strictFunctionTypes", - "strictBindCallApply", - "strictPropertyInitialization", - "noImplicitThis", - "alwaysStrict", - "allowSyntheticDefaultImports", - "esModuleInterop", - "emitDecoratorMetadata", - "skipDefaultLibCheck", - "preserveConstEnums", - "skipLibCheck", - "exactOptionalPropertyTypes", - "useDefineForClassFields", - "useUnknownInCatchVariables", - "noUncheckedIndexedAccess", - "noPropertyAccessFromIndexSignature", -]; - -/** - * Compute FileBasedTestConfiguration variations based on a supplied list of variable settings. - */ -export function getFileBasedTestConfigurations(settings: CompilerSettings): FileBasedTestConfiguration[] | undefined { - let varyByEntries: [string, string[]][] | undefined; - let variationCount = 1; - for (const varyByKey of varyBy) { - if (hasProperty(settings, varyByKey)) { - // we only consider variations when there are 2 or more variable entries. - const entries = splitVaryBySettingValue(settings[varyByKey], varyByKey); - if (entries) { - if (!varyByEntries) varyByEntries = []; - variationCount *= entries.length; - if (variationCount > 25) throw new Error(`Provided test options exceeded the maximum number of variations: ${varyBy.map(v => `'@${v}'`).join(", ")}`); - varyByEntries.push([varyByKey, entries]); - } - } - } - - if (!varyByEntries) return undefined; - - const configurations: FileBasedTestConfiguration[] = []; - computeFileBasedTestConfigurationVariations(configurations, /*variationState*/ {}, varyByEntries, /*offset*/ 0); - return configurations; -} - -function computeFileBasedTestConfigurationVariations(configurations: FileBasedTestConfiguration[], variationState: FileBasedTestConfiguration, varyByEntries: [string, string[]][], offset: number) { - if (offset >= varyByEntries.length) { - // make a copy of the current variation state - configurations.push({ ...variationState }); - return; - } - - const [varyBy, entries] = varyByEntries[offset]; - for (const entry of entries) { - // set or overwrite the variation, then compute the next variation - variationState[varyBy] = entry; - computeFileBasedTestConfigurationVariations(configurations, variationState, varyByEntries, offset + 1); - } -} - -function splitVaryBySettingValue(text: string, varyBy: string): string[] | undefined { - if (!text) return undefined; - - let star = false; - const includes: string[] = []; - const excludes: string[] = []; - for (let s of text.split(/,/g)) { - s = s.trim().toLowerCase(); - if (s.length === 0) continue; - if (s === "*") { - star = true; - } - else if (startsWith(s, "-") || startsWith(s, "!")) { - excludes.push(s.slice(1)); - } - else { - includes.push(s); - } - } - - // do nothing if the setting has no variations - if (includes.length <= 1 && !star && excludes.length === 0) { - return undefined; - } - - const variations: { key: string; value?: string | number; }[] = []; - const values = getVaryByStarSettingValues(varyBy); - - // add (and deduplicate) all included entries - for (const include of includes) { - const value = values?.get(include); - if (findIndex(variations, v => v.key === include || value !== undefined && v.value === value) === -1) { - variations.push({ key: include, value }); - } - } - - if (star && values) { - // add all entries - for (const [key, value] of arrayFrom(values.entries())) { - if (findIndex(variations, v => v.key === key || v.value === value) === -1) { - variations.push({ key, value }); - } - } - } - - // remove all excluded entries - for (const exclude of excludes) { - const value = values?.get(exclude); - let index: number; - while ((index = findIndex(variations, v => v.key === exclude || value !== undefined && v.value === value)) >= 0) { - orderedRemoveItemAt(variations, index); - } - } - - if (variations.length === 0) { - throw new Error(`Variations in test option '@${varyBy}' resulted in an empty set.`); - } - - return map(variations, v => v.key); -} - -let booleanVaryByStarSettingValues: Map | undefined; - -function getVaryByStarSettingValues(varyBy: string): ReadonlyMap | undefined { - const option = forEach(optionDeclarations, decl => equateStringsCaseInsensitive(decl.name, varyBy) ? decl : undefined); - if (option) { - if (typeof option.type === "object") { - return option.type; - } - if (option.type === "boolean") { - return booleanVaryByStarSettingValues || (booleanVaryByStarSettingValues = new Map(getEntries({ - true: 1, - false: 0, - }))); - } - } -} - -/** - * Compute a description for this configuration based on its entries - */ -export function getFileBasedTestConfigurationDescription(configuration: FileBasedTestConfiguration) { - let name = ""; - if (configuration) { - const keys = Object.keys(configuration).sort(); - for (const key of keys) { - if (name) name += ","; - name += `${key}=${configuration[key]}`; - } - } - return name; -} diff --git a/external-declarations/src/test-runner/tsc-infrastructure/vfs.ts b/external-declarations/src/test-runner/tsc-infrastructure/vfs.ts deleted file mode 100644 index c11445fd4d7e9..0000000000000 --- a/external-declarations/src/test-runner/tsc-infrastructure/vfs.ts +++ /dev/null @@ -1,1675 +0,0 @@ -import { - arrayFrom, -} from "../../compiler/lang-utils"; -import * as collections from "./collections"; -import * as Harness from "./compiler-run"; -import * as documents from "./test-document"; -import * as vpath from "./vpath"; - -/** - * Posix-style path to the TypeScript compiler build outputs (including tsc.js, lib.d.ts, etc.) - */ -export const builtFolder = "/.ts"; - -/** - * Posix-style path to additional mountable folders (./tests/projects in this repo) - */ -export const projectsFolder = "/.projects"; - -/** - * Posix-style path to additional test libraries - */ -export const testLibFolder = "/.lib"; - -/** - * Posix-style path to sources under test - */ -export const srcFolder = "/.src"; - -// file type -const S_IFMT = 0o170000; // file type -const S_IFSOCK = 0o140000; // socket -const S_IFLNK = 0o120000; // symbolic link -const S_IFREG = 0o100000; // regular file -const S_IFBLK = 0o060000; // block device -const S_IFDIR = 0o040000; // directory -const S_IFCHR = 0o020000; // character device -const S_IFIFO = 0o010000; // FIFO - -let devCount = 0; // A monotonically increasing count of device ids -let inoCount = 0; // A monotonically increasing count of inodes - -export interface DiffOptions { - includeChangedFileWithSameContent?: boolean; - baseIsNotShadowRoot?: boolean; -} - -export const timeIncrements = 1000; - -/** - * Represents a virtual POSIX-like file system. - */ -export class FileSystem { - /** Indicates whether the file system is case-sensitive (`false`) or case-insensitive (`true`). */ - public readonly ignoreCase: boolean; - - /** Gets the comparison function used to compare two paths. */ - public readonly stringComparer: (a: string, b: string) => number; - - // lazy-initialized state that should be mutable even if the FileSystem is frozen. - private _lazy: { - links?: collections.SortedMap; - shadows?: Map; - meta?: collections.Metadata; - } = {}; - - private _cwd: string; // current working directory - private _time: number; - private _shadowRoot: FileSystem | undefined; - private _dirStack: string[] | undefined; - - constructor(ignoreCase: boolean, options: FileSystemOptions = {}) { - const { time = timeIncrements, files, meta } = options; - this.ignoreCase = ignoreCase; - this.stringComparer = this.ignoreCase ? vpath.compareCaseInsensitive : vpath.compareCaseSensitive; - this._time = time; - - if (meta) { - for (const key of Object.keys(meta)) { - this.meta.set(key, meta[key]); - } - } - - if (files) { - this._applyFiles(files, /*dirname*/ ""); - } - - let cwd = options.cwd; - if ((!cwd || !vpath.isRoot(cwd)) && this._lazy.links) { - const iterator = collections.getIterator(this._lazy.links.keys()); - try { - for (let i = collections.nextResult(iterator); i; i = collections.nextResult(iterator)) { - const name = i.value; - cwd = cwd ? vpath.resolve(name, cwd) : name; - break; - } - } - finally { - collections.closeIterator(iterator); - } - } - - if (cwd) { - vpath.validate(cwd, vpath.ValidationFlags.Absolute); - this.mkdirpSync(cwd); - } - - this._cwd = cwd || ""; - } - - /** - * Gets metadata for this `FileSystem`. - */ - public get meta(): collections.Metadata { - if (!this._lazy.meta) { - this._lazy.meta = new collections.Metadata(this._shadowRoot ? this._shadowRoot.meta : undefined); - } - return this._lazy.meta; - } - - /** - * Gets a value indicating whether the file system is read-only. - */ - public get isReadonly() { - return Object.isFrozen(this); - } - - /** - * Makes the file system read-only. - */ - public makeReadonly() { - Object.freeze(this); - return this; - } - - /** - * Gets the file system shadowed by this file system. - */ - public get shadowRoot() { - return this._shadowRoot; - } - - /** - * Snapshots the current file system, effectively shadowing itself. This is useful for - * generating file system patches using `.diff()` from one snapshot to the next. Performs - * no action if this file system is read-only. - */ - public snapshot() { - if (this.isReadonly) return; - const fs = new FileSystem(this.ignoreCase, { time: this._time }); - fs._lazy = this._lazy; - fs._cwd = this._cwd; - fs._time = this._time; - fs._shadowRoot = this._shadowRoot; - fs._dirStack = this._dirStack; - fs.makeReadonly(); - this._lazy = {}; - this._shadowRoot = fs; - } - - /** - * Gets a shadow copy of this file system. Changes to the shadow copy do not affect the - * original, allowing multiple copies of the same core file system without multiple copies - * of the same data. - */ - public shadow(ignoreCase = this.ignoreCase) { - if (!this.isReadonly) throw new Error("Cannot shadow a mutable file system."); - if (ignoreCase && !this.ignoreCase) throw new Error("Cannot create a case-insensitive file system from a case-sensitive one."); - const fs = new FileSystem(ignoreCase, { time: this._time }); - fs._shadowRoot = this; - fs._cwd = this._cwd; - return fs; - } - - /** - * Gets or sets the timestamp (in milliseconds) used for file status, returning the previous timestamp. - * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/time.html - */ - public time(value?: number): number { - if (value !== undefined) { - if (this.isReadonly) throw createIOError("EPERM"); - this._time = value; - } - else if (!this.isReadonly) { - this._time += timeIncrements; - } - return this._time; - } - - /** - * Gets the metadata object for a path. - * @param path - */ - public filemeta(path: string): collections.Metadata { - const { node } = this._walk(this._resolve(path)); - if (!node) throw createIOError("ENOENT"); - return this._filemeta(node); - } - - private _filemeta(node: Inode): collections.Metadata { - if (!node.meta) { - const parentMeta = node.shadowRoot && this._shadowRoot && this._shadowRoot._filemeta(node.shadowRoot); - node.meta = new collections.Metadata(parentMeta); - } - return node.meta; - } - - /** - * Get the pathname of the current working directory. - * - * @link - http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html - */ - public cwd() { - if (!this._cwd) throw new Error("The current working directory has not been set."); - const { node } = this._walk(this._cwd); - if (!node) throw createIOError("ENOENT"); - if (!isDirectory(node)) throw createIOError("ENOTDIR"); - return this._cwd; - } - - /** - * Changes the current working directory. - * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/chdir.html - */ - public chdir(path: string) { - if (this.isReadonly) throw createIOError("EPERM"); - path = this._resolve(path); - const { node } = this._walk(path); - if (!node) throw createIOError("ENOENT"); - if (!isDirectory(node)) throw createIOError("ENOTDIR"); - this._cwd = path; - } - - /** - * Pushes the current directory onto the directory stack and changes the current working directory to the supplied path. - */ - public pushd(path?: string) { - if (this.isReadonly) throw createIOError("EPERM"); - if (path) path = this._resolve(path); - if (this._cwd) { - if (!this._dirStack) this._dirStack = []; - this._dirStack.push(this._cwd); - } - if (path && path !== this._cwd) { - this.chdir(path); - } - } - - /** - * Pops the previous directory from the location stack and changes the current directory to that directory. - */ - public popd() { - if (this.isReadonly) throw createIOError("EPERM"); - const path = this._dirStack && this._dirStack.pop(); - if (path) { - this.chdir(path); - } - } - - /** - * Update the file system with a set of files. - */ - public apply(files: FileSet) { - this._applyFiles(files, this._cwd); - } - - /** - * Scan file system entries along a path. If `path` is a symbolic link, it is dereferenced. - * @param path The path at which to start the scan. - * @param axis The axis along which to traverse. - * @param traversal The traversal scheme to use. - */ - public scanSync(path: string, axis: Axis, traversal: Traversal) { - path = this._resolve(path); - const results: string[] = []; - this._scan(path, this._stat(this._walk(path)), axis, traversal, /*noFollow*/ false, results); - return results; - } - - /** - * Scan file system entries along a path. - * @param path The path at which to start the scan. - * @param axis The axis along which to traverse. - * @param traversal The traversal scheme to use. - */ - public lscanSync(path: string, axis: Axis, traversal: Traversal) { - path = this._resolve(path); - const results: string[] = []; - this._scan(path, this._stat(this._walk(path, /*noFollow*/ true)), axis, traversal, /*noFollow*/ true, results); - return results; - } - - private _scan(path: string, stats: Stats, axis: Axis, traversal: Traversal, noFollow: boolean, results: string[]) { - if (axis === "ancestors-or-self" || axis === "self" || axis === "descendants-or-self") { - if (!traversal.accept || traversal.accept(path, stats)) { - results.push(path); - } - } - if (axis === "ancestors-or-self" || axis === "ancestors") { - const dirname = vpath.dirname(path); - if (dirname !== path) { - try { - const stats = this._stat(this._walk(dirname, noFollow)); - if (!traversal.traverse || traversal.traverse(dirname, stats)) { - this._scan(dirname, stats, "ancestors-or-self", traversal, noFollow, results); - } - } - catch { /*ignored*/ } - } - } - if (axis === "descendants-or-self" || axis === "descendants") { - if (stats.isDirectory() && (!traversal.traverse || traversal.traverse(path, stats))) { - for (const file of this.readdirSync(path)) { - try { - const childpath = vpath.combine(path, file); - const stats = this._stat(this._walk(childpath, noFollow)); - this._scan(childpath, stats, "descendants-or-self", traversal, noFollow, results); - } - catch { /*ignored*/ } - } - } - } - } - - /** - * Mounts a physical or virtual file system at a location in this virtual file system. - * - * @param source The path in the physical (or other virtual) file system. - * @param target The path in this virtual file system. - * @param resolver An object used to resolve files in `source`. - */ - public mountSync(source: string, target: string, resolver: FileSystemResolver) { - if (this.isReadonly) throw createIOError("EROFS"); - - source = vpath.validate(source, vpath.ValidationFlags.Absolute); - - const { parent, links, node: existingNode, basename } = this._walk(this._resolve(target), /*noFollow*/ true); - if (existingNode) throw createIOError("EEXIST"); - - const time = this.time(); - const node = this._mknod(parent ? parent.dev : ++devCount, S_IFDIR, /*mode*/ 0o777, time); - node.source = source; - node.resolver = resolver; - this._addLink(parent, links, basename, node, time); - } - - /** - * Recursively remove all files and directories underneath the provided path. - */ - public rimrafSync(path: string) { - try { - const stats = this.lstatSync(path); - if (stats.isFile() || stats.isSymbolicLink()) { - this.unlinkSync(path); - } - else if (stats.isDirectory()) { - for (const file of this.readdirSync(path)) { - this.rimrafSync(vpath.combine(path, file)); - } - this.rmdirSync(path); - } - } - catch (e) { - if (e.code === "ENOENT") return; - throw e; - } - } - - /** - * Make a directory and all of its parent paths (if they don't exist). - */ - public mkdirpSync(path: string) { - path = this._resolve(path); - const result = this._walk(path, /*noFollow*/ true, (error, result) => { - if (error.code === "ENOENT") { - this._mkdir(result); - return "retry"; - } - return "throw"; - }); - - if (!result.node) this._mkdir(result); - } - - public getFileListing(): string { - let result = ""; - const printLinks = (dirname: string | undefined, links: collections.SortedMap) => { - const iterator = collections.getIterator(links); - try { - for (let i = collections.nextResult(iterator); i; i = collections.nextResult(iterator)) { - const [name, node] = i.value; - const path = dirname ? vpath.combine(dirname, name) : name; - const marker = vpath.compare(this._cwd, path, this.ignoreCase) === 0 ? "*" : " "; - if (result) result += "\n"; - result += marker; - if (isDirectory(node)) { - result += vpath.addTrailingSeparator(path); - printLinks(path, this._getLinks(node)); - } - else if (isFile(node)) { - result += path; - } - else if (isSymlink(node)) { - result += path + " -> " + node.symlink; - } - } - } - finally { - collections.closeIterator(iterator); - } - }; - printLinks(/*dirname*/ undefined, this._getRootLinks()); - return result; - } - - /** - * Print diagnostic information about the structure of the file system to the console. - */ - public debugPrint(): void { - console.log(this.getFileListing()); - } - - // POSIX API (aligns with NodeJS "fs" module API) - - /** - * Determines whether a path exists. - */ - public existsSync(path: string) { - const result = this._walk(this._resolve(path), /*noFollow*/ true, () => "stop"); - return result !== undefined && result.node !== undefined; - } - - /** - * Get file status. If `path` is a symbolic link, it is dereferenced. - * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/stat.html - * - * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. - */ - public statSync(path: string) { - return this._stat(this._walk(this._resolve(path))); - } - - /** - * Change file access times - * - * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. - */ - public utimesSync(path: string, atime: Date, mtime: Date) { - if (this.isReadonly) throw createIOError("EROFS"); - if (!isFinite(+atime) || !isFinite(+mtime)) throw createIOError("EINVAL"); - - const entry = this._walk(this._resolve(path)); - if (!entry || !entry.node) { - throw createIOError("ENOENT"); - } - entry.node.atimeMs = +atime; - entry.node.mtimeMs = +mtime; - entry.node.ctimeMs = this.time(); - } - - /** - * Get file status. If `path` is a symbolic link, it is dereferenced. - * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/lstat.html - * - * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. - */ - public lstatSync(path: string) { - return this._stat(this._walk(this._resolve(path), /*noFollow*/ true)); - } - - private _stat(entry: WalkResult) { - const node = entry.node; - if (!node) throw createIOError(`ENOENT`, entry.realpath); - return new Stats( - node.dev, - node.ino, - node.mode, - node.nlink, - /*rdev*/ 0, - /*size*/ isFile(node) ? this._getSize(node) : isSymlink(node) ? node.symlink.length : 0, - /*blksize*/ 4096, - /*blocks*/ 0, - node.atimeMs, - node.mtimeMs, - node.ctimeMs, - node.birthtimeMs, - ); - } - - /** - * Read a directory. If `path` is a symbolic link, it is dereferenced. - * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html - * - * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. - */ - public readdirSync(path: string) { - const { node } = this._walk(this._resolve(path)); - if (!node) throw createIOError("ENOENT"); - if (!isDirectory(node)) throw createIOError("ENOTDIR"); - return Array.from(this._getLinks(node).keys()); - } - - /** - * Make a directory. - * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/mkdir.html - * - * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. - */ - public mkdirSync(path: string) { - if (this.isReadonly) throw createIOError("EROFS"); - - this._mkdir(this._walk(this._resolve(path), /*noFollow*/ true)); - } - - private _mkdir({ parent, links, node: existingNode, basename }: WalkResult) { - if (existingNode) throw createIOError("EEXIST"); - const time = this.time(); - const node = this._mknod(parent ? parent.dev : ++devCount, S_IFDIR, /*mode*/ 0o777, time); - this._addLink(parent, links, basename, node, time); - } - - /** - * Remove a directory. - * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/rmdir.html - * - * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. - */ - public rmdirSync(path: string) { - if (this.isReadonly) throw createIOError("EROFS"); - path = this._resolve(path); - - const { parent, links, node, basename } = this._walk(path, /*noFollow*/ true); - if (!parent) throw createIOError("EPERM"); - if (!isDirectory(node)) throw createIOError("ENOTDIR"); - if (this._getLinks(node).size !== 0) throw createIOError("ENOTEMPTY"); - - this._removeLink(parent, links, basename, node); - } - - /** - * Link one file to another file (also known as a "hard link"). - * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html - * - * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. - */ - public linkSync(oldpath: string, newpath: string) { - if (this.isReadonly) throw createIOError("EROFS"); - - const { node } = this._walk(this._resolve(oldpath)); - if (!node) throw createIOError("ENOENT"); - if (isDirectory(node)) throw createIOError("EPERM"); - - const { parent, links, basename, node: existingNode } = this._walk(this._resolve(newpath), /*noFollow*/ true); - if (!parent) throw createIOError("EPERM"); - if (existingNode) throw createIOError("EEXIST"); - - this._addLink(parent, links, basename, node); - } - - /** - * Remove a directory entry. - * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/unlink.html - * - * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. - */ - public unlinkSync(path: string) { - if (this.isReadonly) throw createIOError("EROFS"); - - const { parent, links, node, basename } = this._walk(this._resolve(path), /*noFollow*/ true); - if (!parent) throw createIOError("EPERM"); - if (!node) throw createIOError("ENOENT"); - if (isDirectory(node)) throw createIOError("EISDIR"); - - this._removeLink(parent, links, basename, node); - } - - /** - * Rename a file. - * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html - * - * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. - */ - public renameSync(oldpath: string, newpath: string) { - if (this.isReadonly) throw createIOError("EROFS"); - - const { parent: oldParent, links: oldParentLinks, node, basename: oldBasename } = this._walk(this._resolve(oldpath), /*noFollow*/ true); - if (!oldParent) throw createIOError("EPERM"); - if (!node) throw createIOError("ENOENT"); - - const { parent: newParent, links: newParentLinks, node: existingNode, basename: newBasename } = this._walk(this._resolve(newpath), /*noFollow*/ true); - if (!newParent) throw createIOError("EPERM"); - - const time = this.time(); - if (existingNode) { - if (isDirectory(node)) { - if (!isDirectory(existingNode)) throw createIOError("ENOTDIR"); - // if both old and new arguments point to the same directory, just pass. So we could rename /src/a/1 to /src/A/1 in Win. - // if not and the directory pointed by the new path is not empty, throw an error. - if (this.stringComparer(oldpath, newpath) !== 0 && this._getLinks(existingNode).size > 0) throw createIOError("ENOTEMPTY"); - } - else { - if (isDirectory(existingNode)) throw createIOError("EISDIR"); - } - this._removeLink(newParent, newParentLinks, newBasename, existingNode, time); - } - - this._replaceLink(oldParent, oldParentLinks, oldBasename, newParent, newParentLinks, newBasename, node, time); - } - - /** - * Make a symbolic link. - * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/symlink.html - * - * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. - */ - public symlinkSync(target: string, linkpath: string) { - if (this.isReadonly) throw createIOError("EROFS"); - - const { parent, links, node: existingNode, basename } = this._walk(this._resolve(linkpath), /*noFollow*/ true); - if (!parent) throw createIOError("EPERM"); - if (existingNode) throw createIOError("EEXIST"); - - const time = this.time(); - const node = this._mknod(parent.dev, S_IFLNK, /*mode*/ 0o666, time); - node.symlink = vpath.validate(target, vpath.ValidationFlags.RelativeOrAbsolute); - this._addLink(parent, links, basename, node, time); - } - - /** - * Resolve a pathname. - * - * @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html - * - * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. - */ - public realpathSync(path: string) { - const { realpath } = this._walk(this._resolve(path)); - return realpath; - } - - /** - * Read from a file. - * - * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. - */ - public readFileSync(path: string, encoding?: null): Buffer; - /** - * Read from a file. - * - * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. - */ - public readFileSync(path: string, encoding: BufferEncoding): string; - /** - * Read from a file. - * - * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. - */ - public readFileSync(path: string, encoding?: BufferEncoding | null): string | Buffer; - public readFileSync(path: string, encoding: BufferEncoding | null = null) { // eslint-disable-line no-null/no-null - const { node } = this._walk(this._resolve(path)); - if (!node) throw createIOError("ENOENT"); - if (isDirectory(node)) throw createIOError("EISDIR"); - if (!isFile(node)) throw createIOError("EBADF"); - - const buffer = this._getBuffer(node).slice(); - return encoding ? buffer.toString(encoding) : buffer; - } - - /** - * Write to a file. - * - * NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module. - */ - // eslint-disable-next-line no-null/no-null - public writeFileSync(path: string, data: string | Buffer, encoding: string | null = null) { - if (this.isReadonly) throw createIOError("EROFS"); - - const { parent, links, node: existingNode, basename } = this._walk(this._resolve(path), /*noFollow*/ false); - if (!parent) throw createIOError("EPERM"); - - const time = this.time(); - let node = existingNode; - if (!node) { - node = this._mknod(parent.dev, S_IFREG, 0o666, time); - this._addLink(parent, links, basename, node, time); - } - - if (isDirectory(node)) throw createIOError("EISDIR"); - if (!isFile(node)) throw createIOError("EBADF"); - node.buffer = Buffer.isBuffer(data) ? data.slice() : sys.bufferFrom!("" + data, encoding || "utf8") as Buffer; - node.size = node.buffer.byteLength; - node.mtimeMs = time; - node.ctimeMs = time; - } - - /** - * Generates a `FileSet` patch containing all the entries in this `FileSystem` that are not in `base`. - * @param base The base file system. If not provided, this file system's `shadowRoot` is used (if present). - */ - public diff(base?: FileSystem | undefined, options: DiffOptions = {}) { - if (!base && !options.baseIsNotShadowRoot) base = this.shadowRoot; - const differences: FileSet = {}; - const hasDifferences = base ? - FileSystem.rootDiff(differences, this, base, options) : - FileSystem.trackCreatedInodes(differences, this, this._getRootLinks()); - return hasDifferences ? differences : undefined; - } - - /** - * Generates a `FileSet` patch containing all the entries in `changed` that are not in `base`. - */ - public static diff(changed: FileSystem, base: FileSystem, options: DiffOptions = {}) { - const differences: FileSet = {}; - return FileSystem.rootDiff(differences, changed, base, options) ? - differences : - undefined; - } - - private static diffWorker(container: FileSet, changed: FileSystem, changedLinks: ReadonlyMap | undefined, base: FileSystem, baseLinks: ReadonlyMap | undefined, options: DiffOptions) { - if (changedLinks && !baseLinks) return FileSystem.trackCreatedInodes(container, changed, changedLinks); - if (baseLinks && !changedLinks) return FileSystem.trackDeletedInodes(container, baseLinks); - if (changedLinks && baseLinks) { - let hasChanges = false; - // track base items missing in changed - baseLinks.forEach((node, basename) => { - if (!changedLinks.has(basename)) { - container[basename] = isDirectory(node) ? new Rmdir() : new Unlink(); - hasChanges = true; - } - }); - // track changed items missing or differing in base - changedLinks.forEach((changedNode, basename) => { - const baseNode = baseLinks.get(basename); - if (baseNode) { - if (isDirectory(changedNode) && isDirectory(baseNode)) { - return hasChanges = FileSystem.directoryDiff(container, basename, changed, changedNode, base, baseNode, options) || hasChanges; - } - if (isFile(changedNode) && isFile(baseNode)) { - return hasChanges = FileSystem.fileDiff(container, basename, changed, changedNode, base, baseNode, options) || hasChanges; - } - if (isSymlink(changedNode) && isSymlink(baseNode)) { - return hasChanges = FileSystem.symlinkDiff(container, basename, changedNode, baseNode) || hasChanges; - } - } - return hasChanges = FileSystem.trackCreatedInode(container, basename, changed, changedNode) || hasChanges; - }); - return hasChanges; - } - return false; - } - - private static rootDiff(container: FileSet, changed: FileSystem, base: FileSystem, options: DiffOptions) { - while (!changed._lazy.links && changed._shadowRoot) changed = changed._shadowRoot; - while (!base._lazy.links && base._shadowRoot) base = base._shadowRoot; - - // no difference if the file systems are the same reference - if (changed === base) return false; - - // no difference if the root links are empty and unshadowed - if (!changed._lazy.links && !changed._shadowRoot && !base._lazy.links && !base._shadowRoot) return false; - - return FileSystem.diffWorker(container, changed, changed._getRootLinks(), base, base._getRootLinks(), options); - } - - private static directoryDiff(container: FileSet, basename: string, changed: FileSystem, changedNode: DirectoryInode, base: FileSystem, baseNode: DirectoryInode, options: DiffOptions) { - while (!changedNode.links && changedNode.shadowRoot) changedNode = changedNode.shadowRoot; - while (!baseNode.links && baseNode.shadowRoot) baseNode = baseNode.shadowRoot; - - // no difference if the nodes are the same reference - if (changedNode === baseNode) return false; - - // no difference if both nodes are non shadowed and have no entries - if (isEmptyNonShadowedDirectory(changedNode) && isEmptyNonShadowedDirectory(baseNode)) return false; - - // no difference if both nodes are unpopulated and point to the same mounted file system - if ( - !changedNode.links && !baseNode.links && - changedNode.resolver && changedNode.source !== undefined && - baseNode.resolver === changedNode.resolver && baseNode.source === changedNode.source - ) return false; - - // no difference if both nodes have identical children - const children: FileSet = {}; - if (!FileSystem.diffWorker(children, changed, changed._getLinks(changedNode), base, base._getLinks(baseNode), options)) { - return false; - } - - container[basename] = new Directory(children); - return true; - } - - private static fileDiff(container: FileSet, basename: string, changed: FileSystem, changedNode: FileInode, base: FileSystem, baseNode: FileInode, options: DiffOptions) { - while (!changedNode.buffer && changedNode.shadowRoot) changedNode = changedNode.shadowRoot; - while (!baseNode.buffer && baseNode.shadowRoot) baseNode = baseNode.shadowRoot; - - // no difference if the nodes are the same reference - if (changedNode === baseNode) return false; - - // no difference if both nodes are non shadowed and have no entries - if (isEmptyNonShadowedFile(changedNode) && isEmptyNonShadowedFile(baseNode)) return false; - - // no difference if both nodes are unpopulated and point to the same mounted file system - if ( - !changedNode.buffer && !baseNode.buffer && - changedNode.resolver && changedNode.source !== undefined && - baseNode.resolver === changedNode.resolver && baseNode.source === changedNode.source - ) return false; - - const changedBuffer = changed._getBuffer(changedNode); - const baseBuffer = base._getBuffer(baseNode); - - // no difference if both buffers are the same reference - if (changedBuffer === baseBuffer) { - if (!options.includeChangedFileWithSameContent || changedNode.mtimeMs === baseNode.mtimeMs) return false; - container[basename] = new SameFileWithModifiedTime(changedBuffer); - return true; - } - - // no difference if both buffers are identical - if (Buffer.compare(changedBuffer, baseBuffer) === 0) { - if (!options.includeChangedFileWithSameContent) return false; - container[basename] = new SameFileContentFile(changedBuffer); - return true; - } - - container[basename] = new File(changedBuffer); - return true; - } - - private static symlinkDiff(container: FileSet, basename: string, changedNode: SymlinkInode, baseNode: SymlinkInode) { - // no difference if the nodes are the same reference - if (changedNode.symlink === baseNode.symlink) return false; - container[basename] = new Symlink(changedNode.symlink); - return true; - } - - private static trackCreatedInode(container: FileSet, basename: string, changed: FileSystem, node: Inode) { - if (isDirectory(node)) { - const children: FileSet = {}; - FileSystem.trackCreatedInodes(children, changed, changed._getLinks(node)); - container[basename] = new Directory(children); - } - else if (isSymlink(node)) { - container[basename] = new Symlink(node.symlink); - } - else { - container[basename] = new File(changed._getBuffer(node)); - } - return true; - } - - private static trackCreatedInodes(container: FileSet, changed: FileSystem, changedLinks: ReadonlyMap) { - // no difference if links are empty - if (!changedLinks.size) return false; - - changedLinks.forEach((node, basename) => { - FileSystem.trackCreatedInode(container, basename, changed, node); - }); - return true; - } - - private static trackDeletedInodes(container: FileSet, baseLinks: ReadonlyMap) { - // no difference if links are empty - if (!baseLinks.size) return false; - baseLinks.forEach((node, basename) => { - container[basename] = isDirectory(node) ? new Rmdir() : new Unlink(); - }); - return true; - } - - private _mknod(dev: number, type: typeof S_IFREG, mode: number, time?: number): FileInode; - private _mknod(dev: number, type: typeof S_IFDIR, mode: number, time?: number): DirectoryInode; - private _mknod(dev: number, type: typeof S_IFLNK, mode: number, time?: number): SymlinkInode; - private _mknod(dev: number, type: number, mode: number, time = this.time()) { - return { - dev, - ino: ++inoCount, - mode: (mode & ~S_IFMT & ~0o022 & 0o7777) | (type & S_IFMT), - atimeMs: time, - mtimeMs: time, - ctimeMs: time, - birthtimeMs: time, - nlink: 0, - } as Inode; - } - - private _addLink(parent: DirectoryInode | undefined, links: collections.SortedMap, name: string, node: Inode, time = this.time()) { - links.set(name, node); - node.nlink++; - node.ctimeMs = time; - if (parent) parent.mtimeMs = time; - if (!parent && !this._cwd) this._cwd = name; - } - - private _removeLink(parent: DirectoryInode | undefined, links: collections.SortedMap, name: string, node: Inode, time = this.time()) { - links.delete(name); - node.nlink--; - node.ctimeMs = time; - if (parent) parent.mtimeMs = time; - } - - private _replaceLink(oldParent: DirectoryInode, oldLinks: collections.SortedMap, oldName: string, newParent: DirectoryInode, newLinks: collections.SortedMap, newName: string, node: Inode, time: number) { - if (oldParent !== newParent) { - this._removeLink(oldParent, oldLinks, oldName, node, time); - this._addLink(newParent, newLinks, newName, node, time); - } - else { - oldLinks.delete(oldName); - oldLinks.set(newName, node); - oldParent.mtimeMs = time; - newParent.mtimeMs = time; - } - } - - private _getRootLinks() { - if (!this._lazy.links) { - this._lazy.links = new collections.SortedMap(this.stringComparer); - if (this._shadowRoot) { - this._copyShadowLinks(this._shadowRoot._getRootLinks(), this._lazy.links); - } - } - return this._lazy.links; - } - - private _getLinks(node: DirectoryInode) { - if (!node.links) { - const links = new collections.SortedMap(this.stringComparer); - const { source, resolver } = node; - if (source && resolver) { - node.source = undefined; - node.resolver = undefined; - for (const name of resolver.readdirSync(source)) { - const path = vpath.combine(source, name); - const stats = resolver.statSync(path); - switch (stats.mode & S_IFMT) { - case S_IFDIR: - const dir = this._mknod(node.dev, S_IFDIR, 0o777); - dir.source = vpath.combine(source, name); - dir.resolver = resolver; - this._addLink(node, links, name, dir); - break; - case S_IFREG: - const file = this._mknod(node.dev, S_IFREG, 0o666); - file.source = vpath.combine(source, name); - file.resolver = resolver; - file.size = stats.size; - this._addLink(node, links, name, file); - break; - } - } - } - else if (this._shadowRoot && node.shadowRoot) { - this._copyShadowLinks(this._shadowRoot._getLinks(node.shadowRoot), links); - } - node.links = links; - } - return node.links; - } - - private _getShadow(root: DirectoryInode): DirectoryInode; - private _getShadow(root: Inode): Inode; - private _getShadow(root: Inode) { - const shadows = this._lazy.shadows || (this._lazy.shadows = new Map()); - - let shadow = shadows.get(root.ino); - if (!shadow) { - shadow = { - dev: root.dev, - ino: root.ino, - mode: root.mode, - atimeMs: root.atimeMs, - mtimeMs: root.mtimeMs, - ctimeMs: root.ctimeMs, - birthtimeMs: root.birthtimeMs, - nlink: root.nlink, - shadowRoot: root, - } as Inode; - - if (isSymlink(root)) (shadow as SymlinkInode).symlink = root.symlink; - shadows.set(shadow.ino, shadow); - } - - return shadow; - } - - private _copyShadowLinks(source: ReadonlyMap, target: collections.SortedMap) { - const iterator = collections.getIterator(source); - try { - for (let i = collections.nextResult(iterator); i; i = collections.nextResult(iterator)) { - const [name, root] = i.value; - target.set(name, this._getShadow(root)); - } - } - finally { - collections.closeIterator(iterator); - } - } - - private _getSize(node: FileInode): number { - if (node.buffer) return node.buffer.byteLength; - if (node.size !== undefined) return node.size; - if (node.source && node.resolver) return node.size = node.resolver.statSync(node.source).size; - if (this._shadowRoot && node.shadowRoot) return node.size = this._shadowRoot._getSize(node.shadowRoot); - return 0; - } - - private _getBuffer(node: FileInode): Buffer { - if (!node.buffer) { - const { source, resolver } = node; - if (source && resolver) { - node.source = undefined; - node.resolver = undefined; - node.size = undefined; - node.buffer = resolver.readFileSync(source); - } - else if (this._shadowRoot && node.shadowRoot) { - node.buffer = this._shadowRoot._getBuffer(node.shadowRoot); - } - else { - node.buffer = Buffer.allocUnsafe(0); - } - } - return node.buffer; - } - - /** - * Walk a path to its end. - * - * @param path The path to follow. - * @param noFollow A value indicating whether to *not* dereference a symbolic link at the - * end of a path. - * - * @link http://man7.org/linux/man-pages/man7/path_resolution.7.html - */ - private _walk(path: string, noFollow?: boolean, onError?: (error: NodeJS.ErrnoException, fragment: WalkResult) => "retry" | "throw"): WalkResult; - private _walk(path: string, noFollow?: boolean, onError?: (error: NodeJS.ErrnoException, fragment: WalkResult) => "stop" | "retry" | "throw"): WalkResult | undefined; - private _walk(path: string, noFollow?: boolean, onError?: (error: NodeJS.ErrnoException, fragment: WalkResult) => "stop" | "retry" | "throw"): WalkResult | undefined { - let links = this._getRootLinks(); - let parent: DirectoryInode | undefined; - let components = vpath.parse(path); - let step = 0; - let depth = 0; - let retry = false; - while (true) { - if (depth >= 40) throw createIOError("ELOOP"); - const lastStep = step === components.length - 1; - let basename = components[step]; - const linkEntry = links.getEntry(basename); - if (linkEntry) { - components[step] = basename = linkEntry[0]; - } - const node = linkEntry?.[1]; - if (lastStep && (noFollow || !isSymlink(node))) { - return { realpath: vpath.format(components), basename, parent, links, node }; - } - if (node === undefined) { - if (trapError(createIOError("ENOENT"), node)) continue; - return undefined; - } - if (isSymlink(node)) { - const dirname = vpath.format(components.slice(0, step)); - const symlink = vpath.resolve(dirname, node.symlink); - links = this._getRootLinks(); - parent = undefined; - components = vpath.parse(symlink).concat(components.slice(step + 1)); - step = 0; - depth++; - retry = false; - continue; - } - if (isDirectory(node)) { - links = this._getLinks(node); - parent = node; - step++; - retry = false; - continue; - } - if (trapError(createIOError("ENOTDIR"), node)) continue; - return undefined; - } - - function trapError(error: NodeJS.ErrnoException, node?: Inode) { - const realpath = vpath.format(components.slice(0, step + 1)); - const basename = components[step]; - const result = !retry && onError ? onError(error, { realpath, basename, parent, links, node }) : "throw"; - if (result === "stop") return false; - if (result === "retry") { - retry = true; - return true; - } - throw error; - } - } - - /** - * Resolve a path relative to the current working directory. - */ - private _resolve(path: string) { - return this._cwd - ? vpath.resolve(this._cwd, vpath.validate(path, vpath.ValidationFlags.RelativeOrAbsolute | vpath.ValidationFlags.AllowWildcard)) - : vpath.validate(path, vpath.ValidationFlags.Absolute | vpath.ValidationFlags.AllowWildcard); - } - - private _applyFiles(files: FileSet, dirname: string) { - const deferred: [Symlink | Link | Mount, string][] = []; - this._applyFilesWorker(files, dirname, deferred); - for (const [entry, path] of deferred) { - this.mkdirpSync(vpath.dirname(path)); - this.pushd(vpath.dirname(path)); - if (entry instanceof Symlink) { - if (this.stringComparer(vpath.dirname(path), path) === 0) { - throw new TypeError("Roots cannot be symbolic links."); - } - this.symlinkSync(vpath.resolve(dirname, entry.symlink), path); - this._applyFileExtendedOptions(path, entry); - } - else if (entry instanceof Link) { - if (this.stringComparer(vpath.dirname(path), path) === 0) { - throw new TypeError("Roots cannot be hard links."); - } - this.linkSync(entry.path, path); - } - else { - this.mountSync(entry.source, path, entry.resolver); - this._applyFileExtendedOptions(path, entry); - } - this.popd(); - } - } - - private _applyFileExtendedOptions(path: string, entry: Directory | File | Symlink | Mount) { - const { meta } = entry; - if (meta !== undefined) { - const filemeta = this.filemeta(path); - for (const key of Object.keys(meta)) { - filemeta.set(key, meta[key]); - } - } - } - - private _applyFilesWorker(files: FileSet, dirname: string, deferred: [Symlink | Link | Mount, string][]) { - for (const key of Object.keys(files)) { - const value = normalizeFileSetEntry(files[key]); - const path = dirname ? vpath.resolve(dirname, key) : key; - vpath.validate(path, vpath.ValidationFlags.Absolute); - - // eslint-disable-next-line no-null/no-null - if (value === null || value === undefined || value instanceof Rmdir || value instanceof Unlink) { - if (this.stringComparer(vpath.dirname(path), path) === 0) { - throw new TypeError("Roots cannot be deleted."); - } - this.rimrafSync(path); - } - else if (value instanceof File) { - if (this.stringComparer(vpath.dirname(path), path) === 0) { - throw new TypeError("Roots cannot be files."); - } - this.mkdirpSync(vpath.dirname(path)); - this.writeFileSync(path, value.data, value.encoding); - this._applyFileExtendedOptions(path, value); - } - else if (value instanceof Directory) { - this.mkdirpSync(path); - this._applyFileExtendedOptions(path, value); - this._applyFilesWorker(value.files, path, deferred); - } - else { - deferred.push([value, path]); - } - } - } -} - -export interface FileSystemOptions { - // Sets the initial timestamp for new files and directories - time?: number; - - // A set of file system entries to initially add to the file system. - files?: FileSet; - - // Sets the initial working directory for the file system. - cwd?: string; - - // Sets initial metadata attached to the file system. - meta?: Record; -} - -export interface FileSystemCreateOptions extends FileSystemOptions { - // Sets the documents to add to the file system. - documents?: readonly documents.TextDocument[]; -} - -export type Axis = "ancestors" | "ancestors-or-self" | "self" | "descendants-or-self" | "descendants"; - -export interface Traversal { - /** A function called to choose whether to continue to traverse to either ancestors or descendants. */ - traverse?(path: string, stats: Stats): boolean; - /** A function called to choose whether to accept a path as part of the result. */ - accept?(path: string, stats: Stats): boolean; -} - -export interface FileSystemResolver { - statSync(path: string): { mode: number; size: number; }; - readdirSync(path: string): string[]; - readFileSync(path: string): Buffer; -} - -/** @internal */ -export interface FileSystemEntries { - readonly files: readonly string[]; - readonly directories: readonly string[]; -} - -export interface FileSystemResolverHost { - useCaseSensitiveFileNames(): boolean; - getAccessibleFileSystemEntries(path: string): FileSystemEntries; - directoryExists(path: string): boolean; - fileExists(path: string): boolean; - getFileSize(path: string): number; - readFile(path: string): string | undefined; - getWorkspaceRoot(): string; -} - -export function createResolver(host: FileSystemResolverHost): FileSystemResolver { - return { - readdirSync(path: string): string[] { - const { files, directories } = host.getAccessibleFileSystemEntries(path); - return directories.concat(files); - }, - statSync(path: string): { mode: number; size: number; } { - if (host.directoryExists(path)) { - return { mode: S_IFDIR | 0o777, size: 0 }; - } - else if (host.fileExists(path)) { - return { mode: S_IFREG | 0o666, size: host.getFileSize(path) }; - } - else { - throw new Error("ENOENT: path does not exist"); - } - }, - readFileSync(path: string): Buffer { - return sys.bufferFrom!(host.readFile(path)!, "utf8") as Buffer; // TODO: GH#18217 - }, - }; -} -namespace sys { - const Buffer: { - new (input: string, encoding?: string): any; - from?(input: string, encoding?: string): any; - } = require("buffer").Buffer; - - export function bufferFrom(input: string, encoding?: string): Buffer { - // See https://github.com/Microsoft/TypeScript/issues/25652 - return Buffer.from && Buffer.from !== Int8Array.from - ? Buffer.from(input, encoding) - : new Buffer(input, encoding); - } -} -/** - * Create a virtual file system from a physical file system using the following path mappings: - * - * - `/.ts` is a directory mapped to `${workspaceRoot}/built/local` - * - `/.lib` is a directory mapped to `${workspaceRoot}/tests/lib` - * - `/.src` is a virtual directory to be used for tests. - * - * Unless overridden, `/.src` will be the current working directory for the virtual file system. - */ -export function createFromFileSystem(host: FileSystemResolverHost, ignoreCase: boolean, { documents, files, cwd, time, meta }: FileSystemCreateOptions = {}) { - const fs = getBuiltLocal(host, ignoreCase).shadow(); - if (meta) { - for (const key of Object.keys(meta)) { - fs.meta.set(key, meta[key]); - } - } - if (time) { - fs.time(time); - } - if (cwd) { - fs.mkdirpSync(cwd); - fs.chdir(cwd); - } - if (documents) { - for (const document of documents) { - fs.mkdirpSync(vpath.dirname(document.file)); - fs.writeFileSync(document.file, document.text, "utf8"); - fs.filemeta(document.file).set("document", document); - // Add symlinks - const symlink = document.meta.get("symlink"); - if (symlink) { - for (const link of symlink.split(",").map(link => link.trim())) { - fs.mkdirpSync(vpath.dirname(link)); - fs.symlinkSync(vpath.resolve(fs.cwd(), document.file), link); - } - } - } - } - if (files) { - fs.apply(files); - } - return fs; -} - -export class Stats { - public dev: number; - public ino: number; - public mode: number; - public nlink: number; - public uid: number; - public gid: number; - public rdev: number; - public size: number; - public blksize: number; - public blocks: number; - public atimeMs: number; - public mtimeMs: number; - public ctimeMs: number; - public birthtimeMs: number; - public atime: Date; - public mtime: Date; - public ctime: Date; - public birthtime: Date; - - constructor(); - constructor(dev: number, ino: number, mode: number, nlink: number, rdev: number, size: number, blksize: number, blocks: number, atimeMs: number, mtimeMs: number, ctimeMs: number, birthtimeMs: number); - constructor(dev = 0, ino = 0, mode = 0, nlink = 0, rdev = 0, size = 0, blksize = 0, blocks = 0, atimeMs = 0, mtimeMs = 0, ctimeMs = 0, birthtimeMs = 0) { - this.dev = dev; - this.ino = ino; - this.mode = mode; - this.nlink = nlink; - this.uid = 0; - this.gid = 0; - this.rdev = rdev; - this.size = size; - this.blksize = blksize; - this.blocks = blocks; - this.atimeMs = atimeMs; - this.mtimeMs = mtimeMs; - this.ctimeMs = ctimeMs; - this.birthtimeMs = birthtimeMs; - this.atime = new Date(this.atimeMs); - this.mtime = new Date(this.mtimeMs); - this.ctime = new Date(this.ctimeMs); - this.birthtime = new Date(this.birthtimeMs); - } - - public isFile() { - return (this.mode & S_IFMT) === S_IFREG; - } - public isDirectory() { - return (this.mode & S_IFMT) === S_IFDIR; - } - public isSymbolicLink() { - return (this.mode & S_IFMT) === S_IFLNK; - } - public isBlockDevice() { - return (this.mode & S_IFMT) === S_IFBLK; - } - public isCharacterDevice() { - return (this.mode & S_IFMT) === S_IFCHR; - } - public isFIFO() { - return (this.mode & S_IFMT) === S_IFIFO; - } - public isSocket() { - return (this.mode & S_IFMT) === S_IFSOCK; - } -} - -export const IOErrorMessages = Object.freeze({ - EACCES: "access denied", - EIO: "an I/O error occurred", - ENOENT: "no such file or directory", - EEXIST: "file already exists", - ELOOP: "too many symbolic links encountered", - ENOTDIR: "no such directory", - EISDIR: "path is a directory", - EBADF: "invalid file descriptor", - EINVAL: "invalid value", - ENOTEMPTY: "directory not empty", - EPERM: "operation not permitted", - EROFS: "file system is read-only", -}); - -export function createIOError(code: keyof typeof IOErrorMessages, details = "") { - const err: NodeJS.ErrnoException = new Error(`${code}: ${IOErrorMessages[code]} ${details}`); - err.code = code; - if (Error.captureStackTrace) Error.captureStackTrace(err, createIOError); - return err; -} - -/** - * A template used to populate files, directories, links, etc. in a virtual file system. - */ -export interface FileSet { - [name: string]: DirectoryLike | FileLike | Link | Symlink | Mount | Rmdir | Unlink | null | undefined; -} - -export type DirectoryLike = FileSet | Directory; -export type FileLike = File | Buffer | string; - -/** Extended options for a directory in a `FileSet` */ -export class Directory { - public readonly files: FileSet; - public readonly meta: Record | undefined; - constructor(files: FileSet, { meta }: { meta?: Record; } = {}) { - this.files = files; - this.meta = meta; - } -} - -/** Extended options for a file in a `FileSet` */ -export class File { - public readonly data: Buffer | string; - public readonly encoding: string | undefined; - public readonly meta: Record | undefined; - constructor(data: Buffer | string, { meta, encoding }: { encoding?: string; meta?: Record; } = {}) { - this.data = data; - this.encoding = encoding; - this.meta = meta; - } -} - -export class SameFileContentFile extends File { - constructor(data: Buffer | string, metaAndEncoding?: { encoding?: string; meta?: Record; }) { - super(data, metaAndEncoding); - } -} - -export class SameFileWithModifiedTime extends File { - constructor(data: Buffer | string, metaAndEncoding?: { encoding?: string; meta?: Record; }) { - super(data, metaAndEncoding); - } -} - -/** Extended options for a hard link in a `FileSet` */ -export class Link { - public readonly path: string; - constructor(path: string) { - this.path = path; - } -} - -/** Removes a directory in a `FileSet` */ -export class Rmdir { - public _rmdirBrand?: never; // brand necessary for proper type guards -} - -/** Unlinks a file in a `FileSet` */ -export class Unlink { - public _unlinkBrand?: never; // brand necessary for proper type guards -} - -/** Extended options for a symbolic link in a `FileSet` */ -export class Symlink { - public readonly symlink: string; - public readonly meta: Record | undefined; - constructor(symlink: string, { meta }: { meta?: Record; } = {}) { - this.symlink = symlink; - this.meta = meta; - } -} - -/** Extended options for mounting a virtual copy of an external file system via a `FileSet` */ -export class Mount { - public readonly source: string; - public readonly resolver: FileSystemResolver; - public readonly meta: Record | undefined; - constructor(source: string, resolver: FileSystemResolver, { meta }: { meta?: Record; } = {}) { - this.source = source; - this.resolver = resolver; - this.meta = meta; - } -} - -// a generic POSIX inode -type Inode = FileInode | DirectoryInode | SymlinkInode; - -interface FileInode { - dev: number; // device id - ino: number; // inode id - mode: number; // file mode - atimeMs: number; // access time - mtimeMs: number; // modified time - ctimeMs: number; // status change time - birthtimeMs: number; // creation time - nlink: number; // number of hard links - size?: number; - buffer?: Buffer; - source?: string; - resolver?: FileSystemResolver; - shadowRoot?: FileInode; - meta?: collections.Metadata; -} - -interface DirectoryInode { - dev: number; // device id - ino: number; // inode id - mode: number; // file mode - atimeMs: number; // access time - mtimeMs: number; // modified time - ctimeMs: number; // status change time - birthtimeMs: number; // creation time - nlink: number; // number of hard links - links?: collections.SortedMap; - source?: string; - resolver?: FileSystemResolver; - shadowRoot?: DirectoryInode; - meta?: collections.Metadata; -} - -interface SymlinkInode { - dev: number; // device id - ino: number; // inode id - mode: number; // file mode - atimeMs: number; // access time - mtimeMs: number; // modified time - ctimeMs: number; // status change time - birthtimeMs: number; // creation time - nlink: number; // number of hard links - symlink: string; - shadowRoot?: SymlinkInode; - meta?: collections.Metadata; -} - -function isEmptyNonShadowedDirectory(node: DirectoryInode) { - return !node.links && !node.shadowRoot && !node.resolver && !node.source; -} - -function isEmptyNonShadowedFile(node: FileInode) { - return !node.buffer && !node.shadowRoot && !node.resolver && !node.source; -} - -function isFile(node: Inode | undefined): node is FileInode { - return node !== undefined && (node.mode & S_IFMT) === S_IFREG; -} - -function isDirectory(node: Inode | undefined): node is DirectoryInode { - return node !== undefined && (node.mode & S_IFMT) === S_IFDIR; -} - -function isSymlink(node: Inode | undefined): node is SymlinkInode { - return node !== undefined && (node.mode & S_IFMT) === S_IFLNK; -} - -interface WalkResult { - realpath: string; - basename: string; - parent: DirectoryInode | undefined; - links: collections.SortedMap; - node: Inode | undefined; -} - -let builtLocalHost: FileSystemResolverHost | undefined; -let builtLocalCI: FileSystem | undefined; -let builtLocalCS: FileSystem | undefined; - -function getBuiltLocal(host: FileSystemResolverHost, ignoreCase: boolean): FileSystem { - if (builtLocalHost !== host) { - builtLocalCI = undefined; - builtLocalCS = undefined; - builtLocalHost = host; - } - if (!builtLocalCI) { - const resolver = createResolver(host); - builtLocalCI = new FileSystem(/*ignoreCase*/ true, { - files: { - [builtFolder]: new Mount(vpath.resolve(host.getWorkspaceRoot(), "built/local"), resolver), - [testLibFolder]: new Mount(vpath.resolve(host.getWorkspaceRoot(), "tests/lib"), resolver), - [projectsFolder]: new Mount(vpath.resolve(host.getWorkspaceRoot(), "tests/projects"), resolver), - [srcFolder]: {}, - }, - cwd: srcFolder, - meta: { defaultLibLocation: builtFolder }, - }); - builtLocalCI.makeReadonly(); - } - if (ignoreCase) return builtLocalCI; - if (!builtLocalCS) { - builtLocalCS = builtLocalCI.shadow(/*ignoreCase*/ false); - builtLocalCS.makeReadonly(); - } - return builtLocalCS; -} - -/* eslint-disable no-null/no-null */ -function normalizeFileSetEntry(value: FileSet[string]) { - if ( - value === undefined || - value === null || - value instanceof Directory || - value instanceof File || - value instanceof Link || - value instanceof Symlink || - value instanceof Mount || - value instanceof Rmdir || - value instanceof Unlink - ) { - return value; - } - return typeof value === "string" || Buffer.isBuffer(value) ? new File(value) : new Directory(value); -} - -export function formatPatch(patch: FileSet): string; -export function formatPatch(patch: FileSet | undefined): string | null; -export function formatPatch(patch: FileSet | undefined) { - return patch ? formatPatchWorker("", patch) : null; -} -/* eslint-enable no-null/no-null */ - -function formatPatchWorker(dirname: string, container: FileSet): string { - let text = ""; - for (const name of Object.keys(container)) { - const entry = normalizeFileSetEntry(container[name]); - const file = dirname ? vpath.combine(dirname, name) : name; - // eslint-disable-next-line no-null/no-null - if (entry === null || entry === undefined || entry instanceof Unlink) { - text += `//// [${file}] unlink\r\n`; - } - else if (entry instanceof Rmdir) { - text += `//// [${vpath.addTrailingSeparator(file)}] rmdir\r\n`; - } - else if (entry instanceof Directory) { - text += formatPatchWorker(file, entry.files); - } - else if (entry instanceof SameFileWithModifiedTime) { - text += `//// [${file}] file changed its modified time\r\n`; - } - else if (entry instanceof SameFileContentFile) { - text += `//// [${file}] file written with same contents\r\n`; - } - else if (entry instanceof File) { - const content = typeof entry.data === "string" ? entry.data : entry.data.toString("utf8"); - text += `//// [${file}]\r\n${content}\r\n\r\n`; - } - else if (entry instanceof Link) { - text += `//// [${file}] link(${entry.path})\r\n`; - } - else if (entry instanceof Symlink) { - text += `//// [${file}] symlink(${entry.symlink})\r\n`; - } - else if (entry instanceof Mount) { - text += `//// [${file}] mount(${entry.source})\r\n`; - } - } - return text; -} - -export function iteratePatch(patch: FileSet | undefined): IterableIterator<[string, string]> | null { - // eslint-disable-next-line no-null/no-null - return patch ? Harness.iterateOutputs(iteratePatchWorker("", patch)) : null; -} - -function* iteratePatchWorker(dirname: string, container: FileSet): IterableIterator { - for (const name of Object.keys(container)) { - const entry = normalizeFileSetEntry(container[name]); - const file = dirname ? vpath.combine(dirname, name) : name; - if (entry instanceof Directory) { - yield* arrayFrom(iteratePatchWorker(file, entry.files)); - } - else if (entry instanceof File) { - const content = typeof entry.data === "string" ? entry.data : entry.data.toString("utf8"); - yield new documents.TextDocument(file, content); - } - } -} diff --git a/external-declarations/src/test-runner/tsc-infrastructure/vpath.ts b/external-declarations/src/test-runner/tsc-infrastructure/vpath.ts deleted file mode 100644 index f15cf2186c0ca..0000000000000 --- a/external-declarations/src/test-runner/tsc-infrastructure/vpath.ts +++ /dev/null @@ -1,370 +0,0 @@ -import { - Path, -} from "typescript"; - -import { - changeAnyExtension, - comparePaths, - comparePathsCaseInsensitive, - comparePathsCaseSensitive, - getAnyExtensionFromPath, - getBaseFileName, - getDirectoryPath, - getPathComponents, - getPathFromPathComponents, - getRelativePathFromDirectory, - isDiskPathRoot, - isRootedDiskPath, - reducePathComponents, - resolvePath, -} from "../../compiler/path-utils"; -import { - CharacterCodes, -} from "../../compiler/types"; -import { - hasJSFileExtension, - hasTSFileExtension, - isDeclarationFileName, -} from "../../compiler/utils"; -import * as vfs from "./vfs"; - -/** - * Internally, we represent paths as strings with '/' as the directory separator. - * When we make system calls (eg: LanguageServiceHost.getDirectory()), - * we expect the host to correctly handle paths in our specified format. - * - * @internal - */ -export const directorySeparator = "/"; -/** @internal */ -export const altDirectorySeparator = "\\"; -const urlSchemeSeparator = "://"; -const backslashRegExp = /\\/g; -export const sep = directorySeparator; - -/** - * Combines paths. If a path is absolute, it replaces any previous path. Relative paths are not simplified. - * - * ```ts - * // Non-rooted - * combinePaths("path", "to", "file.ext") === "path/to/file.ext" - * combinePaths("path", "dir", "..", "to", "file.ext") === "path/dir/../to/file.ext" - * // POSIX - * combinePaths("/path", "to", "file.ext") === "/path/to/file.ext" - * combinePaths("/path", "/to", "file.ext") === "/to/file.ext" - * // DOS - * combinePaths("c:/path", "to", "file.ext") === "c:/path/to/file.ext" - * combinePaths("c:/path", "c:/to", "file.ext") === "c:/to/file.ext" - * // URL - * combinePaths("file:///path", "to", "file.ext") === "file:///path/to/file.ext" - * combinePaths("file:///path", "file:///to", "file.ext") === "file:///to/file.ext" - * ``` - * - * @internal - */ -export function combine(path: string, ...paths: (string | undefined)[]): string { - if (path) path = normalizeSlashes(path); - for (let relativePath of paths) { - if (!relativePath) continue; - relativePath = normalizeSlashes(relativePath); - if (!path || getRootLength(relativePath) !== 0) { - path = relativePath; - } - else { - path = ensureTrailingDirectorySeparator(path) + relativePath; - } - } - return path; -} - -/** - * Normalize path separators, converting `\` into `/`. - * - * @internal - */ -export function normalizeSlashes(path: string): string { - return path.indexOf("\\") !== -1 - ? path.replace(backslashRegExp, directorySeparator) - : path; -} - -/** - * Adds a trailing directory separator to a path, if it does not already have one. - * - * ```ts - * ensureTrailingDirectorySeparator("/path/to/file.ext") === "/path/to/file.ext/" - * ensureTrailingDirectorySeparator("/path/to/file.ext/") === "/path/to/file.ext/" - * ``` - * - * @internal - */ -export function ensureTrailingDirectorySeparator(path: Path): Path; -/** @internal */ -export function ensureTrailingDirectorySeparator(path: string): string; -/** @internal */ -export function ensureTrailingDirectorySeparator(path: string) { - if (!hasTrailingDirectorySeparator(path)) { - return path + directorySeparator; - } - - return path; -} - -/** - * Determines whether a path has a trailing separator (`/` or `\\`). - * - * @internal - */ -export function hasTrailingDirectorySeparator(path: string) { - return path.length > 0 && isAnyDirectorySeparator(path.charCodeAt(path.length - 1)); -} -/** - * Determines whether a charCode corresponds to `/` or `\`. - * - * @internal - */ -export function isAnyDirectorySeparator(charCode: number): boolean { - return charCode === CharacterCodes.slash || charCode === CharacterCodes.backslash; -} - -/** - * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). - * - * For example: - * ```ts - * getRootLength("a") === 0 // "" - * getRootLength("/") === 1 // "/" - * getRootLength("c:") === 2 // "c:" - * getRootLength("c:d") === 0 // "" - * getRootLength("c:/") === 3 // "c:/" - * getRootLength("c:\\") === 3 // "c:\\" - * getRootLength("//server") === 7 // "//server" - * getRootLength("//server/share") === 8 // "//server/" - * getRootLength("\\\\server") === 7 // "\\\\server" - * getRootLength("\\\\server\\share") === 8 // "\\\\server\\" - * getRootLength("file:///path") === 8 // "file:///" - * getRootLength("file:///c:") === 10 // "file:///c:" - * getRootLength("file:///c:d") === 8 // "file:///" - * getRootLength("file:///c:/path") === 11 // "file:///c:/" - * getRootLength("file://server") === 13 // "file://server" - * getRootLength("file://server/path") === 14 // "file://server/" - * getRootLength("http://server") === 13 // "http://server" - * getRootLength("http://server/path") === 14 // "http://server/" - * ``` - * - * @internal - */ -export function getRootLength(path: string) { - const rootLength = getEncodedRootLength(path); - return rootLength < 0 ? ~rootLength : rootLength; -} - -/** - * Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files"). - * If the root is part of a URL, the twos-complement of the root length is returned. - */ -function getEncodedRootLength(path: string): number { - if (!path) return 0; - const ch0 = path.charCodeAt(0); - - // POSIX or UNC - if (ch0 === CharacterCodes.slash || ch0 === CharacterCodes.backslash) { - if (path.charCodeAt(1) !== ch0) return 1; // POSIX: "/" (or non-normalized "\") - - const p1 = path.indexOf(ch0 === CharacterCodes.slash ? directorySeparator : altDirectorySeparator, 2); - if (p1 < 0) return path.length; // UNC: "//server" or "\\server" - - return p1 + 1; // UNC: "//server/" or "\\server\" - } - - // DOS - if (isVolumeCharacter(ch0) && path.charCodeAt(1) === CharacterCodes.colon) { - const ch2 = path.charCodeAt(2); - if (ch2 === CharacterCodes.slash || ch2 === CharacterCodes.backslash) return 3; // DOS: "c:/" or "c:\" - if (path.length === 2) return 2; // DOS: "c:" (but not "c:d") - } - - // URL - const schemeEnd = path.indexOf(urlSchemeSeparator); - if (schemeEnd !== -1) { - const authorityStart = schemeEnd + urlSchemeSeparator.length; - const authorityEnd = path.indexOf(directorySeparator, authorityStart); - if (authorityEnd !== -1) { // URL: "file:///", "file://server/", "file://server/path" - // For local "file" URLs, include the leading DOS volume (if present). - // Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a - // special case interpreted as "the machine from which the URL is being interpreted". - const scheme = path.slice(0, schemeEnd); - const authority = path.slice(authorityStart, authorityEnd); - if ( - scheme === "file" && (authority === "" || authority === "localhost") && - isVolumeCharacter(path.charCodeAt(authorityEnd + 1)) - ) { - const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2); - if (volumeSeparatorEnd !== -1) { - if (path.charCodeAt(volumeSeparatorEnd) === CharacterCodes.slash) { - // URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/" - return ~(volumeSeparatorEnd + 1); - } - if (volumeSeparatorEnd === path.length) { - // URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a" - // but not "file:///c:d" or "file:///c%3ad" - return ~volumeSeparatorEnd; - } - } - } - return ~(authorityEnd + 1); // URL: "file://server/", "http://server/" - } - return ~path.length; // URL: "file://server", "http://server" - } - - // relative - return 0; -} - -function isVolumeCharacter(charCode: number) { - return (charCode >= CharacterCodes.a && charCode <= CharacterCodes.z) || - (charCode >= CharacterCodes.A && charCode <= CharacterCodes.Z); -} - -function getFileUrlVolumeSeparatorEnd(url: string, start: number) { - const ch0 = url.charCodeAt(start); - if (ch0 === CharacterCodes.colon) return start + 1; - if (ch0 === CharacterCodes.percent && url.charCodeAt(start + 1) === CharacterCodes._3) { - const ch2 = url.charCodeAt(start + 2); - if (ch2 === CharacterCodes.a || ch2 === CharacterCodes.A) return start + 3; - } - return -1; -} - -export const dirname = getDirectoryPath; -/** - * Removes a trailing directory separator from a path, if it does not already have one. - * - * ```ts - * removeTrailingDirectorySeparator("/path/to/file.ext") === "/path/to/file.ext" - * removeTrailingDirectorySeparator("/path/to/file.ext/") === "/path/to/file.ext" - * ``` - * - * @internal - */ -export function removeTrailingDirectorySeparator(path: Path): Path; -/** @internal */ -export function removeTrailingDirectorySeparator(path: string): string; -/** @internal */ -export function removeTrailingDirectorySeparator(path: string) { - if (hasTrailingDirectorySeparator(path)) { - return path.substr(0, path.length - 1); - } - - return path; -} -export const format = getPathFromPathComponents; -export const resolve = resolvePath; -export const compareCaseSensitive = comparePathsCaseSensitive; -export const compareCaseInsensitive = comparePathsCaseInsensitive; -export const isAbsolute = isRootedDiskPath; -export const isRoot = isDiskPathRoot; -export const parse = getPathComponents; -export const hasTrailingSeparator = hasTrailingDirectorySeparator; -export const reduce = reducePathComponents; -export const addTrailingSeparator = ensureTrailingDirectorySeparator; -export const compare = comparePaths; -export const relative = getRelativePathFromDirectory; -export const changeExtension = changeAnyExtension; -export const enum ValidationFlags { - None = 0, - - RequireRoot = 1 << 0, - RequireDirname = 1 << 1, - RequireBasename = 1 << 2, - RequireExtname = 1 << 3, - RequireTrailingSeparator = 1 << 4, - - AllowRoot = 1 << 5, - AllowDirname = 1 << 6, - AllowBasename = 1 << 7, - AllowExtname = 1 << 8, - AllowTrailingSeparator = 1 << 9, - AllowNavigation = 1 << 10, - AllowWildcard = 1 << 11, - - /** Path must be a valid directory root */ - Root = RequireRoot | AllowRoot | AllowTrailingSeparator, - - /** Path must be a absolute */ - Absolute = RequireRoot | AllowRoot | AllowDirname | AllowBasename | AllowExtname | AllowTrailingSeparator | AllowNavigation, - - /** Path may be relative or absolute */ - RelativeOrAbsolute = AllowRoot | AllowDirname | AllowBasename | AllowExtname | AllowTrailingSeparator | AllowNavigation, - - /** Path may only be a filename */ - Basename = RequireBasename | AllowExtname, -} - -export function validate(path: string, flags: ValidationFlags = ValidationFlags.RelativeOrAbsolute) { - const components = parse(path); - const trailing = hasTrailingSeparator(path); - if (!validateComponents(components, flags, trailing)) throw vfs.createIOError("ENOENT"); - return components.length > 1 && trailing ? format(reduce(components)) + sep : format(reduce(components)); -} - -const invalidRootComponentRegExp = /^(?!(\/|\/\/\w+\/|[a-zA-Z]:\/?|)$)/; -const invalidNavigableComponentRegExp = /[:*?"<>|]/; -const invalidNavigableComponentWithWildcardsRegExp = /[:"<>|]/; -const invalidNonNavigableComponentRegExp = /^\.{1,2}$|[:*?"<>|]/; -const invalidNonNavigableComponentWithWildcardsRegExp = /^\.{1,2}$|[:"<>|]/; -const extRegExp = /\.\w+$/; -function validateComponents(components: string[], flags: ValidationFlags, hasTrailingSeparator: boolean) { - const hasRoot = !!components[0]; - const hasDirname = components.length > 2; - const hasBasename = components.length > 1; - const hasExtname = hasBasename && extRegExp.test(components[components.length - 1]); - const invalidComponentRegExp = flags & ValidationFlags.AllowNavigation - ? flags & ValidationFlags.AllowWildcard ? invalidNavigableComponentWithWildcardsRegExp : invalidNavigableComponentRegExp - : flags & ValidationFlags.AllowWildcard ? invalidNonNavigableComponentWithWildcardsRegExp : invalidNonNavigableComponentRegExp; - - // Validate required components - if (flags & ValidationFlags.RequireRoot && !hasRoot) return false; - if (flags & ValidationFlags.RequireDirname && !hasDirname) return false; - if (flags & ValidationFlags.RequireBasename && !hasBasename) return false; - if (flags & ValidationFlags.RequireExtname && !hasExtname) return false; - if (flags & ValidationFlags.RequireTrailingSeparator && !hasTrailingSeparator) return false; - - // Required components indicate allowed components - if (flags & ValidationFlags.RequireRoot) flags |= ValidationFlags.AllowRoot; - if (flags & ValidationFlags.RequireDirname) flags |= ValidationFlags.AllowDirname; - if (flags & ValidationFlags.RequireBasename) flags |= ValidationFlags.AllowBasename; - if (flags & ValidationFlags.RequireExtname) flags |= ValidationFlags.AllowExtname; - if (flags & ValidationFlags.RequireTrailingSeparator) flags |= ValidationFlags.AllowTrailingSeparator; - - // Validate disallowed components - if (~flags & ValidationFlags.AllowRoot && hasRoot) return false; - if (~flags & ValidationFlags.AllowDirname && hasDirname) return false; - if (~flags & ValidationFlags.AllowBasename && hasBasename) return false; - if (~flags & ValidationFlags.AllowExtname && hasExtname) return false; - if (~flags & ValidationFlags.AllowTrailingSeparator && hasTrailingSeparator) return false; - - // Validate component strings - if (invalidRootComponentRegExp.test(components[0])) return false; - for (let i = 1; i < components.length; i++) { - if (invalidComponentRegExp.test(components[i])) return false; - } - - return true; -} - -export function isDeclaration(path: string) { - return isDeclarationFileName(path); -} - -export const isTypeScript = hasTSFileExtension; -export const isJavaScript = hasJSFileExtension; -export const extname = getAnyExtensionFromPath; -export const basename = getBaseFileName; - -export function isSourceMap(path: string) { - return extname(path, ".map", /*ignoreCase*/ false).length > 0; -} -export function isTsConfigFile(path: string): boolean { - return path.indexOf("tsconfig") !== -1 && path.indexOf("json") !== -1; -} diff --git a/external-declarations/src/test-runner/utils.ts b/external-declarations/src/test-runner/utils.ts deleted file mode 100644 index 6aaaa1cd9b999..0000000000000 --- a/external-declarations/src/test-runner/utils.ts +++ /dev/null @@ -1,106 +0,0 @@ -import * as fsp from "fs/promises"; -import * as ts from "typescript"; - -import { - getDeclarationExtension, - isDeclarationFile, - isTypeScriptFile, -} from "../compiler/path-utils"; -import { - compileFiles, - TestFile, - Utils, -} from "./tsc-infrastructure/compiler-run"; -import * as TestCaseParser from "./tsc-infrastructure/test-file-parser"; -import { - changeExtension, -} from "./tsc-infrastructure/vpath"; -import * as vpath from "./tsc-infrastructure/vpath"; - -export interface TestCompilationResult { - files: readonly FileContent[]; - diagnostics: readonly ts.Diagnostic[] | Error; -} -export interface FileContent { - readonly content: string; - readonly fileName: string; - readonly declarationMap: string | undefined; -} - -export interface TestCaseWithBOM extends Awaited> { -} -export async function loadTestCase(fileName: string) { - const rawText = await fsp.readFile(fileName, { encoding: "utf-8" }); - const test = { - content: Utils.removeByteOrderMark(rawText), - file: fileName, - }; - return Object.assign(TestCaseParser.makeUnitsFromTest(test.content, test.file), { - BOM: rawText.substring(0, Utils.getByteOrderMarkLength(rawText)), - }); -} - -export function runTypeScript(caseData: TestCaseParser.TestCaseContent, settings: ts.CompilerOptions): TestCompilationResult { - function createHarnessTestFile(lastUnit: TestCaseParser.TestUnitData): TestFile { - return { unitName: lastUnit.name, content: lastUnit.content, fileOptions: lastUnit.fileOptions }; - } - - const toBeCompiled = caseData.testUnitData.map(unit => { - return createHarnessTestFile(unit); - }); - - const result = compileFiles(toBeCompiled, [], { - declaration: "true", - declarationMap: "true", - removeComments: "false", - }, settings); - - const files = caseData.testUnitData - .filter(isRelevantTestFile) - .flatMap(file => { - const declarationFile = changeExtension(file.name, getDeclarationExtension(file.name)); - const resolvedDeclarationFile = vpath.resolve(result.vfs.cwd(), declarationFile); - const declaration = result.dts.get(resolvedDeclarationFile); - const declarationMap = result.maps.get(resolvedDeclarationFile + ".map"); - return [{ - content: declaration?.text ?? "", - fileName: declarationFile, - declarationMap: declarationMap?.text ?? "", - }]; - }); - return { - files, - diagnostics: result.diagnostics, - }; -} -export function isRelevantTestFile(f: TestCaseParser.TestUnitData) { - return isTypeScriptFile(f.name) && !isDeclarationFile(f.name) && f.content !== undefined; -} - -export function runDeclarationTransformEmitter(caseData: TestCaseParser.TestCaseContent, settings: ts.CompilerOptions): TestCompilationResult { - settings = { - ...settings, - isolatedDeclarations: true, - }; - - const diagnostics: ts.Diagnostic[] = []; - const files = caseData.testUnitData - .filter(isRelevantTestFile) - .map(file => { - const sourceFile = ts.createSourceFile( - file.name, - Utils.removeByteOrderMark(file.content), - settings.target ?? ts.ScriptTarget.ES2015, - /*setParentNodes*/ true, - file.name.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS, - ); - const { code, diagnostics, declarationMap } = ts.emitDeclarationsForFile(sourceFile, settings); - diagnostics.push(...diagnostics); - return { - content: settings.emitBOM ? Utils.addUTF8ByteOrderMark(code) : code, - fileName: changeExtension(file.name, getDeclarationExtension(file.name)), - declarationMap, - }; - }); - return { files, diagnostics }; -} diff --git a/external-declarations/src/tsconfig.json b/external-declarations/src/tsconfig.json deleted file mode 100644 index aaf9a80a1d38f..0000000000000 --- a/external-declarations/src/tsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compilerOptions": { - "pretty": true, - "lib": ["ES2021"], - "target": "ES2021", - "module": "CommonJS", - "moduleResolution": "Node", - "esModuleInterop": true, - - "declaration": true, - "declarationMap": true, - "sourceMap": true, - "composite": true, - - "strictNullChecks": true, - "noImplicitAny": true, - "noImplicitThis": true, - "strictPropertyInitialization": true, - - "skipLibCheck": true, - - "alwaysStrict": true, - "preserveConstEnums": true, - "outDir": "../build", - "noUnusedLocals": true - } -} diff --git a/external-declarations/src/utils/cli-parser.ts b/external-declarations/src/utils/cli-parser.ts deleted file mode 100644 index 3279d43889d3e..0000000000000 --- a/external-declarations/src/utils/cli-parser.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { - hasProperty, -} from "../compiler/lang-utils"; - -type ArgTypeParser = (name: string, value: string | undefined, existingValue: T | undefined) => T; -function mustNotExist(fn: ArgTypeParser): ArgTypeParser { - return (name, value, existingValue) => { - if (existingValue) { - throw new Error(`Parameter ${name} was specified multiple times. Values ${existingValue}, ${value}`); - } - return fn(name, value, existingValue); - }; -} -export const ArgType = { - String: () => - mustNotExist((name, value) => { - if (value) { - return value; - } - throw new Error(`String value was not specified for ${name}`); - }), - Boolean: () => - mustNotExist((name, value) => { - if (value === undefined) { - return true; - } - if (value.toLowerCase() === "false") { - return false; - } - if (value.toLowerCase() === "true") { - return true; - } - throw new Error(`Invalid Boolean Value ${value} for ${name}`); - }), - Enum: (...values: T[]) => - mustNotExist((name, value) => { - if (values.includes(value as T)) { - return value as T; - } - throw new Error(`Invalid Enum value, Expected one of ${values.join(",")}`); - }), - Number: () => - mustNotExist((name, value) => { - if (value && !Number.isNaN(+value)) { - return +value; - } - throw new Error(`Invalid Number value, found ${value}`); - }), - StringArray: () => (name, value, existingValue: string[] | undefined) => { - existingValue ??= []; - if (value) { - existingValue.push(value); - return existingValue; - } - throw new Error(`String value was not specified for ${name}`); - }, -} satisfies Record ArgTypeParser>; - -type ParserConfiguration = Record< - string, - ArgTypeParser | { - type: ArgTypeParser; - required?: V; - description: string; - } ->; -type ParsedValue> = { - [P in keyof T]: T[P] extends ArgTypeParser ? A | undefined : - T[P] extends { - type: ArgTypeParser; - required?: infer R; - } ? R extends true ? A : A | undefined : - never; -}; - -export function parserConfiguration>(config: T) { - return config; -} -export function parseArgs>(args: string[], types: T): { - value: ParsedValue; - diagnostics: string[]; - usage: () => string; - printUsageOnErrors: () => void; -} { - const config: Record = {}; - const diagnostics: string[] = []; - function parseArgument(name: string, value: string | undefined) { - const existingValue = config[name]; - const parser = types[name]; - if (!parser) { - diagnostics.push(`Parameter ${name} was unexpected`); - return; - } - const parserFn = typeof parser === "function" ? parser : parser.type; - try { - const newValue = parserFn(name, value, existingValue); - config[name] = newValue; - } - catch (e) { - if (e instanceof Error) { - diagnostics.push(e.message); - } - throw e; - } - } - for (const arg of args) { - const named = /--(?.*)=(?.*)/.exec(arg); - if (named) { - parseArgument(named.groups?.name!, named.groups?.value); - } - else { - const flagParam = /--(?.*)/.exec(arg); - if (flagParam) { - parseArgument(flagParam.groups?.name!, /*value*/ undefined); - } - else { - parseArgument("default", arg); - } - } - } - - for (const key of Object.keys(types)) { - const cfg = types[key]; - if (!(hasProperty(config, key)) && typeof cfg !== "function" && cfg.required) { - diagnostics.push(`Parameters ${key} is required`); - } - } - function usage() { - return Object.entries(types) - .map(([name, v]) => ({ - name, - ...(typeof v === "object" ? v : {}), - })) - .filter(o => !!o.description) - .map(({ name, description, required }) => `--${name} \t ${description} \t ${required ? "required" : ""}`) - .join("\n"); - } - return { - value: config as any, - diagnostics, - usage, - printUsageOnErrors() { - if (diagnostics.length) { - diagnostics.forEach(s => console.log(s)); - console.log(usage()); - process.exit(); - } - }, - }; -} diff --git a/external-declarations/src/utils/fs-utils.ts b/external-declarations/src/utils/fs-utils.ts deleted file mode 100644 index 4dc7d1b05a6bb..0000000000000 --- a/external-declarations/src/utils/fs-utils.ts +++ /dev/null @@ -1,127 +0,0 @@ -import * as fs from "fs"; -import * as fsp from "fs/promises"; - -import { - compareStringsCaseSensitive, - flatten, - stableSort, -} from "../compiler/lang-utils"; -import { - combinePaths, - createGetCanonicalFileName, - normalizePath, -} from "../compiler/path-utils"; -import { - FileSystemEntries, -} from "../test-runner/tsc-infrastructure/vfs"; - -const cache: Record = {}; -export async function ensureDir(dirName: string) { - const exists = cache[dirName] ?? - (await fsp.access(dirName).then(() => true, () => false)); - - if (!exists) { - await fsp.mkdir(dirName, { recursive: true }); - cache[dirName] = true; - } -} -const writeQueue = [0, 0, 0, 0, 0].map(() => Promise.resolve()); -let writeQueueIndex = 0; - -export function addToQueue(fn: () => Promise) { - const index = writeQueueIndex++ % writeQueue.length; - writeQueue[index] = writeQueue[index].then(() => { - return fn(); - }); -} - -export function flushQueue() { - return Promise.all(writeQueue); -} - -/** - * @param path directory of the tsconfig.json - * - * @internal - */ -export function readAllFiles(path: string, regex: RegExp): string[] { - path = normalizePath(path); - - // Associate an array of results with each include regex. This keeps results in order of the "include" order. - // If there are no "includes", then just put everything in results[0]. - const results: string[] = []; - const visited = new Map(); - const toCanonical = createGetCanonicalFileName(/*useCaseSensitiveFileNames*/ false); - - visitDirectory(path, path); - - return flatten(results); - - function visitDirectory(path: string, absolutePath: string) { - const canonicalPath = toCanonical(absolutePath); - if (visited.has(canonicalPath)) return; - visited.set(canonicalPath, true); - const { files, directories } = getAccessibleFileSystemEntries(path); - - for (const current of stableSort(files, compareStringsCaseSensitive)) { - const name = combinePaths(path, current); - if (!regex.exec(name)) continue; - const absoluteName = combinePaths(absolutePath, current); - results.push(absoluteName); - } - for (const current of stableSort(directories, compareStringsCaseSensitive)) { - const name = combinePaths(path, current); - const absoluteName = combinePaths(absolutePath, current); - visitDirectory(name, absoluteName); - } - } -} - -function getAccessibleFileSystemEntries(path: string): FileSystemEntries { - try { - const entries = fs.readdirSync(path || ".", { withFileTypes: true }); - const files: string[] = []; - const directories: string[] = []; - for (const dirent of entries) { - // withFileTypes is not supported before Node 10.10. - const entry = typeof dirent === "string" ? dirent : dirent.name; - - // This is necessary because on some file system node fails to exclude - // "." and "..". See https://github.com/nodejs/node/issues/4002 - if (entry === "." || entry === "..") { - continue; - } - - let stat: any; - if (typeof dirent === "string" || dirent.isSymbolicLink()) { - const name = combinePaths(path, entry); - - try { - stat = fs.statSync(name); - if (!stat) { - continue; - } - } - catch (e) { - continue; - } - } - else { - stat = dirent; - } - - if (stat.isFile()) { - files.push(entry); - } - else if (stat.isDirectory()) { - directories.push(entry); - } - } - files.sort(); - directories.sort(); - return { files, directories }; - } - catch (e) { - return { files: [], directories: [] }; - } -} diff --git a/external-declarations/tests/expected/class-all.d.ts b/external-declarations/tests/expected/class-all.d.ts deleted file mode 100644 index af5d82e96cbd1..0000000000000 --- a/external-declarations/tests/expected/class-all.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export declare class Person { - age: number; - greet(): void; - overloaded(a: number): number; - overloaded(a: string): string; - get ageAccessor(): number; - set ageAccessor(value: number); -} diff --git a/external-declarations/tests/expected/const-var-init.d.ts b/external-declarations/tests/expected/const-var-init.d.ts deleted file mode 100644 index e0e43abe26758..0000000000000 --- a/external-declarations/tests/expected/const-var-init.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const test = 1; diff --git a/external-declarations/tests/expected/const-var.d.ts b/external-declarations/tests/expected/const-var.d.ts deleted file mode 100644 index 298be4f0ff82b..0000000000000 --- a/external-declarations/tests/expected/const-var.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare const test: number; diff --git a/external-declarations/tests/expected/enums.d.ts b/external-declarations/tests/expected/enums.d.ts deleted file mode 100644 index f4bf27402e227..0000000000000 --- a/external-declarations/tests/expected/enums.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export declare enum Fruits { - PEN_PINEAPPLE_APPLE_PEN = -1, - APPLE = 0, - PEAR = 1 -} diff --git a/external-declarations/tests/expected/export-default.d.ts b/external-declarations/tests/expected/export-default.d.ts deleted file mode 100644 index 83a998ddc9e1c..0000000000000 --- a/external-declarations/tests/expected/export-default.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const value: number; -export default value; diff --git a/external-declarations/tests/expected/functions.d.ts b/external-declarations/tests/expected/functions.d.ts deleted file mode 100644 index bdf85122c8456..0000000000000 --- a/external-declarations/tests/expected/functions.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export declare function testDefaultNoType(a: string, b?: string): number; -declare function test(a: string): number; -export declare const testAlias: typeof test; -export declare function testOptional(a: string, b?: string): number; -export declare function testDefault(a: string, b?: string): number; -export declare function testRest(...a: string[]): number; -export declare function testTuple(...a: [string, string]): number; -export declare function testTupleRest(...a: [string, string] | [number, number]): number; -export {}; diff --git a/external-declarations/tests/expected/global.d.ts b/external-declarations/tests/expected/global.d.ts deleted file mode 100644 index da3cfbdf134e2..0000000000000 --- a/external-declarations/tests/expected/global.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -declare class Cell { -} -declare class Ship { - isSunk: boolean; -} -declare class Board { - ships: Ship[]; - cells: Cell[]; - private allShipsSunk; -} diff --git a/external-declarations/tests/expected/imports.d.ts b/external-declarations/tests/expected/imports.d.ts deleted file mode 100644 index 723411f835eb1..0000000000000 --- a/external-declarations/tests/expected/imports.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Person } from './class-all'; -import * as fns from './functions'; -import def from './export-default'; -export declare let person: Person; -export declare const nr: number; -export declare const fff: typeof fns; -export default def; diff --git a/external-declarations/tests/expected/interface.d.ts b/external-declarations/tests/expected/interface.d.ts deleted file mode 100644 index 0fbc0907b545b..0000000000000 --- a/external-declarations/tests/expected/interface.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface I { - n: number; - o: { - s: string; - }; -} diff --git a/external-declarations/tests/expected/let-var.d.ts b/external-declarations/tests/expected/let-var.d.ts deleted file mode 100644 index 5d422b6d153a5..0000000000000 --- a/external-declarations/tests/expected/let-var.d.ts +++ /dev/null @@ -1 +0,0 @@ -export declare let test: number; diff --git a/external-declarations/tests/expected/private-members-typeof.d.ts b/external-declarations/tests/expected/private-members-typeof.d.ts deleted file mode 100644 index ec5d883109dc5..0000000000000 --- a/external-declarations/tests/expected/private-members-typeof.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare class Test { - #private; -} diff --git a/external-declarations/tests/expected/transitive.d.ts b/external-declarations/tests/expected/transitive.d.ts deleted file mode 100644 index 59032b911a1c4..0000000000000 --- a/external-declarations/tests/expected/transitive.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Person } from "./class-all"; -type Q = P; -type P = Person; -export type D = Q; -export {}; diff --git a/external-declarations/tests/expected/type-aliases.d.ts b/external-declarations/tests/expected/type-aliases.d.ts deleted file mode 100644 index b52ed36649b9d..0000000000000 --- a/external-declarations/tests/expected/type-aliases.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -type PersonType = { - age: string; -}; -type Id = { - [P in keyof T]: T[P]; -}; -export type P = Id; -export {}; diff --git a/external-declarations/tests/source/.gitignore b/external-declarations/tests/source/.gitignore deleted file mode 100644 index 9a18fd13b1e59..0000000000000 --- a/external-declarations/tests/source/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.js -*.d.ts \ No newline at end of file diff --git a/external-declarations/tests/source/binder/conditionalTypeAliasing.ts b/external-declarations/tests/source/binder/conditionalTypeAliasing.ts deleted file mode 100644 index 36a97e3979bda..0000000000000 --- a/external-declarations/tests/source/binder/conditionalTypeAliasing.ts +++ /dev/null @@ -1,36 +0,0 @@ -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; -} \ No newline at end of file diff --git a/external-declarations/tests/source/binder/default-class-symbol.ts b/external-declarations/tests/source/binder/default-class-symbol.ts deleted file mode 100644 index ffc46996a8233..0000000000000 --- a/external-declarations/tests/source/binder/default-class-symbol.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default class Class { - parent!: Class; -} - -export const instance: Class = new Class(); \ No newline at end of file diff --git a/external-declarations/tests/source/binder/default-function-symbol.ts b/external-declarations/tests/source/binder/default-function-symbol.ts deleted file mode 100644 index 60b729d25164b..0000000000000 --- a/external-declarations/tests/source/binder/default-function-symbol.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default function foo(): typeof foo { - return foo; -} - -export const instance: typeof foo = foo; \ No newline at end of file diff --git a/external-declarations/tests/source/binder/enum-members-aliasing.ts b/external-declarations/tests/source/binder/enum-members-aliasing.ts deleted file mode 100644 index c25be6b680918..0000000000000 --- a/external-declarations/tests/source/binder/enum-members-aliasing.ts +++ /dev/null @@ -1,5 +0,0 @@ -const X = 1; -export const enum E { - X = 1, - Y = X -} diff --git a/external-declarations/tests/source/binder/local-and-export-symbols.ts b/external-declarations/tests/source/binder/local-and-export-symbols.ts deleted file mode 100644 index 499e6fc78f440..0000000000000 --- a/external-declarations/tests/source/binder/local-and-export-symbols.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface I { -} - -const I = 1; -export const O: I = {} \ No newline at end of file diff --git a/external-declarations/tests/source/binder/parameterAliasing.ts b/external-declarations/tests/source/binder/parameterAliasing.ts deleted file mode 100644 index 78c94c75d2728..0000000000000 --- a/external-declarations/tests/source/binder/parameterAliasing.ts +++ /dev/null @@ -1,4 +0,0 @@ -const p: string =""; -export function test(p: number, r: typeof p): UF extends infer TF ? TF: typeof p { - return null! -} \ No newline at end of file diff --git a/external-declarations/tests/source/binder/re-exported-import-visibility.ts b/external-declarations/tests/source/binder/re-exported-import-visibility.ts deleted file mode 100644 index 672639b9b6e29..0000000000000 --- a/external-declarations/tests/source/binder/re-exported-import-visibility.ts +++ /dev/null @@ -1,8 +0,0 @@ -// x0.d.ts -export declare let a: number; - -// x.d.ts -declare module "./observable" { - // import { a } from "./x0"; - export { a } from "./x0"; -} \ No newline at end of file diff --git a/external-declarations/tests/source/class-all.ts b/external-declarations/tests/source/class-all.ts deleted file mode 100644 index 9d4f35f18a9bd..0000000000000 --- a/external-declarations/tests/source/class-all.ts +++ /dev/null @@ -1,19 +0,0 @@ -export class Person { - age: number = 1; - greet(): void { - console.log("Hi") - } - - overloaded(a: number): number; - overloaded(a: string): string; - overloaded(a: any): any{ - return a; - } - - get ageAccessor(): number { - return this.age; - } - set ageAccessor(value: number) { - this.age = value; - } -} \ No newline at end of file diff --git a/external-declarations/tests/source/const-var-init.ts b/external-declarations/tests/source/const-var-init.ts deleted file mode 100644 index 873e758025b50..0000000000000 --- a/external-declarations/tests/source/const-var-init.ts +++ /dev/null @@ -1 +0,0 @@ -export const test = 1; diff --git a/external-declarations/tests/source/const-var.ts b/external-declarations/tests/source/const-var.ts deleted file mode 100644 index 42a1cdeda0cc4..0000000000000 --- a/external-declarations/tests/source/const-var.ts +++ /dev/null @@ -1 +0,0 @@ -export const test: number = 0; diff --git a/external-declarations/tests/source/enums.ts b/external-declarations/tests/source/enums.ts deleted file mode 100644 index 010fb0563ca8d..0000000000000 --- a/external-declarations/tests/source/enums.ts +++ /dev/null @@ -1,5 +0,0 @@ -export enum Fruits { - PEN_PINEAPPLE_APPLE_PEN = -1, - APPLE = 0, - PEAR = 1, -} \ No newline at end of file diff --git a/external-declarations/tests/source/export-default.ts b/external-declarations/tests/source/export-default.ts deleted file mode 100644 index 9668f69f682de..0000000000000 --- a/external-declarations/tests/source/export-default.ts +++ /dev/null @@ -1,2 +0,0 @@ -const value: number = 10; -export default value \ No newline at end of file diff --git a/external-declarations/tests/source/functions.ts b/external-declarations/tests/source/functions.ts deleted file mode 100644 index bc024f0a6bac7..0000000000000 --- a/external-declarations/tests/source/functions.ts +++ /dev/null @@ -1,31 +0,0 @@ -export function testDefaultNoType(a: string, b = ""): number { - return 0; -} - -function test(a: string): number { - return 0; -} -export const testAlias: typeof test = test; - -export function testOptional(a: string, b?: string): number { - return 0; -} - -export function testDefault(a: string, b: string = ""): number { - return 0; -} - - -export function testRest(...a: string[]): number { - return 0; -} - -export function testTuple(...a: [string, string]): number { - return 0; -} - -export function testTupleRest(...a: - | [string, string] - | [number, number]): number { - return 0; -} \ No newline at end of file diff --git a/external-declarations/tests/source/global.ts b/external-declarations/tests/source/global.ts deleted file mode 100644 index e56cd849ba20b..0000000000000 --- a/external-declarations/tests/source/global.ts +++ /dev/null @@ -1,15 +0,0 @@ -class Cell { -} - -class Ship { - isSunk: boolean; -} - -class Board { - ships: Ship[]; - cells: Cell[]; - - private allShipsSunk() { - return this.ships.every(function (val) { return val.isSunk; }); - } -} \ No newline at end of file diff --git a/external-declarations/tests/source/imports.ts b/external-declarations/tests/source/imports.ts deleted file mode 100644 index 0f5ac62055fbd..0000000000000 --- a/external-declarations/tests/source/imports.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Person } from './class-all'; -import * as fns from './functions'; -import * as fns2 from './functions'; -import def from './export-default'; - - -export let person: Person = new Person; -export const nr: number = fns2.testAlias("1"); -export const fff: typeof fns = fns; -export default def; - - diff --git a/external-declarations/tests/source/interface.ts b/external-declarations/tests/source/interface.ts deleted file mode 100644 index 88d0e45286812..0000000000000 --- a/external-declarations/tests/source/interface.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface I { - n: number; - o: { - s: string - } -} \ No newline at end of file diff --git a/external-declarations/tests/source/let-var.ts b/external-declarations/tests/source/let-var.ts deleted file mode 100644 index 44e8ffc615312..0000000000000 --- a/external-declarations/tests/source/let-var.ts +++ /dev/null @@ -1 +0,0 @@ -export let test: number = 0; diff --git a/external-declarations/tests/source/local-inference-not-supported/not-supported-sugegstions.ts b/external-declarations/tests/source/local-inference-not-supported/not-supported-sugegstions.ts deleted file mode 100644 index d3ef71b0c93cb..0000000000000 --- a/external-declarations/tests/source/local-inference-not-supported/not-supported-sugegstions.ts +++ /dev/null @@ -1,24 +0,0 @@ -// export function getCachedClientContextInfo() { -// const contextInfoCache = ""; -// return contextInfoCache; -// } - - -// // returns Generator; -// export function *returnsIterableN() { -// let x: number = (yield ""); -// } - -// // returns Generator; -// export function *returnsIterableS() { -// let x: string = (yield ""); -// } - - -// no typeof this.#other -// export class Test { -// #other = ""; -// getField() { -// return this.#other -// } -// } diff --git a/external-declarations/tests/source/local-inference/array-literal-const.ts b/external-declarations/tests/source/local-inference/array-literal-const.ts deleted file mode 100644 index baf686fa7abe1..0000000000000 --- a/external-declarations/tests/source/local-inference/array-literal-const.ts +++ /dev/null @@ -1,19 +0,0 @@ -// @strict:true,false -// @target: es2015 -export let arr = [1, 2, 3, -1] as const; -export let arrTrue = [true] as const; -export let arr2 = ["1", 2, true, 1] as const; -export let tupleWithNull = [1, null, undefined] as const; -export let arrObjects = [ - { foo: "A", m(): void {} }, - { bar: "B" }, - { bar: { baz: 1} }, -] as const; - -let value = 1; -export let values = [value, "A", 1] as const; - - -let tuple = [1, 2, 3] as const -export const composedTuple = [0, ...tuple] as const -export const composedArray = [0, ...tuple]; \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/array-literal-mutable.ts b/external-declarations/tests/source/local-inference/array-literal-mutable.ts deleted file mode 100644 index 237a655d318c1..0000000000000 --- a/external-declarations/tests/source/local-inference/array-literal-mutable.ts +++ /dev/null @@ -1,70 +0,0 @@ -// @strict:true,false -// @target: es2015 -export let normalizedObjectArray = [ - { foo: "" }, - { bar: "" }, - { foo: "" }, - { bar: "" }, - { foo: "" }, - { bar: "" }, - { foo: "" }, - { bar: "" }, -] - -export let simpleObjetArray = [ - {foo : "" }, - {foo : "" }, - {foo : "" }, - {foo : "" }, -] -export let stringLiterals = [ `A` as 'A', 'A' as 'A', 'A' as `A`]; -export let numberLiterals = [ 1 as 1, 2 as 2, 1 as 1, 0x1 as 0x1]; -export let numberLiteralsNeg = [ -1 as -1, -2 as -2, -1 as -1, 0x1 as -0x1]; -export let nulls = [null, null, null]; -export let undefineds = [undefined, undefined, undefined]; -export let empty = [] -export let explicitAny = [1, "2", null as any]; -export let implicitAny = ["1", null]; -export let mixed = ["1", 1, true, null, 2, undefined, "2", false, null] -export let numbers = [1, 2, 3]; -export let numbersNeg = [1, 2, 3, -1, -2, -3, -1, -2]; -export let strings = ["1", "2", "3"]; - -let value = 1; -export let values = [value, "A", 1] - -export let arrNestedObjects = [ - { bar: { baz: 1} }, - { bar: { bat: 1} }, -]; - -export let arrNestedObjectsWithReadonly = [ - { bar: { baz: 1} }, - { bar: { bat: 1} }, - { bar: { roProp: 1} } as const, -]; - - -// TODO Uncomment when methods appear in merged union types -// export let arrObjects = [ -// { foo: "A", m(): void {} }, -// { bar: "B" }, -// { bar: { baz: 1} }, -// { bar: { bat: 1} }, -// ]; - - -export const nestedArray = [[[1, 2]], [[3, 4]]]; -export const nestedMixedArray = [[[1, 2]], [[3, 4]], [["3", "4"]]]; - - -export const functionArrayMixed = [ - (o: number) => 2, - (n: number): number => 2, - (n: string): number => 2, - (n: string): number => 2, -] - -let nrs = [1, 2, 3] -let strs = ["1", "2", "3"] -export const composedArray = [false, ...nrs, ...strs] diff --git a/external-declarations/tests/source/local-inference/class.ts b/external-declarations/tests/source/local-inference/class.ts deleted file mode 100644 index c8059197232b0..0000000000000 --- a/external-declarations/tests/source/local-inference/class.ts +++ /dev/null @@ -1,10 +0,0 @@ -// @strict:true,false -// @target: es2015 - -class Test { - method(p: string): number { - return 0; - } -} - -export const test = new Test(); \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/default-export.ts b/external-declarations/tests/source/local-inference/default-export.ts deleted file mode 100644 index 504d63a507a39..0000000000000 --- a/external-declarations/tests/source/local-inference/default-export.ts +++ /dev/null @@ -1,21 +0,0 @@ -// @jsx: preserve -// @esModuleInterop: true -// @isolatedDeclarations:true -// @strict:true,false -// @target: es2015 - -//@fileName: some-module.ts -export let X = 1; -//@fileName: default-with-typeof.ts -import { X } from './some-module'; -export default { - X -} -//@fileName: default-with-assertion.ts -export type TestCase = { exec: () => void } -function test(): TestCase { - return null! -} - -export default test() satisfies TestCase as TestCase - diff --git a/external-declarations/tests/source/local-inference/expando-functions-declarations.ts b/external-declarations/tests/source/local-inference/expando-functions-declarations.ts deleted file mode 100644 index 9feee368b8c6b..0000000000000 --- a/external-declarations/tests/source/local-inference/expando-functions-declarations.ts +++ /dev/null @@ -1,10 +0,0 @@ -export function foo() {} -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"; diff --git a/external-declarations/tests/source/local-inference/expando-functions-expressions.ts b/external-declarations/tests/source/local-inference/expando-functions-expressions.ts deleted file mode 100644 index e6f272382666c..0000000000000 --- a/external-declarations/tests/source/local-inference/expando-functions-expressions.ts +++ /dev/null @@ -1,21 +0,0 @@ -// @strict:true -// @target: es2015 - -// @fileName: propNames.ts - -export const S = "s-name"; - -// @fileName: expando-functions.ts -// import { S } from '' -export const x = ()=> {} -x.test = 1; - -export const fnExpression = function (): string { - return ""; -} -fnExpression.prop = "1" -fnExpression.prop = false -fnExpression["SS"] = "A" -fnExpression["SS"] = "A" -fnExpression[S] = 1 -fnExpression[S] = 1 \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/expressions-with-assertions.ts b/external-declarations/tests/source/local-inference/expressions-with-assertions.ts deleted file mode 100644 index 4b0c8bbcdd173..0000000000000 --- a/external-declarations/tests/source/local-inference/expressions-with-assertions.ts +++ /dev/null @@ -1,17 +0,0 @@ -// @strict:true,false -// @target: es2015 - -//@fileName: types.ts -export type Type = { foo: T }; -export type UsedAsTypeParameter = { foo: string }; -export type UnUsed = { foo: string }; - -//@fileName: expressions-with-assertions.ts -import type { Type, Unused, UsedAsTypeParameter } from './types' -export let n = 0 + 1 as number; -export let s = "X" + "Y" as string; -export let b = !true as boolean; -export let bn = 10n + 11n as bigint; -export let o = null! as Type; -export let o2 = null! as Type; -export let o3 = null! as Type; diff --git a/external-declarations/tests/source/local-inference/function-expression.ts b/external-declarations/tests/source/local-inference/function-expression.ts deleted file mode 100644 index efac725232177..0000000000000 --- a/external-declarations/tests/source/local-inference/function-expression.ts +++ /dev/null @@ -1,24 +0,0 @@ -// @strict:true,false -// @target: es2015 - -//@fileName: module-for-arrow.ts -export type Used = { foo: string }; -export type UsedAsReturn = { foo: string }; -export type UnUsed = { foo: string }; - -//@fileName: module-for-fn-exp.ts -export type UsedExpr = { foo: string }; -export type UsedAsReturnExpr = { foo: string }; -export type UnUsedExp = { foo: string }; - -//@fileName: functions.ts -import type { Used, UsedAsReturn, UnUsed } from './module-for-arrow' - -export const fnNoParameterTypeWithDefault = (a = 0): number => a; -export const fn = (a: string): number => a.length; -export const fn3 = (a: Used): UsedAsReturn => a.length; - -import type { UsedExpr, UsedAsReturnExpr, UnUsedExp } from './module-for-fn-exp' -export const fnExpr = function (a: string): number { return a.length; }; -export const fn3Expr = function (a: UsedExpr): UsedAsReturnExpr { return a.length; } -export const fnExpNoParameterTypeWithDefault = function (a = 0): number { return a; } \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/generic-nested-function.ts b/external-declarations/tests/source/local-inference/generic-nested-function.ts deleted file mode 100644 index e68201a1a0030..0000000000000 --- a/external-declarations/tests/source/local-inference/generic-nested-function.ts +++ /dev/null @@ -1,14 +0,0 @@ -// @strict: true -// @target: es2015 - -export function makeEnforcePredicate(predicateName: string, predicate: (v: unknown) => v is V) { - return (object: T, key: keyof T): V => { - const value = object[key] as unknown; - if (predicate(value)) return value; - - throw new Error( - `expected ${predicateName} value for key ${JSON.stringify(key)}, ` + - `instead got: ${JSON.stringify(value)}` - ); - }; -} diff --git a/external-declarations/tests/source/local-inference/literals-as-const.ts b/external-declarations/tests/source/local-inference/literals-as-const.ts deleted file mode 100644 index 2eae31199d7e3..0000000000000 --- a/external-declarations/tests/source/local-inference/literals-as-const.ts +++ /dev/null @@ -1,25 +0,0 @@ -// @strict:true,false -// @target: es2015 - -export let n = 0 as const; -export let hex = 0x1 as const; -export let neg = -11 as const; -export const negP = { n: -((11)) } as const; -export const hexNeg = -0x1 as const; -export const hexNegParan = { n: -(((0x1))) } as const; - -export let s = "X" as const; -export let b = true as const; -export let bn = 10n as const; - -export let t0 = `A` as const; -export let t1 = `A${1}` as const; -export let t2 = `A${1 as number}` as const; -export let t3 = `A number=${1 as 1|2} string=${"1" as "1" | "2"} bigint=${1n as 1n | 2n} ` as const; -export let t4 = `A number=${1 as 1|2} mixed=${"1" as "X" | number}` as const; -export let t5 = `A number=${1 as 1|2} mixed=${"1" as "1" | number}` as const; - -export let n2 = 0; -export let s2 = "X"; -export let b2 = true; -export let bn2 = 10n; \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/literals-const.ts b/external-declarations/tests/source/local-inference/literals-const.ts deleted file mode 100644 index a1f3631de6c5a..0000000000000 --- a/external-declarations/tests/source/local-inference/literals-const.ts +++ /dev/null @@ -1,23 +0,0 @@ -// @strict:true,false -// @target: es2015 - -export const n = 0; -export const hex = 0x1; -export const neg = -11; -export const negP = -((11)); -export const hexNeg = -0x1; -export const hexNegParan = -(((0x1))); - -export const s = "X"; -export const sPoz = +"X"; -export const sNeg = -"X"; - -export const b = true; -export const bPoz = +true; -export const bNeg = -true; - -export const bn = 10n; - -export const t0 = `A`; -export const t1 = `A${1}`; -export const t2 = `A${1 as number}`; diff --git a/external-declarations/tests/source/local-inference/literals.ts b/external-declarations/tests/source/local-inference/literals.ts deleted file mode 100644 index 74f958d6c57a9..0000000000000 --- a/external-declarations/tests/source/local-inference/literals.ts +++ /dev/null @@ -1,24 +0,0 @@ -// @strict:true,false -// @target: es2015 - -export let n = 0; -export let hex = 0x1; -export let neg = -11; -export let s = "X"; -export let sPoz = +"X"; -export let sNeg = -+"X"; -export let b = true; -export let bPoz = +true; -export let bNeg = -true; -export let r = /test/; -export let bn = 10n; -export let bnNeg = -10n; - -export let nl = null; -export let undef = undefined; - - - -export let t0 = `A`; -export let t1 = `A${1}`; -export let t2 = `A${1 + 1}`; \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/mark-const-contaner-as-used.ts b/external-declarations/tests/source/local-inference/mark-const-contaner-as-used.ts deleted file mode 100644 index c2da7927850de..0000000000000 --- a/external-declarations/tests/source/local-inference/mark-const-contaner-as-used.ts +++ /dev/null @@ -1,15 +0,0 @@ -// @strict: true -// @target: es2015 - -// @filename: const-def.ts -export const E = { - A: "A" -} as const; -export const V = "V" - -// @filename: const-use.ts -import { E , V} from './const-def' -export const value = { - [E.A]: 0, - [V]: 1, -} \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/new-type.ts b/external-declarations/tests/source/local-inference/new-type.ts deleted file mode 100644 index 137c4f319d9f7..0000000000000 --- a/external-declarations/tests/source/local-inference/new-type.ts +++ /dev/null @@ -1,23 +0,0 @@ -// @strict:true,false -// @target: es2015 -namespace Ns { - export class Cat { - cat = true - } -} - -let x = new Promise(() => {}); -let cat = new Ns.Cat() - - -export class Dog { - dog = true -} -export class Bird { - bird = true -} -export default [ - new Ns.Cat(), - new Dog(), - new Bird(), -]; diff --git a/external-declarations/tests/source/local-inference/object-generic-methods.ts b/external-declarations/tests/source/local-inference/object-generic-methods.ts deleted file mode 100644 index d6700a4f02f10..0000000000000 --- a/external-declarations/tests/source/local-inference/object-generic-methods.ts +++ /dev/null @@ -1,48 +0,0 @@ - -//@fileName: test-types.ts -export type UsedAsConstraint = { foo: string }; -export type UsedAsParameter = { foo: string }; -export type UsedAsReturnType = { foo: string }; -export type UsedAsDefault = { foo: string }; -export type Unused = { foo: string }; -export type UsedAsVariableType = { foo: string }; -export type UsedAsConstraintConst = { ro: string }; -export type UsedAsParameterConst = { ro: string }; -export type UsedAsReturnTypeConst = { ro: string }; -export type UsedAsDefaultConst = { ro: string }; -export type UnusedConst = { ro: string }; -export type UsedAsVariableTypeConst = { ro: string }; - -//@fileName: objects.ts -import type { - UsedAsConstraint, - UsedAsParameter, - UsedAsReturnType, - UsedAsDefault, - Unused, - UsedAsVariableType -} from './test-types' - -export let g = { - method(p: T, p2: UsedAsParameter): UsedAsReturnType { - let o: UsedAsVariableType; - return o; - } -} - - -import type { - UsedAsConstraintConst, - UsedAsParameterConst, - UsedAsReturnTypeConst, - UsedAsDefaultConst, - UnusedConst, - UsedAsVariableTypeConst, -} from './test-types' - -export let g2 = { - method(p: T, p2: UsedAsParameterConst): UsedAsReturnTypeConst { - let o: UsedAsVariableTypeConst; - return o; - } -} as const \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/object-literal.ts b/external-declarations/tests/source/local-inference/object-literal.ts deleted file mode 100644 index 301129b9ddac9..0000000000000 --- a/external-declarations/tests/source/local-inference/object-literal.ts +++ /dev/null @@ -1,84 +0,0 @@ -let value: string = "0"; -export let o = { - n: 1, - s: "s", - value, - nested: { - nn: 2 - }, - method(value: number): number { - return value; - } -} - -export let oRo = { - n: 1, - s: "s", - value, - nested: { - nn: 2 - }, - fn:(value: number, defaultValue = 1): string =>{ - return "" - }, - method(value: number): number { - return value; - } -} as const - - -// With comments -export const State = { - /** - * Session orders or tickets have been processed in total and created without error - */ - Committed: 'Committed', - - /** - * Attempting to commit orders or tickets - */ - Committing: 'Committing', -} as const; - - -export let a0 = { - get x() { - return 1; - } -} - -export let a1 = { - get x(): number { - return 1; - } -} - -export let a2 = { - get x() { - return 1; - }, - set x(v) { - } -} - -export let a3 = { - get x() { - return 1; - }, - set x(v: number) { - } -} - -export let a4 = { - get x(): number { - return 1; - }, - set x(v: string) { - } -} - - -export const satisfied = { - save: () => {}, - close: () => {}, -} as const satisfies Record void> \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/return-types-function-declarations.ts b/external-declarations/tests/source/local-inference/return-types-function-declarations.ts deleted file mode 100644 index d8ccd87f1d526..0000000000000 --- a/external-declarations/tests/source/local-inference/return-types-function-declarations.ts +++ /dev/null @@ -1,133 +0,0 @@ -// @strict: true, false -// @target: es2022 -export async function returnsAsyncFunction() { - return { foo: "" } -} - -export function *returnsIterableFunction(){ - yield { yield: "" } - - return { return: "" } -} - -export function *returnsIterableFunction2() { - yield { yield: "" } -} - - -export function *returnsEmptyYield() { - yield; -} - -export async function *returnsEmptyAsyncIterableFunction() { - -} - -export function *returnsIterableFunction4() { - -} - -export async function *returnsAsyncIterableFunction() { - yield { yield: "" } - - return { return: "" } -} - -export async function *returnsAsyncIterableFunction2() { - yield { yield: "" } -} - -export function returnsStringParenthesized() { - return ((("A"))) -} - -export function returnsFreshString() { - return "A" -} - -export function returnsCollapsibleType() { - if(Math.random()) return "" as string - return "A" as "A" -} - -export function returnFreshLiteralType() { - if(Math.random()) return 1; - if(Math.random()) return 1; - return 1; -} - -export function returnsSingleNegativeNumbers() { - return -1; -} -export function returnsNegativeNumbers() { - if(Math.random()) return 1; - return -1; -} - -export function returnsNegativeNumbersAndString() { - if(Math.random()) return "1" as string; - return -1; -} - -export function returnsNegativeNumbersAndNumber() { - if(Math.random()) return 1 as number; - return -1; -} -export function returnNotFreshLiteralType() { - if(Math.random()) return 1 as 1; - if(Math.random()) return 1; - return 1; -} - - -export function returnNotFreshAndObjects() { - if(Math.random()) return 1 as 1; - if(Math.random()) return 1; - return { foo: 1 }; -} - -export function returnTypeFreshAndObjects() { - if(Math.random()) return 1; - if(Math.random()) return 1; - return { foo: 1 }; -} - -export function returnsNumber() { - return 1 -} - -export function returnsObject() { - return { - foo: "" - }; -} - -export function returnsObjectUnion() { - if(Math.random() > 0) { - return { - foo: "", - bar: 1 - }; - } - return { - foo: "" - }; -} - -export function returnsUnionPrimitive() { - if(Math.random() > 0) { - return "A"; - } - return "B"; -} - - -export function ternaryReturn() { - return Math.random() ? 1 : ""; -} - - -let contextInfoCache =""; -export function getCachedClientContextInfo() { - return contextInfoCache; -} \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/return-types-function-expressions.ts b/external-declarations/tests/source/local-inference/return-types-function-expressions.ts deleted file mode 100644 index 09a5a90568e4a..0000000000000 --- a/external-declarations/tests/source/local-inference/return-types-function-expressions.ts +++ /dev/null @@ -1,122 +0,0 @@ -// @strict: false, true -// @target: es2015 - -export let noBody = () => 1; -export let noBodyAsync = async () => 1; - -export const returnNoExpression = (...args: unknown[]) => { - if (Math.random()) return; -}; - - - -export const returnUndefined = (...args: unknown[]) => { - if (Math.random()) return undefined; -}; - -export const returnUndefinedOrNoExpr = (...args: unknown[]) => { - if (Math.random()) return undefined; - if (Math.random()) return; -}; - -export const returnNoExpression2 = (...args: unknown[]) => { - if (Math.random()) return; - if (Math.random()) return; - if (Math.random()) return; -}; - -export const returnSomeNoExpression = (...args: unknown[]) => { - if (Math.random()) return; - if (Math.random()) return 2 -}; - -export const returnsUndefinedOrPrimitive = (...args: unknown[]) => { - if (Math.random()) return undefined; - if (Math.random()) return 2 - return undefined; -}; - - -export const returnsNullOrPrimitive = (...args: unknown[]) => { - if (Math.random()) return null; - if (Math.random()) return 2 - return null; -}; - - -export let returnsStringParenthesized = () => { - return ((("A"))) -} - -export let returnsNumber = () => { - return 1 -} - -export let returnsObject = () => { - return { - foo: "" - }; -} - -export let returnsObjectUnion = () => { - if(Math.random() > 0) { - return { - foo: "", - bar: 1, - }; - } - return { - foo: "" - }; -} - -export let returnsUnionPrimitive = () => { - if(Math.random() > 0) { - return "A"; - } - return "B"; -} - - -export let returnsStringFn = function () { - return "A" -} - -export let returnsNumberFn = function () { - return 1 -} - -export let returnsObjectFn = function () { - return { - foo: "" - }; -} - -export let returnsObjectUnionFn = function () { - if(Math.random() > 0) { - return { - foo: "", - bar: 1 - }; - } - return { - foo: "" - }; -} - -export let returnsUnionPrimitiveFn = function () { - if(Math.random() > 0) { - return "A"; - } - return "B"; -} - - -export const genericFn = (o: T): T => { return o as T }; -export const nestedGenericFns = function (o: T) { - return (p: T, v: U) => { - return p as T; - } -}; - - diff --git a/external-declarations/tests/source/local-inference/return-types-methods.ts b/external-declarations/tests/source/local-inference/return-types-methods.ts deleted file mode 100644 index e98c5c1fe4d7c..0000000000000 --- a/external-declarations/tests/source/local-inference/return-types-methods.ts +++ /dev/null @@ -1,55 +0,0 @@ -export class WithMethods { - returnsStringParenthesized() { - return ((("A"))) - } - - returnsNumber() { - return 1 - } - - returnsObject() { - return { - foo: "" - }; - } - - returnsObjectUnion() { - if(Math.random() > 0) { - return { - foo: "", - bar: 1, - }; - } - return { - foo: "" - }; - } - - returnsUnionPrimitive() { - if(Math.random() > 0) { - return "A"; - } - return "B"; - } - - returnsUnionStringParenthesized() { - if(Math.random() > 0) { - return ((("A"))); - } - return ((("B"))); - } - - - returnsUnionNumericParenthesized() { - if(Math.random() > 0) { - return -(((1))); - } - return -(((2))); - } - returnsUnionNumeric() { - if(Math.random() > 0) { - return -1; - } - return -2; - } -} \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/return-types-object-methods.ts b/external-declarations/tests/source/local-inference/return-types-object-methods.ts deleted file mode 100644 index 72605be548b85..0000000000000 --- a/external-declarations/tests/source/local-inference/return-types-object-methods.ts +++ /dev/null @@ -1,37 +0,0 @@ -// @strict: true -// @target: es2015 - -export const o = { - returnsStringParenthesized() { - return ((("A"))) - }, - - returnsNumber() { - return 1 - }, - - returnsObject() { - return { - foo: "" - }; - }, - - returnsObjectUnion() { - if(Math.random() > 0) { - return { - foo: "", - bar: 1, - }; - } - return { - foo: "" - }; - }, - - returnsUnionPrimitive() { - if(Math.random() > 0) { - return "A"; - } - return "B"; - }, -} \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/scratch.ts b/external-declarations/tests/source/local-inference/scratch.ts deleted file mode 100644 index ca105304f30b1..0000000000000 --- a/external-declarations/tests/source/local-inference/scratch.ts +++ /dev/null @@ -1,22 +0,0 @@ -// @jsx: preserve -// @esModuleInterop: true -// @strict: true -// @isolatedDeclarations:false -// @target: es2015 -// @filename: react.ts -namespace React { - -} - -declare global { - export namespace JSX { - export interface Element { - name: string - } - } -} - -export default React; -// @filename: index.tsx -import React from './react'; -export const value =
\ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/ternary.ts b/external-declarations/tests/source/local-inference/ternary.ts deleted file mode 100644 index 0879731af7c08..0000000000000 --- a/external-declarations/tests/source/local-inference/ternary.ts +++ /dev/null @@ -1,52 +0,0 @@ - -// @strict: true -// @target: es2015 - -export let x = Math.random() ? 0 : 1; - -export let y = Math.random() ? x : ""; - -export const yConst = Math.random() ? x : ""; - -export let group = { x: Math.random()? ["A"]: ["B"] } as const - -export let group2 = { - // Nested object has literals and is readonly - // justNested: { readonly x: "A" }, - justNested: {x: "A" }, - // conditional expression does not flow const-ness - // conditionalNoSpread: { x: string; } - conditionalNoSpread: Math.random()? { x: "A" }: { x: "A"}, - - // conditional expression WITH ... flows some const-ness - // The property is readonly, but does not have literal type - // noSpread: { readonly x: string; } - conditionalSpread: { ...Math.random()? { x: "A" }: { x: "A"} }, -} as const - - - - -const ParametricColumnAlias = { - ExposureWeightBeforeCashSim: "ExposureWeightBeforeCashSim", - ExposureWeight: "ExposureWeight" -} as const -export const targetTypeConfig = { - targetBaselineColumn: Math.random() - ? ParametricColumnAlias.ExposureWeightBeforeCashSim - : ParametricColumnAlias.ExposureWeight, -} as const; - - - -export const getMetricStatusFromResponse = (sessionResponse: boolean) => - sessionResponse - ? 'SUCCESS' - : 'FAILURE'; - - -export const getMetricStatusFromResponse2 = (sessionResponse: boolean) => { - return sessionResponse - ? 'SUCCESS' - : 'FAILURE'; -} \ No newline at end of file diff --git a/external-declarations/tests/source/local-inference/typeof.ts b/external-declarations/tests/source/local-inference/typeof.ts deleted file mode 100644 index 608946cbad7d5..0000000000000 --- a/external-declarations/tests/source/local-inference/typeof.ts +++ /dev/null @@ -1,62 +0,0 @@ -// @strict: true -// @target: es2015 - -export let x = 1; -export let y = x; - -export const EnumLike = { - A: 1, - B: 2, -} - -export const arr = [EnumLike.A, EnumLike.B] as const -// export const arr2: readonly [typeof EnumLike.A, typeof EnumLike.B]; - - -let v = ""; -export const exportedV = v; - -let o = { prop: 1 }; -export const exportedProp = o.prop; - - -let xo = { - baz: 1, - bar: 1 -} - -let yo = { - bat: "", - foo: "" -} - -export let xyo = { - ...yo, - ...xo, -} - -export const HappyLogLevel = { - DEBUG: 'DEBUG', - INFO: 'INFO', - NONE: 'NONE', - TRACE: 'TRACE', -} as const; -export const UnhappyLogLevel = { - ERROR: 'ERROR', - FATAL: 'FATAL', - WARN: 'WARN', -} as const; -export const LogLevel = { - UNDEFINED: "UNDEFINED", - ...HappyLogLevel, - ...UnhappyLogLevel, -} as const; - -const noteTypes = ['short', 'long'] as const; -export const getNoteTypes = () => noteTypes; - -export const getSettings = ( - settings: { field: boolean } -)=> ({ - x: settings.field -}); diff --git a/external-declarations/tests/source/local-inference/union-collapse.ts b/external-declarations/tests/source/local-inference/union-collapse.ts deleted file mode 100644 index e0decddb1a6ab..0000000000000 --- a/external-declarations/tests/source/local-inference/union-collapse.ts +++ /dev/null @@ -1,53 +0,0 @@ -//@nolib:true - -//@fileName: lib.d.ts - -interface Object { type: "object" } -interface String { type: "string" } -interface BigInt { type: "bigint" } -interface Number { type: "number" } -interface Boolean { type: "boolean" } -interface Function { type: "function" } -interface Array { type: "array" } - -//@fileName: unions.ts -export let arrStrings3 = [`A` as `A`, `B` as `B`]; -export let arrStrings0 = ["", "A" as "A"]; -export let arrStrings1 = ["A" as "A", ""]; -export let arrStrings2 = [`A` as `A`, ""]; -export let arrStrings4 = [`A` as `B${number}`, `E`]; -export let arrStrings5 = [`A` as `A`, `B` as `B`, 'C' as const, 'D' as const, "", 'E' as const, 'F' as const]; -export let arrStrings6 = [`A` as `B${number}`, `G` as const]; - -export let arrBooleans1 = [true as const, false]; -export let arrBooleans2 = [false, true as const]; -export let arrBooleans3 = [false as const, true as const]; - - - -export let arrNumber1 = [1 as const, 0]; -export let arrNumber2 = [0, 1 as const]; -export let arrNumber3 = [1 as const, 2 as const]; -export let arrNumber4 = [1 as const, 2 as const, 3 as const, 0, 4 as const, 5 as const]; - - -export let arrBigInt1 = [1n as const, 0n]; -export let arrBigInt2 = [0n, 1n as const]; -export let arrBigInt3 = [1n as const, 2n as const]; - - -export let arrMixed1 = [false as const, true as const, 0 as const]; -export let arrMixed2 = [false as const, true as const, 0 as const, 1]; -export let arrMixed3 = [false as const, true as const, 0 as const, 1 as const]; -export let arrMixed4 = [false as const, true as const, "A" as const, 1 as const]; -export let arrMixed5 = [false as const, true as const, "A" as const, 1 as const, ""]; -export let arrMixed6 = [true as const, "A" as const, 1 as const, "", 0]; -export let arrMixed7 = [true as const, "A" as const, 1 as const, "", 0, 1n as const]; -export let arrMixed8 = [true as const, 2n, "A" as const, 1 as const, "", 0, 1n as const]; - -export let unionOrder1 = [0, ""] -export let unionOrder2 = ["", 0] -export let unionOrder3 = ["", { foo: 0}, 0] -export let unionOrder4 = [{ foo: 0}, 0, "", 0] -export let unionOrder5 = [{ foo: 0}, 0, "", 0, true as const] -export let unionOrder6 = [{ foo: 0}, 0, "", 0, 1n, true as const] \ No newline at end of file diff --git a/external-declarations/tests/source/private-members-typeof.ts b/external-declarations/tests/source/private-members-typeof.ts deleted file mode 100644 index 71d744e5109f5..0000000000000 --- a/external-declarations/tests/source/private-members-typeof.ts +++ /dev/null @@ -1,4 +0,0 @@ -class Test { - #foo = 1; - #bar: typeof this.#foo = 1; -} \ No newline at end of file diff --git a/external-declarations/tests/source/transitive.ts b/external-declarations/tests/source/transitive.ts deleted file mode 100644 index e599dad981578..0000000000000 --- a/external-declarations/tests/source/transitive.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Person } from "./class-all"; -type Q = P; -type P = Person; -export type D = Q; \ No newline at end of file diff --git a/external-declarations/tests/source/tsconfig.json b/external-declarations/tests/source/tsconfig.json deleted file mode 100644 index d93575dff06f6..0000000000000 --- a/external-declarations/tests/source/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "target": "ESNext", - } -} diff --git a/external-declarations/tests/source/type-aliases.ts b/external-declarations/tests/source/type-aliases.ts deleted file mode 100644 index db7efb5b0b514..0000000000000 --- a/external-declarations/tests/source/type-aliases.ts +++ /dev/null @@ -1,13 +0,0 @@ -type PersonType = { - age: string; -} - -type Id = { - [P in keyof T]: T[P] -} - -export type P = Id - -function x() { - return 1; -} \ No newline at end of file diff --git a/external-declarations/tests/source/unicode-chars.ts b/external-declarations/tests/source/unicode-chars.ts deleted file mode 100644 index d325ca925d118..0000000000000 --- a/external-declarations/tests/source/unicode-chars.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @target: es2015 -// @filename: extendedEscapesForAstralsInVarsAndClasses.ts -export var _𐊧 = "" \ No newline at end of file diff --git a/parallel-build/.gitignore b/parallel-build/.gitignore deleted file mode 100644 index 813c8d27fe7c2..0000000000000 --- a/parallel-build/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -/build -/node_modules -/src/*.tsbuildinfo -/tests/actual -/tsc-tests -/tasks -/tasks-stats* -/tasks-times -clean.json -results -*.txt -*.json \ No newline at end of file diff --git a/parallel-build/README.md b/parallel-build/README.md deleted file mode 100644 index bf3016ee6d1e8..0000000000000 --- a/parallel-build/README.md +++ /dev/null @@ -1,57 +0,0 @@ -1. Build typescript -```sh - cd typescript - npx hereby local -``` -2. Build external-declarations -```sh - cd external-declarations - npm run build -``` -3. Build parallel-build -```sh - cd parallel-build - npm run build -``` -4. Create task dirs in the parallel-build folder -```sh - cd parallel-build - mkdir tasks - mkdir tasks-stats - mkdir tasks-times -``` - -5. Create task files by pointing to one or more composite project tsconfigs (referenced projects will be discovered): -```sh - cd parallel-build - node ./build/dep-builder/dep-builder-tsconfig.json.js tsconfig.json -``` - -The task folder should now contain task configurations for different build types: - - `b=T` - just use `tsc -b` equivalent - - `isolatedDeclarations=F` - parallel build with topological sort based on dependencies - - `isolatedDeclarations=T` - parallel build with declaration generation at the beginning - - `cpus=X` - number of workers to use for each build (for `-b` it makes no difference since it is single threaded, unless there are multiple root projects) - -7. Test that build works for all build types. - -```sh -# tsc -b -node ./build/main.js ./tasks/clean.json -node ./build/main.js ./tasks/b\=T-isolatedDeclarations\=F-cpus\=6.json - -# topological order -node ./build/main.js ./clean.json -node ./build/main.js ./tasks/b\=F-isolatedDeclarations\=F-cpus\=6.json - -# isolated declarations full parallelism -node ./build/main.js ./clean.json -node ./build/main.js ./tasks/b\=F-isolatedDeclarations\=T-cpus\=6.json -``` - -8. Run the full test suite (will run each task in the task folder 11 times (1st for task ordering times, 10 for perf metrics) ) -Each task will run 11 time, with a clean in between and a 1s pause - -```sh -node ./build/run-all-tasks.js -``` \ No newline at end of file diff --git a/parallel-build/package.json b/parallel-build/package.json deleted file mode 100644 index 029e18a56a527..0000000000000 --- a/parallel-build/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "parallel-build", - "version": "1.0.0", - "description": "", - "main": "index.js", - "type": "module", - "scripts": { - "build": "tsc -p ./", - "watch": "tsc -w -p ./" - }, - "author": "", - "license": "ISC", - "dependencies": { - "@types/node": "^20.1.3", - "external-declarations": "file:../external-declarations", - "json5": "^2.2.3", - "systeminformation": "^5.21.8", - "typescript": "file:.." - } -} diff --git a/parallel-build/src/dep-builder/build-task-files.ts b/parallel-build/src/dep-builder/build-task-files.ts deleted file mode 100644 index 85c6310e8d2a1..0000000000000 --- a/parallel-build/src/dep-builder/build-task-files.ts +++ /dev/null @@ -1,243 +0,0 @@ -import * as fs from "node:fs/promises"; - -import * as path from "path"; -import { - CompilerOptions, -} from "typescript"; - -import { - Message, - Task, -} from "../protocol.js"; - -export interface PackageInfo { - name: string; - dependencies: string[]; - path: string; -} -export async function buildTaskFiles( - outputPath: string, - bundles: PackageInfo[], - tsconfig: (string | null)[] = ["tsconfig.json"], - declarationConfig: string | undefined | null = "tsconfig.json", -) { - const bundleNames = new Set(bundles.map(b => b.name)); - - const taskName = (name: string | null) => - tsconfig.length === 1 ? "" : - name === declarationConfig ? "-declaration" : - name ? "-" + path.basename(name).replace(".json", "").replace("tsconfig.", "") : - name; - - const makeTask = (b: PackageInfo, tscConfig: string | null, name = taskName(tscConfig)): Task => ({ - name: b.name + name, - group: b.name, - dependencies: b.dependencies.filter(d => bundleNames.has(d)).map(d => d + name), - config: { - type: "tsc", - project: tscConfig ? path.join(b.path, tscConfig) : b.path, - redirectDeclarationOutput: true, - tsconfigOverrides: {}, - }, - }); - const tasks = bundles.flatMap(b => tsconfig.map(tscConfig => makeTask(b, tscConfig))); - interface ConfigFile { - globalTsOverrides: CompilerOptions; - tasks: Task[]; - } - interface VarOption { - values: T[]; - make: (value: T, data: ConfigFile) => ConfigFile; - name: K; - format: (v: T) => string; - } - function makeOption( - name: K, - values: T[], - make: (v: T, data: ConfigFile) => ConfigFile, - format?: (v: T) => string, - ): VarOption { - return { - values, - make, - name, - format: format ?? (v => `${v}`), - }; - } - function booleanCompilerOption(key: K, make?: (v: boolean, data: ConfigFile) => ConfigFile) { - const defaultMaker: VarOption["make"] = (value, data) => { - return { - ...data, - globalTsOverrides: { - ...data.globalTsOverrides, - [key]: value, - }, - }; - }; - return makeOption( - key, - [true, false], - make ? (v, d) => make(v, defaultMaker(v, d)) : defaultMaker, - v => v ? "T" : "F", - ); - } - - const baseConfigFileData = { - globalTsOverrides: { - allowJs: false, - skipLibCheck: true, - } as CompilerOptions, - tasks, - }; - - const cleanTasks = { - ...baseConfigFileData, - tasks: tasks.map(t => ({ - ...t, - config: { - ...t.config, - type: "clean", - }, - })), - }; - await fs.writeFile(path.join(outputPath, `clean.json`), JSON.stringify(cleanTasks, undefined, 2)); - - const ensureDeclarationTask = (d: string) => d.endsWith("-declarations") ? d : d + "-declarations"; - const options = [ - booleanCompilerOption("b", (value, data) => { - if (!value) return data; - const leafTasks = tasks.filter(t => tasks.every(s => s.dependencies.indexOf(t.name) === -1)); - return { - ...data, - tasks: leafTasks.map((t, i) => ({ - ...t, - dependencies: leafTasks[i + 1] ? [leafTasks[i + 1].name] : [], - config: t.config.type !== "tsc" ? t.config : { - ...t.config, - type: "tsc-b", - }, - })), - }; - }), - booleanCompilerOption("isolatedDeclarations", (v, d) => { - if (!v) return d; - return { - ...d, - tasks: [ - ...bundles.map(b => makeTask(b, declarationConfig, "-declarations")).map(t => ({ - ...t, - config: { - ...t.config, - type: "declaration", - tsconfigOverrides: {}, - } as Message, - name: t.name, - dependencies: [], - })), - ...d.tasks.map(t => ({ - ...t, - config: { - ...t.config, - type: "tsc", - tsconfigOverrides: { - declaration: false, - }, - } as Message, - name: t.name, - dependencies: [ - ensureDeclarationTask(t.name), - ...t.dependencies.map(ensureDeclarationTask), - ], - })), - ], - }; - }), - // booleanCompilerOption("deps", (value, data) => { - // if (value) return data; - // return { - // ...data, - // tasks: data.tasks.map(t => ({ - // ...t, - // dependencies: [] - // })) - // } - // }), - // booleanCompilerOption("declaration"), - // booleanCompilerOption("skipLibCheck"), - // booleanCompilerOption("noEmit", (v, d) => ({ - // ...d, - // globalTsOverrides: { - // ...d.globalTsOverrides, - // noEmit: d.tasks.some(t => t.config.type === "tsc-b") ? false: true, - // }, - // tasks: d.tasks.map(t => ({...t, suppressOutput: true})), - // })), - makeOption("cpus", [6, 8, 10, 12, 16, 24], (n, data) => ({ - ...data, - cpus: n, - })), - ]; - - const varValueIndexes = options.map(() => 0); - type FileOptions = { - [P in typeof options[number] as P["name"]]: P["values"][number]; - }; - function validateConfiguration(o: FileOptions) { - // if(o.b && !o.declaration) return false; - if (o.b && o.isolatedDeclarations) return false; - // if(o.b && !o.deps) return false; - if (o.b && o.cpus > 6) return false; - if (!o.b && !o.isolatedDeclarations && o.cpus > 10) return false; - // if(o.deps && o.cpus > 8) return false; - return true; - } - function next() { - for (let i = 0; i < options.length; i++) { - varValueIndexes[i]++; - if (varValueIndexes[i] >= options[i].values.length) { - varValueIndexes[i] = 0; - if (i === options.length - 1) { - return false; - } - continue; - } - break; - } - return true; - } - - while (true) { - let configFileData = baseConfigFileData; - const fileName = []; - const currentOptions: FileOptions = {} as FileOptions; - for (let i = 0; i < options.length; i++) { - const opt = options[i]; - const value = opt.values[varValueIndexes[i]]; - configFileData = opt.make(value as never, configFileData); - fileName.push(`${opt.name}=${opt.format(value as never)}`); - currentOptions[opt.name] = value as never; - } - if (validateConfiguration(currentOptions)) { - await fs.writeFile(path.join(outputPath, `${fileName.join("-")}.json`), JSON.stringify(configFileData, undefined, 2)); - } - if (!next()) break; - } - - // const leafTasks = tasks - // .filter(t => tasks.every(s => s.dependencies.indexOf(t.name) === -1)); - // fs.writeFile(`./tasks-leafs.json`, JSON.stringify({ - // globalTsOverrides: { - // allowJs: false, - // } as CompilerOptions, - // tasks: leafTasks.map((t, i) => ({ - // ...t, - // config: { - // ...t.config, - // type: "tsc-b" - // }, - // dependencies: i === leafTasks.length - 1 ? [] : [leafTasks[i + 1].name] - // })), - // }, undefined, 2)); - - // console.log(tasks); -} diff --git a/parallel-build/src/dep-builder/dep-builder-package.json.ts b/parallel-build/src/dep-builder/dep-builder-package.json.ts deleted file mode 100644 index d79f4e1e03848..0000000000000 --- a/parallel-build/src/dep-builder/dep-builder-package.json.ts +++ /dev/null @@ -1,92 +0,0 @@ -import * as fs from "node:fs/promises"; -import * as pathModule from "node:path"; - -import { - buildTaskFiles, -} from "./build-task-files.js"; - -function listFiles(path: string, spec: RegExp, options: { recursive?: boolean; exclude?: RegExp; } = {}, depth = Number.MAX_SAFE_INTEGER) { - async function filesInFolder(folder: string, depth: number) { - let paths: string[] = []; - - for (const file of await fs.readdir(folder)) { - const pathToFile = pathModule.join(folder, file); - const stat = await fs.stat(pathToFile); - if (depth !== 0 && options.recursive && stat.isDirectory() && !options.exclude?.exec(pathToFile)) { - paths = paths.concat(await filesInFolder(pathToFile, depth - 1)); - } - else if (stat.isFile() && (!spec || file.match(spec))) { - paths.push(pathToFile); - } - } - - return paths; - } - - return filesInFolder(path, depth); -} - -async function loadBundles(directory: string) { - const files = await listFiles(directory, /package.json/, { - recursive: true, - exclude: /(node_modules)|([\\/]\.)/, - }, 2); - return files.filter(r => pathModule.dirname(r) !== directory); -} - -async function loadBundlesDependencies(packageJsonList: string[]) { - const dependencyInfo: Record = {}; - for (const packagePath of packageJsonList) { - const packageInfo = JSON.parse(await fs.readFile(packagePath, { encoding: "utf-8" })); - dependencyInfo[packageInfo.name] = { - name: packageInfo.name, - dependencies: [ - ...((packageInfo.dependencies && Object.keys(packageInfo.dependencies)) ?? []), - ...((packageInfo.devDependencies && Object.keys(packageInfo.devDependencies)) ?? []), - ], - path: pathModule.dirname(packagePath), - references: [], - }; - } - function depth(name: string): number { - const entry = dependencyInfo[name]; - if (entry === undefined) return 0; - if (entry.depth) return entry.depth; - - entry.depth = 1 + Math.max(...entry.dependencies.map(depth)); - return entry.depth; - } - - const sortedBundles = Object.values(dependencyInfo).sort((a, b) => depth(a.name) - depth(b.name)); - - sortedBundles.forEach(b => { - b.dependencies = b.dependencies.filter(n => { - const entry = dependencyInfo[n]; - if (entry) { - entry.references.push(b.name); - } - return !!entry; - }); - }); - return sortedBundles; -} - -async function main() { - const path = process.argv[2]; - const outPath = process.argv[3] ?? "./tasks"; - const packageJsonPaths = await loadBundles(path); - const packageInfoList = await loadBundlesDependencies(packageJsonPaths); - await buildTaskFiles(outPath, packageInfoList, [ - "tsconfig.es.json", - "tsconfig.cjs.json", - "tsconfig.types.json", - ], "tsconfig.types.json"); -} - -main(); diff --git a/parallel-build/src/dep-builder/dep-builder-tsconfig.json.ts b/parallel-build/src/dep-builder/dep-builder-tsconfig.json.ts deleted file mode 100644 index fc5234437b6ac..0000000000000 --- a/parallel-build/src/dep-builder/dep-builder-tsconfig.json.ts +++ /dev/null @@ -1,99 +0,0 @@ -import * as fs from "node:fs/promises"; -import * as pathModule from "node:path"; - -import JSONC from "json5"; - -import { - buildTaskFiles, - PackageInfo, -} from "./build-task-files.js"; - -function listFiles(path: string, spec: RegExp, options: { recursive?: boolean; exclude?: RegExp; } = {}, depth = Number.MAX_SAFE_INTEGER) { - async function filesInFolder(folder: string, depth: number) { - let paths: string[] = []; - - for (const file of await fs.readdir(folder)) { - const pathToFile = pathModule.join(folder, file); - const stat = await fs.stat(pathToFile); - if (depth !== 0 && options.recursive && stat.isDirectory() && !options.exclude?.exec(pathToFile)) { - paths = paths.concat(await filesInFolder(pathToFile, depth - 1)); - } - else if (stat.isFile() && (!spec || file.match(spec))) { - paths.push(pathToFile); - } - } - - return paths; - } - - return filesInFolder(path, depth); -} - -async function loadBundlesDependencies(tsConfigs: string[]) { - const dependencyInfo: Record< - string, - PackageInfo & { - depth?: number; - } - > = {}; - - async function loadTsConfig(filePath: string): Promise { - let resolvedPath = pathModule.resolve(filePath); - - const stat = await fs.stat(resolvedPath); - if (stat.isDirectory()) { - resolvedPath = pathModule.join(resolvedPath, "tsconfig.json"); - } - - if (dependencyInfo[resolvedPath]) return resolvedPath; - const tsConfigData = JSONC.parse(await fs.readFile(resolvedPath, { encoding: "utf-8" })) as { - references: { - path: string; - }[]; - }; - const configInfo: PackageInfo = dependencyInfo[resolvedPath] = { - name: resolvedPath, - path: resolvedPath, - dependencies: [], - }; - const directory = pathModule.dirname(resolvedPath); - if (tsConfigData.references) { - for (const ref of tsConfigData.references) { - configInfo.dependencies.push(await loadTsConfig(pathModule.join(directory, ref.path))); - } - } - return resolvedPath; - } - - for (const tsConfig of tsConfigs) { - await loadTsConfig(tsConfig); - } - function depth(name: string): number { - const entry = dependencyInfo[name]; - if (entry === undefined) return 0; - if (entry.depth) return entry.depth; - - entry.depth = 1 + (entry.dependencies.length === 0 ? 0 : Math.max(...entry.dependencies.map(depth))); - return entry.depth; - } - - const sortedBundles = Object.values(dependencyInfo).sort((a, b) => depth(a.name) - depth(b.name)); - - sortedBundles.forEach(b => { - b.dependencies = b.dependencies.filter(n => { - const entry = dependencyInfo[n]; - return !!entry; - }); - }); - return sortedBundles; -} - -async function main() { - const paths = process.argv.slice(2); - const outPath = "./tasks"; - const packageInfoList = await loadBundlesDependencies(paths); - // eslint-disable-next-line no-null/no-null - await buildTaskFiles(outPath, packageInfoList, [null], /*declarationConfig*/ null); -} - -main(); diff --git a/parallel-build/src/main.ts b/parallel-build/src/main.ts deleted file mode 100644 index bedbb3cb81930..0000000000000 --- a/parallel-build/src/main.ts +++ /dev/null @@ -1,233 +0,0 @@ -import { - fork, - spawn, -} from "node:child_process"; -import * as fs from "node:fs/promises"; -import * as os from "node:os"; -import * as path from "node:path"; -import { - Worker, -} from "node:worker_threads"; - -import JSONC from "json5"; -import { - CompilerOptions, -} from "typescript"; - -import { - Task, -} from "./protocol.js"; -import { - makeSingleThreadedWorker, -} from "./single-thread-worker.js"; -import { - taskNameLog, -} from "./utils.js"; - -const useProcess = process.argv.indexOf("--use-processes") !== -1; -const singleThread = process.argv.indexOf("--single-thread") !== -1; -const cpuOverride = process.argv.map(v => /^--cpus=(?[0-9]+)$/.exec(v)).map(m => Number(m?.groups?.value)).find(v => !isNaN(v)); - -interface AbstractWorker { - postMessage(value: any): void; - once(event: "message", listener: (data: unknown) => void): void; - terminate(): void; -} -function makeWorker(index: number): AbstractWorker { - if (singleThread) { - return makeSingleThreadedWorker(); - } - if (!useProcess) { - return new Worker("./build/worker.js", { - workerData: { - workerIndex: index, - }, - }); - } - const childProcess = fork(path.resolve(`./build/worker.js`), [`--worker-index=${index}`]); - return { - postMessage(value: any) { - childProcess.send(value); - }, - once(event: "message", listener: (data: unknown) => void) { - childProcess.once(event, listener); - }, - terminate() { - childProcess.kill(); - }, - }; -} -interface WorkerInfo { - dependencies: Set; - groups: Set; - worker: AbstractWorker; - workTime: number; -} -function countIntersection(set: Set, items: T[]) { - let c = 0; - for (const item of items) { - if (set.has(item)) { - c++; - } - } - return c; -} -async function main() { - const taskFile = process.argv.slice(2).find(s => !s.startsWith("--")); - if (!taskFile) return; - - const timeFile = path.join(path.dirname(taskFile) + "-times", path.basename(taskFile)); - const existingTaskTimes: Record = await (async () => { - try { - return JSONC.parse(await fs.readFile(timeFile, { encoding: "utf8" })); - } - catch (e) { - return {}; - } - })(); - const getTaskTime = (name: string) => existingTaskTimes[name] ?? Number.MAX_SAFE_INTEGER; - const taskFileConfig = JSONC.parse(await fs.readFile(taskFile, { encoding: "utf-8" })) as { - cpus?: number; - tasks: Task[]; - globalTsOverrides: CompilerOptions; - }; - - let maxParallelTasks = 0; - let groupCollocation = 0; - const startTime = new Date(); - const workerCount = singleThread ? 1 : cpuOverride ?? taskFileConfig.cpus ?? Math.round(os.cpus().length / 2); - const workers: WorkerInfo[] = Array.from({ length: workerCount }).map((_, i) => ({ - worker: makeWorker(i + 1), - groups: new Set(), - dependencies: new Set(), - workTime: 0, - })); - const activeTasks: Promise[] = []; - const tasks: Task[] = taskFileConfig.tasks; - const completedTasks = new Set(); - const taskTimes: Record = {}; - tasks.sort((a, b) => (getTaskTime(b.group ?? b.name) - getTaskTime(a.group ?? a.name))); - const scheduledTasksOrder: string[] = []; - while (tasks.length) { - const nextTasks = tasks.filter(t => t.dependencies.every(d => completedTasks.has(d))); - if (nextTasks.length === 0) { - console.log(`${taskNameLog("NONE")}: Waiting for deps to finish. Unscheduled Tasks: ${tasks.length}`); - if (activeTasks.length === 0) { - throw new Error(`No tasks are running but tasks still have required dependencies. Check your task file. Sample uncompleted task: ${tasks[0].dependencies.find(o => !completedTasks.has(o))}`); - } - await waitForTaskCompletion(); - continue; - } - const workerInfo = await waitForWorker(); - - let task = nextTasks.find(t => workerInfo.groups.has(t.group)); - if (!task) { - // Sort task by dependency overlap - nextTasks.sort((a, b) => countIntersection(workerInfo.dependencies, a.dependencies) - countIntersection(workerInfo.dependencies, b.dependencies)); - task = nextTasks[0]; - } - else { - groupCollocation++; - } - - if (task.config.type === "tsc" || task.config.type === "tsc-b" || task.config.type === "tsc-shard") { - task.config.tsconfigOverrides = { - ...taskFileConfig.globalTsOverrides, - ...task.config.tsconfigOverrides, - }; - } - tasks.splice(tasks.indexOf(task), 1); - const taskStart = new Date(); - scheduledTasksOrder.push(task.name); - workerInfo.groups.add(task.group); - task.dependencies.forEach(d => workerInfo.dependencies.add(d)); - queueTask(workerInfo, task, () => { - completedTasks.add(task!.name); - const time = new Date().getTime() - taskStart.getTime(); - taskTimes[task!.group ?? task!.name] = (taskTimes[task!.group ?? task!.name] ?? 0) + time; - workerInfo.workTime += time; - console.log(`${taskNameLog(task!.name)}: Finish Message in ${Math.round(time / 1000)}s`); - }); - } - console.log(`${taskNameLog("NONE")}: ALL TASKS HAVE BEEN SCHEDULED`); - await Promise.all([...activeTasks]); - workers.forEach(w => w.worker.terminate()); - - const time = new Date().getTime() - startTime.getTime(); - console.log(`${taskNameLog("NONE")}: Finished all in ${time / 1000}s ${time / 1000 / 60}m`); - // console.log(scheduledTasksOrder.join("\n")); - try { - const taskTimesEntries = Object.entries(taskTimes).sort((a, b) => a[1] - b[1]); - - console.log( - "Worker Times", - JSON.stringify( - { - groupCollocation, - groups: taskTimesEntries.length, - times: workers.map(w => ({ time: w.workTime, groups: [...w.groups] })), - }, - undefined, - 2, - ), - ); - - await fs.writeFile(timeFile, JSON.stringify(Object.fromEntries(taskTimesEntries), undefined, 2)); - - const statFile = path.join( - path.dirname(taskFile) + "-stats", - `${Date.now()}-` + path.basename(taskFile.substring(0, taskFile.length - ".json".length)) + ".json", - ); - await fs.writeFile( - statFile, - JSON.stringify( - { - startTime: startTime.getTime(), - executionTime: time, - cumulatedTime: taskTimesEntries.reduce((s, [_, v]) => s + v, 0), - maxParallelTasks, - taskTimes, - taskFileConfig, - }, - undefined, - 2, - ), - ); - } - catch (e) { - console.log("Failed to write times and stats"); - } - - async function waitForTaskCompletion() { - return Promise.any([...activeTasks]); - } - async function waitForWorker() { - let wInfo = workers.pop()!; - while (!wInfo) { - console.log(`${taskNameLog("NONE")}: Waiting for worker - Active Tasks: ${activeTasks.length} - Unscheduled Tasks: ${tasks.length}`); - await waitForTaskCompletion(); - wInfo = workers.pop()!; - } - return wInfo; - } - function queueTask(wInfo: WorkerInfo, task: Task, onTaskCompleted: () => void) { - const taskPromise = new Promise(resolve => { - console.log(`${taskNameLog(task.name)}: Start Message`); - wInfo.worker.once("message", () => { - console.log(`${taskNameLog(task.name)}: Finish Message`); - workers.push(wInfo); - onTaskCompleted(); - activeTasks.splice(activeTasks.indexOf(taskPromise), 1); - resolve(); - }); - wInfo.worker.postMessage({ - name: task.name, - config: task.config, - }); - }); - activeTasks.push(taskPromise); - maxParallelTasks = Math.max(maxParallelTasks, activeTasks.length); - } -} - -main(); diff --git a/parallel-build/src/protocol.ts b/parallel-build/src/protocol.ts deleted file mode 100644 index bff4fd9f1a392..0000000000000 --- a/parallel-build/src/protocol.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { - CompilerOptions, -} from "typescript"; - -export interface Task { - name: string; - config: Message; - dependencies: string[]; - group: string; -} - -export type Message = - | { - type: "exit"; - } - | ( - ({ type: "tsc"; } | { type: "tsc-shard"; shard: number; shardCount: number; }) & { - project: string; - suppressOutput?: boolean; - redirectDeclarationOutput?: boolean; - tsconfigOverrides: CompilerOptions; - } - ) - | { - type: "declaration"; - project: string; - tsconfigOverrides: CompilerOptions; - } - | { - type: "tsc-b"; - project: string; - suppressOutput?: boolean; - redirectDeclarationOutput?: boolean; - tsconfigOverrides: CompilerOptions; - } - | { - type: "clean"; - project: string; - tsconfigOverrides: CompilerOptions; - }; diff --git a/parallel-build/src/run-all-tasks.ts b/parallel-build/src/run-all-tasks.ts deleted file mode 100644 index 474dc8d9982f9..0000000000000 --- a/parallel-build/src/run-all-tasks.ts +++ /dev/null @@ -1,77 +0,0 @@ -import * as child from "node:child_process"; -import path from "node:path"; - -import * as fs from "fs/promises"; -import * as sys from "systeminformation"; - -const taskDir = "./tasks"; -const statsDir = taskDir + "-stats"; -const timesDir = taskDir + "-times"; -function runTaskFile(taskFile: string, env?: NodeJS.ProcessEnv) { - return child.execFileSync(`node ./build/main.js ${taskFile} --use-worker`, { - shell: true, - encoding: "utf8", - // env, - }); -} - -function delay(ms: number) { - // eslint-disable-next-line no-restricted-globals - return new Promise(r => setTimeout(r, ms)); -} -async function runAllTests(runCount = 1, skipSet = new Set()) { - const taskFiles = await fs.readdir("./tasks"); - taskFiles.sort((a, b) => b.localeCompare(a)); - - for (let i = 0; i < runCount; i++) { - for (let t = 0; t < taskFiles.length; t++) { - const taskFile = taskFiles[t]; - if (skipSet.has(taskFile)) continue; - - runTaskFile("./tasks/clean.json", {}); - await delay(10 * 1000); - console.log(`Running Task ${(t + 1)}/${taskFiles.length}. Run ${i}. ${taskFile}`); - const result = runTaskFile(path.join("./tasks", taskFile)); - - if (result.indexOf("Has Errors") !== -1 || result.indexOf("Fatal Error") !== -1) { - console.log(`Errors for ${taskFile}`); - const errorFile = `${Date.now()}-` + path.basename(taskFile.substring(0, taskFile.length - ".json".length)) + ".log"; - await fs.writeFile(path.join(statsDir, errorFile), result); - } - } - } -} - -async function exists(path: string) { - try { - await fs.access(path); - return true; - } - catch (e) { - return false; - } -} - -if (await exists(statsDir)) { - const files = await fs.readdir(statsDir); - if (files.length) { - const time = files[0].split("-"); - await fs.rename(statsDir, statsDir + "-" + time[0]); - } - else { - await fs.rm(statsDir, { recursive: true }); - } -} -await fs.mkdir(statsDir); - -const existingTestFiles = new Set(); -if (!(await exists(timesDir))) { - await fs.mkdir(timesDir); -} -else { - (await fs.readdir(timesDir)).forEach(t => existingTestFiles.add(t)); -} -await runAllTests(1, existingTestFiles); // First run to ensure times. -await fs.rm(statsDir, { recursive: true }); -await fs.mkdir(statsDir); -await runAllTests(10); diff --git a/parallel-build/src/single-thread-worker.ts b/parallel-build/src/single-thread-worker.ts deleted file mode 100644 index 4276946464e5d..0000000000000 --- a/parallel-build/src/single-thread-worker.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { - nextTick, -} from "process"; -import { - Readable, - Stream, -} from "stream"; - -export const toWorker = new Readable({ - read() {}, -}); -export const toMain = new Readable({ - read() {}, -}); - -export function makeSingleThreadedWorker() { - import("./worker.js"); - return { - postMessage(value: any) { - nextTick(function postToWorker() { - toWorker.push(JSON.stringify(value)); - }); - }, - once(event: "message", listener: (data: unknown) => void) { - toMain.once("data", value => listener(JSON.parse(value))); - }, - terminate() {}, - }; -} - -export function makeSingleThreadedParentPort() { - return { - on(event: "message", listener: (value: any) => void) { - toWorker.on("data", function receiveFromParent(value) { - listener(JSON.parse(value)); - }); - }, - postMessage(value: any) { - nextTick(() => toMain.push(JSON.stringify(value))); - }, - }; -} diff --git a/parallel-build/src/utils.ts b/parallel-build/src/utils.ts deleted file mode 100644 index fadeea9b93ab6..0000000000000 --- a/parallel-build/src/utils.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - workerData, -} from "worker_threads"; - -const processWorkerIndex = process.argv.map(l => /worker-index=([0-9]*)/.exec(l)).find(m => !!m)?.[1]; -const workerIndex = +(workerData?.workerIndex ?? processWorkerIndex ?? 0); -const spaces = " "; -function pad(s: string, count = 20) { - return spaces.substring(0, count - s?.length) + s; -} -const start = Math.trunc(Date.now() / 1000 / 60 / 60 / 24); -export function taskNameLog(taskName: string) { - const time = Math.trunc((new Date().getTime() - start) / 1000); - return pad(workerIndex + "", 2) + - ": " + pad(time + "", 10) + - ": " + pad(taskName, 30) + - ""; -} diff --git a/parallel-build/src/worker-utils/build-declarations.ts b/parallel-build/src/worker-utils/build-declarations.ts deleted file mode 100644 index 5b83dc6797b42..0000000000000 --- a/parallel-build/src/worker-utils/build-declarations.ts +++ /dev/null @@ -1,42 +0,0 @@ -import * as path from "node:path"; - -import { - transformProject, -} from "external-declarations/build/compiler/transform-project.js"; -import ts, { - CompilerOptions, -} from "typescript"; - -import type { - Message, -} from "../protocol.js"; -import { - installCache, -} from "./cache.js"; -import { - withTrace, -} from "./utils.js"; - -export function buildDeclarations(name: string, value: Extract) { - const { host, parsedConfig, rootPath } = withTrace("read-config", () => { - const configFile = ts.readConfigFile(value.project, ts.sys.readFile); - const rootPath = path.resolve(path.dirname(value.project)); - const compilerOptions: CompilerOptions = configFile.config.compilerOptions = { - ...configFile.config.compilerOptions, - ...value.tsconfigOverrides, - isolatedDeclarations: true, - }; - configFile.config.compilerOptions = compilerOptions; - const parsedConfig = ts.parseJsonConfigFileContent(configFile.config, ts.sys, rootPath); - const host = ts.createCompilerHost(parsedConfig.options, /*setParentNodes*/ true); - installCache(host); - return { rootPath, parsedConfig, host }; - }); - - transformProject( - rootPath, - /*files*/ undefined, - parsedConfig.options, - host, - ); -} diff --git a/parallel-build/src/worker-utils/build-tsc-b.ts b/parallel-build/src/worker-utils/build-tsc-b.ts deleted file mode 100644 index 955fdff62ad51..0000000000000 --- a/parallel-build/src/worker-utils/build-tsc-b.ts +++ /dev/null @@ -1,26 +0,0 @@ -import ts from "typescript"; - -import type { - Message, -} from "../protocol.js"; -import { - parseConfigHostFromCompilerHostLike, -} from "./utils.js"; - -export function buildTSCB(value: Extract) { - const buildHost = ts.createSolutionBuilderHost( - ts.sys, - /*createProgram*/ undefined, - d => { - console.log(d.messageText); - }, - ); - - buildHost.getParsedCommandLine = fileName => { - const parserHost = parseConfigHostFromCompilerHostLike(buildHost, ts.sys); - const config = ts.getParsedCommandLineOfConfigFile(fileName, value.tsconfigOverrides, parserHost); - return config; - }; - const builder = ts.createSolutionBuilder(buildHost, [value.project], {}); - builder.build(); -} diff --git a/parallel-build/src/worker-utils/build-tsc-p.ts b/parallel-build/src/worker-utils/build-tsc-p.ts deleted file mode 100644 index 660af0be3c8fa..0000000000000 --- a/parallel-build/src/worker-utils/build-tsc-p.ts +++ /dev/null @@ -1,77 +0,0 @@ -import * as path from "node:path"; - -import ts, {} from "typescript"; - -import type { - Message, -} from "../protocol.js"; -import { - taskNameLog, -} from "../utils.js"; -import { - installCache, -} from "./cache.js"; -import { - withTrace, -} from "./utils.js"; - -const logErrors = process.argv.indexOf("--log-errors") !== -1; - -export function buildTSC(name: string, value: Extract) { - const { parsedConfig, host } = withTrace("read-config", () => { - const configFile = ts.readConfigFile(value.project, ts.sys.readFile); - const rootPath = path.resolve(path.dirname(value.project)); - configFile.config.compilerOptions = { - ...configFile.config.compilerOptions, - ...value.tsconfigOverrides, - }; - const parsedConfig = ts.parseJsonConfigFileContent(configFile.config, ts.sys, rootPath); - const host = ts.createCompilerHost(parsedConfig.options); - installCache(host); - return { parsedConfig, rootPath, host }; - }); - - const program = withTrace("create-program", () => - ts.createProgram({ - rootNames: parsedConfig.fileNames, - options: parsedConfig.options, - projectReferences: parsedConfig.projectReferences, - host, - })); - - const emitResult = value.tsconfigOverrides.noEmit ? undefined : withTrace("emit-js", () => - program.emit( - /*targetSourceFile*/ undefined, - /*writeFile*/ undefined, - /*cancellationToken*/ undefined, - /*emitOnly*/ !parsedConfig.options.declaration ? 0 as any : undefined, // Use undocumented emit only JS flag. - )); - const diagnostics = [ - ...withTrace("syntactic-diagnostic", () => program.getSyntacticDiagnostics()), - ...withTrace("semantic-diagnostic", () => program.getSemanticDiagnostics()), - ...withTrace("declaration-diagnostic", () => { - try { - return program.getDeclarationDiagnostics(); - } - catch (e) { - console.log(`${taskNameLog(name)}: Fatal Error ${(e as any).message}`); - return []; - } - }), - ...(emitResult?.diagnostics ?? []), - ]; - - if (diagnostics.length > 0) { - console.log(`${taskNameLog(name)}: Has Errors ${diagnostics.length}`); - diagnostics.forEach(diagnostic => { - const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n"); - if (diagnostic.file) { - const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start!); - console.log(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`); - } - else { - console.log(message); - } - }); - } -} diff --git a/parallel-build/src/worker-utils/build-tsc-shard.ts b/parallel-build/src/worker-utils/build-tsc-shard.ts deleted file mode 100644 index ad9189dadc08f..0000000000000 --- a/parallel-build/src/worker-utils/build-tsc-shard.ts +++ /dev/null @@ -1,168 +0,0 @@ -import fs from "node:fs"; -import * as path from "node:path"; - -import * as perf from "external-declarations/build/compiler/perf-tracer.js"; -import { - projectFilesTransformer, -} from "external-declarations/build/compiler/transform-project.js"; -import ts, {} from "typescript"; - -import type { - Message, -} from "../protocol.js"; -import { - taskNameLog, -} from "../utils.js"; -import { - installCache, -} from "./cache.js"; -import { - withTrace, -} from "./utils.js"; - -function assignFilesToShards(fileNames: string[], shardCount: number) { - const tsFiles = fileNames.filter(f => (f.endsWith(".ts") || f.endsWith(".tsx")) && !f.endsWith(".d.ts")); - const dtsFiles = fileNames.filter(f => f.endsWith(".d.ts")); - const fileStats = tsFiles.map(name => ({ - name, - size: fs.statSync(name).size, - })).sort((a, b) => b.size - a.size); - - const shardSizes: number[] = Array(shardCount).fill(0); - const shardFiles: string[][] = Array.from({ length: shardCount }).map(() => []); - - const selectShard = () => shardSizes.reduce((minIndex, v, index) => shardSizes[minIndex] > v ? index : minIndex, 0); - for (const file of fileStats) { - const shardIndex = selectShard(); - shardSizes[shardIndex] += file.size; - shardFiles[shardIndex].push(file.name); - } - return { dtsFiles, shardFiles }; -} -function changeExtension(fileName: string, newExtension: string) { - const index = fileName.lastIndexOf("."); - return fileName.substring(0, index) + newExtension; -} - -function installShardHost(parsedConfig: ts.ParsedCommandLine, host: ts.CompilerHost, value: Extract) { - const shards = withTrace("shardFiles", () => assignFilesToShards(parsedConfig.fileNames, value.shardCount)); - const declarationFile = (f: string) => changeExtension(f, ".d.ts"); - const otherShardFiles = new Map(); - const otherFilesReverseLookup = new Map(); - - shards.shardFiles.forEach((v, i) => { - if (i !== value.shard) { - v.forEach(f => { - const declFileName = declarationFile(f); - otherShardFiles.set(declFileName, f); - otherFilesReverseLookup.set(f, declFileName); - }); - } - }); - - const finalFiles = [...shards.dtsFiles, ...shards.shardFiles[value.shard]]; - parsedConfig.fileNames = finalFiles; - const originalReadFile = host.readFile.bind(host); - const originalFileExists = host.fileExists.bind(host); - const rootPath = path.resolve(path.dirname(value.project)); - const transformer = projectFilesTransformer(rootPath, parsedConfig.options); - const declarationHost = ts.createCompilerHost(parsedConfig.options, /*setParentNodes*/ true); - installCache(declarationHost, () => true); - - host.fileExists = (fileName: string) => { - if (otherFilesReverseLookup.has(fileName)) { - // Hide original source files from the compiler - return false; - } - const sourceFile = otherShardFiles.get(fileName); - if (!sourceFile) { - return originalFileExists(fileName); - } - return originalFileExists(sourceFile); - }; - const declarationFileCache = new Map(); - host.readFile = (fileName: string) => { - const sourceFile = otherShardFiles.get(fileName); - if (!sourceFile) { - return originalReadFile(fileName); - } - if (originalFileExists(fileName)) { - return originalReadFile(fileName); - } - - const cachedResult = declarationFileCache.get(fileName); - if (cachedResult) { - return cachedResult; - } - if (cachedResult === false) { - return undefined; - } - perf.tracer.current?.increment("generate-dts"); - return withTrace("generate-dts-time", () => { - const outputDeclarationFile = transformer(sourceFile, declarationHost); - const code = outputDeclarationFile ? host.readFile(outputDeclarationFile) : undefined; - declarationFileCache.set(fileName, code ?? false); - return code; - }); - }; -} -export function buildTSCShard(name: string, value: Extract) { - const { parsedConfig, host } = withTrace("read-config", () => { - const configFile = ts.readConfigFile(value.project, ts.sys.readFile); - const rootPath = path.resolve(path.dirname(value.project)); - configFile.config.compilerOptions = { - ...configFile.config.compilerOptions, - ...value.tsconfigOverrides, - }; - const parsedConfig = ts.parseJsonConfigFileContent(configFile.config, ts.sys, rootPath); - const host = ts.createCompilerHost(parsedConfig.options); - installCache(host); - return { parsedConfig, rootPath, host }; - }); - - installShardHost(parsedConfig, host, value); - - const program = withTrace("create-program", () => - ts.createProgram({ - rootNames: parsedConfig.fileNames, - options: parsedConfig.options, - projectReferences: parsedConfig.projectReferences, - host, - })); - - const emitResult = value.tsconfigOverrides.noEmit ? undefined : withTrace("emit-js", () => - program.emit( - /*targetSourceFile*/ undefined, - /*writeFile*/ undefined, - /*cancellationToken*/ undefined, - /*emitOnly*/ !parsedConfig.options.declaration ? 0 as any : undefined, // Use undocumented emit only JS flag. - )); - const diagnostics = [ - ...withTrace("syntactic-diagnostic", () => program.getSyntacticDiagnostics()), - ...withTrace("semantic-diagnostic", () => program.getSemanticDiagnostics()), - ...withTrace("declaration-diagnostic", () => { - try { - return program.getDeclarationDiagnostics(); - } - catch (e) { - console.log(`${taskNameLog(name)}: Fatal Error ${(e as any).message}`); - return []; - } - }), - ...(emitResult?.diagnostics ?? []), - ]; - - if (diagnostics.length > 0) { - console.log(`${taskNameLog(name)}: Has Errors ${diagnostics.length}`); - diagnostics.forEach(diagnostic => { - const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n"); - if (diagnostic.file) { - const { line, character } = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start!); - console.log(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`); - } - else { - console.log(message); - } - }); - } -} diff --git a/parallel-build/src/worker-utils/cache.ts b/parallel-build/src/worker-utils/cache.ts deleted file mode 100644 index abe40b23e4b74..0000000000000 --- a/parallel-build/src/worker-utils/cache.ts +++ /dev/null @@ -1,151 +0,0 @@ -import * as path from "node:path"; - -import * as perf from "external-declarations/build/compiler/perf-tracer.js"; -import ts, { - CompilerHost, - Node, - ResolutionMode, - SourceFile, -} from "typescript"; - -import { - withTrace, -} from "./utils.js"; - -export const installCache = (function globalCache() { - type Path = string; - const toPath = (path: string) => path; - const readFileCache = new Map(); - const fileExistsCache = new Map(); - const directoryExistsCache = new Map(); - const sourceFileCache = new Map>(); - - return (host: CompilerHost, suppressDiskWrite: (file: string) => boolean = () => false) => { - const originalGetSourceFile = host.getSourceFile.bind(host); - const originalReadFile = host.readFile.bind(host); - const originalFileExists = host.fileExists.bind(host); - const originalDirectoryExists = host.directoryExists?.bind(host); - const originalCreateDirectory = ((host as any).createDirectory as (directory: string) => void).bind(host); - const originalWriteFile = host.writeFile.bind(host); - - const setReadFileCache = (key: Path, fileName: string) => { - const newValue = withTrace("read-disk", () => originalReadFile(fileName)); - readFileCache.set(key, newValue !== undefined ? newValue : false); - return newValue; - }; - host.readFile = fileName => { - const key = toPath(fileName); - const value = readFileCache.get(key); - if (value !== undefined) return value !== false ? value : undefined; // could be .d.ts from output - - return setReadFileCache(key, fileName); - }; - - // fileExists for any kind of extension - host.fileExists = fileName => { - const key = toPath(fileName); - const value = fileExistsCache.get(key); - if (value !== undefined) return value; - const newValue = withTrace("fileExists-disk", () => originalFileExists(fileName)); - fileExistsCache.set(key, !!newValue); - return newValue; - }; - if (originalWriteFile) { - host.writeFile = (fileName, data, ...rest) => { - if (!suppressDiskWrite(fileName)) { - withTrace("write-disk", () => originalWriteFile(fileName, data, ...rest)); - } - - const key = toPath(fileName); - fileExistsCache.set(key, true); - - const value = readFileCache.get(key); - readFileCache.set(key, data); - - if (value !== undefined && value !== data) { - sourceFileCache.forEach(map => map.delete(key)); - } - else { - sourceFileCache.forEach(map => { - const sourceFile = map.get(key); - if (sourceFile && sourceFile.text !== data) { - map.delete(key); - } - }); - } - }; - } - - // directoryExists - if (originalDirectoryExists) { - host.directoryExists = directory => { - const key = toPath(directory); - const value = directoryExistsCache.get(key); - if (value !== undefined) return value; - const newValue = originalDirectoryExists(directory); - directoryExistsCache.set(key, !!newValue); - return newValue; - }; - - if (originalCreateDirectory) { - (host as any).createDirectory = (directory: string) => { - originalCreateDirectory(directory); - const key = toPath(directory); - directoryExistsCache.set(key, true); - }; - } - } - function cleanAST(node: Node) { - (node as any).id = undefined; - ts.forEachChild(node, cleanAST, nodes => nodes.forEach(cleanAST)); - } - const getSourceFileWithCache = (...[fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile]: Parameters) => { - const key = toPath(fileName); - const impliedNodeFormat: ResolutionMode = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions.impliedNodeFormat : undefined; - let forImpliedNodeFormat = sourceFileCache.get(impliedNodeFormat); - let value = forImpliedNodeFormat?.get(key); - const perfKey = fileName.endsWith(".d.ts") ? "-d.ts" : "-" + path.extname(fileName).substring(1); - - if (value) { - perf.tracer.current?.increment("ast-hit" + perfKey); - cleanAST(value); - return value; - } - - const baseFile = path.basename(fileName); - const isLibFile = baseFile.startsWith("lib."); - if (isLibFile) { - value = forImpliedNodeFormat?.get(baseFile); - if (value && value.text === host.readFile(fileName)) { - perf.tracer.current?.increment("ast-lib-hit"); - // Patch up file as it might not be from the same source - value.fileName = fileName; - cleanAST(value); - return value; - } - } - perf.tracer.current?.increment("ast-miss" + perfKey); - const sourceFile = withTrace("parse", () => originalGetSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile)); - function isCashable(fileName: string) { - return true; - return fileName.endsWith(".d.ts") - || fileName.endsWith(".d.cts") - || fileName.endsWith(".d.mts") - || fileName.endsWith(".json"); - } - if (sourceFile && isCashable(fileName)) { - if (!forImpliedNodeFormat) { - forImpliedNodeFormat = new Map(); - sourceFileCache.set(impliedNodeFormat, forImpliedNodeFormat); - } - forImpliedNodeFormat.set(key, sourceFile); - if (isLibFile) { - forImpliedNodeFormat.set(baseFile, sourceFile); - } - } - return sourceFile; - }; - host.getSourceFile = getSourceFileWithCache; - return host; - }; -})(); diff --git a/parallel-build/src/worker-utils/clean-project.ts b/parallel-build/src/worker-utils/clean-project.ts deleted file mode 100644 index 89cc9f0b5dbd4..0000000000000 --- a/parallel-build/src/worker-utils/clean-project.ts +++ /dev/null @@ -1,37 +0,0 @@ -import * as fs from "node:fs"; -import * as path from "node:path"; - -import ts, {} from "typescript"; - -import type { - Message, -} from "../protocol.js"; -import { - withTrace, -} from "./utils.js"; - -export function cleanProjectOutput(value: Extract) { - const { parsedConfig } = withTrace("read-config", () => { - const configFile = ts.readConfigFile(value.project, ts.sys.readFile); - const rootPath = path.dirname(value.project); - configFile.config.compilerOptions = { - ...configFile.config.compilerOptions, - ...value.tsconfigOverrides, - }; - const parsedConfig = ts.parseJsonConfigFileContent(configFile.config, ts.sys, rootPath); - - return { parsedConfig }; - }); - - const tsBuildInfo = value.project.substring(0, value.project.length - ".json".length) + ".tsbuildinfo"; - if (fs.existsSync(tsBuildInfo)) { - fs.rmSync(tsBuildInfo); - } - if (parsedConfig.options.outDir && fs.existsSync(parsedConfig.options.outDir)) { - fs.rmSync(parsedConfig.options.outDir, { recursive: true }); - } - - if (parsedConfig.options.declarationDir && fs.existsSync(parsedConfig.options.declarationDir)) { - fs.rmSync(parsedConfig.options.declarationDir, { recursive: true }); - } -} diff --git a/parallel-build/src/worker-utils/utils.ts b/parallel-build/src/worker-utils/utils.ts deleted file mode 100644 index 28f2e6a76bc20..0000000000000 --- a/parallel-build/src/worker-utils/utils.ts +++ /dev/null @@ -1,26 +0,0 @@ -import * as perf from "external-declarations/build/compiler/perf-tracer.js"; -import ts from "typescript"; - -export function withTrace(name: string, fn: () => T): T { - try { - perf.tracer.current?.start(name); - return fn(); - } - finally { - perf.tracer.current?.end(name); - } -} - -export function parseConfigHostFromCompilerHostLike(host: ts.SolutionBuilderHost, sys: ts.System): ts.ParseConfigFileHost { - return { - fileExists: f => sys.fileExists(f), - readDirectory(root, extensions, excludes, includes, depth) { - return sys.readDirectory(root, extensions, excludes, includes, depth); - }, - readFile: f => sys.readFile(f), - useCaseSensitiveFileNames: host.useCaseSensitiveFileNames(), - getCurrentDirectory: () => host.getCurrentDirectory(), - onUnRecoverableConfigFileDiagnostic: () => undefined, - trace: host.trace ? s => host.trace!(s) : undefined, - }; -} diff --git a/parallel-build/src/worker.ts b/parallel-build/src/worker.ts deleted file mode 100644 index f02140db2daae..0000000000000 --- a/parallel-build/src/worker.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { - parentPort, - workerData, -} from "node:worker_threads"; - -import * as perf from "external-declarations/build/compiler/perf-tracer.js"; - -import type { - Task, -} from "./protocol.js"; -import { - makeSingleThreadedParentPort, -} from "./single-thread-worker.js"; -import { - taskNameLog, -} from "./utils.js"; -import { - buildDeclarations, -} from "./worker-utils/build-declarations.js"; -import { - buildTSCB, -} from "./worker-utils/build-tsc-b.js"; -import { - buildTSC, -} from "./worker-utils/build-tsc-p.js"; -import { - buildTSCShard, -} from "./worker-utils/build-tsc-shard.js"; -import { - cleanProjectOutput, -} from "./worker-utils/clean-project.js"; - -const singleThread = process.argv.indexOf("--single-thread") !== -1; -const parent = singleThread ? makeSingleThreadedParentPort() : - workerData ? parentPort : { - on(event: "message", listener: (value: any) => void) { - process.on("message", listener); - }, - postMessage(value: any) { - process.send?.(value); - }, - }; - -function main() { - parent?.on("message", (task: Task) => { - perf.installTracer(); - perf.tracer.current?.start("full"); - console.log(`${taskNameLog(task.name)}: Starting`); - const config = task.config; - if (config.type === "clean") { - cleanProjectOutput(config); - } - if (config.type === "tsc-b") { - buildTSCB(config); - } - if (config.type === "tsc") { - buildTSC(task.name, config); - } - if (config.type === "tsc-shard") { - buildTSCShard(task.name, config); - } - if (config.type === "declaration") { - buildDeclarations( - task.name, - config, - ); - } - console.log(`${taskNameLog(task.name)}: Finished`); - parent?.postMessage({ - type: "done", - }); - perf.tracer.current?.end("full"); - console.log(`${taskNameLog(task.name)}: Times`, JSON.stringify(perf.tracer.current?.times)); - }); -} - -main(); diff --git a/parallel-build/tsconfig.json b/parallel-build/tsconfig.json deleted file mode 100644 index 66764f422db67..0000000000000 --- a/parallel-build/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "compilerOptions": { - "strict": true, - "module": "NodeNext", - "target": "ESNext", - "rootDir": "./src", - "outDir": "./build", - "moduleResolution": "nodenext", - "sourceMap": true, - "allowSyntheticDefaultImports": true - } -} From 3936d4a78af6b65b30d2c5ce7c796d97ff26fb55 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 13 Nov 2023 16:30:49 +0000 Subject: [PATCH 132/224] Added missing baseline. Signed-off-by: Titian Cernicova-Dragomir --- tests/baselines/reference/api/typescript.d.ts | 2 +- ...FlatNoCrashInferenceDeclarations.d.ts.diff | 22 ++++++++++++------- .../diff/computedEnumTypeWidening.d.ts.diff | 7 ++++-- .../auto-fixed/diff/declFileEnums.d.ts.diff | 7 ++++-- ...EmitCommonJsModuleReferencedType.d.ts.diff | 16 +++++++------- ...efaultExportWithStaticAssignment.d.ts.diff | 20 ++++++++++++----- ...DestructuringParameterProperties.d.ts.diff | 5 +++-- ...onEmitExpandoPropertyPrivateName.d.ts.diff | 17 +++++++------- ...EmitForGlobalishSpecifierSymlink.d.ts.diff | 7 ++++-- ...mitForGlobalishSpecifierSymlink2.d.ts.diff | 7 ++++-- ...onEmitFunctionDuplicateNamespace.d.ts.diff | 7 ++++-- ...clarationEmitFunctionKeywordProp.d.ts.diff | 7 ++++-- ...larationEmitLateBoundAssignments.d.ts.diff | 7 ++++-- ...arationEmitLateBoundAssignments2.d.ts.diff | 7 ++++-- ...nEmitObjectAssignedDefaultExport.d.ts.diff | 17 +++++++------- ...onEmitReexportedSymlinkReference.d.ts.diff | 15 ++++++++----- ...nEmitReexportedSymlinkReference2.d.ts.diff | 15 ++++++++----- ...nEmitReexportedSymlinkReference3.d.ts.diff | 15 +++++++------ ...mitWithInvalidPackageJsonTypings.d.ts.diff | 7 ++++-- ...ctionExpressionsWithDynamicNames.d.ts.diff | 7 ++++-- ...tionMemberAssignmentDeclarations.d.ts.diff | 7 ++++-- ...nodeModuleReexportFromDottedPath.d.ts.diff | 7 ++++-- .../diff/numericEnumMappedType.d.ts.diff | 7 ++++-- ...larationEmitModuleNamesImportRef.d.ts.diff | 7 ++++-- ...yFakeFlatNoCrashInferenceDeclarations.d.ts | 1 + .../dte/computedEnumTypeWidening.d.ts | 1 + .../auto-fixed/dte/declFileEnums.d.ts | 1 + ...ationEmitCommonJsModuleReferencedType.d.ts | 1 + ...EmitDefaultExportWithStaticAssignment.d.ts | 5 +++++ ...nEmitDestructuringParameterProperties.d.ts | 1 + ...arationEmitExpandoPropertyPrivateName.d.ts | 2 ++ ...ationEmitForGlobalishSpecifierSymlink.d.ts | 1 + ...tionEmitForGlobalishSpecifierSymlink2.d.ts | 1 + ...arationEmitFunctionDuplicateNamespace.d.ts | 1 + .../declarationEmitFunctionKeywordProp.d.ts | 1 + .../declarationEmitLateBoundAssignments.d.ts | 1 + .../declarationEmitLateBoundAssignments2.d.ts | 1 + ...rationEmitObjectAssignedDefaultExport.d.ts | 1 + ...arationEmitReexportedSymlinkReference.d.ts | 6 +++-- ...rationEmitReexportedSymlinkReference2.d.ts | 6 +++-- ...rationEmitReexportedSymlinkReference3.d.ts | 6 +++-- ...tionEmitWithInvalidPackageJsonTypings.d.ts | 1 + ...doFunctionExpressionsWithDynamicNames.d.ts | 1 + ...dFunctionMemberAssignmentDeclarations.d.ts | 1 + .../dte/nodeModuleReexportFromDottedPath.d.ts | 1 + .../auto-fixed/dte/numericEnumMappedType.d.ts | 1 + ...nkDeclarationEmitModuleNamesImportRef.d.ts | 1 + ...yFakeFlatNoCrashInferenceDeclarations.d.ts | 11 ---------- .../tsc/computedEnumTypeWidening.d.ts | 1 + .../auto-fixed/tsc/declFileEnums.d.ts | 1 + ...ationEmitCommonJsModuleReferencedType.d.ts | 6 ----- ...EmitDefaultExportWithStaticAssignment.d.ts | 9 ++++---- ...nEmitDestructuringParameterProperties.d.ts | 2 +- ...arationEmitExpandoPropertyPrivateName.d.ts | 8 +------ ...ationEmitForGlobalishSpecifierSymlink.d.ts | 1 + ...tionEmitForGlobalishSpecifierSymlink2.d.ts | 1 + ...arationEmitFunctionDuplicateNamespace.d.ts | 1 + .../declarationEmitFunctionKeywordProp.d.ts | 1 + .../declarationEmitLateBoundAssignments.d.ts | 1 + .../declarationEmitLateBoundAssignments2.d.ts | 1 + ...rationEmitObjectAssignedDefaultExport.d.ts | 7 ------ ...arationEmitReexportedSymlinkReference.d.ts | 7 +++--- ...rationEmitReexportedSymlinkReference2.d.ts | 7 +++--- ...rationEmitReexportedSymlinkReference3.d.ts | 8 ++----- ...tionEmitWithInvalidPackageJsonTypings.d.ts | 1 + ...doFunctionExpressionsWithDynamicNames.d.ts | 1 + ...dFunctionMemberAssignmentDeclarations.d.ts | 1 + .../tsc/nodeModuleReexportFromDottedPath.d.ts | 1 + .../auto-fixed/tsc/numericEnumMappedType.d.ts | 1 + ...nkDeclarationEmitModuleNamesImportRef.d.ts | 1 + .../original/diff/bigintIndex.d.ts.diff | 7 +++--- .../diff/computedPropertiesNarrowed.d.ts.diff | 5 ++--- .../original/diff/constEnumErrors.d.ts.diff | 7 +++--- .../original/diff/constEnums.d.ts.diff | 4 ++-- .../contextualReturnTypeOfIIFE2.d.ts.diff | 4 ++-- ...gModuleAugmentationRetainsImport.d.ts.diff | 5 ++--- ...ionEmitHasTypesRefOnNamespaceUse.d.ts.diff | 4 ++-- ...arationEmitLateBoundAssignments2.d.ts.diff | 12 +++++----- ...larationFilesWithTypeReferences2.d.ts.diff | 4 ++-- .../decoratorsOnComputedProperties.d.ts.diff | 22 +++++++++---------- ...ctionExpressionsWithDynamicNames.d.ts.diff | 3 +-- .../original/diff/forwardRefInEnum.d.ts.diff | 4 ++-- ...xSignatureMustHaveTypeAnnotation.d.ts.diff | 4 ++-- ...ypeNoSubstitutionTemplateLiteral.d.ts.diff | 3 +-- .../diff/indexWithoutParamType2.d.ts.diff | 3 +-- ...ithSuffixes_one_externalTSModule.d.ts.diff | 4 ++-- .../diff/overloadsWithComputedNames.d.ts.diff | 6 ++--- .../original/diff/parseBigInt.d.ts.diff | 11 ++++------ .../diff/typeReferenceDirectives11.d.ts.diff | 5 ++--- .../diff/typeReferenceDirectives2.d.ts.diff | 4 ++-- .../diff/typeReferenceDirectives8.d.ts.diff | 5 ++--- .../diff/typeUsedAsTypeLiteralIndex.d.ts.diff | 1 - ...ortingModuleAugmentationRetainsImport.d.ts | 2 +- .../original/dte/parseBigInt.d.ts | 6 ++--- ...ortingModuleAugmentationRetainsImport.d.ts | 2 +- 95 files changed, 286 insertions(+), 215 deletions(-) diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 965e4423c54fb..80dcc769377ae 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -9834,7 +9834,7 @@ declare namespace ts { declaration: string; declarationPath: string; declarationMap: string | undefined; - declarationMapPath: string; + declarationMapPath: string | undefined; diagnostics: Diagnostic[]; }; function getTsBuildInfoEmitOutputFilePath(options: CompilerOptions): string | undefined; 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 index 68a45f6f56faa..45c8ba5e4744c 100644 --- 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 @@ -5,14 +5,20 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,15 +7,16 @@ - "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): any; -+declare function foo(arr: T[], depth: number): invalid; +@@ -1,11 +1,24 @@ ++ ++//// [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. @@ -25,7 +31,7 @@ "done": Arr, "recur": Arr extends ReadonlyArray ? BadFlatArray -@@ -29,6 +30,8 @@ +@@ -19,6 +32,8 @@ function foo(arr: T[], depth: number) { ~~~ 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 index d8490ee96a579..ff9b4692fad67 100644 --- 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 @@ -5,13 +5,16 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -39,4 +39,98 @@ +@@ -39,5 +39,100 @@ B, C } declare let val2: MyDeclaredEnum; +-//# sourceMappingURL=computedEnumTypeWidening.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=computedEnumTypeWidening.d.ts.map + - /// [Errors] //// ++/// [Errors] //// + +computedEnumTypeWidening.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedEnumTypeWidening.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 280e66d1c9f7b..fb57590e1c6b7 100644 --- 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 @@ -5,13 +5,16 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -28,4 +28,47 @@ +@@ -28,5 +28,49 @@ "Saturday" = 1, "Sunday" = 2, "Weekend days" = 3 } +-//# sourceMappingURL=declFileEnums.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=declFileEnums.d.ts.map + - /// [Errors] //// ++/// [Errors] //// + +declFileEnums.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 index e75f43db83156..652bbcda6f810 100644 --- 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 @@ -5,15 +5,15 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,13 +1,14 @@ +@@ -1,8 +1,16 @@ - - //// [r/entry.d.ts] - import { RootProps } from "root"; --export declare const x: any; ++ ++//// [r/entry.d.ts] ++import { RootProps } from "root"; +export declare const x: invalid; - export declare const y: RootProps; - ++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. @@ -22,7 +22,7 @@ ==== r/node_modules/foo/node_modules/nested/index.d.ts (0 errors) ==== export interface NestedProps {} -@@ -25,12 +26,14 @@ +@@ -20,12 +28,14 @@ ==== node_modules/root/index.d.ts (0 errors) ==== export interface RootProps {} 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 index 891a8d3c135b9..429a4b556a05f 100644 --- 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 @@ -5,10 +5,12 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -4,34 +4,65 @@ +@@ -3,36 +3,72 @@ + //// [foo.d.ts] export declare class Foo { } - + //# sourceMappingURL=foo.d.ts.map ++ //// [index1.d.ts] -declare function Example(): void; -declare namespace Example { @@ -16,7 +18,8 @@ -} -export default Example; +export default function Example(): void; - + //# sourceMappingURL=index1.d.ts.map ++ //// [index2.d.ts] import { Foo } from './foo'; export { Foo }; @@ -26,7 +29,8 @@ -} -export default Example; +export default function Example(): void; - + //# sourceMappingURL=index2.d.ts.map ++ //// [index3.d.ts] export declare class Bar { } @@ -36,15 +40,19 @@ -} -export default Example; +export default function Example(): void; - + //# sourceMappingURL=index3.d.ts.map ++ +\ No newline at end of file //// [index4.d.ts] export declare function C(): any; -export declare namespace C { - var A: () => void; - var B: () => void; -} +-//# sourceMappingURL=index4.d.ts.map ++//# sourceMappingURL=index4.d.ts.map + - /// [Errors] //// ++/// [Errors] //// + +index1.ts(2,25): error TS9009: 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(3,25): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index f6d562fad6b4f..0973f664d775e 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,57 +1,84 @@ +@@ -1,58 +1,86 @@ //// [declarationEmitDestructuringParameterProperties.d.ts] @@ -42,7 +42,8 @@ + 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. 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 index dc9132bb6546f..a16ed1237baa5 100644 --- 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 @@ -5,15 +5,16 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,23 +7,23 @@ +@@ -5,20 +5,28 @@ + } + export declare function f(): I; export {}; - - //// [b.d.ts] - export declare function q(): void; --export declare namespace q { -- var val: I; --} - + //# sourceMappingURL=a.d.ts.map ++ ++//// [b.d.ts] ++export declare function q(): void; ++//# sourceMappingURL=b.d.ts.map ++ /// [Errors] //// +b.ts(3,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index 7b5b162ef75f4..ce94517aaac8e 100644 --- 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 @@ -5,14 +5,17 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,4 +1,44 @@ +@@ -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] //// ++/// [Errors] //// + +/p1/index.ts(4,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 index 38ab808e04ab1..f773fc8e701c8 100644 --- 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 @@ -5,14 +5,17 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,4 +1,32 @@ +@@ -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] //// ++/// [Errors] //// + +/p1/index.ts(4,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 index e7866ae309947..dfc01af14a0a3 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -2,7 +2,20 @@ +@@ -2,8 +2,22 @@ //// [declarationEmitFunctionDuplicateNamespace.d.ts] declare function f(a: 0): 0; @@ -13,8 +13,11 @@ -declare namespace f { - var x: number; -} +-//# sourceMappingURL=declarationEmitFunctionDuplicateNamespace.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=declarationEmitFunctionDuplicateNamespace.d.ts.map + - /// [Errors] //// ++/// [Errors] //// + +declarationEmitFunctionDuplicateNamespace.ts(2,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + 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 index cedffb5ce297b..e0444f1ac797c 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,19 +1,30 @@ +@@ -1,20 +1,32 @@ //// [declarationEmitFunctionKeywordProp.d.ts] @@ -25,8 +25,11 @@ - 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] //// ++/// [Errors] //// + +declarationEmitFunctionKeywordProp.ts(1,10): error TS9009: 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(4,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index 0ca3afe6c8641..7bbf67735d350 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,8 +1,27 @@ +@@ -1,9 +1,29 @@ //// [declarationEmitLateBoundAssignments.d.ts] @@ -14,8 +14,11 @@ - var bar: number; - var strMemName: string; -} +-//# sourceMappingURL=declarationEmitLateBoundAssignments.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=declarationEmitLateBoundAssignments.d.ts.map + - /// [Errors] //// ++/// [Errors] //// + +declarationEmitLateBoundAssignments.ts(1,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + 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 index 8c77d9bbc9352..e12079b020e20 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,67 +1,186 @@ +@@ -1,68 +1,188 @@ //// [declarationEmitLateBoundAssignments2.d.ts] @@ -74,12 +74,15 @@ "🤪": number; }; -export declare const arrow10: { +\ No newline at end of file - (): void; - "\uD83E\uDD37\u200D\u2642\uFE0F": number; -}; +-//# sourceMappingURL=declarationEmitLateBoundAssignments2.d.ts.map +export declare const arrow10: invalid; ++//# sourceMappingURL=declarationEmitLateBoundAssignments2.d.ts.map + - /// [Errors] //// ++/// [Errors] //// + +declarationEmitLateBoundAssignments2.ts(9,17): error TS9009: 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(12,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index 7ac92a1bad4fd..361a4c0eee722 100644 --- 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 @@ -5,15 +5,16 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -2,13 +2,14 @@ +@@ -1,8 +1,17 @@ - //// [index.d.ts] - import { DefaultTheme, StyledComponent } from "styled-components"; - export declare const C: StyledComponent<"div", DefaultTheme, {}, never>; --declare const _default; ++ ++//// [index.d.ts] ++import { DefaultTheme, StyledComponent } from "styled-components"; ++export declare const C: StyledComponent<"div", DefaultTheme, {}, never>; +declare const _default: invalid; - export default _default; - ++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. @@ -22,7 +23,7 @@ ==== node_modules/styled-components/node_modules/hoist-non-react-statics/index.d.ts (0 errors) ==== interface Statics { -@@ -36,21 +37,26 @@ +@@ -30,21 +39,26 @@ } declare const styled: StyledInterface; 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 index 8f2da17f1db23..025a0ee7bb84d 100644 --- 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 @@ -5,16 +5,21 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,6 +3,54 @@ - //// [monorepo/pkg3/dist/index.d.ts] - export * from './keys'; +@@ -2,8 +2,58 @@ - //// [monorepo/pkg3/dist/keys.d.ts] + //// [/.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; +\ No newline at end of file +-//# sourceMappingURL=keys.d.ts.map +export declare const ADMIN: invalid; ++//# sourceMappingURL=keys.d.ts.map + - /// [Errors] //// ++/// [Errors] //// + +monorepo/pkg3/src/keys.ts(3,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 index ba54e61118775..65d5cd35adbc7 100644 --- 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 @@ -5,16 +5,21 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,6 +3,57 @@ - //// [monorepo/pkg3/dist/index.d.ts] - export * from './keys'; +@@ -2,8 +2,61 @@ - //// [monorepo/pkg3/dist/keys.d.ts] + //// [/.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; +\ No newline at end of file +-//# sourceMappingURL=keys.d.ts.map +export declare const ADMIN: invalid; ++//# sourceMappingURL=keys.d.ts.map + - /// [Errors] //// ++/// [Errors] //// + +monorepo/pkg3/src/keys.ts(3,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 index b817ee8db912b..03d73a9c96197 100644 --- 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 @@ -5,15 +5,16 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,23 +3,25 @@ - //// [monorepo/pkg3/dist/index.d.ts] - export * from './keys'; +@@ -2,21 +2,29 @@ - //// [monorepo/pkg3/dist/keys.d.ts] --import { MetadataAccessor } from "@raymondfeng/pkg2"; --export declare const ADMIN: any; + //// [/.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. 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 index a49f46f6de9c3..36148cc985ab1 100644 --- 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 @@ -5,15 +5,18 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -4,5 +4,36 @@ +@@ -4,6 +4,38 @@ 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] //// ++/// [Errors] //// + +/p1/index.ts(7,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff index ac00cfb88aba3..51656fa960987 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,11 +1,32 @@ +@@ -1,12 +1,34 @@ //// [expandoFunctionExpressionsWithDynamicNames.d.ts] @@ -17,10 +17,13 @@ - (): void; - X: number; -}; +-//# sourceMappingURL=expandoFunctionExpressionsWithDynamicNames.d.ts.map +\ No newline at end of file +export declare const expr: invalid; +export declare const expr2: invalid; ++//# sourceMappingURL=expandoFunctionExpressionsWithDynamicNames.d.ts.map + - /// [Errors] //// ++/// [Errors] //// + +expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index d77af008877e5..9aac7b8047a1a 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,7 +1,19 @@ +@@ -1,8 +1,21 @@ //// [index.d.ts] @@ -13,8 +13,11 @@ -export declare namespace foo { - var bar: number; -} +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=index.d.ts.map + - /// [Errors] //// ++/// [Errors] //// + +index.ts(1,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + 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 index 1e0a6b70f2d60..3df9a33ab845d 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,6 +1,30 @@ +@@ -1,7 +1,32 @@ //// [/index.d.ts] @@ -13,8 +13,11 @@ -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] //// ++/// [Errors] //// + +/index.ts(4,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 index cce70faaba6ec..55110e83b9966 100644 --- 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 @@ -5,13 +5,16 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -39,4 +39,58 @@ +@@ -39,5 +39,60 @@ 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] //// ++/// [Errors] //// + +numericEnumMappedType.ts(25,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +numericEnumMappedType.ts(25,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 5e9b9be6ba7e4..b682ac1168e42 100644 --- 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 @@ -5,14 +5,17 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,4 +1,30 @@ +@@ -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] //// ++/// [Errors] //// + +Folder/monorepo/core/index.ts(3,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 index 8b8f44fd12a2c..73de54570c710 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrayFakeFlatNoCrashInferenceDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrayFakeFlatNoCrashInferenceDeclarations.d.ts @@ -30,6 +30,7 @@ type BadFlatArray = { }["obj"]; declare function flat(arr: A, depth?: D): BadFlatArray[]; declare function foo(arr: T[], depth: number): invalid; +//# sourceMappingURL=arrayFakeFlatNoCrashInferenceDeclarations.d.ts.map /// [Errors] //// 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 index 494a53136b44f..e6d27d1af8ee2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedEnumTypeWidening.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedEnumTypeWidening.d.ts @@ -123,6 +123,7 @@ declare enum MyDeclaredEnum { C } declare let val2: MyDeclaredEnum; +//# sourceMappingURL=computedEnumTypeWidening.d.ts.map /// [Errors] //// 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 index 11f4fcec898e9..7cb2f2740f359 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts @@ -70,6 +70,7 @@ declare enum e5 { "Sunday" = 2, "Weekend days" = 3 } +//# sourceMappingURL=declFileEnums.d.ts.map /// [Errors] //// 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 index f5529b029ab4b..c595b2f695bfc 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCommonJsModuleReferencedType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCommonJsModuleReferencedType.d.ts @@ -32,6 +32,7 @@ export const y: RootProps = bar(); import { RootProps } from "root"; export declare const x: invalid; export declare const y: RootProps; +//# sourceMappingURL=entry.d.ts.map /// [Errors] //// 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 index be2939882c202..7be1a34d11b1c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDefaultExportWithStaticAssignment.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDefaultExportWithStaticAssignment.d.ts @@ -39,22 +39,27 @@ C.B = B; //// [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] //// 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 index e097f5f6e1ef9..ab0f6044e6046 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringParameterProperties.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringParameterProperties.d.ts @@ -47,6 +47,7 @@ declare class C3 { z: invalid; constructor({ x, y, z }: ObjType1); } +//# sourceMappingURL=declarationEmitDestructuringParameterProperties.d.ts.map /// [Errors] //// 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 index 7146718c59d3a..4442c14ac04ca 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoPropertyPrivateName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoPropertyPrivateName.d.ts @@ -19,9 +19,11 @@ 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] //// 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 index 326ef3ea98833..6b6fc6d0272ea 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink.d.ts @@ -40,6 +40,7 @@ export const a: import("typescript-fsa").A; //// [/p1/index.d.ts] export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map /// [Errors] //// 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 index 8478b7be51386..5a0df29446795 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink2.d.ts @@ -28,6 +28,7 @@ export const a: import("typescript-fsa").A; //// [/p1/index.d.ts] export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map /// [Errors] //// 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 index a31877e12a5d7..57c8f5569a7bd 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionDuplicateNamespace.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionDuplicateNamespace.d.ts @@ -17,6 +17,7 @@ f.x = 2; //// [declarationEmitFunctionDuplicateNamespace.d.ts] declare function f(a: 0): 0; declare function f(a: 1): 1; +//# sourceMappingURL=declarationEmitFunctionDuplicateNamespace.d.ts.map /// [Errors] //// 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 index e21c66e05e68f..81aaed1296e83 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionKeywordProp.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionKeywordProp.d.ts @@ -20,6 +20,7 @@ baz.normal = false; declare function foo(): void; declare function bar(): void; declare function baz(): void; +//# sourceMappingURL=declarationEmitFunctionKeywordProp.d.ts.map /// [Errors] //// 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 index a46df5847196b..e88b068dae394 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments.d.ts @@ -23,6 +23,7 @@ const a: string = foo[dashStrMem]; //// [declarationEmitLateBoundAssignments.d.ts] export declare function foo(): void; +//# sourceMappingURL=declarationEmitLateBoundAssignments.d.ts.map /// [Errors] //// 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 index eebaea6e6dc88..907a34e61198b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts @@ -125,6 +125,7 @@ export declare const arrow9: { "🤪": number; }; export declare const arrow10: invalid; +//# sourceMappingURL=declarationEmitLateBoundAssignments2.d.ts.map /// [Errors] //// 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 index 2d360dc908261..c463741832404 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectAssignedDefaultExport.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectAssignedDefaultExport.d.ts @@ -49,6 +49,7 @@ 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] //// 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 index 4092fd214bfa1..1087627e13fe0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference.d.ts @@ -47,11 +47,13 @@ export * from '@raymondfeng/pkg1'; -//// [monorepo/pkg3/dist/index.d.ts] +//// [/.src/monorepo/pkg3/dist/index.d.ts] export * from './keys'; +//# sourceMappingURL=index.d.ts.map -//// [monorepo/pkg3/dist/keys.d.ts] +//// [/.src/monorepo/pkg3/dist/keys.d.ts] export declare const ADMIN: invalid; +//# sourceMappingURL=keys.d.ts.map /// [Errors] //// 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 index 81a8d4388abb9..b91ee231a2c3d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference2.d.ts @@ -50,11 +50,13 @@ export {IdType} from '@raymondfeng/pkg1'; -//// [monorepo/pkg3/dist/index.d.ts] +//// [/.src/monorepo/pkg3/dist/index.d.ts] export * from './keys'; +//# sourceMappingURL=index.d.ts.map -//// [monorepo/pkg3/dist/keys.d.ts] +//// [/.src/monorepo/pkg3/dist/keys.d.ts] export declare const ADMIN: invalid; +//# sourceMappingURL=keys.d.ts.map /// [Errors] //// 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 index d4534393d1572..8c35a4d6c2219 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference3.d.ts @@ -47,11 +47,13 @@ export {MetadataAccessor} from '@raymondfeng/pkg1'; -//// [monorepo/pkg3/dist/index.d.ts] +//// [/.src/monorepo/pkg3/dist/index.d.ts] export * from './keys'; +//# sourceMappingURL=index.d.ts.map -//// [monorepo/pkg3/dist/keys.d.ts] +//// [/.src/monorepo/pkg3/dist/keys.d.ts] export declare const ADMIN: invalid; +//# sourceMappingURL=keys.d.ts.map /// [Errors] //// 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 index af6edaccac2be..fd6d6c7a0574f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithInvalidPackageJsonTypings.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithInvalidPackageJsonTypings.d.ts @@ -35,6 +35,7 @@ export interface MutableRefObject { } export declare function useRef(current: T): MutableRefObject; export declare const useCsvParser: invalid; +//# sourceMappingURL=index.d.ts.map /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionExpressionsWithDynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionExpressionsWithDynamicNames.d.ts index 5a6c38cf7819c..8f200b2afe3c0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionExpressionsWithDynamicNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionExpressionsWithDynamicNames.d.ts @@ -19,6 +19,7 @@ expr2[s] = 0 //// [expandoFunctionExpressionsWithDynamicNames.d.ts] export declare const expr: invalid; export declare const expr2: invalid; +//# sourceMappingURL=expandoFunctionExpressionsWithDynamicNames.d.ts.map /// [Errors] //// 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 index fc306741138b3..6f6fd1c44c684 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/lateBoundFunctionMemberAssignmentDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/lateBoundFunctionMemberAssignmentDeclarations.d.ts @@ -15,6 +15,7 @@ const x: string = foo[_private]; //// [index.d.ts] export declare function foo(): void; +//# sourceMappingURL=index.d.ts.map /// [Errors] //// 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 index 81d2767358127..efd6c0d327990 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModuleReexportFromDottedPath.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModuleReexportFromDottedPath.d.ts @@ -26,6 +26,7 @@ export default new EnhancedPrisma(); //// [/index.d.ts] declare const _default: invalid; export default _default; +//# sourceMappingURL=index.d.ts.map /// [Errors] //// 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 index c85b83d6381f8..853f569d5f14b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/numericEnumMappedType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/numericEnumMappedType.d.ts @@ -83,6 +83,7 @@ declare enum E { } declare const e: E; declare const x: E.ONE; +//# sourceMappingURL=numericEnumMappedType.d.ts.map /// [Errors] //// 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 index 372c378af31f1..26326b0e17a4a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts @@ -26,6 +26,7 @@ export interface InterpolationValue {} //// [Folder/monorepo/core/index.d.ts] export declare function getStyles(): invalid; +//# sourceMappingURL=index.d.ts.map /// [Errors] //// 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 index 23ea73c0acce1..faa43903873cb 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrayFakeFlatNoCrashInferenceDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrayFakeFlatNoCrashInferenceDeclarations.d.ts @@ -20,17 +20,6 @@ function foo(arr: T[], depth: number) { /// [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): any; - /// [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. 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 index 32b06fc859f3f..1595c678dca9d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedEnumTypeWidening.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedEnumTypeWidening.d.ts @@ -123,3 +123,4 @@ declare enum MyDeclaredEnum { 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/declFileEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileEnums.d.ts index 72428c8680d5d..3218fa2fce7d9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileEnums.d.ts @@ -70,3 +70,4 @@ declare enum e5 { "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/declarationEmitCommonJsModuleReferencedType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCommonJsModuleReferencedType.d.ts index 8f762714c1d66..84f60fbd73504 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCommonJsModuleReferencedType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCommonJsModuleReferencedType.d.ts @@ -27,12 +27,6 @@ export const y: RootProps = bar(); /// [Declarations] //// - -//// [r/entry.d.ts] -import { RootProps } from "root"; -export declare const x: any; -export declare const y: RootProps; - /// [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. 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 index 4424e3df9b683..a4e81ca631fd9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDefaultExportWithStaticAssignment.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDefaultExportWithStaticAssignment.d.ts @@ -39,14 +39,14 @@ C.B = B; //// [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 }; @@ -55,7 +55,7 @@ declare namespace Example { var Foo: typeof import("./foo").Foo; } export default Example; - +//# sourceMappingURL=index2.d.ts.map //// [index3.d.ts] export declare class Bar { } @@ -64,10 +64,11 @@ 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 index c939e3617797a..c156cee83507e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringParameterProperties.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringParameterProperties.d.ts @@ -47,7 +47,7 @@ declare class C3 { 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. 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 index f9c1e97ae10c5..ffe4465de18a2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpandoPropertyPrivateName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpandoPropertyPrivateName.d.ts @@ -19,13 +19,7 @@ interface I { } export declare function f(): I; export {}; - -//// [b.d.ts] -export declare function q(): void; -export declare namespace q { - var val: I; -} - +//# 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"'. 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 index d59fe8e1ac575..1f63c28b8ddaf 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForGlobalishSpecifierSymlink.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForGlobalishSpecifierSymlink.d.ts @@ -40,3 +40,4 @@ export const a: import("typescript-fsa").A; //// [/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 index 64e62bad21606..ae346f57dc93d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForGlobalishSpecifierSymlink2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForGlobalishSpecifierSymlink2.d.ts @@ -28,3 +28,4 @@ export const a: import("typescript-fsa").A; //// [/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/declarationEmitFunctionDuplicateNamespace.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitFunctionDuplicateNamespace.d.ts index 69d6ae507f851..8e5979649300a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitFunctionDuplicateNamespace.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitFunctionDuplicateNamespace.d.ts @@ -20,3 +20,4 @@ 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 index 441e2051edc13..fcd9f1f52fd30 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitFunctionKeywordProp.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitFunctionKeywordProp.d.ts @@ -33,3 +33,4 @@ declare namespace baz { 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/declarationEmitLateBoundAssignments.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments.d.ts index 21cfbc23ed6bc..5073dca5fbc3c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments.d.ts @@ -27,3 +27,4 @@ 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 index e1acf6d54f4ca..6e01ab80b54d3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments2.d.ts @@ -154,3 +154,4 @@ export declare const arrow10: { (): void; "\uD83E\uDD37\u200D\u2642\uFE0F": number; }; +//# sourceMappingURL=declarationEmitLateBoundAssignments2.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 index 0ff7bffbdd4bf..c266cd9a304b7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectAssignedDefaultExport.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectAssignedDefaultExport.d.ts @@ -43,13 +43,6 @@ export default Object.assign(A, { /// [Declarations] //// - -//// [index.d.ts] -import { DefaultTheme, StyledComponent } from "styled-components"; -export declare const C: StyledComponent<"div", DefaultTheme, {}, never>; -declare const _default; -export default _default; - /// [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. 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 index a8e02042d49fc..dea540f4622d3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference.d.ts @@ -47,9 +47,10 @@ export * from '@raymondfeng/pkg1'; -//// [monorepo/pkg3/dist/index.d.ts] +//// [/.src/monorepo/pkg3/dist/index.d.ts] export * from './keys'; - -//// [monorepo/pkg3/dist/keys.d.ts] +//# 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 index f2a976a7a411c..5c6a12eba5ae2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference2.d.ts @@ -50,9 +50,10 @@ export {IdType} from '@raymondfeng/pkg1'; -//// [monorepo/pkg3/dist/index.d.ts] +//// [/.src/monorepo/pkg3/dist/index.d.ts] export * from './keys'; - -//// [monorepo/pkg3/dist/keys.d.ts] +//# 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 index 95169d05cbf18..5112b22379a69 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference3.d.ts @@ -47,13 +47,9 @@ export {MetadataAccessor} from '@raymondfeng/pkg1'; -//// [monorepo/pkg3/dist/index.d.ts] +//// [/.src/monorepo/pkg3/dist/index.d.ts] export * from './keys'; - -//// [monorepo/pkg3/dist/keys.d.ts] -import { MetadataAccessor } from "@raymondfeng/pkg2"; -export declare const ADMIN: any; - +//# 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. 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 index 6dbc86989859f..1b1b72498a18b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitWithInvalidPackageJsonTypings.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitWithInvalidPackageJsonTypings.d.ts @@ -35,3 +35,4 @@ export interface MutableRefObject { } 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/expandoFunctionExpressionsWithDynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts index 19f6036730f61..e5e004ed831c5 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts @@ -25,3 +25,4 @@ export declare const expr2: { (): void; X: number; }; +//# sourceMappingURL=expandoFunctionExpressionsWithDynamicNames.d.ts.map \ 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 index 0374f480b40bc..87f788b820468 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/lateBoundFunctionMemberAssignmentDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/lateBoundFunctionMemberAssignmentDeclarations.d.ts @@ -18,3 +18,4 @@ 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/nodeModuleReexportFromDottedPath.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModuleReexportFromDottedPath.d.ts index 7c06bad53c4d1..415fc7747323b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModuleReexportFromDottedPath.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModuleReexportFromDottedPath.d.ts @@ -27,3 +27,4 @@ export default new EnhancedPrisma(); 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/numericEnumMappedType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/numericEnumMappedType.d.ts index 31781b79dc1ce..fdb8538d0a2eb 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/numericEnumMappedType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/numericEnumMappedType.d.ts @@ -83,3 +83,4 @@ declare enum E { } 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/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts index 067ec5126a5ec..3bc3ff483c619 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts @@ -26,3 +26,4 @@ export interface InterpolationValue {} //// [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/original/diff/bigintIndex.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff index 370c44d6a9a1b..1c64f490bcd8e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff @@ -18,8 +18,7 @@ /// [Errors] //// a.ts(2,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. - a.ts(8,11): error TS2538: Type '1n' cannot be used as an index type. -@@ -27,9 +29,8 @@ +@@ -28,9 +30,8 @@ b.ts(2,14): error TS1005: ';' expected. b.ts(2,19): error TS1128: Declaration or statement expected. b.ts(3,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -29,7 +28,7 @@ ==== a.ts (5 errors) ==== interface BigIntIndex { -@@ -65,9 +66,9 @@ +@@ -66,9 +67,9 @@ typedArray["1"] = 0xBB; typedArray[2] = 0xCC; @@ -40,7 +39,7 @@ const a = {1n: 123}; ~~ !!! error TS1136: Property assignment expected. -@@ -80,7 +81,5 @@ +@@ -81,7 +82,5 @@ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. const c = {[bigNum]: 789}; ~~~~~~~~ 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 index 1b72c418439ac..7bac6f8b6f316 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff @@ -32,8 +32,7 @@ declare const uu: unique symbol; export declare let o6: { [uu]: number; -@@ -29,24 +35,21 @@ - export declare const o9: invalid; +@@ -30,24 +36,21 @@ export {}; /// [Errors] //// @@ -60,7 +59,7 @@ const y: 0 = 0 -@@ -62,12 +65,12 @@ +@@ -63,12 +66,12 @@ ~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff index 50dededc8293c..2702a62f146df 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff @@ -16,8 +16,7 @@ Y1 } declare const enum E2 { -@@ -34,8 +34,9 @@ - +@@ -35,8 +35,9 @@ /// [Errors] //// constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. @@ -27,7 +26,7 @@ constEnumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. -@@ -57,9 +58,9 @@ +@@ -58,9 +59,9 @@ constEnumErrors.ts(42,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. @@ -38,7 +37,7 @@ ~ !!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. A -@@ -74,8 +75,10 @@ +@@ -75,8 +76,10 @@ const enum E1 { // illegal case // forward reference to the element of the same enum diff --git a/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts.diff index d3829b4e2464d..7227736d3f9c7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts.diff @@ -16,7 +16,7 @@ } } } -@@ -102,17 +102,18 @@ +@@ -103,17 +103,18 @@ constEnums.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. constEnums.ts(34,10): error TS2474: const enum member initializers must be constant expressions. constEnums.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -36,7 +36,7 @@ A0 = 100, } -@@ -178,8 +179,10 @@ +@@ -179,8 +180,10 @@ export module C { export const enum E { V1 = 1, diff --git a/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff index a049b36c1634c..b9596b8f11f2c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff @@ -5,13 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,23 +3,4 @@ +@@ -3,24 +3,4 @@ //// [contextualReturnTypeOfIIFE2.d.ts] declare namespace app { function foo(): void; } - - /// [Errors] //// +-/// [Errors] //// - -contextualReturnTypeOfIIFE2.ts(2,12): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff index 93117094d6459..e5cdd9da97982 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff @@ -5,8 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -14,9 +14,8 @@ - } +@@ -15,9 +15,8 @@ /// [Errors] //// @@ -16,7 +15,7 @@ ==== child1.ts (1 errors) ==== import { ParentThing } from './parent'; -@@ -32,12 +31,10 @@ +@@ -33,12 +32,10 @@ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. prototype.add = (a: number, b: number) => a + b; } 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 index 88e150743d2b4..e62fdd2d342e0 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitHasTypesRefOnNamespaceUse.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitHasTypesRefOnNamespaceUse.d.ts.diff @@ -5,13 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -2,23 +2,4 @@ +@@ -2,24 +2,4 @@ //// [/src/index.d.ts] declare class Src implements NS.Dep { } - - /// [Errors] //// +-/// [Errors] //// - -/src/index.ts(1,22): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to dep to unblock declaration emit. - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitLateBoundAssignments2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitLateBoundAssignments2.d.ts.diff index 82cd92a08488d..40414b8dcaf31 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitLateBoundAssignments2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitLateBoundAssignments2.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -44,24 +44,29 @@ +@@ -45,24 +45,29 @@ declarationEmitLateBoundAssignments2.ts(36,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. declarationEmitLateBoundAssignments2.ts(36,17): error TS9009: 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(39,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -41,7 +41,7 @@ const c = "C" const num = 1 -@@ -146,10 +151,12 @@ +@@ -147,10 +152,12 @@ !!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. arrow["B"] = 'bar' @@ -55,7 +55,7 @@ export const arrow3 = () => {} ~~~~~~ -@@ -158,10 +165,12 @@ +@@ -159,10 +166,12 @@ !!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. arrow3[77] = 0 @@ -69,7 +69,7 @@ export const arrow5 = () => {} ~~~~~~ -@@ -170,10 +179,12 @@ +@@ -171,10 +180,12 @@ !!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. arrow5["101"] = 0 @@ -83,7 +83,7 @@ export const arrow7 = () => {} ~~~~~~ -@@ -182,10 +193,12 @@ +@@ -183,10 +194,12 @@ !!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. arrow7["qwe rty"] = 0 @@ -97,7 +97,7 @@ export const arrow9 = () => {} ~~~~~~ -@@ -194,8 +207,10 @@ +@@ -195,8 +208,10 @@ !!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. arrow9["🤪"] = 0 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 index b2da6e14220bc..5a1960d8788c2 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/declarationFilesWithTypeReferences2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationFilesWithTypeReferences2.d.ts.diff @@ -5,13 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,20 +1,4 @@ +@@ -1,21 +1,4 @@ //// [/app.d.ts] declare function foo(): Error2; - - /// [Errors] //// +-/// [Errors] //// - -/app.ts(1,17): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to node to unblock declaration emit. - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff index 3992c876bdca2..da69ea02ce402 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -78,13 +78,10 @@ +@@ -79,13 +79,10 @@ decoratorsOnComputedProperties.ts(18,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(19,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(20,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -19,7 +19,7 @@ decoratorsOnComputedProperties.ts(28,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(29,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(30,5): error TS1206: Decorators are not valid here. -@@ -97,13 +94,10 @@ +@@ -98,13 +95,10 @@ decoratorsOnComputedProperties.ts(52,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(53,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(54,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -33,7 +33,7 @@ decoratorsOnComputedProperties.ts(63,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(64,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(65,5): error TS1206: Decorators are not valid here. -@@ -116,13 +110,10 @@ +@@ -117,13 +111,10 @@ decoratorsOnComputedProperties.ts(88,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(89,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(90,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -47,7 +47,7 @@ decoratorsOnComputedProperties.ts(99,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(100,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(101,5): error TS1206: Decorators are not valid here. -@@ -135,13 +126,10 @@ +@@ -136,13 +127,10 @@ decoratorsOnComputedProperties.ts(124,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(125,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(126,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -61,7 +61,7 @@ decoratorsOnComputedProperties.ts(136,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(137,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(138,5): error TS1206: Decorators are not valid here. -@@ -154,13 +142,10 @@ +@@ -155,13 +143,10 @@ decoratorsOnComputedProperties.ts(162,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(163,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(164,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -75,7 +75,7 @@ decoratorsOnComputedProperties.ts(174,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(175,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(176,5): error TS1206: Decorators are not valid here. -@@ -172,9 +157,9 @@ +@@ -173,9 +158,9 @@ decoratorsOnComputedProperties.ts(186,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid here. @@ -86,7 +86,7 @@ ~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. let i = 0; -@@ -204,20 +189,14 @@ +@@ -205,20 +190,14 @@ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. [fieldNameA]: any; ~~~~~~~~~~~~ @@ -107,7 +107,7 @@ void class B { @x ["property"]: any; -@@ -276,20 +255,14 @@ +@@ -277,20 +256,14 @@ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. [fieldNameA]: any; ~~~~~~~~~~~~ @@ -128,7 +128,7 @@ } void class D { -@@ -351,20 +324,14 @@ +@@ -352,20 +325,14 @@ ["some" + "method"]() {} [fieldNameA]: any; ~~~~~~~~~~~~ @@ -149,7 +149,7 @@ void class F { @x ["property"]: any; -@@ -425,21 +392,15 @@ +@@ -426,21 +393,15 @@ ["some" + "method"]() {} [fieldNameA]: any; ~~~~~~~~~~~~ @@ -171,7 +171,7 @@ void class H { @x ["property"]: any; -@@ -501,21 +462,15 @@ +@@ -502,21 +463,15 @@ @x ["some" + "method"]() {} [fieldNameA]: any; ~~~~~~~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff index 5520baaf39075..f21987e790be7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff @@ -5,8 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -4,23 +4,29 @@ - export declare const expr: invalid; +@@ -5,23 +5,29 @@ export declare const expr2: invalid; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff index 06411aac9b99e..0f9ca659ede05 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,32 +1,38 @@ +@@ -1,10 +1,10 @@ //// [forwardRefInEnum.d.ts] @@ -18,7 +18,7 @@ Y1 } declare enum E1 { - Z = 4 +@@ -12,22 +12,28 @@ } /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff index bde61331a101e..9844fb9838f5d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff @@ -15,7 +15,7 @@ } declare class C { [x]: string; -@@ -15,15 +16,14 @@ +@@ -16,15 +17,14 @@ indexSignatureMustHaveTypeAnnotation.ts(3,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. indexSignatureMustHaveTypeAnnotation.ts(3,6): error TS2304: Cannot find name 'x'. indexSignatureMustHaveTypeAnnotation.ts(4,5): error TS1021: An index signature must have a type annotation. @@ -32,7 +32,7 @@ // Used to be indexer, now it is a computed property [x]: string; ~~~ -@@ -39,10 +39,8 @@ +@@ -40,10 +40,8 @@ // Used to be indexer, now it is a computed property [x]: string ~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/indexTypeNoSubstitutionTemplateLiteral.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/indexTypeNoSubstitutionTemplateLiteral.d.ts.diff index b72ee08b0cbd7..74d58a412b39d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/indexTypeNoSubstitutionTemplateLiteral.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/indexTypeNoSubstitutionTemplateLiteral.d.ts.diff @@ -5,8 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,17 +5,14 @@ - type Test = keyof typeof Foo; +@@ -6,17 +6,14 @@ /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff index 86c050f1fe008..e08f2eebaf797 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff @@ -5,8 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,21 +6,18 @@ - } +@@ -7,21 +7,18 @@ /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff index 0e67c35e780c6..39f079b2a1db0 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff @@ -5,13 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,18 +1,4 @@ +@@ -1,19 +1,4 @@ //// [/bin/test.d.ts] export {}; - - /// [Errors] //// +-/// [Errors] //// - -/node_modules/some-library/index.ios.ts(1,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff index 245a9f5f7b196..f8fc9a6d9a987 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff @@ -26,7 +26,7 @@ declare class C3 { [1](): void; [2](): void; -@@ -47,21 +46,16 @@ +@@ -48,21 +47,16 @@ overloadsWithComputedNames.ts(8,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. overloadsWithComputedNames.ts(14,5): error TS2391: Function implementation is missing or not immediately following the declaration. overloadsWithComputedNames.ts(16,5): error TS2389: Function implementation name must be '["bar"]'. @@ -49,7 +49,7 @@ class Person { ["B"](a: number): string; ["A"](a: string|number): number | string { -@@ -98,10 +92,8 @@ +@@ -99,10 +93,8 @@ class C1 { [sym](): void; // should error ~~~~~ @@ -60,7 +60,7 @@ ~~~~~~~~~~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. [uniqueSym](): void; -@@ -120,24 +112,16 @@ +@@ -121,24 +113,16 @@ class C2 { [strUnion](): void; // should error ~~~~~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts.diff index 0f27445659bc2..c0b33344af4e0 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts.diff @@ -5,16 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,19 +1,19 @@ - +@@ -2,18 +2,18 @@ //// [parseBigInt.d.ts] --declare const bin = 5, binBig = 5n; --declare const oct = 375, octBig = 375n; + declare const bin = 5, binBig = 5n; + declare const oct = 375, octBig = 375n; -declare const hex = 3083, hexBig = 3083n; -+declare const bin = 0b101, binBig = 5n; -+declare const oct = 0o567, octBig = 375n; -+declare const hex = 0xC0B, hexBig = 0xc0bn; ++declare const hex = 3083, hexBig = 0xc0bn; declare const dec = 123, decBig = 123n; declare const largeBin = 384307168202282325n; declare const largeOct = 1505852261029722487n; 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 index 6a71a33a8e177..1ef9119871e14 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives11.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives11.d.ts.diff @@ -5,8 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,9 +6,8 @@ - //// [/mod2.d.ts] +@@ -7,9 +7,8 @@ export declare const bar: invalid; /// [Errors] //// @@ -16,7 +15,7 @@ ==== /mod2.ts (1 errors) ==== -@@ -19,9 +18,7 @@ +@@ -20,9 +19,7 @@ ==== /types/lib/index.d.ts (0 errors) ==== interface Lib { x } 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 index 97687b88457e3..c3274c091e34e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives2.d.ts.diff @@ -5,13 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,18 +3,4 @@ +@@ -3,19 +3,4 @@ //// [/app.d.ts] interface A { x: $; } - - /// [Errors] //// +-/// [Errors] //// - -/app.ts(2,8): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. - 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 index c3e89f1f9faee..5349e3a365a23 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives8.d.ts.diff @@ -5,8 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,9 +6,8 @@ - //// [/mod2.d.ts] +@@ -7,9 +7,8 @@ export declare const bar: invalid; /// [Errors] //// @@ -16,7 +15,7 @@ ==== /mod2.ts (1 errors) ==== -@@ -18,9 +17,7 @@ +@@ -19,9 +18,7 @@ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ==== /types/lib/index.d.ts (0 errors) ==== interface Lib { x } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff index 8479a423197ce..cabeabe811b50 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff @@ -35,4 +35,3 @@ }; /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts index e4eed6020ef19..e6ed98dd2c5a5 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts @@ -33,7 +33,7 @@ declare module './parent' { } export declare function child1(prototype: ParentThing): invalid; -//// [parent.d.ts] +//// [/.src/parent.d.ts] export declare class ParentThing implements ParentThing { } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts index a73c211a58ef5..ccca61f2265bc 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts @@ -77,9 +77,9 @@ oneTwoOrThree(0); oneTwoOrThree(1); oneTwoOrThree(2); oneTwoOrThree(3); //// [parseBigInt.d.ts] -declare const bin = 0b101, binBig = 5n; -declare const oct = 0o567, octBig = 375n; -declare const hex = 0xC0B, hexBig = 0xc0bn; +declare const bin = 5, binBig = 5n; +declare const oct = 375, octBig = 375n; +declare const hex = 3083, hexBig = 0xc0bn; declare const dec = 123, decBig = 123n; declare const largeBin = 384307168202282325n; declare const largeOct = 1505852261029722487n; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts index f1d286362a64e..6629429cd1ed6 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts @@ -33,7 +33,7 @@ declare module './parent' { } export declare function child1(prototype: ParentThing): invalid; -//// [parent.d.ts] +//// [/.src/parent.d.ts] export declare class ParentThing implements ParentThing { } From ffe4b1c20f1440043fcc229be97e275c415fdb42 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 14 Nov 2023 10:22:45 +0000 Subject: [PATCH 133/224] Removed unfixed tests. Signed-off-by: Titian Cernicova-Dragomir --- ...FunctionPropertyAssignments3_es6.d.ts.diff | 30 - ...FunctionPropertyAssignments5_es6.d.ts.diff | 30 - .../MemberFunctionDeclaration5_es6.d.ts.diff | 32 - .../MemberFunctionDeclaration6_es6.d.ts.diff | 35 - .../auto-fixed/diff/ambientEnum1.d.ts.diff | 32 - .../diff/ambientEnumDeclaration1.d.ts.diff | 40 - .../auto-fixed/diff/ambientErrors.d.ts.diff | 39 - .../diff/arrowFunctionContexts.d.ts.diff | 44 - ...classMemberWithMissingIdentifier.d.ts.diff | 36 - ...lassMemberWithMissingIdentifier2.d.ts.diff | 40 - ...odeGenEnumWithEnumMemberConflict.d.ts.diff | 26 - .../diff/commonMissingSemicolons.d.ts.diff | 50 - .../computedPropertyNames10_ES5.d.ts.diff | 58 - .../computedPropertyNames10_ES6.d.ts.diff | 58 - .../auto-fixed/diff/constEnum1.d.ts.diff | 51 - .../auto-fixed/diff/constEnum2.d.ts.diff | 48 - .../diff/constEnumDeclarations.d.ts.diff | 33 - .../auto-fixed/diff/constEnumErrors.d.ts.diff | 113 - ...amespaceReferenceCausesNoImport2.d.ts.diff | 46 - .../diff/constEnumPropertyAccess1.d.ts.diff | 37 - .../diff/constEnumPropertyAccess2.d.ts.diff | 40 - .../diff/constEnumPropertyAccess3.d.ts.diff | 50 - .../auto-fixed/diff/constEnums.d.ts.diff | 322 --- .../diff/constantEnumAssert.d.ts.diff | 38 - ...ctorWithIncompleteTypeAnnotation.d.ts.diff | 50 - .../declarationInAmbientContext.d.ts.diff | 37 - .../declarationWithNoInitializer.d.ts.diff | 44 - ...structuringParameterDeclaration6.d.ts.diff | 152 -- ...estructuringParameterProperties1.d.ts.diff | 118 - ...estructuringParameterProperties2.d.ts.diff | 56 - ...estructuringParameterProperties3.d.ts.diff | 56 - ...estructuringParameterProperties4.d.ts.diff | 56 - ...estructuringParameterProperties5.d.ts.diff | 83 - ...isallowLineTerminatorBeforeArrow.d.ts.diff | 36 - .../duplicateObjectLiteralProperty.d.ts.diff | 45 - .../diff/enumAssignmentCompat5.d.ts.diff | 40 - .../auto-fixed/diff/enumBasics.d.ts.diff | 120 - .../auto-fixed/diff/enumBasics2.d.ts.diff | 76 - .../auto-fixed/diff/enumBasics3.d.ts.diff | 55 - .../enumConstantMemberWithString.d.ts.diff | 84 - ...tMemberWithStringEmitDeclaration.d.ts.diff | 66 - ...nstantMemberWithTemplateLiterals.d.ts.diff | 104 - .../diff/enumConstantMembers.d.ts.diff | 129 - ...OnConstantBindingWithInitializer.d.ts.diff | 35 - .../auto-fixed/diff/enumErrors.d.ts.diff | 148 -- .../diff/enumExportMergingES6.d.ts.diff | 35 - ...teralAssignableToEnumInsideUnion.d.ts.diff | 54 - .../auto-fixed/diff/enumMerging.d.ts.diff | 103 - .../diff/enumMergingErrors.d.ts.diff | 47 - .../auto-fixed/diff/enumNumbering1.d.ts.diff | 30 - ...ropertyAccessBeforeInitalisation.d.ts.diff | 49 - .../diff/enumWithComputedMember.d.ts.diff | 31 - .../auto-fixed/diff/enumWithExport.d.ts.diff | 30 - ...numWithParenthesizedInitializer1.d.ts.diff | 27 - ...utInitializerAfterComputedMember.d.ts.diff | 27 - .../diff/equalityWithEnumTypes.d.ts.diff | 41 - .../diff/exactSpellingSuggestion.d.ts.diff | 37 - ...FunctionContextualTypesJSDocInTs.d.ts.diff | 31 - ...doFunctionContextualTypesNoValue.d.ts.diff | 36 - .../diff/exportAssignDottedName.d.ts.diff | 34 - .../diff/exportAssignNonIdentifier.d.ts.diff | 75 - ...portAssignmentWithoutIdentifier1.d.ts.diff | 32 - .../diff/exportEqualsProperty.d.ts.diff | 85 - .../diff/exportEqualsProperty2.d.ts.diff | 42 - .../diff/forwardRefInEnum.d.ts.diff | 65 - .../diff/functionImplementations.d.ts.diff | 160 -- .../diff/initializersInAmbientEnums.d.ts.diff | 30 - ...dModulesGlobalNamespacesAndEnums.d.ts.diff | 77 - .../jsContainerMergeTsDeclaration.d.ts.diff | 40 - .../diff/jsxComponentTypeErrors.d.ts.diff | 52 - ...espaceImplicitImportJSXNamespace.d.ts.diff | 122 - ...ickedOverGlobalOne(jsx=preserve).d.ts.diff | 85 - ...ckedOverGlobalOne(jsx=react-jsx).d.ts.diff | 85 - ...aceFromPragmaPickedOverGlobalOne.d.ts.diff | 86 - .../diff/mergedDeclarations2.d.ts.diff | 38 - .../mergedEnumDeclarationCodeGen.d.ts.diff | 35 - .../methodContainingLocalFunction.d.ts.diff | 72 - .../diff/mixedTypeEnumComparison.d.ts.diff | 61 - ...AugmentationDisallowedExtensions.d.ts.diff | 66 - .../moduleAugmentationNoNewNames.d.ts.diff | 60 - .../negateOperatorInvalidOperations.d.ts.diff | 44 - .../diff/newTargetNarrowing.d.ts.diff | 35 - ...itAnyDestructuringVarDeclaration.d.ts.diff | 99 - .../objectLiteralGettersAndSetters.d.ts.diff | 179 -- ...oadingStaticFunctionsInFunctions.d.ts.diff | 35 - ...ncGenerators.classMethods.es2018.d.ts.diff | 94 - ...tors.objectLiteralMethods.es2018.d.ts.diff | 72 - .../auto-fixed/diff/parserEnum1.d.ts.diff | 31 - .../auto-fixed/diff/parserEnum2.d.ts.diff | 31 - .../diff/parserEnumDeclaration6.d.ts.diff | 28 - ...rEqualsGreaterThanAfterFunction1.d.ts.diff | 28 - ...rEqualsGreaterThanAfterFunction2.d.ts.diff | 32 - ...rserErrorRecovery_ParameterList1.d.ts.diff | 33 - ...rserErrorRecovery_ParameterList2.d.ts.diff | 32 - ...SIOnCallAfterFunctionExpression1.d.ts.diff | 32 - .../diff/parserRealSource10.d.ts.diff | 81 - .../diff/parserRealSource14.d.ts.diff | 58 - .../diff/parserRealSource2.d.ts.diff | 700 ----- .../diff/parserRealSource3.d.ts.diff | 45 - .../diff/parserSkippedTokens16.d.ts.diff | 44 - .../diff/parserStrictMode8.d.ts.diff | 29 - .../diff/preserveConstEnums.d.ts.diff | 25 - ...propertyAssignmentUseParentType3.d.ts.diff | 70 - .../diff/reexportClassDefinition.d.ts.diff | 46 - .../auto-fixed/diff/reservedWords3.d.ts.diff | 93 - .../diff/staticsInAFunction.d.ts.diff | 35 - .../diff/strictModeOctalLiterals.d.ts.diff | 29 - ...ateStringInFunctionParameterType.d.ts.diff | 33 - ...StringInFunctionParameterTypeES6.d.ts.diff | 33 - ...teStringWithEmbeddedYieldKeyword.d.ts.diff | 31 - .../diff/thisInInvalidContexts.d.ts.diff | 40 - ...sInInvalidContextsExternalModule.d.ts.diff | 43 - .../thisInPropertyBoundDeclarations.d.ts.diff | 39 - ...nside-enum-should-not-be-allowed.d.ts.diff | 28 - .../diff/twoAccessorsWithSameName.d.ts.diff | 46 - .../typeFromPropertyAssignment31.d.ts.diff | 40 - .../typeFromPropertyAssignment32.d.ts.diff | 42 - .../typeFromPropertyAssignment33.d.ts.diff | 45 - .../typeFromPropertyAssignment36.d.ts.diff | 47 - .../typeFromPropertyAssignment38.d.ts.diff | 38 - .../underscoreEscapedNameInEnum.d.ts.diff | 27 - ...rbatimModuleSyntaxConstEnumUsage.d.ts.diff | 52 - .../diff/wellKnownSymbolExpando.d.ts.diff | 26 - .../dte/FunctionPropertyAssignments3_es6.d.ts | 24 - .../dte/FunctionPropertyAssignments5_es6.d.ts | 24 - .../dte/MemberFunctionDeclaration5_es6.d.ts | 30 - .../dte/MemberFunctionDeclaration6_es6.d.ts | 33 - .../auto-fixed/dte/ambientEnum1.d.ts | 43 - .../dte/ambientEnumDeclaration1.d.ts | 52 - .../auto-fixed/dte/ambientErrors.d.ts | 212 -- .../auto-fixed/dte/arrowFunctionContexts.d.ts | 264 -- .../dte/classMemberWithMissingIdentifier.d.ts | 36 - .../classMemberWithMissingIdentifier2.d.ts | 48 - ...sionCodeGenEnumWithEnumMemberConflict.d.ts | 30 - .../dte/commonMissingSemicolons.d.ts | 454 ---- .../dte/computedPropertyNames10_ES5.d.ts | 66 - .../dte/computedPropertyNames10_ES6.d.ts | 66 - .../auto-fixed/dte/constEnum1.d.ts | 71 - .../auto-fixed/dte/constEnum2.d.ts | 66 - .../auto-fixed/dte/constEnumDeclarations.d.ts | 50 - .../auto-fixed/dte/constEnumErrors.d.ts | 211 -- ...EnumNamespaceReferenceCausesNoImport2.d.ts | 72 - .../dte/constEnumPropertyAccess1.d.ts | 101 - .../dte/constEnumPropertyAccess2.d.ts | 81 - .../dte/constEnumPropertyAccess3.d.ts | 72 - .../auto-fixed/dte/constEnums.d.ts | 552 ---- .../auto-fixed/dte/constantEnumAssert.d.ts | 229 -- ...nstructorWithIncompleteTypeAnnotation.d.ts | 913 ------- .../dte/declarationInAmbientContext.d.ts | 35 - .../dte/declarationWithNoInitializer.d.ts | 41 - .../destructuringParameterDeclaration6.d.ts | 2312 ----------------- .../destructuringParameterProperties1.d.ts | 187 -- .../destructuringParameterProperties2.d.ts | 155 -- .../destructuringParameterProperties3.d.ts | 193 -- .../destructuringParameterProperties4.d.ts | 119 - .../destructuringParameterProperties5.d.ts | 140 - .../disallowLineTerminatorBeforeArrow.d.ts | 200 -- .../dte/duplicateObjectLiteralProperty.d.ts | 85 - .../auto-fixed/dte/enumAssignmentCompat5.d.ts | 96 - .../auto-fixed/dte/enumBasics.d.ts | 249 -- .../auto-fixed/dte/enumBasics2.d.ts | 94 - .../auto-fixed/dte/enumBasics3.d.ts | 82 - .../dte/enumConstantMemberWithString.d.ts | 141 - ...nstantMemberWithStringEmitDeclaration.d.ts | 114 - ...numConstantMemberWithTemplateLiterals.d.ts | 185 -- .../auto-fixed/dte/enumConstantMembers.d.ts | 193 -- ...ErrorOnConstantBindingWithInitializer.d.ts | 61 - .../auto-fixed/dte/enumErrors.d.ts | 288 -- .../auto-fixed/dte/enumExportMergingES6.d.ts | 47 - ...numLiteralAssignableToEnumInsideUnion.d.ts | 130 - .../auto-fixed/dte/enumMerging.d.ts | 219 -- .../auto-fixed/dte/enumMergingErrors.d.ts | 177 -- .../auto-fixed/dte/enumNumbering1.d.ts | 41 - ...enumPropertyAccessBeforeInitalisation.d.ts | 59 - .../dte/enumWithComputedMember.d.ts | 41 - .../auto-fixed/dte/enumWithExport.d.ts | 39 - .../enumWithParenthesizedInitializer1.d.ts | 30 - ...WithoutInitializerAfterComputedMember.d.ts | 33 - .../auto-fixed/dte/equalityWithEnumTypes.d.ts | 127 - .../dte/exactSpellingSuggestion.d.ts | 53 - ...pandoFunctionContextualTypesJSDocInTs.d.ts | 31 - ...expandoFunctionContextualTypesNoValue.d.ts | 36 - .../dte/exportAssignDottedName.d.ts | 39 - .../dte/exportAssignNonIdentifier.d.ts | 108 - .../exportAssignmentWithoutIdentifier1.d.ts | 36 - .../auto-fixed/dte/exportEqualsProperty.d.ts | 109 - .../auto-fixed/dte/exportEqualsProperty2.d.ts | 53 - .../auto-fixed/dte/forwardRefInEnum.d.ts | 76 - .../dte/functionImplementations.d.ts | 437 ---- .../dte/initializersInAmbientEnums.d.ts | 36 - ...olatedModulesGlobalNamespacesAndEnums.d.ts | 137 - .../dte/jsContainerMergeTsDeclaration.d.ts | 45 - .../dte/jsxComponentTypeErrors.d.ts | 192 -- ...sxNamespaceImplicitImportJSXNamespace.d.ts | 217 -- ...nfigPickedOverGlobalOne(jsx=preserve).d.ts | 143 - ...figPickedOverGlobalOne(jsx=react-jsx).d.ts | 143 - ...amespaceFromPragmaPickedOverGlobalOne.d.ts | 145 -- .../auto-fixed/dte/mergedDeclarations2.d.ts | 50 - .../dte/mergedEnumDeclarationCodeGen.d.ts | 42 - .../dte/methodContainingLocalFunction.d.ts | 136 - .../dte/mixedTypeEnumComparison.d.ts | 111 - ...oduleAugmentationDisallowedExtensions.d.ts | 187 -- .../dte/moduleAugmentationNoNewNames.d.ts | 90 - .../dte/negateOperatorInvalidOperations.d.ts | 82 - .../auto-fixed/dte/newTargetNarrowing.d.ts | 40 - ...mplicitAnyDestructuringVarDeclaration.d.ts | 128 - .../dte/objectLiteralGettersAndSetters.d.ts | 327 --- ...overloadingStaticFunctionsInFunctions.d.ts | 71 - ...r.asyncGenerators.classMethods.es2018.d.ts | 500 ---- ...enerators.objectLiteralMethods.es2018.d.ts | 466 ---- .../auto-fixed/dte/parserEnum1.d.ts | 39 - .../auto-fixed/dte/parserEnum2.d.ts | 39 - .../dte/parserEnumDeclaration6.d.ts | 36 - ...parserEqualsGreaterThanAfterFunction1.d.ts | 24 - ...parserEqualsGreaterThanAfterFunction2.d.ts | 33 - .../parserErrorRecovery_ParameterList1.d.ts | 32 - .../parserErrorRecovery_ParameterList2.d.ts | 29 - ...erNoASIOnCallAfterFunctionExpression1.d.ts | 32 - .../auto-fixed/dte/parserRealSource10.d.ts | 2206 ---------------- .../auto-fixed/dte/parserRealSource14.d.ts | 1738 ------------- .../auto-fixed/dte/parserRealSource2.d.ts | 1218 --------- .../auto-fixed/dte/parserRealSource3.d.ts | 378 --- .../auto-fixed/dte/parserSkippedTokens16.d.ts | 63 - .../auto-fixed/dte/parserStrictMode8.d.ts | 28 - .../auto-fixed/dte/preserveConstEnums.d.ts | 28 - .../dte/propertyAssignmentUseParentType3.d.ts | 77 - .../dte/reexportClassDefinition.d.ts | 58 - .../auto-fixed/dte/reservedWords3.d.ts | 91 - .../auto-fixed/dte/staticsInAFunction.d.ts | 73 - .../dte/strictModeOctalLiterals.d.ts | 40 - ...templateStringInFunctionParameterType.d.ts | 36 - ...plateStringInFunctionParameterTypeES6.d.ts | 36 - ...emplateStringWithEmbeddedYieldKeyword.d.ts | 34 - .../auto-fixed/dte/thisInInvalidContexts.d.ts | 151 -- .../thisInInvalidContextsExternalModule.d.ts | 127 - .../dte/thisInPropertyBoundDeclarations.d.ts | 185 -- ...his_inside-enum-should-not-be-allowed.d.ts | 47 - .../dte/twoAccessorsWithSameName.d.ts | 127 - .../dte/typeFromPropertyAssignment31.d.ts | 92 - .../dte/typeFromPropertyAssignment32.d.ts | 104 - .../dte/typeFromPropertyAssignment33.d.ts | 108 - .../dte/typeFromPropertyAssignment36.d.ts | 204 -- .../dte/typeFromPropertyAssignment38.d.ts | 41 - .../dte/underscoreEscapedNameInEnum.d.ts | 32 - .../verbatimModuleSyntaxConstEnumUsage.d.ts | 61 - .../dte/wellKnownSymbolExpando.d.ts | 25 - .../tsc/FunctionPropertyAssignments3_es6.d.ts | 23 - .../tsc/FunctionPropertyAssignments5_es6.d.ts | 23 - .../tsc/MemberFunctionDeclaration5_es6.d.ts | 27 - .../tsc/MemberFunctionDeclaration6_es6.d.ts | 30 - .../auto-fixed/tsc/ambientEnum1.d.ts | 40 - .../tsc/ambientEnumDeclaration1.d.ts | 25 - .../auto-fixed/tsc/ambientErrors.d.ts | 209 -- .../auto-fixed/tsc/arrowFunctionContexts.d.ts | 258 -- .../tsc/classMemberWithMissingIdentifier.d.ts | 33 - .../classMemberWithMissingIdentifier2.d.ts | 45 - ...sionCodeGenEnumWithEnumMemberConflict.d.ts | 17 - .../tsc/commonMissingSemicolons.d.ts | 451 ---- .../tsc/computedPropertyNames10_ES5.d.ts | 35 - .../tsc/computedPropertyNames10_ES6.d.ts | 35 - .../auto-fixed/tsc/constEnum1.d.ts | 33 - .../auto-fixed/tsc/constEnum2.d.ts | 57 - .../auto-fixed/tsc/constEnumDeclarations.d.ts | 30 - .../auto-fixed/tsc/constEnumErrors.d.ts | 181 -- ...EnumNamespaceReferenceCausesNoImport2.d.ts | 44 - .../tsc/constEnumPropertyAccess1.d.ts | 95 - .../tsc/constEnumPropertyAccess2.d.ts | 75 - .../tsc/constEnumPropertyAccess3.d.ts | 35 - .../auto-fixed/tsc/constEnums.d.ts | 281 -- .../auto-fixed/tsc/constantEnumAssert.d.ts | 223 -- ...nstructorWithIncompleteTypeAnnotation.d.ts | 910 ------- .../tsc/declarationInAmbientContext.d.ts | 14 - .../tsc/declarationWithNoInitializer.d.ts | 29 - .../destructuringParameterDeclaration6.d.ts | 2291 ---------------- .../destructuringParameterProperties1.d.ts | 160 -- .../destructuringParameterProperties2.d.ts | 146 -- .../destructuringParameterProperties3.d.ts | 184 -- .../destructuringParameterProperties4.d.ts | 110 - .../destructuringParameterProperties5.d.ts | 122 - .../disallowLineTerminatorBeforeArrow.d.ts | 197 -- .../tsc/duplicateObjectLiteralProperty.d.ts | 84 - .../auto-fixed/tsc/enumAssignmentCompat5.d.ts | 87 - .../auto-fixed/tsc/enumBasics.d.ts | 142 - .../auto-fixed/tsc/enumBasics2.d.ts | 73 - .../auto-fixed/tsc/enumBasics3.d.ts | 73 - .../tsc/enumConstantMemberWithString.d.ts | 114 - ...nstantMemberWithStringEmitDeclaration.d.ts | 61 - ...numConstantMemberWithTemplateLiterals.d.ts | 146 -- .../auto-fixed/tsc/enumConstantMembers.d.ts | 151 -- ...ErrorOnConstantBindingWithInitializer.d.ts | 58 - .../auto-fixed/tsc/enumErrors.d.ts | 249 -- .../auto-fixed/tsc/enumExportMergingES6.d.ts | 28 - ...numLiteralAssignableToEnumInsideUnion.d.ts | 118 - .../auto-fixed/tsc/enumMerging.d.ts | 129 - .../auto-fixed/tsc/enumMergingErrors.d.ts | 168 -- .../auto-fixed/tsc/enumNumbering1.d.ts | 24 - ...enumPropertyAccessBeforeInitalisation.d.ts | 47 - .../tsc/enumWithComputedMember.d.ts | 35 - .../auto-fixed/tsc/enumWithExport.d.ts | 36 - .../enumWithParenthesizedInitializer1.d.ts | 27 - ...WithoutInitializerAfterComputedMember.d.ts | 19 - .../auto-fixed/tsc/equalityWithEnumTypes.d.ts | 121 - .../tsc/exactSpellingSuggestion.d.ts | 44 - ...pandoFunctionContextualTypesJSDocInTs.d.ts | 19 - ...expandoFunctionContextualTypesNoValue.d.ts | 36 - .../tsc/exportAssignDottedName.d.ts | 23 - .../tsc/exportAssignNonIdentifier.d.ts | 99 - .../exportAssignmentWithoutIdentifier1.d.ts | 19 - .../auto-fixed/tsc/exportEqualsProperty.d.ts | 65 - .../auto-fixed/tsc/exportEqualsProperty2.d.ts | 29 - .../auto-fixed/tsc/forwardRefInEnum.d.ts | 64 - .../tsc/functionImplementations.d.ts | 396 --- .../tsc/initializersInAmbientEnums.d.ts | 19 - ...olatedModulesGlobalNamespacesAndEnums.d.ts | 122 - .../tsc/jsContainerMergeTsDeclaration.d.ts | 40 - .../tsc/jsxComponentTypeErrors.d.ts | 192 -- ...sxNamespaceImplicitImportJSXNamespace.d.ts | 109 - ...nfigPickedOverGlobalOne(jsx=preserve).d.ts | 72 - ...figPickedOverGlobalOne(jsx=react-jsx).d.ts | 72 - ...amespaceFromPragmaPickedOverGlobalOne.d.ts | 73 - .../auto-fixed/tsc/mergedDeclarations2.d.ts | 47 - .../tsc/mergedEnumDeclarationCodeGen.d.ts | 23 - .../tsc/methodContainingLocalFunction.d.ts | 77 - .../tsc/mixedTypeEnumComparison.d.ts | 63 - ...oduleAugmentationDisallowedExtensions.d.ts | 169 -- .../tsc/moduleAugmentationNoNewNames.d.ts | 53 - .../tsc/negateOperatorInvalidOperations.d.ts | 79 - .../auto-fixed/tsc/newTargetNarrowing.d.ts | 24 - ...mplicitAnyDestructuringVarDeclaration.d.ts | 107 - .../tsc/objectLiteralGettersAndSetters.d.ts | 209 -- ...overloadingStaticFunctionsInFunctions.d.ts | 68 - ...r.asyncGenerators.classMethods.es2018.d.ts | 490 ---- ...enerators.objectLiteralMethods.es2018.d.ts | 466 ---- .../auto-fixed/tsc/parserEnum1.d.ts | 21 - .../auto-fixed/tsc/parserEnum2.d.ts | 21 - .../tsc/parserEnumDeclaration6.d.ts | 21 - ...parserEqualsGreaterThanAfterFunction1.d.ts | 21 - ...parserEqualsGreaterThanAfterFunction2.d.ts | 30 - .../parserErrorRecovery_ParameterList1.d.ts | 29 - .../parserErrorRecovery_ParameterList2.d.ts | 26 - ...erNoASIOnCallAfterFunctionExpression1.d.ts | 28 - .../auto-fixed/tsc/parserRealSource10.d.ts | 2188 ---------------- .../auto-fixed/tsc/parserRealSource14.d.ts | 1732 ------------ .../auto-fixed/tsc/parserRealSource2.d.ts | 774 ------ .../auto-fixed/tsc/parserRealSource3.d.ts | 369 --- .../auto-fixed/tsc/parserSkippedTokens16.d.ts | 60 - .../auto-fixed/tsc/parserStrictMode8.d.ts | 24 - .../auto-fixed/tsc/preserveConstEnums.d.ts | 16 - .../tsc/propertyAssignmentUseParentType3.d.ts | 49 - .../tsc/reexportClassDefinition.d.ts | 37 - .../auto-fixed/tsc/reservedWords3.d.ts | 73 - .../auto-fixed/tsc/staticsInAFunction.d.ts | 70 - .../tsc/strictModeOctalLiterals.d.ts | 37 - ...templateStringInFunctionParameterType.d.ts | 33 - ...plateStringInFunctionParameterTypeES6.d.ts | 33 - ...emplateStringWithEmbeddedYieldKeyword.d.ts | 31 - .../auto-fixed/tsc/thisInInvalidContexts.d.ts | 145 -- .../thisInInvalidContextsExternalModule.d.ts | 124 - .../tsc/thisInPropertyBoundDeclarations.d.ts | 182 -- ...his_inside-enum-should-not-be-allowed.d.ts | 44 - .../tsc/twoAccessorsWithSameName.d.ts | 126 - .../tsc/typeFromPropertyAssignment31.d.ts | 93 - .../tsc/typeFromPropertyAssignment32.d.ts | 105 - .../tsc/typeFromPropertyAssignment33.d.ts | 109 - .../tsc/typeFromPropertyAssignment36.d.ts | 206 -- .../tsc/typeFromPropertyAssignment38.d.ts | 26 - .../tsc/underscoreEscapedNameInEnum.d.ts | 18 - .../verbatimModuleSyntaxConstEnumUsage.d.ts | 35 - .../tsc/wellKnownSymbolExpando.d.ts | 14 - .../original/diff/constEnum2.d.ts.diff | 19 - .../original/diff/enumBasics2.d.ts.diff | 19 - .../original/diff/enumBasics3.d.ts.diff | 18 - .../original/diff/enumErrors.d.ts.diff | 20 - .../diff/enumExportMergingES6.d.ts.diff | 19 - ...dModulesGlobalNamespacesAndEnums.d.ts.diff | 28 - .../diff/mergedDeclarations2.d.ts.diff | 18 - .../mergedEnumDeclarationCodeGen.d.ts.diff | 19 - .../diff/templateLiteralTypes4.d.ts.diff | 20 - ...rbatimModuleSyntaxConstEnumUsage.d.ts.diff | 20 - .../original/dte/constEnum2.d.ts | 66 - .../original/dte/enumBasics2.d.ts | 94 - .../original/dte/enumBasics3.d.ts | 82 - .../original/dte/enumErrors.d.ts | 288 -- .../original/dte/enumExportMergingES6.d.ts | 47 - ...olatedModulesGlobalNamespacesAndEnums.d.ts | 137 - .../original/dte/mergedDeclarations2.d.ts | 53 - .../dte/mergedEnumDeclarationCodeGen.d.ts | 42 - .../original/dte/templateLiteralTypes4.d.ts | 790 ------ .../verbatimModuleSyntaxConstEnumUsage.d.ts | 61 - .../original/tsc/constEnum2.d.ts | 66 - .../original/tsc/enumBasics2.d.ts | 94 - .../original/tsc/enumBasics3.d.ts | 82 - .../original/tsc/enumErrors.d.ts | 288 -- .../original/tsc/enumExportMergingES6.d.ts | 47 - ...olatedModulesGlobalNamespacesAndEnums.d.ts | 137 - .../original/tsc/mergedDeclarations2.d.ts | 53 - .../tsc/mergedEnumDeclarationCodeGen.d.ts | 42 - .../original/tsc/templateLiteralTypes4.d.ts | 790 ------ .../verbatimModuleSyntaxConstEnumUsage.d.ts | 61 - 399 files changed, 51515 deletions(-) delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments3_es6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments5_es6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration5_es6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration6_es6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnum1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnumDeclaration1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientErrors.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/arrowFunctionContexts.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/collisionCodeGenEnumWithEnumMemberConflict.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/commonMissingSemicolons.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumDeclarations.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumErrors.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumNamespaceReferenceCausesNoImport2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess3.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnums.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constantEnumAssert.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constructorWithIncompleteTypeAnnotation.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationInAmbientContext.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationWithNoInitializer.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterDeclaration6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties3.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties4.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/disallowLineTerminatorBeforeArrow.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/duplicateObjectLiteralProperty.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumAssignmentCompat5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics3.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithString.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithStringEmitDeclaration.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithTemplateLiterals.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMembers.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumErrorOnConstantBindingWithInitializer.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumErrors.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumExportMergingES6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumLiteralAssignableToEnumInsideUnion.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMerging.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMergingErrors.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumNumbering1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumPropertyAccessBeforeInitalisation.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithComputedMember.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithExport.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithParenthesizedInitializer1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithoutInitializerAfterComputedMember.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/equalityWithEnumTypes.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/exactSpellingSuggestion.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesJSDocInTs.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesNoValue.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignDottedName.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignNonIdentifier.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignmentWithoutIdentifier1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/forwardRefInEnum.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/functionImplementations.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/initializersInAmbientEnums.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsContainerMergeTsDeclaration.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxComponentTypeErrors.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespace.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedDeclarations2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedEnumDeclarationCodeGen.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/methodContainingLocalFunction.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/mixedTypeEnumComparison.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationDisallowedExtensions.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationNoNewNames.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/negateOperatorInvalidOperations.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/newTargetNarrowing.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/noImplicitAnyDestructuringVarDeclaration.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/objectLiteralGettersAndSetters.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/overloadingStaticFunctionsInFunctions.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.classMethods.es2018.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnumDeclaration6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserNoASIOnCallAfterFunctionExpression1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource10.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource14.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource3.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserSkippedTokens16.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserStrictMode8.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/preserveConstEnums.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/propertyAssignmentUseParentType3.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/reexportClassDefinition.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/reservedWords3.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/staticsInAFunction.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/strictModeOctalLiterals.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterType.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterTypeES6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringWithEmbeddedYieldKeyword.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContexts.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContextsExternalModule.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInPropertyBoundDeclarations.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/this_inside-enum-should-not-be-allowed.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/twoAccessorsWithSameName.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment31.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment32.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment33.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment36.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment38.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/underscoreEscapedNameInEnum.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/wellKnownSymbolExpando.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments3_es6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments5_es6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration5_es6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration6_es6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnum1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnumDeclaration1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientErrors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrowFunctionContexts.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/collisionCodeGenEnumWithEnumMemberConflict.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/commonMissingSemicolons.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumDeclarations.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumErrors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumNamespaceReferenceCausesNoImport2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnums.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constantEnumAssert.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constructorWithIncompleteTypeAnnotation.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationInAmbientContext.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationWithNoInitializer.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterDeclaration6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties4.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/disallowLineTerminatorBeforeArrow.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicateObjectLiteralProperty.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumAssignmentCompat5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithString.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithStringEmitDeclaration.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiterals.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMembers.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrorOnConstantBindingWithInitializer.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumExportMergingES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumLiteralAssignableToEnumInsideUnion.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMerging.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMergingErrors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumNumbering1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumPropertyAccessBeforeInitalisation.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithComputedMember.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithExport.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithParenthesizedInitializer1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithoutInitializerAfterComputedMember.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/equalityWithEnumTypes.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/exactSpellingSuggestion.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesJSDocInTs.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesNoValue.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignDottedName.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignNonIdentifier.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentWithoutIdentifier1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/forwardRefInEnum.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/functionImplementations.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/initializersInAmbientEnums.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsContainerMergeTsDeclaration.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxComponentTypeErrors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespace.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedDeclarations2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedEnumDeclarationCodeGen.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/methodContainingLocalFunction.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixedTypeEnumComparison.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationDisallowedExtensions.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationNoNewNames.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/negateOperatorInvalidOperations.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/newTargetNarrowing.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/noImplicitAnyDestructuringVarDeclaration.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/objectLiteralGettersAndSetters.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/overloadingStaticFunctionsInFunctions.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.classMethods.es2018.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnumDeclaration6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserNoASIOnCallAfterFunctionExpression1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource10.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource14.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserSkippedTokens16.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserStrictMode8.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/preserveConstEnums.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/propertyAssignmentUseParentType3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportClassDefinition.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/reservedWords3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/staticsInAFunction.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/strictModeOctalLiterals.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterType.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterTypeES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringWithEmbeddedYieldKeyword.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContexts.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContextsExternalModule.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInPropertyBoundDeclarations.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/this_inside-enum-should-not-be-allowed.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/twoAccessorsWithSameName.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment31.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment32.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment33.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment36.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment38.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/underscoreEscapedNameInEnum.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/verbatimModuleSyntaxConstEnumUsage.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/wellKnownSymbolExpando.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments3_es6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments5_es6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration5_es6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration6_es6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnum1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnumDeclaration1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientErrors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrowFunctionContexts.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/collisionCodeGenEnumWithEnumMemberConflict.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commonMissingSemicolons.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumDeclarations.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumErrors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumNamespaceReferenceCausesNoImport2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnums.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constantEnumAssert.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constructorWithIncompleteTypeAnnotation.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationInAmbientContext.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationWithNoInitializer.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterDeclaration6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties4.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/disallowLineTerminatorBeforeArrow.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicateObjectLiteralProperty.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumAssignmentCompat5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithString.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithStringEmitDeclaration.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiterals.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMembers.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrorOnConstantBindingWithInitializer.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumExportMergingES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumLiteralAssignableToEnumInsideUnion.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMerging.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMergingErrors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumNumbering1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumPropertyAccessBeforeInitalisation.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithComputedMember.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithExport.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithParenthesizedInitializer1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithoutInitializerAfterComputedMember.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/equalityWithEnumTypes.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exactSpellingSuggestion.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesJSDocInTs.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesNoValue.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignDottedName.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignNonIdentifier.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignmentWithoutIdentifier1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/forwardRefInEnum.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/functionImplementations.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/initializersInAmbientEnums.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsContainerMergeTsDeclaration.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxComponentTypeErrors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespace.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedDeclarations2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedEnumDeclarationCodeGen.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/methodContainingLocalFunction.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mixedTypeEnumComparison.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationDisallowedExtensions.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationNoNewNames.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/negateOperatorInvalidOperations.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/newTargetNarrowing.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noImplicitAnyDestructuringVarDeclaration.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/objectLiteralGettersAndSetters.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/overloadingStaticFunctionsInFunctions.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.classMethods.es2018.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnumDeclaration6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserNoASIOnCallAfterFunctionExpression1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource10.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource14.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserSkippedTokens16.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserStrictMode8.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/preserveConstEnums.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/propertyAssignmentUseParentType3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reexportClassDefinition.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reservedWords3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/staticsInAFunction.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/strictModeOctalLiterals.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterType.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterTypeES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringWithEmbeddedYieldKeyword.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContexts.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContextsExternalModule.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInPropertyBoundDeclarations.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/this_inside-enum-should-not-be-allowed.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/twoAccessorsWithSameName.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment31.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment32.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment33.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment36.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment38.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/underscoreEscapedNameInEnum.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/wellKnownSymbolExpando.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/enumBasics3.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/enumErrors.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/mergedDeclarations2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/templateLiteralTypes4.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/constEnum2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/enumBasics2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/enumBasics3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/enumErrors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/enumExportMergingES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/mergedDeclarations2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/mergedEnumDeclarationCodeGen.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/templateLiteralTypes4.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/verbatimModuleSyntaxConstEnumUsage.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/constEnum2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/enumBasics2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/enumBasics3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/enumErrors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/enumExportMergingES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/mergedDeclarations2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/mergedEnumDeclarationCodeGen.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralTypes4.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments3_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments3_es6.d.ts.diff deleted file mode 100644 index fd0c4783911c1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments3_es6.d.ts.diff +++ /dev/null @@ -1,30 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments3_es6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,15 +1,16 @@ - - - //// [FunctionPropertyAssignments3_es6.d.ts] --declare var v: { -- ""(): Generator; --}; -+declare var v: invalid; - - /// [Errors] //// - -+FunctionPropertyAssignments3_es6.ts(1,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - FunctionPropertyAssignments3_es6.ts(1,12): error TS1003: Identifier expected. - - --==== FunctionPropertyAssignments3_es6.ts (1 errors) ==== -+==== FunctionPropertyAssignments3_es6.ts (2 errors) ==== - var v = { *{ } } -+ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1003: Identifier expected. -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments5_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments5_es6.d.ts.diff deleted file mode 100644 index d5fa34e35c8bf..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/FunctionPropertyAssignments5_es6.d.ts.diff +++ /dev/null @@ -1,30 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,15 +1,16 @@ - - - //// [FunctionPropertyAssignments5_es6.d.ts] --declare var v: { -- [x: number]: () => Generator; --}; -+declare var v: invalid; - - /// [Errors] //// - -+FunctionPropertyAssignments5_es6.ts(1,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - FunctionPropertyAssignments5_es6.ts(1,13): error TS2304: Cannot find name 'foo'. - - --==== FunctionPropertyAssignments5_es6.ts (1 errors) ==== -+==== FunctionPropertyAssignments5_es6.ts (2 errors) ==== - var v = { *[foo()](): Generator { } } -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ - !!! error TS2304: Cannot find name 'foo'. -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration5_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration5_es6.d.ts.diff deleted file mode 100644 index 5ea13b1751e59..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration5_es6.d.ts.diff +++ /dev/null @@ -1,32 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration5_es6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,17 +1,20 @@ - - - //// [MemberFunctionDeclaration5_es6.d.ts] - declare class C { -- (): any; -+ (): invalid; - } - - /// [Errors] //// - -+MemberFunctionDeclaration5_es6.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - MemberFunctionDeclaration5_es6.ts(3,1): error TS1003: Identifier expected. - - --==== MemberFunctionDeclaration5_es6.ts (1 errors) ==== -+==== MemberFunctionDeclaration5_es6.ts (2 errors) ==== - class C { - * -+ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - ~ - !!! error TS1003: Identifier expected. -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration6_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration6_es6.d.ts.diff deleted file mode 100644 index 9e88995ce1bae..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/MemberFunctionDeclaration6_es6.d.ts.diff +++ /dev/null @@ -1,35 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration6_es6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,20 +1,23 @@ - - - //// [MemberFunctionDeclaration6_es6.d.ts] - declare class C { -- foo(): any; -+ foo(): invalid; - } - - /// [Errors] //// - - MemberFunctionDeclaration6_es6.ts(2,5): error TS2391: Function implementation is missing or not immediately following the declaration. -+MemberFunctionDeclaration6_es6.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - MemberFunctionDeclaration6_es6.ts(3,1): error TS1005: '(' expected. - - --==== MemberFunctionDeclaration6_es6.ts (2 errors) ==== -+==== MemberFunctionDeclaration6_es6.ts (3 errors) ==== - class C { - *foo - ~~~ - !!! error TS2391: Function implementation is missing or not immediately following the declaration. -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - ~ - !!! error TS1005: '(' expected. -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnum1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnum1.d.ts.diff deleted file mode 100644 index 3c28d86fc59f5..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnum1.d.ts.diff +++ /dev/null @@ -1,32 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/ambientEnum1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -8,18 +8,21 @@ - x - } - - /// [Errors] //// - -+ambientEnum1.ts(7,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ambientEnum1.ts(7,13): error TS1066: In ambient enum declarations member initializer must be constant expression. - - --==== ambientEnum1.ts (1 errors) ==== -+==== ambientEnum1.ts (2 errors) ==== - declare enum E1 { - y = 4.23 - } - - // Ambient enum with computer member - declare enum E2 { - x = 'foo'.length -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~ - !!! error TS1066: In ambient enum declarations member initializer must be constant expression. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnumDeclaration1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnumDeclaration1.d.ts.diff deleted file mode 100644 index 62535aa18137e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientEnumDeclaration1.d.ts.diff +++ /dev/null @@ -1,40 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/ambient/ambientEnumDeclaration1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -7,4 +7,30 @@ - c = 11, - d = 12, - e = 655360 - } -+ - /// [Errors] //// -+ -+ambientEnumDeclaration1.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ambientEnumDeclaration1.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ambientEnumDeclaration1.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ambientEnumDeclaration1.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== ambientEnumDeclaration1.ts (4 errors) ==== -+ // In ambient enum declarations, all values specified in enum member declarations must be classified as constant enum expressions. -+ -+ declare enum E { -+ a = 10, -+ b = 10 + 1, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ c = b, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ d = (c) + 1, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ e = 10 << 2 * 8, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientErrors.d.ts.diff deleted file mode 100644 index b3bc5e1d4abfa..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientErrors.d.ts.diff +++ /dev/null @@ -1,39 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/ambient/ambientErrors.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -39,8 +39,9 @@ - - ambientErrors.ts(2,17): error TS1039: Initializers are not allowed in ambient contexts. - ambientErrors.ts(17,22): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. - ambientErrors.ts(20,30): error TS1183: An implementation cannot be declared in ambient contexts. -+ambientErrors.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ambientErrors.ts(29,9): error TS1066: In ambient enum declarations member initializer must be constant expression. - ambientErrors.ts(34,13): error TS1039: Initializers are not allowed in ambient contexts. - ambientErrors.ts(35,25): error TS1183: An implementation cannot be declared in ambient contexts. - ambientErrors.ts(37,20): error TS1039: Initializers are not allowed in ambient contexts. -@@ -52,9 +53,9 @@ - ambientErrors.ts(51,16): error TS2436: Ambient module declaration cannot specify relative module name. - ambientErrors.ts(57,5): error TS2309: An export assignment cannot be used in a module with other exported elements. - - --==== ambientErrors.ts (14 errors) ==== -+==== ambientErrors.ts (15 errors) ==== - // Ambient variable with an initializer - declare var x = 4; - ~ - !!! error TS1039: Initializers are not allowed in ambient contexts. -@@ -88,8 +89,10 @@ - - // Ambient enum with computer member - declare enum E2 { - x = 'foo'.length -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~ - !!! error TS1066: In ambient enum declarations member initializer must be constant expression. - } - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/arrowFunctionContexts.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/arrowFunctionContexts.d.ts.diff deleted file mode 100644 index 7fa998bdde5da..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/arrowFunctionContexts.d.ts.diff +++ /dev/null @@ -1,44 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -38,16 +38,18 @@ - declare var asserted2: any; - - /// [Errors] //// - - arrowFunctionContexts.ts(2,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. -+arrowFunctionContexts.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - arrowFunctionContexts.ts(30,9): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. -+arrowFunctionContexts.ts(31,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - arrowFunctionContexts.ts(31,16): error TS2332: 'this' cannot be referenced in current location. - arrowFunctionContexts.ts(43,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - arrowFunctionContexts.ts(71,13): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. - arrowFunctionContexts.ts(72,20): error TS2332: 'this' cannot be referenced in current location. - - --==== arrowFunctionContexts.ts (6 errors) ==== -+==== arrowFunctionContexts.ts (8 errors) ==== - // Arrow function used in with statement - with (window) { - ~~~~~~~~~~~~~ - !!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. -@@ -78,11 +80,15 @@ - - // Arrow function as enum value - enum E { - x = () => 4, // Error expected -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~ - !!! error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. - y = (() => this).length // error, can't use this in enum -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ - !!! error TS2332: 'this' cannot be referenced in current location. - } - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier.d.ts.diff deleted file mode 100644 index 5d73aa099b18e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier.d.ts.diff +++ /dev/null @@ -1,36 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/classMemberWithMissingIdentifier.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,22 +1,25 @@ - - - //// [classMemberWithMissingIdentifier.d.ts] - declare class C { -- : any; -+ : invalid; - } - - /// [Errors] //// - - classMemberWithMissingIdentifier.ts(2,11): error TS1146: Declaration expected. -+classMemberWithMissingIdentifier.ts(2,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - classMemberWithMissingIdentifier.ts(2,12): error TS1005: ';' expected. - classMemberWithMissingIdentifier.ts(3,1): error TS1128: Declaration or statement expected. - - --==== classMemberWithMissingIdentifier.ts (3 errors) ==== -+==== classMemberWithMissingIdentifier.ts (4 errors) ==== - class C { - public {}; - - !!! error TS1146: Declaration expected. -+ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1005: ';' expected. - } - ~ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier2.d.ts.diff deleted file mode 100644 index 6e5979b0cebbe..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/classMemberWithMissingIdentifier2.d.ts.diff +++ /dev/null @@ -1,40 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/classMemberWithMissingIdentifier2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,26 +1,29 @@ - - - //// [classMemberWithMissingIdentifier2.d.ts] - declare class C { -- : any; -+ : invalid; - } - - /// [Errors] //// - - classMemberWithMissingIdentifier2.ts(2,11): error TS1146: Declaration expected. -+classMemberWithMissingIdentifier2.ts(2,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - classMemberWithMissingIdentifier2.ts(2,12): error TS1005: ';' expected. - classMemberWithMissingIdentifier2.ts(2,18): error TS1005: ',' expected. - classMemberWithMissingIdentifier2.ts(2,19): error TS2693: 'string' only refers to a type, but is being used as a value here. - classMemberWithMissingIdentifier2.ts(2,26): error TS1005: ';' expected. - classMemberWithMissingIdentifier2.ts(2,27): error TS2304: Cannot find name 'VariableDeclaration'. - classMemberWithMissingIdentifier2.ts(3,1): error TS1128: Declaration or statement expected. - - --==== classMemberWithMissingIdentifier2.ts (7 errors) ==== -+==== classMemberWithMissingIdentifier2.ts (8 errors) ==== - class C { - public {[name:string]:VariableDeclaration}; - - !!! error TS1146: Declaration expected. -+ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1005: ';' expected. - ~ - !!! error TS1005: ',' expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/collisionCodeGenEnumWithEnumMemberConflict.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/collisionCodeGenEnumWithEnumMemberConflict.d.ts.diff deleted file mode 100644 index d11150006e9a7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/collisionCodeGenEnumWithEnumMemberConflict.d.ts.diff +++ /dev/null @@ -1,26 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/collisionCodeGenEnumWithEnumMemberConflict.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,4 +4,16 @@ - declare enum Color { - Color = 0, - Thing = 0 - } -+ - /// [Errors] //// -+ -+collisionCodeGenEnumWithEnumMemberConflict.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== collisionCodeGenEnumWithEnumMemberConflict.ts (1 errors) ==== -+ enum Color { -+ Color, -+ Thing = Color -+ ~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/commonMissingSemicolons.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/commonMissingSemicolons.d.ts.diff deleted file mode 100644 index 9159691abe80a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/commonMissingSemicolons.d.ts.diff +++ /dev/null @@ -1,50 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/commonMissingSemicolons.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -11,9 +11,9 @@ - declare const myConst1 = 1; - declare const myDeclareConst1: 1; - declare const myDeclareConst2: 1; - declare function myFunction1(): void; --declare function (): any; -+declare function (): invalid; - interface myInterface1 { - } - interface interface { - } -@@ -78,8 +78,9 @@ - commonMissingSemicolons.ts(25,1): error TS1435: Unknown keyword or identifier. Did you mean 'function'? - commonMissingSemicolons.ts(25,1): error TS2304: Cannot find name 'functiond'. - commonMissingSemicolons.ts(25,11): error TS2304: Cannot find name 'myFunction2'. - commonMissingSemicolons.ts(25,25): error TS1005: ';' expected. -+commonMissingSemicolons.ts(26,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - commonMissingSemicolons.ts(26,10): error TS1359: Identifier expected. 'function' is a reserved word that cannot be used here. - commonMissingSemicolons.ts(26,18): error TS1003: Identifier expected. - commonMissingSemicolons.ts(27,1): error TS2304: Cannot find name 'functionMyFunction'. - commonMissingSemicolons.ts(30,1): error TS1435: Unknown keyword or identifier. Did you mean 'interface'? -@@ -121,9 +122,9 @@ - commonMissingSemicolons.ts(75,11): error TS1005: ';' expected. - commonMissingSemicolons.ts(78,1): error TS1128: Declaration or statement expected. - - --==== commonMissingSemicolons.ts (79 errors) ==== -+==== commonMissingSemicolons.ts (80 errors) ==== - async function myAsyncFunction1(): Promise {} - ~~~~~~~~~~~~~ - !!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. - asynd function myAsyncFunction2(): void {} -@@ -227,8 +228,10 @@ - !!! error TS2304: Cannot find name 'myFunction2'. - ~ - !!! error TS1005: ';' expected. - function function(): void { } -+ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~ - !!! error TS1359: Identifier expected. 'function' is a reserved word that cannot be used here. - ~ - !!! error TS1003: Identifier expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES5.d.ts.diff deleted file mode 100644 index 43dad75e6ca89..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES5.d.ts.diff +++ /dev/null @@ -1,58 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -3,11 +3,41 @@ - //// [computedPropertyNames10_ES5.d.ts] - declare var s: string; - declare var n: number; - declare var a: any; --declare var v: { -- [x: string]: () => void; -- [x: number]: () => void; -- ""(): void; -- 0(): void; -- "hello bye"(): void; --}; -+declare var v: invalid; -+ - /// [Errors] //// -+ -+computedPropertyNames10_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+computedPropertyNames10_ES5.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+computedPropertyNames10_ES5.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+computedPropertyNames10_ES5.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+computedPropertyNames10_ES5.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== computedPropertyNames10_ES5.ts (5 errors) ==== -+ var s: string; -+ var n: number; -+ var a: any; -+ var v = { -+ [s](): void { }, -+ [n](): void { }, -+ [s + s](): void { }, -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ [s + n](): void { }, -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ [+s](): void { }, -+ ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ [""](): void { }, -+ [0](): void { }, -+ [a](): void { }, -+ [true](): void { }, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ [`hello bye`](): void { }, -+ [`hello ${a} bye`](): void { } -+ ~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES6.d.ts.diff deleted file mode 100644 index 12e1322abd25d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertyNames10_ES6.d.ts.diff +++ /dev/null @@ -1,58 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -3,11 +3,41 @@ - //// [computedPropertyNames10_ES6.d.ts] - declare var s: string; - declare var n: number; - declare var a: any; --declare var v: { -- [x: string]: () => void; -- [x: number]: () => void; -- ""(): void; -- 0(): void; -- "hello bye"(): void; --}; -+declare var v: invalid; -+ - /// [Errors] //// -+ -+computedPropertyNames10_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+computedPropertyNames10_ES6.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+computedPropertyNames10_ES6.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+computedPropertyNames10_ES6.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+computedPropertyNames10_ES6.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== computedPropertyNames10_ES6.ts (5 errors) ==== -+ var s: string; -+ var n: number; -+ var a: any; -+ var v = { -+ [s](): void { }, -+ [n](): void { }, -+ [s + s](): void { }, -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ [s + n](): void { }, -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ [+s](): void { }, -+ ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ [""](): void { }, -+ [0](): void { }, -+ [a](): void { }, -+ [true](): void { }, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ [`hello bye`](): void { }, -+ [`hello ${a} bye`](): void { } -+ ~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum1.d.ts.diff deleted file mode 100644 index 04362c69baede..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum1.d.ts.diff +++ /dev/null @@ -1,51 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/constEnums/constEnum1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -10,4 +10,41 @@ - f = 20, - g = 20, - h = 10 - } -+ - /// [Errors] //// -+ -+constEnum1.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnum1.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnum1.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnum1.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnum1.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnum1.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== constEnum1.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. -+ -+ const enum E { -+ a = 10, -+ b = a, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ c = (a+1), -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ e, -+ d = ~e, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ f = a << 2 >> 1, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ g = a << 2 >>> 1, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ h = a | b -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -\ No newline at end of file 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 deleted file mode 100644 index 72ee65a6652bb..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum2.d.ts.diff +++ /dev/null @@ -1,48 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/constEnums/constEnum2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -9,14 +9,17 @@ - g - } - - /// [Errors] //// - -+constEnum2.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - constEnum2.ts(10,9): error TS2474: const enum member initializers must be constant expressions. -+constEnum2.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - constEnum2.ts(11,9): error TS2474: const enum member initializers must be constant expressions. -+constEnum2.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - 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. - -@@ -25,13 +28,19 @@ - const CONST: number = 9000 % 2; - const enum D { - d = 10, - e = 199 * Math.floor(Math.random() * 1000), -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS2474: const enum member initializers must be constant expressions. - f = d - (100 * Math.floor(Math.random() % 8)), -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS2474: const enum member initializers must be constant expressions. - g = CONST, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ - !!! 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/constEnumDeclarations.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumDeclarations.d.ts.diff deleted file mode 100644 index 1a1f432d7b774..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumDeclarations.d.ts.diff +++ /dev/null @@ -1,33 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/constEnumDeclarations.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -10,4 +10,23 @@ - A = 1, - B = 2, - C = 3 - } -+ - /// [Errors] //// -+ -+constEnumDeclarations.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== constEnumDeclarations.ts (1 errors) ==== -+ const enum E { -+ A = 1, -+ B = 2, -+ C = A | B -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ -+ const enum E2 { -+ A = 1, -+ B, -+ C -+ } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumErrors.d.ts.diff deleted file mode 100644 index 99416796e0d41..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumErrors.d.ts.diff +++ /dev/null @@ -1,113 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/constEnumErrors.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -6,9 +6,9 @@ - } - declare namespace E { - } - declare const enum E1 { -- X = 0, -+ X, - Y, - Y1 - } - declare const enum E2 { -@@ -34,25 +34,35 @@ - - /// [Errors] //// - - constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. - constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -+constEnumErrors.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -+constEnumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. - constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. -+constEnumErrors.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - constEnumErrors.ts(15,10): error TS2474: const enum member initializers must be constant expressions. - constEnumErrors.ts(15,13): error TS2339: Property 'Z' does not exist on type 'typeof E1'. - constEnumErrors.ts(22,18): error TS2476: A const enum member can only be accessed using a string literal. - constEnumErrors.ts(24,18): error TS2476: A const enum member can only be accessed using a string literal. - constEnumErrors.ts(25,18): error TS2476: A const enum member can only be accessed using a string literal. - constEnumErrors.ts(27,20): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. - constEnumErrors.ts(28,25): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. - constEnumErrors.ts(33,5): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -+constEnumErrors.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnumErrors.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnumErrors.ts(39,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnumErrors.ts(41,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - constEnumErrors.ts(41,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -+constEnumErrors.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - constEnumErrors.ts(42,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -+constEnumErrors.ts(43,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - - --==== constEnumErrors.ts (16 errors) ==== -+==== constEnumErrors.ts (26 errors) ==== - const enum E { - ~ - !!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. - A -@@ -67,17 +77,23 @@ - const enum E1 { - // illegal case - // forward reference to the element of the same enum - X = Y, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - // forward reference to the element of the same enum - Y = E1.Z, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ - !!! error TS2474: const enum member initializers must be constant expressions. - ~ - !!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. - Y1 = E1["Z"] -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~ - !!! error TS2474: const enum member initializers must be constant expressions. - ~~~ - !!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. -@@ -114,17 +130,31 @@ - - const enum NaNOrInfinity { - A = 9007199254740992, - B = A * A, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - C = B * B, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - D = C * C, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - E = D * D, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - F = E * E, // overflow -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ - !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - G = 1 / 0, // overflow -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ - !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - H = 0 / 0 // NaN -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ - !!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumNamespaceReferenceCausesNoImport2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumNamespaceReferenceCausesNoImport2.d.ts.diff deleted file mode 100644 index b0d95915c7207..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumNamespaceReferenceCausesNoImport2.d.ts.diff +++ /dev/null @@ -1,46 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/constEnumNamespaceReferenceCausesNoImport2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -12,7 +12,34 @@ - //// [index.d.ts] - export {}; - - //// [reexport.d.ts] --import * as Foo from "./foo"; --declare const _default: typeof Foo.ConstEnumOnlyModule; -+declare const _default: invalid; - export = _default; -+ - /// [Errors] //// -+ -+reexport.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== index.ts (0 errors) ==== -+ import Foo = require("./reexport"); -+ function check(x: Foo.ConstFooEnum): void { -+ switch (x) { -+ case Foo.ConstFooEnum.Some: -+ break; -+ } -+ } -+==== foo.ts (0 errors) ==== -+ export module ConstEnumOnlyModule { -+ export const enum ConstFooEnum { -+ Some, -+ Values, -+ Here -+ } -+ } -+ -+==== reexport.ts (1 errors) ==== -+ import * as Foo from "./foo"; -+ export = Foo.ConstEnumOnlyModule; -+ ~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess1.d.ts.diff deleted file mode 100644 index f6e23a2c303c2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess1.d.ts.diff +++ /dev/null @@ -1,37 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/constEnums/constEnumPropertyAccess1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -19,21 +19,27 @@ - set [G.B](x: number); - } - - /// [Errors] //// - -+constEnumPropertyAccess1.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnumPropertyAccess1.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - constEnumPropertyAccess1.ts(25,9): error TS2322: Type 'boolean' is not assignable to type 'number'. - - --==== constEnumPropertyAccess1.ts (1 errors) ==== -+==== constEnumPropertyAccess1.ts (3 errors) ==== - // constant enum declarations are completely erased in the emitted JavaScript code. - // it is an error to reference a constant enum object in any other context - // than a property access that selects one of the enum's members - - const enum G { - A = 1, - B = 2, - C = A + B, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - D = A * 2 -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - var o: { - [idx: number]: boolean diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess2.d.ts.diff deleted file mode 100644 index 76aa8b22a40c6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess2.d.ts.diff +++ /dev/null @@ -1,40 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -12,24 +12,30 @@ - declare var g: G; - declare function foo(x: G): void; - - /// [Errors] //// - -+constEnumPropertyAccess2.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnumPropertyAccess2.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - constEnumPropertyAccess2.ts(13,19): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. - constEnumPropertyAccess2.ts(14,17): error TS2476: A const enum member can only be accessed using a string literal. - constEnumPropertyAccess2.ts(16,1): error TS2322: Type '"string"' is not assignable to type 'G'. - constEnumPropertyAccess2.ts(18,3): error TS2540: Cannot assign to 'B' because it is a read-only property. - - --==== constEnumPropertyAccess2.ts (4 errors) ==== -+==== constEnumPropertyAccess2.ts (6 errors) ==== - // constant enum declarations are completely erased in the emitted JavaScript code. - // it is an error to reference a constant enum object in any other context - // than a property access that selects one of the enum's members - - const enum G { - A = 1, - B = 2, - C = A + B, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - D = A * 2 -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - // Error from referring constant enum in any other context than a property access - var z: typeof G = G; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess3.d.ts.diff deleted file mode 100644 index e473bd323424d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnumPropertyAccess3.d.ts.diff +++ /dev/null @@ -1,50 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/constEnums/constEnumPropertyAccess3.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -7,4 +7,40 @@ - C = -3, - D = -3, - E = -9 - } -+ - /// [Errors] //// -+ -+constEnumPropertyAccess3.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnumPropertyAccess3.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnumPropertyAccess3.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnumPropertyAccess3.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== constEnumPropertyAccess3.ts (4 errors) ==== -+ const enum E { -+ A = ~1, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ B = -1, -+ C = ~(1 + 1), -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ D = -(1 + 2), -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ E = 1 - 10, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ -+ E.A.toString(); -+ E.B.toString(); -+ E.C.toString(); -+ E.D.toString(); -+ -+ E["A"].toString(); -+ E["B"].toString(); -+ E["C"].toString(); -+ E["D"].toString(); -+ E["E"].toString(); -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnums.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnums.d.ts.diff deleted file mode 100644 index f51c1ef458b0c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnums.d.ts.diff +++ /dev/null @@ -1,322 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/constEnums.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -28,11 +28,11 @@ - T = 11, - U = 11, - V = 11, - W = 11, -- W1 = 100, -- W2 = 100, -- W3 = 100, -+ W1, -+ W2, -+ W3, - W4 = 11, - W5 = 11 - } - declare const enum Comments { -@@ -48,19 +48,19 @@ - namespace B { - namespace C { - const enum E { - V1 = 1, -- V2 = 101 -+ V2 - } - } - } - } - declare namespace A { - namespace B { - namespace C { - const enum E { -- V3 = 64, -- V4 = 2 -+ V3, -+ V4 - } - } - } - } -@@ -94,4 +94,274 @@ - declare function foo2(e: I2.C.E): void; - declare function foo(x: Enum1): void; - declare function bar(e: A.B.C.E): number; - declare function baz(c: Comments): void; -+ - /// [Errors] //// -+ -+constEnums.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(16,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(17,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(18,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(19,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(23,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(24,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(55,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(65,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constEnums.ts(66,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== constEnums.ts (29 errors) ==== -+ const enum Enum1 { -+ A0 = 100, -+ } -+ -+ const enum Enum1 { -+ // correct cases -+ A, -+ B, -+ C = 10, -+ D = A | B, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ E = A | 1, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ F = 1 | A, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ G = (1 & 1), -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ H = ~(A | B), -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ I = A >>> 1, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ J = 1 & A, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ K = ~(1 | 5), -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ L = ~D, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ M = E << B, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ N = E << 1, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ O = E >> B, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ P = E >> 1, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ PQ = E ** 2, -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ Q = -D, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ R = C & 5, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ S = 5 & C, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ T = C | D, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ U = C | 1, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ V = 10 | D, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ W = Enum1.V, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ // correct cases: reference to the enum member from different enum declaration -+ W1 = A0, -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ W2 = Enum1.A0, -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ W3 = Enum1["A0"], -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ W4 = Enum1["W"], -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ W5 = Enum1[`V`], -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ -+ const enum Comments { -+ "//", -+ "/*", -+ "*/", -+ "///", -+ "#", -+ "", -+ } -+ -+ module A { -+ export module B { -+ export module C { -+ export const enum E { -+ V1 = 1, -+ V2 = A.B.C.E.V1 | 100 -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ } -+ } -+ } -+ -+ module A { -+ export module B { -+ export module C { -+ export const enum E { -+ V3 = A.B.C.E["V2"] & 200, -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ V4 = A.B.C.E[`V1`] << 1, -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ } -+ } -+ } -+ -+ module A1 { -+ export module B { -+ export module C { -+ export const enum E { -+ V1 = 10, -+ V2 = 110, -+ } -+ } -+ } -+ } -+ -+ module A2 { -+ export module B { -+ export module C { -+ export const enum E { -+ V1 = 10, -+ V2 = 110, -+ } -+ } -+ // module C will be classified as value -+ export module C { -+ var x = 1 -+ } -+ } -+ } -+ -+ import I = A.B.C.E; -+ import I1 = A1.B; -+ import I2 = A2.B; -+ -+ function foo0(e: I): void { -+ if (e === I.V1) { -+ } -+ else if (e === I.V2) { -+ } -+ } -+ -+ function foo1(e: I1.C.E): void { -+ if (e === I1.C.E.V1) { -+ } -+ else if (e === I1.C.E.V2) { -+ } -+ } -+ -+ function foo2(e: I2.C.E): void { -+ if (e === I2.C.E.V1) { -+ } -+ else if (e === I2.C.E.V2) { -+ } -+ } -+ -+ -+ function foo(x: Enum1): void { -+ switch (x) { -+ case Enum1.A: -+ case Enum1.B: -+ case Enum1.C: -+ case Enum1.D: -+ case Enum1.E: -+ case Enum1.F: -+ case Enum1.G: -+ case Enum1.H: -+ case Enum1.I: -+ case Enum1.J: -+ case Enum1.K: -+ case Enum1.L: -+ case Enum1.M: -+ case Enum1.N: -+ case Enum1.O: -+ case Enum1.P: -+ case Enum1.PQ: -+ case Enum1.Q: -+ case Enum1.R: -+ case Enum1.S: -+ case Enum1["T"]: -+ case Enum1[`U`]: -+ case Enum1.V: -+ case Enum1.W: -+ case Enum1.W1: -+ case Enum1.W2: -+ case Enum1.W3: -+ case Enum1.W4: -+ break; -+ } -+ } -+ -+ function bar(e: A.B.C.E): number { -+ switch (e) { -+ case A.B.C.E.V1: return 1; -+ case A.B.C.E.V2: return 1; -+ case A.B.C.E.V3: return 1; -+ } -+ } -+ -+ function baz(c: Comments): void { -+ switch (c) { -+ case Comments["//"]: -+ case Comments["/*"]: -+ case Comments["*/"]: -+ case Comments["///"]: -+ case Comments["#"]: -+ case Comments[""]: -+ break; -+ } -+ } -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constantEnumAssert.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constantEnumAssert.d.ts.diff deleted file mode 100644 index 41c5d5fd3e602..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constantEnumAssert.d.ts.diff +++ /dev/null @@ -1,38 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/constantEnumAssert.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -59,12 +59,14 @@ - a: string; - }; - - /// [Errors] //// - -+constantEnumAssert.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+constantEnumAssert.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - constantEnumAssert.ts(73,10): error TS1355: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. - - --==== constantEnumAssert.ts (1 errors) ==== -+==== constantEnumAssert.ts (3 errors) ==== - enum E1 { - a, - b - } -@@ -76,9 +78,13 @@ - - enum E3 { - a = 1, - b = a << 1, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = a << 2, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - const enum E4 { - a, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constructorWithIncompleteTypeAnnotation.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constructorWithIncompleteTypeAnnotation.d.ts.diff deleted file mode 100644 index 3bbf0fa39bd83..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constructorWithIncompleteTypeAnnotation.d.ts.diff +++ /dev/null @@ -1,50 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -14,9 +14,9 @@ - declare namespace TypeScriptAllInOne { - class Program { - static Main(...args: string[]): void; - case: any; -- if(retValue: any): any; -+ if(retValue: any): invalid; - } - } - declare class BasicFeatures { - VARIABLES(): number; -@@ -65,8 +65,9 @@ - constructorWithIncompleteTypeAnnotation.ts(24,28): error TS1005: ':' expected. - constructorWithIncompleteTypeAnnotation.ts(24,29): error TS1005: ',' expected. - constructorWithIncompleteTypeAnnotation.ts(27,18): error TS1128: Declaration or statement expected. - constructorWithIncompleteTypeAnnotation.ts(27,31): error TS2304: Cannot find name 'bfs'. -+constructorWithIncompleteTypeAnnotation.ts(28,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - constructorWithIncompleteTypeAnnotation.ts(28,35): error TS1005: ',' expected. - constructorWithIncompleteTypeAnnotation.ts(28,39): error TS1005: ';' expected. - constructorWithIncompleteTypeAnnotation.ts(31,18): error TS1109: Expression expected. - constructorWithIncompleteTypeAnnotation.ts(34,17): error TS2304: Cannot find name 'retValue'. -@@ -150,9 +151,9 @@ - constructorWithIncompleteTypeAnnotation.ts(259,55): error TS1005: ';' expected. - constructorWithIncompleteTypeAnnotation.ts(261,1): error TS1128: Declaration or statement expected. - - --==== constructorWithIncompleteTypeAnnotation.ts (93 errors) ==== -+==== constructorWithIncompleteTypeAnnotation.ts (94 errors) ==== - declare module "fs" { - export class File { - constructor(filename: string); - public ReadAllText(): string; -@@ -203,8 +204,10 @@ - !!! error TS1128: Declaration or statement expected. - ~~~ - !!! error TS2304: Cannot find name 'bfs'. - if (retValue: any != 0) { -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ - !!! error TS1005: ',' expected. - ~ - !!! error TS1005: ';' expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationInAmbientContext.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationInAmbientContext.d.ts.diff deleted file mode 100644 index ecf419216dfc0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationInAmbientContext.d.ts.diff +++ /dev/null @@ -1,37 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es6/destructuring/declarationInAmbientContext.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,5 +1,25 @@ - - - //// [declarationInAmbientContext.d.ts] --declare var a: any, b: any; --declare var c: any, d: any; -+declare var a: invalid, b: invalid; -+declare var c: invalid, d: invalid; -+ - /// [Errors] //// -+ -+declarationInAmbientContext.ts(1,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationInAmbientContext.ts(1,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationInAmbientContext.ts(2,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationInAmbientContext.ts(2,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== declarationInAmbientContext.ts (4 errors) ==== -+ declare var [a, b]; // Error, destructuring declaration not allowed in ambient context -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ declare var {c, d}; // Error, destructuring declaration not allowed in ambient context -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationWithNoInitializer.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationWithNoInitializer.d.ts.diff deleted file mode 100644 index 0712019ef0b77..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationWithNoInitializer.d.ts.diff +++ /dev/null @@ -1,44 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es6/destructuring/declarationWithNoInitializer.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,19 +1,31 @@ - - - //// [declarationWithNoInitializer.d.ts] --declare var a: any, b: any; --declare var c: any, d: any; -+declare var a: invalid, b: invalid; -+declare var c: invalid, d: invalid; - - /// [Errors] //// - - declarationWithNoInitializer.ts(1,5): error TS1182: A destructuring declaration must have an initializer. -+declarationWithNoInitializer.ts(1,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationWithNoInitializer.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - declarationWithNoInitializer.ts(2,5): error TS1182: A destructuring declaration must have an initializer. -+declarationWithNoInitializer.ts(2,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationWithNoInitializer.ts(2,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - --==== declarationWithNoInitializer.ts (2 errors) ==== -+==== declarationWithNoInitializer.ts (6 errors) ==== - var [a, b]; // Error, no initializer - ~~~~~~ - !!! error TS1182: A destructuring declaration must have an initializer. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - var {c, d}; // Error, no initializer - ~~~~~~ - !!! error TS1182: A destructuring declaration must have an initializer. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterDeclaration6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterDeclaration6.d.ts.diff deleted file mode 100644 index 35667cfe7c863..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterDeclaration6.d.ts.diff +++ /dev/null @@ -1,152 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -6,10 +6,10 @@ - }): void; - declare function a1({ public }: { - public: any; - }): void; --declare function a4([any, [], [any, any, []], [any, any, [], [any, any, any, []]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []], [any, any, any, any, any, any, any, [], [any, any, any, any, any, any, any, any, []]]]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any, any[]]]]]]]]]): any; --declare function a5(...: any[]): any; -+declare function a4([any, [], [any, any, []], [any, any, [], [any, any, any, []]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []], [any, any, any, any, any, any, any, [], [any, any, any, any, any, any, any, any, []]]]]]]]]: invalid): invalid; -+declare function a5(...: any[]): invalid; - declare function a6(...public: any[]): void; - declare function a7(...a: string): void; - declare function b1({ public: x }: { - public: any; -@@ -19,8 +19,10 @@ - }): void; - - /// [Errors] //// - - destructuringParameterDeclaration6.ts(7,18): error TS1005: ':' expected. -+destructuringParameterDeclaration6.ts(13,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+destructuringParameterDeclaration6.ts(13,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - destructuringParameterDeclaration6.ts(13,14): error TS1181: Array element destructuring pattern expected. - destructuringParameterDeclaration6.ts(13,16): error TS2300: Duplicate identifier 'any'. - destructuringParameterDeclaration6.ts(13,19): error TS1005: ',' expected. - destructuringParameterDeclaration6.ts(13,21): error TS1005: ',' expected. -@@ -740,15 +742,16 @@ - destructuringParameterDeclaration6.ts(25,3276): error TS1005: '(' expected. - destructuringParameterDeclaration6.ts(25,3278): error TS2304: Cannot find name 'public'. - destructuringParameterDeclaration6.ts(25,3284): error TS1005: ';' expected. - destructuringParameterDeclaration6.ts(25,3285): error TS1128: Declaration or statement expected. -+destructuringParameterDeclaration6.ts(26,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - destructuringParameterDeclaration6.ts(26,16): error TS1003: Identifier expected. - destructuringParameterDeclaration6.ts(26,23): error TS1005: ',' expected. - destructuringParameterDeclaration6.ts(26,28): error TS1005: '(' expected. - destructuringParameterDeclaration6.ts(28,13): error TS2370: A rest parameter must be of an array type. - - --==== destructuringParameterDeclaration6.ts (726 errors) ==== -+==== destructuringParameterDeclaration6.ts (729 errors) ==== - // A parameter declaration may specify either an identifier or a binding pattern. - - // Reserved words are not allowed to be used as an identifier in parameter declaration - "use strict" -@@ -762,8 +765,11 @@ - function a1({public}: { - public: any; - }): void { } - function a4([: any[]: [ -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~~~~~~~~~~~ - ~ - !!! error TS1181: Array element destructuring pattern expected. - ~~~ - !!! error TS2300: Duplicate identifier 'any'. -@@ -771,27 +777,33 @@ - !!! error TS1005: ',' expected. - ~ - !!! error TS1005: ',' expected. - any, -+ ~~~~~~~~~~~~ - ~~~ - !!! error TS2300: Duplicate identifier 'any'. - any[] -+ ~~~~~~~~~~~~~ - ~~~ - !!! error TS2300: Duplicate identifier 'any'. - ~ - !!! error TS1005: ',' expected. - ]: [ -+ ~~~~~~~~ - ~ - !!! error TS1005: ',' expected. - any, -+ ~~~~~~~~~~~~ - ~~~ - !!! error TS2300: Duplicate identifier 'any'. - any[], -+ ~~~~~~~~~~~~~~ - ~~~ - !!! error TS2300: Duplicate identifier 'any'. - ~ - !!! error TS1005: ',' expected. - [any, any, any[]] -+ ~~~~~~~~~~~~~~~~~~~~~~~~~ - ~~~ - !!! error TS2300: Duplicate identifier 'any'. - ~~~ - !!! error TS2300: Duplicate identifier 'any'. -@@ -799,19 +811,23 @@ - !!! error TS2300: Duplicate identifier 'any'. - ~ - !!! error TS1005: ',' expected. - ]: [ -+ ~~~~~~~~ - ~ - !!! error TS1005: ',' expected. - any, -+ ~~~~~~~~~~~~ - ~~~ - !!! error TS2300: Duplicate identifier 'any'. - any[], -+ ~~~~~~~~~~~~~~ - ~~~ - !!! error TS2300: Duplicate identifier 'any'. - ~ - !!! error TS1005: ',' expected. - [any, any, any[]], -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~ - ~~~ - !!! error TS2300: Duplicate identifier 'any'. - ~~~ - !!! error TS2300: Duplicate identifier 'any'. -@@ -819,8 +835,9 @@ - !!! error TS2300: Duplicate identifier 'any'. - ~ - !!! error TS1005: ',' expected. - [any, any, any[], [any, any, any, any[]]] -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ~~~ - !!! error TS2300: Duplicate identifier 'any'. - ~~~ - !!! error TS2300: Duplicate identifier 'any'. -@@ -838,8 +855,10 @@ - !!! error TS2300: Duplicate identifier 'any'. - ~ - !!! error TS1005: ',' expected. - ]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]]]]]while, for, public]){ } -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~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~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1005: ',' expected. - ~~~ - !!! error TS2300: Duplicate identifier 'any'. -@@ -2217,8 +2236,10 @@ - !!! error TS1005: ';' expected. - ~ - !!! error TS1128: Declaration or statement expected. - function a5(...: any[]while) { } -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1003: Identifier expected. - ~~~~~ - !!! error TS1005: ',' expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties1.d.ts.diff deleted file mode 100644 index 04c05c2340079..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties1.d.ts.diff +++ /dev/null @@ -1,118 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,29 +1,29 @@ - - - //// [destructuringParameterProperties1.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); - } - declare var c1: C1; - declare var useC1Properties: boolean; -@@ -39,10 +39,19 @@ - declare const c3_z: any; - - /// [Errors] //// - - destructuringParameterProperties1.ts(2,17): error TS1187: A parameter property may not be declared using a binding pattern. -+destructuringParameterProperties1.ts(2,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+destructuringParameterProperties1.ts(2,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+destructuringParameterProperties1.ts(2,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - destructuringParameterProperties1.ts(9,17): error TS1187: A parameter property may not be declared using a binding pattern. -+destructuringParameterProperties1.ts(9,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+destructuringParameterProperties1.ts(9,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+destructuringParameterProperties1.ts(9,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - destructuringParameterProperties1.ts(16,17): error TS1187: A parameter property may not be declared using a binding pattern. -+destructuringParameterProperties1.ts(16,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+destructuringParameterProperties1.ts(16,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+destructuringParameterProperties1.ts(16,32): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - destructuringParameterProperties1.ts(22,35): error TS2339: Property 'x' does not exist on type 'C1'. - destructuringParameterProperties1.ts(22,44): error TS2339: Property 'y' does not exist on type 'C1'. - destructuringParameterProperties1.ts(22,52): error TS2339: Property 'y' does not exist on type 'C1'. - destructuringParameterProperties1.ts(22,61): error TS2339: Property 'z' does not exist on type 'C1'. -@@ -53,13 +62,19 @@ - destructuringParameterProperties1.ts(32,33): error TS2339: Property 'y' does not exist on type 'C3'. - destructuringParameterProperties1.ts(32,39): error TS2339: Property 'z' does not exist on type 'C3'. - - --==== destructuringParameterProperties1.ts (13 errors) ==== -+==== destructuringParameterProperties1.ts (22 errors) ==== - class C1 { - constructor(public [x, y, z]: string[]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS1187: A parameter property may not be declared using a binding pattern. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - } - - type TupleType1 = [string, number, boolean]; -@@ -67,8 +82,14 @@ - class C2 { - constructor(public [x, y, z]: TupleType1) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS1187: A parameter property may not be declared using a binding pattern. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - } - - type ObjType1 = { x: number; y: string; z: boolean } -@@ -76,8 +97,14 @@ - class C3 { - constructor(public { x, y, z }: ObjType1) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS1187: A parameter property may not be declared using a binding pattern. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - } - - var c1: C1 = new C1([]); diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties2.d.ts.diff deleted file mode 100644 index d76142ef55940..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties2.d.ts.diff +++ /dev/null @@ -1,56 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,11 +2,11 @@ - - //// [destructuringParameterProperties2.d.ts] - declare class C1 { - private k; -- private a: number; -- private b: string; -- private c: boolean; -+ private a: invalid; -+ private b: invalid; -+ private c: invalid; - constructor(k: number, [a, b, c]: [number, string, boolean]); - getA(): any; - getB(): any; - getC(): any; -@@ -28,8 +28,11 @@ - declare const z_c: any; - - /// [Errors] //// - - destructuringParameterProperties2.ts(2,36): error TS1187: A parameter property may not be declared using a binding pattern. -+destructuringParameterProperties2.ts(2,45): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+destructuringParameterProperties2.ts(2,48): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+destructuringParameterProperties2.ts(2,51): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - destructuringParameterProperties2.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. - destructuringParameterProperties2.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. - destructuringParameterProperties2.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. - destructuringParameterProperties2.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. -@@ -39,13 +42,19 @@ - destructuringParameterProperties2.ts(22,7): error TS2451: Cannot redeclare block-scoped variable 'dest'. - destructuringParameterProperties2.ts(34,7): error TS2451: Cannot redeclare block-scoped variable 'dest'. - - --==== destructuringParameterProperties2.ts (10 errors) ==== -+==== destructuringParameterProperties2.ts (13 errors) ==== - class C1 { - constructor(private k: number, private [a, b, c]: [number, string, boolean]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS1187: A parameter property may not be declared using a binding pattern. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { - ~ - !!! error TS2339: Property 'b' does not exist on type 'C1'. - ~ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties3.d.ts.diff deleted file mode 100644 index 917c2152ac803..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties3.d.ts.diff +++ /dev/null @@ -1,56 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,11 +2,11 @@ - - //// [destructuringParameterProperties3.d.ts] - declare class C1 { - private k; -- private a: T; -- private b: U; -- private c: V; -+ private a: invalid; -+ private b: invalid; -+ private c: invalid; - constructor(k: T, [a, b, c]: [T, U, V]); - getA(): any; - getB(): any; - getC(): any; -@@ -33,8 +33,11 @@ - declare const z_c: any; - - /// [Errors] //// - - destructuringParameterProperties3.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. -+destructuringParameterProperties3.ts(2,40): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+destructuringParameterProperties3.ts(2,43): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+destructuringParameterProperties3.ts(2,46): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - destructuringParameterProperties3.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. - destructuringParameterProperties3.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. - destructuringParameterProperties3.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. - destructuringParameterProperties3.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. -@@ -51,13 +54,19 @@ - destructuringParameterProperties3.ts(42,7): error TS2451: Cannot redeclare block-scoped variable 'z_b'. - destructuringParameterProperties3.ts(43,7): error TS2451: Cannot redeclare block-scoped variable 'z_c'. - - --==== destructuringParameterProperties3.ts (17 errors) ==== -+==== destructuringParameterProperties3.ts (20 errors) ==== - class C1 { - constructor(private k: T, private [a, b, c]: [T,U,V]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS1187: A parameter property may not be declared using a binding pattern. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { - ~ - !!! error TS2339: Property 'b' does not exist on type 'C1'. - ~ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties4.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties4.d.ts.diff deleted file mode 100644 index 481e5069e8cca..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties4.d.ts.diff +++ /dev/null @@ -1,56 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties4.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,11 +2,11 @@ - - //// [destructuringParameterProperties4.d.ts] - declare class C1 { - private k; -- protected a: T; -- protected b: U; -- protected c: V; -+ protected a: invalid; -+ protected b: invalid; -+ protected c: invalid; - constructor(k: T, [a, b, c]: [T, U, V]); - getA(): any; - getB(): any; - getC(): any; -@@ -16,8 +16,11 @@ - } - - /// [Errors] //// - - destructuringParameterProperties4.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. -+destructuringParameterProperties4.ts(2,42): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+destructuringParameterProperties4.ts(2,45): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+destructuringParameterProperties4.ts(2,48): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - destructuringParameterProperties4.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. - destructuringParameterProperties4.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. - destructuringParameterProperties4.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. - destructuringParameterProperties4.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. -@@ -27,13 +30,19 @@ - destructuringParameterProperties4.ts(23,34): error TS2339: Property 'b' does not exist on type 'C2'. - destructuringParameterProperties4.ts(23,44): error TS2339: Property 'c' does not exist on type 'C2'. - - --==== destructuringParameterProperties4.ts (10 errors) ==== -+==== destructuringParameterProperties4.ts (13 errors) ==== - class C1 { - constructor(private k: T, protected [a, b, c]: [T,U,V]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS1187: A parameter property may not be declared using a binding pattern. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { - ~ - !!! error TS2339: Property 'b' does not exist on type 'C1'. - ~ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties5.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties5.d.ts.diff deleted file mode 100644 index a231c5d8a6071..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringParameterProperties5.d.ts.diff +++ /dev/null @@ -1,83 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -7,14 +7,14 @@ - z: boolean; - }; - type TupleType1 = [ObjType1, number, string]; - declare class C1 { -- x1: any; -- x2: any; -- x3: any; -- { x1, x2, x3 }: any; -- y: number; -- z: string; -+ x1: invalid; -+ x2: invalid; -+ x3: invalid; -+ { x1, x2, x3 }: invalid; -+ y: invalid; -+ z: invalid; - constructor([{ x1, x2, x3 }, y, z]: TupleType1); - } - declare var a: C1; - declare const dest: any[]; -@@ -25,11 +25,17 @@ - declare const a_z: any; - - /// [Errors] //// - - destructuringParameterProperties5.ts(5,17): error TS1187: A parameter property may not be declared using a binding pattern. -+destructuringParameterProperties5.ts(5,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - destructuringParameterProperties5.ts(5,27): error TS2339: Property 'x1' does not exist on type 'ObjType1'. -+destructuringParameterProperties5.ts(5,27): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - destructuringParameterProperties5.ts(5,31): error TS2339: Property 'x2' does not exist on type 'ObjType1'. -+destructuringParameterProperties5.ts(5,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - destructuringParameterProperties5.ts(5,35): error TS2339: Property 'x3' does not exist on type 'ObjType1'. -+destructuringParameterProperties5.ts(5,35): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+destructuringParameterProperties5.ts(5,41): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+destructuringParameterProperties5.ts(5,44): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - destructuringParameterProperties5.ts(7,29): error TS2339: Property 'x1' does not exist on type 'C1'. - destructuringParameterProperties5.ts(7,40): error TS2339: Property 'x2' does not exist on type 'C1'. - destructuringParameterProperties5.ts(7,51): error TS2339: Property 'x3' does not exist on type 'C1'. - destructuringParameterProperties5.ts(7,62): error TS2339: Property 'y' does not exist on type 'C1'. -@@ -43,22 +49,34 @@ - destructuringParameterProperties5.ts(12,42): error TS2339: Property 'y' does not exist on type 'C1'. - destructuringParameterProperties5.ts(12,47): error TS2339: Property 'z' does not exist on type 'C1'. - - --==== destructuringParameterProperties5.ts (17 errors) ==== -+==== destructuringParameterProperties5.ts (23 errors) ==== - type ObjType1 = { x: number; y: string; z: boolean } - type TupleType1 = [ObjType1, number, string] - - class C1 { - constructor(public [{ x1, x2, x3 }, y, z]: TupleType1) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS1187: A parameter property may not be declared using a binding pattern. -+ ~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ - !!! error TS2339: Property 'x1' does not exist on type 'ObjType1'. -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ - !!! error TS2339: Property 'x2' does not exist on type 'ObjType1'. -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ - !!! error TS2339: Property 'x3' does not exist on type 'ObjType1'. -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - var foo: any = x1 || x2 || x3 || y || z; - var bar: any = this.x1 || this.x2 || this.x3 || this.y || this.z; - ~~ - !!! error TS2339: Property 'x1' does not exist on type 'C1'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/disallowLineTerminatorBeforeArrow.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/disallowLineTerminatorBeforeArrow.d.ts.diff deleted file mode 100644 index 93cc661bb028d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/disallowLineTerminatorBeforeArrow.d.ts.diff +++ /dev/null @@ -1,36 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -27,14 +27,15 @@ - var v: any, any: any; - } - - /// [Errors] //// - -+disallowLineTerminatorBeforeArrow.ts(67,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - disallowLineTerminatorBeforeArrow.ts(71,25): error TS2304: Cannot find name 'x'. - disallowLineTerminatorBeforeArrow.ts(71,26): error TS1005: ',' expected. - disallowLineTerminatorBeforeArrow.ts(72,9): error TS1128: Declaration or statement expected. - - --==== disallowLineTerminatorBeforeArrow.ts (3 errors) ==== -+==== disallowLineTerminatorBeforeArrow.ts (4 errors) ==== - var f1 = (): void - => { } - var f2 = (x: string, y: string): void /* - */ => { } -@@ -100,8 +101,10 @@ - } - - export enum Enum { - claw = (() -+ ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - => 10)() - } - - export var v: any = x: any: any diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/duplicateObjectLiteralProperty.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/duplicateObjectLiteralProperty.d.ts.diff deleted file mode 100644 index 386deede15909..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/duplicateObjectLiteralProperty.d.ts.diff +++ /dev/null @@ -1,45 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/duplicateObjectLiteralProperty.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -6,11 +6,9 @@ - c: number; - }; - b: boolean; - }; --declare var y: { -- readonly a: number; --}; -+declare var y: invalid; - - /// [Errors] //// - - duplicateObjectLiteralProperty.ts(4,5): error TS1117: An object literal cannot have multiple properties with the same name. - duplicateObjectLiteralProperty.ts(5,5): error TS1117: An object literal cannot have multiple properties with the same name. -@@ -19,11 +17,12 @@ - duplicateObjectLiteralProperty.ts(14,9): error TS2300: Duplicate identifier 'a'. - duplicateObjectLiteralProperty.ts(15,9): error TS2300: Duplicate identifier 'a'. - duplicateObjectLiteralProperty.ts(16,9): error TS1118: An object literal cannot have multiple get/set accessors with the same name. - duplicateObjectLiteralProperty.ts(16,9): error TS2300: Duplicate identifier 'a'. -+duplicateObjectLiteralProperty.ts(16,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - --==== duplicateObjectLiteralProperty.ts (8 errors) ==== -+==== duplicateObjectLiteralProperty.ts (9 errors) ==== - var x = { - a: 1, - b: true, // OK - a: 56, // Duplicate -@@ -54,6 +53,8 @@ - ~ - !!! error TS1118: An object literal cannot have multiple get/set accessors with the same name. - ~ - !!! error TS2300: Duplicate identifier 'a'. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - }; - -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumAssignmentCompat5.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumAssignmentCompat5.d.ts.diff deleted file mode 100644 index 8b46a9d282958..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumAssignmentCompat5.d.ts.diff +++ /dev/null @@ -1,40 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/enumAssignmentCompat5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -17,21 +17,30 @@ - declare let c: Computed; - declare let ca: Computed.A; - - /// [Errors] //// - -+enumAssignmentCompat5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumAssignmentCompat5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumAssignmentCompat5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumAssignmentCompat5.ts(12,1): error TS2322: Type '4' is not assignable to type 'E'. - enumAssignmentCompat5.ts(14,1): error TS2322: Type '2' is not assignable to type 'E.A'. - enumAssignmentCompat5.ts(20,5): error TS2322: Type '1' is not assignable to type 'Computed.A'. - - --==== enumAssignmentCompat5.ts (3 errors) ==== -+==== enumAssignmentCompat5.ts (6 errors) ==== - enum E { - A, B, C - } - enum Computed { - A = 1 << 1, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - B = 1 << 2, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - C = 1 << 3, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - let n: number; - let e: E = n; // ok because it's too inconvenient otherwise - e = 0; // ok, in range diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics.d.ts.diff deleted file mode 100644 index c4b85824b84f8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics.d.ts.diff +++ /dev/null @@ -1,120 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/enums/enumBasics.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -53,4 +53,110 @@ - B = 0 - } - declare var doNotPropagate: (E8 | E7 | E4 | E3)[]; - declare var doPropagate: (E9 | E6 | E5)[]; -+ - /// [Errors] //// -+ -+enumBasics.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumBasics.ts(33,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumBasics.ts(33,34): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumBasics.ts(38,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumBasics.ts(56,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumBasics.ts(61,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumBasics.ts(67,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== enumBasics.ts (7 errors) ==== -+ // Enum without initializers have first member = 0 and successive members = N + 1 -+ enum E1 { -+ A, -+ B, -+ C -+ } -+ -+ // Enum type is a subtype of Number -+ var x: number = E1.A; -+ -+ // Enum object type is anonymous with properties of the enum type and numeric indexer -+ var e: typeof E1 = E1; -+ var e: { -+ readonly A: E1.A; -+ readonly B: E1.B; -+ readonly C: E1.C; -+ readonly [n: number]: string; -+ }; -+ var e: typeof E1; -+ -+ // Reverse mapping of enum returns string name of property -+ var s: string = E1[e.A]; -+ var s: string; -+ -+ -+ // Enum with only constant members -+ enum E2 { -+ A = 1, B = 2, C = 3 -+ } -+ -+ // Enum with only computed members -+ enum E3 { -+ X = 'foo'.length, Y = 4 + 3, Z = +'foo' -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ -+ // Enum with constant members followed by computed members -+ enum E4 { -+ X = 0, Y, Z = 'foo'.length -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ -+ // Enum with > 2 constant members with no initializer for first member, non zero initializer for second element -+ enum E5 { -+ A, -+ B = 3, -+ C // 4 -+ } -+ -+ enum E6 { -+ A, -+ B = 0, -+ C // 1 -+ } -+ -+ // Enum with computed member initializer of type 'any' -+ enum E7 { -+ A = 'foo'['foo'] -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ -+ // Enum with computed member initializer of type number -+ enum E8 { -+ B = 'foo'['foo'] -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ -+ //Enum with computed member intializer of same enum type -+ enum E9 { -+ A, -+ B = A -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ -+ // (refer to .js to validate) -+ // Enum constant members are propagated -+ var doNotPropagate: (E8 | E7 | E4 | E3)[] = [ -+ E8.B, E7.A, E4.Z, E3.X, E3.Y, E3.Z -+ ]; -+ // Enum computed members are not propagated -+ var doPropagate: (E9 | E6 | E5)[] = [ -+ E9.A, E9.B, E6.B, E6.C, E6.A, E5.A, E5.B, E5.C -+ ]; -+ -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics2.d.ts.diff deleted file mode 100644 index d37aaae86b377..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics2.d.ts.diff +++ /dev/null @@ -1,76 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/enumBasics2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -9,43 +9,64 @@ - z - } - declare enum Bar { - a,// ok -- b = 2,// ok -+ b,// ok - c,// ok - d - } - - /// [Errors] //// - -+enumBasics2.ts(4,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumBasics2.ts(4,9): error TS2339: Property 'b' does not exist on type 'Foo.a'. -+enumBasics2.ts(5,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumBasics2.ts(5,9): error TS2339: Property 'a' does not exist on type 'Foo.b'. -+enumBasics2.ts(6,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumBasics2.ts(6,9): error TS2339: Property 'x' does not exist on type 'Foo.y'. - enumBasics2.ts(6,15): error TS2339: Property 'x' does not exist on type 'Foo.a'. -+enumBasics2.ts(10,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumBasics2.ts(11,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumBasics2.ts(12,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumBasics2.ts(13,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumBasics2.ts(13,13): error TS2339: Property 'a' does not exist on type 'Foo.a'. - - --==== enumBasics2.ts (5 errors) ==== -+==== enumBasics2.ts (12 errors) ==== - enum Foo { - a = 2, - b = 3, - x = a.b, // should error -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS2339: Property 'b' does not exist on type 'Foo.a'. - y = b.a, // should error -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS2339: Property 'a' does not exist on type 'Foo.b'. - z = y.x * a.x, // should error -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS2339: Property 'x' does not exist on type 'Foo.y'. - ~ - !!! error TS2339: Property 'x' does not exist on type 'Foo.a'. - } - - enum Bar { - a = (1).valueOf(), // ok -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - b = Foo.a, // ok -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = Foo.a.valueOf(), // ok -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - d = Foo.a.a, // should error -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS2339: Property 'a' does not exist on type 'Foo.a'. - } - -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics3.d.ts.diff deleted file mode 100644 index 51bcf121989c4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumBasics3.d.ts.diff +++ /dev/null @@ -1,55 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/enumBasics3.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -11,25 +11,30 @@ - } - declare namespace M { - namespace N { - enum E2 { -- b = 1, -+ b, - c - } - } - } - - /// [Errors] //// - -+enumBasics3.ts(5,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumBasics3.ts(5,13): error TS2339: Property 'a' does not exist on type 'E1.a'. -+enumBasics3.ts(13,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumBasics3.ts(14,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumBasics3.ts(14,20): error TS2339: Property 'a' does not exist on type 'E1.a'. - - --==== enumBasics3.ts (2 errors) ==== -+==== enumBasics3.ts (5 errors) ==== - module M { - export namespace N { - export enum E1 { - a = 1, - b = a.a, // should error -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS2339: Property 'a' does not exist on type 'E1.a'. - } - } -@@ -38,9 +43,13 @@ - module M { - export namespace N { - export enum E2 { - b = M.N.E1.a, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = M.N.E1.a.a, // should error -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS2339: Property 'a' does not exist on type 'E1.a'. - } - } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithString.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithString.d.ts.diff deleted file mode 100644 index eff59249c9ff5..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithString.d.ts.diff +++ /dev/null @@ -1,84 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/enums/enumConstantMemberWithString.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -29,46 +29,73 @@ - b = "12" - } - - /// [Errors] //// - -+enumConstantMemberWithString.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithString.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithString.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumConstantMemberWithString.ts(5,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - enumConstantMemberWithString.ts(5,15): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -+enumConstantMemberWithString.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithString.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithString.ts(16,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithString.ts(18,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithString.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithString.ts(31,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - --==== enumConstantMemberWithString.ts (2 errors) ==== -+==== enumConstantMemberWithString.ts (11 errors) ==== - enum T1 { - a = "1", - b = "1" + "2", -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = "1" + "2" + "3", -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - d = "a" - "a", -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ - !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~~~ - !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - e = "a" + 1 -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - enum T2 { - a = "1", - b = "1" + "2" -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - enum T3 { - a = "1", - b = "1" + "2", -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = 1, - d = 1 + 2 -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - enum T4 { - a = "1" - } - - enum T5 { - a = "1" + "2" -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - declare enum T6 { - a = "1", - b = "1" + "2" -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithStringEmitDeclaration.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithStringEmitDeclaration.d.ts.diff deleted file mode 100644 index 096cc47989a5f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithStringEmitDeclaration.d.ts.diff +++ /dev/null @@ -1,66 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/enums/enumConstantMemberWithStringEmitDeclaration.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -23,4 +23,56 @@ - declare enum T6 { - a = "1", - b = "12" - } -+ - /// [Errors] //// -+ -+enumConstantMemberWithStringEmitDeclaration.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithStringEmitDeclaration.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithStringEmitDeclaration.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithStringEmitDeclaration.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithStringEmitDeclaration.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithStringEmitDeclaration.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== enumConstantMemberWithStringEmitDeclaration.ts (6 errors) ==== -+ enum T1 { -+ a = "1", -+ b = "1" + "2", -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ c = "1" + "2" + "3" -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ -+ enum T2 { -+ a = "1", -+ b = "1" + "2" -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ -+ enum T3 { -+ a = "1", -+ b = "1" + "2" -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ -+ enum T4 { -+ a = "1" -+ } -+ -+ enum T5 { -+ a = "1" + "2" -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ -+ declare enum T6 { -+ a = "1", -+ b = "1" + "2" -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithTemplateLiterals.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithTemplateLiterals.d.ts.diff deleted file mode 100644 index 6d55b8284d65c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMemberWithTemplateLiterals.d.ts.diff +++ /dev/null @@ -1,104 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/enums/enumConstantMemberWithTemplateLiterals.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -39,13 +39,26 @@ - c = "21" - } - - /// [Errors] //// - -+enumConstantMemberWithTemplateLiterals.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithTemplateLiterals.ts(17,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithTemplateLiterals.ts(18,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithTemplateLiterals.ts(19,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithTemplateLiterals.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithTemplateLiterals.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithTemplateLiterals.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithTemplateLiterals.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumConstantMemberWithTemplateLiterals.ts(28,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - enumConstantMemberWithTemplateLiterals.ts(28,15): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -+enumConstantMemberWithTemplateLiterals.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithTemplateLiterals.ts(31,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithTemplateLiterals.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithTemplateLiterals.ts(41,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMemberWithTemplateLiterals.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - --==== enumConstantMemberWithTemplateLiterals.ts (2 errors) ==== -+==== enumConstantMemberWithTemplateLiterals.ts (15 errors) ==== - enum T1 { - a = `1` - } - -@@ -56,40 +69,66 @@ - } - - enum T3 { - a = `1` + `1` -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - enum T4 { - a = `1`, - b = `1` + `1`, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = `1` + "2", -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - d = "2" + `1`, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - e = "2" + `1` + `1` -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - enum T5 { - a = `1`, - b = `1` + `2`, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = `1` + `2` + `3`, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - d = 1, - e = `1` - `1`, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ - !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~~~ - !!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - f = `1` + 1, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - g = `1${"2"}3`, - h = `1`.length -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - enum T6 { - a = 1, - b = `12`.length -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - declare enum T7 { - a = `1`, - b = `1` + `1`, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = "2" + `1` -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMembers.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMembers.d.ts.diff deleted file mode 100644 index 952a9cf5392c7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumConstantMembers.d.ts.diff +++ /dev/null @@ -1,129 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/enums/enumConstantMembers.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -22,33 +22,47 @@ - a = Infinity, - b = Infinity, - c = Infinity, - d = NaN, -- e = NaN, -- f = Infinity, -- g = -Infinity -+ e, -+ f, -+ g - } - declare const enum E6 { - a = Infinity, - b = Infinity, - c = Infinity, - d = NaN, -- e = NaN, -- f = Infinity, -- g = -Infinity -+ e, -+ f, -+ g - } - - /// [Errors] //// - -+enumConstantMembers.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMembers.ts(23,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMembers.ts(24,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMembers.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMembers.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMembers.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMembers.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMembers.ts(32,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumConstantMembers.ts(32,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -+enumConstantMembers.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumConstantMembers.ts(33,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -+enumConstantMembers.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumConstantMembers.ts(34,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -+enumConstantMembers.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumConstantMembers.ts(35,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. -+enumConstantMembers.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumConstantMembers.ts(36,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. -+enumConstantMembers.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumConstantMembers.ts(37,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -+enumConstantMembers.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumConstantMembers.ts(38,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - - --==== enumConstantMembers.ts (7 errors) ==== -+==== enumConstantMembers.ts (21 errors) ==== - // Constant members allow negatives, but not decimals. Also hex literals are allowed - enum E1 { - a = 1, - b -@@ -69,36 +83,64 @@ - } - - enum E5 { - a = 1 / 0, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - b = 2 / 0.0, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = 1.0 / 0.0, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - d = 0.0 / 0.0, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - e = NaN, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - f = Infinity, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - g = -Infinity -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - const enum E6 { - a = 1 / 0, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ - !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - b = 2 / 0.0, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~ - !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - c = 1.0 / 0.0, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~ - !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - d = 0.0 / 0.0, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~ - !!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - e = NaN, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ - !!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - f = Infinity, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~ - !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - g = -Infinity -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~ - !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - } - -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumErrorOnConstantBindingWithInitializer.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumErrorOnConstantBindingWithInitializer.d.ts.diff deleted file mode 100644 index 9619e3369185f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumErrorOnConstantBindingWithInitializer.d.ts.diff +++ /dev/null @@ -1,35 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/enums/enumErrorOnConstantBindingWithInitializer.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -13,13 +13,14 @@ - - /// [Errors] //// - - enumErrorOnConstantBindingWithInitializer.ts(7,7): error TS2322: Type 'string | number | undefined' is not assignable to type 'string | number'. - Type 'undefined' is not assignable to type 'string | number'. -+enumErrorOnConstantBindingWithInitializer.ts(10,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumErrorOnConstantBindingWithInitializer.ts(10,10): error TS18033: Type 'string | number' is not assignable to type 'number' as required for computed enum member values. - Type 'string' is not assignable to type 'number'. - - --==== enumErrorOnConstantBindingWithInitializer.ts (2 errors) ==== -+==== enumErrorOnConstantBindingWithInitializer.ts (3 errors) ==== - type Thing = { - value?: string | number; - }; - -@@ -31,8 +32,10 @@ - !!! error TS2322: Type 'undefined' is not assignable to type 'string | number'. - - enum E { - test = value, -+ ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ - !!! error TS18033: Type 'string | number' is not assignable to type 'number' as required for computed enum member values. - !!! error TS18033: Type 'string' is not assignable to type 'number'. - } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumErrors.d.ts.diff deleted file mode 100644 index ee6b67377f54e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumErrors.d.ts.diff +++ /dev/null @@ -1,148 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/enums/enumErrors.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -16,10 +16,10 @@ - A = 0, - B = 0 - } - declare enum E10 { -- A = 0, -- B = 0 -+ A, -+ B - } - declare enum E11 { - A, - B, -@@ -58,18 +58,31 @@ - enumErrors.ts(2,6): error TS2431: Enum name cannot be 'any'. - enumErrors.ts(3,6): error TS2431: Enum name cannot be 'number'. - enumErrors.ts(4,6): error TS2431: Enum name cannot be 'string'. - enumErrors.ts(5,6): error TS2431: Enum name cannot be 'boolean'. -+enumErrors.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumErrors.ts(9,9): error TS18033: Type 'Number' is not assignable to type 'number' as required for computed enum member values. - 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. -+enumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumErrors.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumErrors.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumErrors.ts(26,9): error TS18033: Type 'boolean' is not assignable to type 'number' as required for computed enum member values. -+enumErrors.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumErrors.ts(27,9): error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. -+enumErrors.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumErrors.ts(28,9): error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. -+enumErrors.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumErrors.ts(29,9): error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. -+enumErrors.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumErrors.ts(30,9): error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. -+enumErrors.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumErrors.ts(36,9): error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. -+enumErrors.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumErrors.ts(37,9): error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. -+enumErrors.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumErrors.ts(38,9): error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. -+enumErrors.ts(39,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumErrors.ts(40,9): error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. - enumErrors.ts(48,18): error TS1357: An enum member name must be followed by a ',', '=', or '}'. - enumErrors.ts(49,24): error TS1357: An enum member name must be followed by a ',', '=', or '}'. - enumErrors.ts(49,26): error TS2452: An enum member cannot have a numeric name. -@@ -81,9 +94,9 @@ - enumErrors.ts(53,30): error TS1357: An enum member name must be followed by a ',', '=', or '}'. - enumErrors.ts(53,33): error TS2452: An enum member cannot have a numeric name. - - --==== enumErrors.ts (24 errors) ==== -+==== enumErrors.ts (37 errors) ==== - // Enum named with PredefinedTypes - enum any { } - ~~~ - !!! error TS2431: Enum name cannot be 'any'. -@@ -99,58 +112,84 @@ - - // Enum with computed member initializer of type Number - enum E5 { - C = new Number(30) -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~ - !!! error TS18033: Type 'Number' is not assignable to type 'number' as required for computed enum member values. - !!! error TS18033: 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. - } - - enum E9 { - A, - B = A -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - //Enum with computed member intializer of different enum type - // Bug 707850: This should be allowed - enum E10 { - A = E9.A, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - B = E9.B -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - // Enum with computed member intializer of other types - enum E11 { - A = true, - ~~~~ - !!! error TS18033: Type 'boolean' is not assignable to type 'number' as required for computed enum member values. - B = new Date(), -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~ - !!! error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. - C = window, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ - !!! error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. - D = {}, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ - !!! error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. - E = (() => 'foo')(), -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~~ - !!! error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. - } - - // Enum with string valued member and computed member initializers - enum E12 { - A = '', - B = new Date(), -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~ - !!! error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. - C = window, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ - !!! error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. - D = {}, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ - !!! error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. - E = 1 + 1, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - F = (() => 'foo')(), -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~~ - !!! error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. - } - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumExportMergingES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumExportMergingES6.d.ts.diff deleted file mode 100644 index 756cc34aca33a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumExportMergingES6.d.ts.diff +++ /dev/null @@ -1,35 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/enums/enumExportMergingES6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -7,6 +7,24 @@ - export declare enum Animals { - Dog = 2 - } - export declare enum Animals { -- CatDog = 3 -+ CatDog - } -+ - /// [Errors] //// -+ -+enumExportMergingES6.ts(8,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== enumExportMergingES6.ts (1 errors) ==== -+ export enum Animals { -+ Cat = 1 -+ } -+ export enum Animals { -+ Dog = 2 -+ } -+ export enum Animals { -+ CatDog = Cat | Dog -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumLiteralAssignableToEnumInsideUnion.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumLiteralAssignableToEnumInsideUnion.d.ts.diff deleted file mode 100644 index fa423fd31589d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumLiteralAssignableToEnumInsideUnion.d.ts.diff +++ /dev/null @@ -1,54 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -32,16 +32,20 @@ - declare const e4: X.Foo.A | boolean; - declare const e5: Ka.Foo | boolean; - - /// [Errors] //// - -+enumLiteralAssignableToEnumInsideUnion.ts(13,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumLiteralAssignableToEnumInsideUnion.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumLiteralAssignableToEnumInsideUnion.ts(19,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumLiteralAssignableToEnumInsideUnion.ts(20,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumLiteralAssignableToEnumInsideUnion.ts(24,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. - enumLiteralAssignableToEnumInsideUnion.ts(25,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. - enumLiteralAssignableToEnumInsideUnion.ts(26,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo.B'. - enumLiteralAssignableToEnumInsideUnion.ts(27,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo.A'. - enumLiteralAssignableToEnumInsideUnion.ts(28,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. - - --==== enumLiteralAssignableToEnumInsideUnion.ts (5 errors) ==== -+==== enumLiteralAssignableToEnumInsideUnion.ts (9 errors) ==== - module X { - export enum Foo { - A, B - } -@@ -53,15 +57,23 @@ - } - module Z { - export enum Foo { - A = 1 << 1, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - B = 1 << 2, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - } - module Ka { - export enum Foo { - A = 1 << 10, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - B = 1 << 11, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - } - const e0: X.Foo | boolean = Y.Foo.A; // ok - const e1: X.Foo | boolean = Z.Foo.A; // not legal, Z is computed diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMerging.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMerging.d.ts.diff deleted file mode 100644 index ab505a17957e6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMerging.d.ts.diff +++ /dev/null @@ -1,103 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/enums/enumMerging.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -54,4 +54,93 @@ - Yellow = 1 - } - } - } -+ - /// [Errors] //// -+ -+enumMerging.ts(26,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumMerging.ts(26,27): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumMerging.ts(26,45): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumMerging.ts(30,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumMerging.ts(30,27): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumMerging.ts(30,45): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== enumMerging.ts (6 errors) ==== -+ // Enum with only constant members across 2 declarations with the same root module -+ // Enum with initializer in all declarations with constant members with the same root module -+ module M1 { -+ enum EImpl1 { -+ A, B, C -+ } -+ -+ enum EImpl1 { -+ D = 1, E, F -+ } -+ -+ export enum EConst1 { -+ A = 3, B = 2, C = 1 -+ } -+ -+ export enum EConst1 { -+ D = 7, E = 9, F = 8 -+ } -+ -+ var x = [EConst1.A, EConst1.B, EConst1.C, EConst1.D, EConst1.E, EConst1.F]; -+ } -+ -+ // Enum with only computed members across 2 declarations with the same root module -+ module M2 { -+ export enum EComp2 { -+ A = 'foo'.length, B = 'foo'.length, C = 'foo'.length -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ -+ export enum EComp2 { -+ D = 'foo'.length, E = 'foo'.length, F = 'foo'.length -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ -+ var x = [EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F]; -+ } -+ -+ // Enum with initializer in only one of two declarations with constant members with the same root module -+ module M3 { -+ enum EInit { -+ A, -+ B -+ } -+ -+ enum EInit { -+ C = 1, D, E -+ } -+ } -+ -+ // Enums with same name but different root module -+ module M4 { -+ export enum Color { Red, Green, Blue } -+ } -+ module M5 { -+ export enum Color { Red, Green, Blue } -+ } -+ -+ module M6.A { -+ export enum Color { Red, Green, Blue } -+ } -+ module M6 { -+ export module A { -+ export enum Color { Yellow = 1 } -+ } -+ var t = A.Color.Yellow; -+ t = A.Color.Red; -+ } -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMergingErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMergingErrors.d.ts.diff deleted file mode 100644 index 2556d8e0629b7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumMergingErrors.d.ts.diff +++ /dev/null @@ -1,47 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/enums/enumMergingErrors.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -65,28 +65,37 @@ - } - } - - /// [Errors] //// - -+enumMergingErrors.ts(8,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumMergingErrors.ts(9,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumMergingErrors.ts(15,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumMergingErrors.ts(26,22): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. - enumMergingErrors.ts(38,22): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. - - --==== enumMergingErrors.ts (2 errors) ==== -+==== enumMergingErrors.ts (5 errors) ==== - // Enum with constant, computed, constant members split across 3 declarations with the same root module - module M { - export enum E1 { A = 0 } - export enum E2 { C } - export enum E3 { A = 0 } - } - module M { - export enum E1 { B = 'foo'.length } -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - export enum E2 { B = 'foo'.length } -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - export enum E3 { C } - } - module M { - export enum E1 { C } - export enum E2 { A = 0 } - export enum E3 { B = 'foo'.length } -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - // Enum with no initializer in either declaration with constant members with the same root module - module M1 { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumNumbering1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumNumbering1.d.ts.diff deleted file mode 100644 index b8c83fc8e940b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumNumbering1.d.ts.diff +++ /dev/null @@ -1,30 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/enumNumbering1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -7,4 +7,20 @@ - C, - D = 10, - E = 11 - } -+ - /// [Errors] //// -+ -+enumNumbering1.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== enumNumbering1.ts (1 errors) ==== -+ enum Test { -+ A, -+ B, -+ C = Math.floor(Math.random() * 1000), -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ D = 10, -+ E // Error but shouldn't be -+ } -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumPropertyAccessBeforeInitalisation.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumPropertyAccessBeforeInitalisation.d.ts.diff deleted file mode 100644 index 19bc63da5a658..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumPropertyAccessBeforeInitalisation.d.ts.diff +++ /dev/null @@ -1,49 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/enumPropertyAccessBeforeInitalisation.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -8,26 +8,38 @@ - D - } - - /// [Errors] //// - -+enumPropertyAccessBeforeInitalisation.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumPropertyAccessBeforeInitalisation.ts(2,9): error TS2565: Property 'A' is used before being assigned. -+enumPropertyAccessBeforeInitalisation.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumPropertyAccessBeforeInitalisation.ts(3,9): error TS2565: Property 'B' is used before being assigned. -+enumPropertyAccessBeforeInitalisation.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumPropertyAccessBeforeInitalisation.ts(4,9): error TS2565: Property 'C' is used before being assigned. -+enumPropertyAccessBeforeInitalisation.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumPropertyAccessBeforeInitalisation.ts(5,13): error TS2565: Property 'D' is used before being assigned. - - --==== enumPropertyAccessBeforeInitalisation.ts (4 errors) ==== -+==== enumPropertyAccessBeforeInitalisation.ts (8 errors) ==== - enum E { - A = A, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS2565: Property 'A' is used before being assigned. - B = E.B, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ - !!! error TS2565: Property 'B' is used before being assigned. - C = E["C"], -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ - !!! error TS2565: Property 'C' is used before being assigned. - D = 1 + D -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS2565: Property 'D' is used before being assigned. - } - -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithComputedMember.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithComputedMember.d.ts.diff deleted file mode 100644 index ff1b9dd9ca0e0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithComputedMember.d.ts.diff +++ /dev/null @@ -1,31 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/enumWithComputedMember.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -7,15 +7,21 @@ - Z - } - - /// [Errors] //// - -+enumWithComputedMember.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumWithComputedMember.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumWithComputedMember.ts(4,5): error TS1061: Enum member must have initializer. - - --==== enumWithComputedMember.ts (1 errors) ==== -+==== enumWithComputedMember.ts (3 errors) ==== - enum A { - X = "".length, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Y = X, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Z - ~ - !!! error TS1061: Enum member must have initializer. - } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithExport.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithExport.d.ts.diff deleted file mode 100644 index 489a8e4fede24..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithExport.d.ts.diff +++ /dev/null @@ -1,30 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/enumWithExport.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -8,16 +8,19 @@ - z - } - - /// [Errors] //// - -+enumWithExport.ts(5,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumWithExport.ts(5,7): error TS2304: Cannot find name 'y'. - - --==== enumWithExport.ts (1 errors) ==== -+==== enumWithExport.ts (2 errors) ==== - namespace x { - export let y = 123 - } - enum x { - z = y -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS2304: Cannot find name 'y'. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithParenthesizedInitializer1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithParenthesizedInitializer1.d.ts.diff deleted file mode 100644 index dabf64f1d28b2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithParenthesizedInitializer1.d.ts.diff +++ /dev/null @@ -1,27 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/enumWithParenthesizedInitializer1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -5,13 +5,16 @@ - e = -3 - } - - /// [Errors] //// - -+enumWithParenthesizedInitializer1.ts(2,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumWithParenthesizedInitializer1.ts(3,1): error TS1005: ')' expected. - - --==== enumWithParenthesizedInitializer1.ts (1 errors) ==== -+==== enumWithParenthesizedInitializer1.ts (2 errors) ==== - enum E { - e = -(3 -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - ~ - !!! error TS1005: ')' expected. -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithoutInitializerAfterComputedMember.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithoutInitializerAfterComputedMember.d.ts.diff deleted file mode 100644 index fea6b6eacec28..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/enumWithoutInitializerAfterComputedMember.d.ts.diff +++ /dev/null @@ -1,27 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/enumWithoutInitializerAfterComputedMember.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -5,4 +5,17 @@ - a = 0, - b = 0, - c = 1 - } -+ - /// [Errors] //// -+ -+enumWithoutInitializerAfterComputedMember.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== enumWithoutInitializerAfterComputedMember.ts (1 errors) ==== -+ enum E { -+ a, -+ b = a, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ c -+ } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/equalityWithEnumTypes.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/equalityWithEnumTypes.d.ts.diff deleted file mode 100644 index 4db684f824cd9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/equalityWithEnumTypes.d.ts.diff +++ /dev/null @@ -1,41 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/types/typeRelationships/comparable/equalityWithEnumTypes.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -12,15 +12,17 @@ - declare function f1(v: E1): void; - declare function f2(v: E2): void; - - /// [Errors] //// - -+equalityWithEnumTypes.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+equalityWithEnumTypes.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - equalityWithEnumTypes.ts(14,9): error TS2367: This comparison appears to be unintentional because the types 'E1' and '0' have no overlap. - equalityWithEnumTypes.ts(23,9): error TS2367: This comparison appears to be unintentional because the types 'E1' and '3' have no overlap. - equalityWithEnumTypes.ts(29,9): error TS2367: This comparison appears to be unintentional because the types 'E2' and '0' have no overlap. - equalityWithEnumTypes.ts(38,9): error TS2367: This comparison appears to be unintentional because the types 'E2' and '3' have no overlap. - - --==== equalityWithEnumTypes.ts (4 errors) ==== -+==== equalityWithEnumTypes.ts (6 errors) ==== - // Literal enum type - enum E1 { - a = 1, - b = 2, -@@ -28,9 +30,13 @@ - - // Numeric enum type - enum E2 { - a = 1 << 0, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - b = 1 << 1 -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - function f1(v: E1): void { - if (v !== 0) { // Error diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exactSpellingSuggestion.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exactSpellingSuggestion.d.ts.diff deleted file mode 100644 index 42ecc59190527..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exactSpellingSuggestion.d.ts.diff +++ /dev/null @@ -1,37 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/exactSpellingSuggestion.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -7,18 +7,27 @@ - BIT_2 = 4 - } - - /// [Errors] //// - -+exactSpellingSuggestion.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+exactSpellingSuggestion.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+exactSpellingSuggestion.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - exactSpellingSuggestion.ts(9,4): error TS2551: Property 'bit_2' does not exist on type 'typeof U8'. Did you mean 'BIT_2'? - - --==== exactSpellingSuggestion.ts (1 errors) ==== -+==== exactSpellingSuggestion.ts (4 errors) ==== - // Fixes #16245 -- always suggest the exact match, even when - // other options are very close - enum U8 { - BIT_0 = 1 << 0, -+ ~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - BIT_1 = 1 << 1, -+ ~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - BIT_2 = 1 << 2 -+ ~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - U8.bit_2 - ~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesJSDocInTs.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesJSDocInTs.d.ts.diff deleted file mode 100644 index 82ed89c64021f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesJSDocInTs.d.ts.diff +++ /dev/null @@ -1,31 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/expandoFunctionContextualTypesJSDocInTs.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,7 +1,18 @@ - - - //// [expandoFunctionContextualTypesJSDocInTs.d.ts] - export declare function Foo(): void; --export declare namespace Foo { -- var bar: () => void; --} -+ - /// [Errors] //// -+ -+expandoFunctionContextualTypesJSDocInTs.ts(1,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+ -+ -+==== expandoFunctionContextualTypesJSDocInTs.ts (1 errors) ==== -+ export function Foo(): void { } -+ ~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+ -+ // This comment should have no effect; this is a TS file. -+ /** @type {never} */ -+ Foo.bar = () => { }; -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesNoValue.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesNoValue.d.ts.diff deleted file mode 100644 index 696aac12cb204..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionContextualTypesNoValue.d.ts.diff +++ /dev/null @@ -1,36 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/expandoFunctionContextualTypesNoValue.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,22 +1,22 @@ - - - //// [expandoFunctionContextualTypesNoValue.d.ts] - export declare function Foo(): void; --export declare namespace Foo { -- var bar: () => void; --} - - /// [Errors] //// - - expandoFunctionContextualTypesNoValue.ts(2,17): error TS2307: Cannot find module 'blah' or its corresponding type declarations. -+expandoFunctionContextualTypesNoValue.ts(4,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - - --==== expandoFunctionContextualTypesNoValue.ts (1 errors) ==== -+==== expandoFunctionContextualTypesNoValue.ts (2 errors) ==== - // GH #38532 - import Foo from "blah"; - ~~~~~~ - !!! error TS2307: Cannot find module 'blah' or its corresponding type declarations. - - export function Foo(): void { } -+ ~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - - Foo.bar = () => { }; - -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignDottedName.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignDottedName.d.ts.diff deleted file mode 100644 index 9223a69b41609..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignDottedName.d.ts.diff +++ /dev/null @@ -1,34 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/externalModules/exportAssignDottedName.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -3,7 +3,22 @@ - //// [foo1.d.ts] - export declare function x(): boolean; - - //// [foo2.d.ts] --import foo1 = require('./foo1'); --declare const _default: typeof foo1.x; -+declare const _default: invalid; - export = _default; -+ - /// [Errors] //// -+ -+foo2.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== foo2.ts (1 errors) ==== -+ import foo1 = require('./foo1'); -+ export = foo1.x; // Ok -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+==== foo1.ts (0 errors) ==== -+ export function x(): boolean{ -+ return true; -+ } -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignNonIdentifier.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignNonIdentifier.d.ts.diff deleted file mode 100644 index 9125e0c7032b0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignNonIdentifier.d.ts.diff +++ /dev/null @@ -1,75 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/externalModules/exportAssignNonIdentifier.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,8 @@ - - - //// [foo1.d.ts] --declare const _default: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"; -+declare const _default: invalid; - export = _default; - - //// [foo2.d.ts] - declare const _default: "sausages"; -@@ -21,26 +21,31 @@ - //// [foo5.d.ts] - export = undefined; - - //// [foo6.d.ts] --declare const _default: any; -+declare const _default: invalid; - export = _default; - - //// [foo7.d.ts] --declare const _default: DateConstructor | StringConstructor; -+declare const _default: invalid; - export = _default; - - //// [foo8.d.ts] - declare const _default: any; - export = _default; - - /// [Errors] //// - -+foo1.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+foo6.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - foo6.ts(1,14): error TS1109: Expression expected. -+foo7.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - --==== foo1.ts (0 errors) ==== -+==== foo1.ts (1 errors) ==== - var x = 10; - export = typeof x; // Ok -+ ~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - ==== foo2.ts (0 errors) ==== - export = "sausages"; // Ok - -@@ -52,15 +57,19 @@ - - ==== foo5.ts (0 errors) ==== - export = undefined; // Valid. undefined is an identifier in JavaScript/TypeScript - --==== foo6.ts (1 errors) ==== -+==== foo6.ts (2 errors) ==== - export = void; // Error, void operator requires an argument -+ ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1109: Expression expected. - --==== foo7.ts (0 errors) ==== -+==== foo7.ts (1 errors) ==== - export = Date || String; // Ok -+ ~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - ==== foo8.ts (0 errors) ==== - export = null; // Ok - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignmentWithoutIdentifier1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignmentWithoutIdentifier1.d.ts.diff deleted file mode 100644 index c420f639e46e7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignmentWithoutIdentifier1.d.ts.diff +++ /dev/null @@ -1,32 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/exportAssignmentWithoutIdentifier1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,5 +1,21 @@ - - - //// [exportAssignmentWithoutIdentifier1.d.ts] --declare const _default: any; -+declare const _default: invalid; - export = _default; -+ - /// [Errors] //// -+ -+exportAssignmentWithoutIdentifier1.ts(7,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== exportAssignmentWithoutIdentifier1.ts (1 errors) ==== -+ function Greeter() { -+ //... -+ } -+ Greeter.prototype.greet = function () { -+ //... -+ } -+ export = new Greeter(); -+ ~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty.d.ts.diff deleted file mode 100644 index 0271deb64e385..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty.d.ts.diff +++ /dev/null @@ -1,85 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/exportEqualsProperty.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,21 +1,64 @@ - - - //// [a.d.ts] --declare namespace A { -- class B { -- constructor(b: number); -- } -- namespace B { -- const b: number; -- } --} --declare const _default: typeof A.B; -+declare const _default: invalid; - export = _default; - - //// [b.d.ts] --declare const _default: number; -+declare const _default: invalid; - export = _default; - - //// [index.d.ts] --/// - export {}; -+ - /// [Errors] //// -+ -+a.ts(5,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+b.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+index.ts(1,22): error TS9010: Reference directives are not supported in isolated declaration mode. -+ -+ -+==== index.ts (1 errors) ==== -+ /// -+ ~~~~~~~~~~~~~~~~~ -+!!! error TS9010: Reference directives are not supported in isolated declaration mode. -+ import { X } from "foobar"; -+ import X2 = require("foobarx"); -+ const x: X = X; -+ const x2: X2 = X2; -+ -+ import B = require("./a"); -+ const b: B = new B(B.b); -+ -+ import fooLength = require("./b"); -+ fooLength + 1; -+ -+==== declarations.d.ts (0 errors) ==== -+ // This test is just like exportDefaultProperty, but with `export =`. -+ -+ declare namespace foo.bar { -+ export type X = number; -+ export const X: number; -+ } -+ -+ declare module "foobar" { -+ export = foo.bar; -+ } -+ -+ declare module "foobarx" { -+ export = foo.bar.X; -+ } -+ -+==== a.ts (1 errors) ==== -+ namespace A { -+ export class B { constructor(b: number) {} } -+ export namespace B { export const b: number = 0; } -+ } -+ export = A.B; -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+==== b.ts (1 errors) ==== -+ export = "foo".length; -+ ~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty2.d.ts.diff deleted file mode 100644 index da9c5a780589b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportEqualsProperty2.d.ts.diff +++ /dev/null @@ -1,42 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/exportEqualsProperty2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,31 @@ - - - //// [a.d.ts] --declare const _default: number; -+declare const _default: invalid; - export = _default; - - //// [b.d.ts] - export {}; -+ - /// [Errors] //// -+ -+a.ts(10,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== b.ts (0 errors) ==== -+ import B = require("./a"); -+ const x: B = { c: B }; -+ -+==== a.ts (1 errors) ==== -+ // This test is just like exportDefaultProperty2, but with `export =`. -+ -+ class C { -+ static B: number; -+ } -+ namespace C { -+ export interface B { c: number } -+ } -+ -+ export = C.B; -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/forwardRefInEnum.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/forwardRefInEnum.d.ts.diff deleted file mode 100644 index 0c118eaa0d986..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/forwardRefInEnum.d.ts.diff +++ /dev/null @@ -1,65 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/forwardRefInEnum.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,39 +1,51 @@ - - - //// [forwardRefInEnum.d.ts] - declare enum E1 { -- X = 0, -- X1 = 0, -- Y = 0, -- Y1 = 0 -+ X, -+ X1, -+ Y, -+ Y1 - } - declare enum E1 { - Z = 4 - } - - /// [Errors] //// - -+forwardRefInEnum.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -+forwardRefInEnum.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - forwardRefInEnum.ts(5,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -+forwardRefInEnum.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - forwardRefInEnum.ts(7,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -+forwardRefInEnum.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - forwardRefInEnum.ts(8,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - - --==== forwardRefInEnum.ts (4 errors) ==== -+==== forwardRefInEnum.ts (8 errors) ==== - enum E1 { - // illegal case - // forward reference to the element of the same enum - X = Y, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - X1 = E1["Y"], -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~ - !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - // forward reference to the element of the same enum - Y = E1.Z, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ - !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - Y1 = E1["Z"] -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~ - !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - } - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/functionImplementations.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/functionImplementations.d.ts.diff deleted file mode 100644 index 80be9e30842a2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/functionImplementations.d.ts.diff +++ /dev/null @@ -1,160 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/functions/functionImplementations.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -13,25 +13,25 @@ - declare function rec4(): number; - declare var n: number; - declare var n: number; - declare var n: number; --declare var n: number; -+declare var n: invalid; - declare var nu: any; --declare var nu: any; -+declare var nu: invalid; - declare var un: any; --declare var un: any; --declare var n: number; --declare var n: number; --declare var n: number; -+declare var un: invalid; -+declare var n: invalid; -+declare var n: invalid; -+declare var n: invalid; - declare class Base { - private m; - } - declare class Derived extends Base { - private q; - } - declare var b: Base; --declare var b: Base; --declare var a: any; -+declare var b: invalid; -+declare var a: invalid; - declare function thisFunc(): void; - declare function opt1(n?: number): void; - declare function opt2(n?: { - x: any; -@@ -52,14 +52,22 @@ - declare var f11: (x: number) => any; - declare var f12: (x: number) => any; - - /// [Errors] //// - -+functionImplementations.ts(40,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+functionImplementations.ts(46,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+functionImplementations.ts(52,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+functionImplementations.ts(57,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+functionImplementations.ts(62,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - functionImplementations.ts(67,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type '3 | 5'. -+functionImplementations.ts(67,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+functionImplementations.ts(80,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - functionImplementations.ts(85,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'Base'. -+functionImplementations.ts(85,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - functionImplementations.ts(90,1): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value. - - --==== functionImplementations.ts (3 errors) ==== -+==== functionImplementations.ts (11 errors) ==== - // FunctionExpression with no return type annotation and no return statement returns void - var v: void = function () { } (); - - // FunctionExpression f with no return type annotation and directly references f in its body returns any -@@ -98,41 +106,66 @@ - var n: number = rec4(); - - // FunctionExpression with no return type annotation and returns a number - var n = function (): number { -+ ~~~~~~~~~~~~~~~~~~~~~ - return 3; -+ ~~~~~~~~~~~~~ - } (); -+ ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - // FunctionExpression with no return type annotation and returns null - var nu = null; - var nu = function (): any { -+ ~~~~~~~~~~~~~~~~~~ - return null; -+ ~~~~~~~~~~~~~~~~ - } (); -+ ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - // FunctionExpression with no return type annotation and returns undefined - var un = undefined; - var un = function (): any { -+ ~~~~~~~~~~~~~~~~~~ - return undefined; -+ ~~~~~~~~~~~~~~~~~~~~~ - } (); -+ ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - // FunctionExpression with no return type annotation and returns a type parameter type - var n = function (x: T): T { -+ ~~~~~~~~~~~~~~~~~~~~~~~ - return x; -+ ~~~~~~~~~~~~~ - } (4); -+ ~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - // FunctionExpression with no return type annotation and returns a constrained type parameter type - var n = function (x: T): T { -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - return x; -+ ~~~~~~~~~~~~~ - } (4); -+ ~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - // FunctionExpression with no return type annotation with multiple return statements with identical types - var n = function (): 3 | 5 { - ~ - !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type '3 | 5'. - !!! related TS6203 functionImplementations.ts:35:5: 'n' was also declared here. -+ ~~~~~~~~~~~~~~~~~~~~ - return 3; -+ ~~~~~~~~~~~~~ - return 5; -+ ~~~~~~~~~~~~~ - }(); -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - // Otherwise, the inferred return type is the first of the types of the return statement expressions - // in the function body that is a supertype of each of the others, - // ignoring return statements with no expressions. -@@ -141,18 +174,26 @@ - class Base { private m; } - class Derived extends Base { private q; } - var b: Base; - var b = function (): Base { -+ ~~~~~~~~~~~~~~~~~~~ - return new Base(); return new Derived(); -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - } (); -+ ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - // FunctionExpression with no return type annotation with multiple return statements with one a recursive call - var a = function f(): Base { - ~ - !!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'Base'. - !!! related TS6203 functionImplementations.ts:5:5: 'a' was also declared here. -+ ~~~~~~~~~~~~~~~~~~~~ - return new Base(); return new Derived(); return f(); // ? -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - } (); -+ ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - // FunctionExpression with non -void return type annotation with a single throw statement - undefined === function (): number { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/initializersInAmbientEnums.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/initializersInAmbientEnums.d.ts.diff deleted file mode 100644 index 59c61a57a49a8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/initializersInAmbientEnums.d.ts.diff +++ /dev/null @@ -1,30 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/initializersInAmbientEnums.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -5,4 +5,20 @@ - a = 10, - b = 10, - e = 655360 - } -+ - /// [Errors] //// -+ -+initializersInAmbientEnums.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+initializersInAmbientEnums.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== initializersInAmbientEnums.ts (2 errors) ==== -+ declare enum E { -+ a = 10, -+ b = a, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ e = 10 << 2 * 8, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff deleted file mode 100644 index 730dfa53af1a4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff +++ /dev/null @@ -1,77 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/isolatedModulesGlobalNamespacesAndEnums.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -12,15 +12,15 @@ - declare const d = "d"; - - //// [enum2.d.ts] - declare enum Enum { -- D = "d", -- E = 0,// error -- Y = 1000000,// error -- Z = 0 -+ D, -+ E,// error -+ Y,// error -+ Z - } - declare enum Enum { -- F = 0 -+ F - } - - //// [module-namespaces.d.ts] - export declare namespace Instantiated { -@@ -38,10 +38,15 @@ - const x: number; - } - - /// [Errors] //// - -+enum2.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enum2.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enum2.ts(3,9): error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. -+enum2.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enum2.ts(4,9): error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. -+enum2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enum2.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - script-namespaces.ts(1,11): error TS1280: Namespaces are not allowed in global script files when 'isolatedModules' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement. - - - ==== script-namespaces.ts (1 errors) ==== -@@ -66,19 +71,29 @@ - enum Enum { A, B, C } - declare enum Enum { X = 1_000_000 } - const d = 'd'; - --==== enum2.ts (2 errors) ==== -+==== enum2.ts (7 errors) ==== - enum Enum { - D = d, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - E = A, // error -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. - Y = X, // error -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. - Z = Enum.A -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - declare enum Enum { - F = A -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsContainerMergeTsDeclaration.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsContainerMergeTsDeclaration.d.ts.diff deleted file mode 100644 index 3efa1e9a5d54f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsContainerMergeTsDeclaration.d.ts.diff +++ /dev/null @@ -1,40 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/salsa/jsContainerMergeTsDeclaration.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,13 +1,14 @@ - - - //// [b.d.ts] --declare var x: number; -+declare var x: invalid; - - /// [Errors] //// - - error TS6504: File 'a.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 -+b.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - - !!! error TS6504: File 'a.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? - !!! error TS6504: The file is in the program because: -@@ -16,9 +17,13 @@ - var /*1*/x = function foo() { - } - x.a = function bar() { - } --==== b.ts (0 errors) ==== -+==== b.ts (1 errors) ==== - var x = function (): number { -+ ~~~~~~~~~~~~~~~~~~~~~ - return 1; -+ ~~~~~~~~~~~~~ - }(); -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxComponentTypeErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxComponentTypeErrors.d.ts.diff deleted file mode 100644 index 759597615e32c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxComponentTypeErrors.d.ts.diff +++ /dev/null @@ -1,52 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/jsxComponentTypeErrors.tsx] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -13,11 +13,8 @@ - type?: T; - }): { - type: T | undefined; - }; --declare namespace FunctionComponent { -- var useThis: () => JSX.Element; --} - declare class ClassComponent { - type: string; - } - declare const MixedComponent: typeof FunctionComponent | typeof ClassComponent; -@@ -34,8 +31,9 @@ - declare const elem5: JSX.Element; - declare const elem6: JSX.Element; - - /// [Errors] //// - -+jsxComponentTypeErrors.tsx(10,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - jsxComponentTypeErrors.tsx(18,11): error TS2786: 'this' cannot be used as a JSX component. - Its return type '{ type: "foo" | undefined; }' is not a valid JSX element. - Types of property 'type' are incompatible. - Type '"foo" | undefined' is not assignable to type '"element"'. -@@ -63,9 +61,9 @@ - Its instance type 'MemberClassComponent' is not a valid JSX element. - Property 'type' is missing in type 'MemberClassComponent' but required in type 'ElementClass'. - - --==== jsxComponentTypeErrors.tsx (7 errors) ==== -+==== jsxComponentTypeErrors.tsx (8 errors) ==== - namespace JSX { - export interface Element { - type: 'element'; - } -@@ -74,8 +72,10 @@ - } - } - - function FunctionComponent({type}: {type?: T}): { -+ ~~~~~~~~~~~~~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - type: T | undefined; - } { - return { - type diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespace.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespace.d.ts.diff deleted file mode 100644 index 191700419fdfb..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespace.d.ts.diff +++ /dev/null @@ -1,122 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespace.tsx] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,4 +1,111 @@ - - - //// [/index.d.ts] --export declare const Comp: () => import("preact").JSXInternal.Element; -+export declare const Comp: invalid; -+ - /// [Errors] //// -+ -+/index.tsx(1,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== /node_modules/preact/index.d.ts (0 errors) ==== -+ type Defaultize = -+ // Distribute over unions -+ Props extends any // Make any properties included in Default optional -+ ? Partial>> & -+ // Include the remaining properties from Props -+ Pick> -+ : never; -+ export namespace JSXInternal { -+ interface HTMLAttributes { } -+ interface SVGAttributes { } -+ type LibraryManagedAttributes = Component extends { -+ defaultProps: infer Defaults; -+ } -+ ? Defaultize -+ : Props; -+ -+ interface IntrinsicAttributes { -+ key?: any; -+ } -+ -+ interface Element extends VNode { } -+ -+ interface ElementClass extends Component { } -+ -+ interface ElementAttributesProperty { -+ props: any; -+ } -+ -+ interface ElementChildrenAttribute { -+ children: any; -+ } -+ -+ interface IntrinsicElements { -+ div: HTMLAttributes; -+ } -+ } -+ export const Fragment: unique symbol; -+ export type ComponentType = {}; -+ export type ComponentChild = {}; -+ export type ComponentChildren = {}; -+ export type VNode = {}; -+ export type Attributes = {}; -+ export type Component = {}; -+==== /node_modules/preact/jsx-runtime/index.d.ts (0 errors) ==== -+ export { Fragment } from '..'; -+ import { -+ ComponentType, -+ ComponentChild, -+ ComponentChildren, -+ VNode, -+ Attributes -+ } from '..'; -+ import { JSXInternal } from '..'; -+ -+ export function jsx( -+ type: string, -+ props: JSXInternal.HTMLAttributes & -+ JSXInternal.SVGAttributes & -+ Record & { children?: ComponentChild }, -+ key?: string -+ ): VNode; -+ export function jsx

( -+ type: ComponentType

, -+ props: Attributes & P & { children?: ComponentChild }, -+ key?: string -+ ): VNode; -+ -+ -+ export function jsxs( -+ type: string, -+ props: JSXInternal.HTMLAttributes & -+ JSXInternal.SVGAttributes & -+ Record & { children?: ComponentChild[] }, -+ key?: string -+ ): VNode; -+ export function jsxs

( -+ type: ComponentType

, -+ props: Attributes & P & { children?: ComponentChild[] }, -+ key?: string -+ ): VNode; -+ -+ -+ export function jsxDEV( -+ type: string, -+ props: JSXInternal.HTMLAttributes & -+ JSXInternal.SVGAttributes & -+ Record & { children?: ComponentChildren }, -+ key?: string -+ ): VNode; -+ export function jsxDEV

( -+ type: ComponentType

, -+ props: Attributes & P & { children?: ComponentChildren }, -+ key?: string -+ ): VNode; -+ -+ export import JSX = JSXInternal; -+ -+==== /index.tsx (1 errors) ==== -+ export const Comp = () =>

; -+ ~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts.diff deleted file mode 100644 index 2edba0b26af1c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts.diff +++ /dev/null @@ -1,85 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne.tsx] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,4 +1,74 @@ - - - //// [/index.d.ts] --export declare const Comp: () => import("@emotion/react/jsx-runtime").JSX.Element; -+export declare const Comp: invalid; -+ - /// [Errors] //// -+ -+/index.tsx(1,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== /node_modules/react/index.d.ts (0 errors) ==== -+ export = React; -+ export as namespace React; -+ -+ declare namespace React {} -+ -+ declare global { -+ namespace JSX { -+ interface Element {} -+ interface ElementClass {} -+ interface ElementAttributesProperty {} -+ interface ElementChildrenAttribute {} -+ type LibraryManagedAttributes = {} -+ interface IntrinsicAttributes {} -+ interface IntrinsicClassAttributes {} -+ interface IntrinsicElements { -+ div: {} -+ } -+ } -+ } -+==== /node_modules/@emotion/react/jsx-runtime/index.d.ts (0 errors) ==== -+ export { EmotionJSX as JSX } from './jsx-namespace' -+ -+==== /node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts (0 errors) ==== -+ import 'react' -+ -+ type WithConditionalCSSProp

= 'className' extends keyof P -+ ? (P extends { className?: string } ? P & { css?: string } : P) -+ : P -+ -+ type ReactJSXElement = JSX.Element -+ type ReactJSXElementClass = JSX.ElementClass -+ type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty -+ type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute -+ type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes -+ type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes -+ type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes -+ type ReactJSXIntrinsicElements = JSX.IntrinsicElements -+ -+ export namespace EmotionJSX { -+ interface Element extends ReactJSXElement {} -+ interface ElementClass extends ReactJSXElementClass {} -+ interface ElementAttributesProperty -+ extends ReactJSXElementAttributesProperty {} -+ interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute {} -+ -+ type LibraryManagedAttributes = WithConditionalCSSProp

& -+ ReactJSXLibraryManagedAttributes -+ -+ interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes {} -+ interface IntrinsicClassAttributes -+ extends ReactJSXIntrinsicClassAttributes {} -+ -+ type IntrinsicElements = { -+ [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { -+ css?: string -+ } -+ } -+ } -+ -+==== /index.tsx (1 errors) ==== -+ export const Comp = () =>

; -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts.diff deleted file mode 100644 index 2edba0b26af1c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts.diff +++ /dev/null @@ -1,85 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne.tsx] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,4 +1,74 @@ - - - //// [/index.d.ts] --export declare const Comp: () => import("@emotion/react/jsx-runtime").JSX.Element; -+export declare const Comp: invalid; -+ - /// [Errors] //// -+ -+/index.tsx(1,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== /node_modules/react/index.d.ts (0 errors) ==== -+ export = React; -+ export as namespace React; -+ -+ declare namespace React {} -+ -+ declare global { -+ namespace JSX { -+ interface Element {} -+ interface ElementClass {} -+ interface ElementAttributesProperty {} -+ interface ElementChildrenAttribute {} -+ type LibraryManagedAttributes = {} -+ interface IntrinsicAttributes {} -+ interface IntrinsicClassAttributes {} -+ interface IntrinsicElements { -+ div: {} -+ } -+ } -+ } -+==== /node_modules/@emotion/react/jsx-runtime/index.d.ts (0 errors) ==== -+ export { EmotionJSX as JSX } from './jsx-namespace' -+ -+==== /node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts (0 errors) ==== -+ import 'react' -+ -+ type WithConditionalCSSProp

= 'className' extends keyof P -+ ? (P extends { className?: string } ? P & { css?: string } : P) -+ : P -+ -+ type ReactJSXElement = JSX.Element -+ type ReactJSXElementClass = JSX.ElementClass -+ type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty -+ type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute -+ type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes -+ type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes -+ type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes -+ type ReactJSXIntrinsicElements = JSX.IntrinsicElements -+ -+ export namespace EmotionJSX { -+ interface Element extends ReactJSXElement {} -+ interface ElementClass extends ReactJSXElementClass {} -+ interface ElementAttributesProperty -+ extends ReactJSXElementAttributesProperty {} -+ interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute {} -+ -+ type LibraryManagedAttributes = WithConditionalCSSProp

& -+ ReactJSXLibraryManagedAttributes -+ -+ interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes {} -+ interface IntrinsicClassAttributes -+ extends ReactJSXIntrinsicClassAttributes {} -+ -+ type IntrinsicElements = { -+ [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { -+ css?: string -+ } -+ } -+ } -+ -+==== /index.tsx (1 errors) ==== -+ export const Comp = () =>

; -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts.diff deleted file mode 100644 index 440455adc614b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts.diff +++ /dev/null @@ -1,86 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.tsx] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,4 +1,75 @@ - - - //// [/index.d.ts] --export declare const Comp: () => import("@emotion/react/jsx-runtime").JSX.Element; -+export declare const Comp: invalid; -+ - /// [Errors] //// -+ -+/index.tsx(2,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== /node_modules/react/index.d.ts (0 errors) ==== -+ export = React; -+ export as namespace React; -+ -+ declare namespace React { } -+ -+ declare global { -+ namespace JSX { -+ interface Element { } -+ interface ElementClass { } -+ interface ElementAttributesProperty { } -+ interface ElementChildrenAttribute { } -+ type LibraryManagedAttributes = {} -+ interface IntrinsicAttributes { } -+ interface IntrinsicClassAttributes { } -+ interface IntrinsicElements { -+ div: {} -+ } -+ } -+ } -+==== /node_modules/@emotion/react/jsx-runtime/index.d.ts (0 errors) ==== -+ export { EmotionJSX as JSX } from './jsx-namespace' -+ -+==== /node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts (0 errors) ==== -+ import 'react' -+ -+ type WithConditionalCSSProp

= 'className' extends keyof P -+ ? (P extends { className?: string } ? P & { css?: string } : P) -+ : P -+ -+ type ReactJSXElement = JSX.Element -+ type ReactJSXElementClass = JSX.ElementClass -+ type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty -+ type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute -+ type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes -+ type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes -+ type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes -+ type ReactJSXIntrinsicElements = JSX.IntrinsicElements -+ -+ export namespace EmotionJSX { -+ interface Element extends ReactJSXElement { } -+ interface ElementClass extends ReactJSXElementClass { } -+ interface ElementAttributesProperty -+ extends ReactJSXElementAttributesProperty { } -+ interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute { } -+ -+ type LibraryManagedAttributes = WithConditionalCSSProp

& -+ ReactJSXLibraryManagedAttributes -+ -+ interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes { } -+ interface IntrinsicClassAttributes -+ extends ReactJSXIntrinsicClassAttributes { } -+ -+ type IntrinsicElements = { -+ [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { -+ css?: string -+ } -+ } -+ } -+ -+==== /index.tsx (1 errors) ==== -+ /* @jsxImportSource @emotion/react */ -+ export const Comp = () =>

; -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedDeclarations2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedDeclarations2.d.ts.diff deleted file mode 100644 index a368036a2e74f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedDeclarations2.d.ts.diff +++ /dev/null @@ -1,38 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/mergedDeclarations2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,24 +4,27 @@ - declare enum Foo { - b = 0 - } - declare enum Foo { -- a = 0 -+ a - } - declare namespace Foo { - var x: any; - } - - /// [Errors] //// - -+mergedDeclarations2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - mergedDeclarations2.ts(9,25): error TS2304: Cannot find name 'b'. - - --==== mergedDeclarations2.ts (1 errors) ==== -+==== mergedDeclarations2.ts (2 errors) ==== - enum Foo { - b - } - enum Foo { - a = b -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - module Foo { - export var x: any = b diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedEnumDeclarationCodeGen.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedEnumDeclarationCodeGen.d.ts.diff deleted file mode 100644 index 7e1c6ff8d4950..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mergedEnumDeclarationCodeGen.d.ts.diff +++ /dev/null @@ -1,35 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/mergedEnumDeclarationCodeGen.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -5,6 +5,24 @@ - a = 0, - b = 0 - } - declare enum E { -- c = 0 -+ c - } -+ - /// [Errors] //// -+ -+mergedEnumDeclarationCodeGen.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+mergedEnumDeclarationCodeGen.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== mergedEnumDeclarationCodeGen.ts (2 errors) ==== -+ enum E { -+ a, -+ b = a -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ enum E { -+ c = a -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/methodContainingLocalFunction.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/methodContainingLocalFunction.d.ts.diff deleted file mode 100644 index a9570d1172516..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/methodContainingLocalFunction.d.ts.diff +++ /dev/null @@ -1,72 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/methodContainingLocalFunction.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -18,4 +18,62 @@ - } - declare enum E { - A - } -+ - /// [Errors] //// -+ -+methodContainingLocalFunction.ts(44,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== methodContainingLocalFunction.ts (1 errors) ==== -+ // The first case here (BugExhibition) caused a crash. Try with different permutations of features. -+ class BugExhibition { -+ public exhibitBug(): void { -+ function localFunction() { } -+ var x: { (): void; }; -+ x = localFunction; -+ } -+ } -+ -+ class BugExhibition2 { -+ private static get exhibitBug() { -+ function localFunction() { } -+ var x: { (): void; }; -+ x = localFunction; -+ return null; -+ } -+ } -+ -+ class BugExhibition3 { -+ public exhibitBug(): void { -+ function localGenericFunction(u?: U) { } -+ var x: { (): void; }; -+ x = localGenericFunction; -+ } -+ } -+ -+ class C { -+ exhibit(): void { -+ var funcExpr = (u?: U) => { }; -+ var x: { (): void; }; -+ x = funcExpr; -+ } -+ } -+ -+ module M { -+ export function exhibitBug(): void { -+ function localFunction() { } -+ var x: { (): void; }; -+ x = localFunction; -+ } -+ } -+ -+ enum E { -+ A = (() => { -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ function localFunction() { } -+ var x: { (): void; }; -+ x = localFunction; -+ return 0; -+ })() -+ } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mixedTypeEnumComparison.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mixedTypeEnumComparison.d.ts.diff deleted file mode 100644 index 5d1134e67a75a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/mixedTypeEnumComparison.d.ts.diff +++ /dev/null @@ -1,61 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/mixedTypeEnumComparison.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -15,4 +15,51 @@ - S1 = "foo", - N1 = 1000, - C1 - } -+ - /// [Errors] //// -+ -+mixedTypeEnumComparison.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== mixedTypeEnumComparison.ts (1 errors) ==== -+ const enum E { -+ S1 = "foo", -+ S2 = "bar", -+ -+ N1 = 1000, -+ N2 = 25, -+ } -+ -+ declare var someNumber: number -+ -+ if (someNumber > E.N2) { -+ someNumber = E.N2; -+ } -+ -+ declare const unionOfEnum: E.N1 | E.N2; -+ -+ if (someNumber > unionOfEnum) { -+ someNumber = E.N2; -+ } -+ -+ declare var someString: string -+ -+ if (someString > E.S1) { -+ someString = E.S2; -+ } -+ -+ -+ declare function someValue(): number; -+ -+ enum E2 { -+ S1 = "foo", -+ N1 = 1000, -+ C1 = someValue(), -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ -+ someString > E2.S1; -+ someNumber > E2.N1; -+ someNumber > E2.C1; -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationDisallowedExtensions.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationDisallowedExtensions.d.ts.diff deleted file mode 100644 index 2644ea8302f11..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationDisallowedExtensions.d.ts.diff +++ /dev/null @@ -1,66 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/moduleAugmentationDisallowedExtensions.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -19,9 +19,9 @@ - declare module "./observable" { - var x: number; - let y: number; - const z: number; -- let x1: number, y1: string, n: number, el1: number, el2: number, el3: number; -+ let x1: invalid, y1: invalid, n: invalid, el1: invalid, el2: invalid, el3: invalid; - interface A { - x: any; - } - namespace N { -@@ -43,8 +43,14 @@ - //// [x0.d.ts] - export declare let a: number; - - /// [Errors] //// - -+x.ts(9,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+x.ts(9,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+x.ts(9,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+x.ts(9,38): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+x.ts(9,43): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+x.ts(9,48): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - x.ts(17,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. - x.ts(17,26): error TS2307: Cannot find module './x0' or its corresponding type declarations. - x.ts(18,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. - x.ts(18,21): error TS2307: Cannot find module './x0' or its corresponding type declarations. -@@ -57,9 +63,9 @@ - - ==== x0.ts (0 errors) ==== - export let a = 1; - --==== x.ts (9 errors) ==== -+==== x.ts (15 errors) ==== - namespace N1 { - export let x = 1; - } - -@@ -67,8 +73,20 @@ - var x: number; - let y: number; - const z: number; - let {x1, y1, z0: {n}, z1: {arr: [el1, el2, el3]}}: {x1: number, y1: string, z0: {n: number}, z1: {arr: number[]} } -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - interface A { x } - namespace N { - export class C {} - } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationNoNewNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationNoNewNames.d.ts.diff deleted file mode 100644 index cb197f67e0d6c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleAugmentationNoNewNames.d.ts.diff +++ /dev/null @@ -1,60 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/moduleAugmentationNoNewNames.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -10,13 +10,49 @@ - } - class Bar { - } - let y: number, z: string; -- let x: number, x1: number; -+ let x: invalid, x1: invalid; - namespace Z { } - } - export {}; - - //// [observable.d.ts] - export declare class Observable { - filter(pred: (e: T) => boolean): Observable; - } -+ - /// [Errors] //// -+ -+map.ts(11,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+map.ts(11,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== map.ts (2 errors) ==== -+ import { Observable } from "./observable" -+ -+ (Observable.prototype).map = function() { } -+ -+ declare module "./observable" { -+ interface Observable { -+ map(proj: (e:T) => U): Observable -+ } -+ class Bar {} -+ let y: number, z: string; -+ let {a: x, b: x1}: {a: number, b: number}; -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ module Z {} -+ } -+ -+==== observable.ts (0 errors) ==== -+ export declare class Observable { -+ filter(pred: (e:T) => boolean): Observable; -+ } -+ -+==== main.ts (0 errors) ==== -+ import { Observable } from "./observable" -+ import "./map"; -+ -+ let x: Observable; -+ let y = x.map(x => x + 1); -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/negateOperatorInvalidOperations.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/negateOperatorInvalidOperations.d.ts.diff deleted file mode 100644 index a0635a520a962..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/negateOperatorInvalidOperations.d.ts.diff +++ /dev/null @@ -1,44 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,15 +1,16 @@ - - - //// [negateOperatorInvalidOperations.d.ts] --declare var NUMBER1: any; -+declare var NUMBER1: invalid; - declare var NUMBER: any; - declare var NUMBER2: number; - declare var NUMBER3: number; - declare var NUMBER4: number; --declare var NUMBER: any; -+declare var NUMBER: number; - - /// [Errors] //// - -+negateOperatorInvalidOperations.ts(4,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - negateOperatorInvalidOperations.ts(4,15): error TS1109: Expression expected. - negateOperatorInvalidOperations.ts(4,30): error TS1005: ',' expected. - negateOperatorInvalidOperations.ts(4,31): error TS1109: Expression expected. - negateOperatorInvalidOperations.ts(7,17): error TS18050: The value 'null' cannot be used here. -@@ -21,13 +22,15 @@ - negateOperatorInvalidOperations.ts(12,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'NUMBER' must be of type 'any', but here has type 'number'. - negateOperatorInvalidOperations.ts(12,14): error TS1109: Expression expected. - - --==== negateOperatorInvalidOperations.ts (11 errors) ==== -+==== negateOperatorInvalidOperations.ts (12 errors) ==== - // Unary operator - - - // operand before - - var NUMBER1 = var NUMBER: any-; //expect error -+ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ - !!! error TS1109: Expression expected. - ~ - !!! error TS1005: ',' expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/newTargetNarrowing.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/newTargetNarrowing.d.ts.diff deleted file mode 100644 index ec8b63702166c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/newTargetNarrowing.d.ts.diff +++ /dev/null @@ -1,35 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es6/newTarget/newTargetNarrowing.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,7 +2,22 @@ - - //// [newTargetNarrowing.d.ts] - declare function foo(x: true): void; - declare function f(): void; --declare namespace f { -- var marked: boolean; --} -+ - /// [Errors] //// -+ -+newTargetNarrowing.ts(3,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+ -+ -+==== newTargetNarrowing.ts (1 errors) ==== -+ function foo(x: true): void { } -+ -+ function f(): void { -+ ~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+ if (new.target.marked === true) { -+ foo(new.target.marked); -+ } -+ } -+ -+ f.marked = true; -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/noImplicitAnyDestructuringVarDeclaration.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/noImplicitAnyDestructuringVarDeclaration.d.ts.diff deleted file mode 100644 index 531e005677f53..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/noImplicitAnyDestructuringVarDeclaration.d.ts.diff +++ /dev/null @@ -1,99 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,11 +1,11 @@ - - - //// [noImplicitAnyDestructuringVarDeclaration.d.ts] --declare var a: any, b: any, c: any, d: any; --declare var a1: any, b1: any, c1: any, d1: any; --declare var a2: any, b2: any, c2: any, d2: any; --declare var b3: any, c3: { -+declare var a: invalid, b: invalid, c: any, d: any; -+declare var a1: invalid, b1: invalid, c1: any, d1: any; -+declare var a2: invalid, b2: invalid, c2: any, d2: any; -+declare var b3: invalid, c3: { - b3: any; - }; - declare const dest: any[]; - declare const a4: any; -@@ -20,52 +20,73 @@ - - /// [Errors] //// - - noImplicitAnyDestructuringVarDeclaration.ts(1,5): error TS1182: A destructuring declaration must have an initializer. - noImplicitAnyDestructuringVarDeclaration.ts(1,6): error TS7031: Binding element 'a' implicitly has an 'any' type. -+noImplicitAnyDestructuringVarDeclaration.ts(1,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - noImplicitAnyDestructuringVarDeclaration.ts(1,10): error TS1182: A destructuring declaration must have an initializer. - noImplicitAnyDestructuringVarDeclaration.ts(1,11): error TS7031: Binding element 'b' implicitly has an 'any' type. -+noImplicitAnyDestructuringVarDeclaration.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - noImplicitAnyDestructuringVarDeclaration.ts(3,5): error TS1182: A destructuring declaration must have an initializer. - noImplicitAnyDestructuringVarDeclaration.ts(3,6): error TS7031: Binding element 'a1' implicitly has an 'any' type. -+noImplicitAnyDestructuringVarDeclaration.ts(3,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - noImplicitAnyDestructuringVarDeclaration.ts(3,23): error TS1182: A destructuring declaration must have an initializer. - noImplicitAnyDestructuringVarDeclaration.ts(3,24): error TS7031: Binding element 'b1' implicitly has an 'any' type. -+noImplicitAnyDestructuringVarDeclaration.ts(3,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - noImplicitAnyDestructuringVarDeclaration.ts(5,5): error TS1182: A destructuring declaration must have an initializer. -+noImplicitAnyDestructuringVarDeclaration.ts(5,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - noImplicitAnyDestructuringVarDeclaration.ts(5,18): error TS1182: A destructuring declaration must have an initializer. -+noImplicitAnyDestructuringVarDeclaration.ts(5,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - noImplicitAnyDestructuringVarDeclaration.ts(7,5): error TS1182: A destructuring declaration must have an initializer. -+noImplicitAnyDestructuringVarDeclaration.ts(7,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - noImplicitAnyDestructuringVarDeclaration.ts(7,13): error TS7008: Member 'b3' implicitly has an 'any' type. - noImplicitAnyDestructuringVarDeclaration.ts(7,25): error TS7008: Member 'b3' implicitly has an 'any' type. - noImplicitAnyDestructuringVarDeclaration.ts(11,18): error TS7018: Object literal's property 'b4' implicitly has an 'any' type. - - --==== noImplicitAnyDestructuringVarDeclaration.ts (14 errors) ==== -+==== noImplicitAnyDestructuringVarDeclaration.ts (21 errors) ==== - var [a], {b}, c: any, d: any; // error - ~~~ - !!! error TS1182: A destructuring declaration must have an initializer. - ~ - !!! error TS7031: Binding element 'a' implicitly has an 'any' type. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ - !!! error TS1182: A destructuring declaration must have an initializer. - ~ - !!! error TS7031: Binding element 'b' implicitly has an 'any' type. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - var [a1 = undefined], {b1 = null}, c1 = undefined, d1 = null; // error - ~~~~~~~~~~~~~~~~ - !!! error TS1182: A destructuring declaration must have an initializer. - ~~ - !!! error TS7031: Binding element 'a1' implicitly has an 'any' type. -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~ - !!! error TS1182: A destructuring declaration must have an initializer. - ~~ - !!! error TS7031: Binding element 'b1' implicitly has an 'any' type. -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - var [a2]: [any], {b2}: { b2: any }, c2: any, d2: any; - ~~~~ - !!! error TS1182: A destructuring declaration must have an initializer. -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ - !!! error TS1182: A destructuring declaration must have an initializer. -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - var {b3}: { b3 }, c3: { b3 }; // error in type instead - ~~~~ - !!! error TS1182: A destructuring declaration must have an initializer. -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ - !!! error TS7008: Member 'b3' implicitly has an 'any' type. - ~~ - !!! error TS7008: Member 'b3' implicitly has an 'any' type. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/objectLiteralGettersAndSetters.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/objectLiteralGettersAndSetters.d.ts.diff deleted file mode 100644 index befea4474f8c9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/objectLiteralGettersAndSetters.d.ts.diff +++ /dev/null @@ -1,179 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -37,21 +37,21 @@ - declare var callSig3: { - num: (n: number) => string; - }; - declare var getter1: { -- readonly x: string; -+ x: string; - }; - declare var getter1: { - readonly x: string; - }; - declare var getter2: { -- readonly x: string; -+ x: string; - }; - declare var getter2: { - readonly x: string; - }; - declare var setter1: { -- x: number; -+ readonly x: number; - }; - declare var setter1: { - x: number; - }; -@@ -73,20 +73,137 @@ - }; - declare var sameType4: { - x: Date; - }; --declare var setParamType1: { -- get n(): (t: string) => void; -- set n(x: (t: string) => void); --}; -+declare var setParamType1: invalid; - declare var setParamType2: { - n: (t: string) => void; - }; --declare var getParamType1: { -- n: string; --}; -+declare var getParamType1: invalid; - declare var getParamType2: { - n: string; - }; - declare var getParamType3: { - n: string; - }; -+ - /// [Errors] //// -+ -+objectLiteralGettersAndSetters.ts(65,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+objectLiteralGettersAndSetters.ts(88,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== objectLiteralGettersAndSetters.ts (2 errors) ==== -+ // Get and set accessor with the same name -+ var sameName1a: { -+ a: string; -+ } = { get 'a'(): string { return ''; }, set a(n) { var p = n; var p: string; } }; -+ var sameName2a: { -+ 0: string; -+ } = { get 0.0(): string { return ''; }, set 0(n) { var p = n; var p: string; } }; -+ var sameName3a: { -+ 32: string; -+ } = { get 0x20(): string { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; -+ var sameName4a: { -+ "": string; -+ } = { get ''(): string { return ''; }, set ""(n) { var p = n; var p: string; } }; -+ var sameName5a: { -+ '\t': string; -+ } = { get '\t'(): string { return ''; }, set '\t'(n) { var p = n; var p: string; } }; -+ var sameName6a: { -+ a: string; -+ } = { get 'a'(): string { return ''; }, set a(n) { var p = n; var p: string; } }; -+ -+ // PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} -+ var callSig1 = { num(n: number): string { return '' } }; -+ var callSig1: { num: (n: number) => string; }; -+ var callSig2 = { num: function (n: number): string { return '' } }; -+ var callSig2: { num: (n: number) => string; }; -+ var callSig3 = { num: (n: number): string => '' }; -+ var callSig3: { num: (n: number) => string; }; -+ -+ // Get accessor only, type of the property is the annotated return type of the get accessor -+ var getter1 = { get x(): string { return undefined; } }; -+ var getter1: { readonly x: string; } -+ -+ // Get accessor only, type of the property is the inferred return type of the get accessor -+ var getter2 = { get x(): string { return ''; } }; -+ var getter2: { readonly x: string; } -+ -+ // Set accessor only, type of the property is the param type of the set accessor -+ var setter1 = { set x(n: number) { } }; -+ var setter1: { x: number }; -+ -+ // Set accessor only, type of the property is Any for an unannotated set accessor -+ var setter2: { -+ x: any; -+ } = { set x(n) { } }; -+ var setter2: { x: any }; -+ -+ var anyVar: any; -+ // Get and set accessor with matching type annotations -+ var sameType1: { -+ x: string; -+ } = { get x(): string { return undefined; }, set x(n: string) { } }; -+ var sameType2: { -+ x: number[]; -+ } = { get x(): Array { return undefined; }, set x(n: number[]) { } }; -+ var sameType3: { -+ x: any; -+ } = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; -+ var sameType4: { -+ x: Date; -+ } = { get x(): Date { return undefined; }, set x(n: Date) { } }; -+ -+ // Type of unannotated get accessor return type is the type annotation of the set accessor param -+ var setParamType1 = { -+ set n(x: (t: string) => void) { }, -+ get n(): (t: string) => void { return (t) => { -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ var p: string; -+ var p = t; -+ } -+ } -+ }; -+ var setParamType2: { -+ n: (t: string) => void; -+ } = { -+ get n() { return (t) => { -+ var p: string; -+ var p = t; -+ } -+ }, -+ set n(x: (t: string) => void) { } -+ }; -+ -+ // Type of unannotated set accessor parameter is the return type annotation of the get accessor -+ var getParamType1 = { -+ set n(x) { -+ var y = x; -+ var y: string; -+ }, -+ get n(): string { return ''; } -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ }; -+ var getParamType2: { -+ n: string; -+ } = { -+ get n(): string { return ''; }, -+ set n(x) { -+ var y = x; -+ var y: string; -+ } -+ }; -+ -+ // Type of unannotated accessors is the inferred return type of the get accessor -+ var getParamType3: { -+ n: string; -+ } = { -+ get n(): string { return ''; }, -+ set n(x) { -+ var y = x; -+ var y: string; -+ } -+ }; -+ -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/overloadingStaticFunctionsInFunctions.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/overloadingStaticFunctionsInFunctions.d.ts.diff deleted file mode 100644 index 4a383b4c33e6c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/overloadingStaticFunctionsInFunctions.d.ts.diff +++ /dev/null @@ -1,35 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,10 +1,11 @@ - - - //// [overloadingStaticFunctionsInFunctions.d.ts] --declare function boo(): void; -+declare function boo(): invalid; - - /// [Errors] //// - -+overloadingStaticFunctionsInFunctions.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - overloadingStaticFunctionsInFunctions.ts(1,14): error TS1005: '(' expected. - overloadingStaticFunctionsInFunctions.ts(2,3): error TS1128: Declaration or statement expected. - overloadingStaticFunctionsInFunctions.ts(2,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - overloadingStaticFunctionsInFunctions.ts(3,3): error TS1128: Declaration or statement expected. -@@ -19,10 +20,12 @@ - overloadingStaticFunctionsInFunctions.ts(4,21): error TS2693: 'any' only refers to a type, but is being used as a value here. - overloadingStaticFunctionsInFunctions.ts(4,25): error TS1005: ';' expected. - - --==== overloadingStaticFunctionsInFunctions.ts (14 errors) ==== -+==== overloadingStaticFunctionsInFunctions.ts (15 errors) ==== - function boo { -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1005: '(' expected. - static test() - ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.classMethods.es2018.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.classMethods.es2018.d.ts.diff deleted file mode 100644 index 83fe6d38f0249..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.classMethods.es2018.d.ts.diff +++ /dev/null @@ -1,94 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.classMethods.es2018.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,21 +1,21 @@ - - - //// [asyncGeneratorGetAccessorIsError.d.ts] - declare class C23 { -- get(): any; -+ get(): invalid; - x(): number; - } - - //// [asyncGeneratorPropertyIsError.d.ts] - declare class C25 { -- x(): any; -+ x(): invalid; - 1: any; - } - - //// [asyncGeneratorSetAccessorIsError.d.ts] - declare class C24 { -- set(): any; -+ set(): invalid; - x(value: number): void; - } - - //// [awaitAsTypeIsOk.d.ts] -@@ -88,8 +88,9 @@ - } - - //// [yieldInClassComputedPropertyIsError.d.ts] - declare class C21 { -+ [yield](): AsyncGenerator; - } - - //// [yieldInNestedComputedPropertyIsOk.d.ts] - declare class C22 { -@@ -131,10 +132,13 @@ - f(): AsyncGenerator; - } - - /// [Errors] //// - -+asyncGeneratorGetAccessorIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. -+asyncGeneratorPropertyIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - asyncGeneratorPropertyIsError.ts(2,15): error TS1005: '(' expected. -+asyncGeneratorSetAccessorIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected. - awaitInParameterInitializerIsError.ts(2,27): error TS2524: 'await' expressions cannot be used in a parameter initializer. - awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected. - awaitParameterIsError.ts(2,15): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -@@ -312,26 +316,32 @@ - ~~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } - } --==== asyncGeneratorGetAccessorIsError.ts (1 errors) ==== -+==== asyncGeneratorGetAccessorIsError.ts (2 errors) ==== - class C23 { - async * get x(): number { -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1005: '(' expected. - return 1; - } - } --==== asyncGeneratorSetAccessorIsError.ts (1 errors) ==== -+==== asyncGeneratorSetAccessorIsError.ts (2 errors) ==== - class C24 { - async * set x(value: number): void { -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1005: '(' expected. - } - } --==== asyncGeneratorPropertyIsError.ts (1 errors) ==== -+==== asyncGeneratorPropertyIsError.ts (2 errors) ==== - class C25 { - async * x = 1: any; -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1005: '(' expected. - } - -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts.diff deleted file mode 100644 index baf99e3991e59..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts.diff +++ /dev/null @@ -1,72 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.es2018.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,22 +1,16 @@ - - - //// [asyncGeneratorGetAccessorIsError.d.ts] --declare const o22: { -- get(): any; -- x(): number; --}; -+declare const o22: invalid; - - //// [asyncGeneratorPropertyIsError.d.ts] - declare const o24: { - x(): 1; - }; - - //// [asyncGeneratorSetAccessorIsError.d.ts] --declare const o23: { -- set(): any; -- x(value: number): void; --}; -+declare const o23: invalid; - - //// [awaitAsTypeIsOk.d.ts] - interface await { - } -@@ -126,10 +120,12 @@ - f(): AsyncGenerator; - }; - - /// [Errors] //// - -+asyncGeneratorGetAccessorIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. - asyncGeneratorPropertyIsError.ts(2,14): error TS1005: '(' expected. -+asyncGeneratorSetAccessorIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected. - awaitInParameterInitializerIsError.ts(2,27): error TS2524: 'await' expressions cannot be used in a parameter initializer. - awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected. - awaitParameterIsError.ts(2,15): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -@@ -293,19 +289,23 @@ - ~~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } - }; --==== asyncGeneratorGetAccessorIsError.ts (1 errors) ==== -+==== asyncGeneratorGetAccessorIsError.ts (2 errors) ==== - const o22 = { - async * get x(): number { -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1005: '(' expected. - return 1; - } - }; --==== asyncGeneratorSetAccessorIsError.ts (1 errors) ==== -+==== asyncGeneratorSetAccessorIsError.ts (2 errors) ==== - const o23 = { - async * set x(value: number): void { -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1005: '(' expected. - } - }; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum1.d.ts.diff deleted file mode 100644 index c8b70c8db24e4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum1.d.ts.diff +++ /dev/null @@ -1,31 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -6,4 +6,21 @@ - IsIndexer = 1, - IsStringIndexer = 2, - IsNumberIndexer = 4 - } -+ - /// [Errors] //// -+ -+parserEnum1.ts(4,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserEnum1.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== parserEnum1.ts (2 errors) ==== -+ export enum SignatureFlags { -+ None = 0, -+ IsIndexer = 1, -+ IsStringIndexer = 1 << 1, -+ ~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ IsNumberIndexer = 1 << 2, -+ ~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum2.d.ts.diff deleted file mode 100644 index fdc4df3c9f524..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnum2.d.ts.diff +++ /dev/null @@ -1,31 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -6,4 +6,21 @@ - IsIndexer = 1, - IsStringIndexer = 2, - IsNumberIndexer = 4 - } -+ - /// [Errors] //// -+ -+parserEnum2.ts(4,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserEnum2.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== parserEnum2.ts (2 errors) ==== -+ export enum SignatureFlags { -+ None = 0, -+ IsIndexer = 1, -+ IsStringIndexer = 1 << 1, -+ ~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ IsNumberIndexer = 1 << 2 -+ ~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnumDeclaration6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnumDeclaration6.d.ts.diff deleted file mode 100644 index 5d7b7131270d9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEnumDeclaration6.d.ts.diff +++ /dev/null @@ -1,28 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnumDeclaration6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -6,4 +6,18 @@ - B = 2, - C = 2, - D = 3 - } -+ - /// [Errors] //// -+ -+parserEnumDeclaration6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== parserEnumDeclaration6.ts (1 errors) ==== -+ enum E { -+ A = 1, -+ B, -+ C = 1 << 1, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ D, -+ } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction1.d.ts.diff deleted file mode 100644 index 5896ee65adce4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction1.d.ts.diff +++ /dev/null @@ -1,28 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserEqualsGreaterThanAfterFunction1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,13 +1,16 @@ - - - //// [parserEqualsGreaterThanAfterFunction1.d.ts] --declare function (): any; -+declare function (): invalid; - - /// [Errors] //// - -+parserEqualsGreaterThanAfterFunction1.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - parserEqualsGreaterThanAfterFunction1.ts(1,10): error TS1003: Identifier expected. - - --==== parserEqualsGreaterThanAfterFunction1.ts (1 errors) ==== -+==== parserEqualsGreaterThanAfterFunction1.ts (2 errors) ==== - function => -+ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ - !!! error TS1003: Identifier expected. -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction2.d.ts.diff deleted file mode 100644 index 7fe619a0041f7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserEqualsGreaterThanAfterFunction2.d.ts.diff +++ /dev/null @@ -1,32 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserEqualsGreaterThanAfterFunction2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,18 +1,21 @@ - - - //// [parserEqualsGreaterThanAfterFunction2.d.ts] --declare function (a: any, b: any): any; -+declare function (a: any, b: any): invalid; - - /// [Errors] //// - -+parserEqualsGreaterThanAfterFunction2.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - parserEqualsGreaterThanAfterFunction2.ts(1,10): error TS1003: Identifier expected. - parserEqualsGreaterThanAfterFunction2.ts(1,18): error TS1005: ',' expected. - parserEqualsGreaterThanAfterFunction2.ts(1,27): error TS1005: ',' expected. - parserEqualsGreaterThanAfterFunction2.ts(1,28): error TS1005: ')' expected. - - --==== parserEqualsGreaterThanAfterFunction2.ts (4 errors) ==== -+==== parserEqualsGreaterThanAfterFunction2.ts (5 errors) ==== - function (a: any => b: any; -+ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1003: Identifier expected. - ~~ - !!! error TS1005: ',' expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList1.d.ts.diff deleted file mode 100644 index 058174e4d6ab7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList1.d.ts.diff +++ /dev/null @@ -1,33 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ParameterLists/parserErrorRecovery_ParameterList1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,19 +1,22 @@ - - - //// [parserErrorRecovery_ParameterList1.d.ts] --declare function f(a: any, {}: {}): any; -+declare function f(a: any, {}: {}): invalid; - - /// [Errors] //// - - parserErrorRecovery_ParameterList1.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. -+parserErrorRecovery_ParameterList1.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - parserErrorRecovery_ParameterList1.ts(1,19): error TS1005: ',' expected. - parserErrorRecovery_ParameterList1.ts(2,6): error TS1005: ')' expected. - - --==== parserErrorRecovery_ParameterList1.ts (3 errors) ==== -+==== parserErrorRecovery_ParameterList1.ts (4 errors) ==== - function f(a: any { - ~ - !!! error TS2391: Function implementation is missing or not immediately following the declaration. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1005: ',' expected. - }: {} - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList2.d.ts.diff deleted file mode 100644 index 64189ea496daf..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserErrorRecovery_ParameterList2.d.ts.diff +++ /dev/null @@ -1,32 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ParameterLists/parserErrorRecovery_ParameterList2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,17 +1,20 @@ - - - //// [parserErrorRecovery_ParameterList2.d.ts] --declare function f(a: any, {}: {}): any; -+declare function f(a: any, {}: {}): invalid; - - /// [Errors] //// - - parserErrorRecovery_ParameterList2.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. -+parserErrorRecovery_ParameterList2.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - parserErrorRecovery_ParameterList2.ts(2,6): error TS1005: ')' expected. - - --==== parserErrorRecovery_ParameterList2.ts (2 errors) ==== -+==== parserErrorRecovery_ParameterList2.ts (3 errors) ==== - function f(a: any, { - ~ - !!! error TS2391: Function implementation is missing or not immediately following the declaration. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - }: {} - - !!! error TS1005: ')' expected. -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserNoASIOnCallAfterFunctionExpression1.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserNoASIOnCallAfterFunctionExpression1.d.ts.diff deleted file mode 100644 index f8e1bb2e01000..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserNoASIOnCallAfterFunctionExpression1.d.ts.diff +++ /dev/null @@ -1,32 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/parser/ecmascript5/parserNoASIOnCallAfterFunctionExpression1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,17 +1,21 @@ - - - //// [parserNoASIOnCallAfterFunctionExpression1.d.ts] --declare var x: any; -+declare var x: invalid; - - /// [Errors] //// - -+parserNoASIOnCallAfterFunctionExpression1.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - parserNoASIOnCallAfterFunctionExpression1.ts(2,2): error TS2554: Expected 0 arguments, but got 1. - parserNoASIOnCallAfterFunctionExpression1.ts(2,15): error TS2339: Property 'foo' does not exist on type 'void'. - - --==== parserNoASIOnCallAfterFunctionExpression1.ts (2 errors) ==== -+==== parserNoASIOnCallAfterFunctionExpression1.ts (3 errors) ==== - var x = function (): void { } -+ ~~~~~~~~~~~~~~~~~~~~~ - (window).foo; -+ ~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~ - !!! error TS2554: Expected 0 arguments, but got 1. - ~~~ - !!! error TS2339: Property 'foo' does not exist on type 'void'. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource10.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource10.d.ts.diff deleted file mode 100644 index a36c47e1956ac..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource10.d.ts.diff +++ /dev/null @@ -1,81 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -233,16 +233,22 @@ - } - - /// [Errors] //// - - parserRealSource10.ts(4,21): error TS6053: File 'typescript.ts' not found. -+parserRealSource10.ts(4,21): error TS9010: Reference directives are not supported in isolated declaration mode. -+parserRealSource10.ts(123,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource10.ts(124,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - parserRealSource10.ts(127,38): error TS2449: Class 'TokenInfo' used before its declaration. - parserRealSource10.ts(127,48): error TS1011: An element access expression should take an argument. - parserRealSource10.ts(128,41): error TS2693: 'string' only refers to a type, but is being used as a value here. - parserRealSource10.ts(128,48): error TS1011: An element access expression should take an argument. - parserRealSource10.ts(129,46): error TS2693: 'number' only refers to a type, but is being used as a value here. - parserRealSource10.ts(129,53): error TS1011: An element access expression should take an argument. - parserRealSource10.ts(130,40): error TS2693: 'boolean' only refers to a type, but is being used as a value here. - parserRealSource10.ts(130,48): error TS1011: An element access expression should take an argument. -+parserRealSource10.ts(170,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource10.ts(171,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource10.ts(172,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - parserRealSource10.ts(179,54): error TS2304: Cannot find name 'ErrorRecoverySet'. - parserRealSource10.ts(179,54): error TS4063: Parameter 'ers' of constructor from exported class has or is using private name 'ErrorRecoverySet'. - parserRealSource10.ts(184,28): error TS2304: Cannot find name 'ErrorRecoverySet'. - parserRealSource10.ts(188,34): error TS2304: Cannot find name 'NodeType'. -@@ -578,15 +584,17 @@ - parserRealSource10.ts(356,53): error TS2304: Cannot find name 'NodeType'. - parserRealSource10.ts(449,46): error TS1011: An element access expression should take an argument. - - --==== parserRealSource10.ts (344 errors) ==== -+==== parserRealSource10.ts (350 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// - ~~~~~~~~~~~~~ - !!! error TS6053: File 'typescript.ts' not found. -+ ~~~~~~~~~~~~~ -+!!! error TS9010: Reference directives are not supported in isolated declaration mode. - - module TypeScript { - export enum TokenID { - // Keywords -@@ -704,9 +712,13 @@ - Whitespace, - Comment, - Lim, - LimFixed = EqualsGreaterThan, -+ ~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - LimKeyword = Yield, -+ ~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export var tokenTable: any = new TokenInfo[]; - ~~~~~~~~~ -@@ -768,10 +780,16 @@ - JavascriptFuture = 2, - TypeScript = 4, - JavascriptFutureStrict = 8, - TypeScriptAndJS = Javascript | TypeScript, -+ ~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - TypeScriptAndJSFuture = JavascriptFuture | TypeScript, -+ ~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - TypeScriptAndJSFutureStrict = JavascriptFutureStrict | TypeScript, -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export class TokenInfo { - constructor (public tokenId: TokenID, public reservation: Reservation, diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource14.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource14.d.ts.diff deleted file mode 100644 index 0966d083bef2b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource14.d.ts.diff +++ /dev/null @@ -1,58 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -84,8 +84,9 @@ - } - - /// [Errors] //// - - parserRealSource14.ts(4,21): error TS6053: File 'typescript.ts' not found. -+parserRealSource14.ts(4,21): error TS9010: Reference directives are not supported in isolated declaration mode. - parserRealSource14.ts(24,33): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - parserRealSource14.ts(38,34): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - parserRealSource14.ts(48,37): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - parserRealSource14.ts(68,39): error TS2694: Namespace 'TypeScript' has no exported member 'NodeType'. -@@ -221,8 +222,9 @@ - parserRealSource14.ts(422,30): error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'. - parserRealSource14.ts(427,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - parserRealSource14.ts(428,30): error TS2694: Namespace 'TypeScript' has no exported member 'Block'. - parserRealSource14.ts(432,52): error TS2694: Namespace 'TypeScript' has no exported member 'ASTSpan'. -+parserRealSource14.ts(456,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - parserRealSource14.ts(462,61): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - parserRealSource14.ts(463,52): error TS2694: Namespace 'TypeScript' has no exported member 'Comment'. - parserRealSource14.ts(478,45): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - parserRealSource14.ts(478,69): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -@@ -247,15 +249,17 @@ - parserRealSource14.ts(565,94): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. - parserRealSource14.ts(572,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. - - --==== parserRealSource14.ts (162 errors) ==== -+==== parserRealSource14.ts (164 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// - ~~~~~~~~~~~~~ - !!! error TS6053: File 'typescript.ts' not found. -+ ~~~~~~~~~~~~~ -+!!! error TS9010: Reference directives are not supported in isolated declaration mode. - - module TypeScript { - export function lastOf(items: any[]): any { - return (items === null || items.length === 0) ? null : items[items.length - 1]; -@@ -980,8 +984,10 @@ - // the "{" character, meaning we don't traverse the tree down to the stmt list of the class, meaning - // we don't find the "precomment" attached to the errorneous empty stmt. - //TODO: It would be nice to be able to get rid of this. - DontPruneSearchBasedOnPosition = 1 << 1, -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - /// - /// Return the stack of AST nodes containing "position" diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource2.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource2.d.ts.diff deleted file mode 100644 index 924d609ed4d06..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource2.d.ts.diff +++ /dev/null @@ -1,700 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/parser/ecmascript5/parserRealSource2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -217,17 +217,167 @@ - } - - /// [Errors] //// - - parserRealSource2.ts(4,21): error TS6053: File 'typescript.ts' not found. -+parserRealSource2.ts(4,21): error TS9010: Reference directives are not supported in isolated declaration mode. -+parserRealSource2.ts(15,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(16,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(17,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(20,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(21,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(22,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(23,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(24,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(25,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(26,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(27,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(28,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(29,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(30,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(31,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(32,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(33,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(34,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(35,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(36,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(37,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(38,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(39,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(40,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(41,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(42,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(43,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(44,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(45,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(48,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(49,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(50,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(51,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(56,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(57,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(58,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(59,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(60,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(62,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(63,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(69,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(70,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(71,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(72,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(73,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(74,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(75,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(81,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(82,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(83,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(84,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(85,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(86,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(87,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(88,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(89,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(90,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(94,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(100,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(101,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(102,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(103,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(104,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(105,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(106,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(112,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(113,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(114,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(115,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(116,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(117,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(118,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(119,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(120,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(121,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(122,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(123,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(129,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(130,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(131,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(132,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(133,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(134,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(135,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(136,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(137,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(138,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(139,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(140,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(141,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(142,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(143,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(144,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(145,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(146,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(147,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(153,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(154,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(155,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(156,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(157,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(158,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(159,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(160,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(161,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(162,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(163,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(164,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(165,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(166,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(167,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(168,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(169,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(175,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(176,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(177,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(178,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(179,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(180,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(181,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(182,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(183,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(184,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(185,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(186,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(187,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(188,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(189,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(190,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(191,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(192,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(193,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(199,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(200,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(214,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(215,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(216,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(217,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(218,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(219,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(220,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(226,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(227,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(229,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(230,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(231,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource2.ts(242,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - --==== parserRealSource2.ts (1 errors) ==== -+==== parserRealSource2.ts (149 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// - ~~~~~~~~~~~~~ - !!! error TS6053: File 'typescript.ts' not found. -+ ~~~~~~~~~~~~~ -+!!! error TS9010: Reference directives are not supported in isolated declaration mode. - - module TypeScript { - - export function hasFlag(val: number, flag: number): boolean { -@@ -237,193 +387,461 @@ - export enum ErrorRecoverySet { - None = 0, - Comma = 1, // Comma - SColon = 1 << 1, // SColon -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Asg = 1 << 2, // Asg -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - BinOp = 1 << 3, // Lsh, Rsh, Rs2, Le, Ge, INSTANCEOF, EQ, NE, Eqv, NEqv, LogAnd, LogOr, AsgMul, AsgDiv -+ ~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - // AsgMod, AsgAdd, AsgSub, AsgLsh, AsgRsh, AsgRs2, AsgAnd, AsgXor, AsgOr, QMark, Mult, Div, - // Pct, GT, LT, And, Xor, Or - RBrack = 1 << 4, // RBrack -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - RCurly = 1 << 5, // RCurly -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - RParen = 1 << 6, // RParen -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Dot = 1 << 7, // Dot -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Colon = 1 << 8, // Colon -+ ~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - PrimType = 1 << 9, // number, string, boolean -+ ~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - AddOp = 1 << 10, // Add, Sub -+ ~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - LCurly = 1 << 11, // LCurly -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - PreOp = 1 << 12, // Tilde, Bang, Inc, Dec -+ ~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - RegExp = 1 << 13, // RegExp -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - LParen = 1 << 14, // LParen -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - LBrack = 1 << 15, // LBrack -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Scope = 1 << 16, // Scope -+ ~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - In = 1 << 17, // IN -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - SCase = 1 << 18, // CASE, DEFAULT -+ ~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Else = 1 << 19, // ELSE -+ ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Catch = 1 << 20, // CATCH, FINALLY -+ ~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Var = 1 << 21, // -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Stmt = 1 << 22, // BREAK, RETURN, THROW, DEBUGGER, FOR, SWITCH, DO, IF, TRY, WITH -+ ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - While = 1 << 23, // WHILE -+ ~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ID = 1 << 24, // ID -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Prefix = 1 << 25, // VOID, DELETE, TYPEOF, AWAIT -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Literal = 1 << 26, // IntCon, FltCon, StrCon -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - RLit = 1 << 27, // THIS, TRUE, FALSE, NULL -+ ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Func = 1 << 28, // FUNCTION -+ ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - EOF = 1 << 29, // EOF -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - // REVIEW: Name this something clearer. - TypeScriptS = 1 << 30, // PROPERTY, PRIVATE, STATIC, INTERFACE, CLASS, MODULE, EXPORT, IMPORT -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ExprStart = SColon | AddOp | LCurly | PreOp | RegExp | LParen | LBrack | ID | Prefix | RLit | Func | Literal, -+ ~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - StmtStart = ExprStart | SColon | Var | Stmt | While | TypeScriptS, -+ ~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Postfix = Dot | LParen | LBrack, -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum AllowedElements { - None = 0, - ModuleDeclarations = 1 << 2, -+ ~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ClassDeclarations = 1 << 3, -+ ~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - InterfaceDeclarations = 1 << 4, -+ ~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - AmbientDeclarations = 1 << 10, -+ ~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Properties = 1 << 11, -+ ~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - Global = ModuleDeclarations | ClassDeclarations | InterfaceDeclarations | AmbientDeclarations, -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - QuickParse = Global | Properties, -+ ~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum Modifiers { - None = 0, - Private = 1, - Public = 1 << 1, -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Readonly = 1 << 2, -+ ~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Ambient = 1 << 3, -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Exported = 1 << 4, -+ ~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Getter = 1 << 5, -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Setter = 1 << 6, -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Static = 1 << 7, -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum ASTFlags { - None = 0, - ExplicitSemicolon = 1, // statment terminated by an explicit semicolon - AutomaticSemicolon = 1 << 1, // statment terminated by an automatic semicolon -+ ~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Writeable = 1 << 2, // node is lhs that can be modified -+ ~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Error = 1 << 3, // node has an error -+ ~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - DotLHSPartial = 1 << 4, // node is the lhs of an incomplete dot expr at cursor -+ ~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - DotLHS = 1 << 5, // node is the lhs of a dot expr -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IsStatement = 1 << 6, // node is a statement -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - StrictMode = 1 << 7, // node is in the strict mode environment -+ ~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - PossibleOptionalParameter = 1 << 8, -+ ~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ClassBaseConstructorCall = 1 << 9, -+ ~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - OptionalName = 1 << 10, -+ ~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - // REVIEW: This flag is to mark lambda nodes to note that the LParen of an expression has already been matched in the lambda header. - // The flag is used to communicate this piece of information to the calling parseTerm, which intern will remove it. - // Once we have a better way to associate information with nodes, this flag should not be used. - SkipNextRParen = 1 << 11, -+ ~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum DeclFlags { - None = 0, - Exported = 1, - Private = 1 << 1, -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Public = 1 << 2, -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Ambient = 1 << 3, -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Static = 1 << 4, -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - LocalStatic = 1 << 5, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - GetAccessor = 1 << 6, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - SetAccessor = 1 << 7, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum ModuleFlags { - None = 0, - Exported = 1, - Private = 1 << 1, -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Public = 1 << 2, -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Ambient = 1 << 3, -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Static = 1 << 4, -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - LocalStatic = 1 << 5, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - GetAccessor = 1 << 6, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - SetAccessor = 1 << 7, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IsEnum = 1 << 8, -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ShouldEmitModuleDecl = 1 << 9, -+ ~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IsWholeFile = 1 << 10, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IsDynamic = 1 << 11, -+ ~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - MustCaptureThis = 1 << 12, -+ ~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum SymbolFlags { - None = 0, - Exported = 1, - Private = 1 << 1, -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Public = 1 << 2, -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Ambient = 1 << 3, -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Static = 1 << 4, -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - LocalStatic = 1 << 5, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - GetAccessor = 1 << 6, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - SetAccessor = 1 << 7, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Property = 1 << 8, -+ ~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Readonly = 1 << 9, -+ ~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ModuleMember = 1 << 10, -+ ~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - InterfaceMember = 1 << 11, -+ ~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ClassMember = 1 << 12, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - BuiltIn = 1 << 13, -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - TypeSetDuringScopeAssignment = 1 << 14, -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Constant = 1 << 15, -+ ~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Optional = 1 << 16, -+ ~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - RecursivelyReferenced = 1 << 17, -+ ~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Bound = 1 << 18, -+ ~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - CompilerGenerated = 1 << 19, -+ ~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum VarFlags { - None = 0, - Exported = 1, - Private = 1 << 1, -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Public = 1 << 2, -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Ambient = 1 << 3, -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Static = 1 << 4, -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - LocalStatic = 1 << 5, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - GetAccessor = 1 << 6, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - SetAccessor = 1 << 7, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - AutoInit = 1 << 8, -+ ~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Property = 1 << 9, -+ ~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Readonly = 1 << 10, -+ ~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Class = 1 << 11, -+ ~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ClassProperty = 1 << 12, -+ ~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ClassBodyProperty = 1 << 13, -+ ~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ClassConstructorProperty = 1 << 14, -+ ~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ClassSuperMustBeFirstCallInConstructor = 1 << 15, -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Constant = 1 << 16, -+ ~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - MustCaptureThis = 1 << 17, -+ ~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum FncFlags { - None = 0, - Exported = 1, - Private = 1 << 1, -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Public = 1 << 2, -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Ambient = 1 << 3, -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Static = 1 << 4, -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - LocalStatic = 1 << 5, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - GetAccessor = 1 << 6, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - SetAccessor = 1 << 7, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Definition = 1 << 8, -+ ~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Signature = 1 << 9, -+ ~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Method = 1 << 10, -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - HasReturnExpression = 1 << 11, -+ ~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - CallMember = 1 << 12, -+ ~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ConstructMember = 1 << 13, -+ ~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - HasSelfReference = 1 << 14, -+ ~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IsFatArrowFunction = 1 << 15, -+ ~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IndexerMember = 1 << 16, -+ ~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IsFunctionExpression = 1 << 17, -+ ~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ClassMethod = 1 << 18, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ClassPropertyMethodExported = 1 << 19, -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum SignatureFlags { - None = 0, - IsIndexer = 1, - IsStringIndexer = 1 << 1, -+ ~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IsNumberIndexer = 1 << 2, -+ ~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export function ToDeclFlags(fncFlags: FncFlags) : DeclFlags; - export function ToDeclFlags(varFlags: VarFlags) : DeclFlags; -@@ -436,25 +854,49 @@ - export enum TypeFlags { - None = 0, - HasImplementation = 1, - HasSelfReference = 1 << 1, -+ ~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - MergeResult = 1 << 2, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IsEnum = 1 << 3, -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - BuildingName = 1 << 4, -+ ~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - HasBaseType = 1 << 5, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - HasBaseTypeOfObject = 1 << 6, -+ ~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IsClass = 1 << 7, -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum TypeRelationshipFlags { - SuccessfulComparison = 0, - SourceIsNullTargetIsVoidOrUndefined = 1, - RequiredPropertyIsMissing = 1 << 1, -+ ~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IncompatibleSignatures = 1 << 2, -+ ~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - SourceSignatureHasTooManyParameters = 3, - IncompatibleReturnTypes = 1 << 4, -+ ~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IncompatiblePropertyTypes = 1 << 5, -+ ~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IncompatibleParameterTypes = 1 << 6, -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum CodeGenTarget { - ES3 = 0, -@@ -464,8 +906,10 @@ - export enum ModuleGenTarget { - Synchronous = 0, - Asynchronous = 1, - Local = 1 << 1, -+ ~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - // Compiler defaults to generating ES5-compliant code for - // - getters and setters diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource3.d.ts.diff deleted file mode 100644 index a1cb3d3b1a581..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserRealSource3.d.ts.diff +++ /dev/null @@ -1,45 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/parser/ecmascript5/parserRealSource3.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -116,17 +116,22 @@ - } - - /// [Errors] //// - - parserRealSource3.ts(4,21): error TS6053: File 'typescript.ts' not found. -+parserRealSource3.ts(4,21): error TS9010: Reference directives are not supported in isolated declaration mode. -+parserRealSource3.ts(116,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+parserRealSource3.ts(117,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - --==== parserRealSource3.ts (1 errors) ==== -+==== parserRealSource3.ts (4 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// - ~~~~~~~~~~~~~ - !!! error TS6053: File 'typescript.ts' not found. -+ ~~~~~~~~~~~~~ -+!!! error TS9010: Reference directives are not supported in isolated declaration mode. - - module TypeScript { - // Note: Any addition to the NodeType should also be supported with addition to AstWalkerDetailCallback - export enum NodeType { -@@ -237,7 +242,11 @@ - Error, - Comment, - Debugger, - GeneralNode = FuncDecl, -+ ~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - LastAsg = AsgRs2, -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserSkippedTokens16.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserSkippedTokens16.d.ts.diff deleted file mode 100644 index 2047e54e6887d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserSkippedTokens16.d.ts.diff +++ /dev/null @@ -1,44 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens16.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -3,9 +3,9 @@ - //// [parserSkippedTokens16.d.ts] - declare function Foo(): any; - declare namespace M { - } --declare var x: any; -+declare var x: invalid; - - /// [Errors] //// - - parserSkippedTokens16.ts(1,1): error TS2552: Cannot find name 'foo'. Did you mean 'Foo'? - parserSkippedTokens16.ts(1,6): error TS1005: ';' expected. -@@ -14,11 +14,12 @@ - parserSkippedTokens16.ts(2,27): error TS1127: Invalid character. - parserSkippedTokens16.ts(3,3): error TS1109: Expression expected. - parserSkippedTokens16.ts(6,5): error TS1138: Parameter declaration expected. - parserSkippedTokens16.ts(8,14): error TS1109: Expression expected. -+parserSkippedTokens16.ts(8,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - --==== parserSkippedTokens16.ts (8 errors) ==== -+==== parserSkippedTokens16.ts (9 errors) ==== - foo(): Bar { } - ~~~ - !!! error TS2552: Cannot find name 'foo'. Did you mean 'Foo'? - !!! related TS2728 parserSkippedTokens16.ts:2:10: 'Foo' is declared here. -@@ -41,5 +42,7 @@ - !!! error TS1138: Parameter declaration expected. - } - var x = - --!!! error TS1109: Expression expected. -\ No newline at end of file -+!!! error TS1109: Expression expected. -+ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserStrictMode8.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserStrictMode8.d.ts.diff deleted file mode 100644 index e37f158527c1c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parserStrictMode8.d.ts.diff +++ /dev/null @@ -1,29 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,14 +1,18 @@ - - - //// [parserStrictMode8.d.ts] -+declare function eval(): invalid; - - /// [Errors] //// - - parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. -+parserStrictMode8.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - --==== parserStrictMode8.ts (1 errors) ==== -+==== parserStrictMode8.ts (2 errors) ==== - "use strict"; - function eval() { - ~~~~ - !!! error TS1100: Invalid use of 'eval' in strict mode. -+ ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/preserveConstEnums.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/preserveConstEnums.d.ts.diff deleted file mode 100644 index 5f059911f1828..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/preserveConstEnums.d.ts.diff +++ /dev/null @@ -1,25 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/preserveConstEnums.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,4 +4,15 @@ - declare const enum E { - Value = 1, - Value2 = 1 - } -+ - /// [Errors] //// -+ -+preserveConstEnums.ts(2,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== preserveConstEnums.ts (1 errors) ==== -+ const enum E { -+ Value = 1, Value2 = Value -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/propertyAssignmentUseParentType3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/propertyAssignmentUseParentType3.d.ts.diff deleted file mode 100644 index c1a70970e4dde..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/propertyAssignmentUseParentType3.d.ts.diff +++ /dev/null @@ -1,70 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/salsa/propertyAssignmentUseParentType3.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,21 +1,48 @@ - - - //// [propertyAssignmentUseParentType3.d.ts] - declare function foo1(): number; --declare namespace foo1 { -- var toFixed: string; --} - declare function foo2(): any[]; --declare namespace foo2 { -- var join: string; --} - declare function foo3(): string; --declare namespace foo3 { -- var trim: string; --} - declare function foo4(): ({ - x: number; - }); --declare namespace foo4 { -- var x: string; --} -+ - /// [Errors] //// -+ -+propertyAssignmentUseParentType3.ts(3,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+propertyAssignmentUseParentType3.ts(8,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+propertyAssignmentUseParentType3.ts(13,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+propertyAssignmentUseParentType3.ts(18,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+ -+ -+==== propertyAssignmentUseParentType3.ts (4 errors) ==== -+ // don't use the parent type if it's a function declaration (#33741) -+ -+ function foo1(): number { -+ ~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+ return 123; -+ } -+ foo1.toFixed = ""; -+ -+ function foo2(): any[] { -+ ~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+ return []; -+ } -+ foo2.join = ""; -+ -+ function foo3(): string { -+ ~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+ return ""; -+ } -+ foo3.trim = ""; -+ -+ function foo4(): ({x: number}) { -+ ~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+ return {x: 123}; -+ } -+ foo4.x = "456"; -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reexportClassDefinition.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reexportClassDefinition.d.ts.diff deleted file mode 100644 index cd7f9079c9e32..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reexportClassDefinition.d.ts.diff +++ /dev/null @@ -1,46 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/externalModules/reexportClassDefinition.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -5,12 +5,32 @@ - } - export = x; - - //// [foo2.d.ts] --import foo1 = require('./foo1'); --declare const _default: { -- x: typeof foo1; --}; -+declare const _default: invalid; - export = _default; - - //// [foo3.d.ts] - export {}; -+ - /// [Errors] //// -+ -+foo2.ts(4,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== foo3.ts (0 errors) ==== -+ import foo2 = require('./foo2') -+ class x extends foo2.x {} -+ -+ -+==== foo1.ts (0 errors) ==== -+ class x{} -+ export = x; -+ -+==== foo2.ts (1 errors) ==== -+ import foo1 = require('./foo1'); -+ -+ export = { -+ x: foo1 -+ ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reservedWords3.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reservedWords3.d.ts.diff deleted file mode 100644 index c39f4c45e70ea..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reservedWords3.d.ts.diff +++ /dev/null @@ -1,93 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/reservedWords3.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,59 +1,77 @@ - - - //// [reservedWords3.d.ts] --declare function f1(): any; -+declare function f1(): invalid; - declare enum { - } --declare function f2(): any; -+declare function f2(): invalid; - declare class { - } --declare function f3(): any; --declare function (): any; --declare function f4(): any; --declare function f5(): any; -+declare function f3(): invalid; -+declare function (): invalid; -+declare function f4(): invalid; -+declare function f5(): invalid; - - /// [Errors] //// - -+reservedWords3.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - reservedWords3.ts(1,13): error TS1390: 'enum' is not allowed as a parameter name. - reservedWords3.ts(1,17): error TS2567: Enum declarations can only merge with namespace or other enum declarations. - reservedWords3.ts(1,17): error TS1003: Identifier expected. -+reservedWords3.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - reservedWords3.ts(2,13): error TS1390: 'class' is not allowed as a parameter name. - reservedWords3.ts(2,18): error TS1005: '{' expected. -+reservedWords3.ts(3,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - reservedWords3.ts(3,13): error TS1390: 'function' is not allowed as a parameter name. - reservedWords3.ts(3,21): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -+reservedWords3.ts(3,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - reservedWords3.ts(3,21): error TS1003: Identifier expected. -+reservedWords3.ts(4,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - reservedWords3.ts(4,13): error TS1390: 'while' is not allowed as a parameter name. - reservedWords3.ts(4,18): error TS1005: '(' expected. -+reservedWords3.ts(5,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - reservedWords3.ts(5,13): error TS1390: 'for' is not allowed as a parameter name. - reservedWords3.ts(5,16): error TS1005: '(' expected. - - --==== reservedWords3.ts (12 errors) ==== -+==== reservedWords3.ts (18 errors) ==== - function f1(enum) {} -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ - !!! error TS1390: 'enum' is not allowed as a parameter name. - - !!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. - ~ - !!! error TS1003: Identifier expected. - function f2(class) {} -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ - !!! error TS1390: 'class' is not allowed as a parameter name. - ~ - !!! error TS1005: '{' expected. - function f3(function) {} -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~ - !!! error TS1390: 'function' is not allowed as a parameter name. - - !!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. -+ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1003: Identifier expected. - function f4(while) {} -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ - !!! error TS1390: 'while' is not allowed as a parameter name. - ~ - !!! error TS1005: '(' expected. - function f5(for) {} -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ - !!! error TS1390: 'for' is not allowed as a parameter name. - ~ - !!! error TS1005: '(' expected. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/staticsInAFunction.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/staticsInAFunction.d.ts.diff deleted file mode 100644 index 2cd58391c7633..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/staticsInAFunction.d.ts.diff +++ /dev/null @@ -1,35 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/staticsInAFunction.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,10 +1,11 @@ - - - //// [staticsInAFunction.d.ts] --declare function boo(): void; -+declare function boo(): invalid; - - /// [Errors] //// - -+staticsInAFunction.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - staticsInAFunction.ts(1,13): error TS1005: '(' expected. - staticsInAFunction.ts(2,4): error TS1128: Declaration or statement expected. - staticsInAFunction.ts(2,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - staticsInAFunction.ts(3,4): error TS1128: Declaration or statement expected. -@@ -19,10 +20,12 @@ - staticsInAFunction.ts(4,22): error TS2693: 'any' only refers to a type, but is being used as a value here. - staticsInAFunction.ts(4,26): error TS1005: ';' expected. - - --==== staticsInAFunction.ts (14 errors) ==== -+==== staticsInAFunction.ts (15 errors) ==== - function boo{ -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1005: '(' expected. - static test() - ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/strictModeOctalLiterals.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/strictModeOctalLiterals.d.ts.diff deleted file mode 100644 index b2fea706dfd17..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/strictModeOctalLiterals.d.ts.diff +++ /dev/null @@ -1,29 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/expressions/literals/strictModeOctalLiterals.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -5,16 +5,19 @@ - A = 13 - } - - /// [Errors] //// - -+strictModeOctalLiterals.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - strictModeOctalLiterals.ts(2,14): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. - strictModeOctalLiterals.ts(4,16): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. - strictModeOctalLiterals.ts(4,21): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. - - --==== strictModeOctalLiterals.ts (3 errors) ==== -+==== strictModeOctalLiterals.ts (4 errors) ==== - export enum E { - A = 12 + 01 -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ - !!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'. - } - const orbitol: 01 = 01 diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterType.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterType.d.ts.diff deleted file mode 100644 index 03e1226edab6f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterType.d.ts.diff +++ /dev/null @@ -1,33 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,19 +1,22 @@ - - - //// [templateStringInFunctionParameterType.d.ts] --declare function f(any: any, : any): any; -+declare function f(any: any, : invalid): any; - declare function f(x: string): any; - - /// [Errors] //// - - templateStringInFunctionParameterType.ts(1,12): error TS1138: Parameter declaration expected. -+templateStringInFunctionParameterType.ts(1,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - templateStringInFunctionParameterType.ts(1,22): error TS1005: ',' expected. - - --==== templateStringInFunctionParameterType.ts (2 errors) ==== -+==== templateStringInFunctionParameterType.ts (3 errors) ==== - function f(: any: any`hello`): any; - ~ - !!! error TS1138: Parameter declaration expected. -+ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~ - !!! error TS1005: ',' expected. - function f(x: string): any; - function f(x: string) { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterTypeES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterTypeES6.d.ts.diff deleted file mode 100644 index 5581b1fa7f4ae..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringInFunctionParameterTypeES6.d.ts.diff +++ /dev/null @@ -1,33 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,19 +1,22 @@ - - - //// [templateStringInFunctionParameterTypeES6.d.ts] --declare function f(any: any, : any): any; -+declare function f(any: any, : invalid): any; - declare function f(x: string): any; - - /// [Errors] //// - - templateStringInFunctionParameterTypeES6.ts(1,12): error TS1138: Parameter declaration expected. -+templateStringInFunctionParameterTypeES6.ts(1,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - templateStringInFunctionParameterTypeES6.ts(1,22): error TS1005: ',' expected. - - --==== templateStringInFunctionParameterTypeES6.ts (2 errors) ==== -+==== templateStringInFunctionParameterTypeES6.ts (3 errors) ==== - function f(: any: any`hello`): any; - ~ - !!! error TS1138: Parameter declaration expected. -+ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~ - !!! error TS1005: ',' expected. - function f(x: string): any; - function f(x: string) { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringWithEmbeddedYieldKeyword.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringWithEmbeddedYieldKeyword.d.ts.diff deleted file mode 100644 index 236126358e4ce..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateStringWithEmbeddedYieldKeyword.d.ts.diff +++ /dev/null @@ -1,31 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,17 +1,20 @@ - - - //// [templateStringWithEmbeddedYieldKeyword.d.ts] --declare function gen(): {}; -+declare function gen(): invalid; - - /// [Errors] //// - - error TS2318: Cannot find global type 'IterableIterator'. -+templateStringWithEmbeddedYieldKeyword.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - templateStringWithEmbeddedYieldKeyword.ts(1,15): error TS1005: '(' expected. - - - !!! error TS2318: Cannot find global type 'IterableIterator'. --==== templateStringWithEmbeddedYieldKeyword.ts (1 errors) ==== -+==== templateStringWithEmbeddedYieldKeyword.ts (2 errors) ==== - function* gen { -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1005: '(' expected. - // Once this is supported, yield *must* be parenthesized. - var x = `abc${ yield 10 }def`; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContexts.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContexts.d.ts.diff deleted file mode 100644 index 225001a6ef6e5..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContexts.d.ts.diff +++ /dev/null @@ -1,40 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -28,13 +28,15 @@ - thisInInvalidContexts.ts(17,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. - thisInInvalidContexts.ts(23,13): error TS2331: 'this' cannot be referenced in a module or namespace body. - thisInInvalidContexts.ts(31,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. - thisInInvalidContexts.ts(34,25): error TS2507: Type 'typeof globalThis' is not a constructor function type. -+thisInInvalidContexts.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - thisInInvalidContexts.ts(40,9): error TS2332: 'this' cannot be referenced in current location. -+thisInInvalidContexts.ts(41,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - thisInInvalidContexts.ts(41,9): error TS2332: 'this' cannot be referenced in current location. - - --==== thisInInvalidContexts.ts (7 errors) ==== -+==== thisInInvalidContexts.ts (9 errors) ==== - class BaseErrClass { - constructor(t: any) { } - } - -@@ -83,11 +85,15 @@ - - //'this' as a computed enum value - enum SomeEnum { - A = this, // Should not be allowed -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ - !!! error TS2332: 'this' cannot be referenced in current location. - B = this.spaaaace // Also should not be allowed -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ - !!! error TS2332: 'this' cannot be referenced in current location. - } - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContextsExternalModule.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContextsExternalModule.d.ts.diff deleted file mode 100644 index c0578b2f8d3b7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInInvalidContextsExternalModule.d.ts.diff +++ /dev/null @@ -1,43 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,8 @@ - - - //// [thisInInvalidContextsExternalModule.d.ts] --declare const _default: undefined; -+declare const _default: invalid; - export = _default; - - /// [Errors] //// - - thisInInvalidContextsExternalModule.ts(9,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -@@ -11,11 +11,12 @@ - thisInInvalidContextsExternalModule.ts(31,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. - thisInInvalidContextsExternalModule.ts(33,25): error TS2507: Type 'undefined' is not a constructor function type. - thisInInvalidContextsExternalModule.ts(39,9): error TS2332: 'this' cannot be referenced in current location. - thisInInvalidContextsExternalModule.ts(40,9): error TS2332: 'this' cannot be referenced in current location. -+thisInInvalidContextsExternalModule.ts(43,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - --==== thisInInvalidContextsExternalModule.ts (7 errors) ==== -+==== thisInInvalidContextsExternalModule.ts (8 errors) ==== - class BaseErrClass { - constructor(t: any) { } - } - -@@ -70,5 +71,7 @@ - ~~~~ - !!! error TS2332: 'this' cannot be referenced in current location. - } - -- export = this; // Should be an error -\ No newline at end of file -+ export = this; // Should be an error -+ ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInPropertyBoundDeclarations.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInPropertyBoundDeclarations.d.ts.diff deleted file mode 100644 index 6b009b2e2da04..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisInPropertyBoundDeclarations.d.ts.diff +++ /dev/null @@ -1,39 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/thisInPropertyBoundDeclarations.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -24,16 +24,17 @@ - prop4: string; - prop5: { - a: () => this; - }; -- prop6: any; -+ prop6: invalid; - } - - /// [Errors] //// - - thisInPropertyBoundDeclarations.ts(64,5): error TS2527: The inferred type of 'prop6' references an inaccessible 'this' type. A type annotation is necessary. -+thisInPropertyBoundDeclarations.ts(64,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - --==== thisInPropertyBoundDeclarations.ts (1 errors) ==== -+==== thisInPropertyBoundDeclarations.ts (2 errors) ==== - class Bug { - private name: string; - - private static func: Function[] = [ -@@ -98,8 +99,10 @@ - - prop6 = () => { - ~~~~~ - !!! error TS2527: The inferred type of 'prop6' references an inaccessible 'this' type. A type annotation is necessary. -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - return { - a: () => { return this; } - }; - }; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/this_inside-enum-should-not-be-allowed.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/this_inside-enum-should-not-be-allowed.d.ts.diff deleted file mode 100644 index 7bac25c1ebc2f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/this_inside-enum-should-not-be-allowed.d.ts.diff +++ /dev/null @@ -1,28 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/this_inside-enum-should-not-be-allowed.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -7,15 +7,18 @@ - declare namespace ModuleEnum { - } - - /// [Errors] //// - -+this_inside-enum-should-not-be-allowed.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - this_inside-enum-should-not-be-allowed.ts(2,36): error TS2332: 'this' cannot be referenced in current location. - this_inside-enum-should-not-be-allowed.ts(7,30): error TS2332: 'this' cannot be referenced in current location. - - --==== this_inside-enum-should-not-be-allowed.ts (2 errors) ==== -+==== this_inside-enum-should-not-be-allowed.ts (3 errors) ==== - enum TopLevelEnum { - ThisWasAllowedButShouldNotBe = this // Should not be allowed -+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ - !!! error TS2332: 'this' cannot be referenced in current location. - } - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/twoAccessorsWithSameName.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/twoAccessorsWithSameName.d.ts.diff deleted file mode 100644 index 2e1165bb4b088..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/twoAccessorsWithSameName.d.ts.diff +++ /dev/null @@ -1,46 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -12,11 +12,9 @@ - declare class E { - get x(): number; - set x(v: number); - } --declare var x: { -- readonly x: number; --}; -+declare var x: invalid; - declare var y: { - x: number; - }; - - /// [Errors] //// -@@ -27,11 +25,12 @@ - twoAccessorsWithSameName.ts(8,9): error TS2300: Duplicate identifier 'x'. - twoAccessorsWithSameName.ts(19,9): error TS2300: Duplicate identifier 'x'. - twoAccessorsWithSameName.ts(24,9): error TS1118: An object literal cannot have multiple get/set accessors with the same name. - twoAccessorsWithSameName.ts(24,9): error TS2300: Duplicate identifier 'x'. -+twoAccessorsWithSameName.ts(24,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - --==== twoAccessorsWithSameName.ts (7 errors) ==== -+==== twoAccessorsWithSameName.ts (8 errors) ==== - class C { - get x(): number { return 1; } - ~ - !!! error TS2300: Duplicate identifier 'x'. -@@ -68,8 +67,10 @@ - ~ - !!! error TS1118: An object literal cannot have multiple get/set accessors with the same name. - ~ - !!! error TS2300: Duplicate identifier 'x'. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - return 1; - } - } - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment31.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment31.d.ts.diff deleted file mode 100644 index 7e6fe96d39116..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment31.d.ts.diff +++ /dev/null @@ -1,40 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment31.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,12 +2,8 @@ - - //// [typeFromPropertyAssignment31.d.ts] - declare function ExpandoMerge(n: number): number; - declare namespace ExpandoMerge { -- var p1: number; -- var m: (n: number) => number; --} --declare namespace ExpandoMerge { - var p2: number; - } - declare namespace ExpandoMerge { - var p3: number; -@@ -20,14 +16,17 @@ - } - declare var n: number; - - /// [Errors] //// - -+typeFromPropertyAssignment31.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - typeFromPropertyAssignment31.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. - typeFromPropertyAssignment31.ts(25,1): error TS2322: Type 'boolean' is not assignable to type 'number'. - - --==== typeFromPropertyAssignment31.ts (2 errors) ==== -+==== typeFromPropertyAssignment31.ts (3 errors) ==== - function ExpandoMerge(n: number): number { -+ ~~~~~~~~~~~~ -+!!! error TS9009: 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; - } - ExpandoMerge.p1 = 111 - ExpandoMerge.m = function(n: number) { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment32.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment32.d.ts.diff deleted file mode 100644 index 4458c864fe3d0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment32.d.ts.diff +++ /dev/null @@ -1,42 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,12 +1,8 @@ - - - //// [expando.d.ts] - declare function ExpandoMerge(n: number): number; --declare namespace ExpandoMerge { -- var p1: number; -- var m: (n: number) => number; --} - declare var n: number; - - //// [ns.d.ts] - declare namespace ExpandoMerge { -@@ -22,16 +18,19 @@ - var p2: number; - } - - /// [Errors] //// - -+expando.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. - expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. - ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - - --==== expando.ts (2 errors) ==== -+==== expando.ts (3 errors) ==== - function ExpandoMerge(n: number): number { -+ ~~~~~~~~~~~~ -+!!! error TS9009: 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; - } - ExpandoMerge.p1 = 111 - ExpandoMerge.m = function(n: number) { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment33.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment33.d.ts.diff deleted file mode 100644 index 666bb0a81adfe..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment33.d.ts.diff +++ /dev/null @@ -1,45 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,12 +1,8 @@ - - - //// [expando.d.ts] - declare function ExpandoMerge(n: number): number; --declare namespace ExpandoMerge { -- var p1: number; -- var m: (n: number) => number; --} - declare var n: number; - - //// [ns.d.ts] - declare namespace ExpandoMerge { -@@ -22,8 +18,9 @@ - var p2: number; - } - - /// [Errors] //// - -+expando.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. - expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. - ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. -@@ -47,10 +44,12 @@ - export var p2 = 222; - } - - --==== expando.ts (2 errors) ==== -+==== expando.ts (3 errors) ==== - function ExpandoMerge(n: number): number { -+ ~~~~~~~~~~~~ -+!!! error TS9009: 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; - } - ExpandoMerge.p1 = 111 - ExpandoMerge.m = function(n: number) { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment36.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment36.d.ts.diff deleted file mode 100644 index 6d17e9cfc9c52..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment36.d.ts.diff +++ /dev/null @@ -1,47 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -9,25 +9,21 @@ - s: string; - }; - declare var test: string; - declare function d(): void; --declare namespace d { -- var e: number; -- var q: boolean; -- var r: number; --} - declare const g: { - (): void; - expando: number; - both: string | number; - }; - - /// [Errors] //// - - typeFromPropertyAssignment36.ts(17,7): error TS2565: Property 'q' is used before being assigned. -+typeFromPropertyAssignment36.ts(40,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - typeFromPropertyAssignment36.ts(48,3): error TS2565: Property 'q' is used before being assigned. - - --==== typeFromPropertyAssignment36.ts (2 errors) ==== -+==== typeFromPropertyAssignment36.ts (3 errors) ==== - function f(b: boolean): { - (): void - e: number - q: boolean -@@ -68,8 +64,10 @@ - // OK to access possibly-unassigned properties outside the initialising scope - var test: string = f(true).s - - function d(): void { -+ ~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - } - d.e = 12 - d.e - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment38.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment38.d.ts.diff deleted file mode 100644 index 6a16f63473ef0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment38.d.ts.diff +++ /dev/null @@ -1,38 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment38.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,11 +1,25 @@ - - - //// [typeFromPropertyAssignment38.d.ts] - declare function F(): void; --declare namespace F { -- var prop: number; --} - declare const f: { - (): void; - prop: number; - }; -+ - /// [Errors] //// -+ -+typeFromPropertyAssignment38.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+ -+ -+==== typeFromPropertyAssignment38.ts (1 errors) ==== -+ function F(): void {} -+ ~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+ F["prop"] = 3; -+ -+ const f: { -+ (): void; -+ prop: number; -+ } = function () {}; -+ f["prop"] = 3; -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/underscoreEscapedNameInEnum.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/underscoreEscapedNameInEnum.d.ts.diff deleted file mode 100644 index 596524403b7aa..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/underscoreEscapedNameInEnum.d.ts.diff +++ /dev/null @@ -1,27 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/underscoreEscapedNameInEnum.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,4 +4,17 @@ - declare enum E { - "__foo" = 1, - bar = 2 - } -+ - /// [Errors] //// -+ -+underscoreEscapedNameInEnum.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== underscoreEscapedNameInEnum.ts (1 errors) ==== -+ enum E { -+ "__foo" = 1, -+ bar = E["__foo"] + 1 -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ } -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff deleted file mode 100644 index 324ba2d2859af..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff +++ /dev/null @@ -1,52 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/externalModules/verbatimModuleSyntaxConstEnumUsage.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,10 +1,10 @@ - - - //// [bar.d.ts] - export declare enum Bar { -- a = 1, -- c = 3, -+ a, -+ c, - e = 5 - } - - //// [foo.d.ts] -@@ -12,4 +12,29 @@ - a = 1, - b = 2, - c = 3 - } -+ - /// [Errors] //// -+ -+bar.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+bar.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -+ -+==== foo.ts (0 errors) ==== -+ export enum Foo { -+ a = 1, -+ b, -+ c, -+ } -+ -+==== bar.ts (2 errors) ==== -+ import {Foo} from './foo.js'; -+ -+ export enum Bar { -+ a = Foo.a, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ c = Foo.c, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ e = 5, -+ } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/wellKnownSymbolExpando.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/wellKnownSymbolExpando.d.ts.diff deleted file mode 100644 index 4e4d2b8e29e0c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/wellKnownSymbolExpando.d.ts.diff +++ /dev/null @@ -1,26 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/wellKnownSymbolExpando.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,5 +1,15 @@ - - - //// [wellKnownSymbolExpando.d.ts] - declare function f(): void; --declare namespace f { } -+ - /// [Errors] //// -+ -+wellKnownSymbolExpando.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+ -+ -+==== wellKnownSymbolExpando.ts (1 errors) ==== -+ function f(): void {} -+ ~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+ f[Symbol.iterator] = function() {} -+ -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments3_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments3_es6.d.ts deleted file mode 100644 index b8dfef89e6c11..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments3_es6.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments3_es6.ts] //// - -//// [FunctionPropertyAssignments3_es6.ts] -var v = { *{ } } - -/// [Declarations] //// - - - -//// [FunctionPropertyAssignments3_es6.d.ts] -declare var v: invalid; - -/// [Errors] //// - -FunctionPropertyAssignments3_es6.ts(1,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -FunctionPropertyAssignments3_es6.ts(1,12): error TS1003: Identifier expected. - - -==== FunctionPropertyAssignments3_es6.ts (2 errors) ==== - var v = { *{ } } - -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments5_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments5_es6.d.ts deleted file mode 100644 index 593a00016ff44..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/FunctionPropertyAssignments5_es6.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts] //// - -//// [FunctionPropertyAssignments5_es6.ts] -var v = { *[foo()](): Generator { } } - -/// [Declarations] //// - - - -//// [FunctionPropertyAssignments5_es6.d.ts] -declare var v: invalid; - -/// [Errors] //// - -FunctionPropertyAssignments5_es6.ts(1,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -FunctionPropertyAssignments5_es6.ts(1,13): error TS2304: Cannot find name 'foo'. - - -==== FunctionPropertyAssignments5_es6.ts (2 errors) ==== - var v = { *[foo()](): Generator { } } - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ -!!! error TS2304: Cannot find name 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration5_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration5_es6.d.ts deleted file mode 100644 index 887c579d907c2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration5_es6.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration5_es6.ts] //// - -//// [MemberFunctionDeclaration5_es6.ts] -class C { - * -} - -/// [Declarations] //// - - - -//// [MemberFunctionDeclaration5_es6.d.ts] -declare class C { - (): invalid; -} - -/// [Errors] //// - -MemberFunctionDeclaration5_es6.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -MemberFunctionDeclaration5_es6.ts(3,1): error TS1003: Identifier expected. - - -==== MemberFunctionDeclaration5_es6.ts (2 errors) ==== - class C { - * - -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - ~ -!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration6_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration6_es6.d.ts deleted file mode 100644 index 96f656a1e05d9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/MemberFunctionDeclaration6_es6.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration6_es6.ts] //// - -//// [MemberFunctionDeclaration6_es6.ts] -class C { - *foo -} - -/// [Declarations] //// - - - -//// [MemberFunctionDeclaration6_es6.d.ts] -declare class C { - foo(): invalid; -} - -/// [Errors] //// - -MemberFunctionDeclaration6_es6.ts(2,5): error TS2391: Function implementation is missing or not immediately following the declaration. -MemberFunctionDeclaration6_es6.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -MemberFunctionDeclaration6_es6.ts(3,1): error TS1005: '(' expected. - - -==== MemberFunctionDeclaration6_es6.ts (3 errors) ==== - class C { - *foo - ~~~ -!!! error TS2391: Function implementation is missing or not immediately following the declaration. - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - ~ -!!! error TS1005: '(' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnum1.d.ts deleted file mode 100644 index 89a97fab5c7cd..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnum1.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -//// [tests/cases/compiler/ambientEnum1.ts] //// - -//// [ambientEnum1.ts] - declare enum E1 { - y = 4.23 - } - - // Ambient enum with computer member - declare enum E2 { - x = 'foo'.length - } - -/// [Declarations] //// - - - -//// [ambientEnum1.d.ts] -declare enum E1 { - y = 4.23 -} -declare enum E2 { - x -} - -/// [Errors] //// - -ambientEnum1.ts(7,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -ambientEnum1.ts(7,13): error TS1066: In ambient enum declarations member initializer must be constant expression. - - -==== ambientEnum1.ts (2 errors) ==== - declare enum E1 { - y = 4.23 - } - - // Ambient enum with computer member - declare enum E2 { - x = 'foo'.length - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~ -!!! error TS1066: In ambient enum declarations member initializer must be constant expression. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnumDeclaration1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnumDeclaration1.d.ts deleted file mode 100644 index 434ed114a0cfc..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientEnumDeclaration1.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -//// [tests/cases/conformance/ambient/ambientEnumDeclaration1.ts] //// - -//// [ambientEnumDeclaration1.ts] -// In ambient enum declarations, all values specified in enum member declarations must be classified as constant enum expressions. - -declare enum E { - a = 10, - b = 10 + 1, - c = b, - d = (c) + 1, - e = 10 << 2 * 8, -} - -/// [Declarations] //// - - - -//// [ambientEnumDeclaration1.d.ts] -declare enum E { - a = 10, - b = 11, - c = 11, - d = 12, - e = 655360 -} - -/// [Errors] //// - -ambientEnumDeclaration1.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -ambientEnumDeclaration1.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -ambientEnumDeclaration1.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -ambientEnumDeclaration1.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== ambientEnumDeclaration1.ts (4 errors) ==== - // In ambient enum declarations, all values specified in enum member declarations must be classified as constant enum expressions. - - declare enum E { - a = 10, - b = 10 + 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = b, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - d = (c) + 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - e = 10 << 2 * 8, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientErrors.d.ts deleted file mode 100644 index cec1426fd917d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientErrors.d.ts +++ /dev/null @@ -1,212 +0,0 @@ -//// [tests/cases/conformance/ambient/ambientErrors.ts] //// - -//// [ambientErrors.ts] -// Ambient variable with an initializer -declare var x = 4; - -// Ambient functions with invalid overloads -declare function fn(x: number): string; -declare function fn(x: 'foo'): number; - -// Ambient functions with duplicate signatures -declare function fn1(x: number): string; -declare function fn1(x: number): string; - -// Ambient function overloads that differ only by return type -declare function fn2(x: number): string; -declare function fn2(x: number): number; - -// Ambient function with default parameter values -declare function fn3(x: number = 3): any; - -// Ambient function with function body -declare function fn4(): void { }; - -// Ambient enum with non - integer literal constant member -declare enum E1 { - y = 4.23 -} - -// Ambient enum with computer member -declare enum E2 { - x = 'foo'.length -} - -// Ambient module with initializers for values, bodies for functions / classes -declare module M1 { - var x = 3; - function fn(): void { } - class C { - static x = 3; - y = 4; - constructor() { } - fn(): void { } - static sfn(): void { } - } -} - -// Ambient external module not in the global module -module M2 { - declare module 'nope' { } -} - -// Ambient external module with a string literal name that isn't a top level external module name -declare module '../foo' { } - -// Ambient external module with export assignment and other exported members -declare module 'bar' { - var n: any; - export var q: any; - export = n; -} - - -/// [Declarations] //// - - - -//// [ambientErrors.d.ts] -declare var x: number; -declare function fn(x: number): string; -declare function fn(x: 'foo'): number; -declare function fn1(x: number): string; -declare function fn1(x: number): string; -declare function fn2(x: number): string; -declare function fn2(x: number): number; -declare function fn3(x?: number): any; -declare function fn4(): void; -declare enum E1 { - y = 4.23 -} -declare enum E2 { - x -} -declare namespace M1 { - var x: number; - function fn(): void; - class C { - static x: number; - y: number; - constructor(); - fn(): void; - static sfn(): void; - } -} -declare namespace M2 { -} -declare module '../foo' { } -declare module 'bar' { - var n: any; - export var q: any; - export = n; -} - -/// [Errors] //// - -ambientErrors.ts(2,17): error TS1039: Initializers are not allowed in ambient contexts. -ambientErrors.ts(17,22): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. -ambientErrors.ts(20,30): error TS1183: An implementation cannot be declared in ambient contexts. -ambientErrors.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -ambientErrors.ts(29,9): error TS1066: In ambient enum declarations member initializer must be constant expression. -ambientErrors.ts(34,13): error TS1039: Initializers are not allowed in ambient contexts. -ambientErrors.ts(35,25): error TS1183: An implementation cannot be declared in ambient contexts. -ambientErrors.ts(37,20): error TS1039: Initializers are not allowed in ambient contexts. -ambientErrors.ts(38,13): error TS1039: Initializers are not allowed in ambient contexts. -ambientErrors.ts(39,23): error TS1183: An implementation cannot be declared in ambient contexts. -ambientErrors.ts(40,20): error TS1183: An implementation cannot be declared in ambient contexts. -ambientErrors.ts(41,28): error TS1183: An implementation cannot be declared in ambient contexts. -ambientErrors.ts(47,20): error TS2435: Ambient modules cannot be nested in other modules or namespaces. -ambientErrors.ts(51,16): error TS2436: Ambient module declaration cannot specify relative module name. -ambientErrors.ts(57,5): error TS2309: An export assignment cannot be used in a module with other exported elements. - - -==== ambientErrors.ts (15 errors) ==== - // Ambient variable with an initializer - declare var x = 4; - ~ -!!! error TS1039: Initializers are not allowed in ambient contexts. - - // Ambient functions with invalid overloads - declare function fn(x: number): string; - declare function fn(x: 'foo'): number; - - // Ambient functions with duplicate signatures - declare function fn1(x: number): string; - declare function fn1(x: number): string; - - // Ambient function overloads that differ only by return type - declare function fn2(x: number): string; - declare function fn2(x: number): number; - - // Ambient function with default parameter values - declare function fn3(x: number = 3): any; - ~~~~~~~~~~~~~ -!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. - - // Ambient function with function body - declare function fn4(): void { }; - ~ -!!! error TS1183: An implementation cannot be declared in ambient contexts. - - // Ambient enum with non - integer literal constant member - declare enum E1 { - y = 4.23 - } - - // Ambient enum with computer member - declare enum E2 { - x = 'foo'.length - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~ -!!! error TS1066: In ambient enum declarations member initializer must be constant expression. - } - - // Ambient module with initializers for values, bodies for functions / classes - declare module M1 { - var x = 3; - ~ -!!! error TS1039: Initializers are not allowed in ambient contexts. - function fn(): void { } - ~ -!!! error TS1183: An implementation cannot be declared in ambient contexts. - class C { - static x = 3; - ~ -!!! error TS1039: Initializers are not allowed in ambient contexts. - y = 4; - ~ -!!! error TS1039: Initializers are not allowed in ambient contexts. - constructor() { } - ~ -!!! error TS1183: An implementation cannot be declared in ambient contexts. - fn(): void { } - ~ -!!! error TS1183: An implementation cannot be declared in ambient contexts. - static sfn(): void { } - ~ -!!! error TS1183: An implementation cannot be declared in ambient contexts. - } - } - - // Ambient external module not in the global module - module M2 { - declare module 'nope' { } - ~~~~~~ -!!! error TS2435: Ambient modules cannot be nested in other modules or namespaces. - } - - // Ambient external module with a string literal name that isn't a top level external module name - declare module '../foo' { } - ~~~~~~~~ -!!! error TS2436: Ambient module declaration cannot specify relative module name. - - // Ambient external module with export assignment and other exported members - declare module 'bar' { - var n: any; - export var q: any; - export = n; - ~~~~~~~~~~~ -!!! error TS2309: An export assignment cannot be used in a module with other exported elements. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrowFunctionContexts.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrowFunctionContexts.d.ts deleted file mode 100644 index 99829feb83115..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrowFunctionContexts.d.ts +++ /dev/null @@ -1,264 +0,0 @@ -//// [tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts] //// - -//// [arrowFunctionContexts.ts] -// Arrow function used in with statement -with (window) { - var p = () => this; -} - -// Arrow function as argument to super call -class Base { - constructor(n: any) { } -} - -class Derived extends Base { - constructor() { - super(() => this); - } -} - -// Arrow function as function argument -window.setTimeout(() => null, 100); - -// Arrow function as value in array literal - -var obj = (n: number): string => ''; -var obj: { (n: number): string; }; // OK - -var arr: ((n: number) => string)[] = [(n: number) => '']; -var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) - -// Arrow function as enum value -enum E { - x = () => 4, // Error expected - y = (() => this).length // error, can't use this in enum -} - -// Arrow function as module variable initializer -module M { - export var a = (s: any): string => ''; - var b = (s) => s; -} - -// Repeat above for module members that are functions? (necessary to redo all of them?) -module M2 { - // Arrow function used in with statement - with (window) { - var p = () => this; - } - - // Arrow function as argument to super call - class Base { - constructor(n: any) { } - } - - class Derived extends Base { - constructor() { - super(() => this); - } - } - - // Arrow function as function argument - window.setTimeout(() => null, 100); - - // Arrow function as value in array literal - - var obj = (n: number) => ''; - var obj: { (n: number): string; }; // OK - - var arr = [(n: number) => '']; - var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) - - // Arrow function as enum value - enum E { - x = () => 4, // Error expected - y = (() => this).length - } - - // Arrow function as module variable initializer - module M { - export var a = (s) => ''; - var b = (s) => s; - } - -} - -// (ParamList) => { ... } is a generic arrow function -var generic1 = (n: T): T[] => [n]; -var generic1: { (n: T): T[] }; // Incorrect error, Bug 829597 -var generic2 = (n: T): T[] => { return [n]; }; -var generic2: { (n: T): T[] }; - -// ((ParamList) => { ... } ) is a type assertion to an arrow function -var asserted1 = ((n) => [n]); -var asserted1: any; -var asserted2 = ((n) => { return n; }); -var asserted2: any; - - - -/// [Declarations] //// - - - -//// [arrowFunctionContexts.d.ts] -declare class Base { - constructor(n: any); -} -declare class Derived extends Base { - constructor(); -} -declare var obj: (n: number) => string; -declare var obj: { - (n: number): string; -}; -declare var arr: ((n: number) => string)[]; -declare var arr: { - (n: number): string; -}[]; -declare enum E { - x,// Error expected - y -} -declare namespace M { - var a: (s: any) => string; -} -declare namespace M2 { -} -declare var generic1: (n: T) => T[]; -declare var generic1: { - (n: T): T[]; -}; -declare var generic2: (n: T) => T[]; -declare var generic2: { - (n: T): T[]; -}; -declare var asserted1: any; -declare var asserted1: any; -declare var asserted2: any; -declare var asserted2: any; - -/// [Errors] //// - -arrowFunctionContexts.ts(2,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. -arrowFunctionContexts.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -arrowFunctionContexts.ts(30,9): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. -arrowFunctionContexts.ts(31,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -arrowFunctionContexts.ts(31,16): error TS2332: 'this' cannot be referenced in current location. -arrowFunctionContexts.ts(43,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. -arrowFunctionContexts.ts(71,13): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. -arrowFunctionContexts.ts(72,20): error TS2332: 'this' cannot be referenced in current location. - - -==== arrowFunctionContexts.ts (8 errors) ==== - // Arrow function used in with statement - with (window) { - ~~~~~~~~~~~~~ -!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - var p = () => this; - } - - // Arrow function as argument to super call - class Base { - constructor(n: any) { } - } - - class Derived extends Base { - constructor() { - super(() => this); - } - } - - // Arrow function as function argument - window.setTimeout(() => null, 100); - - // Arrow function as value in array literal - - var obj = (n: number): string => ''; - var obj: { (n: number): string; }; // OK - - var arr: ((n: number) => string)[] = [(n: number) => '']; - var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) - - // Arrow function as enum value - enum E { - x = () => 4, // Error expected - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~ -!!! error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. - y = (() => this).length // error, can't use this in enum - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - } - - // Arrow function as module variable initializer - module M { - export var a = (s: any): string => ''; - var b = (s) => s; - } - - // Repeat above for module members that are functions? (necessary to redo all of them?) - module M2 { - // Arrow function used in with statement - with (window) { - ~~~~~~~~~~~~~ -!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - var p = () => this; - } - - // Arrow function as argument to super call - class Base { - constructor(n: any) { } - } - - class Derived extends Base { - constructor() { - super(() => this); - } - } - - // Arrow function as function argument - window.setTimeout(() => null, 100); - - // Arrow function as value in array literal - - var obj = (n: number) => ''; - var obj: { (n: number): string; }; // OK - - var arr = [(n: number) => '']; - var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) - - // Arrow function as enum value - enum E { - x = () => 4, // Error expected - ~~~~~~~ -!!! error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. - y = (() => this).length - ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - } - - // Arrow function as module variable initializer - module M { - export var a = (s) => ''; - var b = (s) => s; - } - - } - - // (ParamList) => { ... } is a generic arrow function - var generic1 = (n: T): T[] => [n]; - var generic1: { (n: T): T[] }; // Incorrect error, Bug 829597 - var generic2 = (n: T): T[] => { return [n]; }; - var generic2: { (n: T): T[] }; - - // ((ParamList) => { ... } ) is a type assertion to an arrow function - var asserted1 = ((n) => [n]); - var asserted1: any; - var asserted2 = ((n) => { return n; }); - var asserted2: any; - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier.d.ts deleted file mode 100644 index f5d71f2688043..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -//// [tests/cases/compiler/classMemberWithMissingIdentifier.ts] //// - -//// [classMemberWithMissingIdentifier.ts] -class C { - public {}; -} - -/// [Declarations] //// - - - -//// [classMemberWithMissingIdentifier.d.ts] -declare class C { - : invalid; -} - -/// [Errors] //// - -classMemberWithMissingIdentifier.ts(2,11): error TS1146: Declaration expected. -classMemberWithMissingIdentifier.ts(2,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -classMemberWithMissingIdentifier.ts(2,12): error TS1005: ';' expected. -classMemberWithMissingIdentifier.ts(3,1): error TS1128: Declaration or statement expected. - - -==== classMemberWithMissingIdentifier.ts (4 errors) ==== - class C { - public {}; - -!!! error TS1146: Declaration expected. - -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1005: ';' expected. - } - ~ -!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier2.d.ts deleted file mode 100644 index b3fa760854c5f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/classMemberWithMissingIdentifier2.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -//// [tests/cases/compiler/classMemberWithMissingIdentifier2.ts] //// - -//// [classMemberWithMissingIdentifier2.ts] -class C { - public {[name:string]:VariableDeclaration}; -} - -/// [Declarations] //// - - - -//// [classMemberWithMissingIdentifier2.d.ts] -declare class C { - : invalid; -} - -/// [Errors] //// - -classMemberWithMissingIdentifier2.ts(2,11): error TS1146: Declaration expected. -classMemberWithMissingIdentifier2.ts(2,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -classMemberWithMissingIdentifier2.ts(2,12): error TS1005: ';' expected. -classMemberWithMissingIdentifier2.ts(2,18): error TS1005: ',' expected. -classMemberWithMissingIdentifier2.ts(2,19): error TS2693: 'string' only refers to a type, but is being used as a value here. -classMemberWithMissingIdentifier2.ts(2,26): error TS1005: ';' expected. -classMemberWithMissingIdentifier2.ts(2,27): error TS2304: Cannot find name 'VariableDeclaration'. -classMemberWithMissingIdentifier2.ts(3,1): error TS1128: Declaration or statement expected. - - -==== classMemberWithMissingIdentifier2.ts (8 errors) ==== - class C { - public {[name:string]:VariableDeclaration}; - -!!! error TS1146: Declaration expected. - -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1005: ';' expected. - ~ -!!! error TS1005: ',' expected. - ~~~~~~ -!!! error TS2693: 'string' only refers to a type, but is being used as a value here. - ~ -!!! error TS1005: ';' expected. - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'VariableDeclaration'. - } - ~ -!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/collisionCodeGenEnumWithEnumMemberConflict.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/collisionCodeGenEnumWithEnumMemberConflict.d.ts deleted file mode 100644 index 4f5817acf67d7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/collisionCodeGenEnumWithEnumMemberConflict.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/compiler/collisionCodeGenEnumWithEnumMemberConflict.ts] //// - -//// [collisionCodeGenEnumWithEnumMemberConflict.ts] -enum Color { - Color, - Thing = Color -} - -/// [Declarations] //// - - - -//// [collisionCodeGenEnumWithEnumMemberConflict.d.ts] -declare enum Color { - Color = 0, - Thing = 0 -} - -/// [Errors] //// - -collisionCodeGenEnumWithEnumMemberConflict.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== collisionCodeGenEnumWithEnumMemberConflict.ts (1 errors) ==== - enum Color { - Color, - Thing = Color - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commonMissingSemicolons.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commonMissingSemicolons.d.ts deleted file mode 100644 index 2f8125c86e94d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commonMissingSemicolons.d.ts +++ /dev/null @@ -1,454 +0,0 @@ -//// [tests/cases/compiler/commonMissingSemicolons.ts] //// - -//// [commonMissingSemicolons.ts] -async function myAsyncFunction1(): Promise {} -asynd function myAsyncFunction2(): void {} -sasync function myAsyncFunction3(): void {} - -// Arrow functions don't (yet?) parse as nicely as standalone functions. -// Eventually it would be good to get them the same "did you mean" for typos such as "asyncd". -const myAsyncArrow1 = async (): Promise => 3; -const myAsyncArrow2: any = asyncd () => 3; - -class MyClass1 {} -clasd MyClass2 {} -classs MyClass3 {} - -const myConst1 = 1; -consd myConst2 = 1; -constd myConst3 = 1; - -declare const myDeclareConst1: 1; -declared const myDeclareConst2: 1; -declare constd myDeclareConst3: 1; -declared constd myDeclareConst4: 1; -declareconst myDeclareConst5; - -function myFunction1(): void { } -functiond myFunction2() { } -function function(): void { } -functionMyFunction; - -interface myInterface1 { } -interfaced myInterface2 { } -interface interface { } -interface { } -interface void { } -interfaceMyInterface { } - -let let = 1; -let let1 = 1; -letd let2 = 1; -letMyLet; - -type type; -type type1 = {}; -type type2 = type; -type type3 = {}; -typed type4 = {} -typed type5 = type; -typeMyType; - -var myVar1 = 1; -vard myVar2 = 1; -varMyVar; - -class NoSemicolonClassA { - ['a'] = 0 - {} -} - -class NoSemicolonClassB { - ['a'] = 0 - {} -} - -class NoSemicolonClassC { - ['a'] = 0; - {} -} - -class NoSemicolonClassD { - ['a']: any = 0 - ['b']() {} -} - -class NoSemicolonClassE { - ['a']: any = 0 - ['b']() { - c: true - } -} - - -/// [Declarations] //// - - - -//// [commonMissingSemicolons.d.ts] -declare function myAsyncFunction1(): Promise; -declare function myAsyncFunction2(): void; -declare function myAsyncFunction3(): void; -declare const myAsyncArrow1: () => Promise; -declare const myAsyncArrow2: any; -declare class MyClass1 { -} -declare const myConst1 = 1; -declare const myDeclareConst1: 1; -declare const myDeclareConst2: 1; -declare function myFunction1(): void; -declare function (): invalid; -interface myInterface1 { -} -interface interface { -} -declare let let: number; -declare let let1: number; -type type = ; -type type1 = {}; -type type2 = type; -type type3 = {}; -declare var myVar1: number; -declare class NoSemicolonClassA { - ['a']: number; -} -declare class NoSemicolonClassB { - ['a']: number; -} -declare class NoSemicolonClassC { - ['a']: number; -} -declare class NoSemicolonClassD { - ['a']: any; -} -declare class NoSemicolonClassE { - ['a']: any; -} - -/// [Errors] //// - -commonMissingSemicolons.ts(1,36): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. -commonMissingSemicolons.ts(2,1): error TS1435: Unknown keyword or identifier. Did you mean 'async'? -commonMissingSemicolons.ts(2,1): error TS2304: Cannot find name 'asynd'. -commonMissingSemicolons.ts(3,1): error TS1435: Unknown keyword or identifier. Did you mean 'async'? -commonMissingSemicolons.ts(3,1): error TS2304: Cannot find name 'sasync'. -commonMissingSemicolons.ts(7,33): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. -commonMissingSemicolons.ts(8,28): error TS2304: Cannot find name 'asyncd'. -commonMissingSemicolons.ts(8,38): error TS1005: ';' expected. -commonMissingSemicolons.ts(11,1): error TS1435: Unknown keyword or identifier. Did you mean 'class'? -commonMissingSemicolons.ts(11,1): error TS2304: Cannot find name 'clasd'. -commonMissingSemicolons.ts(11,7): error TS1434: Unexpected keyword or identifier. -commonMissingSemicolons.ts(11,7): error TS2552: Cannot find name 'MyClass2'. Did you mean 'MyClass1'? -commonMissingSemicolons.ts(12,1): error TS1435: Unknown keyword or identifier. Did you mean 'class'? -commonMissingSemicolons.ts(12,1): error TS2304: Cannot find name 'classs'. -commonMissingSemicolons.ts(12,8): error TS1434: Unexpected keyword or identifier. -commonMissingSemicolons.ts(12,8): error TS2552: Cannot find name 'MyClass3'. Did you mean 'MyClass1'? -commonMissingSemicolons.ts(15,1): error TS1435: Unknown keyword or identifier. Did you mean 'const'? -commonMissingSemicolons.ts(15,1): error TS2304: Cannot find name 'consd'. -commonMissingSemicolons.ts(15,7): error TS2552: Cannot find name 'myConst2'. Did you mean 'myConst1'? -commonMissingSemicolons.ts(16,1): error TS1435: Unknown keyword or identifier. Did you mean 'const'? -commonMissingSemicolons.ts(16,1): error TS2304: Cannot find name 'constd'. -commonMissingSemicolons.ts(16,8): error TS2304: Cannot find name 'myConst3'. -commonMissingSemicolons.ts(19,1): error TS1435: Unknown keyword or identifier. Did you mean 'declare'? -commonMissingSemicolons.ts(19,1): error TS2304: Cannot find name 'declared'. -commonMissingSemicolons.ts(20,1): error TS2304: Cannot find name 'declare'. -commonMissingSemicolons.ts(20,9): error TS1435: Unknown keyword or identifier. Did you mean 'const'? -commonMissingSemicolons.ts(20,9): error TS2304: Cannot find name 'constd'. -commonMissingSemicolons.ts(21,1): error TS1435: Unknown keyword or identifier. Did you mean 'declare'? -commonMissingSemicolons.ts(21,1): error TS2304: Cannot find name 'declared'. -commonMissingSemicolons.ts(21,10): error TS1435: Unknown keyword or identifier. Did you mean 'const'? -commonMissingSemicolons.ts(21,10): error TS2304: Cannot find name 'constd'. -commonMissingSemicolons.ts(22,1): error TS1435: Unknown keyword or identifier. Did you mean 'declare const'? -commonMissingSemicolons.ts(22,1): error TS2304: Cannot find name 'declareconst'. -commonMissingSemicolons.ts(22,14): error TS2304: Cannot find name 'myDeclareConst5'. -commonMissingSemicolons.ts(25,1): error TS1435: Unknown keyword or identifier. Did you mean 'function'? -commonMissingSemicolons.ts(25,1): error TS2304: Cannot find name 'functiond'. -commonMissingSemicolons.ts(25,11): error TS2304: Cannot find name 'myFunction2'. -commonMissingSemicolons.ts(25,25): error TS1005: ';' expected. -commonMissingSemicolons.ts(26,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -commonMissingSemicolons.ts(26,10): error TS1359: Identifier expected. 'function' is a reserved word that cannot be used here. -commonMissingSemicolons.ts(26,18): error TS1003: Identifier expected. -commonMissingSemicolons.ts(27,1): error TS2304: Cannot find name 'functionMyFunction'. -commonMissingSemicolons.ts(30,1): error TS1435: Unknown keyword or identifier. Did you mean 'interface'? -commonMissingSemicolons.ts(30,1): error TS2304: Cannot find name 'interfaced'. -commonMissingSemicolons.ts(30,12): error TS1435: Unknown keyword or identifier. Did you mean 'interface'? -commonMissingSemicolons.ts(30,12): error TS2304: Cannot find name 'myInterface2'. -commonMissingSemicolons.ts(32,1): error TS2693: 'interface' only refers to a type, but is being used as a value here. -commonMissingSemicolons.ts(32,11): error TS1438: Interface must be given a name. -commonMissingSemicolons.ts(33,1): error TS2693: 'interface' only refers to a type, but is being used as a value here. -commonMissingSemicolons.ts(33,11): error TS2427: Interface name cannot be 'void'. -commonMissingSemicolons.ts(34,1): error TS1435: Unknown keyword or identifier. Did you mean 'interface MyInterface'? -commonMissingSemicolons.ts(34,1): error TS2304: Cannot find name 'interfaceMyInterface'. -commonMissingSemicolons.ts(38,1): error TS1435: Unknown keyword or identifier. Did you mean 'let'? -commonMissingSemicolons.ts(38,1): error TS2304: Cannot find name 'letd'. -commonMissingSemicolons.ts(38,6): error TS2304: Cannot find name 'let2'. -commonMissingSemicolons.ts(39,1): error TS2304: Cannot find name 'letMyLet'. -commonMissingSemicolons.ts(41,10): error TS4081: Exported type alias 'type' has or is using private name ''. -commonMissingSemicolons.ts(41,10): error TS1005: '=' expected. -commonMissingSemicolons.ts(45,1): error TS1435: Unknown keyword or identifier. Did you mean 'type'? -commonMissingSemicolons.ts(45,1): error TS2304: Cannot find name 'typed'. -commonMissingSemicolons.ts(45,7): error TS2304: Cannot find name 'type4'. -commonMissingSemicolons.ts(46,1): error TS1435: Unknown keyword or identifier. Did you mean 'type'? -commonMissingSemicolons.ts(46,1): error TS2304: Cannot find name 'typed'. -commonMissingSemicolons.ts(46,7): error TS2304: Cannot find name 'type5'. -commonMissingSemicolons.ts(46,15): error TS2693: 'type' only refers to a type, but is being used as a value here. -commonMissingSemicolons.ts(47,1): error TS2304: Cannot find name 'typeMyType'. -commonMissingSemicolons.ts(50,1): error TS1435: Unknown keyword or identifier. Did you mean 'var'? -commonMissingSemicolons.ts(50,1): error TS2304: Cannot find name 'vard'. -commonMissingSemicolons.ts(50,6): error TS2304: Cannot find name 'myVar2'. -commonMissingSemicolons.ts(51,1): error TS2304: Cannot find name 'varMyVar'. -commonMissingSemicolons.ts(55,3): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. -commonMissingSemicolons.ts(56,1): error TS1128: Declaration or statement expected. -commonMissingSemicolons.ts(60,3): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. -commonMissingSemicolons.ts(61,1): error TS1128: Declaration or statement expected. -commonMissingSemicolons.ts(65,3): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. -commonMissingSemicolons.ts(66,1): error TS1128: Declaration or statement expected. -commonMissingSemicolons.ts(70,11): error TS1005: ';' expected. -commonMissingSemicolons.ts(71,1): error TS1128: Declaration or statement expected. -commonMissingSemicolons.ts(75,11): error TS1005: ';' expected. -commonMissingSemicolons.ts(78,1): error TS1128: Declaration or statement expected. - - -==== commonMissingSemicolons.ts (80 errors) ==== - async function myAsyncFunction1(): Promise {} - ~~~~~~~~~~~~~ -!!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. - asynd function myAsyncFunction2(): void {} - ~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'async'? - ~~~~~ -!!! error TS2304: Cannot find name 'asynd'. - sasync function myAsyncFunction3(): void {} - ~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'async'? - ~~~~~~ -!!! error TS2304: Cannot find name 'sasync'. - - // Arrow functions don't (yet?) parse as nicely as standalone functions. - // Eventually it would be good to get them the same "did you mean" for typos such as "asyncd". - const myAsyncArrow1 = async (): Promise => 3; - ~~~~~~~~~~~~~~~ -!!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. - const myAsyncArrow2: any = asyncd () => 3; - ~~~~~~ -!!! error TS2304: Cannot find name 'asyncd'. - ~~ -!!! error TS1005: ';' expected. - - class MyClass1 {} - clasd MyClass2 {} - ~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'class'? - ~~~~~ -!!! error TS2304: Cannot find name 'clasd'. - ~~~~~~~~ -!!! error TS1434: Unexpected keyword or identifier. - ~~~~~~~~ -!!! error TS2552: Cannot find name 'MyClass2'. Did you mean 'MyClass1'? -!!! related TS2728 commonMissingSemicolons.ts:10:7: 'MyClass1' is declared here. - classs MyClass3 {} - ~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'class'? - ~~~~~~ -!!! error TS2304: Cannot find name 'classs'. - ~~~~~~~~ -!!! error TS1434: Unexpected keyword or identifier. - ~~~~~~~~ -!!! error TS2552: Cannot find name 'MyClass3'. Did you mean 'MyClass1'? -!!! related TS2728 commonMissingSemicolons.ts:10:7: 'MyClass1' is declared here. - - const myConst1 = 1; - consd myConst2 = 1; - ~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? - ~~~~~ -!!! error TS2304: Cannot find name 'consd'. - ~~~~~~~~ -!!! error TS2552: Cannot find name 'myConst2'. Did you mean 'myConst1'? -!!! related TS2728 commonMissingSemicolons.ts:14:7: 'myConst1' is declared here. - constd myConst3 = 1; - ~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? - ~~~~~~ -!!! error TS2304: Cannot find name 'constd'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'myConst3'. - - declare const myDeclareConst1: 1; - declared const myDeclareConst2: 1; - ~~~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'declare'? - ~~~~~~~~ -!!! error TS2304: Cannot find name 'declared'. - declare constd myDeclareConst3: 1; - ~~~~~~~ -!!! error TS2304: Cannot find name 'declare'. - ~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? - ~~~~~~ -!!! error TS2304: Cannot find name 'constd'. - declared constd myDeclareConst4: 1; - ~~~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'declare'? - ~~~~~~~~ -!!! error TS2304: Cannot find name 'declared'. - ~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? - ~~~~~~ -!!! error TS2304: Cannot find name 'constd'. - declareconst myDeclareConst5; - ~~~~~~~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'declare const'? - ~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'declareconst'. - ~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'myDeclareConst5'. - - function myFunction1(): void { } - functiond myFunction2() { } - ~~~~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'function'? - ~~~~~~~~~ -!!! error TS2304: Cannot find name 'functiond'. - ~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'myFunction2'. - ~ -!!! error TS1005: ';' expected. - function function(): void { } - -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~ -!!! error TS1359: Identifier expected. 'function' is a reserved word that cannot be used here. - ~ -!!! error TS1003: Identifier expected. - functionMyFunction; - ~~~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'functionMyFunction'. - - interface myInterface1 { } - interfaced myInterface2 { } - ~~~~~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'interface'? - ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'interfaced'. - ~~~~~~~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'interface'? - ~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'myInterface2'. - interface interface { } - interface { } - ~~~~~~~~~ -!!! error TS2693: 'interface' only refers to a type, but is being used as a value here. - ~ -!!! error TS1438: Interface must be given a name. - interface void { } - ~~~~~~~~~ -!!! error TS2693: 'interface' only refers to a type, but is being used as a value here. - ~~~~ -!!! error TS2427: Interface name cannot be 'void'. - interfaceMyInterface { } - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'interface MyInterface'? - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'interfaceMyInterface'. - - let let = 1; - let let1 = 1; - letd let2 = 1; - ~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'let'? - ~~~~ -!!! error TS2304: Cannot find name 'letd'. - ~~~~ -!!! error TS2304: Cannot find name 'let2'. - letMyLet; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'letMyLet'. - - type type; - -!!! error TS4081: Exported type alias 'type' has or is using private name ''. - ~ -!!! error TS1005: '=' expected. - type type1 = {}; - type type2 = type; - type type3 = {}; - typed type4 = {} - ~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'type'? - ~~~~~ -!!! error TS2304: Cannot find name 'typed'. - ~~~~~ -!!! error TS2304: Cannot find name 'type4'. - typed type5 = type; - ~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'type'? - ~~~~~ -!!! error TS2304: Cannot find name 'typed'. - ~~~~~ -!!! error TS2304: Cannot find name 'type5'. - ~~~~ -!!! error TS2693: 'type' only refers to a type, but is being used as a value here. - typeMyType; - ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'typeMyType'. - - var myVar1 = 1; - vard myVar2 = 1; - ~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'var'? - ~~~~ -!!! error TS2304: Cannot find name 'vard'. - ~~~~~~ -!!! error TS2304: Cannot find name 'myVar2'. - varMyVar; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'varMyVar'. - - class NoSemicolonClassA { - ['a'] = 0 - {} - ~ -!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. - } - ~ -!!! error TS1128: Declaration or statement expected. - - class NoSemicolonClassB { - ['a'] = 0 - {} - ~ -!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. - } - ~ -!!! error TS1128: Declaration or statement expected. - - class NoSemicolonClassC { - ['a'] = 0; - {} - ~ -!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. - } - ~ -!!! error TS1128: Declaration or statement expected. - - class NoSemicolonClassD { - ['a']: any = 0 - ['b']() {} - ~ -!!! error TS1005: ';' expected. - } - ~ -!!! error TS1128: Declaration or statement expected. - - class NoSemicolonClassE { - ['a']: any = 0 - ['b']() { - ~ -!!! error TS1005: ';' expected. - c: true - } - } - ~ -!!! error TS1128: Declaration or statement expected. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES5.d.ts deleted file mode 100644 index 44e2cdf2490f7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES5.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts] //// - -//// [computedPropertyNames10_ES5.ts] -var s: string; -var n: number; -var a: any; -var v = { - [s](): void { }, - [n](): void { }, - [s + s](): void { }, - [s + n](): void { }, - [+s](): void { }, - [""](): void { }, - [0](): void { }, - [a](): void { }, - [true](): void { }, - [`hello bye`](): void { }, - [`hello ${a} bye`](): void { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames10_ES5.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare var v: invalid; - -/// [Errors] //// - -computedPropertyNames10_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames10_ES5.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames10_ES5.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames10_ES5.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames10_ES5.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== computedPropertyNames10_ES5.ts (5 errors) ==== - var s: string; - var n: number; - var a: any; - var v = { - [s](): void { }, - [n](): void { }, - [s + s](): void { }, - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - [s + n](): void { }, - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - [+s](): void { }, - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - [""](): void { }, - [0](): void { }, - [a](): void { }, - [true](): void { }, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - [`hello bye`](): void { }, - [`hello ${a} bye`](): void { } - ~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES6.d.ts deleted file mode 100644 index 3d34a73ff41da..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertyNames10_ES6.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts] //// - -//// [computedPropertyNames10_ES6.ts] -var s: string; -var n: number; -var a: any; -var v = { - [s](): void { }, - [n](): void { }, - [s + s](): void { }, - [s + n](): void { }, - [+s](): void { }, - [""](): void { }, - [0](): void { }, - [a](): void { }, - [true](): void { }, - [`hello bye`](): void { }, - [`hello ${a} bye`](): void { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames10_ES6.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare var v: invalid; - -/// [Errors] //// - -computedPropertyNames10_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames10_ES6.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames10_ES6.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames10_ES6.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames10_ES6.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== computedPropertyNames10_ES6.ts (5 errors) ==== - var s: string; - var n: number; - var a: any; - var v = { - [s](): void { }, - [n](): void { }, - [s + s](): void { }, - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - [s + n](): void { }, - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - [+s](): void { }, - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - [""](): void { }, - [0](): void { }, - [a](): void { }, - [true](): void { }, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - [`hello bye`](): void { }, - [`hello ${a} bye`](): void { } - ~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum1.d.ts deleted file mode 100644 index 4d1388b4c9e76..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum1.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -//// [tests/cases/conformance/constEnums/constEnum1.ts] //// - -//// [constEnum1.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. - -const enum E { - a = 10, - b = a, - c = (a+1), - e, - d = ~e, - f = a << 2 >> 1, - g = a << 2 >>> 1, - h = a | b -} - -/// [Declarations] //// - - - -//// [constEnum1.d.ts] -declare const enum E { - a = 10, - b = 10, - c = 11, - e = 12, - d = -13, - f = 20, - g = 20, - h = 10 -} - -/// [Errors] //// - -constEnum1.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnum1.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnum1.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnum1.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnum1.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnum1.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== constEnum1.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. - - const enum E { - a = 10, - b = a, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = (a+1), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - e, - d = ~e, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - f = a << 2 >> 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - g = a << 2 >>> 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - h = a | b - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file 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 deleted file mode 100644 index 1bd94edf8fa9d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum2.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -//// [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 -} - -/// [Errors] //// - -constEnum2.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnum2.ts(10,9): error TS2474: const enum member initializers must be constant expressions. -constEnum2.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnum2.ts(11,9): error TS2474: const enum member initializers must be constant expressions. -constEnum2.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2474: const enum member initializers must be constant expressions. - f = d - (100 * Math.floor(Math.random() % 8)), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2474: const enum member initializers must be constant expressions. - g = CONST, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! 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/constEnumDeclarations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumDeclarations.d.ts deleted file mode 100644 index 459605de1dc51..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumDeclarations.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -//// [tests/cases/compiler/constEnumDeclarations.ts] //// - -//// [constEnumDeclarations.ts] -const enum E { - A = 1, - B = 2, - C = A | B -} - -const enum E2 { - A = 1, - B, - C -} - -/// [Declarations] //// - - - -//// [constEnumDeclarations.d.ts] -declare const enum E { - A = 1, - B = 2, - C = 3 -} -declare const enum E2 { - A = 1, - B = 2, - C = 3 -} - -/// [Errors] //// - -constEnumDeclarations.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== constEnumDeclarations.ts (1 errors) ==== - const enum E { - A = 1, - B = 2, - C = A | B - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - const enum E2 { - A = 1, - B, - C - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumErrors.d.ts deleted file mode 100644 index 15a5f9e3e2210..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumErrors.d.ts +++ /dev/null @@ -1,211 +0,0 @@ -//// [tests/cases/compiler/constEnumErrors.ts] //// - -//// [constEnumErrors.ts] -const enum E { - A -} - -module E { - var x = 1; -} - -const enum E1 { - // illegal case - // forward reference to the element of the same enum - X = Y, - // forward reference to the element of the same enum - Y = E1.Z, - Y1 = E1["Z"] -} - -const enum E2 { - A -} - -var y0: any = E2[1] -var name = "A"; -var y1: any = E2[name]; -var y2: any = E2[`${name}`]; - -var x: typeof E2 = E2; -var y: (typeof E2)[] = [E2]; - -function foo(t: any): void { -} - -foo(E2); - -const enum NaNOrInfinity { - A = 9007199254740992, - B = A * A, - C = B * B, - D = C * C, - E = D * D, - F = E * E, // overflow - G = 1 / 0, // overflow - H = 0 / 0 // NaN -} - -/// [Declarations] //// - - - -//// [constEnumErrors.d.ts] -declare const enum E { - A = 0 -} -declare namespace E { -} -declare const enum E1 { - X, - Y, - Y1 -} -declare const enum E2 { - A = 0 -} -declare var y0: any; -declare var name: string; -declare var y1: any; -declare var y2: any; -declare var x: typeof E2; -declare var y: (typeof E2)[]; -declare function foo(t: any): void; -declare const enum NaNOrInfinity { - A = 9007199254740992, - B = 8.112963841460668e+31, - C = 6.582018229284824e+63, - D = 4.332296397063773e+127, - E = 1.876879207201175e+255, - F = Infinity,// overflow - G = Infinity,// overflow - H = NaN -} - -/// [Errors] //// - -constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -constEnumErrors.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -constEnumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. -constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. -constEnumErrors.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumErrors.ts(15,10): error TS2474: const enum member initializers must be constant expressions. -constEnumErrors.ts(15,13): error TS2339: Property 'Z' does not exist on type 'typeof E1'. -constEnumErrors.ts(22,18): error TS2476: A const enum member can only be accessed using a string literal. -constEnumErrors.ts(24,18): error TS2476: A const enum member can only be accessed using a string literal. -constEnumErrors.ts(25,18): error TS2476: A const enum member can only be accessed using a string literal. -constEnumErrors.ts(27,20): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -constEnumErrors.ts(28,25): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -constEnumErrors.ts(33,5): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -constEnumErrors.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumErrors.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumErrors.ts(39,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumErrors.ts(41,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumErrors.ts(41,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -constEnumErrors.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumErrors.ts(42,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -constEnumErrors.ts(43,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - - -==== constEnumErrors.ts (26 errors) ==== - const enum E { - ~ -!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. - A - } - - module E { - ~ -!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. - var x = 1; - } - - const enum E1 { - // illegal case - // forward reference to the element of the same enum - X = Y, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - // forward reference to the element of the same enum - Y = E1.Z, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ -!!! error TS2474: const enum member initializers must be constant expressions. - ~ -!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. - Y1 = E1["Z"] - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~ -!!! error TS2474: const enum member initializers must be constant expressions. - ~~~ -!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. - } - - const enum E2 { - A - } - - var y0: any = E2[1] - ~ -!!! error TS2476: A const enum member can only be accessed using a string literal. - var name = "A"; - var y1: any = E2[name]; - ~~~~ -!!! error TS2476: A const enum member can only be accessed using a string literal. - var y2: any = E2[`${name}`]; - ~~~~~~~~~ -!!! error TS2476: A const enum member can only be accessed using a string literal. - - var x: typeof E2 = E2; - ~~ -!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. - var y: (typeof E2)[] = [E2]; - ~~ -!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. - - function foo(t: any): void { - } - - foo(E2); - ~~ -!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. - - const enum NaNOrInfinity { - A = 9007199254740992, - B = A * A, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - C = B * B, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - D = C * C, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - E = D * D, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - F = E * E, // overflow - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - G = 1 / 0, // overflow - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - H = 0 / 0 // NaN - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumNamespaceReferenceCausesNoImport2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumNamespaceReferenceCausesNoImport2.d.ts deleted file mode 100644 index a5aef4fd0189b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumNamespaceReferenceCausesNoImport2.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -//// [tests/cases/compiler/constEnumNamespaceReferenceCausesNoImport2.ts] //// - -//// [index.ts] -import Foo = require("./reexport"); -function check(x: Foo.ConstFooEnum): void { - switch (x) { - case Foo.ConstFooEnum.Some: - break; - } -} -//// [foo.ts] -export module ConstEnumOnlyModule { - export const enum ConstFooEnum { - Some, - Values, - Here - } -} - -//// [reexport.ts] -import * as Foo from "./foo"; -export = Foo.ConstEnumOnlyModule; - - -/// [Declarations] //// - - - -//// [foo.d.ts] -export declare namespace ConstEnumOnlyModule { - const enum ConstFooEnum { - Some = 0, - Values = 1, - Here = 2 - } -} - -//// [index.d.ts] -export {}; - -//// [reexport.d.ts] -declare const _default: invalid; -export = _default; - -/// [Errors] //// - -reexport.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== index.ts (0 errors) ==== - import Foo = require("./reexport"); - function check(x: Foo.ConstFooEnum): void { - switch (x) { - case Foo.ConstFooEnum.Some: - break; - } - } -==== foo.ts (0 errors) ==== - export module ConstEnumOnlyModule { - export const enum ConstFooEnum { - Some, - Values, - Here - } - } - -==== reexport.ts (1 errors) ==== - import * as Foo from "./foo"; - export = Foo.ConstEnumOnlyModule; - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess1.d.ts deleted file mode 100644 index 19c200322ba94..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess1.d.ts +++ /dev/null @@ -1,101 +0,0 @@ -//// [tests/cases/conformance/constEnums/constEnumPropertyAccess1.ts] //// - -//// [constEnumPropertyAccess1.ts] -// constant enum declarations are completely erased in the emitted JavaScript code. -// it is an error to reference a constant enum object in any other context -// than a property access that selects one of the enum's members - -const enum G { - A = 1, - B = 2, - C = A + B, - D = A * 2 -} - -var o: { - [idx: number]: boolean -} = { - 1: true - }; - -var a: G = G.A; -var a1: G = G["A"]; -var g: boolean = o[G.A]; - -class C { - [G.A](): void { } - get [G.B](): number { - return true; - } - set [G.B](x: number) { } -} - - - -/// [Declarations] //// - - - -//// [constEnumPropertyAccess1.d.ts] -declare const enum G { - A = 1, - B = 2, - C = 3, - D = 2 -} -declare var o: { - [idx: number]: boolean; -}; -declare var a: G; -declare var a1: G; -declare var g: boolean; -declare class C { - [G.A](): void; - get [G.B](): number; - set [G.B](x: number); -} - -/// [Errors] //// - -constEnumPropertyAccess1.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumPropertyAccess1.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumPropertyAccess1.ts(25,9): error TS2322: Type 'boolean' is not assignable to type 'number'. - - -==== constEnumPropertyAccess1.ts (3 errors) ==== - // constant enum declarations are completely erased in the emitted JavaScript code. - // it is an error to reference a constant enum object in any other context - // than a property access that selects one of the enum's members - - const enum G { - A = 1, - B = 2, - C = A + B, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - D = A * 2 - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - var o: { - [idx: number]: boolean - } = { - 1: true - }; - - var a: G = G.A; - var a1: G = G["A"]; - var g: boolean = o[G.A]; - - class C { - [G.A](): void { } - get [G.B](): number { - return true; - ~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - } - set [G.B](x: number) { } - } - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess2.d.ts deleted file mode 100644 index ae0c5165a123d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess2.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -//// [tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts] //// - -//// [constEnumPropertyAccess2.ts] -// constant enum declarations are completely erased in the emitted JavaScript code. -// it is an error to reference a constant enum object in any other context -// than a property access that selects one of the enum's members - -const enum G { - A = 1, - B = 2, - C = A + B, - D = A * 2 -} - -// Error from referring constant enum in any other context than a property access -var z: typeof G = G; -var z1: any = G[G.A]; -var g: G; -g = "string"; -function foo(x: G): void { } -G.B = 3; - - -/// [Declarations] //// - - - -//// [constEnumPropertyAccess2.d.ts] -declare const enum G { - A = 1, - B = 2, - C = 3, - D = 2 -} -declare var z: typeof G; -declare var z1: any; -declare var g: G; -declare function foo(x: G): void; - -/// [Errors] //// - -constEnumPropertyAccess2.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumPropertyAccess2.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumPropertyAccess2.ts(13,19): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -constEnumPropertyAccess2.ts(14,17): error TS2476: A const enum member can only be accessed using a string literal. -constEnumPropertyAccess2.ts(16,1): error TS2322: Type '"string"' is not assignable to type 'G'. -constEnumPropertyAccess2.ts(18,3): error TS2540: Cannot assign to 'B' because it is a read-only property. - - -==== constEnumPropertyAccess2.ts (6 errors) ==== - // constant enum declarations are completely erased in the emitted JavaScript code. - // it is an error to reference a constant enum object in any other context - // than a property access that selects one of the enum's members - - const enum G { - A = 1, - B = 2, - C = A + B, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - D = A * 2 - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - // Error from referring constant enum in any other context than a property access - var z: typeof G = G; - ~ -!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. - var z1: any = G[G.A]; - ~~~ -!!! error TS2476: A const enum member can only be accessed using a string literal. - var g: G; - g = "string"; - ~ -!!! error TS2322: Type '"string"' is not assignable to type 'G'. - function foo(x: G): void { } - G.B = 3; - ~ -!!! error TS2540: Cannot assign to 'B' because it is a read-only property. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess3.d.ts deleted file mode 100644 index 3656db0ae1d91..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnumPropertyAccess3.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -//// [tests/cases/conformance/constEnums/constEnumPropertyAccess3.ts] //// - -//// [constEnumPropertyAccess3.ts] -const enum E { - A = ~1, - B = -1, - C = ~(1 + 1), - D = -(1 + 2), - E = 1 - 10, -} - -E.A.toString(); -E.B.toString(); -E.C.toString(); -E.D.toString(); - -E["A"].toString(); -E["B"].toString(); -E["C"].toString(); -E["D"].toString(); -E["E"].toString(); - - -/// [Declarations] //// - - - -//// [constEnumPropertyAccess3.d.ts] -declare const enum E { - A = -2, - B = -1, - C = -3, - D = -3, - E = -9 -} - -/// [Errors] //// - -constEnumPropertyAccess3.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumPropertyAccess3.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumPropertyAccess3.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumPropertyAccess3.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== constEnumPropertyAccess3.ts (4 errors) ==== - const enum E { - A = ~1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - B = -1, - C = ~(1 + 1), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - D = -(1 + 2), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - E = 1 - 10, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - E.A.toString(); - E.B.toString(); - E.C.toString(); - E.D.toString(); - - E["A"].toString(); - E["B"].toString(); - E["C"].toString(); - E["D"].toString(); - E["E"].toString(); - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnums.d.ts deleted file mode 100644 index b1250a9cc5feb..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnums.d.ts +++ /dev/null @@ -1,552 +0,0 @@ -//// [tests/cases/compiler/constEnums.ts] //// - -//// [constEnums.ts] -const enum Enum1 { - A0 = 100, -} - -const enum Enum1 { - // correct cases - A, - B, - C = 10, - D = A | B, - E = A | 1, - F = 1 | A, - G = (1 & 1), - H = ~(A | B), - I = A >>> 1, - J = 1 & A, - K = ~(1 | 5), - L = ~D, - M = E << B, - N = E << 1, - O = E >> B, - P = E >> 1, - PQ = E ** 2, - Q = -D, - R = C & 5, - S = 5 & C, - T = C | D, - U = C | 1, - V = 10 | D, - W = Enum1.V, - - // correct cases: reference to the enum member from different enum declaration - W1 = A0, - W2 = Enum1.A0, - W3 = Enum1["A0"], - W4 = Enum1["W"], - W5 = Enum1[`V`], -} - -const enum Comments { - "//", - "/*", - "*/", - "///", - "#", - "", -} - -module A { - export module B { - export module C { - export const enum E { - V1 = 1, - V2 = A.B.C.E.V1 | 100 - } - } - } -} - -module A { - export module B { - export module C { - export const enum E { - V3 = A.B.C.E["V2"] & 200, - V4 = A.B.C.E[`V1`] << 1, - } - } - } -} - -module A1 { - export module B { - export module C { - export const enum E { - V1 = 10, - V2 = 110, - } - } - } -} - -module A2 { - export module B { - export module C { - export const enum E { - V1 = 10, - V2 = 110, - } - } - // module C will be classified as value - export module C { - var x = 1 - } - } -} - -import I = A.B.C.E; -import I1 = A1.B; -import I2 = A2.B; - -function foo0(e: I): void { - if (e === I.V1) { - } - else if (e === I.V2) { - } -} - -function foo1(e: I1.C.E): void { - if (e === I1.C.E.V1) { - } - else if (e === I1.C.E.V2) { - } -} - -function foo2(e: I2.C.E): void { - if (e === I2.C.E.V1) { - } - else if (e === I2.C.E.V2) { - } -} - - -function foo(x: Enum1): void { - switch (x) { - case Enum1.A: - case Enum1.B: - case Enum1.C: - case Enum1.D: - case Enum1.E: - case Enum1.F: - case Enum1.G: - case Enum1.H: - case Enum1.I: - case Enum1.J: - case Enum1.K: - case Enum1.L: - case Enum1.M: - case Enum1.N: - case Enum1.O: - case Enum1.P: - case Enum1.PQ: - case Enum1.Q: - case Enum1.R: - case Enum1.S: - case Enum1["T"]: - case Enum1[`U`]: - case Enum1.V: - case Enum1.W: - case Enum1.W1: - case Enum1.W2: - case Enum1.W3: - case Enum1.W4: - break; - } -} - -function bar(e: A.B.C.E): number { - switch (e) { - case A.B.C.E.V1: return 1; - case A.B.C.E.V2: return 1; - case A.B.C.E.V3: return 1; - } -} - -function baz(c: Comments): void { - switch (c) { - case Comments["//"]: - case Comments["/*"]: - case Comments["*/"]: - case Comments["///"]: - case Comments["#"]: - case Comments[""]: - break; - } -} - - -/// [Declarations] //// - - - -//// [constEnums.d.ts] -declare const enum Enum1 { - A0 = 100 -} -declare const enum Enum1 { - A = 0, - B = 1, - C = 10, - D = 1, - E = 1, - F = 1, - G = 1, - H = -2, - I = 0, - J = 0, - K = -6, - L = -2, - M = 2, - N = 2, - O = 0, - P = 0, - PQ = 1, - Q = -1, - R = 0, - S = 0, - T = 11, - U = 11, - V = 11, - W = 11, - W1, - W2, - W3, - W4 = 11, - W5 = 11 -} -declare const enum Comments { - "//" = 0, - "/*" = 1, - "*/" = 2, - "///" = 3, - "#" = 4, - "" = 6 -} -declare namespace A { - namespace B { - namespace C { - const enum E { - V1 = 1, - V2 - } - } - } -} -declare namespace A { - namespace B { - namespace C { - const enum E { - V3, - V4 - } - } - } -} -declare namespace A1 { - namespace B { - namespace C { - const enum E { - V1 = 10, - V2 = 110 - } - } - } -} -declare namespace A2 { - namespace B { - namespace C { - const enum E { - V1 = 10, - V2 = 110 - } - } - namespace C { - } - } -} -import I = A.B.C.E; -import I1 = A1.B; -import I2 = A2.B; -declare function foo0(e: I): void; -declare function foo1(e: I1.C.E): void; -declare function foo2(e: I2.C.E): void; -declare function foo(x: Enum1): void; -declare function bar(e: A.B.C.E): number; -declare function baz(c: Comments): void; - -/// [Errors] //// - -constEnums.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(16,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(17,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(18,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(19,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(23,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(24,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(55,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(65,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(66,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== constEnums.ts (29 errors) ==== - const enum Enum1 { - A0 = 100, - } - - const enum Enum1 { - // correct cases - A, - B, - C = 10, - D = A | B, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - E = A | 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - F = 1 | A, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - G = (1 & 1), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - H = ~(A | B), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - I = A >>> 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - J = 1 & A, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - K = ~(1 | 5), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - L = ~D, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - M = E << B, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - N = E << 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - O = E >> B, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - P = E >> 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - PQ = E ** 2, - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Q = -D, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - R = C & 5, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - S = 5 & C, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - T = C | D, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - U = C | 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - V = 10 | D, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - W = Enum1.V, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - // correct cases: reference to the enum member from different enum declaration - W1 = A0, - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - W2 = Enum1.A0, - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - W3 = Enum1["A0"], - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - W4 = Enum1["W"], - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - W5 = Enum1[`V`], - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - const enum Comments { - "//", - "/*", - "*/", - "///", - "#", - "", - } - - module A { - export module B { - export module C { - export const enum E { - V1 = 1, - V2 = A.B.C.E.V1 | 100 - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - } - } - } - - module A { - export module B { - export module C { - export const enum E { - V3 = A.B.C.E["V2"] & 200, - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - V4 = A.B.C.E[`V1`] << 1, - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - } - } - } - - module A1 { - export module B { - export module C { - export const enum E { - V1 = 10, - V2 = 110, - } - } - } - } - - module A2 { - export module B { - export module C { - export const enum E { - V1 = 10, - V2 = 110, - } - } - // module C will be classified as value - export module C { - var x = 1 - } - } - } - - import I = A.B.C.E; - import I1 = A1.B; - import I2 = A2.B; - - function foo0(e: I): void { - if (e === I.V1) { - } - else if (e === I.V2) { - } - } - - function foo1(e: I1.C.E): void { - if (e === I1.C.E.V1) { - } - else if (e === I1.C.E.V2) { - } - } - - function foo2(e: I2.C.E): void { - if (e === I2.C.E.V1) { - } - else if (e === I2.C.E.V2) { - } - } - - - function foo(x: Enum1): void { - switch (x) { - case Enum1.A: - case Enum1.B: - case Enum1.C: - case Enum1.D: - case Enum1.E: - case Enum1.F: - case Enum1.G: - case Enum1.H: - case Enum1.I: - case Enum1.J: - case Enum1.K: - case Enum1.L: - case Enum1.M: - case Enum1.N: - case Enum1.O: - case Enum1.P: - case Enum1.PQ: - case Enum1.Q: - case Enum1.R: - case Enum1.S: - case Enum1["T"]: - case Enum1[`U`]: - case Enum1.V: - case Enum1.W: - case Enum1.W1: - case Enum1.W2: - case Enum1.W3: - case Enum1.W4: - break; - } - } - - function bar(e: A.B.C.E): number { - switch (e) { - case A.B.C.E.V1: return 1; - case A.B.C.E.V2: return 1; - case A.B.C.E.V3: return 1; - } - } - - function baz(c: Comments): void { - switch (c) { - case Comments["//"]: - case Comments["/*"]: - case Comments["*/"]: - case Comments["///"]: - case Comments["#"]: - case Comments[""]: - break; - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constantEnumAssert.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constantEnumAssert.d.ts deleted file mode 100644 index 3715c44979225..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constantEnumAssert.d.ts +++ /dev/null @@ -1,229 +0,0 @@ -//// [tests/cases/compiler/constantEnumAssert.ts] //// - -//// [constantEnumAssert.ts] -enum E1 { - a, - b -} - -enum E2 { - a = 'a', - b = 'b' -} - -enum E3 { - a = 1, - b = a << 1, - c = a << 2, -} - -const enum E4 { - a, - b -} - -const E5 = { - a: 'a', - b: 'b' -} - -const foo1: { - a: E1 -} = { a: E1.a } - -const foo2: { - a: E2 -} = { a: E2.a } - -const foo3: { - readonly a: E1.a -} = { a: E1.a } as const - -const foo4: { - readonly a: E2.a -} = { a: E2.a } as const - -const foo5: { - readonly a: E3.a -} = { a: E3.a } as const - -const foo6: { - readonly a: E4.a -} = { a: E4.a } as const - -const foo7: { - readonly a: string -} = { a: E5.a } as const - -const foo8: { - a: E1.a -} = { a: E1.a as const } - -const foo9: { - a: E2.a -} = { a: E2.a as const } - -const foo10: { - a: E3.a -} = { a: E3.a as const } - -const foo11: { - a: E4.a -} = { a: E4.a as const } - -const foo12: { - a: string -} = { a: E5.a as const } - - -/// [Declarations] //// - - - -//// [constantEnumAssert.d.ts] -declare enum E1 { - a = 0, - b = 1 -} -declare enum E2 { - a = "a", - b = "b" -} -declare enum E3 { - a = 1, - b = 2, - c = 4 -} -declare const enum E4 { - a = 0, - b = 1 -} -declare const E5: { - a: string; - b: string; -}; -declare const foo1: { - a: E1; -}; -declare const foo2: { - a: E2; -}; -declare const foo3: { - readonly a: E1.a; -}; -declare const foo4: { - readonly a: E2.a; -}; -declare const foo5: { - readonly a: E3.a; -}; -declare const foo6: { - readonly a: E4.a; -}; -declare const foo7: { - readonly a: string; -}; -declare const foo8: { - a: E1.a; -}; -declare const foo9: { - a: E2.a; -}; -declare const foo10: { - a: E3.a; -}; -declare const foo11: { - a: E4.a; -}; -declare const foo12: { - a: string; -}; - -/// [Errors] //// - -constantEnumAssert.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constantEnumAssert.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constantEnumAssert.ts(73,10): error TS1355: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. - - -==== constantEnumAssert.ts (3 errors) ==== - enum E1 { - a, - b - } - - enum E2 { - a = 'a', - b = 'b' - } - - enum E3 { - a = 1, - b = a << 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = a << 2, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - const enum E4 { - a, - b - } - - const E5 = { - a: 'a', - b: 'b' - } - - const foo1: { - a: E1 - } = { a: E1.a } - - const foo2: { - a: E2 - } = { a: E2.a } - - const foo3: { - readonly a: E1.a - } = { a: E1.a } as const - - const foo4: { - readonly a: E2.a - } = { a: E2.a } as const - - const foo5: { - readonly a: E3.a - } = { a: E3.a } as const - - const foo6: { - readonly a: E4.a - } = { a: E4.a } as const - - const foo7: { - readonly a: string - } = { a: E5.a } as const - - const foo8: { - a: E1.a - } = { a: E1.a as const } - - const foo9: { - a: E2.a - } = { a: E2.a as const } - - const foo10: { - a: E3.a - } = { a: E3.a as const } - - const foo11: { - a: E4.a - } = { a: E4.a as const } - - const foo12: { - a: string - } = { a: E5.a as const } - ~~~~ -!!! error TS1355: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constructorWithIncompleteTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constructorWithIncompleteTypeAnnotation.d.ts deleted file mode 100644 index 1a0b32786e535..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constructorWithIncompleteTypeAnnotation.d.ts +++ /dev/null @@ -1,913 +0,0 @@ -//// [tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts] //// - -//// [constructorWithIncompleteTypeAnnotation.ts] -declare module "fs" { - export class File { - constructor(filename: string); - public ReadAllText(): string; - } - export interface IFile { - [index: number]: string; - } -} - -import fs = module("fs"); - - -module TypeScriptAllInOne { - export class Program { - static Main(...args: string[]): void { - try { - var bfs = new BasicFeatures(); - var retValue: number = 0; - - retValue = bfs.VARIABLES(); - if (retValue != 0 ^= { - - return 1; - } - - case: any = bfs.STATEMENTS(4); - if (retValue: any != 0) { - - return 1; - ^ - - - retValue = bfs.TYPES(); - if (retValue != 0) { - - return 1 && - } - - retValue = bfs.OPERATOR ' ); - if (retValue != 0) { - - return 1; - } - } - catch (e) { - console.log(e); - } - finally { - - } - - console.log('Done'); - - return 0; - - } - } - - class BasicFeatures { - /// - /// Test various of variables. Including nullable,key world as variable,special format - /// - /// - public VARIABLES(): number { - var local = Number.MAX_VALUE; - var min = Number.MIN_VALUE; - var inf = Number.NEGATIVE_INFINITY - - var nan = Number.NaN; - var undef = undefined; - - var _\uD4A5\u7204\uC316\uE59F = local; - var мир = local; - - var local5 = null; - var local6 = local5 instanceof fs.File; - - var hex = 0xBADC0DE, Hex = 0XDEADBEEF; - var float = 6.02e23, float2 = 6.02E-23 - var char = 'c', \u0066 = '\u0066', hexchar = '\x42' != - var quoted = '"', quoted2 = "'"; - var reg = /\w*/; - var objLit = { "var": number = 42, equals: function (x) { return x["var"] === 42; }, instanceof : () => 'objLit{42}' }; - var weekday = Weekdays.Monday; - - var con = char + f + hexchar + float.toString() + float2.toString() + reg.toString() + objLit + weekday; - - // - var any = 0 ^= - var bool = 0; - var declare = 0; - var constructor = 0; - var get = 0; - var implements = 0; - var interface = 0; - var let = 0; - var module = 0; - var number = 0; - var package = 0; - var private = 0; - var protected = 0; - var public = 0; - var set = 0; - var static = 0; - var string = 0 /> - var yield = 0; - - var sum3 = any + bool + declare + constructor + get + implements + interface + let + module + number + package + private + protected + public + set + static + string + yield; - - return 0; - } - - /// - /// Test different statements. Including if-else,swith,foreach,(un)checked,lock,using,try-catch-finally - /// - /// - /// - STATEMENTS(i: number): number { - var retVal = 0; - if (i == 1) - retVal = 1; - else - retVal = 0; - switch (i) { - case 2: - retVal = 1; - break; - case 3: - retVal = 1; - break; - default: - break; - } - - for (var x in { x: 0, y: 1 }) { - ! - - try { - throw null; - } - catch (Exception) ? - } - finally { - try { } - catch (Exception) { } - } - - return retVal; - } - - /// - /// Test types in ts language. Including class,struct,interface,delegate,anonymous type - /// - /// - public TYPES(): number { - var retVal = 0; - var c = new CLASS(); - var xx: IF = c; - retVal += catch .Property; - retVal += c.Member(); - retVal += xx.Foo() ? 0 : 1; - - //anonymous type - var anony = { a: new CLASS() }; - - retVal += anony.a.d(); - - return retVal; - } - - - ///// - ///// Test different operators - ///// - ///// - public OPERATOR(): number { - var a: number[] = [1, 2, 3, 4, 5, ];/*[] bug*/ // YES [] - var i = a[1];/*[]*/ - i = i + i - i * i / i % i & i | i ^ i;/*+ - * / % & | ^*/ - var b = true && false || true ^ false;/*& | ^*/ - b = !b;/*!*/ - i = ~i;/*~i*/ - b = i < (i - 1) && (i + 1) > i;/*< && >*/ - var f = true ? 1 : 0;/*? :*/ // YES : - i++;/*++*/ - i--;/*--*/ - b = true && false || true;/*&& ||*/ - i = i << 5;/*<<*/ - i = i >> 5;/*>>*/ - var j = i; - b = i == j && i != j && i <= j && i >= j;/*= == && != <= >=*/ - i += 5.0;/*+=*/ - i -= i;/*-=*/ - i *= i;/**=*/ - if (i == 0) - i++; - i /= i;/*/=*/ - i %= i;/*%=*/ - i &= i;/*&=*/ - i |= i;/*|=*/ - i ^= i;/*^=*/ - i <<= i;/*<<=*/ - i >>= i;/*>>=*/ - - if (i == 0 && != b && f == 1) - return 0; - else return 1; - } - - } - - interface IF { - Foo(): bool; - } - - class CLASS implements IF { - - case d = (): void => { yield 0; }; - public get Property(): number { return 0; } - public Member(): number { - return 0; - } - public Foo(): bool { - var myEvent = () => { return 1; }; - if (myEvent() == 1) - return true ? - else - return false; - } - } - - - // todo: use these - class A . - public method1(val:number) { - return val; - } - public method2() { - return 2 * this.method1(2); - } - } - - class B extends A { - - public method2(): any { - return this.method1(2); - } - } - - class Overloading { - - private otherValue = 42; - - constructor(private value: number, public name: string) : } - - public Overloads(value: string); - public Overloads( while : string, ...rest: string[]) { & - - public DefaultValue(value?: string = "Hello") { } - } -} - -enum Weekdays { - Monday, - Tuesday, - Weekend, -} - -enum Fruit { - Apple, - Pear -} - -interface IDisposable { - Dispose(): void; -} - -TypeScriptAllInOne.Program.Main(); - - -/// [Declarations] //// - - - -//// [constructorWithIncompleteTypeAnnotation.d.ts] -declare module "fs" { - class File { - constructor(filename: string); - ReadAllText(): string; - } - interface IFile { - [index: number]: string; - } -} -import fs = module; -declare namespace TypeScriptAllInOne { - class Program { - static Main(...args: string[]): void; - case: any; - if(retValue: any): invalid; - } -} -declare class BasicFeatures { - VARIABLES(): number; - STATEMENTS(i: number): number; - TYPES(): number; - OPERATOR(): number; -} -interface IF { - Foo(): bool; -} -declare class CLASS implements IF { - d: () => void; - get Property(): number; - Member(): number; - Foo(): bool; -} -declare class A { -} -declare class B extends A { - method2(): any; -} -declare class Overloading { - private otherValue; - constructor(value: number, name: string); -} -declare enum Weekdays { - Monday = 0, - Tuesday = 1, - Weekend = 2 -} -declare enum Fruit { - Apple = 0, - Pear = 1 -} -interface IDisposable { - Dispose(): void; -} - -/// [Errors] //// - -constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2503: Cannot find namespace 'module'. -constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -constructorWithIncompleteTypeAnnotation.ts(11,13): error TS4000: Import declaration 'fs' is using private name 'module'. -constructorWithIncompleteTypeAnnotation.ts(11,19): error TS1005: ';' expected. -constructorWithIncompleteTypeAnnotation.ts(22,35): error TS1005: ')' expected. -constructorWithIncompleteTypeAnnotation.ts(22,39): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -constructorWithIncompleteTypeAnnotation.ts(24,28): error TS1005: ':' expected. -constructorWithIncompleteTypeAnnotation.ts(24,29): error TS1005: ',' expected. -constructorWithIncompleteTypeAnnotation.ts(27,18): error TS1128: Declaration or statement expected. -constructorWithIncompleteTypeAnnotation.ts(27,31): error TS2304: Cannot find name 'bfs'. -constructorWithIncompleteTypeAnnotation.ts(28,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constructorWithIncompleteTypeAnnotation.ts(28,35): error TS1005: ',' expected. -constructorWithIncompleteTypeAnnotation.ts(28,39): error TS1005: ';' expected. -constructorWithIncompleteTypeAnnotation.ts(31,18): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(34,17): error TS2304: Cannot find name 'retValue'. -constructorWithIncompleteTypeAnnotation.ts(34,26): error TS1005: ';' expected. -constructorWithIncompleteTypeAnnotation.ts(34,28): error TS2304: Cannot find name 'bfs'. -constructorWithIncompleteTypeAnnotation.ts(35,21): error TS2304: Cannot find name 'retValue'. -constructorWithIncompleteTypeAnnotation.ts(38,17): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(40,17): error TS2304: Cannot find name 'retValue'. -constructorWithIncompleteTypeAnnotation.ts(40,28): error TS2304: Cannot find name 'bfs'. -constructorWithIncompleteTypeAnnotation.ts(40,41): error TS1005: ';' expected. -constructorWithIncompleteTypeAnnotation.ts(40,45): error TS1002: Unterminated string literal. -constructorWithIncompleteTypeAnnotation.ts(41,21): error TS2304: Cannot find name 'retValue'. -constructorWithIncompleteTypeAnnotation.ts(46,13): error TS1005: 'try' expected. -constructorWithIncompleteTypeAnnotation.ts(47,17): error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. -constructorWithIncompleteTypeAnnotation.ts(53,13): error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. -constructorWithIncompleteTypeAnnotation.ts(58,5): error TS1128: Declaration or statement expected. -constructorWithIncompleteTypeAnnotation.ts(69,13): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(72,37): error TS1127: Invalid character. -constructorWithIncompleteTypeAnnotation.ts(81,13): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(89,23): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -constructorWithIncompleteTypeAnnotation.ts(90,13): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(105,29): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(106,13): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(108,24): error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. -constructorWithIncompleteTypeAnnotation.ts(138,13): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(141,32): error TS1005: '{' expected. -constructorWithIncompleteTypeAnnotation.ts(143,13): error TS1005: 'try' expected. -constructorWithIncompleteTypeAnnotation.ts(159,24): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(159,30): error TS1005: '{' expected. -constructorWithIncompleteTypeAnnotation.ts(159,31): error TS2304: Cannot find name 'Property'. -constructorWithIncompleteTypeAnnotation.ts(166,13): error TS2365: Operator '+=' cannot be applied to types 'number' and 'void'. -constructorWithIncompleteTypeAnnotation.ts(180,40): error TS2447: The '^' operator is not allowed for boolean types. Consider using '!==' instead. -constructorWithIncompleteTypeAnnotation.ts(181,13): error TS2322: Type 'boolean' is not assignable to type 'number'. -constructorWithIncompleteTypeAnnotation.ts(183,13): error TS2322: Type 'boolean' is not assignable to type 'number'. -constructorWithIncompleteTypeAnnotation.ts(187,13): error TS2322: Type 'boolean' is not assignable to type 'number'. -constructorWithIncompleteTypeAnnotation.ts(191,13): error TS2322: Type 'boolean' is not assignable to type 'number'. -constructorWithIncompleteTypeAnnotation.ts(205,28): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(213,16): error TS2304: Cannot find name 'bool'. -constructorWithIncompleteTypeAnnotation.ts(213,16): error TS4057: Return type of method from exported interface has or is using private name 'bool'. -constructorWithIncompleteTypeAnnotation.ts(218,10): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. -constructorWithIncompleteTypeAnnotation.ts(223,23): error TS2304: Cannot find name 'bool'. -constructorWithIncompleteTypeAnnotation.ts(223,23): error TS4055: Return type of public method from exported class has or is using private name 'bool'. -constructorWithIncompleteTypeAnnotation.ts(227,13): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(234,14): error TS1005: '{' expected. -constructorWithIncompleteTypeAnnotation.ts(235,9): error TS1128: Declaration or statement expected. -constructorWithIncompleteTypeAnnotation.ts(235,16): error TS2304: Cannot find name 'method1'. -constructorWithIncompleteTypeAnnotation.ts(235,24): error TS2304: Cannot find name 'val'. -constructorWithIncompleteTypeAnnotation.ts(235,27): error TS1005: ',' expected. -constructorWithIncompleteTypeAnnotation.ts(235,28): error TS2693: 'number' only refers to a type, but is being used as a value here. -constructorWithIncompleteTypeAnnotation.ts(235,36): error TS1005: ';' expected. -constructorWithIncompleteTypeAnnotation.ts(238,9): error TS1128: Declaration or statement expected. -constructorWithIncompleteTypeAnnotation.ts(238,16): error TS2304: Cannot find name 'method2'. -constructorWithIncompleteTypeAnnotation.ts(238,26): error TS1005: ';' expected. -constructorWithIncompleteTypeAnnotation.ts(241,5): error TS1128: Declaration or statement expected. -constructorWithIncompleteTypeAnnotation.ts(246,25): error TS2551: Property 'method1' does not exist on type 'B'. Did you mean 'method2'? -constructorWithIncompleteTypeAnnotation.ts(254,9): error TS2390: Constructor implementation is missing. -constructorWithIncompleteTypeAnnotation.ts(254,21): error TS2369: A parameter property is only allowed in a constructor implementation. -constructorWithIncompleteTypeAnnotation.ts(254,44): error TS2369: A parameter property is only allowed in a constructor implementation. -constructorWithIncompleteTypeAnnotation.ts(254,69): error TS1110: Type expected. -constructorWithIncompleteTypeAnnotation.ts(256,9): error TS1128: Declaration or statement expected. -constructorWithIncompleteTypeAnnotation.ts(256,16): error TS2304: Cannot find name 'Overloads'. -constructorWithIncompleteTypeAnnotation.ts(256,26): error TS2304: Cannot find name 'value'. -constructorWithIncompleteTypeAnnotation.ts(256,31): error TS1005: ',' expected. -constructorWithIncompleteTypeAnnotation.ts(256,33): error TS2693: 'string' only refers to a type, but is being used as a value here. -constructorWithIncompleteTypeAnnotation.ts(257,9): error TS1128: Declaration or statement expected. -constructorWithIncompleteTypeAnnotation.ts(257,16): error TS2304: Cannot find name 'Overloads'. -constructorWithIncompleteTypeAnnotation.ts(257,27): error TS1135: Argument expression expected. -constructorWithIncompleteTypeAnnotation.ts(257,33): error TS1005: '(' expected. -constructorWithIncompleteTypeAnnotation.ts(257,35): error TS2693: 'string' only refers to a type, but is being used as a value here. -constructorWithIncompleteTypeAnnotation.ts(257,43): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(257,52): error TS2693: 'string' only refers to a type, but is being used as a value here. -constructorWithIncompleteTypeAnnotation.ts(257,59): error TS1011: An element access expression should take an argument. -constructorWithIncompleteTypeAnnotation.ts(257,60): error TS1005: ';' expected. -constructorWithIncompleteTypeAnnotation.ts(257,65): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(259,9): error TS2304: Cannot find name 'public'. -constructorWithIncompleteTypeAnnotation.ts(259,16): error TS1005: ';' expected. -constructorWithIncompleteTypeAnnotation.ts(259,16): error TS2304: Cannot find name 'DefaultValue'. -constructorWithIncompleteTypeAnnotation.ts(259,29): error TS2304: Cannot find name 'value'. -constructorWithIncompleteTypeAnnotation.ts(259,35): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(259,37): error TS2693: 'string' only refers to a type, but is being used as a value here. -constructorWithIncompleteTypeAnnotation.ts(259,55): error TS1005: ';' expected. -constructorWithIncompleteTypeAnnotation.ts(261,1): error TS1128: Declaration or statement expected. - - -==== constructorWithIncompleteTypeAnnotation.ts (94 errors) ==== - declare module "fs" { - export class File { - constructor(filename: string); - public ReadAllText(): string; - } - export interface IFile { - [index: number]: string; - } - } - - import fs = module("fs"); - ~~~~~~ -!!! error TS2503: Cannot find namespace 'module'. - ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - ~~~~~~ -!!! error TS4000: Import declaration 'fs' is using private name 'module'. - ~ -!!! error TS1005: ';' expected. - - - module TypeScriptAllInOne { - export class Program { - static Main(...args: string[]): void { - try { - var bfs = new BasicFeatures(); - var retValue: number = 0; - - retValue = bfs.VARIABLES(); - if (retValue != 0 ^= { - ~~ -!!! error TS1005: ')' expected. -!!! related TS1007 constructorWithIncompleteTypeAnnotation.ts:22:20: The parser expected to find a ')' to match the '(' token here. - ~ - - - return 1; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ~ -!!! error TS1005: ':' expected. - ~ -!!! error TS1005: ',' expected. - } - ~~~~~~~~~~~~~~~~~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - - case: any = bfs.STATEMENTS(4); - ~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~ -!!! error TS2304: Cannot find name 'bfs'. - if (retValue: any != 0) { - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ -!!! error TS1005: ',' expected. - ~ -!!! error TS1005: ';' expected. - - return 1; - ^ - ~ -!!! error TS1109: Expression expected. - - - retValue = bfs.TYPES(); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'retValue'. - ~ -!!! error TS1005: ';' expected. - ~~~ -!!! error TS2304: Cannot find name 'bfs'. - if (retValue != 0) { - ~~~~~~~~ -!!! error TS2304: Cannot find name 'retValue'. - - return 1 && - } - ~ -!!! error TS1109: Expression expected. - - retValue = bfs.OPERATOR ' ); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'retValue'. - ~~~ -!!! error TS2304: Cannot find name 'bfs'. - ~~~~ -!!! error TS1005: ';' expected. - -!!! error TS1002: Unterminated string literal. - if (retValue != 0) { - ~~~~~~~~ -!!! error TS2304: Cannot find name 'retValue'. - - return 1; - } - } - catch (e) { - ~~~~~ -!!! error TS1005: 'try' expected. - console.log(e); - ~~~~~~~ -!!! error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. - } - finally { - - } - - console.log('Done'); - ~~~~~~~ -!!! error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. - - return 0; - - } - } - ~ -!!! error TS1128: Declaration or statement expected. - - class BasicFeatures { - /// - /// Test various of variables. Including nullable,key world as variable,special format - /// - /// - public VARIABLES(): number { - var local = Number.MAX_VALUE; - var min = Number.MIN_VALUE; - var inf = Number.NEGATIVE_INFINITY - - var nan = Number.NaN; - ~~~ -!!! error TS1109: Expression expected. - var undef = undefined; - - var _\uD4A5\u7204\uC316\uE59F = local; - -!!! error TS1127: Invalid character. - var мир = local; - - var local5 = null; - var local6 = local5 instanceof fs.File; - - var hex = 0xBADC0DE, Hex = 0XDEADBEEF; - var float = 6.02e23, float2 = 6.02E-23 - var char = 'c', \u0066 = '\u0066', hexchar = '\x42' != - var quoted = '"', quoted2 = "'"; - ~~~ -!!! error TS1109: Expression expected. - var reg = /\w*/; - var objLit = { "var": number = 42, equals: function (x) { return x["var"] === 42; }, instanceof : () => 'objLit{42}' }; - var weekday = Weekdays.Monday; - - var con = char + f + hexchar + float.toString() + float2.toString() + reg.toString() + objLit + weekday; - - // - var any = 0 ^= - ~ -!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. - var bool = 0; - ~~~ -!!! error TS1109: Expression expected. - var declare = 0; - var constructor = 0; - var get = 0; - var implements = 0; - var interface = 0; - var let = 0; - var module = 0; - var number = 0; - var package = 0; - var private = 0; - var protected = 0; - var public = 0; - var set = 0; - var static = 0; - var string = 0 /> - ~ -!!! error TS1109: Expression expected. - var yield = 0; - ~~~ -!!! error TS1109: Expression expected. - - var sum3 = any + bool + declare + constructor + get + implements + interface + let + module + number + package + private + protected + public + set + static + string + yield; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. - - return 0; - } - - /// - /// Test different statements. Including if-else,swith,foreach,(un)checked,lock,using,try-catch-finally - /// - /// - /// - STATEMENTS(i: number): number { - var retVal = 0; - if (i == 1) - retVal = 1; - else - retVal = 0; - switch (i) { - case 2: - retVal = 1; - break; - case 3: - retVal = 1; - break; - default: - break; - } - - for (var x in { x: 0, y: 1 }) { - ! - - try { - ~~~ -!!! error TS1109: Expression expected. - throw null; - } - catch (Exception) ? - ~ -!!! error TS1005: '{' expected. - } - finally { - ~~~~~~~ -!!! error TS1005: 'try' expected. - try { } - catch (Exception) { } - } - - return retVal; - } - - /// - /// Test types in ts language. Including class,struct,interface,delegate,anonymous type - /// - /// - public TYPES(): number { - var retVal = 0; - var c = new CLASS(); - var xx: IF = c; - retVal += catch .Property; - ~~~~~ -!!! error TS1109: Expression expected. - ~ -!!! error TS1005: '{' expected. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Property'. - retVal += c.Member(); - retVal += xx.Foo() ? 0 : 1; - - //anonymous type - var anony = { a: new CLASS() }; - - retVal += anony.a.d(); - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2365: Operator '+=' cannot be applied to types 'number' and 'void'. - - return retVal; - } - - - ///// - ///// Test different operators - ///// - ///// - public OPERATOR(): number { - var a: number[] = [1, 2, 3, 4, 5, ];/*[] bug*/ // YES [] - var i = a[1];/*[]*/ - i = i + i - i * i / i % i & i | i ^ i;/*+ - * / % & | ^*/ - var b = true && false || true ^ false;/*& | ^*/ - ~~~~~~~~~~~~ -!!! error TS2447: The '^' operator is not allowed for boolean types. Consider using '!==' instead. - b = !b;/*!*/ - ~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - i = ~i;/*~i*/ - b = i < (i - 1) && (i + 1) > i;/*< && >*/ - ~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - var f = true ? 1 : 0;/*? :*/ // YES : - i++;/*++*/ - i--;/*--*/ - b = true && false || true;/*&& ||*/ - ~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - i = i << 5;/*<<*/ - i = i >> 5;/*>>*/ - var j = i; - b = i == j && i != j && i <= j && i >= j;/*= == && != <= >=*/ - ~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - i += 5.0;/*+=*/ - i -= i;/*-=*/ - i *= i;/**=*/ - if (i == 0) - i++; - i /= i;/*/=*/ - i %= i;/*%=*/ - i &= i;/*&=*/ - i |= i;/*|=*/ - i ^= i;/*^=*/ - i <<= i;/*<<=*/ - i >>= i;/*>>=*/ - - if (i == 0 && != b && f == 1) - ~~ -!!! error TS1109: Expression expected. - return 0; - else return 1; - } - - } - - interface IF { - Foo(): bool; - ~~~~ -!!! error TS2304: Cannot find name 'bool'. - ~~~~ -!!! error TS4057: Return type of method from exported interface has or is using private name 'bool'. - } - - class CLASS implements IF { - - case d = (): void => { yield 0; }; - ~~~~ -!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. - public get Property(): number { return 0; } - public Member(): number { - return 0; - } - public Foo(): bool { - ~~~~ -!!! error TS2304: Cannot find name 'bool'. - ~~~~ -!!! error TS4055: Return type of public method from exported class has or is using private name 'bool'. - var myEvent = () => { return 1; }; - if (myEvent() == 1) - return true ? - else - ~~~~ -!!! error TS1109: Expression expected. - return false; - } - } - - - // todo: use these - class A . - ~ -!!! error TS1005: '{' expected. - public method1(val:number) { - ~~~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~~~~~ -!!! error TS2304: Cannot find name 'method1'. - ~~~ -!!! error TS2304: Cannot find name 'val'. - ~ -!!! error TS1005: ',' expected. - ~~~~~~ -!!! error TS2693: 'number' only refers to a type, but is being used as a value here. - ~ -!!! error TS1005: ';' expected. - return val; - } - public method2() { - ~~~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~~~~~ -!!! error TS2304: Cannot find name 'method2'. - ~ -!!! error TS1005: ';' expected. - return 2 * this.method1(2); - } - } - ~ -!!! error TS1128: Declaration or statement expected. - - class B extends A { - - public method2(): any { - return this.method1(2); - ~~~~~~~ -!!! error TS2551: Property 'method1' does not exist on type 'B'. Did you mean 'method2'? -!!! related TS2728 constructorWithIncompleteTypeAnnotation.ts:245:16: 'method2' is declared here. - } - } - - class Overloading { - - private otherValue = 42; - - constructor(private value: number, public name: string) : } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2390: Constructor implementation is missing. - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2369: A parameter property is only allowed in a constructor implementation. - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2369: A parameter property is only allowed in a constructor implementation. - ~ -!!! error TS1110: Type expected. - - public Overloads(value: string); - ~~~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~~~~~~~ -!!! error TS2304: Cannot find name 'Overloads'. - ~~~~~ -!!! error TS2304: Cannot find name 'value'. - ~ -!!! error TS1005: ',' expected. - ~~~~~~ -!!! error TS2693: 'string' only refers to a type, but is being used as a value here. - public Overloads( while : string, ...rest: string[]) { & - ~~~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~~~~~~~ -!!! error TS2304: Cannot find name 'Overloads'. - ~~~~~ -!!! error TS1135: Argument expression expected. - ~ -!!! error TS1005: '(' expected. - ~~~~~~ -!!! error TS2693: 'string' only refers to a type, but is being used as a value here. - ~~~ -!!! error TS1109: Expression expected. - ~~~~~~ -!!! error TS2693: 'string' only refers to a type, but is being used as a value here. - -!!! error TS1011: An element access expression should take an argument. - ~ -!!! error TS1005: ';' expected. - ~ -!!! error TS1109: Expression expected. - - public DefaultValue(value?: string = "Hello") { } - ~~~~~~ -!!! error TS2304: Cannot find name 'public'. - ~~~~~~~~~~~~ -!!! error TS1005: ';' expected. - ~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'DefaultValue'. - ~~~~~ -!!! error TS2304: Cannot find name 'value'. - ~ -!!! error TS1109: Expression expected. - ~~~~~~ -!!! error TS2693: 'string' only refers to a type, but is being used as a value here. - ~ -!!! error TS1005: ';' expected. - } - } - ~ -!!! error TS1128: Declaration or statement expected. - - enum Weekdays { - Monday, - Tuesday, - Weekend, - } - - enum Fruit { - Apple, - Pear - } - - interface IDisposable { - Dispose(): void; - } - - TypeScriptAllInOne.Program.Main(); - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationInAmbientContext.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationInAmbientContext.d.ts deleted file mode 100644 index 41d673d466237..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationInAmbientContext.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -//// [tests/cases/conformance/es6/destructuring/declarationInAmbientContext.ts] //// - -//// [declarationInAmbientContext.ts] -declare var [a, b]; // Error, destructuring declaration not allowed in ambient context -declare var {c, d}; // Error, destructuring declaration not allowed in ambient context - - -/// [Declarations] //// - - - -//// [declarationInAmbientContext.d.ts] -declare var a: invalid, b: invalid; -declare var c: invalid, d: invalid; - -/// [Errors] //// - -declarationInAmbientContext.ts(1,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationInAmbientContext.ts(1,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationInAmbientContext.ts(2,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationInAmbientContext.ts(2,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== declarationInAmbientContext.ts (4 errors) ==== - declare var [a, b]; // Error, destructuring declaration not allowed in ambient context - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - declare var {c, d}; // Error, destructuring declaration not allowed in ambient context - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationWithNoInitializer.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationWithNoInitializer.d.ts deleted file mode 100644 index b6b9f16843bdc..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationWithNoInitializer.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -//// [tests/cases/conformance/es6/destructuring/declarationWithNoInitializer.ts] //// - -//// [declarationWithNoInitializer.ts] -var [a, b]; // Error, no initializer -var {c, d}; // Error, no initializer - - -/// [Declarations] //// - - - -//// [declarationWithNoInitializer.d.ts] -declare var a: invalid, b: invalid; -declare var c: invalid, d: invalid; - -/// [Errors] //// - -declarationWithNoInitializer.ts(1,5): error TS1182: A destructuring declaration must have an initializer. -declarationWithNoInitializer.ts(1,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationWithNoInitializer.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationWithNoInitializer.ts(2,5): error TS1182: A destructuring declaration must have an initializer. -declarationWithNoInitializer.ts(2,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationWithNoInitializer.ts(2,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== declarationWithNoInitializer.ts (6 errors) ==== - var [a, b]; // Error, no initializer - ~~~~~~ -!!! error TS1182: A destructuring declaration must have an initializer. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - var {c, d}; // Error, no initializer - ~~~~~~ -!!! error TS1182: A destructuring declaration must have an initializer. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterDeclaration6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterDeclaration6.d.ts deleted file mode 100644 index 4377d24656e68..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterDeclaration6.d.ts +++ /dev/null @@ -1,2312 +0,0 @@ -//// [tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts] //// - -//// [destructuringParameterDeclaration6.ts] -// A parameter declaration may specify either an identifier or a binding pattern. - -// Reserved words are not allowed to be used as an identifier in parameter declaration -"use strict" - -// Error -function a({while}: { - while: any; - }): void { } -function a1({public}: { - public: any; - }): void { } -function a4([: any[]: [ - any, - any[] - ]: [ - any, - any[], - [any, any, any[]] - ]: [ - any, - any[], - [any, any, any[]], - [any, any, any[], [any, any, any, any[]]] - ]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]]]]]while, for, public]){ } -function a5(...: any[]while) { } -function a6(...public: any[]): void { } -function a7(...a: string): void { } -a({ while: 1 }); - -// No Error -function b1({public: x}: { - public: any; - }): void { } -function b2({while: y}: { - while: any; - }): void { } -b1({ public: 1 }); -b2({ while: 1 }); - - - -/// [Declarations] //// - - - -//// [destructuringParameterDeclaration6.d.ts] -declare function a({ while: }: { - while: any; -}): void; -declare function a1({ public }: { - public: any; -}): void; -declare function a4([any, [], [any, any, []], [any, any, [], [any, any, any, []]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []], [any, any, any, any, any, any, any, [], [any, any, any, any, any, any, any, any, []]]]]]]]]: invalid): invalid; -declare function a5(...: any[]): invalid; -declare function a6(...public: any[]): void; -declare function a7(...a: string): void; -declare function b1({ public: x }: { - public: any; -}): void; -declare function b2({ while: y }: { - while: any; -}): void; - -/// [Errors] //// - -destructuringParameterDeclaration6.ts(7,18): error TS1005: ':' expected. -destructuringParameterDeclaration6.ts(13,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterDeclaration6.ts(13,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterDeclaration6.ts(13,14): error TS1181: Array element destructuring pattern expected. -destructuringParameterDeclaration6.ts(13,16): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(13,19): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(13,21): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(14,9): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(15,9): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(15,12): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(16,6): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(17,9): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(18,9): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(18,12): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(19,10): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(19,15): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(19,20): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(19,23): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(20,6): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(21,9): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(22,9): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(22,12): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(23,10): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(23,15): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(23,20): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(23,23): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(24,10): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(24,15): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(24,20): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(24,23): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(24,28): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(24,33): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(24,38): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(24,43): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(24,46): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,6): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,9): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,14): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,17): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,22): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,27): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,32): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,35): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,41): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,46): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,51): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,54): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,59): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,64): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,69): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,74): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,77): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,84): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,89): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,94): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,97): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,102): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,107): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,112): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,117): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,120): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,126): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,131): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,136): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,141): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,144): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,149): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,154): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,159): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,164): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,169): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,172): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,178): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,181): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,186): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,189): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,194): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,199): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,204): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,207): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,213): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,218): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,223): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,226): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,231): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,236): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,241): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,246): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,249): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,256): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,261): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,266): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,269): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,274): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,279): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,284): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,289): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,292): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,298): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,303): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,308): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,313): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,316): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,321): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,326): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,331): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,336): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,341): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,344): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,352): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,357): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,362): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,365): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,370): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,375): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,380): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,385): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,388): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,394): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,399): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,404): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,409): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,412): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,417): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,422): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,427): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,432): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,437): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,440): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,447): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,452): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,457): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,462): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,465): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,470): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,475): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,480): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,485): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,490): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,493): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,499): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,504): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,509): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,514): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,519): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,522): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,527): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,532): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,537): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,542): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,547): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,552): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,555): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,562): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,565): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,570): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,573): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,578): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,583): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,588): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,591): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,597): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,602): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,607): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,610): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,615): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,620): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,625): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,630): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,633): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,640): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,645): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,650): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,653): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,658): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,663): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,668): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,673): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,676): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,682): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,687): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,692): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,697): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,700): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,705): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,710): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,715): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,720): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,725): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,728): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,736): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,741): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,746): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,749): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,754): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,759): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,764): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,769): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,772): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,778): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,783): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,788): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,793): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,796): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,801): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,806): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,811): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,816): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,821): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,824): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,831): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,836): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,841): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,846): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,849): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,854): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,859): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,864): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,869): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,874): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,877): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,883): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,888): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,893): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,898): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,903): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,906): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,911): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,916): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,921): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,926): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,931): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,936): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,939): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,948): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,953): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,958): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,961): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,966): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,971): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,976): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,981): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,984): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,990): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,995): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1000): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1005): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1008): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1013): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1018): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1023): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1028): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1033): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1036): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1043): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1048): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1053): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1058): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1061): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1066): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1071): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1076): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1081): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1086): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1089): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1095): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1100): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1105): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1110): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1115): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1118): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1123): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1128): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1133): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1138): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1143): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1148): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1151): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1159): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1164): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1169): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1174): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1177): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1182): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1187): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1192): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1197): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1202): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1205): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1211): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1216): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1221): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1226): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1231): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1234): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1239): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1244): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1249): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1254): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1259): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1264): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1267): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1274): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1279): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1284): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1289): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1294): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1297): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1302): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1307): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1312): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1317): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1322): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1327): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1330): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1336): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1341): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1346): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1351): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1356): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1361): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1364): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1369): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1374): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1379): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1384): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1389): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1394): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1399): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1402): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1410): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1413): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1418): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1421): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1426): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1431): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1436): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1439): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1445): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1450): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1455): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1458): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1463): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1468): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1473): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1478): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1481): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1488): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1493): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1498): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1501): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1506): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1511): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1516): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1521): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1524): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1530): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1535): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1540): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1545): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1548): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1553): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1558): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1563): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1568): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1573): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1576): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1584): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1589): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1594): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1597): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1602): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1607): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1612): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1617): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1620): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1626): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1631): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1636): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1641): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1644): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1649): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1654): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1659): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1664): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1669): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1672): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1679): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1684): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1689): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1694): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1697): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1702): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1707): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1712): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1717): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1722): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1725): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1731): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1736): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1741): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1746): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1751): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1754): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1759): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1764): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1769): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1774): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1779): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1784): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1787): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1796): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1801): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1806): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1809): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1814): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1819): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1824): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1829): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1832): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1838): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1843): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1848): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1853): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1856): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1861): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1866): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1871): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1876): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1881): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1884): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1891): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1896): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1901): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1906): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1909): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1914): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1919): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1924): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1929): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1934): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1937): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1943): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1948): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1953): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1958): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1963): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1966): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1971): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1976): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1981): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1986): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1991): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1996): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1999): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2007): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2012): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2017): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2022): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2025): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2030): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2035): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2040): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2045): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2050): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2053): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2059): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2064): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2069): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2074): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2079): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2082): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2087): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2092): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2097): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2102): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2107): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2112): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2115): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2122): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2127): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2132): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2137): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2142): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2145): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2150): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2155): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2160): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2165): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2170): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2175): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2178): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2184): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2189): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2194): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2199): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2204): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2209): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2212): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2217): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2222): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2227): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2232): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2237): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2242): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2247): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2250): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2260): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2265): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2270): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2273): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2278): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2283): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2288): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2293): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2296): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2302): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2307): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2312): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2317): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2320): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2325): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2330): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2335): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2340): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2345): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2348): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2355): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2360): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2365): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2370): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2373): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2378): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2383): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2388): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2393): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2398): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2401): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2407): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2412): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2417): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2422): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2427): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2430): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2435): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2440): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2445): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2450): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2455): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2460): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2463): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2471): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2476): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2481): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2486): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2489): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2494): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2499): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2504): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2509): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2514): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2517): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2523): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2528): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2533): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2538): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2543): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2546): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2551): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2556): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2561): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2566): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2571): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2576): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2579): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2586): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2591): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2596): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2601): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2606): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2609): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2614): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2619): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2624): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2629): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2634): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2639): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2642): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2648): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2653): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2658): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2663): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2668): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2673): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2676): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2681): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2686): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2691): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2696): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2701): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2706): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2711): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2714): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2723): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2728): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2733): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2738): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2741): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2746): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2751): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2756): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2761): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2766): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2769): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2775): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2780): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2785): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2790): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2795): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2798): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2803): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2808): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2813): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2818): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2823): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2828): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2831): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2838): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2843): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2848): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2853): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2858): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2861): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2866): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2871): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2876): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2881): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2886): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2891): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2894): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2900): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2905): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2910): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2915): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2920): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2925): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2928): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2933): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2938): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2943): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2948): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2953): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2958): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2963): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2966): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2974): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2979): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2984): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2989): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2994): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2997): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,3002): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3007): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3012): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3017): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3022): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3027): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3030): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,3036): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3041): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3046): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3051): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3056): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3061): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3064): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,3069): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3074): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3079): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3084): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3089): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3094): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3099): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3102): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,3109): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3114): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3119): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3124): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3129): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3134): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3137): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,3142): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3147): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3152): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3157): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3162): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3167): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3172): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3175): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,3181): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3186): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3191): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3196): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3201): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3206): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3211): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3214): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,3219): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3224): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3229): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3234): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3239): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3244): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3249): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3254): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3257): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,3266): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,3271): error TS2695: Left side of comma operator is unused and has no side effects. -destructuringParameterDeclaration6.ts(25,3271): error TS1005: '(' expected. -destructuringParameterDeclaration6.ts(25,3273): error TS1109: Expression expected. -destructuringParameterDeclaration6.ts(25,3276): error TS2695: Left side of comma operator is unused and has no side effects. -destructuringParameterDeclaration6.ts(25,3276): error TS1005: '(' expected. -destructuringParameterDeclaration6.ts(25,3278): error TS2304: Cannot find name 'public'. -destructuringParameterDeclaration6.ts(25,3284): error TS1005: ';' expected. -destructuringParameterDeclaration6.ts(25,3285): error TS1128: Declaration or statement expected. -destructuringParameterDeclaration6.ts(26,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterDeclaration6.ts(26,16): error TS1003: Identifier expected. -destructuringParameterDeclaration6.ts(26,23): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(26,28): error TS1005: '(' expected. -destructuringParameterDeclaration6.ts(28,13): error TS2370: A rest parameter must be of an array type. - - -==== destructuringParameterDeclaration6.ts (729 errors) ==== - // A parameter declaration may specify either an identifier or a binding pattern. - - // Reserved words are not allowed to be used as an identifier in parameter declaration - "use strict" - - // Error - function a({while}: { - ~ -!!! error TS1005: ':' expected. - while: any; - }): void { } - function a1({public}: { - public: any; - }): void { } - function a4([: any[]: [ - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~ - ~ -!!! error TS1181: Array element destructuring pattern expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~ -!!! error TS1005: ',' expected. - any, - ~~~~~~~~~~~~ - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - any[] - ~~~~~~~~~~~~~ - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ]: [ - ~~~~~~~~ - ~ -!!! error TS1005: ',' expected. - any, - ~~~~~~~~~~~~ - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - any[], - ~~~~~~~~~~~~~~ - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - [any, any, any[]] - ~~~~~~~~~~~~~~~~~~~~~~~~~ - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ]: [ - ~~~~~~~~ - ~ -!!! error TS1005: ',' expected. - any, - ~~~~~~~~~~~~ - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - any[], - ~~~~~~~~~~~~~~ - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - [any, any, any[]], - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - [any, any, any[], [any, any, any, any[]]] - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]]]]]while, for, public]){ } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~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~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~~~ -!!! error TS1005: ',' expected. - -!!! error TS2695: Left side of comma operator is unused and has no side effects. - ~ -!!! error TS1005: '(' expected. - ~~~ -!!! error TS1109: Expression expected. - -!!! error TS2695: Left side of comma operator is unused and has no side effects. - ~ -!!! error TS1005: '(' expected. - ~~~~~~ -!!! error TS2304: Cannot find name 'public'. - ~ -!!! error TS1005: ';' expected. - ~ -!!! error TS1128: Declaration or statement expected. - function a5(...: any[]while) { } - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1003: Identifier expected. - ~~~~~ -!!! error TS1005: ',' expected. - ~ -!!! error TS1005: '(' expected. - function a6(...public: any[]): void { } - function a7(...a: string): void { } - ~~~~~~~~~~~~ -!!! error TS2370: A rest parameter must be of an array type. - a({ while: 1 }); - - // No Error - function b1({public: x}: { - public: any; - }): void { } - function b2({while: y}: { - while: any; - }): void { } - b1({ public: 1 }); - b2({ while: 1 }); - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties1.d.ts deleted file mode 100644 index 070bfd8fa92f9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties1.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties1.ts] //// - -//// [destructuringParameterProperties1.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) { - } -} - -var c1: C1 = new C1([]); -c1 = new C1(["larry", "{curly}", "moe"]); -var useC1Properties: boolean = c1.x === c1.y && c1.y === c1.z; - -var c2: C2 = new C2(["10", 10, !!10]); -const dest: any[] = [c2.x, c2.y, c2.z]; -const c2_x: any = dest[0]; -const c2_y: any = dest[1]; -const c2_z: any = dest[2]; - -var c3: C3 = new C3({x: 0, y: "", z: false}); -c3 = new C3({x: 0, "y": "y", z: true}); -const dest_1: any[] = [c3.x, c3.y, c3.z]; -const c3_x: any = dest_1[0]; -const c3_y: any = dest_1[1]; -const c3_z: any = dest_1[2]; - -/// [Declarations] //// - - - -//// [destructuringParameterProperties1.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); -} -declare var c1: C1; -declare var useC1Properties: boolean; -declare var c2: C2; -declare const dest: any[]; -declare const c2_x: any; -declare const c2_y: any; -declare const c2_z: any; -declare var c3: C3; -declare const dest_1: any[]; -declare const c3_x: any; -declare const c3_y: any; -declare const c3_z: any; - -/// [Errors] //// - -destructuringParameterProperties1.ts(2,17): error TS1187: A parameter property may not be declared using a binding pattern. -destructuringParameterProperties1.ts(2,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties1.ts(2,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties1.ts(2,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties1.ts(9,17): error TS1187: A parameter property may not be declared using a binding pattern. -destructuringParameterProperties1.ts(9,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties1.ts(9,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties1.ts(9,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties1.ts(16,17): error TS1187: A parameter property may not be declared using a binding pattern. -destructuringParameterProperties1.ts(16,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties1.ts(16,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties1.ts(16,32): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties1.ts(22,35): error TS2339: Property 'x' does not exist on type 'C1'. -destructuringParameterProperties1.ts(22,44): error TS2339: Property 'y' does not exist on type 'C1'. -destructuringParameterProperties1.ts(22,52): error TS2339: Property 'y' does not exist on type 'C1'. -destructuringParameterProperties1.ts(22,61): error TS2339: Property 'z' does not exist on type 'C1'. -destructuringParameterProperties1.ts(25,25): error TS2339: Property 'x' does not exist on type 'C2'. -destructuringParameterProperties1.ts(25,31): error TS2339: Property 'y' does not exist on type 'C2'. -destructuringParameterProperties1.ts(25,37): error TS2339: Property 'z' does not exist on type 'C2'. -destructuringParameterProperties1.ts(32,27): error TS2339: Property 'x' does not exist on type 'C3'. -destructuringParameterProperties1.ts(32,33): error TS2339: Property 'y' does not exist on type 'C3'. -destructuringParameterProperties1.ts(32,39): error TS2339: Property 'z' does not exist on type 'C3'. - - -==== destructuringParameterProperties1.ts (22 errors) ==== - class C1 { - constructor(public [x, y, z]: string[]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1187: A parameter property may not be declared using a binding pattern. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - } - - 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. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - } - - 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. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - } - - var c1: C1 = new C1([]); - c1 = new C1(["larry", "{curly}", "moe"]); - var useC1Properties: boolean = c1.x === c1.y && c1.y === c1.z; - ~ -!!! error TS2339: Property 'x' does not exist on type 'C1'. - ~ -!!! error TS2339: Property 'y' does not exist on type 'C1'. - ~ -!!! error TS2339: Property 'y' does not exist on type 'C1'. - ~ -!!! error TS2339: Property 'z' does not exist on type 'C1'. - - var c2: C2 = new C2(["10", 10, !!10]); - const dest: any[] = [c2.x, c2.y, c2.z]; - ~ -!!! error TS2339: Property 'x' does not exist on type 'C2'. - ~ -!!! error TS2339: Property 'y' does not exist on type 'C2'. - ~ -!!! error TS2339: Property 'z' does not exist on type 'C2'. - const c2_x: any = dest[0]; - const c2_y: any = dest[1]; - const c2_z: any = dest[2]; - - var c3: C3 = new C3({x: 0, y: "", z: false}); - c3 = new C3({x: 0, "y": "y", z: true}); - const dest_1: any[] = [c3.x, c3.y, c3.z]; - ~ -!!! error TS2339: Property 'x' does not exist on type 'C3'. - ~ -!!! error TS2339: Property 'y' does not exist on type 'C3'. - ~ -!!! error TS2339: Property 'z' does not exist on type 'C3'. - const c3_x: any = dest_1[0]; - const c3_y: any = dest_1[1]; - const c3_z: any = dest_1[2]; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties2.d.ts deleted file mode 100644 index ff0fc96ba03fc..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties2.d.ts +++ /dev/null @@ -1,155 +0,0 @@ -//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties2.ts] //// - -//// [destructuringParameterProperties2.ts] -class C1 { - constructor(private k: number, private [a, b, c]: [number, string, boolean]) { - if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { - this.a = a || k; - } - } - - public getA(): any { - return this.a - } - - public getB(): any { - return this.b - } - - public getC(): any { - return this.c; - } -} - -var x: C1 = new C1(undefined, [0, undefined, ""]); -const dest: any[] = [x.getA(), x.getB(), x.getC()]; -const x_a: any = dest[0]; -const x_b: any = dest[1]; -const x_c: any = dest[2]; - -var y: C1 = new C1(10, [0, "", true]); -const dest_1: any[] = [y.getA(), y.getB(), y.getC()]; -const y_a: any = dest_1[0]; -const y_b: any = dest_1[1]; -const y_c: any = dest_1[2]; - -var z: C1 = new C1(10, [undefined, "", null]); -const dest: any[] = [z.getA(), z.getB(), z.getC()]; -const z_a: any = dest[0]; -const z_b: any = dest[1]; -const z_c: any = dest[2]; - - -/// [Declarations] //// - - - -//// [destructuringParameterProperties2.d.ts] -declare class C1 { - private k; - private a: invalid; - private b: invalid; - private c: invalid; - constructor(k: number, [a, b, c]: [number, string, boolean]); - getA(): any; - getB(): any; - getC(): any; -} -declare var x: C1; -declare const dest: any[]; -declare const x_a: any; -declare const x_b: any; -declare const x_c: any; -declare var y: C1; -declare const dest_1: any[]; -declare const y_a: any; -declare const y_b: any; -declare const y_c: any; -declare var z: C1; -declare const dest: any[]; -declare const z_a: any; -declare const z_b: any; -declare const z_c: any; - -/// [Errors] //// - -destructuringParameterProperties2.ts(2,36): error TS1187: A parameter property may not be declared using a binding pattern. -destructuringParameterProperties2.ts(2,45): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties2.ts(2,48): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties2.ts(2,51): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties2.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. -destructuringParameterProperties2.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. -destructuringParameterProperties2.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. -destructuringParameterProperties2.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. -destructuringParameterProperties2.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. -destructuringParameterProperties2.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. -destructuringParameterProperties2.ts(21,46): error TS2322: Type 'string' is not assignable to type 'boolean'. -destructuringParameterProperties2.ts(22,7): error TS2451: Cannot redeclare block-scoped variable 'dest'. -destructuringParameterProperties2.ts(34,7): error TS2451: Cannot redeclare block-scoped variable 'dest'. - - -==== destructuringParameterProperties2.ts (13 errors) ==== - class C1 { - constructor(private k: number, private [a, b, c]: [number, string, boolean]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1187: A parameter property may not be declared using a binding pattern. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { - ~ -!!! error TS2339: Property 'b' does not exist on type 'C1'. - ~ -!!! error TS2339: Property 'c' does not exist on type 'C1'. - this.a = a || k; - ~ -!!! error TS2339: Property 'a' does not exist on type 'C1'. - } - } - - public getA(): any { - return this.a - ~ -!!! error TS2339: Property 'a' does not exist on type 'C1'. - } - - public getB(): any { - return this.b - ~ -!!! error TS2339: Property 'b' does not exist on type 'C1'. - } - - public getC(): any { - return this.c; - ~ -!!! error TS2339: Property 'c' does not exist on type 'C1'. - } - } - - var x: C1 = new C1(undefined, [0, undefined, ""]); - ~~ -!!! error TS2322: Type 'string' is not assignable to type 'boolean'. - const dest: any[] = [x.getA(), x.getB(), x.getC()]; - ~~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'dest'. - const x_a: any = dest[0]; - const x_b: any = dest[1]; - const x_c: any = dest[2]; - - var y: C1 = new C1(10, [0, "", true]); - const dest_1: any[] = [y.getA(), y.getB(), y.getC()]; - const y_a: any = dest_1[0]; - const y_b: any = dest_1[1]; - const y_c: any = dest_1[2]; - - var z: C1 = new C1(10, [undefined, "", null]); - const dest: any[] = [z.getA(), z.getB(), z.getC()]; - ~~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'dest'. - const z_a: any = dest[0]; - const z_b: any = dest[1]; - const z_c: any = dest[2]; - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties3.d.ts deleted file mode 100644 index 2be24cfbac2be..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties3.d.ts +++ /dev/null @@ -1,193 +0,0 @@ -//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts] //// - -//// [destructuringParameterProperties3.ts] -class C1 { - constructor(private k: T, private [a, b, c]: [T,U,V]) { - if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { - this.a = a || k; - } - } - - public getA(): any { - return this.a - } - - public getB(): any { - return this.b - } - - public getC(): any { - return this.c; - } -} - -var x: C1 = new C1(undefined, [0, true, ""]); -const dest: any[] = [x.getA(), x.getB(), x.getC()]; -const x_a: any = dest[0]; -const x_b: any = dest[1]; -const x_c: any = dest[2]; - -var y: C1 = new C1(10, [0, true, true]); -const dest_1: any[] = [y.getA(), y.getB(), y.getC()]; -const y_a: any = dest_1[0]; -const y_b: any = dest_1[1]; -const y_c: any = dest_1[2]; - -var z: C1<10, string, string> = new C1(10, [undefined, "", ""]); -const dest: any[] = [z.getA(), z.getB(), z.getC()]; -const z_a: any = dest[0]; -const z_b: any = dest[1]; -const z_c: any = dest[2]; - -var w: C1<10, any, any> = new C1(10, [undefined, undefined, undefined]); -const dest_1: any[] = [z.getA(), z.getB(), z.getC()]; -const z_a: any = dest_1[0]; -const z_b: any = dest_1[1]; -const z_c: any = dest_1[2]; - - -/// [Declarations] //// - - - -//// [destructuringParameterProperties3.d.ts] -declare class C1 { - private k; - private a: invalid; - private b: invalid; - private c: invalid; - constructor(k: T, [a, b, c]: [T, U, V]); - getA(): any; - getB(): any; - getC(): any; -} -declare var x: C1; -declare const dest: any[]; -declare const x_a: any; -declare const x_b: any; -declare const x_c: any; -declare var y: C1; -declare const dest_1: any[]; -declare const y_a: any; -declare const y_b: any; -declare const y_c: any; -declare var z: C1<10, string, string>; -declare const dest: any[]; -declare const z_a: any; -declare const z_b: any; -declare const z_c: any; -declare var w: C1<10, any, any>; -declare const dest_1: any[]; -declare const z_a: any; -declare const z_b: any; -declare const z_c: any; - -/// [Errors] //// - -destructuringParameterProperties3.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. -destructuringParameterProperties3.ts(2,40): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties3.ts(2,43): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties3.ts(2,46): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties3.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. -destructuringParameterProperties3.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. -destructuringParameterProperties3.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. -destructuringParameterProperties3.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. -destructuringParameterProperties3.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. -destructuringParameterProperties3.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. -destructuringParameterProperties3.ts(22,7): error TS2451: Cannot redeclare block-scoped variable 'dest'. -destructuringParameterProperties3.ts(28,7): error TS2451: Cannot redeclare block-scoped variable 'dest_1'. -destructuringParameterProperties3.ts(34,7): error TS2451: Cannot redeclare block-scoped variable 'dest'. -destructuringParameterProperties3.ts(35,7): error TS2451: Cannot redeclare block-scoped variable 'z_a'. -destructuringParameterProperties3.ts(36,7): error TS2451: Cannot redeclare block-scoped variable 'z_b'. -destructuringParameterProperties3.ts(37,7): error TS2451: Cannot redeclare block-scoped variable 'z_c'. -destructuringParameterProperties3.ts(40,7): error TS2451: Cannot redeclare block-scoped variable 'dest_1'. -destructuringParameterProperties3.ts(41,7): error TS2451: Cannot redeclare block-scoped variable 'z_a'. -destructuringParameterProperties3.ts(42,7): error TS2451: Cannot redeclare block-scoped variable 'z_b'. -destructuringParameterProperties3.ts(43,7): error TS2451: Cannot redeclare block-scoped variable 'z_c'. - - -==== destructuringParameterProperties3.ts (20 errors) ==== - class C1 { - constructor(private k: T, private [a, b, c]: [T,U,V]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1187: A parameter property may not be declared using a binding pattern. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { - ~ -!!! error TS2339: Property 'b' does not exist on type 'C1'. - ~ -!!! error TS2339: Property 'c' does not exist on type 'C1'. - this.a = a || k; - ~ -!!! error TS2339: Property 'a' does not exist on type 'C1'. - } - } - - public getA(): any { - return this.a - ~ -!!! error TS2339: Property 'a' does not exist on type 'C1'. - } - - public getB(): any { - return this.b - ~ -!!! error TS2339: Property 'b' does not exist on type 'C1'. - } - - public getC(): any { - return this.c; - ~ -!!! error TS2339: Property 'c' does not exist on type 'C1'. - } - } - - var x: C1 = new C1(undefined, [0, true, ""]); - const dest: any[] = [x.getA(), x.getB(), x.getC()]; - ~~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'dest'. - const x_a: any = dest[0]; - const x_b: any = dest[1]; - const x_c: any = dest[2]; - - var y: C1 = new C1(10, [0, true, true]); - const dest_1: any[] = [y.getA(), y.getB(), y.getC()]; - ~~~~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'dest_1'. - const y_a: any = dest_1[0]; - const y_b: any = dest_1[1]; - const y_c: any = dest_1[2]; - - var z: C1<10, string, string> = new C1(10, [undefined, "", ""]); - const dest: any[] = [z.getA(), z.getB(), z.getC()]; - ~~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'dest'. - const z_a: any = dest[0]; - ~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'z_a'. - const z_b: any = dest[1]; - ~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'z_b'. - const z_c: any = dest[2]; - ~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'z_c'. - - var w: C1<10, any, any> = new C1(10, [undefined, undefined, undefined]); - const dest_1: any[] = [z.getA(), z.getB(), z.getC()]; - ~~~~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'dest_1'. - const z_a: any = dest_1[0]; - ~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'z_a'. - const z_b: any = dest_1[1]; - ~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'z_b'. - const z_c: any = dest_1[2]; - ~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'z_c'. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties4.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties4.d.ts deleted file mode 100644 index 17945919b2d21..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties4.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties4.ts] //// - -//// [destructuringParameterProperties4.ts] -class C1 { - constructor(private k: T, protected [a, b, c]: [T,U,V]) { - if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { - this.a = a || k; - } - } - - public getA(): any { - return this.a - } - - public getB(): any { - return this.b - } - - public getC(): any { - return this.c; - } -} - -class C2 extends C1 { - public doSomethingWithSuperProperties(): string { - return `${this.a} ${this.b} ${this.c}`; - } -} - - -/// [Declarations] //// - - - -//// [destructuringParameterProperties4.d.ts] -declare class C1 { - private k; - protected a: invalid; - protected b: invalid; - protected c: invalid; - constructor(k: T, [a, b, c]: [T, U, V]); - getA(): any; - getB(): any; - getC(): any; -} -declare class C2 extends C1 { - doSomethingWithSuperProperties(): string; -} - -/// [Errors] //// - -destructuringParameterProperties4.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. -destructuringParameterProperties4.ts(2,42): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties4.ts(2,45): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties4.ts(2,48): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties4.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. -destructuringParameterProperties4.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. -destructuringParameterProperties4.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. -destructuringParameterProperties4.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. -destructuringParameterProperties4.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. -destructuringParameterProperties4.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. -destructuringParameterProperties4.ts(23,24): error TS2339: Property 'a' does not exist on type 'C2'. -destructuringParameterProperties4.ts(23,34): error TS2339: Property 'b' does not exist on type 'C2'. -destructuringParameterProperties4.ts(23,44): error TS2339: Property 'c' does not exist on type 'C2'. - - -==== destructuringParameterProperties4.ts (13 errors) ==== - class C1 { - constructor(private k: T, protected [a, b, c]: [T,U,V]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1187: A parameter property may not be declared using a binding pattern. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { - ~ -!!! error TS2339: Property 'b' does not exist on type 'C1'. - ~ -!!! error TS2339: Property 'c' does not exist on type 'C1'. - this.a = a || k; - ~ -!!! error TS2339: Property 'a' does not exist on type 'C1'. - } - } - - public getA(): any { - return this.a - ~ -!!! error TS2339: Property 'a' does not exist on type 'C1'. - } - - public getB(): any { - return this.b - ~ -!!! error TS2339: Property 'b' does not exist on type 'C1'. - } - - public getC(): any { - return this.c; - ~ -!!! error TS2339: Property 'c' does not exist on type 'C1'. - } - } - - class C2 extends C1 { - public doSomethingWithSuperProperties(): string { - return `${this.a} ${this.b} ${this.c}`; - ~ -!!! error TS2339: Property 'a' does not exist on type 'C2'. - ~ -!!! error TS2339: Property 'b' does not exist on type 'C2'. - ~ -!!! error TS2339: Property 'c' does not exist on type 'C2'. - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties5.d.ts deleted file mode 100644 index 6b1fcfea85fba..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringParameterProperties5.d.ts +++ /dev/null @@ -1,140 +0,0 @@ -//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts] //// - -//// [destructuringParameterProperties5.ts] -type ObjType1 = { x: number; y: string; z: boolean } -type TupleType1 = [ObjType1, number, string] - -class C1 { - constructor(public [{ x1, x2, x3 }, y, z]: TupleType1) { - var foo: any = x1 || x2 || x3 || y || z; - var bar: any = this.x1 || this.x2 || this.x3 || this.y || this.z; - } -} - -var a: C1 = new C1([{ x1: 10, x2: "", x3: true }, "", false]); -const dest: any[] = [a.x1, a.x2, a.x3, a.y, a.z]; -const a_x1: any = dest[0]; -const a_x2: any = dest[1]; -const a_x3: any = dest[2]; -const a_y: any = dest[3]; -const a_z: any = dest[4]; - -/// [Declarations] //// - - - -//// [destructuringParameterProperties5.d.ts] -type ObjType1 = { - x: number; - y: string; - z: boolean; -}; -type TupleType1 = [ObjType1, number, string]; -declare class C1 { - x1: invalid; - x2: invalid; - x3: invalid; - { x1, x2, x3 }: invalid; - y: invalid; - z: invalid; - constructor([{ x1, x2, x3 }, y, z]: TupleType1); -} -declare var a: C1; -declare const dest: any[]; -declare const a_x1: any; -declare const a_x2: any; -declare const a_x3: any; -declare const a_y: any; -declare const a_z: any; - -/// [Errors] //// - -destructuringParameterProperties5.ts(5,17): error TS1187: A parameter property may not be declared using a binding pattern. -destructuringParameterProperties5.ts(5,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties5.ts(5,27): error TS2339: Property 'x1' does not exist on type 'ObjType1'. -destructuringParameterProperties5.ts(5,27): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties5.ts(5,31): error TS2339: Property 'x2' does not exist on type 'ObjType1'. -destructuringParameterProperties5.ts(5,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties5.ts(5,35): error TS2339: Property 'x3' does not exist on type 'ObjType1'. -destructuringParameterProperties5.ts(5,35): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties5.ts(5,41): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties5.ts(5,44): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -destructuringParameterProperties5.ts(7,29): error TS2339: Property 'x1' does not exist on type 'C1'. -destructuringParameterProperties5.ts(7,40): error TS2339: Property 'x2' does not exist on type 'C1'. -destructuringParameterProperties5.ts(7,51): error TS2339: Property 'x3' does not exist on type 'C1'. -destructuringParameterProperties5.ts(7,62): error TS2339: Property 'y' does not exist on type 'C1'. -destructuringParameterProperties5.ts(7,72): error TS2339: Property 'z' does not exist on type 'C1'. -destructuringParameterProperties5.ts(11,23): error TS2353: Object literal may only specify known properties, and 'x1' does not exist in type 'ObjType1'. -destructuringParameterProperties5.ts(11,51): error TS2322: Type 'string' is not assignable to type 'number'. -destructuringParameterProperties5.ts(11,55): error TS2322: Type 'boolean' is not assignable to type 'string'. -destructuringParameterProperties5.ts(12,24): error TS2339: Property 'x1' does not exist on type 'C1'. -destructuringParameterProperties5.ts(12,30): error TS2339: Property 'x2' does not exist on type 'C1'. -destructuringParameterProperties5.ts(12,36): error TS2339: Property 'x3' does not exist on type 'C1'. -destructuringParameterProperties5.ts(12,42): error TS2339: Property 'y' does not exist on type 'C1'. -destructuringParameterProperties5.ts(12,47): error TS2339: Property 'z' does not exist on type 'C1'. - - -==== destructuringParameterProperties5.ts (23 errors) ==== - type ObjType1 = { x: number; y: string; z: boolean } - type TupleType1 = [ObjType1, number, string] - - class C1 { - constructor(public [{ x1, x2, x3 }, y, z]: TupleType1) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1187: A parameter property may not be declared using a binding pattern. - ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ -!!! error TS2339: Property 'x1' does not exist on type 'ObjType1'. - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ -!!! error TS2339: Property 'x2' does not exist on type 'ObjType1'. - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ -!!! error TS2339: Property 'x3' does not exist on type 'ObjType1'. - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - var foo: any = x1 || x2 || x3 || y || z; - var bar: any = this.x1 || this.x2 || this.x3 || this.y || this.z; - ~~ -!!! error TS2339: Property 'x1' does not exist on type 'C1'. - ~~ -!!! error TS2339: Property 'x2' does not exist on type 'C1'. - ~~ -!!! error TS2339: Property 'x3' does not exist on type 'C1'. - ~ -!!! error TS2339: Property 'y' does not exist on type 'C1'. - ~ -!!! error TS2339: Property 'z' does not exist on type 'C1'. - } - } - - var a: C1 = new C1([{ x1: 10, x2: "", x3: true }, "", false]); - ~~ -!!! error TS2353: Object literal may only specify known properties, and 'x1' does not exist in type 'ObjType1'. - ~~ -!!! error TS2322: Type 'string' is not assignable to type 'number'. - ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'string'. - const dest: any[] = [a.x1, a.x2, a.x3, a.y, a.z]; - ~~ -!!! error TS2339: Property 'x1' does not exist on type 'C1'. - ~~ -!!! error TS2339: Property 'x2' does not exist on type 'C1'. - ~~ -!!! error TS2339: Property 'x3' does not exist on type 'C1'. - ~ -!!! error TS2339: Property 'y' does not exist on type 'C1'. - ~ -!!! error TS2339: Property 'z' does not exist on type 'C1'. - const a_x1: any = dest[0]; - const a_x2: any = dest[1]; - const a_x3: any = dest[2]; - const a_y: any = dest[3]; - const a_z: any = dest[4]; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/disallowLineTerminatorBeforeArrow.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/disallowLineTerminatorBeforeArrow.d.ts deleted file mode 100644 index e836e947d07f3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/disallowLineTerminatorBeforeArrow.d.ts +++ /dev/null @@ -1,200 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts] //// - -//// [disallowLineTerminatorBeforeArrow.ts] -var f1 = (): void - => { } -var f2 = (x: string, y: string): void /* - */ => { } -var f3 = (x: string, y: number, ...rest: any[]): void - => { } -var f4 = (x: string, y: number, ...rest: any[]): void /* - */ => { } -var f5 = (...rest: any[]): void - => { } -var f6 = (...rest: any[]): void /* - */ => { } -var f7 = (x: string, y: number, z: number = 10): void - => { } -var f8 = (x: string, y: number, z: number = 10): void /* - */ => { } -var f9 = (a: number): number - => a; -var f10 = (a: number) : - number - => a -var f11 = (a: number): number /* - */ => a; -var f12 = (a: number) : - number /* - */ => a - -// Should be valid. -var f11 = (a: number - ): number => a; - -// Should be valid. -var f12 = (a: number) - : number => a; - -// Should be valid. -var f13 = (a: number): - number => a; - -// Should be valid. -var f14 = (): void /* */ => {} - -// Should be valid. -var f15 = (a: number): number /* */ => a - -// Should be valid. -var f16 = (a: number, b = 10): - number /* */ => a + b; - -function foo(func: () => boolean): void { } -foo(() - => true); -foo(() - => { return false; }); - -module m { - class City { - constructor(x: number, thing = () - => 100) { - } - - public m = () - => 2 * 2 * 2 - } - - export enum Enum { - claw = (() - => 10)() - } - - export var v: any = x: any: any - => new City(Enum.claw); -} - - -/// [Declarations] //// - - - -//// [disallowLineTerminatorBeforeArrow.d.ts] -declare var f1: () => void; -declare var f2: (x: string, y: string) => void; -declare var f3: (x: string, y: number, ...rest: any[]) => void; -declare var f4: (x: string, y: number, ...rest: any[]) => void; -declare var f5: (...rest: any[]) => void; -declare var f6: (...rest: any[]) => void; -declare var f7: (x: string, y: number, z?: number) => void; -declare var f8: (x: string, y: number, z?: number) => void; -declare var f9: (a: number) => number; -declare var f10: (a: number) => number; -declare var f11: (a: number) => number; -declare var f12: (a: number) => number; -declare var f11: (a: number) => number; -declare var f12: (a: number) => number; -declare var f13: (a: number) => number; -declare var f14: () => void; -declare var f15: (a: number) => number; -declare var f16: (a: number, b?: number) => number; -declare function foo(func: () => boolean): void; -declare namespace m { - enum Enum { - claw - } - var v: any, any: any; -} - -/// [Errors] //// - -disallowLineTerminatorBeforeArrow.ts(67,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -disallowLineTerminatorBeforeArrow.ts(71,25): error TS2304: Cannot find name 'x'. -disallowLineTerminatorBeforeArrow.ts(71,26): error TS1005: ',' expected. -disallowLineTerminatorBeforeArrow.ts(72,9): error TS1128: Declaration or statement expected. - - -==== disallowLineTerminatorBeforeArrow.ts (4 errors) ==== - var f1 = (): void - => { } - var f2 = (x: string, y: string): void /* - */ => { } - var f3 = (x: string, y: number, ...rest: any[]): void - => { } - var f4 = (x: string, y: number, ...rest: any[]): void /* - */ => { } - var f5 = (...rest: any[]): void - => { } - var f6 = (...rest: any[]): void /* - */ => { } - var f7 = (x: string, y: number, z: number = 10): void - => { } - var f8 = (x: string, y: number, z: number = 10): void /* - */ => { } - var f9 = (a: number): number - => a; - var f10 = (a: number) : - number - => a - var f11 = (a: number): number /* - */ => a; - var f12 = (a: number) : - number /* - */ => a - - // Should be valid. - var f11 = (a: number - ): number => a; - - // Should be valid. - var f12 = (a: number) - : number => a; - - // Should be valid. - var f13 = (a: number): - number => a; - - // Should be valid. - var f14 = (): void /* */ => {} - - // Should be valid. - var f15 = (a: number): number /* */ => a - - // Should be valid. - var f16 = (a: number, b = 10): - number /* */ => a + b; - - function foo(func: () => boolean): void { } - foo(() - => true); - foo(() - => { return false; }); - - module m { - class City { - constructor(x: number, thing = () - => 100) { - } - - public m = () - => 2 * 2 * 2 - } - - export enum Enum { - claw = (() - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - => 10)() - } - - export var v: any = x: any: any - ~ -!!! error TS2304: Cannot find name 'x'. - ~ -!!! error TS1005: ',' expected. - => new City(Enum.claw); - ~~ -!!! error TS1128: Declaration or statement expected. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicateObjectLiteralProperty.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicateObjectLiteralProperty.d.ts deleted file mode 100644 index 4356135fea96a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicateObjectLiteralProperty.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -//// [tests/cases/compiler/duplicateObjectLiteralProperty.ts] //// - -//// [duplicateObjectLiteralProperty.ts] -var x = { - a: 1, - b: true, // OK - a: 56, // Duplicate - \u0061: "ss", // Duplicate - a: { - c: 1, - "c": 56, // Duplicate - } -}; - - -var y = { - get a() { return 0; }, - set a(v: number) { }, - get a(): number { return 0; } -}; - - -/// [Declarations] //// - - - -//// [duplicateObjectLiteralProperty.d.ts] -declare var x: { - a: { - c: number; - }; - b: boolean; -}; -declare var y: invalid; - -/// [Errors] //// - -duplicateObjectLiteralProperty.ts(4,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty.ts(5,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty.ts(6,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty.ts(8,9): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty.ts(14,9): error TS2300: Duplicate identifier 'a'. -duplicateObjectLiteralProperty.ts(15,9): error TS2300: Duplicate identifier 'a'. -duplicateObjectLiteralProperty.ts(16,9): error TS1118: An object literal cannot have multiple get/set accessors with the same name. -duplicateObjectLiteralProperty.ts(16,9): error TS2300: Duplicate identifier 'a'. -duplicateObjectLiteralProperty.ts(16,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== duplicateObjectLiteralProperty.ts (9 errors) ==== - var x = { - a: 1, - b: true, // OK - a: 56, // Duplicate - ~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - \u0061: "ss", // Duplicate - ~~~~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - a: { - ~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - c: 1, - "c": 56, // Duplicate - ~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - }; - - - var y = { - get a() { return 0; }, - ~ -!!! error TS2300: Duplicate identifier 'a'. - set a(v: number) { }, - ~ -!!! error TS2300: Duplicate identifier 'a'. - get a(): number { return 0; } - ~ -!!! error TS1118: An object literal cannot have multiple get/set accessors with the same name. - ~ -!!! error TS2300: Duplicate identifier 'a'. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - }; - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumAssignmentCompat5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumAssignmentCompat5.d.ts deleted file mode 100644 index 2142b8547e252..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumAssignmentCompat5.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -//// [tests/cases/compiler/enumAssignmentCompat5.ts] //// - -//// [enumAssignmentCompat5.ts] -enum E { - A, B, C -} -enum Computed { - A = 1 << 1, - B = 1 << 2, - C = 1 << 3, -} -let n: number; -let e: E = n; // ok because it's too inconvenient otherwise -e = 0; // ok, in range -e = 4; // ok, out of range, but allowed computed enums don't have all members -let a: E.A = 0; // ok, A === 0 -a = 2; // error, 2 !== 0 -a = n; // ok - -let c: Computed = n; // ok -c = n; // ok -c = 4; // ok -let ca: Computed.A = 1; // error, Computed.A isn't a literal type because Computed has no enum literals - - - - - -/// [Declarations] //// - - - -//// [enumAssignmentCompat5.d.ts] -declare enum E { - A = 0, - B = 1, - C = 2 -} -declare enum Computed { - A = 2, - B = 4, - C = 8 -} -declare let n: number; -declare let e: E; -declare let a: E.A; -declare let c: Computed; -declare let ca: Computed.A; - -/// [Errors] //// - -enumAssignmentCompat5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumAssignmentCompat5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumAssignmentCompat5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumAssignmentCompat5.ts(12,1): error TS2322: Type '4' is not assignable to type 'E'. -enumAssignmentCompat5.ts(14,1): error TS2322: Type '2' is not assignable to type 'E.A'. -enumAssignmentCompat5.ts(20,5): error TS2322: Type '1' is not assignable to type 'Computed.A'. - - -==== enumAssignmentCompat5.ts (6 errors) ==== - enum E { - A, B, C - } - enum Computed { - A = 1 << 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - B = 1 << 2, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - C = 1 << 3, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - let n: number; - let e: E = n; // ok because it's too inconvenient otherwise - e = 0; // ok, in range - e = 4; // ok, out of range, but allowed computed enums don't have all members - ~ -!!! error TS2322: Type '4' is not assignable to type 'E'. - let a: E.A = 0; // ok, A === 0 - a = 2; // error, 2 !== 0 - ~ -!!! error TS2322: Type '2' is not assignable to type 'E.A'. - a = n; // ok - - let c: Computed = n; // ok - c = n; // ok - c = 4; // ok - let ca: Computed.A = 1; // error, Computed.A isn't a literal type because Computed has no enum literals - ~~ -!!! error TS2322: Type '1' is not assignable to type 'Computed.A'. - - - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics.d.ts deleted file mode 100644 index 9818f54dd2237..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics.d.ts +++ /dev/null @@ -1,249 +0,0 @@ -//// [tests/cases/conformance/enums/enumBasics.ts] //// - -//// [enumBasics.ts] -// Enum without initializers have first member = 0 and successive members = N + 1 -enum E1 { - A, - B, - C -} - -// Enum type is a subtype of Number -var x: number = E1.A; - -// Enum object type is anonymous with properties of the enum type and numeric indexer -var e: typeof E1 = E1; -var e: { - readonly A: E1.A; - readonly B: E1.B; - readonly C: E1.C; - readonly [n: number]: string; -}; -var e: typeof E1; - -// Reverse mapping of enum returns string name of property -var s: string = E1[e.A]; -var s: string; - - -// Enum with only constant members -enum E2 { - A = 1, B = 2, C = 3 -} - -// Enum with only computed members -enum E3 { - X = 'foo'.length, Y = 4 + 3, Z = +'foo' -} - -// Enum with constant members followed by computed members -enum E4 { - X = 0, Y, Z = 'foo'.length -} - -// Enum with > 2 constant members with no initializer for first member, non zero initializer for second element -enum E5 { - A, - B = 3, - C // 4 -} - -enum E6 { - A, - B = 0, - C // 1 -} - -// Enum with computed member initializer of type 'any' -enum E7 { - A = 'foo'['foo'] -} - -// Enum with computed member initializer of type number -enum E8 { - B = 'foo'['foo'] -} - -//Enum with computed member intializer of same enum type -enum E9 { - A, - B = A -} - -// (refer to .js to validate) -// Enum constant members are propagated -var doNotPropagate: (E8 | E7 | E4 | E3)[] = [ - E8.B, E7.A, E4.Z, E3.X, E3.Y, E3.Z -]; -// Enum computed members are not propagated -var doPropagate: (E9 | E6 | E5)[] = [ - E9.A, E9.B, E6.B, E6.C, E6.A, E5.A, E5.B, E5.C -]; - - - -/// [Declarations] //// - - - -//// [enumBasics.d.ts] -declare enum E1 { - A = 0, - B = 1, - C = 2 -} -declare var x: number; -declare var e: typeof E1; -declare var e: { - readonly A: E1.A; - readonly B: E1.B; - readonly C: E1.C; - readonly [n: number]: string; -}; -declare var e: typeof E1; -declare var s: string; -declare var s: string; -declare enum E2 { - A = 1, - B = 2, - C = 3 -} -declare enum E3 { - X, - Y = 7, - Z -} -declare enum E4 { - X = 0, - Y = 1, - Z -} -declare enum E5 { - A = 0, - B = 3, - C = 4 -} -declare enum E6 { - A = 0, - B = 0, - C = 1 -} -declare enum E7 { - A -} -declare enum E8 { - B -} -declare enum E9 { - A = 0, - B = 0 -} -declare var doNotPropagate: (E8 | E7 | E4 | E3)[]; -declare var doPropagate: (E9 | E6 | E5)[]; - -/// [Errors] //// - -enumBasics.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics.ts(33,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics.ts(33,34): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics.ts(38,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics.ts(56,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics.ts(61,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics.ts(67,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== enumBasics.ts (7 errors) ==== - // Enum without initializers have first member = 0 and successive members = N + 1 - enum E1 { - A, - B, - C - } - - // Enum type is a subtype of Number - var x: number = E1.A; - - // Enum object type is anonymous with properties of the enum type and numeric indexer - var e: typeof E1 = E1; - var e: { - readonly A: E1.A; - readonly B: E1.B; - readonly C: E1.C; - readonly [n: number]: string; - }; - var e: typeof E1; - - // Reverse mapping of enum returns string name of property - var s: string = E1[e.A]; - var s: string; - - - // Enum with only constant members - enum E2 { - A = 1, B = 2, C = 3 - } - - // Enum with only computed members - enum E3 { - X = 'foo'.length, Y = 4 + 3, Z = +'foo' - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - // Enum with constant members followed by computed members - enum E4 { - X = 0, Y, Z = 'foo'.length - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - // Enum with > 2 constant members with no initializer for first member, non zero initializer for second element - enum E5 { - A, - B = 3, - C // 4 - } - - enum E6 { - A, - B = 0, - C // 1 - } - - // Enum with computed member initializer of type 'any' - enum E7 { - A = 'foo'['foo'] - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - // Enum with computed member initializer of type number - enum E8 { - B = 'foo'['foo'] - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - //Enum with computed member intializer of same enum type - enum E9 { - A, - B = A - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - // (refer to .js to validate) - // Enum constant members are propagated - var doNotPropagate: (E8 | E7 | E4 | E3)[] = [ - E8.B, E7.A, E4.Z, E3.X, E3.Y, E3.Z - ]; - // Enum computed members are not propagated - var doPropagate: (E9 | E6 | E5)[] = [ - E9.A, E9.B, E6.B, E6.C, E6.A, E5.A, E5.B, E5.C - ]; - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics2.d.ts deleted file mode 100644 index cd76be299f30e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics2.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -//// [tests/cases/compiler/enumBasics2.ts] //// - -//// [enumBasics2.ts] -enum Foo { - a = 2, - b = 3, - x = a.b, // should error - y = b.a, // should error - z = y.x * a.x, // should error -} - -enum Bar { - a = (1).valueOf(), // ok - b = Foo.a, // ok - c = Foo.a.valueOf(), // ok - d = Foo.a.a, // should error -} - - -/// [Declarations] //// - - - -//// [enumBasics2.d.ts] -declare enum Foo { - a = 2, - b = 3, - x,// should error - y,// should error - z -} -declare enum Bar { - a,// ok - b,// ok - c,// ok - d -} - -/// [Errors] //// - -enumBasics2.ts(4,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(4,9): error TS2339: Property 'b' does not exist on type 'Foo.a'. -enumBasics2.ts(5,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(5,9): error TS2339: Property 'a' does not exist on type 'Foo.b'. -enumBasics2.ts(6,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(6,9): error TS2339: Property 'x' does not exist on type 'Foo.y'. -enumBasics2.ts(6,15): error TS2339: Property 'x' does not exist on type 'Foo.a'. -enumBasics2.ts(10,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(11,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(12,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(13,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(13,13): error TS2339: Property 'a' does not exist on type 'Foo.a'. - - -==== enumBasics2.ts (12 errors) ==== - enum Foo { - a = 2, - b = 3, - x = a.b, // should error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2339: Property 'b' does not exist on type 'Foo.a'. - y = b.a, // should error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2339: Property 'a' does not exist on type 'Foo.b'. - z = y.x * a.x, // should error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2339: Property 'x' does not exist on type 'Foo.y'. - ~ -!!! error TS2339: Property 'x' does not exist on type 'Foo.a'. - } - - enum Bar { - a = (1).valueOf(), // ok - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - b = Foo.a, // ok - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = Foo.a.valueOf(), // ok - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - d = Foo.a.a, // should error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2339: Property 'a' does not exist on type 'Foo.a'. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics3.d.ts deleted file mode 100644 index ff61a9e6ef4ae..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumBasics3.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -//// [tests/cases/compiler/enumBasics3.ts] //// - -//// [enumBasics3.ts] -module M { - export namespace N { - export enum E1 { - a = 1, - b = a.a, // should error - } - } -} - -module M { - export namespace N { - export enum E2 { - b = M.N.E1.a, - c = M.N.E1.a.a, // should error - } - } -} - - -/// [Declarations] //// - - - -//// [enumBasics3.d.ts] -declare namespace M { - namespace N { - enum E1 { - a = 1, - b - } - } -} -declare namespace M { - namespace N { - enum E2 { - b, - c - } - } -} - -/// [Errors] //// - -enumBasics3.ts(5,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics3.ts(5,13): error TS2339: Property 'a' does not exist on type 'E1.a'. -enumBasics3.ts(13,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics3.ts(14,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics3.ts(14,20): error TS2339: Property 'a' does not exist on type 'E1.a'. - - -==== enumBasics3.ts (5 errors) ==== - module M { - export namespace N { - export enum E1 { - a = 1, - b = a.a, // should error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2339: Property 'a' does not exist on type 'E1.a'. - } - } - } - - module M { - export namespace N { - export enum E2 { - b = M.N.E1.a, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = M.N.E1.a.a, // should error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2339: Property 'a' does not exist on type 'E1.a'. - } - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithString.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithString.d.ts deleted file mode 100644 index c9b9f13c355e1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithString.d.ts +++ /dev/null @@ -1,141 +0,0 @@ -//// [tests/cases/conformance/enums/enumConstantMemberWithString.ts] //// - -//// [enumConstantMemberWithString.ts] -enum T1 { - a = "1", - b = "1" + "2", - c = "1" + "2" + "3", - d = "a" - "a", - e = "a" + 1 -} - -enum T2 { - a = "1", - b = "1" + "2" -} - -enum T3 { - a = "1", - b = "1" + "2", - c = 1, - d = 1 + 2 -} - -enum T4 { - a = "1" -} - -enum T5 { - a = "1" + "2" -} - -declare enum T6 { - a = "1", - b = "1" + "2" -} - - -/// [Declarations] //// - - - -//// [enumConstantMemberWithString.d.ts] -declare enum T1 { - a = "1", - b = "12", - c = "123", - d, - e = "a1" -} -declare enum T2 { - a = "1", - b = "12" -} -declare enum T3 { - a = "1", - b = "12", - c = 1, - d = 3 -} -declare enum T4 { - a = "1" -} -declare enum T5 { - a = "12" -} -declare enum T6 { - a = "1", - b = "12" -} - -/// [Errors] //// - -enumConstantMemberWithString.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithString.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithString.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithString.ts(5,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -enumConstantMemberWithString.ts(5,15): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -enumConstantMemberWithString.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithString.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithString.ts(16,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithString.ts(18,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithString.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithString.ts(31,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== enumConstantMemberWithString.ts (11 errors) ==== - enum T1 { - a = "1", - b = "1" + "2", - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = "1" + "2" + "3", - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - d = "a" - "a", - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~~~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - e = "a" + 1 - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - enum T2 { - a = "1", - b = "1" + "2" - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - enum T3 { - a = "1", - b = "1" + "2", - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = 1, - d = 1 + 2 - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - enum T4 { - a = "1" - } - - enum T5 { - a = "1" + "2" - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - declare enum T6 { - a = "1", - b = "1" + "2" - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithStringEmitDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithStringEmitDeclaration.d.ts deleted file mode 100644 index a38ecce37e5d1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithStringEmitDeclaration.d.ts +++ /dev/null @@ -1,114 +0,0 @@ -//// [tests/cases/conformance/enums/enumConstantMemberWithStringEmitDeclaration.ts] //// - -//// [enumConstantMemberWithStringEmitDeclaration.ts] -enum T1 { - a = "1", - b = "1" + "2", - c = "1" + "2" + "3" -} - -enum T2 { - a = "1", - b = "1" + "2" -} - -enum T3 { - a = "1", - b = "1" + "2" -} - -enum T4 { - a = "1" -} - -enum T5 { - a = "1" + "2" -} - -declare enum T6 { - a = "1", - b = "1" + "2" -} - - -/// [Declarations] //// - - - -//// [enumConstantMemberWithStringEmitDeclaration.d.ts] -declare enum T1 { - a = "1", - b = "12", - c = "123" -} -declare enum T2 { - a = "1", - b = "12" -} -declare enum T3 { - a = "1", - b = "12" -} -declare enum T4 { - a = "1" -} -declare enum T5 { - a = "12" -} -declare enum T6 { - a = "1", - b = "12" -} - -/// [Errors] //// - -enumConstantMemberWithStringEmitDeclaration.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithStringEmitDeclaration.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithStringEmitDeclaration.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithStringEmitDeclaration.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithStringEmitDeclaration.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithStringEmitDeclaration.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== enumConstantMemberWithStringEmitDeclaration.ts (6 errors) ==== - enum T1 { - a = "1", - b = "1" + "2", - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = "1" + "2" + "3" - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - enum T2 { - a = "1", - b = "1" + "2" - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - enum T3 { - a = "1", - b = "1" + "2" - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - enum T4 { - a = "1" - } - - enum T5 { - a = "1" + "2" - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - declare enum T6 { - a = "1", - b = "1" + "2" - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiterals.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiterals.d.ts deleted file mode 100644 index aeb142660e6c1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiterals.d.ts +++ /dev/null @@ -1,185 +0,0 @@ -//// [tests/cases/conformance/enums/enumConstantMemberWithTemplateLiterals.ts] //// - -//// [enumConstantMemberWithTemplateLiterals.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, - e = `1` - `1`, - f = `1` + 1, - g = `1${"2"}3`, - h = `1`.length -} - -enum T6 { - a = 1, - b = `12`.length -} - -declare enum T7 { - a = `1`, - b = `1` + `1`, - c = "2" + `1` -} - - -/// [Declarations] //// - - - -//// [enumConstantMemberWithTemplateLiterals.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, - e, - f = "11", - g = "123", - h -} -declare enum T6 { - a = 1, - b -} -declare enum T7 { - a = "1", - b = "11", - c = "21" -} - -/// [Errors] //// - -enumConstantMemberWithTemplateLiterals.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithTemplateLiterals.ts(17,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithTemplateLiterals.ts(18,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithTemplateLiterals.ts(19,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithTemplateLiterals.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithTemplateLiterals.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithTemplateLiterals.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithTemplateLiterals.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithTemplateLiterals.ts(28,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -enumConstantMemberWithTemplateLiterals.ts(28,15): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -enumConstantMemberWithTemplateLiterals.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithTemplateLiterals.ts(31,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithTemplateLiterals.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithTemplateLiterals.ts(41,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMemberWithTemplateLiterals.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== enumConstantMemberWithTemplateLiterals.ts (15 errors) ==== - enum T1 { - a = `1` - } - - enum T2 { - a = `1`, - b = "2", - c = 3 - } - - enum T3 { - a = `1` + `1` - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - enum T4 { - a = `1`, - b = `1` + `1`, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = `1` + "2", - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - d = "2" + `1`, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - e = "2" + `1` + `1` - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - enum T5 { - a = `1`, - b = `1` + `2`, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = `1` + `2` + `3`, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - d = 1, - e = `1` - `1`, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~~~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - f = `1` + 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - g = `1${"2"}3`, - h = `1`.length - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - enum T6 { - a = 1, - b = `12`.length - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - declare enum T7 { - a = `1`, - b = `1` + `1`, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = "2" + `1` - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMembers.d.ts deleted file mode 100644 index a170e0da0fc19..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMembers.d.ts +++ /dev/null @@ -1,193 +0,0 @@ -//// [tests/cases/conformance/enums/enumConstantMembers.ts] //// - -//// [enumConstantMembers.ts] -// Constant members allow negatives, but not decimals. Also hex literals are allowed -enum E1 { - a = 1, - b -} -enum E2 { - a = - 1, - b -} -enum E3 { - a = 0.1, - b // Error because 0.1 is not a constant -} - -declare enum E4 { - a = 1, - b = -1, - c = 0.1 // Not a constant -} - -enum E5 { - a = 1 / 0, - b = 2 / 0.0, - c = 1.0 / 0.0, - d = 0.0 / 0.0, - e = NaN, - f = Infinity, - g = -Infinity -} - -const enum E6 { - a = 1 / 0, - b = 2 / 0.0, - c = 1.0 / 0.0, - d = 0.0 / 0.0, - e = NaN, - f = Infinity, - g = -Infinity -} - - -/// [Declarations] //// - - - -//// [enumConstantMembers.d.ts] -declare enum E1 { - a = 1, - b = 2 -} -declare enum E2 { - a = -1, - b = 0 -} -declare enum E3 { - a = 0.1, - b = 1.1 -} -declare enum E4 { - a = 1, - b = -1, - c = 0.1 -} -declare enum E5 { - a = Infinity, - b = Infinity, - c = Infinity, - d = NaN, - e, - f, - g -} -declare const enum E6 { - a = Infinity, - b = Infinity, - c = Infinity, - d = NaN, - e, - f, - g -} - -/// [Errors] //// - -enumConstantMembers.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(23,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(24,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(25,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(32,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(32,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(33,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(34,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(35,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. -enumConstantMembers.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(36,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. -enumConstantMembers.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(37,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(38,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - - -==== enumConstantMembers.ts (21 errors) ==== - // Constant members allow negatives, but not decimals. Also hex literals are allowed - enum E1 { - a = 1, - b - } - enum E2 { - a = - 1, - b - } - enum E3 { - a = 0.1, - b // Error because 0.1 is not a constant - } - - declare enum E4 { - a = 1, - b = -1, - c = 0.1 // Not a constant - } - - enum E5 { - a = 1 / 0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - b = 2 / 0.0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = 1.0 / 0.0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - d = 0.0 / 0.0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - e = NaN, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - f = Infinity, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - g = -Infinity - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - const enum E6 { - a = 1 / 0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - b = 2 / 0.0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - c = 1.0 / 0.0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - d = 0.0 / 0.0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~ -!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - e = NaN, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ -!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - f = Infinity, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - g = -Infinity - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrorOnConstantBindingWithInitializer.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrorOnConstantBindingWithInitializer.d.ts deleted file mode 100644 index 0deeba8f9c401..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrorOnConstantBindingWithInitializer.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -//// [tests/cases/conformance/enums/enumErrorOnConstantBindingWithInitializer.ts] //// - -//// [enumErrorOnConstantBindingWithInitializer.ts] -type Thing = { - value?: string | number; -}; - -declare const thing: Thing; -const temp: string | number | undefined = thing.value; -const value: string | number = temp === undefined ? "123" : thing.value; - -enum E { - test = value, -} - - -/// [Declarations] //// - - - -//// [enumErrorOnConstantBindingWithInitializer.d.ts] -type Thing = { - value?: string | number; -}; -declare const thing: Thing; -declare const temp: string | number | undefined; -declare const value: string | number; -declare enum E { - test -} - -/// [Errors] //// - -enumErrorOnConstantBindingWithInitializer.ts(7,7): error TS2322: Type 'string | number | undefined' is not assignable to type 'string | number'. - Type 'undefined' is not assignable to type 'string | number'. -enumErrorOnConstantBindingWithInitializer.ts(10,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrorOnConstantBindingWithInitializer.ts(10,10): error TS18033: Type 'string | number' is not assignable to type 'number' as required for computed enum member values. - Type 'string' is not assignable to type 'number'. - - -==== enumErrorOnConstantBindingWithInitializer.ts (3 errors) ==== - type Thing = { - value?: string | number; - }; - - declare const thing: Thing; - const temp: string | number | undefined = thing.value; - const value: string | number = temp === undefined ? "123" : thing.value; - ~~~~~ -!!! error TS2322: Type 'string | number | undefined' is not assignable to type 'string | number'. -!!! error TS2322: Type 'undefined' is not assignable to type 'string | number'. - - enum E { - test = value, - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS18033: Type 'string | number' is not assignable to type 'number' as required for computed enum member values. -!!! error TS18033: 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/enumErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrors.d.ts deleted file mode 100644 index 2feb88ebf225d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumErrors.d.ts +++ /dev/null @@ -1,288 +0,0 @@ -//// [tests/cases/conformance/enums/enumErrors.ts] //// - -//// [enumErrors.ts] -// Enum named with PredefinedTypes -enum any { } -enum number { } -enum string { } -enum boolean { } - -// Enum with computed member initializer of type Number -enum E5 { - C = new Number(30) -} - -enum E9 { - A, - B = A -} - -//Enum with computed member intializer of different enum type -// Bug 707850: This should be allowed -enum E10 { - A = E9.A, - B = E9.B -} - -// Enum with computed member intializer of other types -enum E11 { - A = true, - B = new Date(), - C = window, - D = {}, - E = (() => 'foo')(), -} - -// Enum with string valued member and computed member initializers -enum E12 { - A = '', - B = new Date(), - C = window, - D = {}, - E = 1 + 1, - F = (() => 'foo')(), -} - -// Enum with incorrect syntax -enum E13 { - postComma, - postValueComma = 1, - - postSemicolon; - postColonValueComma: 2, - postColonValueSemicolon: 3; -}; - -enum E14 { a, b: any "hello" += 1, c, d} - - -/// [Declarations] //// - - - -//// [enumErrors.d.ts] -declare enum any { -} -declare enum number { -} -declare enum string { -} -declare enum boolean { -} -declare enum E5 { - C -} -declare enum E9 { - A = 0, - B = 0 -} -declare enum E10 { - A, - B -} -declare enum E11 { - A, - B, - C, - D, - E -} -declare enum E12 { - A = "", - B, - C, - D, - E = 2, - F -} -declare enum E13 { - postComma = 0, - postValueComma = 1, - postSemicolon = 2, - postColonValueComma = 3, - 2 = 4, - postColonValueSemicolon = 5, - 3 = 6 -} -declare enum E14 { - a = 0, - b = 1, - any = 2, - "hello" = 3, - 1 = 4, - c = 5, - d = 6 -} - -/// [Errors] //// - -enumErrors.ts(2,6): error TS2431: Enum name cannot be 'any'. -enumErrors.ts(3,6): error TS2431: Enum name cannot be 'number'. -enumErrors.ts(4,6): error TS2431: Enum name cannot be 'string'. -enumErrors.ts(5,6): error TS2431: Enum name cannot be 'boolean'. -enumErrors.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(9,9): error TS18033: Type 'Number' is not assignable to type 'number' as required for computed enum member values. - 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. -enumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(26,9): error TS18033: Type 'boolean' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(27,9): error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(28,9): error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(29,9): error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(30,9): error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(36,9): error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(37,9): error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(38,9): error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(39,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(40,9): error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(48,18): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(49,24): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(49,26): error TS2452: An enum member cannot have a numeric name. -enumErrors.ts(50,28): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(50,30): error TS2452: An enum member cannot have a numeric name. -enumErrors.ts(50,31): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(53,16): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(53,22): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(53,30): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(53,33): error TS2452: An enum member cannot have a numeric name. - - -==== enumErrors.ts (37 errors) ==== - // Enum named with PredefinedTypes - enum any { } - ~~~ -!!! error TS2431: Enum name cannot be 'any'. - enum number { } - ~~~~~~ -!!! error TS2431: Enum name cannot be 'number'. - enum string { } - ~~~~~~ -!!! error TS2431: Enum name cannot be 'string'. - enum boolean { } - ~~~~~~~ -!!! error TS2431: Enum name cannot be 'boolean'. - - // Enum with computed member initializer of type Number - enum E5 { - C = new Number(30) - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~ -!!! error TS18033: Type 'Number' is not assignable to type 'number' as required for computed enum member values. -!!! error TS18033: 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. - } - - enum E9 { - A, - B = A - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - //Enum with computed member intializer of different enum type - // Bug 707850: This should be allowed - enum E10 { - A = E9.A, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - B = E9.B - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - // Enum with computed member intializer of other types - enum E11 { - A = true, - ~~~~ -!!! error TS18033: Type 'boolean' is not assignable to type 'number' as required for computed enum member values. - B = new Date(), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~ -!!! error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. - C = window, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. - D = {}, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ -!!! error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. - E = (() => 'foo')(), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~~ -!!! error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. - } - - // Enum with string valued member and computed member initializers - enum E12 { - A = '', - B = new Date(), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~ -!!! error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. - C = window, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. - D = {}, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ -!!! error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. - E = 1 + 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - F = (() => 'foo')(), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~~ -!!! error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. - } - - // Enum with incorrect syntax - enum E13 { - postComma, - postValueComma = 1, - - postSemicolon; - ~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - postColonValueComma: 2, - ~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - ~ -!!! error TS2452: An enum member cannot have a numeric name. - postColonValueSemicolon: 3; - ~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - ~ -!!! error TS2452: An enum member cannot have a numeric name. - ~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - }; - - enum E14 { a, b: any "hello" += 1, c, d} - ~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - ~~~~~~~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - ~~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - ~ -!!! error TS2452: An enum member cannot have a numeric name. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumExportMergingES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumExportMergingES6.d.ts deleted file mode 100644 index 8bfc2624275c9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumExportMergingES6.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -//// [tests/cases/conformance/enums/enumExportMergingES6.ts] //// - -//// [enumExportMergingES6.ts] -export enum Animals { - Cat = 1 -} -export enum Animals { - Dog = 2 -} -export enum Animals { - CatDog = Cat | Dog -} - - -/// [Declarations] //// - - - -//// [enumExportMergingES6.d.ts] -export declare enum Animals { - Cat = 1 -} -export declare enum Animals { - Dog = 2 -} -export declare enum Animals { - CatDog -} - -/// [Errors] //// - -enumExportMergingES6.ts(8,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== enumExportMergingES6.ts (1 errors) ==== - export enum Animals { - Cat = 1 - } - export enum Animals { - Dog = 2 - } - export enum Animals { - CatDog = Cat | Dog - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumLiteralAssignableToEnumInsideUnion.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumLiteralAssignableToEnumInsideUnion.d.ts deleted file mode 100644 index ee6dc42a4c928..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumLiteralAssignableToEnumInsideUnion.d.ts +++ /dev/null @@ -1,130 +0,0 @@ -//// [tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts] //// - -//// [enumLiteralAssignableToEnumInsideUnion.ts] -module X { - export enum Foo { - A, B - } -} -module Y { - export enum Foo { - A, B - } -} -module Z { - export enum Foo { - A = 1 << 1, - B = 1 << 2, - } -} -module Ka { - export enum Foo { - A = 1 << 10, - B = 1 << 11, - } -} -const e0: X.Foo | boolean = Y.Foo.A; // ok -const e1: X.Foo | boolean = Z.Foo.A; // not legal, Z is computed -const e2: X.Foo.A | X.Foo.B | boolean = Z.Foo.A; // still not legal -const e3: X.Foo.B | boolean = Z.Foo.A; // not legal -const e4: X.Foo.A | boolean = Z.Foo.A; // not legal either because Z.Foo is computed and Z.Foo.A is not necessarily assignable to X.Foo.A -const e5: Ka.Foo | boolean = Z.Foo.A; // ok - - -/// [Declarations] //// - - - -//// [enumLiteralAssignableToEnumInsideUnion.d.ts] -declare namespace X { - enum Foo { - A = 0, - B = 1 - } -} -declare namespace Y { - enum Foo { - A = 0, - B = 1 - } -} -declare namespace Z { - enum Foo { - A = 2, - B = 4 - } -} -declare namespace Ka { - enum Foo { - A = 1024, - B = 2048 - } -} -declare const e0: X.Foo | boolean; -declare const e1: X.Foo | boolean; -declare const e2: X.Foo.A | X.Foo.B | boolean; -declare const e3: X.Foo.B | boolean; -declare const e4: X.Foo.A | boolean; -declare const e5: Ka.Foo | boolean; - -/// [Errors] //// - -enumLiteralAssignableToEnumInsideUnion.ts(13,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumLiteralAssignableToEnumInsideUnion.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumLiteralAssignableToEnumInsideUnion.ts(19,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumLiteralAssignableToEnumInsideUnion.ts(20,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumLiteralAssignableToEnumInsideUnion.ts(24,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. -enumLiteralAssignableToEnumInsideUnion.ts(25,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. -enumLiteralAssignableToEnumInsideUnion.ts(26,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo.B'. -enumLiteralAssignableToEnumInsideUnion.ts(27,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo.A'. -enumLiteralAssignableToEnumInsideUnion.ts(28,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. - - -==== enumLiteralAssignableToEnumInsideUnion.ts (9 errors) ==== - module X { - export enum Foo { - A, B - } - } - module Y { - export enum Foo { - A, B - } - } - module Z { - export enum Foo { - A = 1 << 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - B = 1 << 2, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - } - module Ka { - export enum Foo { - A = 1 << 10, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - B = 1 << 11, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - } - const e0: X.Foo | boolean = Y.Foo.A; // ok - const e1: X.Foo | boolean = Z.Foo.A; // not legal, Z is computed - ~~ -!!! error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. - const e2: X.Foo.A | X.Foo.B | boolean = Z.Foo.A; // still not legal - ~~ -!!! error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. - const e3: X.Foo.B | boolean = Z.Foo.A; // not legal - ~~ -!!! error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo.B'. - const e4: X.Foo.A | boolean = Z.Foo.A; // not legal either because Z.Foo is computed and Z.Foo.A is not necessarily assignable to X.Foo.A - ~~ -!!! error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo.A'. - const e5: Ka.Foo | boolean = Z.Foo.A; // ok - ~~ -!!! error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMerging.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMerging.d.ts deleted file mode 100644 index 4ba5274327865..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMerging.d.ts +++ /dev/null @@ -1,219 +0,0 @@ -//// [tests/cases/conformance/enums/enumMerging.ts] //// - -//// [enumMerging.ts] -// Enum with only constant members across 2 declarations with the same root module -// Enum with initializer in all declarations with constant members with the same root module -module M1 { - enum EImpl1 { - A, B, C - } - - enum EImpl1 { - D = 1, E, F - } - - export enum EConst1 { - A = 3, B = 2, C = 1 - } - - export enum EConst1 { - D = 7, E = 9, F = 8 - } - - var x = [EConst1.A, EConst1.B, EConst1.C, EConst1.D, EConst1.E, EConst1.F]; -} - -// Enum with only computed members across 2 declarations with the same root module -module M2 { - export enum EComp2 { - A = 'foo'.length, B = 'foo'.length, C = 'foo'.length - } - - export enum EComp2 { - D = 'foo'.length, E = 'foo'.length, F = 'foo'.length - } - - var x = [EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F]; -} - -// Enum with initializer in only one of two declarations with constant members with the same root module -module M3 { - enum EInit { - A, - B - } - - enum EInit { - C = 1, D, E - } -} - -// Enums with same name but different root module -module M4 { - export enum Color { Red, Green, Blue } -} -module M5 { - export enum Color { Red, Green, Blue } -} - -module M6.A { - export enum Color { Red, Green, Blue } -} -module M6 { - export module A { - export enum Color { Yellow = 1 } - } - var t = A.Color.Yellow; - t = A.Color.Red; -} - - -/// [Declarations] //// - - - -//// [enumMerging.d.ts] -declare namespace M1 { - enum EConst1 { - A = 3, - B = 2, - C = 1 - } - enum EConst1 { - D = 7, - E = 9, - F = 8 - } -} -declare namespace M2 { - enum EComp2 { - A, - B, - C - } - enum EComp2 { - D, - E, - F - } -} -declare namespace M3 { -} -declare namespace M4 { - enum Color { - Red = 0, - Green = 1, - Blue = 2 - } -} -declare namespace M5 { - enum Color { - Red = 0, - Green = 1, - Blue = 2 - } -} -declare namespace M6.A { - enum Color { - Red = 0, - Green = 1, - Blue = 2 - } -} -declare namespace M6 { - namespace A { - enum Color { - Yellow = 1 - } - } -} - -/// [Errors] //// - -enumMerging.ts(26,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumMerging.ts(26,27): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumMerging.ts(26,45): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumMerging.ts(30,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumMerging.ts(30,27): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumMerging.ts(30,45): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== enumMerging.ts (6 errors) ==== - // Enum with only constant members across 2 declarations with the same root module - // Enum with initializer in all declarations with constant members with the same root module - module M1 { - enum EImpl1 { - A, B, C - } - - enum EImpl1 { - D = 1, E, F - } - - export enum EConst1 { - A = 3, B = 2, C = 1 - } - - export enum EConst1 { - D = 7, E = 9, F = 8 - } - - var x = [EConst1.A, EConst1.B, EConst1.C, EConst1.D, EConst1.E, EConst1.F]; - } - - // Enum with only computed members across 2 declarations with the same root module - module M2 { - export enum EComp2 { - A = 'foo'.length, B = 'foo'.length, C = 'foo'.length - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum EComp2 { - D = 'foo'.length, E = 'foo'.length, F = 'foo'.length - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - var x = [EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F]; - } - - // Enum with initializer in only one of two declarations with constant members with the same root module - module M3 { - enum EInit { - A, - B - } - - enum EInit { - C = 1, D, E - } - } - - // Enums with same name but different root module - module M4 { - export enum Color { Red, Green, Blue } - } - module M5 { - export enum Color { Red, Green, Blue } - } - - module M6.A { - export enum Color { Red, Green, Blue } - } - module M6 { - export module A { - export enum Color { Yellow = 1 } - } - var t = A.Color.Yellow; - t = A.Color.Red; - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMergingErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMergingErrors.d.ts deleted file mode 100644 index d27913d2bca24..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumMergingErrors.d.ts +++ /dev/null @@ -1,177 +0,0 @@ -//// [tests/cases/conformance/enums/enumMergingErrors.ts] //// - -//// [enumMergingErrors.ts] -// Enum with constant, computed, constant members split across 3 declarations with the same root module -module M { - export enum E1 { A = 0 } - export enum E2 { C } - export enum E3 { A = 0 } -} -module M { - export enum E1 { B = 'foo'.length } - export enum E2 { B = 'foo'.length } - export enum E3 { C } -} -module M { - export enum E1 { C } - export enum E2 { A = 0 } - export enum E3 { B = 'foo'.length } -} - -// Enum with no initializer in either declaration with constant members with the same root module -module M1 { - export enum E1 { A = 0 } -} -module M1 { - export enum E1 { B } -} -module M1 { - export enum E1 { C } -} - - -// Enum with initializer in only one of three declarations with constant members with the same root module -module M2 { - export enum E1 { A } -} -module M2 { - export enum E1 { B = 0 } -} -module M2 { - export enum E1 { C } -} - - - - -/// [Declarations] //// - - - -//// [enumMergingErrors.d.ts] -declare namespace M { - enum E1 { - A = 0 - } - enum E2 { - C = 0 - } - enum E3 { - A = 0 - } -} -declare namespace M { - enum E1 { - B - } - enum E2 { - B - } - enum E3 { - C = 0 - } -} -declare namespace M { - enum E1 { - C = 0 - } - enum E2 { - A = 0 - } - enum E3 { - B - } -} -declare namespace M1 { - enum E1 { - A = 0 - } -} -declare namespace M1 { - enum E1 { - B = 0 - } -} -declare namespace M1 { - enum E1 { - C = 0 - } -} -declare namespace M2 { - enum E1 { - A = 0 - } -} -declare namespace M2 { - enum E1 { - B = 0 - } -} -declare namespace M2 { - enum E1 { - C = 0 - } -} - -/// [Errors] //// - -enumMergingErrors.ts(8,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumMergingErrors.ts(9,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumMergingErrors.ts(15,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumMergingErrors.ts(26,22): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. -enumMergingErrors.ts(38,22): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. - - -==== enumMergingErrors.ts (5 errors) ==== - // Enum with constant, computed, constant members split across 3 declarations with the same root module - module M { - export enum E1 { A = 0 } - export enum E2 { C } - export enum E3 { A = 0 } - } - module M { - export enum E1 { B = 'foo'.length } - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - export enum E2 { B = 'foo'.length } - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - export enum E3 { C } - } - module M { - export enum E1 { C } - export enum E2 { A = 0 } - export enum E3 { B = 'foo'.length } - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - // Enum with no initializer in either declaration with constant members with the same root module - module M1 { - export enum E1 { A = 0 } - } - module M1 { - export enum E1 { B } - } - module M1 { - export enum E1 { C } - ~ -!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. - } - - - // Enum with initializer in only one of three declarations with constant members with the same root module - module M2 { - export enum E1 { A } - } - module M2 { - export enum E1 { B = 0 } - } - module M2 { - export enum E1 { C } - ~ -!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. - } - - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumNumbering1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumNumbering1.d.ts deleted file mode 100644 index e5630e5c9bb2b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumNumbering1.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -//// [tests/cases/compiler/enumNumbering1.ts] //// - -//// [enumNumbering1.ts] -enum Test { - A, - B, - C = Math.floor(Math.random() * 1000), - D = 10, - E // Error but shouldn't be -} - - -/// [Declarations] //// - - - -//// [enumNumbering1.d.ts] -declare enum Test { - A = 0, - B = 1, - C, - D = 10, - E = 11 -} - -/// [Errors] //// - -enumNumbering1.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== enumNumbering1.ts (1 errors) ==== - enum Test { - A, - B, - C = Math.floor(Math.random() * 1000), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - D = 10, - E // Error but shouldn't be - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumPropertyAccessBeforeInitalisation.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumPropertyAccessBeforeInitalisation.d.ts deleted file mode 100644 index c28227718654f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumPropertyAccessBeforeInitalisation.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -//// [tests/cases/compiler/enumPropertyAccessBeforeInitalisation.ts] //// - -//// [enumPropertyAccessBeforeInitalisation.ts] -enum E { - A = A, - B = E.B, - C = E["C"], - D = 1 + D -} - - -/// [Declarations] //// - - - -//// [enumPropertyAccessBeforeInitalisation.d.ts] -declare enum E { - A, - B, - C, - D -} - -/// [Errors] //// - -enumPropertyAccessBeforeInitalisation.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumPropertyAccessBeforeInitalisation.ts(2,9): error TS2565: Property 'A' is used before being assigned. -enumPropertyAccessBeforeInitalisation.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumPropertyAccessBeforeInitalisation.ts(3,9): error TS2565: Property 'B' is used before being assigned. -enumPropertyAccessBeforeInitalisation.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumPropertyAccessBeforeInitalisation.ts(4,9): error TS2565: Property 'C' is used before being assigned. -enumPropertyAccessBeforeInitalisation.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumPropertyAccessBeforeInitalisation.ts(5,13): error TS2565: Property 'D' is used before being assigned. - - -==== enumPropertyAccessBeforeInitalisation.ts (8 errors) ==== - enum E { - A = A, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2565: Property 'A' is used before being assigned. - B = E.B, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ -!!! error TS2565: Property 'B' is used before being assigned. - C = E["C"], - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS2565: Property 'C' is used before being assigned. - D = 1 + D - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2565: Property 'D' is used before being assigned. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithComputedMember.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithComputedMember.d.ts deleted file mode 100644 index d187e300b942d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithComputedMember.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -//// [tests/cases/compiler/enumWithComputedMember.ts] //// - -//// [enumWithComputedMember.ts] -enum A { - X = "".length, - Y = X, - Z -} - - -/// [Declarations] //// - - - -//// [enumWithComputedMember.d.ts] -declare enum A { - X, - Y, - Z -} - -/// [Errors] //// - -enumWithComputedMember.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumWithComputedMember.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumWithComputedMember.ts(4,5): error TS1061: Enum member must have initializer. - - -==== enumWithComputedMember.ts (3 errors) ==== - enum A { - X = "".length, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Y = X, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Z - ~ -!!! error TS1061: Enum member must have initializer. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithExport.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithExport.d.ts deleted file mode 100644 index eddd40d2b522c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithExport.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -//// [tests/cases/compiler/enumWithExport.ts] //// - -//// [enumWithExport.ts] -namespace x { - export let y = 123 -} -enum x { - z = y -} - -/// [Declarations] //// - - - -//// [enumWithExport.d.ts] -declare namespace x { - let y: number; -} -declare enum x { - z -} - -/// [Errors] //// - -enumWithExport.ts(5,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumWithExport.ts(5,7): error TS2304: Cannot find name 'y'. - - -==== enumWithExport.ts (2 errors) ==== - namespace x { - export let y = 123 - } - enum x { - z = y - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2304: Cannot find name 'y'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithParenthesizedInitializer1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithParenthesizedInitializer1.d.ts deleted file mode 100644 index d7693a73095e9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithParenthesizedInitializer1.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/compiler/enumWithParenthesizedInitializer1.ts] //// - -//// [enumWithParenthesizedInitializer1.ts] -enum E { - e = -(3 -} - -/// [Declarations] //// - - - -//// [enumWithParenthesizedInitializer1.d.ts] -declare enum E { - e = -3 -} - -/// [Errors] //// - -enumWithParenthesizedInitializer1.ts(2,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumWithParenthesizedInitializer1.ts(3,1): error TS1005: ')' expected. - - -==== enumWithParenthesizedInitializer1.ts (2 errors) ==== - enum E { - e = -(3 - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - ~ -!!! error TS1005: ')' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithoutInitializerAfterComputedMember.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithoutInitializerAfterComputedMember.d.ts deleted file mode 100644 index 5ba602538bebe..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumWithoutInitializerAfterComputedMember.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/compiler/enumWithoutInitializerAfterComputedMember.ts] //// - -//// [enumWithoutInitializerAfterComputedMember.ts] -enum E { - a, - b = a, - c -} - -/// [Declarations] //// - - - -//// [enumWithoutInitializerAfterComputedMember.d.ts] -declare enum E { - a = 0, - b = 0, - c = 1 -} - -/// [Errors] //// - -enumWithoutInitializerAfterComputedMember.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== enumWithoutInitializerAfterComputedMember.ts (1 errors) ==== - enum E { - a, - b = a, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/equalityWithEnumTypes.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/equalityWithEnumTypes.d.ts deleted file mode 100644 index fe4a60daf2e9e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/equalityWithEnumTypes.d.ts +++ /dev/null @@ -1,127 +0,0 @@ -//// [tests/cases/conformance/types/typeRelationships/comparable/equalityWithEnumTypes.ts] //// - -//// [equalityWithEnumTypes.ts] -// Literal enum type -enum E1 { - a = 1, - b = 2, -} - -// Numeric enum type -enum E2 { - a = 1 << 0, - b = 1 << 1 -} - -function f1(v: E1): void { - if (v !== 0) { // Error - v; - } - if (v !== 1) { - v; - } - if (v !== 2) { - v; - } - if (v !== 3) { // Error - v; - } -} - -function f2(v: E2): void { - if (v !== 0) { - v; - } - if (v !== 1) { - v; - } - if (v !== 2) { - v; - } - if (v !== 3) { - v; - } -} - - -/// [Declarations] //// - - - -//// [equalityWithEnumTypes.d.ts] -declare enum E1 { - a = 1, - b = 2 -} -declare enum E2 { - a = 1, - b = 2 -} -declare function f1(v: E1): void; -declare function f2(v: E2): void; - -/// [Errors] //// - -equalityWithEnumTypes.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -equalityWithEnumTypes.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -equalityWithEnumTypes.ts(14,9): error TS2367: This comparison appears to be unintentional because the types 'E1' and '0' have no overlap. -equalityWithEnumTypes.ts(23,9): error TS2367: This comparison appears to be unintentional because the types 'E1' and '3' have no overlap. -equalityWithEnumTypes.ts(29,9): error TS2367: This comparison appears to be unintentional because the types 'E2' and '0' have no overlap. -equalityWithEnumTypes.ts(38,9): error TS2367: This comparison appears to be unintentional because the types 'E2' and '3' have no overlap. - - -==== equalityWithEnumTypes.ts (6 errors) ==== - // Literal enum type - enum E1 { - a = 1, - b = 2, - } - - // Numeric enum type - enum E2 { - a = 1 << 0, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - b = 1 << 1 - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - function f1(v: E1): void { - if (v !== 0) { // Error - ~~~~~~~ -!!! error TS2367: This comparison appears to be unintentional because the types 'E1' and '0' have no overlap. - v; - } - if (v !== 1) { - v; - } - if (v !== 2) { - v; - } - if (v !== 3) { // Error - ~~~~~~~ -!!! error TS2367: This comparison appears to be unintentional because the types 'E1' and '3' have no overlap. - v; - } - } - - function f2(v: E2): void { - if (v !== 0) { - ~~~~~~~ -!!! error TS2367: This comparison appears to be unintentional because the types 'E2' and '0' have no overlap. - v; - } - if (v !== 1) { - v; - } - if (v !== 2) { - v; - } - if (v !== 3) { - ~~~~~~~ -!!! error TS2367: This comparison appears to be unintentional because the types 'E2' and '3' have no overlap. - v; - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exactSpellingSuggestion.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exactSpellingSuggestion.d.ts deleted file mode 100644 index d20302a69538b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exactSpellingSuggestion.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -//// [tests/cases/compiler/exactSpellingSuggestion.ts] //// - -//// [exactSpellingSuggestion.ts] -// Fixes #16245 -- always suggest the exact match, even when -// other options are very close -enum U8 { - BIT_0 = 1 << 0, - BIT_1 = 1 << 1, - BIT_2 = 1 << 2 -} - -U8.bit_2 - - -/// [Declarations] //// - - - -//// [exactSpellingSuggestion.d.ts] -declare enum U8 { - BIT_0 = 1, - BIT_1 = 2, - BIT_2 = 4 -} - -/// [Errors] //// - -exactSpellingSuggestion.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -exactSpellingSuggestion.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -exactSpellingSuggestion.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -exactSpellingSuggestion.ts(9,4): error TS2551: Property 'bit_2' does not exist on type 'typeof U8'. Did you mean 'BIT_2'? - - -==== exactSpellingSuggestion.ts (4 errors) ==== - // Fixes #16245 -- always suggest the exact match, even when - // other options are very close - enum U8 { - BIT_0 = 1 << 0, - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - BIT_1 = 1 << 1, - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - BIT_2 = 1 << 2 - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - U8.bit_2 - ~~~~~ -!!! error TS2551: Property 'bit_2' does not exist on type 'typeof U8'. Did you mean 'BIT_2'? -!!! related TS2728 exactSpellingSuggestion.ts:6:5: 'BIT_2' is declared here. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesJSDocInTs.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesJSDocInTs.d.ts deleted file mode 100644 index 567ea84a15598..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesJSDocInTs.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -//// [tests/cases/compiler/expandoFunctionContextualTypesJSDocInTs.ts] //// - -//// [expandoFunctionContextualTypesJSDocInTs.ts] -export function Foo(): void { } - -// This comment should have no effect; this is a TS file. -/** @type {never} */ -Foo.bar = () => { }; - - -/// [Declarations] //// - - - -//// [expandoFunctionContextualTypesJSDocInTs.d.ts] -export declare function Foo(): void; - -/// [Errors] //// - -expandoFunctionContextualTypesJSDocInTs.ts(1,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - - -==== expandoFunctionContextualTypesJSDocInTs.ts (1 errors) ==== - export function Foo(): void { } - ~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - - // This comment should have no effect; this is a TS file. - /** @type {never} */ - Foo.bar = () => { }; - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesNoValue.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesNoValue.d.ts deleted file mode 100644 index eb3b39eae8959..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionContextualTypesNoValue.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -//// [tests/cases/compiler/expandoFunctionContextualTypesNoValue.ts] //// - -//// [expandoFunctionContextualTypesNoValue.ts] -// GH #38532 -import Foo from "blah"; - -export function Foo(): void { } - -Foo.bar = () => { }; - - -/// [Declarations] //// - - - -//// [expandoFunctionContextualTypesNoValue.d.ts] -export declare function Foo(): void; - -/// [Errors] //// - -expandoFunctionContextualTypesNoValue.ts(2,17): error TS2307: Cannot find module 'blah' or its corresponding type declarations. -expandoFunctionContextualTypesNoValue.ts(4,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - - -==== expandoFunctionContextualTypesNoValue.ts (2 errors) ==== - // GH #38532 - import Foo from "blah"; - ~~~~~~ -!!! error TS2307: Cannot find module 'blah' or its corresponding type declarations. - - export function Foo(): void { } - ~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - - Foo.bar = () => { }; - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignDottedName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignDottedName.d.ts deleted file mode 100644 index 4eb5e26afb7f7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignDottedName.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -//// [tests/cases/conformance/externalModules/exportAssignDottedName.ts] //// - -//// [foo2.ts] -import foo1 = require('./foo1'); -export = foo1.x; // Ok - -//// [foo1.ts] -export function x(): boolean{ - return true; -} - - -/// [Declarations] //// - - - -//// [foo1.d.ts] -export declare function x(): boolean; - -//// [foo2.d.ts] -declare const _default: invalid; -export = _default; - -/// [Errors] //// - -foo2.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== foo2.ts (1 errors) ==== - import foo1 = require('./foo1'); - export = foo1.x; // Ok - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - -==== foo1.ts (0 errors) ==== - export function x(): boolean{ - return true; - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignNonIdentifier.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignNonIdentifier.d.ts deleted file mode 100644 index 18f61de716963..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignNonIdentifier.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -//// [tests/cases/conformance/externalModules/exportAssignNonIdentifier.ts] //// - -//// [foo1.ts] -var x = 10; -export = typeof x; // Ok - -//// [foo2.ts] -export = "sausages"; // Ok - -//// [foo3.ts] -export = class Foo3 {}; // Error, not an expression - -//// [foo4.ts] -export = true; // Ok - -//// [foo5.ts] -export = undefined; // Valid. undefined is an identifier in JavaScript/TypeScript - -//// [foo6.ts] -export = void; // Error, void operator requires an argument - -//// [foo7.ts] -export = Date || String; // Ok - -//// [foo8.ts] -export = null; // Ok - - - -/// [Declarations] //// - - - -//// [foo1.d.ts] -declare const _default: invalid; -export = _default; - -//// [foo2.d.ts] -declare const _default: "sausages"; -export = _default; - -//// [foo3.d.ts] -declare const _default: { - new (): {}; -}; -export = _default; - -//// [foo4.d.ts] -declare const _default: true; -export = _default; - -//// [foo5.d.ts] -export = undefined; - -//// [foo6.d.ts] -declare const _default: invalid; -export = _default; - -//// [foo7.d.ts] -declare const _default: invalid; -export = _default; - -//// [foo8.d.ts] -declare const _default: any; -export = _default; - -/// [Errors] //// - -foo1.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -foo6.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -foo6.ts(1,14): error TS1109: Expression expected. -foo7.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== foo1.ts (1 errors) ==== - var x = 10; - export = typeof x; // Ok - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - -==== foo2.ts (0 errors) ==== - export = "sausages"; // Ok - -==== foo3.ts (0 errors) ==== - export = class Foo3 {}; // Error, not an expression - -==== foo4.ts (0 errors) ==== - export = true; // Ok - -==== foo5.ts (0 errors) ==== - export = undefined; // Valid. undefined is an identifier in JavaScript/TypeScript - -==== foo6.ts (2 errors) ==== - export = void; // Error, void operator requires an argument - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1109: Expression expected. - -==== foo7.ts (1 errors) ==== - export = Date || String; // Ok - ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - -==== foo8.ts (0 errors) ==== - export = null; // Ok - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentWithoutIdentifier1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentWithoutIdentifier1.d.ts deleted file mode 100644 index 11d5a2dbd71c7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentWithoutIdentifier1.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -//// [tests/cases/compiler/exportAssignmentWithoutIdentifier1.ts] //// - -//// [exportAssignmentWithoutIdentifier1.ts] -function Greeter() { - //... -} -Greeter.prototype.greet = function () { - //... -} -export = new Greeter(); - - -/// [Declarations] //// - - - -//// [exportAssignmentWithoutIdentifier1.d.ts] -declare const _default: invalid; -export = _default; - -/// [Errors] //// - -exportAssignmentWithoutIdentifier1.ts(7,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== exportAssignmentWithoutIdentifier1.ts (1 errors) ==== - function Greeter() { - //... - } - Greeter.prototype.greet = function () { - //... - } - export = new Greeter(); - ~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty.d.ts deleted file mode 100644 index 40a195c7ad11b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -//// [tests/cases/compiler/exportEqualsProperty.ts] //// - -//// [index.ts] -/// -import { X } from "foobar"; -import X2 = require("foobarx"); -const x: X = X; -const x2: X2 = X2; - -import B = require("./a"); -const b: B = new B(B.b); - -import fooLength = require("./b"); -fooLength + 1; - -//// [declarations.d.ts] -// This test is just like exportDefaultProperty, but with `export =`. - -declare namespace foo.bar { - export type X = number; - export const X: number; -} - -declare module "foobar" { - export = foo.bar; -} - -declare module "foobarx" { - export = foo.bar.X; -} - -//// [a.ts] -namespace A { - export class B { constructor(b: number) {} } - export namespace B { export const b: number = 0; } -} -export = A.B; - -//// [b.ts] -export = "foo".length; - - -/// [Declarations] //// - - - -//// [a.d.ts] -declare const _default: invalid; -export = _default; - -//// [b.d.ts] -declare const _default: invalid; -export = _default; - -//// [index.d.ts] -export {}; - -/// [Errors] //// - -a.ts(5,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -b.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -index.ts(1,22): error TS9010: Reference directives are not supported in isolated declaration mode. - - -==== index.ts (1 errors) ==== - /// - ~~~~~~~~~~~~~~~~~ -!!! error TS9010: Reference directives are not supported in isolated declaration mode. - import { X } from "foobar"; - import X2 = require("foobarx"); - const x: X = X; - const x2: X2 = X2; - - import B = require("./a"); - const b: B = new B(B.b); - - import fooLength = require("./b"); - fooLength + 1; - -==== declarations.d.ts (0 errors) ==== - // This test is just like exportDefaultProperty, but with `export =`. - - declare namespace foo.bar { - export type X = number; - export const X: number; - } - - declare module "foobar" { - export = foo.bar; - } - - declare module "foobarx" { - export = foo.bar.X; - } - -==== a.ts (1 errors) ==== - namespace A { - export class B { constructor(b: number) {} } - export namespace B { export const b: number = 0; } - } - export = A.B; - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - -==== b.ts (1 errors) ==== - export = "foo".length; - ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty2.d.ts deleted file mode 100644 index e5b7f9ce11385..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportEqualsProperty2.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -//// [tests/cases/compiler/exportEqualsProperty2.ts] //// - -//// [b.ts] -import B = require("./a"); -const x: B = { c: B }; - -//// [a.ts] -// This test is just like exportDefaultProperty2, but with `export =`. - -class C { - static B: number; -} -namespace C { - export interface B { c: number } -} - -export = C.B; - - -/// [Declarations] //// - - - -//// [a.d.ts] -declare const _default: invalid; -export = _default; - -//// [b.d.ts] -export {}; - -/// [Errors] //// - -a.ts(10,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== b.ts (0 errors) ==== - import B = require("./a"); - const x: B = { c: B }; - -==== a.ts (1 errors) ==== - // This test is just like exportDefaultProperty2, but with `export =`. - - class C { - static B: number; - } - namespace C { - export interface B { c: number } - } - - export = C.B; - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/forwardRefInEnum.d.ts deleted file mode 100644 index 20f19dc601929..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/forwardRefInEnum.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -//// [tests/cases/compiler/forwardRefInEnum.ts] //// - -//// [forwardRefInEnum.ts] -enum E1 { - // illegal case - // forward reference to the element of the same enum - X = Y, - X1 = E1["Y"], - // forward reference to the element of the same enum - Y = E1.Z, - Y1 = E1["Z"] -} - -enum E1 { - Z = 4 -} - - -/// [Declarations] //// - - - -//// [forwardRefInEnum.d.ts] -declare enum E1 { - X, - X1, - Y, - Y1 -} -declare enum E1 { - Z = 4 -} - -/// [Errors] //// - -forwardRefInEnum.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -forwardRefInEnum.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -forwardRefInEnum.ts(5,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -forwardRefInEnum.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -forwardRefInEnum.ts(7,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -forwardRefInEnum.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -forwardRefInEnum.ts(8,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - - -==== forwardRefInEnum.ts (8 errors) ==== - enum E1 { - // illegal case - // forward reference to the element of the same enum - X = Y, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - X1 = E1["Y"], - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - // forward reference to the element of the same enum - Y = E1.Z, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - Y1 = E1["Z"] - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - } - - enum E1 { - Z = 4 - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/functionImplementations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/functionImplementations.d.ts deleted file mode 100644 index 75ea04bd1465d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/functionImplementations.d.ts +++ /dev/null @@ -1,437 +0,0 @@ -//// [tests/cases/conformance/functions/functionImplementations.ts] //// - -//// [functionImplementations.ts] -// FunctionExpression with no return type annotation and no return statement returns void -var v: void = function () { } (); - -// FunctionExpression f with no return type annotation and directly references f in its body returns any -var a: any = function f() { - return f; -}; -var a: any = function f() { - return f(); -}; - -// FunctionExpression f with no return type annotation and indirectly references f in its body returns any -var a: any = function f() { - var x = f; - return x; -}; - -// Two mutually recursive function implementations with no return type annotations -function rec1(): any { - return rec2(); -} -function rec2(): any { - return rec1(); -} -var a: any = rec1(); -var a: any = rec2(); - -// Two mutually recursive function implementations with return type annotation in one -function rec3(): number { - return rec4(); -} -function rec4(): number { - return rec3(); -} -var n: number; -var n: number = rec3(); -var n: number = rec4(); - -// FunctionExpression with no return type annotation and returns a number -var n = function (): number { - return 3; -} (); - -// FunctionExpression with no return type annotation and returns null -var nu = null; -var nu = function (): any { - return null; -} (); - -// FunctionExpression with no return type annotation and returns undefined -var un = undefined; -var un = function (): any { - return undefined; -} (); - -// FunctionExpression with no return type annotation and returns a type parameter type -var n = function (x: T): T { - return x; -} (4); - -// FunctionExpression with no return type annotation and returns a constrained type parameter type -var n = function (x: T): T { - return x; -} (4); - -// FunctionExpression with no return type annotation with multiple return statements with identical types -var n = function (): 3 | 5 { - return 3; - return 5; -}(); - -// Otherwise, the inferred return type is the first of the types of the return statement expressions -// in the function body that is a supertype of each of the others, -// ignoring return statements with no expressions. -// A compile - time error occurs if no return statement expression has a type that is a supertype of each of the others. -// FunctionExpression with no return type annotation with multiple return statements with subtype relation between returns -class Base { private m; } -class Derived extends Base { private q; } -var b: Base; -var b = function (): Base { - return new Base(); return new Derived(); -} (); - -// FunctionExpression with no return type annotation with multiple return statements with one a recursive call -var a = function f(): Base { - return new Base(); return new Derived(); return f(); // ? -} (); - -// FunctionExpression with non -void return type annotation with a single throw statement -undefined === function (): number { - throw undefined; -}; - -// Type of 'this' in function implementation is 'any' -function thisFunc(): void { - var x = this; - var x: any; -} - -// Function signature with optional parameter, no type annotation and initializer has initializer's type -function opt1(n: number = 4): void { - var m = n; - var m: number; -} - -// Function signature with optional parameter, no type annotation and initializer has initializer's widened type -function opt2(n: { - x: any; - y: any; -} = { x: null, y: undefined }): void { - var m = n; - var m: { x: any; y: any }; -} - -// Function signature with initializer referencing other parameter to the left -function opt3(n: number, m: number = n): void { - var y = m; - var y: number; -} - -// Function signature with optional parameter has correct codegen -// (tested above) - -// FunctionExpression with non -void return type annotation return with no expression -function f6(): number { - return; -} - -class Derived2 extends Base { private r: string; } -class AnotherClass { private x } -// if f is a contextually typed function expression, the inferred return type is the union type -// of the types of the return statement expressions in the function body, -// ignoring return statements with no expressions. -var f7: (x: number) => string | number = x => { // should be (x: number) => number | string - if (x < 0) { return x; } - return x.toString(); -} -var f8: (x: number) => any = x => { // should be (x: number) => Base - return new Base(); - return new Derived2(); -} -var f9: (x: number) => any = x => { // should be (x: number) => Base - return new Base(); - return new Derived(); - return new Derived2(); -} -var f10: (x: number) => any = x => { // should be (x: number) => Derived | Derived1 - return new Derived(); - return new Derived2(); -} -var f11: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass - return new Base(); - return new AnotherClass(); -} -var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass - return new Base(); - return; // should be ignored - return new AnotherClass(); -} - -/// [Declarations] //// - - - -//// [functionImplementations.d.ts] -declare var v: void; -declare var a: any; -declare var a: any; -declare var a: any; -declare function rec1(): any; -declare function rec2(): any; -declare var a: any; -declare var a: any; -declare function rec3(): number; -declare function rec4(): number; -declare var n: number; -declare var n: number; -declare var n: number; -declare var n: invalid; -declare var nu: any; -declare var nu: invalid; -declare var un: any; -declare var un: invalid; -declare var n: invalid; -declare var n: invalid; -declare var n: invalid; -declare class Base { - private m; -} -declare class Derived extends Base { - private q; -} -declare var b: Base; -declare var b: invalid; -declare var a: invalid; -declare function thisFunc(): void; -declare function opt1(n?: number): void; -declare function opt2(n?: { - x: any; - y: any; -}): void; -declare function opt3(n: number, m?: number): void; -declare function f6(): number; -declare class Derived2 extends Base { - private r; -} -declare class AnotherClass { - private x; -} -declare var f7: (x: number) => string | number; -declare var f8: (x: number) => any; -declare var f9: (x: number) => any; -declare var f10: (x: number) => any; -declare var f11: (x: number) => any; -declare var f12: (x: number) => any; - -/// [Errors] //// - -functionImplementations.ts(40,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -functionImplementations.ts(46,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -functionImplementations.ts(52,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -functionImplementations.ts(57,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -functionImplementations.ts(62,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -functionImplementations.ts(67,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type '3 | 5'. -functionImplementations.ts(67,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -functionImplementations.ts(80,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -functionImplementations.ts(85,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'Base'. -functionImplementations.ts(85,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -functionImplementations.ts(90,1): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value. - - -==== functionImplementations.ts (11 errors) ==== - // FunctionExpression with no return type annotation and no return statement returns void - var v: void = function () { } (); - - // FunctionExpression f with no return type annotation and directly references f in its body returns any - var a: any = function f() { - return f; - }; - var a: any = function f() { - return f(); - }; - - // FunctionExpression f with no return type annotation and indirectly references f in its body returns any - var a: any = function f() { - var x = f; - return x; - }; - - // Two mutually recursive function implementations with no return type annotations - function rec1(): any { - return rec2(); - } - function rec2(): any { - return rec1(); - } - var a: any = rec1(); - var a: any = rec2(); - - // Two mutually recursive function implementations with return type annotation in one - function rec3(): number { - return rec4(); - } - function rec4(): number { - return rec3(); - } - var n: number; - var n: number = rec3(); - var n: number = rec4(); - - // FunctionExpression with no return type annotation and returns a number - var n = function (): number { - ~~~~~~~~~~~~~~~~~~~~~ - return 3; - ~~~~~~~~~~~~~ - } (); - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - // FunctionExpression with no return type annotation and returns null - var nu = null; - var nu = function (): any { - ~~~~~~~~~~~~~~~~~~ - return null; - ~~~~~~~~~~~~~~~~ - } (); - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - // FunctionExpression with no return type annotation and returns undefined - var un = undefined; - var un = function (): any { - ~~~~~~~~~~~~~~~~~~ - return undefined; - ~~~~~~~~~~~~~~~~~~~~~ - } (); - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - // FunctionExpression with no return type annotation and returns a type parameter type - var n = function (x: T): T { - ~~~~~~~~~~~~~~~~~~~~~~~ - return x; - ~~~~~~~~~~~~~ - } (4); - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - // FunctionExpression with no return type annotation and returns a constrained type parameter type - var n = function (x: T): T { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - return x; - ~~~~~~~~~~~~~ - } (4); - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - // FunctionExpression with no return type annotation with multiple return statements with identical types - var n = function (): 3 | 5 { - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type '3 | 5'. -!!! related TS6203 functionImplementations.ts:35:5: 'n' was also declared here. - ~~~~~~~~~~~~~~~~~~~~ - return 3; - ~~~~~~~~~~~~~ - return 5; - ~~~~~~~~~~~~~ - }(); - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - // Otherwise, the inferred return type is the first of the types of the return statement expressions - // in the function body that is a supertype of each of the others, - // ignoring return statements with no expressions. - // A compile - time error occurs if no return statement expression has a type that is a supertype of each of the others. - // FunctionExpression with no return type annotation with multiple return statements with subtype relation between returns - class Base { private m; } - class Derived extends Base { private q; } - var b: Base; - var b = function (): Base { - ~~~~~~~~~~~~~~~~~~~ - return new Base(); return new Derived(); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - } (); - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - // FunctionExpression with no return type annotation with multiple return statements with one a recursive call - var a = function f(): Base { - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'Base'. -!!! related TS6203 functionImplementations.ts:5:5: 'a' was also declared here. - ~~~~~~~~~~~~~~~~~~~~ - return new Base(); return new Derived(); return f(); // ? - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - } (); - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - // FunctionExpression with non -void return type annotation with a single throw statement - undefined === function (): number { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - throw undefined; - ~~~~~~~~~~~~~~~~~~~~ - }; - ~ -!!! error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value. - - // Type of 'this' in function implementation is 'any' - function thisFunc(): void { - var x = this; - var x: any; - } - - // Function signature with optional parameter, no type annotation and initializer has initializer's type - function opt1(n: number = 4): void { - var m = n; - var m: number; - } - - // Function signature with optional parameter, no type annotation and initializer has initializer's widened type - function opt2(n: { - x: any; - y: any; - } = { x: null, y: undefined }): void { - var m = n; - var m: { x: any; y: any }; - } - - // Function signature with initializer referencing other parameter to the left - function opt3(n: number, m: number = n): void { - var y = m; - var y: number; - } - - // Function signature with optional parameter has correct codegen - // (tested above) - - // FunctionExpression with non -void return type annotation return with no expression - function f6(): number { - return; - } - - class Derived2 extends Base { private r: string; } - class AnotherClass { private x } - // if f is a contextually typed function expression, the inferred return type is the union type - // of the types of the return statement expressions in the function body, - // ignoring return statements with no expressions. - var f7: (x: number) => string | number = x => { // should be (x: number) => number | string - if (x < 0) { return x; } - return x.toString(); - } - var f8: (x: number) => any = x => { // should be (x: number) => Base - return new Base(); - return new Derived2(); - } - var f9: (x: number) => any = x => { // should be (x: number) => Base - return new Base(); - return new Derived(); - return new Derived2(); - } - var f10: (x: number) => any = x => { // should be (x: number) => Derived | Derived1 - return new Derived(); - return new Derived2(); - } - var f11: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass - return new Base(); - return new AnotherClass(); - } - var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass - return new Base(); - return; // should be ignored - return new AnotherClass(); - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/initializersInAmbientEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/initializersInAmbientEnums.d.ts deleted file mode 100644 index 47ff347c254e4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/initializersInAmbientEnums.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -//// [tests/cases/compiler/initializersInAmbientEnums.ts] //// - -//// [initializersInAmbientEnums.ts] -declare enum E { - a = 10, - b = a, - e = 10 << 2 * 8, -} - -/// [Declarations] //// - - - -//// [initializersInAmbientEnums.d.ts] -declare enum E { - a = 10, - b = 10, - e = 655360 -} - -/// [Errors] //// - -initializersInAmbientEnums.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -initializersInAmbientEnums.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== initializersInAmbientEnums.ts (2 errors) ==== - declare enum E { - a = 10, - b = a, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - e = 10 << 2 * 8, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts deleted file mode 100644 index c9c1d5697566c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts +++ /dev/null @@ -1,137 +0,0 @@ -//// [tests/cases/compiler/isolatedModulesGlobalNamespacesAndEnums.ts] //// - -//// [script-namespaces.ts] -namespace Instantiated { - export const x = 1; -} -namespace Uninstantiated { - export type T = number; -} -declare namespace Ambient { - export const x: number; -} - -//// [module-namespaces.ts] -export namespace Instantiated { - export const x = 1; -} - -//// [enum1.ts] -enum Enum { A, B, C } -declare enum Enum { X = 1_000_000 } -const d = 'd'; - -//// [enum2.ts] -enum Enum { - D = d, - E = A, // error - Y = X, // error - Z = Enum.A -} - -declare enum Enum { - F = A -} - -/// [Declarations] //// - - - -//// [enum1.d.ts] -declare enum Enum { - A = 0, - B = 1, - C = 2 -} -declare enum Enum { - X = 1000000 -} -declare const d = "d"; - -//// [enum2.d.ts] -declare enum Enum { - D, - E,// error - Y,// error - Z -} -declare enum Enum { - F -} - -//// [module-namespaces.d.ts] -export declare namespace Instantiated { - const x = 1; -} - -//// [script-namespaces.d.ts] -declare namespace Instantiated { - const x = 1; -} -declare namespace Uninstantiated { - type T = number; -} -declare namespace Ambient { - const x: number; -} - -/// [Errors] //// - -enum2.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enum2.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enum2.ts(3,9): error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. -enum2.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enum2.ts(4,9): error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. -enum2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enum2.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -script-namespaces.ts(1,11): error TS1280: Namespaces are not allowed in global script files when 'isolatedModules' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement. - - -==== script-namespaces.ts (1 errors) ==== - namespace Instantiated { - ~~~~~~~~~~~~ -!!! error TS1280: Namespaces are not allowed in global script files when 'isolatedModules' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement. - export const x = 1; - } - namespace Uninstantiated { - export type T = number; - } - declare namespace Ambient { - export const x: number; - } - -==== module-namespaces.ts (0 errors) ==== - export namespace Instantiated { - export const x = 1; - } - -==== enum1.ts (0 errors) ==== - enum Enum { A, B, C } - declare enum Enum { X = 1_000_000 } - const d = 'd'; - -==== enum2.ts (7 errors) ==== - enum Enum { - D = d, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - E = A, // error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. - Y = X, // error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. - Z = Enum.A - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - declare enum Enum { - F = A - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsContainerMergeTsDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsContainerMergeTsDeclaration.d.ts deleted file mode 100644 index 327e8570e9e6b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsContainerMergeTsDeclaration.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -//// [tests/cases/conformance/salsa/jsContainerMergeTsDeclaration.ts] //// - -//// [a.js] -var /*1*/x = function foo() { -} -x.a = function bar() { -} -//// [b.ts] -var x = function (): number { - return 1; -}(); - - -/// [Declarations] //// - - - -//// [b.d.ts] -declare var x: invalid; - -/// [Errors] //// - -error TS6504: File 'a.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 -b.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -!!! error TS6504: File 'a.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 -==== a.js (0 errors) ==== - var /*1*/x = function foo() { - } - x.a = function bar() { - } -==== b.ts (1 errors) ==== - var x = function (): number { - ~~~~~~~~~~~~~~~~~~~~~ - return 1; - ~~~~~~~~~~~~~ - }(); - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxComponentTypeErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxComponentTypeErrors.d.ts deleted file mode 100644 index fd34416ae3e12..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxComponentTypeErrors.d.ts +++ /dev/null @@ -1,192 +0,0 @@ -//// [tests/cases/compiler/jsxComponentTypeErrors.tsx] //// - -//// [jsxComponentTypeErrors.tsx] -namespace JSX { - export interface Element { - type: 'element'; - } - export interface ElementClass { - type: 'element-class'; - } -} - -function FunctionComponent({type}: {type?: T}): { - type: T | undefined; -} { - return { - type - } -} -FunctionComponent.useThis = function() { - return ; -} - -class ClassComponent { - type = 'string'; -} - -const MixedComponent: typeof FunctionComponent | typeof ClassComponent = Math.random() ? FunctionComponent : ClassComponent; - -const elem1: JSX.Element = ; -const elem2: JSX.Element = />; -const elem3: JSX.Element = ; -const elem4: JSX.Element = ; - -const obj = { - MemberFunctionComponent(): {} { - return {}; - }, - MemberClassComponent: class {}, -}; - -const elem5: JSX.Element = ; -const elem6: JSX.Element = ; - - -/// [Declarations] //// - - - -//// [jsxComponentTypeErrors.d.ts] -declare namespace JSX { - interface Element { - type: 'element'; - } - interface ElementClass { - type: 'element-class'; - } -} -declare function FunctionComponent({ type }: { - type?: T; -}): { - type: T | undefined; -}; -declare class ClassComponent { - type: string; -} -declare const MixedComponent: typeof FunctionComponent | typeof ClassComponent; -declare const elem1: JSX.Element; -declare const elem2: JSX.Element; -declare const elem3: JSX.Element; -declare const elem4: JSX.Element; -declare const obj: { - MemberFunctionComponent(): {}; - MemberClassComponent: { - new (): {}; - }; -}; -declare const elem5: JSX.Element; -declare const elem6: JSX.Element; - -/// [Errors] //// - -jsxComponentTypeErrors.tsx(10,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -jsxComponentTypeErrors.tsx(18,11): error TS2786: 'this' cannot be used as a JSX component. - Its return type '{ type: "foo" | undefined; }' is not a valid JSX element. - Types of property 'type' are incompatible. - Type '"foo" | undefined' is not assignable to type '"element"'. - Type 'undefined' is not assignable to type '"element"'. -jsxComponentTypeErrors.tsx(27,29): error TS2786: 'FunctionComponent' cannot be used as a JSX component. - Its return type '{ type: "abc" | undefined; }' is not a valid JSX element. - Types of property 'type' are incompatible. - Type '"abc" | undefined' is not assignable to type '"element"'. - Type 'undefined' is not assignable to type '"element"'. -jsxComponentTypeErrors.tsx(28,29): error TS2786: 'FunctionComponent' cannot be used as a JSX component. - Its return type '{ type: "abc" | undefined; }' is not a valid JSX element. -jsxComponentTypeErrors.tsx(29,29): error TS2786: 'ClassComponent' cannot be used as a JSX component. - Its instance type 'ClassComponent' is not a valid JSX element. - Types of property 'type' are incompatible. - Type 'string' is not assignable to type '"element-class"'. -jsxComponentTypeErrors.tsx(30,29): error TS2786: 'MixedComponent' cannot be used as a JSX component. - Its element type 'ClassComponent | { type: string | undefined; }' is not a valid JSX element. - Type 'ClassComponent' is not assignable to type 'Element | ElementClass | null'. - Type 'ClassComponent' is not assignable to type 'Element | ElementClass'. - Type 'ClassComponent' is not assignable to type 'ElementClass'. -jsxComponentTypeErrors.tsx(39,29): error TS2786: 'obj.MemberFunctionComponent' cannot be used as a JSX component. - Its return type '{}' is not a valid JSX element. - Property 'type' is missing in type '{}' but required in type 'Element'. -jsxComponentTypeErrors.tsx(40,29): error TS2786: 'obj. MemberClassComponent' cannot be used as a JSX component. - Its instance type 'MemberClassComponent' is not a valid JSX element. - Property 'type' is missing in type 'MemberClassComponent' but required in type 'ElementClass'. - - -==== jsxComponentTypeErrors.tsx (8 errors) ==== - namespace JSX { - export interface Element { - type: 'element'; - } - export interface ElementClass { - type: 'element-class'; - } - } - - function FunctionComponent({type}: {type?: T}): { - ~~~~~~~~~~~~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - type: T | undefined; - } { - return { - type - } - } - FunctionComponent.useThis = function() { - return ; - ~~~~ -!!! error TS2786: 'this' cannot be used as a JSX component. -!!! error TS2786: Its return type '{ type: "foo" | undefined; }' is not a valid JSX element. -!!! error TS2786: Types of property 'type' are incompatible. -!!! error TS2786: Type '"foo" | undefined' is not assignable to type '"element"'. -!!! error TS2786: Type 'undefined' is not assignable to type '"element"'. - } - - class ClassComponent { - type = 'string'; - } - - const MixedComponent: typeof FunctionComponent | typeof ClassComponent = Math.random() ? FunctionComponent : ClassComponent; - - const elem1: JSX.Element = ; - ~~~~~~~~~~~~~~~~~ -!!! error TS2786: 'FunctionComponent' cannot be used as a JSX component. -!!! error TS2786: Its return type '{ type: "abc" | undefined; }' is not a valid JSX element. -!!! error TS2786: Types of property 'type' are incompatible. -!!! error TS2786: Type '"abc" | undefined' is not assignable to type '"element"'. -!!! error TS2786: Type 'undefined' is not assignable to type '"element"'. - const elem2: JSX.Element = />; - ~~~~~~~~~~~~~~~~~ -!!! error TS2786: 'FunctionComponent' cannot be used as a JSX component. -!!! error TS2786: Its return type '{ type: "abc" | undefined; }' is not a valid JSX element. - const elem3: JSX.Element = ; - ~~~~~~~~~~~~~~ -!!! error TS2786: 'ClassComponent' cannot be used as a JSX component. -!!! error TS2786: Its instance type 'ClassComponent' is not a valid JSX element. -!!! error TS2786: Types of property 'type' are incompatible. -!!! error TS2786: Type 'string' is not assignable to type '"element-class"'. - const elem4: JSX.Element = ; - ~~~~~~~~~~~~~~ -!!! error TS2786: 'MixedComponent' cannot be used as a JSX component. -!!! error TS2786: Its element type 'ClassComponent | { type: string | undefined; }' is not a valid JSX element. -!!! error TS2786: Type 'ClassComponent' is not assignable to type 'Element | ElementClass | null'. -!!! error TS2786: Type 'ClassComponent' is not assignable to type 'Element | ElementClass'. -!!! error TS2786: Type 'ClassComponent' is not assignable to type 'ElementClass'. - - const obj = { - MemberFunctionComponent(): {} { - return {}; - }, - MemberClassComponent: class {}, - }; - - const elem5: JSX.Element = ; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2786: 'obj.MemberFunctionComponent' cannot be used as a JSX component. -!!! error TS2786: Its return type '{}' is not a valid JSX element. -!!! error TS2786: Property 'type' is missing in type '{}' but required in type 'Element'. -!!! related TS2728 jsxComponentTypeErrors.tsx:3:5: 'type' is declared here. - const elem6: JSX.Element = ; - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2786: 'obj. MemberClassComponent' cannot be used as a JSX component. -!!! error TS2786: Its instance type 'MemberClassComponent' is not a valid JSX element. -!!! error TS2786: Property 'type' is missing in type 'MemberClassComponent' but required in type 'ElementClass'. -!!! related TS2728 jsxComponentTypeErrors.tsx:6:5: 'type' is declared here. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespace.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespace.d.ts deleted file mode 100644 index 2df2bbf44fe60..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespace.d.ts +++ /dev/null @@ -1,217 +0,0 @@ -//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespace.tsx] //// - -//// [/node_modules/preact/index.d.ts] -type Defaultize = - // Distribute over unions - Props extends any // Make any properties included in Default optional - ? Partial>> & - // Include the remaining properties from Props - Pick> - : never; -export namespace JSXInternal { - interface HTMLAttributes { } - interface SVGAttributes { } - type LibraryManagedAttributes = Component extends { - defaultProps: infer Defaults; - } - ? Defaultize - : Props; - - interface IntrinsicAttributes { - key?: any; - } - - interface Element extends VNode { } - - interface ElementClass extends Component { } - - interface ElementAttributesProperty { - props: any; - } - - interface ElementChildrenAttribute { - children: any; - } - - interface IntrinsicElements { - div: HTMLAttributes; - } -} -export const Fragment: unique symbol; -export type ComponentType = {}; -export type ComponentChild = {}; -export type ComponentChildren = {}; -export type VNode = {}; -export type Attributes = {}; -export type Component = {}; -//// [/node_modules/preact/jsx-runtime/index.d.ts] -export { Fragment } from '..'; -import { - ComponentType, - ComponentChild, - ComponentChildren, - VNode, - Attributes -} from '..'; -import { JSXInternal } from '..'; - -export function jsx( - type: string, - props: JSXInternal.HTMLAttributes & - JSXInternal.SVGAttributes & - Record & { children?: ComponentChild }, - key?: string -): VNode; -export function jsx

( - type: ComponentType

, - props: Attributes & P & { children?: ComponentChild }, - key?: string -): VNode; - - -export function jsxs( - type: string, - props: JSXInternal.HTMLAttributes & - JSXInternal.SVGAttributes & - Record & { children?: ComponentChild[] }, - key?: string -): VNode; -export function jsxs

( - type: ComponentType

, - props: Attributes & P & { children?: ComponentChild[] }, - key?: string -): VNode; - - -export function jsxDEV( - type: string, - props: JSXInternal.HTMLAttributes & - JSXInternal.SVGAttributes & - Record & { children?: ComponentChildren }, - key?: string -): VNode; -export function jsxDEV

( - type: ComponentType

, - props: Attributes & P & { children?: ComponentChildren }, - key?: string -): VNode; - -export import JSX = JSXInternal; - -//// [/index.tsx] -export const Comp = () =>

; - -/// [Declarations] //// - - - -//// [/index.d.ts] -export declare const Comp: invalid; - -/// [Errors] //// - -/index.tsx(1,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== /node_modules/preact/index.d.ts (0 errors) ==== - type Defaultize = - // Distribute over unions - Props extends any // Make any properties included in Default optional - ? Partial>> & - // Include the remaining properties from Props - Pick> - : never; - export namespace JSXInternal { - interface HTMLAttributes { } - interface SVGAttributes { } - type LibraryManagedAttributes = Component extends { - defaultProps: infer Defaults; - } - ? Defaultize - : Props; - - interface IntrinsicAttributes { - key?: any; - } - - interface Element extends VNode { } - - interface ElementClass extends Component { } - - interface ElementAttributesProperty { - props: any; - } - - interface ElementChildrenAttribute { - children: any; - } - - interface IntrinsicElements { - div: HTMLAttributes; - } - } - export const Fragment: unique symbol; - export type ComponentType = {}; - export type ComponentChild = {}; - export type ComponentChildren = {}; - export type VNode = {}; - export type Attributes = {}; - export type Component = {}; -==== /node_modules/preact/jsx-runtime/index.d.ts (0 errors) ==== - export { Fragment } from '..'; - import { - ComponentType, - ComponentChild, - ComponentChildren, - VNode, - Attributes - } from '..'; - import { JSXInternal } from '..'; - - export function jsx( - type: string, - props: JSXInternal.HTMLAttributes & - JSXInternal.SVGAttributes & - Record & { children?: ComponentChild }, - key?: string - ): VNode; - export function jsx

( - type: ComponentType

, - props: Attributes & P & { children?: ComponentChild }, - key?: string - ): VNode; - - - export function jsxs( - type: string, - props: JSXInternal.HTMLAttributes & - JSXInternal.SVGAttributes & - Record & { children?: ComponentChild[] }, - key?: string - ): VNode; - export function jsxs

( - type: ComponentType

, - props: Attributes & P & { children?: ComponentChild[] }, - key?: string - ): VNode; - - - export function jsxDEV( - type: string, - props: JSXInternal.HTMLAttributes & - JSXInternal.SVGAttributes & - Record & { children?: ComponentChildren }, - key?: string - ): VNode; - export function jsxDEV

( - type: ComponentType

, - props: Attributes & P & { children?: ComponentChildren }, - key?: string - ): VNode; - - export import JSX = JSXInternal; - -==== /index.tsx (1 errors) ==== - export const Comp = () =>

; - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts deleted file mode 100644 index 9c7a5ca24c905..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts +++ /dev/null @@ -1,143 +0,0 @@ -//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne.tsx] //// - -//// [/node_modules/react/index.d.ts] -export = React; -export as namespace React; - -declare namespace React {} - -declare global { - namespace JSX { - interface Element {} - interface ElementClass {} - interface ElementAttributesProperty {} - interface ElementChildrenAttribute {} - type LibraryManagedAttributes = {} - interface IntrinsicAttributes {} - interface IntrinsicClassAttributes {} - interface IntrinsicElements { - div: {} - } - } -} -//// [/node_modules/@emotion/react/jsx-runtime/index.d.ts] -export { EmotionJSX as JSX } from './jsx-namespace' - -//// [/node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts] -import 'react' - -type WithConditionalCSSProp

= 'className' extends keyof P - ? (P extends { className?: string } ? P & { css?: string } : P) - : P - -type ReactJSXElement = JSX.Element -type ReactJSXElementClass = JSX.ElementClass -type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty -type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute -type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes -type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes -type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes -type ReactJSXIntrinsicElements = JSX.IntrinsicElements - -export namespace EmotionJSX { - interface Element extends ReactJSXElement {} - interface ElementClass extends ReactJSXElementClass {} - interface ElementAttributesProperty - extends ReactJSXElementAttributesProperty {} - interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute {} - - type LibraryManagedAttributes = WithConditionalCSSProp

& - ReactJSXLibraryManagedAttributes - - interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes {} - interface IntrinsicClassAttributes - extends ReactJSXIntrinsicClassAttributes {} - - type IntrinsicElements = { - [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { - css?: string - } - } -} - -//// [/index.tsx] -export const Comp = () =>

; - - -/// [Declarations] //// - - - -//// [/index.d.ts] -export declare const Comp: invalid; - -/// [Errors] //// - -/index.tsx(1,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== /node_modules/react/index.d.ts (0 errors) ==== - export = React; - export as namespace React; - - declare namespace React {} - - declare global { - namespace JSX { - interface Element {} - interface ElementClass {} - interface ElementAttributesProperty {} - interface ElementChildrenAttribute {} - type LibraryManagedAttributes = {} - interface IntrinsicAttributes {} - interface IntrinsicClassAttributes {} - interface IntrinsicElements { - div: {} - } - } - } -==== /node_modules/@emotion/react/jsx-runtime/index.d.ts (0 errors) ==== - export { EmotionJSX as JSX } from './jsx-namespace' - -==== /node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts (0 errors) ==== - import 'react' - - type WithConditionalCSSProp

= 'className' extends keyof P - ? (P extends { className?: string } ? P & { css?: string } : P) - : P - - type ReactJSXElement = JSX.Element - type ReactJSXElementClass = JSX.ElementClass - type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty - type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute - type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes - type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes - type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes - type ReactJSXIntrinsicElements = JSX.IntrinsicElements - - export namespace EmotionJSX { - interface Element extends ReactJSXElement {} - interface ElementClass extends ReactJSXElementClass {} - interface ElementAttributesProperty - extends ReactJSXElementAttributesProperty {} - interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute {} - - type LibraryManagedAttributes = WithConditionalCSSProp

& - ReactJSXLibraryManagedAttributes - - interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes {} - interface IntrinsicClassAttributes - extends ReactJSXIntrinsicClassAttributes {} - - type IntrinsicElements = { - [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { - css?: string - } - } - } - -==== /index.tsx (1 errors) ==== - export const Comp = () =>

; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts deleted file mode 100644 index 9c7a5ca24c905..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts +++ /dev/null @@ -1,143 +0,0 @@ -//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne.tsx] //// - -//// [/node_modules/react/index.d.ts] -export = React; -export as namespace React; - -declare namespace React {} - -declare global { - namespace JSX { - interface Element {} - interface ElementClass {} - interface ElementAttributesProperty {} - interface ElementChildrenAttribute {} - type LibraryManagedAttributes = {} - interface IntrinsicAttributes {} - interface IntrinsicClassAttributes {} - interface IntrinsicElements { - div: {} - } - } -} -//// [/node_modules/@emotion/react/jsx-runtime/index.d.ts] -export { EmotionJSX as JSX } from './jsx-namespace' - -//// [/node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts] -import 'react' - -type WithConditionalCSSProp

= 'className' extends keyof P - ? (P extends { className?: string } ? P & { css?: string } : P) - : P - -type ReactJSXElement = JSX.Element -type ReactJSXElementClass = JSX.ElementClass -type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty -type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute -type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes -type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes -type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes -type ReactJSXIntrinsicElements = JSX.IntrinsicElements - -export namespace EmotionJSX { - interface Element extends ReactJSXElement {} - interface ElementClass extends ReactJSXElementClass {} - interface ElementAttributesProperty - extends ReactJSXElementAttributesProperty {} - interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute {} - - type LibraryManagedAttributes = WithConditionalCSSProp

& - ReactJSXLibraryManagedAttributes - - interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes {} - interface IntrinsicClassAttributes - extends ReactJSXIntrinsicClassAttributes {} - - type IntrinsicElements = { - [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { - css?: string - } - } -} - -//// [/index.tsx] -export const Comp = () =>

; - - -/// [Declarations] //// - - - -//// [/index.d.ts] -export declare const Comp: invalid; - -/// [Errors] //// - -/index.tsx(1,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== /node_modules/react/index.d.ts (0 errors) ==== - export = React; - export as namespace React; - - declare namespace React {} - - declare global { - namespace JSX { - interface Element {} - interface ElementClass {} - interface ElementAttributesProperty {} - interface ElementChildrenAttribute {} - type LibraryManagedAttributes = {} - interface IntrinsicAttributes {} - interface IntrinsicClassAttributes {} - interface IntrinsicElements { - div: {} - } - } - } -==== /node_modules/@emotion/react/jsx-runtime/index.d.ts (0 errors) ==== - export { EmotionJSX as JSX } from './jsx-namespace' - -==== /node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts (0 errors) ==== - import 'react' - - type WithConditionalCSSProp

= 'className' extends keyof P - ? (P extends { className?: string } ? P & { css?: string } : P) - : P - - type ReactJSXElement = JSX.Element - type ReactJSXElementClass = JSX.ElementClass - type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty - type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute - type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes - type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes - type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes - type ReactJSXIntrinsicElements = JSX.IntrinsicElements - - export namespace EmotionJSX { - interface Element extends ReactJSXElement {} - interface ElementClass extends ReactJSXElementClass {} - interface ElementAttributesProperty - extends ReactJSXElementAttributesProperty {} - interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute {} - - type LibraryManagedAttributes = WithConditionalCSSProp

& - ReactJSXLibraryManagedAttributes - - interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes {} - interface IntrinsicClassAttributes - extends ReactJSXIntrinsicClassAttributes {} - - type IntrinsicElements = { - [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { - css?: string - } - } - } - -==== /index.tsx (1 errors) ==== - export const Comp = () =>

; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts deleted file mode 100644 index 4d3f4e6c301a0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts +++ /dev/null @@ -1,145 +0,0 @@ -//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.tsx] //// - -//// [/node_modules/react/index.d.ts] -export = React; -export as namespace React; - -declare namespace React { } - -declare global { - namespace JSX { - interface Element { } - interface ElementClass { } - interface ElementAttributesProperty { } - interface ElementChildrenAttribute { } - type LibraryManagedAttributes = {} - interface IntrinsicAttributes { } - interface IntrinsicClassAttributes { } - interface IntrinsicElements { - div: {} - } - } -} -//// [/node_modules/@emotion/react/jsx-runtime/index.d.ts] -export { EmotionJSX as JSX } from './jsx-namespace' - -//// [/node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts] -import 'react' - -type WithConditionalCSSProp

= 'className' extends keyof P - ? (P extends { className?: string } ? P & { css?: string } : P) - : P - -type ReactJSXElement = JSX.Element -type ReactJSXElementClass = JSX.ElementClass -type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty -type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute -type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes -type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes -type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes -type ReactJSXIntrinsicElements = JSX.IntrinsicElements - -export namespace EmotionJSX { - interface Element extends ReactJSXElement { } - interface ElementClass extends ReactJSXElementClass { } - interface ElementAttributesProperty - extends ReactJSXElementAttributesProperty { } - interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute { } - - type LibraryManagedAttributes = WithConditionalCSSProp

& - ReactJSXLibraryManagedAttributes - - interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes { } - interface IntrinsicClassAttributes - extends ReactJSXIntrinsicClassAttributes { } - - type IntrinsicElements = { - [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { - css?: string - } - } -} - -//// [/index.tsx] -/* @jsxImportSource @emotion/react */ -export const Comp = () =>

; - - -/// [Declarations] //// - - - -//// [/index.d.ts] -export declare const Comp: invalid; - -/// [Errors] //// - -/index.tsx(2,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== /node_modules/react/index.d.ts (0 errors) ==== - export = React; - export as namespace React; - - declare namespace React { } - - declare global { - namespace JSX { - interface Element { } - interface ElementClass { } - interface ElementAttributesProperty { } - interface ElementChildrenAttribute { } - type LibraryManagedAttributes = {} - interface IntrinsicAttributes { } - interface IntrinsicClassAttributes { } - interface IntrinsicElements { - div: {} - } - } - } -==== /node_modules/@emotion/react/jsx-runtime/index.d.ts (0 errors) ==== - export { EmotionJSX as JSX } from './jsx-namespace' - -==== /node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts (0 errors) ==== - import 'react' - - type WithConditionalCSSProp

= 'className' extends keyof P - ? (P extends { className?: string } ? P & { css?: string } : P) - : P - - type ReactJSXElement = JSX.Element - type ReactJSXElementClass = JSX.ElementClass - type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty - type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute - type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes - type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes - type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes - type ReactJSXIntrinsicElements = JSX.IntrinsicElements - - export namespace EmotionJSX { - interface Element extends ReactJSXElement { } - interface ElementClass extends ReactJSXElementClass { } - interface ElementAttributesProperty - extends ReactJSXElementAttributesProperty { } - interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute { } - - type LibraryManagedAttributes = WithConditionalCSSProp

& - ReactJSXLibraryManagedAttributes - - interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes { } - interface IntrinsicClassAttributes - extends ReactJSXIntrinsicClassAttributes { } - - type IntrinsicElements = { - [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { - css?: string - } - } - } - -==== /index.tsx (1 errors) ==== - /* @jsxImportSource @emotion/react */ - export const Comp = () =>

; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedDeclarations2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedDeclarations2.d.ts deleted file mode 100644 index f64b390eb3bfa..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedDeclarations2.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -//// [tests/cases/compiler/mergedDeclarations2.ts] //// - -//// [mergedDeclarations2.ts] -enum Foo { - b -} -enum Foo { - a = b -} - -module Foo { - export var x: any = b -} - -/// [Declarations] //// - - - -//// [mergedDeclarations2.d.ts] -declare enum Foo { - b = 0 -} -declare enum Foo { - a -} -declare namespace Foo { - var x: any; -} - -/// [Errors] //// - -mergedDeclarations2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -mergedDeclarations2.ts(9,25): error TS2304: Cannot find name 'b'. - - -==== mergedDeclarations2.ts (2 errors) ==== - enum Foo { - b - } - enum Foo { - a = b - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - module Foo { - export var x: any = b - ~ -!!! error TS2304: Cannot find name 'b'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedEnumDeclarationCodeGen.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedEnumDeclarationCodeGen.d.ts deleted file mode 100644 index 6592af6dc3cf3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mergedEnumDeclarationCodeGen.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -//// [tests/cases/compiler/mergedEnumDeclarationCodeGen.ts] //// - -//// [mergedEnumDeclarationCodeGen.ts] -enum E { - a, - b = a -} -enum E { - c = a -} - -/// [Declarations] //// - - - -//// [mergedEnumDeclarationCodeGen.d.ts] -declare enum E { - a = 0, - b = 0 -} -declare enum E { - c -} - -/// [Errors] //// - -mergedEnumDeclarationCodeGen.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -mergedEnumDeclarationCodeGen.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== mergedEnumDeclarationCodeGen.ts (2 errors) ==== - enum E { - a, - b = a - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - enum E { - c = a - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/methodContainingLocalFunction.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/methodContainingLocalFunction.d.ts deleted file mode 100644 index 7b3aa4e8c8937..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/methodContainingLocalFunction.d.ts +++ /dev/null @@ -1,136 +0,0 @@ -//// [tests/cases/compiler/methodContainingLocalFunction.ts] //// - -//// [methodContainingLocalFunction.ts] -// The first case here (BugExhibition) caused a crash. Try with different permutations of features. -class BugExhibition { - public exhibitBug(): void { - function localFunction() { } - var x: { (): void; }; - x = localFunction; - } -} - -class BugExhibition2 { - private static get exhibitBug() { - function localFunction() { } - var x: { (): void; }; - x = localFunction; - return null; - } -} - -class BugExhibition3 { - public exhibitBug(): void { - function localGenericFunction(u?: U) { } - var x: { (): void; }; - x = localGenericFunction; - } -} - -class C { - exhibit(): void { - var funcExpr = (u?: U) => { }; - var x: { (): void; }; - x = funcExpr; - } -} - -module M { - export function exhibitBug(): void { - function localFunction() { } - var x: { (): void; }; - x = localFunction; - } -} - -enum E { - A = (() => { - function localFunction() { } - var x: { (): void; }; - x = localFunction; - return 0; - })() -} - -/// [Declarations] //// - - - -//// [methodContainingLocalFunction.d.ts] -declare class BugExhibition { - exhibitBug(): void; -} -declare class BugExhibition2 { - private static get exhibitBug(); -} -declare class BugExhibition3 { - exhibitBug(): void; -} -declare class C { - exhibit(): void; -} -declare namespace M { - function exhibitBug(): void; -} -declare enum E { - A -} - -/// [Errors] //// - -methodContainingLocalFunction.ts(44,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== methodContainingLocalFunction.ts (1 errors) ==== - // The first case here (BugExhibition) caused a crash. Try with different permutations of features. - class BugExhibition { - public exhibitBug(): void { - function localFunction() { } - var x: { (): void; }; - x = localFunction; - } - } - - class BugExhibition2 { - private static get exhibitBug() { - function localFunction() { } - var x: { (): void; }; - x = localFunction; - return null; - } - } - - class BugExhibition3 { - public exhibitBug(): void { - function localGenericFunction(u?: U) { } - var x: { (): void; }; - x = localGenericFunction; - } - } - - class C { - exhibit(): void { - var funcExpr = (u?: U) => { }; - var x: { (): void; }; - x = funcExpr; - } - } - - module M { - export function exhibitBug(): void { - function localFunction() { } - var x: { (): void; }; - x = localFunction; - } - } - - enum E { - A = (() => { - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - function localFunction() { } - var x: { (): void; }; - x = localFunction; - return 0; - })() - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixedTypeEnumComparison.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixedTypeEnumComparison.d.ts deleted file mode 100644 index 5b4258dc29de4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixedTypeEnumComparison.d.ts +++ /dev/null @@ -1,111 +0,0 @@ -//// [tests/cases/compiler/mixedTypeEnumComparison.ts] //// - -//// [mixedTypeEnumComparison.ts] -const enum E { - S1 = "foo", - S2 = "bar", - - N1 = 1000, - N2 = 25, -} - -declare var someNumber: number - -if (someNumber > E.N2) { - someNumber = E.N2; -} - -declare const unionOfEnum: E.N1 | E.N2; - -if (someNumber > unionOfEnum) { - someNumber = E.N2; -} - -declare var someString: string - -if (someString > E.S1) { - someString = E.S2; -} - - -declare function someValue(): number; - -enum E2 { - S1 = "foo", - N1 = 1000, - C1 = someValue(), -} - -someString > E2.S1; -someNumber > E2.N1; -someNumber > E2.C1; - - -/// [Declarations] //// - - - -//// [mixedTypeEnumComparison.d.ts] -declare const enum E { - S1 = "foo", - S2 = "bar", - N1 = 1000, - N2 = 25 -} -declare var someNumber: number; -declare const unionOfEnum: E.N1 | E.N2; -declare var someString: string; -declare function someValue(): number; -declare enum E2 { - S1 = "foo", - N1 = 1000, - C1 -} - -/// [Errors] //// - -mixedTypeEnumComparison.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== mixedTypeEnumComparison.ts (1 errors) ==== - const enum E { - S1 = "foo", - S2 = "bar", - - N1 = 1000, - N2 = 25, - } - - declare var someNumber: number - - if (someNumber > E.N2) { - someNumber = E.N2; - } - - declare const unionOfEnum: E.N1 | E.N2; - - if (someNumber > unionOfEnum) { - someNumber = E.N2; - } - - declare var someString: string - - if (someString > E.S1) { - someString = E.S2; - } - - - declare function someValue(): number; - - enum E2 { - S1 = "foo", - N1 = 1000, - C1 = someValue(), - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - someString > E2.S1; - someNumber > E2.N1; - someNumber > E2.C1; - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationDisallowedExtensions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationDisallowedExtensions.d.ts deleted file mode 100644 index f685143fd6ac3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationDisallowedExtensions.d.ts +++ /dev/null @@ -1,187 +0,0 @@ -//// [tests/cases/compiler/moduleAugmentationDisallowedExtensions.ts] //// - -//// [x0.ts] -export let a = 1; - -//// [x.ts] -namespace N1 { - export let x = 1; -} - -declare module "./observable" { - var x: number; - let y: number; - const z: number; - let {x1, y1, z0: {n}, z1: {arr: [el1, el2, el3]}}: {x1: number, y1: string, z0: {n: number}, z1: {arr: number[]} } - interface A { x } - namespace N { - export class C {} - } - class Cls {} - function foo(): number; - type T = number; - import * as all from "./x0"; - import {a} from "./x0"; - export * from "./x0"; - export {a} from "./x0"; -} - -declare module "./test" { - export = N1; -} -export {} - -//// [observable.ts] -export declare class Observable { - filter(pred: (e:T) => boolean): Observable; -} -export var x = 1; - -//// [test.ts] -export let b = 1; - -//// [main.ts] -import { Observable } from "./observable" -import "./x"; - - -/// [Declarations] //// - - - -//// [main.d.ts] -import "./x"; - -//// [observable.d.ts] -export declare class Observable { - filter(pred: (e: T) => boolean): Observable; -} -export declare var x: number; - -//// [test.d.ts] -export declare let b: number; - -//// [x.d.ts] -declare namespace N1 { - let x: number; -} -declare module "./observable" { - var x: number; - let y: number; - const z: number; - let x1: invalid, y1: invalid, n: invalid, el1: invalid, el2: invalid, el3: invalid; - interface A { - x: any; - } - namespace N { - class C { - } - } - class Cls { - } - function foo(): number; - type T = number; - export * from "./x0"; - export { a } from "./x0"; -} -declare module "./test" { - export = N1; -} -export {}; - -//// [x0.d.ts] -export declare let a: number; - -/// [Errors] //// - -x.ts(9,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -x.ts(9,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -x.ts(9,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -x.ts(9,38): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -x.ts(9,43): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -x.ts(9,48): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -x.ts(17,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. -x.ts(17,26): error TS2307: Cannot find module './x0' or its corresponding type declarations. -x.ts(18,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. -x.ts(18,21): error TS2307: Cannot find module './x0' or its corresponding type declarations. -x.ts(19,5): error TS2666: Exports and export assignments are not permitted in module augmentations. -x.ts(19,19): error TS2307: Cannot find module './x0' or its corresponding type declarations. -x.ts(20,5): error TS2666: Exports and export assignments are not permitted in module augmentations. -x.ts(20,21): error TS2307: Cannot find module './x0' or its corresponding type declarations. -x.ts(24,5): error TS2666: Exports and export assignments are not permitted in module augmentations. - - -==== x0.ts (0 errors) ==== - export let a = 1; - -==== x.ts (15 errors) ==== - namespace N1 { - export let x = 1; - } - - declare module "./observable" { - var x: number; - let y: number; - const z: number; - let {x1, y1, z0: {n}, z1: {arr: [el1, el2, el3]}}: {x1: number, y1: string, z0: {n: number}, z1: {arr: number[]} } - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - interface A { x } - namespace N { - export class C {} - } - class Cls {} - function foo(): number; - type T = number; - import * as all from "./x0"; - ~~~~~~ -!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. - ~~~~~~ -!!! error TS2307: Cannot find module './x0' or its corresponding type declarations. - import {a} from "./x0"; - ~~~~~~ -!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. - ~~~~~~ -!!! error TS2307: Cannot find module './x0' or its corresponding type declarations. - export * from "./x0"; - ~~~~~~ -!!! error TS2666: Exports and export assignments are not permitted in module augmentations. - ~~~~~~ -!!! error TS2307: Cannot find module './x0' or its corresponding type declarations. - export {a} from "./x0"; - ~~~~~~ -!!! error TS2666: Exports and export assignments are not permitted in module augmentations. - ~~~~~~ -!!! error TS2307: Cannot find module './x0' or its corresponding type declarations. - } - - declare module "./test" { - export = N1; - ~~~~~~ -!!! error TS2666: Exports and export assignments are not permitted in module augmentations. - } - export {} - -==== observable.ts (0 errors) ==== - export declare class Observable { - filter(pred: (e:T) => boolean): Observable; - } - export var x = 1; - -==== test.ts (0 errors) ==== - export let b = 1; - -==== main.ts (0 errors) ==== - import { Observable } from "./observable" - import "./x"; - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationNoNewNames.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationNoNewNames.d.ts deleted file mode 100644 index e2c1380193b30..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleAugmentationNoNewNames.d.ts +++ /dev/null @@ -1,90 +0,0 @@ -//// [tests/cases/compiler/moduleAugmentationNoNewNames.ts] //// - -//// [map.ts] -import { Observable } from "./observable" - -(Observable.prototype).map = function() { } - -declare module "./observable" { - interface Observable { - map(proj: (e:T) => U): Observable - } - class Bar {} - let y: number, z: string; - let {a: x, b: x1}: {a: number, b: number}; - module Z {} -} - -//// [observable.ts] -export declare class Observable { - filter(pred: (e:T) => boolean): Observable; -} - -//// [main.ts] -import { Observable } from "./observable" -import "./map"; - -let x: Observable; -let y = x.map(x => x + 1); - -/// [Declarations] //// - - - -//// [main.d.ts] -import "./map"; - -//// [map.d.ts] -declare module "./observable" { - interface Observable { - map(proj: (e: T) => U): Observable; - } - class Bar { - } - let y: number, z: string; - let x: invalid, x1: invalid; - namespace Z { } -} -export {}; - -//// [observable.d.ts] -export declare class Observable { - filter(pred: (e: T) => boolean): Observable; -} - -/// [Errors] //// - -map.ts(11,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -map.ts(11,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== map.ts (2 errors) ==== - import { Observable } from "./observable" - - (Observable.prototype).map = function() { } - - declare module "./observable" { - interface Observable { - map(proj: (e:T) => U): Observable - } - class Bar {} - let y: number, z: string; - let {a: x, b: x1}: {a: number, b: number}; - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - module Z {} - } - -==== observable.ts (0 errors) ==== - export declare class Observable { - filter(pred: (e:T) => boolean): Observable; - } - -==== main.ts (0 errors) ==== - import { Observable } from "./observable" - import "./map"; - - let x: Observable; - let y = x.map(x => x + 1); \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/negateOperatorInvalidOperations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/negateOperatorInvalidOperations.d.ts deleted file mode 100644 index 75908bd6956f1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/negateOperatorInvalidOperations.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -//// [tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts] //// - -//// [negateOperatorInvalidOperations.ts] -// Unary operator - - -// operand before - -var NUMBER1 = var NUMBER: any-; //expect error - -// invalid expressions -var NUMBER2 = -(null - undefined); -var NUMBER3 = -(null - null); -var NUMBER4 = -(undefined - undefined); - -// miss operand -var NUMBER =-; - -/// [Declarations] //// - - - -//// [negateOperatorInvalidOperations.d.ts] -declare var NUMBER1: invalid; -declare var NUMBER: any; -declare var NUMBER2: number; -declare var NUMBER3: number; -declare var NUMBER4: number; -declare var NUMBER: number; - -/// [Errors] //// - -negateOperatorInvalidOperations.ts(4,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -negateOperatorInvalidOperations.ts(4,15): error TS1109: Expression expected. -negateOperatorInvalidOperations.ts(4,30): error TS1005: ',' expected. -negateOperatorInvalidOperations.ts(4,31): error TS1109: Expression expected. -negateOperatorInvalidOperations.ts(7,17): error TS18050: The value 'null' cannot be used here. -negateOperatorInvalidOperations.ts(7,24): error TS18050: The value 'undefined' cannot be used here. -negateOperatorInvalidOperations.ts(8,17): error TS18050: The value 'null' cannot be used here. -negateOperatorInvalidOperations.ts(8,24): error TS18050: The value 'null' cannot be used here. -negateOperatorInvalidOperations.ts(9,17): error TS18050: The value 'undefined' cannot be used here. -negateOperatorInvalidOperations.ts(9,29): error TS18050: The value 'undefined' cannot be used here. -negateOperatorInvalidOperations.ts(12,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'NUMBER' must be of type 'any', but here has type 'number'. -negateOperatorInvalidOperations.ts(12,14): error TS1109: Expression expected. - - -==== negateOperatorInvalidOperations.ts (12 errors) ==== - // Unary operator - - - // operand before - - var NUMBER1 = var NUMBER: any-; //expect error - -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ -!!! error TS1109: Expression expected. - ~ -!!! error TS1005: ',' expected. - ~ -!!! error TS1109: Expression expected. - - // invalid expressions - var NUMBER2 = -(null - undefined); - ~~~~ -!!! error TS18050: The value 'null' cannot be used here. - ~~~~~~~~~ -!!! error TS18050: The value 'undefined' cannot be used here. - var NUMBER3 = -(null - null); - ~~~~ -!!! error TS18050: The value 'null' cannot be used here. - ~~~~ -!!! error TS18050: The value 'null' cannot be used here. - var NUMBER4 = -(undefined - undefined); - ~~~~~~~~~ -!!! error TS18050: The value 'undefined' cannot be used here. - ~~~~~~~~~ -!!! error TS18050: The value 'undefined' cannot be used here. - - // miss operand - var NUMBER =-; - ~~~~~~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'NUMBER' must be of type 'any', but here has type 'number'. -!!! related TS6203 negateOperatorInvalidOperations.ts:4:19: 'NUMBER' was also declared here. - ~ -!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/newTargetNarrowing.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/newTargetNarrowing.d.ts deleted file mode 100644 index ec41a2ca1e765..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/newTargetNarrowing.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -//// [tests/cases/conformance/es6/newTarget/newTargetNarrowing.ts] //// - -//// [newTargetNarrowing.ts] -function foo(x: true): void { } - -function f(): void { - if (new.target.marked === true) { - foo(new.target.marked); - } -} - -f.marked = true; - - -/// [Declarations] //// - - - -//// [newTargetNarrowing.d.ts] -declare function foo(x: true): void; -declare function f(): void; - -/// [Errors] //// - -newTargetNarrowing.ts(3,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - - -==== newTargetNarrowing.ts (1 errors) ==== - function foo(x: true): void { } - - function f(): void { - ~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - if (new.target.marked === true) { - foo(new.target.marked); - } - } - - f.marked = true; - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/noImplicitAnyDestructuringVarDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/noImplicitAnyDestructuringVarDeclaration.d.ts deleted file mode 100644 index 09c7d32bef6c3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/noImplicitAnyDestructuringVarDeclaration.d.ts +++ /dev/null @@ -1,128 +0,0 @@ -//// [tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts] //// - -//// [noImplicitAnyDestructuringVarDeclaration.ts] -var [a], {b}, c: any, d: any; // error - -var [a1 = undefined], {b1 = null}, c1 = undefined, d1 = null; // error - -var [a2]: [any], {b2}: { b2: any }, c2: any, d2: any; - -var {b3}: { b3 }, c3: { b3 }; // error in type instead - -const dest: any[] = [undefined]; -const a4: any = dest[0]; -const dest_1 = { b4: null }; -const b4: any = dest_1.b4; -var c4 = undefined, d4 = null; // error // error // error // error - -const dest_2: any[] = []; -const temp: any = dest_2[0]; -const a5: any = temp === undefined ? undefined : dest_2[0]; // error - -/// [Declarations] //// - - - -//// [noImplicitAnyDestructuringVarDeclaration.d.ts] -declare var a: invalid, b: invalid, c: any, d: any; -declare var a1: invalid, b1: invalid, c1: any, d1: any; -declare var a2: invalid, b2: invalid, c2: any, d2: any; -declare var b3: invalid, c3: { - b3: any; -}; -declare const dest: any[]; -declare const a4: any; -declare const dest_1: { - b4: any; -}; -declare const b4: any; -declare var c4: any, d4: any; -declare const dest_2: any[]; -declare const temp: any; -declare const a5: any; - -/// [Errors] //// - -noImplicitAnyDestructuringVarDeclaration.ts(1,5): error TS1182: A destructuring declaration must have an initializer. -noImplicitAnyDestructuringVarDeclaration.ts(1,6): error TS7031: Binding element 'a' implicitly has an 'any' type. -noImplicitAnyDestructuringVarDeclaration.ts(1,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -noImplicitAnyDestructuringVarDeclaration.ts(1,10): error TS1182: A destructuring declaration must have an initializer. -noImplicitAnyDestructuringVarDeclaration.ts(1,11): error TS7031: Binding element 'b' implicitly has an 'any' type. -noImplicitAnyDestructuringVarDeclaration.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -noImplicitAnyDestructuringVarDeclaration.ts(3,5): error TS1182: A destructuring declaration must have an initializer. -noImplicitAnyDestructuringVarDeclaration.ts(3,6): error TS7031: Binding element 'a1' implicitly has an 'any' type. -noImplicitAnyDestructuringVarDeclaration.ts(3,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -noImplicitAnyDestructuringVarDeclaration.ts(3,23): error TS1182: A destructuring declaration must have an initializer. -noImplicitAnyDestructuringVarDeclaration.ts(3,24): error TS7031: Binding element 'b1' implicitly has an 'any' type. -noImplicitAnyDestructuringVarDeclaration.ts(3,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -noImplicitAnyDestructuringVarDeclaration.ts(5,5): error TS1182: A destructuring declaration must have an initializer. -noImplicitAnyDestructuringVarDeclaration.ts(5,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -noImplicitAnyDestructuringVarDeclaration.ts(5,18): error TS1182: A destructuring declaration must have an initializer. -noImplicitAnyDestructuringVarDeclaration.ts(5,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -noImplicitAnyDestructuringVarDeclaration.ts(7,5): error TS1182: A destructuring declaration must have an initializer. -noImplicitAnyDestructuringVarDeclaration.ts(7,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -noImplicitAnyDestructuringVarDeclaration.ts(7,13): error TS7008: Member 'b3' implicitly has an 'any' type. -noImplicitAnyDestructuringVarDeclaration.ts(7,25): error TS7008: Member 'b3' implicitly has an 'any' type. -noImplicitAnyDestructuringVarDeclaration.ts(11,18): error TS7018: Object literal's property 'b4' implicitly has an 'any' type. - - -==== noImplicitAnyDestructuringVarDeclaration.ts (21 errors) ==== - var [a], {b}, c: any, d: any; // error - ~~~ -!!! error TS1182: A destructuring declaration must have an initializer. - ~ -!!! error TS7031: Binding element 'a' implicitly has an 'any' type. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ -!!! error TS1182: A destructuring declaration must have an initializer. - ~ -!!! error TS7031: Binding element 'b' implicitly has an 'any' type. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - var [a1 = undefined], {b1 = null}, c1 = undefined, d1 = null; // error - ~~~~~~~~~~~~~~~~ -!!! error TS1182: A destructuring declaration must have an initializer. - ~~ -!!! error TS7031: Binding element 'a1' implicitly has an 'any' type. - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~ -!!! error TS1182: A destructuring declaration must have an initializer. - ~~ -!!! error TS7031: Binding element 'b1' implicitly has an 'any' type. - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - var [a2]: [any], {b2}: { b2: any }, c2: any, d2: any; - ~~~~ -!!! error TS1182: A destructuring declaration must have an initializer. - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ -!!! error TS1182: A destructuring declaration must have an initializer. - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - var {b3}: { b3 }, c3: { b3 }; // error in type instead - ~~~~ -!!! error TS1182: A destructuring declaration must have an initializer. - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ -!!! error TS7008: Member 'b3' implicitly has an 'any' type. - ~~ -!!! error TS7008: Member 'b3' implicitly has an 'any' type. - - const dest: any[] = [undefined]; - const a4: any = dest[0]; - const dest_1 = { b4: null }; - ~~~~~~~~ -!!! error TS7018: Object literal's property 'b4' implicitly has an 'any' type. - const b4: any = dest_1.b4; - var c4 = undefined, d4 = null; // error // error // error // error - - const dest_2: any[] = []; - const temp: any = dest_2[0]; - const a5: any = temp === undefined ? undefined : dest_2[0]; // error \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/objectLiteralGettersAndSetters.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/objectLiteralGettersAndSetters.d.ts deleted file mode 100644 index 29204015021c3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/objectLiteralGettersAndSetters.d.ts +++ /dev/null @@ -1,327 +0,0 @@ -//// [tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts] //// - -//// [objectLiteralGettersAndSetters.ts] -// Get and set accessor with the same name -var sameName1a: { - a: string; -} = { get 'a'(): string { return ''; }, set a(n) { var p = n; var p: string; } }; -var sameName2a: { - 0: string; -} = { get 0.0(): string { return ''; }, set 0(n) { var p = n; var p: string; } }; -var sameName3a: { - 32: string; -} = { get 0x20(): string { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; -var sameName4a: { - "": string; -} = { get ''(): string { return ''; }, set ""(n) { var p = n; var p: string; } }; -var sameName5a: { - '\t': string; -} = { get '\t'(): string { return ''; }, set '\t'(n) { var p = n; var p: string; } }; -var sameName6a: { - a: string; -} = { get 'a'(): string { return ''; }, set a(n) { var p = n; var p: string; } }; - -// PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} -var callSig1 = { num(n: number): string { return '' } }; -var callSig1: { num: (n: number) => string; }; -var callSig2 = { num: function (n: number): string { return '' } }; -var callSig2: { num: (n: number) => string; }; -var callSig3 = { num: (n: number): string => '' }; -var callSig3: { num: (n: number) => string; }; - -// Get accessor only, type of the property is the annotated return type of the get accessor -var getter1 = { get x(): string { return undefined; } }; -var getter1: { readonly x: string; } - -// Get accessor only, type of the property is the inferred return type of the get accessor -var getter2 = { get x(): string { return ''; } }; -var getter2: { readonly x: string; } - -// Set accessor only, type of the property is the param type of the set accessor -var setter1 = { set x(n: number) { } }; -var setter1: { x: number }; - -// Set accessor only, type of the property is Any for an unannotated set accessor -var setter2: { - x: any; -} = { set x(n) { } }; -var setter2: { x: any }; - -var anyVar: any; -// Get and set accessor with matching type annotations -var sameType1: { - x: string; -} = { get x(): string { return undefined; }, set x(n: string) { } }; -var sameType2: { - x: number[]; -} = { get x(): Array { return undefined; }, set x(n: number[]) { } }; -var sameType3: { - x: any; -} = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; -var sameType4: { - x: Date; -} = { get x(): Date { return undefined; }, set x(n: Date) { } }; - -// Type of unannotated get accessor return type is the type annotation of the set accessor param -var setParamType1 = { - set n(x: (t: string) => void) { }, - get n(): (t: string) => void { return (t) => { - var p: string; - var p = t; - } - } -}; -var setParamType2: { - n: (t: string) => void; -} = { - get n() { return (t) => { - var p: string; - var p = t; - } - }, - set n(x: (t: string) => void) { } -}; - -// Type of unannotated set accessor parameter is the return type annotation of the get accessor -var getParamType1 = { - set n(x) { - var y = x; - var y: string; - }, - get n(): string { return ''; } -}; -var getParamType2: { - n: string; -} = { - get n(): string { return ''; }, - set n(x) { - var y = x; - var y: string; - } -}; - -// Type of unannotated accessors is the inferred return type of the get accessor -var getParamType3: { - n: string; -} = { - get n(): string { return ''; }, - set n(x) { - var y = x; - var y: string; - } -}; - - - -/// [Declarations] //// - - - -//// [objectLiteralGettersAndSetters.d.ts] -declare var sameName1a: { - a: string; -}; -declare var sameName2a: { - 0: string; -}; -declare var sameName3a: { - 32: string; -}; -declare var sameName4a: { - "": string; -}; -declare var sameName5a: { - '\t': string; -}; -declare var sameName6a: { - a: string; -}; -declare var callSig1: { - num(n: number): string; -}; -declare var callSig1: { - num: (n: number) => string; -}; -declare var callSig2: { - num: (n: number) => string; -}; -declare var callSig2: { - num: (n: number) => string; -}; -declare var callSig3: { - num: (n: number) => string; -}; -declare var callSig3: { - num: (n: number) => string; -}; -declare var getter1: { - x: string; -}; -declare var getter1: { - readonly x: string; -}; -declare var getter2: { - x: string; -}; -declare var getter2: { - readonly x: string; -}; -declare var setter1: { - readonly x: number; -}; -declare var setter1: { - x: number; -}; -declare var setter2: { - x: any; -}; -declare var setter2: { - x: any; -}; -declare var anyVar: any; -declare var sameType1: { - x: string; -}; -declare var sameType2: { - x: number[]; -}; -declare var sameType3: { - x: any; -}; -declare var sameType4: { - x: Date; -}; -declare var setParamType1: invalid; -declare var setParamType2: { - n: (t: string) => void; -}; -declare var getParamType1: invalid; -declare var getParamType2: { - n: string; -}; -declare var getParamType3: { - n: string; -}; - -/// [Errors] //// - -objectLiteralGettersAndSetters.ts(65,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(88,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== objectLiteralGettersAndSetters.ts (2 errors) ==== - // Get and set accessor with the same name - var sameName1a: { - a: string; - } = { get 'a'(): string { return ''; }, set a(n) { var p = n; var p: string; } }; - var sameName2a: { - 0: string; - } = { get 0.0(): string { return ''; }, set 0(n) { var p = n; var p: string; } }; - var sameName3a: { - 32: string; - } = { get 0x20(): string { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; - var sameName4a: { - "": string; - } = { get ''(): string { return ''; }, set ""(n) { var p = n; var p: string; } }; - var sameName5a: { - '\t': string; - } = { get '\t'(): string { return ''; }, set '\t'(n) { var p = n; var p: string; } }; - var sameName6a: { - a: string; - } = { get 'a'(): string { return ''; }, set a(n) { var p = n; var p: string; } }; - - // PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} - var callSig1 = { num(n: number): string { return '' } }; - var callSig1: { num: (n: number) => string; }; - var callSig2 = { num: function (n: number): string { return '' } }; - var callSig2: { num: (n: number) => string; }; - var callSig3 = { num: (n: number): string => '' }; - var callSig3: { num: (n: number) => string; }; - - // Get accessor only, type of the property is the annotated return type of the get accessor - var getter1 = { get x(): string { return undefined; } }; - var getter1: { readonly x: string; } - - // Get accessor only, type of the property is the inferred return type of the get accessor - var getter2 = { get x(): string { return ''; } }; - var getter2: { readonly x: string; } - - // Set accessor only, type of the property is the param type of the set accessor - var setter1 = { set x(n: number) { } }; - var setter1: { x: number }; - - // Set accessor only, type of the property is Any for an unannotated set accessor - var setter2: { - x: any; - } = { set x(n) { } }; - var setter2: { x: any }; - - var anyVar: any; - // Get and set accessor with matching type annotations - var sameType1: { - x: string; - } = { get x(): string { return undefined; }, set x(n: string) { } }; - var sameType2: { - x: number[]; - } = { get x(): Array { return undefined; }, set x(n: number[]) { } }; - var sameType3: { - x: any; - } = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; - var sameType4: { - x: Date; - } = { get x(): Date { return undefined; }, set x(n: Date) { } }; - - // Type of unannotated get accessor return type is the type annotation of the set accessor param - var setParamType1 = { - set n(x: (t: string) => void) { }, - get n(): (t: string) => void { return (t) => { - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - var p: string; - var p = t; - } - } - }; - var setParamType2: { - n: (t: string) => void; - } = { - get n() { return (t) => { - var p: string; - var p = t; - } - }, - set n(x: (t: string) => void) { } - }; - - // Type of unannotated set accessor parameter is the return type annotation of the get accessor - var getParamType1 = { - set n(x) { - var y = x; - var y: string; - }, - get n(): string { return ''; } - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - }; - var getParamType2: { - n: string; - } = { - get n(): string { return ''; }, - set n(x) { - var y = x; - var y: string; - } - }; - - // Type of unannotated accessors is the inferred return type of the get accessor - var getParamType3: { - n: string; - } = { - get n(): string { return ''; }, - set n(x) { - var y = x; - var y: string; - } - }; - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/overloadingStaticFunctionsInFunctions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/overloadingStaticFunctionsInFunctions.d.ts deleted file mode 100644 index 9b68fda442a05..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/overloadingStaticFunctionsInFunctions.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -//// [tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts] //// - -//// [overloadingStaticFunctionsInFunctions.ts] -function boo { - static test() - static test(name:string) - static test(name?:any){ } -} - -/// [Declarations] //// - - - -//// [overloadingStaticFunctionsInFunctions.d.ts] -declare function boo(): invalid; - -/// [Errors] //// - -overloadingStaticFunctionsInFunctions.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -overloadingStaticFunctionsInFunctions.ts(1,14): error TS1005: '(' expected. -overloadingStaticFunctionsInFunctions.ts(2,3): error TS1128: Declaration or statement expected. -overloadingStaticFunctionsInFunctions.ts(2,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. -overloadingStaticFunctionsInFunctions.ts(3,3): error TS1128: Declaration or statement expected. -overloadingStaticFunctionsInFunctions.ts(3,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. -overloadingStaticFunctionsInFunctions.ts(3,15): error TS2304: Cannot find name 'name'. -overloadingStaticFunctionsInFunctions.ts(3,19): error TS1005: ',' expected. -overloadingStaticFunctionsInFunctions.ts(3,20): error TS2693: 'string' only refers to a type, but is being used as a value here. -overloadingStaticFunctionsInFunctions.ts(4,3): error TS1128: Declaration or statement expected. -overloadingStaticFunctionsInFunctions.ts(4,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. -overloadingStaticFunctionsInFunctions.ts(4,15): error TS2304: Cannot find name 'name'. -overloadingStaticFunctionsInFunctions.ts(4,20): error TS1109: Expression expected. -overloadingStaticFunctionsInFunctions.ts(4,21): error TS2693: 'any' only refers to a type, but is being used as a value here. -overloadingStaticFunctionsInFunctions.ts(4,25): error TS1005: ';' expected. - - -==== overloadingStaticFunctionsInFunctions.ts (15 errors) ==== - function boo { - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1005: '(' expected. - static test() - ~~~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - static test(name:string) - ~~~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - ~~~~ -!!! error TS2304: Cannot find name 'name'. - ~ -!!! error TS1005: ',' expected. - ~~~~~~ -!!! error TS2693: 'string' only refers to a type, but is being used as a value here. - static test(name?:any){ } - ~~~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - ~~~~ -!!! error TS2304: Cannot find name 'name'. - ~ -!!! error TS1109: Expression expected. - ~~~ -!!! error TS2693: 'any' only refers to a type, but is being used as a value here. - ~ -!!! error TS1005: ';' expected. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.classMethods.es2018.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.classMethods.es2018.d.ts deleted file mode 100644 index 6c86d3d7ef199..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.classMethods.es2018.d.ts +++ /dev/null @@ -1,500 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.classMethods.es2018.ts] //// - -//// [methodIsOk.ts] -class C1 { - async * f(): AsyncGenerator { - } -} -//// [awaitMethodNameIsOk.ts] -class C2 { - async * await(): AsyncGenerator { - } -} -//// [yieldMethodNameIsOk.ts] -class C3 { - async * yield(): AsyncGenerator { - } -} -//// [awaitParameterIsError.ts] -class C4 { - async * f(await: any): AsyncGenerator { - } -} -//// [yieldParameterIsError.ts] -class C5 { - async * f(yield: any): AsyncGenerator { - } -} -//// [awaitInParameterInitializerIsError.ts] -class C6 { - async * f(a: number = await 1): AsyncGenerator { - } -} -//// [yieldInParameterInitializerIsError.ts] -class C7 { - async * f(a: any = yield): AsyncGenerator { - } -} -//// [nestedAsyncGeneratorIsOk.ts] -class C8 { - async * f(): AsyncGenerator { - async function * g() { - } - } -} -//// [nestedFunctionDeclarationNamedYieldIsError.ts] -class C9 { - async * f(): AsyncGenerator { - function yield() { - } - } -} -//// [nestedFunctionExpressionNamedYieldIsError.ts] -class C10 { - async * f(): AsyncGenerator { - const x = function yield() { - }; - } -} -//// [nestedFunctionDeclarationNamedAwaitIsError.ts] -class C11 { - async * f(): AsyncGenerator { - function await() { - } - } -} -//// [nestedFunctionExpressionNamedAwaitIsError.ts] -class C12 { - async * f(): AsyncGenerator { - const x = function await() { - }; - } -} -//// [yieldIsOk.ts] -class C13 { - async * f(): AsyncGenerator { - yield; - } -} -//// [yieldWithValueIsOk.ts] -class C14 { - async * f(): AsyncGenerator { - yield 1; - } -} -//// [yieldStarMissingValueIsError.ts] -class C15 { - async * f(): AsyncGenerator { - yield *; - } -} -//// [yieldStarWithValueIsOk.ts] -class C16 { - async * f(): AsyncGenerator { - yield * []; - } -} -//// [awaitWithValueIsOk.ts] -class C17 { - async * f(): AsyncGenerator { - await 1; - } -} -//// [awaitMissingValueIsError.ts] -class C18 { - async * f(): AsyncGenerator { - await; - } -} -//// [awaitAsTypeIsOk.ts] -interface await {} -class C19 { - async * f(): AsyncGenerator { - let x: await; - } -} -//// [yieldAsTypeIsStrictError.ts] -interface yield {} -class C20 { - async * f(): AsyncGenerator { - let x: yield; - } -} -//// [yieldInClassComputedPropertyIsError.ts] -class C21 { - async * [yield](): AsyncGenerator { - } -} -//// [yieldInNestedComputedPropertyIsOk.ts] -class C22 { - async * f(): AsyncGenerator { - const x = { [yield]: 1 }; - } -} -//// [asyncGeneratorGetAccessorIsError.ts] -class C23 { - async * get x(): number { - return 1; - } -} -//// [asyncGeneratorSetAccessorIsError.ts] -class C24 { - async * set x(value: number): void { - } -} -//// [asyncGeneratorPropertyIsError.ts] -class C25 { - async * x = 1: any; -} - - -/// [Declarations] //// - - - -//// [asyncGeneratorGetAccessorIsError.d.ts] -declare class C23 { - get(): invalid; - x(): number; -} - -//// [asyncGeneratorPropertyIsError.d.ts] -declare class C25 { - x(): invalid; - 1: any; -} - -//// [asyncGeneratorSetAccessorIsError.d.ts] -declare class C24 { - set(): invalid; - x(value: number): void; -} - -//// [awaitAsTypeIsOk.d.ts] -interface await { -} -declare class C19 { - f(): AsyncGenerator; -} - -//// [awaitInParameterInitializerIsError.d.ts] -declare class C6 { - f(a?: number): AsyncGenerator; -} - -//// [awaitMethodNameIsOk.d.ts] -declare class C2 { - await(): AsyncGenerator; -} - -//// [awaitMissingValueIsError.d.ts] -declare class C18 { - f(): AsyncGenerator; -} - -//// [awaitParameterIsError.d.ts] -declare class C4 { - f(await: any): AsyncGenerator; -} - -//// [awaitWithValueIsOk.d.ts] -declare class C17 { - f(): AsyncGenerator; -} - -//// [methodIsOk.d.ts] -declare class C1 { - f(): AsyncGenerator; -} - -//// [nestedAsyncGeneratorIsOk.d.ts] -declare class C8 { - f(): AsyncGenerator; -} - -//// [nestedFunctionDeclarationNamedAwaitIsError.d.ts] -declare class C11 { - f(): AsyncGenerator; -} - -//// [nestedFunctionDeclarationNamedYieldIsError.d.ts] -declare class C9 { - f(): AsyncGenerator; -} - -//// [nestedFunctionExpressionNamedAwaitIsError.d.ts] -declare class C12 { - f(): AsyncGenerator; -} - -//// [nestedFunctionExpressionNamedYieldIsError.d.ts] -declare class C10 { - f(): AsyncGenerator; -} - -//// [yieldAsTypeIsStrictError.d.ts] -interface yield { -} -declare class C20 { - f(): AsyncGenerator; -} - -//// [yieldInClassComputedPropertyIsError.d.ts] -declare class C21 { - [yield](): AsyncGenerator; -} - -//// [yieldInNestedComputedPropertyIsOk.d.ts] -declare class C22 { - f(): AsyncGenerator; -} - -//// [yieldInParameterInitializerIsError.d.ts] -declare class C7 { - f(a?: any): AsyncGenerator; -} - -//// [yieldIsOk.d.ts] -declare class C13 { - f(): AsyncGenerator; -} - -//// [yieldMethodNameIsOk.d.ts] -declare class C3 { - yield(): AsyncGenerator; -} - -//// [yieldParameterIsError.d.ts] -declare class C5 { - f(yield: any): AsyncGenerator; -} - -//// [yieldStarMissingValueIsError.d.ts] -declare class C15 { - f(): AsyncGenerator; -} - -//// [yieldStarWithValueIsOk.d.ts] -declare class C16 { - f(): AsyncGenerator; -} - -//// [yieldWithValueIsOk.d.ts] -declare class C14 { - f(): AsyncGenerator; -} - -/// [Errors] //// - -asyncGeneratorGetAccessorIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. -asyncGeneratorPropertyIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -asyncGeneratorPropertyIsError.ts(2,15): error TS1005: '(' expected. -asyncGeneratorSetAccessorIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected. -awaitInParameterInitializerIsError.ts(2,27): error TS2524: 'await' expressions cannot be used in a parameter initializer. -awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected. -awaitParameterIsError.ts(2,15): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionDeclarationNamedAwaitIsError.ts(3,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionDeclarationNamedYieldIsError.ts(3,18): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. -nestedFunctionExpressionNamedAwaitIsError.ts(3,28): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionExpressionNamedYieldIsError.ts(3,28): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. -yieldAsTypeIsStrictError.ts(4,16): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. -yieldInClassComputedPropertyIsError.ts(2,14): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. -yieldInClassComputedPropertyIsError.ts(2,14): error TS2693: 'yield' only refers to a type, but is being used as a value here. -yieldInNestedComputedPropertyIsOk.ts(3,21): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -yieldInParameterInitializerIsError.ts(2,24): error TS2322: Type 'undefined' is not assignable to type 'never'. -yieldInParameterInitializerIsError.ts(2,24): error TS2523: 'yield' expressions cannot be used in a parameter initializer. -yieldParameterIsError.ts(2,15): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. -yieldStarMissingValueIsError.ts(3,16): error TS1109: Expression expected. - - -==== methodIsOk.ts (0 errors) ==== - class C1 { - async * f(): AsyncGenerator { - } - } -==== awaitMethodNameIsOk.ts (0 errors) ==== - class C2 { - async * await(): AsyncGenerator { - } - } -==== yieldMethodNameIsOk.ts (0 errors) ==== - class C3 { - async * yield(): AsyncGenerator { - } - } -==== awaitParameterIsError.ts (1 errors) ==== - class C4 { - async * f(await: any): AsyncGenerator { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - } - } -==== yieldParameterIsError.ts (1 errors) ==== - class C5 { - async * f(yield: any): AsyncGenerator { - ~~~~~ -!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. - } - } -==== awaitInParameterInitializerIsError.ts (1 errors) ==== - class C6 { - async * f(a: number = await 1): AsyncGenerator { - ~~~~~~~ -!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. - } - } -==== yieldInParameterInitializerIsError.ts (2 errors) ==== - class C7 { - async * f(a: any = yield): AsyncGenerator { - ~~~~~ -!!! error TS2322: Type 'undefined' is not assignable to type 'never'. - ~~~~~ -!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. - } - } -==== nestedAsyncGeneratorIsOk.ts (0 errors) ==== - class C8 { - async * f(): AsyncGenerator { - async function * g() { - } - } - } -==== nestedFunctionDeclarationNamedYieldIsError.ts (1 errors) ==== - class C9 { - async * f(): AsyncGenerator { - function yield() { - ~~~~~ -!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. - } - } - } -==== nestedFunctionExpressionNamedYieldIsError.ts (1 errors) ==== - class C10 { - async * f(): AsyncGenerator { - const x = function yield() { - ~~~~~ -!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. - }; - } - } -==== nestedFunctionDeclarationNamedAwaitIsError.ts (1 errors) ==== - class C11 { - async * f(): AsyncGenerator { - function await() { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - } - } - } -==== nestedFunctionExpressionNamedAwaitIsError.ts (1 errors) ==== - class C12 { - async * f(): AsyncGenerator { - const x = function await() { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - }; - } - } -==== yieldIsOk.ts (0 errors) ==== - class C13 { - async * f(): AsyncGenerator { - yield; - } - } -==== yieldWithValueIsOk.ts (0 errors) ==== - class C14 { - async * f(): AsyncGenerator { - yield 1; - } - } -==== yieldStarMissingValueIsError.ts (1 errors) ==== - class C15 { - async * f(): AsyncGenerator { - yield *; - ~ -!!! error TS1109: Expression expected. - } - } -==== yieldStarWithValueIsOk.ts (0 errors) ==== - class C16 { - async * f(): AsyncGenerator { - yield * []; - } - } -==== awaitWithValueIsOk.ts (0 errors) ==== - class C17 { - async * f(): AsyncGenerator { - await 1; - } - } -==== awaitMissingValueIsError.ts (1 errors) ==== - class C18 { - async * f(): AsyncGenerator { - await; - ~ -!!! error TS1109: Expression expected. - } - } -==== awaitAsTypeIsOk.ts (0 errors) ==== - interface await {} - class C19 { - async * f(): AsyncGenerator { - let x: await; - } - } -==== yieldAsTypeIsStrictError.ts (1 errors) ==== - interface yield {} - class C20 { - async * f(): AsyncGenerator { - let x: yield; - ~~~~~ -!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. - } - } -==== yieldInClassComputedPropertyIsError.ts (2 errors) ==== - class C21 { - async * [yield](): AsyncGenerator { - ~~~~~ -!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. - ~~~~~ -!!! error TS2693: 'yield' only refers to a type, but is being used as a value here. - } - } -==== yieldInNestedComputedPropertyIsOk.ts (1 errors) ==== - class C22 { - async * f(): AsyncGenerator { - const x = { [yield]: 1 }; - ~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } - } -==== asyncGeneratorGetAccessorIsError.ts (2 errors) ==== - class C23 { - async * get x(): number { - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1005: '(' expected. - return 1; - } - } -==== asyncGeneratorSetAccessorIsError.ts (2 errors) ==== - class C24 { - async * set x(value: number): void { - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1005: '(' expected. - } - } -==== asyncGeneratorPropertyIsError.ts (2 errors) ==== - class C25 { - async * x = 1: any; - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1005: '(' expected. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts deleted file mode 100644 index 851372a6a66cb..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts +++ /dev/null @@ -1,466 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.es2018.ts] //// - -//// [methodIsOk.ts] -const o1 = { - async * f(): AsyncGenerator { - } -}; -//// [awaitMethodNameIsOk.ts] -const o2 = { - async * await(): AsyncGenerator { - } -}; -//// [yieldMethodNameIsOk.ts] -const o3 = { - async * yield(): AsyncGenerator { - } -}; -//// [awaitParameterIsError.ts] -const o4 = { - async * f(await: any): AsyncGenerator { - } -}; -//// [yieldParameterIsError.ts] -const o5 = { - async * f(yield: any): AsyncGenerator { - } -}; -//// [awaitInParameterInitializerIsError.ts] -const o6 = { - async * f(a: number = await 1): AsyncGenerator { - } -}; -//// [yieldInParameterInitializerIsError.ts] -const o7 = { - async * f(a: any = yield): AsyncGenerator { - } -}; -//// [nestedAsyncGeneratorIsOk.ts] -const o8 = { - async * f(): AsyncGenerator { - async function * g() { - } - } -}; -//// [nestedFunctionDeclarationNamedYieldIsError.ts] -const o9 = { - async * f(): AsyncGenerator { - function yield() { - } - } -}; -//// [nestedFunctionExpressionNamedYieldIsError.ts] -const o10 = { - async * f(): AsyncGenerator { - const x = function yield() { - }; - } -}; -//// [nestedFunctionDeclarationNamedAwaitIsError.ts] -const o11 = { - async * f(): AsyncGenerator { - function await() { - } - } -}; -//// [nestedFunctionExpressionNamedAwaitIsError.ts] -const o12 = { - async * f(): AsyncGenerator { - const x = function await() { - }; - } -}; -//// [yieldIsOk.ts] -const o13 = { - async * f(): AsyncGenerator { - yield; - } -}; -//// [yieldWithValueIsOk.ts] -const o14 = { - async * f(): AsyncGenerator { - yield 1; - } -}; -//// [yieldStarMissingValueIsError.ts] -const o15 = { - async * f(): AsyncGenerator { - yield *; - } -}; -//// [yieldStarWithValueIsOk.ts] -const o16 = { - async * f(): AsyncGenerator { - yield * []; - } -}; -//// [awaitWithValueIsOk.ts] -const o17 = { - async * f(): AsyncGenerator { - await 1; - } -}; -//// [awaitMissingValueIsError.ts] -const o18 = { - async * f(): AsyncGenerator { - await; - } -}; -//// [awaitAsTypeIsOk.ts] -interface await {} -const o19 = { - async * f(): AsyncGenerator { - let x: await; - } -}; -//// [yieldAsTypeIsOk.ts] -interface yield {} -const o20 = { - async * f(): AsyncGenerator { - let x: yield; - } -}; -//// [yieldInNestedComputedPropertyIsOk.ts] -const o21 = { - async * f(): AsyncGenerator { - const x = { [yield]: 1 }; - } -}; -//// [asyncGeneratorGetAccessorIsError.ts] -const o22 = { - async * get x(): number { - return 1; - } -}; -//// [asyncGeneratorSetAccessorIsError.ts] -const o23 = { - async * set x(value: number): void { - } -}; -//// [asyncGeneratorPropertyIsError.ts] -const o24 = { - async * x: 1; -}; - - -/// [Declarations] //// - - - -//// [asyncGeneratorGetAccessorIsError.d.ts] -declare const o22: invalid; - -//// [asyncGeneratorPropertyIsError.d.ts] -declare const o24: { - x(): 1; -}; - -//// [asyncGeneratorSetAccessorIsError.d.ts] -declare const o23: invalid; - -//// [awaitAsTypeIsOk.d.ts] -interface await { -} -declare const o19: { - f(): AsyncGenerator; -}; - -//// [awaitInParameterInitializerIsError.d.ts] -declare const o6: { - f(a?: number): AsyncGenerator; -}; - -//// [awaitMethodNameIsOk.d.ts] -declare const o2: { - await(): AsyncGenerator; -}; - -//// [awaitMissingValueIsError.d.ts] -declare const o18: { - f(): AsyncGenerator; -}; - -//// [awaitParameterIsError.d.ts] -declare const o4: { - f(await: any): AsyncGenerator; -}; - -//// [awaitWithValueIsOk.d.ts] -declare const o17: { - f(): AsyncGenerator; -}; - -//// [methodIsOk.d.ts] -declare const o1: { - f(): AsyncGenerator; -}; - -//// [nestedAsyncGeneratorIsOk.d.ts] -declare const o8: { - f(): AsyncGenerator; -}; - -//// [nestedFunctionDeclarationNamedAwaitIsError.d.ts] -declare const o11: { - f(): AsyncGenerator; -}; - -//// [nestedFunctionDeclarationNamedYieldIsError.d.ts] -declare const o9: { - f(): AsyncGenerator; -}; - -//// [nestedFunctionExpressionNamedAwaitIsError.d.ts] -declare const o12: { - f(): AsyncGenerator; -}; - -//// [nestedFunctionExpressionNamedYieldIsError.d.ts] -declare const o10: { - f(): AsyncGenerator; -}; - -//// [yieldAsTypeIsOk.d.ts] -interface yield { -} -declare const o20: { - f(): AsyncGenerator; -}; - -//// [yieldInNestedComputedPropertyIsOk.d.ts] -declare const o21: { - f(): AsyncGenerator; -}; - -//// [yieldInParameterInitializerIsError.d.ts] -declare const o7: { - f(a?: any): AsyncGenerator; -}; - -//// [yieldIsOk.d.ts] -declare const o13: { - f(): AsyncGenerator; -}; - -//// [yieldMethodNameIsOk.d.ts] -declare const o3: { - yield(): AsyncGenerator; -}; - -//// [yieldParameterIsError.d.ts] -declare const o5: { - f(yield: any): AsyncGenerator; -}; - -//// [yieldStarMissingValueIsError.d.ts] -declare const o15: { - f(): AsyncGenerator; -}; - -//// [yieldStarWithValueIsOk.d.ts] -declare const o16: { - f(): AsyncGenerator; -}; - -//// [yieldWithValueIsOk.d.ts] -declare const o14: { - f(): AsyncGenerator; -}; - -/// [Errors] //// - -asyncGeneratorGetAccessorIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. -asyncGeneratorPropertyIsError.ts(2,14): error TS1005: '(' expected. -asyncGeneratorSetAccessorIsError.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected. -awaitInParameterInitializerIsError.ts(2,27): error TS2524: 'await' expressions cannot be used in a parameter initializer. -awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected. -awaitParameterIsError.ts(2,15): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionDeclarationNamedAwaitIsError.ts(3,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionDeclarationNamedYieldIsError.ts(3,18): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -nestedFunctionExpressionNamedAwaitIsError.ts(3,28): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionExpressionNamedYieldIsError.ts(3,28): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -yieldInNestedComputedPropertyIsOk.ts(3,21): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -yieldInParameterInitializerIsError.ts(2,24): error TS2322: Type 'undefined' is not assignable to type 'never'. -yieldInParameterInitializerIsError.ts(2,24): error TS2523: 'yield' expressions cannot be used in a parameter initializer. -yieldParameterIsError.ts(2,15): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -yieldStarMissingValueIsError.ts(3,16): error TS1109: Expression expected. - - -==== methodIsOk.ts (0 errors) ==== - const o1 = { - async * f(): AsyncGenerator { - } - }; -==== awaitMethodNameIsOk.ts (0 errors) ==== - const o2 = { - async * await(): AsyncGenerator { - } - }; -==== yieldMethodNameIsOk.ts (0 errors) ==== - const o3 = { - async * yield(): AsyncGenerator { - } - }; -==== awaitParameterIsError.ts (1 errors) ==== - const o4 = { - async * f(await: any): AsyncGenerator { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - } - }; -==== yieldParameterIsError.ts (1 errors) ==== - const o5 = { - async * f(yield: any): AsyncGenerator { - ~~~~~ -!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. - } - }; -==== awaitInParameterInitializerIsError.ts (1 errors) ==== - const o6 = { - async * f(a: number = await 1): AsyncGenerator { - ~~~~~~~ -!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. - } - }; -==== yieldInParameterInitializerIsError.ts (2 errors) ==== - const o7 = { - async * f(a: any = yield): AsyncGenerator { - ~~~~~ -!!! error TS2322: Type 'undefined' is not assignable to type 'never'. - ~~~~~ -!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. - } - }; -==== nestedAsyncGeneratorIsOk.ts (0 errors) ==== - const o8 = { - async * f(): AsyncGenerator { - async function * g() { - } - } - }; -==== nestedFunctionDeclarationNamedYieldIsError.ts (1 errors) ==== - const o9 = { - async * f(): AsyncGenerator { - function yield() { - ~~~~~ -!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. - } - } - }; -==== nestedFunctionExpressionNamedYieldIsError.ts (1 errors) ==== - const o10 = { - async * f(): AsyncGenerator { - const x = function yield() { - ~~~~~ -!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. - }; - } - }; -==== nestedFunctionDeclarationNamedAwaitIsError.ts (1 errors) ==== - const o11 = { - async * f(): AsyncGenerator { - function await() { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - } - } - }; -==== nestedFunctionExpressionNamedAwaitIsError.ts (1 errors) ==== - const o12 = { - async * f(): AsyncGenerator { - const x = function await() { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - }; - } - }; -==== yieldIsOk.ts (0 errors) ==== - const o13 = { - async * f(): AsyncGenerator { - yield; - } - }; -==== yieldWithValueIsOk.ts (0 errors) ==== - const o14 = { - async * f(): AsyncGenerator { - yield 1; - } - }; -==== yieldStarMissingValueIsError.ts (1 errors) ==== - const o15 = { - async * f(): AsyncGenerator { - yield *; - ~ -!!! error TS1109: Expression expected. - } - }; -==== yieldStarWithValueIsOk.ts (0 errors) ==== - const o16 = { - async * f(): AsyncGenerator { - yield * []; - } - }; -==== awaitWithValueIsOk.ts (0 errors) ==== - const o17 = { - async * f(): AsyncGenerator { - await 1; - } - }; -==== awaitMissingValueIsError.ts (1 errors) ==== - const o18 = { - async * f(): AsyncGenerator { - await; - ~ -!!! error TS1109: Expression expected. - } - }; -==== awaitAsTypeIsOk.ts (0 errors) ==== - interface await {} - const o19 = { - async * f(): AsyncGenerator { - let x: await; - } - }; -==== yieldAsTypeIsOk.ts (0 errors) ==== - interface yield {} - const o20 = { - async * f(): AsyncGenerator { - let x: yield; - } - }; -==== yieldInNestedComputedPropertyIsOk.ts (1 errors) ==== - const o21 = { - async * f(): AsyncGenerator { - const x = { [yield]: 1 }; - ~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } - }; -==== asyncGeneratorGetAccessorIsError.ts (2 errors) ==== - const o22 = { - async * get x(): number { - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1005: '(' expected. - return 1; - } - }; -==== asyncGeneratorSetAccessorIsError.ts (2 errors) ==== - const o23 = { - async * set x(value: number): void { - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1005: '(' expected. - } - }; -==== asyncGeneratorPropertyIsError.ts (1 errors) ==== - const o24 = { - async * x: 1; - ~ -!!! error TS1005: '(' expected. - }; - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum1.d.ts deleted file mode 100644 index 88410a71721c1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum1.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts] //// - -//// [parserEnum1.ts] - export enum SignatureFlags { - None = 0, - IsIndexer = 1, - IsStringIndexer = 1 << 1, - IsNumberIndexer = 1 << 2, - } - -/// [Declarations] //// - - - -//// [parserEnum1.d.ts] -export declare enum SignatureFlags { - None = 0, - IsIndexer = 1, - IsStringIndexer = 2, - IsNumberIndexer = 4 -} - -/// [Errors] //// - -parserEnum1.ts(4,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserEnum1.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== parserEnum1.ts (2 errors) ==== - export enum SignatureFlags { - None = 0, - IsIndexer = 1, - IsStringIndexer = 1 << 1, - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IsNumberIndexer = 1 << 2, - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum2.d.ts deleted file mode 100644 index 24e0476125a80..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnum2.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts] //// - -//// [parserEnum2.ts] - export enum SignatureFlags { - None = 0, - IsIndexer = 1, - IsStringIndexer = 1 << 1, - IsNumberIndexer = 1 << 2 - } - -/// [Declarations] //// - - - -//// [parserEnum2.d.ts] -export declare enum SignatureFlags { - None = 0, - IsIndexer = 1, - IsStringIndexer = 2, - IsNumberIndexer = 4 -} - -/// [Errors] //// - -parserEnum2.ts(4,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserEnum2.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== parserEnum2.ts (2 errors) ==== - export enum SignatureFlags { - None = 0, - IsIndexer = 1, - IsStringIndexer = 1 << 1, - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IsNumberIndexer = 1 << 2 - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnumDeclaration6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnumDeclaration6.d.ts deleted file mode 100644 index 24cb08b56a424..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEnumDeclaration6.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnumDeclaration6.ts] //// - -//// [parserEnumDeclaration6.ts] -enum E { - A = 1, - B, - C = 1 << 1, - D, -} - -/// [Declarations] //// - - - -//// [parserEnumDeclaration6.d.ts] -declare enum E { - A = 1, - B = 2, - C = 2, - D = 3 -} - -/// [Errors] //// - -parserEnumDeclaration6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== parserEnumDeclaration6.ts (1 errors) ==== - enum E { - A = 1, - B, - C = 1 << 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - D, - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction1.d.ts deleted file mode 100644 index 886d612a03723..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction1.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserEqualsGreaterThanAfterFunction1.ts] //// - -//// [parserEqualsGreaterThanAfterFunction1.ts] -function => - -/// [Declarations] //// - - - -//// [parserEqualsGreaterThanAfterFunction1.d.ts] -declare function (): invalid; - -/// [Errors] //// - -parserEqualsGreaterThanAfterFunction1.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserEqualsGreaterThanAfterFunction1.ts(1,10): error TS1003: Identifier expected. - - -==== parserEqualsGreaterThanAfterFunction1.ts (2 errors) ==== - function => - -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ -!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction2.d.ts deleted file mode 100644 index d2daf65e89f03..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserEqualsGreaterThanAfterFunction2.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserEqualsGreaterThanAfterFunction2.ts] //// - -//// [parserEqualsGreaterThanAfterFunction2.ts] -function (a: any => b: any; - -/// [Declarations] //// - - - -//// [parserEqualsGreaterThanAfterFunction2.d.ts] -declare function (a: any, b: any): invalid; - -/// [Errors] //// - -parserEqualsGreaterThanAfterFunction2.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserEqualsGreaterThanAfterFunction2.ts(1,10): error TS1003: Identifier expected. -parserEqualsGreaterThanAfterFunction2.ts(1,18): error TS1005: ',' expected. -parserEqualsGreaterThanAfterFunction2.ts(1,27): error TS1005: ',' expected. -parserEqualsGreaterThanAfterFunction2.ts(1,28): error TS1005: ')' expected. - - -==== parserEqualsGreaterThanAfterFunction2.ts (5 errors) ==== - function (a: any => b: any; - -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1003: Identifier expected. - ~~ -!!! error TS1005: ',' expected. - ~ -!!! error TS1005: ',' expected. - -!!! error TS1005: ')' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList1.d.ts deleted file mode 100644 index b203a430da73d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList1.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ParameterLists/parserErrorRecovery_ParameterList1.ts] //// - -//// [parserErrorRecovery_ParameterList1.ts] -function f(a: any { -}: {} - -/// [Declarations] //// - - - -//// [parserErrorRecovery_ParameterList1.d.ts] -declare function f(a: any, {}: {}): invalid; - -/// [Errors] //// - -parserErrorRecovery_ParameterList1.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. -parserErrorRecovery_ParameterList1.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserErrorRecovery_ParameterList1.ts(1,19): error TS1005: ',' expected. -parserErrorRecovery_ParameterList1.ts(2,6): error TS1005: ')' expected. - - -==== parserErrorRecovery_ParameterList1.ts (4 errors) ==== - function f(a: any { - ~ -!!! error TS2391: Function implementation is missing or not immediately following the declaration. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1005: ',' expected. - }: {} - -!!! error TS1005: ')' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList2.d.ts deleted file mode 100644 index a0c8b7c6e9c06..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserErrorRecovery_ParameterList2.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ParameterLists/parserErrorRecovery_ParameterList2.ts] //// - -//// [parserErrorRecovery_ParameterList2.ts] -function f(a: any, { -}: {} - -/// [Declarations] //// - - - -//// [parserErrorRecovery_ParameterList2.d.ts] -declare function f(a: any, {}: {}): invalid; - -/// [Errors] //// - -parserErrorRecovery_ParameterList2.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. -parserErrorRecovery_ParameterList2.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserErrorRecovery_ParameterList2.ts(2,6): error TS1005: ')' expected. - - -==== parserErrorRecovery_ParameterList2.ts (3 errors) ==== - function f(a: any, { - ~ -!!! error TS2391: Function implementation is missing or not immediately following the declaration. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - }: {} - -!!! error TS1005: ')' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserNoASIOnCallAfterFunctionExpression1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserNoASIOnCallAfterFunctionExpression1.d.ts deleted file mode 100644 index bac3f3587ef65..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserNoASIOnCallAfterFunctionExpression1.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/parserNoASIOnCallAfterFunctionExpression1.ts] //// - -//// [parserNoASIOnCallAfterFunctionExpression1.ts] -var x = function (): void { } -(window).foo; - - -/// [Declarations] //// - - - -//// [parserNoASIOnCallAfterFunctionExpression1.d.ts] -declare var x: invalid; - -/// [Errors] //// - -parserNoASIOnCallAfterFunctionExpression1.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserNoASIOnCallAfterFunctionExpression1.ts(2,2): error TS2554: Expected 0 arguments, but got 1. -parserNoASIOnCallAfterFunctionExpression1.ts(2,15): error TS2339: Property 'foo' does not exist on type 'void'. - - -==== parserNoASIOnCallAfterFunctionExpression1.ts (3 errors) ==== - var x = function (): void { } - ~~~~~~~~~~~~~~~~~~~~~ - (window).foo; - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~ -!!! error TS2554: Expected 0 arguments, but got 1. - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'void'. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource10.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource10.d.ts deleted file mode 100644 index b178ecda58658..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource10.d.ts +++ /dev/null @@ -1,2206 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts] //// - -//// [parserRealSource10.ts] -// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. -// See LICENSE.txt in the project root for complete license information. - -/// - -module TypeScript { - export enum TokenID { - // Keywords - Any, - Bool, - Break, - Case, - Catch, - Class, - Const, - Continue, - Debugger, - Default, - Delete, - Do, - Else, - Enum, - Export, - Extends, - Declare, - False, - Finally, - For, - Function, - Constructor, - Get, - If, - Implements, - Import, - In, - InstanceOf, - Interface, - Let, - Module, - New, - Number, - Null, - Package, - Private, - Protected, - Public, - Return, - Set, - Static, - String, - Super, - Switch, - This, - Throw, - True, - Try, - TypeOf, - Var, - Void, - With, - While, - Yield, - // Punctuation - Semicolon, - OpenParen, - CloseParen, - OpenBracket, - CloseBracket, - OpenBrace, - CloseBrace, - Comma, - Equals, - PlusEquals, - MinusEquals, - AsteriskEquals, - SlashEquals, - PercentEquals, - AmpersandEquals, - CaretEquals, - BarEquals, - LessThanLessThanEquals, - GreaterThanGreaterThanEquals, - GreaterThanGreaterThanGreaterThanEquals, - Question, - Colon, - BarBar, - AmpersandAmpersand, - Bar, - Caret, - And, - EqualsEquals, - ExclamationEquals, - EqualsEqualsEquals, - ExclamationEqualsEquals, - LessThan, - LessThanEquals, - GreaterThan, - GreaterThanEquals, - LessThanLessThan, - GreaterThanGreaterThan, - GreaterThanGreaterThanGreaterThan, - Plus, - Minus, - Asterisk, - Slash, - Percent, - Tilde, - Exclamation, - PlusPlus, - MinusMinus, - Dot, - DotDotDot, - Error, - EndOfFile, - EqualsGreaterThan, - Identifier, - StringLiteral, - RegularExpressionLiteral, - NumberLiteral, - Whitespace, - Comment, - Lim, - LimFixed = EqualsGreaterThan, - LimKeyword = Yield, - } - - export var tokenTable: any = new TokenInfo[]; - export var nodeTypeTable: any = new string[]; - export var nodeTypeToTokTable: any = new number[]; - export var noRegexTable: any = new boolean[]; - - noRegexTable[TokenID.Identifier] = true; - noRegexTable[TokenID.StringLiteral] = true; - noRegexTable[TokenID.NumberLiteral] = true; - noRegexTable[TokenID.RegularExpressionLiteral] = true; - noRegexTable[TokenID.This] = true; - noRegexTable[TokenID.PlusPlus] = true; - noRegexTable[TokenID.MinusMinus] = true; - noRegexTable[TokenID.CloseParen] = true; - noRegexTable[TokenID.CloseBracket] = true; - noRegexTable[TokenID.CloseBrace] = true; - noRegexTable[TokenID.True] = true; - noRegexTable[TokenID.False] = true; - - export enum OperatorPrecedence { - None, - Comma, - Assignment, - Conditional, - LogicalOr, - LogicalAnd, - BitwiseOr, - BitwiseExclusiveOr, - BitwiseAnd, - Equality, - Relational, - Shift, - Additive, - Multiplicative, - Unary, - Lim - } - - export enum Reservation { - None = 0, - Javascript = 1, - JavascriptFuture = 2, - TypeScript = 4, - JavascriptFutureStrict = 8, - TypeScriptAndJS = Javascript | TypeScript, - TypeScriptAndJSFuture = JavascriptFuture | TypeScript, - TypeScriptAndJSFutureStrict = JavascriptFutureStrict | TypeScript, - } - - export class TokenInfo { - constructor (public tokenId: TokenID, public reservation: Reservation, - public binopPrecedence: number, public binopNodeType: number, - public unopPrecedence: number, public unopNodeType: number, - public text: string, public ers: ErrorRecoverySet) { } - } - - function setTokenInfo(tokenId: TokenID, reservation: number, binopPrecedence: number, - binopNodeType: number, unopPrecedence: number, unopNodeType: number, - text: string, ers: ErrorRecoverySet) { - if (tokenId !== undefined) { - tokenTable[tokenId] = new TokenInfo(tokenId, reservation, binopPrecedence, - binopNodeType, unopPrecedence, unopNodeType, text, ers); - if (binopNodeType != NodeType.None) { - nodeTypeTable[binopNodeType] = text; - nodeTypeToTokTable[binopNodeType] = tokenId; - } - if (unopNodeType != NodeType.None) { - nodeTypeTable[unopNodeType] = text; - } - } - } - - setTokenInfo(TokenID.Any, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "any", ErrorRecoverySet.PrimType); - setTokenInfo(TokenID.Bool, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "boolean", ErrorRecoverySet.PrimType); - setTokenInfo(TokenID.Break, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "break", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.Case, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "case", ErrorRecoverySet.SCase); - setTokenInfo(TokenID.Catch, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "catch", ErrorRecoverySet.Catch); - setTokenInfo(TokenID.Class, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "class", ErrorRecoverySet.TypeScriptS); - setTokenInfo(TokenID.Const, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "const", ErrorRecoverySet.Var); - setTokenInfo(TokenID.Continue, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "continue", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.Debugger, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.Debugger, "debugger", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.Default, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "default", ErrorRecoverySet.SCase); - setTokenInfo(TokenID.Delete, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Delete, "delete", ErrorRecoverySet.Prefix); - setTokenInfo(TokenID.Do, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "do", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.Else, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "else", ErrorRecoverySet.Else); - setTokenInfo(TokenID.Enum, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "enum", ErrorRecoverySet.TypeScriptS); - setTokenInfo(TokenID.Export, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "export", ErrorRecoverySet.TypeScriptS); - setTokenInfo(TokenID.Extends, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "extends", ErrorRecoverySet.None); - setTokenInfo(TokenID.Declare, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "declare", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.False, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "false", ErrorRecoverySet.RLit); - setTokenInfo(TokenID.Finally, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "finally", ErrorRecoverySet.Catch); - setTokenInfo(TokenID.For, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "for", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.Function, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "function", ErrorRecoverySet.Func); - setTokenInfo(TokenID.Constructor, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "constructor", ErrorRecoverySet.Func); - setTokenInfo(TokenID.Get, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "get", ErrorRecoverySet.Func); - setTokenInfo(TokenID.Set, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "set", ErrorRecoverySet.Func); - setTokenInfo(TokenID.If, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "if", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.Implements, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "implements", ErrorRecoverySet.None); - setTokenInfo(TokenID.Import, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "import", ErrorRecoverySet.TypeScriptS); - setTokenInfo(TokenID.In, Reservation.TypeScriptAndJS, OperatorPrecedence.Relational, NodeType.In, OperatorPrecedence.None, NodeType.None, "in", ErrorRecoverySet.None); - setTokenInfo(TokenID.InstanceOf, Reservation.TypeScriptAndJS, OperatorPrecedence.Relational, NodeType.InstOf, OperatorPrecedence.None, NodeType.None, "instanceof", ErrorRecoverySet.BinOp); - setTokenInfo(TokenID.Interface, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "interface", ErrorRecoverySet.TypeScriptS); - setTokenInfo(TokenID.Let, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "let", ErrorRecoverySet.None); - setTokenInfo(TokenID.Module, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "module", ErrorRecoverySet.TypeScriptS); - setTokenInfo(TokenID.New, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "new", ErrorRecoverySet.PreOp); - setTokenInfo(TokenID.Number, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "number", ErrorRecoverySet.PrimType); - setTokenInfo(TokenID.Null, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "null", ErrorRecoverySet.RLit); - setTokenInfo(TokenID.Package, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "package", ErrorRecoverySet.None); - setTokenInfo(TokenID.Private, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "private", ErrorRecoverySet.TypeScriptS); - setTokenInfo(TokenID.Protected, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "protected", ErrorRecoverySet.None); - setTokenInfo(TokenID.Public, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "public", ErrorRecoverySet.TypeScriptS); - setTokenInfo(TokenID.Return, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "return", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.Static, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "static", ErrorRecoverySet.None); - setTokenInfo(TokenID.String, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "string", ErrorRecoverySet.PrimType); - setTokenInfo(TokenID.Super, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "super", ErrorRecoverySet.RLit); - setTokenInfo(TokenID.Switch, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "switch", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.This, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "this", ErrorRecoverySet.RLit); - setTokenInfo(TokenID.Throw, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "throw", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.True, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "true", ErrorRecoverySet.RLit); - setTokenInfo(TokenID.Try, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "try", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.TypeOf, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Typeof, "typeof", ErrorRecoverySet.Prefix); - setTokenInfo(TokenID.Var, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "var", ErrorRecoverySet.Var); - setTokenInfo(TokenID.Void, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Void, "void", ErrorRecoverySet.Prefix); - setTokenInfo(TokenID.With, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.With, "with", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.While, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "while", ErrorRecoverySet.While); - setTokenInfo(TokenID.Yield, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "yield", ErrorRecoverySet.None); - - setTokenInfo(TokenID.Identifier, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "identifier", ErrorRecoverySet.ID); - setTokenInfo(TokenID.NumberLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "numberLiteral", ErrorRecoverySet.Literal); - setTokenInfo(TokenID.RegularExpressionLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "regex", ErrorRecoverySet.RegExp); - setTokenInfo(TokenID.StringLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "qstring", ErrorRecoverySet.Literal); - - // Non-operator non-identifier tokens - setTokenInfo(TokenID.Semicolon, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ";", ErrorRecoverySet.SColon); // ; - setTokenInfo(TokenID.CloseParen, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ")", ErrorRecoverySet.RParen); // ) - setTokenInfo(TokenID.CloseBracket, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "]", ErrorRecoverySet.RBrack); // ] - setTokenInfo(TokenID.OpenBrace, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "{", ErrorRecoverySet.LCurly); // { - setTokenInfo(TokenID.CloseBrace, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "}", ErrorRecoverySet.RCurly); // } - setTokenInfo(TokenID.DotDotDot, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "...", ErrorRecoverySet.None); // ... - - // Operator non-identifier tokens - setTokenInfo(TokenID.Comma, Reservation.None, OperatorPrecedence.Comma, NodeType.Comma, OperatorPrecedence.None, NodeType.None, ",", ErrorRecoverySet.Comma); // , - setTokenInfo(TokenID.Equals, Reservation.None, OperatorPrecedence.Assignment, NodeType.Asg, OperatorPrecedence.None, NodeType.None, "=", ErrorRecoverySet.Asg); // = - setTokenInfo(TokenID.PlusEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgAdd, OperatorPrecedence.None, NodeType.None, "+=", ErrorRecoverySet.BinOp); // += - setTokenInfo(TokenID.MinusEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgSub, OperatorPrecedence.None, NodeType.None, "-=", ErrorRecoverySet.BinOp); // -= - setTokenInfo(TokenID.AsteriskEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgMul, OperatorPrecedence.None, NodeType.None, "*=", ErrorRecoverySet.BinOp); // *= - - setTokenInfo(TokenID.SlashEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgDiv, OperatorPrecedence.None, NodeType.None, "/=", ErrorRecoverySet.BinOp); // /= - setTokenInfo(TokenID.PercentEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgMod, OperatorPrecedence.None, NodeType.None, "%=", ErrorRecoverySet.BinOp); // %= - setTokenInfo(TokenID.AmpersandEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgAnd, OperatorPrecedence.None, NodeType.None, "&=", ErrorRecoverySet.BinOp); // &= - setTokenInfo(TokenID.CaretEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgXor, OperatorPrecedence.None, NodeType.None, "^=", ErrorRecoverySet.BinOp); // ^= - setTokenInfo(TokenID.BarEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgOr, OperatorPrecedence.None, NodeType.None, "|=", ErrorRecoverySet.BinOp); // |= - setTokenInfo(TokenID.LessThanLessThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgLsh, OperatorPrecedence.None, NodeType.None, "<<=", ErrorRecoverySet.BinOp); // <<= - setTokenInfo(TokenID.GreaterThanGreaterThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgRsh, OperatorPrecedence.None, NodeType.None, ">>=", ErrorRecoverySet.BinOp); // >>= - setTokenInfo(TokenID.GreaterThanGreaterThanGreaterThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgRs2, OperatorPrecedence.None, NodeType.None, ">>>=", ErrorRecoverySet.BinOp); // >>>= - setTokenInfo(TokenID.Question, Reservation.None, OperatorPrecedence.Conditional, NodeType.ConditionalExpression, OperatorPrecedence.None, NodeType.None, "?", ErrorRecoverySet.BinOp); // ? - setTokenInfo(TokenID.Colon, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ":", ErrorRecoverySet.Colon); // : - setTokenInfo(TokenID.BarBar, Reservation.None, OperatorPrecedence.LogicalOr, NodeType.LogOr, OperatorPrecedence.None, NodeType.None, "||", ErrorRecoverySet.BinOp); // || - setTokenInfo(TokenID.AmpersandAmpersand, Reservation.None, OperatorPrecedence.LogicalAnd, NodeType.LogAnd, OperatorPrecedence.None, NodeType.None, "&&", ErrorRecoverySet.BinOp); // && - setTokenInfo(TokenID.Bar, Reservation.None, OperatorPrecedence.BitwiseOr, NodeType.Or, OperatorPrecedence.None, NodeType.None, "|", ErrorRecoverySet.BinOp); // | - setTokenInfo(TokenID.Caret, Reservation.None, OperatorPrecedence.BitwiseExclusiveOr, NodeType.Xor, OperatorPrecedence.None, NodeType.None, "^", ErrorRecoverySet.BinOp); // ^ - setTokenInfo(TokenID.And, Reservation.None, OperatorPrecedence.BitwiseAnd, NodeType.And, OperatorPrecedence.None, NodeType.None, "&", ErrorRecoverySet.BinOp); // & - setTokenInfo(TokenID.EqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Eq, OperatorPrecedence.None, NodeType.None, "==", ErrorRecoverySet.BinOp); // == - setTokenInfo(TokenID.ExclamationEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Ne, OperatorPrecedence.None, NodeType.None, "!=", ErrorRecoverySet.BinOp); // != - setTokenInfo(TokenID.EqualsEqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Eqv, OperatorPrecedence.None, NodeType.None, "===", ErrorRecoverySet.BinOp); // === - setTokenInfo(TokenID.ExclamationEqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.NEqv, OperatorPrecedence.None, NodeType.None, "!==", ErrorRecoverySet.BinOp); // !== - setTokenInfo(TokenID.LessThan, Reservation.None, OperatorPrecedence.Relational, NodeType.Lt, OperatorPrecedence.None, NodeType.None, "<", ErrorRecoverySet.BinOp); // < - setTokenInfo(TokenID.LessThanEquals, Reservation.None, OperatorPrecedence.Relational, NodeType.Le, OperatorPrecedence.None, NodeType.None, "<=", ErrorRecoverySet.BinOp); // <= - setTokenInfo(TokenID.GreaterThan, Reservation.None, OperatorPrecedence.Relational, NodeType.Gt, OperatorPrecedence.None, NodeType.None, ">", ErrorRecoverySet.BinOp); // > - setTokenInfo(TokenID.GreaterThanEquals, Reservation.None, OperatorPrecedence.Relational, NodeType.Ge, OperatorPrecedence.None, NodeType.None, ">=", ErrorRecoverySet.BinOp); // >= - setTokenInfo(TokenID.LessThanLessThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Lsh, OperatorPrecedence.None, NodeType.None, "<<", ErrorRecoverySet.BinOp); // << - setTokenInfo(TokenID.GreaterThanGreaterThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Rsh, OperatorPrecedence.None, NodeType.None, ">>", ErrorRecoverySet.BinOp); // >> - setTokenInfo(TokenID.GreaterThanGreaterThanGreaterThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Rs2, OperatorPrecedence.None, NodeType.None, ">>>", ErrorRecoverySet.BinOp); // >>> - setTokenInfo(TokenID.Plus, Reservation.None, OperatorPrecedence.Additive, NodeType.Add, OperatorPrecedence.Unary, NodeType.Pos, "+", ErrorRecoverySet.AddOp); // + - setTokenInfo(TokenID.Minus, Reservation.None, OperatorPrecedence.Additive, NodeType.Sub, OperatorPrecedence.Unary, NodeType.Neg, "-", ErrorRecoverySet.AddOp); // - - setTokenInfo(TokenID.Asterisk, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Mul, OperatorPrecedence.None, NodeType.None, "*", ErrorRecoverySet.BinOp); // * - setTokenInfo(TokenID.Slash, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Div, OperatorPrecedence.None, NodeType.None, "/", ErrorRecoverySet.BinOp); // / - setTokenInfo(TokenID.Percent, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Mod, OperatorPrecedence.None, NodeType.None, "%", ErrorRecoverySet.BinOp); // % - setTokenInfo(TokenID.Tilde, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Not, "~", ErrorRecoverySet.PreOp); // ~ - setTokenInfo(TokenID.Exclamation, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.LogNot, "!", ErrorRecoverySet.PreOp); // ! - setTokenInfo(TokenID.PlusPlus, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.IncPre, "++", ErrorRecoverySet.PreOp); // ++ - setTokenInfo(TokenID.MinusMinus, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.DecPre, "--", ErrorRecoverySet.PreOp); // -- - setTokenInfo(TokenID.OpenParen, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "(", ErrorRecoverySet.LParen); // ( - setTokenInfo(TokenID.OpenBracket, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "[", ErrorRecoverySet.LBrack); // [ - setTokenInfo(TokenID.Dot, Reservation.None, OperatorPrecedence.Unary, NodeType.None, OperatorPrecedence.None, NodeType.None, ".", ErrorRecoverySet.Dot); // . - setTokenInfo(TokenID.EndOfFile, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "", ErrorRecoverySet.EOF); // EOF - setTokenInfo(TokenID.EqualsGreaterThan, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "=>", ErrorRecoverySet.None); // => - - export function lookupToken(tokenId: TokenID): TokenInfo { - return tokenTable[tokenId]; - } - - export enum TokenClass { - Punctuation, - Keyword, - Operator, - Comment, - Whitespace, - Identifier, - Literal, - } - - export class SavedToken { - constructor (public tok: Token, public minChar: number, public limChar: number) { } - } - - export class Token { - constructor (public tokenId: TokenID) { - } - - public toString(): string { - return "token: " + this.tokenId + " " + this.getText() + " (" + (TokenID)._map[this.tokenId] + ")"; - } - - public print(line: number, outfile: any): void { - outfile.WriteLine(this.toString() + ",on line" + line); - } - - public getText(): string { - return tokenTable[this.tokenId].text; - } - - public classification(): TokenClass { - if (this.tokenId <= TokenID.LimKeyword) { - return TokenClass.Keyword; - } - else { - var tokenInfo = lookupToken(this.tokenId); - if (tokenInfo != undefined) { - if ((tokenInfo.unopNodeType != NodeType.None) || - (tokenInfo.binopNodeType != NodeType.None)) { - return TokenClass.Operator; - } - } - } - - return TokenClass.Punctuation; - } - } - - export class NumberLiteralToken extends Token { - constructor (public value: number, public hasEmptyFraction?: boolean) { - super(TokenID.NumberLiteral); - } - - public getText(): string { - return this.hasEmptyFraction ? this.value.toString() + ".0" : this.value.toString(); - } - - public classification(): TokenClass { - return TokenClass.Literal; - } - } - - export class StringLiteralToken extends Token { - constructor (public value: string) { - super(TokenID.StringLiteral); - } - - public getText(): string { - return this.value; - } - - public classification(): TokenClass { - return TokenClass.Literal; - } - } - - export class IdentifierToken extends Token { - constructor (public value: string, public hasEscapeSequence : boolean) { - super(TokenID.Identifier); - } - public getText(): string { - return this.value; - } - public classification(): TokenClass { - return TokenClass.Identifier; - } - } - - export class WhitespaceToken extends Token { - constructor (tokenId: TokenID, public value: string) { - super(tokenId); - } - - public getText(): string { - return this.value; - } - - public classification(): TokenClass { - return TokenClass.Whitespace; - } - } - - export class CommentToken extends Token { - constructor (tokenID: TokenID, public value: string, public isBlock: boolean, public startPos: number, public line: number, public endsLine: boolean) { - super(tokenID); - } - - public getText(): string { - return this.value; - } - - public classification(): TokenClass { - return TokenClass.Comment; - } - } - - export class RegularExpressionLiteralToken extends Token { - constructor(public regex: any) { - super(TokenID.RegularExpressionLiteral); - } - - public getText(): string { - return this.regex.toString(); - } - - public classification(): TokenClass { - return TokenClass.Literal; - } - } - - // TODO: new with length TokenID.LimFixed - export var staticTokens: any = new Token[]; - export function initializeStaticTokens(): void { - for (var i = 0; i <= TokenID.LimFixed; i++) { - staticTokens[i] = new Token(i); - } - } -} - -/// [Declarations] //// - - - -//// [parserRealSource10.d.ts] -declare namespace TypeScript { - enum TokenID { - Any = 0, - Bool = 1, - Break = 2, - Case = 3, - Catch = 4, - Class = 5, - Const = 6, - Continue = 7, - Debugger = 8, - Default = 9, - Delete = 10, - Do = 11, - Else = 12, - Enum = 13, - Export = 14, - Extends = 15, - Declare = 16, - False = 17, - Finally = 18, - For = 19, - Function = 20, - Constructor = 21, - Get = 22, - If = 23, - Implements = 24, - Import = 25, - In = 26, - InstanceOf = 27, - Interface = 28, - Let = 29, - Module = 30, - New = 31, - Number = 32, - Null = 33, - Package = 34, - Private = 35, - Protected = 36, - Public = 37, - Return = 38, - Set = 39, - Static = 40, - String = 41, - Super = 42, - Switch = 43, - This = 44, - Throw = 45, - True = 46, - Try = 47, - TypeOf = 48, - Var = 49, - Void = 50, - With = 51, - While = 52, - Yield = 53, - Semicolon = 54, - OpenParen = 55, - CloseParen = 56, - OpenBracket = 57, - CloseBracket = 58, - OpenBrace = 59, - CloseBrace = 60, - Comma = 61, - Equals = 62, - PlusEquals = 63, - MinusEquals = 64, - AsteriskEquals = 65, - SlashEquals = 66, - PercentEquals = 67, - AmpersandEquals = 68, - CaretEquals = 69, - BarEquals = 70, - LessThanLessThanEquals = 71, - GreaterThanGreaterThanEquals = 72, - GreaterThanGreaterThanGreaterThanEquals = 73, - Question = 74, - Colon = 75, - BarBar = 76, - AmpersandAmpersand = 77, - Bar = 78, - Caret = 79, - And = 80, - EqualsEquals = 81, - ExclamationEquals = 82, - EqualsEqualsEquals = 83, - ExclamationEqualsEquals = 84, - LessThan = 85, - LessThanEquals = 86, - GreaterThan = 87, - GreaterThanEquals = 88, - LessThanLessThan = 89, - GreaterThanGreaterThan = 90, - GreaterThanGreaterThanGreaterThan = 91, - Plus = 92, - Minus = 93, - Asterisk = 94, - Slash = 95, - Percent = 96, - Tilde = 97, - Exclamation = 98, - PlusPlus = 99, - MinusMinus = 100, - Dot = 101, - DotDotDot = 102, - Error = 103, - EndOfFile = 104, - EqualsGreaterThan = 105, - Identifier = 106, - StringLiteral = 107, - RegularExpressionLiteral = 108, - NumberLiteral = 109, - Whitespace = 110, - Comment = 111, - Lim = 112, - LimFixed = 105, - LimKeyword = 53 - } - var tokenTable: any; - var nodeTypeTable: any; - var nodeTypeToTokTable: any; - var noRegexTable: any; - enum OperatorPrecedence { - None = 0, - Comma = 1, - Assignment = 2, - Conditional = 3, - LogicalOr = 4, - LogicalAnd = 5, - BitwiseOr = 6, - BitwiseExclusiveOr = 7, - BitwiseAnd = 8, - Equality = 9, - Relational = 10, - Shift = 11, - Additive = 12, - Multiplicative = 13, - Unary = 14, - Lim = 15 - } - enum Reservation { - None = 0, - Javascript = 1, - JavascriptFuture = 2, - TypeScript = 4, - JavascriptFutureStrict = 8, - TypeScriptAndJS = 5, - TypeScriptAndJSFuture = 6, - TypeScriptAndJSFutureStrict = 12 - } - class TokenInfo { - tokenId: TokenID; - reservation: Reservation; - binopPrecedence: number; - binopNodeType: number; - unopPrecedence: number; - unopNodeType: number; - text: string; - ers: ErrorRecoverySet; - constructor(tokenId: TokenID, reservation: Reservation, binopPrecedence: number, binopNodeType: number, unopPrecedence: number, unopNodeType: number, text: string, ers: ErrorRecoverySet); - } - function lookupToken(tokenId: TokenID): TokenInfo; - enum TokenClass { - Punctuation = 0, - Keyword = 1, - Operator = 2, - Comment = 3, - Whitespace = 4, - Identifier = 5, - Literal = 6 - } - class SavedToken { - tok: Token; - minChar: number; - limChar: number; - constructor(tok: Token, minChar: number, limChar: number); - } - class Token { - tokenId: TokenID; - constructor(tokenId: TokenID); - toString(): string; - print(line: number, outfile: any): void; - getText(): string; - classification(): TokenClass; - } - class NumberLiteralToken extends Token { - value: number; - hasEmptyFraction?: boolean; - constructor(value: number, hasEmptyFraction?: boolean); - getText(): string; - classification(): TokenClass; - } - class StringLiteralToken extends Token { - value: string; - constructor(value: string); - getText(): string; - classification(): TokenClass; - } - class IdentifierToken extends Token { - value: string; - hasEscapeSequence: boolean; - constructor(value: string, hasEscapeSequence: boolean); - getText(): string; - classification(): TokenClass; - } - class WhitespaceToken extends Token { - value: string; - constructor(tokenId: TokenID, value: string); - getText(): string; - classification(): TokenClass; - } - class CommentToken extends Token { - value: string; - isBlock: boolean; - startPos: number; - line: number; - endsLine: boolean; - constructor(tokenID: TokenID, value: string, isBlock: boolean, startPos: number, line: number, endsLine: boolean); - getText(): string; - classification(): TokenClass; - } - class RegularExpressionLiteralToken extends Token { - regex: any; - constructor(regex: any); - getText(): string; - classification(): TokenClass; - } - var staticTokens: any; - function initializeStaticTokens(): void; -} - -/// [Errors] //// - -parserRealSource10.ts(4,21): error TS6053: File 'typescript.ts' not found. -parserRealSource10.ts(4,21): error TS9010: Reference directives are not supported in isolated declaration mode. -parserRealSource10.ts(123,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource10.ts(124,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource10.ts(127,38): error TS2449: Class 'TokenInfo' used before its declaration. -parserRealSource10.ts(127,48): error TS1011: An element access expression should take an argument. -parserRealSource10.ts(128,41): error TS2693: 'string' only refers to a type, but is being used as a value here. -parserRealSource10.ts(128,48): error TS1011: An element access expression should take an argument. -parserRealSource10.ts(129,46): error TS2693: 'number' only refers to a type, but is being used as a value here. -parserRealSource10.ts(129,53): error TS1011: An element access expression should take an argument. -parserRealSource10.ts(130,40): error TS2693: 'boolean' only refers to a type, but is being used as a value here. -parserRealSource10.ts(130,48): error TS1011: An element access expression should take an argument. -parserRealSource10.ts(170,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource10.ts(171,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource10.ts(172,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource10.ts(179,54): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(179,54): error TS4063: Parameter 'ers' of constructor from exported class has or is using private name 'ErrorRecoverySet'. -parserRealSource10.ts(184,28): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(188,34): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(192,33): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(198,80): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(198,120): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(198,142): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(199,81): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(199,121): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(199,147): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(200,87): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(200,127): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(200,151): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(201,86): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(201,126): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(201,149): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(202,87): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(202,127): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(202,151): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(203,93): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(203,133): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(203,157): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(204,93): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(204,133): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(204,157): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(205,90): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(205,130): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(205,157): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(206,90): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(206,130): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(206,161): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(207,89): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(207,129): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(207,155): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(208,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(208,129): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(208,156): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(209,84): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(209,124): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(209,145): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(210,86): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(210,126): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(210,149): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(211,92): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(211,132): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(211,155): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(212,94): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(212,134): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(212,159): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(213,95): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(213,135): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(213,161): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(214,84): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(214,124): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(214,150): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(215,87): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(215,127): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(215,151): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(216,89): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(216,129): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(216,155): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(217,85): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(217,125): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(217,147): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(218,90): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(218,130): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(218,157): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(219,105): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(219,145): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(219,175): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(220,80): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(220,120): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(220,142): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(221,80): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(221,120): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(221,142): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(222,84): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(222,124): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(222,145): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(223,104): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(223,144): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(223,173): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(224,94): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(224,134): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(224,159): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(225,90): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(225,128): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(225,149): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(226,98): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(226,140): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(226,169): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(227,103): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(227,143): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(227,171): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(228,92): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(228,132): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(228,154): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(229,83): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(229,123): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(229,148): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(230,85): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(230,125): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(230,147): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(231,83): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(231,123): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(231,148): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(232,86): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(232,126): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(232,149): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(233,96): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(233,136): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(233,162): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(234,101): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(234,141): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(234,167): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(235,98): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(235,138): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(235,166): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(236,100): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(236,140): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(236,165): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(237,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(237,128): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(237,153): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(238,100): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(238,140): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(238,165): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(239,83): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(239,123): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(239,148): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(240,93): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(240,133): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(240,157): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(241,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(241,128): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(241,153): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(242,86): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(242,126): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(242,149): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(243,87): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(243,127): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(243,151): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(244,86): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(244,126): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(244,149): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(245,85): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(245,125): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(245,147): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(246,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(246,129): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(246,156): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(247,85): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(247,125): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(247,147): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(248,86): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(248,127): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(248,150): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(249,86): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(249,126): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(249,149): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(250,87): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(250,127): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(250,151): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(251,94): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(251,134): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(251,158): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(253,81): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(253,121): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(253,150): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(254,84): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(254,124): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(254,156): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(255,95): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(255,135): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(255,159): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(256,84): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(256,124): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(256,150): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(259,80): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(259,120): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(259,140): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(260,81): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(260,121): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(260,141): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(261,83): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(261,123): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(261,143): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(262,80): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(262,120): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(262,140): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(263,81): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(263,121): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(263,141): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(264,80): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(264,120): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(264,142): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(267,77): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(267,118): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(267,138): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(268,83): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(268,122): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(268,142): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(269,87): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(269,129): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(269,150): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(270,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(270,130): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(270,151): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(271,91): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(271,133): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(271,154): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(273,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(273,130): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(273,151): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(274,90): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(274,132): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(274,153): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(275,92): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(275,134): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(275,155): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(276,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(276,130): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(276,151): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(277,86): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(277,127): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(277,148): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(278,99): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(278,141): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(278,163): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(279,105): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(279,147): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(279,169): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(280,116): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(280,158): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(280,181): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(281,86): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(281,143): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(281,163): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(282,76): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(282,116): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(282,136): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(283,82): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(283,123): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(283,144): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(284,95): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(284,137): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(284,158): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(285,79): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(285,117): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(285,137): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(286,90): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(286,129): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(286,149): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(287,80): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(287,119): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(287,139): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(288,87): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(288,125): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(288,146): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(289,92): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(289,130): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(289,151): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(290,93): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(290,132): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(290,154): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(291,98): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(291,138): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(291,160): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(292,85): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(292,123): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(292,143): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(293,91): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(293,129): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(293,150): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(294,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(294,126): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(294,146): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(295,94): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(295,132): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(295,153): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(296,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(296,127): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(296,148): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(297,94): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(297,133): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(297,154): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(298,105): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(298,144): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(298,166): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(299,79): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(299,119): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(299,138): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(300,80): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(300,120): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(300,139): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(301,89): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(301,128): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(301,148): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(302,86): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(302,125): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(302,145): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(303,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(303,127): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(303,147): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(304,76): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(304,117): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(304,136): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(305,82): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(305,123): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(305,145): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(306,79): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(306,120): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(306,143): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(307,81): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(307,122): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(307,145): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(308,80): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(308,120): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(308,140): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(309,82): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(309,122): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(309,142): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(310,75): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(310,115): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(310,135): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(311,80): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(311,120): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(311,144): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(312,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(312,128): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(312,149): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(355,52): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(356,53): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(449,46): error TS1011: An element access expression should take an argument. - - -==== parserRealSource10.ts (350 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// - ~~~~~~~~~~~~~ -!!! error TS6053: File 'typescript.ts' not found. - ~~~~~~~~~~~~~ -!!! error TS9010: Reference directives are not supported in isolated declaration mode. - - module TypeScript { - export enum TokenID { - // Keywords - Any, - Bool, - Break, - Case, - Catch, - Class, - Const, - Continue, - Debugger, - Default, - Delete, - Do, - Else, - Enum, - Export, - Extends, - Declare, - False, - Finally, - For, - Function, - Constructor, - Get, - If, - Implements, - Import, - In, - InstanceOf, - Interface, - Let, - Module, - New, - Number, - Null, - Package, - Private, - Protected, - Public, - Return, - Set, - Static, - String, - Super, - Switch, - This, - Throw, - True, - Try, - TypeOf, - Var, - Void, - With, - While, - Yield, - // Punctuation - Semicolon, - OpenParen, - CloseParen, - OpenBracket, - CloseBracket, - OpenBrace, - CloseBrace, - Comma, - Equals, - PlusEquals, - MinusEquals, - AsteriskEquals, - SlashEquals, - PercentEquals, - AmpersandEquals, - CaretEquals, - BarEquals, - LessThanLessThanEquals, - GreaterThanGreaterThanEquals, - GreaterThanGreaterThanGreaterThanEquals, - Question, - Colon, - BarBar, - AmpersandAmpersand, - Bar, - Caret, - And, - EqualsEquals, - ExclamationEquals, - EqualsEqualsEquals, - ExclamationEqualsEquals, - LessThan, - LessThanEquals, - GreaterThan, - GreaterThanEquals, - LessThanLessThan, - GreaterThanGreaterThan, - GreaterThanGreaterThanGreaterThan, - Plus, - Minus, - Asterisk, - Slash, - Percent, - Tilde, - Exclamation, - PlusPlus, - MinusMinus, - Dot, - DotDotDot, - Error, - EndOfFile, - EqualsGreaterThan, - Identifier, - StringLiteral, - RegularExpressionLiteral, - NumberLiteral, - Whitespace, - Comment, - Lim, - LimFixed = EqualsGreaterThan, - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - LimKeyword = Yield, - ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export var tokenTable: any = new TokenInfo[]; - ~~~~~~~~~ -!!! error TS2449: Class 'TokenInfo' used before its declaration. -!!! related TS2728 parserRealSource10.ts:175:18: 'TokenInfo' is declared here. - -!!! error TS1011: An element access expression should take an argument. - export var nodeTypeTable: any = new string[]; - ~~~~~~ -!!! error TS2693: 'string' only refers to a type, but is being used as a value here. - -!!! error TS1011: An element access expression should take an argument. - export var nodeTypeToTokTable: any = new number[]; - ~~~~~~ -!!! error TS2693: 'number' only refers to a type, but is being used as a value here. - -!!! error TS1011: An element access expression should take an argument. - export var noRegexTable: any = new boolean[]; - ~~~~~~~ -!!! error TS2693: 'boolean' only refers to a type, but is being used as a value here. - -!!! error TS1011: An element access expression should take an argument. - - noRegexTable[TokenID.Identifier] = true; - noRegexTable[TokenID.StringLiteral] = true; - noRegexTable[TokenID.NumberLiteral] = true; - noRegexTable[TokenID.RegularExpressionLiteral] = true; - noRegexTable[TokenID.This] = true; - noRegexTable[TokenID.PlusPlus] = true; - noRegexTable[TokenID.MinusMinus] = true; - noRegexTable[TokenID.CloseParen] = true; - noRegexTable[TokenID.CloseBracket] = true; - noRegexTable[TokenID.CloseBrace] = true; - noRegexTable[TokenID.True] = true; - noRegexTable[TokenID.False] = true; - - export enum OperatorPrecedence { - None, - Comma, - Assignment, - Conditional, - LogicalOr, - LogicalAnd, - BitwiseOr, - BitwiseExclusiveOr, - BitwiseAnd, - Equality, - Relational, - Shift, - Additive, - Multiplicative, - Unary, - Lim - } - - export enum Reservation { - None = 0, - Javascript = 1, - JavascriptFuture = 2, - TypeScript = 4, - JavascriptFutureStrict = 8, - TypeScriptAndJS = Javascript | TypeScript, - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - TypeScriptAndJSFuture = JavascriptFuture | TypeScript, - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - TypeScriptAndJSFutureStrict = JavascriptFutureStrict | TypeScript, - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export class TokenInfo { - constructor (public tokenId: TokenID, public reservation: Reservation, - public binopPrecedence: number, public binopNodeType: number, - public unopPrecedence: number, public unopNodeType: number, - public text: string, public ers: ErrorRecoverySet) { } - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - ~~~~~~~~~~~~~~~~ -!!! error TS4063: Parameter 'ers' of constructor from exported class has or is using private name 'ErrorRecoverySet'. - } - - function setTokenInfo(tokenId: TokenID, reservation: number, binopPrecedence: number, - binopNodeType: number, unopPrecedence: number, unopNodeType: number, - text: string, ers: ErrorRecoverySet) { - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - if (tokenId !== undefined) { - tokenTable[tokenId] = new TokenInfo(tokenId, reservation, binopPrecedence, - binopNodeType, unopPrecedence, unopNodeType, text, ers); - if (binopNodeType != NodeType.None) { - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - nodeTypeTable[binopNodeType] = text; - nodeTypeToTokTable[binopNodeType] = tokenId; - } - if (unopNodeType != NodeType.None) { - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - nodeTypeTable[unopNodeType] = text; - } - } - } - - setTokenInfo(TokenID.Any, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "any", ErrorRecoverySet.PrimType); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Bool, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "boolean", ErrorRecoverySet.PrimType); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Break, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "break", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Case, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "case", ErrorRecoverySet.SCase); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Catch, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "catch", ErrorRecoverySet.Catch); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Class, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "class", ErrorRecoverySet.TypeScriptS); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Const, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "const", ErrorRecoverySet.Var); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Continue, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "continue", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Debugger, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.Debugger, "debugger", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Default, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "default", ErrorRecoverySet.SCase); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Delete, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Delete, "delete", ErrorRecoverySet.Prefix); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Do, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "do", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Else, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "else", ErrorRecoverySet.Else); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Enum, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "enum", ErrorRecoverySet.TypeScriptS); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Export, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "export", ErrorRecoverySet.TypeScriptS); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Extends, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "extends", ErrorRecoverySet.None); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Declare, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "declare", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.False, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "false", ErrorRecoverySet.RLit); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Finally, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "finally", ErrorRecoverySet.Catch); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.For, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "for", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Function, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "function", ErrorRecoverySet.Func); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Constructor, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "constructor", ErrorRecoverySet.Func); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Get, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "get", ErrorRecoverySet.Func); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Set, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "set", ErrorRecoverySet.Func); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.If, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "if", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Implements, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "implements", ErrorRecoverySet.None); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Import, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "import", ErrorRecoverySet.TypeScriptS); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.In, Reservation.TypeScriptAndJS, OperatorPrecedence.Relational, NodeType.In, OperatorPrecedence.None, NodeType.None, "in", ErrorRecoverySet.None); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.InstanceOf, Reservation.TypeScriptAndJS, OperatorPrecedence.Relational, NodeType.InstOf, OperatorPrecedence.None, NodeType.None, "instanceof", ErrorRecoverySet.BinOp); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Interface, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "interface", ErrorRecoverySet.TypeScriptS); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Let, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "let", ErrorRecoverySet.None); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Module, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "module", ErrorRecoverySet.TypeScriptS); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.New, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "new", ErrorRecoverySet.PreOp); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Number, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "number", ErrorRecoverySet.PrimType); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Null, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "null", ErrorRecoverySet.RLit); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Package, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "package", ErrorRecoverySet.None); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Private, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "private", ErrorRecoverySet.TypeScriptS); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Protected, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "protected", ErrorRecoverySet.None); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Public, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "public", ErrorRecoverySet.TypeScriptS); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Return, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "return", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Static, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "static", ErrorRecoverySet.None); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.String, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "string", ErrorRecoverySet.PrimType); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Super, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "super", ErrorRecoverySet.RLit); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Switch, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "switch", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.This, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "this", ErrorRecoverySet.RLit); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Throw, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "throw", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.True, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "true", ErrorRecoverySet.RLit); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Try, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "try", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.TypeOf, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Typeof, "typeof", ErrorRecoverySet.Prefix); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Var, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "var", ErrorRecoverySet.Var); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Void, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Void, "void", ErrorRecoverySet.Prefix); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.With, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.With, "with", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.While, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "while", ErrorRecoverySet.While); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Yield, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "yield", ErrorRecoverySet.None); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - - setTokenInfo(TokenID.Identifier, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "identifier", ErrorRecoverySet.ID); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.NumberLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "numberLiteral", ErrorRecoverySet.Literal); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.RegularExpressionLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "regex", ErrorRecoverySet.RegExp); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.StringLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "qstring", ErrorRecoverySet.Literal); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - - // Non-operator non-identifier tokens - setTokenInfo(TokenID.Semicolon, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ";", ErrorRecoverySet.SColon); // ; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.CloseParen, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ")", ErrorRecoverySet.RParen); // ) - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.CloseBracket, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "]", ErrorRecoverySet.RBrack); // ] - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.OpenBrace, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "{", ErrorRecoverySet.LCurly); // { - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.CloseBrace, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "}", ErrorRecoverySet.RCurly); // } - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.DotDotDot, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "...", ErrorRecoverySet.None); // ... - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - - // Operator non-identifier tokens - setTokenInfo(TokenID.Comma, Reservation.None, OperatorPrecedence.Comma, NodeType.Comma, OperatorPrecedence.None, NodeType.None, ",", ErrorRecoverySet.Comma); // , - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Equals, Reservation.None, OperatorPrecedence.Assignment, NodeType.Asg, OperatorPrecedence.None, NodeType.None, "=", ErrorRecoverySet.Asg); // = - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.PlusEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgAdd, OperatorPrecedence.None, NodeType.None, "+=", ErrorRecoverySet.BinOp); // += - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.MinusEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgSub, OperatorPrecedence.None, NodeType.None, "-=", ErrorRecoverySet.BinOp); // -= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.AsteriskEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgMul, OperatorPrecedence.None, NodeType.None, "*=", ErrorRecoverySet.BinOp); // *= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - - setTokenInfo(TokenID.SlashEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgDiv, OperatorPrecedence.None, NodeType.None, "/=", ErrorRecoverySet.BinOp); // /= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.PercentEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgMod, OperatorPrecedence.None, NodeType.None, "%=", ErrorRecoverySet.BinOp); // %= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.AmpersandEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgAnd, OperatorPrecedence.None, NodeType.None, "&=", ErrorRecoverySet.BinOp); // &= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.CaretEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgXor, OperatorPrecedence.None, NodeType.None, "^=", ErrorRecoverySet.BinOp); // ^= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.BarEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgOr, OperatorPrecedence.None, NodeType.None, "|=", ErrorRecoverySet.BinOp); // |= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.LessThanLessThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgLsh, OperatorPrecedence.None, NodeType.None, "<<=", ErrorRecoverySet.BinOp); // <<= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.GreaterThanGreaterThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgRsh, OperatorPrecedence.None, NodeType.None, ">>=", ErrorRecoverySet.BinOp); // >>= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.GreaterThanGreaterThanGreaterThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgRs2, OperatorPrecedence.None, NodeType.None, ">>>=", ErrorRecoverySet.BinOp); // >>>= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Question, Reservation.None, OperatorPrecedence.Conditional, NodeType.ConditionalExpression, OperatorPrecedence.None, NodeType.None, "?", ErrorRecoverySet.BinOp); // ? - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Colon, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ":", ErrorRecoverySet.Colon); // : - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.BarBar, Reservation.None, OperatorPrecedence.LogicalOr, NodeType.LogOr, OperatorPrecedence.None, NodeType.None, "||", ErrorRecoverySet.BinOp); // || - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.AmpersandAmpersand, Reservation.None, OperatorPrecedence.LogicalAnd, NodeType.LogAnd, OperatorPrecedence.None, NodeType.None, "&&", ErrorRecoverySet.BinOp); // && - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Bar, Reservation.None, OperatorPrecedence.BitwiseOr, NodeType.Or, OperatorPrecedence.None, NodeType.None, "|", ErrorRecoverySet.BinOp); // | - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Caret, Reservation.None, OperatorPrecedence.BitwiseExclusiveOr, NodeType.Xor, OperatorPrecedence.None, NodeType.None, "^", ErrorRecoverySet.BinOp); // ^ - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.And, Reservation.None, OperatorPrecedence.BitwiseAnd, NodeType.And, OperatorPrecedence.None, NodeType.None, "&", ErrorRecoverySet.BinOp); // & - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.EqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Eq, OperatorPrecedence.None, NodeType.None, "==", ErrorRecoverySet.BinOp); // == - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.ExclamationEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Ne, OperatorPrecedence.None, NodeType.None, "!=", ErrorRecoverySet.BinOp); // != - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.EqualsEqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Eqv, OperatorPrecedence.None, NodeType.None, "===", ErrorRecoverySet.BinOp); // === - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.ExclamationEqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.NEqv, OperatorPrecedence.None, NodeType.None, "!==", ErrorRecoverySet.BinOp); // !== - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.LessThan, Reservation.None, OperatorPrecedence.Relational, NodeType.Lt, OperatorPrecedence.None, NodeType.None, "<", ErrorRecoverySet.BinOp); // < - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.LessThanEquals, Reservation.None, OperatorPrecedence.Relational, NodeType.Le, OperatorPrecedence.None, NodeType.None, "<=", ErrorRecoverySet.BinOp); // <= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.GreaterThan, Reservation.None, OperatorPrecedence.Relational, NodeType.Gt, OperatorPrecedence.None, NodeType.None, ">", ErrorRecoverySet.BinOp); // > - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.GreaterThanEquals, Reservation.None, OperatorPrecedence.Relational, NodeType.Ge, OperatorPrecedence.None, NodeType.None, ">=", ErrorRecoverySet.BinOp); // >= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.LessThanLessThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Lsh, OperatorPrecedence.None, NodeType.None, "<<", ErrorRecoverySet.BinOp); // << - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.GreaterThanGreaterThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Rsh, OperatorPrecedence.None, NodeType.None, ">>", ErrorRecoverySet.BinOp); // >> - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.GreaterThanGreaterThanGreaterThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Rs2, OperatorPrecedence.None, NodeType.None, ">>>", ErrorRecoverySet.BinOp); // >>> - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Plus, Reservation.None, OperatorPrecedence.Additive, NodeType.Add, OperatorPrecedence.Unary, NodeType.Pos, "+", ErrorRecoverySet.AddOp); // + - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Minus, Reservation.None, OperatorPrecedence.Additive, NodeType.Sub, OperatorPrecedence.Unary, NodeType.Neg, "-", ErrorRecoverySet.AddOp); // - - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Asterisk, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Mul, OperatorPrecedence.None, NodeType.None, "*", ErrorRecoverySet.BinOp); // * - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Slash, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Div, OperatorPrecedence.None, NodeType.None, "/", ErrorRecoverySet.BinOp); // / - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Percent, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Mod, OperatorPrecedence.None, NodeType.None, "%", ErrorRecoverySet.BinOp); // % - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Tilde, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Not, "~", ErrorRecoverySet.PreOp); // ~ - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Exclamation, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.LogNot, "!", ErrorRecoverySet.PreOp); // ! - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.PlusPlus, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.IncPre, "++", ErrorRecoverySet.PreOp); // ++ - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.MinusMinus, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.DecPre, "--", ErrorRecoverySet.PreOp); // -- - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.OpenParen, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "(", ErrorRecoverySet.LParen); // ( - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.OpenBracket, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "[", ErrorRecoverySet.LBrack); // [ - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Dot, Reservation.None, OperatorPrecedence.Unary, NodeType.None, OperatorPrecedence.None, NodeType.None, ".", ErrorRecoverySet.Dot); // . - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.EndOfFile, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "", ErrorRecoverySet.EOF); // EOF - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.EqualsGreaterThan, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "=>", ErrorRecoverySet.None); // => - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - - export function lookupToken(tokenId: TokenID): TokenInfo { - return tokenTable[tokenId]; - } - - export enum TokenClass { - Punctuation, - Keyword, - Operator, - Comment, - Whitespace, - Identifier, - Literal, - } - - export class SavedToken { - constructor (public tok: Token, public minChar: number, public limChar: number) { } - } - - export class Token { - constructor (public tokenId: TokenID) { - } - - public toString(): string { - return "token: " + this.tokenId + " " + this.getText() + " (" + (TokenID)._map[this.tokenId] + ")"; - } - - public print(line: number, outfile: any): void { - outfile.WriteLine(this.toString() + ",on line" + line); - } - - public getText(): string { - return tokenTable[this.tokenId].text; - } - - public classification(): TokenClass { - if (this.tokenId <= TokenID.LimKeyword) { - return TokenClass.Keyword; - } - else { - var tokenInfo = lookupToken(this.tokenId); - if (tokenInfo != undefined) { - if ((tokenInfo.unopNodeType != NodeType.None) || - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - (tokenInfo.binopNodeType != NodeType.None)) { - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - return TokenClass.Operator; - } - } - } - - return TokenClass.Punctuation; - } - } - - export class NumberLiteralToken extends Token { - constructor (public value: number, public hasEmptyFraction?: boolean) { - super(TokenID.NumberLiteral); - } - - public getText(): string { - return this.hasEmptyFraction ? this.value.toString() + ".0" : this.value.toString(); - } - - public classification(): TokenClass { - return TokenClass.Literal; - } - } - - export class StringLiteralToken extends Token { - constructor (public value: string) { - super(TokenID.StringLiteral); - } - - public getText(): string { - return this.value; - } - - public classification(): TokenClass { - return TokenClass.Literal; - } - } - - export class IdentifierToken extends Token { - constructor (public value: string, public hasEscapeSequence : boolean) { - super(TokenID.Identifier); - } - public getText(): string { - return this.value; - } - public classification(): TokenClass { - return TokenClass.Identifier; - } - } - - export class WhitespaceToken extends Token { - constructor (tokenId: TokenID, public value: string) { - super(tokenId); - } - - public getText(): string { - return this.value; - } - - public classification(): TokenClass { - return TokenClass.Whitespace; - } - } - - export class CommentToken extends Token { - constructor (tokenID: TokenID, public value: string, public isBlock: boolean, public startPos: number, public line: number, public endsLine: boolean) { - super(tokenID); - } - - public getText(): string { - return this.value; - } - - public classification(): TokenClass { - return TokenClass.Comment; - } - } - - export class RegularExpressionLiteralToken extends Token { - constructor(public regex: any) { - super(TokenID.RegularExpressionLiteral); - } - - public getText(): string { - return this.regex.toString(); - } - - public classification(): TokenClass { - return TokenClass.Literal; - } - } - - // TODO: new with length TokenID.LimFixed - export var staticTokens: any = new Token[]; - -!!! error TS1011: An element access expression should take an argument. - export function initializeStaticTokens(): void { - for (var i = 0; i <= TokenID.LimFixed; i++) { - staticTokens[i] = new Token(i); - } - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource14.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource14.d.ts deleted file mode 100644 index 88c56705df02e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource14.d.ts +++ /dev/null @@ -1,1738 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts] //// - -//// [parserRealSource14.ts] -// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. -// See LICENSE.txt in the project root for complete license information. - -/// - -module TypeScript { - export function lastOf(items: any[]): any { - return (items === null || items.length === 0) ? null : items[items.length - 1]; - } - - export function max(a: number, b: number): number { - return a >= b ? a : b; - } - - export function min(a: number, b: number): number { - return a <= b ? a : b; - } - - // - // Helper class representing a path from a root ast node to a (grand)child ast node. - // This is helpful as our tree don't have parents. - // - export class AstPath { - public asts: TypeScript.AST[] = []; - public top: number = -1; - - static reverseIndexOf(items: any[], index: number): any { - return (items === null || items.length <= index) ? null : items[items.length - index - 1]; - } - - public clone(): AstPath { - var clone = new AstPath(); - clone.asts = this.asts.map((value) => { return value; }); - clone.top = this.top; - return clone; - } - - public pop(): TypeScript.AST { - var head = this.ast(); - this.up(); - - while (this.asts.length > this.count()) { - this.asts.pop(); - } - return head; - } - - public push(ast: TypeScript.AST): void { - while (this.asts.length > this.count()) { - this.asts.pop(); - } - this.top = this.asts.length; - this.asts.push(ast); - } - - public up(): void { - if (this.top <= -1) - throw new Error("Invalid call to 'up'"); - this.top--; - } - - public down(): void { - if (this.top == this.ast.length - 1) - throw new Error("Invalid call to 'down'"); - this.top++; - } - - public nodeType(): TypeScript.NodeType { - if (this.ast() == null) - return TypeScript.NodeType.None; - return this.ast().nodeType; - } - - public ast(): TypeScript.AST { - return AstPath.reverseIndexOf(this.asts, this.asts.length - (this.top + 1)); - } - - public parent(): TypeScript.AST { - return AstPath.reverseIndexOf(this.asts, this.asts.length - this.top); - } - - public count(): number { - return this.top + 1; - } - - public get(index: number): TypeScript.AST { - return this.asts[index]; - } - - public isNameOfClass(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.ClassDeclaration) && - ((this.parent()).name === this.ast()); - } - - public isNameOfInterface(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.InterfaceDeclaration) && - ((this.parent()).name === this.ast()); - } - - public isNameOfArgument(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.ArgDecl) && - ((this.parent()).id === this.ast()); - } - - public isNameOfVariable(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.VarDecl) && - ((this.parent()).id === this.ast()); - } - - public isNameOfModule(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.ModuleDeclaration) && - ((this.parent()).name === this.ast()); - } - - public isNameOfFunction(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.FuncDecl) && - ((this.parent()).name === this.ast()); - } - - public isChildOfScript(): boolean { - var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.Script; - } - - public isChildOfModule(): boolean { - var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.ModuleDeclaration; - } - - public isChildOfClass(): boolean { - var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.ClassDeclaration; - } - - public isArgumentOfClassConstructor(): boolean { - var ast = lastOf(this.asts); - return this.count() >= 5 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && - this.asts[this.top - 3].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 4].nodeType === TypeScript.NodeType.ClassDeclaration && - ((this.asts[this.top - 2]).isConstructor) && - ((this.asts[this.top - 2]).arguments === this.asts[this.top - 1]) && - ((this.asts[this.top - 4]).constructorDecl === this.asts[this.top - 2]); - } - - public isChildOfInterface(): boolean { - var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.InterfaceDeclaration; - } - - public isTopLevelImplicitModule(): any { - return this.count() >= 1 && - this.asts[this.top].nodeType === TypeScript.NodeType.ModuleDeclaration && - TypeScript.hasFlag((this.asts[this.top]).modFlags, TypeScript.ModuleFlags.IsWholeFile); - } - - public isBodyOfTopLevelImplicitModule(): any { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && - (this.asts[this.top - 1]).members == this.asts[this.top - 0] && - TypeScript.hasFlag((this.asts[this.top - 1]).modFlags, TypeScript.ModuleFlags.IsWholeFile); - } - - public isBodyOfScript(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Script && - (this.asts[this.top - 1]).bod == this.asts[this.top - 0]; - } - - public isBodyOfSwitch(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Switch && - (this.asts[this.top - 1]).caseList == this.asts[this.top - 0]; - } - - public isBodyOfModule(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && - (this.asts[this.top - 1]).members == this.asts[this.top - 0]; - } - - public isBodyOfClass(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ClassDeclaration && - (this.asts[this.top - 1]).members == this.asts[this.top - 0]; - } - - public isBodyOfFunction(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && - (this.asts[this.top - 1]).bod == this.asts[this.top - 0]; - } - - public isBodyOfInterface(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.InterfaceDeclaration && - (this.asts[this.top - 1]).members == this.asts[this.top - 0]; - } - - public isBodyOfBlock(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Block && - (this.asts[this.top - 1]).statements == this.asts[this.top - 0]; - } - - public isBodyOfFor(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.For && - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - } - - public isBodyOfCase(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Case && - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - } - - public isBodyOfTry(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Try && - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - } - - public isBodyOfCatch(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Catch && - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - } - - public isBodyOfDoWhile(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.DoWhile && - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - } - - public isBodyOfWhile(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.While && - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - } - - public isBodyOfForIn(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ForIn && - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - } - - public isBodyOfWith(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.With && - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - } - - public isBodyOfFinally(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Finally && - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - } - - public isCaseOfSwitch(): boolean { - return this.count() >= 3 && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - (this.asts[this.top - 2]).caseList == this.asts[this.top - 1]; - } - - public isDefaultCaseOfSwitch(): boolean { - return this.count() >= 3 && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - (this.asts[this.top - 2]).caseList == this.asts[this.top - 1] && - (this.asts[this.top - 2]).defaultCase == this.asts[this.top - 0]; - } - - public isListOfObjectLit(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - (this.asts[this.top - 1]).operand == this.asts[this.top - 0]; - } - - public isBodyOfObjectLit(): boolean { - return this.isListOfObjectLit(); - } - - public isEmptyListOfObjectLit(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - (this.asts[this.top - 1]).operand == this.asts[this.top - 0] && - (this.asts[this.top - 0]).members.length == 0; - } - - public isMemberOfObjectLit(): boolean { - return this.count() >= 3 && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.ObjectLit && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.Member && - (this.asts[this.top - 2]).operand == this.asts[this.top - 1]; - } - - public isNameOfMemberOfObjectLit(): boolean { - return this.count() >= 4 && - this.asts[this.top - 3].nodeType === TypeScript.NodeType.ObjectLit && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.Name && - (this.asts[this.top - 3]).operand == this.asts[this.top - 2]; - } - - public isListOfArrayLit(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ArrayLit && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - (this.asts[this.top - 1]).operand == this.asts[this.top - 0]; - } - - public isTargetOfMember(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && - (this.asts[this.top - 1]).operand1 === this.asts[this.top - 0]; - } - - public isMemberOfMember(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && - (this.asts[this.top - 1]).operand2 === this.asts[this.top - 0]; - } - - public isItemOfList(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List; - //(this.asts[this.top - 1]).operand2 === this.asts[this.top - 0]; - } - - public isThenOfIf(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && - (this.asts[this.top - 1]).thenBod == this.asts[this.top - 0]; - } - - public isElseOfIf(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && - (this.asts[this.top - 1]).elseBod == this.asts[this.top - 0]; - } - - public isBodyOfDefaultCase(): boolean { - return this.isBodyOfCase(); - } - - public isSingleStatementList(): boolean { - return this.count() >= 1 && - this.asts[this.top].nodeType === TypeScript.NodeType.List && - (this.asts[this.top]).members.length === 1; - } - - public isArgumentListOfFunction(): boolean { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && - (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; - } - - public isArgumentOfFunction(): boolean { - return this.count() >= 3 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && - (this.asts[this.top - 2]).arguments === this.asts[this.top - 1]; - } - - public isArgumentListOfCall(): boolean { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Call && - (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; - } - - public isArgumentListOfNew(): boolean { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.New && - (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; - } - - public isSynthesizedBlock(): boolean { - return this.count() >= 1 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.Block && - (this.asts[this.top - 0]).isStatementBlock === false; - } - } - - export function isValidAstNode(ast: TypeScript.ASTSpan): boolean { - if (ast === null) - return false; - - if (ast.minChar === -1 || ast.limChar === -1) - return false; - - return true; - } - - export class AstPathContext { - public path: AstPath = new TypeScript.AstPath(); - } - - export enum GetAstPathOptions { - Default = 0, - EdgeInclusive = 1, - //We need this options dealing with an AST coming from an incomplete AST. For example: - // class foo { // r - // If we ask for the AST at the position after the "r" character, we won't see we are - // inside a comment, because the "class" AST node has a limChar corresponding to the position of - // the "{" character, meaning we don't traverse the tree down to the stmt list of the class, meaning - // we don't find the "precomment" attached to the errorneous empty stmt. - //TODO: It would be nice to be able to get rid of this. - DontPruneSearchBasedOnPosition = 1 << 1, - } - - /// - /// Return the stack of AST nodes containing "position" - /// - export function getAstPathToPosition(script: TypeScript.AST, pos: number, options: GetAstPathOptions = GetAstPathOptions.Default): TypeScript.AstPath { - var lookInComments = (comments: TypeScript.Comment[]) => { - if (comments && comments.length > 0) { - for (var i = 0; i < comments.length; i++) { - var minChar = comments[i].minChar; - var limChar = comments[i].limChar; - if (!comments[i].isBlockComment) { - limChar++; // For single line comments, include 1 more character (for the newline) - } - if (pos >= minChar && pos < limChar) { - ctx.path.push(comments[i]); - } - } - } - } - - var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: IAstWalker) { - if (isValidAstNode(cur)) { - - // Add "cur" to the stack if it contains our position - // For "identifier" nodes, we need a special case: A position equal to "limChar" is - // valid, since the position corresponds to a caret position (in between characters) - // For example: - // bar - // 0123 - // If "position == 3", the caret is at the "right" of the "r" character, which should be considered valid - var inclusive = - hasFlag(options, GetAstPathOptions.EdgeInclusive) || - cur.nodeType === TypeScript.NodeType.Name || - pos === script.limChar; // Special "EOF" case - - var minChar = cur.minChar; - var limChar = cur.limChar + (inclusive ? 1 : 0) - if (pos >= minChar && pos < limChar) { - - // TODO: Since AST is sometimes not correct wrt to position, only add "cur" if it's better - // than top of the stack. - var previous = ctx.path.ast(); - if (previous == null || (cur.minChar >= previous.minChar && cur.limChar <= previous.limChar)) { - ctx.path.push(cur); - } - else { - //logger.log("TODO: Ignoring node because minChar, limChar not better than previous node in stack"); - } - } - - // The AST walker skips comments, but we might be in one, so check the pre/post comments for this node manually - if (pos < limChar) { - lookInComments(cur.preComments); - } - if (pos >= minChar) { - lookInComments(cur.postComments); - } - - if (!hasFlag(options, GetAstPathOptions.DontPruneSearchBasedOnPosition)) { - // Don't go further down the tree if pos is outside of [minChar, limChar] - walker.options.goChildren = (minChar <= pos && pos <= limChar); - } - } - return cur; - } - - var ctx = new AstPathContext(); - TypeScript.getAstWalkerFactory().walk(script, pre, null, null, ctx); - return ctx.path; - } - - // - // Find a source text offset that is safe for lexing tokens at the given position. - // This is used when "position" might be inside a comment or string, etc. - // - export function getTokenizationOffset(script: TypeScript.Script, position: number): number { - var bestOffset = 0; - var pre = (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker): TypeScript.AST => { - if (TypeScript.isValidAstNode(cur)) { - // Did we find a closer offset? - if (cur.minChar <= position) { - bestOffset = max(bestOffset, cur.minChar); - } - - // Stop the walk if this node is not related to "minChar" - if (cur.minChar > position || cur.limChar < bestOffset) { - walker.options.goChildren = false; - } - } - - return cur; - } - - TypeScript.getAstWalkerFactory().walk(script, pre); - return bestOffset; - } - - /// - /// Simple function to Walk an AST using a simple callback function. - /// - export function walkAST(ast: TypeScript.AST, callback: (path: AstPath, walker: TypeScript.IAstWalker) => void ): void { - var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) { - var path: TypeScript.AstPath = walker.state; - path.push(cur); - callback(path, walker); - return cur; - } - var post = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) { - var path: TypeScript.AstPath = walker.state; - path.pop(); - return cur; - } - - var path = new AstPath(); - TypeScript.getAstWalkerFactory().walk(ast, pre, post, null, path); - } -} - - -/// [Declarations] //// - - - -//// [parserRealSource14.d.ts] -declare namespace TypeScript { - function lastOf(items: any[]): any; - function max(a: number, b: number): number; - function min(a: number, b: number): number; - class AstPath { - asts: TypeScript.AST[]; - top: number; - static reverseIndexOf(items: any[], index: number): any; - clone(): AstPath; - pop(): TypeScript.AST; - push(ast: TypeScript.AST): void; - up(): void; - down(): void; - nodeType(): TypeScript.NodeType; - ast(): TypeScript.AST; - parent(): TypeScript.AST; - count(): number; - get(index: number): TypeScript.AST; - isNameOfClass(): boolean; - isNameOfInterface(): boolean; - isNameOfArgument(): boolean; - isNameOfVariable(): boolean; - isNameOfModule(): boolean; - isNameOfFunction(): boolean; - isChildOfScript(): boolean; - isChildOfModule(): boolean; - isChildOfClass(): boolean; - isArgumentOfClassConstructor(): boolean; - isChildOfInterface(): boolean; - isTopLevelImplicitModule(): any; - isBodyOfTopLevelImplicitModule(): any; - isBodyOfScript(): boolean; - isBodyOfSwitch(): boolean; - isBodyOfModule(): boolean; - isBodyOfClass(): boolean; - isBodyOfFunction(): boolean; - isBodyOfInterface(): boolean; - isBodyOfBlock(): boolean; - isBodyOfFor(): boolean; - isBodyOfCase(): boolean; - isBodyOfTry(): boolean; - isBodyOfCatch(): boolean; - isBodyOfDoWhile(): boolean; - isBodyOfWhile(): boolean; - isBodyOfForIn(): boolean; - isBodyOfWith(): boolean; - isBodyOfFinally(): boolean; - isCaseOfSwitch(): boolean; - isDefaultCaseOfSwitch(): boolean; - isListOfObjectLit(): boolean; - isBodyOfObjectLit(): boolean; - isEmptyListOfObjectLit(): boolean; - isMemberOfObjectLit(): boolean; - isNameOfMemberOfObjectLit(): boolean; - isListOfArrayLit(): boolean; - isTargetOfMember(): boolean; - isMemberOfMember(): boolean; - isItemOfList(): boolean; - isThenOfIf(): boolean; - isElseOfIf(): boolean; - isBodyOfDefaultCase(): boolean; - isSingleStatementList(): boolean; - isArgumentListOfFunction(): boolean; - isArgumentOfFunction(): boolean; - isArgumentListOfCall(): boolean; - isArgumentListOfNew(): boolean; - isSynthesizedBlock(): boolean; - } - function isValidAstNode(ast: TypeScript.ASTSpan): boolean; - class AstPathContext { - path: AstPath; - } - enum GetAstPathOptions { - Default = 0, - EdgeInclusive = 1, - DontPruneSearchBasedOnPosition = 2 - } - function getAstPathToPosition(script: TypeScript.AST, pos: number, options?: GetAstPathOptions): TypeScript.AstPath; - function getTokenizationOffset(script: TypeScript.Script, position: number): number; - function walkAST(ast: TypeScript.AST, callback: (path: AstPath, walker: TypeScript.IAstWalker) => void): void; -} - -/// [Errors] //// - -parserRealSource14.ts(4,21): error TS6053: File 'typescript.ts' not found. -parserRealSource14.ts(4,21): error TS9010: Reference directives are not supported in isolated declaration mode. -parserRealSource14.ts(24,33): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(38,34): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(48,37): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(68,39): error TS2694: Namespace 'TypeScript' has no exported member 'NodeType'. -parserRealSource14.ts(70,35): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(74,34): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(75,32): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(78,37): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(79,32): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(86,47): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(94,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(95,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(96,31): error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. -parserRealSource14.ts(103,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(104,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(105,31): error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. -parserRealSource14.ts(112,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(113,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(114,31): error TS2694: Namespace 'TypeScript' has no exported member 'ArgDecl'. -parserRealSource14.ts(121,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(122,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(123,31): error TS2694: Namespace 'TypeScript' has no exported member 'VarDecl'. -parserRealSource14.ts(130,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(131,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(132,31): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. -parserRealSource14.ts(139,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(140,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(141,31): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. -parserRealSource14.ts(148,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(149,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(156,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(157,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(164,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(165,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(172,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(173,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(174,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(175,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(176,31): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. -parserRealSource14.ts(177,31): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. -parserRealSource14.ts(178,31): error TS2694: Namespace 'TypeScript' has no exported member 'ClassDeclaration'. -parserRealSource14.ts(185,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(186,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(191,61): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(192,28): error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(192,49): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. -parserRealSource14.ts(192,109): error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(197,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(198,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(199,31): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. -parserRealSource14.ts(200,28): error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(200,49): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. -parserRealSource14.ts(200,113): error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(205,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(206,31): error TS2694: Namespace 'TypeScript' has no exported member 'Script'. -parserRealSource14.ts(211,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(212,31): error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. -parserRealSource14.ts(217,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(218,31): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. -parserRealSource14.ts(223,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(224,31): error TS2694: Namespace 'TypeScript' has no exported member 'ClassDeclaration'. -parserRealSource14.ts(229,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(230,31): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. -parserRealSource14.ts(235,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(236,31): error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. -parserRealSource14.ts(241,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(242,30): error TS2694: Namespace 'TypeScript' has no exported member 'Block'. -parserRealSource14.ts(247,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(248,30): error TS2694: Namespace 'TypeScript' has no exported member 'ForStatement'. -parserRealSource14.ts(253,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(254,30): error TS2694: Namespace 'TypeScript' has no exported member 'CaseStatement'. -parserRealSource14.ts(259,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(260,30): error TS2694: Namespace 'TypeScript' has no exported member 'Try'. -parserRealSource14.ts(265,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(266,30): error TS2694: Namespace 'TypeScript' has no exported member 'Catch'. -parserRealSource14.ts(271,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(272,30): error TS2694: Namespace 'TypeScript' has no exported member 'DoWhileStatement'. -parserRealSource14.ts(277,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(278,30): error TS2694: Namespace 'TypeScript' has no exported member 'WhileStatement'. -parserRealSource14.ts(283,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(284,30): error TS2694: Namespace 'TypeScript' has no exported member 'ForInStatement'. -parserRealSource14.ts(289,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(290,30): error TS2694: Namespace 'TypeScript' has no exported member 'WithStatement'. -parserRealSource14.ts(295,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(296,30): error TS2694: Namespace 'TypeScript' has no exported member 'Finally'. -parserRealSource14.ts(301,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(302,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(303,30): error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. -parserRealSource14.ts(308,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(309,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(310,30): error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. -parserRealSource14.ts(311,30): error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. -parserRealSource14.ts(316,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(317,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(318,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. -parserRealSource14.ts(327,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(328,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(329,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. -parserRealSource14.ts(330,30): error TS2694: Namespace 'TypeScript' has no exported member 'ASTList'. -parserRealSource14.ts(335,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(336,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(337,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(338,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. -parserRealSource14.ts(343,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(344,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(345,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(346,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(347,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. -parserRealSource14.ts(352,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(353,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(354,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. -parserRealSource14.ts(359,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(360,30): error TS2694: Namespace 'TypeScript' has no exported member 'BinaryExpression'. -parserRealSource14.ts(365,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(366,30): error TS2694: Namespace 'TypeScript' has no exported member 'BinaryExpression'. -parserRealSource14.ts(371,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(377,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(378,30): error TS2694: Namespace 'TypeScript' has no exported member 'IfStatement'. -parserRealSource14.ts(383,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(384,30): error TS2694: Namespace 'TypeScript' has no exported member 'IfStatement'. -parserRealSource14.ts(393,61): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(394,30): error TS2694: Namespace 'TypeScript' has no exported member 'ASTList'. -parserRealSource14.ts(399,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(400,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(401,30): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. -parserRealSource14.ts(406,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(407,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(408,30): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. -parserRealSource14.ts(413,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(414,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(415,30): error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'. -parserRealSource14.ts(420,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(421,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(422,30): error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'. -parserRealSource14.ts(427,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(428,30): error TS2694: Namespace 'TypeScript' has no exported member 'Block'. -parserRealSource14.ts(432,52): error TS2694: Namespace 'TypeScript' has no exported member 'ASTSpan'. -parserRealSource14.ts(456,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource14.ts(462,61): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(463,52): error TS2694: Namespace 'TypeScript' has no exported member 'Comment'. -parserRealSource14.ts(478,45): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(478,69): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(478,82): error TS2304: Cannot find name 'IAstWalker'. -parserRealSource14.ts(489,21): error TS2304: Cannot find name 'hasFlag'. -parserRealSource14.ts(490,49): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(516,22): error TS2304: Cannot find name 'hasFlag'. -parserRealSource14.ts(525,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(533,62): error TS2694: Namespace 'TypeScript' has no exported member 'Script'. -parserRealSource14.ts(535,36): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(535,60): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(535,84): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. -parserRealSource14.ts(535,108): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(551,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(558,45): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(558,95): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. -parserRealSource14.ts(559,45): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(559,69): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(559,93): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. -parserRealSource14.ts(565,46): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(565,70): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(565,94): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. -parserRealSource14.ts(572,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. - - -==== parserRealSource14.ts (164 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// - ~~~~~~~~~~~~~ -!!! error TS6053: File 'typescript.ts' not found. - ~~~~~~~~~~~~~ -!!! error TS9010: Reference directives are not supported in isolated declaration mode. - - module TypeScript { - export function lastOf(items: any[]): any { - return (items === null || items.length === 0) ? null : items[items.length - 1]; - } - - export function max(a: number, b: number): number { - return a >= b ? a : b; - } - - export function min(a: number, b: number): number { - return a <= b ? a : b; - } - - // - // Helper class representing a path from a root ast node to a (grand)child ast node. - // This is helpful as our tree don't have parents. - // - export class AstPath { - public asts: TypeScript.AST[] = []; - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - public top: number = -1; - - static reverseIndexOf(items: any[], index: number): any { - return (items === null || items.length <= index) ? null : items[items.length - index - 1]; - } - - public clone(): AstPath { - var clone = new AstPath(); - clone.asts = this.asts.map((value) => { return value; }); - clone.top = this.top; - return clone; - } - - public pop(): TypeScript.AST { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - var head = this.ast(); - this.up(); - - while (this.asts.length > this.count()) { - this.asts.pop(); - } - return head; - } - - public push(ast: TypeScript.AST): void { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - while (this.asts.length > this.count()) { - this.asts.pop(); - } - this.top = this.asts.length; - this.asts.push(ast); - } - - public up(): void { - if (this.top <= -1) - throw new Error("Invalid call to 'up'"); - this.top--; - } - - public down(): void { - if (this.top == this.ast.length - 1) - throw new Error("Invalid call to 'down'"); - this.top++; - } - - public nodeType(): TypeScript.NodeType { - ~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'NodeType'. - if (this.ast() == null) - return TypeScript.NodeType.None; - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - return this.ast().nodeType; - } - - public ast(): TypeScript.AST { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - return AstPath.reverseIndexOf(this.asts, this.asts.length - (this.top + 1)); - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - } - - public parent(): TypeScript.AST { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - return AstPath.reverseIndexOf(this.asts, this.asts.length - this.top); - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - } - - public count(): number { - return this.top + 1; - } - - public get(index: number): TypeScript.AST { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - return this.asts[index]; - } - - public isNameOfClass(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.parent().nodeType === TypeScript.NodeType.ClassDeclaration) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - ((this.parent()).name === this.ast()); - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. - } - - public isNameOfInterface(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.parent().nodeType === TypeScript.NodeType.InterfaceDeclaration) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - ((this.parent()).name === this.ast()); - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. - } - - public isNameOfArgument(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.parent().nodeType === TypeScript.NodeType.ArgDecl) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - ((this.parent()).id === this.ast()); - ~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ArgDecl'. - } - - public isNameOfVariable(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.parent().nodeType === TypeScript.NodeType.VarDecl) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - ((this.parent()).id === this.ast()); - ~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'VarDecl'. - } - - public isNameOfModule(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.parent().nodeType === TypeScript.NodeType.ModuleDeclaration) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - ((this.parent()).name === this.ast()); - ~~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. - } - - public isNameOfFunction(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.parent().nodeType === TypeScript.NodeType.FuncDecl) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - ((this.parent()).name === this.ast()); - ~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. - } - - public isChildOfScript(): boolean { - var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 2].nodeType === TypeScript.NodeType.Script; - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - } - - public isChildOfModule(): boolean { - var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 2].nodeType === TypeScript.NodeType.ModuleDeclaration; - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - } - - public isChildOfClass(): boolean { - var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 2].nodeType === TypeScript.NodeType.ClassDeclaration; - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - } - - public isArgumentOfClassConstructor(): boolean { - var ast = lastOf(this.asts); - return this.count() >= 5 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 3].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 4].nodeType === TypeScript.NodeType.ClassDeclaration && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - ((this.asts[this.top - 2]).isConstructor) && - ~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. - ((this.asts[this.top - 2]).arguments === this.asts[this.top - 1]) && - ~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. - ((this.asts[this.top - 4]).constructorDecl === this.asts[this.top - 2]); - ~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ClassDeclaration'. - } - - public isChildOfInterface(): boolean { - var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 2].nodeType === TypeScript.NodeType.InterfaceDeclaration; - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - } - - public isTopLevelImplicitModule(): any { - return this.count() >= 1 && - this.asts[this.top].nodeType === TypeScript.NodeType.ModuleDeclaration && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - TypeScript.hasFlag((this.asts[this.top]).modFlags, TypeScript.ModuleFlags.IsWholeFile); - ~~~~~~~ -!!! error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'. - ~~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. - ~~~~~~~~~~~ -!!! error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'. - } - - public isBodyOfTopLevelImplicitModule(): any { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).members == this.asts[this.top - 0] && - ~~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. - TypeScript.hasFlag((this.asts[this.top - 1]).modFlags, TypeScript.ModuleFlags.IsWholeFile); - ~~~~~~~ -!!! error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'. - ~~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. - ~~~~~~~~~~~ -!!! error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'. - } - - public isBodyOfScript(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Script && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).bod == this.asts[this.top - 0]; - ~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'Script'. - } - - public isBodyOfSwitch(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Switch && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).caseList == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. - } - - public isBodyOfModule(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).members == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. - } - - public isBodyOfClass(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ClassDeclaration && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).members == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ClassDeclaration'. - } - - public isBodyOfFunction(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).bod == this.asts[this.top - 0]; - ~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. - } - - public isBodyOfInterface(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.InterfaceDeclaration && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).members == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. - } - - public isBodyOfBlock(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Block && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).statements == this.asts[this.top - 0]; - ~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'Block'. - } - - public isBodyOfFor(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.For && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ForStatement'. - } - - public isBodyOfCase(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Case && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'CaseStatement'. - } - - public isBodyOfTry(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Try && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'Try'. - } - - public isBodyOfCatch(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Catch && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'Catch'. - } - - public isBodyOfDoWhile(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.DoWhile && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'DoWhileStatement'. - } - - public isBodyOfWhile(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.While && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'WhileStatement'. - } - - public isBodyOfForIn(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ForIn && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ForInStatement'. - } - - public isBodyOfWith(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.With && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'WithStatement'. - } - - public isBodyOfFinally(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Finally && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'Finally'. - } - - public isCaseOfSwitch(): boolean { - return this.count() >= 3 && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 2]).caseList == this.asts[this.top - 1]; - ~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. - } - - public isDefaultCaseOfSwitch(): boolean { - return this.count() >= 3 && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 2]).caseList == this.asts[this.top - 1] && - ~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. - (this.asts[this.top - 2]).defaultCase == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. - } - - public isListOfObjectLit(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).operand == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. - } - - public isBodyOfObjectLit(): boolean { - return this.isListOfObjectLit(); - } - - public isEmptyListOfObjectLit(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).operand == this.asts[this.top - 0] && - ~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. - (this.asts[this.top - 0]).members.length == 0; - ~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ASTList'. - } - - public isMemberOfObjectLit(): boolean { - return this.count() >= 3 && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.ObjectLit && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 0].nodeType === TypeScript.NodeType.Member && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 2]).operand == this.asts[this.top - 1]; - ~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. - } - - public isNameOfMemberOfObjectLit(): boolean { - return this.count() >= 4 && - this.asts[this.top - 3].nodeType === TypeScript.NodeType.ObjectLit && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 2].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 0].nodeType === TypeScript.NodeType.Name && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 3]).operand == this.asts[this.top - 2]; - ~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. - } - - public isListOfArrayLit(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ArrayLit && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).operand == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. - } - - public isTargetOfMember(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).operand1 === this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'BinaryExpression'. - } - - public isMemberOfMember(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).operand2 === this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'BinaryExpression'. - } - - public isItemOfList(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List; - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - //(this.asts[this.top - 1]).operand2 === this.asts[this.top - 0]; - } - - public isThenOfIf(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).thenBod == this.asts[this.top - 0]; - ~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'IfStatement'. - } - - public isElseOfIf(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).elseBod == this.asts[this.top - 0]; - ~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'IfStatement'. - } - - public isBodyOfDefaultCase(): boolean { - return this.isBodyOfCase(); - } - - public isSingleStatementList(): boolean { - return this.count() >= 1 && - this.asts[this.top].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top]).members.length === 1; - ~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ASTList'. - } - - public isArgumentListOfFunction(): boolean { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; - ~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. - } - - public isArgumentOfFunction(): boolean { - return this.count() >= 3 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 2]).arguments === this.asts[this.top - 1]; - ~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. - } - - public isArgumentListOfCall(): boolean { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Call && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; - ~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'. - } - - public isArgumentListOfNew(): boolean { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 1].nodeType === TypeScript.NodeType.New && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; - ~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'. - } - - public isSynthesizedBlock(): boolean { - return this.count() >= 1 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.Block && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 0]).isStatementBlock === false; - ~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'Block'. - } - } - - export function isValidAstNode(ast: TypeScript.ASTSpan): boolean { - ~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ASTSpan'. - if (ast === null) - return false; - - if (ast.minChar === -1 || ast.limChar === -1) - return false; - - return true; - } - - export class AstPathContext { - public path: AstPath = new TypeScript.AstPath(); - } - - export enum GetAstPathOptions { - Default = 0, - EdgeInclusive = 1, - //We need this options dealing with an AST coming from an incomplete AST. For example: - // class foo { // r - // If we ask for the AST at the position after the "r" character, we won't see we are - // inside a comment, because the "class" AST node has a limChar corresponding to the position of - // the "{" character, meaning we don't traverse the tree down to the stmt list of the class, meaning - // we don't find the "precomment" attached to the errorneous empty stmt. - //TODO: It would be nice to be able to get rid of this. - DontPruneSearchBasedOnPosition = 1 << 1, - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - /// - /// Return the stack of AST nodes containing "position" - /// - export function getAstPathToPosition(script: TypeScript.AST, pos: number, options: GetAstPathOptions = GetAstPathOptions.Default): TypeScript.AstPath { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - var lookInComments = (comments: TypeScript.Comment[]) => { - ~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'Comment'. - if (comments && comments.length > 0) { - for (var i = 0; i < comments.length; i++) { - var minChar = comments[i].minChar; - var limChar = comments[i].limChar; - if (!comments[i].isBlockComment) { - limChar++; // For single line comments, include 1 more character (for the newline) - } - if (pos >= minChar && pos < limChar) { - ctx.path.push(comments[i]); - } - } - } - } - - var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: IAstWalker) { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'IAstWalker'. - if (isValidAstNode(cur)) { - - // Add "cur" to the stack if it contains our position - // For "identifier" nodes, we need a special case: A position equal to "limChar" is - // valid, since the position corresponds to a caret position (in between characters) - // For example: - // bar - // 0123 - // If "position == 3", the caret is at the "right" of the "r" character, which should be considered valid - var inclusive = - hasFlag(options, GetAstPathOptions.EdgeInclusive) || - ~~~~~~~ -!!! error TS2304: Cannot find name 'hasFlag'. - cur.nodeType === TypeScript.NodeType.Name || - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - pos === script.limChar; // Special "EOF" case - - var minChar = cur.minChar; - var limChar = cur.limChar + (inclusive ? 1 : 0) - if (pos >= minChar && pos < limChar) { - - // TODO: Since AST is sometimes not correct wrt to position, only add "cur" if it's better - // than top of the stack. - var previous = ctx.path.ast(); - if (previous == null || (cur.minChar >= previous.minChar && cur.limChar <= previous.limChar)) { - ctx.path.push(cur); - } - else { - //logger.log("TODO: Ignoring node because minChar, limChar not better than previous node in stack"); - } - } - - // The AST walker skips comments, but we might be in one, so check the pre/post comments for this node manually - if (pos < limChar) { - lookInComments(cur.preComments); - } - if (pos >= minChar) { - lookInComments(cur.postComments); - } - - if (!hasFlag(options, GetAstPathOptions.DontPruneSearchBasedOnPosition)) { - ~~~~~~~ -!!! error TS2304: Cannot find name 'hasFlag'. - // Don't go further down the tree if pos is outside of [minChar, limChar] - walker.options.goChildren = (minChar <= pos && pos <= limChar); - } - } - return cur; - } - - var ctx = new AstPathContext(); - TypeScript.getAstWalkerFactory().walk(script, pre, null, null, ctx); - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. - return ctx.path; - } - - // - // Find a source text offset that is safe for lexing tokens at the given position. - // This is used when "position" might be inside a comment or string, etc. - // - export function getTokenizationOffset(script: TypeScript.Script, position: number): number { - ~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'Script'. - var bestOffset = 0; - var pre = (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker): TypeScript.AST => { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - ~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - if (TypeScript.isValidAstNode(cur)) { - // Did we find a closer offset? - if (cur.minChar <= position) { - bestOffset = max(bestOffset, cur.minChar); - } - - // Stop the walk if this node is not related to "minChar" - if (cur.minChar > position || cur.limChar < bestOffset) { - walker.options.goChildren = false; - } - } - - return cur; - } - - TypeScript.getAstWalkerFactory().walk(script, pre); - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. - return bestOffset; - } - - /// - /// Simple function to Walk an AST using a simple callback function. - /// - export function walkAST(ast: TypeScript.AST, callback: (path: AstPath, walker: TypeScript.IAstWalker) => void ): void { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - ~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. - var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - ~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. - var path: TypeScript.AstPath = walker.state; - path.push(cur); - callback(path, walker); - return cur; - } - var post = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - ~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. - var path: TypeScript.AstPath = walker.state; - path.pop(); - return cur; - } - - var path = new AstPath(); - TypeScript.getAstWalkerFactory().walk(ast, pre, post, null, path); - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource2.d.ts deleted file mode 100644 index 4b7851bf04f81..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource2.d.ts +++ /dev/null @@ -1,1218 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/parserRealSource2.ts] //// - -//// [parserRealSource2.ts] -// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. -// See LICENSE.txt in the project root for complete license information. - -/// - -module TypeScript { - - export function hasFlag(val: number, flag: number): boolean { - return (val & flag) != 0; - } - - export enum ErrorRecoverySet { - None = 0, - Comma = 1, // Comma - SColon = 1 << 1, // SColon - Asg = 1 << 2, // Asg - BinOp = 1 << 3, // Lsh, Rsh, Rs2, Le, Ge, INSTANCEOF, EQ, NE, Eqv, NEqv, LogAnd, LogOr, AsgMul, AsgDiv - // AsgMod, AsgAdd, AsgSub, AsgLsh, AsgRsh, AsgRs2, AsgAnd, AsgXor, AsgOr, QMark, Mult, Div, - // Pct, GT, LT, And, Xor, Or - RBrack = 1 << 4, // RBrack - RCurly = 1 << 5, // RCurly - RParen = 1 << 6, // RParen - Dot = 1 << 7, // Dot - Colon = 1 << 8, // Colon - PrimType = 1 << 9, // number, string, boolean - AddOp = 1 << 10, // Add, Sub - LCurly = 1 << 11, // LCurly - PreOp = 1 << 12, // Tilde, Bang, Inc, Dec - RegExp = 1 << 13, // RegExp - LParen = 1 << 14, // LParen - LBrack = 1 << 15, // LBrack - Scope = 1 << 16, // Scope - In = 1 << 17, // IN - SCase = 1 << 18, // CASE, DEFAULT - Else = 1 << 19, // ELSE - Catch = 1 << 20, // CATCH, FINALLY - Var = 1 << 21, // - Stmt = 1 << 22, // BREAK, RETURN, THROW, DEBUGGER, FOR, SWITCH, DO, IF, TRY, WITH - While = 1 << 23, // WHILE - ID = 1 << 24, // ID - Prefix = 1 << 25, // VOID, DELETE, TYPEOF, AWAIT - Literal = 1 << 26, // IntCon, FltCon, StrCon - RLit = 1 << 27, // THIS, TRUE, FALSE, NULL - Func = 1 << 28, // FUNCTION - EOF = 1 << 29, // EOF - - // REVIEW: Name this something clearer. - TypeScriptS = 1 << 30, // PROPERTY, PRIVATE, STATIC, INTERFACE, CLASS, MODULE, EXPORT, IMPORT - ExprStart = SColon | AddOp | LCurly | PreOp | RegExp | LParen | LBrack | ID | Prefix | RLit | Func | Literal, - StmtStart = ExprStart | SColon | Var | Stmt | While | TypeScriptS, - Postfix = Dot | LParen | LBrack, - } - - export enum AllowedElements { - None = 0, - ModuleDeclarations = 1 << 2, - ClassDeclarations = 1 << 3, - InterfaceDeclarations = 1 << 4, - AmbientDeclarations = 1 << 10, - Properties = 1 << 11, - - Global = ModuleDeclarations | ClassDeclarations | InterfaceDeclarations | AmbientDeclarations, - QuickParse = Global | Properties, - } - - export enum Modifiers { - None = 0, - Private = 1, - Public = 1 << 1, - Readonly = 1 << 2, - Ambient = 1 << 3, - Exported = 1 << 4, - Getter = 1 << 5, - Setter = 1 << 6, - Static = 1 << 7, - } - - export enum ASTFlags { - None = 0, - ExplicitSemicolon = 1, // statment terminated by an explicit semicolon - AutomaticSemicolon = 1 << 1, // statment terminated by an automatic semicolon - Writeable = 1 << 2, // node is lhs that can be modified - Error = 1 << 3, // node has an error - DotLHSPartial = 1 << 4, // node is the lhs of an incomplete dot expr at cursor - DotLHS = 1 << 5, // node is the lhs of a dot expr - IsStatement = 1 << 6, // node is a statement - StrictMode = 1 << 7, // node is in the strict mode environment - PossibleOptionalParameter = 1 << 8, - ClassBaseConstructorCall = 1 << 9, - OptionalName = 1 << 10, - // REVIEW: This flag is to mark lambda nodes to note that the LParen of an expression has already been matched in the lambda header. - // The flag is used to communicate this piece of information to the calling parseTerm, which intern will remove it. - // Once we have a better way to associate information with nodes, this flag should not be used. - SkipNextRParen = 1 << 11, - } - - export enum DeclFlags { - None = 0, - Exported = 1, - Private = 1 << 1, - Public = 1 << 2, - Ambient = 1 << 3, - Static = 1 << 4, - LocalStatic = 1 << 5, - GetAccessor = 1 << 6, - SetAccessor = 1 << 7, - } - - export enum ModuleFlags { - None = 0, - Exported = 1, - Private = 1 << 1, - Public = 1 << 2, - Ambient = 1 << 3, - Static = 1 << 4, - LocalStatic = 1 << 5, - GetAccessor = 1 << 6, - SetAccessor = 1 << 7, - IsEnum = 1 << 8, - ShouldEmitModuleDecl = 1 << 9, - IsWholeFile = 1 << 10, - IsDynamic = 1 << 11, - MustCaptureThis = 1 << 12, - } - - export enum SymbolFlags { - None = 0, - Exported = 1, - Private = 1 << 1, - Public = 1 << 2, - Ambient = 1 << 3, - Static = 1 << 4, - LocalStatic = 1 << 5, - GetAccessor = 1 << 6, - SetAccessor = 1 << 7, - Property = 1 << 8, - Readonly = 1 << 9, - ModuleMember = 1 << 10, - InterfaceMember = 1 << 11, - ClassMember = 1 << 12, - BuiltIn = 1 << 13, - TypeSetDuringScopeAssignment = 1 << 14, - Constant = 1 << 15, - Optional = 1 << 16, - RecursivelyReferenced = 1 << 17, - Bound = 1 << 18, - CompilerGenerated = 1 << 19, - } - - export enum VarFlags { - None = 0, - Exported = 1, - Private = 1 << 1, - Public = 1 << 2, - Ambient = 1 << 3, - Static = 1 << 4, - LocalStatic = 1 << 5, - GetAccessor = 1 << 6, - SetAccessor = 1 << 7, - AutoInit = 1 << 8, - Property = 1 << 9, - Readonly = 1 << 10, - Class = 1 << 11, - ClassProperty = 1 << 12, - ClassBodyProperty = 1 << 13, - ClassConstructorProperty = 1 << 14, - ClassSuperMustBeFirstCallInConstructor = 1 << 15, - Constant = 1 << 16, - MustCaptureThis = 1 << 17, - } - - export enum FncFlags { - None = 0, - Exported = 1, - Private = 1 << 1, - Public = 1 << 2, - Ambient = 1 << 3, - Static = 1 << 4, - LocalStatic = 1 << 5, - GetAccessor = 1 << 6, - SetAccessor = 1 << 7, - Definition = 1 << 8, - Signature = 1 << 9, - Method = 1 << 10, - HasReturnExpression = 1 << 11, - CallMember = 1 << 12, - ConstructMember = 1 << 13, - HasSelfReference = 1 << 14, - IsFatArrowFunction = 1 << 15, - IndexerMember = 1 << 16, - IsFunctionExpression = 1 << 17, - ClassMethod = 1 << 18, - ClassPropertyMethodExported = 1 << 19, - } - - export enum SignatureFlags { - None = 0, - IsIndexer = 1, - IsStringIndexer = 1 << 1, - IsNumberIndexer = 1 << 2, - } - - export function ToDeclFlags(fncFlags: FncFlags) : DeclFlags; - export function ToDeclFlags(varFlags: VarFlags) : DeclFlags; - export function ToDeclFlags(symFlags: SymbolFlags): DeclFlags; - export function ToDeclFlags(moduleFlags: ModuleFlags): DeclFlags; - export function ToDeclFlags(fncOrVarOrSymbolOrModuleFlags: any) { - return fncOrVarOrSymbolOrModuleFlags; - } - - export enum TypeFlags { - None = 0, - HasImplementation = 1, - HasSelfReference = 1 << 1, - MergeResult = 1 << 2, - IsEnum = 1 << 3, - BuildingName = 1 << 4, - HasBaseType = 1 << 5, - HasBaseTypeOfObject = 1 << 6, - IsClass = 1 << 7, - } - - export enum TypeRelationshipFlags { - SuccessfulComparison = 0, - SourceIsNullTargetIsVoidOrUndefined = 1, - RequiredPropertyIsMissing = 1 << 1, - IncompatibleSignatures = 1 << 2, - SourceSignatureHasTooManyParameters = 3, - IncompatibleReturnTypes = 1 << 4, - IncompatiblePropertyTypes = 1 << 5, - IncompatibleParameterTypes = 1 << 6, - } - - export enum CodeGenTarget { - ES3 = 0, - ES5 = 1, - } - - export enum ModuleGenTarget { - Synchronous = 0, - Asynchronous = 1, - Local = 1 << 1, - } - - // Compiler defaults to generating ES5-compliant code for - // - getters and setters - export var codeGenTarget: CodeGenTarget = CodeGenTarget.ES3; - - export var moduleGenTarget: ModuleGenTarget = ModuleGenTarget.Synchronous; - - export var optimizeModuleCodeGen = true; - - export function flagsToString(e: any, flags: number): string { - var builder = ""; - for (var i = 1; i < (1 << 31) ; i = i << 1) { - if ((flags & i) != 0) { - for (var k in e) { - if (e[k] == i) { - if (builder.length > 0) { - builder += "|"; - } - builder += k; - break; - } - } - } - } - return builder; - } - -} - -/// [Declarations] //// - - - -//// [parserRealSource2.d.ts] -declare namespace TypeScript { - function hasFlag(val: number, flag: number): boolean; - enum ErrorRecoverySet { - None = 0, - Comma = 1,// Comma - SColon = 2,// SColon - Asg = 4,// Asg - BinOp = 8,// Lsh, Rsh, Rs2, Le, Ge, INSTANCEOF, EQ, NE, Eqv, NEqv, LogAnd, LogOr, AsgMul, AsgDiv - RBrack = 16,// RBrack - RCurly = 32,// RCurly - RParen = 64,// RParen - Dot = 128,// Dot - Colon = 256,// Colon - PrimType = 512,// number, string, boolean - AddOp = 1024,// Add, Sub - LCurly = 2048,// LCurly - PreOp = 4096,// Tilde, Bang, Inc, Dec - RegExp = 8192,// RegExp - LParen = 16384,// LParen - LBrack = 32768,// LBrack - Scope = 65536,// Scope - In = 131072,// IN - SCase = 262144,// CASE, DEFAULT - Else = 524288,// ELSE - Catch = 1048576,// CATCH, FINALLY - Var = 2097152,// - Stmt = 4194304,// BREAK, RETURN, THROW, DEBUGGER, FOR, SWITCH, DO, IF, TRY, WITH - While = 8388608,// WHILE - ID = 16777216,// ID - Prefix = 33554432,// VOID, DELETE, TYPEOF, AWAIT - Literal = 67108864,// IntCon, FltCon, StrCon - RLit = 134217728,// THIS, TRUE, FALSE, NULL - Func = 268435456,// FUNCTION - EOF = 536870912,// EOF - TypeScriptS = 1073741824,// PROPERTY, PRIVATE, STATIC, INTERFACE, CLASS, MODULE, EXPORT, IMPORT - ExprStart = 520158210, - StmtStart = 1608580098, - Postfix = 49280 - } - enum AllowedElements { - None = 0, - ModuleDeclarations = 4, - ClassDeclarations = 8, - InterfaceDeclarations = 16, - AmbientDeclarations = 1024, - Properties = 2048, - Global = 1052, - QuickParse = 3100 - } - enum Modifiers { - None = 0, - Private = 1, - Public = 2, - Readonly = 4, - Ambient = 8, - Exported = 16, - Getter = 32, - Setter = 64, - Static = 128 - } - enum ASTFlags { - None = 0, - ExplicitSemicolon = 1,// statment terminated by an explicit semicolon - AutomaticSemicolon = 2,// statment terminated by an automatic semicolon - Writeable = 4,// node is lhs that can be modified - Error = 8,// node has an error - DotLHSPartial = 16,// node is the lhs of an incomplete dot expr at cursor - DotLHS = 32,// node is the lhs of a dot expr - IsStatement = 64,// node is a statement - StrictMode = 128,// node is in the strict mode environment - PossibleOptionalParameter = 256, - ClassBaseConstructorCall = 512, - OptionalName = 1024, - SkipNextRParen = 2048 - } - enum DeclFlags { - None = 0, - Exported = 1, - Private = 2, - Public = 4, - Ambient = 8, - Static = 16, - LocalStatic = 32, - GetAccessor = 64, - SetAccessor = 128 - } - enum ModuleFlags { - None = 0, - Exported = 1, - Private = 2, - Public = 4, - Ambient = 8, - Static = 16, - LocalStatic = 32, - GetAccessor = 64, - SetAccessor = 128, - IsEnum = 256, - ShouldEmitModuleDecl = 512, - IsWholeFile = 1024, - IsDynamic = 2048, - MustCaptureThis = 4096 - } - enum SymbolFlags { - None = 0, - Exported = 1, - Private = 2, - Public = 4, - Ambient = 8, - Static = 16, - LocalStatic = 32, - GetAccessor = 64, - SetAccessor = 128, - Property = 256, - Readonly = 512, - ModuleMember = 1024, - InterfaceMember = 2048, - ClassMember = 4096, - BuiltIn = 8192, - TypeSetDuringScopeAssignment = 16384, - Constant = 32768, - Optional = 65536, - RecursivelyReferenced = 131072, - Bound = 262144, - CompilerGenerated = 524288 - } - enum VarFlags { - None = 0, - Exported = 1, - Private = 2, - Public = 4, - Ambient = 8, - Static = 16, - LocalStatic = 32, - GetAccessor = 64, - SetAccessor = 128, - AutoInit = 256, - Property = 512, - Readonly = 1024, - Class = 2048, - ClassProperty = 4096, - ClassBodyProperty = 8192, - ClassConstructorProperty = 16384, - ClassSuperMustBeFirstCallInConstructor = 32768, - Constant = 65536, - MustCaptureThis = 131072 - } - enum FncFlags { - None = 0, - Exported = 1, - Private = 2, - Public = 4, - Ambient = 8, - Static = 16, - LocalStatic = 32, - GetAccessor = 64, - SetAccessor = 128, - Definition = 256, - Signature = 512, - Method = 1024, - HasReturnExpression = 2048, - CallMember = 4096, - ConstructMember = 8192, - HasSelfReference = 16384, - IsFatArrowFunction = 32768, - IndexerMember = 65536, - IsFunctionExpression = 131072, - ClassMethod = 262144, - ClassPropertyMethodExported = 524288 - } - enum SignatureFlags { - None = 0, - IsIndexer = 1, - IsStringIndexer = 2, - IsNumberIndexer = 4 - } - function ToDeclFlags(fncFlags: FncFlags): DeclFlags; - function ToDeclFlags(varFlags: VarFlags): DeclFlags; - function ToDeclFlags(symFlags: SymbolFlags): DeclFlags; - function ToDeclFlags(moduleFlags: ModuleFlags): DeclFlags; - enum TypeFlags { - None = 0, - HasImplementation = 1, - HasSelfReference = 2, - MergeResult = 4, - IsEnum = 8, - BuildingName = 16, - HasBaseType = 32, - HasBaseTypeOfObject = 64, - IsClass = 128 - } - enum TypeRelationshipFlags { - SuccessfulComparison = 0, - SourceIsNullTargetIsVoidOrUndefined = 1, - RequiredPropertyIsMissing = 2, - IncompatibleSignatures = 4, - SourceSignatureHasTooManyParameters = 3, - IncompatibleReturnTypes = 16, - IncompatiblePropertyTypes = 32, - IncompatibleParameterTypes = 64 - } - enum CodeGenTarget { - ES3 = 0, - ES5 = 1 - } - enum ModuleGenTarget { - Synchronous = 0, - Asynchronous = 1, - Local = 2 - } - var codeGenTarget: CodeGenTarget; - var moduleGenTarget: ModuleGenTarget; - var optimizeModuleCodeGen: boolean; - function flagsToString(e: any, flags: number): string; -} - -/// [Errors] //// - -parserRealSource2.ts(4,21): error TS6053: File 'typescript.ts' not found. -parserRealSource2.ts(4,21): error TS9010: Reference directives are not supported in isolated declaration mode. -parserRealSource2.ts(15,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(16,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(17,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(20,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(21,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(22,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(23,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(24,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(25,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(26,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(27,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(28,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(29,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(30,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(31,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(32,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(33,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(34,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(35,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(36,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(37,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(38,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(39,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(40,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(41,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(42,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(43,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(44,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(45,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(48,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(49,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(50,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(51,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(56,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(57,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(58,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(59,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(60,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(62,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(63,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(69,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(70,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(71,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(72,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(73,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(74,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(75,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(81,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(82,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(83,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(84,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(85,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(86,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(87,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(88,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(89,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(90,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(94,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(100,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(101,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(102,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(103,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(104,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(105,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(106,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(112,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(113,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(114,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(115,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(116,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(117,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(118,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(119,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(120,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(121,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(122,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(123,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(129,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(130,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(131,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(132,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(133,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(134,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(135,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(136,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(137,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(138,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(139,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(140,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(141,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(142,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(143,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(144,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(145,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(146,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(147,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(153,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(154,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(155,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(156,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(157,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(158,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(159,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(160,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(161,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(162,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(163,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(164,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(165,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(166,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(167,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(168,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(169,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(175,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(176,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(177,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(178,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(179,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(180,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(181,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(182,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(183,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(184,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(185,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(186,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(187,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(188,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(189,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(190,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(191,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(192,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(193,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(199,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(200,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(214,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(215,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(216,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(217,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(218,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(219,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(220,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(226,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(227,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(229,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(230,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(231,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource2.ts(242,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== parserRealSource2.ts (149 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// - ~~~~~~~~~~~~~ -!!! error TS6053: File 'typescript.ts' not found. - ~~~~~~~~~~~~~ -!!! error TS9010: Reference directives are not supported in isolated declaration mode. - - module TypeScript { - - export function hasFlag(val: number, flag: number): boolean { - return (val & flag) != 0; - } - - export enum ErrorRecoverySet { - None = 0, - Comma = 1, // Comma - SColon = 1 << 1, // SColon - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Asg = 1 << 2, // Asg - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - BinOp = 1 << 3, // Lsh, Rsh, Rs2, Le, Ge, INSTANCEOF, EQ, NE, Eqv, NEqv, LogAnd, LogOr, AsgMul, AsgDiv - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - // AsgMod, AsgAdd, AsgSub, AsgLsh, AsgRsh, AsgRs2, AsgAnd, AsgXor, AsgOr, QMark, Mult, Div, - // Pct, GT, LT, And, Xor, Or - RBrack = 1 << 4, // RBrack - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - RCurly = 1 << 5, // RCurly - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - RParen = 1 << 6, // RParen - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Dot = 1 << 7, // Dot - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Colon = 1 << 8, // Colon - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - PrimType = 1 << 9, // number, string, boolean - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - AddOp = 1 << 10, // Add, Sub - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - LCurly = 1 << 11, // LCurly - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - PreOp = 1 << 12, // Tilde, Bang, Inc, Dec - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - RegExp = 1 << 13, // RegExp - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - LParen = 1 << 14, // LParen - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - LBrack = 1 << 15, // LBrack - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Scope = 1 << 16, // Scope - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - In = 1 << 17, // IN - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - SCase = 1 << 18, // CASE, DEFAULT - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Else = 1 << 19, // ELSE - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Catch = 1 << 20, // CATCH, FINALLY - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Var = 1 << 21, // - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Stmt = 1 << 22, // BREAK, RETURN, THROW, DEBUGGER, FOR, SWITCH, DO, IF, TRY, WITH - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - While = 1 << 23, // WHILE - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ID = 1 << 24, // ID - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Prefix = 1 << 25, // VOID, DELETE, TYPEOF, AWAIT - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Literal = 1 << 26, // IntCon, FltCon, StrCon - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - RLit = 1 << 27, // THIS, TRUE, FALSE, NULL - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Func = 1 << 28, // FUNCTION - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - EOF = 1 << 29, // EOF - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - // REVIEW: Name this something clearer. - TypeScriptS = 1 << 30, // PROPERTY, PRIVATE, STATIC, INTERFACE, CLASS, MODULE, EXPORT, IMPORT - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ExprStart = SColon | AddOp | LCurly | PreOp | RegExp | LParen | LBrack | ID | Prefix | RLit | Func | Literal, - ~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - StmtStart = ExprStart | SColon | Var | Stmt | While | TypeScriptS, - ~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Postfix = Dot | LParen | LBrack, - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum AllowedElements { - None = 0, - ModuleDeclarations = 1 << 2, - ~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ClassDeclarations = 1 << 3, - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - InterfaceDeclarations = 1 << 4, - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - AmbientDeclarations = 1 << 10, - ~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Properties = 1 << 11, - ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - Global = ModuleDeclarations | ClassDeclarations | InterfaceDeclarations | AmbientDeclarations, - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - QuickParse = Global | Properties, - ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum Modifiers { - None = 0, - Private = 1, - Public = 1 << 1, - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Readonly = 1 << 2, - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Ambient = 1 << 3, - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Exported = 1 << 4, - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Getter = 1 << 5, - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Setter = 1 << 6, - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Static = 1 << 7, - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum ASTFlags { - None = 0, - ExplicitSemicolon = 1, // statment terminated by an explicit semicolon - AutomaticSemicolon = 1 << 1, // statment terminated by an automatic semicolon - ~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Writeable = 1 << 2, // node is lhs that can be modified - ~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Error = 1 << 3, // node has an error - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - DotLHSPartial = 1 << 4, // node is the lhs of an incomplete dot expr at cursor - ~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - DotLHS = 1 << 5, // node is the lhs of a dot expr - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IsStatement = 1 << 6, // node is a statement - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - StrictMode = 1 << 7, // node is in the strict mode environment - ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - PossibleOptionalParameter = 1 << 8, - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ClassBaseConstructorCall = 1 << 9, - ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - OptionalName = 1 << 10, - ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - // REVIEW: This flag is to mark lambda nodes to note that the LParen of an expression has already been matched in the lambda header. - // The flag is used to communicate this piece of information to the calling parseTerm, which intern will remove it. - // Once we have a better way to associate information with nodes, this flag should not be used. - SkipNextRParen = 1 << 11, - ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum DeclFlags { - None = 0, - Exported = 1, - Private = 1 << 1, - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Public = 1 << 2, - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Ambient = 1 << 3, - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Static = 1 << 4, - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - LocalStatic = 1 << 5, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - GetAccessor = 1 << 6, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - SetAccessor = 1 << 7, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum ModuleFlags { - None = 0, - Exported = 1, - Private = 1 << 1, - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Public = 1 << 2, - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Ambient = 1 << 3, - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Static = 1 << 4, - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - LocalStatic = 1 << 5, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - GetAccessor = 1 << 6, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - SetAccessor = 1 << 7, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IsEnum = 1 << 8, - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ShouldEmitModuleDecl = 1 << 9, - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IsWholeFile = 1 << 10, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IsDynamic = 1 << 11, - ~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - MustCaptureThis = 1 << 12, - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum SymbolFlags { - None = 0, - Exported = 1, - Private = 1 << 1, - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Public = 1 << 2, - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Ambient = 1 << 3, - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Static = 1 << 4, - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - LocalStatic = 1 << 5, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - GetAccessor = 1 << 6, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - SetAccessor = 1 << 7, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Property = 1 << 8, - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Readonly = 1 << 9, - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ModuleMember = 1 << 10, - ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - InterfaceMember = 1 << 11, - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ClassMember = 1 << 12, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - BuiltIn = 1 << 13, - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - TypeSetDuringScopeAssignment = 1 << 14, - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Constant = 1 << 15, - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Optional = 1 << 16, - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - RecursivelyReferenced = 1 << 17, - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Bound = 1 << 18, - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - CompilerGenerated = 1 << 19, - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum VarFlags { - None = 0, - Exported = 1, - Private = 1 << 1, - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Public = 1 << 2, - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Ambient = 1 << 3, - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Static = 1 << 4, - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - LocalStatic = 1 << 5, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - GetAccessor = 1 << 6, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - SetAccessor = 1 << 7, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - AutoInit = 1 << 8, - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Property = 1 << 9, - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Readonly = 1 << 10, - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Class = 1 << 11, - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ClassProperty = 1 << 12, - ~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ClassBodyProperty = 1 << 13, - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ClassConstructorProperty = 1 << 14, - ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ClassSuperMustBeFirstCallInConstructor = 1 << 15, - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Constant = 1 << 16, - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - MustCaptureThis = 1 << 17, - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum FncFlags { - None = 0, - Exported = 1, - Private = 1 << 1, - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Public = 1 << 2, - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Ambient = 1 << 3, - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Static = 1 << 4, - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - LocalStatic = 1 << 5, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - GetAccessor = 1 << 6, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - SetAccessor = 1 << 7, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Definition = 1 << 8, - ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Signature = 1 << 9, - ~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Method = 1 << 10, - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - HasReturnExpression = 1 << 11, - ~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - CallMember = 1 << 12, - ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ConstructMember = 1 << 13, - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - HasSelfReference = 1 << 14, - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IsFatArrowFunction = 1 << 15, - ~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IndexerMember = 1 << 16, - ~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IsFunctionExpression = 1 << 17, - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ClassMethod = 1 << 18, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ClassPropertyMethodExported = 1 << 19, - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum SignatureFlags { - None = 0, - IsIndexer = 1, - IsStringIndexer = 1 << 1, - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IsNumberIndexer = 1 << 2, - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export function ToDeclFlags(fncFlags: FncFlags) : DeclFlags; - export function ToDeclFlags(varFlags: VarFlags) : DeclFlags; - export function ToDeclFlags(symFlags: SymbolFlags): DeclFlags; - export function ToDeclFlags(moduleFlags: ModuleFlags): DeclFlags; - export function ToDeclFlags(fncOrVarOrSymbolOrModuleFlags: any) { - return fncOrVarOrSymbolOrModuleFlags; - } - - export enum TypeFlags { - None = 0, - HasImplementation = 1, - HasSelfReference = 1 << 1, - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - MergeResult = 1 << 2, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IsEnum = 1 << 3, - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - BuildingName = 1 << 4, - ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - HasBaseType = 1 << 5, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - HasBaseTypeOfObject = 1 << 6, - ~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IsClass = 1 << 7, - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum TypeRelationshipFlags { - SuccessfulComparison = 0, - SourceIsNullTargetIsVoidOrUndefined = 1, - RequiredPropertyIsMissing = 1 << 1, - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IncompatibleSignatures = 1 << 2, - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - SourceSignatureHasTooManyParameters = 3, - IncompatibleReturnTypes = 1 << 4, - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IncompatiblePropertyTypes = 1 << 5, - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - IncompatibleParameterTypes = 1 << 6, - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - export enum CodeGenTarget { - ES3 = 0, - ES5 = 1, - } - - export enum ModuleGenTarget { - Synchronous = 0, - Asynchronous = 1, - Local = 1 << 1, - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - // Compiler defaults to generating ES5-compliant code for - // - getters and setters - export var codeGenTarget: CodeGenTarget = CodeGenTarget.ES3; - - export var moduleGenTarget: ModuleGenTarget = ModuleGenTarget.Synchronous; - - export var optimizeModuleCodeGen = true; - - export function flagsToString(e: any, flags: number): string { - var builder = ""; - for (var i = 1; i < (1 << 31) ; i = i << 1) { - if ((flags & i) != 0) { - for (var k in e) { - if (e[k] == i) { - if (builder.length > 0) { - builder += "|"; - } - builder += k; - break; - } - } - } - } - return builder; - } - - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource3.d.ts deleted file mode 100644 index 7ba31307ac4a3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserRealSource3.d.ts +++ /dev/null @@ -1,378 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/parserRealSource3.ts] //// - -//// [parserRealSource3.ts] -// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. -// See LICENSE.txt in the project root for complete license information. - -/// - -module TypeScript { - // Note: Any addition to the NodeType should also be supported with addition to AstWalkerDetailCallback - export enum NodeType { - None, - Empty, - EmptyExpr, - True, - False, - This, - Super, - QString, - Regex, - Null, - ArrayLit, - ObjectLit, - Void, - Comma, - Pos, - Neg, - Delete, - Await, - In, - Dot, - From, - Is, - InstOf, - Typeof, - NumberLit, - Name, - TypeRef, - Index, - Call, - New, - Asg, - AsgAdd, - AsgSub, - AsgDiv, - AsgMul, - AsgMod, - AsgAnd, - AsgXor, - AsgOr, - AsgLsh, - AsgRsh, - AsgRs2, - ConditionalExpression, - LogOr, - LogAnd, - Or, - Xor, - And, - Eq, - Ne, - Eqv, - NEqv, - Lt, - Le, - Gt, - Ge, - Add, - Sub, - Mul, - Div, - Mod, - Lsh, - Rsh, - Rs2, - Not, - LogNot, - IncPre, - DecPre, - IncPost, - DecPost, - TypeAssertion, - FuncDecl, - Member, - VarDecl, - ArgDecl, - Return, - Break, - Continue, - Throw, - For, - ForIn, - If, - While, - DoWhile, - Block, - Case, - Switch, - Try, - TryCatch, - TryFinally, - Finally, - Catch, - List, - Script, - ClassDeclaration, - InterfaceDeclaration, - ModuleDeclaration, - ImportDeclaration, - With, - Label, - LabeledStatement, - EBStart, - GotoEB, - EndCode, - Error, - Comment, - Debugger, - GeneralNode = FuncDecl, - LastAsg = AsgRs2, - } -} - -/// [Declarations] //// - - - -//// [parserRealSource3.d.ts] -declare namespace TypeScript { - enum NodeType { - None = 0, - Empty = 1, - EmptyExpr = 2, - True = 3, - False = 4, - This = 5, - Super = 6, - QString = 7, - Regex = 8, - Null = 9, - ArrayLit = 10, - ObjectLit = 11, - Void = 12, - Comma = 13, - Pos = 14, - Neg = 15, - Delete = 16, - Await = 17, - In = 18, - Dot = 19, - From = 20, - Is = 21, - InstOf = 22, - Typeof = 23, - NumberLit = 24, - Name = 25, - TypeRef = 26, - Index = 27, - Call = 28, - New = 29, - Asg = 30, - AsgAdd = 31, - AsgSub = 32, - AsgDiv = 33, - AsgMul = 34, - AsgMod = 35, - AsgAnd = 36, - AsgXor = 37, - AsgOr = 38, - AsgLsh = 39, - AsgRsh = 40, - AsgRs2 = 41, - ConditionalExpression = 42, - LogOr = 43, - LogAnd = 44, - Or = 45, - Xor = 46, - And = 47, - Eq = 48, - Ne = 49, - Eqv = 50, - NEqv = 51, - Lt = 52, - Le = 53, - Gt = 54, - Ge = 55, - Add = 56, - Sub = 57, - Mul = 58, - Div = 59, - Mod = 60, - Lsh = 61, - Rsh = 62, - Rs2 = 63, - Not = 64, - LogNot = 65, - IncPre = 66, - DecPre = 67, - IncPost = 68, - DecPost = 69, - TypeAssertion = 70, - FuncDecl = 71, - Member = 72, - VarDecl = 73, - ArgDecl = 74, - Return = 75, - Break = 76, - Continue = 77, - Throw = 78, - For = 79, - ForIn = 80, - If = 81, - While = 82, - DoWhile = 83, - Block = 84, - Case = 85, - Switch = 86, - Try = 87, - TryCatch = 88, - TryFinally = 89, - Finally = 90, - Catch = 91, - List = 92, - Script = 93, - ClassDeclaration = 94, - InterfaceDeclaration = 95, - ModuleDeclaration = 96, - ImportDeclaration = 97, - With = 98, - Label = 99, - LabeledStatement = 100, - EBStart = 101, - GotoEB = 102, - EndCode = 103, - Error = 104, - Comment = 105, - Debugger = 106, - GeneralNode = 71, - LastAsg = 41 - } -} - -/// [Errors] //// - -parserRealSource3.ts(4,21): error TS6053: File 'typescript.ts' not found. -parserRealSource3.ts(4,21): error TS9010: Reference directives are not supported in isolated declaration mode. -parserRealSource3.ts(116,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserRealSource3.ts(117,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== parserRealSource3.ts (4 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// - ~~~~~~~~~~~~~ -!!! error TS6053: File 'typescript.ts' not found. - ~~~~~~~~~~~~~ -!!! error TS9010: Reference directives are not supported in isolated declaration mode. - - module TypeScript { - // Note: Any addition to the NodeType should also be supported with addition to AstWalkerDetailCallback - export enum NodeType { - None, - Empty, - EmptyExpr, - True, - False, - This, - Super, - QString, - Regex, - Null, - ArrayLit, - ObjectLit, - Void, - Comma, - Pos, - Neg, - Delete, - Await, - In, - Dot, - From, - Is, - InstOf, - Typeof, - NumberLit, - Name, - TypeRef, - Index, - Call, - New, - Asg, - AsgAdd, - AsgSub, - AsgDiv, - AsgMul, - AsgMod, - AsgAnd, - AsgXor, - AsgOr, - AsgLsh, - AsgRsh, - AsgRs2, - ConditionalExpression, - LogOr, - LogAnd, - Or, - Xor, - And, - Eq, - Ne, - Eqv, - NEqv, - Lt, - Le, - Gt, - Ge, - Add, - Sub, - Mul, - Div, - Mod, - Lsh, - Rsh, - Rs2, - Not, - LogNot, - IncPre, - DecPre, - IncPost, - DecPost, - TypeAssertion, - FuncDecl, - Member, - VarDecl, - ArgDecl, - Return, - Break, - Continue, - Throw, - For, - ForIn, - If, - While, - DoWhile, - Block, - Case, - Switch, - Try, - TryCatch, - TryFinally, - Finally, - Catch, - List, - Script, - ClassDeclaration, - InterfaceDeclaration, - ModuleDeclaration, - ImportDeclaration, - With, - Label, - LabeledStatement, - EBStart, - GotoEB, - EndCode, - Error, - Comment, - Debugger, - GeneralNode = FuncDecl, - ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - LastAsg = AsgRs2, - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserSkippedTokens16.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserSkippedTokens16.d.ts deleted file mode 100644 index 6162e3a5fbd7a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserSkippedTokens16.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens16.ts] //// - -//// [parserSkippedTokens16.ts] -foo(): Bar { } -function Foo (): any ¬ { } -4+:5 -module M { -function a( - : T) { } -} -var x = - -/// [Declarations] //// - - - -//// [parserSkippedTokens16.d.ts] -declare function Foo(): any; -declare namespace M { -} -declare var x: invalid; - -/// [Errors] //// - -parserSkippedTokens16.ts(1,1): error TS2552: Cannot find name 'foo'. Did you mean 'Foo'? -parserSkippedTokens16.ts(1,6): error TS1005: ';' expected. -parserSkippedTokens16.ts(1,8): error TS1434: Unexpected keyword or identifier. -parserSkippedTokens16.ts(1,8): error TS2304: Cannot find name 'Bar'. -parserSkippedTokens16.ts(2,27): error TS1127: Invalid character. -parserSkippedTokens16.ts(3,3): error TS1109: Expression expected. -parserSkippedTokens16.ts(6,5): error TS1138: Parameter declaration expected. -parserSkippedTokens16.ts(8,14): error TS1109: Expression expected. -parserSkippedTokens16.ts(8,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== parserSkippedTokens16.ts (9 errors) ==== - foo(): Bar { } - ~~~ -!!! error TS2552: Cannot find name 'foo'. Did you mean 'Foo'? -!!! related TS2728 parserSkippedTokens16.ts:2:10: 'Foo' is declared here. - ~ -!!! error TS1005: ';' expected. - ~~~ -!!! error TS1434: Unexpected keyword or identifier. - ~~~ -!!! error TS2304: Cannot find name 'Bar'. - function Foo (): any ¬ { } - ~ -!!! error TS1127: Invalid character. - 4+:5 - ~ -!!! error TS1109: Expression expected. - module M { - function a( - : T) { } - ~ -!!! error TS1138: Parameter declaration expected. - } - var x = - -!!! error TS1109: Expression expected. - -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserStrictMode8.d.ts deleted file mode 100644 index 266fdfaabb347..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parserStrictMode8.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts] //// - -//// [parserStrictMode8.ts] -"use strict"; -function eval() { -} - -/// [Declarations] //// - - - -//// [parserStrictMode8.d.ts] -declare function eval(): invalid; - -/// [Errors] //// - -parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. -parserStrictMode8.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== parserStrictMode8.ts (2 errors) ==== - "use strict"; - function eval() { - ~~~~ -!!! error TS1100: Invalid use of 'eval' in strict mode. - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/preserveConstEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/preserveConstEnums.d.ts deleted file mode 100644 index 43a22b123bea1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/preserveConstEnums.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -//// [tests/cases/compiler/preserveConstEnums.ts] //// - -//// [preserveConstEnums.ts] -const enum E { - Value = 1, Value2 = Value -} - -/// [Declarations] //// - - - -//// [preserveConstEnums.d.ts] -declare const enum E { - Value = 1, - Value2 = 1 -} - -/// [Errors] //// - -preserveConstEnums.ts(2,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== preserveConstEnums.ts (1 errors) ==== - const enum E { - Value = 1, Value2 = Value - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/propertyAssignmentUseParentType3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/propertyAssignmentUseParentType3.d.ts deleted file mode 100644 index 2b4e395387b2a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/propertyAssignmentUseParentType3.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -//// [tests/cases/conformance/salsa/propertyAssignmentUseParentType3.ts] //// - -//// [propertyAssignmentUseParentType3.ts] -// don't use the parent type if it's a function declaration (#33741) - -function foo1(): number { - return 123; -} -foo1.toFixed = ""; - -function foo2(): any[] { - return []; -} -foo2.join = ""; - -function foo3(): string { - return ""; -} -foo3.trim = ""; - -function foo4(): ({x: number}) { - return {x: 123}; -} -foo4.x = "456"; - - -/// [Declarations] //// - - - -//// [propertyAssignmentUseParentType3.d.ts] -declare function foo1(): number; -declare function foo2(): any[]; -declare function foo3(): string; -declare function foo4(): ({ - x: number; -}); - -/// [Errors] //// - -propertyAssignmentUseParentType3.ts(3,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -propertyAssignmentUseParentType3.ts(8,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -propertyAssignmentUseParentType3.ts(13,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -propertyAssignmentUseParentType3.ts(18,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - - -==== propertyAssignmentUseParentType3.ts (4 errors) ==== - // don't use the parent type if it's a function declaration (#33741) - - function foo1(): number { - ~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - return 123; - } - foo1.toFixed = ""; - - function foo2(): any[] { - ~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - return []; - } - foo2.join = ""; - - function foo3(): string { - ~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - return ""; - } - foo3.trim = ""; - - function foo4(): ({x: number}) { - ~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - return {x: 123}; - } - foo4.x = "456"; - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportClassDefinition.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportClassDefinition.d.ts deleted file mode 100644 index 23e77e6a8f115..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportClassDefinition.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -//// [tests/cases/conformance/externalModules/reexportClassDefinition.ts] //// - -//// [foo3.ts] -import foo2 = require('./foo2') -class x extends foo2.x {} - - -//// [foo1.ts] -class x{} -export = x; - -//// [foo2.ts] -import foo1 = require('./foo1'); - -export = { - x: foo1 -} - - -/// [Declarations] //// - - - -//// [foo1.d.ts] -declare class x { -} -export = x; - -//// [foo2.d.ts] -declare const _default: invalid; -export = _default; - -//// [foo3.d.ts] -export {}; - -/// [Errors] //// - -foo2.ts(4,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== foo3.ts (0 errors) ==== - import foo2 = require('./foo2') - class x extends foo2.x {} - - -==== foo1.ts (0 errors) ==== - class x{} - export = x; - -==== foo2.ts (1 errors) ==== - import foo1 = require('./foo1'); - - export = { - x: foo1 - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reservedWords3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reservedWords3.d.ts deleted file mode 100644 index 029dbdc9a2ee7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reservedWords3.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -//// [tests/cases/compiler/reservedWords3.ts] //// - -//// [reservedWords3.ts] -function f1(enum) {} -function f2(class) {} -function f3(function) {} -function f4(while) {} -function f5(for) {} - - -/// [Declarations] //// - - - -//// [reservedWords3.d.ts] -declare function f1(): invalid; -declare enum { -} -declare function f2(): invalid; -declare class { -} -declare function f3(): invalid; -declare function (): invalid; -declare function f4(): invalid; -declare function f5(): invalid; - -/// [Errors] //// - -reservedWords3.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -reservedWords3.ts(1,13): error TS1390: 'enum' is not allowed as a parameter name. -reservedWords3.ts(1,17): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -reservedWords3.ts(1,17): error TS1003: Identifier expected. -reservedWords3.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -reservedWords3.ts(2,13): error TS1390: 'class' is not allowed as a parameter name. -reservedWords3.ts(2,18): error TS1005: '{' expected. -reservedWords3.ts(3,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -reservedWords3.ts(3,13): error TS1390: 'function' is not allowed as a parameter name. -reservedWords3.ts(3,21): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -reservedWords3.ts(3,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -reservedWords3.ts(3,21): error TS1003: Identifier expected. -reservedWords3.ts(4,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -reservedWords3.ts(4,13): error TS1390: 'while' is not allowed as a parameter name. -reservedWords3.ts(4,18): error TS1005: '(' expected. -reservedWords3.ts(5,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -reservedWords3.ts(5,13): error TS1390: 'for' is not allowed as a parameter name. -reservedWords3.ts(5,16): error TS1005: '(' expected. - - -==== reservedWords3.ts (18 errors) ==== - function f1(enum) {} - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ -!!! error TS1390: 'enum' is not allowed as a parameter name. - -!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. - ~ -!!! error TS1003: Identifier expected. - function f2(class) {} - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS1390: 'class' is not allowed as a parameter name. - ~ -!!! error TS1005: '{' expected. - function f3(function) {} - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~ -!!! error TS1390: 'function' is not allowed as a parameter name. - -!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. - -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1003: Identifier expected. - function f4(while) {} - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS1390: 'while' is not allowed as a parameter name. - ~ -!!! error TS1005: '(' expected. - function f5(for) {} - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ -!!! error TS1390: 'for' is not allowed as a parameter name. - ~ -!!! error TS1005: '(' expected. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/staticsInAFunction.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/staticsInAFunction.d.ts deleted file mode 100644 index ea96a70b2588f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/staticsInAFunction.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -//// [tests/cases/compiler/staticsInAFunction.ts] //// - -//// [staticsInAFunction.ts] -function boo{ - static test() - static test(name:string) - static test(name?:any){} -} - - -/// [Declarations] //// - - - -//// [staticsInAFunction.d.ts] -declare function boo(): invalid; - -/// [Errors] //// - -staticsInAFunction.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticsInAFunction.ts(1,13): error TS1005: '(' expected. -staticsInAFunction.ts(2,4): error TS1128: Declaration or statement expected. -staticsInAFunction.ts(2,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. -staticsInAFunction.ts(3,4): error TS1128: Declaration or statement expected. -staticsInAFunction.ts(3,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. -staticsInAFunction.ts(3,16): error TS2304: Cannot find name 'name'. -staticsInAFunction.ts(3,20): error TS1005: ',' expected. -staticsInAFunction.ts(3,21): error TS2693: 'string' only refers to a type, but is being used as a value here. -staticsInAFunction.ts(4,4): error TS1128: Declaration or statement expected. -staticsInAFunction.ts(4,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. -staticsInAFunction.ts(4,16): error TS2304: Cannot find name 'name'. -staticsInAFunction.ts(4,21): error TS1109: Expression expected. -staticsInAFunction.ts(4,22): error TS2693: 'any' only refers to a type, but is being used as a value here. -staticsInAFunction.ts(4,26): error TS1005: ';' expected. - - -==== staticsInAFunction.ts (15 errors) ==== - function boo{ - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1005: '(' expected. - static test() - ~~~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - static test(name:string) - ~~~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - ~~~~ -!!! error TS2304: Cannot find name 'name'. - ~ -!!! error TS1005: ',' expected. - ~~~~~~ -!!! error TS2693: 'string' only refers to a type, but is being used as a value here. - static test(name?:any){} - ~~~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - ~~~~ -!!! error TS2304: Cannot find name 'name'. - ~ -!!! error TS1109: Expression expected. - ~~~ -!!! error TS2693: 'any' only refers to a type, but is being used as a value here. - ~ -!!! error TS1005: ';' expected. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/strictModeOctalLiterals.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/strictModeOctalLiterals.d.ts deleted file mode 100644 index 7869f48e086ea..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/strictModeOctalLiterals.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -//// [tests/cases/conformance/expressions/literals/strictModeOctalLiterals.ts] //// - -//// [strictModeOctalLiterals.ts] -export enum E { - A = 12 + 01 -} -const orbitol: 01 = 01 - - -/// [Declarations] //// - - - -//// [strictModeOctalLiterals.d.ts] -export declare enum E { - A = 13 -} - -/// [Errors] //// - -strictModeOctalLiterals.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -strictModeOctalLiterals.ts(2,14): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. -strictModeOctalLiterals.ts(4,16): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. -strictModeOctalLiterals.ts(4,21): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. - - -==== strictModeOctalLiterals.ts (4 errors) ==== - export enum E { - A = 12 + 01 - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ -!!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'. - } - const orbitol: 01 = 01 - ~~ -!!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'. - ~~ -!!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterType.d.ts deleted file mode 100644 index c4a01e97504f9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterType.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -//// [tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts] //// - -//// [templateStringInFunctionParameterType.ts] -function f(: any: any`hello`): any; -function f(x: string): any; -function f(x: string) { - return x; -} - -/// [Declarations] //// - - - -//// [templateStringInFunctionParameterType.d.ts] -declare function f(any: any, : invalid): any; -declare function f(x: string): any; - -/// [Errors] //// - -templateStringInFunctionParameterType.ts(1,12): error TS1138: Parameter declaration expected. -templateStringInFunctionParameterType.ts(1,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -templateStringInFunctionParameterType.ts(1,22): error TS1005: ',' expected. - - -==== templateStringInFunctionParameterType.ts (3 errors) ==== - function f(: any: any`hello`): any; - ~ -!!! error TS1138: Parameter declaration expected. - -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~ -!!! error TS1005: ',' expected. - function f(x: string): any; - function f(x: string) { - return x; - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterTypeES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterTypeES6.d.ts deleted file mode 100644 index 542961e38ddaa..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringInFunctionParameterTypeES6.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -//// [tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts] //// - -//// [templateStringInFunctionParameterTypeES6.ts] -function f(: any: any`hello`): any; -function f(x: string): any; -function f(x: string) { - return x; -} - -/// [Declarations] //// - - - -//// [templateStringInFunctionParameterTypeES6.d.ts] -declare function f(any: any, : invalid): any; -declare function f(x: string): any; - -/// [Errors] //// - -templateStringInFunctionParameterTypeES6.ts(1,12): error TS1138: Parameter declaration expected. -templateStringInFunctionParameterTypeES6.ts(1,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -templateStringInFunctionParameterTypeES6.ts(1,22): error TS1005: ',' expected. - - -==== templateStringInFunctionParameterTypeES6.ts (3 errors) ==== - function f(: any: any`hello`): any; - ~ -!!! error TS1138: Parameter declaration expected. - -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~ -!!! error TS1005: ',' expected. - function f(x: string): any; - function f(x: string) { - return x; - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringWithEmbeddedYieldKeyword.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringWithEmbeddedYieldKeyword.d.ts deleted file mode 100644 index c4372d80a3afa..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateStringWithEmbeddedYieldKeyword.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -//// [tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts] //// - -//// [templateStringWithEmbeddedYieldKeyword.ts] -function* gen { - // Once this is supported, yield *must* be parenthesized. - var x = `abc${ yield 10 }def`; -} - - -/// [Declarations] //// - - - -//// [templateStringWithEmbeddedYieldKeyword.d.ts] -declare function gen(): invalid; - -/// [Errors] //// - -error TS2318: Cannot find global type 'IterableIterator'. -templateStringWithEmbeddedYieldKeyword.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -templateStringWithEmbeddedYieldKeyword.ts(1,15): error TS1005: '(' expected. - - -!!! error TS2318: Cannot find global type 'IterableIterator'. -==== templateStringWithEmbeddedYieldKeyword.ts (2 errors) ==== - function* gen { - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1005: '(' expected. - // Once this is supported, yield *must* be parenthesized. - var x = `abc${ yield 10 }def`; - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContexts.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContexts.d.ts deleted file mode 100644 index b50c25e44a4a7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContexts.d.ts +++ /dev/null @@ -1,151 +0,0 @@ -//// [tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts] //// - -//// [thisInInvalidContexts.ts] -class BaseErrClass { - constructor(t: any) { } -} - -class ClassWithNoInitializer extends BaseErrClass { - t: any; - //'this' in optional super call - constructor() { - super(this); // Error - } -} - -class ClassWithInitializer extends BaseErrClass { - t = 4; - //'this' in required super call - constructor() { - super(this); // Error - } -} - -module M { - //'this' in module variable - var x = this; // Error -} - -//'this' as type parameter constraint -// function fn() { } // Error - -//'this' as a type argument -function genericFunc(x: T): void { } -genericFunc(undefined); // Should be an error - -const ErrClass3Base: typeof globalThis = this; -class ErrClass3 extends ErrClass3Base { - -} - -//'this' as a computed enum value -enum SomeEnum { - A = this, // Should not be allowed - B = this.spaaaace // Also should not be allowed -} - - - -/// [Declarations] //// - - - -//// [thisInInvalidContexts.d.ts] -declare class BaseErrClass { - constructor(t: any); -} -declare class ClassWithNoInitializer extends BaseErrClass { - t: any; - constructor(); -} -declare class ClassWithInitializer extends BaseErrClass { - t: number; - constructor(); -} -declare namespace M { -} -declare function genericFunc(x: T): void; -declare const ErrClass3Base: typeof globalThis; -declare class ErrClass3 extends ErrClass3Base { -} -declare enum SomeEnum { - A,// Should not be allowed - B -} - -/// [Errors] //// - -thisInInvalidContexts.ts(9,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -thisInInvalidContexts.ts(17,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -thisInInvalidContexts.ts(23,13): error TS2331: 'this' cannot be referenced in a module or namespace body. -thisInInvalidContexts.ts(31,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisInInvalidContexts.ts(34,25): error TS2507: Type 'typeof globalThis' is not a constructor function type. -thisInInvalidContexts.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -thisInInvalidContexts.ts(40,9): error TS2332: 'this' cannot be referenced in current location. -thisInInvalidContexts.ts(41,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -thisInInvalidContexts.ts(41,9): error TS2332: 'this' cannot be referenced in current location. - - -==== thisInInvalidContexts.ts (9 errors) ==== - class BaseErrClass { - constructor(t: any) { } - } - - class ClassWithNoInitializer extends BaseErrClass { - t: any; - //'this' in optional super call - constructor() { - super(this); // Error - ~~~~ -!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. - } - } - - class ClassWithInitializer extends BaseErrClass { - t = 4; - //'this' in required super call - constructor() { - super(this); // Error - ~~~~ -!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. - } - } - - module M { - //'this' in module variable - var x = this; // Error - ~~~~ -!!! error TS2331: 'this' cannot be referenced in a module or namespace body. - } - - //'this' as type parameter constraint - // function fn() { } // Error - - //'this' as a type argument - function genericFunc(x: T): void { } - genericFunc(undefined); // Should be an error - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - - const ErrClass3Base: typeof globalThis = this; - class ErrClass3 extends ErrClass3Base { - ~~~~~~~~~~~~~ -!!! error TS2507: Type 'typeof globalThis' is not a constructor function type. - - } - - //'this' as a computed enum value - enum SomeEnum { - A = this, // Should not be allowed - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - B = this.spaaaace // Also should not be allowed - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - } - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContextsExternalModule.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContextsExternalModule.d.ts deleted file mode 100644 index 0186125b29007..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInInvalidContextsExternalModule.d.ts +++ /dev/null @@ -1,127 +0,0 @@ -//// [tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts] //// - -//// [thisInInvalidContextsExternalModule.ts] -class BaseErrClass { - constructor(t: any) { } -} - -class ClassWithNoInitializer extends BaseErrClass { - t; - //'this' in optional super call - constructor() { - super(this); // error: "super" has to be called before "this" accessing - } -} - -class ClassWithInitializer extends BaseErrClass { - t = 4; - //'this' in required super call - constructor() { - super(this); // Error - } -} - -module M { - //'this' in module variable - var x = this; // Error -} - -//'this' as type parameter constraint -// function fn() { } // Error - -//'this' as a type argument -function genericFunc(x: T) { } -genericFunc(undefined); // Should be an error - -class ErrClass3 extends this { - -} - -//'this' as a computed enum value -enum SomeEnum { - A = this, // Should not be allowed - B = this.spaaaace // Also should not be allowed -} - -export = this; // Should be an error - -/// [Declarations] //// - - - -//// [thisInInvalidContextsExternalModule.d.ts] -declare const _default: invalid; -export = _default; - -/// [Errors] //// - -thisInInvalidContextsExternalModule.ts(9,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -thisInInvalidContextsExternalModule.ts(17,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -thisInInvalidContextsExternalModule.ts(23,13): error TS2331: 'this' cannot be referenced in a module or namespace body. -thisInInvalidContextsExternalModule.ts(31,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisInInvalidContextsExternalModule.ts(33,25): error TS2507: Type 'undefined' is not a constructor function type. -thisInInvalidContextsExternalModule.ts(39,9): error TS2332: 'this' cannot be referenced in current location. -thisInInvalidContextsExternalModule.ts(40,9): error TS2332: 'this' cannot be referenced in current location. -thisInInvalidContextsExternalModule.ts(43,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== thisInInvalidContextsExternalModule.ts (8 errors) ==== - class BaseErrClass { - constructor(t: any) { } - } - - class ClassWithNoInitializer extends BaseErrClass { - t; - //'this' in optional super call - constructor() { - super(this); // error: "super" has to be called before "this" accessing - ~~~~ -!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. - } - } - - class ClassWithInitializer extends BaseErrClass { - t = 4; - //'this' in required super call - constructor() { - super(this); // Error - ~~~~ -!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. - } - } - - module M { - //'this' in module variable - var x = this; // Error - ~~~~ -!!! error TS2331: 'this' cannot be referenced in a module or namespace body. - } - - //'this' as type parameter constraint - // function fn() { } // Error - - //'this' as a type argument - function genericFunc(x: T) { } - genericFunc(undefined); // Should be an error - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - - class ErrClass3 extends this { - ~~~~ -!!! error TS2507: Type 'undefined' is not a constructor function type. - - } - - //'this' as a computed enum value - enum SomeEnum { - A = this, // Should not be allowed - ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - B = this.spaaaace // Also should not be allowed - ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - } - - export = this; // Should be an error - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInPropertyBoundDeclarations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInPropertyBoundDeclarations.d.ts deleted file mode 100644 index 74582dce20c45..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisInPropertyBoundDeclarations.d.ts +++ /dev/null @@ -1,185 +0,0 @@ -//// [tests/cases/compiler/thisInPropertyBoundDeclarations.ts] //// - -//// [thisInPropertyBoundDeclarations.ts] -class Bug { - private name: string; - - private static func: Function[] = [ - (that: Bug, name: string) => { - that.foo(name); - } - ]; - - private foo(name: string) { - this.name = name; - } -} - -// Valid use of this in a property bound decl -class A { - prop1 = function(): void { - this; - }; - - prop2 = function(): void { - function inner() { - this; - } - () => this; - }; - - prop3 = (): void => { - function inner() { - this; - } - }; - - prop4 = { - a: function(): any { return this; }, - }; - - prop5 = (): { - a: () => any; - } => { - return { - a: function() { return this; }, - }; - }; -} - -class B { - prop1: this = this; - - prop2 = (): this => this; - - prop3 = (): () => () => () => this => () => () => () => this; - - prop4: string = ' ' + - function() { - } + - ' ' + - (() => () => () => this); - - prop5 = { - a: (): this => { return this; } - }; - - prop6 = () => { - return { - a: () => { return this; } - }; - }; -} - -/// [Declarations] //// - - - -//// [thisInPropertyBoundDeclarations.d.ts] -declare class Bug { - private name; - private static func; - private foo; -} -declare class A { - prop1: () => void; - prop2: () => void; - prop3: () => void; - prop4: { - a: () => any; - }; - prop5: () => { - a: () => any; - }; -} -declare class B { - prop1: this; - prop2: () => this; - prop3: () => () => () => () => this; - prop4: string; - prop5: { - a: () => this; - }; - prop6: invalid; -} - -/// [Errors] //// - -thisInPropertyBoundDeclarations.ts(64,5): error TS2527: The inferred type of 'prop6' references an inaccessible 'this' type. A type annotation is necessary. -thisInPropertyBoundDeclarations.ts(64,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== thisInPropertyBoundDeclarations.ts (2 errors) ==== - class Bug { - private name: string; - - private static func: Function[] = [ - (that: Bug, name: string) => { - that.foo(name); - } - ]; - - private foo(name: string) { - this.name = name; - } - } - - // Valid use of this in a property bound decl - class A { - prop1 = function(): void { - this; - }; - - prop2 = function(): void { - function inner() { - this; - } - () => this; - }; - - prop3 = (): void => { - function inner() { - this; - } - }; - - prop4 = { - a: function(): any { return this; }, - }; - - prop5 = (): { - a: () => any; - } => { - return { - a: function() { return this; }, - }; - }; - } - - class B { - prop1: this = this; - - prop2 = (): this => this; - - prop3 = (): () => () => () => this => () => () => () => this; - - prop4: string = ' ' + - function() { - } + - ' ' + - (() => () => () => this); - - prop5 = { - a: (): this => { return this; } - }; - - prop6 = () => { - ~~~~~ -!!! error TS2527: The inferred type of 'prop6' references an inaccessible 'this' type. A type annotation is necessary. - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - return { - a: () => { return this; } - }; - }; - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/this_inside-enum-should-not-be-allowed.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/this_inside-enum-should-not-be-allowed.d.ts deleted file mode 100644 index e44ae47ccfde3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/this_inside-enum-should-not-be-allowed.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -//// [tests/cases/compiler/this_inside-enum-should-not-be-allowed.ts] //// - -//// [this_inside-enum-should-not-be-allowed.ts] -enum TopLevelEnum { - ThisWasAllowedButShouldNotBe = this // Should not be allowed -} - -module ModuleEnum { - enum EnumInModule { - WasADifferentError = this // this was handled as if this was in a module - } -} - -/// [Declarations] //// - - - -//// [this_inside-enum-should-not-be-allowed.d.ts] -declare enum TopLevelEnum { - ThisWasAllowedButShouldNotBe -} -declare namespace ModuleEnum { -} - -/// [Errors] //// - -this_inside-enum-should-not-be-allowed.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -this_inside-enum-should-not-be-allowed.ts(2,36): error TS2332: 'this' cannot be referenced in current location. -this_inside-enum-should-not-be-allowed.ts(7,30): error TS2332: 'this' cannot be referenced in current location. - - -==== this_inside-enum-should-not-be-allowed.ts (3 errors) ==== - enum TopLevelEnum { - ThisWasAllowedButShouldNotBe = this // Should not be allowed - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - } - - module ModuleEnum { - enum EnumInModule { - WasADifferentError = this // this was handled as if this was in a module - ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/twoAccessorsWithSameName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/twoAccessorsWithSameName.d.ts deleted file mode 100644 index da32e9a0d6543..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/twoAccessorsWithSameName.d.ts +++ /dev/null @@ -1,127 +0,0 @@ -//// [tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts] //// - -//// [twoAccessorsWithSameName.ts] -class C { - get x(): number { return 1; } - get x(): number { return 1; } // error -} - -class D { - set x(v: any) { } - set x(v: any) { } // error -} - -class E { - get x(): number { - return 1; - } - set x(v) { } -} - -var x = { - get x() { - return 1; - }, - - // error - get x(): number { - return 1; - } -} - -var y: { - x: number; -} = { - get x(): number { - return 1; - }, - set x(v) { } -} - -/// [Declarations] //// - - - -//// [twoAccessorsWithSameName.d.ts] -declare class C { - get x(): number; - get x(): number; -} -declare class D { - set x(v: any); - set x(v: any); -} -declare class E { - get x(): number; - set x(v: number); -} -declare var x: invalid; -declare var y: { - x: number; -}; - -/// [Errors] //// - -twoAccessorsWithSameName.ts(2,9): error TS2300: Duplicate identifier 'x'. -twoAccessorsWithSameName.ts(3,9): error TS2300: Duplicate identifier 'x'. -twoAccessorsWithSameName.ts(7,9): error TS2300: Duplicate identifier 'x'. -twoAccessorsWithSameName.ts(8,9): error TS2300: Duplicate identifier 'x'. -twoAccessorsWithSameName.ts(19,9): error TS2300: Duplicate identifier 'x'. -twoAccessorsWithSameName.ts(24,9): error TS1118: An object literal cannot have multiple get/set accessors with the same name. -twoAccessorsWithSameName.ts(24,9): error TS2300: Duplicate identifier 'x'. -twoAccessorsWithSameName.ts(24,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== twoAccessorsWithSameName.ts (8 errors) ==== - class C { - get x(): number { return 1; } - ~ -!!! error TS2300: Duplicate identifier 'x'. - get x(): number { return 1; } // error - ~ -!!! error TS2300: Duplicate identifier 'x'. - } - - class D { - set x(v: any) { } - ~ -!!! error TS2300: Duplicate identifier 'x'. - set x(v: any) { } // error - ~ -!!! error TS2300: Duplicate identifier 'x'. - } - - class E { - get x(): number { - return 1; - } - set x(v) { } - } - - var x = { - get x() { - ~ -!!! error TS2300: Duplicate identifier 'x'. - return 1; - }, - - // error - get x(): number { - ~ -!!! error TS1118: An object literal cannot have multiple get/set accessors with the same name. - ~ -!!! error TS2300: Duplicate identifier 'x'. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - return 1; - } - } - - var y: { - x: number; - } = { - get x(): number { - return 1; - }, - set x(v) { } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment31.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment31.d.ts deleted file mode 100644 index 3f90b1097755c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment31.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment31.ts] //// - -//// [typeFromPropertyAssignment31.ts] -function ExpandoMerge(n: number): number { - return n; -} -ExpandoMerge.p1 = 111 -ExpandoMerge.m = function(n: number) { - return n + 1; -} -namespace ExpandoMerge { - export var p2 = 222; -} -ExpandoMerge.p4 = 44444; // ok -ExpandoMerge.p6 = 66666; // ok -ExpandoMerge.p8 = false; // type error -namespace ExpandoMerge { - export var p3 = 333; - export var p4 = 4; - export var p5 = 5; - export let p6 = 6; - export let p7 = 7; - export var p8 = 6; - export let p9 = 7; -} -ExpandoMerge.p5 = 555555; // ok -ExpandoMerge.p7 = 777777; // ok -ExpandoMerge.p9 = false; // type error -var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - - -/// [Declarations] //// - - - -//// [typeFromPropertyAssignment31.d.ts] -declare function ExpandoMerge(n: number): number; -declare namespace ExpandoMerge { - var p2: number; -} -declare namespace ExpandoMerge { - var p3: number; - var p4: number; - var p5: number; - let p6: number; - let p7: number; - var p8: number; - let p9: number; -} -declare var n: number; - -/// [Errors] //// - -typeFromPropertyAssignment31.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -typeFromPropertyAssignment31.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -typeFromPropertyAssignment31.ts(25,1): error TS2322: Type 'boolean' is not assignable to type 'number'. - - -==== typeFromPropertyAssignment31.ts (3 errors) ==== - function ExpandoMerge(n: number): number { - ~~~~~~~~~~~~ -!!! error TS9009: 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; - } - ExpandoMerge.p1 = 111 - ExpandoMerge.m = function(n: number) { - return n + 1; - } - namespace ExpandoMerge { - export var p2 = 222; - } - ExpandoMerge.p4 = 44444; // ok - ExpandoMerge.p6 = 66666; // ok - ExpandoMerge.p8 = false; // type error - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - namespace ExpandoMerge { - export var p3 = 333; - export var p4 = 4; - export var p5 = 5; - export let p6 = 6; - export let p7 = 7; - export var p8 = 6; - export let p9 = 7; - } - ExpandoMerge.p5 = 555555; // ok - ExpandoMerge.p7 = 777777; // ok - ExpandoMerge.p9 = false; // type error - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment32.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment32.d.ts deleted file mode 100644 index e18d0f3bd8fe6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment32.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts] //// - -//// [expando.ts] -function ExpandoMerge(n: number): number { - return n; -} -ExpandoMerge.p1 = 111 -ExpandoMerge.m = function(n: number) { - return n + 1; -} -ExpandoMerge.p4 = 44444; -ExpandoMerge.p5 = 555555; -ExpandoMerge.p6 = 66666; -ExpandoMerge.p7 = 777777; -ExpandoMerge.p8 = false; // type error -ExpandoMerge.p9 = false; // type error -var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - -//// [ns.ts] -namespace ExpandoMerge { - export var p3 = 333; - export var p4 = 4; - export var p5 = 5; - export let p6 = 6; - export let p7 = 7; - export var p8 = 6; - export let p9 = 7; -} -namespace ExpandoMerge { - export var p2 = 222; -} - - -/// [Declarations] //// - - - -//// [expando.d.ts] -declare function ExpandoMerge(n: number): number; -declare var n: number; - -//// [ns.d.ts] -declare namespace ExpandoMerge { - var p3: number; - var p4: number; - var p5: number; - let p6: number; - let p7: number; - var p8: number; - let p9: number; -} -declare namespace ExpandoMerge { - var p2: number; -} - -/// [Errors] //// - -expando.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. -ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - - -==== expando.ts (3 errors) ==== - function ExpandoMerge(n: number): number { - ~~~~~~~~~~~~ -!!! error TS9009: 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; - } - ExpandoMerge.p1 = 111 - ExpandoMerge.m = function(n: number) { - return n + 1; - } - ExpandoMerge.p4 = 44444; - ExpandoMerge.p5 = 555555; - ExpandoMerge.p6 = 66666; - ExpandoMerge.p7 = 777777; - ExpandoMerge.p8 = false; // type error - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - ExpandoMerge.p9 = false; // type error - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - -==== ns.ts (2 errors) ==== - namespace ExpandoMerge { - ~~~~~~~~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - export var p3 = 333; - export var p4 = 4; - export var p5 = 5; - export let p6 = 6; - export let p7 = 7; - export var p8 = 6; - export let p9 = 7; - } - namespace ExpandoMerge { - ~~~~~~~~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - export var p2 = 222; - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment33.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment33.d.ts deleted file mode 100644 index 96e4f5f6601bf..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment33.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts] //// - -//// [ns.ts] -namespace ExpandoMerge { - export var p3 = 333; - export var p4 = 4; - export var p5 = 5; - export let p6 = 6; - export let p7 = 7; - export var p8 = 6; - export let p9 = 7; -} -namespace ExpandoMerge { - export var p2 = 222; -} - - -//// [expando.ts] -function ExpandoMerge(n: number): number { - return n; -} -ExpandoMerge.p1 = 111 -ExpandoMerge.m = function(n: number) { - return n + 1; -} -ExpandoMerge.p4 = 44444; -ExpandoMerge.p5 = 555555; -ExpandoMerge.p6 = 66666; -ExpandoMerge.p7 = 777777; -ExpandoMerge.p8 = false; // type error -ExpandoMerge.p9 = false; // type error -var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - - - -/// [Declarations] //// - - - -//// [expando.d.ts] -declare function ExpandoMerge(n: number): number; -declare var n: number; - -//// [ns.d.ts] -declare namespace ExpandoMerge { - var p3: number; - var p4: number; - var p5: number; - let p6: number; - let p7: number; - var p8: number; - let p9: number; -} -declare namespace ExpandoMerge { - var p2: number; -} - -/// [Errors] //// - -expando.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. -ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - - -==== ns.ts (2 errors) ==== - namespace ExpandoMerge { - ~~~~~~~~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - export var p3 = 333; - export var p4 = 4; - export var p5 = 5; - export let p6 = 6; - export let p7 = 7; - export var p8 = 6; - export let p9 = 7; - } - namespace ExpandoMerge { - ~~~~~~~~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - export var p2 = 222; - } - - -==== expando.ts (3 errors) ==== - function ExpandoMerge(n: number): number { - ~~~~~~~~~~~~ -!!! error TS9009: 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; - } - ExpandoMerge.p1 = 111 - ExpandoMerge.m = function(n: number) { - return n + 1; - } - ExpandoMerge.p4 = 44444; - ExpandoMerge.p5 = 555555; - ExpandoMerge.p6 = 66666; - ExpandoMerge.p7 = 777777; - ExpandoMerge.p8 = false; // type error - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - ExpandoMerge.p9 = false; // type error - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment36.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment36.d.ts deleted file mode 100644 index 4823321e20629..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment36.d.ts +++ /dev/null @@ -1,204 +0,0 @@ -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts] //// - -//// [typeFromPropertyAssignment36.ts] -function f(b: boolean): { - (): void - e: number - q: boolean - r: number - s: string -} { - function d() { - } - d.e = 12 - d.e - - if (b) { - d.q = false - } - // error d.q might not be assigned - d.q - if (b) { - d.q = false - } - else { - d.q = true - } - d.q - if (b) { - d.r = 1 - } - else { - d.r = 2 - } - d.r - if (b) { - d.s = 'hi' - } - return d -} -// OK to access possibly-unassigned properties outside the initialising scope -var test: string = f(true).s - -function d(): void { -} -d.e = 12 -d.e - -if (!!false) { - d.q = false -} -d.q -if (!!false) { - d.q = false -} -else { - d.q = true -} -d.q -if (!!false) { - d.r = 1 -} -else { - d.r = 2 -} -d.r - -// test function expressions too -const g: { - (): void - expando: number - both: string | number -} = function() { -} -if (!!false) { - g.expando = 1 -} -g.expando // error - -if (!!false) { - g.both = 'hi' -} -else { - g.both = 0 -} -g.both - - -/// [Declarations] //// - - - -//// [typeFromPropertyAssignment36.d.ts] -declare function f(b: boolean): { - (): void; - e: number; - q: boolean; - r: number; - s: string; -}; -declare var test: string; -declare function d(): void; -declare const g: { - (): void; - expando: number; - both: string | number; -}; - -/// [Errors] //// - -typeFromPropertyAssignment36.ts(17,7): error TS2565: Property 'q' is used before being assigned. -typeFromPropertyAssignment36.ts(40,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -typeFromPropertyAssignment36.ts(48,3): error TS2565: Property 'q' is used before being assigned. - - -==== typeFromPropertyAssignment36.ts (3 errors) ==== - function f(b: boolean): { - (): void - e: number - q: boolean - r: number - s: string - } { - function d() { - } - d.e = 12 - d.e - - if (b) { - d.q = false - } - // error d.q might not be assigned - d.q - ~ -!!! error TS2565: Property 'q' is used before being assigned. - if (b) { - d.q = false - } - else { - d.q = true - } - d.q - if (b) { - d.r = 1 - } - else { - d.r = 2 - } - d.r - if (b) { - d.s = 'hi' - } - return d - } - // OK to access possibly-unassigned properties outside the initialising scope - var test: string = f(true).s - - function d(): void { - ~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - } - d.e = 12 - d.e - - if (!!false) { - d.q = false - } - d.q - ~ -!!! error TS2565: Property 'q' is used before being assigned. - if (!!false) { - d.q = false - } - else { - d.q = true - } - d.q - if (!!false) { - d.r = 1 - } - else { - d.r = 2 - } - d.r - - // test function expressions too - const g: { - (): void - expando: number - both: string | number - } = function() { - } - if (!!false) { - g.expando = 1 - } - g.expando // error - - if (!!false) { - g.both = 'hi' - } - else { - g.both = 0 - } - g.both - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment38.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment38.d.ts deleted file mode 100644 index 6a637eef9daa2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment38.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment38.ts] //// - -//// [typeFromPropertyAssignment38.ts] -function F(): void {} -F["prop"] = 3; - -const f: { - (): void; - prop: number; -} = function () {}; -f["prop"] = 3; - - -/// [Declarations] //// - - - -//// [typeFromPropertyAssignment38.d.ts] -declare function F(): void; -declare const f: { - (): void; - prop: number; -}; - -/// [Errors] //// - -typeFromPropertyAssignment38.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - - -==== typeFromPropertyAssignment38.ts (1 errors) ==== - function F(): void {} - ~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - F["prop"] = 3; - - const f: { - (): void; - prop: number; - } = function () {}; - f["prop"] = 3; - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/underscoreEscapedNameInEnum.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/underscoreEscapedNameInEnum.d.ts deleted file mode 100644 index bdb2111bcf296..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/underscoreEscapedNameInEnum.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -//// [tests/cases/compiler/underscoreEscapedNameInEnum.ts] //// - -//// [underscoreEscapedNameInEnum.ts] -enum E { - "__foo" = 1, - bar = E["__foo"] + 1 -} - - -/// [Declarations] //// - - - -//// [underscoreEscapedNameInEnum.d.ts] -declare enum E { - "__foo" = 1, - bar = 2 -} - -/// [Errors] //// - -underscoreEscapedNameInEnum.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== underscoreEscapedNameInEnum.ts (1 errors) ==== - enum E { - "__foo" = 1, - bar = E["__foo"] + 1 - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/verbatimModuleSyntaxConstEnumUsage.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/verbatimModuleSyntaxConstEnumUsage.d.ts deleted file mode 100644 index 839e8df50345c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/verbatimModuleSyntaxConstEnumUsage.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -//// [tests/cases/conformance/externalModules/verbatimModuleSyntaxConstEnumUsage.ts] //// - -//// [foo.ts] -export enum Foo { - a = 1, - b, - c, -} - -//// [bar.ts] -import {Foo} from './foo.js'; - -export enum Bar { - a = Foo.a, - c = Foo.c, - e = 5, -} - -/// [Declarations] //// - - - -//// [bar.d.ts] -export declare enum Bar { - a, - c, - e = 5 -} - -//// [foo.d.ts] -export declare enum Foo { - a = 1, - b = 2, - c = 3 -} - -/// [Errors] //// - -bar.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -bar.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== foo.ts (0 errors) ==== - export enum Foo { - a = 1, - b, - c, - } - -==== bar.ts (2 errors) ==== - import {Foo} from './foo.js'; - - export enum Bar { - a = Foo.a, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = Foo.c, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - e = 5, - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/wellKnownSymbolExpando.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/wellKnownSymbolExpando.d.ts deleted file mode 100644 index 1b6e50e445274..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/wellKnownSymbolExpando.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -//// [tests/cases/compiler/wellKnownSymbolExpando.ts] //// - -//// [wellKnownSymbolExpando.ts] -function f(): void {} -f[Symbol.iterator] = function() {} - - -/// [Declarations] //// - - - -//// [wellKnownSymbolExpando.d.ts] -declare function f(): void; - -/// [Errors] //// - -wellKnownSymbolExpando.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - - -==== wellKnownSymbolExpando.ts (1 errors) ==== - function f(): void {} - ~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - f[Symbol.iterator] = function() {} - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments3_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments3_es6.d.ts deleted file mode 100644 index 1bf5fcef5445b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments3_es6.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments3_es6.ts] //// - -//// [FunctionPropertyAssignments3_es6.ts] -var v = { *{ } } - -/// [Declarations] //// - - - -//// [FunctionPropertyAssignments3_es6.d.ts] -declare var v: { - ""(): Generator; -}; - -/// [Errors] //// - -FunctionPropertyAssignments3_es6.ts(1,12): error TS1003: Identifier expected. - - -==== FunctionPropertyAssignments3_es6.ts (1 errors) ==== - var v = { *{ } } - ~ -!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments5_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments5_es6.d.ts deleted file mode 100644 index 031f51dfd8478..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/FunctionPropertyAssignments5_es6.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -//// [tests/cases/conformance/es6/functionPropertyAssignments/FunctionPropertyAssignments5_es6.ts] //// - -//// [FunctionPropertyAssignments5_es6.ts] -var v = { *[foo()](): Generator { } } - -/// [Declarations] //// - - - -//// [FunctionPropertyAssignments5_es6.d.ts] -declare var v: { - [x: number]: () => Generator; -}; - -/// [Errors] //// - -FunctionPropertyAssignments5_es6.ts(1,13): error TS2304: Cannot find name 'foo'. - - -==== FunctionPropertyAssignments5_es6.ts (1 errors) ==== - var v = { *[foo()](): Generator { } } - ~~~ -!!! error TS2304: Cannot find name 'foo'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration5_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration5_es6.d.ts deleted file mode 100644 index c7c5db4ed8982..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration5_es6.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration5_es6.ts] //// - -//// [MemberFunctionDeclaration5_es6.ts] -class C { - * -} - -/// [Declarations] //// - - - -//// [MemberFunctionDeclaration5_es6.d.ts] -declare class C { - (): any; -} - -/// [Errors] //// - -MemberFunctionDeclaration5_es6.ts(3,1): error TS1003: Identifier expected. - - -==== MemberFunctionDeclaration5_es6.ts (1 errors) ==== - class C { - * - } - ~ -!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration6_es6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration6_es6.d.ts deleted file mode 100644 index 01e1e47b31770..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/MemberFunctionDeclaration6_es6.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration6_es6.ts] //// - -//// [MemberFunctionDeclaration6_es6.ts] -class C { - *foo -} - -/// [Declarations] //// - - - -//// [MemberFunctionDeclaration6_es6.d.ts] -declare class C { - foo(): any; -} - -/// [Errors] //// - -MemberFunctionDeclaration6_es6.ts(2,5): error TS2391: Function implementation is missing or not immediately following the declaration. -MemberFunctionDeclaration6_es6.ts(3,1): error TS1005: '(' expected. - - -==== MemberFunctionDeclaration6_es6.ts (2 errors) ==== - class C { - *foo - ~~~ -!!! error TS2391: Function implementation is missing or not immediately following the declaration. - } - ~ -!!! error TS1005: '(' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnum1.d.ts deleted file mode 100644 index 0ec80dcd9d624..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnum1.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -//// [tests/cases/compiler/ambientEnum1.ts] //// - -//// [ambientEnum1.ts] - declare enum E1 { - y = 4.23 - } - - // Ambient enum with computer member - declare enum E2 { - x = 'foo'.length - } - -/// [Declarations] //// - - - -//// [ambientEnum1.d.ts] -declare enum E1 { - y = 4.23 -} -declare enum E2 { - x -} - -/// [Errors] //// - -ambientEnum1.ts(7,13): error TS1066: In ambient enum declarations member initializer must be constant expression. - - -==== ambientEnum1.ts (1 errors) ==== - declare enum E1 { - y = 4.23 - } - - // Ambient enum with computer member - declare enum E2 { - x = 'foo'.length - ~~~~~~~~~~~~ -!!! error TS1066: In ambient enum declarations member initializer must be constant expression. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnumDeclaration1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnumDeclaration1.d.ts deleted file mode 100644 index 2c658752c5634..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientEnumDeclaration1.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -//// [tests/cases/conformance/ambient/ambientEnumDeclaration1.ts] //// - -//// [ambientEnumDeclaration1.ts] -// In ambient enum declarations, all values specified in enum member declarations must be classified as constant enum expressions. - -declare enum E { - a = 10, - b = 10 + 1, - c = b, - d = (c) + 1, - e = 10 << 2 * 8, -} - -/// [Declarations] //// - - - -//// [ambientEnumDeclaration1.d.ts] -declare enum E { - a = 10, - b = 11, - c = 11, - d = 12, - e = 655360 -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientErrors.d.ts deleted file mode 100644 index 997e618eedc50..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientErrors.d.ts +++ /dev/null @@ -1,209 +0,0 @@ -//// [tests/cases/conformance/ambient/ambientErrors.ts] //// - -//// [ambientErrors.ts] -// Ambient variable with an initializer -declare var x = 4; - -// Ambient functions with invalid overloads -declare function fn(x: number): string; -declare function fn(x: 'foo'): number; - -// Ambient functions with duplicate signatures -declare function fn1(x: number): string; -declare function fn1(x: number): string; - -// Ambient function overloads that differ only by return type -declare function fn2(x: number): string; -declare function fn2(x: number): number; - -// Ambient function with default parameter values -declare function fn3(x: number = 3): any; - -// Ambient function with function body -declare function fn4(): void { }; - -// Ambient enum with non - integer literal constant member -declare enum E1 { - y = 4.23 -} - -// Ambient enum with computer member -declare enum E2 { - x = 'foo'.length -} - -// Ambient module with initializers for values, bodies for functions / classes -declare module M1 { - var x = 3; - function fn(): void { } - class C { - static x = 3; - y = 4; - constructor() { } - fn(): void { } - static sfn(): void { } - } -} - -// Ambient external module not in the global module -module M2 { - declare module 'nope' { } -} - -// Ambient external module with a string literal name that isn't a top level external module name -declare module '../foo' { } - -// Ambient external module with export assignment and other exported members -declare module 'bar' { - var n: any; - export var q: any; - export = n; -} - - -/// [Declarations] //// - - - -//// [ambientErrors.d.ts] -declare var x: number; -declare function fn(x: number): string; -declare function fn(x: 'foo'): number; -declare function fn1(x: number): string; -declare function fn1(x: number): string; -declare function fn2(x: number): string; -declare function fn2(x: number): number; -declare function fn3(x?: number): any; -declare function fn4(): void; -declare enum E1 { - y = 4.23 -} -declare enum E2 { - x -} -declare namespace M1 { - var x: number; - function fn(): void; - class C { - static x: number; - y: number; - constructor(); - fn(): void; - static sfn(): void; - } -} -declare namespace M2 { -} -declare module '../foo' { } -declare module 'bar' { - var n: any; - export var q: any; - export = n; -} - -/// [Errors] //// - -ambientErrors.ts(2,17): error TS1039: Initializers are not allowed in ambient contexts. -ambientErrors.ts(17,22): error TS2371: A parameter initializer is only allowed in a function or constructor implementation. -ambientErrors.ts(20,30): error TS1183: An implementation cannot be declared in ambient contexts. -ambientErrors.ts(29,9): error TS1066: In ambient enum declarations member initializer must be constant expression. -ambientErrors.ts(34,13): error TS1039: Initializers are not allowed in ambient contexts. -ambientErrors.ts(35,25): error TS1183: An implementation cannot be declared in ambient contexts. -ambientErrors.ts(37,20): error TS1039: Initializers are not allowed in ambient contexts. -ambientErrors.ts(38,13): error TS1039: Initializers are not allowed in ambient contexts. -ambientErrors.ts(39,23): error TS1183: An implementation cannot be declared in ambient contexts. -ambientErrors.ts(40,20): error TS1183: An implementation cannot be declared in ambient contexts. -ambientErrors.ts(41,28): error TS1183: An implementation cannot be declared in ambient contexts. -ambientErrors.ts(47,20): error TS2435: Ambient modules cannot be nested in other modules or namespaces. -ambientErrors.ts(51,16): error TS2436: Ambient module declaration cannot specify relative module name. -ambientErrors.ts(57,5): error TS2309: An export assignment cannot be used in a module with other exported elements. - - -==== ambientErrors.ts (14 errors) ==== - // Ambient variable with an initializer - declare var x = 4; - ~ -!!! error TS1039: Initializers are not allowed in ambient contexts. - - // Ambient functions with invalid overloads - declare function fn(x: number): string; - declare function fn(x: 'foo'): number; - - // Ambient functions with duplicate signatures - declare function fn1(x: number): string; - declare function fn1(x: number): string; - - // Ambient function overloads that differ only by return type - declare function fn2(x: number): string; - declare function fn2(x: number): number; - - // Ambient function with default parameter values - declare function fn3(x: number = 3): any; - ~~~~~~~~~~~~~ -!!! error TS2371: A parameter initializer is only allowed in a function or constructor implementation. - - // Ambient function with function body - declare function fn4(): void { }; - ~ -!!! error TS1183: An implementation cannot be declared in ambient contexts. - - // Ambient enum with non - integer literal constant member - declare enum E1 { - y = 4.23 - } - - // Ambient enum with computer member - declare enum E2 { - x = 'foo'.length - ~~~~~~~~~~~~ -!!! error TS1066: In ambient enum declarations member initializer must be constant expression. - } - - // Ambient module with initializers for values, bodies for functions / classes - declare module M1 { - var x = 3; - ~ -!!! error TS1039: Initializers are not allowed in ambient contexts. - function fn(): void { } - ~ -!!! error TS1183: An implementation cannot be declared in ambient contexts. - class C { - static x = 3; - ~ -!!! error TS1039: Initializers are not allowed in ambient contexts. - y = 4; - ~ -!!! error TS1039: Initializers are not allowed in ambient contexts. - constructor() { } - ~ -!!! error TS1183: An implementation cannot be declared in ambient contexts. - fn(): void { } - ~ -!!! error TS1183: An implementation cannot be declared in ambient contexts. - static sfn(): void { } - ~ -!!! error TS1183: An implementation cannot be declared in ambient contexts. - } - } - - // Ambient external module not in the global module - module M2 { - declare module 'nope' { } - ~~~~~~ -!!! error TS2435: Ambient modules cannot be nested in other modules or namespaces. - } - - // Ambient external module with a string literal name that isn't a top level external module name - declare module '../foo' { } - ~~~~~~~~ -!!! error TS2436: Ambient module declaration cannot specify relative module name. - - // Ambient external module with export assignment and other exported members - declare module 'bar' { - var n: any; - export var q: any; - export = n; - ~~~~~~~~~~~ -!!! error TS2309: An export assignment cannot be used in a module with other exported elements. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrowFunctionContexts.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrowFunctionContexts.d.ts deleted file mode 100644 index de1c346589bd3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/arrowFunctionContexts.d.ts +++ /dev/null @@ -1,258 +0,0 @@ -//// [tests/cases/conformance/expressions/functions/arrowFunctionContexts.ts] //// - -//// [arrowFunctionContexts.ts] -// Arrow function used in with statement -with (window) { - var p = () => this; -} - -// Arrow function as argument to super call -class Base { - constructor(n: any) { } -} - -class Derived extends Base { - constructor() { - super(() => this); - } -} - -// Arrow function as function argument -window.setTimeout(() => null, 100); - -// Arrow function as value in array literal - -var obj = (n: number): string => ''; -var obj: { (n: number): string; }; // OK - -var arr: ((n: number) => string)[] = [(n: number) => '']; -var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) - -// Arrow function as enum value -enum E { - x = () => 4, // Error expected - y = (() => this).length // error, can't use this in enum -} - -// Arrow function as module variable initializer -module M { - export var a = (s: any): string => ''; - var b = (s) => s; -} - -// Repeat above for module members that are functions? (necessary to redo all of them?) -module M2 { - // Arrow function used in with statement - with (window) { - var p = () => this; - } - - // Arrow function as argument to super call - class Base { - constructor(n: any) { } - } - - class Derived extends Base { - constructor() { - super(() => this); - } - } - - // Arrow function as function argument - window.setTimeout(() => null, 100); - - // Arrow function as value in array literal - - var obj = (n: number) => ''; - var obj: { (n: number): string; }; // OK - - var arr = [(n: number) => '']; - var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) - - // Arrow function as enum value - enum E { - x = () => 4, // Error expected - y = (() => this).length - } - - // Arrow function as module variable initializer - module M { - export var a = (s) => ''; - var b = (s) => s; - } - -} - -// (ParamList) => { ... } is a generic arrow function -var generic1 = (n: T): T[] => [n]; -var generic1: { (n: T): T[] }; // Incorrect error, Bug 829597 -var generic2 = (n: T): T[] => { return [n]; }; -var generic2: { (n: T): T[] }; - -// ((ParamList) => { ... } ) is a type assertion to an arrow function -var asserted1 = ((n) => [n]); -var asserted1: any; -var asserted2 = ((n) => { return n; }); -var asserted2: any; - - - -/// [Declarations] //// - - - -//// [arrowFunctionContexts.d.ts] -declare class Base { - constructor(n: any); -} -declare class Derived extends Base { - constructor(); -} -declare var obj: (n: number) => string; -declare var obj: { - (n: number): string; -}; -declare var arr: ((n: number) => string)[]; -declare var arr: { - (n: number): string; -}[]; -declare enum E { - x,// Error expected - y -} -declare namespace M { - var a: (s: any) => string; -} -declare namespace M2 { -} -declare var generic1: (n: T) => T[]; -declare var generic1: { - (n: T): T[]; -}; -declare var generic2: (n: T) => T[]; -declare var generic2: { - (n: T): T[]; -}; -declare var asserted1: any; -declare var asserted1: any; -declare var asserted2: any; -declare var asserted2: any; - -/// [Errors] //// - -arrowFunctionContexts.ts(2,1): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. -arrowFunctionContexts.ts(30,9): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. -arrowFunctionContexts.ts(31,16): error TS2332: 'this' cannot be referenced in current location. -arrowFunctionContexts.ts(43,5): error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. -arrowFunctionContexts.ts(71,13): error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. -arrowFunctionContexts.ts(72,20): error TS2332: 'this' cannot be referenced in current location. - - -==== arrowFunctionContexts.ts (6 errors) ==== - // Arrow function used in with statement - with (window) { - ~~~~~~~~~~~~~ -!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - var p = () => this; - } - - // Arrow function as argument to super call - class Base { - constructor(n: any) { } - } - - class Derived extends Base { - constructor() { - super(() => this); - } - } - - // Arrow function as function argument - window.setTimeout(() => null, 100); - - // Arrow function as value in array literal - - var obj = (n: number): string => ''; - var obj: { (n: number): string; }; // OK - - var arr: ((n: number) => string)[] = [(n: number) => '']; - var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) - - // Arrow function as enum value - enum E { - x = () => 4, // Error expected - ~~~~~~~ -!!! error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. - y = (() => this).length // error, can't use this in enum - ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - } - - // Arrow function as module variable initializer - module M { - export var a = (s: any): string => ''; - var b = (s) => s; - } - - // Repeat above for module members that are functions? (necessary to redo all of them?) - module M2 { - // Arrow function used in with statement - with (window) { - ~~~~~~~~~~~~~ -!!! error TS2410: The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'. - var p = () => this; - } - - // Arrow function as argument to super call - class Base { - constructor(n: any) { } - } - - class Derived extends Base { - constructor() { - super(() => this); - } - } - - // Arrow function as function argument - window.setTimeout(() => null, 100); - - // Arrow function as value in array literal - - var obj = (n: number) => ''; - var obj: { (n: number): string; }; // OK - - var arr = [(n: number) => '']; - var arr: { (n: number): string; }[]; // Incorrect error here (bug 829597) - - // Arrow function as enum value - enum E { - x = () => 4, // Error expected - ~~~~~~~ -!!! error TS18033: Type '() => number' is not assignable to type 'number' as required for computed enum member values. - y = (() => this).length - ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - } - - // Arrow function as module variable initializer - module M { - export var a = (s) => ''; - var b = (s) => s; - } - - } - - // (ParamList) => { ... } is a generic arrow function - var generic1 = (n: T): T[] => [n]; - var generic1: { (n: T): T[] }; // Incorrect error, Bug 829597 - var generic2 = (n: T): T[] => { return [n]; }; - var generic2: { (n: T): T[] }; - - // ((ParamList) => { ... } ) is a type assertion to an arrow function - var asserted1 = ((n) => [n]); - var asserted1: any; - var asserted2 = ((n) => { return n; }); - var asserted2: any; - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier.d.ts deleted file mode 100644 index 2b9ac4f35adb8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/compiler/classMemberWithMissingIdentifier.ts] //// - -//// [classMemberWithMissingIdentifier.ts] -class C { - public {}; -} - -/// [Declarations] //// - - - -//// [classMemberWithMissingIdentifier.d.ts] -declare class C { - : any; -} - -/// [Errors] //// - -classMemberWithMissingIdentifier.ts(2,11): error TS1146: Declaration expected. -classMemberWithMissingIdentifier.ts(2,12): error TS1005: ';' expected. -classMemberWithMissingIdentifier.ts(3,1): error TS1128: Declaration or statement expected. - - -==== classMemberWithMissingIdentifier.ts (3 errors) ==== - class C { - public {}; - -!!! error TS1146: Declaration expected. - ~ -!!! error TS1005: ';' expected. - } - ~ -!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier2.d.ts deleted file mode 100644 index bc0b4dc7d2d6d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/classMemberWithMissingIdentifier2.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -//// [tests/cases/compiler/classMemberWithMissingIdentifier2.ts] //// - -//// [classMemberWithMissingIdentifier2.ts] -class C { - public {[name:string]:VariableDeclaration}; -} - -/// [Declarations] //// - - - -//// [classMemberWithMissingIdentifier2.d.ts] -declare class C { - : any; -} - -/// [Errors] //// - -classMemberWithMissingIdentifier2.ts(2,11): error TS1146: Declaration expected. -classMemberWithMissingIdentifier2.ts(2,12): error TS1005: ';' expected. -classMemberWithMissingIdentifier2.ts(2,18): error TS1005: ',' expected. -classMemberWithMissingIdentifier2.ts(2,19): error TS2693: 'string' only refers to a type, but is being used as a value here. -classMemberWithMissingIdentifier2.ts(2,26): error TS1005: ';' expected. -classMemberWithMissingIdentifier2.ts(2,27): error TS2304: Cannot find name 'VariableDeclaration'. -classMemberWithMissingIdentifier2.ts(3,1): error TS1128: Declaration or statement expected. - - -==== classMemberWithMissingIdentifier2.ts (7 errors) ==== - class C { - public {[name:string]:VariableDeclaration}; - -!!! error TS1146: Declaration expected. - ~ -!!! error TS1005: ';' expected. - ~ -!!! error TS1005: ',' expected. - ~~~~~~ -!!! error TS2693: 'string' only refers to a type, but is being used as a value here. - ~ -!!! error TS1005: ';' expected. - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'VariableDeclaration'. - } - ~ -!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/collisionCodeGenEnumWithEnumMemberConflict.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/collisionCodeGenEnumWithEnumMemberConflict.d.ts deleted file mode 100644 index e1cb57b872239..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/collisionCodeGenEnumWithEnumMemberConflict.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -//// [tests/cases/compiler/collisionCodeGenEnumWithEnumMemberConflict.ts] //// - -//// [collisionCodeGenEnumWithEnumMemberConflict.ts] -enum Color { - Color, - Thing = Color -} - -/// [Declarations] //// - - - -//// [collisionCodeGenEnumWithEnumMemberConflict.d.ts] -declare enum Color { - Color = 0, - Thing = 0 -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commonMissingSemicolons.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commonMissingSemicolons.d.ts deleted file mode 100644 index c45848eb4b1d3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commonMissingSemicolons.d.ts +++ /dev/null @@ -1,451 +0,0 @@ -//// [tests/cases/compiler/commonMissingSemicolons.ts] //// - -//// [commonMissingSemicolons.ts] -async function myAsyncFunction1(): Promise {} -asynd function myAsyncFunction2(): void {} -sasync function myAsyncFunction3(): void {} - -// Arrow functions don't (yet?) parse as nicely as standalone functions. -// Eventually it would be good to get them the same "did you mean" for typos such as "asyncd". -const myAsyncArrow1 = async (): Promise => 3; -const myAsyncArrow2: any = asyncd () => 3; - -class MyClass1 {} -clasd MyClass2 {} -classs MyClass3 {} - -const myConst1 = 1; -consd myConst2 = 1; -constd myConst3 = 1; - -declare const myDeclareConst1: 1; -declared const myDeclareConst2: 1; -declare constd myDeclareConst3: 1; -declared constd myDeclareConst4: 1; -declareconst myDeclareConst5; - -function myFunction1(): void { } -functiond myFunction2() { } -function function(): void { } -functionMyFunction; - -interface myInterface1 { } -interfaced myInterface2 { } -interface interface { } -interface { } -interface void { } -interfaceMyInterface { } - -let let = 1; -let let1 = 1; -letd let2 = 1; -letMyLet; - -type type; -type type1 = {}; -type type2 = type; -type type3 = {}; -typed type4 = {} -typed type5 = type; -typeMyType; - -var myVar1 = 1; -vard myVar2 = 1; -varMyVar; - -class NoSemicolonClassA { - ['a'] = 0 - {} -} - -class NoSemicolonClassB { - ['a'] = 0 - {} -} - -class NoSemicolonClassC { - ['a'] = 0; - {} -} - -class NoSemicolonClassD { - ['a']: any = 0 - ['b']() {} -} - -class NoSemicolonClassE { - ['a']: any = 0 - ['b']() { - c: true - } -} - - -/// [Declarations] //// - - - -//// [commonMissingSemicolons.d.ts] -declare function myAsyncFunction1(): Promise; -declare function myAsyncFunction2(): void; -declare function myAsyncFunction3(): void; -declare const myAsyncArrow1: () => Promise; -declare const myAsyncArrow2: any; -declare class MyClass1 { -} -declare const myConst1 = 1; -declare const myDeclareConst1: 1; -declare const myDeclareConst2: 1; -declare function myFunction1(): void; -declare function (): any; -interface myInterface1 { -} -interface interface { -} -declare let let: number; -declare let let1: number; -type type = ; -type type1 = {}; -type type2 = type; -type type3 = {}; -declare var myVar1: number; -declare class NoSemicolonClassA { - ['a']: number; -} -declare class NoSemicolonClassB { - ['a']: number; -} -declare class NoSemicolonClassC { - ['a']: number; -} -declare class NoSemicolonClassD { - ['a']: any; -} -declare class NoSemicolonClassE { - ['a']: any; -} - -/// [Errors] //// - -commonMissingSemicolons.ts(1,36): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. -commonMissingSemicolons.ts(2,1): error TS1435: Unknown keyword or identifier. Did you mean 'async'? -commonMissingSemicolons.ts(2,1): error TS2304: Cannot find name 'asynd'. -commonMissingSemicolons.ts(3,1): error TS1435: Unknown keyword or identifier. Did you mean 'async'? -commonMissingSemicolons.ts(3,1): error TS2304: Cannot find name 'sasync'. -commonMissingSemicolons.ts(7,33): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. -commonMissingSemicolons.ts(8,28): error TS2304: Cannot find name 'asyncd'. -commonMissingSemicolons.ts(8,38): error TS1005: ';' expected. -commonMissingSemicolons.ts(11,1): error TS1435: Unknown keyword or identifier. Did you mean 'class'? -commonMissingSemicolons.ts(11,1): error TS2304: Cannot find name 'clasd'. -commonMissingSemicolons.ts(11,7): error TS1434: Unexpected keyword or identifier. -commonMissingSemicolons.ts(11,7): error TS2552: Cannot find name 'MyClass2'. Did you mean 'MyClass1'? -commonMissingSemicolons.ts(12,1): error TS1435: Unknown keyword or identifier. Did you mean 'class'? -commonMissingSemicolons.ts(12,1): error TS2304: Cannot find name 'classs'. -commonMissingSemicolons.ts(12,8): error TS1434: Unexpected keyword or identifier. -commonMissingSemicolons.ts(12,8): error TS2552: Cannot find name 'MyClass3'. Did you mean 'MyClass1'? -commonMissingSemicolons.ts(15,1): error TS1435: Unknown keyword or identifier. Did you mean 'const'? -commonMissingSemicolons.ts(15,1): error TS2304: Cannot find name 'consd'. -commonMissingSemicolons.ts(15,7): error TS2552: Cannot find name 'myConst2'. Did you mean 'myConst1'? -commonMissingSemicolons.ts(16,1): error TS1435: Unknown keyword or identifier. Did you mean 'const'? -commonMissingSemicolons.ts(16,1): error TS2304: Cannot find name 'constd'. -commonMissingSemicolons.ts(16,8): error TS2304: Cannot find name 'myConst3'. -commonMissingSemicolons.ts(19,1): error TS1435: Unknown keyword or identifier. Did you mean 'declare'? -commonMissingSemicolons.ts(19,1): error TS2304: Cannot find name 'declared'. -commonMissingSemicolons.ts(20,1): error TS2304: Cannot find name 'declare'. -commonMissingSemicolons.ts(20,9): error TS1435: Unknown keyword or identifier. Did you mean 'const'? -commonMissingSemicolons.ts(20,9): error TS2304: Cannot find name 'constd'. -commonMissingSemicolons.ts(21,1): error TS1435: Unknown keyword or identifier. Did you mean 'declare'? -commonMissingSemicolons.ts(21,1): error TS2304: Cannot find name 'declared'. -commonMissingSemicolons.ts(21,10): error TS1435: Unknown keyword or identifier. Did you mean 'const'? -commonMissingSemicolons.ts(21,10): error TS2304: Cannot find name 'constd'. -commonMissingSemicolons.ts(22,1): error TS1435: Unknown keyword or identifier. Did you mean 'declare const'? -commonMissingSemicolons.ts(22,1): error TS2304: Cannot find name 'declareconst'. -commonMissingSemicolons.ts(22,14): error TS2304: Cannot find name 'myDeclareConst5'. -commonMissingSemicolons.ts(25,1): error TS1435: Unknown keyword or identifier. Did you mean 'function'? -commonMissingSemicolons.ts(25,1): error TS2304: Cannot find name 'functiond'. -commonMissingSemicolons.ts(25,11): error TS2304: Cannot find name 'myFunction2'. -commonMissingSemicolons.ts(25,25): error TS1005: ';' expected. -commonMissingSemicolons.ts(26,10): error TS1359: Identifier expected. 'function' is a reserved word that cannot be used here. -commonMissingSemicolons.ts(26,18): error TS1003: Identifier expected. -commonMissingSemicolons.ts(27,1): error TS2304: Cannot find name 'functionMyFunction'. -commonMissingSemicolons.ts(30,1): error TS1435: Unknown keyword or identifier. Did you mean 'interface'? -commonMissingSemicolons.ts(30,1): error TS2304: Cannot find name 'interfaced'. -commonMissingSemicolons.ts(30,12): error TS1435: Unknown keyword or identifier. Did you mean 'interface'? -commonMissingSemicolons.ts(30,12): error TS2304: Cannot find name 'myInterface2'. -commonMissingSemicolons.ts(32,1): error TS2693: 'interface' only refers to a type, but is being used as a value here. -commonMissingSemicolons.ts(32,11): error TS1438: Interface must be given a name. -commonMissingSemicolons.ts(33,1): error TS2693: 'interface' only refers to a type, but is being used as a value here. -commonMissingSemicolons.ts(33,11): error TS2427: Interface name cannot be 'void'. -commonMissingSemicolons.ts(34,1): error TS1435: Unknown keyword or identifier. Did you mean 'interface MyInterface'? -commonMissingSemicolons.ts(34,1): error TS2304: Cannot find name 'interfaceMyInterface'. -commonMissingSemicolons.ts(38,1): error TS1435: Unknown keyword or identifier. Did you mean 'let'? -commonMissingSemicolons.ts(38,1): error TS2304: Cannot find name 'letd'. -commonMissingSemicolons.ts(38,6): error TS2304: Cannot find name 'let2'. -commonMissingSemicolons.ts(39,1): error TS2304: Cannot find name 'letMyLet'. -commonMissingSemicolons.ts(41,10): error TS4081: Exported type alias 'type' has or is using private name ''. -commonMissingSemicolons.ts(41,10): error TS1005: '=' expected. -commonMissingSemicolons.ts(45,1): error TS1435: Unknown keyword or identifier. Did you mean 'type'? -commonMissingSemicolons.ts(45,1): error TS2304: Cannot find name 'typed'. -commonMissingSemicolons.ts(45,7): error TS2304: Cannot find name 'type4'. -commonMissingSemicolons.ts(46,1): error TS1435: Unknown keyword or identifier. Did you mean 'type'? -commonMissingSemicolons.ts(46,1): error TS2304: Cannot find name 'typed'. -commonMissingSemicolons.ts(46,7): error TS2304: Cannot find name 'type5'. -commonMissingSemicolons.ts(46,15): error TS2693: 'type' only refers to a type, but is being used as a value here. -commonMissingSemicolons.ts(47,1): error TS2304: Cannot find name 'typeMyType'. -commonMissingSemicolons.ts(50,1): error TS1435: Unknown keyword or identifier. Did you mean 'var'? -commonMissingSemicolons.ts(50,1): error TS2304: Cannot find name 'vard'. -commonMissingSemicolons.ts(50,6): error TS2304: Cannot find name 'myVar2'. -commonMissingSemicolons.ts(51,1): error TS2304: Cannot find name 'varMyVar'. -commonMissingSemicolons.ts(55,3): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. -commonMissingSemicolons.ts(56,1): error TS1128: Declaration or statement expected. -commonMissingSemicolons.ts(60,3): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. -commonMissingSemicolons.ts(61,1): error TS1128: Declaration or statement expected. -commonMissingSemicolons.ts(65,3): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. -commonMissingSemicolons.ts(66,1): error TS1128: Declaration or statement expected. -commonMissingSemicolons.ts(70,11): error TS1005: ';' expected. -commonMissingSemicolons.ts(71,1): error TS1128: Declaration or statement expected. -commonMissingSemicolons.ts(75,11): error TS1005: ';' expected. -commonMissingSemicolons.ts(78,1): error TS1128: Declaration or statement expected. - - -==== commonMissingSemicolons.ts (79 errors) ==== - async function myAsyncFunction1(): Promise {} - ~~~~~~~~~~~~~ -!!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. - asynd function myAsyncFunction2(): void {} - ~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'async'? - ~~~~~ -!!! error TS2304: Cannot find name 'asynd'. - sasync function myAsyncFunction3(): void {} - ~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'async'? - ~~~~~~ -!!! error TS2304: Cannot find name 'sasync'. - - // Arrow functions don't (yet?) parse as nicely as standalone functions. - // Eventually it would be good to get them the same "did you mean" for typos such as "asyncd". - const myAsyncArrow1 = async (): Promise => 3; - ~~~~~~~~~~~~~~~ -!!! error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option. - const myAsyncArrow2: any = asyncd () => 3; - ~~~~~~ -!!! error TS2304: Cannot find name 'asyncd'. - ~~ -!!! error TS1005: ';' expected. - - class MyClass1 {} - clasd MyClass2 {} - ~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'class'? - ~~~~~ -!!! error TS2304: Cannot find name 'clasd'. - ~~~~~~~~ -!!! error TS1434: Unexpected keyword or identifier. - ~~~~~~~~ -!!! error TS2552: Cannot find name 'MyClass2'. Did you mean 'MyClass1'? -!!! related TS2728 commonMissingSemicolons.ts:10:7: 'MyClass1' is declared here. - classs MyClass3 {} - ~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'class'? - ~~~~~~ -!!! error TS2304: Cannot find name 'classs'. - ~~~~~~~~ -!!! error TS1434: Unexpected keyword or identifier. - ~~~~~~~~ -!!! error TS2552: Cannot find name 'MyClass3'. Did you mean 'MyClass1'? -!!! related TS2728 commonMissingSemicolons.ts:10:7: 'MyClass1' is declared here. - - const myConst1 = 1; - consd myConst2 = 1; - ~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? - ~~~~~ -!!! error TS2304: Cannot find name 'consd'. - ~~~~~~~~ -!!! error TS2552: Cannot find name 'myConst2'. Did you mean 'myConst1'? -!!! related TS2728 commonMissingSemicolons.ts:14:7: 'myConst1' is declared here. - constd myConst3 = 1; - ~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? - ~~~~~~ -!!! error TS2304: Cannot find name 'constd'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'myConst3'. - - declare const myDeclareConst1: 1; - declared const myDeclareConst2: 1; - ~~~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'declare'? - ~~~~~~~~ -!!! error TS2304: Cannot find name 'declared'. - declare constd myDeclareConst3: 1; - ~~~~~~~ -!!! error TS2304: Cannot find name 'declare'. - ~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? - ~~~~~~ -!!! error TS2304: Cannot find name 'constd'. - declared constd myDeclareConst4: 1; - ~~~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'declare'? - ~~~~~~~~ -!!! error TS2304: Cannot find name 'declared'. - ~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'const'? - ~~~~~~ -!!! error TS2304: Cannot find name 'constd'. - declareconst myDeclareConst5; - ~~~~~~~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'declare const'? - ~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'declareconst'. - ~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'myDeclareConst5'. - - function myFunction1(): void { } - functiond myFunction2() { } - ~~~~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'function'? - ~~~~~~~~~ -!!! error TS2304: Cannot find name 'functiond'. - ~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'myFunction2'. - ~ -!!! error TS1005: ';' expected. - function function(): void { } - ~~~~~~~~ -!!! error TS1359: Identifier expected. 'function' is a reserved word that cannot be used here. - ~ -!!! error TS1003: Identifier expected. - functionMyFunction; - ~~~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'functionMyFunction'. - - interface myInterface1 { } - interfaced myInterface2 { } - ~~~~~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'interface'? - ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'interfaced'. - ~~~~~~~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'interface'? - ~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'myInterface2'. - interface interface { } - interface { } - ~~~~~~~~~ -!!! error TS2693: 'interface' only refers to a type, but is being used as a value here. - ~ -!!! error TS1438: Interface must be given a name. - interface void { } - ~~~~~~~~~ -!!! error TS2693: 'interface' only refers to a type, but is being used as a value here. - ~~~~ -!!! error TS2427: Interface name cannot be 'void'. - interfaceMyInterface { } - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'interface MyInterface'? - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'interfaceMyInterface'. - - let let = 1; - let let1 = 1; - letd let2 = 1; - ~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'let'? - ~~~~ -!!! error TS2304: Cannot find name 'letd'. - ~~~~ -!!! error TS2304: Cannot find name 'let2'. - letMyLet; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'letMyLet'. - - type type; - -!!! error TS4081: Exported type alias 'type' has or is using private name ''. - ~ -!!! error TS1005: '=' expected. - type type1 = {}; - type type2 = type; - type type3 = {}; - typed type4 = {} - ~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'type'? - ~~~~~ -!!! error TS2304: Cannot find name 'typed'. - ~~~~~ -!!! error TS2304: Cannot find name 'type4'. - typed type5 = type; - ~~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'type'? - ~~~~~ -!!! error TS2304: Cannot find name 'typed'. - ~~~~~ -!!! error TS2304: Cannot find name 'type5'. - ~~~~ -!!! error TS2693: 'type' only refers to a type, but is being used as a value here. - typeMyType; - ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'typeMyType'. - - var myVar1 = 1; - vard myVar2 = 1; - ~~~~ -!!! error TS1435: Unknown keyword or identifier. Did you mean 'var'? - ~~~~ -!!! error TS2304: Cannot find name 'vard'. - ~~~~~~ -!!! error TS2304: Cannot find name 'myVar2'. - varMyVar; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'varMyVar'. - - class NoSemicolonClassA { - ['a'] = 0 - {} - ~ -!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. - } - ~ -!!! error TS1128: Declaration or statement expected. - - class NoSemicolonClassB { - ['a'] = 0 - {} - ~ -!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. - } - ~ -!!! error TS1128: Declaration or statement expected. - - class NoSemicolonClassC { - ['a'] = 0; - {} - ~ -!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. - } - ~ -!!! error TS1128: Declaration or statement expected. - - class NoSemicolonClassD { - ['a']: any = 0 - ['b']() {} - ~ -!!! error TS1005: ';' expected. - } - ~ -!!! error TS1128: Declaration or statement expected. - - class NoSemicolonClassE { - ['a']: any = 0 - ['b']() { - ~ -!!! error TS1005: ';' expected. - c: true - } - } - ~ -!!! error TS1128: Declaration or statement expected. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES5.d.ts deleted file mode 100644 index 2103f06e621e4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES5.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts] //// - -//// [computedPropertyNames10_ES5.ts] -var s: string; -var n: number; -var a: any; -var v = { - [s](): void { }, - [n](): void { }, - [s + s](): void { }, - [s + n](): void { }, - [+s](): void { }, - [""](): void { }, - [0](): void { }, - [a](): void { }, - [true](): void { }, - [`hello bye`](): void { }, - [`hello ${a} bye`](): void { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames10_ES5.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare var v: { - [x: string]: () => void; - [x: number]: () => void; - ""(): void; - 0(): void; - "hello bye"(): void; -}; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES6.d.ts deleted file mode 100644 index bf70a99c32c56..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertyNames10_ES6.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts] //// - -//// [computedPropertyNames10_ES6.ts] -var s: string; -var n: number; -var a: any; -var v = { - [s](): void { }, - [n](): void { }, - [s + s](): void { }, - [s + n](): void { }, - [+s](): void { }, - [""](): void { }, - [0](): void { }, - [a](): void { }, - [true](): void { }, - [`hello bye`](): void { }, - [`hello ${a} bye`](): void { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames10_ES6.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare var v: { - [x: string]: () => void; - [x: number]: () => void; - ""(): void; - 0(): void; - "hello bye"(): void; -}; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum1.d.ts deleted file mode 100644 index 8c5af71474986..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum1.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/conformance/constEnums/constEnum1.ts] //// - -//// [constEnum1.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. - -const enum E { - a = 10, - b = a, - c = (a+1), - e, - d = ~e, - f = a << 2 >> 1, - g = a << 2 >>> 1, - h = a | b -} - -/// [Declarations] //// - - - -//// [constEnum1.d.ts] -declare const enum E { - a = 10, - b = 10, - c = 11, - e = 12, - d = -13, - f = 20, - g = 20, - h = 10 -} 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 deleted file mode 100644 index 3f5acc3445c30..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum2.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -//// [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 -} - -/// [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/constEnumDeclarations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumDeclarations.d.ts deleted file mode 100644 index 25a5fe9812db8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumDeclarations.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/compiler/constEnumDeclarations.ts] //// - -//// [constEnumDeclarations.ts] -const enum E { - A = 1, - B = 2, - C = A | B -} - -const enum E2 { - A = 1, - B, - C -} - -/// [Declarations] //// - - - -//// [constEnumDeclarations.d.ts] -declare const enum E { - A = 1, - B = 2, - C = 3 -} -declare const enum E2 { - A = 1, - B = 2, - C = 3 -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumErrors.d.ts deleted file mode 100644 index 62026425f9d85..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumErrors.d.ts +++ /dev/null @@ -1,181 +0,0 @@ -//// [tests/cases/compiler/constEnumErrors.ts] //// - -//// [constEnumErrors.ts] -const enum E { - A -} - -module E { - var x = 1; -} - -const enum E1 { - // illegal case - // forward reference to the element of the same enum - X = Y, - // forward reference to the element of the same enum - Y = E1.Z, - Y1 = E1["Z"] -} - -const enum E2 { - A -} - -var y0: any = E2[1] -var name = "A"; -var y1: any = E2[name]; -var y2: any = E2[`${name}`]; - -var x: typeof E2 = E2; -var y: (typeof E2)[] = [E2]; - -function foo(t: any): void { -} - -foo(E2); - -const enum NaNOrInfinity { - A = 9007199254740992, - B = A * A, - C = B * B, - D = C * C, - E = D * D, - F = E * E, // overflow - G = 1 / 0, // overflow - H = 0 / 0 // NaN -} - -/// [Declarations] //// - - - -//// [constEnumErrors.d.ts] -declare const enum E { - A = 0 -} -declare namespace E { -} -declare const enum E1 { - X = 0, - Y, - Y1 -} -declare const enum E2 { - A = 0 -} -declare var y0: any; -declare var name: string; -declare var y1: any; -declare var y2: any; -declare var x: typeof E2; -declare var y: (typeof E2)[]; -declare function foo(t: any): void; -declare const enum NaNOrInfinity { - A = 9007199254740992, - B = 8.112963841460668e+31, - C = 6.582018229284824e+63, - D = 4.332296397063773e+127, - E = 1.876879207201175e+255, - F = Infinity,// overflow - G = Infinity,// overflow - H = NaN -} - -/// [Errors] //// - -constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. -constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. -constEnumErrors.ts(15,10): error TS2474: const enum member initializers must be constant expressions. -constEnumErrors.ts(15,13): error TS2339: Property 'Z' does not exist on type 'typeof E1'. -constEnumErrors.ts(22,18): error TS2476: A const enum member can only be accessed using a string literal. -constEnumErrors.ts(24,18): error TS2476: A const enum member can only be accessed using a string literal. -constEnumErrors.ts(25,18): error TS2476: A const enum member can only be accessed using a string literal. -constEnumErrors.ts(27,20): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -constEnumErrors.ts(28,25): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -constEnumErrors.ts(33,5): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -constEnumErrors.ts(41,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -constEnumErrors.ts(42,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - - -==== constEnumErrors.ts (16 errors) ==== - const enum E { - ~ -!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. - A - } - - module E { - ~ -!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. - var x = 1; - } - - const enum E1 { - // illegal case - // forward reference to the element of the same enum - X = Y, - ~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - // forward reference to the element of the same enum - Y = E1.Z, - ~~~~ -!!! error TS2474: const enum member initializers must be constant expressions. - ~ -!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. - Y1 = E1["Z"] - ~~~~~~~ -!!! error TS2474: const enum member initializers must be constant expressions. - ~~~ -!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. - } - - const enum E2 { - A - } - - var y0: any = E2[1] - ~ -!!! error TS2476: A const enum member can only be accessed using a string literal. - var name = "A"; - var y1: any = E2[name]; - ~~~~ -!!! error TS2476: A const enum member can only be accessed using a string literal. - var y2: any = E2[`${name}`]; - ~~~~~~~~~ -!!! error TS2476: A const enum member can only be accessed using a string literal. - - var x: typeof E2 = E2; - ~~ -!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. - var y: (typeof E2)[] = [E2]; - ~~ -!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. - - function foo(t: any): void { - } - - foo(E2); - ~~ -!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. - - const enum NaNOrInfinity { - A = 9007199254740992, - B = A * A, - C = B * B, - D = C * C, - E = D * D, - F = E * E, // overflow - ~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - G = 1 / 0, // overflow - ~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - H = 0 / 0 // NaN - ~~~~~ -!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumNamespaceReferenceCausesNoImport2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumNamespaceReferenceCausesNoImport2.d.ts deleted file mode 100644 index eb9054738f2f4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumNamespaceReferenceCausesNoImport2.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -//// [tests/cases/compiler/constEnumNamespaceReferenceCausesNoImport2.ts] //// - -//// [index.ts] -import Foo = require("./reexport"); -function check(x: Foo.ConstFooEnum): void { - switch (x) { - case Foo.ConstFooEnum.Some: - break; - } -} -//// [foo.ts] -export module ConstEnumOnlyModule { - export const enum ConstFooEnum { - Some, - Values, - Here - } -} - -//// [reexport.ts] -import * as Foo from "./foo"; -export = Foo.ConstEnumOnlyModule; - - -/// [Declarations] //// - - - -//// [foo.d.ts] -export declare namespace ConstEnumOnlyModule { - const enum ConstFooEnum { - Some = 0, - Values = 1, - Here = 2 - } -} - -//// [index.d.ts] -export {}; - -//// [reexport.d.ts] -import * as Foo from "./foo"; -declare const _default: typeof Foo.ConstEnumOnlyModule; -export = _default; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess1.d.ts deleted file mode 100644 index f3151dd7f3b2b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess1.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -//// [tests/cases/conformance/constEnums/constEnumPropertyAccess1.ts] //// - -//// [constEnumPropertyAccess1.ts] -// constant enum declarations are completely erased in the emitted JavaScript code. -// it is an error to reference a constant enum object in any other context -// than a property access that selects one of the enum's members - -const enum G { - A = 1, - B = 2, - C = A + B, - D = A * 2 -} - -var o: { - [idx: number]: boolean -} = { - 1: true - }; - -var a: G = G.A; -var a1: G = G["A"]; -var g: boolean = o[G.A]; - -class C { - [G.A](): void { } - get [G.B](): number { - return true; - } - set [G.B](x: number) { } -} - - - -/// [Declarations] //// - - - -//// [constEnumPropertyAccess1.d.ts] -declare const enum G { - A = 1, - B = 2, - C = 3, - D = 2 -} -declare var o: { - [idx: number]: boolean; -}; -declare var a: G; -declare var a1: G; -declare var g: boolean; -declare class C { - [G.A](): void; - get [G.B](): number; - set [G.B](x: number); -} - -/// [Errors] //// - -constEnumPropertyAccess1.ts(25,9): error TS2322: Type 'boolean' is not assignable to type 'number'. - - -==== constEnumPropertyAccess1.ts (1 errors) ==== - // constant enum declarations are completely erased in the emitted JavaScript code. - // it is an error to reference a constant enum object in any other context - // than a property access that selects one of the enum's members - - const enum G { - A = 1, - B = 2, - C = A + B, - D = A * 2 - } - - var o: { - [idx: number]: boolean - } = { - 1: true - }; - - var a: G = G.A; - var a1: G = G["A"]; - var g: boolean = o[G.A]; - - class C { - [G.A](): void { } - get [G.B](): number { - return true; - ~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - } - set [G.B](x: number) { } - } - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess2.d.ts deleted file mode 100644 index 1e08900b22f81..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess2.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -//// [tests/cases/conformance/constEnums/constEnumPropertyAccess2.ts] //// - -//// [constEnumPropertyAccess2.ts] -// constant enum declarations are completely erased in the emitted JavaScript code. -// it is an error to reference a constant enum object in any other context -// than a property access that selects one of the enum's members - -const enum G { - A = 1, - B = 2, - C = A + B, - D = A * 2 -} - -// Error from referring constant enum in any other context than a property access -var z: typeof G = G; -var z1: any = G[G.A]; -var g: G; -g = "string"; -function foo(x: G): void { } -G.B = 3; - - -/// [Declarations] //// - - - -//// [constEnumPropertyAccess2.d.ts] -declare const enum G { - A = 1, - B = 2, - C = 3, - D = 2 -} -declare var z: typeof G; -declare var z1: any; -declare var g: G; -declare function foo(x: G): void; - -/// [Errors] //// - -constEnumPropertyAccess2.ts(13,19): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -constEnumPropertyAccess2.ts(14,17): error TS2476: A const enum member can only be accessed using a string literal. -constEnumPropertyAccess2.ts(16,1): error TS2322: Type '"string"' is not assignable to type 'G'. -constEnumPropertyAccess2.ts(18,3): error TS2540: Cannot assign to 'B' because it is a read-only property. - - -==== constEnumPropertyAccess2.ts (4 errors) ==== - // constant enum declarations are completely erased in the emitted JavaScript code. - // it is an error to reference a constant enum object in any other context - // than a property access that selects one of the enum's members - - const enum G { - A = 1, - B = 2, - C = A + B, - D = A * 2 - } - - // Error from referring constant enum in any other context than a property access - var z: typeof G = G; - ~ -!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. - var z1: any = G[G.A]; - ~~~ -!!! error TS2476: A const enum member can only be accessed using a string literal. - var g: G; - g = "string"; - ~ -!!! error TS2322: Type '"string"' is not assignable to type 'G'. - function foo(x: G): void { } - G.B = 3; - ~ -!!! error TS2540: Cannot assign to 'B' because it is a read-only property. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess3.d.ts deleted file mode 100644 index b53bc34d8bff7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnumPropertyAccess3.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -//// [tests/cases/conformance/constEnums/constEnumPropertyAccess3.ts] //// - -//// [constEnumPropertyAccess3.ts] -const enum E { - A = ~1, - B = -1, - C = ~(1 + 1), - D = -(1 + 2), - E = 1 - 10, -} - -E.A.toString(); -E.B.toString(); -E.C.toString(); -E.D.toString(); - -E["A"].toString(); -E["B"].toString(); -E["C"].toString(); -E["D"].toString(); -E["E"].toString(); - - -/// [Declarations] //// - - - -//// [constEnumPropertyAccess3.d.ts] -declare const enum E { - A = -2, - B = -1, - C = -3, - D = -3, - E = -9 -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnums.d.ts deleted file mode 100644 index 2e2127f1c2653..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnums.d.ts +++ /dev/null @@ -1,281 +0,0 @@ -//// [tests/cases/compiler/constEnums.ts] //// - -//// [constEnums.ts] -const enum Enum1 { - A0 = 100, -} - -const enum Enum1 { - // correct cases - A, - B, - C = 10, - D = A | B, - E = A | 1, - F = 1 | A, - G = (1 & 1), - H = ~(A | B), - I = A >>> 1, - J = 1 & A, - K = ~(1 | 5), - L = ~D, - M = E << B, - N = E << 1, - O = E >> B, - P = E >> 1, - PQ = E ** 2, - Q = -D, - R = C & 5, - S = 5 & C, - T = C | D, - U = C | 1, - V = 10 | D, - W = Enum1.V, - - // correct cases: reference to the enum member from different enum declaration - W1 = A0, - W2 = Enum1.A0, - W3 = Enum1["A0"], - W4 = Enum1["W"], - W5 = Enum1[`V`], -} - -const enum Comments { - "//", - "/*", - "*/", - "///", - "#", - "", -} - -module A { - export module B { - export module C { - export const enum E { - V1 = 1, - V2 = A.B.C.E.V1 | 100 - } - } - } -} - -module A { - export module B { - export module C { - export const enum E { - V3 = A.B.C.E["V2"] & 200, - V4 = A.B.C.E[`V1`] << 1, - } - } - } -} - -module A1 { - export module B { - export module C { - export const enum E { - V1 = 10, - V2 = 110, - } - } - } -} - -module A2 { - export module B { - export module C { - export const enum E { - V1 = 10, - V2 = 110, - } - } - // module C will be classified as value - export module C { - var x = 1 - } - } -} - -import I = A.B.C.E; -import I1 = A1.B; -import I2 = A2.B; - -function foo0(e: I): void { - if (e === I.V1) { - } - else if (e === I.V2) { - } -} - -function foo1(e: I1.C.E): void { - if (e === I1.C.E.V1) { - } - else if (e === I1.C.E.V2) { - } -} - -function foo2(e: I2.C.E): void { - if (e === I2.C.E.V1) { - } - else if (e === I2.C.E.V2) { - } -} - - -function foo(x: Enum1): void { - switch (x) { - case Enum1.A: - case Enum1.B: - case Enum1.C: - case Enum1.D: - case Enum1.E: - case Enum1.F: - case Enum1.G: - case Enum1.H: - case Enum1.I: - case Enum1.J: - case Enum1.K: - case Enum1.L: - case Enum1.M: - case Enum1.N: - case Enum1.O: - case Enum1.P: - case Enum1.PQ: - case Enum1.Q: - case Enum1.R: - case Enum1.S: - case Enum1["T"]: - case Enum1[`U`]: - case Enum1.V: - case Enum1.W: - case Enum1.W1: - case Enum1.W2: - case Enum1.W3: - case Enum1.W4: - break; - } -} - -function bar(e: A.B.C.E): number { - switch (e) { - case A.B.C.E.V1: return 1; - case A.B.C.E.V2: return 1; - case A.B.C.E.V3: return 1; - } -} - -function baz(c: Comments): void { - switch (c) { - case Comments["//"]: - case Comments["/*"]: - case Comments["*/"]: - case Comments["///"]: - case Comments["#"]: - case Comments[""]: - break; - } -} - - -/// [Declarations] //// - - - -//// [constEnums.d.ts] -declare const enum Enum1 { - A0 = 100 -} -declare const enum Enum1 { - A = 0, - B = 1, - C = 10, - D = 1, - E = 1, - F = 1, - G = 1, - H = -2, - I = 0, - J = 0, - K = -6, - L = -2, - M = 2, - N = 2, - O = 0, - P = 0, - PQ = 1, - Q = -1, - R = 0, - S = 0, - T = 11, - U = 11, - V = 11, - W = 11, - W1 = 100, - W2 = 100, - W3 = 100, - W4 = 11, - W5 = 11 -} -declare const enum Comments { - "//" = 0, - "/*" = 1, - "*/" = 2, - "///" = 3, - "#" = 4, - "" = 6 -} -declare namespace A { - namespace B { - namespace C { - const enum E { - V1 = 1, - V2 = 101 - } - } - } -} -declare namespace A { - namespace B { - namespace C { - const enum E { - V3 = 64, - V4 = 2 - } - } - } -} -declare namespace A1 { - namespace B { - namespace C { - const enum E { - V1 = 10, - V2 = 110 - } - } - } -} -declare namespace A2 { - namespace B { - namespace C { - const enum E { - V1 = 10, - V2 = 110 - } - } - namespace C { - } - } -} -import I = A.B.C.E; -import I1 = A1.B; -import I2 = A2.B; -declare function foo0(e: I): void; -declare function foo1(e: I1.C.E): void; -declare function foo2(e: I2.C.E): void; -declare function foo(x: Enum1): void; -declare function bar(e: A.B.C.E): number; -declare function baz(c: Comments): void; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constantEnumAssert.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constantEnumAssert.d.ts deleted file mode 100644 index 353991bffa6d5..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constantEnumAssert.d.ts +++ /dev/null @@ -1,223 +0,0 @@ -//// [tests/cases/compiler/constantEnumAssert.ts] //// - -//// [constantEnumAssert.ts] -enum E1 { - a, - b -} - -enum E2 { - a = 'a', - b = 'b' -} - -enum E3 { - a = 1, - b = a << 1, - c = a << 2, -} - -const enum E4 { - a, - b -} - -const E5 = { - a: 'a', - b: 'b' -} - -const foo1: { - a: E1 -} = { a: E1.a } - -const foo2: { - a: E2 -} = { a: E2.a } - -const foo3: { - readonly a: E1.a -} = { a: E1.a } as const - -const foo4: { - readonly a: E2.a -} = { a: E2.a } as const - -const foo5: { - readonly a: E3.a -} = { a: E3.a } as const - -const foo6: { - readonly a: E4.a -} = { a: E4.a } as const - -const foo7: { - readonly a: string -} = { a: E5.a } as const - -const foo8: { - a: E1.a -} = { a: E1.a as const } - -const foo9: { - a: E2.a -} = { a: E2.a as const } - -const foo10: { - a: E3.a -} = { a: E3.a as const } - -const foo11: { - a: E4.a -} = { a: E4.a as const } - -const foo12: { - a: string -} = { a: E5.a as const } - - -/// [Declarations] //// - - - -//// [constantEnumAssert.d.ts] -declare enum E1 { - a = 0, - b = 1 -} -declare enum E2 { - a = "a", - b = "b" -} -declare enum E3 { - a = 1, - b = 2, - c = 4 -} -declare const enum E4 { - a = 0, - b = 1 -} -declare const E5: { - a: string; - b: string; -}; -declare const foo1: { - a: E1; -}; -declare const foo2: { - a: E2; -}; -declare const foo3: { - readonly a: E1.a; -}; -declare const foo4: { - readonly a: E2.a; -}; -declare const foo5: { - readonly a: E3.a; -}; -declare const foo6: { - readonly a: E4.a; -}; -declare const foo7: { - readonly a: string; -}; -declare const foo8: { - a: E1.a; -}; -declare const foo9: { - a: E2.a; -}; -declare const foo10: { - a: E3.a; -}; -declare const foo11: { - a: E4.a; -}; -declare const foo12: { - a: string; -}; - -/// [Errors] //// - -constantEnumAssert.ts(73,10): error TS1355: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. - - -==== constantEnumAssert.ts (1 errors) ==== - enum E1 { - a, - b - } - - enum E2 { - a = 'a', - b = 'b' - } - - enum E3 { - a = 1, - b = a << 1, - c = a << 2, - } - - const enum E4 { - a, - b - } - - const E5 = { - a: 'a', - b: 'b' - } - - const foo1: { - a: E1 - } = { a: E1.a } - - const foo2: { - a: E2 - } = { a: E2.a } - - const foo3: { - readonly a: E1.a - } = { a: E1.a } as const - - const foo4: { - readonly a: E2.a - } = { a: E2.a } as const - - const foo5: { - readonly a: E3.a - } = { a: E3.a } as const - - const foo6: { - readonly a: E4.a - } = { a: E4.a } as const - - const foo7: { - readonly a: string - } = { a: E5.a } as const - - const foo8: { - a: E1.a - } = { a: E1.a as const } - - const foo9: { - a: E2.a - } = { a: E2.a as const } - - const foo10: { - a: E3.a - } = { a: E3.a as const } - - const foo11: { - a: E4.a - } = { a: E4.a as const } - - const foo12: { - a: string - } = { a: E5.a as const } - ~~~~ -!!! error TS1355: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constructorWithIncompleteTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constructorWithIncompleteTypeAnnotation.d.ts deleted file mode 100644 index a019c8006f574..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constructorWithIncompleteTypeAnnotation.d.ts +++ /dev/null @@ -1,910 +0,0 @@ -//// [tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts] //// - -//// [constructorWithIncompleteTypeAnnotation.ts] -declare module "fs" { - export class File { - constructor(filename: string); - public ReadAllText(): string; - } - export interface IFile { - [index: number]: string; - } -} - -import fs = module("fs"); - - -module TypeScriptAllInOne { - export class Program { - static Main(...args: string[]): void { - try { - var bfs = new BasicFeatures(); - var retValue: number = 0; - - retValue = bfs.VARIABLES(); - if (retValue != 0 ^= { - - return 1; - } - - case: any = bfs.STATEMENTS(4); - if (retValue: any != 0) { - - return 1; - ^ - - - retValue = bfs.TYPES(); - if (retValue != 0) { - - return 1 && - } - - retValue = bfs.OPERATOR ' ); - if (retValue != 0) { - - return 1; - } - } - catch (e) { - console.log(e); - } - finally { - - } - - console.log('Done'); - - return 0; - - } - } - - class BasicFeatures { - /// - /// Test various of variables. Including nullable,key world as variable,special format - /// - /// - public VARIABLES(): number { - var local = Number.MAX_VALUE; - var min = Number.MIN_VALUE; - var inf = Number.NEGATIVE_INFINITY - - var nan = Number.NaN; - var undef = undefined; - - var _\uD4A5\u7204\uC316\uE59F = local; - var мир = local; - - var local5 = null; - var local6 = local5 instanceof fs.File; - - var hex = 0xBADC0DE, Hex = 0XDEADBEEF; - var float = 6.02e23, float2 = 6.02E-23 - var char = 'c', \u0066 = '\u0066', hexchar = '\x42' != - var quoted = '"', quoted2 = "'"; - var reg = /\w*/; - var objLit = { "var": number = 42, equals: function (x) { return x["var"] === 42; }, instanceof : () => 'objLit{42}' }; - var weekday = Weekdays.Monday; - - var con = char + f + hexchar + float.toString() + float2.toString() + reg.toString() + objLit + weekday; - - // - var any = 0 ^= - var bool = 0; - var declare = 0; - var constructor = 0; - var get = 0; - var implements = 0; - var interface = 0; - var let = 0; - var module = 0; - var number = 0; - var package = 0; - var private = 0; - var protected = 0; - var public = 0; - var set = 0; - var static = 0; - var string = 0 /> - var yield = 0; - - var sum3 = any + bool + declare + constructor + get + implements + interface + let + module + number + package + private + protected + public + set + static + string + yield; - - return 0; - } - - /// - /// Test different statements. Including if-else,swith,foreach,(un)checked,lock,using,try-catch-finally - /// - /// - /// - STATEMENTS(i: number): number { - var retVal = 0; - if (i == 1) - retVal = 1; - else - retVal = 0; - switch (i) { - case 2: - retVal = 1; - break; - case 3: - retVal = 1; - break; - default: - break; - } - - for (var x in { x: 0, y: 1 }) { - ! - - try { - throw null; - } - catch (Exception) ? - } - finally { - try { } - catch (Exception) { } - } - - return retVal; - } - - /// - /// Test types in ts language. Including class,struct,interface,delegate,anonymous type - /// - /// - public TYPES(): number { - var retVal = 0; - var c = new CLASS(); - var xx: IF = c; - retVal += catch .Property; - retVal += c.Member(); - retVal += xx.Foo() ? 0 : 1; - - //anonymous type - var anony = { a: new CLASS() }; - - retVal += anony.a.d(); - - return retVal; - } - - - ///// - ///// Test different operators - ///// - ///// - public OPERATOR(): number { - var a: number[] = [1, 2, 3, 4, 5, ];/*[] bug*/ // YES [] - var i = a[1];/*[]*/ - i = i + i - i * i / i % i & i | i ^ i;/*+ - * / % & | ^*/ - var b = true && false || true ^ false;/*& | ^*/ - b = !b;/*!*/ - i = ~i;/*~i*/ - b = i < (i - 1) && (i + 1) > i;/*< && >*/ - var f = true ? 1 : 0;/*? :*/ // YES : - i++;/*++*/ - i--;/*--*/ - b = true && false || true;/*&& ||*/ - i = i << 5;/*<<*/ - i = i >> 5;/*>>*/ - var j = i; - b = i == j && i != j && i <= j && i >= j;/*= == && != <= >=*/ - i += 5.0;/*+=*/ - i -= i;/*-=*/ - i *= i;/**=*/ - if (i == 0) - i++; - i /= i;/*/=*/ - i %= i;/*%=*/ - i &= i;/*&=*/ - i |= i;/*|=*/ - i ^= i;/*^=*/ - i <<= i;/*<<=*/ - i >>= i;/*>>=*/ - - if (i == 0 && != b && f == 1) - return 0; - else return 1; - } - - } - - interface IF { - Foo(): bool; - } - - class CLASS implements IF { - - case d = (): void => { yield 0; }; - public get Property(): number { return 0; } - public Member(): number { - return 0; - } - public Foo(): bool { - var myEvent = () => { return 1; }; - if (myEvent() == 1) - return true ? - else - return false; - } - } - - - // todo: use these - class A . - public method1(val:number) { - return val; - } - public method2() { - return 2 * this.method1(2); - } - } - - class B extends A { - - public method2(): any { - return this.method1(2); - } - } - - class Overloading { - - private otherValue = 42; - - constructor(private value: number, public name: string) : } - - public Overloads(value: string); - public Overloads( while : string, ...rest: string[]) { & - - public DefaultValue(value?: string = "Hello") { } - } -} - -enum Weekdays { - Monday, - Tuesday, - Weekend, -} - -enum Fruit { - Apple, - Pear -} - -interface IDisposable { - Dispose(): void; -} - -TypeScriptAllInOne.Program.Main(); - - -/// [Declarations] //// - - - -//// [constructorWithIncompleteTypeAnnotation.d.ts] -declare module "fs" { - class File { - constructor(filename: string); - ReadAllText(): string; - } - interface IFile { - [index: number]: string; - } -} -import fs = module; -declare namespace TypeScriptAllInOne { - class Program { - static Main(...args: string[]): void; - case: any; - if(retValue: any): any; - } -} -declare class BasicFeatures { - VARIABLES(): number; - STATEMENTS(i: number): number; - TYPES(): number; - OPERATOR(): number; -} -interface IF { - Foo(): bool; -} -declare class CLASS implements IF { - d: () => void; - get Property(): number; - Member(): number; - Foo(): bool; -} -declare class A { -} -declare class B extends A { - method2(): any; -} -declare class Overloading { - private otherValue; - constructor(value: number, name: string); -} -declare enum Weekdays { - Monday = 0, - Tuesday = 1, - Weekend = 2 -} -declare enum Fruit { - Apple = 0, - Pear = 1 -} -interface IDisposable { - Dispose(): void; -} - -/// [Errors] //// - -constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2503: Cannot find namespace 'module'. -constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. -constructorWithIncompleteTypeAnnotation.ts(11,13): error TS4000: Import declaration 'fs' is using private name 'module'. -constructorWithIncompleteTypeAnnotation.ts(11,19): error TS1005: ';' expected. -constructorWithIncompleteTypeAnnotation.ts(22,35): error TS1005: ')' expected. -constructorWithIncompleteTypeAnnotation.ts(22,39): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -constructorWithIncompleteTypeAnnotation.ts(24,28): error TS1005: ':' expected. -constructorWithIncompleteTypeAnnotation.ts(24,29): error TS1005: ',' expected. -constructorWithIncompleteTypeAnnotation.ts(27,18): error TS1128: Declaration or statement expected. -constructorWithIncompleteTypeAnnotation.ts(27,31): error TS2304: Cannot find name 'bfs'. -constructorWithIncompleteTypeAnnotation.ts(28,35): error TS1005: ',' expected. -constructorWithIncompleteTypeAnnotation.ts(28,39): error TS1005: ';' expected. -constructorWithIncompleteTypeAnnotation.ts(31,18): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(34,17): error TS2304: Cannot find name 'retValue'. -constructorWithIncompleteTypeAnnotation.ts(34,26): error TS1005: ';' expected. -constructorWithIncompleteTypeAnnotation.ts(34,28): error TS2304: Cannot find name 'bfs'. -constructorWithIncompleteTypeAnnotation.ts(35,21): error TS2304: Cannot find name 'retValue'. -constructorWithIncompleteTypeAnnotation.ts(38,17): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(40,17): error TS2304: Cannot find name 'retValue'. -constructorWithIncompleteTypeAnnotation.ts(40,28): error TS2304: Cannot find name 'bfs'. -constructorWithIncompleteTypeAnnotation.ts(40,41): error TS1005: ';' expected. -constructorWithIncompleteTypeAnnotation.ts(40,45): error TS1002: Unterminated string literal. -constructorWithIncompleteTypeAnnotation.ts(41,21): error TS2304: Cannot find name 'retValue'. -constructorWithIncompleteTypeAnnotation.ts(46,13): error TS1005: 'try' expected. -constructorWithIncompleteTypeAnnotation.ts(47,17): error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. -constructorWithIncompleteTypeAnnotation.ts(53,13): error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. -constructorWithIncompleteTypeAnnotation.ts(58,5): error TS1128: Declaration or statement expected. -constructorWithIncompleteTypeAnnotation.ts(69,13): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(72,37): error TS1127: Invalid character. -constructorWithIncompleteTypeAnnotation.ts(81,13): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(89,23): error TS2364: The left-hand side of an assignment expression must be a variable or a property access. -constructorWithIncompleteTypeAnnotation.ts(90,13): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(105,29): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(106,13): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(108,24): error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. -constructorWithIncompleteTypeAnnotation.ts(138,13): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(141,32): error TS1005: '{' expected. -constructorWithIncompleteTypeAnnotation.ts(143,13): error TS1005: 'try' expected. -constructorWithIncompleteTypeAnnotation.ts(159,24): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(159,30): error TS1005: '{' expected. -constructorWithIncompleteTypeAnnotation.ts(159,31): error TS2304: Cannot find name 'Property'. -constructorWithIncompleteTypeAnnotation.ts(166,13): error TS2365: Operator '+=' cannot be applied to types 'number' and 'void'. -constructorWithIncompleteTypeAnnotation.ts(180,40): error TS2447: The '^' operator is not allowed for boolean types. Consider using '!==' instead. -constructorWithIncompleteTypeAnnotation.ts(181,13): error TS2322: Type 'boolean' is not assignable to type 'number'. -constructorWithIncompleteTypeAnnotation.ts(183,13): error TS2322: Type 'boolean' is not assignable to type 'number'. -constructorWithIncompleteTypeAnnotation.ts(187,13): error TS2322: Type 'boolean' is not assignable to type 'number'. -constructorWithIncompleteTypeAnnotation.ts(191,13): error TS2322: Type 'boolean' is not assignable to type 'number'. -constructorWithIncompleteTypeAnnotation.ts(205,28): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(213,16): error TS2304: Cannot find name 'bool'. -constructorWithIncompleteTypeAnnotation.ts(213,16): error TS4057: Return type of method from exported interface has or is using private name 'bool'. -constructorWithIncompleteTypeAnnotation.ts(218,10): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. -constructorWithIncompleteTypeAnnotation.ts(223,23): error TS2304: Cannot find name 'bool'. -constructorWithIncompleteTypeAnnotation.ts(223,23): error TS4055: Return type of public method from exported class has or is using private name 'bool'. -constructorWithIncompleteTypeAnnotation.ts(227,13): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(234,14): error TS1005: '{' expected. -constructorWithIncompleteTypeAnnotation.ts(235,9): error TS1128: Declaration or statement expected. -constructorWithIncompleteTypeAnnotation.ts(235,16): error TS2304: Cannot find name 'method1'. -constructorWithIncompleteTypeAnnotation.ts(235,24): error TS2304: Cannot find name 'val'. -constructorWithIncompleteTypeAnnotation.ts(235,27): error TS1005: ',' expected. -constructorWithIncompleteTypeAnnotation.ts(235,28): error TS2693: 'number' only refers to a type, but is being used as a value here. -constructorWithIncompleteTypeAnnotation.ts(235,36): error TS1005: ';' expected. -constructorWithIncompleteTypeAnnotation.ts(238,9): error TS1128: Declaration or statement expected. -constructorWithIncompleteTypeAnnotation.ts(238,16): error TS2304: Cannot find name 'method2'. -constructorWithIncompleteTypeAnnotation.ts(238,26): error TS1005: ';' expected. -constructorWithIncompleteTypeAnnotation.ts(241,5): error TS1128: Declaration or statement expected. -constructorWithIncompleteTypeAnnotation.ts(246,25): error TS2551: Property 'method1' does not exist on type 'B'. Did you mean 'method2'? -constructorWithIncompleteTypeAnnotation.ts(254,9): error TS2390: Constructor implementation is missing. -constructorWithIncompleteTypeAnnotation.ts(254,21): error TS2369: A parameter property is only allowed in a constructor implementation. -constructorWithIncompleteTypeAnnotation.ts(254,44): error TS2369: A parameter property is only allowed in a constructor implementation. -constructorWithIncompleteTypeAnnotation.ts(254,69): error TS1110: Type expected. -constructorWithIncompleteTypeAnnotation.ts(256,9): error TS1128: Declaration or statement expected. -constructorWithIncompleteTypeAnnotation.ts(256,16): error TS2304: Cannot find name 'Overloads'. -constructorWithIncompleteTypeAnnotation.ts(256,26): error TS2304: Cannot find name 'value'. -constructorWithIncompleteTypeAnnotation.ts(256,31): error TS1005: ',' expected. -constructorWithIncompleteTypeAnnotation.ts(256,33): error TS2693: 'string' only refers to a type, but is being used as a value here. -constructorWithIncompleteTypeAnnotation.ts(257,9): error TS1128: Declaration or statement expected. -constructorWithIncompleteTypeAnnotation.ts(257,16): error TS2304: Cannot find name 'Overloads'. -constructorWithIncompleteTypeAnnotation.ts(257,27): error TS1135: Argument expression expected. -constructorWithIncompleteTypeAnnotation.ts(257,33): error TS1005: '(' expected. -constructorWithIncompleteTypeAnnotation.ts(257,35): error TS2693: 'string' only refers to a type, but is being used as a value here. -constructorWithIncompleteTypeAnnotation.ts(257,43): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(257,52): error TS2693: 'string' only refers to a type, but is being used as a value here. -constructorWithIncompleteTypeAnnotation.ts(257,59): error TS1011: An element access expression should take an argument. -constructorWithIncompleteTypeAnnotation.ts(257,60): error TS1005: ';' expected. -constructorWithIncompleteTypeAnnotation.ts(257,65): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(259,9): error TS2304: Cannot find name 'public'. -constructorWithIncompleteTypeAnnotation.ts(259,16): error TS1005: ';' expected. -constructorWithIncompleteTypeAnnotation.ts(259,16): error TS2304: Cannot find name 'DefaultValue'. -constructorWithIncompleteTypeAnnotation.ts(259,29): error TS2304: Cannot find name 'value'. -constructorWithIncompleteTypeAnnotation.ts(259,35): error TS1109: Expression expected. -constructorWithIncompleteTypeAnnotation.ts(259,37): error TS2693: 'string' only refers to a type, but is being used as a value here. -constructorWithIncompleteTypeAnnotation.ts(259,55): error TS1005: ';' expected. -constructorWithIncompleteTypeAnnotation.ts(261,1): error TS1128: Declaration or statement expected. - - -==== constructorWithIncompleteTypeAnnotation.ts (93 errors) ==== - declare module "fs" { - export class File { - constructor(filename: string); - public ReadAllText(): string; - } - export interface IFile { - [index: number]: string; - } - } - - import fs = module("fs"); - ~~~~~~ -!!! error TS2503: Cannot find namespace 'module'. - ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. - ~~~~~~ -!!! error TS4000: Import declaration 'fs' is using private name 'module'. - ~ -!!! error TS1005: ';' expected. - - - module TypeScriptAllInOne { - export class Program { - static Main(...args: string[]): void { - try { - var bfs = new BasicFeatures(); - var retValue: number = 0; - - retValue = bfs.VARIABLES(); - if (retValue != 0 ^= { - ~~ -!!! error TS1005: ')' expected. -!!! related TS1007 constructorWithIncompleteTypeAnnotation.ts:22:20: The parser expected to find a ')' to match the '(' token here. - ~ - - - return 1; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ~ -!!! error TS1005: ':' expected. - ~ -!!! error TS1005: ',' expected. - } - ~~~~~~~~~~~~~~~~~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - - case: any = bfs.STATEMENTS(4); - ~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~ -!!! error TS2304: Cannot find name 'bfs'. - if (retValue: any != 0) { - ~~ -!!! error TS1005: ',' expected. - ~ -!!! error TS1005: ';' expected. - - return 1; - ^ - ~ -!!! error TS1109: Expression expected. - - - retValue = bfs.TYPES(); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'retValue'. - ~ -!!! error TS1005: ';' expected. - ~~~ -!!! error TS2304: Cannot find name 'bfs'. - if (retValue != 0) { - ~~~~~~~~ -!!! error TS2304: Cannot find name 'retValue'. - - return 1 && - } - ~ -!!! error TS1109: Expression expected. - - retValue = bfs.OPERATOR ' ); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'retValue'. - ~~~ -!!! error TS2304: Cannot find name 'bfs'. - ~~~~ -!!! error TS1005: ';' expected. - -!!! error TS1002: Unterminated string literal. - if (retValue != 0) { - ~~~~~~~~ -!!! error TS2304: Cannot find name 'retValue'. - - return 1; - } - } - catch (e) { - ~~~~~ -!!! error TS1005: 'try' expected. - console.log(e); - ~~~~~~~ -!!! error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. - } - finally { - - } - - console.log('Done'); - ~~~~~~~ -!!! error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'. - - return 0; - - } - } - ~ -!!! error TS1128: Declaration or statement expected. - - class BasicFeatures { - /// - /// Test various of variables. Including nullable,key world as variable,special format - /// - /// - public VARIABLES(): number { - var local = Number.MAX_VALUE; - var min = Number.MIN_VALUE; - var inf = Number.NEGATIVE_INFINITY - - var nan = Number.NaN; - ~~~ -!!! error TS1109: Expression expected. - var undef = undefined; - - var _\uD4A5\u7204\uC316\uE59F = local; - -!!! error TS1127: Invalid character. - var мир = local; - - var local5 = null; - var local6 = local5 instanceof fs.File; - - var hex = 0xBADC0DE, Hex = 0XDEADBEEF; - var float = 6.02e23, float2 = 6.02E-23 - var char = 'c', \u0066 = '\u0066', hexchar = '\x42' != - var quoted = '"', quoted2 = "'"; - ~~~ -!!! error TS1109: Expression expected. - var reg = /\w*/; - var objLit = { "var": number = 42, equals: function (x) { return x["var"] === 42; }, instanceof : () => 'objLit{42}' }; - var weekday = Weekdays.Monday; - - var con = char + f + hexchar + float.toString() + float2.toString() + reg.toString() + objLit + weekday; - - // - var any = 0 ^= - ~ -!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access. - var bool = 0; - ~~~ -!!! error TS1109: Expression expected. - var declare = 0; - var constructor = 0; - var get = 0; - var implements = 0; - var interface = 0; - var let = 0; - var module = 0; - var number = 0; - var package = 0; - var private = 0; - var protected = 0; - var public = 0; - var set = 0; - var static = 0; - var string = 0 /> - ~ -!!! error TS1109: Expression expected. - var yield = 0; - ~~~ -!!! error TS1109: Expression expected. - - var sum3 = any + bool + declare + constructor + get + implements + interface + let + module + number + package + private + protected + public + set + static + string + yield; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2365: Operator '+' cannot be applied to types 'number' and 'boolean'. - - return 0; - } - - /// - /// Test different statements. Including if-else,swith,foreach,(un)checked,lock,using,try-catch-finally - /// - /// - /// - STATEMENTS(i: number): number { - var retVal = 0; - if (i == 1) - retVal = 1; - else - retVal = 0; - switch (i) { - case 2: - retVal = 1; - break; - case 3: - retVal = 1; - break; - default: - break; - } - - for (var x in { x: 0, y: 1 }) { - ! - - try { - ~~~ -!!! error TS1109: Expression expected. - throw null; - } - catch (Exception) ? - ~ -!!! error TS1005: '{' expected. - } - finally { - ~~~~~~~ -!!! error TS1005: 'try' expected. - try { } - catch (Exception) { } - } - - return retVal; - } - - /// - /// Test types in ts language. Including class,struct,interface,delegate,anonymous type - /// - /// - public TYPES(): number { - var retVal = 0; - var c = new CLASS(); - var xx: IF = c; - retVal += catch .Property; - ~~~~~ -!!! error TS1109: Expression expected. - ~ -!!! error TS1005: '{' expected. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'Property'. - retVal += c.Member(); - retVal += xx.Foo() ? 0 : 1; - - //anonymous type - var anony = { a: new CLASS() }; - - retVal += anony.a.d(); - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2365: Operator '+=' cannot be applied to types 'number' and 'void'. - - return retVal; - } - - - ///// - ///// Test different operators - ///// - ///// - public OPERATOR(): number { - var a: number[] = [1, 2, 3, 4, 5, ];/*[] bug*/ // YES [] - var i = a[1];/*[]*/ - i = i + i - i * i / i % i & i | i ^ i;/*+ - * / % & | ^*/ - var b = true && false || true ^ false;/*& | ^*/ - ~~~~~~~~~~~~ -!!! error TS2447: The '^' operator is not allowed for boolean types. Consider using '!==' instead. - b = !b;/*!*/ - ~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - i = ~i;/*~i*/ - b = i < (i - 1) && (i + 1) > i;/*< && >*/ - ~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - var f = true ? 1 : 0;/*? :*/ // YES : - i++;/*++*/ - i--;/*--*/ - b = true && false || true;/*&& ||*/ - ~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - i = i << 5;/*<<*/ - i = i >> 5;/*>>*/ - var j = i; - b = i == j && i != j && i <= j && i >= j;/*= == && != <= >=*/ - ~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - i += 5.0;/*+=*/ - i -= i;/*-=*/ - i *= i;/**=*/ - if (i == 0) - i++; - i /= i;/*/=*/ - i %= i;/*%=*/ - i &= i;/*&=*/ - i |= i;/*|=*/ - i ^= i;/*^=*/ - i <<= i;/*<<=*/ - i >>= i;/*>>=*/ - - if (i == 0 && != b && f == 1) - ~~ -!!! error TS1109: Expression expected. - return 0; - else return 1; - } - - } - - interface IF { - Foo(): bool; - ~~~~ -!!! error TS2304: Cannot find name 'bool'. - ~~~~ -!!! error TS4057: Return type of method from exported interface has or is using private name 'bool'. - } - - class CLASS implements IF { - - case d = (): void => { yield 0; }; - ~~~~ -!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. - public get Property(): number { return 0; } - public Member(): number { - return 0; - } - public Foo(): bool { - ~~~~ -!!! error TS2304: Cannot find name 'bool'. - ~~~~ -!!! error TS4055: Return type of public method from exported class has or is using private name 'bool'. - var myEvent = () => { return 1; }; - if (myEvent() == 1) - return true ? - else - ~~~~ -!!! error TS1109: Expression expected. - return false; - } - } - - - // todo: use these - class A . - ~ -!!! error TS1005: '{' expected. - public method1(val:number) { - ~~~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~~~~~ -!!! error TS2304: Cannot find name 'method1'. - ~~~ -!!! error TS2304: Cannot find name 'val'. - ~ -!!! error TS1005: ',' expected. - ~~~~~~ -!!! error TS2693: 'number' only refers to a type, but is being used as a value here. - ~ -!!! error TS1005: ';' expected. - return val; - } - public method2() { - ~~~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~~~~~ -!!! error TS2304: Cannot find name 'method2'. - ~ -!!! error TS1005: ';' expected. - return 2 * this.method1(2); - } - } - ~ -!!! error TS1128: Declaration or statement expected. - - class B extends A { - - public method2(): any { - return this.method1(2); - ~~~~~~~ -!!! error TS2551: Property 'method1' does not exist on type 'B'. Did you mean 'method2'? -!!! related TS2728 constructorWithIncompleteTypeAnnotation.ts:245:16: 'method2' is declared here. - } - } - - class Overloading { - - private otherValue = 42; - - constructor(private value: number, public name: string) : } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2390: Constructor implementation is missing. - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2369: A parameter property is only allowed in a constructor implementation. - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2369: A parameter property is only allowed in a constructor implementation. - ~ -!!! error TS1110: Type expected. - - public Overloads(value: string); - ~~~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~~~~~~~ -!!! error TS2304: Cannot find name 'Overloads'. - ~~~~~ -!!! error TS2304: Cannot find name 'value'. - ~ -!!! error TS1005: ',' expected. - ~~~~~~ -!!! error TS2693: 'string' only refers to a type, but is being used as a value here. - public Overloads( while : string, ...rest: string[]) { & - ~~~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~~~~~~~ -!!! error TS2304: Cannot find name 'Overloads'. - ~~~~~ -!!! error TS1135: Argument expression expected. - ~ -!!! error TS1005: '(' expected. - ~~~~~~ -!!! error TS2693: 'string' only refers to a type, but is being used as a value here. - ~~~ -!!! error TS1109: Expression expected. - ~~~~~~ -!!! error TS2693: 'string' only refers to a type, but is being used as a value here. - -!!! error TS1011: An element access expression should take an argument. - ~ -!!! error TS1005: ';' expected. - ~ -!!! error TS1109: Expression expected. - - public DefaultValue(value?: string = "Hello") { } - ~~~~~~ -!!! error TS2304: Cannot find name 'public'. - ~~~~~~~~~~~~ -!!! error TS1005: ';' expected. - ~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'DefaultValue'. - ~~~~~ -!!! error TS2304: Cannot find name 'value'. - ~ -!!! error TS1109: Expression expected. - ~~~~~~ -!!! error TS2693: 'string' only refers to a type, but is being used as a value here. - ~ -!!! error TS1005: ';' expected. - } - } - ~ -!!! error TS1128: Declaration or statement expected. - - enum Weekdays { - Monday, - Tuesday, - Weekend, - } - - enum Fruit { - Apple, - Pear - } - - interface IDisposable { - Dispose(): void; - } - - TypeScriptAllInOne.Program.Main(); - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationInAmbientContext.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationInAmbientContext.d.ts deleted file mode 100644 index 00aac8fdb985a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationInAmbientContext.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -//// [tests/cases/conformance/es6/destructuring/declarationInAmbientContext.ts] //// - -//// [declarationInAmbientContext.ts] -declare var [a, b]; // Error, destructuring declaration not allowed in ambient context -declare var {c, d}; // Error, destructuring declaration not allowed in ambient context - - -/// [Declarations] //// - - - -//// [declarationInAmbientContext.d.ts] -declare var a: any, b: any; -declare var c: any, d: any; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationWithNoInitializer.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationWithNoInitializer.d.ts deleted file mode 100644 index 077616b0ba4bd..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationWithNoInitializer.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/es6/destructuring/declarationWithNoInitializer.ts] //// - -//// [declarationWithNoInitializer.ts] -var [a, b]; // Error, no initializer -var {c, d}; // Error, no initializer - - -/// [Declarations] //// - - - -//// [declarationWithNoInitializer.d.ts] -declare var a: any, b: any; -declare var c: any, d: any; - -/// [Errors] //// - -declarationWithNoInitializer.ts(1,5): error TS1182: A destructuring declaration must have an initializer. -declarationWithNoInitializer.ts(2,5): error TS1182: A destructuring declaration must have an initializer. - - -==== declarationWithNoInitializer.ts (2 errors) ==== - var [a, b]; // Error, no initializer - ~~~~~~ -!!! error TS1182: A destructuring declaration must have an initializer. - var {c, d}; // Error, no initializer - ~~~~~~ -!!! error TS1182: A destructuring declaration must have an initializer. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterDeclaration6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterDeclaration6.d.ts deleted file mode 100644 index 9f687c18d5f32..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterDeclaration6.d.ts +++ /dev/null @@ -1,2291 +0,0 @@ -//// [tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration6.ts] //// - -//// [destructuringParameterDeclaration6.ts] -// A parameter declaration may specify either an identifier or a binding pattern. - -// Reserved words are not allowed to be used as an identifier in parameter declaration -"use strict" - -// Error -function a({while}: { - while: any; - }): void { } -function a1({public}: { - public: any; - }): void { } -function a4([: any[]: [ - any, - any[] - ]: [ - any, - any[], - [any, any, any[]] - ]: [ - any, - any[], - [any, any, any[]], - [any, any, any[], [any, any, any, any[]]] - ]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]]]]]while, for, public]){ } -function a5(...: any[]while) { } -function a6(...public: any[]): void { } -function a7(...a: string): void { } -a({ while: 1 }); - -// No Error -function b1({public: x}: { - public: any; - }): void { } -function b2({while: y}: { - while: any; - }): void { } -b1({ public: 1 }); -b2({ while: 1 }); - - - -/// [Declarations] //// - - - -//// [destructuringParameterDeclaration6.d.ts] -declare function a({ while: }: { - while: any; -}): void; -declare function a1({ public }: { - public: any; -}): void; -declare function a4([any, [], [any, any, []], [any, any, [], [any, any, any, []]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]]]], [any, any, [], [any, any, any, []], [any, any, any, [], [any, any, any, any, []]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]]], [any, any, any, [], [any, any, any, any, []], [any, any, any, any, [], [any, any, any, any, any, []]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]]], [any, any, any, any, [], [any, any, any, any, any, []], [any, any, any, any, any, [], [any, any, any, any, any, any, []]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]]], [any, any, any, any, any, [], [any, any, any, any, any, any, []], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []]], [any, any, any, any, any, any, [], [any, any, any, any, any, any, any, []], [any, any, any, any, any, any, any, [], [any, any, any, any, any, any, any, any, []]]]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any, any[]]]]]]]]]): any; -declare function a5(...: any[]): any; -declare function a6(...public: any[]): void; -declare function a7(...a: string): void; -declare function b1({ public: x }: { - public: any; -}): void; -declare function b2({ while: y }: { - while: any; -}): void; - -/// [Errors] //// - -destructuringParameterDeclaration6.ts(7,18): error TS1005: ':' expected. -destructuringParameterDeclaration6.ts(13,14): error TS1181: Array element destructuring pattern expected. -destructuringParameterDeclaration6.ts(13,16): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(13,19): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(13,21): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(14,9): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(15,9): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(15,12): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(16,6): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(17,9): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(18,9): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(18,12): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(19,10): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(19,15): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(19,20): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(19,23): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(20,6): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(21,9): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(22,9): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(22,12): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(23,10): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(23,15): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(23,20): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(23,23): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(24,10): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(24,15): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(24,20): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(24,23): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(24,28): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(24,33): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(24,38): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(24,43): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(24,46): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,6): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,9): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,14): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,17): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,22): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,27): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,32): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,35): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,41): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,46): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,51): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,54): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,59): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,64): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,69): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,74): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,77): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,84): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,89): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,94): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,97): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,102): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,107): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,112): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,117): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,120): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,126): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,131): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,136): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,141): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,144): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,149): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,154): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,159): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,164): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,169): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,172): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,178): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,181): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,186): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,189): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,194): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,199): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,204): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,207): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,213): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,218): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,223): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,226): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,231): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,236): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,241): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,246): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,249): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,256): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,261): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,266): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,269): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,274): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,279): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,284): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,289): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,292): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,298): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,303): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,308): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,313): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,316): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,321): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,326): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,331): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,336): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,341): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,344): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,352): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,357): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,362): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,365): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,370): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,375): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,380): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,385): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,388): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,394): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,399): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,404): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,409): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,412): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,417): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,422): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,427): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,432): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,437): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,440): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,447): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,452): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,457): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,462): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,465): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,470): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,475): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,480): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,485): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,490): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,493): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,499): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,504): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,509): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,514): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,519): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,522): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,527): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,532): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,537): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,542): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,547): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,552): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,555): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,562): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,565): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,570): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,573): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,578): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,583): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,588): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,591): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,597): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,602): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,607): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,610): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,615): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,620): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,625): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,630): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,633): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,640): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,645): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,650): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,653): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,658): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,663): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,668): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,673): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,676): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,682): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,687): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,692): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,697): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,700): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,705): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,710): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,715): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,720): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,725): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,728): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,736): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,741): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,746): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,749): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,754): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,759): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,764): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,769): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,772): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,778): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,783): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,788): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,793): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,796): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,801): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,806): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,811): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,816): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,821): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,824): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,831): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,836): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,841): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,846): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,849): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,854): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,859): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,864): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,869): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,874): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,877): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,883): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,888): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,893): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,898): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,903): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,906): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,911): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,916): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,921): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,926): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,931): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,936): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,939): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,948): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,953): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,958): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,961): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,966): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,971): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,976): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,981): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,984): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,990): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,995): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1000): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1005): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1008): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1013): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1018): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1023): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1028): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1033): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1036): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1043): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1048): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1053): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1058): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1061): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1066): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1071): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1076): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1081): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1086): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1089): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1095): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1100): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1105): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1110): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1115): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1118): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1123): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1128): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1133): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1138): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1143): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1148): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1151): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1159): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1164): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1169): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1174): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1177): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1182): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1187): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1192): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1197): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1202): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1205): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1211): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1216): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1221): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1226): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1231): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1234): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1239): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1244): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1249): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1254): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1259): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1264): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1267): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1274): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1279): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1284): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1289): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1294): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1297): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1302): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1307): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1312): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1317): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1322): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1327): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1330): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1336): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1341): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1346): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1351): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1356): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1361): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1364): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1369): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1374): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1379): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1384): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1389): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1394): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1399): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1402): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1410): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1413): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1418): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1421): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1426): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1431): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1436): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1439): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1445): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1450): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1455): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1458): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1463): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1468): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1473): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1478): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1481): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1488): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1493): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1498): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1501): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1506): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1511): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1516): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1521): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1524): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1530): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1535): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1540): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1545): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1548): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1553): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1558): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1563): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1568): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1573): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1576): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1584): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1589): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1594): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1597): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1602): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1607): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1612): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1617): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1620): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1626): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1631): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1636): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1641): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1644): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1649): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1654): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1659): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1664): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1669): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1672): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1679): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1684): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1689): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1694): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1697): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1702): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1707): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1712): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1717): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1722): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1725): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1731): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1736): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1741): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1746): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1751): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1754): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1759): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1764): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1769): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1774): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1779): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1784): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1787): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1796): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1801): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1806): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1809): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1814): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1819): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1824): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1829): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1832): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1838): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1843): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1848): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1853): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1856): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1861): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1866): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1871): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1876): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1881): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1884): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1891): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1896): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1901): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1906): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1909): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1914): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1919): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1924): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1929): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1934): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1937): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1943): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1948): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1953): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1958): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1963): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1966): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,1971): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1976): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1981): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1986): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1991): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1996): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,1999): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2007): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2012): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2017): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2022): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2025): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2030): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2035): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2040): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2045): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2050): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2053): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2059): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2064): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2069): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2074): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2079): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2082): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2087): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2092): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2097): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2102): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2107): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2112): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2115): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2122): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2127): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2132): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2137): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2142): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2145): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2150): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2155): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2160): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2165): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2170): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2175): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2178): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2184): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2189): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2194): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2199): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2204): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2209): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2212): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2217): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2222): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2227): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2232): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2237): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2242): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2247): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2250): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2260): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2265): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2270): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2273): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2278): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2283): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2288): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2293): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2296): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2302): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2307): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2312): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2317): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2320): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2325): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2330): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2335): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2340): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2345): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2348): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2355): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2360): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2365): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2370): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2373): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2378): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2383): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2388): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2393): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2398): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2401): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2407): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2412): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2417): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2422): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2427): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2430): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2435): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2440): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2445): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2450): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2455): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2460): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2463): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2471): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2476): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2481): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2486): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2489): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2494): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2499): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2504): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2509): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2514): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2517): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2523): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2528): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2533): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2538): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2543): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2546): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2551): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2556): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2561): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2566): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2571): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2576): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2579): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2586): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2591): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2596): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2601): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2606): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2609): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2614): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2619): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2624): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2629): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2634): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2639): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2642): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2648): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2653): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2658): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2663): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2668): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2673): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2676): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2681): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2686): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2691): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2696): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2701): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2706): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2711): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2714): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2723): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2728): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2733): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2738): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2741): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2746): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2751): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2756): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2761): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2766): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2769): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2775): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2780): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2785): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2790): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2795): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2798): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2803): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2808): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2813): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2818): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2823): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2828): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2831): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2838): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2843): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2848): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2853): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2858): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2861): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2866): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2871): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2876): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2881): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2886): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2891): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2894): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2900): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2905): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2910): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2915): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2920): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2925): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2928): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2933): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2938): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2943): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2948): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2953): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2958): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2963): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2966): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,2974): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2979): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2984): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2989): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2994): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,2997): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,3002): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3007): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3012): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3017): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3022): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3027): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3030): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,3036): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3041): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3046): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3051): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3056): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3061): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3064): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,3069): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3074): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3079): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3084): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3089): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3094): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3099): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3102): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,3109): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3114): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3119): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3124): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3129): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3134): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3137): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,3142): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3147): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3152): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3157): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3162): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3167): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3172): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3175): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,3181): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3186): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3191): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3196): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3201): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3206): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3211): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3214): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,3219): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3224): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3229): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3234): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3239): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3244): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3249): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3254): error TS2300: Duplicate identifier 'any'. -destructuringParameterDeclaration6.ts(25,3257): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,3266): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(25,3271): error TS2695: Left side of comma operator is unused and has no side effects. -destructuringParameterDeclaration6.ts(25,3271): error TS1005: '(' expected. -destructuringParameterDeclaration6.ts(25,3273): error TS1109: Expression expected. -destructuringParameterDeclaration6.ts(25,3276): error TS2695: Left side of comma operator is unused and has no side effects. -destructuringParameterDeclaration6.ts(25,3276): error TS1005: '(' expected. -destructuringParameterDeclaration6.ts(25,3278): error TS2304: Cannot find name 'public'. -destructuringParameterDeclaration6.ts(25,3284): error TS1005: ';' expected. -destructuringParameterDeclaration6.ts(25,3285): error TS1128: Declaration or statement expected. -destructuringParameterDeclaration6.ts(26,16): error TS1003: Identifier expected. -destructuringParameterDeclaration6.ts(26,23): error TS1005: ',' expected. -destructuringParameterDeclaration6.ts(26,28): error TS1005: '(' expected. -destructuringParameterDeclaration6.ts(28,13): error TS2370: A rest parameter must be of an array type. - - -==== destructuringParameterDeclaration6.ts (726 errors) ==== - // A parameter declaration may specify either an identifier or a binding pattern. - - // Reserved words are not allowed to be used as an identifier in parameter declaration - "use strict" - - // Error - function a({while}: { - ~ -!!! error TS1005: ':' expected. - while: any; - }): void { } - function a1({public}: { - public: any; - }): void { } - function a4([: any[]: [ - ~ -!!! error TS1181: Array element destructuring pattern expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~ -!!! error TS1005: ',' expected. - any, - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - any[] - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ]: [ - ~ -!!! error TS1005: ',' expected. - any, - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - any[], - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - [any, any, any[]] - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ]: [ - ~ -!!! error TS1005: ',' expected. - any, - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - any[], - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - [any, any, any[]], - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - [any, any, any[], [any, any, any, any[]]] - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]]]: [any, any[], [any, any, any[]], [any, any, any[], [any, any, any, any[]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]]], [any, any, any[], [any, any, any, any[]], [any, any, any, any[], [any, any, any, any, any[]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]]], [any, any, any, any[], [any, any, any, any, any[]], [any, any, any, any, any[], [any, any, any, any, any, any[]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]]], [any, any, any, any, any[], [any, any, any, any, any, any[]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]]], [any, any, any, any, any, any[], [any, any, any, any, any, any, any[]], [any, any, any, any, any, any, any[], [any, any, any, any, any, any, any, any[]]]]]]]]while, for, public]){ } - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~~~ -!!! error TS2300: Duplicate identifier 'any'. - ~ -!!! error TS1005: ',' expected. - ~~~~~ -!!! error TS1005: ',' expected. - -!!! error TS2695: Left side of comma operator is unused and has no side effects. - ~ -!!! error TS1005: '(' expected. - ~~~ -!!! error TS1109: Expression expected. - -!!! error TS2695: Left side of comma operator is unused and has no side effects. - ~ -!!! error TS1005: '(' expected. - ~~~~~~ -!!! error TS2304: Cannot find name 'public'. - ~ -!!! error TS1005: ';' expected. - ~ -!!! error TS1128: Declaration or statement expected. - function a5(...: any[]while) { } - ~ -!!! error TS1003: Identifier expected. - ~~~~~ -!!! error TS1005: ',' expected. - ~ -!!! error TS1005: '(' expected. - function a6(...public: any[]): void { } - function a7(...a: string): void { } - ~~~~~~~~~~~~ -!!! error TS2370: A rest parameter must be of an array type. - a({ while: 1 }); - - // No Error - function b1({public: x}: { - public: any; - }): void { } - function b2({while: y}: { - while: any; - }): void { } - b1({ public: 1 }); - b2({ while: 1 }); - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties1.d.ts deleted file mode 100644 index c9b900fabdb6a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties1.d.ts +++ /dev/null @@ -1,160 +0,0 @@ -//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties1.ts] //// - -//// [destructuringParameterProperties1.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) { - } -} - -var c1: C1 = new C1([]); -c1 = new C1(["larry", "{curly}", "moe"]); -var useC1Properties: boolean = c1.x === c1.y && c1.y === c1.z; - -var c2: C2 = new C2(["10", 10, !!10]); -const dest: any[] = [c2.x, c2.y, c2.z]; -const c2_x: any = dest[0]; -const c2_y: any = dest[1]; -const c2_z: any = dest[2]; - -var c3: C3 = new C3({x: 0, y: "", z: false}); -c3 = new C3({x: 0, "y": "y", z: true}); -const dest_1: any[] = [c3.x, c3.y, c3.z]; -const c3_x: any = dest_1[0]; -const c3_y: any = dest_1[1]; -const c3_z: any = dest_1[2]; - -/// [Declarations] //// - - - -//// [destructuringParameterProperties1.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); -} -declare var c1: C1; -declare var useC1Properties: boolean; -declare var c2: C2; -declare const dest: any[]; -declare const c2_x: any; -declare const c2_y: any; -declare const c2_z: any; -declare var c3: C3; -declare const dest_1: any[]; -declare const c3_x: any; -declare const c3_y: any; -declare const c3_z: any; - -/// [Errors] //// - -destructuringParameterProperties1.ts(2,17): error TS1187: A parameter property may not be declared using a binding pattern. -destructuringParameterProperties1.ts(9,17): error TS1187: A parameter property may not be declared using a binding pattern. -destructuringParameterProperties1.ts(16,17): error TS1187: A parameter property may not be declared using a binding pattern. -destructuringParameterProperties1.ts(22,35): error TS2339: Property 'x' does not exist on type 'C1'. -destructuringParameterProperties1.ts(22,44): error TS2339: Property 'y' does not exist on type 'C1'. -destructuringParameterProperties1.ts(22,52): error TS2339: Property 'y' does not exist on type 'C1'. -destructuringParameterProperties1.ts(22,61): error TS2339: Property 'z' does not exist on type 'C1'. -destructuringParameterProperties1.ts(25,25): error TS2339: Property 'x' does not exist on type 'C2'. -destructuringParameterProperties1.ts(25,31): error TS2339: Property 'y' does not exist on type 'C2'. -destructuringParameterProperties1.ts(25,37): error TS2339: Property 'z' does not exist on type 'C2'. -destructuringParameterProperties1.ts(32,27): error TS2339: Property 'x' does not exist on type 'C3'. -destructuringParameterProperties1.ts(32,33): error TS2339: Property 'y' does not exist on type 'C3'. -destructuringParameterProperties1.ts(32,39): error TS2339: Property 'z' does not exist on type 'C3'. - - -==== destructuringParameterProperties1.ts (13 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. - } - } - - var c1: C1 = new C1([]); - c1 = new C1(["larry", "{curly}", "moe"]); - var useC1Properties: boolean = c1.x === c1.y && c1.y === c1.z; - ~ -!!! error TS2339: Property 'x' does not exist on type 'C1'. - ~ -!!! error TS2339: Property 'y' does not exist on type 'C1'. - ~ -!!! error TS2339: Property 'y' does not exist on type 'C1'. - ~ -!!! error TS2339: Property 'z' does not exist on type 'C1'. - - var c2: C2 = new C2(["10", 10, !!10]); - const dest: any[] = [c2.x, c2.y, c2.z]; - ~ -!!! error TS2339: Property 'x' does not exist on type 'C2'. - ~ -!!! error TS2339: Property 'y' does not exist on type 'C2'. - ~ -!!! error TS2339: Property 'z' does not exist on type 'C2'. - const c2_x: any = dest[0]; - const c2_y: any = dest[1]; - const c2_z: any = dest[2]; - - var c3: C3 = new C3({x: 0, y: "", z: false}); - c3 = new C3({x: 0, "y": "y", z: true}); - const dest_1: any[] = [c3.x, c3.y, c3.z]; - ~ -!!! error TS2339: Property 'x' does not exist on type 'C3'. - ~ -!!! error TS2339: Property 'y' does not exist on type 'C3'. - ~ -!!! error TS2339: Property 'z' does not exist on type 'C3'. - const c3_x: any = dest_1[0]; - const c3_y: any = dest_1[1]; - const c3_z: any = dest_1[2]; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties2.d.ts deleted file mode 100644 index 38cd10a4f2ac4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties2.d.ts +++ /dev/null @@ -1,146 +0,0 @@ -//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties2.ts] //// - -//// [destructuringParameterProperties2.ts] -class C1 { - constructor(private k: number, private [a, b, c]: [number, string, boolean]) { - if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { - this.a = a || k; - } - } - - public getA(): any { - return this.a - } - - public getB(): any { - return this.b - } - - public getC(): any { - return this.c; - } -} - -var x: C1 = new C1(undefined, [0, undefined, ""]); -const dest: any[] = [x.getA(), x.getB(), x.getC()]; -const x_a: any = dest[0]; -const x_b: any = dest[1]; -const x_c: any = dest[2]; - -var y: C1 = new C1(10, [0, "", true]); -const dest_1: any[] = [y.getA(), y.getB(), y.getC()]; -const y_a: any = dest_1[0]; -const y_b: any = dest_1[1]; -const y_c: any = dest_1[2]; - -var z: C1 = new C1(10, [undefined, "", null]); -const dest: any[] = [z.getA(), z.getB(), z.getC()]; -const z_a: any = dest[0]; -const z_b: any = dest[1]; -const z_c: any = dest[2]; - - -/// [Declarations] //// - - - -//// [destructuringParameterProperties2.d.ts] -declare class C1 { - private k; - private a: number; - private b: string; - private c: boolean; - constructor(k: number, [a, b, c]: [number, string, boolean]); - getA(): any; - getB(): any; - getC(): any; -} -declare var x: C1; -declare const dest: any[]; -declare const x_a: any; -declare const x_b: any; -declare const x_c: any; -declare var y: C1; -declare const dest_1: any[]; -declare const y_a: any; -declare const y_b: any; -declare const y_c: any; -declare var z: C1; -declare const dest: any[]; -declare const z_a: any; -declare const z_b: any; -declare const z_c: any; - -/// [Errors] //// - -destructuringParameterProperties2.ts(2,36): error TS1187: A parameter property may not be declared using a binding pattern. -destructuringParameterProperties2.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. -destructuringParameterProperties2.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. -destructuringParameterProperties2.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. -destructuringParameterProperties2.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. -destructuringParameterProperties2.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. -destructuringParameterProperties2.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. -destructuringParameterProperties2.ts(21,46): error TS2322: Type 'string' is not assignable to type 'boolean'. -destructuringParameterProperties2.ts(22,7): error TS2451: Cannot redeclare block-scoped variable 'dest'. -destructuringParameterProperties2.ts(34,7): error TS2451: Cannot redeclare block-scoped variable 'dest'. - - -==== destructuringParameterProperties2.ts (10 errors) ==== - class C1 { - constructor(private k: number, private [a, b, c]: [number, string, boolean]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1187: A parameter property may not be declared using a binding pattern. - if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { - ~ -!!! error TS2339: Property 'b' does not exist on type 'C1'. - ~ -!!! error TS2339: Property 'c' does not exist on type 'C1'. - this.a = a || k; - ~ -!!! error TS2339: Property 'a' does not exist on type 'C1'. - } - } - - public getA(): any { - return this.a - ~ -!!! error TS2339: Property 'a' does not exist on type 'C1'. - } - - public getB(): any { - return this.b - ~ -!!! error TS2339: Property 'b' does not exist on type 'C1'. - } - - public getC(): any { - return this.c; - ~ -!!! error TS2339: Property 'c' does not exist on type 'C1'. - } - } - - var x: C1 = new C1(undefined, [0, undefined, ""]); - ~~ -!!! error TS2322: Type 'string' is not assignable to type 'boolean'. - const dest: any[] = [x.getA(), x.getB(), x.getC()]; - ~~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'dest'. - const x_a: any = dest[0]; - const x_b: any = dest[1]; - const x_c: any = dest[2]; - - var y: C1 = new C1(10, [0, "", true]); - const dest_1: any[] = [y.getA(), y.getB(), y.getC()]; - const y_a: any = dest_1[0]; - const y_b: any = dest_1[1]; - const y_c: any = dest_1[2]; - - var z: C1 = new C1(10, [undefined, "", null]); - const dest: any[] = [z.getA(), z.getB(), z.getC()]; - ~~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'dest'. - const z_a: any = dest[0]; - const z_b: any = dest[1]; - const z_c: any = dest[2]; - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties3.d.ts deleted file mode 100644 index 491d43061eb9a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties3.d.ts +++ /dev/null @@ -1,184 +0,0 @@ -//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties3.ts] //// - -//// [destructuringParameterProperties3.ts] -class C1 { - constructor(private k: T, private [a, b, c]: [T,U,V]) { - if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { - this.a = a || k; - } - } - - public getA(): any { - return this.a - } - - public getB(): any { - return this.b - } - - public getC(): any { - return this.c; - } -} - -var x: C1 = new C1(undefined, [0, true, ""]); -const dest: any[] = [x.getA(), x.getB(), x.getC()]; -const x_a: any = dest[0]; -const x_b: any = dest[1]; -const x_c: any = dest[2]; - -var y: C1 = new C1(10, [0, true, true]); -const dest_1: any[] = [y.getA(), y.getB(), y.getC()]; -const y_a: any = dest_1[0]; -const y_b: any = dest_1[1]; -const y_c: any = dest_1[2]; - -var z: C1<10, string, string> = new C1(10, [undefined, "", ""]); -const dest: any[] = [z.getA(), z.getB(), z.getC()]; -const z_a: any = dest[0]; -const z_b: any = dest[1]; -const z_c: any = dest[2]; - -var w: C1<10, any, any> = new C1(10, [undefined, undefined, undefined]); -const dest_1: any[] = [z.getA(), z.getB(), z.getC()]; -const z_a: any = dest_1[0]; -const z_b: any = dest_1[1]; -const z_c: any = dest_1[2]; - - -/// [Declarations] //// - - - -//// [destructuringParameterProperties3.d.ts] -declare class C1 { - private k; - private a: T; - private b: U; - private c: V; - constructor(k: T, [a, b, c]: [T, U, V]); - getA(): any; - getB(): any; - getC(): any; -} -declare var x: C1; -declare const dest: any[]; -declare const x_a: any; -declare const x_b: any; -declare const x_c: any; -declare var y: C1; -declare const dest_1: any[]; -declare const y_a: any; -declare const y_b: any; -declare const y_c: any; -declare var z: C1<10, string, string>; -declare const dest: any[]; -declare const z_a: any; -declare const z_b: any; -declare const z_c: any; -declare var w: C1<10, any, any>; -declare const dest_1: any[]; -declare const z_a: any; -declare const z_b: any; -declare const z_c: any; - -/// [Errors] //// - -destructuringParameterProperties3.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. -destructuringParameterProperties3.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. -destructuringParameterProperties3.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. -destructuringParameterProperties3.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. -destructuringParameterProperties3.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. -destructuringParameterProperties3.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. -destructuringParameterProperties3.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. -destructuringParameterProperties3.ts(22,7): error TS2451: Cannot redeclare block-scoped variable 'dest'. -destructuringParameterProperties3.ts(28,7): error TS2451: Cannot redeclare block-scoped variable 'dest_1'. -destructuringParameterProperties3.ts(34,7): error TS2451: Cannot redeclare block-scoped variable 'dest'. -destructuringParameterProperties3.ts(35,7): error TS2451: Cannot redeclare block-scoped variable 'z_a'. -destructuringParameterProperties3.ts(36,7): error TS2451: Cannot redeclare block-scoped variable 'z_b'. -destructuringParameterProperties3.ts(37,7): error TS2451: Cannot redeclare block-scoped variable 'z_c'. -destructuringParameterProperties3.ts(40,7): error TS2451: Cannot redeclare block-scoped variable 'dest_1'. -destructuringParameterProperties3.ts(41,7): error TS2451: Cannot redeclare block-scoped variable 'z_a'. -destructuringParameterProperties3.ts(42,7): error TS2451: Cannot redeclare block-scoped variable 'z_b'. -destructuringParameterProperties3.ts(43,7): error TS2451: Cannot redeclare block-scoped variable 'z_c'. - - -==== destructuringParameterProperties3.ts (17 errors) ==== - class C1 { - constructor(private k: T, private [a, b, c]: [T,U,V]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1187: A parameter property may not be declared using a binding pattern. - if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { - ~ -!!! error TS2339: Property 'b' does not exist on type 'C1'. - ~ -!!! error TS2339: Property 'c' does not exist on type 'C1'. - this.a = a || k; - ~ -!!! error TS2339: Property 'a' does not exist on type 'C1'. - } - } - - public getA(): any { - return this.a - ~ -!!! error TS2339: Property 'a' does not exist on type 'C1'. - } - - public getB(): any { - return this.b - ~ -!!! error TS2339: Property 'b' does not exist on type 'C1'. - } - - public getC(): any { - return this.c; - ~ -!!! error TS2339: Property 'c' does not exist on type 'C1'. - } - } - - var x: C1 = new C1(undefined, [0, true, ""]); - const dest: any[] = [x.getA(), x.getB(), x.getC()]; - ~~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'dest'. - const x_a: any = dest[0]; - const x_b: any = dest[1]; - const x_c: any = dest[2]; - - var y: C1 = new C1(10, [0, true, true]); - const dest_1: any[] = [y.getA(), y.getB(), y.getC()]; - ~~~~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'dest_1'. - const y_a: any = dest_1[0]; - const y_b: any = dest_1[1]; - const y_c: any = dest_1[2]; - - var z: C1<10, string, string> = new C1(10, [undefined, "", ""]); - const dest: any[] = [z.getA(), z.getB(), z.getC()]; - ~~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'dest'. - const z_a: any = dest[0]; - ~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'z_a'. - const z_b: any = dest[1]; - ~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'z_b'. - const z_c: any = dest[2]; - ~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'z_c'. - - var w: C1<10, any, any> = new C1(10, [undefined, undefined, undefined]); - const dest_1: any[] = [z.getA(), z.getB(), z.getC()]; - ~~~~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'dest_1'. - const z_a: any = dest_1[0]; - ~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'z_a'. - const z_b: any = dest_1[1]; - ~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'z_b'. - const z_c: any = dest_1[2]; - ~~~ -!!! error TS2451: Cannot redeclare block-scoped variable 'z_c'. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties4.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties4.d.ts deleted file mode 100644 index b2ce11020dae7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties4.d.ts +++ /dev/null @@ -1,110 +0,0 @@ -//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties4.ts] //// - -//// [destructuringParameterProperties4.ts] -class C1 { - constructor(private k: T, protected [a, b, c]: [T,U,V]) { - if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { - this.a = a || k; - } - } - - public getA(): any { - return this.a - } - - public getB(): any { - return this.b - } - - public getC(): any { - return this.c; - } -} - -class C2 extends C1 { - public doSomethingWithSuperProperties(): string { - return `${this.a} ${this.b} ${this.c}`; - } -} - - -/// [Declarations] //// - - - -//// [destructuringParameterProperties4.d.ts] -declare class C1 { - private k; - protected a: T; - protected b: U; - protected c: V; - constructor(k: T, [a, b, c]: [T, U, V]); - getA(): any; - getB(): any; - getC(): any; -} -declare class C2 extends C1 { - doSomethingWithSuperProperties(): string; -} - -/// [Errors] //// - -destructuringParameterProperties4.ts(2,31): error TS1187: A parameter property may not be declared using a binding pattern. -destructuringParameterProperties4.ts(3,59): error TS2339: Property 'b' does not exist on type 'C1'. -destructuringParameterProperties4.ts(3,83): error TS2339: Property 'c' does not exist on type 'C1'. -destructuringParameterProperties4.ts(4,18): error TS2339: Property 'a' does not exist on type 'C1'. -destructuringParameterProperties4.ts(9,21): error TS2339: Property 'a' does not exist on type 'C1'. -destructuringParameterProperties4.ts(13,21): error TS2339: Property 'b' does not exist on type 'C1'. -destructuringParameterProperties4.ts(17,21): error TS2339: Property 'c' does not exist on type 'C1'. -destructuringParameterProperties4.ts(23,24): error TS2339: Property 'a' does not exist on type 'C2'. -destructuringParameterProperties4.ts(23,34): error TS2339: Property 'b' does not exist on type 'C2'. -destructuringParameterProperties4.ts(23,44): error TS2339: Property 'c' does not exist on type 'C2'. - - -==== destructuringParameterProperties4.ts (10 errors) ==== - class C1 { - constructor(private k: T, protected [a, b, c]: [T,U,V]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1187: A parameter property may not be declared using a binding pattern. - if ((b === undefined && c === undefined) || (this.b === undefined && this.c === undefined)) { - ~ -!!! error TS2339: Property 'b' does not exist on type 'C1'. - ~ -!!! error TS2339: Property 'c' does not exist on type 'C1'. - this.a = a || k; - ~ -!!! error TS2339: Property 'a' does not exist on type 'C1'. - } - } - - public getA(): any { - return this.a - ~ -!!! error TS2339: Property 'a' does not exist on type 'C1'. - } - - public getB(): any { - return this.b - ~ -!!! error TS2339: Property 'b' does not exist on type 'C1'. - } - - public getC(): any { - return this.c; - ~ -!!! error TS2339: Property 'c' does not exist on type 'C1'. - } - } - - class C2 extends C1 { - public doSomethingWithSuperProperties(): string { - return `${this.a} ${this.b} ${this.c}`; - ~ -!!! error TS2339: Property 'a' does not exist on type 'C2'. - ~ -!!! error TS2339: Property 'b' does not exist on type 'C2'. - ~ -!!! error TS2339: Property 'c' does not exist on type 'C2'. - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties5.d.ts deleted file mode 100644 index 0bbc32f554934..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringParameterProperties5.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts] //// - -//// [destructuringParameterProperties5.ts] -type ObjType1 = { x: number; y: string; z: boolean } -type TupleType1 = [ObjType1, number, string] - -class C1 { - constructor(public [{ x1, x2, x3 }, y, z]: TupleType1) { - var foo: any = x1 || x2 || x3 || y || z; - var bar: any = this.x1 || this.x2 || this.x3 || this.y || this.z; - } -} - -var a: C1 = new C1([{ x1: 10, x2: "", x3: true }, "", false]); -const dest: any[] = [a.x1, a.x2, a.x3, a.y, a.z]; -const a_x1: any = dest[0]; -const a_x2: any = dest[1]; -const a_x3: any = dest[2]; -const a_y: any = dest[3]; -const a_z: any = dest[4]; - -/// [Declarations] //// - - - -//// [destructuringParameterProperties5.d.ts] -type ObjType1 = { - x: number; - y: string; - z: boolean; -}; -type TupleType1 = [ObjType1, number, string]; -declare class C1 { - x1: any; - x2: any; - x3: any; - { x1, x2, x3 }: any; - y: number; - z: string; - constructor([{ x1, x2, x3 }, y, z]: TupleType1); -} -declare var a: C1; -declare const dest: any[]; -declare const a_x1: any; -declare const a_x2: any; -declare const a_x3: any; -declare const a_y: any; -declare const a_z: any; - -/// [Errors] //// - -destructuringParameterProperties5.ts(5,17): error TS1187: A parameter property may not be declared using a binding pattern. -destructuringParameterProperties5.ts(5,27): error TS2339: Property 'x1' does not exist on type 'ObjType1'. -destructuringParameterProperties5.ts(5,31): error TS2339: Property 'x2' does not exist on type 'ObjType1'. -destructuringParameterProperties5.ts(5,35): error TS2339: Property 'x3' does not exist on type 'ObjType1'. -destructuringParameterProperties5.ts(7,29): error TS2339: Property 'x1' does not exist on type 'C1'. -destructuringParameterProperties5.ts(7,40): error TS2339: Property 'x2' does not exist on type 'C1'. -destructuringParameterProperties5.ts(7,51): error TS2339: Property 'x3' does not exist on type 'C1'. -destructuringParameterProperties5.ts(7,62): error TS2339: Property 'y' does not exist on type 'C1'. -destructuringParameterProperties5.ts(7,72): error TS2339: Property 'z' does not exist on type 'C1'. -destructuringParameterProperties5.ts(11,23): error TS2353: Object literal may only specify known properties, and 'x1' does not exist in type 'ObjType1'. -destructuringParameterProperties5.ts(11,51): error TS2322: Type 'string' is not assignable to type 'number'. -destructuringParameterProperties5.ts(11,55): error TS2322: Type 'boolean' is not assignable to type 'string'. -destructuringParameterProperties5.ts(12,24): error TS2339: Property 'x1' does not exist on type 'C1'. -destructuringParameterProperties5.ts(12,30): error TS2339: Property 'x2' does not exist on type 'C1'. -destructuringParameterProperties5.ts(12,36): error TS2339: Property 'x3' does not exist on type 'C1'. -destructuringParameterProperties5.ts(12,42): error TS2339: Property 'y' does not exist on type 'C1'. -destructuringParameterProperties5.ts(12,47): error TS2339: Property 'z' does not exist on type 'C1'. - - -==== destructuringParameterProperties5.ts (17 errors) ==== - type ObjType1 = { x: number; y: string; z: boolean } - type TupleType1 = [ObjType1, number, string] - - class C1 { - constructor(public [{ x1, x2, x3 }, y, z]: TupleType1) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS1187: A parameter property may not be declared using a binding pattern. - ~~ -!!! error TS2339: Property 'x1' does not exist on type 'ObjType1'. - ~~ -!!! error TS2339: Property 'x2' does not exist on type 'ObjType1'. - ~~ -!!! error TS2339: Property 'x3' does not exist on type 'ObjType1'. - var foo: any = x1 || x2 || x3 || y || z; - var bar: any = this.x1 || this.x2 || this.x3 || this.y || this.z; - ~~ -!!! error TS2339: Property 'x1' does not exist on type 'C1'. - ~~ -!!! error TS2339: Property 'x2' does not exist on type 'C1'. - ~~ -!!! error TS2339: Property 'x3' does not exist on type 'C1'. - ~ -!!! error TS2339: Property 'y' does not exist on type 'C1'. - ~ -!!! error TS2339: Property 'z' does not exist on type 'C1'. - } - } - - var a: C1 = new C1([{ x1: 10, x2: "", x3: true }, "", false]); - ~~ -!!! error TS2353: Object literal may only specify known properties, and 'x1' does not exist in type 'ObjType1'. - ~~ -!!! error TS2322: Type 'string' is not assignable to type 'number'. - ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'string'. - const dest: any[] = [a.x1, a.x2, a.x3, a.y, a.z]; - ~~ -!!! error TS2339: Property 'x1' does not exist on type 'C1'. - ~~ -!!! error TS2339: Property 'x2' does not exist on type 'C1'. - ~~ -!!! error TS2339: Property 'x3' does not exist on type 'C1'. - ~ -!!! error TS2339: Property 'y' does not exist on type 'C1'. - ~ -!!! error TS2339: Property 'z' does not exist on type 'C1'. - const a_x1: any = dest[0]; - const a_x2: any = dest[1]; - const a_x3: any = dest[2]; - const a_y: any = dest[3]; - const a_z: any = dest[4]; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/disallowLineTerminatorBeforeArrow.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/disallowLineTerminatorBeforeArrow.d.ts deleted file mode 100644 index 0bdb38c4e2d8b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/disallowLineTerminatorBeforeArrow.d.ts +++ /dev/null @@ -1,197 +0,0 @@ -//// [tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts] //// - -//// [disallowLineTerminatorBeforeArrow.ts] -var f1 = (): void - => { } -var f2 = (x: string, y: string): void /* - */ => { } -var f3 = (x: string, y: number, ...rest: any[]): void - => { } -var f4 = (x: string, y: number, ...rest: any[]): void /* - */ => { } -var f5 = (...rest: any[]): void - => { } -var f6 = (...rest: any[]): void /* - */ => { } -var f7 = (x: string, y: number, z: number = 10): void - => { } -var f8 = (x: string, y: number, z: number = 10): void /* - */ => { } -var f9 = (a: number): number - => a; -var f10 = (a: number) : - number - => a -var f11 = (a: number): number /* - */ => a; -var f12 = (a: number) : - number /* - */ => a - -// Should be valid. -var f11 = (a: number - ): number => a; - -// Should be valid. -var f12 = (a: number) - : number => a; - -// Should be valid. -var f13 = (a: number): - number => a; - -// Should be valid. -var f14 = (): void /* */ => {} - -// Should be valid. -var f15 = (a: number): number /* */ => a - -// Should be valid. -var f16 = (a: number, b = 10): - number /* */ => a + b; - -function foo(func: () => boolean): void { } -foo(() - => true); -foo(() - => { return false; }); - -module m { - class City { - constructor(x: number, thing = () - => 100) { - } - - public m = () - => 2 * 2 * 2 - } - - export enum Enum { - claw = (() - => 10)() - } - - export var v: any = x: any: any - => new City(Enum.claw); -} - - -/// [Declarations] //// - - - -//// [disallowLineTerminatorBeforeArrow.d.ts] -declare var f1: () => void; -declare var f2: (x: string, y: string) => void; -declare var f3: (x: string, y: number, ...rest: any[]) => void; -declare var f4: (x: string, y: number, ...rest: any[]) => void; -declare var f5: (...rest: any[]) => void; -declare var f6: (...rest: any[]) => void; -declare var f7: (x: string, y: number, z?: number) => void; -declare var f8: (x: string, y: number, z?: number) => void; -declare var f9: (a: number) => number; -declare var f10: (a: number) => number; -declare var f11: (a: number) => number; -declare var f12: (a: number) => number; -declare var f11: (a: number) => number; -declare var f12: (a: number) => number; -declare var f13: (a: number) => number; -declare var f14: () => void; -declare var f15: (a: number) => number; -declare var f16: (a: number, b?: number) => number; -declare function foo(func: () => boolean): void; -declare namespace m { - enum Enum { - claw - } - var v: any, any: any; -} - -/// [Errors] //// - -disallowLineTerminatorBeforeArrow.ts(71,25): error TS2304: Cannot find name 'x'. -disallowLineTerminatorBeforeArrow.ts(71,26): error TS1005: ',' expected. -disallowLineTerminatorBeforeArrow.ts(72,9): error TS1128: Declaration or statement expected. - - -==== disallowLineTerminatorBeforeArrow.ts (3 errors) ==== - var f1 = (): void - => { } - var f2 = (x: string, y: string): void /* - */ => { } - var f3 = (x: string, y: number, ...rest: any[]): void - => { } - var f4 = (x: string, y: number, ...rest: any[]): void /* - */ => { } - var f5 = (...rest: any[]): void - => { } - var f6 = (...rest: any[]): void /* - */ => { } - var f7 = (x: string, y: number, z: number = 10): void - => { } - var f8 = (x: string, y: number, z: number = 10): void /* - */ => { } - var f9 = (a: number): number - => a; - var f10 = (a: number) : - number - => a - var f11 = (a: number): number /* - */ => a; - var f12 = (a: number) : - number /* - */ => a - - // Should be valid. - var f11 = (a: number - ): number => a; - - // Should be valid. - var f12 = (a: number) - : number => a; - - // Should be valid. - var f13 = (a: number): - number => a; - - // Should be valid. - var f14 = (): void /* */ => {} - - // Should be valid. - var f15 = (a: number): number /* */ => a - - // Should be valid. - var f16 = (a: number, b = 10): - number /* */ => a + b; - - function foo(func: () => boolean): void { } - foo(() - => true); - foo(() - => { return false; }); - - module m { - class City { - constructor(x: number, thing = () - => 100) { - } - - public m = () - => 2 * 2 * 2 - } - - export enum Enum { - claw = (() - => 10)() - } - - export var v: any = x: any: any - ~ -!!! error TS2304: Cannot find name 'x'. - ~ -!!! error TS1005: ',' expected. - => new City(Enum.claw); - ~~ -!!! error TS1128: Declaration or statement expected. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicateObjectLiteralProperty.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicateObjectLiteralProperty.d.ts deleted file mode 100644 index fade6e6ed750b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicateObjectLiteralProperty.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -//// [tests/cases/compiler/duplicateObjectLiteralProperty.ts] //// - -//// [duplicateObjectLiteralProperty.ts] -var x = { - a: 1, - b: true, // OK - a: 56, // Duplicate - \u0061: "ss", // Duplicate - a: { - c: 1, - "c": 56, // Duplicate - } -}; - - -var y = { - get a() { return 0; }, - set a(v: number) { }, - get a(): number { return 0; } -}; - - -/// [Declarations] //// - - - -//// [duplicateObjectLiteralProperty.d.ts] -declare var x: { - a: { - c: number; - }; - b: boolean; -}; -declare var y: { - readonly a: number; -}; - -/// [Errors] //// - -duplicateObjectLiteralProperty.ts(4,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty.ts(5,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty.ts(6,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty.ts(8,9): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty.ts(14,9): error TS2300: Duplicate identifier 'a'. -duplicateObjectLiteralProperty.ts(15,9): error TS2300: Duplicate identifier 'a'. -duplicateObjectLiteralProperty.ts(16,9): error TS1118: An object literal cannot have multiple get/set accessors with the same name. -duplicateObjectLiteralProperty.ts(16,9): error TS2300: Duplicate identifier 'a'. - - -==== duplicateObjectLiteralProperty.ts (8 errors) ==== - var x = { - a: 1, - b: true, // OK - a: 56, // Duplicate - ~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - \u0061: "ss", // Duplicate - ~~~~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - a: { - ~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - c: 1, - "c": 56, // Duplicate - ~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - }; - - - var y = { - get a() { return 0; }, - ~ -!!! error TS2300: Duplicate identifier 'a'. - set a(v: number) { }, - ~ -!!! error TS2300: Duplicate identifier 'a'. - get a(): number { return 0; } - ~ -!!! error TS1118: An object literal cannot have multiple get/set accessors with the same name. - ~ -!!! error TS2300: Duplicate identifier 'a'. - }; - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumAssignmentCompat5.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumAssignmentCompat5.d.ts deleted file mode 100644 index 2d01585f6a040..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumAssignmentCompat5.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -//// [tests/cases/compiler/enumAssignmentCompat5.ts] //// - -//// [enumAssignmentCompat5.ts] -enum E { - A, B, C -} -enum Computed { - A = 1 << 1, - B = 1 << 2, - C = 1 << 3, -} -let n: number; -let e: E = n; // ok because it's too inconvenient otherwise -e = 0; // ok, in range -e = 4; // ok, out of range, but allowed computed enums don't have all members -let a: E.A = 0; // ok, A === 0 -a = 2; // error, 2 !== 0 -a = n; // ok - -let c: Computed = n; // ok -c = n; // ok -c = 4; // ok -let ca: Computed.A = 1; // error, Computed.A isn't a literal type because Computed has no enum literals - - - - - -/// [Declarations] //// - - - -//// [enumAssignmentCompat5.d.ts] -declare enum E { - A = 0, - B = 1, - C = 2 -} -declare enum Computed { - A = 2, - B = 4, - C = 8 -} -declare let n: number; -declare let e: E; -declare let a: E.A; -declare let c: Computed; -declare let ca: Computed.A; - -/// [Errors] //// - -enumAssignmentCompat5.ts(12,1): error TS2322: Type '4' is not assignable to type 'E'. -enumAssignmentCompat5.ts(14,1): error TS2322: Type '2' is not assignable to type 'E.A'. -enumAssignmentCompat5.ts(20,5): error TS2322: Type '1' is not assignable to type 'Computed.A'. - - -==== enumAssignmentCompat5.ts (3 errors) ==== - enum E { - A, B, C - } - enum Computed { - A = 1 << 1, - B = 1 << 2, - C = 1 << 3, - } - let n: number; - let e: E = n; // ok because it's too inconvenient otherwise - e = 0; // ok, in range - e = 4; // ok, out of range, but allowed computed enums don't have all members - ~ -!!! error TS2322: Type '4' is not assignable to type 'E'. - let a: E.A = 0; // ok, A === 0 - a = 2; // error, 2 !== 0 - ~ -!!! error TS2322: Type '2' is not assignable to type 'E.A'. - a = n; // ok - - let c: Computed = n; // ok - c = n; // ok - c = 4; // ok - let ca: Computed.A = 1; // error, Computed.A isn't a literal type because Computed has no enum literals - ~~ -!!! error TS2322: Type '1' is not assignable to type 'Computed.A'. - - - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics.d.ts deleted file mode 100644 index 8d1e4430898ea..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics.d.ts +++ /dev/null @@ -1,142 +0,0 @@ -//// [tests/cases/conformance/enums/enumBasics.ts] //// - -//// [enumBasics.ts] -// Enum without initializers have first member = 0 and successive members = N + 1 -enum E1 { - A, - B, - C -} - -// Enum type is a subtype of Number -var x: number = E1.A; - -// Enum object type is anonymous with properties of the enum type and numeric indexer -var e: typeof E1 = E1; -var e: { - readonly A: E1.A; - readonly B: E1.B; - readonly C: E1.C; - readonly [n: number]: string; -}; -var e: typeof E1; - -// Reverse mapping of enum returns string name of property -var s: string = E1[e.A]; -var s: string; - - -// Enum with only constant members -enum E2 { - A = 1, B = 2, C = 3 -} - -// Enum with only computed members -enum E3 { - X = 'foo'.length, Y = 4 + 3, Z = +'foo' -} - -// Enum with constant members followed by computed members -enum E4 { - X = 0, Y, Z = 'foo'.length -} - -// Enum with > 2 constant members with no initializer for first member, non zero initializer for second element -enum E5 { - A, - B = 3, - C // 4 -} - -enum E6 { - A, - B = 0, - C // 1 -} - -// Enum with computed member initializer of type 'any' -enum E7 { - A = 'foo'['foo'] -} - -// Enum with computed member initializer of type number -enum E8 { - B = 'foo'['foo'] -} - -//Enum with computed member intializer of same enum type -enum E9 { - A, - B = A -} - -// (refer to .js to validate) -// Enum constant members are propagated -var doNotPropagate: (E8 | E7 | E4 | E3)[] = [ - E8.B, E7.A, E4.Z, E3.X, E3.Y, E3.Z -]; -// Enum computed members are not propagated -var doPropagate: (E9 | E6 | E5)[] = [ - E9.A, E9.B, E6.B, E6.C, E6.A, E5.A, E5.B, E5.C -]; - - - -/// [Declarations] //// - - - -//// [enumBasics.d.ts] -declare enum E1 { - A = 0, - B = 1, - C = 2 -} -declare var x: number; -declare var e: typeof E1; -declare var e: { - readonly A: E1.A; - readonly B: E1.B; - readonly C: E1.C; - readonly [n: number]: string; -}; -declare var e: typeof E1; -declare var s: string; -declare var s: string; -declare enum E2 { - A = 1, - B = 2, - C = 3 -} -declare enum E3 { - X, - Y = 7, - Z -} -declare enum E4 { - X = 0, - Y = 1, - Z -} -declare enum E5 { - A = 0, - B = 3, - C = 4 -} -declare enum E6 { - A = 0, - B = 0, - C = 1 -} -declare enum E7 { - A -} -declare enum E8 { - B -} -declare enum E9 { - A = 0, - B = 0 -} -declare var doNotPropagate: (E8 | E7 | E4 | E3)[]; -declare var doPropagate: (E9 | E6 | E5)[]; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics2.d.ts deleted file mode 100644 index cf6ce8354240e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics2.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -//// [tests/cases/compiler/enumBasics2.ts] //// - -//// [enumBasics2.ts] -enum Foo { - a = 2, - b = 3, - x = a.b, // should error - y = b.a, // should error - z = y.x * a.x, // should error -} - -enum Bar { - a = (1).valueOf(), // ok - b = Foo.a, // ok - c = Foo.a.valueOf(), // ok - d = Foo.a.a, // should error -} - - -/// [Declarations] //// - - - -//// [enumBasics2.d.ts] -declare enum Foo { - a = 2, - b = 3, - x,// should error - y,// should error - z -} -declare enum Bar { - a,// ok - b = 2,// ok - c,// ok - d -} - -/// [Errors] //// - -enumBasics2.ts(4,9): error TS2339: Property 'b' does not exist on type 'Foo.a'. -enumBasics2.ts(5,9): error TS2339: Property 'a' does not exist on type 'Foo.b'. -enumBasics2.ts(6,9): error TS2339: Property 'x' does not exist on type 'Foo.y'. -enumBasics2.ts(6,15): error TS2339: Property 'x' does not exist on type 'Foo.a'. -enumBasics2.ts(13,13): error TS2339: Property 'a' does not exist on type 'Foo.a'. - - -==== enumBasics2.ts (5 errors) ==== - enum Foo { - a = 2, - b = 3, - x = a.b, // should error - ~ -!!! error TS2339: Property 'b' does not exist on type 'Foo.a'. - y = b.a, // should error - ~ -!!! error TS2339: Property 'a' does not exist on type 'Foo.b'. - z = y.x * a.x, // should error - ~ -!!! error TS2339: Property 'x' does not exist on type 'Foo.y'. - ~ -!!! error TS2339: Property 'x' does not exist on type 'Foo.a'. - } - - enum Bar { - a = (1).valueOf(), // ok - b = Foo.a, // ok - c = Foo.a.valueOf(), // ok - d = Foo.a.a, // should error - ~ -!!! error TS2339: Property 'a' does not exist on type 'Foo.a'. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics3.d.ts deleted file mode 100644 index 2fcfe7ad2de83..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumBasics3.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -//// [tests/cases/compiler/enumBasics3.ts] //// - -//// [enumBasics3.ts] -module M { - export namespace N { - export enum E1 { - a = 1, - b = a.a, // should error - } - } -} - -module M { - export namespace N { - export enum E2 { - b = M.N.E1.a, - c = M.N.E1.a.a, // should error - } - } -} - - -/// [Declarations] //// - - - -//// [enumBasics3.d.ts] -declare namespace M { - namespace N { - enum E1 { - a = 1, - b - } - } -} -declare namespace M { - namespace N { - enum E2 { - b = 1, - c - } - } -} - -/// [Errors] //// - -enumBasics3.ts(5,13): error TS2339: Property 'a' does not exist on type 'E1.a'. -enumBasics3.ts(14,20): error TS2339: Property 'a' does not exist on type 'E1.a'. - - -==== enumBasics3.ts (2 errors) ==== - module M { - export namespace N { - export enum E1 { - a = 1, - b = a.a, // should error - ~ -!!! error TS2339: Property 'a' does not exist on type 'E1.a'. - } - } - } - - module M { - export namespace N { - export enum E2 { - b = M.N.E1.a, - c = M.N.E1.a.a, // should error - ~ -!!! error TS2339: Property 'a' does not exist on type 'E1.a'. - } - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithString.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithString.d.ts deleted file mode 100644 index 5e2b138d45199..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithString.d.ts +++ /dev/null @@ -1,114 +0,0 @@ -//// [tests/cases/conformance/enums/enumConstantMemberWithString.ts] //// - -//// [enumConstantMemberWithString.ts] -enum T1 { - a = "1", - b = "1" + "2", - c = "1" + "2" + "3", - d = "a" - "a", - e = "a" + 1 -} - -enum T2 { - a = "1", - b = "1" + "2" -} - -enum T3 { - a = "1", - b = "1" + "2", - c = 1, - d = 1 + 2 -} - -enum T4 { - a = "1" -} - -enum T5 { - a = "1" + "2" -} - -declare enum T6 { - a = "1", - b = "1" + "2" -} - - -/// [Declarations] //// - - - -//// [enumConstantMemberWithString.d.ts] -declare enum T1 { - a = "1", - b = "12", - c = "123", - d, - e = "a1" -} -declare enum T2 { - a = "1", - b = "12" -} -declare enum T3 { - a = "1", - b = "12", - c = 1, - d = 3 -} -declare enum T4 { - a = "1" -} -declare enum T5 { - a = "12" -} -declare enum T6 { - a = "1", - b = "12" -} - -/// [Errors] //// - -enumConstantMemberWithString.ts(5,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -enumConstantMemberWithString.ts(5,15): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - - -==== enumConstantMemberWithString.ts (2 errors) ==== - enum T1 { - a = "1", - b = "1" + "2", - c = "1" + "2" + "3", - d = "a" - "a", - ~~~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~~~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - e = "a" + 1 - } - - enum T2 { - a = "1", - b = "1" + "2" - } - - enum T3 { - a = "1", - b = "1" + "2", - c = 1, - d = 1 + 2 - } - - enum T4 { - a = "1" - } - - enum T5 { - a = "1" + "2" - } - - declare enum T6 { - a = "1", - b = "1" + "2" - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithStringEmitDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithStringEmitDeclaration.d.ts deleted file mode 100644 index dd4dcb9671ff0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithStringEmitDeclaration.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -//// [tests/cases/conformance/enums/enumConstantMemberWithStringEmitDeclaration.ts] //// - -//// [enumConstantMemberWithStringEmitDeclaration.ts] -enum T1 { - a = "1", - b = "1" + "2", - c = "1" + "2" + "3" -} - -enum T2 { - a = "1", - b = "1" + "2" -} - -enum T3 { - a = "1", - b = "1" + "2" -} - -enum T4 { - a = "1" -} - -enum T5 { - a = "1" + "2" -} - -declare enum T6 { - a = "1", - b = "1" + "2" -} - - -/// [Declarations] //// - - - -//// [enumConstantMemberWithStringEmitDeclaration.d.ts] -declare enum T1 { - a = "1", - b = "12", - c = "123" -} -declare enum T2 { - a = "1", - b = "12" -} -declare enum T3 { - a = "1", - b = "12" -} -declare enum T4 { - a = "1" -} -declare enum T5 { - a = "12" -} -declare enum T6 { - a = "1", - b = "12" -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiterals.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiterals.d.ts deleted file mode 100644 index 9d3fade808183..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMemberWithTemplateLiterals.d.ts +++ /dev/null @@ -1,146 +0,0 @@ -//// [tests/cases/conformance/enums/enumConstantMemberWithTemplateLiterals.ts] //// - -//// [enumConstantMemberWithTemplateLiterals.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, - e = `1` - `1`, - f = `1` + 1, - g = `1${"2"}3`, - h = `1`.length -} - -enum T6 { - a = 1, - b = `12`.length -} - -declare enum T7 { - a = `1`, - b = `1` + `1`, - c = "2" + `1` -} - - -/// [Declarations] //// - - - -//// [enumConstantMemberWithTemplateLiterals.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, - e, - f = "11", - g = "123", - h -} -declare enum T6 { - a = 1, - b -} -declare enum T7 { - a = "1", - b = "11", - c = "21" -} - -/// [Errors] //// - -enumConstantMemberWithTemplateLiterals.ts(28,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -enumConstantMemberWithTemplateLiterals.ts(28,15): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - - -==== enumConstantMemberWithTemplateLiterals.ts (2 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, - e = `1` - `1`, - ~~~ -!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - ~~~ -!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. - f = `1` + 1, - g = `1${"2"}3`, - h = `1`.length - } - - enum T6 { - a = 1, - b = `12`.length - } - - 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/tsc/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMembers.d.ts deleted file mode 100644 index 64d2178e0285e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumConstantMembers.d.ts +++ /dev/null @@ -1,151 +0,0 @@ -//// [tests/cases/conformance/enums/enumConstantMembers.ts] //// - -//// [enumConstantMembers.ts] -// Constant members allow negatives, but not decimals. Also hex literals are allowed -enum E1 { - a = 1, - b -} -enum E2 { - a = - 1, - b -} -enum E3 { - a = 0.1, - b // Error because 0.1 is not a constant -} - -declare enum E4 { - a = 1, - b = -1, - c = 0.1 // Not a constant -} - -enum E5 { - a = 1 / 0, - b = 2 / 0.0, - c = 1.0 / 0.0, - d = 0.0 / 0.0, - e = NaN, - f = Infinity, - g = -Infinity -} - -const enum E6 { - a = 1 / 0, - b = 2 / 0.0, - c = 1.0 / 0.0, - d = 0.0 / 0.0, - e = NaN, - f = Infinity, - g = -Infinity -} - - -/// [Declarations] //// - - - -//// [enumConstantMembers.d.ts] -declare enum E1 { - a = 1, - b = 2 -} -declare enum E2 { - a = -1, - b = 0 -} -declare enum E3 { - a = 0.1, - b = 1.1 -} -declare enum E4 { - a = 1, - b = -1, - c = 0.1 -} -declare enum E5 { - a = Infinity, - b = Infinity, - c = Infinity, - d = NaN, - e = NaN, - f = Infinity, - g = -Infinity -} -declare const enum E6 { - a = Infinity, - b = Infinity, - c = Infinity, - d = NaN, - e = NaN, - f = Infinity, - g = -Infinity -} - -/// [Errors] //// - -enumConstantMembers.ts(32,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(33,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(34,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(35,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. -enumConstantMembers.ts(36,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. -enumConstantMembers.ts(37,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(38,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - - -==== enumConstantMembers.ts (7 errors) ==== - // Constant members allow negatives, but not decimals. Also hex literals are allowed - enum E1 { - a = 1, - b - } - enum E2 { - a = - 1, - b - } - enum E3 { - a = 0.1, - b // Error because 0.1 is not a constant - } - - declare enum E4 { - a = 1, - b = -1, - c = 0.1 // Not a constant - } - - enum E5 { - a = 1 / 0, - b = 2 / 0.0, - c = 1.0 / 0.0, - d = 0.0 / 0.0, - e = NaN, - f = Infinity, - g = -Infinity - } - - const enum E6 { - a = 1 / 0, - ~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - b = 2 / 0.0, - ~~~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - c = 1.0 / 0.0, - ~~~~~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - d = 0.0 / 0.0, - ~~~~~~~~~ -!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - e = NaN, - ~~~ -!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - f = Infinity, - ~~~~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - g = -Infinity - ~~~~~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrorOnConstantBindingWithInitializer.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrorOnConstantBindingWithInitializer.d.ts deleted file mode 100644 index 14700e8d87338..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrorOnConstantBindingWithInitializer.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -//// [tests/cases/conformance/enums/enumErrorOnConstantBindingWithInitializer.ts] //// - -//// [enumErrorOnConstantBindingWithInitializer.ts] -type Thing = { - value?: string | number; -}; - -declare const thing: Thing; -const temp: string | number | undefined = thing.value; -const value: string | number = temp === undefined ? "123" : thing.value; - -enum E { - test = value, -} - - -/// [Declarations] //// - - - -//// [enumErrorOnConstantBindingWithInitializer.d.ts] -type Thing = { - value?: string | number; -}; -declare const thing: Thing; -declare const temp: string | number | undefined; -declare const value: string | number; -declare enum E { - test -} - -/// [Errors] //// - -enumErrorOnConstantBindingWithInitializer.ts(7,7): error TS2322: Type 'string | number | undefined' is not assignable to type 'string | number'. - Type 'undefined' is not assignable to type 'string | number'. -enumErrorOnConstantBindingWithInitializer.ts(10,10): error TS18033: Type 'string | number' is not assignable to type 'number' as required for computed enum member values. - Type 'string' is not assignable to type 'number'. - - -==== enumErrorOnConstantBindingWithInitializer.ts (2 errors) ==== - type Thing = { - value?: string | number; - }; - - declare const thing: Thing; - const temp: string | number | undefined = thing.value; - const value: string | number = temp === undefined ? "123" : thing.value; - ~~~~~ -!!! error TS2322: Type 'string | number | undefined' is not assignable to type 'string | number'. -!!! error TS2322: Type 'undefined' is not assignable to type 'string | number'. - - enum E { - test = value, - ~~~~~ -!!! error TS18033: Type 'string | number' is not assignable to type 'number' as required for computed enum member values. -!!! error TS18033: 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/enumErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrors.d.ts deleted file mode 100644 index d2932bebe8c78..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumErrors.d.ts +++ /dev/null @@ -1,249 +0,0 @@ -//// [tests/cases/conformance/enums/enumErrors.ts] //// - -//// [enumErrors.ts] -// Enum named with PredefinedTypes -enum any { } -enum number { } -enum string { } -enum boolean { } - -// Enum with computed member initializer of type Number -enum E5 { - C = new Number(30) -} - -enum E9 { - A, - B = A -} - -//Enum with computed member intializer of different enum type -// Bug 707850: This should be allowed -enum E10 { - A = E9.A, - B = E9.B -} - -// Enum with computed member intializer of other types -enum E11 { - A = true, - B = new Date(), - C = window, - D = {}, - E = (() => 'foo')(), -} - -// Enum with string valued member and computed member initializers -enum E12 { - A = '', - B = new Date(), - C = window, - D = {}, - E = 1 + 1, - F = (() => 'foo')(), -} - -// Enum with incorrect syntax -enum E13 { - postComma, - postValueComma = 1, - - postSemicolon; - postColonValueComma: 2, - postColonValueSemicolon: 3; -}; - -enum E14 { a, b: any "hello" += 1, c, d} - - -/// [Declarations] //// - - - -//// [enumErrors.d.ts] -declare enum any { -} -declare enum number { -} -declare enum string { -} -declare enum boolean { -} -declare enum E5 { - C -} -declare enum E9 { - A = 0, - B = 0 -} -declare enum E10 { - A = 0, - B = 0 -} -declare enum E11 { - A, - B, - C, - D, - E -} -declare enum E12 { - A = "", - B, - C, - D, - E = 2, - F -} -declare enum E13 { - postComma = 0, - postValueComma = 1, - postSemicolon = 2, - postColonValueComma = 3, - 2 = 4, - postColonValueSemicolon = 5, - 3 = 6 -} -declare enum E14 { - a = 0, - b = 1, - any = 2, - "hello" = 3, - 1 = 4, - c = 5, - d = 6 -} - -/// [Errors] //// - -enumErrors.ts(2,6): error TS2431: Enum name cannot be 'any'. -enumErrors.ts(3,6): error TS2431: Enum name cannot be 'number'. -enumErrors.ts(4,6): error TS2431: Enum name cannot be 'string'. -enumErrors.ts(5,6): error TS2431: Enum name cannot be 'boolean'. -enumErrors.ts(9,9): error TS18033: Type 'Number' is not assignable to type 'number' as required for computed enum member values. - 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. -enumErrors.ts(26,9): error TS18033: Type 'boolean' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(27,9): error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(28,9): error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(29,9): error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(30,9): error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(36,9): error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(37,9): error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(38,9): error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(40,9): error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(48,18): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(49,24): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(49,26): error TS2452: An enum member cannot have a numeric name. -enumErrors.ts(50,28): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(50,30): error TS2452: An enum member cannot have a numeric name. -enumErrors.ts(50,31): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(53,16): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(53,22): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(53,30): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(53,33): error TS2452: An enum member cannot have a numeric name. - - -==== enumErrors.ts (24 errors) ==== - // Enum named with PredefinedTypes - enum any { } - ~~~ -!!! error TS2431: Enum name cannot be 'any'. - enum number { } - ~~~~~~ -!!! error TS2431: Enum name cannot be 'number'. - enum string { } - ~~~~~~ -!!! error TS2431: Enum name cannot be 'string'. - enum boolean { } - ~~~~~~~ -!!! error TS2431: Enum name cannot be 'boolean'. - - // Enum with computed member initializer of type Number - enum E5 { - C = new Number(30) - ~~~~~~~~~~~~~~ -!!! error TS18033: Type 'Number' is not assignable to type 'number' as required for computed enum member values. -!!! error TS18033: 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. - } - - enum E9 { - A, - B = A - } - - //Enum with computed member intializer of different enum type - // Bug 707850: This should be allowed - enum E10 { - A = E9.A, - B = E9.B - } - - // Enum with computed member intializer of other types - enum E11 { - A = true, - ~~~~ -!!! error TS18033: Type 'boolean' is not assignable to type 'number' as required for computed enum member values. - B = new Date(), - ~~~~~~~~~~ -!!! error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. - C = window, - ~~~~~~ -!!! error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. - D = {}, - ~~ -!!! error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. - E = (() => 'foo')(), - ~~~~~~~~~~~~~~~ -!!! error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. - } - - // Enum with string valued member and computed member initializers - enum E12 { - A = '', - B = new Date(), - ~~~~~~~~~~ -!!! error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. - C = window, - ~~~~~~ -!!! error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. - D = {}, - ~~ -!!! error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. - E = 1 + 1, - F = (() => 'foo')(), - ~~~~~~~~~~~~~~~ -!!! error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. - } - - // Enum with incorrect syntax - enum E13 { - postComma, - postValueComma = 1, - - postSemicolon; - ~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - postColonValueComma: 2, - ~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - ~ -!!! error TS2452: An enum member cannot have a numeric name. - postColonValueSemicolon: 3; - ~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - ~ -!!! error TS2452: An enum member cannot have a numeric name. - ~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - }; - - enum E14 { a, b: any "hello" += 1, c, d} - ~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - ~~~~~~~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - ~~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - ~ -!!! error TS2452: An enum member cannot have a numeric name. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumExportMergingES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumExportMergingES6.d.ts deleted file mode 100644 index 1beae892b031c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumExportMergingES6.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -//// [tests/cases/conformance/enums/enumExportMergingES6.ts] //// - -//// [enumExportMergingES6.ts] -export enum Animals { - Cat = 1 -} -export enum Animals { - Dog = 2 -} -export enum Animals { - CatDog = Cat | Dog -} - - -/// [Declarations] //// - - - -//// [enumExportMergingES6.d.ts] -export declare enum Animals { - Cat = 1 -} -export declare enum Animals { - Dog = 2 -} -export declare enum Animals { - CatDog = 3 -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumLiteralAssignableToEnumInsideUnion.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumLiteralAssignableToEnumInsideUnion.d.ts deleted file mode 100644 index e1573aabd99e0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumLiteralAssignableToEnumInsideUnion.d.ts +++ /dev/null @@ -1,118 +0,0 @@ -//// [tests/cases/compiler/enumLiteralAssignableToEnumInsideUnion.ts] //// - -//// [enumLiteralAssignableToEnumInsideUnion.ts] -module X { - export enum Foo { - A, B - } -} -module Y { - export enum Foo { - A, B - } -} -module Z { - export enum Foo { - A = 1 << 1, - B = 1 << 2, - } -} -module Ka { - export enum Foo { - A = 1 << 10, - B = 1 << 11, - } -} -const e0: X.Foo | boolean = Y.Foo.A; // ok -const e1: X.Foo | boolean = Z.Foo.A; // not legal, Z is computed -const e2: X.Foo.A | X.Foo.B | boolean = Z.Foo.A; // still not legal -const e3: X.Foo.B | boolean = Z.Foo.A; // not legal -const e4: X.Foo.A | boolean = Z.Foo.A; // not legal either because Z.Foo is computed and Z.Foo.A is not necessarily assignable to X.Foo.A -const e5: Ka.Foo | boolean = Z.Foo.A; // ok - - -/// [Declarations] //// - - - -//// [enumLiteralAssignableToEnumInsideUnion.d.ts] -declare namespace X { - enum Foo { - A = 0, - B = 1 - } -} -declare namespace Y { - enum Foo { - A = 0, - B = 1 - } -} -declare namespace Z { - enum Foo { - A = 2, - B = 4 - } -} -declare namespace Ka { - enum Foo { - A = 1024, - B = 2048 - } -} -declare const e0: X.Foo | boolean; -declare const e1: X.Foo | boolean; -declare const e2: X.Foo.A | X.Foo.B | boolean; -declare const e3: X.Foo.B | boolean; -declare const e4: X.Foo.A | boolean; -declare const e5: Ka.Foo | boolean; - -/// [Errors] //// - -enumLiteralAssignableToEnumInsideUnion.ts(24,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. -enumLiteralAssignableToEnumInsideUnion.ts(25,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. -enumLiteralAssignableToEnumInsideUnion.ts(26,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo.B'. -enumLiteralAssignableToEnumInsideUnion.ts(27,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo.A'. -enumLiteralAssignableToEnumInsideUnion.ts(28,7): error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. - - -==== enumLiteralAssignableToEnumInsideUnion.ts (5 errors) ==== - module X { - export enum Foo { - A, B - } - } - module Y { - export enum Foo { - A, B - } - } - module Z { - export enum Foo { - A = 1 << 1, - B = 1 << 2, - } - } - module Ka { - export enum Foo { - A = 1 << 10, - B = 1 << 11, - } - } - const e0: X.Foo | boolean = Y.Foo.A; // ok - const e1: X.Foo | boolean = Z.Foo.A; // not legal, Z is computed - ~~ -!!! error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. - const e2: X.Foo.A | X.Foo.B | boolean = Z.Foo.A; // still not legal - ~~ -!!! error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. - const e3: X.Foo.B | boolean = Z.Foo.A; // not legal - ~~ -!!! error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo.B'. - const e4: X.Foo.A | boolean = Z.Foo.A; // not legal either because Z.Foo is computed and Z.Foo.A is not necessarily assignable to X.Foo.A - ~~ -!!! error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo.A'. - const e5: Ka.Foo | boolean = Z.Foo.A; // ok - ~~ -!!! error TS2322: Type 'Foo.A' is not assignable to type 'boolean | Foo'. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMerging.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMerging.d.ts deleted file mode 100644 index 5443787b1c6a3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMerging.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -//// [tests/cases/conformance/enums/enumMerging.ts] //// - -//// [enumMerging.ts] -// Enum with only constant members across 2 declarations with the same root module -// Enum with initializer in all declarations with constant members with the same root module -module M1 { - enum EImpl1 { - A, B, C - } - - enum EImpl1 { - D = 1, E, F - } - - export enum EConst1 { - A = 3, B = 2, C = 1 - } - - export enum EConst1 { - D = 7, E = 9, F = 8 - } - - var x = [EConst1.A, EConst1.B, EConst1.C, EConst1.D, EConst1.E, EConst1.F]; -} - -// Enum with only computed members across 2 declarations with the same root module -module M2 { - export enum EComp2 { - A = 'foo'.length, B = 'foo'.length, C = 'foo'.length - } - - export enum EComp2 { - D = 'foo'.length, E = 'foo'.length, F = 'foo'.length - } - - var x = [EComp2.A, EComp2.B, EComp2.C, EComp2.D, EComp2.E, EComp2.F]; -} - -// Enum with initializer in only one of two declarations with constant members with the same root module -module M3 { - enum EInit { - A, - B - } - - enum EInit { - C = 1, D, E - } -} - -// Enums with same name but different root module -module M4 { - export enum Color { Red, Green, Blue } -} -module M5 { - export enum Color { Red, Green, Blue } -} - -module M6.A { - export enum Color { Red, Green, Blue } -} -module M6 { - export module A { - export enum Color { Yellow = 1 } - } - var t = A.Color.Yellow; - t = A.Color.Red; -} - - -/// [Declarations] //// - - - -//// [enumMerging.d.ts] -declare namespace M1 { - enum EConst1 { - A = 3, - B = 2, - C = 1 - } - enum EConst1 { - D = 7, - E = 9, - F = 8 - } -} -declare namespace M2 { - enum EComp2 { - A, - B, - C - } - enum EComp2 { - D, - E, - F - } -} -declare namespace M3 { -} -declare namespace M4 { - enum Color { - Red = 0, - Green = 1, - Blue = 2 - } -} -declare namespace M5 { - enum Color { - Red = 0, - Green = 1, - Blue = 2 - } -} -declare namespace M6.A { - enum Color { - Red = 0, - Green = 1, - Blue = 2 - } -} -declare namespace M6 { - namespace A { - enum Color { - Yellow = 1 - } - } -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMergingErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMergingErrors.d.ts deleted file mode 100644 index 339d2d8cbfdcf..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumMergingErrors.d.ts +++ /dev/null @@ -1,168 +0,0 @@ -//// [tests/cases/conformance/enums/enumMergingErrors.ts] //// - -//// [enumMergingErrors.ts] -// Enum with constant, computed, constant members split across 3 declarations with the same root module -module M { - export enum E1 { A = 0 } - export enum E2 { C } - export enum E3 { A = 0 } -} -module M { - export enum E1 { B = 'foo'.length } - export enum E2 { B = 'foo'.length } - export enum E3 { C } -} -module M { - export enum E1 { C } - export enum E2 { A = 0 } - export enum E3 { B = 'foo'.length } -} - -// Enum with no initializer in either declaration with constant members with the same root module -module M1 { - export enum E1 { A = 0 } -} -module M1 { - export enum E1 { B } -} -module M1 { - export enum E1 { C } -} - - -// Enum with initializer in only one of three declarations with constant members with the same root module -module M2 { - export enum E1 { A } -} -module M2 { - export enum E1 { B = 0 } -} -module M2 { - export enum E1 { C } -} - - - - -/// [Declarations] //// - - - -//// [enumMergingErrors.d.ts] -declare namespace M { - enum E1 { - A = 0 - } - enum E2 { - C = 0 - } - enum E3 { - A = 0 - } -} -declare namespace M { - enum E1 { - B - } - enum E2 { - B - } - enum E3 { - C = 0 - } -} -declare namespace M { - enum E1 { - C = 0 - } - enum E2 { - A = 0 - } - enum E3 { - B - } -} -declare namespace M1 { - enum E1 { - A = 0 - } -} -declare namespace M1 { - enum E1 { - B = 0 - } -} -declare namespace M1 { - enum E1 { - C = 0 - } -} -declare namespace M2 { - enum E1 { - A = 0 - } -} -declare namespace M2 { - enum E1 { - B = 0 - } -} -declare namespace M2 { - enum E1 { - C = 0 - } -} - -/// [Errors] //// - -enumMergingErrors.ts(26,22): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. -enumMergingErrors.ts(38,22): error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. - - -==== enumMergingErrors.ts (2 errors) ==== - // Enum with constant, computed, constant members split across 3 declarations with the same root module - module M { - export enum E1 { A = 0 } - export enum E2 { C } - export enum E3 { A = 0 } - } - module M { - export enum E1 { B = 'foo'.length } - export enum E2 { B = 'foo'.length } - export enum E3 { C } - } - module M { - export enum E1 { C } - export enum E2 { A = 0 } - export enum E3 { B = 'foo'.length } - } - - // Enum with no initializer in either declaration with constant members with the same root module - module M1 { - export enum E1 { A = 0 } - } - module M1 { - export enum E1 { B } - } - module M1 { - export enum E1 { C } - ~ -!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. - } - - - // Enum with initializer in only one of three declarations with constant members with the same root module - module M2 { - export enum E1 { A } - } - module M2 { - export enum E1 { B = 0 } - } - module M2 { - export enum E1 { C } - ~ -!!! error TS2432: In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element. - } - - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumNumbering1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumNumbering1.d.ts deleted file mode 100644 index 32dae96ddba54..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumNumbering1.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -//// [tests/cases/compiler/enumNumbering1.ts] //// - -//// [enumNumbering1.ts] -enum Test { - A, - B, - C = Math.floor(Math.random() * 1000), - D = 10, - E // Error but shouldn't be -} - - -/// [Declarations] //// - - - -//// [enumNumbering1.d.ts] -declare enum Test { - A = 0, - B = 1, - C, - D = 10, - E = 11 -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumPropertyAccessBeforeInitalisation.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumPropertyAccessBeforeInitalisation.d.ts deleted file mode 100644 index ec3889cd06161..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumPropertyAccessBeforeInitalisation.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -//// [tests/cases/compiler/enumPropertyAccessBeforeInitalisation.ts] //// - -//// [enumPropertyAccessBeforeInitalisation.ts] -enum E { - A = A, - B = E.B, - C = E["C"], - D = 1 + D -} - - -/// [Declarations] //// - - - -//// [enumPropertyAccessBeforeInitalisation.d.ts] -declare enum E { - A, - B, - C, - D -} - -/// [Errors] //// - -enumPropertyAccessBeforeInitalisation.ts(2,9): error TS2565: Property 'A' is used before being assigned. -enumPropertyAccessBeforeInitalisation.ts(3,9): error TS2565: Property 'B' is used before being assigned. -enumPropertyAccessBeforeInitalisation.ts(4,9): error TS2565: Property 'C' is used before being assigned. -enumPropertyAccessBeforeInitalisation.ts(5,13): error TS2565: Property 'D' is used before being assigned. - - -==== enumPropertyAccessBeforeInitalisation.ts (4 errors) ==== - enum E { - A = A, - ~ -!!! error TS2565: Property 'A' is used before being assigned. - B = E.B, - ~~~ -!!! error TS2565: Property 'B' is used before being assigned. - C = E["C"], - ~~~~~~ -!!! error TS2565: Property 'C' is used before being assigned. - D = 1 + D - ~ -!!! error TS2565: Property 'D' is used before being assigned. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithComputedMember.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithComputedMember.d.ts deleted file mode 100644 index 8758fd55411da..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithComputedMember.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -//// [tests/cases/compiler/enumWithComputedMember.ts] //// - -//// [enumWithComputedMember.ts] -enum A { - X = "".length, - Y = X, - Z -} - - -/// [Declarations] //// - - - -//// [enumWithComputedMember.d.ts] -declare enum A { - X, - Y, - Z -} - -/// [Errors] //// - -enumWithComputedMember.ts(4,5): error TS1061: Enum member must have initializer. - - -==== enumWithComputedMember.ts (1 errors) ==== - enum A { - X = "".length, - Y = X, - Z - ~ -!!! error TS1061: Enum member must have initializer. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithExport.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithExport.d.ts deleted file mode 100644 index 1158352692f76..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithExport.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -//// [tests/cases/compiler/enumWithExport.ts] //// - -//// [enumWithExport.ts] -namespace x { - export let y = 123 -} -enum x { - z = y -} - -/// [Declarations] //// - - - -//// [enumWithExport.d.ts] -declare namespace x { - let y: number; -} -declare enum x { - z -} - -/// [Errors] //// - -enumWithExport.ts(5,7): error TS2304: Cannot find name 'y'. - - -==== enumWithExport.ts (1 errors) ==== - namespace x { - export let y = 123 - } - enum x { - z = y - ~ -!!! error TS2304: Cannot find name 'y'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithParenthesizedInitializer1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithParenthesizedInitializer1.d.ts deleted file mode 100644 index 20264e566d839..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithParenthesizedInitializer1.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -//// [tests/cases/compiler/enumWithParenthesizedInitializer1.ts] //// - -//// [enumWithParenthesizedInitializer1.ts] -enum E { - e = -(3 -} - -/// [Declarations] //// - - - -//// [enumWithParenthesizedInitializer1.d.ts] -declare enum E { - e = -3 -} - -/// [Errors] //// - -enumWithParenthesizedInitializer1.ts(3,1): error TS1005: ')' expected. - - -==== enumWithParenthesizedInitializer1.ts (1 errors) ==== - enum E { - e = -(3 - } - ~ -!!! error TS1005: ')' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithoutInitializerAfterComputedMember.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithoutInitializerAfterComputedMember.d.ts deleted file mode 100644 index bd94ad55e5ef6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/enumWithoutInitializerAfterComputedMember.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/compiler/enumWithoutInitializerAfterComputedMember.ts] //// - -//// [enumWithoutInitializerAfterComputedMember.ts] -enum E { - a, - b = a, - c -} - -/// [Declarations] //// - - - -//// [enumWithoutInitializerAfterComputedMember.d.ts] -declare enum E { - a = 0, - b = 0, - c = 1 -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/equalityWithEnumTypes.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/equalityWithEnumTypes.d.ts deleted file mode 100644 index 02723aa08d373..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/equalityWithEnumTypes.d.ts +++ /dev/null @@ -1,121 +0,0 @@ -//// [tests/cases/conformance/types/typeRelationships/comparable/equalityWithEnumTypes.ts] //// - -//// [equalityWithEnumTypes.ts] -// Literal enum type -enum E1 { - a = 1, - b = 2, -} - -// Numeric enum type -enum E2 { - a = 1 << 0, - b = 1 << 1 -} - -function f1(v: E1): void { - if (v !== 0) { // Error - v; - } - if (v !== 1) { - v; - } - if (v !== 2) { - v; - } - if (v !== 3) { // Error - v; - } -} - -function f2(v: E2): void { - if (v !== 0) { - v; - } - if (v !== 1) { - v; - } - if (v !== 2) { - v; - } - if (v !== 3) { - v; - } -} - - -/// [Declarations] //// - - - -//// [equalityWithEnumTypes.d.ts] -declare enum E1 { - a = 1, - b = 2 -} -declare enum E2 { - a = 1, - b = 2 -} -declare function f1(v: E1): void; -declare function f2(v: E2): void; - -/// [Errors] //// - -equalityWithEnumTypes.ts(14,9): error TS2367: This comparison appears to be unintentional because the types 'E1' and '0' have no overlap. -equalityWithEnumTypes.ts(23,9): error TS2367: This comparison appears to be unintentional because the types 'E1' and '3' have no overlap. -equalityWithEnumTypes.ts(29,9): error TS2367: This comparison appears to be unintentional because the types 'E2' and '0' have no overlap. -equalityWithEnumTypes.ts(38,9): error TS2367: This comparison appears to be unintentional because the types 'E2' and '3' have no overlap. - - -==== equalityWithEnumTypes.ts (4 errors) ==== - // Literal enum type - enum E1 { - a = 1, - b = 2, - } - - // Numeric enum type - enum E2 { - a = 1 << 0, - b = 1 << 1 - } - - function f1(v: E1): void { - if (v !== 0) { // Error - ~~~~~~~ -!!! error TS2367: This comparison appears to be unintentional because the types 'E1' and '0' have no overlap. - v; - } - if (v !== 1) { - v; - } - if (v !== 2) { - v; - } - if (v !== 3) { // Error - ~~~~~~~ -!!! error TS2367: This comparison appears to be unintentional because the types 'E1' and '3' have no overlap. - v; - } - } - - function f2(v: E2): void { - if (v !== 0) { - ~~~~~~~ -!!! error TS2367: This comparison appears to be unintentional because the types 'E2' and '0' have no overlap. - v; - } - if (v !== 1) { - v; - } - if (v !== 2) { - v; - } - if (v !== 3) { - ~~~~~~~ -!!! error TS2367: This comparison appears to be unintentional because the types 'E2' and '3' have no overlap. - v; - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exactSpellingSuggestion.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exactSpellingSuggestion.d.ts deleted file mode 100644 index 5a631ff0df424..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exactSpellingSuggestion.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -//// [tests/cases/compiler/exactSpellingSuggestion.ts] //// - -//// [exactSpellingSuggestion.ts] -// Fixes #16245 -- always suggest the exact match, even when -// other options are very close -enum U8 { - BIT_0 = 1 << 0, - BIT_1 = 1 << 1, - BIT_2 = 1 << 2 -} - -U8.bit_2 - - -/// [Declarations] //// - - - -//// [exactSpellingSuggestion.d.ts] -declare enum U8 { - BIT_0 = 1, - BIT_1 = 2, - BIT_2 = 4 -} - -/// [Errors] //// - -exactSpellingSuggestion.ts(9,4): error TS2551: Property 'bit_2' does not exist on type 'typeof U8'. Did you mean 'BIT_2'? - - -==== exactSpellingSuggestion.ts (1 errors) ==== - // Fixes #16245 -- always suggest the exact match, even when - // other options are very close - enum U8 { - BIT_0 = 1 << 0, - BIT_1 = 1 << 1, - BIT_2 = 1 << 2 - } - - U8.bit_2 - ~~~~~ -!!! error TS2551: Property 'bit_2' does not exist on type 'typeof U8'. Did you mean 'BIT_2'? -!!! related TS2728 exactSpellingSuggestion.ts:6:5: 'BIT_2' is declared here. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesJSDocInTs.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesJSDocInTs.d.ts deleted file mode 100644 index a45de190fb8f8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesJSDocInTs.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/compiler/expandoFunctionContextualTypesJSDocInTs.ts] //// - -//// [expandoFunctionContextualTypesJSDocInTs.ts] -export function Foo(): void { } - -// This comment should have no effect; this is a TS file. -/** @type {never} */ -Foo.bar = () => { }; - - -/// [Declarations] //// - - - -//// [expandoFunctionContextualTypesJSDocInTs.d.ts] -export declare function Foo(): void; -export declare namespace Foo { - var bar: () => void; -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesNoValue.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesNoValue.d.ts deleted file mode 100644 index bbb154a013c84..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionContextualTypesNoValue.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -//// [tests/cases/compiler/expandoFunctionContextualTypesNoValue.ts] //// - -//// [expandoFunctionContextualTypesNoValue.ts] -// GH #38532 -import Foo from "blah"; - -export function Foo(): void { } - -Foo.bar = () => { }; - - -/// [Declarations] //// - - - -//// [expandoFunctionContextualTypesNoValue.d.ts] -export declare function Foo(): void; -export declare namespace Foo { - var bar: () => void; -} - -/// [Errors] //// - -expandoFunctionContextualTypesNoValue.ts(2,17): error TS2307: Cannot find module 'blah' or its corresponding type declarations. - - -==== expandoFunctionContextualTypesNoValue.ts (1 errors) ==== - // GH #38532 - import Foo from "blah"; - ~~~~~~ -!!! error TS2307: Cannot find module 'blah' or its corresponding type declarations. - - export function Foo(): void { } - - Foo.bar = () => { }; - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignDottedName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignDottedName.d.ts deleted file mode 100644 index 856553b1e77c7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignDottedName.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -//// [tests/cases/conformance/externalModules/exportAssignDottedName.ts] //// - -//// [foo2.ts] -import foo1 = require('./foo1'); -export = foo1.x; // Ok - -//// [foo1.ts] -export function x(): boolean{ - return true; -} - - -/// [Declarations] //// - - - -//// [foo1.d.ts] -export declare function x(): boolean; - -//// [foo2.d.ts] -import foo1 = require('./foo1'); -declare const _default: typeof foo1.x; -export = _default; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignNonIdentifier.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignNonIdentifier.d.ts deleted file mode 100644 index 0c8d2a0285b33..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignNonIdentifier.d.ts +++ /dev/null @@ -1,99 +0,0 @@ -//// [tests/cases/conformance/externalModules/exportAssignNonIdentifier.ts] //// - -//// [foo1.ts] -var x = 10; -export = typeof x; // Ok - -//// [foo2.ts] -export = "sausages"; // Ok - -//// [foo3.ts] -export = class Foo3 {}; // Error, not an expression - -//// [foo4.ts] -export = true; // Ok - -//// [foo5.ts] -export = undefined; // Valid. undefined is an identifier in JavaScript/TypeScript - -//// [foo6.ts] -export = void; // Error, void operator requires an argument - -//// [foo7.ts] -export = Date || String; // Ok - -//// [foo8.ts] -export = null; // Ok - - - -/// [Declarations] //// - - - -//// [foo1.d.ts] -declare const _default: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"; -export = _default; - -//// [foo2.d.ts] -declare const _default: "sausages"; -export = _default; - -//// [foo3.d.ts] -declare const _default: { - new (): {}; -}; -export = _default; - -//// [foo4.d.ts] -declare const _default: true; -export = _default; - -//// [foo5.d.ts] -export = undefined; - -//// [foo6.d.ts] -declare const _default: any; -export = _default; - -//// [foo7.d.ts] -declare const _default: DateConstructor | StringConstructor; -export = _default; - -//// [foo8.d.ts] -declare const _default: any; -export = _default; - -/// [Errors] //// - -foo6.ts(1,14): error TS1109: Expression expected. - - -==== foo1.ts (0 errors) ==== - var x = 10; - export = typeof x; // Ok - -==== foo2.ts (0 errors) ==== - export = "sausages"; // Ok - -==== foo3.ts (0 errors) ==== - export = class Foo3 {}; // Error, not an expression - -==== foo4.ts (0 errors) ==== - export = true; // Ok - -==== foo5.ts (0 errors) ==== - export = undefined; // Valid. undefined is an identifier in JavaScript/TypeScript - -==== foo6.ts (1 errors) ==== - export = void; // Error, void operator requires an argument - ~ -!!! error TS1109: Expression expected. - -==== foo7.ts (0 errors) ==== - export = Date || String; // Ok - -==== foo8.ts (0 errors) ==== - export = null; // Ok - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignmentWithoutIdentifier1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignmentWithoutIdentifier1.d.ts deleted file mode 100644 index 54fdd1294b808..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignmentWithoutIdentifier1.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/compiler/exportAssignmentWithoutIdentifier1.ts] //// - -//// [exportAssignmentWithoutIdentifier1.ts] -function Greeter() { - //... -} -Greeter.prototype.greet = function () { - //... -} -export = new Greeter(); - - -/// [Declarations] //// - - - -//// [exportAssignmentWithoutIdentifier1.d.ts] -declare const _default: any; -export = _default; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty.d.ts deleted file mode 100644 index fed9d43af14b0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -//// [tests/cases/compiler/exportEqualsProperty.ts] //// - -//// [index.ts] -/// -import { X } from "foobar"; -import X2 = require("foobarx"); -const x: X = X; -const x2: X2 = X2; - -import B = require("./a"); -const b: B = new B(B.b); - -import fooLength = require("./b"); -fooLength + 1; - -//// [declarations.d.ts] -// This test is just like exportDefaultProperty, but with `export =`. - -declare namespace foo.bar { - export type X = number; - export const X: number; -} - -declare module "foobar" { - export = foo.bar; -} - -declare module "foobarx" { - export = foo.bar.X; -} - -//// [a.ts] -namespace A { - export class B { constructor(b: number) {} } - export namespace B { export const b: number = 0; } -} -export = A.B; - -//// [b.ts] -export = "foo".length; - - -/// [Declarations] //// - - - -//// [a.d.ts] -declare namespace A { - class B { - constructor(b: number); - } - namespace B { - const b: number; - } -} -declare const _default: typeof A.B; -export = _default; - -//// [b.d.ts] -declare const _default: number; -export = _default; - -//// [index.d.ts] -/// -export {}; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty2.d.ts deleted file mode 100644 index 05f294c44fbf0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportEqualsProperty2.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/compiler/exportEqualsProperty2.ts] //// - -//// [b.ts] -import B = require("./a"); -const x: B = { c: B }; - -//// [a.ts] -// This test is just like exportDefaultProperty2, but with `export =`. - -class C { - static B: number; -} -namespace C { - export interface B { c: number } -} - -export = C.B; - - -/// [Declarations] //// - - - -//// [a.d.ts] -declare const _default: number; -export = _default; - -//// [b.d.ts] -export {}; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/forwardRefInEnum.d.ts deleted file mode 100644 index 4ac6496fb637b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/forwardRefInEnum.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -//// [tests/cases/compiler/forwardRefInEnum.ts] //// - -//// [forwardRefInEnum.ts] -enum E1 { - // illegal case - // forward reference to the element of the same enum - X = Y, - X1 = E1["Y"], - // forward reference to the element of the same enum - Y = E1.Z, - Y1 = E1["Z"] -} - -enum E1 { - Z = 4 -} - - -/// [Declarations] //// - - - -//// [forwardRefInEnum.d.ts] -declare enum E1 { - X = 0, - X1 = 0, - Y = 0, - Y1 = 0 -} -declare enum E1 { - Z = 4 -} - -/// [Errors] //// - -forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -forwardRefInEnum.ts(5,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -forwardRefInEnum.ts(7,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -forwardRefInEnum.ts(8,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - - -==== forwardRefInEnum.ts (4 errors) ==== - enum E1 { - // illegal case - // forward reference to the element of the same enum - X = Y, - ~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - X1 = E1["Y"], - ~~~~~~~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - // forward reference to the element of the same enum - Y = E1.Z, - ~~~~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - Y1 = E1["Z"] - ~~~~~~~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - } - - enum E1 { - Z = 4 - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/functionImplementations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/functionImplementations.d.ts deleted file mode 100644 index 78a2619cad0e4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/functionImplementations.d.ts +++ /dev/null @@ -1,396 +0,0 @@ -//// [tests/cases/conformance/functions/functionImplementations.ts] //// - -//// [functionImplementations.ts] -// FunctionExpression with no return type annotation and no return statement returns void -var v: void = function () { } (); - -// FunctionExpression f with no return type annotation and directly references f in its body returns any -var a: any = function f() { - return f; -}; -var a: any = function f() { - return f(); -}; - -// FunctionExpression f with no return type annotation and indirectly references f in its body returns any -var a: any = function f() { - var x = f; - return x; -}; - -// Two mutually recursive function implementations with no return type annotations -function rec1(): any { - return rec2(); -} -function rec2(): any { - return rec1(); -} -var a: any = rec1(); -var a: any = rec2(); - -// Two mutually recursive function implementations with return type annotation in one -function rec3(): number { - return rec4(); -} -function rec4(): number { - return rec3(); -} -var n: number; -var n: number = rec3(); -var n: number = rec4(); - -// FunctionExpression with no return type annotation and returns a number -var n = function (): number { - return 3; -} (); - -// FunctionExpression with no return type annotation and returns null -var nu = null; -var nu = function (): any { - return null; -} (); - -// FunctionExpression with no return type annotation and returns undefined -var un = undefined; -var un = function (): any { - return undefined; -} (); - -// FunctionExpression with no return type annotation and returns a type parameter type -var n = function (x: T): T { - return x; -} (4); - -// FunctionExpression with no return type annotation and returns a constrained type parameter type -var n = function (x: T): T { - return x; -} (4); - -// FunctionExpression with no return type annotation with multiple return statements with identical types -var n = function (): 3 | 5 { - return 3; - return 5; -}(); - -// Otherwise, the inferred return type is the first of the types of the return statement expressions -// in the function body that is a supertype of each of the others, -// ignoring return statements with no expressions. -// A compile - time error occurs if no return statement expression has a type that is a supertype of each of the others. -// FunctionExpression with no return type annotation with multiple return statements with subtype relation between returns -class Base { private m; } -class Derived extends Base { private q; } -var b: Base; -var b = function (): Base { - return new Base(); return new Derived(); -} (); - -// FunctionExpression with no return type annotation with multiple return statements with one a recursive call -var a = function f(): Base { - return new Base(); return new Derived(); return f(); // ? -} (); - -// FunctionExpression with non -void return type annotation with a single throw statement -undefined === function (): number { - throw undefined; -}; - -// Type of 'this' in function implementation is 'any' -function thisFunc(): void { - var x = this; - var x: any; -} - -// Function signature with optional parameter, no type annotation and initializer has initializer's type -function opt1(n: number = 4): void { - var m = n; - var m: number; -} - -// Function signature with optional parameter, no type annotation and initializer has initializer's widened type -function opt2(n: { - x: any; - y: any; -} = { x: null, y: undefined }): void { - var m = n; - var m: { x: any; y: any }; -} - -// Function signature with initializer referencing other parameter to the left -function opt3(n: number, m: number = n): void { - var y = m; - var y: number; -} - -// Function signature with optional parameter has correct codegen -// (tested above) - -// FunctionExpression with non -void return type annotation return with no expression -function f6(): number { - return; -} - -class Derived2 extends Base { private r: string; } -class AnotherClass { private x } -// if f is a contextually typed function expression, the inferred return type is the union type -// of the types of the return statement expressions in the function body, -// ignoring return statements with no expressions. -var f7: (x: number) => string | number = x => { // should be (x: number) => number | string - if (x < 0) { return x; } - return x.toString(); -} -var f8: (x: number) => any = x => { // should be (x: number) => Base - return new Base(); - return new Derived2(); -} -var f9: (x: number) => any = x => { // should be (x: number) => Base - return new Base(); - return new Derived(); - return new Derived2(); -} -var f10: (x: number) => any = x => { // should be (x: number) => Derived | Derived1 - return new Derived(); - return new Derived2(); -} -var f11: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass - return new Base(); - return new AnotherClass(); -} -var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass - return new Base(); - return; // should be ignored - return new AnotherClass(); -} - -/// [Declarations] //// - - - -//// [functionImplementations.d.ts] -declare var v: void; -declare var a: any; -declare var a: any; -declare var a: any; -declare function rec1(): any; -declare function rec2(): any; -declare var a: any; -declare var a: any; -declare function rec3(): number; -declare function rec4(): number; -declare var n: number; -declare var n: number; -declare var n: number; -declare var n: number; -declare var nu: any; -declare var nu: any; -declare var un: any; -declare var un: any; -declare var n: number; -declare var n: number; -declare var n: number; -declare class Base { - private m; -} -declare class Derived extends Base { - private q; -} -declare var b: Base; -declare var b: Base; -declare var a: any; -declare function thisFunc(): void; -declare function opt1(n?: number): void; -declare function opt2(n?: { - x: any; - y: any; -}): void; -declare function opt3(n: number, m?: number): void; -declare function f6(): number; -declare class Derived2 extends Base { - private r; -} -declare class AnotherClass { - private x; -} -declare var f7: (x: number) => string | number; -declare var f8: (x: number) => any; -declare var f9: (x: number) => any; -declare var f10: (x: number) => any; -declare var f11: (x: number) => any; -declare var f12: (x: number) => any; - -/// [Errors] //// - -functionImplementations.ts(67,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type '3 | 5'. -functionImplementations.ts(85,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'Base'. -functionImplementations.ts(90,1): error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value. - - -==== functionImplementations.ts (3 errors) ==== - // FunctionExpression with no return type annotation and no return statement returns void - var v: void = function () { } (); - - // FunctionExpression f with no return type annotation and directly references f in its body returns any - var a: any = function f() { - return f; - }; - var a: any = function f() { - return f(); - }; - - // FunctionExpression f with no return type annotation and indirectly references f in its body returns any - var a: any = function f() { - var x = f; - return x; - }; - - // Two mutually recursive function implementations with no return type annotations - function rec1(): any { - return rec2(); - } - function rec2(): any { - return rec1(); - } - var a: any = rec1(); - var a: any = rec2(); - - // Two mutually recursive function implementations with return type annotation in one - function rec3(): number { - return rec4(); - } - function rec4(): number { - return rec3(); - } - var n: number; - var n: number = rec3(); - var n: number = rec4(); - - // FunctionExpression with no return type annotation and returns a number - var n = function (): number { - return 3; - } (); - - // FunctionExpression with no return type annotation and returns null - var nu = null; - var nu = function (): any { - return null; - } (); - - // FunctionExpression with no return type annotation and returns undefined - var un = undefined; - var un = function (): any { - return undefined; - } (); - - // FunctionExpression with no return type annotation and returns a type parameter type - var n = function (x: T): T { - return x; - } (4); - - // FunctionExpression with no return type annotation and returns a constrained type parameter type - var n = function (x: T): T { - return x; - } (4); - - // FunctionExpression with no return type annotation with multiple return statements with identical types - var n = function (): 3 | 5 { - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'n' must be of type 'number', but here has type '3 | 5'. -!!! related TS6203 functionImplementations.ts:35:5: 'n' was also declared here. - return 3; - return 5; - }(); - - // Otherwise, the inferred return type is the first of the types of the return statement expressions - // in the function body that is a supertype of each of the others, - // ignoring return statements with no expressions. - // A compile - time error occurs if no return statement expression has a type that is a supertype of each of the others. - // FunctionExpression with no return type annotation with multiple return statements with subtype relation between returns - class Base { private m; } - class Derived extends Base { private q; } - var b: Base; - var b = function (): Base { - return new Base(); return new Derived(); - } (); - - // FunctionExpression with no return type annotation with multiple return statements with one a recursive call - var a = function f(): Base { - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'Base'. -!!! related TS6203 functionImplementations.ts:5:5: 'a' was also declared here. - return new Base(); return new Derived(); return f(); // ? - } (); - - // FunctionExpression with non -void return type annotation with a single throw statement - undefined === function (): number { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - throw undefined; - ~~~~~~~~~~~~~~~~~~~~ - }; - ~ -!!! error TS2839: This condition will always return 'false' since JavaScript compares objects by reference, not value. - - // Type of 'this' in function implementation is 'any' - function thisFunc(): void { - var x = this; - var x: any; - } - - // Function signature with optional parameter, no type annotation and initializer has initializer's type - function opt1(n: number = 4): void { - var m = n; - var m: number; - } - - // Function signature with optional parameter, no type annotation and initializer has initializer's widened type - function opt2(n: { - x: any; - y: any; - } = { x: null, y: undefined }): void { - var m = n; - var m: { x: any; y: any }; - } - - // Function signature with initializer referencing other parameter to the left - function opt3(n: number, m: number = n): void { - var y = m; - var y: number; - } - - // Function signature with optional parameter has correct codegen - // (tested above) - - // FunctionExpression with non -void return type annotation return with no expression - function f6(): number { - return; - } - - class Derived2 extends Base { private r: string; } - class AnotherClass { private x } - // if f is a contextually typed function expression, the inferred return type is the union type - // of the types of the return statement expressions in the function body, - // ignoring return statements with no expressions. - var f7: (x: number) => string | number = x => { // should be (x: number) => number | string - if (x < 0) { return x; } - return x.toString(); - } - var f8: (x: number) => any = x => { // should be (x: number) => Base - return new Base(); - return new Derived2(); - } - var f9: (x: number) => any = x => { // should be (x: number) => Base - return new Base(); - return new Derived(); - return new Derived2(); - } - var f10: (x: number) => any = x => { // should be (x: number) => Derived | Derived1 - return new Derived(); - return new Derived2(); - } - var f11: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass - return new Base(); - return new AnotherClass(); - } - var f12: (x: number) => any = x => { // should be (x: number) => Base | AnotherClass - return new Base(); - return; // should be ignored - return new AnotherClass(); - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/initializersInAmbientEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/initializersInAmbientEnums.d.ts deleted file mode 100644 index 4d77a6a06a18e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/initializersInAmbientEnums.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/compiler/initializersInAmbientEnums.ts] //// - -//// [initializersInAmbientEnums.ts] -declare enum E { - a = 10, - b = a, - e = 10 << 2 * 8, -} - -/// [Declarations] //// - - - -//// [initializersInAmbientEnums.d.ts] -declare enum E { - a = 10, - b = 10, - e = 655360 -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts deleted file mode 100644 index bf039c954e35c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -//// [tests/cases/compiler/isolatedModulesGlobalNamespacesAndEnums.ts] //// - -//// [script-namespaces.ts] -namespace Instantiated { - export const x = 1; -} -namespace Uninstantiated { - export type T = number; -} -declare namespace Ambient { - export const x: number; -} - -//// [module-namespaces.ts] -export namespace Instantiated { - export const x = 1; -} - -//// [enum1.ts] -enum Enum { A, B, C } -declare enum Enum { X = 1_000_000 } -const d = 'd'; - -//// [enum2.ts] -enum Enum { - D = d, - E = A, // error - Y = X, // error - Z = Enum.A -} - -declare enum Enum { - F = A -} - -/// [Declarations] //// - - - -//// [enum1.d.ts] -declare enum Enum { - A = 0, - B = 1, - C = 2 -} -declare enum Enum { - X = 1000000 -} -declare const d = "d"; - -//// [enum2.d.ts] -declare enum Enum { - D = "d", - E = 0,// error - Y = 1000000,// error - Z = 0 -} -declare enum Enum { - F = 0 -} - -//// [module-namespaces.d.ts] -export declare namespace Instantiated { - const x = 1; -} - -//// [script-namespaces.d.ts] -declare namespace Instantiated { - const x = 1; -} -declare namespace Uninstantiated { - type T = number; -} -declare namespace Ambient { - const x: number; -} - -/// [Errors] //// - -enum2.ts(3,9): error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. -enum2.ts(4,9): error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. -script-namespaces.ts(1,11): error TS1280: Namespaces are not allowed in global script files when 'isolatedModules' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement. - - -==== script-namespaces.ts (1 errors) ==== - namespace Instantiated { - ~~~~~~~~~~~~ -!!! error TS1280: Namespaces are not allowed in global script files when 'isolatedModules' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement. - export const x = 1; - } - namespace Uninstantiated { - export type T = number; - } - declare namespace Ambient { - export const x: number; - } - -==== module-namespaces.ts (0 errors) ==== - export namespace Instantiated { - export const x = 1; - } - -==== enum1.ts (0 errors) ==== - enum Enum { A, B, C } - declare enum Enum { X = 1_000_000 } - const d = 'd'; - -==== enum2.ts (2 errors) ==== - enum Enum { - D = d, - E = A, // error - ~ -!!! error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. - Y = X, // error - ~ -!!! error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. - Z = Enum.A - } - - declare enum Enum { - F = A - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsContainerMergeTsDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsContainerMergeTsDeclaration.d.ts deleted file mode 100644 index b203843abcf8c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsContainerMergeTsDeclaration.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -//// [tests/cases/conformance/salsa/jsContainerMergeTsDeclaration.ts] //// - -//// [a.js] -var /*1*/x = function foo() { -} -x.a = function bar() { -} -//// [b.ts] -var x = function (): number { - return 1; -}(); - - -/// [Declarations] //// - - - -//// [b.d.ts] -declare var x: number; - -/// [Errors] //// - -error TS6504: File 'a.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 - - -!!! error TS6504: File 'a.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 -==== a.js (0 errors) ==== - var /*1*/x = function foo() { - } - x.a = function bar() { - } -==== b.ts (0 errors) ==== - var x = function (): number { - return 1; - }(); - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxComponentTypeErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxComponentTypeErrors.d.ts deleted file mode 100644 index 0425577ab9117..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxComponentTypeErrors.d.ts +++ /dev/null @@ -1,192 +0,0 @@ -//// [tests/cases/compiler/jsxComponentTypeErrors.tsx] //// - -//// [jsxComponentTypeErrors.tsx] -namespace JSX { - export interface Element { - type: 'element'; - } - export interface ElementClass { - type: 'element-class'; - } -} - -function FunctionComponent({type}: {type?: T}): { - type: T | undefined; -} { - return { - type - } -} -FunctionComponent.useThis = function() { - return ; -} - -class ClassComponent { - type = 'string'; -} - -const MixedComponent: typeof FunctionComponent | typeof ClassComponent = Math.random() ? FunctionComponent : ClassComponent; - -const elem1: JSX.Element = ; -const elem2: JSX.Element = />; -const elem3: JSX.Element = ; -const elem4: JSX.Element = ; - -const obj = { - MemberFunctionComponent(): {} { - return {}; - }, - MemberClassComponent: class {}, -}; - -const elem5: JSX.Element = ; -const elem6: JSX.Element = ; - - -/// [Declarations] //// - - - -//// [jsxComponentTypeErrors.d.ts] -declare namespace JSX { - interface Element { - type: 'element'; - } - interface ElementClass { - type: 'element-class'; - } -} -declare function FunctionComponent({ type }: { - type?: T; -}): { - type: T | undefined; -}; -declare namespace FunctionComponent { - var useThis: () => JSX.Element; -} -declare class ClassComponent { - type: string; -} -declare const MixedComponent: typeof FunctionComponent | typeof ClassComponent; -declare const elem1: JSX.Element; -declare const elem2: JSX.Element; -declare const elem3: JSX.Element; -declare const elem4: JSX.Element; -declare const obj: { - MemberFunctionComponent(): {}; - MemberClassComponent: { - new (): {}; - }; -}; -declare const elem5: JSX.Element; -declare const elem6: JSX.Element; - -/// [Errors] //// - -jsxComponentTypeErrors.tsx(18,11): error TS2786: 'this' cannot be used as a JSX component. - Its return type '{ type: "foo" | undefined; }' is not a valid JSX element. - Types of property 'type' are incompatible. - Type '"foo" | undefined' is not assignable to type '"element"'. - Type 'undefined' is not assignable to type '"element"'. -jsxComponentTypeErrors.tsx(27,29): error TS2786: 'FunctionComponent' cannot be used as a JSX component. - Its return type '{ type: "abc" | undefined; }' is not a valid JSX element. - Types of property 'type' are incompatible. - Type '"abc" | undefined' is not assignable to type '"element"'. - Type 'undefined' is not assignable to type '"element"'. -jsxComponentTypeErrors.tsx(28,29): error TS2786: 'FunctionComponent' cannot be used as a JSX component. - Its return type '{ type: "abc" | undefined; }' is not a valid JSX element. -jsxComponentTypeErrors.tsx(29,29): error TS2786: 'ClassComponent' cannot be used as a JSX component. - Its instance type 'ClassComponent' is not a valid JSX element. - Types of property 'type' are incompatible. - Type 'string' is not assignable to type '"element-class"'. -jsxComponentTypeErrors.tsx(30,29): error TS2786: 'MixedComponent' cannot be used as a JSX component. - Its element type 'ClassComponent | { type: string | undefined; }' is not a valid JSX element. - Type 'ClassComponent' is not assignable to type 'Element | ElementClass | null'. - Type 'ClassComponent' is not assignable to type 'Element | ElementClass'. - Type 'ClassComponent' is not assignable to type 'ElementClass'. -jsxComponentTypeErrors.tsx(39,29): error TS2786: 'obj.MemberFunctionComponent' cannot be used as a JSX component. - Its return type '{}' is not a valid JSX element. - Property 'type' is missing in type '{}' but required in type 'Element'. -jsxComponentTypeErrors.tsx(40,29): error TS2786: 'obj. MemberClassComponent' cannot be used as a JSX component. - Its instance type 'MemberClassComponent' is not a valid JSX element. - Property 'type' is missing in type 'MemberClassComponent' but required in type 'ElementClass'. - - -==== jsxComponentTypeErrors.tsx (7 errors) ==== - namespace JSX { - export interface Element { - type: 'element'; - } - export interface ElementClass { - type: 'element-class'; - } - } - - function FunctionComponent({type}: {type?: T}): { - type: T | undefined; - } { - return { - type - } - } - FunctionComponent.useThis = function() { - return ; - ~~~~ -!!! error TS2786: 'this' cannot be used as a JSX component. -!!! error TS2786: Its return type '{ type: "foo" | undefined; }' is not a valid JSX element. -!!! error TS2786: Types of property 'type' are incompatible. -!!! error TS2786: Type '"foo" | undefined' is not assignable to type '"element"'. -!!! error TS2786: Type 'undefined' is not assignable to type '"element"'. - } - - class ClassComponent { - type = 'string'; - } - - const MixedComponent: typeof FunctionComponent | typeof ClassComponent = Math.random() ? FunctionComponent : ClassComponent; - - const elem1: JSX.Element = ; - ~~~~~~~~~~~~~~~~~ -!!! error TS2786: 'FunctionComponent' cannot be used as a JSX component. -!!! error TS2786: Its return type '{ type: "abc" | undefined; }' is not a valid JSX element. -!!! error TS2786: Types of property 'type' are incompatible. -!!! error TS2786: Type '"abc" | undefined' is not assignable to type '"element"'. -!!! error TS2786: Type 'undefined' is not assignable to type '"element"'. - const elem2: JSX.Element = />; - ~~~~~~~~~~~~~~~~~ -!!! error TS2786: 'FunctionComponent' cannot be used as a JSX component. -!!! error TS2786: Its return type '{ type: "abc" | undefined; }' is not a valid JSX element. - const elem3: JSX.Element = ; - ~~~~~~~~~~~~~~ -!!! error TS2786: 'ClassComponent' cannot be used as a JSX component. -!!! error TS2786: Its instance type 'ClassComponent' is not a valid JSX element. -!!! error TS2786: Types of property 'type' are incompatible. -!!! error TS2786: Type 'string' is not assignable to type '"element-class"'. - const elem4: JSX.Element = ; - ~~~~~~~~~~~~~~ -!!! error TS2786: 'MixedComponent' cannot be used as a JSX component. -!!! error TS2786: Its element type 'ClassComponent | { type: string | undefined; }' is not a valid JSX element. -!!! error TS2786: Type 'ClassComponent' is not assignable to type 'Element | ElementClass | null'. -!!! error TS2786: Type 'ClassComponent' is not assignable to type 'Element | ElementClass'. -!!! error TS2786: Type 'ClassComponent' is not assignable to type 'ElementClass'. - - const obj = { - MemberFunctionComponent(): {} { - return {}; - }, - MemberClassComponent: class {}, - }; - - const elem5: JSX.Element = ; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2786: 'obj.MemberFunctionComponent' cannot be used as a JSX component. -!!! error TS2786: Its return type '{}' is not a valid JSX element. -!!! error TS2786: Property 'type' is missing in type '{}' but required in type 'Element'. -!!! related TS2728 jsxComponentTypeErrors.tsx:3:5: 'type' is declared here. - const elem6: JSX.Element = ; - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2786: 'obj. MemberClassComponent' cannot be used as a JSX component. -!!! error TS2786: Its instance type 'MemberClassComponent' is not a valid JSX element. -!!! error TS2786: Property 'type' is missing in type 'MemberClassComponent' but required in type 'ElementClass'. -!!! related TS2728 jsxComponentTypeErrors.tsx:6:5: 'type' is declared here. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespace.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespace.d.ts deleted file mode 100644 index 6408eee09fcca..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespace.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespace.tsx] //// - -//// [/node_modules/preact/index.d.ts] -type Defaultize = - // Distribute over unions - Props extends any // Make any properties included in Default optional - ? Partial>> & - // Include the remaining properties from Props - Pick> - : never; -export namespace JSXInternal { - interface HTMLAttributes { } - interface SVGAttributes { } - type LibraryManagedAttributes = Component extends { - defaultProps: infer Defaults; - } - ? Defaultize - : Props; - - interface IntrinsicAttributes { - key?: any; - } - - interface Element extends VNode { } - - interface ElementClass extends Component { } - - interface ElementAttributesProperty { - props: any; - } - - interface ElementChildrenAttribute { - children: any; - } - - interface IntrinsicElements { - div: HTMLAttributes; - } -} -export const Fragment: unique symbol; -export type ComponentType = {}; -export type ComponentChild = {}; -export type ComponentChildren = {}; -export type VNode = {}; -export type Attributes = {}; -export type Component = {}; -//// [/node_modules/preact/jsx-runtime/index.d.ts] -export { Fragment } from '..'; -import { - ComponentType, - ComponentChild, - ComponentChildren, - VNode, - Attributes -} from '..'; -import { JSXInternal } from '..'; - -export function jsx( - type: string, - props: JSXInternal.HTMLAttributes & - JSXInternal.SVGAttributes & - Record & { children?: ComponentChild }, - key?: string -): VNode; -export function jsx

( - type: ComponentType

, - props: Attributes & P & { children?: ComponentChild }, - key?: string -): VNode; - - -export function jsxs( - type: string, - props: JSXInternal.HTMLAttributes & - JSXInternal.SVGAttributes & - Record & { children?: ComponentChild[] }, - key?: string -): VNode; -export function jsxs

( - type: ComponentType

, - props: Attributes & P & { children?: ComponentChild[] }, - key?: string -): VNode; - - -export function jsxDEV( - type: string, - props: JSXInternal.HTMLAttributes & - JSXInternal.SVGAttributes & - Record & { children?: ComponentChildren }, - key?: string -): VNode; -export function jsxDEV

( - type: ComponentType

, - props: Attributes & P & { children?: ComponentChildren }, - key?: string -): VNode; - -export import JSX = JSXInternal; - -//// [/index.tsx] -export const Comp = () =>

; - -/// [Declarations] //// - - - -//// [/index.d.ts] -export declare const Comp: () => import("preact").JSXInternal.Element; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts deleted file mode 100644 index 09e084d8b0ee0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=preserve).d.ts +++ /dev/null @@ -1,72 +0,0 @@ -//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne.tsx] //// - -//// [/node_modules/react/index.d.ts] -export = React; -export as namespace React; - -declare namespace React {} - -declare global { - namespace JSX { - interface Element {} - interface ElementClass {} - interface ElementAttributesProperty {} - interface ElementChildrenAttribute {} - type LibraryManagedAttributes = {} - interface IntrinsicAttributes {} - interface IntrinsicClassAttributes {} - interface IntrinsicElements { - div: {} - } - } -} -//// [/node_modules/@emotion/react/jsx-runtime/index.d.ts] -export { EmotionJSX as JSX } from './jsx-namespace' - -//// [/node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts] -import 'react' - -type WithConditionalCSSProp

= 'className' extends keyof P - ? (P extends { className?: string } ? P & { css?: string } : P) - : P - -type ReactJSXElement = JSX.Element -type ReactJSXElementClass = JSX.ElementClass -type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty -type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute -type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes -type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes -type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes -type ReactJSXIntrinsicElements = JSX.IntrinsicElements - -export namespace EmotionJSX { - interface Element extends ReactJSXElement {} - interface ElementClass extends ReactJSXElementClass {} - interface ElementAttributesProperty - extends ReactJSXElementAttributesProperty {} - interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute {} - - type LibraryManagedAttributes = WithConditionalCSSProp

& - ReactJSXLibraryManagedAttributes - - interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes {} - interface IntrinsicClassAttributes - extends ReactJSXIntrinsicClassAttributes {} - - type IntrinsicElements = { - [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { - css?: string - } - } -} - -//// [/index.tsx] -export const Comp = () =>

; - - -/// [Declarations] //// - - - -//// [/index.d.ts] -export declare const Comp: () => import("@emotion/react/jsx-runtime").JSX.Element; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts deleted file mode 100644 index 09e084d8b0ee0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne(jsx=react-jsx).d.ts +++ /dev/null @@ -1,72 +0,0 @@ -//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespaceFromConfigPickedOverGlobalOne.tsx] //// - -//// [/node_modules/react/index.d.ts] -export = React; -export as namespace React; - -declare namespace React {} - -declare global { - namespace JSX { - interface Element {} - interface ElementClass {} - interface ElementAttributesProperty {} - interface ElementChildrenAttribute {} - type LibraryManagedAttributes = {} - interface IntrinsicAttributes {} - interface IntrinsicClassAttributes {} - interface IntrinsicElements { - div: {} - } - } -} -//// [/node_modules/@emotion/react/jsx-runtime/index.d.ts] -export { EmotionJSX as JSX } from './jsx-namespace' - -//// [/node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts] -import 'react' - -type WithConditionalCSSProp

= 'className' extends keyof P - ? (P extends { className?: string } ? P & { css?: string } : P) - : P - -type ReactJSXElement = JSX.Element -type ReactJSXElementClass = JSX.ElementClass -type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty -type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute -type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes -type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes -type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes -type ReactJSXIntrinsicElements = JSX.IntrinsicElements - -export namespace EmotionJSX { - interface Element extends ReactJSXElement {} - interface ElementClass extends ReactJSXElementClass {} - interface ElementAttributesProperty - extends ReactJSXElementAttributesProperty {} - interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute {} - - type LibraryManagedAttributes = WithConditionalCSSProp

& - ReactJSXLibraryManagedAttributes - - interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes {} - interface IntrinsicClassAttributes - extends ReactJSXIntrinsicClassAttributes {} - - type IntrinsicElements = { - [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { - css?: string - } - } -} - -//// [/index.tsx] -export const Comp = () =>

; - - -/// [Declarations] //// - - - -//// [/index.d.ts] -export declare const Comp: () => import("@emotion/react/jsx-runtime").JSX.Element; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts deleted file mode 100644 index 267e1b92349dd..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -//// [tests/cases/compiler/jsxNamespaceImplicitImportJSXNamespaceFromPragmaPickedOverGlobalOne.tsx] //// - -//// [/node_modules/react/index.d.ts] -export = React; -export as namespace React; - -declare namespace React { } - -declare global { - namespace JSX { - interface Element { } - interface ElementClass { } - interface ElementAttributesProperty { } - interface ElementChildrenAttribute { } - type LibraryManagedAttributes = {} - interface IntrinsicAttributes { } - interface IntrinsicClassAttributes { } - interface IntrinsicElements { - div: {} - } - } -} -//// [/node_modules/@emotion/react/jsx-runtime/index.d.ts] -export { EmotionJSX as JSX } from './jsx-namespace' - -//// [/node_modules/@emotion/react/jsx-runtime/jsx-namespace.d.ts] -import 'react' - -type WithConditionalCSSProp

= 'className' extends keyof P - ? (P extends { className?: string } ? P & { css?: string } : P) - : P - -type ReactJSXElement = JSX.Element -type ReactJSXElementClass = JSX.ElementClass -type ReactJSXElementAttributesProperty = JSX.ElementAttributesProperty -type ReactJSXElementChildrenAttribute = JSX.ElementChildrenAttribute -type ReactJSXLibraryManagedAttributes = JSX.LibraryManagedAttributes -type ReactJSXIntrinsicAttributes = JSX.IntrinsicAttributes -type ReactJSXIntrinsicClassAttributes = JSX.IntrinsicClassAttributes -type ReactJSXIntrinsicElements = JSX.IntrinsicElements - -export namespace EmotionJSX { - interface Element extends ReactJSXElement { } - interface ElementClass extends ReactJSXElementClass { } - interface ElementAttributesProperty - extends ReactJSXElementAttributesProperty { } - interface ElementChildrenAttribute extends ReactJSXElementChildrenAttribute { } - - type LibraryManagedAttributes = WithConditionalCSSProp

& - ReactJSXLibraryManagedAttributes - - interface IntrinsicAttributes extends ReactJSXIntrinsicAttributes { } - interface IntrinsicClassAttributes - extends ReactJSXIntrinsicClassAttributes { } - - type IntrinsicElements = { - [K in keyof ReactJSXIntrinsicElements]: ReactJSXIntrinsicElements[K] & { - css?: string - } - } -} - -//// [/index.tsx] -/* @jsxImportSource @emotion/react */ -export const Comp = () =>

; - - -/// [Declarations] //// - - - -//// [/index.d.ts] -export declare const Comp: () => import("@emotion/react/jsx-runtime").JSX.Element; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedDeclarations2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedDeclarations2.d.ts deleted file mode 100644 index aa87b449b28f6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedDeclarations2.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -//// [tests/cases/compiler/mergedDeclarations2.ts] //// - -//// [mergedDeclarations2.ts] -enum Foo { - b -} -enum Foo { - a = b -} - -module Foo { - export var x: any = b -} - -/// [Declarations] //// - - - -//// [mergedDeclarations2.d.ts] -declare enum Foo { - b = 0 -} -declare enum Foo { - a = 0 -} -declare namespace Foo { - var x: any; -} - -/// [Errors] //// - -mergedDeclarations2.ts(9,25): error TS2304: Cannot find name 'b'. - - -==== mergedDeclarations2.ts (1 errors) ==== - enum Foo { - b - } - enum Foo { - a = b - } - - module Foo { - export var x: any = b - ~ -!!! error TS2304: Cannot find name 'b'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedEnumDeclarationCodeGen.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedEnumDeclarationCodeGen.d.ts deleted file mode 100644 index 54f3e5857b315..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mergedEnumDeclarationCodeGen.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -//// [tests/cases/compiler/mergedEnumDeclarationCodeGen.ts] //// - -//// [mergedEnumDeclarationCodeGen.ts] -enum E { - a, - b = a -} -enum E { - c = a -} - -/// [Declarations] //// - - - -//// [mergedEnumDeclarationCodeGen.d.ts] -declare enum E { - a = 0, - b = 0 -} -declare enum E { - c = 0 -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/methodContainingLocalFunction.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/methodContainingLocalFunction.d.ts deleted file mode 100644 index d35d332218c70..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/methodContainingLocalFunction.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -//// [tests/cases/compiler/methodContainingLocalFunction.ts] //// - -//// [methodContainingLocalFunction.ts] -// The first case here (BugExhibition) caused a crash. Try with different permutations of features. -class BugExhibition { - public exhibitBug(): void { - function localFunction() { } - var x: { (): void; }; - x = localFunction; - } -} - -class BugExhibition2 { - private static get exhibitBug() { - function localFunction() { } - var x: { (): void; }; - x = localFunction; - return null; - } -} - -class BugExhibition3 { - public exhibitBug(): void { - function localGenericFunction(u?: U) { } - var x: { (): void; }; - x = localGenericFunction; - } -} - -class C { - exhibit(): void { - var funcExpr = (u?: U) => { }; - var x: { (): void; }; - x = funcExpr; - } -} - -module M { - export function exhibitBug(): void { - function localFunction() { } - var x: { (): void; }; - x = localFunction; - } -} - -enum E { - A = (() => { - function localFunction() { } - var x: { (): void; }; - x = localFunction; - return 0; - })() -} - -/// [Declarations] //// - - - -//// [methodContainingLocalFunction.d.ts] -declare class BugExhibition { - exhibitBug(): void; -} -declare class BugExhibition2 { - private static get exhibitBug(); -} -declare class BugExhibition3 { - exhibitBug(): void; -} -declare class C { - exhibit(): void; -} -declare namespace M { - function exhibitBug(): void; -} -declare enum E { - A -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mixedTypeEnumComparison.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mixedTypeEnumComparison.d.ts deleted file mode 100644 index 9e81b4b2b723c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mixedTypeEnumComparison.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -//// [tests/cases/compiler/mixedTypeEnumComparison.ts] //// - -//// [mixedTypeEnumComparison.ts] -const enum E { - S1 = "foo", - S2 = "bar", - - N1 = 1000, - N2 = 25, -} - -declare var someNumber: number - -if (someNumber > E.N2) { - someNumber = E.N2; -} - -declare const unionOfEnum: E.N1 | E.N2; - -if (someNumber > unionOfEnum) { - someNumber = E.N2; -} - -declare var someString: string - -if (someString > E.S1) { - someString = E.S2; -} - - -declare function someValue(): number; - -enum E2 { - S1 = "foo", - N1 = 1000, - C1 = someValue(), -} - -someString > E2.S1; -someNumber > E2.N1; -someNumber > E2.C1; - - -/// [Declarations] //// - - - -//// [mixedTypeEnumComparison.d.ts] -declare const enum E { - S1 = "foo", - S2 = "bar", - N1 = 1000, - N2 = 25 -} -declare var someNumber: number; -declare const unionOfEnum: E.N1 | E.N2; -declare var someString: string; -declare function someValue(): number; -declare enum E2 { - S1 = "foo", - N1 = 1000, - C1 -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationDisallowedExtensions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationDisallowedExtensions.d.ts deleted file mode 100644 index 148d64da31df8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationDisallowedExtensions.d.ts +++ /dev/null @@ -1,169 +0,0 @@ -//// [tests/cases/compiler/moduleAugmentationDisallowedExtensions.ts] //// - -//// [x0.ts] -export let a = 1; - -//// [x.ts] -namespace N1 { - export let x = 1; -} - -declare module "./observable" { - var x: number; - let y: number; - const z: number; - let {x1, y1, z0: {n}, z1: {arr: [el1, el2, el3]}}: {x1: number, y1: string, z0: {n: number}, z1: {arr: number[]} } - interface A { x } - namespace N { - export class C {} - } - class Cls {} - function foo(): number; - type T = number; - import * as all from "./x0"; - import {a} from "./x0"; - export * from "./x0"; - export {a} from "./x0"; -} - -declare module "./test" { - export = N1; -} -export {} - -//// [observable.ts] -export declare class Observable { - filter(pred: (e:T) => boolean): Observable; -} -export var x = 1; - -//// [test.ts] -export let b = 1; - -//// [main.ts] -import { Observable } from "./observable" -import "./x"; - - -/// [Declarations] //// - - - -//// [main.d.ts] -import "./x"; - -//// [observable.d.ts] -export declare class Observable { - filter(pred: (e: T) => boolean): Observable; -} -export declare var x: number; - -//// [test.d.ts] -export declare let b: number; - -//// [x.d.ts] -declare namespace N1 { - let x: number; -} -declare module "./observable" { - var x: number; - let y: number; - const z: number; - let x1: number, y1: string, n: number, el1: number, el2: number, el3: number; - interface A { - x: any; - } - namespace N { - class C { - } - } - class Cls { - } - function foo(): number; - type T = number; - export * from "./x0"; - export { a } from "./x0"; -} -declare module "./test" { - export = N1; -} -export {}; - -//// [x0.d.ts] -export declare let a: number; - -/// [Errors] //// - -x.ts(17,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. -x.ts(17,26): error TS2307: Cannot find module './x0' or its corresponding type declarations. -x.ts(18,5): error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. -x.ts(18,21): error TS2307: Cannot find module './x0' or its corresponding type declarations. -x.ts(19,5): error TS2666: Exports and export assignments are not permitted in module augmentations. -x.ts(19,19): error TS2307: Cannot find module './x0' or its corresponding type declarations. -x.ts(20,5): error TS2666: Exports and export assignments are not permitted in module augmentations. -x.ts(20,21): error TS2307: Cannot find module './x0' or its corresponding type declarations. -x.ts(24,5): error TS2666: Exports and export assignments are not permitted in module augmentations. - - -==== x0.ts (0 errors) ==== - export let a = 1; - -==== x.ts (9 errors) ==== - namespace N1 { - export let x = 1; - } - - declare module "./observable" { - var x: number; - let y: number; - const z: number; - let {x1, y1, z0: {n}, z1: {arr: [el1, el2, el3]}}: {x1: number, y1: string, z0: {n: number}, z1: {arr: number[]} } - interface A { x } - namespace N { - export class C {} - } - class Cls {} - function foo(): number; - type T = number; - import * as all from "./x0"; - ~~~~~~ -!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. - ~~~~~~ -!!! error TS2307: Cannot find module './x0' or its corresponding type declarations. - import {a} from "./x0"; - ~~~~~~ -!!! error TS2667: Imports are not permitted in module augmentations. Consider moving them to the enclosing external module. - ~~~~~~ -!!! error TS2307: Cannot find module './x0' or its corresponding type declarations. - export * from "./x0"; - ~~~~~~ -!!! error TS2666: Exports and export assignments are not permitted in module augmentations. - ~~~~~~ -!!! error TS2307: Cannot find module './x0' or its corresponding type declarations. - export {a} from "./x0"; - ~~~~~~ -!!! error TS2666: Exports and export assignments are not permitted in module augmentations. - ~~~~~~ -!!! error TS2307: Cannot find module './x0' or its corresponding type declarations. - } - - declare module "./test" { - export = N1; - ~~~~~~ -!!! error TS2666: Exports and export assignments are not permitted in module augmentations. - } - export {} - -==== observable.ts (0 errors) ==== - export declare class Observable { - filter(pred: (e:T) => boolean): Observable; - } - export var x = 1; - -==== test.ts (0 errors) ==== - export let b = 1; - -==== main.ts (0 errors) ==== - import { Observable } from "./observable" - import "./x"; - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationNoNewNames.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationNoNewNames.d.ts deleted file mode 100644 index ceaf6566bb1d5..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleAugmentationNoNewNames.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -//// [tests/cases/compiler/moduleAugmentationNoNewNames.ts] //// - -//// [map.ts] -import { Observable } from "./observable" - -(Observable.prototype).map = function() { } - -declare module "./observable" { - interface Observable { - map(proj: (e:T) => U): Observable - } - class Bar {} - let y: number, z: string; - let {a: x, b: x1}: {a: number, b: number}; - module Z {} -} - -//// [observable.ts] -export declare class Observable { - filter(pred: (e:T) => boolean): Observable; -} - -//// [main.ts] -import { Observable } from "./observable" -import "./map"; - -let x: Observable; -let y = x.map(x => x + 1); - -/// [Declarations] //// - - - -//// [main.d.ts] -import "./map"; - -//// [map.d.ts] -declare module "./observable" { - interface Observable { - map(proj: (e: T) => U): Observable; - } - class Bar { - } - let y: number, z: string; - let x: number, x1: number; - namespace Z { } -} -export {}; - -//// [observable.d.ts] -export declare class Observable { - filter(pred: (e: T) => boolean): Observable; -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/negateOperatorInvalidOperations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/negateOperatorInvalidOperations.d.ts deleted file mode 100644 index 8dbe57f282a9d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/negateOperatorInvalidOperations.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -//// [tests/cases/conformance/expressions/unaryOperators/negateOperator/negateOperatorInvalidOperations.ts] //// - -//// [negateOperatorInvalidOperations.ts] -// Unary operator - - -// operand before - -var NUMBER1 = var NUMBER: any-; //expect error - -// invalid expressions -var NUMBER2 = -(null - undefined); -var NUMBER3 = -(null - null); -var NUMBER4 = -(undefined - undefined); - -// miss operand -var NUMBER =-; - -/// [Declarations] //// - - - -//// [negateOperatorInvalidOperations.d.ts] -declare var NUMBER1: any; -declare var NUMBER: any; -declare var NUMBER2: number; -declare var NUMBER3: number; -declare var NUMBER4: number; -declare var NUMBER: any; - -/// [Errors] //// - -negateOperatorInvalidOperations.ts(4,15): error TS1109: Expression expected. -negateOperatorInvalidOperations.ts(4,30): error TS1005: ',' expected. -negateOperatorInvalidOperations.ts(4,31): error TS1109: Expression expected. -negateOperatorInvalidOperations.ts(7,17): error TS18050: The value 'null' cannot be used here. -negateOperatorInvalidOperations.ts(7,24): error TS18050: The value 'undefined' cannot be used here. -negateOperatorInvalidOperations.ts(8,17): error TS18050: The value 'null' cannot be used here. -negateOperatorInvalidOperations.ts(8,24): error TS18050: The value 'null' cannot be used here. -negateOperatorInvalidOperations.ts(9,17): error TS18050: The value 'undefined' cannot be used here. -negateOperatorInvalidOperations.ts(9,29): error TS18050: The value 'undefined' cannot be used here. -negateOperatorInvalidOperations.ts(12,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'NUMBER' must be of type 'any', but here has type 'number'. -negateOperatorInvalidOperations.ts(12,14): error TS1109: Expression expected. - - -==== negateOperatorInvalidOperations.ts (11 errors) ==== - // Unary operator - - - // operand before - - var NUMBER1 = var NUMBER: any-; //expect error - ~~~ -!!! error TS1109: Expression expected. - ~ -!!! error TS1005: ',' expected. - ~ -!!! error TS1109: Expression expected. - - // invalid expressions - var NUMBER2 = -(null - undefined); - ~~~~ -!!! error TS18050: The value 'null' cannot be used here. - ~~~~~~~~~ -!!! error TS18050: The value 'undefined' cannot be used here. - var NUMBER3 = -(null - null); - ~~~~ -!!! error TS18050: The value 'null' cannot be used here. - ~~~~ -!!! error TS18050: The value 'null' cannot be used here. - var NUMBER4 = -(undefined - undefined); - ~~~~~~~~~ -!!! error TS18050: The value 'undefined' cannot be used here. - ~~~~~~~~~ -!!! error TS18050: The value 'undefined' cannot be used here. - - // miss operand - var NUMBER =-; - ~~~~~~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'NUMBER' must be of type 'any', but here has type 'number'. -!!! related TS6203 negateOperatorInvalidOperations.ts:4:19: 'NUMBER' was also declared here. - ~ -!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/newTargetNarrowing.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/newTargetNarrowing.d.ts deleted file mode 100644 index 5330ca3f5c6a6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/newTargetNarrowing.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -//// [tests/cases/conformance/es6/newTarget/newTargetNarrowing.ts] //// - -//// [newTargetNarrowing.ts] -function foo(x: true): void { } - -function f(): void { - if (new.target.marked === true) { - foo(new.target.marked); - } -} - -f.marked = true; - - -/// [Declarations] //// - - - -//// [newTargetNarrowing.d.ts] -declare function foo(x: true): void; -declare function f(): void; -declare namespace f { - var marked: boolean; -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noImplicitAnyDestructuringVarDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noImplicitAnyDestructuringVarDeclaration.d.ts deleted file mode 100644 index 7ce8cd4b6b779..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noImplicitAnyDestructuringVarDeclaration.d.ts +++ /dev/null @@ -1,107 +0,0 @@ -//// [tests/cases/compiler/noImplicitAnyDestructuringVarDeclaration.ts] //// - -//// [noImplicitAnyDestructuringVarDeclaration.ts] -var [a], {b}, c: any, d: any; // error - -var [a1 = undefined], {b1 = null}, c1 = undefined, d1 = null; // error - -var [a2]: [any], {b2}: { b2: any }, c2: any, d2: any; - -var {b3}: { b3 }, c3: { b3 }; // error in type instead - -const dest: any[] = [undefined]; -const a4: any = dest[0]; -const dest_1 = { b4: null }; -const b4: any = dest_1.b4; -var c4 = undefined, d4 = null; // error // error // error // error - -const dest_2: any[] = []; -const temp: any = dest_2[0]; -const a5: any = temp === undefined ? undefined : dest_2[0]; // error - -/// [Declarations] //// - - - -//// [noImplicitAnyDestructuringVarDeclaration.d.ts] -declare var a: any, b: any, c: any, d: any; -declare var a1: any, b1: any, c1: any, d1: any; -declare var a2: any, b2: any, c2: any, d2: any; -declare var b3: any, c3: { - b3: any; -}; -declare const dest: any[]; -declare const a4: any; -declare const dest_1: { - b4: any; -}; -declare const b4: any; -declare var c4: any, d4: any; -declare const dest_2: any[]; -declare const temp: any; -declare const a5: any; - -/// [Errors] //// - -noImplicitAnyDestructuringVarDeclaration.ts(1,5): error TS1182: A destructuring declaration must have an initializer. -noImplicitAnyDestructuringVarDeclaration.ts(1,6): error TS7031: Binding element 'a' implicitly has an 'any' type. -noImplicitAnyDestructuringVarDeclaration.ts(1,10): error TS1182: A destructuring declaration must have an initializer. -noImplicitAnyDestructuringVarDeclaration.ts(1,11): error TS7031: Binding element 'b' implicitly has an 'any' type. -noImplicitAnyDestructuringVarDeclaration.ts(3,5): error TS1182: A destructuring declaration must have an initializer. -noImplicitAnyDestructuringVarDeclaration.ts(3,6): error TS7031: Binding element 'a1' implicitly has an 'any' type. -noImplicitAnyDestructuringVarDeclaration.ts(3,23): error TS1182: A destructuring declaration must have an initializer. -noImplicitAnyDestructuringVarDeclaration.ts(3,24): error TS7031: Binding element 'b1' implicitly has an 'any' type. -noImplicitAnyDestructuringVarDeclaration.ts(5,5): error TS1182: A destructuring declaration must have an initializer. -noImplicitAnyDestructuringVarDeclaration.ts(5,18): error TS1182: A destructuring declaration must have an initializer. -noImplicitAnyDestructuringVarDeclaration.ts(7,5): error TS1182: A destructuring declaration must have an initializer. -noImplicitAnyDestructuringVarDeclaration.ts(7,13): error TS7008: Member 'b3' implicitly has an 'any' type. -noImplicitAnyDestructuringVarDeclaration.ts(7,25): error TS7008: Member 'b3' implicitly has an 'any' type. -noImplicitAnyDestructuringVarDeclaration.ts(11,18): error TS7018: Object literal's property 'b4' implicitly has an 'any' type. - - -==== noImplicitAnyDestructuringVarDeclaration.ts (14 errors) ==== - var [a], {b}, c: any, d: any; // error - ~~~ -!!! error TS1182: A destructuring declaration must have an initializer. - ~ -!!! error TS7031: Binding element 'a' implicitly has an 'any' type. - ~~~ -!!! error TS1182: A destructuring declaration must have an initializer. - ~ -!!! error TS7031: Binding element 'b' implicitly has an 'any' type. - - var [a1 = undefined], {b1 = null}, c1 = undefined, d1 = null; // error - ~~~~~~~~~~~~~~~~ -!!! error TS1182: A destructuring declaration must have an initializer. - ~~ -!!! error TS7031: Binding element 'a1' implicitly has an 'any' type. - ~~~~~~~~~~~ -!!! error TS1182: A destructuring declaration must have an initializer. - ~~ -!!! error TS7031: Binding element 'b1' implicitly has an 'any' type. - - var [a2]: [any], {b2}: { b2: any }, c2: any, d2: any; - ~~~~ -!!! error TS1182: A destructuring declaration must have an initializer. - ~~~~ -!!! error TS1182: A destructuring declaration must have an initializer. - - var {b3}: { b3 }, c3: { b3 }; // error in type instead - ~~~~ -!!! error TS1182: A destructuring declaration must have an initializer. - ~~ -!!! error TS7008: Member 'b3' implicitly has an 'any' type. - ~~ -!!! error TS7008: Member 'b3' implicitly has an 'any' type. - - const dest: any[] = [undefined]; - const a4: any = dest[0]; - const dest_1 = { b4: null }; - ~~~~~~~~ -!!! error TS7018: Object literal's property 'b4' implicitly has an 'any' type. - const b4: any = dest_1.b4; - var c4 = undefined, d4 = null; // error // error // error // error - - const dest_2: any[] = []; - const temp: any = dest_2[0]; - const a5: any = temp === undefined ? undefined : dest_2[0]; // error \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/objectLiteralGettersAndSetters.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/objectLiteralGettersAndSetters.d.ts deleted file mode 100644 index 6fe596436a271..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/objectLiteralGettersAndSetters.d.ts +++ /dev/null @@ -1,209 +0,0 @@ -//// [tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts] //// - -//// [objectLiteralGettersAndSetters.ts] -// Get and set accessor with the same name -var sameName1a: { - a: string; -} = { get 'a'(): string { return ''; }, set a(n) { var p = n; var p: string; } }; -var sameName2a: { - 0: string; -} = { get 0.0(): string { return ''; }, set 0(n) { var p = n; var p: string; } }; -var sameName3a: { - 32: string; -} = { get 0x20(): string { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; -var sameName4a: { - "": string; -} = { get ''(): string { return ''; }, set ""(n) { var p = n; var p: string; } }; -var sameName5a: { - '\t': string; -} = { get '\t'(): string { return ''; }, set '\t'(n) { var p = n; var p: string; } }; -var sameName6a: { - a: string; -} = { get 'a'(): string { return ''; }, set a(n) { var p = n; var p: string; } }; - -// PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} -var callSig1 = { num(n: number): string { return '' } }; -var callSig1: { num: (n: number) => string; }; -var callSig2 = { num: function (n: number): string { return '' } }; -var callSig2: { num: (n: number) => string; }; -var callSig3 = { num: (n: number): string => '' }; -var callSig3: { num: (n: number) => string; }; - -// Get accessor only, type of the property is the annotated return type of the get accessor -var getter1 = { get x(): string { return undefined; } }; -var getter1: { readonly x: string; } - -// Get accessor only, type of the property is the inferred return type of the get accessor -var getter2 = { get x(): string { return ''; } }; -var getter2: { readonly x: string; } - -// Set accessor only, type of the property is the param type of the set accessor -var setter1 = { set x(n: number) { } }; -var setter1: { x: number }; - -// Set accessor only, type of the property is Any for an unannotated set accessor -var setter2: { - x: any; -} = { set x(n) { } }; -var setter2: { x: any }; - -var anyVar: any; -// Get and set accessor with matching type annotations -var sameType1: { - x: string; -} = { get x(): string { return undefined; }, set x(n: string) { } }; -var sameType2: { - x: number[]; -} = { get x(): Array { return undefined; }, set x(n: number[]) { } }; -var sameType3: { - x: any; -} = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; -var sameType4: { - x: Date; -} = { get x(): Date { return undefined; }, set x(n: Date) { } }; - -// Type of unannotated get accessor return type is the type annotation of the set accessor param -var setParamType1 = { - set n(x: (t: string) => void) { }, - get n(): (t: string) => void { return (t) => { - var p: string; - var p = t; - } - } -}; -var setParamType2: { - n: (t: string) => void; -} = { - get n() { return (t) => { - var p: string; - var p = t; - } - }, - set n(x: (t: string) => void) { } -}; - -// Type of unannotated set accessor parameter is the return type annotation of the get accessor -var getParamType1 = { - set n(x) { - var y = x; - var y: string; - }, - get n(): string { return ''; } -}; -var getParamType2: { - n: string; -} = { - get n(): string { return ''; }, - set n(x) { - var y = x; - var y: string; - } -}; - -// Type of unannotated accessors is the inferred return type of the get accessor -var getParamType3: { - n: string; -} = { - get n(): string { return ''; }, - set n(x) { - var y = x; - var y: string; - } -}; - - - -/// [Declarations] //// - - - -//// [objectLiteralGettersAndSetters.d.ts] -declare var sameName1a: { - a: string; -}; -declare var sameName2a: { - 0: string; -}; -declare var sameName3a: { - 32: string; -}; -declare var sameName4a: { - "": string; -}; -declare var sameName5a: { - '\t': string; -}; -declare var sameName6a: { - a: string; -}; -declare var callSig1: { - num(n: number): string; -}; -declare var callSig1: { - num: (n: number) => string; -}; -declare var callSig2: { - num: (n: number) => string; -}; -declare var callSig2: { - num: (n: number) => string; -}; -declare var callSig3: { - num: (n: number) => string; -}; -declare var callSig3: { - num: (n: number) => string; -}; -declare var getter1: { - readonly x: string; -}; -declare var getter1: { - readonly x: string; -}; -declare var getter2: { - readonly x: string; -}; -declare var getter2: { - readonly x: string; -}; -declare var setter1: { - x: number; -}; -declare var setter1: { - x: number; -}; -declare var setter2: { - x: any; -}; -declare var setter2: { - x: any; -}; -declare var anyVar: any; -declare var sameType1: { - x: string; -}; -declare var sameType2: { - x: number[]; -}; -declare var sameType3: { - x: any; -}; -declare var sameType4: { - x: Date; -}; -declare var setParamType1: { - get n(): (t: string) => void; - set n(x: (t: string) => void); -}; -declare var setParamType2: { - n: (t: string) => void; -}; -declare var getParamType1: { - n: string; -}; -declare var getParamType2: { - n: string; -}; -declare var getParamType3: { - n: string; -}; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/overloadingStaticFunctionsInFunctions.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/overloadingStaticFunctionsInFunctions.d.ts deleted file mode 100644 index a52d0e6e35622..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/overloadingStaticFunctionsInFunctions.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -//// [tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts] //// - -//// [overloadingStaticFunctionsInFunctions.ts] -function boo { - static test() - static test(name:string) - static test(name?:any){ } -} - -/// [Declarations] //// - - - -//// [overloadingStaticFunctionsInFunctions.d.ts] -declare function boo(): void; - -/// [Errors] //// - -overloadingStaticFunctionsInFunctions.ts(1,14): error TS1005: '(' expected. -overloadingStaticFunctionsInFunctions.ts(2,3): error TS1128: Declaration or statement expected. -overloadingStaticFunctionsInFunctions.ts(2,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. -overloadingStaticFunctionsInFunctions.ts(3,3): error TS1128: Declaration or statement expected. -overloadingStaticFunctionsInFunctions.ts(3,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. -overloadingStaticFunctionsInFunctions.ts(3,15): error TS2304: Cannot find name 'name'. -overloadingStaticFunctionsInFunctions.ts(3,19): error TS1005: ',' expected. -overloadingStaticFunctionsInFunctions.ts(3,20): error TS2693: 'string' only refers to a type, but is being used as a value here. -overloadingStaticFunctionsInFunctions.ts(4,3): error TS1128: Declaration or statement expected. -overloadingStaticFunctionsInFunctions.ts(4,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. -overloadingStaticFunctionsInFunctions.ts(4,15): error TS2304: Cannot find name 'name'. -overloadingStaticFunctionsInFunctions.ts(4,20): error TS1109: Expression expected. -overloadingStaticFunctionsInFunctions.ts(4,21): error TS2693: 'any' only refers to a type, but is being used as a value here. -overloadingStaticFunctionsInFunctions.ts(4,25): error TS1005: ';' expected. - - -==== overloadingStaticFunctionsInFunctions.ts (14 errors) ==== - function boo { - ~ -!!! error TS1005: '(' expected. - static test() - ~~~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - static test(name:string) - ~~~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - ~~~~ -!!! error TS2304: Cannot find name 'name'. - ~ -!!! error TS1005: ',' expected. - ~~~~~~ -!!! error TS2693: 'string' only refers to a type, but is being used as a value here. - static test(name?:any){ } - ~~~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - ~~~~ -!!! error TS2304: Cannot find name 'name'. - ~ -!!! error TS1109: Expression expected. - ~~~ -!!! error TS2693: 'any' only refers to a type, but is being used as a value here. - ~ -!!! error TS1005: ';' expected. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.classMethods.es2018.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.classMethods.es2018.d.ts deleted file mode 100644 index c0a0af39d7da1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.classMethods.es2018.d.ts +++ /dev/null @@ -1,490 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.classMethods.es2018.ts] //// - -//// [methodIsOk.ts] -class C1 { - async * f(): AsyncGenerator { - } -} -//// [awaitMethodNameIsOk.ts] -class C2 { - async * await(): AsyncGenerator { - } -} -//// [yieldMethodNameIsOk.ts] -class C3 { - async * yield(): AsyncGenerator { - } -} -//// [awaitParameterIsError.ts] -class C4 { - async * f(await: any): AsyncGenerator { - } -} -//// [yieldParameterIsError.ts] -class C5 { - async * f(yield: any): AsyncGenerator { - } -} -//// [awaitInParameterInitializerIsError.ts] -class C6 { - async * f(a: number = await 1): AsyncGenerator { - } -} -//// [yieldInParameterInitializerIsError.ts] -class C7 { - async * f(a: any = yield): AsyncGenerator { - } -} -//// [nestedAsyncGeneratorIsOk.ts] -class C8 { - async * f(): AsyncGenerator { - async function * g() { - } - } -} -//// [nestedFunctionDeclarationNamedYieldIsError.ts] -class C9 { - async * f(): AsyncGenerator { - function yield() { - } - } -} -//// [nestedFunctionExpressionNamedYieldIsError.ts] -class C10 { - async * f(): AsyncGenerator { - const x = function yield() { - }; - } -} -//// [nestedFunctionDeclarationNamedAwaitIsError.ts] -class C11 { - async * f(): AsyncGenerator { - function await() { - } - } -} -//// [nestedFunctionExpressionNamedAwaitIsError.ts] -class C12 { - async * f(): AsyncGenerator { - const x = function await() { - }; - } -} -//// [yieldIsOk.ts] -class C13 { - async * f(): AsyncGenerator { - yield; - } -} -//// [yieldWithValueIsOk.ts] -class C14 { - async * f(): AsyncGenerator { - yield 1; - } -} -//// [yieldStarMissingValueIsError.ts] -class C15 { - async * f(): AsyncGenerator { - yield *; - } -} -//// [yieldStarWithValueIsOk.ts] -class C16 { - async * f(): AsyncGenerator { - yield * []; - } -} -//// [awaitWithValueIsOk.ts] -class C17 { - async * f(): AsyncGenerator { - await 1; - } -} -//// [awaitMissingValueIsError.ts] -class C18 { - async * f(): AsyncGenerator { - await; - } -} -//// [awaitAsTypeIsOk.ts] -interface await {} -class C19 { - async * f(): AsyncGenerator { - let x: await; - } -} -//// [yieldAsTypeIsStrictError.ts] -interface yield {} -class C20 { - async * f(): AsyncGenerator { - let x: yield; - } -} -//// [yieldInClassComputedPropertyIsError.ts] -class C21 { - async * [yield](): AsyncGenerator { - } -} -//// [yieldInNestedComputedPropertyIsOk.ts] -class C22 { - async * f(): AsyncGenerator { - const x = { [yield]: 1 }; - } -} -//// [asyncGeneratorGetAccessorIsError.ts] -class C23 { - async * get x(): number { - return 1; - } -} -//// [asyncGeneratorSetAccessorIsError.ts] -class C24 { - async * set x(value: number): void { - } -} -//// [asyncGeneratorPropertyIsError.ts] -class C25 { - async * x = 1: any; -} - - -/// [Declarations] //// - - - -//// [asyncGeneratorGetAccessorIsError.d.ts] -declare class C23 { - get(): any; - x(): number; -} - -//// [asyncGeneratorPropertyIsError.d.ts] -declare class C25 { - x(): any; - 1: any; -} - -//// [asyncGeneratorSetAccessorIsError.d.ts] -declare class C24 { - set(): any; - x(value: number): void; -} - -//// [awaitAsTypeIsOk.d.ts] -interface await { -} -declare class C19 { - f(): AsyncGenerator; -} - -//// [awaitInParameterInitializerIsError.d.ts] -declare class C6 { - f(a?: number): AsyncGenerator; -} - -//// [awaitMethodNameIsOk.d.ts] -declare class C2 { - await(): AsyncGenerator; -} - -//// [awaitMissingValueIsError.d.ts] -declare class C18 { - f(): AsyncGenerator; -} - -//// [awaitParameterIsError.d.ts] -declare class C4 { - f(await: any): AsyncGenerator; -} - -//// [awaitWithValueIsOk.d.ts] -declare class C17 { - f(): AsyncGenerator; -} - -//// [methodIsOk.d.ts] -declare class C1 { - f(): AsyncGenerator; -} - -//// [nestedAsyncGeneratorIsOk.d.ts] -declare class C8 { - f(): AsyncGenerator; -} - -//// [nestedFunctionDeclarationNamedAwaitIsError.d.ts] -declare class C11 { - f(): AsyncGenerator; -} - -//// [nestedFunctionDeclarationNamedYieldIsError.d.ts] -declare class C9 { - f(): AsyncGenerator; -} - -//// [nestedFunctionExpressionNamedAwaitIsError.d.ts] -declare class C12 { - f(): AsyncGenerator; -} - -//// [nestedFunctionExpressionNamedYieldIsError.d.ts] -declare class C10 { - f(): AsyncGenerator; -} - -//// [yieldAsTypeIsStrictError.d.ts] -interface yield { -} -declare class C20 { - f(): AsyncGenerator; -} - -//// [yieldInClassComputedPropertyIsError.d.ts] -declare class C21 { -} - -//// [yieldInNestedComputedPropertyIsOk.d.ts] -declare class C22 { - f(): AsyncGenerator; -} - -//// [yieldInParameterInitializerIsError.d.ts] -declare class C7 { - f(a?: any): AsyncGenerator; -} - -//// [yieldIsOk.d.ts] -declare class C13 { - f(): AsyncGenerator; -} - -//// [yieldMethodNameIsOk.d.ts] -declare class C3 { - yield(): AsyncGenerator; -} - -//// [yieldParameterIsError.d.ts] -declare class C5 { - f(yield: any): AsyncGenerator; -} - -//// [yieldStarMissingValueIsError.d.ts] -declare class C15 { - f(): AsyncGenerator; -} - -//// [yieldStarWithValueIsOk.d.ts] -declare class C16 { - f(): AsyncGenerator; -} - -//// [yieldWithValueIsOk.d.ts] -declare class C14 { - f(): AsyncGenerator; -} - -/// [Errors] //// - -asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. -asyncGeneratorPropertyIsError.ts(2,15): error TS1005: '(' expected. -asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected. -awaitInParameterInitializerIsError.ts(2,27): error TS2524: 'await' expressions cannot be used in a parameter initializer. -awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected. -awaitParameterIsError.ts(2,15): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionDeclarationNamedAwaitIsError.ts(3,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionDeclarationNamedYieldIsError.ts(3,18): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. -nestedFunctionExpressionNamedAwaitIsError.ts(3,28): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionExpressionNamedYieldIsError.ts(3,28): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. -yieldAsTypeIsStrictError.ts(4,16): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. -yieldInClassComputedPropertyIsError.ts(2,14): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. -yieldInClassComputedPropertyIsError.ts(2,14): error TS2693: 'yield' only refers to a type, but is being used as a value here. -yieldInNestedComputedPropertyIsOk.ts(3,21): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -yieldInParameterInitializerIsError.ts(2,24): error TS2322: Type 'undefined' is not assignable to type 'never'. -yieldInParameterInitializerIsError.ts(2,24): error TS2523: 'yield' expressions cannot be used in a parameter initializer. -yieldParameterIsError.ts(2,15): error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. -yieldStarMissingValueIsError.ts(3,16): error TS1109: Expression expected. - - -==== methodIsOk.ts (0 errors) ==== - class C1 { - async * f(): AsyncGenerator { - } - } -==== awaitMethodNameIsOk.ts (0 errors) ==== - class C2 { - async * await(): AsyncGenerator { - } - } -==== yieldMethodNameIsOk.ts (0 errors) ==== - class C3 { - async * yield(): AsyncGenerator { - } - } -==== awaitParameterIsError.ts (1 errors) ==== - class C4 { - async * f(await: any): AsyncGenerator { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - } - } -==== yieldParameterIsError.ts (1 errors) ==== - class C5 { - async * f(yield: any): AsyncGenerator { - ~~~~~ -!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. - } - } -==== awaitInParameterInitializerIsError.ts (1 errors) ==== - class C6 { - async * f(a: number = await 1): AsyncGenerator { - ~~~~~~~ -!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. - } - } -==== yieldInParameterInitializerIsError.ts (2 errors) ==== - class C7 { - async * f(a: any = yield): AsyncGenerator { - ~~~~~ -!!! error TS2322: Type 'undefined' is not assignable to type 'never'. - ~~~~~ -!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. - } - } -==== nestedAsyncGeneratorIsOk.ts (0 errors) ==== - class C8 { - async * f(): AsyncGenerator { - async function * g() { - } - } - } -==== nestedFunctionDeclarationNamedYieldIsError.ts (1 errors) ==== - class C9 { - async * f(): AsyncGenerator { - function yield() { - ~~~~~ -!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. - } - } - } -==== nestedFunctionExpressionNamedYieldIsError.ts (1 errors) ==== - class C10 { - async * f(): AsyncGenerator { - const x = function yield() { - ~~~~~ -!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. - }; - } - } -==== nestedFunctionDeclarationNamedAwaitIsError.ts (1 errors) ==== - class C11 { - async * f(): AsyncGenerator { - function await() { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - } - } - } -==== nestedFunctionExpressionNamedAwaitIsError.ts (1 errors) ==== - class C12 { - async * f(): AsyncGenerator { - const x = function await() { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - }; - } - } -==== yieldIsOk.ts (0 errors) ==== - class C13 { - async * f(): AsyncGenerator { - yield; - } - } -==== yieldWithValueIsOk.ts (0 errors) ==== - class C14 { - async * f(): AsyncGenerator { - yield 1; - } - } -==== yieldStarMissingValueIsError.ts (1 errors) ==== - class C15 { - async * f(): AsyncGenerator { - yield *; - ~ -!!! error TS1109: Expression expected. - } - } -==== yieldStarWithValueIsOk.ts (0 errors) ==== - class C16 { - async * f(): AsyncGenerator { - yield * []; - } - } -==== awaitWithValueIsOk.ts (0 errors) ==== - class C17 { - async * f(): AsyncGenerator { - await 1; - } - } -==== awaitMissingValueIsError.ts (1 errors) ==== - class C18 { - async * f(): AsyncGenerator { - await; - ~ -!!! error TS1109: Expression expected. - } - } -==== awaitAsTypeIsOk.ts (0 errors) ==== - interface await {} - class C19 { - async * f(): AsyncGenerator { - let x: await; - } - } -==== yieldAsTypeIsStrictError.ts (1 errors) ==== - interface yield {} - class C20 { - async * f(): AsyncGenerator { - let x: yield; - ~~~~~ -!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. - } - } -==== yieldInClassComputedPropertyIsError.ts (2 errors) ==== - class C21 { - async * [yield](): AsyncGenerator { - ~~~~~ -!!! error TS1213: Identifier expected. 'yield' is a reserved word in strict mode. Class definitions are automatically in strict mode. - ~~~~~ -!!! error TS2693: 'yield' only refers to a type, but is being used as a value here. - } - } -==== yieldInNestedComputedPropertyIsOk.ts (1 errors) ==== - class C22 { - async * f(): AsyncGenerator { - const x = { [yield]: 1 }; - ~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } - } -==== asyncGeneratorGetAccessorIsError.ts (1 errors) ==== - class C23 { - async * get x(): number { - ~ -!!! error TS1005: '(' expected. - return 1; - } - } -==== asyncGeneratorSetAccessorIsError.ts (1 errors) ==== - class C24 { - async * set x(value: number): void { - ~ -!!! error TS1005: '(' expected. - } - } -==== asyncGeneratorPropertyIsError.ts (1 errors) ==== - class C25 { - async * x = 1: any; - ~ -!!! error TS1005: '(' expected. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts deleted file mode 100644 index 5d3f3849b662d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parser.asyncGenerators.objectLiteralMethods.es2018.d.ts +++ /dev/null @@ -1,466 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript2018/asyncGenerators/parser.asyncGenerators.objectLiteralMethods.es2018.ts] //// - -//// [methodIsOk.ts] -const o1 = { - async * f(): AsyncGenerator { - } -}; -//// [awaitMethodNameIsOk.ts] -const o2 = { - async * await(): AsyncGenerator { - } -}; -//// [yieldMethodNameIsOk.ts] -const o3 = { - async * yield(): AsyncGenerator { - } -}; -//// [awaitParameterIsError.ts] -const o4 = { - async * f(await: any): AsyncGenerator { - } -}; -//// [yieldParameterIsError.ts] -const o5 = { - async * f(yield: any): AsyncGenerator { - } -}; -//// [awaitInParameterInitializerIsError.ts] -const o6 = { - async * f(a: number = await 1): AsyncGenerator { - } -}; -//// [yieldInParameterInitializerIsError.ts] -const o7 = { - async * f(a: any = yield): AsyncGenerator { - } -}; -//// [nestedAsyncGeneratorIsOk.ts] -const o8 = { - async * f(): AsyncGenerator { - async function * g() { - } - } -}; -//// [nestedFunctionDeclarationNamedYieldIsError.ts] -const o9 = { - async * f(): AsyncGenerator { - function yield() { - } - } -}; -//// [nestedFunctionExpressionNamedYieldIsError.ts] -const o10 = { - async * f(): AsyncGenerator { - const x = function yield() { - }; - } -}; -//// [nestedFunctionDeclarationNamedAwaitIsError.ts] -const o11 = { - async * f(): AsyncGenerator { - function await() { - } - } -}; -//// [nestedFunctionExpressionNamedAwaitIsError.ts] -const o12 = { - async * f(): AsyncGenerator { - const x = function await() { - }; - } -}; -//// [yieldIsOk.ts] -const o13 = { - async * f(): AsyncGenerator { - yield; - } -}; -//// [yieldWithValueIsOk.ts] -const o14 = { - async * f(): AsyncGenerator { - yield 1; - } -}; -//// [yieldStarMissingValueIsError.ts] -const o15 = { - async * f(): AsyncGenerator { - yield *; - } -}; -//// [yieldStarWithValueIsOk.ts] -const o16 = { - async * f(): AsyncGenerator { - yield * []; - } -}; -//// [awaitWithValueIsOk.ts] -const o17 = { - async * f(): AsyncGenerator { - await 1; - } -}; -//// [awaitMissingValueIsError.ts] -const o18 = { - async * f(): AsyncGenerator { - await; - } -}; -//// [awaitAsTypeIsOk.ts] -interface await {} -const o19 = { - async * f(): AsyncGenerator { - let x: await; - } -}; -//// [yieldAsTypeIsOk.ts] -interface yield {} -const o20 = { - async * f(): AsyncGenerator { - let x: yield; - } -}; -//// [yieldInNestedComputedPropertyIsOk.ts] -const o21 = { - async * f(): AsyncGenerator { - const x = { [yield]: 1 }; - } -}; -//// [asyncGeneratorGetAccessorIsError.ts] -const o22 = { - async * get x(): number { - return 1; - } -}; -//// [asyncGeneratorSetAccessorIsError.ts] -const o23 = { - async * set x(value: number): void { - } -}; -//// [asyncGeneratorPropertyIsError.ts] -const o24 = { - async * x: 1; -}; - - -/// [Declarations] //// - - - -//// [asyncGeneratorGetAccessorIsError.d.ts] -declare const o22: { - get(): any; - x(): number; -}; - -//// [asyncGeneratorPropertyIsError.d.ts] -declare const o24: { - x(): 1; -}; - -//// [asyncGeneratorSetAccessorIsError.d.ts] -declare const o23: { - set(): any; - x(value: number): void; -}; - -//// [awaitAsTypeIsOk.d.ts] -interface await { -} -declare const o19: { - f(): AsyncGenerator; -}; - -//// [awaitInParameterInitializerIsError.d.ts] -declare const o6: { - f(a?: number): AsyncGenerator; -}; - -//// [awaitMethodNameIsOk.d.ts] -declare const o2: { - await(): AsyncGenerator; -}; - -//// [awaitMissingValueIsError.d.ts] -declare const o18: { - f(): AsyncGenerator; -}; - -//// [awaitParameterIsError.d.ts] -declare const o4: { - f(await: any): AsyncGenerator; -}; - -//// [awaitWithValueIsOk.d.ts] -declare const o17: { - f(): AsyncGenerator; -}; - -//// [methodIsOk.d.ts] -declare const o1: { - f(): AsyncGenerator; -}; - -//// [nestedAsyncGeneratorIsOk.d.ts] -declare const o8: { - f(): AsyncGenerator; -}; - -//// [nestedFunctionDeclarationNamedAwaitIsError.d.ts] -declare const o11: { - f(): AsyncGenerator; -}; - -//// [nestedFunctionDeclarationNamedYieldIsError.d.ts] -declare const o9: { - f(): AsyncGenerator; -}; - -//// [nestedFunctionExpressionNamedAwaitIsError.d.ts] -declare const o12: { - f(): AsyncGenerator; -}; - -//// [nestedFunctionExpressionNamedYieldIsError.d.ts] -declare const o10: { - f(): AsyncGenerator; -}; - -//// [yieldAsTypeIsOk.d.ts] -interface yield { -} -declare const o20: { - f(): AsyncGenerator; -}; - -//// [yieldInNestedComputedPropertyIsOk.d.ts] -declare const o21: { - f(): AsyncGenerator; -}; - -//// [yieldInParameterInitializerIsError.d.ts] -declare const o7: { - f(a?: any): AsyncGenerator; -}; - -//// [yieldIsOk.d.ts] -declare const o13: { - f(): AsyncGenerator; -}; - -//// [yieldMethodNameIsOk.d.ts] -declare const o3: { - yield(): AsyncGenerator; -}; - -//// [yieldParameterIsError.d.ts] -declare const o5: { - f(yield: any): AsyncGenerator; -}; - -//// [yieldStarMissingValueIsError.d.ts] -declare const o15: { - f(): AsyncGenerator; -}; - -//// [yieldStarWithValueIsOk.d.ts] -declare const o16: { - f(): AsyncGenerator; -}; - -//// [yieldWithValueIsOk.d.ts] -declare const o14: { - f(): AsyncGenerator; -}; - -/// [Errors] //// - -asyncGeneratorGetAccessorIsError.ts(2,17): error TS1005: '(' expected. -asyncGeneratorPropertyIsError.ts(2,14): error TS1005: '(' expected. -asyncGeneratorSetAccessorIsError.ts(2,17): error TS1005: '(' expected. -awaitInParameterInitializerIsError.ts(2,27): error TS2524: 'await' expressions cannot be used in a parameter initializer. -awaitMissingValueIsError.ts(3,14): error TS1109: Expression expected. -awaitParameterIsError.ts(2,15): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionDeclarationNamedAwaitIsError.ts(3,18): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionDeclarationNamedYieldIsError.ts(3,18): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -nestedFunctionExpressionNamedAwaitIsError.ts(3,28): error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. -nestedFunctionExpressionNamedYieldIsError.ts(3,28): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -yieldInNestedComputedPropertyIsOk.ts(3,21): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -yieldInParameterInitializerIsError.ts(2,24): error TS2322: Type 'undefined' is not assignable to type 'never'. -yieldInParameterInitializerIsError.ts(2,24): error TS2523: 'yield' expressions cannot be used in a parameter initializer. -yieldParameterIsError.ts(2,15): error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. -yieldStarMissingValueIsError.ts(3,16): error TS1109: Expression expected. - - -==== methodIsOk.ts (0 errors) ==== - const o1 = { - async * f(): AsyncGenerator { - } - }; -==== awaitMethodNameIsOk.ts (0 errors) ==== - const o2 = { - async * await(): AsyncGenerator { - } - }; -==== yieldMethodNameIsOk.ts (0 errors) ==== - const o3 = { - async * yield(): AsyncGenerator { - } - }; -==== awaitParameterIsError.ts (1 errors) ==== - const o4 = { - async * f(await: any): AsyncGenerator { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - } - }; -==== yieldParameterIsError.ts (1 errors) ==== - const o5 = { - async * f(yield: any): AsyncGenerator { - ~~~~~ -!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. - } - }; -==== awaitInParameterInitializerIsError.ts (1 errors) ==== - const o6 = { - async * f(a: number = await 1): AsyncGenerator { - ~~~~~~~ -!!! error TS2524: 'await' expressions cannot be used in a parameter initializer. - } - }; -==== yieldInParameterInitializerIsError.ts (2 errors) ==== - const o7 = { - async * f(a: any = yield): AsyncGenerator { - ~~~~~ -!!! error TS2322: Type 'undefined' is not assignable to type 'never'. - ~~~~~ -!!! error TS2523: 'yield' expressions cannot be used in a parameter initializer. - } - }; -==== nestedAsyncGeneratorIsOk.ts (0 errors) ==== - const o8 = { - async * f(): AsyncGenerator { - async function * g() { - } - } - }; -==== nestedFunctionDeclarationNamedYieldIsError.ts (1 errors) ==== - const o9 = { - async * f(): AsyncGenerator { - function yield() { - ~~~~~ -!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. - } - } - }; -==== nestedFunctionExpressionNamedYieldIsError.ts (1 errors) ==== - const o10 = { - async * f(): AsyncGenerator { - const x = function yield() { - ~~~~~ -!!! error TS1359: Identifier expected. 'yield' is a reserved word that cannot be used here. - }; - } - }; -==== nestedFunctionDeclarationNamedAwaitIsError.ts (1 errors) ==== - const o11 = { - async * f(): AsyncGenerator { - function await() { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - } - } - }; -==== nestedFunctionExpressionNamedAwaitIsError.ts (1 errors) ==== - const o12 = { - async * f(): AsyncGenerator { - const x = function await() { - ~~~~~ -!!! error TS1359: Identifier expected. 'await' is a reserved word that cannot be used here. - }; - } - }; -==== yieldIsOk.ts (0 errors) ==== - const o13 = { - async * f(): AsyncGenerator { - yield; - } - }; -==== yieldWithValueIsOk.ts (0 errors) ==== - const o14 = { - async * f(): AsyncGenerator { - yield 1; - } - }; -==== yieldStarMissingValueIsError.ts (1 errors) ==== - const o15 = { - async * f(): AsyncGenerator { - yield *; - ~ -!!! error TS1109: Expression expected. - } - }; -==== yieldStarWithValueIsOk.ts (0 errors) ==== - const o16 = { - async * f(): AsyncGenerator { - yield * []; - } - }; -==== awaitWithValueIsOk.ts (0 errors) ==== - const o17 = { - async * f(): AsyncGenerator { - await 1; - } - }; -==== awaitMissingValueIsError.ts (1 errors) ==== - const o18 = { - async * f(): AsyncGenerator { - await; - ~ -!!! error TS1109: Expression expected. - } - }; -==== awaitAsTypeIsOk.ts (0 errors) ==== - interface await {} - const o19 = { - async * f(): AsyncGenerator { - let x: await; - } - }; -==== yieldAsTypeIsOk.ts (0 errors) ==== - interface yield {} - const o20 = { - async * f(): AsyncGenerator { - let x: yield; - } - }; -==== yieldInNestedComputedPropertyIsOk.ts (1 errors) ==== - const o21 = { - async * f(): AsyncGenerator { - const x = { [yield]: 1 }; - ~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } - }; -==== asyncGeneratorGetAccessorIsError.ts (1 errors) ==== - const o22 = { - async * get x(): number { - ~ -!!! error TS1005: '(' expected. - return 1; - } - }; -==== asyncGeneratorSetAccessorIsError.ts (1 errors) ==== - const o23 = { - async * set x(value: number): void { - ~ -!!! error TS1005: '(' expected. - } - }; -==== asyncGeneratorPropertyIsError.ts (1 errors) ==== - const o24 = { - async * x: 1; - ~ -!!! error TS1005: '(' expected. - }; - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum1.d.ts deleted file mode 100644 index 107f6a110dd3a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum1.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum1.ts] //// - -//// [parserEnum1.ts] - export enum SignatureFlags { - None = 0, - IsIndexer = 1, - IsStringIndexer = 1 << 1, - IsNumberIndexer = 1 << 2, - } - -/// [Declarations] //// - - - -//// [parserEnum1.d.ts] -export declare enum SignatureFlags { - None = 0, - IsIndexer = 1, - IsStringIndexer = 2, - IsNumberIndexer = 4 -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum2.d.ts deleted file mode 100644 index 6805157f73588..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnum2.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnum2.ts] //// - -//// [parserEnum2.ts] - export enum SignatureFlags { - None = 0, - IsIndexer = 1, - IsStringIndexer = 1 << 1, - IsNumberIndexer = 1 << 2 - } - -/// [Declarations] //// - - - -//// [parserEnum2.d.ts] -export declare enum SignatureFlags { - None = 0, - IsIndexer = 1, - IsStringIndexer = 2, - IsNumberIndexer = 4 -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnumDeclaration6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnumDeclaration6.d.ts deleted file mode 100644 index f9182d63ced3b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEnumDeclaration6.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/EnumDeclarations/parserEnumDeclaration6.ts] //// - -//// [parserEnumDeclaration6.ts] -enum E { - A = 1, - B, - C = 1 << 1, - D, -} - -/// [Declarations] //// - - - -//// [parserEnumDeclaration6.d.ts] -declare enum E { - A = 1, - B = 2, - C = 2, - D = 3 -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction1.d.ts deleted file mode 100644 index b5a33b8e5d7e7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction1.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserEqualsGreaterThanAfterFunction1.ts] //// - -//// [parserEqualsGreaterThanAfterFunction1.ts] -function => - -/// [Declarations] //// - - - -//// [parserEqualsGreaterThanAfterFunction1.d.ts] -declare function (): any; - -/// [Errors] //// - -parserEqualsGreaterThanAfterFunction1.ts(1,10): error TS1003: Identifier expected. - - -==== parserEqualsGreaterThanAfterFunction1.ts (1 errors) ==== - function => - ~~ -!!! error TS1003: Identifier expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction2.d.ts deleted file mode 100644 index 865b191cdf306..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserEqualsGreaterThanAfterFunction2.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserEqualsGreaterThanAfterFunction2.ts] //// - -//// [parserEqualsGreaterThanAfterFunction2.ts] -function (a: any => b: any; - -/// [Declarations] //// - - - -//// [parserEqualsGreaterThanAfterFunction2.d.ts] -declare function (a: any, b: any): any; - -/// [Errors] //// - -parserEqualsGreaterThanAfterFunction2.ts(1,10): error TS1003: Identifier expected. -parserEqualsGreaterThanAfterFunction2.ts(1,18): error TS1005: ',' expected. -parserEqualsGreaterThanAfterFunction2.ts(1,27): error TS1005: ',' expected. -parserEqualsGreaterThanAfterFunction2.ts(1,28): error TS1005: ')' expected. - - -==== parserEqualsGreaterThanAfterFunction2.ts (4 errors) ==== - function (a: any => b: any; - ~ -!!! error TS1003: Identifier expected. - ~~ -!!! error TS1005: ',' expected. - ~ -!!! error TS1005: ',' expected. - -!!! error TS1005: ')' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList1.d.ts deleted file mode 100644 index fe3028eded998..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList1.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ParameterLists/parserErrorRecovery_ParameterList1.ts] //// - -//// [parserErrorRecovery_ParameterList1.ts] -function f(a: any { -}: {} - -/// [Declarations] //// - - - -//// [parserErrorRecovery_ParameterList1.d.ts] -declare function f(a: any, {}: {}): any; - -/// [Errors] //// - -parserErrorRecovery_ParameterList1.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. -parserErrorRecovery_ParameterList1.ts(1,19): error TS1005: ',' expected. -parserErrorRecovery_ParameterList1.ts(2,6): error TS1005: ')' expected. - - -==== parserErrorRecovery_ParameterList1.ts (3 errors) ==== - function f(a: any { - ~ -!!! error TS2391: Function implementation is missing or not immediately following the declaration. - ~ -!!! error TS1005: ',' expected. - }: {} - -!!! error TS1005: ')' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList2.d.ts deleted file mode 100644 index e6665d96dfa70..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserErrorRecovery_ParameterList2.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ErrorRecovery/ParameterLists/parserErrorRecovery_ParameterList2.ts] //// - -//// [parserErrorRecovery_ParameterList2.ts] -function f(a: any, { -}: {} - -/// [Declarations] //// - - - -//// [parserErrorRecovery_ParameterList2.d.ts] -declare function f(a: any, {}: {}): any; - -/// [Errors] //// - -parserErrorRecovery_ParameterList2.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration. -parserErrorRecovery_ParameterList2.ts(2,6): error TS1005: ')' expected. - - -==== parserErrorRecovery_ParameterList2.ts (2 errors) ==== - function f(a: any, { - ~ -!!! error TS2391: Function implementation is missing or not immediately following the declaration. - }: {} - -!!! error TS1005: ')' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserNoASIOnCallAfterFunctionExpression1.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserNoASIOnCallAfterFunctionExpression1.d.ts deleted file mode 100644 index 52f9111982de4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserNoASIOnCallAfterFunctionExpression1.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/parserNoASIOnCallAfterFunctionExpression1.ts] //// - -//// [parserNoASIOnCallAfterFunctionExpression1.ts] -var x = function (): void { } -(window).foo; - - -/// [Declarations] //// - - - -//// [parserNoASIOnCallAfterFunctionExpression1.d.ts] -declare var x: any; - -/// [Errors] //// - -parserNoASIOnCallAfterFunctionExpression1.ts(2,2): error TS2554: Expected 0 arguments, but got 1. -parserNoASIOnCallAfterFunctionExpression1.ts(2,15): error TS2339: Property 'foo' does not exist on type 'void'. - - -==== parserNoASIOnCallAfterFunctionExpression1.ts (2 errors) ==== - var x = function (): void { } - (window).foo; - ~~~~~~~~~~~ -!!! error TS2554: Expected 0 arguments, but got 1. - ~~~ -!!! error TS2339: Property 'foo' does not exist on type 'void'. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource10.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource10.d.ts deleted file mode 100644 index 067d8657597b2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource10.d.ts +++ /dev/null @@ -1,2188 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts] //// - -//// [parserRealSource10.ts] -// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. -// See LICENSE.txt in the project root for complete license information. - -/// - -module TypeScript { - export enum TokenID { - // Keywords - Any, - Bool, - Break, - Case, - Catch, - Class, - Const, - Continue, - Debugger, - Default, - Delete, - Do, - Else, - Enum, - Export, - Extends, - Declare, - False, - Finally, - For, - Function, - Constructor, - Get, - If, - Implements, - Import, - In, - InstanceOf, - Interface, - Let, - Module, - New, - Number, - Null, - Package, - Private, - Protected, - Public, - Return, - Set, - Static, - String, - Super, - Switch, - This, - Throw, - True, - Try, - TypeOf, - Var, - Void, - With, - While, - Yield, - // Punctuation - Semicolon, - OpenParen, - CloseParen, - OpenBracket, - CloseBracket, - OpenBrace, - CloseBrace, - Comma, - Equals, - PlusEquals, - MinusEquals, - AsteriskEquals, - SlashEquals, - PercentEquals, - AmpersandEquals, - CaretEquals, - BarEquals, - LessThanLessThanEquals, - GreaterThanGreaterThanEquals, - GreaterThanGreaterThanGreaterThanEquals, - Question, - Colon, - BarBar, - AmpersandAmpersand, - Bar, - Caret, - And, - EqualsEquals, - ExclamationEquals, - EqualsEqualsEquals, - ExclamationEqualsEquals, - LessThan, - LessThanEquals, - GreaterThan, - GreaterThanEquals, - LessThanLessThan, - GreaterThanGreaterThan, - GreaterThanGreaterThanGreaterThan, - Plus, - Minus, - Asterisk, - Slash, - Percent, - Tilde, - Exclamation, - PlusPlus, - MinusMinus, - Dot, - DotDotDot, - Error, - EndOfFile, - EqualsGreaterThan, - Identifier, - StringLiteral, - RegularExpressionLiteral, - NumberLiteral, - Whitespace, - Comment, - Lim, - LimFixed = EqualsGreaterThan, - LimKeyword = Yield, - } - - export var tokenTable: any = new TokenInfo[]; - export var nodeTypeTable: any = new string[]; - export var nodeTypeToTokTable: any = new number[]; - export var noRegexTable: any = new boolean[]; - - noRegexTable[TokenID.Identifier] = true; - noRegexTable[TokenID.StringLiteral] = true; - noRegexTable[TokenID.NumberLiteral] = true; - noRegexTable[TokenID.RegularExpressionLiteral] = true; - noRegexTable[TokenID.This] = true; - noRegexTable[TokenID.PlusPlus] = true; - noRegexTable[TokenID.MinusMinus] = true; - noRegexTable[TokenID.CloseParen] = true; - noRegexTable[TokenID.CloseBracket] = true; - noRegexTable[TokenID.CloseBrace] = true; - noRegexTable[TokenID.True] = true; - noRegexTable[TokenID.False] = true; - - export enum OperatorPrecedence { - None, - Comma, - Assignment, - Conditional, - LogicalOr, - LogicalAnd, - BitwiseOr, - BitwiseExclusiveOr, - BitwiseAnd, - Equality, - Relational, - Shift, - Additive, - Multiplicative, - Unary, - Lim - } - - export enum Reservation { - None = 0, - Javascript = 1, - JavascriptFuture = 2, - TypeScript = 4, - JavascriptFutureStrict = 8, - TypeScriptAndJS = Javascript | TypeScript, - TypeScriptAndJSFuture = JavascriptFuture | TypeScript, - TypeScriptAndJSFutureStrict = JavascriptFutureStrict | TypeScript, - } - - export class TokenInfo { - constructor (public tokenId: TokenID, public reservation: Reservation, - public binopPrecedence: number, public binopNodeType: number, - public unopPrecedence: number, public unopNodeType: number, - public text: string, public ers: ErrorRecoverySet) { } - } - - function setTokenInfo(tokenId: TokenID, reservation: number, binopPrecedence: number, - binopNodeType: number, unopPrecedence: number, unopNodeType: number, - text: string, ers: ErrorRecoverySet) { - if (tokenId !== undefined) { - tokenTable[tokenId] = new TokenInfo(tokenId, reservation, binopPrecedence, - binopNodeType, unopPrecedence, unopNodeType, text, ers); - if (binopNodeType != NodeType.None) { - nodeTypeTable[binopNodeType] = text; - nodeTypeToTokTable[binopNodeType] = tokenId; - } - if (unopNodeType != NodeType.None) { - nodeTypeTable[unopNodeType] = text; - } - } - } - - setTokenInfo(TokenID.Any, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "any", ErrorRecoverySet.PrimType); - setTokenInfo(TokenID.Bool, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "boolean", ErrorRecoverySet.PrimType); - setTokenInfo(TokenID.Break, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "break", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.Case, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "case", ErrorRecoverySet.SCase); - setTokenInfo(TokenID.Catch, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "catch", ErrorRecoverySet.Catch); - setTokenInfo(TokenID.Class, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "class", ErrorRecoverySet.TypeScriptS); - setTokenInfo(TokenID.Const, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "const", ErrorRecoverySet.Var); - setTokenInfo(TokenID.Continue, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "continue", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.Debugger, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.Debugger, "debugger", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.Default, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "default", ErrorRecoverySet.SCase); - setTokenInfo(TokenID.Delete, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Delete, "delete", ErrorRecoverySet.Prefix); - setTokenInfo(TokenID.Do, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "do", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.Else, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "else", ErrorRecoverySet.Else); - setTokenInfo(TokenID.Enum, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "enum", ErrorRecoverySet.TypeScriptS); - setTokenInfo(TokenID.Export, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "export", ErrorRecoverySet.TypeScriptS); - setTokenInfo(TokenID.Extends, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "extends", ErrorRecoverySet.None); - setTokenInfo(TokenID.Declare, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "declare", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.False, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "false", ErrorRecoverySet.RLit); - setTokenInfo(TokenID.Finally, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "finally", ErrorRecoverySet.Catch); - setTokenInfo(TokenID.For, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "for", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.Function, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "function", ErrorRecoverySet.Func); - setTokenInfo(TokenID.Constructor, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "constructor", ErrorRecoverySet.Func); - setTokenInfo(TokenID.Get, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "get", ErrorRecoverySet.Func); - setTokenInfo(TokenID.Set, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "set", ErrorRecoverySet.Func); - setTokenInfo(TokenID.If, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "if", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.Implements, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "implements", ErrorRecoverySet.None); - setTokenInfo(TokenID.Import, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "import", ErrorRecoverySet.TypeScriptS); - setTokenInfo(TokenID.In, Reservation.TypeScriptAndJS, OperatorPrecedence.Relational, NodeType.In, OperatorPrecedence.None, NodeType.None, "in", ErrorRecoverySet.None); - setTokenInfo(TokenID.InstanceOf, Reservation.TypeScriptAndJS, OperatorPrecedence.Relational, NodeType.InstOf, OperatorPrecedence.None, NodeType.None, "instanceof", ErrorRecoverySet.BinOp); - setTokenInfo(TokenID.Interface, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "interface", ErrorRecoverySet.TypeScriptS); - setTokenInfo(TokenID.Let, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "let", ErrorRecoverySet.None); - setTokenInfo(TokenID.Module, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "module", ErrorRecoverySet.TypeScriptS); - setTokenInfo(TokenID.New, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "new", ErrorRecoverySet.PreOp); - setTokenInfo(TokenID.Number, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "number", ErrorRecoverySet.PrimType); - setTokenInfo(TokenID.Null, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "null", ErrorRecoverySet.RLit); - setTokenInfo(TokenID.Package, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "package", ErrorRecoverySet.None); - setTokenInfo(TokenID.Private, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "private", ErrorRecoverySet.TypeScriptS); - setTokenInfo(TokenID.Protected, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "protected", ErrorRecoverySet.None); - setTokenInfo(TokenID.Public, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "public", ErrorRecoverySet.TypeScriptS); - setTokenInfo(TokenID.Return, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "return", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.Static, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "static", ErrorRecoverySet.None); - setTokenInfo(TokenID.String, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "string", ErrorRecoverySet.PrimType); - setTokenInfo(TokenID.Super, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "super", ErrorRecoverySet.RLit); - setTokenInfo(TokenID.Switch, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "switch", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.This, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "this", ErrorRecoverySet.RLit); - setTokenInfo(TokenID.Throw, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "throw", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.True, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "true", ErrorRecoverySet.RLit); - setTokenInfo(TokenID.Try, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "try", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.TypeOf, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Typeof, "typeof", ErrorRecoverySet.Prefix); - setTokenInfo(TokenID.Var, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "var", ErrorRecoverySet.Var); - setTokenInfo(TokenID.Void, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Void, "void", ErrorRecoverySet.Prefix); - setTokenInfo(TokenID.With, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.With, "with", ErrorRecoverySet.Stmt); - setTokenInfo(TokenID.While, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "while", ErrorRecoverySet.While); - setTokenInfo(TokenID.Yield, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "yield", ErrorRecoverySet.None); - - setTokenInfo(TokenID.Identifier, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "identifier", ErrorRecoverySet.ID); - setTokenInfo(TokenID.NumberLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "numberLiteral", ErrorRecoverySet.Literal); - setTokenInfo(TokenID.RegularExpressionLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "regex", ErrorRecoverySet.RegExp); - setTokenInfo(TokenID.StringLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "qstring", ErrorRecoverySet.Literal); - - // Non-operator non-identifier tokens - setTokenInfo(TokenID.Semicolon, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ";", ErrorRecoverySet.SColon); // ; - setTokenInfo(TokenID.CloseParen, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ")", ErrorRecoverySet.RParen); // ) - setTokenInfo(TokenID.CloseBracket, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "]", ErrorRecoverySet.RBrack); // ] - setTokenInfo(TokenID.OpenBrace, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "{", ErrorRecoverySet.LCurly); // { - setTokenInfo(TokenID.CloseBrace, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "}", ErrorRecoverySet.RCurly); // } - setTokenInfo(TokenID.DotDotDot, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "...", ErrorRecoverySet.None); // ... - - // Operator non-identifier tokens - setTokenInfo(TokenID.Comma, Reservation.None, OperatorPrecedence.Comma, NodeType.Comma, OperatorPrecedence.None, NodeType.None, ",", ErrorRecoverySet.Comma); // , - setTokenInfo(TokenID.Equals, Reservation.None, OperatorPrecedence.Assignment, NodeType.Asg, OperatorPrecedence.None, NodeType.None, "=", ErrorRecoverySet.Asg); // = - setTokenInfo(TokenID.PlusEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgAdd, OperatorPrecedence.None, NodeType.None, "+=", ErrorRecoverySet.BinOp); // += - setTokenInfo(TokenID.MinusEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgSub, OperatorPrecedence.None, NodeType.None, "-=", ErrorRecoverySet.BinOp); // -= - setTokenInfo(TokenID.AsteriskEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgMul, OperatorPrecedence.None, NodeType.None, "*=", ErrorRecoverySet.BinOp); // *= - - setTokenInfo(TokenID.SlashEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgDiv, OperatorPrecedence.None, NodeType.None, "/=", ErrorRecoverySet.BinOp); // /= - setTokenInfo(TokenID.PercentEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgMod, OperatorPrecedence.None, NodeType.None, "%=", ErrorRecoverySet.BinOp); // %= - setTokenInfo(TokenID.AmpersandEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgAnd, OperatorPrecedence.None, NodeType.None, "&=", ErrorRecoverySet.BinOp); // &= - setTokenInfo(TokenID.CaretEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgXor, OperatorPrecedence.None, NodeType.None, "^=", ErrorRecoverySet.BinOp); // ^= - setTokenInfo(TokenID.BarEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgOr, OperatorPrecedence.None, NodeType.None, "|=", ErrorRecoverySet.BinOp); // |= - setTokenInfo(TokenID.LessThanLessThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgLsh, OperatorPrecedence.None, NodeType.None, "<<=", ErrorRecoverySet.BinOp); // <<= - setTokenInfo(TokenID.GreaterThanGreaterThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgRsh, OperatorPrecedence.None, NodeType.None, ">>=", ErrorRecoverySet.BinOp); // >>= - setTokenInfo(TokenID.GreaterThanGreaterThanGreaterThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgRs2, OperatorPrecedence.None, NodeType.None, ">>>=", ErrorRecoverySet.BinOp); // >>>= - setTokenInfo(TokenID.Question, Reservation.None, OperatorPrecedence.Conditional, NodeType.ConditionalExpression, OperatorPrecedence.None, NodeType.None, "?", ErrorRecoverySet.BinOp); // ? - setTokenInfo(TokenID.Colon, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ":", ErrorRecoverySet.Colon); // : - setTokenInfo(TokenID.BarBar, Reservation.None, OperatorPrecedence.LogicalOr, NodeType.LogOr, OperatorPrecedence.None, NodeType.None, "||", ErrorRecoverySet.BinOp); // || - setTokenInfo(TokenID.AmpersandAmpersand, Reservation.None, OperatorPrecedence.LogicalAnd, NodeType.LogAnd, OperatorPrecedence.None, NodeType.None, "&&", ErrorRecoverySet.BinOp); // && - setTokenInfo(TokenID.Bar, Reservation.None, OperatorPrecedence.BitwiseOr, NodeType.Or, OperatorPrecedence.None, NodeType.None, "|", ErrorRecoverySet.BinOp); // | - setTokenInfo(TokenID.Caret, Reservation.None, OperatorPrecedence.BitwiseExclusiveOr, NodeType.Xor, OperatorPrecedence.None, NodeType.None, "^", ErrorRecoverySet.BinOp); // ^ - setTokenInfo(TokenID.And, Reservation.None, OperatorPrecedence.BitwiseAnd, NodeType.And, OperatorPrecedence.None, NodeType.None, "&", ErrorRecoverySet.BinOp); // & - setTokenInfo(TokenID.EqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Eq, OperatorPrecedence.None, NodeType.None, "==", ErrorRecoverySet.BinOp); // == - setTokenInfo(TokenID.ExclamationEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Ne, OperatorPrecedence.None, NodeType.None, "!=", ErrorRecoverySet.BinOp); // != - setTokenInfo(TokenID.EqualsEqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Eqv, OperatorPrecedence.None, NodeType.None, "===", ErrorRecoverySet.BinOp); // === - setTokenInfo(TokenID.ExclamationEqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.NEqv, OperatorPrecedence.None, NodeType.None, "!==", ErrorRecoverySet.BinOp); // !== - setTokenInfo(TokenID.LessThan, Reservation.None, OperatorPrecedence.Relational, NodeType.Lt, OperatorPrecedence.None, NodeType.None, "<", ErrorRecoverySet.BinOp); // < - setTokenInfo(TokenID.LessThanEquals, Reservation.None, OperatorPrecedence.Relational, NodeType.Le, OperatorPrecedence.None, NodeType.None, "<=", ErrorRecoverySet.BinOp); // <= - setTokenInfo(TokenID.GreaterThan, Reservation.None, OperatorPrecedence.Relational, NodeType.Gt, OperatorPrecedence.None, NodeType.None, ">", ErrorRecoverySet.BinOp); // > - setTokenInfo(TokenID.GreaterThanEquals, Reservation.None, OperatorPrecedence.Relational, NodeType.Ge, OperatorPrecedence.None, NodeType.None, ">=", ErrorRecoverySet.BinOp); // >= - setTokenInfo(TokenID.LessThanLessThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Lsh, OperatorPrecedence.None, NodeType.None, "<<", ErrorRecoverySet.BinOp); // << - setTokenInfo(TokenID.GreaterThanGreaterThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Rsh, OperatorPrecedence.None, NodeType.None, ">>", ErrorRecoverySet.BinOp); // >> - setTokenInfo(TokenID.GreaterThanGreaterThanGreaterThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Rs2, OperatorPrecedence.None, NodeType.None, ">>>", ErrorRecoverySet.BinOp); // >>> - setTokenInfo(TokenID.Plus, Reservation.None, OperatorPrecedence.Additive, NodeType.Add, OperatorPrecedence.Unary, NodeType.Pos, "+", ErrorRecoverySet.AddOp); // + - setTokenInfo(TokenID.Minus, Reservation.None, OperatorPrecedence.Additive, NodeType.Sub, OperatorPrecedence.Unary, NodeType.Neg, "-", ErrorRecoverySet.AddOp); // - - setTokenInfo(TokenID.Asterisk, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Mul, OperatorPrecedence.None, NodeType.None, "*", ErrorRecoverySet.BinOp); // * - setTokenInfo(TokenID.Slash, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Div, OperatorPrecedence.None, NodeType.None, "/", ErrorRecoverySet.BinOp); // / - setTokenInfo(TokenID.Percent, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Mod, OperatorPrecedence.None, NodeType.None, "%", ErrorRecoverySet.BinOp); // % - setTokenInfo(TokenID.Tilde, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Not, "~", ErrorRecoverySet.PreOp); // ~ - setTokenInfo(TokenID.Exclamation, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.LogNot, "!", ErrorRecoverySet.PreOp); // ! - setTokenInfo(TokenID.PlusPlus, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.IncPre, "++", ErrorRecoverySet.PreOp); // ++ - setTokenInfo(TokenID.MinusMinus, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.DecPre, "--", ErrorRecoverySet.PreOp); // -- - setTokenInfo(TokenID.OpenParen, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "(", ErrorRecoverySet.LParen); // ( - setTokenInfo(TokenID.OpenBracket, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "[", ErrorRecoverySet.LBrack); // [ - setTokenInfo(TokenID.Dot, Reservation.None, OperatorPrecedence.Unary, NodeType.None, OperatorPrecedence.None, NodeType.None, ".", ErrorRecoverySet.Dot); // . - setTokenInfo(TokenID.EndOfFile, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "", ErrorRecoverySet.EOF); // EOF - setTokenInfo(TokenID.EqualsGreaterThan, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "=>", ErrorRecoverySet.None); // => - - export function lookupToken(tokenId: TokenID): TokenInfo { - return tokenTable[tokenId]; - } - - export enum TokenClass { - Punctuation, - Keyword, - Operator, - Comment, - Whitespace, - Identifier, - Literal, - } - - export class SavedToken { - constructor (public tok: Token, public minChar: number, public limChar: number) { } - } - - export class Token { - constructor (public tokenId: TokenID) { - } - - public toString(): string { - return "token: " + this.tokenId + " " + this.getText() + " (" + (TokenID)._map[this.tokenId] + ")"; - } - - public print(line: number, outfile: any): void { - outfile.WriteLine(this.toString() + ",on line" + line); - } - - public getText(): string { - return tokenTable[this.tokenId].text; - } - - public classification(): TokenClass { - if (this.tokenId <= TokenID.LimKeyword) { - return TokenClass.Keyword; - } - else { - var tokenInfo = lookupToken(this.tokenId); - if (tokenInfo != undefined) { - if ((tokenInfo.unopNodeType != NodeType.None) || - (tokenInfo.binopNodeType != NodeType.None)) { - return TokenClass.Operator; - } - } - } - - return TokenClass.Punctuation; - } - } - - export class NumberLiteralToken extends Token { - constructor (public value: number, public hasEmptyFraction?: boolean) { - super(TokenID.NumberLiteral); - } - - public getText(): string { - return this.hasEmptyFraction ? this.value.toString() + ".0" : this.value.toString(); - } - - public classification(): TokenClass { - return TokenClass.Literal; - } - } - - export class StringLiteralToken extends Token { - constructor (public value: string) { - super(TokenID.StringLiteral); - } - - public getText(): string { - return this.value; - } - - public classification(): TokenClass { - return TokenClass.Literal; - } - } - - export class IdentifierToken extends Token { - constructor (public value: string, public hasEscapeSequence : boolean) { - super(TokenID.Identifier); - } - public getText(): string { - return this.value; - } - public classification(): TokenClass { - return TokenClass.Identifier; - } - } - - export class WhitespaceToken extends Token { - constructor (tokenId: TokenID, public value: string) { - super(tokenId); - } - - public getText(): string { - return this.value; - } - - public classification(): TokenClass { - return TokenClass.Whitespace; - } - } - - export class CommentToken extends Token { - constructor (tokenID: TokenID, public value: string, public isBlock: boolean, public startPos: number, public line: number, public endsLine: boolean) { - super(tokenID); - } - - public getText(): string { - return this.value; - } - - public classification(): TokenClass { - return TokenClass.Comment; - } - } - - export class RegularExpressionLiteralToken extends Token { - constructor(public regex: any) { - super(TokenID.RegularExpressionLiteral); - } - - public getText(): string { - return this.regex.toString(); - } - - public classification(): TokenClass { - return TokenClass.Literal; - } - } - - // TODO: new with length TokenID.LimFixed - export var staticTokens: any = new Token[]; - export function initializeStaticTokens(): void { - for (var i = 0; i <= TokenID.LimFixed; i++) { - staticTokens[i] = new Token(i); - } - } -} - -/// [Declarations] //// - - - -//// [parserRealSource10.d.ts] -declare namespace TypeScript { - enum TokenID { - Any = 0, - Bool = 1, - Break = 2, - Case = 3, - Catch = 4, - Class = 5, - Const = 6, - Continue = 7, - Debugger = 8, - Default = 9, - Delete = 10, - Do = 11, - Else = 12, - Enum = 13, - Export = 14, - Extends = 15, - Declare = 16, - False = 17, - Finally = 18, - For = 19, - Function = 20, - Constructor = 21, - Get = 22, - If = 23, - Implements = 24, - Import = 25, - In = 26, - InstanceOf = 27, - Interface = 28, - Let = 29, - Module = 30, - New = 31, - Number = 32, - Null = 33, - Package = 34, - Private = 35, - Protected = 36, - Public = 37, - Return = 38, - Set = 39, - Static = 40, - String = 41, - Super = 42, - Switch = 43, - This = 44, - Throw = 45, - True = 46, - Try = 47, - TypeOf = 48, - Var = 49, - Void = 50, - With = 51, - While = 52, - Yield = 53, - Semicolon = 54, - OpenParen = 55, - CloseParen = 56, - OpenBracket = 57, - CloseBracket = 58, - OpenBrace = 59, - CloseBrace = 60, - Comma = 61, - Equals = 62, - PlusEquals = 63, - MinusEquals = 64, - AsteriskEquals = 65, - SlashEquals = 66, - PercentEquals = 67, - AmpersandEquals = 68, - CaretEquals = 69, - BarEquals = 70, - LessThanLessThanEquals = 71, - GreaterThanGreaterThanEquals = 72, - GreaterThanGreaterThanGreaterThanEquals = 73, - Question = 74, - Colon = 75, - BarBar = 76, - AmpersandAmpersand = 77, - Bar = 78, - Caret = 79, - And = 80, - EqualsEquals = 81, - ExclamationEquals = 82, - EqualsEqualsEquals = 83, - ExclamationEqualsEquals = 84, - LessThan = 85, - LessThanEquals = 86, - GreaterThan = 87, - GreaterThanEquals = 88, - LessThanLessThan = 89, - GreaterThanGreaterThan = 90, - GreaterThanGreaterThanGreaterThan = 91, - Plus = 92, - Minus = 93, - Asterisk = 94, - Slash = 95, - Percent = 96, - Tilde = 97, - Exclamation = 98, - PlusPlus = 99, - MinusMinus = 100, - Dot = 101, - DotDotDot = 102, - Error = 103, - EndOfFile = 104, - EqualsGreaterThan = 105, - Identifier = 106, - StringLiteral = 107, - RegularExpressionLiteral = 108, - NumberLiteral = 109, - Whitespace = 110, - Comment = 111, - Lim = 112, - LimFixed = 105, - LimKeyword = 53 - } - var tokenTable: any; - var nodeTypeTable: any; - var nodeTypeToTokTable: any; - var noRegexTable: any; - enum OperatorPrecedence { - None = 0, - Comma = 1, - Assignment = 2, - Conditional = 3, - LogicalOr = 4, - LogicalAnd = 5, - BitwiseOr = 6, - BitwiseExclusiveOr = 7, - BitwiseAnd = 8, - Equality = 9, - Relational = 10, - Shift = 11, - Additive = 12, - Multiplicative = 13, - Unary = 14, - Lim = 15 - } - enum Reservation { - None = 0, - Javascript = 1, - JavascriptFuture = 2, - TypeScript = 4, - JavascriptFutureStrict = 8, - TypeScriptAndJS = 5, - TypeScriptAndJSFuture = 6, - TypeScriptAndJSFutureStrict = 12 - } - class TokenInfo { - tokenId: TokenID; - reservation: Reservation; - binopPrecedence: number; - binopNodeType: number; - unopPrecedence: number; - unopNodeType: number; - text: string; - ers: ErrorRecoverySet; - constructor(tokenId: TokenID, reservation: Reservation, binopPrecedence: number, binopNodeType: number, unopPrecedence: number, unopNodeType: number, text: string, ers: ErrorRecoverySet); - } - function lookupToken(tokenId: TokenID): TokenInfo; - enum TokenClass { - Punctuation = 0, - Keyword = 1, - Operator = 2, - Comment = 3, - Whitespace = 4, - Identifier = 5, - Literal = 6 - } - class SavedToken { - tok: Token; - minChar: number; - limChar: number; - constructor(tok: Token, minChar: number, limChar: number); - } - class Token { - tokenId: TokenID; - constructor(tokenId: TokenID); - toString(): string; - print(line: number, outfile: any): void; - getText(): string; - classification(): TokenClass; - } - class NumberLiteralToken extends Token { - value: number; - hasEmptyFraction?: boolean; - constructor(value: number, hasEmptyFraction?: boolean); - getText(): string; - classification(): TokenClass; - } - class StringLiteralToken extends Token { - value: string; - constructor(value: string); - getText(): string; - classification(): TokenClass; - } - class IdentifierToken extends Token { - value: string; - hasEscapeSequence: boolean; - constructor(value: string, hasEscapeSequence: boolean); - getText(): string; - classification(): TokenClass; - } - class WhitespaceToken extends Token { - value: string; - constructor(tokenId: TokenID, value: string); - getText(): string; - classification(): TokenClass; - } - class CommentToken extends Token { - value: string; - isBlock: boolean; - startPos: number; - line: number; - endsLine: boolean; - constructor(tokenID: TokenID, value: string, isBlock: boolean, startPos: number, line: number, endsLine: boolean); - getText(): string; - classification(): TokenClass; - } - class RegularExpressionLiteralToken extends Token { - regex: any; - constructor(regex: any); - getText(): string; - classification(): TokenClass; - } - var staticTokens: any; - function initializeStaticTokens(): void; -} - -/// [Errors] //// - -parserRealSource10.ts(4,21): error TS6053: File 'typescript.ts' not found. -parserRealSource10.ts(127,38): error TS2449: Class 'TokenInfo' used before its declaration. -parserRealSource10.ts(127,48): error TS1011: An element access expression should take an argument. -parserRealSource10.ts(128,41): error TS2693: 'string' only refers to a type, but is being used as a value here. -parserRealSource10.ts(128,48): error TS1011: An element access expression should take an argument. -parserRealSource10.ts(129,46): error TS2693: 'number' only refers to a type, but is being used as a value here. -parserRealSource10.ts(129,53): error TS1011: An element access expression should take an argument. -parserRealSource10.ts(130,40): error TS2693: 'boolean' only refers to a type, but is being used as a value here. -parserRealSource10.ts(130,48): error TS1011: An element access expression should take an argument. -parserRealSource10.ts(179,54): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(179,54): error TS4063: Parameter 'ers' of constructor from exported class has or is using private name 'ErrorRecoverySet'. -parserRealSource10.ts(184,28): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(188,34): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(192,33): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(198,80): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(198,120): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(198,142): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(199,81): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(199,121): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(199,147): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(200,87): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(200,127): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(200,151): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(201,86): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(201,126): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(201,149): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(202,87): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(202,127): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(202,151): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(203,93): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(203,133): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(203,157): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(204,93): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(204,133): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(204,157): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(205,90): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(205,130): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(205,157): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(206,90): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(206,130): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(206,161): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(207,89): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(207,129): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(207,155): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(208,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(208,129): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(208,156): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(209,84): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(209,124): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(209,145): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(210,86): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(210,126): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(210,149): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(211,92): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(211,132): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(211,155): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(212,94): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(212,134): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(212,159): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(213,95): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(213,135): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(213,161): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(214,84): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(214,124): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(214,150): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(215,87): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(215,127): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(215,151): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(216,89): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(216,129): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(216,155): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(217,85): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(217,125): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(217,147): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(218,90): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(218,130): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(218,157): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(219,105): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(219,145): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(219,175): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(220,80): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(220,120): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(220,142): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(221,80): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(221,120): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(221,142): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(222,84): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(222,124): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(222,145): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(223,104): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(223,144): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(223,173): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(224,94): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(224,134): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(224,159): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(225,90): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(225,128): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(225,149): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(226,98): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(226,140): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(226,169): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(227,103): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(227,143): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(227,171): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(228,92): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(228,132): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(228,154): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(229,83): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(229,123): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(229,148): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(230,85): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(230,125): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(230,147): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(231,83): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(231,123): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(231,148): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(232,86): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(232,126): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(232,149): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(233,96): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(233,136): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(233,162): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(234,101): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(234,141): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(234,167): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(235,98): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(235,138): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(235,166): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(236,100): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(236,140): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(236,165): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(237,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(237,128): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(237,153): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(238,100): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(238,140): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(238,165): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(239,83): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(239,123): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(239,148): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(240,93): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(240,133): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(240,157): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(241,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(241,128): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(241,153): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(242,86): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(242,126): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(242,149): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(243,87): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(243,127): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(243,151): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(244,86): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(244,126): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(244,149): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(245,85): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(245,125): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(245,147): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(246,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(246,129): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(246,156): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(247,85): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(247,125): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(247,147): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(248,86): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(248,127): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(248,150): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(249,86): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(249,126): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(249,149): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(250,87): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(250,127): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(250,151): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(251,94): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(251,134): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(251,158): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(253,81): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(253,121): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(253,150): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(254,84): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(254,124): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(254,156): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(255,95): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(255,135): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(255,159): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(256,84): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(256,124): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(256,150): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(259,80): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(259,120): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(259,140): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(260,81): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(260,121): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(260,141): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(261,83): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(261,123): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(261,143): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(262,80): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(262,120): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(262,140): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(263,81): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(263,121): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(263,141): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(264,80): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(264,120): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(264,142): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(267,77): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(267,118): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(267,138): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(268,83): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(268,122): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(268,142): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(269,87): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(269,129): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(269,150): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(270,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(270,130): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(270,151): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(271,91): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(271,133): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(271,154): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(273,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(273,130): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(273,151): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(274,90): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(274,132): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(274,153): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(275,92): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(275,134): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(275,155): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(276,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(276,130): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(276,151): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(277,86): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(277,127): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(277,148): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(278,99): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(278,141): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(278,163): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(279,105): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(279,147): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(279,169): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(280,116): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(280,158): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(280,181): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(281,86): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(281,143): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(281,163): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(282,76): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(282,116): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(282,136): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(283,82): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(283,123): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(283,144): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(284,95): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(284,137): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(284,158): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(285,79): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(285,117): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(285,137): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(286,90): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(286,129): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(286,149): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(287,80): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(287,119): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(287,139): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(288,87): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(288,125): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(288,146): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(289,92): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(289,130): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(289,151): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(290,93): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(290,132): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(290,154): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(291,98): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(291,138): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(291,160): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(292,85): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(292,123): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(292,143): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(293,91): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(293,129): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(293,150): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(294,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(294,126): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(294,146): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(295,94): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(295,132): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(295,153): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(296,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(296,127): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(296,148): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(297,94): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(297,133): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(297,154): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(298,105): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(298,144): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(298,166): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(299,79): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(299,119): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(299,138): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(300,80): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(300,120): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(300,139): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(301,89): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(301,128): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(301,148): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(302,86): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(302,125): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(302,145): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(303,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(303,127): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(303,147): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(304,76): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(304,117): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(304,136): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(305,82): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(305,123): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(305,145): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(306,79): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(306,120): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(306,143): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(307,81): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(307,122): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(307,145): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(308,80): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(308,120): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(308,140): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(309,82): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(309,122): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(309,142): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(310,75): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(310,115): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(310,135): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(311,80): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(311,120): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(311,144): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(312,88): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(312,128): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(312,149): error TS2304: Cannot find name 'ErrorRecoverySet'. -parserRealSource10.ts(355,52): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(356,53): error TS2304: Cannot find name 'NodeType'. -parserRealSource10.ts(449,46): error TS1011: An element access expression should take an argument. - - -==== parserRealSource10.ts (344 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// - ~~~~~~~~~~~~~ -!!! error TS6053: File 'typescript.ts' not found. - - module TypeScript { - export enum TokenID { - // Keywords - Any, - Bool, - Break, - Case, - Catch, - Class, - Const, - Continue, - Debugger, - Default, - Delete, - Do, - Else, - Enum, - Export, - Extends, - Declare, - False, - Finally, - For, - Function, - Constructor, - Get, - If, - Implements, - Import, - In, - InstanceOf, - Interface, - Let, - Module, - New, - Number, - Null, - Package, - Private, - Protected, - Public, - Return, - Set, - Static, - String, - Super, - Switch, - This, - Throw, - True, - Try, - TypeOf, - Var, - Void, - With, - While, - Yield, - // Punctuation - Semicolon, - OpenParen, - CloseParen, - OpenBracket, - CloseBracket, - OpenBrace, - CloseBrace, - Comma, - Equals, - PlusEquals, - MinusEquals, - AsteriskEquals, - SlashEquals, - PercentEquals, - AmpersandEquals, - CaretEquals, - BarEquals, - LessThanLessThanEquals, - GreaterThanGreaterThanEquals, - GreaterThanGreaterThanGreaterThanEquals, - Question, - Colon, - BarBar, - AmpersandAmpersand, - Bar, - Caret, - And, - EqualsEquals, - ExclamationEquals, - EqualsEqualsEquals, - ExclamationEqualsEquals, - LessThan, - LessThanEquals, - GreaterThan, - GreaterThanEquals, - LessThanLessThan, - GreaterThanGreaterThan, - GreaterThanGreaterThanGreaterThan, - Plus, - Minus, - Asterisk, - Slash, - Percent, - Tilde, - Exclamation, - PlusPlus, - MinusMinus, - Dot, - DotDotDot, - Error, - EndOfFile, - EqualsGreaterThan, - Identifier, - StringLiteral, - RegularExpressionLiteral, - NumberLiteral, - Whitespace, - Comment, - Lim, - LimFixed = EqualsGreaterThan, - LimKeyword = Yield, - } - - export var tokenTable: any = new TokenInfo[]; - ~~~~~~~~~ -!!! error TS2449: Class 'TokenInfo' used before its declaration. -!!! related TS2728 parserRealSource10.ts:175:18: 'TokenInfo' is declared here. - -!!! error TS1011: An element access expression should take an argument. - export var nodeTypeTable: any = new string[]; - ~~~~~~ -!!! error TS2693: 'string' only refers to a type, but is being used as a value here. - -!!! error TS1011: An element access expression should take an argument. - export var nodeTypeToTokTable: any = new number[]; - ~~~~~~ -!!! error TS2693: 'number' only refers to a type, but is being used as a value here. - -!!! error TS1011: An element access expression should take an argument. - export var noRegexTable: any = new boolean[]; - ~~~~~~~ -!!! error TS2693: 'boolean' only refers to a type, but is being used as a value here. - -!!! error TS1011: An element access expression should take an argument. - - noRegexTable[TokenID.Identifier] = true; - noRegexTable[TokenID.StringLiteral] = true; - noRegexTable[TokenID.NumberLiteral] = true; - noRegexTable[TokenID.RegularExpressionLiteral] = true; - noRegexTable[TokenID.This] = true; - noRegexTable[TokenID.PlusPlus] = true; - noRegexTable[TokenID.MinusMinus] = true; - noRegexTable[TokenID.CloseParen] = true; - noRegexTable[TokenID.CloseBracket] = true; - noRegexTable[TokenID.CloseBrace] = true; - noRegexTable[TokenID.True] = true; - noRegexTable[TokenID.False] = true; - - export enum OperatorPrecedence { - None, - Comma, - Assignment, - Conditional, - LogicalOr, - LogicalAnd, - BitwiseOr, - BitwiseExclusiveOr, - BitwiseAnd, - Equality, - Relational, - Shift, - Additive, - Multiplicative, - Unary, - Lim - } - - export enum Reservation { - None = 0, - Javascript = 1, - JavascriptFuture = 2, - TypeScript = 4, - JavascriptFutureStrict = 8, - TypeScriptAndJS = Javascript | TypeScript, - TypeScriptAndJSFuture = JavascriptFuture | TypeScript, - TypeScriptAndJSFutureStrict = JavascriptFutureStrict | TypeScript, - } - - export class TokenInfo { - constructor (public tokenId: TokenID, public reservation: Reservation, - public binopPrecedence: number, public binopNodeType: number, - public unopPrecedence: number, public unopNodeType: number, - public text: string, public ers: ErrorRecoverySet) { } - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - ~~~~~~~~~~~~~~~~ -!!! error TS4063: Parameter 'ers' of constructor from exported class has or is using private name 'ErrorRecoverySet'. - } - - function setTokenInfo(tokenId: TokenID, reservation: number, binopPrecedence: number, - binopNodeType: number, unopPrecedence: number, unopNodeType: number, - text: string, ers: ErrorRecoverySet) { - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - if (tokenId !== undefined) { - tokenTable[tokenId] = new TokenInfo(tokenId, reservation, binopPrecedence, - binopNodeType, unopPrecedence, unopNodeType, text, ers); - if (binopNodeType != NodeType.None) { - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - nodeTypeTable[binopNodeType] = text; - nodeTypeToTokTable[binopNodeType] = tokenId; - } - if (unopNodeType != NodeType.None) { - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - nodeTypeTable[unopNodeType] = text; - } - } - } - - setTokenInfo(TokenID.Any, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "any", ErrorRecoverySet.PrimType); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Bool, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "boolean", ErrorRecoverySet.PrimType); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Break, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "break", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Case, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "case", ErrorRecoverySet.SCase); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Catch, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "catch", ErrorRecoverySet.Catch); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Class, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "class", ErrorRecoverySet.TypeScriptS); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Const, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "const", ErrorRecoverySet.Var); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Continue, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "continue", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Debugger, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.Debugger, "debugger", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Default, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "default", ErrorRecoverySet.SCase); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Delete, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Delete, "delete", ErrorRecoverySet.Prefix); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Do, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "do", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Else, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "else", ErrorRecoverySet.Else); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Enum, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "enum", ErrorRecoverySet.TypeScriptS); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Export, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "export", ErrorRecoverySet.TypeScriptS); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Extends, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "extends", ErrorRecoverySet.None); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Declare, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "declare", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.False, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "false", ErrorRecoverySet.RLit); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Finally, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "finally", ErrorRecoverySet.Catch); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.For, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "for", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Function, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "function", ErrorRecoverySet.Func); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Constructor, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "constructor", ErrorRecoverySet.Func); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Get, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "get", ErrorRecoverySet.Func); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Set, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "set", ErrorRecoverySet.Func); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.If, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "if", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Implements, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "implements", ErrorRecoverySet.None); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Import, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "import", ErrorRecoverySet.TypeScriptS); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.In, Reservation.TypeScriptAndJS, OperatorPrecedence.Relational, NodeType.In, OperatorPrecedence.None, NodeType.None, "in", ErrorRecoverySet.None); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.InstanceOf, Reservation.TypeScriptAndJS, OperatorPrecedence.Relational, NodeType.InstOf, OperatorPrecedence.None, NodeType.None, "instanceof", ErrorRecoverySet.BinOp); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Interface, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "interface", ErrorRecoverySet.TypeScriptS); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Let, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "let", ErrorRecoverySet.None); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Module, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "module", ErrorRecoverySet.TypeScriptS); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.New, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "new", ErrorRecoverySet.PreOp); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Number, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "number", ErrorRecoverySet.PrimType); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Null, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "null", ErrorRecoverySet.RLit); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Package, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "package", ErrorRecoverySet.None); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Private, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "private", ErrorRecoverySet.TypeScriptS); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Protected, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "protected", ErrorRecoverySet.None); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Public, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "public", ErrorRecoverySet.TypeScriptS); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Return, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "return", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Static, Reservation.TypeScriptAndJSFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "static", ErrorRecoverySet.None); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.String, Reservation.TypeScript, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "string", ErrorRecoverySet.PrimType); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Super, Reservation.TypeScriptAndJSFuture, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "super", ErrorRecoverySet.RLit); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Switch, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "switch", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.This, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "this", ErrorRecoverySet.RLit); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Throw, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "throw", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.True, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "true", ErrorRecoverySet.RLit); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Try, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "try", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.TypeOf, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Typeof, "typeof", ErrorRecoverySet.Prefix); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Var, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "var", ErrorRecoverySet.Var); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Void, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Void, "void", ErrorRecoverySet.Prefix); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.With, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.With, "with", ErrorRecoverySet.Stmt); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.While, Reservation.TypeScriptAndJS, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "while", ErrorRecoverySet.While); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Yield, Reservation.JavascriptFutureStrict, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "yield", ErrorRecoverySet.None); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - - setTokenInfo(TokenID.Identifier, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "identifier", ErrorRecoverySet.ID); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.NumberLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "numberLiteral", ErrorRecoverySet.Literal); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.RegularExpressionLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "regex", ErrorRecoverySet.RegExp); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.StringLiteral, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "qstring", ErrorRecoverySet.Literal); - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - - // Non-operator non-identifier tokens - setTokenInfo(TokenID.Semicolon, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ";", ErrorRecoverySet.SColon); // ; - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.CloseParen, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ")", ErrorRecoverySet.RParen); // ) - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.CloseBracket, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "]", ErrorRecoverySet.RBrack); // ] - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.OpenBrace, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "{", ErrorRecoverySet.LCurly); // { - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.CloseBrace, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "}", ErrorRecoverySet.RCurly); // } - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.DotDotDot, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "...", ErrorRecoverySet.None); // ... - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - - // Operator non-identifier tokens - setTokenInfo(TokenID.Comma, Reservation.None, OperatorPrecedence.Comma, NodeType.Comma, OperatorPrecedence.None, NodeType.None, ",", ErrorRecoverySet.Comma); // , - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Equals, Reservation.None, OperatorPrecedence.Assignment, NodeType.Asg, OperatorPrecedence.None, NodeType.None, "=", ErrorRecoverySet.Asg); // = - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.PlusEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgAdd, OperatorPrecedence.None, NodeType.None, "+=", ErrorRecoverySet.BinOp); // += - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.MinusEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgSub, OperatorPrecedence.None, NodeType.None, "-=", ErrorRecoverySet.BinOp); // -= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.AsteriskEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgMul, OperatorPrecedence.None, NodeType.None, "*=", ErrorRecoverySet.BinOp); // *= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - - setTokenInfo(TokenID.SlashEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgDiv, OperatorPrecedence.None, NodeType.None, "/=", ErrorRecoverySet.BinOp); // /= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.PercentEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgMod, OperatorPrecedence.None, NodeType.None, "%=", ErrorRecoverySet.BinOp); // %= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.AmpersandEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgAnd, OperatorPrecedence.None, NodeType.None, "&=", ErrorRecoverySet.BinOp); // &= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.CaretEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgXor, OperatorPrecedence.None, NodeType.None, "^=", ErrorRecoverySet.BinOp); // ^= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.BarEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgOr, OperatorPrecedence.None, NodeType.None, "|=", ErrorRecoverySet.BinOp); // |= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.LessThanLessThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgLsh, OperatorPrecedence.None, NodeType.None, "<<=", ErrorRecoverySet.BinOp); // <<= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.GreaterThanGreaterThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgRsh, OperatorPrecedence.None, NodeType.None, ">>=", ErrorRecoverySet.BinOp); // >>= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.GreaterThanGreaterThanGreaterThanEquals, Reservation.None, OperatorPrecedence.Assignment, NodeType.AsgRs2, OperatorPrecedence.None, NodeType.None, ">>>=", ErrorRecoverySet.BinOp); // >>>= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Question, Reservation.None, OperatorPrecedence.Conditional, NodeType.ConditionalExpression, OperatorPrecedence.None, NodeType.None, "?", ErrorRecoverySet.BinOp); // ? - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Colon, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, ":", ErrorRecoverySet.Colon); // : - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.BarBar, Reservation.None, OperatorPrecedence.LogicalOr, NodeType.LogOr, OperatorPrecedence.None, NodeType.None, "||", ErrorRecoverySet.BinOp); // || - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.AmpersandAmpersand, Reservation.None, OperatorPrecedence.LogicalAnd, NodeType.LogAnd, OperatorPrecedence.None, NodeType.None, "&&", ErrorRecoverySet.BinOp); // && - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Bar, Reservation.None, OperatorPrecedence.BitwiseOr, NodeType.Or, OperatorPrecedence.None, NodeType.None, "|", ErrorRecoverySet.BinOp); // | - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Caret, Reservation.None, OperatorPrecedence.BitwiseExclusiveOr, NodeType.Xor, OperatorPrecedence.None, NodeType.None, "^", ErrorRecoverySet.BinOp); // ^ - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.And, Reservation.None, OperatorPrecedence.BitwiseAnd, NodeType.And, OperatorPrecedence.None, NodeType.None, "&", ErrorRecoverySet.BinOp); // & - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.EqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Eq, OperatorPrecedence.None, NodeType.None, "==", ErrorRecoverySet.BinOp); // == - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.ExclamationEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Ne, OperatorPrecedence.None, NodeType.None, "!=", ErrorRecoverySet.BinOp); // != - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.EqualsEqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.Eqv, OperatorPrecedence.None, NodeType.None, "===", ErrorRecoverySet.BinOp); // === - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.ExclamationEqualsEquals, Reservation.None, OperatorPrecedence.Equality, NodeType.NEqv, OperatorPrecedence.None, NodeType.None, "!==", ErrorRecoverySet.BinOp); // !== - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.LessThan, Reservation.None, OperatorPrecedence.Relational, NodeType.Lt, OperatorPrecedence.None, NodeType.None, "<", ErrorRecoverySet.BinOp); // < - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.LessThanEquals, Reservation.None, OperatorPrecedence.Relational, NodeType.Le, OperatorPrecedence.None, NodeType.None, "<=", ErrorRecoverySet.BinOp); // <= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.GreaterThan, Reservation.None, OperatorPrecedence.Relational, NodeType.Gt, OperatorPrecedence.None, NodeType.None, ">", ErrorRecoverySet.BinOp); // > - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.GreaterThanEquals, Reservation.None, OperatorPrecedence.Relational, NodeType.Ge, OperatorPrecedence.None, NodeType.None, ">=", ErrorRecoverySet.BinOp); // >= - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.LessThanLessThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Lsh, OperatorPrecedence.None, NodeType.None, "<<", ErrorRecoverySet.BinOp); // << - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.GreaterThanGreaterThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Rsh, OperatorPrecedence.None, NodeType.None, ">>", ErrorRecoverySet.BinOp); // >> - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.GreaterThanGreaterThanGreaterThan, Reservation.None, OperatorPrecedence.Shift, NodeType.Rs2, OperatorPrecedence.None, NodeType.None, ">>>", ErrorRecoverySet.BinOp); // >>> - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Plus, Reservation.None, OperatorPrecedence.Additive, NodeType.Add, OperatorPrecedence.Unary, NodeType.Pos, "+", ErrorRecoverySet.AddOp); // + - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Minus, Reservation.None, OperatorPrecedence.Additive, NodeType.Sub, OperatorPrecedence.Unary, NodeType.Neg, "-", ErrorRecoverySet.AddOp); // - - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Asterisk, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Mul, OperatorPrecedence.None, NodeType.None, "*", ErrorRecoverySet.BinOp); // * - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Slash, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Div, OperatorPrecedence.None, NodeType.None, "/", ErrorRecoverySet.BinOp); // / - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Percent, Reservation.None, OperatorPrecedence.Multiplicative, NodeType.Mod, OperatorPrecedence.None, NodeType.None, "%", ErrorRecoverySet.BinOp); // % - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Tilde, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.Not, "~", ErrorRecoverySet.PreOp); // ~ - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Exclamation, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.LogNot, "!", ErrorRecoverySet.PreOp); // ! - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.PlusPlus, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.IncPre, "++", ErrorRecoverySet.PreOp); // ++ - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.MinusMinus, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.Unary, NodeType.DecPre, "--", ErrorRecoverySet.PreOp); // -- - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.OpenParen, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "(", ErrorRecoverySet.LParen); // ( - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.OpenBracket, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "[", ErrorRecoverySet.LBrack); // [ - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.Dot, Reservation.None, OperatorPrecedence.Unary, NodeType.None, OperatorPrecedence.None, NodeType.None, ".", ErrorRecoverySet.Dot); // . - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.EndOfFile, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "", ErrorRecoverySet.EOF); // EOF - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - setTokenInfo(TokenID.EqualsGreaterThan, Reservation.None, OperatorPrecedence.None, NodeType.None, OperatorPrecedence.None, NodeType.None, "=>", ErrorRecoverySet.None); // => - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - ~~~~~~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'ErrorRecoverySet'. - - export function lookupToken(tokenId: TokenID): TokenInfo { - return tokenTable[tokenId]; - } - - export enum TokenClass { - Punctuation, - Keyword, - Operator, - Comment, - Whitespace, - Identifier, - Literal, - } - - export class SavedToken { - constructor (public tok: Token, public minChar: number, public limChar: number) { } - } - - export class Token { - constructor (public tokenId: TokenID) { - } - - public toString(): string { - return "token: " + this.tokenId + " " + this.getText() + " (" + (TokenID)._map[this.tokenId] + ")"; - } - - public print(line: number, outfile: any): void { - outfile.WriteLine(this.toString() + ",on line" + line); - } - - public getText(): string { - return tokenTable[this.tokenId].text; - } - - public classification(): TokenClass { - if (this.tokenId <= TokenID.LimKeyword) { - return TokenClass.Keyword; - } - else { - var tokenInfo = lookupToken(this.tokenId); - if (tokenInfo != undefined) { - if ((tokenInfo.unopNodeType != NodeType.None) || - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - (tokenInfo.binopNodeType != NodeType.None)) { - ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. - return TokenClass.Operator; - } - } - } - - return TokenClass.Punctuation; - } - } - - export class NumberLiteralToken extends Token { - constructor (public value: number, public hasEmptyFraction?: boolean) { - super(TokenID.NumberLiteral); - } - - public getText(): string { - return this.hasEmptyFraction ? this.value.toString() + ".0" : this.value.toString(); - } - - public classification(): TokenClass { - return TokenClass.Literal; - } - } - - export class StringLiteralToken extends Token { - constructor (public value: string) { - super(TokenID.StringLiteral); - } - - public getText(): string { - return this.value; - } - - public classification(): TokenClass { - return TokenClass.Literal; - } - } - - export class IdentifierToken extends Token { - constructor (public value: string, public hasEscapeSequence : boolean) { - super(TokenID.Identifier); - } - public getText(): string { - return this.value; - } - public classification(): TokenClass { - return TokenClass.Identifier; - } - } - - export class WhitespaceToken extends Token { - constructor (tokenId: TokenID, public value: string) { - super(tokenId); - } - - public getText(): string { - return this.value; - } - - public classification(): TokenClass { - return TokenClass.Whitespace; - } - } - - export class CommentToken extends Token { - constructor (tokenID: TokenID, public value: string, public isBlock: boolean, public startPos: number, public line: number, public endsLine: boolean) { - super(tokenID); - } - - public getText(): string { - return this.value; - } - - public classification(): TokenClass { - return TokenClass.Comment; - } - } - - export class RegularExpressionLiteralToken extends Token { - constructor(public regex: any) { - super(TokenID.RegularExpressionLiteral); - } - - public getText(): string { - return this.regex.toString(); - } - - public classification(): TokenClass { - return TokenClass.Literal; - } - } - - // TODO: new with length TokenID.LimFixed - export var staticTokens: any = new Token[]; - -!!! error TS1011: An element access expression should take an argument. - export function initializeStaticTokens(): void { - for (var i = 0; i <= TokenID.LimFixed; i++) { - staticTokens[i] = new Token(i); - } - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource14.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource14.d.ts deleted file mode 100644 index 51564a5d6221a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource14.d.ts +++ /dev/null @@ -1,1732 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/parserRealSource14.ts] //// - -//// [parserRealSource14.ts] -// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. -// See LICENSE.txt in the project root for complete license information. - -/// - -module TypeScript { - export function lastOf(items: any[]): any { - return (items === null || items.length === 0) ? null : items[items.length - 1]; - } - - export function max(a: number, b: number): number { - return a >= b ? a : b; - } - - export function min(a: number, b: number): number { - return a <= b ? a : b; - } - - // - // Helper class representing a path from a root ast node to a (grand)child ast node. - // This is helpful as our tree don't have parents. - // - export class AstPath { - public asts: TypeScript.AST[] = []; - public top: number = -1; - - static reverseIndexOf(items: any[], index: number): any { - return (items === null || items.length <= index) ? null : items[items.length - index - 1]; - } - - public clone(): AstPath { - var clone = new AstPath(); - clone.asts = this.asts.map((value) => { return value; }); - clone.top = this.top; - return clone; - } - - public pop(): TypeScript.AST { - var head = this.ast(); - this.up(); - - while (this.asts.length > this.count()) { - this.asts.pop(); - } - return head; - } - - public push(ast: TypeScript.AST): void { - while (this.asts.length > this.count()) { - this.asts.pop(); - } - this.top = this.asts.length; - this.asts.push(ast); - } - - public up(): void { - if (this.top <= -1) - throw new Error("Invalid call to 'up'"); - this.top--; - } - - public down(): void { - if (this.top == this.ast.length - 1) - throw new Error("Invalid call to 'down'"); - this.top++; - } - - public nodeType(): TypeScript.NodeType { - if (this.ast() == null) - return TypeScript.NodeType.None; - return this.ast().nodeType; - } - - public ast(): TypeScript.AST { - return AstPath.reverseIndexOf(this.asts, this.asts.length - (this.top + 1)); - } - - public parent(): TypeScript.AST { - return AstPath.reverseIndexOf(this.asts, this.asts.length - this.top); - } - - public count(): number { - return this.top + 1; - } - - public get(index: number): TypeScript.AST { - return this.asts[index]; - } - - public isNameOfClass(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.ClassDeclaration) && - ((this.parent()).name === this.ast()); - } - - public isNameOfInterface(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.InterfaceDeclaration) && - ((this.parent()).name === this.ast()); - } - - public isNameOfArgument(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.ArgDecl) && - ((this.parent()).id === this.ast()); - } - - public isNameOfVariable(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.VarDecl) && - ((this.parent()).id === this.ast()); - } - - public isNameOfModule(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.ModuleDeclaration) && - ((this.parent()).name === this.ast()); - } - - public isNameOfFunction(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - (this.parent().nodeType === TypeScript.NodeType.FuncDecl) && - ((this.parent()).name === this.ast()); - } - - public isChildOfScript(): boolean { - var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.Script; - } - - public isChildOfModule(): boolean { - var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.ModuleDeclaration; - } - - public isChildOfClass(): boolean { - var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.ClassDeclaration; - } - - public isArgumentOfClassConstructor(): boolean { - var ast = lastOf(this.asts); - return this.count() >= 5 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && - this.asts[this.top - 3].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 4].nodeType === TypeScript.NodeType.ClassDeclaration && - ((this.asts[this.top - 2]).isConstructor) && - ((this.asts[this.top - 2]).arguments === this.asts[this.top - 1]) && - ((this.asts[this.top - 4]).constructorDecl === this.asts[this.top - 2]); - } - - public isChildOfInterface(): boolean { - var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.InterfaceDeclaration; - } - - public isTopLevelImplicitModule(): any { - return this.count() >= 1 && - this.asts[this.top].nodeType === TypeScript.NodeType.ModuleDeclaration && - TypeScript.hasFlag((this.asts[this.top]).modFlags, TypeScript.ModuleFlags.IsWholeFile); - } - - public isBodyOfTopLevelImplicitModule(): any { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && - (this.asts[this.top - 1]).members == this.asts[this.top - 0] && - TypeScript.hasFlag((this.asts[this.top - 1]).modFlags, TypeScript.ModuleFlags.IsWholeFile); - } - - public isBodyOfScript(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Script && - (this.asts[this.top - 1]).bod == this.asts[this.top - 0]; - } - - public isBodyOfSwitch(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Switch && - (this.asts[this.top - 1]).caseList == this.asts[this.top - 0]; - } - - public isBodyOfModule(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && - (this.asts[this.top - 1]).members == this.asts[this.top - 0]; - } - - public isBodyOfClass(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ClassDeclaration && - (this.asts[this.top - 1]).members == this.asts[this.top - 0]; - } - - public isBodyOfFunction(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && - (this.asts[this.top - 1]).bod == this.asts[this.top - 0]; - } - - public isBodyOfInterface(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.InterfaceDeclaration && - (this.asts[this.top - 1]).members == this.asts[this.top - 0]; - } - - public isBodyOfBlock(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Block && - (this.asts[this.top - 1]).statements == this.asts[this.top - 0]; - } - - public isBodyOfFor(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.For && - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - } - - public isBodyOfCase(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Case && - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - } - - public isBodyOfTry(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Try && - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - } - - public isBodyOfCatch(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Catch && - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - } - - public isBodyOfDoWhile(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.DoWhile && - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - } - - public isBodyOfWhile(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.While && - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - } - - public isBodyOfForIn(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ForIn && - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - } - - public isBodyOfWith(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.With && - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - } - - public isBodyOfFinally(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Finally && - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - } - - public isCaseOfSwitch(): boolean { - return this.count() >= 3 && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - (this.asts[this.top - 2]).caseList == this.asts[this.top - 1]; - } - - public isDefaultCaseOfSwitch(): boolean { - return this.count() >= 3 && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - (this.asts[this.top - 2]).caseList == this.asts[this.top - 1] && - (this.asts[this.top - 2]).defaultCase == this.asts[this.top - 0]; - } - - public isListOfObjectLit(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - (this.asts[this.top - 1]).operand == this.asts[this.top - 0]; - } - - public isBodyOfObjectLit(): boolean { - return this.isListOfObjectLit(); - } - - public isEmptyListOfObjectLit(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - (this.asts[this.top - 1]).operand == this.asts[this.top - 0] && - (this.asts[this.top - 0]).members.length == 0; - } - - public isMemberOfObjectLit(): boolean { - return this.count() >= 3 && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.ObjectLit && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.Member && - (this.asts[this.top - 2]).operand == this.asts[this.top - 1]; - } - - public isNameOfMemberOfObjectLit(): boolean { - return this.count() >= 4 && - this.asts[this.top - 3].nodeType === TypeScript.NodeType.ObjectLit && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.Name && - (this.asts[this.top - 3]).operand == this.asts[this.top - 2]; - } - - public isListOfArrayLit(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ArrayLit && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - (this.asts[this.top - 1]).operand == this.asts[this.top - 0]; - } - - public isTargetOfMember(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && - (this.asts[this.top - 1]).operand1 === this.asts[this.top - 0]; - } - - public isMemberOfMember(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && - (this.asts[this.top - 1]).operand2 === this.asts[this.top - 0]; - } - - public isItemOfList(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List; - //(this.asts[this.top - 1]).operand2 === this.asts[this.top - 0]; - } - - public isThenOfIf(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && - (this.asts[this.top - 1]).thenBod == this.asts[this.top - 0]; - } - - public isElseOfIf(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && - (this.asts[this.top - 1]).elseBod == this.asts[this.top - 0]; - } - - public isBodyOfDefaultCase(): boolean { - return this.isBodyOfCase(); - } - - public isSingleStatementList(): boolean { - return this.count() >= 1 && - this.asts[this.top].nodeType === TypeScript.NodeType.List && - (this.asts[this.top]).members.length === 1; - } - - public isArgumentListOfFunction(): boolean { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && - (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; - } - - public isArgumentOfFunction(): boolean { - return this.count() >= 3 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && - (this.asts[this.top - 2]).arguments === this.asts[this.top - 1]; - } - - public isArgumentListOfCall(): boolean { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Call && - (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; - } - - public isArgumentListOfNew(): boolean { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.New && - (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; - } - - public isSynthesizedBlock(): boolean { - return this.count() >= 1 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.Block && - (this.asts[this.top - 0]).isStatementBlock === false; - } - } - - export function isValidAstNode(ast: TypeScript.ASTSpan): boolean { - if (ast === null) - return false; - - if (ast.minChar === -1 || ast.limChar === -1) - return false; - - return true; - } - - export class AstPathContext { - public path: AstPath = new TypeScript.AstPath(); - } - - export enum GetAstPathOptions { - Default = 0, - EdgeInclusive = 1, - //We need this options dealing with an AST coming from an incomplete AST. For example: - // class foo { // r - // If we ask for the AST at the position after the "r" character, we won't see we are - // inside a comment, because the "class" AST node has a limChar corresponding to the position of - // the "{" character, meaning we don't traverse the tree down to the stmt list of the class, meaning - // we don't find the "precomment" attached to the errorneous empty stmt. - //TODO: It would be nice to be able to get rid of this. - DontPruneSearchBasedOnPosition = 1 << 1, - } - - /// - /// Return the stack of AST nodes containing "position" - /// - export function getAstPathToPosition(script: TypeScript.AST, pos: number, options: GetAstPathOptions = GetAstPathOptions.Default): TypeScript.AstPath { - var lookInComments = (comments: TypeScript.Comment[]) => { - if (comments && comments.length > 0) { - for (var i = 0; i < comments.length; i++) { - var minChar = comments[i].minChar; - var limChar = comments[i].limChar; - if (!comments[i].isBlockComment) { - limChar++; // For single line comments, include 1 more character (for the newline) - } - if (pos >= minChar && pos < limChar) { - ctx.path.push(comments[i]); - } - } - } - } - - var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: IAstWalker) { - if (isValidAstNode(cur)) { - - // Add "cur" to the stack if it contains our position - // For "identifier" nodes, we need a special case: A position equal to "limChar" is - // valid, since the position corresponds to a caret position (in between characters) - // For example: - // bar - // 0123 - // If "position == 3", the caret is at the "right" of the "r" character, which should be considered valid - var inclusive = - hasFlag(options, GetAstPathOptions.EdgeInclusive) || - cur.nodeType === TypeScript.NodeType.Name || - pos === script.limChar; // Special "EOF" case - - var minChar = cur.minChar; - var limChar = cur.limChar + (inclusive ? 1 : 0) - if (pos >= minChar && pos < limChar) { - - // TODO: Since AST is sometimes not correct wrt to position, only add "cur" if it's better - // than top of the stack. - var previous = ctx.path.ast(); - if (previous == null || (cur.minChar >= previous.minChar && cur.limChar <= previous.limChar)) { - ctx.path.push(cur); - } - else { - //logger.log("TODO: Ignoring node because minChar, limChar not better than previous node in stack"); - } - } - - // The AST walker skips comments, but we might be in one, so check the pre/post comments for this node manually - if (pos < limChar) { - lookInComments(cur.preComments); - } - if (pos >= minChar) { - lookInComments(cur.postComments); - } - - if (!hasFlag(options, GetAstPathOptions.DontPruneSearchBasedOnPosition)) { - // Don't go further down the tree if pos is outside of [minChar, limChar] - walker.options.goChildren = (minChar <= pos && pos <= limChar); - } - } - return cur; - } - - var ctx = new AstPathContext(); - TypeScript.getAstWalkerFactory().walk(script, pre, null, null, ctx); - return ctx.path; - } - - // - // Find a source text offset that is safe for lexing tokens at the given position. - // This is used when "position" might be inside a comment or string, etc. - // - export function getTokenizationOffset(script: TypeScript.Script, position: number): number { - var bestOffset = 0; - var pre = (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker): TypeScript.AST => { - if (TypeScript.isValidAstNode(cur)) { - // Did we find a closer offset? - if (cur.minChar <= position) { - bestOffset = max(bestOffset, cur.minChar); - } - - // Stop the walk if this node is not related to "minChar" - if (cur.minChar > position || cur.limChar < bestOffset) { - walker.options.goChildren = false; - } - } - - return cur; - } - - TypeScript.getAstWalkerFactory().walk(script, pre); - return bestOffset; - } - - /// - /// Simple function to Walk an AST using a simple callback function. - /// - export function walkAST(ast: TypeScript.AST, callback: (path: AstPath, walker: TypeScript.IAstWalker) => void ): void { - var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) { - var path: TypeScript.AstPath = walker.state; - path.push(cur); - callback(path, walker); - return cur; - } - var post = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) { - var path: TypeScript.AstPath = walker.state; - path.pop(); - return cur; - } - - var path = new AstPath(); - TypeScript.getAstWalkerFactory().walk(ast, pre, post, null, path); - } -} - - -/// [Declarations] //// - - - -//// [parserRealSource14.d.ts] -declare namespace TypeScript { - function lastOf(items: any[]): any; - function max(a: number, b: number): number; - function min(a: number, b: number): number; - class AstPath { - asts: TypeScript.AST[]; - top: number; - static reverseIndexOf(items: any[], index: number): any; - clone(): AstPath; - pop(): TypeScript.AST; - push(ast: TypeScript.AST): void; - up(): void; - down(): void; - nodeType(): TypeScript.NodeType; - ast(): TypeScript.AST; - parent(): TypeScript.AST; - count(): number; - get(index: number): TypeScript.AST; - isNameOfClass(): boolean; - isNameOfInterface(): boolean; - isNameOfArgument(): boolean; - isNameOfVariable(): boolean; - isNameOfModule(): boolean; - isNameOfFunction(): boolean; - isChildOfScript(): boolean; - isChildOfModule(): boolean; - isChildOfClass(): boolean; - isArgumentOfClassConstructor(): boolean; - isChildOfInterface(): boolean; - isTopLevelImplicitModule(): any; - isBodyOfTopLevelImplicitModule(): any; - isBodyOfScript(): boolean; - isBodyOfSwitch(): boolean; - isBodyOfModule(): boolean; - isBodyOfClass(): boolean; - isBodyOfFunction(): boolean; - isBodyOfInterface(): boolean; - isBodyOfBlock(): boolean; - isBodyOfFor(): boolean; - isBodyOfCase(): boolean; - isBodyOfTry(): boolean; - isBodyOfCatch(): boolean; - isBodyOfDoWhile(): boolean; - isBodyOfWhile(): boolean; - isBodyOfForIn(): boolean; - isBodyOfWith(): boolean; - isBodyOfFinally(): boolean; - isCaseOfSwitch(): boolean; - isDefaultCaseOfSwitch(): boolean; - isListOfObjectLit(): boolean; - isBodyOfObjectLit(): boolean; - isEmptyListOfObjectLit(): boolean; - isMemberOfObjectLit(): boolean; - isNameOfMemberOfObjectLit(): boolean; - isListOfArrayLit(): boolean; - isTargetOfMember(): boolean; - isMemberOfMember(): boolean; - isItemOfList(): boolean; - isThenOfIf(): boolean; - isElseOfIf(): boolean; - isBodyOfDefaultCase(): boolean; - isSingleStatementList(): boolean; - isArgumentListOfFunction(): boolean; - isArgumentOfFunction(): boolean; - isArgumentListOfCall(): boolean; - isArgumentListOfNew(): boolean; - isSynthesizedBlock(): boolean; - } - function isValidAstNode(ast: TypeScript.ASTSpan): boolean; - class AstPathContext { - path: AstPath; - } - enum GetAstPathOptions { - Default = 0, - EdgeInclusive = 1, - DontPruneSearchBasedOnPosition = 2 - } - function getAstPathToPosition(script: TypeScript.AST, pos: number, options?: GetAstPathOptions): TypeScript.AstPath; - function getTokenizationOffset(script: TypeScript.Script, position: number): number; - function walkAST(ast: TypeScript.AST, callback: (path: AstPath, walker: TypeScript.IAstWalker) => void): void; -} - -/// [Errors] //// - -parserRealSource14.ts(4,21): error TS6053: File 'typescript.ts' not found. -parserRealSource14.ts(24,33): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(38,34): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(48,37): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(68,39): error TS2694: Namespace 'TypeScript' has no exported member 'NodeType'. -parserRealSource14.ts(70,35): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(74,34): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(75,32): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(78,37): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(79,32): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(86,47): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(94,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(95,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(96,31): error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. -parserRealSource14.ts(103,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(104,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(105,31): error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. -parserRealSource14.ts(112,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(113,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(114,31): error TS2694: Namespace 'TypeScript' has no exported member 'ArgDecl'. -parserRealSource14.ts(121,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(122,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(123,31): error TS2694: Namespace 'TypeScript' has no exported member 'VarDecl'. -parserRealSource14.ts(130,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(131,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(132,31): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. -parserRealSource14.ts(139,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(140,56): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(141,31): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. -parserRealSource14.ts(148,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(149,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(156,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(157,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(164,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(165,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(172,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(173,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(174,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(175,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(176,31): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. -parserRealSource14.ts(177,31): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. -parserRealSource14.ts(178,31): error TS2694: Namespace 'TypeScript' has no exported member 'ClassDeclaration'. -parserRealSource14.ts(185,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(186,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(191,61): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(192,28): error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(192,49): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. -parserRealSource14.ts(192,109): error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(197,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(198,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(199,31): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. -parserRealSource14.ts(200,28): error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(200,49): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. -parserRealSource14.ts(200,113): error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(205,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(206,31): error TS2694: Namespace 'TypeScript' has no exported member 'Script'. -parserRealSource14.ts(211,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(212,31): error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. -parserRealSource14.ts(217,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(218,31): error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. -parserRealSource14.ts(223,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(224,31): error TS2694: Namespace 'TypeScript' has no exported member 'ClassDeclaration'. -parserRealSource14.ts(229,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(230,31): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. -parserRealSource14.ts(235,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(236,31): error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. -parserRealSource14.ts(241,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(242,30): error TS2694: Namespace 'TypeScript' has no exported member 'Block'. -parserRealSource14.ts(247,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(248,30): error TS2694: Namespace 'TypeScript' has no exported member 'ForStatement'. -parserRealSource14.ts(253,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(254,30): error TS2694: Namespace 'TypeScript' has no exported member 'CaseStatement'. -parserRealSource14.ts(259,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(260,30): error TS2694: Namespace 'TypeScript' has no exported member 'Try'. -parserRealSource14.ts(265,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(266,30): error TS2694: Namespace 'TypeScript' has no exported member 'Catch'. -parserRealSource14.ts(271,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(272,30): error TS2694: Namespace 'TypeScript' has no exported member 'DoWhileStatement'. -parserRealSource14.ts(277,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(278,30): error TS2694: Namespace 'TypeScript' has no exported member 'WhileStatement'. -parserRealSource14.ts(283,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(284,30): error TS2694: Namespace 'TypeScript' has no exported member 'ForInStatement'. -parserRealSource14.ts(289,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(290,30): error TS2694: Namespace 'TypeScript' has no exported member 'WithStatement'. -parserRealSource14.ts(295,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(296,30): error TS2694: Namespace 'TypeScript' has no exported member 'Finally'. -parserRealSource14.ts(301,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(302,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(303,30): error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. -parserRealSource14.ts(308,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(309,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(310,30): error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. -parserRealSource14.ts(311,30): error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. -parserRealSource14.ts(316,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(317,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(318,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. -parserRealSource14.ts(327,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(328,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(329,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. -parserRealSource14.ts(330,30): error TS2694: Namespace 'TypeScript' has no exported member 'ASTList'. -parserRealSource14.ts(335,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(336,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(337,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(338,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. -parserRealSource14.ts(343,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(344,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(345,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(346,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(347,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. -parserRealSource14.ts(352,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(353,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(354,30): error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. -parserRealSource14.ts(359,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(360,30): error TS2694: Namespace 'TypeScript' has no exported member 'BinaryExpression'. -parserRealSource14.ts(365,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(366,30): error TS2694: Namespace 'TypeScript' has no exported member 'BinaryExpression'. -parserRealSource14.ts(371,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(377,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(378,30): error TS2694: Namespace 'TypeScript' has no exported member 'IfStatement'. -parserRealSource14.ts(383,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(384,30): error TS2694: Namespace 'TypeScript' has no exported member 'IfStatement'. -parserRealSource14.ts(393,61): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(394,30): error TS2694: Namespace 'TypeScript' has no exported member 'ASTList'. -parserRealSource14.ts(399,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(400,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(401,30): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. -parserRealSource14.ts(406,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(407,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(408,30): error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. -parserRealSource14.ts(413,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(414,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(415,30): error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'. -parserRealSource14.ts(420,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(421,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(422,30): error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'. -parserRealSource14.ts(427,65): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(428,30): error TS2694: Namespace 'TypeScript' has no exported member 'Block'. -parserRealSource14.ts(432,52): error TS2694: Namespace 'TypeScript' has no exported member 'ASTSpan'. -parserRealSource14.ts(462,61): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(463,52): error TS2694: Namespace 'TypeScript' has no exported member 'Comment'. -parserRealSource14.ts(478,45): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(478,69): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(478,82): error TS2304: Cannot find name 'IAstWalker'. -parserRealSource14.ts(489,21): error TS2304: Cannot find name 'hasFlag'. -parserRealSource14.ts(490,49): error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(516,22): error TS2304: Cannot find name 'hasFlag'. -parserRealSource14.ts(525,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(533,62): error TS2694: Namespace 'TypeScript' has no exported member 'Script'. -parserRealSource14.ts(535,36): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(535,60): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(535,84): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. -parserRealSource14.ts(535,108): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(551,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. -parserRealSource14.ts(558,45): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(558,95): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. -parserRealSource14.ts(559,45): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(559,69): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(559,93): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. -parserRealSource14.ts(565,46): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(565,70): error TS2694: Namespace 'TypeScript' has no exported member 'AST'. -parserRealSource14.ts(565,94): error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. -parserRealSource14.ts(572,20): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. - - -==== parserRealSource14.ts (162 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// - ~~~~~~~~~~~~~ -!!! error TS6053: File 'typescript.ts' not found. - - module TypeScript { - export function lastOf(items: any[]): any { - return (items === null || items.length === 0) ? null : items[items.length - 1]; - } - - export function max(a: number, b: number): number { - return a >= b ? a : b; - } - - export function min(a: number, b: number): number { - return a <= b ? a : b; - } - - // - // Helper class representing a path from a root ast node to a (grand)child ast node. - // This is helpful as our tree don't have parents. - // - export class AstPath { - public asts: TypeScript.AST[] = []; - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - public top: number = -1; - - static reverseIndexOf(items: any[], index: number): any { - return (items === null || items.length <= index) ? null : items[items.length - index - 1]; - } - - public clone(): AstPath { - var clone = new AstPath(); - clone.asts = this.asts.map((value) => { return value; }); - clone.top = this.top; - return clone; - } - - public pop(): TypeScript.AST { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - var head = this.ast(); - this.up(); - - while (this.asts.length > this.count()) { - this.asts.pop(); - } - return head; - } - - public push(ast: TypeScript.AST): void { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - while (this.asts.length > this.count()) { - this.asts.pop(); - } - this.top = this.asts.length; - this.asts.push(ast); - } - - public up(): void { - if (this.top <= -1) - throw new Error("Invalid call to 'up'"); - this.top--; - } - - public down(): void { - if (this.top == this.ast.length - 1) - throw new Error("Invalid call to 'down'"); - this.top++; - } - - public nodeType(): TypeScript.NodeType { - ~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'NodeType'. - if (this.ast() == null) - return TypeScript.NodeType.None; - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - return this.ast().nodeType; - } - - public ast(): TypeScript.AST { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - return AstPath.reverseIndexOf(this.asts, this.asts.length - (this.top + 1)); - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - } - - public parent(): TypeScript.AST { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - return AstPath.reverseIndexOf(this.asts, this.asts.length - this.top); - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - } - - public count(): number { - return this.top + 1; - } - - public get(index: number): TypeScript.AST { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - return this.asts[index]; - } - - public isNameOfClass(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.parent().nodeType === TypeScript.NodeType.ClassDeclaration) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - ((this.parent()).name === this.ast()); - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. - } - - public isNameOfInterface(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.parent().nodeType === TypeScript.NodeType.InterfaceDeclaration) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - ((this.parent()).name === this.ast()); - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. - } - - public isNameOfArgument(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.parent().nodeType === TypeScript.NodeType.ArgDecl) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - ((this.parent()).id === this.ast()); - ~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ArgDecl'. - } - - public isNameOfVariable(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.parent().nodeType === TypeScript.NodeType.VarDecl) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - ((this.parent()).id === this.ast()); - ~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'VarDecl'. - } - - public isNameOfModule(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.parent().nodeType === TypeScript.NodeType.ModuleDeclaration) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - ((this.parent()).name === this.ast()); - ~~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. - } - - public isNameOfFunction(): boolean { - if (this.ast() === null || this.parent() === null) - return false; - - return (this.ast().nodeType === TypeScript.NodeType.Name) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.parent().nodeType === TypeScript.NodeType.FuncDecl) && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - ((this.parent()).name === this.ast()); - ~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. - } - - public isChildOfScript(): boolean { - var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 2].nodeType === TypeScript.NodeType.Script; - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - } - - public isChildOfModule(): boolean { - var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 2].nodeType === TypeScript.NodeType.ModuleDeclaration; - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - } - - public isChildOfClass(): boolean { - var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 2].nodeType === TypeScript.NodeType.ClassDeclaration; - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - } - - public isArgumentOfClassConstructor(): boolean { - var ast = lastOf(this.asts); - return this.count() >= 5 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 3].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 4].nodeType === TypeScript.NodeType.ClassDeclaration && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - ((this.asts[this.top - 2]).isConstructor) && - ~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. - ((this.asts[this.top - 2]).arguments === this.asts[this.top - 1]) && - ~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. - ((this.asts[this.top - 4]).constructorDecl === this.asts[this.top - 2]); - ~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ClassDeclaration'. - } - - public isChildOfInterface(): boolean { - var ast = lastOf(this.asts); - return this.count() >= 3 && - this.asts[this.top] === ast && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 2].nodeType === TypeScript.NodeType.InterfaceDeclaration; - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - } - - public isTopLevelImplicitModule(): any { - return this.count() >= 1 && - this.asts[this.top].nodeType === TypeScript.NodeType.ModuleDeclaration && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - TypeScript.hasFlag((this.asts[this.top]).modFlags, TypeScript.ModuleFlags.IsWholeFile); - ~~~~~~~ -!!! error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'. - ~~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. - ~~~~~~~~~~~ -!!! error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'. - } - - public isBodyOfTopLevelImplicitModule(): any { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).members == this.asts[this.top - 0] && - ~~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. - TypeScript.hasFlag((this.asts[this.top - 1]).modFlags, TypeScript.ModuleFlags.IsWholeFile); - ~~~~~~~ -!!! error TS2339: Property 'hasFlag' does not exist on type 'typeof TypeScript'. - ~~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. - ~~~~~~~~~~~ -!!! error TS2339: Property 'ModuleFlags' does not exist on type 'typeof TypeScript'. - } - - public isBodyOfScript(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Script && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).bod == this.asts[this.top - 0]; - ~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'Script'. - } - - public isBodyOfSwitch(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Switch && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).caseList == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. - } - - public isBodyOfModule(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ModuleDeclaration && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).members == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ModuleDeclaration'. - } - - public isBodyOfClass(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ClassDeclaration && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).members == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ClassDeclaration'. - } - - public isBodyOfFunction(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).bod == this.asts[this.top - 0]; - ~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. - } - - public isBodyOfInterface(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.InterfaceDeclaration && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).members == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'InterfaceDeclaration'. - } - - public isBodyOfBlock(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Block && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).statements == this.asts[this.top - 0]; - ~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'Block'. - } - - public isBodyOfFor(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.For && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ForStatement'. - } - - public isBodyOfCase(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Case && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'CaseStatement'. - } - - public isBodyOfTry(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Try && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'Try'. - } - - public isBodyOfCatch(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Catch && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'Catch'. - } - - public isBodyOfDoWhile(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.DoWhile && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'DoWhileStatement'. - } - - public isBodyOfWhile(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.While && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'WhileStatement'. - } - - public isBodyOfForIn(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ForIn && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ForInStatement'. - } - - public isBodyOfWith(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.With && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'WithStatement'. - } - - public isBodyOfFinally(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Finally && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).body == this.asts[this.top - 0]; - ~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'Finally'. - } - - public isCaseOfSwitch(): boolean { - return this.count() >= 3 && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 2]).caseList == this.asts[this.top - 1]; - ~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. - } - - public isDefaultCaseOfSwitch(): boolean { - return this.count() >= 3 && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.Switch && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 2]).caseList == this.asts[this.top - 1] && - ~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. - (this.asts[this.top - 2]).defaultCase == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'SwitchStatement'. - } - - public isListOfObjectLit(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).operand == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. - } - - public isBodyOfObjectLit(): boolean { - return this.isListOfObjectLit(); - } - - public isEmptyListOfObjectLit(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ObjectLit && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).operand == this.asts[this.top - 0] && - ~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. - (this.asts[this.top - 0]).members.length == 0; - ~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ASTList'. - } - - public isMemberOfObjectLit(): boolean { - return this.count() >= 3 && - this.asts[this.top - 2].nodeType === TypeScript.NodeType.ObjectLit && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 0].nodeType === TypeScript.NodeType.Member && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 2]).operand == this.asts[this.top - 1]; - ~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. - } - - public isNameOfMemberOfObjectLit(): boolean { - return this.count() >= 4 && - this.asts[this.top - 3].nodeType === TypeScript.NodeType.ObjectLit && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 2].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 0].nodeType === TypeScript.NodeType.Name && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 3]).operand == this.asts[this.top - 2]; - ~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. - } - - public isListOfArrayLit(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.ArrayLit && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).operand == this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'UnaryExpression'. - } - - public isTargetOfMember(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).operand1 === this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'BinaryExpression'. - } - - public isMemberOfMember(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Member && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).operand2 === this.asts[this.top - 0]; - ~~~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'BinaryExpression'. - } - - public isItemOfList(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List; - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - //(this.asts[this.top - 1]).operand2 === this.asts[this.top - 0]; - } - - public isThenOfIf(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).thenBod == this.asts[this.top - 0]; - ~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'IfStatement'. - } - - public isElseOfIf(): boolean { - return this.count() >= 2 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.If && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).elseBod == this.asts[this.top - 0]; - ~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'IfStatement'. - } - - public isBodyOfDefaultCase(): boolean { - return this.isBodyOfCase(); - } - - public isSingleStatementList(): boolean { - return this.count() >= 1 && - this.asts[this.top].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top]).members.length === 1; - ~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ASTList'. - } - - public isArgumentListOfFunction(): boolean { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 1].nodeType === TypeScript.NodeType.FuncDecl && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; - ~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. - } - - public isArgumentOfFunction(): boolean { - return this.count() >= 3 && - this.asts[this.top - 1].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 2].nodeType === TypeScript.NodeType.FuncDecl && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 2]).arguments === this.asts[this.top - 1]; - ~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'FuncDecl'. - } - - public isArgumentListOfCall(): boolean { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 1].nodeType === TypeScript.NodeType.Call && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; - ~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'. - } - - public isArgumentListOfNew(): boolean { - return this.count() >= 2 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.List && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - this.asts[this.top - 1].nodeType === TypeScript.NodeType.New && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 1]).arguments === this.asts[this.top - 0]; - ~~~~~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'CallExpression'. - } - - public isSynthesizedBlock(): boolean { - return this.count() >= 1 && - this.asts[this.top - 0].nodeType === TypeScript.NodeType.Block && - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - (this.asts[this.top - 0]).isStatementBlock === false; - ~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'Block'. - } - } - - export function isValidAstNode(ast: TypeScript.ASTSpan): boolean { - ~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'ASTSpan'. - if (ast === null) - return false; - - if (ast.minChar === -1 || ast.limChar === -1) - return false; - - return true; - } - - export class AstPathContext { - public path: AstPath = new TypeScript.AstPath(); - } - - export enum GetAstPathOptions { - Default = 0, - EdgeInclusive = 1, - //We need this options dealing with an AST coming from an incomplete AST. For example: - // class foo { // r - // If we ask for the AST at the position after the "r" character, we won't see we are - // inside a comment, because the "class" AST node has a limChar corresponding to the position of - // the "{" character, meaning we don't traverse the tree down to the stmt list of the class, meaning - // we don't find the "precomment" attached to the errorneous empty stmt. - //TODO: It would be nice to be able to get rid of this. - DontPruneSearchBasedOnPosition = 1 << 1, - } - - /// - /// Return the stack of AST nodes containing "position" - /// - export function getAstPathToPosition(script: TypeScript.AST, pos: number, options: GetAstPathOptions = GetAstPathOptions.Default): TypeScript.AstPath { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - var lookInComments = (comments: TypeScript.Comment[]) => { - ~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'Comment'. - if (comments && comments.length > 0) { - for (var i = 0; i < comments.length; i++) { - var minChar = comments[i].minChar; - var limChar = comments[i].limChar; - if (!comments[i].isBlockComment) { - limChar++; // For single line comments, include 1 more character (for the newline) - } - if (pos >= minChar && pos < limChar) { - ctx.path.push(comments[i]); - } - } - } - } - - var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: IAstWalker) { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'IAstWalker'. - if (isValidAstNode(cur)) { - - // Add "cur" to the stack if it contains our position - // For "identifier" nodes, we need a special case: A position equal to "limChar" is - // valid, since the position corresponds to a caret position (in between characters) - // For example: - // bar - // 0123 - // If "position == 3", the caret is at the "right" of the "r" character, which should be considered valid - var inclusive = - hasFlag(options, GetAstPathOptions.EdgeInclusive) || - ~~~~~~~ -!!! error TS2304: Cannot find name 'hasFlag'. - cur.nodeType === TypeScript.NodeType.Name || - ~~~~~~~~ -!!! error TS2339: Property 'NodeType' does not exist on type 'typeof TypeScript'. - pos === script.limChar; // Special "EOF" case - - var minChar = cur.minChar; - var limChar = cur.limChar + (inclusive ? 1 : 0) - if (pos >= minChar && pos < limChar) { - - // TODO: Since AST is sometimes not correct wrt to position, only add "cur" if it's better - // than top of the stack. - var previous = ctx.path.ast(); - if (previous == null || (cur.minChar >= previous.minChar && cur.limChar <= previous.limChar)) { - ctx.path.push(cur); - } - else { - //logger.log("TODO: Ignoring node because minChar, limChar not better than previous node in stack"); - } - } - - // The AST walker skips comments, but we might be in one, so check the pre/post comments for this node manually - if (pos < limChar) { - lookInComments(cur.preComments); - } - if (pos >= minChar) { - lookInComments(cur.postComments); - } - - if (!hasFlag(options, GetAstPathOptions.DontPruneSearchBasedOnPosition)) { - ~~~~~~~ -!!! error TS2304: Cannot find name 'hasFlag'. - // Don't go further down the tree if pos is outside of [minChar, limChar] - walker.options.goChildren = (minChar <= pos && pos <= limChar); - } - } - return cur; - } - - var ctx = new AstPathContext(); - TypeScript.getAstWalkerFactory().walk(script, pre, null, null, ctx); - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. - return ctx.path; - } - - // - // Find a source text offset that is safe for lexing tokens at the given position. - // This is used when "position" might be inside a comment or string, etc. - // - export function getTokenizationOffset(script: TypeScript.Script, position: number): number { - ~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'Script'. - var bestOffset = 0; - var pre = (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker): TypeScript.AST => { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - ~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - if (TypeScript.isValidAstNode(cur)) { - // Did we find a closer offset? - if (cur.minChar <= position) { - bestOffset = max(bestOffset, cur.minChar); - } - - // Stop the walk if this node is not related to "minChar" - if (cur.minChar > position || cur.limChar < bestOffset) { - walker.options.goChildren = false; - } - } - - return cur; - } - - TypeScript.getAstWalkerFactory().walk(script, pre); - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. - return bestOffset; - } - - /// - /// Simple function to Walk an AST using a simple callback function. - /// - export function walkAST(ast: TypeScript.AST, callback: (path: AstPath, walker: TypeScript.IAstWalker) => void ): void { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - ~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. - var pre = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - ~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. - var path: TypeScript.AstPath = walker.state; - path.push(cur); - callback(path, walker); - return cur; - } - var post = function (cur: TypeScript.AST, parent: TypeScript.AST, walker: TypeScript.IAstWalker) { - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - ~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'AST'. - ~~~~~~~~~~ -!!! error TS2694: Namespace 'TypeScript' has no exported member 'IAstWalker'. - var path: TypeScript.AstPath = walker.state; - path.pop(); - return cur; - } - - var path = new AstPath(); - TypeScript.getAstWalkerFactory().walk(ast, pre, post, null, path); - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource2.d.ts deleted file mode 100644 index 48a67f64e95b9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource2.d.ts +++ /dev/null @@ -1,774 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/parserRealSource2.ts] //// - -//// [parserRealSource2.ts] -// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. -// See LICENSE.txt in the project root for complete license information. - -/// - -module TypeScript { - - export function hasFlag(val: number, flag: number): boolean { - return (val & flag) != 0; - } - - export enum ErrorRecoverySet { - None = 0, - Comma = 1, // Comma - SColon = 1 << 1, // SColon - Asg = 1 << 2, // Asg - BinOp = 1 << 3, // Lsh, Rsh, Rs2, Le, Ge, INSTANCEOF, EQ, NE, Eqv, NEqv, LogAnd, LogOr, AsgMul, AsgDiv - // AsgMod, AsgAdd, AsgSub, AsgLsh, AsgRsh, AsgRs2, AsgAnd, AsgXor, AsgOr, QMark, Mult, Div, - // Pct, GT, LT, And, Xor, Or - RBrack = 1 << 4, // RBrack - RCurly = 1 << 5, // RCurly - RParen = 1 << 6, // RParen - Dot = 1 << 7, // Dot - Colon = 1 << 8, // Colon - PrimType = 1 << 9, // number, string, boolean - AddOp = 1 << 10, // Add, Sub - LCurly = 1 << 11, // LCurly - PreOp = 1 << 12, // Tilde, Bang, Inc, Dec - RegExp = 1 << 13, // RegExp - LParen = 1 << 14, // LParen - LBrack = 1 << 15, // LBrack - Scope = 1 << 16, // Scope - In = 1 << 17, // IN - SCase = 1 << 18, // CASE, DEFAULT - Else = 1 << 19, // ELSE - Catch = 1 << 20, // CATCH, FINALLY - Var = 1 << 21, // - Stmt = 1 << 22, // BREAK, RETURN, THROW, DEBUGGER, FOR, SWITCH, DO, IF, TRY, WITH - While = 1 << 23, // WHILE - ID = 1 << 24, // ID - Prefix = 1 << 25, // VOID, DELETE, TYPEOF, AWAIT - Literal = 1 << 26, // IntCon, FltCon, StrCon - RLit = 1 << 27, // THIS, TRUE, FALSE, NULL - Func = 1 << 28, // FUNCTION - EOF = 1 << 29, // EOF - - // REVIEW: Name this something clearer. - TypeScriptS = 1 << 30, // PROPERTY, PRIVATE, STATIC, INTERFACE, CLASS, MODULE, EXPORT, IMPORT - ExprStart = SColon | AddOp | LCurly | PreOp | RegExp | LParen | LBrack | ID | Prefix | RLit | Func | Literal, - StmtStart = ExprStart | SColon | Var | Stmt | While | TypeScriptS, - Postfix = Dot | LParen | LBrack, - } - - export enum AllowedElements { - None = 0, - ModuleDeclarations = 1 << 2, - ClassDeclarations = 1 << 3, - InterfaceDeclarations = 1 << 4, - AmbientDeclarations = 1 << 10, - Properties = 1 << 11, - - Global = ModuleDeclarations | ClassDeclarations | InterfaceDeclarations | AmbientDeclarations, - QuickParse = Global | Properties, - } - - export enum Modifiers { - None = 0, - Private = 1, - Public = 1 << 1, - Readonly = 1 << 2, - Ambient = 1 << 3, - Exported = 1 << 4, - Getter = 1 << 5, - Setter = 1 << 6, - Static = 1 << 7, - } - - export enum ASTFlags { - None = 0, - ExplicitSemicolon = 1, // statment terminated by an explicit semicolon - AutomaticSemicolon = 1 << 1, // statment terminated by an automatic semicolon - Writeable = 1 << 2, // node is lhs that can be modified - Error = 1 << 3, // node has an error - DotLHSPartial = 1 << 4, // node is the lhs of an incomplete dot expr at cursor - DotLHS = 1 << 5, // node is the lhs of a dot expr - IsStatement = 1 << 6, // node is a statement - StrictMode = 1 << 7, // node is in the strict mode environment - PossibleOptionalParameter = 1 << 8, - ClassBaseConstructorCall = 1 << 9, - OptionalName = 1 << 10, - // REVIEW: This flag is to mark lambda nodes to note that the LParen of an expression has already been matched in the lambda header. - // The flag is used to communicate this piece of information to the calling parseTerm, which intern will remove it. - // Once we have a better way to associate information with nodes, this flag should not be used. - SkipNextRParen = 1 << 11, - } - - export enum DeclFlags { - None = 0, - Exported = 1, - Private = 1 << 1, - Public = 1 << 2, - Ambient = 1 << 3, - Static = 1 << 4, - LocalStatic = 1 << 5, - GetAccessor = 1 << 6, - SetAccessor = 1 << 7, - } - - export enum ModuleFlags { - None = 0, - Exported = 1, - Private = 1 << 1, - Public = 1 << 2, - Ambient = 1 << 3, - Static = 1 << 4, - LocalStatic = 1 << 5, - GetAccessor = 1 << 6, - SetAccessor = 1 << 7, - IsEnum = 1 << 8, - ShouldEmitModuleDecl = 1 << 9, - IsWholeFile = 1 << 10, - IsDynamic = 1 << 11, - MustCaptureThis = 1 << 12, - } - - export enum SymbolFlags { - None = 0, - Exported = 1, - Private = 1 << 1, - Public = 1 << 2, - Ambient = 1 << 3, - Static = 1 << 4, - LocalStatic = 1 << 5, - GetAccessor = 1 << 6, - SetAccessor = 1 << 7, - Property = 1 << 8, - Readonly = 1 << 9, - ModuleMember = 1 << 10, - InterfaceMember = 1 << 11, - ClassMember = 1 << 12, - BuiltIn = 1 << 13, - TypeSetDuringScopeAssignment = 1 << 14, - Constant = 1 << 15, - Optional = 1 << 16, - RecursivelyReferenced = 1 << 17, - Bound = 1 << 18, - CompilerGenerated = 1 << 19, - } - - export enum VarFlags { - None = 0, - Exported = 1, - Private = 1 << 1, - Public = 1 << 2, - Ambient = 1 << 3, - Static = 1 << 4, - LocalStatic = 1 << 5, - GetAccessor = 1 << 6, - SetAccessor = 1 << 7, - AutoInit = 1 << 8, - Property = 1 << 9, - Readonly = 1 << 10, - Class = 1 << 11, - ClassProperty = 1 << 12, - ClassBodyProperty = 1 << 13, - ClassConstructorProperty = 1 << 14, - ClassSuperMustBeFirstCallInConstructor = 1 << 15, - Constant = 1 << 16, - MustCaptureThis = 1 << 17, - } - - export enum FncFlags { - None = 0, - Exported = 1, - Private = 1 << 1, - Public = 1 << 2, - Ambient = 1 << 3, - Static = 1 << 4, - LocalStatic = 1 << 5, - GetAccessor = 1 << 6, - SetAccessor = 1 << 7, - Definition = 1 << 8, - Signature = 1 << 9, - Method = 1 << 10, - HasReturnExpression = 1 << 11, - CallMember = 1 << 12, - ConstructMember = 1 << 13, - HasSelfReference = 1 << 14, - IsFatArrowFunction = 1 << 15, - IndexerMember = 1 << 16, - IsFunctionExpression = 1 << 17, - ClassMethod = 1 << 18, - ClassPropertyMethodExported = 1 << 19, - } - - export enum SignatureFlags { - None = 0, - IsIndexer = 1, - IsStringIndexer = 1 << 1, - IsNumberIndexer = 1 << 2, - } - - export function ToDeclFlags(fncFlags: FncFlags) : DeclFlags; - export function ToDeclFlags(varFlags: VarFlags) : DeclFlags; - export function ToDeclFlags(symFlags: SymbolFlags): DeclFlags; - export function ToDeclFlags(moduleFlags: ModuleFlags): DeclFlags; - export function ToDeclFlags(fncOrVarOrSymbolOrModuleFlags: any) { - return fncOrVarOrSymbolOrModuleFlags; - } - - export enum TypeFlags { - None = 0, - HasImplementation = 1, - HasSelfReference = 1 << 1, - MergeResult = 1 << 2, - IsEnum = 1 << 3, - BuildingName = 1 << 4, - HasBaseType = 1 << 5, - HasBaseTypeOfObject = 1 << 6, - IsClass = 1 << 7, - } - - export enum TypeRelationshipFlags { - SuccessfulComparison = 0, - SourceIsNullTargetIsVoidOrUndefined = 1, - RequiredPropertyIsMissing = 1 << 1, - IncompatibleSignatures = 1 << 2, - SourceSignatureHasTooManyParameters = 3, - IncompatibleReturnTypes = 1 << 4, - IncompatiblePropertyTypes = 1 << 5, - IncompatibleParameterTypes = 1 << 6, - } - - export enum CodeGenTarget { - ES3 = 0, - ES5 = 1, - } - - export enum ModuleGenTarget { - Synchronous = 0, - Asynchronous = 1, - Local = 1 << 1, - } - - // Compiler defaults to generating ES5-compliant code for - // - getters and setters - export var codeGenTarget: CodeGenTarget = CodeGenTarget.ES3; - - export var moduleGenTarget: ModuleGenTarget = ModuleGenTarget.Synchronous; - - export var optimizeModuleCodeGen = true; - - export function flagsToString(e: any, flags: number): string { - var builder = ""; - for (var i = 1; i < (1 << 31) ; i = i << 1) { - if ((flags & i) != 0) { - for (var k in e) { - if (e[k] == i) { - if (builder.length > 0) { - builder += "|"; - } - builder += k; - break; - } - } - } - } - return builder; - } - -} - -/// [Declarations] //// - - - -//// [parserRealSource2.d.ts] -declare namespace TypeScript { - function hasFlag(val: number, flag: number): boolean; - enum ErrorRecoverySet { - None = 0, - Comma = 1,// Comma - SColon = 2,// SColon - Asg = 4,// Asg - BinOp = 8,// Lsh, Rsh, Rs2, Le, Ge, INSTANCEOF, EQ, NE, Eqv, NEqv, LogAnd, LogOr, AsgMul, AsgDiv - RBrack = 16,// RBrack - RCurly = 32,// RCurly - RParen = 64,// RParen - Dot = 128,// Dot - Colon = 256,// Colon - PrimType = 512,// number, string, boolean - AddOp = 1024,// Add, Sub - LCurly = 2048,// LCurly - PreOp = 4096,// Tilde, Bang, Inc, Dec - RegExp = 8192,// RegExp - LParen = 16384,// LParen - LBrack = 32768,// LBrack - Scope = 65536,// Scope - In = 131072,// IN - SCase = 262144,// CASE, DEFAULT - Else = 524288,// ELSE - Catch = 1048576,// CATCH, FINALLY - Var = 2097152,// - Stmt = 4194304,// BREAK, RETURN, THROW, DEBUGGER, FOR, SWITCH, DO, IF, TRY, WITH - While = 8388608,// WHILE - ID = 16777216,// ID - Prefix = 33554432,// VOID, DELETE, TYPEOF, AWAIT - Literal = 67108864,// IntCon, FltCon, StrCon - RLit = 134217728,// THIS, TRUE, FALSE, NULL - Func = 268435456,// FUNCTION - EOF = 536870912,// EOF - TypeScriptS = 1073741824,// PROPERTY, PRIVATE, STATIC, INTERFACE, CLASS, MODULE, EXPORT, IMPORT - ExprStart = 520158210, - StmtStart = 1608580098, - Postfix = 49280 - } - enum AllowedElements { - None = 0, - ModuleDeclarations = 4, - ClassDeclarations = 8, - InterfaceDeclarations = 16, - AmbientDeclarations = 1024, - Properties = 2048, - Global = 1052, - QuickParse = 3100 - } - enum Modifiers { - None = 0, - Private = 1, - Public = 2, - Readonly = 4, - Ambient = 8, - Exported = 16, - Getter = 32, - Setter = 64, - Static = 128 - } - enum ASTFlags { - None = 0, - ExplicitSemicolon = 1,// statment terminated by an explicit semicolon - AutomaticSemicolon = 2,// statment terminated by an automatic semicolon - Writeable = 4,// node is lhs that can be modified - Error = 8,// node has an error - DotLHSPartial = 16,// node is the lhs of an incomplete dot expr at cursor - DotLHS = 32,// node is the lhs of a dot expr - IsStatement = 64,// node is a statement - StrictMode = 128,// node is in the strict mode environment - PossibleOptionalParameter = 256, - ClassBaseConstructorCall = 512, - OptionalName = 1024, - SkipNextRParen = 2048 - } - enum DeclFlags { - None = 0, - Exported = 1, - Private = 2, - Public = 4, - Ambient = 8, - Static = 16, - LocalStatic = 32, - GetAccessor = 64, - SetAccessor = 128 - } - enum ModuleFlags { - None = 0, - Exported = 1, - Private = 2, - Public = 4, - Ambient = 8, - Static = 16, - LocalStatic = 32, - GetAccessor = 64, - SetAccessor = 128, - IsEnum = 256, - ShouldEmitModuleDecl = 512, - IsWholeFile = 1024, - IsDynamic = 2048, - MustCaptureThis = 4096 - } - enum SymbolFlags { - None = 0, - Exported = 1, - Private = 2, - Public = 4, - Ambient = 8, - Static = 16, - LocalStatic = 32, - GetAccessor = 64, - SetAccessor = 128, - Property = 256, - Readonly = 512, - ModuleMember = 1024, - InterfaceMember = 2048, - ClassMember = 4096, - BuiltIn = 8192, - TypeSetDuringScopeAssignment = 16384, - Constant = 32768, - Optional = 65536, - RecursivelyReferenced = 131072, - Bound = 262144, - CompilerGenerated = 524288 - } - enum VarFlags { - None = 0, - Exported = 1, - Private = 2, - Public = 4, - Ambient = 8, - Static = 16, - LocalStatic = 32, - GetAccessor = 64, - SetAccessor = 128, - AutoInit = 256, - Property = 512, - Readonly = 1024, - Class = 2048, - ClassProperty = 4096, - ClassBodyProperty = 8192, - ClassConstructorProperty = 16384, - ClassSuperMustBeFirstCallInConstructor = 32768, - Constant = 65536, - MustCaptureThis = 131072 - } - enum FncFlags { - None = 0, - Exported = 1, - Private = 2, - Public = 4, - Ambient = 8, - Static = 16, - LocalStatic = 32, - GetAccessor = 64, - SetAccessor = 128, - Definition = 256, - Signature = 512, - Method = 1024, - HasReturnExpression = 2048, - CallMember = 4096, - ConstructMember = 8192, - HasSelfReference = 16384, - IsFatArrowFunction = 32768, - IndexerMember = 65536, - IsFunctionExpression = 131072, - ClassMethod = 262144, - ClassPropertyMethodExported = 524288 - } - enum SignatureFlags { - None = 0, - IsIndexer = 1, - IsStringIndexer = 2, - IsNumberIndexer = 4 - } - function ToDeclFlags(fncFlags: FncFlags): DeclFlags; - function ToDeclFlags(varFlags: VarFlags): DeclFlags; - function ToDeclFlags(symFlags: SymbolFlags): DeclFlags; - function ToDeclFlags(moduleFlags: ModuleFlags): DeclFlags; - enum TypeFlags { - None = 0, - HasImplementation = 1, - HasSelfReference = 2, - MergeResult = 4, - IsEnum = 8, - BuildingName = 16, - HasBaseType = 32, - HasBaseTypeOfObject = 64, - IsClass = 128 - } - enum TypeRelationshipFlags { - SuccessfulComparison = 0, - SourceIsNullTargetIsVoidOrUndefined = 1, - RequiredPropertyIsMissing = 2, - IncompatibleSignatures = 4, - SourceSignatureHasTooManyParameters = 3, - IncompatibleReturnTypes = 16, - IncompatiblePropertyTypes = 32, - IncompatibleParameterTypes = 64 - } - enum CodeGenTarget { - ES3 = 0, - ES5 = 1 - } - enum ModuleGenTarget { - Synchronous = 0, - Asynchronous = 1, - Local = 2 - } - var codeGenTarget: CodeGenTarget; - var moduleGenTarget: ModuleGenTarget; - var optimizeModuleCodeGen: boolean; - function flagsToString(e: any, flags: number): string; -} - -/// [Errors] //// - -parserRealSource2.ts(4,21): error TS6053: File 'typescript.ts' not found. - - -==== parserRealSource2.ts (1 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// - ~~~~~~~~~~~~~ -!!! error TS6053: File 'typescript.ts' not found. - - module TypeScript { - - export function hasFlag(val: number, flag: number): boolean { - return (val & flag) != 0; - } - - export enum ErrorRecoverySet { - None = 0, - Comma = 1, // Comma - SColon = 1 << 1, // SColon - Asg = 1 << 2, // Asg - BinOp = 1 << 3, // Lsh, Rsh, Rs2, Le, Ge, INSTANCEOF, EQ, NE, Eqv, NEqv, LogAnd, LogOr, AsgMul, AsgDiv - // AsgMod, AsgAdd, AsgSub, AsgLsh, AsgRsh, AsgRs2, AsgAnd, AsgXor, AsgOr, QMark, Mult, Div, - // Pct, GT, LT, And, Xor, Or - RBrack = 1 << 4, // RBrack - RCurly = 1 << 5, // RCurly - RParen = 1 << 6, // RParen - Dot = 1 << 7, // Dot - Colon = 1 << 8, // Colon - PrimType = 1 << 9, // number, string, boolean - AddOp = 1 << 10, // Add, Sub - LCurly = 1 << 11, // LCurly - PreOp = 1 << 12, // Tilde, Bang, Inc, Dec - RegExp = 1 << 13, // RegExp - LParen = 1 << 14, // LParen - LBrack = 1 << 15, // LBrack - Scope = 1 << 16, // Scope - In = 1 << 17, // IN - SCase = 1 << 18, // CASE, DEFAULT - Else = 1 << 19, // ELSE - Catch = 1 << 20, // CATCH, FINALLY - Var = 1 << 21, // - Stmt = 1 << 22, // BREAK, RETURN, THROW, DEBUGGER, FOR, SWITCH, DO, IF, TRY, WITH - While = 1 << 23, // WHILE - ID = 1 << 24, // ID - Prefix = 1 << 25, // VOID, DELETE, TYPEOF, AWAIT - Literal = 1 << 26, // IntCon, FltCon, StrCon - RLit = 1 << 27, // THIS, TRUE, FALSE, NULL - Func = 1 << 28, // FUNCTION - EOF = 1 << 29, // EOF - - // REVIEW: Name this something clearer. - TypeScriptS = 1 << 30, // PROPERTY, PRIVATE, STATIC, INTERFACE, CLASS, MODULE, EXPORT, IMPORT - ExprStart = SColon | AddOp | LCurly | PreOp | RegExp | LParen | LBrack | ID | Prefix | RLit | Func | Literal, - StmtStart = ExprStart | SColon | Var | Stmt | While | TypeScriptS, - Postfix = Dot | LParen | LBrack, - } - - export enum AllowedElements { - None = 0, - ModuleDeclarations = 1 << 2, - ClassDeclarations = 1 << 3, - InterfaceDeclarations = 1 << 4, - AmbientDeclarations = 1 << 10, - Properties = 1 << 11, - - Global = ModuleDeclarations | ClassDeclarations | InterfaceDeclarations | AmbientDeclarations, - QuickParse = Global | Properties, - } - - export enum Modifiers { - None = 0, - Private = 1, - Public = 1 << 1, - Readonly = 1 << 2, - Ambient = 1 << 3, - Exported = 1 << 4, - Getter = 1 << 5, - Setter = 1 << 6, - Static = 1 << 7, - } - - export enum ASTFlags { - None = 0, - ExplicitSemicolon = 1, // statment terminated by an explicit semicolon - AutomaticSemicolon = 1 << 1, // statment terminated by an automatic semicolon - Writeable = 1 << 2, // node is lhs that can be modified - Error = 1 << 3, // node has an error - DotLHSPartial = 1 << 4, // node is the lhs of an incomplete dot expr at cursor - DotLHS = 1 << 5, // node is the lhs of a dot expr - IsStatement = 1 << 6, // node is a statement - StrictMode = 1 << 7, // node is in the strict mode environment - PossibleOptionalParameter = 1 << 8, - ClassBaseConstructorCall = 1 << 9, - OptionalName = 1 << 10, - // REVIEW: This flag is to mark lambda nodes to note that the LParen of an expression has already been matched in the lambda header. - // The flag is used to communicate this piece of information to the calling parseTerm, which intern will remove it. - // Once we have a better way to associate information with nodes, this flag should not be used. - SkipNextRParen = 1 << 11, - } - - export enum DeclFlags { - None = 0, - Exported = 1, - Private = 1 << 1, - Public = 1 << 2, - Ambient = 1 << 3, - Static = 1 << 4, - LocalStatic = 1 << 5, - GetAccessor = 1 << 6, - SetAccessor = 1 << 7, - } - - export enum ModuleFlags { - None = 0, - Exported = 1, - Private = 1 << 1, - Public = 1 << 2, - Ambient = 1 << 3, - Static = 1 << 4, - LocalStatic = 1 << 5, - GetAccessor = 1 << 6, - SetAccessor = 1 << 7, - IsEnum = 1 << 8, - ShouldEmitModuleDecl = 1 << 9, - IsWholeFile = 1 << 10, - IsDynamic = 1 << 11, - MustCaptureThis = 1 << 12, - } - - export enum SymbolFlags { - None = 0, - Exported = 1, - Private = 1 << 1, - Public = 1 << 2, - Ambient = 1 << 3, - Static = 1 << 4, - LocalStatic = 1 << 5, - GetAccessor = 1 << 6, - SetAccessor = 1 << 7, - Property = 1 << 8, - Readonly = 1 << 9, - ModuleMember = 1 << 10, - InterfaceMember = 1 << 11, - ClassMember = 1 << 12, - BuiltIn = 1 << 13, - TypeSetDuringScopeAssignment = 1 << 14, - Constant = 1 << 15, - Optional = 1 << 16, - RecursivelyReferenced = 1 << 17, - Bound = 1 << 18, - CompilerGenerated = 1 << 19, - } - - export enum VarFlags { - None = 0, - Exported = 1, - Private = 1 << 1, - Public = 1 << 2, - Ambient = 1 << 3, - Static = 1 << 4, - LocalStatic = 1 << 5, - GetAccessor = 1 << 6, - SetAccessor = 1 << 7, - AutoInit = 1 << 8, - Property = 1 << 9, - Readonly = 1 << 10, - Class = 1 << 11, - ClassProperty = 1 << 12, - ClassBodyProperty = 1 << 13, - ClassConstructorProperty = 1 << 14, - ClassSuperMustBeFirstCallInConstructor = 1 << 15, - Constant = 1 << 16, - MustCaptureThis = 1 << 17, - } - - export enum FncFlags { - None = 0, - Exported = 1, - Private = 1 << 1, - Public = 1 << 2, - Ambient = 1 << 3, - Static = 1 << 4, - LocalStatic = 1 << 5, - GetAccessor = 1 << 6, - SetAccessor = 1 << 7, - Definition = 1 << 8, - Signature = 1 << 9, - Method = 1 << 10, - HasReturnExpression = 1 << 11, - CallMember = 1 << 12, - ConstructMember = 1 << 13, - HasSelfReference = 1 << 14, - IsFatArrowFunction = 1 << 15, - IndexerMember = 1 << 16, - IsFunctionExpression = 1 << 17, - ClassMethod = 1 << 18, - ClassPropertyMethodExported = 1 << 19, - } - - export enum SignatureFlags { - None = 0, - IsIndexer = 1, - IsStringIndexer = 1 << 1, - IsNumberIndexer = 1 << 2, - } - - export function ToDeclFlags(fncFlags: FncFlags) : DeclFlags; - export function ToDeclFlags(varFlags: VarFlags) : DeclFlags; - export function ToDeclFlags(symFlags: SymbolFlags): DeclFlags; - export function ToDeclFlags(moduleFlags: ModuleFlags): DeclFlags; - export function ToDeclFlags(fncOrVarOrSymbolOrModuleFlags: any) { - return fncOrVarOrSymbolOrModuleFlags; - } - - export enum TypeFlags { - None = 0, - HasImplementation = 1, - HasSelfReference = 1 << 1, - MergeResult = 1 << 2, - IsEnum = 1 << 3, - BuildingName = 1 << 4, - HasBaseType = 1 << 5, - HasBaseTypeOfObject = 1 << 6, - IsClass = 1 << 7, - } - - export enum TypeRelationshipFlags { - SuccessfulComparison = 0, - SourceIsNullTargetIsVoidOrUndefined = 1, - RequiredPropertyIsMissing = 1 << 1, - IncompatibleSignatures = 1 << 2, - SourceSignatureHasTooManyParameters = 3, - IncompatibleReturnTypes = 1 << 4, - IncompatiblePropertyTypes = 1 << 5, - IncompatibleParameterTypes = 1 << 6, - } - - export enum CodeGenTarget { - ES3 = 0, - ES5 = 1, - } - - export enum ModuleGenTarget { - Synchronous = 0, - Asynchronous = 1, - Local = 1 << 1, - } - - // Compiler defaults to generating ES5-compliant code for - // - getters and setters - export var codeGenTarget: CodeGenTarget = CodeGenTarget.ES3; - - export var moduleGenTarget: ModuleGenTarget = ModuleGenTarget.Synchronous; - - export var optimizeModuleCodeGen = true; - - export function flagsToString(e: any, flags: number): string { - var builder = ""; - for (var i = 1; i < (1 << 31) ; i = i << 1) { - if ((flags & i) != 0) { - for (var k in e) { - if (e[k] == i) { - if (builder.length > 0) { - builder += "|"; - } - builder += k; - break; - } - } - } - } - return builder; - } - - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource3.d.ts deleted file mode 100644 index 932f94534288c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserRealSource3.d.ts +++ /dev/null @@ -1,369 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/parserRealSource3.ts] //// - -//// [parserRealSource3.ts] -// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. -// See LICENSE.txt in the project root for complete license information. - -/// - -module TypeScript { - // Note: Any addition to the NodeType should also be supported with addition to AstWalkerDetailCallback - export enum NodeType { - None, - Empty, - EmptyExpr, - True, - False, - This, - Super, - QString, - Regex, - Null, - ArrayLit, - ObjectLit, - Void, - Comma, - Pos, - Neg, - Delete, - Await, - In, - Dot, - From, - Is, - InstOf, - Typeof, - NumberLit, - Name, - TypeRef, - Index, - Call, - New, - Asg, - AsgAdd, - AsgSub, - AsgDiv, - AsgMul, - AsgMod, - AsgAnd, - AsgXor, - AsgOr, - AsgLsh, - AsgRsh, - AsgRs2, - ConditionalExpression, - LogOr, - LogAnd, - Or, - Xor, - And, - Eq, - Ne, - Eqv, - NEqv, - Lt, - Le, - Gt, - Ge, - Add, - Sub, - Mul, - Div, - Mod, - Lsh, - Rsh, - Rs2, - Not, - LogNot, - IncPre, - DecPre, - IncPost, - DecPost, - TypeAssertion, - FuncDecl, - Member, - VarDecl, - ArgDecl, - Return, - Break, - Continue, - Throw, - For, - ForIn, - If, - While, - DoWhile, - Block, - Case, - Switch, - Try, - TryCatch, - TryFinally, - Finally, - Catch, - List, - Script, - ClassDeclaration, - InterfaceDeclaration, - ModuleDeclaration, - ImportDeclaration, - With, - Label, - LabeledStatement, - EBStart, - GotoEB, - EndCode, - Error, - Comment, - Debugger, - GeneralNode = FuncDecl, - LastAsg = AsgRs2, - } -} - -/// [Declarations] //// - - - -//// [parserRealSource3.d.ts] -declare namespace TypeScript { - enum NodeType { - None = 0, - Empty = 1, - EmptyExpr = 2, - True = 3, - False = 4, - This = 5, - Super = 6, - QString = 7, - Regex = 8, - Null = 9, - ArrayLit = 10, - ObjectLit = 11, - Void = 12, - Comma = 13, - Pos = 14, - Neg = 15, - Delete = 16, - Await = 17, - In = 18, - Dot = 19, - From = 20, - Is = 21, - InstOf = 22, - Typeof = 23, - NumberLit = 24, - Name = 25, - TypeRef = 26, - Index = 27, - Call = 28, - New = 29, - Asg = 30, - AsgAdd = 31, - AsgSub = 32, - AsgDiv = 33, - AsgMul = 34, - AsgMod = 35, - AsgAnd = 36, - AsgXor = 37, - AsgOr = 38, - AsgLsh = 39, - AsgRsh = 40, - AsgRs2 = 41, - ConditionalExpression = 42, - LogOr = 43, - LogAnd = 44, - Or = 45, - Xor = 46, - And = 47, - Eq = 48, - Ne = 49, - Eqv = 50, - NEqv = 51, - Lt = 52, - Le = 53, - Gt = 54, - Ge = 55, - Add = 56, - Sub = 57, - Mul = 58, - Div = 59, - Mod = 60, - Lsh = 61, - Rsh = 62, - Rs2 = 63, - Not = 64, - LogNot = 65, - IncPre = 66, - DecPre = 67, - IncPost = 68, - DecPost = 69, - TypeAssertion = 70, - FuncDecl = 71, - Member = 72, - VarDecl = 73, - ArgDecl = 74, - Return = 75, - Break = 76, - Continue = 77, - Throw = 78, - For = 79, - ForIn = 80, - If = 81, - While = 82, - DoWhile = 83, - Block = 84, - Case = 85, - Switch = 86, - Try = 87, - TryCatch = 88, - TryFinally = 89, - Finally = 90, - Catch = 91, - List = 92, - Script = 93, - ClassDeclaration = 94, - InterfaceDeclaration = 95, - ModuleDeclaration = 96, - ImportDeclaration = 97, - With = 98, - Label = 99, - LabeledStatement = 100, - EBStart = 101, - GotoEB = 102, - EndCode = 103, - Error = 104, - Comment = 105, - Debugger = 106, - GeneralNode = 71, - LastAsg = 41 - } -} - -/// [Errors] //// - -parserRealSource3.ts(4,21): error TS6053: File 'typescript.ts' not found. - - -==== parserRealSource3.ts (1 errors) ==== - // Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. - // See LICENSE.txt in the project root for complete license information. - - /// - ~~~~~~~~~~~~~ -!!! error TS6053: File 'typescript.ts' not found. - - module TypeScript { - // Note: Any addition to the NodeType should also be supported with addition to AstWalkerDetailCallback - export enum NodeType { - None, - Empty, - EmptyExpr, - True, - False, - This, - Super, - QString, - Regex, - Null, - ArrayLit, - ObjectLit, - Void, - Comma, - Pos, - Neg, - Delete, - Await, - In, - Dot, - From, - Is, - InstOf, - Typeof, - NumberLit, - Name, - TypeRef, - Index, - Call, - New, - Asg, - AsgAdd, - AsgSub, - AsgDiv, - AsgMul, - AsgMod, - AsgAnd, - AsgXor, - AsgOr, - AsgLsh, - AsgRsh, - AsgRs2, - ConditionalExpression, - LogOr, - LogAnd, - Or, - Xor, - And, - Eq, - Ne, - Eqv, - NEqv, - Lt, - Le, - Gt, - Ge, - Add, - Sub, - Mul, - Div, - Mod, - Lsh, - Rsh, - Rs2, - Not, - LogNot, - IncPre, - DecPre, - IncPost, - DecPost, - TypeAssertion, - FuncDecl, - Member, - VarDecl, - ArgDecl, - Return, - Break, - Continue, - Throw, - For, - ForIn, - If, - While, - DoWhile, - Block, - Case, - Switch, - Try, - TryCatch, - TryFinally, - Finally, - Catch, - List, - Script, - ClassDeclaration, - InterfaceDeclaration, - ModuleDeclaration, - ImportDeclaration, - With, - Label, - LabeledStatement, - EBStart, - GotoEB, - EndCode, - Error, - Comment, - Debugger, - GeneralNode = FuncDecl, - LastAsg = AsgRs2, - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserSkippedTokens16.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserSkippedTokens16.d.ts deleted file mode 100644 index 547630e82e059..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserSkippedTokens16.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens16.ts] //// - -//// [parserSkippedTokens16.ts] -foo(): Bar { } -function Foo (): any ¬ { } -4+:5 -module M { -function a( - : T) { } -} -var x = - -/// [Declarations] //// - - - -//// [parserSkippedTokens16.d.ts] -declare function Foo(): any; -declare namespace M { -} -declare var x: any; - -/// [Errors] //// - -parserSkippedTokens16.ts(1,1): error TS2552: Cannot find name 'foo'. Did you mean 'Foo'? -parserSkippedTokens16.ts(1,6): error TS1005: ';' expected. -parserSkippedTokens16.ts(1,8): error TS1434: Unexpected keyword or identifier. -parserSkippedTokens16.ts(1,8): error TS2304: Cannot find name 'Bar'. -parserSkippedTokens16.ts(2,27): error TS1127: Invalid character. -parserSkippedTokens16.ts(3,3): error TS1109: Expression expected. -parserSkippedTokens16.ts(6,5): error TS1138: Parameter declaration expected. -parserSkippedTokens16.ts(8,14): error TS1109: Expression expected. - - -==== parserSkippedTokens16.ts (8 errors) ==== - foo(): Bar { } - ~~~ -!!! error TS2552: Cannot find name 'foo'. Did you mean 'Foo'? -!!! related TS2728 parserSkippedTokens16.ts:2:10: 'Foo' is declared here. - ~ -!!! error TS1005: ';' expected. - ~~~ -!!! error TS1434: Unexpected keyword or identifier. - ~~~ -!!! error TS2304: Cannot find name 'Bar'. - function Foo (): any ¬ { } - ~ -!!! error TS1127: Invalid character. - 4+:5 - ~ -!!! error TS1109: Expression expected. - module M { - function a( - : T) { } - ~ -!!! error TS1138: Parameter declaration expected. - } - var x = - -!!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserStrictMode8.d.ts deleted file mode 100644 index d3db0a9c92416..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parserStrictMode8.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts] //// - -//// [parserStrictMode8.ts] -"use strict"; -function eval() { -} - -/// [Declarations] //// - - - -//// [parserStrictMode8.d.ts] - -/// [Errors] //// - -parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. - - -==== parserStrictMode8.ts (1 errors) ==== - "use strict"; - function eval() { - ~~~~ -!!! error TS1100: Invalid use of 'eval' in strict mode. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/preserveConstEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/preserveConstEnums.d.ts deleted file mode 100644 index 843e7ac257797..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/preserveConstEnums.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -//// [tests/cases/compiler/preserveConstEnums.ts] //// - -//// [preserveConstEnums.ts] -const enum E { - Value = 1, Value2 = Value -} - -/// [Declarations] //// - - - -//// [preserveConstEnums.d.ts] -declare const enum E { - Value = 1, - Value2 = 1 -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/propertyAssignmentUseParentType3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/propertyAssignmentUseParentType3.d.ts deleted file mode 100644 index 1151883ffd14c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/propertyAssignmentUseParentType3.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -//// [tests/cases/conformance/salsa/propertyAssignmentUseParentType3.ts] //// - -//// [propertyAssignmentUseParentType3.ts] -// don't use the parent type if it's a function declaration (#33741) - -function foo1(): number { - return 123; -} -foo1.toFixed = ""; - -function foo2(): any[] { - return []; -} -foo2.join = ""; - -function foo3(): string { - return ""; -} -foo3.trim = ""; - -function foo4(): ({x: number}) { - return {x: 123}; -} -foo4.x = "456"; - - -/// [Declarations] //// - - - -//// [propertyAssignmentUseParentType3.d.ts] -declare function foo1(): number; -declare namespace foo1 { - var toFixed: string; -} -declare function foo2(): any[]; -declare namespace foo2 { - var join: string; -} -declare function foo3(): string; -declare namespace foo3 { - var trim: string; -} -declare function foo4(): ({ - x: number; -}); -declare namespace foo4 { - var x: string; -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reexportClassDefinition.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reexportClassDefinition.d.ts deleted file mode 100644 index bffe06c31f860..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reexportClassDefinition.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -//// [tests/cases/conformance/externalModules/reexportClassDefinition.ts] //// - -//// [foo3.ts] -import foo2 = require('./foo2') -class x extends foo2.x {} - - -//// [foo1.ts] -class x{} -export = x; - -//// [foo2.ts] -import foo1 = require('./foo1'); - -export = { - x: foo1 -} - - -/// [Declarations] //// - - - -//// [foo1.d.ts] -declare class x { -} -export = x; - -//// [foo2.d.ts] -import foo1 = require('./foo1'); -declare const _default: { - x: typeof foo1; -}; -export = _default; - -//// [foo3.d.ts] -export {}; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reservedWords3.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reservedWords3.d.ts deleted file mode 100644 index 9bc91d8111988..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reservedWords3.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -//// [tests/cases/compiler/reservedWords3.ts] //// - -//// [reservedWords3.ts] -function f1(enum) {} -function f2(class) {} -function f3(function) {} -function f4(while) {} -function f5(for) {} - - -/// [Declarations] //// - - - -//// [reservedWords3.d.ts] -declare function f1(): any; -declare enum { -} -declare function f2(): any; -declare class { -} -declare function f3(): any; -declare function (): any; -declare function f4(): any; -declare function f5(): any; - -/// [Errors] //// - -reservedWords3.ts(1,13): error TS1390: 'enum' is not allowed as a parameter name. -reservedWords3.ts(1,17): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -reservedWords3.ts(1,17): error TS1003: Identifier expected. -reservedWords3.ts(2,13): error TS1390: 'class' is not allowed as a parameter name. -reservedWords3.ts(2,18): error TS1005: '{' expected. -reservedWords3.ts(3,13): error TS1390: 'function' is not allowed as a parameter name. -reservedWords3.ts(3,21): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -reservedWords3.ts(3,21): error TS1003: Identifier expected. -reservedWords3.ts(4,13): error TS1390: 'while' is not allowed as a parameter name. -reservedWords3.ts(4,18): error TS1005: '(' expected. -reservedWords3.ts(5,13): error TS1390: 'for' is not allowed as a parameter name. -reservedWords3.ts(5,16): error TS1005: '(' expected. - - -==== reservedWords3.ts (12 errors) ==== - function f1(enum) {} - ~~~~ -!!! error TS1390: 'enum' is not allowed as a parameter name. - -!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. - ~ -!!! error TS1003: Identifier expected. - function f2(class) {} - ~~~~~ -!!! error TS1390: 'class' is not allowed as a parameter name. - ~ -!!! error TS1005: '{' expected. - function f3(function) {} - ~~~~~~~~ -!!! error TS1390: 'function' is not allowed as a parameter name. - -!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. - ~ -!!! error TS1003: Identifier expected. - function f4(while) {} - ~~~~~ -!!! error TS1390: 'while' is not allowed as a parameter name. - ~ -!!! error TS1005: '(' expected. - function f5(for) {} - ~~~ -!!! error TS1390: 'for' is not allowed as a parameter name. - ~ -!!! error TS1005: '(' expected. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/staticsInAFunction.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/staticsInAFunction.d.ts deleted file mode 100644 index d6fee79d3da2e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/staticsInAFunction.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -//// [tests/cases/compiler/staticsInAFunction.ts] //// - -//// [staticsInAFunction.ts] -function boo{ - static test() - static test(name:string) - static test(name?:any){} -} - - -/// [Declarations] //// - - - -//// [staticsInAFunction.d.ts] -declare function boo(): void; - -/// [Errors] //// - -staticsInAFunction.ts(1,13): error TS1005: '(' expected. -staticsInAFunction.ts(2,4): error TS1128: Declaration or statement expected. -staticsInAFunction.ts(2,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. -staticsInAFunction.ts(3,4): error TS1128: Declaration or statement expected. -staticsInAFunction.ts(3,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. -staticsInAFunction.ts(3,16): error TS2304: Cannot find name 'name'. -staticsInAFunction.ts(3,20): error TS1005: ',' expected. -staticsInAFunction.ts(3,21): error TS2693: 'string' only refers to a type, but is being used as a value here. -staticsInAFunction.ts(4,4): error TS1128: Declaration or statement expected. -staticsInAFunction.ts(4,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. -staticsInAFunction.ts(4,16): error TS2304: Cannot find name 'name'. -staticsInAFunction.ts(4,21): error TS1109: Expression expected. -staticsInAFunction.ts(4,22): error TS2693: 'any' only refers to a type, but is being used as a value here. -staticsInAFunction.ts(4,26): error TS1005: ';' expected. - - -==== staticsInAFunction.ts (14 errors) ==== - function boo{ - ~ -!!! error TS1005: '(' expected. - static test() - ~~~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - static test(name:string) - ~~~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - ~~~~ -!!! error TS2304: Cannot find name 'name'. - ~ -!!! error TS1005: ',' expected. - ~~~~~~ -!!! error TS2693: 'string' only refers to a type, but is being used as a value here. - static test(name?:any){} - ~~~~~~ -!!! error TS1128: Declaration or statement expected. - ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. - ~~~~ -!!! error TS2304: Cannot find name 'name'. - ~ -!!! error TS1109: Expression expected. - ~~~ -!!! error TS2693: 'any' only refers to a type, but is being used as a value here. - ~ -!!! error TS1005: ';' expected. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/strictModeOctalLiterals.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/strictModeOctalLiterals.d.ts deleted file mode 100644 index 4549fae2c5c6e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/strictModeOctalLiterals.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -//// [tests/cases/conformance/expressions/literals/strictModeOctalLiterals.ts] //// - -//// [strictModeOctalLiterals.ts] -export enum E { - A = 12 + 01 -} -const orbitol: 01 = 01 - - -/// [Declarations] //// - - - -//// [strictModeOctalLiterals.d.ts] -export declare enum E { - A = 13 -} - -/// [Errors] //// - -strictModeOctalLiterals.ts(2,14): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. -strictModeOctalLiterals.ts(4,16): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. -strictModeOctalLiterals.ts(4,21): error TS1121: Octal literals are not allowed. Use the syntax '0o1'. - - -==== strictModeOctalLiterals.ts (3 errors) ==== - export enum E { - A = 12 + 01 - ~~ -!!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'. - } - const orbitol: 01 = 01 - ~~ -!!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'. - ~~ -!!! error TS1121: Octal literals are not allowed. Use the syntax '0o1'. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterType.d.ts deleted file mode 100644 index c175d86ae5e89..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterType.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/conformance/es6/templates/templateStringInFunctionParameterType.ts] //// - -//// [templateStringInFunctionParameterType.ts] -function f(: any: any`hello`): any; -function f(x: string): any; -function f(x: string) { - return x; -} - -/// [Declarations] //// - - - -//// [templateStringInFunctionParameterType.d.ts] -declare function f(any: any, : any): any; -declare function f(x: string): any; - -/// [Errors] //// - -templateStringInFunctionParameterType.ts(1,12): error TS1138: Parameter declaration expected. -templateStringInFunctionParameterType.ts(1,22): error TS1005: ',' expected. - - -==== templateStringInFunctionParameterType.ts (2 errors) ==== - function f(: any: any`hello`): any; - ~ -!!! error TS1138: Parameter declaration expected. - ~~~~~~~ -!!! error TS1005: ',' expected. - function f(x: string): any; - function f(x: string) { - return x; - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterTypeES6.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterTypeES6.d.ts deleted file mode 100644 index 117aa96cb0ffe..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringInFunctionParameterTypeES6.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/conformance/es6/templates/templateStringInFunctionParameterTypeES6.ts] //// - -//// [templateStringInFunctionParameterTypeES6.ts] -function f(: any: any`hello`): any; -function f(x: string): any; -function f(x: string) { - return x; -} - -/// [Declarations] //// - - - -//// [templateStringInFunctionParameterTypeES6.d.ts] -declare function f(any: any, : any): any; -declare function f(x: string): any; - -/// [Errors] //// - -templateStringInFunctionParameterTypeES6.ts(1,12): error TS1138: Parameter declaration expected. -templateStringInFunctionParameterTypeES6.ts(1,22): error TS1005: ',' expected. - - -==== templateStringInFunctionParameterTypeES6.ts (2 errors) ==== - function f(: any: any`hello`): any; - ~ -!!! error TS1138: Parameter declaration expected. - ~~~~~~~ -!!! error TS1005: ',' expected. - function f(x: string): any; - function f(x: string) { - return x; - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringWithEmbeddedYieldKeyword.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringWithEmbeddedYieldKeyword.d.ts deleted file mode 100644 index 5e09b432f6a46..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateStringWithEmbeddedYieldKeyword.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -//// [tests/cases/conformance/es6/templates/templateStringWithEmbeddedYieldKeyword.ts] //// - -//// [templateStringWithEmbeddedYieldKeyword.ts] -function* gen { - // Once this is supported, yield *must* be parenthesized. - var x = `abc${ yield 10 }def`; -} - - -/// [Declarations] //// - - - -//// [templateStringWithEmbeddedYieldKeyword.d.ts] -declare function gen(): {}; - -/// [Errors] //// - -error TS2318: Cannot find global type 'IterableIterator'. -templateStringWithEmbeddedYieldKeyword.ts(1,15): error TS1005: '(' expected. - - -!!! error TS2318: Cannot find global type 'IterableIterator'. -==== templateStringWithEmbeddedYieldKeyword.ts (1 errors) ==== - function* gen { - ~ -!!! error TS1005: '(' expected. - // Once this is supported, yield *must* be parenthesized. - var x = `abc${ yield 10 }def`; - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContexts.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContexts.d.ts deleted file mode 100644 index cf478ec2066e8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContexts.d.ts +++ /dev/null @@ -1,145 +0,0 @@ -//// [tests/cases/conformance/expressions/thisKeyword/thisInInvalidContexts.ts] //// - -//// [thisInInvalidContexts.ts] -class BaseErrClass { - constructor(t: any) { } -} - -class ClassWithNoInitializer extends BaseErrClass { - t: any; - //'this' in optional super call - constructor() { - super(this); // Error - } -} - -class ClassWithInitializer extends BaseErrClass { - t = 4; - //'this' in required super call - constructor() { - super(this); // Error - } -} - -module M { - //'this' in module variable - var x = this; // Error -} - -//'this' as type parameter constraint -// function fn() { } // Error - -//'this' as a type argument -function genericFunc(x: T): void { } -genericFunc(undefined); // Should be an error - -const ErrClass3Base: typeof globalThis = this; -class ErrClass3 extends ErrClass3Base { - -} - -//'this' as a computed enum value -enum SomeEnum { - A = this, // Should not be allowed - B = this.spaaaace // Also should not be allowed -} - - - -/// [Declarations] //// - - - -//// [thisInInvalidContexts.d.ts] -declare class BaseErrClass { - constructor(t: any); -} -declare class ClassWithNoInitializer extends BaseErrClass { - t: any; - constructor(); -} -declare class ClassWithInitializer extends BaseErrClass { - t: number; - constructor(); -} -declare namespace M { -} -declare function genericFunc(x: T): void; -declare const ErrClass3Base: typeof globalThis; -declare class ErrClass3 extends ErrClass3Base { -} -declare enum SomeEnum { - A,// Should not be allowed - B -} - -/// [Errors] //// - -thisInInvalidContexts.ts(9,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -thisInInvalidContexts.ts(17,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -thisInInvalidContexts.ts(23,13): error TS2331: 'this' cannot be referenced in a module or namespace body. -thisInInvalidContexts.ts(31,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisInInvalidContexts.ts(34,25): error TS2507: Type 'typeof globalThis' is not a constructor function type. -thisInInvalidContexts.ts(40,9): error TS2332: 'this' cannot be referenced in current location. -thisInInvalidContexts.ts(41,9): error TS2332: 'this' cannot be referenced in current location. - - -==== thisInInvalidContexts.ts (7 errors) ==== - class BaseErrClass { - constructor(t: any) { } - } - - class ClassWithNoInitializer extends BaseErrClass { - t: any; - //'this' in optional super call - constructor() { - super(this); // Error - ~~~~ -!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. - } - } - - class ClassWithInitializer extends BaseErrClass { - t = 4; - //'this' in required super call - constructor() { - super(this); // Error - ~~~~ -!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. - } - } - - module M { - //'this' in module variable - var x = this; // Error - ~~~~ -!!! error TS2331: 'this' cannot be referenced in a module or namespace body. - } - - //'this' as type parameter constraint - // function fn() { } // Error - - //'this' as a type argument - function genericFunc(x: T): void { } - genericFunc(undefined); // Should be an error - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - - const ErrClass3Base: typeof globalThis = this; - class ErrClass3 extends ErrClass3Base { - ~~~~~~~~~~~~~ -!!! error TS2507: Type 'typeof globalThis' is not a constructor function type. - - } - - //'this' as a computed enum value - enum SomeEnum { - A = this, // Should not be allowed - ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - B = this.spaaaace // Also should not be allowed - ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - } - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContextsExternalModule.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContextsExternalModule.d.ts deleted file mode 100644 index 68cbcb717d516..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInInvalidContextsExternalModule.d.ts +++ /dev/null @@ -1,124 +0,0 @@ -//// [tests/cases/conformance/expressions/thisKeyword/thisInInvalidContextsExternalModule.ts] //// - -//// [thisInInvalidContextsExternalModule.ts] -class BaseErrClass { - constructor(t: any) { } -} - -class ClassWithNoInitializer extends BaseErrClass { - t; - //'this' in optional super call - constructor() { - super(this); // error: "super" has to be called before "this" accessing - } -} - -class ClassWithInitializer extends BaseErrClass { - t = 4; - //'this' in required super call - constructor() { - super(this); // Error - } -} - -module M { - //'this' in module variable - var x = this; // Error -} - -//'this' as type parameter constraint -// function fn() { } // Error - -//'this' as a type argument -function genericFunc(x: T) { } -genericFunc(undefined); // Should be an error - -class ErrClass3 extends this { - -} - -//'this' as a computed enum value -enum SomeEnum { - A = this, // Should not be allowed - B = this.spaaaace // Also should not be allowed -} - -export = this; // Should be an error - -/// [Declarations] //// - - - -//// [thisInInvalidContextsExternalModule.d.ts] -declare const _default: undefined; -export = _default; - -/// [Errors] //// - -thisInInvalidContextsExternalModule.ts(9,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -thisInInvalidContextsExternalModule.ts(17,15): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. -thisInInvalidContextsExternalModule.ts(23,13): error TS2331: 'this' cannot be referenced in a module or namespace body. -thisInInvalidContextsExternalModule.ts(31,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisInInvalidContextsExternalModule.ts(33,25): error TS2507: Type 'undefined' is not a constructor function type. -thisInInvalidContextsExternalModule.ts(39,9): error TS2332: 'this' cannot be referenced in current location. -thisInInvalidContextsExternalModule.ts(40,9): error TS2332: 'this' cannot be referenced in current location. - - -==== thisInInvalidContextsExternalModule.ts (7 errors) ==== - class BaseErrClass { - constructor(t: any) { } - } - - class ClassWithNoInitializer extends BaseErrClass { - t; - //'this' in optional super call - constructor() { - super(this); // error: "super" has to be called before "this" accessing - ~~~~ -!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. - } - } - - class ClassWithInitializer extends BaseErrClass { - t = 4; - //'this' in required super call - constructor() { - super(this); // Error - ~~~~ -!!! error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. - } - } - - module M { - //'this' in module variable - var x = this; // Error - ~~~~ -!!! error TS2331: 'this' cannot be referenced in a module or namespace body. - } - - //'this' as type parameter constraint - // function fn() { } // Error - - //'this' as a type argument - function genericFunc(x: T) { } - genericFunc(undefined); // Should be an error - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - - class ErrClass3 extends this { - ~~~~ -!!! error TS2507: Type 'undefined' is not a constructor function type. - - } - - //'this' as a computed enum value - enum SomeEnum { - A = this, // Should not be allowed - ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - B = this.spaaaace // Also should not be allowed - ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - } - - export = this; // Should be an error \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInPropertyBoundDeclarations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInPropertyBoundDeclarations.d.ts deleted file mode 100644 index cc664b242403e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisInPropertyBoundDeclarations.d.ts +++ /dev/null @@ -1,182 +0,0 @@ -//// [tests/cases/compiler/thisInPropertyBoundDeclarations.ts] //// - -//// [thisInPropertyBoundDeclarations.ts] -class Bug { - private name: string; - - private static func: Function[] = [ - (that: Bug, name: string) => { - that.foo(name); - } - ]; - - private foo(name: string) { - this.name = name; - } -} - -// Valid use of this in a property bound decl -class A { - prop1 = function(): void { - this; - }; - - prop2 = function(): void { - function inner() { - this; - } - () => this; - }; - - prop3 = (): void => { - function inner() { - this; - } - }; - - prop4 = { - a: function(): any { return this; }, - }; - - prop5 = (): { - a: () => any; - } => { - return { - a: function() { return this; }, - }; - }; -} - -class B { - prop1: this = this; - - prop2 = (): this => this; - - prop3 = (): () => () => () => this => () => () => () => this; - - prop4: string = ' ' + - function() { - } + - ' ' + - (() => () => () => this); - - prop5 = { - a: (): this => { return this; } - }; - - prop6 = () => { - return { - a: () => { return this; } - }; - }; -} - -/// [Declarations] //// - - - -//// [thisInPropertyBoundDeclarations.d.ts] -declare class Bug { - private name; - private static func; - private foo; -} -declare class A { - prop1: () => void; - prop2: () => void; - prop3: () => void; - prop4: { - a: () => any; - }; - prop5: () => { - a: () => any; - }; -} -declare class B { - prop1: this; - prop2: () => this; - prop3: () => () => () => () => this; - prop4: string; - prop5: { - a: () => this; - }; - prop6: any; -} - -/// [Errors] //// - -thisInPropertyBoundDeclarations.ts(64,5): error TS2527: The inferred type of 'prop6' references an inaccessible 'this' type. A type annotation is necessary. - - -==== thisInPropertyBoundDeclarations.ts (1 errors) ==== - class Bug { - private name: string; - - private static func: Function[] = [ - (that: Bug, name: string) => { - that.foo(name); - } - ]; - - private foo(name: string) { - this.name = name; - } - } - - // Valid use of this in a property bound decl - class A { - prop1 = function(): void { - this; - }; - - prop2 = function(): void { - function inner() { - this; - } - () => this; - }; - - prop3 = (): void => { - function inner() { - this; - } - }; - - prop4 = { - a: function(): any { return this; }, - }; - - prop5 = (): { - a: () => any; - } => { - return { - a: function() { return this; }, - }; - }; - } - - class B { - prop1: this = this; - - prop2 = (): this => this; - - prop3 = (): () => () => () => this => () => () => () => this; - - prop4: string = ' ' + - function() { - } + - ' ' + - (() => () => () => this); - - prop5 = { - a: (): this => { return this; } - }; - - prop6 = () => { - ~~~~~ -!!! error TS2527: The inferred type of 'prop6' references an inaccessible 'this' type. A type annotation is necessary. - return { - a: () => { return this; } - }; - }; - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/this_inside-enum-should-not-be-allowed.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/this_inside-enum-should-not-be-allowed.d.ts deleted file mode 100644 index 6c8ebf3a5bc22..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/this_inside-enum-should-not-be-allowed.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -//// [tests/cases/compiler/this_inside-enum-should-not-be-allowed.ts] //// - -//// [this_inside-enum-should-not-be-allowed.ts] -enum TopLevelEnum { - ThisWasAllowedButShouldNotBe = this // Should not be allowed -} - -module ModuleEnum { - enum EnumInModule { - WasADifferentError = this // this was handled as if this was in a module - } -} - -/// [Declarations] //// - - - -//// [this_inside-enum-should-not-be-allowed.d.ts] -declare enum TopLevelEnum { - ThisWasAllowedButShouldNotBe -} -declare namespace ModuleEnum { -} - -/// [Errors] //// - -this_inside-enum-should-not-be-allowed.ts(2,36): error TS2332: 'this' cannot be referenced in current location. -this_inside-enum-should-not-be-allowed.ts(7,30): error TS2332: 'this' cannot be referenced in current location. - - -==== this_inside-enum-should-not-be-allowed.ts (2 errors) ==== - enum TopLevelEnum { - ThisWasAllowedButShouldNotBe = this // Should not be allowed - ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - } - - module ModuleEnum { - enum EnumInModule { - WasADifferentError = this // this was handled as if this was in a module - ~~~~ -!!! error TS2332: 'this' cannot be referenced in current location. - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/twoAccessorsWithSameName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/twoAccessorsWithSameName.d.ts deleted file mode 100644 index 8f798a7a9ec81..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/twoAccessorsWithSameName.d.ts +++ /dev/null @@ -1,126 +0,0 @@ -//// [tests/cases/conformance/classes/propertyMemberDeclarations/twoAccessorsWithSameName.ts] //// - -//// [twoAccessorsWithSameName.ts] -class C { - get x(): number { return 1; } - get x(): number { return 1; } // error -} - -class D { - set x(v: any) { } - set x(v: any) { } // error -} - -class E { - get x(): number { - return 1; - } - set x(v) { } -} - -var x = { - get x() { - return 1; - }, - - // error - get x(): number { - return 1; - } -} - -var y: { - x: number; -} = { - get x(): number { - return 1; - }, - set x(v) { } -} - -/// [Declarations] //// - - - -//// [twoAccessorsWithSameName.d.ts] -declare class C { - get x(): number; - get x(): number; -} -declare class D { - set x(v: any); - set x(v: any); -} -declare class E { - get x(): number; - set x(v: number); -} -declare var x: { - readonly x: number; -}; -declare var y: { - x: number; -}; - -/// [Errors] //// - -twoAccessorsWithSameName.ts(2,9): error TS2300: Duplicate identifier 'x'. -twoAccessorsWithSameName.ts(3,9): error TS2300: Duplicate identifier 'x'. -twoAccessorsWithSameName.ts(7,9): error TS2300: Duplicate identifier 'x'. -twoAccessorsWithSameName.ts(8,9): error TS2300: Duplicate identifier 'x'. -twoAccessorsWithSameName.ts(19,9): error TS2300: Duplicate identifier 'x'. -twoAccessorsWithSameName.ts(24,9): error TS1118: An object literal cannot have multiple get/set accessors with the same name. -twoAccessorsWithSameName.ts(24,9): error TS2300: Duplicate identifier 'x'. - - -==== twoAccessorsWithSameName.ts (7 errors) ==== - class C { - get x(): number { return 1; } - ~ -!!! error TS2300: Duplicate identifier 'x'. - get x(): number { return 1; } // error - ~ -!!! error TS2300: Duplicate identifier 'x'. - } - - class D { - set x(v: any) { } - ~ -!!! error TS2300: Duplicate identifier 'x'. - set x(v: any) { } // error - ~ -!!! error TS2300: Duplicate identifier 'x'. - } - - class E { - get x(): number { - return 1; - } - set x(v) { } - } - - var x = { - get x() { - ~ -!!! error TS2300: Duplicate identifier 'x'. - return 1; - }, - - // error - get x(): number { - ~ -!!! error TS1118: An object literal cannot have multiple get/set accessors with the same name. - ~ -!!! error TS2300: Duplicate identifier 'x'. - return 1; - } - } - - var y: { - x: number; - } = { - get x(): number { - return 1; - }, - set x(v) { } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment31.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment31.d.ts deleted file mode 100644 index 49649ca8bdfaf..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment31.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment31.ts] //// - -//// [typeFromPropertyAssignment31.ts] -function ExpandoMerge(n: number): number { - return n; -} -ExpandoMerge.p1 = 111 -ExpandoMerge.m = function(n: number) { - return n + 1; -} -namespace ExpandoMerge { - export var p2 = 222; -} -ExpandoMerge.p4 = 44444; // ok -ExpandoMerge.p6 = 66666; // ok -ExpandoMerge.p8 = false; // type error -namespace ExpandoMerge { - export var p3 = 333; - export var p4 = 4; - export var p5 = 5; - export let p6 = 6; - export let p7 = 7; - export var p8 = 6; - export let p9 = 7; -} -ExpandoMerge.p5 = 555555; // ok -ExpandoMerge.p7 = 777777; // ok -ExpandoMerge.p9 = false; // type error -var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - - -/// [Declarations] //// - - - -//// [typeFromPropertyAssignment31.d.ts] -declare function ExpandoMerge(n: number): number; -declare namespace ExpandoMerge { - var p1: number; - var m: (n: number) => number; -} -declare namespace ExpandoMerge { - var p2: number; -} -declare namespace ExpandoMerge { - var p3: number; - var p4: number; - var p5: number; - let p6: number; - let p7: number; - var p8: number; - let p9: number; -} -declare var n: number; - -/// [Errors] //// - -typeFromPropertyAssignment31.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -typeFromPropertyAssignment31.ts(25,1): error TS2322: Type 'boolean' is not assignable to type 'number'. - - -==== typeFromPropertyAssignment31.ts (2 errors) ==== - function ExpandoMerge(n: number): number { - return n; - } - ExpandoMerge.p1 = 111 - ExpandoMerge.m = function(n: number) { - return n + 1; - } - namespace ExpandoMerge { - export var p2 = 222; - } - ExpandoMerge.p4 = 44444; // ok - ExpandoMerge.p6 = 66666; // ok - ExpandoMerge.p8 = false; // type error - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - namespace ExpandoMerge { - export var p3 = 333; - export var p4 = 4; - export var p5 = 5; - export let p6 = 6; - export let p7 = 7; - export var p8 = 6; - export let p9 = 7; - } - ExpandoMerge.p5 = 555555; // ok - ExpandoMerge.p7 = 777777; // ok - ExpandoMerge.p9 = false; // type error - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment32.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment32.d.ts deleted file mode 100644 index e982f09c14e0d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment32.d.ts +++ /dev/null @@ -1,105 +0,0 @@ -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts] //// - -//// [expando.ts] -function ExpandoMerge(n: number): number { - return n; -} -ExpandoMerge.p1 = 111 -ExpandoMerge.m = function(n: number) { - return n + 1; -} -ExpandoMerge.p4 = 44444; -ExpandoMerge.p5 = 555555; -ExpandoMerge.p6 = 66666; -ExpandoMerge.p7 = 777777; -ExpandoMerge.p8 = false; // type error -ExpandoMerge.p9 = false; // type error -var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - -//// [ns.ts] -namespace ExpandoMerge { - export var p3 = 333; - export var p4 = 4; - export var p5 = 5; - export let p6 = 6; - export let p7 = 7; - export var p8 = 6; - export let p9 = 7; -} -namespace ExpandoMerge { - export var p2 = 222; -} - - -/// [Declarations] //// - - - -//// [expando.d.ts] -declare function ExpandoMerge(n: number): number; -declare namespace ExpandoMerge { - var p1: number; - var m: (n: number) => number; -} -declare var n: number; - -//// [ns.d.ts] -declare namespace ExpandoMerge { - var p3: number; - var p4: number; - var p5: number; - let p6: number; - let p7: number; - var p8: number; - let p9: number; -} -declare namespace ExpandoMerge { - var p2: number; -} - -/// [Errors] //// - -expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. -ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - - -==== expando.ts (2 errors) ==== - function ExpandoMerge(n: number): number { - return n; - } - ExpandoMerge.p1 = 111 - ExpandoMerge.m = function(n: number) { - return n + 1; - } - ExpandoMerge.p4 = 44444; - ExpandoMerge.p5 = 555555; - ExpandoMerge.p6 = 66666; - ExpandoMerge.p7 = 777777; - ExpandoMerge.p8 = false; // type error - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - ExpandoMerge.p9 = false; // type error - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - -==== ns.ts (2 errors) ==== - namespace ExpandoMerge { - ~~~~~~~~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - export var p3 = 333; - export var p4 = 4; - export var p5 = 5; - export let p6 = 6; - export let p7 = 7; - export var p8 = 6; - export let p9 = 7; - } - namespace ExpandoMerge { - ~~~~~~~~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - export var p2 = 222; - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment33.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment33.d.ts deleted file mode 100644 index b4ea6b8fe130c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment33.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts] //// - -//// [ns.ts] -namespace ExpandoMerge { - export var p3 = 333; - export var p4 = 4; - export var p5 = 5; - export let p6 = 6; - export let p7 = 7; - export var p8 = 6; - export let p9 = 7; -} -namespace ExpandoMerge { - export var p2 = 222; -} - - -//// [expando.ts] -function ExpandoMerge(n: number): number { - return n; -} -ExpandoMerge.p1 = 111 -ExpandoMerge.m = function(n: number) { - return n + 1; -} -ExpandoMerge.p4 = 44444; -ExpandoMerge.p5 = 555555; -ExpandoMerge.p6 = 66666; -ExpandoMerge.p7 = 777777; -ExpandoMerge.p8 = false; // type error -ExpandoMerge.p9 = false; // type error -var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - - - -/// [Declarations] //// - - - -//// [expando.d.ts] -declare function ExpandoMerge(n: number): number; -declare namespace ExpandoMerge { - var p1: number; - var m: (n: number) => number; -} -declare var n: number; - -//// [ns.d.ts] -declare namespace ExpandoMerge { - var p3: number; - var p4: number; - var p5: number; - let p6: number; - let p7: number; - var p8: number; - let p9: number; -} -declare namespace ExpandoMerge { - var p2: number; -} - -/// [Errors] //// - -expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. -ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - - -==== ns.ts (2 errors) ==== - namespace ExpandoMerge { - ~~~~~~~~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - export var p3 = 333; - export var p4 = 4; - export var p5 = 5; - export let p6 = 6; - export let p7 = 7; - export var p8 = 6; - export let p9 = 7; - } - namespace ExpandoMerge { - ~~~~~~~~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - export var p2 = 222; - } - - -==== expando.ts (2 errors) ==== - function ExpandoMerge(n: number): number { - return n; - } - ExpandoMerge.p1 = 111 - ExpandoMerge.m = function(n: number) { - return n + 1; - } - ExpandoMerge.p4 = 44444; - ExpandoMerge.p5 = 555555; - ExpandoMerge.p6 = 66666; - ExpandoMerge.p7 = 777777; - ExpandoMerge.p8 = false; // type error - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - ExpandoMerge.p9 = false; // type error - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment36.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment36.d.ts deleted file mode 100644 index 46dcaa8e0d90d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment36.d.ts +++ /dev/null @@ -1,206 +0,0 @@ -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts] //// - -//// [typeFromPropertyAssignment36.ts] -function f(b: boolean): { - (): void - e: number - q: boolean - r: number - s: string -} { - function d() { - } - d.e = 12 - d.e - - if (b) { - d.q = false - } - // error d.q might not be assigned - d.q - if (b) { - d.q = false - } - else { - d.q = true - } - d.q - if (b) { - d.r = 1 - } - else { - d.r = 2 - } - d.r - if (b) { - d.s = 'hi' - } - return d -} -// OK to access possibly-unassigned properties outside the initialising scope -var test: string = f(true).s - -function d(): void { -} -d.e = 12 -d.e - -if (!!false) { - d.q = false -} -d.q -if (!!false) { - d.q = false -} -else { - d.q = true -} -d.q -if (!!false) { - d.r = 1 -} -else { - d.r = 2 -} -d.r - -// test function expressions too -const g: { - (): void - expando: number - both: string | number -} = function() { -} -if (!!false) { - g.expando = 1 -} -g.expando // error - -if (!!false) { - g.both = 'hi' -} -else { - g.both = 0 -} -g.both - - -/// [Declarations] //// - - - -//// [typeFromPropertyAssignment36.d.ts] -declare function f(b: boolean): { - (): void; - e: number; - q: boolean; - r: number; - s: string; -}; -declare var test: string; -declare function d(): void; -declare namespace d { - var e: number; - var q: boolean; - var r: number; -} -declare const g: { - (): void; - expando: number; - both: string | number; -}; - -/// [Errors] //// - -typeFromPropertyAssignment36.ts(17,7): error TS2565: Property 'q' is used before being assigned. -typeFromPropertyAssignment36.ts(48,3): error TS2565: Property 'q' is used before being assigned. - - -==== typeFromPropertyAssignment36.ts (2 errors) ==== - function f(b: boolean): { - (): void - e: number - q: boolean - r: number - s: string - } { - function d() { - } - d.e = 12 - d.e - - if (b) { - d.q = false - } - // error d.q might not be assigned - d.q - ~ -!!! error TS2565: Property 'q' is used before being assigned. - if (b) { - d.q = false - } - else { - d.q = true - } - d.q - if (b) { - d.r = 1 - } - else { - d.r = 2 - } - d.r - if (b) { - d.s = 'hi' - } - return d - } - // OK to access possibly-unassigned properties outside the initialising scope - var test: string = f(true).s - - function d(): void { - } - d.e = 12 - d.e - - if (!!false) { - d.q = false - } - d.q - ~ -!!! error TS2565: Property 'q' is used before being assigned. - if (!!false) { - d.q = false - } - else { - d.q = true - } - d.q - if (!!false) { - d.r = 1 - } - else { - d.r = 2 - } - d.r - - // test function expressions too - const g: { - (): void - expando: number - both: string | number - } = function() { - } - if (!!false) { - g.expando = 1 - } - g.expando // error - - if (!!false) { - g.both = 'hi' - } - else { - g.both = 0 - } - g.both - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment38.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment38.d.ts deleted file mode 100644 index 2b7718f975703..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment38.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment38.ts] //// - -//// [typeFromPropertyAssignment38.ts] -function F(): void {} -F["prop"] = 3; - -const f: { - (): void; - prop: number; -} = function () {}; -f["prop"] = 3; - - -/// [Declarations] //// - - - -//// [typeFromPropertyAssignment38.d.ts] -declare function F(): void; -declare namespace F { - var prop: number; -} -declare const f: { - (): void; - prop: number; -}; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/underscoreEscapedNameInEnum.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/underscoreEscapedNameInEnum.d.ts deleted file mode 100644 index 10aa965ee5fe8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/underscoreEscapedNameInEnum.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -//// [tests/cases/compiler/underscoreEscapedNameInEnum.ts] //// - -//// [underscoreEscapedNameInEnum.ts] -enum E { - "__foo" = 1, - bar = E["__foo"] + 1 -} - - -/// [Declarations] //// - - - -//// [underscoreEscapedNameInEnum.d.ts] -declare enum E { - "__foo" = 1, - bar = 2 -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts deleted file mode 100644 index 25a46f396b06a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -//// [tests/cases/conformance/externalModules/verbatimModuleSyntaxConstEnumUsage.ts] //// - -//// [foo.ts] -export enum Foo { - a = 1, - b, - c, -} - -//// [bar.ts] -import {Foo} from './foo.js'; - -export enum Bar { - a = Foo.a, - c = Foo.c, - e = 5, -} - -/// [Declarations] //// - - - -//// [bar.d.ts] -export declare enum Bar { - a = 1, - c = 3, - e = 5 -} - -//// [foo.d.ts] -export declare enum Foo { - a = 1, - b = 2, - c = 3 -} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/wellKnownSymbolExpando.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/wellKnownSymbolExpando.d.ts deleted file mode 100644 index 099e0199f1afa..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/wellKnownSymbolExpando.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -//// [tests/cases/compiler/wellKnownSymbolExpando.ts] //// - -//// [wellKnownSymbolExpando.ts] -function f(): void {} -f[Symbol.iterator] = function() {} - - -/// [Declarations] //// - - - -//// [wellKnownSymbolExpando.d.ts] -declare function f(): void; -declare namespace f { } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts.diff deleted file mode 100644 index cf97e733fa4ca..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/constEnum2.d.ts.diff +++ /dev/null @@ -1,19 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/constEnums/constEnum2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -5,9 +5,9 @@ - declare const enum D { - d = 10, - e, - f, -- g = 0 -+ g - } - - /// [Errors] //// - - constEnum2.ts(7,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts.diff deleted file mode 100644 index 2a4dff3f55d6a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/enumBasics2.d.ts.diff +++ /dev/null @@ -1,19 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/enumBasics2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -9,9 +9,9 @@ - z - } - declare enum Bar { - a,// ok -- b = 2,// ok -+ b,// ok - c,// ok - d - } - - /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumBasics3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/enumBasics3.d.ts.diff deleted file mode 100644 index 459a7d2660127..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/enumBasics3.d.ts.diff +++ /dev/null @@ -1,18 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/enumBasics3.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -11,9 +11,9 @@ - } - declare namespace M { - namespace N { - enum E2 { -- b = 1, -+ b, - c - } - } - } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/enumErrors.d.ts.diff deleted file mode 100644 index ab8a64ad19da1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/enumErrors.d.ts.diff +++ /dev/null @@ -1,20 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/enums/enumErrors.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -16,10 +16,10 @@ - A = 0, - B = 0 - } - declare enum E10 { -- A = 0, -- B = 0 -+ A, -+ B - } - declare enum E11 { - A, - B, diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts.diff deleted file mode 100644 index 9e117fe3f6daf..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/enumExportMergingES6.d.ts.diff +++ /dev/null @@ -1,19 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/enums/enumExportMergingES6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -7,9 +7,9 @@ - export declare enum Animals { - Dog = 2 - } - export declare enum Animals { -- CatDog = 3 -+ CatDog - } - - /// [Errors] //// - - enumExportMergingES6.ts(8,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff deleted file mode 100644 index 6916e3bfc7788..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/isolatedModulesGlobalNamespacesAndEnums.d.ts.diff +++ /dev/null @@ -1,28 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/isolatedModulesGlobalNamespacesAndEnums.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -12,15 +12,15 @@ - declare const d = "d"; - - //// [enum2.d.ts] - declare enum Enum { -- D = "d", -- E = 0,// error -- Y = 1000000,// error -- Z = 0 -+ D, -+ E,// error -+ Y,// error -+ Z - } - declare enum Enum { -- F = 0 -+ F - } - - //// [module-namespaces.d.ts] - export declare namespace Instantiated { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/mergedDeclarations2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/mergedDeclarations2.d.ts.diff deleted file mode 100644 index 75d89e0276bf2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/mergedDeclarations2.d.ts.diff +++ /dev/null @@ -1,18 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/mergedDeclarations2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,9 +4,9 @@ - declare enum Foo { - b = 0 - } - declare enum Foo { -- a = 0 -+ a - } - declare namespace Foo { - var x: invalid; - } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts.diff deleted file mode 100644 index 21517c33ff14f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/mergedEnumDeclarationCodeGen.d.ts.diff +++ /dev/null @@ -1,19 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/mergedEnumDeclarationCodeGen.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -5,9 +5,9 @@ - a = 0, - b = 0 - } - declare enum E { -- c = 0 -+ c - } - - /// [Errors] //// - - mergedEnumDeclarationCodeGen.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralTypes4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralTypes4.d.ts.diff deleted file mode 100644 index 95401ac8ca9dc..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralTypes4.d.ts.diff +++ /dev/null @@ -1,20 +0,0 @@ -// [[Reason: undefined]] //// - -//// [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; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff deleted file mode 100644 index 4704efbcee4df..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/verbatimModuleSyntaxConstEnumUsage.d.ts.diff +++ /dev/null @@ -1,20 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/externalModules/verbatimModuleSyntaxConstEnumUsage.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,10 +1,10 @@ - - - //// [bar.d.ts] - export declare enum Bar { -- a = 1, -- c = 3, -+ a, -+ c, - e = 5 - } - - //// [foo.d.ts] diff --git a/tests/baselines/reference/isolated-declarations/original/dte/constEnum2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/constEnum2.d.ts deleted file mode 100644 index 41f2a726ad93a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/constEnum2.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -//// [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 = 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: invalid; -declare const enum D { - d = 10, - e, - f, - g -} - -/// [Errors] //// - -constEnum2.ts(7,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnum2.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnum2.ts(10,9): error TS2474: const enum member initializers must be constant expressions. -constEnum2.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnum2.ts(11,9): error TS2474: const enum member initializers must be constant expressions. -constEnum2.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== 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 = 9000 % 2; - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const enum D { - d = 10, - e = 199 * Math.floor(Math.random() * 1000), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2474: const enum member initializers must be constant expressions. - f = d - (100 * Math.floor(Math.random() % 8)), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2474: const enum member initializers must be constant expressions. - g = CONST, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumBasics2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumBasics2.d.ts deleted file mode 100644 index cd76be299f30e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/enumBasics2.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -//// [tests/cases/compiler/enumBasics2.ts] //// - -//// [enumBasics2.ts] -enum Foo { - a = 2, - b = 3, - x = a.b, // should error - y = b.a, // should error - z = y.x * a.x, // should error -} - -enum Bar { - a = (1).valueOf(), // ok - b = Foo.a, // ok - c = Foo.a.valueOf(), // ok - d = Foo.a.a, // should error -} - - -/// [Declarations] //// - - - -//// [enumBasics2.d.ts] -declare enum Foo { - a = 2, - b = 3, - x,// should error - y,// should error - z -} -declare enum Bar { - a,// ok - b,// ok - c,// ok - d -} - -/// [Errors] //// - -enumBasics2.ts(4,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(4,9): error TS2339: Property 'b' does not exist on type 'Foo.a'. -enumBasics2.ts(5,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(5,9): error TS2339: Property 'a' does not exist on type 'Foo.b'. -enumBasics2.ts(6,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(6,9): error TS2339: Property 'x' does not exist on type 'Foo.y'. -enumBasics2.ts(6,15): error TS2339: Property 'x' does not exist on type 'Foo.a'. -enumBasics2.ts(10,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(11,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(12,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(13,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(13,13): error TS2339: Property 'a' does not exist on type 'Foo.a'. - - -==== enumBasics2.ts (12 errors) ==== - enum Foo { - a = 2, - b = 3, - x = a.b, // should error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2339: Property 'b' does not exist on type 'Foo.a'. - y = b.a, // should error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2339: Property 'a' does not exist on type 'Foo.b'. - z = y.x * a.x, // should error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2339: Property 'x' does not exist on type 'Foo.y'. - ~ -!!! error TS2339: Property 'x' does not exist on type 'Foo.a'. - } - - enum Bar { - a = (1).valueOf(), // ok - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - b = Foo.a, // ok - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = Foo.a.valueOf(), // ok - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - d = Foo.a.a, // should error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2339: Property 'a' does not exist on type 'Foo.a'. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumBasics3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumBasics3.d.ts deleted file mode 100644 index ff61a9e6ef4ae..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/enumBasics3.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -//// [tests/cases/compiler/enumBasics3.ts] //// - -//// [enumBasics3.ts] -module M { - export namespace N { - export enum E1 { - a = 1, - b = a.a, // should error - } - } -} - -module M { - export namespace N { - export enum E2 { - b = M.N.E1.a, - c = M.N.E1.a.a, // should error - } - } -} - - -/// [Declarations] //// - - - -//// [enumBasics3.d.ts] -declare namespace M { - namespace N { - enum E1 { - a = 1, - b - } - } -} -declare namespace M { - namespace N { - enum E2 { - b, - c - } - } -} - -/// [Errors] //// - -enumBasics3.ts(5,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics3.ts(5,13): error TS2339: Property 'a' does not exist on type 'E1.a'. -enumBasics3.ts(13,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics3.ts(14,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics3.ts(14,20): error TS2339: Property 'a' does not exist on type 'E1.a'. - - -==== enumBasics3.ts (5 errors) ==== - module M { - export namespace N { - export enum E1 { - a = 1, - b = a.a, // should error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2339: Property 'a' does not exist on type 'E1.a'. - } - } - } - - module M { - export namespace N { - export enum E2 { - b = M.N.E1.a, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = M.N.E1.a.a, // should error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2339: Property 'a' does not exist on type 'E1.a'. - } - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumErrors.d.ts deleted file mode 100644 index 2feb88ebf225d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/enumErrors.d.ts +++ /dev/null @@ -1,288 +0,0 @@ -//// [tests/cases/conformance/enums/enumErrors.ts] //// - -//// [enumErrors.ts] -// Enum named with PredefinedTypes -enum any { } -enum number { } -enum string { } -enum boolean { } - -// Enum with computed member initializer of type Number -enum E5 { - C = new Number(30) -} - -enum E9 { - A, - B = A -} - -//Enum with computed member intializer of different enum type -// Bug 707850: This should be allowed -enum E10 { - A = E9.A, - B = E9.B -} - -// Enum with computed member intializer of other types -enum E11 { - A = true, - B = new Date(), - C = window, - D = {}, - E = (() => 'foo')(), -} - -// Enum with string valued member and computed member initializers -enum E12 { - A = '', - B = new Date(), - C = window, - D = {}, - E = 1 + 1, - F = (() => 'foo')(), -} - -// Enum with incorrect syntax -enum E13 { - postComma, - postValueComma = 1, - - postSemicolon; - postColonValueComma: 2, - postColonValueSemicolon: 3; -}; - -enum E14 { a, b: any "hello" += 1, c, d} - - -/// [Declarations] //// - - - -//// [enumErrors.d.ts] -declare enum any { -} -declare enum number { -} -declare enum string { -} -declare enum boolean { -} -declare enum E5 { - C -} -declare enum E9 { - A = 0, - B = 0 -} -declare enum E10 { - A, - B -} -declare enum E11 { - A, - B, - C, - D, - E -} -declare enum E12 { - A = "", - B, - C, - D, - E = 2, - F -} -declare enum E13 { - postComma = 0, - postValueComma = 1, - postSemicolon = 2, - postColonValueComma = 3, - 2 = 4, - postColonValueSemicolon = 5, - 3 = 6 -} -declare enum E14 { - a = 0, - b = 1, - any = 2, - "hello" = 3, - 1 = 4, - c = 5, - d = 6 -} - -/// [Errors] //// - -enumErrors.ts(2,6): error TS2431: Enum name cannot be 'any'. -enumErrors.ts(3,6): error TS2431: Enum name cannot be 'number'. -enumErrors.ts(4,6): error TS2431: Enum name cannot be 'string'. -enumErrors.ts(5,6): error TS2431: Enum name cannot be 'boolean'. -enumErrors.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(9,9): error TS18033: Type 'Number' is not assignable to type 'number' as required for computed enum member values. - 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. -enumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(26,9): error TS18033: Type 'boolean' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(27,9): error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(28,9): error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(29,9): error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(30,9): error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(36,9): error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(37,9): error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(38,9): error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(39,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(40,9): error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(48,18): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(49,24): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(49,26): error TS2452: An enum member cannot have a numeric name. -enumErrors.ts(50,28): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(50,30): error TS2452: An enum member cannot have a numeric name. -enumErrors.ts(50,31): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(53,16): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(53,22): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(53,30): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(53,33): error TS2452: An enum member cannot have a numeric name. - - -==== enumErrors.ts (37 errors) ==== - // Enum named with PredefinedTypes - enum any { } - ~~~ -!!! error TS2431: Enum name cannot be 'any'. - enum number { } - ~~~~~~ -!!! error TS2431: Enum name cannot be 'number'. - enum string { } - ~~~~~~ -!!! error TS2431: Enum name cannot be 'string'. - enum boolean { } - ~~~~~~~ -!!! error TS2431: Enum name cannot be 'boolean'. - - // Enum with computed member initializer of type Number - enum E5 { - C = new Number(30) - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~ -!!! error TS18033: Type 'Number' is not assignable to type 'number' as required for computed enum member values. -!!! error TS18033: 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. - } - - enum E9 { - A, - B = A - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - //Enum with computed member intializer of different enum type - // Bug 707850: This should be allowed - enum E10 { - A = E9.A, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - B = E9.B - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - // Enum with computed member intializer of other types - enum E11 { - A = true, - ~~~~ -!!! error TS18033: Type 'boolean' is not assignable to type 'number' as required for computed enum member values. - B = new Date(), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~ -!!! error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. - C = window, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. - D = {}, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ -!!! error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. - E = (() => 'foo')(), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~~ -!!! error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. - } - - // Enum with string valued member and computed member initializers - enum E12 { - A = '', - B = new Date(), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~ -!!! error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. - C = window, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. - D = {}, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ -!!! error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. - E = 1 + 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - F = (() => 'foo')(), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~~ -!!! error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. - } - - // Enum with incorrect syntax - enum E13 { - postComma, - postValueComma = 1, - - postSemicolon; - ~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - postColonValueComma: 2, - ~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - ~ -!!! error TS2452: An enum member cannot have a numeric name. - postColonValueSemicolon: 3; - ~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - ~ -!!! error TS2452: An enum member cannot have a numeric name. - ~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - }; - - enum E14 { a, b: any "hello" += 1, c, d} - ~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - ~~~~~~~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - ~~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - ~ -!!! error TS2452: An enum member cannot have a numeric name. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumExportMergingES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumExportMergingES6.d.ts deleted file mode 100644 index 8bfc2624275c9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/enumExportMergingES6.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -//// [tests/cases/conformance/enums/enumExportMergingES6.ts] //// - -//// [enumExportMergingES6.ts] -export enum Animals { - Cat = 1 -} -export enum Animals { - Dog = 2 -} -export enum Animals { - CatDog = Cat | Dog -} - - -/// [Declarations] //// - - - -//// [enumExportMergingES6.d.ts] -export declare enum Animals { - Cat = 1 -} -export declare enum Animals { - Dog = 2 -} -export declare enum Animals { - CatDog -} - -/// [Errors] //// - -enumExportMergingES6.ts(8,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== enumExportMergingES6.ts (1 errors) ==== - export enum Animals { - Cat = 1 - } - export enum Animals { - Dog = 2 - } - export enum Animals { - CatDog = Cat | Dog - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts deleted file mode 100644 index c9c1d5697566c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/isolatedModulesGlobalNamespacesAndEnums.d.ts +++ /dev/null @@ -1,137 +0,0 @@ -//// [tests/cases/compiler/isolatedModulesGlobalNamespacesAndEnums.ts] //// - -//// [script-namespaces.ts] -namespace Instantiated { - export const x = 1; -} -namespace Uninstantiated { - export type T = number; -} -declare namespace Ambient { - export const x: number; -} - -//// [module-namespaces.ts] -export namespace Instantiated { - export const x = 1; -} - -//// [enum1.ts] -enum Enum { A, B, C } -declare enum Enum { X = 1_000_000 } -const d = 'd'; - -//// [enum2.ts] -enum Enum { - D = d, - E = A, // error - Y = X, // error - Z = Enum.A -} - -declare enum Enum { - F = A -} - -/// [Declarations] //// - - - -//// [enum1.d.ts] -declare enum Enum { - A = 0, - B = 1, - C = 2 -} -declare enum Enum { - X = 1000000 -} -declare const d = "d"; - -//// [enum2.d.ts] -declare enum Enum { - D, - E,// error - Y,// error - Z -} -declare enum Enum { - F -} - -//// [module-namespaces.d.ts] -export declare namespace Instantiated { - const x = 1; -} - -//// [script-namespaces.d.ts] -declare namespace Instantiated { - const x = 1; -} -declare namespace Uninstantiated { - type T = number; -} -declare namespace Ambient { - const x: number; -} - -/// [Errors] //// - -enum2.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enum2.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enum2.ts(3,9): error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. -enum2.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enum2.ts(4,9): error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. -enum2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enum2.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -script-namespaces.ts(1,11): error TS1280: Namespaces are not allowed in global script files when 'isolatedModules' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement. - - -==== script-namespaces.ts (1 errors) ==== - namespace Instantiated { - ~~~~~~~~~~~~ -!!! error TS1280: Namespaces are not allowed in global script files when 'isolatedModules' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement. - export const x = 1; - } - namespace Uninstantiated { - export type T = number; - } - declare namespace Ambient { - export const x: number; - } - -==== module-namespaces.ts (0 errors) ==== - export namespace Instantiated { - export const x = 1; - } - -==== enum1.ts (0 errors) ==== - enum Enum { A, B, C } - declare enum Enum { X = 1_000_000 } - const d = 'd'; - -==== enum2.ts (7 errors) ==== - enum Enum { - D = d, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - E = A, // error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. - Y = X, // error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. - Z = Enum.A - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - declare enum Enum { - F = A - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/mergedDeclarations2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/mergedDeclarations2.d.ts deleted file mode 100644 index 09190359daea0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/mergedDeclarations2.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -//// [tests/cases/compiler/mergedDeclarations2.ts] //// - -//// [mergedDeclarations2.ts] -enum Foo { - b -} -enum Foo { - a = b -} - -module Foo { - export var x = b -} - -/// [Declarations] //// - - - -//// [mergedDeclarations2.d.ts] -declare enum Foo { - b = 0 -} -declare enum Foo { - a -} -declare namespace Foo { - var x: invalid; -} - -/// [Errors] //// - -mergedDeclarations2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -mergedDeclarations2.ts(9,20): error TS2304: Cannot find name 'b'. -mergedDeclarations2.ts(9,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== mergedDeclarations2.ts (3 errors) ==== - enum Foo { - b - } - enum Foo { - a = b - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - module Foo { - export var x = b - ~ -!!! error TS2304: Cannot find name 'b'. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/mergedEnumDeclarationCodeGen.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/mergedEnumDeclarationCodeGen.d.ts deleted file mode 100644 index 6592af6dc3cf3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/mergedEnumDeclarationCodeGen.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -//// [tests/cases/compiler/mergedEnumDeclarationCodeGen.ts] //// - -//// [mergedEnumDeclarationCodeGen.ts] -enum E { - a, - b = a -} -enum E { - c = a -} - -/// [Declarations] //// - - - -//// [mergedEnumDeclarationCodeGen.d.ts] -declare enum E { - a = 0, - b = 0 -} -declare enum E { - c -} - -/// [Errors] //// - -mergedEnumDeclarationCodeGen.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -mergedEnumDeclarationCodeGen.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== mergedEnumDeclarationCodeGen.ts (2 errors) ==== - enum E { - a, - b = a - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - enum E { - c = a - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralTypes4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralTypes4.d.ts deleted file mode 100644 index b81dc1e259068..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralTypes4.d.ts +++ /dev/null @@ -1,790 +0,0 @@ -//// [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; - -/// [Errors] //// - -templateLiteralTypes4.ts(43,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -templateLiteralTypes4.ts(43,60): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - 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/original/dte/verbatimModuleSyntaxConstEnumUsage.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/verbatimModuleSyntaxConstEnumUsage.d.ts deleted file mode 100644 index 839e8df50345c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/verbatimModuleSyntaxConstEnumUsage.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -//// [tests/cases/conformance/externalModules/verbatimModuleSyntaxConstEnumUsage.ts] //// - -//// [foo.ts] -export enum Foo { - a = 1, - b, - c, -} - -//// [bar.ts] -import {Foo} from './foo.js'; - -export enum Bar { - a = Foo.a, - c = Foo.c, - e = 5, -} - -/// [Declarations] //// - - - -//// [bar.d.ts] -export declare enum Bar { - a, - c, - e = 5 -} - -//// [foo.d.ts] -export declare enum Foo { - a = 1, - b = 2, - c = 3 -} - -/// [Errors] //// - -bar.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -bar.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== foo.ts (0 errors) ==== - export enum Foo { - a = 1, - b, - c, - } - -==== bar.ts (2 errors) ==== - import {Foo} from './foo.js'; - - export enum Bar { - a = Foo.a, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = Foo.c, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - e = 5, - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/constEnum2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/constEnum2.d.ts deleted file mode 100644 index 77e166ad91736..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/constEnum2.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -//// [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 = 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: invalid; -declare const enum D { - d = 10, - e, - f, - g = 0 -} - -/// [Errors] //// - -constEnum2.ts(7,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnum2.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnum2.ts(10,9): error TS2474: const enum member initializers must be constant expressions. -constEnum2.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnum2.ts(11,9): error TS2474: const enum member initializers must be constant expressions. -constEnum2.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== 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 = 9000 % 2; - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const enum D { - d = 10, - e = 199 * Math.floor(Math.random() * 1000), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2474: const enum member initializers must be constant expressions. - f = d - (100 * Math.floor(Math.random() % 8)), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2474: const enum member initializers must be constant expressions. - g = CONST, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics2.d.ts deleted file mode 100644 index 0de0b2bbff37a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics2.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -//// [tests/cases/compiler/enumBasics2.ts] //// - -//// [enumBasics2.ts] -enum Foo { - a = 2, - b = 3, - x = a.b, // should error - y = b.a, // should error - z = y.x * a.x, // should error -} - -enum Bar { - a = (1).valueOf(), // ok - b = Foo.a, // ok - c = Foo.a.valueOf(), // ok - d = Foo.a.a, // should error -} - - -/// [Declarations] //// - - - -//// [enumBasics2.d.ts] -declare enum Foo { - a = 2, - b = 3, - x,// should error - y,// should error - z -} -declare enum Bar { - a,// ok - b = 2,// ok - c,// ok - d -} - -/// [Errors] //// - -enumBasics2.ts(4,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(4,9): error TS2339: Property 'b' does not exist on type 'Foo.a'. -enumBasics2.ts(5,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(5,9): error TS2339: Property 'a' does not exist on type 'Foo.b'. -enumBasics2.ts(6,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(6,9): error TS2339: Property 'x' does not exist on type 'Foo.y'. -enumBasics2.ts(6,15): error TS2339: Property 'x' does not exist on type 'Foo.a'. -enumBasics2.ts(10,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(11,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(12,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(13,3): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics2.ts(13,13): error TS2339: Property 'a' does not exist on type 'Foo.a'. - - -==== enumBasics2.ts (12 errors) ==== - enum Foo { - a = 2, - b = 3, - x = a.b, // should error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2339: Property 'b' does not exist on type 'Foo.a'. - y = b.a, // should error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2339: Property 'a' does not exist on type 'Foo.b'. - z = y.x * a.x, // should error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2339: Property 'x' does not exist on type 'Foo.y'. - ~ -!!! error TS2339: Property 'x' does not exist on type 'Foo.a'. - } - - enum Bar { - a = (1).valueOf(), // ok - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - b = Foo.a, // ok - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = Foo.a.valueOf(), // ok - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - d = Foo.a.a, // should error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2339: Property 'a' does not exist on type 'Foo.a'. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics3.d.ts deleted file mode 100644 index 1b2cd54d53551..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/enumBasics3.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -//// [tests/cases/compiler/enumBasics3.ts] //// - -//// [enumBasics3.ts] -module M { - export namespace N { - export enum E1 { - a = 1, - b = a.a, // should error - } - } -} - -module M { - export namespace N { - export enum E2 { - b = M.N.E1.a, - c = M.N.E1.a.a, // should error - } - } -} - - -/// [Declarations] //// - - - -//// [enumBasics3.d.ts] -declare namespace M { - namespace N { - enum E1 { - a = 1, - b - } - } -} -declare namespace M { - namespace N { - enum E2 { - b = 1, - c - } - } -} - -/// [Errors] //// - -enumBasics3.ts(5,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics3.ts(5,13): error TS2339: Property 'a' does not exist on type 'E1.a'. -enumBasics3.ts(13,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics3.ts(14,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumBasics3.ts(14,20): error TS2339: Property 'a' does not exist on type 'E1.a'. - - -==== enumBasics3.ts (5 errors) ==== - module M { - export namespace N { - export enum E1 { - a = 1, - b = a.a, // should error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2339: Property 'a' does not exist on type 'E1.a'. - } - } - } - - module M { - export namespace N { - export enum E2 { - b = M.N.E1.a, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = M.N.E1.a.a, // should error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2339: Property 'a' does not exist on type 'E1.a'. - } - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumErrors.d.ts deleted file mode 100644 index 0c014056bd4fe..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/enumErrors.d.ts +++ /dev/null @@ -1,288 +0,0 @@ -//// [tests/cases/conformance/enums/enumErrors.ts] //// - -//// [enumErrors.ts] -// Enum named with PredefinedTypes -enum any { } -enum number { } -enum string { } -enum boolean { } - -// Enum with computed member initializer of type Number -enum E5 { - C = new Number(30) -} - -enum E9 { - A, - B = A -} - -//Enum with computed member intializer of different enum type -// Bug 707850: This should be allowed -enum E10 { - A = E9.A, - B = E9.B -} - -// Enum with computed member intializer of other types -enum E11 { - A = true, - B = new Date(), - C = window, - D = {}, - E = (() => 'foo')(), -} - -// Enum with string valued member and computed member initializers -enum E12 { - A = '', - B = new Date(), - C = window, - D = {}, - E = 1 + 1, - F = (() => 'foo')(), -} - -// Enum with incorrect syntax -enum E13 { - postComma, - postValueComma = 1, - - postSemicolon; - postColonValueComma: 2, - postColonValueSemicolon: 3; -}; - -enum E14 { a, b: any "hello" += 1, c, d} - - -/// [Declarations] //// - - - -//// [enumErrors.d.ts] -declare enum any { -} -declare enum number { -} -declare enum string { -} -declare enum boolean { -} -declare enum E5 { - C -} -declare enum E9 { - A = 0, - B = 0 -} -declare enum E10 { - A = 0, - B = 0 -} -declare enum E11 { - A, - B, - C, - D, - E -} -declare enum E12 { - A = "", - B, - C, - D, - E = 2, - F -} -declare enum E13 { - postComma = 0, - postValueComma = 1, - postSemicolon = 2, - postColonValueComma = 3, - 2 = 4, - postColonValueSemicolon = 5, - 3 = 6 -} -declare enum E14 { - a = 0, - b = 1, - any = 2, - "hello" = 3, - 1 = 4, - c = 5, - d = 6 -} - -/// [Errors] //// - -enumErrors.ts(2,6): error TS2431: Enum name cannot be 'any'. -enumErrors.ts(3,6): error TS2431: Enum name cannot be 'number'. -enumErrors.ts(4,6): error TS2431: Enum name cannot be 'string'. -enumErrors.ts(5,6): error TS2431: Enum name cannot be 'boolean'. -enumErrors.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(9,9): error TS18033: Type 'Number' is not assignable to type 'number' as required for computed enum member values. - 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. -enumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(20,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(26,9): error TS18033: Type 'boolean' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(27,9): error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(28,9): error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(29,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(29,9): error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(30,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(30,9): error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(36,9): error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(37,9): error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(38,9): error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(39,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(40,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumErrors.ts(40,9): error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. -enumErrors.ts(48,18): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(49,24): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(49,26): error TS2452: An enum member cannot have a numeric name. -enumErrors.ts(50,28): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(50,30): error TS2452: An enum member cannot have a numeric name. -enumErrors.ts(50,31): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(53,16): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(53,22): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(53,30): error TS1357: An enum member name must be followed by a ',', '=', or '}'. -enumErrors.ts(53,33): error TS2452: An enum member cannot have a numeric name. - - -==== enumErrors.ts (37 errors) ==== - // Enum named with PredefinedTypes - enum any { } - ~~~ -!!! error TS2431: Enum name cannot be 'any'. - enum number { } - ~~~~~~ -!!! error TS2431: Enum name cannot be 'number'. - enum string { } - ~~~~~~ -!!! error TS2431: Enum name cannot be 'string'. - enum boolean { } - ~~~~~~~ -!!! error TS2431: Enum name cannot be 'boolean'. - - // Enum with computed member initializer of type Number - enum E5 { - C = new Number(30) - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~ -!!! error TS18033: Type 'Number' is not assignable to type 'number' as required for computed enum member values. -!!! error TS18033: 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible. - } - - enum E9 { - A, - B = A - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - //Enum with computed member intializer of different enum type - // Bug 707850: This should be allowed - enum E10 { - A = E9.A, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - B = E9.B - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - // Enum with computed member intializer of other types - enum E11 { - A = true, - ~~~~ -!!! error TS18033: Type 'boolean' is not assignable to type 'number' as required for computed enum member values. - B = new Date(), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~ -!!! error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. - C = window, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. - D = {}, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ -!!! error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. - E = (() => 'foo')(), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~~ -!!! error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. - } - - // Enum with string valued member and computed member initializers - enum E12 { - A = '', - B = new Date(), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~ -!!! error TS18033: Type 'Date' is not assignable to type 'number' as required for computed enum member values. - C = window, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS18033: Type 'Window & typeof globalThis' is not assignable to type 'number' as required for computed enum member values. - D = {}, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ -!!! error TS18033: Type '{}' is not assignable to type 'number' as required for computed enum member values. - E = 1 + 1, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - F = (() => 'foo')(), - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~~ -!!! error TS18033: Type 'string' is not assignable to type 'number' as required for computed enum member values. - } - - // Enum with incorrect syntax - enum E13 { - postComma, - postValueComma = 1, - - postSemicolon; - ~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - postColonValueComma: 2, - ~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - ~ -!!! error TS2452: An enum member cannot have a numeric name. - postColonValueSemicolon: 3; - ~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - ~ -!!! error TS2452: An enum member cannot have a numeric name. - ~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - }; - - enum E14 { a, b: any "hello" += 1, c, d} - ~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - ~~~~~~~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - ~~ -!!! error TS1357: An enum member name must be followed by a ',', '=', or '}'. - ~ -!!! error TS2452: An enum member cannot have a numeric name. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumExportMergingES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumExportMergingES6.d.ts deleted file mode 100644 index 32a52fb266109..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/enumExportMergingES6.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -//// [tests/cases/conformance/enums/enumExportMergingES6.ts] //// - -//// [enumExportMergingES6.ts] -export enum Animals { - Cat = 1 -} -export enum Animals { - Dog = 2 -} -export enum Animals { - CatDog = Cat | Dog -} - - -/// [Declarations] //// - - - -//// [enumExportMergingES6.d.ts] -export declare enum Animals { - Cat = 1 -} -export declare enum Animals { - Dog = 2 -} -export declare enum Animals { - CatDog = 3 -} - -/// [Errors] //// - -enumExportMergingES6.ts(8,2): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== enumExportMergingES6.ts (1 errors) ==== - export enum Animals { - Cat = 1 - } - export enum Animals { - Dog = 2 - } - export enum Animals { - CatDog = Cat | Dog - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts deleted file mode 100644 index f98082cc871c7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/isolatedModulesGlobalNamespacesAndEnums.d.ts +++ /dev/null @@ -1,137 +0,0 @@ -//// [tests/cases/compiler/isolatedModulesGlobalNamespacesAndEnums.ts] //// - -//// [script-namespaces.ts] -namespace Instantiated { - export const x = 1; -} -namespace Uninstantiated { - export type T = number; -} -declare namespace Ambient { - export const x: number; -} - -//// [module-namespaces.ts] -export namespace Instantiated { - export const x = 1; -} - -//// [enum1.ts] -enum Enum { A, B, C } -declare enum Enum { X = 1_000_000 } -const d = 'd'; - -//// [enum2.ts] -enum Enum { - D = d, - E = A, // error - Y = X, // error - Z = Enum.A -} - -declare enum Enum { - F = A -} - -/// [Declarations] //// - - - -//// [enum1.d.ts] -declare enum Enum { - A = 0, - B = 1, - C = 2 -} -declare enum Enum { - X = 1000000 -} -declare const d = "d"; - -//// [enum2.d.ts] -declare enum Enum { - D = "d", - E = 0,// error - Y = 1000000,// error - Z = 0 -} -declare enum Enum { - F = 0 -} - -//// [module-namespaces.d.ts] -export declare namespace Instantiated { - const x = 1; -} - -//// [script-namespaces.d.ts] -declare namespace Instantiated { - const x = 1; -} -declare namespace Uninstantiated { - type T = number; -} -declare namespace Ambient { - const x: number; -} - -/// [Errors] //// - -enum2.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enum2.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enum2.ts(3,9): error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. -enum2.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enum2.ts(4,9): error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. -enum2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enum2.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -script-namespaces.ts(1,11): error TS1280: Namespaces are not allowed in global script files when 'isolatedModules' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement. - - -==== script-namespaces.ts (1 errors) ==== - namespace Instantiated { - ~~~~~~~~~~~~ -!!! error TS1280: Namespaces are not allowed in global script files when 'isolatedModules' is enabled. If this file is not intended to be a global script, set 'moduleDetection' to 'force' or add an empty 'export {}' statement. - export const x = 1; - } - namespace Uninstantiated { - export type T = number; - } - declare namespace Ambient { - export const x: number; - } - -==== module-namespaces.ts (0 errors) ==== - export namespace Instantiated { - export const x = 1; - } - -==== enum1.ts (0 errors) ==== - enum Enum { A, B, C } - declare enum Enum { X = 1_000_000 } - const d = 'd'; - -==== enum2.ts (7 errors) ==== - enum Enum { - D = d, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - E = A, // error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1281: Cannot access 'A' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.A' instead. - Y = X, // error - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1281: Cannot access 'X' from another file without qualification when 'isolatedModules' is enabled. Use 'Enum.X' instead. - Z = Enum.A - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - declare enum Enum { - F = A - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/mergedDeclarations2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/mergedDeclarations2.d.ts deleted file mode 100644 index 955154dcd7d18..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/mergedDeclarations2.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -//// [tests/cases/compiler/mergedDeclarations2.ts] //// - -//// [mergedDeclarations2.ts] -enum Foo { - b -} -enum Foo { - a = b -} - -module Foo { - export var x = b -} - -/// [Declarations] //// - - - -//// [mergedDeclarations2.d.ts] -declare enum Foo { - b = 0 -} -declare enum Foo { - a = 0 -} -declare namespace Foo { - var x: invalid; -} - -/// [Errors] //// - -mergedDeclarations2.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -mergedDeclarations2.ts(9,20): error TS2304: Cannot find name 'b'. -mergedDeclarations2.ts(9,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== mergedDeclarations2.ts (3 errors) ==== - enum Foo { - b - } - enum Foo { - a = b - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - module Foo { - export var x = b - ~ -!!! error TS2304: Cannot find name 'b'. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/mergedEnumDeclarationCodeGen.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/mergedEnumDeclarationCodeGen.d.ts deleted file mode 100644 index fc8380f719ed9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/mergedEnumDeclarationCodeGen.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -//// [tests/cases/compiler/mergedEnumDeclarationCodeGen.ts] //// - -//// [mergedEnumDeclarationCodeGen.ts] -enum E { - a, - b = a -} -enum E { - c = a -} - -/// [Declarations] //// - - - -//// [mergedEnumDeclarationCodeGen.d.ts] -declare enum E { - a = 0, - b = 0 -} -declare enum E { - c = 0 -} - -/// [Errors] //// - -mergedEnumDeclarationCodeGen.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -mergedEnumDeclarationCodeGen.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== mergedEnumDeclarationCodeGen.ts (2 errors) ==== - enum E { - a, - b = a - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - enum E { - c = a - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralTypes4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralTypes4.d.ts deleted file mode 100644 index 24d3ae0808a4d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralTypes4.d.ts +++ /dev/null @@ -1,790 +0,0 @@ -//// [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; - -/// [Errors] //// - -templateLiteralTypes4.ts(43,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -templateLiteralTypes4.ts(43,60): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - 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/original/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts deleted file mode 100644 index f10315cd501ad..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/verbatimModuleSyntaxConstEnumUsage.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -//// [tests/cases/conformance/externalModules/verbatimModuleSyntaxConstEnumUsage.ts] //// - -//// [foo.ts] -export enum Foo { - a = 1, - b, - c, -} - -//// [bar.ts] -import {Foo} from './foo.js'; - -export enum Bar { - a = Foo.a, - c = Foo.c, - e = 5, -} - -/// [Declarations] //// - - - -//// [bar.d.ts] -export declare enum Bar { - a = 1, - c = 3, - e = 5 -} - -//// [foo.d.ts] -export declare enum Foo { - a = 1, - b = 2, - c = 3 -} - -/// [Errors] //// - -bar.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -bar.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== foo.ts (0 errors) ==== - export enum Foo { - a = 1, - b, - c, - } - -==== bar.ts (2 errors) ==== - import {Foo} from './foo.js'; - - export enum Bar { - a = Foo.a, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - c = Foo.c, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - e = 5, - } \ No newline at end of file From 9a3db9c7b9571db7a1c46bd63c170f303d2c9844 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 14 Nov 2023 13:29:15 +0000 Subject: [PATCH 134/224] Updated fixer compiler settings. --- src/testRunner/compilerRunner.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 354d479dee53b..7ff7e4315ca18 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -699,7 +699,9 @@ class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest { } } else { - transformSucceeded = fixTestFiles(env.fileSystem, env.programFileNames, env.compilerOptions); + const fixerOptions = ts.cloneCompilerOptions(env.compilerOptions); + fixerOptions.isolatedDeclarations = true; + transformSucceeded = fixTestFiles(env.fileSystem, env.programFileNames, fixerOptions); let cachedTest = "// @hash: " + hash + "\n"; if (!transformSucceeded) { From fca6fb1adfe74a94e5e8470c405cf704e73e2464 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 14 Nov 2023 11:02:14 +0000 Subject: [PATCH 135/224] Refactor evaluator to be outside the checker. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/checker.ts | 96 ++-------------- .../declarations/emit-resolver.ts | 6 +- .../transformers/declarations/evaluator.ts | 108 ------------------ src/compiler/utilities.ts | 101 ++++++++++++++++ .../auto-fixed/diff/constEnum2.d.ts.diff | 50 ++++++++ .../auto-fixed/dte/constEnum2.d.ts | 67 +++++++++++ .../auto-fixed/tsc/constEnum2.d.ts | 57 +++++++++ 7 files changed, 285 insertions(+), 200 deletions(-) delete mode 100644 src/compiler/transformers/declarations/evaluator.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constEnum2.d.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 8e879e75874dc..8b46f3ae170dd 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -109,6 +109,7 @@ import { createDiagnosticForNodeFromMessageChain, createDiagnosticMessageChainFromDiagnostic, createEmptyExports, + createEvaluator, createFileDiagnostic, createGetCanonicalFileName, createGetSymbolWalker, @@ -1467,6 +1468,11 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { 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); @@ -38437,7 +38443,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; } @@ -44829,79 +44835,6 @@ 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; - } - } - 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: - case SyntaxKind.PropertyAccessExpression: - return evaluateEntityNameExpression(expr as EntityNameExpression, location); - case SyntaxKind.ElementAccessExpression: - return evaluateElementAccessExpression(expr as ElementAccessExpression, location); - } - return undefined; - } - function evaluateEntityNameExpression(expr: EntityNameExpression, location?: Declaration) { if ( isIdentifier(expr) && isInfinityOrNaNString(expr.escapedText) && @@ -44923,7 +44856,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } return getEnumMemberValue(enumMember); } - if (compilerOptions.isolatedDeclarations && isConstantVariable(symbol)) { + 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); @@ -44967,19 +44900,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)); } diff --git a/src/compiler/transformers/declarations/emit-resolver.ts b/src/compiler/transformers/declarations/emit-resolver.ts index 8fd370c608cc4..86689e32ad734 100644 --- a/src/compiler/transformers/declarations/emit-resolver.ts +++ b/src/compiler/transformers/declarations/emit-resolver.ts @@ -2,6 +2,7 @@ import { AnyImportSyntax, appendIfUnique, ComputedPropertyName, + createEvaluator, Debug, Declaration, DeclarationName, @@ -90,9 +91,6 @@ import { EmitDeclarationNodeLinks, EmitDeclarationSymbol, } from "./emit-binder"; -import { - makeEvaluator, -} from "./evaluator"; import { IsolatedEmitHost, IsolatedEmitResolver, @@ -125,7 +123,7 @@ export function createEmitDeclarationResolver(file: SourceFile, host: IsolatedEm } return undefined; } - const evaluate = makeEvaluator({ + const evaluate = createEvaluator({ evaluateElementAccessExpression(expr, location) { // We only resolve names in the current enum declaration if (!location || !isEnumDeclaration(location)) return undefined; diff --git a/src/compiler/transformers/declarations/evaluator.ts b/src/compiler/transformers/declarations/evaluator.ts deleted file mode 100644 index 1b95ac7ef562d..0000000000000 --- a/src/compiler/transformers/declarations/evaluator.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { - BinaryExpression, - Declaration, - ElementAccessExpression, - EntityNameExpression, - Expression, - NumericLiteral, - ParenthesizedExpression, - PrefixUnaryExpression, - StringLiteralLike, - SyntaxKind, - TemplateExpression, -} from "../../_namespaces/ts"; - -interface EvaluationResolver { - evaluateEntityNameExpression(expr: EntityNameExpression, location: Declaration | undefined): string | number | undefined; - evaluateElementAccessExpression(expr: ElementAccessExpression, location: Declaration | undefined): string | number | undefined; - onNumericLiteral(expr: NumericLiteral): void; -} -export function makeEvaluator({ evaluateElementAccessExpression, evaluateEntityNameExpression, onNumericLiteral }: EvaluationResolver) { - 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; -} diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 8ed4e7650920d..7f87221303f94 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -510,6 +510,7 @@ import { SyntaxKind, SyntaxList, TaggedTemplateExpression, + TemplateExpression, TemplateLiteral, TemplateLiteralLikeNode, TemplateLiteralToken, @@ -10620,3 +10621,103 @@ export function determineIfDeclarationIsVisible(node: Node, isDeclarationVisible 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; +} 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..ba653a0b102c8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/constEnum2.d.ts.diff @@ -0,0 +1,50 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/conformance/constEnums/constEnum2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -8,16 +8,20 @@ + f, + g + } + //# sourceMappingURL=constEnum2.d.ts.map ++ + /// [Errors] //// + ++constEnum2.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnum2.ts(10,9): error TS2474: const enum member initializers must be constant expressions. ++constEnum2.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnum2.ts(11,9): error TS2474: const enum member initializers must be constant expressions. ++constEnum2.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 +30,19 @@ + const CONST: number = 9000 % 2; + const enum D { + d = 10, + e = 199 * Math.floor(Math.random() * 1000), ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS2474: const enum member initializers must be constant expressions. + f = d - (100 * Math.floor(Math.random() % 8)), ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS2474: const enum member initializers must be constant expressions. + g = CONST, ++ ~ ++!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ + !!! 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/constEnum2.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum2.d.ts new file mode 100644 index 0000000000000..d4f7a985ab23a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum2.d.ts @@ -0,0 +1,67 @@ +//// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnum2.ts(10,9): error TS2474: const enum member initializers must be constant expressions. +constEnum2.ts(11,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnum2.ts(11,9): error TS2474: const enum member initializers must be constant expressions. +constEnum2.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. + f = d - (100 * Math.floor(Math.random() % 8)), + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2474: const enum member initializers must be constant expressions. + g = CONST, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! 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/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 From 767f0fe0c8512d1f62971721975eb3eeef18f43d Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 15 Nov 2023 10:58:48 +0000 Subject: [PATCH 136/224] Do not report and bail if node has a parse error. Signed-off-by: Titian Cernicova-Dragomir --- .../declarations/localInferenceResolver.ts | 10 +++ ...utedPropertyNamesOnOverloads_ES5.d.ts.diff | 39 ------------ .../diff/parserES5SymbolProperty4.d.ts.diff | 29 --------- .../diff/parserES5SymbolProperty8.d.ts.diff | 19 ------ .../diff/parserSymbolIndexer5.d.ts.diff | 41 ------------- .../original/diff/privateIndexer2.d.ts.diff | 37 ----------- .../computedPropertyNamesOnOverloads_ES5.d.ts | 47 -------------- .../dte/parserES5SymbolProperty4.d.ts | 33 ---------- .../dte/parserES5SymbolProperty8.d.ts | 30 --------- .../original/dte/parserSymbolIndexer5.d.ts | 47 -------------- .../original/dte/privateIndexer2.d.ts | 61 ------------------- .../computedPropertyNamesOnOverloads_ES5.d.ts | 51 ---------------- .../tsc/parserES5SymbolProperty4.d.ts | 36 ----------- .../tsc/parserES5SymbolProperty8.d.ts | 28 --------- .../original/tsc/parserSymbolIndexer5.d.ts | 47 -------------- .../original/tsc/privateIndexer2.d.ts | 61 ------------------- 16 files changed, 10 insertions(+), 606 deletions(-) delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserSymbolIndexer5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/privateIndexer2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserSymbolIndexer5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/privateIndexer2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserSymbolIndexer5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/privateIndexer2.d.ts diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 6a541b0a02b20..3f1bc556c5024 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -164,7 +164,12 @@ export function createLocalInferenceResolver({ }, isolatedDeclarations: options.isolatedDeclarations, }; + function hasParseError(node: Node) { + return !!(node.flags & NodeFlags.ThisNodeHasError); + } function reportIsolatedDeclarationError(node: Node) { + // Do not report errors on nodes with other errors. + if (hasParseError(node)) return; const message = createDiagnosticForNode( node, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit, @@ -229,6 +234,8 @@ export function createLocalInferenceResolver({ return invalid(getAccessor ?? setAccessor!); } function localInference(node: Node, inferenceFlags: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { + // Bail if node has parse errors, we're just adding noise + if (hasParseError(node)) return invalid(node); switch (node.kind) { case SyntaxKind.ParenthesizedExpression: return localInference((node as ParenthesizedExpression).expression, inferenceFlags & NarrowBehavior.NotKeepLiterals); @@ -380,6 +387,7 @@ export function createLocalInferenceResolver({ let replaceWithInvalid = false; for (let propIndex = 0, length = objectLiteral.properties.length; propIndex < length; propIndex++) { const prop = objectLiteral.properties[propIndex]; + if (hasParseError(prop)) return invalid(prop); if (isShorthandPropertyAssignment(prop)) { reportIsolatedDeclarationError(prop); @@ -392,6 +400,8 @@ export function createLocalInferenceResolver({ continue; } + if (hasParseError(prop.name)) return invalid(prop.name); + if (isPrivateIdentifier(prop.name)) { // Not valid in object literals but the compiler will complain about this, we just ignore it here. continue; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff deleted file mode 100644 index d93509e645cbf..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff +++ /dev/null @@ -1,39 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -5,21 +5,19 @@ - declare var accessorName: string; - declare class C { - [methodName](v: string): invalid; - [methodName](): invalid; -- [methodName](v?: string): invalid; - } - - /// [Errors] //// - - computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - --==== computedPropertyNamesOnOverloads_ES5.ts (5 errors) ==== -+==== computedPropertyNamesOnOverloads_ES5.ts (4 errors) ==== - var methodName = "method"; - var accessorName = "accessor"; - class C { - [methodName](v: string); -@@ -32,7 +30,5 @@ - !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - [methodName](v?: string) { } -- ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff deleted file mode 100644 index 80b7f9ef9b597..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff +++ /dev/null @@ -1,29 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -7,20 +7,17 @@ - - /// [Errors] //// - - parserES5SymbolProperty4.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserES5SymbolProperty4.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - parserES5SymbolProperty4.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - parserES5SymbolProperty4.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. - - --==== parserES5SymbolProperty4.ts (4 errors) ==== -+==== parserES5SymbolProperty4.ts (3 errors) ==== - declare class C { - [Symbol.isRegExp]: string; - ~~~~~~~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~~~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ - !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ - !!! error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff deleted file mode 100644 index 8b71606a57ddc..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff +++ /dev/null @@ -1,19 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,10 @@ - - - //// [parserES5SymbolProperty8.d.ts] --declare var x: {}; -+declare var x: { -+ [Symbol.toPrimitive](): string; -+}; - - /// [Errors] //// - - parserES5SymbolProperty8.ts(2,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/original/diff/parserSymbolIndexer5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserSymbolIndexer5.d.ts.diff deleted file mode 100644 index 45113e075ce87..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserSymbolIndexer5.d.ts.diff +++ /dev/null @@ -1,41 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,12 +4,12 @@ - declare var x: invalid; - - /// [Errors] //// - --parserSymbolIndexer5.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - parserSymbolIndexer5.ts(2,6): error TS2304: Cannot find name 's'. - parserSymbolIndexer5.ts(2,7): error TS1005: ']' expected. - parserSymbolIndexer5.ts(2,9): error TS2552: Cannot find name 'symbol'. Did you mean 'Symbol'? -+parserSymbolIndexer5.ts(2,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - parserSymbolIndexer5.ts(2,15): error TS1005: ',' expected. - parserSymbolIndexer5.ts(2,16): error TS1136: Property assignment expected. - parserSymbolIndexer5.ts(2,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - parserSymbolIndexer5.ts(3,1): error TS1005: ':' expected. -@@ -17,17 +17,17 @@ - - ==== parserSymbolIndexer5.ts (8 errors) ==== - var x = { - [s: symbol]: "" -- ~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS2304: Cannot find name 's'. - ~ - !!! error TS1005: ']' expected. - ~~~~~~ - !!! error TS2552: Cannot find name 'symbol'. Did you mean 'Symbol'? - !!! related TS2728 lib.es2015.symbol.d.ts:--:--: 'Symbol' is declared here. -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1005: ',' expected. - ~ - !!! error TS1136: Property assignment expected. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/privateIndexer2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/privateIndexer2.d.ts.diff deleted file mode 100644 index 2aefc55b39f6b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/privateIndexer2.d.ts.diff +++ /dev/null @@ -1,37 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -7,11 +7,11 @@ - }; - - /// [Errors] //// - --privateIndexer2.ts(4,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - privateIndexer2.ts(4,15): error TS1005: ']' expected. - privateIndexer2.ts(4,17): error TS2693: 'string' only refers to a type, but is being used as a value here. -+privateIndexer2.ts(4,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - privateIndexer2.ts(4,23): error TS1005: ',' expected. - privateIndexer2.ts(4,24): error TS1136: Property assignment expected. - privateIndexer2.ts(4,26): error TS2693: 'string' only refers to a type, but is being used as a value here. - privateIndexer2.ts(4,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -@@ -22,14 +22,14 @@ - // private indexers not allowed - - var x = { - private [x: string]: string; -- ~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1005: ']' expected. - ~~~~~~ - !!! error TS2693: 'string' only refers to a type, but is being used as a value here. -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS1005: ',' expected. - ~ - !!! error TS1136: Property assignment expected. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts deleted file mode 100644 index 0e70d22b6807c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts] //// - -//// [computedPropertyNamesOnOverloads_ES5.ts] -var methodName = "method"; -var accessorName = "accessor"; -class C { - [methodName](v: string); - [methodName](); - [methodName](v?: string) { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNamesOnOverloads_ES5.d.ts] -declare var methodName: string; -declare var accessorName: string; -declare class C { - [methodName](v: string): invalid; - [methodName](): invalid; -} - -/// [Errors] //// - -computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== computedPropertyNamesOnOverloads_ES5.ts (4 errors) ==== - var methodName = "method"; - var accessorName = "accessor"; - class C { - [methodName](v: string); - ~~~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - [methodName](); - ~~~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - [methodName](v?: string) { } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts deleted file mode 100644 index 2d96420f38230..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts] //// - -//// [parserES5SymbolProperty4.ts] -declare class C { - [Symbol.isRegExp]: string; -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty4.d.ts] -declare class C { - [Symbol.isRegExp]: string; -} - -/// [Errors] //// - -parserES5SymbolProperty4.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5SymbolProperty4.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -parserES5SymbolProperty4.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. - - -==== parserES5SymbolProperty4.ts (3 errors) ==== - declare class C { - [Symbol.isRegExp]: string; - ~~~~~~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ -!!! error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts deleted file mode 100644 index 4934e408820f3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts] //// - -//// [parserES5SymbolProperty8.ts] -var x: { - [Symbol.toPrimitive](): string -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty8.d.ts] -declare var x: { - [Symbol.toPrimitive](): string; -}; - -/// [Errors] //// - -parserES5SymbolProperty8.ts(2,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. -parserES5SymbolProperty8.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== parserES5SymbolProperty8.ts (2 errors) ==== - var x: { - [Symbol.toPrimitive](): 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 TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserSymbolIndexer5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserSymbolIndexer5.d.ts deleted file mode 100644 index b425ea3161ce7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserSymbolIndexer5.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts] //// - -//// [parserSymbolIndexer5.ts] -var x = { - [s: symbol]: "" -} - -/// [Declarations] //// - - - -//// [parserSymbolIndexer5.d.ts] -declare var x: invalid; - -/// [Errors] //// - -parserSymbolIndexer5.ts(2,6): error TS2304: Cannot find name 's'. -parserSymbolIndexer5.ts(2,7): error TS1005: ']' expected. -parserSymbolIndexer5.ts(2,9): error TS2552: Cannot find name 'symbol'. Did you mean 'Symbol'? -parserSymbolIndexer5.ts(2,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserSymbolIndexer5.ts(2,15): error TS1005: ',' expected. -parserSymbolIndexer5.ts(2,16): error TS1136: Property assignment expected. -parserSymbolIndexer5.ts(2,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserSymbolIndexer5.ts(3,1): error TS1005: ':' expected. - - -==== parserSymbolIndexer5.ts (8 errors) ==== - var x = { - [s: symbol]: "" - ~ -!!! error TS2304: Cannot find name 's'. - ~ -!!! error TS1005: ']' expected. - ~~~~~~ -!!! error TS2552: Cannot find name 'symbol'. Did you mean 'Symbol'? -!!! related TS2728 lib.es2015.symbol.d.ts:--:--: 'Symbol' is declared here. - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1005: ',' expected. - ~ -!!! error TS1136: Property assignment expected. - -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - ~ -!!! error TS1005: ':' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/privateIndexer2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/privateIndexer2.d.ts deleted file mode 100644 index 93d519337ce00..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/privateIndexer2.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -//// [tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts] //// - -//// [privateIndexer2.ts] -// private indexers not allowed - -var x = { - private [x: string]: string; -} - -var y: { - private[x: string]: string; -} - -/// [Declarations] //// - - - -//// [privateIndexer2.d.ts] -declare var x: invalid; -declare var y: { - private []: string; -}; - -/// [Errors] //// - -privateIndexer2.ts(4,15): error TS1005: ']' expected. -privateIndexer2.ts(4,17): error TS2693: 'string' only refers to a type, but is being used as a value here. -privateIndexer2.ts(4,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -privateIndexer2.ts(4,23): error TS1005: ',' expected. -privateIndexer2.ts(4,24): error TS1136: Property assignment expected. -privateIndexer2.ts(4,26): error TS2693: 'string' only refers to a type, but is being used as a value here. -privateIndexer2.ts(4,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -privateIndexer2.ts(4,32): error TS1005: ',' expected. - - -==== privateIndexer2.ts (8 errors) ==== - // private indexers not allowed - - var x = { - private [x: string]: string; - ~ -!!! error TS1005: ']' expected. - ~~~~~~ -!!! error TS2693: 'string' only refers to a type, but is being used as a value here. - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1005: ',' expected. - ~ -!!! error TS1136: Property assignment expected. - ~~~~~~ -!!! error TS2693: 'string' only refers to a type, but is being used as a value here. - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1005: ',' expected. - } - - var y: { - private[x: string]: string; - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts deleted file mode 100644 index c048cce9b8d89..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts] //// - -//// [computedPropertyNamesOnOverloads_ES5.ts] -var methodName = "method"; -var accessorName = "accessor"; -class C { - [methodName](v: string); - [methodName](); - [methodName](v?: string) { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNamesOnOverloads_ES5.d.ts] -declare var methodName: string; -declare var accessorName: string; -declare class C { - [methodName](v: string): invalid; - [methodName](): invalid; - [methodName](v?: string): invalid; -} - -/// [Errors] //// - -computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== computedPropertyNamesOnOverloads_ES5.ts (5 errors) ==== - var methodName = "method"; - var accessorName = "accessor"; - class C { - [methodName](v: string); - ~~~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - [methodName](); - ~~~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - [methodName](v?: string) { } - ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts deleted file mode 100644 index 999eb03262bca..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts] //// - -//// [parserES5SymbolProperty4.ts] -declare class C { - [Symbol.isRegExp]: string; -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty4.d.ts] -declare class C { - [Symbol.isRegExp]: string; -} - -/// [Errors] //// - -parserES5SymbolProperty4.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5SymbolProperty4.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserES5SymbolProperty4.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -parserES5SymbolProperty4.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. - - -==== parserES5SymbolProperty4.ts (4 errors) ==== - declare class C { - [Symbol.isRegExp]: string; - ~~~~~~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ -!!! error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts deleted file mode 100644 index 516618b30e4a8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts] //// - -//// [parserES5SymbolProperty8.ts] -var x: { - [Symbol.toPrimitive](): string -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty8.d.ts] -declare var x: {}; - -/// [Errors] //// - -parserES5SymbolProperty8.ts(2,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. -parserES5SymbolProperty8.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== parserES5SymbolProperty8.ts (2 errors) ==== - var x: { - [Symbol.toPrimitive](): 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 TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserSymbolIndexer5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserSymbolIndexer5.d.ts deleted file mode 100644 index 13f57ce590180..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserSymbolIndexer5.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts] //// - -//// [parserSymbolIndexer5.ts] -var x = { - [s: symbol]: "" -} - -/// [Declarations] //// - - - -//// [parserSymbolIndexer5.d.ts] -declare var x: invalid; - -/// [Errors] //// - -parserSymbolIndexer5.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserSymbolIndexer5.ts(2,6): error TS2304: Cannot find name 's'. -parserSymbolIndexer5.ts(2,7): error TS1005: ']' expected. -parserSymbolIndexer5.ts(2,9): error TS2552: Cannot find name 'symbol'. Did you mean 'Symbol'? -parserSymbolIndexer5.ts(2,15): error TS1005: ',' expected. -parserSymbolIndexer5.ts(2,16): error TS1136: Property assignment expected. -parserSymbolIndexer5.ts(2,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parserSymbolIndexer5.ts(3,1): error TS1005: ':' expected. - - -==== parserSymbolIndexer5.ts (8 errors) ==== - var x = { - [s: symbol]: "" - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS2304: Cannot find name 's'. - ~ -!!! error TS1005: ']' expected. - ~~~~~~ -!!! error TS2552: Cannot find name 'symbol'. Did you mean 'Symbol'? -!!! related TS2728 lib.es2015.symbol.d.ts:--:--: 'Symbol' is declared here. - ~ -!!! error TS1005: ',' expected. - ~ -!!! error TS1136: Property assignment expected. - -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - ~ -!!! error TS1005: ':' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/privateIndexer2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/privateIndexer2.d.ts deleted file mode 100644 index 93561f1ab198c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/privateIndexer2.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -//// [tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts] //// - -//// [privateIndexer2.ts] -// private indexers not allowed - -var x = { - private [x: string]: string; -} - -var y: { - private[x: string]: string; -} - -/// [Declarations] //// - - - -//// [privateIndexer2.d.ts] -declare var x: invalid; -declare var y: { - private []: string; -}; - -/// [Errors] //// - -privateIndexer2.ts(4,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -privateIndexer2.ts(4,15): error TS1005: ']' expected. -privateIndexer2.ts(4,17): error TS2693: 'string' only refers to a type, but is being used as a value here. -privateIndexer2.ts(4,23): error TS1005: ',' expected. -privateIndexer2.ts(4,24): error TS1136: Property assignment expected. -privateIndexer2.ts(4,26): error TS2693: 'string' only refers to a type, but is being used as a value here. -privateIndexer2.ts(4,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -privateIndexer2.ts(4,32): error TS1005: ',' expected. - - -==== privateIndexer2.ts (8 errors) ==== - // private indexers not allowed - - var x = { - private [x: string]: string; - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1005: ']' expected. - ~~~~~~ -!!! error TS2693: 'string' only refers to a type, but is being used as a value here. - ~ -!!! error TS1005: ',' expected. - ~ -!!! error TS1136: Property assignment expected. - ~~~~~~ -!!! error TS2693: 'string' only refers to a type, but is being used as a value here. - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS1005: ',' expected. - } - - var y: { - private[x: string]: string; - } \ No newline at end of file From 91c8b76f82327f239d7b72fdfa874a8b5f4231b6 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 17 Nov 2023 15:23:54 +0000 Subject: [PATCH 137/224] Minor Fixes. Added reasons for current diffs Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/checker.ts | 11 +- .../declarations/emit-resolver.ts | 33 +- .../declarations/localInferenceResolver.ts | 6 +- .../transformers/declarations/utils.ts | 3 +- src/harness/harnessIO.ts | 6 +- src/testRunner/compilerRunner.ts | 11 +- ...FlatNoCrashInferenceDeclarations.d.ts.diff | 2 +- .../diff/computedEnumTypeWidening.d.ts.diff | 2 +- .../auto-fixed/diff/constEnum2.d.ts.diff | 2 +- .../auto-fixed/diff/declFileEnums.d.ts.diff | 2 +- ...EmitCommonJsModuleReferencedType.d.ts.diff | 2 +- ...efaultExportWithStaticAssignment.d.ts.diff | 2 +- ...DestructuringParameterProperties.d.ts.diff | 2 +- ...onEmitExpandoPropertyPrivateName.d.ts.diff | 2 +- ...EmitForGlobalishSpecifierSymlink.d.ts.diff | 2 +- ...mitForGlobalishSpecifierSymlink2.d.ts.diff | 2 +- ...onEmitFunctionDuplicateNamespace.d.ts.diff | 2 +- ...clarationEmitFunctionKeywordProp.d.ts.diff | 2 +- ...larationEmitLateBoundAssignments.d.ts.diff | 2 +- ...arationEmitLateBoundAssignments2.d.ts.diff | 105 ++----- ...nEmitObjectAssignedDefaultExport.d.ts.diff | 2 +- ...onEmitReexportedSymlinkReference.d.ts.diff | 2 +- ...nEmitReexportedSymlinkReference2.d.ts.diff | 2 +- ...nEmitReexportedSymlinkReference3.d.ts.diff | 2 +- ...mitWithInvalidPackageJsonTypings.d.ts.diff | 2 +- .../diff/declarationFiles.d.ts.diff | 2 +- .../diff/enumClassification.d.ts.diff | 2 +- ...hTemplateLiteralsEmitDeclaration.d.ts.diff | 2 +- ...ctionExpressionsWithDynamicNames.d.ts.diff | 53 ---- .../diff/exportDefaultNamespace.d.ts.diff | 2 +- ...tionMemberAssignmentDeclarations.d.ts.diff | 2 +- ...rtsSpecifierGenerationConditions.d.ts.diff | 2 +- ...nodeModuleReexportFromDottedPath.d.ts.diff | 2 +- ...ecifierResolution(module=node16).d.ts.diff | 2 +- ...ifierResolution(module=nodenext).d.ts.diff | 2 +- ...esExportsSourceTs(module=node16).d.ts.diff | 2 +- ...ExportsSourceTs(module=nodenext).d.ts.diff | 2 +- ...erationConditions(module=node16).d.ts.diff | 2 +- ...ationConditions(module=nodenext).d.ts.diff | 2 +- ...nerationDirectory(module=node16).d.ts.diff | 2 +- ...rationDirectory(module=nodenext).d.ts.diff | 2 +- ...GenerationPattern(module=node16).d.ts.diff | 2 +- ...nerationPattern(module=nodenext).d.ts.diff | 2 +- .../diff/nullPropertyName.d.ts.diff | 2 +- .../diff/numericEnumMappedType.d.ts.diff | 2 +- .../diff/symbolDeclarationEmit12.d.ts.diff | 2 +- ...larationEmitModuleNamesImportRef.d.ts.diff | 2 +- .../diff/templateLiteralTypes4.d.ts.diff | 2 +- .../typeFromPropertyAssignment29.d.ts.diff | 2 +- ...ersionsDeclarationEmit.multiFile.d.ts.diff | 2 +- ...mit.multiFileBackReferenceToSelf.d.ts.diff | 2 +- ...multiFileBackReferenceToUnmapped.d.ts.diff | 2 +- .../declarationEmitLateBoundAssignments2.d.ts | 107 ++++--- ...doFunctionExpressionsWithDynamicNames.d.ts | 50 --- .../dte/typeFromPropertyAssignment29.d.ts | 4 +- .../declarationEmitLateBoundAssignments2.d.ts | 27 +- ...doFunctionExpressionsWithDynamicNames.d.ts | 28 -- .../tsc/typeFromPropertyAssignment29.d.ts | 4 +- .../diff/ES5SymbolProperty1.d.ts.diff | 2 +- .../diff/FunctionDeclaration8_es6.d.ts.diff | 2 +- ...asyncFunctionDeclaration8_es2017.d.ts.diff | 2 +- .../asyncFunctionDeclaration8_es5.d.ts.diff | 2 +- .../asyncFunctionDeclaration8_es6.d.ts.diff | 2 +- .../original/diff/bigintIndex.d.ts.diff | 2 +- .../diff/complicatedPrivacy.d.ts.diff | 2 +- .../diff/computedPropertiesNarrowed.d.ts.diff | 2 +- .../computedPropertyNames12_ES5.d.ts.diff | 2 +- .../computedPropertyNames12_ES6.d.ts.diff | 2 +- .../computedPropertyNames16_ES5.d.ts.diff | 2 +- .../computedPropertyNames16_ES6.d.ts.diff | 2 +- .../diff/computedPropertyNames2_ES5.d.ts.diff | 2 +- .../diff/computedPropertyNames2_ES6.d.ts.diff | 2 +- .../diff/computedPropertyNames4_ES5.d.ts.diff | 2 +- .../diff/computedPropertyNames4_ES6.d.ts.diff | 2 +- .../diff/computedPropertyNames5_ES5.d.ts.diff | 2 +- .../diff/computedPropertyNames5_ES6.d.ts.diff | 2 +- .../diff/computedPropertyNames6_ES5.d.ts.diff | 2 +- .../diff/computedPropertyNames6_ES6.d.ts.diff | 2 +- ...utedPropertyNamesOnOverloads_ES5.d.ts.diff | 39 +++ ...utedPropertyNamesOnOverloads_ES6.d.ts.diff | 2 +- ...dPropertyNamesWithStaticProperty.d.ts.diff | 2 +- .../original/diff/constEnumErrors.d.ts.diff | 2 +- .../original/diff/constEnums.d.ts.diff | 2 +- .../contextualReturnTypeOfIIFE2.d.ts.diff | 2 +- ...gModuleAugmentationRetainsImport.d.ts.diff | 2 +- ...ionEmitHasTypesRefOnNamespaceUse.d.ts.diff | 2 +- ...arationEmitLateBoundAssignments2.d.ts.diff | 112 ------- ...larationFilesWithTypeReferences2.d.ts.diff | 2 +- .../decoratorsOnComputedProperties.d.ts.diff | 2 +- .../diff/enumConstantMembers.d.ts.diff | 94 ------ ...ctionExpressionsWithDynamicNames.d.ts.diff | 43 --- .../original/diff/forwardRefInEnum.d.ts.diff | 2 +- .../original/diff/giant.d.ts.diff | 2 +- ...xSignatureMustHaveTypeAnnotation.d.ts.diff | 2 +- ...ypeNoSubstitutionTemplateLiteral.d.ts.diff | 26 -- .../diff/indexWithoutParamType2.d.ts.diff | 2 +- .../original/diff/intTypeCheck.d.ts.diff | 2 +- ...teEscapeSequences(target=es2015).d.ts.diff | 18 -- ...plateEscapeSequences(target=es5).d.ts.diff | 18 -- ...teEscapeSequences(target=esnext).d.ts.diff | 18 -- ...ithSuffixes_one_externalTSModule.d.ts.diff | 2 +- .../diff/overloadsWithComputedNames.d.ts.diff | 2 +- .../original/diff/parseBigInt.d.ts.diff | 40 --- .../parserComputedPropertyName1.d.ts.diff | 10 +- .../parserComputedPropertyName10.d.ts.diff | 2 +- .../parserComputedPropertyName13.d.ts.diff | 2 +- .../parserComputedPropertyName14.d.ts.diff | 2 +- .../parserComputedPropertyName15.d.ts.diff | 2 +- .../parserComputedPropertyName18.d.ts.diff | 2 +- .../parserComputedPropertyName19.d.ts.diff | 2 +- .../parserComputedPropertyName2.d.ts.diff | 2 +- .../parserComputedPropertyName20.d.ts.diff | 2 +- .../parserComputedPropertyName21.d.ts.diff | 2 +- .../parserComputedPropertyName22.d.ts.diff | 2 +- .../parserComputedPropertyName23.d.ts.diff | 2 +- .../parserComputedPropertyName24.d.ts.diff | 2 +- .../parserComputedPropertyName25.d.ts.diff | 2 +- .../parserComputedPropertyName27.d.ts.diff | 2 +- .../parserComputedPropertyName28.d.ts.diff | 2 +- .../parserComputedPropertyName29.d.ts.diff | 2 +- .../parserComputedPropertyName31.d.ts.diff | 2 +- .../parserComputedPropertyName32.d.ts.diff | 2 +- .../parserComputedPropertyName33.d.ts.diff | 2 +- .../parserComputedPropertyName36.d.ts.diff | 2 +- .../parserComputedPropertyName37.d.ts.diff | 2 +- .../parserComputedPropertyName6.d.ts.diff | 2 +- .../parserComputedPropertyName9.d.ts.diff | 2 +- .../parserES5ComputedPropertyName1.d.ts.diff | 2 +- .../parserES5ComputedPropertyName10.d.ts.diff | 2 +- .../parserES5ComputedPropertyName2.d.ts.diff | 2 +- .../parserES5ComputedPropertyName5.d.ts.diff | 2 +- .../parserES5ComputedPropertyName8.d.ts.diff | 2 +- .../parserES5ComputedPropertyName9.d.ts.diff | 2 +- .../diff/parserES5SymbolProperty1.d.ts.diff | 2 +- .../diff/parserES5SymbolProperty2.d.ts.diff | 2 +- .../diff/parserES5SymbolProperty3.d.ts.diff | 2 +- .../diff/parserES5SymbolProperty4.d.ts.diff | 29 ++ .../diff/parserES5SymbolProperty5.d.ts.diff | 2 +- .../diff/parserES5SymbolProperty6.d.ts.diff | 2 +- .../diff/parserES5SymbolProperty7.d.ts.diff | 2 +- .../diff/parserES5SymbolProperty8.d.ts.diff | 19 ++ .../diff/parserES5SymbolProperty9.d.ts.diff | 2 +- .../diff/parserIndexSignature11.d.ts.diff | 2 +- .../diff/parserIndexSignature5.d.ts.diff | 2 +- .../original/diff/parserStrictMode8.d.ts.diff | 2 +- .../diff/propertyAssignment.d.ts.diff | 2 +- .../reExportAliasMakesInstantiated.d.ts.diff | 2 +- ...s(usedefineforclassfields=false).d.ts.diff | 2 +- ...ts(usedefineforclassfields=true).d.ts.diff | 2 +- .../diff/symbolDeclarationEmit12.d.ts.diff | 2 +- .../original/diff/symbolProperty1.d.ts.diff | 2 +- .../original/diff/symbolProperty2.d.ts.diff | 2 +- .../original/diff/symbolProperty3.d.ts.diff | 2 +- .../original/diff/symbolProperty52.d.ts.diff | 2 +- .../original/diff/symbolProperty53.d.ts.diff | 2 +- .../original/diff/symbolProperty54.d.ts.diff | 2 +- .../original/diff/symbolProperty58.d.ts.diff | 2 +- .../original/diff/symbolProperty59.d.ts.diff | 2 +- .../diff/templateLiteralsSourceMap.d.ts.diff | 13 - .../typeFromPropertyAssignment36.d.ts.diff | 2 +- .../diff/typeReferenceDirectives11.d.ts.diff | 2 +- .../diff/typeReferenceDirectives2.d.ts.diff | 2 +- .../diff/typeReferenceDirectives8.d.ts.diff | 2 +- .../diff/typeUsedAsTypeLiteralIndex.d.ts.diff | 2 +- .../computedPropertyNamesOnOverloads_ES5.d.ts | 47 +++ .../declarationEmitLateBoundAssignments2.d.ts | 291 ------------------ .../original/dte/enumConstantMembers.d.ts | 169 ---------- ...doFunctionExpressionsWithDynamicNames.d.ts | 49 --- ...ndexTypeNoSubstitutionTemplateLiteral.d.ts | 32 -- ...emplateEscapeSequences(target=es2015).d.ts | 148 --------- ...edTemplateEscapeSequences(target=es5).d.ts | 148 --------- ...emplateEscapeSequences(target=esnext).d.ts | 148 --------- .../original/dte/parseBigInt.d.ts | 256 --------------- .../dte/parserComputedPropertyName1.d.ts | 5 +- .../dte/parserES5SymbolProperty4.d.ts | 33 ++ .../dte/parserES5SymbolProperty8.d.ts | 30 ++ .../dte/templateLiteralsSourceMap.d.ts | 12 - .../computedPropertyNamesOnOverloads_ES5.d.ts | 51 +++ .../declarationEmitLateBoundAssignments2.d.ts | 276 ----------------- .../original/tsc/enumConstantMembers.d.ts | 151 --------- ...doFunctionExpressionsWithDynamicNames.d.ts | 43 --- ...ndexTypeNoSubstitutionTemplateLiteral.d.ts | 35 --- ...emplateEscapeSequences(target=es2015).d.ts | 148 --------- ...edTemplateEscapeSequences(target=es5).d.ts | 148 --------- ...emplateEscapeSequences(target=esnext).d.ts | 148 --------- .../original/tsc/parseBigInt.d.ts | 256 --------------- .../tsc/parserES5SymbolProperty4.d.ts | 36 +++ .../tsc/parserES5SymbolProperty8.d.ts | 28 ++ .../tsc/templateLiteralsSourceMap.d.ts | 12 - ...rayFakeFlatNoCrashInferenceDeclarations.ts | 1 + tests/cases/compiler/bigintIndex.ts | 1 + tests/cases/compiler/complicatedPrivacy.ts | 2 + .../compiler/computedEnumTypeWidening.ts | 1 + .../compiler/computedPropertiesNarrowed.ts | 1 + tests/cases/compiler/constEnumErrors.ts | 1 + tests/cases/compiler/constEnums.ts | 1 + .../compiler/contextualReturnTypeOfIIFE2.ts | 1 + tests/cases/compiler/declFileEnums.ts | 1 + ...arationEmitCommonJsModuleReferencedType.ts | 1 + ...onEmitDefaultExportWithStaticAssignment.ts | 1 + ...ionEmitDestructuringParameterProperties.ts | 1 + ...clarationEmitExpandoPropertyPrivateName.ts | 1 + ...arationEmitForGlobalishSpecifierSymlink.ts | 1 + ...rationEmitForGlobalishSpecifierSymlink2.ts | 1 + ...mportingModuleAugmentationRetainsImport.ts | 2 + ...clarationEmitFunctionDuplicateNamespace.ts | 1 + .../declarationEmitFunctionKeywordProp.ts | 1 + ...eclarationEmitHasTypesRefOnNamespaceUse.ts | 1 + .../declarationEmitLateBoundAssignments.ts | 1 + .../declarationEmitLateBoundAssignments2.ts | 1 + ...larationEmitObjectAssignedDefaultExport.ts | 1 + ...clarationEmitReexportedSymlinkReference.ts | 1 + ...larationEmitReexportedSymlinkReference2.ts | 1 + ...larationEmitReexportedSymlinkReference3.ts | 1 + ...rationEmitWithInvalidPackageJsonTypings.ts | 1 + .../declarationFilesWithTypeReferences2.ts | 1 + .../decoratorsOnComputedProperties.ts | 1 + tests/cases/compiler/forwardRefInEnum.ts | 1 + tests/cases/compiler/giant.ts | 1 + .../indexSignatureMustHaveTypeAnnotation.ts | 1 + .../cases/compiler/indexWithoutParamType2.ts | 1 + tests/cases/compiler/intTypeCheck.ts | 1 + ...undFunctionMemberAssignmentDeclarations.ts | 1 + ...lutionWithSuffixes_one_externalTSModule.ts | 1 + .../nodeModuleReexportFromDottedPath.ts | 1 + tests/cases/compiler/numericEnumMappedType.ts | 1 + .../compiler/overloadsWithComputedNames.ts | 1 + tests/cases/compiler/propertyAssignment.ts | 1 + ...LinkDeclarationEmitModuleNamesImportRef.ts | 1 + .../compiler/templateLiteralsSourceMap.ts | 1 - .../compiler/typeReferenceDirectives11.ts | 1 + .../compiler/typeReferenceDirectives2.ts | 1 + .../compiler/typeReferenceDirectives8.ts | 1 + .../compiler/typeUsedAsTypeLiteralIndex.ts | 1 + .../conformance/Symbols/ES5SymbolProperty1.ts | 1 + .../asyncFunctionDeclaration8_es2017.ts | 1 + .../asyncFunctionDeclaration8_es5.ts | 1 + .../asyncFunctionDeclaration8_es6.ts | 1 + .../staticPropertyNameConflicts.ts | 1 + .../conformance/constEnums/constEnum2.ts | 1 + .../declarationEmit/exportDefaultNamespace.ts | 1 + .../declarationEmit/nullPropertyName.ts | 1 + .../typesVersionsDeclarationEmit.multiFile.ts | 1 + ...rationEmit.multiFileBackReferenceToSelf.ts | 1 + ...onEmit.multiFileBackReferenceToUnmapped.ts | 1 + .../conformance/enums/enumClassification.ts | 1 + ...mberWithTemplateLiteralsEmitDeclaration.ts | 1 + .../es6/Symbols/symbolDeclarationEmit12.ts | 2 + .../es6/Symbols/symbolProperty1.ts | 1 + .../es6/Symbols/symbolProperty2.ts | 1 + .../es6/Symbols/symbolProperty3.ts | 1 + .../es6/Symbols/symbolProperty52.ts | 1 + .../es6/Symbols/symbolProperty53.ts | 1 + .../es6/Symbols/symbolProperty54.ts | 1 + .../es6/Symbols/symbolProperty58.ts | 1 + .../es6/Symbols/symbolProperty59.ts | 1 + .../computedPropertyNames12_ES5.ts | 1 + .../computedPropertyNames12_ES6.ts | 1 + .../computedPropertyNames16_ES5.ts | 1 + .../computedPropertyNames16_ES6.ts | 1 + .../computedPropertyNames2_ES5.ts | 1 + .../computedPropertyNames2_ES6.ts | 1 + .../computedPropertyNames4_ES5.ts | 1 + .../computedPropertyNames4_ES6.ts | 1 + .../computedPropertyNames5_ES5.ts | 1 + .../computedPropertyNames5_ES6.ts | 1 + .../computedPropertyNames6_ES5.ts | 1 + .../computedPropertyNames6_ES6.ts | 1 + .../computedPropertyNamesOnOverloads_ES5.ts | 1 + .../computedPropertyNamesOnOverloads_ES6.ts | 1 + ...computedPropertyNamesWithStaticProperty.ts | 1 + .../FunctionDeclaration8_es6.ts | 2 + .../reExportAliasMakesInstantiated.ts | 1 + ...lesExportsSpecifierGenerationConditions.ts | 2 + ...ModulesExportsBlocksSpecifierResolution.ts | 1 + .../node/nodeModulesExportsSourceTs.ts | 1 + ...lesExportsSpecifierGenerationConditions.ts | 1 + ...ulesExportsSpecifierGenerationDirectory.ts | 1 + ...odulesExportsSpecifierGenerationPattern.ts | 1 + .../parserES5ComputedPropertyName1.ts | 1 + .../parserES5ComputedPropertyName10.ts | 1 + .../parserES5ComputedPropertyName2.ts | 1 + .../parserES5ComputedPropertyName5.ts | 1 + .../parserES5ComputedPropertyName8.ts | 1 + .../parserES5ComputedPropertyName9.ts | 1 + .../IndexSignatures/parserIndexSignature11.ts | 1 + .../IndexSignatures/parserIndexSignature5.ts | 1 + .../StrictMode/parserStrictMode8.ts | 1 + .../Symbols/parserES5SymbolProperty1.ts | 1 + .../Symbols/parserES5SymbolProperty2.ts | 1 + .../Symbols/parserES5SymbolProperty3.ts | 1 + .../Symbols/parserES5SymbolProperty4.ts | 1 + .../Symbols/parserES5SymbolProperty5.ts | 1 + .../Symbols/parserES5SymbolProperty6.ts | 1 + .../Symbols/parserES5SymbolProperty7.ts | 1 + .../Symbols/parserES5SymbolProperty8.ts | 1 + .../Symbols/parserES5SymbolProperty9.ts | 1 + .../parserComputedPropertyName1.ts | 1 + .../parserComputedPropertyName10.ts | 1 + .../parserComputedPropertyName13.ts | 1 + .../parserComputedPropertyName14.ts | 1 + .../parserComputedPropertyName15.ts | 1 + .../parserComputedPropertyName18.ts | 1 + .../parserComputedPropertyName19.ts | 1 + .../parserComputedPropertyName2.ts | 1 + .../parserComputedPropertyName20.ts | 1 + .../parserComputedPropertyName21.ts | 1 + .../parserComputedPropertyName22.ts | 1 + .../parserComputedPropertyName23.ts | 1 + .../parserComputedPropertyName24.ts | 1 + .../parserComputedPropertyName25.ts | 1 + .../parserComputedPropertyName27.ts | 1 + .../parserComputedPropertyName28.ts | 1 + .../parserComputedPropertyName29.ts | 1 + .../parserComputedPropertyName31.ts | 1 + .../parserComputedPropertyName32.ts | 1 + .../parserComputedPropertyName33.ts | 1 + .../parserComputedPropertyName36.ts | 1 + .../parserComputedPropertyName37.ts | 1 + .../parserComputedPropertyName6.ts | 1 + .../parserComputedPropertyName9.ts | 1 + .../salsa/typeFromPropertyAssignment29.ts | 1 + .../salsa/typeFromPropertyAssignment36.ts | 3 + .../types/literal/templateLiteralTypes4.ts | 1 + .../types/thisType/declarationFiles.ts | 1 + 325 files changed, 751 insertions(+), 3293 deletions(-) delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionExpressionsWithDynamicNames.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/declarationEmitLateBoundAssignments2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/indexTypeNoSubstitutionTemplateLiteral.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es5).d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/templateLiteralsSourceMap.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/declarationEmitLateBoundAssignments2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/expandoFunctionExpressionsWithDynamicNames.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/indexTypeNoSubstitutionTemplateLiteral.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es5).d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/templateLiteralsSourceMap.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitLateBoundAssignments2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/indexTypeNoSubstitutionTemplateLiteral.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es5).d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parseBigInt.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralsSourceMap.d.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 8b46f3ae170dd..eb13d6f8a6b44 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -752,6 +752,7 @@ import { isValidESSymbolDeclaration, isValidTypeOnlyAliasUseSite, isValueSignatureDeclaration, + isVarConst, isVariableDeclaration, isVariableDeclarationInitializedToBareOrAccessedRequire, isVariableDeclarationInVariableStatement, @@ -8358,7 +8359,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (nameType.flags & TypeFlags.StringOrNumberLiteral) { if (context.flags & NodeBuilderFlags.WriteComputedProps) { const nameExpression = symbol.valueDeclaration && getNameOfDeclaration(symbol.valueDeclaration); - if (nameExpression && isLateBindableName(nameExpression)) { + if (nameExpression && isLateBindableName(nameExpression) && isComputedPropertyName(nameExpression)) { return nameExpression; } } @@ -47510,15 +47511,19 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (!declaration) { return false; } + let symbol: Symbol; if (isVariableDeclaration(declaration)) { - if (declaration.type) { + if (declaration.type || !isVarConst(declaration)) { return false; } if (!(declaration.initializer && isFunctionExpressionOrArrowFunction(declaration.initializer))) { return false; } + symbol = getSymbolOfDeclaration(declaration.initializer); + } + else { + symbol = getSymbolOfDeclaration(declaration); } - const symbol = getSymbolOfDeclaration(declaration); if (!symbol || !(symbol.flags & SymbolFlags.Function | SymbolFlags.Variable)) { return false; } diff --git a/src/compiler/transformers/declarations/emit-resolver.ts b/src/compiler/transformers/declarations/emit-resolver.ts index 86689e32ad734..0ee93d3841e7c 100644 --- a/src/compiler/transformers/declarations/emit-resolver.ts +++ b/src/compiler/transformers/declarations/emit-resolver.ts @@ -19,8 +19,6 @@ import { findAncestor, FunctionDeclaration, FunctionLikeDeclaration, - getCombinedModifierFlags, - getCombinedNodeFlags, getFirstIdentifier, getNameOfDeclaration, getParseTreeNode, @@ -37,6 +35,7 @@ import { isBigIntLiteral, isBinaryExpression, isBindingElement, + isDeclarationReadonly, isElementAccessExpression, isEntityNameExpression, isEnumDeclaration, @@ -48,10 +47,10 @@ import { isGetAccessor, isGetAccessorDeclaration, isIdentifier, + isInfinityOrNaNString, isInJSFile, isLateVisibilityPaintedStatement, isNumericLiteral, - isParameterPropertyDeclaration, isPartOfTypeNode, isPrefixUnaryExpression, isPropertyAccessExpression, @@ -60,6 +59,7 @@ import { isStringLiteralLike, isTemplateExpression, isThisIdentifier, + isVarConst, isVariableDeclaration, isVariableStatement, LateBoundDeclaration, @@ -72,6 +72,7 @@ import { nodeIsPresent, NoSubstitutionTemplateLiteral, ParameterDeclaration, + parsePseudoBigInt, PropertyAccessExpression, PropertyDeclaration, PropertyName, @@ -84,7 +85,6 @@ import { SymbolVisibilityResult, SyntaxKind, VariableDeclaration, - VariableDeclarationList, } from "../../_namespaces/ts"; import { bindSourceFileForDeclarationEmit, @@ -137,6 +137,12 @@ export function createEmitDeclarationResolver(file: SourceFile, host: IsolatedEm 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)) { @@ -174,10 +180,10 @@ export function createEmitDeclarationResolver(file: SourceFile, host: IsolatedEm } function clonePrimitiveLiteralValue(node: Expression): Expression { if (isNumericLiteral(node)) { - return factory.createNumericLiteral(node.text, node.numericLiteralFlags); + return factory.createNumericLiteral(node.text); } if (isBigIntLiteral(node)) { - return factory.createBigIntLiteral(node.text); + return factory.createBigIntLiteral({ negative: false, base10Value: parsePseudoBigInt(node.text) }); } if (isStringLiteralLike(node)) { return factory.createStringLiteral(node.text); @@ -198,6 +204,10 @@ export function createEmitDeclarationResolver(file: SourceFile, host: IsolatedEm ); } if (isTemplateExpression(node)) { + const evaluatedValue = evaluate(node); + if (evaluatedValue !== undefined) { + return factory.createStringLiteral(evaluatedValue); + } return factory.createTemplateExpression( factory.createTemplateHead(node.head.text, node.head.rawText, node.head.templateFlags), node.templateSpans.map(t => @@ -312,7 +322,7 @@ export function createEmitDeclarationResolver(file: SourceFile, host: IsolatedEm return false; } if (isVariableDeclaration(declaration)) { - if (declaration.type) { + if (declaration.type || !isVarConst(declaration)) { return false; } if (!(declaration.initializer && isFunctionExpressionOrArrowFunction(declaration.initializer))) { @@ -493,15 +503,6 @@ export function createEmitDeclarationResolver(file: SourceFile, host: IsolatedEm }, }; - function isDeclarationReadonly(declaration: Declaration): boolean { - return !!(getCombinedModifierFlags(declaration) & ModifierFlags.Readonly && !isParameterPropertyDeclaration(declaration, declaration.parent)); - } - - /** @internal */ - function isVarConst(node: VariableDeclaration | VariableDeclarationList): boolean { - return !!(getCombinedNodeFlags(node) & NodeFlags.Const); - } - function isDeclarationVisible(node: Node): boolean { if (node) { const links = getNodeLinks(node); diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 3f1bc556c5024..2dccbba778493 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -234,8 +234,6 @@ export function createLocalInferenceResolver({ return invalid(getAccessor ?? setAccessor!); } function localInference(node: Node, inferenceFlags: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { - // Bail if node has parse errors, we're just adding noise - if (hasParseError(node)) return invalid(node); switch (node.kind) { case SyntaxKind.ParenthesizedExpression: return localInference((node as ParenthesizedExpression).expression, inferenceFlags & NarrowBehavior.NotKeepLiterals); @@ -387,7 +385,7 @@ export function createLocalInferenceResolver({ let replaceWithInvalid = false; for (let propIndex = 0, length = objectLiteral.properties.length; propIndex < length; propIndex++) { const prop = objectLiteral.properties[propIndex]; - if (hasParseError(prop)) return invalid(prop); + if (hasParseError(prop)) continue; if (isShorthandPropertyAssignment(prop)) { reportIsolatedDeclarationError(prop); @@ -400,7 +398,7 @@ export function createLocalInferenceResolver({ continue; } - if (hasParseError(prop.name)) return invalid(prop.name); + if (hasParseError(prop.name)) continue; if (isPrivateIdentifier(prop.name)) { // Not valid in object literals but the compiler will complain about this, we just ignore it here. diff --git a/src/compiler/transformers/declarations/utils.ts b/src/compiler/transformers/declarations/utils.ts index 9ae47e0368be1..90aacbfc67730 100644 --- a/src/compiler/transformers/declarations/utils.ts +++ b/src/compiler/transformers/declarations/utils.ts @@ -5,7 +5,6 @@ import { isPrefixUnaryExpression, isPrivateIdentifier, isPropertyAccessExpression, - isStringLiteral, isStringLiteralLike, } from "../../_namespaces/ts"; import { @@ -42,7 +41,7 @@ export function getMemberKey(name: string | PropertyName | NoSubstitutionTemplat if (isComputedPropertyName(name)) { let computedName = name.expression; - if (isStringLiteral(computedName)) { + if (isStringLiteralLike(computedName)) { return ("I:" + computedName.text); } if (isNumericLiteral(computedName)) { diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index c198b862958fa..5e761ef844a7d 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -359,7 +359,7 @@ export namespace Compiler { if (value === undefined) { throw new Error(`Cannot have undefined value for compiler option '${name}'.`); } - if (name === "typeScriptVersion" || name === "isolatedDeclarationDiffReason") { + if (name === "typeScriptVersion" || name === "isolatedDeclarationDiffReason" || name === "isolatedDeclarationFixedDiffReason") { continue; } const option = getCommandLineOption(name); @@ -1094,6 +1094,10 @@ export namespace Compiler { fullDiff += Diff.createTwoFilesPatch("TSC", "DTE", tscContent, dteContent, "declarations", "declarations"); Baseline.runBaseline(type + "/" + baselinePath.replace(/\.tsx?/, `.d.ts.diff`), fullDiff); + + if (reason === undefined) { + throw new Error("The test is not equivalent between TSC and DTE. Please provide an isolatedDeclarationDiffReason/isolatedDeclarationFixedDiffReason setting in the test if this is intentional"); + } } function declarationContent(declarationFiles: readonly TestFile[], tsSources: readonly TestFile[], errors: readonly ts.Diagnostic[], prettyErrors?: boolean) { let dtsCode = ""; diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 7ff7e4315ca18..3a875f44276ce 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -579,6 +579,9 @@ class IsolatedDeclarationTest extends CompilerTestBase { protected get baselinePath() { return "isolated-declarations/original"; } + protected get diffReason() { + return this.harnessSettings.isolatedDeclarationDiffReason; + } verifyDteOutput() { if (this.isOutputEquivalent && this.isDiagnosticEquivalent) return; Compiler.doDeclarationBaseline( @@ -640,7 +643,7 @@ class IsolatedDeclarationTest extends CompilerTestBase { ts.concatenate(this.tscIsolatedDeclarationsErrors, this.tscNonIsolatedDeclarationsErrors), this.allFiles, this.options.pretty, - this.harnessSettings.isolatedDeclarationDiffReason, + this.diffReason, ); } @@ -656,7 +659,7 @@ class IsolatedDeclarationTest extends CompilerTestBase { this.tscDtsFiles, this.tscDtsMapFiles, this.allFiles, - this.harnessSettings.isolatedDeclarationDiffReason, + this.diffReason, ); } } @@ -741,4 +744,8 @@ class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest { protected override get baselinePath() { return "isolated-declarations/auto-fixed"; } + + protected override get diffReason() { + return this.harnessSettings.isolatedDeclarationFixedDiffReason; + } } 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 index 45c8ba5e4744c..6fd29874ef5fb 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Semantically invalid, already has a cyclic error type]] //// //// [tests/cases/compiler/arrayFakeFlatNoCrashInferenceDeclarations.ts] //// 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 index ff9b4692fad67..f4dd9a54c35a5 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Enums are not fixed]] //// //// [tests/cases/compiler/computedEnumTypeWidening.ts] //// 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 index ba653a0b102c8..0384f0e1128c0 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Fixing enum values is not supported]] //// //// [tests/cases/conformance/constEnums/constEnum2.ts] //// 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 index fb57590e1c6b7..15e38967bddf1 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Enums are not fixed]] //// //// [tests/cases/compiler/declFileEnums.ts] //// 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 index 652bbcda6f810..ed1c81ae6cb31 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO File is not auto-fixed]] //// //// [tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts] //// 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 index 429a4b556a05f..68a2ff5c58d15 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Function declarations are not fixed]] //// //// [tests/cases/compiler/declarationEmitDefaultExportWithStaticAssignment.ts] //// 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 index 0973f664d775e..4b74d19199a3d 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Syntactically invalid.]] //// //// [tests/cases/compiler/declarationEmitDestructuringParameterProperties.ts] //// 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 index a16ed1237baa5..c7cf7d9b58b81 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Function declarations are not fixed]] //// //// [tests/cases/compiler/declarationEmitExpandoPropertyPrivateName.ts] //// 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 index ce94517aaac8e..4dc59e489fb83 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO File is not auto-fixed]] //// //// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts] //// 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 index f773fc8e701c8..b042e358b2c7b 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO File is not auto-fixed]] //// //// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts] //// 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 index dfc01af14a0a3..615e0a375eb9c 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Function declarations are not fixed]] //// //// [tests/cases/compiler/declarationEmitFunctionDuplicateNamespace.ts] //// 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 index e0444f1ac797c..573660b473ba8 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Function declarations are not fixed]] //// //// [tests/cases/compiler/declarationEmitFunctionKeywordProp.ts] //// 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 index 7bbf67735d350..cf068da702725 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Function declarations are not fixed]] //// //// [tests/cases/compiler/declarationEmitLateBoundAssignments.ts] //// 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 index e12079b020e20..99f13eed57f33 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: undefined]] //// +// [[Reason: Function declarations are not fixed]] //// //// [tests/cases/compiler/declarationEmitLateBoundAssignments2.ts] //// =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,68 +1,188 @@ +@@ -1,31 +1,17 @@ //// [declarationEmitLateBoundAssignments2.d.ts] @@ -37,49 +37,13 @@ (): void; B: string; }; --export declare const arrow2: { -- (): void; -- C: number; --}; -+export declare const arrow2: invalid; - export declare const arrow3: { +@@ -64,5 +50,139 @@ + export declare const arrow10: { (): void; - 77: number; + "🤷‍♂️": number; }; --export declare const arrow4: { -- (): void; -- 1: number; --}; -+export declare const arrow4: invalid; - export declare const arrow5: { - (): void; - "101": number; - }; --export declare const arrow6: { -- (): void; -- "10": number; --}; -+export declare const arrow6: invalid; - export declare const arrow7: { - (): void; - "qwe rty": number; - }; --export declare const arrow8: { -- (): void; -- "foo bar": number; --}; -+export declare const arrow8: invalid; - export declare const arrow9: { - (): void; - "🤪": number; - }; --export declare const arrow10: { -\ No newline at end of file -- (): void; -- "\uD83E\uDD37\u200D\u2642\uFE0F": number; --}; -//# sourceMappingURL=declarationEmitLateBoundAssignments2.d.ts.map -+export declare const arrow10: invalid; +\ No newline at end of file +//# sourceMappingURL=declarationEmitLateBoundAssignments2.d.ts.map + +/// [Errors] //// @@ -94,19 +58,9 @@ +declarationEmitLateBoundAssignments2.ts(30,17): error TS9009: 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(33,17): error TS9009: 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(36,17): error TS9009: 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(45,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitLateBoundAssignments2.ts(45,14): error TS9009: 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(54,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitLateBoundAssignments2.ts(54,14): error TS9009: 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(63,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitLateBoundAssignments2.ts(63,14): error TS9009: 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(72,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitLateBoundAssignments2.ts(72,14): error TS9009: 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(81,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitLateBoundAssignments2.ts(81,14): error TS9009: 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 (20 errors) ==== ++==== declarationEmitLateBoundAssignments2.ts (10 errors) ==== + // https://github.com/microsoft/TypeScript/issues/54811 + + const c = "C" @@ -171,11 +125,10 @@ + } = () => {} + arrow["B"] = 'bar' + -+ export const arrow2 = (): void => {} -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~~~~~~ -+!!! error TS9009: 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 arrow2: { ++ (): void ++ C: number ++ } = () => {} + arrow2[c] = 100 + + export const arrow3: { @@ -184,11 +137,10 @@ + } = () => {} + arrow3[77] = 0 + -+ export const arrow4 = (): void => {} -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~~~~~~ -+!!! error TS9009: 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 arrow4: { ++ (): void ++ 1: number ++ } = () => {} + arrow4[num] = 0 + + export const arrow5: { @@ -197,11 +149,10 @@ + } = () => {} + arrow5["101"] = 0 + -+ export const arrow6 = (): void => {} -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~~~~~~ -+!!! error TS9009: 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 arrow6: { ++ (): void ++ "10": number ++ } = () => {} + arrow6[numStr] = 0 + + export const arrow7: { @@ -210,11 +161,10 @@ + } = () => {} + arrow7["qwe rty"] = 0 + -+ export const arrow8 = (): void => {} -+ ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~~~~~~ -+!!! error TS9009: 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 arrow8: { ++ (): void ++ "foo bar": number ++ } = () => {} + arrow8[withWhitespace] = 0 + + export const arrow9: { @@ -223,11 +173,10 @@ + } = () => {} + arrow9["🤪"] = 0 + -+ export const arrow10 = (): void => {} -+ ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~~~~~~~ -+!!! error TS9009: 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 arrow10: { ++ (): void ++ "🤷‍♂️": number ++ } = () => {} + arrow10[emoji] = 0 + \ 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 index 361a4c0eee722..5dd0848fd9efc 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO File is not auto-fixed]] //// //// [tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts] //// 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 index 025a0ee7bb84d..f8b4087a1f2be 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO: is not auto fixed, should be fixed.]] //// //// [tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts] //// 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 index 65d5cd35adbc7..af4e3bd1b4255 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO File is not auto-fixed]] //// //// [tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts] //// 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 index 03d73a9c96197..f43f53d94ebac 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO File is not auto-fixed]] //// //// [tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts] //// 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 index 36148cc985ab1..ab5e9807e7916 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO File is not auto-fixed]] //// //// [tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff index 87af171000582..c244bdd780ea8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Declarations types can't be named so can't be fixed]] //// //// [tests/cases/conformance/types/thisType/declarationFiles.ts] //// 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 index 8e1a71719352e..288c992e7e60b 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Fixing enum values is not supported]] //// //// [tests/cases/conformance/enums/enumClassification.ts] //// 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 index 667802729baf3..877134dfe517e 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Fixing enum values is not supported]] //// //// [tests/cases/conformance/enums/enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff deleted file mode 100644 index 51656fa960987..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff +++ /dev/null @@ -1,53 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/expandoFunctionExpressionsWithDynamicNames.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,12 +1,34 @@ - - - //// [expandoFunctionExpressionsWithDynamicNames.d.ts] --export declare const expr: { -- (): void; -- X: number; --}; --export declare const expr2: { -- (): void; -- X: number; --}; --//# sourceMappingURL=expandoFunctionExpressionsWithDynamicNames.d.ts.map -\ No newline at end of file -+export declare const expr: invalid; -+export declare const expr2: invalid; -+//# sourceMappingURL=expandoFunctionExpressionsWithDynamicNames.d.ts.map -+ -+/// [Errors] //// -+ -+expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+expandoFunctionExpressionsWithDynamicNames.ts(8,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+expandoFunctionExpressionsWithDynamicNames.ts(8,14): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+ -+ -+==== expandoFunctionExpressionsWithDynamicNames.ts (4 errors) ==== -+ // https://github.com/microsoft/TypeScript/issues/54809 -+ -+ const s = "X"; -+ -+ export const expr = (): void => {} -+ ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+ expr[s] = 0 -+ -+ export const expr2 = function (): void {} -+ ~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+ expr2[s] = 0 -+ -\ No newline at end of file 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 index c0784bc9a7fe5..1dc8342eb48a1 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Function declarations are not fixed]] //// //// [tests/cases/conformance/declarationEmit/exportDefaultNamespace.ts] //// 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 index 9aac7b8047a1a..d8a6a2fa0c6b6 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Function declarations are not fixed]] //// //// [tests/cases/compiler/lateBoundFunctionMemberAssignmentDeclarations.ts] //// 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 index 7bcd0e18d5e74..d43a63a176e0c 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO File is not auto-fixed]] //// //// [tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts] //// 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 index 3df9a33ab845d..2c8905cf383ef 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO File is not auto-fixed]] //// //// [tests/cases/compiler/nodeModuleReexportFromDottedPath.ts] //// 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 index 273561fdf74dd..ab27101e38fb1 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO Seems to be missing enough semantic info to fix]] //// //// [tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts] //// 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 index 273561fdf74dd..ab27101e38fb1 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO Seems to be missing enough semantic info to fix]] //// //// [tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts] //// 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 index cc4c36524a6bc..f003718110b66 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO Seems to be missing enough semantic info to fix]] //// //// [tests/cases/conformance/node/nodeModulesExportsSourceTs.ts] //// 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 index cc4c36524a6bc..f003718110b66 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO Seems to be missing enough semantic info to fix]] //// //// [tests/cases/conformance/node/nodeModulesExportsSourceTs.ts] //// 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 index d8438086d78eb..26b152f929d32 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO Seems to be missing enough semantic info to fix]] //// //// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts] //// 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 index d8438086d78eb..26b152f929d32 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO Seems to be missing enough semantic info to fix]] //// //// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts] //// 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 index 8c34cca240485..89c5c2240b513 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO Seems to be missing enough semantic info to fix]] //// //// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts] //// 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 index 8c34cca240485..89c5c2240b513 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO Seems to be missing enough semantic info to fix]] //// //// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts] //// 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 index ab68852cac5f6..836cec064e50d 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO Seems to be missing enough semantic info to fix]] //// //// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts] //// 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 index ab68852cac5f6..836cec064e50d 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO Seems to be missing enough semantic info to fix]] //// //// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts] //// 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 index 9f5f0be6120a2..fd4f8298fb780 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Function declarations are not fixed]] //// //// [tests/cases/conformance/declarationEmit/nullPropertyName.ts] //// 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 index 55110e83b9966..5edd0ccf66ad4 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Fixing enum values is not supported]] //// //// [tests/cases/compiler/numericEnumMappedType.ts] //// 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 index 9329ada2a83a0..4e1f9f2d488f6 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Can't fix computed properties]] //// //// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts] //// 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 index b682ac1168e42..6d0f145a613cb 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO File is not auto-fixed]] //// //// [tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts] //// 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 index 0dfed6818da95..d07610688bd73 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Enums are not fixed]] //// //// [tests/cases/conformance/types/literal/templateLiteralTypes4.ts] //// 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 index 587bea0a3438d..b60a86e2451e5 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Function declarations are not fixed]] //// //// [tests/cases/conformance/salsa/typeFromPropertyAssignment29.ts] //// 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 index c45e0fe2c8b5c..2afcb4b1acf88 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO File is not auto-fixed]] //// //// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts] //// 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 index 74afd1b71c460..b68db0247cc2f 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO File is not auto-fixed]] //// //// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.ts] //// 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 index 254ad26d3e4da..b883b2d632e38 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO File is not auto-fixed]] //// //// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.ts] //// 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 index 907a34e61198b..4574fdbd3a92a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts @@ -45,7 +45,10 @@ export const arrow: { } = () => {} arrow["B"] = 'bar' -export const arrow2 = (): void => {} +export const arrow2: { + (): void + C: number +} = () => {} arrow2[c] = 100 export const arrow3: { @@ -54,7 +57,10 @@ export const arrow3: { } = () => {} arrow3[77] = 0 -export const arrow4 = (): void => {} +export const arrow4: { + (): void + 1: number +} = () => {} arrow4[num] = 0 export const arrow5: { @@ -63,7 +69,10 @@ export const arrow5: { } = () => {} arrow5["101"] = 0 -export const arrow6 = (): void => {} +export const arrow6: { + (): void + "10": number +} = () => {} arrow6[numStr] = 0 export const arrow7: { @@ -72,7 +81,10 @@ export const arrow7: { } = () => {} arrow7["qwe rty"] = 0 -export const arrow8 = (): void => {} +export const arrow8: { + (): void + "foo bar": number +} = () => {} arrow8[withWhitespace] = 0 export const arrow9: { @@ -81,7 +93,10 @@ export const arrow9: { } = () => {} arrow9["🤪"] = 0 -export const arrow10 = (): void => {} +export const arrow10: { + (): void + "🤷‍♂️": number +} = () => {} arrow10[emoji] = 0 @@ -104,27 +119,42 @@ export declare const arrow: { (): void; B: string; }; -export declare const arrow2: invalid; +export declare const arrow2: { + (): void; + C: number; +}; export declare const arrow3: { (): void; 77: number; }; -export declare const arrow4: invalid; +export declare const arrow4: { + (): void; + 1: number; +}; export declare const arrow5: { (): void; "101": number; }; -export declare const arrow6: invalid; +export declare const arrow6: { + (): void; + "10": number; +}; export declare const arrow7: { (): void; "qwe rty": number; }; -export declare const arrow8: invalid; +export declare const arrow8: { + (): void; + "foo bar": number; +}; export declare const arrow9: { (): void; "🤪": number; }; -export declare const arrow10: invalid; +export declare const arrow10: { + (): void; + "🤷‍♂️": number; +}; //# sourceMappingURL=declarationEmitLateBoundAssignments2.d.ts.map /// [Errors] //// @@ -139,19 +169,9 @@ declarationEmitLateBoundAssignments2.ts(27,17): error TS9009: Assigning properti declarationEmitLateBoundAssignments2.ts(30,17): error TS9009: 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(33,17): error TS9009: 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(36,17): error TS9009: 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(45,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(45,14): error TS9009: 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(54,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(54,14): error TS9009: 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(63,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(63,14): error TS9009: 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(72,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(72,14): error TS9009: 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(81,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(81,14): error TS9009: 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 (20 errors) ==== +==== declarationEmitLateBoundAssignments2.ts (10 errors) ==== // https://github.com/microsoft/TypeScript/issues/54811 const c = "C" @@ -216,11 +236,10 @@ declarationEmitLateBoundAssignments2.ts(81,14): error TS9009: Assigning properti } = () => {} arrow["B"] = 'bar' - export const arrow2 = (): void => {} - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS9009: 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 arrow2: { + (): void + C: number + } = () => {} arrow2[c] = 100 export const arrow3: { @@ -229,11 +248,10 @@ declarationEmitLateBoundAssignments2.ts(81,14): error TS9009: Assigning properti } = () => {} arrow3[77] = 0 - export const arrow4 = (): void => {} - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS9009: 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 arrow4: { + (): void + 1: number + } = () => {} arrow4[num] = 0 export const arrow5: { @@ -242,11 +260,10 @@ declarationEmitLateBoundAssignments2.ts(81,14): error TS9009: Assigning properti } = () => {} arrow5["101"] = 0 - export const arrow6 = (): void => {} - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS9009: 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 arrow6: { + (): void + "10": number + } = () => {} arrow6[numStr] = 0 export const arrow7: { @@ -255,11 +272,10 @@ declarationEmitLateBoundAssignments2.ts(81,14): error TS9009: Assigning properti } = () => {} arrow7["qwe rty"] = 0 - export const arrow8 = (): void => {} - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS9009: 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 arrow8: { + (): void + "foo bar": number + } = () => {} arrow8[withWhitespace] = 0 export const arrow9: { @@ -268,10 +284,9 @@ declarationEmitLateBoundAssignments2.ts(81,14): error TS9009: Assigning properti } = () => {} arrow9["🤪"] = 0 - export const arrow10 = (): void => {} - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~ -!!! error TS9009: 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 arrow10: { + (): void + "🤷‍♂️": number + } = () => {} arrow10[emoji] = 0 \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionExpressionsWithDynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionExpressionsWithDynamicNames.d.ts deleted file mode 100644 index 8f200b2afe3c0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionExpressionsWithDynamicNames.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -//// [tests/cases/compiler/expandoFunctionExpressionsWithDynamicNames.ts] //// - -//// [expandoFunctionExpressionsWithDynamicNames.ts] -// https://github.com/microsoft/TypeScript/issues/54809 - -const s = "X"; - -export const expr = (): void => {} -expr[s] = 0 - -export const expr2 = function (): void {} -expr2[s] = 0 - - -/// [Declarations] //// - - - -//// [expandoFunctionExpressionsWithDynamicNames.d.ts] -export declare const expr: invalid; -export declare const expr2: invalid; -//# sourceMappingURL=expandoFunctionExpressionsWithDynamicNames.d.ts.map - -/// [Errors] //// - -expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -expandoFunctionExpressionsWithDynamicNames.ts(8,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -expandoFunctionExpressionsWithDynamicNames.ts(8,14): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - - -==== expandoFunctionExpressionsWithDynamicNames.ts (4 errors) ==== - // https://github.com/microsoft/TypeScript/issues/54809 - - const s = "X"; - - export const expr = (): void => {} - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - expr[s] = 0 - - export const expr2 = function (): void {} - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - expr2[s] = 0 - \ No newline at end of file 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 index 7ad5ef7dad9f8..cb6042927483e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts @@ -74,7 +74,7 @@ namespace Ns { } // Should not work in Typescript -- must be const -var ExpandoExpr2: (n: number) => string = function (n: number) { +var ExpandoExpr2 = function (n: number): string { return n.toString(); } ExpandoExpr2.prop = 2 @@ -262,7 +262,7 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi } // Should not work in Typescript -- must be const - var ExpandoExpr2: (n: number) => string = function (n: number) { + var ExpandoExpr2 = function (n: number): string { return n.toString(); } ExpandoExpr2.prop = 2 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 index 6e01ab80b54d3..070446cb28309 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments2.d.ts @@ -45,7 +45,10 @@ export const arrow: { } = () => {} arrow["B"] = 'bar' -export const arrow2 = (): void => {} +export const arrow2: { + (): void + C: number +} = () => {} arrow2[c] = 100 export const arrow3: { @@ -54,7 +57,10 @@ export const arrow3: { } = () => {} arrow3[77] = 0 -export const arrow4 = (): void => {} +export const arrow4: { + (): void + 1: number +} = () => {} arrow4[num] = 0 export const arrow5: { @@ -63,7 +69,10 @@ export const arrow5: { } = () => {} arrow5["101"] = 0 -export const arrow6 = (): void => {} +export const arrow6: { + (): void + "10": number +} = () => {} arrow6[numStr] = 0 export const arrow7: { @@ -72,7 +81,10 @@ export const arrow7: { } = () => {} arrow7["qwe rty"] = 0 -export const arrow8 = (): void => {} +export const arrow8: { + (): void + "foo bar": number +} = () => {} arrow8[withWhitespace] = 0 export const arrow9: { @@ -81,7 +93,10 @@ export const arrow9: { } = () => {} arrow9["🤪"] = 0 -export const arrow10 = (): void => {} +export const arrow10: { + (): void + "🤷‍♂️": number +} = () => {} arrow10[emoji] = 0 @@ -152,6 +167,6 @@ export declare const arrow9: { }; export declare const arrow10: { (): void; - "\uD83E\uDD37\u200D\u2642\uFE0F": number; + "🤷‍♂️": number; }; //# sourceMappingURL=declarationEmitLateBoundAssignments2.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts deleted file mode 100644 index e5e004ed831c5..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -//// [tests/cases/compiler/expandoFunctionExpressionsWithDynamicNames.ts] //// - -//// [expandoFunctionExpressionsWithDynamicNames.ts] -// https://github.com/microsoft/TypeScript/issues/54809 - -const s = "X"; - -export const expr = (): void => {} -expr[s] = 0 - -export const expr2 = function (): void {} -expr2[s] = 0 - - -/// [Declarations] //// - - - -//// [expandoFunctionExpressionsWithDynamicNames.d.ts] -export declare const expr: { - (): void; - X: number; -}; -export declare const expr2: { - (): void; - X: number; -}; -//# sourceMappingURL=expandoFunctionExpressionsWithDynamicNames.d.ts.map \ No newline at end of file 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 index 6034f95305856..f42a8d5cecbd9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts @@ -74,7 +74,7 @@ namespace Ns { } // Should not work in Typescript -- must be const -var ExpandoExpr2: (n: number) => string = function (n: number) { +var ExpandoExpr2 = function (n: number): string { return n.toString(); } ExpandoExpr2.prop = 2 @@ -262,7 +262,7 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi } // Should not work in Typescript -- must be const - var ExpandoExpr2: (n: number) => string = function (n: number) { + var ExpandoExpr2 = function (n: number): string { return n.toString(); } ExpandoExpr2.prop = 2 diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff index d9f6ea4779927..92c535c2b2c84 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/Symbols/ES5SymbolProperty1.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff index 6eeea6a476de4..99a1a867983e0 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff index 70d5951d52642..572ce3f984689 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff index 8dcadfbf93c97..5b57a9d60c90f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff index cd91a33f4b7eb..9b0270e8d1397 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff index 1c64f490bcd8e..775b9334eecd7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/compiler/bigintIndex.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/complicatedPrivacy.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/complicatedPrivacy.d.ts.diff index 01a6f65a012ab..d1a00c65cd4b5 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/complicatedPrivacy.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/complicatedPrivacy.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/compiler/complicatedPrivacy.ts] //// 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 index 7bac6f8b6f316..eb95f451f11f2 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/compiler/computedPropertiesNarrowed.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff index c4902614213bc..530218f24ad21 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff index 26a606bcb7944..4e684fcfa3b6b 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff index fec7c72fd9542..ad368c0f9edc2 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES5.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff index 95a4a084fc17f..f8ed99b69fb9c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES6.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff index c751dbdcf0599..0dbe5b179d700 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES5.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff index 868d8ce1326df..f75ea17991cec 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES6.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff index 07fb6ad84d86f..c8d94ed8bb73b 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES5.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff index 196f1b440ec7a..95152e6c87e8c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES6.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff index e95b71d6e4292..9a4e735f96137 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES5.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff index 8151527a7911c..18c39074a6c79 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES6.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff index 06ff582e13a84..bb36039c64768 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES5.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff index 5a3332aaf4945..118e0a3a063f5 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES6.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff new file mode 100644 index 0000000000000..07c85b9efc032 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff @@ -0,0 +1,39 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,21 +5,19 @@ + declare var accessorName: string; + declare class C { + [methodName](v: string): invalid; + [methodName](): invalid; +- [methodName](v?: string): invalid; + } + + /// [Errors] //// + + computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +-==== computedPropertyNamesOnOverloads_ES5.ts (5 errors) ==== ++==== computedPropertyNamesOnOverloads_ES5.ts (4 errors) ==== + var methodName = "method"; + var accessorName = "accessor"; + class C { + [methodName](v: string); +@@ -32,7 +30,5 @@ + !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [methodName](v?: string) { } +- ~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff index 43b55ece438ec..b34853138f77f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff index c689438b2dee1..e0a66a3d60b11 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff index 2702a62f146df..dbeaaae7002fd 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TSC detects forward ref which is not allowed and so enum value is undefined, which is also the way we detect isolated declaration errors.]] //// //// [tests/cases/compiler/constEnumErrors.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts.diff index 7227736d3f9c7..04f3e5e530902 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO Add support for nested namespace access for enums]] //// //// [tests/cases/compiler/constEnums.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff index b9596b8f11f2c..858af1b481a68 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO Nested access to expando function.]] //// //// [tests/cases/compiler/contextualReturnTypeOfIIFE2.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff index e5cdd9da97982..6fe1e9716049a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TSC adds import for augmentation, DTE can't know about the augmentation.]] //// //// [tests/cases/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts] //// 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 index e62fdd2d342e0..6037998d87fa4 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitHasTypesRefOnNamespaceUse.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitHasTypesRefOnNamespaceUse.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TSC preserves import due to augmentation]] //// //// [tests/cases/compiler/declarationEmitHasTypesRefOnNamespaceUse.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitLateBoundAssignments2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitLateBoundAssignments2.d.ts.diff deleted file mode 100644 index 40414b8dcaf31..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitLateBoundAssignments2.d.ts.diff +++ /dev/null @@ -1,112 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/declarationEmitLateBoundAssignments2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -45,24 +45,29 @@ - declarationEmitLateBoundAssignments2.ts(36,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - declarationEmitLateBoundAssignments2.ts(36,17): error TS9009: 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(39,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - declarationEmitLateBoundAssignments2.ts(39,14): error TS9009: 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(42,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitLateBoundAssignments2.ts(42,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitLateBoundAssignments2.ts(42,14): error TS9009: 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(45,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - declarationEmitLateBoundAssignments2.ts(45,14): error TS9009: 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(48,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitLateBoundAssignments2.ts(48,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitLateBoundAssignments2.ts(48,14): error TS9009: 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(51,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - declarationEmitLateBoundAssignments2.ts(51,14): error TS9009: 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(54,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitLateBoundAssignments2.ts(54,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitLateBoundAssignments2.ts(54,14): error TS9009: 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(57,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - declarationEmitLateBoundAssignments2.ts(57,14): error TS9009: 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(60,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitLateBoundAssignments2.ts(60,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitLateBoundAssignments2.ts(60,14): error TS9009: 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(63,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - declarationEmitLateBoundAssignments2.ts(63,14): error TS9009: 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(66,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitLateBoundAssignments2.ts(66,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitLateBoundAssignments2.ts(66,14): error TS9009: 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 (35 errors) ==== -+==== declarationEmitLateBoundAssignments2.ts (40 errors) ==== - // https://github.com/microsoft/TypeScript/issues/54811 - - const c = "C" - const num = 1 -@@ -147,10 +152,12 @@ - !!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow["B"] = 'bar' - - export const arrow2 = () => {} -- ~~~~~~~~ -+ ~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow2[c] = 100 - - export const arrow3 = () => {} - ~~~~~~ -@@ -159,10 +166,12 @@ - !!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow3[77] = 0 - - export const arrow4 = () => {} -- ~~~~~~~~ -+ ~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow4[num] = 0 - - export const arrow5 = () => {} - ~~~~~~ -@@ -171,10 +180,12 @@ - !!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow5["101"] = 0 - - export const arrow6 = () => {} -- ~~~~~~~~ -+ ~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow6[numStr] = 0 - - export const arrow7 = () => {} - ~~~~~~ -@@ -183,10 +194,12 @@ - !!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow7["qwe rty"] = 0 - - export const arrow8 = () => {} -- ~~~~~~~~ -+ ~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow8[withWhitespace] = 0 - - export const arrow9 = () => {} - ~~~~~~ -@@ -195,8 +208,10 @@ - !!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow9["🤪"] = 0 - - export const arrow10 = () => {} -- ~~~~~~~~ -+ ~~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~~~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow10[emoji] = 0 - -\ No newline at end of file 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 index 5a1960d8788c2..45e41f9bc4f09 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/declarationFilesWithTypeReferences2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationFilesWithTypeReferences2.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TSC adds type reference directives.]] //// //// [tests/cases/compiler/declarationFilesWithTypeReferences2.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff index da69ea02ce402..4345583213cf3 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/compiler/decoratorsOnComputedProperties.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts.diff deleted file mode 100644 index 34a824611e1db..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/enumConstantMembers.d.ts.diff +++ /dev/null @@ -1,94 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/enums/enumConstantMembers.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -22,34 +22,40 @@ - a = Infinity, - b = Infinity, - c = Infinity, - d = NaN, -- e = NaN, -- f = Infinity, -- g = -Infinity -+ e, -+ f, -+ g - } - declare const enum E6 { - a = Infinity, - b = Infinity, - c = Infinity, - d = NaN, -- e = NaN, -- f = Infinity, -- g = -Infinity -+ e, -+ f, -+ g - } - - /// [Errors] //// - -+enumConstantMembers.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMembers.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumConstantMembers.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumConstantMembers.ts(32,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - enumConstantMembers.ts(33,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - enumConstantMembers.ts(34,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - enumConstantMembers.ts(35,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. -+enumConstantMembers.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumConstantMembers.ts(36,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. -+enumConstantMembers.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumConstantMembers.ts(37,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -+enumConstantMembers.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - enumConstantMembers.ts(38,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - - --==== enumConstantMembers.ts (7 errors) ==== -+==== enumConstantMembers.ts (13 errors) ==== - // Constant members allow negatives, but not decimals. Also hex literals are allowed - enum E1 { - a = 1, - b -@@ -74,10 +80,16 @@ - b = 2 / 0.0, - c = 1.0 / 0.0, - d = 0.0 / 0.0, - e = NaN, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - f = Infinity, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - g = -Infinity -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - const enum E6 { - a = 1 / 0, -@@ -92,14 +104,20 @@ - d = 0.0 / 0.0, - ~~~~~~~~~ - !!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - e = NaN, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ - !!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - f = Infinity, -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~ - !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - g = -Infinity -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~ - !!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - } - -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff deleted file mode 100644 index f21987e790be7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/expandoFunctionExpressionsWithDynamicNames.d.ts.diff +++ /dev/null @@ -1,43 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/expandoFunctionExpressionsWithDynamicNames.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -5,23 +5,29 @@ - export declare const expr2: invalid; - - /// [Errors] //// - --expandoFunctionExpressionsWithDynamicNames.ts(5,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --expandoFunctionExpressionsWithDynamicNames.ts(8,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+expandoFunctionExpressionsWithDynamicNames.ts(8,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+expandoFunctionExpressionsWithDynamicNames.ts(8,14): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - - --==== expandoFunctionExpressionsWithDynamicNames.ts (2 errors) ==== -+==== expandoFunctionExpressionsWithDynamicNames.ts (4 errors) ==== - // https://github.com/microsoft/TypeScript/issues/54809 - - const s = "X"; - - export const expr = () => {} -- ~~~~~~~~ -+ ~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - expr[s] = 0 - - export const expr2 = function () {} -- ~~~~~~~~ -+ ~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - expr2[s] = 0 - -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff index 0f9ca659ede05..b037c2dcb2769 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TSC detects forward ref which is not allowed and so enum value is undefined, which is also the way we detect isolated declaration errors.]] //// //// [tests/cases/compiler/forwardRefInEnum.ts] //// 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 index 5f35d4162828e..b3fa1636976a3 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/giant.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/giant.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/compiler/giant.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff index 9844fb9838f5d..35bee8c3f291a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/indexTypeNoSubstitutionTemplateLiteral.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/indexTypeNoSubstitutionTemplateLiteral.d.ts.diff deleted file mode 100644 index 74d58a412b39d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/indexTypeNoSubstitutionTemplateLiteral.d.ts.diff +++ /dev/null @@ -1,26 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/indexTypeNoSubstitutionTemplateLiteral.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -6,17 +6,14 @@ - - /// [Errors] //// - - indexTypeNoSubstitutionTemplateLiteral.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --indexTypeNoSubstitutionTemplateLiteral.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - - --==== indexTypeNoSubstitutionTemplateLiteral.ts (2 errors) ==== -+==== indexTypeNoSubstitutionTemplateLiteral.ts (1 errors) ==== - function Foo() {} - ~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -- ~~~ --!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - Foo[`b`] = function () {}; - - type Test = keyof typeof Foo; - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff index e08f2eebaf797..6269f40a18228 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/compiler/indexWithoutParamType2.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/intTypeCheck.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/intTypeCheck.d.ts.diff index 6e38197012121..6f3f383a9b315 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/intTypeCheck.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/intTypeCheck.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/compiler/intTypeCheck.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts.diff deleted file mode 100644 index a529644e9c834..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts.diff +++ /dev/null @@ -1,18 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,9 +4,9 @@ - declare function tag(str: any, ...args: any[]): any; - declare const a: invalid; - declare const b: invalid; - declare const x: invalid; --declare const y = "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld"; -+declare const y = `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; - declare const z: invalid; - declare const a1: invalid; - declare const a2: invalid; - declare const a3: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es5).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es5).d.ts.diff deleted file mode 100644 index a529644e9c834..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=es5).d.ts.diff +++ /dev/null @@ -1,18 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,9 +4,9 @@ - declare function tag(str: any, ...args: any[]): any; - declare const a: invalid; - declare const b: invalid; - declare const x: invalid; --declare const y = "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld"; -+declare const y = `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; - declare const z: invalid; - declare const a1: invalid; - declare const a2: invalid; - declare const a3: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts.diff deleted file mode 100644 index a529644e9c834..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts.diff +++ /dev/null @@ -1,18 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,9 +4,9 @@ - declare function tag(str: any, ...args: any[]): any; - declare const a: invalid; - declare const b: invalid; - declare const x: invalid; --declare const y = "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld"; -+declare const y = `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; - declare const z: invalid; - declare const a1: invalid; - declare const a2: invalid; - declare const a3: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff index 39f079b2a1db0..da66a81596660 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO: Files in node modules are not fixed. Should we?]] //// //// [tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff index f8fc9a6d9a987..ed4ff2cde9f66 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/compiler/overloadsWithComputedNames.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts.diff deleted file mode 100644 index c0b33344af4e0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parseBigInt.d.ts.diff +++ /dev/null @@ -1,40 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/parseBigInt.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,18 +2,18 @@ - - //// [parseBigInt.d.ts] - declare const bin = 5, binBig = 5n; - declare const oct = 375, octBig = 375n; --declare const hex = 3083, hexBig = 3083n; -+declare const hex = 3083, hexBig = 0xc0bn; - declare const dec = 123, decBig = 123n; - declare const largeBin = 384307168202282325n; - declare const largeOct = 1505852261029722487n; - declare const largeDec = 12345678091234567890n; --declare const largeHex = 1311768467294899695n; -+declare const largeHex = 0x1234567890abcdefn; - declare const separatedBin = 21n; - declare const separatedOct = 342391n; - declare const separatedDec = 123456789n; --declare const separatedHex = 11259375n; -+declare const separatedHex = 0x0abcdefn; - declare const zero = 0n; - declare const oneBit = 1n; - declare const twoBit = 3n; - declare const threeBit = 7n; -@@ -39,9 +39,9 @@ - declare const unaryPlus: number; - declare const unaryPlusHex: number; - declare const emptyBinary = 0n; - declare const emptyOct = 0n; --declare const emptyHex = 0n; -+declare const emptyHex = 0x0n; - declare const leadingSeparator: invalid; - declare const trailingSeparator = 123n; - declare const doubleSeparator = 123456789n; - declare const oneTwoOrThree: (x: 1n | 2n | 3n) => bigint; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff index dc023b452a36a..c4dced216a909 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff @@ -1,29 +1,27 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName1.ts] //// =================================================================== --- TSC declarations +++ DTE declarations -@@ -4,17 +4,17 @@ +@@ -4,17 +4,14 @@ declare var v: invalid; /// [Errors] //// -parserComputedPropertyName1.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. parserComputedPropertyName1.ts(1,12): error TS2304: Cannot find name 'e'. -+parserComputedPropertyName1.ts(1,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. parserComputedPropertyName1.ts(1,15): error TS1005: ':' expected. - ==== parserComputedPropertyName1.ts (3 errors) ==== +-==== parserComputedPropertyName1.ts (3 errors) ==== ++==== parserComputedPropertyName1.ts (2 errors) ==== var v = { [e] }; - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~ !!! error TS2304: Cannot find name 'e'. -+ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~ !!! error TS1005: ':' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff index 80ce5ae601982..3aaada8c191db 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff index e6a8f223ac823..a88368e4bd783 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff index 613c84799c9e1..232e8c46d007f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff index 35fe4bc771a7c..2548eb058e035 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff index 77aebb557d1ee..22e8844737288 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff index 4e8dc6abe1ee4..f45b092be072c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff index bdaf082b458e0..e61594d7288d3 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff index 514c7e34bb6ab..870ebbb677d0c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff index 9695bc08604c3..ed71830478c07 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff index 2562c873891fc..2ddcd38a87492 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff index 5b52674dfaa23..1f362ebaa76f6 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff index 41c8efb78d248..387795f0b45d8 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff index 1da6a72db2630..2da0c4c35cc34 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff index 8e2b72f3fc730..86780f06bf56d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff index 73b77ac15ddc9..4abbe8a7b8122 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff index d05001efe069a..8610627af93ab 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff index dbe6385840309..405f596c94563 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff index 1d9159f0e61e7..86b52b410d7bd 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff index 6d50553a48a40..6db218f7c745f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff index 7dfb2c75177e7..0099c7633ecc1 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff index 333f77242a4fd..2206d57a1e9f5 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff index 5e1f9b2d37a23..f6fd112c43d8c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff index 87d560a0af403..3d59b4ea1a2cf 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff index 49271d95b1dd7..f66e7ee5e11f8 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff index c1494b191971e..133f2707a00c2 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff index 939c6bdca1c70..e6dbb9b640785 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff index b854cdc5f6384..67de32456f7b6 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff index 74eee9373e03a..1a95e1616093d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff index ef4c03a932ddc..30b1ccdb8300d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff index 67b467e20e33f..701c9c4d4cb3e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty1.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff index 9fcf4bb6fe494..e7dfb8738e4c2 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty2.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff index fcc0d91d42058..5bfe332dfd72d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty3.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff new file mode 100644 index 0000000000000..0c70334343cf6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,20 +7,17 @@ + + /// [Errors] //// + + parserES5SymbolProperty4.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +-parserES5SymbolProperty4.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserES5SymbolProperty4.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + parserES5SymbolProperty4.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. + + +-==== parserES5SymbolProperty4.ts (4 errors) ==== ++==== parserES5SymbolProperty4.ts (3 errors) ==== + declare class C { + [Symbol.isRegExp]: string; + ~~~~~~~~~~~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +- ~~~~~~~~~~~~~~~~~ +-!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ + !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ + !!! error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff index cb76d1cdb2d3e..28f4dfe742feb 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty5.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff index c8eb6ff044733..e2d64a928b7bb 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty6.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff index 8ca7e7fbfadea..2b5b4c7445aa4 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty7.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff new file mode 100644 index 0000000000000..943ccc507791c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff @@ -0,0 +1,19 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,10 @@ + + + //// [parserES5SymbolProperty8.d.ts] +-declare var x: {}; ++declare var x: { ++ [Symbol.toPrimitive](): string; ++}; + + /// [Errors] //// + + parserES5SymbolProperty8.ts(2,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/original/diff/parserES5SymbolProperty9.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff index 1667e37528408..913991df89a38 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty9.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff index 507028f2dd683..91ce8549fafe4 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff index b2015068b7b84..974d641ef7826 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff index 24eef71ebcaa7..1cae47c24c2ba 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Symbol merges with global eval and is not written to declarations.]] //// //// [tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/propertyAssignment.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/propertyAssignment.d.ts.diff index 1b97a9e0b3c8c..54692b95a9b2d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/propertyAssignment.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/propertyAssignment.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Syntactically invalid.]] //// //// [tests/cases/compiler/propertyAssignment.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/reExportAliasMakesInstantiated.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/reExportAliasMakesInstantiated.d.ts.diff index 3db2a2702e1ed..1b790598e0f34 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/reExportAliasMakesInstantiated.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/reExportAliasMakesInstantiated.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: GH#55571]] //// //// [tests/cases/conformance/internalModules/moduleDeclarations/reExportAliasMakesInstantiated.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff index c5918b723bf07..10bcb681fd28d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff index 2f466bf54f15f..b3c7312b9d481 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts] //// 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 index dc41e72893bc0..0eef4a4d7e9c4 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff index 0aa5e90b57627..bcde5388a7633 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/Symbols/symbolProperty1.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff index d4111d37d116a..454ac3d27f655 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/Symbols/symbolProperty2.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff index 31d00845d5b55..4da2f510794c5 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/Symbols/symbolProperty3.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff index 2853486e0a9ad..4422756562778 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/Symbols/symbolProperty52.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff index eccfda0d504a9..d6d06b2ffcac3 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/Symbols/symbolProperty53.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff index 00c2585ef2b58..e88974eaf96a2 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/Symbols/symbolProperty54.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff index 4ec35348c5f20..1e7e9c7ae300b 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/Symbols/symbolProperty58.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff index 3a0d2fcb360fd..8bead576c8ae0 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/conformance/es6/Symbols/symbolProperty59.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralsSourceMap.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralsSourceMap.d.ts.diff deleted file mode 100644 index 8ccfd5b750582..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/templateLiteralsSourceMap.d.ts.diff +++ /dev/null @@ -1,13 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/templateLiteralsSourceMap.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,4 +1,4 @@ - - - //// [templateLiteralsSourceMap.d.ts] --declare const s = "a0b1c2"; -+declare const s = `a${0}b${1}c${2}`; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment36.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment36.d.ts.diff index 76565560656f0..00507fee9573a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment36.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment36.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TODO Need to fix DTE looking recursively for assigned members.]] //// //// [tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts] //// 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 index 1ef9119871e14..07a228f35fb2f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives11.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives11.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TSC adds type reference directives.]] //// //// [tests/cases/compiler/typeReferenceDirectives11.ts] //// 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 index c3274c091e34e..3cf1304e8901f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives2.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: TSC adds type reference directives.]] //// //// [tests/cases/compiler/typeReferenceDirectives2.ts] //// 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 index 5349e3a365a23..f03dba9dd0ac6 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives8.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Requires adding a type reference directive that only TSC can detect]] //// //// [tests/cases/compiler/typeReferenceDirectives8.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff index cabeabe811b50..9056b055f3f64 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Invalid computed property can only be detected by TSC]] //// //// [tests/cases/compiler/typeUsedAsTypeLiteralIndex.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts new file mode 100644 index 0000000000000..0e70d22b6807c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts @@ -0,0 +1,47 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts] //// + +//// [computedPropertyNamesOnOverloads_ES5.ts] +var methodName = "method"; +var accessorName = "accessor"; +class C { + [methodName](v: string); + [methodName](); + [methodName](v?: string) { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNamesOnOverloads_ES5.d.ts] +declare var methodName: string; +declare var accessorName: string; +declare class C { + [methodName](v: string): invalid; + [methodName](): invalid; +} + +/// [Errors] //// + +computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. +computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. +computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNamesOnOverloads_ES5.ts (4 errors) ==== + var methodName = "method"; + var accessorName = "accessor"; + class C { + [methodName](v: string); + ~~~~~~~~~~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [methodName](); + ~~~~~~~~~~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [methodName](v?: string) { } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitLateBoundAssignments2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitLateBoundAssignments2.d.ts deleted file mode 100644 index e0dd7333e8c6f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitLateBoundAssignments2.d.ts +++ /dev/null @@ -1,291 +0,0 @@ -//// [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() {} -decl["B"] = 'foo' - -export function decl2() {} -decl2[c] = 0 - -export function decl3() {} -decl3[77] = 0 - -export function decl4() {} -decl4[num] = 0 - -export function decl5() {} -decl5["101"] = 0 - -export function decl6() {} -decl6[numStr] = 0 - -export function decl7() {} -decl7["qwe rty"] = 0 - -export function decl8() {} -decl8[withWhitespace] = 0 - -export function decl9() {} -decl9["🤪"] = 0 - -export function decl10() {} -decl10[emoji] = 0 - -export const arrow = () => {} -arrow["B"] = 'bar' - -export const arrow2 = () => {} -arrow2[c] = 100 - -export const arrow3 = () => {} -arrow3[77] = 0 - -export const arrow4 = () => {} -arrow4[num] = 0 - -export const arrow5 = () => {} -arrow5["101"] = 0 - -export const arrow6 = () => {} -arrow6[numStr] = 0 - -export const arrow7 = () => {} -arrow7["qwe rty"] = 0 - -export const arrow8 = () => {} -arrow8[withWhitespace] = 0 - -export const arrow9 = () => {} -arrow9["🤪"] = 0 - -export const arrow10 = () => {} -arrow10[emoji] = 0 - - -/// [Declarations] //// - - - -//// [declarationEmitLateBoundAssignments2.d.ts] -export declare function decl(): invalid; -export declare function decl2(): invalid; -export declare function decl3(): invalid; -export declare function decl4(): invalid; -export declare function decl5(): invalid; -export declare function decl6(): invalid; -export declare function decl7(): invalid; -export declare function decl8(): invalid; -export declare function decl9(): invalid; -export declare function decl10(): invalid; -export declare const arrow: invalid; -export declare const arrow2: invalid; -export declare const arrow3: invalid; -export declare const arrow4: invalid; -export declare const arrow5: invalid; -export declare const arrow6: invalid; -export declare const arrow7: invalid; -export declare const arrow8: invalid; -export declare const arrow9: invalid; -export declare const arrow10: invalid; - -/// [Errors] //// - -declarationEmitLateBoundAssignments2.ts(9,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(9,17): error TS9009: 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(12,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(12,17): error TS9009: 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(15,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(15,17): error TS9009: 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(18,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(18,17): error TS9009: 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(21,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(21,17): error TS9009: 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(24,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(24,17): error TS9009: 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(27,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(27,17): error TS9009: 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(30,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(30,17): error TS9009: 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(33,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(33,17): error TS9009: 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(36,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(36,17): error TS9009: 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(39,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(39,14): error TS9009: 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(42,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(42,14): error TS9009: 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(45,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(45,14): error TS9009: 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(48,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(48,14): error TS9009: 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(51,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(51,14): error TS9009: 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(54,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(54,14): error TS9009: 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(57,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(57,14): error TS9009: 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(60,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(60,14): error TS9009: 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(63,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(63,14): error TS9009: 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(66,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(66,14): error TS9009: 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 (40 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() {} - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - decl["B"] = 'foo' - - export function decl2() {} - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - decl2[c] = 0 - - export function decl3() {} - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - decl3[77] = 0 - - export function decl4() {} - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - decl4[num] = 0 - - export function decl5() {} - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - decl5["101"] = 0 - - export function decl6() {} - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - decl6[numStr] = 0 - - export function decl7() {} - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - decl7["qwe rty"] = 0 - - export function decl8() {} - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - decl8[withWhitespace] = 0 - - export function decl9() {} - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - decl9["🤪"] = 0 - - export function decl10() {} - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - decl10[emoji] = 0 - - export const arrow = () => {} - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow["B"] = 'bar' - - export const arrow2 = () => {} - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow2[c] = 100 - - export const arrow3 = () => {} - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow3[77] = 0 - - export const arrow4 = () => {} - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow4[num] = 0 - - export const arrow5 = () => {} - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow5["101"] = 0 - - export const arrow6 = () => {} - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow6[numStr] = 0 - - export const arrow7 = () => {} - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow7["qwe rty"] = 0 - - export const arrow8 = () => {} - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow8[withWhitespace] = 0 - - export const arrow9 = () => {} - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow9["🤪"] = 0 - - export const arrow10 = () => {} - ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow10[emoji] = 0 - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts deleted file mode 100644 index 35f3779028a93..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/enumConstantMembers.d.ts +++ /dev/null @@ -1,169 +0,0 @@ -//// [tests/cases/conformance/enums/enumConstantMembers.ts] //// - -//// [enumConstantMembers.ts] -// Constant members allow negatives, but not decimals. Also hex literals are allowed -enum E1 { - a = 1, - b -} -enum E2 { - a = - 1, - b -} -enum E3 { - a = 0.1, - b // Error because 0.1 is not a constant -} - -declare enum E4 { - a = 1, - b = -1, - c = 0.1 // Not a constant -} - -enum E5 { - a = 1 / 0, - b = 2 / 0.0, - c = 1.0 / 0.0, - d = 0.0 / 0.0, - e = NaN, - f = Infinity, - g = -Infinity -} - -const enum E6 { - a = 1 / 0, - b = 2 / 0.0, - c = 1.0 / 0.0, - d = 0.0 / 0.0, - e = NaN, - f = Infinity, - g = -Infinity -} - - -/// [Declarations] //// - - - -//// [enumConstantMembers.d.ts] -declare enum E1 { - a = 1, - b = 2 -} -declare enum E2 { - a = -1, - b = 0 -} -declare enum E3 { - a = 0.1, - b = 1.1 -} -declare enum E4 { - a = 1, - b = -1, - c = 0.1 -} -declare enum E5 { - a = Infinity, - b = Infinity, - c = Infinity, - d = NaN, - e, - f, - g -} -declare const enum E6 { - a = Infinity, - b = Infinity, - c = Infinity, - d = NaN, - e, - f, - g -} - -/// [Errors] //// - -enumConstantMembers.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(27,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(32,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(33,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(34,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(35,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. -enumConstantMembers.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(36,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. -enumConstantMembers.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(37,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(38,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumConstantMembers.ts(38,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - - -==== enumConstantMembers.ts (13 errors) ==== - // Constant members allow negatives, but not decimals. Also hex literals are allowed - enum E1 { - a = 1, - b - } - enum E2 { - a = - 1, - b - } - enum E3 { - a = 0.1, - b // Error because 0.1 is not a constant - } - - declare enum E4 { - a = 1, - b = -1, - c = 0.1 // Not a constant - } - - enum E5 { - a = 1 / 0, - b = 2 / 0.0, - c = 1.0 / 0.0, - d = 0.0 / 0.0, - e = NaN, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - f = Infinity, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - g = -Infinity - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - - const enum E6 { - a = 1 / 0, - ~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - b = 2 / 0.0, - ~~~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - c = 1.0 / 0.0, - ~~~~~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - d = 0.0 / 0.0, - ~~~~~~~~~ -!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - e = NaN, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ -!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - f = Infinity, - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - g = -Infinity - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/expandoFunctionExpressionsWithDynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/expandoFunctionExpressionsWithDynamicNames.d.ts deleted file mode 100644 index 5f8f981bc0395..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/expandoFunctionExpressionsWithDynamicNames.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -//// [tests/cases/compiler/expandoFunctionExpressionsWithDynamicNames.ts] //// - -//// [expandoFunctionExpressionsWithDynamicNames.ts] -// https://github.com/microsoft/TypeScript/issues/54809 - -const s = "X"; - -export const expr = () => {} -expr[s] = 0 - -export const expr2 = function () {} -expr2[s] = 0 - - -/// [Declarations] //// - - - -//// [expandoFunctionExpressionsWithDynamicNames.d.ts] -export declare const expr: invalid; -export declare const expr2: invalid; - -/// [Errors] //// - -expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -expandoFunctionExpressionsWithDynamicNames.ts(5,14): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -expandoFunctionExpressionsWithDynamicNames.ts(8,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -expandoFunctionExpressionsWithDynamicNames.ts(8,14): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - - -==== expandoFunctionExpressionsWithDynamicNames.ts (4 errors) ==== - // https://github.com/microsoft/TypeScript/issues/54809 - - const s = "X"; - - export const expr = () => {} - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - expr[s] = 0 - - export const expr2 = function () {} - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - expr2[s] = 0 - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/indexTypeNoSubstitutionTemplateLiteral.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/indexTypeNoSubstitutionTemplateLiteral.d.ts deleted file mode 100644 index 779ee463e1ca1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/indexTypeNoSubstitutionTemplateLiteral.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -//// [tests/cases/compiler/indexTypeNoSubstitutionTemplateLiteral.ts] //// - -//// [indexTypeNoSubstitutionTemplateLiteral.ts] -function Foo() {} -Foo[`b`] = function () {}; - -type Test = keyof typeof Foo; - - - -/// [Declarations] //// - - - -//// [indexTypeNoSubstitutionTemplateLiteral.d.ts] -declare function Foo(): invalid; -type Test = keyof typeof Foo; - -/// [Errors] //// - -indexTypeNoSubstitutionTemplateLiteral.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== indexTypeNoSubstitutionTemplateLiteral.ts (1 errors) ==== - function Foo() {} - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - Foo[`b`] = function () {}; - - type Test = keyof typeof Foo; - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts deleted file mode 100644 index 69fcfe2876aba..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts +++ /dev/null @@ -1,148 +0,0 @@ -//// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// - -//// [invalidTaggedTemplateEscapeSequences.ts] -function tag (str: any, ...args: any[]): any { - return str -} - -const a = tag`123` -const b = tag`123 ${100}` -const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; -const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate -const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate - -const a1 = tag`${ 100 }\0` // \0 -const a2 = tag`${ 100 }\00` // \\00 -const a3 = tag`${ 100 }\u` // \\u -const a4 = tag`${ 100 }\u0` // \\u0 -const a5 = tag`${ 100 }\u00` // \\u00 -const a6 = tag`${ 100 }\u000` // \\u000 -const a7 = tag`${ 100 }\u0000` // \u0000 -const a8 = tag`${ 100 }\u{` // \\u{ -const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF -const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 -const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} -const a12 = tag`${ 100 }\x` // \\x -const a13 = tag`${ 100 }\x0` // \\x0 -const a14 = tag`${ 100 }\x00` // \x00 - - -/// [Declarations] //// - - - -//// [invalidTaggedTemplateEscapeSequences.d.ts] -declare function tag(str: any, ...args: any[]): any; -declare const a: invalid; -declare const b: invalid; -declare const x: invalid; -declare const y = `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; -declare const z: invalid; -declare const a1: invalid; -declare const a2: invalid; -declare const a3: invalid; -declare const a4: invalid; -declare const a5: invalid; -declare const a6: invalid; -declare const a7: invalid; -declare const a8: invalid; -declare const a9: invalid; -declare const a10: invalid; -declare const a11: invalid; -declare const a12: invalid; -declare const a13: invalid; -declare const a14: invalid; - -/// [Errors] //// - -invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(7,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(8,15): error TS1125: Hexadecimal digit expected. -invalidTaggedTemplateEscapeSequences.ts(8,33): error TS1125: Hexadecimal digit expected. -invalidTaggedTemplateEscapeSequences.ts(8,75): error TS1125: Hexadecimal digit expected. -invalidTaggedTemplateEscapeSequences.ts(9,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(11,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(13,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(14,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(15,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(16,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(17,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(18,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(19,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(20,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(21,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(22,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(23,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== invalidTaggedTemplateEscapeSequences.ts (21 errors) ==== - function tag (str: any, ...args: any[]): any { - return str - } - - const a = tag`123` - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const b = tag`123 ${100}` - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate - -!!! error TS1125: Hexadecimal digit expected. - -!!! error TS1125: Hexadecimal digit expected. - -!!! error TS1125: Hexadecimal digit expected. - const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - const a1 = tag`${ 100 }\0` // \0 - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a2 = tag`${ 100 }\00` // \\00 - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a3 = tag`${ 100 }\u` // \\u - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a4 = tag`${ 100 }\u0` // \\u0 - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a5 = tag`${ 100 }\u00` // \\u00 - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a6 = tag`${ 100 }\u000` // \\u000 - ~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a7 = tag`${ 100 }\u0000` // \u0000 - ~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a8 = tag`${ 100 }\u{` // \\u{ - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a12 = tag`${ 100 }\x` // \\x - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a13 = tag`${ 100 }\x0` // \\x0 - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a14 = tag`${ 100 }\x00` // \x00 - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es5).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es5).d.ts deleted file mode 100644 index 69fcfe2876aba..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=es5).d.ts +++ /dev/null @@ -1,148 +0,0 @@ -//// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// - -//// [invalidTaggedTemplateEscapeSequences.ts] -function tag (str: any, ...args: any[]): any { - return str -} - -const a = tag`123` -const b = tag`123 ${100}` -const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; -const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate -const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate - -const a1 = tag`${ 100 }\0` // \0 -const a2 = tag`${ 100 }\00` // \\00 -const a3 = tag`${ 100 }\u` // \\u -const a4 = tag`${ 100 }\u0` // \\u0 -const a5 = tag`${ 100 }\u00` // \\u00 -const a6 = tag`${ 100 }\u000` // \\u000 -const a7 = tag`${ 100 }\u0000` // \u0000 -const a8 = tag`${ 100 }\u{` // \\u{ -const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF -const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 -const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} -const a12 = tag`${ 100 }\x` // \\x -const a13 = tag`${ 100 }\x0` // \\x0 -const a14 = tag`${ 100 }\x00` // \x00 - - -/// [Declarations] //// - - - -//// [invalidTaggedTemplateEscapeSequences.d.ts] -declare function tag(str: any, ...args: any[]): any; -declare const a: invalid; -declare const b: invalid; -declare const x: invalid; -declare const y = `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; -declare const z: invalid; -declare const a1: invalid; -declare const a2: invalid; -declare const a3: invalid; -declare const a4: invalid; -declare const a5: invalid; -declare const a6: invalid; -declare const a7: invalid; -declare const a8: invalid; -declare const a9: invalid; -declare const a10: invalid; -declare const a11: invalid; -declare const a12: invalid; -declare const a13: invalid; -declare const a14: invalid; - -/// [Errors] //// - -invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(7,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(8,15): error TS1125: Hexadecimal digit expected. -invalidTaggedTemplateEscapeSequences.ts(8,33): error TS1125: Hexadecimal digit expected. -invalidTaggedTemplateEscapeSequences.ts(8,75): error TS1125: Hexadecimal digit expected. -invalidTaggedTemplateEscapeSequences.ts(9,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(11,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(13,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(14,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(15,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(16,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(17,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(18,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(19,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(20,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(21,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(22,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(23,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== invalidTaggedTemplateEscapeSequences.ts (21 errors) ==== - function tag (str: any, ...args: any[]): any { - return str - } - - const a = tag`123` - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const b = tag`123 ${100}` - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate - -!!! error TS1125: Hexadecimal digit expected. - -!!! error TS1125: Hexadecimal digit expected. - -!!! error TS1125: Hexadecimal digit expected. - const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - const a1 = tag`${ 100 }\0` // \0 - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a2 = tag`${ 100 }\00` // \\00 - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a3 = tag`${ 100 }\u` // \\u - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a4 = tag`${ 100 }\u0` // \\u0 - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a5 = tag`${ 100 }\u00` // \\u00 - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a6 = tag`${ 100 }\u000` // \\u000 - ~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a7 = tag`${ 100 }\u0000` // \u0000 - ~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a8 = tag`${ 100 }\u{` // \\u{ - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a12 = tag`${ 100 }\x` // \\x - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a13 = tag`${ 100 }\x0` // \\x0 - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a14 = tag`${ 100 }\x00` // \x00 - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts deleted file mode 100644 index 69fcfe2876aba..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts +++ /dev/null @@ -1,148 +0,0 @@ -//// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// - -//// [invalidTaggedTemplateEscapeSequences.ts] -function tag (str: any, ...args: any[]): any { - return str -} - -const a = tag`123` -const b = tag`123 ${100}` -const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; -const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate -const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate - -const a1 = tag`${ 100 }\0` // \0 -const a2 = tag`${ 100 }\00` // \\00 -const a3 = tag`${ 100 }\u` // \\u -const a4 = tag`${ 100 }\u0` // \\u0 -const a5 = tag`${ 100 }\u00` // \\u00 -const a6 = tag`${ 100 }\u000` // \\u000 -const a7 = tag`${ 100 }\u0000` // \u0000 -const a8 = tag`${ 100 }\u{` // \\u{ -const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF -const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 -const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} -const a12 = tag`${ 100 }\x` // \\x -const a13 = tag`${ 100 }\x0` // \\x0 -const a14 = tag`${ 100 }\x00` // \x00 - - -/// [Declarations] //// - - - -//// [invalidTaggedTemplateEscapeSequences.d.ts] -declare function tag(str: any, ...args: any[]): any; -declare const a: invalid; -declare const b: invalid; -declare const x: invalid; -declare const y = `\u{hello} ${100} \xtraordinary ${200} wonderful ${300} \uworld`; -declare const z: invalid; -declare const a1: invalid; -declare const a2: invalid; -declare const a3: invalid; -declare const a4: invalid; -declare const a5: invalid; -declare const a6: invalid; -declare const a7: invalid; -declare const a8: invalid; -declare const a9: invalid; -declare const a10: invalid; -declare const a11: invalid; -declare const a12: invalid; -declare const a13: invalid; -declare const a14: invalid; - -/// [Errors] //// - -invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(7,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(8,15): error TS1125: Hexadecimal digit expected. -invalidTaggedTemplateEscapeSequences.ts(8,33): error TS1125: Hexadecimal digit expected. -invalidTaggedTemplateEscapeSequences.ts(8,75): error TS1125: Hexadecimal digit expected. -invalidTaggedTemplateEscapeSequences.ts(9,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(11,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(13,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(14,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(15,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(16,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(17,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(18,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(19,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(20,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(21,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(22,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(23,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== invalidTaggedTemplateEscapeSequences.ts (21 errors) ==== - function tag (str: any, ...args: any[]): any { - return str - } - - const a = tag`123` - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const b = tag`123 ${100}` - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate - -!!! error TS1125: Hexadecimal digit expected. - -!!! error TS1125: Hexadecimal digit expected. - -!!! error TS1125: Hexadecimal digit expected. - const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - const a1 = tag`${ 100 }\0` // \0 - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a2 = tag`${ 100 }\00` // \\00 - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a3 = tag`${ 100 }\u` // \\u - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a4 = tag`${ 100 }\u0` // \\u0 - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a5 = tag`${ 100 }\u00` // \\u00 - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a6 = tag`${ 100 }\u000` // \\u000 - ~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a7 = tag`${ 100 }\u0000` // \u0000 - ~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a8 = tag`${ 100 }\u{` // \\u{ - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a12 = tag`${ 100 }\x` // \\x - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a13 = tag`${ 100 }\x0` // \\x0 - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a14 = tag`${ 100 }\x00` // \x00 - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts deleted file mode 100644 index ccca61f2265bc..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parseBigInt.d.ts +++ /dev/null @@ -1,256 +0,0 @@ -//// [tests/cases/compiler/parseBigInt.ts] //// - -//// [parseBigInt.ts] -// All bases should allow "n" suffix -const bin = 0b101, binBig = 0b101n; // 5, 5n -const oct = 0o567, octBig = 0o567n; // 375, 375n -const hex = 0xC0B, hexBig = 0xC0Bn; // 3083, 3083n -const dec = 123, decBig = 123n; - -// Test literals whose values overflow a 53-bit integer -// These should be represented exactly in the emitted JS -const largeBin = 0b10101010101010101010101010101010101010101010101010101010101n; // 384307168202282325n -const largeOct = 0o123456712345671234567n; // 1505852261029722487n -const largeDec = 12345678091234567890n; -const largeHex = 0x1234567890abcdefn; // 1311768467294899695n - -// Test literals with separators -const separatedBin = 0b010_10_1n; // 21n -const separatedOct = 0o1234_567n; // 342391n -const separatedDec = 123_456_789n; -const separatedHex = 0x0_abcdefn; // 11259375n - -// Test parsing literals of different bit sizes -// to ensure that parsePseudoBigInt() allocates enough space -const zero = 0b0n; -const oneBit = 0b1n; -const twoBit = 0b11n; // 3n -const threeBit = 0b111n; // 7n -const fourBit = 0b1111n; // 15n -const fiveBit = 0b11111n; // 31n -const sixBit = 0b111111n; // 63n -const sevenBit = 0b1111111n; // 127n -const eightBit = 0b11111111n; // 255n -const nineBit = 0b111111111n; // 511n -const tenBit = 0b1111111111n; // 1023n -const elevenBit = 0b11111111111n; // 2047n -const twelveBit = 0b111111111111n; // 4095n -const thirteenBit = 0b1111111111111n; // 8191n -const fourteenBit = 0b11111111111111n; // 16383n -const fifteenBit = 0b111111111111111n; // 32767n -const sixteenBit = 0b1111111111111111n; // 65535n -const seventeenBit = 0b11111111111111111n; // 131071n - -// Test negative literals -const neg = -123n; -const negHex: -16n = -0x10n; - -// Test normalization of bigints -- all of these should succeed -const negZero: 0n = -0n; -const baseChange: 255n = 0xFFn; -const leadingZeros: 0xFFn = 0x000000FFn; - -// Plus not allowed on literals -const unaryPlus = +123n; -const unaryPlusHex = +0x123n; - -// Parsing errors -// In separate blocks because they each declare an "n" variable -{ const legacyOct = 0123n; } -{ const scientific = 1e2n; } -{ const decimal = 4.1n; } -{ const leadingDecimal = .1n; } -const emptyBinary = 0bn; // should error but infer 0n -const emptyOct = 0on; // should error but infer 0n -const emptyHex = 0xn; // should error but infer 0n -const leadingSeparator = _123n; -const trailingSeparator = 123_n; -const doubleSeparator = 123_456__789n; - -// Using literals as types -const oneTwoOrThree = (x: 1n | 2n | 3n): bigint => x ** 2n; -oneTwoOrThree(0n); oneTwoOrThree(1n); oneTwoOrThree(2n); oneTwoOrThree(3n); -oneTwoOrThree(0); oneTwoOrThree(1); oneTwoOrThree(2); oneTwoOrThree(3); - -/// [Declarations] //// - - - -//// [parseBigInt.d.ts] -declare const bin = 5, binBig = 5n; -declare const oct = 375, octBig = 375n; -declare const hex = 3083, hexBig = 0xc0bn; -declare const dec = 123, decBig = 123n; -declare const largeBin = 384307168202282325n; -declare const largeOct = 1505852261029722487n; -declare const largeDec = 12345678091234567890n; -declare const largeHex = 0x1234567890abcdefn; -declare const separatedBin = 21n; -declare const separatedOct = 342391n; -declare const separatedDec = 123456789n; -declare const separatedHex = 0x0abcdefn; -declare const zero = 0n; -declare const oneBit = 1n; -declare const twoBit = 3n; -declare const threeBit = 7n; -declare const fourBit = 15n; -declare const fiveBit = 31n; -declare const sixBit = 63n; -declare const sevenBit = 127n; -declare const eightBit = 255n; -declare const nineBit = 511n; -declare const tenBit = 1023n; -declare const elevenBit = 2047n; -declare const twelveBit = 4095n; -declare const thirteenBit = 8191n; -declare const fourteenBit = 16383n; -declare const fifteenBit = 32767n; -declare const sixteenBit = 65535n; -declare const seventeenBit = 131071n; -declare const neg = -123n; -declare const negHex: -16n; -declare const negZero: 0n; -declare const baseChange: 255n; -declare const leadingZeros: 0xffn; -declare const unaryPlus: number; -declare const unaryPlusHex: number; -declare const emptyBinary = 0n; -declare const emptyOct = 0n; -declare const emptyHex = 0x0n; -declare const leadingSeparator: invalid; -declare const trailingSeparator = 123n; -declare const doubleSeparator = 123456789n; -declare const oneTwoOrThree: (x: 1n | 2n | 3n) => bigint; - -/// [Errors] //// - -parseBigInt.ts(51,20): error TS2736: Operator '+' cannot be applied to type 'bigint'. -parseBigInt.ts(52,23): error TS2736: Operator '+' cannot be applied to type 'bigint'. -parseBigInt.ts(56,21): error TS1121: Octal literals are not allowed. Use the syntax '0o123'. -parseBigInt.ts(56,25): error TS1005: ',' expected. -parseBigInt.ts(57,22): error TS1352: A bigint literal cannot use exponential notation. -parseBigInt.ts(58,19): error TS1353: A bigint literal must be an integer. -parseBigInt.ts(59,26): error TS1353: A bigint literal must be an integer. -parseBigInt.ts(60,23): error TS1177: Binary digit expected. -parseBigInt.ts(61,20): error TS1178: Octal digit expected. -parseBigInt.ts(62,20): error TS1125: Hexadecimal digit expected. -parseBigInt.ts(63,26): error TS2304: Cannot find name '_123n'. -parseBigInt.ts(63,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parseBigInt.ts(64,30): error TS6188: Numeric separators are not allowed here. -parseBigInt.ts(65,33): error TS6189: Multiple consecutive numeric separators are not permitted. -parseBigInt.ts(69,15): error TS2345: Argument of type '0n' is not assignable to parameter of type '1n | 3n | 2n'. -parseBigInt.ts(70,15): error TS2345: Argument of type '0' is not assignable to parameter of type '1n | 3n | 2n'. -parseBigInt.ts(70,34): error TS2345: Argument of type '1' is not assignable to parameter of type '1n | 3n | 2n'. -parseBigInt.ts(70,53): error TS2345: Argument of type '2' is not assignable to parameter of type '1n | 3n | 2n'. -parseBigInt.ts(70,72): error TS2345: Argument of type '3' is not assignable to parameter of type '1n | 3n | 2n'. - - -==== parseBigInt.ts (19 errors) ==== - // All bases should allow "n" suffix - const bin = 0b101, binBig = 0b101n; // 5, 5n - const oct = 0o567, octBig = 0o567n; // 375, 375n - const hex = 0xC0B, hexBig = 0xC0Bn; // 3083, 3083n - const dec = 123, decBig = 123n; - - // Test literals whose values overflow a 53-bit integer - // These should be represented exactly in the emitted JS - const largeBin = 0b10101010101010101010101010101010101010101010101010101010101n; // 384307168202282325n - const largeOct = 0o123456712345671234567n; // 1505852261029722487n - const largeDec = 12345678091234567890n; - const largeHex = 0x1234567890abcdefn; // 1311768467294899695n - - // Test literals with separators - const separatedBin = 0b010_10_1n; // 21n - const separatedOct = 0o1234_567n; // 342391n - const separatedDec = 123_456_789n; - const separatedHex = 0x0_abcdefn; // 11259375n - - // Test parsing literals of different bit sizes - // to ensure that parsePseudoBigInt() allocates enough space - const zero = 0b0n; - const oneBit = 0b1n; - const twoBit = 0b11n; // 3n - const threeBit = 0b111n; // 7n - const fourBit = 0b1111n; // 15n - const fiveBit = 0b11111n; // 31n - const sixBit = 0b111111n; // 63n - const sevenBit = 0b1111111n; // 127n - const eightBit = 0b11111111n; // 255n - const nineBit = 0b111111111n; // 511n - const tenBit = 0b1111111111n; // 1023n - const elevenBit = 0b11111111111n; // 2047n - const twelveBit = 0b111111111111n; // 4095n - const thirteenBit = 0b1111111111111n; // 8191n - const fourteenBit = 0b11111111111111n; // 16383n - const fifteenBit = 0b111111111111111n; // 32767n - const sixteenBit = 0b1111111111111111n; // 65535n - const seventeenBit = 0b11111111111111111n; // 131071n - - // Test negative literals - const neg = -123n; - const negHex: -16n = -0x10n; - - // Test normalization of bigints -- all of these should succeed - const negZero: 0n = -0n; - const baseChange: 255n = 0xFFn; - const leadingZeros: 0xFFn = 0x000000FFn; - - // Plus not allowed on literals - const unaryPlus = +123n; - ~~~~ -!!! error TS2736: Operator '+' cannot be applied to type 'bigint'. - const unaryPlusHex = +0x123n; - ~~~~~~ -!!! error TS2736: Operator '+' cannot be applied to type 'bigint'. - - // Parsing errors - // In separate blocks because they each declare an "n" variable - { const legacyOct = 0123n; } - ~~~~ -!!! error TS1121: Octal literals are not allowed. Use the syntax '0o123'. - ~ -!!! error TS1005: ',' expected. - { const scientific = 1e2n; } - ~~~~ -!!! error TS1352: A bigint literal cannot use exponential notation. - { const decimal = 4.1n; } - ~~~~ -!!! error TS1353: A bigint literal must be an integer. - { const leadingDecimal = .1n; } - ~~~ -!!! error TS1353: A bigint literal must be an integer. - const emptyBinary = 0bn; // should error but infer 0n - -!!! error TS1177: Binary digit expected. - const emptyOct = 0on; // should error but infer 0n - -!!! error TS1178: Octal digit expected. - const emptyHex = 0xn; // should error but infer 0n - -!!! error TS1125: Hexadecimal digit expected. - const leadingSeparator = _123n; - ~~~~~ -!!! error TS2304: Cannot find name '_123n'. - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const trailingSeparator = 123_n; - ~ -!!! error TS6188: Numeric separators are not allowed here. - const doubleSeparator = 123_456__789n; - ~ -!!! error TS6189: Multiple consecutive numeric separators are not permitted. - - // Using literals as types - const oneTwoOrThree = (x: 1n | 2n | 3n): bigint => x ** 2n; - oneTwoOrThree(0n); oneTwoOrThree(1n); oneTwoOrThree(2n); oneTwoOrThree(3n); - ~~ -!!! error TS2345: Argument of type '0n' is not assignable to parameter of type '1n | 3n | 2n'. - oneTwoOrThree(0); oneTwoOrThree(1); oneTwoOrThree(2); oneTwoOrThree(3); - ~ -!!! error TS2345: Argument of type '0' is not assignable to parameter of type '1n | 3n | 2n'. - ~ -!!! error TS2345: Argument of type '1' is not assignable to parameter of type '1n | 3n | 2n'. - ~ -!!! error TS2345: Argument of type '2' is not assignable to parameter of type '1n | 3n | 2n'. - ~ -!!! error TS2345: Argument of type '3' is not assignable to parameter of type '1n | 3n | 2n'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName1.d.ts index 0c3f593f66dfa..967d9847b85c5 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName1.d.ts @@ -13,15 +13,12 @@ declare var v: invalid; /// [Errors] //// parserComputedPropertyName1.ts(1,12): error TS2304: Cannot find name 'e'. -parserComputedPropertyName1.ts(1,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. parserComputedPropertyName1.ts(1,15): error TS1005: ':' expected. -==== parserComputedPropertyName1.ts (3 errors) ==== +==== parserComputedPropertyName1.ts (2 errors) ==== var v = { [e] }; ~ !!! error TS2304: Cannot find name 'e'. - -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~ !!! error TS1005: ':' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts new file mode 100644 index 0000000000000..2d96420f38230 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts] //// + +//// [parserES5SymbolProperty4.ts] +declare class C { + [Symbol.isRegExp]: string; +} + +/// [Declarations] //// + + + +//// [parserES5SymbolProperty4.d.ts] +declare class C { + [Symbol.isRegExp]: string; +} + +/// [Errors] //// + +parserES5SymbolProperty4.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserES5SymbolProperty4.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +parserES5SymbolProperty4.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. + + +==== parserES5SymbolProperty4.ts (3 errors) ==== + declare class C { + [Symbol.isRegExp]: string; + ~~~~~~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ +!!! error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts new file mode 100644 index 0000000000000..4934e408820f3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts] //// + +//// [parserES5SymbolProperty8.ts] +var x: { + [Symbol.toPrimitive](): string +} + +/// [Declarations] //// + + + +//// [parserES5SymbolProperty8.d.ts] +declare var x: { + [Symbol.toPrimitive](): string; +}; + +/// [Errors] //// + +parserES5SymbolProperty8.ts(2,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. +parserES5SymbolProperty8.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + +==== parserES5SymbolProperty8.ts (2 errors) ==== + var x: { + [Symbol.toPrimitive](): 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 TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralsSourceMap.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralsSourceMap.d.ts deleted file mode 100644 index 21965d2e8db2a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/templateLiteralsSourceMap.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -//// [tests/cases/compiler/templateLiteralsSourceMap.ts] //// - -//// [templateLiteralsSourceMap.ts] -const s = `a${0}b${1}c${2}`; - - -/// [Declarations] //// - - - -//// [templateLiteralsSourceMap.d.ts] -declare const s = `a${0}b${1}c${2}`; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts new file mode 100644 index 0000000000000..c048cce9b8d89 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts @@ -0,0 +1,51 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts] //// + +//// [computedPropertyNamesOnOverloads_ES5.ts] +var methodName = "method"; +var accessorName = "accessor"; +class C { + [methodName](v: string); + [methodName](); + [methodName](v?: string) { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNamesOnOverloads_ES5.d.ts] +declare var methodName: string; +declare var accessorName: string; +declare class C { + [methodName](v: string): invalid; + [methodName](): invalid; + [methodName](v?: string): invalid; +} + +/// [Errors] //// + +computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. +computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. +computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== computedPropertyNamesOnOverloads_ES5.ts (5 errors) ==== + var methodName = "method"; + var accessorName = "accessor"; + class C { + [methodName](v: string); + ~~~~~~~~~~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [methodName](); + ~~~~~~~~~~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + [methodName](v?: string) { } + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitLateBoundAssignments2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitLateBoundAssignments2.d.ts deleted file mode 100644 index 62377b129dde4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitLateBoundAssignments2.d.ts +++ /dev/null @@ -1,276 +0,0 @@ -//// [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() {} -decl["B"] = 'foo' - -export function decl2() {} -decl2[c] = 0 - -export function decl3() {} -decl3[77] = 0 - -export function decl4() {} -decl4[num] = 0 - -export function decl5() {} -decl5["101"] = 0 - -export function decl6() {} -decl6[numStr] = 0 - -export function decl7() {} -decl7["qwe rty"] = 0 - -export function decl8() {} -decl8[withWhitespace] = 0 - -export function decl9() {} -decl9["🤪"] = 0 - -export function decl10() {} -decl10[emoji] = 0 - -export const arrow = () => {} -arrow["B"] = 'bar' - -export const arrow2 = () => {} -arrow2[c] = 100 - -export const arrow3 = () => {} -arrow3[77] = 0 - -export const arrow4 = () => {} -arrow4[num] = 0 - -export const arrow5 = () => {} -arrow5["101"] = 0 - -export const arrow6 = () => {} -arrow6[numStr] = 0 - -export const arrow7 = () => {} -arrow7["qwe rty"] = 0 - -export const arrow8 = () => {} -arrow8[withWhitespace] = 0 - -export const arrow9 = () => {} -arrow9["🤪"] = 0 - -export const arrow10 = () => {} -arrow10[emoji] = 0 - - -/// [Declarations] //// - - - -//// [declarationEmitLateBoundAssignments2.d.ts] -export declare function decl(): invalid; -export declare function decl2(): invalid; -export declare function decl3(): invalid; -export declare function decl4(): invalid; -export declare function decl5(): invalid; -export declare function decl6(): invalid; -export declare function decl7(): invalid; -export declare function decl8(): invalid; -export declare function decl9(): invalid; -export declare function decl10(): invalid; -export declare const arrow: invalid; -export declare const arrow2: invalid; -export declare const arrow3: invalid; -export declare const arrow4: invalid; -export declare const arrow5: invalid; -export declare const arrow6: invalid; -export declare const arrow7: invalid; -export declare const arrow8: invalid; -export declare const arrow9: invalid; -export declare const arrow10: invalid; - -/// [Errors] //// - -declarationEmitLateBoundAssignments2.ts(9,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(9,17): error TS9009: 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(12,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(12,17): error TS9009: 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(15,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(15,17): error TS9009: 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(18,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(18,17): error TS9009: 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(21,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(21,17): error TS9009: 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(24,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(24,17): error TS9009: 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(27,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(27,17): error TS9009: 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(30,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(30,17): error TS9009: 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(33,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(33,17): error TS9009: 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(36,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(36,17): error TS9009: 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(39,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(39,14): error TS9009: 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(42,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(45,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(45,14): error TS9009: 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(48,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(51,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(51,14): error TS9009: 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(54,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(57,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(57,14): error TS9009: 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(60,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(63,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitLateBoundAssignments2.ts(63,14): error TS9009: 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(66,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== declarationEmitLateBoundAssignments2.ts (35 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() {} - ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - decl["B"] = 'foo' - - export function decl2() {} - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - decl2[c] = 0 - - export function decl3() {} - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - decl3[77] = 0 - - export function decl4() {} - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - decl4[num] = 0 - - export function decl5() {} - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - decl5["101"] = 0 - - export function decl6() {} - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - decl6[numStr] = 0 - - export function decl7() {} - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - decl7["qwe rty"] = 0 - - export function decl8() {} - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - decl8[withWhitespace] = 0 - - export function decl9() {} - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - decl9["🤪"] = 0 - - export function decl10() {} - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - decl10[emoji] = 0 - - export const arrow = () => {} - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow["B"] = 'bar' - - export const arrow2 = () => {} - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - arrow2[c] = 100 - - export const arrow3 = () => {} - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow3[77] = 0 - - export const arrow4 = () => {} - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - arrow4[num] = 0 - - export const arrow5 = () => {} - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow5["101"] = 0 - - export const arrow6 = () => {} - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - arrow6[numStr] = 0 - - export const arrow7 = () => {} - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow7["qwe rty"] = 0 - - export const arrow8 = () => {} - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - arrow8[withWhitespace] = 0 - - export const arrow9 = () => {} - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - arrow9["🤪"] = 0 - - export const arrow10 = () => {} - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - arrow10[emoji] = 0 - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts deleted file mode 100644 index 64d2178e0285e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/enumConstantMembers.d.ts +++ /dev/null @@ -1,151 +0,0 @@ -//// [tests/cases/conformance/enums/enumConstantMembers.ts] //// - -//// [enumConstantMembers.ts] -// Constant members allow negatives, but not decimals. Also hex literals are allowed -enum E1 { - a = 1, - b -} -enum E2 { - a = - 1, - b -} -enum E3 { - a = 0.1, - b // Error because 0.1 is not a constant -} - -declare enum E4 { - a = 1, - b = -1, - c = 0.1 // Not a constant -} - -enum E5 { - a = 1 / 0, - b = 2 / 0.0, - c = 1.0 / 0.0, - d = 0.0 / 0.0, - e = NaN, - f = Infinity, - g = -Infinity -} - -const enum E6 { - a = 1 / 0, - b = 2 / 0.0, - c = 1.0 / 0.0, - d = 0.0 / 0.0, - e = NaN, - f = Infinity, - g = -Infinity -} - - -/// [Declarations] //// - - - -//// [enumConstantMembers.d.ts] -declare enum E1 { - a = 1, - b = 2 -} -declare enum E2 { - a = -1, - b = 0 -} -declare enum E3 { - a = 0.1, - b = 1.1 -} -declare enum E4 { - a = 1, - b = -1, - c = 0.1 -} -declare enum E5 { - a = Infinity, - b = Infinity, - c = Infinity, - d = NaN, - e = NaN, - f = Infinity, - g = -Infinity -} -declare const enum E6 { - a = Infinity, - b = Infinity, - c = Infinity, - d = NaN, - e = NaN, - f = Infinity, - g = -Infinity -} - -/// [Errors] //// - -enumConstantMembers.ts(32,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(33,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(34,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(35,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. -enumConstantMembers.ts(36,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. -enumConstantMembers.ts(37,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -enumConstantMembers.ts(38,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - - -==== enumConstantMembers.ts (7 errors) ==== - // Constant members allow negatives, but not decimals. Also hex literals are allowed - enum E1 { - a = 1, - b - } - enum E2 { - a = - 1, - b - } - enum E3 { - a = 0.1, - b // Error because 0.1 is not a constant - } - - declare enum E4 { - a = 1, - b = -1, - c = 0.1 // Not a constant - } - - enum E5 { - a = 1 / 0, - b = 2 / 0.0, - c = 1.0 / 0.0, - d = 0.0 / 0.0, - e = NaN, - f = Infinity, - g = -Infinity - } - - const enum E6 { - a = 1 / 0, - ~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - b = 2 / 0.0, - ~~~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - c = 1.0 / 0.0, - ~~~~~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - d = 0.0 / 0.0, - ~~~~~~~~~ -!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - e = NaN, - ~~~ -!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - f = Infinity, - ~~~~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - g = -Infinity - ~~~~~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts deleted file mode 100644 index 72871bace9952..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/expandoFunctionExpressionsWithDynamicNames.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -//// [tests/cases/compiler/expandoFunctionExpressionsWithDynamicNames.ts] //// - -//// [expandoFunctionExpressionsWithDynamicNames.ts] -// https://github.com/microsoft/TypeScript/issues/54809 - -const s = "X"; - -export const expr = () => {} -expr[s] = 0 - -export const expr2 = function () {} -expr2[s] = 0 - - -/// [Declarations] //// - - - -//// [expandoFunctionExpressionsWithDynamicNames.d.ts] -export declare const expr: invalid; -export declare const expr2: invalid; - -/// [Errors] //// - -expandoFunctionExpressionsWithDynamicNames.ts(5,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -expandoFunctionExpressionsWithDynamicNames.ts(8,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== expandoFunctionExpressionsWithDynamicNames.ts (2 errors) ==== - // https://github.com/microsoft/TypeScript/issues/54809 - - const s = "X"; - - export const expr = () => {} - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - expr[s] = 0 - - export const expr2 = function () {} - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - expr2[s] = 0 - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/indexTypeNoSubstitutionTemplateLiteral.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/indexTypeNoSubstitutionTemplateLiteral.d.ts deleted file mode 100644 index d51ae2c5321b7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/indexTypeNoSubstitutionTemplateLiteral.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -//// [tests/cases/compiler/indexTypeNoSubstitutionTemplateLiteral.ts] //// - -//// [indexTypeNoSubstitutionTemplateLiteral.ts] -function Foo() {} -Foo[`b`] = function () {}; - -type Test = keyof typeof Foo; - - - -/// [Declarations] //// - - - -//// [indexTypeNoSubstitutionTemplateLiteral.d.ts] -declare function Foo(): invalid; -type Test = keyof typeof Foo; - -/// [Errors] //// - -indexTypeNoSubstitutionTemplateLiteral.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -indexTypeNoSubstitutionTemplateLiteral.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - - -==== indexTypeNoSubstitutionTemplateLiteral.ts (2 errors) ==== - function Foo() {} - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - Foo[`b`] = function () {}; - - type Test = keyof typeof Foo; - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts deleted file mode 100644 index 84bd3297ccf3a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es2015).d.ts +++ /dev/null @@ -1,148 +0,0 @@ -//// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// - -//// [invalidTaggedTemplateEscapeSequences.ts] -function tag (str: any, ...args: any[]): any { - return str -} - -const a = tag`123` -const b = tag`123 ${100}` -const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; -const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate -const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate - -const a1 = tag`${ 100 }\0` // \0 -const a2 = tag`${ 100 }\00` // \\00 -const a3 = tag`${ 100 }\u` // \\u -const a4 = tag`${ 100 }\u0` // \\u0 -const a5 = tag`${ 100 }\u00` // \\u00 -const a6 = tag`${ 100 }\u000` // \\u000 -const a7 = tag`${ 100 }\u0000` // \u0000 -const a8 = tag`${ 100 }\u{` // \\u{ -const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF -const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 -const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} -const a12 = tag`${ 100 }\x` // \\x -const a13 = tag`${ 100 }\x0` // \\x0 -const a14 = tag`${ 100 }\x00` // \x00 - - -/// [Declarations] //// - - - -//// [invalidTaggedTemplateEscapeSequences.d.ts] -declare function tag(str: any, ...args: any[]): any; -declare const a: invalid; -declare const b: invalid; -declare const x: invalid; -declare const y = "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld"; -declare const z: invalid; -declare const a1: invalid; -declare const a2: invalid; -declare const a3: invalid; -declare const a4: invalid; -declare const a5: invalid; -declare const a6: invalid; -declare const a7: invalid; -declare const a8: invalid; -declare const a9: invalid; -declare const a10: invalid; -declare const a11: invalid; -declare const a12: invalid; -declare const a13: invalid; -declare const a14: invalid; - -/// [Errors] //// - -invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(7,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(8,15): error TS1125: Hexadecimal digit expected. -invalidTaggedTemplateEscapeSequences.ts(8,33): error TS1125: Hexadecimal digit expected. -invalidTaggedTemplateEscapeSequences.ts(8,75): error TS1125: Hexadecimal digit expected. -invalidTaggedTemplateEscapeSequences.ts(9,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(11,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(13,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(14,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(15,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(16,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(17,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(18,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(19,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(20,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(21,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(22,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(23,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== invalidTaggedTemplateEscapeSequences.ts (21 errors) ==== - function tag (str: any, ...args: any[]): any { - return str - } - - const a = tag`123` - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const b = tag`123 ${100}` - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate - -!!! error TS1125: Hexadecimal digit expected. - -!!! error TS1125: Hexadecimal digit expected. - -!!! error TS1125: Hexadecimal digit expected. - const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - const a1 = tag`${ 100 }\0` // \0 - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a2 = tag`${ 100 }\00` // \\00 - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a3 = tag`${ 100 }\u` // \\u - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a4 = tag`${ 100 }\u0` // \\u0 - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a5 = tag`${ 100 }\u00` // \\u00 - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a6 = tag`${ 100 }\u000` // \\u000 - ~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a7 = tag`${ 100 }\u0000` // \u0000 - ~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a8 = tag`${ 100 }\u{` // \\u{ - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a12 = tag`${ 100 }\x` // \\x - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a13 = tag`${ 100 }\x0` // \\x0 - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a14 = tag`${ 100 }\x00` // \x00 - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es5).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es5).d.ts deleted file mode 100644 index 84bd3297ccf3a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=es5).d.ts +++ /dev/null @@ -1,148 +0,0 @@ -//// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// - -//// [invalidTaggedTemplateEscapeSequences.ts] -function tag (str: any, ...args: any[]): any { - return str -} - -const a = tag`123` -const b = tag`123 ${100}` -const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; -const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate -const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate - -const a1 = tag`${ 100 }\0` // \0 -const a2 = tag`${ 100 }\00` // \\00 -const a3 = tag`${ 100 }\u` // \\u -const a4 = tag`${ 100 }\u0` // \\u0 -const a5 = tag`${ 100 }\u00` // \\u00 -const a6 = tag`${ 100 }\u000` // \\u000 -const a7 = tag`${ 100 }\u0000` // \u0000 -const a8 = tag`${ 100 }\u{` // \\u{ -const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF -const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 -const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} -const a12 = tag`${ 100 }\x` // \\x -const a13 = tag`${ 100 }\x0` // \\x0 -const a14 = tag`${ 100 }\x00` // \x00 - - -/// [Declarations] //// - - - -//// [invalidTaggedTemplateEscapeSequences.d.ts] -declare function tag(str: any, ...args: any[]): any; -declare const a: invalid; -declare const b: invalid; -declare const x: invalid; -declare const y = "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld"; -declare const z: invalid; -declare const a1: invalid; -declare const a2: invalid; -declare const a3: invalid; -declare const a4: invalid; -declare const a5: invalid; -declare const a6: invalid; -declare const a7: invalid; -declare const a8: invalid; -declare const a9: invalid; -declare const a10: invalid; -declare const a11: invalid; -declare const a12: invalid; -declare const a13: invalid; -declare const a14: invalid; - -/// [Errors] //// - -invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(7,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(8,15): error TS1125: Hexadecimal digit expected. -invalidTaggedTemplateEscapeSequences.ts(8,33): error TS1125: Hexadecimal digit expected. -invalidTaggedTemplateEscapeSequences.ts(8,75): error TS1125: Hexadecimal digit expected. -invalidTaggedTemplateEscapeSequences.ts(9,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(11,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(13,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(14,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(15,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(16,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(17,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(18,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(19,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(20,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(21,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(22,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(23,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== invalidTaggedTemplateEscapeSequences.ts (21 errors) ==== - function tag (str: any, ...args: any[]): any { - return str - } - - const a = tag`123` - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const b = tag`123 ${100}` - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate - -!!! error TS1125: Hexadecimal digit expected. - -!!! error TS1125: Hexadecimal digit expected. - -!!! error TS1125: Hexadecimal digit expected. - const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - const a1 = tag`${ 100 }\0` // \0 - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a2 = tag`${ 100 }\00` // \\00 - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a3 = tag`${ 100 }\u` // \\u - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a4 = tag`${ 100 }\u0` // \\u0 - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a5 = tag`${ 100 }\u00` // \\u00 - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a6 = tag`${ 100 }\u000` // \\u000 - ~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a7 = tag`${ 100 }\u0000` // \u0000 - ~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a8 = tag`${ 100 }\u{` // \\u{ - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a12 = tag`${ 100 }\x` // \\x - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a13 = tag`${ 100 }\x0` // \\x0 - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a14 = tag`${ 100 }\x00` // \x00 - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts deleted file mode 100644 index 84bd3297ccf3a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/invalidTaggedTemplateEscapeSequences(target=esnext).d.ts +++ /dev/null @@ -1,148 +0,0 @@ -//// [tests/cases/conformance/es2018/invalidTaggedTemplateEscapeSequences.ts] //// - -//// [invalidTaggedTemplateEscapeSequences.ts] -function tag (str: any, ...args: any[]): any { - return str -} - -const a = tag`123` -const b = tag`123 ${100}` -const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; -const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate -const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate - -const a1 = tag`${ 100 }\0` // \0 -const a2 = tag`${ 100 }\00` // \\00 -const a3 = tag`${ 100 }\u` // \\u -const a4 = tag`${ 100 }\u0` // \\u0 -const a5 = tag`${ 100 }\u00` // \\u00 -const a6 = tag`${ 100 }\u000` // \\u000 -const a7 = tag`${ 100 }\u0000` // \u0000 -const a8 = tag`${ 100 }\u{` // \\u{ -const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF -const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 -const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} -const a12 = tag`${ 100 }\x` // \\x -const a13 = tag`${ 100 }\x0` // \\x0 -const a14 = tag`${ 100 }\x00` // \x00 - - -/// [Declarations] //// - - - -//// [invalidTaggedTemplateEscapeSequences.d.ts] -declare function tag(str: any, ...args: any[]): any; -declare const a: invalid; -declare const b: invalid; -declare const x: invalid; -declare const y = "\\u{hello} 100 \\xtraordinary 200 wonderful 300 \\uworld"; -declare const z: invalid; -declare const a1: invalid; -declare const a2: invalid; -declare const a3: invalid; -declare const a4: invalid; -declare const a5: invalid; -declare const a6: invalid; -declare const a7: invalid; -declare const a8: invalid; -declare const a9: invalid; -declare const a10: invalid; -declare const a11: invalid; -declare const a12: invalid; -declare const a13: invalid; -declare const a14: invalid; - -/// [Errors] //// - -invalidTaggedTemplateEscapeSequences.ts(5,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(7,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(8,15): error TS1125: Hexadecimal digit expected. -invalidTaggedTemplateEscapeSequences.ts(8,33): error TS1125: Hexadecimal digit expected. -invalidTaggedTemplateEscapeSequences.ts(8,75): error TS1125: Hexadecimal digit expected. -invalidTaggedTemplateEscapeSequences.ts(9,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(11,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(13,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(14,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(15,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(16,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(17,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(18,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(19,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(20,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(21,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(22,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(23,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -invalidTaggedTemplateEscapeSequences.ts(24,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== invalidTaggedTemplateEscapeSequences.ts (21 errors) ==== - function tag (str: any, ...args: any[]): any { - return str - } - - const a = tag`123` - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const b = tag`123 ${100}` - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const x = tag`\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const y = `\u{hello} ${ 100 } \xtraordinary ${ 200 } wonderful ${ 300 } \uworld`; // should error with NoSubstitutionTemplate - -!!! error TS1125: Hexadecimal digit expected. - -!!! error TS1125: Hexadecimal digit expected. - -!!! error TS1125: Hexadecimal digit expected. - const z = tag`\u{hello} \xtraordinary wonderful \uworld` // should work with Tagged NoSubstitutionTemplate - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - const a1 = tag`${ 100 }\0` // \0 - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a2 = tag`${ 100 }\00` // \\00 - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a3 = tag`${ 100 }\u` // \\u - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a4 = tag`${ 100 }\u0` // \\u0 - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a5 = tag`${ 100 }\u00` // \\u00 - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a6 = tag`${ 100 }\u000` // \\u000 - ~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a7 = tag`${ 100 }\u0000` // \u0000 - ~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a8 = tag`${ 100 }\u{` // \\u{ - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a9 = tag`${ 100 }\u{10FFFF}` // \\u{10FFFF - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a10 = tag`${ 100 }\u{1f622` // \\u{1f622 - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a11 = tag`${ 100 }\u{1f622}` // \u{1f622} - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a12 = tag`${ 100 }\x` // \\x - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a13 = tag`${ 100 }\x0` // \\x0 - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const a14 = tag`${ 100 }\x00` // \x00 - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parseBigInt.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseBigInt.d.ts deleted file mode 100644 index 6de495f9bfb1e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parseBigInt.d.ts +++ /dev/null @@ -1,256 +0,0 @@ -//// [tests/cases/compiler/parseBigInt.ts] //// - -//// [parseBigInt.ts] -// All bases should allow "n" suffix -const bin = 0b101, binBig = 0b101n; // 5, 5n -const oct = 0o567, octBig = 0o567n; // 375, 375n -const hex = 0xC0B, hexBig = 0xC0Bn; // 3083, 3083n -const dec = 123, decBig = 123n; - -// Test literals whose values overflow a 53-bit integer -// These should be represented exactly in the emitted JS -const largeBin = 0b10101010101010101010101010101010101010101010101010101010101n; // 384307168202282325n -const largeOct = 0o123456712345671234567n; // 1505852261029722487n -const largeDec = 12345678091234567890n; -const largeHex = 0x1234567890abcdefn; // 1311768467294899695n - -// Test literals with separators -const separatedBin = 0b010_10_1n; // 21n -const separatedOct = 0o1234_567n; // 342391n -const separatedDec = 123_456_789n; -const separatedHex = 0x0_abcdefn; // 11259375n - -// Test parsing literals of different bit sizes -// to ensure that parsePseudoBigInt() allocates enough space -const zero = 0b0n; -const oneBit = 0b1n; -const twoBit = 0b11n; // 3n -const threeBit = 0b111n; // 7n -const fourBit = 0b1111n; // 15n -const fiveBit = 0b11111n; // 31n -const sixBit = 0b111111n; // 63n -const sevenBit = 0b1111111n; // 127n -const eightBit = 0b11111111n; // 255n -const nineBit = 0b111111111n; // 511n -const tenBit = 0b1111111111n; // 1023n -const elevenBit = 0b11111111111n; // 2047n -const twelveBit = 0b111111111111n; // 4095n -const thirteenBit = 0b1111111111111n; // 8191n -const fourteenBit = 0b11111111111111n; // 16383n -const fifteenBit = 0b111111111111111n; // 32767n -const sixteenBit = 0b1111111111111111n; // 65535n -const seventeenBit = 0b11111111111111111n; // 131071n - -// Test negative literals -const neg = -123n; -const negHex: -16n = -0x10n; - -// Test normalization of bigints -- all of these should succeed -const negZero: 0n = -0n; -const baseChange: 255n = 0xFFn; -const leadingZeros: 0xFFn = 0x000000FFn; - -// Plus not allowed on literals -const unaryPlus = +123n; -const unaryPlusHex = +0x123n; - -// Parsing errors -// In separate blocks because they each declare an "n" variable -{ const legacyOct = 0123n; } -{ const scientific = 1e2n; } -{ const decimal = 4.1n; } -{ const leadingDecimal = .1n; } -const emptyBinary = 0bn; // should error but infer 0n -const emptyOct = 0on; // should error but infer 0n -const emptyHex = 0xn; // should error but infer 0n -const leadingSeparator = _123n; -const trailingSeparator = 123_n; -const doubleSeparator = 123_456__789n; - -// Using literals as types -const oneTwoOrThree = (x: 1n | 2n | 3n): bigint => x ** 2n; -oneTwoOrThree(0n); oneTwoOrThree(1n); oneTwoOrThree(2n); oneTwoOrThree(3n); -oneTwoOrThree(0); oneTwoOrThree(1); oneTwoOrThree(2); oneTwoOrThree(3); - -/// [Declarations] //// - - - -//// [parseBigInt.d.ts] -declare const bin = 5, binBig = 5n; -declare const oct = 375, octBig = 375n; -declare const hex = 3083, hexBig = 3083n; -declare const dec = 123, decBig = 123n; -declare const largeBin = 384307168202282325n; -declare const largeOct = 1505852261029722487n; -declare const largeDec = 12345678091234567890n; -declare const largeHex = 1311768467294899695n; -declare const separatedBin = 21n; -declare const separatedOct = 342391n; -declare const separatedDec = 123456789n; -declare const separatedHex = 11259375n; -declare const zero = 0n; -declare const oneBit = 1n; -declare const twoBit = 3n; -declare const threeBit = 7n; -declare const fourBit = 15n; -declare const fiveBit = 31n; -declare const sixBit = 63n; -declare const sevenBit = 127n; -declare const eightBit = 255n; -declare const nineBit = 511n; -declare const tenBit = 1023n; -declare const elevenBit = 2047n; -declare const twelveBit = 4095n; -declare const thirteenBit = 8191n; -declare const fourteenBit = 16383n; -declare const fifteenBit = 32767n; -declare const sixteenBit = 65535n; -declare const seventeenBit = 131071n; -declare const neg = -123n; -declare const negHex: -16n; -declare const negZero: 0n; -declare const baseChange: 255n; -declare const leadingZeros: 0xffn; -declare const unaryPlus: number; -declare const unaryPlusHex: number; -declare const emptyBinary = 0n; -declare const emptyOct = 0n; -declare const emptyHex = 0n; -declare const leadingSeparator: invalid; -declare const trailingSeparator = 123n; -declare const doubleSeparator = 123456789n; -declare const oneTwoOrThree: (x: 1n | 2n | 3n) => bigint; - -/// [Errors] //// - -parseBigInt.ts(51,20): error TS2736: Operator '+' cannot be applied to type 'bigint'. -parseBigInt.ts(52,23): error TS2736: Operator '+' cannot be applied to type 'bigint'. -parseBigInt.ts(56,21): error TS1121: Octal literals are not allowed. Use the syntax '0o123'. -parseBigInt.ts(56,25): error TS1005: ',' expected. -parseBigInt.ts(57,22): error TS1352: A bigint literal cannot use exponential notation. -parseBigInt.ts(58,19): error TS1353: A bigint literal must be an integer. -parseBigInt.ts(59,26): error TS1353: A bigint literal must be an integer. -parseBigInt.ts(60,23): error TS1177: Binary digit expected. -parseBigInt.ts(61,20): error TS1178: Octal digit expected. -parseBigInt.ts(62,20): error TS1125: Hexadecimal digit expected. -parseBigInt.ts(63,26): error TS2304: Cannot find name '_123n'. -parseBigInt.ts(63,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parseBigInt.ts(64,30): error TS6188: Numeric separators are not allowed here. -parseBigInt.ts(65,33): error TS6189: Multiple consecutive numeric separators are not permitted. -parseBigInt.ts(69,15): error TS2345: Argument of type '0n' is not assignable to parameter of type '1n | 3n | 2n'. -parseBigInt.ts(70,15): error TS2345: Argument of type '0' is not assignable to parameter of type '1n | 3n | 2n'. -parseBigInt.ts(70,34): error TS2345: Argument of type '1' is not assignable to parameter of type '1n | 3n | 2n'. -parseBigInt.ts(70,53): error TS2345: Argument of type '2' is not assignable to parameter of type '1n | 3n | 2n'. -parseBigInt.ts(70,72): error TS2345: Argument of type '3' is not assignable to parameter of type '1n | 3n | 2n'. - - -==== parseBigInt.ts (19 errors) ==== - // All bases should allow "n" suffix - const bin = 0b101, binBig = 0b101n; // 5, 5n - const oct = 0o567, octBig = 0o567n; // 375, 375n - const hex = 0xC0B, hexBig = 0xC0Bn; // 3083, 3083n - const dec = 123, decBig = 123n; - - // Test literals whose values overflow a 53-bit integer - // These should be represented exactly in the emitted JS - const largeBin = 0b10101010101010101010101010101010101010101010101010101010101n; // 384307168202282325n - const largeOct = 0o123456712345671234567n; // 1505852261029722487n - const largeDec = 12345678091234567890n; - const largeHex = 0x1234567890abcdefn; // 1311768467294899695n - - // Test literals with separators - const separatedBin = 0b010_10_1n; // 21n - const separatedOct = 0o1234_567n; // 342391n - const separatedDec = 123_456_789n; - const separatedHex = 0x0_abcdefn; // 11259375n - - // Test parsing literals of different bit sizes - // to ensure that parsePseudoBigInt() allocates enough space - const zero = 0b0n; - const oneBit = 0b1n; - const twoBit = 0b11n; // 3n - const threeBit = 0b111n; // 7n - const fourBit = 0b1111n; // 15n - const fiveBit = 0b11111n; // 31n - const sixBit = 0b111111n; // 63n - const sevenBit = 0b1111111n; // 127n - const eightBit = 0b11111111n; // 255n - const nineBit = 0b111111111n; // 511n - const tenBit = 0b1111111111n; // 1023n - const elevenBit = 0b11111111111n; // 2047n - const twelveBit = 0b111111111111n; // 4095n - const thirteenBit = 0b1111111111111n; // 8191n - const fourteenBit = 0b11111111111111n; // 16383n - const fifteenBit = 0b111111111111111n; // 32767n - const sixteenBit = 0b1111111111111111n; // 65535n - const seventeenBit = 0b11111111111111111n; // 131071n - - // Test negative literals - const neg = -123n; - const negHex: -16n = -0x10n; - - // Test normalization of bigints -- all of these should succeed - const negZero: 0n = -0n; - const baseChange: 255n = 0xFFn; - const leadingZeros: 0xFFn = 0x000000FFn; - - // Plus not allowed on literals - const unaryPlus = +123n; - ~~~~ -!!! error TS2736: Operator '+' cannot be applied to type 'bigint'. - const unaryPlusHex = +0x123n; - ~~~~~~ -!!! error TS2736: Operator '+' cannot be applied to type 'bigint'. - - // Parsing errors - // In separate blocks because they each declare an "n" variable - { const legacyOct = 0123n; } - ~~~~ -!!! error TS1121: Octal literals are not allowed. Use the syntax '0o123'. - ~ -!!! error TS1005: ',' expected. - { const scientific = 1e2n; } - ~~~~ -!!! error TS1352: A bigint literal cannot use exponential notation. - { const decimal = 4.1n; } - ~~~~ -!!! error TS1353: A bigint literal must be an integer. - { const leadingDecimal = .1n; } - ~~~ -!!! error TS1353: A bigint literal must be an integer. - const emptyBinary = 0bn; // should error but infer 0n - -!!! error TS1177: Binary digit expected. - const emptyOct = 0on; // should error but infer 0n - -!!! error TS1178: Octal digit expected. - const emptyHex = 0xn; // should error but infer 0n - -!!! error TS1125: Hexadecimal digit expected. - const leadingSeparator = _123n; - ~~~~~ -!!! error TS2304: Cannot find name '_123n'. - ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - const trailingSeparator = 123_n; - ~ -!!! error TS6188: Numeric separators are not allowed here. - const doubleSeparator = 123_456__789n; - ~ -!!! error TS6189: Multiple consecutive numeric separators are not permitted. - - // Using literals as types - const oneTwoOrThree = (x: 1n | 2n | 3n): bigint => x ** 2n; - oneTwoOrThree(0n); oneTwoOrThree(1n); oneTwoOrThree(2n); oneTwoOrThree(3n); - ~~ -!!! error TS2345: Argument of type '0n' is not assignable to parameter of type '1n | 3n | 2n'. - oneTwoOrThree(0); oneTwoOrThree(1); oneTwoOrThree(2); oneTwoOrThree(3); - ~ -!!! error TS2345: Argument of type '0' is not assignable to parameter of type '1n | 3n | 2n'. - ~ -!!! error TS2345: Argument of type '1' is not assignable to parameter of type '1n | 3n | 2n'. - ~ -!!! error TS2345: Argument of type '2' is not assignable to parameter of type '1n | 3n | 2n'. - ~ -!!! error TS2345: Argument of type '3' is not assignable to parameter of type '1n | 3n | 2n'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts new file mode 100644 index 0000000000000..999eb03262bca --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts @@ -0,0 +1,36 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts] //// + +//// [parserES5SymbolProperty4.ts] +declare class C { + [Symbol.isRegExp]: string; +} + +/// [Declarations] //// + + + +//// [parserES5SymbolProperty4.d.ts] +declare class C { + [Symbol.isRegExp]: string; +} + +/// [Errors] //// + +parserES5SymbolProperty4.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserES5SymbolProperty4.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserES5SymbolProperty4.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +parserES5SymbolProperty4.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. + + +==== parserES5SymbolProperty4.ts (4 errors) ==== + declare class C { + [Symbol.isRegExp]: string; + ~~~~~~~~~~~~~~~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ +!!! error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts new file mode 100644 index 0000000000000..516618b30e4a8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts] //// + +//// [parserES5SymbolProperty8.ts] +var x: { + [Symbol.toPrimitive](): string +} + +/// [Declarations] //// + + + +//// [parserES5SymbolProperty8.d.ts] +declare var x: {}; + +/// [Errors] //// + +parserES5SymbolProperty8.ts(2,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. +parserES5SymbolProperty8.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + +==== parserES5SymbolProperty8.ts (2 errors) ==== + var x: { + [Symbol.toPrimitive](): 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 TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralsSourceMap.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralsSourceMap.d.ts deleted file mode 100644 index 5968e32cf7e8c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/templateLiteralsSourceMap.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -//// [tests/cases/compiler/templateLiteralsSourceMap.ts] //// - -//// [templateLiteralsSourceMap.ts] -const s = `a${0}b${1}c${2}`; - - -/// [Declarations] //// - - - -//// [templateLiteralsSourceMap.d.ts] -declare const s = "a0b1c2"; 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/bigintIndex.ts b/tests/cases/compiler/bigintIndex.ts index a959eac590f05..86a23489d66f1 100644 --- a/tests/cases/compiler/bigintIndex.ts +++ b/tests/cases/compiler/bigintIndex.ts @@ -1,4 +1,5 @@ // @target: es2020 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @filename: a.ts interface BigIntIndex { diff --git a/tests/cases/compiler/complicatedPrivacy.ts b/tests/cases/compiler/complicatedPrivacy.ts index 6fe144d237c80..dc60d06ec2610 100644 --- a/tests/cases/compiler/complicatedPrivacy.ts +++ b/tests/cases/compiler/complicatedPrivacy.ts @@ -1,4 +1,6 @@ // @target: es5 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC + 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 index 1bedd9dc7cab4..1166392067f2d 100644 --- a/tests/cases/compiler/computedPropertiesNarrowed.ts +++ b/tests/cases/compiler/computedPropertiesNarrowed.ts @@ -1,6 +1,7 @@ // @target: es2015 // @isolatedDeclarations: true // @declaration: true +// @isolatedDeclarationDiffReason: 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; diff --git a/tests/cases/compiler/constEnumErrors.ts b/tests/cases/compiler/constEnumErrors.ts index ca2289ef3bf33..1d8529330ace9 100644 --- a/tests/cases/compiler/constEnumErrors.ts +++ b/tests/cases/compiler/constEnumErrors.ts @@ -1,4 +1,5 @@ // @lib: es5 +// @isolatedDeclarationDiffReason: TSC detects forward ref which is not allowed and so enum value is undefined, which is also the way we detect isolated declaration errors. const enum E { A } diff --git a/tests/cases/compiler/constEnums.ts b/tests/cases/compiler/constEnums.ts index 00d5b2d6b72c3..cb0e83e6413d1 100644 --- a/tests/cases/compiler/constEnums.ts +++ b/tests/cases/compiler/constEnums.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: TODO Add support for nested namespace access for enums const enum Enum1 { A0 = 100, } diff --git a/tests/cases/compiler/contextualReturnTypeOfIIFE2.ts b/tests/cases/compiler/contextualReturnTypeOfIIFE2.ts index 18416655bb9e5..6e8a613658877 100644 --- a/tests/cases/compiler/contextualReturnTypeOfIIFE2.ts +++ b/tests/cases/compiler/contextualReturnTypeOfIIFE2.ts @@ -1,5 +1,6 @@ // @lib: esnext // @noImplicitAny: true +// @isolatedDeclarationDiffReason: TODO Nested access to expando function. declare namespace app { function foo(): void; 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/declarationEmitCommonJsModuleReferencedType.ts b/tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts index 5207d655037fd..abb18b39d3ae7 100644 --- a/tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts +++ b/tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed // @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/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/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/declarationEmitForGlobalishSpecifierSymlink.ts b/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts index b42d679b521e8..032322dcc4048 100644 --- a/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts +++ b/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts @@ -1,5 +1,6 @@ // @useCaseSensitiveFilenames: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed // @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..f861dcdb61558 100644 --- a/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts +++ b/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts @@ -1,5 +1,6 @@ // @useCaseSensitiveFilenames: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed // @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..9009efda5f106 100644 --- a/tests/cases/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts +++ b/tests/cases/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts @@ -1,4 +1,6 @@ // @declaration: true +// @isolatedDeclarationDiffReason: 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/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/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/declarationEmitObjectAssignedDefaultExport.ts b/tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts index e83dffc3b21d2..bac84ce522045 100644 --- a/tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts +++ b/tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts @@ -1,6 +1,7 @@ // @target: es6 // @module: commonjs // @declaration: true +// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed // @filename: node_modules/styled-components/node_modules/hoist-non-react-statics/index.d.ts interface Statics { "$$whatever": string; diff --git a/tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts b/tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts index a75d82d0ddd77..1c4d534eeeca6 100644 --- a/tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts +++ b/tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationFixedDiffReason: TODO: is not auto fixed, should be fixed. // @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..338b8be8561fc 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: TODO File is not auto-fixed 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..23b939690b9d4 100644 --- a/tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts +++ b/tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed // @filename: monorepo/pkg1/dist/index.d.ts export * from './types'; // @filename: monorepo/pkg1/dist/types.d.ts diff --git a/tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts b/tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts index 5839eda9e19d9..850b3421709b0 100644 --- a/tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts +++ b/tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed // @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/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/decoratorsOnComputedProperties.ts b/tests/cases/compiler/decoratorsOnComputedProperties.ts index cb9cfe5f9977e..2e8104041f745 100644 --- a/tests/cases/compiler/decoratorsOnComputedProperties.ts +++ b/tests/cases/compiler/decoratorsOnComputedProperties.ts @@ -1,5 +1,6 @@ // @target: es6 // @experimentalDecorators: true +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC function x(o: object, k: PropertyKey) { } let i = 0; function foo(): string { return ++i + ""; } diff --git a/tests/cases/compiler/forwardRefInEnum.ts b/tests/cases/compiler/forwardRefInEnum.ts index 97bc1819d7b38..7c54a6331e90c 100644 --- a/tests/cases/compiler/forwardRefInEnum.ts +++ b/tests/cases/compiler/forwardRefInEnum.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: TSC detects forward ref which is not allowed and so enum value is undefined, which is also the way we detect isolated declaration errors. enum E1 { // illegal case // forward reference to the element of the same enum diff --git a/tests/cases/compiler/giant.ts b/tests/cases/compiler/giant.ts index a7618cd56e2db..45c2d3f8bc2f6 100644 --- a/tests/cases/compiler/giant.ts +++ b/tests/cases/compiler/giant.ts @@ -1,5 +1,6 @@ //@module: amd // @declaration: true +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC /* Prefixes diff --git a/tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts b/tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts index 47d818065a1dc..2f0b82a252c32 100644 --- a/tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts +++ b/tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface I { // Used to be indexer, now it is a computed property [x]: string; diff --git a/tests/cases/compiler/indexWithoutParamType2.ts b/tests/cases/compiler/indexWithoutParamType2.ts index 0def5dc06a911..c48f197c94ffa 100644 --- a/tests/cases/compiler/indexWithoutParamType2.ts +++ b/tests/cases/compiler/indexWithoutParamType2.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { // Used to be indexer, now it is a computed property [x]: string diff --git a/tests/cases/compiler/intTypeCheck.ts b/tests/cases/compiler/intTypeCheck.ts index a156309786353..e17aa854c7e57 100644 --- a/tests/cases/compiler/intTypeCheck.ts +++ b/tests/cases/compiler/intTypeCheck.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface i1 { //Property Signatures p; 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/moduleResolutionWithSuffixes_one_externalTSModule.ts b/tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts index 7e5afac88ee0f..01b73ce0a6aeb 100644 --- a/tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts +++ b/tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts @@ -1,4 +1,5 @@ // moduleSuffixes has one entry and there's a matching package with TS files. +// @isolatedDeclarationDiffReason: TODO: Files in node modules are not fixed. Should we? // @fullEmitPaths: true // @filename: /tsconfig.json { diff --git a/tests/cases/compiler/nodeModuleReexportFromDottedPath.ts b/tests/cases/compiler/nodeModuleReexportFromDottedPath.ts index 022b0262a8c8c..890ccbc5eeaa0 100644 --- a/tests/cases/compiler/nodeModuleReexportFromDottedPath.ts +++ b/tests/cases/compiler/nodeModuleReexportFromDottedPath.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed // @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/overloadsWithComputedNames.ts b/tests/cases/compiler/overloadsWithComputedNames.ts index 810beff88874c..ff2b3d5e57639 100644 --- a/tests/cases/compiler/overloadsWithComputedNames.ts +++ b/tests/cases/compiler/overloadsWithComputedNames.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // https://github.com/microsoft/TypeScript/issues/52329 class Person { ["B"](a: number): string; diff --git a/tests/cases/compiler/propertyAssignment.ts b/tests/cases/compiler/propertyAssignment.ts index 0c8351fb05d2f..3ebddff41838e 100644 --- a/tests/cases/compiler/propertyAssignment.ts +++ b/tests/cases/compiler/propertyAssignment.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Syntactically invalid. var foo1: { new ():any; } diff --git a/tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts b/tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts index 4ff61e9636031..3549b07c618b7 100644 --- a/tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts +++ b/tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts @@ -1,6 +1,7 @@ // @declaration: true // @useCaseSensitiveFileNames: false // @noImplicitReferences: true +// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed // @filename: Folder/monorepo/package-a/index.d.ts export declare const styles: import("styled-components").InterpolationValue[]; 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/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/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/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/compiler/typeUsedAsTypeLiteralIndex.ts b/tests/cases/compiler/typeUsedAsTypeLiteralIndex.ts index 908491330e206..3626c45634d12 100644 --- a/tests/cases/compiler/typeUsedAsTypeLiteralIndex.ts +++ b/tests/cases/compiler/typeUsedAsTypeLiteralIndex.ts @@ -1,4 +1,5 @@ // @target: esnext +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC type K = number | string; type T = { diff --git a/tests/cases/conformance/Symbols/ES5SymbolProperty1.ts b/tests/cases/conformance/Symbols/ES5SymbolProperty1.ts index 8a9276416c5e4..9128979e905d0 100644 --- a/tests/cases/conformance/Symbols/ES5SymbolProperty1.ts +++ b/tests/cases/conformance/Symbols/ES5SymbolProperty1.ts @@ -1,4 +1,5 @@ //@target: ES5 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface SymbolConstructor { foo: string; } diff --git a/tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts b/tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts index 64e62a2719ef0..4cc015a22f86e 100644 --- a/tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts +++ b/tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts @@ -1,3 +1,4 @@ // @target: es2017 // @noEmitHelpers: true +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v = { [await]: foo } \ No newline at end of file diff --git a/tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts b/tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts index 27db170b08039..b443fe619194f 100644 --- a/tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts +++ b/tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts @@ -1,4 +1,5 @@ // @target: ES5 // @lib: es5,es2015.promise // @noEmitHelpers: true +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v = { [await]: foo } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts index 764b0f3fb8a79..128db35bce16a 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts @@ -1,3 +1,4 @@ // @target: ES6 // @noEmitHelpers: true +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v = { [await]: foo } \ No newline at end of file diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts index 71096e7b8f313..0dc092393bb60 100644 --- a/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts @@ -1,5 +1,6 @@ // @target: es5 // @useDefineForClassFields: true,false +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC const FunctionPropertyNames = { name: 'name', 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/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/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/typesVersionsDeclarationEmit.multiFile.ts b/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts index 01adfac0480b9..198f47047cbd3 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: TODO File is not auto-fixed // @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..7f0a7e7fa30d7 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: TODO File is not auto-fixed // @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..1f11f03d4e647 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: TODO File is not auto-fixed // @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/symbolDeclarationEmit12.ts b/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts index 8422b1ec016de..80f6bc43bd006 100644 --- a/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts +++ b/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts @@ -1,5 +1,7 @@ //@target: ES6 //@declaration: true +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC +//@isolatedDeclarationFixedDiffReason: Can't fix computed properties module M { interface I { } export class C { diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty1.ts b/tests/cases/conformance/es6/Symbols/symbolProperty1.ts index 0e008511be3fe..b8c11d1eaed4f 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty1.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty1.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var s: symbol; var x = { [s]: 0, diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty2.ts b/tests/cases/conformance/es6/Symbols/symbolProperty2.ts index 44a2ba1387464..e9cb71d98139a 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty2.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty2.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var s = Symbol(); var x = { [s]: 0, diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty3.ts b/tests/cases/conformance/es6/Symbols/symbolProperty3.ts index 027e93a86adfb..5b4a1586269e0 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty3.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty3.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var s = Symbol; var x = { [s]: 0, diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty52.ts b/tests/cases/conformance/es6/Symbols/symbolProperty52.ts index b14838a6914b4..30bfb844b22cb 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty52.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty52.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var obj = { [Symbol.nonsense]: 0 }; diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty53.ts b/tests/cases/conformance/es6/Symbols/symbolProperty53.ts index c58b6e885afcc..bd03fd5fb3eb2 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty53.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty53.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var obj = { [Symbol.for]: 0 }; diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty54.ts b/tests/cases/conformance/es6/Symbols/symbolProperty54.ts index b3eab2a54a154..6853d64020344 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty54.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty54.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var obj = { [Symbol.prototype]: 0 }; \ No newline at end of file diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty58.ts b/tests/cases/conformance/es6/Symbols/symbolProperty58.ts index 48cc6eb90f32c..f4d18e76e2443 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty58.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty58.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface SymbolConstructor { foo: string; } diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty59.ts b/tests/cases/conformance/es6/Symbols/symbolProperty59.ts index bdea9dab62c28..a63831a80232e 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty59.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty59.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface I { [Symbol.keyFor]: string; } \ No newline at end of file diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts index 365ca67c1a39b..d7cb1544e2d26 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts @@ -1,4 +1,5 @@ // @target: es5 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var s: string; var n: number; var a: any; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts index e046899d3310d..91286f90d9d8b 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts @@ -1,4 +1,5 @@ // @target: es6 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var s: string; var n: number; var a: any; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES5.ts index 01204a1e61949..826700ed18f30 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES5.ts @@ -1,4 +1,5 @@ // @target: es5 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var s: string; var n: number; var a: any; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES6.ts index c42e6e97177e5..b6b4c6b39cd24 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES6.ts @@ -1,4 +1,5 @@ // @target: es6 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var s: string; var n: number; var a: any; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES5.ts index 7c2517cd5145a..c8400f36d86d5 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES5.ts @@ -1,4 +1,5 @@ // @target: es5 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var methodName = "method"; var accessorName = "accessor"; class C { diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES6.ts index c63ec81d4e64c..d8885d788593a 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES6.ts @@ -1,4 +1,5 @@ // @target: es6 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var methodName = "method"; var accessorName = "accessor"; class C { diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES5.ts index 17089b7244f66..10faebdb41e75 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES5.ts @@ -1,4 +1,5 @@ // @target: es5 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var s: string; var n: number; var a: any; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES6.ts index a6d4e17c44a6b..67bfc47d38aab 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES6.ts @@ -1,4 +1,5 @@ // @target: es6 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var s: string; var n: number; var a: any; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES5.ts index e9d7d6ffab497..7811a783d358c 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES5.ts @@ -1,4 +1,5 @@ // @target: es5 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var b: boolean; var v = { [b]: 0, diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES6.ts index 590f819c4e4cc..9b348ce58d777 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES6.ts @@ -1,4 +1,5 @@ // @target: es6 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var b: boolean; var v = { [b]: 0, diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES5.ts index 0521873d70ca0..48edc0d6fcf02 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES5.ts @@ -1,4 +1,5 @@ // @target: es5 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var p1: number | string; var p2: number | number[]; var p3: string | boolean; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES6.ts index b21b76b03f2cf..5456d747c63c3 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES6.ts @@ -1,4 +1,5 @@ // @target: es6 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var p1: number | string; var p2: number | number[]; var p3: string | boolean; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts index a025a074e3129..19ee4452d7c68 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts @@ -1,4 +1,5 @@ // @target: es5 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var methodName = "method"; var accessorName = "accessor"; class C { diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts index 4d6fe09b80a00..0760d3277200e 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts @@ -1,4 +1,5 @@ // @target: es6 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var methodName = "method"; var accessorName = "accessor"; class C { diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts index 4cd9047581f4d..c42924f353c87 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts @@ -1,4 +1,5 @@ // @target: es6 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { static staticProp = 10; get [C.staticProp]() { diff --git a/tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts b/tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts index 4b65f204babb1..2676ee9baa3c6 100644 --- a/tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts +++ b/tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts @@ -1 +1,3 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v = { [yield]: foo } \ No newline at end of file diff --git a/tests/cases/conformance/internalModules/moduleDeclarations/reExportAliasMakesInstantiated.ts b/tests/cases/conformance/internalModules/moduleDeclarations/reExportAliasMakesInstantiated.ts index 8d62691b2bc86..2b6596c1f8503 100644 --- a/tests/cases/conformance/internalModules/moduleDeclarations/reExportAliasMakesInstantiated.ts +++ b/tests/cases/conformance/internalModules/moduleDeclarations/reExportAliasMakesInstantiated.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: GH#55571 declare module pack1 { const test1: string; export { test1 }; diff --git a/tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts b/tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts index 656465829e6d9..40439188da3ed 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: TODO File is not auto-fixed + 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/nodeModulesExportsBlocksSpecifierResolution.ts b/tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts index ee6587b5ea073..f70a221c194bd 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: TODO Seems to be missing enough semantic info to fix // @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..0841aab619acd 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: TODO Seems to be missing enough semantic info to fix // @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..3a3f6de5af23e 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: TODO Seems to be missing enough semantic info to fix // @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..e27e60e98a49b 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: TODO Seems to be missing enough semantic info to fix // @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..b369ff020274d 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: TODO Seems to be missing enough semantic info to fix // @filename: index.ts // esm format file import { Thing } from "inner/other"; diff --git a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts index 8316cdfbc0e3e..3a1ff1b3e16c5 100644 --- a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts +++ b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts @@ -1,4 +1,5 @@ //@target: ES5 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC declare class C { [e]: number } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts index 777c44e01852a..b4fb51875563b 100644 --- a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts +++ b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts @@ -1,4 +1,5 @@ //@target: ES5 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { [e] = 1 } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts index 2f37b0f2cadec..0a02a9bb2e8a8 100644 --- a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts +++ b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts @@ -1,2 +1,3 @@ //@target: ES5 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v = { [e]: 1 }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts index 0507207141078..544800b9f41df 100644 --- a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts +++ b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts @@ -1,4 +1,5 @@ //@target: ES5 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface I { [e]: number } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts index 48abbd6fe9523..43016f76e7926 100644 --- a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts +++ b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts @@ -1,2 +1,3 @@ //@target: ES5 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v: { [e]: number }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts index de00d6f82455a..9879d507b4556 100644 --- a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts +++ b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts @@ -1,4 +1,5 @@ //@target: ES5 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { [e]: Type } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts b/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts index 1c78f24a213b3..65654dbbe7d5f 100644 --- a/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts +++ b/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts @@ -1,3 +1,4 @@ +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface I { [p]; // Used to be indexer, now it is a computed property [p1: string]; diff --git a/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts b/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts index e77c8fe9bb08d..77100fd872c18 100644 --- a/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts +++ b/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface I { [a] // Used to be indexer, now it is a computed property } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts b/tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts index 7bfe896e7c4d0..4f74b2cee5218 100644 --- a/tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts +++ b/tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts @@ -1,4 +1,5 @@ // @skipDefaultLibCheck: false +// @isolatedDeclarationDiffReason: Symbol merges with global eval and is not written to declarations. "use strict"; function eval() { } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty1.ts b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty1.ts index 64ca01bba6c80..337714a37ea95 100644 --- a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty1.ts +++ b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty1.ts @@ -1,4 +1,5 @@ //@target: ES5 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface I { [Symbol.iterator]: string; } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty2.ts b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty2.ts index cc606c2e6a3d5..145aa1047b9be 100644 --- a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty2.ts +++ b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty2.ts @@ -1,4 +1,5 @@ //@target: ES5 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface I { [Symbol.unscopables](): string; } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty3.ts b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty3.ts index 978d4ef95f018..978683bbe9f58 100644 --- a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty3.ts +++ b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty3.ts @@ -1,4 +1,5 @@ //@target: ES5 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC declare class C { [Symbol.unscopables](): string; } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts index 7f16672ebd254..6b50a6758b249 100644 --- a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts +++ b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts @@ -1,4 +1,5 @@ //@target: ES5 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC declare class C { [Symbol.isRegExp]: string; } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty5.ts b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty5.ts index fb7f00d769420..ef4197a94222d 100644 --- a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty5.ts +++ b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty5.ts @@ -1,4 +1,5 @@ //@target: ES5 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { [Symbol.isRegExp]: string; } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty6.ts b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty6.ts index 3fc8e6f897977..35b86c3ee2f0e 100644 --- a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty6.ts +++ b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty6.ts @@ -1,4 +1,5 @@ //@target: ES5 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { [Symbol.toStringTag]: string = ""; } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty7.ts b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty7.ts index a27636388c074..d216ba95f86cf 100644 --- a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty7.ts +++ b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty7.ts @@ -1,4 +1,5 @@ //@target: ES5 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { [Symbol.toStringTag](): void { } } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts index 78e5738f7da8e..5f1167de7fe75 100644 --- a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts +++ b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts @@ -1,4 +1,5 @@ //@target: ES5 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var x: { [Symbol.toPrimitive](): string } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty9.ts b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty9.ts index 7838df4d8fcbf..dc6f8b364d92d 100644 --- a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty9.ts +++ b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty9.ts @@ -1,4 +1,5 @@ //@target: ES5 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var x: { [Symbol.toPrimitive]: string } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName1.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName1.ts index e6fbccb8e1f66..47e13ca871f13 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName1.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName1.ts @@ -1,2 +1,3 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v = { [e] }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts index 6f87e04e3f569..49c3f97e11880 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { [e] = 1 } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts index 809e258d2d484..c9658123ffb53 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts @@ -1,2 +1,3 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v: { [e]: number }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts index 3d9fb800d70f5..c480df02cf280 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts @@ -1,2 +1,3 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v: { [e](): number }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts index ba0a7b84b904b..6fa26e939512f 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts @@ -1,2 +1,3 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v: { [e: number]: string; [e]: number }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts index dd05fcac48287..a09e98727b0ad 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts @@ -1,2 +1,3 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v: { [e]?(): number }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts index f190dadb92c9e..460c485a8ccc4 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts @@ -1,2 +1,3 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v: { [e]? }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts index 4efacefce9b8f..cd0005248ab76 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts @@ -1,2 +1,3 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v = { [e]: 1 }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts index 148f07becc15b..b105256dc8f59 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface I { [e](): number } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts index f9ec2669ae389..0fc2f118c282a 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface I { [e]: number } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts index 237a4f4e12ccf..c4e40438a9d87 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC declare class C { [e]: number } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts index 633931ad3689f..161a0d4b51658 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC declare class C { get [e](): number } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts index 8ff0f753e1fa5..0acb66a337990 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { set [e](v) { } } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts index 3bf29e66baeb0..c8c4515865052 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { // No ASI [e] = 0 diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts index d52b7d43cfc94..8f917c77bf202 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { // No ASI [e]: number = 0 diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts index 2cae79f193465..a4bc0459ec9ee 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { [e]: number = 0; [e2]: number diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts index c3e42731ab99f..7961dc3493836 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { // yes ASI [e] = id++ diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts index 30e511fa91b85..4f12dca90ee1d 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { // yes ASI [e]: number diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts index f1a50fe108d67..76d4c26e15317 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC declare class C { [e](): number } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts index 2ca7ac84af70d..472621d53b6ee 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { // No ASI [e] = 0 diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts index 62f5e3404533a..900e20cc9865a 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { [public ]: string; } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts index 3af8e29c66670..1eac443f2ef57 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v = { [public]: 0 }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts index aaf4131d1580f..f04772c9b62e8 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts @@ -1,2 +1,3 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v = { [e]: 1, [e + e]: 2 }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts index 0c60d35fb909a..a9fe9f135e51e 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts @@ -1,4 +1,5 @@ //@target: ES6 +//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { [e]: Type } \ No newline at end of file diff --git a/tests/cases/conformance/salsa/typeFromPropertyAssignment29.ts b/tests/cases/conformance/salsa/typeFromPropertyAssignment29.ts index 1882731c8f106..dae7106da0616 100644 --- a/tests/cases/conformance/salsa/typeFromPropertyAssignment29.ts +++ b/tests/cases/conformance/salsa/typeFromPropertyAssignment29.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Function declarations 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..0bedb337e65af 100644 --- a/tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts +++ b/tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts @@ -1,4 +1,7 @@ // @strict: true +// @isolatedDeclarationFixedDiffReason: TODO Need to fix DTE looking recursively for assigned members. +// @isolatedDeclarationDiffReason: TODO Need to fix DTE looking recursively for assigned members. + function f(b: boolean) { function d() { } 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/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; From e45e9b8ebf0a83073cf4e26fe07f03c357d469fb Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 20 Nov 2023 12:30:09 +0000 Subject: [PATCH 138/224] Ensure we mark tests that have reference declaration errors. Signed-off-by: Titian Cernicova-Dragomir --- .../declarations/transform-project.ts | 1 - src/harness/isolatedDeclarationFixer.ts | 117 +++++++++--------- src/testRunner/compilerRunner.ts | 24 ++-- 3 files changed, 75 insertions(+), 67 deletions(-) diff --git a/src/compiler/transformers/declarations/transform-project.ts b/src/compiler/transformers/declarations/transform-project.ts index 488406039e8b4..a3c47ab54d9a8 100644 --- a/src/compiler/transformers/declarations/transform-project.ts +++ b/src/compiler/transformers/declarations/transform-project.ts @@ -104,7 +104,6 @@ export function transpileDeclaration(sourceFile: SourceFile, emitHost: IsolatedE if (sourceMap) { if (!writer.isAtStartOfLine()) writer.writeLine(); writer.writeComment(sourceMap.sourceMappingURL); - writer.writeLine(); } return { diff --git a/src/harness/isolatedDeclarationFixer.ts b/src/harness/isolatedDeclarationFixer.ts index 0fa2035b80b82..4983db4c34365 100644 --- a/src/harness/isolatedDeclarationFixer.ts +++ b/src/harness/isolatedDeclarationFixer.ts @@ -3,11 +3,11 @@ import * as vfs from "./_namespaces/vfs"; import * as fake from "./fakesHosts"; export const isolatedDeclarationsErrors = new Set([ - 9007, - 9008, - 9009, - 9010, - 9011, + ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.code, + ts.Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit.code, + 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.code, + ts.Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode.code, + ts.Diagnostics.To_use_heritage_clauses_in_class_expressions_with_isolatedDeclarations_you_need_explicit_type_annotation_on_the_variable.code, ]); export function fixTestFiles( @@ -67,67 +67,70 @@ export function fixProjectInternal( host.getCurrentDirectory(), ); const service = ts.createLanguageService(host, documentRegistry); - const program = service.getProgram()!; - - const files = program.getSourceFiles(); - if (files.some(f => f.parseDiagnostics.length !== 0)) { - return false; - } - const defaultFormatOptions = ts.getDefaultFormatCodeSettings(); + 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; + for (const file of files) { + if (file.fileName.endsWith(".d.ts")) continue; - let diagnostics = getIsolatedDeclarationsErrors(file.fileName); + let diagnostics = getIsolatedDeclarationsErrors(file.fileName); - if (diagnostics.length === 0) continue; - 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 false; - } - const fixes = service.getCodeFixesAtPosition(file.fileName, diag.start, diag.start + diag.length, [diag.code], defaultFormatOptions, userPreferences); - if (fixes.length === 0) { - skipCount++; - continue; - } - const fix = fixes[0]; - const changedFiles: { - file: string; - old: VersionedScriptSnapshot; - new: VersionedScriptSnapshot; - }[] = []; + if (diagnostics.length === 0) continue; + 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); + if (fixes.length === 0) { + skipCount++; + continue; + } + const fix = fixes[0]; + const changedFiles: { + file: string; + old: VersionedScriptSnapshot; + new: VersionedScriptSnapshot; + }[] = []; - for (const fileChanges of fix.changes) { - const snapshot = snapShotRegistry.getSnapshot(fileChanges.fileName)!; - const newSnapShot = applyChangesSnapShot(snapshot, fileChanges.textChanges); - snapShotRegistry.setSnapshot(fileChanges.fileName, newSnapShot); - changedFiles.push({ - file: fileChanges.fileName, - new: newSnapShot, - old: snapshot, - }); + for (const fileChanges of fix.changes) { + const snapshot = snapShotRegistry.getSnapshot(fileChanges.fileName)!; + const newSnapShot = applyChangesSnapShot(snapshot, fileChanges.textChanges); + snapShotRegistry.setSnapshot(fileChanges.fileName, newSnapShot); + changedFiles.push({ + file: fileChanges.fileName, + new: newSnapShot, + old: snapshot, + }); + } + lastFixedDiagnostic = diag; + diagnostics = getIsolatedDeclarationsErrors(file.fileName); } - lastFixedDiagnostic = diag; - diagnostics = getIsolatedDeclarationsErrors(file.fileName); } + return { success: true, unfixedDiagnostics: getIsolatedDeclarationsErrors() } as const; + } + finally { + service.dispose(); } - service.dispose(); - return true; - function getIsolatedDeclarationsErrors(fileName: string) { + function getIsolatedDeclarationsErrors(fileName?: string) { const program = service.getProgram(); if (!program) return []; - const sourceFile = program.getSourceFile(fileName); + const sourceFile = fileName === undefined ? undefined : program.getSourceFile(fileName); return program.getDeclarationDiagnostics(sourceFile).filter(d => fixableErrors.has(d.code)) ?? []; } } diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 3a875f44276ce..8c900ef1c3aa6 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -569,12 +569,11 @@ class IsolatedDeclarationTest extends CompilerTestBase { }); } private static dteDiagnosticErrors = new Set([ - ts.Diagnostics.Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit.code, - ts.Diagnostics.Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit.code, ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.code, ts.Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit.code, - ts.Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode.code, 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.code, + ts.Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode.code, + ts.Diagnostics.To_use_heritage_clauses_in_class_expressions_with_isolatedDeclarations_you_need_explicit_type_annotation_on_the_variable.code, ]); protected get baselinePath() { return "isolated-declarations/original"; @@ -688,8 +687,10 @@ class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest { const hash = ts.sys.createHash!(env.testCaseContent.sourceCode); const fixedTest = existingTransformedTest && TestCaseParser.makeUnitsFromTest(existingTransformedTest, compilerEnvironment.fileName); let transformSucceeded = false; + let hasReferenceDirectiveErrors = false; if (fixedTest && fixedTest.settings.hash === hash) { transformSucceeded = fixedTest.settings.succeeded !== "false"; + hasReferenceDirectiveErrors = fixedTest.settings.hasReferenceDirectiveErrors !== "false"; if (transformSucceeded) { env.allFiles = env.allFiles.map(f => { const testUnit = fixedTest.testUnitData.find(t => t.name === f.unitName); @@ -704,13 +705,15 @@ class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest { else { const fixerOptions = ts.cloneCompilerOptions(env.compilerOptions); fixerOptions.isolatedDeclarations = true; - transformSucceeded = fixTestFiles(env.fileSystem, env.programFileNames, fixerOptions); + const fixResults = fixTestFiles(env.fileSystem, env.programFileNames, fixerOptions); let cachedTest = "// @hash: " + hash + "\n"; - - if (!transformSucceeded) { + if (!fixResults.success) { + transformSucceeded = false; cachedTest += "// @succeeded: false\n"; } else { + hasReferenceDirectiveErrors = fixResults.unfixedDiagnostics.some(d => FixedIsolatedDeclarationTest.referenceDirectiveErrors.has(d.code)); + cachedTest += "// @hasReferenceDirectiveErrors: " + hasReferenceDirectiveErrors + "\n"; for (const file of env.allFiles) { cachedTest += "\n// @fileName: " + file.unitName + "\n"; const content = env.fileSystem.readFileSync(file.unitName, "utf-8"); @@ -720,20 +723,23 @@ class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest { } IO.writeFile(autoFixCacheTest, cachedTest); } - if (!transformSucceeded) { + if (!transformSucceeded || 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_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit.code, + ts.Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode.code, + ]); constructor(compilerEnvironment: CompilerTestEnvironment) { super(compilerEnvironment); // Suppress diff for tests with reference directives. if ( - this.dteDiagnostics.every(d => d.code === ts.Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode.code) - && this.tscIsolatedDeclarationsErrors + this.dteDiagnostics.some(d => d.code === ts.Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode.code) ) { this.isOutputMapEquivalent = true; this.isDiagnosticEquivalent = true; From c236425ab7d7bc5ba06615c037289c3e49b52e52 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 20 Nov 2023 15:56:45 +0000 Subject: [PATCH 139/224] Fixed some code review suggestions. --- .dprint.jsonc | 2 +- .eslintrc.json | 4 ---- package.json | 4 ++-- src/compiler/transformers/declarations/emit-binder.ts | 4 +--- src/compiler/types.ts | 1 + src/services/types.ts | 2 +- 6 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.dprint.jsonc b/.dprint.jsonc index 1acf5ce219613..98a8c53f8e5c4 100644 --- a/.dprint.jsonc +++ b/.dprint.jsonc @@ -51,7 +51,7 @@ "tests/**", "internal/**", "**/*.generated.*", - "scripts/*.d.*", + "scripts/*.d.*" ], // Note: if adding new languages, make sure settings.template.json is updated too. "plugins": [ diff --git a/.eslintrc.json b/.eslintrc.json index ad81dbf7254d7..819d042c25b16 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -25,10 +25,6 @@ "**/node_modules/**", "/built/**", "/tests/**", - "/external-declarations/tests/**", - "/external-declarations/build/**", - "/external-declarations/tsc-tests/**", - "/external-declarations/fixer-test/**", "/lib/**", "/src/lib/*.generated.d.ts", "/scripts/**/*.js", diff --git a/package.json b/package.json index b0addfa6924b3..7d77358cb65f1 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,8 @@ "type": "git", "url": "https://github.com/Microsoft/TypeScript.git" }, - "main": "./built/local/typescript.js", - "typings": "./built/local/typescript.d.ts", + "main": "./lib/typescript.js", + "typings": "./lib/typescript.d.ts", "bin": { "tsc": "./bin/tsc", "tsserver": "./bin/tsserver" diff --git a/src/compiler/transformers/declarations/emit-binder.ts b/src/compiler/transformers/declarations/emit-binder.ts index ea3da2b676a55..de2dce37bf758 100644 --- a/src/compiler/transformers/declarations/emit-binder.ts +++ b/src/compiler/transformers/declarations/emit-binder.ts @@ -2,6 +2,7 @@ import { forEachChild, getImpliedNodeFormatForFile, getModuleInstanceState, + getNodeId, isBlock, isClassDeclaration, isConditionalTypeNode, @@ -28,9 +29,6 @@ import { Symbol, toPath, } from "../../_namespaces/ts"; -import { - getNodeId, -} from "../../checker"; import { Debug, } from "../../debug"; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index b1b6911302a09..88b612d5432a6 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1383,6 +1383,7 @@ export type HasIllegalModifiers = | MissingDeclaration | NamespaceExportDeclaration; +/** @internal */ export type HasInferredType = | FunctionDeclaration | MethodDeclaration diff --git a/src/services/types.ts b/src/services/types.ts index 9cb07e863f069..ef0315b557c2d 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -638,7 +638,7 @@ export interface LanguageService { /** @internal */ clearSourceMapperCache(): void; - getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: readonly number[], formatOptions: FormatCodeSettings, preferences: UserPreferences, withDiagnostics?: Diagnostic[]): readonly CodeFixAction[]; + getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: readonly number[], formatOptions: FormatCodeSettings, preferences: UserPreferences): readonly CodeFixAction[]; getCombinedCodeFix(scope: CombinedCodeFixScope, fixId: {}, formatOptions: FormatCodeSettings, preferences: UserPreferences): CombinedCodeActions; applyCodeActionCommand(action: CodeActionCommand, formatSettings?: FormatCodeSettings): Promise; From 93912bba8da19aed149967340283ef3708f84474 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 21 Nov 2023 23:17:33 +0000 Subject: [PATCH 140/224] Minimize API surface. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/checker.ts | 2 +- src/compiler/transformers/declarations.ts | 3 +- .../transformers/declarations/emit-binder.ts | 17 +--- .../declarations/emit-resolver.ts | 5 +- .../declarations/transform-project.ts | 94 +++++++++++-------- .../transformers/declarations/types.ts | 18 ---- src/compiler/types.ts | 15 ++- src/harness/harnessIO.ts | 11 ++- src/services/utilities.ts | 2 +- .../reference/APILibCheck.errors.txt | 34 ------- tests/baselines/reference/api/typescript.d.ts | 25 +++-- 11 files changed, 97 insertions(+), 129 deletions(-) delete mode 100644 tests/baselines/reference/APILibCheck.errors.txt diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index eb13d6f8a6b44..c98f96209c15b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -50396,7 +50396,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/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 62e4a274a9a6c..4177bd0b6d7e8 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -756,7 +756,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) { @@ -767,6 +767,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) { diff --git a/src/compiler/transformers/declarations/emit-binder.ts b/src/compiler/transformers/declarations/emit-binder.ts index de2dce37bf758..624ef5b9fab92 100644 --- a/src/compiler/transformers/declarations/emit-binder.ts +++ b/src/compiler/transformers/declarations/emit-binder.ts @@ -1,6 +1,5 @@ import { forEachChild, - getImpliedNodeFormatForFile, getModuleInstanceState, getNodeId, isBlock, @@ -27,7 +26,6 @@ import { isVariableStatement, ModuleInstanceState, Symbol, - toPath, } from "../../_namespaces/ts"; import { Debug, @@ -38,7 +36,6 @@ import { BindingPattern, ClassDeclaration, ClassElement, - CompilerOptions, Declaration, EnumDeclaration, EnumMember, @@ -57,9 +54,7 @@ import { VariableDeclaration, } from "../../types"; import { - getSetExternalModuleIndicator, hasSyntacticModifier, - hostGetCanonicalFileName, isEnumConst, } from "../../utilities"; import { @@ -67,7 +62,6 @@ import { isBindingPattern, } from "../../utilitiesPublic"; import { - IsolatedEmitHost, MemberKey, } from "./types"; import { @@ -139,8 +133,7 @@ const syntaxKindToSymbolMap = { } as const satisfies Partial>>; /** @internal */ -export function bindSourceFileForDeclarationEmit(file: SourceFile, host: IsolatedEmitHost) { - const options: CompilerOptions = host.getCompilerOptions(); +export function bindSourceFileForDeclarationEmit(file: SourceFile) { const nodeLinks: EmitDeclarationNodeLinks[] = []; function tryGetNodeLinks(node: Node): EmitDeclarationNodeLinks | undefined { const id = (node as any).id; @@ -151,14 +144,6 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile, host: Isolate const nodeId = getNodeId(node); return nodeLinks[nodeId] || (nodeLinks[nodeId] = {}); } - const setExternalModuleIndicator = getSetExternalModuleIndicator(options); - setExternalModuleIndicator(file); - file.impliedNodeFormat = getImpliedNodeFormatForFile( - toPath(file.fileName, host.getCurrentDirectory(), hostGetCanonicalFileName(host)), - /*packageJsonInfoCache*/ undefined, - host, - options, - ); bind(); diff --git a/src/compiler/transformers/declarations/emit-resolver.ts b/src/compiler/transformers/declarations/emit-resolver.ts index 0ee93d3841e7c..b64e4e7b7d8db 100644 --- a/src/compiler/transformers/declarations/emit-resolver.ts +++ b/src/compiler/transformers/declarations/emit-resolver.ts @@ -92,7 +92,6 @@ import { EmitDeclarationSymbol, } from "./emit-binder"; import { - IsolatedEmitHost, IsolatedEmitResolver, MemberKey, } from "./types"; @@ -110,8 +109,8 @@ const knownFunctionMembers = new Set([ ]); /** @internal */ -export function createEmitDeclarationResolver(file: SourceFile, host: IsolatedEmitHost): IsolatedEmitResolver { - const { getNodeLinks, resolveMemberKey, resolveName } = bindSourceFileForDeclarationEmit(file, host); +export function createEmitDeclarationResolver(file: SourceFile): IsolatedEmitResolver { + const { getNodeLinks, resolveMemberKey, resolveName } = bindSourceFileForDeclarationEmit(file); function getEnumValueFromName(name: PropertyName | NoSubstitutionTemplateLiteral, location: EnumDeclaration) { const enumKey = getMemberKey(name); diff --git a/src/compiler/transformers/declarations/transform-project.ts b/src/compiler/transformers/declarations/transform-project.ts index a3c47ab54d9a8..4d28982e4d9b8 100644 --- a/src/compiler/transformers/declarations/transform-project.ts +++ b/src/compiler/transformers/declarations/transform-project.ts @@ -10,7 +10,6 @@ import { Debug, Diagnostic, EmitHost, - EmitResolver, ensureTrailingDirectorySeparator, factory, getAreDeclarationMapsEnabled, @@ -21,51 +20,64 @@ import { getRelativePathToDirectoryOrUrl, getRootLength, getSourceFilePathInNewDir, - IsolatedEmitHost, - noop, normalizePath, normalizeSlashes, PrinterOptions, - returnFalse, - returnUndefined, SourceFile, SourceMapGenerator, sys, - System, TransformationContext, transformDeclarations, + TranspileDeclarationsOptions, + TranspileDeclarationsOutput, } from "../../_namespaces/ts"; -export function createEmitDeclarationHost(options: CompilerOptions, sys: System, commonSourceDirectory = sys.getCurrentDirectory()): IsolatedEmitHost { +function createEmitDeclarationHost(options: TranspileDeclarationsOptions): EmitHost { + const throws = () => Debug.fail("Function should not be called in isolated declarations emit"); return { - redirectTargetsMap: new Map(), - directoryExists: sys.directoryExists.bind(sys), - fileExists: sys.fileExists.bind(sys), - getDirectories: sys.getDirectories.bind(sys), - readFile: sys.readFile.bind(sys), - realpath: sys.realpath?.bind(sys), - getCurrentDirectory: sys.getCurrentDirectory.bind(sys), + getCurrentDirectory: () => options.currentDirectory ?? ".", getCanonicalFileName: createGetCanonicalFileName(sys.useCaseSensitiveFileNames), - useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames, - getCompilerOptions: () => options, - getCommonSourceDirectory: () => ensureTrailingDirectorySeparator(sys.resolvePath(commonSourceDirectory)), - trace: noop, - getLibFileFromReference: returnUndefined, - getSourceFileFromReference: returnUndefined, - isSourceOfProjectReferenceRedirect: returnFalse, + useCaseSensitiveFileNames: () => !!options.useCaseSensitiveFileNames, + getCompilerOptions: () => options.compilerOptions, + getCommonSourceDirectory: () => ensureTrailingDirectorySeparator(options.commonSourceDirectory ?? "."), + redirectTargetsMap: undefined!, // new Map(), + directoryExists: throws, + fileExists: throws, + readFile: throws, + realpath: throws, + getLibFileFromReference: throws, + getSourceFileFromReference: throws, + isSourceOfProjectReferenceRedirect: throws, + + getSourceFiles: throws, + isEmitBlocked: throws, + getPrependNodes: throws, + writeFile: throws, + getBuildInfo: throws, + getSourceFile: throws, + getSourceFileByPath: throws, + getProjectReferenceRedirect: throws, + getFileIncludeReasons: throws, + isSourceFileFromExternalLibrary: throws, + getResolvedProjectReferenceToRedirect: throws, }; } -export function transpileDeclaration(sourceFile: SourceFile, emitHost: IsolatedEmitHost) { - const options: CompilerOptions = emitHost.getCompilerOptions(); - const emitResolver = createEmitDeclarationResolver(sourceFile, emitHost); +export function transpileDeclaration(sourceFile: SourceFile, transpileOptions: TranspileDeclarationsOptions): TranspileDeclarationsOutput { + const compilerOptions: CompilerOptions = { + ...transpileOptions.compilerOptions, + isolatedDeclarations: true, + traceResolution: false, + }; + const emitHost = createEmitDeclarationHost(transpileOptions); + const emitResolver = createEmitDeclarationResolver(sourceFile); const diagnostics: Diagnostic[] = []; const transformer = transformDeclarations({ getEmitHost() { - return emitHost as never as EmitHost; + return emitHost; }, getEmitResolver() { - return emitResolver as EmitResolver; + return emitResolver; }, getCompilerOptions() { return emitHost.getCompilerOptions(); @@ -78,22 +90,22 @@ export function transpileDeclaration(sourceFile: SourceFile, emitHost: IsolatedE const result = transformer(sourceFile); const printer = createPrinter({ - removeComments: options.removeComments, - newLine: options.newLine, + removeComments: compilerOptions.removeComments, + newLine: compilerOptions.newLine, noEmitHelpers: true, - module: options.module, - target: options.target, - sourceMap: options.declarationMap, - inlineSourceMap: options.inlineSourceMap, - extendedDiagnostics: options.extendedDiagnostics, + module: compilerOptions.module, + target: compilerOptions.target, + sourceMap: compilerOptions.declarationMap, + inlineSourceMap: compilerOptions.inlineSourceMap, + extendedDiagnostics: compilerOptions.extendedDiagnostics, onlyPrintJsDocStyle: true, omitBraceSourceMapPositions: true, } as PrinterOptions); - const writer = createTextWriter(getNewLineCharacter(options)); + const writer = createTextWriter(getNewLineCharacter(compilerOptions)); const declarationPath = getDeclarationEmitOutputFilePathWorker( sourceFile.fileName, - options, + compilerOptions, emitHost.getCurrentDirectory(), emitHost.getCommonSourceDirectory(), emitHost.getCanonicalFileName, @@ -135,21 +147,21 @@ export function transpileDeclaration(sourceFile: SourceFile, emitHost: IsolatedE // logic replicated from emitter.ts function getSourceMapGenerator(declarationFilePath: string, declarationMapPath: string) { - if (!getAreDeclarationMapsEnabled(options)) return; + if (!getAreDeclarationMapsEnabled(compilerOptions)) return; const mapOptions = { - sourceRoot: options.sourceRoot, - mapRoot: options.mapRoot, - extendedDiagnostics: options.extendedDiagnostics, + sourceRoot: compilerOptions.sourceRoot, + mapRoot: compilerOptions.mapRoot, + extendedDiagnostics: compilerOptions.extendedDiagnostics, // Explicitly do not passthru either `inline` option }; - const sourceRoot = normalizeSlashes(options.sourceRoot || ""); + const sourceRoot = normalizeSlashes(compilerOptions.sourceRoot || ""); const sourceMapGenerator = createSourceMapGenerator( emitHost, getBaseFileName(normalizeSlashes(declarationFilePath)), sourceRoot ? ensureTrailingDirectorySeparator(sourceRoot) : sourceRoot, - getSourceMapDirectory(options, declarationFilePath, sourceFile), + getSourceMapDirectory(compilerOptions, declarationFilePath, sourceFile), mapOptions, ); diff --git a/src/compiler/transformers/declarations/types.ts b/src/compiler/transformers/declarations/types.ts index 9adc404e6e84a..d6f13b3f77916 100644 --- a/src/compiler/transformers/declarations/types.ts +++ b/src/compiler/transformers/declarations/types.ts @@ -2,27 +2,22 @@ import { AccessorDeclaration, AllAccessorDeclarations, AnyImportSyntax, - CompilerOptions, ComputedPropertyName, Declaration, ElementAccessExpression, EntityNameOrEntityNameExpression, EnumMember, Expression, - FileReference, FunctionDeclaration, ImportDeclaration, LateBoundDeclaration, - ModuleResolutionHost, Node, ParameterDeclaration, PropertyAccessExpression, PropertyDeclaration, PropertySignature, - RedirectTargetsMap, ResolutionMode, SignatureDeclaration, - SourceFile, StringLiteralLike, Symbol, SymbolTracker, @@ -30,19 +25,6 @@ import { VariableDeclaration, } from "../../_namespaces/ts"; -/** @internal */ -export interface IsolatedEmitHost extends ModuleResolutionHost { - readonly redirectTargetsMap: RedirectTargetsMap; - getCommonSourceDirectory(): string; - getCompilerOptions(): CompilerOptions; - getSourceFileFromReference(referencingFile: SourceFile, ref: FileReference): SourceFile | undefined; - getLibFileFromReference(ref: FileReference): SourceFile | undefined; - isSourceOfProjectReferenceRedirect(fileName: string): boolean; - getCanonicalFileName(p: string): string; - getCurrentDirectory(): string; - useCaseSensitiveFileNames?(): boolean; -} - /** @internal */ export type MemberKey = string & { __memberKey: void; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 88b612d5432a6..c29c0a73b67be 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -8292,6 +8292,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` */ @@ -9676,7 +9689,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; diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index 5e761ef844a7d..fe394b2602b65 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -12,6 +12,7 @@ import { createGetCanonicalFileName, mapDefined, transpileDeclaration, + TranspileDeclarationsOptions, } from "./_namespaces/ts"; import * as Utils from "./_namespaces/Utils"; import * as vfs from "./_namespaces/vfs"; @@ -658,7 +659,12 @@ export namespace Compiler { currentDirectory, getCanonicalFileName, ); - const emitterHost = ts.createEmitDeclarationHost(options, new fakes.System(fs), commonSourceDirectory); + const transpileOptions: TranspileDeclarationsOptions = { + compilerOptions: options, + commonSourceDirectory, + currentDirectory: fs.cwd(), + useCaseSensitiveFileNames: fs.ignoreCase, + }; const diagnostics: ts.Diagnostic[] = []; programFileNames.forEach(fileName => { @@ -671,14 +677,13 @@ export namespace Compiler { if (!file) { return; } - const { diagnostics: fileDiagnostics = [], declaration, declarationPath, declarationMap, declarationMapPath, - } = transpileDeclaration(file, emitterHost); + } = transpileDeclaration(file, transpileOptions); // Ensure file will be rebound. file.locals = undefined; dts.set(declarationPath, new documents.TextDocument(declarationPath, options.emitBOM ? Utils.addUTF8ByteOrderMark(declaration) : declaration)); diff --git a/src/services/utilities.ts b/src/services/utilities.ts index b14d16bd671c2..9d78544e5bf73 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -2459,7 +2459,7 @@ export function createModuleSpecifierResolutionHost(program: Program, host: Lang return { fileExists: fileName => program.fileExists(fileName), getCurrentDirectory: () => host.getCurrentDirectory(), - readFile: maybeBind(host, host.readFile), + readFile: host.readFile.bind(host), useCaseSensitiveFileNames: maybeBind(host, host.useCaseSensitiveFileNames), getSymlinkCache: maybeBind(host, host.getSymlinkCache) || program.getSymlinkCache, getModuleSpecifierCache: maybeBind(host, host.getModuleSpecifierCache), diff --git a/tests/baselines/reference/APILibCheck.errors.txt b/tests/baselines/reference/APILibCheck.errors.txt deleted file mode 100644 index 58ad249705952..0000000000000 --- a/tests/baselines/reference/APILibCheck.errors.txt +++ /dev/null @@ -1,34 +0,0 @@ -typescript.d.ts(9832,112): error TS2304: Cannot find name 'IsolatedEmitHost'. -typescript.d.ts(9833,69): error TS2304: Cannot find name 'IsolatedEmitHost'. - - -==== index.ts (0 errors) ==== - import ts = require("typescript"); - import tsInternal = require("typescript-internal"); - import tsserverlibrary = require("tsserverlibrary"); - import tsserverlibraryInternal = require("tsserverlibrary-internal"); - -==== node_modules/typescript/package.json (0 errors) ==== - { - "name": "typescript", - "types": "/.ts/typescript.d.ts" - } - -==== node_modules/typescript-internal/package.json (0 errors) ==== - { - "name": "typescript-internal", - "types": "/.ts/typescript.internal.d.ts" - } - -==== node_modules/tsserverlibrary/package.json (0 errors) ==== - { - "name": "tsserverlibrary", - "types": "/.ts/tsserverlibrary.d.ts" - } - -==== node_modules/tsserverlibrary-internal/package.json (0 errors) ==== - { - "name": "tsserverlibrary-internal", - "types": "/.ts/tsserverlibrary.internal.d.ts" - } - \ No newline at end of file diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 0d2983c627ef9..8a32a9f434101 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -4889,7 +4889,6 @@ declare namespace ts { type HasExpressionInitializer = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | PropertyAssignment | EnumMember; type HasDecorators = ParameterDeclaration | PropertyDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ClassExpression | ClassDeclaration; type HasModifiers = TypeParameterDeclaration | ParameterDeclaration | ConstructorTypeNode | PropertySignature | PropertyDeclaration | MethodSignature | MethodDeclaration | ConstructorDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | IndexSignatureDeclaration | FunctionExpression | ArrowFunction | ClassExpression | VariableStatement | FunctionDeclaration | ClassDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | ExportAssignment | ExportDeclaration; - type HasInferredType = FunctionDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | BindingElement | ConstructSignatureDeclaration | VariableDeclaration | MethodSignature | CallSignatureDeclaration | ParameterDeclaration | PropertyDeclaration | PropertySignature; interface NodeArray extends ReadonlyArray, ReadonlyTextRange { readonly hasTrailingComma: boolean; } @@ -7904,6 +7903,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; }; @@ -9844,14 +9856,7 @@ declare namespace ts { * @param context A lexical environment context for the visitor. */ function visitEachChild(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; - function createEmitDeclarationHost(options: CompilerOptions, sys: System, commonSourceDirectory?: string): IsolatedEmitHost; - function transpileDeclaration(sourceFile: SourceFile, emitHost: IsolatedEmitHost): { - declaration: string; - declarationPath: string; - declarationMap: string | undefined; - declarationMapPath: string | undefined; - diagnostics: Diagnostic[]; - }; + 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; @@ -10579,7 +10584,7 @@ declare namespace ts { getLinkedEditingRangeAtPosition(fileName: string, position: number): LinkedEditingInfo | undefined; getSpanOfEnclosingComment(fileName: string, position: number, onlyMultiLine: boolean): TextSpan | undefined; toLineColumnOffset?(fileName: string, position: number): LineAndCharacter; - getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: readonly number[], formatOptions: FormatCodeSettings, preferences: UserPreferences, withDiagnostics?: Diagnostic[]): readonly CodeFixAction[]; + getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: readonly number[], formatOptions: FormatCodeSettings, preferences: UserPreferences): readonly CodeFixAction[]; getCombinedCodeFix(scope: CombinedCodeFixScope, fixId: {}, formatOptions: FormatCodeSettings, preferences: UserPreferences): CombinedCodeActions; applyCodeActionCommand(action: CodeActionCommand, formatSettings?: FormatCodeSettings): Promise; applyCodeActionCommand(action: CodeActionCommand[], formatSettings?: FormatCodeSettings): Promise; From f086f3560dff533effd2f40b349ae9bf9bcd62bb Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Wed, 22 Nov 2023 09:42:33 +0000 Subject: [PATCH 141/224] Do not support class expressions in IsolatedDeclarations. Declaration emit for class expressions has some surprising behaviors, such as printing 'any' in self-reference (#GH56479) or non-consistent emit of private identifiers (#GH56145). Replicating this behavior in IsolatedDeclaration doesn't seem to be the goal that we want to achieve, thus we're going to disallow this pattern for now until the issues around class expressions are fixed. Signed-off-by: Hana Joo --- src/compiler/diagnosticMessages.json | 2 +- .../declarations/localInferenceResolver.ts | 154 +----------------- src/harness/isolatedDeclarationFixer.ts | 1 - src/testRunner/compilerRunner.ts | 2 +- ...codeFixMissingTypeAnnotationOnExports12.ts | 31 ---- 5 files changed, 11 insertions(+), 179 deletions(-) delete mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 8fe72dacba034..eab84efac8e3c 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -6722,7 +6722,7 @@ "category": "Error", "code": 9010 }, - "To use heritage clauses in class expressions with --isolatedDeclarations, you need explicit type annotation on the variable.": { + "Declaration emit for class expressions are not supported with --isolatedDeclarations.": { "category": "Error", "code": 9011 }, diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 2dccbba778493..760f7a9ad7cd3 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -8,11 +8,9 @@ import { import { isClassExpression, isComputedPropertyName, - isConstructorDeclaration, isExportAssignment, isGetAccessorDeclaration, isIdentifier, - isIndexSignatureDeclaration, isInterfaceDeclaration, isLiteralTypeNode, isMethodDeclaration, @@ -50,21 +48,19 @@ import { ArrowFunction, AsExpression, ClassExpression, + DiagnosticMessage, EntityNameOrEntityNameExpression, ExportAssignment, Expression, FunctionExpression, GetAccessorDeclaration, HasInferredType, - HasModifiers, Identifier, KeywordTypeSyntaxKind, LanguageVariant, LiteralExpression, MethodDeclaration, MethodSignature, - Modifier, - ModifierLike, Node, NodeArray, NodeFlags, @@ -87,7 +83,6 @@ import { } from "../../types"; import { createDiagnosticForNode, - createDiagnosticForRange, isEntityNameExpression, } from "../../utilities"; import { @@ -113,7 +108,6 @@ enum LocalTypeInfoFlags { None = 0, Invalid = 1 << 1, } -const propertyLikeModifiers = new Set([SyntaxKind.ReadonlyKeyword, SyntaxKind.PublicKeyword]); interface LocalInferenceResolver { makeInvalidType(): Node; @@ -167,12 +161,12 @@ export function createLocalInferenceResolver({ function hasParseError(node: Node) { return !!(node.flags & NodeFlags.ThisNodeHasError); } - function reportIsolatedDeclarationError(node: Node) { + function reportIsolatedDeclarationError(node: Node, diagMessage: DiagnosticMessage = Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit) { // Do not report errors on nodes with other errors. if (hasParseError(node)) return; const message = createDiagnosticForNode( node, - Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit, + diagMessage, ); context.addDiagnostic(message); } @@ -362,14 +356,12 @@ export function createLocalInferenceResolver({ return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node, inheritedArrayTypeFlags); case SyntaxKind.ObjectLiteralExpression: return getTypeForObjectLiteralExpression(node as ObjectLiteralExpression, inferenceFlags); - case SyntaxKind.ClassExpression: - return getClassExpressionTypeNode(node as ClassExpression); } return invalid(node); } - function invalid(sourceNode: Node): LocalTypeInfo { - reportIsolatedDeclarationError(sourceNode); + function invalid(sourceNode: Node, diagMessage = Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit): LocalTypeInfo { + reportIsolatedDeclarationError(sourceNode, diagMessage); return { typeNode: makeInvalidType(), flags: LocalTypeInfoFlags.Invalid, sourceNode }; } function regular(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { @@ -540,137 +532,6 @@ export function createLocalInferenceResolver({ } } - function getClassExpressionTypeNode(node: ClassExpression): LocalTypeInfo { - let invalid = false; - const staticMembers: TypeElement[] = []; - const nonStaticMembers: TypeElement[] = []; - const constructorParameters: ParameterDeclaration[] = []; - - if (node.heritageClauses && node.heritageClauses.length > 0) { - context.addDiagnostic({ - ...createDiagnosticForNode(node, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit), - relatedInformation: [ - createDiagnosticForRange( - currentSourceFile, - { - pos: node.heritageClauses[0].pos, - end: node.heritageClauses[node.heritageClauses.length - 1].end, - }, - Diagnostics.To_use_heritage_clauses_in_class_expressions_with_isolatedDeclarations_you_need_explicit_type_annotation_on_the_variable, - ), - ], - }); - invalid = true; - } - - for (const member of node.members) { - if (isConstructorDeclaration(member)) { - for (const parameter of member.parameters) { - const type = localInferenceFromInitializer(parameter, parameter.type); - if (!type) { - invalid = true; - continue; - } - // TODO: See what happens on private modifiers. - if (parameter.modifiers?.some(modifier => propertyLikeModifiers.has(modifier.kind))) { - nonStaticMembers.push(factory.createPropertySignature( - keepReadonlyKeyword(parameter.modifiers), - parameter.name as Identifier, - parameter.questionToken, - type, - )); - } - constructorParameters.push(factory.createParameterDeclaration( - /*modifiers*/ undefined, - parameter.dotDotDotToken, - parameter.name, - parameter.questionToken, - type, - parameter.initializer, - )); - } - } - else if (isMethodDeclaration(member)) { - const { method, flags } = handleMethodDeclaration(member, member.name, NarrowBehavior.None); - if (flags & LocalTypeInfoFlags.Invalid) { - invalid = true; - continue; - } - if (hasStaticModifier(member)) { - staticMembers.push(method); - } - else { - nonStaticMembers.push(method); - } - } - else if (isGetAccessorDeclaration(member) || isSetAccessorDeclaration(member)) { - const accessorType = handleAccessors(member, node, member.name, getMemberKey(member)); - if (accessorType && accessorType.flags !== LocalTypeInfoFlags.None) { - nonStaticMembers.push(accessorType.type); - } - else { - invalid = true; - continue; - } - } - else if (isIndexSignatureDeclaration(member)) { - nonStaticMembers.push(member); - } - else if (isPropertyDeclaration(member)) { - const name = isPrivateIdentifier(member.name) ? - // imitating the behavior from utilities.ts : getSymbolNameForPrivateIdentifier, but as we don't have - // a Symbol & SymbolId in hand, we use NodeId of the declaration instead as an approximiation and to provide uniqueness. - // TODO: This seems to have a high collision possibilitiy than the vanilla implementation as we have much less - // ids for nodes in DTE. - factory.createStringLiteral(`__#${node.parent.id}@${member.name.escapedText}`) : - member.name; - const type = localInferenceFromInitializer(member, member.type); - if (!type) { - invalid = true; - continue; - } - const propertySignature = factory.createPropertySignature( - keepReadonlyKeyword(member.modifiers), - name, - member.questionToken, - type, - ); - if (hasStaticModifier(member)) { - staticMembers.push(propertySignature); - } - else { - nonStaticMembers.push(propertySignature); - } - } - } - - if (invalid) { - return { typeNode: makeInvalidType(), flags: LocalTypeInfoFlags.Invalid, sourceNode: node }; - } - else { - const constructorSignature = factory.createConstructSignature( - node.typeParameters, - constructorParameters, - factory.createTypeLiteralNode(nonStaticMembers), - ); - const typeNode = factory.createTypeLiteralNode([constructorSignature, ...staticMembers]); - return { typeNode, flags: LocalTypeInfoFlags.None, sourceNode: node }; - } - } - - function hasStaticModifier(node: HasModifiers) { - return node.modifiers?.some(modifier => modifier.kind === SyntaxKind.StaticKeyword); - } - - function keepReadonlyKeyword(modifiers?: NodeArray): Modifier[] { - if (modifiers?.some(modifier => modifier.kind === SyntaxKind.ReadonlyKeyword)) { - return [factory.createModifier(SyntaxKind.ReadonlyKeyword)]; - } - else { - return []; - } - } - function normalizeLiteralValue(literal: LiteralExpression) { switch (literal.kind) { case SyntaxKind.BigIntLiteral: @@ -893,13 +754,16 @@ export function createLocalInferenceResolver({ localType = localInference(node.expression, NarrowBehavior.KeepLiterals); } else if (isVariableDeclaration(node) && node.initializer) { - if (isVariableDeclaration(node) && resolver.isExpandoFunction(node)) { + if (resolver.isExpandoFunction(node)) { context.addDiagnostic(createDiagnosticForNode( node, Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function, )); localType = invalid(node); } + else if (isClassExpression(node.initializer)) { + localType = invalid(node.initializer, Diagnostics.Declaration_emit_for_class_expressions_are_not_supported_with_isolatedDeclarations) + } else { localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals : NarrowBehavior.None); } diff --git a/src/harness/isolatedDeclarationFixer.ts b/src/harness/isolatedDeclarationFixer.ts index 4983db4c34365..936086ada33d3 100644 --- a/src/harness/isolatedDeclarationFixer.ts +++ b/src/harness/isolatedDeclarationFixer.ts @@ -7,7 +7,6 @@ export const isolatedDeclarationsErrors = new Set([ ts.Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit.code, 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.code, ts.Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode.code, - ts.Diagnostics.To_use_heritage_clauses_in_class_expressions_with_isolatedDeclarations_you_need_explicit_type_annotation_on_the_variable.code, ]); export function fixTestFiles( diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 8c900ef1c3aa6..5482fb2a92cdf 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -573,7 +573,7 @@ class IsolatedDeclarationTest extends CompilerTestBase { ts.Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit.code, 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.code, ts.Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode.code, - ts.Diagnostics.To_use_heritage_clauses_in_class_expressions_with_isolatedDeclarations_you_need_explicit_type_annotation_on_the_variable.code, + ts.Diagnostics.Declaration_emit_for_class_expressions_are_not_supported_with_isolatedDeclarations.code, ]); protected get baselinePath() { return "isolated-declarations/original"; diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts deleted file mode 100644 index 9a71e8f891153..0000000000000 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports12.ts +++ /dev/null @@ -1,31 +0,0 @@ -/// - -// @isolatedDeclarations: true -// @declaration: true -//// function mixin any>(ctor: T): T { -//// return ctor; -//// } -//// class Point2D { x = 0; y = 0; } -//// export const Point3D = class extends mixin(Point2D) { z = 0; }; - -// TODO: There's no easy way to name the type, so rather promoting this to a classDeclaration is better. -verify.codeFix({ - description: `Add annotation of type '{ new (): { - z: number; - x: number; - y: number; -}; }'`, - index: 0, - newFileContent: -`function mixin any>(ctor: T): T { - return ctor; -} -class Point2D { x = 0; y = 0; } -export const Point3D: { - new(): { - z: number; - x: number; - y: number; - }; -} = class extends mixin(Point2D) { z = 0; };` -}); From eeb8a9f201a745bb0610849bf1e10662da3c8576 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 23 Nov 2023 12:13:39 +0000 Subject: [PATCH 142/224] Added missing test reasons and baselines Signed-off-by: Titian Cernicova-Dragomir --- .../declarations/localInferenceResolver.ts | 2 +- src/harness/harnessIO.ts | 2 + src/testRunner/compilerRunner.ts | 4 +- ...rDeclarationEmitVisibilityErrors.d.ts.diff | 19 + .../diff/ambientConstLiterals.d.ts.diff | 18 + ...FlatNoCrashInferenceDeclarations.d.ts.diff | 5 +- ...coAndContraVariantInferences.d.ts.map.diff | 16 + .../diff/commentsFunction.d.ts.diff | 22 + .../diff/commentsVarDecl.d.ts.map.diff | 16 + .../diff/computedEnumTypeWidening.d.ts.diff | 3 +- .../diff/computedPropertiesNarrowed.d.ts.diff | 35 + .../diff/conditionalTypes1.d.ts.map.diff | 16 + .../diff/constAssertions.d.ts.map.diff | 16 + .../auto-fixed/diff/constEnum2.d.ts.diff | 7 +- ...ingLiteralsInJsxAttributes01.d.ts.map.diff | 16 + .../diff/controlFlowAliasing.d.ts.map.diff | 16 + .../diff/correlatedUnions.d.ts.diff | 18 + .../declFileEmitDeclarationOnly.d.ts.map.diff | 16 + .../auto-fixed/diff/declFileEnums.d.ts.diff | 3 +- .../declFileRegressionTests.d.ts.map.diff | 16 + ...clarationEmitAliasExportStar.d.ts.map.diff | 19 + ...ndingPatternWithReservedWord.d.ts.map.diff | 16 + ...clarationEmitBindingPatterns.d.ts.map.diff | 16 + ...nEmitBundleWithAmbientReferences.d.ts.diff | 17 + ...EmitCommonJsModuleReferencedType.d.ts.diff | 5 +- ...dNameCausesImportToBePainted.d.ts.map.diff | 18 + ...onEmitComputedNameConstEnumAlias.d.ts.diff | 20 + ...ossFileImportTypeOfAmbientModule.d.ts.diff | 16 + ...efaultExportWithStaticAssignment.d.ts.diff | 10 +- ...ucturingObjectLiteralPattern.d.ts.map.diff | 16 + ...cturingObjectLiteralPattern1.d.ts.map.diff | 16 + ...cturingObjectLiteralPattern2.d.ts.map.diff | 16 + ...DestructuringParameterProperties.d.ts.diff | 3 +- ...ributiveConditionalWithInfer.d.ts.map.diff | 16 + ...licateParameterDestructuring.d.ts.map.diff | 16 + ...onEmitExpandoPropertyPrivateName.d.ts.diff | 4 +- ...xportAliasVisibiilityMarking.d.ts.map.diff | 30 + ...larationEmitExpressionInExtends4.d.ts.diff | 29 + ...larationEmitExpressionInExtends7.d.ts.diff | 18 + ...EmitForGlobalishSpecifierSymlink.d.ts.diff | 3 +- ...mitForGlobalishSpecifierSymlink2.d.ts.diff | 3 +- ...gModuleAugmentationRetainsImport.d.ts.diff | 17 + ...onEmitFunctionDuplicateNamespace.d.ts.diff | 3 +- ...clarationEmitFunctionKeywordProp.d.ts.diff | 3 +- ...ationEmitGlobalThisPreserved.d.ts.map.diff | 16 + ...declarationEmitIndexTypeNotFound.d.ts.diff | 19 + ...itInferredDefaultExportType2.d.ts.map.diff | 16 + ...itInlinedDistributiveConditional.d.ts.diff | 24 + ...larationEmitKeywordDestructuring.d.ts.diff | 34 + ...aWithMissingTypeParameterNoCrash.d.ts.diff | 20 + ...larationEmitLateBoundAssignments.d.ts.diff | 3 +- ...arationEmitLateBoundAssignments2.d.ts.diff | 3 +- ...itMappedPrivateTypeTypeParameter.d.ts.diff | 19 + ...itMappedTypeTemplateTypeofSymbol.d.ts.diff | 20 + ...clarationEmitNoNonRequiredParens.d.ts.diff | 16 + ...nEmitObjectAssignedDefaultExport.d.ts.diff | 5 +- ...nEmitObjectLiteralAccessors1.d.ts.map.diff | 16 + ...eclarationEmitOptionalMethod.d.ts.map.diff | 16 + ...declarationEmitParameterProperty.d.ts.diff | 19 + ...efersPathKindBasedOnBundling.d.ts.map.diff | 15 + ...fersPathKindBasedOnBundling2.d.ts.map.diff | 18 + ...tionEmitPropertyNumericStringKey.d.ts.diff | 22 + ...tionEmitReadonlyComputedProperty.d.ts.diff | 20 + ...iveConditionalAliasPreserved.d.ts.map.diff | 16 + ...onEmitReexportedSymlinkReference.d.ts.diff | 7 +- ...nEmitReexportedSymlinkReference2.d.ts.diff | 7 +- ...nEmitReexportedSymlinkReference3.d.ts.diff | 4 +- ...ionEmitRetainsJsdocyComments.d.ts.map.diff | 16 + ...itReusesLambdaParameterNodes.d.ts.map.diff | 16 + ...tionEmitShadowingInferNotRenamed.d.ts.diff | 19 + ...larationEmitThisPredicates02.d.ts.map.diff | 16 + ...sPredicatesWithPrivateName02.d.ts.map.diff | 16 + ...RestSignatureLeadingVariadic.d.ts.map.diff | 16 + ...eParameterExtendingUnknownSymbol.d.ts.diff | 17 + ...TypeAliasWithTypeParameters1.d.ts.map.diff | 16 + ...TypeAliasWithTypeParameters2.d.ts.map.diff | 16 + ...ypeParameterNameInOuterScope.d.ts.map.diff | 16 + ...ameterNameShadowedInternally.d.ts.map.diff | 16 + .../declarationEmitUnknownImport.d.ts.diff | 18 + ...ionEmitWithDefaultAsComputedName.d.ts.diff | 19 + ...onEmitWithDefaultAsComputedName2.d.ts.diff | 19 + ...mitWithInvalidPackageJsonTypings.d.ts.diff | 3 +- .../declarationFileOverwriteError.d.ts.diff | 18 + .../diff/declarationFiles.d.ts.diff | 5 +- ...onsForFileShadowingGlobalNoError.d.ts.diff | 24 + ...rnalTypesProduceUniqueTypeParams.d.ts.diff | 21 + ...ndefinedWithStrictNullChecks.d.ts.map.diff | 16 + ...entAssertionsWithObjectShortHand.d.ts.diff | 18 + ...pendentDestructuredVariables.d.ts.map.diff | 16 + .../destructuredDeclarationEmit.d.ts.map.diff | 19 + .../destructuringInFunctionType.d.ts.diff | 18 + ...catePropertiesInTypeAssertions01.d.ts.diff | 17 + ...catePropertiesInTypeAssertions02.d.ts.diff | 17 + .../auto-fixed/diff/dynamicNames.d.ts.diff | 22 + .../diff/dynamicNamesErrors.d.ts.map.diff | 16 + ...ClassExpressionInDeclarationFile.d.ts.diff | 98 + ...lassExpressionInDeclarationFile2.d.ts.diff | 67 + .../diff/emitMethodCalledNew.d.ts.diff | 25 + .../emptyTuplesTypeAssertion01.d.ts.map.diff | 16 + .../emptyTuplesTypeAssertion02.d.ts.map.diff | 16 + .../diff/enumClassification.d.ts.diff | 3 +- ...hTemplateLiteralsEmitDeclaration.d.ts.diff | 3 +- ...ervedCompilerNamedIdentifier.d.ts.map.diff | 16 + .../exhaustiveSwitchStatements1.d.ts.map.diff | 16 + ...mentMembersVisibleInAugmentation.d.ts.diff | 20 + .../diff/exportDefaultNamespace.d.ts.diff | 3 +- ...atArrayNoExcessiveStackDepth.d.ts.map.diff | 16 + .../genericContextualTypes1.d.ts.map.diff | 16 + .../diff/genericDefaultsErrors.d.ts.diff | 55 + .../auto-fixed/diff/giant.d.ts.diff | 47 + ...tionOutputGetsTruncatedWithError.d.ts.diff | 24 + ...ypeGenericArrowTypeParenthesized.d.ts.diff | 16 + .../diff/indexSignatures1.d.ts.map.diff | 16 + .../auto-fixed/diff/inferTypes1.d.ts.diff | 207 + ...erTypesInvalidExtendsDeclaration.d.ts.diff | 17 + .../intraExpressionInferences.d.ts.map.diff | 16 + .../auto-fixed/diff/intrinsics.d.ts.diff | 23 + ...somorphicMappedTypeInference.d.ts.map.diff | 16 + ...thDeclarationEmitPathSameAsInput.d.ts.diff | 18 + .../diff/keyofAndIndexedAccess.d.ts.diff | 26 + ...tionMemberAssignmentDeclarations.d.ts.diff | 3 +- ...veOptionalParameterAsWritten.d.ts.map.diff | 15 + ...rtsSpecifierGenerationConditions.d.ts.diff | 3 +- .../diff/mappedTypeConstraints2.d.ts.map.diff | 16 + ...ppedTypeGenericIndexedAccess.d.ts.map.diff | 16 + ...stantiationPreservesHomomorphism.d.ts.diff | 19 + ...InstantiationPreservesInlineForm.d.ts.diff | 20 + .../diff/mappedTypeNoTypeNoCrash.d.ts.diff | 21 + ...ithAsClauseAndLateBoundProperty2.d.ts.diff | 109 + .../diff/mixinClassesAnnotated.d.ts.map.diff | 16 + ...tarShadowingGlobalIsNameable.d.ts.map.diff | 19 + .../diff/namedTupleMembers.d.ts.diff | 18 + .../auto-fixed/diff/noEmitOnError.d.ts.diff | 17 + ...nodeModuleReexportFromDottedPath.d.ts.diff | 3 +- ...elpersCollisions2(module=node16).d.ts.diff | 16 + ...persCollisions2(module=nodenext).d.ts.diff | 16 + ...ecifierResolution(module=node16).d.ts.diff | 3 +- ...ifierResolution(module=nodenext).d.ts.diff | 3 +- ...esExportsSourceTs(module=node16).d.ts.diff | 11 +- ...ExportsSourceTs(module=nodenext).d.ts.diff | 11 +- ...erationConditions(module=node16).d.ts.diff | 3 +- ...ationConditions(module=nodenext).d.ts.diff | 3 +- ...nerationDirectory(module=node16).d.ts.diff | 3 +- ...rationDirectory(module=nodenext).d.ts.diff | 3 +- ...GenerationPattern(module=node16).d.ts.diff | 3 +- ...nerationPattern(module=nodenext).d.ts.diff | 3 +- ...orbidenSyntax(module=node16).d.ts.map.diff | 104 + ...bidenSyntax(module=nodenext).d.ts.map.diff | 104 + ...ImportAssignments(module=node16).d.ts.diff | 23 + ...portAssignments(module=nodenext).d.ts.diff | 23 + ...deDeclarationEmit(module=node16).d.ts.diff | 17 + ...DeclarationEmit(module=nodenext).d.ts.diff | 17 + ...elpersCollisions2(module=node16).d.ts.diff | 21 + ...persCollisions2(module=nodenext).d.ts.diff | 21 + ...elpersCollisions3(module=node16).d.ts.diff | 20 + ...persCollisions3(module=nodenext).d.ts.diff | 20 + ...eDeclarationEmit1(module=node16).d.ts.diff | 18 + ...eclarationEmit1(module=nodenext).d.ts.diff | 18 + .../diff/nullPropertyName.d.ts.diff | 3 +- .../diff/numericEnumMappedType.d.ts.diff | 3 +- ...alComputedNameNoDeclarationError.d.ts.diff | 21 + .../auto-fixed/diff/optionalMethods.d.ts.diff | 25 + .../diff/optionalProperties01.d.ts.map.diff | 16 + ...erDestructuringObjectLiteral.d.ts.map.diff | 16 + ...paramterDestrcuturingDeclaration.d.ts.diff | 22 + ...sNotBlockAliasSymbolCreation.d.ts.map.diff | 16 + ...rittenCorrectlyInDeclaration.d.ts.map.diff | 19 + ...structuredPropertyInFunctionType.d.ts.diff | 92 + ...ralObjectLiteralDeclaration1.d.ts.map.diff | 16 + .../diff/symbolDeclarationEmit12.d.ts.diff | 5 +- .../diff/symbolDeclarationEmit8.d.ts.map.diff | 16 + .../diff/symbolDeclarationEmit9.d.ts.map.diff | 16 + ...larationEmitModuleNamesImportRef.d.ts.diff | 3 +- ...atchingPolyfillsWorkTogether.d.ts.map.diff | 16 + .../diff/templateLiteralTypes2.d.ts.map.diff | 16 + .../diff/templateLiteralTypes4.d.ts.diff | 7 +- .../templateLiteralsInTypes.d.ts.map.diff | 16 + .../typeFromPropertyAssignment29.d.ts.diff | 44 +- .../typeGuardFunctionOfFormThis.d.ts.map.diff | 16 + .../typeofImportTypeOnlyExport.d.ts.map.diff | 18 + ...ersionsDeclarationEmit.multiFile.d.ts.diff | 3 +- ...mit.multiFileBackReferenceToSelf.d.ts.diff | 3 +- ...multiFileBackReferenceToUnmapped.d.ts.diff | 3 +- .../uniqueSymbolsDeclarationsErrors.d.ts.diff | 101 + ...queSymbolsDeclarationsErrors.d.ts.map.diff | 16 + .../auto-fixed/diff/vardecl.d.ts.map.diff | 16 + .../diff/variadicTuples1.d.ts.map.diff | 16 + .../diff/varianceAnnotations.d.ts.diff | 62 + .../diff/weakTypesAndLiterals01.d.ts.map.diff | 16 + .../diff/withExportDecl.d.ts.map.diff | 16 + ...cessorDeclarationEmitVisibilityErrors.d.ts | 30 + .../auto-fixed/dte/ambientConstLiterals.d.ts | 55 + ...yFakeFlatNoCrashInferenceDeclarations.d.ts | 1 - .../dte/coAndContraVariantInferences.d.ts.map | 41 + .../auto-fixed/dte/commentsFunction.d.ts | 82 + .../auto-fixed/dte/commentsVarDecl.d.ts.map | 42 + .../dte/computedEnumTypeWidening.d.ts | 1 - .../dte/computedPropertiesNarrowed.d.ts | 111 + .../auto-fixed/dte/conditionalTypes1.d.ts.map | 284 + .../auto-fixed/dte/constAssertions.d.ts.map | 139 + .../auto-fixed/dte/constEnum2.d.ts | 1 - ...edStringLiteralsInJsxAttributes01.d.ts.map | 30 + .../dte/controlFlowAliasing.d.ts.map | 162 + .../controlFlowAliasing.d.ts.map.formatted | 7857 +++++++++++++++++ .../auto-fixed/dte/correlatedUnions.d.ts | 503 ++ .../dte/declFileEmitDeclarationOnly.d.ts.map | 27 + .../auto-fixed/dte/declFileEnums.d.ts | 1 - .../dte/declFileRegressionTests.d.ts.map | 25 + .../declarationEmitAliasExportStar.d.ts.map | 40 + ...mitBindingPatternWithReservedWord.d.ts.map | 30 + .../declarationEmitBindingPatterns.d.ts.map | 24 + ...rationEmitBundleWithAmbientReferences.d.ts | 34 + ...ationEmitCommonJsModuleReferencedType.d.ts | 1 - ...mputedNameCausesImportToBePainted.d.ts.map | 34 + ...arationEmitComputedNameConstEnumAlias.d.ts | 33 + ...mitCrossFileImportTypeOfAmbientModule.d.ts | 23 + ...EmitDefaultExportWithStaticAssignment.d.ts | 5 - ...DestructuringObjectLiteralPattern.d.ts.map | 81 + ...estructuringObjectLiteralPattern1.d.ts.map | 51 + ...estructuringObjectLiteralPattern2.d.ts.map | 49 + ...nEmitDestructuringParameterProperties.d.ts | 1 - ...tDistributiveConditionalWithInfer.d.ts.map | 20 + ...itDuplicateParameterDestructuring.d.ts.map | 27 + ...arationEmitExpandoPropertyPrivateName.d.ts | 2 - ...EmitExportAliasVisibiilityMarking.d.ts.map | 50 + .../declarationEmitExpressionInExtends4.d.ts | 81 + .../declarationEmitExpressionInExtends7.d.ts | 27 + ...ationEmitForGlobalishSpecifierSymlink.d.ts | 1 - ...tionEmitForGlobalishSpecifierSymlink2.d.ts | 1 - ...ortingModuleAugmentationRetainsImport.d.ts | 39 + ...arationEmitFunctionDuplicateNamespace.d.ts | 1 - .../declarationEmitFunctionKeywordProp.d.ts | 1 - ...eclarationEmitGlobalThisPreserved.d.ts.map | 78 + .../dte/declarationEmitIndexTypeNotFound.d.ts | 35 + ...ionEmitInferredDefaultExportType2.d.ts.map | 25 + ...ionEmitInlinedDistributiveConditional.d.ts | 51 + .../declarationEmitKeywordDestructuring.d.ts | 112 + ...LambdaWithMissingTypeParameterNoCrash.d.ts | 41 + .../declarationEmitLateBoundAssignments.d.ts | 1 - .../declarationEmitLateBoundAssignments2.d.ts | 1 - ...ionEmitMappedPrivateTypeTypeParameter.d.ts | 39 + ...ionEmitMappedTypeTemplateTypeofSymbol.d.ts | 70 + .../declarationEmitNoNonRequiredParens.d.ts | 24 + ...rationEmitObjectAssignedDefaultExport.d.ts | 1 - ...rationEmitObjectLiteralAccessors1.d.ts.map | 37 + .../declarationEmitOptionalMethod.d.ts.map | 26 + .../dte/declarationEmitParameterProperty.d.ts | 19 + ...mitPrefersPathKindBasedOnBundling.d.ts.map | 33 + ...itPrefersPathKindBasedOnBundling2.d.ts.map | 37 + ...clarationEmitPropertyNumericStringKey.d.ts | 33 + ...clarationEmitReadonlyComputedProperty.d.ts | 72 + ...ecursiveConditionalAliasPreserved.d.ts.map | 21 + ...arationEmitReexportedSymlinkReference.d.ts | 2 - ...rationEmitReexportedSymlinkReference2.d.ts | 2 - ...rationEmitReexportedSymlinkReference3.d.ts | 2 - ...larationEmitRetainsJsdocyComments.d.ts.map | 55 + ...ionEmitReusesLambdaParameterNodes.d.ts.map | 22 + ...clarationEmitShadowingInferNotRenamed.d.ts | 39 + .../declarationEmitThisPredicates02.d.ts.map | 27 + ...itThisPredicatesWithPrivateName02.d.ts.map | 28 + ...TupleRestSignatureLeadingVariadic.d.ts.map | 20 + ...asTypeParameterExtendingUnknownSymbol.d.ts | 24 + ...nEmitTypeAliasWithTypeParameters1.d.ts.map | 22 + ...nEmitTypeAliasWithTypeParameters2.d.ts.map | 23 + ...EmitTypeParameterNameInOuterScope.d.ts.map | 29 + ...peParameterNameShadowedInternally.d.ts.map | 20 + .../dte/declarationEmitUnknownImport.d.ts | 33 + ...larationEmitWithDefaultAsComputedName.d.ts | 37 + ...arationEmitWithDefaultAsComputedName2.d.ts | 37 + ...tionEmitWithInvalidPackageJsonTypings.d.ts | 1 - .../dte/declarationFileOverwriteError.d.ts | 33 + .../auto-fixed/dte/declarationFiles.d.ts | 1 - ...arationsForFileShadowingGlobalNoError.d.ts | 44 + ...eInternalTypesProduceUniqueTypeParams.d.ts | 191 + ...AddsUndefinedWithStrictNullChecks.d.ts.map | 31 + ...signmentAssertionsWithObjectShortHand.d.ts | 44 + .../dependentDestructuredVariables.d.ts.map | 168 + .../dte/destructuredDeclarationEmit.d.ts.map | 54 + .../dte/destructuringInFunctionType.d.ts | 178 + ...duplicatePropertiesInTypeAssertions01.d.ts | 27 + ...duplicatePropertiesInTypeAssertions02.d.ts | 27 + .../auto-fixed/dte/dynamicNames.d.ts | 197 + .../dte/dynamicNamesErrors.d.ts.map | 48 + .../emitClassExpressionInDeclarationFile.d.ts | 137 + ...emitClassExpressionInDeclarationFile2.d.ts | 161 + .../auto-fixed/dte/emitMethodCalledNew.d.ts | 31 + .../dte/emptyTuplesTypeAssertion01.d.ts.map | 21 + .../dte/emptyTuplesTypeAssertion02.d.ts.map | 21 + .../auto-fixed/dte/enumClassification.d.ts | 1 - ...erWithTemplateLiteralsEmitDeclaration.d.ts | 1 - ...edReservedCompilerNamedIdentifier.d.ts.map | 46 + .../dte/exhaustiveSwitchStatements1.d.ts.map | 93 + ...ssignmentMembersVisibleInAugmentation.d.ts | 62 + .../dte/exportDefaultNamespace.d.ts | 1 - .../flatArrayNoExcessiveStackDepth.d.ts.map | 25 + .../dte/genericContextualTypes1.d.ts.map | 51 + .../auto-fixed/dte/genericDefaultsErrors.d.ts | 214 + .../auto-fixed/dte/giant.d.ts | 2412 +++++ ...clarationOutputGetsTruncatedWithError.d.ts | 36 + ...portTypeGenericArrowTypeParenthesized.d.ts | 34 + .../auto-fixed/dte/indexSignatures1.d.ts.map | 210 + .../auto-fixed/dte/inferTypes1.d.ts | 645 ++ .../inferTypesInvalidExtendsDeclaration.d.ts | 26 + .../dte/intraExpressionInferences.d.ts.map | 162 + .../auto-fixed/dte/intrinsics.d.ts | 59 + .../isomorphicMappedTypeInference.d.ts.map | 120 + ...ionWithDeclarationEmitPathSameAsInput.d.ts | 31 + .../auto-fixed/dte/keyofAndIndexedAccess.d.ts | 1713 ++++ ...dFunctionMemberAssignmentDeclarations.d.ts | 1 - .../leaveOptionalParameterAsWritten.d.ts.map | 42 + ...sExportsSpecifierGenerationConditions.d.ts | 1 - .../dte/mappedTypeConstraints2.d.ts.map | 53 + .../mappedTypeGenericIndexedAccess.d.ts.map | 53 + ...ricInstantiationPreservesHomomorphism.d.ts | 44 + ...nericInstantiationPreservesInlineForm.d.ts | 26 + .../dte/mappedTypeNoTypeNoCrash.d.ts | 34 + ...TypeWithAsClauseAndLateBoundProperty2.d.ts | 15 + .../dte/mixinClassesAnnotated.d.ts.map | 49 + ...portStarShadowingGlobalIsNameable.d.ts.map | 53 + .../auto-fixed/dte/namedTupleMembers.d.ts | 125 + .../auto-fixed/dte/noEmitOnError.d.ts | 23 + .../dte/nodeModuleReexportFromDottedPath.d.ts | 1 - ...portHelpersCollisions2(module=node16).d.ts | 75 + ...rtHelpersCollisions2(module=nodenext).d.ts | 75 + ...cksSpecifierResolution(module=node16).d.ts | 1 - ...sSpecifierResolution(module=nodenext).d.ts | 1 - ...ModulesExportsSourceTs(module=node16).d.ts | 3 - ...dulesExportsSourceTs(module=nodenext).d.ts | 3 - ...erGenerationConditions(module=node16).d.ts | 1 - ...GenerationConditions(module=nodenext).d.ts | 1 - ...ierGenerationDirectory(module=node16).d.ts | 1 - ...rGenerationDirectory(module=nodenext).d.ts | 1 - ...ifierGenerationPattern(module=node16).d.ts | 1 - ...ierGenerationPattern(module=nodenext).d.ts | 1 - ...ulesForbidenSyntax(module=node16).d.ts.map | 78 + ...esForbidenSyntax(module=nodenext).d.ts.map | 78 + ...dulesImportAssignments(module=node16).d.ts | 45 + ...lesImportAssignments(module=nodenext).d.ts | 45 + ...ypeModeDeclarationEmit(module=node16).d.ts | 33 + ...eModeDeclarationEmit(module=nodenext).d.ts | 33 + ...portHelpersCollisions2(module=node16).d.ts | 73 + ...rtHelpersCollisions2(module=nodenext).d.ts | 73 + ...portHelpersCollisions3(module=node16).d.ts | 64 + ...rtHelpersCollisions3(module=nodenext).d.ts | 64 + ...peModeDeclarationEmit1(module=node16).d.ts | 33 + ...ModeDeclarationEmit1(module=nodenext).d.ts | 33 + .../auto-fixed/dte/nullPropertyName.d.ts | 1 - .../auto-fixed/dte/numericEnumMappedType.d.ts | 1 - ...LiteralComputedNameNoDeclarationError.d.ts | 24 + .../auto-fixed/dte/optionalMethods.d.ts | 93 + .../dte/optionalProperties01.d.ts.map | 26 + ...rameterDestructuringObjectLiteral.d.ts.map | 25 + .../dte/paramterDestrcuturingDeclaration.d.ts | 47 + ...isDoesNotBlockAliasSymbolCreation.d.ts.map | 39 + ...portWrittenCorrectlyInDeclaration.d.ts.map | 53 + ...ingDestructuredPropertyInFunctionType.d.ts | 405 + ...gLiteralObjectLiteralDeclaration1.d.ts.map | 24 + .../dte/symbolDeclarationEmit12.d.ts | 1 - .../dte/symbolDeclarationEmit8.d.ts.map | 22 + .../dte/symbolDeclarationEmit9.d.ts.map | 22 + ...nkDeclarationEmitModuleNamesImportRef.d.ts | 1 - ...rMismatchingPolyfillsWorkTogether.d.ts.map | 28 + .../dte/templateLiteralTypes2.d.ts.map | 51 + .../auto-fixed/dte/templateLiteralTypes4.d.ts | 1 - .../dte/templateLiteralsInTypes.d.ts.map | 20 + .../dte/typeFromPropertyAssignment29.d.ts | 12 +- .../dte/typeGuardFunctionOfFormThis.d.ts.map | 75 + .../dte/typeofImportTypeOnlyExport.d.ts.map | 40 + ...ypesVersionsDeclarationEmit.multiFile.d.ts | 1 - ...tionEmit.multiFileBackReferenceToSelf.d.ts | 1 - ...Emit.multiFileBackReferenceToUnmapped.d.ts | 1 - .../dte/uniqueSymbolsDeclarationsErrors.d.ts | 181 + .../uniqueSymbolsDeclarationsErrors.d.ts.map | 65 + .../auto-fixed/dte/vardecl.d.ts.map | 96 + .../auto-fixed/dte/variadicTuples1.d.ts.map | 208 + .../auto-fixed/dte/varianceAnnotations.d.ts | 640 ++ .../dte/weakTypesAndLiterals01.d.ts.map | 33 + .../auto-fixed/dte/withExportDecl.d.ts.map | 44 + ...cessorDeclarationEmitVisibilityErrors.d.ts | 24 + .../auto-fixed/tsc/ambientConstLiterals.d.ts | 55 + .../tsc/coAndContraVariantInferences.d.ts.map | 41 + .../auto-fixed/tsc/commentsFunction.d.ts | 82 + .../auto-fixed/tsc/commentsVarDecl.d.ts.map | 42 + .../tsc/computedPropertiesNarrowed.d.ts | 107 + .../auto-fixed/tsc/conditionalTypes1.d.ts.map | 284 + .../auto-fixed/tsc/constAssertions.d.ts.map | 139 + ...edStringLiteralsInJsxAttributes01.d.ts.map | 30 + .../tsc/controlFlowAliasing.d.ts.map | 162 + .../controlFlowAliasing.d.ts.map.formatted | 7835 ++++++++++++++++ .../auto-fixed/tsc/correlatedUnions.d.ts | 503 ++ .../tsc/declFileEmitDeclarationOnly.d.ts.map | 27 + .../tsc/declFileRegressionTests.d.ts.map | 25 + .../declarationEmitAliasExportStar.d.ts.map | 40 + ...mitBindingPatternWithReservedWord.d.ts.map | 30 + .../declarationEmitBindingPatterns.d.ts.map | 24 + ...rationEmitBundleWithAmbientReferences.d.ts | 35 + ...mputedNameCausesImportToBePainted.d.ts.map | 34 + ...arationEmitComputedNameConstEnumAlias.d.ts | 32 + ...mitCrossFileImportTypeOfAmbientModule.d.ts | 24 + ...DestructuringObjectLiteralPattern.d.ts.map | 81 + ...estructuringObjectLiteralPattern1.d.ts.map | 51 + ...estructuringObjectLiteralPattern2.d.ts.map | 49 + ...tDistributiveConditionalWithInfer.d.ts.map | 20 + ...itDuplicateParameterDestructuring.d.ts.map | 27 + ...EmitExportAliasVisibiilityMarking.d.ts.map | 50 + .../declarationEmitExpressionInExtends4.d.ts | 65 + .../declarationEmitExpressionInExtends7.d.ts | 22 + ...ortingModuleAugmentationRetainsImport.d.ts | 40 + ...eclarationEmitGlobalThisPreserved.d.ts.map | 78 + .../tsc/declarationEmitIndexTypeNotFound.d.ts | 29 + ...ionEmitInferredDefaultExportType2.d.ts.map | 25 + ...ionEmitInlinedDistributiveConditional.d.ts | 47 + .../declarationEmitKeywordDestructuring.d.ts | 112 + ...LambdaWithMissingTypeParameterNoCrash.d.ts | 34 + ...ionEmitMappedPrivateTypeTypeParameter.d.ts | 34 + ...ionEmitMappedTypeTemplateTypeofSymbol.d.ts | 68 + .../declarationEmitNoNonRequiredParens.d.ts | 24 + ...rationEmitObjectLiteralAccessors1.d.ts.map | 37 + .../declarationEmitOptionalMethod.d.ts.map | 26 + .../tsc/declarationEmitParameterProperty.d.ts | 19 + ...mitPrefersPathKindBasedOnBundling.d.ts.map | 33 + ...itPrefersPathKindBasedOnBundling2.d.ts.map | 37 + ...clarationEmitPropertyNumericStringKey.d.ts | 33 + ...clarationEmitReadonlyComputedProperty.d.ts | 70 + ...ecursiveConditionalAliasPreserved.d.ts.map | 21 + ...larationEmitRetainsJsdocyComments.d.ts.map | 55 + ...ionEmitReusesLambdaParameterNodes.d.ts.map | 22 + ...clarationEmitShadowingInferNotRenamed.d.ts | 37 + .../declarationEmitThisPredicates02.d.ts.map | 27 + ...itThisPredicatesWithPrivateName02.d.ts.map | 28 + ...TupleRestSignatureLeadingVariadic.d.ts.map | 20 + ...asTypeParameterExtendingUnknownSymbol.d.ts | 20 + ...nEmitTypeAliasWithTypeParameters1.d.ts.map | 22 + ...nEmitTypeAliasWithTypeParameters2.d.ts.map | 23 + ...EmitTypeParameterNameInOuterScope.d.ts.map | 29 + ...peParameterNameShadowedInternally.d.ts.map | 20 + .../tsc/declarationEmitUnknownImport.d.ts | 28 + ...larationEmitWithDefaultAsComputedName.d.ts | 36 + ...arationEmitWithDefaultAsComputedName2.d.ts | 36 + .../tsc/declarationFileOverwriteError.d.ts | 28 + ...arationsForFileShadowingGlobalNoError.d.ts | 42 + ...eInternalTypesProduceUniqueTypeParams.d.ts | 188 + ...AddsUndefinedWithStrictNullChecks.d.ts.map | 31 + ...signmentAssertionsWithObjectShortHand.d.ts | 44 + .../dependentDestructuredVariables.d.ts.map | 168 + .../tsc/destructuredDeclarationEmit.d.ts.map | 54 + .../tsc/destructuringInFunctionType.d.ts | 178 + ...duplicatePropertiesInTypeAssertions01.d.ts | 26 + ...duplicatePropertiesInTypeAssertions02.d.ts | 26 + .../auto-fixed/tsc/dynamicNames.d.ts | 197 + .../tsc/dynamicNamesErrors.d.ts.map | 48 + .../emitClassExpressionInDeclarationFile.d.ts | 95 + ...emitClassExpressionInDeclarationFile2.d.ts | 127 + .../auto-fixed/tsc/emitMethodCalledNew.d.ts | 31 + .../tsc/emptyTuplesTypeAssertion01.d.ts.map | 21 + .../tsc/emptyTuplesTypeAssertion02.d.ts.map | 21 + ...edReservedCompilerNamedIdentifier.d.ts.map | 46 + .../tsc/exhaustiveSwitchStatements1.d.ts.map | 93 + ...ssignmentMembersVisibleInAugmentation.d.ts | 56 + .../flatArrayNoExcessiveStackDepth.d.ts.map | 25 + .../tsc/genericContextualTypes1.d.ts.map | 51 + .../auto-fixed/tsc/genericDefaultsErrors.d.ts | 172 + .../auto-fixed/tsc/giant.d.ts | 2408 +++++ ...clarationOutputGetsTruncatedWithError.d.ts | 25 + ...portTypeGenericArrowTypeParenthesized.d.ts | 35 + .../auto-fixed/tsc/indexSignatures1.d.ts.map | 210 + .../auto-fixed/tsc/inferTypes1.d.ts | 451 + .../inferTypesInvalidExtendsDeclaration.d.ts | 22 + .../tsc/intraExpressionInferences.d.ts.map | 162 + .../auto-fixed/tsc/intrinsics.d.ts | 49 + .../isomorphicMappedTypeInference.d.ts.map | 120 + ...ionWithDeclarationEmitPathSameAsInput.d.ts | 26 + .../auto-fixed/tsc/keyofAndIndexedAccess.d.ts | 1709 ++++ .../leaveOptionalParameterAsWritten.d.ts.map | 42 + .../tsc/mappedTypeConstraints2.d.ts.map | 53 + .../mappedTypeGenericIndexedAccess.d.ts.map | 53 + ...ricInstantiationPreservesHomomorphism.d.ts | 42 + ...nericInstantiationPreservesInlineForm.d.ts | 24 + .../tsc/mappedTypeNoTypeNoCrash.d.ts | 26 + ...TypeWithAsClauseAndLateBoundProperty2.d.ts | 107 + .../tsc/mixinClassesAnnotated.d.ts.map | 49 + ...portStarShadowingGlobalIsNameable.d.ts.map | 53 + .../auto-fixed/tsc/namedTupleMembers.d.ts | 125 + .../auto-fixed/tsc/noEmitOnError.d.ts | 19 + ...portHelpersCollisions2(module=node16).d.ts | 76 + ...rtHelpersCollisions2(module=nodenext).d.ts | 76 + ...ulesForbidenSyntax(module=node16).d.ts.map | 78 + ...esForbidenSyntax(module=nodenext).d.ts.map | 78 + ...dulesImportAssignments(module=node16).d.ts | 48 + ...lesImportAssignments(module=nodenext).d.ts | 48 + ...ypeModeDeclarationEmit(module=node16).d.ts | 33 + ...eModeDeclarationEmit(module=nodenext).d.ts | 33 + ...portHelpersCollisions2(module=node16).d.ts | 75 + ...rtHelpersCollisions2(module=nodenext).d.ts | 75 + ...portHelpersCollisions3(module=node16).d.ts | 66 + ...rtHelpersCollisions3(module=nodenext).d.ts | 66 + ...peModeDeclarationEmit1(module=node16).d.ts | 33 + ...ModeDeclarationEmit1(module=nodenext).d.ts | 33 + ...LiteralComputedNameNoDeclarationError.d.ts | 20 + .../auto-fixed/tsc/optionalMethods.d.ts | 93 + .../tsc/optionalProperties01.d.ts.map | 26 + ...rameterDestructuringObjectLiteral.d.ts.map | 25 + .../tsc/paramterDestrcuturingDeclaration.d.ts | 47 + ...isDoesNotBlockAliasSymbolCreation.d.ts.map | 39 + ...portWrittenCorrectlyInDeclaration.d.ts.map | 53 + ...ingDestructuredPropertyInFunctionType.d.ts | 405 + ...gLiteralObjectLiteralDeclaration1.d.ts.map | 24 + .../tsc/symbolDeclarationEmit8.d.ts.map | 22 + .../tsc/symbolDeclarationEmit9.d.ts.map | 22 + ...rMismatchingPolyfillsWorkTogether.d.ts.map | 28 + .../tsc/templateLiteralTypes2.d.ts.map | 51 + .../tsc/templateLiteralsInTypes.d.ts.map | 20 + .../tsc/typeGuardFunctionOfFormThis.d.ts.map | 75 + .../tsc/typeofImportTypeOnlyExport.d.ts.map | 40 + .../tsc/uniqueSymbolsDeclarationsErrors.d.ts | 117 + .../uniqueSymbolsDeclarationsErrors.d.ts.map | 65 + .../auto-fixed/tsc/vardecl.d.ts.map | 96 + .../auto-fixed/tsc/variadicTuples1.d.ts.map | 208 + .../auto-fixed/tsc/varianceAnnotations.d.ts | 642 ++ .../tsc/weakTypesAndLiterals01.d.ts.map | 33 + .../auto-fixed/tsc/withExportDecl.d.ts.map | 44 + ...accessorDeclarationEmitVisibilityErrors.ts | 1 + tests/cases/compiler/ambientConstLiterals.ts | 1 + .../compiler/coAndContraVariantInferences.ts | 1 + tests/cases/compiler/commentsFunction.ts | 1 + tests/cases/compiler/commentsVarDecl.ts | 1 + .../compiler/computedPropertiesNarrowed.ts | 1 + tests/cases/compiler/correlatedUnions.ts | 1 + .../compiler/declFileEmitDeclarationOnly.ts | 1 + .../cases/compiler/declFileRegressionTests.ts | 1 + .../declarationEmitAliasExportStar.ts | 1 + ...ationEmitBindingPatternWithReservedWord.ts | 1 + .../declarationEmitBindingPatterns.ts | 1 + ...larationEmitBundleWithAmbientReferences.ts | 1 + ...EmitComputedNameCausesImportToBePainted.ts | 1 + ...clarationEmitComputedNameConstEnumAlias.ts | 1 + ...nEmitCrossFileImportTypeOfAmbientModule.ts | 1 + ...onEmitDestructuringObjectLiteralPattern.ts | 1 + ...nEmitDestructuringObjectLiteralPattern1.ts | 1 + ...nEmitDestructuringObjectLiteralPattern2.ts | 1 + ...ionEmitDistributiveConditionalWithInfer.ts | 1 + ...tionEmitDuplicateParameterDestructuring.ts | 1 + ...rationEmitExportAliasVisibiilityMarking.ts | 1 + .../declarationEmitExpressionInExtends4.ts | 1 + .../declarationEmitExpressionInExtends7.ts | 1 + ...mportingModuleAugmentationRetainsImport.ts | 1 + .../declarationEmitGlobalThisPreserved.ts | 1 + .../declarationEmitIndexTypeNotFound.ts | 1 + ...clarationEmitInferredDefaultExportType2.ts | 1 + ...ationEmitInlinedDistributiveConditional.ts | 1 + .../declarationEmitKeywordDestructuring.ts | 1 + ...itLambdaWithMissingTypeParameterNoCrash.ts | 1 + ...ationEmitMappedPrivateTypeTypeParameter.ts | 1 + ...ationEmitMappedTypeTemplateTypeofSymbol.ts | 1 + .../declarationEmitNoNonRequiredParens.ts | 1 + .../declarationEmitObjectLiteralAccessors1.ts | 1 + .../compiler/declarationEmitOptionalMethod.ts | 1 + .../declarationEmitParameterProperty.ts | 1 + ...ationEmitPrefersPathKindBasedOnBundling.ts | 1 + ...tionEmitPrefersPathKindBasedOnBundling2.ts | 1 + ...declarationEmitPropertyNumericStringKey.ts | 1 + ...declarationEmitReadonlyComputedProperty.ts | 1 + ...nEmitRecursiveConditionalAliasPreserved.ts | 1 + .../declarationEmitRetainsJsdocyComments.ts | 1 + ...clarationEmitReusesLambdaParameterNodes.ts | 1 + ...declarationEmitShadowingInferNotRenamed.ts | 1 + ...onEmitTupleRestSignatureLeadingVariadic.ts | 1 + ...liasTypeParameterExtendingUnknownSymbol.ts | 1 + ...arationEmitTypeAliasWithTypeParameters1.ts | 1 + ...arationEmitTypeAliasWithTypeParameters2.ts | 1 + ...rationEmitTypeParameterNameInOuterScope.ts | 1 + ...EmitTypeParameterNameShadowedInternally.ts | 1 + .../compiler/declarationEmitUnknownImport.ts | 1 + ...eclarationEmitWithDefaultAsComputedName.ts | 1 + ...clarationEmitWithDefaultAsComputedName2.ts | 1 + .../compiler/declarationFileOverwriteError.ts | 1 + ...clarationsForFileShadowingGlobalNoError.ts | 1 + ...iveInternalTypesProduceUniqueTypeParams.ts | 1 + ...ameterAddsUndefinedWithStrictNullChecks.ts | 1 + tests/cases/compiler/dynamicNames.ts | 1 + tests/cases/compiler/dynamicNamesErrors.ts | 1 + .../emitClassExpressionInDeclarationFile.ts | 1 + .../emitClassExpressionInDeclarationFile2.ts | 1 + tests/cases/compiler/emitMethodCalledNew.ts | 1 + .../escapedReservedCompilerNamedIdentifier.ts | 1 + ...tAssignmentMembersVisibleInAugmentation.ts | 1 + .../flatArrayNoExcessiveStackDepth.ts | 1 + tests/cases/compiler/genericDefaultsErrors.ts | 1 + tests/cases/compiler/giant.ts | 1 + ...DeclarationOutputGetsTruncatedWithError.ts | 1 + ...importTypeGenericArrowTypeParenthesized.ts | 1 + tests/cases/compiler/intrinsics.ts | 1 + ...ationWithDeclarationEmitPathSameAsInput.ts | 1 + .../mappedTypeGenericIndexedAccess.ts | 1 + ...nericInstantiationPreservesHomomorphism.ts | 1 + ...GenericInstantiationPreservesInlineForm.ts | 1 + .../cases/compiler/mappedTypeNoTypeNoCrash.ts | 1 + ...edTypeWithAsClauseAndLateBoundProperty2.ts | 1 + ...tionExportStarShadowingGlobalIsNameable.ts | 1 + tests/cases/compiler/noEmitOnError.ts | 1 + ...ctLiteralComputedNameNoDeclarationError.ts | 1 + .../parameterDestructuringObjectLiteral.ts | 1 + .../paramterDestrcuturingDeclaration.ts | 1 + ...enthesisDoesNotBlockAliasSymbolCreation.ts | 1 + .../reexportWrittenCorrectlyInDeclaration.ts | 1 + ...amingDestructuredPropertyInFunctionType.ts | 1 + .../stringLiteralObjectLiteralDeclaration1.ts | 1 + ...bserverMismatchingPolyfillsWorkTogether.ts | 1 + .../cases/compiler/templateLiteralsInTypes.ts | 1 + tests/cases/compiler/vardecl.ts | 1 + tests/cases/compiler/withExportDecl.ts | 1 + .../classes/mixinClassesAnnotated.ts | 1 + .../controlFlow/controlFlowAliasing.ts | 1 + ...AssignmentAssertionsWithObjectShortHand.ts | 1 + .../dependentDestructuredVariables.ts | 1 + .../exhaustiveSwitchStatements1.ts | 1 + .../leaveOptionalParameterAsWritten.ts | 1 + .../declarationEmitThisPredicates02.ts | 1 + ...tionEmitThisPredicatesWithPrivateName02.ts | 1 + .../typeofImportTypeOnlyExport.ts | 1 + .../es6/Symbols/symbolDeclarationEmit8.ts | 2 + .../es6/Symbols/symbolDeclarationEmit9.ts | 1 + .../destructuringInFunctionType.ts | 1 + .../typeAssertions/constAssertions.ts | 1 + .../duplicatePropertiesInTypeAssertions01.ts | 1 + .../duplicatePropertiesInTypeAssertions02.ts | 1 + .../typeGuards/typeGuardFunctionOfFormThis.ts | 1 + ...eModulesAllowJsImportHelpersCollisions2.ts | 1 + .../node/nodeModulesForbidenSyntax.ts | 1 + .../node/nodeModulesImportAssignments.ts | 1 + ...ImportAttributesTypeModeDeclarationEmit.ts | 1 + .../nodeModulesImportHelpersCollisions2.ts | 1 + .../nodeModulesImportHelpersCollisions3.ts | 1 + ...deModulesImportTypeModeDeclarationEmit1.ts | 1 + .../salsa/typeFromPropertyAssignment29.ts | 2 +- .../types/conditional/conditionalTypes1.ts | 1 + .../types/conditional/inferTypes1.ts | 1 + .../inferTypesInvalidExtendsDeclaration.ts | 1 + ...lyTypedStringLiteralsInJsxAttributes01.tsx | 1 + .../types/keyof/keyofAndIndexedAccess.ts | 1 + .../types/literal/templateLiteralTypes2.ts | 1 + .../mapped/isomorphicMappedTypeInference.ts | 1 + .../types/mapped/mappedTypeConstraints2.ts | 1 + .../types/members/indexSignatures1.ts | 3 +- .../types/namedTypes/optionalMethods.ts | 1 + .../emptyTuples/emptyTuplesTypeAssertion01.ts | 1 + .../emptyTuples/emptyTuplesTypeAssertion02.ts | 1 + .../types/tuple/named/namedTupleMembers.ts | 1 + .../types/tuple/variadicTuples1.ts | 1 + .../typeParameterLists/varianceAnnotations.ts | 1 + .../comparable/optionalProperties01.ts | 1 + .../comparable/weakTypesAndLiterals01.ts | 1 + .../typeInference/genericContextualTypes1.ts | 1 + .../intraExpressionInferences.ts | 1 + .../uniqueSymbolsDeclarationsErrors.ts | 1 + 655 files changed, 47501 insertions(+), 204 deletions(-) create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/accessorDeclarationEmitVisibilityErrors.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientConstLiterals.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/coAndContraVariantInferences.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/commentsFunction.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/commentsVarDecl.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedPropertiesNarrowed.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/conditionalTypes1.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/constAssertions.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/contextuallyTypedStringLiteralsInJsxAttributes01.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/controlFlowAliasing.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/correlatedUnions.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileEmitDeclarationOnly.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileRegressionTests.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitAliasExportStar.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatternWithReservedWord.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatterns.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBundleWithAmbientReferences.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitComputedNameCausesImportToBePainted.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitComputedNameConstEnumAlias.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitCrossFileImportTypeOfAmbientModule.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDistributiveConditionalWithInfer.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDuplicateParameterDestructuring.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExportAliasVisibiilityMarking.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExpressionInExtends4.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExpressionInExtends7.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitGlobalThisPreserved.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitIndexTypeNotFound.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitInferredDefaultExportType2.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitInlinedDistributiveConditional.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitKeywordDestructuring.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitLambdaWithMissingTypeParameterNoCrash.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitMappedPrivateTypeTypeParameter.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitMappedTypeTemplateTypeofSymbol.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitNoNonRequiredParens.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitOptionalMethod.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitParameterProperty.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitPrefersPathKindBasedOnBundling2.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitPropertyNumericStringKey.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReadonlyComputedProperty.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitRecursiveConditionalAliasPreserved.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitRetainsJsdocyComments.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReusesLambdaParameterNodes.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitShadowingInferNotRenamed.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitThisPredicates02.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitThisPredicatesWithPrivateName02.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTupleRestSignatureLeadingVariadic.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeAliasTypeParameterExtendingUnknownSymbol.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeAliasWithTypeParameters1.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeAliasWithTypeParameters2.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeParameterNameInOuterScope.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeParameterNameShadowedInternally.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitUnknownImport.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitWithDefaultAsComputedName.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitWithDefaultAsComputedName2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFileOverwriteError.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationsForFileShadowingGlobalNoError.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/defaultParameterAddsUndefinedWithStrictNullChecks.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/definiteAssignmentAssertionsWithObjectShortHand.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/dependentDestructuredVariables.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuredDeclarationEmit.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringInFunctionType.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/duplicatePropertiesInTypeAssertions01.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/duplicatePropertiesInTypeAssertions02.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/dynamicNames.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/dynamicNamesErrors.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/emitClassExpressionInDeclarationFile.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/emitClassExpressionInDeclarationFile2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/emitMethodCalledNew.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/emptyTuplesTypeAssertion01.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/emptyTuplesTypeAssertion02.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/escapedReservedCompilerNamedIdentifier.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/exhaustiveSwitchStatements1.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportAssignmentMembersVisibleInAugmentation.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/flatArrayNoExcessiveStackDepth.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/genericContextualTypes1.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/genericDefaultsErrors.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/giant.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/hugeDeclarationOutputGetsTruncatedWithError.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/importTypeGenericArrowTypeParenthesized.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/indexSignatures1.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/inferTypes1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/inferTypesInvalidExtendsDeclaration.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/intraExpressionInferences.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/intrinsics.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/isomorphicMappedTypeInference.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/jsFileCompilationWithDeclarationEmitPathSameAsInput.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/keyofAndIndexedAccess.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/leaveOptionalParameterAsWritten.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeConstraints2.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeGenericIndexedAccess.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeGenericInstantiationPreservesHomomorphism.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeGenericInstantiationPreservesInlineForm.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeNoTypeNoCrash.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/mixinClassesAnnotated.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/moduleDeclarationExportStarShadowingGlobalIsNameable.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/namedTupleMembers.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/noEmitOnError.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesAllowJsImportHelpersCollisions2(module=node16).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesAllowJsImportHelpersCollisions2(module=nodenext).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesForbidenSyntax(module=node16).d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesForbidenSyntax(module=nodenext).d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportAssignments(module=node16).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportAssignments(module=nodenext).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportHelpersCollisions2(module=node16).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportHelpersCollisions2(module=nodenext).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportHelpersCollisions3(module=node16).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportHelpersCollisions3(module=nodenext).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/objectLiteralComputedNameNoDeclarationError.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/optionalMethods.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/optionalProperties01.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parameterDestructuringObjectLiteral.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/paramterDestrcuturingDeclaration.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/parenthesisDoesNotBlockAliasSymbolCreation.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/reexportWrittenCorrectlyInDeclaration.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/renamingDestructuredPropertyInFunctionType.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/stringLiteralObjectLiteralDeclaration1.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolDeclarationEmit8.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolDeclarationEmit9.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateLiteralTypes2.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateLiteralsInTypes.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeGuardFunctionOfFormThis.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeofImportTypeOnlyExport.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/uniqueSymbolsDeclarationsErrors.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/uniqueSymbolsDeclarationsErrors.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/vardecl.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/variadicTuples1.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/varianceAnnotations.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/weakTypesAndLiterals01.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/withExportDecl.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/accessorDeclarationEmitVisibilityErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/ambientConstLiterals.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/coAndContraVariantInferences.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/commentsFunction.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/commentsVarDecl.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedPropertiesNarrowed.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/conditionalTypes1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/constAssertions.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/contextuallyTypedStringLiteralsInJsxAttributes01.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/controlFlowAliasing.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/controlFlowAliasing.d.ts.map.formatted create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/correlatedUnions.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEmitDeclarationOnly.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileRegressionTests.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitAliasExportStar.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatternWithReservedWord.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatterns.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBundleWithAmbientReferences.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitComputedNameCausesImportToBePainted.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitComputedNameConstEnumAlias.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCrossFileImportTypeOfAmbientModule.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDistributiveConditionalWithInfer.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDuplicateParameterDestructuring.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExportAliasVisibiilityMarking.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpressionInExtends4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpressionInExtends7.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitGlobalThisPreserved.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitIndexTypeNotFound.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitInferredDefaultExportType2.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitInlinedDistributiveConditional.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitKeywordDestructuring.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLambdaWithMissingTypeParameterNoCrash.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitMappedPrivateTypeTypeParameter.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitMappedTypeTemplateTypeofSymbol.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitNoNonRequiredParens.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitOptionalMethod.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitParameterProperty.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPrefersPathKindBasedOnBundling2.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPropertyNumericStringKey.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReadonlyComputedProperty.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitRecursiveConditionalAliasPreserved.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitRetainsJsdocyComments.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReusesLambdaParameterNodes.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitShadowingInferNotRenamed.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitThisPredicates02.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitThisPredicatesWithPrivateName02.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitTupleRestSignatureLeadingVariadic.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitTypeAliasTypeParameterExtendingUnknownSymbol.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitTypeAliasWithTypeParameters1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitTypeAliasWithTypeParameters2.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitTypeParameterNameInOuterScope.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitTypeParameterNameShadowedInternally.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitUnknownImport.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithDefaultAsComputedName.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithDefaultAsComputedName2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFileOverwriteError.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationsForFileShadowingGlobalNoError.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/defaultParameterAddsUndefinedWithStrictNullChecks.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/definiteAssignmentAssertionsWithObjectShortHand.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/dependentDestructuredVariables.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuredDeclarationEmit.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringInFunctionType.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicatePropertiesInTypeAssertions01.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/duplicatePropertiesInTypeAssertions02.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/dynamicNames.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/dynamicNamesErrors.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitClassExpressionInDeclarationFile.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitClassExpressionInDeclarationFile2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitMethodCalledNew.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/emptyTuplesTypeAssertion01.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/emptyTuplesTypeAssertion02.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/escapedReservedCompilerNamedIdentifier.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/exhaustiveSwitchStatements1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentMembersVisibleInAugmentation.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/flatArrayNoExcessiveStackDepth.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/genericContextualTypes1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/genericDefaultsErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/giant.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/hugeDeclarationOutputGetsTruncatedWithError.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/importTypeGenericArrowTypeParenthesized.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/indexSignatures1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/inferTypes1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/inferTypesInvalidExtendsDeclaration.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/intraExpressionInferences.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/intrinsics.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/isomorphicMappedTypeInference.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/jsFileCompilationWithDeclarationEmitPathSameAsInput.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/keyofAndIndexedAccess.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/leaveOptionalParameterAsWritten.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeConstraints2.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeGenericIndexedAccess.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeGenericInstantiationPreservesHomomorphism.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeGenericInstantiationPreservesInlineForm.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeNoTypeNoCrash.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixinClassesAnnotated.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleDeclarationExportStarShadowingGlobalIsNameable.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/namedTupleMembers.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/noEmitOnError.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesAllowJsImportHelpersCollisions2(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesAllowJsImportHelpersCollisions2(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesForbidenSyntax(module=node16).d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesForbidenSyntax(module=nodenext).d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportAssignments(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportAssignments(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportHelpersCollisions2(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportHelpersCollisions2(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportHelpersCollisions3(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportHelpersCollisions3(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/objectLiteralComputedNameNoDeclarationError.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalMethods.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalProperties01.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parameterDestructuringObjectLiteral.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/paramterDestrcuturingDeclaration.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/parenthesisDoesNotBlockAliasSymbolCreation.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportWrittenCorrectlyInDeclaration.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/renamingDestructuredPropertyInFunctionType.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/stringLiteralObjectLiteralDeclaration1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit8.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit9.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes2.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralsInTypes.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeGuardFunctionOfFormThis.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeofImportTypeOnlyExport.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/uniqueSymbolsDeclarationsErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/uniqueSymbolsDeclarationsErrors.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/vardecl.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/variadicTuples1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/varianceAnnotations.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/weakTypesAndLiterals01.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/withExportDecl.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/accessorDeclarationEmitVisibilityErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/ambientConstLiterals.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/coAndContraVariantInferences.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commentsFunction.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commentsVarDecl.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/computedPropertiesNarrowed.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/conditionalTypes1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constAssertions.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/contextuallyTypedStringLiteralsInJsxAttributes01.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/controlFlowAliasing.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/controlFlowAliasing.d.ts.map.formatted create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/correlatedUnions.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileEmitDeclarationOnly.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileRegressionTests.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitAliasExportStar.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternWithReservedWord.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatterns.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBundleWithAmbientReferences.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitComputedNameCausesImportToBePainted.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitComputedNameConstEnumAlias.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCrossFileImportTypeOfAmbientModule.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDistributiveConditionalWithInfer.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDuplicateParameterDestructuring.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExportAliasVisibiilityMarking.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpressionInExtends4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpressionInExtends7.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitGlobalThisPreserved.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitIndexTypeNotFound.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitInferredDefaultExportType2.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitInlinedDistributiveConditional.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitKeywordDestructuring.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLambdaWithMissingTypeParameterNoCrash.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitMappedPrivateTypeTypeParameter.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitMappedTypeTemplateTypeofSymbol.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitNoNonRequiredParens.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectLiteralAccessors1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitOptionalMethod.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitParameterProperty.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPrefersPathKindBasedOnBundling2.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPropertyNumericStringKey.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReadonlyComputedProperty.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitRecursiveConditionalAliasPreserved.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitRetainsJsdocyComments.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReusesLambdaParameterNodes.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitShadowingInferNotRenamed.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitThisPredicates02.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitThisPredicatesWithPrivateName02.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitTupleRestSignatureLeadingVariadic.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitTypeAliasTypeParameterExtendingUnknownSymbol.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitTypeAliasWithTypeParameters1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitTypeAliasWithTypeParameters2.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitTypeParameterNameInOuterScope.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitTypeParameterNameShadowedInternally.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitUnknownImport.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitWithDefaultAsComputedName.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitWithDefaultAsComputedName2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFileOverwriteError.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationsForFileShadowingGlobalNoError.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/defaultParameterAddsUndefinedWithStrictNullChecks.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/definiteAssignmentAssertionsWithObjectShortHand.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/dependentDestructuredVariables.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuredDeclarationEmit.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringInFunctionType.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicatePropertiesInTypeAssertions01.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/duplicatePropertiesInTypeAssertions02.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/dynamicNames.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/dynamicNamesErrors.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emitClassExpressionInDeclarationFile.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emitClassExpressionInDeclarationFile2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emitMethodCalledNew.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emptyTuplesTypeAssertion01.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emptyTuplesTypeAssertion02.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/escapedReservedCompilerNamedIdentifier.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exhaustiveSwitchStatements1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignmentMembersVisibleInAugmentation.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/flatArrayNoExcessiveStackDepth.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/genericContextualTypes1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/genericDefaultsErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/giant.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/hugeDeclarationOutputGetsTruncatedWithError.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/importTypeGenericArrowTypeParenthesized.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/indexSignatures1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/inferTypes1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/inferTypesInvalidExtendsDeclaration.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/intraExpressionInferences.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/intrinsics.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isomorphicMappedTypeInference.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/jsFileCompilationWithDeclarationEmitPathSameAsInput.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/keyofAndIndexedAccess.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/leaveOptionalParameterAsWritten.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeConstraints2.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeGenericIndexedAccess.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeGenericInstantiationPreservesHomomorphism.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeGenericInstantiationPreservesInlineForm.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeNoTypeNoCrash.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mixinClassesAnnotated.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleDeclarationExportStarShadowingGlobalIsNameable.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/namedTupleMembers.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noEmitOnError.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesAllowJsImportHelpersCollisions2(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesAllowJsImportHelpersCollisions2(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesForbidenSyntax(module=node16).d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesForbidenSyntax(module=nodenext).d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportAssignments(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportAssignments(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportHelpersCollisions2(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportHelpersCollisions2(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportHelpersCollisions3(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportHelpersCollisions3(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/objectLiteralComputedNameNoDeclarationError.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalMethods.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalProperties01.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parameterDestructuringObjectLiteral.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/paramterDestrcuturingDeclaration.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parenthesisDoesNotBlockAliasSymbolCreation.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reexportWrittenCorrectlyInDeclaration.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/renamingDestructuredPropertyInFunctionType.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/stringLiteralObjectLiteralDeclaration1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit8.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit9.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralTypes2.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralsInTypes.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeGuardFunctionOfFormThis.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeofImportTypeOnlyExport.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/uniqueSymbolsDeclarationsErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/uniqueSymbolsDeclarationsErrors.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/vardecl.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/variadicTuples1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/varianceAnnotations.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/weakTypesAndLiterals01.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/withExportDecl.d.ts.map diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 760f7a9ad7cd3..c27b375e410b9 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -523,7 +523,7 @@ export function createLocalInferenceResolver({ return { flags: accessorType.flags, type: factory.createPropertySignature( - setAccessor ? [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : [], + setAccessor === undefined ? [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : [], name, /*questionToken*/ undefined, accessorType.typeNode, diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index fe394b2602b65..3057bd961c630 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -1170,6 +1170,8 @@ export namespace Compiler { ) { let code = ""; code += "//// [" + header + "] ////\r\n\r\n"; + 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); diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 5482fb2a92cdf..39d21a5a7a4f1 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -535,12 +535,14 @@ class IsolatedDeclarationTest extends CompilerTestBase { 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)); @@ -686,7 +688,7 @@ class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest { const existingTransformedTest = IO.readFile(autoFixCacheTest); const hash = ts.sys.createHash!(env.testCaseContent.sourceCode); const fixedTest = existingTransformedTest && TestCaseParser.makeUnitsFromTest(existingTransformedTest, compilerEnvironment.fileName); - let transformSucceeded = false; + let transformSucceeded = true; let hasReferenceDirectiveErrors = false; if (fixedTest && fixedTest.settings.hash === hash) { transformSucceeded = fixedTest.settings.succeeded !== "false"; 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/ambientConstLiterals.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientConstLiterals.d.ts.diff new file mode 100644 index 0000000000000..a2c2f42555912 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/ambientConstLiterals.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: TODO: Printing differences. Seems avoidable.]] //// + +//// [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 index 6fd29874ef5fb..39ee065eee5fe 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,11 +1,24 @@ +@@ -1,11 +1,23 @@ + +//// [arrayFakeFlatNoCrashInferenceDeclarations.d.ts] @@ -18,7 +18,6 @@ +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. @@ -31,7 +30,7 @@ "done": Arr, "recur": Arr extends ReadonlyArray ? BadFlatArray -@@ -19,6 +32,8 @@ +@@ -19,6 +31,8 @@ function foo(arr: T[], depth: number) { ~~~ 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,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,EAC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vbkIgPSB7IHBheWxvYWQ6IHRydWUgfSBhcyBBY3Rpb248J0FDVElPTl9CJywgYm9vbGVhbj47CgpmdW5jdGlvbiBjYWxsPFROYW1lIGV4dGVuZHMgc3RyaW5nLFRQYXlsb2FkPigKICBhY3Rpb246IEFjdGlvbjxUTmFtZSxUUGF5bG9hZD4sCiAgZm46IChhY3Rpb246IEFjdGlvbjxUTmFtZSxUUGF5bG9hZD4pPT4gYW55LAopOiB2b2lkIHsKICBmbihhY3Rpb24pOwp9Cgpjb25zdCBwcmludEZuID0gKGFjdGlvbjogdHlwZW9mIGFjdGlvbkEgfCB0eXBlb2YgYWN0aW9uQik6IHZvaWQ9PiBjb25zb2xlLmxvZyhhY3Rpb24pOwoKY2FsbChhY3Rpb25BLCBwcmludEZuKTsKY2FsbChhY3Rpb25CLCBwcmludEZuKTsK + 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,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"} ++{"version":3,"file":"commentsVarDecl.d.ts","sourceRoot":"","sources":["commentsVarDecl.ts"],"names":[],"mappings":"AAAA,uBAAuB;AACv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qLyAvKiBtdWx0aXBsZSB0cmFpbGluZyBjb21tZW50cyAqLwoKLyoqIFRyaXBsZSBzbGFzaCBtdWx0aWxpbmUgY29tbWVudCovCi8qKiBhbm90aGVyIGxpbmUgaW4gdGhlIGNvbW1lbnQqLwovKiogY29tbWVudCBsaW5lIDIqLwp2YXIgeCA9IDcwOyAvKiBtdWx0aWxpbmUgdHJhaWxpbmcgY29tbWVudCAKdGhpcyBpcyBtdWx0aWxpbmUgdHJhaWxpbmcgY29tbWVudCAqLwovKiogVHJpcGxlIHNsYXNoIGNvbW1lbnQgb24gdGhlIGFzc2lnbm1lbnQgc2hvdWxkbnQgYmUgaW4gLmQudHMgZmlsZSovCnggPSBteVZhcmlhYmxlOwoKLyoqIHRyaXBsZSBzbGFzaCBjb21tZW50MSovCi8qKiBqc2RvY3N0eWxlIGNvbW1lbnQgLSBvbmx5IHRoaXMgY29tbWVudCBzaG91bGQgYmUgaW4gLmQudHMgZmlsZSovCnZhciBuID0gMzA7CgovKiogdmFyIGRlY2thcmF0aW9uIHdpdGggY29tbWVudCBvbiB0eXBlIGFzIHdlbGwqLwp2YXIgeSA9IC8qKiB2YWx1ZSBjb21tZW50ICovIDIwOwoKLy8vIHZhciBkZWNrYXJhdGlvbiB3aXRoIGNvbW1lbnQgb24gdHlwZSBhcyB3ZWxsCnZhciB5eSA9CiAgICAvLy8gdmFsdWUgY29tbWVudAogICAgMjA7CgovKiogY29tbWVudDIgKi8KdmFyIHogPSAvKiogbGFtYmRhIGNvbW1lbnQgKi8gKHg6IG51bWJlciwgeTogbnVtYmVyKTogbnVtYmVyID0+IHggKyB5OwoKdmFyIHoyOiAvKiogdHlwZSBjb21tZW50Ki8gKHg6IG51bWJlcikgPT4gc3RyaW5nOwoKdmFyIHgyOiAoeDogbnVtYmVyKSA9PiBzdHJpbmcgPSB6MjsKCnZhciBuNDogKHg6IG51bWJlcikgPT4gc3RyaW5nOwpuNCA9IHoyOw== ++//// https://sokra.github.io/source-map-visualization#base64,Lyo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IDIwOwoKLy8vIHZhciBkZWNrYXJhdGlvbiB3aXRoIGNvbW1lbnQgb24gdHlwZSBhcyB3ZWxsCnZhciB5eSA9CiAgICAvLy8gdmFsdWUgY29tbWVudAogICAgMjA7CgovKiogY29tbWVudDIgKi8KdmFyIHogPSAvKiogbGFtYmRhIGNvbW1lbnQgKi8gKHg6IG51bWJlciwgeTogbnVtYmVyKTogbnVtYmVyID0+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 index f4dd9a54c35a5..3ca6be61428b2 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -39,5 +39,100 @@ +@@ -39,5 +39,99 @@ B, C } @@ -13,7 +13,6 @@ -//# sourceMappingURL=computedEnumTypeWidening.d.ts.map \ No newline at end of file +//# sourceMappingURL=computedEnumTypeWidening.d.ts.map -+ +/// [Errors] //// + +computedEnumTypeWidening.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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..b0b78a5879f79 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/conditionalTypes1.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [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,CAA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ICB9W107Cn0gPSB7bzogMSwgYjogMiwgYzogW3thOiAxLCBjOiAnMjEzJ31dfQphc3NpZ24oYSwge286IDIsIGM6IHswOiB7YTogMiwgYzogJzIxMzEyMyd9fX0pCgovLyBSZXByb3MgZnJvbSAjMjM4NDMKCnR5cGUgV2VpcmQxID0gKDxVIGV4dGVuZHMgYm9vbGVhbj4oYTogVSkgPT4gbmV2ZXIpIGV4dGVuZHMgCiAgICAoPFUgZXh0ZW5kcyB0cnVlPihhOiBVKSA9PiBuZXZlcikgPyBuZXZlciA6IG5ldmVyOwoKdHlwZSBXZWlyZDIgPSAoPFUgZXh0ZW5kcyBib29sZWFuPihhOiBVKSA9PiBVKSBleHRlbmRzIAogICAgKDxVIGV4dGVuZHMgdHJ1ZT4oYTogVSkgPT4gaW5mZXIgVCkgPyBUIDogbmV2ZXI7Cg== + 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..671f314e75f0b --- /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,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Y29uc3QgYWN0aW9uID0gdmVyaWZ5ID8gYHZlcmlmeWAgOiBgd3JpdGVgOwogICAgY29uc3QgY29udGVudE1hdGNoID0gY29udGVudE1hdGNoZXMgPyBgbWF0Y2hgIDogYG5vbk1hdGNoYDsKICAgIGNvbnN0IG91dGNvbWUgPSBgJHthY3Rpb259XyR7Y29udGVudE1hdGNofWAgYXMgY29uc3Q7CiAgICByZXR1cm4gb3V0Y29tZTsKfQoKZnVuY3Rpb24gYWNjZXNzb3JOYW1lczxTIGV4dGVuZHMgc3RyaW5nPihwcm9wTmFtZTogUyk6IHJlYWRvbmx5IFtgZ2V0LSR7U31gLCBgc2V0LSR7U31gXSB7CiAgICByZXR1cm4gW2BnZXQtJHtwcm9wTmFtZX1gLCBgc2V0LSR7cHJvcE5hbWV9YF0gYXMgY29uc3Q7Cn0KCmNvbnN0IG5zMTogcmVhZG9ubHkgWyJnZXQtZm9vIiwgInNldC1mb28iXSA9IGFjY2Vzc29yTmFtZXMoJ2ZvbycpOwoKLy8gcmVwcm8gZnJvbSBodHRwczovL2dpdGh1Yi5jb20vbWljcm9zb2Z0L1R5cGVTY3JpcHQvaXNzdWVzLzU0Mzc0CmludGVyZmFjZSBGb281NDM3NCB7CiAgYTogMTsKICBiOiAyOwp9Cgpjb25zdCBmb29Db25zdDU0Mzc0OiBGb281NDM3NCA9IHsKICBhOiAxLAogIGI6IDMKfSBhcyBjb25zdAo= + 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 index 0384f0e1128c0..7e53435c70aa0 100644 --- 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 @@ -5,12 +5,9 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -8,16 +8,20 @@ - f, - g +@@ -10,14 +10,17 @@ } //# sourceMappingURL=constEnum2.d.ts.map -+ /// [Errors] //// +constEnum2.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -27,7 +24,7 @@ // 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 +30,19 @@ +@@ -26,13 +29,19 @@ const CONST: number = 9000 % 2; const enum D { d = 10, 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":[],"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liasing.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/controlFlowAliasing.d.ts.map.diff new file mode 100644 index 0000000000000..b4096fcaca162 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/controlFlowAliasing.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/controlFlow/controlFlowAliasing.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [controlFlowAliasing.d.ts.map] +-{"version":3,"file":"controlFlowAliasing.d.ts","sourceRoot":"","sources":["controlFlowAliasing.ts"],"names":[],"mappings":"AAEA,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQrC;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,CAK7B;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAS/C;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAU/C;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAGxD;AAED,iBAAS,GAAG,CAAC,GAAG,EAAE;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,IAAI,CAKvD;AAED,iBAAS,GAAG,CAAC,GAAG,EAAE;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,IAAI,CAMvD;AAED,iBAAS,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,IAAI,CAKlD;AAED,iBAAS,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,I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PSBvdXRlci5vYmoua2luZCA9PT0gJ2Zvbyc7CiAgICBpZiAoaXNGb28pIHsKICAgICAgICBvdXRlci5vYmouZm9vOyAgLy8gTm90IG5hcnJvd2VkIGJlY2F1c2Ugb2JqIGlzIG11dGFibGUKICAgIH0KICAgIGVsc2UgewogICAgICAgIG91dGVyLm9iai5iYXI7ICAvLyBOb3QgbmFycm93ZWQgYmVjYXVzZSBvYmogaXMgbXV0YWJsZQogICAgfQp9CgpmdW5jdGlvbiBmMjgob2JqPzogeyBraW5kOiAnZm9vJywgZm9vOiBzdHJpbmcgfSB8IHsga2luZDogJ2JhcicsIGJhcjogbnVtYmVyIH0pOiB2b2lkIHsKICAgIGNvbnN0IGlzRm9vID0gb2JqICYmIG9iai5raW5kID09PSAnZm9vJzsKICAgIGNvbnN0IGlzQmFyID0gb2JqICYmIG9iai5raW5kID09PSAnYmFyJzsKICAgIGlmIChpc0ZvbykgewogICAgICAgIG9iai5mb287CiAgICB9CiAgICBpZiAoaXNCYXIpIHsKICAgICAgICBvYmouYmFyOwogICAgfQp9CgovLyBOYXJyb3dpbmcgYnkgYWxpYXNlZCBkaXNjcmltaW5hbnQgcHJvcGVydHkgYWNjZXNzCgpmdW5jdGlvbiBmMzAob2JqOiB7IGtpbmQ6ICdmb28nLCBmb286IHN0cmluZyB9IHwgeyBraW5kOiAnYmFyJywgYmFyOiBudW1iZXIgfSk6IHZvaWQgewogICAgY29uc3Qga2luZCA9IG9iai5raW5kOwogICAgaWYgKGtpbmQgPT09ICdmb28nKSB7CiAgICAgICAgb2JqLmZvbzsKICAgIH0KICAgIGVsc2UgewogICAgICAgIG9iai5iYXI7CiAgICB9Cn0KCmZ1bmN0aW9uIGYzMShvYmo6IHsga2luZDogJ2ZvbycsIGZvbzogc3RyaW5nIH0gfCB7IGtpbmQ6ICdiYXInLCBiYXI6IG51bWJlciB9KTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQgfSA9IG9iajsKICAgIGlmIChraW5kID09PSAnZm9vJykgewogICAgICAgIG9iai5mb287CiAgICB9CiAgICBlbHNlIHsKICAgICAgICBvYmouYmFyOwogICAgfQp9CgpmdW5jdGlvbiBmMzIob2JqOiB7IGtpbmQ6ICdmb28nLCBmb286IHN0cmluZyB9IHwgeyBraW5kOiAnYmFyJywgYmFyOiBudW1iZXIgfSk6IHZvaWQgewogICAgY29uc3QgeyBraW5kOiBrIH0gPSBvYmo7CiAgICBpZiAoayA9PT0gJ2ZvbycpIHsKICAgICAgICBvYmouZm9vOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgb2JqLmJhcjsKICAgIH0KfQoKZnVuY3Rpb24gZjMzKG9iajogeyBraW5kOiAnZm9vJywgZm9vOiBzdHJpbmcgfSB8IHsga2luZDogJ2JhcicsIGJhcjogbnVtYmVyIH0pOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCB9ID0gb2JqOwogICAgc3dpdGNoIChraW5kKSB7CiAgICAgICAgY2FzZSAnZm9vJzogb2JqLmZvbzsgYnJlYWs7CiAgICAgICAgY2FzZSAnYmFyJzogb2JqLmJhcjsgYnJlYWs7CiAgICB9Cn0KCgpjbGFzcyBDMTAgewogICAgY29uc3RydWN0b3IocmVhZG9ubHkgeDogc3RyaW5nIHwgbnVtYmVyKSB7CiAgICAgICAgY29uc3QgdGhpc1hfaXNTdHJpbmcgPSB0eXBlb2YgdGhpcy54ID09PSAnc3RyaW5nJzsKICAgICAgICBjb25zdCB4SXNTdHJpbmcgPSB0eXBlb2YgeCA9PT0gJ3N0cmluZyc7CiAgICAgICAgaWYgKHRoaXNYX2lzU3RyaW5nICYmIHhJc1N0cmluZykgewogICAgICAgICAgICBsZXQgczogc3RyaW5nOwogICAgICAgICAgICBzID0gdGhpcy54OwogICAgICAgICAgICBzID0geDsKICAgICAgICB9CiAgICB9Cn0KCmNsYXNzIEMxMSB7CiAgICBjb25zdHJ1Y3RvcihyZWFkb25seSB4OiBzdHJpbmcgfCBudW1iZXIpIHsKICAgICAgICBjb25zdCB0aGlzWF9pc1N0cmluZyA9IHR5cGVvZiB0aGlzLnggPT09ICdzdHJpbmcnOwogICAgICAgIGNvbnN0IHhJc1N0cmluZyA9IHR5cGVvZiB4ID09PSAnc3RyaW5nJzsKICAgICAgICBpZiAodGhpc1hfaXNTdHJpbmcgJiYgeElzU3RyaW5nKSB7CiAgICAgICAgICAgIC8vIFNvbWUgbmFycm93aW5ncyBtYXkgYmUgaW52YWxpZGF0ZWQgZHVlIHRvIGxhdGVyIGFzc2lnbm1lbnRzLgogICAgICAgICAgICBsZXQgczogc3RyaW5nOwogICAgICAgICAgICBzID0gdGhpcy54OwogICAgICAgICAgICBzID0geDsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHRoaXMueCA9IDEwOwogICAgICAgICAgICB4ID0gMTA7CiAgICAgICAgfQogICAgfQp9CgovLyBNaXhpbmcgb2YgYWxpYXNlZCBkaXNjcmltaW5hbnRzIGFuZCBjb25kaXRpb25hbHMKCmZ1bmN0aW9uIGY0MChvYmo6IHsga2luZDogJ2ZvbycsIGZvbz86IHN0cmluZyB9IHwgeyBraW5kOiAnYmFyJywgYmFyPzogbnVtYmVyIH0pOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCB9ID0gb2JqOwogICAgY29uc3QgaXNGb28gPSBraW5kID09ICdmb28nOwogICAgaWYgKGlzRm9vICYmIG9iai5mb28pIHsKICAgICAgICBsZXQgdDogc3RyaW5nID0gb2JqLmZvbzsKICAgIH0KfQoKLy8gVW5zdXBwb3J0ZWQgbmFycm93aW5nIG9mIGRlc3RydWN0dXJlZCBwYXlsb2FkIGJ5IGRlc3RydWN0dXJlZCBkaXNjcmltaW5hbnQKCnR5cGUgRGF0YSA9IHsga2luZDogJ3N0cicsIHBheWxvYWQ6IHN0cmluZyB9IHwgeyBraW5kOiAnbnVtJywgcGF5bG9hZDogbnVtYmVyIH07CgpmdW5jdGlvbiBnZzIob2JqOiBEYXRhKTogdm9pZCB7CiAgICBpZiAob2JqLmtpbmQgPT09ICdzdHInKSB7CiAgICAgICAgbGV0IHQ6IHN0cmluZyA9IG9iai5wYXlsb2FkOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgbGV0IHQ6IG51bWJlciA9IG9iai5wYXlsb2FkOwogICAgfQp9CgpmdW5jdGlvbiBmb28oeyBraW5kLCBwYXlsb2FkIH06IERhdGEpOiB2b2lkIHsKICAgIGlmIChraW5kID09PSAnc3RyJykgewogICAgICAgIGxldCB0OiBzdHJpbmcgPSBwYXlsb2FkOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgbGV0IHQ6IG51bWJlciA9IHBheWxvYWQ7CiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzQ1ODMwCgpjb25zdCBvYmogPSB7CiAgICBmbjogKCk6IGJvb2xlYW4gPT4gdHJ1ZQp9OwoKaWYgKGEpIHsgfQoKY29uc3QgYTogYm9vbGVhbiA9IG9iai5mbigpOwoKLy8gcmVwcm8gZnJvbSBodHRwczovL2dpdGh1Yi5jb20vbWljcm9zb2Z0L1R5cGVTY3JpcHQvaXNzdWVzLzUzMjY3CmNsYXNzIFV0aWxzIHsKICBzdGF0aWMgaXNEZWZpbmVkPFQ+KHZhbHVlOiBUKTogdmFsdWUgaXMgTm9uTnVsbGFibGU8VD4gewogICAgcmV0dXJuIHZhbHVlICE9IG51bGw7CiAgfQp9CgpjbGFzcyBBNTMyNjcgewogIHB1YmxpYyByZWFkb25seSB0ZXN0TnVtYmVyOiBudW1iZXIgfCB1bmRlZmluZWQ7CgogIGZvbygpOiB2b2lkIHsKICAgIGNvbnN0IGlzTnVtYmVyID0gVXRpbHMuaXNEZWZpbmVkKHRoaXMudGVzdE51bWJlcik7CgogICAgaWYgKGlzTnVtYmVyKSB7CiAgICAgIGNvbnN0IHg6IG51bWJlciA9IHRoaXMudGVzdE51bWJlcjsKICAgIH0KICB9Cn0= ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBmdW5jdGlvbiBmMTAoeDogc3RyaW5nI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b28gPSBvdXRlci5vYmoua2luZCA9PT0gJ2Zvbyc7CiAgICBpZiAoaXNGb28pIHsKICAgICAgICBvdXRlci5vYmouZm9vOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgb3V0ZXIub2JqLmJhcjsKICAgIH0KfQoKZnVuY3Rpb24gZjI3KG91dGVyOiB7IG9iajogeyBraW5kOiAnZm9vJywgZm9vOiBzdHJpbmcgfSB8IHsga2luZDogJ2JhcicsIGJhcjogbnVtYmVyIH0gfSk6IHZvaWQgewogICAgY29uc3QgaXNGb28gPSBvdXRlci5vYmoua2luZCA9PT0gJ2Zvbyc7CiAgICBpZiAoaXNGb28pIHsKICAgICAgICBvdXRlci5vYmouZm9vOyAgLy8gTm90IG5hcnJvd2VkIGJlY2F1c2Ugb2JqIGlzIG11dGFibGUKICAgIH0KICAgIGVsc2UgewogICAgICAgIG91dGVyLm9iai5iYXI7ICAvLyBOb3QgbmFycm93ZWQgYmVjYXVzZSBvYmogaXMgbXV0YWJsZQogICAgfQp9CgpmdW5jdGlvbiBmMjgob2JqPzogeyBraW5kOiAnZm9vJywgZm9vOiBzdHJpbmcgfSB8IHsga2luZDogJ2JhcicsIGJhcjogbnVtYmVyIH0pOiB2b2lkIHsKICAgIGNvbnN0IGlzRm9vID0gb2JqICYmIG9iai5raW5kID09PSAnZm9vJzsKICAgIGNvbnN0IGlzQmFyID0gb2JqICYmIG9iai5raW5kID09PSAnYmFyJzsKICAgIGlmIChpc0ZvbykgewogICAgICAgIG9iai5mb287CiAgICB9CiAgICBpZiAoaXNCYXIpIHsKICAgICAgICBvYmouYmFyOwogICAgfQp9CgovLyBOYXJyb3dpbmcgYnkgYWxpYXNlZCBkaXNjcmltaW5hbnQgcHJvcGVydHkgYWNjZXNzCgpmdW5jdGlvbiBmMzAob2JqOiB7IGtpbmQ6ICdmb28nLCBmb286IHN0cmluZyB9IHwgeyBraW5kOiAnYmFyJywgYmFyOiBudW1iZXIgfSk6IHZvaWQgewogICAgY29uc3Qga2luZCA9IG9iai5raW5kOwogICAgaWYgKGtpbmQgPT09ICdmb28nKSB7CiAgICAgICAgb2JqLmZvbzsKICAgIH0KICAgIGVsc2UgewogICAgICAgIG9iai5iYXI7CiAgICB9Cn0KCmZ1bmN0aW9uIGYzMShvYmo6IHsga2luZDogJ2ZvbycsIGZvbzogc3RyaW5nIH0gfCB7IGtpbmQ6ICdiYXInLCBiYXI6IG51bWJlciB9KTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQgfSA9IG9iajsKICAgIGlmIChraW5kID09PSAnZm9vJykgewogICAgICAgIG9iai5mb287CiAgICB9CiAgICBlbHNlIHsKICAgICAgICBvYmouYmFyOwogICAgfQp9CgpmdW5jdGlvbiBmMzIob2JqOiB7IGtpbmQ6ICdmb28nLCBmb286IHN0cmluZyB9IHwgeyBraW5kOiAnYmFyJywgYmFyOiBudW1iZXIgfSk6IHZvaWQgewogICAgY29uc3QgeyBraW5kOiBrIH0gPSBvYmo7CiAgICBpZiAoayA9PT0gJ2ZvbycpIHsKICAgICAgICBvYmouZm9vOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgb2JqLmJhcjsKICAgIH0KfQoKZnVuY3Rpb24gZjMzKG9iajogeyBraW5kOiAnZm9vJywgZm9vOiBzdHJpbmcgfSB8IHsga2luZDogJ2JhcicsIGJhcjogbnVtYmVyIH0pOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCB9ID0gb2JqOwogICAgc3dpdGNoIChraW5kKSB7CiAgICAgICAgY2FzZSAnZm9vJzogb2JqLmZvbzsgYnJlYWs7CiAgICAgICAgY2FzZSAnYmFyJzogb2JqLmJhcjsgYnJlYWs7CiAgICB9Cn0KCgpjbGFzcyBDMTAgewogICAgY29uc3RydWN0b3IocmVhZG9ubHkgeDogc3RyaW5nIHwgbnVtYmVyKSB7CiAgICAgICAgY29uc3QgdGhpc1hfaXNTdHJpbmcgPSB0eXBlb2YgdGhpcy54ID09PSAnc3RyaW5nJzsKICAgICAgICBjb25zdCB4SXNTdHJpbmcgPSB0eXBlb2YgeCA9PT0gJ3N0cmluZyc7CiAgICAgICAgaWYgKHRoaXNYX2lzU3RyaW5nICYmIHhJc1N0cmluZykgewogICAgICAgICAgICBsZXQgczogc3RyaW5nOwogICAgICAgICAgICBzID0gdGhpcy54OwogICAgICAgICAgICBzID0geDsKICAgICAgICB9CiAgICB9Cn0KCmNsYXNzIEMxMSB7CiAgICBjb25zdHJ1Y3RvcihyZWFkb25seSB4OiBzdHJpbmcgfCBudW1iZXIpIHsKICAgICAgICBjb25zdCB0aGlzWF9pc1N0cmluZyA9IHR5cGVvZiB0aGlzLnggPT09ICdzdHJpbmcnOwogICAgICAgIGNvbnN0IHhJc1N0cmluZyA9IHR5cGVvZiB4ID09PSAnc3RyaW5nJzsKICAgICAgICBpZiAodGhpc1hfaXNTdHJpbmcgJiYgeElzU3RyaW5nKSB7CiAgICAgICAgICAgIC8vIFNvbWUgbmFycm93aW5ncyBtYXkgYmUgaW52YWxpZGF0ZWQgZHVlIHRvIGxhdGVyIGFzc2lnbm1lbnRzLgogICAgICAgICAgICBsZXQgczogc3RyaW5nOwogICAgICAgICAgICBzID0gdGhpcy54OwogICAgICAgICAgICBzID0geDsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHRoaXMueCA9IDEwOwogICAgICAgICAgICB4ID0gMTA7CiAgICAgICAgfQogICAgfQp9CgovLyBNaXhpbmcgb2YgYWxpYXNlZCBkaXNjcmltaW5hbnRzIGFuZCBjb25kaXRpb25hbHMKCmZ1bmN0aW9uIGY0MChvYmo6IHsga2luZDogJ2ZvbycsIGZvbz86IHN0cmluZyB9IHwgeyBraW5kOiAnYmFyJywgYmFyPzogbnVtYmVyIH0pOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCB9ID0gb2JqOwogICAgY29uc3QgaXNGb28gPSBraW5kID09ICdmb28nOwogICAgaWYgKGlzRm9vICYmIG9iai5mb28pIHsKICAgICAgICBsZXQgdDogc3RyaW5nID0gb2J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TnVtYmVyOiBudW1iZXIgfCB1bmRlZmluZWQ7CgogIGZvbygpOiB2b2lkIHsKICAgIGNvbnN0IGlzTnVtYmVyID0gVXRpbHMuaXNEZWZpbmVkKHRoaXMudGVzdE51bWJlcik7CgogICAgaWYgKGlzTnVtYmVyKSB7CiAgICAgIGNvbnN0IHg6IG51bWJlciA9IHRoaXMudGVzdE51bWJlcjsKICAgIH0KICB9Cn0= + 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..237704fd2ec16 --- /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;IACP,IAAI,CAAC,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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVsbG93b3JsZC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiaGVsbG93b3JsZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxRQUFBLE1BQU0sR0FBRztjQUNHLE1BQU0sR0FBRyxJQUFJO0NBQ3hCLENBQUE7QUFFRCxjQUFNLFVBQVU7SUFDRixPQUFPLENBQUMsSUFBSTtnQkFBSixJQUFJLEVBQUUsTUFBTTtJQUd6QixLQUFLLElBQUksSUFBSTtDQUdyQiJ9,Y29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G8gJHt0aGlzLm5hbWV9YCk7CiAgfQp9Cg== + 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 index 15e38967bddf1..0fa6b204f11bd 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -28,5 +28,49 @@ +@@ -28,5 +28,48 @@ "Saturday" = 1, "Sunday" = 2, "Weekend days" = 3 @@ -13,7 +13,6 @@ -//# sourceMappingURL=declFileEnums.d.ts.map \ No newline at end of file +//# sourceMappingURL=declFileEnums.d.ts.map -+ +/// [Errors] //// + +declFileEnums.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileRegressionTests.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileRegressionTests.d.ts.map.diff new file mode 100644 index 0000000000000..4883f64b0d988 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileRegressionTests.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [tests/cases/compiler/declFileRegressionTests.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declFileRegressionTests.d.ts.map] +-{"version":3,"file":"declFileRegressionTests.d.ts","sourceRoot":"","sources":["declFileRegressionTests.ts"],"names":[],"mappings":"AAEA,QAAA,IAAI,CAAC;;;aAA4B,IAAI;;CAAgB,CAAC"} ++{"version":3,"file":"declFileRegressionTests.d.ts","sourceRoot":"","sources":["declFileRegressionTests.ts"],"names":[],"mappings":"AAEA,QAAA,IAAI,CAAC;IAAK,CAAC;IAAQ,CAAC;IAAM,CAAC,QAAM,IAAI;IAAS,CAAC;CAAM,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgbjogew0KICAgIHc6IGFueTsNCiAgICB4OiBzdHJpbmc7DQogICAgeTogKCkgPT4gdm9pZDsNCiAgICB6OiBudW1iZXI7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZGVjbEZpbGVSZWdyZXNzaW9uVGVzdHMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbEZpbGVSZWdyZXNzaW9uVGVzdHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xGaWxlUmVncmVzc2lvblRlc3RzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLFFBQUEsSUFBSSxDQUFDOzs7YUFBNEIsSUFBSTs7Q0FBZ0IsQ0FBQyJ9,Ly8gJ251bGwnIG5vdCBjb252ZXJ0ZWQgdG8gJ2FueScgaW4gZC50cwovLyBmdW5jdGlvbiB0eXBlcyBub3QgcGlwZWQgdGhyb3VnaCBjb3JyZWN0bHkKdmFyIG4gPSB7IHc6IG51bGwsIHg6ICcnLCB5OiAoKTogdm9pZCA9PiB7IH0sIHo6IDMyIH07Cgo= ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgbjogew0KICAgIHc6IGFueTsNCiAgICB4OiBzdHJpbmc7DQogICAgeTogKCkgPT4gdm9pZDsNCiAgICB6OiBudW1iZXI7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZGVjbEZpbGVSZWdyZXNzaW9uVGVzdHMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbEZpbGVSZWdyZXNzaW9uVGVzdHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xGaWxlUmVncmVzc2lvblRlc3RzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLFFBQUEsSUFBSSxDQUFDO0lBQUssQ0FBQztJQUFRLENBQUM7SUFBTSxDQUFDLFFBQU0sSUFBSTtJQUFTLENBQUM7Q0FBTSxDQUFDIn0=,Ly8gJ251bGwnIG5vdCBjb252ZXJ0ZWQgdG8gJ2FueScgaW4gZC50cwovLyBmdW5jdGlvbiB0eXBlcyBub3QgcGlwZWQgdGhyb3VnaCBjb3JyZWN0bHkKdmFyIG4gPSB7IHc6IG51bGwsIHg6ICcnLCB5OiAoKTogdm9pZCA9PiB7IH0sIHo6IDMyIH07Cgo= + 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,aW1wb3J0ICogYXMgdGhpbmdzIGZyb20gIi4vdGhpbmdzIjsNCmV4cG9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hpbmdzLlRoaW5nQik6IGFueSA9PiBudWxsOwo= + + + //// [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,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+Ow0KdHlwZSBDb252ZXJ0TG9jYWxlQ29uZmlnPFQgZXh0ZW5kcyBMb2NhbGVEYXRhID0gTG9jYWxlRGF0YT4gPSBSZWNvcmQ8c3RyaW5nLCBUPjsNCnR5cGUgTG9jYWxlQ29uZmlnPFQgZXh0ZW5kcyBMb2NhbGVEYXRhID0gTG9jYWxlRG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FQUNKLE9BQU8sRUFBRSxvQkFBb0IsRUFDN0IsTUFBTSxFQUFFLGlCQUFzQixHQUNqQyxFQUFFLGlCQUFpQixDQUFDLENBQUMsQ0FBQyxLQUFHLG1CQUFtQixDQUFDLENBQUMsQ0FFOUMsQ0FBQyJ9,dHlwZSBMb2NhbGVEYXRhID0gUmVjb3JkPHN0cmluZywgbmV2ZXI+CnR5cGUgQ29udmVydExvY2FsZUNvbmZpZzxUIGV4dGVuZHMgTG9jYWxlRGF0YSA9IExvY2FsZURhdGE+ID0gUmVjb3JkPAogIHN0cmluZywKICBUCj47CnR5cGUgTG9jYWxlQ29uZmlnPFQgZXh0ZW5kcyBMb2NhbGVEYXRhID0gTG9jYWxlRGF0YT4gPSBSZWNvcmQ8c3RyaW5nLCBQYXJ0aWFsPFQ+PjsKCmV4cG9ydCBpbnRlcmZhY2UgR2V0TG9jYWxlc09wdGlvbnM8VCBleHRlbmRzIExvY2FsZURhdGE+IHsKICAgIGFwcDogdW5rbm93bjsKICAgIGRlZmF1bHQ6IENvbnZlcnRMb2NhbGVDb25maWc8VD47CiAgICBjb25maWc/OiBMb2NhbGVDb25maWc8VD4gfCB1bmRlZmluZWQ7CiAgICBuYW1lPzogc3RyaW5nOwp9CgpleHBvcnQgY29uc3QgZ2V0TG9jYWxlcyA9IDxUIGV4dGVuZHMgTG9jYWxlRGF0YT4oewogICAgYXBwLAogICAgbmFtZSwKICAgIGRlZmF1bHQ6IGRlZmF1bHRMb2NhbGVzQ29uZmlnLAogICAgY29uZmlnOiB1c2VyTG9jYWxlc0NvbmZpZyA9IHt9LAp9OiBHZXRMb2NhbGVzT3B0aW9uczxUPik6IENvbnZlcnRMb2NhbGVDb25maWc8VD4gPT4gewogICAgcmV0dXJuIGRlZmF1bHRMb2NhbGVzQ29uZmlnOwp9Owo= + 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,ZGVjbGFyZSBjb25zdCBrOiAoeyB4OiB6IH06IHsNCiAgICB4Pzogc3RyaW5nOw0KfSkgPT4gdm9pZDsNCmRlY2xhcmUgdmFyIGE6IGFueTsNCmRlY2xhcmUgZnVuY3Rpb24gZ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cGluZ1VSTD1kZWNsYXJhdGlvbkVtaXRCaW5kaW5nUGF0dGVybnMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0QmluZGluZ1BhdHRlcm5zLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkZWNsYXJhdGlvbkVtaXRCaW5kaW5nUGF0dGVybnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsUUFBQSxNQUFNLENBQUMsR0FBSSxFQUFDLENBQUMsRUFBRSxDQUFPLEVBQUMsRUFBRTtJQUNqQixDQUFDLENBQUMsRUFBRSxNQUFNLENBQUM7Q0FDZCxLQUFHLElBQVcsQ0FBQTtBQUVuQixRQUFBLElBQUksQ0FBQyxFQUFFLEdBQUcsQ0FBQztBQUNYLGlCQUFTLENBQUMsQ0FBQyxFQUFFLEdBQUUsR0FBTyxFQUFFLEVBQUUsR0FBRSxHQUFPLEVBQUUsRUFBRSxDQUFDLEVBQUUsRUFBTSxFQUFDLEdBQUUsR0FBTyxHQUFHLElBQUksQ0FDaEUifQ==,Y29uc3QgayA9ICh7eDogeiA9ICd5J306IHsKICAgICAgICB4Pzogc3RyaW5nOwogICAgfSk6IHZvaWQgPT4geyB9Cgp2YXIgYTogYW55OwpmdW5jdGlvbiBmKHt9OiBhbnkgPSBhLCBbXTogYW55ID0gYSwgeyBwOiB7fSA9IGF9OiBhbnkgPSBhKTogdm9pZCB7Cn0= + 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 index ed1c81ae6cb31..15e2f84e1ae40 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,8 +1,16 @@ +@@ -1,8 +1,15 @@ + +//// [r/entry.d.ts] @@ -13,7 +13,6 @@ +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. @@ -22,7 +21,7 @@ ==== r/node_modules/foo/node_modules/nested/index.d.ts (0 errors) ==== export interface NestedProps {} -@@ -20,12 +28,14 @@ +@@ -20,12 +27,14 @@ ==== node_modules/root/index.d.ts (0 errors) ==== export interface RootProps {} 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 index 68a2ff5c58d15..0efd87f4300da 100644 --- 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 @@ -5,12 +5,10 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,36 +3,72 @@ - //// [foo.d.ts] +@@ -4,35 +4,66 @@ export declare class Foo { } //# sourceMappingURL=foo.d.ts.map -+ //// [index1.d.ts] -declare function Example(): void; -declare namespace Example { @@ -19,7 +17,6 @@ -export default Example; +export default function Example(): void; //# sourceMappingURL=index1.d.ts.map -+ //// [index2.d.ts] import { Foo } from './foo'; export { Foo }; @@ -30,7 +27,6 @@ -export default Example; +export default function Example(): void; //# sourceMappingURL=index2.d.ts.map -+ //// [index3.d.ts] export declare class Bar { } @@ -41,17 +37,15 @@ -export default Example; +export default function Example(): void; //# sourceMappingURL=index3.d.ts.map -+ -\ No newline at end of file //// [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(2,25): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern.d.ts.map.diff new file mode 100644 index 0000000000000..f94f9779a00db --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitDestructuringObjectLiteralPattern.d.ts.map] +-{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,IAAI;;;CAAyB,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,IAAI;;;CAAyB,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAE7B,QAAA,MAAM,IAAI;;;;;;;;CAA8C,CAAC;AACzD,QAAA,MAAM,GAAG,EAAE,MAAe,CAAC;AAC3B,QAAA,MAAM,GAAG,EAAE,MAAiB,CAAC;AAC7B,QAAA,MAAM,GAAG,EAAE,OAAoB,CAAC;AAEhC,iBAAS,GAAG,IAAI;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,OAAO,CAAC;CACf,CAKA;AACD,QAAA,MAAM,MAAM,EAAE;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,OAAO,CAAC;CACP,CAAC;AACV,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,EAAE,EAAE,OAAmB,CAAC;AAE9B,kBAAO,CAAC,CAAC;IAEE,MAAM,EAAE,EAAE,MAAgB,CAAC;IAC3B,MAAM,EAAE,EAAE,MAAgB,CAAC;IAC3B,MAAM,EAAE,EAAE,OAAiB,CAAC;CACtC"} ++{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern.ts"],"names":[],"mappings":"AACA,QAA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byI7CiAgICB2YXIgYjQgPSAxOwogICAgdmFyIGM0ID0gdHJ1ZTsKICAgIHJldHVybiB7IGE0LCBiNCwgYzQgfTsKfQpjb25zdCBkZXN0XzE6IHsKICAgIGE0OiBzdHJpbmc7CiAgICBiNDogbnVtYmVyOwogICAgYzQ6IGJvb2xlYW47Cn0gPSBmMTUoKTsKY29uc3QgYTQ6IHN0cmluZyA9IGRlc3RfMS5hNDsKY29uc3QgYjQ6IG51bWJlciA9IGRlc3RfMS5iNDsKY29uc3QgYzQ6IGJvb2xlYW4gPSBkZXN0XzEuYzQ7Cgptb2R1bGUgbSB7CiAgICBjb25zdCBkZXN0ID0gZjE1KCk7CiAgICBleHBvcnQgY29uc3QgYTQ6IHN0cmluZyA9IGRlc3QuYTQ7CiAgICBleHBvcnQgY29uc3QgYjQ6IG51bWJlciA9IGRlc3QuYjQ7CiAgICBleHBvcnQgY29uc3QgYzQ6IGJvb2xlYW4gPSBkZXN0LmM0Owp9 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map.diff new file mode 100644 index 0000000000000..0689c27dd603d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitDestructuringObjectLiteralPattern1.d.ts.map] +-{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern1.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern1.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,IAAI;;;CAAyB,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,IAAI;;;CAAyB,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC"} ++{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern1.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern1.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,IAAI;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,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RSxNQUFrQixDQUFDO0FBQzdCLFFBQUEsTUFBTSxNQUFNO0lBQUssRUFBRTtJQUFLLEVBQUU7Q0FBVyxDQUFDO0FBQ3RDLFFBQUEsTUFBTSxFQUFFLEVBQUUsTUFBa0IsQ0FBQztBQUM3QixRQUFBLE1BQU0sSUFBSTtJQUFLLEVBQUU7SUFBSyxFQUFFO0NBQVcsQ0FBQztBQUNwQyxRQUFBLE1BQU0sRUFBRSxFQUFFLE1BQWdCLENBQUM7QUFDM0IsUUFBQSxNQUFNLEVBQUUsRUFBRSxNQUFnQixDQUFDIn0=,dmFyIHsgfSA9IHsgeDogNSwgeTogImhlbGxvIiB9Owpjb25zdCBkZXN0XzIgPSB7IHg0OiA1LCB5NDogImhlbGxvIiB9Owpjb25zdCB4NDogbnVtYmVyID0gZGVzdF8yLng0Owpjb25zdCBkZXN0XzEgPSB7IHg1OiA1LCB5NTogImhlbGxvIiB9Owpjb25zdCB5NTogc3RyaW5nID0gZGVzdF8xLnk1Owpjb25zdCBkZXN0ID0geyB4NjogNSwgeTY6ICJoZWxsbyIgfTsKY29uc3QgeDY6IG51bWJlciA9IGRlc3QueDY7CmNvbnN0IHk2OiBzdHJpbmcgPSBkZXN0Lnk2Owpjb25zdCBkZXN0XzIgPSB7IHg3OiA1LCB5NzogImhlbGxvIiB9Owpjb25zdCBhMTogbnVtYmVyID0gZGVzdF8yLng3Owpjb25zdCBkZXN0XzEgPSB7IHg4OiA1LCB5ODogImhlbGxvIiB9Owpjb25zdCBiMTogc3RyaW5nID0gZGVzdF8xLnk4Owpjb25zdCBkZXN0ID0geyB4OTogNSwgeTk6ICJoZWxsbyIgfTsKY29uc3QgYTI6IG51bWJlciA9IGRlc3QueDk7CmNvbnN0IGIyOiBzdHJpbmcgPSBkZXN0Lnk5Ow== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map.diff new file mode 100644 index 0000000000000..60a92b64dd685 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitDestructuringObjectLiteralPattern2.d.ts.map] +-{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern2.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern2.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,IAAI;;;;;;;;CAA8C,CAAC;AACzD,QAAA,MAAM,GAAG,EAAE,MAAe,CAAC;AAC3B,QAAA,MAAM,GAAG,EAAE,MAAiB,CAAC;AAC7B,QAAA,MAAM,GAAG,EAAE,OAAoB,CAAC;AAEhC,iBAAS,GAAG,IAAI;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,OAAO,CAAC;CACf,CAKA;AACD,QAAA,MAAM,MAAM,EAAE;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,OAAO,CAAC;CACP,CAAC;AACV,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,EAAE,EAAE,OAAmB,CAAC;AAE9B,kBAAO,CAAC,CAAC;IAEE,MAAM,EAAE,EAAE,MAAgB,CAAC;IAC3B,MAAM,EAAE,EAAE,MAAgB,CAAC;IAC3B,MAAM,EAAE,EAAE,OAAiB,CAAC;CACtC"} ++{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern2.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern2.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,IAAI;IAAK,CAAC;IAAK,CAAC;QAAI,CAAC;QAAW,CAAC;YAAI,CAAC;;;CAAY,CAAC;AACzD,QAAA,MAAM,GAAG,EAAE,MAAe,CAAC;AAC3B,QAAA,MAAM,GAAG,EAAE,MAAiB,CAAC;AAC7B,QAAA,MAAM,GAAG,EAAE,OAAoB,CAAC;AAEhC,iBAAS,GAAG,IAAI;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,OAAO,CAAC;CACf,CAKA;AACD,QAAA,MAAM,MAAM,EAAE;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,OAAO,CAAC;CACP,CAAC;AACV,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,EAAE,EAAE,OAAmB,CAAC;AAE9B,kBAAO,CAAC,CAAC;IAEE,MAAM,EAAE,EAAE,MAAgB,CAAC;IAC3B,MAAM,EAAE,EAAE,MAAgB,CAAC;IAC3B,MAAM,EAAE,EAAE,OAAiB,CAAC;CACtC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBkZXN0OiB7DQogICAgYTogbnVtYmVyOw0KICAgIGI6IHsNCiAgICAgICAgYTogc3RyaW5nOw0KICAgICAgICBiOiB7DQogICAgICAgICAgICBhOiBib29sZWFuOw0KICAgICAgICB9Ow0KICAgIH07DQp9Ow0KZGVjbGFyZSBjb25zdCB4MTE6IG51bWJlcjsNCmRlY2xhcmUgY29uc3QgeTExOiBzdHJpbmc7DQpkZWNsYXJlIGNvbnN0IHoxMTogYm9vbGVhbjsNCmRlY2xhcmUgZnVuY3Rpb24gZjE1KCk6IHsNCiAgICBhNDogc3RyaW5nOw0KICAgIGI0OiB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LmI0Owpjb25zdCBjNDogYm9vbGVhbiA9IGRlc3RfMS5jNDsKCm1vZHVsZSBtIHsKICAgIGNvbnN0IGRlc3QgPSBmMTUoKTsKICAgIGV4cG9ydCBjb25zdCBhNDogc3RyaW5nID0gZGVzdC5hNDsKICAgIGV4cG9ydCBjb25zdCBiNDogbnVtYmVyID0gZGVzdC5iNDsKICAgIGV4cG9ydCBjb25zdCBjNDogYm9vbGVhbiA9IGRlc3QuYzQ7Cn0= ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBkZXN0OiB7DQogICAgYTogbnVtYmVyOw0KICAgIGI6IHsNCiAgICAgICAgYTogc3RyaW5nOw0KICAgICAgICBiOiB7DQogICAgICAgICAgICBhOiBib29sZWFuOw0KICAgICAgICB9Ow0KICAgIH07DQp9Ow0KZGVjbGFyZSBjb25zdCB4MTE6IG51bWJlcjsNCmRlY2xhcmUgY29uc3QgeTExOiBzdHJpbmc7DQpkZWNsYXJlIGNvbnN0IHoxMTogYm9vbGVhbjsNCmRlY2xhcmUgZnVuY3Rpb24gZjE1KCk6IHsNCiAgICBhNDogc3RyaW5nOw0KICAgIGI0OiBudW1iZXI7DQogICAgYzQ6IGJvb2xlYW47DQp9Ow0KZGVjbGFyZSBjb25zdCBkZXN0XzE6IHsNCiAgICBhNDogc3RyaW5nOw0KICAgIGI0OiBudW1iZXI7DQogICAgYzQ6IGJvb2xlYW47DQp9Ow0KZGVjbGFyZSBjb25zdCBhNDogc3RyaW5nOw0KZGVjbGFyZSBjb25zdCBiNDogbnVtYmVyOw0KZGVjbGFyZSBjb25zdCBjNDogYm9vbGVhbjsNCmRlY2xhcmUgbmFtZXNwYWNlIG0gew0KICAgIGNvbnN0IGE0OiBzdHJpbmc7DQogICAgY29uc3QgYjQ6IG51bWJlcjsNCiAgICBjb25zdCBjNDogYm9vbGVhbjsNCn0NCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdERlc3RydWN0dXJ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UFBZ0IsQ0FBQztJQUMzQixNQUFNLEVBQUUsRUFBRSxNQUFnQixDQUFDO0lBQzNCLE1BQU0sRUFBRSxFQUFFLE9BQWlCLENBQUM7Q0FDdEMifQ==,Y29uc3QgZGVzdCA9IHsgYTogMSwgYjogeyBhOiAiaGVsbG8iLCBiOiB7IGE6IHRydWUgfSB9IH07CmNvbnN0IHgxMTogbnVtYmVyID0gZGVzdC5hOwpjb25zdCB5MTE6IHN0cmluZyA9IGRlc3QuYi5hOwpjb25zdCB6MTE6IGJvb2xlYW4gPSBkZXN0LmIuYi5hOwoKZnVuY3Rpb24gZjE1KCk6IHsKICAgIGE0OiBzdHJpbmc7CiAgICBiNDogbnVtYmVyOwogICAgYzQ6IGJvb2xlYW47Cn0gewogICAgdmFyIGE0ID0gImhlbGxvIjsKICAgIHZhciBiNCA9IDE7CiAgICB2YXIgYzQgPSB0cnVlOwogICAgcmV0dXJuIHsgYTQsIGI0LCBjNCB9Owp9CmNvbnN0IGRlc3RfMTogewogICAgYTQ6IHN0cmluZzsKICAgIGI0OiBudW1iZXI7CiAgICBjNDogYm9vbGVhbjsKfSA9IGYxNSgpOwpjb25zdCBhNDogc3RyaW5nID0gZGVzdF8xLmE0Owpjb25zdCBiNDogbnVtYmVyID0gZGVzdF8xLmI0Owpjb25zdCBjNDogYm9vbGVhbiA9IGRlc3RfMS5jNDsKCm1vZHVsZSBtIHsKICAgIGNvbnN0IGRlc3QgPSBmMTUoKTsKICAgIGV4cG9ydCBjb25zdCBhNDogc3RyaW5nID0gZGVzdC5hNDsKICAgIGV4cG9ydCBjb25zdCBiNDogbnVtYmVyID0gZGVzdC5iNDsKICAgIGV4cG9ydCBjb25zdCBjNDogYm9vbGVhbiA9IGRlc3QuYzQ7Cn0= + 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 index 4b74d19199a3d..9cd21a24c8bd8 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,58 +1,86 @@ +@@ -1,58 +1,85 @@ //// [declarationEmitDestructuringParameterProperties.d.ts] @@ -43,7 +43,6 @@ 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. 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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io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZnVuOiAoc3ViRnVuOiA8Q29sbGVjdGlvbiwgRmllbGQgZXh0ZW5kcyBrZXlvZiBDb2xsZWN0aW9uPigpID0+IEZsYXRBcnJheTxDb2xsZWN0aW9uW0ZpZWxkXSwgMD5bXSkgPT4gdm9pZDsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdERpc3RyaWJ1dGl2ZUNvbmRpdGlvbmFsV2l0aEluZmVyLmQudHMubWFw,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,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZm4xOiAoeyBwcm9wOiBhLCBwcm9wOiBiI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udW1iZXIgfSk6IG51bWJlciA9PiBhICsgYjsKCmV4cG9ydCBjb25zdCBmbjIgPSAoeyBwcm9wOiBhIH06IHsgcHJvcDogbnVtYmVyIH0sIHsgcHJvcDogYiB9OiB7IHByb3A6IG51bWJlciB9KTogbnVtYmVyID0+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 index c7cf7d9b58b81..fee42ef503d45 100644 --- 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 @@ -5,16 +5,14 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,20 +5,28 @@ +@@ -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(3,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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..d22f281113fe0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExportAliasVisibiilityMarking.d.ts.map.diff @@ -0,0 +1,30 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [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,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,G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gfCA2IHwgNyB8IDggfCA5IHwgMTAgfCAnSmFjaycgfCAnUXVlZW4nIHwgJ0tpbmcnOwpleHBvcnQgeyBTdWl0LCBSYW5rIH07Cg== + + + //// [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"} ++{"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==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2Vz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BQUUsSUFBSSxFQUFFLE1BQU0sU0FBUyxDQUFDO0FBRXJDLGVBQU8sSUFBSSxRQUFRLFFBQU8sT0FBTyxDQUFDLENBQUMsSUFBSSxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUUsSUFBSSxLQUFLO0lBQzFELElBQUksRUFBRSxJQUFJLENBQUM7SUFDWCxJQUFJLEVBQUUsSUFBSSxDQUFDO0NBQ2QsQ0FBMEMsQ0FBQztBQUM1QyxPQUFPLEVBQUUsSUFBSSxFQUFFLElBQUksRUFBRSxNQUFNLFNBQVMsQ0FBQyJ9,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 index 4dc59e489fb83..3280331371223 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,5 +1,46 @@ +@@ -1,5 +1,45 @@ //// [/p1/index.d.ts] @@ -14,7 +14,6 @@ \ No newline at end of file +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map -+ +/// [Errors] //// + +/p1/index.ts(4,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index b042e358b2c7b..6468cad8211a9 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,5 +1,34 @@ +@@ -1,5 +1,33 @@ //// [/p1/index.d.ts] @@ -14,7 +14,6 @@ \ No newline at end of file +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map -+ +/// [Errors] //// + +/p1/index.ts(4,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 615e0a375eb9c..0531f3e9527f5 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -2,8 +2,22 @@ +@@ -2,8 +2,21 @@ //// [declarationEmitFunctionDuplicateNamespace.d.ts] declare function f(a: 0): 0; @@ -16,7 +16,6 @@ -//# sourceMappingURL=declarationEmitFunctionDuplicateNamespace.d.ts.map \ No newline at end of file +//# sourceMappingURL=declarationEmitFunctionDuplicateNamespace.d.ts.map -+ +/// [Errors] //// + +declarationEmitFunctionDuplicateNamespace.ts(2,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index 573660b473ba8..ca81448065a12 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,20 +1,32 @@ +@@ -1,20 +1,31 @@ //// [declarationEmitFunctionKeywordProp.d.ts] @@ -28,7 +28,6 @@ -//# sourceMappingURL=declarationEmitFunctionKeywordProp.d.ts.map \ No newline at end of file +//# sourceMappingURL=declarationEmitFunctionKeywordProp.d.ts.map -+ +/// [Errors] //// + +declarationEmitFunctionKeywordProp.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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..e3eac673163e4 --- /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,UAAU,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAElE,eAAO,MAAM,EAAE,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ests/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/declarationEmitInferredDefaultExportType2.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitInferredDefaultExportType2.d.ts.map.diff new file mode 100644 index 0000000000000..dafacb76021ed --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitInferredDefaultExportType2.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitInferredDefaultExportType2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitInferredDefaultExportType2.d.ts.map] +-{"version":3,"file":"declarationEmitInferredDefaultExportType2.d.ts","sourceRoot":"","sources":["declarationEmitInferredDefaultExportType2.ts"],"names":[],"mappings":";;;;;AACA,kBAIC"} ++{"version":3,"file":"declarationEmitInferredDefaultExportType2.d.ts","sourceRoot":"","sources":["declarationEmitInferredDefaultExportType2.ts"],"names":[],"mappings":";IAEE,GAAG;IACH,GAAG;IACH,GAAG;;AAHL,kBAIC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBfZGVmYXVsdDogew0KICAgIGZvbzogcmVhZG9ubHkgW107DQogICAgYmFyOiBhbnk7DQogICAgYmF6OiBhbnk7DQp9Ow0KZXhwb3J0ID0gX2RlZmF1bHQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbkVtaXRJbmZlcnJlZERlZmF1bHRFeHBvcnRUeXBlMi5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0SW5mZXJyZWREZWZhdWx0RXhwb3J0VHlwZTIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdEluZmVycmVkRGVmYXVsdEV4cG9ydFR5cGUyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQ0Esa0JBSUMifQ==,Ly8gdGVzdC50cwpleHBvcnQgPSB7CiAgZm9vOiBbXSBhcyBjb25zdCwKICBiYXI6IHVuZGVmaW5lZCwKICBiYXo6IG51bGwKfQ== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBfZGVmYXVsdDogew0KICAgIGZvbzogcmVhZG9ubHkgW107DQogICAgYmFyOiBhbnk7DQogICAgYmF6OiBhbnk7DQp9Ow0KZXhwb3J0ID0gX2RlZmF1bHQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbkVtaXRJbmZlcnJlZERlZmF1bHRFeHBvcnRUeXBlMi5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0SW5mZXJyZWREZWZhdWx0RXhwb3J0VHlwZTIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdEluZmVycmVkRGVmYXVsdEV4cG9ydFR5cGUyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7SUFFRSxHQUFHO0lBQ0gsR0FBRztJQUNILEdBQUc7O0FBSEwsa0JBSUMifQ==,Ly8gdGVzdC50cwpleHBvcnQgPSB7CiAgZm9vOiBbXSBhcyBjb25zdCwKICBiYXI6IHVuZGVmaW5lZCwKICBiYXo6IG51bGwKfQ== + 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/declarationEmitKeywordDestructuring.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitKeywordDestructuring.d.ts.diff new file mode 100644 index 0000000000000..13363ea396907 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitKeywordDestructuring.d.ts.diff @@ -0,0 +1,34 @@ +// [[Reason: Aliases are preserved for binding patterns GH#55654]] //// + +//// [tests/cases/compiler/declarationEmitKeywordDestructuring.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -22,23 +22,23 @@ + async: boolean; + await: boolean; + one: boolean; + }; +-declare function f3({ abstract, ...rest }: P): { ++declare function f3({ abstract: _abstract, ...rest }: P): { + enum: boolean; + function: boolean; + async: boolean; + await: boolean; + one: boolean; + }; +-declare function f4({ async, ...rest }: P): { ++declare function f4({ async: _async, ...rest }: P): { + enum: boolean; + function: boolean; + abstract: boolean; + await: boolean; + one: boolean; + }; +-declare function f5({ await, ...rest }: P): { ++declare function f5({ await: _await, ...rest }: P): { + enum: boolean; + function: boolean; + abstract: boolean; + async: boolean; 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 index cf068da702725..69f1cf0843ab2 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,9 +1,29 @@ +@@ -1,9 +1,28 @@ //// [declarationEmitLateBoundAssignments.d.ts] @@ -17,7 +17,6 @@ -//# sourceMappingURL=declarationEmitLateBoundAssignments.d.ts.map \ No newline at end of file +//# sourceMappingURL=declarationEmitLateBoundAssignments.d.ts.map -+ +/// [Errors] //// + +declarationEmitLateBoundAssignments.ts(1,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index 99f13eed57f33..45cab14944431 100644 --- 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 @@ -37,7 +37,7 @@ (): void; B: string; }; -@@ -64,5 +50,139 @@ +@@ -64,5 +50,138 @@ export declare const arrow10: { (): void; "🤷‍♂️": number; @@ -45,7 +45,6 @@ -//# sourceMappingURL=declarationEmitLateBoundAssignments2.d.ts.map \ No newline at end of file +//# sourceMappingURL=declarationEmitLateBoundAssignments2.d.ts.map -+ +/// [Errors] //// + +declarationEmitLateBoundAssignments2.ts(9,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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..1ec0c45d78752 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitMappedTypeTemplateTypeofSymbol.d.ts.diff @@ -0,0 +1,20 @@ +// [[Reason: TODO File is not auto-fixed. Symbol is not imported.]] //// + +//// [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/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 index 5dd0848fd9efc..d4de922a7c4ea 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,8 +1,17 @@ +@@ -1,8 +1,16 @@ + +//// [index.d.ts] @@ -14,7 +14,6 @@ +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. @@ -23,7 +22,7 @@ ==== node_modules/styled-components/node_modules/hoist-non-react-statics/index.d.ts (0 errors) ==== interface Statics { -@@ -30,21 +39,26 @@ +@@ -30,21 +38,26 @@ } declare const styled: StyledInterface; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.map.diff new file mode 100644 index 0000000000000..4b4f0c1e4473a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [declarationEmitObjectLiteralAccessors1.d.ts.map] +-{"version":3,"file":"declarationEmitObjectLiteralAccessors1.d.ts","sourceRoot":"","sources":["declarationEmitObjectLiteralAccessors1.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,EAAE;IACf,gDAAgD;IAChD,CAAC,EAAE,MAAM,CAAC;CAQb,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE;IACf,wBAAwB;IACxB,IAAI,CAAC,IAAI,MAAM,CAAC;IAChB,wBAAwB;IACxB,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE;CAQpB,CAAC;AAEF,eAAO,MAAM,IAAI;IACf,wBAAwB;;CAIzB,CAAC;AAEF,eAAO,MAAM,IAAI;IACf,wBAAwB;;CAEzB,CAAC"} ++{"version":3,"file":"declarationEmitObjectLiteralAccessors1.d.ts","sourceRoot":"","sources":["declarationEmitObjectLiteralAccessors1.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,EAAE;IACf,gDAAgD;IAChD,CAAC,EAAE,MAAM,CAAC;CAQb,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE;IACf,wBAAwB;IACxB,IAAI,CAAC,IAAI,MAAM,CAAC;IAChB,wBAAwB;IACxB,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE;CAQpB,CAAC;AAEF,eAAO,MAAM,IAAI;IACf,wBAAwB;aACpB,CAAC,EAAI,MAAM;CAGhB,CAAC;AAEF,eAAO,MAAM,IAAI;IACf,wBAAwB;IACpB,CAAC,EAAI,MAAM;CAChB,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3Qgb2JqMTogew0KICAgIC8qKiBteSBhd2Vzb21lIGdldHRlciAoZmlyc3QgaW4gc291cmNlIG9yZGVyKSAqLw0KICAgIHg6IHN0cmluZzsNCn07DQpleHBvcnQgZGVjbGFyZSBjb25zdCBvYmoyOiB7DQogICAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovDQogICAgZ2V0IHgoKTogc3RyaW5nOw0KICAgIC8qKiBteSBhd2Vzb21lIHNldHRlciAqLw0KICAgIHNldCB4KGE6IG51bWJlcik7DQp9Ow0KZXhwb3J0IGRlY2xhcmUgY29uc3Qgb2JqMzogew0KICAgIC8qKiBteSBhd2Vzb21lIGdldHRlciAqLw0KICAgIHJlYWRvbmx5IHg6IHN0cmluZzsNCn07DQpleHBvcnQgZGVjbGFyZSBjb25zdCBvYmo0OiB7DQogICAgLyoqIG15IGF3ZXNvbWUgc2V0dGVyICovDQogICAgeDogbnVtYmVyOw0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdE9iamVjdExpdGVyYWxBY2Nlc3NvcnMxLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0T2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iBzdHJpbmc7CiAgICAvKiogbXkgYXdlc29tZSBzZXR0ZXIgKi8KICAgIHNldCB4KGE6IG51bWJlcik7Cn0gPSB7CiAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovCiAgZ2V0IHgoKTogc3RyaW5nIHsKICAgIHJldHVybiAiIjsKICB9LAogIC8qKiBteSBhd2Vzb21lIHNldHRlciAqLwogIHNldCB4KGE6IG51bWJlcikge30sCn07CgpleHBvcnQgY29uc3Qgb2JqMyA9IHsKICAvKiogbXkgYXdlc29tZSBnZXR0ZXIgKi8KICBnZXQgeCgpOiBzdHJpbmcgewogICAgcmV0dXJuICIiOwogIH0sCn07CgpleHBvcnQgY29uc3Qgb2JqNCA9IHsKICAvKiogbXkgYXdlc29tZSBzZXR0ZXIgKi8KICBzZXQgeChhOiBudW1iZXIpIHt9LAp9Owo= ++//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3Qgb2JqMTogew0KICAgIC8qKiBteSBhd2Vzb21lIGdldHRlciAoZmlyc3QgaW4gc291cmNlIG9yZGVyKSAqLw0KICAgIHg6IHN0cmluZzsNCn07DQpleHBvcnQgZGVjbGFyZSBjb25zdCBvYmoyOiB7DQogICAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovDQogICAgZ2V0IHgoKTogc3RyaW5nOw0KICAgIC8qKiBteSBhd2Vzb21lIHNldHRlciAqLw0KICAgIHNldCB4KGE6IG51bWJlcik7DQp9Ow0KZXhwb3J0IGRlY2xhcmUgY29uc3Qgb2JqMzogew0KICAgIC8qKiBteSBhd2Vzb21lIGdldHRlciAqLw0KICAgIHJlYWRvbmx5IHg6IHN0cmluZzsNCn07DQpleHBvcnQgZGVjbGFyZSBjb25zdCBvYmo0OiB7DQogICAgLyoqIG15IGF3ZXNvbWUgc2V0dGVyICovDQogICAgeDogbnVtYmVyOw0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdE9iamVj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8KICBzZXQgeChhOiBzdHJpbmcpIHt9LAp9OwoKLy8gZGl2ZXJnZW50IGFjY2Vzc29ycwpleHBvcnQgY29uc3Qgb2JqMjogewogICAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovCiAgICBnZXQgeCgpOiBzdHJpbmc7CiAgICAvKiogbXkgYXdlc29tZSBzZXR0ZXIgKi8KICAgIHNldCB4KGE6IG51bWJlcik7Cn0gPSB7CiAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovCiAgZ2V0IHgoKTogc3RyaW5nIHsKICAgIHJldHVybiAiIjsKICB9LAogIC8qKiBteSBhd2Vzb21lIHNldHRlciAqLwogIHNldCB4KGE6IG51bWJlcikge30sCn07CgpleHBvcnQgY29uc3Qgb2JqMyA9IHsKICAvKiogbXkgYXdlc29tZSBnZXR0ZXIgKi8KICBnZXQgeCgpOiBzdHJpbmcgewogICAgcmV0dXJuICIiOwogIH0sCn07CgpleHBvcnQgY29uc3Qgb2JqNCA9IHsKICAvKiogbXkgYXdlc29tZSBzZXR0ZXIgKi8KICBzZXQgeChhOiBudW1iZXIpIHt9LAp9Owo= + 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==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0T3B0aW9uYWxNZXRob2QuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdE9wdGlvbmFsTWV0aG9kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGVBQU8sTUFBTSxHQUFHLFNBQVU7SUFDdEIsQ0FBQyxDQUFDLElBQUksSUFBSSxDQUFDO0lBQ1gsQ0FBQyxDQUFDLEVBQUUsTUFBTSxJQUFJLENBQUM7Q0FDbEIsS0FBRztJQUNBLENBQUMsQ0FBQyxJQUFJLElBQUksQ0FBQztJQUNYLENB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PT4gKHsgIH0pOw== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitParameterProperty.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitParameterProperty.d.ts.diff new file mode 100644 index 0000000000000..3c473c1e58cf2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitParameterProperty.d.ts.diff @@ -0,0 +1,19 @@ +// [[Reason: TODO: Optional constructor properties.]] //// + +//// [tests/cases/compiler/declarationEmitParameterProperty.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,8 @@ + + + //// [declarationEmitParameterProperty.d.ts] + export declare class Foo { +- bar?: string | undefined; +- constructor(bar?: string | undefined); ++ bar?: string; ++ constructor(bar?: string); + } + //# sourceMappingURL=declarationEmitParameterProperty.d.ts.map +\ No newline at end of file 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..c9aee36491465 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.diff @@ -0,0 +1,15 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [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,aW1wb3J0IHsgU2NhbGFyIH0gZnJvbSAnLi4vbGliL29wZXJhdG9ycy9zY2FsYXInOw0KZGVjbGFyZSBjb25zdCBfZGVmYXVsdDogew0KICAgIHJlYWRvbmx5IHhzOiBTY2FsYXI7DQp9Ow0KZXhwb3J0IGRlZmF1bHQgX2RlZmF1bHQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1zcGFjaW5nLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BhY2luZy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3BhY2luZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFVLE1BQU0seUJBQXlCLENBQUM7Ozs7QUFFekQsd0JBSUUifQ==,aW1wb3J0IHsgU2NhbGFyLCBzY2FsYXIgfSBmcm9tICcuLi9saWIvb3BlcmF0b3JzL3NjYWxhcic7CgpleHBvcnQgZGVmYXVsdCB7CglnZXQgeHMoKTogU2NhbGFyIHsKCQlyZXR1cm4gc2NhbGFyKCIxNHB4Iik7Cgl9Cn07Cg== ++//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgU2NhbGFyIH0gZnJvbSAnLi4vbGliL29wZXJhdG9ycy9zY2FsYXInOw0KZGVjbGFyZSBjb25zdCBfZGVmYXVsdDogew0KICAgIHJlYWRvbmx5IHhzOiBTY2FsYXI7DQp9Ow0KZXhwb3J0IGRlZmF1bHQgX2RlZmF1bHQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1zcGFjaW5nLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BhY2luZy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3BhY2luZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFVLE1BQU0seUJBQXlCLENBQUM7O2FBR3BELEVBQUUsRUFBSSxNQUFNOztBQURqQix3QkFJRSJ9,aW1wb3J0IHsgU2NhbGFyLCBzY2FsYXIgfSBmcm9tICcuLi9saWIvb3BlcmF0b3JzL3NjYWxhcic7CgpleHBvcnQgZGVmYXVsdCB7CglnZXQgeHMoKTogU2NhbGFyIHsKCQlyZXR1cm4gc2NhbGFyKCIxNHB4Iik7Cgl9Cn07Cg== + 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..d3da2e1830366 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReadonlyComputedProperty.d.ts.diff @@ -0,0 +1,20 @@ +// [[Reason: TODO File is not auto-fixed. Symbol in computed property not imported.]] //// + +//// [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,aW1wb3J0IHsgUG93ZXIgfSBmcm9tICIuL2lucHV0IjsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IHBvd2VyOiA8TnVtIGV4dGVuZHMgbnVtYmVyLCBQb3dlck9mIGV4dGVuZHMgbnVtYmVyPihudW06IE51bSwgcG93ZXJPZjogUG93ZXJPZikgPT4gUG93ZXI8TnVtLCBQb3dlck9mPjsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWEuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLFNBQVMsQ0FBQztBQUVoQyxlQUFPLE1BQU0sS0FBSyxvREFDVCxHQUFHLFdBQ0MsT0FBTyxLQUNqQixNQUFNLEdBQUcsRUFBRSxPQUFPLENBQThCLENBQUMifQ==,aW1wb3J0IHsgUG93ZXIgfSBmcm9tICIuL2lucH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ZXJPZj4gPT4gKG51bSAqKiBwb3dlck9mKSBhcyBuZXZlcjs= + 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 index f8b4087a1f2be..d86a0720c635e 100644 --- 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 @@ -5,20 +5,17 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -2,8 +2,58 @@ - +@@ -3,7 +3,55 @@ //// [/.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; -\ No newline at end of file -//# 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index af4e3bd1b4255..b3b26e0c51ef6 100644 --- 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 @@ -5,20 +5,17 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -2,8 +2,61 @@ - +@@ -3,7 +3,58 @@ //// [/.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; -\ No newline at end of file -//# 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index f43f53d94ebac..eee44685cd494 100644 --- 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 @@ -5,16 +5,14 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -2,21 +2,29 @@ +@@ -2,21 +2,27 @@ //// [/.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. 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..6577342651ef4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitRetainsJsdocyComments.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [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,LyoqDQogKiBjb21tZW50MQ0KICogQHBhcmFtIHANCiAqLw0KZXhwb3J0IGRlY2xhcmUgY29uc3QgZm9vOiAocDogc3RyaW5nKSA9PiB7DQogICAgLyoqDQogICAgICogY29tbWVudDINCiAgICAgKiBAcGFyYW0gcw0KICAgICAqLw0KICAgIGJhcjogKHM6IG51bWJlcikgPT4gdm9pZDsNCiAgICAvKioNCiAgICAgKiBjb21tZW50Mw0KICAgICAqIEBwYXJhbSBzDQogICAgICovDQogICAgYmFyMihzOiBudW1iZXIpOiB2b2lkOw0KfTsNCmV4cG9ydCBkZWNsYXJlIGNsYXNzIEZvbyB7DQogICAgLyoqDQogICAgICogY29tbWVudDQNCiAgICAgKiBAcGFyYW0gcw0KICAgICAqLw0KICAgIGJhcihzOiBudW1iZXIpOiB2b2lkOw0KfQ0KZXhwb3J0IGRlY2xhcmUgY29uc3QgDQovKioNCiogY29tbWVudDUNCiovDQpzb21lTWV0aG9kOiBhbnk7DQpkZWNsYXJlIGdsb2JhbCB7DQogICAgaW50ZXJmYWNlIEV4dEZ1bmMgew0KICAgICAgICAvKioNCiAgICAgICAgKiBjb21tZW50Ng0KICAgICAgICAqLw0KICAgICAgICBzb21lTWV0aG9kKGNvbGxlY3Rpb246IGFueVtdKTogYm9vbGVhbjsNCiAgICB9DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbkVtaXRSZXRhaW5zSnNkb2N5Q29tbWVudHMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0UmV0YWluc0pzZG9jeUNvbW1lbnRzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkZWNsYXJhdGlvbkVtaXRSZXRhaW5zSnNkb2N5Q29tbWVudHMudHMiXSwibmFtZXMiOltdLCJ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AgLyoqCiAgICAgKiBjb21tZW50NAogICAgICogQHBhcmFtIHMgIAogICAgICovCiAgICBiYXIoczogbnVtYmVyKTogdm9pZCB7CiAgICB9Cn0KCmNvbnN0IGRlc3QgPSBudWxsIGFzIGFueTsKZXhwb3J0IGNvbnN0CiAgICAvKioKICAgICogY29tbWVudDUKICAgICovCiAgICBzb21lTWV0aG9kOiBhbnkgPSBkZXN0LnNvbWVNZXRob2Q7CgpkZWNsYXJlIGdsb2JhbCB7CiAgICBpbnRlcmZhY2UgRXh0RnVuYyB7CiAgICAgICAgLyoqCiAgICAgICAgKiBjb21tZW50NgogICAgICAgICovCiAgICAgICAgc29tZU1ldGhvZChjb2xsZWN0aW9uOiBhbnlbXSk6IGJvb2xlYW47CiAgICB9Cn0K ++//// https://sokra.github.io/source-map-visualization#base64,LyoqDQogKiBjb21tZW50MQ0KICogQHBhcmFtIHANCiAqLw0KZXhwb3J0IGRlY2xhcmUgY29uc3QgZm9vOiAocDogc3RyaW5nKSA9PiB7DQogICAgLyoqDQogICAgICogY29tbWVudDINCiAgICAgKiBAcGFyYW0gcw0KICAgICAqLw0KICAgIGJhcjogKHM6IG51bWJlcikgPT4gdm9pZDsNCiAgICAvKioNCiAgICAgKiBjb21tZW50Mw0KICAgICAqIEBwYXJhbSBzDQogICAgICovDQogICAgYmFyMihzOiBudW1iZXIpOiB2b2lkOw0KfTsNCmV4cG9ydCBkZWNsYXJlIGNsYXNzIEZvbyB7DQogICAgLyoqDQogICAgICogY29tbWVudDQNCiAgICAgKiBAcGFyYW0gcw0KICAgICAqLw0KICAgIGJhcihzOiBudW1iZXIpOiB2b2lkOw0KfQ0KZXhwb3J0IGRlY2xhcmUgY29uc3QgDQovKioNCiogY29tbWVudDUNCiovDQpzb21lTWV0aG9kOiBhbnk7DQpkZWNsYXJlIGdsb2JhbCB7DQogICAgaW50ZXJmYWNlIEV4dEZ1bmMgew0KICAgICAgICAvKioNCiAgICAgICAgKiBjb21tZW50Ng0KICAgICAgICAqLw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CiAgICAgKiBAcGFyYW0gcwogICAgICovCiAgICBiYXI6IChzOiBudW1iZXIpID0+IHZvaWQ7CiAgICAvKioKICAgICAqIGNvbW1lbnQzCiAgICAgKiBAcGFyYW0gcwogICAgICovCiAgICBiYXIyKHM6IG51bWJlcik6IHZvaWQ7Cn0gPT4gewogICAgcmV0dXJuIHsKICAgICAgICAvKioKICAgICAgICAgKiBjb21tZW50MgogICAgICAgICAqIEBwYXJhbSBzIAogICAgICAgICAqLwogICAgICAgIGJhcjogKHM6IG51bWJlcikgPT4ge30sCiAgICAgICAgLyoqCiAgICAgICAgICogY29tbWVudDMKICAgICAgICAgKiBAcGFyYW0gcyAKICAgICAgICAgKi8KICAgICAgICBiYXIyKHM6IG51bWJlcikge30sCiAgICB9Cn0KCmV4cG9ydCBjbGFzcyBGb28gewogICAgLyoqCiAgICAgKiBjb21tZW50NAogICAgICogQHBhcmFtIHMgIAogICAgICovCiAgICBiYXIoczogbnVtYmVyKTogdm9pZCB7CiAgICB9Cn0KCmNvbnN0IGRlc3QgPSBudWxsIGFzIGFueTsKZXhwb3J0IGNvbnN0CiAgICAvKioKICAgICogY29tbWVudDUKICAgICovCiAgICBzb21lTWV0aG9kOiBhbnkgPSBkZXN0LnNvbWVNZXRob2Q7CgpkZWNsYXJlIGdsb2JhbCB7CiAgICBpbnRlcmZhY2UgRXh0RnVuYyB7CiAgICAgICAgLyoqCiAgICAgICAgKiBjb21tZW50NgogICAgICAgICovCiAgICAgICAgc29tZU1ldGhvZChjb2xsZWN0aW9uOiBhbnlbXSk6IGJvb2xlYW47CiAgICB9Cn0K + 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..c2293be088547 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitReusesLambdaParameterNodes.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [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,MAAM,EAAG,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,KAAG,IAAU,CAAA;AACzE,wBAAgB,aAAa,CAAC,MAAM,EAAG,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,IAAI,CAAG"} + +-//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgUHJvcHMgfSBmcm9tICJyZWFjdC1zZWxlY3QiOw0KZXhwb3J0IGRlY2xhcmUgY29uc3QgQ3VzdG9tU2VsZWN0MTogPE9wdGlvbj4oeDogUHJvcHM8T3B0aW9uPiAmIHt9KSA9PiB2b2lkOw0KZXhwb3J0IGRlY2xhcmUgZnVuY3Rpb24gQ3VzdG9tU2VsZWN0MjxPcHRpb24+KHg6IFByb3BzPE9wdGlvbj4gJiB7fSk6IHZvaWQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1pbmRleC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZ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Z3MiOiJBQUFBLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSxjQUFjLENBQUM7QUFFckMsZUFBTyxNQUFNLGFBQWEsR0FBSSxNQUFNLEVBQUcsQ0FBQyxFQUFFLEtBQUssQ0FBQyxNQUFNLENBQUMsR0FBRyxFQUFFLEtBQUcsSUFBVSxDQUFBO0FBQ3pFLHdCQUFnQixhQUFhLENBQUMsTUFBTSxFQUFHLENBQUMsRUFBRSxLQUFLLENBQUMsTUFBTSxDQUFDLEdBQUcsRUFBRSxHQUFHLElBQUksQ0FBRyJ9,aW1wb3J0IHsgUHJvcHMgfSBmcm9tICJyZWFjdC1zZWxlY3QiOwoKZXhwb3J0IGNvbnN0IEN1c3RvbVNlbGVjdDEgPSA8T3B0aW9uLD4oeDogUHJvcHM8T3B0aW9uPiAmIHt9KTogdm9pZCA9PiB7fQpleHBvcnQgZnVuY3Rpb24gQ3VzdG9tU2VsZWN0MjxPcHRpb24sPih4OiBQcm9wczxPcHRpb24+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..81d0ee6a4aa0a --- /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;IACZ,CAAC,IAAI,IAAI,IAAI,GAAG;CAInB,CAAA"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGludGVyZmFjZSBGb28gew0KICAgIGE6IHN0cmluZzsNCiAgICBiOiBudW1iZXI7DQogICAgYzogYm9vbG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FyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXMwMi5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXMwMi5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXMwMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLFdBQVcsR0FBRztJQUNoQixDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQ1YsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUNWLENBQUMsRUFBRSxPQUFPLENBQUM7Q0FDZDtBQUVELGVBQU8sTUFBTSxHQUFHO0lBQ1osQ0FBQyxJQUFJLElBQUksSUFBSSxHQUFHO0NBSW5CLENBQUEifQ==,ZXhwb3J0IGludGVyZmFjZSBGb28gewogICAgYTogc3RyaW5nOwogICAgYjogbnVtYmVyOwogICAgYzogYm9vbGVhbjsKfQoKZXhwb3J0IGNvbnN0IG9iaiA9IHsKICAgIG0oKTogdGhpcyBpcyBGb28gewogICAgICAgIGxldCBkaXMgPSB0aGlzIGFzIHt9IGFzIEZvbzsKICAgICAgICByZXR1cm4gZGlzLmEgIT0gbnVsbCAmJiBkaXMuYiAhPSBudWxsICYmIGRpcy5jICE9IG51bGw7CiAgICB9Cn0= + 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..319b76c3d43de --- /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;IACZ,CAAC,IAAI,IAAI,IAAI,GAAG;CAInB,CAAA"} + +-//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIEZvbyB7DQogICAgYTogc3RyaW5nOw0KICAgIGI6IG51bWJlcjsNCiAgICBjOiBib29sZWFuOw0KfQ0KZXhwb3J0IGRlY2xhcmUgY29uc3Qgb2JqOiB7DQogICAgbSgpOiB0aGlzIGlzIEZvbzsNCn07DQpleHBvcnQge307DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbkVtaXRUaGlzUHJlZGljYXRlc1dpdGhQcml2YXRlTmFtZTAyLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXNXaXRoUHJpdmF0ZU5hbWUwMi5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXNXaXRoUHJpdm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QUc7SUFDVCxDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQ1YsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUNWLENBQUMsRUFBRSxPQUFPLENBQUM7Q0FDZDtBQUVELGVBQU8sTUFBTSxHQUFHO0lBQ1osQ0FBQyxJQUFJLElBQUksSUFBSSxHQUFHO0NBSW5CLENBQUEifQ==,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==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0VHVwbGVSZXN0U2lnbmF0dXJlTGVhZGluZ1ZhcmlhZGljLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkZWNsYXJhdGlvbkVtaXRUdXBsZVJlc3RTaWduYXR1cmVMZWFkaW5nVmFyaWFkaWMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsUUFBQSxNQUFNLENBQUMsZ0RBQWlELENBQUMsR0FBRyxVQUFVLEVBQUUsUUFBUSxDQUFDLEtBQUcsSUFBVSxDQUFDIn0=,Y29uc3QgZiA9IDxURmlyc3RBcmdzIGV4dGVuZHMgYW55W10sIFRMYXN0QXJnPiguLi5hcmdzOiBbLi4uVEZpcnN0QXJncywgVExhc3RBcmddKTogdm9pZCA9PiB7fTs= ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBmOiA8VEZpcnN0QXJncyBleHRlbmRzIGFueVtdLCBUTGFzdEFyZz4oLi4uYXJnczogWy4uLlRGaXJzdEFyZ3MsIFRMYXN0QXJnXSkgPT4gdm9pZDsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdFR1cGxlUmVzdFNpZ25hdHVyZUxlYWRpbmdWYXJpYWRpYy5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0VHVwbGVSZXN0U2lnbmF0dXJlTGVhZGluZ1ZhcmlhZGljLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkZWNsYXJhdGlvbkVtaXRUdXBsZVJlc3RTaWduYXR1cmVMZWFkaW5nVmFyaWFkaWMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsUUFBQSxNQUFNLENBQUMsR0FBSSxVQUFVLFNBQVMsR0FBRyxFQUFFLEVBQUUsUUFBUSxFQUFFLEdBQUcsSUFBSSxFQUFFLENBQUMsR0FBRyxVQUFVLEVBQUUsUUFBUSxDQUFDLEtBQUcsSUFBVSxDQUFDIn0=,Y29uc3QgZiA9IDxURmlyc3RBcmdzIGV4dGVuZHMgYW55W10sIFRMYXN0QXJnPiguLi5hcmdzOiBbLi4uVEZpcnN0QXJncywgVExhc3RBcmddKTogdm9pZCA9PiB7fTs= + 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..4033009553224 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeAliasWithTypeParameters1.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [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":["declarationEmitTypeAliasWithT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gPSBCYXI8YW55LCBZPjsKZXhwb3J0IGNvbnN0IHkgPSAoeDogRm9vPHN0cmluZz4pOiBudW1iZXIgPT4gMQ== + 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..aafd9ceb26cfb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeAliasWithTypeParameters2.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [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,MAA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W1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLE1BQU0sR0FBRyxDQUFDLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxJQUFJLE1BQU0sQ0FBQyxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBQzNDLE1BQU0sTUFBTSxHQUFHLENBQUMsQ0FBQyxFQUFFLENBQUMsSUFBSSxHQUFHLENBQUMsQ0FBQyxFQUFFLE1BQU0sRUFBRSxDQUFDLENBQUMsQ0FBQztBQUMxQyxNQUFNLE1BQU0sR0FBRyxDQUFDLENBQUMsSUFBSSxHQUFHLENBQUMsT0FBTyxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBQ3JDLGVBQU8sTUFBTSxDQUFDLEdBQUksQ0FBQyxFQUFFLEdBQUcsQ0FBQyxNQUFNLENBQUMsS0FBRyxNQUFXLENBQUEifQ==,ZXhwb3J0IHR5cGUgQmFyPFgsIFksIFo+ID0gKCkgPT4gW1gsIFksIFpdOwpleHBvcnQgdHlwZSBCYXo8TSwgTj4gPSBCYXI8TSwgc3RyaW5nLCBOPjsKZXhwb3J0IHR5cGUgQmFhPFk+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":["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,CAAM,CAAC;AAC3B,iBAAS,EAAE,CAAC,CAAC,EAAG,CAAC,EAAE,CAAC,G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KaW50ZXJmYWNlIEIgeyB9Cgp2YXIgYiA9IDxCLD4oeDogQik6IEIgPT4geDsKZnVuY3Rpb24gYjI8Qiw+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..38c65ba200db1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitTypeParameterNameShadowedInternally.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [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,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZm9vOiA8VD4oeDogVCkgPT4gPFRfMT4oeTogVF8xKSA9PiByZWFkb25seSBbVCwgVF8xXTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdFR5cGVQY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UksQ0FBQyxFQUFHLENBQUMsRUFBRSxDQUFDLEtBQUcsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxFQUFFLEdBQUcsS0FBSyxTQUFTLENBQUMsQ0FBQyxFQUFFLEdBQUcsQ0FHL0QsQ0FBQSJ9,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/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 index ab5e9807e7916..ce8ce25d6afbc 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -4,6 +4,38 @@ +@@ -4,6 +4,37 @@ export interface MutableRefObject { current: T; } @@ -15,7 +15,6 @@ \ No newline at end of file +export declare const useCsvParser: invalid; +//# sourceMappingURL=index.d.ts.map -+ +/// [Errors] //// + +/p1/index.ts(7,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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/declarationFiles.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff index c244bdd780ea8..cd0f6180990bb 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,13 +1,59 @@ +@@ -1,13 +1,58 @@ + +//// [declarationFiles.d.ts] @@ -50,7 +50,6 @@ + f4(): () => this; +} +//# sourceMappingURL=declarationFiles.d.ts.map -+ /// [Errors] //// declarationFiles.ts(4,20): error TS2526: A 'this' type is available only in a non-static member of a class or interface. @@ -66,7 +65,7 @@ x: this; f(x: this): this { return undefined; } constructor(x: this) { } -@@ -46,16 +92,20 @@ +@@ -46,16 +91,20 @@ x4 = (): this => this; f1() { ~~ 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..72ed5a47ec286 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts.diff @@ -0,0 +1,21 @@ +// [[Reason: TODO: Investigte. Fixer prints more levels of the 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..a46807ab30ffa --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/defaultParameterAddsUndefinedWithStrictNullChecks.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [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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bCh2YWw6IE9wdGlvbmFsTnVsbGFibGVTdHJpbmcgPSAiIik6IHZvaWQgewogICAgdmFsID0gbnVsbDsKICAgIHZhbCA9ICdzdHJpbmcgYW5kIG51bGwgYXJlIGJvdGggb2snOwp9CmFsbG93c051bGwobnVsbCk7IC8vIHN0aWxsIGFsbG93cyBwYXNzaW5nIG51bGwKCgoKLy8gLmQudHMgc2hvdWxkIGhhdmUgYHN0cmluZyB8IHVuZGVmaW5lZGAgZm9yIGZvbzEsIGZvbzIsIGZvbzMgYW5kIGZvbzQKZm9vMSh1bmRlZmluZWQsIDEpOwpmb28yKHVuZGVmaW5lZCwgMSk7CmZvbzModW5kZWZpbmVkLCAxKTsKZm9vNCh1bmRlZmluZWQsIDEpOwoKCmZ1bmN0aW9uIHJlbW92ZVVuZGVmaW5lZEJ1dE5vdEZhbHNlKHg6IGJvb2xlYW4gPSB0cnVlKTogZmFsc2UgfCB1bmRlZmluZWQgewogICAgaWYgKHggPT09IGZhbHNlKSB7CiAgICAgICAgcmV0dXJuIHg7CiAgICB9Cn0KCmRlY2xhcmUgY29uc3QgY29uZDogYm9vbGVhbjsKZnVuY3Rpb24gcmVtb3ZlTm90aGluZyh5OiBib29sZWFuIHwgdW5kZWZpbmVkID0gY29uZCA/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/dependentDestructuredVariables.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/dependentDestructuredVariables.d.ts.map.diff new file mode 100644 index 0000000000000..6488ff5b782a3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/dependentDestructuredVariables.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [dependentDestructuredVariables.d.ts.map] +-{"version":3,"file":"dependentDestructuredVariables.d.ts","sourceRoot":"","sources":["dependentDestructuredVariables.ts"],"names":[],"mappings":"AAAA,KAAK,MAAM,GACL;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAErC,iBAAS,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,MAAM,GAAG,IAAI,CAO5C;AAED,iBAAS,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAQjC;AAED,iBAAS,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,MAAM,GAAG,IAAI,CAW5C;AAGD,iBAAS,GAAG,CAAC,CAAC,SAAS,MAAM,EAAE,EA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PSAnQScpIHsKICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICB9Cn0KCmZ1bmN0aW9uIGYxMShhY3Rpb246IEFjdGlvbik6IHZvaWQgewogICAgY29uc3QgeyBraW5kLCBwYXlsb2FkIH0gPSBhY3Rpb247CiAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgcGF5bG9hZC50b0ZpeGVkKCk7CiAgICB9CiAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgfQp9CgpmdW5jdGlvbiBmMTIoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbik6IHZvaWQgewogICAgc3dpdGNoIChraW5kKSB7CiAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICBwYXlsb2FkOyAgLy8gbmV2ZXIKICAgIH0KfQoKLy8gcmVwcm8gIzUwMjA2CmZ1bmN0aW9uIGYxMzxUIGV4dGVuZHMgQWN0aW9uPih7IGtpbmQsIHBheWxvYWQgfTogVCk6IHZvaWQgewogICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgfQogICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgIH0KfQoKZnVuY3Rpb24gZjE0PFQgZXh0ZW5kcyBBY3Rpb24+KHQ6IFQpOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCwgcGF5bG9hZCB9ID0gdDsKICAgIGlmIChraW5kID09PSAnQScpIHsKICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICB9Cn0KCnR5cGUgQWN0aW9uMiA9CiAgICB8IHsga2luZDogJ0EnLCBwYXlsb2FkOiBudW1iZXIgfCB1bmRlZmluZWQgfQogICAgfCB7IGtpbmQ6ICdCJywgcGF5bG9hZDogc3RyaW5nIHwgdW5kZWZpbmVkIH07CgpmdW5jdGlvbiBmMjAoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbjIpOiB2b2lkIHsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjEoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjIoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBpZiAoYWN0aW9uLnBheWxvYWQpIHsKICAgICAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgICAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgIH0KICAgICAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICB9CiAgICB9Cn0KCmZ1bmN0aW9uIGYyMyh7IGtpbmQsIHBheWxvYWQgfTogQWN0aW9uMik6IHZvaWQgewogICAgaWYgKHBheWxvYWQpIHsKICAgICAgICBzd2l0Y2ggKGtpbmQpIHsKICAgICAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgcGF5bG9hZDsgIC8vIG5ldmVyCiAgICAgICAgfQogICAgfQp9Cgp0eXBlIEZvbyA9CiAgICB8IHsga2luZDogJ0EnLCBpc0E6IHRydWUgfQogICAgfCB7IGtpbmQ6ICdCJywgaXNBOiBmYWxzZSB9CiAgICB8IHsga2luZDogJ0MnLCBpc0E6IGZhbHNlIH07CgpmdW5jdGlvbiBmMzAoeyBraW5kLCBpc0EgfTogRm9vKTogdm9pZCB7CiAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgaXNBOyAgIC8vIHRydWUKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBpc0E7ICAgLy8gZmFsc2UKICAgIH0KICAgIGlmIChraW5kID09PSAnQycpIHsKICAgICAgICBpc0E7ICAgLy8gZmFsc2UKICAgIH0KICAgIGlmIChpc0EpIHsKICAgICAgICBraW5kOyAgLy8gJ0EnCiAgICB9CiAgICBlbHNlIHsKICAgICAgICBraW5kOyAgLy8gJ0InIHwgJ0MnCiAgICB9Cn0KCnR5cGUgQXJncyA9IFsnQScsIG51bWJ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Owpib3Qub24oInNoYXJkRGlzY29ubmVjdCIsIChldmVudCwgc2hhcmQpID0+IGNvbnNvbGUubG9nKGBTaGFyZCAke3NoYXJkfSBkaXNjb25uZWN0ZWQgKCR7ZXZlbnQuY29kZX0sJHtldmVudC53YXNDbGVhbn0pOiAke2V2ZW50LnJlYXNvbn1gKSk7CmJvdC5vbigic2hhcmREaXNjb25uZWN0IiwgZXZlbnQgPT4gY29uc29sZS5sb2coYCR7ZXZlbnQuY29kZX0gJHtldmVudC53YXNDbGVhbn0gJHtldmVudC5yZWFzb259YCkpOwoKLy8gRGVzdHJ1Y3R1cmluZyB0dXBsZSB0eXBlcyB3aXRoIGRpZmZlcmVudCBhcml0aWVzCgpmdW5jdGlvbiBmejEoW3gsIHldOiBbMSwgMl0gfCBbMywgNF0gfCBbNV0pOiB2b2lkIHsKICAgIGlmICh5ID09PSAyKSB7CiAgICAgICAgeDsgIC8vIDEKICAgIH0KICAgIGlmICh5ID09PSA0KSB7CiAgICAgICAgeDsgIC8vIDMKICAgIH0KICAgIGlmICh5ID09PSB1bmRlZmluZWQpIHsKICAgICAgICB4OyAgLy8gNQogICAgfQogICAgaWYgKHggPT09IDEpIHsKICAgICAgICB5OyAgLy8gMgogICAgfQogICAgaWYgKHggPT09IDMpIHsKICAgICAgICB5OyAgLy8gNAogICAgfQogICAgaWYgKHggPT09IDUpIHsKICAgICAgICB5OyAgLy8gdW5kZWZpbmVkCiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzU1NjYxCgpmdW5jdGlvbiB0b29OYXJyb3coW3gsIHldOiBbMSwgMV0gfCBbMSwgMl0gfCBbMV0pOiB2b2lkIHsKICAgIGlmICh5ID09PSB1bmRlZmluZWQpIHsKICAgICAgICBjb25zdCBzaG91bGROb3RCZU9rOiBuZXZlciA9IHg7ICAvLyBFcnJvcgogICAgfQp9Cg== ++//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBBY3Rpb24gPSB7DQogICAga2luZDogJ0EnOw0KICAgIHB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Y3Rpb24pOiB2b2lkIHsKICAgIGlmIChraW5kID09PSAnQScpIHsKICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICB9Cn0KCmZ1bmN0aW9uIGYxMShhY3Rpb246IEFjdGlvbik6IHZvaWQgewogICAgY29uc3QgeyBraW5kLCBwYXlsb2FkIH0gPSBhY3Rpb247CiAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgcGF5bG9hZC50b0ZpeGVkKCk7CiAgICB9CiAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgfQp9CgpmdW5jdGlvbiBmMTIoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbik6IHZvaWQgewogICAgc3dpdGNoIChraW5kKSB7CiAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICBwYXlsb2FkOyAgLy8gbmV2ZXIKICAgIH0KfQoKLy8gcmVwcm8gIzUwMjA2CmZ1bmN0aW9uIGYxMzxUIGV4dGVuZHMgQWN0aW9uPih7IGtpbmQsIHBheWxvYWQgfTogVCk6IHZvaWQgewogICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgfQogICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgIH0KfQoKZnVuY3Rpb24gZjE0PFQgZXh0ZW5kcyBBY3Rpb24+KHQ6IFQpOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCwgcGF5bG9hZCB9ID0gdDsKICAgIGlmIChraW5kID09PSAnQScpIHsKICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICB9Cn0KCnR5cGUgQWN0aW9uMiA9CiAgICB8IHsga2luZDogJ0EnLCBwYXlsb2FkOiBudW1iZXIgfCB1bmRlZmluZWQgfQogICAgfCB7IGtpbmQ6ICdCJywgcGF5bG9hZDogc3RyaW5nIHwgdW5kZWZpbmVkIH07CgpmdW5jdGlvbiBmMjAoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbjIpOiB2b2lkIHsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjEoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjIoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBpZiAoYWN0aW9uLnBheWxvYWQpIHsKICAgICAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgICAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgIH0KICAgICAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICB9CiAgICB9Cn0KCmZ1bmN0aW9uIGYyMyh7IGtpbmQsIHBheWxvYWQgfTogQWN0aW9uMik6IHZvaWQgewogICAgaWYgKHBheWxvYWQpIHsKICAgICAgICBzd2l0Y2ggKGtpbmQpIHsKICAgICAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgcGF5bG9hZDsgIC8vIG5ldmVyCiAgICAgICAgfQogICAgfQp9Cgp0eXBlIEZvbyA9CiAgICB8IHsga2luZDogJ0EnLCBpc0E6IHRydWUgfQogICAgfCB7IGtpbmQ6ICdCJywgaXNBOiBmYWxzZSB9CiAgICB8IHsga2luZDogJ0MnLCBpc0E6IGZhbHNlIH07CgpmdW5jdGlvbiBmMzAoeyBraW5kLCBpc0EgfTogRm9vKTogdm9pZCB7CiAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgaXNBOyAgIC8vIHRydWUKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBpc0E7ICAgLy8gZmFsc2UKICAgIH0KICAgIGlmIChraW5kID09PSAnQycpIHsKICAgICAgICBpc0E7ICAgLy8gZmFsc2UKICAgIH0KICAgIGlmIChpc0EpIHsKICAgICAgICBraW5kOyAgLy8gJ0EnCiAgICB9CiAgICBlbHNlIHsKICAgICAgICBraW5kOyAgLy8gJ0InIHwgJ0MnCiAgIC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N0IGJvdDogQ2xpZW50ID0gbmV3IENsaWVudCgpOwpib3Qub24oInNoYXJkRGlzY29ubmVjdCIsIChldmVudCwgc2hhcmQpID0+IGNvbnNvbGUubG9nKGBTaGFyZCAke3NoYXJkfSBkaXNjb25uZWN0ZWQgKCR7ZXZlbnQuY29kZX0sJHtldmVudC53YXNDbGVhbn0pOiAke2V2ZW50LnJlYXNvbn1gKSk7CmJvdC5vbigic2hhcmREaXNjb25uZWN0IiwgZXZlbnQgPT4gY29uc29sZS5sb2coYCR7ZXZlbnQuY29kZX0gJHtldmVudC53YXNDbGVhbn0gJHtldmVudC5yZWFzb259YCkpOwoKLy8gRGVzdHJ1Y3R1cmluZyB0dXBsZSB0eXBlcyB3aXRoIGRpZmZlcmVudCBhcml0aWVzCgpmdW5jdGlvbiBmejEoW3gsIHldOiBbMSwgMl0gfCBbMywgNF0gfCBbNV0pOiB2b2lkIHsKICAgIGlmICh5ID09PSAyKSB7CiAgICAgICAgeDsgIC8vIDEKICAgIH0KICAgIGlmICh5ID09PSA0KSB7CiAgICAgICAgeDsgIC8vIDMKICAgIH0KICAgIGlmICh5ID09PSB1bmRlZmluZWQpIHsKICAgICAgICB4OyAgLy8gNQogICAgfQogICAgaWYgKHggPT09IDEpIHsKICAgICAgICB5OyAgLy8gMgogICAgfQogICAgaWYgKHggPT09IDMpIHsKICAgICAgICB5OyAgLy8gNAogICAgfQogICAgaWYgKHggPT09IDUpIHsKICAgICAgICB5OyAgLy8gdW5kZWZpbmVkCiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzU1NjYxCgpmdW5jdGlvbiB0b29OYXJyb3coW3gsIHldOiBbMSwgMV0gfCBbMSwgMl0gfCBbMV0pOiB2b2lkIHsKICAgIGlmICh5ID09PSB1bmRlZmluZWQpIHsKICAgICAgICBjb25zdCBzaG91bGROb3RCZU9rOiBuZXZlciA9IHg7ICAvLyBFcnJvcgogICAgfQp9Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuredDeclarationEmit.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuredDeclarationEmit.d.ts.map.diff new file mode 100644 index 0000000000000..0eed8c8766d78 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuredDeclarationEmit.d.ts.map.diff @@ -0,0 +1,19 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/destructuredDeclarationEmit.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,9 +1,9 @@ + + //// [foo.d.ts.map] +-{"version":3,"file":"foo.d.ts","sourceRoot":"","sources":["foo.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,GAAG;;;;;;;;;CAAwE,CAAC;AAClF,QAAA,MAAM,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IAAC,GAAG,EAAE,KAAK,CAAA;CAAC,EAAE;IAAC,GAAG,EAAE,KAAK,CAAA;CAAC,CAAC,CAAC,CAA4D,CAAC;AAC/H,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC"} ++{"version":3,"file":"foo.d.ts","sourceRoot":"","sources":["foo.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,GAAG;IAAK,GAAG;IAAW,GAAG;IAAW,GAAG;QAAI,IAAI;YAAI,GAAG;YAAO,GAAG;;;CAAW,CAAC;AAClF,QAAA,MAAM,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IAAC,GAAG,EAAE,KAAK,CAAA;CAAC,EAAE;IAAC,GAAG,EAAE,KAAK,CAAA;CAAC,CAAC,CAAC,CAA4D,CAAC;AAC/H,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBmb286IHs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xFQUFFLENBQUMifQ==,Y29uc3QgZm9vID0geyBiYXI6ICdoZWxsbycsIGJhdDogJ3dvcmxkJywgYmFtOiB7IGJvcms6IHsgYmFyOiAnYScsIGJhejogJ2InIH0gfSB9Owpjb25zdCBhcnI6IFswLCAxLCAyLCBbJ2EnLCAnYicsICdjJywgW3tkZWY6ICdkZWYnfSwge3NlYzogJ3NlYyd9XV1dID0gWzAsIDEsIDIsIFsnYScsICdiJywgJ2MnLCBbe2RlZjogJ2RlZid9LCB7c2VjOiAnc2VjJ31dXV07CmV4cG9ydCB7IGZvbywgYXJyIH07 + + + //// [index.d.ts.map] + {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEhB,QAAA,MAAM,GAAG,EAAE,MAAgB,CAAC;AAG5B,QAAA,MAAM,IAAI,EAAE,MAAyB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AAEjB,QAAA,MAAM,GAAG,EAAE,CAAU,CAAC;AACtB,QAAA,MAAM,GAAG,EAAE,GAAe,CAAC;AAC3B,QAAA,MAAM,GAAG,EAAE,KAAwB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAOzB,QAAA,MAAM,IAAI,EAAE,MAAiB,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,CAAC"} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringInFunctionType.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringInFunctionType.d.ts.diff new file mode 100644 index 0000000000000..5d9dde5059e00 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringInFunctionType.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: Aliases are preserved for binding patterns GH#55654]] //// + +//// [tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -26,9 +26,9 @@ + a: b; + }, { + b: a; + }]); +-type F3 = ([{ a }, { b }]: [ ++type F3 = ([{ a: b }, { b: a }]: [ + { + a: any; + }, + { 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":[],"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,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gZ2V0IFt6XSgpOiBudW1iZXIgeyByZXR1cm4gMDsgfQogICAgc2V0IFt3XSh2YWx1ZTogbnVtYmVyKSB7IH0KfQoKZXhwb3J0IHR5cGUgT2JqZWN0VHlwZVZpc2liaWxpdHkgPSB7CiAgICBbeF06IG51bWJlcjsKICAgIFt5XSgpOiBudW1iZXI7Cn07CgpleHBvcnQgY29uc3QgT2JqZWN0TGl0ZXJhbFZpc2liaWxpdHkgPSB7CiAgICBbeF06IDAsCiAgICBbeV0oKTogbnVtYmVyIHsgcmV0dXJuIDA7IH0sCiAgICBnZXQgW3pdKCk6IG51bWJlciB7IHJldHVybiAwOyB9LAogICAgc2V0IFt3XSh2YWx1ZTogbnVtYmVyKSB7IH0sCn07 + 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..8d773e725ee65 --- /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 TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. ++emitClassExpressionInDeclarationFile.ts(5,38): error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. ++ ++ ++==== emitClassExpressionInDeclarationFile.ts (2 errors) ==== ++ export var simpleExample = class { ++ ~~~~~ ++!!! error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. ++ static getTags() { } ++ tags() { } ++ } ++ export var circularReference = class C { ++ ~ ++!!! error TS9011: Declaration emit for class expressions are 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..8deeac78180e9 --- /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 TS9011: Declaration emit for class expressions are 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 TS9011: Declaration emit for class expressions are 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.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emitMethodCalledNew.d.ts.diff new file mode 100644 index 0000000000000..08a4918e262f7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emitMethodCalledNew.d.ts.diff @@ -0,0 +1,25 @@ +// [[Reason: TODO: new is not correctly emitted.]] //// + +//// [tests/cases/compiler/emitMethodCalledNew.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,13 +1,13 @@ + + + //// [emitMethodCalledNew.d.ts] + export declare const a: { +- "new"(x: number): number; ++ new(x: number): number; + }; + export declare const b: { +- "new"(x: number): number; ++ new(x: number): number; + }; + export declare const c: { +- "new"(x: number): number; ++ new(x: number): number; + }; + //# sourceMappingURL=emitMethodCalledNew.d.ts.map +\ No newline at end of file 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..96ae47cffc192 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emptyTuplesTypeAssertion01.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [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..0340663478b9c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emptyTuplesTypeAssertion02.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [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 index 288c992e7e60b..357b4869d9ced 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -57,5 +57,102 @@ +@@ -57,5 +57,101 @@ B, C, D @@ -13,7 +13,6 @@ -//# sourceMappingURL=enumClassification.d.ts.map \ No newline at end of file +//# sourceMappingURL=enumClassification.d.ts.map -+ +/// [Errors] //// + +enumClassification.ts(74,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 877134dfe517e..5173b952bc9ad 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -33,5 +33,54 @@ +@@ -33,5 +33,53 @@ a = "1", b = "11", c = "21" @@ -13,7 +13,6 @@ -//# sourceMappingURL=enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts.map \ No newline at end of file +//# sourceMappingURL=enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts.map -+ +/// [Errors] //// + +enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(32,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/escapedReservedCompilerNamedIdentifier.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/escapedReservedCompilerNamedIdentifier.d.ts.map.diff new file mode 100644 index 0000000000000..36954bd15ba6a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/escapedReservedCompilerNamedIdentifier.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/escapedReservedCompilerNamedIdentifier.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [escapedReservedCompilerNamedIdentifier.d.ts.map] +-{"version":3,"file":"escapedReservedCompilerNamedIdentifier.d.ts","sourceRoot":"","sources":["escapedReservedCompilerNamedIdentifier.ts"],"names":[],"mappings":"AACA,QAAA,IAAI,SAAS,QAAK,CAAC;AACnB,QAAA,IAAI,CAAC;;CAEJ,CAAC;AACF,QAAA,IAAI,CAAC,EAAE,MAAuB,CAAC;AAC/B,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAwB,CAAC;AAEjC,QAAA,IAAI,UAAU,QAAK,CAAC;AACpB,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAyB,CAAC;AAClC,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAyB,CAAC;AAElC,QAAA,IAAI,QAAQ,QAAK,CAAC;AAClB,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAuB,CAAC;AAChC,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAuB,CAAC"} ++{"version":3,"file":"escapedReservedCompilerNamedIdentifier.d.ts","sourceRoot":"","sources":["escapedReservedCompilerNamedIdentifier.ts"],"names":[],"mappings":"AACA,QAAA,IAAI,SAAS,QAAK,CAAC;AACnB,QAAA,IAAI,CAAC;;CAEJ,CAAC;AACF,QAAA,IAAI,CAAC,EAAE,MAAuB,CAAC;AAC/B,QAAA,IAAI,EAAE;IACF,SAAS;CACZ,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAwB,CAAC;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19wcm90b19fIjogMAp9Owp2YXIgYjogbnVtYmVyID0gb1siX19wcm90b19fIl07CnZhciBvMSA9IHsKICAgIF9fcHJvdG9fXzogMAp9Owp2YXIgYjE6IG51bWJlciA9IG8xWyJfX3Byb3RvX18iXTsKLy8gVHJpcGxlIHVuZGVyc2NvcmVzCnZhciBfX19wcm90b19fID0gMTA7CnZhciBvMiA9IHsKICAgICJfX19wcm90b19fIjogMAp9Owp2YXIgYjI6IG51bWJlciA9IG8yWyJfX19wcm90b19fIl07CnZhciBvMyA9IHsKICAgIF9fX3Byb3RvX186IDAKfTsKdmFyIGIzOiBudW1iZXIgPSBvM1siX19fcHJvdG9fXyJdOwovLyBPbmUgdW5kZXJzY29yZQp2YXIgX3Byb3RvX18gPSAxMDsKdmFyIG80ID0gewogICAgIl9wcm90b19fIjogMAp9Owp2YXIgYjQ6IG51bWJlciA9IG80WyJfcHJvdG9fXyJdOwp2YXIgbzUgPSB7CiAgICBfcHJvdG9fXzogMAp9Owp2YXIgYjU6IG51bWJlciA9IG81WyJfcHJvdG9fXyJdOw== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgX19wcm90b19fOiBudW1iZXI7DQpkZWNsYXJlIHZhciBvOiB7DQogICAgX19wcm90b19fOiBudW1iZXI7DQp9Ow0KZGVjbGFyZSB2YXIgYjogbnVtYmVyOw0KZGVjbGFyZSB2YXIgbzE6IHsNCiAgICBfX3Byb3RvX186IG51bWJlcjsNCn07DQpkZWNsYXJlIHZhciBiMTogbnVtYmVyOw0KZGVjbGFyZSB2YXIgX19fcHJvdG9fXzogbnVtYmVyOw0KZGVjbGFyZSB2YXIgbzI6IHsNCiAgICBfX19wcm90b19fOiBudW1iZXI7DQp9Ow0KZGVjbGFyZSB2YXIgYjI6IG51bWJlcjsNCmRlY2xhcmUgdmFyIG8zOiB7DQogICAgX19fcHJvdG9fXzogbnVtYmVyOw0KfTsNCmRlY2xhcmUgdmFyIGIzOiBudW1iZXI7DQpkZWNsY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UU7O0NBRUwsQ0FBQztBQUNGLFFBQUEsSUFBSSxFQUFFLEVBQUUsTUFBdUIsQ0FBQztBQUNoQyxRQUFBLElBQUksRUFBRTtJQUNGLFFBQVE7Q0FDWCxDQUFDO0FBQ0YsUUFBQSxJQUFJLEVBQUUsRUFBRSxNQUF1QixDQUFDIn0=,Ly8gZG91YmxlIHVuZGVyc2NvcmVzCnZhciBfX3Byb3RvX18gPSAxMDsKdmFyIG8gPSB7CiAgICAiX19wcm90b19fIjogMAp9Owp2YXIgYjogbnVtYmVyID0gb1siX19wcm90b19fIl07CnZhciBvMSA9IHsKICAgIF9fcHJvdG9fXzogMAp9Owp2YXIgYjE6IG51bWJlciA9IG8xWyJfX3Byb3RvX18iXTsKLy8gVHJpcGxlIHVuZGVyc2NvcmVzCnZhciBfX19wcm90b19fID0gMTA7CnZhciBvMiA9IHsKICAgICJfX19wcm90b19fIjogMAp9Owp2YXIgYjI6IG51bWJlciA9IG8yWyJfX19wcm90b19fIl07CnZhciBvMyA9IHsKICAgIF9fX3Byb3RvX186IDAKfTsKdmFyIGIzOiBudW1iZXIgPSBvM1siX19fcHJvdG9fXyJdOwovLyBPbmUgdW5kZXJzY29yZQp2YXIgX3Byb3RvX18gPSAxMDsKdmFyIG80ID0gewogICAgIl9wcm90b19fIjogMAp9Owp2YXIgYjQ6IG51bWJlciA9IG80WyJfcHJvdG9fXyJdOwp2YXIgbzUgPSB7CiAgICBfcHJvdG9fXzogMAp9Owp2YXIgYjU6IG51bWJlciA9IG81WyJfcHJvdG9fXyJdOw== + 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,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ZSI6CiAgICAgICAgICAgIHN3aXRjaCAoczIua2luZCkgewogICAgICAgICAgICAgICAgY2FzZSAic3F1YXJlIjoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIjIiOwogICAgICAgICAgICAgICAgY2FzZSAiY2lyY2xlIjoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIjMiOwogICAgICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIm5ldmVyIjsKICAgICAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiB3aXRob3V0RGVmYXVsdChzMTogU2hhcGUyLCBzMjogU2hhcGUyKTogc3RyaW5nIHsKICAgIHN3aXRjaCAoczEua2luZCkgewogICAgICAgIGNhc2UgInNxdWFyZSI6CiAgICAgICAgICAgIHJldHVybiAiMSI7CiAgICAgICAgY2FzZSAiY2lyY2xlIjoKICAgICAgICAgICAgc3dpdGNoIChzMi5raW5kKSB7CiAgICAgICAgICAgICAgICBjYXNlICJzcXVhcmUiOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAiMiI7CiAgICAgICAgICAgICAgICBjYXNlICJjaXJjbGUiOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAiMyI7CiAgICAgICAgICAgIH0KICAgIH0KfQoKLy8gUmVwcm8gZnJvbSAjMjA4MjMKCmZ1bmN0aW9uIHRlc3Q0KHZhbHVlOiAxIHwgMik6IHN0cmluZyB7CiAgICBsZXQgeDogc3RyaW5nOwogICAgc3dpdGNoICh2YWx1ZSkgewogICAgICAgIGNhc2UgMTogeCA9ICJvbmUiOyBicmVhazsKICAgICAgICBjYXNlIDI6IHggPSAidHdvIjsgYnJlYWs7CiAgICB9CiAgICByZXR1cm4geDsKfQoKLy8gUmVwcm8gZnJvbSAjMzQ2NjEKCmVudW0gQW5pbWFsIHsgRE9HLCBDQVQgfQoKZGVjbGFyZSBjb25zdCB6b286IHsgYW5pbWFsOiBBbmltYWwgfSB8IHVuZGVmaW5lZDsKCmZ1bmN0aW9uIGV4cHJlc3Npb24oKTogQW5pbWFsIHsKICAgIHN3aXRjaCAoem9vPy5hbmltYWwgPz8gQW5pbWFsLkRPRykgewogICAgICAgIGNhc2UgQW5pbWFsLkRPRzogcmV0dXJuIEFuaW1hbC5ET0cKICAgICAgICBjYXNlIEFuaW1hbC5DQVQ6IHJldHVybiBBbmltYWwuQ0FUCiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzM0ODQwCgpmdW5jdGlvbiBmb28oKTogdm9pZCB7CiAgICBjb25zdCBmb286IG51bWJlciB8IHVuZGVmaW5lZCA9IDA7CiAgICB3aGlsZSAodHJ1ZSkgewogICAgICAgIGNvbnN0IHN0YXRzID0gZm9vOwogICAgICAgIHN3aXRjaCAoc3RhdHMpIHsKICAgICAgICAgICAgY2FzZSAxOiBicmVhazsKICAgICAgICAgICAgY2FzZSAyOiBicmVhazsKICAgICAgICB9CiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzM1MDcwCgp0eXBlIE8gPSB7CiAgICBhOiBudW1iZXIsCiAgICBiOiBudW1iZXIKfTsKdHlwZSBLID0ga2V5b2YgTyB8ICdjJzsKZnVuY3Rpb24gZmYobzogTywgazogSyk6IG51bWJlciB7CiAgICBzd2l0Y2goaykgewogICAgICAgIGNhc2UgJ2MnOgogICAgICAgICAgICBrID0gJ2EnOwogICAgfQogICAgayA9PT0gJ2MnOyAgLy8gRXJyb3IKICAgIHJldHVybiBvW2tdOwp9CgovLyBSZXBybyBmcm9tICMzNTQzMQp0eXBlIEEgPSB7IGtpbmQ6ICJhYmMiIH0gfCB7IGtpbmQ6ICJkZWYiIH07CgpmdW5jdGlvbiBmMzU0MzEoYTogQSk6IHZvaWQgewogIHN3aXRjaCAoYS5raW5kKSB7CiAgICBjYXNlICJhYmMiOgogICAgY2FzZSAiZGVmIjogcmV0dXJuOwogICAgZGVmYXVsdDoKICAgICAgYSEua2luZDsgLy8gRXJyb3IgZXhwZWN0ZWQKICB9Cn0= ++//// https://sokra.github.io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ZnVuY3Rpb24gZjEoeDogMSB8IDIpOiBzdHJpbmcgewogICAgaWYgKCEhdHJ1ZSkgewogICAgICAgIHN3aXRjaCAoeCkgewogICAgICAgICAgICBjYXNlIDE6IHJldHVybiAnYSc7CiAgICAgICAgICAgIGNhc2UgMjogcmV0dXJuICdiJzsKICAgICAgICB9CiAgICAgICAgeDsgIC8vIFVucmVhY2hhYmxlCiAgICB9CiAgICBlbHNlIHsKICAgICAgICB0aHJvdyAwOwogICAgfQp9CgpmdW5jdGlvbiBmMih4OiAxIHwgMik6IHZvaWQgewogICAgbGV0IHo6IG51bWJlcjsKICAgIHN3aXRjaCAoeCkgewogICAgICAgIGNhc2UgMTogeiA9IDEwOyBicmVhazsKICAgICAgICBjYXNlIDI6IHogPSAyMDsgYnJlYWs7CiAgICB9CiAgICB6OyAgLy8gRGVmaW5pdGVseSBhc3NpZ25lZAp9CgpmdW5jdGlvbiBmMyh4OiAxIHwgMik6IDEwIHwgMjAgewogICAgc3dpdGNoICh4KSB7CiAgICAgICAgY2FzZSAxOiByZXR1cm4gMTA7CiAgICAgICAgY2FzZSAyOiByZXR1cm4gMjA7CiAgICAgICAgLy8gRGVmYXVsdCBjb25zaWRlcmVkIHJlYWNoYWJsZSB0byBhbGxvdyBkZWZlbnNpdmUgY29kaW5nCiAgICAgICAgZGVmYXVsdDogdGhyb3cgbmV3IEVycm9yKCJCYWQgaW5wdXQiKTsKICAgIH0KfQoKLy8gUmVwcm8gZnJvbSAjMTE1NzIKCmVudW0gRSB7IEEsIEIgfQoKZnVuY3Rpb24gZihlOiBFKTogbnVtYmVyIHsKICAgIHN3aXRjaCAoZSkgewogICAgICAgIGNhc2UgRS5BOiByZXR1cm4gMAogICAgICAgIGNhc2UgRS5COiByZXR1cm4gMQogICAgfQp9CgpmdW5jdGlvbiBnKGU6IEUpOiBudW1iZXIgewogICAgaWYgKCF0cnVlKQogICAgICAgIHJldHVybiAtMQogICAgZWxzZQogICAgICAgIHN3aXRjaCAoZSkgewogICA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Nhc2UgTXlFbnVtLkI6IHJldHVybiAiaXQgd2FzIEIiOwoJfQp9CgovLyBSZXBybyBmcm9tICMxODM2MgoKZW51bSBMZXZlbCB7CiAgT25lLAogIFR3bywKfQoKY29uc3QgZG9Tb21ldGhpbmdXaXRoTGV2ZWwgPSAobGV2ZWw6IExldmVsKTogTGV2ZWwgPT4gewogIGxldCBuZXh0OiBMZXZlbDsKICBzd2l0Y2ggKGxldmVsKSB7CiAgICBjYXNlIExldmVsLk9uZToKICAgICAgbmV4dCA9IExldmVsLlR3bzsKICAgICAgYnJlYWs7CiAgICBjYXNlIExldmVsLlR3bzoKICAgICAgbmV4dCA9IExldmVsLk9uZTsKICAgICAgYnJlYWs7CiAgfQogIHJldHVybiBuZXh0Owp9OwoKLy8gUmVwcm8gZnJvbSAjMjA0MDkKCmludGVyZmFjZSBTcXVhcmUyIHsKICAgIGtpbmQ6ICJzcXVhcmUiOwogICAgc2l6ZTogbnVtYmVyOwp9CgppbnRlcmZhY2UgQ2lyY2xlMiB7CiAgICBraW5kOiAiY2lyY2xlIjsKICAgIHJhZGl1czogbnVtYmVyOwp9Cgp0eXBlIFNoYXBlMiA9IFNxdWFyZTIgfCBDaXJjbGUyOwoKZnVuY3Rpb24gd2l0aERlZmF1bHQoczE6IFNoYXBlMiwgczI6IFNoYXBlMik6IHN0cmluZyB7CiAgICBzd2l0Y2ggKHMxLmtpbmQpIHsKICAgICAgICBjYXNlICJzcXVhcmUiOgogICAgICAgICAgICByZXR1cm4gIjEiOwogICAgICAgIGNhc2UgImNpcmNsZSI6CiAgICAgICAgICAgIHN3aXRjaCAoczIua2luZCkgewogICAgICAgICAgICAgICAgY2FzZSAic3F1YXJlIjoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIjIiOwogICAgICAgICAgICAgICAgY2FzZSAiY2lyY2xlIjoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIjMiOwogICAgICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIm5ldmVyIjsKICAgICAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiB3aXRob3V0RGVmYXVsdChzMTogU2hhcGUyLCBzMjogU2hhcGUyKTogc3RyaW5nIHsKICAgIHN3aXRjaCAoczEua2luZCkgewogICAgICAgIGNhc2UgInNxdWFyZSI6CiAgICAgICAgICAgIHJldHVybiAiMSI7CiAgICAgICAgY2FzZSAiY2lyY2xlIjoKICAgICAgICAgICAgc3dpdGNoIChzMi5raW5kKSB7CiAgICAgICAgICAgICAgICBjYXNlICJzcXVhcmUiOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAiMiI7CiAgICAgICAgICAgICAgICBjYXNlICJjaXJjbGUiOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAiMyI7CiAgICAgICAgICAgIH0KICAgIH0KfQoKLy8gUmVwcm8gZnJvbSAjMjA4MjMKCmZ1bmN0aW9uIHRlc3Q0KHZhbHVlOiAxIHwgMik6IHN0cmluZyB7CiAgICBsZXQgeDogc3RyaW5nOwogICAgc3dpdGNoICh2YWx1ZSkgewogICAgICAgIGNhc2UgMTogeCA9ICJvbmUiOyBicmVhazsKICAgICAgICBjYXNlIDI6IHggPSAidHdvIjsgYnJlYWs7CiAgICB9CiAgICByZXR1cm4geDsKfQoKLy8gUmVwcm8gZnJvbSAjMzQ2NjEKCmVudW0gQW5pbWFsIHsgRE9HLCBDQVQgfQoKZGVjbGFyZSBjb25zdCB6b286IHsgYW5pbWFsOiBBbmltYWwgfSB8IHVuZGVmaW5lZDsKCmZ1bmN0aW9uIGV4cHJlc3Npb24oKTogQW5pbWFsIHsKICAgIHN3aXRjaCAoem9vPy5hbmltYWwgPz8gQW5pbWFsLkRPRykgewogICAgICAgIGNhc2UgQW5pbWFsLkRPRzogcmV0dXJuIEFuaW1hbC5ET0cKICAgICAgICBjYXNlIEFuaW1hbC5DQVQ6IHJldHVybiBBbmltYWwuQ0FUCiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzM0ODQwCgpmdW5jdGlvbiBmb28oKTogdm9pZCB7CiAgICBjb25zdCBmb286IG51bWJlciB8IHVuZGVmaW5lZCA9IDA7CiAgICB3aGlsZSAodHJ1ZSkgewogICAgICAgIGNvbnN0IHN0YXRzID0gZm9vOwogICAgICAgIHN3aXRjaCAoc3RhdHMpIHsKICAgICAgICAgICAgY2FzZSAxOiBicmVhazsKICAgICAgICAgICAgY2FzZSAyOiBicmVhazsKICAgICAgICB9CiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzM1MDcwCgp0eXBlIE8gPSB7CiAgICBhOiBudW1iZXIsCiAgICBiOiBudW1iZXIKfTsKdHlwZSBLID0ga2V5b2YgTyB8ICdjJzsKZnVuY3Rpb24gZmYobzogTywgazogSyk6IG51bWJlciB7CiAgICBzd2l0Y2goaykgewogICAgICAgIGNhc2UgJ2MnOgogICAgICAgICAgICBrID0gJ2EnOwogICAgfQogICAgayA9PT0gJ2MnOyAgLy8gRXJyb3IKICAgIHJldHVybiBvW2tdOwp9CgovLyBSZXBybyBmcm9tICMzNTQzMQp0eXBlIEEgPSB7IGtpbmQ6ICJhYmMiIH0gfCB7IGtpbmQ6ICJkZWYiIH07CgpmdW5jdGlvbiBmMzU0MzEoYTogQSk6IHZvaWQgewogIHN3aXRjaCAoYS5raW5kKSB7CiAgICBjYXNlICJhYmMiOgogICAgY2FzZSAiZGVmIjogcmV0dXJuOwogICAgZGVmYXVsdDoKICAgICAgYSEua2luZDsgLy8gRXJyb3IgZXhwZWN0ZWQKICB9Cn0= + 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 index 1dc8342eb48a1..3cb88f6918909 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,9 +1,20 @@ +@@ -1,9 +1,19 @@ //// [exportDefaultNamespace.d.ts] @@ -18,7 +18,6 @@ \ No newline at end of file +export default function someFunc(): string; +//# sourceMappingURL=exportDefaultNamespace.d.ts.map -+ +/// [Errors] //// + +exportDefaultNamespace.ts(1,25): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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+IHsNCn0NCmRlY2xhcm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FjdGVkXSA9IG1hdGNoOwp9OwoKZnVuY3Rpb24gZjxBcnIsIEQgZXh0ZW5kcyBudW1iZXI+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..79dcb20d0f439 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/genericContextualTypes1.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [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..954bc5f88b875 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/indexSignatures1.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [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,GAA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kKY29uc3Qgb2JqMzogeyBba2V5OiBudW1iZXJdOiBzdHJpbmcgfSA9IHsgW3N5bV06ICdoZWxsbyAnfTsgIC8vIEVycm9yCgovLyBSZXBybyBmcm9tICM0NTc3MgoKdHlwZSBJZCA9IHN0cmluZyAmIHsgX190YWc6ICdpZCAnfTsKdHlwZSBSZWMxID0geyBba2V5OiBJZF06IG51bWJlciB9Owp0eXBlIFJlYzIgPSBSZWNvcmQ8SWQsIG51bWJlcj47Cgp0eXBlIEsxID0ga2V5b2YgUmVjMTsgIC8vIElkCnR5cGUgSzIgPSBrZXlvZiBSZWMyOyAgLy8gSWQK + 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..0c2d352d62ba4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/intraExpressionInferences.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [tests/cases/conformance/types/typeRelationships/typeInference/intraExpressionInferences.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [intraExpressionInferences.d.ts.map] +-{"version":3,"file":"intraExpressionInferences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gYjogKGFyZzI6IFQpID0+IFQyOwogICAgYzogKGFyZzM6IFQpID0+IFQzOwogICAgbmVzdGVkMjogewogICAgICBkOiAoYXJnNDogVDMpID0+IFQ0OwogICAgfTsKICB9Owp9KTogW1QsIFQyLCBUMywgVDRdOwoKY29uc3QgcmVzT25pb24yOiBbCiAgICBzdHJpbmdbXSwKICAgIHN0cmluZywKICAgIG51bWJlciwKICAgIGJvb2xlYW4KXSA9IG9uaW9uMih7CiAgYTogKGFyZykgPT4gW2FyZ10sCiAgbmVzdGVkOiB7CiAgICBiOiAoYXJnKSA9PiBhcmcuam9pbigiLCIpLAogICAgYzogKGFyZykgPT4gTnVtYmVyKGFyZyksCiAgICBuZXN0ZWQyOiB7CiAgICAgIGQ6IChhcmcpID0+IEJvb2xlYW4oYXJnKSwKICAgIH0sCiAgfSwKfSk7CgpkZWNsYXJlIGZ1bmN0aW9uIGRpc3RhbnQ8VD4oYXJnczogewogIGZvbzogewogICAgYmFyOiB7CiAgICAgIGJhejogewogICAgICAgIHByb2R1Y2VyOiAoYXJnOiBzdHJpbmcpID0+IFQ7CiAgICAgIH07CiAgICB9OwogIH07CiAgY29uc3VtZXI6ICh2YWw6IFQpID0+IHVua25vd247Cn0pOiBUOwoKY29uc3QgZGlzdGFudFJlczogbnVtYmVyID0gZGlzdGFudCh7CiAgZm9vOiB7CiAgICBiYXI6IHsKICAgICAgYmF6OiB7CiAgICAgICAgcHJvZHVjZXI6IChhcmcpID0+IDEsCiAgICAgIH0sCiAgICB9LAogIH0sCiAgY29uc3VtZXI6ICh2YWwpID0+IHt9LAp9KTsK ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBmdW5jdGlvbiBjYWxsSXQ8VD4ob2JqOiB7DQogICAgcHJvZHVjZTogKG46IG51bWJlcikgPT4gVDsNCiAgICBjb25zdW1lOiAoeDogVCkgPT4gdm9pZDsNCn0pOiB2b2lkOw0KZGVjbGFyZSBmdW5jdGlvbiBjYWxsSXRUPFQ+KG9iaj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Y29uc3VtZXI6ICh2YWwpID0+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/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..90a995c62b700 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isomorphicMappedTypeInference.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap is more detailed. (needs more validation)]] //// + +//// [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":["isomorphicMappedTypeInference.ts"],"names":[],"mappings":"AAAA,KAAK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gpOiB2b2lkIHsKICAgIGxldCB2ID0gewogICAgICAgIGE6IDQyLAogICAgICAgIGI6ICJoZWxsbyIsCiAgICAgICAgYzogdHJ1ZQogICAgfTsKICAgIGxldCBiID0gYm94aWZ5KHYpOwogICAgbGV0IHg6IG51bWJlciA9IGIuYS52YWx1ZTsKfQoKZnVuY3Rpb24gZjIoKTogdm9pZCB7CiAgICBsZXQgYiA9IHsKICAgICAgICBhOiBib3goNDIpLAogICAgICAgIGI6IGJveCgiaGVsbG8iKSwKICAgICAgICBjOiBib3godHJ1ZSkKICAgIH07CiAgICBsZXQgdiA9IHVuYm94aWZ5KGIpOwogICAgbGV0IHg6IG51bWJlciA9IHYuYTsKfQoKZnVuY3Rpb24gZjMoKTogdm9pZCB7CiAgICBsZXQgYiA9IHsKICAgICAgICBhOiBib3goNDIpLAogICAgICAgIGI6IGJveCgiaGVsbG8iKSwKICAgICAgICBjOiBib3godHJ1ZSkKICAgIH07CiAgICBhc3NpZ25Cb3hpZmllZChiLCB7IGM6IGZhbHNlIH0pOwp9CgpmdW5jdGlvbiBmNCgpOiB2b2lkIHsKICAgIGxldCBiID0gewogICAgICAgIGE6IGJveCg0MiksCiAgICAgICAgYjogYm94KCJoZWxsbyIpLAogICAgICAgIGM6IGJveCh0cnVlKQogICAgfTsKICAgIGIgPSBib3hpZnkodW5ib3hpZnkoYikpOwogICAgYiA9IHVuYm94aWZ5KGJveGlmeShiKSk7Cn0KCmZ1bmN0aW9uIG1ha2VSZWNvcmQ8VCwgSyBleHRlbmRzIHN0cmluZz4ob2JqOiB7IFtQIGluIEtdOiBUIH0pOiB7CiAgICBbUCBpbiBLXTogVDsKfSB7CiAgICByZXR1cm4gb2JqOwp9CgpmdW5jdGlvbiBmNShzOiBzdHJpbmcpOiB2b2lkIHsKICAgIGxldCBiID0gbWFrZVJlY29yZCh7CiAgICAgICAgYTogYm94KDQyKSwKICAgICAgICBiOiBib3goImhlbGxvIiksCiAgICAgICAgYzogYm94KHRydWUpCiAgICB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7CiAgICBmb286IG51bWJlcjsKICAgIGJhcjogc3RyaW5nOwp9ID0gZjIwKHsgZm9vOiA0MiwgYmFyOiAiaGVsbG8iIH0pOwpsZXQgeDE6ICJmb28iIHwgImJhciIgPSBmMjEoeyBmb286IDQyLCBiYXI6ICJoZWxsbyIgfSk7CmxldCB4MjogewogICAgZm9vOiBudW1iZXI7CiAgICBiYXI6IHN0cmluZzsKfSA9IGYyMih7IGZvbzogeyB2YWx1ZTogNDJ9ICwgYmFyOiB7IHZhbHVlOiAiaGVsbG8iIH0gfSk7CmxldCB4MzogewogICAgZm9vOiBudW1iZXI7CiAgICBiYXI6IHN0cmluZzsKfSA9IGYyMyh7IGZvbzogNDIsIGJhcjogImhlbGxvIiB9KTsKbGV0IHg0OiB7CiAgICBmb286IG51bWJlcjsKICAgIGJhcjogc3RyaW5nOwp9ICYgewogICAgZm9vOiBudW1iZXI7CiAgICBiYXI6IHN0cmluZzsKfSA9IGYyNCh7IGZvbzogNDIsIGJhcjogImhlbGxvIiB9KTsKCi8vIFJlcHJvIGZyb20gIzI5NzY1CgpmdW5jdGlvbiBnZXRQcm9wczxULCBLIGV4dGVuZHMga2V5b2YgVD4ob2JqOiBULCBsaXN0OiBLW10pOiBQaWNrPFQsIEs+IHsKICAgIHJldHVybiB7fSBhcyBhbnk7Cn0KCmNvbnN0IG15QW55OiBhbnkgPSB7fTsKCmNvbnN0IG8xOiBQaWNrPGFueSwgImZvbyIgfCAiYmFyIj4gPSBnZXRQcm9wcyhteUFueSwgWydmb28nLCAnYmFyJ10pOwoKY29uc3QgbzI6IHsgZm9vOiBhbnk7IGJhcjogYW55IH0gPSBnZXRQcm9wcyhteUFueSwgWydmb28nLCAnYmFyJ10pOwo= ++//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBCb3g8VD4gPSB7DQogICAgdmFsdWU6IFQ7DQp9Ow0KdHlwZSBCb3hpZmllZDxUPiA9IHsNCiAgICBbUCBpbiBrZXlvZiBUXTogQm94PFRbUF0+Ow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5b2YgVD4ob2JqOiBULCBsaXN0OiBLW10pOiBQaWNrPFQsIEs+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 index d8a6a2fa0c6b6..d82c7b8ae1c54 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,8 +1,21 @@ +@@ -1,8 +1,20 @@ //// [index.d.ts] @@ -16,7 +16,6 @@ -//# sourceMappingURL=index.d.ts.map \ No newline at end of file +//# sourceMappingURL=index.d.ts.map -+ +/// [Errors] //// + +index.ts(1,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index d43a63a176e0c..a34929cfa8bbc 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,5 +1,43 @@ +@@ -1,5 +1,42 @@ //// [index.d.ts] @@ -14,7 +14,6 @@ \ No newline at end of file +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map -+ +/// [Errors] //// + +index.ts(1,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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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G51bWJlciB8IHVuZGVmaW5lZCA/IEsgOiBuZXZlcl06IEJvdW5kczsKfQoKZnVuY3Rpb24gdmFsaWRhdGU8VCBleHRlbmRzIG9iamVjdD4ob2JqOiBULCBib3VuZHM6IE51bWVyaWNCb3VuZHNPZjxUPik6IGJvb2xlYW4gewogICAgZm9yIChjb25zdCBba2V5LCB2YWxdIG9mIE9iamVjdC5lbnRyaWVzKG9iaikpIHsKICAgICAgICBjb25zdCBib3VuZHNGb3JLZXkgPSBib3VuZHNba2V5IGFzIGtleW9mIE51bWVyaWNCb3VuZHNPZjxUPl07CiAgICAgICAgaWYgKGJvdW5kc0ZvcktleSkgewogICAgICAgICAgICBjb25zdCB7IG1pbiwgbWF4IH0gPSBib3VuZHNGb3JLZXk7CiAgICAgICAgICAgIGlmIChtaW4gPiB2YWwgfHwgbWF4IDwgdmFsKSByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIHRydWU7Cn0KCi8vIHJlcHJvIGZyb20gIzUwMDMwCgp0eXBlIE9iamVjdFdpdGhVbmRlcnNjb3JlZEtleXM8SyBleHRlbmRzIHN0cmluZz4gPSB7CiAgICBbayBpbiBLIGFzIGBfJHtrfWBdOiB0cnVlOwp9OwoKZnVuY3Rpb24gZ2VuZXJpY1Rlc3Q8SyBleHRlbmRzIHN0cmluZz4ob2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5czogT2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5czxLPiwga2V5OiBLKTogdm9pZCB7CiAgY29uc3Qgc2hvdWxkQmVUcnVlOiB0cnVlID0gb2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5c1tgXyR7a2V5fWBdOwp9Cg== ++//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBNYXBwZWQxPEsgZXh0ZW5kcyBzdHJpbmc+ID0gew0KICAgIFtQIGluIEtdOiB7DQogICAgICAgIGE6IFA7DQogICAgfTsNCn07DQpkZWNsYXJlIGZ1bmN0a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CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIHRydWU7Cn0KCi8vIHJlcHJvIGZyb20gIzUwMDMwCgp0eXBlIE9iamVjdFdpdGhVbmRlcnNjb3JlZEtleXM8SyBleHRlbmRzIHN0cmluZz4gPSB7CiAgICBbayBpbiBLIGFzIGBfJHtrfWBdOiB0cnVlOwp9OwoKZnVuY3Rpb24gZ2VuZXJpY1Rlc3Q8SyBleHRlbmRzIHN0cmluZz4ob2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5czogT2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5czxLPiwga2V5OiBLKTogdm9pZCB7CiAgY29uc3Qgc2hvdWxkQmVUcnVlOiB0cnVlID0gb2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5c1tgXyR7a2V5fWBdOwp9Cg== + 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,CAA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0cnVlIH07CiAgICB0aGlyZDogeyBhMzogdHJ1ZSB9Owp9CgpjbGFzcyBUZXN0IHsKICAgIGVudHJpZXM6IHsgW1QgaW4ga2V5b2YgVHlwZXNdPzogVHlwZXNbVF1bXSB9OwoKICAgIGNvbnN0cnVjdG9yKCkgewogICAgICAgIHRoaXMuZW50cmllcyA9IHt9OwogICAgfQoKICAgIGFkZEVudHJ5PFQgZXh0ZW5kcyBrZXlvZiBUeXBlcz4obmFtZTogVCwgZW50cnk6IFR5cGVzW1RdKTogdm9pZCB7CiAgICAgICAgaWYgKCF0aGlzLmVudHJpZXNbbmFtZV0pIHsKICAgICAgICAgICAgdGhpcy5lbnRyaWVzW25hbWVdID0gW107CiAgICAgICAgfQogICAgICAgIHRoaXMuZW50cmllc1tuYW1lXT8ucHVzaChlbnRyeSk7CiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzQ5MzM4Cgp0eXBlIFR5cGVzTWFwID0gewogICAgWzBdOiB7IGZvbzogJ2Jhcic7IH07CiAgICBbMV06IHsgYTogJ2InOyB9Owp9OwoKdHlwZSBQPFQgZXh0ZW5kcyBrZXlvZiBUeXBlc01hcD4gPSB7IHQ6IFQ7IH0gJiBUeXBlc01hcFtUXTsKCnR5cGUgVHlwZUhhbmRsZXJzID0gewogICAgW1QgaW4ga2V5b2YgVHlwZXNNYXBdPzogKHA6IFA8VD4pID0+IHZvaWQ7Cn07Cgpjb25zdCB0eXBlSGFuZGxlcnM6IFR5cGVIYW5kbGVycyA9IHsKICAgIFswXTogKHApID0+IGNvbnNvbGUubG9nKHAuZm9vKSwKICAgIFsxXTogKHApID0+IGNvbnNvbGUubG9nKHAuYSksCn07Cgpjb25zdCBvblNvbWVFdmVudCA9IDxUIGV4dGVuZHMga2V5b2YgVHlwZXNNYXA+KHA6IFA8VD4pOiB2b2lkIHwgdW5kZWZpbmVkID0+CiAgICB0eXBlSGFuZGxlcnNbcC50XT8uKHApOwo= ++//// https://sokra.github.io/source-map-visualization#base64,dHl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ZUhhbmRsZXJzID0gewogICAgW1QgaW4ga2V5b2YgVHlwZXNNYXBdPzogKHA6IFA8VD4pID0+IHZvaWQ7Cn07Cgpjb25zdCB0eXBlSGFuZGxlcnM6IFR5cGVIYW5kbGVycyA9IHsKICAgIFswXTogKHApID0+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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dHlwZSBDb25zdHJ1Y3RvcjxUPiA9IG5ldyguLi5hcmdzOiBhbnlbXSkgPT4gVDsKCmNsYXNzIEJhc2UgewogICAgY29uc3RydWN0b3IocHVibGljIHg6IG51bWJlciwgcHVibGljIHk6IG51bWJlcikge30KfQoKY2xhc3MgRGVyaXZlZCBleHRlbmRzIEJhc2UgewogICAgY29uc3RydWN0b3IoeDogbnVtYmVyLCB5OiBudW1iZXIsIHB1YmxpYyB6OiBudW1iZXIpIHsKICAgICAgICBzdXBlcih4LCB5KTsKICAgIH0KfQoKaW50ZXJmYWNlIFByaW50YWJsZSB7CiAgICBwcmludCgpOiB2b2lkOwp9Cgpjb25zdCBQcmludGFibGUgPSA8VCBleHRlbmRzIENvbnN0cnVjdG9yPEJhc2U+PihzdXBlckNsYXNzOiBUKTogQ29uc3RydWN0b3I8UHJpbnRhYmxlPiAmIHsgbWVzc2FnZTogc3RyaW5nIH0gJiBUID0+CiAgICBjbGFzcyBleHRlbmRzIHN1cGVyQ2xhc3MgewogICAgICAgIHN0YXRpYyBtZXNzYWdlID0gImhlbGxvIjsKICAgICAgICBwcmludCgpIHsKICAgICAgICAgICAgY29uc3Qgb3V0cHV0ID0gdGhpcy54ICsgIiwiICsgdGhpcy55OwogICAgICAgIH0KICAgIH0KCmludGVyZmFjZSBUYWdnZWQgewogICAgX3RhZzogc3RyaW5nOwp9CgpmdW5jdGlvbiBUYWdnZWQ8VCBleHRlbmRzIENvbnN0cnVjdG9yPHt9Pj4oc3VwZXJDbGFzczogVCk6IENvbnN0cnVjdG9yPFRhZ2dlZD4gJiBUIHsKICAgIGNsYXNzIEMgZXh0ZW5kcyBzdXBlckNsYXNzIHsKICAgICAgICBfdGFnOiBzdHJpbmc7CiAgICAgICAgY29uc3RydWN0b3IoLi4uYXJnczogYW55W10pIHsKICAgICAgICAgICAgc3VwZXIoLi4uYXJncyk7CiAgICAgICAgICAgIHRoaXMuX3RhZyA9ICJoZWxsbyI7CiAgICAgICAgfQogICAgfQogICA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3RyaW5nKSB7CiAgICAgICAgc3VwZXIoMTAsIDIwLCAzMCk7CiAgICAgICAgdGhpcy5fdGFnID0gdGFnOwogICAgfQogICAgdGVzdCgpOiB2b2lkIHsKICAgICAgICB0aGlzLnByaW50KCk7CiAgICB9Cn0K + 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,ZGVjbGFyZSBnbG9iYWwgew0KICAgIGludGVyZmFjZSBBY2NvdW50IHsNCiAgICAgICAgc29tZVByb3A6IG51bWJlcjsNCiAgICB9DQogICAgaW50ZXJmYWNlIEFjYyB7DQogICAgICAgIHNvbWVQcm9wOiBudW1iZXI7DQogICAgfQ0KfQ0KaW1wb3J0ICogYXMgbW9kZWwgZnJvbSAiLi9tb2RlbCI7DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmdW5jOiAoYWNjb3VudDogbW9kZWwuQWNjb3VudCwgYWNjMjogbW9kZWwuQWNjKSA9PiB2b2lkOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW5kZXguZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sQ0FBQyxNQUFNLENBQUM7SUFDWCxVQUFVLE9BQU87UUFDYixRQUFRLEVBQUUsTUFBTSxDQUFDO0tBQ3BCO0lBQ0QsVUFBVSxHQUFHO1FBQ1QsUUFBUSxFQUFFLE1BQU0sQ0FBQztLQUNwQjtDQUNKO0FBQ0QsT0FBTyxLQUFLLEtBQUssTUFBTSxTQUFTLENBQUM7QUFDakMsZUFBTyxNQUFNLElBQUksWUFBYSxhQUFhLFFBQVEsU0FBUyxLQUFHLElBQVUsQ0FBQyJ9,ZXhwb3J0ICogZnJvbSAiLi9hY2NvdW50IjsK ++//// 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"} 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/nodeModuleReexportFromDottedPath.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModuleReexportFromDottedPath.d.ts.diff index 2c8905cf383ef..9cee87fd3e925 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,7 +1,32 @@ +@@ -1,7 +1,31 @@ //// [/index.d.ts] @@ -16,7 +16,6 @@ \ No newline at end of file -//# sourceMappingURL=index.d.ts.map +//# sourceMappingURL=index.d.ts.map -+ +/// [Errors] //// + +/index.ts(4,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index ab27101e38fb1..952d17f9c409d 100644 --- 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 @@ -5,13 +5,12 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,23 +1,31 @@ +@@ -1,23 +1,30 @@ + +//// [index.d.ts] +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map -+ /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index ab27101e38fb1..952d17f9c409d 100644 --- 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 @@ -5,13 +5,12 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,23 +1,31 @@ +@@ -1,23 +1,30 @@ + +//// [index.d.ts] +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map -+ /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index f003718110b66..bef942d53bb44 100644 --- 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 @@ -5,24 +5,17 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,32 +1,41 @@ +@@ -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] - export interface Thing { - } - export declare const x: () => Thing; - //# sourceMappingURL=other.d.ts.map -+ - /// [Errors] //// +@@ -12,21 +15,24 @@ error TS2468: Cannot find global value 'Promise'. index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. 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 index f003718110b66..bef942d53bb44 100644 --- 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 @@ -5,24 +5,17 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,32 +1,41 @@ +@@ -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] - export interface Thing { - } - export declare const x: () => Thing; - //# sourceMappingURL=other.d.ts.map -+ - /// [Errors] //// +@@ -12,21 +15,24 @@ error TS2468: Cannot find global value 'Promise'. index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. 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 index 26b152f929d32..60594d86d563a 100644 --- 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 @@ -5,14 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,24 +1,28 @@ +@@ -1,24 +1,27 @@ //// [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'. 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 index 26b152f929d32..60594d86d563a 100644 --- 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 @@ -5,14 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,24 +1,28 @@ +@@ -1,24 +1,27 @@ //// [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'. 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 index 89c5c2240b513..fb12b58710b02 100644 --- 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 @@ -5,14 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,24 +1,28 @@ +@@ -1,24 +1,27 @@ //// [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'. 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 index 89c5c2240b513..fb12b58710b02 100644 --- 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 @@ -5,14 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,24 +1,28 @@ +@@ -1,24 +1,27 @@ //// [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'. 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 index 836cec064e50d..8ae13a3724713 100644 --- 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 @@ -5,14 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,24 +1,28 @@ +@@ -1,24 +1,27 @@ //// [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'. 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 index 836cec064e50d..8ae13a3724713 100644 --- 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 @@ -5,14 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,24 +1,28 @@ +@@ -1,24 +1,27 @@ //// [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'. 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..c6bf8baf531f5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesForbidenSyntax(module=node16).d.ts.map.diff @@ -0,0 +1,104 @@ +// [[Reason: Trivial sourcemap diff]] //// + +//// [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..c6bf8baf531f5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesForbidenSyntax(module=nodenext).d.ts.map.diff @@ -0,0 +1,104 @@ +// [[Reason: Trivial sourcemap diff]] //// + +//// [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..f8eeb7504fc81 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts.diff @@ -0,0 +1,17 @@ +// [[Reason: TODO: Import type has different module attributes]] //// + +//// [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..f8eeb7504fc81 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts.diff @@ -0,0 +1,17 @@ +// [[Reason: TODO: Import type has different module attributes]] //// + +//// [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..449f399e455bc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: TODO: Import type has different module attributes]] //// + +//// [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..449f399e455bc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: TODO: Import type has different module attributes]] //// + +//// [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 index fd4f8298fb780..4ac968f820fc2 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,86 +1,97 @@ +@@ -1,86 +1,96 @@ //// [nullPropertyName.d.ts] @@ -94,7 +94,6 @@ -//# sourceMappingURL=nullPropertyName.d.ts.map \ No newline at end of file +//# sourceMappingURL=nullPropertyName.d.ts.map -+ +/// [Errors] //// + +nullPropertyName.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index 5edd0ccf66ad4..f9e62659ec5f4 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -39,5 +39,60 @@ +@@ -39,5 +39,59 @@ THREE = "x" } declare const e: E; @@ -13,7 +13,6 @@ -//# sourceMappingURL=numericEnumMappedType.d.ts.map \ No newline at end of file +//# sourceMappingURL=numericEnumMappedType.d.ts.map -+ +/// [Errors] //// + +numericEnumMappedType.ts(25,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/optionalMethods.d.ts.diff new file mode 100644 index 0000000000000..8333cdeb6fb9c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/optionalMethods.d.ts.diff @@ -0,0 +1,25 @@ +// [[Reason: TODO: Optional constructor properties.]] //// + +//// [tests/cases/conformance/types/namedTypes/optionalMethods.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -8,14 +8,14 @@ + g?(): number; + } + declare function test1(x: Foo): void; + declare class Bar { +- d?: number | undefined; ++ d?: number; + e: number; + a: number; + b?: number; +- c?: number | undefined; +- constructor(d?: number | undefined, e?: number); ++ c?: number; ++ constructor(d?: number, e?: number); + f(): number; + g?(): number; + h?(): number; + } 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/OiBzdHJpbmc7DQp9DQpkZWNsYXJlIGNvbnN0IGZvbzE6IEZvbzsNCmRlY2xhcmUgY29uc3QgZm9vMjogRm9vOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9b3B0aW9uYWxQcm9wZXJ0aWVzMDEuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uYWxQcm9wZXJ0aWVzMDEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIm9wdGlvbmFsUHJvcGVydGllczAxLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFVBQVUsR0FBRztJQUNYLFNBQVMsRUFBRSxNQUFNLENBQUM7SUFDbEIsU0FBUyxFQUFFLE1BQU0sQ0FBQztJQUNsQixRQUFRLENBQUMsRUFBRSxNQUFNLENBQUM7Q0FDbkI7QUFFRCxRQUFBLE1BQU0sSUFBSSxLQUFnQyxDQUFDO0FBQzNDLFFBQUEsTUFBTSxJQUFJLEtBQWlELENBQUMifQ==,aW50ZXJmYWNlIEZvbyB7CiAgcmVxdWlyZWQxOiBzdHJpbmc7CiAgcmVxdWlyZWQyOiBzdHJpbmc7CiAgb3B0aW9uYWw/OiBzdHJpbmc7Cn0KCmNvbnN0IGZvbzEgPSB7IHJlcXVpcmVkMTogImhlbGxvIiB9IGFzIEZvbzsKY29uc3QgZm9vMiA9IHsgcmVxdWlyZWQxOiAiaGVsbG8iLCBvcHRpb25hbDogImJhciIgfSBhcyBGb287Cg== ++//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIEZvbyB7DQogICAgcmVxdWlyZWQxOiBzdHJpbmc7DQogICAgcmVxdWlyZWQyOiBzdHJpbmc7DQogICAgb3B0aW9uYWw/OiBzdHJpbmc7DQp9DQpkZWNsYXJlIGNvbnN0IGZvbzE6IEZvbzsNCmRlY2xhcmUgY29uc3QgZm9vMjogRm9vOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9b3B0aW9uYWxQcm9wZXJ0aWVzMDEuZC50cy5tYXA=,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..847cdfe486683 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parameterDestructuringObjectLiteral.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [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=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyYW1ldGVyRGVzdHJ1Y3R1cmluZ09iamVjdExpdGVyYWwuZC50cyIsInNvdXJjZVJv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UFBTSxHQUFHLEdBQUksT0FBTyxFQUFFO0lBQUUsT0FBTyxDQUFDLEVBQUUsRUFBRSxDQUFBO0NBQUUsS0FBRyxJQUFXLENBQUM7QUFHckQsUUFBQSxNQUFNLEdBQUcsR0FBSSxFQUFFLE9BQVksRUFBRSxFQUFFO0lBQ3ZCLE9BQU8sQ0FBQyxFQUFFLEVBQUUsQ0FBQztDQUNoQixLQUFHLElBQVcsQ0FBQyJ9,Ly8gUmVwcm8gZnJvbSAjMjI2NDQKCmNvbnN0IGZuMSA9IChvcHRpb25zOiB7IGhlYWRlcnM/OiB7fSB9KTogdm9pZCA9PiB7IH07CmZuMSh7IGhlYWRlcnM6IHsgZm9vOiAxIH0gfSk7Cgpjb25zdCBmbjIgPSAoeyBoZWFkZXJzID0ge30gfTogewogICAgICAgIGhlYWRlcnM/OiB7fTsKICAgIH0pOiB2b2lkID0+IHsgfTsKZm4yKHsgaGVhZGVyczogeyBmb286IDEgfSB9KTsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/paramterDestrcuturingDeclaration.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/paramterDestrcuturingDeclaration.d.ts.diff new file mode 100644 index 0000000000000..d7ee4bc3ac83b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/paramterDestrcuturingDeclaration.d.ts.diff @@ -0,0 +1,22 @@ +// [[Reason: Aliases are preserved for binding patterns GH#55654]] //// + +//// [tests/cases/compiler/paramterDestrcuturingDeclaration.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,12 +1,12 @@ + + + //// [paramterDestrcuturingDeclaration.d.ts] + interface C { +- ({ p }: { ++ ({ p: name }: { + p: any; + }): any; +- new ({ p }: { ++ new ({ p: boolean }: { + p: any; + }): any; + } + //# sourceMappingURL=paramterDestrcuturingDeclaration.d.ts.map 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..760ea7ad86b6a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/parenthesisDoesNotBlockAliasSymbolCreation.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [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,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,MAAM;EAAG,CAAC;AAC7C,eAAO,MAAM,EAAE;OAAiB,MAAM;oBAAqB,CAAC;AAC5D,eAAO,MAAM,EAAE;OAAiB,MAAM;qBAAsB,CAAC"} ++{"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,EAAW,CAAC,CAAC;IAAE,CAAC,EAAG,MAAM,CAAA;CAAE,CAAC,CAAC;AAC3C,eAAO,MAAM,EAAE,EAAW,EAAE,CAAC;IAAE,CAAC,EAAG,MAAM,CAAA;CAAE,CAAC,CAAC;AAC7C,eAAO,MAAM,EAAE,EAAW;IAAE,CAAC,EAAG,MAAM,CAAA;CAAE,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;AAC5D,eAAO,MAAM,EAAE,EAAW;IAAE,CAAC,EAAG,MAAM,CAAA;CAAE,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IHR5cGUgSW52YWxpZEtleXM8SyBleHRlbmRzIHN0cmluZyB8IG51bWJlciB8IHN5bWJvbD4gPSB7DQogICAgW1AgaW4gS10/OiBuZXZlcjsNCn07DQpleHBvcnQgdHlwZSBJbnZhbGlkS2V5czI8SyBleHRlbmRzIHN0cmluZyB8IG51bWJlciB8IHN5bWJvbD4gPSAoew0KICAgIFtQIGluIEt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W52YWxpZEtleXM8SyBleHRlbmRzIHN0cmluZ3xudW1iZXJ8c3ltYm9sPiA9IHsgW1AgaW4gS10/IDogbmV2ZXIgfTsKZXhwb3J0IHR5cGUgSW52YWxpZEtleXMyPEsgZXh0ZW5kcyBzdHJpbmd8bnVtYmVyfHN5bWJvbD4gPSAoCiAgICB7IFtQIGluIEtdPyA6IG5ldmVyIH0KKTsKCmV4cG9ydCB0eXBlIEE8VD4gPSAoCiAgICBUICYgSW52YWxpZEtleXM8ImEiPgopOwpleHBvcnQgdHlwZSBBMjxUPiA9ICgKICAgIFQgJiBJbnZhbGlkS2V5czI8ImEiPgopOwoKZXhwb3J0IGNvbnN0IGEgPSBudWxsIGFzIEE8eyB4IDogbnVtYmVyIH0+OwpleHBvcnQgY29uc3QgYTIgPSBudWxsIGFzIEEyPHsgeCA6IG51bWJlciB9PjsKZXhwb3J0IGNvbnN0IGEzID0gbnVsbCBhcyB7IHggOiBudW1iZXIgfSAmIEludmFsaWRLZXlzPCJhIj47CmV4cG9ydCBjb25zdCBhNCA9IG51bGwgYXMgeyB4IDogbnVtYmVyIH0gJiBJbnZhbGlkS2V5czI8ImEiPjsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/reexportWrittenCorrectlyInDeclaration.d.ts.map.diff b/tests/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..32b1f124e3684 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/renamingDestructuredPropertyInFunctionType.d.ts.diff @@ -0,0 +1,92 @@ +// [[Reason: Aliases are preserved for binding patterns GH#55654]] //// + +//// [tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,16 +6,16 @@ + b: number; + c: number; + }; + type F1 = (arg: number) => any; +-type F2 = ({ a }: O) => any; +-type F3 = ({ a, b, c }: O) => any; +-type F4 = ({ a }: O) => any; +-type F5 = ({ a, b, c }: O) => 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, b: number }: { ++type F7 = ({ a: string, b: number }: { + a: any; + b: any; + }) => typeof number; + type F8 = ({ a, b: number }: { +@@ -27,16 +27,16 @@ + any, + any + ]) => void; + type G1 = new (arg: number) => any; +-type G2 = new ({ a }: O) => any; +-type G3 = new ({ a, b, c }: O) => any; +-type G4 = new ({ a }: O) => any; +-type G5 = new ({ a, b, c }: O) => 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, b: number }: { ++type G7 = new ({ a: string, b: number }: { + a: any; + b: any; + }) => typeof number; + type G8 = new ({ a, b: number }: { +@@ -69,32 +69,32 @@ + 2: any; + }) => void; + interface I { + method1(arg: number): any; +- method2({ a }: { ++ method2({ a: string }: { + a: any; + }): any; + (arg: number): any; +- ({ a }: { ++ ({ a: string }: { + a: any; + }): any; + new (arg: number): any; +- new ({ a }: { ++ new ({ a: string }: { + a: any; + }): any; + } +-declare function f1({ a }: O): void; ++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 }: O): void; ++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; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/stringLiteralObjectLiteralDeclaration1.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/stringLiteralObjectLiteralDeclaration1.d.ts.map.diff new file mode 100644 index 0000000000000..dc9e165fbdd29 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/stringLiteralObjectLiteralDeclaration1.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/stringLiteralObjectLiteralDeclaration1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [stringLiteralObjectLiteralDeclaration1.d.ts.map] +-{"version":3,"file":"stringLiteralObjectLiteralDeclaration1.d.ts","sourceRoot":"","sources":["stringLiteralObjectLiteralDeclaration1.ts"],"names":[],"mappings":"AAAA,kBAAO,EAAE,CAAC;IACD,IAAI,CAAC;;KAAmB,CAAC;CACjC"} ++{"version":3,"file":"stringLiteralObjectLiteralDeclaration1.d.ts","sourceRoot":"","sources":["stringLiteralObjectLiteralDeclaration1.ts"],"names":[],"mappings":"AAAA,kBAAO,EAAE,CAAC;IACD,IAAI,CAAC;QAAK,SAAS;KAAK,CAAC;CACjC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBuYW1lc3BhY2UgbTEgew0KICAgIHZhciBuOiB7DQogICAgICAgICdmb28gYmFyJzogbnVtYmVyOw0KICAgIH07DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1zdHJpbmdMaXRlcmFsT2JqZWN0TGl0ZXJhbERlY2xhcmF0aW9uMS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaW5nTGl0ZXJhbE9iamVjdExpdGVyYWxEZWNsYXJhdGlvbjEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInN0cmluZ0xpdGVyYWxPYmplY3RMaXRlcmFsRGVjbGFyYXRpb24xLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGtCQUFPLEVBQUUsQ0FBQztJQUNELElBQUksQ0FBQzs7S0FBbUIsQ0FBQztDQUNqQyJ9,bW9kdWxlIG0xIHsKICBleHBvcnQgdmFyIG4gPSB7ICdmb28gYmFyJzogNCB9Owp9Cg== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBuYW1lc3BhY2UgbTEgew0KICAgIHZhciBuOiB7DQogICAgICAgICdmb28gYmFyJzogbnVtYmVyOw0KICAgIH07DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1zdHJpbmdMaXRlcmFsT2JqZWN0TGl0ZXJhbERlY2xhcmF0aW9uMS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaW5nTGl0ZXJhbE9iamVjdExpdGVyYWxEZWNsYXJhdGlvbjEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInN0cmluZ0xpdGVyYWxPYmplY3RMaXRlcmFsRGVjbGFyYXRpb24xLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGtCQUFPLEVBQUUsQ0FBQztJQUNELElBQUksQ0FBQztRQUFLLFNBQVM7S0FBSyxDQUFDO0NBQ2pDIn0=,bW9kdWxlIG0xIHsKICBleHBvcnQgdmFyIG4gPSB7ICdmb28gYmFyJzogNCB9Owp9Cg== + 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 index 4e1f9f2d488f6..2792c51b7c55d 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,27 +5,32 @@ +@@ -5,8 +5,9 @@ interface I { } export class C { @@ -15,10 +15,9 @@ get [Symbol.toPrimitive](): I; set [Symbol.toPrimitive](x: I); } - export {}; +@@ -14,18 +15,21 @@ } //# sourceMappingURL=symbolDeclarationEmit12.d.ts.map -+ /// [Errors] //// +symbolDeclarationEmit12.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 6d0f145a613cb..698cca3f6b32f 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,5 +1,32 @@ +@@ -1,5 +1,31 @@ //// [Folder/monorepo/core/index.d.ts] @@ -14,7 +14,6 @@ \ 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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,aW50ZXJmYWNlIFN5bWJvbENvbnN0cnVjdG9yIHsNCiAgICByZWFkb25seSBvYnNlcnZlcjogc3ltYm9sOw0KfQ0KaW50ZXJmYWNlIFN5bWJvbENvbnN0cnVjdG9yIHsNCiAgICByZWFkb25seSBvYnNlcnZlcjogdW5pcXVlIHN5bWJvbDsNCn0NCmRlY2xhcmUgY29uc3Qgb2JqOiB7DQogICAgW1N5bWJvbC5vYnNlcnZlcl06IG51bWJlcjsNCn07DQovLyMgc291cmNlTWFwcGluZ1VSTD1zeW1ib2xPYnNlcnZlck1pc21hdGNoaW5nUG9seWZpbGxzV29ya1RvZ2V0aGVy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2V0aGVyLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3ltYm9sT2JzZXJ2ZXJNaXNtYXRjaGluZ1BvbHlmaWxsc1dvcmtUb2dldGhlci5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3ltYm9sT2JzZXJ2ZXJNaXNtYXRjaGluZ1BvbHlmaWxsc1dvcmtUb2dldGhlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxVQUFVLGlCQUFpQjtJQUN2QixRQUFRLENBQUMsUUFBUSxFQUFFLE1BQU0sQ0FBQztDQUM3QjtBQUNELFVBQVUsaUJBQWlCO0lBQ3ZCLFFBQVEsQ0FBQyxRQUFRLEVBQUUsT0FBTyxNQUFNLENBQUM7Q0FDcEM7QUFFRCxRQUFBLE1BQU0sR0FBRztJQUNMLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQztDQUNwQixDQUFDIn0=,aW50ZXJmYWNlIFN5bWJvbENvbnN0cnVjdG9yIHsKICAgIHJlYWRvbmx5IG9ic2VydmVyOiBzeW1ib2w7Cn0KaW50ZXJmYWNlIFN5bWJvbENvbnN0cnVjdG9yIHsKICAgIHJlYWRvbmx5IG9ic2VydmVyOiB1bmlxdWUgc3ltYm9sOwp9Cgpjb25zdCBvYmogPSB7CiAgICBbU3ltYm9sLm9ic2VydmVyXTogMAp9Ow== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateLiteralTypes2.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateLiteralTypes2.d.ts.map.diff new file mode 100644 index 0000000000000..e8c4a9731dcd1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateLiteralTypes2.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/types/literal/templateLiteralTypes2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 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xlLnJvdGF0ZX1kaWcpYCk7Cg== + 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 index d07610688bd73..bd005e6eb744c 100644 --- 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 @@ -18,12 +18,9 @@ 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; -@@ -156,15 +156,18 @@ - declare function f2(s: `**${T}**`): T; - declare function f3(s: `**${T}**`): T; +@@ -158,13 +158,15 @@ declare function f4(s: `**${T}**`): T; //# sourceMappingURL=templateLiteralTypes4.d.ts.map -+ /// [Errors] //// +templateLiteralTypes4.ts(43,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -38,7 +35,7 @@ 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 +209,12 @@ +@@ -206,8 +208,12 @@ type TNumberLiteralEnum0 = "0" extends `${infer T extends NumberLiteralEnum}` ? T : never; // NumberLiteralEnum.Zero // infer from non-literal enums 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/typeFromPropertyAssignment29.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment29.d.ts.diff index b60a86e2451e5..93690a4cf2d71 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: Function declarations are not fixed]] //// +// [[Reason: Function declarations and class expressions are not fixed]] //// //// [tests/cases/conformance/salsa/typeFromPropertyAssignment29.ts] //// @@ -46,12 +46,19 @@ export {}; } declare var ExpandoExpr2: (n: number) => string; -@@ -62,10 +49,15 @@ - }; - }; +@@ -55,33 +42,36 @@ + 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(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. @@ -62,13 +69,19 @@ typeFromPropertyAssignment29.ts(78,14): error TS2339: Property 'm' does not exist on type '(n: number) => string'. typeFromPropertyAssignment29.ts(81,30): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. typeFromPropertyAssignment29.ts(81,50): error TS2339: Property 'm' does not exist on type '(n: number) => string'. -@@ -78,10 +70,12 @@ + 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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. + typeFromPropertyAssignment29.ts(91,50): error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. ++typeFromPropertyAssignment29.ts(94,20): error TS9011: Declaration emit for class expressions are 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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. -==== typeFromPropertyAssignment29.ts (12 errors) ==== -+==== typeFromPropertyAssignment29.ts (16 errors) ==== ++==== typeFromPropertyAssignment29.ts (17 errors) ==== function ExpandoDecl(n: number): string { + ~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. @@ -76,7 +89,7 @@ } ExpandoDecl.prop = 2 ExpandoDecl.m = function(n: number) { -@@ -120,8 +114,10 @@ +@@ -120,8 +110,10 @@ } @@ -87,7 +100,7 @@ total: number; } { const nested = function (m: number) { -@@ -132,8 +128,10 @@ +@@ -132,8 +124,10 @@ } ExpandoNested.also = -1; @@ -98,7 +111,7 @@ } ExpandoMerge.p1 = 111 namespace ExpandoMerge { -@@ -145,8 +143,10 @@ +@@ -145,8 +139,10 @@ var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); namespace Ns { @@ -109,3 +122,14 @@ export function foo(): typeof ExpandoNamespace { return ExpandoNamespace; } +@@ -189,8 +185,10 @@ + !!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. + + // Class expressions shouldn't work in typescript either + var ExpandoExpr3 = class { ++ ~~~~~ ++!!! error TS9011: Declaration emit for class expressions are 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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AgIGlzTGVhZGVyKCk6IHRoaXMgaXMgTWltaWNMZWFkZXIgeyByZXR1cm4gdGhpcyBpbnN0YW5jZW9mIE1pbWljTGVhZGVyOyB9OwogICAgaXNGb2xsb3dlcigpOiB0aGlzIGlzIE1pbWljRm9sbG93ZXIgeyByZXR1cm4gdGhpcyBpbnN0YW5jZW9mIE1pbWljRm9sbG93ZXI7IH07Cn0KCmNsYXNzIE1pbWljTGVhZGVyIGV4dGVuZHMgTWltaWNHdWFyZCB7CiAgICBsZWFkKCk6IHZvaWQge30KfQoKY2xhc3MgTWltaWNGb2xsb3dlciBleHRlbmRzIE1pbWljR3VhcmQgewogICAgZm9sbG93KCk6IHZvaWQge30KfQoKbGV0IG1pbWljOiBNaW1pY0d1YXJkID0gbmV3IE1pbWljR3VhcmQoKTsKCmEuaXNMZWFkZXIgPSBtaW1pYy5pc0xlYWRlcjsKYS5pc0ZvbGxvd2VyID0gbWltaWMuaXNGb2xsb3dlcjsKCmlmIChtaW1pYy5pc0ZvbGxvd2VyKCkpIHsKICAgIG1pbWljLmZvbGxvdygpOwogICAgbWltaWMuaXNGb2xsb3dlciA9IGEuaXNGb2xsb3dlcjsKfQoKCmludGVyZmFjZSBNaW1pY0d1YXJkSW50ZXJmYWNlIHsKICAgIGlzTGVhZGVyKCk6IHRoaXMgaXMgTGVhZEd1YXJkOwogICAgaXNGb2xsb3dlcigpOiB0aGlzIGlzIEZvbGxvd2VyR3VhcmQ7Cn0K + 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,iB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UFBRSxNQUFNO0lBQ3pCLFNBQVMsRUFBRSxPQUFPLGlCQUFpQixDQUFDO0NBQ1IsQ0FBQyJ9,Y2xhc3MgQ2xhc3NNYXBEaXJlY3RpdmUge30KCmV4cG9ydCB0eXBlIHtDbGFzc01hcERpcmVjdGl2ZX07CgpleHBvcnQgY29uc3QgZGlyZWN0aXZlID0KICA8Qz4oY2xhc3NfOiBDKTogKCkgPT4gewogICAgICBkaXJlY3RpdmU6IEM7CiAgfSA9PgogICgpID0+ICh7CiAgICBkaXJlY3RpdmU6IGNsYXNzXywKICB9KTsKCmV4cG9ydCBjb25zdCBjbGFzc01hcDogKCkgPT4gewogICAgZGlyZWN0aXZlOiB0eXBlb2YgQ2xhc3NNYXBEaXJlY3RpdmU7Cn0gPSBkaXJlY3RpdmUoQ2xhc3NNYXBEaXJlY3RpdmUpOwo= + 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 index 2afcb4b1acf88..b45be22a50ea4 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,6 +1,50 @@ +@@ -1,6 +1,49 @@ //// [/.src/main.d.ts] @@ -16,7 +16,6 @@ +export declare const va: invalid; +export declare const vb: invalid; +//# sourceMappingURL=main.d.ts.map -+ +/// [Errors] //// + +main.ts(4,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index b68db0247cc2f..6418130c28fdf 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,23 +1,27 @@ +@@ -1,23 +1,26 @@ //// [/.src/main.d.ts] @@ -13,7 +13,6 @@ -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'. 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 index b883b2d632e38..7099d9251a3e1 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,6 +1,47 @@ +@@ -1,6 +1,46 @@ //// [/.src/main.d.ts] @@ -16,7 +16,6 @@ +export declare const va: invalid; +export declare const va2: invalid; +//# sourceMappingURL=main.d.ts.map -+ +/// [Errors] //// + +main.ts(4,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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..c12207f96018e --- /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 TS9011: Declaration emit for class expressions are 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 TS9011: Declaration emit for class expressions are 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/uniqueSymbolsDeclarationsErrors.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/uniqueSymbolsDeclarationsErrors.d.ts.map.diff new file mode 100644 index 0000000000000..4ca1f114c45d3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/uniqueSymbolsDeclarationsErrors.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/conformance/types/uniqueSymbol/uniqueSymbolsDeclarationsErrors.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [uniqueSymbolsDeclarationsErrors.d.ts.map] +-{"version":3,"file":"uniqueSymbolsDeclarationsErrors.d.ts","sourceRoot":"","sources":["uniqueSymbolsDeclarationsErrors.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,MAAM,CAAC;AAC/B,UAAU,CAAC;IAAG,QAAQ,CAAC,YAAY,EAAE,OAAO,MAAM,CAAC;CAAE;AAIrD,eAAO,MAAM,GAAG;eACD,QAAQ,GAAG,QAAQ;eAGnB,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC;CAGnD,CAAC;AAEF,eAAO,MAAM,eAAe;;mBACb,QAAQ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IHR5cGVvZiBzKTogdm9pZCB9KTogewogICAgbWV0aG9kKHA6IHR5cGVvZiBzKTogdm9pZDsKfSB7CiAgICByZXR1cm4gb2JqOwp9CgpleHBvcnQgaW50ZXJmYWNlIEludGVyZmFjZVdpdGhQcml2YXRlTmFtZWRQcm9wZXJ0aWVzIHsKICAgIFtzXTogYW55Owp9CgpleHBvcnQgaW50ZXJmYWNlIEludGVyZmFjZVdpdGhQcml2YXRlTmFtZWRNZXRob2RzIHsKICAgIFtzXSgpOiBhbnk7Cn0KCmV4cG9ydCB0eXBlIFR5cGVMaXRlcmFsV2l0aFByaXZhdGVOYW1lZFByb3BlcnRpZXMgPSB7CiAgICBbc106IGFueTsKfQoKZXhwb3J0IHR5cGUgVHlwZUxpdGVyYWxXaXRoUHJpdmF0ZU5hbWVkTWV0aG9kcyA9IHsKICAgIFtzXSgpOiBhbnk7Cn0KCmV4cG9ydCBjbGFzcyBDbGFzc1dpdGhQcml2YXRlTmFtZWRQcm9wZXJ0aWVzIHsKICAgIFtzXTogYW55OwogICAgc3RhdGljIFtzXTogYW55Owp9CgpleHBvcnQgY2xhc3MgQ2xhc3NXaXRoUHJpdmF0ZU5hbWVkTWV0aG9kcyB7CiAgICBbc10oKTogdm9pZCB7fQogICAgc3RhdGljIFtzXSgpOiB2b2lkIHt9Cn0KCmV4cG9ydCBjbGFzcyBDbGFzc1dpdGhQcml2YXRlTmFtZWRBY2Nlc3NvcnMgewogICAgZ2V0IFtzXSgpOiBhbnkgeyByZXR1cm4gdW5kZWZpbmVkOyB9CiAgICBzZXQgW3NdKHY6IGFueSkgeyB9CiAgICBzdGF0aWMgZ2V0IFtzXSgpOiBhbnkgeyByZXR1cm4gdW5kZWZpbmVkOyB9CiAgICBzdGF0aWMgc2V0IFtzXSh2OiBhbnkpIHsgfQp9 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/vardecl.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/vardecl.d.ts.map.diff new file mode 100644 index 0000000000000..2225d8111a734 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/vardecl.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/vardecl.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [vardecl.d.ts.map] +-{"version":3,"file":"vardecl.d.ts","sourceRoot":"","sources":["vardecl.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,SAAS,EAAE,GAAG,CAAC;AAEnB,QAAA,IAAI,UAAU,EAAE,GAAG,CAAC;AACpB,QAAA,IAAI,iBAAiB,EAAE,MAAM,CAAC;AAC9B,QAAA,IAAI,gBAAgB,EAAE,MAAM,EAAE,CAAC;AAE/B,QAAA,IAAI,mBAAmB,QAAK,CAAC;AAE7B,QAAA,IAAI,oBAAoB;;;;CAAqC,CAAC;AAE9D,OAAO,CAAC,IAAI,WAAW,EAAE,GAAG,CAAC;AAC7B,OAAO,CAAC,IAAI,WAAW,EAAE,GAAG,CAAA;AAE5B,OAAO,CAAC,IAAI,YAAY,EAAE,GAAG,CAAC;AAC9B,OAAO,CAAC,IAAI,kBAAkB,EAAE,MAAM,CAAC;AAEvC,QAAA,IAAI,QAAQ,EAAE,MAAM,EAAe,CAAC;AAEpC,QAAA,IAAI,mBAAmB,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;CAAE,EAAE,CAAE;AAGtD,QAAA,IAAI,EAAE,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAAE,CAAC;AAEjC,QAAA,IAAI,CAAC,EAAG;IACA,GAAG,CAAC,IAAK,GAAG,CAAC;CAChB,CAAA;AAEL,QAAA,IAAI,CAAC,EAAE;IACH,GAAG,CAAC,IAAK;QACL,CAAC,EAAE,MAAM,CAAC;KACb,CAAC;CACL,CAAA;AAED,QAAA,IAAI,EAAE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jI7CiAgICB2YXIgbTM7CgogICAgY2xhc3MgQyB7CiAgICAgICAgY29uc3RydWN0b3IgKHB1YmxpYyBiKSB7CiAgICAgICAgfQogICAgfQoKICAgIGV4cG9ydCBjbGFzcyBDMiB7CiAgICAgICAgY29uc3RydWN0b3IgKHB1YmxpYyBiOiBhbnkpIHsKICAgICAgICB9CiAgICB9CiAgICB2YXIgbTsKICAgIGRlY2xhcmUgdmFyIGQxLCBkMjsKICAgIHZhciBiMjM7CiAgICBkZWNsYXJlIHZhciB2MTsKICAgIGV4cG9ydCB2YXIgbUU6IGFueTsKICAgIGV4cG9ydCBkZWNsYXJlIHZhciBkMUU6IGFueSwgZDJFOiBhbnk7CiAgICBleHBvcnQgdmFyIGIyRTogYW55OwogICAgZXhwb3J0IGRlY2xhcmUgdmFyIHYxRTogYW55Owp9Cgp2YXIgYTIyOiBhbnksIGIyMiA9IDEwLCBjMjIgPSAzMDsKdmFyIG5uOiBhbnk7CgpkZWNsYXJlIHZhciBkYTE6IGFueSwgZGEyOiBhbnk7CnZhciBub3JtYWxWYXI6IGFueTsKZGVjbGFyZSB2YXIgZHYxOiBhbnk7CnZhciB4bDogYW55Owp2YXIgeDogYW55Owp2YXIgejogYW55OwoKZnVuY3Rpb24gZm9vKGEyOiBhbnkpOiB2b2lkIHsKICAgIHZhciBhID0gMTA7Cn0KCmZvciAodmFyIGkgPSAwLCBqID0gMDsgaSA8IDEwOyBpKyspIHsKICAgIGorKzsKfQoKCmZvciAodmFyIGsgPSAwOyBrIDwgMzA7IGsrKykgewogICAgaysrOwp9CnZhciBiID0gMTA7Cg== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgc2ltcGxlVmFyOiBhbnk7DQpkZWNsYXJlIHZhciBhbm90aGVyVmFyOiBhbnk7DQpkZWNsYXJlIHZhciB2YXJXaXRoU2ltcGxlVHlwZTogbnVtYmVyOw0KZGVjbGFyZSB2YXIgdmFyV2l0aEFycmF5VHlwZTogbnVtYmVyW107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2F0ZWRBcnJheVZhci5wdXNoKHsgeDogMzAsIHkgOiAnaGVsbG8gd29ybGQnIH0pOwoKdmFyIG4xOiB7IFtzOiBzdHJpbmddOiBudW1iZXI7IH07Cgp2YXIgYyA6IHsKICAgICAgICBuZXc/ICgpOiBhbnk7CiAgICB9Cgp2YXIgZDogewogICAgZm9vPyAoKTogewogICAgICAgIHg6IG51bWJlcjsKICAgIH07Cn0KCnZhciBkMzogewogICAgZm9vKCk6IHsKICAgICAgICB4OiBudW1iZXI7CiAgICAgICAgeTogbnVtYmVyOwogICAgfTsKfQoKdmFyIGQyOiB7CiAgICBmb28gKCk6IHsKICAgICAgICB4OiBudW1iZXI7CiAgICB9Owp9Cgp2YXIgbjI6IHsKICAgICgpOiB2b2lkOwp9CnZhciBuNDogewogICAgKCk6IHZvaWQ7Cn1bXTsKCnZhciBkNDogewogICAgZm9vKG46IHN0cmluZywgeDogeyB4OiBudW1iZXI7IHk6IG51bWJlcjsgfSk6IHsKICAgICAgICB4OiBudW1iZXI7CiAgICAgICAgeTogbnVtYmVyOwogICAgfTsKfQoKbW9kdWxlIG0yIHsKCiAgICBleHBvcnQgdmFyIGE6IGFueSwgYjI6IG51bWJlciA9IDEwLCBiOiBhbnk7CiAgICB2YXIgbTE7CiAgICB2YXIgYTIsIGIyMjogbnVtYmVyID0gMTAsIGIyMjI7CiAgICB2YXIgbTM7CgogICAgY2xhc3MgQyB7CiAgICAgICAgY29uc3RydWN0b3IgKHB1YmxpYyBiKSB7CiAgICAgICAgfQogICAgfQoKICAgIGV4cG9ydCBjbGFzcyBDMiB7CiAgICAgICAgY29uc3RydWN0b3IgKHB1YmxpYyBiOiBhbnkpIHsKICAgICAgICB9CiAgICB9CiAgICB2YXIgbTsKICAgIGRlY2xhcmUgdmFyIGQxLCBkMjsKICAgIHZhciBiMjM7CiAgICBkZWNsYXJlIHZhciB2MTsKICAgIGV4cG9ydCB2YXIgbUU6IGFueTsKICAgIGV4cG9ydCBkZWNsYXJlIHZhciBkMUU6IGFueSwgZDJFOiBhbnk7CiAgICBleHBvcnQgdmFyIGIyRTogYW55OwogICAgZXhwb3J0IGRlY2xhcmUgdmFyIHYxRTogYW55Owp9Cgp2YXIgYTIyOiBhbnksIGIyMiA9IDEwLCBjMjIgPSAzMDsKdmFyIG5uOiBhbnk7CgpkZWNsYXJlIHZhciBkYTE6IGFueSwgZGEyOiBhbnk7CnZhciBub3JtYWxWYXI6IGFueTsKZGVjbGFyZSB2YXIgZHYxOiBhbnk7CnZhciB4bDogYW55Owp2YXIgeDogYW55Owp2YXIgejogYW55OwoKZnVuY3Rpb24gZm9vKGEyOiBhbnkpOiB2b2lkIHsKICAgIHZhciBhID0gMTA7Cn0KCmZvciAodmFyIGkgPSAwLCBqID0gMDsgaSA8IDEwOyBpKyspIHsKICAgIGorKzsKfQoKCmZvciAodmFyIGsgPSAwOyBrIDwgMzA7IGsrKykgewogICAgaysrOwp9CnZhciBiID0gMTA7Cg== + 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..c087543fdbc68 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/variadicTuples1.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: Sourcemap seems missaligned]] //// + +//// [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,CAAC,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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..2b1ff810a8e88 --- /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 TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. ++varianceAnnotations.ts(170,20): error TS9011: Declaration emit for class expressions are 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 TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. + foo(): InstanceType<(typeof Anon)> { + return this; + } + } + + let OuterC = class C { ++ ~ ++!!! error TS9011: Declaration emit for class expressions are 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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BzdHJpbmcgfQogICAgfCB7IHRvVXBwZXJDYXNlPygpOiBzdHJpbmcsIG90aGVyT3B0aW9uYWxQcm9wPzogbnVtYmVyIH07Cgp0eXBlIExpdGVyYWxzT3JXZWFrVHlwZXMgPQogICAgfCAiQSIKICAgIHwgIkIiCiAgICB8IFdlYWtUeXBlczsKCmRlY2xhcmUgbGV0IGFPckI6ICJBIiB8ICJCIjsKCmNvbnN0IGYgPSAoYXJnOiBMaXRlcmFsc09yV2Vha1R5cGVzKTogV2Vha1R5cGVzIHwgIkEiIHwgIkIiID0+IHsKICAgIGlmIChhcmcgPT09ICJBIikgewogICAgICAgIHJldHVybiBhcmc7CiAgICB9CiAgICBlbHNlIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQp9Cgpjb25zdCBnID0gKGFyZzogV2Vha1R5cGVzKTogV2Vha1R5cGVzID0+IHsKICAgIGlmIChhcmcgPT09ICJBIikgewogICAgICAgIHJldHVybiBhcmc7CiAgICB9CiAgICBlbHNlIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQp9Cgpjb25zdCBoID0gKGFyZzogTGl0ZXJhbHNPcldlYWtUeXBlcyk6IExpdGVyYWxzT3JXZWFrVHlwZXMgPT4gewogICAgaWYgKGFyZyA9PT0gYU9yQikgewogICAgICAgIHJldHVybiBhcmc7CiAgICB9CiAgICBlbHNlIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQp9Cgpjb25zdCBpID0gKGFyZzogV2Vha1R5cGVzKTogV2Vha1R5cGVzID0+IHsKICAgIGlmIChhcmcgPT09IGFPckIpIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgcmV0dXJuIGFyZzsKICAgIH0KfQo= ++//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBXZWFrVHlwZXMgPSB7DQogICAgb3B0aW9uYWw/OiB0cnVlOw0KfSB8IHsNCiAgICB0b0xvd2VyQ2FzZT8oKTogc3RyaW5nOw0KfSB8IHs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AgfQp9Cgpjb25zdCBoID0gKGFyZzogTGl0ZXJhbHNPcldlYWtUeXBlcyk6IExpdGVyYWxzT3JXZWFrVHlwZXMgPT4gewogICAgaWYgKGFyZyA9PT0gYU9yQikgewogICAgICAgIHJldHVybiBhcmc7CiAgICB9CiAgICBlbHNlIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQp9Cgpjb25zdCBpID0gKGFyZzogV2Vha1R5cGVzKTogV2Vha1R5cGVzID0+IHsKICAgIGlmIChhcmcgPT09IGFPckIpIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgcmV0dXJuIGFyZzsKICAgIH0KfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/withExportDecl.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/withExportDecl.d.ts.map.diff new file mode 100644 index 0000000000000..dbce44069320a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/withExportDecl.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/withExportDecl.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,6 @@ + + //// [withExportDecl.d.ts.map] +-{"version":3,"file":"withExportDecl.d.ts","sourceRoot":"","sources":["withExportDecl.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,iBAAiB,EAAE,GAAG,CAAC;AAOlC,eAAO,IAAI,2BAA2B,QAAK,CAAC;AAG5C,eAAO,IAAI,4BAA4B;;;;CAAqC,CAAC;AAO7E,MAAM,CAAC,OAAO,CAAC,IAAI,mBAAmB,EAAE,MAAM,CAAC;AAI/C,eAAO,IAAI,gBAAgB,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;CAAE,EAAE,CAAE;AAW1D,wBAAgB,gBAAgB,IAAI;IAChC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb,CAEA;AAOD,MAAM,CAAC,OAAO,WAAQ,EAAE,CAAC;IAEd,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAGD,yBAAc,EAAE,CAAC;IAEb,SAAgB,GAAG,IAAI,MAAM,CAE5B;CACJ;AAED,eAAO,IAAI,KAAK,EAAE,GAAG,EAAE,KAAK,QAAK,CAAC;AAElC,eAAO,IAAI,KAAK,QAAK,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC"} ++{"version":3,"file":"withExportDecl.d.ts","sourceRoot":"","sources":["withExportDecl.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,iBAAiB,EAAE,GAAG,CAAC;AAOlC,eAAO,IAAI,2BAA2B,QAAK,CAAC;AAG5C,eAAO,IAAI,4BAA4B;IAAK,CAAC;IAAM,CAAC;IAAM,IAAI;CAAc,CAAC;AAO7E,MAAM,CAAC,OAAO,CAAC,IAAI,mBAAmB,EAAE,MAAM,CAAC;AAI/C,eAAO,IAAI,gBAAgB,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;CAAE,EAAE,CAAE;AAW1D,wBAAgB,gBAAgB,IAAI;IAChC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb,CAEA;AAOD,MAAM,CAAC,OAAO,WAAQ,EAAE,CAAC;IAEd,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAGD,yBAAc,EAAE,CAAC;IAEb,SAAgB,GAAG,IAAI,MAAM,CAE5B;CACJ;AAED,eAAO,IAAI,KAAK,EAAE,GAAG,EAAE,KAAK,QAAK,CAAC;AAElC,eAAO,IAAI,KAAK,QAAK,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3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24gc2ltcGxlRnVuY3Rpb24oKSB7CiAgICByZXR1cm4gewogICAgICAgIHg6ICJIZWxsbyIsCiAgICAgICAgeTogIndvcmQiLAogICAgICAgIG46IDIKICAgIH07Cn0KCmV4cG9ydCBmdW5jdGlvbiBleHBvcnRlZEZ1bmN0aW9uKCk6IHsKICAgIHg6IHN0cmluZzsKICAgIHk6IHN0cmluZzsKICAgIG46IG51bWJlcjsKfSB7CiAgICByZXR1cm4gc2ltcGxlRnVuY3Rpb24oKTsKfQoKbW9kdWxlIG0xIHsKICAgIGV4cG9ydCBmdW5jdGlvbiBmb28oKSB7CiAgICAgICAgcmV0dXJuICJIZWxsbyI7CiAgICB9Cn0KZXhwb3J0IGRlY2xhcmUgbW9kdWxlIG0yIHsKCiAgICBleHBvcnQgdmFyIGE6IG51bWJlcjsKfQoKCmV4cG9ydCBtb2R1bGUgbTMgewoKICAgIGV4cG9ydCBmdW5jdGlvbiBmb28oKTogc3RyaW5nIHsKICAgICAgICByZXR1cm4gbTEuZm9vKCk7CiAgICB9Cn0KCmV4cG9ydCB2YXIgZVZhcjE6IGFueSwgZVZhcjIgPSAxMDsKdmFyIGVWYXIyMjsKZXhwb3J0IHZhciBlVmFyMyA9IDEwLCBlVmFyNDogYW55LCBlVmFyNTogYW55Ow== + 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/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 index 73de54570c710..fcb0de4af2c62 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrayFakeFlatNoCrashInferenceDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrayFakeFlatNoCrashInferenceDeclarations.d.ts @@ -31,7 +31,6 @@ type BadFlatArray = { 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. 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..54be16916d2a3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/coAndContraVariantInferences.d.ts.map @@ -0,0 +1,41 @@ +//// [tests/cases/compiler/coAndContraVariantInferences.ts] //// + + + +/// [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,EAAE,MAAM,CAAC,KAAK,EAAC,QAAQ,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sb2FkPigKICBhY3Rpb246IEFjdGlvbjxUTmFtZSxUUGF5bG9hZD4sCiAgZm46IChhY3Rpb246IEFjdGlvbjxUTmFtZSxUUGF5bG9hZD4pPT4gYW55LAopOiB2b2lkIHsKICBmbihhY3Rpb24pOwp9Cgpjb25zdCBwcmludEZuID0gKGFjdGlvbjogdHlwZW9mIGFjdGlvbkEgfCB0eXBlb2YgYWN0aW9uQik6IHZvaWQ9PiBjb25zb2xlLmxvZyhhY3Rpb24pOwoKY2FsbChhY3Rpb25BLCBwcmludEZuKTsKY2FsbChhY3Rpb25CLCBwcmludEZuKTsK + 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..dfe8672bf9c79 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/commentsVarDecl.d.ts.map @@ -0,0 +1,42 @@ +//// [tests/cases/compiler/commentsVarDecl.ts] //// + + + +/// [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,GAA0B,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,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,LyoqIFZhcmlhYmxlIGNvbW1lbnRzKi8NCmRlY2xhcmUgdmFyIG15VmFyaWFibGU6IG51bWJlcjsNCi8qKiBUaGlzIGlzIGFub3RoZXIgdmFyaWFibGUgY29tbWVudCovDQpkZWNsYXJlIHZhciBhbm90aGVyVmFyaWFibGU6IG51bWJlcjsNCmRlY2xhcmUgdmFyIGFWYXI6IHN0cmluZzsNCi8qKiB0aGlzIGlzIG11bHRpbGluZSBj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HoyOiAvKiogdHlwZSBjb21tZW50Ki8gKHg6IG51bWJlcikgPT4gc3RyaW5nOwoKdmFyIHgyOiAoeDogbnVtYmVyKSA9PiBzdHJpbmcgPSB6MjsKCnZhciBuNDogKHg6IG51bWJlcikgPT4gc3RyaW5nOwpuNCA9IHoyOw== + 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 index e6d27d1af8ee2..6add5627b98d7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedEnumTypeWidening.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedEnumTypeWidening.d.ts @@ -124,7 +124,6 @@ declare enum MyDeclaredEnum { } declare let val2: MyDeclaredEnum; //# sourceMappingURL=computedEnumTypeWidening.d.ts.map - /// [Errors] //// computedEnumTypeWidening.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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..565aec85c870a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/conditionalTypes1.d.ts.map @@ -0,0 +1,284 @@ +//// [tests/cases/conformance/types/conditional/conditionalTypes1.ts] //// + + + +/// [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,C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ZXI7Cg== + 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..db1238a013e61 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constAssertions.d.ts.map @@ -0,0 +1,139 @@ +//// [tests/cases/conformance/expressions/typeAssertions/constAssertions.ts] //// + + + +/// [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,CAAC;AACtB,QAAA,IAAI,EAAE,EAAI,EAAW,CAAC;AACtB,QAAA,IAAI,EAAE,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ZnVuY3Rpb24gYWNjZXNzb3JOYW1lczxTIGV4dGVuZHMgc3RyaW5nPihwcm9wTmFtZTogUyk6IHJlYWRvbmx5IFtgZ2V0LSR7U31gLCBgc2V0LSR7U31gXSB7CiAgICByZXR1cm4gW2BnZXQtJHtwcm9wTmFtZX1gLCBgc2V0LSR7cHJvcE5hbWV9YF0gYXMgY29uc3Q7Cn0KCmNvbnN0IG5zMTogcmVhZG9ubHkgWyJnZXQtZm9vIiwgInNldC1mb28iXSA9IGFjY2Vzc29yTmFtZXMoJ2ZvbycpOwoKLy8gcmVwcm8gZnJvbSBodHRwczovL2dpdGh1Yi5jb20vbWljcm9zb2Z0L1R5cGVTY3JpcHQvaXNzdWVzLzU0Mzc0CmludGVyZmFjZSBGb281NDM3NCB7CiAgYTogMTsKICBiOiAyOwp9Cgpjb25zdCBmb29Db25zdDU0Mzc0OiBGb281NDM3NCA9IHsKICBhOiAxLAogIGI6IDMKfSBhcyBjb25zdAo= + 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 index d4f7a985ab23a..2737ca1ae3851 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum2.d.ts @@ -28,7 +28,6 @@ declare const enum D { g } //# sourceMappingURL=constEnum2.d.ts.map - /// [Errors] //// constEnum2.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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..82761a3c710e4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/contextuallyTypedStringLiteralsInJsxAttributes01.d.ts.map @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/types/contextualTypes/jsxAttributes/contextuallyTypedStringLiteralsInJsxAttributes01.tsx] //// + + + +/// [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/OiBhbnk7DQogICAgfQ0KfQ0KZGVjbGFyZSBjb25zdCBGb29Db21wb25lbnQ6IChwcm9wczogew0KICAgIGZvbzogIkEiIHwgIkIiIHwgIkMiOw0KfSkgPT4gSlNYLkVsZW1lbnQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1jb250ZXh0dWFsbHlUeXBlZFN0cmluZ0xpdGVyYWxzSW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Pjs= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/controlFlowAliasing.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/controlFlowAliasing.d.ts.map new file mode 100644 index 0000000000000..4a0d31f8e1774 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/controlFlowAliasing.d.ts.map @@ -0,0 +1,162 @@ +//// [tests/cases/conformance/controlFlow/controlFlowAliasing.ts] //// + + + +/// [Declarations] //// + + + +//// [controlFlowAliasing.d.ts] +declare function f10(x: string | number): void; +declare function f11(x: unknown): void; +declare function f12(x: string | number | boolean): void; +declare function f13(x: string | number | boolean): void; +declare function f14(x: number | null | undefined): number | null; +declare function f15(obj: { + readonly x: string | number; +}): void; +declare function f16(obj: { + readonly x: string | number; +}): void; +declare function f17(obj: readonly [string | number]): void; +declare function f18(obj: readonly [string | number]): void; +declare function f20(obj: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare function f21(obj: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare function f22(obj: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare function f23(obj: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare function f24(arg: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare function f25(arg: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare function f26(outer: { + readonly obj: { + kind: 'foo'; + foo: string; + } | { + kind: 'bar'; + bar: number; + }; +}): void; +declare function f27(outer: { + obj: { + kind: 'foo'; + foo: string; + } | { + kind: 'bar'; + bar: number; + }; +}): void; +declare function f28(obj?: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare function f30(obj: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare function f31(obj: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare function f32(obj: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare function f33(obj: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare class C10 { + readonly x: string | number; + constructor(x: string | number); +} +declare class C11 { + readonly x: string | number; + constructor(x: string | number); +} +declare function f40(obj: { + kind: 'foo'; + foo?: string; +} | { + kind: 'bar'; + bar?: number; +}): void; +type Data = { + kind: 'str'; + payload: string; +} | { + kind: 'num'; + payload: number; +}; +declare function gg2(obj: Data): void; +declare function foo({ kind, payload }: Data): void; +declare const obj: { + fn: () => boolean; +}; +declare const a: boolean; +declare class Utils { + static isDefined(value: T): value is NonNullable; +} +declare class A53267 { + readonly testNumber: number | undefined; + foo(): void; +} +//# sourceMappingURL=controlFlowAliasing.d.ts.map + +/// [Declarations Maps] //// + + +//// [controlFlowAliasing.d.ts.map] +{"version":3,"file":"controlFlowAliasing.d.ts","sourceRoot":"","sources":["controlFlowAliasing.ts"],"names":[],"mappings":"AAEA,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQrC;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,CAK7B;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAS/C;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAU/C;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAGxD;AAED,iBAAS,GAAG,CAAC,GAAG,EAAE;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,IAAI,CAKvD;AAED,iBAAS,GAAG,CAAC,GAAG,EAAE;IAAE,QAAQ,CAAC,C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CiAgICBlbHNlIHsKICAgICAgICBvYmouYmFyOyAgLy8gTm90IG5hcnJvd2VkIGJlY2F1c2Ugb2JqIGlzIG11dGFibGUKICAgIH0KfQoKZnVuY3Rpb24gZjI2KG91dGVyOiB7IHJlYWRvbmx5IG9iajogeyBraW5kOiAnZm9vJywgZm9vOiBzdHJpbmcgfSB8IHsga2luZDogJ2JhcicsIGJhcjogbnVtYmVyIH0gfSk6IHZvaWQgewogICAgY29uc3QgaXNGb28gPSBvdXRlci5vYmoua2luZCA9PT0gJ2Zvbyc7CiAgICBpZiAoaXNGb28pIHsKICAgICAgICBvdXRlci5vYmouZm9vOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgb3V0ZXIub2JqLmJhcjsKICAgIH0KfQoKZnVuY3Rpb24gZjI3KG91dGVyOiB7IG9iajogeyBraW5kOiAnZm9vJywgZm9vOiBzdHJpbmcgfSB8IHsga2luZDogJ2JhcicsIGJhcjogbnVtYmVyIH0gfSk6IHZvaWQgewogICAgY29uc3QgaXNGb28gPSBvdXRlci5vYmoua2luZCA9PT0gJ2Zvbyc7CiAgICBpZiAoaXNGb28pIHsKICAgICAgICBvdXRlci5vYmouZm9vOyAgLy8gTm90IG5hcnJvd2VkIGJlY2F1c2Ugb2JqIGlzIG11dGFibGUKICAgIH0KICAgIGVsc2UgewogICAgICAgIG91dGVyLm9iai5iYXI7ICAvLyBOb3QgbmFycm93ZWQgYmVjYXVzZSBvYmogaXMgbXV0YWJsZQogICAgfQp9CgpmdW5jdGlvbiBmMjgob2JqPzogeyBraW5kOiAnZm9vJywgZm9vOiBzdHJpbmcgfSB8IHsga2luZDogJ2JhcicsIGJhcjogbnVtYmVyIH0pOiB2b2lkIHsKICAgIGNvbnN0IGlzRm9vID0gb2JqICYmIG9iai5raW5kID09PSAnZm9vJzsKICAgIGNvbnN0IGlzQmFyID0gb2JqICYmIG9iai5raW5kID09PSAnYmFyJzsKICAgIGlmIChpc0ZvbykgewogICAgICAgIG9iai5mb287CiAgICB9CiAgICBpZiAoaXNCYXIpIHsKICAgICAgICBvYmouYmFyOwogICAgfQp9CgovLyBOYXJyb3dpbmcgYnkgYWxpYXNlZCBkaXNjcmltaW5hbnQgcHJvcGVydHkgYWNjZXNzCgpmdW5jdGlvbiBmMzAob2JqOiB7IGtpbmQ6ICdmb28nLCBmb286IHN0cmluZyB9IHwgeyBraW5kOiAnYmFyJywgYmFyOiBudW1iZXIgfSk6IHZvaWQgewogICAgY29uc3Qga2luZCA9IG9iai5raW5kOwogICAgaWYgKGtpbmQgPT09ICdmb28nKSB7CiAgICAgICAgb2JqLmZvbzsKICAgIH0KICAgIGVsc2UgewogICAgICAgIG9iai5iYXI7CiAgICB9Cn0KCmZ1bmN0aW9uIGYzMShvYmo6IHsga2luZDogJ2ZvbycsIGZvbzogc3RyaW5nIH0gfCB7IGtpbmQ6ICdiYXInLCBiYXI6IG51bWJlciB9KTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQgfSA9IG9iajsKICAgIGlmIChraW5kID09PSAnZm9vJykgewogICAgICAgIG9iai5mb287CiAgICB9CiAgICBlbHNlIHsKICAgICAgICBvYmouYmFyOwogICAgfQp9CgpmdW5jdGlvbiBmMzIob2JqOiB7IGtpbmQ6ICdmb28nLCBmb286IHN0cmluZyB9IHwgeyBraW5kOiAnYmFyJywgYmFyOiBudW1iZXIgfSk6IHZvaWQgewogICAgY29uc3QgeyBraW5kOiBrIH0gPSBvYmo7CiAgICBpZiAoayA9PT0gJ2ZvbycpIHsKICAgICAgICBvYmouZm9vOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgb2JqLmJhcjsKICAgIH0KfQoKZnVuY3Rpb24gZjMzKG9iajogeyBraW5kOiAnZm9vJywgZm9vOiBzdHJpbmcgfSB8IHsga2luZDogJ2JhcicsIGJhcjogbnVtYmVyIH0pOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCB9ID0gb2JqOwogICAgc3dpdGNoIChraW5kKSB7CiAgICAgICAgY2FzZSAnZm9vJzogb2JqLmZvbzsgYnJlYWs7CiAgICAgICAgY2FzZSAnYmFyJzogb2JqLmJhcjsgYnJlYWs7CiAgICB9Cn0KCgpjbGFzcyBDMTAgewogICAgY29uc3RydWN0b3IocmVhZG9ubHkgeDogc3RyaW5nIHwgbnVtYmVyKSB7CiAgICAgICAgY29uc3QgdGhpc1hfaXNTdHJpbmcgPSB0eXBlb2YgdGhpcy54ID09PSAnc3RyaW5nJzsKICAgICAgICBjb25zdCB4SXNTdHJpbmcgPSB0eXBlb2YgeCA9PT0gJ3N0cmluZyc7CiAgICAgICAgaWYgKHRoaXNYX2lzU3RyaW5nICYmIHhJc1N0cmluZykgewogICAgICAgICAgICBsZXQgczogc3RyaW5nOwogICAgICAgICAgICBzID0gdGhpcy54OwogICAgICAgICAgICBzID0geDsKICAgICAgICB9CiAgICB9Cn0KCmNsYXNzIEMxMSB7CiAgICBjb25zdHJ1Y3RvcihyZWFkb25seSB4OiBzdHJpbmcgfCBudW1iZXIpIHsKICAgICAgICBjb25zdCB0aGlzWF9pc1N0cmluZyA9IHR5cGVvZiB0aGlzLnggPT09ICdzdHJpbmcnOwogICAgICAgIGNvbnN0IHhJc1N0cmluZyA9IHR5cGVvZiB4ID09PSAnc3RyaW5nJzsKICAgICAgICBpZiAodGhpc1hfaXNTdHJpbmcgJiYgeElzU3RyaW5nKSB7CiAgICAgICAgICAgIC8vIFNvbWUgbmFycm93aW5ncyBtYXkgYmUgaW52YWxpZGF0ZWQgZHVlIHRvIGxhdGVyIGFzc2lnbm1lbnRzLgogICAgICAgICAgICBsZXQgczogc3RyaW5nOwogICAgICAgICAgICBzID0gdGhpcy54OwogICAgICAgICAgICBzID0geDsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHRoaXMueCA9IDEwOwogICAgICAgICAgICB4ID0gMTA7CiAgICAgICAgfQogICAgfQp9CgovLyBNaXhpbmcgb2YgYWxpYXNlZCBkaXNjcmltaW5hbnRzIGFuZCBjb25kaXRpb25hbHMK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czovL2dpdGh1Yi5jb20vbWljcm9zb2Z0L1R5cGVTY3JpcHQvaXNzdWVzLzUzMjY3CmNsYXNzIFV0aWxzIHsKICBzdGF0aWMgaXNEZWZpbmVkPFQ+KHZhbHVlOiBUKTogdmFsdWUgaXMgTm9uTnVsbGFibGU8VD4gewogICAgcmV0dXJuIHZhbHVlICE9IG51bGw7CiAgfQp9CgpjbGFzcyBBNTMyNjcgewogIHB1YmxpYyByZWFkb25seSB0ZXN0TnVtYmVyOiBudW1iZXIgfCB1bmRlZmluZWQ7CgogIGZvbygpOiB2b2lkIHsKICAgIGNvbnN0IGlzTnVtYmVyID0gVXRpbHMuaXNEZWZpbmVkKHRoaXMudGVzdE51bWJlcik7CgogICAgaWYgKGlzTnVtYmVyKSB7CiAgICAgIGNvbnN0IHg6IG51bWJlciA9IHRoaXMudGVzdE51bWJlcjsKICAgIH0KICB9Cn0= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/controlFlowAliasing.d.ts.map.formatted b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/controlFlowAliasing.d.ts.map.formatted new file mode 100644 index 0000000000000..f02659dd74d99 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/controlFlowAliasing.d.ts.map.formatted @@ -0,0 +1,7857 @@ +//// [controlFlowAliasing.ts] //// + +//// [controlFlowAliasing.d.ts.map] +{ + "version": 3, + "file": "controlFlowAliasing.d.ts", + "sourceRoot": "", + "sources": [ + "controlFlowAliasing.ts" + ], + "names": [], + "mappings": [ + { + "generatedLine": 1, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 1, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 1, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 12, + "name": null, + "generatedText": "f10", + "sourceText": "f10" + }, + { + "generatedLine": 1, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 1, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 14, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 1, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 16, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 1, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 22, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 1, + "generatedColumn": 33, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 25, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 1, + "generatedColumn": 39, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 31, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 1, + "generatedColumn": 42, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 34, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 1, + "generatedColumn": 46, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 38, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 1, + "generatedColumn": 47, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 11, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 2, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 13, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 2, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 13, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 2, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 13, + "originalColumn": 12, + "name": null, + "generatedText": "f11", + "sourceText": "f11" + }, + { + "generatedLine": 2, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 13, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 2, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 13, + "originalColumn": 14, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 2, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 13, + "originalColumn": 16, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 2, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 13, + "originalColumn": 23, + "name": null, + "generatedText": "unknown", + "sourceText": "unknown" + }, + { + "generatedLine": 2, + "generatedColumn": 34, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 13, + "originalColumn": 26, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 2, + "generatedColumn": 38, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 13, + "originalColumn": 30, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 2, + "generatedColumn": 39, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 18, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 3, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 3, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 3, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 12, + "name": null, + "generatedText": "f12", + "sourceText": "f12" + }, + { + "generatedLine": 3, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 3, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 14, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 3, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 16, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 3, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 22, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 3, + "generatedColumn": 33, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 25, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 3, + "generatedColumn": 39, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 31, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 3, + "generatedColumn": 42, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 34, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 3, + "generatedColumn": 49, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 41, + "name": null, + "generatedText": "boolean", + "sourceText": "boolean" + }, + { + "generatedLine": 3, + "generatedColumn": 52, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 44, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 3, + "generatedColumn": 56, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 48, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 3, + "generatedColumn": 57, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 29, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 4, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 4, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 4, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 12, + "name": null, + "generatedText": "f13", + "sourceText": "f13" + }, + { + "generatedLine": 4, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 4, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 14, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 4, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 16, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 4, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 22, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 4, + "generatedColumn": 33, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 25, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 4, + "generatedColumn": 39, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 31, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 4, + "generatedColumn": 42, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 34, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 4, + "generatedColumn": 49, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 41, + "name": null, + "generatedText": "boolean", + "sourceText": "boolean" + }, + { + "generatedLine": 4, + "generatedColumn": 52, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 44, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 4, + "generatedColumn": 56, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 48, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 4, + "generatedColumn": 57, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 41, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 5, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 5, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 5, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 12, + "name": null, + "generatedText": "f14", + "sourceText": "f14" + }, + { + "generatedLine": 5, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 5, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 14, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 5, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 16, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 5, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 22, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 5, + "generatedColumn": 33, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 25, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 5, + "generatedColumn": 37, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 29, + "name": null, + "generatedText": "null", + "sourceText": "null" + }, + { + "generatedLine": 5, + "generatedColumn": 40, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 32, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 5, + "generatedColumn": 49, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 41, + "name": null, + "generatedText": "undefined", + "sourceText": "undefined" + }, + { + "generatedLine": 5, + "generatedColumn": 52, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 44, + "name": null, + "generatedText": "): ", + "sourceText": "): " + }, + { + "generatedLine": 5, + "generatedColumn": 58, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 50, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 5, + "generatedColumn": 61, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 53, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 5, + "generatedColumn": 65, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 57, + "name": null, + "generatedText": "null", + "sourceText": "null" + }, + { + "generatedLine": 5, + "generatedColumn": 66, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 46, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 6, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 6, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 6, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 12, + "name": null, + "generatedText": "f15", + "sourceText": "f15" + }, + { + "generatedLine": 6, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 6, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 6, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 7, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 7, + "generatedColumn": 12, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 28, + "name": null, + "generatedText": "readonly", + "sourceText": "readonly" + }, + { + "generatedLine": 7, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 29, + "name": null, + "generatedText": " ", + "sourceText": " " + }, + { + "generatedLine": 7, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 30, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 7, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 32, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 7, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 38, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 7, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 41, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 7, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 47, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 7, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 47, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 8, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 49, + "name": null + }, + { + "generatedLine": 8, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 52, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 8, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 56, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 8, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 53, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 9, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 9, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 9, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 12, + "name": null, + "generatedText": "f16", + "sourceText": "f16" + }, + { + "generatedLine": 9, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 9, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 9, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 10, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 10, + "generatedColumn": 12, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 28, + "name": null, + "generatedText": "readonly", + "sourceText": "readonly" + }, + { + "generatedLine": 10, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 29, + "name": null, + "generatedText": " ", + "sourceText": " " + }, + { + "generatedLine": 10, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 30, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 10, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 32, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 10, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 38, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 10, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 41, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 10, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 47, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 10, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 47, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 11, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 49, + "name": null + }, + { + "generatedLine": 11, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 52, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 11, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 56, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 11, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 61, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 12, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 12, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 12, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 12, + "name": null, + "generatedText": "f17", + "sourceText": "f17" + }, + { + "generatedLine": 12, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 12, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 12, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 12, + "generatedColumn": 35, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 27, + "name": null, + "generatedText": "readonly ", + "sourceText": "readonly " + }, + { + "generatedLine": 12, + "generatedColumn": 36, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 28, + "name": null, + "generatedText": "[", + "sourceText": "[" + }, + { + "generatedLine": 12, + "generatedColumn": 42, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 34, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 12, + "generatedColumn": 45, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 37, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 12, + "generatedColumn": 51, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 43, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 12, + "generatedColumn": 52, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 44, + "name": null, + "generatedText": "]", + "sourceText": "]" + }, + { + "generatedLine": 12, + "generatedColumn": 55, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 47, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 12, + "generatedColumn": 59, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 51, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 12, + "generatedColumn": 60, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 68, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 13, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 13, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 13, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 12, + "name": null, + "generatedText": "f18", + "sourceText": "f18" + }, + { + "generatedLine": 13, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 13, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 13, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 13, + "generatedColumn": 35, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 27, + "name": null, + "generatedText": "readonly ", + "sourceText": "readonly " + }, + { + "generatedLine": 13, + "generatedColumn": 36, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 28, + "name": null, + "generatedText": "[", + "sourceText": "[" + }, + { + "generatedLine": 13, + "generatedColumn": 42, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 34, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 13, + "generatedColumn": 45, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 37, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 13, + "generatedColumn": 51, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 43, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 13, + "generatedColumn": 52, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 44, + "name": null, + "generatedText": "]", + "sourceText": "]" + }, + { + "generatedLine": 13, + "generatedColumn": 55, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 47, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 13, + "generatedColumn": 59, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 51, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 13, + "generatedColumn": 60, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 76, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 14, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 14, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 14, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 12, + "name": null, + "generatedText": "f20", + "sourceText": "f20" + }, + { + "generatedLine": 14, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 14, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 14, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 15, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 15, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 15, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 15, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 15, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 16, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 16, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 16, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 38, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 16, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 44, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 16, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 44, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 17, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 46, + "name": null + }, + { + "generatedLine": 17, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 49, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 18, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 18, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 55, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 18, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 57, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 18, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 62, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 18, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 63, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 19, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 19, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 67, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 19, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 69, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 19, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 75, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 19, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 75, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 20, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 77, + "name": null + }, + { + "generatedLine": 20, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 80, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 20, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 84, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 20, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 86, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 21, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 21, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 21, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 12, + "name": null, + "generatedText": "f21", + "sourceText": "f21" + }, + { + "generatedLine": 21, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 21, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 21, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 22, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 22, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 22, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 22, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 22, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 23, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 23, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 23, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 38, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 23, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 44, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 23, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 44, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 24, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 46, + "name": null + }, + { + "generatedLine": 24, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 49, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 25, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 25, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 55, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 25, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 57, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 25, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 62, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 25, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 63, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 26, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 26, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 67, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 26, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 69, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 26, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 75, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 26, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 75, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 27, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 77, + "name": null + }, + { + "generatedLine": 27, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 80, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 27, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 84, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 27, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 96, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 28, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 28, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 28, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 12, + "name": null, + "generatedText": "f22", + "sourceText": "f22" + }, + { + "generatedLine": 28, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 28, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 28, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 29, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 29, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 29, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 29, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 29, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 30, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 30, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 30, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 38, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 30, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 44, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 30, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 44, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 31, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 46, + "name": null + }, + { + "generatedLine": 31, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 49, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 32, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 32, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 55, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 32, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 57, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 32, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 62, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 32, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 63, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 33, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 33, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 67, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 33, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 69, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 33, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 75, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 33, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 75, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 34, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 77, + "name": null + }, + { + "generatedLine": 34, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 80, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 34, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 84, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 34, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 106, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 35, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 35, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 35, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 12, + "name": null, + "generatedText": "f23", + "sourceText": "f23" + }, + { + "generatedLine": 35, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 35, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 35, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 36, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 36, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 36, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 36, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 36, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 37, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 37, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 37, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 38, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 37, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 44, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 37, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 44, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 38, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 46, + "name": null + }, + { + "generatedLine": 38, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 49, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 39, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 39, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 55, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 39, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 57, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 39, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 62, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 39, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 63, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 40, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 40, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 67, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 40, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 69, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 40, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 75, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 40, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 75, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 41, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 77, + "name": null + }, + { + "generatedLine": 41, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 80, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 41, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 84, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 41, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 117, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 42, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 42, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 42, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 12, + "name": null, + "generatedText": "f24", + "sourceText": "f24" + }, + { + "generatedLine": 42, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 42, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 16, + "name": null, + "generatedText": "arg", + "sourceText": "arg" + }, + { + "generatedLine": 42, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 43, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 43, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 43, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 43, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 43, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 44, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 44, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 44, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 38, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 44, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 44, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 44, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 44, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 45, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 46, + "name": null + }, + { + "generatedLine": 45, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 49, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 46, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 46, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 55, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 46, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 57, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 46, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 62, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 46, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 63, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 47, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 47, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 67, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 47, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 69, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 47, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 75, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 47, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 75, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 48, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 77, + "name": null + }, + { + "generatedLine": 48, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 80, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 48, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 84, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 48, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 128, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 49, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 49, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 49, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 12, + "name": null, + "generatedText": "f25", + "sourceText": "f25" + }, + { + "generatedLine": 49, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 49, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 16, + "name": null, + "generatedText": "arg", + "sourceText": "arg" + }, + { + "generatedLine": 49, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 50, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 50, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 50, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 50, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 50, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 51, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 51, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 51, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 38, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 51, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 44, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 51, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 44, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 52, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 46, + "name": null + }, + { + "generatedLine": 52, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 49, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 53, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 53, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 55, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 53, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 57, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 53, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 62, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 53, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 63, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 54, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 54, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 67, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 54, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 69, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 54, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 75, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 54, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 75, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 55, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 77, + "name": null + }, + { + "generatedLine": 55, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 80, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 55, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 84, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 55, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 139, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 56, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 56, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 56, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 12, + "name": null, + "generatedText": "f26", + "sourceText": "f26" + }, + { + "generatedLine": 56, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 56, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 18, + "name": null, + "generatedText": "outer", + "sourceText": "outer" + }, + { + "generatedLine": 56, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 20, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 57, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 22, + "name": null + }, + { + "generatedLine": 57, + "generatedColumn": 12, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 30, + "name": null, + "generatedText": "readonly", + "sourceText": "readonly" + }, + { + "generatedLine": 57, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 31, + "name": null, + "generatedText": " ", + "sourceText": " " + }, + { + "generatedLine": 57, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 34, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 57, + "generatedColumn": 18, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 36, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 58, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 38, + "name": null + }, + { + "generatedLine": 58, + "generatedColumn": 12, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 42, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 58, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 44, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 58, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 49, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 58, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 50, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 59, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 59, + "generatedColumn": 11, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 54, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 59, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 56, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 59, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 62, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 59, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 62, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 60, + "generatedColumn": 5, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 60, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 67, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 61, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 69, + "name": null + }, + { + "generatedLine": 61, + "generatedColumn": 12, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 73, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 61, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 75, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 61, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 80, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 61, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 81, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 62, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 82, + "name": null + }, + { + "generatedLine": 62, + "generatedColumn": 11, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 85, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 62, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 87, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 62, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 93, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 62, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 93, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 63, + "generatedColumn": 5, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 95, + "name": null + }, + { + "generatedLine": 63, + "generatedColumn": 6, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 95, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 64, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 97, + "name": null + }, + { + "generatedLine": 64, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 100, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 64, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 104, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 64, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 149, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 65, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 65, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 65, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 12, + "name": null, + "generatedText": "f27", + "sourceText": "f27" + }, + { + "generatedLine": 65, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 65, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 18, + "name": null, + "generatedText": "outer", + "sourceText": "outer" + }, + { + "generatedLine": 65, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 20, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 66, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 22, + "name": null + }, + { + "generatedLine": 66, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 25, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 66, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 27, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 67, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 29, + "name": null + }, + { + "generatedLine": 67, + "generatedColumn": 12, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 33, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 67, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 35, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 67, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 40, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 67, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 41, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 68, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 42, + "name": null + }, + { + "generatedLine": 68, + "generatedColumn": 11, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 45, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 68, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 47, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 68, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 53, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 68, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 53, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 69, + "generatedColumn": 5, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 55, + "name": null + }, + { + "generatedLine": 69, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 58, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 70, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 60, + "name": null + }, + { + "generatedLine": 70, + "generatedColumn": 12, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 64, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 70, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 66, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 70, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 71, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 70, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 72, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 71, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 73, + "name": null + }, + { + "generatedLine": 71, + "generatedColumn": 11, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 76, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 71, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 78, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 71, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 84, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 71, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 84, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 72, + "generatedColumn": 5, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 86, + "name": null + }, + { + "generatedLine": 72, + "generatedColumn": 6, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 86, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 73, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 88, + "name": null + }, + { + "generatedLine": 73, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 91, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 73, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 95, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 73, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 159, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 74, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 74, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 74, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 12, + "name": null, + "generatedText": "f28", + "sourceText": "f28" + }, + { + "generatedLine": 74, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 74, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 74, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 17, + "name": null, + "generatedText": "?", + "sourceText": "?" + }, + { + "generatedLine": 74, + "generatedColumn": 27, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 19, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 75, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 21, + "name": null + }, + { + "generatedLine": 75, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 25, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 75, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 27, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 75, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 32, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 75, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 33, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 76, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 34, + "name": null + }, + { + "generatedLine": 76, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 37, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 76, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 39, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 76, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 45, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 76, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 45, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 77, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 47, + "name": null + }, + { + "generatedLine": 77, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 50, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 78, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 52, + "name": null + }, + { + "generatedLine": 78, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 56, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 78, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 58, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 78, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 63, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 78, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 64, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 79, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 65, + "name": null + }, + { + "generatedLine": 79, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 68, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 79, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 70, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 79, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 76, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 79, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 76, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 80, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 78, + "name": null + }, + { + "generatedLine": 80, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 81, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 80, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 85, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 80, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 170, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 81, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 81, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 81, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 12, + "name": null, + "generatedText": "f30", + "sourceText": "f30" + }, + { + "generatedLine": 81, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 81, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 81, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 82, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 82, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 82, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 82, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 82, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 83, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 83, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 83, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 38, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 83, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 44, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 83, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 44, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 84, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 46, + "name": null + }, + { + "generatedLine": 84, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 49, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 85, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 85, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 55, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 85, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 57, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 85, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 62, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 85, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 63, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 86, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 86, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 67, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 86, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 69, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 86, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 75, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 86, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 75, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 87, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 77, + "name": null + }, + { + "generatedLine": 87, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 80, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 87, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 84, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 87, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 182, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 88, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 88, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 88, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 12, + "name": null, + "generatedText": "f31", + "sourceText": "f31" + }, + { + "generatedLine": 88, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 88, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 88, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 89, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 89, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 89, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 89, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 89, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 90, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 90, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 90, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 38, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 90, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 44, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 90, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 44, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 91, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 46, + "name": null + }, + { + "generatedLine": 91, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 49, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 92, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 92, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 55, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 92, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 57, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 92, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 62, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 92, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 63, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 93, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 93, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 67, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 93, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 69, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 93, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 75, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 93, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 75, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 94, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 77, + "name": null + }, + { + "generatedLine": 94, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 80, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 94, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 84, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 94, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 192, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 95, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 95, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 95, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 12, + "name": null, + "generatedText": "f32", + "sourceText": "f32" + }, + { + "generatedLine": 95, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 95, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 95, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 96, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 96, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 96, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 96, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 96, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 97, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 97, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 97, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 38, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 97, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 44, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 97, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 44, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 98, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 46, + "name": null + }, + { + "generatedLine": 98, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 49, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 99, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 99, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 55, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 99, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 57, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 99, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 62, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 99, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 63, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 100, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 100, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 67, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 100, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 69, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 100, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 75, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 100, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 75, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 101, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 77, + "name": null + }, + { + "generatedLine": 101, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 80, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 101, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 84, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 101, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 202, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 102, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 102, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 102, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 12, + "name": null, + "generatedText": "f33", + "sourceText": "f33" + }, + { + "generatedLine": 102, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 102, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 102, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 103, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 103, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 103, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 103, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 103, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 104, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 104, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 104, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 38, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 104, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 44, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 104, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 44, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 105, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 46, + "name": null + }, + { + "generatedLine": 105, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 49, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 106, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 106, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 55, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 106, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 57, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 106, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 62, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 106, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 63, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 107, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 107, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 67, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 107, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 69, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 107, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 75, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 107, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 75, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 108, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 77, + "name": null + }, + { + "generatedLine": 108, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 80, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 108, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 84, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 108, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 210, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 109, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 213, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 109, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 213, + "originalColumn": 6, + "name": null, + "generatedText": "declare class ", + "sourceText": "class " + }, + { + "generatedLine": 109, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 213, + "originalColumn": 9, + "name": null, + "generatedText": "C10", + "sourceText": "C10" + }, + { + "generatedLine": 110, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 16, + "name": null + }, + { + "generatedLine": 110, + "generatedColumn": 12, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 24, + "name": null, + "generatedText": "readonly", + "sourceText": "readonly" + }, + { + "generatedLine": 110, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 25, + "name": null, + "generatedText": " ", + "sourceText": " " + }, + { + "generatedLine": 110, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 26, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 110, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 28, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 110, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 34, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 110, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 37, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 110, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 43, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 111, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 25, + "name": null + }, + { + "generatedLine": 111, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 26, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 111, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 28, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 111, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 34, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 111, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 37, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 111, + "generatedColumn": 34, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 43, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 112, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 223, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 113, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 225, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 113, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 225, + "originalColumn": 6, + "name": null, + "generatedText": "declare class ", + "sourceText": "class " + }, + { + "generatedLine": 113, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 225, + "originalColumn": 9, + "name": null, + "generatedText": "C11", + "sourceText": "C11" + }, + { + "generatedLine": 114, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 16, + "name": null + }, + { + "generatedLine": 114, + "generatedColumn": 12, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 24, + "name": null, + "generatedText": "readonly", + "sourceText": "readonly" + }, + { + "generatedLine": 114, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 25, + "name": null, + "generatedText": " ", + "sourceText": " " + }, + { + "generatedLine": 114, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 26, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 114, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 28, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 114, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 34, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 114, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 37, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 114, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 43, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 115, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 25, + "name": null + }, + { + "generatedLine": 115, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 26, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 115, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 28, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 115, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 34, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 115, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 37, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 115, + "generatedColumn": 34, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 43, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 116, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 240, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 117, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 117, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 117, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 12, + "name": null, + "generatedText": "f40", + "sourceText": "f40" + }, + { + "generatedLine": 117, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 117, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 117, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 118, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 118, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 118, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 118, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 118, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 119, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 119, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 119, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 37, + "name": null, + "generatedText": "?", + "sourceText": "?" + }, + { + "generatedLine": 119, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 39, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 119, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 45, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 119, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 45, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 120, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 47, + "name": null + }, + { + "generatedLine": 120, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 50, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 121, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 52, + "name": null + }, + { + "generatedLine": 121, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 56, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 121, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 58, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 121, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 63, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 121, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 64, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 122, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 65, + "name": null + }, + { + "generatedLine": 122, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 68, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 122, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 69, + "name": null, + "generatedText": "?", + "sourceText": "?" + }, + { + "generatedLine": 122, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 71, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 122, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 77, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 122, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 77, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 123, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 79, + "name": null + }, + { + "generatedLine": 123, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 82, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 123, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 86, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 123, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 250, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 124, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 124, + "generatedColumn": 5, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 5, + "name": null, + "generatedText": "type ", + "sourceText": "type " + }, + { + "generatedLine": 124, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 9, + "name": null, + "generatedText": "Data", + "sourceText": "Data" + }, + { + "generatedLine": 124, + "generatedColumn": 12, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 12, + "name": null, + "generatedText": " = ", + "sourceText": " = " + }, + { + "generatedLine": 125, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 14, + "name": null + }, + { + "generatedLine": 125, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 18, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 125, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 20, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 125, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 25, + "name": null, + "generatedText": "'str'", + "sourceText": "'str'" + }, + { + "generatedLine": 125, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 26, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 126, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 27, + "name": null + }, + { + "generatedLine": 126, + "generatedColumn": 11, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 34, + "name": null, + "generatedText": "payload", + "sourceText": "payload" + }, + { + "generatedLine": 126, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 36, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 126, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 42, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 126, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 42, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 127, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 44, + "name": null + }, + { + "generatedLine": 127, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 47, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 128, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 49, + "name": null + }, + { + "generatedLine": 128, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 53, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 128, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 55, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 128, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 60, + "name": null, + "generatedText": "'num'", + "sourceText": "'num'" + }, + { + "generatedLine": 128, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 61, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 129, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 62, + "name": null + }, + { + "generatedLine": 129, + "generatedColumn": 11, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 69, + "name": null, + "generatedText": "payload", + "sourceText": "payload" + }, + { + "generatedLine": 129, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 71, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 129, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 77, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 129, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 77, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 130, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 79, + "name": null + }, + { + "generatedLine": 130, + "generatedColumn": 2, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 80, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 131, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 256, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 131, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 256, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 131, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 256, + "originalColumn": 12, + "name": null, + "generatedText": "gg2", + "sourceText": "gg2" + }, + { + "generatedLine": 131, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 256, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 131, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 256, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 131, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 256, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 131, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 256, + "originalColumn": 22, + "name": null, + "generatedText": "Data", + "sourceText": "Data" + }, + { + "generatedLine": 131, + "generatedColumn": 33, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 256, + "originalColumn": 25, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 131, + "generatedColumn": 37, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 256, + "originalColumn": 29, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 131, + "generatedColumn": 38, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 263, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 132, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 132, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 132, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 12, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 132, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 132, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 15, + "name": null, + "generatedText": "{ ", + "sourceText": "{ " + }, + { + "generatedLine": 132, + "generatedColumn": 27, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 19, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 132, + "generatedColumn": 29, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 21, + "name": null, + "generatedText": ", ", + "sourceText": ", " + }, + { + "generatedLine": 132, + "generatedColumn": 36, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 28, + "name": null, + "generatedText": "payload", + "sourceText": "payload" + }, + { + "generatedLine": 132, + "generatedColumn": 38, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 30, + "name": null, + "generatedText": " }", + "sourceText": " }" + }, + { + "generatedLine": 132, + "generatedColumn": 40, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 32, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 132, + "generatedColumn": 44, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 36, + "name": null, + "generatedText": "Data", + "sourceText": "Data" + }, + { + "generatedLine": 132, + "generatedColumn": 47, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 39, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 132, + "generatedColumn": 51, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 43, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 132, + "generatedColumn": 52, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 272, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 133, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 276, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 133, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 276, + "originalColumn": 0, + "name": null, + "generatedText": "declare ", + "sourceText": "" + }, + { + "generatedLine": 133, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 276, + "originalColumn": 6, + "name": null, + "generatedText": "const ", + "sourceText": "const " + }, + { + "generatedLine": 133, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 276, + "originalColumn": 9, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 134, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 277, + "originalColumn": 4, + "name": null + }, + { + "generatedLine": 134, + "generatedColumn": 6, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 277, + "originalColumn": 6, + "name": null, + "generatedText": "fn", + "sourceText": "fn" + }, + { + "generatedLine": 134, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 277, + "originalColumn": 12, + "name": null, + "generatedText": ": () => ", + "sourceText": ": () =" + }, + { + "generatedLine": 134, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 277, + "originalColumn": 19, + "name": null, + "generatedText": "boolean", + "sourceText": "> true" + }, + { + "generatedLine": 135, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 278, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 135, + "generatedColumn": 2, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 278, + "originalColumn": 2, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 136, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 282, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 136, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 282, + "originalColumn": 0, + "name": null, + "generatedText": "declare ", + "sourceText": "" + }, + { + "generatedLine": 136, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 282, + "originalColumn": 6, + "name": null, + "generatedText": "const ", + "sourceText": "const " + }, + { + "generatedLine": 136, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 282, + "originalColumn": 7, + "name": null, + "generatedText": "a", + "sourceText": "a" + }, + { + "generatedLine": 136, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 282, + "originalColumn": 9, + "name": null, + "generatedText": ": ", + "sourceText": " =" + }, + { + "generatedLine": 136, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 282, + "originalColumn": 27, + "name": null, + "generatedText": "boolean", + "sourceText": " obj.fn();" + }, + { + "generatedLine": 136, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 282, + "originalColumn": 28, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 137, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 285, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 137, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 285, + "originalColumn": 6, + "name": null, + "generatedText": "declare class ", + "sourceText": "class " + }, + { + "generatedLine": 137, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 285, + "originalColumn": 11, + "name": null, + "generatedText": "Utils", + "sourceText": "Utils" + }, + { + "generatedLine": 138, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 2, + "name": null + }, + { + "generatedLine": 138, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 8, + "name": null, + "generatedText": "static", + "sourceText": "static" + }, + { + "generatedLine": 138, + "generatedColumn": 11, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 9, + "name": null, + "generatedText": " ", + "sourceText": " " + }, + { + "generatedLine": 138, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 18, + "name": null, + "generatedText": "isDefined", + "sourceText": "isDefined" + }, + { + "generatedLine": 138, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 19, + "name": null, + "generatedText": "<", + "sourceText": "<" + }, + { + "generatedLine": 138, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 20, + "name": null, + "generatedText": "T", + "sourceText": "T" + }, + { + "generatedLine": 138, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 22, + "name": null, + "generatedText": ">(", + "sourceText": ">(" + }, + { + "generatedLine": 138, + "generatedColumn": 29, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 27, + "name": null, + "generatedText": "value", + "sourceText": "value" + }, + { + "generatedLine": 138, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 29, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 138, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 30, + "name": null, + "generatedText": "T", + "sourceText": "T" + }, + { + "generatedLine": 138, + "generatedColumn": 35, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 33, + "name": null, + "generatedText": "): ", + "sourceText": "): " + }, + { + "generatedLine": 138, + "generatedColumn": 40, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 38, + "name": null, + "generatedText": "value", + "sourceText": "value" + }, + { + "generatedLine": 138, + "generatedColumn": 44, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 42, + "name": null, + "generatedText": " is ", + "sourceText": " is " + }, + { + "generatedLine": 138, + "generatedColumn": 55, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 53, + "name": null, + "generatedText": "NonNullable", + "sourceText": "NonNullable" + }, + { + "generatedLine": 138, + "generatedColumn": 56, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 54, + "name": null, + "generatedText": "<", + "sourceText": "<" + }, + { + "generatedLine": 138, + "generatedColumn": 57, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 55, + "name": null, + "generatedText": "T", + "sourceText": "T" + }, + { + "generatedLine": 138, + "generatedColumn": 58, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 56, + "name": null, + "generatedText": ">", + "sourceText": ">" + }, + { + "generatedLine": 139, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 289, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 140, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 291, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 140, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 291, + "originalColumn": 6, + "name": null, + "generatedText": "declare class ", + "sourceText": "class " + }, + { + "generatedLine": 140, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 291, + "originalColumn": 12, + "name": null, + "generatedText": "A53267", + "sourceText": "A53267" + }, + { + "generatedLine": 141, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 292, + "originalColumn": 2, + "name": null + }, + { + "generatedLine": 141, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 292, + "originalColumn": 18, + "name": null, + "generatedText": "readonly ", + "sourceText": "public readonly " + }, + { + "generatedLine": 141, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 292, + "originalColumn": 28, + "name": null, + "generatedText": "testNumber", + "sourceText": "testNumber" + }, + { + "generatedLine": 141, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 292, + "originalColumn": 30, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 141, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 292, + "originalColumn": 36, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 141, + "generatedColumn": 34, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 292, + "originalColumn": 39, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 141, + "generatedColumn": 43, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 292, + "originalColumn": 48, + "name": null, + "generatedText": "undefined", + "sourceText": "undefined" + }, + { + "generatedLine": 141, + "generatedColumn": 44, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 292, + "originalColumn": 49, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 142, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 294, + "originalColumn": 2, + "name": null + }, + { + "generatedLine": 142, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 294, + "originalColumn": 5, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 142, + "generatedColumn": 11, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 294, + "originalColumn": 9, + "name": null, + "generatedText": "(): ", + "sourceText": "() {" + }, + { + "generatedLine": 142, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 294, + "originalColumn": 13, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 143, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 301, + "originalColumn": 1, + "name": null + } + ] +} \ No newline at end of file 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..c70263b24374f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEmitDeclarationOnly.d.ts.map @@ -0,0 +1,27 @@ +//// [tests/cases/compiler/declFileEmitDeclarationOnly.ts] //// + + + +/// [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;IACP,IAAI,CAAC,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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVsbG93b3JsZC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiaGVsbG93b3JsZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxRQUFBLE1BQU0sR0FBRztJQUNQLElBQUksQ0FBQyxHQUFHLEVBQUUsTUFBTSxHQUFHLElBQUk7Q0FDeEIsQ0FBQTtBQUVELGNBQU0sVUFBVTtJQUNGLE9BQU8sQ0FBQyxJQUFJO2dCQUFKLElBQUksRUFBRSxNQUFNO0lBR3pCLEtBQUssSUFBSSxJQUFJO0NBR3JCIn0=,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 index 7cb2f2740f359..7a96ecf671fbc 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts @@ -71,7 +71,6 @@ declare enum e5 { "Weekend days" = 3 } //# sourceMappingURL=declFileEnums.d.ts.map - /// [Errors] //// declFileEnums.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileRegressionTests.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileRegressionTests.d.ts.map new file mode 100644 index 0000000000000..4bfb857ef3675 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileRegressionTests.d.ts.map @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/declFileRegressionTests.ts] //// + + + +/// [Declarations] //// + + + +//// [declFileRegressionTests.d.ts] +declare var n: { + w: any; + x: string; + y: () => void; + z: number; +}; +//# sourceMappingURL=declFileRegressionTests.d.ts.map + +/// [Declarations Maps] //// + + +//// [declFileRegressionTests.d.ts.map] +{"version":3,"file":"declFileRegressionTests.d.ts","sourceRoot":"","sources":["declFileRegressionTests.ts"],"names":[],"mappings":"AAEA,QAAA,IAAI,CAAC;IAAK,CAAC;IAAQ,CAAC;IAAM,CAAC,QAAM,IAAI;IAAS,CAAC;CAAM,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgbjogew0KICAgIHc6IGFueTsNCiAgICB4OiBzdHJpbmc7DQogICAgeTogKCkgPT4gdm9pZDsNCiAgICB6OiBudW1iZXI7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZGVjbEZpbGVSZWdyZXNzaW9uVGVzdHMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbEZpbGVSZWdyZXNzaW9uVGVzdHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xGaWxlUmVncmVzc2lvblRlc3RzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLFFBQUEsSUFBSSxDQUFDO0lBQUssQ0FBQztJQUFRLENBQUM7SUFBTSxDQUFDLFFBQU0sSUFBSTtJQUFTLENBQUM7Q0FBTSxDQUFDIn0=,Ly8gJ251bGwnIG5vdCBjb252ZXJ0ZWQgdG8gJ2FueScgaW4gZC50cwovLyBmdW5jdGlvbiB0eXBlcyBub3QgcGlwZWQgdGhyb3VnaCBjb3JyZWN0bHkKdmFyIG4gPSB7IHc6IG51bGwsIHg6ICcnLCB5OiAoKTogdm9pZCA9PiB7IH0sIHo6IDMyIH07Cgo= + 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..6e10e232c83e0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitAliasExportStar.d.ts.map @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/declarationEmitAliasExportStar.ts] //// + + + +/// [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..6c0fec12a018b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatternWithReservedWord.d.ts.map @@ -0,0 +1,30 @@ +//// [tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts] //// + + + +/// [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":["declarationEmitBindingPatternWithReserv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9jYWxlcyA9IDxUIGV4dGVuZHMgTG9jYWxlRGF0YT4oewogICAgYXBwLAogICAgbmFtZSwKICAgIGRlZmF1bHQ6IGRlZmF1bHRMb2NhbGVzQ29uZmlnLAogICAgY29uZmlnOiB1c2VyTG9jYWxlc0NvbmZpZyA9IHt9LAp9OiBHZXRMb2NhbGVzT3B0aW9uczxUPik6IENvbnZlcnRMb2NhbGVDb25maWc8VD4gPT4gewogICAgcmV0dXJuIGRlZmF1bHRMb2NhbGVzQ29uZmlnOwp9Owo= + 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..99b38229a9c9a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatterns.d.ts.map @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/declarationEmitBindingPatterns.ts] //// + + + +/// [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/declarationEmitBundleWithAmbientReferences.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBundleWithAmbientReferences.d.ts new file mode 100644 index 0000000000000..03a8d599d3916 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBundleWithAmbientReferences.d.ts @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/declarationEmitBundleWithAmbientReferences.ts] //// + +//// [lib/lib.d.ts] +declare module "lib/result" { + export type Result = (E & Failure) | (T & Success); + export interface Failure { } + export interface Success { } +} + +//// [src/datastore_result.ts] +import { Result } from "lib/result"; + +export type T = Result; + +//// [src/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 index c595b2f695bfc..251999dd421f4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCommonJsModuleReferencedType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCommonJsModuleReferencedType.d.ts @@ -33,7 +33,6 @@ 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. 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..511bc14221b77 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitComputedNameCausesImportToBePainted.d.ts.map @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/declarationEmitComputedNameCausesImportToBePainted.ts] //// + + + +/// [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..65c2f7f47e1ab --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCrossFileImportTypeOfAmbientModule.d.ts @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/declarationEmitCrossFileImportTypeOfAmbientModule.ts] //// + +//// [types/component.d.ts] +declare module '@namespace/component' { + export class Foo {} +} +//// [packages/somepackage/index.d.ts] +import { Foo } from "@namespace/component"; +export declare const item: typeof Foo; +//// [packages/secondpackage/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 index 7be1a34d11b1c..95ff1b7207243 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDefaultExportWithStaticAssignment.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDefaultExportWithStaticAssignment.d.ts @@ -40,27 +40,22 @@ C.B = B; 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(2,25): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern.d.ts.map new file mode 100644 index 0000000000000..ed1d0058b34e6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern.d.ts.map @@ -0,0 +1,81 @@ +//// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts] //// + + + +/// [Declarations] //// + + + +//// [declarationEmitDestructuringObjectLiteralPattern.d.ts] +declare const dest: { + x4: number; + y4: string; +}; +declare const x4: number; +declare const dest_2: { + x5: number; + y5: string; +}; +declare const y5: string; +declare const dest_1: { + x6: number; + y6: string; +}; +declare const x6: number; +declare const y6: string; +declare const dest: { + x7: number; + y7: string; +}; +declare const a1: number; +declare const dest_2: { + x8: number; + y8: string; +}; +declare const b1: string; +declare const dest_1: { + x9: number; + y9: string; +}; +declare const a2: number; +declare const b2: string; +declare const dest: { + a: number; + b: { + a: string; + b: { + a: boolean; + }; + }; +}; +declare const x11: number; +declare const y11: string; +declare const z11: boolean; +declare function f15(): { + a4: string; + b4: number; + c4: boolean; +}; +declare const dest_1: { + a4: string; + b4: number; + c4: boolean; +}; +declare const a4: string; +declare const b4: number; +declare const c4: boolean; +declare namespace m { + const a4: string; + const b4: number; + const c4: boolean; +} +//# sourceMappingURL=declarationEmitDestructuringObjectLiteralPattern.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitDestructuringObjectLiteralPattern.d.ts.map] +{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,IAAI;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,IAAI;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,MAAM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6IG51bWJlcjsKICAgIGM0OiBib29sZWFuOwp9IHsKICAgIHZhciBhNCA9ICJoZWxsbyI7CiAgICB2YXIgYjQgPSAxOwogICAgdmFyIGM0ID0gdHJ1ZTsKICAgIHJldHVybiB7IGE0LCBiNCwgYzQgfTsKfQpjb25zdCBkZXN0XzE6IHsKICAgIGE0OiBzdHJpbmc7CiAgICBiNDogbnVtYmVyOwogICAgYzQ6IGJvb2xlYW47Cn0gPSBmMTUoKTsKY29uc3QgYTQ6IHN0cmluZyA9IGRlc3RfMS5hNDsKY29uc3QgYjQ6IG51bWJlciA9IGRlc3RfMS5iNDsKY29uc3QgYzQ6IGJvb2xlYW4gPSBkZXN0XzEuYzQ7Cgptb2R1bGUgbSB7CiAgICBjb25zdCBkZXN0ID0gZjE1KCk7CiAgICBleHBvcnQgY29uc3QgYTQ6IHN0cmluZyA9IGRlc3QuYTQ7CiAgICBleHBvcnQgY29uc3QgYjQ6IG51bWJlciA9IGRlc3QuYjQ7CiAgICBleHBvcnQgY29uc3QgYzQ6IGJvb2xlYW4gPSBkZXN0LmM0Owp9 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map new file mode 100644 index 0000000000000..7e38f01e18421 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map @@ -0,0 +1,51 @@ +//// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts] //// + + + +/// [Declarations] //// + + + +//// [declarationEmitDestructuringObjectLiteralPattern1.d.ts] +declare const dest_2: { + x4: number; + y4: string; +}; +declare const x4: number; +declare const dest_1: { + x5: number; + y5: string; +}; +declare const y5: string; +declare const dest: { + x6: number; + y6: string; +}; +declare const x6: number; +declare const y6: string; +declare const dest_2: { + x7: number; + y7: string; +}; +declare const a1: number; +declare const dest_1: { + x8: number; + y8: string; +}; +declare const b1: string; +declare const dest: { + x9: number; + y9: string; +}; +declare const a2: number; +declare const b2: string; +//# sourceMappingURL=declarationEmitDestructuringObjectLiteralPattern1.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitDestructuringObjectLiteralPattern1.d.ts.map] +{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern1.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern1.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,IAAI;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,IAAI;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBkZXN0XzI6IHsNCiAgICB4NDogbnVtYmVyOw0KICAgIHk0OiBzdHJpbmc7DQp9Ow0KZGVjbGFyZSBjb25zdCB4NDogbnVtYmVyOw0KZGVjbGFyZSBjb25zdCBkZXN0XzE6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kZXN0Lnk2Owpjb25zdCBkZXN0XzIgPSB7IHg3OiA1LCB5NzogImhlbGxvIiB9Owpjb25zdCBhMTogbnVtYmVyID0gZGVzdF8yLng3Owpjb25zdCBkZXN0XzEgPSB7IHg4OiA1LCB5ODogImhlbGxvIiB9Owpjb25zdCBiMTogc3RyaW5nID0gZGVzdF8xLnk4Owpjb25zdCBkZXN0ID0geyB4OTogNSwgeTk6ICJoZWxsbyIgfTsKY29uc3QgYTI6IG51bWJlciA9IGRlc3QueDk7CmNvbnN0IGIyOiBzdHJpbmcgPSBkZXN0Lnk5Ow== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map new file mode 100644 index 0000000000000..fee86785e0951 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map @@ -0,0 +1,49 @@ +//// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts] //// + + + +/// [Declarations] //// + + + +//// [declarationEmitDestructuringObjectLiteralPattern2.d.ts] +declare const dest: { + a: number; + b: { + a: string; + b: { + a: boolean; + }; + }; +}; +declare const x11: number; +declare const y11: string; +declare const z11: boolean; +declare function f15(): { + a4: string; + b4: number; + c4: boolean; +}; +declare const dest_1: { + a4: string; + b4: number; + c4: boolean; +}; +declare const a4: string; +declare const b4: number; +declare const c4: boolean; +declare namespace m { + const a4: string; + const b4: number; + const c4: boolean; +} +//# sourceMappingURL=declarationEmitDestructuringObjectLiteralPattern2.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitDestructuringObjectLiteralPattern2.d.ts.map] +{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern2.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern2.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,IAA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dF8xLmI0Owpjb25zdCBjNDogYm9vbGVhbiA9IGRlc3RfMS5jNDsKCm1vZHVsZSBtIHsKICAgIGNvbnN0IGRlc3QgPSBmMTUoKTsKICAgIGV4cG9ydCBjb25zdCBhNDogc3RyaW5nID0gZGVzdC5hNDsKICAgIGV4cG9ydCBjb25zdCBiNDogbnVtYmVyID0gZGVzdC5iNDsKICAgIGV4cG9ydCBjb25zdCBjNDogYm9vbGVhbiA9IGRlc3QuYzQ7Cn0= + 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 index ab0f6044e6046..3531dad3ce3d1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringParameterProperties.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringParameterProperties.d.ts @@ -48,7 +48,6 @@ declare class C3 { 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. 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..46ca0dc12018b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDistributiveConditionalWithInfer.d.ts.map @@ -0,0 +1,20 @@ +//// [tests/cases/compiler/declarationEmitDistributiveConditionalWithInfer.ts] //// + + + +/// [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..87e7169563da7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDuplicateParameterDestructuring.d.ts.map @@ -0,0 +1,27 @@ +//// [tests/cases/compiler/declarationEmitDuplicateParameterDestructuring.ts] //// + + + +/// [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;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bnN0IGZuMSA9ICh7IHByb3A6IGEsIHByb3A6IGIgfTogeyBwcm9wOiBudW1iZXIgfSk6IG51bWJlciA9PiBhICsgYjsKCmV4cG9ydCBjb25zdCBmbjIgPSAoeyBwcm9wOiBhIH06IHsgcHJvcDogbnVtYmVyIH0sIHsgcHJvcDogYiB9OiB7IHByb3A6IG51bWJlciB9KTogbnVtYmVyID0+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 index 4442c14ac04ca..c17c63acb1874 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoPropertyPrivateName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoPropertyPrivateName.d.ts @@ -20,11 +20,9 @@ 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(3,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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..e98623e83eca9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExportAliasVisibiilityMarking.d.ts.map @@ -0,0 +1,50 @@ +//// [tests/cases/compiler/declarationEmitExportAliasVisibiilityMarking.ts] //// + + + +/// [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 index 6b6fc6d0272ea..043dca9bb0ea3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink.d.ts @@ -41,7 +41,6 @@ export const a: import("typescript-fsa").A; //// [/p1/index.d.ts] export declare const a: invalid; //# sourceMappingURL=index.d.ts.map - /// [Errors] //// /p1/index.ts(4,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 5a0df29446795..04d0533f636d9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink2.d.ts @@ -29,7 +29,6 @@ export const a: import("typescript-fsa").A; //// [/p1/index.d.ts] export declare const a: invalid; //# sourceMappingURL=index.d.ts.map - /// [Errors] //// /p1/index.ts(4,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 57c8f5569a7bd..048af99b0c1da 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionDuplicateNamespace.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionDuplicateNamespace.d.ts @@ -18,7 +18,6 @@ f.x = 2; declare function f(a: 0): 0; declare function f(a: 1): 1; //# sourceMappingURL=declarationEmitFunctionDuplicateNamespace.d.ts.map - /// [Errors] //// declarationEmitFunctionDuplicateNamespace.ts(2,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index 81aaed1296e83..a9429cd641c04 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionKeywordProp.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionKeywordProp.d.ts @@ -21,7 +21,6 @@ declare function foo(): void; declare function bar(): void; declare function baz(): void; //# sourceMappingURL=declarationEmitFunctionKeywordProp.d.ts.map - /// [Errors] //// declarationEmitFunctionKeywordProp.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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..1eb59ea765fc6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitGlobalThisPreserved.d.ts.map @@ -0,0 +1,78 @@ +//// [tests/cases/compiler/declarationEmitGlobalThisPreserved.ts] //// + + + +/// [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,K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uaXNOYU47Cn0gewogICAgcmV0dXJuIGZ1bmN0aW9uKCkgeyByZXR1cm4geyBiYXIgfSB9Owp9CgovLyBOb24taW5mZXJlbmNlIGNhc2VzLgoKZXhwb3J0IGNvbnN0IGV4cGxpY2l0bHlUeXBlZFZhcmlhYmxlOiAoaXNOYU46IHR5cGVvZiBnbG9iYWxUaGlzLmlzTmFOKSA9PiB0eXBlb2YgZ2xvYmFsVGhpcy5pc05hTiA9IChpc05hTikgPT4gaXNOYU47CgpleHBvcnQgZnVuY3Rpb24gZXhwbGljaXRseVR5cGVkRnVuY3Rpb24oaXNOYU46IHR5cGVvZiBnbG9iYWxUaGlzLmlzTmFOKTogdHlwZW9mIGdsb2JhbFRoaXMuaXNOYU4gewogICAgcmV0dXJuIGlzTmFOOwp9OwoKZXhwb3J0IHR5cGUgQXNPYmplY3RQcm9wZXJ0eSA9IHsKICAgIGlzTmFOOiB0eXBlb2YgZ2xvYmFsVGhpcy5pc05hTjsKfQoKZXhwb3J0IGNsYXNzIEFzQ2xhc3NQcm9wZXJ0eSB7CiAgICBpc05hTj86IHR5cGVvZiBnbG9iYWxUaGlzLmlzTmFOOwp9CgpleHBvcnQgdHlwZSBBc0Z1bmN0aW9uVHlwZSA9IChpc05hTjogdHlwZW9mIGdsb2JhbFRoaXMuaXNOYU4pID0+IHR5cGVvZiBnbG9iYWxUaGlzLmlzTmFOOwoK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/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/declarationEmitInferredDefaultExportType2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitInferredDefaultExportType2.d.ts.map new file mode 100644 index 0000000000000..6f3be3ccc17af --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitInferredDefaultExportType2.d.ts.map @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/declarationEmitInferredDefaultExportType2.ts] //// + + + +/// [Declarations] //// + + + +//// [declarationEmitInferredDefaultExportType2.d.ts] +declare const _default: { + foo: readonly []; + bar: any; + baz: any; +}; +export = _default; +//# sourceMappingURL=declarationEmitInferredDefaultExportType2.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitInferredDefaultExportType2.d.ts.map] +{"version":3,"file":"declarationEmitInferredDefaultExportType2.d.ts","sourceRoot":"","sources":["declarationEmitInferredDefaultExportType2.ts"],"names":[],"mappings":";IAEE,GAAG;IACH,GAAG;IACH,GAAG;;AAHL,kBAIC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBfZGVmYXVsdDogew0KICAgIGZvbzogcmVhZG9ubHkgW107DQogICAgYmFyOiBhbnk7DQogICAgYmF6OiBhbnk7DQp9Ow0KZXhwb3J0ID0gX2RlZmF1bHQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbkVtaXRJbmZlcnJlZERlZmF1bHRFeHBvcnRUeXBlMi5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0SW5mZXJyZWREZWZhdWx0RXhwb3J0VHlwZTIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdEluZmVycmVkRGVmYXVsdEV4cG9ydFR5cGUyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7SUFFRSxHQUFHO0lBQ0gsR0FBRztJQUNILEdBQUc7O0FBSEwsa0JBSUMifQ==,Ly8gdGVzdC50cwpleHBvcnQgPSB7CiAgZm9vOiBbXSBhcyBjb25zdCwKICBiYXI6IHVuZGVmaW5lZCwKICBiYXo6IG51bGwKfQ== + 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/declarationEmitKeywordDestructuring.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitKeywordDestructuring.d.ts new file mode 100644 index 0000000000000..866844bd24784 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitKeywordDestructuring.d.ts @@ -0,0 +1,112 @@ +//// [tests/cases/compiler/declarationEmitKeywordDestructuring.ts] //// + +//// [declarationEmitKeywordDestructuring.ts] +type P = { + enum: boolean; + function: boolean; + abstract: boolean; + async: boolean; + await: boolean; + one: boolean; +}; + +function f1({ enum: _enum, ...rest }: P): { + function: boolean; + abstract: boolean; + async: boolean; + await: boolean; + one: boolean; +} { + return rest; +} + +function f2({ function: _function, ...rest }: P): { + enum: boolean; + abstract: boolean; + async: boolean; + await: boolean; + one: boolean; +} { + return rest; +} + +function f3({ abstract: _abstract, ...rest }: P): { + enum: boolean; + function: boolean; + async: boolean; + await: boolean; + one: boolean; +} { + return rest; +} + +function f4({ async: _async, ...rest }: P): { + enum: boolean; + function: boolean; + abstract: boolean; + await: boolean; + one: boolean; +} { + return rest; +} + +function f5({ await: _await, ...rest }: P): { + enum: boolean; + function: boolean; + abstract: boolean; + async: boolean; + one: boolean; +} { + return rest; +} + + +/// [Declarations] //// + + + +//// [declarationEmitKeywordDestructuring.d.ts] +type P = { + enum: boolean; + function: boolean; + abstract: boolean; + async: boolean; + await: boolean; + one: boolean; +}; +declare function f1({ enum: _enum, ...rest }: P): { + function: boolean; + abstract: boolean; + async: boolean; + await: boolean; + one: boolean; +}; +declare function f2({ function: _function, ...rest }: P): { + enum: boolean; + abstract: boolean; + async: boolean; + await: boolean; + one: boolean; +}; +declare function f3({ abstract: _abstract, ...rest }: P): { + enum: boolean; + function: boolean; + async: boolean; + await: boolean; + one: boolean; +}; +declare function f4({ async: _async, ...rest }: P): { + enum: boolean; + function: boolean; + abstract: boolean; + await: boolean; + one: boolean; +}; +declare function f5({ await: _await, ...rest }: P): { + enum: boolean; + function: boolean; + abstract: boolean; + async: boolean; + one: boolean; +}; +//# sourceMappingURL=declarationEmitKeywordDestructuring.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 index e88b068dae394..1b199b4532690 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments.d.ts @@ -24,7 +24,6 @@ const a: string = foo[dashStrMem]; //// [declarationEmitLateBoundAssignments.d.ts] export declare function foo(): void; //# sourceMappingURL=declarationEmitLateBoundAssignments.d.ts.map - /// [Errors] //// declarationEmitLateBoundAssignments.ts(1,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index 4574fdbd3a92a..fb3f010b6a3f3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts @@ -156,7 +156,6 @@ export declare const arrow10: { "🤷‍♂️": number; }; //# sourceMappingURL=declarationEmitLateBoundAssignments2.d.ts.map - /// [Errors] //// declarationEmitLateBoundAssignments2.ts(9,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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..c425b0fa86d00 --- /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/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 index c463741832404..68c2a527d977b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectAssignedDefaultExport.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectAssignedDefaultExport.d.ts @@ -50,7 +50,6 @@ 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. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts.map new file mode 100644 index 0000000000000..af2a9e673e4bf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts.map @@ -0,0 +1,37 @@ +//// [tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts] //// + + + +/// [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 + +/// [Declarations Maps] //// + + +//// [declarationEmitObjectLiteralAccessors1.d.ts.map] +{"version":3,"file":"declarationEmitObjectLiteralAccessors1.d.ts","sourceRoot":"","sources":["declarationEmitObjectLiteralAccessors1.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,EAAE;IACf,gDAAgD;IAChD,CAAC,EAAE,MAAM,CAAC;CAQb,CAAC;AA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Ki8KICAgIHNldCB4KGE6IG51bWJlcik7Cn0gPSB7CiAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovCiAgZ2V0IHgoKTogc3RyaW5nIHsKICAgIHJldHVybiAiIjsKICB9LAogIC8qKiBteSBhd2Vzb21lIHNldHRlciAqLwogIHNldCB4KGE6IG51bWJlcikge30sCn07CgpleHBvcnQgY29uc3Qgb2JqMyA9IHsKICAvKiogbXkgYXdlc29tZSBnZXR0ZXIgKi8KICBnZXQgeCgpOiBzdHJpbmcgewogICAgcmV0dXJuICIiOwogIH0sCn07CgpleHBvcnQgY29uc3Qgb2JqNCA9IHsKICAvKiogbXkgYXdlc29tZSBzZXR0ZXIgKi8KICBzZXQgeChhOiBudW1iZXIpIHt9LAp9Owo= + 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..6413c12b3bbc6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitOptionalMethod.d.ts.map @@ -0,0 +1,26 @@ +//// [tests/cases/compiler/declarationEmitOptionalMethod.ts] //// + + + +/// [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,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==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0T3B0aW9uYWxNZXRob2QuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdE9wdGlvbmFsTWV0aG9kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGVBQU8sTUFBTSxHQUFHLEdBQUksSUFBSSxFQUFFO0lBQ3RCLENBQUMsQ0FBQyxJQUFJLElBQUksQ0FBQztJQUNYLENBQUMsQ0FBQyxFQUFFLE1BQU0sSUFBSSxDQUFDO0NBQ2xCLEtBQUc7SUFDQSxDQUFDLENBQUMsSUFBSSxJQUFJLENBQUM7SUFDWCxDQUFDLENBQUMsRUFBRSxNQUFNLElBQUksQ0FBQztDQUNSLENBQUMifQ==,ZXhwb3J0IGNvbnN0IEZvbyA9IChvcHRzOiB7CiAgICBhPygpOiB2b2lkLAogICAgYj86ICgpID0+IHZvaWQsCn0pOiB7CiAgICBjPygpOiB2b2lkLAogICAgZD86ICgpID0+IHZvaWQsCn0gPT4gKHsgIH0pOw== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitParameterProperty.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitParameterProperty.d.ts new file mode 100644 index 0000000000000..851a88eb93cec --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitParameterProperty.d.ts @@ -0,0 +1,19 @@ +//// [tests/cases/compiler/declarationEmitParameterProperty.ts] //// + +//// [declarationEmitParameterProperty.ts] +export class Foo { + constructor(public bar?: string) { + } +} + + +/// [Declarations] //// + + + +//// [declarationEmitParameterProperty.d.ts] +export declare class Foo { + bar?: string; + constructor(bar?: string); +} +//# sourceMappingURL=declarationEmitParameterProperty.d.ts.map \ No newline at end of file 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..7920892256e1a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map @@ -0,0 +1,33 @@ +//// [tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts] //// + + + +/// [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..bf6864ce168fd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPrefersPathKindBasedOnBundling2.d.ts.map @@ -0,0 +1,37 @@ +//// [tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling2.ts] //// + + + +/// [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..12ebd89f8f2dc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitRecursiveConditionalAliasPreserved.d.ts.map @@ -0,0 +1,21 @@ +//// [tests/cases/compiler/declarationEmitRecursiveConditionalAliasPreserved.ts] //// + + + +/// [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 index 1087627e13fe0..fdd5676fffcc5 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference.d.ts @@ -50,11 +50,9 @@ export * from '@raymondfeng/pkg1'; //// [/.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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index b91ee231a2c3d..796347e92419f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference2.d.ts @@ -53,11 +53,9 @@ export {IdType} from '@raymondfeng/pkg1'; //// [/.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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 8c35a4d6c2219..53d0fcc9c1f98 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference3.d.ts @@ -50,11 +50,9 @@ export {MetadataAccessor} from '@raymondfeng/pkg1'; //// [/.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. 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..b92dd11ae5b51 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitRetainsJsdocyComments.d.ts.map @@ -0,0 +1,55 @@ +//// [tests/cases/compiler/declarationEmitRetainsJsdocyComments.ts] //// + + + +/// [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,LyoqDQogKiBjb21tZW50MQ0KICogQHBhcmFtIHANCiAqLw0KZXhwb3J0IGRlY2xhcmUgY29uc3QgZm9vOiAocDogc3RyaW5nKSA9PiB7DQogICAgLyoqDQogICAgICogY29tbWVudDINCiAgICAgKiBAcGFyYW0gcw0KICAgICAqLw0KICAgIGJhcjogKHM6IG51bWJlcikgPT4gdm9pZDsNCiAgICAvKioNCiAgICAgKiBjb21tZW50Mw0KICAgICAqIEBwYXJhbSBzDQogICAgICovDQogICAgYmFyMihzOiBudW1iZXIpOiB2b2lkOw0KfTsNCmV4cG9ydCBkZWNsYXJlIGNsYXNzIEZvbyB7DQ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IsQ0FBQztBQUV0QyxPQUFPLENBQUMsTUFBTSxDQUFDO0lBQ1gsVUFBVSxPQUFPO1FBQ2I7O1VBRUU7UUFDRixVQUFVLENBQUMsVUFBVSxFQUFFLEdBQUcsRUFBRSxHQUFHLE9BQU8sQ0FBQztLQUMxQztDQUNKIn0=,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..ad383205fed50 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReusesLambdaParameterNodes.d.ts.map @@ -0,0 +1,22 @@ +//// [tests/cases/compiler/declarationEmitReusesLambdaParameterNodes.ts] //// + + + +/// [Declarations] //// + + + +//// [index.d.ts] +import { Props } from "react-select"; +export declare const CustomSelect1: (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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yxLQUFHLFVBQVUsQ0FBQyxDQUFZLENBQUM7QUFDN0MsaUJBQVMsRUFBRSxDQUFDLENBQUMsRUFBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLFVBQVUsQ0FBQyxDQUFDLENBQW1CO0FBR3RELFVBQVUsQ0FBQztDQUFJO0FBRWYsUUFBQSxJQUFJLENBQUMsR0FBSSxDQUFDLEVBQUcsQ0FBQyxFQUFFLENBQUMsS0FBRyxDQUFNLENBQUM7QUFDM0IsaUJBQVMsRUFBRSxDQUFDLENBQUMsRUFBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLENBQUMsQ0FBYSJ9,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..c6b26d2273c1a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitTypeParameterNameShadowedInternally.d.ts.map @@ -0,0 +1,20 @@ +//// [tests/cases/compiler/declarationEmitTypeParameterNameShadowedInternally.ts] //// + + + +/// [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/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 index fd6d6c7a0574f..3982747e6d988 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithInvalidPackageJsonTypings.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithInvalidPackageJsonTypings.d.ts @@ -36,7 +36,6 @@ export interface MutableRefObject { 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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/declarationFiles.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts index c51e19a453d6d..4f749fc0f83d7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts @@ -97,7 +97,6 @@ declare class C4 { f4(): () => this; } //# sourceMappingURL=declarationFiles.d.ts.map - /// [Errors] //// declarationFiles.ts(4,20): error TS2526: A 'this' type is available only in a non-static member of a class or interface. 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..c654d5ab28e4b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/defaultParameterAddsUndefinedWithStrictNullChecks.d.ts.map @@ -0,0 +1,31 @@ +//// [tests/cases/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.ts] //// + + + +/// [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,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,ZGVjbGFyZSBmdW5jdGlvbiBmKGFkZFVuZGVmaW5lZDE/OiBzdHJpbmcsIGFkZFVuZGVmaW5lZDI/OiBud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mV0dXJuIHk7CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIHRydWU7Cn0K + 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/dependentDestructuredVariables.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/dependentDestructuredVariables.d.ts.map new file mode 100644 index 0000000000000..8f001afcb07ae --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/dependentDestructuredVariables.d.ts.map @@ -0,0 +1,168 @@ +//// [tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts] //// + + + +/// [Declarations] //// + + + +//// [dependentDestructuredVariables.d.ts] +type Action = { + kind: 'A'; + payload: number; +} | { + kind: 'B'; + payload: string; +}; +declare function f10({ kind, payload }: Action): void; +declare function f11(action: Action): void; +declare function f12({ kind, payload }: Action): void; +declare function f13({ kind, payload }: T): void; +declare function f14(t: T): void; +type Action2 = { + kind: 'A'; + payload: number | undefined; +} | { + kind: 'B'; + payload: string | undefined; +}; +declare function f20({ kind, payload }: Action2): void; +declare function f21(action: Action2): void; +declare function f22(action: Action2): void; +declare function f23({ kind, payload }: Action2): void; +type Foo = { + kind: 'A'; + isA: true; +} | { + kind: 'B'; + isA: false; +} | { + kind: 'C'; + isA: false; +}; +declare function f30({ kind, isA }: Foo): void; +type Args = ['A', number] | ['B', string]; +declare function f40(...[kind, data]: Args): void; +interface A { + variant: 'a'; + value: T; +} +interface B { + variant: 'b'; + value: Array; +} +type AB = A | B; +declare function printValue(t: T): void; +declare function printValueList(t: Array): void; +declare function unrefined1(ab: AB): void; +type Action3 = { + type: 'add'; + payload: { + toAdd: number; + }; +} | { + type: 'remove'; + payload: { + toRemove: number; + }; +}; +declare const reducerBroken: (state: number, { type, payload }: Action3) => number; +declare var it: Iterator; +declare const dest: IteratorResult; +declare const value: any; +declare const done: boolean | undefined; +declare function f50(cb: (...args: Args) => void): void; +declare const f51: (...args: ['A', number] | ['B', string]) => void; +declare const f52: (...args: ['A', number] | ['B']) => void; +declare function readFile(path: string, callback: (...args: [err: null, data: unknown[]] | [err: Error, data: undefined]) => void): void; +type ReducerArgs = ["add", { + a: number; + b: number; +}] | ["concat", { + firstArr: any[]; + secondArr: any[]; +}]; +declare const reducer: (...args: ReducerArgs) => void; +type FooMethod = { + method(...args: [ + type: "str", + cb: (e: string) => void + ] | [ + type: "num", + cb: (e: number) => void + ]): void; +}; +declare let fooM: FooMethod; +type FooAsyncMethod = { + method(...args: [ + type: "str", + cb: (e: string) => void + ] | [ + type: "num", + cb: (e: number) => void + ]): Promise; +}; +declare let fooAsyncM: FooAsyncMethod; +type FooGenMethod = { + method(...args: [ + type: "str", + cb: (e: string) => void + ] | [ + type: "num", + cb: (e: number) => void + ]): Generator; +}; +declare let fooGenM: FooGenMethod; +type FooAsyncGenMethod = { + method(...args: [ + type: "str", + cb: (e: string) => void + ] | [ + type: "num", + cb: (e: number) => void + ]): AsyncGenerator; +}; +declare let fooAsyncGenM: FooAsyncGenMethod; +type Func = (...args: T) => void; +declare const f60: Func; +declare function foo({ value1, test1, test2, test3, test4, test5, test6, test7, test8, test9 }: { + value1: any; + test1?: any; + test2?: any; + test3?: any; + test4?: any; + test5?: any; + test6?: any; + test7?: any; + test8?: any; + test9?: any; +}): void; +declare function fa1(x: [true, number] | [false, string]): void; +declare function fa2(x: { + guard: true; + value: number; +} | { + guard: false; + value: string; +}): void; +declare const fa3: (...args: [true, number] | [false, string]) => void; +interface ClientEvents { + warn: [message: string]; + shardDisconnect: [closeEvent: CloseEvent, shardId: number]; +} +declare class Client { + on(event: K, listener: (...args: ClientEvents[K]) => void): void; +} +declare const bot: Client; +declare function fz1([x, y]: [1, 2] | [3, 4] | [5]): void; +declare function tooNarrow([x, y]: [1, 1] | [1, 2] | [1]): void; +//# sourceMappingURL=dependentDestructuredVariables.d.ts.map + +/// [Declarations Maps] //// + + +//// [dependentDestructuredVariables.d.ts.map] +{"version":3,"file":"dependentDestructuredVariables.d.ts","sourceRoot":"","sources":["dependentDestructuredVariables.ts"],"names":[],"mappings":"AAAA,KAAK,MAAM,GACL;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAErC,iBAAS,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,MAAM,GAAG,IAAI,CAO5C;AAED,iBAAS,GAAG,CAAC,MAAM,EAAE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gpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICBwYXlsb2FkOyAgLy8gbmV2ZXIKICAgIH0KfQoKLy8gcmVwcm8gIzUwMjA2CmZ1bmN0aW9uIGYxMzxUIGV4dGVuZHMgQWN0aW9uPih7IGtpbmQsIHBheWxvYWQgfTogVCk6IHZvaWQgewogICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgfQogICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgIH0KfQoKZnVuY3Rpb24gZjE0PFQgZXh0ZW5kcyBBY3Rpb24+KHQ6IFQpOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCwgcGF5bG9hZCB9ID0gdDsKICAgIGlmIChraW5kID09PSAnQScpIHsKICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICB9Cn0KCnR5cGUgQWN0aW9uMiA9CiAgICB8IHsga2luZDogJ0EnLCBwYXlsb2FkOiBudW1iZXIgfCB1bmRlZmluZWQgfQogICAgfCB7IGtpbmQ6ICdCJywgcGF5bG9hZDogc3RyaW5nIHwgdW5kZWZpbmVkIH07CgpmdW5jdGlvbiBmMjAoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbjIpOiB2b2lkIHsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjEoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjIoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBpZiAoYWN0aW9uLnBheWxvYWQpIHsKICAgICAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgICAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgIH0KICAgICAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICB9CiAgICB9Cn0KCmZ1bmN0aW9uIGYyMyh7IGtpbmQsIHBheWxvYWQgfTogQWN0aW9uMik6IHZvaWQgewogICAgaWYgKHBheWxvYWQpIHsKICAgICAgICBzd2l0Y2ggKGtpbmQpIHsKICAgICAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgcGF5bG9hZDsgIC8vIG5ldmVyCiAgICAgICAgfQogICAgfQp9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ICAgICAgeDsgIC8vIDMKICAgIH0KICAgIGlmICh5ID09PSB1bmRlZmluZWQpIHsKICAgICAgICB4OyAgLy8gNQogICAgfQogICAgaWYgKHggPT09IDEpIHsKICAgICAgICB5OyAgLy8gMgogICAgfQogICAgaWYgKHggPT09IDMpIHsKICAgICAgICB5OyAgLy8gNAogICAgfQogICAgaWYgKHggPT09IDUpIHsKICAgICAgICB5OyAgLy8gdW5kZWZpbmVkCiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzU1NjYxCgpmdW5jdGlvbiB0b29OYXJyb3coW3gsIHldOiBbMSwgMV0gfCBbMSwgMl0gfCBbMV0pOiB2b2lkIHsKICAgIGlmICh5ID09PSB1bmRlZmluZWQpIHsKICAgICAgICBjb25zdCBzaG91bGROb3RCZU9rOiBuZXZlciA9IHg7ICAvLyBFcnJvcgogICAgfQp9Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuredDeclarationEmit.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuredDeclarationEmit.d.ts.map new file mode 100644 index 0000000000000..43ebc17221868 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuredDeclarationEmit.d.ts.map @@ -0,0 +1,54 @@ +//// [tests/cases/compiler/destructuredDeclarationEmit.ts] //// + + + +/// [Declarations] //// + + + +//// [foo.d.ts] +declare const foo: { + bar: string; + bat: string; + bam: { + bork: { + bar: string; + baz: string; + }; + }; +}; +declare const arr: [0, 1, 2, ['a', 'b', 'c', [{ + def: 'def'; +}, { + sec: 'sec'; +}]]]; +export { foo, arr }; +//# sourceMappingURL=foo.d.ts.map +//// [index.d.ts] +import { foo, arr } from './foo'; +export { foo, arr }; +declare const baz: string; +declare const ibaz: string; +export { baz, ibaz }; +declare const one: 1; +declare const bee: "b"; +declare const sec: "sec"; +export { one, bee, sec }; +declare const foo2: string; +export { foo2 }; +//# sourceMappingURL=index.d.ts.map + +/// [Declarations Maps] //// + + +//// [foo.d.ts.map] +{"version":3,"file":"foo.d.ts","sourceRoot":"","sources":["foo.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,GAAG;IAAK,GAAG;IAAW,GAAG;IAAW,GAAG;QAAI,IAAI;YAAI,GAAG;YAAO,GAAG;;;CAAW,CAAC;AAClF,QAAA,MAAM,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IAAC,GAAG,EAAE,KAAK,CAAA;CAAC,EAAE;IAAC,GAAG,EAAE,KAAK,CAAA;CAAC,CAAC,CAAC,CAA4D,CAAC;AAC/H,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBmb286IHsNCiAgICBiYXI6IHN0cmluZzsNCiAgICBiYXQ6IHN0cmluZzsNCiAgICBiYW06IHsNCiAgICAgICAgYm9yazogew0KICAgICAgICAgICAgYmFyOiBzdHJpbmc7DQogICAgICAgICAgICBiYXo6IHN0cmluZzsNCiAgICAgICAgfTsNCiAgICB9Ow0KfTsNCmRlY2xhcmUgY29uc3QgYXJyOiBbMCwgMSwgMiwgWydhJywgJ2InLCAnYycsIFt7DQogICAgZGVmOiAnZGVmJzsNCn0sIHsNCiAgICBzZWM6ICdzZWMnOw0KfV1dXTsNCmV4cG9ydCB7IGZvbywgYXJyIH07DQovLyMgc291cmNlTWFwcGluZ1VSTD1mb28uZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJmb28udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsUUFBQSxNQUFNLEdBQUc7SUFBSyxHQUFHO0lBQVcsR0FBRztJQUFXLEdBQUc7UUFBSSxJQUFJO1lBQUksR0FBRztZQUFPLEdBQUc7OztDQUFXLENBQUM7QUFDbEYs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d0IsQ0FBQztBQUN4QyxPQUFPLEVBQUUsR0FBRyxFQUFFLEdBQUcsRUFBRSxHQUFHLEVBQUUsQ0FBQztBQU96QixRQUFBLE1BQU0sSUFBSSxFQUFFLE1BQWlCLENBQUM7QUFDOUIsT0FBTyxFQUFFLElBQUksRUFBRSxDQUFDIn0=,aW1wb3J0IHsgZm9vLCBhcnIgfSBmcm9tICcuL2Zvbyc7CmV4cG9ydCB7IGZvbywgYXJyIH07CgogICAgY29uc3QgYmF6OiBzdHJpbmcgPSBmb28uYmFyOwogICAgY29uc3QgYmF0OiBzdHJpbmcgPSBmb28uYmF0OwogICAgY29uc3QgaWJhcjogc3RyaW5nID0gZm9vLmJhbS5ib3JrLmJhcjsKICAgIGNvbnN0IGliYXo6IHN0cmluZyA9IGZvby5iYW0uYm9yay5iYXo7CmV4cG9ydCB7IGJheiwgaWJheiB9OwoKICAgIGNvbnN0IG9uZTogMSA9IGFyclsxXTsKICAgIGNvbnN0IGJlZTogImIiID0gYXJyWzNdWzFdOwogICAgY29uc3Qgc2VjOiAic2VjIiA9IGFyclszXVszXVsxXS5zZWM7CmV4cG9ydCB7IG9uZSwgYmVlLCBzZWMgfTsKCmNvbnN0IGdldEZvbyA9ICgpID0+ICh7CiAgICBmb286ICdmb28nCn0pOwoKY29uc3QgZGVzdCA9IGdldEZvbygpOwpjb25zdCBmb28yOiBzdHJpbmcgPSBkZXN0LmZvbzsKZXhwb3J0IHsgZm9vMiB9Owo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringInFunctionType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringInFunctionType.d.ts new file mode 100644 index 0000000000000..6e59c281d8c7c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringInFunctionType.d.ts @@ -0,0 +1,178 @@ +//// [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 +/// [Errors] //// + +destructuringInFunctionType.ts(18,18): error TS2842: 'b' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +destructuringInFunctionType.ts(18,28): error TS2842: 'a' is an unused renaming of 'b'. Did you intend to use it as a type annotation? + + +==== destructuringInFunctionType.ts (2 errors) ==== + 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 }]: [ + ~ +!!! error TS2842: 'b' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + ~ +!!! error TS2842: 'a' is an unused renaming of 'b'. Did you intend to use it as a type annotation? + { + 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; + \ No newline at end of file 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..2e4d027e7111e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/dynamicNamesErrors.d.ts.map @@ -0,0 +1,48 @@ +//// [tests/cases/compiler/dynamicNamesErrors.ts] //// + + + +/// [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,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ZXQgW3pdKCk6IG51bWJlciB7IHJldHVybiAwOyB9CiAgICBzdGF0aWMgc2V0IFt3XSh2YWx1ZTogbnVtYmVyKSB7IH0KCiAgICBbeF06IG51bWJlcjsKICAgIFt5XSgpOiBudW1iZXIgeyByZXR1cm4gMDsgfQogICAgZ2V0IFt6XSgpOiBudW1iZXIgeyByZXR1cm4gMDsgfQogICAgc2V0IFt3XSh2YWx1ZTogbnVtYmVyKSB7IH0KfQoKZXhwb3J0IHR5cGUgT2JqZWN0VHlwZVZpc2liaWxpdHkgPSB7CiAgICBbeF06IG51bWJlcjsKICAgIFt5XSgpOiBudW1iZXI7Cn07CgpleHBvcnQgY29uc3QgT2JqZWN0TGl0ZXJhbFZpc2liaWxpdHkgPSB7CiAgICBbeF06IDAsCiAgICBbeV0oKTogbnVtYmVyIHsgcmV0dXJuIDA7IH0sCiAgICBnZXQgW3pdKCk6IG51bWJlciB7IHJldHVybiAwOyB9LAogICAgc2V0IFt3XSh2YWx1ZTogbnVtYmVyKSB7IH0sCn07 + 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..ed328f8a996b5 --- /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 TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. +emitClassExpressionInDeclarationFile.ts(5,38): error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. + + +==== emitClassExpressionInDeclarationFile.ts (2 errors) ==== + export var simpleExample = class { + ~~~~~ +!!! error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. + static getTags() { } + tags() { } + } + export var circularReference = class C { + ~ +!!! error TS9011: Declaration emit for class expressions are 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..b83031b0636d4 --- /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 TS9011: Declaration emit for class expressions are 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 TS9011: Declaration emit for class expressions are 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 b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitMethodCalledNew.d.ts new file mode 100644 index 0000000000000..8aa876e283405 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitMethodCalledNew.d.ts @@ -0,0 +1,31 @@ +//// [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 \ No newline at end of file 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..dbf535a4c811b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emptyTuplesTypeAssertion01.d.ts.map @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts] //// + + + +/// [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..c09a99a355dc4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emptyTuplesTypeAssertion02.d.ts.map @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion02.ts] //// + + + +/// [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 index a3e3678bc2ca7..60dbf08495c53 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumClassification.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumClassification.d.ts @@ -144,7 +144,6 @@ declare enum E20 { D } //# sourceMappingURL=enumClassification.d.ts.map - /// [Errors] //// enumClassification.ts(74,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 5d8f52b5e1cf0..eabddbf6c1426 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts @@ -81,7 +81,6 @@ declare enum T7 { c = "21" } //# sourceMappingURL=enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts.map - /// [Errors] //// enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(32,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/escapedReservedCompilerNamedIdentifier.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/escapedReservedCompilerNamedIdentifier.d.ts.map new file mode 100644 index 0000000000000..b8553b9909a02 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/escapedReservedCompilerNamedIdentifier.d.ts.map @@ -0,0 +1,46 @@ +//// [tests/cases/compiler/escapedReservedCompilerNamedIdentifier.ts] //// + + + +/// [Declarations] //// + + + +//// [escapedReservedCompilerNamedIdentifier.d.ts] +declare var __proto__: number; +declare var o: { + __proto__: number; +}; +declare var b: number; +declare var o1: { + __proto__: number; +}; +declare var b1: number; +declare var ___proto__: number; +declare var o2: { + ___proto__: number; +}; +declare var b2: number; +declare var o3: { + ___proto__: number; +}; +declare var b3: number; +declare var _proto__: number; +declare var o4: { + _proto__: number; +}; +declare var b4: number; +declare var o5: { + _proto__: number; +}; +declare var b5: number; +//# sourceMappingURL=escapedReservedCompilerNamedIdentifier.d.ts.map + +/// [Declarations Maps] //// + + +//// [escapedReservedCompilerNamedIdentifier.d.ts.map] +{"version":3,"file":"escapedReservedCompilerNamedIdentifier.d.ts","sourceRoot":"","sources":["escapedReservedCompilerNamedIdentifier.ts"],"names":[],"mappings":"AACA,QAAA,IAAI,SAAS,QAAK,CAAC;AACnB,QAAA,IAAI,CAAC;;CAEJ,CAAC;AACF,QAAA,IAAI,CAAC,EAAE,MAAuB,CAAC;AAC/B,QAAA,IAAI,EAAE;IACF,SAAS;CACZ,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAwB,CAAC;AAEjC,QAAA,IAAI,UAAU,QAAK,CAAC;AACpB,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAyB,CAAC;AAClC,QAAA,IAAI,EAAE;IACF,UAAU;CACb,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAyB,CAAC;AAElC,QAAA,IAAI,QAAQ,QAAK,CAAC;AAClB,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAuB,CAAC;AAChC,QAAA,IAAI,EAAE;IACF,QAAQ;CACX,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAuB,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgX19wcm90b19fOiBudW1iZXI7DQpkZWNsYXJlIHZhciBvOiB7DQogICAg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yIG80ID0gewogICAgIl9wcm90b19fIjogMAp9Owp2YXIgYjQ6IG51bWJlciA9IG80WyJfcHJvdG9fXyJdOwp2YXIgbzUgPSB7CiAgICBfcHJvdG9fXzogMAp9Owp2YXIgYjU6IG51bWJlciA9IG81WyJfcHJvdG9fXyJdOw== + 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..fb3d0e8aabe60 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exhaustiveSwitchStatements1.d.ts.map @@ -0,0 +1,93 @@ +//// [tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts] //// + + + +/// [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;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,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ZXR1cm4gIjEiOwogICAgICAgIGNhc2UgImNpcmNsZSI6CiAgICAgICAgICAgIHN3aXRjaCAoczIua2luZCkgewogICAgICAgICAgICAgICAgY2FzZSAic3F1YXJlIjoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIjIiOwogICAgICAgICAgICAgICAgY2FzZSAiY2lyY2xlIjoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIjMiOwogICAgICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIm5ldmVyIjsKICAgICAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiB3aXRob3V0RGVmYXVsdChzMTogU2hhcGUyLCBzMjogU2hhcGUyKTogc3RyaW5nIHsKICAgIHN3aXRjaCAoczEua2luZCkgewogICAgICAgIGNhc2UgInNxdWFyZSI6CiAgICAgICAgICAgIHJldHVybiAiMSI7CiAgICAgICAgY2FzZSAiY2lyY2xlIjoKICAgICAgICAgICAgc3dpdGNoIChzMi5raW5kKSB7CiAgICAgICAgICAgICAgICBjYXNlICJzcXVhcmUiOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAiMiI7CiAgICAgICAgICAgICAgICBjYXNlICJjaXJjbGUiOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAiMyI7CiAgICAgICAgICAgIH0KICAgIH0KfQoKLy8gUmVwcm8gZnJvbSAjMjA4MjMKCmZ1bmN0aW9uIHRlc3Q0KHZhbHVlOiAxIHwgMik6IHN0cmluZyB7CiAgICBsZXQgeDogc3RyaW5nOwogICAgc3dpdGNoICh2YWx1ZSkgewogICAgICAgIGNhc2UgMTogeCA9ICJvbmUiOyBicmVhazsKICAgICAgICBjYXNlIDI6IHggPSAidHdvIjsgYnJlYWs7CiAgICB9CiAgICByZXR1cm4geDsKfQoKLy8gUmVwcm8gZnJvbSAjMzQ2NjEKCmVudW0gQW5pbWFsIHsgRE9HLCBDQVQgfQoKZGVjbGFyZSBjb25zdCB6b286IHsgYW5pbWFsOiBB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IgZXhwZWN0ZWQKICB9Cn0= + 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..dd1a8a505209b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportAssignmentMembersVisibleInAugmentation.d.ts @@ -0,0 +1,62 @@ +//// [tests/cases/compiler/exportAssignmentMembersVisibleInAugmentation.ts] //// + +//// [/node_modules/foo/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 index 7df31eb65bb0a..27659536e26e9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportDefaultNamespace.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportDefaultNamespace.d.ts @@ -15,7 +15,6 @@ someFunc.someProp = 'yo'; //// [exportDefaultNamespace.d.ts] export default function someFunc(): string; //# sourceMappingURL=exportDefaultNamespace.d.ts.map - /// [Errors] //// exportDefaultNamespace.ts(1,25): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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..dd63d4c8452d9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/flatArrayNoExcessiveStackDepth.d.ts.map @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/flatArrayNoExcessiveStackDepth.ts] //// + + + +/// [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..32ebc65a46df8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/genericContextualTypes1.d.ts.map @@ -0,0 +1,51 @@ +//// [tests/cases/conformance/types/typeRelationships/typeInference/genericContextualTypes1.ts] //// + + + +/// [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,CA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ih4ID0+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..5eb064b930ca4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/indexSignatures1.d.ts.map @@ -0,0 +1,210 @@ +//// [tests/cases/conformance/types/members/indexSignatures1.ts] //// + + + +/// [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,G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yBmcm9tICM0NTc3MgoKdHlwZSBJZCA9IHN0cmluZyAmIHsgX190YWc6ICdpZCAnfTsKdHlwZSBSZWMxID0geyBba2V5OiBJZF06IG51bWJlciB9Owp0eXBlIFJlYzIgPSBSZWNvcmQ8SWQsIG51bWJlcj47Cgp0eXBlIEsxID0ga2V5b2YgUmVjMTsgIC8vIElkCnR5cGUgSzIgPSBrZXlvZiBSZWMyOyAgLy8gSWQK + 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..1d5bbf4c80991 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/intraExpressionInferences.d.ts.map @@ -0,0 +1,162 @@ +//// [tests/cases/conformance/types/typeRelationships/typeInference/intraExpressionInferences.ts] //// + + + +/// [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,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Y29uc3QgZGlzdGFudFJlczogbnVtYmVyID0gZGlzdGFudCh7CiAgZm9vOiB7CiAgICBiYXI6IHsKICAgICAgYmF6OiB7CiAgICAgICAgcHJvZHVjZXI6IChhcmcpID0+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/isomorphicMappedTypeInference.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isomorphicMappedTypeInference.d.ts.map new file mode 100644 index 0000000000000..843b603cc66ca --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isomorphicMappedTypeInference.d.ts.map @@ -0,0 +1,120 @@ +//// [tests/cases/conformance/types/mapped/isomorphicMappedTypeInference.ts] //// + + + +/// [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,C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bzogeyB2YWx1ZTogNDJ9ICwgYmFyOiB7IHZhbHVlOiAiaGVsbG8iIH0gfSk7CmxldCB4MzogewogICAgZm9vOiBudW1iZXI7CiAgICBiYXI6IHN0cmluZzsKfSA9IGYyMyh7IGZvbzogNDIsIGJhcjogImhlbGxvIiB9KTsKbGV0IHg0OiB7CiAgICBmb286IG51bWJlcjsKICAgIGJhcjogc3RyaW5nOwp9ICYgewogICAgZm9vOiBudW1iZXI7CiAgICBiYXI6IHN0cmluZzsKfSA9IGYyNCh7IGZvbzogNDIsIGJhcjogImhlbGxvIiB9KTsKCi8vIFJlcHJvIGZyb20gIzI5NzY1CgpmdW5jdGlvbiBnZXRQcm9wczxULCBLIGV4dGVuZHMga2V5b2YgVD4ob2JqOiBULCBsaXN0OiBLW10pOiBQaWNrPFQsIEs+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

{ + 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 index 6f6fd1c44c684..1c3fe0024b07e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/lateBoundFunctionMemberAssignmentDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/lateBoundFunctionMemberAssignmentDeclarations.d.ts @@ -16,7 +16,6 @@ const x: string = foo[_private]; //// [index.d.ts] export declare function foo(): void; //# sourceMappingURL=index.d.ts.map - /// [Errors] //// index.ts(1,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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..4d2e7e53e70c1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/leaveOptionalParameterAsWritten.d.ts.map @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/declarationEmit/leaveOptionalParameterAsWritten.ts] //// + + + +/// [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 index 03929c76ff0bf..cd15296a7944f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts @@ -38,7 +38,6 @@ export interface Thing {} // not exported in export map, inaccessible under new //// [index.d.ts] export declare const a: invalid; //# sourceMappingURL=index.d.ts.map - /// [Errors] //// index.ts(1,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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..d7bc38500205e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeConstraints2.d.ts.map @@ -0,0 +1,53 @@ +//// [tests/cases/conformance/types/mapped/mappedTypeConstraints2.ts] //// + + + +/// [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

{ + 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/leaveOptionalParameterAsWritten.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/leaveOptionalParameterAsWritten.d.ts.map new file mode 100644 index 0000000000000..f5d8357d66cba --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/leaveOptionalParameterAsWritten.d.ts.map @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/declarationEmit/leaveOptionalParameterAsWritten.ts] //// + + + +/// [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/mappedTypeConstraints2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeConstraints2.d.ts.map new file mode 100644 index 0000000000000..f559570ba7fa5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeConstraints2.d.ts.map @@ -0,0 +1,53 @@ +//// [tests/cases/conformance/types/mapped/mappedTypeConstraints2.ts] //// + + + +/// [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,iBAA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IE51bWVyaWNCb3VuZHNPZjxUPik6IGJvb2xlYW4gewogICAgZm9yIChjb25zdCBba2V5LCB2YWxdIG9mIE9iamVjdC5lbnRyaWVzKG9iaikpIHsKICAgICAgICBjb25zdCBib3VuZHNGb3JLZXkgPSBib3VuZHNba2V5IGFzIGtleW9mIE51bWVyaWNCb3VuZHNPZjxUPl07CiAgICAgICAgaWYgKGJvdW5kc0ZvcktleSkgewogICAgICAgICAgICBjb25zdCB7IG1pbiwgbWF4IH0gPSBib3VuZHNGb3JLZXk7CiAgICAgICAgICAgIGlmIChtaW4gPiB2YWwgfHwgbWF4IDwgdmFsKSByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIHRydWU7Cn0KCi8vIHJlcHJvIGZyb20gIzUwMDMwCgp0eXBlIE9iamVjdFdpdGhVbmRlcnNjb3JlZEtleXM8SyBleHRlbmRzIHN0cmluZz4gPSB7CiAgICBbayBpbiBLIGFzIGBfJHtrfWBdOiB0cnVlOwp9OwoKZnVuY3Rpb24gZ2VuZXJpY1Rlc3Q8SyBleHRlbmRzIHN0cmluZz4ob2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5czogT2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5czxLPiwga2V5OiBLKTogdm9pZCB7CiAgY29uc3Qgc2hvdWxkQmVUcnVlOiB0cnVlID0gb2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5c1tgXyR7a2V5fWBdOwp9Cg== + 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..8d80fa8723292 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mappedTypeGenericIndexedAccess.d.ts.map @@ -0,0 +1,53 @@ +//// [tests/cases/compiler/mappedTypeGenericIndexedAccess.ts] //// + + + +/// [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,CAAC;;IAM7C,QAAQ,CAAC,CAAC,SAAS,MAAM,KAAK,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI;CAMlE;AAID,KAAK,QAAQ,GAAG;IACZ,CAAC,CAAC,CAAC,EAAE;QAAE,GAAG,EAAE,KAAK,CAAC;KAAE,CAAC;IACrB,CAAC,CAAC,CAAC,EAAE;QAAE,CAAC,EAAE,GAAG,CAAC;KAAE,CAAC;CACpB,CAAC;AAEF,KAAK,CAAC,CAAC,CAAC,SAAS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gICAgICAgfQogICAgICAgIHRoaXMuZW50cmllc1tuYW1lXT8ucHVzaChlbnRyeSk7CiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzQ5MzM4Cgp0eXBlIFR5cGVzTWFwID0gewogICAgWzBdOiB7IGZvbzogJ2Jhcic7IH07CiAgICBbMV06IHsgYTogJ2InOyB9Owp9OwoKdHlwZSBQPFQgZXh0ZW5kcyBrZXlvZiBUeXBlc01hcD4gPSB7IHQ6IFQ7IH0gJiBUeXBlc01hcFtUXTsKCnR5cGUgVHlwZUhhbmRsZXJzID0gewogICAgW1QgaW4ga2V5b2YgVHlwZXNNYXBdPzogKHA6IFA8VD4pID0+IHZvaWQ7Cn07Cgpjb25zdCB0eXBlSGFuZGxlcnM6IFR5cGVIYW5kbGVycyA9IHsKICAgIFswXTogKHApID0+IGNvbnNvbGUubG9nKHAuZm9vKSwKICAgIFsxXTogKHApID0+IGNvbnNvbGUubG9nKHAuYSksCn07Cgpjb25zdCBvblNvbWVFdmVudCA9IDxUIGV4dGVuZHMga2V5b2YgVHlwZXNNYXA+KHA6IFA8VD4pOiB2b2lkIHwgdW5kZWZpbmVkID0+CiAgICB0eXBlSGFuZGxlcnNbcC50XT8uKHApOwo= + 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..0f1edb41066d8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/mixinClassesAnnotated.d.ts.map @@ -0,0 +1,49 @@ +//// [tests/cases/conformance/classes/mixinClassesAnnotated.ts] //// + + + +/// [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,MAA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3VwZXIoLi4uYXJncyk7CiAgICAgICAgICAgIHRoaXMuX3RhZyA9ICJoZWxsbyI7CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIEM7Cn0KCmNvbnN0IFRoaW5nMTogQ29uc3RydWN0b3I8VGFnZ2VkPiAmIHR5cGVvZiBEZXJpdmVkID0gVGFnZ2VkKERlcml2ZWQpOwpjb25zdCBUaGluZzI6IENvbnN0cnVjdG9yPFRhZ2dlZD4gJiBDb25zdHJ1Y3RvcjxQcmludGFibGU+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..cc1c1eaa2c170 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/moduleDeclarationExportStarShadowingGlobalIsNameable.d.ts.map @@ -0,0 +1,53 @@ +//// [tests/cases/compiler/moduleDeclarationExportStarShadowingGlobalIsNameable.ts] //// + + + +/// [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/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..576c0d24c19ad --- /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] //// + +//// [subfolder/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" +} +//// [subfolder/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..576c0d24c19ad --- /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] //// + +//// [subfolder/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" +} +//// [subfolder/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/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..23f680fa195a7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesForbidenSyntax(module=node16).d.ts.map @@ -0,0 +1,78 @@ +//// [tests/cases/conformance/node/nodeModulesForbidenSyntax.ts] //// + + + +/// [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..23f680fa195a7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModulesForbidenSyntax(module=nodenext).d.ts.map @@ -0,0 +1,78 @@ +//// [tests/cases/conformance/node/nodeModulesForbidenSyntax.ts] //// + + + +/// [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..432fa0f6ebde5 --- /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] //// + +//// [subfolder/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" +} +//// [subfolder/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..432fa0f6ebde5 --- /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] //// + +//// [subfolder/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" +} +//// [subfolder/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..1880391c48a8b --- /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); + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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..1880391c48a8b --- /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); + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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..8df838d8de22e --- /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] //// + +//// [subfolder/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" +} +//// [subfolder/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..8df838d8de22e --- /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] //// + +//// [subfolder/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" +} +//// [subfolder/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..049bc187035f9 --- /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] //// + +//// [subfolder/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" +} +//// [subfolder/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..049bc187035f9 --- /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] //// + +//// [subfolder/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" +} +//// [subfolder/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..1e38832bba5e5 --- /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); + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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..1e38832bba5e5 --- /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); + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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/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 b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalMethods.d.ts new file mode 100644 index 0000000000000..5b6488525800e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalMethods.d.ts @@ -0,0 +1,93 @@ +//// [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 \ No newline at end of file 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..a69a2ae1c3f7b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalProperties01.d.ts.map @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/types/typeRelationships/comparable/optionalProperties01.ts] //// + + + +/// [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,KAAgC,CAAC;AAC3C,QAAA,MAAM,IAAI,KAAiD,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIEZvbyB7DQogICAgcmVxdWlyZWQxOiBzdHJpbmc7DQogICAgcmVxdWlyZWQyOiBzdHJpbmc7DQogICAgb3B0aW9uYWw/OiBzdHJpbmc7DQp9DQpkZWNsYXJlIGNvbnN0IGZvbzE6IEZvbzsNCmRlY2xhcmUgY29uc3QgZm9vMjogRm9vOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9b3B0aW9uYWxQcm9wZXJ0aWVzMDEuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uYWxQcm9wZXJ0aWVzMDEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIm9wdGlvbmFsUHJvcGVydGllczAxLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLFVBQVUsR0FBRztJQUNYLFNBQVMsRUFBRSxNQUFNLENBQUM7SUFDbEIsU0FBUyxFQUFFLE1BQU0sQ0FBQztJQUNsQixRQUFRLENBQUMsRUFBRSxNQUFNLENBQUM7Q0FDbkI7QUFFRCxRQUFBLE1BQU0sSUFBSSxLQUFnQyxDQUFDO0FBQzNDLFFBQUEsTUFBTSxJQUFJLEtBQWlELENBQUMifQ==,aW50ZXJmYWNlIEZvbyB7CiAgcmVxdWlyZWQxOiBzdHJpbmc7CiAgcmVxdWlyZWQyOiBzdHJpbmc7CiAgb3B0aW9uYWw/OiBzdHJpbmc7Cn0KCmNvbnN0IGZvbzEgPSB7IHJlcXVpcmVkMTogImhlbGxvIiB9IGFzIEZvbzsKY29uc3QgZm9vMiA9IHsgcmVxdWlyZWQxOiAiaGVsbG8iLCBvcHRpb25hbDogImJhciIgfSBhcyBGb287Cg== + 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..4ce986eea8c5b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parameterDestructuringObjectLiteral.d.ts.map @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/parameterDestructuringObjectLiteral.ts] //// + + + +/// [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/paramterDestrcuturingDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/paramterDestrcuturingDeclaration.d.ts new file mode 100644 index 0000000000000..130d6b3ab5a1f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/paramterDestrcuturingDeclaration.d.ts @@ -0,0 +1,47 @@ +//// [tests/cases/compiler/paramterDestrcuturingDeclaration.ts] //// + +//// [paramterDestrcuturingDeclaration.ts] +interface C { + ({p: name}: { + p: any; + }): any; + new ({p: boolean}: { + p: any; + }): any; +} + + +/// [Declarations] //// + + + +//// [paramterDestrcuturingDeclaration.d.ts] +interface C { + ({ p }: { + p: any; + }): any; + new ({ p }: { + p: any; + }): any; +} +//# sourceMappingURL=paramterDestrcuturingDeclaration.d.ts.map +/// [Errors] //// + +paramterDestrcuturingDeclaration.ts(2,10): error TS2842: 'name' is an unused renaming of 'p'. Did you intend to use it as a type annotation? +paramterDestrcuturingDeclaration.ts(5,14): error TS2842: 'boolean' is an unused renaming of 'p'. Did you intend to use it as a type annotation? + + +==== paramterDestrcuturingDeclaration.ts (2 errors) ==== + interface C { + ({p: name}: { + ~~~~ +!!! error TS2842: 'name' is an unused renaming of 'p'. Did you intend to use it as a type annotation? + p: any; + }): any; + new ({p: boolean}: { + ~~~~~~~ +!!! error TS2842: 'boolean' is an unused renaming of 'p'. Did you intend to use it as a type annotation? + p: any; + }): any; + } + \ No newline at end of file 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..7a121b6456114 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/parenthesisDoesNotBlockAliasSymbolCreation.d.ts.map @@ -0,0 +1,39 @@ +//// [tests/cases/compiler/parenthesisDoesNotBlockAliasSymbolCreation.ts] //// + + + +/// [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,MAAM;EAAG,CAAC;AAC7C,eAAO,MAAM,EAAE;OAAiB,MAAM;oBAAqB,CAAC;AAC5D,eAAO,MAAM,EAAE;OAAiB,MAAM;qBAAsB,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IHR5cGUgSW52YWxpZEtleXM8SyBleHRlbmRzIHN0cmluZy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EE8eyB4IDogbnVtYmVyIH0+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..94085ba64c0a8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/reexportWrittenCorrectlyInDeclaration.d.ts.map @@ -0,0 +1,53 @@ +//// [tests/cases/compiler/reexportWrittenCorrectlyInDeclaration.ts] //// + + + +/// [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..657238facdd09 --- /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 }: O) => any; +type F3 = ({ a, b, c }: O) => any; +type F4 = ({ a }: O) => any; +type F5 = ({ a, b, c }: O) => any; +type F6 = ({ a: string }: { + a: any; +}) => typeof string; +type F7 = ({ a, 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 }: O) => any; +type G3 = new ({ a, b, c }: O) => any; +type G4 = new ({ a }: O) => any; +type G5 = new ({ a, b, c }: O) => any; +type G6 = new ({ a: string }: { + a: any; +}) => typeof string; +type G7 = new ({ a, 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 }: { + a: any; + }): any; + (arg: number): any; + ({ a }: { + a: any; + }): any; + new (arg: number): any; + new ({ a }: { + a: any; + }): any; +} +declare function f1({ a }: 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 }: 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/stringLiteralObjectLiteralDeclaration1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/stringLiteralObjectLiteralDeclaration1.d.ts.map new file mode 100644 index 0000000000000..1c44dc328529d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/stringLiteralObjectLiteralDeclaration1.d.ts.map @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/stringLiteralObjectLiteralDeclaration1.ts] //// + + + +/// [Declarations] //// + + + +//// [stringLiteralObjectLiteralDeclaration1.d.ts] +declare namespace m1 { + var n: { + 'foo bar': number; + }; +} +//# sourceMappingURL=stringLiteralObjectLiteralDeclaration1.d.ts.map + +/// [Declarations Maps] //// + + +//// [stringLiteralObjectLiteralDeclaration1.d.ts.map] +{"version":3,"file":"stringLiteralObjectLiteralDeclaration1.d.ts","sourceRoot":"","sources":["stringLiteralObjectLiteralDeclaration1.ts"],"names":[],"mappings":"AAAA,kBAAO,EAAE,CAAC;IACD,IAAI,CAAC;;KAAmB,CAAC;CACjC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBuYW1lc3BhY2UgbTEgew0KICAgIHZhciBuOiB7DQogICAgICAgICdmb28gYmFyJzogbnVtYmVyOw0KICAgIH07DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1zdHJpbmdMaXRlcmFsT2JqZWN0TGl0ZXJhbERlY2xhcmF0aW9uMS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaW5nTGl0ZXJhbE9iamVjdExpdGVyYWxEZWNsYXJhdGlvbjEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInN0cmluZ0xpdGVyYWxPYmplY3RMaXRlcmFsRGVjbGFyYXRpb24xLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGtCQUFPLEVBQUUsQ0FBQztJQUNELElBQUksQ0FBQzs7S0FBbUIsQ0FBQztDQUNqQyJ9,bW9kdWxlIG0xIHsKICBleHBvcnQgdmFyIG4gPSB7ICdmb28gYmFyJzogNCB9Owp9Cg== + 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..8f1011862e5e8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit8.d.ts.map @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit8.ts] //// + + + +/// [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..5af0c37b94b45 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit9.d.ts.map @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit9.ts] //// + + + +/// [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/symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map new file mode 100644 index 0000000000000..721f09c8b9cdb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map @@ -0,0 +1,28 @@ +//// [tests/cases/compiler/symbolObserverMismatchingPolyfillsWorkTogether.ts] //// + + + +/// [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/templateLiteralTypes2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralTypes2.d.ts.map new file mode 100644 index 0000000000000..eb9c96f44049d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralTypes2.d.ts.map @@ -0,0 +1,51 @@ +//// [tests/cases/conformance/types/literal/templateLiteralTypes2.ts] //// + + + +/// [Declarations] //// + + + +//// [templateLiteralTypes2.d.ts] +declare function ft1(s: string, n: number, u: 'foo' | 'bar' | 'baz', t: T): void; +declare function ft2(s: string): string; +declare function ft10(s: string): void; +declare function ft11(s: string, cond: boolean): void; +declare function ft12(s: string): void; +declare function widening(x: T): T; +declare function nonWidening(x: T): T; +declare function ft13(s: string, cond: boolean): void; +type T0 = string | `${number}px`; +declare function ft14(t: `foo${number}`): void; +declare function g1(x: T): T; +declare function g2(x: T): T; +declare function ft20(s: string): void; +declare function takesLiteral(literal: T): T extends `foo.bar.${infer R}` ? R : unknown; +declare const t1: "baz"; +declare const id2 = "foo.bar.baz"; +declare const t2: "baz"; +declare const someString: string; +declare const t3: string; +declare const id4: string; +declare const t4: unknown; +declare const someUnion: 'abc' | 'def' | 'ghi'; +declare const t5: "abc" | "def" | "ghi"; +declare const pixelValue: number; +type PixelValueType = `${number}px`; +declare const pixelString: PixelValueType; +declare const pixelStringWithTemplate: PixelValueType; +declare function getCardTitle(title: string): `test-${string}`; +declare const interpolatedStyle: { + rotate: number; +}; +declare function C2(transform: "-moz-initial" | (string & {})): number; +//# sourceMappingURL=templateLiteralTypes2.d.ts.map + +/// [Declarations Maps] //// + + +//// [templateLiteralTypes2.d.ts.map] +{"version":3,"file":"templateLiteralTypes2.d.ts","sourceRoot":"","sources":["templateLiteralTypes2.ts"],"names":[],"mappings":"AAAA,iBAAS,GAAG,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,CASzF;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE9B;AAED,iBAAS,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAS7B;AAED,iBAAS,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAW5C;AAED,iBAAS,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAW7B;AAED,OAAO,UAAU,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AACtC,OAAO,UAAU,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAE1E,iBAAS,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAK5C;AAED,KAAK,EAAE,GAAG,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC;AAEjC,iBAAS,IAAI,CAAC,CAAC,EAAE,MAAM,MAAM,EAAE,GAAG,IAAI,CAMrC;AAED,OAAO,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAChC,OAAO,UAAU,EAAE,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAE/C,iBAAS,IAAI,CAA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BpeGVsVmFsdWVUeXBlID0gYCR7bnVtYmVyfXB4YDsKCmNvbnN0IHBpeGVsU3RyaW5nOiBQaXhlbFZhbHVlVHlwZSA9IGAyMnB4YDsKCmNvbnN0IHBpeGVsU3RyaW5nV2l0aFRlbXBsYXRlOiBQaXhlbFZhbHVlVHlwZSA9IGAke3BpeGVsVmFsdWV9cHhgOwoKLy8gUmVwcm8gZnJvbSAjNDMxNDMKCmZ1bmN0aW9uIGdldENhcmRUaXRsZSh0aXRsZTogc3RyaW5nKTogYHRlc3QtJHtzdHJpbmd9YCB7CiAgICByZXR1cm4gYHRlc3QtJHt0aXRsZX1gOwp9CgovLyBSZXBybyBmcm9tICM0MzQyNAoKY29uc3QgaW50ZXJwb2xhdGVkU3R5bGUgPSB7IHJvdGF0ZTogMTIgfTsKZnVuY3Rpb24gQzIodHJhbnNmb3JtOiAiLW1vei1pbml0aWFsIiB8IChzdHJpbmcgJiB7fSkpOiBudW1iZXIgeyByZXR1cm4gMTI7IH0KQzIoYHJvdGF0ZSgke2ludGVycG9sYXRlZFN0eWxlLnJvdGF0ZX1kaWcpYCk7Cg== + 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..59a7f6b0471d1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralsInTypes.d.ts.map @@ -0,0 +1,20 @@ +//// [tests/cases/compiler/templateLiteralsInTypes.ts] //// + + + +/// [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/typeGuardFunctionOfFormThis.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeGuardFunctionOfFormThis.d.ts.map new file mode 100644 index 0000000000000..5cfc5413a4447 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeGuardFunctionOfFormThis.d.ts.map @@ -0,0 +1,75 @@ +//// [tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThis.ts] //// + + + +/// [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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b2xsb3dlciBleHRlbmRzIE1pbWljR3VhcmQgewogICAgZm9sbG93KCk6IHZvaWQge30KfQoKbGV0IG1pbWljOiBNaW1pY0d1YXJkID0gbmV3IE1pbWljR3VhcmQoKTsKCmEuaXNMZWFkZXIgPSBtaW1pYy5pc0xlYWRlcjsKYS5pc0ZvbGxvd2VyID0gbWltaWMuaXNGb2xsb3dlcjsKCmlmIChtaW1pYy5pc0ZvbGxvd2VyKCkpIHsKICAgIG1pbWljLmZvbGxvdygpOwogICAgbWltaWMuaXNGb2xsb3dlciA9IGEuaXNGb2xsb3dlcjsKfQoKCmludGVyZmFjZSBNaW1pY0d1YXJkSW50ZXJmYWNlIHsKICAgIGlzTGVhZGVyKCk6IHRoaXMgaXMgTGVhZEd1YXJkOwogICAgaXNGb2xsb3dlcigpOiB0aGlzIGlzIEZvbGxvd2VyR3VhcmQ7Cn0K + 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..0d5b6c55508a1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeofImportTypeOnlyExport.d.ts.map @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/declarationEmit/typeofImportTypeOnlyExport.ts] //// + + + +/// [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,ZGVjbGFyZ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XJlY3RpdmU7Cn0gPSBkaXJlY3RpdmUoQ2xhc3NNYXBEaXJlY3RpdmUpOwo= + 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/uniqueSymbolsDeclarationsErrors.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/uniqueSymbolsDeclarationsErrors.d.ts.map new file mode 100644 index 0000000000000..d7ef6a2631ab5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/uniqueSymbolsDeclarationsErrors.d.ts.map @@ -0,0 +1,65 @@ +//// [tests/cases/conformance/types/uniqueSymbol/uniqueSymbolsDeclarationsErrors.ts] //// + + + +/// [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 + +/// [Declarations Maps] //// + + +//// [uniqueSymbolsDeclarationsErrors.d.ts.map] +{"version":3,"file":"uniqueSymbolsDeclarationsErrors.d.ts","sourceRoot":"","sources":["uniqueSymbolsDeclarationsErrors.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,MAAM,CAAC;AAC/B,UAAU,CAAC;IAAG,QAAQ,CAAC,YAAY,EAAE,OAAO,MAAM,CAAC;CAAE;AAIrD,eAAO,MAAM,GAAG;eACD,QAAQ,GAAG,QAAQ;eAGnB,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC;CAGnD,CAAC;AAEF,eAAO,MAAM,eAAe;;mBACb,QAAQ,GAAG,QAAQ;mBAGnB,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC;;CAGnD,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,GAAG,EAAE;IAAE,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CAAE,GAAG;IACxE,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC7B,CAEA;AAED,MAAM,WAAW,mCAAmC;IAChD,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;CACZ;AAED,MAAM,WAAW,gCAAgC;IAC7C,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC;CACd;AAED,MAAM,MAAM,qCAAqC,GAAG;IAChD,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;CACZ,CAAA;AAED,MAAM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gpOiB2b2lkIHt9Cn0KCmV4cG9ydCBjbGFzcyBDbGFzc1dpdGhQcml2YXRlTmFtZWRBY2Nlc3NvcnMgewogICAgZ2V0IFtzXSgpOiBhbnkgeyByZXR1cm4gdW5kZWZpbmVkOyB9CiAgICBzZXQgW3NdKHY6IGFueSkgeyB9CiAgICBzdGF0aWMgZ2V0IFtzXSgpOiBhbnkgeyByZXR1cm4gdW5kZWZpbmVkOyB9CiAgICBzdGF0aWMgc2V0IFtzXSh2OiBhbnkpIHsgfQp9 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/vardecl.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/vardecl.d.ts.map new file mode 100644 index 0000000000000..7c3b1ee09da8d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/vardecl.d.ts.map @@ -0,0 +1,96 @@ +//// [tests/cases/compiler/vardecl.ts] //// + + + +/// [Declarations] //// + + + +//// [vardecl.d.ts] +declare var simpleVar: any; +declare var anotherVar: any; +declare var varWithSimpleType: number; +declare var varWithArrayType: number[]; +declare var varWithInitialValue: number; +declare var withComplicatedValue: { + x: number; + y: number; + desc: string; +}; +declare var declaredVar: any; +declare var declareVar2: any; +declare var declaredVar3: any; +declare var deckareVarWithType: number; +declare var arrayVar: string[]; +declare var complicatedArrayVar: { + x: number; + y: string; +}[]; +declare var n1: { + [s: string]: number; +}; +declare var c: { + new?(): any; +}; +declare var d: { + foo?(): { + x: number; + }; +}; +declare var d3: { + foo(): { + x: number; + y: number; + }; +}; +declare var d2: { + foo(): { + x: number; + }; +}; +declare var n2: { + (): void; +}; +declare var n4: { + (): void; +}[]; +declare var d4: { + foo(n: string, x: { + x: number; + y: number; + }): { + x: number; + y: number; + }; +}; +declare namespace m2 { + var a: any, b2: number, b: any; + class C2 { + b: any; + constructor(b: any); + } + var mE: any; + var d1E: any, d2E: any; + var b2E: any; + var v1E: any; +} +declare var a22: any, b22: number, c22: number; +declare var nn: any; +declare var da1: any, da2: any; +declare var normalVar: any; +declare var dv1: any; +declare var xl: any; +declare var x: any; +declare var z: any; +declare function foo(a2: any): void; +declare var b: number; +//# sourceMappingURL=vardecl.d.ts.map + +/// [Declarations Maps] //// + + +//// [vardecl.d.ts.map] +{"version":3,"file":"vardecl.d.ts","sourceRoot":"","sources":["vardecl.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,SAAS,EAAE,GAAG,CAAC;AAEnB,QAAA,IAAI,UAAU,EAAE,GAAG,CAAC;AACpB,QAAA,IAAI,iBAAiB,EAAE,MAAM,CAAC;AAC9B,QAAA,IAAI,gBAAgB,EAAE,MAAM,EAAE,CAAC;AAE/B,QAAA,IAAI,mBAAmB,QAAK,CAAC;AAE7B,QAAA,IAAI,oBAAoB;;;;CAAqC,CAAC;AAE9D,OAAO,CAAC,IAAI,WAAW,EAAE,GAAG,CAAC;AAC7B,OAAO,CAAC,IAAI,WAAW,EAAE,GAAG,CAAA;AAE5B,OAAO,CAAC,IAAI,YAAY,EAAE,GAAG,CAAC;AAC9B,OAAO,CAAC,IAAI,kBAAkB,EAAE,MAAM,CAAC;AAEvC,QAAA,IAAI,QAAQ,EAAE,MAAM,EAAe,CAAC;AAEpC,QAAA,IAAI,mBAAmB,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;CAAE,EAAE,CAAE;AAGtD,QAAA,IAAI,EAAE,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAAE,CAAC;AAEjC,QAAA,IAAI,CAAC,EAAG;IACA,GAAG,CAAC,IAAK,GAAG,CAAC;CAChB,CAAA;AAEL,QAAA,IAAI,CAAC,EAAE;IACH,GAAG,CAAC,IAAK;QACL,CAAC,EAAE,MAAM,CAAC;KACb,CAAC;CACL,CAAA;AAED,QAAA,IAAI,EAAE,EAAE;IACJ,GAAG,IAAI;QACH,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC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iKSB7CiAgICAgICAgfQogICAgfQoKICAgIGV4cG9ydCBjbGFzcyBDMiB7CiAgICAgICAgY29uc3RydWN0b3IgKHB1YmxpYyBiOiBhbnkpIHsKICAgICAgICB9CiAgICB9CiAgICB2YXIgbTsKICAgIGRlY2xhcmUgdmFyIGQxLCBkMjsKICAgIHZhciBiMjM7CiAgICBkZWNsYXJlIHZhciB2MTsKICAgIGV4cG9ydCB2YXIgbUU6IGFueTsKICAgIGV4cG9ydCBkZWNsYXJlIHZhciBkMUU6IGFueSwgZDJFOiBhbnk7CiAgICBleHBvcnQgdmFyIGIyRTogYW55OwogICAgZXhwb3J0IGRlY2xhcmUgdmFyIHYxRTogYW55Owp9Cgp2YXIgYTIyOiBhbnksIGIyMiA9IDEwLCBjMjIgPSAzMDsKdmFyIG5uOiBhbnk7CgpkZWNsYXJlIHZhciBkYTE6IGFueSwgZGEyOiBhbnk7CnZhciBub3JtYWxWYXI6IGFueTsKZGVjbGFyZSB2YXIgZHYxOiBhbnk7CnZhciB4bDogYW55Owp2YXIgeDogYW55Owp2YXIgejogYW55OwoKZnVuY3Rpb24gZm9vKGEyOiBhbnkpOiB2b2lkIHsKICAgIHZhciBhID0gMTA7Cn0KCmZvciAodmFyIGkgPSAwLCBqID0gMDsgaSA8IDEwOyBpKyspIHsKICAgIGorKzsKfQoKCmZvciAodmFyIGsgPSAwOyBrIDwgMzA7IGsrKykgewogICAgaysrOwp9CnZhciBiID0gMTA7Cg== + 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..683c2254b3abf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/variadicTuples1.d.ts.map @@ -0,0 +1,208 @@ +//// [tests/cases/conformance/types/tuple/variadicTuples1.ts] //// + + + +/// [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,CAAC,SAAS,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,MAAM,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC;AAIlE,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAClC,KAAK,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC;AACnB,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC3B,KAAK,GAAG,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;AACzB,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAC7C,KAAK,GAAG,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dID0gW10sIFUgPSB2b2lkPihtZXRob2Q6ICguLi5hcmdzOiBbLi4uVCwgb2JqZWN0XSkgPT4gVSk6ICguLi5hcmdzXzA6IFQpID0+IFUgewogICAgcmV0dXJuICguLi5hcmdzOiBbLi4uVF0pID0+IG1ldGhvZCguLi5hcmdzLCB7fSk7Cn0KCmNhbGxBcGkoZ2V0VXNlcik7CmNhbGxBcGkoZ2V0T3JnVXNlcik7CgovLyBSZXBybyBmcm9tICM0MDIzNQoKdHlwZSBOdW1iZXJzID0gbnVtYmVyW107CnR5cGUgVW5ib3VuZGVkID0gWy4uLk51bWJlcnMsIGJvb2xlYW5dOwpjb25zdCBkYXRhOiBVbmJvdW5kZWQgPSBbZmFsc2UsIGZhbHNlXTsgIC8vIEVycm9yCgp0eXBlIFUxID0gW3N0cmluZywgLi4uTnVtYmVycywgYm9vbGVhbl07CnR5cGUgVTIgPSBbLi4uW3N0cmluZywgLi4uTnVtYmVyc10sIGJvb2xlYW5dOwp0eXBlIFUzID0gWy4uLltzdHJpbmcsIG51bWJlcl0sIGJvb2xlYW5dOwoKLy8gUmVwcm8gZnJvbSAjNTM1NjMKCnR5cGUgVG9TdHJpbmdMZW5ndGgxPFQgZXh0ZW5kcyBhbnlbXT4gPSBgJHtUWydsZW5ndGgnXX1gOwp0eXBlIFRvU3RyaW5nTGVuZ3RoMjxUIGV4dGVuZHMgYW55W10+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..e00e713fd50f4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/weakTypesAndLiterals01.d.ts.map @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/types/typeRelationships/comparable/weakTypesAndLiterals01.ts] //// + + + +/// [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,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"} + +//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBXZWFrVHlwZXMgPSB7DQogICAgb3B0aW9uYWw/OiB0cnVlOw0KfSB8IHsNCiAgICB0b0xvd2VyQ2FzZT8oKTogc3RyaW5nOw0KfSB8IHsNCiAgICB0b1VwcGVyQ2FzZT8oKTogc3RyaW5nOw0KICAgIG90aGVyT3B0aW9uYWxQcm9wPzogbnVtYmVyOw0KfTsNCnR5cGUgTGl0ZXJhbHNPcldlYWtUeXBlcyA9ICJBIiB8ICJCIiB8IFdlYWtUeXBlczsNCmRlY2xhcmUgbGV0IGFPckI6ICJBIiB8ICJCIjsNCmRlY2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GlmIChhcmcgPT09IGFPckIpIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgcmV0dXJuIGFyZzsKICAgIH0KfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/withExportDecl.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/withExportDecl.d.ts.map new file mode 100644 index 0000000000000..61ffe5a7e4992 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/withExportDecl.d.ts.map @@ -0,0 +1,44 @@ +//// [tests/cases/compiler/withExportDecl.ts] //// + + + +/// [Declarations] //// + + + +//// [withExportDecl.d.ts] +export declare var exportedSimpleVar: any; +export declare var exportedVarWithInitialValue: number; +export declare var exportedWithComplicatedValue: { + x: number; + y: number; + desc: string; +}; +export declare var exportedDeclaredVar: number; +export declare var exportedArrayVar: { + x: number; + y: string; +}[]; +export declare function exportedFunction(): { + x: string; + y: string; + n: number; +}; +export declare namespace m2 { + var a: number; +} +export declare namespace m3 { + function foo(): string; +} +export declare var eVar1: any, eVar2: number; +export declare var eVar3: number, eVar4: any, eVar5: any; +//# sourceMappingURL=withExportDecl.d.ts.map + +/// [Declarations Maps] //// + + +//// [withExportDecl.d.ts.map] +{"version":3,"file":"withExportDecl.d.ts","sourceRoot":"","sources":["withExportDecl.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,iBAAiB,EAAE,GAAG,CAAC;AAOlC,eAAO,IAAI,2BAA2B,QAAK,CAAC;AAG5C,eAAO,IAAI,4BAA4B;;;;CAAqC,CAAC;AAO7E,MAAM,CAAC,OAAO,CAAC,IAAI,mBAAmB,EAAE,MAAM,CAAC;AAI/C,eAAO,IAAI,gBAAgB,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;CAAE,EAAE,CAAE;AAW1D,wBAAgB,gBAAgB,IAAI;IAChC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,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AgIHg6ICJIZWxsbyIsCiAgICAgICAgeTogIndvcmQiLAogICAgICAgIG46IDIKICAgIH07Cn0KCmV4cG9ydCBmdW5jdGlvbiBleHBvcnRlZEZ1bmN0aW9uKCk6IHsKICAgIHg6IHN0cmluZzsKICAgIHk6IHN0cmluZzsKICAgIG46IG51bWJlcjsKfSB7CiAgICByZXR1cm4gc2ltcGxlRnVuY3Rpb24oKTsKfQoKbW9kdWxlIG0xIHsKICAgIGV4cG9ydCBmdW5jdGlvbiBmb28oKSB7CiAgICAgICAgcmV0dXJuICJIZWxsbyI7CiAgICB9Cn0KZXhwb3J0IGRlY2xhcmUgbW9kdWxlIG0yIHsKCiAgICBleHBvcnQgdmFyIGE6IG51bWJlcjsKfQoKCmV4cG9ydCBtb2R1bGUgbTMgewoKICAgIGV4cG9ydCBmdW5jdGlvbiBmb28oKTogc3RyaW5nIHsKICAgICAgICByZXR1cm4gbTEuZm9vKCk7CiAgICB9Cn0KCmV4cG9ydCB2YXIgZVZhcjE6IGFueSwgZVZhcjIgPSAxMDsKdmFyIGVWYXIyMjsKZXhwb3J0IHZhciBlVmFyMyA9IDEwLCBlVmFyNDogYW55LCBlVmFyNTogYW55Ow== + 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/ambientConstLiterals.ts b/tests/cases/compiler/ambientConstLiterals.ts index d42b8524998fd..f20217f27234e 100644 --- a/tests/cases/compiler/ambientConstLiterals.ts +++ b/tests/cases/compiler/ambientConstLiterals.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: TODO: Printing differences. Seems avoidable. function f(x: T): T { return x; 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/computedPropertiesNarrowed.ts b/tests/cases/compiler/computedPropertiesNarrowed.ts index 1166392067f2d..3e052b7ebb7f6 100644 --- a/tests/cases/compiler/computedPropertiesNarrowed.ts +++ b/tests/cases/compiler/computedPropertiesNarrowed.ts @@ -2,6 +2,7 @@ // @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; diff --git a/tests/cases/compiler/correlatedUnions.ts b/tests/cases/compiler/correlatedUnions.ts index 460ddf408a104..d498313e16ef3 100644 --- a/tests/cases/compiler/correlatedUnions.ts +++ b/tests/cases/compiler/correlatedUnions.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @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/declFileRegressionTests.ts b/tests/cases/compiler/declFileRegressionTests.ts index 4d19696bacfa2..9809ff9f3e87c 100644 --- a/tests/cases/compiler/declFileRegressionTests.ts +++ b/tests/cases/compiler/declFileRegressionTests.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned // 'null' not converted to 'any' in d.ts // function types not piped through correctly var n = { w: null, x: '', y: () => { }, z: 32 }; 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/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/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/declarationEmitDestructuringObjectLiteralPattern.ts b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts index 89e5b65a9d3b3..6161b4062d75b 100644 --- a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts +++ b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned var { } = { x: 5, y: "hello" }; var { x4 } = { x4: 5, y4: "hello" }; diff --git a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts index 6a65c92546504..4aab3f37628ef 100644 --- a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts +++ b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned var { } = { x: 5, y: "hello" }; var { x4 } = { x4: 5, y4: "hello" }; diff --git a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts index f700e68e39727..160f1528cbaf3 100644 --- a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts +++ b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned var { a: x11, b: { a: y11, b: { a: z11 }}} = { a: 1, b: { a: "hello", b: { a: true } } }; 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/declarationEmitExportAliasVisibiilityMarking.ts b/tests/cases/compiler/declarationEmitExportAliasVisibiilityMarking.ts index 666ea9c2eda11..1f5f43714083f 100644 --- a/tests/cases/compiler/declarationEmitExportAliasVisibiilityMarking.ts +++ b/tests/cases/compiler/declarationEmitExportAliasVisibiilityMarking.ts @@ -1,5 +1,6 @@ // @lib: es2015 // @declaration: true +// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned // @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/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts b/tests/cases/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts index 9009efda5f106..a07f71ccadd58 100644 --- a/tests/cases/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts +++ b/tests/cases/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts @@ -1,5 +1,6 @@ // @declaration: true // @isolatedDeclarationDiffReason: TSC adds import for augmentation, DTE can't know about the augmentation. +// @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/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/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/declarationEmitInferredDefaultExportType2.ts b/tests/cases/compiler/declarationEmitInferredDefaultExportType2.ts index 274996cbe1291..77dd225eb17c7 100644 --- a/tests/cases/compiler/declarationEmitInferredDefaultExportType2.ts +++ b/tests/cases/compiler/declarationEmitInferredDefaultExportType2.ts @@ -1,5 +1,6 @@ // @declaration: true // @module: commonjs +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // test.ts export = { 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/declarationEmitKeywordDestructuring.ts b/tests/cases/compiler/declarationEmitKeywordDestructuring.ts index 72015314fc609..0def5a3e37ade 100644 --- a/tests/cases/compiler/declarationEmitKeywordDestructuring.ts +++ b/tests/cases/compiler/declarationEmitKeywordDestructuring.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Aliases are preserved for binding patterns GH#55654 type P = { enum: boolean; 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/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..8e3b51facccb4 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: TODO File is not auto-fixed. Symbol is not imported. export declare const timestampSymbol: unique symbol; export declare const Timestamp: { diff --git a/tests/cases/compiler/declarationEmitNoNonRequiredParens.ts b/tests/cases/compiler/declarationEmitNoNonRequiredParens.ts index 020fd785c40d9..f4a4bd04623e1 100644 --- a/tests/cases/compiler/declarationEmitNoNonRequiredParens.ts +++ b/tests/cases/compiler/declarationEmitNoNonRequiredParens.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Printing differences export enum Test { A, B, C } diff --git a/tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts b/tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts index 6fce3256fa6a3..b7e0c80dcf195 100644 --- a/tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts +++ b/tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts @@ -1,6 +1,7 @@ // @strict: true // @declaration: true // @emitDeclarationOnly: true +// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned // 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..53cf3198bf746 100644 --- a/tests/cases/compiler/declarationEmitParameterProperty.ts +++ b/tests/cases/compiler/declarationEmitParameterProperty.ts @@ -1,5 +1,6 @@ // @strictNullChecks: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: TODO: Optional constructor properties. export class Foo { constructor(public bar?: string) { } diff --git a/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts b/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts index 4bb09d93c4486..3e495ac277938 100644 --- a/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts +++ b/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts @@ -3,6 +3,7 @@ // @baseUrl: . // @outDir: ./dist // @rootDir: ./src +// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned // @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..43ffd07596954 100644 --- a/tests/cases/compiler/declarationEmitPropertyNumericStringKey.ts +++ b/tests/cases/compiler/declarationEmitPropertyNumericStringKey.ts @@ -1,4 +1,5 @@ // @declaration: true +// @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..e30fc23bec3b0 100644 --- a/tests/cases/compiler/declarationEmitReadonlyComputedProperty.ts +++ b/tests/cases/compiler/declarationEmitReadonlyComputedProperty.ts @@ -1,5 +1,6 @@ // @declaration: true // @lib: es2015 +// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed. Symbol in computed property not imported. // @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/declarationEmitRetainsJsdocyComments.ts b/tests/cases/compiler/declarationEmitRetainsJsdocyComments.ts index 53901083758d0..d9f73bcdfe81c 100644 --- a/tests/cases/compiler/declarationEmitRetainsJsdocyComments.ts +++ b/tests/cases/compiler/declarationEmitRetainsJsdocyComments.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned /** * comment1 * @param p diff --git a/tests/cases/compiler/declarationEmitReusesLambdaParameterNodes.ts b/tests/cases/compiler/declarationEmitReusesLambdaParameterNodes.ts index 7c7058030f90f..9be88c2148608 100644 --- a/tests/cases/compiler/declarationEmitReusesLambdaParameterNodes.ts +++ b/tests/cases/compiler/declarationEmitReusesLambdaParameterNodes.ts @@ -1,6 +1,7 @@ // @strict: true // @declaration: true // @module: nodenext +// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned // @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..a3cbdaaf1e364 100644 --- a/tests/cases/compiler/declarationEmitShadowingInferNotRenamed.ts +++ b/tests/cases/compiler/declarationEmitShadowingInferNotRenamed.ts @@ -1,4 +1,5 @@ // @declaration: true +// @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..4366bb8afb530 100644 --- a/tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters1.ts +++ b/tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters1.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned 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..4a88bb617c7cc 100644 --- a/tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters2.ts +++ b/tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters2.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned 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..57dff247f1326 100644 --- a/tests/cases/compiler/declarationEmitTypeParameterNameShadowedInternally.ts +++ b/tests/cases/compiler/declarationEmitTypeParameterNameShadowedInternally.ts @@ -1,5 +1,6 @@ // @declaration: true // @skipLibCheck: false +// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned 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/declarationEmitWithDefaultAsComputedName.ts b/tests/cases/compiler/declarationEmitWithDefaultAsComputedName.ts index 868bad4484783..b63a5916cebdb 100644 --- a/tests/cases/compiler/declarationEmitWithDefaultAsComputedName.ts +++ b/tests/cases/compiler/declarationEmitWithDefaultAsComputedName.ts @@ -1,5 +1,6 @@ // @declaration: true // @target: es5 +// @isolatedDeclarationFixedDiffReason: Printing differences // @filename: other.ts type Experiment = { diff --git a/tests/cases/compiler/declarationEmitWithDefaultAsComputedName2.ts b/tests/cases/compiler/declarationEmitWithDefaultAsComputedName2.ts index 8feeaa2fa61dc..53dfef078b018 100644 --- a/tests/cases/compiler/declarationEmitWithDefaultAsComputedName2.ts +++ b/tests/cases/compiler/declarationEmitWithDefaultAsComputedName2.ts @@ -1,5 +1,6 @@ // @declaration: true // @target: es5 +// @isolatedDeclarationFixedDiffReason: Printing differences // @filename: other.ts type Experiment = { 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/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..f4d7cc6cbc889 100644 --- a/tests/cases/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts +++ b/tests/cases/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts @@ -1,5 +1,6 @@ // @declaration: true // @lib: es6 +// @isolatedDeclarationFixedDiffReason: TODO: Investigte. Fixer prints more levels of the 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/defaultParameterAddsUndefinedWithStrictNullChecks.ts b/tests/cases/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.ts index d2e167c83a350..553883de72e7f 100644 --- a/tests/cases/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.ts +++ b/tests/cases/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.ts @@ -1,5 +1,6 @@ // @strictNullChecks: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned 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..97b96e4c7796f 100644 --- a/tests/cases/compiler/dynamicNames.ts +++ b/tests/cases/compiler/dynamicNames.ts @@ -2,6 +2,7 @@ // @lib: esnext // @module: commonjs // @declaration: true +// @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..bba07ad709549 100644 --- a/tests/cases/compiler/emitMethodCalledNew.ts +++ b/tests/cases/compiler/emitMethodCalledNew.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: TODO: new is not correctly emitted. // https://github.com/microsoft/TypeScript/issues/55075 diff --git a/tests/cases/compiler/escapedReservedCompilerNamedIdentifier.ts b/tests/cases/compiler/escapedReservedCompilerNamedIdentifier.ts index da874acf73a7c..30334957cec08 100644 --- a/tests/cases/compiler/escapedReservedCompilerNamedIdentifier.ts +++ b/tests/cases/compiler/escapedReservedCompilerNamedIdentifier.ts @@ -1,4 +1,5 @@ //@declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // double underscores var __proto__ = 10; var o = { 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/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 45c2d3f8bc2f6..1c00e15e76a09 100644 --- a/tests/cases/compiler/giant.ts +++ b/tests/cases/compiler/giant.ts @@ -1,6 +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..e136abeb1b8e5 100644 --- a/tests/cases/compiler/hugeDeclarationOutputGetsTruncatedWithError.ts +++ b/tests/cases/compiler/hugeDeclarationOutputGetsTruncatedWithError.ts @@ -1,4 +1,5 @@ // @declaration: true +// @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/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/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..8c77a0c61773a 100644 --- a/tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts +++ b/tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts @@ -1,3 +1,4 @@ // @target: ES2020 // @declaration: true +// @isolatedDeclarationFixedDiffReason: Printing differences 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/objectLiteralComputedNameNoDeclarationError.ts b/tests/cases/compiler/objectLiteralComputedNameNoDeclarationError.ts index 93755f5e5d53d..64167341f3d20 100644 --- a/tests/cases/compiler/objectLiteralComputedNameNoDeclarationError.ts +++ b/tests/cases/compiler/objectLiteralComputedNameNoDeclarationError.ts @@ -1,4 +1,5 @@ // @declaration: true +// @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..82f8bbc66fca8 100644 --- a/tests/cases/compiler/parameterDestructuringObjectLiteral.ts +++ b/tests/cases/compiler/parameterDestructuringObjectLiteral.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned // Repro from #22644 diff --git a/tests/cases/compiler/paramterDestrcuturingDeclaration.ts b/tests/cases/compiler/paramterDestrcuturingDeclaration.ts index d05d6076bf066..ef5499af84426 100644 --- a/tests/cases/compiler/paramterDestrcuturingDeclaration.ts +++ b/tests/cases/compiler/paramterDestrcuturingDeclaration.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Aliases are preserved for binding patterns GH#55654 interface C { ({p: name}): any; diff --git a/tests/cases/compiler/parenthesisDoesNotBlockAliasSymbolCreation.ts b/tests/cases/compiler/parenthesisDoesNotBlockAliasSymbolCreation.ts index 0f8e993bbd6f6..5068ce2096eb2 100644 --- a/tests/cases/compiler/parenthesisDoesNotBlockAliasSymbolCreation.ts +++ b/tests/cases/compiler/parenthesisDoesNotBlockAliasSymbolCreation.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned export type InvalidKeys = { [P in K]? : never }; export type InvalidKeys2 = ( 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..7ea80d94de3f6 100644 --- a/tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts +++ b/tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts @@ -1,5 +1,6 @@ // @target: es2015 // @declaration: true +// @isolatedDeclarationFixedDiffReason: Aliases are preserved for binding patterns GH#55654 // GH#37454, GH#41044 type O = { a?: string; b: number; c: number; }; diff --git a/tests/cases/compiler/stringLiteralObjectLiteralDeclaration1.ts b/tests/cases/compiler/stringLiteralObjectLiteralDeclaration1.ts index 2d88a86f791ca..15d330358f4c1 100644 --- a/tests/cases/compiler/stringLiteralObjectLiteralDeclaration1.ts +++ b/tests/cases/compiler/stringLiteralObjectLiteralDeclaration1.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed module m1 { export var n = { 'foo bar': 4 }; } 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/vardecl.ts b/tests/cases/compiler/vardecl.ts index e5b96d6ef6d18..23c12c0e5227f 100644 --- a/tests/cases/compiler/vardecl.ts +++ b/tests/cases/compiler/vardecl.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed var simpleVar; var anotherVar: any; diff --git a/tests/cases/compiler/withExportDecl.ts b/tests/cases/compiler/withExportDecl.ts index f3c926ad7071a..c4510ecd23a7b 100644 --- a/tests/cases/compiler/withExportDecl.ts +++ b/tests/cases/compiler/withExportDecl.ts @@ -1,5 +1,6 @@ //@module: amd // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed var simpleVar; export var exportedSimpleVar; 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/controlFlow/controlFlowAliasing.ts b/tests/cases/conformance/controlFlow/controlFlowAliasing.ts index b32f80abae94f..f828111aab6a1 100644 --- a/tests/cases/conformance/controlFlow/controlFlowAliasing.ts +++ b/tests/cases/conformance/controlFlow/controlFlowAliasing.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // Narrowing by aliased conditional expressions 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 7b18bec96103b..181ce5f9d0ec8 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/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/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/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/destructuring/destructuringInFunctionType.ts b/tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts index 51333b1ca5333..af7905bd79691 100644 --- a/tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts +++ b/tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Aliases are preserved for binding patterns GH#55654 interface a { a } interface b { b } 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..690a0296afbdc 100644 --- a/tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions01.ts +++ b/tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions01.ts @@ -1,3 +1,4 @@ // @declaration: true +// @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..636b8b1c1c134 100644 --- a/tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions02.ts +++ b/tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions02.ts @@ -1,3 +1,4 @@ // @declaration: true +// @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/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/nodeModulesForbidenSyntax.ts b/tests/cases/conformance/node/nodeModulesForbidenSyntax.ts index ca9ff3cf41311..5c357dcc028ad 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: Trivial sourcemap diff // 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..963b6abc6f9d6 100644 --- a/tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts +++ b/tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts @@ -2,6 +2,7 @@ // @module: node16,nodenext // @declaration: true // @outDir: out +// @isolatedDeclarationFixedDiffReason: TODO: Import type has different module attributes // @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..40d836e2849d0 100644 --- a/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts +++ b/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts @@ -2,6 +2,7 @@ // @module: node16,nodenext // @declaration: true // @outDir: out +// @isolatedDeclarationFixedDiffReason: TODO: Import type has different module attributes // @filename: /node_modules/pkg/package.json { "name": "pkg", diff --git a/tests/cases/conformance/salsa/typeFromPropertyAssignment29.ts b/tests/cases/conformance/salsa/typeFromPropertyAssignment29.ts index dae7106da0616..72c2d5dd3fe52 100644 --- a/tests/cases/conformance/salsa/typeFromPropertyAssignment29.ts +++ b/tests/cases/conformance/salsa/typeFromPropertyAssignment29.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: Function declarations are not fixed +// @isolatedDeclarationFixedDiffReason: Function declarations and class expressions are not fixed function ExpandoDecl(n: number) { return n.toString(); } diff --git a/tests/cases/conformance/types/conditional/conditionalTypes1.ts b/tests/cases/conformance/types/conditional/conditionalTypes1.ts index 2e8690a228b45..750369e07df5c 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: TODO: Sourcemap seems miss-aligned 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/templateLiteralTypes2.ts b/tests/cases/conformance/types/literal/templateLiteralTypes2.ts index e353afa1d5deb..39e36003644ac 100644 --- a/tests/cases/conformance/types/literal/templateLiteralTypes2.ts +++ b/tests/cases/conformance/types/literal/templateLiteralTypes2.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed function ft1(s: string, n: number, u: 'foo' | 'bar' | 'baz', t: T) { const c1 = `abc${s}`; diff --git a/tests/cases/conformance/types/mapped/isomorphicMappedTypeInference.ts b/tests/cases/conformance/types/mapped/isomorphicMappedTypeInference.ts index 4cc2d08be6c6b..67078a1234722 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: TODO: Sourcemap is more detailed. (needs more validation) 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..920ffc84d5d38 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: TODO: Sourcemap seems miss-aligned // Symbol index signature checking @@ -10,7 +11,7 @@ function gg3(x: { [key: string]: string }, y: { [key: symbol]: string }, z: { [s 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 }) { diff --git a/tests/cases/conformance/types/namedTypes/optionalMethods.ts b/tests/cases/conformance/types/namedTypes/optionalMethods.ts index 932521425f9f6..1490ec66769b9 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: TODO: Optional constructor properties. interface Foo { a: number; diff --git a/tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts b/tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts index 2e1e2d4249987..5586511c3f782 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: TODO: Sourcemap seems miss-aligned 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..0567c676b7af3 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: TODO: Sourcemap seems miss-aligned 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..a289c3f4940f3 100644 --- a/tests/cases/conformance/types/tuple/named/namedTupleMembers.ts +++ b/tests/cases/conformance/types/tuple/named/namedTupleMembers.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationFixedDiffReason: Printing differences 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..0abc071263fc2 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: TODO: Sourcemap seems miss-aligned // 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..b16b0ae345703 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: TODO: Sourcemap seems miss-aligned 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..86c5fd927a660 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: TODO: Sourcemap seems miss-aligned // Repros from #47599 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; } From b7d062a105e493360f41c7476d920f828ecf56bd Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 23 Nov 2023 15:32:06 +0000 Subject: [PATCH 143/224] Reviewed miss matched maps. Signed-off-by: Titian Cernicova-Dragomir --- src/harness/harnessIO.ts | 2 +- .../diff/conditionalTypes1.d.ts.map.diff | 2 +- .../declFileRegressionTests.d.ts.map.diff | 2 +- ...ucturingObjectLiteralPattern.d.ts.map.diff | 2 +- ...cturingObjectLiteralPattern1.d.ts.map.diff | 2 +- ...cturingObjectLiteralPattern2.d.ts.map.diff | 2 +- ...ExpandoWithGenericConstraint.d.ts.map.diff | 16 ++++++ ...xportAliasVisibiilityMarking.d.ts.map.diff | 2 +- ...nEmitObjectLiteralAccessors1.d.ts.map.diff | 2 +- ...efersPathKindBasedOnBundling.d.ts.map.diff | 2 +- ...ionEmitRetainsJsdocyComments.d.ts.map.diff | 2 +- ...itReusesLambdaParameterNodes.d.ts.map.diff | 2 +- ...TypeAliasWithTypeParameters1.d.ts.map.diff | 2 +- ...TypeAliasWithTypeParameters2.d.ts.map.diff | 2 +- ...ameterNameShadowedInternally.d.ts.map.diff | 2 +- ...ndefinedWithStrictNullChecks.d.ts.map.diff | 2 +- .../emptyTuplesTypeAssertion01.d.ts.map.diff | 2 +- .../emptyTuplesTypeAssertion02.d.ts.map.diff | 2 +- .../genericContextualTypes1.d.ts.map.diff | 2 +- .../diff/indexSignatures1.d.ts.map.diff | 2 +- .../intraExpressionInferences.d.ts.map.diff | 2 +- ...orbidenSyntax(module=node16).d.ts.map.diff | 2 +- ...bidenSyntax(module=nodenext).d.ts.map.diff | 2 +- ...erDestructuringObjectLiteral.d.ts.map.diff | 2 +- ...sNotBlockAliasSymbolCreation.d.ts.map.diff | 2 +- .../diff/variadicTuples1.d.ts.map.diff | 2 +- ...nEmitExpandoWithGenericConstraint.d.ts.map | 32 +++++++++++ ...ulesForbidenSyntax(module=node16).d.ts.map | 53 +++++++++++++++++++ ...esForbidenSyntax(module=nodenext).d.ts.map | 53 +++++++++++++++++++ ...nEmitExpandoWithGenericConstraint.d.ts.map | 32 +++++++++++ ...ulesForbidenSyntax(module=node16).d.ts.map | 53 +++++++++++++++++++ ...esForbidenSyntax(module=nodenext).d.ts.map | 53 +++++++++++++++++++ .../cases/compiler/declFileRegressionTests.ts | 2 +- ...onEmitDestructuringObjectLiteralPattern.ts | 2 +- ...nEmitDestructuringObjectLiteralPattern1.ts | 2 +- ...nEmitDestructuringObjectLiteralPattern2.ts | 2 +- ...arationEmitExpandoWithGenericConstraint.ts | 1 + ...rationEmitExportAliasVisibiilityMarking.ts | 2 +- .../declarationEmitObjectLiteralAccessors1.ts | 2 +- ...ationEmitPrefersPathKindBasedOnBundling.ts | 2 +- .../declarationEmitRetainsJsdocyComments.ts | 2 +- ...clarationEmitReusesLambdaParameterNodes.ts | 2 +- ...arationEmitTypeAliasWithTypeParameters1.ts | 2 +- ...arationEmitTypeAliasWithTypeParameters2.ts | 2 +- ...EmitTypeParameterNameShadowedInternally.ts | 2 +- ...ameterAddsUndefinedWithStrictNullChecks.ts | 2 +- .../parameterDestructuringObjectLiteral.ts | 2 +- ...enthesisDoesNotBlockAliasSymbolCreation.ts | 2 +- .../node/nodeModulesForbidenSyntax.ts | 2 +- .../types/conditional/conditionalTypes1.ts | 2 +- .../types/members/indexSignatures1.ts | 4 +- .../emptyTuples/emptyTuplesTypeAssertion01.ts | 2 +- .../emptyTuples/emptyTuplesTypeAssertion02.ts | 2 +- .../types/tuple/variadicTuples1.ts | 2 +- .../typeInference/genericContextualTypes1.ts | 2 +- .../intraExpressionInferences.ts | 2 +- 56 files changed, 342 insertions(+), 49 deletions(-) create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExpandoWithGenericConstraint.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoWithGenericConstraint.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpandoWithGenericConstraint.d.ts.map diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index 3057bd961c630..6ee76e5faf080 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -688,7 +688,7 @@ export namespace Compiler { 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, options.emitBOM ? Utils.addUTF8ByteOrderMark(declarationMap) : declarationMap)); + dtsMap.set(declarationMapPath, new documents.TextDocument(declarationMapPath, declarationMap)); } diagnostics.push(...fileDiagnostics); }); 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 index b0b78a5879f79..a44ef2150706f 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/conformance/types/conditional/conditionalTypes1.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileRegressionTests.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileRegressionTests.d.ts.map.diff index 4883f64b0d988..b86714262176e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileRegressionTests.d.ts.map.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileRegressionTests.d.ts.map.diff @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/compiler/declFileRegressionTests.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern.d.ts.map.diff index f94f9779a00db..d83ad95fb9cbd 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern.d.ts.map.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern.d.ts.map.diff @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map.diff index 0689c27dd603d..96dc20de0c7ed 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map.diff @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map.diff index 60a92b64dd685..788178647b7f2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map.diff @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts] //// 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,KAA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U0FBUyxLQUFLLEVBQUUsQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxLQUFHLElBQUksQ0FBQyxDQUFDLENBQWUsQ0FBQyJ9,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 index d22f281113fe0..6904f66884deb 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/compiler/declarationEmitExportAliasVisibiilityMarking.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.map.diff index 4b4f0c1e4473a..d30075398bbdf 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.map.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.map.diff @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts] //// 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 index c9aee36491465..0d09f59d5088c 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts] //// 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 index 6577342651ef4..4c308aa9ff517 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/compiler/declarationEmitRetainsJsdocyComments.ts] //// 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 index c2293be088547..874b507c990b5 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/compiler/declarationEmitReusesLambdaParameterNodes.ts] //// 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 index 4033009553224..83d6263c2bf2b 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters1.ts] //// 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 index aafd9ceb26cfb..a5af7f3bf4b03 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters2.ts] //// 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 index 38c65ba200db1..23f5d18d812c5 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/compiler/declarationEmitTypeParameterNameShadowedInternally.ts] //// 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 index a46807ab30ffa..f572823ac73a0 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.ts] //// 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 index 96ae47cffc192..809178e506466 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts] //// 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 index 0340663478b9c..e565d1337d874 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion02.ts] //// 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 index 79dcb20d0f439..944038cd7953b 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/conformance/types/typeRelationships/typeInference/genericContextualTypes1.ts] //// 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 index 954bc5f88b875..677c86e478ec1 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/conformance/types/members/indexSignatures1.ts] //// 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 index 0c2d352d62ba4..fae43914f44c1 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/conformance/types/typeRelationships/typeInference/intraExpressionInferences.ts] //// 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 index c6bf8baf531f5..32ff9aa5056fd 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: Trivial sourcemap diff]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/conformance/node/nodeModulesForbidenSyntax.ts] //// 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 index c6bf8baf531f5..32ff9aa5056fd 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: Trivial sourcemap diff]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/conformance/node/nodeModulesForbidenSyntax.ts] //// 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 index 847cdfe486683..1be6d7ae117d8 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/compiler/parameterDestructuringObjectLiteral.ts] //// 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 index 760ea7ad86b6a..8bf77fba75793 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/compiler/parenthesisDoesNotBlockAliasSymbolCreation.ts] //// 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 index c087543fdbc68..0e77ed433f279 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap seems missaligned]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/conformance/types/tuple/variadicTuples1.ts] //// 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..bd904a2f09b1a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoWithGenericConstraint.d.ts.map @@ -0,0 +1,32 @@ +//// [tests/cases/compiler/declarationEmitExpandoWithGenericConstraint.ts] //// + + + +/// [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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FBvaW50ID0+ICh7IHgsIHkgfSk7CmV4cG9ydCBjb25zdCBSZWN0ID0gPHAgZXh0ZW5kcyBQb2ludD4oYTogcCwgYjogcCk6IFJlY3Q8cD4gPT4gKHsgYSwgYiB9KTsKClBvaW50Lnplcm8gPSAoKTogUG9pbnQgPT4gUG9pbnQoMCwgMCk7 + 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 index 053e0d16e1510..29cc871488826 100644 --- 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 @@ -2,6 +2,59 @@ +/// [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] //// 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 index 053e0d16e1510..29cc871488826 100644 --- 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 @@ -2,6 +2,59 @@ +/// [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] //// 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..8752f31de6117 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExpandoWithGenericConstraint.d.ts.map @@ -0,0 +1,32 @@ +//// [tests/cases/compiler/declarationEmitExpandoWithGenericConstraint.ts] //// + + + +/// [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,ZXhwb3J0IGludGVyZmFjZSBQb2ludCB7DQogIC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UUsTUFBTSxFQUFFLENBQUMsRUFBRSxNQUFNLEdBQUcsS0FBSyxDQUFDO0lBQzlCLElBQUksSUFBSSxLQUFLLENBQUM7Q0FDNkIsQ0FBQztBQUNoRCxlQUFPLE1BQU0sSUFBSSx1QkFBd0IsQ0FBQyxLQUFLLENBQUMsS0FBRyxLQUFLLENBQUMsQ0FBZSxDQUFDIn0=,ZXhwb3J0IGludGVyZmFjZSBQb2ludCB7CiAgICByZWFkb25seSB4OiBudW1iZXI7CiAgICByZWFkb25seSB5OiBudW1iZXI7Cn0KCmV4cG9ydCBpbnRlcmZhY2UgUmVjdDxwIGV4dGVuZHMgUG9pbnQ+IHsKICAgIHJlYWRvbmx5IGE6IHA7CiAgICByZWFkb25seSBiOiBwOwp9CgpleHBvcnQgY29uc3QgUG9pbnQ6IHsKICAgICh4OiBudW1iZXIsIHk6IG51bWJlcik6IFBvaW50OwogICAgemVybygpOiBQb2ludDsKfSA9ICh4OiBudW1iZXIsIHk6IG51bWJlcik6IFBvaW50ID0+ICh7IHgsIHkgfSk7CmV4cG9ydCBjb25zdCBSZWN0ID0gPHAgZXh0ZW5kcyBQb2ludD4oYTogcCwgYjogcCk6IFJlY3Q8cD4gPT4gKHsgYSwgYiB9KTsKClBvaW50Lnplcm8gPSAoKTogUG9pbnQgPT4gUG9pbnQoMCwgMCk7 + 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 index 23f680fa195a7..26a4d467816c9 100644 --- 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 @@ -2,6 +2,59 @@ +/// [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] //// 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 index 23f680fa195a7..26a4d467816c9 100644 --- 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 @@ -2,6 +2,59 @@ +/// [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] //// diff --git a/tests/cases/compiler/declFileRegressionTests.ts b/tests/cases/compiler/declFileRegressionTests.ts index 9809ff9f3e87c..1cd0affff7a76 100644 --- a/tests/cases/compiler/declFileRegressionTests.ts +++ b/tests/cases/compiler/declFileRegressionTests.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // 'null' not converted to 'any' in d.ts // function types not piped through correctly var n = { w: null, x: '', y: () => { }, z: 32 }; diff --git a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts index 6161b4062d75b..77c7fa764abdc 100644 --- a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts +++ b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed var { } = { x: 5, y: "hello" }; var { x4 } = { x4: 5, y4: "hello" }; diff --git a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts index 4aab3f37628ef..7fec471e91878 100644 --- a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts +++ b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed var { } = { x: 5, y: "hello" }; var { x4 } = { x4: 5, y4: "hello" }; diff --git a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts index 160f1528cbaf3..94fa868e0b0e8 100644 --- a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts +++ b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed var { a: x11, b: { a: y11, b: { a: z11 }}} = { a: 1, b: { a: "hello", b: { a: true } } }; 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 1f5f43714083f..d563254cd03bf 100644 --- a/tests/cases/compiler/declarationEmitExportAliasVisibiilityMarking.ts +++ b/tests/cases/compiler/declarationEmitExportAliasVisibiilityMarking.ts @@ -1,6 +1,6 @@ // @lib: es2015 // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @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/declarationEmitObjectLiteralAccessors1.ts b/tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts index b7e0c80dcf195..046ecac68c9dc 100644 --- a/tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts +++ b/tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts @@ -1,7 +1,7 @@ // @strict: true // @declaration: true // @emitDeclarationOnly: true -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // same type accessors export const obj1 = { diff --git a/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts b/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts index 3e495ac277938..86e2702ca85ba 100644 --- a/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts +++ b/tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts @@ -3,7 +3,7 @@ // @baseUrl: . // @outDir: ./dist // @rootDir: ./src -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // @filename: src/lib/operators/scalar.ts export interface Scalar { (): string; diff --git a/tests/cases/compiler/declarationEmitRetainsJsdocyComments.ts b/tests/cases/compiler/declarationEmitRetainsJsdocyComments.ts index d9f73bcdfe81c..35b272ac628b2 100644 --- a/tests/cases/compiler/declarationEmitRetainsJsdocyComments.ts +++ b/tests/cases/compiler/declarationEmitRetainsJsdocyComments.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed /** * comment1 * @param p diff --git a/tests/cases/compiler/declarationEmitReusesLambdaParameterNodes.ts b/tests/cases/compiler/declarationEmitReusesLambdaParameterNodes.ts index 9be88c2148608..597fbb423db21 100644 --- a/tests/cases/compiler/declarationEmitReusesLambdaParameterNodes.ts +++ b/tests/cases/compiler/declarationEmitReusesLambdaParameterNodes.ts @@ -1,7 +1,7 @@ // @strict: true // @declaration: true // @module: nodenext -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @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/declarationEmitTypeAliasWithTypeParameters1.ts b/tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters1.ts index 4366bb8afb530..b107e8ce27a8a 100644 --- a/tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters1.ts +++ b/tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters1.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @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 4a88bb617c7cc..cb1a3b447abee 100644 --- a/tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters2.ts +++ b/tests/cases/compiler/declarationEmitTypeAliasWithTypeParameters2.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed export type Bar = () => [X, Y, Z]; export type Baz = Bar; diff --git a/tests/cases/compiler/declarationEmitTypeParameterNameShadowedInternally.ts b/tests/cases/compiler/declarationEmitTypeParameterNameShadowedInternally.ts index 57dff247f1326..444bef3c2ffa1 100644 --- a/tests/cases/compiler/declarationEmitTypeParameterNameShadowedInternally.ts +++ b/tests/cases/compiler/declarationEmitTypeParameterNameShadowedInternally.ts @@ -1,6 +1,6 @@ // @declaration: true // @skipLibCheck: false -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed export const foo = (x: T) => { const inner = (y: T) => [x, y] as const; diff --git a/tests/cases/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.ts b/tests/cases/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.ts index 553883de72e7f..440e543d6f986 100644 --- a/tests/cases/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.ts +++ b/tests/cases/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.ts @@ -1,6 +1,6 @@ // @strictNullChecks: true // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed function f(addUndefined1 = "J", addUndefined2?: number) { return addUndefined1.length + (addUndefined2 || 0); } diff --git a/tests/cases/compiler/parameterDestructuringObjectLiteral.ts b/tests/cases/compiler/parameterDestructuringObjectLiteral.ts index 82f8bbc66fca8..bd8016718d530 100644 --- a/tests/cases/compiler/parameterDestructuringObjectLiteral.ts +++ b/tests/cases/compiler/parameterDestructuringObjectLiteral.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // Repro from #22644 diff --git a/tests/cases/compiler/parenthesisDoesNotBlockAliasSymbolCreation.ts b/tests/cases/compiler/parenthesisDoesNotBlockAliasSymbolCreation.ts index 5068ce2096eb2..a81558e13141a 100644 --- a/tests/cases/compiler/parenthesisDoesNotBlockAliasSymbolCreation.ts +++ b/tests/cases/compiler/parenthesisDoesNotBlockAliasSymbolCreation.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed export type InvalidKeys = { [P in K]? : never }; export type InvalidKeys2 = ( diff --git a/tests/cases/conformance/node/nodeModulesForbidenSyntax.ts b/tests/cases/conformance/node/nodeModulesForbidenSyntax.ts index 5c357dcc028ad..d8f1ef1f7e057 100644 --- a/tests/cases/conformance/node/nodeModulesForbidenSyntax.ts +++ b/tests/cases/conformance/node/nodeModulesForbidenSyntax.ts @@ -1,7 +1,7 @@ // @module: node16,nodenext // @declaration: true // @filename: subfolder/index.ts -// @isolatedDeclarationFixedDiffReason: Trivial sourcemap diff +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // cjs format file const x = () => (void 0); export {x}; diff --git a/tests/cases/conformance/types/conditional/conditionalTypes1.ts b/tests/cases/conformance/types/conditional/conditionalTypes1.ts index 750369e07df5c..de25fdc7dff5b 100644 --- a/tests/cases/conformance/types/conditional/conditionalTypes1.ts +++ b/tests/cases/conformance/types/conditional/conditionalTypes1.ts @@ -1,6 +1,6 @@ // @strict: true // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @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/members/indexSignatures1.ts b/tests/cases/conformance/types/members/indexSignatures1.ts index 920ffc84d5d38..72fdd537c2d3b 100644 --- a/tests/cases/conformance/types/members/indexSignatures1.ts +++ b/tests/cases/conformance/types/members/indexSignatures1.ts @@ -1,7 +1,7 @@ // @strict: true // @declaration: true // @target: esnext -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // Symbol index signature checking @@ -11,7 +11,7 @@ function gg3(x: { [key: string]: string }, y: { [key: symbol]: string }, z: { [s 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 }) { diff --git a/tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts b/tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts index 5586511c3f782..06026468e0974 100644 --- a/tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts +++ b/tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @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 0567c676b7af3..3abfb8082641e 100644 --- a/tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion02.ts +++ b/tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion02.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @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/variadicTuples1.ts b/tests/cases/conformance/types/tuple/variadicTuples1.ts index 0abc071263fc2..50fb54da0275f 100644 --- a/tests/cases/conformance/types/tuple/variadicTuples1.ts +++ b/tests/cases/conformance/types/tuple/variadicTuples1.ts @@ -1,6 +1,6 @@ // @strict: true // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // Variadics in tuple types diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/genericContextualTypes1.ts b/tests/cases/conformance/types/typeRelationships/typeInference/genericContextualTypes1.ts index b16b0ae345703..acb83d38c2522 100644 --- a/tests/cases/conformance/types/typeRelationships/typeInference/genericContextualTypes1.ts +++ b/tests/cases/conformance/types/typeRelationships/typeInference/genericContextualTypes1.ts @@ -1,6 +1,6 @@ // @strict: true // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @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 86c5fd927a660..211dc13bce5b7 100644 --- a/tests/cases/conformance/types/typeRelationships/typeInference/intraExpressionInferences.ts +++ b/tests/cases/conformance/types/typeRelationships/typeInference/intraExpressionInferences.ts @@ -1,6 +1,6 @@ // @strict: true // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap seems miss-aligned +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // Repros from #47599 From 6f3a0ec6233fde06de391a7553acc4c30a5f277a Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 23 Nov 2023 15:58:53 +0000 Subject: [PATCH 144/224] Improved type safety in declarations Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/transformers/declarations.ts | 141 +++++++++++++----- .../declarations/localInferenceResolver.ts | 6 +- 2 files changed, 106 insertions(+), 41 deletions(-) diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 4177bd0b6d7e8..cd93048ee5c0d 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -135,6 +135,7 @@ import { isMethodSignature, isModifier, isModuleDeclaration, + IsolatedEmitResolver, isOmittedExpression, isPrivateIdentifier, isPropertySignature, @@ -237,6 +238,7 @@ import { import * as moduleSpecifiers from "../_namespaces/ts.moduleSpecifiers"; import { createLocalInferenceResolver, + LocalInferenceResolver, } from "./declarations/localInferenceResolver"; /** @internal */ @@ -308,21 +310,7 @@ export function transformDeclarations(context: TransformationContext) { 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; @@ -330,24 +318,85 @@ 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 { resolver: localInferenceResolver, isolatedDeclarations } = createLocalInferenceResolver({ - ensureParameter, - context, - visitDeclarationSubtree, - setEnclosingDeclarations(node) { - const oldNode = enclosingDeclaration; - enclosingDeclaration = node; - return oldNode; - }, - checkEntityNameVisibility(name, container) { - return checkEntityNameVisibility(name, container ?? enclosingDeclaration); - }, - }); + const { localInferenceResolver, isolatedDeclarations, host, resolver, symbolTracker } = createTransformerServices(); const options = context.getCompilerOptions(); const { noResolve, stripInternal } = options; return transformRoot; + function createTransformerServices(): { + isolatedDeclarations: true; + resolver: IsolatedEmitResolver; + localInferenceResolver: LocalInferenceResolver; + host: undefined; + symbolTracker: SymbolTracker; + } | { + isolatedDeclarations: false; + resolver: EmitResolver; + localInferenceResolver: undefined; + host: EmitHost; + symbolTracker: SymbolTracker; + } { + const { isolatedDeclarations, resolver: localInferenceResolver } = createLocalInferenceResolver({ + ensureParameter, + context, + visitDeclarationSubtree, + setEnclosingDeclarations(node) { + const oldNode = enclosingDeclaration; + enclosingDeclaration = node; + return oldNode; + }, + checkEntityNameVisibility(name, container) { + return checkEntityNameVisibility(name, container ?? enclosingDeclaration); + }, + }); + if (isolatedDeclarations) { + const symbolTracker: SymbolTracker = { + trackSymbol, + reportInaccessibleThisError, + reportInaccessibleUniqueSymbolError, + reportCyclicStructureError, + reportPrivateInBaseOfClassExpression, + reportLikelyUnsafeImportRequiredError, + reportTruncationError, + trackReferencedAmbientModule, + trackExternalModuleSymbolOfImportTypeNode, + reportNonlocalAugmentation, + reportNonSerializableProperty, + }; + return { + isolatedDeclarations, + resolver: context.getEmitResolver(), + localInferenceResolver, + symbolTracker, + host: undefined, + }; + } + else { + const host = context.getEmitHost(); + const symbolTracker: SymbolTracker = { + trackSymbol, + reportInaccessibleThisError, + reportInaccessibleUniqueSymbolError, + reportCyclicStructureError, + reportPrivateInBaseOfClassExpression, + reportLikelyUnsafeImportRequiredError, + reportTruncationError, + moduleResolverHost: host, + trackReferencedAmbientModule, + trackExternalModuleSymbolOfImportTypeNode, + reportNonlocalAugmentation, + reportNonSerializableProperty, + }; + + return { + isolatedDeclarations, + localInferenceResolver, + resolver: context.getEmitResolver(), + symbolTracker, + host, + }; + } + } function reportIsolatedDeclarationError(node: Node) { const message = createDiagnosticForNode( node, @@ -366,6 +415,9 @@ export function transformDeclarations(context: TransformationContext) { } 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)) { @@ -469,6 +521,7 @@ export function transformDeclarations(context: TransformationContext) { function trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) { if (symbol.flags & SymbolFlags.TypeParameter) return false; + if (isolatedDeclarations) return false; const issuedDiagnostic = handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning, /*shouldComputeAliasToMarkVisible*/ true)); recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning), enclosingDeclaration ?? currentSourceFile); return issuedDiagnostic; @@ -539,6 +592,8 @@ export function transformDeclarations(context: TransformationContext) { } 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 @@ -619,9 +674,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; } @@ -642,18 +699,19 @@ 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); @@ -706,6 +764,7 @@ export function transformDeclarations(context: TransformationContext) { function mapReferencesIntoArray(references: FileReference[], outputFilePath: string): (file: SourceFile) => void { return file => { + if (isolatedDeclarations) return; let declFileName: string; if (file.isDeclarationFile) { // Neither decl files or js should have their refs changed declFileName = file.fileName; @@ -1021,12 +1080,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(context.getEmitHost(), resolver, parent); + if (newName) { + return factory.createStringLiteral(newName); + } } } else { diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 760f7a9ad7cd3..22ef7d39b2cc4 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -108,8 +108,10 @@ enum LocalTypeInfoFlags { None = 0, Invalid = 1 << 1, } - -interface LocalInferenceResolver { +/** + * @internal + */ +export interface LocalInferenceResolver { makeInvalidType(): Node; fromInitializer(node: HasInferredType | ExportAssignment, type: TypeNode | undefined, sourceFile: SourceFile): TypeNode; } From 23840f4ddbff432d4296d55f332f3bb7eb21bae5 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 23 Nov 2023 16:01:47 +0000 Subject: [PATCH 145/224] Renamed files. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/_namespaces/ts.ts | 6 +++--- .../declarations/{emit-binder.ts => emitBinder.ts} | 0 .../declarations/{emit-resolver.ts => emitResolver.ts} | 2 +- .../{transform-project.ts => transpileDeclaration.ts} | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename src/compiler/transformers/declarations/{emit-binder.ts => emitBinder.ts} (100%) rename src/compiler/transformers/declarations/{emit-resolver.ts => emitResolver.ts} (97%) rename src/compiler/transformers/declarations/{transform-project.ts => transpileDeclaration.ts} (100%) diff --git a/src/compiler/_namespaces/ts.ts b/src/compiler/_namespaces/ts.ts index 40c4fab806335..60de9f45379df 100644 --- a/src/compiler/_namespaces/ts.ts +++ b/src/compiler/_namespaces/ts.ts @@ -57,9 +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/emit-binder"; -export * from "../transformers/declarations/emit-resolver"; -export * from "../transformers/declarations/transform-project"; +export * from "../transformers/declarations/emitBinder"; +export * from "../transformers/declarations/emitResolver"; +export * from "../transformers/declarations/transpileDeclaration"; export * from "../transformers/declarations/types"; export * from "../transformers/declarations"; export * from "../transformer"; diff --git a/src/compiler/transformers/declarations/emit-binder.ts b/src/compiler/transformers/declarations/emitBinder.ts similarity index 100% rename from src/compiler/transformers/declarations/emit-binder.ts rename to src/compiler/transformers/declarations/emitBinder.ts diff --git a/src/compiler/transformers/declarations/emit-resolver.ts b/src/compiler/transformers/declarations/emitResolver.ts similarity index 97% rename from src/compiler/transformers/declarations/emit-resolver.ts rename to src/compiler/transformers/declarations/emitResolver.ts index b64e4e7b7d8db..015b391dfc0c0 100644 --- a/src/compiler/transformers/declarations/emit-resolver.ts +++ b/src/compiler/transformers/declarations/emitResolver.ts @@ -90,7 +90,7 @@ import { bindSourceFileForDeclarationEmit, EmitDeclarationNodeLinks, EmitDeclarationSymbol, -} from "./emit-binder"; +} from "./emitBinder"; import { IsolatedEmitResolver, MemberKey, diff --git a/src/compiler/transformers/declarations/transform-project.ts b/src/compiler/transformers/declarations/transpileDeclaration.ts similarity index 100% rename from src/compiler/transformers/declarations/transform-project.ts rename to src/compiler/transformers/declarations/transpileDeclaration.ts From 96c9c1592251942394dd83739021e00e306c06f8 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 24 Nov 2023 12:48:27 +0000 Subject: [PATCH 146/224] Hide symbol tracker if in isolated declarations mode. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/transformers/declarations.ts | 196 +++++++++++----------- 1 file changed, 98 insertions(+), 98 deletions(-) diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index cd93048ee5c0d..24a7f1cf41f28 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -45,6 +45,7 @@ import { EnumDeclaration, ExportAssignment, ExportDeclaration, + Expression, ExpressionWithTypeArguments, factory, FileReference, @@ -318,7 +319,7 @@ 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 { localInferenceResolver, isolatedDeclarations, host, resolver, symbolTracker } = createTransformerServices(); + const { localInferenceResolver, isolatedDeclarations, host, resolver, symbolTracker, ensureNoInitializer } = createTransformerServices(); const options = context.getCompilerOptions(); const { noResolve, stripInternal } = options; return transformRoot; @@ -328,13 +329,15 @@ export function transformDeclarations(context: TransformationContext) { resolver: IsolatedEmitResolver; localInferenceResolver: LocalInferenceResolver; host: undefined; - symbolTracker: SymbolTracker; + symbolTracker: undefined; + ensureNoInitializer: (node: CanHaveLiteralInitializer) => Expression | undefined; } | { isolatedDeclarations: false; resolver: EmitResolver; localInferenceResolver: undefined; host: EmitHost; symbolTracker: SymbolTracker; + ensureNoInitializer: (node: CanHaveLiteralInitializer) => Expression | undefined; } { const { isolatedDeclarations, resolver: localInferenceResolver } = createLocalInferenceResolver({ ensureParameter, @@ -349,51 +352,42 @@ export function transformDeclarations(context: TransformationContext) { return checkEntityNameVisibility(name, container ?? enclosingDeclaration); }, }); + if (isolatedDeclarations) { - const symbolTracker: SymbolTracker = { - trackSymbol, - reportInaccessibleThisError, - reportInaccessibleUniqueSymbolError, - reportCyclicStructureError, - reportPrivateInBaseOfClassExpression, - reportLikelyUnsafeImportRequiredError, - reportTruncationError, - trackReferencedAmbientModule, - trackExternalModuleSymbolOfImportTypeNode, - reportNonlocalAugmentation, - reportNonSerializableProperty, - }; + const resolver: IsolatedEmitResolver = context.getEmitResolver(); + // Ideally nothing should require the symbol tracker in isolated declarations mode. + // createLiteralConstValue is teh one exception + const emptySymbolTracker = {}; return { isolatedDeclarations, - resolver: context.getEmitResolver(), + resolver, localInferenceResolver, - symbolTracker, + symbolTracker: undefined, host: undefined, + ensureNoInitializer: (node: CanHaveLiteralInitializer) => { + if (shouldPrintWithInitializer(node)) { + return resolver.createLiteralConstValue(getParseTreeNode(node) as CanHaveLiteralInitializer, emptySymbolTracker); // TODO: Make safe + } + return undefined; + }, }; } else { const host = context.getEmitHost(); - const symbolTracker: SymbolTracker = { - trackSymbol, - reportInaccessibleThisError, - reportInaccessibleUniqueSymbolError, - reportCyclicStructureError, - reportPrivateInBaseOfClassExpression, - reportLikelyUnsafeImportRequiredError, - reportTruncationError, - moduleResolverHost: host, - trackReferencedAmbientModule, - trackExternalModuleSymbolOfImportTypeNode, - reportNonlocalAugmentation, - reportNonSerializableProperty, - }; - + const resolver = context.getEmitResolver(); + const symbolTracker: SymbolTracker = createSymbolTracker(resolver, host); return { isolatedDeclarations, localInferenceResolver, - resolver: context.getEmitResolver(), + resolver, symbolTracker, host, + ensureNoInitializer: (node: CanHaveLiteralInitializer) => { + if (shouldPrintWithInitializer(node)) { + return resolver.createLiteralConstValue(getParseTreeNode(node) as CanHaveLiteralInitializer, symbolTracker); // TODO: Make safe + } + return undefined; + }, }; } } @@ -512,83 +506,96 @@ 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; - if (isolatedDeclarations) 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 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) { @@ -902,13 +909,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; - } - 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) From 31990579d72093556f72561798f3847247414775 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 24 Nov 2023 11:54:08 +0000 Subject: [PATCH 147/224] Fixed optional constructor properties. Signed-off-by: Titian Cernicova-Dragomir --- .../declarations/localInferenceResolver.ts | 26 +++++++++-- ...arationEmitParameterProperty.d.ts.map.diff | 16 +++++++ .../diff/optionalMethods.d.ts.map.diff | 16 +++++++ .../declarationEmitParameterProperty.d.ts.map | 23 ++++++++++ .../auto-fixed/dte/optionalMethods.d.ts.map | 46 +++++++++++++++++++ .../declarationEmitParameterProperty.d.ts.map | 23 ++++++++++ .../auto-fixed/tsc/optionalMethods.d.ts.map | 46 +++++++++++++++++++ .../declarationEmitParameterProperty.ts | 2 +- .../types/namedTypes/optionalMethods.ts | 2 +- 9 files changed, 195 insertions(+), 5 deletions(-) create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitParameterProperty.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/optionalMethods.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitParameterProperty.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalMethods.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitParameterProperty.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalMethods.d.ts.map diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index ca7df8f314c72..e215d65c05975 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -61,6 +61,7 @@ import { LiteralExpression, MethodDeclaration, MethodSignature, + ModifierFlags, Node, NodeArray, NodeFlags, @@ -83,7 +84,9 @@ import { } from "../../types"; import { createDiagnosticForNode, + hasSyntacticModifier, isEntityNameExpression, + isOptionalDeclaration, } from "../../utilities"; import { isConstTypeReference, @@ -745,8 +748,22 @@ export function createLocalInferenceResolver({ localType = invalid(node); } - if (node.initializer && !(localType.flags & LocalTypeInfoFlags.Invalid) && strictNullChecks && !resolver.isOptionalParameter(node)) { - localType.typeNode = addUndefinedInUnion(localType.typeNode); + if (strictNullChecks && !(localType.flags & LocalTypeInfoFlags.Invalid)) { + 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.typeNode = addUndefinedInUnion(localType.typeNode); + } + /** + * 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.typeNode = addUndefinedInUnion(localType.typeNode); + } } } else if (type) { @@ -764,7 +781,7 @@ export function createLocalInferenceResolver({ localType = invalid(node); } else if (isClassExpression(node.initializer)) { - localType = invalid(node.initializer, Diagnostics.Declaration_emit_for_class_expressions_are_not_supported_with_isolatedDeclarations) + localType = invalid(node.initializer, Diagnostics.Declaration_emit_for_class_expressions_are_not_supported_with_isolatedDeclarations); } else { localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals : NarrowBehavior.None); @@ -772,6 +789,9 @@ export function createLocalInferenceResolver({ } else if (isPropertyDeclaration(node) && node.initializer) { localType = localInference(node.initializer); + if (isOptionalDeclaration(node)) { + localType.typeNode = addUndefinedInUnion(localType.typeNode); + } } else if (isInterfaceDeclaration(node.parent) || isTypeLiteralNode(node.parent)) { return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); 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/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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,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/OiBudW1iZXIgfCB1bmRlZmluZWQ7DQogICAgZTogbnVtYmVyOw0KICAgIGE6IG51bWJlcjsNCiAgICBiPzogbnVtYmVyOw0KICAgIGM/OiBudW1iZXIgfCB1bmRlZmluZWQ7DQogICAgY29uc3RydWN0b3IoZD86IG51bWJlciB8IHVuZGVmaW5lZCwgZT86IG51bWJlcik7DQogICAgZigpOiBudW1iZXI7DQogICAgZz8oKTogbnVtYmVyOw0KICAgIGg/KCk6IG51bWJlcjsNCn0NCmRlY2xhcmUgZnVuY3Rpb24gdGVzdDIoeDogQmFyKTogdm9pZDsNCmRlY2xhcmUgY2xhc3MgQmFzZSB7DQogICAgYT86IG51bWJlcjsNCiAgICBmPygpOiBudW1iZXI7DQp9DQpkZWNsYXJlIGNsYXNzIERlcml2ZWQgZXh0ZW5kcyBCYXNlIHsNCiAgICBhOiBudW1iZXI7DQogICAgZigpOiBudW1iZXI7DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1vcHRpb25hbE1ldGhvZHMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uYWxNZXRob2RzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJvcHRpb25hbE1ldGhvZHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsVUFBVSxHQUFHO0lBQ1QsQ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ZXQgZzIgPSB4LmcgPyB4LmcoKSA6IDA7Cn0KCmNsYXNzIEJhciB7CiAgICBhOiBudW1iZXI7CiAgICBiPzogbnVtYmVyOwogICAgYz8gPSAyOwogICAgY29uc3RydWN0b3IocHVibGljIGQ/OiBudW1iZXIsIHB1YmxpYyBlID0gMTApIHt9CiAgICBmKCk6IG51bWJlciB7CiAgICAgICAgcmV0dXJuIDE7CiAgICB9CiAgICBnPygpOiBudW1iZXI7ICAvLyBCb2R5IG9mIG9wdGlvbmFsIG1ldGhvZCBjYW4gYmUgb21pdHRlZAogICAgaD8oKTogbnVtYmVyIHsKICAgICAgICByZXR1cm4gMjsKICAgIH0KfQoKZnVuY3Rpb24gdGVzdDIoeDogQmFyKTogdm9pZCB7CiAgICB4LmE7CiAgICB4LmI7CiAgICB4LmM7CiAgICB4LmQ7CiAgICB4LmU7CiAgICB4LmY7CiAgICB4Lmc7CiAgICBsZXQgZjEgPSB4LmYoKTsKICAgIGxldCBnMSA9IHguZyAmJiB4LmcoKTsKICAgIGxldCBnMiA9IHguZyA/IHguZygpIDogMDsKICAgIGxldCBoMSA9IHguaCAmJiB4LmgoKTsKICAgIGxldCBoMiA9IHguaCA/IHguaCgpIDogMDsKfQoKY2xhc3MgQmFzZSB7CiAgICBhPzogbnVtYmVyOwogICAgZj8oKTogbnVtYmVyOwp9CgpjbGFzcyBEZXJpdmVkIGV4dGVuZHMgQmFzZSB7CiAgICBhID0gMTsKICAgIGYoKTogbnVtYmVyIHsgcmV0dXJuIDE7IH0KfQo= ++//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIEZvbyB7DQogICAgYTogbnVtYmVyOw0KICAgIGI/OiBudW1iZXI7DQogICAgZigpOiBudW1iZXI7DQogICAgZz8oKTogbnVtYmVyOw0KfQ0KZGVjbGFyZSBmdW5jdGlvbiB0ZXN0MSh4OiBGb28pOiB2b2lkOw0KZGVjbGFyZSBjbGFzcyBCYXIgew0KICAgIGQ/OiBudW1iZXIgfCB1bmR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KICAgICAgICByZXR1cm4gMjsKICAgIH0KfQoKZnVuY3Rpb24gdGVzdDIoeDogQmFyKTogdm9pZCB7CiAgICB4LmE7CiAgICB4LmI7CiAgICB4LmM7CiAgICB4LmQ7CiAgICB4LmU7CiAgICB4LmY7CiAgICB4Lmc7CiAgICBsZXQgZjEgPSB4LmYoKTsKICAgIGxldCBnMSA9IHguZyAmJiB4LmcoKTsKICAgIGxldCBnMiA9IHguZyA/IHguZygpIDogMDsKICAgIGxldCBoMSA9IHguaCAmJiB4LmgoKTsKICAgIGxldCBoMiA9IHguaCA/IHguaCgpIDogMDsKfQoKY2xhc3MgQmFzZSB7CiAgICBhPzogbnVtYmVyOwogICAgZj8oKTogbnVtYmVyOwp9CgpjbGFzcyBEZXJpdmVkIGV4dGVuZHMgQmFzZSB7CiAgICBhID0gMTsKICAgIGYoKTogbnVtYmVyIHsgcmV0dXJuIDE7IH0KfQo= + 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..daade8fde7e38 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitParameterProperty.d.ts.map @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/declarationEmitParameterProperty.ts] //// + + + +/// [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/optionalMethods.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalMethods.d.ts.map new file mode 100644 index 0000000000000..fcd90228c2f88 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalMethods.d.ts.map @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/types/namedTypes/optionalMethods.ts] //// + + + +/// [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/OiBudW1iZXIgfCB1bmRlZmluZWQ7DQogICAgZTogbnVtYmVyOw0KICAgIGE6IG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rpb24gdGVzdDIoeDogQmFyKTogdm9pZCB7CiAgICB4LmE7CiAgICB4LmI7CiAgICB4LmM7CiAgICB4LmQ7CiAgICB4LmU7CiAgICB4LmY7CiAgICB4Lmc7CiAgICBsZXQgZjEgPSB4LmYoKTsKICAgIGxldCBnMSA9IHguZyAmJiB4LmcoKTsKICAgIGxldCBnMiA9IHguZyA/IHguZygpIDogMDsKICAgIGxldCBoMSA9IHguaCAmJiB4LmgoKTsKICAgIGxldCBoMiA9IHguaCA/IHguaCgpIDogMDsKfQoKY2xhc3MgQmFzZSB7CiAgICBhPzogbnVtYmVyOwogICAgZj8oKTogbnVtYmVyOwp9CgpjbGFzcyBEZXJpdmVkIGV4dGVuZHMgQmFzZSB7CiAgICBhID0gMTsKICAgIGYoKTogbnVtYmVyIHsgcmV0dXJuIDE7IH0KfQo= + 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..078bd3fb79d91 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitParameterProperty.d.ts.map @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/declarationEmitParameterProperty.ts] //// + + + +/// [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/optionalMethods.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalMethods.d.ts.map new file mode 100644 index 0000000000000..4f775a3310322 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalMethods.d.ts.map @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/types/namedTypes/optionalMethods.ts] //// + + + +/// [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/OiBudW1iZXIgfCB1bmRlZmluZWQ7DQogICAgZTogbnVtYmVyOw0KICAgIGE6IG51bWJlcjsNCiAgICBiPzogbnVtYmVyOw0KICAgIGM/OiBudW1iZXIgfCB1bmRlZmluZWQ7DQogICAgY29uc3RydWN0b3IoZD86IG51bWJl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QgZjEgPSB4LmYoKTsKICAgIGxldCBnMSA9IHguZyAmJiB4LmcoKTsKICAgIGxldCBnMiA9IHguZyA/IHguZygpIDogMDsKICAgIGxldCBoMSA9IHguaCAmJiB4LmgoKTsKICAgIGxldCBoMiA9IHguaCA/IHguaCgpIDogMDsKfQoKY2xhc3MgQmFzZSB7CiAgICBhPzogbnVtYmVyOwogICAgZj8oKTogbnVtYmVyOwp9CgpjbGFzcyBEZXJpdmVkIGV4dGVuZHMgQmFzZSB7CiAgICBhID0gMTsKICAgIGYoKTogbnVtYmVyIHsgcmV0dXJuIDE7IH0KfQo= + diff --git a/tests/cases/compiler/declarationEmitParameterProperty.ts b/tests/cases/compiler/declarationEmitParameterProperty.ts index 53cf3198bf746..6528c1e037604 100644 --- a/tests/cases/compiler/declarationEmitParameterProperty.ts +++ b/tests/cases/compiler/declarationEmitParameterProperty.ts @@ -1,6 +1,6 @@ // @strictNullChecks: true // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Optional constructor properties. +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed export class Foo { constructor(public bar?: string) { } diff --git a/tests/cases/conformance/types/namedTypes/optionalMethods.ts b/tests/cases/conformance/types/namedTypes/optionalMethods.ts index 1490ec66769b9..5385b0087b74f 100644 --- a/tests/cases/conformance/types/namedTypes/optionalMethods.ts +++ b/tests/cases/conformance/types/namedTypes/optionalMethods.ts @@ -1,6 +1,6 @@ // @strictNullChecks: true // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Optional constructor properties. +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed interface Foo { a: number; From 9ca6342b8896c9e2563483318ca8eb56c9add049 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Sat, 25 Nov 2023 15:50:23 +0000 Subject: [PATCH 148/224] Removed unused baseline files. Signed-off-by: Titian Cernicova-Dragomir --- .../diff/controlFlowAliasing.d.ts.map.diff | 16 - .../declFileRegressionTests.d.ts.map.diff | 16 - ...ucturingObjectLiteralPattern.d.ts.map.diff | 16 - ...cturingObjectLiteralPattern1.d.ts.map.diff | 16 - ...cturingObjectLiteralPattern2.d.ts.map.diff | 16 - ...itInferredDefaultExportType2.d.ts.map.diff | 16 - .../destructuredDeclarationEmit.d.ts.map.diff | 19 - ...ervedCompilerNamedIdentifier.d.ts.map.diff | 16 - ...ralObjectLiteralDeclaration1.d.ts.map.diff | 16 - .../diff/templateLiteralTypes2.d.ts.map.diff | 16 - ...queSymbolsDeclarationsErrors.d.ts.map.diff | 16 - .../auto-fixed/diff/vardecl.d.ts.map.diff | 16 - .../diff/withExportDecl.d.ts.map.diff | 16 - .../dte/controlFlowAliasing.d.ts.map | 162 - .../controlFlowAliasing.d.ts.map.formatted | 7857 ----------------- .../dte/declFileRegressionTests.d.ts.map | 25 - ...DestructuringObjectLiteralPattern.d.ts.map | 81 - ...estructuringObjectLiteralPattern1.d.ts.map | 51 - ...estructuringObjectLiteralPattern2.d.ts.map | 49 - ...ionEmitInferredDefaultExportType2.d.ts.map | 25 - .../dte/destructuredDeclarationEmit.d.ts.map | 54 - ...edReservedCompilerNamedIdentifier.d.ts.map | 46 - ...gLiteralObjectLiteralDeclaration1.d.ts.map | 24 - .../dte/templateLiteralTypes2.d.ts.map | 51 - .../uniqueSymbolsDeclarationsErrors.d.ts.map | 65 - .../auto-fixed/dte/vardecl.d.ts.map | 96 - .../auto-fixed/dte/withExportDecl.d.ts.map | 44 - .../tsc/controlFlowAliasing.d.ts.map | 162 - .../controlFlowAliasing.d.ts.map.formatted | 7835 ---------------- .../tsc/declFileRegressionTests.d.ts.map | 25 - ...DestructuringObjectLiteralPattern.d.ts.map | 81 - ...estructuringObjectLiteralPattern1.d.ts.map | 51 - ...estructuringObjectLiteralPattern2.d.ts.map | 49 - ...ionEmitInferredDefaultExportType2.d.ts.map | 25 - .../tsc/destructuredDeclarationEmit.d.ts.map | 54 - ...edReservedCompilerNamedIdentifier.d.ts.map | 46 - ...gLiteralObjectLiteralDeclaration1.d.ts.map | 24 - .../tsc/templateLiteralTypes2.d.ts.map | 51 - .../uniqueSymbolsDeclarationsErrors.d.ts.map | 65 - .../auto-fixed/tsc/vardecl.d.ts.map | 96 - .../auto-fixed/tsc/withExportDecl.d.ts.map | 44 - 41 files changed, 17449 deletions(-) delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/controlFlowAliasing.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileRegressionTests.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitInferredDefaultExportType2.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuredDeclarationEmit.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/escapedReservedCompilerNamedIdentifier.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/stringLiteralObjectLiteralDeclaration1.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateLiteralTypes2.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/uniqueSymbolsDeclarationsErrors.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/vardecl.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/withExportDecl.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/controlFlowAliasing.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/controlFlowAliasing.d.ts.map.formatted delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileRegressionTests.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitInferredDefaultExportType2.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuredDeclarationEmit.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/escapedReservedCompilerNamedIdentifier.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/stringLiteralObjectLiteralDeclaration1.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes2.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/uniqueSymbolsDeclarationsErrors.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/vardecl.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/withExportDecl.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/controlFlowAliasing.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/controlFlowAliasing.d.ts.map.formatted delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileRegressionTests.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitInferredDefaultExportType2.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuredDeclarationEmit.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/escapedReservedCompilerNamedIdentifier.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/stringLiteralObjectLiteralDeclaration1.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralTypes2.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/uniqueSymbolsDeclarationsErrors.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/vardecl.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/withExportDecl.d.ts.map diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/controlFlowAliasing.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/controlFlowAliasing.d.ts.map.diff deleted file mode 100644 index b4096fcaca162..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/controlFlowAliasing.d.ts.map.diff +++ /dev/null @@ -1,16 +0,0 @@ -// [[Reason: Sourcemap is more detailed]] //// - -//// [tests/cases/conformance/controlFlow/controlFlowAliasing.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,6 +1,6 @@ - - //// [controlFlowAliasing.d.ts.map] --{"version":3,"file":"controlFlowAliasing.d.ts","sourceRoot":"","sources":["controlFlowAliasing.ts"],"names":[],"mappings":"AAEA,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQrC;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,CAK7B;AAED,iBAAS,GAAG,C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IG9iai5mb287CiAgICB9CiAgICBpZiAoaXNCYXIpIHsKICAgICAgICBvYmouYmFyOwogICAgfQp9CgovLyBOYXJyb3dpbmcgYnkgYWxpYXNlZCBkaXNjcmltaW5hbnQgcHJvcGVydHkgYWNjZXNzCgpmdW5jdGlvbiBmMzAob2JqOiB7IGtpbmQ6ICdmb28nLCBmb286IHN0cmluZyB9IHwgeyBraW5kOiAnYmFyJywgYmFyOiBudW1iZXIgfSk6IHZvaWQgewogICAgY29uc3Qga2luZCA9IG9iai5raW5kOwogICAgaWYgKGtpbmQgPT09ICdmb28nKSB7CiAgICAgICAgb2JqLmZvbzsKICAgIH0KICAgIGVsc2UgewogICAgICAgIG9iai5iYXI7CiAgICB9Cn0KCmZ1bmN0aW9uIGYzMShvYmo6IHsga2luZDogJ2ZvbycsIGZvbzogc3RyaW5nIH0gfCB7IGtpbmQ6ICdiYXInLCBiYXI6IG51bWJlciB9KTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQgfSA9IG9iajsKICAgIGlmIChraW5kID09PSAnZm9vJykgewogICAgICAgIG9iai5mb287CiAgICB9CiAgICBlbHNlIHsKICAgICAgICBvYmouYmFyOwogICAgfQp9CgpmdW5jdGlvbiBmMzIob2JqOiB7IGtpbmQ6ICdmb28nLCBmb286IHN0cmluZyB9IHwgeyBraW5kOiAnYmFyJywgYmFyOiBudW1iZXIgfSk6IHZvaWQgewogICAgY29uc3QgeyBraW5kOiBrIH0gPSBvYmo7CiAgICBpZiAoayA9PT0gJ2ZvbycpIHsKICAgICAgICBvYmouZm9vOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgb2JqLmJhcjsKICAgIH0KfQoKZnVuY3Rpb24gZjMzKG9iajogeyBraW5kOiAnZm9vJywgZm9vOiBzdHJpbmcgfSB8IHsga2luZDogJ2JhcicsIGJhcjogbnVtYmVyIH0pOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCB9ID0gb2JqOwogICAgc3dpdGNoIChraW5kKSB7CiAgICAgICAgY2FzZSAnZm9vJzogb2JqLmZvbzsgYnJlYWs7CiAgICAgICAgY2FzZSAnYmFyJzogb2JqLmJhcjsgYnJlYWs7CiAgICB9Cn0KCgpjbGFzcyBDMTAgewogICAgY29uc3RydWN0b3IocmVhZG9ubHkgeDogc3RyaW5nIHwgbnVtYmVyKSB7CiAgICAgICAgY29uc3QgdGhpc1hfaXNTdHJpbmcgPSB0eXBlb2YgdGhpcy54ID09PSAnc3RyaW5nJzsKICAgICAgICBjb25zdCB4SXNTdHJpbmcgPSB0eXBlb2YgeCA9PT0gJ3N0cmluZyc7CiAgICAgICAgaWYgKHRoaXNYX2lzU3RyaW5nICYmIHhJc1N0cmluZykgewogICAgICAgICAgICBsZXQgczogc3RyaW5nOwogICAgICAgICAgICBzID0gdGhpcy54OwogICAgICAgICAgICBzID0geDsKICAgICAgICB9CiAgICB9Cn0KCmNsYXNzIEMxMSB7CiAgICBjb25zdHJ1Y3RvcihyZWFkb25seSB4OiBzdHJpbmcgfCBudW1iZXIpIHsKICAgICAgICBjb25zdCB0aGlzWF9pc1N0cmluZyA9IHR5cGVvZiB0aGlzLnggPT09ICdzdHJpbmcnOwogICAgICAgIGNvbnN0IHhJc1N0cmluZyA9IHR5cGVvZiB4ID09PSAnc3RyaW5nJzsKICAgICAgICBpZiAodGhpc1hfaXNTdHJpbmcgJiYgeElzU3RyaW5nKSB7CiAgICAgICAgICAgIC8vIFNvbWUgbmFycm93aW5ncyBtYXkgYmUgaW52YWxpZGF0ZWQgZHVlIHRvIGxhdGVyIGFzc2lnbm1lbnRzLgogICAgICAgICAgICBsZXQgczogc3RyaW5nOwogICAgICAgICAgICBzID0gdGhpcy54OwogICAgICAgICAgICBzID0geDsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHRoaXMueCA9IDEwOwogICAgICAgICAgICB4ID0gMTA7CiAgICAgICAgfQogICAgfQp9CgovLyBNaXhpbmcgb2YgYWxpYXNlZCBkaXNjcmltaW5hbnRzIGFuZ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gYmVjYXVzZSBvYmogaXMgbXV0YWJsZQogICAgfQp9CgpmdW5jdGlvbiBmMjgob2JqPzogeyBraW5kOiAnZm9vJywgZm9vOiBzdHJpbmcgfSB8IHsga2luZDogJ2JhcicsIGJhcjogbnVtYmVyIH0pOiB2b2lkIHsKICAgIGNvbnN0IGlzRm9vID0gb2JqICYmIG9iai5raW5kID09PSAnZm9vJzsKICAgIGNvbnN0IGlzQmFyID0gb2JqICYmIG9iai5raW5kID09PSAnYmFyJzsKICAgIGlmIChpc0ZvbykgewogICAgICAgIG9iai5mb287CiAgICB9CiAgICBpZiAoaXNCYXIpIHsKICAgICAgICBvYmouYmFyOwogICAgfQp9CgovLyBOYXJyb3dpbmcgYnkgYWxpYXNlZCBkaXNjcmltaW5hbnQgcHJvcGVydHkgYWNjZXNzCgpmdW5jdGlvbiBmMzAob2JqOiB7IGtpbmQ6ICdmb28nLCBmb286IHN0cmluZyB9IHwgeyBraW5kOiAnYmFyJywgYmFyOiBudW1iZXIgfSk6IHZvaWQgewogICAgY29uc3Qga2luZCA9IG9iai5raW5kOwogICAgaWYgKGtpbmQgPT09ICdmb28nKSB7CiAgICAgICAgb2JqLmZvbzsKICAgIH0KICAgIGVsc2UgewogICAgICAgIG9iai5iYXI7CiAgICB9Cn0KCmZ1bmN0aW9uIGYzMShvYmo6IHsga2luZDogJ2ZvbycsIGZvbzogc3RyaW5nIH0gfCB7IGtpbmQ6ICdiYXInLCBiYXI6IG51bWJlciB9KTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQgfSA9IG9iajsKICAgIGlmIChraW5kID09PSAnZm9vJykgewogICAgICAgIG9iai5mb287CiAgICB9CiAgICBlbHNlIHsKICAgICAgICBvYmouYmFyOwogICAgfQp9CgpmdW5jdGlvbiBmMzIob2JqOiB7IGtpbmQ6ICdmb28nLCBmb286IHN0cmluZyB9IHwgeyBraW5kOiAnYmFyJywgYmFyOiBudW1iZXIgfSk6IHZvaWQgewogICAgY29uc3QgeyBraW5kOiBrIH0gPSBvYmo7CiAgICBpZiAoayA9PT0gJ2ZvbycpIHsKICAgICAgICBvYmouZm9vOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgb2JqLmJhcjsKICAgIH0KfQoKZnVuY3Rpb24gZjMzKG9iajogeyBraW5kOiAnZm9vJywgZm9vOiBzdHJpbmcgfSB8IHsga2luZDogJ2JhcicsIGJhcjogbnVtYmVyIH0pOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCB9ID0gb2JqOwogICAgc3dpdGNoIChraW5kKSB7CiAgICAgICAgY2FzZSAnZm9vJzogb2JqLmZvbzsgYnJlYWs7CiAgICAgICAgY2FzZSAnYmFyJzogb2JqLmJhcjsgYnJlYWs7CiAgICB9Cn0KCgpjbGFzcyBDMTAgewogICAgY29uc3RydWN0b3IocmVhZG9ubHkgeDogc3RyaW5nIHwgbnVtYmVyKSB7CiAgICAgICAgY29uc3QgdGhpc1hfaXNTdHJpbmcgPSB0eXBlb2YgdGhpcy54ID09PSAnc3RyaW5nJzsKICAgICAgICBjb25zdCB4SXNTdHJpbmcgPSB0eXBlb2YgeCA9PT0gJ3N0cmluZyc7CiAgICAgICAgaWYgKHRoaXNYX2lzU3RyaW5nICYmIHhJc1N0cmluZykgewogICAgICAgICAgICBsZXQgczogc3RyaW5nOwogICAgICAgICAgICBzID0gdGhpcy54OwogICAgICAgICAgICBzID0geDsKICAgICAgICB9CiAgICB9Cn0KCmNsYXNzIEMxMSB7CiAgICBjb25zdHJ1Y3RvcihyZWFkb25seSB4OiBzdHJpbmcgfCBudW1iZXIpIHsKICAgICAgICBjb25zdCB0aGlzWF9pc1N0cmluZyA9IHR5cGVvZiB0aGlzLnggPT09ICdzdHJpbmcnOwogICAgICAgIGNvbnN0IHhJc1N0cmluZyA9IHR5cGVvZiB4ID09PSAnc3RyaW5nJzsKICAgICAgICBpZiAodGhpc1hfaXNTdHJpbmcgJiYgeElzU3RyaW5nKSB7CiAgICAgICAgICAgIC8vIFNvbWUgbmFycm93aW5ncyBtYXkgYmUgaW52YWxpZGF0ZWQgZHVlIHRvIGxhdGVyIGFzc2lnbm1lbnRzLgogICAgICAgICAgICBsZXQgczogc3RyaW5nOwogICAgICAgICAgICBzID0gdGhpcy54OwogICAgICAgICAgICBzID0geDsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHRoaXMueCA9IDEwOwogICAgICAgICAgICB4ID0gMTA7CiAgICAgICAgfQogICAgfQp9CgovLyBNaXhpbmcgb2YgYWxpYXNlZCBkaXNjcmltaW5hbnRzIGFuZCBjb25kaXRpb25hbHMKCmZ1bmN0aW9uIGY0MChvYmo6IHsga2luZDogJ2ZvbycsIGZvbz86IHN0cmluZyB9IHwgeyBraW5kOiAnYmFyJywgYmFyPzogbnVtYmVyIH0pOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCB9ID0gb2JqOwogICAgY29uc3QgaXNGb28gPSBraW5kID09ICdmb28nOwogICAgaWYgKGlzRm9vICYmIG9iai5mb28pIHsKICAgICAgICBsZXQgdDogc3RyaW5nID0gb2JqLmZvbzsKICAgIH0KfQoKLy8gVW5zdXBwb3J0ZWQgbmFycm93aW5nIG9mIGRlc3RydWN0dXJlZCBwYXlsb2FkIGJ5IGRlc3RydWN0dXJlZCBkaXNjcmltaW5hbnQKCnR5cGUgRGF0YSA9IHsga2luZDogJ3N0cicsIHBheWxvYWQ6IHN0cmluZyB9IHwgeyBraW5kOiAnbnVtJywgcGF5bG9hZDogbnVtYmVyIH07CgpmdW5jdGlvbiBnZzIob2JqOiBEYXRhKTogdm9pZCB7CiAgICBpZiAob2JqLmtpbmQgPT09ICdzdHInKSB7CiAgICAgICAgbGV0IHQ6IHN0cmluZyA9IG9iai5wYXlsb2FkOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgbGV0IHQ6IG51bWJlciA9IG9iai5wYXlsb2FkOwogICAgfQp9CgpmdW5jdGlvbiBmb28oeyBraW5kLCBwYXlsb2FkIH06IERhdGEpOiB2b2lkIHsKICAgIGlmIChraW5kID09PSAnc3RyJykgewogICAgICAgIGxldCB0OiBzdHJpbmcgPSBwYXlsb2FkOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgbGV0IHQ6IG51bWJlciA9IHBheWxvYWQ7CiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzQ1ODMwCgpjb25zdCBvYmogPSB7CiAgICBmbjogKCk6IGJvb2xlYW4gPT4gdHJ1ZQp9OwoKaWYgKGEpIHsgfQoKY29uc3QgYTogYm9vbGVhbiA9IG9iai5mbigpOwoKLy8gcmVwcm8gZnJvbSBodHRwczovL2dpdGh1Yi5jb20vbWljcm9zb2Z0L1R5cGVTY3JpcHQvaXNzdWVzLzUzMjY3CmNsYXNzIFV0aWxzIHsKICBzdGF0aWMgaXNEZWZpbmVkPFQ+KHZhbHVlOiBUKTogdmFsdWUgaXMgTm9uTnVsbGFibGU8VD4gewogICAgcmV0dXJuIHZhbHVlICE9IG51bGw7CiAgfQp9CgpjbGFzcyBBNTMyNjcgewogIHB1YmxpYyByZWFkb25seSB0ZXN0TnVtYmVyOiBudW1iZXIgfCB1bmRlZmluZWQ7CgogIGZvbygpOiB2b2lkIHsKICAgIGNvbnN0IGlzTnVtYmVyID0gVXRpbHMuaXNEZWZpbmVkKHRoaXMudGVzdE51bWJlcik7CgogICAgaWYgKGlzTnVtYmVyKSB7CiAgICAgIGNvbnN0IHg6IG51bWJlciA9IHRoaXMudGVzdE51bWJlcjsKICAgIH0KICB9Cn0= - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileRegressionTests.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileRegressionTests.d.ts.map.diff deleted file mode 100644 index b86714262176e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declFileRegressionTests.d.ts.map.diff +++ /dev/null @@ -1,16 +0,0 @@ -// [[Reason: Sourcemap is more detailed]] //// - -//// [tests/cases/compiler/declFileRegressionTests.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,6 +1,6 @@ - - //// [declFileRegressionTests.d.ts.map] --{"version":3,"file":"declFileRegressionTests.d.ts","sourceRoot":"","sources":["declFileRegressionTests.ts"],"names":[],"mappings":"AAEA,QAAA,IAAI,CAAC;;;aAA4B,IAAI;;CAAgB,CAAC"} -+{"version":3,"file":"declFileRegressionTests.d.ts","sourceRoot":"","sources":["declFileRegressionTests.ts"],"names":[],"mappings":"AAEA,QAAA,IAAI,CAAC;IAAK,CAAC;IAAQ,CAAC;IAAM,CAAC,QAAM,IAAI;IAAS,CAAC;CAAM,CAAC"} - --//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgbjogew0KICAgIHc6IGFueTsNCiAgICB4OiBzdHJpbmc7DQogICAgeTogKCkgPT4gdm9pZDsNCiAgICB6OiBudW1iZXI7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZGVjbEZpbGVSZWdyZXNzaW9uVGVzdHMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbEZpbGVSZWdyZXNzaW9uVGVzdHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xGaWxlUmVncmVzc2lvblRlc3RzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLFFBQUEsSUFBSSxDQUFDOzs7YUFBNEIsSUFBSTs7Q0FBZ0IsQ0FBQyJ9,Ly8gJ251bGwnIG5vdCBjb252ZXJ0ZWQgdG8gJ2FueScgaW4gZC50cwovLyBmdW5jdGlvbiB0eXBlcyBub3QgcGlwZWQgdGhyb3VnaCBjb3JyZWN0bHkKdmFyIG4gPSB7IHc6IG51bGwsIHg6ICcnLCB5OiAoKTogdm9pZCA9PiB7IH0sIHo6IDMyIH07Cgo= -+//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgbjogew0KICAgIHc6IGFueTsNCiAgICB4OiBzdHJpbmc7DQogICAgeTogKCkgPT4gdm9pZDsNCiAgICB6OiBudW1iZXI7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZGVjbEZpbGVSZWdyZXNzaW9uVGVzdHMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbEZpbGVSZWdyZXNzaW9uVGVzdHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xGaWxlUmVncmVzc2lvblRlc3RzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLFFBQUEsSUFBSSxDQUFDO0lBQUssQ0FBQztJQUFRLENBQUM7SUFBTSxDQUFDLFFBQU0sSUFBSTtJQUFTLENBQUM7Q0FBTSxDQUFDIn0=,Ly8gJ251bGwnIG5vdCBjb252ZXJ0ZWQgdG8gJ2FueScgaW4gZC50cwovLyBmdW5jdGlvbiB0eXBlcyBub3QgcGlwZWQgdGhyb3VnaCBjb3JyZWN0bHkKdmFyIG4gPSB7IHc6IG51bGwsIHg6ICcnLCB5OiAoKTogdm9pZCA9PiB7IH0sIHo6IDMyIH07Cgo= - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern.d.ts.map.diff deleted file mode 100644 index d83ad95fb9cbd..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern.d.ts.map.diff +++ /dev/null @@ -1,16 +0,0 @@ -// [[Reason: Sourcemap is more detailed]] //// - -//// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,6 +1,6 @@ - - //// [declarationEmitDestructuringObjectLiteralPattern.d.ts.map] --{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern.d.ts","sourceRoot":"","sources":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AAM,EAAE,EAAE,MAAgB,CAAC;IAC3B,MAAM,EAAE,EAAE,MAAgB,CAAC;IAC3B,MAAM,EAAE,EAAE,OAAiB,CAAC;CACtC"} -+{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,IAAI;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,IAAI;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAE7B,QAAA,MAAM,IAAI;IAAK,CAAC;IAAK,CAAC;QAAI,CAAC;QAAW,CAAC;YAAI,CAAC;;;CAAY,CAAC;AACzD,QAAA,MAAM,GAAG,EAAE,MAAe,CAAC;AAC3B,QAAA,MAAM,GAAG,EAAE,MAAiB,CAAC;AAC7B,QAAA,MAAM,GAAG,EAAE,OAAoB,CAAC;AAEhC,iBAAS,GAAG,IAAI;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,EAA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sKY29uc3QgeTExOiBzdHJpbmcgPSBkZXN0LmIuYTsKY29uc3QgejExOiBib29sZWFuID0gZGVzdC5iLmIuYTsKCmZ1bmN0aW9uIGYxNSgpOiB7CiAgICBhNDogc3RyaW5nOwogICAgYjQ6IG51bWJlcjsKICAgIGM0OiBib29sZWFuOwp9IHsKICAgIHZhciBhNCA9ICJoZWxsbyI7CiAgICB2YXIgYjQgPSAxOwogICAgdmFyIGM0ID0gdHJ1ZTsKICAgIHJldHVybiB7IGE0LCBiNCwgYzQgfTsKfQpjb25zdCBkZXN0XzE6IHsKICAgIGE0OiBzdHJpbmc7CiAgICBiNDogbnVtYmVyOwogICAgYzQ6IGJvb2xlYW47Cn0gPSBmMTUoKTsKY29uc3QgYTQ6IHN0cmluZyA9IGRlc3RfMS5hNDsKY29uc3QgYjQ6IG51bWJlciA9IGRlc3RfMS5iNDsKY29uc3QgYzQ6IGJvb2xlYW4gPSBkZXN0XzEuYzQ7Cgptb2R1bGUgbSB7CiAgICBjb25zdCBkZXN0ID0gZjE1KCk7CiAgICBleHBvcnQgY29uc3QgYTQ6IHN0cmluZyA9IGRlc3QuYTQ7CiAgICBleHBvcnQgY29uc3QgYjQ6IG51bWJlciA9IGRlc3QuYjQ7CiAgICBleHBvcnQgY29uc3QgYzQ6IGJvb2xlYW4gPSBkZXN0LmM0Owp9 - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map.diff deleted file mode 100644 index 96dc20de0c7ed..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map.diff +++ /dev/null @@ -1,16 +0,0 @@ -// [[Reason: Sourcemap is more detailed]] //// - -//// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,6 +1,6 @@ - - //// [declarationEmitDestructuringObjectLiteralPattern1.d.ts.map] --{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern1.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern1.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,IAAI;;;CAAyB,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,IAAI;;;CAAyB,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC"} -+{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern1.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern1.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,IAAI;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,EAAE,EAAE,MAAgB,C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ZWxsbyIgfTsKY29uc3QgYTI6IG51bWJlciA9IGRlc3QueDk7CmNvbnN0IGIyOiBzdHJpbmcgPSBkZXN0Lnk5Ow== - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map.diff deleted file mode 100644 index 788178647b7f2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map.diff +++ /dev/null @@ -1,16 +0,0 @@ -// [[Reason: Sourcemap is more detailed]] //// - -//// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,6 +1,6 @@ - - //// [declarationEmitDestructuringObjectLiteralPattern2.d.ts.map] --{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern2.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern2.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,IAAI;;;;;;;;CAA8C,CAAC;AACzD,QAAA,MAAM,GAAG,EAAE,MAAe,CAAC;AAC3B,QAAA,MAAM,GAAG,EAAE,MAAiB,CAAC;AAC7B,QAAA,MAAM,GAAG,EAAE,OAAoB,CAAC;AAEhC,iBAAS,GAAG,IAAI;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,OAAO,CAAC;CACf,CAKA;AACD,QAAA,MAAM,MAAM,EAAE;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,OAAO,CAAC;CACP,CAAC;AACV,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,EAAE,EAAE,OAAmB,CAAC;AAE9B,kBAAO,CAAC,CAAC;IAEE,MAAM,EAAE,EAAE,MAAgB,CAAC;IAC3B,MAAM,EAAE,EAAE,MAAgB,CAAC;IAC3B,MAAM,EAAE,EAAE,OAAiB,CAAC;CACtC"} -+{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern2.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern2.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,IAAI;IAAK,CAAC;IAAK,CAAC;QAAI,CAAC;QAAW,CAAC;YAAI,CAAC;;;CAAY,CAAC;AACzD,QAAA,MAAM,GAAG,EAAE,MAAe,CAAC;AAC3B,QAAA,MAAM,GAAG,EAAE,MAAiB,CAAC;AAC7B,QAAA,MAAM,GAAG,EAAE,OAAoB,CAAC;AAEhC,iBAAS,GAAG,IAAI;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,OAAO,CAAC;CACf,CAKA;AACD,QAAA,MAAM,MAAM,EAAE;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,OAAO,CAAC;CACP,CAAC;AACV,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,EAAE,EAAE,OAAmB,CAAC;AAE9B,kBAAO,CAAC,CAAC;IAEE,MAAM,EAAE,EAAE,MAAgB,CAAC;IAC3B,MAAM,EAAE,EAAE,MAAgB,CAAC;IAC3B,MAAM,EAAE,EAAE,OAAiB,CAAC;CACtC"} - --//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBkZXN0OiB7DQogICAgYTogbnVtYmVyOw0KICAgIGI6IHsNCiAgICAgICAgYTogc3RyaW5nOw0KICAgICAgICBiOiB7DQogICAgICAgICAgICBhOiBib29sZWFuOw0KICAgICAgICB9Ow0KICAgIH07DQ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YTQsIGI0LCBjNCB9Owp9CmNvbnN0IGRlc3RfMTogewogICAgYTQ6IHN0cmluZzsKICAgIGI0OiBudW1iZXI7CiAgICBjNDogYm9vbGVhbjsKfSA9IGYxNSgpOwpjb25zdCBhNDogc3RyaW5nID0gZGVzdF8xLmE0Owpjb25zdCBiNDogbnVtYmVyID0gZGVzdF8xLmI0Owpjb25zdCBjNDogYm9vbGVhbiA9IGRlc3RfMS5jNDsKCm1vZHVsZSBtIHsKICAgIGNvbnN0IGRlc3QgPSBmMTUoKTsKICAgIGV4cG9ydCBjb25zdCBhNDogc3RyaW5nID0gZGVzdC5hNDsKICAgIGV4cG9ydCBjb25zdCBiNDogbnVtYmVyID0gZGVzdC5iNDsKICAgIGV4cG9ydCBjb25zdCBjNDogYm9vbGVhbiA9IGRlc3QuYzQ7Cn0= -+//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBkZXN0OiB7DQogICAgYTogbnVtYmVyOw0KICAgIGI6IHsNCiAgICAgICAgYTogc3RyaW5nOw0KICAgICAgICBiOiB7DQogICAgICAgICAgICBhOiBib29sZWFuOw0KICAgICAgICB9Ow0KICAgIH07DQp9Ow0KZGVjbGFyZSBjb25zdCB4MTE6IG51bWJlcjsNCmRlY2xhcmUgY29uc3QgeTExOiBzdHJpbmc7DQpkZWNsYXJlIGNvbnN0IHoxMTogYm9vbGVhbjsNCmRlY2xhcmUgZnVuY3Rpb24gZjE1KCk6IHsNCiAgICBhNDogc3RyaW5nOw0KICAgIGI0OiBudW1iZXI7DQogICAgYzQ6IGJvb2xlYW47DQp9Ow0KZGVjbGFyZSBjb25zdCBkZXN0XzE6IHsNCiAgICBhNDogc3RyaW5nOw0KICAgIGI0OiBudW1iZXI7DQogICAgYzQ6IGJvb2xlYW47DQp9Ow0KZGVjbGFyZSBjb25zdCBhNDogc3RyaW5nOw0KZGVjbGFyZSBjb25zdCBiNDogbnVtYmVyOw0KZGVjbGFyZSBjb25zdCBjNDogYm9vbGVhbjs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iNDsKICAgIGV4cG9ydCBjb25zdCBjNDogYm9vbGVhbiA9IGRlc3QuYzQ7Cn0= - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitInferredDefaultExportType2.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitInferredDefaultExportType2.d.ts.map.diff deleted file mode 100644 index dafacb76021ed..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitInferredDefaultExportType2.d.ts.map.diff +++ /dev/null @@ -1,16 +0,0 @@ -// [[Reason: Sourcemap is more detailed]] //// - -//// [tests/cases/compiler/declarationEmitInferredDefaultExportType2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,6 +1,6 @@ - - //// [declarationEmitInferredDefaultExportType2.d.ts.map] --{"version":3,"file":"declarationEmitInferredDefaultExportType2.d.ts","sourceRoot":"","sources":["declarationEmitInferredDefaultExportType2.ts"],"names":[],"mappings":";;;;;AACA,kBAIC"} -+{"version":3,"file":"declarationEmitInferredDefaultExportType2.d.ts","sourceRoot":"","sources":["declarationEmitInferredDefaultExportType2.ts"],"names":[],"mappings":";IAEE,GAAG;IACH,GAAG;IACH,GAAG;;AAHL,kBAIC"} - --//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBfZGVmYXVsdDogew0KICAgIGZvbzogcmVhZG9ubHkgW107DQogICAgYmFyOiBhbnk7DQogICAgYmF6OiBhbnk7DQp9Ow0KZXhwb3J0ID0gX2RlZmF1bHQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbkVtaXRJbmZlcnJlZERlZmF1bHRFeHBvcnRUeXBlMi5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0SW5mZXJyZWREZWZhdWx0RXhwb3J0VHlwZTIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdEluZmVycmVkRGVmYXVsdEV4cG9ydFR5cGUyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQ0Esa0JBSUMifQ==,Ly8gdGVzdC50cwpleHBvcnQgPSB7CiAgZm9vOiBbXSBhcyBjb25zdCwKICBiYXI6IHVuZGVmaW5lZCwKICBiYXo6IG51bGwKfQ== -+//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBfZGVmYXVsdDogew0KICAgIGZvbzogcmVhZG9ubHkgW107DQogICAgYmFyOiBhbnk7DQogICAgYmF6OiBhbnk7DQp9Ow0KZXhwb3J0ID0gX2RlZmF1bHQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbkVtaXRJbmZlcnJlZERlZmF1bHRFeHBvcnRUeXBlMi5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0SW5mZXJyZWREZWZhdWx0RXhwb3J0VHlwZTIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdEluZmVycmVkRGVmYXVsdEV4cG9ydFR5cGUyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7SUFFRSxHQUFHO0lBQ0gsR0FBRztJQUNILEdBQUc7O0FBSEwsa0JBSUMifQ==,Ly8gdGVzdC50cwpleHBvcnQgPSB7CiAgZm9vOiBbXSBhcyBjb25zdCwKICBiYXI6IHVuZGVmaW5lZCwKICBiYXo6IG51bGwKfQ== - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuredDeclarationEmit.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuredDeclarationEmit.d.ts.map.diff deleted file mode 100644 index 0eed8c8766d78..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuredDeclarationEmit.d.ts.map.diff +++ /dev/null @@ -1,19 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/destructuredDeclarationEmit.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,9 +1,9 @@ - - //// [foo.d.ts.map] --{"version":3,"file":"foo.d.ts","sourceRoot":"","sources":["foo.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,GAAG;;;;;;;;;CAAwE,CAAC;AAClF,QAAA,MAAM,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IAAC,GAAG,EAAE,KAAK,CAAA;CAAC,EAAE;IAAC,GAAG,EAAE,KAAK,CAAA;CAAC,CAAC,CAAC,CAA4D,CAAC;AAC/H,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC"} -+{"version":3,"file":"foo.d.ts","sourceRoot":"","sources":["foo.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,GAAG;IAAK,GAAG;IAAW,GAAG;IAAW,GAAG;QAAI,IAAI;YAAI,GAAG;YAAO,GAAG;;;CAAW,CAAC;AAClF,QAAA,MAAM,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IAAC,GAAG,EAAE,KAAK,CAAA;CAAC,EAAE;IAAC,GAAG,EAAE,KAAK,CAAA;CAAC,CAAC,CAAC,CAA4D,CAAC;AAC/H,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC"} - --//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBmb286IHsNCiAgICBiYXI6IHN0cmluZzsNCiAgICBiYXQ6IHN0cmluZzsNCiAgICBiYW06IHsNCiAgICAgICAgYm9yazogew0KICAgICAgICAgICAgYmFyOiBzdHJpbmc7DQogICAgICAgICAgICBiYXo6IHN0cmluZzsNCiAgICAgICAgfTsNCiAgICB9Ow0KfT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W3tkZWY6ICdkZWYnfSwge3NlYzogJ3NlYyd9XV1dID0gWzAsIDEsIDIsIFsnYScsICdiJywgJ2MnLCBbe2RlZjogJ2RlZid9LCB7c2VjOiAnc2VjJ31dXV07CmV4cG9ydCB7IGZvbywgYXJyIH07 - - - //// [index.d.ts.map] - {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEhB,QAAA,MAAM,GAAG,EAAE,MAAgB,CAAC;AAG5B,QAAA,MAAM,IAAI,EAAE,MAAyB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AAEjB,QAAA,MAAM,GAAG,EAAE,CAAU,CAAC;AACtB,QAAA,MAAM,GAAG,EAAE,GAAe,CAAC;AAC3B,QAAA,MAAM,GAAG,EAAE,KAAwB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAOzB,QAAA,MAAM,IAAI,EAAE,MAAiB,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,CAAC"} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/escapedReservedCompilerNamedIdentifier.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/escapedReservedCompilerNamedIdentifier.d.ts.map.diff deleted file mode 100644 index 36954bd15ba6a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/escapedReservedCompilerNamedIdentifier.d.ts.map.diff +++ /dev/null @@ -1,16 +0,0 @@ -// [[Reason: Sourcemap is more detailed]] //// - -//// [tests/cases/compiler/escapedReservedCompilerNamedIdentifier.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,6 +1,6 @@ - - //// [escapedReservedCompilerNamedIdentifier.d.ts.map] --{"version":3,"file":"escapedReservedCompilerNamedIdentifier.d.ts","sourceRoot":"","sources":["escapedReservedCompilerNamedIdentifier.ts"],"names":[],"mappings":"AACA,QAAA,IAAI,SAAS,QAAK,CAAC;AACnB,QAAA,IAAI,CAAC;;CAEJ,CAAC;AACF,QAAA,IAAI,CAAC,EAAE,MAAuB,CAAC;AAC/B,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAwB,CAAC;AAEjC,QAAA,IAAI,UAAU,QAAK,CAAC;AACpB,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAyB,CAAC;AAClC,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAyB,CAAC;AAElC,QAAA,IAAI,QAAQ,QAAK,CAAC;AAClB,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAuB,CAAC;AAChC,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAuB,CAAC"} -+{"version":3,"file":"escapedReservedCompilerNamedIdentifier.d.ts","sourceRoot":"","sources":["escapedReservedCompilerNamedIdentifier.ts"],"names":[],"mappings":"AACA,QAAA,IAAI,SAAS,QAAK,CAAC;AACnB,QAAA,IAAI,CAAC;;CAEJ,CAAC;AACF,QAAA,IAAI,CAAC,EAAE,MAAuB,CAAC;AAC/B,QAAA,IAAI,EAAE;IACF,SAAS;CACZ,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAwB,CAAC;AAEjC,QAAA,IAAI,UAAU,QAAK,CAAC;AACpB,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAyB,CAAC;AAClC,QAAA,IAAI,EAAE;IACF,UAAU;CACb,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAyB,CAAC;AAElC,QAAA,IAAI,QAAQ,QAAK,CAAC;AAClB,QAAA,IAAI,E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MAp9Owp2YXIgYjI6IG51bWJlciA9IG8yWyJfX19wcm90b19fIl07CnZhciBvMyA9IHsKICAgIF9fX3Byb3RvX186IDAKfTsKdmFyIGIzOiBudW1iZXIgPSBvM1siX19fcHJvdG9fXyJdOwovLyBPbmUgdW5kZXJzY29yZQp2YXIgX3Byb3RvX18gPSAxMDsKdmFyIG80ID0gewogICAgIl9wcm90b19fIjogMAp9Owp2YXIgYjQ6IG51bWJlciA9IG80WyJfcHJvdG9fXyJdOwp2YXIgbzUgPSB7CiAgICBfcHJvdG9fXzogMAp9Owp2YXIgYjU6IG51bWJlciA9IG81WyJfcHJvdG9fXyJdOw== -+//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgX19wcm90b19fOiBudW1iZXI7DQpkZWNsYXJlIHZhciBvOiB7DQogICAgX19wcm90b19fOiBudW1iZXI7DQp9Ow0KZGVjbGFyZSB2YXIgYjogbnVtYmVyOw0KZGVjbGFyZSB2YXIgbzE6IHsNCiAgICBfX3Byb3RvX186IG51bWJlcjsNCn07DQpkZWNsYXJlIHZhciBiMTogbnVtYmVyOw0KZGVjbGFyZSB2YXIgX19fcHJvdG9fXzogbnVtYmVyOw0KZGVjbGFyZSB2YXIgbzI6IHsNCiAgICBfX19wcm90b19fOiBudW1iZXI7DQp9Ow0KZGVjbGFyZSB2YXIgYjI6IG51bWJlcjsNCmRlY2xhcmUgdmFyIG8zOiB7DQogICAgX19fcHJvdG9fXzogbnVtYmVyOw0KfTsNCmRlY2xhcmUgdmFyIGIzOiBudW1iZXI7DQpkZWNsYXJlIHZhciBfcHJvdG9fXzogbnVtYmVyOw0KZGVjbGFyZSB2YXIgbzQ6IHsNCiAgICBfcHJvdG9fXzogbnVtYmVyOw0KfTsNCmRlY2xhcmUgdmFyIGI0OiBudW1iZXI7DQpkZWNsYXJlIHZhciBvNTogew0KICAgIF9wcm90b19fOiBudW1iZXI7DQp9Ow0KZGVjbGFyZSB2YXIgYjU6IG51bWJlcjsNCi8vIy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SAxMDsKdmFyIG8gPSB7CiAgICAiX19wcm90b19fIjogMAp9Owp2YXIgYjogbnVtYmVyID0gb1siX19wcm90b19fIl07CnZhciBvMSA9IHsKICAgIF9fcHJvdG9fXzogMAp9Owp2YXIgYjE6IG51bWJlciA9IG8xWyJfX3Byb3RvX18iXTsKLy8gVHJpcGxlIHVuZGVyc2NvcmVzCnZhciBfX19wcm90b19fID0gMTA7CnZhciBvMiA9IHsKICAgICJfX19wcm90b19fIjogMAp9Owp2YXIgYjI6IG51bWJlciA9IG8yWyJfX19wcm90b19fIl07CnZhciBvMyA9IHsKICAgIF9fX3Byb3RvX186IDAKfTsKdmFyIGIzOiBudW1iZXIgPSBvM1siX19fcHJvdG9fXyJdOwovLyBPbmUgdW5kZXJzY29yZQp2YXIgX3Byb3RvX18gPSAxMDsKdmFyIG80ID0gewogICAgIl9wcm90b19fIjogMAp9Owp2YXIgYjQ6IG51bWJlciA9IG80WyJfcHJvdG9fXyJdOwp2YXIgbzUgPSB7CiAgICBfcHJvdG9fXzogMAp9Owp2YXIgYjU6IG51bWJlciA9IG81WyJfcHJvdG9fXyJdOw== - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/stringLiteralObjectLiteralDeclaration1.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/stringLiteralObjectLiteralDeclaration1.d.ts.map.diff deleted file mode 100644 index dc9e165fbdd29..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/stringLiteralObjectLiteralDeclaration1.d.ts.map.diff +++ /dev/null @@ -1,16 +0,0 @@ -// [[Reason: Sourcemap is more detailed]] //// - -//// [tests/cases/compiler/stringLiteralObjectLiteralDeclaration1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,6 +1,6 @@ - - //// [stringLiteralObjectLiteralDeclaration1.d.ts.map] --{"version":3,"file":"stringLiteralObjectLiteralDeclaration1.d.ts","sourceRoot":"","sources":["stringLiteralObjectLiteralDeclaration1.ts"],"names":[],"mappings":"AAAA,kBAAO,EAAE,CAAC;IACD,IAAI,CAAC;;KAAmB,CAAC;CACjC"} -+{"version":3,"file":"stringLiteralObjectLiteralDeclaration1.d.ts","sourceRoot":"","sources":["stringLiteralObjectLiteralDeclaration1.ts"],"names":[],"mappings":"AAAA,kBAAO,EAAE,CAAC;IACD,IAAI,CAAC;QAAK,SAAS;KAAK,CAAC;CACjC"} - --//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBuYW1lc3BhY2UgbTEgew0KICAgIHZhciBuOiB7DQogICAgICAgICdmb28gYmFyJzogbnVtYmVyOw0KICAgIH07DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1zdHJpbmdMaXRlcmFsT2JqZWN0TGl0ZXJhbERlY2xhcmF0aW9uMS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaW5nTGl0ZXJhbE9iamVjdExpdGVyYWxEZWNsYXJhdGlvbjEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInN0cmluZ0xpdGVyYWxPYmplY3RMaXRlcmFsRGVjbGFyYXRpb24xLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGtCQUFPLEVBQUUsQ0FBQztJQUNELElBQUksQ0FBQzs7S0FBbUIsQ0FBQztDQUNqQyJ9,bW9kdWxlIG0xIHsKICBleHBvcnQgdmFyIG4gPSB7ICdmb28gYmFyJzogNCB9Owp9Cg== -+//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBuYW1lc3BhY2UgbTEgew0KICAgIHZhciBuOiB7DQogICAgICAgICdmb28gYmFyJzogbnVtYmVyOw0KICAgIH07DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1zdHJpbmdMaXRlcmFsT2JqZWN0TGl0ZXJhbERlY2xhcmF0aW9uMS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaW5nTGl0ZXJhbE9iamVjdExpdGVyYWxEZWNsYXJhdGlvbjEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInN0cmluZ0xpdGVyYWxPYmplY3RMaXRlcmFsRGVjbGFyYXRpb24xLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGtCQUFPLEVBQUUsQ0FBQztJQUNELElBQUksQ0FBQztRQUFLLFNBQVM7S0FBSyxDQUFDO0NBQ2pDIn0=,bW9kdWxlIG0xIHsKICBleHBvcnQgdmFyIG4gPSB7ICdmb28gYmFyJzogNCB9Owp9Cg== - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateLiteralTypes2.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateLiteralTypes2.d.ts.map.diff deleted file mode 100644 index e8c4a9731dcd1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/templateLiteralTypes2.d.ts.map.diff +++ /dev/null @@ -1,16 +0,0 @@ -// [[Reason: Sourcemap is more detailed]] //// - -//// [tests/cases/conformance/types/literal/templateLiteralTypes2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,6 +1,6 @@ - - //// [templateLiteralTypes2.d.ts.map] --{"version":3,"file":"templateLiteralTypes2.d.ts","sourceRoot":"","sources":["templateLiteralTypes2.ts"],"names":[],"mappings":"AAAA,iBAAS,GAAG,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,CASzF;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE9B;AAED,iBAAS,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAS7B;AAED,iBAAS,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI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M0MTczMgoKY29uc3QgcGl4ZWxWYWx1ZTogbnVtYmVyID0gMjI7Cgp0eXBlIFBpeGVsVmFsdWVUeXBlID0gYCR7bnVtYmVyfXB4YDsKCmNvbnN0IHBpeGVsU3RyaW5nOiBQaXhlbFZhbHVlVHlwZSA9IGAyMnB4YDsKCmNvbnN0IHBpeGVsU3RyaW5nV2l0aFRlbXBsYXRlOiBQaXhlbFZhbHVlVHlwZSA9IGAke3BpeGVsVmFsdWV9cHhgOwoKLy8gUmVwcm8gZnJvbSAjNDMxNDMKCmZ1bmN0aW9uIGdldENhcmRUaXRsZSh0aXRsZTogc3RyaW5nKTogYHRlc3QtJHtzdHJpbmd9YCB7CiAgICByZXR1cm4gYHRlc3QtJHt0aXRsZX1gOwp9CgovLyBSZXBybyBmcm9tICM0MzQyNAoKY29uc3QgaW50ZXJwb2xhdGVkU3R5bGUgPSB7IHJvdGF0ZTogMTIgfTsKZnVuY3Rpb24gQzIodHJhbnNmb3JtOiAiLW1vei1pbml0aWFsIiB8IChzdHJpbmcgJiB7fSkpOiBudW1iZXIgeyByZXR1cm4gMTI7IH0KQzIoYHJvdGF0ZSgke2ludGVycG9sYXRlZFN0eWxlLnJvdGF0ZX1kaWcpYCk7Cg== - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/uniqueSymbolsDeclarationsErrors.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/uniqueSymbolsDeclarationsErrors.d.ts.map.diff deleted file mode 100644 index 4ca1f114c45d3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/uniqueSymbolsDeclarationsErrors.d.ts.map.diff +++ /dev/null @@ -1,16 +0,0 @@ -// [[Reason: Sourcemap is more detailed]] //// - -//// [tests/cases/conformance/types/uniqueSymbol/uniqueSymbolsDeclarationsErrors.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,6 +1,6 @@ - - //// [uniqueSymbolsDeclarationsErrors.d.ts.map] --{"version":3,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GhQcml2YXRlTmFtZWRBY2Nlc3NvcnMgewogICAgZ2V0IFtzXSgpOiBhbnkgeyByZXR1cm4gdW5kZWZpbmVkOyB9CiAgICBzZXQgW3NdKHY6IGFueSkgeyB9CiAgICBzdGF0aWMgZ2V0IFtzXSgpOiBhbnkgeyByZXR1cm4gdW5kZWZpbmVkOyB9CiAgICBzdGF0aWMgc2V0IFtzXSh2OiBhbnkpIHsgfQp9 - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/vardecl.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/vardecl.d.ts.map.diff deleted file mode 100644 index 2225d8111a734..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/vardecl.d.ts.map.diff +++ /dev/null @@ -1,16 +0,0 @@ -// [[Reason: Sourcemap is more detailed]] //// - -//// [tests/cases/compiler/vardecl.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,6 +1,6 @@ - - //// [vardecl.d.ts.map] --{"version":3,"file":"vardecl.d.ts","sourceRoot":"","sources":["vardecl.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,SAAS,EAAE,GAAG,CAAC;AAEnB,QAAA,IAAI,UAAU,EAAE,GAAG,CAAC;AACpB,QAAA,IAAI,iBAAiB,EAAE,MAAM,CAAC;AAC9B,QAAA,IAAI,gBAAgB,EAAE,MAAM,EAAE,CAAC;AAE/B,QAAA,IAAI,mBAAmB,QAAK,CAAC;AAE7B,QAAA,IAAI,oBAAoB;;;;CAAqC,CAAC;AAE9D,OAAO,CAAC,IAAI,WAAW,EAAE,GAAG,CAAC;AAC7B,OAAO,CAAC,IAAI,WAAW,EAAE,GAAG,CAAA;AAE5B,OAAO,CAAC,IAAI,YAAY,EAAE,GAAG,CAAC;AAC9B,OAAO,CAAC,IAAI,kBAAkB,EAAE,MAAM,CAAC;AAEvC,QAAA,IAAI,QAAQ,EAAE,MAAM,EAAe,CAAC;AAEpC,QAAA,IAAI,mBAAmB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CgogICAgY2xhc3MgQyB7CiAgICAgICAgY29uc3RydWN0b3IgKHB1YmxpYyBiKSB7CiAgICAgICAgfQogICAgfQoKICAgIGV4cG9ydCBjbGFzcyBDMiB7CiAgICAgICAgY29uc3RydWN0b3IgKHB1YmxpYyBiOiBhbnkpIHsKICAgICAgICB9CiAgICB9CiAgICB2YXIgbTsKICAgIGRlY2xhcmUgdmFyIGQxLCBkMjsKICAgIHZhciBiMjM7CiAgICBkZWNsYXJlIHZhciB2MTsKICAgIGV4cG9ydCB2YXIgbUU6IGFueTsKICAgIGV4cG9ydCBkZWNsYXJlIHZhciBkMUU6IGFueSwgZDJFOiBhbnk7CiAgICBleHBvcnQgdmFyIGIyRTogYW55OwogICAgZXhwb3J0IGRlY2xhcmUgdmFyIHYxRTogYW55Owp9Cgp2YXIgYTIyOiBhbnksIGIyMiA9IDEwLCBjMjIgPSAzMDsKdmFyIG5uOiBhbnk7CgpkZWNsYXJlIHZhciBkYTE6IGFueSwgZGEyOiBhbnk7CnZhciBub3JtYWxWYXI6IGFueTsKZGVjbGFyZSB2YXIgZHYxOiBhbnk7CnZhciB4bDogYW55Owp2YXIgeDogYW55Owp2YXIgejogYW55OwoKZnVuY3Rpb24gZm9vKGEyOiBhbnkpOiB2b2lkIHsKICAgIHZhciBhID0gMTA7Cn0KCmZvciAodmFyIGkgPSAwLCBqID0gMDsgaSA8IDEwOyBpKyspIHsKICAgIGorKzsKfQoKCmZvciAodmFyIGsgPSAwOyBrIDwgMzA7IGsrKykgewogICAgaysrOwp9CnZhciBiID0gMTA7Cg== - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/withExportDecl.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/withExportDecl.d.ts.map.diff deleted file mode 100644 index dbce44069320a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/withExportDecl.d.ts.map.diff +++ /dev/null @@ -1,16 +0,0 @@ -// [[Reason: Sourcemap is more detailed]] //// - -//// [tests/cases/compiler/withExportDecl.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,6 +1,6 @@ - - //// [withExportDecl.d.ts.map] --{"version":3,"file":"withExportDecl.d.ts","sourceRoot":"","sources":["withExportDecl.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,iBAAiB,EAAE,GAAG,CAAC;AAOlC,eAAO,IAAI,2BAA2B,QAAK,CAAC;AAG5C,eAAO,IAAI,4BAA4B;;;;CAAqC,CAAC;AAO7E,MAAM,CAAC,OAAO,CAAC,IAAI,mBAAmB,EAAE,MAAM,CAAC;AAI/C,eAAO,IAAI,gBAAgB,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;CAAE,EAAE,CAAE;AAW1D,wBAAgB,gBAAgB,IAAI;IAChC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb,CAEA;AAOD,MAAM,CAAC,OAAO,WAAQ,EAAE,CAAC;IAEd,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAGD,yBAAc,EAAE,CAAC;IAEb,SAAgB,GAAG,IAAI,MAAM,CAE5B;CACJ;AAED,eAAO,IAAI,KAAK,EAAE,GAAG,EAAE,KAAK,QAAK,CAAC;AAElC,eAAO,IAAI,KAAK,QAAK,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC"} -+{"version":3,"file":"withExportDecl.d.ts","sourceRoot":"","sources":["withExportDecl.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,iBAAiB,EAAE,GAAG,CAAC;AAOlC,eAAO,IAAI,2BAA2B,QAAK,CAAC;AAG5C,eAAO,IAAI,4BAA4B;IAAK,CAAC;IAAM,CAAC;IAAM,IAAI;CAAc,CAAC;AAO7E,MAAM,CAAC,OAAO,CAAC,IAAI,mBAAmB,EAAE,MAAM,CAAC;AAI/C,eAAO,IAAI,gBAAgB,EAAE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VZhcjIgPSAxMDsKdmFyIGVWYXIyMjsKZXhwb3J0IHZhciBlVmFyMyA9IDEwLCBlVmFyNDogYW55LCBlVmFyNTogYW55Ow== - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/controlFlowAliasing.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/controlFlowAliasing.d.ts.map deleted file mode 100644 index 4a0d31f8e1774..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/controlFlowAliasing.d.ts.map +++ /dev/null @@ -1,162 +0,0 @@ -//// [tests/cases/conformance/controlFlow/controlFlowAliasing.ts] //// - - - -/// [Declarations] //// - - - -//// [controlFlowAliasing.d.ts] -declare function f10(x: string | number): void; -declare function f11(x: unknown): void; -declare function f12(x: string | number | boolean): void; -declare function f13(x: string | number | boolean): void; -declare function f14(x: number | null | undefined): number | null; -declare function f15(obj: { - readonly x: string | number; -}): void; -declare function f16(obj: { - readonly x: string | number; -}): void; -declare function f17(obj: readonly [string | number]): void; -declare function f18(obj: readonly [string | number]): void; -declare function f20(obj: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare function f21(obj: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare function f22(obj: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare function f23(obj: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare function f24(arg: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare function f25(arg: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare function f26(outer: { - readonly obj: { - kind: 'foo'; - foo: string; - } | { - kind: 'bar'; - bar: number; - }; -}): void; -declare function f27(outer: { - obj: { - kind: 'foo'; - foo: string; - } | { - kind: 'bar'; - bar: number; - }; -}): void; -declare function f28(obj?: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare function f30(obj: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare function f31(obj: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare function f32(obj: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare function f33(obj: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare class C10 { - readonly x: string | number; - constructor(x: string | number); -} -declare class C11 { - readonly x: string | number; - constructor(x: string | number); -} -declare function f40(obj: { - kind: 'foo'; - foo?: string; -} | { - kind: 'bar'; - bar?: number; -}): void; -type Data = { - kind: 'str'; - payload: string; -} | { - kind: 'num'; - payload: number; -}; -declare function gg2(obj: Data): void; -declare function foo({ kind, payload }: Data): void; -declare const obj: { - fn: () => boolean; -}; -declare const a: boolean; -declare class Utils { - static isDefined(value: T): value is NonNullable; -} -declare class A53267 { - readonly testNumber: number | undefined; - foo(): void; -} -//# sourceMappingURL=controlFlowAliasing.d.ts.map - -/// [Declarations Maps] //// - - -//// [controlFlowAliasing.d.ts.map] -{"version":3,"file":"controlFlowAliasing.d.ts","sourceRoot":"","sources":["controlFlowAliasing.ts"],"names":[],"mappings":"AAEA,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQrC;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,CAK7B;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAS/C;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAU/C;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAGxD;AAED,iBAAS,GAAG,CAAC,GAAG,EAAE;IAAE,QAAQ,CAAC,CAAC,EAAE,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nN0IGlzQmFyID0gb2JqICYmIG9iai5raW5kID09PSAnYmFyJzsKICAgIGlmIChpc0ZvbykgewogICAgICAgIG9iai5mb287CiAgICB9CiAgICBpZiAoaXNCYXIpIHsKICAgICAgICBvYmouYmFyOwogICAgfQp9CgovLyBOYXJyb3dpbmcgYnkgYWxpYXNlZCBkaXNjcmltaW5hbnQgcHJvcGVydHkgYWNjZXNzCgpmdW5jdGlvbiBmMzAob2JqOiB7IGtpbmQ6ICdmb28nLCBmb286IHN0cmluZyB9IHwgeyBraW5kOiAnYmFyJywgYmFyOiBudW1iZXIgfSk6IHZvaWQgewogICAgY29uc3Qga2luZCA9IG9iai5raW5kOwogICAgaWYgKGtpbmQgPT09ICdmb28nKSB7CiAgICAgICAgb2JqLmZvbzsKICAgIH0KICAgIGVsc2UgewogICAgICAgIG9iai5iYXI7CiAgICB9Cn0KCmZ1bmN0aW9uIGYzMShvYmo6IHsga2luZDogJ2ZvbycsIGZvbzogc3RyaW5nIH0gfCB7IGtpbmQ6ICdiYXInLCBiYXI6IG51bWJlciB9KTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQgfSA9IG9iajsKICAgIGlmIChraW5kID09PSAnZm9vJykgewogICAgICAgIG9iai5mb287CiAgICB9CiAgICBlbHNlIHsKICAgICAgICBvYmouYmFyOwogICAgfQp9CgpmdW5jdGlvbiBmMzIob2JqOiB7IGtpbmQ6ICdmb28nLCBmb286IHN0cmluZyB9IHwgeyBraW5kOiAnYmFyJywgYmFyOiBudW1iZXIgfSk6IHZvaWQgewogICAgY29uc3QgeyBraW5kOiBrIH0gPSBvYmo7CiAgICBpZiAoayA9PT0gJ2ZvbycpIHsKICAgICAgICBvYmouZm9vOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgb2JqLmJhcjsKICAgIH0KfQoKZnVuY3Rpb24gZjMzKG9iajogeyBraW5kOiAnZm9vJywgZm9vOiBzdHJpbmcgfSB8IHsga2luZDogJ2JhcicsIGJhcjogbnVtYmVyIH0pOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCB9ID0gb2JqOwogICAgc3dpdGNoIChraW5kKSB7CiAgICAgICAgY2FzZSAnZm9vJzogb2JqLmZvbzsgYnJlYWs7CiAgICAgICAgY2FzZSAnYmFyJzogb2JqLmJhcjsgYnJlYWs7CiAgICB9Cn0KCgpjbGFzcyBDMTAgewogICAgY29uc3RydWN0b3IocmVhZG9ubHkgeDogc3RyaW5nIHwgbnVtYmVyKSB7CiAgICAgICAgY29uc3QgdGhpc1hfaXNTdHJpbmcgPSB0eXBlb2YgdGhpcy54ID09PSAnc3RyaW5nJzsKICAgICAgICBjb25zdCB4SXNTdHJpbmcgPSB0eXBlb2YgeCA9PT0gJ3N0cmluZyc7CiAgICAgICAgaWYgKHRoaXNYX2lzU3RyaW5nICYmIHhJc1N0cmluZykgewogICAgICAgICAgICBsZXQgczogc3RyaW5nOwogICAgICAgICAgICBzID0gdGhpcy54OwogICAgICAgICAgICBzID0geDsKICAgICAgICB9CiAgICB9Cn0KCmNsYXNzIEMxMSB7CiAgICBjb25zdHJ1Y3RvcihyZWFkb25seSB4OiBzdHJpbmcgfCBudW1iZXIpIHsKICAgICAgICBjb25zdCB0aGlzWF9pc1N0cmluZyA9IHR5cGVvZiB0aGlzLnggPT09ICdzdHJpbmcnOwogICAgICAgIGNvbnN0IHhJc1N0cmluZyA9IHR5cGVvZiB4ID09PSAnc3RyaW5nJzsKICAgICAgICBpZiAodGhpc1hfaXNTdHJpbmcgJiYgeElzU3RyaW5nKSB7CiAgICAgICAgICAgIC8vIFNvbWUgbmFycm93aW5ncyBtYXkgYmUgaW52YWxpZGF0ZWQgZHVlIHRvIGxhdGVyIGFzc2lnbm1lbnRzLgogICAgICAgICAgICBsZXQgczogc3RyaW5nOwogICAgICAgICAgICBzID0gdGhpcy54OwogICAgICAgICAgICBzID0geDsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHRoaXMueCA9IDEwOwogICAgICAgICAgICB4ID0gMTA7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HJ1ZQp9OwoKaWYgKGEpIHsgfQoKY29uc3QgYTogYm9vbGVhbiA9IG9iai5mbigpOwoKLy8gcmVwcm8gZnJvbSBodHRwczovL2dpdGh1Yi5jb20vbWljcm9zb2Z0L1R5cGVTY3JpcHQvaXNzdWVzLzUzMjY3CmNsYXNzIFV0aWxzIHsKICBzdGF0aWMgaXNEZWZpbmVkPFQ+KHZhbHVlOiBUKTogdmFsdWUgaXMgTm9uTnVsbGFibGU8VD4gewogICAgcmV0dXJuIHZhbHVlICE9IG51bGw7CiAgfQp9CgpjbGFzcyBBNTMyNjcgewogIHB1YmxpYyByZWFkb25seSB0ZXN0TnVtYmVyOiBudW1iZXIgfCB1bmRlZmluZWQ7CgogIGZvbygpOiB2b2lkIHsKICAgIGNvbnN0IGlzTnVtYmVyID0gVXRpbHMuaXNEZWZpbmVkKHRoaXMudGVzdE51bWJlcik7CgogICAgaWYgKGlzTnVtYmVyKSB7CiAgICAgIGNvbnN0IHg6IG51bWJlciA9IHRoaXMudGVzdE51bWJlcjsKICAgIH0KICB9Cn0= - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/controlFlowAliasing.d.ts.map.formatted b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/controlFlowAliasing.d.ts.map.formatted deleted file mode 100644 index f02659dd74d99..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/controlFlowAliasing.d.ts.map.formatted +++ /dev/null @@ -1,7857 +0,0 @@ -//// [controlFlowAliasing.ts] //// - -//// [controlFlowAliasing.d.ts.map] -{ - "version": 3, - "file": "controlFlowAliasing.d.ts", - "sourceRoot": "", - "sources": [ - "controlFlowAliasing.ts" - ], - "names": [], - "mappings": [ - { - "generatedLine": 1, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 1, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 1, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 12, - "name": null, - "generatedText": "f10", - "sourceText": "f10" - }, - { - "generatedLine": 1, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 1, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 14, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 1, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 16, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 1, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 22, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 1, - "generatedColumn": 33, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 25, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 1, - "generatedColumn": 39, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 31, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 1, - "generatedColumn": 42, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 34, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 1, - "generatedColumn": 46, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 38, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 1, - "generatedColumn": 47, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 11, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 2, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 13, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 2, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 13, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 2, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 13, - "originalColumn": 12, - "name": null, - "generatedText": "f11", - "sourceText": "f11" - }, - { - "generatedLine": 2, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 13, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 2, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 13, - "originalColumn": 14, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 2, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 13, - "originalColumn": 16, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 2, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 13, - "originalColumn": 23, - "name": null, - "generatedText": "unknown", - "sourceText": "unknown" - }, - { - "generatedLine": 2, - "generatedColumn": 34, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 13, - "originalColumn": 26, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 2, - "generatedColumn": 38, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 13, - "originalColumn": 30, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 2, - "generatedColumn": 39, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 18, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 3, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 3, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 3, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 12, - "name": null, - "generatedText": "f12", - "sourceText": "f12" - }, - { - "generatedLine": 3, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 3, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 14, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 3, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 16, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 3, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 22, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 3, - "generatedColumn": 33, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 25, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 3, - "generatedColumn": 39, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 31, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 3, - "generatedColumn": 42, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 34, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 3, - "generatedColumn": 49, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 41, - "name": null, - "generatedText": "boolean", - "sourceText": "boolean" - }, - { - "generatedLine": 3, - "generatedColumn": 52, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 44, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 3, - "generatedColumn": 56, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 48, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 3, - "generatedColumn": 57, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 29, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 4, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 4, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 4, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 12, - "name": null, - "generatedText": "f13", - "sourceText": "f13" - }, - { - "generatedLine": 4, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 4, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 14, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 4, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 16, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 4, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 22, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 4, - "generatedColumn": 33, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 25, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 4, - "generatedColumn": 39, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 31, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 4, - "generatedColumn": 42, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 34, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 4, - "generatedColumn": 49, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 41, - "name": null, - "generatedText": "boolean", - "sourceText": "boolean" - }, - { - "generatedLine": 4, - "generatedColumn": 52, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 44, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 4, - "generatedColumn": 56, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 48, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 4, - "generatedColumn": 57, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 41, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 5, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 5, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 5, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 12, - "name": null, - "generatedText": "f14", - "sourceText": "f14" - }, - { - "generatedLine": 5, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 5, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 14, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 5, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 16, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 5, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 22, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 5, - "generatedColumn": 33, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 25, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 5, - "generatedColumn": 37, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 29, - "name": null, - "generatedText": "null", - "sourceText": "null" - }, - { - "generatedLine": 5, - "generatedColumn": 40, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 32, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 5, - "generatedColumn": 49, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 41, - "name": null, - "generatedText": "undefined", - "sourceText": "undefined" - }, - { - "generatedLine": 5, - "generatedColumn": 52, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 44, - "name": null, - "generatedText": "): ", - "sourceText": "): " - }, - { - "generatedLine": 5, - "generatedColumn": 58, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 50, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 5, - "generatedColumn": 61, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 53, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 5, - "generatedColumn": 65, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 57, - "name": null, - "generatedText": "null", - "sourceText": "null" - }, - { - "generatedLine": 5, - "generatedColumn": 66, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 46, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 6, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 6, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 6, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 12, - "name": null, - "generatedText": "f15", - "sourceText": "f15" - }, - { - "generatedLine": 6, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 6, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 6, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 7, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 7, - "generatedColumn": 12, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 28, - "name": null, - "generatedText": "readonly", - "sourceText": "readonly" - }, - { - "generatedLine": 7, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 29, - "name": null, - "generatedText": " ", - "sourceText": " " - }, - { - "generatedLine": 7, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 30, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 7, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 32, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 7, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 38, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 7, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 41, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 7, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 47, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 7, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 47, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 8, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 49, - "name": null - }, - { - "generatedLine": 8, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 52, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 8, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 56, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 8, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 53, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 9, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 9, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 9, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 12, - "name": null, - "generatedText": "f16", - "sourceText": "f16" - }, - { - "generatedLine": 9, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 9, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 9, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 10, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 10, - "generatedColumn": 12, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 28, - "name": null, - "generatedText": "readonly", - "sourceText": "readonly" - }, - { - "generatedLine": 10, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 29, - "name": null, - "generatedText": " ", - "sourceText": " " - }, - { - "generatedLine": 10, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 30, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 10, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 32, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 10, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 38, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 10, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 41, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 10, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 47, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 10, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 47, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 11, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 49, - "name": null - }, - { - "generatedLine": 11, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 52, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 11, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 56, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 11, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 61, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 12, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 12, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 12, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 12, - "name": null, - "generatedText": "f17", - "sourceText": "f17" - }, - { - "generatedLine": 12, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 12, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 12, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 12, - "generatedColumn": 35, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 27, - "name": null, - "generatedText": "readonly ", - "sourceText": "readonly " - }, - { - "generatedLine": 12, - "generatedColumn": 36, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 28, - "name": null, - "generatedText": "[", - "sourceText": "[" - }, - { - "generatedLine": 12, - "generatedColumn": 42, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 34, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 12, - "generatedColumn": 45, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 37, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 12, - "generatedColumn": 51, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 43, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 12, - "generatedColumn": 52, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 44, - "name": null, - "generatedText": "]", - "sourceText": "]" - }, - { - "generatedLine": 12, - "generatedColumn": 55, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 47, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 12, - "generatedColumn": 59, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 51, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 12, - "generatedColumn": 60, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 68, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 13, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 13, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 13, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 12, - "name": null, - "generatedText": "f18", - "sourceText": "f18" - }, - { - "generatedLine": 13, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 13, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 13, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 13, - "generatedColumn": 35, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 27, - "name": null, - "generatedText": "readonly ", - "sourceText": "readonly " - }, - { - "generatedLine": 13, - "generatedColumn": 36, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 28, - "name": null, - "generatedText": "[", - "sourceText": "[" - }, - { - "generatedLine": 13, - "generatedColumn": 42, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 34, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 13, - "generatedColumn": 45, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 37, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 13, - "generatedColumn": 51, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 43, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 13, - "generatedColumn": 52, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 44, - "name": null, - "generatedText": "]", - "sourceText": "]" - }, - { - "generatedLine": 13, - "generatedColumn": 55, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 47, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 13, - "generatedColumn": 59, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 51, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 13, - "generatedColumn": 60, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 76, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 14, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 14, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 14, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 12, - "name": null, - "generatedText": "f20", - "sourceText": "f20" - }, - { - "generatedLine": 14, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 14, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 14, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 15, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 15, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 15, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 15, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 15, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 16, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 16, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 16, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 38, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 16, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 44, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 16, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 44, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 17, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 46, - "name": null - }, - { - "generatedLine": 17, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 49, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 18, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 18, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 55, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 18, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 57, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 18, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 62, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 18, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 63, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 19, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 19, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 67, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 19, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 69, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 19, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 75, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 19, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 75, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 20, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 77, - "name": null - }, - { - "generatedLine": 20, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 80, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 20, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 84, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 20, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 86, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 21, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 21, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 21, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 12, - "name": null, - "generatedText": "f21", - "sourceText": "f21" - }, - { - "generatedLine": 21, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 21, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 21, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 22, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 22, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 22, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 22, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 22, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 23, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 23, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 23, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 38, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 23, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 44, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 23, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 44, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 24, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 46, - "name": null - }, - { - "generatedLine": 24, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 49, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 25, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 25, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 55, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 25, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 57, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 25, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 62, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 25, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 63, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 26, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 26, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 67, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 26, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 69, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 26, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 75, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 26, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 75, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 27, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 77, - "name": null - }, - { - "generatedLine": 27, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 80, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 27, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 84, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 27, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 96, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 28, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 28, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 28, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 12, - "name": null, - "generatedText": "f22", - "sourceText": "f22" - }, - { - "generatedLine": 28, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 28, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 28, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 29, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 29, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 29, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 29, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 29, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 30, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 30, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 30, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 38, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 30, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 44, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 30, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 44, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 31, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 46, - "name": null - }, - { - "generatedLine": 31, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 49, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 32, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 32, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 55, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 32, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 57, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 32, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 62, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 32, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 63, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 33, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 33, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 67, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 33, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 69, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 33, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 75, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 33, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 75, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 34, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 77, - "name": null - }, - { - "generatedLine": 34, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 80, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 34, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 84, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 34, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 106, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 35, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 35, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 35, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 12, - "name": null, - "generatedText": "f23", - "sourceText": "f23" - }, - { - "generatedLine": 35, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 35, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 35, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 36, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 36, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 36, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 36, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 36, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 37, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 37, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 37, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 38, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 37, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 44, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 37, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 44, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 38, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 46, - "name": null - }, - { - "generatedLine": 38, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 49, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 39, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 39, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 55, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 39, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 57, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 39, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 62, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 39, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 63, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 40, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 40, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 67, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 40, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 69, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 40, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 75, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 40, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 75, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 41, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 77, - "name": null - }, - { - "generatedLine": 41, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 80, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 41, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 84, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 41, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 117, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 42, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 42, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 42, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 12, - "name": null, - "generatedText": "f24", - "sourceText": "f24" - }, - { - "generatedLine": 42, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 42, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 16, - "name": null, - "generatedText": "arg", - "sourceText": "arg" - }, - { - "generatedLine": 42, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 43, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 43, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 43, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 43, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 43, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 44, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 44, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 44, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 38, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 44, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 44, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 44, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 44, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 45, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 46, - "name": null - }, - { - "generatedLine": 45, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 49, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 46, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 46, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 55, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 46, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 57, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 46, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 62, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 46, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 63, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 47, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 47, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 67, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 47, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 69, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 47, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 75, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 47, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 75, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 48, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 77, - "name": null - }, - { - "generatedLine": 48, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 80, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 48, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 84, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 48, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 128, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 49, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 49, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 49, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 12, - "name": null, - "generatedText": "f25", - "sourceText": "f25" - }, - { - "generatedLine": 49, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 49, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 16, - "name": null, - "generatedText": "arg", - "sourceText": "arg" - }, - { - "generatedLine": 49, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 50, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 50, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 50, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 50, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 50, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 51, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 51, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 51, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 38, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 51, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 44, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 51, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 44, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 52, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 46, - "name": null - }, - { - "generatedLine": 52, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 49, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 53, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 53, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 55, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 53, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 57, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 53, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 62, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 53, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 63, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 54, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 54, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 67, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 54, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 69, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 54, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 75, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 54, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 75, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 55, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 77, - "name": null - }, - { - "generatedLine": 55, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 80, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 55, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 84, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 55, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 139, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 56, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 56, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 56, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 12, - "name": null, - "generatedText": "f26", - "sourceText": "f26" - }, - { - "generatedLine": 56, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 56, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 18, - "name": null, - "generatedText": "outer", - "sourceText": "outer" - }, - { - "generatedLine": 56, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 20, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 57, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 22, - "name": null - }, - { - "generatedLine": 57, - "generatedColumn": 12, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 30, - "name": null, - "generatedText": "readonly", - "sourceText": "readonly" - }, - { - "generatedLine": 57, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 31, - "name": null, - "generatedText": " ", - "sourceText": " " - }, - { - "generatedLine": 57, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 34, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 57, - "generatedColumn": 18, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 36, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 58, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 38, - "name": null - }, - { - "generatedLine": 58, - "generatedColumn": 12, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 42, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 58, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 44, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 58, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 49, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 58, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 50, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 59, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 59, - "generatedColumn": 11, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 54, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 59, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 56, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 59, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 62, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 59, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 62, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 60, - "generatedColumn": 5, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 60, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 67, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 61, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 69, - "name": null - }, - { - "generatedLine": 61, - "generatedColumn": 12, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 73, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 61, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 75, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 61, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 80, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 61, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 81, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 62, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 82, - "name": null - }, - { - "generatedLine": 62, - "generatedColumn": 11, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 85, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 62, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 87, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 62, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 93, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 62, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 93, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 63, - "generatedColumn": 5, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 95, - "name": null - }, - { - "generatedLine": 63, - "generatedColumn": 6, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 95, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 64, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 97, - "name": null - }, - { - "generatedLine": 64, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 100, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 64, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 104, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 64, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 149, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 65, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 65, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 65, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 12, - "name": null, - "generatedText": "f27", - "sourceText": "f27" - }, - { - "generatedLine": 65, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 65, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 18, - "name": null, - "generatedText": "outer", - "sourceText": "outer" - }, - { - "generatedLine": 65, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 20, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 66, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 22, - "name": null - }, - { - "generatedLine": 66, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 25, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 66, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 27, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 67, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 29, - "name": null - }, - { - "generatedLine": 67, - "generatedColumn": 12, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 33, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 67, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 35, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 67, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 40, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 67, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 41, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 68, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 42, - "name": null - }, - { - "generatedLine": 68, - "generatedColumn": 11, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 45, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 68, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 47, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 68, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 53, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 68, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 53, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 69, - "generatedColumn": 5, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 55, - "name": null - }, - { - "generatedLine": 69, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 58, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 70, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 60, - "name": null - }, - { - "generatedLine": 70, - "generatedColumn": 12, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 64, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 70, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 66, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 70, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 71, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 70, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 72, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 71, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 73, - "name": null - }, - { - "generatedLine": 71, - "generatedColumn": 11, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 76, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 71, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 78, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 71, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 84, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 71, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 84, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 72, - "generatedColumn": 5, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 86, - "name": null - }, - { - "generatedLine": 72, - "generatedColumn": 6, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 86, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 73, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 88, - "name": null - }, - { - "generatedLine": 73, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 91, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 73, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 95, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 73, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 159, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 74, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 74, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 74, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 12, - "name": null, - "generatedText": "f28", - "sourceText": "f28" - }, - { - "generatedLine": 74, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 74, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 74, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 17, - "name": null, - "generatedText": "?", - "sourceText": "?" - }, - { - "generatedLine": 74, - "generatedColumn": 27, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 19, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 75, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 21, - "name": null - }, - { - "generatedLine": 75, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 25, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 75, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 27, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 75, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 32, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 75, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 33, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 76, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 34, - "name": null - }, - { - "generatedLine": 76, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 37, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 76, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 39, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 76, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 45, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 76, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 45, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 77, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 47, - "name": null - }, - { - "generatedLine": 77, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 50, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 78, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 52, - "name": null - }, - { - "generatedLine": 78, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 56, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 78, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 58, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 78, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 63, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 78, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 64, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 79, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 65, - "name": null - }, - { - "generatedLine": 79, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 68, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 79, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 70, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 79, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 76, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 79, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 76, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 80, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 78, - "name": null - }, - { - "generatedLine": 80, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 81, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 80, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 85, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 80, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 170, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 81, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 81, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 81, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 12, - "name": null, - "generatedText": "f30", - "sourceText": "f30" - }, - { - "generatedLine": 81, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 81, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 81, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 82, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 82, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 82, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 82, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 82, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 83, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 83, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 83, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 38, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 83, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 44, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 83, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 44, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 84, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 46, - "name": null - }, - { - "generatedLine": 84, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 49, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 85, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 85, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 55, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 85, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 57, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 85, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 62, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 85, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 63, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 86, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 86, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 67, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 86, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 69, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 86, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 75, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 86, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 75, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 87, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 77, - "name": null - }, - { - "generatedLine": 87, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 80, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 87, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 84, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 87, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 182, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 88, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 88, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 88, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 12, - "name": null, - "generatedText": "f31", - "sourceText": "f31" - }, - { - "generatedLine": 88, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 88, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 88, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 89, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 89, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 89, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 89, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 89, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 90, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 90, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 90, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 38, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 90, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 44, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 90, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 44, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 91, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 46, - "name": null - }, - { - "generatedLine": 91, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 49, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 92, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 92, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 55, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 92, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 57, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 92, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 62, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 92, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 63, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 93, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 93, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 67, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 93, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 69, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 93, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 75, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 93, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 75, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 94, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 77, - "name": null - }, - { - "generatedLine": 94, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 80, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 94, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 84, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 94, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 192, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 95, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 95, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 95, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 12, - "name": null, - "generatedText": "f32", - "sourceText": "f32" - }, - { - "generatedLine": 95, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 95, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 95, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 96, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 96, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 96, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 96, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 96, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 97, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 97, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 97, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 38, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 97, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 44, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 97, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 44, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 98, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 46, - "name": null - }, - { - "generatedLine": 98, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 49, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 99, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 99, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 55, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 99, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 57, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 99, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 62, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 99, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 63, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 100, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 100, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 67, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 100, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 69, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 100, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 75, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 100, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 75, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 101, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 77, - "name": null - }, - { - "generatedLine": 101, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 80, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 101, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 84, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 101, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 202, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 102, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 102, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 102, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 12, - "name": null, - "generatedText": "f33", - "sourceText": "f33" - }, - { - "generatedLine": 102, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 102, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 102, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 103, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 103, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 103, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 103, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 103, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 104, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 104, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 104, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 38, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 104, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 44, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 104, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 44, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 105, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 46, - "name": null - }, - { - "generatedLine": 105, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 49, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 106, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 106, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 55, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 106, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 57, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 106, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 62, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 106, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 63, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 107, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 107, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 67, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 107, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 69, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 107, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 75, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 107, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 75, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 108, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 77, - "name": null - }, - { - "generatedLine": 108, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 80, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 108, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 84, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 108, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 210, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 109, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 213, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 109, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 213, - "originalColumn": 6, - "name": null, - "generatedText": "declare class ", - "sourceText": "class " - }, - { - "generatedLine": 109, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 213, - "originalColumn": 9, - "name": null, - "generatedText": "C10", - "sourceText": "C10" - }, - { - "generatedLine": 110, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 16, - "name": null - }, - { - "generatedLine": 110, - "generatedColumn": 12, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 24, - "name": null, - "generatedText": "readonly", - "sourceText": "readonly" - }, - { - "generatedLine": 110, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 25, - "name": null, - "generatedText": " ", - "sourceText": " " - }, - { - "generatedLine": 110, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 26, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 110, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 28, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 110, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 34, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 110, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 37, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 110, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 43, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 111, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 25, - "name": null - }, - { - "generatedLine": 111, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 26, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 111, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 28, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 111, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 34, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 111, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 37, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 111, - "generatedColumn": 34, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 43, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 112, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 223, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 113, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 225, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 113, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 225, - "originalColumn": 6, - "name": null, - "generatedText": "declare class ", - "sourceText": "class " - }, - { - "generatedLine": 113, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 225, - "originalColumn": 9, - "name": null, - "generatedText": "C11", - "sourceText": "C11" - }, - { - "generatedLine": 114, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 16, - "name": null - }, - { - "generatedLine": 114, - "generatedColumn": 12, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 24, - "name": null, - "generatedText": "readonly", - "sourceText": "readonly" - }, - { - "generatedLine": 114, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 25, - "name": null, - "generatedText": " ", - "sourceText": " " - }, - { - "generatedLine": 114, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 26, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 114, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 28, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 114, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 34, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 114, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 37, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 114, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 43, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 115, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 25, - "name": null - }, - { - "generatedLine": 115, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 26, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 115, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 28, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 115, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 34, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 115, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 37, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 115, - "generatedColumn": 34, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 43, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 116, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 240, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 117, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 117, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 117, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 12, - "name": null, - "generatedText": "f40", - "sourceText": "f40" - }, - { - "generatedLine": 117, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 117, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 117, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 118, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 118, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 118, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 118, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 118, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 119, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 119, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 119, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 37, - "name": null, - "generatedText": "?", - "sourceText": "?" - }, - { - "generatedLine": 119, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 39, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 119, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 45, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 119, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 45, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 120, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 47, - "name": null - }, - { - "generatedLine": 120, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 50, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 121, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 52, - "name": null - }, - { - "generatedLine": 121, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 56, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 121, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 58, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 121, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 63, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 121, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 64, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 122, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 65, - "name": null - }, - { - "generatedLine": 122, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 68, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 122, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 69, - "name": null, - "generatedText": "?", - "sourceText": "?" - }, - { - "generatedLine": 122, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 71, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 122, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 77, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 122, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 77, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 123, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 79, - "name": null - }, - { - "generatedLine": 123, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 82, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 123, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 86, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 123, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 250, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 124, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 124, - "generatedColumn": 5, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 5, - "name": null, - "generatedText": "type ", - "sourceText": "type " - }, - { - "generatedLine": 124, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 9, - "name": null, - "generatedText": "Data", - "sourceText": "Data" - }, - { - "generatedLine": 124, - "generatedColumn": 12, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 12, - "name": null, - "generatedText": " = ", - "sourceText": " = " - }, - { - "generatedLine": 125, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 14, - "name": null - }, - { - "generatedLine": 125, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 18, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 125, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 20, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 125, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 25, - "name": null, - "generatedText": "'str'", - "sourceText": "'str'" - }, - { - "generatedLine": 125, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 26, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 126, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 27, - "name": null - }, - { - "generatedLine": 126, - "generatedColumn": 11, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 34, - "name": null, - "generatedText": "payload", - "sourceText": "payload" - }, - { - "generatedLine": 126, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 36, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 126, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 42, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 126, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 42, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 127, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 44, - "name": null - }, - { - "generatedLine": 127, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 47, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 128, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 49, - "name": null - }, - { - "generatedLine": 128, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 53, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 128, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 55, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 128, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 60, - "name": null, - "generatedText": "'num'", - "sourceText": "'num'" - }, - { - "generatedLine": 128, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 61, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 129, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 62, - "name": null - }, - { - "generatedLine": 129, - "generatedColumn": 11, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 69, - "name": null, - "generatedText": "payload", - "sourceText": "payload" - }, - { - "generatedLine": 129, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 71, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 129, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 77, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 129, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 77, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 130, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 79, - "name": null - }, - { - "generatedLine": 130, - "generatedColumn": 2, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 80, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 131, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 256, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 131, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 256, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 131, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 256, - "originalColumn": 12, - "name": null, - "generatedText": "gg2", - "sourceText": "gg2" - }, - { - "generatedLine": 131, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 256, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 131, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 256, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 131, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 256, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 131, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 256, - "originalColumn": 22, - "name": null, - "generatedText": "Data", - "sourceText": "Data" - }, - { - "generatedLine": 131, - "generatedColumn": 33, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 256, - "originalColumn": 25, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 131, - "generatedColumn": 37, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 256, - "originalColumn": 29, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 131, - "generatedColumn": 38, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 263, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 132, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 132, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 132, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 12, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 132, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 132, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 15, - "name": null, - "generatedText": "{ ", - "sourceText": "{ " - }, - { - "generatedLine": 132, - "generatedColumn": 27, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 19, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 132, - "generatedColumn": 29, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 21, - "name": null, - "generatedText": ", ", - "sourceText": ", " - }, - { - "generatedLine": 132, - "generatedColumn": 36, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 28, - "name": null, - "generatedText": "payload", - "sourceText": "payload" - }, - { - "generatedLine": 132, - "generatedColumn": 38, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 30, - "name": null, - "generatedText": " }", - "sourceText": " }" - }, - { - "generatedLine": 132, - "generatedColumn": 40, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 32, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 132, - "generatedColumn": 44, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 36, - "name": null, - "generatedText": "Data", - "sourceText": "Data" - }, - { - "generatedLine": 132, - "generatedColumn": 47, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 39, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 132, - "generatedColumn": 51, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 43, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 132, - "generatedColumn": 52, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 272, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 133, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 276, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 133, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 276, - "originalColumn": 0, - "name": null, - "generatedText": "declare ", - "sourceText": "" - }, - { - "generatedLine": 133, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 276, - "originalColumn": 6, - "name": null, - "generatedText": "const ", - "sourceText": "const " - }, - { - "generatedLine": 133, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 276, - "originalColumn": 9, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 134, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 277, - "originalColumn": 4, - "name": null - }, - { - "generatedLine": 134, - "generatedColumn": 6, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 277, - "originalColumn": 6, - "name": null, - "generatedText": "fn", - "sourceText": "fn" - }, - { - "generatedLine": 134, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 277, - "originalColumn": 12, - "name": null, - "generatedText": ": () => ", - "sourceText": ": () =" - }, - { - "generatedLine": 134, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 277, - "originalColumn": 19, - "name": null, - "generatedText": "boolean", - "sourceText": "> true" - }, - { - "generatedLine": 135, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 278, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 135, - "generatedColumn": 2, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 278, - "originalColumn": 2, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 136, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 282, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 136, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 282, - "originalColumn": 0, - "name": null, - "generatedText": "declare ", - "sourceText": "" - }, - { - "generatedLine": 136, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 282, - "originalColumn": 6, - "name": null, - "generatedText": "const ", - "sourceText": "const " - }, - { - "generatedLine": 136, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 282, - "originalColumn": 7, - "name": null, - "generatedText": "a", - "sourceText": "a" - }, - { - "generatedLine": 136, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 282, - "originalColumn": 9, - "name": null, - "generatedText": ": ", - "sourceText": " =" - }, - { - "generatedLine": 136, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 282, - "originalColumn": 27, - "name": null, - "generatedText": "boolean", - "sourceText": " obj.fn();" - }, - { - "generatedLine": 136, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 282, - "originalColumn": 28, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 137, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 285, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 137, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 285, - "originalColumn": 6, - "name": null, - "generatedText": "declare class ", - "sourceText": "class " - }, - { - "generatedLine": 137, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 285, - "originalColumn": 11, - "name": null, - "generatedText": "Utils", - "sourceText": "Utils" - }, - { - "generatedLine": 138, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 2, - "name": null - }, - { - "generatedLine": 138, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 8, - "name": null, - "generatedText": "static", - "sourceText": "static" - }, - { - "generatedLine": 138, - "generatedColumn": 11, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 9, - "name": null, - "generatedText": " ", - "sourceText": " " - }, - { - "generatedLine": 138, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 18, - "name": null, - "generatedText": "isDefined", - "sourceText": "isDefined" - }, - { - "generatedLine": 138, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 19, - "name": null, - "generatedText": "<", - "sourceText": "<" - }, - { - "generatedLine": 138, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 20, - "name": null, - "generatedText": "T", - "sourceText": "T" - }, - { - "generatedLine": 138, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 22, - "name": null, - "generatedText": ">(", - "sourceText": ">(" - }, - { - "generatedLine": 138, - "generatedColumn": 29, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 27, - "name": null, - "generatedText": "value", - "sourceText": "value" - }, - { - "generatedLine": 138, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 29, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 138, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 30, - "name": null, - "generatedText": "T", - "sourceText": "T" - }, - { - "generatedLine": 138, - "generatedColumn": 35, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 33, - "name": null, - "generatedText": "): ", - "sourceText": "): " - }, - { - "generatedLine": 138, - "generatedColumn": 40, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 38, - "name": null, - "generatedText": "value", - "sourceText": "value" - }, - { - "generatedLine": 138, - "generatedColumn": 44, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 42, - "name": null, - "generatedText": " is ", - "sourceText": " is " - }, - { - "generatedLine": 138, - "generatedColumn": 55, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 53, - "name": null, - "generatedText": "NonNullable", - "sourceText": "NonNullable" - }, - { - "generatedLine": 138, - "generatedColumn": 56, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 54, - "name": null, - "generatedText": "<", - "sourceText": "<" - }, - { - "generatedLine": 138, - "generatedColumn": 57, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 55, - "name": null, - "generatedText": "T", - "sourceText": "T" - }, - { - "generatedLine": 138, - "generatedColumn": 58, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 56, - "name": null, - "generatedText": ">", - "sourceText": ">" - }, - { - "generatedLine": 139, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 289, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 140, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 291, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 140, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 291, - "originalColumn": 6, - "name": null, - "generatedText": "declare class ", - "sourceText": "class " - }, - { - "generatedLine": 140, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 291, - "originalColumn": 12, - "name": null, - "generatedText": "A53267", - "sourceText": "A53267" - }, - { - "generatedLine": 141, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 292, - "originalColumn": 2, - "name": null - }, - { - "generatedLine": 141, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 292, - "originalColumn": 18, - "name": null, - "generatedText": "readonly ", - "sourceText": "public readonly " - }, - { - "generatedLine": 141, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 292, - "originalColumn": 28, - "name": null, - "generatedText": "testNumber", - "sourceText": "testNumber" - }, - { - "generatedLine": 141, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 292, - "originalColumn": 30, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 141, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 292, - "originalColumn": 36, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 141, - "generatedColumn": 34, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 292, - "originalColumn": 39, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 141, - "generatedColumn": 43, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 292, - "originalColumn": 48, - "name": null, - "generatedText": "undefined", - "sourceText": "undefined" - }, - { - "generatedLine": 141, - "generatedColumn": 44, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 292, - "originalColumn": 49, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 142, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 294, - "originalColumn": 2, - "name": null - }, - { - "generatedLine": 142, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 294, - "originalColumn": 5, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 142, - "generatedColumn": 11, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 294, - "originalColumn": 9, - "name": null, - "generatedText": "(): ", - "sourceText": "() {" - }, - { - "generatedLine": 142, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 294, - "originalColumn": 13, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 143, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 301, - "originalColumn": 1, - "name": null - } - ] -} \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileRegressionTests.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileRegressionTests.d.ts.map deleted file mode 100644 index 4bfb857ef3675..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileRegressionTests.d.ts.map +++ /dev/null @@ -1,25 +0,0 @@ -//// [tests/cases/compiler/declFileRegressionTests.ts] //// - - - -/// [Declarations] //// - - - -//// [declFileRegressionTests.d.ts] -declare var n: { - w: any; - x: string; - y: () => void; - z: number; -}; -//# sourceMappingURL=declFileRegressionTests.d.ts.map - -/// [Declarations Maps] //// - - -//// [declFileRegressionTests.d.ts.map] -{"version":3,"file":"declFileRegressionTests.d.ts","sourceRoot":"","sources":["declFileRegressionTests.ts"],"names":[],"mappings":"AAEA,QAAA,IAAI,CAAC;IAAK,CAAC;IAAQ,CAAC;IAAM,CAAC,QAAM,IAAI;IAAS,CAAC;CAAM,CAAC"} - -//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgbjogew0KICAgIHc6IGFueTsNCiAgICB4OiBzdHJpbmc7DQogICAgeTogKCkgPT4gdm9pZDsNCiAgICB6OiBudW1iZXI7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZGVjbEZpbGVSZWdyZXNzaW9uVGVzdHMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbEZpbGVSZWdyZXNzaW9uVGVzdHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xGaWxlUmVncmVzc2lvblRlc3RzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLFFBQUEsSUFBSSxDQUFDO0lBQUssQ0FBQztJQUFRLENBQUM7SUFBTSxDQUFDLFFBQU0sSUFBSTtJQUFTLENBQUM7Q0FBTSxDQUFDIn0=,Ly8gJ251bGwnIG5vdCBjb252ZXJ0ZWQgdG8gJ2FueScgaW4gZC50cwovLyBmdW5jdGlvbiB0eXBlcyBub3QgcGlwZWQgdGhyb3VnaCBjb3JyZWN0bHkKdmFyIG4gPSB7IHc6IG51bGwsIHg6ICcnLCB5OiAoKTogdm9pZCA9PiB7IH0sIHo6IDMyIH07Cgo= - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern.d.ts.map deleted file mode 100644 index ed1d0058b34e6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern.d.ts.map +++ /dev/null @@ -1,81 +0,0 @@ -//// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts] //// - - - -/// [Declarations] //// - - - -//// [declarationEmitDestructuringObjectLiteralPattern.d.ts] -declare const dest: { - x4: number; - y4: string; -}; -declare const x4: number; -declare const dest_2: { - x5: number; - y5: string; -}; -declare const y5: string; -declare const dest_1: { - x6: number; - y6: string; -}; -declare const x6: number; -declare const y6: string; -declare const dest: { - x7: number; - y7: string; -}; -declare const a1: number; -declare const dest_2: { - x8: number; - y8: string; -}; -declare const b1: string; -declare const dest_1: { - x9: number; - y9: string; -}; -declare const a2: number; -declare const b2: string; -declare const dest: { - a: number; - b: { - a: string; - b: { - a: boolean; - }; - }; -}; -declare const x11: number; -declare const y11: string; -declare const z11: boolean; -declare function f15(): { - a4: string; - b4: number; - c4: boolean; -}; -declare const dest_1: { - a4: string; - b4: number; - c4: boolean; -}; -declare const a4: string; -declare const b4: number; -declare const c4: boolean; -declare namespace m { - const a4: string; - const b4: number; - const c4: boolean; -} -//# sourceMappingURL=declarationEmitDestructuringObjectLiteralPattern.d.ts.map - -/// [Declarations Maps] //// - - -//// [declarationEmitDestructuringObjectLiteralPattern.d.ts.map] -{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,IAAI;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,IAAI;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACt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IHsKICAgIHZhciBhNCA9ICJoZWxsbyI7CiAgICB2YXIgYjQgPSAxOwogICAgdmFyIGM0ID0gdHJ1ZTsKICAgIHJldHVybiB7IGE0LCBiNCwgYzQgfTsKfQpjb25zdCBkZXN0XzE6IHsKICAgIGE0OiBzdHJpbmc7CiAgICBiNDogbnVtYmVyOwogICAgYzQ6IGJvb2xlYW47Cn0gPSBmMTUoKTsKY29uc3QgYTQ6IHN0cmluZyA9IGRlc3RfMS5hNDsKY29uc3QgYjQ6IG51bWJlciA9IGRlc3RfMS5iNDsKY29uc3QgYzQ6IGJvb2xlYW4gPSBkZXN0XzEuYzQ7Cgptb2R1bGUgbSB7CiAgICBjb25zdCBkZXN0ID0gZjE1KCk7CiAgICBleHBvcnQgY29uc3QgYTQ6IHN0cmluZyA9IGRlc3QuYTQ7CiAgICBleHBvcnQgY29uc3QgYjQ6IG51bWJlciA9IGRlc3QuYjQ7CiAgICBleHBvcnQgY29uc3QgYzQ6IGJvb2xlYW4gPSBkZXN0LmM0Owp9 - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map deleted file mode 100644 index 7e38f01e18421..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map +++ /dev/null @@ -1,51 +0,0 @@ -//// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts] //// - - - -/// [Declarations] //// - - - -//// [declarationEmitDestructuringObjectLiteralPattern1.d.ts] -declare const dest_2: { - x4: number; - y4: string; -}; -declare const x4: number; -declare const dest_1: { - x5: number; - y5: string; -}; -declare const y5: string; -declare const dest: { - x6: number; - y6: string; -}; -declare const x6: number; -declare const y6: string; -declare const dest_2: { - x7: number; - y7: string; -}; -declare const a1: number; -declare const dest_1: { - x8: number; - y8: string; -}; -declare const b1: string; -declare const dest: { - x9: number; - y9: string; -}; -declare const a2: number; -declare const b2: string; -//# sourceMappingURL=declarationEmitDestructuringObjectLiteralPattern1.d.ts.map - -/// [Declarations Maps] //// - - -//// [declarationEmitDestructuringObjectLiteralPattern1.d.ts.map] -{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern1.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern1.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,IAAI;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,IAAI;IAAK,EAAE;IAAK,EAAE;CAAW,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC"} - -//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBkZXN0XzI6IHsNCiAgICB4NDogbnVtYmVyOw0KICAgIHk0OiBzdHJpbmc7DQp9Ow0KZGVjbGFyZSBjb25zdCB4NDogbnVtYmVyOw0KZGVjbGFyZSBjb25zdCBkZXN0XzE6IHsNCiAgICB4NTogbnVtYmVyOw0KICAgIHk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7IHg3OiA1LCB5NzogImhlbGxvIiB9Owpjb25zdCBhMTogbnVtYmVyID0gZGVzdF8yLng3Owpjb25zdCBkZXN0XzEgPSB7IHg4OiA1LCB5ODogImhlbGxvIiB9Owpjb25zdCBiMTogc3RyaW5nID0gZGVzdF8xLnk4Owpjb25zdCBkZXN0ID0geyB4OTogNSwgeTk6ICJoZWxsbyIgfTsKY29uc3QgYTI6IG51bWJlciA9IGRlc3QueDk7CmNvbnN0IGIyOiBzdHJpbmcgPSBkZXN0Lnk5Ow== - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map deleted file mode 100644 index fee86785e0951..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map +++ /dev/null @@ -1,49 +0,0 @@ -//// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts] //// - - - -/// [Declarations] //// - - - -//// [declarationEmitDestructuringObjectLiteralPattern2.d.ts] -declare const dest: { - a: number; - b: { - a: string; - b: { - a: boolean; - }; - }; -}; -declare const x11: number; -declare const y11: string; -declare const z11: boolean; -declare function f15(): { - a4: string; - b4: number; - c4: boolean; -}; -declare const dest_1: { - a4: string; - b4: number; - c4: boolean; -}; -declare const a4: string; -declare const b4: number; -declare const c4: boolean; -declare namespace m { - const a4: string; - const b4: number; - const c4: boolean; -} -//# sourceMappingURL=declarationEmitDestructuringObjectLiteralPattern2.d.ts.map - -/// [Declarations Maps] //// - - -//// [declarationEmitDestructuringObjectLiteralPattern2.d.ts.map] -{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern2.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern2.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,IAAI;IAAK,CAAC;IAAK,CAAC;QAAI,CAAC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iA9IGRlc3RfMS5jNDsKCm1vZHVsZSBtIHsKICAgIGNvbnN0IGRlc3QgPSBmMTUoKTsKICAgIGV4cG9ydCBjb25zdCBhNDogc3RyaW5nID0gZGVzdC5hNDsKICAgIGV4cG9ydCBjb25zdCBiNDogbnVtYmVyID0gZGVzdC5iNDsKICAgIGV4cG9ydCBjb25zdCBjNDogYm9vbGVhbiA9IGRlc3QuYzQ7Cn0= - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitInferredDefaultExportType2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitInferredDefaultExportType2.d.ts.map deleted file mode 100644 index 6f3be3ccc17af..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitInferredDefaultExportType2.d.ts.map +++ /dev/null @@ -1,25 +0,0 @@ -//// [tests/cases/compiler/declarationEmitInferredDefaultExportType2.ts] //// - - - -/// [Declarations] //// - - - -//// [declarationEmitInferredDefaultExportType2.d.ts] -declare const _default: { - foo: readonly []; - bar: any; - baz: any; -}; -export = _default; -//# sourceMappingURL=declarationEmitInferredDefaultExportType2.d.ts.map - -/// [Declarations Maps] //// - - -//// [declarationEmitInferredDefaultExportType2.d.ts.map] -{"version":3,"file":"declarationEmitInferredDefaultExportType2.d.ts","sourceRoot":"","sources":["declarationEmitInferredDefaultExportType2.ts"],"names":[],"mappings":";IAEE,GAAG;IACH,GAAG;IACH,GAAG;;AAHL,kBAIC"} - -//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBfZGVmYXVsdDogew0KICAgIGZvbzogcmVhZG9ubHkgW107DQogICAgYmFyOiBhbnk7DQogICAgYmF6OiBhbnk7DQp9Ow0KZXhwb3J0ID0gX2RlZmF1bHQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbkVtaXRJbmZlcnJlZERlZmF1bHRFeHBvcnRUeXBlMi5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0SW5mZXJyZWREZWZhdWx0RXhwb3J0VHlwZTIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdEluZmVycmVkRGVmYXVsdEV4cG9ydFR5cGUyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7SUFFRSxHQUFHO0lBQ0gsR0FBRztJQUNILEdBQUc7O0FBSEwsa0JBSUMifQ==,Ly8gdGVzdC50cwpleHBvcnQgPSB7CiAgZm9vOiBbXSBhcyBjb25zdCwKICBiYXI6IHVuZGVmaW5lZCwKICBiYXo6IG51bGwKfQ== - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuredDeclarationEmit.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuredDeclarationEmit.d.ts.map deleted file mode 100644 index 43ebc17221868..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuredDeclarationEmit.d.ts.map +++ /dev/null @@ -1,54 +0,0 @@ -//// [tests/cases/compiler/destructuredDeclarationEmit.ts] //// - - - -/// [Declarations] //// - - - -//// [foo.d.ts] -declare const foo: { - bar: string; - bat: string; - bam: { - bork: { - bar: string; - baz: string; - }; - }; -}; -declare const arr: [0, 1, 2, ['a', 'b', 'c', [{ - def: 'def'; -}, { - sec: 'sec'; -}]]]; -export { foo, arr }; -//# sourceMappingURL=foo.d.ts.map -//// [index.d.ts] -import { foo, arr } from './foo'; -export { foo, arr }; -declare const baz: string; -declare const ibaz: string; -export { baz, ibaz }; -declare const one: 1; -declare const bee: "b"; -declare const sec: "sec"; -export { one, bee, sec }; -declare const foo2: string; -export { foo2 }; -//# sourceMappingURL=index.d.ts.map - -/// [Declarations Maps] //// - - -//// [foo.d.ts.map] -{"version":3,"file":"foo.d.ts","sourceRoot":"","sources":["foo.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,GAAG;IAAK,GAAG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QUFFLEdBQUcsRUFBRSxHQUFHLEVBQUUsQ0FBQztJQUFDLEdBQUcsRUFBRSxLQUFLLENBQUE7Q0FBQyxFQUFFO0lBQUMsR0FBRyxFQUFFLEtBQUssQ0FBQTtDQUFDLENBQUMsQ0FBQyxDQUE0RCxDQUFDO0FBQy9ILE9BQU8sRUFBRSxHQUFHLEVBQUUsR0FBRyxFQUFFLENBQUMifQ==,Y29uc3QgZm9vID0geyBiYXI6ICdoZWxsbycsIGJhdDogJ3dvcmxkJywgYmFtOiB7IGJvcms6IHsgYmFyOiAnYScsIGJhejogJ2InIH0gfSB9Owpjb25zdCBhcnI6IFswLCAxLCAyLCBbJ2EnLCAnYicsICdjJywgW3tkZWY6ICdkZWYnfSwge3NlYzogJ3NlYyd9XV1dID0gWzAsIDEsIDIsIFsnYScsICdiJywgJ2MnLCBbe2RlZjogJ2RlZid9LCB7c2VjOiAnc2VjJ31dXV07CmV4cG9ydCB7IGZvbywgYXJyIH07 - - -//// [index.d.ts.map] -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEhB,QAAA,MAAM,GAAG,EAAE,MAAgB,CAAC;AAG5B,QAAA,MAAM,IAAI,EAAE,MAAyB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AAEjB,QAAA,MAAM,GAAG,EAAE,CAAU,CAAC;AACtB,QAAA,MAAM,GAAG,EAAE,GAAe,CAAC;AAC3B,QAAA,MAAM,GAAG,EAAE,KAAwB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAOzB,QAAA,MAAM,IAAI,EAAE,MAAiB,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,CAAC"} - -//// https://sokra.github.io/source-map-visualization#base64,aW1w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UFBLE1BQU0sSUFBSSxFQUFFLE1BQWlCLENBQUM7QUFDOUIsT0FBTyxFQUFFLElBQUksRUFBRSxDQUFDIn0=,aW1wb3J0IHsgZm9vLCBhcnIgfSBmcm9tICcuL2Zvbyc7CmV4cG9ydCB7IGZvbywgYXJyIH07CgogICAgY29uc3QgYmF6OiBzdHJpbmcgPSBmb28uYmFyOwogICAgY29uc3QgYmF0OiBzdHJpbmcgPSBmb28uYmF0OwogICAgY29uc3QgaWJhcjogc3RyaW5nID0gZm9vLmJhbS5ib3JrLmJhcjsKICAgIGNvbnN0IGliYXo6IHN0cmluZyA9IGZvby5iYW0uYm9yay5iYXo7CmV4cG9ydCB7IGJheiwgaWJheiB9OwoKICAgIGNvbnN0IG9uZTogMSA9IGFyclsxXTsKICAgIGNvbnN0IGJlZTogImIiID0gYXJyWzNdWzFdOwogICAgY29uc3Qgc2VjOiAic2VjIiA9IGFyclszXVszXVsxXS5zZWM7CmV4cG9ydCB7IG9uZSwgYmVlLCBzZWMgfTsKCmNvbnN0IGdldEZvbyA9ICgpID0+ICh7CiAgICBmb286ICdmb28nCn0pOwoKY29uc3QgZGVzdCA9IGdldEZvbygpOwpjb25zdCBmb28yOiBzdHJpbmcgPSBkZXN0LmZvbzsKZXhwb3J0IHsgZm9vMiB9Owo= - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/escapedReservedCompilerNamedIdentifier.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/escapedReservedCompilerNamedIdentifier.d.ts.map deleted file mode 100644 index b8553b9909a02..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/escapedReservedCompilerNamedIdentifier.d.ts.map +++ /dev/null @@ -1,46 +0,0 @@ -//// [tests/cases/compiler/escapedReservedCompilerNamedIdentifier.ts] //// - - - -/// [Declarations] //// - - - -//// [escapedReservedCompilerNamedIdentifier.d.ts] -declare var __proto__: number; -declare var o: { - __proto__: number; -}; -declare var b: number; -declare var o1: { - __proto__: number; -}; -declare var b1: number; -declare var ___proto__: number; -declare var o2: { - ___proto__: number; -}; -declare var b2: number; -declare var o3: { - ___proto__: number; -}; -declare var b3: number; -declare var _proto__: number; -declare var o4: { - _proto__: number; -}; -declare var b4: number; -declare var o5: { - _proto__: number; -}; -declare var b5: number; -//# sourceMappingURL=escapedReservedCompilerNamedIdentifier.d.ts.map - -/// [Declarations Maps] //// - - -//// [escapedReservedCompilerNamedIdentifier.d.ts.map] -{"version":3,"file":"escapedReservedCompilerNamedIdentifier.d.ts","sourceRoot":"","sources":["escapedReservedCompilerNamedIdentifier.ts"],"names":[],"mappings":"AACA,QAAA,IAAI,SAAS,QAAK,CAAC;AACnB,QAAA,IAAI,CAAC;;CAEJ,CAAC;AACF,QAAA,IAAI,CAAC,EAAE,MAAuB,CAAC;AAC/B,QAAA,IAAI,EAAE;IACF,SAAS;CACZ,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAwB,CAAC;AAEjC,QAAA,IAAI,UAAU,QAAK,CAAC;AACpB,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAyB,CAAC;AAClC,QAAA,IAAI,EAAE;IACF,UAAU;CACb,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAyB,CAAC;AAElC,QAAA,IAAI,QAAQ,QAAK,CAAC;AAClB,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAuB,CAAC;AAChC,QAAA,IAAI,EAAE;IACF,QAAQ;CACX,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAuB,CAAC"} - -//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgX19wcm90b19fOiBudW1iZXI7DQpkZWNsYXJlIHZhciBvOiB7DQogICAgX19wcm90b19fOiBudW1iZXI7DQp9Ow0KZGVjbGFyZSB2YXIgYjogbnVtYmVyOw0KZGVjbGFyZSB2YXIgbzE6IHsNCiAgICBfX3Byb3RvX186IG51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zogMAp9Owp2YXIgYjU6IG51bWJlciA9IG81WyJfcHJvdG9fXyJdOw== - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/stringLiteralObjectLiteralDeclaration1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/stringLiteralObjectLiteralDeclaration1.d.ts.map deleted file mode 100644 index efb6ffa6e0fa8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/stringLiteralObjectLiteralDeclaration1.d.ts.map +++ /dev/null @@ -1,24 +0,0 @@ -//// [tests/cases/compiler/stringLiteralObjectLiteralDeclaration1.ts] //// - - - -/// [Declarations] //// - - - -//// [stringLiteralObjectLiteralDeclaration1.d.ts] -declare namespace m1 { - var n: { - 'foo bar': number; - }; -} -//# sourceMappingURL=stringLiteralObjectLiteralDeclaration1.d.ts.map - -/// [Declarations Maps] //// - - -//// [stringLiteralObjectLiteralDeclaration1.d.ts.map] -{"version":3,"file":"stringLiteralObjectLiteralDeclaration1.d.ts","sourceRoot":"","sources":["stringLiteralObjectLiteralDeclaration1.ts"],"names":[],"mappings":"AAAA,kBAAO,EAAE,CAAC;IACD,IAAI,CAAC;QAAK,SAAS;KAAK,CAAC;CACjC"} - -//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBuYW1lc3BhY2UgbTEgew0KICAgIHZhciBuOiB7DQogICAgICAgICdmb28gYmFyJzogbnVtYmVyOw0KICAgIH07DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1zdHJpbmdMaXRlcmFsT2JqZWN0TGl0ZXJhbERlY2xhcmF0aW9uMS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaW5nTGl0ZXJhbE9iamVjdExpdGVyYWxEZWNsYXJhdGlvbjEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInN0cmluZ0xpdGVyYWxPYmplY3RMaXRlcmFsRGVjbGFyYXRpb24xLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGtCQUFPLEVBQUUsQ0FBQztJQUNELElBQUksQ0FBQztRQUFLLFNBQVM7S0FBSyxDQUFDO0NBQ2pDIn0=,bW9kdWxlIG0xIHsKICBleHBvcnQgdmFyIG4gPSB7ICdmb28gYmFyJzogNCB9Owp9Cg== - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes2.d.ts.map deleted file mode 100644 index fdc9cadbaf9e5..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes2.d.ts.map +++ /dev/null @@ -1,51 +0,0 @@ -//// [tests/cases/conformance/types/literal/templateLiteralTypes2.ts] //// - - - -/// [Declarations] //// - - - -//// [templateLiteralTypes2.d.ts] -declare function ft1(s: string, n: number, u: 'foo' | 'bar' | 'baz', t: T): void; -declare function ft2(s: string): string; -declare function ft10(s: string): void; -declare function ft11(s: string, cond: boolean): void; -declare function ft12(s: string): void; -declare function widening(x: T): T; -declare function nonWidening(x: T): T; -declare function ft13(s: string, cond: boolean): void; -type T0 = string | `${number}px`; -declare function ft14(t: `foo${number}`): void; -declare function g1(x: T): T; -declare function g2(x: T): T; -declare function ft20(s: string): void; -declare function takesLiteral(literal: T): T extends `foo.bar.${infer R}` ? R : unknown; -declare const t1: "baz"; -declare const id2 = "foo.bar.baz"; -declare const t2: "baz"; -declare const someString: string; -declare const t3: string; -declare const id4: string; -declare const t4: unknown; -declare const someUnion: 'abc' | 'def' | 'ghi'; -declare const t5: "abc" | "def" | "ghi"; -declare const pixelValue: number; -type PixelValueType = `${number}px`; -declare const pixelString: PixelValueType; -declare const pixelStringWithTemplate: PixelValueType; -declare function getCardTitle(title: string): `test-${string}`; -declare const interpolatedStyle: { - rotate: number; -}; -declare function C2(transform: "-moz-initial" | (string & {})): number; -//# sourceMappingURL=templateLiteralTypes2.d.ts.map - -/// [Declarations Maps] //// -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fXB4YDsKCmNvbnN0IHBpeGVsU3RyaW5nOiBQaXhlbFZhbHVlVHlwZSA9IGAyMnB4YDsKCmNvbnN0IHBpeGVsU3RyaW5nV2l0aFRlbXBsYXRlOiBQaXhlbFZhbHVlVHlwZSA9IGAke3BpeGVsVmFsdWV9cHhgOwoKLy8gUmVwcm8gZnJvbSAjNDMxNDMKCmZ1bmN0aW9uIGdldENhcmRUaXRsZSh0aXRsZTogc3RyaW5nKTogYHRlc3QtJHtzdHJpbmd9YCB7CiAgICByZXR1cm4gYHRlc3QtJHt0aXRsZX1gOwp9CgovLyBSZXBybyBmcm9tICM0MzQyNAoKY29uc3QgaW50ZXJwb2xhdGVkU3R5bGUgPSB7IHJvdGF0ZTogMTIgfTsKZnVuY3Rpb24gQzIodHJhbnNmb3JtOiAiLW1vei1pbml0aWFsIiB8IChzdHJpbmcgJiB7fSkpOiBudW1iZXIgeyByZXR1cm4gMTI7IH0KQzIoYHJvdGF0ZSgke2ludGVycG9sYXRlZFN0eWxlLnJvdGF0ZX1kaWcpYCk7Cg== - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/uniqueSymbolsDeclarationsErrors.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/uniqueSymbolsDeclarationsErrors.d.ts.map deleted file mode 100644 index 514de2a7b1750..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/uniqueSymbolsDeclarationsErrors.d.ts.map +++ /dev/null @@ -1,65 +0,0 @@ -//// [tests/cases/conformance/types/uniqueSymbol/uniqueSymbolsDeclarationsErrors.ts] //// - - - -/// [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 - -/// [Declarations Maps] //// - - -//// [uniqueSymbolsDeclarationsErrors.d.ts.map] -{"version":3,"file":"uniqueSymbolsDeclarationsErrors.d.ts","sourceRoot":"","sources":["uniqueSymbolsDeclarationsErrors.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,MAAM,CAAC;AAC/B,UAAU,CAAC;IAAG,QAAQ,CAAC,YAAY,EAAE,OAAO,MAAM,CAAC;CAAE;AAIrD,eAAO,MAAM,GAAG;IACZ,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC;IAG9B,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC;CAGnD,CAAC;AAEF,eAAO,MAAM,eAAe;;QACxB,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC;QAG9B,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC;;CAGnD,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,GAAG,EAAE;IAAE,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CAAE,GAAG;IACxE,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,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FByaXZhdGVOYW1lZFByb3BlcnRpZXMgPSB7CiAgICBbc106IGFueTsKfQoKZXhwb3J0IHR5cGUgVHlwZUxpdGVyYWxXaXRoUHJpdmF0ZU5hbWVkTWV0aG9kcyA9IHsKICAgIFtzXSgpOiBhbnk7Cn0KCmV4cG9ydCBjbGFzcyBDbGFzc1dpdGhQcml2YXRlTmFtZWRQcm9wZXJ0aWVzIHsKICAgIFtzXTogYW55OwogICAgc3RhdGljIFtzXTogYW55Owp9CgpleHBvcnQgY2xhc3MgQ2xhc3NXaXRoUHJpdmF0ZU5hbWVkTWV0aG9kcyB7CiAgICBbc10oKTogdm9pZCB7fQogICAgc3RhdGljIFtzXSgpOiB2b2lkIHt9Cn0KCmV4cG9ydCBjbGFzcyBDbGFzc1dpdGhQcml2YXRlTmFtZWRBY2Nlc3NvcnMgewogICAgZ2V0IFtzXSgpOiBhbnkgeyByZXR1cm4gdW5kZWZpbmVkOyB9CiAgICBzZXQgW3NdKHY6IGFueSkgeyB9CiAgICBzdGF0aWMgZ2V0IFtzXSgpOiBhbnkgeyByZXR1cm4gdW5kZWZpbmVkOyB9CiAgICBzdGF0aWMgc2V0IFtzXSh2OiBhbnkpIHsgfQp9 - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/vardecl.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/vardecl.d.ts.map deleted file mode 100644 index 9d3a16d4150ff..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/vardecl.d.ts.map +++ /dev/null @@ -1,96 +0,0 @@ -//// [tests/cases/compiler/vardecl.ts] //// - - - -/// [Declarations] //// - - - -//// [vardecl.d.ts] -declare var simpleVar: any; -declare var anotherVar: any; -declare var varWithSimpleType: number; -declare var varWithArrayType: number[]; -declare var varWithInitialValue: number; -declare var withComplicatedValue: { - x: number; - y: number; - desc: string; -}; -declare var declaredVar: any; -declare var declareVar2: any; -declare var declaredVar3: any; -declare var deckareVarWithType: number; -declare var arrayVar: string[]; -declare var complicatedArrayVar: { - x: number; - y: string; -}[]; -declare var n1: { - [s: string]: number; -}; -declare var c: { - new?(): any; -}; -declare var d: { - foo?(): { - x: number; - }; -}; -declare var d3: { - foo(): { - x: number; - y: number; - }; -}; -declare var d2: { - foo(): { - x: number; - }; -}; -declare var n2: { - (): void; -}; -declare var n4: { - (): void; -}[]; -declare var d4: { - foo(n: string, x: { - x: number; - y: number; - }): { - x: number; - y: number; - }; -}; -declare namespace m2 { - var a: any, b2: number, b: any; - class C2 { - b: any; - constructor(b: any); - } - var mE: any; - var d1E: any, d2E: any; - var b2E: any; - var v1E: any; -} -declare var a22: any, b22: number, c22: number; -declare var nn: any; -declare var da1: any, da2: any; -declare var normalVar: any; -declare var dv1: any; -declare var xl: any; -declare var x: any; -declare var z: any; -declare function foo(a2: any): void; -declare var b: number; -//# sourceMappingURL=vardecl.d.ts.map - -/// [Declarations Maps] //// - - -//// [vardecl.d.ts.map] -{"version":3,"file":"vardecl.d.ts","sourceRoot":"","sources":["vardecl.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,SAAS,EAAE,GAAG,CAAC;AAEnB,QAAA,IAAI,UAAU,EAAE,GAAG,CAAC;AACpB,QAAA,IAAI,iBAAiB,EAAE,MAAM,CAAC;AAC9B,QAAA,IAAI,gBAAgB,EAAE,MAAM,EAAE,CAAC;AAE/B,QAAA,IAAI,mBAAmB,QAAK,CAAC;AAE7B,QAAA,IAAI,oBAAoB;IAAK,CAAC;IAAM,CAAC;IAAM,IAAI;CAAc,CAAC;AAE9D,OAAO,CAAC,IAAI,WAAW,EAAE,GAAG,CAAC;AAC7B,OAAO,CAAC,IAAI,WAAW,EAAE,GAAG,CAAA;AAE5B,OAAO,CAAC,IAAI,YAAY,EAAE,GAAG,CAAC;AAC9B,OAAO,CAAC,IAAI,kBAAkB,EAAE,MAAM,CAAC;AAEvC,QAAA,IAAI,QAAQ,EAAE,MAAM,EAAe,CAAC;AAEpC,QAAA,IAAI,mBAAmB,EAAE;IA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sKICAgIHZhciBhID0gMTA7Cn0KCmZvciAodmFyIGkgPSAwLCBqID0gMDsgaSA8IDEwOyBpKyspIHsKICAgIGorKzsKfQoKCmZvciAodmFyIGsgPSAwOyBrIDwgMzA7IGsrKykgewogICAgaysrOwp9CnZhciBiID0gMTA7Cg== - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/withExportDecl.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/withExportDecl.d.ts.map deleted file mode 100644 index 3dd1a61b87afd..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/withExportDecl.d.ts.map +++ /dev/null @@ -1,44 +0,0 @@ -//// [tests/cases/compiler/withExportDecl.ts] //// - - - -/// [Declarations] //// - - - -//// [withExportDecl.d.ts] -export declare var exportedSimpleVar: any; -export declare var exportedVarWithInitialValue: number; -export declare var exportedWithComplicatedValue: { - x: number; - y: number; - desc: string; -}; -export declare var exportedDeclaredVar: number; -export declare var exportedArrayVar: { - x: number; - y: string; -}[]; -export declare function exportedFunction(): { - x: string; - y: string; - n: number; -}; -export declare namespace m2 { - var a: number; -} -export declare namespace m3 { - function foo(): string; -} -export declare var eVar1: any, eVar2: number; -export declare var eVar3: number, eVar4: any, eVar5: any; -//# sourceMappingURL=withExportDecl.d.ts.map - -/// [Declarations Maps] //// - - -//// [withExportDecl.d.ts.map] -{"version":3,"file":"withExportDecl.d.ts","sourceRoot":"","sources":["withExportDecl.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,iBAAiB,EAAE,GAAG,CAAC;AAOlC,eAAO,IAAI,2BAA2B,QAAK,CAAC;AAG5C,eAAO,IAAI,4BAA4B;IAAK,CAAC;IAAM,CAAC;IAAM,IAAI;CAAc,CAAC;AAO7E,MAAM,CAAC,OAAO,CAAC,IAAI,mBAAmB,EAAE,MAAM,CAAC;AAI/C,eAAO,IAAI,gBAAgB,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;CA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ZXhwb3J0ZWRBcnJheVZhci5wdXNoKHsgeDogMzAsIHkgOiAnaGVsbG8gd29ybGQnIH0pOwoKZnVuY3Rpb24gc2ltcGxlRnVuY3Rpb24oKSB7CiAgICByZXR1cm4gewogICAgICAgIHg6ICJIZWxsbyIsCiAgICAgICAgeTogIndvcmQiLAogICAgICAgIG46IDIKICAgIH07Cn0KCmV4cG9ydCBmdW5jdGlvbiBleHBvcnRlZEZ1bmN0aW9uKCk6IHsKICAgIHg6IHN0cmluZzsKICAgIHk6IHN0cmluZzsKICAgIG46IG51bWJlcjsKfSB7CiAgICByZXR1cm4gc2ltcGxlRnVuY3Rpb24oKTsKfQoKbW9kdWxlIG0xIHsKICAgIGV4cG9ydCBmdW5jdGlvbiBmb28oKSB7CiAgICAgICAgcmV0dXJuICJIZWxsbyI7CiAgICB9Cn0KZXhwb3J0IGRlY2xhcmUgbW9kdWxlIG0yIHsKCiAgICBleHBvcnQgdmFyIGE6IG51bWJlcjsKfQoKCmV4cG9ydCBtb2R1bGUgbTMgewoKICAgIGV4cG9ydCBmdW5jdGlvbiBmb28oKTogc3RyaW5nIHsKICAgICAgICByZXR1cm4gbTEuZm9vKCk7CiAgICB9Cn0KCmV4cG9ydCB2YXIgZVZhcjE6IGFueSwgZVZhcjIgPSAxMDsKdmFyIGVWYXIyMjsKZXhwb3J0IHZhciBlVmFyMyA9IDEwLCBlVmFyNDogYW55LCBlVmFyNTogYW55Ow== - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/controlFlowAliasing.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/controlFlowAliasing.d.ts.map deleted file mode 100644 index 04b5e4d7e8483..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/controlFlowAliasing.d.ts.map +++ /dev/null @@ -1,162 +0,0 @@ -//// [tests/cases/conformance/controlFlow/controlFlowAliasing.ts] //// - - - -/// [Declarations] //// - - - -//// [controlFlowAliasing.d.ts] -declare function f10(x: string | number): void; -declare function f11(x: unknown): void; -declare function f12(x: string | number | boolean): void; -declare function f13(x: string | number | boolean): void; -declare function f14(x: number | null | undefined): number | null; -declare function f15(obj: { - readonly x: string | number; -}): void; -declare function f16(obj: { - readonly x: string | number; -}): void; -declare function f17(obj: readonly [string | number]): void; -declare function f18(obj: readonly [string | number]): void; -declare function f20(obj: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare function f21(obj: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare function f22(obj: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare function f23(obj: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare function f24(arg: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare function f25(arg: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare function f26(outer: { - readonly obj: { - kind: 'foo'; - foo: string; - } | { - kind: 'bar'; - bar: number; - }; -}): void; -declare function f27(outer: { - obj: { - kind: 'foo'; - foo: string; - } | { - kind: 'bar'; - bar: number; - }; -}): void; -declare function f28(obj?: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare function f30(obj: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare function f31(obj: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare function f32(obj: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare function f33(obj: { - kind: 'foo'; - foo: string; -} | { - kind: 'bar'; - bar: number; -}): void; -declare class C10 { - readonly x: string | number; - constructor(x: string | number); -} -declare class C11 { - readonly x: string | number; - constructor(x: string | number); -} -declare function f40(obj: { - kind: 'foo'; - foo?: string; -} | { - kind: 'bar'; - bar?: number; -}): void; -type Data = { - kind: 'str'; - payload: string; -} | { - kind: 'num'; - payload: number; -}; -declare function gg2(obj: Data): void; -declare function foo({ kind, payload }: Data): void; -declare const obj: { - fn: () => boolean; -}; -declare const a: boolean; -declare class Utils { - static isDefined(value: T): value is NonNullable; -} -declare class A53267 { - readonly testNumber: number | undefined; - foo(): void; -} -//# sourceMappingURL=controlFlowAliasing.d.ts.map - -/// [Declarations Maps] //// - - -//// [controlFlowAliasing.d.ts.map] -{"version":3,"file":"controlFlowAliasing.d.ts","sourceRoot":"","sources":["controlFlowAliasing.ts"],"names":[],"mappings":"AAEA,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQrC;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,CAK7B;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAS/C;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAU/C;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAGxD;AAED,iBAAS,GAAG,CAAC,GAAG,EAAE;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,IAAI,CAKvD;AAED,iBAAS,GAAG,CAAC,GAAG,EAAE;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,IAAI,CAMvD;AAED,iBAAS,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,IAAI,CAKlD;AAED,iBAAS,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,IAAI,CAMlD;AAED,iBAAS,GAAG,CAAC,GAAG,EAAE;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CA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ci5vYmouZm9vOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgb3V0ZXIub2JqLmJhcjsKICAgIH0KfQoKZnVuY3Rpb24gZjI3KG91dGVyOiB7IG9iajogeyBraW5kOiAnZm9vJywgZm9vOiBzdHJpbmcgfSB8IHsga2luZDogJ2JhcicsIGJhcjogbnVtYmVyIH0gfSk6IHZvaWQgewogICAgY29uc3QgaXNGb28gPSBvdXRlci5vYmoua2luZCA9PT0gJ2Zvbyc7CiAgICBpZiAoaXNGb28pIHsKICAgICAgICBvdXRlci5vYmouZm9vOyAgLy8gTm90IG5hcnJvd2VkIGJlY2F1c2Ugb2JqIGlzIG11dGFibGUKICAgIH0KICAgIGVsc2UgewogICAgICAgIG91dGVyLm9iai5iYXI7ICAvLyBOb3QgbmFycm93ZWQgYmVjYXVzZSBvYmogaXMgbXV0YWJsZQogICAgfQp9CgpmdW5jdGlvbiBmMjgob2JqPzogeyBraW5kOiAnZm9vJywgZm9vOiBzdHJpbmcgfSB8IHsga2luZDogJ2JhcicsIGJhcjogbnVtYmVyIH0pOiB2b2lkIHsKICAgIGNvbnN0IGlzRm9vID0gb2JqICYmIG9iai5raW5kID09PSAnZm9vJzsKICAgIGNvbnN0IGlzQmFyID0gb2JqICYmIG9iai5raW5kID09PSAnYmFyJzsKICAgIGlmIChpc0ZvbykgewogICAgICAgIG9iai5mb287CiAgICB9CiAgICBpZiAoaXNCYXIpIHsKICAgICAgICBvYmouYmFyOwogICAgfQp9CgovLyBOYXJyb3dpbmcgYnkgYWxpYXNlZCBkaXNjcmltaW5hbnQgcHJvcGVydHkgYWNjZXNzCgpmdW5jdGlvbiBmMzAob2JqOiB7IGtpbmQ6ICdmb28nLCBmb286IHN0cmluZyB9IHwgeyBraW5kOiAnYmFyJywgYmFyOiBudW1iZXIgfSk6IHZvaWQgewogICAgY29uc3Qga2luZCA9IG9iai5raW5kOwogICAgaWYgKGtpbmQgPT09ICdmb28nKSB7CiAgICAgICAgb2JqLmZvbzsKICAgIH0K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nICYmIHhJc1N0cmluZykgewogICAgICAgICAgICBsZXQgczogc3RyaW5nOwogICAgICAgICAgICBzID0gdGhpcy54OwogICAgICAgICAgICBzID0geDsKICAgICAgICB9CiAgICB9Cn0KCmNsYXNzIEMxMSB7CiAgICBjb25zdHJ1Y3RvcihyZWFkb25seSB4OiBzdHJpbmcgfCBudW1iZXIpIHsKICAgICAgICBjb25zdCB0aGlzWF9pc1N0cmluZyA9IHR5cGVvZiB0aGlzLnggPT09ICdzdHJpbmcnOwogICAgICAgIGNvbnN0IHhJc1N0cmluZyA9IHR5cGVvZiB4ID09PSAnc3RyaW5nJzsKICAgICAgICBpZiAodGhpc1hfaXNTdHJpbmcgJiYgeElzU3RyaW5nKSB7CiAgICAgICAgICAgIC8vIFNvbWUgbmFycm93aW5ncyBtYXkgYmUgaW52YWxpZGF0ZWQgZHVlIHRvIGxhdGVyIGFzc2lnbm1lbnRzLgogICAgICAgICAgICBsZXQgczogc3RyaW5nOwogICAgICAgICAgICBzID0gdGhpcy54OwogICAgICAgICAgICBzID0geDsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHRoaXMueCA9IDEwOwogICAgICAgICAgICB4ID0gMTA7CiAgICAgICAgfQogICAgfQp9CgovLyBNaXhpbmcgb2YgYWxpYXNlZCBkaXNjcmltaW5hbnRzIGFuZCBjb25kaXRpb25hbHMKCmZ1bmN0aW9uIGY0MChvYmo6IHsga2luZDogJ2ZvbycsIGZvbz86IHN0cmluZyB9IHwgeyBraW5kOiAnYmFyJywgYmFyPzogbnVtYmVyIH0pOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCB9ID0gb2JqOwogICAgY29uc3QgaXNGb28gPSBraW5kID09ICdmb28nOwogICAgaWYgKGlzRm9vICYmIG9iai5mb28pIHsKICAgICAgICBsZXQgdDogc3RyaW5nID0gb2JqLmZvbzsKICAgIH0KfQoKLy8gVW5zdXBwb3J0ZWQgbmFycm93aW5nIG9mIGRlc3RydWN0dXJlZCB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nVtYmVyID0gVXRpbHMuaXNEZWZpbmVkKHRoaXMudGVzdE51bWJlcik7CgogICAgaWYgKGlzTnVtYmVyKSB7CiAgICAgIGNvbnN0IHg6IG51bWJlciA9IHRoaXMudGVzdE51bWJlcjsKICAgIH0KICB9Cn0= - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/controlFlowAliasing.d.ts.map.formatted b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/controlFlowAliasing.d.ts.map.formatted deleted file mode 100644 index b2cef008738db..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/controlFlowAliasing.d.ts.map.formatted +++ /dev/null @@ -1,7835 +0,0 @@ -//// [controlFlowAliasing.ts] //// - -//// [controlFlowAliasing.d.ts.map] -{ - "version": 3, - "file": "controlFlowAliasing.d.ts", - "sourceRoot": "", - "sources": [ - "controlFlowAliasing.ts" - ], - "names": [], - "mappings": [ - { - "generatedLine": 1, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 1, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 1, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 12, - "name": null, - "generatedText": "f10", - "sourceText": "f10" - }, - { - "generatedLine": 1, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 1, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 14, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 1, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 16, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 1, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 22, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 1, - "generatedColumn": 33, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 25, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 1, - "generatedColumn": 39, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 31, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 1, - "generatedColumn": 42, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 34, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 1, - "generatedColumn": 46, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 3, - "originalColumn": 38, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 1, - "generatedColumn": 47, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 11, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 2, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 13, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 2, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 13, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 2, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 13, - "originalColumn": 12, - "name": null, - "generatedText": "f11", - "sourceText": "f11" - }, - { - "generatedLine": 2, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 13, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 2, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 13, - "originalColumn": 14, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 2, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 13, - "originalColumn": 16, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 2, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 13, - "originalColumn": 23, - "name": null, - "generatedText": "unknown", - "sourceText": "unknown" - }, - { - "generatedLine": 2, - "generatedColumn": 34, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 13, - "originalColumn": 26, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 2, - "generatedColumn": 38, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 13, - "originalColumn": 30, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 2, - "generatedColumn": 39, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 18, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 3, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 3, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 3, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 12, - "name": null, - "generatedText": "f12", - "sourceText": "f12" - }, - { - "generatedLine": 3, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 3, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 14, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 3, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 16, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 3, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 22, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 3, - "generatedColumn": 33, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 25, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 3, - "generatedColumn": 39, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 31, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 3, - "generatedColumn": 42, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 34, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 3, - "generatedColumn": 49, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 41, - "name": null, - "generatedText": "boolean", - "sourceText": "boolean" - }, - { - "generatedLine": 3, - "generatedColumn": 52, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 44, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 3, - "generatedColumn": 56, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 20, - "originalColumn": 48, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 3, - "generatedColumn": 57, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 29, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 4, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 4, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 4, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 12, - "name": null, - "generatedText": "f13", - "sourceText": "f13" - }, - { - "generatedLine": 4, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 4, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 14, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 4, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 16, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 4, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 22, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 4, - "generatedColumn": 33, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 25, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 4, - "generatedColumn": 39, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 31, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 4, - "generatedColumn": 42, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 34, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 4, - "generatedColumn": 49, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 41, - "name": null, - "generatedText": "boolean", - "sourceText": "boolean" - }, - { - "generatedLine": 4, - "generatedColumn": 52, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 44, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 4, - "generatedColumn": 56, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 31, - "originalColumn": 48, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 4, - "generatedColumn": 57, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 41, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 5, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 5, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 5, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 12, - "name": null, - "generatedText": "f14", - "sourceText": "f14" - }, - { - "generatedLine": 5, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 5, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 14, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 5, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 16, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 5, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 22, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 5, - "generatedColumn": 33, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 25, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 5, - "generatedColumn": 37, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 29, - "name": null, - "generatedText": "null", - "sourceText": "null" - }, - { - "generatedLine": 5, - "generatedColumn": 40, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 32, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 5, - "generatedColumn": 49, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 41, - "name": null, - "generatedText": "undefined", - "sourceText": "undefined" - }, - { - "generatedLine": 5, - "generatedColumn": 52, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 44, - "name": null, - "generatedText": "): ", - "sourceText": "): " - }, - { - "generatedLine": 5, - "generatedColumn": 58, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 50, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 5, - "generatedColumn": 61, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 53, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 5, - "generatedColumn": 65, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 43, - "originalColumn": 57, - "name": null, - "generatedText": "null", - "sourceText": "null" - }, - { - "generatedLine": 5, - "generatedColumn": 66, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 46, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 6, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 6, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 6, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 12, - "name": null, - "generatedText": "f15", - "sourceText": "f15" - }, - { - "generatedLine": 6, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 6, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 6, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 7, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 7, - "generatedColumn": 12, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 28, - "name": null, - "generatedText": "readonly", - "sourceText": "readonly" - }, - { - "generatedLine": 7, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 29, - "name": null, - "generatedText": " ", - "sourceText": " " - }, - { - "generatedLine": 7, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 30, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 7, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 32, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 7, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 38, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 7, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 41, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 7, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 47, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 7, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 47, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 8, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 49, - "name": null - }, - { - "generatedLine": 8, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 52, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 8, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 48, - "originalColumn": 56, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 8, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 53, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 9, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 9, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 9, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 12, - "name": null, - "generatedText": "f16", - "sourceText": "f16" - }, - { - "generatedLine": 9, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 9, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 9, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 10, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 10, - "generatedColumn": 12, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 28, - "name": null, - "generatedText": "readonly", - "sourceText": "readonly" - }, - { - "generatedLine": 10, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 29, - "name": null, - "generatedText": " ", - "sourceText": " " - }, - { - "generatedLine": 10, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 30, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 10, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 32, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 10, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 38, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 10, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 41, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 10, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 47, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 10, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 47, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 11, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 49, - "name": null - }, - { - "generatedLine": 11, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 52, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 11, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 55, - "originalColumn": 56, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 11, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 61, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 12, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 12, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 12, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 12, - "name": null, - "generatedText": "f17", - "sourceText": "f17" - }, - { - "generatedLine": 12, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 12, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 12, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 12, - "generatedColumn": 35, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 27, - "name": null, - "generatedText": "readonly ", - "sourceText": "readonly " - }, - { - "generatedLine": 12, - "generatedColumn": 36, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 28, - "name": null, - "generatedText": "[", - "sourceText": "[" - }, - { - "generatedLine": 12, - "generatedColumn": 42, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 34, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 12, - "generatedColumn": 45, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 37, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 12, - "generatedColumn": 51, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 43, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 12, - "generatedColumn": 52, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 44, - "name": null, - "generatedText": "]", - "sourceText": "]" - }, - { - "generatedLine": 12, - "generatedColumn": 55, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 47, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 12, - "generatedColumn": 59, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 63, - "originalColumn": 51, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 12, - "generatedColumn": 60, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 68, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 13, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 13, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 13, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 12, - "name": null, - "generatedText": "f18", - "sourceText": "f18" - }, - { - "generatedLine": 13, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 13, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 13, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 13, - "generatedColumn": 35, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 27, - "name": null, - "generatedText": "readonly ", - "sourceText": "readonly " - }, - { - "generatedLine": 13, - "generatedColumn": 36, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 28, - "name": null, - "generatedText": "[", - "sourceText": "[" - }, - { - "generatedLine": 13, - "generatedColumn": 42, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 34, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 13, - "generatedColumn": 45, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 37, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 13, - "generatedColumn": 51, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 43, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 13, - "generatedColumn": 52, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 44, - "name": null, - "generatedText": "]", - "sourceText": "]" - }, - { - "generatedLine": 13, - "generatedColumn": 55, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 47, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 13, - "generatedColumn": 59, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 70, - "originalColumn": 51, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 13, - "generatedColumn": 60, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 76, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 14, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 14, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 14, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 12, - "name": null, - "generatedText": "f20", - "sourceText": "f20" - }, - { - "generatedLine": 14, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 14, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 14, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 15, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 15, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 15, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 15, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 15, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 16, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 16, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 16, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 38, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 16, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 44, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 16, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 44, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 17, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 46, - "name": null - }, - { - "generatedLine": 17, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 49, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 18, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 18, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 55, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 18, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 57, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 18, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 62, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 18, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 63, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 19, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 19, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 67, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 19, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 69, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 19, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 75, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 19, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 75, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 20, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 77, - "name": null - }, - { - "generatedLine": 20, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 80, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 20, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 78, - "originalColumn": 84, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 20, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 86, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 21, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 21, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 21, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 12, - "name": null, - "generatedText": "f21", - "sourceText": "f21" - }, - { - "generatedLine": 21, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 21, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 21, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 22, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 22, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 22, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 22, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 22, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 23, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 23, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 23, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 38, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 23, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 44, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 23, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 44, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 24, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 46, - "name": null - }, - { - "generatedLine": 24, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 49, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 25, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 25, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 55, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 25, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 57, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 25, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 62, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 25, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 63, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 26, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 26, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 67, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 26, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 69, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 26, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 75, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 26, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 75, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 27, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 77, - "name": null - }, - { - "generatedLine": 27, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 80, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 27, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 88, - "originalColumn": 84, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 27, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 96, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 28, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 28, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 28, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 12, - "name": null, - "generatedText": "f22", - "sourceText": "f22" - }, - { - "generatedLine": 28, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 28, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 28, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 29, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 29, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 29, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 29, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 29, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 30, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 30, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 30, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 38, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 30, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 44, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 30, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 44, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 31, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 46, - "name": null - }, - { - "generatedLine": 31, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 49, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 32, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 32, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 55, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 32, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 57, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 32, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 62, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 32, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 63, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 33, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 33, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 67, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 33, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 69, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 33, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 75, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 33, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 75, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 34, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 77, - "name": null - }, - { - "generatedLine": 34, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 80, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 34, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 98, - "originalColumn": 84, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 34, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 106, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 35, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 35, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 35, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 12, - "name": null, - "generatedText": "f23", - "sourceText": "f23" - }, - { - "generatedLine": 35, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 35, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 35, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 36, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 36, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 36, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 36, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 36, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 37, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 37, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 37, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 38, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 37, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 44, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 37, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 44, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 38, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 46, - "name": null - }, - { - "generatedLine": 38, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 49, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 39, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 39, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 55, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 39, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 57, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 39, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 62, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 39, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 63, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 40, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 40, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 67, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 40, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 69, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 40, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 75, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 40, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 75, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 41, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 77, - "name": null - }, - { - "generatedLine": 41, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 80, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 41, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 108, - "originalColumn": 84, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 41, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 117, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 42, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 42, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 42, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 12, - "name": null, - "generatedText": "f24", - "sourceText": "f24" - }, - { - "generatedLine": 42, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 42, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 16, - "name": null, - "generatedText": "arg", - "sourceText": "arg" - }, - { - "generatedLine": 42, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 43, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 43, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 43, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 43, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 43, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 44, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 44, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 44, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 38, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 44, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 44, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 44, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 44, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 45, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 46, - "name": null - }, - { - "generatedLine": 45, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 49, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 46, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 46, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 55, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 46, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 57, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 46, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 62, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 46, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 63, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 47, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 47, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 67, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 47, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 69, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 47, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 75, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 47, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 75, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 48, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 77, - "name": null - }, - { - "generatedLine": 48, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 80, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 48, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 119, - "originalColumn": 84, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 48, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 128, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 49, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 49, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 49, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 12, - "name": null, - "generatedText": "f25", - "sourceText": "f25" - }, - { - "generatedLine": 49, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 49, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 16, - "name": null, - "generatedText": "arg", - "sourceText": "arg" - }, - { - "generatedLine": 49, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 50, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 50, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 50, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 50, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 50, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 51, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 51, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 51, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 38, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 51, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 44, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 51, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 44, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 52, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 46, - "name": null - }, - { - "generatedLine": 52, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 49, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 53, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 53, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 55, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 53, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 57, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 53, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 62, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 53, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 63, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 54, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 54, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 67, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 54, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 69, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 54, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 75, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 54, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 75, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 55, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 77, - "name": null - }, - { - "generatedLine": 55, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 80, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 55, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 130, - "originalColumn": 84, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 55, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 139, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 56, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 56, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 56, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 12, - "name": null, - "generatedText": "f26", - "sourceText": "f26" - }, - { - "generatedLine": 56, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 56, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 18, - "name": null, - "generatedText": "outer", - "sourceText": "outer" - }, - { - "generatedLine": 56, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 20, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 57, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 22, - "name": null - }, - { - "generatedLine": 57, - "generatedColumn": 12, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 30, - "name": null, - "generatedText": "readonly", - "sourceText": "readonly" - }, - { - "generatedLine": 57, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 31, - "name": null, - "generatedText": " ", - "sourceText": " " - }, - { - "generatedLine": 57, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 34, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 57, - "generatedColumn": 18, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 36, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 58, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 38, - "name": null - }, - { - "generatedLine": 58, - "generatedColumn": 12, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 42, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 58, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 44, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 58, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 49, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 58, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 50, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 59, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 59, - "generatedColumn": 11, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 54, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 59, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 56, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 59, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 62, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 59, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 62, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 60, - "generatedColumn": 5, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 60, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 67, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 61, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 69, - "name": null - }, - { - "generatedLine": 61, - "generatedColumn": 12, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 73, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 61, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 75, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 61, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 80, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 61, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 81, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 62, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 82, - "name": null - }, - { - "generatedLine": 62, - "generatedColumn": 11, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 85, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 62, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 87, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 62, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 93, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 62, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 93, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 63, - "generatedColumn": 5, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 95, - "name": null - }, - { - "generatedLine": 63, - "generatedColumn": 6, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 95, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 64, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 97, - "name": null - }, - { - "generatedLine": 64, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 100, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 64, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 141, - "originalColumn": 104, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 64, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 149, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 65, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 65, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 65, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 12, - "name": null, - "generatedText": "f27", - "sourceText": "f27" - }, - { - "generatedLine": 65, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 65, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 18, - "name": null, - "generatedText": "outer", - "sourceText": "outer" - }, - { - "generatedLine": 65, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 20, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 66, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 22, - "name": null - }, - { - "generatedLine": 66, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 25, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 66, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 27, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 67, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 29, - "name": null - }, - { - "generatedLine": 67, - "generatedColumn": 12, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 33, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 67, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 35, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 67, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 40, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 67, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 41, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 68, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 42, - "name": null - }, - { - "generatedLine": 68, - "generatedColumn": 11, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 45, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 68, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 47, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 68, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 53, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 68, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 53, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 69, - "generatedColumn": 5, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 55, - "name": null - }, - { - "generatedLine": 69, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 58, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 70, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 60, - "name": null - }, - { - "generatedLine": 70, - "generatedColumn": 12, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 64, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 70, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 66, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 70, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 71, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 70, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 72, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 71, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 73, - "name": null - }, - { - "generatedLine": 71, - "generatedColumn": 11, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 76, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 71, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 78, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 71, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 84, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 71, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 84, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 72, - "generatedColumn": 5, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 86, - "name": null - }, - { - "generatedLine": 72, - "generatedColumn": 6, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 86, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 73, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 88, - "name": null - }, - { - "generatedLine": 73, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 91, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 73, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 151, - "originalColumn": 95, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 73, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 159, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 74, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 74, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 74, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 12, - "name": null, - "generatedText": "f28", - "sourceText": "f28" - }, - { - "generatedLine": 74, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 74, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 74, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 17, - "name": null, - "generatedText": "?", - "sourceText": "?" - }, - { - "generatedLine": 74, - "generatedColumn": 27, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 19, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 75, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 21, - "name": null - }, - { - "generatedLine": 75, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 25, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 75, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 27, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 75, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 32, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 75, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 33, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 76, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 34, - "name": null - }, - { - "generatedLine": 76, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 37, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 76, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 39, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 76, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 45, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 76, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 45, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 77, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 47, - "name": null - }, - { - "generatedLine": 77, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 50, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 78, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 52, - "name": null - }, - { - "generatedLine": 78, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 56, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 78, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 58, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 78, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 63, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 78, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 64, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 79, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 65, - "name": null - }, - { - "generatedLine": 79, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 68, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 79, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 70, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 79, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 76, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 79, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 76, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 80, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 78, - "name": null - }, - { - "generatedLine": 80, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 81, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 80, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 161, - "originalColumn": 85, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 80, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 170, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 81, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 81, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 81, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 12, - "name": null, - "generatedText": "f30", - "sourceText": "f30" - }, - { - "generatedLine": 81, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 81, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 81, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 82, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 82, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 82, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 82, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 82, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 83, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 83, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 83, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 38, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 83, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 44, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 83, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 44, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 84, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 46, - "name": null - }, - { - "generatedLine": 84, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 49, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 85, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 85, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 55, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 85, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 57, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 85, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 62, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 85, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 63, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 86, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 86, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 67, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 86, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 69, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 86, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 75, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 86, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 75, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 87, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 77, - "name": null - }, - { - "generatedLine": 87, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 80, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 87, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 174, - "originalColumn": 84, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 87, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 182, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 88, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 88, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 88, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 12, - "name": null, - "generatedText": "f31", - "sourceText": "f31" - }, - { - "generatedLine": 88, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 88, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 88, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 89, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 89, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 89, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 89, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 89, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 90, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 90, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 90, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 38, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 90, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 44, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 90, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 44, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 91, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 46, - "name": null - }, - { - "generatedLine": 91, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 49, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 92, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 92, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 55, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 92, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 57, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 92, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 62, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 92, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 63, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 93, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 93, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 67, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 93, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 69, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 93, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 75, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 93, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 75, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 94, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 77, - "name": null - }, - { - "generatedLine": 94, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 80, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 94, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 184, - "originalColumn": 84, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 94, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 192, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 95, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 95, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 95, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 12, - "name": null, - "generatedText": "f32", - "sourceText": "f32" - }, - { - "generatedLine": 95, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 95, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 95, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 96, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 96, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 96, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 96, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 96, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 97, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 97, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 97, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 38, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 97, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 44, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 97, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 44, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 98, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 46, - "name": null - }, - { - "generatedLine": 98, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 49, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 99, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 99, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 55, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 99, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 57, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 99, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 62, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 99, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 63, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 100, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 100, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 67, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 100, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 69, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 100, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 75, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 100, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 75, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 101, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 77, - "name": null - }, - { - "generatedLine": 101, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 80, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 101, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 194, - "originalColumn": 84, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 101, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 202, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 102, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 102, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 102, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 12, - "name": null, - "generatedText": "f33", - "sourceText": "f33" - }, - { - "generatedLine": 102, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 102, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 102, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 103, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 103, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 103, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 103, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 103, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 104, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 104, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 104, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 38, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 104, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 44, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 104, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 44, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 105, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 46, - "name": null - }, - { - "generatedLine": 105, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 49, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 106, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 51, - "name": null - }, - { - "generatedLine": 106, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 55, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 106, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 57, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 106, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 62, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 106, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 63, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 107, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 64, - "name": null - }, - { - "generatedLine": 107, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 67, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 107, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 69, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 107, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 75, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 107, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 75, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 108, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 77, - "name": null - }, - { - "generatedLine": 108, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 80, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 108, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 204, - "originalColumn": 84, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 108, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 210, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 109, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 213, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 109, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 213, - "originalColumn": 6, - "name": null, - "generatedText": "declare class ", - "sourceText": "class " - }, - { - "generatedLine": 109, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 213, - "originalColumn": 9, - "name": null, - "generatedText": "C10", - "sourceText": "C10" - }, - { - "generatedLine": 110, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 16, - "name": null - }, - { - "generatedLine": 110, - "generatedColumn": 12, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 24, - "name": null, - "generatedText": "readonly", - "sourceText": "readonly" - }, - { - "generatedLine": 110, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 25, - "name": null, - "generatedText": " ", - "sourceText": " " - }, - { - "generatedLine": 110, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 26, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 110, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 28, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 110, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 34, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 110, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 37, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 110, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 43, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 111, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 25, - "name": null - }, - { - "generatedLine": 111, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 26, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 111, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 28, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 111, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 34, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 111, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 37, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 111, - "generatedColumn": 34, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 214, - "originalColumn": 43, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 112, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 223, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 113, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 225, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 113, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 225, - "originalColumn": 6, - "name": null, - "generatedText": "declare class ", - "sourceText": "class " - }, - { - "generatedLine": 113, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 225, - "originalColumn": 9, - "name": null, - "generatedText": "C11", - "sourceText": "C11" - }, - { - "generatedLine": 114, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 16, - "name": null - }, - { - "generatedLine": 114, - "generatedColumn": 12, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 24, - "name": null, - "generatedText": "readonly", - "sourceText": "readonly" - }, - { - "generatedLine": 114, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 25, - "name": null, - "generatedText": " ", - "sourceText": " " - }, - { - "generatedLine": 114, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 26, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 114, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 28, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 114, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 34, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 114, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 37, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 114, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 43, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 115, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 25, - "name": null - }, - { - "generatedLine": 115, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 26, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 115, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 28, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 115, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 34, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 115, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 37, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 115, - "generatedColumn": 34, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 226, - "originalColumn": 43, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 116, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 240, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 117, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 117, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 117, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 12, - "name": null, - "generatedText": "f40", - "sourceText": "f40" - }, - { - "generatedLine": 117, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 117, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 117, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 118, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 20, - "name": null - }, - { - "generatedLine": 118, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 24, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 118, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 26, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 118, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 31, - "name": null, - "generatedText": "'foo'", - "sourceText": "'foo'" - }, - { - "generatedLine": 118, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 32, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 119, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 33, - "name": null - }, - { - "generatedLine": 119, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 36, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 119, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 37, - "name": null, - "generatedText": "?", - "sourceText": "?" - }, - { - "generatedLine": 119, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 39, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 119, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 45, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 119, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 45, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 120, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 47, - "name": null - }, - { - "generatedLine": 120, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 50, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 121, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 52, - "name": null - }, - { - "generatedLine": 121, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 56, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 121, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 58, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 121, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 63, - "name": null, - "generatedText": "'bar'", - "sourceText": "'bar'" - }, - { - "generatedLine": 121, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 64, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 122, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 65, - "name": null - }, - { - "generatedLine": 122, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 68, - "name": null, - "generatedText": "bar", - "sourceText": "bar" - }, - { - "generatedLine": 122, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 69, - "name": null, - "generatedText": "?", - "sourceText": "?" - }, - { - "generatedLine": 122, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 71, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 122, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 77, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 122, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 77, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 123, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 79, - "name": null - }, - { - "generatedLine": 123, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 82, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 123, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 244, - "originalColumn": 86, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 123, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 250, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 124, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 124, - "generatedColumn": 5, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 5, - "name": null, - "generatedText": "type ", - "sourceText": "type " - }, - { - "generatedLine": 124, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 9, - "name": null, - "generatedText": "Data", - "sourceText": "Data" - }, - { - "generatedLine": 124, - "generatedColumn": 12, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 12, - "name": null, - "generatedText": " = ", - "sourceText": " = " - }, - { - "generatedLine": 125, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 14, - "name": null - }, - { - "generatedLine": 125, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 18, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 125, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 20, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 125, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 25, - "name": null, - "generatedText": "'str'", - "sourceText": "'str'" - }, - { - "generatedLine": 125, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 26, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 126, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 27, - "name": null - }, - { - "generatedLine": 126, - "generatedColumn": 11, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 34, - "name": null, - "generatedText": "payload", - "sourceText": "payload" - }, - { - "generatedLine": 126, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 36, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 126, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 42, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 126, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 42, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 127, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 44, - "name": null - }, - { - "generatedLine": 127, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 47, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 128, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 49, - "name": null - }, - { - "generatedLine": 128, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 53, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 128, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 55, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 128, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 60, - "name": null, - "generatedText": "'num'", - "sourceText": "'num'" - }, - { - "generatedLine": 128, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 61, - "name": null, - "generatedText": ";", - "sourceText": "," - }, - { - "generatedLine": 129, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 62, - "name": null - }, - { - "generatedLine": 129, - "generatedColumn": 11, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 69, - "name": null, - "generatedText": "payload", - "sourceText": "payload" - }, - { - "generatedLine": 129, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 71, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 129, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 77, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 129, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 77, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 130, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 79, - "name": null - }, - { - "generatedLine": 130, - "generatedColumn": 2, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 254, - "originalColumn": 80, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 131, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 256, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 131, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 256, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 131, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 256, - "originalColumn": 12, - "name": null, - "generatedText": "gg2", - "sourceText": "gg2" - }, - { - "generatedLine": 131, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 256, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 131, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 256, - "originalColumn": 16, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 131, - "generatedColumn": 26, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 256, - "originalColumn": 18, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 131, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 256, - "originalColumn": 22, - "name": null, - "generatedText": "Data", - "sourceText": "Data" - }, - { - "generatedLine": 131, - "generatedColumn": 33, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 256, - "originalColumn": 25, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 131, - "generatedColumn": 37, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 256, - "originalColumn": 29, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 131, - "generatedColumn": 38, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 263, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 132, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 132, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 9, - "name": null, - "generatedText": "declare function ", - "sourceText": "function " - }, - { - "generatedLine": 132, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 12, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 132, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 13, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 132, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 15, - "name": null, - "generatedText": "{ ", - "sourceText": "{ " - }, - { - "generatedLine": 132, - "generatedColumn": 27, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 19, - "name": null, - "generatedText": "kind", - "sourceText": "kind" - }, - { - "generatedLine": 132, - "generatedColumn": 29, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 21, - "name": null, - "generatedText": ", ", - "sourceText": ", " - }, - { - "generatedLine": 132, - "generatedColumn": 36, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 28, - "name": null, - "generatedText": "payload", - "sourceText": "payload" - }, - { - "generatedLine": 132, - "generatedColumn": 38, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 30, - "name": null, - "generatedText": " }", - "sourceText": " }" - }, - { - "generatedLine": 132, - "generatedColumn": 40, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 32, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 132, - "generatedColumn": 44, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 36, - "name": null, - "generatedText": "Data", - "sourceText": "Data" - }, - { - "generatedLine": 132, - "generatedColumn": 47, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 39, - "name": null, - "generatedText": "): ", - "sourceText": ") {" - }, - { - "generatedLine": 132, - "generatedColumn": 51, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 265, - "originalColumn": 43, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 132, - "generatedColumn": 52, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 272, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 133, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 276, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 133, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 276, - "originalColumn": 0, - "name": null, - "generatedText": "declare ", - "sourceText": "" - }, - { - "generatedLine": 133, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 276, - "originalColumn": 6, - "name": null, - "generatedText": "const ", - "sourceText": "const " - }, - { - "generatedLine": 133, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 276, - "originalColumn": 9, - "name": null, - "generatedText": "obj", - "sourceText": "obj" - }, - { - "generatedLine": 134, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 277, - "originalColumn": 12, - "name": null - }, - { - "generatedLine": 134, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 277, - "originalColumn": 19, - "name": null, - "generatedText": "boolean", - "sourceText": "> true" - }, - { - "generatedLine": 135, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 278, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 135, - "generatedColumn": 2, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 278, - "originalColumn": 2, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 136, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 282, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 136, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 282, - "originalColumn": 0, - "name": null, - "generatedText": "declare ", - "sourceText": "" - }, - { - "generatedLine": 136, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 282, - "originalColumn": 6, - "name": null, - "generatedText": "const ", - "sourceText": "const " - }, - { - "generatedLine": 136, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 282, - "originalColumn": 7, - "name": null, - "generatedText": "a", - "sourceText": "a" - }, - { - "generatedLine": 136, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 282, - "originalColumn": 9, - "name": null, - "generatedText": ": ", - "sourceText": " =" - }, - { - "generatedLine": 136, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 282, - "originalColumn": 27, - "name": null, - "generatedText": "boolean", - "sourceText": " obj.fn();" - }, - { - "generatedLine": 136, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 282, - "originalColumn": 28, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 137, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 285, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 137, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 285, - "originalColumn": 6, - "name": null, - "generatedText": "declare class ", - "sourceText": "class " - }, - { - "generatedLine": 137, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 285, - "originalColumn": 11, - "name": null, - "generatedText": "Utils", - "sourceText": "Utils" - }, - { - "generatedLine": 138, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 2, - "name": null - }, - { - "generatedLine": 138, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 8, - "name": null, - "generatedText": "static", - "sourceText": "static" - }, - { - "generatedLine": 138, - "generatedColumn": 11, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 9, - "name": null, - "generatedText": " ", - "sourceText": " " - }, - { - "generatedLine": 138, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 18, - "name": null, - "generatedText": "isDefined", - "sourceText": "isDefined" - }, - { - "generatedLine": 138, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 19, - "name": null, - "generatedText": "<", - "sourceText": "<" - }, - { - "generatedLine": 138, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 20, - "name": null, - "generatedText": "T", - "sourceText": "T" - }, - { - "generatedLine": 138, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 22, - "name": null, - "generatedText": ">(", - "sourceText": ">(" - }, - { - "generatedLine": 138, - "generatedColumn": 29, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 27, - "name": null, - "generatedText": "value", - "sourceText": "value" - }, - { - "generatedLine": 138, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 29, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 138, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 30, - "name": null, - "generatedText": "T", - "sourceText": "T" - }, - { - "generatedLine": 138, - "generatedColumn": 35, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 33, - "name": null, - "generatedText": "): ", - "sourceText": "): " - }, - { - "generatedLine": 138, - "generatedColumn": 40, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 38, - "name": null, - "generatedText": "value", - "sourceText": "value" - }, - { - "generatedLine": 138, - "generatedColumn": 44, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 42, - "name": null, - "generatedText": " is ", - "sourceText": " is " - }, - { - "generatedLine": 138, - "generatedColumn": 55, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 53, - "name": null, - "generatedText": "NonNullable", - "sourceText": "NonNullable" - }, - { - "generatedLine": 138, - "generatedColumn": 56, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 54, - "name": null, - "generatedText": "<", - "sourceText": "<" - }, - { - "generatedLine": 138, - "generatedColumn": 57, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 55, - "name": null, - "generatedText": "T", - "sourceText": "T" - }, - { - "generatedLine": 138, - "generatedColumn": 58, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 286, - "originalColumn": 56, - "name": null, - "generatedText": ">", - "sourceText": ">" - }, - { - "generatedLine": 139, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 289, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 140, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 291, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 140, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 291, - "originalColumn": 6, - "name": null, - "generatedText": "declare class ", - "sourceText": "class " - }, - { - "generatedLine": 140, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 291, - "originalColumn": 12, - "name": null, - "generatedText": "A53267", - "sourceText": "A53267" - }, - { - "generatedLine": 141, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 292, - "originalColumn": 2, - "name": null - }, - { - "generatedLine": 141, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 292, - "originalColumn": 18, - "name": null, - "generatedText": "readonly ", - "sourceText": "public readonly " - }, - { - "generatedLine": 141, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 292, - "originalColumn": 28, - "name": null, - "generatedText": "testNumber", - "sourceText": "testNumber" - }, - { - "generatedLine": 141, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 292, - "originalColumn": 30, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 141, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 292, - "originalColumn": 36, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 141, - "generatedColumn": 34, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 292, - "originalColumn": 39, - "name": null, - "generatedText": " | ", - "sourceText": " | " - }, - { - "generatedLine": 141, - "generatedColumn": 43, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 292, - "originalColumn": 48, - "name": null, - "generatedText": "undefined", - "sourceText": "undefined" - }, - { - "generatedLine": 141, - "generatedColumn": 44, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 292, - "originalColumn": 49, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 142, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 294, - "originalColumn": 2, - "name": null - }, - { - "generatedLine": 142, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 294, - "originalColumn": 5, - "name": null, - "generatedText": "foo", - "sourceText": "foo" - }, - { - "generatedLine": 142, - "generatedColumn": 11, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 294, - "originalColumn": 9, - "name": null, - "generatedText": "(): ", - "sourceText": "() {" - }, - { - "generatedLine": 142, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 294, - "originalColumn": 13, - "name": null, - "generatedText": "void", - "sourceText": "" - }, - { - "generatedLine": 143, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "controlFlowAliasing.ts", - "originalLine": 301, - "originalColumn": 1, - "name": null - } - ] -} \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileRegressionTests.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileRegressionTests.d.ts.map deleted file mode 100644 index 324e205580cb2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileRegressionTests.d.ts.map +++ /dev/null @@ -1,25 +0,0 @@ -//// [tests/cases/compiler/declFileRegressionTests.ts] //// - - - -/// [Declarations] //// - - - -//// [declFileRegressionTests.d.ts] -declare var n: { - w: any; - x: string; - y: () => void; - z: number; -}; -//# sourceMappingURL=declFileRegressionTests.d.ts.map - -/// [Declarations Maps] //// - - -//// [declFileRegressionTests.d.ts.map] -{"version":3,"file":"declFileRegressionTests.d.ts","sourceRoot":"","sources":["declFileRegressionTests.ts"],"names":[],"mappings":"AAEA,QAAA,IAAI,CAAC;;;aAA4B,IAAI;;CAAgB,CAAC"} - -//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgbjogew0KICAgIHc6IGFueTsNCiAgICB4OiBzdHJpbmc7DQogICAgeTogKCkgPT4gdm9pZDsNCiAgICB6OiBudW1iZXI7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZGVjbEZpbGVSZWdyZXNzaW9uVGVzdHMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbEZpbGVSZWdyZXNzaW9uVGVzdHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xGaWxlUmVncmVzc2lvblRlc3RzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLFFBQUEsSUFBSSxDQUFDOzs7YUFBNEIsSUFBSTs7Q0FBZ0IsQ0FBQyJ9,Ly8gJ251bGwnIG5vdCBjb252ZXJ0ZWQgdG8gJ2FueScgaW4gZC50cwovLyBmdW5jdGlvbiB0eXBlcyBub3QgcGlwZWQgdGhyb3VnaCBjb3JyZWN0bHkKdmFyIG4gPSB7IHc6IG51bGwsIHg6ICcnLCB5OiAoKTogdm9pZCA9PiB7IH0sIHo6IDMyIH07Cgo= - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern.d.ts.map deleted file mode 100644 index 83a7169925443..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern.d.ts.map +++ /dev/null @@ -1,81 +0,0 @@ -//// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts] //// - - - -/// [Declarations] //// - - - -//// [declarationEmitDestructuringObjectLiteralPattern.d.ts] -declare const dest: { - x4: number; - y4: string; -}; -declare const x4: number; -declare const dest_2: { - x5: number; - y5: string; -}; -declare const y5: string; -declare const dest_1: { - x6: number; - y6: string; -}; -declare const x6: number; -declare const y6: string; -declare const dest: { - x7: number; - y7: string; -}; -declare const a1: number; -declare const dest_2: { - x8: number; - y8: string; -}; -declare const b1: string; -declare const dest_1: { - x9: number; - y9: string; -}; -declare const a2: number; -declare const b2: string; -declare const dest: { - a: number; - b: { - a: string; - b: { - a: boolean; - }; - }; -}; -declare const x11: number; -declare const y11: string; -declare const z11: boolean; -declare function f15(): { - a4: string; - b4: number; - c4: boolean; -}; -declare const dest_1: { - a4: string; - b4: number; - c4: boolean; -}; -declare const a4: string; -declare const b4: number; -declare const c4: boolean; -declare namespace m { - const a4: string; - const b4: number; - const c4: boolean; -} -//# sourceMappingURL=declarationEmitDestructuringObjectLiteralPattern.d.ts.map - -/// [Declarations Maps] //// - - -//// [declarationEmitDestructuringObjectLiteralPattern.d.ts.map] -{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,IAAI;;;CAAyB,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAA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ICJoZWxsbyI7CiAgICB2YXIgYjQgPSAxOwogICAgdmFyIGM0ID0gdHJ1ZTsKICAgIHJldHVybiB7IGE0LCBiNCwgYzQgfTsKfQpjb25zdCBkZXN0XzE6IHsKICAgIGE0OiBzdHJpbmc7CiAgICBiNDogbnVtYmVyOwogICAgYzQ6IGJvb2xlYW47Cn0gPSBmMTUoKTsKY29uc3QgYTQ6IHN0cmluZyA9IGRlc3RfMS5hNDsKY29uc3QgYjQ6IG51bWJlciA9IGRlc3RfMS5iNDsKY29uc3QgYzQ6IGJvb2xlYW4gPSBkZXN0XzEuYzQ7Cgptb2R1bGUgbSB7CiAgICBjb25zdCBkZXN0ID0gZjE1KCk7CiAgICBleHBvcnQgY29uc3QgYTQ6IHN0cmluZyA9IGRlc3QuYTQ7CiAgICBleHBvcnQgY29uc3QgYjQ6IG51bWJlciA9IGRlc3QuYjQ7CiAgICBleHBvcnQgY29uc3QgYzQ6IGJvb2xlYW4gPSBkZXN0LmM0Owp9 - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map deleted file mode 100644 index 3aa68d1a4b599..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map +++ /dev/null @@ -1,51 +0,0 @@ -//// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts] //// - - - -/// [Declarations] //// - - - -//// [declarationEmitDestructuringObjectLiteralPattern1.d.ts] -declare const dest_2: { - x4: number; - y4: string; -}; -declare const x4: number; -declare const dest_1: { - x5: number; - y5: string; -}; -declare const y5: string; -declare const dest: { - x6: number; - y6: string; -}; -declare const x6: number; -declare const y6: string; -declare const dest_2: { - x7: number; - y7: string; -}; -declare const a1: number; -declare const dest_1: { - x8: number; - y8: string; -}; -declare const b1: string; -declare const dest: { - x9: number; - y9: string; -}; -declare const a2: number; -declare const b2: string; -//# sourceMappingURL=declarationEmitDestructuringObjectLiteralPattern1.d.ts.map - -/// [Declarations Maps] //// - - -//// [declarationEmitDestructuringObjectLiteralPattern1.d.ts.map] -{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern1.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern1.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,IAAI;;;CAAyB,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,IAAI;;;CAAyB,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC"} - -//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBkZXN0XzI6IHsNCiAgICB4NDogbnVtYmVyOw0KICAgIHk0OiBzdHJpbmc7DQp9Ow0KZGVjbGFyZSBjb25zdCB4NDogbnVtYmVyOw0KZGVjbGFyZSBjb25zdCBkZXN0XzE6IHsNCiAgICB4NTogbnVtYmVyOw0KICAgIHk1OiBzdHJpbmc7DQp9Ow0KZGVjbGFyZSBjb25zdCB5NTogc3RyaW5nOw0KZGVjbGFyZSBjb25zdCBkZXN0OiB7DQogICAgeDY6IG51bWJlcjsNCiAgICB5Njogc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mcgPSBkZXN0Lnk5Ow== - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map deleted file mode 100644 index 9191507581a1b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map +++ /dev/null @@ -1,49 +0,0 @@ -//// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts] //// - - - -/// [Declarations] //// - - - -//// [declarationEmitDestructuringObjectLiteralPattern2.d.ts] -declare const dest: { - a: number; - b: { - a: string; - b: { - a: boolean; - }; - }; -}; -declare const x11: number; -declare const y11: string; -declare const z11: boolean; -declare function f15(): { - a4: string; - b4: number; - c4: boolean; -}; -declare const dest_1: { - a4: string; - b4: number; - c4: boolean; -}; -declare const a4: string; -declare const b4: number; -declare const c4: boolean; -declare namespace m { - const a4: string; - const b4: number; - const c4: boolean; -} -//# sourceMappingURL=declarationEmitDestructuringObjectLiteralPattern2.d.ts.map - -/// [Declarations Maps] //// - - -//// [declarationEmitDestructuringObjectLiteralPattern2.d.ts.map] -{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern2.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern2.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,IAAI;;;;;;;;CAA8C,CAAC;AACzD,QAAA,MAAM,GAAG,EAAE,MAAe,CAAC;AAC3B,QAAA,MAAM,GAAG,EAAE,MAAiB,CAAC;AAC7B,QAAA,MAAM,GAAG,EAAE,OAAoB,CAAC;AAEhC,iBAAS,GAAG,IAAI;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,OAAO,CAAC;CACf,CAKA;AACD,QAAA,MAAM,MAAM,EAAE;IACV,EAAE,EAAE,MAAM,CA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UM7SUFDM0IsTUFBTSxFQUFFLEVBQUUsTUFBZ0IsQ0FBQztJQUMzQixNQUFNLEVBQUUsRUFBRSxPQUFpQixDQUFDO0NBQ3RDIn0=,Y29uc3QgZGVzdCA9IHsgYTogMSwgYjogeyBhOiAiaGVsbG8iLCBiOiB7IGE6IHRydWUgfSB9IH07CmNvbnN0IHgxMTogbnVtYmVyID0gZGVzdC5hOwpjb25zdCB5MTE6IHN0cmluZyA9IGRlc3QuYi5hOwpjb25zdCB6MTE6IGJvb2xlYW4gPSBkZXN0LmIuYi5hOwoKZnVuY3Rpb24gZjE1KCk6IHsKICAgIGE0OiBzdHJpbmc7CiAgICBiNDogbnVtYmVyOwogICAgYzQ6IGJvb2xlYW47Cn0gewogICAgdmFyIGE0ID0gImhlbGxvIjsKICAgIHZhciBiNCA9IDE7CiAgICB2YXIgYzQgPSB0cnVlOwogICAgcmV0dXJuIHsgYTQsIGI0LCBjNCB9Owp9CmNvbnN0IGRlc3RfMTogewogICAgYTQ6IHN0cmluZzsKICAgIGI0OiBudW1iZXI7CiAgICBjNDogYm9vbGVhbjsKfSA9IGYxNSgpOwpjb25zdCBhNDogc3RyaW5nID0gZGVzdF8xLmE0Owpjb25zdCBiNDogbnVtYmVyID0gZGVzdF8xLmI0Owpjb25zdCBjNDogYm9vbGVhbiA9IGRlc3RfMS5jNDsKCm1vZHVsZSBtIHsKICAgIGNvbnN0IGRlc3QgPSBmMTUoKTsKICAgIGV4cG9ydCBjb25zdCBhNDogc3RyaW5nID0gZGVzdC5hNDsKICAgIGV4cG9ydCBjb25zdCBiNDogbnVtYmVyID0gZGVzdC5iNDsKICAgIGV4cG9ydCBjb25zdCBjNDogYm9vbGVhbiA9IGRlc3QuYzQ7Cn0= - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitInferredDefaultExportType2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitInferredDefaultExportType2.d.ts.map deleted file mode 100644 index 82d65da583799..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitInferredDefaultExportType2.d.ts.map +++ /dev/null @@ -1,25 +0,0 @@ -//// [tests/cases/compiler/declarationEmitInferredDefaultExportType2.ts] //// - - - -/// [Declarations] //// - - - -//// [declarationEmitInferredDefaultExportType2.d.ts] -declare const _default: { - foo: readonly []; - bar: any; - baz: any; -}; -export = _default; -//# sourceMappingURL=declarationEmitInferredDefaultExportType2.d.ts.map - -/// [Declarations Maps] //// - - -//// [declarationEmitInferredDefaultExportType2.d.ts.map] -{"version":3,"file":"declarationEmitInferredDefaultExportType2.d.ts","sourceRoot":"","sources":["declarationEmitInferredDefaultExportType2.ts"],"names":[],"mappings":";;;;;AACA,kBAIC"} - -//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBfZGVmYXVsdDogew0KICAgIGZvbzogcmVhZG9ubHkgW107DQogICAgYmFyOiBhbnk7DQogICAgYmF6OiBhbnk7DQp9Ow0KZXhwb3J0ID0gX2RlZmF1bHQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbkVtaXRJbmZlcnJlZERlZmF1bHRFeHBvcnRUeXBlMi5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0SW5mZXJyZWREZWZhdWx0RXhwb3J0VHlwZTIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdEluZmVycmVkRGVmYXVsdEV4cG9ydFR5cGUyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQ0Esa0JBSUMifQ==,Ly8gdGVzdC50cwpleHBvcnQgPSB7CiAgZm9vOiBbXSBhcyBjb25zdCwKICBiYXI6IHVuZGVmaW5lZCwKICBiYXo6IG51bGwKfQ== - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuredDeclarationEmit.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuredDeclarationEmit.d.ts.map deleted file mode 100644 index 3ba4603c1214c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuredDeclarationEmit.d.ts.map +++ /dev/null @@ -1,54 +0,0 @@ -//// [tests/cases/compiler/destructuredDeclarationEmit.ts] //// - - - -/// [Declarations] //// - - - -//// [foo.d.ts] -declare const foo: { - bar: string; - bat: string; - bam: { - bork: { - bar: string; - baz: string; - }; - }; -}; -declare const arr: [0, 1, 2, ['a', 'b', 'c', [{ - def: 'def'; -}, { - sec: 'sec'; -}]]]; -export { foo, arr }; -//# sourceMappingURL=foo.d.ts.map -//// [index.d.ts] -import { foo, arr } from './foo'; -export { foo, arr }; -declare const baz: string; -declare const ibaz: string; -export { baz, ibaz }; -declare const one: 1; -declare const bee: "b"; -declare const sec: "sec"; -export { one, bee, sec }; -declare const foo2: string; -export { foo2 }; -//# sourceMappingURL=index.d.ts.map - -/// [Declarations Maps] //// - - -//// [foo.d.ts.map] -{"version":3,"file":"foo.d.ts","sourceRoot":"","sources":["foo.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,GAAG;;;;;;;;;CAAwE,CAAC;AAClF,QAAA,MAAM,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IAAC,GAAG,EAAE,KAAK,CAAA;CAAC,EAAE;IAAC,GAAG,EAAE,KAAK,CAAA;CAAC,CAAC,CAAC,CAA4D,CAAC;AAC/H,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC"} - -//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBmb286IHsNCiAgICBiYXI6IHN0cmluZzsNCiAgICBiYXQ6IHN0cmluZzsNCiAgICBiYW06IHsNCiAgICAgICAgYm9yazogew0KICAgICAgICAgICAgYmFyOiBzdHJpbmc7DQogICAgICAg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":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEhB,QAAA,MAAM,GAAG,EAAE,MAAgB,CAAC;AAG5B,QAAA,MAAM,IAAI,EAAE,MAAyB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AAEjB,QAAA,MAAM,GAAG,EAAE,CAAU,CAAC;AACtB,QAAA,MAAM,GAAG,EAAE,GAAe,CAAC;AAC3B,QAAA,MAAM,GAAG,EAAE,KAAwB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAOzB,QAAA,MAAM,IAAI,EAAE,MAAiB,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,CAAC"} - -//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgZm9vLCBhcnIgfSBmcm9tICcuL2Zvbyc7DQpleHBvcnQgeyBmb28sIGFyciB9Ow0KZGVjbGFyZSBjb25zdCBiYXo6IHN0cmluZzsNCmRlY2xhcmUgY29uc3QgaWJhejogc3RyaW5nOw0KZXhwb3J0IHsgYmF6LCBpYmF6IH07DQpkZWNsYXJlIGNvbnN0IG9uZTogMTsNCmRlY2xhcmUgY29uc3QgYmVlOiAiYiI7DQpkZWNsYXJlIGNvbnN0IHNlYzogInNlYyI7DQpleHBvcnQgeyBvbmUsIGJlZSwgc2VjIH07DQpkZWNsYXJlIGNvbnN0IGZvbzI6IHN0cmluZzsNCmV4cG9ydCB7IGZvbzIgfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWluZGV4LmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwc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TsKCmNvbnN0IGdldEZvbyA9ICgpID0+ICh7CiAgICBmb286ICdmb28nCn0pOwoKY29uc3QgZGVzdCA9IGdldEZvbygpOwpjb25zdCBmb28yOiBzdHJpbmcgPSBkZXN0LmZvbzsKZXhwb3J0IHsgZm9vMiB9Owo= - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/escapedReservedCompilerNamedIdentifier.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/escapedReservedCompilerNamedIdentifier.d.ts.map deleted file mode 100644 index df2dc470e83b2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/escapedReservedCompilerNamedIdentifier.d.ts.map +++ /dev/null @@ -1,46 +0,0 @@ -//// [tests/cases/compiler/escapedReservedCompilerNamedIdentifier.ts] //// - - - -/// [Declarations] //// - - - -//// [escapedReservedCompilerNamedIdentifier.d.ts] -declare var __proto__: number; -declare var o: { - __proto__: number; -}; -declare var b: number; -declare var o1: { - __proto__: number; -}; -declare var b1: number; -declare var ___proto__: number; -declare var o2: { - ___proto__: number; -}; -declare var b2: number; -declare var o3: { - ___proto__: number; -}; -declare var b3: number; -declare var _proto__: number; -declare var o4: { - _proto__: number; -}; -declare var b4: number; -declare var o5: { - _proto__: number; -}; -declare var b5: number; -//# sourceMappingURL=escapedReservedCompilerNamedIdentifier.d.ts.map - -/// [Declarations Maps] //// - - -//// [escapedReservedCompilerNamedIdentifier.d.ts.map] -{"version":3,"file":"escapedReservedCompilerNamedIdentifier.d.ts","sourceRoot":"","sources":["escapedReservedCompilerNamedIdentifier.ts"],"names":[],"mappings":"AACA,QAAA,IAAI,SAAS,QAAK,CAAC;AACnB,QAAA,IAAI,CAAC;;CAEJ,CAAC;AACF,QAAA,IAAI,CAAC,EAAE,MAAuB,CAAC;AAC/B,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAwB,CAAC;AAEjC,QAAA,IAAI,UAAU,QAAK,CAAC;AACpB,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CnZhciBvMSA9IHsKICAgIF9fcHJvdG9fXzogMAp9Owp2YXIgYjE6IG51bWJlciA9IG8xWyJfX3Byb3RvX18iXTsKLy8gVHJpcGxlIHVuZGVyc2NvcmVzCnZhciBfX19wcm90b19fID0gMTA7CnZhciBvMiA9IHsKICAgICJfX19wcm90b19fIjogMAp9Owp2YXIgYjI6IG51bWJlciA9IG8yWyJfX19wcm90b19fIl07CnZhciBvMyA9IHsKICAgIF9fX3Byb3RvX186IDAKfTsKdmFyIGIzOiBudW1iZXIgPSBvM1siX19fcHJvdG9fXyJdOwovLyBPbmUgdW5kZXJzY29yZQp2YXIgX3Byb3RvX18gPSAxMDsKdmFyIG80ID0gewogICAgIl9wcm90b19fIjogMAp9Owp2YXIgYjQ6IG51bWJlciA9IG80WyJfcHJvdG9fXyJdOwp2YXIgbzUgPSB7CiAgICBfcHJvdG9fXzogMAp9Owp2YXIgYjU6IG51bWJlciA9IG81WyJfcHJvdG9fXyJdOw== - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/stringLiteralObjectLiteralDeclaration1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/stringLiteralObjectLiteralDeclaration1.d.ts.map deleted file mode 100644 index 1c44dc328529d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/stringLiteralObjectLiteralDeclaration1.d.ts.map +++ /dev/null @@ -1,24 +0,0 @@ -//// [tests/cases/compiler/stringLiteralObjectLiteralDeclaration1.ts] //// - - - -/// [Declarations] //// - - - -//// [stringLiteralObjectLiteralDeclaration1.d.ts] -declare namespace m1 { - var n: { - 'foo bar': number; - }; -} -//# sourceMappingURL=stringLiteralObjectLiteralDeclaration1.d.ts.map - -/// [Declarations Maps] //// - - -//// [stringLiteralObjectLiteralDeclaration1.d.ts.map] -{"version":3,"file":"stringLiteralObjectLiteralDeclaration1.d.ts","sourceRoot":"","sources":["stringLiteralObjectLiteralDeclaration1.ts"],"names":[],"mappings":"AAAA,kBAAO,EAAE,CAAC;IACD,IAAI,CAAC;;KAAmB,CAAC;CACjC"} - -//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBuYW1lc3BhY2UgbTEgew0KICAgIHZhciBuOiB7DQogICAgICAgICdmb28gYmFyJzogbnVtYmVyOw0KICAgIH07DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1zdHJpbmdMaXRlcmFsT2JqZWN0TGl0ZXJhbERlY2xhcmF0aW9uMS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaW5nTGl0ZXJhbE9iamVjdExpdGVyYWxEZWNsYXJhdGlvbjEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInN0cmluZ0xpdGVyYWxPYmplY3RMaXRlcmFsRGVjbGFyYXRpb24xLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGtCQUFPLEVBQUUsQ0FBQztJQUNELElBQUksQ0FBQzs7S0FBbUIsQ0FBQztDQUNqQyJ9,bW9kdWxlIG0xIHsKICBleHBvcnQgdmFyIG4gPSB7ICdmb28gYmFyJzogNCB9Owp9Cg== - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralTypes2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralTypes2.d.ts.map deleted file mode 100644 index eb9c96f44049d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/templateLiteralTypes2.d.ts.map +++ /dev/null @@ -1,51 +0,0 @@ -//// [tests/cases/conformance/types/literal/templateLiteralTypes2.ts] //// - - - -/// [Declarations] //// - - - -//// [templateLiteralTypes2.d.ts] -declare function ft1(s: string, n: number, u: 'foo' | 'bar' | 'baz', t: T): void; -declare function ft2(s: string): string; -declare function ft10(s: string): void; -declare function ft11(s: string, cond: boolean): void; -declare function ft12(s: string): void; -declare function widening(x: T): T; -declare function nonWidening(x: T): T; -declare function ft13(s: string, cond: boolean): void; -type T0 = string | `${number}px`; -declare function ft14(t: `foo${number}`): void; -declare function g1(x: T): T; -declare function g2(x: T): T; -declare function ft20(s: string): void; -declare function takesLiteral(literal: T): T extends `foo.bar.${infer R}` ? R : unknown; -declare const t1: "baz"; -declare const id2 = "foo.bar.baz"; -declare const t2: "baz"; -declare const someString: string; -declare const t3: string; -declare const id4: string; -declare const t4: unknown; -declare const someUnion: 'abc' | 'def' | 'ghi'; -declare const t5: "abc" | "def" | "ghi"; -declare const pixelValue: number; -type PixelValueType = `${number}px`; -declare const pixelString: PixelValueType; -declare const pixelStringWithTemplate: PixelValueType; -declare function getCardTitle(title: string): `test-${string}`; -declare const interpolatedStyle: { - rotate: number; -}; -declare function C2(transform: "-moz-initial" | (string & {})): number; -//# sourceMappingURL=templateLiteralTypes2.d.ts.map - -/// [Declarations Maps] //// - - -//// [templateLiteralTypes2.d.ts.map] -{"version":3,"file":"templateLiteralTypes2.d.ts","sourceRoot":"","sources":["templateLiteralTypes2.ts"],"names":[],"mappings":"AAAA,iBAAS,GAAG,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,CASzF;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE9B;AAED,iBAAS,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAS7B;AAED,iBAAS,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAW5C;AAED,iBAAS,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAW7B;AAED,OAAO,UAAU,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AACtC,OAAO,UAAU,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,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Y29uc3QgaWQ0ID0gYGZvby5iYXIuJHtzb21lU3RyaW5nfWA7CmNvbnN0IHQ0OiB1bmtub3duID0gdGFrZXNMaXRlcmFsKGlkNCk7ICAvLyB1bmtub3duCgpkZWNsYXJlIGNvbnN0IHNvbWVVbmlvbjogJ2FiYycgfCAnZGVmJyB8ICdnaGknOwpjb25zdCB0NTogImFiYyIgfCAiZGVmIiB8ICJnaGkiID0gdGFrZXNMaXRlcmFsKGBmb28uYmFyLiR7c29tZVVuaW9ufWApOyAgLy8gImFiYyIgfCAiZGVmIiB8ICJnaGkiCgovLyBSZXBybyBmcm9tICM0MTczMgoKY29uc3QgcGl4ZWxWYWx1ZTogbnVtYmVyID0gMjI7Cgp0eXBlIFBpeGVsVmFsdWVUeXBlID0gYCR7bnVtYmVyfXB4YDsKCmNvbnN0IHBpeGVsU3RyaW5nOiBQaXhlbFZhbHVlVHlwZSA9IGAyMnB4YDsKCmNvbnN0IHBpeGVsU3RyaW5nV2l0aFRlbXBsYXRlOiBQaXhlbFZhbHVlVHlwZSA9IGAke3BpeGVsVmFsdWV9cHhgOwoKLy8gUmVwcm8gZnJvbSAjNDMxNDMKCmZ1bmN0aW9uIGdldENhcmRUaXRsZSh0aXRsZTogc3RyaW5nKTogYHRlc3QtJHtzdHJpbmd9YCB7CiAgICByZXR1cm4gYHRlc3QtJHt0aXRsZX1gOwp9CgovLyBSZXBybyBmcm9tICM0MzQyNAoKY29uc3QgaW50ZXJwb2xhdGVkU3R5bGUgPSB7IHJvdGF0ZTogMTIgfTsKZnVuY3Rpb24gQzIodHJhbnNmb3JtOiAiLW1vei1pbml0aWFsIiB8IChzdHJpbmcgJiB7fSkpOiBudW1iZXIgeyByZXR1cm4gMTI7IH0KQzIoYHJvdGF0ZSgke2ludGVycG9sYXRlZFN0eWxlLnJvdGF0ZX1kaWcpYCk7Cg== - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/uniqueSymbolsDeclarationsErrors.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/uniqueSymbolsDeclarationsErrors.d.ts.map deleted file mode 100644 index d7ef6a2631ab5..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/uniqueSymbolsDeclarationsErrors.d.ts.map +++ /dev/null @@ -1,65 +0,0 @@ -//// [tests/cases/conformance/types/uniqueSymbol/uniqueSymbolsDeclarationsErrors.ts] //// - - - -/// [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 - -/// [Declarations Maps] //// - - -//// [uniqueSymbolsDeclarationsErrors.d.ts.map] -{"version":3,"file":"uniqueSymbolsDeclarationsErrors.d.ts","sourceRoot":"","sources":["uniqueSymbolsDeclarationsErrors.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,MAAM,CAAC;AAC/B,UAAU,CAAC;IAAG,QAAQ,CAAC,YAAY,EAAE,OAAO,MAAM,CAAC;CAAE;AAIrD,eAAO,MAAM,GAAG;eACD,QAAQ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FjZVdpdGhQcml2YXRlTmFtZWRQcm9wZXJ0aWVzIHsKICAgIFtzXTogYW55Owp9CgpleHBvcnQgaW50ZXJmYWNlIEludGVyZmFjZVdpdGhQcml2YXRlTmFtZWRNZXRob2RzIHsKICAgIFtzXSgpOiBhbnk7Cn0KCmV4cG9ydCB0eXBlIFR5cGVMaXRlcmFsV2l0aFByaXZhdGVOYW1lZFByb3BlcnRpZXMgPSB7CiAgICBbc106IGFueTsKfQoKZXhwb3J0IHR5cGUgVHlwZUxpdGVyYWxXaXRoUHJpdmF0ZU5hbWVkTWV0aG9kcyA9IHsKICAgIFtzXSgpOiBhbnk7Cn0KCmV4cG9ydCBjbGFzcyBDbGFzc1dpdGhQcml2YXRlTmFtZWRQcm9wZXJ0aWVzIHsKICAgIFtzXTogYW55OwogICAgc3RhdGljIFtzXTogYW55Owp9CgpleHBvcnQgY2xhc3MgQ2xhc3NXaXRoUHJpdmF0ZU5hbWVkTWV0aG9kcyB7CiAgICBbc10oKTogdm9pZCB7fQogICAgc3RhdGljIFtzXSgpOiB2b2lkIHt9Cn0KCmV4cG9ydCBjbGFzcyBDbGFzc1dpdGhQcml2YXRlTmFtZWRBY2Nlc3NvcnMgewogICAgZ2V0IFtzXSgpOiBhbnkgeyByZXR1cm4gdW5kZWZpbmVkOyB9CiAgICBzZXQgW3NdKHY6IGFueSkgeyB9CiAgICBzdGF0aWMgZ2V0IFtzXSgpOiBhbnkgeyByZXR1cm4gdW5kZWZpbmVkOyB9CiAgICBzdGF0aWMgc2V0IFtzXSh2OiBhbnkpIHsgfQp9 - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/vardecl.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/vardecl.d.ts.map deleted file mode 100644 index 7c3b1ee09da8d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/vardecl.d.ts.map +++ /dev/null @@ -1,96 +0,0 @@ -//// [tests/cases/compiler/vardecl.ts] //// - - - -/// [Declarations] //// - - - -//// [vardecl.d.ts] -declare var simpleVar: any; -declare var anotherVar: any; -declare var varWithSimpleType: number; -declare var varWithArrayType: number[]; -declare var varWithInitialValue: number; -declare var withComplicatedValue: { - x: number; - y: number; - desc: string; -}; -declare var declaredVar: any; -declare var declareVar2: any; -declare var declaredVar3: any; -declare var deckareVarWithType: number; -declare var arrayVar: string[]; -declare var complicatedArrayVar: { - x: number; - y: string; -}[]; -declare var n1: { - [s: string]: number; -}; -declare var c: { - new?(): any; -}; -declare var d: { - foo?(): { - x: number; - }; -}; -declare var d3: { - foo(): { - x: number; - y: number; - }; -}; -declare var d2: { - foo(): { - x: number; - }; -}; -declare var n2: { - (): void; -}; -declare var n4: { - (): void; -}[]; -declare var d4: { - foo(n: string, x: { - x: number; - y: number; - }): { - x: number; - y: number; - }; -}; -declare namespace m2 { - var a: any, b2: number, b: any; - class C2 { - b: any; - constructor(b: any); - } - var mE: any; - var d1E: any, d2E: any; - var b2E: any; - var v1E: any; -} -declare var a22: any, b22: number, c22: number; -declare var nn: any; -declare var da1: any, da2: any; -declare var normalVar: any; -declare var dv1: any; -declare var xl: any; -declare var x: any; -declare var z: any; -declare function foo(a2: any): void; -declare var b: number; -//# sourceMappingURL=vardecl.d.ts.map - -/// [Declarations Maps] //// - - -//// [vardecl.d.ts.map] -{"version":3,"file":"vardecl.d.ts","sourceRoot":"","sources":["vardecl.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,SAAS,EAAE,GAAG,CAAC;AAEnB,QAAA,IAAI,UAAU,EAAE,GAAG,CAAC;AACpB,QAAA,IAAI,iBAAiB,EAAE,MAAM,CAAC;AAC9B,QAAA,IAAI,gBAAgB,EAAE,MAAM,EAAE,CAAC;AAE/B,QAAA,IAAI,mBAAmB,QAAK,CAAC;AAE7B,QAAA,IAAI,oBAAoB;;;;CAAqC,CAAC;AAE9D,OAAO,CAAC,IAAI,WAAW,EAAE,GAAG,CAAC;AAC7B,OAAO,CAAC,IAAI,WAAW,EAAE,G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FueTsKZGVjbGFyZSB2YXIgZHYxOiBhbnk7CnZhciB4bDogYW55Owp2YXIgeDogYW55Owp2YXIgejogYW55OwoKZnVuY3Rpb24gZm9vKGEyOiBhbnkpOiB2b2lkIHsKICAgIHZhciBhID0gMTA7Cn0KCmZvciAodmFyIGkgPSAwLCBqID0gMDsgaSA8IDEwOyBpKyspIHsKICAgIGorKzsKfQoKCmZvciAodmFyIGsgPSAwOyBrIDwgMzA7IGsrKykgewogICAgaysrOwp9CnZhciBiID0gMTA7Cg== - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/withExportDecl.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/withExportDecl.d.ts.map deleted file mode 100644 index 61ffe5a7e4992..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/withExportDecl.d.ts.map +++ /dev/null @@ -1,44 +0,0 @@ -//// [tests/cases/compiler/withExportDecl.ts] //// - - - -/// [Declarations] //// - - - -//// [withExportDecl.d.ts] -export declare var exportedSimpleVar: any; -export declare var exportedVarWithInitialValue: number; -export declare var exportedWithComplicatedValue: { - x: number; - y: number; - desc: string; -}; -export declare var exportedDeclaredVar: number; -export declare var exportedArrayVar: { - x: number; - y: string; -}[]; -export declare function exportedFunction(): { - x: string; - y: string; - n: number; -}; -export declare namespace m2 { - var a: number; -} -export declare namespace m3 { - function foo(): string; -} -export declare var eVar1: any, eVar2: number; -export declare var eVar3: number, eVar4: any, eVar5: any; -//# sourceMappingURL=withExportDecl.d.ts.map - -/// [Declarations Maps] //// - - -//// [withExportDecl.d.ts.map] -{"version":3,"file":"withExportDecl.d.ts","sourceRoot":"","sources":["withExportDecl.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,iBAAiB,EAAE,GAAG,CAAC;AAOlC,eAAO,IAAI,2BAA2B,QAAK,CAAC;AAG5C,eAAO,IAAI,4BAA4B;;;;CAAqC,CAAC;AAO7E,MAAM,CAAC,OAAO,CAAC,IAAI,mBAAmB,EAA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VZhcjogeyB4OiBudW1iZXI7IHk6IHN0cmluZzsgfVtdIDsKZXhwb3J0ZWRBcnJheVZhci5wdXNoKHsgeDogMzAsIHkgOiAnaGVsbG8gd29ybGQnIH0pOwoKZnVuY3Rpb24gc2ltcGxlRnVuY3Rpb24oKSB7CiAgICByZXR1cm4gewogICAgICAgIHg6ICJIZWxsbyIsCiAgICAgICAgeTogIndvcmQiLAogICAgICAgIG46IDIKICAgIH07Cn0KCmV4cG9ydCBmdW5jdGlvbiBleHBvcnRlZEZ1bmN0aW9uKCk6IHsKICAgIHg6IHN0cmluZzsKICAgIHk6IHN0cmluZzsKICAgIG46IG51bWJlcjsKfSB7CiAgICByZXR1cm4gc2ltcGxlRnVuY3Rpb24oKTsKfQoKbW9kdWxlIG0xIHsKICAgIGV4cG9ydCBmdW5jdGlvbiBmb28oKSB7CiAgICAgICAgcmV0dXJuICJIZWxsbyI7CiAgICB9Cn0KZXhwb3J0IGRlY2xhcmUgbW9kdWxlIG0yIHsKCiAgICBleHBvcnQgdmFyIGE6IG51bWJlcjsKfQoKCmV4cG9ydCBtb2R1bGUgbTMgewoKICAgIGV4cG9ydCBmdW5jdGlvbiBmb28oKTogc3RyaW5nIHsKICAgICAgICByZXR1cm4gbTEuZm9vKCk7CiAgICB9Cn0KCmV4cG9ydCB2YXIgZVZhcjE6IGFueSwgZVZhcjIgPSAxMDsKdmFyIGVWYXIyMjsKZXhwb3J0IHZhciBlVmFyMyA9IDEwLCBlVmFyNDogYW55LCBlVmFyNTogYW55Ow== - From 1d882e1c8106ba8fffe08c51d924b1137d40268f Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 24 Nov 2023 16:28:41 +0000 Subject: [PATCH 149/224] Fix new methods in types. Minor refactoring. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/moduleSpecifiers.ts | 2 +- .../transformers/declarations/emitBinder.ts | 99 ++++- .../transformers/declarations/emitResolver.ts | 4 +- .../declarations/localInferenceResolver.ts | 139 ++---- .../transformers/declarations/utils.ts | 83 ---- .../diff/constAssertions.d.ts.map.diff | 4 +- .../declFileEmitDeclarationOnly.d.ts.map.diff | 4 +- ...ationEmitGlobalThisPreserved.d.ts.map.diff | 4 +- ...nEmitObjectLiteralAccessors1.d.ts.map.diff | 4 +- ...efersPathKindBasedOnBundling.d.ts.map.diff | 2 +- ...fersPathKindBasedOnBundling2.d.ts.map.diff | 4 +- ...larationEmitThisPredicates02.d.ts.map.diff | 4 +- ...sPredicatesWithPrivateName02.d.ts.map.diff | 4 +- .../diff/emitMethodCalledNew.d.ts.diff | 25 -- .../diff/emitMethodCalledNew.d.ts.map.diff | 16 + ...somorphicMappedTypeInference.d.ts.map.diff | 6 +- .../auto-fixed/dte/constAssertions.d.ts.map | 4 +- .../dte/declFileEmitDeclarationOnly.d.ts.map | 4 +- ...eclarationEmitGlobalThisPreserved.d.ts.map | 4 +- ...rationEmitObjectLiteralAccessors1.d.ts.map | 4 +- ...mitPrefersPathKindBasedOnBundling.d.ts.map | 2 +- ...tPrefersPathKindBasedOnBundling.d.ts.map.f | 405 ++++++++++++++++++ ...itPrefersPathKindBasedOnBundling2.d.ts.map | 4 +- .../declarationEmitThisPredicates02.d.ts.map | 4 +- ...itThisPredicatesWithPrivateName02.d.ts.map | 4 +- .../auto-fixed/dte/emitMethodCalledNew.d.ts | 31 -- .../dte/emitMethodCalledNew.d.ts.map | 28 ++ .../isomorphicMappedTypeInference.d.ts.map | 4 +- ...tPrefersPathKindBasedOnBundling.d.ts.map.f | 385 +++++++++++++++++ .../auto-fixed/tsc/emitMethodCalledNew.d.ts | 31 -- .../tsc/emitMethodCalledNew.d.ts.map | 28 ++ .../mapped/isomorphicMappedTypeInference.ts | 2 +- 32 files changed, 1030 insertions(+), 318 deletions(-) delete mode 100644 src/compiler/transformers/declarations/utils.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/emitMethodCalledNew.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/emitMethodCalledNew.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.f delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitMethodCalledNew.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitMethodCalledNew.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.f delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emitMethodCalledNew.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emitMethodCalledNew.d.ts.map diff --git a/src/compiler/moduleSpecifiers.ts b/src/compiler/moduleSpecifiers.ts index a59fc09a674ef..c074b752db462 100644 --- a/src/compiler/moduleSpecifiers.ts +++ b/src/compiler/moduleSpecifiers.ts @@ -984,7 +984,7 @@ function tryGetModuleNameAsNodeModule({ path, isRedirect }: ModulePath, { getCan let maybeBlockedByTypesVersions = false; const cachedPackageJson = host.getPackageJsonInfoCache?.()?.getPackageJsonInfo(packageJsonPath); if (typeof cachedPackageJson === "object" || cachedPackageJson === undefined && host.fileExists(packageJsonPath)) { - const packageJsonContent = cachedPackageJson?.contents.packageJsonContent || JSON.parse(host.readFile!(packageJsonPath)!); + const packageJsonContent = cachedPackageJson?.contents.packageJsonContent || JSON.parse(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/transformers/declarations/emitBinder.ts b/src/compiler/transformers/declarations/emitBinder.ts index 624ef5b9fab92..0c3074a60f8a2 100644 --- a/src/compiler/transformers/declarations/emitBinder.ts +++ b/src/compiler/transformers/declarations/emitBinder.ts @@ -4,6 +4,7 @@ import { getNodeId, isBlock, isClassDeclaration, + isComputedPropertyName, isConditionalTypeNode, isConstructorDeclaration, isConstructSignatureDeclaration, @@ -20,6 +21,10 @@ import { isModuleBlock, isModuleDeclaration, isNamedExports, + isNumericLiteral, + isPrefixUnaryExpression, + isPrivateIdentifier, + isPropertyAccessExpression, isSourceFile, isTypeAliasDeclaration, isVariableDeclaration, @@ -36,6 +41,7 @@ import { BindingPattern, ClassDeclaration, ClassElement, + ComputedPropertyName, Declaration, EnumDeclaration, EnumMember, @@ -45,7 +51,10 @@ import { ModuleDeclaration, Node, NodeArray, + NoSubstitutionTemplateLiteral, + ObjectLiteralElement, ParameterDeclaration, + PropertyName, SourceFile, SymbolFlags, SyntaxKind, @@ -60,13 +69,11 @@ import { import { findAncestor, isBindingPattern, + isStringLiteralLike, } from "../../utilitiesPublic"; import { MemberKey, } from "./types"; -import { - getMemberKey, -} from "./utils"; /** @internal */ export interface EmitDeclarationNodeLinks { @@ -152,7 +159,8 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { getNodeLinks, resolveName, resolveMemberKey, - getMemberNameFromElement, + getMemberKeyFromElement, + getMemberKey, }; function resolveName(enclosingDeclaration: Node, escapedText: __String, meaning: SymbolFlags) { @@ -456,7 +464,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { addLocalAndExportDeclaration(getMemberKey(statement.name), statement, getSymbolFlagsForNode(statement), isExported); withScope(statement, /*exports*/ undefined, () => { statement.members.forEach(m => { - addLocalOnlyDeclaration(getMemberNameFromElement(m), m, getSymbolFlagsForNode(m)); + addLocalOnlyDeclaration(getMemberKeyFromElement(m), m, getSymbolFlagsForNode(m)); }); }); } @@ -491,7 +499,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { }); withMembers(interfaceSymbol, () => { interfaceDeclaration.members.forEach(m => { - addLocalOnlyDeclaration(getMemberNameFromElement(m), m, getElementFlagsOrThrow(m)); + addLocalOnlyDeclaration(getMemberKeyFromElement(m), m, getElementFlagsOrThrow(m)); bindTypeExpressions(m); }); }); @@ -508,7 +516,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { if (hasSyntacticModifier(m, ModifierFlags.Static)) return; if (m.kind === SyntaxKind.SemicolonClassElement || m.kind === SyntaxKind.ClassStaticBlockDeclaration) return; - addLocalOnlyDeclaration(getMemberNameFromElement(m), m, getElementFlagsOrThrow(m)); + addLocalOnlyDeclaration(getMemberKeyFromElement(m), m, getElementFlagsOrThrow(m)); bindTypeExpressions(m); }); }); @@ -520,7 +528,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { || m.kind === SyntaxKind.ClassStaticBlockDeclaration ) return; - addLocalOnlyDeclaration(getMemberNameFromElement(m), m, getElementFlagsOrThrow(m)); + addLocalOnlyDeclaration(getMemberKeyFromElement(m), m, getElementFlagsOrThrow(m)); bindTypeExpressions(m); }); }, "exports"); @@ -534,7 +542,80 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { * Gets the symbolic name for a member from its type. * @internal */ -export function getMemberNameFromElement(element: TypeElement | ClassElement | EnumMember): MemberKey | undefined { +export function getMemberKey(name: string | Exclude | NoSubstitutionTemplateLiteral): MemberKey; +/** + * Gets the symbolic name for a member from its type. + * @internal + */ +export function getMemberKey(name: string | PropertyName | NoSubstitutionTemplateLiteral | undefined): MemberKey | undefined; +export function getMemberKey(name: string | PropertyName | NoSubstitutionTemplateLiteral | undefined): string | undefined { + if (name === undefined) { + return undefined; + } + if (typeof name === "string") { + return ("I:" + name); + } + if (isPrivateIdentifier(name)) { + return ("P:" + name.escapedText); + } + if (isIdentifier(name)) { + return ("I:" + name.escapedText); + } + if (isStringLiteralLike(name)) { + return ("I:" + name.text); + } + if (isNumericLiteral(name)) { + return ("I:" + (+name.text)); + } + if (isComputedPropertyName(name)) { + let computedName = name.expression; + + if (isStringLiteralLike(computedName)) { + return ("I:" + computedName.text); + } + if (isNumericLiteral(computedName)) { + return ("I:" + (+computedName.text)); + } + if ( + isPrefixUnaryExpression(computedName) + && isNumericLiteral(computedName.operand) + ) { + if (computedName.operator === SyntaxKind.MinusToken) { + return ("I:" + (-computedName.operand.text)); + } + else if (computedName.operator === SyntaxKind.PlusToken) { + return ("I:" + (-computedName.operand.text)); + } + else { + return undefined; + } + } + let fullId = "C:"; + // We only support dotted identifiers as property keys + while (true) { + if (isIdentifier(computedName)) { + fullId += computedName.escapedText; + break; + } + else if (isPropertyAccessExpression(computedName)) { + fullId += computedName.name.escapedText; + computedName = computedName.expression; + } + else { + // Can't compute a property key, bail + return undefined; + } + } + return fullId; + } + return undefined; +} + +/** + * Gets the symbolic name for a member from its type. + * @internal + */ +export function getMemberKeyFromElement(element: ObjectLiteralElement | TypeElement | ClassElement | EnumMember): MemberKey | undefined { if (isConstructorDeclaration(element) || isConstructSignatureDeclaration(element)) { return "@constructor" as MemberKey; } diff --git a/src/compiler/transformers/declarations/emitResolver.ts b/src/compiler/transformers/declarations/emitResolver.ts index 015b391dfc0c0..8f04781f08ba3 100644 --- a/src/compiler/transformers/declarations/emitResolver.ts +++ b/src/compiler/transformers/declarations/emitResolver.ts @@ -90,14 +90,12 @@ import { bindSourceFileForDeclarationEmit, EmitDeclarationNodeLinks, EmitDeclarationSymbol, + getMemberKey, } from "./emitBinder"; import { IsolatedEmitResolver, MemberKey, } from "./types"; -import { - getMemberKey, -} from "./utils"; const knownFunctionMembers = new Set([ "I:apply", diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index e215d65c05975..7839c95fcb62b 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -1,5 +1,6 @@ import { getCommentRange, + getMemberKeyFromElement, setCommentRange, } from "../../_namespaces/ts"; import { @@ -20,7 +21,6 @@ import { isParameter, isPrefixUnaryExpression, isPrivateIdentifier, - isPropertyAccessExpression, isPropertyAssignment, isPropertyDeclaration, isSetAccessorDeclaration, @@ -37,9 +37,6 @@ import { import { setTextRange, } from "../../factory/utilitiesPublic"; -import { - isIdentifierText, -} from "../../scanner"; import { nullTransformationContext, } from "../../transformer"; @@ -51,16 +48,13 @@ import { DiagnosticMessage, EntityNameOrEntityNameExpression, ExportAssignment, - Expression, FunctionExpression, GetAccessorDeclaration, HasInferredType, Identifier, KeywordTypeSyntaxKind, - LanguageVariant, LiteralExpression, MethodDeclaration, - MethodSignature, ModifierFlags, Node, NodeArray, @@ -69,9 +63,7 @@ import { ParameterDeclaration, ParenthesizedExpression, PrefixUnaryExpression, - PropertyAssignment, PropertyName, - PropertySignature, SetAccessorDeclaration, SourceFile, SyntaxKind, @@ -84,14 +76,19 @@ import { } from "../../types"; import { createDiagnosticForNode, + createPropertyNameNodeForIdentifierOrLiteral, + getEmitScriptTarget, hasSyntacticModifier, isEntityNameExpression, isOptionalDeclaration, + isStringDoubleQuoted, } from "../../utilities"; import { isConstTypeReference, isPropertyName, + isStringLiteralLike, isTypeNode, + unescapeLeadingUnderscores, } from "../../utilitiesPublic"; import { visitEachChild, @@ -187,13 +184,13 @@ export function createLocalInferenceResolver({ } function getAccessorInfo(parent: ClassExpression | ObjectLiteralExpression, knownAccessor: SetAccessorDeclaration | GetAccessorDeclaration) { - const nameKey = getMemberKey(knownAccessor); + const nameKey = getMemberKeyFromElement(knownAccessor); const members = isClassExpression(parent) ? parent.members : parent.properties; let getAccessor, setAccessor; let otherAccessorIdx = -1, knownAccessorIdx = -1; for (let i = 0; i < members.length; ++i) { const member = members[i]; - if (isGetAccessorDeclaration(member) && getMemberKey(member) === nameKey) { + if (isGetAccessorDeclaration(member) && getMemberKeyFromElement(member) === nameKey) { getAccessor = member; if (knownAccessor !== member) { otherAccessorIdx = i; @@ -202,7 +199,7 @@ export function createLocalInferenceResolver({ knownAccessorIdx = i; } } - else if (isSetAccessorDeclaration(member) && getMemberKey(member) === nameKey) { + else if (isSetAccessorDeclaration(member) && getMemberKeyFromElement(member) === nameKey) { setAccessor = member; if (knownAccessor !== member) { otherAccessorIdx = i; @@ -412,9 +409,9 @@ export function createLocalInferenceResolver({ } } - const nameKey = getMemberKey(prop); + const nameKey = getMemberKeyFromElement(prop); const existingMember = nameKey ? members.get(nameKey) : undefined; - const name = simplifyComputedPropertyName(prop.name, existingMember?.name) ?? + const name = simplifyComputedPropertyName(prop.name, existingMember?.name, isMethodDeclaration(prop)) ?? deepClone(visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!); let newProp; @@ -588,28 +585,26 @@ export function createLocalInferenceResolver({ return regular(deepClone(visitedType), owner); } - function simplifyComputedPropertyName(name: PropertyName, existingName?: PropertyName) { - let numericValue; - function basicStringNumberLiterals(name: PropertyName | Expression) { - if (isStringLiteral(name)) { - if (isIdentifierText(name.text, options.target, LanguageVariant.Standard)) { - return factory.createIdentifier(name.text); - } - return existingName && isNumericLiteral(existingName) ? existingName : name; - } - else if (isNumericLiteral(name)) { - numericValue = +name.text; - } + function simplifyComputedPropertyName(name: PropertyName, _existingName: PropertyName | undefined, isMethod: boolean) { + let nameText; + let stringNamed = false; + let singleQuote = false; + if (isIdentifier(name)) { + nameText = unescapeLeadingUnderscores(name.escapedText); } - const result = basicStringNumberLiterals(name); - if (result) { - return result; + if (isNumericLiteral(name)) { + nameText = name.text; + } + else if (isStringLiteralLike(name)) { + stringNamed = true; + singleQuote = !isStringDoubleQuoted(name, currentSourceFile); + nameText = name.text; } else if (isComputedPropertyName(name)) { const expression = name.expression; - const result = basicStringNumberLiterals(expression); - if (result) { - return result; + if (isStringLiteralLike(expression) || isNumericLiteral(expression)) { + stringNamed = isStringLiteralLike(expression); + nameText = expression.text; } else if ( isPrefixUnaryExpression(expression) @@ -619,75 +614,21 @@ export function createLocalInferenceResolver({ return name; } else if (expression.operator === SyntaxKind.PlusToken) { - numericValue = +expression.operand.text; + nameText = expression.operand.text; } } } - if (numericValue === undefined) { + if (nameText === undefined) { return undefined; } - if (numericValue >= 0) { - return factory.createNumericLiteral(numericValue); - } - else { - return factory.createStringLiteral(numericValue.toString()); - } - } - function getMemberKey(member: PropertyAssignment | MethodDeclaration | MethodSignature | PropertySignature | GetAccessorDeclaration | SetAccessorDeclaration) { - const name = member.name; - if (isIdentifier(name)) { - return "I:" + name.escapedText; - } - if (isStringLiteral(name)) { - return "I:" + name.text; - } - if (isNumericLiteral(name)) { - return "I:" + (+name.text); - } - if (isComputedPropertyName(name)) { - let fullId = "C:"; - let computedName = name.expression; - - if (isStringLiteral(computedName)) { - return ("I:" + computedName.text); - } - if (isNumericLiteral(computedName)) { - return ("I:" + (+computedName.text)); - } - if ( - isPrefixUnaryExpression(computedName) - && isNumericLiteral(computedName.operand) - ) { - if (computedName.operator === SyntaxKind.MinusToken) { - return ("I:" + (-computedName.operand.text)); - } - else if (computedName.operator === SyntaxKind.PlusToken) { - return ("I:" + (+computedName.operand.text)); - } - else { - return undefined; - } - } - - // We only support dotted identifiers as property keys - while (true) { - if (isIdentifier(computedName)) { - fullId += computedName.escapedText; - break; - } - else if (isPropertyAccessExpression(computedName)) { - fullId += computedName.name.escapedText; - computedName = computedName.expression; - } - else { - // Can't compute a property key, bail - return undefined; - } - } - return fullId; - } - return undefined; + return createPropertyNameNodeForIdentifierOrLiteral( + nameText, + getEmitScriptTarget(options), + singleQuote, + stringNamed, + isMethod, + ); } // Copied similar function in checker. Maybe a reusable one should be created. @@ -755,15 +696,15 @@ export function createLocalInferenceResolver({ * function x(o = "", v: string) */ if (node.initializer && !isOptional) { - localType.typeNode = addUndefinedInUnion(localType.typeNode); - } + localType.typeNode = addUndefinedInUnion(localType.typeNode); + } /** * 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.typeNode = addUndefinedInUnion(localType.typeNode); - } + } } } else if (type) { @@ -791,7 +732,7 @@ export function createLocalInferenceResolver({ localType = localInference(node.initializer); if (isOptionalDeclaration(node)) { localType.typeNode = addUndefinedInUnion(localType.typeNode); - } + } } else if (isInterfaceDeclaration(node.parent) || isTypeLiteralNode(node.parent)) { return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); diff --git a/src/compiler/transformers/declarations/utils.ts b/src/compiler/transformers/declarations/utils.ts deleted file mode 100644 index 90aacbfc67730..0000000000000 --- a/src/compiler/transformers/declarations/utils.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { - isComputedPropertyName, - isIdentifier, - isNumericLiteral, - isPrefixUnaryExpression, - isPrivateIdentifier, - isPropertyAccessExpression, - isStringLiteralLike, -} from "../../_namespaces/ts"; -import { - ComputedPropertyName, - NoSubstitutionTemplateLiteral, - PropertyName, - SyntaxKind, -} from "../../types"; -import { - MemberKey, -} from "./types"; - -export function getMemberKey(name: string | Exclude | NoSubstitutionTemplateLiteral): MemberKey; -export function getMemberKey(name: string | PropertyName | NoSubstitutionTemplateLiteral | undefined): MemberKey | undefined; -export function getMemberKey(name: string | PropertyName | NoSubstitutionTemplateLiteral | undefined): string | undefined { - if (name === undefined) { - return undefined; - } - if (typeof name === "string") { - return ("I:" + name); - } - if (isPrivateIdentifier(name)) { - return ("P:" + name.escapedText); - } - if (isIdentifier(name)) { - return ("I:" + name.escapedText); - } - if (isStringLiteralLike(name)) { - return ("I:" + name.text); - } - if (isNumericLiteral(name)) { - return ("I:" + (+name.text)); - } - if (isComputedPropertyName(name)) { - let computedName = name.expression; - - if (isStringLiteralLike(computedName)) { - return ("I:" + computedName.text); - } - if (isNumericLiteral(computedName)) { - return ("I:" + (+computedName.text)); - } - if ( - isPrefixUnaryExpression(computedName) - && isNumericLiteral(computedName.operand) - ) { - if (computedName.operator === SyntaxKind.MinusToken) { - return ("I:" + (-computedName.operand.text)); - } - else if (computedName.operator === SyntaxKind.PlusToken) { - return ("I:" + (-computedName.operand.text)); - } - else { - return undefined; - } - } - let fullId = "C:"; - // We only support dotted identifiers as property keys - while (true) { - if (isIdentifier(computedName)) { - fullId += computedName.escapedText; - break; - } - else if (isPropertyAccessExpression(computedName)) { - fullId += computedName.name.escapedText; - computedName = computedName.expression; - } - else { - // Can't compute a property key, bail - return undefined; - } - } - return fullId; - } - return undefined; -} 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 index 671f314e75f0b..6978fb1c05d89 100644 --- 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 @@ -9,8 +9,8 @@ //// [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;AACtB,QAAA,IAAI,EAAE,MAAgB,CAAC;AACvB,QAAA,IAAI,EAAE,MAAgB,CAAC;AACvB,QAAA,IAAI,EAAE,OAAiB,CAAC;AAExB,QAAA,IAAI,GAAG,EAAE,KAAU,CAAC;AACpB,QAAA,IAAI,GAAG,EAAE,KAAU,CAAC;AAEpB,QAAA,IAAI,EAAE,aAAc,CAAC;AACrB,QAAA,IAAI,EAAE,oBAAqB,CAAC;AAC5B,QAAA,IAAI,EAAE,8BAA+B,CAA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AgY29uc3QgYWN0aW9uID0gdmVyaWZ5ID8gYHZlcmlmeWAgOiBgd3JpdGVgOwogICAgY29uc3QgY29udGVudE1hdGNoID0gY29udGVudE1hdGNoZXMgPyBgbWF0Y2hgIDogYG5vbk1hdGNoYDsKICAgIGNvbnN0IG91dGNvbWUgPSBgJHthY3Rpb259XyR7Y29udGVudE1hdGNofWAgYXMgY29uc3Q7CiAgICByZXR1cm4gb3V0Y29tZTsKfQoKZnVuY3Rpb24gYWNjZXNzb3JOYW1lczxTIGV4dGVuZHMgc3RyaW5nPihwcm9wTmFtZTogUyk6IHJlYWRvbmx5IFtgZ2V0LSR7U31gLCBgc2V0LSR7U31gXSB7CiAgICByZXR1cm4gW2BnZXQtJHtwcm9wTmFtZX1gLCBgc2V0LSR7cHJvcE5hbWV9YF0gYXMgY29uc3Q7Cn0KCmNvbnN0IG5zMTogcmVhZG9ubHkgWyJnZXQtZm9vIiwgInNldC1mb28iXSA9IGFjY2Vzc29yTmFtZXMoJ2ZvbycpOwoKLy8gcmVwcm8gZnJvbSBodHRwczovL2dpdGh1Yi5jb20vbWljcm9zb2Z0L1R5cGVTY3JpcHQvaXNzdWVzLzU0Mzc0CmludGVyZmFjZSBGb281NDM3NCB7CiAgYTogMTsKICBiOiAyOwp9Cgpjb25zdCBmb29Db25zdDU0Mzc0OiBGb281NDM3NCA9IHsKICBhOiAxLAogIGI6IDMKfSBhcyBjb25zdAo= 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 index 237704fd2ec16..616ed315d85e5 100644 --- 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 @@ -9,8 +9,8 @@ //// [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;IACP,IAAI,CAAC,GAAG,EAAE,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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVsbG93b3JsZC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiaGVsbG93b3JsZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxRQUFBLE1BQU0sR0FBRztjQUNHLE1BQU0s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9Cn0KCmNsYXNzIEhlbGxvV29ybGQgewogIGNvbnN0cnVjdG9yKHByaXZhdGUgbmFtZTogc3RyaW5nKSB7CiAgfQoKICBwdWJsaWMgaGVsbG8oKTogdm9pZCB7CiAgICBMb2cuaW5mbyhgSGVsbG8gJHt0aGlzLm5hbWV9YCk7CiAgfQp9Cg== ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBMb2c6IHsNCiAgICBpbmZvKG1zZzogc3RyaW5nKTogdm9pZDsNCn07DQpkZWNsYXJlIGNsYXNzIEhlbGxvV29ybGQgew0KICAgIHByaXZhdGUgbmFtZTsNCiAgICBjb25zdHJ1Y3RvcihuYW1lOiBzdHJpbmcpOw0KICAgIGhlbGxvKCk6IHZvaWQ7DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1oZWxsb3dvcmxkLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVsbG93b3JsZC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiaGVsbG93b3JsZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxRQUFBLE1BQU0sR0FBRztTQUNGLEdBQUcsRUFBRSxNQUFNLEdBQUcsSUFBSTtDQUN4QixDQUFBO0FBRUQsY0FBTSxVQUFVO0lBQ0YsT0FBTyxDQUFDLElBQUk7Z0JBQUosSUFBSSxFQUFFLE1BQU07SUFHekIsS0FBSyxJQUFJLElBQUk7Q0FHckIifQ==,Y29uc3QgTG9nID0gewogIGluZm8obXNnOiBzdHJpbmcpOiB2b2lkIHt9Cn0KCmNsYXNzIEhlbGxvV29ybGQgewogIGNvbnN0cnVjdG9yKHByaXZhdGUgbmFtZTogc3RyaW5nKSB7CiAgfQoKICBwdWJsaWMgaGVsbG8oKTogdm9pZCB7CiAgICBMb2cuaW5mbyhgSGVsbG8gJHt0aGlzLm5hbWV9YCk7CiAgfQp9Cg== 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 index e3eac673163e4..4436ffc2c675a 100644 --- 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 @@ -9,8 +9,8 @@ //// [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,CAA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pcy5pc05hTjsKfQoKZXhwb3J0IGNsYXNzIEFzQ2xhc3NQcm9wZXJ0eSB7CiAgICBpc05hTj86IHR5cGVvZiBnbG9iYWxUaGlzLmlzTmFOOwp9CgpleHBvcnQgdHlwZSBBc0Z1bmN0aW9uVHlwZSA9IChpc05hTjogdHlwZW9mIGdsb2JhbFRoaXMuaXNOYU4pID0+IHR5cGVvZiBnbG9iYWxUaGlzLmlzTmFOOwoK diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.map.diff index d30075398bbdf..97e5f9720001c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.map.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.map.diff @@ -9,8 +9,8 @@ //// [declarationEmitObjectLiteralAccessors1.d.ts.map] -{"version":3,"file":"declarationEmitObjectLiteralAccessors1.d.ts","sourceRoot":"","sources":["declarationEmitObjectLiteralAccessors1.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,EAAE;IACf,gDAAgD;IAChD,CAAC,EAAE,MAAM,CAAC;CAQb,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE;IACf,wBAAwB;IACxB,IAAI,CAAC,IAAI,MAAM,CAAC;IAChB,wBAAwB;IACxB,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE;CAQpB,CAAC;AAEF,eAAO,MAAM,IAAI;IACf,wBAAwB;;CAIzB,CAAC;AAEF,eAAO,MAAM,IAAI;IACf,wBAAwB;;CAEzB,CAAC"} -+{"version":3,"file":"declarationEmitObjectLiteralAccessors1.d.ts","sourceRoot":"","sources":["declarationEmitObjectLiteralAccessors1.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,EAAE;IACf,gDAAgD;IAChD,CAAC,EAAE,MAAM,CAAC;CAQb,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE;IACf,wBAAwB;IACxB,IAAI,CAAC,IAAI,MAAM,CAAC;IAChB,wBAAwB;IACxB,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE;CAQpB,CAAC;AAEF,eAAO,MAAM,IAAI;IACf,wBAAwB;aACpB,CAAC,EAAI,MAAM;CAGhB,CAAC;AAEF,eAAO,MAAM,IAAI;IACf,wBAAwB;IACpB,CAAC,EAAI,MAAM;CAChB,CAAC"} ++{"version":3,"file":"declarationEmitObjectLiteralAccessors1.d.ts","sourceRoot":"","sources":["declarationEmitObjectLiteralAccessors1.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,EAAE;IACf,gDAAgD;IAChD,CAAC,EAAE,MAAM,CAAC;CAQb,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE;IACf,wBAAwB;IACxB,IAAI,CAAC,IAAI,MAAM,CAAC;IAChB,wBAAwB;IACxB,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE;CAQpB,CAAC;AAEF,eAAO,MAAM,IAAI;IACf,wBAAwB;gBACf,MAAM;CAGhB,CAAC;AAEF,eAAO,MAAM,IAAI;IACf,wBAAwB;OACf,MAAM;CAChB,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3Qgb2JqMTogew0KICAgIC8qKiBteSBhd2Vzb21lIGdldHRlciAoZmlyc3QgaW4gc291cmNlIG9yZGVyKSAqLw0KICAgIHg6IHN0cmluZzsNCn07DQpleHBvcnQgZGVjbGFyZSBjb25zdCBvYmoyOiB7DQogICAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovDQogICAgZ2V0IHgoKTogc3RyaW5nOw0KICAgIC8qKiBteSBhd2Vzb21lIHNldHRlciAqLw0KICAgIHNldCB4KGE6IG51bWJlcik7DQp9Ow0KZXhwb3J0IGRlY2xhcmUgY29uc3Qgb2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yoqIG15IGF3ZXNvbWUgZ2V0dGVyIChmaXJzdCBpbiBzb3VyY2Ugb3JkZXIpICovCiAgZ2V0IHgoKTogc3RyaW5nIHsKICAgIHJldHVybiAiIjsKICB9LAogIC8qKiBteSBhd2Vzb21lIHNldHRlciAoc2Vjb25kIGluIHNvdXJjZSBvcmRlcikgKi8KICBzZXQgeChhOiBzdHJpbmcpIHt9LAp9OwoKLy8gZGl2ZXJnZW50IGFjY2Vzc29ycwpleHBvcnQgY29uc3Qgb2JqMjogewogICAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovCiAgICBnZXQgeCgpOiBzdHJpbmc7CiAgICAvKiogbXkgYXdlc29tZSBzZXR0ZXIgKi8KICAgIHNldCB4KGE6IG51bWJlcik7Cn0gPSB7CiAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovCiAgZ2V0IHgoKTogc3RyaW5nIHsKICAgIHJldHVybiAiIjsKICB9LAogIC8qKiBteSBhd2Vzb21lIHNldHRlciAqLwogIHNldCB4KGE6IG51bWJlcikge30sCn07CgpleHBvcnQgY29uc3Qgb2JqMyA9IHsKICAvKiogbXkgYXdlc29tZSBnZXR0ZXIgKi8KICBnZXQgeCgpOiBzdHJpbmcgewogICAgcmV0dXJuICIiOwogIH0sCn07CgpleHBvcnQgY29uc3Qgb2JqNCA9IHsKICAvKiogbXkgYXdlc29tZSBzZXR0ZXIgKi8KICBzZXQgeChhOiBudW1iZXIpIHt9LAp9Owo= -+//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3Qgb2JqMTogew0KICAgIC8qKiBteSBhd2Vzb21lIGdldHRlciAoZmlyc3QgaW4gc291cmNlIG9yZGVyKSAqLw0KICAgIHg6IHN0cmluZzsNCn07DQpleHBvcnQgZGVjbGFyZSBjb25zdCBvYmoyOiB7DQogICAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovDQogICAgZ2V0IHgoKTogc3RyaW5nOw0KICAgIC8qKiBteSBh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XBlIGFjY2Vzc29ycwpleHBvcnQgY29uc3Qgb2JqMTogewogICAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyIChmaXJzdCBpbiBzb3VyY2Ugb3JkZXIpICovCiAgICB4OiBzdHJpbmc7Cn0gPSB7CiAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyIChmaXJzdCBpbiBzb3VyY2Ugb3JkZXIpICovCiAgZ2V0IHgoKTogc3RyaW5nIHsKICAgIHJldHVybiAiIjsKICB9LAogIC8qKiBteSBhd2Vzb21lIHNldHRlciAoc2Vjb25kIGluIHNvdXJjZSBvcmRlcikgKi8KICBzZXQgeChhOiBzdHJpbmcpIHt9LAp9OwoKLy8gZGl2ZXJnZW50IGFjY2Vzc29ycwpleHBvcnQgY29uc3Qgb2JqMjogewogICAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovCiAgICBnZXQgeCgpOiBzdHJpbmc7CiAgICAvKiogbXkgYXdlc29tZSBzZXR0ZXIgKi8KICAgIHNldCB4KGE6IG51bWJlcik7Cn0gPSB7CiAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovCiAgZ2V0IHgoKTogc3RyaW5nIHsKICAgIHJldHVybiAiIjsKICB9LAogIC8qKiBteSBhd2Vzb21lIHNldHRlciAqLwogIHNldCB4KGE6IG51bWJlcikge30sCn07CgpleHBvcnQgY29uc3Qgb2JqMyA9IHsKICAvKiogbXkgYXdlc29tZSBnZXR0ZXIgKi8KICBnZXQgeCgpOiBzdHJpbmcgewogICAgcmV0dXJuICIiOwogIH0sCn07CgpleHBvcnQgY29uc3Qgb2JqNCA9IHsKICAvKiogbXkgYXdlc29tZSBzZXR0ZXIgKi8KICBzZXQgeChhOiBudW1iZXIpIHt9LAp9Owo= ++//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3Qgb2JqMTogew0KICAgIC8qKiBteSBhd2Vzb21lIGdldHRlciAoZmlyc3QgaW4gc291cmNlIG9yZGVyKSAqLw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-declarations/auto-fixed/diff/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.diff index 0d09f59d5088c..b9aea9f0b885e 100644 --- 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 @@ -11,5 +11,5 @@ //// [/.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"} ++{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../src/settings/spacing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,yBAAyB,CAAC;;iBAG9C,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 index af1b880cce162..1d8355dc9f135 100644 --- 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 @@ -11,8 +11,8 @@ //// [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"} ++{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["spacing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,yBAAyB,CAAC;;iBAG9C,MAAM;;AADjB,wBAIE"} -//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgU2NhbGFyIH0gZnJvbSAnLi4vbGliL29wZXJhdG9ycy9zY2FsYXInOw0KZGVjbGFyZSBjb25zdCBfZGVmYXVsdDogew0KICAgIHJlYWRvbmx5IHhzOiBTY2FsYXI7DQp9Ow0KZXhwb3J0IGRlZmF1bHQgX2RlZmF1bHQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1zcGFjaW5nLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BhY2luZy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3BhY2luZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFVLE1BQU0seUJBQXlCLENBQUM7Ozs7QUFFekQsd0JBSUUifQ==,aW1wb3J0IHsgU2NhbGFyLCBzY2FsYXIgfSBmcm9tICcuLi9saWIvb3BlcmF0b3JzL3NjYWxhcic7CgpleHBvcnQgZGVmYXVsdCB7CglnZXQgeHMoKTogU2NhbGFyIHsKCQlyZXR1cm4gc2NhbGFyKCIxNHB4Iik7Cgl9Cn07Cg== -+//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgU2NhbGFyIH0gZnJvbSAnLi4vbGliL29wZXJhd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J0IHsgU2NhbGFyLCBzY2FsYXIgfSBmcm9tICcuLi9saWIvb3BlcmF0b3JzL3NjYWxhcic7CgpleHBvcnQgZGVmYXVsdCB7CglnZXQgeHMoKTogU2NhbGFyIHsKCQlyZXR1cm4gc2NhbGFyKCIxNHB4Iik7Cgl9Cn07Cg== 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 index 81d0ee6a4aa0a..36b84f6391b4c 100644 --- 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 @@ -9,8 +9,8 @@ //// [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;IACZ,CAAC,IAAI,IAAI,IAAI,GAAG;CAInB,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==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXMwMi5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXMwMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLFdBQVcsR0FBRztJQUNoQixDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQ1YsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUNWLENBQUMsRUFBRSxPQUFPLENBQUM7Q0FDZDtBQUVELGVBQU8sTUFBTSxHQUFHOztDQUtmLENBQUEifQ==,ZXhwb3J0IGludGVyZmFjZSBGb28gewogICAgYTogc3RyaW5nOwogICAgYjogbnVtYmVyOwogICAgYzogYm9vbGVhbjsKfQoKZXhwb3J0IGNvbnN0IG9iaiA9IHsKICAgIG0oKTogdGhpcyBpcyBGb28gewogICAgICAgIGxldCBkaXMgPSB0aGlzIGFzIHt9IGFzIEZvbzsKICAgICAgICByZXR1cm4gZGlzLmEgIT0gbnVsbCAmJiBkaXMuYiAhPSBudWxsICYmIGRpcy5jICE9IG51bGw7CiAgICB9Cn0= -+//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGludGVyZ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mV4cG9ydCBkZWNsYXJlIGNvbnN0IG9iajogew0KICAgIG0oKTogdGhpcyBpcyBGb287DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXMwMi5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXMwMi5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXMwMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLFdBQVcsR0FBRztJQUNoQixDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQ1YsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUNWLENBQUMsRUFBRSxPQUFPLENBQUM7Q0FDZDtBQUVELGVBQU8sTUFBTSxHQUFHO1NBQ1AsSUFBSSxJQUFJLEdBQUc7Q0FJbkIsQ0FBQSJ9,ZXhwb3J0IGludGVyZmFjZSBGb28gewogICAgYTogc3RyaW5nOwogICAgYjogbnVtYmVyOwogICAgYzogYm9vbGVhbjsKfQoKZXhwb3J0IGNvbnN0IG9iaiA9IHsKICAgIG0oKTogdGhpcyBpcyBGb28gewogICAgICAgIGxldCBkaXMgPSB0aGlzIGFzIHt9IGFzIEZvbzsKICAgICAgICByZXR1cm4gZGlzLmEgIT0gbnVsbCAmJiBkaXMuYiAhPSBudWxsICYmIGRpcy5jICE9IG51bGw7CiAgICB9Cn0= 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 index 319b76c3d43de..0e683cb37b1c5 100644 --- 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 @@ -9,8 +9,8 @@ //// [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;IACZ,CAAC,IAAI,IAAI,IAAI,GAAG;CAInB,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,aW50ZXJmYWNlIEZvbyB7DQogICAgYTogc3RyaW5nOw0KICAgIGI6IG51bWJlcjsNCiAgICBjOiBib29sZWFuOw0KfQ0KZXhwb3J0IGRlY2xhcmUgY29uc3Qgb2JqOiB7DQogICAgbSgpOiB0aGlzIGlzIEZvbzsNCn07DQpleHBvcnQge307DQovLyMgc291cmNlTWFwcGluZ1VSTD1k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aWxlIjoiZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXNXaXRoUHJpdmF0ZU5hbWUwMi5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXNXaXRoUHJpdmF0ZU5hbWUwMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxVQUFVLEdBQUc7SUFDVCxDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQ1YsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUNWLENBQUMsRUFBRSxPQUFPLENBQUM7Q0FDZDtBQUVELGVBQU8sTUFBTSxHQUFHO1NBQ1AsSUFBSSxJQUFJLEdBQUc7Q0FJbkIsQ0FBQSJ9,aW50ZXJmYWNlIEZvbyB7CiAgICBhOiBzdHJpbmc7CiAgICBiOiBudW1iZXI7CiAgICBjOiBib29sZWFuOwp9CgpleHBvcnQgY29uc3Qgb2JqID0gewogICAgbSgpOiB0aGlzIGlzIEZvbyB7CiAgICAgICAgbGV0IGRpcyA9IHRoaXMgYXMge30gYXMgRm9vOwogICAgICAgIHJldHVybiBkaXMuYSAhPSBudWxsICYmIGRpcy5iICE9IG51bGwgJiYgZGlzLmMgIT0gbnVsbDsKICAgIH0KfQ== diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emitMethodCalledNew.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emitMethodCalledNew.d.ts.diff deleted file mode 100644 index 08a4918e262f7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emitMethodCalledNew.d.ts.diff +++ /dev/null @@ -1,25 +0,0 @@ -// [[Reason: TODO: new is not correctly emitted.]] //// - -//// [tests/cases/compiler/emitMethodCalledNew.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,13 +1,13 @@ - - - //// [emitMethodCalledNew.d.ts] - export declare const a: { -- "new"(x: number): number; -+ new(x: number): number; - }; - export declare const b: { -- "new"(x: number): number; -+ new(x: number): number; - }; - export declare const c: { -- "new"(x: number): number; -+ new(x: number): number; - }; - //# sourceMappingURL=emitMethodCalledNew.d.ts.map -\ No newline at end of file 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..2b8c8c462a92e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/emitMethodCalledNew.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: TODO: new is not correctly emitted.]] //// + +//// [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,MAAM;CACvB,CAAA;AACD,eAAO,MAAM,CAAC;UACN,CAAC,EAAE,MAAM,GAAG,MAAM;CACzB,CAAA;AACD,eAAO,MAAM,CAAC;UACJ,CAAC,EAAE,MAAM,GAAG,MAAM;CAC3B,CAAA"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgYTogew0KICAgICJuZXciKHg6IG51bWJlcik6IG51bWJlcjsNCn07DQpleHBvcnQgZGVjbG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ICAgIm5ldyIoeDogbnVtYmVyKTogbnVtYmVyOw0KfTsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IGM6IHsNCiAgICAibmV3Iih4OiBudW1iZXIpOiBudW1iZXI7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZW1pdE1ldGhvZENhbGxlZE5ldy5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1pdE1ldGhvZENhbGxlZE5ldy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZW1pdE1ldGhvZENhbGxlZE5ldy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxlQUFPLE1BQU0sQ0FBQztVQUNSLENBQUMsRUFBRSxNQUFNLEdBQUcsTUFBTTtDQUN2QixDQUFBO0FBQ0QsZUFBTyxNQUFNLENBQUM7VUFDTixDQUFDLEVBQUUsTUFBTSxHQUFHLE1BQU07Q0FDekIsQ0FBQTtBQUNELGVBQU8sTUFBTSxDQUFDO1VBQ0osQ0FBQyxFQUFFLE1BQU0sR0FBRyxNQUFNO0NBQzNCLENBQUEifQ==,Ly8gaHR0cHM6Ly9naXRodWIuY29tL21pY3Jvc29mdC9UeXBlU2NyaXB0L2lzc3Vlcy81NTA3NQoKZXhwb3J0IGNvbnN0IGEgPSB7CiAgbmV3KHg6IG51bWJlcik6IG51bWJlciB7IHJldHVybiB4ICsgMSB9Cn0KZXhwb3J0IGNvbnN0IGIgPSB7CiAgIm5ldyIoeDogbnVtYmVyKTogbnVtYmVyIHsgcmV0dXJuIHggKyAxIH0KfQpleHBvcnQgY29uc3QgYyA9IHsKICBbIm5ldyJdKHg6IG51bWJlcik6IG51bWJlciB7IHJldHVybiB4ICsgMSB9Cn0K + 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 index 90a995c62b700..cba579f5a1c28 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Sourcemap is more detailed. (needs more validation)]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/conformance/types/mapped/isomorphicMappedTypeInference.ts] //// @@ -9,8 +9,8 @@ //// [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,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0gewogICAgICAgIGE6IDQyLAogICAgICAgIGI6ICJoZWxsbyIsCiAgICAgICAgYzogdHJ1ZQogICAgfTsKICAgIGxldCBiID0gYm94aWZ5KHYpOwogICAgbGV0IHg6IG51bWJlciA9IGIuYS52YWx1ZTsKfQoKZnVuY3Rpb24gZjIoKTogdm9pZCB7CiAgICBsZXQgYiA9IHsKICAgICAgICBhOiBib3goNDIpLAogICAgICAgIGI6IGJveCgiaGVsbG8iKSwKICAgICAgICBjOiBib3godHJ1ZSkKICAgIH07CiAgICBsZXQgdiA9IHVuYm94aWZ5KGIpOwogICAgbGV0IHg6IG51bWJlciA9IHYuYTsKfQoKZnVuY3Rpb24gZjMoKTogdm9pZCB7CiAgICBsZXQgYiA9IHsKICAgICAgICBhOiBib3goNDIpLAogICAgICAgIGI6IGJveCgiaGVsbG8iKSwKICAgICAgICBjOiBib3godHJ1ZSkKICAgIH07CiAgICBhc3NpZ25Cb3hpZmllZChiLCB7IGM6IGZhbHNlIH0pOwp9CgpmdW5jdGlvbiBmNCgpOiB2b2lkIHsKICAgIGxldCBiID0gewogICAgICAgIGE6IGJveCg0MiksCiAgICAgICAgYjogYm94KCJoZWxsbyIpLAogICAgICAgIGM6IGJveCh0cnVlKQogICAgfTsKICAgIGIgPSBib3hpZnkodW5ib3hpZnkoYikpOwogICAgYiA9IHVuYm94aWZ5KGJveGlmeShiKSk7Cn0KCmZ1bmN0aW9uIG1ha2VSZWNvcmQ8VCwgSyBleHRlbmRzIHN0cmluZz4ob2JqOiB7IFtQIGluIEtdOiBUIH0pOiB7CiAgICBbUCBpbiBLXTogVDsKfSB7CiAgICByZXR1cm4gb2JqOwp9CgpmdW5jdGlvbiBmNShzOiBzdHJpbmcpOiB2b2lkIHsKICAgIGxldCBiID0gbWFrZVJlY29yZCh7CiAgICAgICAgYTogYm94KDQyKSwKICAgICAgICBiOiBib3goImhlbGxvIiksCiAgICAgICAgYzogYm94KHRydWUpCiAgICB9KTsKICAgIGxldCB2ID0gdW5ib3h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Jhcjogc3RyaW5nOwp9ID0gZjIwKHsgZm9vOiA0MiwgYmFyOiAiaGVsbG8iIH0pOwpsZXQgeDE6ICJmb28iIHwgImJhciIgPSBmMjEoeyBmb286IDQyLCBiYXI6ICJoZWxsbyIgfSk7CmxldCB4MjogewogICAgZm9vOiBudW1iZXI7CiAgICBiYXI6IHN0cmluZzsKfSA9IGYyMih7IGZvbzogeyB2YWx1ZTogNDJ9ICwgYmFyOiB7IHZhbHVlOiAiaGVsbG8iIH0gfSk7CmxldCB4MzogewogICAgZm9vOiBudW1iZXI7CiAgICBiYXI6IHN0cmluZzsKfSA9IGYyMyh7IGZvbzogNDIsIGJhcjogImhlbGxvIiB9KTsKbGV0IHg0OiB7CiAgICBmb286IG51bWJlcjsKICAgIGJhcjogc3RyaW5nOwp9ICYgewogICAgZm9vOiBudW1iZXI7CiAgICBiYXI6IHN0cmluZzsKfSA9IGYyNCh7IGZvbzogNDIsIGJhcjogImhlbGxvIiB9KTsKCi8vIFJlcHJvIGZyb20gIzI5NzY1CgpmdW5jdGlvbiBnZXRQcm9wczxULCBLIGV4dGVuZHMga2V5b2YgVD4ob2JqOiBULCBsaXN0OiBLW10pOiBQaWNrPFQsIEs+IHsKICAgIHJldHVybiB7fSBhcyBhbnk7Cn0KCmNvbnN0IG15QW55OiBhbnkgPSB7fTsKCmNvbnN0IG8xOiBQaWNrPGFueSwgImZvbyIgfCAiYmFyIj4gPSBnZXRQcm9wcyhteUFueSwgWydmb28nLCAnYmFyJ10pOwoKY29uc3QgbzI6IHsgZm9vOiBhbnk7IGJhcjogYW55IH0gPSBnZXRQcm9wcyhteUFueSwgWydmb28nLCAnYmFyJ10pOwo= 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 index db1238a013e61..54ed29b4e1816 100644 --- 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 @@ -133,7 +133,7 @@ declare const fooConst54374: Foo54374; //// [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,CAAC;AACtB,QAAA,IAAI,EAAE,EAAI,EAAW,CAAC;AACtB,QAAA,IAAI,EAAE,EAAG,GAAY,CAAC;AACtB,QAAA,IAAI,EAAE,EAAG,CAAC,GAAY,CAAC;AACvB,QAAA,IAAI,EAAE,EAAG,IAAa,CAAC;AACvB,QAAA,IAAI,EAAE,EAAG,KAAc,CAAC;AAExB,QAAA,IAAI,EAAE,OAAiB,CAAC;AACxB,QAAA,IAAI,EAAE,OAAiB,CAAC;AACxB,QAAA,IAAI,EAAE,IAAc,CAAC;AACrB,QAAA,IAAI,EAAE,EAAG,CAAC,EAAW,CAAC;AACtB,QAAA,IAAI,EAAE,EAAI,EAAW,CAAC;AACtB,QAAA,IAAI,EAAE,EAAG,GAAY,CAAC;AACtB,QAAA,IAAI,EAAE,EAAG,CAAC,GAAY,CAAC;AACvB,QAAA,IAAI,EAAE,EAAG,IAAa,CAAC;AACvB,QAAA,IAAI,EAAE,EAAG,KAAc,CAAC;AAExB,QAAA,IAAI,GAAG,EAAE,KAAU,CAAC;AACpB,QAAA,IAAI,GAAG,EAAE,KAAU,CAAC;AAEpB,QAAA,IAAI,EAAE,aAAc,CAAC;AACrB,QAAA,IAAI,EAAE,oBAAqB,CAAC;AAC5B,QAAA,IAAI,EAAE,yBAAiB,IAAI,CAAU,CAAC;AACtC,QAAA,IAAI,EAAE,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAA2B,CAAC;AACrD,QAAA,IAAI,E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bnN0IG5zMTogcmVhZG9ubHkgWyJnZXQtZm9vIiwgInNldC1mb28iXSA9IGFjY2Vzc29yTmFtZXMoJ2ZvbycpOwoKLy8gcmVwcm8gZnJvbSBodHRwczovL2dpdGh1Yi5jb20vbWljcm9zb2Z0L1R5cGVTY3JpcHQvaXNzdWVzLzU0Mzc0CmludGVyZmFjZSBGb281NDM3NCB7CiAgYTogMTsKICBiOiAyOwp9Cgpjb25zdCBmb29Db25zdDU0Mzc0OiBGb281NDM3NCA9IHsKICBhOiAxLAogIGI6IDMKfSBhcyBjb25zdAo= 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 index c70263b24374f..21301634aa308 100644 --- 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 @@ -21,7 +21,7 @@ declare class HelloWorld { //// [helloworld.d.ts.map] -{"version":3,"file":"helloworld.d.ts","sourceRoot":"","sources":["helloworld.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,GAAG;IACP,IAAI,CAAC,GAAG,EAAE,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,ZGVjbGFyZSBjb25zdCBMb2c6IHsNCi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GluZ1VSTD1oZWxsb3dvcmxkLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVsbG93b3JsZC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiaGVsbG93b3JsZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxRQUFBLE1BQU0sR0FBRztTQUNGLEdBQUcsRUFBRSxNQUFNLEdBQUcsSUFBSTtDQUN4QixDQUFBO0FBRUQsY0FBTSxVQUFVO0lBQ0YsT0FBTyxDQUFDLElBQUk7Z0JBQUosSUFBSSxFQUFFLE1BQU07SUFHekIsS0FBSyxJQUFJLElBQUk7Q0FHckIifQ==,Y29uc3QgTG9nID0gewogIGluZm8obXNnOiBzdHJpbmcpOiB2b2lkIHt9Cn0KCmNsYXNzIEhlbGxvV29ybGQgewogIGNvbnN0cnVjdG9yKHByaXZhdGUgbmFtZTogc3RyaW5nKSB7CiAgfQoKICBwdWJsaWMgaGVsbG8oKTogdm9pZCB7CiAgICBMb2cuaW5mbyhgSGVsbG8gJHt0aGlzLm5hbWV9YCk7CiAgfQp9Cg== 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 index 1eb59ea765fc6..b727810db7acb 100644 --- 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 @@ -72,7 +72,7 @@ export type AsFunctionType = (isNaN: typeof globalThis.isNaN) => typeof globalTh //// [declarationEmitGlobalThisPreserved.d.ts.map] -{"version":3,"file":"declarationEmitGlobalThisPreserved.d.ts","sourceRoot":"","sources":["declarationEmitGlobalThisPreserved.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,EAAE,GAAI,KAAK,EAAE,OAAO,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b3J0IGNsYXNzIEFzQ2xhc3NQcm9wZXJ0eSB7CiAgICBpc05hTj86IHR5cGVvZiBnbG9iYWxUaGlzLmlzTmFOOwp9CgpleHBvcnQgdHlwZSBBc0Z1bmN0aW9uVHlwZSA9IChpc05hTjogdHlwZW9mIGdsb2JhbFRoaXMuaXNOYU4pID0+IHR5cGVvZiBnbG9iYWxUaGlzLmlzTmFOOwoK diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts.map index af2a9e673e4bf..29f56d4927db1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts.map +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts.map @@ -31,7 +31,7 @@ export declare const obj4: { //// [declarationEmitObjectLiteralAccessors1.d.ts.map] -{"version":3,"file":"declarationEmitObjectLiteralAccessors1.d.ts","sourceRoot":"","sources":["declarationEmitObjectLiteralAccessors1.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,EAAE;IACf,gDAAgD;IAChD,CAAC,EAAE,MAAM,CAAC;CAQb,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE;IACf,wBAAwB;IACxB,IAAI,CAAC,IAAI,MAAM,CAAC;IAChB,wBAAwB;IACxB,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE;CAQpB,CAAC;AAEF,eAAO,MAAM,IAAI;IACf,wBAAwB;aACpB,CAAC,EAAI,MAAM;CAGhB,CAAC;AAEF,eAAO,MAAM,IAAI;IACf,wBAAwB;IACpB,CAAC,EAAI,MAAM;CAChB,CAAC"} +{"version":3,"file":"declarationEmitObjectLiteralAccessors1.d.ts","sourceRoot":"","sources":["declarationEmitObjectLiteralAccessors1.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,EAAE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KiogbXkgYXdlc29tZSBzZXR0ZXIgKi8KICAgIHNldCB4KGE6IG51bWJlcik7Cn0gPSB7CiAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovCiAgZ2V0IHgoKTogc3RyaW5nIHsKICAgIHJldHVybiAiIjsKICB9LAogIC8qKiBteSBhd2Vzb21lIHNldHRlciAqLwogIHNldCB4KGE6IG51bWJlcikge30sCn07CgpleHBvcnQgY29uc3Qgb2JqMyA9IHsKICAvKiogbXkgYXdlc29tZSBnZXR0ZXIgKi8KICBnZXQgeCgpOiBzdHJpbmcgewogICAgcmV0dXJuICIiOwogIH0sCn07CgpleHBvcnQgY29uc3Qgb2JqNCA9IHsKICAvKiogbXkgYXdlc29tZSBzZXR0ZXIgKi8KICBzZXQgeChhOiBudW1iZXIpIHt9LAp9Owo= +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3Qgb2JqMTogew0KICAgIC8qKiBteSBhd2Vzb21lIGdldHRlciAoZmlyc3QgaW4gc291cmNlIG9yZGVyKSAqLw0KICAgIHg6IHN0cmluZzsNCn07DQpleHBvcnQgZGVjbGFyZSBjb25zdCBvYmoyOiB7DQogICAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovDQogICAgZ2V0IHgoKTogc3RyaW5nOw0KICAgIC8qKiBteSBhd2Vzb21lIHNldHRlciAqLw0KICAgIHNldCB4KGE6IG51bWJlcik7DQp9Ow0KZXhwb3J0IGRlY2xhcmUgY29uc3Qgb2JqMzogew0KICAgIC8qKiBteSBhd2Vzb21lIGdldHRlciAqLw0KICAgIHJlYWRvbmx5IHg6IHN0cmluZzsNCn07DQpleHBvcnQgZGVjbGFyZSBjb25zdCBvYmo0OiB7DQogICAgLyoqIG15IGF3ZXNvbWUgc2V0dGVyICovDQogICAgeDogbnVtYmVyOw0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdE9iamVjdExpdGVyYWxBY2Nlc3N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IGFjY2Vzc29ycwpleHBvcnQgY29uc3Qgb2JqMjogewogICAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovCiAgICBnZXQgeCgpOiBzdHJpbmc7CiAgICAvKiogbXkgYXdlc29tZSBzZXR0ZXIgKi8KICAgIHNldCB4KGE6IG51bWJlcik7Cn0gPSB7CiAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovCiAgZ2V0IHgoKTogc3RyaW5nIHsKICAgIHJldHVybiAiIjsKICB9LAogIC8qKiBteSBhd2Vzb21lIHNldHRlciAqLwogIHNldCB4KGE6IG51bWJlcikge30sCn07CgpleHBvcnQgY29uc3Qgb2JqMyA9IHsKICAvKiogbXkgYXdlc29tZSBnZXR0ZXIgKi8KICBnZXQgeCgpOiBzdHJpbmcgewogICAgcmV0dXJuICIiOwogIH0sCn07CgpleHBvcnQgY29uc3Qgb2JqNCA9IHsKICAvKiogbXkgYXdlc29tZSBzZXR0ZXIgKi8KICBzZXQgeChhOiBudW1iZXIpIHt9LAp9Owo= 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 index 7920892256e1a..3301f5d268e9f 100644 --- 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 @@ -29,5 +29,5 @@ export default _default; //// [/.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"} +{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["../../src/settings/spacing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,yBAAyB,CAAC;;iBAG9C,MAAM;;AADjB,wBAIE"} diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.f b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.f new file mode 100644 index 0000000000000..3f3d460707ad5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.f @@ -0,0 +1,405 @@ +//// [declarationEmitPrefersPathKindBasedOnBundling.ts] //// + +//// [/.src/dist/lib/operators/scalar.d.ts.map] +{ + "version": 3, + "file": "scalar.d.ts", + "sourceRoot": "", + "sources": [ + "../../../src/lib/operators/scalar.ts" + ], + "names": [], + "mappings": [ + { + "generatedLine": 1, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 1, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 1, + "generatedColumn": 6, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 1, + "originalColumn": 6, + "name": null, + "generatedText": "export", + "sourceText": "export" + }, + { + "generatedLine": 1, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 1, + "originalColumn": 17, + "name": null, + "generatedText": " interface ", + "sourceText": " interface " + }, + { + "generatedLine": 1, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 1, + "originalColumn": 23, + "name": null, + "generatedText": "Scalar", + "sourceText": "Scalar" + }, + { + "generatedLine": 2, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 2, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 2, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 2, + "originalColumn": 5, + "name": null, + "generatedText": "(): ", + "sourceText": "(): " + }, + { + "generatedLine": 2, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 2, + "originalColumn": 11, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 2, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 2, + "originalColumn": 12, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 3, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 3, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 3, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 3, + "originalColumn": 6, + "name": null, + "generatedText": "value", + "sourceText": "value" + }, + { + "generatedLine": 3, + "generatedColumn": 11, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 3, + "originalColumn": 8, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 3, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 3, + "originalColumn": 14, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 3, + "generatedColumn": 18, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 3, + "originalColumn": 15, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 4, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 4, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 5, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 6, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 5, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 6, + "originalColumn": 16, + "name": null, + "generatedText": "export declare function ", + "sourceText": "export function " + }, + { + "generatedLine": 5, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 6, + "originalColumn": 22, + "name": null, + "generatedText": "scalar", + "sourceText": "scalar" + }, + { + "generatedLine": 5, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 6, + "originalColumn": 23, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 5, + "generatedColumn": 36, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 6, + "originalColumn": 28, + "name": null, + "generatedText": "value", + "sourceText": "value" + }, + { + "generatedLine": 5, + "generatedColumn": 38, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 6, + "originalColumn": 30, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 5, + "generatedColumn": 44, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 6, + "originalColumn": 36, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 5, + "generatedColumn": 47, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 6, + "originalColumn": 39, + "name": null, + "generatedText": "): ", + "sourceText": "): " + }, + { + "generatedLine": 5, + "generatedColumn": 53, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 6, + "originalColumn": 45, + "name": null, + "generatedText": "Scalar", + "sourceText": "Scalar" + }, + { + "generatedLine": 5, + "generatedColumn": 54, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 8, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + } + ] +}//// [/.src/dist/settings/spacing.d.ts.map] +{ + "version": 3, + "file": "spacing.d.ts", + "sourceRoot": "", + "sources": [ + "../../src/settings/spacing.ts" + ], + "names": [], + "mappings": [ + { + "generatedLine": 1, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 1, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 1, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 1, + "originalColumn": 7, + "name": null, + "generatedText": "import ", + "sourceText": "import " + }, + { + "generatedLine": 1, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 1, + "originalColumn": 9, + "name": null, + "generatedText": "{ ", + "sourceText": "{ " + }, + { + "generatedLine": 1, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 1, + "originalColumn": 15, + "name": null, + "generatedText": "Scalar", + "sourceText": "Scalar" + }, + { + "generatedLine": 1, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 1, + "originalColumn": 25, + "name": null, + "generatedText": " }", + "sourceText": ", scalar }" + }, + { + "generatedLine": 1, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 1, + "originalColumn": 31, + "name": null, + "generatedText": " from ", + "sourceText": " from " + }, + { + "generatedLine": 1, + "generatedColumn": 48, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 1, + "originalColumn": 56, + "name": null, + "generatedText": "'../lib/operators/scalar'", + "sourceText": "'../lib/operators/scalar'" + }, + { + "generatedLine": 1, + "generatedColumn": 49, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 1, + "originalColumn": 57, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 3, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 4, + "originalColumn": 11, + "name": null + }, + { + "generatedLine": 3, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 4, + "originalColumn": 17, + "name": null, + "generatedText": "Scalar", + "sourceText": "Scalar" + }, + { + "generatedLine": 5, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 3, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 5, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 7, + "originalColumn": 2, + "name": null, + "generatedText": "export default _default;", + "sourceText": "};" + } + ] +} \ No newline at end of file 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 index bf6864ce168fd..978f0ea124f41 100644 --- 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 @@ -31,7 +31,7 @@ export default _default; //// [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"} +{"version":3,"file":"spacing.d.ts","sourceRoot":"","sources":["spacing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,yBAAyB,CAAC;;iBAG9C,MAAM;;AADjB,wBAIE"} -//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgU2NhbGFyIH0gZnJvbSAn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FJRSJ9,aW1wb3J0IHsgU2NhbGFyLCBzY2FsYXIgfSBmcm9tICcuLi9saWIvb3BlcmF0b3JzL3NjYWxhcic7CgpleHBvcnQgZGVmYXVsdCB7CglnZXQgeHMoKTogU2NhbGFyIHsKCQlyZXR1cm4gc2NhbGFyKCIxNHB4Iik7Cgl9Cn07Cg== diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitThisPredicates02.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitThisPredicates02.d.ts.map index a43a53c9be9e1..e34b60b0fa363 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitThisPredicates02.d.ts.map +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitThisPredicates02.d.ts.map @@ -21,7 +21,7 @@ export declare const obj: { //// [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;IACZ,CAAC,IAAI,IAAI,IAAI,GAAG;CAInB,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,ZXhwb3J0IGludGVyZmFjZSBGb28gew0KICAgIGE6IHN0cmluZzsNCiAgICBiOiBudW1iZXI7DQogICAgYzogYm9vbGVhbjsNCn0NCmV4cG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ZU1hcHBpbmdVUkw9ZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXMwMi5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXMwMi5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXMwMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLFdBQVcsR0FBRztJQUNoQixDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQ1YsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUNWLENBQUMsRUFBRSxPQUFPLENBQUM7Q0FDZDtBQUVELGVBQU8sTUFBTSxHQUFHO1NBQ1AsSUFBSSxJQUFJLEdBQUc7Q0FJbkIsQ0FBQSJ9,ZXhwb3J0IGludGVyZmFjZSBGb28gewogICAgYTogc3RyaW5nOwogICAgYjogbnVtYmVyOwogICAgYzogYm9vbGVhbjsKfQoKZXhwb3J0IGNvbnN0IG9iaiA9IHsKICAgIG0oKTogdGhpcyBpcyBGb28gewogICAgICAgIGxldCBkaXMgPSB0aGlzIGFzIHt9IGFzIEZvbzsKICAgICAgICByZXR1cm4gZGlzLmEgIT0gbnVsbCAmJiBkaXMuYiAhPSBudWxsICYmIGRpcy5jICE9IG51bGw7CiAgICB9Cn0= diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitThisPredicatesWithPrivateName02.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitThisPredicatesWithPrivateName02.d.ts.map index ebfbcd9ca8a74..4b1dc819fa62a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitThisPredicatesWithPrivateName02.d.ts.map +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitThisPredicatesWithPrivateName02.d.ts.map @@ -22,7 +22,7 @@ export {}; //// [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;IACZ,CAAC,IAAI,IAAI,IAAI,GAAG;CAInB,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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXNXaXRoUHJpdmF0ZU5hbWUwMi5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZGVjbGFyYXRpb25FbWl0VGhpc1ByZWRpY2F0ZXNXaXRoUHJpdmF0ZU5hbWUwMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdz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FDVCxDQUFDLEVBQUUsTUFBTSxDQUFDO0lBQ1YsQ0FBQyxFQUFFLE1BQU0sQ0FBQztJQUNWLENBQUMsRUFBRSxPQUFPLENBQUM7Q0FDZDtBQUVELGVBQU8sTUFBTSxHQUFHO1NBQ1AsSUFBSSxJQUFJLEdBQUc7Q0FJbkIsQ0FBQSJ9,aW50ZXJmYWNlIEZvbyB7CiAgICBhOiBzdHJpbmc7CiAgICBiOiBudW1iZXI7CiAgICBjOiBib29sZWFuOwp9CgpleHBvcnQgY29uc3Qgb2JqID0gewogICAgbSgpOiB0aGlzIGlzIEZvbyB7CiAgICAgICAgbGV0IGRpcyA9IHRoaXMgYXMge30gYXMgRm9vOwogICAgICAgIHJldHVybiBkaXMuYSAhPSBudWxsICYmIGRpcy5iICE9IG51bGwgJiYgZGlzLmMgIT0gbnVsbDsKICAgIH0KfQ== diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitMethodCalledNew.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitMethodCalledNew.d.ts deleted file mode 100644 index 8aa876e283405..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitMethodCalledNew.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -//// [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 \ 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..da79ce4c714cc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitMethodCalledNew.d.ts.map @@ -0,0 +1,28 @@ +//// [tests/cases/compiler/emitMethodCalledNew.ts] //// + + + +/// [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;UACR,CAAC,EAAE,MAAM,GAAG,MAAM;CACvB,CAAA;AACD,eAAO,MAAM,CAAC;UACN,CAAC,EAAE,MAAM,GAAG,MAAM;CACzB,CAAA;AACD,eAAO,MAAM,CAAC;UACJ,CAAC,EAAE,MAAM,GAAG,MAAM;CAC3B,CAAA"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgYTogew0KICAgICJuZXciKHg6IG51bWJlcik6IG51bWJlcjsNCn07DQpleHBvcnQgZGVjbGFyZSBjb25zdCBiOiB7DQogICAgIm5ldyIoeDogbnVtYmVyKTogbnVtYmVyOw0KfTsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IGM6IHsNCiAgICAibmV3Iih4OiBudW1iZXIpOiBudW1iZXI7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZW1pdE1ldGhvZENhbGxlZE5ldy5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1pdE1ldGhvZENhbGxlZE5ldy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZW1pdE1ldGhvZENhbGxlZE5ldy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxlQUFPLE1BQU0sQ0FBQztVQUNSLENBQUMsRUFBRSxNQUFNLEdBQUcsTUFBTTtDQUN2QixDQUFBO0FBQ0QsZUFBTyxNQUFNLENBQUM7VUFDTixDQUFDLEVBQUUsTUFBTSxHQUFHLE1BQU07Q0FDekIsQ0FBQTtBQUNELGVBQU8sTUFBTSxDQUFDO1VBQ0osQ0FBQyxFQUFFLE1BQU0sR0FBRyxNQUFNO0NBQzNCLENBQUEifQ==,Ly8gaHR0cHM6Ly9naXRodWIuY29tL21pY3Jvc29mdC9UeXBlU2NyaXB0L2lzc3Vlcy81NTA3NQoKZXhwb3J0IGNvbnN0IGEgPSB7CiAgbmV3KHg6IG51bWJlcik6IG51bWJlciB7IHJldHVybiB4ICsgMSB9Cn0KZXhwb3J0IGNvbnN0IGIgPSB7CiAgIm5ldyIoeDogbnVtYmVyKTogbnVtYmVyIHsgcmV0dXJuIHggKyAxIH0KfQpleHBvcnQgY29uc3QgYyA9IHsKICBbIm5ldyJdKHg6IG51bWJlcik6IG51bWJlciB7IHJldHVybiB4ICsgMSB9Cn0K + 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 index 843b603cc66ca..fe396c3f04bf4 100644 --- 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 @@ -114,7 +114,7 @@ declare const o2: { //// [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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pmdW5jdGlvbiBmMSgpOiB2b2lkIHsKICAgIGxldCB2ID0gewogICAgICAgIGE6IDQyLAogICAgICAgIGI6ICJoZWxsbyIsCiAgICAgICAgYzogdHJ1ZQogICAgfTsKICAgIGxldCBiID0gYm94aWZ5KHYpOwogICAgbGV0IHg6IG51bWJlciA9IGIuYS52YWx1ZTsKfQoKZnVuY3Rpb24gZjIoKTogdm9pZCB7CiAgICBsZXQgYiA9IHsKICAgICAgICBhOiBib3goNDIpLAogICAgICAgIGI6IGJveCgiaGVsbG8iKSwKICAgICAgICBjOiBib3godHJ1ZSkKICAgIH07CiAgICBsZXQgdiA9IHVuYm94aWZ5KGIpOwogICAgbGV0IHg6IG51bWJlciA9IHYuYTsKfQoKZnVuY3Rpb24gZjMoKTogdm9pZCB7CiAgICBsZXQgYiA9IHsKICAgICAgICBhOiBib3goNDIpLAogICAgICAgIGI6IGJveCgiaGVsbG8iKSwKICAgICAgICBjOiBib3godHJ1ZSkKICAgIH07CiAgICBhc3NpZ25Cb3hpZmllZChiLCB7IGM6IGZhbHNlIH0pOwp9CgpmdW5jdGlvbiBmNCgpOiB2b2lkIHsKICAgIGxldCBiID0gewogICAgICAgIGE6IGJveCg0MiksCiAgICAgICAgYjogYm94KCJoZWxsbyIpLAogICAgICAgIGM6IGJveCh0cnVlKQogICAgfTsKICAgIGIgPSBib3hpZnkodW5ib3hpZnkoYikpOwogICAgYiA9IHVuYm94aWZ5KGJveGlmeShiKSk7Cn0KCmZ1bmN0aW9uIG1ha2VSZWNvcmQ8VCwgSyBleHRlbmRzIHN0cmluZz4ob2JqOiB7IFtQIGluIEtdOiBUIH0pOiB7CiAgICBbUCBpbiBLXTogVDsKfSB7CiAgICByZXR1cm4gb2JqOwp9CgpmdW5jdGlvbiBmNShzOiBzdHJpbmcpOiB2b2lkIHsKICAgIGxldCBiID0gbWFrZVJlY29yZCh7CiAgICAgICAgYTogYm94KDQyKSwKICAgICAgICBiOiBib3goImhlbGxvIiksCiAgICAgICAgYzog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VOwoKbGV0IHgwOiB7CiAgICBmb286IG51bWJlcjsKICAgIGJhcjogc3RyaW5nOwp9ID0gZjIwKHsgZm9vOiA0MiwgYmFyOiAiaGVsbG8iIH0pOwpsZXQgeDE6ICJmb28iIHwgImJhciIgPSBmMjEoeyBmb286IDQyLCBiYXI6ICJoZWxsbyIgfSk7CmxldCB4MjogewogICAgZm9vOiBudW1iZXI7CiAgICBiYXI6IHN0cmluZzsKfSA9IGYyMih7IGZvbzogeyB2YWx1ZTogNDJ9ICwgYmFyOiB7IHZhbHVlOiAiaGVsbG8iIH0gfSk7CmxldCB4MzogewogICAgZm9vOiBudW1iZXI7CiAgICBiYXI6IHN0cmluZzsKfSA9IGYyMyh7IGZvbzogNDIsIGJhcjogImhlbGxvIiB9KTsKbGV0IHg0OiB7CiAgICBmb286IG51bWJlcjsKICAgIGJhcjogc3RyaW5nOwp9ICYgewogICAgZm9vOiBudW1iZXI7CiAgICBiYXI6IHN0cmluZzsKfSA9IGYyNCh7IGZvbzogNDIsIGJhcjogImhlbGxvIiB9KTsKCi8vIFJlcHJvIGZyb20gIzI5NzY1CgpmdW5jdGlvbiBnZXRQcm9wczxULCBLIGV4dGVuZHMga2V5b2YgVD4ob2JqOiBULCBsaXN0OiBLW10pOiBQaWNrPFQsIEs+IHsKICAgIHJldHVybiB7fSBhcyBhbnk7Cn0KCmNvbnN0IG15QW55OiBhbnkgPSB7fTsKCmNvbnN0IG8xOiBQaWNrPGFueSwgImZvbyIgfCAiYmFyIj4gPSBnZXRQcm9wcyhteUFueSwgWydmb28nLCAnYmFyJ10pOwoKY29uc3QgbzI6IHsgZm9vOiBhbnk7IGJhcjogYW55IH0gPSBnZXRQcm9wcyhteUFueSwgWydmb28nLCAnYmFyJ10pOwo= +//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBCb3g8VD4gPSB7DQogICAgdmFsdWU6IFQ7DQp9Ow0KdHlwZSBCb3hpZmllZDxUPiA9IHsNCiAgICBbUCBpbiBrZXlvZiBUXT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4ob2JqOiBULCBsaXN0OiBLW10pOiBQaWNrPFQsIEs+IHsKICAgIHJldHVybiB7fSBhcyBhbnk7Cn0KCmNvbnN0IG15QW55OiBhbnkgPSB7fTsKCmNvbnN0IG8xOiBQaWNrPGFueSwgImZvbyIgfCAiYmFyIj4gPSBnZXRQcm9wcyhteUFueSwgWydmb28nLCAnYmFyJ10pOwoKY29uc3QgbzI6IHsgZm9vOiBhbnk7IGJhcjogYW55IH0gPSBnZXRQcm9wcyhteUFueSwgWydmb28nLCAnYmFyJ10pOwo= diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.f b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.f new file mode 100644 index 0000000000000..4aaf72e93758a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.f @@ -0,0 +1,385 @@ +//// [declarationEmitPrefersPathKindBasedOnBundling.ts] //// + +//// [/.src/dist/lib/operators/scalar.d.ts.map] +{ + "version": 3, + "file": "scalar.d.ts", + "sourceRoot": "", + "sources": [ + "../../../src/lib/operators/scalar.ts" + ], + "names": [], + "mappings": [ + { + "generatedLine": 1, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 1, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 1, + "generatedColumn": 6, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 1, + "originalColumn": 6, + "name": null, + "generatedText": "export", + "sourceText": "export" + }, + { + "generatedLine": 1, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 1, + "originalColumn": 17, + "name": null, + "generatedText": " interface ", + "sourceText": " interface " + }, + { + "generatedLine": 1, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 1, + "originalColumn": 23, + "name": null, + "generatedText": "Scalar", + "sourceText": "Scalar" + }, + { + "generatedLine": 2, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 2, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 2, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 2, + "originalColumn": 5, + "name": null, + "generatedText": "(): ", + "sourceText": "(): " + }, + { + "generatedLine": 2, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 2, + "originalColumn": 11, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 2, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 2, + "originalColumn": 12, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 3, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 3, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 3, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 3, + "originalColumn": 6, + "name": null, + "generatedText": "value", + "sourceText": "value" + }, + { + "generatedLine": 3, + "generatedColumn": 11, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 3, + "originalColumn": 8, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 3, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 3, + "originalColumn": 14, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 3, + "generatedColumn": 18, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 3, + "originalColumn": 15, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 4, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 4, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 5, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 6, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 5, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 6, + "originalColumn": 16, + "name": null, + "generatedText": "export declare function ", + "sourceText": "export function " + }, + { + "generatedLine": 5, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 6, + "originalColumn": 22, + "name": null, + "generatedText": "scalar", + "sourceText": "scalar" + }, + { + "generatedLine": 5, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 6, + "originalColumn": 23, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 5, + "generatedColumn": 36, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 6, + "originalColumn": 28, + "name": null, + "generatedText": "value", + "sourceText": "value" + }, + { + "generatedLine": 5, + "generatedColumn": 38, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 6, + "originalColumn": 30, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 5, + "generatedColumn": 44, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 6, + "originalColumn": 36, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 5, + "generatedColumn": 47, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 6, + "originalColumn": 39, + "name": null, + "generatedText": "): ", + "sourceText": "): " + }, + { + "generatedLine": 5, + "generatedColumn": 53, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 6, + "originalColumn": 45, + "name": null, + "generatedText": "Scalar", + "sourceText": "Scalar" + }, + { + "generatedLine": 5, + "generatedColumn": 54, + "lastGeneratedColumn": null, + "source": "../../../src/lib/operators/scalar.ts", + "originalLine": 8, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + } + ] +}//// [/.src/dist/settings/spacing.d.ts.map] +{ + "version": 3, + "file": "spacing.d.ts", + "sourceRoot": "", + "sources": [ + "../../src/settings/spacing.ts" + ], + "names": [], + "mappings": [ + { + "generatedLine": 1, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 1, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 1, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 1, + "originalColumn": 7, + "name": null, + "generatedText": "import ", + "sourceText": "import " + }, + { + "generatedLine": 1, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 1, + "originalColumn": 9, + "name": null, + "generatedText": "{ ", + "sourceText": "{ " + }, + { + "generatedLine": 1, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 1, + "originalColumn": 15, + "name": null, + "generatedText": "Scalar", + "sourceText": "Scalar" + }, + { + "generatedLine": 1, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 1, + "originalColumn": 25, + "name": null, + "generatedText": " }", + "sourceText": ", scalar }" + }, + { + "generatedLine": 1, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 1, + "originalColumn": 31, + "name": null, + "generatedText": " from ", + "sourceText": " from " + }, + { + "generatedLine": 1, + "generatedColumn": 48, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 1, + "originalColumn": 56, + "name": null, + "generatedText": "'../lib/operators/scalar'", + "sourceText": "'../lib/operators/scalar'" + }, + { + "generatedLine": 1, + "generatedColumn": 49, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 1, + "originalColumn": 57, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 5, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 3, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 5, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "../../src/settings/spacing.ts", + "originalLine": 7, + "originalColumn": 2, + "name": null, + "generatedText": "export default _default;", + "sourceText": "};" + } + ] +} \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emitMethodCalledNew.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emitMethodCalledNew.d.ts deleted file mode 100644 index 7739dc75851d0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emitMethodCalledNew.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -//// [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 \ 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..d6b9ebebcf69a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emitMethodCalledNew.d.ts.map @@ -0,0 +1,28 @@ +//// [tests/cases/compiler/emitMethodCalledNew.ts] //// + + + +/// [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/cases/conformance/types/mapped/isomorphicMappedTypeInference.ts b/tests/cases/conformance/types/mapped/isomorphicMappedTypeInference.ts index 67078a1234722..e3c1510925249 100644 --- a/tests/cases/conformance/types/mapped/isomorphicMappedTypeInference.ts +++ b/tests/cases/conformance/types/mapped/isomorphicMappedTypeInference.ts @@ -1,7 +1,7 @@ // @strictNullChecks: true // @noimplicitany: true // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Sourcemap is more detailed. (needs more validation) +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed type Box = { value: T; From da557b01e84bb56ad005d4b271c56fd028131024 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Sat, 25 Nov 2023 00:35:55 +0000 Subject: [PATCH 150/224] Fixed errors in DTE when enums are accessed through a dotted identifier. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/checker.ts | 17 +- .../transformers/declarations/emitResolver.ts | 63 +-- src/compiler/utilities.ts | 17 + .../original/diff/constEnums.d.ts.diff | 49 -- .../original/dte/constEnums.d.ts | 504 ------------------ .../original/tsc/constEnums.d.ts | 501 ----------------- 6 files changed, 51 insertions(+), 1100 deletions(-) delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/constEnums.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/constEnums.d.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c98f96209c15b..c374792c75072 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -12,7 +12,6 @@ import { and, AnonymousType, AnyImportOrReExport, - AnyImportSyntax, append, appendIfUnique, ArrayBindingPattern, @@ -241,6 +240,7 @@ import { getAllJSDocTags, getAllowSyntheticDefaultImports, getAncestor, + getAnyImportSyntax, getAssignedExpandoInitializer, getAssignmentDeclarationKind, getAssignmentDeclarationPropertyAccessKind, @@ -3927,21 +3927,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); } diff --git a/src/compiler/transformers/declarations/emitResolver.ts b/src/compiler/transformers/declarations/emitResolver.ts index 8f04781f08ba3..9ce43b1994713 100644 --- a/src/compiler/transformers/declarations/emitResolver.ts +++ b/src/compiler/transformers/declarations/emitResolver.ts @@ -1,5 +1,4 @@ import { - AnyImportSyntax, appendIfUnique, ComputedPropertyName, createEvaluator, @@ -19,6 +18,7 @@ import { findAncestor, FunctionDeclaration, FunctionLikeDeclaration, + getAnyImportSyntax, getFirstIdentifier, getNameOfDeclaration, getParseTreeNode, @@ -27,11 +27,7 @@ import { hasProperty, hasSyntacticModifier, Identifier, - ImportClause, - ImportEqualsDeclaration, - ImportSpecifier, isAccessor, - isArrowFunction, isBigIntLiteral, isBinaryExpression, isBindingElement, @@ -42,7 +38,7 @@ import { isEnumMember, isExpressionStatement, isFunctionDeclaration, - isFunctionExpression, + isFunctionExpressionOrArrowFunction, isFunctionLike, isGetAccessor, isGetAccessorDeclaration, @@ -54,6 +50,7 @@ import { isPartOfTypeNode, isPrefixUnaryExpression, isPropertyAccessExpression, + isPropertyName, isSetAccessor, isSetAccessorDeclaration, isStringLiteralLike, @@ -65,7 +62,6 @@ import { LateBoundDeclaration, LateVisibilityPaintedStatement, ModifierFlags, - NamespaceImport, Node, NodeArray, NodeFlags, @@ -120,13 +116,39 @@ export function createEmitDeclarationResolver(file: SourceFile): IsolatedEmitRes } return undefined; } + + function resolveEntityName(location: Node, node: Expression, meaning: SymbolFlags): EmitDeclarationSymbol | 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(getMemberKey(name)); + if (!memberSymbol || !(memberSymbol.flags & meaning)) { + return undefined; + } + return memberSymbol; + } + else { + 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 ( - isIdentifier(expr.expression) - && expr.expression.escapedText === location.name.escapedText + isExpressionMemberOfEnum(expr.expression, location) && isStringLiteralLike(expr.argumentExpression) ) { return getEnumValueFromName(expr.argumentExpression, location); @@ -146,9 +168,8 @@ export function createEmitDeclarationResolver(file: SourceFile): IsolatedEmitRes return getEnumValueFromName(expr, location); } if ( - isPropertyAccessExpression(expr) - && isIdentifier(expr.expression) - && expr.expression.escapedText === location.name.escapedText + isEntityNameExpression(expr.expression) + && isExpressionMemberOfEnum(expr.expression, location) ) { return getEnumValueFromName(expr.name, location); } @@ -638,24 +659,6 @@ export function createEmitDeclarationResolver(file: SourceFile): IsolatedEmitRes } } -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 isFunctionExpressionOrArrowFunction(node: Expression) { - return isFunctionExpression(node) || isArrowFunction(node); -} - function getParentScope(declaration: VariableDeclaration | FunctionDeclaration): | undefined | Node & { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 7f87221303f94..4e4664fa3b5c3 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -10519,6 +10519,23 @@ export function getDeclarationContainer(node: Node): Node { })!.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); diff --git a/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts.diff deleted file mode 100644 index 04f3e5e530902..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/constEnums.d.ts.diff +++ /dev/null @@ -1,49 +0,0 @@ -// [[Reason: TODO Add support for nested namespace access for enums]] //// - -//// [tests/cases/compiler/constEnums.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -48,9 +48,9 @@ - namespace B { - namespace C { - const enum E { - V1 = 1, -- V2 = 101 -+ V2 - } - } - } - } -@@ -103,17 +103,18 @@ - constEnums.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - constEnums.ts(34,10): error TS2474: const enum member initializers must be constant expressions. - constEnums.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - constEnums.ts(35,10): error TS2474: const enum member initializers must be constant expressions. -+constEnums.ts(55,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - constEnums.ts(65,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - constEnums.ts(65,22): error TS2474: const enum member initializers must be constant expressions. - constEnums.ts(66,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - constEnums.ts(66,22): error TS2474: const enum member initializers must be constant expressions. - constEnums.ts(124,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - constEnums.ts(166,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - --==== constEnums.ts (12 errors) ==== -+==== constEnums.ts (13 errors) ==== - const enum Enum1 { - A0 = 100, - } - -@@ -179,8 +180,10 @@ - export module C { - export const enum E { - V1 = 1, - V2 = A.B.C.E.V1 | 100 -+ ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - } - } - } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/constEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/constEnums.d.ts deleted file mode 100644 index a6807ef0c080d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/constEnums.d.ts +++ /dev/null @@ -1,504 +0,0 @@ -//// [tests/cases/compiler/constEnums.ts] //// - -//// [constEnums.ts] -const enum Enum1 { - A0 = 100, -} - -const enum Enum1 { - // correct cases - A, - B, - C = 10, - D = A | B, - E = A | 1, - F = 1 | A, - G = (1 & 1), - H = ~(A | B), - I = A >>> 1, - J = 1 & A, - K = ~(1 | 5), - L = ~D, - M = E << B, - N = E << 1, - O = E >> B, - P = E >> 1, - PQ = E ** 2, - Q = -D, - R = C & 5, - S = 5 & C, - T = C | D, - U = C | 1, - V = 10 | D, - W = Enum1.V, - - // correct cases: reference to the enum member from different enum declaration - W1 = A0, - W2 = Enum1.A0, - W3 = Enum1["A0"], - W4 = Enum1["W"], - W5 = Enum1[`V`], -} - -const enum Comments { - "//", - "/*", - "*/", - "///", - "#", - "", -} - -module A { - export module B { - export module C { - export const enum E { - V1 = 1, - V2 = A.B.C.E.V1 | 100 - } - } - } -} - -module A { - export module B { - export module C { - export const enum E { - V3 = A.B.C.E["V2"] & 200, - V4 = A.B.C.E[`V1`] << 1, - } - } - } -} - -module A1 { - export module B { - export module C { - export const enum E { - V1 = 10, - V2 = 110, - } - } - } -} - -module A2 { - export module B { - export module C { - export const enum E { - V1 = 10, - V2 = 110, - } - } - // module C will be classified as value - export module C { - var x = 1 - } - } -} - -import I = A.B.C.E; -import I1 = A1.B; -import I2 = A2.B; - -function foo0(e: I): void { - if (e === I.V1) { - } - else if (e === I.V2) { - } -} - -function foo1(e: I1.C.E): void { - if (e === I1.C.E.V1) { - } - else if (e === I1.C.E.V2) { - } -} - -function foo2(e: I2.C.E): void { - if (e === I2.C.E.V1) { - } - else if (e === I2.C.E.V2) { - } -} - - -function foo(x: Enum1) { - switch (x) { - case Enum1.A: - case Enum1.B: - case Enum1.C: - case Enum1.D: - case Enum1.E: - case Enum1.F: - case Enum1.G: - case Enum1.H: - case Enum1.I: - case Enum1.J: - case Enum1.K: - case Enum1.L: - case Enum1.M: - case Enum1.N: - case Enum1.O: - case Enum1.P: - case Enum1.PQ: - case Enum1.Q: - case Enum1.R: - case Enum1.S: - case Enum1["T"]: - case Enum1[`U`]: - case Enum1.V: - case Enum1.W: - case Enum1.W1: - case Enum1.W2: - case Enum1.W3: - case Enum1.W4: - break; - } -} - -function bar(e: A.B.C.E): number { - switch (e) { - case A.B.C.E.V1: return 1; - case A.B.C.E.V2: return 1; - case A.B.C.E.V3: return 1; - } -} - -function baz(c: Comments) { - switch (c) { - case Comments["//"]: - case Comments["/*"]: - case Comments["*/"]: - case Comments["///"]: - case Comments["#"]: - case Comments[""]: - break; - } -} - - -/// [Declarations] //// - - - -//// [constEnums.d.ts] -declare const enum Enum1 { - A0 = 100 -} -declare const enum Enum1 { - A = 0, - B = 1, - C = 10, - D = 1, - E = 1, - F = 1, - G = 1, - H = -2, - I = 0, - J = 0, - K = -6, - L = -2, - M = 2, - N = 2, - O = 0, - P = 0, - PQ = 1, - Q = -1, - R = 0, - S = 0, - T = 11, - U = 11, - V = 11, - W = 11, - W1, - W2, - W3, - W4 = 11, - W5 = 11 -} -declare const enum Comments { - "//" = 0, - "/*" = 1, - "*/" = 2, - "///" = 3, - "#" = 4, - "" = 6 -} -declare namespace A { - namespace B { - namespace C { - const enum E { - V1 = 1, - V2 - } - } - } -} -declare namespace A { - namespace B { - namespace C { - const enum E { - V3, - V4 - } - } - } -} -declare namespace A1 { - namespace B { - namespace C { - const enum E { - V1 = 10, - V2 = 110 - } - } - } -} -declare namespace A2 { - namespace B { - namespace C { - const enum E { - V1 = 10, - V2 = 110 - } - } - namespace C { - } - } -} -import I = A.B.C.E; -import I1 = A1.B; -import I2 = A2.B; -declare function foo0(e: I): void; -declare function foo1(e: I1.C.E): void; -declare function foo2(e: I2.C.E): void; -declare function foo(x: Enum1): invalid; -declare function bar(e: A.B.C.E): number; -declare function baz(c: Comments): invalid; - -/// [Errors] //// - -constEnums.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(33,10): error TS2474: const enum member initializers must be constant expressions. -constEnums.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(34,10): error TS2474: const enum member initializers must be constant expressions. -constEnums.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(35,10): error TS2474: const enum member initializers must be constant expressions. -constEnums.ts(55,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(65,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(65,22): error TS2474: const enum member initializers must be constant expressions. -constEnums.ts(66,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(66,22): error TS2474: const enum member initializers must be constant expressions. -constEnums.ts(124,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(166,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== constEnums.ts (13 errors) ==== - const enum Enum1 { - A0 = 100, - } - - const enum Enum1 { - // correct cases - A, - B, - C = 10, - D = A | B, - E = A | 1, - F = 1 | A, - G = (1 & 1), - H = ~(A | B), - I = A >>> 1, - J = 1 & A, - K = ~(1 | 5), - L = ~D, - M = E << B, - N = E << 1, - O = E >> B, - P = E >> 1, - PQ = E ** 2, - Q = -D, - R = C & 5, - S = 5 & C, - T = C | D, - U = C | 1, - V = 10 | D, - W = Enum1.V, - - // correct cases: reference to the enum member from different enum declaration - W1 = A0, - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ -!!! error TS2474: const enum member initializers must be constant expressions. - W2 = Enum1.A0, - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~ -!!! error TS2474: const enum member initializers must be constant expressions. - W3 = Enum1["A0"], - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~ -!!! error TS2474: const enum member initializers must be constant expressions. - W4 = Enum1["W"], - W5 = Enum1[`V`], - } - - const enum Comments { - "//", - "/*", - "*/", - "///", - "#", - "", - } - - module A { - export module B { - export module C { - export const enum E { - V1 = 1, - V2 = A.B.C.E.V1 | 100 - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - } - } - } - - module A { - export module B { - export module C { - export const enum E { - V3 = A.B.C.E["V2"] & 200, - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2474: const enum member initializers must be constant expressions. - V4 = A.B.C.E[`V1`] << 1, - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~~~~~ -!!! error TS2474: const enum member initializers must be constant expressions. - } - } - } - } - - module A1 { - export module B { - export module C { - export const enum E { - V1 = 10, - V2 = 110, - } - } - } - } - - module A2 { - export module B { - export module C { - export const enum E { - V1 = 10, - V2 = 110, - } - } - // module C will be classified as value - export module C { - var x = 1 - } - } - } - - import I = A.B.C.E; - import I1 = A1.B; - import I2 = A2.B; - - function foo0(e: I): void { - if (e === I.V1) { - } - else if (e === I.V2) { - } - } - - function foo1(e: I1.C.E): void { - if (e === I1.C.E.V1) { - } - else if (e === I1.C.E.V2) { - } - } - - function foo2(e: I2.C.E): void { - if (e === I2.C.E.V1) { - } - else if (e === I2.C.E.V2) { - } - } - - - function foo(x: Enum1) { - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - switch (x) { - case Enum1.A: - case Enum1.B: - case Enum1.C: - case Enum1.D: - case Enum1.E: - case Enum1.F: - case Enum1.G: - case Enum1.H: - case Enum1.I: - case Enum1.J: - case Enum1.K: - case Enum1.L: - case Enum1.M: - case Enum1.N: - case Enum1.O: - case Enum1.P: - case Enum1.PQ: - case Enum1.Q: - case Enum1.R: - case Enum1.S: - case Enum1["T"]: - case Enum1[`U`]: - case Enum1.V: - case Enum1.W: - case Enum1.W1: - case Enum1.W2: - case Enum1.W3: - case Enum1.W4: - break; - } - } - - function bar(e: A.B.C.E): number { - switch (e) { - case A.B.C.E.V1: return 1; - case A.B.C.E.V2: return 1; - case A.B.C.E.V3: return 1; - } - } - - function baz(c: Comments) { - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - switch (c) { - case Comments["//"]: - case Comments["/*"]: - case Comments["*/"]: - case Comments["///"]: - case Comments["#"]: - case Comments[""]: - break; - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/constEnums.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/constEnums.d.ts deleted file mode 100644 index ccb410b083f91..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/constEnums.d.ts +++ /dev/null @@ -1,501 +0,0 @@ -//// [tests/cases/compiler/constEnums.ts] //// - -//// [constEnums.ts] -const enum Enum1 { - A0 = 100, -} - -const enum Enum1 { - // correct cases - A, - B, - C = 10, - D = A | B, - E = A | 1, - F = 1 | A, - G = (1 & 1), - H = ~(A | B), - I = A >>> 1, - J = 1 & A, - K = ~(1 | 5), - L = ~D, - M = E << B, - N = E << 1, - O = E >> B, - P = E >> 1, - PQ = E ** 2, - Q = -D, - R = C & 5, - S = 5 & C, - T = C | D, - U = C | 1, - V = 10 | D, - W = Enum1.V, - - // correct cases: reference to the enum member from different enum declaration - W1 = A0, - W2 = Enum1.A0, - W3 = Enum1["A0"], - W4 = Enum1["W"], - W5 = Enum1[`V`], -} - -const enum Comments { - "//", - "/*", - "*/", - "///", - "#", - "", -} - -module A { - export module B { - export module C { - export const enum E { - V1 = 1, - V2 = A.B.C.E.V1 | 100 - } - } - } -} - -module A { - export module B { - export module C { - export const enum E { - V3 = A.B.C.E["V2"] & 200, - V4 = A.B.C.E[`V1`] << 1, - } - } - } -} - -module A1 { - export module B { - export module C { - export const enum E { - V1 = 10, - V2 = 110, - } - } - } -} - -module A2 { - export module B { - export module C { - export const enum E { - V1 = 10, - V2 = 110, - } - } - // module C will be classified as value - export module C { - var x = 1 - } - } -} - -import I = A.B.C.E; -import I1 = A1.B; -import I2 = A2.B; - -function foo0(e: I): void { - if (e === I.V1) { - } - else if (e === I.V2) { - } -} - -function foo1(e: I1.C.E): void { - if (e === I1.C.E.V1) { - } - else if (e === I1.C.E.V2) { - } -} - -function foo2(e: I2.C.E): void { - if (e === I2.C.E.V1) { - } - else if (e === I2.C.E.V2) { - } -} - - -function foo(x: Enum1) { - switch (x) { - case Enum1.A: - case Enum1.B: - case Enum1.C: - case Enum1.D: - case Enum1.E: - case Enum1.F: - case Enum1.G: - case Enum1.H: - case Enum1.I: - case Enum1.J: - case Enum1.K: - case Enum1.L: - case Enum1.M: - case Enum1.N: - case Enum1.O: - case Enum1.P: - case Enum1.PQ: - case Enum1.Q: - case Enum1.R: - case Enum1.S: - case Enum1["T"]: - case Enum1[`U`]: - case Enum1.V: - case Enum1.W: - case Enum1.W1: - case Enum1.W2: - case Enum1.W3: - case Enum1.W4: - break; - } -} - -function bar(e: A.B.C.E): number { - switch (e) { - case A.B.C.E.V1: return 1; - case A.B.C.E.V2: return 1; - case A.B.C.E.V3: return 1; - } -} - -function baz(c: Comments) { - switch (c) { - case Comments["//"]: - case Comments["/*"]: - case Comments["*/"]: - case Comments["///"]: - case Comments["#"]: - case Comments[""]: - break; - } -} - - -/// [Declarations] //// - - - -//// [constEnums.d.ts] -declare const enum Enum1 { - A0 = 100 -} -declare const enum Enum1 { - A = 0, - B = 1, - C = 10, - D = 1, - E = 1, - F = 1, - G = 1, - H = -2, - I = 0, - J = 0, - K = -6, - L = -2, - M = 2, - N = 2, - O = 0, - P = 0, - PQ = 1, - Q = -1, - R = 0, - S = 0, - T = 11, - U = 11, - V = 11, - W = 11, - W1, - W2, - W3, - W4 = 11, - W5 = 11 -} -declare const enum Comments { - "//" = 0, - "/*" = 1, - "*/" = 2, - "///" = 3, - "#" = 4, - "" = 6 -} -declare namespace A { - namespace B { - namespace C { - const enum E { - V1 = 1, - V2 = 101 - } - } - } -} -declare namespace A { - namespace B { - namespace C { - const enum E { - V3, - V4 - } - } - } -} -declare namespace A1 { - namespace B { - namespace C { - const enum E { - V1 = 10, - V2 = 110 - } - } - } -} -declare namespace A2 { - namespace B { - namespace C { - const enum E { - V1 = 10, - V2 = 110 - } - } - namespace C { - } - } -} -import I = A.B.C.E; -import I1 = A1.B; -import I2 = A2.B; -declare function foo0(e: I): void; -declare function foo1(e: I1.C.E): void; -declare function foo2(e: I2.C.E): void; -declare function foo(x: Enum1): invalid; -declare function bar(e: A.B.C.E): number; -declare function baz(c: Comments): invalid; - -/// [Errors] //// - -constEnums.ts(33,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(33,10): error TS2474: const enum member initializers must be constant expressions. -constEnums.ts(34,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(34,10): error TS2474: const enum member initializers must be constant expressions. -constEnums.ts(35,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(35,10): error TS2474: const enum member initializers must be constant expressions. -constEnums.ts(65,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(65,22): error TS2474: const enum member initializers must be constant expressions. -constEnums.ts(66,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(66,22): error TS2474: const enum member initializers must be constant expressions. -constEnums.ts(124,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnums.ts(166,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== constEnums.ts (12 errors) ==== - const enum Enum1 { - A0 = 100, - } - - const enum Enum1 { - // correct cases - A, - B, - C = 10, - D = A | B, - E = A | 1, - F = 1 | A, - G = (1 & 1), - H = ~(A | B), - I = A >>> 1, - J = 1 & A, - K = ~(1 | 5), - L = ~D, - M = E << B, - N = E << 1, - O = E >> B, - P = E >> 1, - PQ = E ** 2, - Q = -D, - R = C & 5, - S = 5 & C, - T = C | D, - U = C | 1, - V = 10 | D, - W = Enum1.V, - - // correct cases: reference to the enum member from different enum declaration - W1 = A0, - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~ -!!! error TS2474: const enum member initializers must be constant expressions. - W2 = Enum1.A0, - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~ -!!! error TS2474: const enum member initializers must be constant expressions. - W3 = Enum1["A0"], - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~ -!!! error TS2474: const enum member initializers must be constant expressions. - W4 = Enum1["W"], - W5 = Enum1[`V`], - } - - const enum Comments { - "//", - "/*", - "*/", - "///", - "#", - "", - } - - module A { - export module B { - export module C { - export const enum E { - V1 = 1, - V2 = A.B.C.E.V1 | 100 - } - } - } - } - - module A { - export module B { - export module C { - export const enum E { - V3 = A.B.C.E["V2"] & 200, - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2474: const enum member initializers must be constant expressions. - V4 = A.B.C.E[`V1`] << 1, - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~~~~~~~~~~~~~~~~~~ -!!! error TS2474: const enum member initializers must be constant expressions. - } - } - } - } - - module A1 { - export module B { - export module C { - export const enum E { - V1 = 10, - V2 = 110, - } - } - } - } - - module A2 { - export module B { - export module C { - export const enum E { - V1 = 10, - V2 = 110, - } - } - // module C will be classified as value - export module C { - var x = 1 - } - } - } - - import I = A.B.C.E; - import I1 = A1.B; - import I2 = A2.B; - - function foo0(e: I): void { - if (e === I.V1) { - } - else if (e === I.V2) { - } - } - - function foo1(e: I1.C.E): void { - if (e === I1.C.E.V1) { - } - else if (e === I1.C.E.V2) { - } - } - - function foo2(e: I2.C.E): void { - if (e === I2.C.E.V1) { - } - else if (e === I2.C.E.V2) { - } - } - - - function foo(x: Enum1) { - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - switch (x) { - case Enum1.A: - case Enum1.B: - case Enum1.C: - case Enum1.D: - case Enum1.E: - case Enum1.F: - case Enum1.G: - case Enum1.H: - case Enum1.I: - case Enum1.J: - case Enum1.K: - case Enum1.L: - case Enum1.M: - case Enum1.N: - case Enum1.O: - case Enum1.P: - case Enum1.PQ: - case Enum1.Q: - case Enum1.R: - case Enum1.S: - case Enum1["T"]: - case Enum1[`U`]: - case Enum1.V: - case Enum1.W: - case Enum1.W1: - case Enum1.W2: - case Enum1.W3: - case Enum1.W4: - break; - } - } - - function bar(e: A.B.C.E): number { - switch (e) { - case A.B.C.E.V1: return 1; - case A.B.C.E.V2: return 1; - case A.B.C.E.V3: return 1; - } - } - - function baz(c: Comments) { - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - switch (c) { - case Comments["//"]: - case Comments["/*"]: - case Comments["*/"]: - case Comments["///"]: - case Comments["#"]: - case Comments[""]: - break; - } - } - \ No newline at end of file From a8c29dc162fb43a79adbcc08246cb046e662daaa Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 27 Nov 2023 09:12:51 -0500 Subject: [PATCH 151/224] Moved expando function member detection to binder. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/transformers/declarations.ts | 20 +- .../transformers/declarations/emitBinder.ts | 475 ++++++++++++------ .../transformers/declarations/emitResolver.ts | 137 +---- .../transformers/declarations/types.ts | 1 + 4 files changed, 349 insertions(+), 284 deletions(-) diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 24a7f1cf41f28..b38e31f416cac 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -100,6 +100,7 @@ import { isAnyImportSyntax, isArray, isArrayBindingElement, + isBinaryExpression, isBindingElement, isBindingPattern, isClassDeclaration, @@ -1702,14 +1703,23 @@ export function transformDeclarations(context: TransformationContext) { /*body*/ undefined, )); if (clean && resolver.isExpandoFunction(input) && shouldEmitFunctionProperties(input)) { + const props = resolver.getPropertiesOfContainerFunction(input); + if (isolatedDeclarations) { - context.addDiagnostic(createDiagnosticForNode( - input, - Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function, - )); + 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; } - const props = resolver.getPropertiesOfContainerFunction(input); // 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); diff --git a/src/compiler/transformers/declarations/emitBinder.ts b/src/compiler/transformers/declarations/emitBinder.ts index 0c3074a60f8a2..fa6c6999468ae 100644 --- a/src/compiler/transformers/declarations/emitBinder.ts +++ b/src/compiler/transformers/declarations/emitBinder.ts @@ -1,22 +1,30 @@ import { + factory, forEachChild, getModuleInstanceState, getNodeId, + isBinaryExpression, isBlock, isClassDeclaration, isComputedPropertyName, isConditionalTypeNode, isConstructorDeclaration, isConstructSignatureDeclaration, + isDoStatement, + isElementAccessExpression, isEnumDeclaration, isExportAssignment, isExportDeclaration, + isExpressionStatement, + isForStatement, isFunctionDeclaration, isIdentifier, + isIfStatement, isImportDeclaration, isImportEqualsDeclaration, isInferTypeNode, isInterfaceDeclaration, + isLabeledStatement, isMappedTypeNode, isModuleBlock, isModuleDeclaration, @@ -28,7 +36,9 @@ import { isSourceFile, isTypeAliasDeclaration, isVariableDeclaration, + isVariableDeclarationList, isVariableStatement, + isWhileStatement, ModuleInstanceState, Symbol, } from "../../_namespaces/ts"; @@ -38,6 +48,7 @@ import { import { __String, ArrayBindingElement, + BinaryExpression, BindingPattern, ClassDeclaration, ClassElement, @@ -45,6 +56,7 @@ import { Declaration, EnumDeclaration, EnumMember, + Expression, FunctionDeclaration, InterfaceDeclaration, ModifierFlags, @@ -58,17 +70,26 @@ import { SourceFile, SymbolFlags, SyntaxKind, + TypeAliasDeclaration, TypeElement, TypeParameterDeclaration, VariableDeclaration, } from "../../types"; import { + hasAmbientModifier, hasSyntacticModifier, + isBlockScopedContainerTopLevel, isEnumConst, + isFunctionExpressionOrArrowFunction, + isVarConst, + setValueDeclaration, } from "../../utilities"; import { findAncestor, isBindingPattern, + isExpression, + isForInOrOfStatement, + isPropertyName, isStringLiteralLike, } from "../../utilitiesPublic"; import { @@ -139,6 +160,15 @@ const syntaxKindToSymbolMap = { [SyntaxKind.ImportClause]: [SymbolFlags.Alias, SymbolFlags.AliasExcludes], } as const satisfies Partial>>; +const knownFunctionMembers = new Set([ + "I:apply", + "I:call", + "I:bind", + "I:toString", + "I:prototype", + "I:length", +]); + /** @internal */ export function bindSourceFileForDeclarationEmit(file: SourceFile) { const nodeLinks: EmitDeclarationNodeLinks[] = []; @@ -159,10 +189,32 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { getNodeLinks, resolveName, resolveMemberKey, - getMemberKeyFromElement, + resolveEntityName, getMemberKey, }; + function resolveEntityName(location: Node, node: Expression, meaning: SymbolFlags): EmitDeclarationSymbol | 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(getMemberKey(name)); + if (!memberSymbol || !(memberSymbol.flags & meaning)) { + return undefined; + } + return memberSymbol; + } + else { + return undefined; + } + } + function resolveName(enclosingDeclaration: Node, escapedText: __String, meaning: SymbolFlags) { return resolveMemberKey(enclosingDeclaration, getMemberKey(escapedText as string), meaning); } @@ -235,21 +287,24 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { } return symbol; } - function addLocalAndExportDeclaration(name: MemberKey | undefined, node: Declaration, [flags, forbiddenFlags]: SymbolRegistrationFlags, isExport: boolean) { + function addLocalAndExportDeclaration(name: LocalAndExportName | MemberKey | undefined, node: Declaration, [flags, forbiddenFlags]: SymbolRegistrationFlags, isExport: boolean) { + const { exportName, localName } = typeof name === "object" ? name : { exportName: name, localName: name }; if (isExport) { const exportKind = flags & SymbolFlags.Value ? SymbolFlags.ExportValue : 0; - const localSymbol = addLocalOnlyDeclaration(name, node, [exportKind, forbiddenFlags]); - const exportSymbol = addExportOnlyDeclaration(name, node, [flags, forbiddenFlags]); + const localSymbol = addLocalOnlyDeclaration(localName, node, [exportKind, forbiddenFlags]); + const exportSymbol = addExportOnlyDeclaration(exportName, node, [flags, forbiddenFlags]); localSymbol.exportSymbol = exportSymbol; - return exportSymbol; + // Export symbol can be undefined if the export modifier was placed in an unexpected position. + // We just assume the local symbol should be used. There are already bigger issues in the file anyway. + return exportSymbol ?? localSymbol; } else { - return addLocalOnlyDeclaration(name, node, [flags, forbiddenFlags]); + return addLocalOnlyDeclaration(localName, node, [flags, forbiddenFlags]); } } function addExportOnlyDeclaration(name: MemberKey | undefined, node: Declaration, flagsAndForbiddenFlags: SymbolRegistrationFlags) { if (!currentExportsSymbolTable) { - throw new Error("Exporting symbol from a context that does not support it"); + return undefined; } return addDeclaration(currentExportsSymbolTable, name, node, flagsAndForbiddenFlags); } @@ -257,14 +312,18 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { return addDeclaration(currentLocalSymbolTable, name, node, flagsAndForbiddenFlags); } - function addDeclaration(table: EmitDeclarationSymbolTable, name: MemberKey | undefined, node: Declaration, [flags, forbiddenFlags]: SymbolRegistrationFlags) { + function addDeclaration(table: EmitDeclarationSymbolTable, name: MemberKey | undefined, node: Declaration, [includes, excludes]: SymbolRegistrationFlags) { let symbol = name !== undefined ? getSymbol(table, name) : newSymbol(); // Symbols don't merge, create new one - if (forbiddenFlags & symbol.flags) { - symbol = newSymbol(); + if (excludes & symbol.flags) { + // Variables and expando members from assignments are always allowed to merge + if (!(includes & SymbolFlags.Variable && symbol.flags & SymbolFlags.Assignment)) { + symbol = newSymbol(); + } } symbol.declarations.push(node); - symbol.flags |= flags; + symbol.flags |= includes; + setValueDeclaration(symbol as Symbol, node); getNodeLinks(node).symbol = symbol; // Some parts of declarations.ts use the symbol directly. We provide enough of it for everything to work. node.symbol = symbol as Symbol; @@ -279,7 +338,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { fn(); [currentScope, currentLocalSymbolTable, currentExportsSymbolTable] = old; } - function withMembers(symbol: EmitDeclarationSymbol, fn: () => void, table: "members" | "exports" = "members") { + function withMembers(symbol: EmitDeclarationSymbol, table: "members" | "exports" = "members", fn: () => void) { const old = [currentLocalSymbolTable, currentSymbol] as const; currentSymbol = symbol; currentLocalSymbolTable = symbol[table] ??= new Map(); @@ -287,9 +346,16 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { [currentLocalSymbolTable, currentSymbol] = old; } - function getStatementName(s: InterfaceDeclaration | ClassDeclaration | FunctionDeclaration) { + interface LocalAndExportName { + exportName?: MemberKey; + localName?: MemberKey; + } + function getStatementName(s: TypeAliasDeclaration | EnumDeclaration | InterfaceDeclaration | ClassDeclaration | FunctionDeclaration): undefined | MemberKey | LocalAndExportName { if (hasSyntacticModifier(s, ModifierFlags.Export) && hasSyntacticModifier(s, ModifierFlags.Default)) { - return "@default" as MemberKey; + return { + exportName: "default" as MemberKey, + localName: getMemberKey(s.name), + }; } if (s.name) { return getMemberKey(s.name); @@ -345,7 +411,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { } function bindVariable(d: VariableDeclaration | ParameterDeclaration) { bindTypeExpressions(d.type); - const isExported = isVariableDeclaration(d) && hasSyntacticModifier(d.parent.parent, ModifierFlags.Export); + const isExported = isExportedVariable(d); if (isIdentifier(d.name)) { addLocalAndExportDeclaration(getMemberKey(d.name), d, getSymbolFlagsForNode(d), isExported); } @@ -369,171 +435,280 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { else { Debug.assertNever(d.name); } + function isExportedVariable(d: VariableDeclaration | ParameterDeclaration) { + if (!isVariableDeclaration(d)) return false; + // exported directly + if (hasSyntacticModifier(d.parent.parent, ModifierFlags.Export)) { + return true; + } + // or part of an ambient module declaration + const module = findAncestor(d, isBlockScopedContainerTopLevel); + return !!module && hasAmbientModifier(module); + } } function bindEachFunctionsFirst(nodes: NodeArray | undefined): void { if (!nodes) return; - bindContainer(nodes.filter(n => n.kind === SyntaxKind.FunctionDeclaration)); - bindContainer(nodes.filter(n => n.kind !== SyntaxKind.FunctionDeclaration)); + bindContainer(nodes, n => n.kind === SyntaxKind.FunctionDeclaration); + bindContainer(nodes, n => n.kind !== SyntaxKind.FunctionDeclaration); } + function bindExpandoMembers(expression: Node) { + if (isBinaryExpression(expression) && expression.operatorToken.kind === SyntaxKind.EqualsToken) { + bindExpandoMemberAssignment(expression); + } + forEachChild(expression, node => { + bindExpandoMembers(node); + }); - function bindContainer(statements: NodeArray | Node[]) { - statements.forEach(statement => { - const isExported = hasSyntacticModifier(statement, ModifierFlags.Export); - if (isImportEqualsDeclaration(statement)) { - addLocalOnlyDeclaration(getMemberKey(statement.name), statement, getSymbolFlagsForNode(statement)); - } - if (isImportDeclaration(statement)) { - if (!statement.importClause) { - return; + function bindExpandoMemberAssignment(expression: BinaryExpression) { + const assignmentTarget = expression.left; + const isPropertyAccess = isPropertyAccessExpression(assignmentTarget); + if ( + (isPropertyAccess || isElementAccessExpression(assignmentTarget)) + ) { + let name; + if (isPropertyAccess) { + name = assignmentTarget.name; } - if (statement.importClause.name) { - addLocalOnlyDeclaration(getMemberKey(statement.importClause.name), statement.importClause, getSymbolFlagsForNode(statement.importClause)); + else { + const argumentExpression = assignmentTarget.argumentExpression; + name = factory.createComputedPropertyName(argumentExpression); } - if (statement.importClause.namedBindings) { - const namedBindings = statement.importClause.namedBindings; - if (namedBindings.kind === SyntaxKind.NamedImports) { - namedBindings.elements.forEach(v => { - addLocalOnlyDeclaration(getMemberKey(v.name), v, getSymbolFlagsForNode(v)); - }); - } - else if (namedBindings.kind === SyntaxKind.NamespaceImport) { - addLocalOnlyDeclaration(getMemberKey(namedBindings.name), namedBindings, getSymbolFlagsForNode(namedBindings)); - } - else { - throw new Error("Not supported"); - } + const key = getMemberKey(name); + if (!key || knownFunctionMembers.has(key)) return; + const target = resolveEntityName(expression, assignmentTarget.expression, SymbolFlags.Value | SymbolFlags.ExportValue); + if (!target) return; + const fn = target.declarations.find(canHaveExpandoMembers); + if (!fn) return; + + target.exports ??= new Map(); + if (target.exportSymbol) { + target.exportSymbol.exports = target.exports; } + withScope(fn, target.exports, () => { + const [include, excludes] = syntaxKindToSymbolMap[SyntaxKind.PropertyDeclaration]; + addExportOnlyDeclaration(key, assignmentTarget, [include | SymbolFlags.Assignment, excludes & ~SymbolFlags.Assignment]); + }); } - if (isVariableStatement(statement)) { - statement.declarationList.declarations.forEach(bindVariable); + } + function canHaveExpandoMembers(declaration: Node) { + if (isFunctionDeclaration(declaration)) { + return true; } - if (isFunctionDeclaration(statement)) { - bindTypeParameters(statement.typeParameters); - bindTypeExpressions(statement.type); - withScope(statement, /*exports*/ undefined, () => { - bindTypeExpressions(statement); - statement.parameters.forEach(bindVariable); - }); + else if (isVariableDeclaration(declaration)) { + if (declaration.type || !isVarConst(declaration)) { + return false; + } + if (!(declaration.initializer && isFunctionExpressionOrArrowFunction(declaration.initializer))) { + return false; + } + return true; + } + } + } - addLocalAndExportDeclaration(getStatementName(statement), statement, getSymbolFlagsForNode(statement), isExported); + function bindContainer(statements: NodeArray | Node[], filter: (node: Node) => boolean) { + statements.forEach(statement => { + if (!filter(statement)) return; + bindNode(statement); + }); + } + function bindNode(node: Node | undefined) { + if (!node) return; + const isExported = hasSyntacticModifier(node, ModifierFlags.Export); + if (isExpressionStatement(node)) { + bindExpandoMembers(node.expression); + } + else if (isExpression(node)) { + bindExpandoMembers(node); + } + else if (isImportEqualsDeclaration(node)) { + addLocalOnlyDeclaration(getMemberKey(node.name), node, getSymbolFlagsForNode(node)); + } + else if (isImportDeclaration(node)) { + if (!node.importClause) { + return; } - if (isTypeAliasDeclaration(statement)) { - addLocalAndExportDeclaration(getMemberKey(statement.name), statement, getSymbolFlagsForNode(statement), isExported); - withScope(statement, /*exports*/ undefined, () => { - bindTypeParameters(statement.typeParameters); - }); - bindTypeExpressions(statement.type); + if (node.importClause.name) { + addLocalOnlyDeclaration(getMemberKey(node.importClause.name), node.importClause, getSymbolFlagsForNode(node.importClause)); } - // Default export declarations set isVisible on true on associated symbols in the type checker. - if (isExportAssignment(statement)) { - if (statement.expression && isIdentifier(statement.expression)) { - const name = statement.expression.escapedText; - postBindingAction.push(() => { - const resolvedSymbol = resolveName(statement.expression, name, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias); - if (resolvedSymbol) { - resolvedSymbol.isVisible = true; - resolvedSymbol.declarations.forEach(d => getNodeLinks(d).isVisible = true); - } + if (node.importClause.namedBindings) { + const namedBindings = node.importClause.namedBindings; + if (namedBindings.kind === SyntaxKind.NamedImports) { + namedBindings.elements.forEach(v => { + addLocalOnlyDeclaration(getMemberKey(v.name), v, getSymbolFlagsForNode(v)); }); } + else if (namedBindings.kind === SyntaxKind.NamespaceImport) { + addLocalOnlyDeclaration(getMemberKey(namedBindings.name), namedBindings, getSymbolFlagsForNode(namedBindings)); + } + else { + throw new Error("Not supported"); + } } - if (isExportDeclaration(statement)) { - if (statement.exportClause && isNamedExports(statement.exportClause)) { - const elements = statement.exportClause.elements; - if (statement.moduleSpecifier) { - // TODO is currentExportsSymbolTable ok here? - withScope(statement, /*exports*/ undefined, () => { - elements.forEach(e => { - const [flags, forbiddenFlags] = getSymbolFlagsForNode(e); - addLocalOnlyDeclaration(getMemberKey(e.propertyName ?? e.name), e, [flags | SymbolFlags.ExportValue, forbiddenFlags]); - }); - }); + } + else if (isVariableStatement(node)) { + node.declarationList.declarations.forEach(bindVariable); + } + else if (isVariableDeclarationList(node)) { + node.declarations.forEach(bindVariable); + } + else if (isFunctionDeclaration(node)) { + bindTypeParameters(node.typeParameters); + bindTypeExpressions(node.type); + withScope(node, /*exports*/ undefined, () => { + bindTypeExpressions(node); + node.parameters.forEach(bindVariable); + }); + + addLocalAndExportDeclaration(getStatementName(node), node, getSymbolFlagsForNode(node), isExported); + } + else if (isTypeAliasDeclaration(node)) { + addLocalAndExportDeclaration(getStatementName(node), node, getSymbolFlagsForNode(node), isExported); + withScope(node, /*exports*/ undefined, () => { + bindTypeParameters(node.typeParameters); + }); + bindTypeExpressions(node.type); + } + // Default export declarations set isVisible on true on associated symbols in the type checker. + else if (isExportAssignment(node)) { + if (node.expression && isIdentifier(node.expression)) { + const name = node.expression.escapedText; + postBindingAction.push(() => { + const resolvedSymbol = resolveName(node.expression, name, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias); + if (resolvedSymbol) { + resolvedSymbol.isVisible = true; + resolvedSymbol.declarations.forEach(d => getNodeLinks(d).isVisible = true); } - elements.forEach(e => { - postBindingAction.push(() => { - const resolvedSymbol = resolveName(e, (e.propertyName ?? e.name).escapedText, ~0); - if (resolvedSymbol) { - resolvedSymbol.isVisible = true; - resolvedSymbol.declarations.forEach(d => getNodeLinks(d).isVisible = true); - } + }); + } + } + else if (isExportDeclaration(node)) { + if (node.exportClause && isNamedExports(node.exportClause)) { + const elements = node.exportClause.elements; + if (node.moduleSpecifier) { + // TODO is currentExportsSymbolTable ok here? + withScope(node, /*exports*/ undefined, () => { + elements.forEach(e => { + const [flags, forbiddenFlags] = getSymbolFlagsForNode(e); + addLocalOnlyDeclaration(getMemberKey(e.propertyName ?? e.name), e, [flags | SymbolFlags.ExportValue, forbiddenFlags]); }); }); } - } - if (isEnumDeclaration(statement)) { - addLocalAndExportDeclaration(getMemberKey(statement.name), statement, getSymbolFlagsForNode(statement), isExported); - withScope(statement, /*exports*/ undefined, () => { - statement.members.forEach(m => { - addLocalOnlyDeclaration(getMemberKeyFromElement(m), m, getSymbolFlagsForNode(m)); - }); - }); - } - if (isModuleDeclaration(statement)) { - function bindModuleDeclaration(moduleDeclaration: ModuleDeclaration) { - const name = isIdentifier(moduleDeclaration.name) ? moduleDeclaration.name : undefined; - const moduleSymbol = addLocalAndExportDeclaration(getMemberKey(name), moduleDeclaration, getSymbolFlagsForNode(moduleDeclaration), isExported); - moduleSymbol.exports ??= new Map(); - withScope(moduleDeclaration, moduleSymbol.exports, () => { - if (moduleDeclaration.body) { - if (isModuleBlock(moduleDeclaration.body)) { - const moduleBlock = moduleDeclaration.body; - bindEachFunctionsFirst(moduleBlock.statements); - } - else if (isModuleDeclaration(moduleDeclaration.body)) { - const subModule = moduleDeclaration.body; - bindModuleDeclaration(subModule); - } - else { - throw new Error("Unsupported body type"); - } + elements.forEach(e => { + postBindingAction.push(() => { + const resolvedSymbol = resolveName(e, (e.propertyName ?? e.name).escapedText, ~0); + if (resolvedSymbol) { + resolvedSymbol.isVisible = true; + resolvedSymbol.declarations.forEach(d => getNodeLinks(d).isVisible = true); } }); - } - bindModuleDeclaration(statement); + }); } - if (isInterfaceDeclaration(statement)) { - const interfaceDeclaration = statement; - const interfaceSymbol = addLocalAndExportDeclaration(getMemberKey(interfaceDeclaration.name), interfaceDeclaration, getSymbolFlagsForNode(interfaceDeclaration), isExported); - withScope(interfaceDeclaration, /*exports*/ undefined, () => { - bindTypeParameters(interfaceDeclaration.typeParameters); + } + else if (isEnumDeclaration(node)) { + addLocalAndExportDeclaration(getStatementName(node), node, getSymbolFlagsForNode(node), isExported); + withScope(node, /*exports*/ undefined, () => { + node.members.forEach(m => { + addLocalOnlyDeclaration(getMemberKeyFromElement(m), m, getSymbolFlagsForNode(m)); }); - withMembers(interfaceSymbol, () => { - interfaceDeclaration.members.forEach(m => { - addLocalOnlyDeclaration(getMemberKeyFromElement(m), m, getElementFlagsOrThrow(m)); - bindTypeExpressions(m); - }); + }); + } + else if (isModuleDeclaration(node)) { + function bindModuleDeclaration(moduleDeclaration: ModuleDeclaration) { + const name = isIdentifier(moduleDeclaration.name) ? moduleDeclaration.name : undefined; + const moduleSymbol = addLocalAndExportDeclaration(getMemberKey(name), moduleDeclaration, getSymbolFlagsForNode(moduleDeclaration), isExported); + moduleSymbol.exports ??= new Map(); + withScope(moduleDeclaration, moduleSymbol.exports, () => { + if (moduleDeclaration.body) { + if (isModuleBlock(moduleDeclaration.body)) { + const moduleBlock = moduleDeclaration.body; + bindEachFunctionsFirst(moduleBlock.statements); + } + else if (isModuleDeclaration(moduleDeclaration.body)) { + const subModule = moduleDeclaration.body; + bindModuleDeclaration(subModule); + } + else { + throw new Error("Unsupported body type"); + } + } }); } - - if (isClassDeclaration(statement)) { - const classDeclaration = statement; - const classSymbol = addLocalAndExportDeclaration(getMemberKey(classDeclaration.name), classDeclaration, getSymbolFlagsForNode(classDeclaration), isExported); - withScope(classDeclaration, /*exports*/ undefined, () => { - bindTypeParameters(classDeclaration.typeParameters); + bindModuleDeclaration(node); + } + else if (isInterfaceDeclaration(node)) { + const interfaceDeclaration = node; + const interfaceSymbol = addLocalAndExportDeclaration(getStatementName(interfaceDeclaration), interfaceDeclaration, getSymbolFlagsForNode(interfaceDeclaration), isExported); + withScope(interfaceDeclaration, /*exports*/ undefined, () => { + bindTypeParameters(interfaceDeclaration.typeParameters); + }); + withMembers(interfaceSymbol, "members", () => { + interfaceDeclaration.members.forEach(m => { + addLocalOnlyDeclaration(getMemberKeyFromElement(m), m, getElementFlagsOrThrow(m)); + bindTypeExpressions(m); }); - withMembers(classSymbol, () => { - classDeclaration.members.forEach(m => { - if (hasSyntacticModifier(m, ModifierFlags.Static)) return; - if (m.kind === SyntaxKind.SemicolonClassElement || m.kind === SyntaxKind.ClassStaticBlockDeclaration) return; + }); + } + else if (isClassDeclaration(node)) { + const classDeclaration = node; + const classSymbol = addLocalAndExportDeclaration(getStatementName(classDeclaration), classDeclaration, getSymbolFlagsForNode(classDeclaration), isExported); + withScope(classDeclaration, /*exports*/ undefined, () => { + bindTypeParameters(classDeclaration.typeParameters); + }); + withMembers(classSymbol, "members", () => { + classDeclaration.members.forEach(m => { + if (hasSyntacticModifier(m, ModifierFlags.Static)) return; + if (m.kind === SyntaxKind.SemicolonClassElement || m.kind === SyntaxKind.ClassStaticBlockDeclaration) return; - addLocalOnlyDeclaration(getMemberKeyFromElement(m), m, getElementFlagsOrThrow(m)); - bindTypeExpressions(m); - }); + addLocalOnlyDeclaration(getMemberKeyFromElement(m), m, getElementFlagsOrThrow(m)); + bindTypeExpressions(m); }); - withMembers(classSymbol, () => { - classDeclaration.members.forEach(m => { - if (!hasSyntacticModifier(m, ModifierFlags.Static)) return; - if ( - m.kind === SyntaxKind.SemicolonClassElement - || m.kind === SyntaxKind.ClassStaticBlockDeclaration - ) return; + }); + withMembers(classSymbol, "exports", () => { + classDeclaration.members.forEach(m => { + if (!hasSyntacticModifier(m, ModifierFlags.Static)) return; + if ( + m.kind === SyntaxKind.SemicolonClassElement + || m.kind === SyntaxKind.ClassStaticBlockDeclaration + ) return; - addLocalOnlyDeclaration(getMemberKeyFromElement(m), m, getElementFlagsOrThrow(m)); - bindTypeExpressions(m); - }); - }, "exports"); - } - }); + addLocalOnlyDeclaration(getMemberKeyFromElement(m), m, getElementFlagsOrThrow(m)); + bindTypeExpressions(m); + }); + }); + } + else if (isLabeledStatement(node)) { + bindNode(node.statement); + } + else if (isForStatement(node)) { + withScope(node, /*exports*/ undefined, () => { + bindNode(node.initializer); + bindNode(node.condition); + bindNode(node.incrementor); + bindNode(node.statement); + }); + } + else if (isForInOrOfStatement(node)) { + withScope(node, /*exports*/ undefined, () => { + bindNode(node.initializer); + bindNode(node.expression); + bindNode(node.statement); + }); + } + else if (isWhileStatement(node) || isDoStatement(node)) { + bindNode(node.expression); + bindNode(node.statement); + } + else if (isBlock(node)) { + withScope(node, /*exports*/ undefined, () => { + bindEachFunctionsFirst(node.statements); + }); + } + else if (isIfStatement(node)) { + bindNode(node.expression); + bindNode(node.thenStatement); + bindNode(node.elseStatement); + } } } } diff --git a/src/compiler/transformers/declarations/emitResolver.ts b/src/compiler/transformers/declarations/emitResolver.ts index 9ce43b1994713..a81d7e0dbede2 100644 --- a/src/compiler/transformers/declarations/emitResolver.ts +++ b/src/compiler/transformers/declarations/emitResolver.ts @@ -16,6 +16,7 @@ import { factory, filter, findAncestor, + forEachEntry, FunctionDeclaration, FunctionLikeDeclaration, getAnyImportSyntax, @@ -26,17 +27,15 @@ import { hasDynamicName, hasProperty, hasSyntacticModifier, - Identifier, isAccessor, isBigIntLiteral, - isBinaryExpression, isBindingElement, isDeclarationReadonly, isElementAccessExpression, isEntityNameExpression, isEnumDeclaration, isEnumMember, - isExpressionStatement, + isExpandoPropertyDeclaration, isFunctionDeclaration, isFunctionExpressionOrArrowFunction, isFunctionLike, @@ -50,7 +49,6 @@ import { isPartOfTypeNode, isPrefixUnaryExpression, isPropertyAccessExpression, - isPropertyName, isSetAccessor, isSetAccessorDeclaration, isStringLiteralLike, @@ -63,7 +61,6 @@ import { LateVisibilityPaintedStatement, ModifierFlags, Node, - NodeArray, NodeFlags, nodeIsPresent, NoSubstitutionTemplateLiteral, @@ -75,7 +72,6 @@ import { PropertySignature, skipParentheses, SourceFile, - Statement, SymbolAccessibility, SymbolFlags, SymbolVisibilityResult, @@ -90,21 +86,11 @@ import { } from "./emitBinder"; import { IsolatedEmitResolver, - MemberKey, } from "./types"; -const knownFunctionMembers = new Set([ - "I:apply", - "I:call", - "I:bind", - "I:toString", - "I:prototype", - "I:length", -]); - /** @internal */ export function createEmitDeclarationResolver(file: SourceFile): IsolatedEmitResolver { - const { getNodeLinks, resolveMemberKey, resolveName } = bindSourceFileForDeclarationEmit(file); + const { getNodeLinks, resolveMemberKey, resolveName, resolveEntityName } = bindSourceFileForDeclarationEmit(file); function getEnumValueFromName(name: PropertyName | NoSubstitutionTemplateLiteral, location: EnumDeclaration) { const enumKey = getMemberKey(name); @@ -117,27 +103,6 @@ export function createEmitDeclarationResolver(file: SourceFile): IsolatedEmitRes return undefined; } - function resolveEntityName(location: Node, node: Expression, meaning: SymbolFlags): EmitDeclarationSymbol | 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(getMemberKey(name)); - if (!memberSymbol || !(memberSymbol.flags & meaning)) { - return undefined; - } - return memberSymbol; - } - else { - return undefined; - } - } function isExpressionMemberOfEnum(target: Expression, location: EnumDeclaration) { const symbol = resolveEntityName(location, target, SymbolFlags.Namespace); @@ -279,59 +244,6 @@ export function createEmitDeclarationResolver(file: SourceFile): IsolatedEmitRes } return isIdentifier(expr); } - function getExpandoMembers(declaration: FunctionDeclaration | VariableDeclaration, functionName: Identifier) { - const scope = getParentScope(declaration); - if (!scope) return undefined; - const members = new Set(); - for (const statement of scope.statements) { - // Looking for name functionName.member = init; - if (!isExpressionStatement(statement)) continue; - if (!isBinaryExpression(statement.expression)) continue; - const assignment = statement.expression; - if (assignment.operatorToken.kind !== SyntaxKind.EqualsToken) continue; - - const isPropertyAccess = isPropertyAccessExpression(assignment.left); - if ( - (isPropertyAccess || isElementAccessExpression(assignment.left)) - && isIdentifier(assignment.left.expression) - && assignment.left.expression.escapedText === functionName.escapedText - ) { - let name; - if (isPropertyAccess) { - name = assignment.left.name; - } - else { - const argumentExpression = assignment.left.argumentExpression; - name = factory.createComputedPropertyName(argumentExpression); - } - const key = getMemberKey(name); - if (!key || knownFunctionMembers.has(key)) { - continue; - } - members.add(key); - } - } - return members; - } - - function getDefinedMembers(declaration: FunctionDeclaration | VariableDeclaration, functionName: Identifier) { - const scope = getParentScope(declaration); - if (!scope) return undefined; - const cls = resolveName(scope, functionName.escapedText, SymbolFlags.Class); - - const namespace = resolveName(scope, functionName.escapedText, SymbolFlags.Namespace); - - if (!cls?.exports) { - return namespace?.exports; - } - if (!namespace?.exports) { - return cls.exports; - } - return new Set([ - ...(namespace.exports.keys() ?? []), - ...(cls.exports.keys() ?? []), - ]); - } // Do a best effort to find expando functions function isExpandoFunction(node: FunctionDeclaration | VariableDeclaration) { @@ -339,6 +251,7 @@ export function createEmitDeclarationResolver(file: SourceFile): IsolatedEmitRes if (!declaration) { return false; } + const symbol = declaration.symbol; if (isVariableDeclaration(declaration)) { if (declaration.type || !isVarConst(declaration)) { return false; @@ -347,28 +260,7 @@ export function createEmitDeclarationResolver(file: SourceFile): IsolatedEmitRes return false; } } - - const functionName = node.name; - if (!functionName || !isIdentifier(functionName)) return false; - - const expandoMembers = getExpandoMembers(declaration, functionName); - if (!expandoMembers || expandoMembers.size === 0) return false; - - if (isVariableDeclaration(declaration) && expandoMembers.size) { - return true; - } - const definedMembers = getDefinedMembers(declaration, functionName); - // No namespace definitions, and it has assignments => is Expando function - if (!definedMembers) { - return true; - } - - // Some assigned members are not in the defined the namespaces - // computed members are ignored, since they don't name it to declarations anyway - if ([...expandoMembers.keys()].some(n => !definedMembers.has(n))) { - return true; - } - return false; + return !!symbol.exports && !!forEachEntry(symbol.exports, p => p.flags & SymbolFlags.Value && isExpandoPropertyDeclaration(p.valueDeclaration)); } return { @@ -378,6 +270,9 @@ export function createEmitDeclarationResolver(file: SourceFile): IsolatedEmitRes tryFindAmbientModule() { return undefined; }, + getPropertiesOfContainerFunction(node: FunctionDeclaration | VariableDeclaration) { + return [...node.symbol.exports?.values() ?? []]; + }, getAllAccessorDeclarations(declaration) { const parentLinks = getNodeLinks(declaration.parent); const key = getMemberKey(declaration.name); @@ -658,19 +553,3 @@ export function createEmitDeclarationResolver(file: SourceFile): IsolatedEmitRes }; } } - -function getParentScope(declaration: VariableDeclaration | FunctionDeclaration): - | undefined - | Node & { - statements: NodeArray; - } -{ - let scope: Node = declaration; - while (scope) { - if (hasProperty(scope, "statements")) { - return (scope as any); - } - scope = scope.parent; - } - return undefined; -} diff --git a/src/compiler/transformers/declarations/types.ts b/src/compiler/transformers/declarations/types.ts index d6f13b3f77916..8401469892efa 100644 --- a/src/compiler/transformers/declarations/types.ts +++ b/src/compiler/transformers/declarations/types.ts @@ -47,4 +47,5 @@ export interface IsolatedEmitResolver { getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined; getAllAccessorDeclarations(declaration: AccessorDeclaration): AllAccessorDeclarations; tryFindAmbientModule(moduleReferenceExpression: Expression): Symbol | undefined; + getPropertiesOfContainerFunction(node: FunctionDeclaration | VariableDeclaration): Symbol[] } From c0d67268f149bdd6e02ee9e669d679b6d7b7a272 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 27 Nov 2023 09:18:20 -0500 Subject: [PATCH 152/224] Updated baseline. And added more tests. Signed-off-by: Titian Cernicova-Dragomir --- .../expandoFunctionNestedAssigments.js | 117 ++++++++ .../expandoFunctionNestedAssigments.symbols | 125 +++++++++ .../expandoFunctionNestedAssigments.types | 180 +++++++++++++ ...expandoFunctionNestedAssigmentsDeclared.js | 143 ++++++++++ ...doFunctionNestedAssigmentsDeclared.symbols | 198 ++++++++++++++ ...andoFunctionNestedAssigmentsDeclared.types | 253 ++++++++++++++++++ ...efaultExportWithStaticAssignment.d.ts.diff | 33 +-- ...onEmitExpandoPropertyPrivateName.d.ts.diff | 6 +- ...onEmitFunctionDuplicateNamespace.d.ts.diff | 6 +- ...clarationEmitFunctionKeywordProp.d.ts.diff | 30 ++- ...larationEmitLateBoundAssignments.d.ts.diff | 22 +- ...arationEmitLateBoundAssignments2.d.ts.diff | 60 ++--- .../expandoFunctionNestedAssigments.d.ts.diff | 158 +++++++++++ .../diff/exportDefaultNamespace.d.ts.diff | 6 +- ...tionMemberAssignmentDeclarations.d.ts.diff | 13 +- .../diff/nullPropertyName.d.ts.diff | 241 ++++++++++++++++- .../typeFromPropertyAssignment29.d.ts.diff | 53 ++-- ...EmitDefaultExportWithStaticAssignment.d.ts | 31 ++- ...arationEmitExpandoPropertyPrivateName.d.ts | 6 +- ...arationEmitFunctionDuplicateNamespace.d.ts | 6 +- .../declarationEmitFunctionKeywordProp.d.ts | 28 +- .../declarationEmitLateBoundAssignments.d.ts | 20 +- .../declarationEmitLateBoundAssignments2.d.ts | 60 ++--- .../dte/expandoFunctionNestedAssigments.d.ts | 172 ++++++++++++ .../dte/exportDefaultNamespace.d.ts | 6 +- ...dFunctionMemberAssignmentDeclarations.d.ts | 11 +- .../auto-fixed/dte/nullPropertyName.d.ts | 239 ++++++++++++++++- .../dte/typeFromPropertyAssignment29.d.ts | 29 +- .../tsc/expandoFunctionNestedAssigments.d.ts | 82 ++++++ .../contextualReturnTypeOfIIFE2.d.ts.diff | 6 +- .../typeFromPropertyAssignment32.d.ts.diff | 61 +++++ .../typeFromPropertyAssignment33.d.ts.diff | 65 +++++ .../dte/typeFromPropertyAssignment32.d.ts | 131 +++++++++ .../dte/typeFromPropertyAssignment33.d.ts | 135 ++++++++++ .../tsc/contextualReturnTypeOfIIFE2.d.ts | 6 +- .../tsc/typeFromPropertyAssignment32.d.ts | 113 ++++++++ .../tsc/typeFromPropertyAssignment33.d.ts | 117 ++++++++ .../expandoFunctionNestedAssigments.ts | 49 ++++ ...expandoFunctionNestedAssigmentsDeclared.ts | 74 +++++ .../salsa/typeFromPropertyAssignment32.ts | 1 + .../salsa/typeFromPropertyAssignment33.ts | 1 + 41 files changed, 2892 insertions(+), 201 deletions(-) create mode 100644 tests/baselines/reference/expandoFunctionNestedAssigments.js create mode 100644 tests/baselines/reference/expandoFunctionNestedAssigments.symbols create mode 100644 tests/baselines/reference/expandoFunctionNestedAssigments.types create mode 100644 tests/baselines/reference/expandoFunctionNestedAssigmentsDeclared.js create mode 100644 tests/baselines/reference/expandoFunctionNestedAssigmentsDeclared.symbols create mode 100644 tests/baselines/reference/expandoFunctionNestedAssigmentsDeclared.types create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionNestedAssigments.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionNestedAssigments.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionNestedAssigments.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment32.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment33.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment32.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment33.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment32.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment33.d.ts create mode 100644 tests/cases/compiler/expandoFunctionNestedAssigments.ts create mode 100644 tests/cases/compiler/expandoFunctionNestedAssigmentsDeclared.ts diff --git a/tests/baselines/reference/expandoFunctionNestedAssigments.js b/tests/baselines/reference/expandoFunctionNestedAssigments.js new file mode 100644 index 0000000000000..fb1f2f87a9667 --- /dev/null +++ b/tests/baselines/reference/expandoFunctionNestedAssigments.js @@ -0,0 +1,117 @@ +//// [tests/cases/compiler/expandoFunctionNestedAssigments.ts] //// + +//// [expandoFunctionNestedAssigments.ts] +function Foo(): 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; + } +} + +//// [expandoFunctionNestedAssigments.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; + } +} + + +//// [expandoFunctionNestedAssigments.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/expandoFunctionNestedAssigments.symbols b/tests/baselines/reference/expandoFunctionNestedAssigments.symbols new file mode 100644 index 0000000000000..948e18a06addd --- /dev/null +++ b/tests/baselines/reference/expandoFunctionNestedAssigments.symbols @@ -0,0 +1,125 @@ +//// [tests/cases/compiler/expandoFunctionNestedAssigments.ts] //// + +=== expandoFunctionNestedAssigments.ts === +function Foo(): void { +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 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, 4, 12)) +>Foo.bla : Symbol(Foo.bla, Decl(expandoFunctionNestedAssigments.ts, 4, 1)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>bla : Symbol(Foo.bla, Decl(expandoFunctionNestedAssigments.ts, 4, 1)) +>foo : Symbol(foo, Decl(expandoFunctionNestedAssigments.ts, 4, 12)) +>foo : Symbol(foo, Decl(expandoFunctionNestedAssigments.ts, 4, 12)) +>Foo.baz : Symbol(Foo.baz, Decl(expandoFunctionNestedAssigments.ts, 4, 29)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>baz : Symbol(Foo.baz, Decl(expandoFunctionNestedAssigments.ts, 4, 29)) +>Foo.bar : Symbol(Foo.bar, Decl(expandoFunctionNestedAssigments.ts, 4, 45)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>bar : Symbol(Foo.bar, Decl(expandoFunctionNestedAssigments.ts, 4, 45)) + +if(Foo.fromIf = 1) { +>Foo.fromIf : Symbol(Foo.fromIf, Decl(expandoFunctionNestedAssigments.ts, 6, 3)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>fromIf : Symbol(Foo.fromIf, Decl(expandoFunctionNestedAssigments.ts, 6, 3)) + + Foo.inIf = 1; +>Foo.inIf : Symbol(Foo.inIf, Decl(expandoFunctionNestedAssigments.ts, 6, 20)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>inIf : Symbol(Foo.inIf, Decl(expandoFunctionNestedAssigments.ts, 6, 20)) +} + +while(Foo.fromWhileCondition = 1) { +>Foo.fromWhileCondition : Symbol(Foo.fromWhileCondition, Decl(expandoFunctionNestedAssigments.ts, 10, 6)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>fromWhileCondition : Symbol(Foo.fromWhileCondition, Decl(expandoFunctionNestedAssigments.ts, 10, 6)) + + Foo.fromWhileBody = 1; +>Foo.fromWhileBody : Symbol(Foo.fromWhileBody, Decl(expandoFunctionNestedAssigments.ts, 10, 35)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>fromWhileBody : Symbol(Foo.fromWhileBody, Decl(expandoFunctionNestedAssigments.ts, 10, 35)) + { + Foo.fromWhileBodyNested = 1; +>Foo.fromWhileBodyNested : Symbol(Foo.fromWhileBodyNested, Decl(expandoFunctionNestedAssigments.ts, 12, 5)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>fromWhileBodyNested : Symbol(Foo.fromWhileBodyNested, Decl(expandoFunctionNestedAssigments.ts, 12, 5)) + } +} + +do { + Foo.fromDoBody = 1; +>Foo.fromDoBody : Symbol(Foo.fromDoBody, Decl(expandoFunctionNestedAssigments.ts, 17, 4)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>fromDoBody : Symbol(Foo.fromDoBody, Decl(expandoFunctionNestedAssigments.ts, 17, 4)) + { + Foo.fromDoBodyNested = 1; +>Foo.fromDoBodyNested : Symbol(Foo.fromDoBodyNested, Decl(expandoFunctionNestedAssigments.ts, 19, 5)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>fromDoBodyNested : Symbol(Foo.fromDoBodyNested, Decl(expandoFunctionNestedAssigments.ts, 19, 5)) + } +} while(Foo.fromDoCondition = 1); +>Foo.fromDoCondition : Symbol(Foo.fromDoCondition, Decl(expandoFunctionNestedAssigments.ts, 22, 8)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>fromDoCondition : Symbol(Foo.fromDoCondition, Decl(expandoFunctionNestedAssigments.ts, 22, 8)) + +for(Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1){ +>Foo.forInit : Symbol(Foo.forInit, Decl(expandoFunctionNestedAssigments.ts, 24, 4)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>forInit : Symbol(Foo.forInit, Decl(expandoFunctionNestedAssigments.ts, 24, 4)) +>Foo.forCond : Symbol(Foo.forCond, Decl(expandoFunctionNestedAssigments.ts, 24, 22)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>forCond : Symbol(Foo.forCond, Decl(expandoFunctionNestedAssigments.ts, 24, 22)) +>Foo.forIncr : Symbol(Foo.forIncr, Decl(expandoFunctionNestedAssigments.ts, 24, 43)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>forIncr : Symbol(Foo.forIncr, Decl(expandoFunctionNestedAssigments.ts, 24, 43)) + + Foo.fromForBody = 1; +>Foo.fromForBody : Symbol(Foo.fromForBody, Decl(expandoFunctionNestedAssigments.ts, 24, 61)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>fromForBody : Symbol(Foo.fromForBody, Decl(expandoFunctionNestedAssigments.ts, 24, 61)) + { + Foo.fromForBodyNested = 1; +>Foo.fromForBodyNested : Symbol(Foo.fromForBodyNested, Decl(expandoFunctionNestedAssigments.ts, 26, 5)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>fromForBodyNested : Symbol(Foo.fromForBodyNested, Decl(expandoFunctionNestedAssigments.ts, 26, 5)) + } +} + +for(let f of (Foo.forOf = []) ){ +>f : Symbol(f, Decl(expandoFunctionNestedAssigments.ts, 31, 7)) +>Foo.forOf : Symbol(Foo.forOf, Decl(expandoFunctionNestedAssigments.ts, 31, 14)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>forOf : Symbol(Foo.forOf, Decl(expandoFunctionNestedAssigments.ts, 31, 14)) + + Foo.fromForOfBody = 1; +>Foo.fromForOfBody : Symbol(Foo.fromForOfBody, Decl(expandoFunctionNestedAssigments.ts, 31, 32)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>fromForOfBody : Symbol(Foo.fromForOfBody, Decl(expandoFunctionNestedAssigments.ts, 31, 32)) + { + Foo.fromForOfBodyNested = 1; +>Foo.fromForOfBodyNested : Symbol(Foo.fromForOfBodyNested, Decl(expandoFunctionNestedAssigments.ts, 33, 5)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>fromForOfBodyNested : Symbol(Foo.fromForOfBodyNested, Decl(expandoFunctionNestedAssigments.ts, 33, 5)) + } +} + + +for(let f in (Foo.forIn = []) ){ +>f : Symbol(f, Decl(expandoFunctionNestedAssigments.ts, 39, 7)) +>Foo.forIn : Symbol(Foo.forIn, Decl(expandoFunctionNestedAssigments.ts, 39, 14)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>forIn : Symbol(Foo.forIn, Decl(expandoFunctionNestedAssigments.ts, 39, 14)) + + Foo.fromForInBody = 1; +>Foo.fromForInBody : Symbol(Foo.fromForInBody, Decl(expandoFunctionNestedAssigments.ts, 39, 32)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>fromForInBody : Symbol(Foo.fromForInBody, Decl(expandoFunctionNestedAssigments.ts, 39, 32)) + { + Foo.fromForInBodyNested = 1; +>Foo.fromForInBodyNested : Symbol(Foo.fromForInBodyNested, Decl(expandoFunctionNestedAssigments.ts, 41, 5)) +>Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>fromForInBodyNested : Symbol(Foo.fromForInBodyNested, Decl(expandoFunctionNestedAssigments.ts, 41, 5)) + } +} diff --git a/tests/baselines/reference/expandoFunctionNestedAssigments.types b/tests/baselines/reference/expandoFunctionNestedAssigments.types new file mode 100644 index 0000000000000..cba2aadd3d754 --- /dev/null +++ b/tests/baselines/reference/expandoFunctionNestedAssigments.types @@ -0,0 +1,180 @@ +//// [tests/cases/compiler/expandoFunctionNestedAssigments.ts] //// + +=== expandoFunctionNestedAssigments.ts === +function Foo(): void { +>Foo : typeof Foo + +} + +(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/isolated-declarations/auto-fixed/diff/declarationEmitDefaultExportWithStaticAssignment.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDefaultExportWithStaticAssignment.d.ts.diff index 0efd87f4300da..0ba848b2c0ef7 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -4,35 +4,66 @@ +@@ -4,35 +4,69 @@ export declare class Foo { } //# sourceMappingURL=foo.d.ts.map @@ -48,10 +48,11 @@ +//# sourceMappingURL=index4.d.ts.map +/// [Errors] //// + -+index1.ts(2,25): error TS9009: 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(3,25): error TS9009: 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(2,25): error TS9009: 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(5,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++index1.ts(3,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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) ==== @@ -60,37 +61,39 @@ +==== index1.ts (1 errors) ==== + import {Foo} from './foo'; + export default function Example(): void {} -+ ~~~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + Example.Foo = Foo ++ ~~~~~~~~~~~ ++!!! error TS9009: 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 {} -+ ~~~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + Example.Foo = Foo ++ ~~~~~~~~~~~ ++!!! error TS9009: 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 {} -+ ~~~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + Example.Bar = Bar ++ ~~~~~~~~~~~ ++!!! error TS9009: 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 (1 errors) ==== ++==== index4.ts (2 errors) ==== + function A() { } + + function B() { } + + export function C(): any { -+ ~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + return null; + } + + C.A = A; -+ C.B = B; ++ ~~~ ++!!! error TS9009: 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 TS9009: 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/declarationEmitExpandoPropertyPrivateName.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitExpandoPropertyPrivateName.d.ts.diff index fee42ef503d45..05c56888cd37a 100644 --- 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 @@ -15,8 +15,8 @@ +//# sourceMappingURL=b.d.ts.map /// [Errors] //// -+b.ts(3,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 TS9009: 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) ==== @@ -27,10 +27,10 @@ import {f} from "./a"; export function q(): void {} -+ ~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. q.val = f(); ~~~~~ !!! error TS4032: Property 'val' of exported interface has or is using name 'I' from private module '"a"'. ++ ~~~~~ ++!!! error TS9009: 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/declarationEmitFunctionDuplicateNamespace.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitFunctionDuplicateNamespace.d.ts.diff index 0531f3e9527f5..e72eb1bca6e7f 100644 --- 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 @@ -18,18 +18,18 @@ +//# sourceMappingURL=declarationEmitFunctionDuplicateNamespace.d.ts.map +/// [Errors] //// + -+declarationEmitFunctionDuplicateNamespace.ts(2,10): error TS9009: 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(7,1): error TS9009: 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; -+ ~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + function f(a: 0 | 1) { + return a; + } + + f.x = 2; ++ ~~~ ++!!! error TS9009: 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 index ca81448065a12..c7b89b58a426c 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,20 +1,31 @@ +@@ -1,20 +1,37 @@ //// [declarationEmitFunctionKeywordProp.d.ts] @@ -30,26 +30,32 @@ +//# sourceMappingURL=declarationEmitFunctionKeywordProp.d.ts.map +/// [Errors] //// + -+declarationEmitFunctionKeywordProp.ts(1,10): error TS9009: 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(4,10): error TS9009: 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(8,10): error TS9009: 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(2,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 (3 errors) ==== ++==== declarationEmitFunctionKeywordProp.ts (5 errors) ==== + function foo(): void {} -+ ~~~ -+!!! error TS9009: 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 = true; ++ ~~~~~~~~ ++!!! error TS9009: 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 {} -+ ~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + bar.async = true; ++ ~~~~~~~~~ ++!!! error TS9009: 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 TS9009: 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 {} -+ ~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + baz.class = true; -+ baz.normal = false; ++ ~~~~~~~~~ ++!!! error TS9009: 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 TS9009: 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/declarationEmitLateBoundAssignments.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitLateBoundAssignments.d.ts.diff index 69f1cf0843ab2..1b0fc18ca895e 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,9 +1,28 @@ +@@ -1,9 +1,40 @@ //// [declarationEmitLateBoundAssignments.d.ts] @@ -19,22 +19,34 @@ +//# sourceMappingURL=declarationEmitLateBoundAssignments.d.ts.map +/// [Errors] //// + -+declarationEmitLateBoundAssignments.ts(1,17): error TS9009: 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(2,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 (1 errors) ==== ++==== declarationEmitLateBoundAssignments.ts (5 errors) ==== + export function foo(): void {} -+ ~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.bar = 12; ++ ~~~~~~~ ++!!! error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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]; 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 index 45cab14944431..f784b50ea72af 100644 --- 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 @@ -47,16 +47,16 @@ +//# sourceMappingURL=declarationEmitLateBoundAssignments2.d.ts.map +/// [Errors] //// + -+declarationEmitLateBoundAssignments2.ts(9,17): error TS9009: 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(12,17): error TS9009: 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(15,17): error TS9009: 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(18,17): error TS9009: 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(21,17): error TS9009: 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(24,17): error TS9009: 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(27,17): error TS9009: 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(30,17): error TS9009: 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(33,17): error TS9009: 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(36,17): error TS9009: 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,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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) ==== @@ -69,54 +69,54 @@ + const emoji = "🤷‍♂️" + + export function decl(): void {} -+ ~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl["B"] = 'foo' ++ ~~~~~~~~~ ++!!! error TS9009: 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 {} -+ ~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl2[c] = 0 ++ ~~~~~~~~ ++!!! error TS9009: 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 {} -+ ~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl3[77] = 0 ++ ~~~~~~~~~ ++!!! error TS9009: 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 {} -+ ~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl4[num] = 0 ++ ~~~~~~~~~~ ++!!! error TS9009: 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 {} -+ ~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl5["101"] = 0 ++ ~~~~~~~~~~~~ ++!!! error TS9009: 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 {} -+ ~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl6[numStr] = 0 ++ ~~~~~~~~~~~~~ ++!!! error TS9009: 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 {} -+ ~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl7["qwe rty"] = 0 ++ ~~~~~~~~~~~~~~~~ ++!!! error TS9009: 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 {} -+ ~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl8[withWhitespace] = 0 ++ ~~~~~~~~~~~~~~~~~~~~~ ++!!! error TS9009: 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 {} -+ ~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl9["🤪"] = 0 ++ ~~~~~~~~~~~ ++!!! error TS9009: 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 {} -+ ~~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + decl10[emoji] = 0 ++ ~~~~~~~~~~~~~ ++!!! error TS9009: 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 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..3a83bb0a36341 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionNestedAssigments.d.ts.diff @@ -0,0 +1,158 @@ +// [[Reason: Function declarations are not fixed]] //// + +//// [tests/cases/compiler/expandoFunctionNestedAssigments.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,31 +1,121 @@ + + + //// [expandoFunctionNestedAssigments.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; +-} +-//# sourceMappingURL=expandoFunctionNestedAssigments.d.ts.map +\ No newline at end of file ++//# sourceMappingURL=expandoFunctionNestedAssigments.d.ts.map ++/// [Errors] //// ++ ++expandoFunctionNestedAssigments.ts(5,2): error TS9009: 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(5,30): error TS9009: 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(5,46): error TS9009: 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,4): error TS9009: 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(8,5): error TS9009: 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,7): error TS9009: 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(12,5): error TS9009: 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,9): error TS9009: 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(19,5): error TS9009: 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(21,9): error TS9009: 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(23,9): error TS9009: 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 TS9009: 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,23): error TS9009: 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,45): error TS9009: 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(26,5): error TS9009: 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(28,9): error TS9009: 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,15): error TS9009: 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(33,5): error TS9009: 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(35,9): error TS9009: 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(40,15): error TS9009: 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,5): error TS9009: 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(43,9): error TS9009: 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 (22 errors) ==== ++ function Foo(): void { ++ ++ } ++ ++ (Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0); ++ ~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ~~~~~~~ ++!!! error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ~~~~~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++ ~~~~~~~~~~~ ++!!! error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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/exportDefaultNamespace.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/exportDefaultNamespace.d.ts.diff index 3cb88f6918909..c4061aa1bea42 100644 --- 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 @@ -20,16 +20,16 @@ +//# sourceMappingURL=exportDefaultNamespace.d.ts.map +/// [Errors] //// + -+exportDefaultNamespace.ts(1,25): error TS9009: 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(5,1): error TS9009: 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 { -+ ~~~~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + return 'hello!'; + } + + someFunc.someProp = 'yo'; ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS9009: 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/lateBoundFunctionMemberAssignmentDeclarations.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/lateBoundFunctionMemberAssignmentDeclarations.d.ts.diff index d82c7b8ae1c54..b2397abe167ab 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,8 +1,20 @@ +@@ -1,8 +1,23 @@ //// [index.d.ts] @@ -18,16 +18,19 @@ +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + -+index.ts(1,17): error TS9009: 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,1): error TS9009: 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 TS9009: 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 (1 errors) ==== ++==== index.ts (2 errors) ==== + export function foo(): void {} -+ ~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + foo.bar = 12; ++ ~~~~~~~ ++!!! error TS9009: 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 TS9009: 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]; + 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 index 4ac968f820fc2..c88c213669622 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,86 +1,96 @@ +@@ -1,86 +1,327 @@ //// [nullPropertyName.d.ts] @@ -96,93 +96,324 @@ +//# sourceMappingURL=nullPropertyName.d.ts.map +/// [Errors] //// + -+nullPropertyName.ts(1,10): error TS9009: 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(3,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 (1 errors) ==== ++==== nullPropertyName.ts (78 errors) ==== + function foo(): void {} -+ ~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + // properties + foo.x = 1; ++ ~~~~~ ++!!! error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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/typeFromPropertyAssignment29.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment29.d.ts.diff index 93690a4cf2d71..05aa3b0763da6 100644 --- 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 @@ -46,7 +46,7 @@ export {}; } declare var ExpandoExpr2: (n: number) => string; -@@ -55,33 +42,36 @@ +@@ -55,37 +42,43 @@ declare class ExpandoClass { n: number; } @@ -61,10 +61,11 @@ //# sourceMappingURL=typeFromPropertyAssignment29.d.ts.map /// [Errors] //// -+typeFromPropertyAssignment29.ts(1,10): error TS9009: 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(41,10): error TS9009: 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(53,10): error TS9009: 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(66,14): error TS9009: 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(4,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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,30): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. @@ -81,48 +82,50 @@ -==== typeFromPropertyAssignment29.ts (12 errors) ==== -+==== typeFromPropertyAssignment29.ts (17 errors) ==== ++==== typeFromPropertyAssignment29.ts (18 errors) ==== function ExpandoDecl(n: number): string { -+ ~~~~~~~~~~~ -+!!! error TS9009: 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.toString(); } ExpandoDecl.prop = 2 ++ ~~~~~~~~~~~~~~~~ ++!!! error TS9009: 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) { -@@ -120,8 +110,10 @@ - ++ ~~~~~~~~~~~~~ ++!!! error TS9009: 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 - function ExpandoNested(n: number): { -+ ~~~~~~~~~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - (m: number): number; - total: number; - } { - const nested = function (m: number) { -@@ -132,8 +124,10 @@ +@@ -130,13 +123,17 @@ + nested.total = n + 1_000_000; + return nested; } ExpandoNested.also = -1; ++ ~~~~~~~~~~~~~~~~~~ ++!!! error TS9009: 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 { -+ ~~~~~~~~~~~~ -+!!! error TS9009: 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 * 100; } ExpandoMerge.p1 = 111 ++ ~~~~~~~~~~~~~~~ ++!!! error TS9009: 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 { -@@ -145,8 +139,10 @@ - var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); +@@ -146,8 +143,10 @@ namespace Ns { function ExpandoNamespace(): void {} -+ ~~~~~~~~~~~~~~~~ -+!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ExpandoNamespace.p6 = 42; ++ ~~~~~~~~~~~~~~~~~~~ ++!!! error TS9009: 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 +185,10 @@ + } +@@ -189,8 +188,10 @@ !!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. // Class expressions shouldn't work in typescript either 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 index 95ff1b7207243..51818a7074b3a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDefaultExportWithStaticAssignment.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDefaultExportWithStaticAssignment.d.ts @@ -58,10 +58,11 @@ export declare function C(): any; //# sourceMappingURL=index4.d.ts.map /// [Errors] //// -index1.ts(2,25): error TS9009: 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(3,25): error TS9009: 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(2,25): error TS9009: 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(5,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +index1.ts(3,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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) ==== @@ -70,36 +71,38 @@ index4.ts(5,17): error TS9009: Assigning properties to functions without declari ==== index1.ts (1 errors) ==== import {Foo} from './foo'; export default function Example(): void {} - ~~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. Example.Foo = Foo + ~~~~~~~~~~~ +!!! error TS9009: 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 {} - ~~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. Example.Foo = Foo + ~~~~~~~~~~~ +!!! error TS9009: 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 {} - ~~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. Example.Bar = Bar + ~~~~~~~~~~~ +!!! error TS9009: 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 (1 errors) ==== +==== index4.ts (2 errors) ==== function A() { } function B() { } export function C(): any { - ~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. return null; } C.A = A; - C.B = B; \ No newline at end of file + ~~~ +!!! error TS9009: 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 TS9009: 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/declarationEmitExpandoPropertyPrivateName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoPropertyPrivateName.d.ts index c17c63acb1874..1fb7d6fb34781 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoPropertyPrivateName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoPropertyPrivateName.d.ts @@ -25,8 +25,8 @@ export declare function q(): void; //# sourceMappingURL=b.d.ts.map /// [Errors] //// -b.ts(3,17): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 TS9009: 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) ==== @@ -36,9 +36,9 @@ b.ts(4,1): error TS4032: Property 'val' of exported interface has or is using na import {f} from "./a"; export function q(): void {} - ~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. q.val = f(); ~~~~~ !!! error TS4032: Property 'val' of exported interface has or is using name 'I' from private module '"a"'. + ~~~~~ +!!! error TS9009: 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/declarationEmitFunctionDuplicateNamespace.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionDuplicateNamespace.d.ts index 048af99b0c1da..18e083348ca13 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionDuplicateNamespace.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionDuplicateNamespace.d.ts @@ -20,17 +20,17 @@ declare function f(a: 1): 1; //# sourceMappingURL=declarationEmitFunctionDuplicateNamespace.d.ts.map /// [Errors] //// -declarationEmitFunctionDuplicateNamespace.ts(2,10): error TS9009: 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(7,1): error TS9009: 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; - ~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. function f(a: 0 | 1) { return a; } f.x = 2; + ~~~ +!!! error TS9009: 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 index a9429cd641c04..cb32568b3490d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionKeywordProp.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionKeywordProp.d.ts @@ -23,25 +23,31 @@ declare function baz(): void; //# sourceMappingURL=declarationEmitFunctionKeywordProp.d.ts.map /// [Errors] //// -declarationEmitFunctionKeywordProp.ts(1,10): error TS9009: 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(4,10): error TS9009: 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(8,10): error TS9009: 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(2,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 (3 errors) ==== +==== declarationEmitFunctionKeywordProp.ts (5 errors) ==== function foo(): void {} - ~~~ -!!! error TS9009: 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 = true; + ~~~~~~~~ +!!! error TS9009: 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 {} - ~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. bar.async = true; + ~~~~~~~~~ +!!! error TS9009: 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 TS9009: 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 {} - ~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. baz.class = true; - baz.normal = false; \ No newline at end of file + ~~~~~~~~~ +!!! error TS9009: 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 TS9009: 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/declarationEmitLateBoundAssignments.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments.d.ts index 1b199b4532690..5870faeb376be 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments.d.ts @@ -26,22 +26,34 @@ export declare function foo(): void; //# sourceMappingURL=declarationEmitLateBoundAssignments.d.ts.map /// [Errors] //// -declarationEmitLateBoundAssignments.ts(1,17): error TS9009: 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(2,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 (1 errors) ==== +==== declarationEmitLateBoundAssignments.ts (5 errors) ==== export function foo(): void {} - ~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. foo.bar = 12; + ~~~~~~~ +!!! error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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]; 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 index fb3f010b6a3f3..15a6f7e0c2963 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts @@ -158,16 +158,16 @@ export declare const arrow10: { //# sourceMappingURL=declarationEmitLateBoundAssignments2.d.ts.map /// [Errors] //// -declarationEmitLateBoundAssignments2.ts(9,17): error TS9009: 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(12,17): error TS9009: 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(15,17): error TS9009: 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(18,17): error TS9009: 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(21,17): error TS9009: 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(24,17): error TS9009: 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(27,17): error TS9009: 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(30,17): error TS9009: 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(33,17): error TS9009: 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(36,17): error TS9009: 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,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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) ==== @@ -180,54 +180,54 @@ declarationEmitLateBoundAssignments2.ts(36,17): error TS9009: Assigning properti const emoji = "🤷‍♂️" export function decl(): void {} - ~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. decl["B"] = 'foo' + ~~~~~~~~~ +!!! error TS9009: 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 {} - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. decl2[c] = 0 + ~~~~~~~~ +!!! error TS9009: 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 {} - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. decl3[77] = 0 + ~~~~~~~~~ +!!! error TS9009: 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 {} - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. decl4[num] = 0 + ~~~~~~~~~~ +!!! error TS9009: 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 {} - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. decl5["101"] = 0 + ~~~~~~~~~~~~ +!!! error TS9009: 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 {} - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. decl6[numStr] = 0 + ~~~~~~~~~~~~~ +!!! error TS9009: 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 {} - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. decl7["qwe rty"] = 0 + ~~~~~~~~~~~~~~~~ +!!! error TS9009: 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 {} - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. decl8[withWhitespace] = 0 + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9009: 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 {} - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. decl9["🤪"] = 0 + ~~~~~~~~~~~ +!!! error TS9009: 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 {} - ~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. decl10[emoji] = 0 + ~~~~~~~~~~~~~ +!!! error TS9009: 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 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..4e9502e186a03 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionNestedAssigments.d.ts @@ -0,0 +1,172 @@ +//// [tests/cases/compiler/expandoFunctionNestedAssigments.ts] //// + +//// [expandoFunctionNestedAssigments.ts] +function Foo(): 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; +//# sourceMappingURL=expandoFunctionNestedAssigments.d.ts.map +/// [Errors] //// + +expandoFunctionNestedAssigments.ts(5,2): error TS9009: 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(5,30): error TS9009: 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(5,46): error TS9009: 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,4): error TS9009: 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(8,5): error TS9009: 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,7): error TS9009: 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(12,5): error TS9009: 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,9): error TS9009: 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(19,5): error TS9009: 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(21,9): error TS9009: 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(23,9): error TS9009: 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 TS9009: 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,23): error TS9009: 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,45): error TS9009: 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(26,5): error TS9009: 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(28,9): error TS9009: 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,15): error TS9009: 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(33,5): error TS9009: 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(35,9): error TS9009: 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(40,15): error TS9009: 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,5): error TS9009: 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(43,9): error TS9009: 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 (22 errors) ==== + function Foo(): void { + + } + + (Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0); + ~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ~~~~~~~ +!!! error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ~~~~~~~~~~~ +!!! error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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/exportDefaultNamespace.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportDefaultNamespace.d.ts index 27659536e26e9..f0638fc126207 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportDefaultNamespace.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportDefaultNamespace.d.ts @@ -17,15 +17,15 @@ export default function someFunc(): string; //# sourceMappingURL=exportDefaultNamespace.d.ts.map /// [Errors] //// -exportDefaultNamespace.ts(1,25): error TS9009: 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(5,1): error TS9009: 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 { - ~~~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. return 'hello!'; } someFunc.someProp = 'yo'; + ~~~~~~~~~~~~~~~~~ +!!! error TS9009: 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/lateBoundFunctionMemberAssignmentDeclarations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/lateBoundFunctionMemberAssignmentDeclarations.d.ts index 1c3fe0024b07e..226cb257f6a08 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/lateBoundFunctionMemberAssignmentDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/lateBoundFunctionMemberAssignmentDeclarations.d.ts @@ -18,16 +18,19 @@ export declare function foo(): void; //# sourceMappingURL=index.d.ts.map /// [Errors] //// -index.ts(1,17): error TS9009: 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,1): error TS9009: 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 TS9009: 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 (1 errors) ==== +==== index.ts (2 errors) ==== export function foo(): void {} - ~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. foo.bar = 12; + ~~~~~~~ +!!! error TS9009: 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 TS9009: 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/nullPropertyName.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nullPropertyName.d.ts index 7d341991e7448..f480df427ef10 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nullPropertyName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nullPropertyName.d.ts @@ -94,92 +94,323 @@ declare function foo(): void; //# sourceMappingURL=nullPropertyName.d.ts.map /// [Errors] //// -nullPropertyName.ts(1,10): error TS9009: 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(3,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 (1 errors) ==== +==== nullPropertyName.ts (78 errors) ==== function foo(): void {} - ~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. // properties foo.x = 1; + ~~~~~ +!!! error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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/typeFromPropertyAssignment29.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts index cb7e23d0afe9b..4fc606253920c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts @@ -157,10 +157,11 @@ declare var n: number; //# sourceMappingURL=typeFromPropertyAssignment29.d.ts.map /// [Errors] //// -typeFromPropertyAssignment29.ts(1,10): error TS9009: 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(41,10): error TS9009: 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(53,10): error TS9009: 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(66,14): error TS9009: 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(4,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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,30): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. @@ -176,14 +177,16 @@ typeFromPropertyAssignment29.ts(101,30): error TS2339: Property 'prop' does not typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. -==== typeFromPropertyAssignment29.ts (17 errors) ==== +==== typeFromPropertyAssignment29.ts (18 errors) ==== function ExpandoDecl(n: number): string { - ~~~~~~~~~~~ -!!! error TS9009: 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.toString(); } ExpandoDecl.prop = 2 + ~~~~~~~~~~~~~~~~ +!!! error TS9009: 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 TS9009: 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 @@ -220,8 +223,6 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi } function ExpandoNested(n: number): { - ~~~~~~~~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. (m: number): number; total: number; } { @@ -232,13 +233,15 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi return nested; } ExpandoNested.also = -1; + ~~~~~~~~~~~~~~~~~~ +!!! error TS9009: 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 { - ~~~~~~~~~~~~ -!!! error TS9009: 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 * 100; } ExpandoMerge.p1 = 111 + ~~~~~~~~~~~~~~~ +!!! error TS9009: 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; } @@ -249,9 +252,9 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi namespace Ns { function ExpandoNamespace(): void {} - ~~~~~~~~~~~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ExpandoNamespace.p6 = 42; + ~~~~~~~~~~~~~~~~~~~ +!!! error TS9009: 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; } 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..dcceaa770005c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionNestedAssigments.d.ts @@ -0,0 +1,82 @@ +//// [tests/cases/compiler/expandoFunctionNestedAssigments.ts] //// + +//// [expandoFunctionNestedAssigments.ts] +function Foo(): 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 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; +} +//# sourceMappingURL=expandoFunctionNestedAssigments.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff index 858af1b481a68..29ef91b84a992 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff @@ -13,17 +13,17 @@ - -/// [Errors] //// - --contextualReturnTypeOfIIFE2.ts(2,12): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +-contextualReturnTypeOfIIFE2.ts(5,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - - -==== contextualReturnTypeOfIIFE2.ts (1 errors) ==== - declare namespace app { - function foo(): void; -- ~~~ --!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - } - - app.foo.bar = (function () { +- ~~~~~~~~~~~ +-!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - const someFun = (arg: number) => {}; - return { someFun }; - })(); diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment32.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment32.d.ts.diff new file mode 100644 index 0000000000000..bf75437f17e85 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment32.d.ts.diff @@ -0,0 +1,61 @@ +// [[Reason: Property is defined in another file. DTE can't detect this but TSC has another error for this already]] //// + +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -22,16 +22,22 @@ + + expando.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + expando.ts(4,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + expando.ts(5,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expando.ts(8,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expando.ts(9,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expando.ts(10,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expando.ts(11,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. ++expando.ts(12,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. ++expando.ts(13,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + expando.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + + +-==== expando.ts (6 errors) ==== ++==== expando.ts (12 errors) ==== + function ExpandoMerge(n: number) { + ~~~~~~~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return n; +@@ -44,17 +50,29 @@ + !!! error TS9009: 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; + } + ExpandoMerge.p4 = 44444; ++ ~~~~~~~~~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.p5 = 555555; ++ ~~~~~~~~~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.p6 = 66666; ++ ~~~~~~~~~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.p7 = 777777; ++ ~~~~~~~~~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.p8 = false; // type error + ~~~~~~~~~~~~~~~ + !!! error TS2322: Type 'boolean' is not assignable to type 'number'. ++ ~~~~~~~~~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.p9 = false; // type error + ~~~~~~~~~~~~~~~ + !!! error TS2322: Type 'boolean' is not assignable to type 'number'. ++ ~~~~~~~~~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment33.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment33.d.ts.diff new file mode 100644 index 0000000000000..5e53b17453465 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment33.d.ts.diff @@ -0,0 +1,65 @@ +// [[Reason: Property is defined in another file. DTE can't detect this but TSC has another error for this already]] //// + +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -22,10 +22,16 @@ + + expando.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + expando.ts(4,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + expando.ts(5,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expando.ts(8,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expando.ts(9,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expando.ts(10,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expando.ts(11,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. ++expando.ts(12,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. ++expando.ts(13,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + expando.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + +@@ -48,9 +54,9 @@ + export var p2 = 222; + } + + +-==== expando.ts (6 errors) ==== ++==== expando.ts (12 errors) ==== + function ExpandoMerge(n: number) { + ~~~~~~~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return n; +@@ -63,17 +69,29 @@ + !!! error TS9009: 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; + } + ExpandoMerge.p4 = 44444; ++ ~~~~~~~~~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.p5 = 555555; ++ ~~~~~~~~~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.p6 = 66666; ++ ~~~~~~~~~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.p7 = 777777; ++ ~~~~~~~~~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.p8 = false; // type error + ~~~~~~~~~~~~~~~ + !!! error TS2322: Type 'boolean' is not assignable to type 'number'. ++ ~~~~~~~~~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.p9 = false; // type error + ~~~~~~~~~~~~~~~ + !!! error TS2322: Type 'boolean' is not assignable to type 'number'. ++ ~~~~~~~~~~~~~~~ ++!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment32.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment32.d.ts new file mode 100644 index 0000000000000..0b4c572598512 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment32.d.ts @@ -0,0 +1,131 @@ +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts] //// + +//// [expando.ts] +function ExpandoMerge(n: number) { + return n; +} +ExpandoMerge.p1 = 111 +ExpandoMerge.m = function(n: number) { + return n + 1; +} +ExpandoMerge.p4 = 44444; +ExpandoMerge.p5 = 555555; +ExpandoMerge.p6 = 66666; +ExpandoMerge.p7 = 777777; +ExpandoMerge.p8 = false; // type error +ExpandoMerge.p9 = false; // type error +var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + +//// [ns.ts] +namespace ExpandoMerge { + export var p3 = 333; + export var p4 = 4; + export var p5 = 5; + export let p6 = 6; + export let p7 = 7; + export var p8 = 6; + export let p9 = 7; +} +namespace ExpandoMerge { + export var p2 = 222; +} + + +/// [Declarations] //// + + + +//// [expando.d.ts] +declare function ExpandoMerge(n: number): invalid; +declare var n: invalid; + +//// [ns.d.ts] +declare namespace ExpandoMerge { + var p3: number; + var p4: number; + var p5: number; + let p6: number; + let p7: number; + var p8: number; + let p9: number; +} +declare namespace ExpandoMerge { + var p2: number; +} + +/// [Errors] //// + +expando.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +expando.ts(4,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(5,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(8,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(9,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(10,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(11,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. +expando.ts(12,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. +expando.ts(13,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. +ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + + +==== expando.ts (12 errors) ==== + function ExpandoMerge(n: number) { + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return n; + } + ExpandoMerge.p1 = 111 + ~~~~~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.m = function(n: number) { + ~~~~~~~~~~~~~~ +!!! error TS9009: 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; + } + ExpandoMerge.p4 = 44444; + ~~~~~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.p5 = 555555; + ~~~~~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.p6 = 66666; + ~~~~~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.p7 = 777777; + ~~~~~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.p8 = false; // type error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + ~~~~~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.p9 = false; // type error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + ~~~~~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +==== ns.ts (2 errors) ==== + namespace ExpandoMerge { + ~~~~~~~~~~~~ +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + export var p3 = 333; + export var p4 = 4; + export var p5 = 5; + export let p6 = 6; + export let p7 = 7; + export var p8 = 6; + export let p9 = 7; + } + namespace ExpandoMerge { + ~~~~~~~~~~~~ +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + export var p2 = 222; + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment33.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment33.d.ts new file mode 100644 index 0000000000000..09f7fb3e8b4f4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment33.d.ts @@ -0,0 +1,135 @@ +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts] //// + +//// [ns.ts] +namespace ExpandoMerge { + export var p3 = 333; + export var p4 = 4; + export var p5 = 5; + export let p6 = 6; + export let p7 = 7; + export var p8 = 6; + export let p9 = 7; +} +namespace ExpandoMerge { + export var p2 = 222; +} + + +//// [expando.ts] +function ExpandoMerge(n: number) { + return n; +} +ExpandoMerge.p1 = 111 +ExpandoMerge.m = function(n: number) { + return n + 1; +} +ExpandoMerge.p4 = 44444; +ExpandoMerge.p5 = 555555; +ExpandoMerge.p6 = 66666; +ExpandoMerge.p7 = 777777; +ExpandoMerge.p8 = false; // type error +ExpandoMerge.p9 = false; // type error +var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + + + +/// [Declarations] //// + + + +//// [expando.d.ts] +declare function ExpandoMerge(n: number): invalid; +declare var n: invalid; + +//// [ns.d.ts] +declare namespace ExpandoMerge { + var p3: number; + var p4: number; + var p5: number; + let p6: number; + let p7: number; + var p8: number; + let p9: number; +} +declare namespace ExpandoMerge { + var p2: number; +} + +/// [Errors] //// + +expando.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +expando.ts(4,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(5,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(8,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(9,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(10,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(11,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. +expando.ts(12,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. +expando.ts(13,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. +ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + + +==== ns.ts (2 errors) ==== + namespace ExpandoMerge { + ~~~~~~~~~~~~ +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + export var p3 = 333; + export var p4 = 4; + export var p5 = 5; + export let p6 = 6; + export let p7 = 7; + export var p8 = 6; + export let p9 = 7; + } + namespace ExpandoMerge { + ~~~~~~~~~~~~ +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + export var p2 = 222; + } + + +==== expando.ts (12 errors) ==== + function ExpandoMerge(n: number) { + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return n; + } + ExpandoMerge.p1 = 111 + ~~~~~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.m = function(n: number) { + ~~~~~~~~~~~~~~ +!!! error TS9009: 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; + } + ExpandoMerge.p4 = 44444; + ~~~~~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.p5 = 555555; + ~~~~~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.p6 = 66666; + ~~~~~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.p7 = 777777; + ~~~~~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.p8 = false; // type error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + ~~~~~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.p9 = false; // type error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + ~~~~~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts index 52641ca7bc1a4..7c393fd9f0a13 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts @@ -24,17 +24,17 @@ declare namespace app { /// [Errors] //// -contextualReturnTypeOfIIFE2.ts(2,12): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +contextualReturnTypeOfIIFE2.ts(5,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ==== contextualReturnTypeOfIIFE2.ts (1 errors) ==== declare namespace app { function foo(): void; - ~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. } app.foo.bar = (function () { + ~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. const someFun = (arg: number) => {}; return { someFun }; })(); diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment32.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment32.d.ts new file mode 100644 index 0000000000000..efb5f71209342 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment32.d.ts @@ -0,0 +1,113 @@ +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts] //// + +//// [expando.ts] +function ExpandoMerge(n: number) { + return n; +} +ExpandoMerge.p1 = 111 +ExpandoMerge.m = function(n: number) { + return n + 1; +} +ExpandoMerge.p4 = 44444; +ExpandoMerge.p5 = 555555; +ExpandoMerge.p6 = 66666; +ExpandoMerge.p7 = 777777; +ExpandoMerge.p8 = false; // type error +ExpandoMerge.p9 = false; // type error +var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + +//// [ns.ts] +namespace ExpandoMerge { + export var p3 = 333; + export var p4 = 4; + export var p5 = 5; + export let p6 = 6; + export let p7 = 7; + export var p8 = 6; + export let p9 = 7; +} +namespace ExpandoMerge { + export var p2 = 222; +} + + +/// [Declarations] //// + + + +//// [expando.d.ts] +declare function ExpandoMerge(n: number): invalid; +declare var n: invalid; + +//// [ns.d.ts] +declare namespace ExpandoMerge { + var p3: number; + var p4: number; + var p5: number; + let p6: number; + let p7: number; + var p8: number; + let p9: number; +} +declare namespace ExpandoMerge { + var p2: number; +} + +/// [Errors] //// + +expando.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +expando.ts(4,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(5,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. +expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. +expando.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. +ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + + +==== expando.ts (6 errors) ==== + function ExpandoMerge(n: number) { + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return n; + } + ExpandoMerge.p1 = 111 + ~~~~~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.m = function(n: number) { + ~~~~~~~~~~~~~~ +!!! error TS9009: 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; + } + ExpandoMerge.p4 = 44444; + ExpandoMerge.p5 = 555555; + ExpandoMerge.p6 = 66666; + ExpandoMerge.p7 = 777777; + ExpandoMerge.p8 = false; // type error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + ExpandoMerge.p9 = false; // type error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +==== ns.ts (2 errors) ==== + namespace ExpandoMerge { + ~~~~~~~~~~~~ +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + export var p3 = 333; + export var p4 = 4; + export var p5 = 5; + export let p6 = 6; + export let p7 = 7; + export var p8 = 6; + export let p9 = 7; + } + namespace ExpandoMerge { + ~~~~~~~~~~~~ +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + export var p2 = 222; + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment33.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment33.d.ts new file mode 100644 index 0000000000000..ec931b0ae189c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment33.d.ts @@ -0,0 +1,117 @@ +//// [tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts] //// + +//// [ns.ts] +namespace ExpandoMerge { + export var p3 = 333; + export var p4 = 4; + export var p5 = 5; + export let p6 = 6; + export let p7 = 7; + export var p8 = 6; + export let p9 = 7; +} +namespace ExpandoMerge { + export var p2 = 222; +} + + +//// [expando.ts] +function ExpandoMerge(n: number) { + return n; +} +ExpandoMerge.p1 = 111 +ExpandoMerge.m = function(n: number) { + return n + 1; +} +ExpandoMerge.p4 = 44444; +ExpandoMerge.p5 = 555555; +ExpandoMerge.p6 = 66666; +ExpandoMerge.p7 = 777777; +ExpandoMerge.p8 = false; // type error +ExpandoMerge.p9 = false; // type error +var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + + + +/// [Declarations] //// + + + +//// [expando.d.ts] +declare function ExpandoMerge(n: number): invalid; +declare var n: invalid; + +//// [ns.d.ts] +declare namespace ExpandoMerge { + var p3: number; + var p4: number; + var p5: number; + let p6: number; + let p7: number; + var p8: number; + let p9: number; +} +declare namespace ExpandoMerge { + var p2: number; +} + +/// [Errors] //// + +expando.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +expando.ts(4,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(5,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. +expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. +expando.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. +ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + + +==== ns.ts (2 errors) ==== + namespace ExpandoMerge { + ~~~~~~~~~~~~ +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + export var p3 = 333; + export var p4 = 4; + export var p5 = 5; + export let p6 = 6; + export let p7 = 7; + export var p8 = 6; + export let p9 = 7; + } + namespace ExpandoMerge { + ~~~~~~~~~~~~ +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. + export var p2 = 222; + } + + +==== expando.ts (6 errors) ==== + function ExpandoMerge(n: number) { + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return n; + } + ExpandoMerge.p1 = 111 + ~~~~~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ExpandoMerge.m = function(n: number) { + ~~~~~~~~~~~~~~ +!!! error TS9009: 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; + } + ExpandoMerge.p4 = 44444; + ExpandoMerge.p5 = 555555; + ExpandoMerge.p6 = 66666; + ExpandoMerge.p7 = 777777; + ExpandoMerge.p8 = false; // type error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + ExpandoMerge.p9 = false; // type error + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'number'. + var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + \ No newline at end of file diff --git a/tests/cases/compiler/expandoFunctionNestedAssigments.ts b/tests/cases/compiler/expandoFunctionNestedAssigments.ts new file mode 100644 index 0000000000000..4d0cb13a02a31 --- /dev/null +++ b/tests/cases/compiler/expandoFunctionNestedAssigments.ts @@ -0,0 +1,49 @@ +// @lib: esnext +// @isolatedDeclarationFixedDiffReason: Function declarations are not fixed +// @declaration: true + +function Foo(): 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; + } +} \ 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/conformance/salsa/typeFromPropertyAssignment32.ts b/tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts index 498aa151e7306..f58616ff48eb0 100644 --- a/tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts +++ b/tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Property is defined in another file. DTE can't detect this but TSC has another error for this already // @Filename: expando.ts function ExpandoMerge(n: number) { return n; diff --git a/tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts b/tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts index d98f689329dd3..d3e95d9a9b2c6 100644 --- a/tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts +++ b/tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Property is defined in another file. DTE can't detect this but TSC has another error for this already // @Filename: ns.ts namespace ExpandoMerge { export var p3 = 333; From 0f12363cc3fbac1b3ac2ae568e4a02d2bcb2b634 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 28 Nov 2023 07:09:57 -0500 Subject: [PATCH 153/224] Fix test failures after master merge. --- ...rnTypeErrorInReturnStatement.d.ts.map.diff | 16 + .../auto-fixed/diff/fakeInfinity2.d.ts.diff | 21 + .../auto-fixed/diff/fakeInfinity3.d.ts.diff | 22 + .../diff/trackedSymbolsNoCrash.d.ts.map.diff | 18 + ...dReturnTypeErrorInReturnStatement.d.ts.map | 22 + .../auto-fixed/dte/fakeInfinity2.d.ts | 58 ++ .../auto-fixed/dte/fakeInfinity3.d.ts | 63 ++ .../dte/trackedSymbolsNoCrash.d.ts.map | 732 ++++++++++++++++++ ...dReturnTypeErrorInReturnStatement.d.ts.map | 22 + .../auto-fixed/tsc/fakeInfinity2.d.ts | 50 ++ .../auto-fixed/tsc/fakeInfinity3.d.ts | 54 ++ .../tsc/trackedSymbolsNoCrash.d.ts.map | 732 ++++++++++++++++++ ...nferredReturnTypeErrorInReturnStatement.ts | 1 + tests/cases/compiler/fakeInfinity2.ts | 1 + tests/cases/compiler/fakeInfinity3.ts | 1 + ...tionEmitDynamicImportWithPackageExports.ts | 2 + 16 files changed, 1815 insertions(+) create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/accessorInferredReturnTypeErrorInReturnStatement.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/fakeInfinity2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/fakeInfinity3.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/trackedSymbolsNoCrash.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/accessorInferredReturnTypeErrorInReturnStatement.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/fakeInfinity2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/fakeInfinity3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/trackedSymbolsNoCrash.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/accessorInferredReturnTypeErrorInReturnStatement.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/fakeInfinity2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/fakeInfinity3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/trackedSymbolsNoCrash.d.ts.map 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..5dc4e009abf00 --- /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;0BACH,GAAG;CAIvB,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgdmFyIGJhc2VQcm90b3R5cGU6IHsNCiAgICByZWFkb25seSBwcmltYXJ5UGF0aDogYW55Ow0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWFjY2Vzc29ySW5mZXJyZWRSZXR1cm5UeXBlRXJyb3JJblJldHVyblN0YXRlbWVudC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjZXNzb3JJbmZlcnJlZFJldHVyblR5cGVFcnJvckluUmV0dXJuU3RhdGVtZW50LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhY2Nlc3NvckluZmVycmVkUmV0dXJuVHlwZUVycm9ySW5SZXR1cm5TdGF0ZW1lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZUFBTyxJQUFJLGFBQWE7O0NBS3ZCLENBQUMifQ==,ZXhwb3J0IHZhciBiYXNlUHJvdG90eXBlID0gewogIGdldCBwcmltYXJ5UGF0aCgpOiBhbnkgewogICAgdmFyIF90aGlzID0gdGhpczsKICAgIHJldHVybiBfdGhpcy5jb2xsZWN0aW9uLnNjaGVtYS5wcmltYXJ5UGF0aDsKICB9LCAgCn07Cg== ++//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgdmFyIGJhc2VQcm90b3R5cGU6IHsNCiAgICByZWFkb25seSBwcmltYXJ5UGF0aDogYW55Ow0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWFjY2Vzc29ySW5mZXJyZWRSZXR1cm5UeXBlRXJyb3JJblJldHVyblN0YXRlbWVudC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjZXNzb3JJbmZlcnJlZFJldHVyblR5cGVFcnJvckluUmV0dXJuU3RhdGVtZW50LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhY2Nlc3NvckluZmVycmVkUmV0dXJuVHlwZUVycm9ySW5SZXR1cm5TdGF0ZW1lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZUFBTyxJQUFJLGFBQWE7MEJBQ0gsR0FBRztDQUl2QixDQUFDIn0=,ZXhwb3J0IHZhciBiYXNlUHJvdG90eXBlID0gewogIGdldCBwcmltYXJ5UGF0aCgpOiBhbnkgewogICAgdmFyIF90aGlzID0gdGhpczsKICAgIHJldHVybiBfdGhpcy5jb2xsZWN0aW9uLnNjaGVtYS5wcmltYXJ5UGF0aDsKICB9LCAgCn07Cg== + 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/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..2138844c62d77 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/trackedSymbolsNoCrash.d.ts.map.diff @@ -0,0 +1,18 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/trackedSymbolsNoCrash.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,8 +5,8 @@ + //// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgZW51bSBTeW50YXhLaW5kIHsNCiAgICBOb2RlMCA9IDAsDQogICAgTm9kZTEgPSAxLA0KICAgIE5vZGUyID0gMiwNCiAgICBOb2RlMyA9IDMsDQogICAgTm9kZTQgPSA0LA0KICAgIE5vZGU1ID0gNSwNCiAgICBOb2RlNiA9IDYsDQogICAgTm9kZTcgPSA3LA0KICAgIE5vZGU4ID0gOCwNCiAgICBOb2RlOSA9IDksDQogICAgTm9kZTEwID0gMTAsDQogICAgTm9kZTExID0gMTEsDQogICAgTm9kZTEyID0gMTIsDQogICAgTm9kZTEzID0gMTMsDQogICAgTm9kZTE0ID0gMTQsDQogICAgTm9kZTE1ID0gMTUsDQogICAgTm9kZTE2ID0gMTYsDQogICAgTm9kZTE3ID0gMTcsDQogICAgTm9kZTE4ID0gMTgsDQogICAgTm9kZTE5ID0gMTksDQogICAgTm9kZTIwID0gMjAsDQogICAgTm9kZTIxID0gMjEsDQogICAgTm9kZTIyID0gMjIsDQogICAgTm9kZTIzID0gMjMsDQogICAgTm9kZTI0ID0gMjQsDQogICAgTm9kZTI1ID0gMjUsDQogICAgTm9kZTI2ID0gMjYsDQogICAgTm9kZTI3ID0gMjcsDQogICAgTm9kZTI4ID0gMjgsDQogICAgTm9kZTI5ID0gMjksDQogICAgTm9kZTMwID0gMzAsDQogICAgTm9kZTMxID0gMzEsDQogICAgTm9kZTMyID0gMzIsDQogICAgTm9kZTMzID0gMzMsDQogICAgTm9kZTM0ID0gMzQsDQogICAgTm9kZTM1ID0gMzUsDQogICAgTm9kZTM2ID0gMzYsDQogICAgTm9kZTM3ID0gMzcsDQogICAgTm9kZTM4ID0gMzgsDQogICAgTm9kZTM5ID0gMzksDQogICAgTm9kZTQwID0gNDAsDQogICAgTm9kZTQxID0gNDEsDQogICAgTm9kZTQyID0gNDIsDQogICAgTm9kZTQzID0gNDMsDQogICAgTm9kZTQ0ID0gNDQsDQogICAgTm9kZTQ1ID0gNDUsDQogICAgTm9kZTQ2ID0gNDYsDQogICAgTm9kZTQ3ID0gNDcsDQogICAgTm9kZTQ4ID0gNDgsDQogICAgTm9kZTQ5ID0gNDksDQogICAgTm9kZTUwID0gNTAsDQogICAgTm9kZTUxID0gNTEsDQogICAgTm9kZTUyID0gNTIsDQogICAgTm9kZTUzID0gNTMsDQogICAgTm9kZTU0ID0gNTQsDQogICAgTm9kZTU1ID0gNTUsDQogICAgTm9kZTU2ID0gNTYsDQogICAgTm9kZTU3ID0gNTcsDQogICAgTm9kZTU4ID0gNTgsDQogICAgTm9kZTU5ID0gNTksDQogICAgTm9kZTYwID0gNjAsDQogICAgTm9kZTYxID0gNjEsDQogICAgTm9kZTYyID0gNjIsDQogICAgTm9kZTYzID0gNjMsDQogICAgTm9kZTY0ID0gNjQsDQogICAgTm9kZTY1ID0gNjUsDQogICAgTm9kZTY2ID0gNjYsDQogICAgTm9kZTY3ID0gNjcsDQogICAgTm9kZTY4ID0gNjgsDQogICAgTm9kZTY5ID0gNjksDQogICAgTm9kZTcwID0gNzAsDQogICAgTm9kZTcxID0gNzEsDQogICAgTm9kZTcyID0gNzIsDQogICAgTm9kZTczID0gNzMsDQogICAgTm9kZTc0ID0gNzQsDQogICAgTm9kZTc1ID0gNzUsDQogICAgTm9kZTc2ID0gNzYsDQogICAgTm9kZTc3ID0gNzcsDQogICAgTm9kZTc4ID0gNzgsDQogICAgTm9kZTc5ID0gNzksDQogICAgTm9kZTgwID0gODAsDQogICAgTm9kZTgxID0gODEsDQogICAgTm9kZTgyID0gODIsDQogICAgTm9kZTgzID0gODMsDQogICAgTm9kZTg0ID0gODQsDQogICAgTm9kZTg1ID0gODUsDQogICAgTm9kZTg2ID0gODY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6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTg5LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTkwLCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTkxLCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTkyLCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTkzLCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk0LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk1LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk2LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk3LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk4LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk5LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+ID0+CiAgKAogICAgbm9kZTogYXN0Lk5vZGUgfCBudWxsIHwgdW5kZWZpbmVkLAogICk6IG5vZGUgaXMgRXh0cmFjdDxhc3QuTm9kZSwgeyBraW5kOiBOb2RlVHlwZSB9PiA9PgogICAgbm9kZT8ua2luZCA9PT0gbm9kZVR5cGU7Cgo= + 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..46bd689729d4a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/accessorInferredReturnTypeErrorInReturnStatement.d.ts.map @@ -0,0 +1,22 @@ +//// [tests/cases/compiler/accessorInferredReturnTypeErrorInReturnStatement.ts] //// + + + +/// [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;0BACH,GAAG;CAIvB,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgdmFyIGJhc2VQcm90b3R5cGU6IHsNCiAgICByZWFkb25seSBwcmltYXJ5UGF0aDogYW55Ow0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWFjY2Vzc29ySW5mZXJyZWRSZXR1cm5UeXBlRXJyb3JJblJldHVyblN0YXRlbWVudC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjZXNzb3JJbmZlcnJlZFJldHVyblR5cGVFcnJvckluUmV0dXJuU3RhdGVtZW50LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhY2Nlc3NvckluZmVycmVkUmV0dXJuVHlwZUVycm9ySW5SZXR1cm5TdGF0ZW1lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZUFBTyxJQUFJLGFBQWE7MEJBQ0gsR0FBRztDQUl2QixDQUFDIn0=,ZXhwb3J0IHZhciBiYXNlUHJvdG90eXBlID0gewogIGdldCBwcmltYXJ5UGF0aCgpOiBhbnkgewogICAgdmFyIF90aGlzID0gdGhpczsKICAgIHJldHVybiBfdGhpcy5jb2xsZWN0aW9uLnNjaGVtYS5wcmltYXJ5UGF0aDsKICB9LCAgCn07Cg== + 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/trackedSymbolsNoCrash.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/trackedSymbolsNoCrash.d.ts.map new file mode 100644 index 0000000000000..84751ccf199ea --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/trackedSymbolsNoCrash.d.ts.map @@ -0,0 +1,732 @@ +//// [tests/cases/compiler/trackedSymbolsNoCrash.ts] //// + + + +/// [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,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAAE,MAAM,KAAA;IAA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AAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgZW51bSBTeW50YXhLaW5kIHsNCiAgICBOb2RlMCA9IDAsDQogICAgTm9kZTEgPSAxLA0KICAgIE5vZGUyID0gMiwNCiAgICBOb2RlMyA9IDMsDQogICAgTm9kZTQgPSA0LA0KICAgIE5vZGU1ID0gNSwNCiAgICBOb2RlNiA9IDYsDQogICAgTm9kZTcgPSA3LA0KICAgIE5vZGU4ID0gOCwNCiAgICBOb2RlOSA9IDksDQogICAgTm9kZTEwID0gMTAsDQogICAgTm9kZTExID0gMTEsDQogICAgTm9kZTEyID0gMTIsDQogICAgTm9kZTEzID0gMTMsDQogICAgTm9kZTE0ID0gMTQsDQogICAgTm9kZTE1ID0gMTUsDQogICAgTm9kZTE2ID0gMTYsDQogICAgTm9kZTE3ID0gMTcsDQogICAgTm9kZTE4ID0gMTgsDQogICAgTm9kZTE5ID0gMTksDQogICAgTm9kZTIwID0gMjAsDQogICAgTm9kZTIxID0gMjEsDQogICAgTm9kZTIyID0gMjIsDQogICAgTm9kZTIzID0gMjMsDQogICAgTm9kZTI0ID0gMjQsDQogICAgTm9kZTI1ID0gMjUsDQogICAgTm9kZTI2ID0gMjYsDQogICAgTm9kZTI3ID0gMjcsDQogICAgTm9kZTI4ID0gMjgsDQogICAgTm9kZTI5ID0gMjksDQogICAgTm9kZTMwID0gMzAsDQogICAgTm9kZTMxID0gMzEsDQogICAgTm9kZTMyID0gMzIsDQogICAgTm9kZTMzID0gMzMsDQogICAgTm9kZTM0ID0gMzQsDQogICAgTm9kZTM1ID0gMzUsDQogICAgTm9kZTM2ID0gMzYsDQogICAgTm9kZTM3ID0gMzcsDQogICAgTm9kZTM4ID0gMzgsDQogICAgTm9kZTM5ID0gMzksDQogICAgTm9kZTQwID0gNDAsDQogICAgTm9kZTQxID0gNDEsDQogICAgTm9kZTQyID0gNDIsDQogICAgTm9kZTQzID0gNDMsDQogICAgTm9kZTQ0ID0gNDQsDQogICAgTm9kZTQ1ID0gNDUsDQogICAgTm9kZTQ2ID0gNDYsDQogICAgTm9kZTQ3ID0gNDcsDQogICAgTm9kZTQ4ID0gNDgsDQogICAgTm9kZTQ5ID0gNDksDQogICAgTm9kZTUwID0gNTAsDQogICAgTm9kZTUxID0gNTEsDQogICAgTm9kZTUyID0gNTIsDQogICAgTm9kZTUzID0gNTMsDQogICAgTm9kZTU0ID0gNTQsDQogICAgTm9kZTU1ID0gNTUsDQogICAgTm9kZTU2ID0gNTYsDQogICAgTm9kZTU3ID0gNTcsDQogICAgTm9kZTU4ID0gNTgsDQogICAgTm9kZTU5ID0gNTksDQogICAgTm9kZTYwID0gNjAsDQogICAgTm9kZTYxID0gNjEsDQogICAgTm9kZTYyID0gNjIsDQogICAgTm9kZTYzID0gNjMsDQogICAgTm9kZTY0ID0gNjQsDQogICAgTm9kZTY1ID0gNjUsDQogICAgTm9kZTY2ID0gNjYsDQogICAgTm9kZTY3ID0gNjcsDQogICAgTm9kZTY4ID0gNjgsDQogICAgTm9kZTY5ID0gNjksDQogICAgTm9kZTcwID0gNzAsDQogICAgTm9kZTcxID0gNzEsDQogICAgTm9kZTcyID0gNzIsDQogICAgTm9kZTczID0gNzMsDQogICAgTm9kZTc0ID0gNzQsDQogICAgTm9kZTc1ID0gNzUsDQogICAgTm9kZTc2ID0gNzYsDQogICAgTm9kZTc3ID0gNzcsDQogICAgTm9kZTc4ID0gNzgsDQogICAgTm9kZTc5ID0gNzksDQogICAgTm9kZTgwID0gODAsDQogICAgTm9kZTgxID0gODEsDQogICAgTm9kZTgyID0gODIsDQogICAgTm9kZTgzID0gODMsDQogICAgTm9kZTg0ID0gODQsDQogICAgTm9kZTg1ID0gODUsDQogICAgTm9kZTg2ID0gODYsDQogICAgTm9kZTg3ID0gODcsDQogICAgTm9kZTg4ID0gODgsDQogIC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ICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTkzLCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk0LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk1LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk2LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk3LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk4LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk5LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+ID0+CiAgKAogICAgbm9kZTogYXN0Lk5vZGUgfCBudWxsIHwgdW5kZWZpbmVkLAogICk6IG5vZGUgaXMgRXh0cmFjdDxhc3QuTm9kZSwgeyBraW5kOiBOb2RlVHlwZSB9PiA9PgogICAgbm9kZT8ua2luZCA9PT0gbm9kZVR5cGU7Cgo= + 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..009e63e258ff4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/accessorInferredReturnTypeErrorInReturnStatement.d.ts.map @@ -0,0 +1,22 @@ +//// [tests/cases/compiler/accessorInferredReturnTypeErrorInReturnStatement.ts] //// + + + +/// [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/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/trackedSymbolsNoCrash.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/trackedSymbolsNoCrash.d.ts.map new file mode 100644 index 0000000000000..1b93fa228bc3f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/trackedSymbolsNoCrash.d.ts.map @@ -0,0 +1,732 @@ +//// [tests/cases/compiler/trackedSymbolsNoCrash.ts] //// + + + +/// [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;IA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QsDQogICAgTm9kZTE1ID0gMTUsDQogICAgTm9kZTE2ID0gMTYsDQogICAgTm9kZTE3ID0gMTcsDQogICAgTm9kZTE4ID0gMTgsDQogICAgTm9kZTE5ID0gMTksDQogICAgTm9kZTIwID0gMjAsDQogICAgTm9kZTIxID0gMjEsDQogICAgTm9kZTIyID0gMjIsDQogICAgTm9kZTIzID0gMjMsDQogICAgTm9kZTI0ID0gMjQsDQogICAgTm9kZTI1ID0gMjUsDQogICAgTm9kZTI2ID0gMjYsDQogICAgTm9kZTI3ID0gMjcsDQogICAgTm9kZTI4ID0gMjgsDQogICAgTm9kZTI5ID0gMjksDQogICAgTm9kZTMwID0gMzAsDQogICAgTm9kZTMxID0gMzEsDQogICAgTm9kZTMyID0gMzIsDQogICAgTm9kZTMzID0gMzMsDQogICAgTm9kZTM0ID0gMzQsDQogICAgTm9kZTM1ID0gMzUsDQogICAgTm9kZTM2ID0gMzYsDQogICAgTm9kZTM3ID0gMzcsDQogICAgTm9kZTM4ID0gMzgsDQogICAgTm9kZTM5ID0gMzksDQogICAgTm9kZTQwID0gNDAsDQogICAgTm9kZTQxID0gNDEsDQogICAgTm9kZTQyID0gNDIsDQogICAgTm9kZTQzID0gNDMsDQogICAgTm9kZTQ0ID0gNDQsDQogICAgTm9kZTQ1ID0gNDUsDQogICAgTm9kZTQ2ID0gNDYsDQogICAgTm9kZTQ3ID0gNDcsDQogICAgTm9kZTQ4ID0gNDgsDQogICAgTm9kZTQ5ID0gNDksDQogICAgTm9kZTUwID0gNTAsDQogICAgTm9kZTUxID0gNTEsDQogICAgTm9kZTUyID0gNTIsDQogICAgTm9kZTUzID0gNTMsDQogICAgTm9kZTU0ID0gNTQsDQogICAgTm9kZTU1ID0gNTUsDQogICAgTm9kZTU2ID0gNTYsDQogICAgTm9kZTU3ID0gNTcsDQogICAgTm9kZTU4ID0gNTgsDQogICAgTm9kZTU5ID0gNTksDQogICAgTm9kZTYwID0gNjAsDQogICAgTm9kZTYxID0gNjEsDQogICAgTm9kZTYyID0gNjIsDQogICAgTm9kZTYzID0gNjMsDQogICAgTm9kZTY0ID0gNjQsDQogICAgTm9kZTY1ID0gNjUsDQogICAgTm9kZTY2ID0gNjYsDQogICAgTm9kZTY3ID0gNjcsDQogICAgTm9kZTY4ID0gNjgsDQogICAgTm9kZTY5ID0gNjksDQogICAgTm9kZTcwID0gNzAsDQogICAgTm9kZTcxID0gNzEsDQogICAgTm9kZTcyID0gNzIsDQogICAgTm9kZTczID0gNzMsDQogICAgTm9kZTc0ID0gNzQsDQogICAgTm9kZTc1ID0gNzUsDQogICAgTm9kZTc2ID0gNzYsDQogICAgTm9kZTc3ID0gNzcsDQogICAgTm9kZTc4ID0gNzgsDQogICAgTm9kZTc5ID0gNzksDQogICAgTm9kZTgwID0gODAsDQogICAgTm9kZTgxID0gODEsDQogICAgTm9kZTgyID0gODIsDQogICAgTm9kZTgzID0gODMsDQogICAgTm9kZTg0ID0gODQsDQogICAgTm9kZTg1ID0gODUsDQogICAgTm9kZTg2ID0gODYsDQogICAgTm9kZTg3ID0gODcsDQogICAgTm9kZTg4ID0gODgsDQogICAgTm9kZTg5ID0gODksDQogICAgTm9kZTkwID0gOTAsDQogICAgTm9kZTkxID0gOTEsDQogICAgTm9kZTkyID0gOTIsDQogICAgTm9kZTkzID0gOTMsDQogICAgTm9kZTk0ID0gOTQsDQogICAgTm9kZTk1ID0gOTUsDQogICAgTm9kZTk2ID0gOTYsDQogICAgTm9kZTk3ID0gOTcsDQogICAgTm9kZTk4ID0gOTgsDQogICAgTm9kZTk5ID0gOTkNCn0NCmV4cG9ydCBpbnRlcmZhY2UgTm9kZTAgew0KICAgIGtpbmQ6IFN5bnRheEtpbmQuTm9kZTA7DQogICAgcHJvcE5vZGUwOiBudW1iZXI7DQp9DQpleHBvcnQgaW50ZXJmYWNlIE5vZGUxIHsNCiAgICBraW5kOiBTeW50YXhLaW5kLk5vZGUxOw0KICAgIHByb3BOb2RlMTogbnVtYmVyOw0KfQ0KZXhwb3J0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gRXh0cmFjdDxhc3QuTm9kZTk3LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk4LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+IHwgRXh0cmFjdDxhc3QuTm9kZTk5LCB7CiAgICAgIGtpbmQ6IE5vZGVUeXBlOwogIH0+ID0+CiAgKAogICAgbm9kZTogYXN0Lk5vZGUgfCBudWxsIHwgdW5kZWZpbmVkLAogICk6IG5vZGUgaXMgRXh0cmFjdDxhc3QuTm9kZSwgeyBraW5kOiBOb2RlVHlwZSB9PiA9PgogICAgbm9kZT8ua2luZCA9PT0gbm9kZVR5cGU7Cgo= + 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/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/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts b/tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts index 3f8bae7ffc404..96c6b33b14c87 100644 --- a/tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts +++ b/tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts @@ -1,5 +1,7 @@ // @module: nodenext // @declaration: true +// @isolatedDeclarations: false +// @isolatedDeclarationFixedDiffReason: Skipped due to GH:56394 // @filename: index.ts // esm format file export {}; From cf1ca9897750f0ffdeb40f6869220ae3e28ebdba Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 28 Nov 2023 11:12:20 -0500 Subject: [PATCH 154/224] Revert change in checker that prevented TS from removing symbols imported with a different meaning. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/checker.ts | 4 - ...hImportDeclarationNameCollision7.d.ts.diff | 17 ++++ .../diff/typeReferenceDirectives13.d.ts.diff | 16 ++++ .../diff/typeReferenceDirectives5.d.ts.diff | 16 ++++ ...taWithImportDeclarationNameCollision7.d.ts | 83 +++++++++++++++++++ .../dte/typeReferenceDirectives13.d.ts | 46 ++++++++++ .../dte/typeReferenceDirectives5.d.ts | 44 ++++++++++ ...taWithImportDeclarationNameCollision7.d.ts | 82 ++++++++++++++++++ .../tsc/typeReferenceDirectives13.d.ts | 45 ++++++++++ .../tsc/typeReferenceDirectives5.d.ts | 43 ++++++++++ ...dataWithImportDeclarationNameCollision7.ts | 7 +- .../compiler/typeReferenceDirectives13.ts | 1 + .../compiler/typeReferenceDirectives5.ts | 1 + 13 files changed, 398 insertions(+), 7 deletions(-) create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/decoratorMetadataWithImportDeclarationNameCollision7.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives13.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/decoratorMetadataWithImportDeclarationNameCollision7.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives13.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/decoratorMetadataWithImportDeclarationNameCollision7.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives13.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives5.d.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index fd8c49995a209..2d0350e29408e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2764,10 +2764,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return symbol; } if (symbol.flags & SymbolFlags.Alias) { - // Do not take target symbol meaning into account in isolated declaration mode since we don't have access to info from other files. - if (compilerOptions.isolatedDeclarations) { - return symbol; - } const targetFlags = getSymbolFlags(symbol); // `targetFlags` will be `SymbolFlags.All` if an error occurred in alias resolution; this avoids cascading errors if (targetFlags & meaning) { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/decoratorMetadataWithImportDeclarationNameCollision7.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/decoratorMetadataWithImportDeclarationNameCollision7.d.ts.diff new file mode 100644 index 0000000000000..93478914fa4c1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/decoratorMetadataWithImportDeclarationNameCollision7.d.ts.diff @@ -0,0 +1,17 @@ +// [[Reason: TSC removes import that is not used in a semantically valid way. DTE can't know about this.]] //// + +//// [tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,8 +5,9 @@ + doSomething(): invalid; + } + + //// [service.d.ts] ++import db from './db'; + declare class MyClass { + db: db.db; + constructor(db: db.db); + } 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/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/dte/decoratorMetadataWithImportDeclarationNameCollision7.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/decoratorMetadataWithImportDeclarationNameCollision7.d.ts new file mode 100644 index 0000000000000..0a1bc07f3e760 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/decoratorMetadataWithImportDeclarationNameCollision7.d.ts @@ -0,0 +1,83 @@ +//// [tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts] //// + +//// [db.ts] +export default class db { + public doSomething() { + } +} + +//// [service.ts] +import db from './db'; +function someDecorator(target) { + return target; +} +@someDecorator +class MyClass { + db: db.db; //error + + constructor(db: db.db) { // error + this.db = db; + this.db.doSomething(); + } +} +export {MyClass}; + + +/// [Declarations] //// + + + +//// [db.d.ts] +export default class db { + doSomething(): invalid; +} + +//// [service.d.ts] +import db from './db'; +declare class MyClass { + db: db.db; + constructor(db: db.db); +} +export { MyClass }; + +/// [Errors] //// + +db.ts(2,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +service.ts(7,9): error TS2702: 'db' only refers to a type, but is being used as a namespace here. +service.ts(7,9): error TS4031: Public property 'db' of exported class has or is using private name 'db'. +service.ts(9,21): error TS2702: 'db' only refers to a type, but is being used as a namespace here. +service.ts(9,21): error TS4063: Parameter 'db' of constructor from exported class has or is using private name 'db'. + + +==== db.ts (1 errors) ==== + export default class db { + public doSomething() { + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + +==== service.ts (4 errors) ==== + import db from './db'; + function someDecorator(target) { + return target; + } + @someDecorator + class MyClass { + db: db.db; //error + ~~ +!!! error TS2702: 'db' only refers to a type, but is being used as a namespace here. + ~~ +!!! error TS4031: Public property 'db' of exported class has or is using private name 'db'. + + constructor(db: db.db) { // error + ~~ +!!! error TS2702: 'db' only refers to a type, but is being used as a namespace here. + ~~ +!!! error TS4063: Parameter 'db' of constructor from exported class has or is using private name 'db'. + this.db = db; + this.db.doSomething(); + } + } + export {MyClass}; + \ 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..35a13e0312d5f --- /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 } + +//// [/types/lib/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 TS9010: Reference directives are not supported in isolated declaration mode. + + +==== /app.ts (1 errors) ==== + /// + ~~~ +!!! error TS9010: Reference directives are not supported in isolated declaration mode. + 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/typeReferenceDirectives5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives5.d.ts new file mode 100644 index 0000000000000..84e28ffd3f869 --- /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 } + +//// [/types/lib/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 TS9010: Reference directives are not supported in isolated declaration mode. + + +==== /app.ts (1 errors) ==== + /// + ~~~ +!!! error TS9010: Reference directives are not supported in isolated declaration mode. + 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/decoratorMetadataWithImportDeclarationNameCollision7.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/decoratorMetadataWithImportDeclarationNameCollision7.d.ts new file mode 100644 index 0000000000000..291f028c94a17 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/decoratorMetadataWithImportDeclarationNameCollision7.d.ts @@ -0,0 +1,82 @@ +//// [tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts] //// + +//// [db.ts] +export default class db { + public doSomething() { + } +} + +//// [service.ts] +import db from './db'; +function someDecorator(target) { + return target; +} +@someDecorator +class MyClass { + db: db.db; //error + + constructor(db: db.db) { // error + this.db = db; + this.db.doSomething(); + } +} +export {MyClass}; + + +/// [Declarations] //// + + + +//// [db.d.ts] +export default class db { + doSomething(): invalid; +} + +//// [service.d.ts] +declare class MyClass { + db: db.db; + constructor(db: db.db); +} +export { MyClass }; + +/// [Errors] //// + +db.ts(2,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +service.ts(7,9): error TS2702: 'db' only refers to a type, but is being used as a namespace here. +service.ts(7,9): error TS4031: Public property 'db' of exported class has or is using private name 'db'. +service.ts(9,21): error TS2702: 'db' only refers to a type, but is being used as a namespace here. +service.ts(9,21): error TS4063: Parameter 'db' of constructor from exported class has or is using private name 'db'. + + +==== db.ts (1 errors) ==== + export default class db { + public doSomething() { + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + } + +==== service.ts (4 errors) ==== + import db from './db'; + function someDecorator(target) { + return target; + } + @someDecorator + class MyClass { + db: db.db; //error + ~~ +!!! error TS2702: 'db' only refers to a type, but is being used as a namespace here. + ~~ +!!! error TS4031: Public property 'db' of exported class has or is using private name 'db'. + + constructor(db: db.db) { // error + ~~ +!!! error TS2702: 'db' only refers to a type, but is being used as a namespace here. + ~~ +!!! error TS4063: Parameter 'db' of constructor from exported class has or is using private name 'db'. + this.db = db; + this.db.doSomething(); + } + } + export {MyClass}; + \ 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..361b1a3af5a9e --- /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 } + +//// [/types/lib/index.d.ts] +declare let $: { x: number } + + +/// [Declarations] //// + + + +//// [/app.d.ts] +export interface A { + x: () => typeof $; +} + +/// [Errors] //// + +/app.ts(1,23): error TS9010: Reference directives are not supported in isolated declaration mode. + + +==== /app.ts (1 errors) ==== + /// + ~~~ +!!! error TS9010: Reference directives are not supported in isolated declaration mode. + 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/typeReferenceDirectives5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives5.d.ts new file mode 100644 index 0000000000000..6d429be56daf4 --- /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 } + +//// [/types/lib/index.d.ts] +declare let $: { x: number } + + +/// [Declarations] //// + + + +//// [/app.d.ts] +export interface A { + x: typeof $; +} + +/// [Errors] //// + +/app.ts(1,23): error TS9010: Reference directives are not supported in isolated declaration mode. + + +==== /app.ts (1 errors) ==== + /// + ~~~ +!!! error TS9010: Reference directives are not supported in isolated declaration mode. + 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/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts b/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts index bbedf61c6dfc5..cb289d01fc6e2 100644 --- a/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts +++ b/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts @@ -1,8 +1,9 @@ -// @noemithelpers: true -// @experimentaldecorators: true +// @noemithelpers: true +// @experimentaldecorators: true // @emitdecoratormetadata: true // @target: es5 // @module: commonjs +// @isolatedDeclarationDiffReason: TSC removes import that is not used in a semantically valid way. DTE can't know about this. // @filename: db.ts export default class db { public doSomething() { @@ -23,4 +24,4 @@ class MyClass { this.db.doSomething(); } } -export {MyClass}; +export {MyClass}; 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/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: / From 92b3dcb1a2eba2750624b585bc9f905305883ba0 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Tue, 28 Nov 2023 18:11:20 +0000 Subject: [PATCH 155/224] Update the reason for not fixing types These type originate from node_modules and as the compiler refuses to create proper type node for them as it would be adding an import to node_modules. We also don't do anything about it. Signed-off-by: Hana Joo --- ...locksSpecifierResolution(module=node16).d.ts.diff | 10 +++++----- ...cksSpecifierResolution(module=nodenext).d.ts.diff | 10 +++++----- ...deModulesExportsSourceTs(module=node16).d.ts.diff | 12 ++++++------ ...ModulesExportsSourceTs(module=nodenext).d.ts.diff | 12 ++++++------ ...fierGenerationConditions(module=node16).d.ts.diff | 10 +++++----- ...erGenerationConditions(module=nodenext).d.ts.diff | 10 +++++----- ...ifierGenerationDirectory(module=node16).d.ts.diff | 10 +++++----- ...ierGenerationDirectory(module=nodenext).d.ts.diff | 10 +++++----- ...ecifierGenerationPattern(module=node16).d.ts.diff | 10 +++++----- ...ifierGenerationPattern(module=nodenext).d.ts.diff | 10 +++++----- .../nodeModulesExportsBlocksSpecifierResolution.ts | 2 +- .../conformance/node/nodeModulesExportsSourceTs.ts | 2 +- ...odeModulesExportsSpecifierGenerationConditions.ts | 2 +- ...nodeModulesExportsSpecifierGenerationDirectory.ts | 2 +- .../nodeModulesExportsSpecifierGenerationPattern.ts | 2 +- 15 files changed, 57 insertions(+), 57 deletions(-) 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 index 952d17f9c409d..099073fa73d21 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: TODO Seems to be missing enough semantic info to fix]] //// +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module]] //// //// [tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,23 +1,30 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,23 +1,30 @@ + +//// [index.d.ts] 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 index 952d17f9c409d..099073fa73d21 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: TODO Seems to be missing enough semantic info to fix]] //// +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module]] //// //// [tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,23 +1,30 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,23 +1,30 @@ + +//// [index.d.ts] 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 index bef942d53bb44..8550c6e23939f 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: TODO Seems to be missing enough semantic info to fix]] //// +// [[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 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,9 @@ +//// [index.d.ts] @@ -15,7 +15,7 @@ export { x } from "./other.js"; //# sourceMappingURL=index.d.ts.map //// [/.src/node_modules/inner/other.d.ts] -@@ -12,21 +15,24 @@ +@@ -12,21 +15,24 @@ error TS2468: Cannot find global value 'Promise'. index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. 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 index bef942d53bb44..8550c6e23939f 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: TODO Seems to be missing enough semantic info to fix]] //// +// [[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 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,9 @@ +//// [index.d.ts] @@ -15,7 +15,7 @@ export { x } from "./other.js"; //# sourceMappingURL=index.d.ts.map //// [/.src/node_modules/inner/other.d.ts] -@@ -12,21 +15,24 @@ +@@ -12,21 +15,24 @@ error TS2468: Cannot find global value 'Promise'. index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. 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 index 60594d86d563a..5ba532ab7a91f 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: TODO Seems to be missing enough semantic info to fix]] //// +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module]] //// //// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,24 +1,27 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,24 +1,27 @@ //// [index.d.ts] 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 index 60594d86d563a..5ba532ab7a91f 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: TODO Seems to be missing enough semantic info to fix]] //// +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module]] //// //// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,24 +1,27 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,24 +1,27 @@ //// [index.d.ts] 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 index fb12b58710b02..473cfa43bb8da 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: TODO Seems to be missing enough semantic info to fix]] //// +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module]] //// //// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,24 +1,27 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,24 +1,27 @@ //// [index.d.ts] 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 index fb12b58710b02..473cfa43bb8da 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: TODO Seems to be missing enough semantic info to fix]] //// +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module]] //// //// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,24 +1,27 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,24 +1,27 @@ //// [index.d.ts] 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 index 8ae13a3724713..8984e1bab0bfb 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: TODO Seems to be missing enough semantic info to fix]] //// +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module]] //// //// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,24 +1,27 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,24 +1,27 @@ //// [index.d.ts] 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 index 8ae13a3724713..8984e1bab0bfb 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: TODO Seems to be missing enough semantic info to fix]] //// +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module]] //// //// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,24 +1,27 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,24 +1,27 @@ //// [index.d.ts] diff --git a/tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts b/tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts index f70a221c194bd..a07a29c949b34 100644 --- a/tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts +++ b/tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts @@ -1,6 +1,6 @@ // @module: node16,nodenext // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO Seems to be missing enough semantic info to fix +// @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 0841aab619acd..8247220f61cc5 100644 --- a/tests/cases/conformance/node/nodeModulesExportsSourceTs.ts +++ b/tests/cases/conformance/node/nodeModulesExportsSourceTs.ts @@ -1,6 +1,6 @@ // @module: node16,nodenext // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO Seems to be missing enough semantic info to fix +// @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 3a3f6de5af23e..c25c9e79b55b2 100644 --- a/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts +++ b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts @@ -1,6 +1,6 @@ // @module: node16,nodenext // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO Seems to be missing enough semantic info to fix +// @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 e27e60e98a49b..dee64812f690b 100644 --- a/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts +++ b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts @@ -1,6 +1,6 @@ // @module: node16,nodenext // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO Seems to be missing enough semantic info to fix +// @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 b369ff020274d..6622d19c6a88f 100644 --- a/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts +++ b/tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts @@ -1,6 +1,6 @@ // @module: node16,nodenext // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO Seems to be missing enough semantic info to fix +// @isolatedDeclarationFixedDiffReason: checker.typeToTypeNode fails on types that originate from node_module. // @filename: index.ts // esm format file import { Thing } from "inner/other"; From 26e9574e8ca69bbf2994fbd3d2072336646f1775 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 29 Nov 2023 05:45:50 -0500 Subject: [PATCH 156/224] Changed condition. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/transformers/declarations/emitBinder.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/transformers/declarations/emitBinder.ts b/src/compiler/transformers/declarations/emitBinder.ts index fa6c6999468ae..7cf3bb0119189 100644 --- a/src/compiler/transformers/declarations/emitBinder.ts +++ b/src/compiler/transformers/declarations/emitBinder.ts @@ -30,6 +30,7 @@ import { isModuleDeclaration, isNamedExports, isNumericLiteral, + isParameterDeclaration, isPrefixUnaryExpression, isPrivateIdentifier, isPropertyAccessExpression, @@ -436,7 +437,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { Debug.assertNever(d.name); } function isExportedVariable(d: VariableDeclaration | ParameterDeclaration) { - if (!isVariableDeclaration(d)) return false; + if (isParameterDeclaration(d)) return false; // exported directly if (hasSyntacticModifier(d.parent.parent, ModifierFlags.Export)) { return true; From 7067307b6f1af8d2cd98e1ad23a95c865d036dc7 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 28 Nov 2023 18:08:15 -0500 Subject: [PATCH 157/224] Fixed imports to use namespace imports. Other minor fixes Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/_namespaces/ts.ts | 1 + src/compiler/transformers/declarations.ts | 6 +- .../transformers/declarations/emitBinder.ts | 196 +++++++++--------- .../transformers/declarations/emitResolver.ts | 16 +- .../declarations/localInferenceResolver.ts | 85 ++++---- .../declarations/transpileDeclaration.ts | 7 +- src/harness/_namespaces/fixer.ts | 3 + src/harness/isolatedDeclarationFixer.ts | 2 +- src/testRunner/_namespaces/fixer.ts | 3 + src/testRunner/compilerRunner.ts | 4 +- 10 files changed, 162 insertions(+), 161 deletions(-) create mode 100644 src/harness/_namespaces/fixer.ts create mode 100644 src/testRunner/_namespaces/fixer.ts diff --git a/src/compiler/_namespaces/ts.ts b/src/compiler/_namespaces/ts.ts index 60de9f45379df..14eb95213c884 100644 --- a/src/compiler/_namespaces/ts.ts +++ b/src/compiler/_namespaces/ts.ts @@ -60,6 +60,7 @@ export * from "../transformers/declarations/diagnostics"; export * from "../transformers/declarations/emitBinder"; export * from "../transformers/declarations/emitResolver"; export * from "../transformers/declarations/transpileDeclaration"; +export * from "../transformers/declarations/localInferenceResolver"; export * from "../transformers/declarations/types"; export * from "../transformers/declarations"; export * from "../transformer"; diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index dabb706b5ec3d..acab390d74e7a 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -28,6 +28,7 @@ import { createEmptyExports, createGetSymbolAccessibilityDiagnosticForNode, createGetSymbolAccessibilityDiagnosticForNodeName, + createLocalInferenceResolver, createSymbolTable, createUnparsedSourceFile, Debug, @@ -165,6 +166,7 @@ import { LateBoundDeclaration, LateVisibilityPaintedStatement, length, + LocalInferenceResolver, map, mapDefined, MethodDeclaration, @@ -238,10 +240,6 @@ import { VisitResult, } from "../_namespaces/ts"; import * as moduleSpecifiers from "../_namespaces/ts.moduleSpecifiers"; -import { - createLocalInferenceResolver, - LocalInferenceResolver, -} from "./declarations/localInferenceResolver"; /** @internal */ export function getDeclarationDiagnostics(host: EmitHost, resolver: EmitResolver, file: SourceFile | undefined): DiagnosticWithLocation[] | undefined { diff --git a/src/compiler/transformers/declarations/emitBinder.ts b/src/compiler/transformers/declarations/emitBinder.ts index 7cf3bb0119189..a0457b1070396 100644 --- a/src/compiler/transformers/declarations/emitBinder.ts +++ b/src/compiler/transformers/declarations/emitBinder.ts @@ -1,10 +1,29 @@ import { + __String, + ArrayBindingElement, + BinaryExpression, + BindingPattern, + ClassDeclaration, + ClassElement, + ComputedPropertyName, + Debug, + Declaration, + EnumDeclaration, + EnumMember, + Expression, factory, + findAncestor, forEachChild, + FunctionDeclaration, getModuleInstanceState, getNodeId, + hasAmbientModifier, + hasSyntacticModifier, + InterfaceDeclaration, isBinaryExpression, + isBindingPattern, isBlock, + isBlockScopedContainerTopLevel, isClassDeclaration, isComputedPropertyName, isConditionalTypeNode, @@ -12,12 +31,16 @@ import { isConstructSignatureDeclaration, isDoStatement, isElementAccessExpression, + isEnumConst, isEnumDeclaration, isExportAssignment, isExportDeclaration, + isExpression, isExpressionStatement, + isForInOrOfStatement, isForStatement, isFunctionDeclaration, + isFunctionExpressionOrArrowFunction, isIdentifier, isIfStatement, isImportDeclaration, @@ -34,68 +57,35 @@ import { isPrefixUnaryExpression, isPrivateIdentifier, isPropertyAccessExpression, + isPropertyName, isSourceFile, + isStringLiteralLike, isTypeAliasDeclaration, + isVarConst, isVariableDeclaration, isVariableDeclarationList, isVariableStatement, isWhileStatement, - ModuleInstanceState, - Symbol, -} from "../../_namespaces/ts"; -import { - Debug, -} from "../../debug"; -import { - __String, - ArrayBindingElement, - BinaryExpression, - BindingPattern, - ClassDeclaration, - ClassElement, - ComputedPropertyName, - Declaration, - EnumDeclaration, - EnumMember, - Expression, - FunctionDeclaration, - InterfaceDeclaration, + MemberKey, ModifierFlags, ModuleDeclaration, + ModuleInstanceState, Node, NodeArray, NoSubstitutionTemplateLiteral, ObjectLiteralElement, ParameterDeclaration, PropertyName, + setValueDeclaration, SourceFile, + Symbol, SymbolFlags, SyntaxKind, TypeAliasDeclaration, TypeElement, TypeParameterDeclaration, VariableDeclaration, -} from "../../types"; -import { - hasAmbientModifier, - hasSyntacticModifier, - isBlockScopedContainerTopLevel, - isEnumConst, - isFunctionExpressionOrArrowFunction, - isVarConst, - setValueDeclaration, -} from "../../utilities"; -import { - findAncestor, - isBindingPattern, - isExpression, - isForInOrOfStatement, - isPropertyName, - isStringLiteralLike, -} from "../../utilitiesPublic"; -import { - MemberKey, -} from "./types"; +} from "../../_namespaces/ts"; /** @internal */ export interface EmitDeclarationNodeLinks { @@ -121,46 +111,56 @@ export interface EmitDeclarationSymbol { exports?: EmitDeclarationSymbolTable; } -type SymbolRegistrationFlags = readonly [flags: SymbolFlags, forbiddenFlags: SymbolFlags]; +interface SymbolRegistrationFlags { + includes: SymbolFlags; + excludes: SymbolFlags; +} const syntaxKindToSymbolMap = { - [SyntaxKind.TypeParameter]: [SymbolFlags.TypeParameter, SymbolFlags.TypeParameterExcludes], - [SyntaxKind.Parameter]: [SymbolFlags.FunctionScopedVariable, SymbolFlags.ParameterExcludes], - [SyntaxKind.VariableDeclaration]: [SymbolFlags.BlockScopedVariable, SymbolFlags.BlockScopedVariableExcludes], - [SyntaxKind.BindingElement]: [SymbolFlags.BlockScopedVariable, SymbolFlags.BlockScopedVariableExcludes], - [SyntaxKind.PropertyDeclaration]: [SymbolFlags.Property, SymbolFlags.PropertyExcludes], - [SyntaxKind.PropertySignature]: [SymbolFlags.Property, SymbolFlags.PropertyExcludes], - [SyntaxKind.PropertyAssignment]: [SymbolFlags.Property, SymbolFlags.PropertyExcludes], - [SyntaxKind.ShorthandPropertyAssignment]: [SymbolFlags.Property, SymbolFlags.PropertyExcludes], - [SyntaxKind.EnumMember]: [SymbolFlags.EnumMember, SymbolFlags.EnumMemberExcludes], - [SyntaxKind.CallSignature]: [SymbolFlags.Signature, SymbolFlags.None], - [SyntaxKind.ConstructSignature]: [SymbolFlags.Signature, SymbolFlags.None], - [SyntaxKind.IndexSignature]: [SymbolFlags.Signature, SymbolFlags.None], - [SyntaxKind.MethodDeclaration]: [SymbolFlags.Method, SymbolFlags.MethodExcludes], - [SyntaxKind.MethodSignature]: [SymbolFlags.Method, SymbolFlags.MethodExcludes], - [SyntaxKind.FunctionDeclaration]: [SymbolFlags.Function, SymbolFlags.FunctionExcludes], - [SyntaxKind.Constructor]: [SymbolFlags.Constructor, SymbolFlags.None], - [SyntaxKind.GetAccessor]: [SymbolFlags.GetAccessor, SymbolFlags.GetAccessorExcludes], - [SyntaxKind.SetAccessor]: [SymbolFlags.SetAccessor, SymbolFlags.SetAccessorExcludes], - [SyntaxKind.ClassExpression]: [SymbolFlags.Class, SymbolFlags.ClassExcludes], - [SyntaxKind.ClassDeclaration]: [SymbolFlags.Class, SymbolFlags.ClassExcludes], - [SyntaxKind.InterfaceDeclaration]: [SymbolFlags.Interface, SymbolFlags.InterfaceExcludes], - [SyntaxKind.TypeAliasDeclaration]: [SymbolFlags.TypeAlias, SymbolFlags.TypeAliasExcludes], + [SyntaxKind.TypeParameter]: { includes: SymbolFlags.TypeParameter, excludes: SymbolFlags.TypeParameterExcludes }, + [SyntaxKind.Parameter]: { includes: SymbolFlags.FunctionScopedVariable, excludes: SymbolFlags.ParameterExcludes }, + [SyntaxKind.VariableDeclaration]: { includes: SymbolFlags.BlockScopedVariable, excludes: SymbolFlags.BlockScopedVariableExcludes }, + [SyntaxKind.BindingElement]: { includes: SymbolFlags.BlockScopedVariable, excludes: SymbolFlags.BlockScopedVariableExcludes }, + [SyntaxKind.PropertyDeclaration]: { includes: SymbolFlags.Property, excludes: SymbolFlags.PropertyExcludes }, + [SyntaxKind.PropertySignature]: { includes: SymbolFlags.Property, excludes: SymbolFlags.PropertyExcludes }, + [SyntaxKind.PropertyAssignment]: { includes: SymbolFlags.Property, excludes: SymbolFlags.PropertyExcludes }, + [SyntaxKind.ShorthandPropertyAssignment]: { includes: SymbolFlags.Property, excludes: SymbolFlags.PropertyExcludes }, + [SyntaxKind.EnumMember]: { includes: SymbolFlags.EnumMember, excludes: SymbolFlags.EnumMemberExcludes }, + [SyntaxKind.CallSignature]: { includes: SymbolFlags.Signature, excludes: SymbolFlags.None }, + [SyntaxKind.ConstructSignature]: { includes: SymbolFlags.Signature, excludes: SymbolFlags.None }, + [SyntaxKind.IndexSignature]: { includes: SymbolFlags.Signature, excludes: SymbolFlags.None }, + [SyntaxKind.MethodDeclaration]: { includes: SymbolFlags.Method, excludes: SymbolFlags.MethodExcludes }, + [SyntaxKind.MethodSignature]: { includes: SymbolFlags.Method, excludes: SymbolFlags.MethodExcludes }, + [SyntaxKind.FunctionDeclaration]: { includes: SymbolFlags.Function, excludes: SymbolFlags.FunctionExcludes }, + [SyntaxKind.Constructor]: { includes: SymbolFlags.Constructor, excludes: SymbolFlags.None }, + [SyntaxKind.GetAccessor]: { includes: SymbolFlags.GetAccessor, excludes: SymbolFlags.GetAccessorExcludes }, + [SyntaxKind.SetAccessor]: { includes: SymbolFlags.SetAccessor, excludes: SymbolFlags.SetAccessorExcludes }, + [SyntaxKind.ClassExpression]: { includes: SymbolFlags.Class, excludes: SymbolFlags.ClassExcludes }, + [SyntaxKind.ClassDeclaration]: { includes: SymbolFlags.Class, excludes: SymbolFlags.ClassExcludes }, + [SyntaxKind.InterfaceDeclaration]: { includes: SymbolFlags.Interface, excludes: SymbolFlags.InterfaceExcludes }, + [SyntaxKind.TypeAliasDeclaration]: { includes: SymbolFlags.TypeAlias, excludes: SymbolFlags.TypeAliasExcludes }, [SyntaxKind.EnumDeclaration]: { - const: [SymbolFlags.ConstEnum, SymbolFlags.ConstEnumExcludes], - regular: [SymbolFlags.RegularEnum, SymbolFlags.RegularEnumExcludes], + const: { includes: SymbolFlags.ConstEnum, excludes: SymbolFlags.ConstEnumExcludes }, + regular: { includes: SymbolFlags.RegularEnum, excludes: SymbolFlags.RegularEnumExcludes }, }, [SyntaxKind.ModuleDeclaration]: { - value: [SymbolFlags.ValueModule, SymbolFlags.ValueModuleExcludes], - namespace: [SymbolFlags.NamespaceModule, SymbolFlags.NamespaceModuleExcludes], + value: { includes: SymbolFlags.ValueModule, excludes: SymbolFlags.ValueModuleExcludes }, + namespace: { includes: SymbolFlags.NamespaceModule, excludes: SymbolFlags.NamespaceModuleExcludes }, }, - [SyntaxKind.ImportEqualsDeclaration]: [SymbolFlags.Alias, SymbolFlags.AliasExcludes], - [SyntaxKind.NamespaceImport]: [SymbolFlags.Alias, SymbolFlags.AliasExcludes], - [SyntaxKind.ImportSpecifier]: [SymbolFlags.Alias, SymbolFlags.AliasExcludes], - [SyntaxKind.ExportSpecifier]: [SymbolFlags.Alias | SymbolFlags.ExportValue, SymbolFlags.AliasExcludes], - [SyntaxKind.NamespaceExportDeclaration]: [SymbolFlags.Alias, SymbolFlags.AliasExcludes], - [SyntaxKind.ImportClause]: [SymbolFlags.Alias, SymbolFlags.AliasExcludes], + [SyntaxKind.ImportEqualsDeclaration]: { includes: SymbolFlags.Alias, excludes: SymbolFlags.AliasExcludes }, + [SyntaxKind.NamespaceImport]: { includes: SymbolFlags.Alias, excludes: SymbolFlags.AliasExcludes }, + [SyntaxKind.ImportSpecifier]: { includes: SymbolFlags.Alias, excludes: SymbolFlags.AliasExcludes }, + [SyntaxKind.ExportSpecifier]: { includes: SymbolFlags.Alias | SymbolFlags.ExportValue, excludes: SymbolFlags.AliasExcludes }, + [SyntaxKind.NamespaceExportDeclaration]: { includes: SymbolFlags.Alias, excludes: SymbolFlags.AliasExcludes }, + [SyntaxKind.ImportClause]: { includes: SymbolFlags.Alias, excludes: SymbolFlags.AliasExcludes }, } as const satisfies Partial>>; +/** + * Assigning values to a property of a function will usually cause those members to be implicitly declared on the function + * even if they were were not declared (expando functions) + * DTE needs to detect these members and error on them since this behavior is not supported in isolated declarations + * There are however members that can be assigned on a function that are not expando members, namely members that come from Function + * In DTE we do not load the full d.ts so we keep a list of known members of function that can be assigned without considering them expando members. + */ const knownFunctionMembers = new Set([ "I:apply", "I:call", @@ -262,18 +262,20 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { } function bind() { - let currentScope: Node = undefined!; - let currentSymbol: EmitDeclarationSymbol = undefined!; - let currentLocalSymbolTable: EmitDeclarationSymbolTable = undefined!; - let currentExportsSymbolTable: EmitDeclarationSymbolTable | undefined; - const postBindingAction: (() => void)[] = []; + /* eslint-disable no-var */ + var currentScope: Node = undefined!; + var currentSymbol: EmitDeclarationSymbol = undefined!; + var currentLocalSymbolTable: EmitDeclarationSymbolTable = undefined!; + var currentExportsSymbolTable: EmitDeclarationSymbolTable | undefined; + var postBindingAction: (() => void)[] = []; - const fileLinks = getNodeLinks(file).symbol = newSymbol(); + var fileLinks = getNodeLinks(file).symbol = createEmitSymbol(); + /* eslint-enable no-var */ fileLinks.exports = new Map(); withScope(file, fileLinks.exports, () => bindEachFunctionsFirst(file.statements)); postBindingAction.forEach(fn => fn()); - function newSymbol(): EmitDeclarationSymbol { + function createEmitSymbol(): EmitDeclarationSymbol { return { declarations: [], flags: 0, @@ -282,25 +284,25 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { function getSymbol(table: EmitDeclarationSymbolTable, name: MemberKey) { let symbol = table.get(name); if (!symbol) { - symbol = newSymbol(); + symbol = createEmitSymbol(); symbol.name = name; table.set(name, symbol); } return symbol; } - function addLocalAndExportDeclaration(name: LocalAndExportName | MemberKey | undefined, node: Declaration, [flags, forbiddenFlags]: SymbolRegistrationFlags, isExport: boolean) { + function addLocalAndExportDeclaration(name: LocalAndExportName | MemberKey | undefined, node: Declaration, flags: SymbolRegistrationFlags, isExport: boolean) { const { exportName, localName } = typeof name === "object" ? name : { exportName: name, localName: name }; if (isExport) { - const exportKind = flags & SymbolFlags.Value ? SymbolFlags.ExportValue : 0; - const localSymbol = addLocalOnlyDeclaration(localName, node, [exportKind, forbiddenFlags]); - const exportSymbol = addExportOnlyDeclaration(exportName, node, [flags, forbiddenFlags]); + const exportKind = flags.includes & SymbolFlags.Value ? SymbolFlags.ExportValue : 0; + const localSymbol = addLocalOnlyDeclaration(localName, node, { includes: exportKind, excludes: flags.excludes }); + const exportSymbol = addExportOnlyDeclaration(exportName, node, flags); localSymbol.exportSymbol = exportSymbol; // Export symbol can be undefined if the export modifier was placed in an unexpected position. // We just assume the local symbol should be used. There are already bigger issues in the file anyway. return exportSymbol ?? localSymbol; } else { - return addLocalOnlyDeclaration(localName, node, [flags, forbiddenFlags]); + return addLocalOnlyDeclaration(localName, node, flags); } } function addExportOnlyDeclaration(name: MemberKey | undefined, node: Declaration, flagsAndForbiddenFlags: SymbolRegistrationFlags) { @@ -313,13 +315,13 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { return addDeclaration(currentLocalSymbolTable, name, node, flagsAndForbiddenFlags); } - function addDeclaration(table: EmitDeclarationSymbolTable, name: MemberKey | undefined, node: Declaration, [includes, excludes]: SymbolRegistrationFlags) { - let symbol = name !== undefined ? getSymbol(table, name) : newSymbol(); + function addDeclaration(table: EmitDeclarationSymbolTable, name: MemberKey | undefined, node: Declaration, { includes, excludes }: SymbolRegistrationFlags) { + let symbol = name !== undefined ? getSymbol(table, name) : createEmitSymbol(); // Symbols don't merge, create new one if (excludes & symbol.flags) { // Variables and expando members from assignments are always allowed to merge if (!(includes & SymbolFlags.Variable && symbol.flags & SymbolFlags.Assignment)) { - symbol = newSymbol(); + symbol = createEmitSymbol(); } } symbol.declarations.push(node); @@ -486,8 +488,11 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { target.exportSymbol.exports = target.exports; } withScope(fn, target.exports, () => { - const [include, excludes] = syntaxKindToSymbolMap[SyntaxKind.PropertyDeclaration]; - addExportOnlyDeclaration(key, assignmentTarget, [include | SymbolFlags.Assignment, excludes & ~SymbolFlags.Assignment]); + const { includes, excludes } = syntaxKindToSymbolMap[SyntaxKind.PropertyDeclaration]; + addExportOnlyDeclaration(key, assignmentTarget, { + includes: includes | SymbolFlags.Assignment, + excludes: excludes & ~SymbolFlags.Assignment, + }); }); } } @@ -590,8 +595,11 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { // TODO is currentExportsSymbolTable ok here? withScope(node, /*exports*/ undefined, () => { elements.forEach(e => { - const [flags, forbiddenFlags] = getSymbolFlagsForNode(e); - addLocalOnlyDeclaration(getMemberKey(e.propertyName ?? e.name), e, [flags | SymbolFlags.ExportValue, forbiddenFlags]); + const { includes, excludes } = getSymbolFlagsForNode(e); + addLocalOnlyDeclaration(getMemberKey(e.propertyName ?? e.name), e, { + includes: includes | SymbolFlags.ExportValue, + excludes, + }); }); }); } diff --git a/src/compiler/transformers/declarations/emitResolver.ts b/src/compiler/transformers/declarations/emitResolver.ts index a81d7e0dbede2..dd67d370b47a6 100644 --- a/src/compiler/transformers/declarations/emitResolver.ts +++ b/src/compiler/transformers/declarations/emitResolver.ts @@ -1,5 +1,6 @@ import { appendIfUnique, + bindSourceFileForDeclarationEmit, ComputedPropertyName, createEvaluator, Debug, @@ -7,6 +8,8 @@ import { DeclarationName, determineIfDeclarationIsVisible, ElementAccessExpression, + EmitDeclarationNodeLinks, + EmitDeclarationSymbol, emptyArray, EntityNameOrEntityNameExpression, EnumDeclaration, @@ -21,6 +24,7 @@ import { FunctionLikeDeclaration, getAnyImportSyntax, getFirstIdentifier, + getMemberKey, getNameOfDeclaration, getParseTreeNode, getTextOfNode, @@ -46,6 +50,7 @@ import { isInJSFile, isLateVisibilityPaintedStatement, isNumericLiteral, + IsolatedEmitResolver, isPartOfTypeNode, isPrefixUnaryExpression, isPropertyAccessExpression, @@ -78,15 +83,8 @@ import { SyntaxKind, VariableDeclaration, } from "../../_namespaces/ts"; -import { - bindSourceFileForDeclarationEmit, - EmitDeclarationNodeLinks, - EmitDeclarationSymbol, - getMemberKey, -} from "./emitBinder"; -import { - IsolatedEmitResolver, -} from "./types"; + + /** @internal */ export function createEmitDeclarationResolver(file: SourceFile): IsolatedEmitResolver { diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 7839c95fcb62b..24564df6bca77 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -1,14 +1,26 @@ import { + ArrayLiteralExpression, + ArrowFunction, + AsExpression, + ClassExpression, + createDiagnosticForNode, + createPropertyNameNodeForIdentifierOrLiteral, + DiagnosticMessage, + Diagnostics, + EntityNameOrEntityNameExpression, + ExportAssignment, + FunctionExpression, + GetAccessorDeclaration, getCommentRange, + getEmitScriptTarget, getMemberKeyFromElement, - setCommentRange, -} from "../../_namespaces/ts"; -import { - Diagnostics, -} from "../../diagnosticInformationMap.generated"; -import { + HasInferredType, + hasSyntacticModifier, + Identifier, isClassExpression, isComputedPropertyName, + isConstTypeReference, + isEntityNameExpression, isExportAssignment, isGetAccessorDeclaration, isIdentifier, @@ -18,40 +30,26 @@ import { isNoSubstitutionTemplateLiteral, isNumericLiteral, isOmittedExpression, + isOptionalDeclaration, isParameter, isPrefixUnaryExpression, isPrivateIdentifier, isPropertyAssignment, isPropertyDeclaration, + isPropertyName, isSetAccessorDeclaration, isShorthandPropertyAssignment, isSpreadAssignment, isSpreadElement, + isStringDoubleQuoted, isStringLiteral, + isStringLiteralLike, isTypeLiteralNode, + isTypeNode, isTypeParameterDeclaration, isTypeReferenceNode, isUnionTypeNode, isVariableDeclaration, -} from "../../factory/nodeTests"; -import { - setTextRange, -} from "../../factory/utilitiesPublic"; -import { - nullTransformationContext, -} from "../../transformer"; -import { - ArrayLiteralExpression, - ArrowFunction, - AsExpression, - ClassExpression, - DiagnosticMessage, - EntityNameOrEntityNameExpression, - ExportAssignment, - FunctionExpression, - GetAccessorDeclaration, - HasInferredType, - Identifier, KeywordTypeSyntaxKind, LiteralExpression, MethodDeclaration, @@ -59,42 +57,28 @@ import { Node, NodeArray, NodeFlags, + nullTransformationContext, ObjectLiteralExpression, ParameterDeclaration, ParenthesizedExpression, PrefixUnaryExpression, PropertyName, SetAccessorDeclaration, + setCommentRange, + setTextRange, SourceFile, SyntaxKind, TransformationContext, TypeAssertion, TypeElement, TypeNode, - Visitor, - VisitResult, -} from "../../types"; -import { - createDiagnosticForNode, - createPropertyNameNodeForIdentifierOrLiteral, - getEmitScriptTarget, - hasSyntacticModifier, - isEntityNameExpression, - isOptionalDeclaration, - isStringDoubleQuoted, -} from "../../utilities"; -import { - isConstTypeReference, - isPropertyName, - isStringLiteralLike, - isTypeNode, unescapeLeadingUnderscores, -} from "../../utilitiesPublic"; -import { visitEachChild, visitNode, visitNodes, -} from "../../visitorPublic"; + Visitor, + VisitResult, +} from "../../_namespaces/ts"; enum NarrowBehavior { None = 0, @@ -115,6 +99,9 @@ export interface LocalInferenceResolver { makeInvalidType(): Node; fromInitializer(node: HasInferredType | ExportAssignment, type: TypeNode | undefined, sourceFile: SourceFile): TypeNode; } +/** + * @internal + */ export function createLocalInferenceResolver({ setEnclosingDeclarations, visitDeclarationSubtree, @@ -696,15 +683,15 @@ export function createLocalInferenceResolver({ * function x(o = "", v: string) */ if (node.initializer && !isOptional) { - localType.typeNode = addUndefinedInUnion(localType.typeNode); - } + localType.typeNode = addUndefinedInUnion(localType.typeNode); + } /** * 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.typeNode = addUndefinedInUnion(localType.typeNode); - } + } } } else if (type) { @@ -732,7 +719,7 @@ export function createLocalInferenceResolver({ localType = localInference(node.initializer); if (isOptionalDeclaration(node)) { localType.typeNode = addUndefinedInUnion(localType.typeNode); - } + } } else if (isInterfaceDeclaration(node.parent) || isTypeLiteralNode(node.parent)) { return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); diff --git a/src/compiler/transformers/declarations/transpileDeclaration.ts b/src/compiler/transformers/declarations/transpileDeclaration.ts index 4d28982e4d9b8..f1a8961ecb34d 100644 --- a/src/compiler/transformers/declarations/transpileDeclaration.ts +++ b/src/compiler/transformers/declarations/transpileDeclaration.ts @@ -40,7 +40,10 @@ function createEmitDeclarationHost(options: TranspileDeclarationsOptions): EmitH useCaseSensitiveFileNames: () => !!options.useCaseSensitiveFileNames, getCompilerOptions: () => options.compilerOptions, getCommonSourceDirectory: () => ensureTrailingDirectorySeparator(options.commonSourceDirectory ?? "."), - redirectTargetsMap: undefined!, // new Map(), + get redirectTargetsMap(): never { + Debug.fail("redirectTargetsMap should not be used in isolated declarations"); + return undefined!; // Need return despite fail call GH#52214 + }, directoryExists: throws, fileExists: throws, readFile: throws, @@ -86,7 +89,7 @@ export function transpileDeclaration(sourceFile: SourceFile, transpileOptions: T addDiagnostic(diag: any) { diagnostics.push(diag); }, - } as Partial as TransformationContext); + } as TransformationContext); const result = transformer(sourceFile); const printer = createPrinter({ diff --git a/src/harness/_namespaces/fixer.ts b/src/harness/_namespaces/fixer.ts new file mode 100644 index 0000000000000..c5b7f26dc68f3 --- /dev/null +++ b/src/harness/_namespaces/fixer.ts @@ -0,0 +1,3 @@ +/* Generated file to emulate the fixer namespace. */ + +export * from "../isolatedDeclarationFixer"; diff --git a/src/harness/isolatedDeclarationFixer.ts b/src/harness/isolatedDeclarationFixer.ts index 936086ada33d3..0bc55da2e4d22 100644 --- a/src/harness/isolatedDeclarationFixer.ts +++ b/src/harness/isolatedDeclarationFixer.ts @@ -1,6 +1,6 @@ +import * as fake from "./_namespaces/fakes"; import * as ts from "./_namespaces/ts"; import * as vfs from "./_namespaces/vfs"; -import * as fake from "./fakesHosts"; export const isolatedDeclarationsErrors = new Set([ ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.code, diff --git a/src/testRunner/_namespaces/fixer.ts b/src/testRunner/_namespaces/fixer.ts new file mode 100644 index 0000000000000..eecd8b75acc09 --- /dev/null +++ b/src/testRunner/_namespaces/fixer.ts @@ -0,0 +1,3 @@ +/* Generated file to emulate the fixer namespace. */ + +export * from "../../harness/_namespaces/fixer"; diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 13ded5da538dc..f94cb962a8105 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -1,7 +1,7 @@ +import * as compiler from "./_namespaces/compiler"; import { fixTestFiles, -} from "../harness/isolatedDeclarationFixer"; -import * as compiler from "./_namespaces/compiler"; +} from "./_namespaces/fixer"; import { Baseline, Compiler, From d89c2aed98007bc2b5ef68081d7e0e8a3b4469c5 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 30 Nov 2023 05:47:38 -0500 Subject: [PATCH 158/224] Cleanup baseline. --- ...declarationEmitParameterProperty.d.ts.diff | 19 - ...ecifierResolution(module=node16).d.ts.diff | 10 +- ...ifierResolution(module=nodenext).d.ts.diff | 10 +- ...esExportsSourceTs(module=node16).d.ts.diff | 12 +- ...ExportsSourceTs(module=nodenext).d.ts.diff | 12 +- ...erationConditions(module=node16).d.ts.diff | 10 +- ...ationConditions(module=nodenext).d.ts.diff | 10 +- ...nerationDirectory(module=node16).d.ts.diff | 10 +- ...rationDirectory(module=nodenext).d.ts.diff | 10 +- ...GenerationPattern(module=node16).d.ts.diff | 10 +- ...nerationPattern(module=nodenext).d.ts.diff | 10 +- .../auto-fixed/diff/optionalMethods.d.ts.diff | 25 -- .../dte/declarationEmitParameterProperty.d.ts | 19 - ...tPrefersPathKindBasedOnBundling.d.ts.map.f | 405 ------------------ .../auto-fixed/dte/optionalMethods.d.ts | 93 ---- .../tsc/declarationEmitParameterProperty.d.ts | 19 - ...tPrefersPathKindBasedOnBundling.d.ts.map.f | 385 ----------------- .../auto-fixed/tsc/optionalMethods.d.ts | 93 ---- .../typeFromPropertyAssignment36.d.ts.diff | 38 -- .../dte/typeFromPropertyAssignment36.d.ts | 189 -------- .../tsc/typeFromPropertyAssignment36.d.ts | 192 --------- 21 files changed, 52 insertions(+), 1529 deletions(-) delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitParameterProperty.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/optionalMethods.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitParameterProperty.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.f delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalMethods.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitParameterProperty.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.f delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalMethods.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment36.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment36.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment36.d.ts diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitParameterProperty.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitParameterProperty.d.ts.diff deleted file mode 100644 index 3c473c1e58cf2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitParameterProperty.d.ts.diff +++ /dev/null @@ -1,19 +0,0 @@ -// [[Reason: TODO: Optional constructor properties.]] //// - -//// [tests/cases/compiler/declarationEmitParameterProperty.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,8 @@ - - - //// [declarationEmitParameterProperty.d.ts] - export declare class Foo { -- bar?: string | undefined; -- constructor(bar?: string | undefined); -+ bar?: string; -+ constructor(bar?: string); - } - //# sourceMappingURL=declarationEmitParameterProperty.d.ts.map -\ No newline at end of file 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 index 099073fa73d21..ef640c148062b 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: checker.typeToTypeNode fails on types that originate from node_module]] //// +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module.]] //// //// [tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,23 +1,30 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,23 +1,30 @@ + +//// [index.d.ts] 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 index 099073fa73d21..ef640c148062b 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: checker.typeToTypeNode fails on types that originate from node_module]] //// +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module.]] //// //// [tests/cases/conformance/node/nodeModulesExportsBlocksSpecifierResolution.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,23 +1,30 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,23 +1,30 @@ + +//// [index.d.ts] 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 index 8550c6e23939f..e432b9ef02dd0 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: checker.typeToTypeNode fails on types that originate from node_module]] //// +// [[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 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,9 @@ +//// [index.d.ts] @@ -15,7 +15,7 @@ export { x } from "./other.js"; //# sourceMappingURL=index.d.ts.map //// [/.src/node_modules/inner/other.d.ts] -@@ -12,21 +15,24 @@ +@@ -12,21 +15,24 @@ error TS2468: Cannot find global value 'Promise'. index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. 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 index 8550c6e23939f..e432b9ef02dd0 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: checker.typeToTypeNode fails on types that originate from node_module]] //// +// [[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 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,9 @@ +//// [index.d.ts] @@ -15,7 +15,7 @@ export { x } from "./other.js"; //# sourceMappingURL=index.d.ts.map //// [/.src/node_modules/inner/other.d.ts] -@@ -12,21 +15,24 @@ +@@ -12,21 +15,24 @@ error TS2468: Cannot find global value 'Promise'. index.ts(2,23): error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. 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 index 5ba532ab7a91f..181e3db8d0bb5 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: checker.typeToTypeNode fails on types that originate from node_module]] //// +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module.]] //// //// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,24 +1,27 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,24 +1,27 @@ //// [index.d.ts] 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 index 5ba532ab7a91f..181e3db8d0bb5 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: checker.typeToTypeNode fails on types that originate from node_module]] //// +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module.]] //// //// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationConditions.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,24 +1,27 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,24 +1,27 @@ //// [index.d.ts] 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 index 473cfa43bb8da..ff1ee6aca9022 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: checker.typeToTypeNode fails on types that originate from node_module]] //// +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module.]] //// //// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,24 +1,27 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,24 +1,27 @@ //// [index.d.ts] 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 index 473cfa43bb8da..ff1ee6aca9022 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: checker.typeToTypeNode fails on types that originate from node_module]] //// +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module.]] //// //// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationDirectory.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,24 +1,27 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,24 +1,27 @@ //// [index.d.ts] 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 index 8984e1bab0bfb..29474c9183f11 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: checker.typeToTypeNode fails on types that originate from node_module]] //// +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module.]] //// //// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,24 +1,27 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,24 +1,27 @@ //// [index.d.ts] 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 index 8984e1bab0bfb..29474c9183f11 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: checker.typeToTypeNode fails on types that originate from node_module]] //// +// [[Reason: checker.typeToTypeNode fails on types that originate from node_module.]] //// //// [tests/cases/conformance/node/nodeModulesExportsSpecifierGenerationPattern.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,24 +1,27 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,24 +1,27 @@ //// [index.d.ts] diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/optionalMethods.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/optionalMethods.d.ts.diff deleted file mode 100644 index 8333cdeb6fb9c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/optionalMethods.d.ts.diff +++ /dev/null @@ -1,25 +0,0 @@ -// [[Reason: TODO: Optional constructor properties.]] //// - -//// [tests/cases/conformance/types/namedTypes/optionalMethods.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -8,14 +8,14 @@ - g?(): number; - } - declare function test1(x: Foo): void; - declare class Bar { -- d?: number | undefined; -+ d?: number; - e: number; - a: number; - b?: number; -- c?: number | undefined; -- constructor(d?: number | undefined, e?: number); -+ c?: number; -+ constructor(d?: number, e?: number); - f(): number; - g?(): number; - h?(): number; - } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitParameterProperty.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitParameterProperty.d.ts deleted file mode 100644 index 851a88eb93cec..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitParameterProperty.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -//// [tests/cases/compiler/declarationEmitParameterProperty.ts] //// - -//// [declarationEmitParameterProperty.ts] -export class Foo { - constructor(public bar?: string) { - } -} - - -/// [Declarations] //// - - - -//// [declarationEmitParameterProperty.d.ts] -export declare class Foo { - bar?: string; - constructor(bar?: string); -} -//# sourceMappingURL=declarationEmitParameterProperty.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.f b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.f deleted file mode 100644 index 3f3d460707ad5..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.f +++ /dev/null @@ -1,405 +0,0 @@ -//// [declarationEmitPrefersPathKindBasedOnBundling.ts] //// - -//// [/.src/dist/lib/operators/scalar.d.ts.map] -{ - "version": 3, - "file": "scalar.d.ts", - "sourceRoot": "", - "sources": [ - "../../../src/lib/operators/scalar.ts" - ], - "names": [], - "mappings": [ - { - "generatedLine": 1, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 1, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 1, - "generatedColumn": 6, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 1, - "originalColumn": 6, - "name": null, - "generatedText": "export", - "sourceText": "export" - }, - { - "generatedLine": 1, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 1, - "originalColumn": 17, - "name": null, - "generatedText": " interface ", - "sourceText": " interface " - }, - { - "generatedLine": 1, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 1, - "originalColumn": 23, - "name": null, - "generatedText": "Scalar", - "sourceText": "Scalar" - }, - { - "generatedLine": 2, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 2, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 2, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 2, - "originalColumn": 5, - "name": null, - "generatedText": "(): ", - "sourceText": "(): " - }, - { - "generatedLine": 2, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 2, - "originalColumn": 11, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 2, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 2, - "originalColumn": 12, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 3, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 3, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 3, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 3, - "originalColumn": 6, - "name": null, - "generatedText": "value", - "sourceText": "value" - }, - { - "generatedLine": 3, - "generatedColumn": 11, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 3, - "originalColumn": 8, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 3, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 3, - "originalColumn": 14, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 3, - "generatedColumn": 18, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 3, - "originalColumn": 15, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 4, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 4, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 5, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 6, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 5, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 6, - "originalColumn": 16, - "name": null, - "generatedText": "export declare function ", - "sourceText": "export function " - }, - { - "generatedLine": 5, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 6, - "originalColumn": 22, - "name": null, - "generatedText": "scalar", - "sourceText": "scalar" - }, - { - "generatedLine": 5, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 6, - "originalColumn": 23, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 5, - "generatedColumn": 36, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 6, - "originalColumn": 28, - "name": null, - "generatedText": "value", - "sourceText": "value" - }, - { - "generatedLine": 5, - "generatedColumn": 38, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 6, - "originalColumn": 30, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 5, - "generatedColumn": 44, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 6, - "originalColumn": 36, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 5, - "generatedColumn": 47, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 6, - "originalColumn": 39, - "name": null, - "generatedText": "): ", - "sourceText": "): " - }, - { - "generatedLine": 5, - "generatedColumn": 53, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 6, - "originalColumn": 45, - "name": null, - "generatedText": "Scalar", - "sourceText": "Scalar" - }, - { - "generatedLine": 5, - "generatedColumn": 54, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 8, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - } - ] -}//// [/.src/dist/settings/spacing.d.ts.map] -{ - "version": 3, - "file": "spacing.d.ts", - "sourceRoot": "", - "sources": [ - "../../src/settings/spacing.ts" - ], - "names": [], - "mappings": [ - { - "generatedLine": 1, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 1, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 1, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 1, - "originalColumn": 7, - "name": null, - "generatedText": "import ", - "sourceText": "import " - }, - { - "generatedLine": 1, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 1, - "originalColumn": 9, - "name": null, - "generatedText": "{ ", - "sourceText": "{ " - }, - { - "generatedLine": 1, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 1, - "originalColumn": 15, - "name": null, - "generatedText": "Scalar", - "sourceText": "Scalar" - }, - { - "generatedLine": 1, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 1, - "originalColumn": 25, - "name": null, - "generatedText": " }", - "sourceText": ", scalar }" - }, - { - "generatedLine": 1, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 1, - "originalColumn": 31, - "name": null, - "generatedText": " from ", - "sourceText": " from " - }, - { - "generatedLine": 1, - "generatedColumn": 48, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 1, - "originalColumn": 56, - "name": null, - "generatedText": "'../lib/operators/scalar'", - "sourceText": "'../lib/operators/scalar'" - }, - { - "generatedLine": 1, - "generatedColumn": 49, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 1, - "originalColumn": 57, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 3, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 4, - "originalColumn": 11, - "name": null - }, - { - "generatedLine": 3, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 4, - "originalColumn": 17, - "name": null, - "generatedText": "Scalar", - "sourceText": "Scalar" - }, - { - "generatedLine": 5, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 3, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 5, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 7, - "originalColumn": 2, - "name": null, - "generatedText": "export default _default;", - "sourceText": "};" - } - ] -} \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalMethods.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalMethods.d.ts deleted file mode 100644 index 2e361c0198f60..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalMethods.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -//// [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; - e: number; - a: number; - b?: number; - c?: number; - constructor(d?: number, 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 \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitParameterProperty.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitParameterProperty.d.ts deleted file mode 100644 index 79edb8fe1d495..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitParameterProperty.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -//// [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 \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.f b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.f deleted file mode 100644 index 4aaf72e93758a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map.f +++ /dev/null @@ -1,385 +0,0 @@ -//// [declarationEmitPrefersPathKindBasedOnBundling.ts] //// - -//// [/.src/dist/lib/operators/scalar.d.ts.map] -{ - "version": 3, - "file": "scalar.d.ts", - "sourceRoot": "", - "sources": [ - "../../../src/lib/operators/scalar.ts" - ], - "names": [], - "mappings": [ - { - "generatedLine": 1, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 1, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 1, - "generatedColumn": 6, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 1, - "originalColumn": 6, - "name": null, - "generatedText": "export", - "sourceText": "export" - }, - { - "generatedLine": 1, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 1, - "originalColumn": 17, - "name": null, - "generatedText": " interface ", - "sourceText": " interface " - }, - { - "generatedLine": 1, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 1, - "originalColumn": 23, - "name": null, - "generatedText": "Scalar", - "sourceText": "Scalar" - }, - { - "generatedLine": 2, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 2, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 2, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 2, - "originalColumn": 5, - "name": null, - "generatedText": "(): ", - "sourceText": "(): " - }, - { - "generatedLine": 2, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 2, - "originalColumn": 11, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 2, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 2, - "originalColumn": 12, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 3, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 3, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 3, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 3, - "originalColumn": 6, - "name": null, - "generatedText": "value", - "sourceText": "value" - }, - { - "generatedLine": 3, - "generatedColumn": 11, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 3, - "originalColumn": 8, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 3, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 3, - "originalColumn": 14, - "name": null, - "generatedText": "number", - "sourceText": "number" - }, - { - "generatedLine": 3, - "generatedColumn": 18, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 3, - "originalColumn": 15, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 4, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 4, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 5, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 6, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 5, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 6, - "originalColumn": 16, - "name": null, - "generatedText": "export declare function ", - "sourceText": "export function " - }, - { - "generatedLine": 5, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 6, - "originalColumn": 22, - "name": null, - "generatedText": "scalar", - "sourceText": "scalar" - }, - { - "generatedLine": 5, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 6, - "originalColumn": 23, - "name": null, - "generatedText": "(", - "sourceText": "(" - }, - { - "generatedLine": 5, - "generatedColumn": 36, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 6, - "originalColumn": 28, - "name": null, - "generatedText": "value", - "sourceText": "value" - }, - { - "generatedLine": 5, - "generatedColumn": 38, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 6, - "originalColumn": 30, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 5, - "generatedColumn": 44, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 6, - "originalColumn": 36, - "name": null, - "generatedText": "string", - "sourceText": "string" - }, - { - "generatedLine": 5, - "generatedColumn": 47, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 6, - "originalColumn": 39, - "name": null, - "generatedText": "): ", - "sourceText": "): " - }, - { - "generatedLine": 5, - "generatedColumn": 53, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 6, - "originalColumn": 45, - "name": null, - "generatedText": "Scalar", - "sourceText": "Scalar" - }, - { - "generatedLine": 5, - "generatedColumn": 54, - "lastGeneratedColumn": null, - "source": "../../../src/lib/operators/scalar.ts", - "originalLine": 8, - "originalColumn": 1, - "name": null, - "generatedText": ";", - "sourceText": "" - } - ] -}//// [/.src/dist/settings/spacing.d.ts.map] -{ - "version": 3, - "file": "spacing.d.ts", - "sourceRoot": "", - "sources": [ - "../../src/settings/spacing.ts" - ], - "names": [], - "mappings": [ - { - "generatedLine": 1, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 1, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 1, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 1, - "originalColumn": 7, - "name": null, - "generatedText": "import ", - "sourceText": "import " - }, - { - "generatedLine": 1, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 1, - "originalColumn": 9, - "name": null, - "generatedText": "{ ", - "sourceText": "{ " - }, - { - "generatedLine": 1, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 1, - "originalColumn": 15, - "name": null, - "generatedText": "Scalar", - "sourceText": "Scalar" - }, - { - "generatedLine": 1, - "generatedColumn": 17, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 1, - "originalColumn": 25, - "name": null, - "generatedText": " }", - "sourceText": ", scalar }" - }, - { - "generatedLine": 1, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 1, - "originalColumn": 31, - "name": null, - "generatedText": " from ", - "sourceText": " from " - }, - { - "generatedLine": 1, - "generatedColumn": 48, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 1, - "originalColumn": 56, - "name": null, - "generatedText": "'../lib/operators/scalar'", - "sourceText": "'../lib/operators/scalar'" - }, - { - "generatedLine": 1, - "generatedColumn": 49, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 1, - "originalColumn": 57, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 5, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 3, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 5, - "generatedColumn": 24, - "lastGeneratedColumn": null, - "source": "../../src/settings/spacing.ts", - "originalLine": 7, - "originalColumn": 2, - "name": null, - "generatedText": "export default _default;", - "sourceText": "};" - } - ] -} \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalMethods.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalMethods.d.ts deleted file mode 100644 index 5b6488525800e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/optionalMethods.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -//// [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 \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment36.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment36.d.ts.diff deleted file mode 100644 index 00507fee9573a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment36.d.ts.diff +++ /dev/null @@ -1,38 +0,0 @@ -// [[Reason: TODO Need to fix DTE looking recursively for assigned members.]] //// - -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -13,14 +13,13 @@ - typeFromPropertyAssignment36.ts(32,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - typeFromPropertyAssignment36.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - typeFromPropertyAssignment36.ts(34,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - typeFromPropertyAssignment36.ts(42,3): error TS2565: Property 'q' is used before being assigned. --typeFromPropertyAssignment36.ts(59,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --typeFromPropertyAssignment36.ts(59,7): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+typeFromPropertyAssignment36.ts(59,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - typeFromPropertyAssignment36.ts(64,3): error TS2565: Property 'expando' is used before being assigned. - - --==== typeFromPropertyAssignment36.ts (9 errors) ==== -+==== typeFromPropertyAssignment36.ts (8 errors) ==== - function f(b: boolean) { - ~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - function d() { -@@ -90,12 +89,10 @@ - d.r - - // test function expressions too - const g = function() { -- ~ -+ ~~~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -- ~ --!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - } - if (!!false) { - g.expando = 1 - } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment36.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment36.d.ts deleted file mode 100644 index 95533f1eea99a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment36.d.ts +++ /dev/null @@ -1,189 +0,0 @@ -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts] //// - -//// [typeFromPropertyAssignment36.ts] -function f(b: boolean) { - function d() { - } - d.e = 12 - d.e - - if (b) { - d.q = false - } - // error d.q might not be assigned - d.q - if (b) { - d.q = false - } - else { - d.q = true - } - d.q - if (b) { - d.r = 1 - } - else { - d.r = 2 - } - d.r - if (b) { - d.s = 'hi' - } - return d -} -// OK to access possibly-unassigned properties outside the initialising scope -var test = f(true).s - -function d() { -} -d.e = 12 -d.e - -if (!!false) { - d.q = false -} -d.q -if (!!false) { - d.q = false -} -else { - d.q = true -} -d.q -if (!!false) { - d.r = 1 -} -else { - d.r = 2 -} -d.r - -// test function expressions too -const g = function() { -} -if (!!false) { - g.expando = 1 -} -g.expando // error - -if (!!false) { - g.both = 'hi' -} -else { - g.both = 0 -} -g.both - - -/// [Declarations] //// - - - -//// [typeFromPropertyAssignment36.d.ts] -declare function f(b: boolean): invalid; -declare var test: invalid; -declare function d(): invalid; -declare const g: invalid; - -/// [Errors] //// - -typeFromPropertyAssignment36.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -typeFromPropertyAssignment36.ts(11,7): error TS2565: Property 'q' is used before being assigned. -typeFromPropertyAssignment36.ts(32,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -typeFromPropertyAssignment36.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -typeFromPropertyAssignment36.ts(34,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -typeFromPropertyAssignment36.ts(42,3): error TS2565: Property 'q' is used before being assigned. -typeFromPropertyAssignment36.ts(59,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -typeFromPropertyAssignment36.ts(64,3): error TS2565: Property 'expando' is used before being assigned. - - -==== typeFromPropertyAssignment36.ts (8 errors) ==== - function f(b: boolean) { - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - function d() { - } - d.e = 12 - d.e - - if (b) { - d.q = false - } - // error d.q might not be assigned - d.q - ~ -!!! error TS2565: Property 'q' is used before being assigned. - if (b) { - d.q = false - } - else { - d.q = true - } - d.q - if (b) { - d.r = 1 - } - else { - d.r = 2 - } - d.r - if (b) { - d.s = 'hi' - } - return d - } - // OK to access possibly-unassigned properties outside the initialising scope - var test = f(true).s - ~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - function d() { - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - } - d.e = 12 - d.e - - if (!!false) { - d.q = false - } - d.q - ~ -!!! error TS2565: Property 'q' is used before being assigned. - if (!!false) { - d.q = false - } - else { - d.q = true - } - d.q - if (!!false) { - d.r = 1 - } - else { - d.r = 2 - } - d.r - - // test function expressions too - const g = function() { - ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - if (!!false) { - g.expando = 1 - } - g.expando // error - ~~~~~~~ -!!! error TS2565: Property 'expando' is used before being assigned. - - if (!!false) { - g.both = 'hi' - } - else { - g.both = 0 - } - g.both - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment36.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment36.d.ts deleted file mode 100644 index 83014f3117d86..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment36.d.ts +++ /dev/null @@ -1,192 +0,0 @@ -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts] //// - -//// [typeFromPropertyAssignment36.ts] -function f(b: boolean) { - function d() { - } - d.e = 12 - d.e - - if (b) { - d.q = false - } - // error d.q might not be assigned - d.q - if (b) { - d.q = false - } - else { - d.q = true - } - d.q - if (b) { - d.r = 1 - } - else { - d.r = 2 - } - d.r - if (b) { - d.s = 'hi' - } - return d -} -// OK to access possibly-unassigned properties outside the initialising scope -var test = f(true).s - -function d() { -} -d.e = 12 -d.e - -if (!!false) { - d.q = false -} -d.q -if (!!false) { - d.q = false -} -else { - d.q = true -} -d.q -if (!!false) { - d.r = 1 -} -else { - d.r = 2 -} -d.r - -// test function expressions too -const g = function() { -} -if (!!false) { - g.expando = 1 -} -g.expando // error - -if (!!false) { - g.both = 'hi' -} -else { - g.both = 0 -} -g.both - - -/// [Declarations] //// - - - -//// [typeFromPropertyAssignment36.d.ts] -declare function f(b: boolean): invalid; -declare var test: invalid; -declare function d(): invalid; -declare const g: invalid; - -/// [Errors] //// - -typeFromPropertyAssignment36.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -typeFromPropertyAssignment36.ts(11,7): error TS2565: Property 'q' is used before being assigned. -typeFromPropertyAssignment36.ts(32,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -typeFromPropertyAssignment36.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -typeFromPropertyAssignment36.ts(34,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -typeFromPropertyAssignment36.ts(42,3): error TS2565: Property 'q' is used before being assigned. -typeFromPropertyAssignment36.ts(59,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -typeFromPropertyAssignment36.ts(59,7): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -typeFromPropertyAssignment36.ts(64,3): error TS2565: Property 'expando' is used before being assigned. - - -==== typeFromPropertyAssignment36.ts (9 errors) ==== - function f(b: boolean) { - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - function d() { - } - d.e = 12 - d.e - - if (b) { - d.q = false - } - // error d.q might not be assigned - d.q - ~ -!!! error TS2565: Property 'q' is used before being assigned. - if (b) { - d.q = false - } - else { - d.q = true - } - d.q - if (b) { - d.r = 1 - } - else { - d.r = 2 - } - d.r - if (b) { - d.s = 'hi' - } - return d - } - // OK to access possibly-unassigned properties outside the initialising scope - var test = f(true).s - ~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - function d() { - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - } - d.e = 12 - d.e - - if (!!false) { - d.q = false - } - d.q - ~ -!!! error TS2565: Property 'q' is used before being assigned. - if (!!false) { - d.q = false - } - else { - d.q = true - } - d.q - if (!!false) { - d.r = 1 - } - else { - d.r = 2 - } - d.r - - // test function expressions too - const g = function() { - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - } - if (!!false) { - g.expando = 1 - } - g.expando // error - ~~~~~~~ -!!! error TS2565: Property 'expando' is used before being assigned. - - if (!!false) { - g.both = 'hi' - } - else { - g.both = 0 - } - g.both - \ No newline at end of file From 500d2a36a519e66d96f6ac24a65f5b955c14c814 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Wed, 29 Nov 2023 19:55:03 +0000 Subject: [PATCH 159/224] Document reasons for fixer not generating fixes. This is already the current behavior of the compiler, it refuses to return a typeNode from checker.typeToTypeNode when the underlying type is from node_module. Signed-off-by: Hana Joo --- ...EmitCommonJsModuleReferencedType.d.ts.diff | 16 +++++++------- ...EmitForGlobalishSpecifierSymlink.d.ts.diff | 18 ++++++++-------- ...mitForGlobalishSpecifierSymlink2.d.ts.diff | 18 ++++++++-------- ...nEmitObjectAssignedDefaultExport.d.ts.diff | 16 +++++++------- ...onEmitReexportedSymlinkReference.d.ts.diff | 21 +++++++++++-------- ...nEmitReexportedSymlinkReference2.d.ts.diff | 18 ++++++++-------- ...nEmitReexportedSymlinkReference3.d.ts.diff | 10 ++++----- ...mitWithInvalidPackageJsonTypings.d.ts.diff | 18 ++++++++-------- ...rtsSpecifierGenerationConditions.d.ts.diff | 18 ++++++++-------- ...nodeModuleReexportFromDottedPath.d.ts.diff | 18 ++++++++-------- ...larationEmitModuleNamesImportRef.d.ts.diff | 18 ++++++++-------- ...ersionsDeclarationEmit.multiFile.d.ts.diff | 18 ++++++++-------- ...mit.multiFileBackReferenceToSelf.d.ts.diff | 10 ++++----- ...multiFileBackReferenceToUnmapped.d.ts.diff | 18 ++++++++-------- ...arationEmitCommonJsModuleReferencedType.ts | 2 +- ...arationEmitForGlobalishSpecifierSymlink.ts | 2 +- ...rationEmitForGlobalishSpecifierSymlink2.ts | 2 +- ...larationEmitObjectAssignedDefaultExport.ts | 2 +- ...clarationEmitReexportedSymlinkReference.ts | 2 +- ...larationEmitReexportedSymlinkReference2.ts | 2 +- ...larationEmitReexportedSymlinkReference3.ts | 2 +- ...rationEmitWithInvalidPackageJsonTypings.ts | 2 +- .../nodeModuleReexportFromDottedPath.ts | 2 +- ...LinkDeclarationEmitModuleNamesImportRef.ts | 2 +- .../typesVersionsDeclarationEmit.multiFile.ts | 2 +- ...rationEmit.multiFileBackReferenceToSelf.ts | 2 +- ...onEmit.multiFileBackReferenceToUnmapped.ts | 2 +- ...lesExportsSpecifierGenerationConditions.ts | 2 +- 28 files changed, 133 insertions(+), 130 deletions(-) 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 index 15e2f84e1ae40..2d648c369667e 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[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 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,15 @@ + +//// [r/entry.d.ts] @@ -21,7 +21,7 @@ ==== r/node_modules/foo/node_modules/nested/index.d.ts (0 errors) ==== export interface NestedProps {} -@@ -20,12 +27,14 @@ +@@ -20,12 +27,14 @@ ==== node_modules/root/index.d.ts (0 errors) ==== export interface RootProps {} @@ -36,5 +36,5 @@ + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. export const y: RootProps = bar(); - -\ No newline at end of file + +\ No newline at end of file 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 index 3280331371223..f49d30ab5d52e 100644 --- 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 @@ -1,17 +1,17 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,5 +1,45 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,45 @@ //// [/p1/index.d.ts] -export declare const a: import("typescript-fsa").A; --//# sourceMappingURL=index.d.ts.map -\ No newline at end of file +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// @@ -53,5 +53,5 @@ +==== /p2/index.d.ts (0 errors) ==== + export const a: import("typescript-fsa").A; + -+ -\ No newline at end of file ++ +\ 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 index 6468cad8211a9..31446c0b51ead 100644 --- 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 @@ -1,17 +1,17 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,5 +1,33 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,33 @@ //// [/p1/index.d.ts] -export declare const a: import("typescript-fsa").A; --//# sourceMappingURL=index.d.ts.map -\ No newline at end of file +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// @@ -41,5 +41,5 @@ +==== /p2/index.d.ts (0 errors) ==== + export const a: import("typescript-fsa").A; + -+ -\ No newline at end of file ++ +\ 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 index d4de922a7c4ea..10302f60e0a5b 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[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 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,16 @@ + +//// [index.d.ts] @@ -22,7 +22,7 @@ ==== node_modules/styled-components/node_modules/hoist-non-react-statics/index.d.ts (0 errors) ==== interface Statics { -@@ -30,21 +38,26 @@ +@@ -30,21 +38,26 @@ } declare const styled: StyledInterface; @@ -49,5 +49,5 @@ !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - -\ No newline at end of file + +\ No newline at end of file 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 index d86a0720c635e..291990d47ad82 100644 --- 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 @@ -1,19 +1,22 @@ -// [[Reason: TODO: is not auto fixed, should be fixed.]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -3,7 +3,55 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,7 +3,55 @@ //// [/.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 +-//# sourceMappingURL=keys.d.ts.map +\ No newline at end of file + + + +export declare const ADMIN: invalid; +//# sourceMappingURL=keys.d.ts.map +/// [Errors] //// @@ -64,5 +67,5 @@ + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" -+ } -\ No newline at end of file ++ } +\ 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 index b3b26e0c51ef6..4cdd52e75989f 100644 --- 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 @@ -1,19 +1,19 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -3,7 +3,58 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,7 +3,58 @@ //// [/.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 +-//# sourceMappingURL=keys.d.ts.map +\ No newline at end of file +export declare const ADMIN: invalid; +//# sourceMappingURL=keys.d.ts.map +/// [Errors] //// @@ -67,5 +67,5 @@ + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" -+ } -\ No newline at end of file ++ } +\ 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 index eee44685cd494..931e89fd2e8c0 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,21 +2,27 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,21 +2,27 @@ //// [/.src/monorepo/pkg3/dist/index.d.ts] export * from './keys'; 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 index ce8ce25d6afbc..f7ee007210367 100644 --- 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 @@ -1,18 +1,18 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,6 +4,37 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,6 +4,37 @@ 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 +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file +export declare const useCsvParser: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// @@ -45,5 +45,5 @@ + const parserRef = useRef(null); + return parserRef; + }; -+ -\ No newline at end of file ++ +\ No newline at end of file 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 index a34929cfa8bbc..025080023f2d3 100644 --- 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 @@ -1,17 +1,17 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[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,42 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,42 @@ //// [index.d.ts] -export declare const a: () => Promise; --//# sourceMappingURL=index.d.ts.map -\ No newline at end of file +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// @@ -50,5 +50,5 @@ + "default": "./other.js" + } + } -+ } -\ No newline at end of file ++ } +\ No newline at end of file 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 index 9cee87fd3e925..906f1ae6b12bd 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/compiler/nodeModuleReexportFromDottedPath.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,7 +1,31 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,7 +1,31 @@ //// [/index.d.ts] @@ -13,8 +13,8 @@ -declare const _default: PrismaClient; +declare const _default: invalid; export default _default; -\ No newline at end of file --//# sourceMappingURL=index.d.ts.map +\ No newline at end of file +-//# sourceMappingURL=index.d.ts.map +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + @@ -40,5 +40,5 @@ + export default new EnhancedPrisma(); + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -\ No newline at end of file ++ +\ No newline at end of file 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 index 698cca3f6b32f..dcc508a75ddfc 100644 --- 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 @@ -1,17 +1,17 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules.]] //// //// [tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,5 +1,31 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,31 @@ //// [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 +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file +export declare function getStyles(): invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// @@ -39,5 +39,5 @@ + } + +==== Folder/node_modules/styled-components/typings/styled-components.d.ts (0 errors) ==== -+ export interface InterpolationValue {} -\ No newline at end of file ++ export interface InterpolationValue {} +\ No newline at end of file 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 index b45be22a50ea4..02eca91a38829 100644 --- 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 @@ -1,18 +1,18 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[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,49 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,49 @@ //// [/.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 +-//# 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 @@ -58,5 +58,5 @@ +==== node_modules/ext/ts3.1/other.d.ts (0 errors) ==== + export interface B {} + export function fb(): B; -+ -\ No newline at end of file ++ +\ 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 index 6418130c28fdf..7ab99de784bc5 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[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,26 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,23 +1,26 @@ //// [/.src/main.d.ts] 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 index 7099d9251a3e1..ad3a8a0a52be8 100644 --- 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 @@ -1,18 +1,18 @@ -// [[Reason: TODO File is not auto-fixed]] //// +// [[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,46 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,46 @@ //// [/.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 +-//# 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 @@ -55,5 +55,5 @@ + +==== node_modules/ext/ts3.1/index.d.ts (0 errors) ==== + export * from "../other"; -+ -\ No newline at end of file ++ +\ No newline at end of file diff --git a/tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts b/tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts index abb18b39d3ae7..a09591b80efdb 100644 --- a/tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts +++ b/tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @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/declarationEmitForGlobalishSpecifierSymlink.ts b/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts index 032322dcc4048..f713a42bfbe74 100644 --- a/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts +++ b/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts @@ -1,6 +1,6 @@ // @useCaseSensitiveFilenames: true // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @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 f861dcdb61558..774edf31d6d4c 100644 --- a/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts +++ b/tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts @@ -1,6 +1,6 @@ // @useCaseSensitiveFilenames: true // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @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/declarationEmitObjectAssignedDefaultExport.ts b/tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts index bac84ce522045..3e1af36893965 100644 --- a/tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts +++ b/tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts @@ -1,7 +1,7 @@ // @target: es6 // @module: commonjs // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @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/declarationEmitReexportedSymlinkReference.ts b/tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts index 1c4d534eeeca6..e41e6bee31460 100644 --- a/tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts +++ b/tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts @@ -1,4 +1,4 @@ -// @isolatedDeclarationFixedDiffReason: TODO: is not auto fixed, should be fixed. +// @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 338b8be8561fc..c86275ebb9fd9 100644 --- a/tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts +++ b/tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts @@ -1,5 +1,5 @@ // @filename: monorepo/pkg1/dist/index.d.ts -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @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 23b939690b9d4..9734526147fab 100644 --- a/tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts +++ b/tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts @@ -1,4 +1,4 @@ -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @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/declarationEmitWithInvalidPackageJsonTypings.ts b/tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts index 850b3421709b0..67e141da2db22 100644 --- a/tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts +++ b/tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @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/nodeModuleReexportFromDottedPath.ts b/tests/cases/compiler/nodeModuleReexportFromDottedPath.ts index 890ccbc5eeaa0..c443e432585fe 100644 --- a/tests/cases/compiler/nodeModuleReexportFromDottedPath.ts +++ b/tests/cases/compiler/nodeModuleReexportFromDottedPath.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @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/symbolLinkDeclarationEmitModuleNamesImportRef.ts b/tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts index 3549b07c618b7..6744a0dc44323 100644 --- a/tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts +++ b/tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts @@ -1,7 +1,7 @@ // @declaration: true // @useCaseSensitiveFileNames: false // @noImplicitReferences: true -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @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/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts b/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts index 198f47047cbd3..a5c07d589e212 100644 --- a/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts +++ b/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts @@ -2,7 +2,7 @@ // @target: esnext // @module: commonjs // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @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 7f0a7e7fa30d7..763fd2252928e 100644 --- a/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.ts +++ b/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.ts @@ -2,7 +2,7 @@ // @target: esnext // @module: commonjs // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @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 1f11f03d4e647..9254f29d2a2e6 100644 --- a/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.ts +++ b/tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.ts @@ -2,7 +2,7 @@ // @target: esnext // @module: commonjs // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @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/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts b/tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts index 40439188da3ed..116f36798815c 100644 --- a/tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts +++ b/tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts @@ -2,7 +2,7 @@ // @lib: es2020 // @declaration: true // @filename: index.ts -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed +// @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 From 8dcb272a43bc158772ef165eec4a92c5269690c6 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 30 Nov 2023 16:04:48 -0500 Subject: [PATCH 160/224] Fixed new lines. --- ...EmitCommonJsModuleReferencedType.d.ts.diff | 14 +++++++------- ...EmitForGlobalishSpecifierSymlink.d.ts.diff | 16 ++++++++-------- ...mitForGlobalishSpecifierSymlink2.d.ts.diff | 16 ++++++++-------- ...nEmitObjectAssignedDefaultExport.d.ts.diff | 14 +++++++------- ...onEmitReexportedSymlinkReference.d.ts.diff | 19 ++++++++----------- ...nEmitReexportedSymlinkReference2.d.ts.diff | 16 ++++++++-------- ...nEmitReexportedSymlinkReference3.d.ts.diff | 8 ++++---- ...mitWithInvalidPackageJsonTypings.d.ts.diff | 16 ++++++++-------- ...rtsSpecifierGenerationConditions.d.ts.diff | 16 ++++++++-------- ...nodeModuleReexportFromDottedPath.d.ts.diff | 16 ++++++++-------- ...larationEmitModuleNamesImportRef.d.ts.diff | 16 ++++++++-------- ...ersionsDeclarationEmit.multiFile.d.ts.diff | 16 ++++++++-------- ...mit.multiFileBackReferenceToSelf.d.ts.diff | 8 ++++---- ...multiFileBackReferenceToUnmapped.d.ts.diff | 16 ++++++++-------- 14 files changed, 102 insertions(+), 105 deletions(-) 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 index 2d648c369667e..fbf0a1f747567 100644 --- 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 @@ -2,10 +2,10 @@ //// [tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,15 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,15 @@ + +//// [r/entry.d.ts] @@ -21,7 +21,7 @@ ==== r/node_modules/foo/node_modules/nested/index.d.ts (0 errors) ==== export interface NestedProps {} -@@ -20,12 +27,14 @@ +@@ -20,12 +27,14 @@ ==== node_modules/root/index.d.ts (0 errors) ==== export interface RootProps {} @@ -36,5 +36,5 @@ + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. export const y: RootProps = bar(); - -\ No newline at end of file + +\ No newline at end of file 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 index f49d30ab5d52e..5e2d28cebf15a 100644 --- 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 @@ -2,16 +2,16 @@ //// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,5 +1,45 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,45 @@ //// [/p1/index.d.ts] -export declare const a: import("typescript-fsa").A; --//# sourceMappingURL=index.d.ts.map -\ No newline at end of file +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// @@ -53,5 +53,5 @@ +==== /p2/index.d.ts (0 errors) ==== + export const a: import("typescript-fsa").A; + -+ -\ No newline at end of file ++ +\ 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 index 31446c0b51ead..d511d445031d2 100644 --- 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 @@ -2,16 +2,16 @@ //// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,5 +1,33 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,33 @@ //// [/p1/index.d.ts] -export declare const a: import("typescript-fsa").A; --//# sourceMappingURL=index.d.ts.map -\ No newline at end of file +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// @@ -41,5 +41,5 @@ +==== /p2/index.d.ts (0 errors) ==== + export const a: import("typescript-fsa").A; + -+ -\ No newline at end of file ++ +\ 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 index 10302f60e0a5b..cae1feee66a4f 100644 --- 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 @@ -2,10 +2,10 @@ //// [tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,16 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,16 @@ + +//// [index.d.ts] @@ -22,7 +22,7 @@ ==== node_modules/styled-components/node_modules/hoist-non-react-statics/index.d.ts (0 errors) ==== interface Statics { -@@ -30,21 +38,26 @@ +@@ -30,21 +38,26 @@ } declare const styled: StyledInterface; @@ -49,5 +49,5 @@ !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - -\ No newline at end of file + +\ No newline at end of file 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 index 291990d47ad82..8a438e525a42c 100644 --- 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 @@ -2,21 +2,18 @@ //// [tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -3,7 +3,55 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,7 +3,55 @@ //// [/.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 - - - +-//# sourceMappingURL=keys.d.ts.map +\ No newline at end of file +export declare const ADMIN: invalid; +//# sourceMappingURL=keys.d.ts.map +/// [Errors] //// @@ -67,5 +64,5 @@ + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" -+ } -\ No newline at end of file ++ } +\ 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 index 4cdd52e75989f..a2f3d6145b978 100644 --- 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 @@ -2,18 +2,18 @@ //// [tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -3,7 +3,58 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,7 +3,58 @@ //// [/.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 +-//# sourceMappingURL=keys.d.ts.map +\ No newline at end of file +export declare const ADMIN: invalid; +//# sourceMappingURL=keys.d.ts.map +/// [Errors] //// @@ -67,5 +67,5 @@ + "description": "", + "main": "dist/index.js", + "typings": "dist/index.d.ts" -+ } -\ No newline at end of file ++ } +\ 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 index 931e89fd2e8c0..1bf38ab9405ed 100644 --- 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 @@ -2,10 +2,10 @@ //// [tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,21 +2,27 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,21 +2,27 @@ //// [/.src/monorepo/pkg3/dist/index.d.ts] export * from './keys'; 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 index f7ee007210367..5dcf6df5b1320 100644 --- 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 @@ -2,17 +2,17 @@ //// [tests/cases/compiler/declarationEmitWithInvalidPackageJsonTypings.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,6 +4,37 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,6 +4,37 @@ 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 +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file +export declare const useCsvParser: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// @@ -45,5 +45,5 @@ + const parserRef = useRef(null); + return parserRef; + }; -+ -\ No newline at end of file ++ +\ No newline at end of file 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 index 025080023f2d3..34035b5458988 100644 --- 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 @@ -2,16 +2,16 @@ //// [tests/cases/conformance/node/legacyNodeModulesExportsSpecifierGenerationConditions.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,5 +1,42 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,42 @@ //// [index.d.ts] -export declare const a: () => Promise; --//# sourceMappingURL=index.d.ts.map -\ No newline at end of file +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file +export declare const a: invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// @@ -50,5 +50,5 @@ + "default": "./other.js" + } + } -+ } -\ No newline at end of file ++ } +\ No newline at end of file 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 index 906f1ae6b12bd..083441d275c7b 100644 --- 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 @@ -2,10 +2,10 @@ //// [tests/cases/compiler/nodeModuleReexportFromDottedPath.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,7 +1,31 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,7 +1,31 @@ //// [/index.d.ts] @@ -13,8 +13,8 @@ -declare const _default: PrismaClient; +declare const _default: invalid; export default _default; -\ No newline at end of file --//# sourceMappingURL=index.d.ts.map +\ No newline at end of file +-//# sourceMappingURL=index.d.ts.map +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + @@ -40,5 +40,5 @@ + export default new EnhancedPrisma(); + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ -\ No newline at end of file ++ +\ No newline at end of file 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 index dcc508a75ddfc..0995cac5704b7 100644 --- 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 @@ -2,16 +2,16 @@ //// [tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,5 +1,31 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,5 +1,31 @@ //// [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 +-//# sourceMappingURL=index.d.ts.map +\ No newline at end of file +export declare function getStyles(): invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// @@ -39,5 +39,5 @@ + } + +==== Folder/node_modules/styled-components/typings/styled-components.d.ts (0 errors) ==== -+ export interface InterpolationValue {} -\ No newline at end of file ++ export interface InterpolationValue {} +\ No newline at end of file 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 index 02eca91a38829..4fd9b41b74648 100644 --- 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 @@ -2,17 +2,17 @@ //// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFile.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,6 +1,49 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,49 @@ //// [/.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 +-//# 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 @@ -58,5 +58,5 @@ +==== node_modules/ext/ts3.1/other.d.ts (0 errors) ==== + export interface B {} + export function fb(): B; -+ -\ No newline at end of file ++ +\ 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 index 7ab99de784bc5..94cb85197023f 100644 --- 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 @@ -2,10 +2,10 @@ //// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToSelf.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,23 +1,26 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,23 +1,26 @@ //// [/.src/main.d.ts] 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 index ad3a8a0a52be8..5b8a5bc692243 100644 --- 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 @@ -2,17 +2,17 @@ //// [tests/cases/conformance/declarationEmit/typesVersionsDeclarationEmit.multiFileBackReferenceToUnmapped.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,6 +1,46 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,6 +1,46 @@ //// [/.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 +-//# 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 @@ -55,5 +55,5 @@ + +==== node_modules/ext/ts3.1/index.d.ts (0 errors) ==== + export * from "../other"; -+ -\ No newline at end of file ++ +\ No newline at end of file From 7bffe7ec7ca08eacb1b9c08bf81141ae70bb40d4 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 30 Nov 2023 16:22:54 -0500 Subject: [PATCH 161/224] Suppress tests that fail due to TS bug --- .../computedPropertyNamesDeclarationEmit6_ES5.ts | 2 ++ .../computedPropertyNamesDeclarationEmit6_ES6.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES5.ts index 002ad4be296bb..606a4385d12d1 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES5.ts @@ -1,5 +1,7 @@ // @target: es5 // @declaration: true +// @isolatedDeclarations: false +// @isolatedDeclarationDiffReason: TODO: Negative number causes issue. GH#56562 var v = { [-1]: {}, [+1]: {}, diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES6.ts index b146f3de98a85..db09f0a66d80b 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES6.ts @@ -1,5 +1,7 @@ // @target: es6 // @declaration: true +// @isolatedDeclarations: false +// @isolatedDeclarationDiffReason: TODO: Negative number causes issue. GH#56562 var v = { [-1]: {}, [+1]: {}, From f7a65aa40158d52675d19dafa3e2bc9793c5f347 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 30 Nov 2023 16:36:14 -0500 Subject: [PATCH 162/224] Added baseline for new tests after merge. Signed-off-by: Titian Cernicova-Dragomir --- .../expandoFunctionBlockShadowing.d.ts.diff | 45 +++++++++++++++ .../dte/expandoFunctionBlockShadowing.d.ts | 56 +++++++++++++++++++ .../tsc/expandoFunctionBlockShadowing.d.ts | 33 +++++++++++ .../compiler/expandoFunctionBlockShadowing.ts | 1 + 4 files changed, 135 insertions(+) create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/expandoFunctionBlockShadowing.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionBlockShadowing.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionBlockShadowing.d.ts 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..a53108c2f5735 --- /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 TS9009: 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 TS9009: 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/expandoFunctionBlockShadowing.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionBlockShadowing.d.ts new file mode 100644 index 0000000000000..c89fc8a3c931d --- /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 TS9009: 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 TS9009: 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/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/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 From 142ff2b4bee33961a545e8aa29dc073285ec5f1d Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Fri, 1 Dec 2023 12:33:48 +0000 Subject: [PATCH 163/224] Forbid the flag of --out, --outFile with the use of --isolatedDeclarations Signed-off-by: Hana Joo --- src/compiler/program.ts | 10 ++++++++++ .../reference/isolatedDeclarations.errors.txt | 8 ++++++++ tests/baselines/reference/isolatedDeclarations.js | 14 ++++++++++++++ .../reference/isolatedDeclarations.symbols | 10 ++++++++++ .../baselines/reference/isolatedDeclarations.types | 10 ++++++++++ tests/cases/compiler/isolatedDeclarations.ts | 9 +++++++++ 6 files changed, 61 insertions(+) create mode 100644 tests/baselines/reference/isolatedDeclarations.errors.txt create mode 100644 tests/baselines/reference/isolatedDeclarations.js create mode 100644 tests/baselines/reference/isolatedDeclarations.symbols create mode 100644 tests/baselines/reference/isolatedDeclarations.types create mode 100644 tests/cases/compiler/isolatedDeclarations.ts diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 04fc89a37d0f0..cd35db47c50f7 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -4169,6 +4169,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/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/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 From 69d991a9ebb1c2d39c5e5523deb2e960e0d7eeec Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 30 Nov 2023 15:37:14 -0500 Subject: [PATCH 164/224] Deduplicated code for symbol visibility checks. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/checker.ts | 130 ++------------ .../transformers/declarations/emitBinder.ts | 3 - .../transformers/declarations/emitResolver.ts | 159 ++---------------- src/compiler/utilities.ts | 141 ++++++++++++++++ 4 files changed, 167 insertions(+), 266 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 2d0350e29408e..4056b74df126e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -108,6 +108,7 @@ import { createDiagnosticForNodeFromMessageChain, createDiagnosticMessageChainFromDiagnostic, createEmptyExports, + createEntityVisibilityChecker, createEvaluator, createFileDiagnostic, createGetCanonicalFileName, @@ -623,7 +624,6 @@ import { isJsxSpreadAttribute, isJSXTagName, isKnownSymbol, - isLateVisibilityPaintedStatement, isLeftHandSideExpression, isLineBreak, isLiteralComputedPropertyDeclarationName, @@ -821,7 +821,6 @@ import { LateBoundBinaryExpressionDeclaration, LateBoundDeclaration, LateBoundName, - LateVisibilityPaintedStatement, length, LiteralExpression, LiteralType, @@ -997,7 +996,6 @@ import { symbolName, SymbolTable, SymbolTracker, - SymbolVisibilityResult, SyntaxKind, SyntheticDefaultModuleType, SyntheticExpression, @@ -1466,6 +1464,15 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : ObjectFlags.FreshLiteral; var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes; + var { hasVisibleDeclarations, isEntityNameVisible } = createEntityVisibilityChecker({ + defaultSymbolAccessibility: SymbolAccessibility.NotAccessible, + isThisAccessible, + isDeclarationVisible, + markDeclarationAsVisible(declaration) { + getNodeLinks(declaration).isVisible = true; + }, + resolveName, + }); var checkBinaryExpression = createCheckBinaryExpression(); var emitResolver = createResolver(); var nodeBuilder = createNodeBuilder(); @@ -6162,121 +6169,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 { diff --git a/src/compiler/transformers/declarations/emitBinder.ts b/src/compiler/transformers/declarations/emitBinder.ts index a0457b1070396..9598bf13a6334 100644 --- a/src/compiler/transformers/declarations/emitBinder.ts +++ b/src/compiler/transformers/declarations/emitBinder.ts @@ -106,7 +106,6 @@ export interface EmitDeclarationSymbol { declarations: Declaration[]; signatureDeclarations?: Node[]; flags: SymbolFlags; - isVisible?: boolean; members?: EmitDeclarationSymbolTable; exports?: EmitDeclarationSymbolTable; } @@ -582,7 +581,6 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { postBindingAction.push(() => { const resolvedSymbol = resolveName(node.expression, name, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias); if (resolvedSymbol) { - resolvedSymbol.isVisible = true; resolvedSymbol.declarations.forEach(d => getNodeLinks(d).isVisible = true); } }); @@ -607,7 +605,6 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { postBindingAction.push(() => { const resolvedSymbol = resolveName(e, (e.propertyName ?? e.name).escapedText, ~0); if (resolvedSymbol) { - resolvedSymbol.isVisible = true; resolvedSymbol.declarations.forEach(d => getNodeLinks(d).isVisible = true); } }); diff --git a/src/compiler/transformers/declarations/emitResolver.ts b/src/compiler/transformers/declarations/emitResolver.ts index dd67d370b47a6..584d1cafaa2d7 100644 --- a/src/compiler/transformers/declarations/emitResolver.ts +++ b/src/compiler/transformers/declarations/emitResolver.ts @@ -1,39 +1,30 @@ import { - appendIfUnique, bindSourceFileForDeclarationEmit, ComputedPropertyName, + createEntityVisibilityChecker, createEvaluator, Debug, - Declaration, DeclarationName, determineIfDeclarationIsVisible, ElementAccessExpression, EmitDeclarationNodeLinks, EmitDeclarationSymbol, emptyArray, - EntityNameOrEntityNameExpression, EnumDeclaration, EnumMember, - every, Expression, factory, - filter, - findAncestor, forEachEntry, FunctionDeclaration, FunctionLikeDeclaration, - getAnyImportSyntax, - getFirstIdentifier, getMemberKey, getNameOfDeclaration, getParseTreeNode, - getTextOfNode, hasDynamicName, hasProperty, hasSyntacticModifier, isAccessor, isBigIntLiteral, - isBindingElement, isDeclarationReadonly, isElementAccessExpression, isEntityNameExpression, @@ -47,23 +38,17 @@ import { isGetAccessorDeclaration, isIdentifier, isInfinityOrNaNString, - isInJSFile, - isLateVisibilityPaintedStatement, isNumericLiteral, IsolatedEmitResolver, - isPartOfTypeNode, isPrefixUnaryExpression, isPropertyAccessExpression, isSetAccessor, isSetAccessorDeclaration, isStringLiteralLike, isTemplateExpression, - isThisIdentifier, isVarConst, isVariableDeclaration, - isVariableStatement, LateBoundDeclaration, - LateVisibilityPaintedStatement, ModifierFlags, Node, NodeFlags, @@ -79,17 +64,26 @@ import { SourceFile, SymbolAccessibility, SymbolFlags, - SymbolVisibilityResult, SyntaxKind, VariableDeclaration, } from "../../_namespaces/ts"; - - /** @internal */ export function createEmitDeclarationResolver(file: SourceFile): IsolatedEmitResolver { const { getNodeLinks, resolveMemberKey, resolveName, resolveEntityName } = bindSourceFileForDeclarationEmit(file); + const { isEntityNameVisible } = createEntityVisibilityChecker({ + defaultSymbolAccessibility: SymbolAccessibility.Accessible, + isDeclarationVisible, + markDeclarationAsVisible(declaration) { + getNodeLinks(declaration).isVisible = true; + }, + isThisAccessible() { + return { accessibility: SymbolAccessibility.Accessible }; + }, + resolveName, + }); + function getEnumValueFromName(name: PropertyName | NoSubstitutionTemplateLiteral, location: EnumDeclaration) { const enumKey = getMemberKey(name); if (!enumKey) return undefined; @@ -418,136 +412,11 @@ export function createEmitDeclarationResolver(file: SourceFile): IsolatedEmitRes if (node) { const links = getNodeLinks(node); if (links.isVisible === undefined) { - links.isVisible = links.symbol?.isVisible ?? !!determineIfDeclarationIsVisible(node, isDeclarationVisible); + links.isVisible = !!determineIfDeclarationIsVisible(node, isDeclarationVisible); } return links.isVisible; } return false; } - - function hasVisibleDeclarations(symbol: EmitDeclarationSymbol, shouldComputeAliasToMakeVisible: boolean): SymbolVisibilityResult | undefined { - let aliasesToMakeVisible: LateVisibilityPaintedStatement[] | undefined; - if (!every(filter(symbol.declarations, d => d.kind !== SyntaxKind.Identifier), n => getIsDeclarationVisible(n))) { - 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); - if (symbol && symbol.flags & SymbolFlags.TypeParameter && meaning & SymbolFlags.Type) { - return { accessibility: SymbolAccessibility.Accessible }; - } - if ( - !symbol && isThisIdentifier(firstIdentifier) - // TODO: isolatedDeclarations: Just assume this is accessible - // && isSymbolAccessible(getSymbolOfNode(getThisContainer(firstIdentifier, /*includeArrowFunctions*/ false)), firstIdentifier, meaning, /*computeAliases*/ false).accessibility === SymbolAccessibility.Accessible - ) { - // TODO: isolatedDeclarations: Is this ever hit for declarations ? - // debugger; - return { accessibility: SymbolAccessibility.Accessible }; - } - - // Verify if the symbol is accessible - return (symbol && hasVisibleDeclarations(symbol, /*shouldComputeAliasToMakeVisible*/ true)) || { - // TODO: isolatedDeclarations: In TS this would be an inaccessible symbol, but TS will give errors we just transform - // We don't actually keep enough information for full accessibility, - // We just do this to mark accessible imports - accessibility: SymbolAccessibility.Accessible, - errorSymbolName: getTextOfNode(firstIdentifier), - errorNode: firstIdentifier, - }; - } } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 4e4664fa3b5c3..13172b39b33f7 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -14,6 +14,7 @@ import { AnyImportSyntax, AnyValidImportOrReExport, append, + appendIfUnique, arrayFrom, ArrayLiteralExpression, ArrayTypeNode, @@ -505,8 +506,10 @@ import { SuperProperty, SwitchStatement, Symbol, + SymbolAccessibility, SymbolFlags, SymbolTable, + SymbolVisibilityResult, SyntaxKind, SyntaxList, TaggedTemplateExpression, @@ -10738,3 +10741,141 @@ export function createEvaluator({ evaluateElementAccessExpression, evaluateEntit return evaluate; } + +/** @internal */ +export function createEntityVisibilityChecker({ isDeclarationVisible, isThisAccessible, markDeclarationAsVisible: markNodeAsVisible, resolveName, defaultSymbolAccessibility }: { + defaultSymbolAccessibility: SymbolAccessibility; + isDeclarationVisible(node: Node): boolean; + isThisAccessible(identifier: Identifier, meaning: SymbolFlags): SymbolVisibilityResult; + markDeclarationAsVisible(node: Node): void; + resolveName( + location: Node | undefined, + name: __String, + meaning: SymbolFlags, + nameNotFoundMessage: DiagnosticMessage | undefined, + nameArg: __String | Identifier | undefined, + isUse: boolean, + excludeGlobals?: boolean, + getSpellingSuggestions?: boolean, + ): T | undefined; +}) { + function hasVisibleDeclarations(symbol: T, 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) { + markNodeAsVisible(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 }; +} From 1b4c121bed58eb68fdb61bbdbb1e57939ad7ffac Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Sat, 2 Dec 2023 10:27:02 -0500 Subject: [PATCH 165/224] Use TSC resolver for isolated declaration emit in TSC Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/checker.ts | 25 +- src/compiler/transformers/declarations.ts | 78 +- .../transformers/declarations/emitBinder.ts | 298 +-- .../transformers/declarations/emitResolver.ts | 33 +- .../declarations/localInferenceResolver.ts | 441 ++-- .../declarations/transpileDeclaration.ts | 2 +- src/compiler/utilities.ts | 23 + src/testRunner/compilerRunner.ts | 4 +- ...expandoFunctionNestedAssigments.errors.txt | 57 + .../expandoFunctionNestedAssigments.js | 13 + .../expandoFunctionNestedAssigments.symbols | 157 +- .../expandoFunctionNestedAssigments.types | 21 + ...ationEmitObjectLiteralAccessors1.d.ts.diff | 20 + ...mitWithInvalidPackageJsonTypings.d.ts.diff | 2 +- .../expandoFunctionNestedAssigments.d.ts.diff | 164 +- ...rtsSpecifierGenerationConditions.d.ts.diff | 2 +- ...deDeclarationEmit(module=node16).d.ts.diff | 2 +- ...DeclarationEmit(module=nodenext).d.ts.diff | 2 +- ...eDeclarationEmit1(module=node16).d.ts.diff | 2 +- ...eclarationEmit1(module=nodenext).d.ts.diff | 2 +- ...eclarationEmitObjectLiteralAccessors1.d.ts | 62 + ...tionEmitObjectLiteralAccessors1.d.ts.map.f | 627 ++++++ ...tionEmitWithInvalidPackageJsonTypings.d.ts | 2 +- .../dte/expandoFunctionNestedAssigments.d.ts | 64 +- ...sExportsSpecifierGenerationConditions.d.ts | 2 +- ...eclarationEmitObjectLiteralAccessors1.d.ts | 60 + ...tionEmitObjectLiteralAccessors1.d.ts.map.f | 587 ++++++ .../tsc/expandoFunctionNestedAssigments.d.ts | 70 +- .../diff/accessorBodyInTypeContext.d.ts.diff | 25 + .../original/diff/arrayFind.d.ts.diff | 18 + .../original/diff/asOperator1.d.ts.diff | 18 + .../original/diff/bigintIndex.d.ts.diff | 22 +- .../diff/booleanFilterAnyArray.d.ts.diff | 24 + ...apturedParametersInInitializers1.d.ts.diff | 18 + .../circularObjectLiteralAccessors.d.ts.diff | 18 + .../diff/computedPropertiesNarrowed.d.ts.diff | 19 +- .../diff/computedPropertyNames7_ES5.d.ts.diff | 15 + .../diff/computedPropertyNames7_ES6.d.ts.diff | 15 + ...contextualSignatureInstantiation.d.ts.diff | 24 + .../original/diff/contextualTyping.d.ts.diff | 27 + .../diff/contextualTyping38.d.ts.diff | 15 + .../diff/contextualTyping39.d.ts.diff | 19 + .../original/diff/correlatedUnions.d.ts.diff | 18 + ...clarationEmitNoNonRequiredParens.d.ts.diff | 14 + ...ationEmitObjectLiteralAccessors1.d.ts.diff | 20 + ...tionEmitPropertyNumericStringKey.d.ts.diff | 20 + ...tionEmitShadowingInferNotRenamed.d.ts.diff | 17 + ...ionEmitWithDefaultAsComputedName.d.ts.diff | 18 + ...onEmitWithDefaultAsComputedName2.d.ts.diff | 18 + ...ectLiteralProperty_computedName1.d.ts.diff | 18 + ...ectLiteralProperty_computedName2.d.ts.diff | 30 + ...catePropertiesInTypeAssertions01.d.ts.diff | 17 + ...catePropertiesInTypeAssertions02.d.ts.diff | 17 + ...uplicateVarsAcrossFileBoundaries.d.ts.diff | 27 + .../original/diff/dynamicNames.d.ts.diff | 22 + .../diff/escapedIdentifiers.d.ts.diff | 20 + .../diff/generatedContextualTyping.d.ts.diff | 27 + ...TypeReferenceWithoutTypeArgument.d.ts.diff | 31 + ...ypeReferenceWithoutTypeArgument2.d.ts.diff | 29 + .../diff/gettersAndSettersErrors.d.ts.diff | 18 + ...tionOutputGetsTruncatedWithError.d.ts.diff | 24 + .../diff/inKeywordAndIntersection.d.ts.diff | 20 + .../literalTypesAndTypeAssertions.d.ts.diff | 18 + ...ithAsClauseAndLateBoundProperty2.d.ts.diff | 107 + .../original/diff/namedTupleMembers.d.ts.diff | 18 + .../diff/noUncheckedIndexedAccess.d.ts.diff | 20 + ...deDeclarationEmit(module=node16).d.ts.diff | 15 + ...DeclarationEmit(module=nodenext).d.ts.diff | 15 + ...arationEmitErrors(module=node16).d.ts.diff | 53 + ...ationEmitErrors(module=nodenext).d.ts.diff | 53 + ...eDeclarationEmit1(module=node16).d.ts.diff | 16 + ...eclarationEmit1(module=nodenext).d.ts.diff | 16 + ...rationEmitErrors1(module=node16).d.ts.diff | 54 + ...tionEmitErrors1(module=nodenext).d.ts.diff | 54 + ...alComputedNameNoDeclarationError.d.ts.diff | 16 + .../objectLiteralEnumPropertyNames.d.ts.diff | 49 + .../objectLiteralGettersAndSetters.d.ts.diff | 34 + .../diff/optionalChainingInference.d.ts.diff | 18 + .../diff/parseAssertEntriesError.d.ts.diff | 20 + .../diff/parseImportAttributesError.d.ts.diff | 20 + .../parseInvalidNonNullableTypes.d.ts.diff | 21 + .../diff/parseInvalidNullableTypes.d.ts.diff | 21 + .../original/diff/parseTypes.d.ts.diff | 24 + .../diff/recursiveTypesWithTypeof.d.ts.diff | 40 + ...structuredPropertyInFunctionType.d.ts.diff | 24 + ...ringLiteralsWithTypeAssertions01.d.ts.diff | 14 + .../original/diff/thisTypeErrors.d.ts.diff | 28 + .../diff/thisTypeInAccessors.d.ts.diff | 19 + .../dte/accessorBodyInTypeContext.d.ts | 73 + .../original/dte/arrayFind.d.ts | 45 + .../original/dte/asOperator1.d.ts | 41 + .../original/dte/bigintIndex.d.ts | 9 +- .../original/dte/booleanFilterAnyArray.d.ts | 94 + .../capturedParametersInInitializers1.d.ts | 170 ++ .../dte/circularObjectLiteralAccessors.d.ts | 29 + .../dte/computedPropertyNames7_ES5.d.ts | 21 + .../dte/computedPropertyNames7_ES6.d.ts | 21 + .../dte/contextualSignatureInstantiation.d.ts | 124 ++ .../original/dte/contextualTyping.d.ts | 601 ++++++ .../original/dte/contextualTyping38.d.ts | 13 + .../original/dte/contextualTyping39.d.ts | 25 + .../original/dte/correlatedUnions.d.ts | 830 ++++++++ .../declarationEmitNoNonRequiredParens.d.ts | 23 + ...eclarationEmitObjectLiteralAccessors1.d.ts | 61 + ...clarationEmitPropertyNumericStringKey.d.ts | 32 + ...clarationEmitShadowingInferNotRenamed.d.ts | 38 + ...larationEmitWithDefaultAsComputedName.d.ts | 58 + ...arationEmitWithDefaultAsComputedName2.d.ts | 58 + ...teObjectLiteralProperty_computedName1.d.ts | 125 ++ ...teObjectLiteralProperty_computedName2.d.ts | 97 + ...duplicatePropertiesInTypeAssertions01.d.ts | 27 + ...duplicatePropertiesInTypeAssertions02.d.ts | 27 + .../duplicateVarsAcrossFileBoundaries.d.ts | 115 ++ .../original/dte/dynamicNames.d.ts | 366 ++++ .../original/dte/escapedIdentifiers.d.ts | 310 +++ .../dte/generatedContextualTyping.d.ts | 1822 +++++++++++++++++ ...nericTypeReferenceWithoutTypeArgument.d.ts | 205 ++ ...ericTypeReferenceWithoutTypeArgument2.d.ts | 214 ++ .../original/dte/gettersAndSettersErrors.d.ts | 80 + ...clarationOutputGetsTruncatedWithError.d.ts | 36 + .../dte/inKeywordAndIntersection.d.ts | 99 + .../dte/literalTypesAndTypeAssertions.d.ts | 66 + ...TypeWithAsClauseAndLateBoundProperty2.d.ts | 14 + .../original/dte/namedTupleMembers.d.ts | 207 ++ .../dte/noUncheckedIndexedAccess.d.ts | 416 ++++ ...ypeModeDeclarationEmit(module=node16).d.ts | 32 + ...eModeDeclarationEmit(module=nodenext).d.ts | 32 + ...eDeclarationEmitErrors(module=node16).d.ts | 447 ++++ ...eclarationEmitErrors(module=nodenext).d.ts | 447 ++++ ...peModeDeclarationEmit1(module=node16).d.ts | 32 + ...ModeDeclarationEmit1(module=nodenext).d.ts | 32 + ...DeclarationEmitErrors1(module=node16).d.ts | 435 ++++ ...clarationEmitErrors1(module=nodenext).d.ts | 435 ++++ ...LiteralComputedNameNoDeclarationError.d.ts | 23 + .../dte/objectLiteralEnumPropertyNames.d.ts | 102 + .../dte/objectLiteralGettersAndSetters.d.ts | 287 +++ .../dte/optionalChainingInference.d.ts | 128 ++ .../original/dte/parseAssertEntriesError.d.ts | 162 ++ .../dte/parseImportAttributesError.d.ts | 168 ++ .../dte/parseInvalidNonNullableTypes.d.ts | 127 ++ .../dte/parseInvalidNullableTypes.d.ts | 143 ++ .../original/dte/parseTypes.d.ts | 77 + .../dte/recursiveTypesWithTypeof.d.ts | 200 ++ ...ingDestructuredPropertyInFunctionType.d.ts | 372 ++++ .../stringLiteralsWithTypeAssertions01.d.ts | 24 + .../original/dte/thisTypeErrors.d.ts | 278 +++ .../original/dte/thisTypeInAccessors.d.ts | 144 ++ .../tsc/accessorBodyInTypeContext.d.ts | 73 + .../original/tsc/arrayFind.d.ts | 45 + .../original/tsc/asOperator1.d.ts | 41 + .../original/tsc/bigintIndex.d.ts | 9 +- .../original/tsc/booleanFilterAnyArray.d.ts | 94 + .../capturedParametersInInitializers1.d.ts | 170 ++ .../tsc/circularObjectLiteralAccessors.d.ts | 28 + .../tsc/computedPropertiesNarrowed.d.ts | 4 +- .../tsc/computedPropertyNames7_ES5.d.ts | 21 + .../tsc/computedPropertyNames7_ES6.d.ts | 21 + .../tsc/contextualSignatureInstantiation.d.ts | 124 ++ .../original/tsc/contextualTyping.d.ts | 597 ++++++ .../original/tsc/contextualTyping38.d.ts | 11 + .../original/tsc/contextualTyping39.d.ts | 23 + .../original/tsc/correlatedUnions.d.ts | 830 ++++++++ .../declarationEmitNoNonRequiredParens.d.ts | 23 + ...eclarationEmitObjectLiteralAccessors1.d.ts | 59 + ...clarationEmitPropertyNumericStringKey.d.ts | 32 + ...clarationEmitShadowingInferNotRenamed.d.ts | 36 + ...larationEmitWithDefaultAsComputedName.d.ts | 58 + ...arationEmitWithDefaultAsComputedName2.d.ts | 58 + ...teObjectLiteralProperty_computedName1.d.ts | 125 ++ ...teObjectLiteralProperty_computedName2.d.ts | 97 + ...duplicatePropertiesInTypeAssertions01.d.ts | 26 + ...duplicatePropertiesInTypeAssertions02.d.ts | 26 + .../duplicateVarsAcrossFileBoundaries.d.ts | 115 ++ .../original/tsc/dynamicNames.d.ts | 366 ++++ .../original/tsc/escapedIdentifiers.d.ts | 310 +++ .../tsc/generatedContextualTyping.d.ts | 1818 ++++++++++++++++ ...nericTypeReferenceWithoutTypeArgument.d.ts | 205 ++ ...ericTypeReferenceWithoutTypeArgument2.d.ts | 214 ++ .../original/tsc/gettersAndSettersErrors.d.ts | 80 + ...clarationOutputGetsTruncatedWithError.d.ts | 25 + .../tsc/inKeywordAndIntersection.d.ts | 97 + .../tsc/literalTypesAndTypeAssertions.d.ts | 66 + ...TypeWithAsClauseAndLateBoundProperty2.d.ts | 106 + .../original/tsc/namedTupleMembers.d.ts | 207 ++ .../tsc/noUncheckedIndexedAccess.d.ts | 416 ++++ ...ypeModeDeclarationEmit(module=node16).d.ts | 32 + ...eModeDeclarationEmit(module=nodenext).d.ts | 32 + ...eDeclarationEmitErrors(module=node16).d.ts | 447 ++++ ...eclarationEmitErrors(module=nodenext).d.ts | 447 ++++ ...peModeDeclarationEmit1(module=node16).d.ts | 32 + ...ModeDeclarationEmit1(module=nodenext).d.ts | 32 + ...DeclarationEmitErrors1(module=node16).d.ts | 435 ++++ ...clarationEmitErrors1(module=nodenext).d.ts | 435 ++++ ...LiteralComputedNameNoDeclarationError.d.ts | 23 + .../tsc/objectLiteralEnumPropertyNames.d.ts | 102 + .../tsc/objectLiteralGettersAndSetters.d.ts | 283 +++ .../tsc/optionalChainingInference.d.ts | 128 ++ .../original/tsc/parseAssertEntriesError.d.ts | 162 ++ .../tsc/parseImportAttributesError.d.ts | 168 ++ .../tsc/parseInvalidNonNullableTypes.d.ts | 127 ++ .../tsc/parseInvalidNullableTypes.d.ts | 143 ++ .../original/tsc/parseTypes.d.ts | 73 + .../tsc/recursiveTypesWithTypeof.d.ts | 200 ++ ...ingDestructuredPropertyInFunctionType.d.ts | 372 ++++ .../stringLiteralsWithTypeAssertions01.d.ts | 24 + .../original/tsc/thisTypeErrors.d.ts | 278 +++ .../original/tsc/thisTypeInAccessors.d.ts | 143 ++ .../compiler/accessorBodyInTypeContext.ts | 1 + tests/cases/compiler/arrayFind.ts | 1 + tests/cases/compiler/booleanFilterAnyArray.ts | 5 +- .../capturedParametersInInitializers1.ts | 1 + .../circularObjectLiteralAccessors.ts | 1 + tests/cases/compiler/contextualTyping.ts | 1 + tests/cases/compiler/contextualTyping38.ts | 1 + tests/cases/compiler/contextualTyping39.ts | 1 + tests/cases/compiler/correlatedUnions.ts | 1 + .../declarationEmitNoNonRequiredParens.ts | 1 + .../declarationEmitObjectLiteralAccessors1.ts | 1 + ...declarationEmitPropertyNumericStringKey.ts | 1 + ...declarationEmitShadowingInferNotRenamed.ts | 1 + ...eclarationEmitWithDefaultAsComputedName.ts | 1 + ...clarationEmitWithDefaultAsComputedName2.ts | 1 + ...cateObjectLiteralProperty_computedName1.ts | 1 + ...cateObjectLiteralProperty_computedName2.ts | 1 + .../duplicateVarsAcrossFileBoundaries.ts | 1 + tests/cases/compiler/dynamicNames.ts | 1 + tests/cases/compiler/escapedIdentifiers.ts | 1 + .../expandoFunctionNestedAssigments.ts | 6 + .../cases/compiler/gettersAndSettersErrors.ts | 1 + ...DeclarationOutputGetsTruncatedWithError.ts | 2 + .../compiler/inKeywordAndIntersection.ts | 1 + ...edTypeWithAsClauseAndLateBoundProperty2.ts | 1 + ...ctLiteralComputedNameNoDeclarationError.ts | 1 + .../objectLiteralEnumPropertyNames.ts | 1 + .../cases/compiler/parseAssertEntriesError.ts | 1 + .../compiler/parseImportAttributesError.ts | 1 + .../compiler/parseInvalidNonNullableTypes.ts | 1 + .../compiler/parseInvalidNullableTypes.ts | 1 + tests/cases/compiler/parseTypes.ts | 1 + ...amingDestructuredPropertyInFunctionType.ts | 1 + .../computedPropertyNames7_ES5.ts | 1 + .../computedPropertyNames7_ES6.ts | 1 + .../expressions/asOperator/asOperator1.ts | 1 + .../generatedContextualTyping.ts | 1 + .../objectLiteralGettersAndSetters.ts | 1 + .../optionalChainingInference.ts | 1 + .../duplicatePropertiesInTypeAssertions01.ts | 1 + .../duplicatePropertiesInTypeAssertions02.ts | 1 + .../negateOperatorInvalidOperations.ts | 1 + ...ImportAttributesTypeModeDeclarationEmit.ts | 3 +- ...AttributesTypeModeDeclarationEmitErrors.ts | 1 + ...deModulesImportTypeModeDeclarationEmit1.ts | 3 +- ...lesImportTypeModeDeclarationEmitErrors1.ts | 1 + .../parserCastVersusArrowFunction1.ts | 2 + .../pedantic/noUncheckedIndexedAccess.ts | 1 + .../literal/literalTypesAndTypeAssertions.ts | 1 + .../stringLiteralsWithTypeAssertions01.ts | 3 +- .../typeQueries/recursiveTypesWithTypeof.ts | 1 + ...genericTypeReferenceWithoutTypeArgument.ts | 1 + ...enericTypeReferenceWithoutTypeArgument2.ts | 1 + .../types/thisType/thisTypeErrors.ts | 1 + .../types/thisType/thisTypeInAccessors.ts | 1 + .../types/tuple/named/namedTupleMembers.ts | 1 + .../contextualSignatureInstantiation.ts | 1 + 264 files changed, 25231 insertions(+), 647 deletions(-) create mode 100644 tests/baselines/reference/expandoFunctionNestedAssigments.errors.txt create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts.map.f create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectLiteralAccessors1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectLiteralAccessors1.d.ts.map.f create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/accessorBodyInTypeContext.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/arrayFind.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/asOperator1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/booleanFilterAnyArray.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/capturedParametersInInitializers1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/circularObjectLiteralAccessors.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames7_ES5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames7_ES6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/contextualSignatureInstantiation.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/contextualTyping.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/contextualTyping38.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/contextualTyping39.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/correlatedUnions.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/declarationEmitNoNonRequiredParens.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/declarationEmitObjectLiteralAccessors1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/declarationEmitPropertyNumericStringKey.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/declarationEmitShadowingInferNotRenamed.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/declarationEmitWithDefaultAsComputedName.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/declarationEmitWithDefaultAsComputedName2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/duplicateObjectLiteralProperty_computedName1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/duplicateObjectLiteralProperty_computedName2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/duplicatePropertiesInTypeAssertions01.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/duplicatePropertiesInTypeAssertions02.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/duplicateVarsAcrossFileBoundaries.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/dynamicNames.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/escapedIdentifiers.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/generatedContextualTyping.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/genericTypeReferenceWithoutTypeArgument.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/genericTypeReferenceWithoutTypeArgument2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/gettersAndSettersErrors.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/hugeDeclarationOutputGetsTruncatedWithError.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/inKeywordAndIntersection.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/literalTypesAndTypeAssertions.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/namedTupleMembers.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/noUncheckedIndexedAccess.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=node16).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=nodenext).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/nodeModulesImportTypeModeDeclarationEmitErrors1(module=nodenext).d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/objectLiteralComputedNameNoDeclarationError.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/objectLiteralEnumPropertyNames.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/objectLiteralGettersAndSetters.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/optionalChainingInference.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parseAssertEntriesError.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parseImportAttributesError.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parseInvalidNonNullableTypes.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parseInvalidNullableTypes.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parseTypes.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/recursiveTypesWithTypeof.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/renamingDestructuredPropertyInFunctionType.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/stringLiteralsWithTypeAssertions01.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/thisTypeErrors.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/thisTypeInAccessors.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/accessorBodyInTypeContext.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/arrayFind.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/asOperator1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/booleanFilterAnyArray.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/capturedParametersInInitializers1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/circularObjectLiteralAccessors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames7_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames7_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/contextualSignatureInstantiation.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/contextualTyping.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/contextualTyping38.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/contextualTyping39.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/correlatedUnions.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/declarationEmitNoNonRequiredParens.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/declarationEmitObjectLiteralAccessors1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/declarationEmitPropertyNumericStringKey.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/declarationEmitShadowingInferNotRenamed.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/duplicateObjectLiteralProperty_computedName1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/duplicateObjectLiteralProperty_computedName2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/duplicatePropertiesInTypeAssertions01.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/duplicatePropertiesInTypeAssertions02.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/duplicateVarsAcrossFileBoundaries.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/dynamicNames.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/escapedIdentifiers.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/generatedContextualTyping.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/gettersAndSettersErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/hugeDeclarationOutputGetsTruncatedWithError.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/inKeywordAndIntersection.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/literalTypesAndTypeAssertions.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/namedTupleMembers.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/noUncheckedIndexedAccess.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportTypeModeDeclarationEmitErrors1(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/objectLiteralComputedNameNoDeclarationError.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/objectLiteralEnumPropertyNames.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/objectLiteralGettersAndSetters.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/optionalChainingInference.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parseAssertEntriesError.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parseImportAttributesError.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNonNullableTypes.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNullableTypes.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parseTypes.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/recursiveTypesWithTypeof.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/renamingDestructuredPropertyInFunctionType.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/stringLiteralsWithTypeAssertions01.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/thisTypeErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/thisTypeInAccessors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/accessorBodyInTypeContext.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/arrayFind.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/asOperator1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/booleanFilterAnyArray.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/capturedParametersInInitializers1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/circularObjectLiteralAccessors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames7_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames7_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/contextualSignatureInstantiation.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping38.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping39.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/correlatedUnions.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitNoNonRequiredParens.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitObjectLiteralAccessors1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitPropertyNumericStringKey.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitShadowingInferNotRenamed.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/duplicateObjectLiteralProperty_computedName1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/duplicateObjectLiteralProperty_computedName2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/duplicatePropertiesInTypeAssertions01.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/duplicatePropertiesInTypeAssertions02.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/duplicateVarsAcrossFileBoundaries.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/dynamicNames.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/escapedIdentifiers.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/generatedContextualTyping.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/gettersAndSettersErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/hugeDeclarationOutputGetsTruncatedWithError.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/inKeywordAndIntersection.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/literalTypesAndTypeAssertions.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/namedTupleMembers.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/noUncheckedIndexedAccess.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportAttributesTypeModeDeclarationEmit(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportAttributesTypeModeDeclarationEmit(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportTypeModeDeclarationEmit1(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportTypeModeDeclarationEmit1(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportTypeModeDeclarationEmitErrors1(module=nodenext).d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralComputedNameNoDeclarationError.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralEnumPropertyNames.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralGettersAndSetters.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/optionalChainingInference.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parseAssertEntriesError.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parseImportAttributesError.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNonNullableTypes.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNullableTypes.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parseTypes.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/recursiveTypesWithTypeof.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/renamingDestructuredPropertyInFunctionType.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/stringLiteralsWithTypeAssertions01.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/thisTypeErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/thisTypeInAccessors.d.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 8dde155663b1f..6b76ce9404344 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -461,7 +461,6 @@ import { isAssignmentTarget, isAutoAccessorPropertyDeclaration, isAwaitExpression, - isBigIntLiteral, isBinaryExpression, isBindableObjectDefinePropertyCall, isBindableStaticElementAccessExpression, @@ -678,6 +677,7 @@ import { isPartOfTypeQuery, isPlainJsFile, isPrefixUnaryExpression, + isPrimitiveLiteralValue, isPrivateIdentifier, isPrivateIdentifierClassElementDeclaration, isPrivateIdentifierPropertyAccessExpression, @@ -721,7 +721,6 @@ import { isSuperCall, isSuperProperty, isTaggedTemplateExpression, - isTemplateExpression, isTemplateSpan, isThisContainerOrFunctionBlock, isThisIdentifier, @@ -47885,26 +47884,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return undefined; } - function isPrimitiveLiteralValue(node: Expression): boolean { - if (isNumericLiteral(node) || isBigIntLiteral(node) || isStringLiteralLike(node)) return true; - - if (node.kind === SyntaxKind.TrueKeyword || node.kind === SyntaxKind.FalseKeyword) return true; - - if (isPrefixUnaryExpression(node)) { - const operand = node.operand; - if (node.operator === SyntaxKind.MinusToken) { - return isNumericLiteral(operand) || isBigIntLiteral(operand); - } - if (node.operator === SyntaxKind.PlusToken) { - return isNumericLiteral(operand); - } - } - if (isTemplateExpression(node)) { - return node.templateSpans.every(t => isPrimitiveLiteralValue(t.expression)); - } - return false; - } - function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration): boolean { if (isDeclarationReadonly(node) || (isVariableDeclaration(node) && isVarConstLike(node)) || isEnumMember(node)) { if (compilerOptions.isolatedDeclarations) { @@ -47916,7 +47895,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } function isLiteralComputedName(node: ComputedPropertyName) { const expression = node.expression; - if (isPrimitiveLiteralValue(expression)) { + if (isPrimitiveLiteralValue(expression, /*includeBigInt*/ false)) { return true; } const type = getTypeOfExpression(expression); diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 2a0b1c172c541..24383a4a9cd98 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -293,7 +293,7 @@ const declarationEmitNodeBuilderFlags = NodeBuilderFlags.MultilineObjectLiterals * * @internal */ -export function transformDeclarations(context: TransformationContext) { +export function transformDeclarations(context: TransformationContext, _useTscEmit = true) { const throwDiagnostic = () => Debug.fail("Diagnostic emitted without context"); let getSymbolAccessibilityDiagnostic: GetSymbolAccessibilityDiagnostic = throwDiagnostic; let needsDeclare = true; @@ -318,20 +318,30 @@ 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 { localInferenceResolver, isolatedDeclarations, host, resolver, symbolTracker, ensureNoInitializer } = createTransformerServices(); + const { localInferenceResolver, isolatedDeclarations, host, resolver, symbolTracker, ensureNoInitializer, useTscEmit } = createTransformerServices(); const options = context.getCompilerOptions(); const { noResolve, stripInternal } = options; return transformRoot; function createTransformerServices(): { isolatedDeclarations: true; + useTscEmit: false; resolver: IsolatedEmitResolver; localInferenceResolver: LocalInferenceResolver; host: undefined; symbolTracker: undefined; ensureNoInitializer: (node: CanHaveLiteralInitializer) => Expression | undefined; + } | { + isolatedDeclarations: true; + useTscEmit: true; + resolver: EmitResolver; + localInferenceResolver: LocalInferenceResolver; + host: EmitHost; + symbolTracker: SymbolTracker; + ensureNoInitializer: (node: CanHaveLiteralInitializer) => Expression | undefined; } | { isolatedDeclarations: false; + useTscEmit: false; resolver: EmitResolver; localInferenceResolver: undefined; host: EmitHost; @@ -353,23 +363,45 @@ export function transformDeclarations(context: TransformationContext) { }); if (isolatedDeclarations) { - const resolver: IsolatedEmitResolver = context.getEmitResolver(); - // Ideally nothing should require the symbol tracker in isolated declarations mode. - // createLiteralConstValue is teh one exception - const emptySymbolTracker = {}; - return { - isolatedDeclarations, - resolver, - localInferenceResolver, - symbolTracker: undefined, - host: undefined, - ensureNoInitializer: (node: CanHaveLiteralInitializer) => { - if (shouldPrintWithInitializer(node)) { - return resolver.createLiteralConstValue(getParseTreeNode(node) as CanHaveLiteralInitializer, emptySymbolTracker); // TODO: Make safe - } - return undefined; - }, - }; + if (!_useTscEmit) { + const resolver: IsolatedEmitResolver = context.getEmitResolver(); + // Ideally nothing should require the symbol tracker in isolated declarations mode. + // createLiteralConstValue is the one exception + const emptySymbolTracker = {}; + return { + isolatedDeclarations, + useTscEmit: false, + resolver, + localInferenceResolver, + symbolTracker: undefined, + host: undefined, + ensureNoInitializer: (node: CanHaveLiteralInitializer) => { + if (shouldPrintWithInitializer(node)) { + return resolver.createLiteralConstValue(getParseTreeNode(node) as CanHaveLiteralInitializer, emptySymbolTracker); // TODO: Make safe + } + return undefined; + }, + }; + } + else { + const host = context.getEmitHost(); + const resolver: EmitResolver = context.getEmitResolver(); + const symbolTracker = createSymbolTracker(resolver, host); + return { + isolatedDeclarations, + useTscEmit: true, + resolver, + localInferenceResolver, + symbolTracker, + host, + ensureNoInitializer: (node: CanHaveLiteralInitializer) => { + if (shouldPrintWithInitializer(node)) { + return resolver.createLiteralConstValue(getParseTreeNode(node) as CanHaveLiteralInitializer, symbolTracker); // TODO: Make safe + } + return undefined; + }, + }; + } } else { const host = context.getEmitHost(); @@ -377,6 +409,7 @@ export function transformDeclarations(context: TransformationContext) { const symbolTracker: SymbolTracker = createSymbolTracker(resolver, host); return { isolatedDeclarations, + useTscEmit: false, localInferenceResolver, resolver, symbolTracker, @@ -918,7 +951,10 @@ export function transformDeclarations(context: TransformationContext) { return; } if (isolatedDeclarations) { - return localInferenceResolver.fromInitializer(node, type, currentSourceFile); + const { typeNode, isInvalid } = localInferenceResolver.fromInitializer(node, type, currentSourceFile); + if (!useTscEmit || isInvalid) { + return typeNode; + } } const shouldUseResolverType = node.kind === SyntaxKind.Parameter && (resolver.isRequiredInitializedParameter(node) || @@ -1571,7 +1607,7 @@ export function transformDeclarations(context: TransformationContext) { }); errorFallbackNode = input; const type = isolatedDeclarations ? - localInferenceResolver.fromInitializer(input, /*type*/ undefined, currentSourceFile) : + 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; diff --git a/src/compiler/transformers/declarations/emitBinder.ts b/src/compiler/transformers/declarations/emitBinder.ts index 9598bf13a6334..5d2b039fd25be 100644 --- a/src/compiler/transformers/declarations/emitBinder.ts +++ b/src/compiler/transformers/declarations/emitBinder.ts @@ -1,34 +1,33 @@ import { __String, ArrayBindingElement, - BinaryExpression, BindingPattern, - ClassDeclaration, - ClassElement, ComputedPropertyName, - Debug, Declaration, EnumDeclaration, - EnumMember, Expression, factory, findAncestor, forEachChild, - FunctionDeclaration, + getCombinedNodeFlags, getModuleInstanceState, getNodeId, hasAmbientModifier, hasSyntacticModifier, - InterfaceDeclaration, + isAccessor, + isArrayBindingPattern, isBinaryExpression, isBindingPattern, isBlock, + isBlockOrCatchScoped, isBlockScopedContainerTopLevel, isClassDeclaration, + isClassExpression, isComputedPropertyName, isConditionalTypeNode, isConstructorDeclaration, isConstructSignatureDeclaration, + isDeclaration, isDoStatement, isElementAccessExpression, isEnumConst, @@ -47,13 +46,18 @@ import { isImportEqualsDeclaration, isInferTypeNode, isInterfaceDeclaration, + isJsxNamespacedName, isLabeledStatement, isMappedTypeNode, + isMethodDeclaration, isModuleBlock, isModuleDeclaration, isNamedExports, isNumericLiteral, - isParameterDeclaration, + isObjectBindingPattern, + isObjectLiteralExpression, + isParenthesizedExpression, + isParenthesizedTypeNode, isPrefixUnaryExpression, isPrivateIdentifier, isPropertyAccessExpression, @@ -61,6 +65,7 @@ import { isSourceFile, isStringLiteralLike, isTypeAliasDeclaration, + isTypeLiteralNode, isVarConst, isVariableDeclaration, isVariableDeclarationList, @@ -70,19 +75,20 @@ import { ModifierFlags, ModuleDeclaration, ModuleInstanceState, + NamedDeclaration, Node, NodeArray, + NodeFlags, NoSubstitutionTemplateLiteral, - ObjectLiteralElement, + ObjectLiteralExpression, ParameterDeclaration, + PropertyDeclaration, PropertyName, setValueDeclaration, SourceFile, Symbol, SymbolFlags, SyntaxKind, - TypeAliasDeclaration, - TypeElement, TypeParameterDeclaration, VariableDeclaration, } from "../../_namespaces/ts"; @@ -102,8 +108,10 @@ export type EmitDeclarationSymbolTable = Map; /** @internal */ export interface EmitDeclarationSymbol { name?: MemberKey; + parent?: EmitDeclarationSymbol; exportSymbol?: EmitDeclarationSymbol; declarations: Declaration[]; + valueDeclaration?: Declaration; signatureDeclarations?: Node[]; flags: SymbolFlags; members?: EmitDeclarationSymbolTable; @@ -117,7 +125,10 @@ interface SymbolRegistrationFlags { const syntaxKindToSymbolMap = { [SyntaxKind.TypeParameter]: { includes: SymbolFlags.TypeParameter, excludes: SymbolFlags.TypeParameterExcludes }, [SyntaxKind.Parameter]: { includes: SymbolFlags.FunctionScopedVariable, excludes: SymbolFlags.ParameterExcludes }, - [SyntaxKind.VariableDeclaration]: { includes: SymbolFlags.BlockScopedVariable, excludes: SymbolFlags.BlockScopedVariableExcludes }, + [SyntaxKind.VariableDeclaration]: { + fnScope: { includes: SymbolFlags.FunctionScopedVariable, excludes: SymbolFlags.FunctionScopedVariableExcludes }, + blockScope: { includes: SymbolFlags.BlockScopedVariable, excludes: SymbolFlags.BlockScopedVariableExcludes }, + }, [SyntaxKind.BindingElement]: { includes: SymbolFlags.BlockScopedVariable, excludes: SymbolFlags.BlockScopedVariableExcludes }, [SyntaxKind.PropertyDeclaration]: { includes: SymbolFlags.Property, excludes: SymbolFlags.PropertyExcludes }, [SyntaxKind.PropertySignature]: { includes: SymbolFlags.Property, excludes: SymbolFlags.PropertyExcludes }, @@ -240,6 +251,11 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { } function getSymbolFlagsForNode(node: Node & { kind: keyof typeof syntaxKindToSymbolMap; }) { + if (node.kind === SyntaxKind.VariableDeclaration) { + return getCombinedNodeFlags(node) & NodeFlags.BlockScoped ? + syntaxKindToSymbolMap[node.kind].blockScope : + syntaxKindToSymbolMap[node.kind].fnScope; + } if (node.kind === SyntaxKind.EnumDeclaration) { return isEnumConst(node as EnumDeclaration) ? syntaxKindToSymbolMap[node.kind].const : @@ -252,30 +268,33 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { } return syntaxKindToSymbolMap[node.kind]; } - function getElementFlagsOrThrow(node: Node) { - const result = getSymbolFlagsForNode(node as Node & { kind: keyof typeof syntaxKindToSymbolMap; }); - if (!result) { - throw new Error("Unknown binding element type"); - } - return result; - } - function bind() { /* eslint-disable no-var */ var currentScope: Node = undefined!; + var currentFunctionLocalSymbolTable: EmitDeclarationSymbolTable = undefined!; var currentSymbol: EmitDeclarationSymbol = undefined!; var currentLocalSymbolTable: EmitDeclarationSymbolTable = undefined!; var currentExportsSymbolTable: EmitDeclarationSymbolTable | undefined; var postBindingAction: (() => void)[] = []; var fileLinks = getNodeLinks(file).symbol = createEmitSymbol(); + fileLinks.declarations.push(file); + setValueDeclaration(fileLinks as Symbol, file); /* eslint-enable no-var */ fileLinks.exports = new Map(); withScope(file, fileLinks.exports, () => bindEachFunctionsFirst(file.statements)); postBindingAction.forEach(fn => fn()); + function createAnonymousEmitSymbol(node: Declaration): EmitDeclarationSymbol { + const symbol = createEmitSymbol(); + symbol.declarations.push(node); + setValueDeclaration(symbol as Symbol, node); + node.symbol = symbol as Symbol; + return symbol; + } function createEmitSymbol(): EmitDeclarationSymbol { return { + parent: currentSymbol, declarations: [], flags: 0, }; @@ -289,11 +308,11 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { } return symbol; } - function addLocalAndExportDeclaration(name: LocalAndExportName | MemberKey | undefined, node: Declaration, flags: SymbolRegistrationFlags, isExport: boolean) { + function addLocalAndExportDeclaration(name: LocalAndExportName | MemberKey | undefined, node: Declaration, flags: SymbolRegistrationFlags, isExport: boolean, isBlockScoped = true) { const { exportName, localName } = typeof name === "object" ? name : { exportName: name, localName: name }; if (isExport) { const exportKind = flags.includes & SymbolFlags.Value ? SymbolFlags.ExportValue : 0; - const localSymbol = addLocalOnlyDeclaration(localName, node, { includes: exportKind, excludes: flags.excludes }); + const localSymbol = addLocalOnlyDeclaration(localName, node, { includes: exportKind, excludes: flags.excludes }, isBlockScoped); const exportSymbol = addExportOnlyDeclaration(exportName, node, flags); localSymbol.exportSymbol = exportSymbol; // Export symbol can be undefined if the export modifier was placed in an unexpected position. @@ -301,7 +320,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { return exportSymbol ?? localSymbol; } else { - return addLocalOnlyDeclaration(localName, node, flags); + return addLocalOnlyDeclaration(localName, node, flags, isBlockScoped); } } function addExportOnlyDeclaration(name: MemberKey | undefined, node: Declaration, flagsAndForbiddenFlags: SymbolRegistrationFlags) { @@ -310,8 +329,8 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { } return addDeclaration(currentExportsSymbolTable, name, node, flagsAndForbiddenFlags); } - function addLocalOnlyDeclaration(name: MemberKey | undefined, node: Declaration, flagsAndForbiddenFlags: SymbolRegistrationFlags) { - return addDeclaration(currentLocalSymbolTable, name, node, flagsAndForbiddenFlags); + function addLocalOnlyDeclaration(name: MemberKey | undefined, node: Declaration, flagsAndForbiddenFlags: SymbolRegistrationFlags, isBlockScoped = true) { + return addDeclaration(isBlockScoped ? currentLocalSymbolTable : currentFunctionLocalSymbolTable, name, node, flagsAndForbiddenFlags); } function addDeclaration(table: EmitDeclarationSymbolTable, name: MemberKey | undefined, node: Declaration, { includes, excludes }: SymbolRegistrationFlags) { @@ -324,21 +343,25 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { } } symbol.declarations.push(node); - symbol.flags |= includes; setValueDeclaration(symbol as Symbol, node); + symbol.flags |= includes; getNodeLinks(node).symbol = symbol; // Some parts of declarations.ts use the symbol directly. We provide enough of it for everything to work. node.symbol = symbol as Symbol; return symbol; } function withScope(scope: Node, exports: EmitDeclarationSymbolTable | undefined, fn: () => void) { - const old = [currentScope, currentLocalSymbolTable, currentExportsSymbolTable] as const; + const old = [currentScope, currentSymbol, currentFunctionLocalSymbolTable, currentLocalSymbolTable, currentExportsSymbolTable] as const; currentScope = scope; const links = getNodeLinks(scope); currentLocalSymbolTable = links.locals ??= new Map(); + currentSymbol = links.symbol ?? currentSymbol; currentExportsSymbolTable = exports; + if (isBlockScopedContainerTopLevel(scope)) { + currentFunctionLocalSymbolTable = currentLocalSymbolTable; + } fn(); - [currentScope, currentLocalSymbolTable, currentExportsSymbolTable] = old; + [currentScope, currentSymbol, currentFunctionLocalSymbolTable, currentLocalSymbolTable, currentExportsSymbolTable] = old; } function withMembers(symbol: EmitDeclarationSymbol, table: "members" | "exports" = "members", fn: () => void) { const old = [currentLocalSymbolTable, currentSymbol] as const; @@ -352,72 +375,29 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { exportName?: MemberKey; localName?: MemberKey; } - function getStatementName(s: TypeAliasDeclaration | EnumDeclaration | InterfaceDeclaration | ClassDeclaration | FunctionDeclaration): undefined | MemberKey | LocalAndExportName { + function getStatementName(s: NamedDeclaration): undefined | MemberKey | LocalAndExportName { if (hasSyntacticModifier(s, ModifierFlags.Export) && hasSyntacticModifier(s, ModifierFlags.Default)) { return { exportName: "default" as MemberKey, - localName: getMemberKey(s.name), + localName: getMemberKeyFromElement(s), }; } - if (s.name) { - return getMemberKey(s.name); + if (s) { + return getMemberKeyFromElement(s); } } - // We need to bind locals for types (conditional and mapped typed define parameters in their definitions) - function bindTypeExpressions(node?: Node) { - function bindChildren(node: Node) { - forEachChild(node, bindWorker, arr => arr.forEach(bindWorker)); - } - function bindWorker(node?: Node) { - if (!node) return; - if (isMappedTypeNode(node)) { - const mappedType = node; - withScope(node, /*exports*/ undefined, () => { - bindTypeParameters([mappedType.typeParameter]); - }); - bindWorker(mappedType.nameType); - bindWorker(mappedType.type); - } - else if (isConditionalTypeNode(node)) { - withScope(node.extendsType, /*exports*/ undefined, () => { - bindWorker(node.extendsType); - }); - bindWorker(node.checkType); - bindWorker(node.falseType); - getNodeLinks(node.trueType).locals = getNodeLinks(node.extendsType).locals; - bindWorker(node.trueType); - } - else if (isInferTypeNode(node)) { - const conditionalTypeOwner = findAncestor(node, isConditionalTypeNode); - // Probably an error, infer not in a conditional type context - // Try to bind the rest of it - if (conditionalTypeOwner) { - withScope(conditionalTypeOwner, /*exports*/ undefined, () => { - bindTypeParameters([node.typeParameter]); - }); - } - bindChildren(node); - } - else if (isBlock(node)) { - // Do not go into bodies - return; - } - else { - bindChildren(node); - } - } - bindWorker(node); - } + function bindTypeParameters(typeParameters: TypeParameterDeclaration[] | NodeArray | undefined) { typeParameters?.forEach(t => addLocalOnlyDeclaration(getMemberKey(t.name), t, getSymbolFlagsForNode(t))); } - function bindVariable(d: VariableDeclaration | ParameterDeclaration) { - bindTypeExpressions(d.type); + function bindVariable(d: VariableDeclaration | ParameterDeclaration | PropertyDeclaration) { + bindNode(d.type); const isExported = isExportedVariable(d); - if (isIdentifier(d.name)) { - addLocalAndExportDeclaration(getMemberKey(d.name), d, getSymbolFlagsForNode(d), isExported); + const isBlockScoped = isBlockOrCatchScoped(d); + if (d.initializer) { + bindNode(d.initializer); } - else if (isBindingPattern(d.name)) { + if (isBindingPattern(d.name)) { function bindBindingPattern(pattern: BindingPattern) { // type BindingPattern = ObjectBindingPattern | ArrayBindingPattern; (pattern.elements as NodeArray).forEach(b => { @@ -425,7 +405,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { if (!b.name) return; if (isIdentifier(b.name)) { - addLocalAndExportDeclaration(getMemberKey(b.name), b, getSymbolFlagsForNode(b), isExported); + addLocalAndExportDeclaration(getMemberKey(b.name), b, getSymbolFlagsForNode(b), isExported, isBlockScoped); } else { bindBindingPattern(b.name); @@ -435,10 +415,10 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { bindBindingPattern(d.name); } else { - Debug.assertNever(d.name); + addLocalAndExportDeclaration(getMemberKeyFromElement(d), d, getSymbolFlagsForNode(d), isExported, isBlockScoped); } - function isExportedVariable(d: VariableDeclaration | ParameterDeclaration) { - if (isParameterDeclaration(d)) return false; + function isExportedVariable(d: VariableDeclaration | ParameterDeclaration | PropertyDeclaration) { + if (!isVariableDeclaration(d)) return false; // exported directly if (hasSyntacticModifier(d.parent.parent, ModifierFlags.Export)) { return true; @@ -455,13 +435,6 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { } function bindExpandoMembers(expression: Node) { if (isBinaryExpression(expression) && expression.operatorToken.kind === SyntaxKind.EqualsToken) { - bindExpandoMemberAssignment(expression); - } - forEachChild(expression, node => { - bindExpandoMembers(node); - }); - - function bindExpandoMemberAssignment(expression: BinaryExpression) { const assignmentTarget = expression.left; const isPropertyAccess = isPropertyAccessExpression(assignmentTarget); if ( @@ -482,6 +455,9 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { const fn = target.declarations.find(canHaveExpandoMembers); if (!fn) return; + const parentLocals = target.parent?.valueDeclaration && getNodeLinks(target.parent.valueDeclaration).locals; + if (currentFunctionLocalSymbolTable !== parentLocals) return; + target.exports ??= new Map(); if (target.exportSymbol) { target.exportSymbol.exports = target.exports; @@ -495,36 +471,91 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { }); } } - function canHaveExpandoMembers(declaration: Node) { - if (isFunctionDeclaration(declaration)) { - return true; + } + + function canHaveExpandoMembers(declaration: Node) { + if (isFunctionDeclaration(declaration)) { + return true; + } + else if (isVariableDeclaration(declaration)) { + if (declaration.type || !isVarConst(declaration)) { + return false; } - else if (isVariableDeclaration(declaration)) { - if (declaration.type || !isVarConst(declaration)) { - return false; - } - if (!(declaration.initializer && isFunctionExpressionOrArrowFunction(declaration.initializer))) { - return false; - } - return true; + if (!(declaration.initializer && isFunctionExpressionOrArrowFunction(declaration.initializer))) { + return false; } + return true; } } + function bindObjectLiteral(object: ObjectLiteralExpression) { + const objectSymbol = createAnonymousEmitSymbol(object); + withMembers(objectSymbol, "members", () => { + object.properties.forEach(m => { + bindNode(m); + }); + }); + } function bindContainer(statements: NodeArray | Node[], filter: (node: Node) => boolean) { statements.forEach(statement => { if (!filter(statement)) return; bindNode(statement); }); } + function bindChildren(node: Node) { + forEachChild(node, bindNode, arr => arr.forEach(bindNode)); + } function bindNode(node: Node | undefined) { if (!node) return; const isExported = hasSyntacticModifier(node, ModifierFlags.Export); - if (isExpressionStatement(node)) { - bindExpandoMembers(node.expression); + + if (isParenthesizedExpression(node)) { + bindNode(node.expression); } - else if (isExpression(node)) { - bindExpandoMembers(node); + else if (isParenthesizedTypeNode(node)) { + bindNode(node.type); + } + else if (isObjectLiteralExpression(node)) { + bindObjectLiteral(node); + } + else if (isMappedTypeNode(node)) { + const mappedType = node; + withScope(node, /*exports*/ undefined, () => { + bindTypeParameters([mappedType.typeParameter]); + }); + bindNode(mappedType.nameType); + bindNode(mappedType.type); + } + else if (isConditionalTypeNode(node)) { + withScope(node.extendsType, /*exports*/ undefined, () => { + bindNode(node.extendsType); + }); + bindNode(node.checkType); + bindNode(node.falseType); + getNodeLinks(node.trueType).locals = getNodeLinks(node.extendsType).locals; + bindNode(node.trueType); + } + else if (isInferTypeNode(node)) { + const conditionalTypeOwner = findAncestor(node, isConditionalTypeNode); + // Probably an error, infer not in a conditional type context + // Try to bind the rest of it + if (conditionalTypeOwner) { + withScope(conditionalTypeOwner, /*exports*/ undefined, () => { + bindTypeParameters([node.typeParameter]); + }); + } + bindChildren(node); + } + else if (isExpressionStatement(node)) { + bindNode(node.expression); + } + else if (isFunctionExpressionOrArrowFunction(node)) { + createAnonymousEmitSymbol(node); + withScope(node, /*exports*/ undefined, () => { + bindTypeParameters(node.typeParameters); + bindNode(node.type); + node.parameters.forEach(bindVariable); + }); } else if (isImportEqualsDeclaration(node)) { addLocalOnlyDeclaration(getMemberKey(node.name), node, getSymbolFlagsForNode(node)); @@ -557,22 +588,26 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { else if (isVariableDeclarationList(node)) { node.declarations.forEach(bindVariable); } - else if (isFunctionDeclaration(node)) { - bindTypeParameters(node.typeParameters); - bindTypeExpressions(node.type); + else if (isFunctionDeclaration(node) || isConstructorDeclaration(node) || isMethodDeclaration(node) || isAccessor(node)) { + addLocalAndExportDeclaration(getStatementName(node), node, getSymbolFlagsForNode(node), isExported); withScope(node, /*exports*/ undefined, () => { - bindTypeExpressions(node); + bindTypeParameters(node.typeParameters); + bindNode(node.type); node.parameters.forEach(bindVariable); }); - - addLocalAndExportDeclaration(getStatementName(node), node, getSymbolFlagsForNode(node), isExported); + } + else if (isTypeLiteralNode(node)) { + const objectSymbol = createAnonymousEmitSymbol(node); + withMembers(objectSymbol, "members", () => { + node.members.forEach(bindNode); + }); } else if (isTypeAliasDeclaration(node)) { addLocalAndExportDeclaration(getStatementName(node), node, getSymbolFlagsForNode(node), isExported); withScope(node, /*exports*/ undefined, () => { bindTypeParameters(node.typeParameters); + bindNode(node.type); }); - bindTypeExpressions(node.type); } // Default export declarations set isVisible on true on associated symbols in the type checker. else if (isExportAssignment(node)) { @@ -650,12 +685,11 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { }); withMembers(interfaceSymbol, "members", () => { interfaceDeclaration.members.forEach(m => { - addLocalOnlyDeclaration(getMemberKeyFromElement(m), m, getElementFlagsOrThrow(m)); - bindTypeExpressions(m); + bindNode(m); }); }); } - else if (isClassDeclaration(node)) { + else if (isClassDeclaration(node) || isClassExpression(node)) { const classDeclaration = node; const classSymbol = addLocalAndExportDeclaration(getStatementName(classDeclaration), classDeclaration, getSymbolFlagsForNode(classDeclaration), isExported); withScope(classDeclaration, /*exports*/ undefined, () => { @@ -666,8 +700,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { if (hasSyntacticModifier(m, ModifierFlags.Static)) return; if (m.kind === SyntaxKind.SemicolonClassElement || m.kind === SyntaxKind.ClassStaticBlockDeclaration) return; - addLocalOnlyDeclaration(getMemberKeyFromElement(m), m, getElementFlagsOrThrow(m)); - bindTypeExpressions(m); + bindNode(m); }); }); withMembers(classSymbol, "exports", () => { @@ -678,11 +711,19 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { || m.kind === SyntaxKind.ClassStaticBlockDeclaration ) return; - addLocalOnlyDeclaration(getMemberKeyFromElement(m), m, getElementFlagsOrThrow(m)); - bindTypeExpressions(m); + bindNode(m); }); }); } + else if (isDeclaration(node)) { + const flags = getSymbolFlagsForNode(node as Node & { kind: keyof typeof syntaxKindToSymbolMap; }); + // Unsupported declaration + if (!flags) { + return; + } + addLocalOnlyDeclaration(getMemberKeyFromElement(node), node, flags); + bindChildren(node); + } else if (isLabeledStatement(node)) { bindNode(node.statement); } @@ -715,6 +756,13 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { bindNode(node.thenStatement); bindNode(node.elseStatement); } + else if (isExpression(node)) { + bindExpandoMembers(node); + bindChildren(node); + } + else { + bindChildren(node); + } } } } @@ -765,7 +813,7 @@ export function getMemberKey(name: string | PropertyName | NoSubstitutionTemplat return ("I:" + (-computedName.operand.text)); } else if (computedName.operator === SyntaxKind.PlusToken) { - return ("I:" + (-computedName.operand.text)); + return ("I:" + (+computedName.operand.text)); } else { return undefined; @@ -796,11 +844,11 @@ export function getMemberKey(name: string | PropertyName | NoSubstitutionTemplat * Gets the symbolic name for a member from its type. * @internal */ -export function getMemberKeyFromElement(element: ObjectLiteralElement | TypeElement | ClassElement | EnumMember): MemberKey | undefined { +export function getMemberKeyFromElement(element: NamedDeclaration): MemberKey | undefined { if (isConstructorDeclaration(element) || isConstructSignatureDeclaration(element)) { return "@constructor" as MemberKey; } const name = element.name; - if (!name) return undefined; + if (!name || isElementAccessExpression(name) || isObjectBindingPattern(name) || isArrayBindingPattern(name) || isJsxNamespacedName(name) || isPropertyAccessExpression(name)) return undefined; return getMemberKey(name) as MemberKey; } diff --git a/src/compiler/transformers/declarations/emitResolver.ts b/src/compiler/transformers/declarations/emitResolver.ts index 584d1cafaa2d7..9309b193717be 100644 --- a/src/compiler/transformers/declarations/emitResolver.ts +++ b/src/compiler/transformers/declarations/emitResolver.ts @@ -41,6 +41,7 @@ import { isNumericLiteral, IsolatedEmitResolver, isPrefixUnaryExpression, + isPrimitiveLiteralValue, isPropertyAccessExpression, isSetAccessor, isSetAccessorDeclaration, @@ -134,25 +135,6 @@ export function createEmitDeclarationResolver(file: SourceFile): IsolatedEmitRes }, onNumericLiteral() {}, }); - function isPrimitiveLiteralValue(node: Expression): boolean { - if (isNumericLiteral(node) || isBigIntLiteral(node) || isStringLiteralLike(node)) return true; - - if (node.kind === SyntaxKind.TrueKeyword || node.kind === SyntaxKind.FalseKeyword) return true; - - if (isPrefixUnaryExpression(node)) { - const operand = node.operand; - if (node.operator === SyntaxKind.MinusToken) { - return isNumericLiteral(operand) || isBigIntLiteral(operand); - } - if (node.operator === SyntaxKind.PlusToken) { - return isNumericLiteral(operand); - } - } - if (isTemplateExpression(node)) { - return node.templateSpans.every(t => isPrimitiveLiteralValue(t.expression)); - } - return false; - } function clonePrimitiveLiteralValue(node: Expression): Expression { if (isNumericLiteral(node)) { return factory.createNumericLiteral(node.text); @@ -205,8 +187,6 @@ export function createEmitDeclarationResolver(file: SourceFile): IsolatedEmitRes const initializer = node.initializer; return isPrimitiveLiteralValue(initializer); - // Original TS version - // return isFreshLiteralType(getTypeOfSymbol(getSymbolOfNode(node))); } return false; } @@ -216,7 +196,7 @@ export function createEmitDeclarationResolver(file: SourceFile): IsolatedEmitRes // - it might be a narrowed symbol // - the type might not be appropriate as a computed property name. const expression = node.expression; - if (isPrimitiveLiteralValue(expression)) { + if (isPrimitiveLiteralValue(expression, /*includeBigInt*/ false)) { return true; } if (!isEntityNameExpression(expression)) { @@ -266,13 +246,8 @@ export function createEmitDeclarationResolver(file: SourceFile): IsolatedEmitRes return [...node.symbol.exports?.values() ?? []]; }, getAllAccessorDeclarations(declaration) { - const parentLinks = getNodeLinks(declaration.parent); - const key = getMemberKey(declaration.name); - const members = hasSyntacticModifier(declaration, ModifierFlags.Static) ? - parentLinks.symbol?.exports : - parentLinks.symbol?.members; - const symbol = key && members?.get(key); - const declaredAccessors = symbol?.declarations.filter(isAccessor); + const symbol = declaration.symbol; + const declaredAccessors = symbol?.declarations?.filter(isAccessor); const declarations = declaredAccessors?.length ? declaredAccessors : [declaration]; return { firstAccessor: declarations[0], diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 24564df6bca77..a675271b2122b 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -2,9 +2,9 @@ import { ArrayLiteralExpression, ArrowFunction, AsExpression, - ClassExpression, createDiagnosticForNode, createPropertyNameNodeForIdentifierOrLiteral, + Debug, DiagnosticMessage, Diagnostics, EntityNameOrEntityNameExpression, @@ -14,6 +14,7 @@ import { getCommentRange, getEmitScriptTarget, getMemberKeyFromElement, + getNameOfDeclaration, HasInferredType, hasSyntacticModifier, Identifier, @@ -22,11 +23,12 @@ import { isConstTypeReference, isEntityNameExpression, isExportAssignment, - isGetAccessorDeclaration, + isGetAccessor, isIdentifier, isInterfaceDeclaration, isLiteralTypeNode, isMethodDeclaration, + isMethodOrAccessor, isNoSubstitutionTemplateLiteral, isNumericLiteral, isOmittedExpression, @@ -37,13 +39,13 @@ import { isPropertyAssignment, isPropertyDeclaration, isPropertyName, - isSetAccessorDeclaration, isShorthandPropertyAssignment, isSpreadAssignment, isSpreadElement, isStringDoubleQuoted, isStringLiteral, isStringLiteralLike, + isThisIdentifier, isTypeLiteralNode, isTypeNode, isTypeParameterDeclaration, @@ -51,6 +53,7 @@ import { isUnionTypeNode, isVariableDeclaration, KeywordTypeSyntaxKind, + length, LiteralExpression, MethodDeclaration, ModifierFlags, @@ -67,6 +70,7 @@ import { setCommentRange, setTextRange, SourceFile, + Symbol, SyntaxKind, TransformationContext, TypeAssertion, @@ -88,16 +92,19 @@ enum NarrowBehavior { NotKeepLiterals = ~KeepLiterals, } -enum LocalTypeInfoFlags { - None = 0, - Invalid = 1 << 1, +/** + * @internal + */ +export interface LocalType { + typeNode: TypeNode; + isInvalid: boolean; } /** * @internal */ export interface LocalInferenceResolver { makeInvalidType(): Node; - fromInitializer(node: HasInferredType | ExportAssignment, type: TypeNode | undefined, sourceFile: SourceFile): TypeNode; + fromInitializer(node: HasInferredType | ExportAssignment, type: TypeNode | undefined, sourceFile: SourceFile): LocalType; } /** * @internal @@ -122,25 +129,30 @@ export function createLocalInferenceResolver({ return { resolver: undefined, isolatedDeclarations: false }; } const { factory } = context; + let inferenceContext: { isInvalid: boolean; disableErrors: boolean; } = undefined!; const strictNullChecks = !!options.strict || !!options.strictNullChecks; return { resolver: { - fromInitializer(node: HasInferredType, type: TypeNode | undefined, sourceFile: SourceFile) { + 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 localType = localInferenceFromInitializer(node, type); - if (localType !== undefined) { - return localType; - } - if (type) { - return visitNode(type, visitDeclarationSubtree, isTypeNode)!; + const typeNode = localInferenceFromInitializer(node, type); + if (typeNode !== undefined) { + return { isInvalid: inferenceContext.isInvalid, typeNode }; } - return makeInvalidType(); + return { isInvalid: true, typeNode: invalid(node) }; } finally { currentSourceFile = oldSourceFile; + if (!hasExistingContext) { + inferenceContext = undefined!; + } } }, makeInvalidType, @@ -151,8 +163,11 @@ export function createLocalInferenceResolver({ return !!(node.flags & NodeFlags.ThisNodeHasError); } function reportIsolatedDeclarationError(node: Node, diagMessage: DiagnosticMessage = Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit) { + if (inferenceContext) { + inferenceContext.isInvalid = true; + } // Do not report errors on nodes with other errors. - if (hasParseError(node)) return; + if (hasParseError(node) || inferenceContext.disableErrors) return; const message = createDiagnosticForNode( node, diagMessage, @@ -164,74 +179,39 @@ export function createLocalInferenceResolver({ return factory.createTypeReferenceNode("invalid"); } - interface LocalTypeInfo { - typeNode: TypeNode; - sourceNode: Node; - flags: LocalTypeInfoFlags; - } - - function getAccessorInfo(parent: ClassExpression | ObjectLiteralExpression, knownAccessor: SetAccessorDeclaration | GetAccessorDeclaration) { - const nameKey = getMemberKeyFromElement(knownAccessor); - const members = isClassExpression(parent) ? parent.members : parent.properties; - let getAccessor, setAccessor; - let otherAccessorIdx = -1, knownAccessorIdx = -1; - for (let i = 0; i < members.length; ++i) { - const member = members[i]; - if (isGetAccessorDeclaration(member) && getMemberKeyFromElement(member) === nameKey) { - getAccessor = member; - if (knownAccessor !== member) { - otherAccessorIdx = i; - } - else { - knownAccessorIdx = i; - } - } - else if (isSetAccessorDeclaration(member) && getMemberKeyFromElement(member) === nameKey) { - setAccessor = member; - if (knownAccessor !== member) { - otherAccessorIdx = i; - } - else { - knownAccessorIdx = i; - } - } - } - - return { - getAccessor, - setAccessor, - otherAccessorIdx, - knownAccessorIdx, - }; - } - function inferAccessorType(getAccessor?: GetAccessorDeclaration, setAccessor?: SetAccessorDeclaration): LocalTypeInfo { + function inferAccessorType(getAccessor?: GetAccessorDeclaration, setAccessor?: SetAccessorDeclaration) { + let getAccessorType; if (getAccessor?.type) { - return visitTypeAndClone(getAccessor.type, getAccessor); + getAccessorType = getAccessor.type; } - if (setAccessor && setAccessor.parameters[0]?.type) { - const parameterType = setAccessor.parameters[0].type; - return visitTypeAndClone(parameterType, setAccessor); + let setAccessorType; + if (setAccessor) { + const param = setAccessor.parameters.find(p => !isThisIdentifier(p.name)); + if (param?.type) { + const parameterType = param.type; + setAccessorType = parameterType; + } } - return invalid(getAccessor ?? setAccessor!); + return { getAccessorType, setAccessorType }; } - function localInference(node: Node, inferenceFlags: NarrowBehavior = NarrowBehavior.None): LocalTypeInfo { + 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(node); + return createUndefinedTypeNode(); } break; } case SyntaxKind.NullKeyword: if (strictNullChecks) { - return regular(factory.createLiteralTypeNode(factory.createNull()), node); + return factory.createLiteralTypeNode(factory.createNull()); } else { - return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node); + return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); } case SyntaxKind.ArrowFunction: case SyntaxKind.FunctionExpression: @@ -242,9 +222,9 @@ export function createLocalInferenceResolver({ const fnTypeNode = factory.createFunctionTypeNode( visitNodes(fnNode.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone), fnNode.parameters.map(p => deepClone(ensureParameter(p))), - returnType.typeNode, + returnType, ); - return regular(fnTypeNode, node, LocalTypeInfoFlags.None | returnType.flags); + return fnTypeNode; } finally { setEnclosingDeclarations(oldEnclosingDeclaration); @@ -261,11 +241,8 @@ export function createLocalInferenceResolver({ isLiteralTypeNode(type) && (isNoSubstitutionTemplateLiteral(type.literal) || isStringLiteral(type.literal)) ) { - return regular( - factory.createLiteralTypeNode( - normalizeLiteralValue(type.literal), - ), - node, + return factory.createLiteralTypeNode( + normalizeLiteralValue(type.literal), ); } @@ -279,25 +256,25 @@ export function createLocalInferenceResolver({ case SyntaxKind.NumericLiteral: switch (prefixOp.operator) { case SyntaxKind.MinusToken: - return regular(factory.createLiteralTypeNode(deepClone(prefixOp)), node); + return factory.createLiteralTypeNode(deepClone(prefixOp)); case SyntaxKind.PlusToken: - return regular(factory.createLiteralTypeNode(deepClone(prefixOp.operand as LiteralExpression)), node); + return factory.createLiteralTypeNode(deepClone(prefixOp.operand as LiteralExpression)); } break; case SyntaxKind.BigIntLiteral: if (prefixOp.operator === SyntaxKind.MinusToken) { - return regular(factory.createLiteralTypeNode(deepClone(prefixOp)), node); + return factory.createLiteralTypeNode(deepClone(prefixOp)); } } } if (prefixOp.operator === SyntaxKind.PlusToken) { - return regular(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), prefixOp); + return factory.createKeywordTypeNode(SyntaxKind.NumberKeyword); } else if (prefixOp.operator === SyntaxKind.MinusToken) { return prefixOp.operand.kind === SyntaxKind.BigIntLiteral ? - regular(factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword), node) : - regular(factory.createKeywordTypeNode(SyntaxKind.NumberKeyword), node); + factory.createKeywordTypeNode(SyntaxKind.BigIntKeyword) : + factory.createKeywordTypeNode(SyntaxKind.NumberKeyword); } } break; @@ -305,7 +282,7 @@ export function createLocalInferenceResolver({ return literal(node, SyntaxKind.NumberKeyword, inferenceFlags); case SyntaxKind.TemplateExpression: if (!(inferenceFlags & NarrowBehavior.AsConst)) { - return regular(factory.createKeywordTypeNode(SyntaxKind.StringKeyword), node); + return factory.createKeywordTypeNode(SyntaxKind.StringKeyword); } return invalid(node); case SyntaxKind.NoSubstitutionTemplateLiteral: @@ -321,74 +298,65 @@ export function createLocalInferenceResolver({ return invalid(node); } const arrayLiteral = node as ArrayLiteralExpression; - const elementTypesInfo: LocalTypeInfo[] = []; - let inheritedArrayTypeFlags = LocalTypeInfoFlags.None; + const elementTypesInfo: TypeNode[] = []; for (const element of arrayLiteral.elements) { if (isSpreadElement(element)) { return invalid(element); } else if (isOmittedExpression(element)) { elementTypesInfo.push( - createUndefinedTypeNode(element), + createUndefinedTypeNode(), ); } else { const elementType = localInference(element, inferenceFlags & NarrowBehavior.NotKeepLiterals); - inheritedArrayTypeFlags |= elementType.flags; elementTypesInfo.push(elementType); } } - const tupleType = factory.createTupleTypeNode( - elementTypesInfo.map(lti => lti.typeNode), - ); + const tupleType = factory.createTupleTypeNode(elementTypesInfo); tupleType.emitNode = { flags: 1, autoGenerate: undefined, internalFlags: 0 }; - return regular(factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType), node, inheritedArrayTypeFlags); + return factory.createTypeOperatorNode(SyntaxKind.ReadonlyKeyword, tupleType); case SyntaxKind.ObjectLiteralExpression: - return getTypeForObjectLiteralExpression(node as ObjectLiteralExpression, inferenceFlags); + try { + return getTypeForObjectLiteralExpression(node as ObjectLiteralExpression, inferenceFlags); + } + finally { + inferenceContext.disableErrors = false; + } } return invalid(node); } - function invalid(sourceNode: Node, diagMessage = Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit): LocalTypeInfo { + function invalid(sourceNode: Node, diagMessage = Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit): TypeNode { reportIsolatedDeclarationError(sourceNode, diagMessage); - return { typeNode: makeInvalidType(), flags: LocalTypeInfoFlags.Invalid, sourceNode }; - } - function regular(typeNode: TypeNode, sourceNode: Node, flags = LocalTypeInfoFlags.None): LocalTypeInfo { - return { typeNode, flags, sourceNode }; + return makeInvalidType(); } function getTypeForObjectLiteralExpression(objectLiteral: ObjectLiteralExpression, inferenceFlags: NarrowBehavior) { const properties: TypeElement[] = []; - let inheritedObjectTypeFlags = LocalTypeInfoFlags.None; - const members = new Map(); - let replaceWithInvalid = false; + const members = new Map(); for (let propIndex = 0, length = objectLiteral.properties.length; propIndex < length; propIndex++) { const prop = objectLiteral.properties[propIndex]; - if (hasParseError(prop)) continue; - if (isShorthandPropertyAssignment(prop)) { reportIsolatedDeclarationError(prop); - inheritedObjectTypeFlags |= LocalTypeInfoFlags.Invalid; continue; } else if (isSpreadAssignment(prop)) { reportIsolatedDeclarationError(prop); - inheritedObjectTypeFlags |= LocalTypeInfoFlags.Invalid; continue; } - - if (hasParseError(prop.name)) 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)) { reportIsolatedDeclarationError(prop.name); - replaceWithInvalid = true; continue; } if (isEntityNameExpression(prop.name.expression)) { @@ -397,22 +365,18 @@ export function createLocalInferenceResolver({ } const nameKey = getMemberKeyFromElement(prop); - const existingMember = nameKey ? members.get(nameKey) : undefined; - const name = simplifyComputedPropertyName(prop.name, existingMember?.name, isMethodDeclaration(prop)) ?? + const name = normalizePropertyName(prop.symbol, isMethodDeclaration(prop)) ?? deepClone(visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!); let newProp; if (isMethodDeclaration(prop)) { - const { method, flags } = handleMethodDeclaration(prop, name, inferenceFlags); - newProp = method; - inheritedObjectTypeFlags |= flags; + newProp = handleMethodDeclaration(prop, name, inferenceFlags); } else if (isPropertyAssignment(prop)) { const modifiers = inferenceFlags & NarrowBehavior.AsConst ? [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : []; - const { typeNode, flags: propTypeFlags } = localInference(prop.initializer, inferenceFlags & NarrowBehavior.NotKeepLiterals); - inheritedObjectTypeFlags |= propTypeFlags; + const typeNode = localInference(prop.initializer, inferenceFlags & NarrowBehavior.NotKeepLiterals); newProp = factory.createPropertySignature( modifiers, name, @@ -421,14 +385,7 @@ export function createLocalInferenceResolver({ ); } else { - const accessorType = handleAccessors(prop, objectLiteral, name, nameKey); - if (accessorType) { - inheritedObjectTypeFlags |= accessorType.flags; - newProp = accessorType.type; - } - else { - return invalid(prop); - } + newProp = handleAccessors(prop, name, nameKey); } if (newProp) { @@ -439,14 +396,12 @@ export function createLocalInferenceResolver({ }); if (nameKey) { - if (existingMember !== undefined && !isMethodDeclaration(prop)) { - properties[existingMember.location] = newProp; + const exitingIndex = members.get(prop.symbol); + if (exitingIndex !== undefined && !isMethodOrAccessor(prop)) { + properties[exitingIndex] = newProp; } else { - members.set(nameKey, { - location: properties.length, - name, - }); + members.set(prop.symbol, properties.length); properties.push(newProp); } } @@ -456,8 +411,7 @@ export function createLocalInferenceResolver({ } } - const typeNode: TypeNode = replaceWithInvalid ? makeInvalidType() : factory.createTypeLiteralNode(properties); - return regular(typeNode, objectLiteral, inheritedObjectTypeFlags); + return inferenceContext.isInvalid ? makeInvalidType() : factory.createTypeLiteralNode(properties); } function handleMethodDeclaration(method: MethodDeclaration, name: PropertyName, inferenceFlags: NarrowBehavior) { @@ -465,35 +419,28 @@ export function createLocalInferenceResolver({ try { const returnType = visitTypeAndClone(method.type, method); const typeParameters = visitNodes(method.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone); - // TODO: We need to see about inheriting flags from parameters const parameters = method.parameters.map(p => deepClone(ensureParameter(p))); if (inferenceFlags & NarrowBehavior.AsConst) { - return { - flags: returnType.flags, - method: factory.createPropertySignature( - [factory.createModifier(SyntaxKind.ReadonlyKeyword)], - name, - /*questionToken*/ undefined, - factory.createFunctionTypeNode( - typeParameters, - parameters, - returnType.typeNode, - ), - ), - }; - } - else { - return { - flags: returnType.flags, - method: factory.createMethodSignature( - [], - name, - /*questionToken*/ undefined, + return factory.createPropertySignature( + [factory.createModifier(SyntaxKind.ReadonlyKeyword)], + name, + /*questionToken*/ undefined, + factory.createFunctionTypeNode( typeParameters, parameters, - returnType.typeNode, + returnType, ), - }; + ); + } + else { + return factory.createMethodSignature( + [], + name, + /*questionToken*/ undefined, + typeParameters, + parameters, + returnType, + ); } } finally { @@ -501,23 +448,43 @@ export function createLocalInferenceResolver({ } } - function handleAccessors(accessor: GetAccessorDeclaration | SetAccessorDeclaration, parent: ObjectLiteralExpression | ClassExpression, name: PropertyName, nameKey: string | undefined) { + function handleAccessors(accessor: GetAccessorDeclaration | SetAccessorDeclaration, name: PropertyName, nameKey: string | undefined) { if (!nameKey) { return; } - const { getAccessor, setAccessor, knownAccessorIdx, otherAccessorIdx } = getAccessorInfo(parent, accessor); - if (otherAccessorIdx === -1 || otherAccessorIdx > knownAccessorIdx) { - const accessorType = inferAccessorType(getAccessor, setAccessor); - return { - flags: accessorType.flags, - type: factory.createPropertySignature( - setAccessor === undefined ? [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : [], + 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( + [], name, - /*questionToken*/ undefined, - accessorType.typeNode, - ), - }; + parameters, + visitTypeAndClone(accessor.type, accessor), + /*body*/ undefined, + ); + } + else { + return factory.createSetAccessorDeclaration( + [], + name, + parameters, + /*body*/ undefined, + ); + } + } + else if (firstAccessor === accessor) { + const type = accessorType.getAccessorType ?? accessorType.setAccessorType; + return factory.createPropertySignature( + setAccessor === undefined ? [factory.createModifier(SyntaxKind.ReadonlyKeyword)] : [], + name, + /*questionToken*/ undefined, + visitTypeAndClone(type, accessor), + ); } } @@ -535,76 +502,67 @@ export function createLocalInferenceResolver({ } throw new Error("Not supported"); } - function createUndefinedTypeNode(node: Node, flags = LocalTypeInfoFlags.None) { + function createUndefinedTypeNode() { if (strictNullChecks) { - return regular( - factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), - node, - flags, - ); + return factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword); } else { - return regular(factory.createKeywordTypeNode(SyntaxKind.AnyKeyword), node, flags); + return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); } } - function literal(node: Node, baseType: string | KeywordTypeSyntaxKind, narrowBehavior: NarrowBehavior, flags: LocalTypeInfoFlags = 0) { + function literal(node: Node, baseType: string | KeywordTypeSyntaxKind, narrowBehavior: NarrowBehavior) { if (narrowBehavior & NarrowBehavior.AsConstOrKeepLiterals) { - return regular( - factory.createLiteralTypeNode( - normalizeLiteralValue(node as LiteralExpression), - ), - node, - flags, + return factory.createLiteralTypeNode( + normalizeLiteralValue(node as LiteralExpression), ); } else { - return regular( - typeof baseType === "number" ? factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType), - node, - flags, - ); + return typeof baseType === "number" ? factory.createKeywordTypeNode(baseType) : factory.createTypeReferenceNode(baseType); } } function visitTypeAndClone(type: TypeNode | undefined, owner: Node) { const visitedType = visitNode(type, visitDeclarationSubtree, isTypeNode); if (!visitedType) return invalid(owner); - return regular(deepClone(visitedType), owner); + return deepClone(visitedType); } - function simplifyComputedPropertyName(name: PropertyName, _existingName: PropertyName | undefined, isMethod: boolean) { + function normalizePropertyName(symbol: Symbol, isMethod: boolean) { let nameText; - let stringNamed = false; - let singleQuote = false; - if (isIdentifier(name)) { - nameText = unescapeLeadingUnderscores(name.escapedText); - } - if (isNumericLiteral(name)) { - nameText = name.text; - } - else if (isStringLiteralLike(name)) { - stringNamed = true; - singleQuote = !isStringDoubleQuoted(name, currentSourceFile); - nameText = name.text; - } - else if (isComputedPropertyName(name)) { - const expression = name.expression; - if (isStringLiteralLike(expression) || isNumericLiteral(expression)) { - stringNamed = isStringLiteralLike(expression); - nameText = expression.text; + 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(expression) - && isNumericLiteral(expression.operand) + isPrefixUnaryExpression(actualName) + && isNumericLiteral(actualName.operand) ) { - if (expression.operator === SyntaxKind.MinusToken) { - return name; - } - else if (expression.operator === SyntaxKind.PlusToken) { - nameText = expression.operand.text; + if (actualName.operator === SyntaxKind.PlusToken) { + nameText = actualName.operand.text; } } } + if (nameText === undefined) { return undefined; } @@ -659,13 +617,10 @@ export function createLocalInferenceResolver({ ]); } function localInferenceFromInitializer(node: HasInferredType | ExportAssignment, type: TypeNode | undefined): TypeNode | undefined { - let localType: LocalTypeInfo | undefined; + let localType: TypeNode | undefined; if (isParameter(node)) { if (type) { - localType = regular( - visitNode(type, visitDeclarationSubtree, isTypeNode)!, - node, - ); + 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. @@ -676,49 +631,60 @@ export function createLocalInferenceResolver({ localType = invalid(node); } - if (strictNullChecks && !(localType.flags & LocalTypeInfoFlags.Invalid)) { + 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.typeNode = addUndefinedInUnion(localType.typeNode); + 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.typeNode = addUndefinedInUnion(localType.typeNode); + localType = addUndefinedInUnion(localType); } } } - else if (type) { - return visitNode(type, visitDeclarationSubtree, isTypeNode); - } else if (isExportAssignment(node)) { localType = localInference(node.expression, NarrowBehavior.KeepLiterals); } - else if (isVariableDeclaration(node) && node.initializer) { - if (resolver.isExpandoFunction(node)) { - context.addDiagnostic(createDiagnosticForNode( - node, - Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function, - )); - localType = invalid(node); + 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; } - else if (isClassExpression(node.initializer)) { - localType = invalid(node.initializer, Diagnostics.Declaration_emit_for_class_expressions_are_not_supported_with_isolatedDeclarations); + if (type) { + localType = visitNode(type, visitDeclarationSubtree, isTypeNode)!; } - else { - localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals : NarrowBehavior.None); + else if (node.initializer) { + if (resolver.isExpandoFunction(node)) { + context.addDiagnostic(createDiagnosticForNode( + node, + Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function, + )); + localType = invalid(node); + } + else if (isClassExpression(node.initializer)) { + localType = invalid(node.initializer, Diagnostics.Declaration_emit_for_class_expressions_are_not_supported_with_isolatedDeclarations); + } + else { + localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals : NarrowBehavior.None); + } } } + else if (type) { + return visitNode(type, visitDeclarationSubtree, isTypeNode); + } else if (isPropertyDeclaration(node) && node.initializer) { localType = localInference(node.initializer); if (isOptionalDeclaration(node)) { - localType.typeNode = addUndefinedInUnion(localType.typeNode); + localType = addUndefinedInUnion(localType); } } else if (isInterfaceDeclaration(node.parent) || isTypeLiteralNode(node.parent)) { @@ -727,9 +693,6 @@ export function createLocalInferenceResolver({ else { reportIsolatedDeclarationError(node); } - if (!localType || localType.flags & LocalTypeInfoFlags.Invalid) { - return undefined; - } - return localType.typeNode; + return localType; } } diff --git a/src/compiler/transformers/declarations/transpileDeclaration.ts b/src/compiler/transformers/declarations/transpileDeclaration.ts index f1a8961ecb34d..bddb4afb78989 100644 --- a/src/compiler/transformers/declarations/transpileDeclaration.ts +++ b/src/compiler/transformers/declarations/transpileDeclaration.ts @@ -89,7 +89,7 @@ export function transpileDeclaration(sourceFile: SourceFile, transpileOptions: T addDiagnostic(diag: any) { diagnostics.push(diag); }, - } as TransformationContext); + } as TransformationContext, /*useTscEmit*/ false); const result = transformer(sourceFile); const printer = createPrinter({ diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index bff2112ade4ed..0c43b92d12f6b 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -340,6 +340,7 @@ import { isString, isStringLiteral, isStringLiteralLike, + isTemplateExpression, isTypeAliasDeclaration, isTypeElement, isTypeLiteralNode, @@ -10904,3 +10905,25 @@ export function createEntityVisibilityChecker isPrimitiveLiteralValue(t.expression)); + } + return false; +} \ No newline at end of file diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index f94cb962a8105..25fa90403dd7a 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -490,7 +490,9 @@ class IsolatedDeclarationTest extends CompilerTestBase { clonedOptions.allowJs = false; clonedOptions.checkJs = false; clonedOptions.skipLibCheck = true; - clonedOptions.forceDtsEmit = true; + if (clonedOptions.forceDtsEmit === undefined) { + clonedOptions.forceDtsEmit = true; + } delete clonedOptions.outFile; delete clonedOptions.out; delete clonedOptions.declarationMap; 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 index fb1f2f87a9667..fe8b13b3a919e 100644 --- a/tests/baselines/reference/expandoFunctionNestedAssigments.js +++ b/tests/baselines/reference/expandoFunctionNestedAssigments.js @@ -3,6 +3,12 @@ //// [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); @@ -50,6 +56,10 @@ for(let f in (Foo.forIn = []) ){ //// [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; @@ -90,6 +100,7 @@ for (var f in (Foo.forIn = [])) { //// [expandoFunctionNestedAssigments.d.ts] declare function Foo(): void; declare namespace Foo { + var inVariableInit: number; var bla: { foo: number; }; @@ -115,3 +126,5 @@ declare namespace Foo { 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 index 948e18a06addd..6c91cc3b68c52 100644 --- a/tests/baselines/reference/expandoFunctionNestedAssigments.symbols +++ b/tests/baselines/reference/expandoFunctionNestedAssigments.symbols @@ -2,124 +2,137 @@ === expandoFunctionNestedAssigments.ts === function Foo(): void { ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) +>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, 4, 12)) ->Foo.bla : Symbol(Foo.bla, Decl(expandoFunctionNestedAssigments.ts, 4, 1)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->bla : Symbol(Foo.bla, Decl(expandoFunctionNestedAssigments.ts, 4, 1)) ->foo : Symbol(foo, Decl(expandoFunctionNestedAssigments.ts, 4, 12)) ->foo : Symbol(foo, Decl(expandoFunctionNestedAssigments.ts, 4, 12)) ->Foo.baz : Symbol(Foo.baz, Decl(expandoFunctionNestedAssigments.ts, 4, 29)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->baz : Symbol(Foo.baz, Decl(expandoFunctionNestedAssigments.ts, 4, 29)) ->Foo.bar : Symbol(Foo.bar, Decl(expandoFunctionNestedAssigments.ts, 4, 45)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->bar : Symbol(Foo.bar, Decl(expandoFunctionNestedAssigments.ts, 4, 45)) +>(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, 6, 3)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->fromIf : Symbol(Foo.fromIf, Decl(expandoFunctionNestedAssigments.ts, 6, 3)) +>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, 6, 20)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->inIf : Symbol(Foo.inIf, Decl(expandoFunctionNestedAssigments.ts, 6, 20)) +>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, 10, 6)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->fromWhileCondition : Symbol(Foo.fromWhileCondition, Decl(expandoFunctionNestedAssigments.ts, 10, 6)) +>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, 10, 35)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->fromWhileBody : Symbol(Foo.fromWhileBody, Decl(expandoFunctionNestedAssigments.ts, 10, 35)) +>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, 12, 5)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->fromWhileBodyNested : Symbol(Foo.fromWhileBodyNested, Decl(expandoFunctionNestedAssigments.ts, 12, 5)) +>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, 17, 4)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->fromDoBody : Symbol(Foo.fromDoBody, Decl(expandoFunctionNestedAssigments.ts, 17, 4)) +>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, 19, 5)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->fromDoBodyNested : Symbol(Foo.fromDoBodyNested, Decl(expandoFunctionNestedAssigments.ts, 19, 5)) +>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, 22, 8)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->fromDoCondition : Symbol(Foo.fromDoCondition, Decl(expandoFunctionNestedAssigments.ts, 22, 8)) +>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, 24, 4)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->forInit : Symbol(Foo.forInit, Decl(expandoFunctionNestedAssigments.ts, 24, 4)) ->Foo.forCond : Symbol(Foo.forCond, Decl(expandoFunctionNestedAssigments.ts, 24, 22)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->forCond : Symbol(Foo.forCond, Decl(expandoFunctionNestedAssigments.ts, 24, 22)) ->Foo.forIncr : Symbol(Foo.forIncr, Decl(expandoFunctionNestedAssigments.ts, 24, 43)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->forIncr : Symbol(Foo.forIncr, Decl(expandoFunctionNestedAssigments.ts, 24, 43)) +>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, 24, 61)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->fromForBody : Symbol(Foo.fromForBody, Decl(expandoFunctionNestedAssigments.ts, 24, 61)) +>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, 26, 5)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->fromForBodyNested : Symbol(Foo.fromForBodyNested, Decl(expandoFunctionNestedAssigments.ts, 26, 5)) +>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, 31, 7)) ->Foo.forOf : Symbol(Foo.forOf, Decl(expandoFunctionNestedAssigments.ts, 31, 14)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->forOf : Symbol(Foo.forOf, Decl(expandoFunctionNestedAssigments.ts, 31, 14)) +>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, 31, 32)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->fromForOfBody : Symbol(Foo.fromForOfBody, Decl(expandoFunctionNestedAssigments.ts, 31, 32)) +>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, 33, 5)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->fromForOfBodyNested : Symbol(Foo.fromForOfBodyNested, Decl(expandoFunctionNestedAssigments.ts, 33, 5)) +>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, 39, 7)) ->Foo.forIn : Symbol(Foo.forIn, Decl(expandoFunctionNestedAssigments.ts, 39, 14)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->forIn : Symbol(Foo.forIn, Decl(expandoFunctionNestedAssigments.ts, 39, 14)) +>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, 39, 32)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->fromForInBody : Symbol(Foo.fromForInBody, Decl(expandoFunctionNestedAssigments.ts, 39, 32)) +>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, 41, 5)) ->Foo : Symbol(Foo, Decl(expandoFunctionNestedAssigments.ts, 0, 0), Decl(expandoFunctionNestedAssigments.ts, 6, 3), Decl(expandoFunctionNestedAssigments.ts, 10, 6), Decl(expandoFunctionNestedAssigments.ts, 22, 8), Decl(expandoFunctionNestedAssigments.ts, 24, 4) ... and 1 more) ->fromForInBodyNested : Symbol(Foo.fromForInBodyNested, Decl(expandoFunctionNestedAssigments.ts, 41, 5)) +>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 index cba2aadd3d754..2c4a0d7edd98d 100644 --- a/tests/baselines/reference/expandoFunctionNestedAssigments.types +++ b/tests/baselines/reference/expandoFunctionNestedAssigments.types @@ -4,6 +4,27 @@ 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); 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..11ac55901584c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.diff @@ -0,0 +1,20 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [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/declarationEmitWithInvalidPackageJsonTypings.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitWithInvalidPackageJsonTypings.d.ts.diff index 5dcf6df5b1320..9214477f1c60b 100644 --- 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 @@ -13,7 +13,7 @@ -export declare const useCsvParser: () => MutableRefObject; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file -+export declare const useCsvParser: invalid; ++export declare const useCsvParser: () => invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + 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 index 3a83bb0a36341..7f0c1ca92f203 100644 --- 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 @@ -5,12 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,31 +1,121 @@ +@@ -1,48 +1,46 @@ //// [expandoFunctionNestedAssigments.d.ts] declare function Foo(): void; -declare namespace Foo { +- var inVariableInit: number; - var bla: { - foo: number; - }; @@ -36,123 +37,136 @@ - var fromForInBody: number; - var fromForInBodyNested: number; -} --//# sourceMappingURL=expandoFunctionNestedAssigments.d.ts.map -\ No newline at end of file -+//# sourceMappingURL=expandoFunctionNestedAssigments.d.ts.map -+/// [Errors] //// -+ -+expandoFunctionNestedAssigments.ts(5,2): error TS9009: 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(5,30): error TS9009: 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(5,46): error TS9009: 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,4): error TS9009: 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(8,5): error TS9009: 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,7): error TS9009: 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(12,5): error TS9009: 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,9): error TS9009: 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(19,5): error TS9009: 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(21,9): error TS9009: 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(23,9): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + declare let d: number; + declare function bar(p?: number): void; + //# sourceMappingURL=expandoFunctionNestedAssigments.d.ts.map + /// [Errors] //// + ++expandoFunctionNestedAssigments.ts(4,18): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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,23): error TS9009: 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,45): error TS9009: 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(26,5): error TS9009: 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(28,9): error TS9009: 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,15): error TS9009: 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(33,5): error TS9009: 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(35,9): error TS9009: 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(40,15): error TS9009: 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,5): error TS9009: 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(43,9): error TS9009: 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 (22 errors) ==== -+ function Foo(): void { -+ -+ } -+ -+ (Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0); ++expandoFunctionNestedAssigments.ts(27,9): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ~~~~~~~ +!!! error TS9009: 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) { + + if(Foo.fromIf = 1) { + ~~~~~~~~~~ +!!! error TS9009: 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; + Foo.inIf = 1; + ~~~~~~~~ +!!! error TS9009: 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) { + } + + while(Foo.fromWhileCondition = 1) { + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9009: 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; + Foo.fromWhileBody = 1; + ~~~~~~~~~~~~~~~~~ +!!! error TS9009: 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; + { + Foo.fromWhileBodyNested = 1; + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9009: 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; + } + } + + do { + Foo.fromDoBody = 1; + ~~~~~~~~~~~~~~ +!!! error TS9009: 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; + { + Foo.fromDoBodyNested = 1; + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9009: 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); + } + } while(Foo.fromDoCondition = 1); + ~~~~~~~~~~~~~~~~~~~ +!!! error TS9009: 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){ + + for(Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1){ + ~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ~~~~~~~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + ~~~~~~~~~~~ +!!! error TS9009: 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; + Foo.fromForBody = 1; + ~~~~~~~~~~~~~~~ +!!! error TS9009: 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; + { + Foo.fromForBodyNested = 1; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9009: 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 = []) ){ + } + } + + for(let f of (Foo.forOf = []) ){ + ~~~~~~~~~ +!!! error TS9009: 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; + Foo.fromForOfBody = 1; + ~~~~~~~~~~~~~~~~~ +!!! error TS9009: 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; + { + Foo.fromForOfBodyNested = 1; + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9009: 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 = []) ){ + } + } + + + for(let f in (Foo.forIn = []) ){ + ~~~~~~~~~ +!!! error TS9009: 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; + Foo.fromForInBody = 1; + ~~~~~~~~~~~~~~~~~ +!!! error TS9009: 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; + { + Foo.fromForInBodyNested = 1; + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9009: 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/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts.diff index 34035b5458988..7dc46a7529d14 100644 --- 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 @@ -12,7 +12,7 @@ -export declare const a: () => Promise; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file -+export declare const a: invalid; ++export declare const a: () => invalid; +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + 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 index f8eeb7504fc81..2d20183f1f251 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Import type has different module attributes]] //// +// [[Reason: TSC simplifies import type removing resolution-mode]] //// //// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// 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 index f8eeb7504fc81..2d20183f1f251 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Import type has different module attributes]] //// +// [[Reason: TSC simplifies import type removing resolution-mode]] //// //// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// 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 index 449f399e455bc..194920f2ca832 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Import type has different module attributes]] //// +// [[Reason: TSC simplifies import type removing resolution-mode and uses with instead of assert]] //// //// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// 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 index 449f399e455bc..194920f2ca832 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: TODO: Import type has different module attributes]] //// +// [[Reason: TSC simplifies import type removing resolution-mode and uses with instead of assert]] //// //// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// 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/declarationEmitObjectLiteralAccessors1.d.ts.map.f b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts.map.f new file mode 100644 index 0000000000000..278e753f40f78 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts.map.f @@ -0,0 +1,627 @@ +//// [declarationEmitObjectLiteralAccessors1.ts] //// + +//// [declarationEmitObjectLiteralAccessors1.d.ts.map] +{ + "version": 3, + "file": "declarationEmitObjectLiteralAccessors1.d.ts", + "sourceRoot": "", + "sources": [ + "declarationEmitObjectLiteralAccessors1.ts" + ], + "names": [], + "mappings": [ + { + "generatedLine": 1, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 2, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 1, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 2, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 1, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 2, + "originalColumn": 13, + "name": null, + "generatedText": "const ", + "sourceText": "const " + }, + { + "generatedLine": 1, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 2, + "originalColumn": 17, + "name": null, + "generatedText": "obj1", + "sourceText": "obj1" + }, + { + "generatedLine": 1, + "generatedColumn": 27, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 2, + "originalColumn": 19, + "name": null, + "generatedText": ": ", + "sourceText": " =" + }, + { + "generatedLine": 2, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 3, + "originalColumn": 4, + "name": null + }, + { + "generatedLine": 2, + "generatedColumn": 52, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 3, + "originalColumn": 52, + "name": null, + "generatedText": "/** my awesome getter (first in source order) */", + "sourceText": "* my awesome getter (first in source order) */" + }, + { + "generatedLine": 3, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 4, + "originalColumn": 4, + "name": null + }, + { + "generatedLine": 3, + "generatedColumn": 5, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 4, + "originalColumn": 5, + "name": null, + "generatedText": "x", + "sourceText": "t" + }, + { + "generatedLine": 3, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 4, + "originalColumn": 7, + "name": null, + "generatedText": ": ", + "sourceText": " x" + }, + { + "generatedLine": 3, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 4, + "originalColumn": 13, + "name": null, + "generatedText": "string", + "sourceText": "(): st" + }, + { + "generatedLine": 3, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 4, + "originalColumn": 14, + "name": null, + "generatedText": ";", + "sourceText": "r" + }, + { + "generatedLine": 4, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 12, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 4, + "generatedColumn": 2, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 12, + "originalColumn": 2, + "name": null, + "generatedText": ";", + "sourceText": "x" + }, + { + "generatedLine": 5, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 15, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 5, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 15, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": " ret" + }, + { + "generatedLine": 5, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 15, + "originalColumn": 13, + "name": null, + "generatedText": "const ", + "sourceText": "urn \"\"" + }, + { + "generatedLine": 5, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 15, + "originalColumn": 17, + "name": null, + "generatedText": "obj2", + "sourceText": ";" + }, + { + "generatedLine": 5, + "generatedColumn": 27, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 15, + "originalColumn": 19, + "name": null, + "generatedText": ": ", + "sourceText": "" + }, + { + "generatedLine": 6, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 16, + "originalColumn": 4, + "name": null + }, + { + "generatedLine": 6, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 16, + "originalColumn": 28, + "name": null, + "generatedText": "/** my awesome getter */", + "sourceText": "" + }, + { + "generatedLine": 7, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 17, + "originalColumn": 4, + "name": null + }, + { + "generatedLine": 7, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 17, + "originalColumn": 8, + "name": null, + "generatedText": "get ", + "sourceText": "* my" + }, + { + "generatedLine": 7, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 17, + "originalColumn": 9, + "name": null, + "generatedText": "x", + "sourceText": " " + }, + { + "generatedLine": 7, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 17, + "originalColumn": 13, + "name": null, + "generatedText": "(): ", + "sourceText": "awes" + }, + { + "generatedLine": 7, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 17, + "originalColumn": 19, + "name": null, + "generatedText": "string", + "sourceText": "ome se" + }, + { + "generatedLine": 7, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 17, + "originalColumn": 20, + "name": null, + "generatedText": ";", + "sourceText": "t" + }, + { + "generatedLine": 8, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 18, + "originalColumn": 4, + "name": null + }, + { + "generatedLine": 8, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 18, + "originalColumn": 28, + "name": null, + "generatedText": "/** my awesome setter */", + "sourceText": "t x(a: number) {}," + }, + { + "generatedLine": 9, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 19, + "originalColumn": 4, + "name": null + }, + { + "generatedLine": 9, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 19, + "originalColumn": 8, + "name": null, + "generatedText": "set ", + "sourceText": "" + }, + { + "generatedLine": 9, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 19, + "originalColumn": 9, + "name": null, + "generatedText": "x", + "sourceText": "" + }, + { + "generatedLine": 9, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 19, + "originalColumn": 10, + "name": null, + "generatedText": "(", + "sourceText": "" + }, + { + "generatedLine": 9, + "generatedColumn": 11, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 19, + "originalColumn": 11, + "name": null, + "generatedText": "a", + "sourceText": "" + }, + { + "generatedLine": 9, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 19, + "originalColumn": 13, + "name": null, + "generatedText": ": ", + "sourceText": "" + }, + { + "generatedLine": 9, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 19, + "originalColumn": 19, + "name": null, + "generatedText": "number", + "sourceText": "" + }, + { + "generatedLine": 9, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 19, + "originalColumn": 21, + "name": null, + "generatedText": ");", + "sourceText": "" + }, + { + "generatedLine": 10, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 27, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 10, + "generatedColumn": 2, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 27, + "originalColumn": 2, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 11, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 29, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 11, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 29, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": " /** m" + }, + { + "generatedLine": 11, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 29, + "originalColumn": 13, + "name": null, + "generatedText": "const ", + "sourceText": "y awes" + }, + { + "generatedLine": 11, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 29, + "originalColumn": 17, + "name": null, + "generatedText": "obj3", + "sourceText": "ome " + }, + { + "generatedLine": 12, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 30, + "originalColumn": 2, + "name": null + }, + { + "generatedLine": 12, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 30, + "originalColumn": 26, + "name": null, + "generatedText": "/** my awesome getter */", + "sourceText": "set x(a: number) {}," + }, + { + "generatedLine": 13, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 31, + "originalColumn": 11, + "name": null + }, + { + "generatedLine": 13, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 31, + "originalColumn": 17, + "name": null, + "generatedText": "string", + "sourceText": "" + }, + { + "generatedLine": 14, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 34, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 14, + "generatedColumn": 2, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 34, + "originalColumn": 2, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 15, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 36, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 15, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 36, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "" + }, + { + "generatedLine": 15, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 36, + "originalColumn": 13, + "name": null, + "generatedText": "const ", + "sourceText": "" + }, + { + "generatedLine": 15, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 36, + "originalColumn": 17, + "name": null, + "generatedText": "obj4", + "sourceText": "" + }, + { + "generatedLine": 16, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 37, + "originalColumn": 2, + "name": null + }, + { + "generatedLine": 16, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 37, + "originalColumn": 26, + "name": null, + "generatedText": "/** my awesome setter */", + "sourceText": "" + }, + { + "generatedLine": 17, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 38, + "originalColumn": 11, + "name": null + }, + { + "generatedLine": 17, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 38, + "originalColumn": 17, + "name": null, + "generatedText": "number", + "sourceText": "" + }, + { + "generatedLine": 18, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 39, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 18, + "generatedColumn": 2, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 39, + "originalColumn": 2, + "name": null, + "generatedText": ";", + "sourceText": "" + } + ] +} \ 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 index 3982747e6d988..ab256c24c9e6d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithInvalidPackageJsonTypings.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithInvalidPackageJsonTypings.d.ts @@ -34,7 +34,7 @@ export interface MutableRefObject { current: T; } export declare function useRef(current: T): MutableRefObject; -export declare const useCsvParser: invalid; +export declare const useCsvParser: () => invalid; //# sourceMappingURL=index.d.ts.map /// [Errors] //// 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 index 4e9502e186a03..249fb003077ef 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionNestedAssigments.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionNestedAssigments.d.ts @@ -3,6 +3,12 @@ //// [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); @@ -53,36 +59,50 @@ for(let f in (Foo.forIn = []) ){ //// [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(5,2): error TS9009: 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(5,30): error TS9009: 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(5,46): error TS9009: 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,4): error TS9009: 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(8,5): error TS9009: 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,7): error TS9009: 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(12,5): error TS9009: 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,9): error TS9009: 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(19,5): error TS9009: 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(21,9): error TS9009: 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(23,9): error TS9009: 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(4,18): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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,23): error TS9009: 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,45): error TS9009: 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(26,5): error TS9009: 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(28,9): error TS9009: 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,15): error TS9009: 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(33,5): error TS9009: 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(35,9): error TS9009: 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(40,15): error TS9009: 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,5): error TS9009: 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(43,9): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 (22 errors) ==== +==== expandoFunctionNestedAssigments.ts (24 errors) ==== function Foo(): void { + } + let d: number = (Foo.inVariableInit = 1); + ~~~~~~~~~~~~~~~~~~ +!!! error TS9009: 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); 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 index cd15296a7944f..23da985796e55 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts @@ -36,7 +36,7 @@ export interface Thing {} // not exported in export map, inaccessible under new //// [index.d.ts] -export declare const a: invalid; +export declare const a: () => invalid; //# sourceMappingURL=index.d.ts.map /// [Errors] //// 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/declarationEmitObjectLiteralAccessors1.d.ts.map.f b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectLiteralAccessors1.d.ts.map.f new file mode 100644 index 0000000000000..b51cc065386cf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectLiteralAccessors1.d.ts.map.f @@ -0,0 +1,587 @@ +//// [declarationEmitObjectLiteralAccessors1.ts] //// + +//// [declarationEmitObjectLiteralAccessors1.d.ts.map] +{ + "version": 3, + "file": "declarationEmitObjectLiteralAccessors1.d.ts", + "sourceRoot": "", + "sources": [ + "declarationEmitObjectLiteralAccessors1.ts" + ], + "names": [], + "mappings": [ + { + "generatedLine": 1, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 2, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 1, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 2, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 1, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 2, + "originalColumn": 13, + "name": null, + "generatedText": "const ", + "sourceText": "const " + }, + { + "generatedLine": 1, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 2, + "originalColumn": 17, + "name": null, + "generatedText": "obj1", + "sourceText": "obj1" + }, + { + "generatedLine": 1, + "generatedColumn": 27, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 2, + "originalColumn": 19, + "name": null, + "generatedText": ": ", + "sourceText": " =" + }, + { + "generatedLine": 2, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 3, + "originalColumn": 4, + "name": null + }, + { + "generatedLine": 2, + "generatedColumn": 52, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 3, + "originalColumn": 52, + "name": null, + "generatedText": "/** my awesome getter (first in source order) */", + "sourceText": "* my awesome getter (first in source order) */" + }, + { + "generatedLine": 3, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 4, + "originalColumn": 4, + "name": null + }, + { + "generatedLine": 3, + "generatedColumn": 5, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 4, + "originalColumn": 5, + "name": null, + "generatedText": "x", + "sourceText": "t" + }, + { + "generatedLine": 3, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 4, + "originalColumn": 7, + "name": null, + "generatedText": ": ", + "sourceText": " x" + }, + { + "generatedLine": 3, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 4, + "originalColumn": 13, + "name": null, + "generatedText": "string", + "sourceText": "(): st" + }, + { + "generatedLine": 3, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 4, + "originalColumn": 14, + "name": null, + "generatedText": ";", + "sourceText": "r" + }, + { + "generatedLine": 4, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 12, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 4, + "generatedColumn": 2, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 12, + "originalColumn": 2, + "name": null, + "generatedText": ";", + "sourceText": "x" + }, + { + "generatedLine": 5, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 15, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 5, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 15, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": " ret" + }, + { + "generatedLine": 5, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 15, + "originalColumn": 13, + "name": null, + "generatedText": "const ", + "sourceText": "urn \"\"" + }, + { + "generatedLine": 5, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 15, + "originalColumn": 17, + "name": null, + "generatedText": "obj2", + "sourceText": ";" + }, + { + "generatedLine": 5, + "generatedColumn": 27, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 15, + "originalColumn": 19, + "name": null, + "generatedText": ": ", + "sourceText": "" + }, + { + "generatedLine": 6, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 16, + "originalColumn": 4, + "name": null + }, + { + "generatedLine": 6, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 16, + "originalColumn": 28, + "name": null, + "generatedText": "/** my awesome getter */", + "sourceText": "" + }, + { + "generatedLine": 7, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 17, + "originalColumn": 4, + "name": null + }, + { + "generatedLine": 7, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 17, + "originalColumn": 8, + "name": null, + "generatedText": "get ", + "sourceText": "* my" + }, + { + "generatedLine": 7, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 17, + "originalColumn": 9, + "name": null, + "generatedText": "x", + "sourceText": " " + }, + { + "generatedLine": 7, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 17, + "originalColumn": 13, + "name": null, + "generatedText": "(): ", + "sourceText": "awes" + }, + { + "generatedLine": 7, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 17, + "originalColumn": 19, + "name": null, + "generatedText": "string", + "sourceText": "ome se" + }, + { + "generatedLine": 7, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 17, + "originalColumn": 20, + "name": null, + "generatedText": ";", + "sourceText": "t" + }, + { + "generatedLine": 8, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 18, + "originalColumn": 4, + "name": null + }, + { + "generatedLine": 8, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 18, + "originalColumn": 28, + "name": null, + "generatedText": "/** my awesome setter */", + "sourceText": "t x(a: number) {}," + }, + { + "generatedLine": 9, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 19, + "originalColumn": 4, + "name": null + }, + { + "generatedLine": 9, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 19, + "originalColumn": 8, + "name": null, + "generatedText": "set ", + "sourceText": "" + }, + { + "generatedLine": 9, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 19, + "originalColumn": 9, + "name": null, + "generatedText": "x", + "sourceText": "" + }, + { + "generatedLine": 9, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 19, + "originalColumn": 10, + "name": null, + "generatedText": "(", + "sourceText": "" + }, + { + "generatedLine": 9, + "generatedColumn": 11, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 19, + "originalColumn": 11, + "name": null, + "generatedText": "a", + "sourceText": "" + }, + { + "generatedLine": 9, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 19, + "originalColumn": 13, + "name": null, + "generatedText": ": ", + "sourceText": "" + }, + { + "generatedLine": 9, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 19, + "originalColumn": 19, + "name": null, + "generatedText": "number", + "sourceText": "" + }, + { + "generatedLine": 9, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 19, + "originalColumn": 21, + "name": null, + "generatedText": ");", + "sourceText": "" + }, + { + "generatedLine": 10, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 27, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 10, + "generatedColumn": 2, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 27, + "originalColumn": 2, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 11, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 29, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 11, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 29, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": " /** m" + }, + { + "generatedLine": 11, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 29, + "originalColumn": 13, + "name": null, + "generatedText": "const ", + "sourceText": "y awes" + }, + { + "generatedLine": 11, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 29, + "originalColumn": 17, + "name": null, + "generatedText": "obj3", + "sourceText": "ome " + }, + { + "generatedLine": 12, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 30, + "originalColumn": 2, + "name": null + }, + { + "generatedLine": 12, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 30, + "originalColumn": 26, + "name": null, + "generatedText": "/** my awesome getter */", + "sourceText": "set x(a: number) {}," + }, + { + "generatedLine": 14, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 34, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 14, + "generatedColumn": 2, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 34, + "originalColumn": 2, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 15, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 36, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 15, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 36, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "" + }, + { + "generatedLine": 15, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 36, + "originalColumn": 13, + "name": null, + "generatedText": "const ", + "sourceText": "" + }, + { + "generatedLine": 15, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 36, + "originalColumn": 17, + "name": null, + "generatedText": "obj4", + "sourceText": "" + }, + { + "generatedLine": 16, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 37, + "originalColumn": 2, + "name": null + }, + { + "generatedLine": 16, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 37, + "originalColumn": 26, + "name": null, + "generatedText": "/** my awesome setter */", + "sourceText": "" + }, + { + "generatedLine": 18, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 39, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 18, + "generatedColumn": 2, + "lastGeneratedColumn": null, + "source": "declarationEmitObjectLiteralAccessors1.ts", + "originalLine": 39, + "originalColumn": 2, + "name": null, + "generatedText": ";", + "sourceText": "" + } + ] +} \ 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 index dcceaa770005c..75ddf5bbb0dde 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionNestedAssigments.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/expandoFunctionNestedAssigments.d.ts @@ -3,6 +3,12 @@ //// [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); @@ -54,6 +60,7 @@ for(let f in (Foo.forIn = []) ){ //// [expandoFunctionNestedAssigments.d.ts] declare function Foo(): void; declare namespace Foo { + var inVariableInit: number; var bla: { foo: number; }; @@ -79,4 +86,65 @@ declare namespace Foo { var fromForInBody: number; var fromForInBodyNested: number; } -//# sourceMappingURL=expandoFunctionNestedAssigments.d.ts.map \ No newline at end of file +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/original/diff/accessorBodyInTypeContext.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/accessorBodyInTypeContext.d.ts.diff new file mode 100644 index 0000000000000..6c0726e3f59fc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/accessorBodyInTypeContext.d.ts.diff @@ -0,0 +1,25 @@ +// [[Reason: Syntactically invalid.]] //// + +//// [tests/cases/compiler/accessorBodyInTypeContext.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,15 +1,15 @@ + + + //// [accessorBodyInTypeContext.d.ts] + type A = { +- get foo(): number; ++ get foo(): any; + }; + type B = { + set foo(v: any); + }; + interface X { +- get foo(): number; ++ get foo(): any; + } + interface Y { + set foo(v: any); + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/arrayFind.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/arrayFind.d.ts.diff new file mode 100644 index 0000000000000..c9c6445a39566 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/arrayFind.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/compiler/arrayFind.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,9 +3,9 @@ + //// [arrayFind.d.ts] + declare function isNumber(x: any): x is number; + declare const arrayOfStringsNumbersAndBooleans: invalid; + declare const foundNumber: number | undefined; +-declare const readonlyArrayOfStringsNumbersAndBooleans: readonly (string | number | boolean)[]; ++declare const readonlyArrayOfStringsNumbersAndBooleans: ReadonlyArray; + declare const readonlyFoundNumber: number | undefined; + + /// [Errors] //// + diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asOperator1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asOperator1.d.ts.diff new file mode 100644 index 0000000000000..ea2784c2b0b21 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/asOperator1.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: TS changes the order of union constituents]] //// + +//// [tests/cases/conformance/expressions/asOperator/asOperator1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,9 +4,9 @@ + declare var as: number; + declare var x: number; + declare var y: invalid; + declare var z: string; +-declare var j: string | number; ++declare var j: number | string; + + /// [Errors] //// + + asOperator1.ts(3,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff index 775b9334eecd7..37121767e26fc 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff @@ -5,11 +5,11 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -14,9 +14,11 @@ +@@ -12,9 +12,11 @@ + + //// [b.d.ts] declare const a: {}; - declare const b: { - [1n]: number; - }; + declare const b: invalid; -declare const c: invalid; +declare const c: { + [bigNum]: number; @@ -18,29 +18,29 @@ /// [Errors] //// a.ts(2,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. -@@ -28,9 +30,8 @@ - b.ts(2,14): error TS1005: ';' expected. +@@ -27,9 +29,8 @@ b.ts(2,19): error TS1128: Declaration or statement expected. b.ts(3,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + b.ts(3,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -b.ts(4,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ==== a.ts (5 errors) ==== interface BigIntIndex { -@@ -66,9 +67,9 @@ +@@ -65,9 +66,9 @@ typedArray["1"] = 0xBB; typedArray[2] = 0xCC; // {1n: 123} is a syntax error; must go in separate file so BigIntIndex error is shown --==== b.ts (6 errors) ==== -+==== b.ts (5 errors) ==== +-==== b.ts (7 errors) ==== ++==== b.ts (6 errors) ==== // BigInt cannot be used as an object literal property const a = {1n: 123}; ~~ !!! error TS1136: Property assignment expected. -@@ -81,7 +82,5 @@ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +@@ -82,7 +83,5 @@ + !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. const c = {[bigNum]: 789}; ~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/booleanFilterAnyArray.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/booleanFilterAnyArray.d.ts.diff new file mode 100644 index 0000000000000..161f0887d9e54 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/booleanFilterAnyArray.d.ts.diff @@ -0,0 +1,24 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/compiler/booleanFilterAnyArray.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -21,13 +21,13 @@ + declare var foo: invalid; + declare var foor: Array<{ + name: string; + }>; +-declare var foor: { ++declare var foor: Array<{ + name: string; +-}[]; ++}>; + declare var foos: Array; +-declare var foos: boolean[]; ++declare var foos: Array; + + /// [Errors] //// + + booleanFilterAnyArray.ts(20,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/capturedParametersInInitializers1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/capturedParametersInInitializers1.d.ts.diff new file mode 100644 index 0000000000000..ada0304951804 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/capturedParametersInInitializers1.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/compiler/capturedParametersInInitializers1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,9 +4,9 @@ + declare function foo1(y?: invalid, x?: number): invalid; + declare function foo2(y?: (x: typeof z) => invalid, z?: number): invalid; + declare let a: invalid; + declare function foo3(y?: { +- x: number; ++ x: typeof z; + }, z?: number): invalid; + declare function foo4(y?: invalid, z?: number): invalid; + declare function foo5(y?: invalid, z?: number): invalid; + declare function foo6(y?: () => invalid, z?: number): invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/circularObjectLiteralAccessors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/circularObjectLiteralAccessors.d.ts.diff new file mode 100644 index 0000000000000..495aabb50870e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/circularObjectLiteralAccessors.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: TS merges accessors wth the same type. DTE can only merge if one type is specified.]] //// + +//// [tests/cases/compiler/circularObjectLiteralAccessors.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,8 +2,9 @@ + + //// [circularObjectLiteralAccessors.d.ts] + declare const a: { + b: { +- foo: string; ++ get foo(): string; ++ set foo(value: string); + }; + foo: string; + }; 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 index eb95f451f11f2..47a44435c87b5 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,8 +1,11 @@ +@@ -1,20 +1,26 @@ //// [computedPropertiesNarrowed.d.ts] @@ -16,9 +16,12 @@ +}; declare const y: 0; export declare let o2: { - [y]: number; +- 0: number; ++ [y]: number; + }; + export declare let o3: { + 1: number; }; -@@ -12,9 +15,12 @@ export declare let o31: { [-1]: number; }; @@ -32,7 +35,15 @@ declare const uu: unique symbol; export declare let o6: { [uu]: number; -@@ -30,24 +36,21 @@ +@@ -23,31 +29,28 @@ + declare let E: { + readonly A: 1; + }; + export declare const o8: { +- 1: number; ++ [E.A]: number; + }; + export declare const o9: invalid; export {}; /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames7_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames7_ES5.d.ts.diff new file mode 100644 index 0000000000000..0f1929ea81dd9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames7_ES5.d.ts.diff @@ -0,0 +1,15 @@ +// [[Reason: Computed property are not resolved]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,6 +4,6 @@ + declare enum E { + member = 0 + } + declare var v: { +- 0: number; ++ [E.member]: number; + }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames7_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames7_ES6.d.ts.diff new file mode 100644 index 0000000000000..9cf4a7ed3979d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames7_ES6.d.ts.diff @@ -0,0 +1,15 @@ +// [[Reason: Computed property are not resolved]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,6 +4,6 @@ + declare enum E { + member = 0 + } + declare var v: { +- 0: number; ++ [E.member]: number; + }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/contextualSignatureInstantiation.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/contextualSignatureInstantiation.d.ts.diff new file mode 100644 index 0000000000000..895f4927e0a7a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/contextualSignatureInstantiation.d.ts.diff @@ -0,0 +1,24 @@ +// [[Reason: TS changes the order of union constituents]] //// + +//// [tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -9,12 +9,12 @@ + declare var a: number; + declare var a: number; + declare var a: number; + declare var b: number | string; +-declare var b: string | number; +-declare var b: string | number; +-declare var b: string | number; +-declare var b: string | number; ++declare var b: number | string; ++declare var b: number | string; ++declare var b: number | string; ++declare var b: number | string; + declare var d: number[] | string[]; + declare var d: number[] | string[]; + declare var d: number[] | string[]; + declare var d: number[] | string[]; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/contextualTyping.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/contextualTyping.d.ts.diff new file mode 100644 index 0000000000000..1c76dd597f056 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/contextualTyping.d.ts.diff @@ -0,0 +1,27 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/compiler/contextualTyping.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -95,13 +95,17 @@ + declare var c12t3: number[]; + declare var c12t4: () => IFoo; + declare var c12t5: (n: number) => IFoo; + declare var c12t6: (n: number, s: string) => IFoo; +-declare var c12t7: (n: number, s: string) => number; ++declare var c12t7: { ++ (n: number, s: string): number; ++}; + declare var c12t8: (n: number, s: string) => number; + declare var c12t9: number[][]; + declare var c12t10: IFoo[]; +-declare var c12t11: ((n: number, s: string) => string)[]; ++declare var c12t11: { ++ (n: number, s: string): string; ++}[]; + declare var c12t12: IBar; + declare var c12t13: IFoo; + declare var c12t14: IFoo; + declare function EF1(a: number, b: number): number; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/contextualTyping38.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/contextualTyping38.d.ts.diff new file mode 100644 index 0000000000000..6cc157241e6cb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/contextualTyping38.d.ts.diff @@ -0,0 +1,15 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/compiler/contextualTyping38.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,4 +1,6 @@ + + + //// [contextualTyping38.d.ts] +-declare var foo: () => number; ++declare var foo: { ++ (): number; ++}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/contextualTyping39.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/contextualTyping39.d.ts.diff new file mode 100644 index 0000000000000..885354c18c85d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/contextualTyping39.d.ts.diff @@ -0,0 +1,19 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/compiler/contextualTyping39.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,10 @@ + + + //// [contextualTyping39.d.ts] +-declare var foo: () => number; ++declare var foo: { ++ (): number; ++}; + + /// [Errors] //// + + contextualTyping39.ts(1,11): error TS2352: Conversion of type '() => string' to type '() => number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. 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/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..d0bbf3db18926 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitObjectLiteralAccessors1.d.ts.diff @@ -0,0 +1,20 @@ +// [[Reason: TS merges accessors wth 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/duplicateObjectLiteralProperty_computedName1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/duplicateObjectLiteralProperty_computedName1.d.ts.diff new file mode 100644 index 0000000000000..6b4bc641f7f7b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/duplicateObjectLiteralProperty_computedName1.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: DTE preserves different duplicate identifier]] //// + +//// [tests/cases/compiler/duplicateObjectLiteralProperty_computedName1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -17,9 +17,9 @@ + declare const t5: { + "+1": number; + }; + declare const t6: { +- [-1]: number; ++ "-1": number; + }; + declare const t7: { + "-1": number; + }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/duplicateObjectLiteralProperty_computedName2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/duplicateObjectLiteralProperty_computedName2.d.ts.diff new file mode 100644 index 0000000000000..1293e34f74b91 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/duplicateObjectLiteralProperty_computedName2.d.ts.diff @@ -0,0 +1,30 @@ +// [[Reason: Computed property are not resolved]] //// + +//// [tests/cases/compiler/duplicateObjectLiteralProperty_computedName2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -9,18 +9,18 @@ + declare enum E2 { + B = 0 + } + declare const t1: { +- 1: number; ++ [n]: number; + }; + declare const t2: { +- s: number; ++ [s]: number; + }; + declare const t3: { +- ENUM_KEY: number; ++ [E1.A]: number; + }; + declare const t4: { +- 0: number; ++ [E2.B]: number; + }; + + /// [Errors] //// + 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/duplicateVarsAcrossFileBoundaries.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/duplicateVarsAcrossFileBoundaries.d.ts.diff new file mode 100644 index 0000000000000..42117b2a87a68 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/duplicateVarsAcrossFileBoundaries.d.ts.diff @@ -0,0 +1,27 @@ +// [[Reason: TSC Resolves variable types across files.]] //// + +//// [tests/cases/compiler/duplicateVarsAcrossFileBoundaries.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,15 +4,15 @@ + declare var x: number; + declare var y: string; + + //// [duplicateVarsAcrossFileBoundaries_1.d.ts] +-declare var x: number; ++declare var x: boolean; + declare var z: number; + + //// [duplicateVarsAcrossFileBoundaries_2.d.ts] +-declare var x: number; +-declare var y: string; +-declare var z: number; ++declare var x: string; ++declare var y: number; ++declare var z: boolean; + + //// [duplicateVarsAcrossFileBoundaries_3.d.ts] + declare var x: number; + declare var y: string; 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/escapedIdentifiers.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/escapedIdentifiers.d.ts.diff new file mode 100644 index 0000000000000..ea124e3a02989 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/escapedIdentifiers.d.ts.diff @@ -0,0 +1,20 @@ +// [[Reason: DTE resolves unicode escapes in some cases.]] //// + +//// [tests/cases/compiler/escapedIdentifiers.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -26,10 +26,10 @@ + bar2: number; + } + declare var interfaceType1Object1: interfaceType1; + declare var interfaceType1Object2: interfaceType1; +-declare var interfaceType2Object1: interfaceType\u0032; +-declare var interfaceType2Object2: interfaceType\u0032; ++declare var interfaceType2Object1: interfaceType2; ++declare var interfaceType2Object2: interfaceType2; + declare class testClass { + func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number): invalid; + } + declare class constructorTestClass { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/generatedContextualTyping.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/generatedContextualTyping.d.ts.diff new file mode 100644 index 0000000000000..d66ce139c395b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/generatedContextualTyping.d.ts.diff @@ -0,0 +1,27 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -633,12 +633,16 @@ + var t: Genric; + } + declare var x206: () => Base[]; + declare var x207: () => Base[]; +-declare var x209: () => Base[]; +-declare var x210: () => Base[]; ++declare var x209: { ++ (): Base[]; ++}; ++declare var x210: { ++ (): Base[]; ++}; + declare var x211: Base[]; +-declare var x212: Base[]; ++declare var x212: Array; + declare var x213: { + [n: number]: Base; + }; + declare var x214: { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/genericTypeReferenceWithoutTypeArgument.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/genericTypeReferenceWithoutTypeArgument.d.ts.diff new file mode 100644 index 0000000000000..11005c1224c9c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/genericTypeReferenceWithoutTypeArgument.d.ts.diff @@ -0,0 +1,31 @@ +// [[Reason: TS resolves types]] //// + +//// [tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -15,9 +15,9 @@ + [x: C]: C; + }; + declare var e: (x: C) => invalid; + declare function f(x: C): C; +-declare var g: (x: any) => any; ++declare var g: (x: C) => C; + declare class D extends C { + } + interface I extends C { + } +@@ -33,10 +33,10 @@ + interface I2 extends M.E { + } + declare function h(x: T): invalid; + declare function i(x: T): invalid; +-declare var j: any; +-declare var k: any; ++declare var j: C; ++declare var k: M.E; + + /// [Errors] //// + + genericTypeReferenceWithoutTypeArgument.ts(8,8): error TS2314: Generic type 'C' requires 1 type argument(s). diff --git a/tests/baselines/reference/isolated-declarations/original/diff/genericTypeReferenceWithoutTypeArgument2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/genericTypeReferenceWithoutTypeArgument2.d.ts.diff new file mode 100644 index 0000000000000..16a0461946d69 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/genericTypeReferenceWithoutTypeArgument2.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: TS resolves types]] //// + +//// [tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -15,9 +15,9 @@ + [x: I]: I; + }; + declare var e: (x: I) => invalid; + declare function f(x: I): I; +-declare var g: (x: any) => any; ++declare var g: (x: I) => I; + declare class D extends I { + } + interface U extends I { + } +@@ -34,9 +34,9 @@ + } + declare function h(x: T): invalid; + declare function i(x: T): invalid; + declare var j: C; +-declare var k: any; ++declare var k: M.E; + + /// [Errors] //// + + genericTypeReferenceWithoutTypeArgument2.ts(8,8): error TS2314: Generic type 'I' requires 1 type argument(s). diff --git a/tests/baselines/reference/isolated-declarations/original/diff/gettersAndSettersErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/gettersAndSettersErrors.d.ts.diff new file mode 100644 index 0000000000000..ec99812382504 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/gettersAndSettersErrors.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: Duplicate identifiers in class result in different types]] //// + +//// [tests/cases/compiler/gettersAndSettersErrors.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -3,9 +3,9 @@ + //// [gettersAndSettersErrors.d.ts] + declare class C { + get Foo(): invalid; + set Foo(foo: string); +- Foo: string; ++ Foo: number; + get Goo(): string; + set Goo(v: string): string; + } + declare class E { 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/inKeywordAndIntersection.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/inKeywordAndIntersection.d.ts.diff new file mode 100644 index 0000000000000..de672ca16231c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/inKeywordAndIntersection.d.ts.diff @@ -0,0 +1,20 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/compiler/inKeywordAndIntersection.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -16,9 +16,11 @@ + interface InstanceTwo { + two(): void; + } + declare const instance: InstanceOne | InstanceTwo; +-declare const ClassOne: (new () => InstanceOne) & { ++declare const ClassOne: { ++ new (): InstanceOne; ++} & { + foo: true; + }; + + /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/literalTypesAndTypeAssertions.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/literalTypesAndTypeAssertions.d.ts.diff new file mode 100644 index 0000000000000..d6a100b70e7b3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/literalTypesAndTypeAssertions.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/conformance/types/literal/literalTypesAndTypeAssertions.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,9 +5,9 @@ + a: "foo"; + b: "foo"; + c: string; + }; +-declare let x1: 0 | 1; ++declare let x1: (0 | 1); + declare let x2: number; + declare let a: invalid; + declare let b: invalid; + declare let c: invalid; 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..68c779775d520 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts.diff @@ -0,0 +1,107 @@ +// [[Reason: TS normalizes types]] //// + +//// [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/noUncheckedIndexedAccess.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/noUncheckedIndexedAccess.d.ts.diff new file mode 100644 index 0000000000000..a6a7bc026eea2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/noUncheckedIndexedAccess.d.ts.diff @@ -0,0 +1,20 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -86,10 +86,10 @@ + a: string; + b: string; + [key: string]: string; + }; +-declare const fn1: (key: Key) => string; +-declare const fn2: (key: Key) => string; ++declare const fn1: (key: Key) => string; ++declare const fn2: (key: Key) => string; + declare const fn3: (key: Key) => invalid; + + /// [Errors] //// + 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/objectLiteralEnumPropertyNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/objectLiteralEnumPropertyNames.d.ts.diff new file mode 100644 index 0000000000000..86e9b420ef71f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/objectLiteralEnumPropertyNames.d.ts.diff @@ -0,0 +1,49 @@ +// [[Reason: Computed property are not resolved]] //// + +//// [tests/cases/compiler/objectLiteralEnumPropertyNames.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -9,18 +9,18 @@ + [key in Strs]: string; + }; + declare const x: TestStrs; + declare const ux: { +- a: string; +- b: string; ++ [Strs.A]: string; ++ [Strs.B]: string; + }; + declare const y: TestStrs; + declare const a = "a"; + declare const b = "b"; + declare const z: TestStrs; + declare const uz: { +- a: string; +- b: string; ++ [a]: string; ++ [b]: string; + }; + declare enum Nums { + A = 0, + B = 1 +@@ -30,14 +30,14 @@ + 1: number; + }; + declare const n: TestNums; + declare const un: { +- 0: number; +- 1: number; ++ [Nums.A]: number; ++ [Nums.B]: number; + }; + declare const an = 0; + declare const bn = 1; + declare const m: TestNums; + declare const um: { +- 0: number; +- 1: number; ++ [an]: number; ++ [bn]: number; + }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/objectLiteralGettersAndSetters.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/objectLiteralGettersAndSetters.d.ts.diff new file mode 100644 index 0000000000000..53ce1a3b7cc66 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/objectLiteralGettersAndSetters.d.ts.diff @@ -0,0 +1,34 @@ +// [[Reason: TS merges accessors wth the same type. DTE can only merge if one type is specified.]] //// + +//// [tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -40,18 +40,22 @@ + x: any; + }; + declare var anyVar: any; + declare var sameType1: { +- x: string; ++ get x(): string; ++ set x(n: string); + }; + declare var sameType2: { +- x: number[]; ++ get x(): Array; ++ set x(n: number[]); + }; + declare var sameType3: { +- x: any; ++ get x(): any; ++ set x(n: typeof anyVar); + }; + declare var sameType4: { +- x: Date; ++ get x(): Date; ++ set x(n: Date); + }; + declare var setParamType1: { + n: (t: string) => void; + }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/optionalChainingInference.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/optionalChainingInference.d.ts.diff new file mode 100644 index 0000000000000..541a0a335d3f9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/optionalChainingInference.d.ts.diff @@ -0,0 +1,18 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/conformance/expressions/optionalChaining/optionalChainingInference.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -14,9 +14,9 @@ + } | undefined; + declare const b1: invalid; + declare const v1: number; + declare const b2: { +- value: number; ++ value: number | undefined; + }; + declare const v2: number; + declare const b3: { + value: number | undefined; 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/parseInvalidNonNullableTypes.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parseInvalidNonNullableTypes.d.ts.diff new file mode 100644 index 0000000000000..2657995c83b9b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parseInvalidNonNullableTypes.d.ts.diff @@ -0,0 +1,21 @@ +// [[Reason: Syntactically invalid.]] //// + +//// [tests/cases/compiler/parseInvalidNonNullableTypes.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -8,11 +8,11 @@ + declare function f5(a: !string): invalid; + declare function f6(a: !number): invalid; + declare function f7(): !string; + declare function f8(): !string; +-declare const a: any; ++declare const a: !any; + declare const b: !number; +-declare const c: any; ++declare const c: !any; + declare const d: !number; + + /// [Errors] //// + diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parseInvalidNullableTypes.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parseInvalidNullableTypes.d.ts.diff new file mode 100644 index 0000000000000..3f2a0a97d218b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parseInvalidNullableTypes.d.ts.diff @@ -0,0 +1,21 @@ +// [[Reason: Syntactically invalid.]] //// + +//// [tests/cases/compiler/parseInvalidNullableTypes.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,11 +6,11 @@ + declare function f3(a: ?number): invalid; + declare function f4(a: ?string): invalid; + declare function f5(a: ?number): invalid; + declare function f6(a: string): ?string; +-declare const a: any; ++declare const a: ?any; + declare const b: ?number; +-declare const c: any; ++declare const c: ?any; + declare const d: ?number; + declare let e: ?unknown; + declare let f: ?never; + declare let g: ?void; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parseTypes.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parseTypes.d.ts.diff new file mode 100644 index 0000000000000..3faa8c4d288a3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parseTypes.d.ts.diff @@ -0,0 +1,24 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/compiler/parseTypes.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,10 +1,14 @@ + + + //// [parseTypes.d.ts] + declare var x: () => number; +-declare var y: () => number; +-declare var z: new () => number; ++declare var y: { ++ (): number; ++}; ++declare var z: { ++ new (): number; ++}; + declare var w: { + [x: number]: number; + }; + declare function f(): invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/recursiveTypesWithTypeof.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/recursiveTypesWithTypeof.d.ts.diff new file mode 100644 index 0000000000000..afba8f6dbad1a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/recursiveTypesWithTypeof.d.ts.diff @@ -0,0 +1,40 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -23,26 +23,26 @@ + declare var h: () => typeof h; + declare var i: (x: typeof i) => typeof x; + declare var i: (x: typeof i) => typeof x; + declare var j: (x: T) => T; +-declare var j: (x: T) => T; ++declare var j: (x: T) => T; + declare var h2: new () => typeof h2; + declare var h2: new () => typeof h2; + declare var i2: new (x: typeof i2) => typeof x; + declare var i2: new (x: typeof i2) => typeof x; + declare var j2: new (x: T) => T; +-declare var j2: new (x: T) => T; ++declare var j2: new (x: T) => T; + declare var k: { + [n: number]: typeof k; + [s: string]: typeof k; + }; + declare var k: { +- [n: number]: any; +- [s: string]: any; ++ [n: number]: typeof k; ++ [s: string]: typeof k; + }; + declare var k: { +- [n: number]: any; +- [s: string]: any; ++ [n: number]: typeof k; ++ [s: string]: typeof k; + }; + declare var hy1: { + x: typeof hy1; + }[]; 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/stringLiteralsWithTypeAssertions01.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/stringLiteralsWithTypeAssertions01.d.ts.diff new file mode 100644 index 0000000000000..e46daf8e2c2f6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/stringLiteralsWithTypeAssertions01.d.ts.diff @@ -0,0 +1,14 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/conformance/types/literal/stringLiteralsWithTypeAssertions01.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,5 +6,5 @@ + declare let b: "foo"; + declare let c: "foo"; + declare let d: "bar"; + declare let e: "baz"; +-declare let f: "foo" | "bar"; ++declare let f: typeof fooOrBar; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/thisTypeErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/thisTypeErrors.d.ts.diff new file mode 100644 index 0000000000000..04a865e651838 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/thisTypeErrors.d.ts.diff @@ -0,0 +1,28 @@ +// [[Reason: TS resolves invalid types to any]] //// + +//// [tests/cases/conformance/types/thisType/thisTypeErrors.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -42,18 +42,18 @@ + }; + } + declare class C2 { + static x: this; +- static y: any; ++ static y: this; + static foo(x: this): this; + } + declare namespace N1 { + var x: this; + var y: invalid; + } + declare class C3 { + x1: { +- g(x: any): any; ++ g(x: this): this; + }; + f(): invalid; + } + diff --git a/tests/baselines/reference/isolated-declarations/original/diff/thisTypeInAccessors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/thisTypeInAccessors.d.ts.diff new file mode 100644 index 0000000000000..61eaa7f987690 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/thisTypeInAccessors.d.ts.diff @@ -0,0 +1,19 @@ +// [[Reason: TS merges accessors wth the same type. DTE can only merge if one type is specified.]] //// + +//// [tests/cases/conformance/types/thisType/thisTypeInAccessors.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,9 +6,10 @@ + x: number; + } + declare const explicit: { + n: number; +- x: number; ++ get x(this: Foo): number; ++ set x(this: Foo, n: number); + }; + declare const copiedFromGetter: { + n: number; + x: number; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/accessorBodyInTypeContext.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/accessorBodyInTypeContext.d.ts new file mode 100644 index 0000000000000..012614d0f5d04 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/accessorBodyInTypeContext.d.ts @@ -0,0 +1,73 @@ +//// [tests/cases/compiler/accessorBodyInTypeContext.ts] //// + +//// [accessorBodyInTypeContext.ts] +type A = { + get foo() { return 0 } +}; + +type B = { + set foo(v: any) { } +}; + +interface X { + get foo() { return 0 } +} + +interface Y { + set foo(v: any) { } +} + + + +/// [Declarations] //// + + + +//// [accessorBodyInTypeContext.d.ts] +type A = { + get foo(): any; +}; +type B = { + set foo(v: any); +}; +interface X { + get foo(): any; +} +interface Y { + set foo(v: any); +} + +/// [Errors] //// + +accessorBodyInTypeContext.ts(2,15): error TS1183: An implementation cannot be declared in ambient contexts. +accessorBodyInTypeContext.ts(6,21): error TS1183: An implementation cannot be declared in ambient contexts. +accessorBodyInTypeContext.ts(10,15): error TS1183: An implementation cannot be declared in ambient contexts. +accessorBodyInTypeContext.ts(14,21): error TS1183: An implementation cannot be declared in ambient contexts. + + +==== accessorBodyInTypeContext.ts (4 errors) ==== + type A = { + get foo() { return 0 } + ~~~~~~~~~~~~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + }; + + type B = { + set foo(v: any) { } + ~~~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + }; + + interface X { + get foo() { return 0 } + ~~~~~~~~~~~~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + } + + interface Y { + set foo(v: any) { } + ~~~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + } + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/arrayFind.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/arrayFind.d.ts new file mode 100644 index 0000000000000..7a8774c878c64 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/arrayFind.d.ts @@ -0,0 +1,45 @@ +//// [tests/cases/compiler/arrayFind.ts] //// + +//// [arrayFind.ts] +// test fix for #18112, type guard predicates should narrow returned element +function isNumber(x: any): x is number { + return typeof x === "number"; +} + +const arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true]; +const foundNumber: number | undefined = arrayOfStringsNumbersAndBooleans.find(isNumber); + +const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans as ReadonlyArray; +const readonlyFoundNumber: number | undefined = readonlyArrayOfStringsNumbersAndBooleans.find(isNumber); + + +/// [Declarations] //// + + + +//// [arrayFind.d.ts] +declare function isNumber(x: any): x is number; +declare const arrayOfStringsNumbersAndBooleans: invalid; +declare const foundNumber: number | undefined; +declare const readonlyArrayOfStringsNumbersAndBooleans: ReadonlyArray; +declare const readonlyFoundNumber: number | undefined; + +/// [Errors] //// + +arrayFind.ts(6,42): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== arrayFind.ts (1 errors) ==== + // test fix for #18112, type guard predicates should narrow returned element + function isNumber(x: any): x is number { + return typeof x === "number"; + } + + const arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true]; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const foundNumber: number | undefined = arrayOfStringsNumbersAndBooleans.find(isNumber); + + const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans as ReadonlyArray; + const readonlyFoundNumber: number | undefined = readonlyArrayOfStringsNumbersAndBooleans.find(isNumber); + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asOperator1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asOperator1.d.ts new file mode 100644 index 0000000000000..494dfa55b54bb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/asOperator1.d.ts @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/expressions/asOperator/asOperator1.ts] //// + +//// [asOperator1.ts] +var as = 43; +var x = undefined as number; +var y = (null as string).length; +var z = Date as any as string; + +// Should parse as a union type, not a bitwise 'or' of (32 as number) and 'string' +var j = 32 as number|string; +j = ''; + + +/// [Declarations] //// + + + +//// [asOperator1.d.ts] +declare var as: number; +declare var x: number; +declare var y: invalid; +declare var z: string; +declare var j: number | string; + +/// [Errors] //// + +asOperator1.ts(3,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== asOperator1.ts (1 errors) ==== + var as = 43; + var x = undefined as number; + var y = (null as string).length; + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var z = Date as any as string; + + // Should parse as a union type, not a bitwise 'or' of (32 as number) and 'string' + var j = 32 as number|string; + j = ''; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts index 36dacaa423cf6..fcc5a6b52a458 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts @@ -48,9 +48,7 @@ declare const typedArray: invalid; //// [b.d.ts] declare const a: {}; -declare const b: { - [1n]: number; -}; +declare const b: invalid; declare const c: { [bigNum]: number; }; @@ -66,6 +64,7 @@ b.ts(2,12): error TS1136: Property assignment expected. b.ts(2,14): error TS1005: ';' expected. b.ts(2,19): error TS1128: Declaration or statement expected. b.ts(3,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +b.ts(3,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -104,7 +103,7 @@ b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'nu typedArray[2] = 0xCC; // {1n: 123} is a syntax error; must go in separate file so BigIntIndex error is shown -==== b.ts (5 errors) ==== +==== b.ts (6 errors) ==== // BigInt cannot be used as an object literal property const a = {1n: 123}; ~~ @@ -116,6 +115,8 @@ b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'nu const b = {[1n]: 456}; ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. const c = {[bigNum]: 789}; ~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/booleanFilterAnyArray.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/booleanFilterAnyArray.d.ts new file mode 100644 index 0000000000000..f44e66e183e1c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/booleanFilterAnyArray.d.ts @@ -0,0 +1,94 @@ +//// [tests/cases/compiler/booleanFilterAnyArray.ts] //// + +//// [booleanFilterAnyArray.ts] +interface Bullean { } +interface BulleanConstructor { + new(v1?: any): Bullean; + (v2?: T): v2 is T; +} + +interface 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; +var xs: Ari; +var xs = anys.filter(Bullean) + +declare let realanys: any[]; +var ys: any[]; +var ys = realanys.filter(Boolean) + +var foo = [{ name: 'x' }] +var foor: Array<{name: string}> +var foor = foo.filter(x => x.name) +var foos: Array +var foos = [true, true, false, null].filter((thing): thing is boolean => thing !== null) + + +/// [Declarations] //// + + + +//// [booleanFilterAnyArray.d.ts] +interface Bullean { +} +interface BulleanConstructor { + new (v1?: any): Bullean; + (v2?: T): v2 is T; +} +interface 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; +declare var xs: Ari; +declare var xs: Ari; +declare let realanys: any[]; +declare var ys: any[]; +declare var ys: any[]; +declare var foo: invalid; +declare var foor: Array<{ + name: string; +}>; +declare var foor: Array<{ + name: string; +}>; +declare var foos: Array; +declare var foos: Array; + +/// [Errors] //// + +booleanFilterAnyArray.ts(20,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== booleanFilterAnyArray.ts (1 errors) ==== + interface Bullean { } + interface BulleanConstructor { + new(v1?: any): Bullean; + (v2?: T): v2 is T; + } + + interface 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; + var xs: Ari; + var xs = anys.filter(Bullean) + + declare let realanys: any[]; + var ys: any[]; + var ys = realanys.filter(Boolean) + + var foo = [{ name: 'x' }] + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var foor: Array<{name: string}> + var foor = foo.filter(x => x.name) + var foos: Array + var foos = [true, true, false, null].filter((thing): thing is boolean => thing !== null) + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/capturedParametersInInitializers1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/capturedParametersInInitializers1.d.ts new file mode 100644 index 0000000000000..78cf630265b5d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/capturedParametersInInitializers1.d.ts @@ -0,0 +1,170 @@ +//// [tests/cases/compiler/capturedParametersInInitializers1.ts] //// + +//// [capturedParametersInInitializers1.ts] +// ok - usage is deferred +function foo1(y = class {c = x}, x = 1) { + new y().c; +} + +// ok - used in file +function foo2(y = function(x: typeof z) {}, z = 1) { + +} + +// ok -used in type +let a; +function foo3(y = { x: a }, z = 1) { + +} + +// error - used before declaration +function foo4(y = {z}, z = 1) { +} + +// error - used before declaration, IIFEs are inlined +function foo5(y = (() => z)(), z = 1) { +} + +// ok - IIFE inside another function +function foo6(y = () => (() => z)(), z = 1) { +} + +// ok - used inside immediately invoked generator function +function foo7(y = (function*() {yield z})(), z = 1) { +} + +// ok - used inside immediately invoked async function +function foo8(y = (async () => z)(), z = 1) { +} + +// error - used as computed name of method +function foo9(y = {[z]() { return z; }}, z = 1) { +} + + +/// [Declarations] //// + + + +//// [capturedParametersInInitializers1.d.ts] +declare function foo1(y?: invalid, x?: number): invalid; +declare function foo2(y?: (x: typeof z) => invalid, z?: number): invalid; +declare let a: invalid; +declare function foo3(y?: { + x: typeof z; +}, z?: number): invalid; +declare function foo4(y?: invalid, z?: number): invalid; +declare function foo5(y?: invalid, z?: number): invalid; +declare function foo6(y?: () => invalid, z?: number): invalid; +declare function foo7(y?: invalid, z?: number): invalid; +declare function foo8(y?: invalid, z?: number): invalid; +declare function foo9(y?: invalid, z?: number): invalid; + +/// [Errors] //// + +capturedParametersInInitializers1.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(2,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(7,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(7,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(13,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(18,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(18,20): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. +capturedParametersInInitializers1.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(22,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(22,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(22,26): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. +capturedParametersInInitializers1.ts(26,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(26,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(30,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(30,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(34,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(38,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(38,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. + + +==== capturedParametersInInitializers1.ts (21 errors) ==== + // ok - usage is deferred + function foo1(y = class {c = x}, x = 1) { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + new y().c; + } + + // ok - used in file + function foo2(y = function(x: typeof z) {}, z = 1) { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + } + + // ok -used in type + let a; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function foo3(y = { x: a }, z = 1) { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + } + + // error - used before declaration + function foo4(y = {z}, z = 1) { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // error - used before declaration, IIFEs are inlined + function foo5(y = (() => z)(), z = 1) { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. + } + + // ok - IIFE inside another function + function foo6(y = () => (() => z)(), z = 1) { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // ok - used inside immediately invoked generator function + function foo7(y = (function*() {yield z})(), z = 1) { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // ok - used inside immediately invoked async function + function foo8(y = (async () => z)(), z = 1) { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // error - used as computed name of method + function foo9(y = {[z]() { return z; }}, z = 1) { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/circularObjectLiteralAccessors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/circularObjectLiteralAccessors.d.ts new file mode 100644 index 0000000000000..43d428ccd54a6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/circularObjectLiteralAccessors.d.ts @@ -0,0 +1,29 @@ +//// [tests/cases/compiler/circularObjectLiteralAccessors.ts] //// + +//// [circularObjectLiteralAccessors.ts] +// Repro from #6000 + +const a = { + b: { + get foo(): string { + return a.foo; + }, + set foo(value: string) { + a.foo = value; + } + }, + foo: '' +}; + +/// [Declarations] //// + + + +//// [circularObjectLiteralAccessors.d.ts] +declare const a: { + b: { + get foo(): string; + set foo(value: string); + }; + foo: string; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames7_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames7_ES5.d.ts new file mode 100644 index 0000000000000..d84176ceab005 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames7_ES5.d.ts @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES5.ts] //// + +//// [computedPropertyNames7_ES5.ts] +enum E { + member +} +var v = { + [E.member]: 0 +} + +/// [Declarations] //// + + + +//// [computedPropertyNames7_ES5.d.ts] +declare enum E { + member = 0 +} +declare var v: { + [E.member]: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames7_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames7_ES6.d.ts new file mode 100644 index 0000000000000..89828ea54cd69 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames7_ES6.d.ts @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES6.ts] //// + +//// [computedPropertyNames7_ES6.ts] +enum E { + member +} +var v = { + [E.member]: 0 +} + +/// [Declarations] //// + + + +//// [computedPropertyNames7_ES6.d.ts] +declare enum E { + member = 0 +} +declare var v: { + [E.member]: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/contextualSignatureInstantiation.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/contextualSignatureInstantiation.d.ts new file mode 100644 index 0000000000000..8c2441d21e784 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/contextualSignatureInstantiation.d.ts @@ -0,0 +1,124 @@ +//// [tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts] //// + +//// [contextualSignatureInstantiation.ts] +// TypeScript Spec, section 4.12.2: +// If e is an expression of a function type that contains exactly one generic call signature and no other members, +// and T is a function type with exactly one non - generic call signature and no other members, then any inferences +// made for type parameters referenced by the parameters of T's call signature are fixed, and e's type is changed +// to a function type with e's call signature instantiated in the context of T's call signature (section 3.8.5). + +declare function foo(cb: (x: number, y: string) => T): T; +declare function bar(x: T, y: U, cb: (x: T, y: U) => V): V; +declare function baz(x: T, y: T, cb: (x: T, y: T) => U): U; + +declare function g(x: T, y: T): T; +declare function h(x: T, y: U): T[] | U[]; + +var a: number; +var a = bar(1, 1, g); // Should be number +var a = baz(1, 1, g); // Should be number + +var b: number | string; +var b = foo(g); // Error, number and string are disjoint types +var b = bar(1, "one", g); // Error, number and string are disjoint types +var b = bar("one", 1, g); // Error, number and string are disjoint types +var b = baz(b, b, g); // Should be number | string + +var d: number[] | string[]; +var d = foo(h); // Should be number[] | string[] +var d = bar(1, "one", h); // Should be number[] | string[] +var d = bar("one", 1, h); // Should be number[] | string[] +var d = baz(d, d, g); // Should be number[] | string[] + + +/// [Declarations] //// + + + +//// [contextualSignatureInstantiation.d.ts] +declare function foo(cb: (x: number, y: string) => T): T; +declare function bar(x: T, y: U, cb: (x: T, y: U) => V): V; +declare function baz(x: T, y: T, cb: (x: T, y: T) => U): U; +declare function g(x: T, y: T): T; +declare function h(x: T, y: U): T[] | U[]; +declare var a: number; +declare var a: number; +declare var a: number; +declare var b: number | string; +declare var b: number | string; +declare var b: number | string; +declare var b: number | string; +declare var b: number | string; +declare var d: number[] | string[]; +declare var d: number[] | string[]; +declare var d: number[] | string[]; +declare var d: number[] | string[]; +declare var d: number[] | string[]; + +/// [Errors] //// + +contextualSignatureInstantiation.ts(19,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. +contextualSignatureInstantiation.ts(19,13): error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. + Types of parameters 'y' and 'y' are incompatible. + Type 'string' is not assignable to type 'number'. +contextualSignatureInstantiation.ts(20,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. +contextualSignatureInstantiation.ts(20,23): error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. + Types of parameters 'y' and 'y' are incompatible. + Type 'string' is not assignable to type 'number'. +contextualSignatureInstantiation.ts(21,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. +contextualSignatureInstantiation.ts(21,23): error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: string, y: number) => string'. + Types of parameters 'y' and 'y' are incompatible. + Type 'number' is not assignable to type 'string'. + + +==== contextualSignatureInstantiation.ts (6 errors) ==== + // TypeScript Spec, section 4.12.2: + // If e is an expression of a function type that contains exactly one generic call signature and no other members, + // and T is a function type with exactly one non - generic call signature and no other members, then any inferences + // made for type parameters referenced by the parameters of T's call signature are fixed, and e's type is changed + // to a function type with e's call signature instantiated in the context of T's call signature (section 3.8.5). + + declare function foo(cb: (x: number, y: string) => T): T; + declare function bar(x: T, y: U, cb: (x: T, y: U) => V): V; + declare function baz(x: T, y: T, cb: (x: T, y: T) => U): U; + + declare function g(x: T, y: T): T; + declare function h(x: T, y: U): T[] | U[]; + + var a: number; + var a = bar(1, 1, g); // Should be number + var a = baz(1, 1, g); // Should be number + + var b: number | string; + var b = foo(g); // Error, number and string are disjoint types + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. +!!! related TS6203 contextualSignatureInstantiation.ts:18:5: 'b' was also declared here. + ~ +!!! error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. +!!! error TS2345: Types of parameters 'y' and 'y' are incompatible. +!!! error TS2345: Type 'string' is not assignable to type 'number'. + var b = bar(1, "one", g); // Error, number and string are disjoint types + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. +!!! related TS6203 contextualSignatureInstantiation.ts:18:5: 'b' was also declared here. + ~ +!!! error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. +!!! error TS2345: Types of parameters 'y' and 'y' are incompatible. +!!! error TS2345: Type 'string' is not assignable to type 'number'. + var b = bar("one", 1, g); // Error, number and string are disjoint types + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. +!!! related TS6203 contextualSignatureInstantiation.ts:18:5: 'b' was also declared here. + ~ +!!! error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: string, y: number) => string'. +!!! error TS2345: Types of parameters 'y' and 'y' are incompatible. +!!! error TS2345: Type 'number' is not assignable to type 'string'. + var b = baz(b, b, g); // Should be number | string + + var d: number[] | string[]; + var d = foo(h); // Should be number[] | string[] + var d = bar(1, "one", h); // Should be number[] | string[] + var d = bar("one", 1, h); // Should be number[] | string[] + var d = baz(d, d, g); // Should be number[] | string[] + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping.d.ts new file mode 100644 index 0000000000000..19c8649925841 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping.d.ts @@ -0,0 +1,601 @@ +//// [tests/cases/compiler/contextualTyping.ts] //// + +//// [contextualTyping.ts] +// DEFAULT INTERFACES +interface IFoo { + n: number; + s: string; + f(i: number, s: string): string; + a: number[]; +} + +interface IBar { + foo: IFoo; +} + +// CONTEXT: Class property declaration +class C1T5 { + foo: (i: number, s: string) => number = function(i) { + return i; + } +} + +// CONTEXT: Module property declaration +module C2T5 { + export var foo: (i: number, s: string) => number = function(i) { + return i; + } +} + +// CONTEXT: Variable declaration +var c3t1: (s: string) => string = (function(s) { return s }); +var c3t2 = ({ + n: 1 +}) +var c3t3: number[] = []; +var c3t4: () => IFoo = function() { return ({}) }; +var c3t5: (n: number) => IFoo = function(n) { return ({}) }; +var c3t6: (n: number, s: string) => IFoo = function(n, s) { return ({}) }; +var c3t7: { + (n: number): number; + (s1: string): number; +} = function(n) { return n; }; + +var c3t8: (n: number, s: string) => number = function(n) { return n; }; +var c3t9: number[][] = [[],[]]; +var c3t10: IFoo[] = [({}),({})]; +var c3t11: {(n: number, s: string): string;}[] = [function(n, s) { return s; }]; +var c3t12: IBar = { + foo: ({}) +} +var c3t13 = ({ + f: function(i, s) { return s; } +}) +var c3t14 = ({ + a: [] +}) + +// CONTEXT: Class property assignment +class C4T5 { + foo: (i: number, s: string) => string; + constructor() { + this.foo = function(i, s) { + return s; + } + } +} + +// CONTEXT: Module property assignment +module C5T5 { + export var foo: (i: number, s: string) => string; + foo = function(i, s) { + return s; + } +} + +// CONTEXT: Variable assignment +var c6t5: (n: number) => IFoo; +c6t5 = <(n: number) => IFoo>function(n) { return ({}) }; + +// CONTEXT: Array index assignment +var c7t2: IFoo[]; +c7t2[0] = ({n: 1}); + +// CONTEXT: Object property assignment +interface IPlaceHolder { + t1: (s: string) => string; + t2: IFoo; + t3: number[]; + t4: () => IFoo; + t5: (n: number) => IFoo; + t6: (n: number, s: string) => IFoo; + t7: { + (n: number, s: string): number; + //(s1: string, s2: string): number; + }; + t8: (n: number, s: string) => number; + t9: number[][]; + t10: IFoo[]; + t11: {(n: number, s: string): string;}[]; + t12: IBar; + t13: IFoo; + t14: IFoo; + } + +var objc8: { + t1: (s: string) => string; + t2: IFoo; + t3: number[]; + t4: () => IFoo; + t5: (n: number) => IFoo; + t6: (n: number, s: string) => IFoo; + t7: { + (n: number, s: string): number; + //(s1: string, s2: string): number; + }; + t8: (n: number, s: string) => number; + t9: number[][]; + t10: IFoo[]; + t11: {(n: number, s: string): string;}[]; + t12: IBar; + t13: IFoo; + t14: IFoo; +} = ({}); + +objc8.t1 = (function(s) { return s }); +objc8.t2 = ({ + n: 1 +}); +objc8.t3 = []; +objc8.t4 = function() { return ({}) }; +objc8.t5 = function(n) { return ({}) }; +objc8.t6 = function(n, s) { return ({}) }; +objc8.t7 = function(n: number) { return n }; + +objc8.t8 = function(n) { return n; }; +objc8.t9 = [[],[]]; +objc8.t10 = [({}),({})]; +objc8.t11 = [function(n, s) { return s; }]; +objc8.t12 = { + foo: ({}) +} +objc8.t13 = ({ + f: function(i, s) { return s; } +}) +objc8.t14 = ({ + a: [] +}) +// CONTEXT: Function call +function c9t5(f: (n: number) => IFoo) {}; +c9t5(function(n) { + return ({}); +}); + +// CONTEXT: Return statement +var c10t5: () => (n: number) => IFoo = function() { return function(n) { return ({}) } }; + +// CONTEXT: Newing a class +class C11t5 { constructor(f: (n: number) => IFoo) { } }; +var i = new C11t5(function(n) { return ({}) }); + +// CONTEXT: Type annotated expression +var c12t1 = <(s: string) => string> (function(s) { return s }); +var c12t2 = ({ + n: 1 +}); +var c12t3 = []; +var c12t4 = <() => IFoo> function() { return ({}) }; +var c12t5 = <(n: number) => IFoo> function(n) { return ({}) }; +var c12t6 = <(n: number, s: string) => IFoo> function(n, s) { return ({}) }; +var c12t7 = <{ + (n: number, s: string): number; + //(s1: string, s2: string): number; +}> function(n:number) { return n }; + +var c12t8 = <(n: number, s: string) => number> function(n) { return n; }; +var c12t9 = [[],[]]; +var c12t10 = [({}),({})]; +var c12t11 = <{(n: number, s: string): string;}[]> [function(n, s) { return s; }]; +var c12t12 = { + foo: ({}) +} +var c12t13 = ({ + f: function(i, s) { return s; } +}) +var c12t14 = ({ + a: [] +}) + +// CONTEXT: Contextual typing declarations + +// contextually typing function declarations +declare function EF1(a:number, b:number):number; + +function EF1(a,b) { return a+b; } + +var efv = EF1(1,2); + + +// contextually typing from ambient class declarations +declare class Point +{ + constructor(x: number, y: number); + x: number; + y: number; + add(dx: number, dy: number): Point; + static origin: Point; + +} + +Point.origin = new Point(0, 0); + +Point.prototype.add = function(dx, dy) { + return new Point(this.x + dx, this.y + dy); +}; + +Point.prototype = { + x: 0, + y: 0, + add: function(dx, dy) { + return new Point(this.x + dx, this.y + dy); + } +}; + +interface A { x: string; } +interface B extends A { } +var x: B = { }; + + +/// [Declarations] //// + + + +//// [contextualTyping.d.ts] +interface IFoo { + n: number; + s: string; + f(i: number, s: string): string; + a: number[]; +} +interface IBar { + foo: IFoo; +} +declare class C1T5 { + foo: (i: number, s: string) => number; +} +declare namespace C2T5 { + var foo: (i: number, s: string) => number; +} +declare var c3t1: (s: string) => string; +declare var c3t2: IFoo; +declare var c3t3: number[]; +declare var c3t4: () => IFoo; +declare var c3t5: (n: number) => IFoo; +declare var c3t6: (n: number, s: string) => IFoo; +declare var c3t7: { + (n: number): number; + (s1: string): number; +}; +declare var c3t8: (n: number, s: string) => number; +declare var c3t9: number[][]; +declare var c3t10: IFoo[]; +declare var c3t11: { + (n: number, s: string): string; +}[]; +declare var c3t12: IBar; +declare var c3t13: IFoo; +declare var c3t14: IFoo; +declare class C4T5 { + foo: (i: number, s: string) => string; + constructor(); +} +declare namespace C5T5 { + var foo: (i: number, s: string) => string; +} +declare var c6t5: (n: number) => IFoo; +declare var c7t2: IFoo[]; +interface IPlaceHolder { + t1: (s: string) => string; + t2: IFoo; + t3: number[]; + t4: () => IFoo; + t5: (n: number) => IFoo; + t6: (n: number, s: string) => IFoo; + t7: { + (n: number, s: string): number; + }; + t8: (n: number, s: string) => number; + t9: number[][]; + t10: IFoo[]; + t11: { + (n: number, s: string): string; + }[]; + t12: IBar; + t13: IFoo; + t14: IFoo; +} +declare var objc8: { + t1: (s: string) => string; + t2: IFoo; + t3: number[]; + t4: () => IFoo; + t5: (n: number) => IFoo; + t6: (n: number, s: string) => IFoo; + t7: { + (n: number, s: string): number; + }; + t8: (n: number, s: string) => number; + t9: number[][]; + t10: IFoo[]; + t11: { + (n: number, s: string): string; + }[]; + t12: IBar; + t13: IFoo; + t14: IFoo; +}; +declare function c9t5(f: (n: number) => IFoo): invalid; +declare var c10t5: () => (n: number) => IFoo; +declare class C11t5 { + constructor(f: (n: number) => IFoo); +} +declare var i: invalid; +declare var c12t1: (s: string) => string; +declare var c12t2: IFoo; +declare var c12t3: number[]; +declare var c12t4: () => IFoo; +declare var c12t5: (n: number) => IFoo; +declare var c12t6: (n: number, s: string) => IFoo; +declare var c12t7: { + (n: number, s: string): number; +}; +declare var c12t8: (n: number, s: string) => number; +declare var c12t9: number[][]; +declare var c12t10: IFoo[]; +declare var c12t11: { + (n: number, s: string): string; +}[]; +declare var c12t12: IBar; +declare var c12t13: IFoo; +declare var c12t14: IFoo; +declare function EF1(a: number, b: number): number; +declare var efv: invalid; +declare class Point { + constructor(x: number, y: number); + x: number; + y: number; + add(dx: number, dy: number): Point; + static origin: Point; +} +interface A { + x: string; +} +interface B extends A { +} +declare var x: B; + +/// [Errors] //// + +contextualTyping.ts(146,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +contextualTyping.ts(156,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +contextualTyping.ts(189,18): error TS2384: Overload signatures must all be ambient or non-ambient. +contextualTyping.ts(193,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' but required in type 'B'. + + +==== contextualTyping.ts (5 errors) ==== + // DEFAULT INTERFACES + interface IFoo { + n: number; + s: string; + f(i: number, s: string): string; + a: number[]; + } + + interface IBar { + foo: IFoo; + } + + // CONTEXT: Class property declaration + class C1T5 { + foo: (i: number, s: string) => number = function(i) { + return i; + } + } + + // CONTEXT: Module property declaration + module C2T5 { + export var foo: (i: number, s: string) => number = function(i) { + return i; + } + } + + // CONTEXT: Variable declaration + var c3t1: (s: string) => string = (function(s) { return s }); + var c3t2 = ({ + n: 1 + }) + var c3t3: number[] = []; + var c3t4: () => IFoo = function() { return ({}) }; + var c3t5: (n: number) => IFoo = function(n) { return ({}) }; + var c3t6: (n: number, s: string) => IFoo = function(n, s) { return ({}) }; + var c3t7: { + (n: number): number; + (s1: string): number; + } = function(n) { return n; }; + + var c3t8: (n: number, s: string) => number = function(n) { return n; }; + var c3t9: number[][] = [[],[]]; + var c3t10: IFoo[] = [({}),({})]; + var c3t11: {(n: number, s: string): string;}[] = [function(n, s) { return s; }]; + var c3t12: IBar = { + foo: ({}) + } + var c3t13 = ({ + f: function(i, s) { return s; } + }) + var c3t14 = ({ + a: [] + }) + + // CONTEXT: Class property assignment + class C4T5 { + foo: (i: number, s: string) => string; + constructor() { + this.foo = function(i, s) { + return s; + } + } + } + + // CONTEXT: Module property assignment + module C5T5 { + export var foo: (i: number, s: string) => string; + foo = function(i, s) { + return s; + } + } + + // CONTEXT: Variable assignment + var c6t5: (n: number) => IFoo; + c6t5 = <(n: number) => IFoo>function(n) { return ({}) }; + + // CONTEXT: Array index assignment + var c7t2: IFoo[]; + c7t2[0] = ({n: 1}); + + // CONTEXT: Object property assignment + interface IPlaceHolder { + t1: (s: string) => string; + t2: IFoo; + t3: number[]; + t4: () => IFoo; + t5: (n: number) => IFoo; + t6: (n: number, s: string) => IFoo; + t7: { + (n: number, s: string): number; + //(s1: string, s2: string): number; + }; + t8: (n: number, s: string) => number; + t9: number[][]; + t10: IFoo[]; + t11: {(n: number, s: string): string;}[]; + t12: IBar; + t13: IFoo; + t14: IFoo; + } + + var objc8: { + t1: (s: string) => string; + t2: IFoo; + t3: number[]; + t4: () => IFoo; + t5: (n: number) => IFoo; + t6: (n: number, s: string) => IFoo; + t7: { + (n: number, s: string): number; + //(s1: string, s2: string): number; + }; + t8: (n: number, s: string) => number; + t9: number[][]; + t10: IFoo[]; + t11: {(n: number, s: string): string;}[]; + t12: IBar; + t13: IFoo; + t14: IFoo; + } = ({}); + + objc8.t1 = (function(s) { return s }); + objc8.t2 = ({ + n: 1 + }); + objc8.t3 = []; + objc8.t4 = function() { return ({}) }; + objc8.t5 = function(n) { return ({}) }; + objc8.t6 = function(n, s) { return ({}) }; + objc8.t7 = function(n: number) { return n }; + + objc8.t8 = function(n) { return n; }; + objc8.t9 = [[],[]]; + objc8.t10 = [({}),({})]; + objc8.t11 = [function(n, s) { return s; }]; + objc8.t12 = { + foo: ({}) + } + objc8.t13 = ({ + f: function(i, s) { return s; } + }) + objc8.t14 = ({ + a: [] + }) + // CONTEXT: Function call + function c9t5(f: (n: number) => IFoo) {}; + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c9t5(function(n) { + return ({}); + }); + + // CONTEXT: Return statement + var c10t5: () => (n: number) => IFoo = function() { return function(n) { return ({}) } }; + + // CONTEXT: Newing a class + class C11t5 { constructor(f: (n: number) => IFoo) { } }; + var i = new C11t5(function(n) { return ({}) }); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // CONTEXT: Type annotated expression + var c12t1 = <(s: string) => string> (function(s) { return s }); + var c12t2 = ({ + n: 1 + }); + var c12t3 = []; + var c12t4 = <() => IFoo> function() { return ({}) }; + var c12t5 = <(n: number) => IFoo> function(n) { return ({}) }; + var c12t6 = <(n: number, s: string) => IFoo> function(n, s) { return ({}) }; + var c12t7 = <{ + (n: number, s: string): number; + //(s1: string, s2: string): number; + }> function(n:number) { return n }; + + var c12t8 = <(n: number, s: string) => number> function(n) { return n; }; + var c12t9 = [[],[]]; + var c12t10 = [({}),({})]; + var c12t11 = <{(n: number, s: string): string;}[]> [function(n, s) { return s; }]; + var c12t12 = { + foo: ({}) + } + var c12t13 = ({ + f: function(i, s) { return s; } + }) + var c12t14 = ({ + a: [] + }) + + // CONTEXT: Contextual typing declarations + + // contextually typing function declarations + declare function EF1(a:number, b:number):number; + ~~~ +!!! error TS2384: Overload signatures must all be ambient or non-ambient. + + function EF1(a,b) { return a+b; } + + var efv = EF1(1,2); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + + // contextually typing from ambient class declarations + declare class Point + { + constructor(x: number, y: number); + x: number; + y: number; + add(dx: number, dy: number): Point; + static origin: Point; + + } + + Point.origin = new Point(0, 0); + + Point.prototype.add = function(dx, dy) { + return new Point(this.x + dx, this.y + dy); + }; + + Point.prototype = { + x: 0, + y: 0, + add: function(dx, dy) { + return new Point(this.x + dx, this.y + dy); + } + }; + + interface A { x: string; } + interface B extends A { } + var x: B = { }; + ~ +!!! error TS2741: Property 'x' is missing in type '{}' but required in type 'B'. +!!! related TS2728 contextualTyping.ts:221:15: 'x' is declared here. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping38.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping38.d.ts new file mode 100644 index 0000000000000..21825271bce55 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping38.d.ts @@ -0,0 +1,13 @@ +//// [tests/cases/compiler/contextualTyping38.ts] //// + +//// [contextualTyping38.ts] +var foo = <{ (): number; }> function(a) { return a }; + +/// [Declarations] //// + + + +//// [contextualTyping38.d.ts] +declare var foo: { + (): number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping39.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping39.d.ts new file mode 100644 index 0000000000000..dcf03612ed18c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping39.d.ts @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/contextualTyping39.ts] //// + +//// [contextualTyping39.ts] +var foo = <{ (): number; }> function() { return "err"; }; + +/// [Declarations] //// + + + +//// [contextualTyping39.d.ts] +declare var foo: { + (): number; +}; + +/// [Errors] //// + +contextualTyping39.ts(1,11): error TS2352: Conversion of type '() => string' to type '() => number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. + Type 'string' is not comparable to type 'number'. + + +==== contextualTyping39.ts (1 errors) ==== + var foo = <{ (): number; }> function() { return "err"; }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2352: Conversion of type '() => string' to type '() => number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Type 'string' is not comparable to type 'number'. \ 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..a54753c35adc6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/correlatedUnions.d.ts @@ -0,0 +1,830 @@ +//// [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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(36,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(37,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(44,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(76,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(113,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(123,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(128,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(142,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(166,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(170,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(175,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(180,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(218,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function renderSelectField(props: SelectFieldData) {} + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + const renderFuncs: RenderFuncMap = { + text: renderTextField, + select: renderSelectField, + }; + + function renderField(field: FormField) { + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + const scrollEvent = createEventListener({ + ~~~~~~~~~~~~~~~~~~~~~ + name: "scroll", + ~~~~~~~~~~~~~~~~~~~ + callback: ev => console.log(ev), + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + }); + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + processEvents([clickEvent, scrollEvent]); + + processEvents([ + { name: "click", callback: ev => console.log(ev) }, + { name: "scroll", callback: ev => console.log(ev) }, + ]); + + // -------- + + function ff1() { + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + funcs[key](arg); + } + + function f2(funcs: Funcs, key: K, arg: ArgMap[K]) { + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const func = funcs[key]; // Type Funcs[K] + func(arg); + } + + function f3(funcs: Funcs, key: K, arg: ArgMap[K]) { + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const func: Func = funcs[key]; + func(arg); + } + + function f4(x: Funcs[keyof ArgMap], y: Funcs[K]) { + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + 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/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..4f691b708c97d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName.d.ts @@ -0,0 +1,58 @@ +//// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== other.ts (1 errors) ==== + type Experiment = { + name: Name; + }; + declare const createExperiment: ( + options: Experiment + ) => Experiment; + export default createExperiment({ + ~~~~~~~~~~~~~~~~~~ + name: "foo" + ~~~~~~~~~~~~~~~ + }); + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +==== 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..a2446c289aeaa --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName2.d.ts @@ -0,0 +1,58 @@ +//// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== other.ts (1 errors) ==== + type Experiment = { + name: Name; + }; + declare const createExperiment: ( + options: Experiment + ) => Experiment; + export default createExperiment({ + ~~~~~~~~~~~~~~~~~~ + name: "foo" + ~~~~~~~~~~~~~~~ + }); + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +==== 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/duplicateObjectLiteralProperty_computedName1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/duplicateObjectLiteralProperty_computedName1.d.ts new file mode 100644 index 0000000000000..3c0f6afafe9c3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/duplicateObjectLiteralProperty_computedName1.d.ts @@ -0,0 +1,125 @@ +//// [tests/cases/compiler/duplicateObjectLiteralProperty_computedName1.ts] //// + +//// [duplicateObjectLiteralProperty_computedName1.ts] +const t1 = { + 1: 1, + [1]: 0 // duplicate +} + +const t2 = { + 1: 1, + [+1]: 0 // duplicate +} + +const t3 = { + "1": 1, + [+1]: 0 // duplicate +} + +const t4 = { + "+1": 1, + [+1]: 0 // two different keys, "+1", "1" +} + +const t5 = { + "+1": 1, + ["+1"]: 0 // duplicate +} + +const t6 = { + "-1": 1, + [-1]: 0 // duplicate +} + +const t7 = { + "-1": 1, + ["-1"]: 0 // duplicate +} + + +/// [Declarations] //// + + + +//// [duplicateObjectLiteralProperty_computedName1.d.ts] +declare const t1: { + 1: number; +}; +declare const t2: { + 1: number; +}; +declare const t3: { + 1: number; +}; +declare const t4: { + "+1": number; + 1: number; +}; +declare const t5: { + "+1": number; +}; +declare const t6: { + "-1": number; +}; +declare const t7: { + "-1": number; +}; + +/// [Errors] //// + +duplicateObjectLiteralProperty_computedName1.ts(3,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty_computedName1.ts(8,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty_computedName1.ts(13,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty_computedName1.ts(23,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty_computedName1.ts(28,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty_computedName1.ts(33,5): error TS1117: An object literal cannot have multiple properties with the same name. + + +==== duplicateObjectLiteralProperty_computedName1.ts (6 errors) ==== + const t1 = { + 1: 1, + [1]: 0 // duplicate + ~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + + const t2 = { + 1: 1, + [+1]: 0 // duplicate + ~~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + + const t3 = { + "1": 1, + [+1]: 0 // duplicate + ~~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + + const t4 = { + "+1": 1, + [+1]: 0 // two different keys, "+1", "1" + } + + const t5 = { + "+1": 1, + ["+1"]: 0 // duplicate + ~~~~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + + const t6 = { + "-1": 1, + [-1]: 0 // duplicate + ~~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + + const t7 = { + "-1": 1, + ["-1"]: 0 // duplicate + ~~~~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/duplicateObjectLiteralProperty_computedName2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/duplicateObjectLiteralProperty_computedName2.d.ts new file mode 100644 index 0000000000000..bf6df44369654 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/duplicateObjectLiteralProperty_computedName2.d.ts @@ -0,0 +1,97 @@ +//// [tests/cases/compiler/duplicateObjectLiteralProperty_computedName2.ts] //// + +//// [duplicateObjectLiteralProperty_computedName2.ts] +const n = 1; +const s = "s"; +enum E1 { A = "ENUM_KEY" } +enum E2 { B } + +const t1 = { + [n]: 1, + [n]: 1, // duplicate +} + +const t2 = { + [s]: 1, + [s]: 1, // duplicate +} + +const t3 = { + [E1.A]: 1, + [E1.A]: 1, // duplicate +} + +const t4 = { + [E2.B]: 1, + [E2.B]: 1, // duplicate +} + + +/// [Declarations] //// + + + +//// [duplicateObjectLiteralProperty_computedName2.d.ts] +declare const n = 1; +declare const s = "s"; +declare enum E1 { + A = "ENUM_KEY" +} +declare enum E2 { + B = 0 +} +declare const t1: { + [n]: number; +}; +declare const t2: { + [s]: number; +}; +declare const t3: { + [E1.A]: number; +}; +declare const t4: { + [E2.B]: number; +}; + +/// [Errors] //// + +duplicateObjectLiteralProperty_computedName2.ts(8,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty_computedName2.ts(13,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty_computedName2.ts(18,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty_computedName2.ts(23,5): error TS1117: An object literal cannot have multiple properties with the same name. + + +==== duplicateObjectLiteralProperty_computedName2.ts (4 errors) ==== + const n = 1; + const s = "s"; + enum E1 { A = "ENUM_KEY" } + enum E2 { B } + + const t1 = { + [n]: 1, + [n]: 1, // duplicate + ~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + + const t2 = { + [s]: 1, + [s]: 1, // duplicate + ~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + + const t3 = { + [E1.A]: 1, + [E1.A]: 1, // duplicate + ~~~~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + + const t4 = { + [E2.B]: 1, + [E2.B]: 1, // duplicate + ~~~~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + \ No newline at end of file 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/duplicateVarsAcrossFileBoundaries.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/duplicateVarsAcrossFileBoundaries.d.ts new file mode 100644 index 0000000000000..9e7370dae1483 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/duplicateVarsAcrossFileBoundaries.d.ts @@ -0,0 +1,115 @@ +//// [tests/cases/compiler/duplicateVarsAcrossFileBoundaries.ts] //// + +//// [duplicateVarsAcrossFileBoundaries_0.ts] +var x = 3; +var y = ""; + +//// [duplicateVarsAcrossFileBoundaries_1.ts] +var x = true; +var z = 3; + +//// [duplicateVarsAcrossFileBoundaries_2.ts] +var x = ""; +var y = 3; +var z = false; + +//// [duplicateVarsAcrossFileBoundaries_3.ts] +var x = 0; +var y = ""; +var z = 0; + +//// [duplicateVarsAcrossFileBoundaries_4.ts] +module P { } +import p = P; +var q; + +//// [duplicateVarsAcrossFileBoundaries_5.ts] +module Q { } +import q = Q; +var p; + +/// [Declarations] //// + + + +//// [duplicateVarsAcrossFileBoundaries_0.d.ts] +declare var x: number; +declare var y: string; + +//// [duplicateVarsAcrossFileBoundaries_1.d.ts] +declare var x: boolean; +declare var z: number; + +//// [duplicateVarsAcrossFileBoundaries_2.d.ts] +declare var x: string; +declare var y: number; +declare var z: boolean; + +//// [duplicateVarsAcrossFileBoundaries_3.d.ts] +declare var x: number; +declare var y: string; +declare var z: number; + +//// [duplicateVarsAcrossFileBoundaries_4.d.ts] +declare namespace P { } +import p = P; +declare var q: invalid; + +//// [duplicateVarsAcrossFileBoundaries_5.d.ts] +declare namespace Q { } +import q = Q; +declare var p: invalid; + +/// [Errors] //// + +duplicateVarsAcrossFileBoundaries_1.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'boolean'. +duplicateVarsAcrossFileBoundaries_2.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. +duplicateVarsAcrossFileBoundaries_2.ts(2,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'number'. +duplicateVarsAcrossFileBoundaries_2.ts(3,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'boolean'. +duplicateVarsAcrossFileBoundaries_4.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +duplicateVarsAcrossFileBoundaries_5.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== duplicateVarsAcrossFileBoundaries_0.ts (0 errors) ==== + var x = 3; + var y = ""; + +==== duplicateVarsAcrossFileBoundaries_1.ts (1 errors) ==== + var x = true; + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'boolean'. +!!! related TS6203 duplicateVarsAcrossFileBoundaries_0.ts:1:5: 'x' was also declared here. + var z = 3; + +==== duplicateVarsAcrossFileBoundaries_2.ts (3 errors) ==== + var x = ""; + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. +!!! related TS6203 duplicateVarsAcrossFileBoundaries_0.ts:1:5: 'x' was also declared here. + var y = 3; + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'number'. +!!! related TS6203 duplicateVarsAcrossFileBoundaries_0.ts:2:5: 'y' was also declared here. + var z = false; + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'boolean'. +!!! related TS6203 duplicateVarsAcrossFileBoundaries_1.ts:2:5: 'z' was also declared here. + +==== duplicateVarsAcrossFileBoundaries_3.ts (0 errors) ==== + var x = 0; + var y = ""; + var z = 0; + +==== duplicateVarsAcrossFileBoundaries_4.ts (1 errors) ==== + module P { } + import p = P; + var q; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +==== duplicateVarsAcrossFileBoundaries_5.ts (1 errors) ==== + module Q { } + import q = Q; + var p; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ 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..7832a15244adb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/dynamicNames.d.ts @@ -0,0 +1,366 @@ +//// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +main.ts(110,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +main.ts(111,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +module.ts(3,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== module.ts (1 errors) ==== + export const c0 = "a"; + export const c1 = 1; + export const s0 = Symbol(); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export const o1_c5 = o1[c5]; + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export const o1_s2 = o1[s2]; + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + 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/escapedIdentifiers.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/escapedIdentifiers.d.ts new file mode 100644 index 0000000000000..8c8df917537b5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/escapedIdentifiers.d.ts @@ -0,0 +1,310 @@ +//// [tests/cases/compiler/escapedIdentifiers.ts] //// + +//// [escapedIdentifiers.ts] +/* + 0 .. \u0030 + 9 .. \u0039 + + A .. \u0041 + Z .. \u005a + + a .. \u0061 + z .. \u00za +*/ + +// var decl +var \u0061 = 1; +a ++; +\u0061 ++; + +var b = 1; +b ++; +\u0062 ++; + +// modules +module moduleType1 { + export var baz1: number; +} +module moduleType\u0032 { + export var baz2: number; +} + +moduleType1.baz1 = 3; +moduleType\u0031.baz1 = 3; +moduleType2.baz2 = 3; +moduleType\u0032.baz2 = 3; + +// classes + +class classType1 { + public foo1: number; +} +class classType\u0032 { + public foo2: number; +} + +var classType1Object1 = new classType1(); +classType1Object1.foo1 = 2; +var classType1Object2 = new classType\u0031(); +classType1Object2.foo1 = 2; +var classType2Object1 = new classType2(); +classType2Object1.foo2 = 2; +var classType2Object2 = new classType\u0032(); +classType2Object2.foo2 = 2; + +// interfaces +interface interfaceType1 { + bar1: number; +} +interface interfaceType\u0032 { + bar2: number; +} + +var interfaceType1Object1 = { bar1: 0 }; +interfaceType1Object1.bar1 = 2; +var interfaceType1Object2 = { bar1: 0 }; +interfaceType1Object2.bar1 = 2; +var interfaceType2Object1 = { bar2: 0 }; +interfaceType2Object1.bar2 = 2; +var interfaceType2Object2 = { bar2: 0 }; +interfaceType2Object2.bar2 = 2; + + +// arguments +class testClass { + public func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number) { + arg\u0031 = 1; + arg2 = 'string'; + arg\u0033 = true; + arg4 = 2; + } +} + +// constructors +class constructorTestClass { + constructor (public arg1: number,public arg\u0032: string,public arg\u0033: boolean,public arg4: number) { + } +} +var constructorTestObject = new constructorTestClass(1, 'string', true, 2); +constructorTestObject.arg\u0031 = 1; +constructorTestObject.arg2 = 'string'; +constructorTestObject.arg\u0033 = true; +constructorTestObject.arg4 = 2; + +// Lables + +l\u0061bel1: + while (false) + { + while(false) + continue label1; // it will go to next iteration of outer loop + } + +label2: + while (false) + { + while(false) + continue l\u0061bel2; // it will go to next iteration of outer loop + } + +label3: + while (false) + { + while(false) + continue label3; // it will go to next iteration of outer loop + } + +l\u0061bel4: + while (false) + { + while(false) + continue l\u0061bel4; // it will go to next iteration of outer loop + } + +/// [Declarations] //// + + + +//// [escapedIdentifiers.d.ts] +declare var \u0061: number; +declare var b: number; +declare namespace moduleType1 { + var baz1: number; +} +declare namespace moduleType\u0032 { + var baz2: number; +} +declare class classType1 { + foo1: number; +} +declare class classType\u0032 { + foo2: number; +} +declare var classType1Object1: invalid; +declare var classType1Object2: invalid; +declare var classType2Object1: invalid; +declare var classType2Object2: invalid; +interface interfaceType1 { + bar1: number; +} +interface interfaceType\u0032 { + bar2: number; +} +declare var interfaceType1Object1: interfaceType1; +declare var interfaceType1Object2: interfaceType1; +declare var interfaceType2Object1: interfaceType2; +declare var interfaceType2Object2: interfaceType2; +declare class testClass { + func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number): invalid; +} +declare class constructorTestClass { + arg1: number; + arg\u0032: string; + arg\u0033: boolean; + arg4: number; + constructor(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number); +} +declare var constructorTestObject: invalid; + +/// [Errors] //// + +escapedIdentifiers.ts(43,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +escapedIdentifiers.ts(45,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +escapedIdentifiers.ts(47,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +escapedIdentifiers.ts(49,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +escapedIdentifiers.ts(72,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +escapedIdentifiers.ts(85,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== escapedIdentifiers.ts (6 errors) ==== + /* + 0 .. \u0030 + 9 .. \u0039 + + A .. \u0041 + Z .. \u005a + + a .. \u0061 + z .. \u00za + */ + + // var decl + var \u0061 = 1; + a ++; + \u0061 ++; + + var b = 1; + b ++; + \u0062 ++; + + // modules + module moduleType1 { + export var baz1: number; + } + module moduleType\u0032 { + export var baz2: number; + } + + moduleType1.baz1 = 3; + moduleType\u0031.baz1 = 3; + moduleType2.baz2 = 3; + moduleType\u0032.baz2 = 3; + + // classes + + class classType1 { + public foo1: number; + } + class classType\u0032 { + public foo2: number; + } + + var classType1Object1 = new classType1(); + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + classType1Object1.foo1 = 2; + var classType1Object2 = new classType\u0031(); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + classType1Object2.foo1 = 2; + var classType2Object1 = new classType2(); + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + classType2Object1.foo2 = 2; + var classType2Object2 = new classType\u0032(); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + classType2Object2.foo2 = 2; + + // interfaces + interface interfaceType1 { + bar1: number; + } + interface interfaceType\u0032 { + bar2: number; + } + + var interfaceType1Object1 = { bar1: 0 }; + interfaceType1Object1.bar1 = 2; + var interfaceType1Object2 = { bar1: 0 }; + interfaceType1Object2.bar1 = 2; + var interfaceType2Object1 = { bar2: 0 }; + interfaceType2Object1.bar2 = 2; + var interfaceType2Object2 = { bar2: 0 }; + interfaceType2Object2.bar2 = 2; + + + // arguments + class testClass { + public func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number) { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + arg\u0031 = 1; + arg2 = 'string'; + arg\u0033 = true; + arg4 = 2; + } + } + + // constructors + class constructorTestClass { + constructor (public arg1: number,public arg\u0032: string,public arg\u0033: boolean,public arg4: number) { + } + } + var constructorTestObject = new constructorTestClass(1, 'string', true, 2); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constructorTestObject.arg\u0031 = 1; + constructorTestObject.arg2 = 'string'; + constructorTestObject.arg\u0033 = true; + constructorTestObject.arg4 = 2; + + // Lables + + l\u0061bel1: + while (false) + { + while(false) + continue label1; // it will go to next iteration of outer loop + } + + label2: + while (false) + { + while(false) + continue l\u0061bel2; // it will go to next iteration of outer loop + } + + label3: + while (false) + { + while(false) + continue label3; // it will go to next iteration of outer loop + } + + l\u0061bel4: + while (false) + { + while(false) + continue l\u0061bel4; // it will go to next iteration of outer loop + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/generatedContextualTyping.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/generatedContextualTyping.d.ts new file mode 100644 index 0000000000000..8acb2214d226e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/generatedContextualTyping.d.ts @@ -0,0 +1,1822 @@ +//// [tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts] //// + +//// [generatedContextualTyping.ts] +class Base { private p; } +class Derived1 extends Base { private m; } +class Derived2 extends Base { private n; } +interface Genric { func(n: T[]); } +var b = new Base(), d1 = new Derived1(), d2 = new Derived2(); +var x1: () => Base[] = () => [d1, d2]; +var x2: () => Base[] = function() { return [d1, d2] }; +var x3: () => Base[] = function named() { return [d1, d2] }; +var x4: { (): Base[]; } = () => [d1, d2]; +var x5: { (): Base[]; } = function() { return [d1, d2] }; +var x6: { (): Base[]; } = function named() { return [d1, d2] }; +var x7: Base[] = [d1, d2]; +var x8: Array = [d1, d2]; +var x9: { [n: number]: Base; } = [d1, d2]; +var x10: {n: Base[]; } = { n: [d1, d2] }; +var x11: (s: Base[]) => any = n => { var n: Base[]; return null; }; +var x12: Genric = { func: n => { return [d1, d2]; } }; +class x13 { member: () => Base[] = () => [d1, d2] } +class x14 { member: () => Base[] = function() { return [d1, d2] } } +class x15 { member: () => Base[] = function named() { return [d1, d2] } } +class x16 { member: { (): Base[]; } = () => [d1, d2] } +class x17 { member: { (): Base[]; } = function() { return [d1, d2] } } +class x18 { member: { (): Base[]; } = function named() { return [d1, d2] } } +class x19 { member: Base[] = [d1, d2] } +class x20 { member: Array = [d1, d2] } +class x21 { member: { [n: number]: Base; } = [d1, d2] } +class x22 { member: {n: Base[]; } = { n: [d1, d2] } } +class x23 { member: (s: Base[]) => any = n => { var n: Base[]; return null; } } +class x24 { member: Genric = { func: n => { return [d1, d2]; } } } +class x25 { private member: () => Base[] = () => [d1, d2] } +class x26 { private member: () => Base[] = function() { return [d1, d2] } } +class x27 { private member: () => Base[] = function named() { return [d1, d2] } } +class x28 { private member: { (): Base[]; } = () => [d1, d2] } +class x29 { private member: { (): Base[]; } = function() { return [d1, d2] } } +class x30 { private member: { (): Base[]; } = function named() { return [d1, d2] } } +class x31 { private member: Base[] = [d1, d2] } +class x32 { private member: Array = [d1, d2] } +class x33 { private member: { [n: number]: Base; } = [d1, d2] } +class x34 { private member: {n: Base[]; } = { n: [d1, d2] } } +class x35 { private member: (s: Base[]) => any = n => { var n: Base[]; return null; } } +class x36 { private member: Genric = { func: n => { return [d1, d2]; } } } +class x37 { public member: () => Base[] = () => [d1, d2] } +class x38 { public member: () => Base[] = function() { return [d1, d2] } } +class x39 { public member: () => Base[] = function named() { return [d1, d2] } } +class x40 { public member: { (): Base[]; } = () => [d1, d2] } +class x41 { public member: { (): Base[]; } = function() { return [d1, d2] } } +class x42 { public member: { (): Base[]; } = function named() { return [d1, d2] } } +class x43 { public member: Base[] = [d1, d2] } +class x44 { public member: Array = [d1, d2] } +class x45 { public member: { [n: number]: Base; } = [d1, d2] } +class x46 { public member: {n: Base[]; } = { n: [d1, d2] } } +class x47 { public member: (s: Base[]) => any = n => { var n: Base[]; return null; } } +class x48 { public member: Genric = { func: n => { return [d1, d2]; } } } +class x49 { static member: () => Base[] = () => [d1, d2] } +class x50 { static member: () => Base[] = function() { return [d1, d2] } } +class x51 { static member: () => Base[] = function named() { return [d1, d2] } } +class x52 { static member: { (): Base[]; } = () => [d1, d2] } +class x53 { static member: { (): Base[]; } = function() { return [d1, d2] } } +class x54 { static member: { (): Base[]; } = function named() { return [d1, d2] } } +class x55 { static member: Base[] = [d1, d2] } +class x56 { static member: Array = [d1, d2] } +class x57 { static member: { [n: number]: Base; } = [d1, d2] } +class x58 { static member: {n: Base[]; } = { n: [d1, d2] } } +class x59 { static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } +class x60 { static member: Genric = { func: n => { return [d1, d2]; } } } +class x61 { private static member: () => Base[] = () => [d1, d2] } +class x62 { private static member: () => Base[] = function() { return [d1, d2] } } +class x63 { private static member: () => Base[] = function named() { return [d1, d2] } } +class x64 { private static member: { (): Base[]; } = () => [d1, d2] } +class x65 { private static member: { (): Base[]; } = function() { return [d1, d2] } } +class x66 { private static member: { (): Base[]; } = function named() { return [d1, d2] } } +class x67 { private static member: Base[] = [d1, d2] } +class x68 { private static member: Array = [d1, d2] } +class x69 { private static member: { [n: number]: Base; } = [d1, d2] } +class x70 { private static member: {n: Base[]; } = { n: [d1, d2] } } +class x71 { private static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } +class x72 { private static member: Genric = { func: n => { return [d1, d2]; } } } +class x73 { public static member: () => Base[] = () => [d1, d2] } +class x74 { public static member: () => Base[] = function() { return [d1, d2] } } +class x75 { public static member: () => Base[] = function named() { return [d1, d2] } } +class x76 { public static member: { (): Base[]; } = () => [d1, d2] } +class x77 { public static member: { (): Base[]; } = function() { return [d1, d2] } } +class x78 { public static member: { (): Base[]; } = function named() { return [d1, d2] } } +class x79 { public static member: Base[] = [d1, d2] } +class x80 { public static member: Array = [d1, d2] } +class x81 { public static member: { [n: number]: Base; } = [d1, d2] } +class x82 { public static member: {n: Base[]; } = { n: [d1, d2] } } +class x83 { public static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } +class x84 { public static member: Genric = { func: n => { return [d1, d2]; } } } +class x85 { constructor(parm: () => Base[] = () => [d1, d2]) { } } +class x86 { constructor(parm: () => Base[] = function() { return [d1, d2] }) { } } +class x87 { constructor(parm: () => Base[] = function named() { return [d1, d2] }) { } } +class x88 { constructor(parm: { (): Base[]; } = () => [d1, d2]) { } } +class x89 { constructor(parm: { (): Base[]; } = function() { return [d1, d2] }) { } } +class x90 { constructor(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } +class x91 { constructor(parm: Base[] = [d1, d2]) { } } +class x92 { constructor(parm: Array = [d1, d2]) { } } +class x93 { constructor(parm: { [n: number]: Base; } = [d1, d2]) { } } +class x94 { constructor(parm: {n: Base[]; } = { n: [d1, d2] }) { } } +class x95 { constructor(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } +class x96 { constructor(parm: Genric = { func: n => { return [d1, d2]; } }) { } } +class x97 { constructor(public parm: () => Base[] = () => [d1, d2]) { } } +class x98 { constructor(public parm: () => Base[] = function() { return [d1, d2] }) { } } +class x99 { constructor(public parm: () => Base[] = function named() { return [d1, d2] }) { } } +class x100 { constructor(public parm: { (): Base[]; } = () => [d1, d2]) { } } +class x101 { constructor(public parm: { (): Base[]; } = function() { return [d1, d2] }) { } } +class x102 { constructor(public parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } +class x103 { constructor(public parm: Base[] = [d1, d2]) { } } +class x104 { constructor(public parm: Array = [d1, d2]) { } } +class x105 { constructor(public parm: { [n: number]: Base; } = [d1, d2]) { } } +class x106 { constructor(public parm: {n: Base[]; } = { n: [d1, d2] }) { } } +class x107 { constructor(public parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } +class x108 { constructor(public parm: Genric = { func: n => { return [d1, d2]; } }) { } } +class x109 { constructor(private parm: () => Base[] = () => [d1, d2]) { } } +class x110 { constructor(private parm: () => Base[] = function() { return [d1, d2] }) { } } +class x111 { constructor(private parm: () => Base[] = function named() { return [d1, d2] }) { } } +class x112 { constructor(private parm: { (): Base[]; } = () => [d1, d2]) { } } +class x113 { constructor(private parm: { (): Base[]; } = function() { return [d1, d2] }) { } } +class x114 { constructor(private parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } +class x115 { constructor(private parm: Base[] = [d1, d2]) { } } +class x116 { constructor(private parm: Array = [d1, d2]) { } } +class x117 { constructor(private parm: { [n: number]: Base; } = [d1, d2]) { } } +class x118 { constructor(private parm: {n: Base[]; } = { n: [d1, d2] }) { } } +class x119 { constructor(private parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } +class x120 { constructor(private parm: Genric = { func: n => { return [d1, d2]; } }) { } } +function x121(parm: () => Base[] = () => [d1, d2]) { } +function x122(parm: () => Base[] = function() { return [d1, d2] }) { } +function x123(parm: () => Base[] = function named() { return [d1, d2] }) { } +function x124(parm: { (): Base[]; } = () => [d1, d2]) { } +function x125(parm: { (): Base[]; } = function() { return [d1, d2] }) { } +function x126(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } +function x127(parm: Base[] = [d1, d2]) { } +function x128(parm: Array = [d1, d2]) { } +function x129(parm: { [n: number]: Base; } = [d1, d2]) { } +function x130(parm: {n: Base[]; } = { n: [d1, d2] }) { } +function x131(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } +function x132(parm: Genric = { func: n => { return [d1, d2]; } }) { } +function x133(): () => Base[] { return () => [d1, d2]; } +function x134(): () => Base[] { return function() { return [d1, d2] }; } +function x135(): () => Base[] { return function named() { return [d1, d2] }; } +function x136(): { (): Base[]; } { return () => [d1, d2]; } +function x137(): { (): Base[]; } { return function() { return [d1, d2] }; } +function x138(): { (): Base[]; } { return function named() { return [d1, d2] }; } +function x139(): Base[] { return [d1, d2]; } +function x140(): Array { return [d1, d2]; } +function x141(): { [n: number]: Base; } { return [d1, d2]; } +function x142(): {n: Base[]; } { return { n: [d1, d2] }; } +function x143(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; } +function x144(): Genric { return { func: n => { return [d1, d2]; } }; } +function x145(): () => Base[] { return () => [d1, d2]; return () => [d1, d2]; } +function x146(): () => Base[] { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } +function x147(): () => Base[] { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } +function x148(): { (): Base[]; } { return () => [d1, d2]; return () => [d1, d2]; } +function x149(): { (): Base[]; } { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } +function x150(): { (): Base[]; } { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } +function x151(): Base[] { return [d1, d2]; return [d1, d2]; } +function x152(): Array { return [d1, d2]; return [d1, d2]; } +function x153(): { [n: number]: Base; } { return [d1, d2]; return [d1, d2]; } +function x154(): {n: Base[]; } { return { n: [d1, d2] }; return { n: [d1, d2] }; } +function x155(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; return n => { var n: Base[]; return null; }; } +function x156(): Genric { return { func: n => { return [d1, d2]; } }; return { func: n => { return [d1, d2]; } }; } +var x157: () => () => Base[] = () => { return () => [d1, d2]; }; +var x158: () => () => Base[] = () => { return function() { return [d1, d2] }; }; +var x159: () => () => Base[] = () => { return function named() { return [d1, d2] }; }; +var x160: () => { (): Base[]; } = () => { return () => [d1, d2]; }; +var x161: () => { (): Base[]; } = () => { return function() { return [d1, d2] }; }; +var x162: () => { (): Base[]; } = () => { return function named() { return [d1, d2] }; }; +var x163: () => Base[] = () => { return [d1, d2]; }; +var x164: () => Array = () => { return [d1, d2]; }; +var x165: () => { [n: number]: Base; } = () => { return [d1, d2]; }; +var x166: () => {n: Base[]; } = () => { return { n: [d1, d2] }; }; +var x167: () => (s: Base[]) => any = () => { return n => { var n: Base[]; return null; }; }; +var x168: () => Genric = () => { return { func: n => { return [d1, d2]; } }; }; +var x169: () => () => Base[] = function() { return () => [d1, d2]; }; +var x170: () => () => Base[] = function() { return function() { return [d1, d2] }; }; +var x171: () => () => Base[] = function() { return function named() { return [d1, d2] }; }; +var x172: () => { (): Base[]; } = function() { return () => [d1, d2]; }; +var x173: () => { (): Base[]; } = function() { return function() { return [d1, d2] }; }; +var x174: () => { (): Base[]; } = function() { return function named() { return [d1, d2] }; }; +var x175: () => Base[] = function() { return [d1, d2]; }; +var x176: () => Array = function() { return [d1, d2]; }; +var x177: () => { [n: number]: Base; } = function() { return [d1, d2]; }; +var x178: () => {n: Base[]; } = function() { return { n: [d1, d2] }; }; +var x179: () => (s: Base[]) => any = function() { return n => { var n: Base[]; return null; }; }; +var x180: () => Genric = function() { return { func: n => { return [d1, d2]; } }; }; +module x181 { var t: () => Base[] = () => [d1, d2]; } +module x182 { var t: () => Base[] = function() { return [d1, d2] }; } +module x183 { var t: () => Base[] = function named() { return [d1, d2] }; } +module x184 { var t: { (): Base[]; } = () => [d1, d2]; } +module x185 { var t: { (): Base[]; } = function() { return [d1, d2] }; } +module x186 { var t: { (): Base[]; } = function named() { return [d1, d2] }; } +module x187 { var t: Base[] = [d1, d2]; } +module x188 { var t: Array = [d1, d2]; } +module x189 { var t: { [n: number]: Base; } = [d1, d2]; } +module x190 { var t: {n: Base[]; } = { n: [d1, d2] }; } +module x191 { var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } +module x192 { var t: Genric = { func: n => { return [d1, d2]; } }; } +module x193 { export var t: () => Base[] = () => [d1, d2]; } +module x194 { export var t: () => Base[] = function() { return [d1, d2] }; } +module x195 { export var t: () => Base[] = function named() { return [d1, d2] }; } +module x196 { export var t: { (): Base[]; } = () => [d1, d2]; } +module x197 { export var t: { (): Base[]; } = function() { return [d1, d2] }; } +module x198 { export var t: { (): Base[]; } = function named() { return [d1, d2] }; } +module x199 { export var t: Base[] = [d1, d2]; } +module x200 { export var t: Array = [d1, d2]; } +module x201 { export var t: { [n: number]: Base; } = [d1, d2]; } +module x202 { export var t: {n: Base[]; } = { n: [d1, d2] }; } +module x203 { export var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } +module x204 { export var t: Genric = { func: n => { return [d1, d2]; } }; } +var x206 = <() => Base[]>function() { return [d1, d2] }; +var x207 = <() => Base[]>function named() { return [d1, d2] }; +var x209 = <{ (): Base[]; }>function() { return [d1, d2] }; +var x210 = <{ (): Base[]; }>function named() { return [d1, d2] }; +var x211 = [d1, d2]; +var x212 = >[d1, d2]; +var x213 = <{ [n: number]: Base; }>[d1, d2]; +var x214 = <{n: Base[]; } >{ n: [d1, d2] }; +var x216 = >{ func: n => { return [d1, d2]; } }; +var x217 = (<() => Base[]>undefined) || function() { return [d1, d2] }; +var x218 = (<() => Base[]>undefined) || function named() { return [d1, d2] }; +var x219 = (<{ (): Base[]; }>undefined) || function() { return [d1, d2] }; +var x220 = (<{ (): Base[]; }>undefined) || function named() { return [d1, d2] }; +var x221 = (undefined) || [d1, d2]; +var x222 = (>undefined) || [d1, d2]; +var x223 = (<{ [n: number]: Base; }>undefined) || [d1, d2]; +var x224 = (<{n: Base[]; } >undefined) || { n: [d1, d2] }; +var x225: () => Base[]; x225 = () => [d1, d2]; +var x226: () => Base[]; x226 = function() { return [d1, d2] }; +var x227: () => Base[]; x227 = function named() { return [d1, d2] }; +var x228: { (): Base[]; }; x228 = () => [d1, d2]; +var x229: { (): Base[]; }; x229 = function() { return [d1, d2] }; +var x230: { (): Base[]; }; x230 = function named() { return [d1, d2] }; +var x231: Base[]; x231 = [d1, d2]; +var x232: Array; x232 = [d1, d2]; +var x233: { [n: number]: Base; }; x233 = [d1, d2]; +var x234: {n: Base[]; } ; x234 = { n: [d1, d2] }; +var x235: (s: Base[]) => any; x235 = n => { var n: Base[]; return null; }; +var x236: Genric; x236 = { func: n => { return [d1, d2]; } }; +var x237: { n: () => Base[]; } = { n: () => [d1, d2] }; +var x238: { n: () => Base[]; } = { n: function() { return [d1, d2] } }; +var x239: { n: () => Base[]; } = { n: function named() { return [d1, d2] } }; +var x240: { n: { (): Base[]; }; } = { n: () => [d1, d2] }; +var x241: { n: { (): Base[]; }; } = { n: function() { return [d1, d2] } }; +var x242: { n: { (): Base[]; }; } = { n: function named() { return [d1, d2] } }; +var x243: { n: Base[]; } = { n: [d1, d2] }; +var x244: { n: Array; } = { n: [d1, d2] }; +var x245: { n: { [n: number]: Base; }; } = { n: [d1, d2] }; +var x246: { n: {n: Base[]; } ; } = { n: { n: [d1, d2] } }; +var x247: { n: (s: Base[]) => any; } = { n: n => { var n: Base[]; return null; } }; +var x248: { n: Genric; } = { n: { func: n => { return [d1, d2]; } } }; +var x252: { (): Base[]; }[] = [() => [d1, d2]]; +var x253: { (): Base[]; }[] = [function() { return [d1, d2] }]; +var x254: { (): Base[]; }[] = [function named() { return [d1, d2] }]; +var x255: Base[][] = [[d1, d2]]; +var x256: Array[] = [[d1, d2]]; +var x257: { [n: number]: Base; }[] = [[d1, d2]]; +var x258: {n: Base[]; } [] = [{ n: [d1, d2] }]; +var x260: Genric[] = [{ func: n => { return [d1, d2]; } }]; +var x261: () => Base[] = function() { return [d1, d2] } || undefined; +var x262: () => Base[] = function named() { return [d1, d2] } || undefined; +var x263: { (): Base[]; } = function() { return [d1, d2] } || undefined; +var x264: { (): Base[]; } = function named() { return [d1, d2] } || undefined; +var x265: Base[] = [d1, d2] || undefined; +var x266: Array = [d1, d2] || undefined; +var x267: { [n: number]: Base; } = [d1, d2] || undefined; +var x268: {n: Base[]; } = { n: [d1, d2] } || undefined; +var x269: () => Base[] = undefined || function() { return [d1, d2] }; +var x270: () => Base[] = undefined || function named() { return [d1, d2] }; +var x271: { (): Base[]; } = undefined || function() { return [d1, d2] }; +var x272: { (): Base[]; } = undefined || function named() { return [d1, d2] }; +var x273: Base[] = undefined || [d1, d2]; +var x274: Array = undefined || [d1, d2]; +var x275: { [n: number]: Base; } = undefined || [d1, d2]; +var x276: {n: Base[]; } = undefined || { n: [d1, d2] }; +var x277: () => Base[] = function() { return [d1, d2] } || function() { return [d1, d2] }; +var x278: () => Base[] = function named() { return [d1, d2] } || function named() { return [d1, d2] }; +var x279: { (): Base[]; } = function() { return [d1, d2] } || function() { return [d1, d2] }; +var x280: { (): Base[]; } = function named() { return [d1, d2] } || function named() { return [d1, d2] }; +var x281: Base[] = [d1, d2] || [d1, d2]; +var x282: Array = [d1, d2] || [d1, d2]; +var x283: { [n: number]: Base; } = [d1, d2] || [d1, d2]; +var x284: {n: Base[]; } = { n: [d1, d2] } || { n: [d1, d2] }; +var x285: () => Base[] = true ? () => [d1, d2] : () => [d1, d2]; +var x286: () => Base[] = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; +var x287: () => Base[] = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; +var x288: { (): Base[]; } = true ? () => [d1, d2] : () => [d1, d2]; +var x289: { (): Base[]; } = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; +var x290: { (): Base[]; } = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; +var x291: Base[] = true ? [d1, d2] : [d1, d2]; +var x292: Array = true ? [d1, d2] : [d1, d2]; +var x293: { [n: number]: Base; } = true ? [d1, d2] : [d1, d2]; +var x294: {n: Base[]; } = true ? { n: [d1, d2] } : { n: [d1, d2] }; +var x295: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : n => { var n: Base[]; return null; }; +var x296: Genric = true ? { func: n => { return [d1, d2]; } } : { func: n => { return [d1, d2]; } }; +var x297: () => Base[] = true ? undefined : () => [d1, d2]; +var x298: () => Base[] = true ? undefined : function() { return [d1, d2] }; +var x299: () => Base[] = true ? undefined : function named() { return [d1, d2] }; +var x300: { (): Base[]; } = true ? undefined : () => [d1, d2]; +var x301: { (): Base[]; } = true ? undefined : function() { return [d1, d2] }; +var x302: { (): Base[]; } = true ? undefined : function named() { return [d1, d2] }; +var x303: Base[] = true ? undefined : [d1, d2]; +var x304: Array = true ? undefined : [d1, d2]; +var x305: { [n: number]: Base; } = true ? undefined : [d1, d2]; +var x306: {n: Base[]; } = true ? undefined : { n: [d1, d2] }; +var x307: (s: Base[]) => any = true ? undefined : n => { var n: Base[]; return null; }; +var x308: Genric = true ? undefined : { func: n => { return [d1, d2]; } }; +var x309: () => Base[] = true ? () => [d1, d2] : undefined; +var x310: () => Base[] = true ? function() { return [d1, d2] } : undefined; +var x311: () => Base[] = true ? function named() { return [d1, d2] } : undefined; +var x312: { (): Base[]; } = true ? () => [d1, d2] : undefined; +var x313: { (): Base[]; } = true ? function() { return [d1, d2] } : undefined; +var x314: { (): Base[]; } = true ? function named() { return [d1, d2] } : undefined; +var x315: Base[] = true ? [d1, d2] : undefined; +var x316: Array = true ? [d1, d2] : undefined; +var x317: { [n: number]: Base; } = true ? [d1, d2] : undefined; +var x318: {n: Base[]; } = true ? { n: [d1, d2] } : undefined; +var x319: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : undefined; +var x320: Genric = true ? { func: n => { return [d1, d2]; } } : undefined; +function x321(n: () => Base[]) { }; x321(() => [d1, d2]); +function x322(n: () => Base[]) { }; x322(function() { return [d1, d2] }); +function x323(n: () => Base[]) { }; x323(function named() { return [d1, d2] }); +function x324(n: { (): Base[]; }) { }; x324(() => [d1, d2]); +function x325(n: { (): Base[]; }) { }; x325(function() { return [d1, d2] }); +function x326(n: { (): Base[]; }) { }; x326(function named() { return [d1, d2] }); +function x327(n: Base[]) { }; x327([d1, d2]); +function x328(n: Array) { }; x328([d1, d2]); +function x329(n: { [n: number]: Base; }) { }; x329([d1, d2]); +function x330(n: {n: Base[]; } ) { }; x330({ n: [d1, d2] }); +function x331(n: (s: Base[]) => any) { }; x331(n => { var n: Base[]; return null; }); +function x332(n: Genric) { }; x332({ func: n => { return [d1, d2]; } }); +var x333 = (n: () => Base[]) => n; x333(() => [d1, d2]); +var x334 = (n: () => Base[]) => n; x334(function() { return [d1, d2] }); +var x335 = (n: () => Base[]) => n; x335(function named() { return [d1, d2] }); +var x336 = (n: { (): Base[]; }) => n; x336(() => [d1, d2]); +var x337 = (n: { (): Base[]; }) => n; x337(function() { return [d1, d2] }); +var x338 = (n: { (): Base[]; }) => n; x338(function named() { return [d1, d2] }); +var x339 = (n: Base[]) => n; x339([d1, d2]); +var x340 = (n: Array) => n; x340([d1, d2]); +var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); +var x342 = (n: {n: Base[]; } ) => n; x342({ n: [d1, d2] }); +var x343 = (n: (s: Base[]) => any) => n; x343(n => { var n: Base[]; return null; }); +var x344 = (n: Genric) => n; x344({ func: n => { return [d1, d2]; } }); +var x345 = function(n: () => Base[]) { }; x345(() => [d1, d2]); +var x346 = function(n: () => Base[]) { }; x346(function() { return [d1, d2] }); +var x347 = function(n: () => Base[]) { }; x347(function named() { return [d1, d2] }); +var x348 = function(n: { (): Base[]; }) { }; x348(() => [d1, d2]); +var x349 = function(n: { (): Base[]; }) { }; x349(function() { return [d1, d2] }); +var x350 = function(n: { (): Base[]; }) { }; x350(function named() { return [d1, d2] }); +var x351 = function(n: Base[]) { }; x351([d1, d2]); +var x352 = function(n: Array) { }; x352([d1, d2]); +var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); +var x354 = function(n: {n: Base[]; } ) { }; x354({ n: [d1, d2] }); +var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; return null; }); +var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); + +/// [Declarations] //// + + + +//// [generatedContextualTyping.d.ts] +declare class Base { + private p; +} +declare class Derived1 extends Base { + private m; +} +declare class Derived2 extends Base { + private n; +} +interface Genric { + func(n: T[]): any; +} +declare var b: invalid, d1: invalid, d2: invalid; +declare var x1: () => Base[]; +declare var x2: () => Base[]; +declare var x3: () => Base[]; +declare var x4: { + (): Base[]; +}; +declare var x5: { + (): Base[]; +}; +declare var x6: { + (): Base[]; +}; +declare var x7: Base[]; +declare var x8: Array; +declare var x9: { + [n: number]: Base; +}; +declare var x10: { + n: Base[]; +}; +declare var x11: (s: Base[]) => any; +declare var x12: Genric; +declare class x13 { + member: () => Base[]; +} +declare class x14 { + member: () => Base[]; +} +declare class x15 { + member: () => Base[]; +} +declare class x16 { + member: { + (): Base[]; + }; +} +declare class x17 { + member: { + (): Base[]; + }; +} +declare class x18 { + member: { + (): Base[]; + }; +} +declare class x19 { + member: Base[]; +} +declare class x20 { + member: Array; +} +declare class x21 { + member: { + [n: number]: Base; + }; +} +declare class x22 { + member: { + n: Base[]; + }; +} +declare class x23 { + member: (s: Base[]) => any; +} +declare class x24 { + member: Genric; +} +declare class x25 { + private member; +} +declare class x26 { + private member; +} +declare class x27 { + private member; +} +declare class x28 { + private member; +} +declare class x29 { + private member; +} +declare class x30 { + private member; +} +declare class x31 { + private member; +} +declare class x32 { + private member; +} +declare class x33 { + private member; +} +declare class x34 { + private member; +} +declare class x35 { + private member; +} +declare class x36 { + private member; +} +declare class x37 { + member: () => Base[]; +} +declare class x38 { + member: () => Base[]; +} +declare class x39 { + member: () => Base[]; +} +declare class x40 { + member: { + (): Base[]; + }; +} +declare class x41 { + member: { + (): Base[]; + }; +} +declare class x42 { + member: { + (): Base[]; + }; +} +declare class x43 { + member: Base[]; +} +declare class x44 { + member: Array; +} +declare class x45 { + member: { + [n: number]: Base; + }; +} +declare class x46 { + member: { + n: Base[]; + }; +} +declare class x47 { + member: (s: Base[]) => any; +} +declare class x48 { + member: Genric; +} +declare class x49 { + static member: () => Base[]; +} +declare class x50 { + static member: () => Base[]; +} +declare class x51 { + static member: () => Base[]; +} +declare class x52 { + static member: { + (): Base[]; + }; +} +declare class x53 { + static member: { + (): Base[]; + }; +} +declare class x54 { + static member: { + (): Base[]; + }; +} +declare class x55 { + static member: Base[]; +} +declare class x56 { + static member: Array; +} +declare class x57 { + static member: { + [n: number]: Base; + }; +} +declare class x58 { + static member: { + n: Base[]; + }; +} +declare class x59 { + static member: (s: Base[]) => any; +} +declare class x60 { + static member: Genric; +} +declare class x61 { + private static member; +} +declare class x62 { + private static member; +} +declare class x63 { + private static member; +} +declare class x64 { + private static member; +} +declare class x65 { + private static member; +} +declare class x66 { + private static member; +} +declare class x67 { + private static member; +} +declare class x68 { + private static member; +} +declare class x69 { + private static member; +} +declare class x70 { + private static member; +} +declare class x71 { + private static member; +} +declare class x72 { + private static member; +} +declare class x73 { + static member: () => Base[]; +} +declare class x74 { + static member: () => Base[]; +} +declare class x75 { + static member: () => Base[]; +} +declare class x76 { + static member: { + (): Base[]; + }; +} +declare class x77 { + static member: { + (): Base[]; + }; +} +declare class x78 { + static member: { + (): Base[]; + }; +} +declare class x79 { + static member: Base[]; +} +declare class x80 { + static member: Array; +} +declare class x81 { + static member: { + [n: number]: Base; + }; +} +declare class x82 { + static member: { + n: Base[]; + }; +} +declare class x83 { + static member: (s: Base[]) => any; +} +declare class x84 { + static member: Genric; +} +declare class x85 { + constructor(parm?: () => Base[]); +} +declare class x86 { + constructor(parm?: () => Base[]); +} +declare class x87 { + constructor(parm?: () => Base[]); +} +declare class x88 { + constructor(parm?: { + (): Base[]; + }); +} +declare class x89 { + constructor(parm?: { + (): Base[]; + }); +} +declare class x90 { + constructor(parm?: { + (): Base[]; + }); +} +declare class x91 { + constructor(parm?: Base[]); +} +declare class x92 { + constructor(parm?: Array); +} +declare class x93 { + constructor(parm?: { + [n: number]: Base; + }); +} +declare class x94 { + constructor(parm?: { + n: Base[]; + }); +} +declare class x95 { + constructor(parm?: (s: Base[]) => any); +} +declare class x96 { + constructor(parm?: Genric); +} +declare class x97 { + parm: () => Base[]; + constructor(parm?: () => Base[]); +} +declare class x98 { + parm: () => Base[]; + constructor(parm?: () => Base[]); +} +declare class x99 { + parm: () => Base[]; + constructor(parm?: () => Base[]); +} +declare class x100 { + parm: { + (): Base[]; + }; + constructor(parm?: { + (): Base[]; + }); +} +declare class x101 { + parm: { + (): Base[]; + }; + constructor(parm?: { + (): Base[]; + }); +} +declare class x102 { + parm: { + (): Base[]; + }; + constructor(parm?: { + (): Base[]; + }); +} +declare class x103 { + parm: Base[]; + constructor(parm?: Base[]); +} +declare class x104 { + parm: Array; + constructor(parm?: Array); +} +declare class x105 { + parm: { + [n: number]: Base; + }; + constructor(parm?: { + [n: number]: Base; + }); +} +declare class x106 { + parm: { + n: Base[]; + }; + constructor(parm?: { + n: Base[]; + }); +} +declare class x107 { + parm: (s: Base[]) => any; + constructor(parm?: (s: Base[]) => any); +} +declare class x108 { + parm: Genric; + constructor(parm?: Genric); +} +declare class x109 { + private parm; + constructor(parm?: () => Base[]); +} +declare class x110 { + private parm; + constructor(parm?: () => Base[]); +} +declare class x111 { + private parm; + constructor(parm?: () => Base[]); +} +declare class x112 { + private parm; + constructor(parm?: { + (): Base[]; + }); +} +declare class x113 { + private parm; + constructor(parm?: { + (): Base[]; + }); +} +declare class x114 { + private parm; + constructor(parm?: { + (): Base[]; + }); +} +declare class x115 { + private parm; + constructor(parm?: Base[]); +} +declare class x116 { + private parm; + constructor(parm?: Array); +} +declare class x117 { + private parm; + constructor(parm?: { + [n: number]: Base; + }); +} +declare class x118 { + private parm; + constructor(parm?: { + n: Base[]; + }); +} +declare class x119 { + private parm; + constructor(parm?: (s: Base[]) => any); +} +declare class x120 { + private parm; + constructor(parm?: Genric); +} +declare function x121(parm?: () => Base[]): invalid; +declare function x122(parm?: () => Base[]): invalid; +declare function x123(parm?: () => Base[]): invalid; +declare function x124(parm?: { + (): Base[]; +}): invalid; +declare function x125(parm?: { + (): Base[]; +}): invalid; +declare function x126(parm?: { + (): Base[]; +}): invalid; +declare function x127(parm?: Base[]): invalid; +declare function x128(parm?: Array): invalid; +declare function x129(parm?: { + [n: number]: Base; +}): invalid; +declare function x130(parm?: { + n: Base[]; +}): invalid; +declare function x131(parm?: (s: Base[]) => any): invalid; +declare function x132(parm?: Genric): invalid; +declare function x133(): () => Base[]; +declare function x134(): () => Base[]; +declare function x135(): () => Base[]; +declare function x136(): { + (): Base[]; +}; +declare function x137(): { + (): Base[]; +}; +declare function x138(): { + (): Base[]; +}; +declare function x139(): Base[]; +declare function x140(): Array; +declare function x141(): { + [n: number]: Base; +}; +declare function x142(): { + n: Base[]; +}; +declare function x143(): (s: Base[]) => any; +declare function x144(): Genric; +declare function x145(): () => Base[]; +declare function x146(): () => Base[]; +declare function x147(): () => Base[]; +declare function x148(): { + (): Base[]; +}; +declare function x149(): { + (): Base[]; +}; +declare function x150(): { + (): Base[]; +}; +declare function x151(): Base[]; +declare function x152(): Array; +declare function x153(): { + [n: number]: Base; +}; +declare function x154(): { + n: Base[]; +}; +declare function x155(): (s: Base[]) => any; +declare function x156(): Genric; +declare var x157: () => () => Base[]; +declare var x158: () => () => Base[]; +declare var x159: () => () => Base[]; +declare var x160: () => { + (): Base[]; +}; +declare var x161: () => { + (): Base[]; +}; +declare var x162: () => { + (): Base[]; +}; +declare var x163: () => Base[]; +declare var x164: () => Array; +declare var x165: () => { + [n: number]: Base; +}; +declare var x166: () => { + n: Base[]; +}; +declare var x167: () => (s: Base[]) => any; +declare var x168: () => Genric; +declare var x169: () => () => Base[]; +declare var x170: () => () => Base[]; +declare var x171: () => () => Base[]; +declare var x172: () => { + (): Base[]; +}; +declare var x173: () => { + (): Base[]; +}; +declare var x174: () => { + (): Base[]; +}; +declare var x175: () => Base[]; +declare var x176: () => Array; +declare var x177: () => { + [n: number]: Base; +}; +declare var x178: () => { + n: Base[]; +}; +declare var x179: () => (s: Base[]) => any; +declare var x180: () => Genric; +declare namespace x181 { } +declare namespace x182 { } +declare namespace x183 { } +declare namespace x184 { } +declare namespace x185 { } +declare namespace x186 { } +declare namespace x187 { } +declare namespace x188 { } +declare namespace x189 { } +declare namespace x190 { } +declare namespace x191 { } +declare namespace x192 { } +declare namespace x193 { + var t: () => Base[]; +} +declare namespace x194 { + var t: () => Base[]; +} +declare namespace x195 { + var t: () => Base[]; +} +declare namespace x196 { + var t: { + (): Base[]; + }; +} +declare namespace x197 { + var t: { + (): Base[]; + }; +} +declare namespace x198 { + var t: { + (): Base[]; + }; +} +declare namespace x199 { + var t: Base[]; +} +declare namespace x200 { + var t: Array; +} +declare namespace x201 { + var t: { + [n: number]: Base; + }; +} +declare namespace x202 { + var t: { + n: Base[]; + }; +} +declare namespace x203 { + var t: (s: Base[]) => any; +} +declare namespace x204 { + var t: Genric; +} +declare var x206: () => Base[]; +declare var x207: () => Base[]; +declare var x209: { + (): Base[]; +}; +declare var x210: { + (): Base[]; +}; +declare var x211: Base[]; +declare var x212: Array; +declare var x213: { + [n: number]: Base; +}; +declare var x214: { + n: Base[]; +}; +declare var x216: Genric; +declare var x217: invalid; +declare var x218: invalid; +declare var x219: invalid; +declare var x220: invalid; +declare var x221: invalid; +declare var x222: invalid; +declare var x223: invalid; +declare var x224: invalid; +declare var x225: () => Base[]; +declare var x226: () => Base[]; +declare var x227: () => Base[]; +declare var x228: { + (): Base[]; +}; +declare var x229: { + (): Base[]; +}; +declare var x230: { + (): Base[]; +}; +declare var x231: Base[]; +declare var x232: Array; +declare var x233: { + [n: number]: Base; +}; +declare var x234: { + n: Base[]; +}; +declare var x235: (s: Base[]) => any; +declare var x236: Genric; +declare var x237: { + n: () => Base[]; +}; +declare var x238: { + n: () => Base[]; +}; +declare var x239: { + n: () => Base[]; +}; +declare var x240: { + n: { + (): Base[]; + }; +}; +declare var x241: { + n: { + (): Base[]; + }; +}; +declare var x242: { + n: { + (): Base[]; + }; +}; +declare var x243: { + n: Base[]; +}; +declare var x244: { + n: Array; +}; +declare var x245: { + n: { + [n: number]: Base; + }; +}; +declare var x246: { + n: { + n: Base[]; + }; +}; +declare var x247: { + n: (s: Base[]) => any; +}; +declare var x248: { + n: Genric; +}; +declare var x252: { + (): Base[]; +}[]; +declare var x253: { + (): Base[]; +}[]; +declare var x254: { + (): Base[]; +}[]; +declare var x255: Base[][]; +declare var x256: Array[]; +declare var x257: { + [n: number]: Base; +}[]; +declare var x258: { + n: Base[]; +}[]; +declare var x260: Genric[]; +declare var x261: () => Base[]; +declare var x262: () => Base[]; +declare var x263: { + (): Base[]; +}; +declare var x264: { + (): Base[]; +}; +declare var x265: Base[]; +declare var x266: Array; +declare var x267: { + [n: number]: Base; +}; +declare var x268: { + n: Base[]; +}; +declare var x269: () => Base[]; +declare var x270: () => Base[]; +declare var x271: { + (): Base[]; +}; +declare var x272: { + (): Base[]; +}; +declare var x273: Base[]; +declare var x274: Array; +declare var x275: { + [n: number]: Base; +}; +declare var x276: { + n: Base[]; +}; +declare var x277: () => Base[]; +declare var x278: () => Base[]; +declare var x279: { + (): Base[]; +}; +declare var x280: { + (): Base[]; +}; +declare var x281: Base[]; +declare var x282: Array; +declare var x283: { + [n: number]: Base; +}; +declare var x284: { + n: Base[]; +}; +declare var x285: () => Base[]; +declare var x286: () => Base[]; +declare var x287: () => Base[]; +declare var x288: { + (): Base[]; +}; +declare var x289: { + (): Base[]; +}; +declare var x290: { + (): Base[]; +}; +declare var x291: Base[]; +declare var x292: Array; +declare var x293: { + [n: number]: Base; +}; +declare var x294: { + n: Base[]; +}; +declare var x295: (s: Base[]) => any; +declare var x296: Genric; +declare var x297: () => Base[]; +declare var x298: () => Base[]; +declare var x299: () => Base[]; +declare var x300: { + (): Base[]; +}; +declare var x301: { + (): Base[]; +}; +declare var x302: { + (): Base[]; +}; +declare var x303: Base[]; +declare var x304: Array; +declare var x305: { + [n: number]: Base; +}; +declare var x306: { + n: Base[]; +}; +declare var x307: (s: Base[]) => any; +declare var x308: Genric; +declare var x309: () => Base[]; +declare var x310: () => Base[]; +declare var x311: () => Base[]; +declare var x312: { + (): Base[]; +}; +declare var x313: { + (): Base[]; +}; +declare var x314: { + (): Base[]; +}; +declare var x315: Base[]; +declare var x316: Array; +declare var x317: { + [n: number]: Base; +}; +declare var x318: { + n: Base[]; +}; +declare var x319: (s: Base[]) => any; +declare var x320: Genric; +declare function x321(n: () => Base[]): invalid; +declare function x322(n: () => Base[]): invalid; +declare function x323(n: () => Base[]): invalid; +declare function x324(n: { + (): Base[]; +}): invalid; +declare function x325(n: { + (): Base[]; +}): invalid; +declare function x326(n: { + (): Base[]; +}): invalid; +declare function x327(n: Base[]): invalid; +declare function x328(n: Array): invalid; +declare function x329(n: { + [n: number]: Base; +}): invalid; +declare function x330(n: { + n: Base[]; +}): invalid; +declare function x331(n: (s: Base[]) => any): invalid; +declare function x332(n: Genric): invalid; +declare var x333: (n: () => Base[]) => invalid; +declare var x334: (n: () => Base[]) => invalid; +declare var x335: (n: () => Base[]) => invalid; +declare var x336: (n: { + (): Base[]; +}) => invalid; +declare var x337: (n: { + (): Base[]; +}) => invalid; +declare var x338: (n: { + (): Base[]; +}) => invalid; +declare var x339: (n: Base[]) => invalid; +declare var x340: (n: Array) => invalid; +declare var x341: (n: { + [n: number]: Base; +}) => invalid; +declare var x342: (n: { + n: Base[]; +}) => invalid; +declare var x343: (n: (s: Base[]) => any) => invalid; +declare var x344: (n: Genric) => invalid; +declare var x345: (n: () => Base[]) => invalid; +declare var x346: (n: () => Base[]) => invalid; +declare var x347: (n: () => Base[]) => invalid; +declare var x348: (n: { + (): Base[]; +}) => invalid; +declare var x349: (n: { + (): Base[]; +}) => invalid; +declare var x350: (n: { + (): Base[]; +}) => invalid; +declare var x351: (n: Base[]) => invalid; +declare var x352: (n: Array) => invalid; +declare var x353: (n: { + [n: number]: Base; +}) => invalid; +declare var x354: (n: { + n: Base[]; +}) => invalid; +declare var x355: (n: (s: Base[]) => any) => invalid; +declare var x356: (n: Genric) => invalid; + +/// [Errors] //// + +generatedContextualTyping.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(5,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(5,47): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(126,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(127,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(128,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(129,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(130,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(131,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(132,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(133,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(134,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(135,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(136,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(137,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(219,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(220,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(221,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(222,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(223,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(224,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(225,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(226,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(319,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(320,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(321,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(322,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(323,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(324,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(325,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(326,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(327,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(328,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(329,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(330,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(331,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(332,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(333,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(334,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(335,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(336,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(337,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(338,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(339,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(340,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(341,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(342,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(343,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(344,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(345,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(346,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(347,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(348,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(349,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(350,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(351,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(352,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(353,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(354,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== generatedContextualTyping.ts (59 errors) ==== + class Base { private p; } + class Derived1 extends Base { private m; } + class Derived2 extends Base { private n; } + interface Genric { func(n: T[]); } + var b = new Base(), d1 = new Derived1(), d2 = new Derived2(); + ~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x1: () => Base[] = () => [d1, d2]; + var x2: () => Base[] = function() { return [d1, d2] }; + var x3: () => Base[] = function named() { return [d1, d2] }; + var x4: { (): Base[]; } = () => [d1, d2]; + var x5: { (): Base[]; } = function() { return [d1, d2] }; + var x6: { (): Base[]; } = function named() { return [d1, d2] }; + var x7: Base[] = [d1, d2]; + var x8: Array = [d1, d2]; + var x9: { [n: number]: Base; } = [d1, d2]; + var x10: {n: Base[]; } = { n: [d1, d2] }; + var x11: (s: Base[]) => any = n => { var n: Base[]; return null; }; + var x12: Genric = { func: n => { return [d1, d2]; } }; + class x13 { member: () => Base[] = () => [d1, d2] } + class x14 { member: () => Base[] = function() { return [d1, d2] } } + class x15 { member: () => Base[] = function named() { return [d1, d2] } } + class x16 { member: { (): Base[]; } = () => [d1, d2] } + class x17 { member: { (): Base[]; } = function() { return [d1, d2] } } + class x18 { member: { (): Base[]; } = function named() { return [d1, d2] } } + class x19 { member: Base[] = [d1, d2] } + class x20 { member: Array = [d1, d2] } + class x21 { member: { [n: number]: Base; } = [d1, d2] } + class x22 { member: {n: Base[]; } = { n: [d1, d2] } } + class x23 { member: (s: Base[]) => any = n => { var n: Base[]; return null; } } + class x24 { member: Genric = { func: n => { return [d1, d2]; } } } + class x25 { private member: () => Base[] = () => [d1, d2] } + class x26 { private member: () => Base[] = function() { return [d1, d2] } } + class x27 { private member: () => Base[] = function named() { return [d1, d2] } } + class x28 { private member: { (): Base[]; } = () => [d1, d2] } + class x29 { private member: { (): Base[]; } = function() { return [d1, d2] } } + class x30 { private member: { (): Base[]; } = function named() { return [d1, d2] } } + class x31 { private member: Base[] = [d1, d2] } + class x32 { private member: Array = [d1, d2] } + class x33 { private member: { [n: number]: Base; } = [d1, d2] } + class x34 { private member: {n: Base[]; } = { n: [d1, d2] } } + class x35 { private member: (s: Base[]) => any = n => { var n: Base[]; return null; } } + class x36 { private member: Genric = { func: n => { return [d1, d2]; } } } + class x37 { public member: () => Base[] = () => [d1, d2] } + class x38 { public member: () => Base[] = function() { return [d1, d2] } } + class x39 { public member: () => Base[] = function named() { return [d1, d2] } } + class x40 { public member: { (): Base[]; } = () => [d1, d2] } + class x41 { public member: { (): Base[]; } = function() { return [d1, d2] } } + class x42 { public member: { (): Base[]; } = function named() { return [d1, d2] } } + class x43 { public member: Base[] = [d1, d2] } + class x44 { public member: Array = [d1, d2] } + class x45 { public member: { [n: number]: Base; } = [d1, d2] } + class x46 { public member: {n: Base[]; } = { n: [d1, d2] } } + class x47 { public member: (s: Base[]) => any = n => { var n: Base[]; return null; } } + class x48 { public member: Genric = { func: n => { return [d1, d2]; } } } + class x49 { static member: () => Base[] = () => [d1, d2] } + class x50 { static member: () => Base[] = function() { return [d1, d2] } } + class x51 { static member: () => Base[] = function named() { return [d1, d2] } } + class x52 { static member: { (): Base[]; } = () => [d1, d2] } + class x53 { static member: { (): Base[]; } = function() { return [d1, d2] } } + class x54 { static member: { (): Base[]; } = function named() { return [d1, d2] } } + class x55 { static member: Base[] = [d1, d2] } + class x56 { static member: Array = [d1, d2] } + class x57 { static member: { [n: number]: Base; } = [d1, d2] } + class x58 { static member: {n: Base[]; } = { n: [d1, d2] } } + class x59 { static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } + class x60 { static member: Genric = { func: n => { return [d1, d2]; } } } + class x61 { private static member: () => Base[] = () => [d1, d2] } + class x62 { private static member: () => Base[] = function() { return [d1, d2] } } + class x63 { private static member: () => Base[] = function named() { return [d1, d2] } } + class x64 { private static member: { (): Base[]; } = () => [d1, d2] } + class x65 { private static member: { (): Base[]; } = function() { return [d1, d2] } } + class x66 { private static member: { (): Base[]; } = function named() { return [d1, d2] } } + class x67 { private static member: Base[] = [d1, d2] } + class x68 { private static member: Array = [d1, d2] } + class x69 { private static member: { [n: number]: Base; } = [d1, d2] } + class x70 { private static member: {n: Base[]; } = { n: [d1, d2] } } + class x71 { private static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } + class x72 { private static member: Genric = { func: n => { return [d1, d2]; } } } + class x73 { public static member: () => Base[] = () => [d1, d2] } + class x74 { public static member: () => Base[] = function() { return [d1, d2] } } + class x75 { public static member: () => Base[] = function named() { return [d1, d2] } } + class x76 { public static member: { (): Base[]; } = () => [d1, d2] } + class x77 { public static member: { (): Base[]; } = function() { return [d1, d2] } } + class x78 { public static member: { (): Base[]; } = function named() { return [d1, d2] } } + class x79 { public static member: Base[] = [d1, d2] } + class x80 { public static member: Array = [d1, d2] } + class x81 { public static member: { [n: number]: Base; } = [d1, d2] } + class x82 { public static member: {n: Base[]; } = { n: [d1, d2] } } + class x83 { public static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } + class x84 { public static member: Genric = { func: n => { return [d1, d2]; } } } + class x85 { constructor(parm: () => Base[] = () => [d1, d2]) { } } + class x86 { constructor(parm: () => Base[] = function() { return [d1, d2] }) { } } + class x87 { constructor(parm: () => Base[] = function named() { return [d1, d2] }) { } } + class x88 { constructor(parm: { (): Base[]; } = () => [d1, d2]) { } } + class x89 { constructor(parm: { (): Base[]; } = function() { return [d1, d2] }) { } } + class x90 { constructor(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } + class x91 { constructor(parm: Base[] = [d1, d2]) { } } + class x92 { constructor(parm: Array = [d1, d2]) { } } + class x93 { constructor(parm: { [n: number]: Base; } = [d1, d2]) { } } + class x94 { constructor(parm: {n: Base[]; } = { n: [d1, d2] }) { } } + class x95 { constructor(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } + class x96 { constructor(parm: Genric = { func: n => { return [d1, d2]; } }) { } } + class x97 { constructor(public parm: () => Base[] = () => [d1, d2]) { } } + class x98 { constructor(public parm: () => Base[] = function() { return [d1, d2] }) { } } + class x99 { constructor(public parm: () => Base[] = function named() { return [d1, d2] }) { } } + class x100 { constructor(public parm: { (): Base[]; } = () => [d1, d2]) { } } + class x101 { constructor(public parm: { (): Base[]; } = function() { return [d1, d2] }) { } } + class x102 { constructor(public parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } + class x103 { constructor(public parm: Base[] = [d1, d2]) { } } + class x104 { constructor(public parm: Array = [d1, d2]) { } } + class x105 { constructor(public parm: { [n: number]: Base; } = [d1, d2]) { } } + class x106 { constructor(public parm: {n: Base[]; } = { n: [d1, d2] }) { } } + class x107 { constructor(public parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } + class x108 { constructor(public parm: Genric = { func: n => { return [d1, d2]; } }) { } } + class x109 { constructor(private parm: () => Base[] = () => [d1, d2]) { } } + class x110 { constructor(private parm: () => Base[] = function() { return [d1, d2] }) { } } + class x111 { constructor(private parm: () => Base[] = function named() { return [d1, d2] }) { } } + class x112 { constructor(private parm: { (): Base[]; } = () => [d1, d2]) { } } + class x113 { constructor(private parm: { (): Base[]; } = function() { return [d1, d2] }) { } } + class x114 { constructor(private parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } + class x115 { constructor(private parm: Base[] = [d1, d2]) { } } + class x116 { constructor(private parm: Array = [d1, d2]) { } } + class x117 { constructor(private parm: { [n: number]: Base; } = [d1, d2]) { } } + class x118 { constructor(private parm: {n: Base[]; } = { n: [d1, d2] }) { } } + class x119 { constructor(private parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } + class x120 { constructor(private parm: Genric = { func: n => { return [d1, d2]; } }) { } } + function x121(parm: () => Base[] = () => [d1, d2]) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x122(parm: () => Base[] = function() { return [d1, d2] }) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x123(parm: () => Base[] = function named() { return [d1, d2] }) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x124(parm: { (): Base[]; } = () => [d1, d2]) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x125(parm: { (): Base[]; } = function() { return [d1, d2] }) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x126(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x127(parm: Base[] = [d1, d2]) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x128(parm: Array = [d1, d2]) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x129(parm: { [n: number]: Base; } = [d1, d2]) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x130(parm: {n: Base[]; } = { n: [d1, d2] }) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x131(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x132(parm: Genric = { func: n => { return [d1, d2]; } }) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x133(): () => Base[] { return () => [d1, d2]; } + function x134(): () => Base[] { return function() { return [d1, d2] }; } + function x135(): () => Base[] { return function named() { return [d1, d2] }; } + function x136(): { (): Base[]; } { return () => [d1, d2]; } + function x137(): { (): Base[]; } { return function() { return [d1, d2] }; } + function x138(): { (): Base[]; } { return function named() { return [d1, d2] }; } + function x139(): Base[] { return [d1, d2]; } + function x140(): Array { return [d1, d2]; } + function x141(): { [n: number]: Base; } { return [d1, d2]; } + function x142(): {n: Base[]; } { return { n: [d1, d2] }; } + function x143(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; } + function x144(): Genric { return { func: n => { return [d1, d2]; } }; } + function x145(): () => Base[] { return () => [d1, d2]; return () => [d1, d2]; } + function x146(): () => Base[] { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } + function x147(): () => Base[] { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } + function x148(): { (): Base[]; } { return () => [d1, d2]; return () => [d1, d2]; } + function x149(): { (): Base[]; } { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } + function x150(): { (): Base[]; } { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } + function x151(): Base[] { return [d1, d2]; return [d1, d2]; } + function x152(): Array { return [d1, d2]; return [d1, d2]; } + function x153(): { [n: number]: Base; } { return [d1, d2]; return [d1, d2]; } + function x154(): {n: Base[]; } { return { n: [d1, d2] }; return { n: [d1, d2] }; } + function x155(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; return n => { var n: Base[]; return null; }; } + function x156(): Genric { return { func: n => { return [d1, d2]; } }; return { func: n => { return [d1, d2]; } }; } + var x157: () => () => Base[] = () => { return () => [d1, d2]; }; + var x158: () => () => Base[] = () => { return function() { return [d1, d2] }; }; + var x159: () => () => Base[] = () => { return function named() { return [d1, d2] }; }; + var x160: () => { (): Base[]; } = () => { return () => [d1, d2]; }; + var x161: () => { (): Base[]; } = () => { return function() { return [d1, d2] }; }; + var x162: () => { (): Base[]; } = () => { return function named() { return [d1, d2] }; }; + var x163: () => Base[] = () => { return [d1, d2]; }; + var x164: () => Array = () => { return [d1, d2]; }; + var x165: () => { [n: number]: Base; } = () => { return [d1, d2]; }; + var x166: () => {n: Base[]; } = () => { return { n: [d1, d2] }; }; + var x167: () => (s: Base[]) => any = () => { return n => { var n: Base[]; return null; }; }; + var x168: () => Genric = () => { return { func: n => { return [d1, d2]; } }; }; + var x169: () => () => Base[] = function() { return () => [d1, d2]; }; + var x170: () => () => Base[] = function() { return function() { return [d1, d2] }; }; + var x171: () => () => Base[] = function() { return function named() { return [d1, d2] }; }; + var x172: () => { (): Base[]; } = function() { return () => [d1, d2]; }; + var x173: () => { (): Base[]; } = function() { return function() { return [d1, d2] }; }; + var x174: () => { (): Base[]; } = function() { return function named() { return [d1, d2] }; }; + var x175: () => Base[] = function() { return [d1, d2]; }; + var x176: () => Array = function() { return [d1, d2]; }; + var x177: () => { [n: number]: Base; } = function() { return [d1, d2]; }; + var x178: () => {n: Base[]; } = function() { return { n: [d1, d2] }; }; + var x179: () => (s: Base[]) => any = function() { return n => { var n: Base[]; return null; }; }; + var x180: () => Genric = function() { return { func: n => { return [d1, d2]; } }; }; + module x181 { var t: () => Base[] = () => [d1, d2]; } + module x182 { var t: () => Base[] = function() { return [d1, d2] }; } + module x183 { var t: () => Base[] = function named() { return [d1, d2] }; } + module x184 { var t: { (): Base[]; } = () => [d1, d2]; } + module x185 { var t: { (): Base[]; } = function() { return [d1, d2] }; } + module x186 { var t: { (): Base[]; } = function named() { return [d1, d2] }; } + module x187 { var t: Base[] = [d1, d2]; } + module x188 { var t: Array = [d1, d2]; } + module x189 { var t: { [n: number]: Base; } = [d1, d2]; } + module x190 { var t: {n: Base[]; } = { n: [d1, d2] }; } + module x191 { var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } + module x192 { var t: Genric = { func: n => { return [d1, d2]; } }; } + module x193 { export var t: () => Base[] = () => [d1, d2]; } + module x194 { export var t: () => Base[] = function() { return [d1, d2] }; } + module x195 { export var t: () => Base[] = function named() { return [d1, d2] }; } + module x196 { export var t: { (): Base[]; } = () => [d1, d2]; } + module x197 { export var t: { (): Base[]; } = function() { return [d1, d2] }; } + module x198 { export var t: { (): Base[]; } = function named() { return [d1, d2] }; } + module x199 { export var t: Base[] = [d1, d2]; } + module x200 { export var t: Array = [d1, d2]; } + module x201 { export var t: { [n: number]: Base; } = [d1, d2]; } + module x202 { export var t: {n: Base[]; } = { n: [d1, d2] }; } + module x203 { export var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } + module x204 { export var t: Genric = { func: n => { return [d1, d2]; } }; } + var x206 = <() => Base[]>function() { return [d1, d2] }; + var x207 = <() => Base[]>function named() { return [d1, d2] }; + var x209 = <{ (): Base[]; }>function() { return [d1, d2] }; + var x210 = <{ (): Base[]; }>function named() { return [d1, d2] }; + var x211 = [d1, d2]; + var x212 = >[d1, d2]; + var x213 = <{ [n: number]: Base; }>[d1, d2]; + var x214 = <{n: Base[]; } >{ n: [d1, d2] }; + var x216 = >{ func: n => { return [d1, d2]; } }; + var x217 = (<() => Base[]>undefined) || function() { return [d1, d2] }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x218 = (<() => Base[]>undefined) || function named() { return [d1, d2] }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x219 = (<{ (): Base[]; }>undefined) || function() { return [d1, d2] }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x220 = (<{ (): Base[]; }>undefined) || function named() { return [d1, d2] }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x221 = (undefined) || [d1, d2]; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x222 = (>undefined) || [d1, d2]; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x223 = (<{ [n: number]: Base; }>undefined) || [d1, d2]; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x224 = (<{n: Base[]; } >undefined) || { n: [d1, d2] }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x225: () => Base[]; x225 = () => [d1, d2]; + var x226: () => Base[]; x226 = function() { return [d1, d2] }; + var x227: () => Base[]; x227 = function named() { return [d1, d2] }; + var x228: { (): Base[]; }; x228 = () => [d1, d2]; + var x229: { (): Base[]; }; x229 = function() { return [d1, d2] }; + var x230: { (): Base[]; }; x230 = function named() { return [d1, d2] }; + var x231: Base[]; x231 = [d1, d2]; + var x232: Array; x232 = [d1, d2]; + var x233: { [n: number]: Base; }; x233 = [d1, d2]; + var x234: {n: Base[]; } ; x234 = { n: [d1, d2] }; + var x235: (s: Base[]) => any; x235 = n => { var n: Base[]; return null; }; + var x236: Genric; x236 = { func: n => { return [d1, d2]; } }; + var x237: { n: () => Base[]; } = { n: () => [d1, d2] }; + var x238: { n: () => Base[]; } = { n: function() { return [d1, d2] } }; + var x239: { n: () => Base[]; } = { n: function named() { return [d1, d2] } }; + var x240: { n: { (): Base[]; }; } = { n: () => [d1, d2] }; + var x241: { n: { (): Base[]; }; } = { n: function() { return [d1, d2] } }; + var x242: { n: { (): Base[]; }; } = { n: function named() { return [d1, d2] } }; + var x243: { n: Base[]; } = { n: [d1, d2] }; + var x244: { n: Array; } = { n: [d1, d2] }; + var x245: { n: { [n: number]: Base; }; } = { n: [d1, d2] }; + var x246: { n: {n: Base[]; } ; } = { n: { n: [d1, d2] } }; + var x247: { n: (s: Base[]) => any; } = { n: n => { var n: Base[]; return null; } }; + var x248: { n: Genric; } = { n: { func: n => { return [d1, d2]; } } }; + var x252: { (): Base[]; }[] = [() => [d1, d2]]; + var x253: { (): Base[]; }[] = [function() { return [d1, d2] }]; + var x254: { (): Base[]; }[] = [function named() { return [d1, d2] }]; + var x255: Base[][] = [[d1, d2]]; + var x256: Array[] = [[d1, d2]]; + var x257: { [n: number]: Base; }[] = [[d1, d2]]; + var x258: {n: Base[]; } [] = [{ n: [d1, d2] }]; + var x260: Genric[] = [{ func: n => { return [d1, d2]; } }]; + var x261: () => Base[] = function() { return [d1, d2] } || undefined; + var x262: () => Base[] = function named() { return [d1, d2] } || undefined; + var x263: { (): Base[]; } = function() { return [d1, d2] } || undefined; + var x264: { (): Base[]; } = function named() { return [d1, d2] } || undefined; + var x265: Base[] = [d1, d2] || undefined; + var x266: Array = [d1, d2] || undefined; + var x267: { [n: number]: Base; } = [d1, d2] || undefined; + var x268: {n: Base[]; } = { n: [d1, d2] } || undefined; + var x269: () => Base[] = undefined || function() { return [d1, d2] }; + var x270: () => Base[] = undefined || function named() { return [d1, d2] }; + var x271: { (): Base[]; } = undefined || function() { return [d1, d2] }; + var x272: { (): Base[]; } = undefined || function named() { return [d1, d2] }; + var x273: Base[] = undefined || [d1, d2]; + var x274: Array = undefined || [d1, d2]; + var x275: { [n: number]: Base; } = undefined || [d1, d2]; + var x276: {n: Base[]; } = undefined || { n: [d1, d2] }; + var x277: () => Base[] = function() { return [d1, d2] } || function() { return [d1, d2] }; + var x278: () => Base[] = function named() { return [d1, d2] } || function named() { return [d1, d2] }; + var x279: { (): Base[]; } = function() { return [d1, d2] } || function() { return [d1, d2] }; + var x280: { (): Base[]; } = function named() { return [d1, d2] } || function named() { return [d1, d2] }; + var x281: Base[] = [d1, d2] || [d1, d2]; + var x282: Array = [d1, d2] || [d1, d2]; + var x283: { [n: number]: Base; } = [d1, d2] || [d1, d2]; + var x284: {n: Base[]; } = { n: [d1, d2] } || { n: [d1, d2] }; + var x285: () => Base[] = true ? () => [d1, d2] : () => [d1, d2]; + var x286: () => Base[] = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; + var x287: () => Base[] = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; + var x288: { (): Base[]; } = true ? () => [d1, d2] : () => [d1, d2]; + var x289: { (): Base[]; } = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; + var x290: { (): Base[]; } = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; + var x291: Base[] = true ? [d1, d2] : [d1, d2]; + var x292: Array = true ? [d1, d2] : [d1, d2]; + var x293: { [n: number]: Base; } = true ? [d1, d2] : [d1, d2]; + var x294: {n: Base[]; } = true ? { n: [d1, d2] } : { n: [d1, d2] }; + var x295: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : n => { var n: Base[]; return null; }; + var x296: Genric = true ? { func: n => { return [d1, d2]; } } : { func: n => { return [d1, d2]; } }; + var x297: () => Base[] = true ? undefined : () => [d1, d2]; + var x298: () => Base[] = true ? undefined : function() { return [d1, d2] }; + var x299: () => Base[] = true ? undefined : function named() { return [d1, d2] }; + var x300: { (): Base[]; } = true ? undefined : () => [d1, d2]; + var x301: { (): Base[]; } = true ? undefined : function() { return [d1, d2] }; + var x302: { (): Base[]; } = true ? undefined : function named() { return [d1, d2] }; + var x303: Base[] = true ? undefined : [d1, d2]; + var x304: Array = true ? undefined : [d1, d2]; + var x305: { [n: number]: Base; } = true ? undefined : [d1, d2]; + var x306: {n: Base[]; } = true ? undefined : { n: [d1, d2] }; + var x307: (s: Base[]) => any = true ? undefined : n => { var n: Base[]; return null; }; + var x308: Genric = true ? undefined : { func: n => { return [d1, d2]; } }; + var x309: () => Base[] = true ? () => [d1, d2] : undefined; + var x310: () => Base[] = true ? function() { return [d1, d2] } : undefined; + var x311: () => Base[] = true ? function named() { return [d1, d2] } : undefined; + var x312: { (): Base[]; } = true ? () => [d1, d2] : undefined; + var x313: { (): Base[]; } = true ? function() { return [d1, d2] } : undefined; + var x314: { (): Base[]; } = true ? function named() { return [d1, d2] } : undefined; + var x315: Base[] = true ? [d1, d2] : undefined; + var x316: Array = true ? [d1, d2] : undefined; + var x317: { [n: number]: Base; } = true ? [d1, d2] : undefined; + var x318: {n: Base[]; } = true ? { n: [d1, d2] } : undefined; + var x319: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : undefined; + var x320: Genric = true ? { func: n => { return [d1, d2]; } } : undefined; + function x321(n: () => Base[]) { }; x321(() => [d1, d2]); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x322(n: () => Base[]) { }; x322(function() { return [d1, d2] }); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x323(n: () => Base[]) { }; x323(function named() { return [d1, d2] }); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x324(n: { (): Base[]; }) { }; x324(() => [d1, d2]); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x325(n: { (): Base[]; }) { }; x325(function() { return [d1, d2] }); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x326(n: { (): Base[]; }) { }; x326(function named() { return [d1, d2] }); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x327(n: Base[]) { }; x327([d1, d2]); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x328(n: Array) { }; x328([d1, d2]); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x329(n: { [n: number]: Base; }) { }; x329([d1, d2]); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x330(n: {n: Base[]; } ) { }; x330({ n: [d1, d2] }); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x331(n: (s: Base[]) => any) { }; x331(n => { var n: Base[]; return null; }); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x332(n: Genric) { }; x332({ func: n => { return [d1, d2]; } }); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x333 = (n: () => Base[]) => n; x333(() => [d1, d2]); + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x334 = (n: () => Base[]) => n; x334(function() { return [d1, d2] }); + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x335 = (n: () => Base[]) => n; x335(function named() { return [d1, d2] }); + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x336 = (n: { (): Base[]; }) => n; x336(() => [d1, d2]); + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x337 = (n: { (): Base[]; }) => n; x337(function() { return [d1, d2] }); + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x338 = (n: { (): Base[]; }) => n; x338(function named() { return [d1, d2] }); + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x339 = (n: Base[]) => n; x339([d1, d2]); + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x340 = (n: Array) => n; x340([d1, d2]); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x342 = (n: {n: Base[]; } ) => n; x342({ n: [d1, d2] }); + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x343 = (n: (s: Base[]) => any) => n; x343(n => { var n: Base[]; return null; }); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x344 = (n: Genric) => n; x344({ func: n => { return [d1, d2]; } }); + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x345 = function(n: () => Base[]) { }; x345(() => [d1, d2]); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x346 = function(n: () => Base[]) { }; x346(function() { return [d1, d2] }); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x347 = function(n: () => Base[]) { }; x347(function named() { return [d1, d2] }); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x348 = function(n: { (): Base[]; }) { }; x348(() => [d1, d2]); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x349 = function(n: { (): Base[]; }) { }; x349(function() { return [d1, d2] }); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x350 = function(n: { (): Base[]; }) { }; x350(function named() { return [d1, d2] }); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x351 = function(n: Base[]) { }; x351([d1, d2]); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x352 = function(n: Array) { }; x352([d1, d2]); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x354 = function(n: {n: Base[]; } ) { }; x354({ n: [d1, d2] }); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; return null; }); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument.d.ts new file mode 100644 index 0000000000000..43f8c0ecf4872 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument.d.ts @@ -0,0 +1,205 @@ +//// [tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts] //// + +//// [genericTypeReferenceWithoutTypeArgument.ts] +// it is an error to use a generic type without type arguments +// all of these are errors + +class C { + foo: T; +} + +var c: C; + +var a: { x: C }; +var b: { (x: C): C }; +var d: { [x: C]: C }; + +var e = (x: C) => { var y: C; return y; } + +function f(x: C): C { var y: C; return y; } + +var g = function f(x: C): C { var y: C; return y; } + +class D extends C { +} + +interface I extends C {} + +module M { + export class E { foo: T } +} + +class D2 extends M.E { } +class D3 { } +interface I2 extends M.E { } + +function h(x: T) { } +function i(x: T) { } + +var j = null; +var k = null; + +/// [Declarations] //// + + + +//// [genericTypeReferenceWithoutTypeArgument.d.ts] +declare class C { + foo: T; +} +declare var c: C; +declare var a: { + x: C; +}; +declare var b: { + (x: C): C; +}; +declare var d: { + [x: C]: C; +}; +declare var e: (x: C) => invalid; +declare function f(x: C): C; +declare var g: (x: C) => C; +declare class D extends C { +} +interface I extends C { +} +declare namespace M { + class E { + foo: T; + } +} +declare class D2 extends M.E { +} +declare class D3 { +} +interface I2 extends M.E { +} +declare function h(x: T): invalid; +declare function i(x: T): invalid; +declare var j: C; +declare var k: M.E; + +/// [Errors] //// + +genericTypeReferenceWithoutTypeArgument.ts(8,8): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(10,13): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(11,14): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(11,18): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(12,11): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. +genericTypeReferenceWithoutTypeArgument.ts(12,14): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(12,18): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument.ts(14,13): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(14,28): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(16,15): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(16,19): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(16,30): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(18,23): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(18,27): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(18,38): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(20,17): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(23,21): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(29,18): error TS2314: Generic type 'E' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(30,20): error TS2314: Generic type 'E' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(31,22): error TS2314: Generic type 'E' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(33,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument.ts(33,22): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument.ts(34,22): error TS2314: Generic type 'E' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(36,10): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(37,10): error TS2314: Generic type 'E' requires 1 type argument(s). + + +==== genericTypeReferenceWithoutTypeArgument.ts (27 errors) ==== + // it is an error to use a generic type without type arguments + // all of these are errors + + class C { + foo: T; + } + + var c: C; + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + + var a: { x: C }; + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + var b: { (x: C): C }; + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + var d: { [x: C]: C }; + ~ +!!! error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + + var e = (x: C) => { var y: C; return y; } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + + function f(x: C): C { var y: C; return y; } + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + + var g = function f(x: C): C { var y: C; return y; } + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + + class D extends C { + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + } + + interface I extends C {} + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + + module M { + export class E { foo: T } + } + + class D2 extends M.E { } + ~~~ +!!! error TS2314: Generic type 'E' requires 1 type argument(s). + class D3 { } + ~~~ +!!! error TS2314: Generic type 'E' requires 1 type argument(s). + interface I2 extends M.E { } + ~~~ +!!! error TS2314: Generic type 'E' requires 1 type argument(s). + + function h(x: T) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + function i(x: T) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS2314: Generic type 'E' requires 1 type argument(s). + + var j = null; + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + var k = null; + ~~~ +!!! error TS2314: Generic type 'E' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument2.d.ts new file mode 100644 index 0000000000000..07cdc424ba21a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument2.d.ts @@ -0,0 +1,214 @@ +//// [tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts] //// + +//// [genericTypeReferenceWithoutTypeArgument2.ts] +// it is an error to use a generic type without type arguments +// all of these are errors + +interface I { + foo: T; +} + +var c: I; + +var a: { x: I }; +var b: { (x: I): I }; +var d: { [x: I]: I }; + +var e = (x: I) => { var y: I; return y; } + +function f(x: I): I { var y: I; return y; } + +var g = function f(x: I): I { var y: I; return y; } + +class D extends I { +} + +interface U extends I {} + +module M { + export interface E { foo: T } +} + +class D2 extends M.C { } +interface D3 { } +interface I2 extends M.C { } + +function h(x: T) { } +function i(x: T) { } + +var j = null; +var k = null; + +/// [Declarations] //// + + + +//// [genericTypeReferenceWithoutTypeArgument2.d.ts] +interface I { + foo: T; +} +declare var c: I; +declare var a: { + x: I; +}; +declare var b: { + (x: I): I; +}; +declare var d: { + [x: I]: I; +}; +declare var e: (x: I) => invalid; +declare function f(x: I): I; +declare var g: (x: I) => I; +declare class D extends I { +} +interface U extends I { +} +declare namespace M { + interface E { + foo: T; + } +} +declare class D2 extends M.C { +} +interface D3 { +} +interface I2 extends M.C { +} +declare function h(x: T): invalid; +declare function i(x: T): invalid; +declare var j: C; +declare var k: M.E; + +/// [Errors] //// + +genericTypeReferenceWithoutTypeArgument2.ts(8,8): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(10,13): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(11,14): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(11,18): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(12,11): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. +genericTypeReferenceWithoutTypeArgument2.ts(12,14): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(12,18): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument2.ts(14,13): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(14,28): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(16,15): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(16,19): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(16,30): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(18,23): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(18,27): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(18,38): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(20,17): error TS2689: Cannot extend an interface 'I'. Did you mean 'implements'? +genericTypeReferenceWithoutTypeArgument2.ts(20,17): error TS4020: 'extends' clause of exported class 'D' has or is using private name 'I'. +genericTypeReferenceWithoutTypeArgument2.ts(23,21): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(29,18): error TS2708: Cannot use namespace 'M' as a value. +genericTypeReferenceWithoutTypeArgument2.ts(29,18): error TS4020: 'extends' clause of exported class 'D2' has or is using private name 'M'. +genericTypeReferenceWithoutTypeArgument2.ts(30,24): error TS2314: Generic type 'E' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(31,24): error TS2694: Namespace 'M' has no exported member 'C'. +genericTypeReferenceWithoutTypeArgument2.ts(33,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument2.ts(33,22): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument2.ts(34,22): error TS2314: Generic type 'E' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(36,10): error TS2304: Cannot find name 'C'. +genericTypeReferenceWithoutTypeArgument2.ts(36,10): error TS4025: Exported variable 'j' has or is using private name 'C'. +genericTypeReferenceWithoutTypeArgument2.ts(37,10): error TS2314: Generic type 'E' requires 1 type argument(s). + + +==== genericTypeReferenceWithoutTypeArgument2.ts (30 errors) ==== + // it is an error to use a generic type without type arguments + // all of these are errors + + interface I { + foo: T; + } + + var c: I; + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + + var a: { x: I }; + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + var b: { (x: I): I }; + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + var d: { [x: I]: I }; + ~ +!!! error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + + var e = (x: I) => { var y: I; return y; } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + + function f(x: I): I { var y: I; return y; } + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + + var g = function f(x: I): I { var y: I; return y; } + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + + class D extends I { + ~ +!!! error TS2689: Cannot extend an interface 'I'. Did you mean 'implements'? + ~ +!!! error TS4020: 'extends' clause of exported class 'D' has or is using private name 'I'. + } + + interface U extends I {} + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + + module M { + export interface E { foo: T } + } + + class D2 extends M.C { } + ~ +!!! error TS2708: Cannot use namespace 'M' as a value. + ~ +!!! error TS4020: 'extends' clause of exported class 'D2' has or is using private name 'M'. + interface D3 { } + ~~~ +!!! error TS2314: Generic type 'E' requires 1 type argument(s). + interface I2 extends M.C { } + ~ +!!! error TS2694: Namespace 'M' has no exported member 'C'. + + function h(x: T) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + function i(x: T) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS2314: Generic type 'E' requires 1 type argument(s). + + var j = null; + ~ +!!! error TS2304: Cannot find name 'C'. + ~ +!!! error TS4025: Exported variable 'j' has or is using private name 'C'. + var k = null; + ~~~ +!!! error TS2314: Generic type 'E' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/gettersAndSettersErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/gettersAndSettersErrors.d.ts new file mode 100644 index 0000000000000..c5ea3b14106ee --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/gettersAndSettersErrors.d.ts @@ -0,0 +1,80 @@ +//// [tests/cases/compiler/gettersAndSettersErrors.ts] //// + +//// [gettersAndSettersErrors.ts] +class C { + public get Foo() { return "foo";} // ok + public set Foo(foo:string) {} // ok + + public Foo = 0; // error - duplicate identifier Foo - confirmed + public get Goo(v:string):string {return null;} // error - getters must not have a parameter + public set Goo(v:string):string {} // error - setters must not specify a return type +} + +class E { + private get Baz():number { return 0; } + public set Baz(n:number) {} // error - accessors do not agree in visibility +} + + + + +/// [Declarations] //// + + + +//// [gettersAndSettersErrors.d.ts] +declare class C { + get Foo(): invalid; + set Foo(foo: string); + Foo: number; + get Goo(): string; + set Goo(v: string): string; +} +declare class E { + private get Baz(); + set Baz(n: number); +} + +/// [Errors] //// + +gettersAndSettersErrors.ts(2,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +gettersAndSettersErrors.ts(5,12): error TS2300: Duplicate identifier 'Foo'. +gettersAndSettersErrors.ts(5,12): error TS2717: Subsequent property declarations must have the same type. Property 'Foo' must be of type 'string', but here has type 'number'. +gettersAndSettersErrors.ts(6,16): error TS1054: A 'get' accessor cannot have parameters. +gettersAndSettersErrors.ts(7,16): error TS1095: A 'set' accessor cannot have a return type annotation. +gettersAndSettersErrors.ts(11,17): error TS2808: A get accessor must be at least as accessible as the setter +gettersAndSettersErrors.ts(12,16): error TS2808: A get accessor must be at least as accessible as the setter + + +==== gettersAndSettersErrors.ts (7 errors) ==== + class C { + public get Foo() { return "foo";} // ok + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public set Foo(foo:string) {} // ok + + public Foo = 0; // error - duplicate identifier Foo - confirmed + ~~~ +!!! error TS2300: Duplicate identifier 'Foo'. + ~~~ +!!! error TS2717: Subsequent property declarations must have the same type. Property 'Foo' must be of type 'string', but here has type 'number'. +!!! related TS6203 gettersAndSettersErrors.ts:2:16: 'Foo' was also declared here. + public get Goo(v:string):string {return null;} // error - getters must not have a parameter + ~~~ +!!! error TS1054: A 'get' accessor cannot have parameters. + public set Goo(v:string):string {} // error - setters must not specify a return type + ~~~ +!!! error TS1095: A 'set' accessor cannot have a return type annotation. + } + + class E { + private get Baz():number { return 0; } + ~~~ +!!! error TS2808: A get accessor must be at least as accessible as the setter + public set Baz(n:number) {} // error - accessors do not agree in visibility + ~~~ +!!! error TS2808: A get accessor must be at least as accessible as the setter + } + + + \ 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/inKeywordAndIntersection.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/inKeywordAndIntersection.d.ts new file mode 100644 index 0000000000000..aea64b9af3438 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/inKeywordAndIntersection.d.ts @@ -0,0 +1,99 @@ +//// [tests/cases/compiler/inKeywordAndIntersection.ts] //// + +//// [inKeywordAndIntersection.ts] +class A { a = 0 } +class B { b = 0 } + +function f10(obj: A & { x: string } | B) { + if (obj instanceof Object) { + obj; // A & { x: string } | B + } + else { + obj; // Error + } +} + +// Repro from #50844 + +interface InstanceOne { + one(): void +} + +interface InstanceTwo { + two(): void +} + +const instance = {} as InstanceOne | InstanceTwo + +const ClassOne = {} as { new(): InstanceOne } & { foo: true }; + +if (instance instanceof ClassOne) { + instance.one(); +} + + +/// [Declarations] //// + + + +//// [inKeywordAndIntersection.d.ts] +declare class A { + a: number; +} +declare class B { + b: number; +} +declare function f10(obj: A & { + x: string; +} | B): invalid; +interface InstanceOne { + one(): void; +} +interface InstanceTwo { + two(): void; +} +declare const instance: InstanceOne | InstanceTwo; +declare const ClassOne: { + new (): InstanceOne; +} & { + foo: true; +}; + +/// [Errors] //// + +inKeywordAndIntersection.ts(4,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== inKeywordAndIntersection.ts (1 errors) ==== + class A { a = 0 } + class B { b = 0 } + + function f10(obj: A & { x: string } | B) { + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + if (obj instanceof Object) { + obj; // A & { x: string } | B + } + else { + obj; // Error + } + } + + // Repro from #50844 + + interface InstanceOne { + one(): void + } + + interface InstanceTwo { + two(): void + } + + const instance = {} as InstanceOne | InstanceTwo + + const ClassOne = {} as { new(): InstanceOne } & { foo: true }; + + if (instance instanceof ClassOne) { + instance.one(); + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/literalTypesAndTypeAssertions.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/literalTypesAndTypeAssertions.d.ts new file mode 100644 index 0000000000000..f05d32428d4cf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/literalTypesAndTypeAssertions.d.ts @@ -0,0 +1,66 @@ +//// [tests/cases/conformance/types/literal/literalTypesAndTypeAssertions.ts] //// + +//// [literalTypesAndTypeAssertions.ts] +const obj = { + a: "foo" as "foo", + b: <"foo">"foo", + c: "foo" +}; + +let x1 = 1 as (0 | 1); +let x2 = 1; + +let { a = "foo" } = { a: "foo" }; +let { b = "foo" as "foo" } = { b: "bar" }; +let { c = "foo" } = { c: "bar" as "bar" }; +let { d = "foo" as "foo" } = { d: "bar" as "bar" }; + + +/// [Declarations] //// + + + +//// [literalTypesAndTypeAssertions.d.ts] +declare const obj: { + a: "foo"; + b: "foo"; + c: string; +}; +declare let x1: (0 | 1); +declare let x2: number; +declare let a: invalid; +declare let b: invalid; +declare let c: invalid; +declare let d: invalid; + +/// [Errors] //// + +literalTypesAndTypeAssertions.ts(10,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +literalTypesAndTypeAssertions.ts(11,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +literalTypesAndTypeAssertions.ts(12,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +literalTypesAndTypeAssertions.ts(13,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== literalTypesAndTypeAssertions.ts (4 errors) ==== + const obj = { + a: "foo" as "foo", + b: <"foo">"foo", + c: "foo" + }; + + let x1 = 1 as (0 | 1); + let x2 = 1; + + let { a = "foo" } = { a: "foo" }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + let { b = "foo" as "foo" } = { b: "bar" }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + let { c = "foo" } = { c: "bar" as "bar" }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + let { d = "foo" as "foo" } = { d: "bar" as "bar" }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ 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..051ca82fa6f4e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/namedTupleMembers.d.ts @@ -0,0 +1,207 @@ +//// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +namedTupleMembers.ts(48,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +namedTupleMembers.ts(76,44): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +namedTupleMembers.ts(77,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return null as any; + } + + + export type Iter = Func<[step: number, iterations: number]>; + + export function readSegment([length, count]: [number, number]) {} + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export const argumentsOfG = f(...getArgsForInjection(g)); // captured arguments list re-spread + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/noUncheckedIndexedAccess.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/noUncheckedIndexedAccess.d.ts new file mode 100644 index 0000000000000..f874b61a2f87d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/noUncheckedIndexedAccess.d.ts @@ -0,0 +1,416 @@ +//// [tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts] //// + +//// [noUncheckedIndexedAccess.ts] +type CheckBooleanOnly = any; +// Validate CheckBooleanOnly works - should error +type T_ERR1 = CheckBooleanOnly; + +enum NumericEnum1 { A, B, C } +enum NumericEnum2 { A = 0, B = 1 , C = 2 } +enum StringEnum1 { A = "Alpha", B = "Beta" } + +declare const strMap: { [s: string]: boolean }; + +// All of these should be errors +const e1: boolean = strMap["foo"]; +const e2: boolean = strMap.bar; +const e3: boolean = strMap[0]; +const e4: boolean = strMap[0 as string | number]; +const e5: boolean = strMap[0 as string | 0 | 1]; +const e6: boolean = strMap[0 as 0 | 1]; +const e7: boolean = strMap["foo" as "foo" | "baz"]; +const e8: boolean = strMap[NumericEnum1.A]; +const e9: boolean = strMap[NumericEnum2.A]; +const e10: boolean = strMap[StringEnum1.A]; +const e11: boolean = strMap[StringEnum1.A as StringEnum1]; +const e12: boolean = strMap[NumericEnum1.A as NumericEnum1]; +const e13: boolean = strMap[NumericEnum2.A as NumericEnum2]; +const e14: boolean = strMap[null as any]; + +// Should be OK +const ok1: boolean | undefined = strMap["foo"]; +const ok2: boolean | undefined = strMap.bar; + +type T_OK1 = CheckBooleanOnly<(typeof strMap)[string]>; +type T_OK2 = CheckBooleanOnly<(typeof strMap)["foo"]>; +type T_OK3 = CheckBooleanOnly<(typeof strMap)["bar" | "baz"]>; +type T_OK4 = CheckBooleanOnly<(typeof strMap)[number]>; +type T_OK5 = CheckBooleanOnly<(typeof strMap)[any]>; + +// Writes don't allow 'undefined'; all should be errors +strMap["baz"] = undefined; +strMap.qua = undefined; +strMap[0] = undefined; +strMap[null as any] = undefined; + +// Numeric lookups are unaffected +declare const numMap: { [s: number]: boolean }; +// All of these should be ok +const num_ok1: boolean = numMap[0]; +const num_ok2: boolean = numMap[0 as number]; +const num_ok3: boolean = numMap[0 as 0 | 1]; +const num_ok4: boolean = numMap[NumericEnum1.A]; +const num_ok5: boolean = numMap[NumericEnum2.A]; + +// Generics +function generic1(arg: T): boolean { + // Should error + return arg["blah"]; +} +function generic2(arg: T): boolean { + // Should OK + return arg["blah"]!; +} +function generic3(arg: T): boolean { + // Should error + return strMap[arg]; +} + +// Element access into known properties is ok +declare const obj1: { x: string, y: number, [key: string]: string | number }; +obj1["x"]; +const y = "y"; +obj1[y]; +let yy = "y"; +obj1[yy]; +let z = "z"; +obj1[z]; + +// Distributivity cases +declare const strMapUnion: { [s: string]: boolean } | { [s: string]: number }; +// Should error +const f1: boolean | number = strMapUnion["foo"]; + +// Symbol index signatures +declare const s: unique symbol; +declare const symbolMap: { [s]: string }; +const e15: string = symbolMap[s]; // Should OK +symbolMap[s] = undefined; // Should error + +// Variadic tuples +declare const nonEmptyStringArray: [string, ...string[]]; +const variadicOk1: string = nonEmptyStringArray[0]; // Should OK +const variadicError1: string = nonEmptyStringArray[1]; // Should error + +// Generic index type +declare const myRecord1: { a: string; b: string }; +declare const myRecord2: { a: string; b: string, [key: string]: string }; +const fn1 = (key: Key): string => myRecord1[key]; // Should OK +const fn2 = (key: Key): string => myRecord2[key]; // Should OK +const fn3 = (key: Key) => { + myRecord2[key] = undefined; // Should error + const v: string = myRecord2[key]; // Should error +}; + + + +/// [Declarations] //// + + + +//// [noUncheckedIndexedAccess.d.ts] +type CheckBooleanOnly = any; +type T_ERR1 = CheckBooleanOnly; +declare enum NumericEnum1 { + A = 0, + B = 1, + C = 2 +} +declare enum NumericEnum2 { + A = 0, + B = 1, + C = 2 +} +declare enum StringEnum1 { + A = "Alpha", + B = "Beta" +} +declare const strMap: { + [s: string]: boolean; +}; +declare const e1: boolean; +declare const e2: boolean; +declare const e3: boolean; +declare const e4: boolean; +declare const e5: boolean; +declare const e6: boolean; +declare const e7: boolean; +declare const e8: boolean; +declare const e9: boolean; +declare const e10: boolean; +declare const e11: boolean; +declare const e12: boolean; +declare const e13: boolean; +declare const e14: boolean; +declare const ok1: boolean | undefined; +declare const ok2: boolean | undefined; +type T_OK1 = CheckBooleanOnly<(typeof strMap)[string]>; +type T_OK2 = CheckBooleanOnly<(typeof strMap)["foo"]>; +type T_OK3 = CheckBooleanOnly<(typeof strMap)["bar" | "baz"]>; +type T_OK4 = CheckBooleanOnly<(typeof strMap)[number]>; +type T_OK5 = CheckBooleanOnly<(typeof strMap)[any]>; +declare const numMap: { + [s: number]: boolean; +}; +declare const num_ok1: boolean; +declare const num_ok2: boolean; +declare const num_ok3: boolean; +declare const num_ok4: boolean; +declare const num_ok5: boolean; +declare function generic1(arg: T): boolean; +declare function generic2(arg: T): boolean; +declare function generic3(arg: T): boolean; +declare const obj1: { + x: string; + y: number; + [key: string]: string | number; +}; +declare const y = "y"; +declare let yy: string; +declare let z: string; +declare const strMapUnion: { + [s: string]: boolean; +} | { + [s: string]: number; +}; +declare const f1: boolean | number; +declare const s: unique symbol; +declare const symbolMap: { + [s]: string; +}; +declare const e15: string; +declare const nonEmptyStringArray: [string, ...string[]]; +declare const variadicOk1: string; +declare const variadicError1: string; +declare const myRecord1: { + a: string; + b: string; +}; +declare const myRecord2: { + a: string; + b: string; + [key: string]: string; +}; +declare const fn1: (key: Key) => string; +declare const fn2: (key: Key) => string; +declare const fn3: (key: Key) => invalid; + +/// [Errors] //// + +noUncheckedIndexedAccess.ts(3,32): error TS2344: Type 'boolean | undefined' does not satisfy the constraint 'boolean'. + Type 'undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(12,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + Type 'undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(13,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(14,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(15,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(16,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(17,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(18,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(19,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(20,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(21,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(22,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(23,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(24,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(25,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(38,1): error TS2322: Type 'undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(39,1): error TS2322: Type 'undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(40,1): error TS2322: Type 'undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(41,1): error TS2322: Type 'undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(46,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(47,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(48,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(49,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(50,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(55,5): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(63,5): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(79,7): error TS2322: Type 'number | boolean | undefined' is not assignable to type 'number | boolean'. + Type 'undefined' is not assignable to type 'number | boolean'. +noUncheckedIndexedAccess.ts(85,1): error TS2322: Type 'undefined' is not assignable to type 'string'. +noUncheckedIndexedAccess.ts(90,7): error TS2322: Type 'string | undefined' is not assignable to type 'string'. + Type 'undefined' is not assignable to type 'string'. +noUncheckedIndexedAccess.ts(97,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +noUncheckedIndexedAccess.ts(98,5): error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. + Type 'undefined' is not assignable to type 'string'. +noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'string | undefined' is not assignable to type 'string'. + Type 'undefined' is not assignable to type 'string'. + + +==== noUncheckedIndexedAccess.ts (32 errors) ==== + type CheckBooleanOnly = any; + // Validate CheckBooleanOnly works - should error + type T_ERR1 = CheckBooleanOnly; + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2344: Type 'boolean | undefined' does not satisfy the constraint 'boolean'. +!!! error TS2344: Type 'undefined' is not assignable to type 'boolean'. + + enum NumericEnum1 { A, B, C } + enum NumericEnum2 { A = 0, B = 1 , C = 2 } + enum StringEnum1 { A = "Alpha", B = "Beta" } + + declare const strMap: { [s: string]: boolean }; + + // All of these should be errors + const e1: boolean = strMap["foo"]; + ~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. + const e2: boolean = strMap.bar; + ~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e3: boolean = strMap[0]; + ~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e4: boolean = strMap[0 as string | number]; + ~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e5: boolean = strMap[0 as string | 0 | 1]; + ~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e6: boolean = strMap[0 as 0 | 1]; + ~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e7: boolean = strMap["foo" as "foo" | "baz"]; + ~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e8: boolean = strMap[NumericEnum1.A]; + ~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e9: boolean = strMap[NumericEnum2.A]; + ~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e10: boolean = strMap[StringEnum1.A]; + ~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e11: boolean = strMap[StringEnum1.A as StringEnum1]; + ~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e12: boolean = strMap[NumericEnum1.A as NumericEnum1]; + ~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e13: boolean = strMap[NumericEnum2.A as NumericEnum2]; + ~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e14: boolean = strMap[null as any]; + ~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + + // Should be OK + const ok1: boolean | undefined = strMap["foo"]; + const ok2: boolean | undefined = strMap.bar; + + type T_OK1 = CheckBooleanOnly<(typeof strMap)[string]>; + type T_OK2 = CheckBooleanOnly<(typeof strMap)["foo"]>; + type T_OK3 = CheckBooleanOnly<(typeof strMap)["bar" | "baz"]>; + type T_OK4 = CheckBooleanOnly<(typeof strMap)[number]>; + type T_OK5 = CheckBooleanOnly<(typeof strMap)[any]>; + + // Writes don't allow 'undefined'; all should be errors + strMap["baz"] = undefined; + ~~~~~~~~~~~~~ +!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. + strMap.qua = undefined; + ~~~~~~~~~~ +!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. + strMap[0] = undefined; + ~~~~~~~~~ +!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. + strMap[null as any] = undefined; + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. + + // Numeric lookups are unaffected + declare const numMap: { [s: number]: boolean }; + // All of these should be ok + const num_ok1: boolean = numMap[0]; + ~~~~~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const num_ok2: boolean = numMap[0 as number]; + ~~~~~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const num_ok3: boolean = numMap[0 as 0 | 1]; + ~~~~~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const num_ok4: boolean = numMap[NumericEnum1.A]; + ~~~~~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const num_ok5: boolean = numMap[NumericEnum2.A]; + ~~~~~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + + // Generics + function generic1(arg: T): boolean { + // Should error + return arg["blah"]; + ~~~~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + } + function generic2(arg: T): boolean { + // Should OK + return arg["blah"]!; + } + function generic3(arg: T): boolean { + // Should error + return strMap[arg]; + ~~~~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + } + + // Element access into known properties is ok + declare const obj1: { x: string, y: number, [key: string]: string | number }; + obj1["x"]; + const y = "y"; + obj1[y]; + let yy = "y"; + obj1[yy]; + let z = "z"; + obj1[z]; + + // Distributivity cases + declare const strMapUnion: { [s: string]: boolean } | { [s: string]: number }; + // Should error + const f1: boolean | number = strMapUnion["foo"]; + ~~ +!!! error TS2322: Type 'number | boolean | undefined' is not assignable to type 'number | boolean'. +!!! error TS2322: Type 'undefined' is not assignable to type 'number | boolean'. + + // Symbol index signatures + declare const s: unique symbol; + declare const symbolMap: { [s]: string }; + const e15: string = symbolMap[s]; // Should OK + symbolMap[s] = undefined; // Should error + ~~~~~~~~~~~~ +!!! error TS2322: Type 'undefined' is not assignable to type 'string'. + + // Variadic tuples + declare const nonEmptyStringArray: [string, ...string[]]; + const variadicOk1: string = nonEmptyStringArray[0]; // Should OK + const variadicError1: string = nonEmptyStringArray[1]; // Should error + ~~~~~~~~~~~~~~ +!!! error TS2322: Type 'string | undefined' is not assignable to type 'string'. +!!! error TS2322: Type 'undefined' is not assignable to type 'string'. + + // Generic index type + declare const myRecord1: { a: string; b: string }; + declare const myRecord2: { a: string; b: string, [key: string]: string }; + const fn1 = (key: Key): string => myRecord1[key]; // Should OK + const fn2 = (key: Key): string => myRecord2[key]; // Should OK + const fn3 = (key: Key) => { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + myRecord2[key] = undefined; // Should error + ~~~~~~~~~~~~~~ +!!! error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. +!!! error TS2322: Type 'undefined' is not assignable to type 'string'. + const v: string = myRecord2[key]; // Should error + ~ +!!! error TS2322: Type 'string | undefined' is not assignable to type 'string'. +!!! error TS2322: Type 'undefined' is not assignable to type 'string'. + }; + + \ 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..16791b5b055b6 --- /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); + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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..16791b5b055b6 --- /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); + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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..6dee46aa4aa14 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=node16).d.ts @@ -0,0 +1,447 @@ +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmitErrors.ts] //// + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} + +//// [/node_modules/pkg/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/other4.ts(9,58): error TS1005: ',' expected. +/other4.ts(9,59): error TS1134: Variable declaration expected. +/other4.ts(9,60): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/other4.ts(10,58): error TS1005: ',' expected. +/other4.ts(10,59): error TS1134: Variable declaration expected. +/other4.ts(10,60): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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..6dee46aa4aa14 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=nodenext).d.ts @@ -0,0 +1,447 @@ +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmitErrors.ts] //// + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} + +//// [/node_modules/pkg/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/other4.ts(9,58): error TS1005: ',' expected. +/other4.ts(9,59): error TS1134: Variable declaration expected. +/other4.ts(9,60): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/other4.ts(10,58): error TS1005: ',' expected. +/other4.ts(10,59): error TS1134: Variable declaration expected. +/other4.ts(10,60): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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..a2ec4da866f7e --- /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); + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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..a2ec4da866f7e --- /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); + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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..0a3530d800564 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).d.ts @@ -0,0 +1,435 @@ +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts] //// + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/other4.ts(9,56): error TS1005: ',' expected. +/other4.ts(9,57): error TS1134: Variable declaration expected. +/other4.ts(9,58): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/other4.ts(10,56): error TS1005: ',' expected. +/other4.ts(10,57): error TS1134: Variable declaration expected. +/other4.ts(10,58): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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..0a3530d800564 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/nodeModulesImportTypeModeDeclarationEmitErrors1(module=nodenext).d.ts @@ -0,0 +1,435 @@ +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts] //// + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/other4.ts(9,56): error TS1005: ',' expected. +/other4.ts(9,57): error TS1134: Variable declaration expected. +/other4.ts(9,58): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/other4.ts(10,56): error TS1005: ',' expected. +/other4.ts(10,57): error TS1134: Variable declaration expected. +/other4.ts(10,58): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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/objectLiteralEnumPropertyNames.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralEnumPropertyNames.d.ts new file mode 100644 index 0000000000000..cbdd97311130a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralEnumPropertyNames.d.ts @@ -0,0 +1,102 @@ +//// [tests/cases/compiler/objectLiteralEnumPropertyNames.ts] //// + +//// [objectLiteralEnumPropertyNames.ts] +// Fixes #16887 +enum Strs { + A = 'a', + B = 'b' +} +type TestStrs = { [key in Strs]: string } +const x: TestStrs = { + [Strs.A]: 'xo', + [Strs.B]: 'xe' +} +const ux = { + [Strs.A]: 'xo', + [Strs.B]: 'xe' +} +const y: TestStrs = { + ['a']: 'yo', + ['b']: 'ye' +} +const a = 'a'; +const b = 'b'; +const z: TestStrs = { + [a]: 'zo', + [b]: 'ze' +} +const uz = { + [a]: 'zo', + [b]: 'ze' +} + +enum Nums { + A, + B +} +type TestNums = { 0: number, 1: number } +const n: TestNums = { + [Nums.A]: 1, + [Nums.B]: 2 +} +const un = { + [Nums.A]: 3, + [Nums.B]: 4 +} +const an = 0; +const bn = 1; +const m: TestNums = { + [an]: 5, + [bn]: 6 +} +const um = { + [an]: 7, + [bn]: 8 +} + + +/// [Declarations] //// + + + +//// [objectLiteralEnumPropertyNames.d.ts] +declare enum Strs { + A = "a", + B = "b" +} +type TestStrs = { + [key in Strs]: string; +}; +declare const x: TestStrs; +declare const ux: { + [Strs.A]: string; + [Strs.B]: string; +}; +declare const y: TestStrs; +declare const a = "a"; +declare const b = "b"; +declare const z: TestStrs; +declare const uz: { + [a]: string; + [b]: string; +}; +declare enum Nums { + A = 0, + B = 1 +} +type TestNums = { + 0: number; + 1: number; +}; +declare const n: TestNums; +declare const un: { + [Nums.A]: number; + [Nums.B]: number; +}; +declare const an = 0; +declare const bn = 1; +declare const m: TestNums; +declare const um: { + [an]: number; + [bn]: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralGettersAndSetters.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralGettersAndSetters.d.ts new file mode 100644 index 0000000000000..2009b95e65590 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralGettersAndSetters.d.ts @@ -0,0 +1,287 @@ +//// [tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts] //// + +//// [objectLiteralGettersAndSetters.ts] +// Get and set accessor with the same name +var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; +var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } }; +var sameName3a = { get 0x20() { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; +var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p: string; } }; +var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p: string; } }; +var sameName6a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; + +// PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} +var callSig1 = { num(n: number) { return '' } }; +var callSig1: { num: (n: number) => string; }; +var callSig2 = { num: function (n: number) { return '' } }; +var callSig2: { num: (n: number) => string; }; +var callSig3 = { num: (n: number) => '' }; +var callSig3: { num: (n: number) => string; }; + +// Get accessor only, type of the property is the annotated return type of the get accessor +var getter1 = { get x(): string { return undefined; } }; +var getter1: { readonly x: string; } + +// Get accessor only, type of the property is the inferred return type of the get accessor +var getter2 = { get x() { return ''; } }; +var getter2: { readonly x: string; } + +// Set accessor only, type of the property is the param type of the set accessor +var setter1 = { set x(n: number) { } }; +var setter1: { x: number }; + +// Set accessor only, type of the property is Any for an unannotated set accessor +var setter2 = { set x(n) { } }; +var setter2: { x: any }; + +var anyVar: any; +// Get and set accessor with matching type annotations +var sameType1 = { get x(): string { return undefined; }, set x(n: string) { } }; +var sameType2 = { get x(): Array { return undefined; }, set x(n: number[]) { } }; +var sameType3 = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; +var sameType4 = { get x(): Date { return undefined; }, set x(n: Date) { } }; + +// Type of unannotated get accessor return type is the type annotation of the set accessor param +var setParamType1 = { + set n(x: (t: string) => void) { }, + get n() { return (t) => { + var p: string; + var p = t; + } + } +}; +var setParamType2 = { + get n() { return (t) => { + var p: string; + var p = t; + } + }, + set n(x: (t: string) => void) { } +}; + +// Type of unannotated set accessor parameter is the return type annotation of the get accessor +var getParamType1 = { + set n(x) { + var y = x; + var y: string; + }, + get n() { return ''; } +}; +var getParamType2 = { + get n() { return ''; }, + set n(x) { + var y = x; + var y: string; + } +}; + +// Type of unannotated accessors is the inferred return type of the get accessor +var getParamType3 = { + get n() { return ''; }, + set n(x) { + var y = x; + var y: string; + } +}; + + + +/// [Declarations] //// + + + +//// [objectLiteralGettersAndSetters.d.ts] +declare var sameName1a: invalid; +declare var sameName2a: invalid; +declare var sameName3a: invalid; +declare var sameName4a: invalid; +declare var sameName5a: invalid; +declare var sameName6a: invalid; +declare var callSig1: invalid; +declare var callSig1: { + num: (n: number) => string; +}; +declare var callSig2: invalid; +declare var callSig2: { + num: (n: number) => string; +}; +declare var callSig3: invalid; +declare var callSig3: { + num: (n: number) => string; +}; +declare var getter1: { + readonly x: string; +}; +declare var getter1: { + readonly x: string; +}; +declare var getter2: invalid; +declare var getter2: { + readonly x: string; +}; +declare var setter1: { + x: number; +}; +declare var setter1: { + x: number; +}; +declare var setter2: invalid; +declare var setter2: { + x: any; +}; +declare var anyVar: any; +declare var sameType1: { + get x(): string; + set x(n: string); +}; +declare var sameType2: { + get x(): Array; + set x(n: number[]); +}; +declare var sameType3: { + get x(): any; + set x(n: typeof anyVar); +}; +declare var sameType4: { + get x(): Date; + set x(n: Date); +}; +declare var setParamType1: { + n: (t: string) => void; +}; +declare var setParamType2: { + n: (t: string) => void; +}; +declare var getParamType1: invalid; +declare var getParamType2: invalid; +declare var getParamType3: invalid; + +/// [Errors] //// + +objectLiteralGettersAndSetters.ts(2,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(3,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(4,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(5,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(6,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(7,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(10,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(12,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(14,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(22,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(30,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(60,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(67,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(76,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== objectLiteralGettersAndSetters.ts (14 errors) ==== + // Get and set accessor with the same name + var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var sameName3a = { get 0x20() { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p: string; } }; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p: string; } }; + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var sameName6a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} + var callSig1 = { num(n: number) { return '' } }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var callSig1: { num: (n: number) => string; }; + var callSig2 = { num: function (n: number) { return '' } }; + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var callSig2: { num: (n: number) => string; }; + var callSig3 = { num: (n: number) => '' }; + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var callSig3: { num: (n: number) => string; }; + + // Get accessor only, type of the property is the annotated return type of the get accessor + var getter1 = { get x(): string { return undefined; } }; + var getter1: { readonly x: string; } + + // Get accessor only, type of the property is the inferred return type of the get accessor + var getter2 = { get x() { return ''; } }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var getter2: { readonly x: string; } + + // Set accessor only, type of the property is the param type of the set accessor + var setter1 = { set x(n: number) { } }; + var setter1: { x: number }; + + // Set accessor only, type of the property is Any for an unannotated set accessor + var setter2 = { set x(n) { } }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var setter2: { x: any }; + + var anyVar: any; + // Get and set accessor with matching type annotations + var sameType1 = { get x(): string { return undefined; }, set x(n: string) { } }; + var sameType2 = { get x(): Array { return undefined; }, set x(n: number[]) { } }; + var sameType3 = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; + var sameType4 = { get x(): Date { return undefined; }, set x(n: Date) { } }; + + // Type of unannotated get accessor return type is the type annotation of the set accessor param + var setParamType1 = { + set n(x: (t: string) => void) { }, + get n() { return (t) => { + var p: string; + var p = t; + } + } + }; + var setParamType2 = { + get n() { return (t) => { + var p: string; + var p = t; + } + }, + set n(x: (t: string) => void) { } + }; + + // Type of unannotated set accessor parameter is the return type annotation of the get accessor + var getParamType1 = { + set n(x) { + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var y = x; + var y: string; + }, + get n() { return ''; } + }; + var getParamType2 = { + get n() { return ''; }, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set n(x) { + var y = x; + var y: string; + } + }; + + // Type of unannotated accessors is the inferred return type of the get accessor + var getParamType3 = { + get n() { return ''; }, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set n(x) { + var y = x; + var y: string; + } + }; + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/optionalChainingInference.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/optionalChainingInference.d.ts new file mode 100644 index 0000000000000..805d807c790c4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/optionalChainingInference.d.ts @@ -0,0 +1,128 @@ +//// [tests/cases/conformance/expressions/optionalChaining/optionalChainingInference.ts] //// + +//// [optionalChainingInference.ts] +// https://github.com/microsoft/TypeScript/issues/34579 +declare function unbox(box: { value: T | undefined }): T; +declare const su: string | undefined; +declare const fnu: (() => number) | undefined; +declare const osu: { prop: string } | undefined; +declare const ofnu: { prop: () => number } | undefined; + +const b1 = { value: su?.length }; +const v1: number = unbox(b1); + +const b2 = { value: su?.length as number | undefined }; +const v2: number = unbox(b2); + +const b3: { value: number | undefined } = { value: su?.length }; +const v3: number = unbox(b3); + +const b4 = { value: fnu?.() }; +const v4: number = unbox(b4); + +const b5 = { value: su?.["length"] }; +const v5: number = unbox(b5); + +const b6 = { value: osu?.prop.length }; +const v6: number = unbox(b6); + +const b7 = { value: osu?.prop["length"] }; +const v7: number = unbox(b7); + +const b8 = { value: ofnu?.prop() }; +const v8: number = unbox(b8); + + + +/// [Declarations] //// + + + +//// [optionalChainingInference.d.ts] +declare function unbox(box: { + value: T | undefined; +}): T; +declare const su: string | undefined; +declare const fnu: (() => number) | undefined; +declare const osu: { + prop: string; +} | undefined; +declare const ofnu: { + prop: () => number; +} | undefined; +declare const b1: invalid; +declare const v1: number; +declare const b2: { + value: number | undefined; +}; +declare const v2: number; +declare const b3: { + value: number | undefined; +}; +declare const v3: number; +declare const b4: invalid; +declare const v4: number; +declare const b5: invalid; +declare const v5: number; +declare const b6: invalid; +declare const v6: number; +declare const b7: invalid; +declare const v7: number; +declare const b8: invalid; +declare const v8: number; + +/// [Errors] //// + +optionalChainingInference.ts(8,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +optionalChainingInference.ts(17,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +optionalChainingInference.ts(20,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +optionalChainingInference.ts(23,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +optionalChainingInference.ts(26,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +optionalChainingInference.ts(29,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== optionalChainingInference.ts (6 errors) ==== + // https://github.com/microsoft/TypeScript/issues/34579 + declare function unbox(box: { value: T | undefined }): T; + declare const su: string | undefined; + declare const fnu: (() => number) | undefined; + declare const osu: { prop: string } | undefined; + declare const ofnu: { prop: () => number } | undefined; + + const b1 = { value: su?.length }; + ~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const v1: number = unbox(b1); + + const b2 = { value: su?.length as number | undefined }; + const v2: number = unbox(b2); + + const b3: { value: number | undefined } = { value: su?.length }; + const v3: number = unbox(b3); + + const b4 = { value: fnu?.() }; + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const v4: number = unbox(b4); + + const b5 = { value: su?.["length"] }; + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const v5: number = unbox(b5); + + const b6 = { value: osu?.prop.length }; + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const v6: number = unbox(b6); + + const b7 = { value: osu?.prop["length"] }; + ~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const v7: number = unbox(b7); + + const b8 = { value: ofnu?.prop() }; + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const v8: number = unbox(b8); + + \ No newline at end of file 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..3c0370ce1c202 --- /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); + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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..968ec9c312524 --- /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); + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} + +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} + +//// [/node_modules/pkg/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/parseInvalidNonNullableTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNonNullableTypes.d.ts new file mode 100644 index 0000000000000..76cc602703227 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNonNullableTypes.d.ts @@ -0,0 +1,127 @@ +//// [tests/cases/compiler/parseInvalidNonNullableTypes.ts] //// + +//// [parseInvalidNonNullableTypes.ts] +function f1(a: string): a is string! { + return true; +} + +function f2(a: string): a is !string { + return true; +} + +function f3(a: string!) {} +function f4(a: number!) {} + +function f5(a: !string) {} +function f6(a: !number) {} + +function f7(): string! {} +function f8(): !string {} + +const a = 1 as any!; +const b: number! = 1; + +const c = 1 as !any; +const d: !number = 1; + + +/// [Declarations] //// + + + +//// [parseInvalidNonNullableTypes.d.ts] +declare function f1(a: string): a is !string; +declare function f2(a: string): a is !string; +declare function f3(a: !string): invalid; +declare function f4(a: !number): invalid; +declare function f5(a: !string): invalid; +declare function f6(a: !number): invalid; +declare function f7(): !string; +declare function f8(): !string; +declare const a: !any; +declare const b: !number; +declare const c: !any; +declare const d: !number; + +/// [Errors] //// + +parseInvalidNonNullableTypes.ts(1,30): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? +parseInvalidNonNullableTypes.ts(5,30): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? +parseInvalidNonNullableTypes.ts(9,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNonNullableTypes.ts(9,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? +parseInvalidNonNullableTypes.ts(10,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNonNullableTypes.ts(10,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? +parseInvalidNonNullableTypes.ts(12,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNonNullableTypes.ts(12,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? +parseInvalidNonNullableTypes.ts(13,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNonNullableTypes.ts(13,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? +parseInvalidNonNullableTypes.ts(15,16): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. +parseInvalidNonNullableTypes.ts(15,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? +parseInvalidNonNullableTypes.ts(16,16): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. +parseInvalidNonNullableTypes.ts(16,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? +parseInvalidNonNullableTypes.ts(18,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'any'? +parseInvalidNonNullableTypes.ts(19,10): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? +parseInvalidNonNullableTypes.ts(21,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'any'? +parseInvalidNonNullableTypes.ts(22,10): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? + + +==== parseInvalidNonNullableTypes.ts (18 errors) ==== + function f1(a: string): a is string! { + ~~~~~~~ +!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? + return true; + } + + function f2(a: string): a is !string { + ~~~~~~~ +!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? + return true; + } + + function f3(a: string!) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? + function f4(a: number!) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? + + function f5(a: !string) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? + function f6(a: !number) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? + + function f7(): string! {} + ~~~~~~~ +!!! error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. + ~~~~~~~ +!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? + function f8(): !string {} + ~~~~~~~ +!!! error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. + ~~~~~~~ +!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? + + const a = 1 as any!; + ~~~~ +!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'any'? + const b: number! = 1; + ~~~~~~~ +!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? + + const c = 1 as !any; + ~~~~ +!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'any'? + const d: !number = 1; + ~~~~~~~ +!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNullableTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNullableTypes.d.ts new file mode 100644 index 0000000000000..b20d98019af3d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNullableTypes.d.ts @@ -0,0 +1,143 @@ +//// [tests/cases/compiler/parseInvalidNullableTypes.ts] //// + +//// [parseInvalidNullableTypes.ts] +function f1(a: string): a is ?string { + return true; +} + +function f2(a: string?) {} +function f3(a: number?) {} + +function f4(a: ?string) {} +function f5(a: ?number) {} + +function f6(a: string): ?string { + return true; +} + +const a = 1 as any?; +const b: number? = 1; + +const c = 1 as ?any; +const d: ?number = 1; + +let e: unknown?; +let f: never?; +let g: void?; +let h: undefined?; + + +/// [Declarations] //// + + + +//// [parseInvalidNullableTypes.d.ts] +declare function f1(a: string): a is ?string; +declare function f2(a: ?string): invalid; +declare function f3(a: ?number): invalid; +declare function f4(a: ?string): invalid; +declare function f5(a: ?number): invalid; +declare function f6(a: string): ?string; +declare const a: ?any; +declare const b: ?number; +declare const c: ?any; +declare const d: ?number; +declare let e: ?unknown; +declare let f: ?never; +declare let g: ?void; +declare let h: ?undefined; + +/// [Errors] //// + +parseInvalidNullableTypes.ts(1,30): error TS2677: A type predicate's type must be assignable to its parameter's type. + Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +parseInvalidNullableTypes.ts(1,30): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? +parseInvalidNullableTypes.ts(5,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNullableTypes.ts(5,16): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string | undefined'? +parseInvalidNullableTypes.ts(6,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNullableTypes.ts(6,16): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? +parseInvalidNullableTypes.ts(8,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNullableTypes.ts(8,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? +parseInvalidNullableTypes.ts(9,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNullableTypes.ts(9,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? +parseInvalidNullableTypes.ts(11,25): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? +parseInvalidNullableTypes.ts(12,5): error TS2322: Type 'boolean' is not assignable to type 'string'. +parseInvalidNullableTypes.ts(15,16): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'any'? +parseInvalidNullableTypes.ts(16,10): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? +parseInvalidNullableTypes.ts(18,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'any'? +parseInvalidNullableTypes.ts(19,10): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? +parseInvalidNullableTypes.ts(21,8): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'unknown'? +parseInvalidNullableTypes.ts(22,8): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'never'? +parseInvalidNullableTypes.ts(23,8): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'void'? +parseInvalidNullableTypes.ts(24,8): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'undefined'? + + +==== parseInvalidNullableTypes.ts (20 errors) ==== + function f1(a: string): a is ?string { + ~~~~~~~ +!!! error TS2677: A type predicate's type must be assignable to its parameter's type. +!!! error TS2677: Type 'string | null' is not assignable to type 'string'. +!!! error TS2677: Type 'null' is not assignable to type 'string'. + ~~~~~~~ +!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? + return true; + } + + function f2(a: string?) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string | undefined'? + function f3(a: number?) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? + + function f4(a: ?string) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? + function f5(a: ?number) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? + + function f6(a: string): ?string { + ~~~~~~~ +!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? + return true; + ~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'string'. + } + + const a = 1 as any?; + ~~~~ +!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'any'? + const b: number? = 1; + ~~~~~~~ +!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? + + const c = 1 as ?any; + ~~~~ +!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'any'? + const d: ?number = 1; + ~~~~~~~ +!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? + + let e: unknown?; + ~~~~~~~~ +!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'unknown'? + let f: never?; + ~~~~~~ +!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'never'? + let g: void?; + ~~~~~ +!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'void'? + let h: undefined?; + ~~~~~~~~~~ +!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'undefined'? + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseTypes.d.ts new file mode 100644 index 0000000000000..2535d1a2533a8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parseTypes.d.ts @@ -0,0 +1,77 @@ +//// [tests/cases/compiler/parseTypes.ts] //// + +//// [parseTypes.ts] +var x = <() => number>null; +var y = <{(): number; }>null; +var z = <{new(): number; }>null +var w = <{[x:number]: number; }>null +function f() { return 3 }; +function g(s: string) { true }; +y=f; +y=g; +x=g; +w=g; +z=g; + + +/// [Declarations] //// + + + +//// [parseTypes.d.ts] +declare var x: () => number; +declare var y: { + (): number; +}; +declare var z: { + new (): number; +}; +declare var w: { + [x: number]: number; +}; +declare function f(): invalid; +declare function g(s: string): invalid; + +/// [Errors] //// + +parseTypes.ts(5,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseTypes.ts(6,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseTypes.ts(8,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. + Target signature provides too few arguments. Expected 1 or more, but got 0. +parseTypes.ts(9,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. + Target signature provides too few arguments. Expected 1 or more, but got 0. +parseTypes.ts(10,1): error TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }'. + Index signature for type 'number' is missing in type '(s: string) => void'. +parseTypes.ts(11,1): error TS2322: Type '(s: string) => void' is not assignable to type 'new () => number'. + Type '(s: string) => void' provides no match for the signature 'new (): number'. + + +==== parseTypes.ts (6 errors) ==== + var x = <() => number>null; + var y = <{(): number; }>null; + var z = <{new(): number; }>null + var w = <{[x:number]: number; }>null + function f() { return 3 }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function g(s: string) { true }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + y=f; + y=g; + ~ +!!! error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. +!!! error TS2322: Target signature provides too few arguments. Expected 1 or more, but got 0. + x=g; + ~ +!!! error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. +!!! error TS2322: Target signature provides too few arguments. Expected 1 or more, but got 0. + w=g; + ~ +!!! error TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }'. +!!! error TS2322: Index signature for type 'number' is missing in type '(s: string) => void'. + z=g; + ~ +!!! error TS2322: Type '(s: string) => void' is not assignable to type 'new () => number'. +!!! error TS2322: Type '(s: string) => void' provides no match for the signature 'new (): number'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/recursiveTypesWithTypeof.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/recursiveTypesWithTypeof.d.ts new file mode 100644 index 0000000000000..c6c56d2238479 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/recursiveTypesWithTypeof.d.ts @@ -0,0 +1,200 @@ +//// [tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts] //// + +//// [recursiveTypesWithTypeof.ts] +// The following are errors because of circular references +var c: typeof c; +var c: any; +var d: typeof e; +var d: any; +var e: typeof d; +var e: any; + +interface Foo { } +var f: Array; +var f: any; +var f2: Foo; +var f2: any; +var f3: Foo[]; +var f3: any; + +// None of these declarations should have any errors! +// Truly recursive types +var g: { x: typeof g; }; +var g: typeof g.x; +var h: () => typeof h; +var h = h(); +var i: (x: typeof i) => typeof x; +var i = i(i); +var j: (x: T) => T; +var j = j(j); + +// Same as h, i, j with construct signatures +var h2: new () => typeof h2; +var h2 = new h2(); +var i2: new (x: typeof i2) => typeof x; +var i2 = new i2(i2); +var j2: new (x: T) => T; +var j2 = new j2(j2); + +// Indexers +var k: { [n: number]: typeof k;[s: string]: typeof k }; +var k = k[0]; +var k = k['']; + +// Hybrid - contains type literals as well as type arguments +// These two are recursive +var hy1: { x: typeof hy1 }[]; +var hy1 = hy1[0].x; +var hy2: { x: Array }; +var hy2 = hy2.x[0]; + +interface Foo2 { } + +// This one should be an error because the first type argument is not contained inside a type literal +var hy3: Foo2; +var hy3: any; + +/// [Declarations] //// + + + +//// [recursiveTypesWithTypeof.d.ts] +declare var c: typeof c; +declare var c: any; +declare var d: typeof e; +declare var d: any; +declare var e: typeof d; +declare var e: any; +interface Foo { +} +declare var f: Array; +declare var f: any; +declare var f2: Foo; +declare var f2: any; +declare var f3: Foo[]; +declare var f3: any; +declare var g: { + x: typeof g; +}; +declare var g: typeof g.x; +declare var h: () => typeof h; +declare var h: () => typeof h; +declare var i: (x: typeof i) => typeof x; +declare var i: (x: typeof i) => typeof x; +declare var j: (x: T) => T; +declare var j: (x: T) => T; +declare var h2: new () => typeof h2; +declare var h2: new () => typeof h2; +declare var i2: new (x: typeof i2) => typeof x; +declare var i2: new (x: typeof i2) => typeof x; +declare var j2: new (x: T) => T; +declare var j2: new (x: T) => T; +declare var k: { + [n: number]: typeof k; + [s: string]: typeof k; +}; +declare var k: { + [n: number]: typeof k; + [s: string]: typeof k; +}; +declare var k: { + [n: number]: typeof k; + [s: string]: typeof k; +}; +declare var hy1: { + x: typeof hy1; +}[]; +declare var hy1: { + x: typeof hy1; +}[]; +declare var hy2: { + x: Array; +}; +declare var hy2: { + x: Array; +}; +interface Foo2 { +} +declare var hy3: Foo2; +declare var hy3: any; + +/// [Errors] //// + +recursiveTypesWithTypeof.ts(2,5): error TS2502: 'c' is referenced directly or indirectly in its own type annotation. +recursiveTypesWithTypeof.ts(4,5): error TS2502: 'd' is referenced directly or indirectly in its own type annotation. +recursiveTypesWithTypeof.ts(6,5): error TS2502: 'e' is referenced directly or indirectly in its own type annotation. +recursiveTypesWithTypeof.ts(10,5): error TS2502: 'f' is referenced directly or indirectly in its own type annotation. +recursiveTypesWithTypeof.ts(12,5): error TS2502: 'f2' is referenced directly or indirectly in its own type annotation. +recursiveTypesWithTypeof.ts(14,5): error TS2502: 'f3' is referenced directly or indirectly in its own type annotation. +recursiveTypesWithTypeof.ts(51,5): error TS2502: 'hy3' is referenced directly or indirectly in its own type annotation. + + +==== recursiveTypesWithTypeof.ts (7 errors) ==== + // The following are errors because of circular references + var c: typeof c; + ~ +!!! error TS2502: 'c' is referenced directly or indirectly in its own type annotation. + var c: any; + var d: typeof e; + ~ +!!! error TS2502: 'd' is referenced directly or indirectly in its own type annotation. + var d: any; + var e: typeof d; + ~ +!!! error TS2502: 'e' is referenced directly or indirectly in its own type annotation. + var e: any; + + interface Foo { } + var f: Array; + ~ +!!! error TS2502: 'f' is referenced directly or indirectly in its own type annotation. + var f: any; + var f2: Foo; + ~~ +!!! error TS2502: 'f2' is referenced directly or indirectly in its own type annotation. + var f2: any; + var f3: Foo[]; + ~~ +!!! error TS2502: 'f3' is referenced directly or indirectly in its own type annotation. + var f3: any; + + // None of these declarations should have any errors! + // Truly recursive types + var g: { x: typeof g; }; + var g: typeof g.x; + var h: () => typeof h; + var h = h(); + var i: (x: typeof i) => typeof x; + var i = i(i); + var j: (x: T) => T; + var j = j(j); + + // Same as h, i, j with construct signatures + var h2: new () => typeof h2; + var h2 = new h2(); + var i2: new (x: typeof i2) => typeof x; + var i2 = new i2(i2); + var j2: new (x: T) => T; + var j2 = new j2(j2); + + // Indexers + var k: { [n: number]: typeof k;[s: string]: typeof k }; + var k = k[0]; + var k = k['']; + + // Hybrid - contains type literals as well as type arguments + // These two are recursive + var hy1: { x: typeof hy1 }[]; + var hy1 = hy1[0].x; + var hy2: { x: Array }; + var hy2 = hy2.x[0]; + + interface Foo2 { } + + // This one should be an error because the first type argument is not contained inside a type literal + var hy3: Foo2; + ~~~ +!!! error TS2502: 'hy3' is referenced directly or indirectly in its own type annotation. + var hy3: any; \ 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..eb51937c8c2b7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/renamingDestructuredPropertyInFunctionType.d.ts @@ -0,0 +1,372 @@ +//// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(10,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(20,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(22,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(26,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(48,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(49,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(56,36): error TS4025: Exported variable 'obj2' has or is using private name 'string'. +renamingDestructuredPropertyInFunctionType.ts(58,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(59,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(60,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(61,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(61,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(62,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(63,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + type F7 = ({ a: string, b: number }) => typeof number; // Error + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + type F9 = ([a, b, c]) => void; // OK + ~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + type G7 = new ({ a: string, b: number }) => typeof number; // Error + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + type G9 = new ([a, b, c]) => void; // OK + ~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // Below are Error but renaming is retained in declaration emit, + // since elinding it would leave invalid syntax. + type F10 = ({ "a": string }) => void; // Error + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const f2 = function({ a: string }: O) { }; + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const f3 = ({ a: string, b, c }: O) => { }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + }; + 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const f7 = ({ a: string = "", b, c }: O) => { }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const f8 = ({ "a": string }: O) => { }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function f9 ({ 2: string }) { }; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function f10 ({ ["a"]: string }: O) { }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const f11 = ({ [2]: string }) => { }; + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // 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/stringLiteralsWithTypeAssertions01.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/stringLiteralsWithTypeAssertions01.d.ts new file mode 100644 index 0000000000000..7dae1d22499de --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/stringLiteralsWithTypeAssertions01.d.ts @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/types/literal/stringLiteralsWithTypeAssertions01.ts] //// + +//// [stringLiteralsWithTypeAssertions01.ts] +let fooOrBar: "foo" | "bar"; + +let a = "foo" as "bar"; +let b = "bar" as "foo"; +let c = fooOrBar as "foo"; +let d = fooOrBar as "bar"; +let e = fooOrBar as "baz"; +let f = "baz" as typeof fooOrBar; + +/// [Declarations] //// + + + +//// [stringLiteralsWithTypeAssertions01.d.ts] +declare let fooOrBar: "foo" | "bar"; +declare let a: "bar"; +declare let b: "foo"; +declare let c: "foo"; +declare let d: "bar"; +declare let e: "baz"; +declare let f: typeof fooOrBar; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/thisTypeErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/thisTypeErrors.d.ts new file mode 100644 index 0000000000000..591464e21db9b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/thisTypeErrors.d.ts @@ -0,0 +1,278 @@ +//// [tests/cases/conformance/types/thisType/thisTypeErrors.ts] //// + +//// [thisTypeErrors.ts] +var x1: this; +var x2: { a: this }; +var x3: this[]; + +function f1(x: this): this { + var y: this; + return this; +} + +interface I1 { + a: { x: this }; + b: { (): this }; + c: { new (): this }; + d: { [x: string]: this }; + e: { f(x: this): this }; +} + +class C1 { + a: { x: this }; + b: { (): this }; + c: { new (): this }; + d: { [x: string]: this }; + e: { f(x: this): this }; +} + +class C2 { + static x: this; + static y = undefined; + static foo(x: this): this { + return undefined; + } +} + +namespace N1 { + export var x: this; + export var y = this; +} + +class C3 { + x1 = { + g(x: this): this { + return undefined; + } + } + f() { + function g(x: this): this { + return undefined; + } + let x2 = { + h(x: this): this { + return undefined; + } + } + } +} + + +/// [Declarations] //// + + + +//// [thisTypeErrors.d.ts] +declare var x1: this; +declare var x2: { + a: this; +}; +declare var x3: this[]; +declare function f1(x: this): this; +interface I1 { + a: { + x: this; + }; + b: { + (): this; + }; + c: { + new (): this; + }; + d: { + [x: string]: this; + }; + e: { + f(x: this): this; + }; +} +declare class C1 { + a: { + x: this; + }; + b: { + (): this; + }; + c: { + new (): this; + }; + d: { + [x: string]: this; + }; + e: { + f(x: this): this; + }; +} +declare class C2 { + static x: this; + static y: this; + static foo(x: this): this; +} +declare namespace N1 { + var x: this; + var y: invalid; +} +declare class C3 { + x1: { + g(x: this): this; + }; + f(): invalid; +} + +/// [Errors] //// + +thisTypeErrors.ts(1,9): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(2,14): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(3,9): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(5,16): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(5,23): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(6,12): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(11,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(12,14): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(13,18): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(14,23): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(15,15): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(15,22): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(19,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(20,14): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(21,18): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(22,23): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(23,15): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(23,22): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(27,15): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(28,17): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(29,19): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(29,26): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(35,19): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(36,20): error TS2331: 'this' cannot be referenced in a module or namespace body. +thisTypeErrors.ts(36,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +thisTypeErrors.ts(41,14): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(41,21): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(45,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +thisTypeErrors.ts(46,23): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(46,30): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(50,18): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(50,25): error TS2526: A 'this' type is available only in a non-static member of a class or interface. + + +==== thisTypeErrors.ts (32 errors) ==== + var x1: this; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + var x2: { a: this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + var x3: this[]; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + + function f1(x: this): this { + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + var y: this; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + return this; + } + + interface I1 { + a: { x: this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + b: { (): this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + c: { new (): this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + d: { [x: string]: this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + e: { f(x: this): this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + } + + class C1 { + a: { x: this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + b: { (): this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + c: { new (): this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + d: { [x: string]: this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + e: { f(x: this): this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + } + + class C2 { + static x: this; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + static y = undefined; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + static foo(x: this): this { + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + return undefined; + } + } + + namespace N1 { + export var x: this; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + export var y = this; + ~~~~ +!!! error TS2331: 'this' cannot be referenced in a module or namespace body. + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + class C3 { + x1 = { + g(x: this): this { + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + return undefined; + } + } + f() { + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function g(x: this): this { + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + return undefined; + } + let x2 = { + h(x: this): this { + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + return undefined; + } + } + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/thisTypeInAccessors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/thisTypeInAccessors.d.ts new file mode 100644 index 0000000000000..2e0073367ae5e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/thisTypeInAccessors.d.ts @@ -0,0 +1,144 @@ +//// [tests/cases/conformance/types/thisType/thisTypeInAccessors.ts] //// + +//// [thisTypeInAccessors.ts] +interface Foo { + n: number; + x: number; +} + +const explicit = { + n: 12, + get x(this: Foo): number { return this.n; }, + set x(this: Foo, n: number) { this.n = n; } +} +const copiedFromGetter = { + n: 14, + get x(this: Foo): number { return this.n; }, + set x(n) { this.n = n; } +} +const copiedFromSetter = { + n: 15, + get x() { return this.n }, + set x(this: Foo, n: number) { this.n = n; } +} +const copiedFromGetterUnannotated = { + n: 16, + get x(this: Foo) { return this.n }, + set x(this, n) { this.n = n; } +} + +class Explicit { + n = 17; + get x(this: Foo): number { return this.n; } + set x(this: Foo, n: number) { this.n = n; } +} +class Contextual { + n = 21; + get x() { return this.n } // inside a class, so already correct +} + + +/// [Declarations] //// + + + +//// [thisTypeInAccessors.d.ts] +interface Foo { + n: number; + x: number; +} +declare const explicit: { + n: number; + get x(this: Foo): number; + set x(this: Foo, n: number); +}; +declare const copiedFromGetter: { + n: number; + x: number; +}; +declare const copiedFromSetter: { + n: number; + x: number; +}; +declare const copiedFromGetterUnannotated: invalid; +declare class Explicit { + n: number; + get x(this: Foo): number; + set x(this: Foo, n: Foo); +} +declare class Contextual { + n: number; + get x(): invalid; +} + +/// [Errors] //// + +thisTypeInAccessors.ts(8,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. +thisTypeInAccessors.ts(9,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. +thisTypeInAccessors.ts(13,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. +thisTypeInAccessors.ts(19,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. +thisTypeInAccessors.ts(23,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +thisTypeInAccessors.ts(23,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. +thisTypeInAccessors.ts(24,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. +thisTypeInAccessors.ts(29,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. +thisTypeInAccessors.ts(30,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. +thisTypeInAccessors.ts(34,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== thisTypeInAccessors.ts (10 errors) ==== + interface Foo { + n: number; + x: number; + } + + const explicit = { + n: 12, + get x(this: Foo): number { return this.n; }, + ~~~~~~~~~ +!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. + set x(this: Foo, n: number) { this.n = n; } + ~~~~~~~~~ +!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. + } + const copiedFromGetter = { + n: 14, + get x(this: Foo): number { return this.n; }, + ~~~~~~~~~ +!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. + set x(n) { this.n = n; } + } + const copiedFromSetter = { + n: 15, + get x() { return this.n }, + set x(this: Foo, n: number) { this.n = n; } + ~~~~~~~~~ +!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. + } + const copiedFromGetterUnannotated = { + n: 16, + get x(this: Foo) { return this.n }, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~ +!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. + set x(this, n) { this.n = n; } + ~~~~ +!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. + } + + class Explicit { + n = 17; + get x(this: Foo): number { return this.n; } + ~~~~~~~~~ +!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. + set x(this: Foo, n: number) { this.n = n; } + ~~~~~~~~~ +!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. + } + class Contextual { + n = 21; + get x() { return this.n } // inside a class, so already correct + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/accessorBodyInTypeContext.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/accessorBodyInTypeContext.d.ts new file mode 100644 index 0000000000000..3c3c662f59479 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/accessorBodyInTypeContext.d.ts @@ -0,0 +1,73 @@ +//// [tests/cases/compiler/accessorBodyInTypeContext.ts] //// + +//// [accessorBodyInTypeContext.ts] +type A = { + get foo() { return 0 } +}; + +type B = { + set foo(v: any) { } +}; + +interface X { + get foo() { return 0 } +} + +interface Y { + set foo(v: any) { } +} + + + +/// [Declarations] //// + + + +//// [accessorBodyInTypeContext.d.ts] +type A = { + get foo(): number; +}; +type B = { + set foo(v: any); +}; +interface X { + get foo(): number; +} +interface Y { + set foo(v: any); +} + +/// [Errors] //// + +accessorBodyInTypeContext.ts(2,15): error TS1183: An implementation cannot be declared in ambient contexts. +accessorBodyInTypeContext.ts(6,21): error TS1183: An implementation cannot be declared in ambient contexts. +accessorBodyInTypeContext.ts(10,15): error TS1183: An implementation cannot be declared in ambient contexts. +accessorBodyInTypeContext.ts(14,21): error TS1183: An implementation cannot be declared in ambient contexts. + + +==== accessorBodyInTypeContext.ts (4 errors) ==== + type A = { + get foo() { return 0 } + ~~~~~~~~~~~~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + }; + + type B = { + set foo(v: any) { } + ~~~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + }; + + interface X { + get foo() { return 0 } + ~~~~~~~~~~~~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + } + + interface Y { + set foo(v: any) { } + ~~~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + } + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/arrayFind.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/arrayFind.d.ts new file mode 100644 index 0000000000000..2d67be6693af0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/arrayFind.d.ts @@ -0,0 +1,45 @@ +//// [tests/cases/compiler/arrayFind.ts] //// + +//// [arrayFind.ts] +// test fix for #18112, type guard predicates should narrow returned element +function isNumber(x: any): x is number { + return typeof x === "number"; +} + +const arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true]; +const foundNumber: number | undefined = arrayOfStringsNumbersAndBooleans.find(isNumber); + +const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans as ReadonlyArray; +const readonlyFoundNumber: number | undefined = readonlyArrayOfStringsNumbersAndBooleans.find(isNumber); + + +/// [Declarations] //// + + + +//// [arrayFind.d.ts] +declare function isNumber(x: any): x is number; +declare const arrayOfStringsNumbersAndBooleans: invalid; +declare const foundNumber: number | undefined; +declare const readonlyArrayOfStringsNumbersAndBooleans: readonly (string | number | boolean)[]; +declare const readonlyFoundNumber: number | undefined; + +/// [Errors] //// + +arrayFind.ts(6,42): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== arrayFind.ts (1 errors) ==== + // test fix for #18112, type guard predicates should narrow returned element + function isNumber(x: any): x is number { + return typeof x === "number"; + } + + const arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true]; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const foundNumber: number | undefined = arrayOfStringsNumbersAndBooleans.find(isNumber); + + const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans as ReadonlyArray; + const readonlyFoundNumber: number | undefined = readonlyArrayOfStringsNumbersAndBooleans.find(isNumber); + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asOperator1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asOperator1.d.ts new file mode 100644 index 0000000000000..75443ffc89404 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/asOperator1.d.ts @@ -0,0 +1,41 @@ +//// [tests/cases/conformance/expressions/asOperator/asOperator1.ts] //// + +//// [asOperator1.ts] +var as = 43; +var x = undefined as number; +var y = (null as string).length; +var z = Date as any as string; + +// Should parse as a union type, not a bitwise 'or' of (32 as number) and 'string' +var j = 32 as number|string; +j = ''; + + +/// [Declarations] //// + + + +//// [asOperator1.d.ts] +declare var as: number; +declare var x: number; +declare var y: invalid; +declare var z: string; +declare var j: string | number; + +/// [Errors] //// + +asOperator1.ts(3,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== asOperator1.ts (1 errors) ==== + var as = 43; + var x = undefined as number; + var y = (null as string).length; + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var z = Date as any as string; + + // Should parse as a union type, not a bitwise 'or' of (32 as number) and 'string' + var j = 32 as number|string; + j = ''; + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts index b474584b3458a..2477fe81ef9ea 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts @@ -48,9 +48,7 @@ declare const typedArray: invalid; //// [b.d.ts] declare const a: {}; -declare const b: { - [1n]: number; -}; +declare const b: invalid; declare const c: invalid; /// [Errors] //// @@ -64,6 +62,7 @@ b.ts(2,12): error TS1136: Property assignment expected. b.ts(2,14): error TS1005: ';' expected. b.ts(2,19): error TS1128: Declaration or statement expected. b.ts(3,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +b.ts(3,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. b.ts(4,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -103,7 +102,7 @@ b.ts(4,12): error TS9007: Declaration emit for this file requires type resolutio typedArray[2] = 0xCC; // {1n: 123} is a syntax error; must go in separate file so BigIntIndex error is shown -==== b.ts (6 errors) ==== +==== b.ts (7 errors) ==== // BigInt cannot be used as an object literal property const a = {1n: 123}; ~~ @@ -115,6 +114,8 @@ b.ts(4,12): error TS9007: Declaration emit for this file requires type resolutio const b = {[1n]: 456}; ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. const c = {[bigNum]: 789}; ~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/booleanFilterAnyArray.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/booleanFilterAnyArray.d.ts new file mode 100644 index 0000000000000..3985251cd1662 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/booleanFilterAnyArray.d.ts @@ -0,0 +1,94 @@ +//// [tests/cases/compiler/booleanFilterAnyArray.ts] //// + +//// [booleanFilterAnyArray.ts] +interface Bullean { } +interface BulleanConstructor { + new(v1?: any): Bullean; + (v2?: T): v2 is T; +} + +interface 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; +var xs: Ari; +var xs = anys.filter(Bullean) + +declare let realanys: any[]; +var ys: any[]; +var ys = realanys.filter(Boolean) + +var foo = [{ name: 'x' }] +var foor: Array<{name: string}> +var foor = foo.filter(x => x.name) +var foos: Array +var foos = [true, true, false, null].filter((thing): thing is boolean => thing !== null) + + +/// [Declarations] //// + + + +//// [booleanFilterAnyArray.d.ts] +interface Bullean { +} +interface BulleanConstructor { + new (v1?: any): Bullean; + (v2?: T): v2 is T; +} +interface 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; +declare var xs: Ari; +declare var xs: Ari; +declare let realanys: any[]; +declare var ys: any[]; +declare var ys: any[]; +declare var foo: invalid; +declare var foor: Array<{ + name: string; +}>; +declare var foor: { + name: string; +}[]; +declare var foos: Array; +declare var foos: boolean[]; + +/// [Errors] //// + +booleanFilterAnyArray.ts(20,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== booleanFilterAnyArray.ts (1 errors) ==== + interface Bullean { } + interface BulleanConstructor { + new(v1?: any): Bullean; + (v2?: T): v2 is T; + } + + interface 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; + var xs: Ari; + var xs = anys.filter(Bullean) + + declare let realanys: any[]; + var ys: any[]; + var ys = realanys.filter(Boolean) + + var foo = [{ name: 'x' }] + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var foor: Array<{name: string}> + var foor = foo.filter(x => x.name) + var foos: Array + var foos = [true, true, false, null].filter((thing): thing is boolean => thing !== null) + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/capturedParametersInInitializers1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/capturedParametersInInitializers1.d.ts new file mode 100644 index 0000000000000..29b23979b44b6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/capturedParametersInInitializers1.d.ts @@ -0,0 +1,170 @@ +//// [tests/cases/compiler/capturedParametersInInitializers1.ts] //// + +//// [capturedParametersInInitializers1.ts] +// ok - usage is deferred +function foo1(y = class {c = x}, x = 1) { + new y().c; +} + +// ok - used in file +function foo2(y = function(x: typeof z) {}, z = 1) { + +} + +// ok -used in type +let a; +function foo3(y = { x: a }, z = 1) { + +} + +// error - used before declaration +function foo4(y = {z}, z = 1) { +} + +// error - used before declaration, IIFEs are inlined +function foo5(y = (() => z)(), z = 1) { +} + +// ok - IIFE inside another function +function foo6(y = () => (() => z)(), z = 1) { +} + +// ok - used inside immediately invoked generator function +function foo7(y = (function*() {yield z})(), z = 1) { +} + +// ok - used inside immediately invoked async function +function foo8(y = (async () => z)(), z = 1) { +} + +// error - used as computed name of method +function foo9(y = {[z]() { return z; }}, z = 1) { +} + + +/// [Declarations] //// + + + +//// [capturedParametersInInitializers1.d.ts] +declare function foo1(y?: invalid, x?: number): invalid; +declare function foo2(y?: (x: typeof z) => invalid, z?: number): invalid; +declare let a: invalid; +declare function foo3(y?: { + x: number; +}, z?: number): invalid; +declare function foo4(y?: invalid, z?: number): invalid; +declare function foo5(y?: invalid, z?: number): invalid; +declare function foo6(y?: () => invalid, z?: number): invalid; +declare function foo7(y?: invalid, z?: number): invalid; +declare function foo8(y?: invalid, z?: number): invalid; +declare function foo9(y?: invalid, z?: number): invalid; + +/// [Errors] //// + +capturedParametersInInitializers1.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(2,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(7,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(7,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(13,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(18,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(18,20): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. +capturedParametersInInitializers1.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(22,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(22,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(22,26): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. +capturedParametersInInitializers1.ts(26,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(26,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(30,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(30,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(34,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(38,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(38,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. + + +==== capturedParametersInInitializers1.ts (21 errors) ==== + // ok - usage is deferred + function foo1(y = class {c = x}, x = 1) { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + new y().c; + } + + // ok - used in file + function foo2(y = function(x: typeof z) {}, z = 1) { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + } + + // ok -used in type + let a; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function foo3(y = { x: a }, z = 1) { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + } + + // error - used before declaration + function foo4(y = {z}, z = 1) { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // error - used before declaration, IIFEs are inlined + function foo5(y = (() => z)(), z = 1) { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. + } + + // ok - IIFE inside another function + function foo6(y = () => (() => z)(), z = 1) { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // ok - used inside immediately invoked generator function + function foo7(y = (function*() {yield z})(), z = 1) { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // ok - used inside immediately invoked async function + function foo8(y = (async () => z)(), z = 1) { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + // error - used as computed name of method + function foo9(y = {[z]() { return z; }}, z = 1) { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/circularObjectLiteralAccessors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/circularObjectLiteralAccessors.d.ts new file mode 100644 index 0000000000000..63719a7708cbb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/circularObjectLiteralAccessors.d.ts @@ -0,0 +1,28 @@ +//// [tests/cases/compiler/circularObjectLiteralAccessors.ts] //// + +//// [circularObjectLiteralAccessors.ts] +// Repro from #6000 + +const a = { + b: { + get foo(): string { + return a.foo; + }, + set foo(value: string) { + a.foo = value; + } + }, + foo: '' +}; + +/// [Declarations] //// + + + +//// [circularObjectLiteralAccessors.d.ts] +declare const a: { + b: { + foo: string; + }; + foo: string; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts index 0f9d2d8865148..10da9c73d8b8d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts @@ -59,7 +59,7 @@ export const o9 = { export declare let o: invalid; declare const y: 0; export declare let o2: { - [y]: number; + 0: number; }; export declare let o3: { 1: number; @@ -79,7 +79,7 @@ declare let E: { readonly A: 1; }; export declare const o8: { - [E.A]: number; + 1: number; }; export declare const o9: invalid; export {}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames7_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames7_ES5.d.ts new file mode 100644 index 0000000000000..a6f444bd8a804 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames7_ES5.d.ts @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES5.ts] //// + +//// [computedPropertyNames7_ES5.ts] +enum E { + member +} +var v = { + [E.member]: 0 +} + +/// [Declarations] //// + + + +//// [computedPropertyNames7_ES5.d.ts] +declare enum E { + member = 0 +} +declare var v: { + 0: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames7_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames7_ES6.d.ts new file mode 100644 index 0000000000000..d48821e7999ac --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames7_ES6.d.ts @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES6.ts] //// + +//// [computedPropertyNames7_ES6.ts] +enum E { + member +} +var v = { + [E.member]: 0 +} + +/// [Declarations] //// + + + +//// [computedPropertyNames7_ES6.d.ts] +declare enum E { + member = 0 +} +declare var v: { + 0: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/contextualSignatureInstantiation.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/contextualSignatureInstantiation.d.ts new file mode 100644 index 0000000000000..ebdd4a54519ec --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/contextualSignatureInstantiation.d.ts @@ -0,0 +1,124 @@ +//// [tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts] //// + +//// [contextualSignatureInstantiation.ts] +// TypeScript Spec, section 4.12.2: +// If e is an expression of a function type that contains exactly one generic call signature and no other members, +// and T is a function type with exactly one non - generic call signature and no other members, then any inferences +// made for type parameters referenced by the parameters of T's call signature are fixed, and e's type is changed +// to a function type with e's call signature instantiated in the context of T's call signature (section 3.8.5). + +declare function foo(cb: (x: number, y: string) => T): T; +declare function bar(x: T, y: U, cb: (x: T, y: U) => V): V; +declare function baz(x: T, y: T, cb: (x: T, y: T) => U): U; + +declare function g(x: T, y: T): T; +declare function h(x: T, y: U): T[] | U[]; + +var a: number; +var a = bar(1, 1, g); // Should be number +var a = baz(1, 1, g); // Should be number + +var b: number | string; +var b = foo(g); // Error, number and string are disjoint types +var b = bar(1, "one", g); // Error, number and string are disjoint types +var b = bar("one", 1, g); // Error, number and string are disjoint types +var b = baz(b, b, g); // Should be number | string + +var d: number[] | string[]; +var d = foo(h); // Should be number[] | string[] +var d = bar(1, "one", h); // Should be number[] | string[] +var d = bar("one", 1, h); // Should be number[] | string[] +var d = baz(d, d, g); // Should be number[] | string[] + + +/// [Declarations] //// + + + +//// [contextualSignatureInstantiation.d.ts] +declare function foo(cb: (x: number, y: string) => T): T; +declare function bar(x: T, y: U, cb: (x: T, y: U) => V): V; +declare function baz(x: T, y: T, cb: (x: T, y: T) => U): U; +declare function g(x: T, y: T): T; +declare function h(x: T, y: U): T[] | U[]; +declare var a: number; +declare var a: number; +declare var a: number; +declare var b: number | string; +declare var b: string | number; +declare var b: string | number; +declare var b: string | number; +declare var b: string | number; +declare var d: number[] | string[]; +declare var d: number[] | string[]; +declare var d: number[] | string[]; +declare var d: number[] | string[]; +declare var d: number[] | string[]; + +/// [Errors] //// + +contextualSignatureInstantiation.ts(19,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. +contextualSignatureInstantiation.ts(19,13): error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. + Types of parameters 'y' and 'y' are incompatible. + Type 'string' is not assignable to type 'number'. +contextualSignatureInstantiation.ts(20,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. +contextualSignatureInstantiation.ts(20,23): error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. + Types of parameters 'y' and 'y' are incompatible. + Type 'string' is not assignable to type 'number'. +contextualSignatureInstantiation.ts(21,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. +contextualSignatureInstantiation.ts(21,23): error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: string, y: number) => string'. + Types of parameters 'y' and 'y' are incompatible. + Type 'number' is not assignable to type 'string'. + + +==== contextualSignatureInstantiation.ts (6 errors) ==== + // TypeScript Spec, section 4.12.2: + // If e is an expression of a function type that contains exactly one generic call signature and no other members, + // and T is a function type with exactly one non - generic call signature and no other members, then any inferences + // made for type parameters referenced by the parameters of T's call signature are fixed, and e's type is changed + // to a function type with e's call signature instantiated in the context of T's call signature (section 3.8.5). + + declare function foo(cb: (x: number, y: string) => T): T; + declare function bar(x: T, y: U, cb: (x: T, y: U) => V): V; + declare function baz(x: T, y: T, cb: (x: T, y: T) => U): U; + + declare function g(x: T, y: T): T; + declare function h(x: T, y: U): T[] | U[]; + + var a: number; + var a = bar(1, 1, g); // Should be number + var a = baz(1, 1, g); // Should be number + + var b: number | string; + var b = foo(g); // Error, number and string are disjoint types + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. +!!! related TS6203 contextualSignatureInstantiation.ts:18:5: 'b' was also declared here. + ~ +!!! error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. +!!! error TS2345: Types of parameters 'y' and 'y' are incompatible. +!!! error TS2345: Type 'string' is not assignable to type 'number'. + var b = bar(1, "one", g); // Error, number and string are disjoint types + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. +!!! related TS6203 contextualSignatureInstantiation.ts:18:5: 'b' was also declared here. + ~ +!!! error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. +!!! error TS2345: Types of parameters 'y' and 'y' are incompatible. +!!! error TS2345: Type 'string' is not assignable to type 'number'. + var b = bar("one", 1, g); // Error, number and string are disjoint types + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. +!!! related TS6203 contextualSignatureInstantiation.ts:18:5: 'b' was also declared here. + ~ +!!! error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: string, y: number) => string'. +!!! error TS2345: Types of parameters 'y' and 'y' are incompatible. +!!! error TS2345: Type 'number' is not assignable to type 'string'. + var b = baz(b, b, g); // Should be number | string + + var d: number[] | string[]; + var d = foo(h); // Should be number[] | string[] + var d = bar(1, "one", h); // Should be number[] | string[] + var d = bar("one", 1, h); // Should be number[] | string[] + var d = baz(d, d, g); // Should be number[] | string[] + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping.d.ts new file mode 100644 index 0000000000000..973f98b091ded --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping.d.ts @@ -0,0 +1,597 @@ +//// [tests/cases/compiler/contextualTyping.ts] //// + +//// [contextualTyping.ts] +// DEFAULT INTERFACES +interface IFoo { + n: number; + s: string; + f(i: number, s: string): string; + a: number[]; +} + +interface IBar { + foo: IFoo; +} + +// CONTEXT: Class property declaration +class C1T5 { + foo: (i: number, s: string) => number = function(i) { + return i; + } +} + +// CONTEXT: Module property declaration +module C2T5 { + export var foo: (i: number, s: string) => number = function(i) { + return i; + } +} + +// CONTEXT: Variable declaration +var c3t1: (s: string) => string = (function(s) { return s }); +var c3t2 = ({ + n: 1 +}) +var c3t3: number[] = []; +var c3t4: () => IFoo = function() { return ({}) }; +var c3t5: (n: number) => IFoo = function(n) { return ({}) }; +var c3t6: (n: number, s: string) => IFoo = function(n, s) { return ({}) }; +var c3t7: { + (n: number): number; + (s1: string): number; +} = function(n) { return n; }; + +var c3t8: (n: number, s: string) => number = function(n) { return n; }; +var c3t9: number[][] = [[],[]]; +var c3t10: IFoo[] = [({}),({})]; +var c3t11: {(n: number, s: string): string;}[] = [function(n, s) { return s; }]; +var c3t12: IBar = { + foo: ({}) +} +var c3t13 = ({ + f: function(i, s) { return s; } +}) +var c3t14 = ({ + a: [] +}) + +// CONTEXT: Class property assignment +class C4T5 { + foo: (i: number, s: string) => string; + constructor() { + this.foo = function(i, s) { + return s; + } + } +} + +// CONTEXT: Module property assignment +module C5T5 { + export var foo: (i: number, s: string) => string; + foo = function(i, s) { + return s; + } +} + +// CONTEXT: Variable assignment +var c6t5: (n: number) => IFoo; +c6t5 = <(n: number) => IFoo>function(n) { return ({}) }; + +// CONTEXT: Array index assignment +var c7t2: IFoo[]; +c7t2[0] = ({n: 1}); + +// CONTEXT: Object property assignment +interface IPlaceHolder { + t1: (s: string) => string; + t2: IFoo; + t3: number[]; + t4: () => IFoo; + t5: (n: number) => IFoo; + t6: (n: number, s: string) => IFoo; + t7: { + (n: number, s: string): number; + //(s1: string, s2: string): number; + }; + t8: (n: number, s: string) => number; + t9: number[][]; + t10: IFoo[]; + t11: {(n: number, s: string): string;}[]; + t12: IBar; + t13: IFoo; + t14: IFoo; + } + +var objc8: { + t1: (s: string) => string; + t2: IFoo; + t3: number[]; + t4: () => IFoo; + t5: (n: number) => IFoo; + t6: (n: number, s: string) => IFoo; + t7: { + (n: number, s: string): number; + //(s1: string, s2: string): number; + }; + t8: (n: number, s: string) => number; + t9: number[][]; + t10: IFoo[]; + t11: {(n: number, s: string): string;}[]; + t12: IBar; + t13: IFoo; + t14: IFoo; +} = ({}); + +objc8.t1 = (function(s) { return s }); +objc8.t2 = ({ + n: 1 +}); +objc8.t3 = []; +objc8.t4 = function() { return ({}) }; +objc8.t5 = function(n) { return ({}) }; +objc8.t6 = function(n, s) { return ({}) }; +objc8.t7 = function(n: number) { return n }; + +objc8.t8 = function(n) { return n; }; +objc8.t9 = [[],[]]; +objc8.t10 = [({}),({})]; +objc8.t11 = [function(n, s) { return s; }]; +objc8.t12 = { + foo: ({}) +} +objc8.t13 = ({ + f: function(i, s) { return s; } +}) +objc8.t14 = ({ + a: [] +}) +// CONTEXT: Function call +function c9t5(f: (n: number) => IFoo) {}; +c9t5(function(n) { + return ({}); +}); + +// CONTEXT: Return statement +var c10t5: () => (n: number) => IFoo = function() { return function(n) { return ({}) } }; + +// CONTEXT: Newing a class +class C11t5 { constructor(f: (n: number) => IFoo) { } }; +var i = new C11t5(function(n) { return ({}) }); + +// CONTEXT: Type annotated expression +var c12t1 = <(s: string) => string> (function(s) { return s }); +var c12t2 = ({ + n: 1 +}); +var c12t3 = []; +var c12t4 = <() => IFoo> function() { return ({}) }; +var c12t5 = <(n: number) => IFoo> function(n) { return ({}) }; +var c12t6 = <(n: number, s: string) => IFoo> function(n, s) { return ({}) }; +var c12t7 = <{ + (n: number, s: string): number; + //(s1: string, s2: string): number; +}> function(n:number) { return n }; + +var c12t8 = <(n: number, s: string) => number> function(n) { return n; }; +var c12t9 = [[],[]]; +var c12t10 = [({}),({})]; +var c12t11 = <{(n: number, s: string): string;}[]> [function(n, s) { return s; }]; +var c12t12 = { + foo: ({}) +} +var c12t13 = ({ + f: function(i, s) { return s; } +}) +var c12t14 = ({ + a: [] +}) + +// CONTEXT: Contextual typing declarations + +// contextually typing function declarations +declare function EF1(a:number, b:number):number; + +function EF1(a,b) { return a+b; } + +var efv = EF1(1,2); + + +// contextually typing from ambient class declarations +declare class Point +{ + constructor(x: number, y: number); + x: number; + y: number; + add(dx: number, dy: number): Point; + static origin: Point; + +} + +Point.origin = new Point(0, 0); + +Point.prototype.add = function(dx, dy) { + return new Point(this.x + dx, this.y + dy); +}; + +Point.prototype = { + x: 0, + y: 0, + add: function(dx, dy) { + return new Point(this.x + dx, this.y + dy); + } +}; + +interface A { x: string; } +interface B extends A { } +var x: B = { }; + + +/// [Declarations] //// + + + +//// [contextualTyping.d.ts] +interface IFoo { + n: number; + s: string; + f(i: number, s: string): string; + a: number[]; +} +interface IBar { + foo: IFoo; +} +declare class C1T5 { + foo: (i: number, s: string) => number; +} +declare namespace C2T5 { + var foo: (i: number, s: string) => number; +} +declare var c3t1: (s: string) => string; +declare var c3t2: IFoo; +declare var c3t3: number[]; +declare var c3t4: () => IFoo; +declare var c3t5: (n: number) => IFoo; +declare var c3t6: (n: number, s: string) => IFoo; +declare var c3t7: { + (n: number): number; + (s1: string): number; +}; +declare var c3t8: (n: number, s: string) => number; +declare var c3t9: number[][]; +declare var c3t10: IFoo[]; +declare var c3t11: { + (n: number, s: string): string; +}[]; +declare var c3t12: IBar; +declare var c3t13: IFoo; +declare var c3t14: IFoo; +declare class C4T5 { + foo: (i: number, s: string) => string; + constructor(); +} +declare namespace C5T5 { + var foo: (i: number, s: string) => string; +} +declare var c6t5: (n: number) => IFoo; +declare var c7t2: IFoo[]; +interface IPlaceHolder { + t1: (s: string) => string; + t2: IFoo; + t3: number[]; + t4: () => IFoo; + t5: (n: number) => IFoo; + t6: (n: number, s: string) => IFoo; + t7: { + (n: number, s: string): number; + }; + t8: (n: number, s: string) => number; + t9: number[][]; + t10: IFoo[]; + t11: { + (n: number, s: string): string; + }[]; + t12: IBar; + t13: IFoo; + t14: IFoo; +} +declare var objc8: { + t1: (s: string) => string; + t2: IFoo; + t3: number[]; + t4: () => IFoo; + t5: (n: number) => IFoo; + t6: (n: number, s: string) => IFoo; + t7: { + (n: number, s: string): number; + }; + t8: (n: number, s: string) => number; + t9: number[][]; + t10: IFoo[]; + t11: { + (n: number, s: string): string; + }[]; + t12: IBar; + t13: IFoo; + t14: IFoo; +}; +declare function c9t5(f: (n: number) => IFoo): invalid; +declare var c10t5: () => (n: number) => IFoo; +declare class C11t5 { + constructor(f: (n: number) => IFoo); +} +declare var i: invalid; +declare var c12t1: (s: string) => string; +declare var c12t2: IFoo; +declare var c12t3: number[]; +declare var c12t4: () => IFoo; +declare var c12t5: (n: number) => IFoo; +declare var c12t6: (n: number, s: string) => IFoo; +declare var c12t7: (n: number, s: string) => number; +declare var c12t8: (n: number, s: string) => number; +declare var c12t9: number[][]; +declare var c12t10: IFoo[]; +declare var c12t11: ((n: number, s: string) => string)[]; +declare var c12t12: IBar; +declare var c12t13: IFoo; +declare var c12t14: IFoo; +declare function EF1(a: number, b: number): number; +declare var efv: invalid; +declare class Point { + constructor(x: number, y: number); + x: number; + y: number; + add(dx: number, dy: number): Point; + static origin: Point; +} +interface A { + x: string; +} +interface B extends A { +} +declare var x: B; + +/// [Errors] //// + +contextualTyping.ts(146,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +contextualTyping.ts(156,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +contextualTyping.ts(189,18): error TS2384: Overload signatures must all be ambient or non-ambient. +contextualTyping.ts(193,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' but required in type 'B'. + + +==== contextualTyping.ts (5 errors) ==== + // DEFAULT INTERFACES + interface IFoo { + n: number; + s: string; + f(i: number, s: string): string; + a: number[]; + } + + interface IBar { + foo: IFoo; + } + + // CONTEXT: Class property declaration + class C1T5 { + foo: (i: number, s: string) => number = function(i) { + return i; + } + } + + // CONTEXT: Module property declaration + module C2T5 { + export var foo: (i: number, s: string) => number = function(i) { + return i; + } + } + + // CONTEXT: Variable declaration + var c3t1: (s: string) => string = (function(s) { return s }); + var c3t2 = ({ + n: 1 + }) + var c3t3: number[] = []; + var c3t4: () => IFoo = function() { return ({}) }; + var c3t5: (n: number) => IFoo = function(n) { return ({}) }; + var c3t6: (n: number, s: string) => IFoo = function(n, s) { return ({}) }; + var c3t7: { + (n: number): number; + (s1: string): number; + } = function(n) { return n; }; + + var c3t8: (n: number, s: string) => number = function(n) { return n; }; + var c3t9: number[][] = [[],[]]; + var c3t10: IFoo[] = [({}),({})]; + var c3t11: {(n: number, s: string): string;}[] = [function(n, s) { return s; }]; + var c3t12: IBar = { + foo: ({}) + } + var c3t13 = ({ + f: function(i, s) { return s; } + }) + var c3t14 = ({ + a: [] + }) + + // CONTEXT: Class property assignment + class C4T5 { + foo: (i: number, s: string) => string; + constructor() { + this.foo = function(i, s) { + return s; + } + } + } + + // CONTEXT: Module property assignment + module C5T5 { + export var foo: (i: number, s: string) => string; + foo = function(i, s) { + return s; + } + } + + // CONTEXT: Variable assignment + var c6t5: (n: number) => IFoo; + c6t5 = <(n: number) => IFoo>function(n) { return ({}) }; + + // CONTEXT: Array index assignment + var c7t2: IFoo[]; + c7t2[0] = ({n: 1}); + + // CONTEXT: Object property assignment + interface IPlaceHolder { + t1: (s: string) => string; + t2: IFoo; + t3: number[]; + t4: () => IFoo; + t5: (n: number) => IFoo; + t6: (n: number, s: string) => IFoo; + t7: { + (n: number, s: string): number; + //(s1: string, s2: string): number; + }; + t8: (n: number, s: string) => number; + t9: number[][]; + t10: IFoo[]; + t11: {(n: number, s: string): string;}[]; + t12: IBar; + t13: IFoo; + t14: IFoo; + } + + var objc8: { + t1: (s: string) => string; + t2: IFoo; + t3: number[]; + t4: () => IFoo; + t5: (n: number) => IFoo; + t6: (n: number, s: string) => IFoo; + t7: { + (n: number, s: string): number; + //(s1: string, s2: string): number; + }; + t8: (n: number, s: string) => number; + t9: number[][]; + t10: IFoo[]; + t11: {(n: number, s: string): string;}[]; + t12: IBar; + t13: IFoo; + t14: IFoo; + } = ({}); + + objc8.t1 = (function(s) { return s }); + objc8.t2 = ({ + n: 1 + }); + objc8.t3 = []; + objc8.t4 = function() { return ({}) }; + objc8.t5 = function(n) { return ({}) }; + objc8.t6 = function(n, s) { return ({}) }; + objc8.t7 = function(n: number) { return n }; + + objc8.t8 = function(n) { return n; }; + objc8.t9 = [[],[]]; + objc8.t10 = [({}),({})]; + objc8.t11 = [function(n, s) { return s; }]; + objc8.t12 = { + foo: ({}) + } + objc8.t13 = ({ + f: function(i, s) { return s; } + }) + objc8.t14 = ({ + a: [] + }) + // CONTEXT: Function call + function c9t5(f: (n: number) => IFoo) {}; + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + c9t5(function(n) { + return ({}); + }); + + // CONTEXT: Return statement + var c10t5: () => (n: number) => IFoo = function() { return function(n) { return ({}) } }; + + // CONTEXT: Newing a class + class C11t5 { constructor(f: (n: number) => IFoo) { } }; + var i = new C11t5(function(n) { return ({}) }); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // CONTEXT: Type annotated expression + var c12t1 = <(s: string) => string> (function(s) { return s }); + var c12t2 = ({ + n: 1 + }); + var c12t3 = []; + var c12t4 = <() => IFoo> function() { return ({}) }; + var c12t5 = <(n: number) => IFoo> function(n) { return ({}) }; + var c12t6 = <(n: number, s: string) => IFoo> function(n, s) { return ({}) }; + var c12t7 = <{ + (n: number, s: string): number; + //(s1: string, s2: string): number; + }> function(n:number) { return n }; + + var c12t8 = <(n: number, s: string) => number> function(n) { return n; }; + var c12t9 = [[],[]]; + var c12t10 = [({}),({})]; + var c12t11 = <{(n: number, s: string): string;}[]> [function(n, s) { return s; }]; + var c12t12 = { + foo: ({}) + } + var c12t13 = ({ + f: function(i, s) { return s; } + }) + var c12t14 = ({ + a: [] + }) + + // CONTEXT: Contextual typing declarations + + // contextually typing function declarations + declare function EF1(a:number, b:number):number; + ~~~ +!!! error TS2384: Overload signatures must all be ambient or non-ambient. + + function EF1(a,b) { return a+b; } + + var efv = EF1(1,2); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + + // contextually typing from ambient class declarations + declare class Point + { + constructor(x: number, y: number); + x: number; + y: number; + add(dx: number, dy: number): Point; + static origin: Point; + + } + + Point.origin = new Point(0, 0); + + Point.prototype.add = function(dx, dy) { + return new Point(this.x + dx, this.y + dy); + }; + + Point.prototype = { + x: 0, + y: 0, + add: function(dx, dy) { + return new Point(this.x + dx, this.y + dy); + } + }; + + interface A { x: string; } + interface B extends A { } + var x: B = { }; + ~ +!!! error TS2741: Property 'x' is missing in type '{}' but required in type 'B'. +!!! related TS2728 contextualTyping.ts:221:15: 'x' is declared here. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping38.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping38.d.ts new file mode 100644 index 0000000000000..c5cd9659d821f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping38.d.ts @@ -0,0 +1,11 @@ +//// [tests/cases/compiler/contextualTyping38.ts] //// + +//// [contextualTyping38.ts] +var foo = <{ (): number; }> function(a) { return a }; + +/// [Declarations] //// + + + +//// [contextualTyping38.d.ts] +declare var foo: () => number; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping39.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping39.d.ts new file mode 100644 index 0000000000000..4e0cd53bb9234 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping39.d.ts @@ -0,0 +1,23 @@ +//// [tests/cases/compiler/contextualTyping39.ts] //// + +//// [contextualTyping39.ts] +var foo = <{ (): number; }> function() { return "err"; }; + +/// [Declarations] //// + + + +//// [contextualTyping39.d.ts] +declare var foo: () => number; + +/// [Errors] //// + +contextualTyping39.ts(1,11): error TS2352: Conversion of type '() => string' to type '() => number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. + Type 'string' is not comparable to type 'number'. + + +==== contextualTyping39.ts (1 errors) ==== + var foo = <{ (): number; }> function() { return "err"; }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2352: Conversion of type '() => string' to type '() => number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +!!! error TS2352: Type 'string' is not comparable to type 'number'. \ 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..2f3bd8d92c77f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/correlatedUnions.d.ts @@ -0,0 +1,830 @@ +//// [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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(36,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(37,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(44,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(76,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(113,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(123,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(128,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(142,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(166,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(170,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(175,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(180,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(218,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function renderSelectField(props: SelectFieldData) {} + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + const renderFuncs: RenderFuncMap = { + text: renderTextField, + select: renderSelectField, + }; + + function renderField(field: FormField) { + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + const scrollEvent = createEventListener({ + ~~~~~~~~~~~~~~~~~~~~~ + name: "scroll", + ~~~~~~~~~~~~~~~~~~~ + callback: ev => console.log(ev), + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + }); + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + processEvents([clickEvent, scrollEvent]); + + processEvents([ + { name: "click", callback: ev => console.log(ev) }, + { name: "scroll", callback: ev => console.log(ev) }, + ]); + + // -------- + + function ff1() { + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + funcs[key](arg); + } + + function f2(funcs: Funcs, key: K, arg: ArgMap[K]) { + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const func = funcs[key]; // Type Funcs[K] + func(arg); + } + + function f3(funcs: Funcs, key: K, arg: ArgMap[K]) { + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const func: Func = funcs[key]; + func(arg); + } + + function f4(x: Funcs[keyof ArgMap], y: Funcs[K]) { + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + 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/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..8420c9189bcfa --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName.d.ts @@ -0,0 +1,58 @@ +//// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== other.ts (1 errors) ==== + type Experiment = { + name: Name; + }; + declare const createExperiment: ( + options: Experiment + ) => Experiment; + export default createExperiment({ + ~~~~~~~~~~~~~~~~~~ + name: "foo" + ~~~~~~~~~~~~~~~ + }); + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +==== 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..5986a5a04377a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName2.d.ts @@ -0,0 +1,58 @@ +//// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== other.ts (1 errors) ==== + type Experiment = { + name: Name; + }; + declare const createExperiment: ( + options: Experiment + ) => Experiment; + export default createExperiment({ + ~~~~~~~~~~~~~~~~~~ + name: "foo" + ~~~~~~~~~~~~~~~ + }); + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +==== 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/duplicateObjectLiteralProperty_computedName1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/duplicateObjectLiteralProperty_computedName1.d.ts new file mode 100644 index 0000000000000..1e87fb05d8d31 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/duplicateObjectLiteralProperty_computedName1.d.ts @@ -0,0 +1,125 @@ +//// [tests/cases/compiler/duplicateObjectLiteralProperty_computedName1.ts] //// + +//// [duplicateObjectLiteralProperty_computedName1.ts] +const t1 = { + 1: 1, + [1]: 0 // duplicate +} + +const t2 = { + 1: 1, + [+1]: 0 // duplicate +} + +const t3 = { + "1": 1, + [+1]: 0 // duplicate +} + +const t4 = { + "+1": 1, + [+1]: 0 // two different keys, "+1", "1" +} + +const t5 = { + "+1": 1, + ["+1"]: 0 // duplicate +} + +const t6 = { + "-1": 1, + [-1]: 0 // duplicate +} + +const t7 = { + "-1": 1, + ["-1"]: 0 // duplicate +} + + +/// [Declarations] //// + + + +//// [duplicateObjectLiteralProperty_computedName1.d.ts] +declare const t1: { + 1: number; +}; +declare const t2: { + 1: number; +}; +declare const t3: { + 1: number; +}; +declare const t4: { + "+1": number; + 1: number; +}; +declare const t5: { + "+1": number; +}; +declare const t6: { + [-1]: number; +}; +declare const t7: { + "-1": number; +}; + +/// [Errors] //// + +duplicateObjectLiteralProperty_computedName1.ts(3,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty_computedName1.ts(8,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty_computedName1.ts(13,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty_computedName1.ts(23,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty_computedName1.ts(28,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty_computedName1.ts(33,5): error TS1117: An object literal cannot have multiple properties with the same name. + + +==== duplicateObjectLiteralProperty_computedName1.ts (6 errors) ==== + const t1 = { + 1: 1, + [1]: 0 // duplicate + ~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + + const t2 = { + 1: 1, + [+1]: 0 // duplicate + ~~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + + const t3 = { + "1": 1, + [+1]: 0 // duplicate + ~~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + + const t4 = { + "+1": 1, + [+1]: 0 // two different keys, "+1", "1" + } + + const t5 = { + "+1": 1, + ["+1"]: 0 // duplicate + ~~~~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + + const t6 = { + "-1": 1, + [-1]: 0 // duplicate + ~~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + + const t7 = { + "-1": 1, + ["-1"]: 0 // duplicate + ~~~~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/duplicateObjectLiteralProperty_computedName2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/duplicateObjectLiteralProperty_computedName2.d.ts new file mode 100644 index 0000000000000..c6b227c32191d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/duplicateObjectLiteralProperty_computedName2.d.ts @@ -0,0 +1,97 @@ +//// [tests/cases/compiler/duplicateObjectLiteralProperty_computedName2.ts] //// + +//// [duplicateObjectLiteralProperty_computedName2.ts] +const n = 1; +const s = "s"; +enum E1 { A = "ENUM_KEY" } +enum E2 { B } + +const t1 = { + [n]: 1, + [n]: 1, // duplicate +} + +const t2 = { + [s]: 1, + [s]: 1, // duplicate +} + +const t3 = { + [E1.A]: 1, + [E1.A]: 1, // duplicate +} + +const t4 = { + [E2.B]: 1, + [E2.B]: 1, // duplicate +} + + +/// [Declarations] //// + + + +//// [duplicateObjectLiteralProperty_computedName2.d.ts] +declare const n = 1; +declare const s = "s"; +declare enum E1 { + A = "ENUM_KEY" +} +declare enum E2 { + B = 0 +} +declare const t1: { + 1: number; +}; +declare const t2: { + s: number; +}; +declare const t3: { + ENUM_KEY: number; +}; +declare const t4: { + 0: number; +}; + +/// [Errors] //// + +duplicateObjectLiteralProperty_computedName2.ts(8,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty_computedName2.ts(13,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty_computedName2.ts(18,5): error TS1117: An object literal cannot have multiple properties with the same name. +duplicateObjectLiteralProperty_computedName2.ts(23,5): error TS1117: An object literal cannot have multiple properties with the same name. + + +==== duplicateObjectLiteralProperty_computedName2.ts (4 errors) ==== + const n = 1; + const s = "s"; + enum E1 { A = "ENUM_KEY" } + enum E2 { B } + + const t1 = { + [n]: 1, + [n]: 1, // duplicate + ~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + + const t2 = { + [s]: 1, + [s]: 1, // duplicate + ~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + + const t3 = { + [E1.A]: 1, + [E1.A]: 1, // duplicate + ~~~~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + + const t4 = { + [E2.B]: 1, + [E2.B]: 1, // duplicate + ~~~~~~ +!!! error TS1117: An object literal cannot have multiple properties with the same name. + } + \ 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/duplicateVarsAcrossFileBoundaries.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/duplicateVarsAcrossFileBoundaries.d.ts new file mode 100644 index 0000000000000..f107986f96035 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/duplicateVarsAcrossFileBoundaries.d.ts @@ -0,0 +1,115 @@ +//// [tests/cases/compiler/duplicateVarsAcrossFileBoundaries.ts] //// + +//// [duplicateVarsAcrossFileBoundaries_0.ts] +var x = 3; +var y = ""; + +//// [duplicateVarsAcrossFileBoundaries_1.ts] +var x = true; +var z = 3; + +//// [duplicateVarsAcrossFileBoundaries_2.ts] +var x = ""; +var y = 3; +var z = false; + +//// [duplicateVarsAcrossFileBoundaries_3.ts] +var x = 0; +var y = ""; +var z = 0; + +//// [duplicateVarsAcrossFileBoundaries_4.ts] +module P { } +import p = P; +var q; + +//// [duplicateVarsAcrossFileBoundaries_5.ts] +module Q { } +import q = Q; +var p; + +/// [Declarations] //// + + + +//// [duplicateVarsAcrossFileBoundaries_0.d.ts] +declare var x: number; +declare var y: string; + +//// [duplicateVarsAcrossFileBoundaries_1.d.ts] +declare var x: number; +declare var z: number; + +//// [duplicateVarsAcrossFileBoundaries_2.d.ts] +declare var x: number; +declare var y: string; +declare var z: number; + +//// [duplicateVarsAcrossFileBoundaries_3.d.ts] +declare var x: number; +declare var y: string; +declare var z: number; + +//// [duplicateVarsAcrossFileBoundaries_4.d.ts] +declare namespace P { } +import p = P; +declare var q: invalid; + +//// [duplicateVarsAcrossFileBoundaries_5.d.ts] +declare namespace Q { } +import q = Q; +declare var p: invalid; + +/// [Errors] //// + +duplicateVarsAcrossFileBoundaries_1.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'boolean'. +duplicateVarsAcrossFileBoundaries_2.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. +duplicateVarsAcrossFileBoundaries_2.ts(2,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'number'. +duplicateVarsAcrossFileBoundaries_2.ts(3,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'boolean'. +duplicateVarsAcrossFileBoundaries_4.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +duplicateVarsAcrossFileBoundaries_5.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== duplicateVarsAcrossFileBoundaries_0.ts (0 errors) ==== + var x = 3; + var y = ""; + +==== duplicateVarsAcrossFileBoundaries_1.ts (1 errors) ==== + var x = true; + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'boolean'. +!!! related TS6203 duplicateVarsAcrossFileBoundaries_0.ts:1:5: 'x' was also declared here. + var z = 3; + +==== duplicateVarsAcrossFileBoundaries_2.ts (3 errors) ==== + var x = ""; + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. +!!! related TS6203 duplicateVarsAcrossFileBoundaries_0.ts:1:5: 'x' was also declared here. + var y = 3; + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'number'. +!!! related TS6203 duplicateVarsAcrossFileBoundaries_0.ts:2:5: 'y' was also declared here. + var z = false; + ~ +!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'boolean'. +!!! related TS6203 duplicateVarsAcrossFileBoundaries_1.ts:2:5: 'z' was also declared here. + +==== duplicateVarsAcrossFileBoundaries_3.ts (0 errors) ==== + var x = 0; + var y = ""; + var z = 0; + +==== duplicateVarsAcrossFileBoundaries_4.ts (1 errors) ==== + module P { } + import p = P; + var q; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + +==== duplicateVarsAcrossFileBoundaries_5.ts (1 errors) ==== + module Q { } + import q = Q; + var p; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ 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..2bbb73860cf74 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/dynamicNames.d.ts @@ -0,0 +1,366 @@ +//// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +main.ts(110,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +main.ts(111,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +module.ts(3,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== module.ts (1 errors) ==== + export const c0 = "a"; + export const c1 = 1; + export const s0 = Symbol(); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export const o1_c5 = o1[c5]; + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export const o1_s2 = o1[s2]; + ~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + 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/escapedIdentifiers.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/escapedIdentifiers.d.ts new file mode 100644 index 0000000000000..225f2fe96625e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/escapedIdentifiers.d.ts @@ -0,0 +1,310 @@ +//// [tests/cases/compiler/escapedIdentifiers.ts] //// + +//// [escapedIdentifiers.ts] +/* + 0 .. \u0030 + 9 .. \u0039 + + A .. \u0041 + Z .. \u005a + + a .. \u0061 + z .. \u00za +*/ + +// var decl +var \u0061 = 1; +a ++; +\u0061 ++; + +var b = 1; +b ++; +\u0062 ++; + +// modules +module moduleType1 { + export var baz1: number; +} +module moduleType\u0032 { + export var baz2: number; +} + +moduleType1.baz1 = 3; +moduleType\u0031.baz1 = 3; +moduleType2.baz2 = 3; +moduleType\u0032.baz2 = 3; + +// classes + +class classType1 { + public foo1: number; +} +class classType\u0032 { + public foo2: number; +} + +var classType1Object1 = new classType1(); +classType1Object1.foo1 = 2; +var classType1Object2 = new classType\u0031(); +classType1Object2.foo1 = 2; +var classType2Object1 = new classType2(); +classType2Object1.foo2 = 2; +var classType2Object2 = new classType\u0032(); +classType2Object2.foo2 = 2; + +// interfaces +interface interfaceType1 { + bar1: number; +} +interface interfaceType\u0032 { + bar2: number; +} + +var interfaceType1Object1 = { bar1: 0 }; +interfaceType1Object1.bar1 = 2; +var interfaceType1Object2 = { bar1: 0 }; +interfaceType1Object2.bar1 = 2; +var interfaceType2Object1 = { bar2: 0 }; +interfaceType2Object1.bar2 = 2; +var interfaceType2Object2 = { bar2: 0 }; +interfaceType2Object2.bar2 = 2; + + +// arguments +class testClass { + public func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number) { + arg\u0031 = 1; + arg2 = 'string'; + arg\u0033 = true; + arg4 = 2; + } +} + +// constructors +class constructorTestClass { + constructor (public arg1: number,public arg\u0032: string,public arg\u0033: boolean,public arg4: number) { + } +} +var constructorTestObject = new constructorTestClass(1, 'string', true, 2); +constructorTestObject.arg\u0031 = 1; +constructorTestObject.arg2 = 'string'; +constructorTestObject.arg\u0033 = true; +constructorTestObject.arg4 = 2; + +// Lables + +l\u0061bel1: + while (false) + { + while(false) + continue label1; // it will go to next iteration of outer loop + } + +label2: + while (false) + { + while(false) + continue l\u0061bel2; // it will go to next iteration of outer loop + } + +label3: + while (false) + { + while(false) + continue label3; // it will go to next iteration of outer loop + } + +l\u0061bel4: + while (false) + { + while(false) + continue l\u0061bel4; // it will go to next iteration of outer loop + } + +/// [Declarations] //// + + + +//// [escapedIdentifiers.d.ts] +declare var \u0061: number; +declare var b: number; +declare namespace moduleType1 { + var baz1: number; +} +declare namespace moduleType\u0032 { + var baz2: number; +} +declare class classType1 { + foo1: number; +} +declare class classType\u0032 { + foo2: number; +} +declare var classType1Object1: invalid; +declare var classType1Object2: invalid; +declare var classType2Object1: invalid; +declare var classType2Object2: invalid; +interface interfaceType1 { + bar1: number; +} +interface interfaceType\u0032 { + bar2: number; +} +declare var interfaceType1Object1: interfaceType1; +declare var interfaceType1Object2: interfaceType1; +declare var interfaceType2Object1: interfaceType\u0032; +declare var interfaceType2Object2: interfaceType\u0032; +declare class testClass { + func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number): invalid; +} +declare class constructorTestClass { + arg1: number; + arg\u0032: string; + arg\u0033: boolean; + arg4: number; + constructor(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number); +} +declare var constructorTestObject: invalid; + +/// [Errors] //// + +escapedIdentifiers.ts(43,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +escapedIdentifiers.ts(45,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +escapedIdentifiers.ts(47,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +escapedIdentifiers.ts(49,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +escapedIdentifiers.ts(72,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +escapedIdentifiers.ts(85,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== escapedIdentifiers.ts (6 errors) ==== + /* + 0 .. \u0030 + 9 .. \u0039 + + A .. \u0041 + Z .. \u005a + + a .. \u0061 + z .. \u00za + */ + + // var decl + var \u0061 = 1; + a ++; + \u0061 ++; + + var b = 1; + b ++; + \u0062 ++; + + // modules + module moduleType1 { + export var baz1: number; + } + module moduleType\u0032 { + export var baz2: number; + } + + moduleType1.baz1 = 3; + moduleType\u0031.baz1 = 3; + moduleType2.baz2 = 3; + moduleType\u0032.baz2 = 3; + + // classes + + class classType1 { + public foo1: number; + } + class classType\u0032 { + public foo2: number; + } + + var classType1Object1 = new classType1(); + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + classType1Object1.foo1 = 2; + var classType1Object2 = new classType\u0031(); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + classType1Object2.foo1 = 2; + var classType2Object1 = new classType2(); + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + classType2Object1.foo2 = 2; + var classType2Object2 = new classType\u0032(); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + classType2Object2.foo2 = 2; + + // interfaces + interface interfaceType1 { + bar1: number; + } + interface interfaceType\u0032 { + bar2: number; + } + + var interfaceType1Object1 = { bar1: 0 }; + interfaceType1Object1.bar1 = 2; + var interfaceType1Object2 = { bar1: 0 }; + interfaceType1Object2.bar1 = 2; + var interfaceType2Object1 = { bar2: 0 }; + interfaceType2Object1.bar2 = 2; + var interfaceType2Object2 = { bar2: 0 }; + interfaceType2Object2.bar2 = 2; + + + // arguments + class testClass { + public func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number) { + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + arg\u0031 = 1; + arg2 = 'string'; + arg\u0033 = true; + arg4 = 2; + } + } + + // constructors + class constructorTestClass { + constructor (public arg1: number,public arg\u0032: string,public arg\u0033: boolean,public arg4: number) { + } + } + var constructorTestObject = new constructorTestClass(1, 'string', true, 2); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constructorTestObject.arg\u0031 = 1; + constructorTestObject.arg2 = 'string'; + constructorTestObject.arg\u0033 = true; + constructorTestObject.arg4 = 2; + + // Lables + + l\u0061bel1: + while (false) + { + while(false) + continue label1; // it will go to next iteration of outer loop + } + + label2: + while (false) + { + while(false) + continue l\u0061bel2; // it will go to next iteration of outer loop + } + + label3: + while (false) + { + while(false) + continue label3; // it will go to next iteration of outer loop + } + + l\u0061bel4: + while (false) + { + while(false) + continue l\u0061bel4; // it will go to next iteration of outer loop + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/generatedContextualTyping.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/generatedContextualTyping.d.ts new file mode 100644 index 0000000000000..ccf90987aea73 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/generatedContextualTyping.d.ts @@ -0,0 +1,1818 @@ +//// [tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts] //// + +//// [generatedContextualTyping.ts] +class Base { private p; } +class Derived1 extends Base { private m; } +class Derived2 extends Base { private n; } +interface Genric { func(n: T[]); } +var b = new Base(), d1 = new Derived1(), d2 = new Derived2(); +var x1: () => Base[] = () => [d1, d2]; +var x2: () => Base[] = function() { return [d1, d2] }; +var x3: () => Base[] = function named() { return [d1, d2] }; +var x4: { (): Base[]; } = () => [d1, d2]; +var x5: { (): Base[]; } = function() { return [d1, d2] }; +var x6: { (): Base[]; } = function named() { return [d1, d2] }; +var x7: Base[] = [d1, d2]; +var x8: Array = [d1, d2]; +var x9: { [n: number]: Base; } = [d1, d2]; +var x10: {n: Base[]; } = { n: [d1, d2] }; +var x11: (s: Base[]) => any = n => { var n: Base[]; return null; }; +var x12: Genric = { func: n => { return [d1, d2]; } }; +class x13 { member: () => Base[] = () => [d1, d2] } +class x14 { member: () => Base[] = function() { return [d1, d2] } } +class x15 { member: () => Base[] = function named() { return [d1, d2] } } +class x16 { member: { (): Base[]; } = () => [d1, d2] } +class x17 { member: { (): Base[]; } = function() { return [d1, d2] } } +class x18 { member: { (): Base[]; } = function named() { return [d1, d2] } } +class x19 { member: Base[] = [d1, d2] } +class x20 { member: Array = [d1, d2] } +class x21 { member: { [n: number]: Base; } = [d1, d2] } +class x22 { member: {n: Base[]; } = { n: [d1, d2] } } +class x23 { member: (s: Base[]) => any = n => { var n: Base[]; return null; } } +class x24 { member: Genric = { func: n => { return [d1, d2]; } } } +class x25 { private member: () => Base[] = () => [d1, d2] } +class x26 { private member: () => Base[] = function() { return [d1, d2] } } +class x27 { private member: () => Base[] = function named() { return [d1, d2] } } +class x28 { private member: { (): Base[]; } = () => [d1, d2] } +class x29 { private member: { (): Base[]; } = function() { return [d1, d2] } } +class x30 { private member: { (): Base[]; } = function named() { return [d1, d2] } } +class x31 { private member: Base[] = [d1, d2] } +class x32 { private member: Array = [d1, d2] } +class x33 { private member: { [n: number]: Base; } = [d1, d2] } +class x34 { private member: {n: Base[]; } = { n: [d1, d2] } } +class x35 { private member: (s: Base[]) => any = n => { var n: Base[]; return null; } } +class x36 { private member: Genric = { func: n => { return [d1, d2]; } } } +class x37 { public member: () => Base[] = () => [d1, d2] } +class x38 { public member: () => Base[] = function() { return [d1, d2] } } +class x39 { public member: () => Base[] = function named() { return [d1, d2] } } +class x40 { public member: { (): Base[]; } = () => [d1, d2] } +class x41 { public member: { (): Base[]; } = function() { return [d1, d2] } } +class x42 { public member: { (): Base[]; } = function named() { return [d1, d2] } } +class x43 { public member: Base[] = [d1, d2] } +class x44 { public member: Array = [d1, d2] } +class x45 { public member: { [n: number]: Base; } = [d1, d2] } +class x46 { public member: {n: Base[]; } = { n: [d1, d2] } } +class x47 { public member: (s: Base[]) => any = n => { var n: Base[]; return null; } } +class x48 { public member: Genric = { func: n => { return [d1, d2]; } } } +class x49 { static member: () => Base[] = () => [d1, d2] } +class x50 { static member: () => Base[] = function() { return [d1, d2] } } +class x51 { static member: () => Base[] = function named() { return [d1, d2] } } +class x52 { static member: { (): Base[]; } = () => [d1, d2] } +class x53 { static member: { (): Base[]; } = function() { return [d1, d2] } } +class x54 { static member: { (): Base[]; } = function named() { return [d1, d2] } } +class x55 { static member: Base[] = [d1, d2] } +class x56 { static member: Array = [d1, d2] } +class x57 { static member: { [n: number]: Base; } = [d1, d2] } +class x58 { static member: {n: Base[]; } = { n: [d1, d2] } } +class x59 { static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } +class x60 { static member: Genric = { func: n => { return [d1, d2]; } } } +class x61 { private static member: () => Base[] = () => [d1, d2] } +class x62 { private static member: () => Base[] = function() { return [d1, d2] } } +class x63 { private static member: () => Base[] = function named() { return [d1, d2] } } +class x64 { private static member: { (): Base[]; } = () => [d1, d2] } +class x65 { private static member: { (): Base[]; } = function() { return [d1, d2] } } +class x66 { private static member: { (): Base[]; } = function named() { return [d1, d2] } } +class x67 { private static member: Base[] = [d1, d2] } +class x68 { private static member: Array = [d1, d2] } +class x69 { private static member: { [n: number]: Base; } = [d1, d2] } +class x70 { private static member: {n: Base[]; } = { n: [d1, d2] } } +class x71 { private static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } +class x72 { private static member: Genric = { func: n => { return [d1, d2]; } } } +class x73 { public static member: () => Base[] = () => [d1, d2] } +class x74 { public static member: () => Base[] = function() { return [d1, d2] } } +class x75 { public static member: () => Base[] = function named() { return [d1, d2] } } +class x76 { public static member: { (): Base[]; } = () => [d1, d2] } +class x77 { public static member: { (): Base[]; } = function() { return [d1, d2] } } +class x78 { public static member: { (): Base[]; } = function named() { return [d1, d2] } } +class x79 { public static member: Base[] = [d1, d2] } +class x80 { public static member: Array = [d1, d2] } +class x81 { public static member: { [n: number]: Base; } = [d1, d2] } +class x82 { public static member: {n: Base[]; } = { n: [d1, d2] } } +class x83 { public static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } +class x84 { public static member: Genric = { func: n => { return [d1, d2]; } } } +class x85 { constructor(parm: () => Base[] = () => [d1, d2]) { } } +class x86 { constructor(parm: () => Base[] = function() { return [d1, d2] }) { } } +class x87 { constructor(parm: () => Base[] = function named() { return [d1, d2] }) { } } +class x88 { constructor(parm: { (): Base[]; } = () => [d1, d2]) { } } +class x89 { constructor(parm: { (): Base[]; } = function() { return [d1, d2] }) { } } +class x90 { constructor(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } +class x91 { constructor(parm: Base[] = [d1, d2]) { } } +class x92 { constructor(parm: Array = [d1, d2]) { } } +class x93 { constructor(parm: { [n: number]: Base; } = [d1, d2]) { } } +class x94 { constructor(parm: {n: Base[]; } = { n: [d1, d2] }) { } } +class x95 { constructor(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } +class x96 { constructor(parm: Genric = { func: n => { return [d1, d2]; } }) { } } +class x97 { constructor(public parm: () => Base[] = () => [d1, d2]) { } } +class x98 { constructor(public parm: () => Base[] = function() { return [d1, d2] }) { } } +class x99 { constructor(public parm: () => Base[] = function named() { return [d1, d2] }) { } } +class x100 { constructor(public parm: { (): Base[]; } = () => [d1, d2]) { } } +class x101 { constructor(public parm: { (): Base[]; } = function() { return [d1, d2] }) { } } +class x102 { constructor(public parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } +class x103 { constructor(public parm: Base[] = [d1, d2]) { } } +class x104 { constructor(public parm: Array = [d1, d2]) { } } +class x105 { constructor(public parm: { [n: number]: Base; } = [d1, d2]) { } } +class x106 { constructor(public parm: {n: Base[]; } = { n: [d1, d2] }) { } } +class x107 { constructor(public parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } +class x108 { constructor(public parm: Genric = { func: n => { return [d1, d2]; } }) { } } +class x109 { constructor(private parm: () => Base[] = () => [d1, d2]) { } } +class x110 { constructor(private parm: () => Base[] = function() { return [d1, d2] }) { } } +class x111 { constructor(private parm: () => Base[] = function named() { return [d1, d2] }) { } } +class x112 { constructor(private parm: { (): Base[]; } = () => [d1, d2]) { } } +class x113 { constructor(private parm: { (): Base[]; } = function() { return [d1, d2] }) { } } +class x114 { constructor(private parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } +class x115 { constructor(private parm: Base[] = [d1, d2]) { } } +class x116 { constructor(private parm: Array = [d1, d2]) { } } +class x117 { constructor(private parm: { [n: number]: Base; } = [d1, d2]) { } } +class x118 { constructor(private parm: {n: Base[]; } = { n: [d1, d2] }) { } } +class x119 { constructor(private parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } +class x120 { constructor(private parm: Genric = { func: n => { return [d1, d2]; } }) { } } +function x121(parm: () => Base[] = () => [d1, d2]) { } +function x122(parm: () => Base[] = function() { return [d1, d2] }) { } +function x123(parm: () => Base[] = function named() { return [d1, d2] }) { } +function x124(parm: { (): Base[]; } = () => [d1, d2]) { } +function x125(parm: { (): Base[]; } = function() { return [d1, d2] }) { } +function x126(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } +function x127(parm: Base[] = [d1, d2]) { } +function x128(parm: Array = [d1, d2]) { } +function x129(parm: { [n: number]: Base; } = [d1, d2]) { } +function x130(parm: {n: Base[]; } = { n: [d1, d2] }) { } +function x131(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } +function x132(parm: Genric = { func: n => { return [d1, d2]; } }) { } +function x133(): () => Base[] { return () => [d1, d2]; } +function x134(): () => Base[] { return function() { return [d1, d2] }; } +function x135(): () => Base[] { return function named() { return [d1, d2] }; } +function x136(): { (): Base[]; } { return () => [d1, d2]; } +function x137(): { (): Base[]; } { return function() { return [d1, d2] }; } +function x138(): { (): Base[]; } { return function named() { return [d1, d2] }; } +function x139(): Base[] { return [d1, d2]; } +function x140(): Array { return [d1, d2]; } +function x141(): { [n: number]: Base; } { return [d1, d2]; } +function x142(): {n: Base[]; } { return { n: [d1, d2] }; } +function x143(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; } +function x144(): Genric { return { func: n => { return [d1, d2]; } }; } +function x145(): () => Base[] { return () => [d1, d2]; return () => [d1, d2]; } +function x146(): () => Base[] { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } +function x147(): () => Base[] { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } +function x148(): { (): Base[]; } { return () => [d1, d2]; return () => [d1, d2]; } +function x149(): { (): Base[]; } { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } +function x150(): { (): Base[]; } { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } +function x151(): Base[] { return [d1, d2]; return [d1, d2]; } +function x152(): Array { return [d1, d2]; return [d1, d2]; } +function x153(): { [n: number]: Base; } { return [d1, d2]; return [d1, d2]; } +function x154(): {n: Base[]; } { return { n: [d1, d2] }; return { n: [d1, d2] }; } +function x155(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; return n => { var n: Base[]; return null; }; } +function x156(): Genric { return { func: n => { return [d1, d2]; } }; return { func: n => { return [d1, d2]; } }; } +var x157: () => () => Base[] = () => { return () => [d1, d2]; }; +var x158: () => () => Base[] = () => { return function() { return [d1, d2] }; }; +var x159: () => () => Base[] = () => { return function named() { return [d1, d2] }; }; +var x160: () => { (): Base[]; } = () => { return () => [d1, d2]; }; +var x161: () => { (): Base[]; } = () => { return function() { return [d1, d2] }; }; +var x162: () => { (): Base[]; } = () => { return function named() { return [d1, d2] }; }; +var x163: () => Base[] = () => { return [d1, d2]; }; +var x164: () => Array = () => { return [d1, d2]; }; +var x165: () => { [n: number]: Base; } = () => { return [d1, d2]; }; +var x166: () => {n: Base[]; } = () => { return { n: [d1, d2] }; }; +var x167: () => (s: Base[]) => any = () => { return n => { var n: Base[]; return null; }; }; +var x168: () => Genric = () => { return { func: n => { return [d1, d2]; } }; }; +var x169: () => () => Base[] = function() { return () => [d1, d2]; }; +var x170: () => () => Base[] = function() { return function() { return [d1, d2] }; }; +var x171: () => () => Base[] = function() { return function named() { return [d1, d2] }; }; +var x172: () => { (): Base[]; } = function() { return () => [d1, d2]; }; +var x173: () => { (): Base[]; } = function() { return function() { return [d1, d2] }; }; +var x174: () => { (): Base[]; } = function() { return function named() { return [d1, d2] }; }; +var x175: () => Base[] = function() { return [d1, d2]; }; +var x176: () => Array = function() { return [d1, d2]; }; +var x177: () => { [n: number]: Base; } = function() { return [d1, d2]; }; +var x178: () => {n: Base[]; } = function() { return { n: [d1, d2] }; }; +var x179: () => (s: Base[]) => any = function() { return n => { var n: Base[]; return null; }; }; +var x180: () => Genric = function() { return { func: n => { return [d1, d2]; } }; }; +module x181 { var t: () => Base[] = () => [d1, d2]; } +module x182 { var t: () => Base[] = function() { return [d1, d2] }; } +module x183 { var t: () => Base[] = function named() { return [d1, d2] }; } +module x184 { var t: { (): Base[]; } = () => [d1, d2]; } +module x185 { var t: { (): Base[]; } = function() { return [d1, d2] }; } +module x186 { var t: { (): Base[]; } = function named() { return [d1, d2] }; } +module x187 { var t: Base[] = [d1, d2]; } +module x188 { var t: Array = [d1, d2]; } +module x189 { var t: { [n: number]: Base; } = [d1, d2]; } +module x190 { var t: {n: Base[]; } = { n: [d1, d2] }; } +module x191 { var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } +module x192 { var t: Genric = { func: n => { return [d1, d2]; } }; } +module x193 { export var t: () => Base[] = () => [d1, d2]; } +module x194 { export var t: () => Base[] = function() { return [d1, d2] }; } +module x195 { export var t: () => Base[] = function named() { return [d1, d2] }; } +module x196 { export var t: { (): Base[]; } = () => [d1, d2]; } +module x197 { export var t: { (): Base[]; } = function() { return [d1, d2] }; } +module x198 { export var t: { (): Base[]; } = function named() { return [d1, d2] }; } +module x199 { export var t: Base[] = [d1, d2]; } +module x200 { export var t: Array = [d1, d2]; } +module x201 { export var t: { [n: number]: Base; } = [d1, d2]; } +module x202 { export var t: {n: Base[]; } = { n: [d1, d2] }; } +module x203 { export var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } +module x204 { export var t: Genric = { func: n => { return [d1, d2]; } }; } +var x206 = <() => Base[]>function() { return [d1, d2] }; +var x207 = <() => Base[]>function named() { return [d1, d2] }; +var x209 = <{ (): Base[]; }>function() { return [d1, d2] }; +var x210 = <{ (): Base[]; }>function named() { return [d1, d2] }; +var x211 = [d1, d2]; +var x212 = >[d1, d2]; +var x213 = <{ [n: number]: Base; }>[d1, d2]; +var x214 = <{n: Base[]; } >{ n: [d1, d2] }; +var x216 = >{ func: n => { return [d1, d2]; } }; +var x217 = (<() => Base[]>undefined) || function() { return [d1, d2] }; +var x218 = (<() => Base[]>undefined) || function named() { return [d1, d2] }; +var x219 = (<{ (): Base[]; }>undefined) || function() { return [d1, d2] }; +var x220 = (<{ (): Base[]; }>undefined) || function named() { return [d1, d2] }; +var x221 = (undefined) || [d1, d2]; +var x222 = (>undefined) || [d1, d2]; +var x223 = (<{ [n: number]: Base; }>undefined) || [d1, d2]; +var x224 = (<{n: Base[]; } >undefined) || { n: [d1, d2] }; +var x225: () => Base[]; x225 = () => [d1, d2]; +var x226: () => Base[]; x226 = function() { return [d1, d2] }; +var x227: () => Base[]; x227 = function named() { return [d1, d2] }; +var x228: { (): Base[]; }; x228 = () => [d1, d2]; +var x229: { (): Base[]; }; x229 = function() { return [d1, d2] }; +var x230: { (): Base[]; }; x230 = function named() { return [d1, d2] }; +var x231: Base[]; x231 = [d1, d2]; +var x232: Array; x232 = [d1, d2]; +var x233: { [n: number]: Base; }; x233 = [d1, d2]; +var x234: {n: Base[]; } ; x234 = { n: [d1, d2] }; +var x235: (s: Base[]) => any; x235 = n => { var n: Base[]; return null; }; +var x236: Genric; x236 = { func: n => { return [d1, d2]; } }; +var x237: { n: () => Base[]; } = { n: () => [d1, d2] }; +var x238: { n: () => Base[]; } = { n: function() { return [d1, d2] } }; +var x239: { n: () => Base[]; } = { n: function named() { return [d1, d2] } }; +var x240: { n: { (): Base[]; }; } = { n: () => [d1, d2] }; +var x241: { n: { (): Base[]; }; } = { n: function() { return [d1, d2] } }; +var x242: { n: { (): Base[]; }; } = { n: function named() { return [d1, d2] } }; +var x243: { n: Base[]; } = { n: [d1, d2] }; +var x244: { n: Array; } = { n: [d1, d2] }; +var x245: { n: { [n: number]: Base; }; } = { n: [d1, d2] }; +var x246: { n: {n: Base[]; } ; } = { n: { n: [d1, d2] } }; +var x247: { n: (s: Base[]) => any; } = { n: n => { var n: Base[]; return null; } }; +var x248: { n: Genric; } = { n: { func: n => { return [d1, d2]; } } }; +var x252: { (): Base[]; }[] = [() => [d1, d2]]; +var x253: { (): Base[]; }[] = [function() { return [d1, d2] }]; +var x254: { (): Base[]; }[] = [function named() { return [d1, d2] }]; +var x255: Base[][] = [[d1, d2]]; +var x256: Array[] = [[d1, d2]]; +var x257: { [n: number]: Base; }[] = [[d1, d2]]; +var x258: {n: Base[]; } [] = [{ n: [d1, d2] }]; +var x260: Genric[] = [{ func: n => { return [d1, d2]; } }]; +var x261: () => Base[] = function() { return [d1, d2] } || undefined; +var x262: () => Base[] = function named() { return [d1, d2] } || undefined; +var x263: { (): Base[]; } = function() { return [d1, d2] } || undefined; +var x264: { (): Base[]; } = function named() { return [d1, d2] } || undefined; +var x265: Base[] = [d1, d2] || undefined; +var x266: Array = [d1, d2] || undefined; +var x267: { [n: number]: Base; } = [d1, d2] || undefined; +var x268: {n: Base[]; } = { n: [d1, d2] } || undefined; +var x269: () => Base[] = undefined || function() { return [d1, d2] }; +var x270: () => Base[] = undefined || function named() { return [d1, d2] }; +var x271: { (): Base[]; } = undefined || function() { return [d1, d2] }; +var x272: { (): Base[]; } = undefined || function named() { return [d1, d2] }; +var x273: Base[] = undefined || [d1, d2]; +var x274: Array = undefined || [d1, d2]; +var x275: { [n: number]: Base; } = undefined || [d1, d2]; +var x276: {n: Base[]; } = undefined || { n: [d1, d2] }; +var x277: () => Base[] = function() { return [d1, d2] } || function() { return [d1, d2] }; +var x278: () => Base[] = function named() { return [d1, d2] } || function named() { return [d1, d2] }; +var x279: { (): Base[]; } = function() { return [d1, d2] } || function() { return [d1, d2] }; +var x280: { (): Base[]; } = function named() { return [d1, d2] } || function named() { return [d1, d2] }; +var x281: Base[] = [d1, d2] || [d1, d2]; +var x282: Array = [d1, d2] || [d1, d2]; +var x283: { [n: number]: Base; } = [d1, d2] || [d1, d2]; +var x284: {n: Base[]; } = { n: [d1, d2] } || { n: [d1, d2] }; +var x285: () => Base[] = true ? () => [d1, d2] : () => [d1, d2]; +var x286: () => Base[] = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; +var x287: () => Base[] = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; +var x288: { (): Base[]; } = true ? () => [d1, d2] : () => [d1, d2]; +var x289: { (): Base[]; } = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; +var x290: { (): Base[]; } = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; +var x291: Base[] = true ? [d1, d2] : [d1, d2]; +var x292: Array = true ? [d1, d2] : [d1, d2]; +var x293: { [n: number]: Base; } = true ? [d1, d2] : [d1, d2]; +var x294: {n: Base[]; } = true ? { n: [d1, d2] } : { n: [d1, d2] }; +var x295: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : n => { var n: Base[]; return null; }; +var x296: Genric = true ? { func: n => { return [d1, d2]; } } : { func: n => { return [d1, d2]; } }; +var x297: () => Base[] = true ? undefined : () => [d1, d2]; +var x298: () => Base[] = true ? undefined : function() { return [d1, d2] }; +var x299: () => Base[] = true ? undefined : function named() { return [d1, d2] }; +var x300: { (): Base[]; } = true ? undefined : () => [d1, d2]; +var x301: { (): Base[]; } = true ? undefined : function() { return [d1, d2] }; +var x302: { (): Base[]; } = true ? undefined : function named() { return [d1, d2] }; +var x303: Base[] = true ? undefined : [d1, d2]; +var x304: Array = true ? undefined : [d1, d2]; +var x305: { [n: number]: Base; } = true ? undefined : [d1, d2]; +var x306: {n: Base[]; } = true ? undefined : { n: [d1, d2] }; +var x307: (s: Base[]) => any = true ? undefined : n => { var n: Base[]; return null; }; +var x308: Genric = true ? undefined : { func: n => { return [d1, d2]; } }; +var x309: () => Base[] = true ? () => [d1, d2] : undefined; +var x310: () => Base[] = true ? function() { return [d1, d2] } : undefined; +var x311: () => Base[] = true ? function named() { return [d1, d2] } : undefined; +var x312: { (): Base[]; } = true ? () => [d1, d2] : undefined; +var x313: { (): Base[]; } = true ? function() { return [d1, d2] } : undefined; +var x314: { (): Base[]; } = true ? function named() { return [d1, d2] } : undefined; +var x315: Base[] = true ? [d1, d2] : undefined; +var x316: Array = true ? [d1, d2] : undefined; +var x317: { [n: number]: Base; } = true ? [d1, d2] : undefined; +var x318: {n: Base[]; } = true ? { n: [d1, d2] } : undefined; +var x319: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : undefined; +var x320: Genric = true ? { func: n => { return [d1, d2]; } } : undefined; +function x321(n: () => Base[]) { }; x321(() => [d1, d2]); +function x322(n: () => Base[]) { }; x322(function() { return [d1, d2] }); +function x323(n: () => Base[]) { }; x323(function named() { return [d1, d2] }); +function x324(n: { (): Base[]; }) { }; x324(() => [d1, d2]); +function x325(n: { (): Base[]; }) { }; x325(function() { return [d1, d2] }); +function x326(n: { (): Base[]; }) { }; x326(function named() { return [d1, d2] }); +function x327(n: Base[]) { }; x327([d1, d2]); +function x328(n: Array) { }; x328([d1, d2]); +function x329(n: { [n: number]: Base; }) { }; x329([d1, d2]); +function x330(n: {n: Base[]; } ) { }; x330({ n: [d1, d2] }); +function x331(n: (s: Base[]) => any) { }; x331(n => { var n: Base[]; return null; }); +function x332(n: Genric) { }; x332({ func: n => { return [d1, d2]; } }); +var x333 = (n: () => Base[]) => n; x333(() => [d1, d2]); +var x334 = (n: () => Base[]) => n; x334(function() { return [d1, d2] }); +var x335 = (n: () => Base[]) => n; x335(function named() { return [d1, d2] }); +var x336 = (n: { (): Base[]; }) => n; x336(() => [d1, d2]); +var x337 = (n: { (): Base[]; }) => n; x337(function() { return [d1, d2] }); +var x338 = (n: { (): Base[]; }) => n; x338(function named() { return [d1, d2] }); +var x339 = (n: Base[]) => n; x339([d1, d2]); +var x340 = (n: Array) => n; x340([d1, d2]); +var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); +var x342 = (n: {n: Base[]; } ) => n; x342({ n: [d1, d2] }); +var x343 = (n: (s: Base[]) => any) => n; x343(n => { var n: Base[]; return null; }); +var x344 = (n: Genric) => n; x344({ func: n => { return [d1, d2]; } }); +var x345 = function(n: () => Base[]) { }; x345(() => [d1, d2]); +var x346 = function(n: () => Base[]) { }; x346(function() { return [d1, d2] }); +var x347 = function(n: () => Base[]) { }; x347(function named() { return [d1, d2] }); +var x348 = function(n: { (): Base[]; }) { }; x348(() => [d1, d2]); +var x349 = function(n: { (): Base[]; }) { }; x349(function() { return [d1, d2] }); +var x350 = function(n: { (): Base[]; }) { }; x350(function named() { return [d1, d2] }); +var x351 = function(n: Base[]) { }; x351([d1, d2]); +var x352 = function(n: Array) { }; x352([d1, d2]); +var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); +var x354 = function(n: {n: Base[]; } ) { }; x354({ n: [d1, d2] }); +var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; return null; }); +var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); + +/// [Declarations] //// + + + +//// [generatedContextualTyping.d.ts] +declare class Base { + private p; +} +declare class Derived1 extends Base { + private m; +} +declare class Derived2 extends Base { + private n; +} +interface Genric { + func(n: T[]): any; +} +declare var b: invalid, d1: invalid, d2: invalid; +declare var x1: () => Base[]; +declare var x2: () => Base[]; +declare var x3: () => Base[]; +declare var x4: { + (): Base[]; +}; +declare var x5: { + (): Base[]; +}; +declare var x6: { + (): Base[]; +}; +declare var x7: Base[]; +declare var x8: Array; +declare var x9: { + [n: number]: Base; +}; +declare var x10: { + n: Base[]; +}; +declare var x11: (s: Base[]) => any; +declare var x12: Genric; +declare class x13 { + member: () => Base[]; +} +declare class x14 { + member: () => Base[]; +} +declare class x15 { + member: () => Base[]; +} +declare class x16 { + member: { + (): Base[]; + }; +} +declare class x17 { + member: { + (): Base[]; + }; +} +declare class x18 { + member: { + (): Base[]; + }; +} +declare class x19 { + member: Base[]; +} +declare class x20 { + member: Array; +} +declare class x21 { + member: { + [n: number]: Base; + }; +} +declare class x22 { + member: { + n: Base[]; + }; +} +declare class x23 { + member: (s: Base[]) => any; +} +declare class x24 { + member: Genric; +} +declare class x25 { + private member; +} +declare class x26 { + private member; +} +declare class x27 { + private member; +} +declare class x28 { + private member; +} +declare class x29 { + private member; +} +declare class x30 { + private member; +} +declare class x31 { + private member; +} +declare class x32 { + private member; +} +declare class x33 { + private member; +} +declare class x34 { + private member; +} +declare class x35 { + private member; +} +declare class x36 { + private member; +} +declare class x37 { + member: () => Base[]; +} +declare class x38 { + member: () => Base[]; +} +declare class x39 { + member: () => Base[]; +} +declare class x40 { + member: { + (): Base[]; + }; +} +declare class x41 { + member: { + (): Base[]; + }; +} +declare class x42 { + member: { + (): Base[]; + }; +} +declare class x43 { + member: Base[]; +} +declare class x44 { + member: Array; +} +declare class x45 { + member: { + [n: number]: Base; + }; +} +declare class x46 { + member: { + n: Base[]; + }; +} +declare class x47 { + member: (s: Base[]) => any; +} +declare class x48 { + member: Genric; +} +declare class x49 { + static member: () => Base[]; +} +declare class x50 { + static member: () => Base[]; +} +declare class x51 { + static member: () => Base[]; +} +declare class x52 { + static member: { + (): Base[]; + }; +} +declare class x53 { + static member: { + (): Base[]; + }; +} +declare class x54 { + static member: { + (): Base[]; + }; +} +declare class x55 { + static member: Base[]; +} +declare class x56 { + static member: Array; +} +declare class x57 { + static member: { + [n: number]: Base; + }; +} +declare class x58 { + static member: { + n: Base[]; + }; +} +declare class x59 { + static member: (s: Base[]) => any; +} +declare class x60 { + static member: Genric; +} +declare class x61 { + private static member; +} +declare class x62 { + private static member; +} +declare class x63 { + private static member; +} +declare class x64 { + private static member; +} +declare class x65 { + private static member; +} +declare class x66 { + private static member; +} +declare class x67 { + private static member; +} +declare class x68 { + private static member; +} +declare class x69 { + private static member; +} +declare class x70 { + private static member; +} +declare class x71 { + private static member; +} +declare class x72 { + private static member; +} +declare class x73 { + static member: () => Base[]; +} +declare class x74 { + static member: () => Base[]; +} +declare class x75 { + static member: () => Base[]; +} +declare class x76 { + static member: { + (): Base[]; + }; +} +declare class x77 { + static member: { + (): Base[]; + }; +} +declare class x78 { + static member: { + (): Base[]; + }; +} +declare class x79 { + static member: Base[]; +} +declare class x80 { + static member: Array; +} +declare class x81 { + static member: { + [n: number]: Base; + }; +} +declare class x82 { + static member: { + n: Base[]; + }; +} +declare class x83 { + static member: (s: Base[]) => any; +} +declare class x84 { + static member: Genric; +} +declare class x85 { + constructor(parm?: () => Base[]); +} +declare class x86 { + constructor(parm?: () => Base[]); +} +declare class x87 { + constructor(parm?: () => Base[]); +} +declare class x88 { + constructor(parm?: { + (): Base[]; + }); +} +declare class x89 { + constructor(parm?: { + (): Base[]; + }); +} +declare class x90 { + constructor(parm?: { + (): Base[]; + }); +} +declare class x91 { + constructor(parm?: Base[]); +} +declare class x92 { + constructor(parm?: Array); +} +declare class x93 { + constructor(parm?: { + [n: number]: Base; + }); +} +declare class x94 { + constructor(parm?: { + n: Base[]; + }); +} +declare class x95 { + constructor(parm?: (s: Base[]) => any); +} +declare class x96 { + constructor(parm?: Genric); +} +declare class x97 { + parm: () => Base[]; + constructor(parm?: () => Base[]); +} +declare class x98 { + parm: () => Base[]; + constructor(parm?: () => Base[]); +} +declare class x99 { + parm: () => Base[]; + constructor(parm?: () => Base[]); +} +declare class x100 { + parm: { + (): Base[]; + }; + constructor(parm?: { + (): Base[]; + }); +} +declare class x101 { + parm: { + (): Base[]; + }; + constructor(parm?: { + (): Base[]; + }); +} +declare class x102 { + parm: { + (): Base[]; + }; + constructor(parm?: { + (): Base[]; + }); +} +declare class x103 { + parm: Base[]; + constructor(parm?: Base[]); +} +declare class x104 { + parm: Array; + constructor(parm?: Array); +} +declare class x105 { + parm: { + [n: number]: Base; + }; + constructor(parm?: { + [n: number]: Base; + }); +} +declare class x106 { + parm: { + n: Base[]; + }; + constructor(parm?: { + n: Base[]; + }); +} +declare class x107 { + parm: (s: Base[]) => any; + constructor(parm?: (s: Base[]) => any); +} +declare class x108 { + parm: Genric; + constructor(parm?: Genric); +} +declare class x109 { + private parm; + constructor(parm?: () => Base[]); +} +declare class x110 { + private parm; + constructor(parm?: () => Base[]); +} +declare class x111 { + private parm; + constructor(parm?: () => Base[]); +} +declare class x112 { + private parm; + constructor(parm?: { + (): Base[]; + }); +} +declare class x113 { + private parm; + constructor(parm?: { + (): Base[]; + }); +} +declare class x114 { + private parm; + constructor(parm?: { + (): Base[]; + }); +} +declare class x115 { + private parm; + constructor(parm?: Base[]); +} +declare class x116 { + private parm; + constructor(parm?: Array); +} +declare class x117 { + private parm; + constructor(parm?: { + [n: number]: Base; + }); +} +declare class x118 { + private parm; + constructor(parm?: { + n: Base[]; + }); +} +declare class x119 { + private parm; + constructor(parm?: (s: Base[]) => any); +} +declare class x120 { + private parm; + constructor(parm?: Genric); +} +declare function x121(parm?: () => Base[]): invalid; +declare function x122(parm?: () => Base[]): invalid; +declare function x123(parm?: () => Base[]): invalid; +declare function x124(parm?: { + (): Base[]; +}): invalid; +declare function x125(parm?: { + (): Base[]; +}): invalid; +declare function x126(parm?: { + (): Base[]; +}): invalid; +declare function x127(parm?: Base[]): invalid; +declare function x128(parm?: Array): invalid; +declare function x129(parm?: { + [n: number]: Base; +}): invalid; +declare function x130(parm?: { + n: Base[]; +}): invalid; +declare function x131(parm?: (s: Base[]) => any): invalid; +declare function x132(parm?: Genric): invalid; +declare function x133(): () => Base[]; +declare function x134(): () => Base[]; +declare function x135(): () => Base[]; +declare function x136(): { + (): Base[]; +}; +declare function x137(): { + (): Base[]; +}; +declare function x138(): { + (): Base[]; +}; +declare function x139(): Base[]; +declare function x140(): Array; +declare function x141(): { + [n: number]: Base; +}; +declare function x142(): { + n: Base[]; +}; +declare function x143(): (s: Base[]) => any; +declare function x144(): Genric; +declare function x145(): () => Base[]; +declare function x146(): () => Base[]; +declare function x147(): () => Base[]; +declare function x148(): { + (): Base[]; +}; +declare function x149(): { + (): Base[]; +}; +declare function x150(): { + (): Base[]; +}; +declare function x151(): Base[]; +declare function x152(): Array; +declare function x153(): { + [n: number]: Base; +}; +declare function x154(): { + n: Base[]; +}; +declare function x155(): (s: Base[]) => any; +declare function x156(): Genric; +declare var x157: () => () => Base[]; +declare var x158: () => () => Base[]; +declare var x159: () => () => Base[]; +declare var x160: () => { + (): Base[]; +}; +declare var x161: () => { + (): Base[]; +}; +declare var x162: () => { + (): Base[]; +}; +declare var x163: () => Base[]; +declare var x164: () => Array; +declare var x165: () => { + [n: number]: Base; +}; +declare var x166: () => { + n: Base[]; +}; +declare var x167: () => (s: Base[]) => any; +declare var x168: () => Genric; +declare var x169: () => () => Base[]; +declare var x170: () => () => Base[]; +declare var x171: () => () => Base[]; +declare var x172: () => { + (): Base[]; +}; +declare var x173: () => { + (): Base[]; +}; +declare var x174: () => { + (): Base[]; +}; +declare var x175: () => Base[]; +declare var x176: () => Array; +declare var x177: () => { + [n: number]: Base; +}; +declare var x178: () => { + n: Base[]; +}; +declare var x179: () => (s: Base[]) => any; +declare var x180: () => Genric; +declare namespace x181 { } +declare namespace x182 { } +declare namespace x183 { } +declare namespace x184 { } +declare namespace x185 { } +declare namespace x186 { } +declare namespace x187 { } +declare namespace x188 { } +declare namespace x189 { } +declare namespace x190 { } +declare namespace x191 { } +declare namespace x192 { } +declare namespace x193 { + var t: () => Base[]; +} +declare namespace x194 { + var t: () => Base[]; +} +declare namespace x195 { + var t: () => Base[]; +} +declare namespace x196 { + var t: { + (): Base[]; + }; +} +declare namespace x197 { + var t: { + (): Base[]; + }; +} +declare namespace x198 { + var t: { + (): Base[]; + }; +} +declare namespace x199 { + var t: Base[]; +} +declare namespace x200 { + var t: Array; +} +declare namespace x201 { + var t: { + [n: number]: Base; + }; +} +declare namespace x202 { + var t: { + n: Base[]; + }; +} +declare namespace x203 { + var t: (s: Base[]) => any; +} +declare namespace x204 { + var t: Genric; +} +declare var x206: () => Base[]; +declare var x207: () => Base[]; +declare var x209: () => Base[]; +declare var x210: () => Base[]; +declare var x211: Base[]; +declare var x212: Base[]; +declare var x213: { + [n: number]: Base; +}; +declare var x214: { + n: Base[]; +}; +declare var x216: Genric; +declare var x217: invalid; +declare var x218: invalid; +declare var x219: invalid; +declare var x220: invalid; +declare var x221: invalid; +declare var x222: invalid; +declare var x223: invalid; +declare var x224: invalid; +declare var x225: () => Base[]; +declare var x226: () => Base[]; +declare var x227: () => Base[]; +declare var x228: { + (): Base[]; +}; +declare var x229: { + (): Base[]; +}; +declare var x230: { + (): Base[]; +}; +declare var x231: Base[]; +declare var x232: Array; +declare var x233: { + [n: number]: Base; +}; +declare var x234: { + n: Base[]; +}; +declare var x235: (s: Base[]) => any; +declare var x236: Genric; +declare var x237: { + n: () => Base[]; +}; +declare var x238: { + n: () => Base[]; +}; +declare var x239: { + n: () => Base[]; +}; +declare var x240: { + n: { + (): Base[]; + }; +}; +declare var x241: { + n: { + (): Base[]; + }; +}; +declare var x242: { + n: { + (): Base[]; + }; +}; +declare var x243: { + n: Base[]; +}; +declare var x244: { + n: Array; +}; +declare var x245: { + n: { + [n: number]: Base; + }; +}; +declare var x246: { + n: { + n: Base[]; + }; +}; +declare var x247: { + n: (s: Base[]) => any; +}; +declare var x248: { + n: Genric; +}; +declare var x252: { + (): Base[]; +}[]; +declare var x253: { + (): Base[]; +}[]; +declare var x254: { + (): Base[]; +}[]; +declare var x255: Base[][]; +declare var x256: Array[]; +declare var x257: { + [n: number]: Base; +}[]; +declare var x258: { + n: Base[]; +}[]; +declare var x260: Genric[]; +declare var x261: () => Base[]; +declare var x262: () => Base[]; +declare var x263: { + (): Base[]; +}; +declare var x264: { + (): Base[]; +}; +declare var x265: Base[]; +declare var x266: Array; +declare var x267: { + [n: number]: Base; +}; +declare var x268: { + n: Base[]; +}; +declare var x269: () => Base[]; +declare var x270: () => Base[]; +declare var x271: { + (): Base[]; +}; +declare var x272: { + (): Base[]; +}; +declare var x273: Base[]; +declare var x274: Array; +declare var x275: { + [n: number]: Base; +}; +declare var x276: { + n: Base[]; +}; +declare var x277: () => Base[]; +declare var x278: () => Base[]; +declare var x279: { + (): Base[]; +}; +declare var x280: { + (): Base[]; +}; +declare var x281: Base[]; +declare var x282: Array; +declare var x283: { + [n: number]: Base; +}; +declare var x284: { + n: Base[]; +}; +declare var x285: () => Base[]; +declare var x286: () => Base[]; +declare var x287: () => Base[]; +declare var x288: { + (): Base[]; +}; +declare var x289: { + (): Base[]; +}; +declare var x290: { + (): Base[]; +}; +declare var x291: Base[]; +declare var x292: Array; +declare var x293: { + [n: number]: Base; +}; +declare var x294: { + n: Base[]; +}; +declare var x295: (s: Base[]) => any; +declare var x296: Genric; +declare var x297: () => Base[]; +declare var x298: () => Base[]; +declare var x299: () => Base[]; +declare var x300: { + (): Base[]; +}; +declare var x301: { + (): Base[]; +}; +declare var x302: { + (): Base[]; +}; +declare var x303: Base[]; +declare var x304: Array; +declare var x305: { + [n: number]: Base; +}; +declare var x306: { + n: Base[]; +}; +declare var x307: (s: Base[]) => any; +declare var x308: Genric; +declare var x309: () => Base[]; +declare var x310: () => Base[]; +declare var x311: () => Base[]; +declare var x312: { + (): Base[]; +}; +declare var x313: { + (): Base[]; +}; +declare var x314: { + (): Base[]; +}; +declare var x315: Base[]; +declare var x316: Array; +declare var x317: { + [n: number]: Base; +}; +declare var x318: { + n: Base[]; +}; +declare var x319: (s: Base[]) => any; +declare var x320: Genric; +declare function x321(n: () => Base[]): invalid; +declare function x322(n: () => Base[]): invalid; +declare function x323(n: () => Base[]): invalid; +declare function x324(n: { + (): Base[]; +}): invalid; +declare function x325(n: { + (): Base[]; +}): invalid; +declare function x326(n: { + (): Base[]; +}): invalid; +declare function x327(n: Base[]): invalid; +declare function x328(n: Array): invalid; +declare function x329(n: { + [n: number]: Base; +}): invalid; +declare function x330(n: { + n: Base[]; +}): invalid; +declare function x331(n: (s: Base[]) => any): invalid; +declare function x332(n: Genric): invalid; +declare var x333: (n: () => Base[]) => invalid; +declare var x334: (n: () => Base[]) => invalid; +declare var x335: (n: () => Base[]) => invalid; +declare var x336: (n: { + (): Base[]; +}) => invalid; +declare var x337: (n: { + (): Base[]; +}) => invalid; +declare var x338: (n: { + (): Base[]; +}) => invalid; +declare var x339: (n: Base[]) => invalid; +declare var x340: (n: Array) => invalid; +declare var x341: (n: { + [n: number]: Base; +}) => invalid; +declare var x342: (n: { + n: Base[]; +}) => invalid; +declare var x343: (n: (s: Base[]) => any) => invalid; +declare var x344: (n: Genric) => invalid; +declare var x345: (n: () => Base[]) => invalid; +declare var x346: (n: () => Base[]) => invalid; +declare var x347: (n: () => Base[]) => invalid; +declare var x348: (n: { + (): Base[]; +}) => invalid; +declare var x349: (n: { + (): Base[]; +}) => invalid; +declare var x350: (n: { + (): Base[]; +}) => invalid; +declare var x351: (n: Base[]) => invalid; +declare var x352: (n: Array) => invalid; +declare var x353: (n: { + [n: number]: Base; +}) => invalid; +declare var x354: (n: { + n: Base[]; +}) => invalid; +declare var x355: (n: (s: Base[]) => any) => invalid; +declare var x356: (n: Genric) => invalid; + +/// [Errors] //// + +generatedContextualTyping.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(5,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(5,47): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(126,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(127,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(128,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(129,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(130,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(131,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(132,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(133,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(134,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(135,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(136,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(137,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(219,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(220,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(221,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(222,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(223,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(224,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(225,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(226,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(319,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(320,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(321,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(322,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(323,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(324,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(325,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(326,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(327,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(328,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(329,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(330,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(331,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(332,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(333,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(334,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(335,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(336,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(337,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(338,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(339,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(340,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(341,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(342,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(343,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(344,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(345,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(346,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(347,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(348,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(349,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(350,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(351,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(352,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(353,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(354,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== generatedContextualTyping.ts (59 errors) ==== + class Base { private p; } + class Derived1 extends Base { private m; } + class Derived2 extends Base { private n; } + interface Genric { func(n: T[]); } + var b = new Base(), d1 = new Derived1(), d2 = new Derived2(); + ~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x1: () => Base[] = () => [d1, d2]; + var x2: () => Base[] = function() { return [d1, d2] }; + var x3: () => Base[] = function named() { return [d1, d2] }; + var x4: { (): Base[]; } = () => [d1, d2]; + var x5: { (): Base[]; } = function() { return [d1, d2] }; + var x6: { (): Base[]; } = function named() { return [d1, d2] }; + var x7: Base[] = [d1, d2]; + var x8: Array = [d1, d2]; + var x9: { [n: number]: Base; } = [d1, d2]; + var x10: {n: Base[]; } = { n: [d1, d2] }; + var x11: (s: Base[]) => any = n => { var n: Base[]; return null; }; + var x12: Genric = { func: n => { return [d1, d2]; } }; + class x13 { member: () => Base[] = () => [d1, d2] } + class x14 { member: () => Base[] = function() { return [d1, d2] } } + class x15 { member: () => Base[] = function named() { return [d1, d2] } } + class x16 { member: { (): Base[]; } = () => [d1, d2] } + class x17 { member: { (): Base[]; } = function() { return [d1, d2] } } + class x18 { member: { (): Base[]; } = function named() { return [d1, d2] } } + class x19 { member: Base[] = [d1, d2] } + class x20 { member: Array = [d1, d2] } + class x21 { member: { [n: number]: Base; } = [d1, d2] } + class x22 { member: {n: Base[]; } = { n: [d1, d2] } } + class x23 { member: (s: Base[]) => any = n => { var n: Base[]; return null; } } + class x24 { member: Genric = { func: n => { return [d1, d2]; } } } + class x25 { private member: () => Base[] = () => [d1, d2] } + class x26 { private member: () => Base[] = function() { return [d1, d2] } } + class x27 { private member: () => Base[] = function named() { return [d1, d2] } } + class x28 { private member: { (): Base[]; } = () => [d1, d2] } + class x29 { private member: { (): Base[]; } = function() { return [d1, d2] } } + class x30 { private member: { (): Base[]; } = function named() { return [d1, d2] } } + class x31 { private member: Base[] = [d1, d2] } + class x32 { private member: Array = [d1, d2] } + class x33 { private member: { [n: number]: Base; } = [d1, d2] } + class x34 { private member: {n: Base[]; } = { n: [d1, d2] } } + class x35 { private member: (s: Base[]) => any = n => { var n: Base[]; return null; } } + class x36 { private member: Genric = { func: n => { return [d1, d2]; } } } + class x37 { public member: () => Base[] = () => [d1, d2] } + class x38 { public member: () => Base[] = function() { return [d1, d2] } } + class x39 { public member: () => Base[] = function named() { return [d1, d2] } } + class x40 { public member: { (): Base[]; } = () => [d1, d2] } + class x41 { public member: { (): Base[]; } = function() { return [d1, d2] } } + class x42 { public member: { (): Base[]; } = function named() { return [d1, d2] } } + class x43 { public member: Base[] = [d1, d2] } + class x44 { public member: Array = [d1, d2] } + class x45 { public member: { [n: number]: Base; } = [d1, d2] } + class x46 { public member: {n: Base[]; } = { n: [d1, d2] } } + class x47 { public member: (s: Base[]) => any = n => { var n: Base[]; return null; } } + class x48 { public member: Genric = { func: n => { return [d1, d2]; } } } + class x49 { static member: () => Base[] = () => [d1, d2] } + class x50 { static member: () => Base[] = function() { return [d1, d2] } } + class x51 { static member: () => Base[] = function named() { return [d1, d2] } } + class x52 { static member: { (): Base[]; } = () => [d1, d2] } + class x53 { static member: { (): Base[]; } = function() { return [d1, d2] } } + class x54 { static member: { (): Base[]; } = function named() { return [d1, d2] } } + class x55 { static member: Base[] = [d1, d2] } + class x56 { static member: Array = [d1, d2] } + class x57 { static member: { [n: number]: Base; } = [d1, d2] } + class x58 { static member: {n: Base[]; } = { n: [d1, d2] } } + class x59 { static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } + class x60 { static member: Genric = { func: n => { return [d1, d2]; } } } + class x61 { private static member: () => Base[] = () => [d1, d2] } + class x62 { private static member: () => Base[] = function() { return [d1, d2] } } + class x63 { private static member: () => Base[] = function named() { return [d1, d2] } } + class x64 { private static member: { (): Base[]; } = () => [d1, d2] } + class x65 { private static member: { (): Base[]; } = function() { return [d1, d2] } } + class x66 { private static member: { (): Base[]; } = function named() { return [d1, d2] } } + class x67 { private static member: Base[] = [d1, d2] } + class x68 { private static member: Array = [d1, d2] } + class x69 { private static member: { [n: number]: Base; } = [d1, d2] } + class x70 { private static member: {n: Base[]; } = { n: [d1, d2] } } + class x71 { private static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } + class x72 { private static member: Genric = { func: n => { return [d1, d2]; } } } + class x73 { public static member: () => Base[] = () => [d1, d2] } + class x74 { public static member: () => Base[] = function() { return [d1, d2] } } + class x75 { public static member: () => Base[] = function named() { return [d1, d2] } } + class x76 { public static member: { (): Base[]; } = () => [d1, d2] } + class x77 { public static member: { (): Base[]; } = function() { return [d1, d2] } } + class x78 { public static member: { (): Base[]; } = function named() { return [d1, d2] } } + class x79 { public static member: Base[] = [d1, d2] } + class x80 { public static member: Array = [d1, d2] } + class x81 { public static member: { [n: number]: Base; } = [d1, d2] } + class x82 { public static member: {n: Base[]; } = { n: [d1, d2] } } + class x83 { public static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } + class x84 { public static member: Genric = { func: n => { return [d1, d2]; } } } + class x85 { constructor(parm: () => Base[] = () => [d1, d2]) { } } + class x86 { constructor(parm: () => Base[] = function() { return [d1, d2] }) { } } + class x87 { constructor(parm: () => Base[] = function named() { return [d1, d2] }) { } } + class x88 { constructor(parm: { (): Base[]; } = () => [d1, d2]) { } } + class x89 { constructor(parm: { (): Base[]; } = function() { return [d1, d2] }) { } } + class x90 { constructor(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } + class x91 { constructor(parm: Base[] = [d1, d2]) { } } + class x92 { constructor(parm: Array = [d1, d2]) { } } + class x93 { constructor(parm: { [n: number]: Base; } = [d1, d2]) { } } + class x94 { constructor(parm: {n: Base[]; } = { n: [d1, d2] }) { } } + class x95 { constructor(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } + class x96 { constructor(parm: Genric = { func: n => { return [d1, d2]; } }) { } } + class x97 { constructor(public parm: () => Base[] = () => [d1, d2]) { } } + class x98 { constructor(public parm: () => Base[] = function() { return [d1, d2] }) { } } + class x99 { constructor(public parm: () => Base[] = function named() { return [d1, d2] }) { } } + class x100 { constructor(public parm: { (): Base[]; } = () => [d1, d2]) { } } + class x101 { constructor(public parm: { (): Base[]; } = function() { return [d1, d2] }) { } } + class x102 { constructor(public parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } + class x103 { constructor(public parm: Base[] = [d1, d2]) { } } + class x104 { constructor(public parm: Array = [d1, d2]) { } } + class x105 { constructor(public parm: { [n: number]: Base; } = [d1, d2]) { } } + class x106 { constructor(public parm: {n: Base[]; } = { n: [d1, d2] }) { } } + class x107 { constructor(public parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } + class x108 { constructor(public parm: Genric = { func: n => { return [d1, d2]; } }) { } } + class x109 { constructor(private parm: () => Base[] = () => [d1, d2]) { } } + class x110 { constructor(private parm: () => Base[] = function() { return [d1, d2] }) { } } + class x111 { constructor(private parm: () => Base[] = function named() { return [d1, d2] }) { } } + class x112 { constructor(private parm: { (): Base[]; } = () => [d1, d2]) { } } + class x113 { constructor(private parm: { (): Base[]; } = function() { return [d1, d2] }) { } } + class x114 { constructor(private parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } + class x115 { constructor(private parm: Base[] = [d1, d2]) { } } + class x116 { constructor(private parm: Array = [d1, d2]) { } } + class x117 { constructor(private parm: { [n: number]: Base; } = [d1, d2]) { } } + class x118 { constructor(private parm: {n: Base[]; } = { n: [d1, d2] }) { } } + class x119 { constructor(private parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } + class x120 { constructor(private parm: Genric = { func: n => { return [d1, d2]; } }) { } } + function x121(parm: () => Base[] = () => [d1, d2]) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x122(parm: () => Base[] = function() { return [d1, d2] }) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x123(parm: () => Base[] = function named() { return [d1, d2] }) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x124(parm: { (): Base[]; } = () => [d1, d2]) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x125(parm: { (): Base[]; } = function() { return [d1, d2] }) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x126(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x127(parm: Base[] = [d1, d2]) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x128(parm: Array = [d1, d2]) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x129(parm: { [n: number]: Base; } = [d1, d2]) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x130(parm: {n: Base[]; } = { n: [d1, d2] }) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x131(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x132(parm: Genric = { func: n => { return [d1, d2]; } }) { } + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x133(): () => Base[] { return () => [d1, d2]; } + function x134(): () => Base[] { return function() { return [d1, d2] }; } + function x135(): () => Base[] { return function named() { return [d1, d2] }; } + function x136(): { (): Base[]; } { return () => [d1, d2]; } + function x137(): { (): Base[]; } { return function() { return [d1, d2] }; } + function x138(): { (): Base[]; } { return function named() { return [d1, d2] }; } + function x139(): Base[] { return [d1, d2]; } + function x140(): Array { return [d1, d2]; } + function x141(): { [n: number]: Base; } { return [d1, d2]; } + function x142(): {n: Base[]; } { return { n: [d1, d2] }; } + function x143(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; } + function x144(): Genric { return { func: n => { return [d1, d2]; } }; } + function x145(): () => Base[] { return () => [d1, d2]; return () => [d1, d2]; } + function x146(): () => Base[] { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } + function x147(): () => Base[] { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } + function x148(): { (): Base[]; } { return () => [d1, d2]; return () => [d1, d2]; } + function x149(): { (): Base[]; } { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } + function x150(): { (): Base[]; } { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } + function x151(): Base[] { return [d1, d2]; return [d1, d2]; } + function x152(): Array { return [d1, d2]; return [d1, d2]; } + function x153(): { [n: number]: Base; } { return [d1, d2]; return [d1, d2]; } + function x154(): {n: Base[]; } { return { n: [d1, d2] }; return { n: [d1, d2] }; } + function x155(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; return n => { var n: Base[]; return null; }; } + function x156(): Genric { return { func: n => { return [d1, d2]; } }; return { func: n => { return [d1, d2]; } }; } + var x157: () => () => Base[] = () => { return () => [d1, d2]; }; + var x158: () => () => Base[] = () => { return function() { return [d1, d2] }; }; + var x159: () => () => Base[] = () => { return function named() { return [d1, d2] }; }; + var x160: () => { (): Base[]; } = () => { return () => [d1, d2]; }; + var x161: () => { (): Base[]; } = () => { return function() { return [d1, d2] }; }; + var x162: () => { (): Base[]; } = () => { return function named() { return [d1, d2] }; }; + var x163: () => Base[] = () => { return [d1, d2]; }; + var x164: () => Array = () => { return [d1, d2]; }; + var x165: () => { [n: number]: Base; } = () => { return [d1, d2]; }; + var x166: () => {n: Base[]; } = () => { return { n: [d1, d2] }; }; + var x167: () => (s: Base[]) => any = () => { return n => { var n: Base[]; return null; }; }; + var x168: () => Genric = () => { return { func: n => { return [d1, d2]; } }; }; + var x169: () => () => Base[] = function() { return () => [d1, d2]; }; + var x170: () => () => Base[] = function() { return function() { return [d1, d2] }; }; + var x171: () => () => Base[] = function() { return function named() { return [d1, d2] }; }; + var x172: () => { (): Base[]; } = function() { return () => [d1, d2]; }; + var x173: () => { (): Base[]; } = function() { return function() { return [d1, d2] }; }; + var x174: () => { (): Base[]; } = function() { return function named() { return [d1, d2] }; }; + var x175: () => Base[] = function() { return [d1, d2]; }; + var x176: () => Array = function() { return [d1, d2]; }; + var x177: () => { [n: number]: Base; } = function() { return [d1, d2]; }; + var x178: () => {n: Base[]; } = function() { return { n: [d1, d2] }; }; + var x179: () => (s: Base[]) => any = function() { return n => { var n: Base[]; return null; }; }; + var x180: () => Genric = function() { return { func: n => { return [d1, d2]; } }; }; + module x181 { var t: () => Base[] = () => [d1, d2]; } + module x182 { var t: () => Base[] = function() { return [d1, d2] }; } + module x183 { var t: () => Base[] = function named() { return [d1, d2] }; } + module x184 { var t: { (): Base[]; } = () => [d1, d2]; } + module x185 { var t: { (): Base[]; } = function() { return [d1, d2] }; } + module x186 { var t: { (): Base[]; } = function named() { return [d1, d2] }; } + module x187 { var t: Base[] = [d1, d2]; } + module x188 { var t: Array = [d1, d2]; } + module x189 { var t: { [n: number]: Base; } = [d1, d2]; } + module x190 { var t: {n: Base[]; } = { n: [d1, d2] }; } + module x191 { var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } + module x192 { var t: Genric = { func: n => { return [d1, d2]; } }; } + module x193 { export var t: () => Base[] = () => [d1, d2]; } + module x194 { export var t: () => Base[] = function() { return [d1, d2] }; } + module x195 { export var t: () => Base[] = function named() { return [d1, d2] }; } + module x196 { export var t: { (): Base[]; } = () => [d1, d2]; } + module x197 { export var t: { (): Base[]; } = function() { return [d1, d2] }; } + module x198 { export var t: { (): Base[]; } = function named() { return [d1, d2] }; } + module x199 { export var t: Base[] = [d1, d2]; } + module x200 { export var t: Array = [d1, d2]; } + module x201 { export var t: { [n: number]: Base; } = [d1, d2]; } + module x202 { export var t: {n: Base[]; } = { n: [d1, d2] }; } + module x203 { export var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } + module x204 { export var t: Genric = { func: n => { return [d1, d2]; } }; } + var x206 = <() => Base[]>function() { return [d1, d2] }; + var x207 = <() => Base[]>function named() { return [d1, d2] }; + var x209 = <{ (): Base[]; }>function() { return [d1, d2] }; + var x210 = <{ (): Base[]; }>function named() { return [d1, d2] }; + var x211 = [d1, d2]; + var x212 = >[d1, d2]; + var x213 = <{ [n: number]: Base; }>[d1, d2]; + var x214 = <{n: Base[]; } >{ n: [d1, d2] }; + var x216 = >{ func: n => { return [d1, d2]; } }; + var x217 = (<() => Base[]>undefined) || function() { return [d1, d2] }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x218 = (<() => Base[]>undefined) || function named() { return [d1, d2] }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x219 = (<{ (): Base[]; }>undefined) || function() { return [d1, d2] }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x220 = (<{ (): Base[]; }>undefined) || function named() { return [d1, d2] }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x221 = (undefined) || [d1, d2]; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x222 = (>undefined) || [d1, d2]; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x223 = (<{ [n: number]: Base; }>undefined) || [d1, d2]; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x224 = (<{n: Base[]; } >undefined) || { n: [d1, d2] }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x225: () => Base[]; x225 = () => [d1, d2]; + var x226: () => Base[]; x226 = function() { return [d1, d2] }; + var x227: () => Base[]; x227 = function named() { return [d1, d2] }; + var x228: { (): Base[]; }; x228 = () => [d1, d2]; + var x229: { (): Base[]; }; x229 = function() { return [d1, d2] }; + var x230: { (): Base[]; }; x230 = function named() { return [d1, d2] }; + var x231: Base[]; x231 = [d1, d2]; + var x232: Array; x232 = [d1, d2]; + var x233: { [n: number]: Base; }; x233 = [d1, d2]; + var x234: {n: Base[]; } ; x234 = { n: [d1, d2] }; + var x235: (s: Base[]) => any; x235 = n => { var n: Base[]; return null; }; + var x236: Genric; x236 = { func: n => { return [d1, d2]; } }; + var x237: { n: () => Base[]; } = { n: () => [d1, d2] }; + var x238: { n: () => Base[]; } = { n: function() { return [d1, d2] } }; + var x239: { n: () => Base[]; } = { n: function named() { return [d1, d2] } }; + var x240: { n: { (): Base[]; }; } = { n: () => [d1, d2] }; + var x241: { n: { (): Base[]; }; } = { n: function() { return [d1, d2] } }; + var x242: { n: { (): Base[]; }; } = { n: function named() { return [d1, d2] } }; + var x243: { n: Base[]; } = { n: [d1, d2] }; + var x244: { n: Array; } = { n: [d1, d2] }; + var x245: { n: { [n: number]: Base; }; } = { n: [d1, d2] }; + var x246: { n: {n: Base[]; } ; } = { n: { n: [d1, d2] } }; + var x247: { n: (s: Base[]) => any; } = { n: n => { var n: Base[]; return null; } }; + var x248: { n: Genric; } = { n: { func: n => { return [d1, d2]; } } }; + var x252: { (): Base[]; }[] = [() => [d1, d2]]; + var x253: { (): Base[]; }[] = [function() { return [d1, d2] }]; + var x254: { (): Base[]; }[] = [function named() { return [d1, d2] }]; + var x255: Base[][] = [[d1, d2]]; + var x256: Array[] = [[d1, d2]]; + var x257: { [n: number]: Base; }[] = [[d1, d2]]; + var x258: {n: Base[]; } [] = [{ n: [d1, d2] }]; + var x260: Genric[] = [{ func: n => { return [d1, d2]; } }]; + var x261: () => Base[] = function() { return [d1, d2] } || undefined; + var x262: () => Base[] = function named() { return [d1, d2] } || undefined; + var x263: { (): Base[]; } = function() { return [d1, d2] } || undefined; + var x264: { (): Base[]; } = function named() { return [d1, d2] } || undefined; + var x265: Base[] = [d1, d2] || undefined; + var x266: Array = [d1, d2] || undefined; + var x267: { [n: number]: Base; } = [d1, d2] || undefined; + var x268: {n: Base[]; } = { n: [d1, d2] } || undefined; + var x269: () => Base[] = undefined || function() { return [d1, d2] }; + var x270: () => Base[] = undefined || function named() { return [d1, d2] }; + var x271: { (): Base[]; } = undefined || function() { return [d1, d2] }; + var x272: { (): Base[]; } = undefined || function named() { return [d1, d2] }; + var x273: Base[] = undefined || [d1, d2]; + var x274: Array = undefined || [d1, d2]; + var x275: { [n: number]: Base; } = undefined || [d1, d2]; + var x276: {n: Base[]; } = undefined || { n: [d1, d2] }; + var x277: () => Base[] = function() { return [d1, d2] } || function() { return [d1, d2] }; + var x278: () => Base[] = function named() { return [d1, d2] } || function named() { return [d1, d2] }; + var x279: { (): Base[]; } = function() { return [d1, d2] } || function() { return [d1, d2] }; + var x280: { (): Base[]; } = function named() { return [d1, d2] } || function named() { return [d1, d2] }; + var x281: Base[] = [d1, d2] || [d1, d2]; + var x282: Array = [d1, d2] || [d1, d2]; + var x283: { [n: number]: Base; } = [d1, d2] || [d1, d2]; + var x284: {n: Base[]; } = { n: [d1, d2] } || { n: [d1, d2] }; + var x285: () => Base[] = true ? () => [d1, d2] : () => [d1, d2]; + var x286: () => Base[] = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; + var x287: () => Base[] = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; + var x288: { (): Base[]; } = true ? () => [d1, d2] : () => [d1, d2]; + var x289: { (): Base[]; } = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; + var x290: { (): Base[]; } = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; + var x291: Base[] = true ? [d1, d2] : [d1, d2]; + var x292: Array = true ? [d1, d2] : [d1, d2]; + var x293: { [n: number]: Base; } = true ? [d1, d2] : [d1, d2]; + var x294: {n: Base[]; } = true ? { n: [d1, d2] } : { n: [d1, d2] }; + var x295: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : n => { var n: Base[]; return null; }; + var x296: Genric = true ? { func: n => { return [d1, d2]; } } : { func: n => { return [d1, d2]; } }; + var x297: () => Base[] = true ? undefined : () => [d1, d2]; + var x298: () => Base[] = true ? undefined : function() { return [d1, d2] }; + var x299: () => Base[] = true ? undefined : function named() { return [d1, d2] }; + var x300: { (): Base[]; } = true ? undefined : () => [d1, d2]; + var x301: { (): Base[]; } = true ? undefined : function() { return [d1, d2] }; + var x302: { (): Base[]; } = true ? undefined : function named() { return [d1, d2] }; + var x303: Base[] = true ? undefined : [d1, d2]; + var x304: Array = true ? undefined : [d1, d2]; + var x305: { [n: number]: Base; } = true ? undefined : [d1, d2]; + var x306: {n: Base[]; } = true ? undefined : { n: [d1, d2] }; + var x307: (s: Base[]) => any = true ? undefined : n => { var n: Base[]; return null; }; + var x308: Genric = true ? undefined : { func: n => { return [d1, d2]; } }; + var x309: () => Base[] = true ? () => [d1, d2] : undefined; + var x310: () => Base[] = true ? function() { return [d1, d2] } : undefined; + var x311: () => Base[] = true ? function named() { return [d1, d2] } : undefined; + var x312: { (): Base[]; } = true ? () => [d1, d2] : undefined; + var x313: { (): Base[]; } = true ? function() { return [d1, d2] } : undefined; + var x314: { (): Base[]; } = true ? function named() { return [d1, d2] } : undefined; + var x315: Base[] = true ? [d1, d2] : undefined; + var x316: Array = true ? [d1, d2] : undefined; + var x317: { [n: number]: Base; } = true ? [d1, d2] : undefined; + var x318: {n: Base[]; } = true ? { n: [d1, d2] } : undefined; + var x319: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : undefined; + var x320: Genric = true ? { func: n => { return [d1, d2]; } } : undefined; + function x321(n: () => Base[]) { }; x321(() => [d1, d2]); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x322(n: () => Base[]) { }; x322(function() { return [d1, d2] }); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x323(n: () => Base[]) { }; x323(function named() { return [d1, d2] }); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x324(n: { (): Base[]; }) { }; x324(() => [d1, d2]); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x325(n: { (): Base[]; }) { }; x325(function() { return [d1, d2] }); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x326(n: { (): Base[]; }) { }; x326(function named() { return [d1, d2] }); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x327(n: Base[]) { }; x327([d1, d2]); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x328(n: Array) { }; x328([d1, d2]); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x329(n: { [n: number]: Base; }) { }; x329([d1, d2]); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x330(n: {n: Base[]; } ) { }; x330({ n: [d1, d2] }); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x331(n: (s: Base[]) => any) { }; x331(n => { var n: Base[]; return null; }); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function x332(n: Genric) { }; x332({ func: n => { return [d1, d2]; } }); + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x333 = (n: () => Base[]) => n; x333(() => [d1, d2]); + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x334 = (n: () => Base[]) => n; x334(function() { return [d1, d2] }); + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x335 = (n: () => Base[]) => n; x335(function named() { return [d1, d2] }); + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x336 = (n: { (): Base[]; }) => n; x336(() => [d1, d2]); + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x337 = (n: { (): Base[]; }) => n; x337(function() { return [d1, d2] }); + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x338 = (n: { (): Base[]; }) => n; x338(function named() { return [d1, d2] }); + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x339 = (n: Base[]) => n; x339([d1, d2]); + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x340 = (n: Array) => n; x340([d1, d2]); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x342 = (n: {n: Base[]; } ) => n; x342({ n: [d1, d2] }); + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x343 = (n: (s: Base[]) => any) => n; x343(n => { var n: Base[]; return null; }); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x344 = (n: Genric) => n; x344({ func: n => { return [d1, d2]; } }); + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x345 = function(n: () => Base[]) { }; x345(() => [d1, d2]); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x346 = function(n: () => Base[]) { }; x346(function() { return [d1, d2] }); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x347 = function(n: () => Base[]) { }; x347(function named() { return [d1, d2] }); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x348 = function(n: { (): Base[]; }) { }; x348(() => [d1, d2]); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x349 = function(n: { (): Base[]; }) { }; x349(function() { return [d1, d2] }); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x350 = function(n: { (): Base[]; }) { }; x350(function named() { return [d1, d2] }); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x351 = function(n: Base[]) { }; x351([d1, d2]); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x352 = function(n: Array) { }; x352([d1, d2]); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x354 = function(n: {n: Base[]; } ) { }; x354({ n: [d1, d2] }); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; return null; }); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument.d.ts new file mode 100644 index 0000000000000..e7258a5cbc9f9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument.d.ts @@ -0,0 +1,205 @@ +//// [tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts] //// + +//// [genericTypeReferenceWithoutTypeArgument.ts] +// it is an error to use a generic type without type arguments +// all of these are errors + +class C { + foo: T; +} + +var c: C; + +var a: { x: C }; +var b: { (x: C): C }; +var d: { [x: C]: C }; + +var e = (x: C) => { var y: C; return y; } + +function f(x: C): C { var y: C; return y; } + +var g = function f(x: C): C { var y: C; return y; } + +class D extends C { +} + +interface I extends C {} + +module M { + export class E { foo: T } +} + +class D2 extends M.E { } +class D3 { } +interface I2 extends M.E { } + +function h(x: T) { } +function i(x: T) { } + +var j = null; +var k = null; + +/// [Declarations] //// + + + +//// [genericTypeReferenceWithoutTypeArgument.d.ts] +declare class C { + foo: T; +} +declare var c: C; +declare var a: { + x: C; +}; +declare var b: { + (x: C): C; +}; +declare var d: { + [x: C]: C; +}; +declare var e: (x: C) => invalid; +declare function f(x: C): C; +declare var g: (x: any) => any; +declare class D extends C { +} +interface I extends C { +} +declare namespace M { + class E { + foo: T; + } +} +declare class D2 extends M.E { +} +declare class D3 { +} +interface I2 extends M.E { +} +declare function h(x: T): invalid; +declare function i(x: T): invalid; +declare var j: any; +declare var k: any; + +/// [Errors] //// + +genericTypeReferenceWithoutTypeArgument.ts(8,8): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(10,13): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(11,14): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(11,18): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(12,11): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. +genericTypeReferenceWithoutTypeArgument.ts(12,14): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(12,18): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument.ts(14,13): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(14,28): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(16,15): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(16,19): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(16,30): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(18,23): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(18,27): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(18,38): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(20,17): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(23,21): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(29,18): error TS2314: Generic type 'E' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(30,20): error TS2314: Generic type 'E' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(31,22): error TS2314: Generic type 'E' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(33,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument.ts(33,22): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument.ts(34,22): error TS2314: Generic type 'E' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(36,10): error TS2314: Generic type 'C' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument.ts(37,10): error TS2314: Generic type 'E' requires 1 type argument(s). + + +==== genericTypeReferenceWithoutTypeArgument.ts (27 errors) ==== + // it is an error to use a generic type without type arguments + // all of these are errors + + class C { + foo: T; + } + + var c: C; + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + + var a: { x: C }; + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + var b: { (x: C): C }; + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + var d: { [x: C]: C }; + ~ +!!! error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + + var e = (x: C) => { var y: C; return y; } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + + function f(x: C): C { var y: C; return y; } + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + + var g = function f(x: C): C { var y: C; return y; } + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + + class D extends C { + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + } + + interface I extends C {} + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + + module M { + export class E { foo: T } + } + + class D2 extends M.E { } + ~~~ +!!! error TS2314: Generic type 'E' requires 1 type argument(s). + class D3 { } + ~~~ +!!! error TS2314: Generic type 'E' requires 1 type argument(s). + interface I2 extends M.E { } + ~~~ +!!! error TS2314: Generic type 'E' requires 1 type argument(s). + + function h(x: T) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + function i(x: T) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS2314: Generic type 'E' requires 1 type argument(s). + + var j = null; + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + var k = null; + ~~~ +!!! error TS2314: Generic type 'E' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument2.d.ts new file mode 100644 index 0000000000000..c49ebcb9bad83 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument2.d.ts @@ -0,0 +1,214 @@ +//// [tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts] //// + +//// [genericTypeReferenceWithoutTypeArgument2.ts] +// it is an error to use a generic type without type arguments +// all of these are errors + +interface I { + foo: T; +} + +var c: I; + +var a: { x: I }; +var b: { (x: I): I }; +var d: { [x: I]: I }; + +var e = (x: I) => { var y: I; return y; } + +function f(x: I): I { var y: I; return y; } + +var g = function f(x: I): I { var y: I; return y; } + +class D extends I { +} + +interface U extends I {} + +module M { + export interface E { foo: T } +} + +class D2 extends M.C { } +interface D3 { } +interface I2 extends M.C { } + +function h(x: T) { } +function i(x: T) { } + +var j = null; +var k = null; + +/// [Declarations] //// + + + +//// [genericTypeReferenceWithoutTypeArgument2.d.ts] +interface I { + foo: T; +} +declare var c: I; +declare var a: { + x: I; +}; +declare var b: { + (x: I): I; +}; +declare var d: { + [x: I]: I; +}; +declare var e: (x: I) => invalid; +declare function f(x: I): I; +declare var g: (x: any) => any; +declare class D extends I { +} +interface U extends I { +} +declare namespace M { + interface E { + foo: T; + } +} +declare class D2 extends M.C { +} +interface D3 { +} +interface I2 extends M.C { +} +declare function h(x: T): invalid; +declare function i(x: T): invalid; +declare var j: C; +declare var k: any; + +/// [Errors] //// + +genericTypeReferenceWithoutTypeArgument2.ts(8,8): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(10,13): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(11,14): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(11,18): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(12,11): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. +genericTypeReferenceWithoutTypeArgument2.ts(12,14): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(12,18): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument2.ts(14,13): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(14,28): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(16,15): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(16,19): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(16,30): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(18,23): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(18,27): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(18,38): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(20,17): error TS2689: Cannot extend an interface 'I'. Did you mean 'implements'? +genericTypeReferenceWithoutTypeArgument2.ts(20,17): error TS4020: 'extends' clause of exported class 'D' has or is using private name 'I'. +genericTypeReferenceWithoutTypeArgument2.ts(23,21): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(29,18): error TS2708: Cannot use namespace 'M' as a value. +genericTypeReferenceWithoutTypeArgument2.ts(29,18): error TS4020: 'extends' clause of exported class 'D2' has or is using private name 'M'. +genericTypeReferenceWithoutTypeArgument2.ts(30,24): error TS2314: Generic type 'E' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(31,24): error TS2694: Namespace 'M' has no exported member 'C'. +genericTypeReferenceWithoutTypeArgument2.ts(33,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument2.ts(33,22): error TS2314: Generic type 'I' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument2.ts(34,22): error TS2314: Generic type 'E' requires 1 type argument(s). +genericTypeReferenceWithoutTypeArgument2.ts(36,10): error TS2304: Cannot find name 'C'. +genericTypeReferenceWithoutTypeArgument2.ts(36,10): error TS4025: Exported variable 'j' has or is using private name 'C'. +genericTypeReferenceWithoutTypeArgument2.ts(37,10): error TS2314: Generic type 'E' requires 1 type argument(s). + + +==== genericTypeReferenceWithoutTypeArgument2.ts (30 errors) ==== + // it is an error to use a generic type without type arguments + // all of these are errors + + interface I { + foo: T; + } + + var c: I; + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + + var a: { x: I }; + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + var b: { (x: I): I }; + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + var d: { [x: I]: I }; + ~ +!!! error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + + var e = (x: I) => { var y: I; return y; } + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + + function f(x: I): I { var y: I; return y; } + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + + var g = function f(x: I): I { var y: I; return y; } + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + + class D extends I { + ~ +!!! error TS2689: Cannot extend an interface 'I'. Did you mean 'implements'? + ~ +!!! error TS4020: 'extends' clause of exported class 'D' has or is using private name 'I'. + } + + interface U extends I {} + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + + module M { + export interface E { foo: T } + } + + class D2 extends M.C { } + ~ +!!! error TS2708: Cannot use namespace 'M' as a value. + ~ +!!! error TS4020: 'extends' clause of exported class 'D2' has or is using private name 'M'. + interface D3 { } + ~~~ +!!! error TS2314: Generic type 'E' requires 1 type argument(s). + interface I2 extends M.C { } + ~ +!!! error TS2694: Namespace 'M' has no exported member 'C'. + + function h(x: T) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS2314: Generic type 'I' requires 1 type argument(s). + function i(x: T) { } + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~ +!!! error TS2314: Generic type 'E' requires 1 type argument(s). + + var j = null; + ~ +!!! error TS2304: Cannot find name 'C'. + ~ +!!! error TS4025: Exported variable 'j' has or is using private name 'C'. + var k = null; + ~~~ +!!! error TS2314: Generic type 'E' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/gettersAndSettersErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/gettersAndSettersErrors.d.ts new file mode 100644 index 0000000000000..0d592483fa118 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/gettersAndSettersErrors.d.ts @@ -0,0 +1,80 @@ +//// [tests/cases/compiler/gettersAndSettersErrors.ts] //// + +//// [gettersAndSettersErrors.ts] +class C { + public get Foo() { return "foo";} // ok + public set Foo(foo:string) {} // ok + + public Foo = 0; // error - duplicate identifier Foo - confirmed + public get Goo(v:string):string {return null;} // error - getters must not have a parameter + public set Goo(v:string):string {} // error - setters must not specify a return type +} + +class E { + private get Baz():number { return 0; } + public set Baz(n:number) {} // error - accessors do not agree in visibility +} + + + + +/// [Declarations] //// + + + +//// [gettersAndSettersErrors.d.ts] +declare class C { + get Foo(): invalid; + set Foo(foo: string); + Foo: string; + get Goo(): string; + set Goo(v: string): string; +} +declare class E { + private get Baz(); + set Baz(n: number); +} + +/// [Errors] //// + +gettersAndSettersErrors.ts(2,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +gettersAndSettersErrors.ts(5,12): error TS2300: Duplicate identifier 'Foo'. +gettersAndSettersErrors.ts(5,12): error TS2717: Subsequent property declarations must have the same type. Property 'Foo' must be of type 'string', but here has type 'number'. +gettersAndSettersErrors.ts(6,16): error TS1054: A 'get' accessor cannot have parameters. +gettersAndSettersErrors.ts(7,16): error TS1095: A 'set' accessor cannot have a return type annotation. +gettersAndSettersErrors.ts(11,17): error TS2808: A get accessor must be at least as accessible as the setter +gettersAndSettersErrors.ts(12,16): error TS2808: A get accessor must be at least as accessible as the setter + + +==== gettersAndSettersErrors.ts (7 errors) ==== + class C { + public get Foo() { return "foo";} // ok + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + public set Foo(foo:string) {} // ok + + public Foo = 0; // error - duplicate identifier Foo - confirmed + ~~~ +!!! error TS2300: Duplicate identifier 'Foo'. + ~~~ +!!! error TS2717: Subsequent property declarations must have the same type. Property 'Foo' must be of type 'string', but here has type 'number'. +!!! related TS6203 gettersAndSettersErrors.ts:2:16: 'Foo' was also declared here. + public get Goo(v:string):string {return null;} // error - getters must not have a parameter + ~~~ +!!! error TS1054: A 'get' accessor cannot have parameters. + public set Goo(v:string):string {} // error - setters must not specify a return type + ~~~ +!!! error TS1095: A 'set' accessor cannot have a return type annotation. + } + + class E { + private get Baz():number { return 0; } + ~~~ +!!! error TS2808: A get accessor must be at least as accessible as the setter + public set Baz(n:number) {} // error - accessors do not agree in visibility + ~~~ +!!! error TS2808: A get accessor must be at least as accessible as the setter + } + + + \ 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/inKeywordAndIntersection.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/inKeywordAndIntersection.d.ts new file mode 100644 index 0000000000000..08cf5031c86fa --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/inKeywordAndIntersection.d.ts @@ -0,0 +1,97 @@ +//// [tests/cases/compiler/inKeywordAndIntersection.ts] //// + +//// [inKeywordAndIntersection.ts] +class A { a = 0 } +class B { b = 0 } + +function f10(obj: A & { x: string } | B) { + if (obj instanceof Object) { + obj; // A & { x: string } | B + } + else { + obj; // Error + } +} + +// Repro from #50844 + +interface InstanceOne { + one(): void +} + +interface InstanceTwo { + two(): void +} + +const instance = {} as InstanceOne | InstanceTwo + +const ClassOne = {} as { new(): InstanceOne } & { foo: true }; + +if (instance instanceof ClassOne) { + instance.one(); +} + + +/// [Declarations] //// + + + +//// [inKeywordAndIntersection.d.ts] +declare class A { + a: number; +} +declare class B { + b: number; +} +declare function f10(obj: A & { + x: string; +} | B): invalid; +interface InstanceOne { + one(): void; +} +interface InstanceTwo { + two(): void; +} +declare const instance: InstanceOne | InstanceTwo; +declare const ClassOne: (new () => InstanceOne) & { + foo: true; +}; + +/// [Errors] //// + +inKeywordAndIntersection.ts(4,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== inKeywordAndIntersection.ts (1 errors) ==== + class A { a = 0 } + class B { b = 0 } + + function f10(obj: A & { x: string } | B) { + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + if (obj instanceof Object) { + obj; // A & { x: string } | B + } + else { + obj; // Error + } + } + + // Repro from #50844 + + interface InstanceOne { + one(): void + } + + interface InstanceTwo { + two(): void + } + + const instance = {} as InstanceOne | InstanceTwo + + const ClassOne = {} as { new(): InstanceOne } & { foo: true }; + + if (instance instanceof ClassOne) { + instance.one(); + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/literalTypesAndTypeAssertions.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/literalTypesAndTypeAssertions.d.ts new file mode 100644 index 0000000000000..71254564f0955 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/literalTypesAndTypeAssertions.d.ts @@ -0,0 +1,66 @@ +//// [tests/cases/conformance/types/literal/literalTypesAndTypeAssertions.ts] //// + +//// [literalTypesAndTypeAssertions.ts] +const obj = { + a: "foo" as "foo", + b: <"foo">"foo", + c: "foo" +}; + +let x1 = 1 as (0 | 1); +let x2 = 1; + +let { a = "foo" } = { a: "foo" }; +let { b = "foo" as "foo" } = { b: "bar" }; +let { c = "foo" } = { c: "bar" as "bar" }; +let { d = "foo" as "foo" } = { d: "bar" as "bar" }; + + +/// [Declarations] //// + + + +//// [literalTypesAndTypeAssertions.d.ts] +declare const obj: { + a: "foo"; + b: "foo"; + c: string; +}; +declare let x1: 0 | 1; +declare let x2: number; +declare let a: invalid; +declare let b: invalid; +declare let c: invalid; +declare let d: invalid; + +/// [Errors] //// + +literalTypesAndTypeAssertions.ts(10,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +literalTypesAndTypeAssertions.ts(11,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +literalTypesAndTypeAssertions.ts(12,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +literalTypesAndTypeAssertions.ts(13,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== literalTypesAndTypeAssertions.ts (4 errors) ==== + const obj = { + a: "foo" as "foo", + b: <"foo">"foo", + c: "foo" + }; + + let x1 = 1 as (0 | 1); + let x2 = 1; + + let { a = "foo" } = { a: "foo" }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + let { b = "foo" as "foo" } = { b: "bar" }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + let { c = "foo" } = { c: "bar" as "bar" }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + let { d = "foo" as "foo" } = { d: "bar" as "bar" }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ 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..44d2f9509dbf1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/namedTupleMembers.d.ts @@ -0,0 +1,207 @@ +//// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +namedTupleMembers.ts(48,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +namedTupleMembers.ts(76,44): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +namedTupleMembers.ts(77,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + return null as any; + } + + + export type Iter = Func<[step: number, iterations: number]>; + + export function readSegment([length, count]: [number, number]) {} + ~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + export const argumentsOfG = f(...getArgsForInjection(g)); // captured arguments list re-spread + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/noUncheckedIndexedAccess.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/noUncheckedIndexedAccess.d.ts new file mode 100644 index 0000000000000..12e6a0bdc017f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/noUncheckedIndexedAccess.d.ts @@ -0,0 +1,416 @@ +//// [tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts] //// + +//// [noUncheckedIndexedAccess.ts] +type CheckBooleanOnly = any; +// Validate CheckBooleanOnly works - should error +type T_ERR1 = CheckBooleanOnly; + +enum NumericEnum1 { A, B, C } +enum NumericEnum2 { A = 0, B = 1 , C = 2 } +enum StringEnum1 { A = "Alpha", B = "Beta" } + +declare const strMap: { [s: string]: boolean }; + +// All of these should be errors +const e1: boolean = strMap["foo"]; +const e2: boolean = strMap.bar; +const e3: boolean = strMap[0]; +const e4: boolean = strMap[0 as string | number]; +const e5: boolean = strMap[0 as string | 0 | 1]; +const e6: boolean = strMap[0 as 0 | 1]; +const e7: boolean = strMap["foo" as "foo" | "baz"]; +const e8: boolean = strMap[NumericEnum1.A]; +const e9: boolean = strMap[NumericEnum2.A]; +const e10: boolean = strMap[StringEnum1.A]; +const e11: boolean = strMap[StringEnum1.A as StringEnum1]; +const e12: boolean = strMap[NumericEnum1.A as NumericEnum1]; +const e13: boolean = strMap[NumericEnum2.A as NumericEnum2]; +const e14: boolean = strMap[null as any]; + +// Should be OK +const ok1: boolean | undefined = strMap["foo"]; +const ok2: boolean | undefined = strMap.bar; + +type T_OK1 = CheckBooleanOnly<(typeof strMap)[string]>; +type T_OK2 = CheckBooleanOnly<(typeof strMap)["foo"]>; +type T_OK3 = CheckBooleanOnly<(typeof strMap)["bar" | "baz"]>; +type T_OK4 = CheckBooleanOnly<(typeof strMap)[number]>; +type T_OK5 = CheckBooleanOnly<(typeof strMap)[any]>; + +// Writes don't allow 'undefined'; all should be errors +strMap["baz"] = undefined; +strMap.qua = undefined; +strMap[0] = undefined; +strMap[null as any] = undefined; + +// Numeric lookups are unaffected +declare const numMap: { [s: number]: boolean }; +// All of these should be ok +const num_ok1: boolean = numMap[0]; +const num_ok2: boolean = numMap[0 as number]; +const num_ok3: boolean = numMap[0 as 0 | 1]; +const num_ok4: boolean = numMap[NumericEnum1.A]; +const num_ok5: boolean = numMap[NumericEnum2.A]; + +// Generics +function generic1(arg: T): boolean { + // Should error + return arg["blah"]; +} +function generic2(arg: T): boolean { + // Should OK + return arg["blah"]!; +} +function generic3(arg: T): boolean { + // Should error + return strMap[arg]; +} + +// Element access into known properties is ok +declare const obj1: { x: string, y: number, [key: string]: string | number }; +obj1["x"]; +const y = "y"; +obj1[y]; +let yy = "y"; +obj1[yy]; +let z = "z"; +obj1[z]; + +// Distributivity cases +declare const strMapUnion: { [s: string]: boolean } | { [s: string]: number }; +// Should error +const f1: boolean | number = strMapUnion["foo"]; + +// Symbol index signatures +declare const s: unique symbol; +declare const symbolMap: { [s]: string }; +const e15: string = symbolMap[s]; // Should OK +symbolMap[s] = undefined; // Should error + +// Variadic tuples +declare const nonEmptyStringArray: [string, ...string[]]; +const variadicOk1: string = nonEmptyStringArray[0]; // Should OK +const variadicError1: string = nonEmptyStringArray[1]; // Should error + +// Generic index type +declare const myRecord1: { a: string; b: string }; +declare const myRecord2: { a: string; b: string, [key: string]: string }; +const fn1 = (key: Key): string => myRecord1[key]; // Should OK +const fn2 = (key: Key): string => myRecord2[key]; // Should OK +const fn3 = (key: Key) => { + myRecord2[key] = undefined; // Should error + const v: string = myRecord2[key]; // Should error +}; + + + +/// [Declarations] //// + + + +//// [noUncheckedIndexedAccess.d.ts] +type CheckBooleanOnly = any; +type T_ERR1 = CheckBooleanOnly; +declare enum NumericEnum1 { + A = 0, + B = 1, + C = 2 +} +declare enum NumericEnum2 { + A = 0, + B = 1, + C = 2 +} +declare enum StringEnum1 { + A = "Alpha", + B = "Beta" +} +declare const strMap: { + [s: string]: boolean; +}; +declare const e1: boolean; +declare const e2: boolean; +declare const e3: boolean; +declare const e4: boolean; +declare const e5: boolean; +declare const e6: boolean; +declare const e7: boolean; +declare const e8: boolean; +declare const e9: boolean; +declare const e10: boolean; +declare const e11: boolean; +declare const e12: boolean; +declare const e13: boolean; +declare const e14: boolean; +declare const ok1: boolean | undefined; +declare const ok2: boolean | undefined; +type T_OK1 = CheckBooleanOnly<(typeof strMap)[string]>; +type T_OK2 = CheckBooleanOnly<(typeof strMap)["foo"]>; +type T_OK3 = CheckBooleanOnly<(typeof strMap)["bar" | "baz"]>; +type T_OK4 = CheckBooleanOnly<(typeof strMap)[number]>; +type T_OK5 = CheckBooleanOnly<(typeof strMap)[any]>; +declare const numMap: { + [s: number]: boolean; +}; +declare const num_ok1: boolean; +declare const num_ok2: boolean; +declare const num_ok3: boolean; +declare const num_ok4: boolean; +declare const num_ok5: boolean; +declare function generic1(arg: T): boolean; +declare function generic2(arg: T): boolean; +declare function generic3(arg: T): boolean; +declare const obj1: { + x: string; + y: number; + [key: string]: string | number; +}; +declare const y = "y"; +declare let yy: string; +declare let z: string; +declare const strMapUnion: { + [s: string]: boolean; +} | { + [s: string]: number; +}; +declare const f1: boolean | number; +declare const s: unique symbol; +declare const symbolMap: { + [s]: string; +}; +declare const e15: string; +declare const nonEmptyStringArray: [string, ...string[]]; +declare const variadicOk1: string; +declare const variadicError1: string; +declare const myRecord1: { + a: string; + b: string; +}; +declare const myRecord2: { + a: string; + b: string; + [key: string]: string; +}; +declare const fn1: (key: Key) => string; +declare const fn2: (key: Key) => string; +declare const fn3: (key: Key) => invalid; + +/// [Errors] //// + +noUncheckedIndexedAccess.ts(3,32): error TS2344: Type 'boolean | undefined' does not satisfy the constraint 'boolean'. + Type 'undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(12,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + Type 'undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(13,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(14,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(15,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(16,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(17,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(18,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(19,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(20,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(21,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(22,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(23,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(24,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(25,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(38,1): error TS2322: Type 'undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(39,1): error TS2322: Type 'undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(40,1): error TS2322: Type 'undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(41,1): error TS2322: Type 'undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(46,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(47,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(48,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(49,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(50,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(55,5): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(63,5): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +noUncheckedIndexedAccess.ts(79,7): error TS2322: Type 'number | boolean | undefined' is not assignable to type 'number | boolean'. + Type 'undefined' is not assignable to type 'number | boolean'. +noUncheckedIndexedAccess.ts(85,1): error TS2322: Type 'undefined' is not assignable to type 'string'. +noUncheckedIndexedAccess.ts(90,7): error TS2322: Type 'string | undefined' is not assignable to type 'string'. + Type 'undefined' is not assignable to type 'string'. +noUncheckedIndexedAccess.ts(97,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +noUncheckedIndexedAccess.ts(98,5): error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. + Type 'undefined' is not assignable to type 'string'. +noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'string | undefined' is not assignable to type 'string'. + Type 'undefined' is not assignable to type 'string'. + + +==== noUncheckedIndexedAccess.ts (32 errors) ==== + type CheckBooleanOnly = any; + // Validate CheckBooleanOnly works - should error + type T_ERR1 = CheckBooleanOnly; + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2344: Type 'boolean | undefined' does not satisfy the constraint 'boolean'. +!!! error TS2344: Type 'undefined' is not assignable to type 'boolean'. + + enum NumericEnum1 { A, B, C } + enum NumericEnum2 { A = 0, B = 1 , C = 2 } + enum StringEnum1 { A = "Alpha", B = "Beta" } + + declare const strMap: { [s: string]: boolean }; + + // All of these should be errors + const e1: boolean = strMap["foo"]; + ~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. +!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. + const e2: boolean = strMap.bar; + ~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e3: boolean = strMap[0]; + ~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e4: boolean = strMap[0 as string | number]; + ~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e5: boolean = strMap[0 as string | 0 | 1]; + ~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e6: boolean = strMap[0 as 0 | 1]; + ~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e7: boolean = strMap["foo" as "foo" | "baz"]; + ~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e8: boolean = strMap[NumericEnum1.A]; + ~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e9: boolean = strMap[NumericEnum2.A]; + ~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e10: boolean = strMap[StringEnum1.A]; + ~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e11: boolean = strMap[StringEnum1.A as StringEnum1]; + ~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e12: boolean = strMap[NumericEnum1.A as NumericEnum1]; + ~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e13: boolean = strMap[NumericEnum2.A as NumericEnum2]; + ~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const e14: boolean = strMap[null as any]; + ~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + + // Should be OK + const ok1: boolean | undefined = strMap["foo"]; + const ok2: boolean | undefined = strMap.bar; + + type T_OK1 = CheckBooleanOnly<(typeof strMap)[string]>; + type T_OK2 = CheckBooleanOnly<(typeof strMap)["foo"]>; + type T_OK3 = CheckBooleanOnly<(typeof strMap)["bar" | "baz"]>; + type T_OK4 = CheckBooleanOnly<(typeof strMap)[number]>; + type T_OK5 = CheckBooleanOnly<(typeof strMap)[any]>; + + // Writes don't allow 'undefined'; all should be errors + strMap["baz"] = undefined; + ~~~~~~~~~~~~~ +!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. + strMap.qua = undefined; + ~~~~~~~~~~ +!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. + strMap[0] = undefined; + ~~~~~~~~~ +!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. + strMap[null as any] = undefined; + ~~~~~~~~~~~~~~~~~~~ +!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. + + // Numeric lookups are unaffected + declare const numMap: { [s: number]: boolean }; + // All of these should be ok + const num_ok1: boolean = numMap[0]; + ~~~~~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const num_ok2: boolean = numMap[0 as number]; + ~~~~~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const num_ok3: boolean = numMap[0 as 0 | 1]; + ~~~~~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const num_ok4: boolean = numMap[NumericEnum1.A]; + ~~~~~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + const num_ok5: boolean = numMap[NumericEnum2.A]; + ~~~~~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + + // Generics + function generic1(arg: T): boolean { + // Should error + return arg["blah"]; + ~~~~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + } + function generic2(arg: T): boolean { + // Should OK + return arg["blah"]!; + } + function generic3(arg: T): boolean { + // Should error + return strMap[arg]; + ~~~~~~ +!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. + } + + // Element access into known properties is ok + declare const obj1: { x: string, y: number, [key: string]: string | number }; + obj1["x"]; + const y = "y"; + obj1[y]; + let yy = "y"; + obj1[yy]; + let z = "z"; + obj1[z]; + + // Distributivity cases + declare const strMapUnion: { [s: string]: boolean } | { [s: string]: number }; + // Should error + const f1: boolean | number = strMapUnion["foo"]; + ~~ +!!! error TS2322: Type 'number | boolean | undefined' is not assignable to type 'number | boolean'. +!!! error TS2322: Type 'undefined' is not assignable to type 'number | boolean'. + + // Symbol index signatures + declare const s: unique symbol; + declare const symbolMap: { [s]: string }; + const e15: string = symbolMap[s]; // Should OK + symbolMap[s] = undefined; // Should error + ~~~~~~~~~~~~ +!!! error TS2322: Type 'undefined' is not assignable to type 'string'. + + // Variadic tuples + declare const nonEmptyStringArray: [string, ...string[]]; + const variadicOk1: string = nonEmptyStringArray[0]; // Should OK + const variadicError1: string = nonEmptyStringArray[1]; // Should error + ~~~~~~~~~~~~~~ +!!! error TS2322: Type 'string | undefined' is not assignable to type 'string'. +!!! error TS2322: Type 'undefined' is not assignable to type 'string'. + + // Generic index type + declare const myRecord1: { a: string; b: string }; + declare const myRecord2: { a: string; b: string, [key: string]: string }; + const fn1 = (key: Key): string => myRecord1[key]; // Should OK + const fn2 = (key: Key): string => myRecord2[key]; // Should OK + const fn3 = (key: Key) => { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + myRecord2[key] = undefined; // Should error + ~~~~~~~~~~~~~~ +!!! error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. +!!! error TS2322: Type 'undefined' is not assignable to type 'string'. + const v: string = myRecord2[key]; // Should error + ~ +!!! error TS2322: Type 'string | undefined' is not assignable to type 'string'. +!!! error TS2322: Type 'undefined' is not assignable to type 'string'. + }; + + \ 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..b3c4f6d9274ca --- /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); + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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..b3c4f6d9274ca --- /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); + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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..c893b1ce2fdc9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=node16).d.ts @@ -0,0 +1,447 @@ +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmitErrors.ts] //// + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} + +//// [/node_modules/pkg/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/other4.ts(9,58): error TS1005: ',' expected. +/other4.ts(9,59): error TS1134: Variable declaration expected. +/other4.ts(9,60): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/other4.ts(10,58): error TS1005: ',' expected. +/other4.ts(10,59): error TS1134: Variable declaration expected. +/other4.ts(10,60): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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..c893b1ce2fdc9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportAttributesTypeModeDeclarationEmitErrors(module=nodenext).d.ts @@ -0,0 +1,447 @@ +//// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmitErrors.ts] //// + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} + +//// [/node_modules/pkg/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/other4.ts(9,58): error TS1005: ',' expected. +/other4.ts(9,59): error TS1134: Variable declaration expected. +/other4.ts(9,60): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/other4.ts(10,58): error TS1005: ',' expected. +/other4.ts(10,59): error TS1134: Variable declaration expected. +/other4.ts(10,60): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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..10615e67cb746 --- /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); + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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..10615e67cb746 --- /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); + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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..31a64496b9c93 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportTypeModeDeclarationEmitErrors1(module=node16).d.ts @@ -0,0 +1,435 @@ +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts] //// + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/other4.ts(9,56): error TS1005: ',' expected. +/other4.ts(9,57): error TS1134: Variable declaration expected. +/other4.ts(9,58): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/other4.ts(10,56): error TS1005: ',' expected. +/other4.ts(10,57): error TS1134: Variable declaration expected. +/other4.ts(10,58): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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..31a64496b9c93 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/nodeModulesImportTypeModeDeclarationEmitErrors1(module=nodenext).d.ts @@ -0,0 +1,435 @@ +//// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts] //// + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/other4.ts(9,56): error TS1005: ',' expected. +/other4.ts(9,57): error TS1134: Variable declaration expected. +/other4.ts(9,58): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/other4.ts(10,56): error TS1005: ',' expected. +/other4.ts(10,57): error TS1134: Variable declaration expected. +/other4.ts(10,58): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS1005: ',' expected. + ~ +!!! error TS1134: Variable declaration expected. + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! 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/objectLiteralEnumPropertyNames.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralEnumPropertyNames.d.ts new file mode 100644 index 0000000000000..a4fe0a8f3d18b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralEnumPropertyNames.d.ts @@ -0,0 +1,102 @@ +//// [tests/cases/compiler/objectLiteralEnumPropertyNames.ts] //// + +//// [objectLiteralEnumPropertyNames.ts] +// Fixes #16887 +enum Strs { + A = 'a', + B = 'b' +} +type TestStrs = { [key in Strs]: string } +const x: TestStrs = { + [Strs.A]: 'xo', + [Strs.B]: 'xe' +} +const ux = { + [Strs.A]: 'xo', + [Strs.B]: 'xe' +} +const y: TestStrs = { + ['a']: 'yo', + ['b']: 'ye' +} +const a = 'a'; +const b = 'b'; +const z: TestStrs = { + [a]: 'zo', + [b]: 'ze' +} +const uz = { + [a]: 'zo', + [b]: 'ze' +} + +enum Nums { + A, + B +} +type TestNums = { 0: number, 1: number } +const n: TestNums = { + [Nums.A]: 1, + [Nums.B]: 2 +} +const un = { + [Nums.A]: 3, + [Nums.B]: 4 +} +const an = 0; +const bn = 1; +const m: TestNums = { + [an]: 5, + [bn]: 6 +} +const um = { + [an]: 7, + [bn]: 8 +} + + +/// [Declarations] //// + + + +//// [objectLiteralEnumPropertyNames.d.ts] +declare enum Strs { + A = "a", + B = "b" +} +type TestStrs = { + [key in Strs]: string; +}; +declare const x: TestStrs; +declare const ux: { + a: string; + b: string; +}; +declare const y: TestStrs; +declare const a = "a"; +declare const b = "b"; +declare const z: TestStrs; +declare const uz: { + a: string; + b: string; +}; +declare enum Nums { + A = 0, + B = 1 +} +type TestNums = { + 0: number; + 1: number; +}; +declare const n: TestNums; +declare const un: { + 0: number; + 1: number; +}; +declare const an = 0; +declare const bn = 1; +declare const m: TestNums; +declare const um: { + 0: number; + 1: number; +}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralGettersAndSetters.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralGettersAndSetters.d.ts new file mode 100644 index 0000000000000..850cf29cb172a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralGettersAndSetters.d.ts @@ -0,0 +1,283 @@ +//// [tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts] //// + +//// [objectLiteralGettersAndSetters.ts] +// Get and set accessor with the same name +var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; +var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } }; +var sameName3a = { get 0x20() { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; +var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p: string; } }; +var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p: string; } }; +var sameName6a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; + +// PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} +var callSig1 = { num(n: number) { return '' } }; +var callSig1: { num: (n: number) => string; }; +var callSig2 = { num: function (n: number) { return '' } }; +var callSig2: { num: (n: number) => string; }; +var callSig3 = { num: (n: number) => '' }; +var callSig3: { num: (n: number) => string; }; + +// Get accessor only, type of the property is the annotated return type of the get accessor +var getter1 = { get x(): string { return undefined; } }; +var getter1: { readonly x: string; } + +// Get accessor only, type of the property is the inferred return type of the get accessor +var getter2 = { get x() { return ''; } }; +var getter2: { readonly x: string; } + +// Set accessor only, type of the property is the param type of the set accessor +var setter1 = { set x(n: number) { } }; +var setter1: { x: number }; + +// Set accessor only, type of the property is Any for an unannotated set accessor +var setter2 = { set x(n) { } }; +var setter2: { x: any }; + +var anyVar: any; +// Get and set accessor with matching type annotations +var sameType1 = { get x(): string { return undefined; }, set x(n: string) { } }; +var sameType2 = { get x(): Array { return undefined; }, set x(n: number[]) { } }; +var sameType3 = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; +var sameType4 = { get x(): Date { return undefined; }, set x(n: Date) { } }; + +// Type of unannotated get accessor return type is the type annotation of the set accessor param +var setParamType1 = { + set n(x: (t: string) => void) { }, + get n() { return (t) => { + var p: string; + var p = t; + } + } +}; +var setParamType2 = { + get n() { return (t) => { + var p: string; + var p = t; + } + }, + set n(x: (t: string) => void) { } +}; + +// Type of unannotated set accessor parameter is the return type annotation of the get accessor +var getParamType1 = { + set n(x) { + var y = x; + var y: string; + }, + get n() { return ''; } +}; +var getParamType2 = { + get n() { return ''; }, + set n(x) { + var y = x; + var y: string; + } +}; + +// Type of unannotated accessors is the inferred return type of the get accessor +var getParamType3 = { + get n() { return ''; }, + set n(x) { + var y = x; + var y: string; + } +}; + + + +/// [Declarations] //// + + + +//// [objectLiteralGettersAndSetters.d.ts] +declare var sameName1a: invalid; +declare var sameName2a: invalid; +declare var sameName3a: invalid; +declare var sameName4a: invalid; +declare var sameName5a: invalid; +declare var sameName6a: invalid; +declare var callSig1: invalid; +declare var callSig1: { + num: (n: number) => string; +}; +declare var callSig2: invalid; +declare var callSig2: { + num: (n: number) => string; +}; +declare var callSig3: invalid; +declare var callSig3: { + num: (n: number) => string; +}; +declare var getter1: { + readonly x: string; +}; +declare var getter1: { + readonly x: string; +}; +declare var getter2: invalid; +declare var getter2: { + readonly x: string; +}; +declare var setter1: { + x: number; +}; +declare var setter1: { + x: number; +}; +declare var setter2: invalid; +declare var setter2: { + x: any; +}; +declare var anyVar: any; +declare var sameType1: { + x: string; +}; +declare var sameType2: { + x: number[]; +}; +declare var sameType3: { + x: any; +}; +declare var sameType4: { + x: Date; +}; +declare var setParamType1: { + n: (t: string) => void; +}; +declare var setParamType2: { + n: (t: string) => void; +}; +declare var getParamType1: invalid; +declare var getParamType2: invalid; +declare var getParamType3: invalid; + +/// [Errors] //// + +objectLiteralGettersAndSetters.ts(2,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(3,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(4,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(5,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(6,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(7,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(10,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(12,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(14,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(22,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(30,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(60,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(67,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(76,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== objectLiteralGettersAndSetters.ts (14 errors) ==== + // Get and set accessor with the same name + var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var sameName3a = { get 0x20() { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p: string; } }; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p: string; } }; + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var sameName6a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} + var callSig1 = { num(n: number) { return '' } }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var callSig1: { num: (n: number) => string; }; + var callSig2 = { num: function (n: number) { return '' } }; + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var callSig2: { num: (n: number) => string; }; + var callSig3 = { num: (n: number) => '' }; + ~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var callSig3: { num: (n: number) => string; }; + + // Get accessor only, type of the property is the annotated return type of the get accessor + var getter1 = { get x(): string { return undefined; } }; + var getter1: { readonly x: string; } + + // Get accessor only, type of the property is the inferred return type of the get accessor + var getter2 = { get x() { return ''; } }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var getter2: { readonly x: string; } + + // Set accessor only, type of the property is the param type of the set accessor + var setter1 = { set x(n: number) { } }; + var setter1: { x: number }; + + // Set accessor only, type of the property is Any for an unannotated set accessor + var setter2 = { set x(n) { } }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var setter2: { x: any }; + + var anyVar: any; + // Get and set accessor with matching type annotations + var sameType1 = { get x(): string { return undefined; }, set x(n: string) { } }; + var sameType2 = { get x(): Array { return undefined; }, set x(n: number[]) { } }; + var sameType3 = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; + var sameType4 = { get x(): Date { return undefined; }, set x(n: Date) { } }; + + // Type of unannotated get accessor return type is the type annotation of the set accessor param + var setParamType1 = { + set n(x: (t: string) => void) { }, + get n() { return (t) => { + var p: string; + var p = t; + } + } + }; + var setParamType2 = { + get n() { return (t) => { + var p: string; + var p = t; + } + }, + set n(x: (t: string) => void) { } + }; + + // Type of unannotated set accessor parameter is the return type annotation of the get accessor + var getParamType1 = { + set n(x) { + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + var y = x; + var y: string; + }, + get n() { return ''; } + }; + var getParamType2 = { + get n() { return ''; }, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set n(x) { + var y = x; + var y: string; + } + }; + + // Type of unannotated accessors is the inferred return type of the get accessor + var getParamType3 = { + get n() { return ''; }, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + set n(x) { + var y = x; + var y: string; + } + }; + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/optionalChainingInference.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/optionalChainingInference.d.ts new file mode 100644 index 0000000000000..c184b8539409d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/optionalChainingInference.d.ts @@ -0,0 +1,128 @@ +//// [tests/cases/conformance/expressions/optionalChaining/optionalChainingInference.ts] //// + +//// [optionalChainingInference.ts] +// https://github.com/microsoft/TypeScript/issues/34579 +declare function unbox(box: { value: T | undefined }): T; +declare const su: string | undefined; +declare const fnu: (() => number) | undefined; +declare const osu: { prop: string } | undefined; +declare const ofnu: { prop: () => number } | undefined; + +const b1 = { value: su?.length }; +const v1: number = unbox(b1); + +const b2 = { value: su?.length as number | undefined }; +const v2: number = unbox(b2); + +const b3: { value: number | undefined } = { value: su?.length }; +const v3: number = unbox(b3); + +const b4 = { value: fnu?.() }; +const v4: number = unbox(b4); + +const b5 = { value: su?.["length"] }; +const v5: number = unbox(b5); + +const b6 = { value: osu?.prop.length }; +const v6: number = unbox(b6); + +const b7 = { value: osu?.prop["length"] }; +const v7: number = unbox(b7); + +const b8 = { value: ofnu?.prop() }; +const v8: number = unbox(b8); + + + +/// [Declarations] //// + + + +//// [optionalChainingInference.d.ts] +declare function unbox(box: { + value: T | undefined; +}): T; +declare const su: string | undefined; +declare const fnu: (() => number) | undefined; +declare const osu: { + prop: string; +} | undefined; +declare const ofnu: { + prop: () => number; +} | undefined; +declare const b1: invalid; +declare const v1: number; +declare const b2: { + value: number; +}; +declare const v2: number; +declare const b3: { + value: number | undefined; +}; +declare const v3: number; +declare const b4: invalid; +declare const v4: number; +declare const b5: invalid; +declare const v5: number; +declare const b6: invalid; +declare const v6: number; +declare const b7: invalid; +declare const v7: number; +declare const b8: invalid; +declare const v8: number; + +/// [Errors] //// + +optionalChainingInference.ts(8,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +optionalChainingInference.ts(17,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +optionalChainingInference.ts(20,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +optionalChainingInference.ts(23,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +optionalChainingInference.ts(26,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +optionalChainingInference.ts(29,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== optionalChainingInference.ts (6 errors) ==== + // https://github.com/microsoft/TypeScript/issues/34579 + declare function unbox(box: { value: T | undefined }): T; + declare const su: string | undefined; + declare const fnu: (() => number) | undefined; + declare const osu: { prop: string } | undefined; + declare const ofnu: { prop: () => number } | undefined; + + const b1 = { value: su?.length }; + ~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const v1: number = unbox(b1); + + const b2 = { value: su?.length as number | undefined }; + const v2: number = unbox(b2); + + const b3: { value: number | undefined } = { value: su?.length }; + const v3: number = unbox(b3); + + const b4 = { value: fnu?.() }; + ~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const v4: number = unbox(b4); + + const b5 = { value: su?.["length"] }; + ~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const v5: number = unbox(b5); + + const b6 = { value: osu?.prop.length }; + ~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const v6: number = unbox(b6); + + const b7 = { value: osu?.prop["length"] }; + ~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const v7: number = unbox(b7); + + const b8 = { value: ofnu?.prop() }; + ~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const v8: number = unbox(b8); + + \ No newline at end of file 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..7218e40bb4e91 --- /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); + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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..bce304225c8c7 --- /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); + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} + +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} + +//// [/node_modules/pkg/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/parseInvalidNonNullableTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNonNullableTypes.d.ts new file mode 100644 index 0000000000000..c2d5538f294c0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNonNullableTypes.d.ts @@ -0,0 +1,127 @@ +//// [tests/cases/compiler/parseInvalidNonNullableTypes.ts] //// + +//// [parseInvalidNonNullableTypes.ts] +function f1(a: string): a is string! { + return true; +} + +function f2(a: string): a is !string { + return true; +} + +function f3(a: string!) {} +function f4(a: number!) {} + +function f5(a: !string) {} +function f6(a: !number) {} + +function f7(): string! {} +function f8(): !string {} + +const a = 1 as any!; +const b: number! = 1; + +const c = 1 as !any; +const d: !number = 1; + + +/// [Declarations] //// + + + +//// [parseInvalidNonNullableTypes.d.ts] +declare function f1(a: string): a is !string; +declare function f2(a: string): a is !string; +declare function f3(a: !string): invalid; +declare function f4(a: !number): invalid; +declare function f5(a: !string): invalid; +declare function f6(a: !number): invalid; +declare function f7(): !string; +declare function f8(): !string; +declare const a: any; +declare const b: !number; +declare const c: any; +declare const d: !number; + +/// [Errors] //// + +parseInvalidNonNullableTypes.ts(1,30): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? +parseInvalidNonNullableTypes.ts(5,30): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? +parseInvalidNonNullableTypes.ts(9,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNonNullableTypes.ts(9,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? +parseInvalidNonNullableTypes.ts(10,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNonNullableTypes.ts(10,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? +parseInvalidNonNullableTypes.ts(12,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNonNullableTypes.ts(12,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? +parseInvalidNonNullableTypes.ts(13,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNonNullableTypes.ts(13,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? +parseInvalidNonNullableTypes.ts(15,16): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. +parseInvalidNonNullableTypes.ts(15,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? +parseInvalidNonNullableTypes.ts(16,16): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. +parseInvalidNonNullableTypes.ts(16,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? +parseInvalidNonNullableTypes.ts(18,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'any'? +parseInvalidNonNullableTypes.ts(19,10): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? +parseInvalidNonNullableTypes.ts(21,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'any'? +parseInvalidNonNullableTypes.ts(22,10): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? + + +==== parseInvalidNonNullableTypes.ts (18 errors) ==== + function f1(a: string): a is string! { + ~~~~~~~ +!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? + return true; + } + + function f2(a: string): a is !string { + ~~~~~~~ +!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? + return true; + } + + function f3(a: string!) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? + function f4(a: number!) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? + + function f5(a: !string) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? + function f6(a: !number) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? + + function f7(): string! {} + ~~~~~~~ +!!! error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. + ~~~~~~~ +!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? + function f8(): !string {} + ~~~~~~~ +!!! error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. + ~~~~~~~ +!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? + + const a = 1 as any!; + ~~~~ +!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'any'? + const b: number! = 1; + ~~~~~~~ +!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? + + const c = 1 as !any; + ~~~~ +!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'any'? + const d: !number = 1; + ~~~~~~~ +!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNullableTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNullableTypes.d.ts new file mode 100644 index 0000000000000..3eff6950ce7aa --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNullableTypes.d.ts @@ -0,0 +1,143 @@ +//// [tests/cases/compiler/parseInvalidNullableTypes.ts] //// + +//// [parseInvalidNullableTypes.ts] +function f1(a: string): a is ?string { + return true; +} + +function f2(a: string?) {} +function f3(a: number?) {} + +function f4(a: ?string) {} +function f5(a: ?number) {} + +function f6(a: string): ?string { + return true; +} + +const a = 1 as any?; +const b: number? = 1; + +const c = 1 as ?any; +const d: ?number = 1; + +let e: unknown?; +let f: never?; +let g: void?; +let h: undefined?; + + +/// [Declarations] //// + + + +//// [parseInvalidNullableTypes.d.ts] +declare function f1(a: string): a is ?string; +declare function f2(a: ?string): invalid; +declare function f3(a: ?number): invalid; +declare function f4(a: ?string): invalid; +declare function f5(a: ?number): invalid; +declare function f6(a: string): ?string; +declare const a: any; +declare const b: ?number; +declare const c: any; +declare const d: ?number; +declare let e: ?unknown; +declare let f: ?never; +declare let g: ?void; +declare let h: ?undefined; + +/// [Errors] //// + +parseInvalidNullableTypes.ts(1,30): error TS2677: A type predicate's type must be assignable to its parameter's type. + Type 'string | null' is not assignable to type 'string'. + Type 'null' is not assignable to type 'string'. +parseInvalidNullableTypes.ts(1,30): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? +parseInvalidNullableTypes.ts(5,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNullableTypes.ts(5,16): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string | undefined'? +parseInvalidNullableTypes.ts(6,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNullableTypes.ts(6,16): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? +parseInvalidNullableTypes.ts(8,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNullableTypes.ts(8,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? +parseInvalidNullableTypes.ts(9,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNullableTypes.ts(9,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? +parseInvalidNullableTypes.ts(11,25): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? +parseInvalidNullableTypes.ts(12,5): error TS2322: Type 'boolean' is not assignable to type 'string'. +parseInvalidNullableTypes.ts(15,16): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'any'? +parseInvalidNullableTypes.ts(16,10): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? +parseInvalidNullableTypes.ts(18,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'any'? +parseInvalidNullableTypes.ts(19,10): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? +parseInvalidNullableTypes.ts(21,8): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'unknown'? +parseInvalidNullableTypes.ts(22,8): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'never'? +parseInvalidNullableTypes.ts(23,8): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'void'? +parseInvalidNullableTypes.ts(24,8): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'undefined'? + + +==== parseInvalidNullableTypes.ts (20 errors) ==== + function f1(a: string): a is ?string { + ~~~~~~~ +!!! error TS2677: A type predicate's type must be assignable to its parameter's type. +!!! error TS2677: Type 'string | null' is not assignable to type 'string'. +!!! error TS2677: Type 'null' is not assignable to type 'string'. + ~~~~~~~ +!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? + return true; + } + + function f2(a: string?) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string | undefined'? + function f3(a: number?) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? + + function f4(a: ?string) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? + function f5(a: ?number) {} + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~ +!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? + + function f6(a: string): ?string { + ~~~~~~~ +!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? + return true; + ~~~~~~ +!!! error TS2322: Type 'boolean' is not assignable to type 'string'. + } + + const a = 1 as any?; + ~~~~ +!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'any'? + const b: number? = 1; + ~~~~~~~ +!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? + + const c = 1 as ?any; + ~~~~ +!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'any'? + const d: ?number = 1; + ~~~~~~~ +!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? + + let e: unknown?; + ~~~~~~~~ +!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'unknown'? + let f: never?; + ~~~~~~ +!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'never'? + let g: void?; + ~~~~~ +!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'void'? + let h: undefined?; + ~~~~~~~~~~ +!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'undefined'? + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parseTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseTypes.d.ts new file mode 100644 index 0000000000000..058d1c5f9c89a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parseTypes.d.ts @@ -0,0 +1,73 @@ +//// [tests/cases/compiler/parseTypes.ts] //// + +//// [parseTypes.ts] +var x = <() => number>null; +var y = <{(): number; }>null; +var z = <{new(): number; }>null +var w = <{[x:number]: number; }>null +function f() { return 3 }; +function g(s: string) { true }; +y=f; +y=g; +x=g; +w=g; +z=g; + + +/// [Declarations] //// + + + +//// [parseTypes.d.ts] +declare var x: () => number; +declare var y: () => number; +declare var z: new () => number; +declare var w: { + [x: number]: number; +}; +declare function f(): invalid; +declare function g(s: string): invalid; + +/// [Errors] //// + +parseTypes.ts(5,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseTypes.ts(6,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseTypes.ts(8,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. + Target signature provides too few arguments. Expected 1 or more, but got 0. +parseTypes.ts(9,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. + Target signature provides too few arguments. Expected 1 or more, but got 0. +parseTypes.ts(10,1): error TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }'. + Index signature for type 'number' is missing in type '(s: string) => void'. +parseTypes.ts(11,1): error TS2322: Type '(s: string) => void' is not assignable to type 'new () => number'. + Type '(s: string) => void' provides no match for the signature 'new (): number'. + + +==== parseTypes.ts (6 errors) ==== + var x = <() => number>null; + var y = <{(): number; }>null; + var z = <{new(): number; }>null + var w = <{[x:number]: number; }>null + function f() { return 3 }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function g(s: string) { true }; + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + y=f; + y=g; + ~ +!!! error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. +!!! error TS2322: Target signature provides too few arguments. Expected 1 or more, but got 0. + x=g; + ~ +!!! error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. +!!! error TS2322: Target signature provides too few arguments. Expected 1 or more, but got 0. + w=g; + ~ +!!! error TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }'. +!!! error TS2322: Index signature for type 'number' is missing in type '(s: string) => void'. + z=g; + ~ +!!! error TS2322: Type '(s: string) => void' is not assignable to type 'new () => number'. +!!! error TS2322: Type '(s: string) => void' provides no match for the signature 'new (): number'. + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/recursiveTypesWithTypeof.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/recursiveTypesWithTypeof.d.ts new file mode 100644 index 0000000000000..ca7e3dcb693b8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/recursiveTypesWithTypeof.d.ts @@ -0,0 +1,200 @@ +//// [tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts] //// + +//// [recursiveTypesWithTypeof.ts] +// The following are errors because of circular references +var c: typeof c; +var c: any; +var d: typeof e; +var d: any; +var e: typeof d; +var e: any; + +interface Foo { } +var f: Array; +var f: any; +var f2: Foo; +var f2: any; +var f3: Foo[]; +var f3: any; + +// None of these declarations should have any errors! +// Truly recursive types +var g: { x: typeof g; }; +var g: typeof g.x; +var h: () => typeof h; +var h = h(); +var i: (x: typeof i) => typeof x; +var i = i(i); +var j: (x: T) => T; +var j = j(j); + +// Same as h, i, j with construct signatures +var h2: new () => typeof h2; +var h2 = new h2(); +var i2: new (x: typeof i2) => typeof x; +var i2 = new i2(i2); +var j2: new (x: T) => T; +var j2 = new j2(j2); + +// Indexers +var k: { [n: number]: typeof k;[s: string]: typeof k }; +var k = k[0]; +var k = k['']; + +// Hybrid - contains type literals as well as type arguments +// These two are recursive +var hy1: { x: typeof hy1 }[]; +var hy1 = hy1[0].x; +var hy2: { x: Array }; +var hy2 = hy2.x[0]; + +interface Foo2 { } + +// This one should be an error because the first type argument is not contained inside a type literal +var hy3: Foo2; +var hy3: any; + +/// [Declarations] //// + + + +//// [recursiveTypesWithTypeof.d.ts] +declare var c: typeof c; +declare var c: any; +declare var d: typeof e; +declare var d: any; +declare var e: typeof d; +declare var e: any; +interface Foo { +} +declare var f: Array; +declare var f: any; +declare var f2: Foo; +declare var f2: any; +declare var f3: Foo[]; +declare var f3: any; +declare var g: { + x: typeof g; +}; +declare var g: typeof g.x; +declare var h: () => typeof h; +declare var h: () => typeof h; +declare var i: (x: typeof i) => typeof x; +declare var i: (x: typeof i) => typeof x; +declare var j: (x: T) => T; +declare var j: (x: T) => T; +declare var h2: new () => typeof h2; +declare var h2: new () => typeof h2; +declare var i2: new (x: typeof i2) => typeof x; +declare var i2: new (x: typeof i2) => typeof x; +declare var j2: new (x: T) => T; +declare var j2: new (x: T) => T; +declare var k: { + [n: number]: typeof k; + [s: string]: typeof k; +}; +declare var k: { + [n: number]: any; + [s: string]: any; +}; +declare var k: { + [n: number]: any; + [s: string]: any; +}; +declare var hy1: { + x: typeof hy1; +}[]; +declare var hy1: { + x: typeof hy1; +}[]; +declare var hy2: { + x: Array; +}; +declare var hy2: { + x: Array; +}; +interface Foo2 { +} +declare var hy3: Foo2; +declare var hy3: any; + +/// [Errors] //// + +recursiveTypesWithTypeof.ts(2,5): error TS2502: 'c' is referenced directly or indirectly in its own type annotation. +recursiveTypesWithTypeof.ts(4,5): error TS2502: 'd' is referenced directly or indirectly in its own type annotation. +recursiveTypesWithTypeof.ts(6,5): error TS2502: 'e' is referenced directly or indirectly in its own type annotation. +recursiveTypesWithTypeof.ts(10,5): error TS2502: 'f' is referenced directly or indirectly in its own type annotation. +recursiveTypesWithTypeof.ts(12,5): error TS2502: 'f2' is referenced directly or indirectly in its own type annotation. +recursiveTypesWithTypeof.ts(14,5): error TS2502: 'f3' is referenced directly or indirectly in its own type annotation. +recursiveTypesWithTypeof.ts(51,5): error TS2502: 'hy3' is referenced directly or indirectly in its own type annotation. + + +==== recursiveTypesWithTypeof.ts (7 errors) ==== + // The following are errors because of circular references + var c: typeof c; + ~ +!!! error TS2502: 'c' is referenced directly or indirectly in its own type annotation. + var c: any; + var d: typeof e; + ~ +!!! error TS2502: 'd' is referenced directly or indirectly in its own type annotation. + var d: any; + var e: typeof d; + ~ +!!! error TS2502: 'e' is referenced directly or indirectly in its own type annotation. + var e: any; + + interface Foo { } + var f: Array; + ~ +!!! error TS2502: 'f' is referenced directly or indirectly in its own type annotation. + var f: any; + var f2: Foo; + ~~ +!!! error TS2502: 'f2' is referenced directly or indirectly in its own type annotation. + var f2: any; + var f3: Foo[]; + ~~ +!!! error TS2502: 'f3' is referenced directly or indirectly in its own type annotation. + var f3: any; + + // None of these declarations should have any errors! + // Truly recursive types + var g: { x: typeof g; }; + var g: typeof g.x; + var h: () => typeof h; + var h = h(); + var i: (x: typeof i) => typeof x; + var i = i(i); + var j: (x: T) => T; + var j = j(j); + + // Same as h, i, j with construct signatures + var h2: new () => typeof h2; + var h2 = new h2(); + var i2: new (x: typeof i2) => typeof x; + var i2 = new i2(i2); + var j2: new (x: T) => T; + var j2 = new j2(j2); + + // Indexers + var k: { [n: number]: typeof k;[s: string]: typeof k }; + var k = k[0]; + var k = k['']; + + // Hybrid - contains type literals as well as type arguments + // These two are recursive + var hy1: { x: typeof hy1 }[]; + var hy1 = hy1[0].x; + var hy2: { x: Array }; + var hy2 = hy2.x[0]; + + interface Foo2 { } + + // This one should be an error because the first type argument is not contained inside a type literal + var hy3: Foo2; + ~~~ +!!! error TS2502: 'hy3' is referenced directly or indirectly in its own type annotation. + var hy3: any; \ 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..91405428e140b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/renamingDestructuredPropertyInFunctionType.d.ts @@ -0,0 +1,372 @@ +//// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(10,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(20,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(22,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(26,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(48,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(49,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(56,36): error TS4025: Exported variable 'obj2' has or is using private name 'string'. +renamingDestructuredPropertyInFunctionType.ts(58,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(59,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(60,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(61,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(61,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(62,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(63,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + type F7 = ({ a: string, b: number }) => typeof number; // Error + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + type F9 = ([a, b, c]) => void; // OK + ~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + type G7 = new ({ a: string, b: number }) => typeof number; // Error + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + type G9 = new ([a, b, c]) => void; // OK + ~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // Below are Error but renaming is retained in declaration emit, + // since elinding it would leave invalid syntax. + type F10 = ({ "a": string }) => void; // Error + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~ +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const f2 = function({ a: string }: O) { }; + ~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const f3 = ({ a: string, b, c }: O) => { }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + }; + 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const f7 = ({ a: string = "", b, c }: O) => { }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const f8 = ({ "a": string }: O) => { }; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function f9 ({ 2: string }) { }; + ~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function f10 ({ ["a"]: string }: O) { }; + ~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + const f11 = ({ [2]: string }) => { }; + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~~~~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + // 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/stringLiteralsWithTypeAssertions01.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/stringLiteralsWithTypeAssertions01.d.ts new file mode 100644 index 0000000000000..e39bdff493a74 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/stringLiteralsWithTypeAssertions01.d.ts @@ -0,0 +1,24 @@ +//// [tests/cases/conformance/types/literal/stringLiteralsWithTypeAssertions01.ts] //// + +//// [stringLiteralsWithTypeAssertions01.ts] +let fooOrBar: "foo" | "bar"; + +let a = "foo" as "bar"; +let b = "bar" as "foo"; +let c = fooOrBar as "foo"; +let d = fooOrBar as "bar"; +let e = fooOrBar as "baz"; +let f = "baz" as typeof fooOrBar; + +/// [Declarations] //// + + + +//// [stringLiteralsWithTypeAssertions01.d.ts] +declare let fooOrBar: "foo" | "bar"; +declare let a: "bar"; +declare let b: "foo"; +declare let c: "foo"; +declare let d: "bar"; +declare let e: "baz"; +declare let f: "foo" | "bar"; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeErrors.d.ts new file mode 100644 index 0000000000000..6dcef2d700c2f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeErrors.d.ts @@ -0,0 +1,278 @@ +//// [tests/cases/conformance/types/thisType/thisTypeErrors.ts] //// + +//// [thisTypeErrors.ts] +var x1: this; +var x2: { a: this }; +var x3: this[]; + +function f1(x: this): this { + var y: this; + return this; +} + +interface I1 { + a: { x: this }; + b: { (): this }; + c: { new (): this }; + d: { [x: string]: this }; + e: { f(x: this): this }; +} + +class C1 { + a: { x: this }; + b: { (): this }; + c: { new (): this }; + d: { [x: string]: this }; + e: { f(x: this): this }; +} + +class C2 { + static x: this; + static y = undefined; + static foo(x: this): this { + return undefined; + } +} + +namespace N1 { + export var x: this; + export var y = this; +} + +class C3 { + x1 = { + g(x: this): this { + return undefined; + } + } + f() { + function g(x: this): this { + return undefined; + } + let x2 = { + h(x: this): this { + return undefined; + } + } + } +} + + +/// [Declarations] //// + + + +//// [thisTypeErrors.d.ts] +declare var x1: this; +declare var x2: { + a: this; +}; +declare var x3: this[]; +declare function f1(x: this): this; +interface I1 { + a: { + x: this; + }; + b: { + (): this; + }; + c: { + new (): this; + }; + d: { + [x: string]: this; + }; + e: { + f(x: this): this; + }; +} +declare class C1 { + a: { + x: this; + }; + b: { + (): this; + }; + c: { + new (): this; + }; + d: { + [x: string]: this; + }; + e: { + f(x: this): this; + }; +} +declare class C2 { + static x: this; + static y: any; + static foo(x: this): this; +} +declare namespace N1 { + var x: this; + var y: invalid; +} +declare class C3 { + x1: { + g(x: any): any; + }; + f(): invalid; +} + +/// [Errors] //// + +thisTypeErrors.ts(1,9): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(2,14): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(3,9): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(5,16): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(5,23): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(6,12): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(11,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(12,14): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(13,18): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(14,23): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(15,15): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(15,22): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(19,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(20,14): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(21,18): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(22,23): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(23,15): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(23,22): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(27,15): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(28,17): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(29,19): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(29,26): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(35,19): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(36,20): error TS2331: 'this' cannot be referenced in a module or namespace body. +thisTypeErrors.ts(36,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +thisTypeErrors.ts(41,14): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(41,21): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(45,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +thisTypeErrors.ts(46,23): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(46,30): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(50,18): error TS2526: A 'this' type is available only in a non-static member of a class or interface. +thisTypeErrors.ts(50,25): error TS2526: A 'this' type is available only in a non-static member of a class or interface. + + +==== thisTypeErrors.ts (32 errors) ==== + var x1: this; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + var x2: { a: this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + var x3: this[]; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + + function f1(x: this): this { + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + var y: this; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + return this; + } + + interface I1 { + a: { x: this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + b: { (): this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + c: { new (): this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + d: { [x: string]: this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + e: { f(x: this): this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + } + + class C1 { + a: { x: this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + b: { (): this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + c: { new (): this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + d: { [x: string]: this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + e: { f(x: this): this }; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + } + + class C2 { + static x: this; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + static y = undefined; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + static foo(x: this): this { + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + return undefined; + } + } + + namespace N1 { + export var x: this; + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + export var y = this; + ~~~~ +!!! error TS2331: 'this' cannot be referenced in a module or namespace body. + ~~~~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + + class C3 { + x1 = { + g(x: this): this { + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + return undefined; + } + } + f() { + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + function g(x: this): this { + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + return undefined; + } + let x2 = { + h(x: this): this { + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + ~~~~ +!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. + return undefined; + } + } + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeInAccessors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeInAccessors.d.ts new file mode 100644 index 0000000000000..e15981f3c572f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeInAccessors.d.ts @@ -0,0 +1,143 @@ +//// [tests/cases/conformance/types/thisType/thisTypeInAccessors.ts] //// + +//// [thisTypeInAccessors.ts] +interface Foo { + n: number; + x: number; +} + +const explicit = { + n: 12, + get x(this: Foo): number { return this.n; }, + set x(this: Foo, n: number) { this.n = n; } +} +const copiedFromGetter = { + n: 14, + get x(this: Foo): number { return this.n; }, + set x(n) { this.n = n; } +} +const copiedFromSetter = { + n: 15, + get x() { return this.n }, + set x(this: Foo, n: number) { this.n = n; } +} +const copiedFromGetterUnannotated = { + n: 16, + get x(this: Foo) { return this.n }, + set x(this, n) { this.n = n; } +} + +class Explicit { + n = 17; + get x(this: Foo): number { return this.n; } + set x(this: Foo, n: number) { this.n = n; } +} +class Contextual { + n = 21; + get x() { return this.n } // inside a class, so already correct +} + + +/// [Declarations] //// + + + +//// [thisTypeInAccessors.d.ts] +interface Foo { + n: number; + x: number; +} +declare const explicit: { + n: number; + x: number; +}; +declare const copiedFromGetter: { + n: number; + x: number; +}; +declare const copiedFromSetter: { + n: number; + x: number; +}; +declare const copiedFromGetterUnannotated: invalid; +declare class Explicit { + n: number; + get x(this: Foo): number; + set x(this: Foo, n: Foo); +} +declare class Contextual { + n: number; + get x(): invalid; +} + +/// [Errors] //// + +thisTypeInAccessors.ts(8,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. +thisTypeInAccessors.ts(9,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. +thisTypeInAccessors.ts(13,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. +thisTypeInAccessors.ts(19,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. +thisTypeInAccessors.ts(23,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +thisTypeInAccessors.ts(23,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. +thisTypeInAccessors.ts(24,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. +thisTypeInAccessors.ts(29,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. +thisTypeInAccessors.ts(30,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. +thisTypeInAccessors.ts(34,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + + +==== thisTypeInAccessors.ts (10 errors) ==== + interface Foo { + n: number; + x: number; + } + + const explicit = { + n: 12, + get x(this: Foo): number { return this.n; }, + ~~~~~~~~~ +!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. + set x(this: Foo, n: number) { this.n = n; } + ~~~~~~~~~ +!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. + } + const copiedFromGetter = { + n: 14, + get x(this: Foo): number { return this.n; }, + ~~~~~~~~~ +!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. + set x(n) { this.n = n; } + } + const copiedFromSetter = { + n: 15, + get x() { return this.n }, + set x(this: Foo, n: number) { this.n = n; } + ~~~~~~~~~ +!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. + } + const copiedFromGetterUnannotated = { + n: 16, + get x(this: Foo) { return this.n }, + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~~~~~~~~~ +!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. + set x(this, n) { this.n = n; } + ~~~~ +!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. + } + + class Explicit { + n = 17; + get x(this: Foo): number { return this.n; } + ~~~~~~~~~ +!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. + set x(this: Foo, n: number) { this.n = n; } + ~~~~~~~~~ +!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. + } + class Contextual { + n = 21; + get x() { return this.n } // inside a class, so already correct + ~ +!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + } + \ No newline at end of file diff --git a/tests/cases/compiler/accessorBodyInTypeContext.ts b/tests/cases/compiler/accessorBodyInTypeContext.ts index bfbc183077af4..88a9c47360a06 100644 --- a/tests/cases/compiler/accessorBodyInTypeContext.ts +++ b/tests/cases/compiler/accessorBodyInTypeContext.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Syntactically invalid. type A = { get foo() { return 0 } }; diff --git a/tests/cases/compiler/arrayFind.ts b/tests/cases/compiler/arrayFind.ts index 90883974766b7..80505ee58ad7a 100644 --- a/tests/cases/compiler/arrayFind.ts +++ b/tests/cases/compiler/arrayFind.ts @@ -1,4 +1,5 @@ // @lib: es2015 +// @isolatedDeclarationDiffReason: TS normalizes types // test fix for #18112, type guard predicates should narrow returned element function isNumber(x: any): x is number { diff --git a/tests/cases/compiler/booleanFilterAnyArray.ts b/tests/cases/compiler/booleanFilterAnyArray.ts index db5f38e78f9a0..66f2ed3ca6c53 100644 --- a/tests/cases/compiler/booleanFilterAnyArray.ts +++ b/tests/cases/compiler/booleanFilterAnyArray.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: TS normalizes types interface Bullean { } interface BulleanConstructor { new(v1?: any): Bullean; @@ -5,8 +6,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/capturedParametersInInitializers1.ts b/tests/cases/compiler/capturedParametersInInitializers1.ts index be989e92f8bcf..12a879dbaaf5f 100644 --- a/tests/cases/compiler/capturedParametersInInitializers1.ts +++ b/tests/cases/compiler/capturedParametersInInitializers1.ts @@ -1,4 +1,5 @@ // @target: es6 +// @isolatedDeclarationDiffReason: TS normalizes types // ok - usage is deferred function foo1(y = class {c = x}, x = 1) { new y().c; diff --git a/tests/cases/compiler/circularObjectLiteralAccessors.ts b/tests/cases/compiler/circularObjectLiteralAccessors.ts index 3546ee75e6f75..ad3fdae632b7d 100644 --- a/tests/cases/compiler/circularObjectLiteralAccessors.ts +++ b/tests/cases/compiler/circularObjectLiteralAccessors.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: TS merges accessors wth the same type. DTE can only merge if one type is specified. // @target: es5 // Repro from #6000 diff --git a/tests/cases/compiler/contextualTyping.ts b/tests/cases/compiler/contextualTyping.ts index 73a75d0146623..7fe7307cccdfc 100644 --- a/tests/cases/compiler/contextualTyping.ts +++ b/tests/cases/compiler/contextualTyping.ts @@ -1,4 +1,5 @@ // @sourcemap: true +// @isolatedDeclarationDiffReason: TS normalizes types // DEFAULT INTERFACES interface IFoo { n: number; diff --git a/tests/cases/compiler/contextualTyping38.ts b/tests/cases/compiler/contextualTyping38.ts index d6533d168267a..fd383e75e3227 100644 --- a/tests/cases/compiler/contextualTyping38.ts +++ b/tests/cases/compiler/contextualTyping38.ts @@ -1 +1,2 @@ +// @isolatedDeclarationDiffReason: TS normalizes types var foo = <{ (): number; }> function(a) { return a }; \ No newline at end of file diff --git a/tests/cases/compiler/contextualTyping39.ts b/tests/cases/compiler/contextualTyping39.ts index 295d9775b0d54..cfb3f9002746b 100644 --- a/tests/cases/compiler/contextualTyping39.ts +++ b/tests/cases/compiler/contextualTyping39.ts @@ -1 +1,2 @@ +// @isolatedDeclarationDiffReason: TS normalizes types var foo = <{ (): number; }> function() { return "err"; }; \ No newline at end of file diff --git a/tests/cases/compiler/correlatedUnions.ts b/tests/cases/compiler/correlatedUnions.ts index d498313e16ef3..cb3da13f07577 100644 --- a/tests/cases/compiler/correlatedUnions.ts +++ b/tests/cases/compiler/correlatedUnions.ts @@ -1,5 +1,6 @@ // @strict: true // @declaration: true +// @isolatedDeclarationDiffReason: TS normalizes types // @isolatedDeclarationFixedDiffReason: Printing differences // Various repros from #30581 diff --git a/tests/cases/compiler/declarationEmitNoNonRequiredParens.ts b/tests/cases/compiler/declarationEmitNoNonRequiredParens.ts index f4a4bd04623e1..53a1462d44d5d 100644 --- a/tests/cases/compiler/declarationEmitNoNonRequiredParens.ts +++ b/tests/cases/compiler/declarationEmitNoNonRequiredParens.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationDiffReason: TS normalizes types // @isolatedDeclarationFixedDiffReason: Printing differences export enum Test { A, B, C diff --git a/tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts b/tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts index 046ecac68c9dc..7d071c55dd945 100644 --- a/tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts +++ b/tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts @@ -2,6 +2,7 @@ // @declaration: true // @emitDeclarationOnly: true // @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed +// @isolatedDeclarationDiffReason: TS merges accessors wth the same type. DTE can only merge if one type is specified. // same type accessors export const obj1 = { diff --git a/tests/cases/compiler/declarationEmitPropertyNumericStringKey.ts b/tests/cases/compiler/declarationEmitPropertyNumericStringKey.ts index 43ffd07596954..25a59eb01fbc6 100644 --- a/tests/cases/compiler/declarationEmitPropertyNumericStringKey.ts +++ b/tests/cases/compiler/declarationEmitPropertyNumericStringKey.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationDiffReason: Computed property are not resolved // @isolatedDeclarationFixedDiffReason: Printing differences // https://github.com/microsoft/TypeScript/issues/55292 diff --git a/tests/cases/compiler/declarationEmitShadowingInferNotRenamed.ts b/tests/cases/compiler/declarationEmitShadowingInferNotRenamed.ts index a3cbdaaf1e364..7bf466434ee87 100644 --- a/tests/cases/compiler/declarationEmitShadowingInferNotRenamed.ts +++ b/tests/cases/compiler/declarationEmitShadowingInferNotRenamed.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationDiffReason: TS normalizes types // @isolatedDeclarationFixedDiffReason: Printing differences // Any instance type type Client = string diff --git a/tests/cases/compiler/declarationEmitWithDefaultAsComputedName.ts b/tests/cases/compiler/declarationEmitWithDefaultAsComputedName.ts index b63a5916cebdb..4ee068e5e8620 100644 --- a/tests/cases/compiler/declarationEmitWithDefaultAsComputedName.ts +++ b/tests/cases/compiler/declarationEmitWithDefaultAsComputedName.ts @@ -1,5 +1,6 @@ // @declaration: true // @target: es5 +// @isolatedDeclarationDiffReason: Computed property are not resolved // @isolatedDeclarationFixedDiffReason: Printing differences // @filename: other.ts diff --git a/tests/cases/compiler/declarationEmitWithDefaultAsComputedName2.ts b/tests/cases/compiler/declarationEmitWithDefaultAsComputedName2.ts index 53dfef078b018..e6088a2bf2279 100644 --- a/tests/cases/compiler/declarationEmitWithDefaultAsComputedName2.ts +++ b/tests/cases/compiler/declarationEmitWithDefaultAsComputedName2.ts @@ -1,5 +1,6 @@ // @declaration: true // @target: es5 +// @isolatedDeclarationDiffReason: Computed property are not resolved // @isolatedDeclarationFixedDiffReason: Printing differences // @filename: other.ts diff --git a/tests/cases/compiler/duplicateObjectLiteralProperty_computedName1.ts b/tests/cases/compiler/duplicateObjectLiteralProperty_computedName1.ts index 9bc5e2e3d934b..bb90c5f89208f 100644 --- a/tests/cases/compiler/duplicateObjectLiteralProperty_computedName1.ts +++ b/tests/cases/compiler/duplicateObjectLiteralProperty_computedName1.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: DTE preserves different duplicate identifier const t1 = { 1: 1, [1]: 0 // duplicate diff --git a/tests/cases/compiler/duplicateObjectLiteralProperty_computedName2.ts b/tests/cases/compiler/duplicateObjectLiteralProperty_computedName2.ts index ff56ce9cfd486..a34847e44ea65 100644 --- a/tests/cases/compiler/duplicateObjectLiteralProperty_computedName2.ts +++ b/tests/cases/compiler/duplicateObjectLiteralProperty_computedName2.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Computed property are not resolved const n = 1; const s = "s"; enum E1 { A = "ENUM_KEY" } diff --git a/tests/cases/compiler/duplicateVarsAcrossFileBoundaries.ts b/tests/cases/compiler/duplicateVarsAcrossFileBoundaries.ts index 03de4077caf88..d2bd47dee4a75 100644 --- a/tests/cases/compiler/duplicateVarsAcrossFileBoundaries.ts +++ b/tests/cases/compiler/duplicateVarsAcrossFileBoundaries.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: TSC Resolves variable types across files. // @Filename: duplicateVarsAcrossFileBoundaries_0.ts var x = 3; var y = ""; diff --git a/tests/cases/compiler/dynamicNames.ts b/tests/cases/compiler/dynamicNames.ts index 97b96e4c7796f..1907828e27b34 100644 --- a/tests/cases/compiler/dynamicNames.ts +++ b/tests/cases/compiler/dynamicNames.ts @@ -2,6 +2,7 @@ // @lib: esnext // @module: commonjs // @declaration: true +// @isolatedDeclarationDiffReason: Computed property are not resolved // @isolatedDeclarationFixedDiffReason: Printing differences // @filename: module.ts export const c0 = "a"; diff --git a/tests/cases/compiler/escapedIdentifiers.ts b/tests/cases/compiler/escapedIdentifiers.ts index c58c59d9b4241..375abf8d69d09 100644 --- a/tests/cases/compiler/escapedIdentifiers.ts +++ b/tests/cases/compiler/escapedIdentifiers.ts @@ -1,5 +1,6 @@ // @allowUnusedLabels: true // @allowUnreachableCode: true +// @isolatedDeclarationDiffReason: DTE resolves unicode escapes in some cases. /* 0 .. \u0030 diff --git a/tests/cases/compiler/expandoFunctionNestedAssigments.ts b/tests/cases/compiler/expandoFunctionNestedAssigments.ts index 4d0cb13a02a31..8095247f72e07 100644 --- a/tests/cases/compiler/expandoFunctionNestedAssigments.ts +++ b/tests/cases/compiler/expandoFunctionNestedAssigments.ts @@ -4,6 +4,12 @@ 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); diff --git a/tests/cases/compiler/gettersAndSettersErrors.ts b/tests/cases/compiler/gettersAndSettersErrors.ts index fcc26abf6221f..3065b861f9104 100644 --- a/tests/cases/compiler/gettersAndSettersErrors.ts +++ b/tests/cases/compiler/gettersAndSettersErrors.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Duplicate identifiers in class result in different types class C { public get Foo() { return "foo";} // ok public set Foo(foo:string) {} // ok diff --git a/tests/cases/compiler/hugeDeclarationOutputGetsTruncatedWithError.ts b/tests/cases/compiler/hugeDeclarationOutputGetsTruncatedWithError.ts index e136abeb1b8e5..b226684183a72 100644 --- a/tests/cases/compiler/hugeDeclarationOutputGetsTruncatedWithError.ts +++ b/tests/cases/compiler/hugeDeclarationOutputGetsTruncatedWithError.ts @@ -1,4 +1,6 @@ // @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"; diff --git a/tests/cases/compiler/inKeywordAndIntersection.ts b/tests/cases/compiler/inKeywordAndIntersection.ts index dadf93a8649d0..f81391f3b0f1e 100644 --- a/tests/cases/compiler/inKeywordAndIntersection.ts +++ b/tests/cases/compiler/inKeywordAndIntersection.ts @@ -1,4 +1,5 @@ // @strict: true +// @isolatedDeclarationDiffReason: TS normalizes types class A { a = 0 } class B { b = 0 } diff --git a/tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts b/tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts index 8c77a0c61773a..d42fc830a8814 100644 --- a/tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts +++ b/tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts @@ -1,4 +1,5 @@ // @target: ES2020 // @declaration: true // @isolatedDeclarationFixedDiffReason: Printing differences +// @isolatedDeclarationDiffReason: TS normalizes types export const thing = (null as any as { [K in keyof number[] as Exclude]: (number[])[K] }); diff --git a/tests/cases/compiler/objectLiteralComputedNameNoDeclarationError.ts b/tests/cases/compiler/objectLiteralComputedNameNoDeclarationError.ts index 64167341f3d20..82a44361f00a4 100644 --- a/tests/cases/compiler/objectLiteralComputedNameNoDeclarationError.ts +++ b/tests/cases/compiler/objectLiteralComputedNameNoDeclarationError.ts @@ -1,4 +1,5 @@ // @declaration: true +// @isolatedDeclarationDiffReason: Computed property are not resolved // @isolatedDeclarationFixedDiffReason: Printing differences const Foo = { BANANA: 'banana' as 'banana', diff --git a/tests/cases/compiler/objectLiteralEnumPropertyNames.ts b/tests/cases/compiler/objectLiteralEnumPropertyNames.ts index 0f698d9c51d8d..578c47c4f67e5 100644 --- a/tests/cases/compiler/objectLiteralEnumPropertyNames.ts +++ b/tests/cases/compiler/objectLiteralEnumPropertyNames.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Computed property are not resolved // Fixes #16887 enum Strs { A = 'a', 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/parseInvalidNonNullableTypes.ts b/tests/cases/compiler/parseInvalidNonNullableTypes.ts index f1ad19c6a2d98..468f5be1a70ab 100644 --- a/tests/cases/compiler/parseInvalidNonNullableTypes.ts +++ b/tests/cases/compiler/parseInvalidNonNullableTypes.ts @@ -1,4 +1,5 @@ // @strict: true +// @isolatedDeclarationDiffReason: Syntactically invalid. function f1(a: string): a is string! { return true; diff --git a/tests/cases/compiler/parseInvalidNullableTypes.ts b/tests/cases/compiler/parseInvalidNullableTypes.ts index f7d9f2643513e..f7f5c7fc7750c 100644 --- a/tests/cases/compiler/parseInvalidNullableTypes.ts +++ b/tests/cases/compiler/parseInvalidNullableTypes.ts @@ -1,4 +1,5 @@ // @strict: true +// @isolatedDeclarationDiffReason: Syntactically invalid. function f1(a: string): a is ?string { return true; diff --git a/tests/cases/compiler/parseTypes.ts b/tests/cases/compiler/parseTypes.ts index c259deb2a2aa3..8c6407d05b5e7 100644 --- a/tests/cases/compiler/parseTypes.ts +++ b/tests/cases/compiler/parseTypes.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: TS normalizes types var x = <() => number>null; var y = <{(): number; }>null; diff --git a/tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts b/tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts index 7ea80d94de3f6..321278c69ae8d 100644 --- a/tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts +++ b/tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts @@ -1,5 +1,6 @@ // @target: es2015 // @declaration: true +// @isolatedDeclarationDiffReason: TS normalizes types // @isolatedDeclarationFixedDiffReason: Aliases are preserved for binding patterns GH#55654 // GH#37454, GH#41044 diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES5.ts index e3b379602b93e..b3ce0bed7e573 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES5.ts @@ -1,4 +1,5 @@ // @target: es5 +// @isolatedDeclarationDiffReason: Computed property are not resolved enum E { member } diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES6.ts index 5063d1e2d0c64..87ce8b403c68c 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES6.ts @@ -1,4 +1,5 @@ // @target: es6 +// @isolatedDeclarationDiffReason: Computed property are not resolved enum E { member } diff --git a/tests/cases/conformance/expressions/asOperator/asOperator1.ts b/tests/cases/conformance/expressions/asOperator/asOperator1.ts index cf953d75ab46e..4a3888eda8392 100644 --- a/tests/cases/conformance/expressions/asOperator/asOperator1.ts +++ b/tests/cases/conformance/expressions/asOperator/asOperator1.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: TS changes the order of union constituents var as = 43; var x = undefined as number; var y = (null as string).length; diff --git a/tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts b/tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts index d6bfd84fd9a8c..7316c2eaadc4e 100644 --- a/tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts +++ b/tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts @@ -1,4 +1,5 @@ // @allowUnreachableCode: true +// @isolatedDeclarationDiffReason: TS normalizes types class Base { private p; } class Derived1 extends Base { private m; } diff --git a/tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts b/tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts index af0622179ac7f..dd2ac70feea2f 100644 --- a/tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts +++ b/tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: TS merges accessors wth the same type. DTE can only merge if one type is specified. // Get and set accessor with the same name var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } }; diff --git a/tests/cases/conformance/expressions/optionalChaining/optionalChainingInference.ts b/tests/cases/conformance/expressions/optionalChaining/optionalChainingInference.ts index 1b321913a1682..762d896268866 100644 --- a/tests/cases/conformance/expressions/optionalChaining/optionalChainingInference.ts +++ b/tests/cases/conformance/expressions/optionalChaining/optionalChainingInference.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: TS normalizes types // https://github.com/microsoft/TypeScript/issues/34579 declare function unbox(box: { value: T | undefined }): T; declare const su: string | undefined; diff --git a/tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions01.ts b/tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions01.ts index 690a0296afbdc..befa5174e9f11 100644 --- a/tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions01.ts +++ b/tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions01.ts @@ -1,4 +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 636b8b1c1c134..4c77f51665e0f 100644 --- a/tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions02.ts +++ b/tests/cases/conformance/expressions/typeAssertions/duplicatePropertiesInTypeAssertions02.ts @@ -1,4 +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/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/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts b/tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts index 963b6abc6f9d6..4ba1376469656 100644 --- a/tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts +++ b/tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts @@ -2,7 +2,8 @@ // @module: node16,nodenext // @declaration: true // @outDir: out -// @isolatedDeclarationFixedDiffReason: TODO: Import type has different module attributes +// @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/nodeModulesImportTypeModeDeclarationEmit1.ts b/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts index 40d836e2849d0..7ed74c535da11 100644 --- a/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts +++ b/tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts @@ -2,7 +2,8 @@ // @module: node16,nodenext // @declaration: true // @outDir: out -// @isolatedDeclarationFixedDiffReason: TODO: Import type has different module attributes +// @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..272e8e8944e33 100644 --- a/tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts +++ b/tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts @@ -1,3 +1,5 @@ +// @isolatedDeclarations: false +// @isolatedDeclarationDiffReason: Syntactically invalid. var v = () => 1; var v = a; diff --git a/tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts b/tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts index a07324f834892..91a5401f8a0ad 100644 --- a/tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts +++ b/tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts @@ -1,5 +1,6 @@ // @strict: true // @noUncheckedIndexedAccess: true +// @isolatedDeclarationDiffReason: TS normalizes types type CheckBooleanOnly = any; // Validate CheckBooleanOnly works - should error diff --git a/tests/cases/conformance/types/literal/literalTypesAndTypeAssertions.ts b/tests/cases/conformance/types/literal/literalTypesAndTypeAssertions.ts index 5c11dd91035e8..692ca1f1ed14e 100644 --- a/tests/cases/conformance/types/literal/literalTypesAndTypeAssertions.ts +++ b/tests/cases/conformance/types/literal/literalTypesAndTypeAssertions.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: TS normalizes types const obj = { a: "foo" as "foo", b: <"foo">"foo", diff --git a/tests/cases/conformance/types/literal/stringLiteralsWithTypeAssertions01.ts b/tests/cases/conformance/types/literal/stringLiteralsWithTypeAssertions01.ts index 2e3542704129d..e590e0570f332 100644 --- a/tests/cases/conformance/types/literal/stringLiteralsWithTypeAssertions01.ts +++ b/tests/cases/conformance/types/literal/stringLiteralsWithTypeAssertions01.ts @@ -1,4 +1,5 @@ -let fooOrBar: "foo" | "bar"; +// @isolatedDeclarationDiffReason: TS normalizes types +let fooOrBar: "foo" | "bar"; let a = "foo" as "bar"; let b = "bar" as "foo"; diff --git a/tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts b/tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts index b39d9dd53a8fd..d1e3ce2b798f4 100644 --- a/tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts +++ b/tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: TS normalizes types // The following are errors because of circular references var c: typeof c; var c: any; diff --git a/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts b/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts index 86f6df5cdfe3d..aedab63711a19 100644 --- a/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts +++ b/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: TS resolves types // it is an error to use a generic type without type arguments // all of these are errors diff --git a/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts b/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts index 7f062766cb3b5..2a7d99d9fde0c 100644 --- a/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts +++ b/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: TS resolves types // it is an error to use a generic type without type arguments // all of these are errors diff --git a/tests/cases/conformance/types/thisType/thisTypeErrors.ts b/tests/cases/conformance/types/thisType/thisTypeErrors.ts index a7e4a46493d05..b1b99832b8dd5 100644 --- a/tests/cases/conformance/types/thisType/thisTypeErrors.ts +++ b/tests/cases/conformance/types/thisType/thisTypeErrors.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: TS resolves invalid types to any var x1: this; var x2: { a: this }; var x3: this[]; diff --git a/tests/cases/conformance/types/thisType/thisTypeInAccessors.ts b/tests/cases/conformance/types/thisType/thisTypeInAccessors.ts index b09037597671e..65d547a872a5b 100644 --- a/tests/cases/conformance/types/thisType/thisTypeInAccessors.ts +++ b/tests/cases/conformance/types/thisType/thisTypeInAccessors.ts @@ -1,6 +1,7 @@ // @noImplicitAny: true // @noImplicitThis: true // @target: es5 +// @isolatedDeclarationDiffReason: TS merges accessors wth the same type. DTE can only merge if one type is specified. interface Foo { n: number; x: number; diff --git a/tests/cases/conformance/types/tuple/named/namedTupleMembers.ts b/tests/cases/conformance/types/tuple/named/namedTupleMembers.ts index a289c3f4940f3..c0d716bb71ab0 100644 --- a/tests/cases/conformance/types/tuple/named/namedTupleMembers.ts +++ b/tests/cases/conformance/types/tuple/named/namedTupleMembers.ts @@ -1,5 +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/typeRelationships/typeInference/contextualSignatureInstantiation.ts b/tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts index 30c6579dabb07..d708a389ba03d 100644 --- a/tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts +++ b/tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: TS changes the order of union constituents // TypeScript Spec, section 4.12.2: // If e is an expression of a function type that contains exactly one generic call signature and no other members, // and T is a function type with exactly one non - generic call signature and no other members, then any inferences From 898eb0f00163f49decb4d55c47f5fd744bb7e857 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Sat, 2 Dec 2023 10:34:54 -0500 Subject: [PATCH 166/224] Remove unused baseline Signed-off-by: Titian Cernicova-Dragomir --- ...nEmitObjectLiteralAccessors1.d.ts.map.diff | 16 - ...rationEmitObjectLiteralAccessors1.d.ts.map | 37 -- ...tionEmitObjectLiteralAccessors1.d.ts.map.f | 627 ------------------ ...rationEmitObjectLiteralAccessors1.d.ts.map | 37 -- ...tionEmitObjectLiteralAccessors1.d.ts.map.f | 587 ---------------- 5 files changed, 1304 deletions(-) delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts.map.f delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectLiteralAccessors1.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectLiteralAccessors1.d.ts.map.f diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.map.diff deleted file mode 100644 index 97e5f9720001c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitObjectLiteralAccessors1.d.ts.map.diff +++ /dev/null @@ -1,16 +0,0 @@ -// [[Reason: Sourcemap is more detailed]] //// - -//// [tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,6 +1,6 @@ - - //// [declarationEmitObjectLiteralAccessors1.d.ts.map] --{"version":3,"file":"declarationEmitObjectLiteralAccessors1.d.ts","sourceRoot":"","sources":["declarationEmitObjectLiteralAccessors1.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,EAAE;IACf,gDAAgD;IAChD,CAAC,EAAE,MAAM,CAAC;CAQb,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE;IACf,wBAAwB;IACxB,IAAI,CAAC,IAAI,MAAM,CAAC;IAChB,wBAAwB;IACxB,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE;CAQpB,CAAC;AAEF,eAAO,MAAM,IAAI;IACf,wBAAwB;;CAIzB,CAAC;AAEF,eAAO,MAAM,IAAI;IACf,wBAAwB;;CAEzB,CAAC"} -+{"version":3,"file":"declarationEmitObjectLiteralAccessors1.d.ts","sourceRoot":"","sources":["declarationEmitObjectLiteralAccessors1.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,EAAE;IACf,gDAAgD;IAChD,CAAC,EAAE,MAAM,CAAC;CAQb,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE;IACf,wBAAwB;IACxB,IAAI,CAAC,IAAI,MAAM,CAAC;I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HNldHRlciAqLwogIHNldCB4KGE6IG51bWJlcikge30sCn07CgpleHBvcnQgY29uc3Qgb2JqMyA9IHsKICAvKiogbXkgYXdlc29tZSBnZXR0ZXIgKi8KICBnZXQgeCgpOiBzdHJpbmcgewogICAgcmV0dXJuICIiOwogIH0sCn07CgpleHBvcnQgY29uc3Qgb2JqNCA9IHsKICAvKiogbXkgYXdlc29tZSBzZXR0ZXIgKi8KICBzZXQgeChhOiBudW1iZXIpIHt9LAp9Owo= -+//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3Qgb2JqMTogew0KICAgIC8qKiBteSBhd2Vzb21lIGdldHRlciAoZmlyc3QgaW4gc291cmNlIG9yZGVyKSAqLw0KICAgIHg6IHN0cmluZzsNCn07DQpleHBvcnQgZGVjbGFyZSBjb25zdCBvYmoyOiB7DQogICAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovDQogICAgZ2V0IHgoKTogc3RyaW5nOw0KICAgIC8qKiBteSBhd2Vzb21lIHNldHRlciAqLw0KICAgIHNldCB4KGE6IG51bWJlcik7DQp9Ow0KZXhwb3J0IGRlY2xhcmUgY29uc3Qgb2JqMzogew0KICAgIC8qKiBteSBhd2Vzb21lIGdldHRlciAqLw0KICAgIHJlYWRvbmx5IHg6IHN0cmluZzsNCn07DQpleHBvcnQgZGVjbGFyZSBjb25zdCBvYmo0OiB7DQogICAgLyoqIG15IGF3ZXNvbWUgc2V0dGVyICovDQogICAgeDogbnVtYmVyOw0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRlY2xhcmF0aW9uRW1pdE9iamVjdExpdGVyYWxBY2Nlc3NvcnMxLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0T2JqZWN0TGl0ZXJhbEFjY2Vzc29yczEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdE9iamVjdExpdG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SB7CiAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovCiAgZ2V0IHgoKTogc3RyaW5nIHsKICAgIHJldHVybiAiIjsKICB9LAogIC8qKiBteSBhd2Vzb21lIHNldHRlciAqLwogIHNldCB4KGE6IG51bWJlcikge30sCn07CgpleHBvcnQgY29uc3Qgb2JqMyA9IHsKICAvKiogbXkgYXdlc29tZSBnZXR0ZXIgKi8KICBnZXQgeCgpOiBzdHJpbmcgewogICAgcmV0dXJuICIiOwogIH0sCn07CgpleHBvcnQgY29uc3Qgb2JqNCA9IHsKICAvKiogbXkgYXdlc29tZSBzZXR0ZXIgKi8KICBzZXQgeChhOiBudW1iZXIpIHt9LAp9Owo= - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts.map deleted file mode 100644 index 29f56d4927db1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts.map +++ /dev/null @@ -1,37 +0,0 @@ -//// [tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts] //// - - - -/// [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 - -/// [Declarations Maps] //// - - -//// [declarationEmitObjectLiteralAccessors1.d.ts.map] -{"version":3,"file":"declarationEmitObjectLiteralAccessors1.d.ts","sourceRoot":"","sources":["declarationEmitObjectLiteralAccessors1.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,EAAE;IACf,gDAAgD;IAChD,CAAC,EA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cn0gPSB7CiAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovCiAgZ2V0IHgoKTogc3RyaW5nIHsKICAgIHJldHVybiAiIjsKICB9LAogIC8qKiBteSBhd2Vzb21lIHNldHRlciAqLwogIHNldCB4KGE6IG51bWJlcikge30sCn07CgpleHBvcnQgY29uc3Qgb2JqMyA9IHsKICAvKiogbXkgYXdlc29tZSBnZXR0ZXIgKi8KICBnZXQgeCgpOiBzdHJpbmcgewogICAgcmV0dXJuICIiOwogIH0sCn07CgpleHBvcnQgY29uc3Qgb2JqNCA9IHsKICAvKiogbXkgYXdlc29tZSBzZXR0ZXIgKi8KICBzZXQgeChhOiBudW1iZXIpIHt9LAp9Owo= - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts.map.f b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts.map.f deleted file mode 100644 index 278e753f40f78..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectLiteralAccessors1.d.ts.map.f +++ /dev/null @@ -1,627 +0,0 @@ -//// [declarationEmitObjectLiteralAccessors1.ts] //// - -//// [declarationEmitObjectLiteralAccessors1.d.ts.map] -{ - "version": 3, - "file": "declarationEmitObjectLiteralAccessors1.d.ts", - "sourceRoot": "", - "sources": [ - "declarationEmitObjectLiteralAccessors1.ts" - ], - "names": [], - "mappings": [ - { - "generatedLine": 1, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 2, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 1, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 2, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 1, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 2, - "originalColumn": 13, - "name": null, - "generatedText": "const ", - "sourceText": "const " - }, - { - "generatedLine": 1, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 2, - "originalColumn": 17, - "name": null, - "generatedText": "obj1", - "sourceText": "obj1" - }, - { - "generatedLine": 1, - "generatedColumn": 27, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 2, - "originalColumn": 19, - "name": null, - "generatedText": ": ", - "sourceText": " =" - }, - { - "generatedLine": 2, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 3, - "originalColumn": 4, - "name": null - }, - { - "generatedLine": 2, - "generatedColumn": 52, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 3, - "originalColumn": 52, - "name": null, - "generatedText": "/** my awesome getter (first in source order) */", - "sourceText": "* my awesome getter (first in source order) */" - }, - { - "generatedLine": 3, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 4, - "originalColumn": 4, - "name": null - }, - { - "generatedLine": 3, - "generatedColumn": 5, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 4, - "originalColumn": 5, - "name": null, - "generatedText": "x", - "sourceText": "t" - }, - { - "generatedLine": 3, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 4, - "originalColumn": 7, - "name": null, - "generatedText": ": ", - "sourceText": " x" - }, - { - "generatedLine": 3, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 4, - "originalColumn": 13, - "name": null, - "generatedText": "string", - "sourceText": "(): st" - }, - { - "generatedLine": 3, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 4, - "originalColumn": 14, - "name": null, - "generatedText": ";", - "sourceText": "r" - }, - { - "generatedLine": 4, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 12, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 4, - "generatedColumn": 2, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 12, - "originalColumn": 2, - "name": null, - "generatedText": ";", - "sourceText": "x" - }, - { - "generatedLine": 5, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 15, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 5, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 15, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": " ret" - }, - { - "generatedLine": 5, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 15, - "originalColumn": 13, - "name": null, - "generatedText": "const ", - "sourceText": "urn \"\"" - }, - { - "generatedLine": 5, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 15, - "originalColumn": 17, - "name": null, - "generatedText": "obj2", - "sourceText": ";" - }, - { - "generatedLine": 5, - "generatedColumn": 27, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 15, - "originalColumn": 19, - "name": null, - "generatedText": ": ", - "sourceText": "" - }, - { - "generatedLine": 6, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 16, - "originalColumn": 4, - "name": null - }, - { - "generatedLine": 6, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 16, - "originalColumn": 28, - "name": null, - "generatedText": "/** my awesome getter */", - "sourceText": "" - }, - { - "generatedLine": 7, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 17, - "originalColumn": 4, - "name": null - }, - { - "generatedLine": 7, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 17, - "originalColumn": 8, - "name": null, - "generatedText": "get ", - "sourceText": "* my" - }, - { - "generatedLine": 7, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 17, - "originalColumn": 9, - "name": null, - "generatedText": "x", - "sourceText": " " - }, - { - "generatedLine": 7, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 17, - "originalColumn": 13, - "name": null, - "generatedText": "(): ", - "sourceText": "awes" - }, - { - "generatedLine": 7, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 17, - "originalColumn": 19, - "name": null, - "generatedText": "string", - "sourceText": "ome se" - }, - { - "generatedLine": 7, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 17, - "originalColumn": 20, - "name": null, - "generatedText": ";", - "sourceText": "t" - }, - { - "generatedLine": 8, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 18, - "originalColumn": 4, - "name": null - }, - { - "generatedLine": 8, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 18, - "originalColumn": 28, - "name": null, - "generatedText": "/** my awesome setter */", - "sourceText": "t x(a: number) {}," - }, - { - "generatedLine": 9, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 19, - "originalColumn": 4, - "name": null - }, - { - "generatedLine": 9, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 19, - "originalColumn": 8, - "name": null, - "generatedText": "set ", - "sourceText": "" - }, - { - "generatedLine": 9, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 19, - "originalColumn": 9, - "name": null, - "generatedText": "x", - "sourceText": "" - }, - { - "generatedLine": 9, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 19, - "originalColumn": 10, - "name": null, - "generatedText": "(", - "sourceText": "" - }, - { - "generatedLine": 9, - "generatedColumn": 11, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 19, - "originalColumn": 11, - "name": null, - "generatedText": "a", - "sourceText": "" - }, - { - "generatedLine": 9, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 19, - "originalColumn": 13, - "name": null, - "generatedText": ": ", - "sourceText": "" - }, - { - "generatedLine": 9, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 19, - "originalColumn": 19, - "name": null, - "generatedText": "number", - "sourceText": "" - }, - { - "generatedLine": 9, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 19, - "originalColumn": 21, - "name": null, - "generatedText": ");", - "sourceText": "" - }, - { - "generatedLine": 10, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 27, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 10, - "generatedColumn": 2, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 27, - "originalColumn": 2, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 11, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 29, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 11, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 29, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": " /** m" - }, - { - "generatedLine": 11, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 29, - "originalColumn": 13, - "name": null, - "generatedText": "const ", - "sourceText": "y awes" - }, - { - "generatedLine": 11, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 29, - "originalColumn": 17, - "name": null, - "generatedText": "obj3", - "sourceText": "ome " - }, - { - "generatedLine": 12, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 30, - "originalColumn": 2, - "name": null - }, - { - "generatedLine": 12, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 30, - "originalColumn": 26, - "name": null, - "generatedText": "/** my awesome getter */", - "sourceText": "set x(a: number) {}," - }, - { - "generatedLine": 13, - "generatedColumn": 16, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 31, - "originalColumn": 11, - "name": null - }, - { - "generatedLine": 13, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 31, - "originalColumn": 17, - "name": null, - "generatedText": "string", - "sourceText": "" - }, - { - "generatedLine": 14, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 34, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 14, - "generatedColumn": 2, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 34, - "originalColumn": 2, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 15, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 36, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 15, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 36, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "" - }, - { - "generatedLine": 15, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 36, - "originalColumn": 13, - "name": null, - "generatedText": "const ", - "sourceText": "" - }, - { - "generatedLine": 15, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 36, - "originalColumn": 17, - "name": null, - "generatedText": "obj4", - "sourceText": "" - }, - { - "generatedLine": 16, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 37, - "originalColumn": 2, - "name": null - }, - { - "generatedLine": 16, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 37, - "originalColumn": 26, - "name": null, - "generatedText": "/** my awesome setter */", - "sourceText": "" - }, - { - "generatedLine": 17, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 38, - "originalColumn": 11, - "name": null - }, - { - "generatedLine": 17, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 38, - "originalColumn": 17, - "name": null, - "generatedText": "number", - "sourceText": "" - }, - { - "generatedLine": 18, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 39, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 18, - "generatedColumn": 2, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 39, - "originalColumn": 2, - "name": null, - "generatedText": ";", - "sourceText": "" - } - ] -} \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectLiteralAccessors1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectLiteralAccessors1.d.ts.map deleted file mode 100644 index ecaef0e12a0e5..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectLiteralAccessors1.d.ts.map +++ /dev/null @@ -1,37 +0,0 @@ -//// [tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts] //// - - - -/// [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 - -/// [Declarations Maps] //// - - -//// [declarationEmitObjectLiteralAccessors1.d.ts.map] -{"version":3,"file":"declarationEmitObjectLiteralAccessors1.d.ts","sourceRoot":"","sources":["declarationEmitObjectLiteralAccessors1.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,EAAE;IACf,gDAAgD;IAChD,CAAC,EAAE,MAAM,CAAC;CAQb,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE;IACf,wBAAwB;IACxB,IAAI,CAAC,IAAI,MAAM,CAAC;IAChB,wBAAwB;IACxB,IAAI,CAAC,CAAC,CAAC,EAA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qgb2JqMyA9IHsKICAvKiogbXkgYXdlc29tZSBnZXR0ZXIgKi8KICBnZXQgeCgpOiBzdHJpbmcgewogICAgcmV0dXJuICIiOwogIH0sCn07CgpleHBvcnQgY29uc3Qgb2JqNCA9IHsKICAvKiogbXkgYXdlc29tZSBzZXR0ZXIgKi8KICBzZXQgeChhOiBudW1iZXIpIHt9LAp9Owo= - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectLiteralAccessors1.d.ts.map.f b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectLiteralAccessors1.d.ts.map.f deleted file mode 100644 index b51cc065386cf..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectLiteralAccessors1.d.ts.map.f +++ /dev/null @@ -1,587 +0,0 @@ -//// [declarationEmitObjectLiteralAccessors1.ts] //// - -//// [declarationEmitObjectLiteralAccessors1.d.ts.map] -{ - "version": 3, - "file": "declarationEmitObjectLiteralAccessors1.d.ts", - "sourceRoot": "", - "sources": [ - "declarationEmitObjectLiteralAccessors1.ts" - ], - "names": [], - "mappings": [ - { - "generatedLine": 1, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 2, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 1, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 2, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 1, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 2, - "originalColumn": 13, - "name": null, - "generatedText": "const ", - "sourceText": "const " - }, - { - "generatedLine": 1, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 2, - "originalColumn": 17, - "name": null, - "generatedText": "obj1", - "sourceText": "obj1" - }, - { - "generatedLine": 1, - "generatedColumn": 27, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 2, - "originalColumn": 19, - "name": null, - "generatedText": ": ", - "sourceText": " =" - }, - { - "generatedLine": 2, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 3, - "originalColumn": 4, - "name": null - }, - { - "generatedLine": 2, - "generatedColumn": 52, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 3, - "originalColumn": 52, - "name": null, - "generatedText": "/** my awesome getter (first in source order) */", - "sourceText": "* my awesome getter (first in source order) */" - }, - { - "generatedLine": 3, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 4, - "originalColumn": 4, - "name": null - }, - { - "generatedLine": 3, - "generatedColumn": 5, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 4, - "originalColumn": 5, - "name": null, - "generatedText": "x", - "sourceText": "t" - }, - { - "generatedLine": 3, - "generatedColumn": 7, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 4, - "originalColumn": 7, - "name": null, - "generatedText": ": ", - "sourceText": " x" - }, - { - "generatedLine": 3, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 4, - "originalColumn": 13, - "name": null, - "generatedText": "string", - "sourceText": "(): st" - }, - { - "generatedLine": 3, - "generatedColumn": 14, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 4, - "originalColumn": 14, - "name": null, - "generatedText": ";", - "sourceText": "r" - }, - { - "generatedLine": 4, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 12, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 4, - "generatedColumn": 2, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 12, - "originalColumn": 2, - "name": null, - "generatedText": ";", - "sourceText": "x" - }, - { - "generatedLine": 5, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 15, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 5, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 15, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": " ret" - }, - { - "generatedLine": 5, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 15, - "originalColumn": 13, - "name": null, - "generatedText": "const ", - "sourceText": "urn \"\"" - }, - { - "generatedLine": 5, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 15, - "originalColumn": 17, - "name": null, - "generatedText": "obj2", - "sourceText": ";" - }, - { - "generatedLine": 5, - "generatedColumn": 27, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 15, - "originalColumn": 19, - "name": null, - "generatedText": ": ", - "sourceText": "" - }, - { - "generatedLine": 6, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 16, - "originalColumn": 4, - "name": null - }, - { - "generatedLine": 6, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 16, - "originalColumn": 28, - "name": null, - "generatedText": "/** my awesome getter */", - "sourceText": "" - }, - { - "generatedLine": 7, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 17, - "originalColumn": 4, - "name": null - }, - { - "generatedLine": 7, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 17, - "originalColumn": 8, - "name": null, - "generatedText": "get ", - "sourceText": "* my" - }, - { - "generatedLine": 7, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 17, - "originalColumn": 9, - "name": null, - "generatedText": "x", - "sourceText": " " - }, - { - "generatedLine": 7, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 17, - "originalColumn": 13, - "name": null, - "generatedText": "(): ", - "sourceText": "awes" - }, - { - "generatedLine": 7, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 17, - "originalColumn": 19, - "name": null, - "generatedText": "string", - "sourceText": "ome se" - }, - { - "generatedLine": 7, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 17, - "originalColumn": 20, - "name": null, - "generatedText": ";", - "sourceText": "t" - }, - { - "generatedLine": 8, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 18, - "originalColumn": 4, - "name": null - }, - { - "generatedLine": 8, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 18, - "originalColumn": 28, - "name": null, - "generatedText": "/** my awesome setter */", - "sourceText": "t x(a: number) {}," - }, - { - "generatedLine": 9, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 19, - "originalColumn": 4, - "name": null - }, - { - "generatedLine": 9, - "generatedColumn": 8, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 19, - "originalColumn": 8, - "name": null, - "generatedText": "set ", - "sourceText": "" - }, - { - "generatedLine": 9, - "generatedColumn": 9, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 19, - "originalColumn": 9, - "name": null, - "generatedText": "x", - "sourceText": "" - }, - { - "generatedLine": 9, - "generatedColumn": 10, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 19, - "originalColumn": 10, - "name": null, - "generatedText": "(", - "sourceText": "" - }, - { - "generatedLine": 9, - "generatedColumn": 11, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 19, - "originalColumn": 11, - "name": null, - "generatedText": "a", - "sourceText": "" - }, - { - "generatedLine": 9, - "generatedColumn": 13, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 19, - "originalColumn": 13, - "name": null, - "generatedText": ": ", - "sourceText": "" - }, - { - "generatedLine": 9, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 19, - "originalColumn": 19, - "name": null, - "generatedText": "number", - "sourceText": "" - }, - { - "generatedLine": 9, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 19, - "originalColumn": 21, - "name": null, - "generatedText": ");", - "sourceText": "" - }, - { - "generatedLine": 10, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 27, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 10, - "generatedColumn": 2, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 27, - "originalColumn": 2, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 11, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 29, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 11, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 29, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": " /** m" - }, - { - "generatedLine": 11, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 29, - "originalColumn": 13, - "name": null, - "generatedText": "const ", - "sourceText": "y awes" - }, - { - "generatedLine": 11, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 29, - "originalColumn": 17, - "name": null, - "generatedText": "obj3", - "sourceText": "ome " - }, - { - "generatedLine": 12, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 30, - "originalColumn": 2, - "name": null - }, - { - "generatedLine": 12, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 30, - "originalColumn": 26, - "name": null, - "generatedText": "/** my awesome getter */", - "sourceText": "set x(a: number) {}," - }, - { - "generatedLine": 14, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 34, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 14, - "generatedColumn": 2, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 34, - "originalColumn": 2, - "name": null, - "generatedText": ";", - "sourceText": "" - }, - { - "generatedLine": 15, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 36, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 15, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 36, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "" - }, - { - "generatedLine": 15, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 36, - "originalColumn": 13, - "name": null, - "generatedText": "const ", - "sourceText": "" - }, - { - "generatedLine": 15, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 36, - "originalColumn": 17, - "name": null, - "generatedText": "obj4", - "sourceText": "" - }, - { - "generatedLine": 16, - "generatedColumn": 4, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 37, - "originalColumn": 2, - "name": null - }, - { - "generatedLine": 16, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 37, - "originalColumn": 26, - "name": null, - "generatedText": "/** my awesome setter */", - "sourceText": "" - }, - { - "generatedLine": 18, - "generatedColumn": 1, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 39, - "originalColumn": 1, - "name": null - }, - { - "generatedLine": 18, - "generatedColumn": 2, - "lastGeneratedColumn": null, - "source": "declarationEmitObjectLiteralAccessors1.ts", - "originalLine": 39, - "originalColumn": 2, - "name": null, - "generatedText": ";", - "sourceText": "" - } - ] -} \ No newline at end of file From fb08ff8f550af4f20c1062af1bc52d27c2a805c0 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Sat, 2 Dec 2023 16:13:02 -0500 Subject: [PATCH 167/224] Refactor binder to use switch statements and functions. Signed-off-by: Titian Cernicova-Dragomir --- .../transformers/declarations/emitBinder.ts | 556 ++++++++++-------- ...dDeclarationBinderSignatures.d.ts.map.diff | 16 + ...olatedDeclarationBinderSignatures.d.ts.map | 81 +++ ...olatedDeclarationBinderSignatures.d.ts.map | 81 +++ ...olatedDeclarationBinderConditionalTypes.js | 85 +++ ...dDeclarationBinderConditionalTypes.symbols | 151 +++++ ...tedDeclarationBinderConditionalTypes.types | 99 ++++ .../isolatedDeclarationBinderSignatures.js | 221 +++++++ ...solatedDeclarationBinderSignatures.symbols | 231 ++++++++ .../isolatedDeclarationBinderSignatures.types | 177 ++++++ ...olatedDeclarationBinderConditionalTypes.ts | 48 ++ .../isolatedDeclarationBinderSignatures.ts | 99 ++++ 12 files changed, 1590 insertions(+), 255 deletions(-) create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationBinderSignatures.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationBinderSignatures.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationBinderSignatures.d.ts.map create mode 100644 tests/baselines/reference/isolatedDeclarationBinderConditionalTypes.js create mode 100644 tests/baselines/reference/isolatedDeclarationBinderConditionalTypes.symbols create mode 100644 tests/baselines/reference/isolatedDeclarationBinderConditionalTypes.types create mode 100644 tests/baselines/reference/isolatedDeclarationBinderSignatures.js create mode 100644 tests/baselines/reference/isolatedDeclarationBinderSignatures.symbols create mode 100644 tests/baselines/reference/isolatedDeclarationBinderSignatures.types create mode 100644 tests/cases/compiler/isolatedDeclarationBinderConditionalTypes.ts create mode 100644 tests/cases/compiler/isolatedDeclarationBinderSignatures.ts diff --git a/src/compiler/transformers/declarations/emitBinder.ts b/src/compiler/transformers/declarations/emitBinder.ts index 5d2b039fd25be..176238f02f9d3 100644 --- a/src/compiler/transformers/declarations/emitBinder.ts +++ b/src/compiler/transformers/declarations/emitBinder.ts @@ -1,77 +1,70 @@ import { __String, ArrayBindingElement, + ArrowFunction, BindingPattern, + CallSignatureDeclaration, + ClassDeclaration, + ClassExpression, ComputedPropertyName, + ConditionalTypeNode, + ConstructorDeclaration, + ConstructSignatureDeclaration, Declaration, EnumDeclaration, + ExportAssignment, + ExportDeclaration, Expression, factory, findAncestor, forEachChild, + FunctionDeclaration, + FunctionExpression, + FunctionTypeNode, + GetAccessorDeclaration, getCombinedNodeFlags, getModuleInstanceState, getNodeId, hasAmbientModifier, hasSyntacticModifier, - isAccessor, + ImportDeclaration, + ImportEqualsDeclaration, + InferTypeNode, + InterfaceDeclaration, isArrayBindingPattern, isBinaryExpression, isBindingPattern, - isBlock, isBlockOrCatchScoped, isBlockScopedContainerTopLevel, - isClassDeclaration, - isClassExpression, isComputedPropertyName, isConditionalTypeNode, isConstructorDeclaration, isConstructSignatureDeclaration, isDeclaration, - isDoStatement, isElementAccessExpression, isEnumConst, - isEnumDeclaration, - isExportAssignment, - isExportDeclaration, isExpression, - isExpressionStatement, - isForInOrOfStatement, - isForStatement, isFunctionDeclaration, isFunctionExpressionOrArrowFunction, isIdentifier, - isIfStatement, - isImportDeclaration, - isImportEqualsDeclaration, - isInferTypeNode, - isInterfaceDeclaration, isJsxNamespacedName, - isLabeledStatement, - isMappedTypeNode, - isMethodDeclaration, isModuleBlock, isModuleDeclaration, isNamedExports, isNumericLiteral, isObjectBindingPattern, - isObjectLiteralExpression, - isParenthesizedExpression, - isParenthesizedTypeNode, isPrefixUnaryExpression, isPrivateIdentifier, isPropertyAccessExpression, isPropertyName, isSourceFile, isStringLiteralLike, - isTypeAliasDeclaration, - isTypeLiteralNode, isVarConst, isVariableDeclaration, - isVariableDeclarationList, - isVariableStatement, - isWhileStatement, + MappedTypeNode, MemberKey, + MethodDeclaration, + MethodSignature, ModifierFlags, ModuleDeclaration, ModuleInstanceState, @@ -84,11 +77,14 @@ import { ParameterDeclaration, PropertyDeclaration, PropertyName, + SetAccessorDeclaration, setValueDeclaration, SourceFile, Symbol, SymbolFlags, SyntaxKind, + TypeAliasDeclaration, + TypeLiteralNode, TypeParameterDeclaration, VariableDeclaration, } from "../../_namespaces/ts"; @@ -250,7 +246,10 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { return undefined; } - function getSymbolFlagsForNode(node: Node & { kind: keyof typeof syntaxKindToSymbolMap; }) { + function tryGetSymbolFlagsForNode(node: Node): SymbolRegistrationFlags | undefined { + return getSymbolFlagsForNode(node as Node & { kind: keyof typeof syntaxKindToSymbolMap; }); + } + function getSymbolFlagsForNode(node: Node & { kind: keyof typeof syntaxKindToSymbolMap; }): SymbolRegistrationFlags { if (node.kind === SyntaxKind.VariableDeclaration) { return getCombinedNodeFlags(node) & NodeFlags.BlockScoped ? syntaxKindToSymbolMap[node.kind].blockScope : @@ -507,262 +506,309 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { } function bindNode(node: Node | undefined) { if (!node) return; - const isExported = hasSyntacticModifier(node, ModifierFlags.Export); - if (isParenthesizedExpression(node)) { - bindNode(node.expression); + switch (node.kind) { + case SyntaxKind.ObjectLiteralExpression: + bindObjectLiteralExpression(node as ObjectLiteralExpression); + break; + case SyntaxKind.TypeLiteral: + bindTypeLiteralNode(node as TypeLiteralNode); + break; + case SyntaxKind.TypeAliasDeclaration: + bindTypeAliasDeclaration(node as TypeAliasDeclaration); + break; + case SyntaxKind.MappedType: + bindMappedTypeNode(node as MappedTypeNode); + break; + case SyntaxKind.ConditionalType: + bindConditionalTypeNode(node as ConditionalTypeNode); + break; + case SyntaxKind.InferType: + bindInferTypeNode(node as InferTypeNode); + break; + case SyntaxKind.ImportEqualsDeclaration: + bindImportEqualsDeclaration(node as ImportEqualsDeclaration); + break; + case SyntaxKind.ImportDeclaration: + bindImportDeclaration(node as ImportDeclaration); + break; + case SyntaxKind.ExportAssignment: + bindExportAssignment(node as ExportAssignment); + break; + case SyntaxKind.ExportDeclaration: + bindExportDeclaration(node as ExportDeclaration); + break; + case SyntaxKind.VariableDeclaration: + bindVariable(node as VariableDeclaration); + break; + case SyntaxKind.FunctionExpression: + case SyntaxKind.ArrowFunction: + bindFunctionExpressionOrArrowFunction(node as FunctionExpression | ArrowFunction); + break; + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.MethodDeclaration: + case SyntaxKind.Constructor: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.MethodSignature: + case SyntaxKind.CallSignature: + case SyntaxKind.ConstructSignature: + case SyntaxKind.FunctionType: + bindFunctionLikeContainer(node as FunctionLikeContainer); + break; + case SyntaxKind.ClassExpression: + // Class Expressions are not supported + break; + case SyntaxKind.EnumDeclaration: + bindEnumDeclaration(node as EnumDeclaration); + break; + case SyntaxKind.ModuleDeclaration: + bindModuleDeclaration(node as ModuleDeclaration); + break; + case SyntaxKind.InterfaceDeclaration: + bindInterfaceDeclaration(node as InterfaceDeclaration); + break; + case SyntaxKind.ClassDeclaration: + bindClassDeclaration(node as ClassDeclaration); + break; + case SyntaxKind.ForOfStatement: + case SyntaxKind.ForInStatement: + case SyntaxKind.ForStatement: + case SyntaxKind.Block: + withScope(node, /*exports*/ undefined, () => { + bindChildren(node); + }); + break; + default: + if (isDeclaration(node)) { + bindDeclaration(node); + } + if (isExpression(node)) { + bindExpandoMembers(node); + } + bindChildren(node); + break; } - else if (isParenthesizedTypeNode(node)) { - bindNode(node.type); + } + function bindObjectLiteralExpression(node: ObjectLiteralExpression) { + bindObjectLiteral(node); + } + function bindMappedTypeNode(node: MappedTypeNode) { + const mappedType = node; + withScope(node, /*exports*/ undefined, () => { + bindTypeParameters([mappedType.typeParameter]); + }); + bindNode(mappedType.nameType); + bindNode(mappedType.type); + } + function bindConditionalTypeNode(node: ConditionalTypeNode) { + withScope(node.extendsType, /*exports*/ undefined, () => { + bindNode(node.extendsType); + }); + bindNode(node.checkType); + bindNode(node.falseType); + getNodeLinks(node.trueType).locals = getNodeLinks(node.extendsType).locals; + bindNode(node.trueType); + } + function bindInferTypeNode(node: InferTypeNode) { + const conditionalTypeOwner = findAncestor(node, isConditionalTypeNode); + // Probably an error, infer not in a conditional type context + // Try to bind the rest of it + if (conditionalTypeOwner) { + withScope(conditionalTypeOwner, /*exports*/ undefined, () => { + bindTypeParameters([node.typeParameter]); + }); } - else if (isObjectLiteralExpression(node)) { - bindObjectLiteral(node); + bindChildren(node); + } + function bindFunctionExpressionOrArrowFunction(node: FunctionExpression | ArrowFunction) { + createAnonymousEmitSymbol(node); + withScope(node, /*exports*/ undefined, () => { + bindTypeParameters(node.typeParameters); + bindNode(node.type); + node.parameters.forEach(bindVariable); + }); + } + function bindImportEqualsDeclaration(node: ImportEqualsDeclaration) { + addLocalOnlyDeclaration(getMemberKey(node.name), node, getSymbolFlagsForNode(node)); + } + function bindImportDeclaration(node: ImportDeclaration) { + if (!node.importClause) { + return; } - else if (isMappedTypeNode(node)) { - const mappedType = node; - withScope(node, /*exports*/ undefined, () => { - bindTypeParameters([mappedType.typeParameter]); - }); - bindNode(mappedType.nameType); - bindNode(mappedType.type); + if (node.importClause.name) { + addLocalOnlyDeclaration(getMemberKey(node.importClause.name), node.importClause, getSymbolFlagsForNode(node.importClause)); } - else if (isConditionalTypeNode(node)) { - withScope(node.extendsType, /*exports*/ undefined, () => { - bindNode(node.extendsType); - }); - bindNode(node.checkType); - bindNode(node.falseType); - getNodeLinks(node.trueType).locals = getNodeLinks(node.extendsType).locals; - bindNode(node.trueType); - } - else if (isInferTypeNode(node)) { - const conditionalTypeOwner = findAncestor(node, isConditionalTypeNode); - // Probably an error, infer not in a conditional type context - // Try to bind the rest of it - if (conditionalTypeOwner) { - withScope(conditionalTypeOwner, /*exports*/ undefined, () => { - bindTypeParameters([node.typeParameter]); + if (node.importClause.namedBindings) { + const namedBindings = node.importClause.namedBindings; + if (namedBindings.kind === SyntaxKind.NamedImports) { + namedBindings.elements.forEach(v => { + addLocalOnlyDeclaration(getMemberKey(v.name), v, getSymbolFlagsForNode(v)); }); } - bindChildren(node); - } - else if (isExpressionStatement(node)) { - bindNode(node.expression); - } - else if (isFunctionExpressionOrArrowFunction(node)) { - createAnonymousEmitSymbol(node); - withScope(node, /*exports*/ undefined, () => { - bindTypeParameters(node.typeParameters); - bindNode(node.type); - node.parameters.forEach(bindVariable); - }); - } - else if (isImportEqualsDeclaration(node)) { - addLocalOnlyDeclaration(getMemberKey(node.name), node, getSymbolFlagsForNode(node)); - } - else if (isImportDeclaration(node)) { - if (!node.importClause) { - return; + else if (namedBindings.kind === SyntaxKind.NamespaceImport) { + addLocalOnlyDeclaration(getMemberKey(namedBindings.name), namedBindings, getSymbolFlagsForNode(namedBindings)); } - if (node.importClause.name) { - addLocalOnlyDeclaration(getMemberKey(node.importClause.name), node.importClause, getSymbolFlagsForNode(node.importClause)); + else { + throw new Error("Not supported"); } - if (node.importClause.namedBindings) { - const namedBindings = node.importClause.namedBindings; - if (namedBindings.kind === SyntaxKind.NamedImports) { - namedBindings.elements.forEach(v => { - addLocalOnlyDeclaration(getMemberKey(v.name), v, getSymbolFlagsForNode(v)); - }); - } - else if (namedBindings.kind === SyntaxKind.NamespaceImport) { - addLocalOnlyDeclaration(getMemberKey(namedBindings.name), namedBindings, getSymbolFlagsForNode(namedBindings)); - } - else { - throw new Error("Not supported"); - } - } - } - else if (isVariableStatement(node)) { - node.declarationList.declarations.forEach(bindVariable); - } - else if (isVariableDeclarationList(node)) { - node.declarations.forEach(bindVariable); - } - else if (isFunctionDeclaration(node) || isConstructorDeclaration(node) || isMethodDeclaration(node) || isAccessor(node)) { - addLocalAndExportDeclaration(getStatementName(node), node, getSymbolFlagsForNode(node), isExported); - withScope(node, /*exports*/ undefined, () => { - bindTypeParameters(node.typeParameters); - bindNode(node.type); - node.parameters.forEach(bindVariable); - }); } - else if (isTypeLiteralNode(node)) { - const objectSymbol = createAnonymousEmitSymbol(node); - withMembers(objectSymbol, "members", () => { - node.members.forEach(bindNode); - }); + } + type FunctionLikeContainer = + | FunctionDeclaration + | MethodDeclaration + | ConstructorDeclaration + | GetAccessorDeclaration + | SetAccessorDeclaration + | MethodSignature + | FunctionDeclaration + | CallSignatureDeclaration + | ConstructSignatureDeclaration + | FunctionTypeNode; + function bindFunctionLikeContainer(node: FunctionLikeContainer) { + const isExported = hasSyntacticModifier(node, ModifierFlags.Export); + const declarationFlags = tryGetSymbolFlagsForNode(node); + if (declarationFlags) { + addLocalAndExportDeclaration(getStatementName(node), node, declarationFlags, isExported); } - else if (isTypeAliasDeclaration(node)) { - addLocalAndExportDeclaration(getStatementName(node), node, getSymbolFlagsForNode(node), isExported); - withScope(node, /*exports*/ undefined, () => { - bindTypeParameters(node.typeParameters); - bindNode(node.type); + withScope(node, /*exports*/ undefined, () => { + bindTypeParameters(node.typeParameters); + bindNode(node.type); + node.parameters.forEach(bindVariable); + }); + } + function bindTypeLiteralNode(node: TypeLiteralNode) { + const objectSymbol = createAnonymousEmitSymbol(node); + withMembers(objectSymbol, "members", () => { + node.members.forEach(bindNode); + }); + } + function bindTypeAliasDeclaration(node: TypeAliasDeclaration) { + const isExported = hasSyntacticModifier(node, ModifierFlags.Export); + addLocalAndExportDeclaration(getStatementName(node), node, getSymbolFlagsForNode(node), isExported); + withScope(node, /*exports*/ undefined, () => { + bindTypeParameters(node.typeParameters); + bindNode(node.type); + }); + } + // Default export declarations set isVisible on true on associated symbols in the type checker. + function bindExportAssignment(node: ExportAssignment) { + if (node.expression && isIdentifier(node.expression)) { + const name = node.expression.escapedText; + postBindingAction.push(() => { + const resolvedSymbol = resolveName(node.expression, name, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias); + if (resolvedSymbol) { + resolvedSymbol.declarations.forEach(d => getNodeLinks(d).isVisible = true); + } }); } - // Default export declarations set isVisible on true on associated symbols in the type checker. - else if (isExportAssignment(node)) { - if (node.expression && isIdentifier(node.expression)) { - const name = node.expression.escapedText; - postBindingAction.push(() => { - const resolvedSymbol = resolveName(node.expression, name, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias); - if (resolvedSymbol) { - resolvedSymbol.declarations.forEach(d => getNodeLinks(d).isVisible = true); - } - }); - } - } - else if (isExportDeclaration(node)) { - if (node.exportClause && isNamedExports(node.exportClause)) { - const elements = node.exportClause.elements; - if (node.moduleSpecifier) { - // TODO is currentExportsSymbolTable ok here? - withScope(node, /*exports*/ undefined, () => { - elements.forEach(e => { - const { includes, excludes } = getSymbolFlagsForNode(e); - addLocalOnlyDeclaration(getMemberKey(e.propertyName ?? e.name), e, { - includes: includes | SymbolFlags.ExportValue, - excludes, - }); + } + function bindExportDeclaration(node: ExportDeclaration) { + if (node.exportClause && isNamedExports(node.exportClause)) { + const elements = node.exportClause.elements; + if (node.moduleSpecifier) { + // TODO is currentExportsSymbolTable ok here? + withScope(node, /*exports*/ undefined, () => { + elements.forEach(e => { + const { includes, excludes } = getSymbolFlagsForNode(e); + addLocalOnlyDeclaration(getMemberKey(e.propertyName ?? e.name), e, { + includes: includes | SymbolFlags.ExportValue, + excludes, }); }); - } - elements.forEach(e => { - postBindingAction.push(() => { - const resolvedSymbol = resolveName(e, (e.propertyName ?? e.name).escapedText, ~0); - if (resolvedSymbol) { - resolvedSymbol.declarations.forEach(d => getNodeLinks(d).isVisible = true); - } - }); }); } - } - else if (isEnumDeclaration(node)) { - addLocalAndExportDeclaration(getStatementName(node), node, getSymbolFlagsForNode(node), isExported); - withScope(node, /*exports*/ undefined, () => { - node.members.forEach(m => { - addLocalOnlyDeclaration(getMemberKeyFromElement(m), m, getSymbolFlagsForNode(m)); - }); - }); - } - else if (isModuleDeclaration(node)) { - function bindModuleDeclaration(moduleDeclaration: ModuleDeclaration) { - const name = isIdentifier(moduleDeclaration.name) ? moduleDeclaration.name : undefined; - const moduleSymbol = addLocalAndExportDeclaration(getMemberKey(name), moduleDeclaration, getSymbolFlagsForNode(moduleDeclaration), isExported); - moduleSymbol.exports ??= new Map(); - withScope(moduleDeclaration, moduleSymbol.exports, () => { - if (moduleDeclaration.body) { - if (isModuleBlock(moduleDeclaration.body)) { - const moduleBlock = moduleDeclaration.body; - bindEachFunctionsFirst(moduleBlock.statements); - } - else if (isModuleDeclaration(moduleDeclaration.body)) { - const subModule = moduleDeclaration.body; - bindModuleDeclaration(subModule); - } - else { - throw new Error("Unsupported body type"); - } + elements.forEach(e => { + postBindingAction.push(() => { + const resolvedSymbol = resolveName(e, (e.propertyName ?? e.name).escapedText, ~0); + if (resolvedSymbol) { + resolvedSymbol.declarations.forEach(d => getNodeLinks(d).isVisible = true); } }); - } - bindModuleDeclaration(node); + }); } - else if (isInterfaceDeclaration(node)) { - const interfaceDeclaration = node; - const interfaceSymbol = addLocalAndExportDeclaration(getStatementName(interfaceDeclaration), interfaceDeclaration, getSymbolFlagsForNode(interfaceDeclaration), isExported); - withScope(interfaceDeclaration, /*exports*/ undefined, () => { - bindTypeParameters(interfaceDeclaration.typeParameters); + } + function bindEnumDeclaration(node: EnumDeclaration) { + const isExported = hasSyntacticModifier(node, ModifierFlags.Export); + addLocalAndExportDeclaration(getStatementName(node), node, getSymbolFlagsForNode(node), isExported); + withScope(node, /*exports*/ undefined, () => { + node.members.forEach(m => { + addLocalOnlyDeclaration(getMemberKeyFromElement(m), m, getSymbolFlagsForNode(m)); }); - withMembers(interfaceSymbol, "members", () => { - interfaceDeclaration.members.forEach(m => { - bindNode(m); - }); + }); + } + function bindModuleDeclaration(node: ModuleDeclaration) { + const isExported = hasSyntacticModifier(node, ModifierFlags.Export); + function bindModuleDeclaration(moduleDeclaration: ModuleDeclaration) { + const name = isIdentifier(moduleDeclaration.name) ? moduleDeclaration.name : undefined; + const moduleSymbol = addLocalAndExportDeclaration(getMemberKey(name), moduleDeclaration, getSymbolFlagsForNode(moduleDeclaration), isExported); + moduleSymbol.exports ??= new Map(); + withScope(moduleDeclaration, moduleSymbol.exports, () => { + if (moduleDeclaration.body) { + if (isModuleBlock(moduleDeclaration.body)) { + const moduleBlock = moduleDeclaration.body; + bindEachFunctionsFirst(moduleBlock.statements); + } + else if (isModuleDeclaration(moduleDeclaration.body)) { + const subModule = moduleDeclaration.body; + bindModuleDeclaration(subModule); + } + else { + throw new Error("Unsupported body type"); + } + } }); } - else if (isClassDeclaration(node) || isClassExpression(node)) { - const classDeclaration = node; - const classSymbol = addLocalAndExportDeclaration(getStatementName(classDeclaration), classDeclaration, getSymbolFlagsForNode(classDeclaration), isExported); - withScope(classDeclaration, /*exports*/ undefined, () => { - bindTypeParameters(classDeclaration.typeParameters); + bindModuleDeclaration(node); + } + function bindInterfaceDeclaration(node: InterfaceDeclaration) { + const isExported = hasSyntacticModifier(node, ModifierFlags.Export); + const interfaceDeclaration = node; + const interfaceSymbol = addLocalAndExportDeclaration(getStatementName(interfaceDeclaration), interfaceDeclaration, getSymbolFlagsForNode(interfaceDeclaration), isExported); + withScope(interfaceDeclaration, /*exports*/ undefined, () => { + bindTypeParameters(interfaceDeclaration.typeParameters); + }); + withMembers(interfaceSymbol, "members", () => { + interfaceDeclaration.members.forEach(m => { + bindNode(m); }); - withMembers(classSymbol, "members", () => { - classDeclaration.members.forEach(m => { - if (hasSyntacticModifier(m, ModifierFlags.Static)) return; - if (m.kind === SyntaxKind.SemicolonClassElement || m.kind === SyntaxKind.ClassStaticBlockDeclaration) return; + }); + } + function bindClassDeclaration(node: ClassExpression | ClassDeclaration) { + const isExported = hasSyntacticModifier(node, ModifierFlags.Export); + const classDeclaration = node; + const classSymbol = addLocalAndExportDeclaration(getStatementName(classDeclaration), classDeclaration, getSymbolFlagsForNode(classDeclaration), isExported); + withScope(classDeclaration, /*exports*/ undefined, () => { + bindTypeParameters(classDeclaration.typeParameters); + }); + withMembers(classSymbol, "members", () => { + classDeclaration.members.forEach(m => { + if (hasSyntacticModifier(m, ModifierFlags.Static)) return; + if (m.kind === SyntaxKind.SemicolonClassElement || m.kind === SyntaxKind.ClassStaticBlockDeclaration) return; - bindNode(m); - }); + bindNode(m); }); - withMembers(classSymbol, "exports", () => { - classDeclaration.members.forEach(m => { - if (!hasSyntacticModifier(m, ModifierFlags.Static)) return; - if ( - m.kind === SyntaxKind.SemicolonClassElement - || m.kind === SyntaxKind.ClassStaticBlockDeclaration - ) return; + }); + withMembers(classSymbol, "exports", () => { + classDeclaration.members.forEach(m => { + if (!hasSyntacticModifier(m, ModifierFlags.Static)) return; + if ( + m.kind === SyntaxKind.SemicolonClassElement + || m.kind === SyntaxKind.ClassStaticBlockDeclaration + ) return; - bindNode(m); - }); - }); - } - else if (isDeclaration(node)) { - const flags = getSymbolFlagsForNode(node as Node & { kind: keyof typeof syntaxKindToSymbolMap; }); - // Unsupported declaration - if (!flags) { - return; - } - addLocalOnlyDeclaration(getMemberKeyFromElement(node), node, flags); - bindChildren(node); - } - else if (isLabeledStatement(node)) { - bindNode(node.statement); - } - else if (isForStatement(node)) { - withScope(node, /*exports*/ undefined, () => { - bindNode(node.initializer); - bindNode(node.condition); - bindNode(node.incrementor); - bindNode(node.statement); - }); - } - else if (isForInOrOfStatement(node)) { - withScope(node, /*exports*/ undefined, () => { - bindNode(node.initializer); - bindNode(node.expression); - bindNode(node.statement); - }); - } - else if (isWhileStatement(node) || isDoStatement(node)) { - bindNode(node.expression); - bindNode(node.statement); - } - else if (isBlock(node)) { - withScope(node, /*exports*/ undefined, () => { - bindEachFunctionsFirst(node.statements); + bindNode(m); }); + }); + } + function bindDeclaration(node: Declaration) { + const flags = tryGetSymbolFlagsForNode(node); + // Unsupported declaration + if (!flags) { + return; } - else if (isIfStatement(node)) { - bindNode(node.expression); - bindNode(node.thenStatement); - bindNode(node.elseStatement); - } - else if (isExpression(node)) { - bindExpandoMembers(node); - bindChildren(node); - } - else { - bindChildren(node); - } + addLocalOnlyDeclaration(getMemberKeyFromElement(node), node, flags); + bindChildren(node); } } } 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":"","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ED,MAAM,WAAW,EAAE;IACf,CAAC,CAAC,KAAK,CAAC,CAAC;IACT,KAAK,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,CA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CBOKHZhbHVlKSB7IH0KfQoKZXhwb3J0IGNsYXNzIEMyIHsKICAgIG08Tj4oKTogTiB7CiAgICAgICAgcmV0dXJuIG51bGwhOwogICAgfQp9Cgo= ++//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IHR5cGUgRiA9IDxOPigpID0+IE47DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmbjogPE4+KCkgPT4gTjsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IGZuMjogPE4+KHA6IE4pID0+IHZvaWQ7DQpleHBvcnQgZGVjbGFyZSBuYW1lc3BhY2UgTTEgew0KICAgIHR5cGUgTjxUPiA9IFQgZXh0ZW5kcyBUID8gTjxUPiA6IG5ldmVyOw0KICAgIGZ1bmN0aW9uIE4oKTogdHlwZW9mIE47DQp9DQpleHBvcnQgZGVjbGFyZSBuYW1lc3BhY2UgTTIgew0KICAgIGludGVyZmFjZSBOIHsNCiAgICAgICAgY2hpbGQ6IE47DQogICAgICAgIG0oKTogTjsNCiAgICAgICAgZ2V0IFgoKTogTjsNCiAgICAgICAgc2V0IFgodmFsdWU6IE4pOw0KICAgIH0NCn0NCmV4cG9ydCBkZWNsYXJlIG5hbWVzcGFjZSBNMyB7DQogICAgaW50ZXJmYWNlIE4gew0KICAgICAgICBbbjogc3RyaW5nXTogTjsNCiAgICB9DQp9DQpleHBvcnQgZGVjbGFyZSBuYW1lc3BhY2UgTTMgew0KICAgIGNsYXNzIE4gew0KICAgICAgICBjaGlsZDogTjsNCiAgICB9DQogICAgZnVuY3Rpb24gZm4oKTogTjsNCn0NCmV4cG9ydCBkZWNsYXJlIG5hbWVzcGFjZSBNNCB7DQogICAgbmFtZXNwYWNlIE4gew0KICAgICAgICBmdW5jdGlvbiBmbigpOiB0eXBlb2YgTjsNCiAgICB9DQp9DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmbjM6IDxOPihwOiBOKSA9PiB2b2lkOw0KZXhwb3J0IGRlY2xhcmUgY29uc3QgZm40OiA8Tj4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k6IE47CiAgICBuZXcgPE4+KCk6IE4KICAgIG08Tj4oKTogTjsKfQoKCmV4cG9ydCBpbnRlcmZhY2UgSTxOPiB7CiAgICAoKTogTjsKICAgIG5ldyAoKTogTgogICAgbSgpOiBOOwp9CgpleHBvcnQgY2xhc3MgQzxOPiB7CiAgICBjb25zdHJ1Y3RvcihuOiBOKSB7CgogICAgfQogICAgbSgpOiBOIHsKICAgICAgICByZXR1cm4gbnVsbCE7CiAgICB9CiAgICBnZXQgTigpOiBOIHsgcmV0dXJuIG51bGwhIH0KICAgIHNldCBOKHZhbHVlKSB7IH0KfQoKZXhwb3J0IGNsYXNzIEMyIHsKICAgIG08Tj4oKTogTiB7CiAgICAgICAgcmV0dXJuIG51bGwhOwogICAgfQp9Cgo= + 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..fbc62e0938a23 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationBinderSignatures.d.ts.map @@ -0,0 +1,81 @@ +//// [tests/cases/compiler/isolatedDeclarationBinderSignatures.ts] //// + + + +/// [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,I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dW5jdGlvbiBmbigpOiBOIHsKICAgICAgICByZXR1cm4gbmV3IE4oKTsKICAgIH0KfQpleHBvcnQgbW9kdWxlIE00IHsKICAgIGV4cG9ydCBtb2R1bGUgTiB7CiAgICAgICAgZXhwb3J0IGZ1bmN0aW9uIGZuKCk6IHR5cGVvZiBOIHsKICAgICAgICAgICAgcmV0dXJuIE47CiAgICAgICAgfQogICAgfQp9CgoKZXhwb3J0IGNvbnN0IGZuMyA9IGZ1bmN0aW9uIDxOPihwOiBOKTogdm9pZCB7CiAgICAKfQoKZXhwb3J0IGNvbnN0IGZuNCA9IGZ1bmN0aW9uIDxOPigpOiB7IG5hbWU6IE4gfSB7CiAgICByZXR1cm4gbnVsbCE7Cn0KCmV4cG9ydCBpbnRlcmZhY2UgSTxOPiB7CiAgICAoKTogTjsKICAgIG5ldyAoKTogTgogICAgbSgpOiBOOwp9CgpleHBvcnQgaW50ZXJmYWNlIEkyPE4+IHsKICAgIFtuOiBzdHJpbmddOiBOCn0KCmV4cG9ydCBpbnRlcmZhY2UgSTEgewogICAgPE4+KCk6IE47CiAgICBuZXcgPE4+KCk6IE4KICAgIG08Tj4oKTogTjsKfQoKCmV4cG9ydCBpbnRlcmZhY2UgSTxOPiB7CiAgICAoKTogTjsKICAgIG5ldyAoKTogTgogICAgbSgpOiBOOwp9CgpleHBvcnQgY2xhc3MgQzxOPiB7CiAgICBjb25zdHJ1Y3RvcihuOiBOKSB7CgogICAgfQogICAgbSgpOiBOIHsKICAgICAgICByZXR1cm4gbnVsbCE7CiAgICB9CiAgICBnZXQgTigpOiBOIHsgcmV0dXJuIG51bGwhIH0KICAgIHNldCBOKHZhbHVlKSB7IH0KfQoKZXhwb3J0IGNsYXNzIEMyIHsKICAgIG08Tj4oKTogTiB7CiAgICAgICAgcmV0dXJuIG51bGwhOwogICAgfQp9Cgo= + 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..a7c41bcfe8b15 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationBinderSignatures.d.ts.map @@ -0,0 +1,81 @@ +//// [tests/cases/compiler/isolatedDeclarationBinderSignatures.ts] //// + + + +/// [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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;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"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IHR5cGUgRiA9IDxOPigpID0+IE47DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmbjogPE4+KCkgPT4gTjsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IGZuMjogPE4+KHA6IE4pID0+IHZvaWQ7DQpleHBvcnQgZGVjbGFyZSBuYW1lc3BhY2UgTTEgew0KICAgIHR5cGUgTjxUPiA9IFQgZXh0ZW5kcyBUID8gTjxUPiA6IG5ldmVyOw0KICAgIGZ1bmN0aW9uIE4oKTogdHlwZW9mIE47DQp9DQpleHBvcnQgZGVjbGFyZSBuYW1lc3BhY2UgTTIgew0KICAgIGludGVyZmFjZSBOIHsNCiAgICAgICAgY2hpbGQ6IE47DQogICAgICAgIG0oKTogTjsNCiAgICAgICAgZ2V0IFgoKTogTjsNCiAgICAgICAgc2V0IFgodmFsdWU6IE4pOw0KICAgIH0NCn0NCmV4cG9ydCBkZWNsYXJlIG5hbWVzcGFjZSBNMyB7DQogICAgaW50ZXJmYWNlIE4gew0KICAgICAgICBbbjogc3RyaW5nXTogTjsNCiAgICB9DQp9DQpleHBvcnQgZGVjbGFyZSBuYW1lc3BhY2UgTTMgew0KICAgIGNsYXNzIE4gew0KICAgICAgICBjaGlsZDogTjsNCiAgICB9DQogICAgZnVuY3Rpb24gZm4oKTogTjsNCn0NCmV4cG9ydCBkZWNsYXJlIG5hbWVzcGFjZSBNNCB7DQogICAgbmFtZXNwYWNlIE4gew0KICAgICAgICBmdW5jdGlvbiBmbigpOiB0eXBlb2YgTjsNCiAgICB9DQp9DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmbjM6IDxOPihwOiBOKSA9PiB2b2lkOw0KZXhwb3J0IGRlY2xh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4cG9ydCBpbnRlcmZhY2UgSTxOPiB7CiAgICAoKTogTjsKICAgIG5ldyAoKTogTgogICAgbSgpOiBOOwp9CgpleHBvcnQgY2xhc3MgQzxOPiB7CiAgICBjb25zdHJ1Y3RvcihuOiBOKSB7CgogICAgfQogICAgbSgpOiBOIHsKICAgICAgICByZXR1cm4gbnVsbCE7CiAgICB9CiAgICBnZXQgTigpOiBOIHsgcmV0dXJuIG51bGwhIH0KICAgIHNldCBOKHZhbHVlKSB7IH0KfQoKZXhwb3J0IGNsYXNzIEMyIHsKICAgIG08Tj4oKTogTiB7CiAgICAgICAgcmV0dXJuIG51bGwhOwogICAgfQp9Cgo= + 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/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!; + } +} + From 261eba5089649d40eb8ab5b5a91a9c3d2d0e2aa7 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 4 Dec 2023 17:27:51 +0000 Subject: [PATCH 168/224] Updated baseline Signed-off-by: Titian Cernicova-Dragomir --- .../transformers/declarations/emitBinder.ts | 7 +- ...eclarationEmitNameConflicts3.d.ts.map.diff | 16 + ...6ImportNamedImportWithExport.d.ts.map.diff | 19 + .../symbolDeclarationEmit10.d.ts.map.diff | 16 + .../thisTypeInObjectLiterals2.d.ts.map.diff | 16 + .../typeFromPropertyAssignment29.d.ts.diff | 12 +- .../declarationEmitNameConflicts3.d.ts.map | 46 + .../es6ImportNamedImportWithExport.d.ts.map | 47 + .../es6ImportNamedImportWithExport.d.ts.map.f | 1459 +++++++++++++++++ .../dte/symbolDeclarationEmit10.d.ts.map | 22 + .../dte/thisTypeInObjectLiterals2.d.ts.map | 104 ++ .../dte/typeFromPropertyAssignment29.d.ts | 44 +- .../declarationEmitNameConflicts3.d.ts.map | 46 + .../es6ImportNamedImportWithExport.d.ts.map | 47 + .../es6ImportNamedImportWithExport.d.ts.map.f | 1360 +++++++++++++++ .../tsc/symbolDeclarationEmit10.d.ts.map | 22 + .../tsc/thisTypeInObjectLiterals2.d.ts.map | 104 ++ .../tsc/typeFromPropertyAssignment29.d.ts | 44 +- .../compiler/declarationEmitNameConflicts3.ts | 1 + .../es6ImportNamedImportWithExport.ts | 1 + .../es6/Symbols/symbolDeclarationEmit10.ts | 1 + .../thisType/thisTypeInObjectLiterals2.ts | 1 + 22 files changed, 3383 insertions(+), 52 deletions(-) create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitNameConflicts3.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/es6ImportNamedImportWithExport.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolDeclarationEmit10.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisTypeInObjectLiterals2.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitNameConflicts3.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/es6ImportNamedImportWithExport.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/es6ImportNamedImportWithExport.d.ts.map.f create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit10.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisTypeInObjectLiterals2.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitNameConflicts3.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/es6ImportNamedImportWithExport.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/es6ImportNamedImportWithExport.d.ts.map.f create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit10.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisTypeInObjectLiterals2.d.ts.map diff --git a/src/compiler/transformers/declarations/emitBinder.ts b/src/compiler/transformers/declarations/emitBinder.ts index 176238f02f9d3..e94b4c80ba7a3 100644 --- a/src/compiler/transformers/declarations/emitBinder.ts +++ b/src/compiler/transformers/declarations/emitBinder.ts @@ -583,10 +583,13 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { if (isDeclaration(node)) { bindDeclaration(node); } - if (isExpression(node)) { + else if (isExpression(node)) { bindExpandoMembers(node); + bindChildren(node); + } + else { + bindChildren(node); } - bindChildren(node); break; } } 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;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"} ++{"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,EADE,OAAO,CAAC,CAAC,CAAC,CAAC,CACL,CAAC;CACxB"} + +-//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBuYW1lc3BhY2UgTSB7DQogICAgaW50ZXJmYWNlIEQgew0KICAgIH0NCiAgICBuYW1lc3BhY2UgRCB7DQogICAgICAgIGZ1bmN0aW9uIGYoKTogdm9pZDsNCiAgICB9DQogICAgbmFtZXNwYWNlIEMgew0KICAgICAgICBmdW5jdGlvbiBmKCk6IHZvaWQ7DQogICAgfQ0KICAgIG5hbWVzcGFjZSBFI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gZXh0ZW5kcyBDIHsgfQogICAgZXhwb3J0IGVudW0gRCB7CiAgICAgICAgZgogICAgfQogICAgZXhwb3J0IHZhciB2OiBNLkQ7IC8vIG9rCiAgICBleHBvcnQgdmFyIHc6IHR5cGVvZiBNLkQuZiA9IE0uRC5mOyAvLyBlcnJvciwgc2hvdWxkIGJlIHR5cGVvZiBNLkQuZgogICAgZXhwb3J0IHZhciB4OiB0eXBlb2YgTS5DLmYgPSBNLkMuZjsgLy8gZXJyb3IsIHNob3VsZCBiZSB0eXBlb2YgTS5DLmYKICAgIGV4cG9ydCB2YXIgeCA9IE0uRS5mOyAvLyBlcnJvciwgc2hvdWxkIGJlIHR5cGVvZiBNLkUuZgp9 + 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,ZXhwb3J0IGRlY2xhcmUgdmFyIHh4eHg6IG51bWJlcjsNCmV4cG9ydCBkZWNsYXJlIHZhciB4eHh4OiBudW1iZXI7DQpleHBvcnQgZGVjbGFyZSB2YXIgeHh4eDogbnVtYmVyOw0KZXhwb3J0IGRlY2xhcmUgdmFyIHh4eHg6IG51bWJlcjsNCmV4cG9ydCBkZWNsYXJlIHZhciB4eHh4OiBudW1iZXI7DQpleHBvcnQgZGVjbGFyZSB2YXIgeHh4eDogbnVtYmVyOw0KZXhwb3J0IGRlY2xhcmUgdmFyIHh4eHg6IG51bWJlcjsNCmV4cG9ydCBkZWNsYXJlIHZhciB4eHh4OiBudW1iZXI7DQpleHBvcnQgZGVjbGFyZSB2YXIgeHh4eDogbnVtYmVyOw0KZXhwb3J0IGRlY2xhcmUgdmFyIH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Y2VkIGltcG9ydHMKZXhwb3J0IGltcG9ydCB7IGFhYWEgfSBmcm9tICIuL3NlcnZlciI7CmV4cG9ydCBpbXBvcnQgeyBhYWFhIGFzIGJiYmIgfSBmcm9tICIuL3NlcnZlciI7Cg== + + + //// [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/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/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..59a2893747c48 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/thisTypeInObjectLiterals2.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: undefined]] //// + +//// [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,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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iAgICAgICAgcmV0dXJuIHRoaXMuYTsKICAgIH0sCiAgICBiOiAiaGVsbG8iLAogICAgYzogewogICAgICAgIGcoKTogdm9pZCB7CiAgICAgICAgICAgIHRoaXMuZygpOwogICAgICAgIH0KICAgIH0sCiAgICBnZXQgZCgpOiBudW1iZXIgewogICAgICAgIHJldHVybiB0aGlzLmE7CiAgICB9LAogICAgZ2V0IGUoKTogc3RyaW5nIHsKICAgICAgICByZXR1cm4gdGhpcy5iOwogICAgfSwKICAgIHNldCBlKHZhbHVlKSB7CiAgICAgICAgdGhpcy5iID0gdmFsdWU7CiAgICB9Cn07CgovLyBJbiBtZXRob2RzIG9mIGFuIG9iamVjdCBsaXRlcmFsIHdpdGggYSBjb250ZXh0dWFsIHR5cGUsICd0aGlzJyBoYXMgdGhlCi8vIGNvbnRleHR1YWwgdHlwZS4KCnR5cGUgUG9pbnQgPSB7CiAgICB4OiBudW1iZXI7CiAgICB5OiBudW1iZXI7CiAgICB6PzogbnVtYmVyOwogICAgbW92ZUJ5KGR4OiBudW1iZXIsIGR5OiBudW1iZXIsIGR6PzogbnVtYmVyKTogdm9pZDsKfQoKbGV0IHAxOiBQb2ludCA9IHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9OwoKbGV0IHAyOiBQb2ludCB8IG51bGwgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwMzogUG9pbnQgfCB1bmRlZmluZWQgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwNDogUG9pbnQgfCBudWxsIHwgdW5kZWZpbmVkID0gewogICAgeDogMTAsCiAgICB5OiAyMCwKICAgIG1vdmVCeShkeCwgZHksIGR6KSB7CiAgICAgICAgdGhpcy54ICs9IGR4OwogICAgICAgIHRoaXMueSArPSBkeTsKICAgICAgICBpZiAodGhpcy56ICYmIGR6KSB7CiAgICAgICAgICAgIHRoaXMueiArPSBkejsKICAgICAgICB9CiAgICB9Cn07CgpkZWNsYXJlIGZ1bmN0aW9uIGYxKHA6IFBvaW50KTogdm9pZDsKCmYxKHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9KTsKCmRlY2xhcmUgZnVuY3Rpb24gZjIocDogUG9pbnQgfCBudWxsIHwgdW5kZWZpbmVkKTogdm9pZDsKCmYyKHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9KTsKCi8vIEluIG1ldGhvZHMgb2YgYW4gb2JqZWN0IGxp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aW9uczxELCBNLCBQPiA9IFRoaXNUeXBlPEQgJiBNICYgUD4gJiB7CiAgICBkYXRhPzogRCB8ICgoKSA9PiBEKTsKICAgIG1ldGhvZHM/OiBNOwogICAgY29tcHV0ZWQ/OiBBY2Nlc3NvcnM8UD47Cn0KCmRlY2xhcmUgY29uc3QgVnVlOiBuZXcgPEQsIE0sIFA+KG9wdGlvbnM6IFZ1ZU9wdGlvbnM8RCwgTSwgUD4pID0+IEQgJiBNICYgUDsKCmxldCB2dWU6IHsKICAgIHg6IG51bWJlcjsKICAgIHk6IG51bWJlcjsKfSAmIHsKICAgIGYoeDogc3RyaW5nKTogbnVtYmVyOwp9ICYgewogICAgdGVzdDogbnVtYmVyOwogICAgaGVsbG86IHN0cmluZzsKfSA9IG5ldyBWdWUoewogICAgZGF0YTogKCkgPT4gKHsgeDogMSwgeTogMiB9KSwKICAgIG1ldGhvZHM6IHsKICAgICAgICBmKHg6IHN0cmluZykgewogICAgICAgICAgICByZXR1cm4gdGhpcy54OwogICAgICAgIH0KICAgIH0sCiAgICBjb21wdXRlZDogewogICAgICAgIHRlc3QoKTogbnVtYmVyIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMueDsKICAgICAgICB9LAogICAgICAgIGhlbGxvOiB7CiAgICAgICAgICAgIGdldCgpIHsKICAgICAgICAgICAgICAgIHJldHVybiAiaGkiOwogICAgICAgICAgICB9LAogICAgICAgICAgICBzZXQodmFsdWU6IHN0cmluZykgewogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQp9KTsKCnZ1ZTsKdnVlLng7CnZ1ZS5mKCJhYmMiKTsKdnVlLnRlc3Q7CnZ1ZS5oZWxsbzsK ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBsZXQgb2JqMTogew0KICAgIGE6IG51bWJlcjsNCiAgICBmKCk6IG51bWJlcjsNCiAgICBiOiBzdHJpbmc7DQogICAgYzogew0KICAgICAgICBnKCk6IHZvaWQ7DQogICAgfTsNCiAgICByZWFkb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sZXQgb2JqMSA9IHsKICAgIGE6IDEsCiAgICBmKCk6IG51bWJlciB7CiAgICAgICAgcmV0dXJuIHRoaXMuYTsKICAgIH0sCiAgICBiOiAiaGVsbG8iLAogICAgYzogewogICAgICAgIGcoKTogdm9pZCB7CiAgICAgICAgICAgIHRoaXMuZygpOwogICAgICAgIH0KICAgIH0sCiAgICBnZXQgZCgpOiBudW1iZXIgewogICAgICAgIHJldHVybiB0aGlzLmE7CiAgICB9LAogICAgZ2V0IGUoKTogc3RyaW5nIHsKICAgICAgICByZXR1cm4gdGhpcy5iOwogICAgfSwKICAgIHNldCBlKHZhbHVlKSB7CiAgICAgICAgdGhpcy5iID0gdmFsdWU7CiAgICB9Cn07CgovLyBJbiBtZXRob2RzIG9mIGFuIG9iamVjdCBsaXRlcmFsIHdpdGggYSBjb250ZXh0dWFsIHR5cGUsICd0aGlzJyBoYXMgdGhlCi8vIGNvbnRleHR1YWwgdHlwZS4KCnR5cGUgUG9pbnQgPSB7CiAgICB4OiBudW1iZXI7CiAgICB5OiBudW1iZXI7CiAgICB6PzogbnVtYmVyOwogICAgbW92ZUJ5KGR4OiBudW1iZXIsIGR5OiBudW1iZXIsIGR6PzogbnVtYmVyKTogdm9pZDsKfQoKbGV0IHAxOiBQb2ludCA9IHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9OwoKbGV0IHAyOiBQb2ludCB8IG51bGwgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwMzogUG9pbnQgfCB1bmRlZmluZWQgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwNDogUG9pbnQgfCBudWxsIHwgdW5kZWZpbmVkID0gewogICAgeDogMTAsCiAgICB5OiAyMCwKICAgIG1vdmVCeShkeCwgZHksIGR6KSB7CiAgICAgICAgdGhpcy54ICs9IGR4OwogICAgICAgIHRoaXMueSArPSBkeTsKICAgICAgICBpZiAodGhpcy56ICYmIGR6KSB7CiAgICAgICAgICAgIHRoaXMueiArPSBkejsKICAgICAgICB9CiAgICB9Cn07CgpkZWNsYXJlIGZ1bmN0aW9uIGYxKHA6IFBvaW50KTogdm9pZDsKCmYxKHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9KTsKCmRlY2xhcmUgZnVuY3Rpb24gZjIocDogUG9pbnQgfCBudWxsIHwgdW5kZWZpbmVkKTogdm9pZDsKCmYyKHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQog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2V0Pyh2YWx1ZTogVCk6IHZvaWQ7Cn0KCnR5cGUgVnVlT3B0aW9uczxELCBNLCBQPiA9IFRoaXNUeXBlPEQgJiBNICYgUD4gJiB7CiAgICBkYXRhPzogRCB8ICgoKSA9PiBEKTsKICAgIG1ldGhvZHM/OiBNOwogICAgY29tcHV0ZWQ/OiBBY2Nlc3NvcnM8UD47Cn0KCmRlY2xhcmUgY29uc3QgVnVlOiBuZXcgPEQsIE0sIFA+KG9wdGlvbnM6IFZ1ZU9wdGlvbnM8RCwgTSwgUD4pID0+IEQgJiBNICYgUDsKCmxldCB2dWU6IHsKICAgIHg6IG51bWJlcjsKICAgIHk6IG51bWJlcjsKfSAmIHsKICAgIGYoeDogc3RyaW5nKTogbnVtYmVyOwp9ICYgewogICAgdGVzdDogbnVtYmVyOwogICAgaGVsbG86IHN0cmluZzsKfSA9IG5ldyBWdWUoewogICAgZGF0YTogKCkgPT4gKHsgeDogMSwgeTogMiB9KSwKICAgIG1ldGhvZHM6IHsKICAgICAgICBmKHg6IHN0cmluZykgewogICAgICAgICAgICByZXR1cm4gdGhpcy54OwogICAgICAgIH0KICAgIH0sCiAgICBjb21wdXRlZDogewogICAgICAgIHRlc3QoKTogbnVtYmVyIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMueDsKICAgICAgICB9LAogICAgICAgIGhlbGxvOiB7CiAgICAgICAgICAgIGdldCgpIHsKICAgICAgICAgICAgICAgIHJldHVybiAiaGkiOwogICAgICAgICAgICB9LAogICAgICAgICAgICBzZXQodmFsdWU6IHN0cmluZykgewogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQp9KTsKCnZ1ZTsKdnVlLng7CnZ1ZS5mKCJhYmMiKTsKdnVlLnRlc3Q7CnZ1ZS5oZWxsbzsK + 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 index 05aa3b0763da6..ea19a39afb809 100644 --- 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 @@ -68,17 +68,17 @@ +typeFromPropertyAssignment29.ts(67,5): error TS9009: 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,30): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. - typeFromPropertyAssignment29.ts(81,50): 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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. - typeFromPropertyAssignment29.ts(91,50): 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 TS9011: Declaration emit for class expressions are 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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. - typeFromPropertyAssignment29.ts(101,50): 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) ==== 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..703d672f73bd4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitNameConflicts3.d.ts.map @@ -0,0 +1,46 @@ +//// [tests/cases/compiler/declarationEmitNameConflicts3.ts] //// + + + +/// [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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AgICBleHBvcnQgZnVuY3Rpb24gZigpOiB2b2lkIHsgfQogICAgfQogICAgZXhwb3J0IG1vZHVsZSBDIHsKICAgICAgICBleHBvcnQgZnVuY3Rpb24gZigpOiB2b2lkIHsgfQogICAgfQogICAgZXhwb3J0IG1vZHVsZSBFIHsKICAgICAgICBleHBvcnQgZnVuY3Rpb24gZigpOiB2b2lkIHsgfQogICAgfQp9Cgptb2R1bGUgTS5QIHsKICAgIGV4cG9ydCBjbGFzcyBDIHsKICAgICAgICBzdGF0aWMgZigpOiB2b2lkIHsgfQogICAgfQogICAgZXhwb3J0IGNsYXNzIEUgZXh0ZW5kcyBDIHsgfQogICAgZXhwb3J0IGVudW0gRCB7CiAgICAgICAgZgogICAgfQogICAgZXhwb3J0IHZhciB2OiBNLkQ7IC8vIG9rCiAgICBleHBvcnQgdmFyIHc6IHR5cGVvZiBNLkQuZiA9IE0uRC5mOyAvLyBlcnJvciwgc2hvdWxkIGJlIHR5cGVvZiBNLkQuZgogICAgZXhwb3J0IHZhciB4OiB0eXBlb2YgTS5DLmYgPSBNLkMuZjsgLy8gZXJyb3IsIHNob3VsZCBiZSB0eXBlb2YgTS5DLmYKICAgIGV4cG9ydCB2YXIgeCA9IE0uRS5mOyAvLyBlcnJvciwgc2hvdWxkIGJlIHR5cGVvZiBNLkUuZgp9 + 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..a919cc7d13037 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/es6ImportNamedImportWithExport.d.ts.map @@ -0,0 +1,47 @@ +//// [tests/cases/compiler/es6ImportNamedImportWithExport.ts] //// + + + +/// [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,ZXhwb3J0IGRlY2xhcmUgdmFyIHh4eHg6IG51bWJlcjsNCmV4cG9ydCBkZWNsYXJlIHZhciB4eHh4OiBudW1iZXI7DQpleHBvcnQgZGVjbGFyZSB2YXIgeHh4eDogbnVtYmVyOw0KZXhwb3J0IGRlY2xhcmUgdmFyIHh4eHg6IG51bWJlcjsNCmV4cG9ydCBkZWNsYXJlIHZhciB4eHh4OiBudW1iZXI7DQpleHBvcnQgZGVjbGFyZSB2YXIgeHh4eDogbnVtYmVyOw0KZXhwb3J0IGRlY2xhcmUgdmFyIHh4eHg6IG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.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/es6ImportNamedImportWithExport.d.ts.map.f b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/es6ImportNamedImportWithExport.d.ts.map.f new file mode 100644 index 0000000000000..c0c660d4caa37 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/es6ImportNamedImportWithExport.d.ts.map.f @@ -0,0 +1,1459 @@ +//// [es6ImportNamedImportWithExport.ts] //// + +//// [client.d.ts.map] +{ + "version": 3, + "file": "client.d.ts", + "sourceRoot": "", + "sources": [ + "client.ts" + ], + "names": [], + "mappings": [ + { + "generatedLine": 1, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 1, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 1, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 1, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 15, + "name": null, + "generatedText": "xxxx", + "sourceText": "xxxx" + }, + { + "generatedLine": 1, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 17, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 1, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 27, + "name": null, + "generatedText": "number", + "sourceText": "number = a" + }, + { + "generatedLine": 1, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 28, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 2, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 5, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 2, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 5, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 2, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 5, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 2, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 5, + "originalColumn": 15, + "name": null, + "generatedText": "xxxx", + "sourceText": "xxxx" + }, + { + "generatedLine": 2, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 17, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 2, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 5, + "originalColumn": 19, + "name": null, + "generatedText": "number", + "sourceText": " b" + }, + { + "generatedLine": 2, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 5, + "originalColumn": 20, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 3, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 7, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 3, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 7, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 3, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 7, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 3, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 7, + "originalColumn": 15, + "name": null, + "generatedText": "xxxx", + "sourceText": "xxxx" + }, + { + "generatedLine": 3, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 17, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 3, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 7, + "originalColumn": 19, + "name": null, + "generatedText": "number", + "sourceText": " x" + }, + { + "generatedLine": 3, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 7, + "originalColumn": 20, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 4, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 8, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 4, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 8, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 4, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 8, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 4, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 8, + "originalColumn": 15, + "name": null, + "generatedText": "xxxx", + "sourceText": "xxxx" + }, + { + "generatedLine": 4, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 17, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 4, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 8, + "originalColumn": 19, + "name": null, + "generatedText": "number", + "sourceText": " y" + }, + { + "generatedLine": 4, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 8, + "originalColumn": 20, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 5, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 10, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 5, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 10, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 5, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 10, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 5, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 10, + "originalColumn": 15, + "name": null, + "generatedText": "xxxx", + "sourceText": "xxxx" + }, + { + "generatedLine": 5, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 17, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 5, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 10, + "originalColumn": 19, + "name": null, + "generatedText": "number", + "sourceText": " z" + }, + { + "generatedLine": 5, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 10, + "originalColumn": 20, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 6, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 12, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 6, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 12, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 6, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 12, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 6, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 12, + "originalColumn": 15, + "name": null, + "generatedText": "xxxx", + "sourceText": "xxxx" + }, + { + "generatedLine": 6, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 17, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 6, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 12, + "originalColumn": 19, + "name": null, + "generatedText": "number", + "sourceText": " m" + }, + { + "generatedLine": 6, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 12, + "originalColumn": 20, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 7, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 14, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 7, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 14, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 7, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 14, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 7, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 14, + "originalColumn": 15, + "name": null, + "generatedText": "xxxx", + "sourceText": "xxxx" + }, + { + "generatedLine": 7, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 17, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 7, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 14, + "originalColumn": 20, + "name": null, + "generatedText": "number", + "sourceText": " a1" + }, + { + "generatedLine": 7, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 14, + "originalColumn": 21, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 8, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 15, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 8, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 15, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 8, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 15, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 8, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 15, + "originalColumn": 15, + "name": null, + "generatedText": "xxxx", + "sourceText": "xxxx" + }, + { + "generatedLine": 8, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 17, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 8, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 15, + "originalColumn": 20, + "name": null, + "generatedText": "number", + "sourceText": " x1" + }, + { + "generatedLine": 8, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 15, + "originalColumn": 21, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 9, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 17, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 9, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 17, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 9, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 17, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 9, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 17, + "originalColumn": 15, + "name": null, + "generatedText": "xxxx", + "sourceText": "xxxx" + }, + { + "generatedLine": 9, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 17, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 9, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 17, + "originalColumn": 21, + "name": null, + "generatedText": "number", + "sourceText": " a11" + }, + { + "generatedLine": 9, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 17, + "originalColumn": 22, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 10, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 18, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 10, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 18, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 10, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 18, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 10, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 18, + "originalColumn": 15, + "name": null, + "generatedText": "xxxx", + "sourceText": "xxxx" + }, + { + "generatedLine": 10, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 17, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 10, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 18, + "originalColumn": 21, + "name": null, + "generatedText": "number", + "sourceText": " x11" + }, + { + "generatedLine": 10, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 18, + "originalColumn": 22, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 11, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 20, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 11, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 20, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 11, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 20, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 11, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 20, + "originalColumn": 15, + "name": null, + "generatedText": "z111", + "sourceText": "z111" + }, + { + "generatedLine": 11, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 20, + "originalColumn": 17, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 11, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 20, + "originalColumn": 28, + "name": null, + "generatedText": "number", + "sourceText": "number = z1" + }, + { + "generatedLine": 11, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 20, + "originalColumn": 29, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 12, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 22, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 12, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 22, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 12, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 22, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 12, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 22, + "originalColumn": 13, + "name": null, + "generatedText": "z2", + "sourceText": "z2" + }, + { + "generatedLine": 12, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 22, + "originalColumn": 15, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 12, + "generatedColumn": 29, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 22, + "originalColumn": 26, + "name": null, + "generatedText": "number", + "sourceText": "number = z3" + }, + { + "generatedLine": 12, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 22, + "originalColumn": 27, + "name": null, + "generatedText": ";", + "sourceText": ";" + } + ] +}//// [server.d.ts.map] +{ + "version": 3, + "file": "server.d.ts", + "sourceRoot": "", + "sources": [ + "server.ts" + ], + "names": [], + "mappings": [ + { + "generatedLine": 1, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 1, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 1, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 1, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 1, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 1, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 1, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 1, + "originalColumn": 12, + "name": null, + "generatedText": "a", + "sourceText": "a" + }, + { + "generatedLine": 1, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 1, + "originalColumn": 17, + "name": null, + "generatedText": ": number", + "sourceText": " = 10" + }, + { + "generatedLine": 1, + "generatedColumn": 29, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 1, + "originalColumn": 18, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 2, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 2, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 2, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 2, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 2, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 2, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 2, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 2, + "originalColumn": 12, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 2, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 2, + "originalColumn": 14, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 2, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 2, + "originalColumn": 24, + "name": null, + "generatedText": "number", + "sourceText": "number = a" + }, + { + "generatedLine": 2, + "generatedColumn": 29, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 2, + "originalColumn": 25, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 3, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 3, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 3, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 3, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 3, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 3, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 3, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 3, + "originalColumn": 12, + "name": null, + "generatedText": "m", + "sourceText": "m" + }, + { + "generatedLine": 3, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 3, + "originalColumn": 14, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 3, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 3, + "originalColumn": 24, + "name": null, + "generatedText": "number", + "sourceText": "number = a" + }, + { + "generatedLine": 3, + "generatedColumn": 29, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 3, + "originalColumn": 25, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 4, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 4, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 4, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 4, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 4, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 4, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 4, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 4, + "originalColumn": 13, + "name": null, + "generatedText": "a1", + "sourceText": "a1" + }, + { + "generatedLine": 4, + "generatedColumn": 29, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 4, + "originalColumn": 18, + "name": null, + "generatedText": ": number", + "sourceText": " = 10" + }, + { + "generatedLine": 4, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 4, + "originalColumn": 19, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 5, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 5, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 5, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 5, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 5, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 5, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 5, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 5, + "originalColumn": 13, + "name": null, + "generatedText": "x1", + "sourceText": "x1" + }, + { + "generatedLine": 5, + "generatedColumn": 29, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 5, + "originalColumn": 18, + "name": null, + "generatedText": ": number", + "sourceText": " = 10" + }, + { + "generatedLine": 5, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 5, + "originalColumn": 19, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 6, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 6, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 6, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 6, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 6, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 6, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 6, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 6, + "originalColumn": 13, + "name": null, + "generatedText": "z1", + "sourceText": "z1" + }, + { + "generatedLine": 6, + "generatedColumn": 29, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 6, + "originalColumn": 18, + "name": null, + "generatedText": ": number", + "sourceText": " = 10" + }, + { + "generatedLine": 6, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 6, + "originalColumn": 19, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 7, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 7, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 7, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 7, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 7, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 7, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 7, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 7, + "originalColumn": 13, + "name": null, + "generatedText": "z2", + "sourceText": "z2" + }, + { + "generatedLine": 7, + "generatedColumn": 29, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 7, + "originalColumn": 18, + "name": null, + "generatedText": ": number", + "sourceText": " = 10" + }, + { + "generatedLine": 7, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 7, + "originalColumn": 19, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 8, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 8, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 8, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 8, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 8, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 8, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 8, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 8, + "originalColumn": 15, + "name": null, + "generatedText": "aaaa", + "sourceText": "aaaa" + }, + { + "generatedLine": 8, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 8, + "originalColumn": 20, + "name": null, + "generatedText": ": number", + "sourceText": " = 10" + }, + { + "generatedLine": 8, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 8, + "originalColumn": 21, + "name": null, + "generatedText": ";", + "sourceText": ";" + } + ] +} \ 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..8008f0e7b6006 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit10.d.ts.map @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit10.ts] //// + + + +/// [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/thisTypeInObjectLiterals2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisTypeInObjectLiterals2.d.ts.map new file mode 100644 index 0000000000000..c5bf81438b6b3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/thisTypeInObjectLiterals2.d.ts.map @@ -0,0 +1,104 @@ +//// [tests/cases/conformance/types/thisType/thisTypeInObjectLiterals2.ts] //// + + + +/// [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;;gBAIJ,MA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ueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9OwoKbGV0IHAyOiBQb2ludCB8IG51bGwgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwMzogUG9pbnQgfCB1bmRlZmluZWQgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwNDogUG9pbnQgfCBudWxsIHwgdW5kZWZpbmVkID0gewogICAgeDogMTAsCiAgICB5OiAyMCwKICAgIG1vdmVCeShkeCwgZHksIGR6KSB7CiAgICAgICAgdGhpcy54ICs9IGR4OwogICAgICAgIHRoaXMueSArPSBkeTsKICAgICAgICBpZiAodGhpcy56ICYmIGR6KSB7CiAgICAgICAgICAgIHRoaXMueiArPSBkejsKICAgICAgICB9CiAgICB9Cn07CgpkZWNsYXJlIGZ1bmN0aW9uIGYxKHA6IFBvaW50KTogdm9pZDsKCmYxKHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9KTsKCmRlY2xhcmUgZnVuY3Rpb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dWU6IHN0cmluZykgewogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQp9KTsKCnZ1ZTsKdnVlLng7CnZ1ZS5mKCJhYmMiKTsKdnVlLnRlc3Q7CnZ1ZS5oZWxsbzsK + 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 index 4fc606253920c..17fe5b21c7ebf 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts @@ -28,7 +28,7 @@ ExpandoExpr.prop = { y: "" } ExpandoExpr.m = function(n: number) { return n + 1; } -var n: number = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length +var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length const ExpandoArrow: { (n: number): string; @@ -63,7 +63,7 @@ namespace ExpandoMerge { namespace ExpandoMerge { export var p3 = 333; } -var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); +var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); namespace Ns { function ExpandoNamespace(): void {} @@ -81,7 +81,7 @@ ExpandoExpr2.prop = 2 ExpandoExpr2.m = function(n: number) { return n + 1; } -var n: number = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length +var n = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length // Should not work in typescript -- classes already have statics class ExpandoClass { @@ -91,7 +91,7 @@ ExpandoClass.prop = 2 ExpandoClass.m = function(n: number) { return n + 1; } -var n: number = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n +var n = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n // Class expressions shouldn't work in typescript either var ExpandoExpr3 = class { @@ -101,7 +101,7 @@ ExpandoExpr3.prop = 3 ExpandoExpr3.m = function(n: number) { return n + 1; } -var n: number = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n +var n = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n @@ -164,17 +164,17 @@ typeFromPropertyAssignment29.ts(56,1): error TS9009: Assigning properties to fun typeFromPropertyAssignment29.ts(67,5): error TS9009: 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,30): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. -typeFromPropertyAssignment29.ts(81,50): 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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. -typeFromPropertyAssignment29.ts(91,50): 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 TS9011: Declaration emit for class expressions are 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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. -typeFromPropertyAssignment29.ts(101,50): 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) ==== @@ -209,7 +209,7 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi ExpandoExpr.m = function(n: number) { return n + 1; } - var n: number = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length + var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length const ExpandoArrow: { (n: number): string; @@ -248,7 +248,7 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi namespace ExpandoMerge { export var p3 = 333; } - var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); + var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); namespace Ns { function ExpandoNamespace(): void {} @@ -272,10 +272,10 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type '(n: number) => string'. return n + 1; } - var n: number = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length - ~~~~ + 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 @@ -290,10 +290,10 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. return n + 1; } - var n: number = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n - ~~~~ + 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 @@ -310,10 +310,10 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. return n + 1; } - var n: number = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n - ~~~~ + 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/declarationEmitNameConflicts3.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitNameConflicts3.d.ts.map new file mode 100644 index 0000000000000..a4995a1049d45 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitNameConflicts3.d.ts.map @@ -0,0 +1,46 @@ +//// [tests/cases/compiler/declarationEmitNameConflicts3.ts] //// + + + +/// [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,ZGVjbGFyZSBuYW1lc3BhY2UgTSB7DQogICAgaW50ZXJmYWNlIEQgew0KICAgIH0NCiAgICBuYW1lc3BhY2UgRCB7DQogICAgICAgIGZ1bmN0aW9uIGYoKTogdm9pZDsNCiAgICB9DQogICAgbmFtZXNwYWNlIEMgew0KICAgICAgICBmdW5jdGlvbiBmKCk6IHZvaWQ7DQogICAgfQ0KICAgIG5hbWVzcGFjZSBFIHsNCiAgICAgICAgZnVuY3Rpb24gZigpOiB2b2lkOw0KICAgIH0NCn0NCmRlY2xhcmUgbmFtZXNwYWNlIE0uUCB7DQogICAgY2xhc3MgQyB7DQogICAgICAgIHN0YXRpYyBmKC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FBSSxDQUFDLEVBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQVMsQ0FBQztJQUM1QixJQUFJLENBQUMsRUFBRSxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBUyxDQUFDO0lBQzVCLElBQUksQ0FBQyxjQUFRLENBQUM7Q0FDeEIifQ==,bW9kdWxlIE0gewogICAgZXhwb3J0IGludGVyZmFjZSBEIHsgfQogICAgZXhwb3J0IG1vZHVsZSBEIHsKICAgICAgICBleHBvcnQgZnVuY3Rpb24gZigpOiB2b2lkIHsgfQogICAgfQogICAgZXhwb3J0IG1vZHVsZSBDIHsKICAgICAgICBleHBvcnQgZnVuY3Rpb24gZigpOiB2b2lkIHsgfQogICAgfQogICAgZXhwb3J0IG1vZHVsZSBFIHsKICAgICAgICBleHBvcnQgZnVuY3Rpb24gZigpOiB2b2lkIHsgfQogICAgfQp9Cgptb2R1bGUgTS5QIHsKICAgIGV4cG9ydCBjbGFzcyBDIHsKICAgICAgICBzdGF0aWMgZigpOiB2b2lkIHsgfQogICAgfQogICAgZXhwb3J0IGNsYXNzIEUgZXh0ZW5kcyBDIHsgfQogICAgZXhwb3J0IGVudW0gRCB7CiAgICAgICAgZgogICAgfQogICAgZXhwb3J0IHZhciB2OiBNLkQ7IC8vIG9rCiAgICBleHBvcnQgdmFyIHc6IHR5cGVvZiBNLkQuZiA9IE0uRC5mOyAvLyBlcnJvciwgc2hvdWxkIGJlIHR5cGVvZiBNLkQuZgogICAgZXhwb3J0IHZhciB4OiB0eXBlb2YgTS5DLmYgPSBNLkMuZjsgLy8gZXJyb3IsIHNob3VsZCBiZSB0eXBlb2YgTS5DLmYKICAgIGV4cG9ydCB2YXIgeCA9IE0uRS5mOyAvLyBlcnJvciwgc2hvdWxkIGJlIHR5cGVvZiBNLkUuZgp9 + 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..6bdc8c676d63a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/es6ImportNamedImportWithExport.d.ts.map @@ -0,0 +1,47 @@ +//// [tests/cases/compiler/es6ImportNamedImportWithExport.ts] //// + + + +/// [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,ZXhwb3J0IGRlY2xhcmUgdmFyIHh4eHg6IG51bWJlcjsNCmV4cG9ydCBkZWNsYXJlIHZhciB4eHh4O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cmUgZXJyb3IKCi8vIE5vbiByZWZlcmVuY2VkIGltcG9ydHMKZXhwb3J0IGltcG9ydCB7IGFhYWEgfSBmcm9tICIuL3NlcnZlciI7CmV4cG9ydCBpbXBvcnQgeyBhYWFhIGFzIGJiYmIgfSBmcm9tICIuL3NlcnZlciI7Cg== + + +//// [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/es6ImportNamedImportWithExport.d.ts.map.f b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/es6ImportNamedImportWithExport.d.ts.map.f new file mode 100644 index 0000000000000..07d27157cfb0d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/es6ImportNamedImportWithExport.d.ts.map.f @@ -0,0 +1,1360 @@ +//// [es6ImportNamedImportWithExport.ts] //// + +//// [client.d.ts.map] +{ + "version": 3, + "file": "client.d.ts", + "sourceRoot": "", + "sources": [ + "client.ts" + ], + "names": [], + "mappings": [ + { + "generatedLine": 1, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 1, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 1, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 1, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 15, + "name": null, + "generatedText": "xxxx", + "sourceText": "xxxx" + }, + { + "generatedLine": 1, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 17, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 1, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 27, + "name": null, + "generatedText": "number", + "sourceText": "number = a" + }, + { + "generatedLine": 1, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 3, + "originalColumn": 28, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 2, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 5, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 2, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 5, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 2, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 5, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 2, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 5, + "originalColumn": 15, + "name": null, + "generatedText": "xxxx", + "sourceText": "xxxx" + }, + { + "generatedLine": 2, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 5, + "originalColumn": 19, + "name": null, + "generatedText": ": number", + "sourceText": " = b" + }, + { + "generatedLine": 2, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 5, + "originalColumn": 20, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 3, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 7, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 3, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 7, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 3, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 7, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 3, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 7, + "originalColumn": 15, + "name": null, + "generatedText": "xxxx", + "sourceText": "xxxx" + }, + { + "generatedLine": 3, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 7, + "originalColumn": 19, + "name": null, + "generatedText": ": number", + "sourceText": " = x" + }, + { + "generatedLine": 3, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 7, + "originalColumn": 20, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 4, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 8, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 4, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 8, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 4, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 8, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 4, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 8, + "originalColumn": 15, + "name": null, + "generatedText": "xxxx", + "sourceText": "xxxx" + }, + { + "generatedLine": 4, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 8, + "originalColumn": 19, + "name": null, + "generatedText": ": number", + "sourceText": " = y" + }, + { + "generatedLine": 4, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 8, + "originalColumn": 20, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 5, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 10, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 5, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 10, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 5, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 10, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 5, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 10, + "originalColumn": 15, + "name": null, + "generatedText": "xxxx", + "sourceText": "xxxx" + }, + { + "generatedLine": 5, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 10, + "originalColumn": 19, + "name": null, + "generatedText": ": number", + "sourceText": " = z" + }, + { + "generatedLine": 5, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 10, + "originalColumn": 20, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 6, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 12, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 6, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 12, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 6, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 12, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 6, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 12, + "originalColumn": 15, + "name": null, + "generatedText": "xxxx", + "sourceText": "xxxx" + }, + { + "generatedLine": 6, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 12, + "originalColumn": 19, + "name": null, + "generatedText": ": number", + "sourceText": " = m" + }, + { + "generatedLine": 6, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 12, + "originalColumn": 20, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 7, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 14, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 7, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 14, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 7, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 14, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 7, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 14, + "originalColumn": 15, + "name": null, + "generatedText": "xxxx", + "sourceText": "xxxx" + }, + { + "generatedLine": 7, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 14, + "originalColumn": 20, + "name": null, + "generatedText": ": number", + "sourceText": " = a1" + }, + { + "generatedLine": 7, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 14, + "originalColumn": 21, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 8, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 15, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 8, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 15, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 8, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 15, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 8, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 15, + "originalColumn": 15, + "name": null, + "generatedText": "xxxx", + "sourceText": "xxxx" + }, + { + "generatedLine": 8, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 15, + "originalColumn": 20, + "name": null, + "generatedText": ": number", + "sourceText": " = x1" + }, + { + "generatedLine": 8, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 15, + "originalColumn": 21, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 9, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 17, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 9, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 17, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 9, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 17, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 9, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 17, + "originalColumn": 15, + "name": null, + "generatedText": "xxxx", + "sourceText": "xxxx" + }, + { + "generatedLine": 9, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 17, + "originalColumn": 21, + "name": null, + "generatedText": ": number", + "sourceText": " = a11" + }, + { + "generatedLine": 9, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 17, + "originalColumn": 22, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 10, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 18, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 10, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 18, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 10, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 18, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 10, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 18, + "originalColumn": 15, + "name": null, + "generatedText": "xxxx", + "sourceText": "xxxx" + }, + { + "generatedLine": 10, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 18, + "originalColumn": 21, + "name": null, + "generatedText": ": number", + "sourceText": " = x11" + }, + { + "generatedLine": 10, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 18, + "originalColumn": 22, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 11, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 20, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 11, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 20, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 11, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 20, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 11, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 20, + "originalColumn": 15, + "name": null, + "generatedText": "z111", + "sourceText": "z111" + }, + { + "generatedLine": 11, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 20, + "originalColumn": 17, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 11, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 20, + "originalColumn": 28, + "name": null, + "generatedText": "number", + "sourceText": "number = z1" + }, + { + "generatedLine": 11, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 20, + "originalColumn": 29, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 12, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 22, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 12, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 22, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 12, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 22, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 12, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 22, + "originalColumn": 13, + "name": null, + "generatedText": "z2", + "sourceText": "z2" + }, + { + "generatedLine": 12, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 22, + "originalColumn": 15, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 12, + "generatedColumn": 29, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 22, + "originalColumn": 26, + "name": null, + "generatedText": "number", + "sourceText": "number = z3" + }, + { + "generatedLine": 12, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "client.ts", + "originalLine": 22, + "originalColumn": 27, + "name": null, + "generatedText": ";", + "sourceText": ";" + } + ] +}//// [server.d.ts.map] +{ + "version": 3, + "file": "server.d.ts", + "sourceRoot": "", + "sources": [ + "server.ts" + ], + "names": [], + "mappings": [ + { + "generatedLine": 1, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 1, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 1, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 1, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 1, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 1, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 1, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 1, + "originalColumn": 12, + "name": null, + "generatedText": "a", + "sourceText": "a" + }, + { + "generatedLine": 1, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 1, + "originalColumn": 17, + "name": null, + "generatedText": ": number", + "sourceText": " = 10" + }, + { + "generatedLine": 1, + "generatedColumn": 29, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 1, + "originalColumn": 18, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 2, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 2, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 2, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 2, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 2, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 2, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 2, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 2, + "originalColumn": 12, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 2, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 2, + "originalColumn": 14, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 2, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 2, + "originalColumn": 24, + "name": null, + "generatedText": "number", + "sourceText": "number = a" + }, + { + "generatedLine": 2, + "generatedColumn": 29, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 2, + "originalColumn": 25, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 3, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 3, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 3, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 3, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 3, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 3, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 3, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 3, + "originalColumn": 12, + "name": null, + "generatedText": "m", + "sourceText": "m" + }, + { + "generatedLine": 3, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 3, + "originalColumn": 14, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 3, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 3, + "originalColumn": 24, + "name": null, + "generatedText": "number", + "sourceText": "number = a" + }, + { + "generatedLine": 3, + "generatedColumn": 29, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 3, + "originalColumn": 25, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 4, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 4, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 4, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 4, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 4, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 4, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 4, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 4, + "originalColumn": 13, + "name": null, + "generatedText": "a1", + "sourceText": "a1" + }, + { + "generatedLine": 4, + "generatedColumn": 29, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 4, + "originalColumn": 18, + "name": null, + "generatedText": ": number", + "sourceText": " = 10" + }, + { + "generatedLine": 4, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 4, + "originalColumn": 19, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 5, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 5, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 5, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 5, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 5, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 5, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 5, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 5, + "originalColumn": 13, + "name": null, + "generatedText": "x1", + "sourceText": "x1" + }, + { + "generatedLine": 5, + "generatedColumn": 29, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 5, + "originalColumn": 18, + "name": null, + "generatedText": ": number", + "sourceText": " = 10" + }, + { + "generatedLine": 5, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 5, + "originalColumn": 19, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 6, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 6, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 6, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 6, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 6, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 6, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 6, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 6, + "originalColumn": 13, + "name": null, + "generatedText": "z1", + "sourceText": "z1" + }, + { + "generatedLine": 6, + "generatedColumn": 29, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 6, + "originalColumn": 18, + "name": null, + "generatedText": ": number", + "sourceText": " = 10" + }, + { + "generatedLine": 6, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 6, + "originalColumn": 19, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 7, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 7, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 7, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 7, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 7, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 7, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 7, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 7, + "originalColumn": 13, + "name": null, + "generatedText": "z2", + "sourceText": "z2" + }, + { + "generatedLine": 7, + "generatedColumn": 29, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 7, + "originalColumn": 18, + "name": null, + "generatedText": ": number", + "sourceText": " = 10" + }, + { + "generatedLine": 7, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 7, + "originalColumn": 19, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 8, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 8, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 8, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 8, + "originalColumn": 7, + "name": null, + "generatedText": "export declare ", + "sourceText": "export " + }, + { + "generatedLine": 8, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 8, + "originalColumn": 11, + "name": null, + "generatedText": "var ", + "sourceText": "var " + }, + { + "generatedLine": 8, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 8, + "originalColumn": 15, + "name": null, + "generatedText": "aaaa", + "sourceText": "aaaa" + }, + { + "generatedLine": 8, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 8, + "originalColumn": 20, + "name": null, + "generatedText": ": number", + "sourceText": " = 10" + }, + { + "generatedLine": 8, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "server.ts", + "originalLine": 8, + "originalColumn": 21, + "name": null, + "generatedText": ";", + "sourceText": ";" + } + ] +} \ 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..4ca60c72f56be --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit10.d.ts.map @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit10.ts] //// + + + +/// [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/thisTypeInObjectLiterals2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisTypeInObjectLiterals2.d.ts.map new file mode 100644 index 0000000000000..d45c0ab5af033 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/thisTypeInObjectLiterals2.d.ts.map @@ -0,0 +1,104 @@ +//// [tests/cases/conformance/types/thisType/thisTypeInObjectLiterals2.ts] //// + + + +/// [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;CACjC,CAAA;AAED,OAAO,UAAU,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEvE,QAAA,IAAI,EAAE,EAAE;IACJ,CAAC,EAAE,M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BQb2ludCA9IHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9OwoKbGV0IHAyOiBQb2ludCB8IG51bGwgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwMzogUG9pbnQgfCB1bmRlZmluZWQgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwNDogUG9pbnQgfCBudWxsIHwgdW5kZWZpbmVkID0gewogICAgeDogMTAsCiAgICB5OiAyMCwKICAgIG1vdmVCeShkeCwgZHksIGR6KSB7CiAgICAgICAgdGhpcy54ICs9IGR4OwogICAgICAgIHRoaXMueSArPSBkeTsKICAgICAgICBpZiAodGhpcy56ICYmIGR6KSB7CiAgICAgICAgICAgIHRoaXMueiArPSBkejsKICAgICAgICB9CiAgICB9Cn07CgpkZWNsYXJlIGZ1bmN0aW9uIGYxKHA6IFBvaW50KTogdm9pZDsKCmYxKHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCAr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gcmV0dXJuIHRoaXMueDsKICAgICAgICB9LAogICAgICAgIGhlbGxvOiB7CiAgICAgICAgICAgIGdldCgpIHsKICAgICAgICAgICAgICAgIHJldHVybiAiaGkiOwogICAgICAgICAgICB9LAogICAgICAgICAgICBzZXQodmFsdWU6IHN0cmluZykgewogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQp9KTsKCnZ1ZTsKdnVlLng7CnZ1ZS5mKCJhYmMiKTsKdnVlLnRlc3Q7CnZ1ZS5oZWxsbzsK + 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 index f42a8d5cecbd9..fe1da833bf6e6 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts @@ -28,7 +28,7 @@ ExpandoExpr.prop = { y: "" } ExpandoExpr.m = function(n: number) { return n + 1; } -var n: number = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length +var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length const ExpandoArrow: { (n: number): string; @@ -63,7 +63,7 @@ namespace ExpandoMerge { namespace ExpandoMerge { export var p3 = 333; } -var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); +var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); namespace Ns { function ExpandoNamespace(): void {} @@ -81,7 +81,7 @@ ExpandoExpr2.prop = 2 ExpandoExpr2.m = function(n: number) { return n + 1; } -var n: number = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length +var n = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length // Should not work in typescript -- classes already have statics class ExpandoClass { @@ -91,7 +91,7 @@ ExpandoClass.prop = 2 ExpandoClass.m = function(n: number) { return n + 1; } -var n: number = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n +var n = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n // Class expressions shouldn't work in typescript either var ExpandoExpr3 = class { @@ -101,7 +101,7 @@ ExpandoExpr3.prop = 3 ExpandoExpr3.m = function(n: number) { return n + 1; } -var n: number = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n +var n = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n @@ -176,16 +176,16 @@ declare var n: number; 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,30): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. -typeFromPropertyAssignment29.ts(81,50): 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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. -typeFromPropertyAssignment29.ts(91,50): 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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. -typeFromPropertyAssignment29.ts(101,50): 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) ==== @@ -216,7 +216,7 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi ExpandoExpr.m = function(n: number) { return n + 1; } - var n: number = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length + var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length const ExpandoArrow: { (n: number): string; @@ -251,7 +251,7 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi namespace ExpandoMerge { export var p3 = 333; } - var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); + var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); namespace Ns { function ExpandoNamespace(): void {} @@ -273,10 +273,10 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type '(n: number) => string'. return n + 1; } - var n: number = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length - ~~~~ + 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 @@ -291,10 +291,10 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. return n + 1; } - var n: number = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n - ~~~~ + 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 @@ -309,10 +309,10 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. return n + 1; } - var n: number = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n - ~~~~ + 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/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/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/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/types/thisType/thisTypeInObjectLiterals2.ts b/tests/cases/conformance/types/thisType/thisTypeInObjectLiterals2.ts index 27861f81da6a6..a4c4ad48d1ed4 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 +// @isolatedDeclarationDiffReason: Sourcemap is more detailed // In methods of an object literal with no contextual type, 'this' has the type // of the object literal. From 2c0bf81b339077cb22c54e22abef891a482d40fb Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 5 Dec 2023 10:07:47 +0000 Subject: [PATCH 169/224] Fixed some typos in test cases. Signed-off-by: Titian Cernicova-Dragomir --- .../diff/declarationEmitObjectLiteralAccessors1.d.ts.diff | 2 +- .../original/diff/circularObjectLiteralAccessors.d.ts.diff | 2 +- .../diff/declarationEmitObjectLiteralAccessors1.d.ts.diff | 2 +- .../mappedTypeWithAsClauseAndLateBoundProperty2.d.ts.diff | 2 +- .../original/diff/objectLiteralGettersAndSetters.d.ts.diff | 2 +- .../original/diff/thisTypeInAccessors.d.ts.diff | 2 +- tests/cases/compiler/circularObjectLiteralAccessors.ts | 2 +- .../cases/compiler/declarationEmitObjectLiteralAccessors1.ts | 4 ++-- .../compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts | 2 +- .../objectLiterals/objectLiteralGettersAndSetters.ts | 2 +- tests/cases/conformance/types/thisType/thisTypeInAccessors.ts | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) 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 index 11ac55901584c..2555b455e8013 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: Sourcemap is more detailed]] //// +// [[Reason: TS merges accessors with the same type. DTE can only merge if one type is specified.]] //// //// [tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/circularObjectLiteralAccessors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/circularObjectLiteralAccessors.d.ts.diff index 495aabb50870e..371880d3b2e36 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/circularObjectLiteralAccessors.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/circularObjectLiteralAccessors.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: TS merges accessors wth the same type. DTE can only merge if one type is specified.]] //// +// [[Reason: TS merges accessors with the same type. DTE can only merge if one type is specified.]] //// //// [tests/cases/compiler/circularObjectLiteralAccessors.ts] //// 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 index d0bbf3db18926..2555b455e8013 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitObjectLiteralAccessors1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitObjectLiteralAccessors1.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: TS merges accessors wth the same type. DTE can only merge if one type is specified.]] //// +// [[Reason: TS merges accessors with the same type. DTE can only merge if one type is specified.]] //// //// [tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts] //// 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 index 68c779775d520..7f29baccd2968 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/mappedTypeWithAsClauseAndLateBoundProperty2.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: TS normalizes types]] //// +// [[Reason: TS expands type]] //// //// [tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/objectLiteralGettersAndSetters.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/objectLiteralGettersAndSetters.d.ts.diff index 53ce1a3b7cc66..868f3ff1927ba 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/objectLiteralGettersAndSetters.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/objectLiteralGettersAndSetters.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: TS merges accessors wth the same type. DTE can only merge if one type is specified.]] //// +// [[Reason: TS merges accessors with the same type. DTE can only merge if one type is specified.]] //// //// [tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/thisTypeInAccessors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/thisTypeInAccessors.d.ts.diff index 61eaa7f987690..2caaa980227b0 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/thisTypeInAccessors.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/thisTypeInAccessors.d.ts.diff @@ -1,4 +1,4 @@ -// [[Reason: TS merges accessors wth the same type. DTE can only merge if one type is specified.]] //// +// [[Reason: TS merges accessors with the same type. DTE can only merge if one type is specified.]] //// //// [tests/cases/conformance/types/thisType/thisTypeInAccessors.ts] //// diff --git a/tests/cases/compiler/circularObjectLiteralAccessors.ts b/tests/cases/compiler/circularObjectLiteralAccessors.ts index ad3fdae632b7d..028c0af486e8f 100644 --- a/tests/cases/compiler/circularObjectLiteralAccessors.ts +++ b/tests/cases/compiler/circularObjectLiteralAccessors.ts @@ -1,4 +1,4 @@ -// @isolatedDeclarationDiffReason: TS merges accessors wth 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. // @target: es5 // Repro from #6000 diff --git a/tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts b/tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts index 7d071c55dd945..102ec84632eda 100644 --- a/tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts +++ b/tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts @@ -1,8 +1,8 @@ // @strict: true // @declaration: true // @emitDeclarationOnly: true -// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed -// @isolatedDeclarationDiffReason: TS merges accessors wth the same type. DTE can only merge if one type is specified. +// @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/mappedTypeWithAsClauseAndLateBoundProperty2.ts b/tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts index d42fc830a8814..afd43a32b9a0a 100644 --- a/tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts +++ b/tests/cases/compiler/mappedTypeWithAsClauseAndLateBoundProperty2.ts @@ -1,5 +1,5 @@ // @target: ES2020 // @declaration: true // @isolatedDeclarationFixedDiffReason: Printing differences -// @isolatedDeclarationDiffReason: TS normalizes types +// @isolatedDeclarationDiffReason: TS expands type export const thing = (null as any as { [K in keyof number[] as Exclude]: (number[])[K] }); diff --git a/tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts b/tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts index dd2ac70feea2f..1f51edac0b6e9 100644 --- a/tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts +++ b/tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts @@ -1,4 +1,4 @@ -// @isolatedDeclarationDiffReason: TS merges accessors wth 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. // Get and set accessor with the same name var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } }; diff --git a/tests/cases/conformance/types/thisType/thisTypeInAccessors.ts b/tests/cases/conformance/types/thisType/thisTypeInAccessors.ts index 65d547a872a5b..aa4d5c0509f75 100644 --- a/tests/cases/conformance/types/thisType/thisTypeInAccessors.ts +++ b/tests/cases/conformance/types/thisType/thisTypeInAccessors.ts @@ -1,7 +1,7 @@ // @noImplicitAny: true // @noImplicitThis: true // @target: es5 -// @isolatedDeclarationDiffReason: TS merges accessors wth 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. interface Foo { n: number; x: number; From f1cfac4c9ea7d02413f00834aaee9539c6607177 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Fri, 8 Dec 2023 15:39:19 +0000 Subject: [PATCH 170/224] Update reasons for individual tests Signed-off-by: Hana Joo --- ...nternalTypesProduceUniqueTypeParams.d.ts.diff | 10 +++++----- .../diff/emitMethodCalledNew.d.ts.map.diff | 16 ++++++++-------- ...onWithSuffixes_one_externalTSModule.d.ts.diff | 14 +++++++------- ...ursiveInternalTypesProduceUniqueTypeParams.ts | 2 +- tests/cases/compiler/emitMethodCalledNew.ts | 2 +- ...esolutionWithSuffixes_one_externalTSModule.ts | 2 +- .../computedPropertyNamesDeclarationEmit6_ES5.ts | 2 -- 7 files changed, 23 insertions(+), 25 deletions(-) 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 index 72ed5a47ec286..e20b8d7d6b3ef 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: TODO: Investigte. Fixer prints more levels of the type.]] //// +// [[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 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -2,9 +2,12 @@ //// [declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts] export type Key = keyof U; 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 index 2b8c8c462a92e..0dcfc33568ae2 100644 --- 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 @@ -1,16 +1,16 @@ -// [[Reason: TODO: new is not correctly emitted.]] //// +// [[Reason: Source maps difference.]] //// //// [tests/cases/compiler/emitMethodCalledNew.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,6 +1,6 @@ +=================================================================== +--- 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,MAAM;CACvB,CAAA;AACD,eAAO,MAAM,CAAC;UACN,CAAC,EAAE,MAAM,GAAG,MAAM;CACzB,CAAA;AACD,eAAO,MAAM,CAAC;UACJ,CAAC,EAAE,MAAM,GAAG,MAAM;CAC3B,CAAA"} - --//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3QgYTogew0KICAgICJuZXciKHg6IG51bWJlcik6IG51bWJlcjsNCn07DQpleHBvcnQgZGVjbGFyZSBjb25zdCBiOiB7DQogICAgIm5ldyIoeDogbnVtYmVyKTogbnVtYmVyOw0KfTsNCmV4cG9ydCBkZWNsYXJlIGNvbnN0IGM6IHsNCiAgICAibmV3Iih4OiBudW1iZXIpOiBudW1iZXI7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZW1pdE1ldGhvZENhbGxlZE5ldy5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1pdE1ldGhvZENhbGxlZE5ldy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZW1pdE1ldGhvZENhbGxlZE5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10sIm1hcHBpbmdzIjoiQUFFQSxlQUFPLE1BQU0sQ0FBQztVQUNSLENBQUMsRUFBRSxNQUFNLEdBQUcsTUFBTTtDQUN2QixDQUFBO0FBQ0QsZUFBTyxNQUFNLENBQUM7VUFDTixDQUFDLEVBQUUsTUFBTSxHQUFHLE1BQU07Q0FDekIsQ0FBQTtBQUNELGVBQU8sTUFBTSxDQUFDO1VBQ0osQ0FBQyxFQUFFLE1BQU0sR0FBRyxNQUFNO0NBQzNCLENBQUEifQ==,Ly8gaHR0cHM6Ly9naXRodWIuY29tL21pY3Jvc29mdC9UeXBlU2NyaXB0L2lzc3Vlcy81NTA3NQoKZXhwb3J0IGNvbnN0IGEgPSB7CiAgbmV3KHg6IG51bWJlcik6IG51bWJlciB7IHJldHVybiB4ICsgMSB9Cn0KZXhwb3J0IGNvbnN0IGIgPSB7CiAgIm5ldyIoeDogbnVtYmVyKTogbnVtYmVyIHsgcmV0dXJuIHggKyAxIH0KfQpleHBvcnQgY29uc3QgYyA9IHsKICBbIm5ldyJdKHg6IG51bWJlcik6IG51bWJlciB7IHJldHVybiB4ICsgMSB9Cn0K diff --git a/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff index da66a81596660..64acd7b02d949 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff @@ -1,11 +1,11 @@ -// [[Reason: TODO: Files in node modules are not fixed. Should we?]] //// +// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules]] //// //// [tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,19 +1,4 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,19 +1,4 @@ //// [/bin/test.d.ts] @@ -24,5 +24,5 @@ - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== /node_modules/some-library/index.ts (0 errors) ==== -- export function base() {} -\ No newline at end of file +- export function base() {} +\ No newline at end of file diff --git a/tests/cases/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts b/tests/cases/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts index f4d7cc6cbc889..39c941499d22b 100644 --- a/tests/cases/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts +++ b/tests/cases/compiler/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.ts @@ -1,6 +1,6 @@ // @declaration: true // @lib: es6 -// @isolatedDeclarationFixedDiffReason: TODO: Investigte. Fixer prints more levels of the type. +// @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/emitMethodCalledNew.ts b/tests/cases/compiler/emitMethodCalledNew.ts index bba07ad709549..5c98dbe02ecc9 100644 --- a/tests/cases/compiler/emitMethodCalledNew.ts +++ b/tests/cases/compiler/emitMethodCalledNew.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: new is not correctly emitted. +// @isolatedDeclarationFixedDiffReason: Source maps difference. // https://github.com/microsoft/TypeScript/issues/55075 diff --git a/tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts b/tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts index 01b73ce0a6aeb..b2bd6ddb0599e 100644 --- a/tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts +++ b/tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts @@ -1,5 +1,5 @@ // moduleSuffixes has one entry and there's a matching package with TS files. -// @isolatedDeclarationDiffReason: TODO: Files in node modules are not fixed. Should we? +// @isolatedDeclarationDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules // @fullEmitPaths: true // @filename: /tsconfig.json { diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES5.ts index 606a4385d12d1..002ad4be296bb 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES5.ts @@ -1,7 +1,5 @@ // @target: es5 // @declaration: true -// @isolatedDeclarations: false -// @isolatedDeclarationDiffReason: TODO: Negative number causes issue. GH#56562 var v = { [-1]: {}, [+1]: {}, From a0f31ee9aba44cb21d8149e1103fa036c41d22ea Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Mon, 11 Dec 2023 14:03:55 +0000 Subject: [PATCH 171/224] Unmark a test from TODO of which the auto-fixer is trying to add type due to it being an error in isolatedDeclarations mode. Signed-off-by: Hana Joo --- .../auto-fixed/diff/ambientConstLiterals.d.ts.diff | 10 +++++----- tests/cases/compiler/ambientConstLiterals.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) 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 index a2c2f42555912..e4fb57580bc81 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: TODO: Printing differences. Seems avoidable.]] //// +// [[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 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -15,9 +15,9 @@ declare const c5: 123; declare const c6: -123; declare const c7 = true; diff --git a/tests/cases/compiler/ambientConstLiterals.ts b/tests/cases/compiler/ambientConstLiterals.ts index f20217f27234e..011943cf9d2bb 100644 --- a/tests/cases/compiler/ambientConstLiterals.ts +++ b/tests/cases/compiler/ambientConstLiterals.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: TODO: Printing differences. Seems avoidable. +// @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; From 901c7e3dc5c8309c0913cb94a2a9696ac5816f85 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Mon, 11 Dec 2023 14:16:08 +0000 Subject: [PATCH 172/224] Remove TODO which were already fixed Signed-off-by: Hana Joo --- tests/cases/compiler/constEnums.ts | 1 - .../computedPropertyNamesDeclarationEmit6_ES6.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/tests/cases/compiler/constEnums.ts b/tests/cases/compiler/constEnums.ts index cb0e83e6413d1..00d5b2d6b72c3 100644 --- a/tests/cases/compiler/constEnums.ts +++ b/tests/cases/compiler/constEnums.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: TODO Add support for nested namespace access for enums const enum Enum1 { A0 = 100, } diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES6.ts index db09f0a66d80b..bb0656e706e8e 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit6_ES6.ts @@ -1,7 +1,6 @@ // @target: es6 // @declaration: true // @isolatedDeclarations: false -// @isolatedDeclarationDiffReason: TODO: Negative number causes issue. GH#56562 var v = { [-1]: {}, [+1]: {}, From c5ddc9b84075ea78470fb002a3e1597f35f5f93e Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Mon, 11 Dec 2023 16:02:12 +0000 Subject: [PATCH 173/224] Remove isolatedDeclarationDiffReason it doesn't seem to be relevant anymore. Signed-off-by: Hana Joo --- tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts b/tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts index 0bedb337e65af..306e116bde80e 100644 --- a/tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts +++ b/tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts @@ -1,6 +1,4 @@ // @strict: true -// @isolatedDeclarationFixedDiffReason: TODO Need to fix DTE looking recursively for assigned members. -// @isolatedDeclarationDiffReason: TODO Need to fix DTE looking recursively for assigned members. function f(b: boolean) { function d() { From 211b0567f0b62d41d714e4e5f13c8c6f03c97f6a Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 29 Nov 2023 07:25:55 -0500 Subject: [PATCH 174/224] Improve declaration emit type safety. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/transformers/declarations.ts | 118 +++++++----------- .../transformers/declarations/emitResolver.ts | 6 +- .../declarations/localInferenceResolver.ts | 50 ++++---- .../declarations/transpileDeclaration.ts | 55 ++------ .../transformers/declarations/types.ts | 58 +++------ src/compiler/types.ts | 37 +++--- src/compiler/visitorPublic.ts | 50 ++++---- tests/baselines/reference/api/typescript.d.ts | 18 +-- 8 files changed, 152 insertions(+), 240 deletions(-) diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index c84c407c97f7c..48a063a0a5344 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -23,6 +23,7 @@ import { ConstructorTypeNode, ConstructSignatureDeclaration, contains, + CoreEmitResolver, createDiagnosticForNode, createDiagnosticForRange, createEmptyExports, @@ -46,7 +47,6 @@ import { EnumDeclaration, ExportAssignment, ExportDeclaration, - Expression, ExpressionWithTypeArguments, factory, FileReference, @@ -139,7 +139,7 @@ import { isMethodSignature, isModifier, isModuleDeclaration, - IsolatedEmitResolver, + IsolatedTransformationContext, isOmittedExpression, isPrivateIdentifier, isPropertySignature, @@ -167,7 +167,6 @@ import { LateBoundDeclaration, LateVisibilityPaintedStatement, length, - LocalInferenceResolver, map, mapDefined, MethodDeclaration, @@ -293,7 +292,7 @@ const declarationEmitNodeBuilderFlags = NodeBuilderFlags.MultilineObjectLiterals * * @internal */ -export function transformDeclarations(context: TransformationContext, _useTscEmit = true) { +export function transformDeclarations(context: (TransformationContext & { useLocalInferenceTypePrint?: false; }) | IsolatedTransformationContext) { const throwDiagnostic = () => Debug.fail("Diagnostic emitted without context"); let getSymbolAccessibilityDiagnostic: GetSymbolAccessibilityDiagnostic = throwDiagnostic; let needsDeclare = true; @@ -318,70 +317,42 @@ export function transformDeclarations(context: TransformationContext, _useTscEmi 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 { localInferenceResolver, isolatedDeclarations, host, resolver, symbolTracker, ensureNoInitializer, useTscEmit } = createTransformerServices(); + const { localInferenceResolver, isolatedDeclarations, host, resolver, symbolTracker, ensureNoInitializer, useLocalInferenceTypePrint } = createTransformerServices(); const options = context.getCompilerOptions(); const { noResolve, stripInternal } = options; return transformRoot; - function createTransformerServices(): { - isolatedDeclarations: true; - useTscEmit: false; - resolver: IsolatedEmitResolver; - localInferenceResolver: LocalInferenceResolver; - host: undefined; - symbolTracker: undefined; - ensureNoInitializer: (node: CanHaveLiteralInitializer) => Expression | undefined; - } | { - isolatedDeclarations: true; - useTscEmit: true; - resolver: EmitResolver; - localInferenceResolver: LocalInferenceResolver; - host: EmitHost; - symbolTracker: SymbolTracker; - ensureNoInitializer: (node: CanHaveLiteralInitializer) => Expression | undefined; - } | { - isolatedDeclarations: false; - useTscEmit: false; - resolver: EmitResolver; - localInferenceResolver: undefined; - host: EmitHost; - symbolTracker: SymbolTracker; - ensureNoInitializer: (node: CanHaveLiteralInitializer) => Expression | undefined; - } { - const { isolatedDeclarations, resolver: localInferenceResolver } = createLocalInferenceResolver({ - ensureParameter, - context, - visitDeclarationSubtree, - setEnclosingDeclarations(node) { - const oldNode = enclosingDeclaration; - enclosingDeclaration = node; - return oldNode; - }, - checkEntityNameVisibility(name, container) { - return checkEntityNameVisibility(name, container ?? enclosingDeclaration); - }, - }); + function createTransformerServices() { + const isolatedDeclarations = context.getCompilerOptions().isolatedDeclarations; if (isolatedDeclarations) { - if (!_useTscEmit) { - const resolver: IsolatedEmitResolver = context.getEmitResolver(); + 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.useLocalInferenceTypePrint) { + 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, - useTscEmit: false, + useLocalInferenceTypePrint: true, resolver, localInferenceResolver, symbolTracker: undefined, host: undefined, - ensureNoInitializer: (node: CanHaveLiteralInitializer) => { - if (shouldPrintWithInitializer(node)) { - return resolver.createLiteralConstValue(getParseTreeNode(node) as CanHaveLiteralInitializer, emptySymbolTracker); // TODO: Make safe - } - return undefined; - }, - }; + ensureNoInitializer: createEnsureNoInitializer(emptySymbolTracker), + } as const; } else { const host = context.getEmitHost(); @@ -389,37 +360,37 @@ export function transformDeclarations(context: TransformationContext, _useTscEmi const symbolTracker = createSymbolTracker(resolver, host); return { isolatedDeclarations, - useTscEmit: true, + useLocalInferenceTypePrint: false, resolver, localInferenceResolver, symbolTracker, host, - ensureNoInitializer: (node: CanHaveLiteralInitializer) => { - if (shouldPrintWithInitializer(node)) { - return resolver.createLiteralConstValue(getParseTreeNode(node) as CanHaveLiteralInitializer, symbolTracker); // TODO: Make safe - } - return undefined; - }, - }; + ensureNoInitializer: createEnsureNoInitializer(symbolTracker), + } as const; } } else { + Debug.assert(!context.useLocalInferenceTypePrint); const host = context.getEmitHost(); const resolver = context.getEmitResolver(); const symbolTracker: SymbolTracker = createSymbolTracker(resolver, host); return { - isolatedDeclarations, - useTscEmit: false, - localInferenceResolver, + isolatedDeclarations: false, + useLocalInferenceTypePrint: false, + localInferenceResolver: undefined, resolver, symbolTracker, host, - ensureNoInitializer: (node: CanHaveLiteralInitializer) => { - if (shouldPrintWithInitializer(node)) { - return resolver.createLiteralConstValue(getParseTreeNode(node) as CanHaveLiteralInitializer, symbolTracker); // TODO: Make safe - } - return undefined; - }, + 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; }; } } @@ -659,6 +630,7 @@ export function transformDeclarations(context: TransformationContext, _useTscEmi 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 @@ -681,7 +653,7 @@ export function transformDeclarations(context: TransformationContext, _useTscEmi 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, @@ -952,7 +924,7 @@ export function transformDeclarations(context: TransformationContext, _useTscEmi } if (isolatedDeclarations) { const { typeNode, isInvalid } = localInferenceResolver.fromInitializer(node, type, currentSourceFile); - if (!useTscEmit || isInvalid) { + if (useLocalInferenceTypePrint || isInvalid) { return typeNode; } } @@ -1121,7 +1093,7 @@ export function transformDeclarations(context: TransformationContext, _useTscEmi if (isBundledEmit) { // Bundle emit not supported for isolatedDeclarations if (!isolatedDeclarations) { - const newName = getExternalModuleNameFromDeclaration(context.getEmitHost(), resolver, parent); + const newName = getExternalModuleNameFromDeclaration(host, resolver, parent); if (newName) { return factory.createStringLiteral(newName); } diff --git a/src/compiler/transformers/declarations/emitResolver.ts b/src/compiler/transformers/declarations/emitResolver.ts index 9309b193717be..1c9f21f9bb8a6 100644 --- a/src/compiler/transformers/declarations/emitResolver.ts +++ b/src/compiler/transformers/declarations/emitResolver.ts @@ -1,6 +1,7 @@ import { bindSourceFileForDeclarationEmit, ComputedPropertyName, + CoreEmitResolver, createEntityVisibilityChecker, createEvaluator, Debug, @@ -39,7 +40,6 @@ import { isIdentifier, isInfinityOrNaNString, isNumericLiteral, - IsolatedEmitResolver, isPrefixUnaryExpression, isPrimitiveLiteralValue, isPropertyAccessExpression, @@ -70,7 +70,7 @@ import { } from "../../_namespaces/ts"; /** @internal */ -export function createEmitDeclarationResolver(file: SourceFile): IsolatedEmitResolver { +export function createEmitDeclarationResolver(file: SourceFile): CoreEmitResolver { const { getNodeLinks, resolveMemberKey, resolveName, resolveEntityName } = bindSourceFileForDeclarationEmit(file); const { isEntityNameVisible } = createEntityVisibilityChecker({ @@ -394,4 +394,4 @@ export function createEmitDeclarationResolver(file: SourceFile): IsolatedEmitRes return false; } -} + } diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index a675271b2122b..64fb78caf2acd 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -31,6 +31,7 @@ import { isMethodOrAccessor, isNoSubstitutionTemplateLiteral, isNumericLiteral, + IsolatedTransformationContext, isOmittedExpression, isOptionalDeclaration, isParameter, @@ -120,44 +121,39 @@ export function createLocalInferenceResolver({ visitDeclarationSubtree(input: Node): VisitResult; checkEntityNameVisibility(name: EntityNameOrEntityNameExpression, container?: Node): void; ensureParameter(p: ParameterDeclaration): ParameterDeclaration; - context: TransformationContext; -}): { resolver: LocalInferenceResolver; isolatedDeclarations: true; } | { resolver: undefined; isolatedDeclarations: false; } { + context: IsolatedTransformationContext | TransformationContext; +}): LocalInferenceResolver { let currentSourceFile: SourceFile; const options = context.getCompilerOptions(); const resolver = context.getEmitResolver(); - if (!options.isolatedDeclarations) { - return { resolver: undefined, isolatedDeclarations: false }; - } + 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 { - resolver: { - 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); - if (typeNode !== undefined) { - return { isInvalid: inferenceContext.isInvalid, typeNode }; - } - return { isInvalid: true, typeNode: invalid(node) }; + 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); + if (typeNode !== undefined) { + return { isInvalid: inferenceContext.isInvalid, typeNode }; } - finally { - currentSourceFile = oldSourceFile; - if (!hasExistingContext) { - inferenceContext = undefined!; - } + return { isInvalid: true, typeNode: invalid(node) }; + } + finally { + currentSourceFile = oldSourceFile; + if (!hasExistingContext) { + inferenceContext = undefined!; } - }, - makeInvalidType, + } }, - isolatedDeclarations: options.isolatedDeclarations, + makeInvalidType, }; function hasParseError(node: Node) { return !!(node.flags & NodeFlags.ThisNodeHasError); diff --git a/src/compiler/transformers/declarations/transpileDeclaration.ts b/src/compiler/transformers/declarations/transpileDeclaration.ts index bddb4afb78989..e117840b4d4ca 100644 --- a/src/compiler/transformers/declarations/transpileDeclaration.ts +++ b/src/compiler/transformers/declarations/transpileDeclaration.ts @@ -11,7 +11,6 @@ import { Diagnostic, EmitHost, ensureTrailingDirectorySeparator, - factory, getAreDeclarationMapsEnabled, getBaseFileName, getDeclarationEmitOutputFilePathWorker, @@ -22,74 +21,44 @@ import { getSourceFilePathInNewDir, normalizePath, normalizeSlashes, + nullTransformationContext, PrinterOptions, SourceFile, SourceMapGenerator, sys, - TransformationContext, transformDeclarations, TranspileDeclarationsOptions, TranspileDeclarationsOutput, } from "../../_namespaces/ts"; -function createEmitDeclarationHost(options: TranspileDeclarationsOptions): EmitHost { - const throws = () => Debug.fail("Function should not be called in isolated declarations emit"); - return { - getCurrentDirectory: () => options.currentDirectory ?? ".", - getCanonicalFileName: createGetCanonicalFileName(sys.useCaseSensitiveFileNames), - useCaseSensitiveFileNames: () => !!options.useCaseSensitiveFileNames, - getCompilerOptions: () => options.compilerOptions, - getCommonSourceDirectory: () => ensureTrailingDirectorySeparator(options.commonSourceDirectory ?? "."), - get redirectTargetsMap(): never { - Debug.fail("redirectTargetsMap should not be used in isolated declarations"); - return undefined!; // Need return despite fail call GH#52214 - }, - directoryExists: throws, - fileExists: throws, - readFile: throws, - realpath: throws, - getLibFileFromReference: throws, - getSourceFileFromReference: throws, - isSourceOfProjectReferenceRedirect: throws, - - getSourceFiles: throws, - isEmitBlocked: throws, - getPrependNodes: throws, - writeFile: throws, - getBuildInfo: throws, - getSourceFile: throws, - getSourceFileByPath: throws, - getProjectReferenceRedirect: throws, - getFileIncludeReasons: throws, - isSourceFileFromExternalLibrary: throws, - getResolvedProjectReferenceToRedirect: throws, - }; -} - export function transpileDeclaration(sourceFile: SourceFile, transpileOptions: TranspileDeclarationsOptions): TranspileDeclarationsOutput { const compilerOptions: CompilerOptions = { ...transpileOptions.compilerOptions, isolatedDeclarations: true, traceResolution: false, }; - const emitHost = createEmitDeclarationHost(transpileOptions); + const emitHost = { + getCurrentDirectory: () => transpileOptions.currentDirectory ?? ".", + getCanonicalFileName: createGetCanonicalFileName(!!compilerOptions.useCaseSensitiveFileNames), + useCaseSensitiveFileNames: () => !!compilerOptions.useCaseSensitiveFileNames, + getCompilerOptions: () => compilerOptions.compilerOptions, + getCommonSourceDirectory: () => ensureTrailingDirectorySeparator(transpileOptions.commonSourceDirectory ?? "."), + }; const emitResolver = createEmitDeclarationResolver(sourceFile); const diagnostics: Diagnostic[] = []; const transformer = transformDeclarations({ - getEmitHost() { - return emitHost; - }, + useLocalInferenceTypePrint: true, + ...nullTransformationContext, getEmitResolver() { return emitResolver; }, getCompilerOptions() { - return emitHost.getCompilerOptions(); + return compilerOptions; }, - factory, addDiagnostic(diag: any) { diagnostics.push(diag); }, - } as TransformationContext, /*useTscEmit*/ false); + }); const result = transformer(sourceFile); const printer = createPrinter({ diff --git a/src/compiler/transformers/declarations/types.ts b/src/compiler/transformers/declarations/types.ts index 8401469892efa..4497b297ea574 100644 --- a/src/compiler/transformers/declarations/types.ts +++ b/src/compiler/transformers/declarations/types.ts @@ -1,51 +1,21 @@ import { - AccessorDeclaration, - AllAccessorDeclarations, - AnyImportSyntax, - ComputedPropertyName, - Declaration, - ElementAccessExpression, - EntityNameOrEntityNameExpression, - EnumMember, - Expression, - FunctionDeclaration, - ImportDeclaration, - LateBoundDeclaration, - Node, - ParameterDeclaration, - PropertyAccessExpression, - PropertyDeclaration, - PropertySignature, - ResolutionMode, - SignatureDeclaration, - StringLiteralLike, - Symbol, - SymbolTracker, - SymbolVisibilityResult, - VariableDeclaration, + CompilerOptions, + CoreEmitResolver, + CoreTransformationContext, + Diagnostic, + NodeFactory, } from "../../_namespaces/ts"; +/** @internal */ +export interface IsolatedTransformationContext extends CoreTransformationContext { + useLocalInferenceTypePrint: true; + getEmitResolver(): CoreEmitResolver; + getCompilerOptions(): CompilerOptions; + factory: NodeFactory; + addDiagnostic(diag: Diagnostic): void; +} + /** @internal */ export type MemberKey = string & { __memberKey: void; }; - -/** @internal */ -export interface IsolatedEmitResolver { - 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[] -} diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 6f04cdd0470e8..f6aaeedb3094f 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -5678,8 +5678,28 @@ export enum TypeReferenceSerializationKind { ObjectType, } + +/** @internal */ +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 { +export interface EmitResolver extends CoreEmitResolver { hasGlobalName(name: string): boolean; getReferencedExportContainer(node: Identifier, prefixLocals?: boolean): SourceFile | ModuleDeclaration | EnumDeclaration | undefined; getReferencedImportDeclaration(node: Identifier): Declaration | undefined; @@ -5689,41 +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; - isExpandoFunction(node: FunctionDeclaration | VariableDeclaration): 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 | EnumMember): boolean; - isLiteralComputedName(name: ComputedPropertyName): 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 diff --git a/src/compiler/visitorPublic.ts b/src/compiler/visitorPublic.ts index c5e99d170911c..2b2f8b31430ac 100644 --- a/src/compiler/visitorPublic.ts +++ b/src/compiler/visitorPublic.ts @@ -1,5 +1,6 @@ import { ConciseBody, + CoreTransformationContext, Debug, EmitFlags, Expression, @@ -99,7 +100,6 @@ import { some, Statement, SyntaxKind, - TransformationContext, Visitor, } from "./_namespaces/ts"; @@ -377,7 +377,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); @@ -388,9 +388,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) { @@ -415,7 +415,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]; @@ -431,7 +431,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): T; +export function visitEachChild(node: T, visitor: Visitor, context: CoreTransformationContext): T; /** @internal */ -export function visitEachChild(node: T, visitor: Visitor, context: TransformationContext, nodesVisitor?: NodesVisitor, tokenVisitor?: Visitor, nodeVisitor?: NodeVisitor): T; // eslint-disable-line @typescript-eslint/unified-signatures +export function visitEachChild(node: T, visitor: Visitor, context: CoreTransformationContext, 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. * @@ -590,10 +590,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, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; +export function visitEachChild(node: T | undefined, visitor: Visitor, context: CoreTransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; /** @internal */ -export function visitEachChild(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: NodesVisitor, tokenVisitor?: Visitor, nodeVisitor?: NodeVisitor): T | undefined; -export function visitEachChild(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor = visitNodes, tokenVisitor?: Visitor, nodeVisitor: NodeVisitor = visitNode): T | undefined { +export function visitEachChild(node: T | undefined, visitor: Visitor, context: CoreTransformationContext, nodesVisitor?: NodesVisitor, tokenVisitor?: Visitor, nodeVisitor?: NodeVisitor): T | undefined; +export function visitEachChild(node: T | undefined, visitor: Visitor, context: CoreTransformationContext, nodesVisitor = visitNodes, tokenVisitor?: Visitor, nodeVisitor: NodeVisitor = visitNode): T | undefined { if (node === undefined) { return undefined; } @@ -602,7 +602,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/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 8ff15c08e4a94..81890bc3694da 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -9828,32 +9828,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. @@ -9867,7 +9867,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): T; + function visitEachChild(node: T, visitor: Visitor, context: CoreTransformationContext): T; /** * Visits each child of a Node using the supplied visitor, possibly returning a new Node of the same kind in its place. * @@ -9875,7 +9875,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 | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes, tokenVisitor?: Visitor): T | undefined; + function visitEachChild(node: T | undefined, visitor: Visitor, context: CoreTransformationContext, 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[]; From 97161e08891d78fbe7f2795528acfded36bea1a5 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 13 Dec 2023 13:04:24 +0000 Subject: [PATCH 175/224] Added kind to transformation context. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/_namespaces/ts.ts | 1 - src/compiler/transformer.ts | 82 ++++++++++++------- src/compiler/transformers/declarations.ts | 7 +- .../transformers/declarations/emitBinder.ts | 6 +- .../declarations/transpileDeclaration.ts | 18 +--- .../transformers/declarations/types.ts | 21 ----- src/compiler/types.ts | 21 +++++ src/services/textChanges.ts | 4 +- 8 files changed, 89 insertions(+), 71 deletions(-) delete mode 100644 src/compiler/transformers/declarations/types.ts diff --git a/src/compiler/_namespaces/ts.ts b/src/compiler/_namespaces/ts.ts index 14eb95213c884..20fa80074efca 100644 --- a/src/compiler/_namespaces/ts.ts +++ b/src/compiler/_namespaces/ts.ts @@ -61,7 +61,6 @@ export * from "../transformers/declarations/emitBinder"; export * from "../transformers/declarations/emitResolver"; export * from "../transformers/declarations/transpileDeclaration"; export * from "../transformers/declarations/localInferenceResolver"; -export * from "../transformers/declarations/types"; export * from "../transformers/declarations"; export * from "../transformer"; export * from "../emitter"; diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index 3a37fe0f2d3f4..7187308ea8fef 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -4,11 +4,13 @@ import { Bundle, chainBundle, CompilerOptions, + CoreEmitResolver, createEmitHelperFactory, CustomTransformer, CustomTransformerFactory, CustomTransformers, Debug, + Diagnostic, DiagnosticWithLocation, disposeEmitNodes, EmitFlags, @@ -30,6 +32,7 @@ import { getUseDefineForClassFields, Identifier, isBundle, + IsolatedTransformationContext, isSourceFile, LexicalEnvironmentFlags, map, @@ -40,6 +43,7 @@ import { NodeFlags, noop, notImplemented, + NullTransformationContext, returnUndefined, ScriptTarget, setEmitFlags, @@ -49,6 +53,7 @@ import { SyntaxKind, tracing, TransformationContext, + TransformationContextKind, TransformationResult, transformClassFields, transformDeclarations, @@ -267,6 +272,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 @@ -662,33 +668,51 @@ export function transformNodes(resolver: EmitResolver | undefine } } } - /** @internal */ -export const nullTransformationContext: TransformationContext = { - factory: factory, // eslint-disable-line object-shorthand - getCompilerOptions: () => ({}), - getEmitResolver: notImplemented, - getEmitHost: notImplemented, - getEmitHelperFactory: notImplemented, - startLexicalEnvironment: noop, - resumeLexicalEnvironment: noop, - suspendLexicalEnvironment: noop, - endLexicalEnvironment: returnUndefined, - setLexicalEnvironmentFlags: noop, - getLexicalEnvironmentFlags: () => 0, - hoistVariableDeclaration: noop, - hoistFunctionDeclaration: noop, - addInitializationStatement: noop, - startBlockScope: noop, - endBlockScope: returnUndefined, - addBlockScopedVariable: noop, - requestEmitHelper: noop, - readEmitHelpers: notImplemented, - enableSubstitution: noop, - enableEmitNotification: noop, - isSubstitutionEnabled: notImplemented, - isEmitNotificationEnabled: notImplemented, - onSubstituteNode: noEmitSubstitution, - onEmitNode: noEmitNotification, - addDiagnostic: noop, -}; +export function createTransformationContext(kind: TransformationContextKind.NullContext): NullTransformationContext; +/** @internal */ +export function createTransformationContext( + kind: TransformationContextKind.IsolatedContext, + options: CompilerOptions, + diagnostics: Diagnostic[], + resolver: CoreEmitResolver, +): IsolatedTransformationContext; +export function createTransformationContext( + kind: TransformationContextKind.IsolatedContext | TransformationContextKind.NullContext, + options: CompilerOptions = {}, + diagnostics?: Diagnostic[], + resolver?: EmitResolver | CoreEmitResolver, + host?: EmitHost, +): NullTransformationContext | IsolatedTransformationContext | TransformationContext { + return { + kind, + factory: factory, // eslint-disable-line object-shorthand + getCompilerOptions: () => options, + getEmitResolver: !resolver ? notImplemented : () => resolver, + getEmitHost: !host ? notImplemented : () => host, + getEmitHelperFactory: notImplemented, + startLexicalEnvironment: noop, + resumeLexicalEnvironment: noop, + suspendLexicalEnvironment: noop, + endLexicalEnvironment: returnUndefined, + setLexicalEnvironmentFlags: noop, + getLexicalEnvironmentFlags: () => 0, + hoistVariableDeclaration: noop, + hoistFunctionDeclaration: noop, + addInitializationStatement: noop, + startBlockScope: noop, + endBlockScope: returnUndefined, + addBlockScopedVariable: noop, + requestEmitHelper: noop, + readEmitHelpers: notImplemented, + enableSubstitution: noop, + enableEmitNotification: noop, + isSubstitutionEnabled: notImplemented, + isEmitNotificationEnabled: notImplemented, + onSubstituteNode: noEmitSubstitution, + onEmitNode: noEmitNotification, + addDiagnostic: !diagnostics ? noop : (diag: Diagnostic) => diagnostics.push(diag), + }; +} +/** @internal */ +export const nullTransformationContext: NullTransformationContext = createTransformationContext(TransformationContextKind.NullContext); diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 48a063a0a5344..324a3c2d04ddf 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -220,6 +220,7 @@ import { SyntaxKind, toFileNameLowerCase, TransformationContext, + TransformationContextKind, transformNodes, tryCast, tryGetModuleSpecifierFromDeclaration, @@ -292,7 +293,7 @@ const declarationEmitNodeBuilderFlags = NodeBuilderFlags.MultilineObjectLiterals * * @internal */ -export function transformDeclarations(context: (TransformationContext & { useLocalInferenceTypePrint?: false; }) | IsolatedTransformationContext) { +export function transformDeclarations(context: TransformationContext | IsolatedTransformationContext) { const throwDiagnostic = () => Debug.fail("Diagnostic emitted without context"); let getSymbolAccessibilityDiagnostic: GetSymbolAccessibilityDiagnostic = throwDiagnostic; let needsDeclare = true; @@ -339,7 +340,7 @@ export function transformDeclarations(context: (TransformationContext & { useLoc return checkEntityNameVisibility(name, container ?? enclosingDeclaration); }, }); - if (context.useLocalInferenceTypePrint) { + 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 @@ -370,7 +371,7 @@ export function transformDeclarations(context: (TransformationContext & { useLoc } } else { - Debug.assert(!context.useLocalInferenceTypePrint); + Debug.assert(context.kind === TransformationContextKind.FullContext); const host = context.getEmitHost(); const resolver = context.getEmitResolver(); const symbolTracker: SymbolTracker = createSymbolTracker(resolver, host); diff --git a/src/compiler/transformers/declarations/emitBinder.ts b/src/compiler/transformers/declarations/emitBinder.ts index e94b4c80ba7a3..a0e76c9c45e77 100644 --- a/src/compiler/transformers/declarations/emitBinder.ts +++ b/src/compiler/transformers/declarations/emitBinder.ts @@ -62,7 +62,6 @@ import { isVarConst, isVariableDeclaration, MappedTypeNode, - MemberKey, MethodDeclaration, MethodSignature, ModifierFlags, @@ -816,6 +815,11 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { } } +/** @internal */ +export type MemberKey = string & { + __memberKey: void; +}; + /** * Gets the symbolic name for a member from its type. * @internal diff --git a/src/compiler/transformers/declarations/transpileDeclaration.ts b/src/compiler/transformers/declarations/transpileDeclaration.ts index e117840b4d4ca..cf9b09a5449dc 100644 --- a/src/compiler/transformers/declarations/transpileDeclaration.ts +++ b/src/compiler/transformers/declarations/transpileDeclaration.ts @@ -7,6 +7,7 @@ import { createPrinter, createSourceMapGenerator, createTextWriter, + createTransformationContext, Debug, Diagnostic, EmitHost, @@ -21,11 +22,11 @@ import { getSourceFilePathInNewDir, normalizePath, normalizeSlashes, - nullTransformationContext, PrinterOptions, SourceFile, SourceMapGenerator, sys, + TransformationContextKind, transformDeclarations, TranspileDeclarationsOptions, TranspileDeclarationsOutput, @@ -46,19 +47,8 @@ export function transpileDeclaration(sourceFile: SourceFile, transpileOptions: T }; const emitResolver = createEmitDeclarationResolver(sourceFile); const diagnostics: Diagnostic[] = []; - const transformer = transformDeclarations({ - useLocalInferenceTypePrint: true, - ...nullTransformationContext, - getEmitResolver() { - return emitResolver; - }, - getCompilerOptions() { - return compilerOptions; - }, - addDiagnostic(diag: any) { - diagnostics.push(diag); - }, - }); + const transformationContext = createTransformationContext(TransformationContextKind.IsolatedContext, compilerOptions, diagnostics, emitResolver); + const transformer = transformDeclarations(transformationContext); const result = transformer(sourceFile); const printer = createPrinter({ diff --git a/src/compiler/transformers/declarations/types.ts b/src/compiler/transformers/declarations/types.ts deleted file mode 100644 index 4497b297ea574..0000000000000 --- a/src/compiler/transformers/declarations/types.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { - CompilerOptions, - CoreEmitResolver, - CoreTransformationContext, - Diagnostic, - NodeFactory, -} from "../../_namespaces/ts"; - -/** @internal */ -export interface IsolatedTransformationContext extends CoreTransformationContext { - useLocalInferenceTypePrint: true; - getEmitResolver(): CoreEmitResolver; - getCompilerOptions(): CompilerOptions; - factory: NodeFactory; - addDiagnostic(diag: Diagnostic): void; -} - -/** @internal */ -export type MemberKey = string & { - __memberKey: void; -}; diff --git a/src/compiler/types.ts b/src/compiler/types.ts index f6aaeedb3094f..13d6e7ca9b62d 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -9167,7 +9167,14 @@ export const enum LexicalEnvironmentFlags { VariablesHoistedInParameters = 1 << 1, // a temp variable was hoisted while visiting a parameter list } +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. */ @@ -9209,6 +9216,7 @@ export interface CoreTransformationContext { } export interface TransformationContext extends CoreTransformationContext { + kind: TransformationContextKind.FullContext; /** @internal */ getEmitResolver(): EmitResolver; /** @internal */ getEmitHost(): EmitHost; /** @internal */ getEmitHelperFactory(): EmitHelperFactory; @@ -9258,6 +9266,19 @@ 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 CoreTransformationContext { + kind: TransformationContextKind.NullContext; +} + export interface TransformationResult { /** Gets the transformed source files. */ transformed: T[]; diff --git a/src/services/textChanges.ts b/src/services/textChanges.ts index 177e25b18d0e5..2a3a3ba7202aa 100644 --- a/src/services/textChanges.ts +++ b/src/services/textChanges.ts @@ -128,6 +128,7 @@ import { NodeArray, NodeFactoryFlags, nodeIsSynthesized, + NullTransformationContext, nullTransformationContext, ObjectLiteralElementLike, ObjectLiteralExpression, @@ -162,7 +163,6 @@ import { textSpanEnd, Token, tokenToString, - TransformationContext, TypeLiteralNode, TypeNode, TypeParameterDeclaration, @@ -1367,7 +1367,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, From a6fe9fccc1238c5eddbb3f5370be0ececd362f2b Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 13 Dec 2023 17:25:25 +0000 Subject: [PATCH 176/224] Removed traceResolution: true --- src/compiler/transformers/declarations/transpileDeclaration.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/compiler/transformers/declarations/transpileDeclaration.ts b/src/compiler/transformers/declarations/transpileDeclaration.ts index bddb4afb78989..5d58f1fd7d4ea 100644 --- a/src/compiler/transformers/declarations/transpileDeclaration.ts +++ b/src/compiler/transformers/declarations/transpileDeclaration.ts @@ -70,7 +70,6 @@ export function transpileDeclaration(sourceFile: SourceFile, transpileOptions: T const compilerOptions: CompilerOptions = { ...transpileOptions.compilerOptions, isolatedDeclarations: true, - traceResolution: false, }; const emitHost = createEmitDeclarationHost(transpileOptions); const emitResolver = createEmitDeclarationResolver(sourceFile); From f49ebd9e57dfb0f2c65ce16c15f92d296439126c Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 14 Dec 2023 11:29:18 +0000 Subject: [PATCH 177/224] Removed duplicate usage of node in fix. --- src/services/codefixes/fixMissingTypeAnnotationOnExports.ts | 4 ++-- src/services/services.ts | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index e3c625630b098..da52c3742c2f8 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -435,9 +435,9 @@ function withChanges( sourceFile, replacementTarget, factory.createAsExpression( - tempName, + factory.cloneNode(tempName), factory.createTypeQueryNode( - tempName, + factory.cloneNode(tempName), ), ), ); diff --git a/src/services/services.ts b/src/services/services.ts index 876160a21a99d..812eafd2c940e 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -508,9 +508,7 @@ function addSyntheticNodes(nodes: Node[], pos: number, end: number, parent: Node if (hasTabstop(parent)) { continue; } - // TODO: Not sure why this is here. When I try to make text change that contains only a property assigment this kicks in - // Ex: x: x - // Debug.fail(`Did not expect ${Debug.formatSyntaxKind(parent.kind)} to have an Identifier in its trivia`); + Debug.fail(`Did not expect ${Debug.formatSyntaxKind(parent.kind)} to have an Identifier in its trivia`); } nodes.push(createNode(token, pos, textPos, parent)); } From 5531cef3b13f75c10ace9c66b2498482f14347bd Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Wed, 13 Dec 2023 16:24:31 +0000 Subject: [PATCH 178/224] Support lookup for namespace when binding expando functions Signed-off-by: Hana Joo --- .../transformers/declarations/emitBinder.ts | 5 ++- .../contextualReturnTypeOfIIFE2.d.ts.diff | 33 -------------- .../dte/contextualReturnTypeOfIIFE2.d.ts | 23 ---------- .../tsc/contextualReturnTypeOfIIFE2.d.ts | 43 ------------------- .../compiler/contextualReturnTypeOfIIFE2.ts | 1 - 5 files changed, 4 insertions(+), 101 deletions(-) delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/contextualReturnTypeOfIIFE2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts diff --git a/src/compiler/transformers/declarations/emitBinder.ts b/src/compiler/transformers/declarations/emitBinder.ts index e94b4c80ba7a3..2fb3e3769cb55 100644 --- a/src/compiler/transformers/declarations/emitBinder.ts +++ b/src/compiler/transformers/declarations/emitBinder.ts @@ -213,6 +213,9 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { const memberSymbol = symbol.exports?.get(getMemberKey(name)); if (!memberSymbol || !(memberSymbol.flags & meaning)) { + if (symbol.valueDeclaration && isModuleDeclaration(symbol.valueDeclaration)) { + return getNodeLinks(symbol.valueDeclaration)?.locals?.get(getMemberKey(name)); + } return undefined; } return memberSymbol; @@ -455,7 +458,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { if (!fn) return; const parentLocals = target.parent?.valueDeclaration && getNodeLinks(target.parent.valueDeclaration).locals; - if (currentFunctionLocalSymbolTable !== parentLocals) return; + if (currentFunctionLocalSymbolTable !== parentLocals && target.parent?.valueDeclaration?.kind !== SyntaxKind.ModuleDeclaration) return; target.exports ??= new Map(); if (target.exportSymbol) { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff deleted file mode 100644 index 29ef91b84a992..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff +++ /dev/null @@ -1,33 +0,0 @@ -// [[Reason: TODO Nested access to expando function.]] //// - -//// [tests/cases/compiler/contextualReturnTypeOfIIFE2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -3,24 +3,4 @@ - //// [contextualReturnTypeOfIIFE2.d.ts] - declare namespace app { - function foo(): void; - } -- --/// [Errors] //// -- --contextualReturnTypeOfIIFE2.ts(5,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -- -- --==== contextualReturnTypeOfIIFE2.ts (1 errors) ==== -- declare namespace app { -- function foo(): void; -- } -- -- app.foo.bar = (function () { -- ~~~~~~~~~~~ --!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -- const someFun = (arg: number) => {}; -- return { someFun }; -- })(); -- -- app.foo.bar.someFun(1); -- -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/contextualReturnTypeOfIIFE2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/contextualReturnTypeOfIIFE2.d.ts deleted file mode 100644 index cea26699b7476..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/contextualReturnTypeOfIIFE2.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -//// [tests/cases/compiler/contextualReturnTypeOfIIFE2.ts] //// - -//// [contextualReturnTypeOfIIFE2.ts] -declare namespace app { - function foo(): void; -} - -app.foo.bar = (function () { - const someFun = (arg: number) => {}; - return { someFun }; -})(); - -app.foo.bar.someFun(1); - - -/// [Declarations] //// - - - -//// [contextualReturnTypeOfIIFE2.d.ts] -declare namespace app { - function foo(): void; -} diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts deleted file mode 100644 index 7c393fd9f0a13..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -//// [tests/cases/compiler/contextualReturnTypeOfIIFE2.ts] //// - -//// [contextualReturnTypeOfIIFE2.ts] -declare namespace app { - function foo(): void; -} - -app.foo.bar = (function () { - const someFun = (arg: number) => {}; - return { someFun }; -})(); - -app.foo.bar.someFun(1); - - -/// [Declarations] //// - - - -//// [contextualReturnTypeOfIIFE2.d.ts] -declare namespace app { - function foo(): void; -} - -/// [Errors] //// - -contextualReturnTypeOfIIFE2.ts(5,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - - -==== contextualReturnTypeOfIIFE2.ts (1 errors) ==== - declare namespace app { - function foo(): void; - } - - app.foo.bar = (function () { - ~~~~~~~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - const someFun = (arg: number) => {}; - return { someFun }; - })(); - - app.foo.bar.someFun(1); - \ No newline at end of file diff --git a/tests/cases/compiler/contextualReturnTypeOfIIFE2.ts b/tests/cases/compiler/contextualReturnTypeOfIIFE2.ts index 6e8a613658877..18416655bb9e5 100644 --- a/tests/cases/compiler/contextualReturnTypeOfIIFE2.ts +++ b/tests/cases/compiler/contextualReturnTypeOfIIFE2.ts @@ -1,6 +1,5 @@ // @lib: esnext // @noImplicitAny: true -// @isolatedDeclarationDiffReason: TODO Nested access to expando function. declare namespace app { function foo(): void; From 970c397feae7860360439a4af41a713ef17067d8 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Fri, 15 Dec 2023 13:06:18 +0000 Subject: [PATCH 179/224] "Update tests and remove TODOs Signed-off-by: Hana Joo --- ...arationEmitMappedTypeTemplateTypeofSymbol.d.ts.diff | 10 +++++----- .../declarationEmitReadonlyComputedProperty.d.ts.diff | 10 +++++----- .../declarationEmitMappedTypeTemplateTypeofSymbol.ts | 2 +- .../declarationEmitReadonlyComputedProperty.ts | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) 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 index 1ec0c45d78752..90e3422e10f18 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: TODO File is not auto-fixed. Symbol is not imported.]] //// +// [[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 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,9 +6,11 @@ [x.timestampSymbol]: true; }; //# sourceMappingURL=b.d.ts.map 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 index d3da2e1830366..c9d712f4aa952 100644 --- 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 @@ -1,11 +1,11 @@ -// [[Reason: TODO File is not auto-fixed. Symbol in computed property not imported.]] //// +// [[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 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,9 +7,11 @@ } export declare function createInstance(): Interface; //# sourceMappingURL=bug.d.ts.map diff --git a/tests/cases/compiler/declarationEmitMappedTypeTemplateTypeofSymbol.ts b/tests/cases/compiler/declarationEmitMappedTypeTemplateTypeofSymbol.ts index 8e3b51facccb4..b65d76f2b883f 100644 --- a/tests/cases/compiler/declarationEmitMappedTypeTemplateTypeofSymbol.ts +++ b/tests/cases/compiler/declarationEmitMappedTypeTemplateTypeofSymbol.ts @@ -1,7 +1,7 @@ // @strict: true // @declaration: true // @filename: a.d.ts -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed. Symbol is not imported. +// @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/declarationEmitReadonlyComputedProperty.ts b/tests/cases/compiler/declarationEmitReadonlyComputedProperty.ts index e30fc23bec3b0..c39fcb6fa664e 100644 --- a/tests/cases/compiler/declarationEmitReadonlyComputedProperty.ts +++ b/tests/cases/compiler/declarationEmitReadonlyComputedProperty.ts @@ -1,6 +1,6 @@ // @declaration: true // @lib: es2015 -// @isolatedDeclarationFixedDiffReason: TODO File is not auto-fixed. Symbol in computed property not imported. +// @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() From c45ffaff0261844c13b0c08483d627f5c8dc1e8c Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 2 Jan 2024 11:27:59 +0000 Subject: [PATCH 180/224] Addressed code review. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/transformer.ts | 69 +++++-------------- .../declarations/transpileDeclaration.ts | 11 ++- src/compiler/types.ts | 5 +- 3 files changed, 30 insertions(+), 55 deletions(-) diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index 7187308ea8fef..9c4cc9ac9fd7a 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -4,13 +4,11 @@ import { Bundle, chainBundle, CompilerOptions, - CoreEmitResolver, createEmitHelperFactory, CustomTransformer, CustomTransformerFactory, CustomTransformers, Debug, - Diagnostic, DiagnosticWithLocation, disposeEmitNodes, EmitFlags, @@ -32,7 +30,6 @@ import { getUseDefineForClassFields, Identifier, isBundle, - IsolatedTransformationContext, isSourceFile, LexicalEnvironmentFlags, map, @@ -42,7 +39,6 @@ import { NodeFactory, NodeFlags, noop, - notImplemented, NullTransformationContext, returnUndefined, ScriptTarget, @@ -668,51 +664,22 @@ export function transformNodes(resolver: EmitResolver | undefine } } } + /** @internal */ -export function createTransformationContext(kind: TransformationContextKind.NullContext): NullTransformationContext; -/** @internal */ -export function createTransformationContext( - kind: TransformationContextKind.IsolatedContext, - options: CompilerOptions, - diagnostics: Diagnostic[], - resolver: CoreEmitResolver, -): IsolatedTransformationContext; -export function createTransformationContext( - kind: TransformationContextKind.IsolatedContext | TransformationContextKind.NullContext, - options: CompilerOptions = {}, - diagnostics?: Diagnostic[], - resolver?: EmitResolver | CoreEmitResolver, - host?: EmitHost, -): NullTransformationContext | IsolatedTransformationContext | TransformationContext { - return { - kind, - factory: factory, // eslint-disable-line object-shorthand - getCompilerOptions: () => options, - getEmitResolver: !resolver ? notImplemented : () => resolver, - getEmitHost: !host ? notImplemented : () => host, - getEmitHelperFactory: notImplemented, - startLexicalEnvironment: noop, - resumeLexicalEnvironment: noop, - suspendLexicalEnvironment: noop, - endLexicalEnvironment: returnUndefined, - setLexicalEnvironmentFlags: noop, - getLexicalEnvironmentFlags: () => 0, - hoistVariableDeclaration: noop, - hoistFunctionDeclaration: noop, - addInitializationStatement: noop, - startBlockScope: noop, - endBlockScope: returnUndefined, - addBlockScopedVariable: noop, - requestEmitHelper: noop, - readEmitHelpers: notImplemented, - enableSubstitution: noop, - enableEmitNotification: noop, - isSubstitutionEnabled: notImplemented, - isEmitNotificationEnabled: notImplemented, - onSubstituteNode: noEmitSubstitution, - onEmitNode: noEmitNotification, - addDiagnostic: !diagnostics ? noop : (diag: Diagnostic) => diagnostics.push(diag), - }; -} -/** @internal */ -export const nullTransformationContext: NullTransformationContext = createTransformationContext(TransformationContextKind.NullContext); +export const nullTransformationContext: NullTransformationContext = { + kind: TransformationContextKind.NullContext, + factory: factory, // eslint-disable-line object-shorthand + getCompilerOptions: () => ({}), + startLexicalEnvironment: noop, + resumeLexicalEnvironment: noop, + suspendLexicalEnvironment: noop, + endLexicalEnvironment: returnUndefined, + setLexicalEnvironmentFlags: noop, + getLexicalEnvironmentFlags: () => 0, + hoistVariableDeclaration: noop, + hoistFunctionDeclaration: noop, + addInitializationStatement: noop, + startBlockScope: noop, + endBlockScope: returnUndefined, + addBlockScopedVariable: noop, +}; diff --git a/src/compiler/transformers/declarations/transpileDeclaration.ts b/src/compiler/transformers/declarations/transpileDeclaration.ts index cf9b09a5449dc..828de3cf9dbfa 100644 --- a/src/compiler/transformers/declarations/transpileDeclaration.ts +++ b/src/compiler/transformers/declarations/transpileDeclaration.ts @@ -7,7 +7,6 @@ import { createPrinter, createSourceMapGenerator, createTextWriter, - createTransformationContext, Debug, Diagnostic, EmitHost, @@ -20,8 +19,10 @@ import { getRelativePathToDirectoryOrUrl, getRootLength, getSourceFilePathInNewDir, + IsolatedTransformationContext, normalizePath, normalizeSlashes, + nullTransformationContext, PrinterOptions, SourceFile, SourceMapGenerator, @@ -47,7 +48,13 @@ export function transpileDeclaration(sourceFile: SourceFile, transpileOptions: T }; const emitResolver = createEmitDeclarationResolver(sourceFile); const diagnostics: Diagnostic[] = []; - const transformationContext = createTransformationContext(TransformationContextKind.IsolatedContext, compilerOptions, diagnostics, emitResolver); + const transformationContext: IsolatedTransformationContext = { + ...nullTransformationContext, + kind: TransformationContextKind.IsolatedContext, + getCompilerOptions: () => compilerOptions, + addDiagnostic: diag => diagnostics.push(diag), + getEmitResolver: () => emitResolver, + }; const transformer = transformDeclarations(transformationContext); const result = transformer(sourceFile); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 13d6e7ca9b62d..c786c2ee5fa78 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -5696,7 +5696,7 @@ export interface CoreEmitResolver { getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): string | number | undefined; getAllAccessorDeclarations(declaration: AccessorDeclaration): AllAccessorDeclarations; tryFindAmbientModule(moduleReferenceExpression: Expression): Symbol | undefined; - getPropertiesOfContainerFunction(node: FunctionDeclaration | VariableDeclaration): Symbol[] + getPropertiesOfContainerFunction(node: FunctionDeclaration | VariableDeclaration): Symbol[]; } /** @internal */ export interface EmitResolver extends CoreEmitResolver { @@ -9167,6 +9167,7 @@ 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, @@ -9216,7 +9217,7 @@ export interface CoreTransformationContext { } export interface TransformationContext extends CoreTransformationContext { - kind: TransformationContextKind.FullContext; + /** @internal */ kind: TransformationContextKind.FullContext; /** @internal */ getEmitResolver(): EmitResolver; /** @internal */ getEmitHost(): EmitHost; /** @internal */ getEmitHelperFactory(): EmitHelperFactory; From fcfb698ada40dc74a5d15127863a6c23bc33b7d1 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 7 Dec 2023 22:26:46 +0000 Subject: [PATCH 181/224] Improve expando function errors. Signed-off-by: Titian Cernicova-Dragomir --- .../declarations/localInferenceResolver.ts | 38 +++++++++---- .../fixMissingTypeAnnotationOnExports.ts | 48 +++++++++++++--- src/testRunner/compilerRunner.ts | 2 +- src/testRunner/parallel/host.ts | 2 +- .../diff/isolatedDeclarationErrors.d.ts.diff | 50 ++++++++++++++++ .../dte/isolatedDeclarationErrors.d.ts | 57 +++++++++++++++++++ .../tsc/isolatedDeclarationErrors.d.ts | 37 ++++++++++++ .../diff/isolatedDeclarationErrors.d.ts.diff | 21 +++++++ .../dte/isolatedDeclarationErrors.d.ts | 33 +++++++++++ .../tsc/isolatedDeclarationErrors.d.ts | 36 ++++++++++++ .../isolatedDeclarationErrors.errors.txt | 24 ++++++++ .../reference/isolatedDeclarationErrors.js | 20 +++++++ .../isolatedDeclarationErrors.symbols | 27 +++++++++ .../reference/isolatedDeclarationErrors.types | 35 ++++++++++++ .../compiler/isolatedDeclarationErrors.ts | 13 +++++ ...notationOnExports47-expando-functions-2.ts | 23 ++++++++ ...AnnotationOnExports47-expando-functions.ts | 23 ++++++++ 17 files changed, 469 insertions(+), 20 deletions(-) create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationErrors.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrors.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrors.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrors.d.ts create mode 100644 tests/baselines/reference/isolatedDeclarationErrors.errors.txt create mode 100644 tests/baselines/reference/isolatedDeclarationErrors.js create mode 100644 tests/baselines/reference/isolatedDeclarationErrors.symbols create mode 100644 tests/baselines/reference/isolatedDeclarationErrors.types create mode 100644 tests/cases/compiler/isolatedDeclarationErrors.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports47-expando-functions-2.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports47-expando-functions.ts diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 64fb78caf2acd..0c6a443e14061 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -7,6 +7,7 @@ import { Debug, DiagnosticMessage, Diagnostics, + DiagnosticWithLocation, EntityNameOrEntityNameExpression, ExportAssignment, FunctionExpression, @@ -18,10 +19,12 @@ import { HasInferredType, hasSyntacticModifier, Identifier, + isBinaryExpression, isClassExpression, isComputedPropertyName, isConstTypeReference, isEntityNameExpression, + isExpandoPropertyDeclaration, isExportAssignment, isGetAccessor, isIdentifier, @@ -158,17 +161,21 @@ export function createLocalInferenceResolver({ function hasParseError(node: Node) { return !!(node.flags & NodeFlags.ThisNodeHasError); } - function reportIsolatedDeclarationError(node: Node, diagMessage: DiagnosticMessage = Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit) { + 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 reportIsolatedDeclarationError(node: Node, diagMessage: DiagnosticMessage = Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit) { const message = createDiagnosticForNode( node, diagMessage, ); - context.addDiagnostic(message); + reportError(node, message); } function makeInvalidType() { @@ -659,17 +666,28 @@ export function createLocalInferenceResolver({ localType = visitNode(type, visitDeclarationSubtree, isTypeNode)!; } else if (node.initializer) { - if (resolver.isExpandoFunction(node)) { - context.addDiagnostic(createDiagnosticForNode( - node, - Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function, - )); - localType = invalid(node); - } - else if (isClassExpression(node.initializer)) { + if (isClassExpression(node.initializer)) { localType = invalid(node.initializer, Diagnostics.Declaration_emit_for_class_expressions_are_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, + ), + ); + } + }); + } localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals : NarrowBehavior.None); } } diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index e3c625630b098..9a86995dd15f2 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -2,6 +2,7 @@ import { ArrayBindingPattern, ArrayLiteralExpression, AssertionExpression, + BinaryExpression, BindingElement, BindingPattern, ClassDeclaration, @@ -10,10 +11,12 @@ import { CodeFixContext, createPrinter, Debug, + Declaration, defaultMaximumTruncationLength, DiagnosticAndArguments, DiagnosticOrDiagnosticAndArguments, Diagnostics, + ElementAccessExpression, EmitFlags, EmitHint, EntityName, @@ -34,6 +37,7 @@ import { isArrayBindingPattern, isArrayLiteralExpression, isAssertionExpression, + isBinaryExpression, isBindingPattern, isCallExpression, isComputedPropertyName, @@ -42,7 +46,9 @@ import { isDeclaration, isEntityNameExpression, isEnumMember, + isExpandoPropertyDeclaration, isExpression, + isFunctionExpressionOrArrowFunction, isHeritageClause, isIdentifier, isIdentifierText, @@ -69,10 +75,12 @@ import { ObjectBindingPattern, ObjectLiteralExpression, ParameterDeclaration, + PropertyAccessExpression, PropertyDeclaration, PropertyName, setEmitFlags, SignatureDeclaration, + some, SourceFile, SpreadAssignment, SpreadElement, @@ -209,7 +217,7 @@ function withChanges( function addFullAnnotation(span: TextSpan) { const nodeWithDiag = getTokenAtPosition(sourceFile, span.start); - const nodeWithNoType = findNearestParentWithTypeAnnotation(nodeWithDiag); + const nodeWithNoType = findNearestParentWithTypeAnnotation(nodeWithDiag) ?? findExpandoFunction(nodeWithDiag); if (nodeWithNoType) { return fixupForIsolatedDeclarations(nodeWithNoType); } @@ -231,6 +239,9 @@ function withChanges( 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) as Expression; if (!targetNode || isValueSignatureDeclaration(targetNode) || isValueSignatureDeclaration(targetNode.parent)) return; const isExpressionTarget = isExpression(targetNode); @@ -458,14 +469,35 @@ function withChanges( // 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 { - while ( - node && - (((isObjectBindingPattern(node) || isArrayBindingPattern(node)) && - !isVariableDeclaration(node.parent)) || !canHaveExplicitTypeAnnotation.has(node.kind)) - ) { - node = node.parent; + 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 node; + return undefined; } /** diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 25fa90403dd7a..55498c32fa3c1 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -693,7 +693,7 @@ class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest { const fixedTest = existingTransformedTest && TestCaseParser.makeUnitsFromTest(existingTransformedTest, compilerEnvironment.fileName); let transformSucceeded = true; let hasReferenceDirectiveErrors = false; - if (fixedTest && fixedTest.settings.hash === hash) { + if (fixedTest && fixedTest.settings.hash === hash + "!") { transformSucceeded = fixedTest.settings.succeeded !== "false"; hasReferenceDirectiveErrors = fixedTest.settings.hasReferenceDirectiveErrors !== "false"; if (transformSucceeded) { diff --git a/src/testRunner/parallel/host.ts b/src/testRunner/parallel/host.ts index 126e06cff4e4a..035fc21f46652 100644 --- a/src/testRunner/parallel/host.ts +++ b/src/testRunner/parallel/host.ts @@ -34,7 +34,7 @@ export function start() { const readline = require("readline") as typeof import("readline"); const os = require("os") as typeof import("os"); const tty = require("tty") as typeof import("tty"); - const isatty = tty.isatty(1) && tty.isatty(2); + const isatty = (tty.isatty(1) && tty.isatty(2)) || !process.env.IS_TTY; const path = require("path") as typeof import("path"); const { fork } = require("child_process") as typeof import("child_process"); const { statSync } = require("fs") as typeof import("fs"); 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..ee6bf6ba3e74d --- /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 TS9009: 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 TS9009: 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; ++ } = () => {} ++ errorOnMissingReturn.a = ""; ++ +\ No newline at end of file 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..fd9cd632d6243 --- /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; +} = () => {} +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 TS9009: 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 TS9009: 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; + } = () => {} + errorOnMissingReturn.a = ""; + \ No newline at end of file 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..826924af9f6e2 --- /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; +} = () => {} +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/original/diff/isolatedDeclarationErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrors.d.ts.diff new file mode 100644 index 0000000000000..708a5a4d22af3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrors.d.ts.diff @@ -0,0 +1,21 @@ +// [[Reason: undefined]] //// + +//// [tests/cases/compiler/isolatedDeclarationErrors.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,12 +1,9 @@ + + + //// [isolatedDeclarationErrors.d.ts] + declare function Foo(): void; +-declare const fn: { +- (): void; +- a: string; +-}; ++declare const fn: invalid; + + /// [Errors] //// + + isolatedDeclarationErrors.ts(2,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrors.d.ts new file mode 100644 index 0000000000000..46bd678e31efa --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrors.d.ts @@ -0,0 +1,33 @@ +//// [tests/cases/compiler/isolatedDeclarationErrors.ts] //// + +//// [isolatedDeclarationErrors.ts] +function Foo(): void {} +Foo.a = ""; + +const fn = (): void => {} +fn.a = ""; + +/// [Declarations] //// + + + +//// [isolatedDeclarationErrors.d.ts] +declare function Foo(): void; +declare const fn: invalid; + +/// [Errors] //// + +isolatedDeclarationErrors.ts(2,1): error TS9009: 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 TS9009: 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 (2 errors) ==== + function Foo(): void {} + Foo.a = ""; + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + const fn = (): void => {} + fn.a = ""; + ~~~~ +!!! error TS9009: 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/original/tsc/isolatedDeclarationErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrors.d.ts new file mode 100644 index 0000000000000..7b23bb67de42b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrors.d.ts @@ -0,0 +1,36 @@ +//// [tests/cases/compiler/isolatedDeclarationErrors.ts] //// + +//// [isolatedDeclarationErrors.ts] +function Foo(): void {} +Foo.a = ""; + +const fn = (): void => {} +fn.a = ""; + +/// [Declarations] //// + + + +//// [isolatedDeclarationErrors.d.ts] +declare function Foo(): void; +declare const fn: { + (): void; + a: string; +}; + +/// [Errors] //// + +isolatedDeclarationErrors.ts(2,1): error TS9009: 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 TS9009: 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 (2 errors) ==== + function Foo(): void {} + Foo.a = ""; + ~~~~~ +!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + + const fn = (): void => {} + fn.a = ""; + ~~~~ +!!! error TS9009: 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.errors.txt b/tests/baselines/reference/isolatedDeclarationErrors.errors.txt new file mode 100644 index 0000000000000..f8bb1b30fd8ae --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrors.errors.txt @@ -0,0 +1,24 @@ +isolatedDeclarationErrors.ts(2,1): error TS9009: 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 TS9009: 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +isolatedDeclarationErrors.ts(8,1): error TS9009: 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 TS9009: 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 TS9009: 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + errorOnMissingReturn.a = ""; + ~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9009: 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/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/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 From 66b6ac1acb45a29b98718a4d9de04e7ab6e70c72 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 8 Dec 2023 16:32:33 +0000 Subject: [PATCH 182/224] Improved return type errors. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/diagnosticMessages.json | 20 + .../declarations/localInferenceResolver.ts | 31 +- src/harness/isolatedDeclarationFixer.ts | 11 +- .../fixMissingTypeAnnotationOnExports.ts | 8 +- src/testRunner/compilerRunner.ts | 25 +- ...mitWithInvalidPackageJsonTypings.d.ts.diff | 8 +- ...rtsSpecifierGenerationConditions.d.ts.diff | 8 +- ...tionEmitWithInvalidPackageJsonTypings.d.ts | 6 +- ...sExportsSpecifierGenerationConditions.d.ts | 6 +- .../capturedParametersInInitializers1.d.ts | 12 +- .../dte/generatedContextualTyping.d.ts | 144 ++- ...nericTypeReferenceWithoutTypeArgument.d.ts | 6 +- ...ericTypeReferenceWithoutTypeArgument2.d.ts | 6 +- .../dte/noUncheckedIndexedAccess.d.ts | 6 +- .../dte/objectLiteralGettersAndSetters.d.ts | 12 +- ...ingDestructuredPropertyInFunctionType.d.ts | 30 +- .../capturedParametersInInitializers1.d.ts | 12 +- .../tsc/generatedContextualTyping.d.ts | 144 ++- ...nericTypeReferenceWithoutTypeArgument.d.ts | 6 +- ...ericTypeReferenceWithoutTypeArgument2.d.ts | 6 +- .../tsc/noUncheckedIndexedAccess.d.ts | 6 +- .../tsc/objectLiteralGettersAndSetters.d.ts | 12 +- ...ingDestructuredPropertyInFunctionType.d.ts | 30 +- .../isolatedDeclarationErrors.errors.txt | 6 +- ...tedDeclarationErrorsReturnTypes.errors.txt | 631 +++++++++++++ .../isolatedDeclarationErrorsReturnTypes.js | 363 ++++++++ ...olatedDeclarationErrorsReturnTypes.symbols | 557 +++++++++++ ...isolatedDeclarationErrorsReturnTypes.types | 880 ++++++++++++++++++ .../isolatedDeclarationErrorsReturnTypes.ts | 207 ++++ 29 files changed, 3022 insertions(+), 177 deletions(-) create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.errors.txt create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.js create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.symbols create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.types create mode 100644 tests/cases/compiler/isolatedDeclarationErrorsReturnTypes.ts diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index b1fa47527d0a5..f0278013f8d7f 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -6726,6 +6726,26 @@ "category": "Error", "code": 9006 }, + "Function must have an explicit type annotation with with --isolatedDeclarations": { + "category": "Error", + "code": 9507 + }, + "Add a type annotation to the variable {0}": { + "category": "Error", + "code": 9600 + }, + "Add a type annotation to the parameter {0}": { + "category": "Error", + "code": 9601 + }, + "Add a type annotation to the property {0}": { + "category": "Error", + "code": 9602 + }, + "Add a return type to the function expression": { + "category": "Error", + "code": 9603 + }, "Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit.": { "category": "Error", "code": 9007 diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 0c6a443e14061..38bfb4fb0c807 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -1,4 +1,5 @@ import { + addRelatedInfo, ArrayLiteralExpression, ArrowFunction, AsExpression, @@ -10,12 +11,14 @@ import { DiagnosticWithLocation, EntityNameOrEntityNameExpression, ExportAssignment, + findAncestor, FunctionExpression, GetAccessorDeclaration, getCommentRange, getEmitScriptTarget, getMemberKeyFromElement, getNameOfDeclaration, + getTextOfNode, HasInferredType, hasSyntacticModifier, Identifier, @@ -69,6 +72,7 @@ import { ParameterDeclaration, ParenthesizedExpression, PrefixUnaryExpression, + PropertyDeclaration, PropertyName, SetAccessorDeclaration, setCommentRange, @@ -81,6 +85,7 @@ import { TypeElement, TypeNode, unescapeLeadingUnderscores, + VariableDeclaration, visitEachChild, visitNode, visitNodes, @@ -96,6 +101,12 @@ enum NarrowBehavior { NotKeepLiterals = ~KeepLiterals, } +const errorByDeclarationKind = { + [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, +} satisfies Partial>; + /** * @internal */ @@ -199,6 +210,17 @@ export function createLocalInferenceResolver({ return { getAccessorType, setAccessorType }; } + + function createReturnTypeError(node: FunctionExpression | ArrowFunction) { + const diag = createDiagnosticForNode(node, Diagnostics.Function_must_have_an_explicit_type_annotation_with_with_isolatedDeclarations); + const parentDeclaration = findAncestor(node, (n): n is VariableDeclaration | PropertyDeclaration | ParameterDeclaration => isVariableDeclaration(n) || isPropertyDeclaration(n) || isParameter(n)); + if (parentDeclaration) { + const targetStr = getTextOfNode(parentDeclaration.name, /*includeTrivia*/ false); + addRelatedInfo(diag, createDiagnosticForNode(parentDeclaration, errorByDeclarationKind[parentDeclaration.kind], targetStr)); + } + addRelatedInfo(diag, createDiagnosticForNode(node, Diagnostics.Add_a_return_type_to_the_function_expression)); + return diag; + } function localInference(node: Node, inferenceFlags: NarrowBehavior = NarrowBehavior.None): TypeNode { switch (node.kind) { case SyntaxKind.ParenthesizedExpression: @@ -221,7 +243,8 @@ export function createLocalInferenceResolver({ const fnNode = node as FunctionExpression | ArrowFunction; const oldEnclosingDeclaration = setEnclosingDeclarations(node); try { - const returnType = visitTypeAndClone(fnNode.type, fnNode); + const returnType = !fnNode.type ? invalid(fnNode, createReturnTypeError(fnNode)) : + visitTypeAndClone(fnNode.type, fnNode); const fnTypeNode = factory.createFunctionTypeNode( visitNodes(fnNode.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone), fnNode.parameters.map(p => deepClone(ensureParameter(p))), @@ -330,8 +353,8 @@ export function createLocalInferenceResolver({ return invalid(node); } - function invalid(sourceNode: Node, diagMessage = Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit): TypeNode { - reportIsolatedDeclarationError(sourceNode, diagMessage); + function invalid(sourceNode: Node, diagMessage: DiagnosticWithLocation = createDiagnosticForNode(sourceNode, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit)): TypeNode { + reportError(sourceNode, diagMessage); return makeInvalidType(); } function getTypeForObjectLiteralExpression(objectLiteral: ObjectLiteralExpression, inferenceFlags: NarrowBehavior) { @@ -667,7 +690,7 @@ export function createLocalInferenceResolver({ } else if (node.initializer) { if (isClassExpression(node.initializer)) { - localType = invalid(node.initializer, Diagnostics.Declaration_emit_for_class_expressions_are_not_supported_with_isolatedDeclarations); + localType = invalid(node.initializer, createDiagnosticForNode(node.initializer, Diagnostics.Declaration_emit_for_class_expressions_are_not_supported_with_isolatedDeclarations)); } else { if (resolver.isExpandoFunction(node)) { diff --git a/src/harness/isolatedDeclarationFixer.ts b/src/harness/isolatedDeclarationFixer.ts index 0bc55da2e4d22..619c0cdecc8ff 100644 --- a/src/harness/isolatedDeclarationFixer.ts +++ b/src/harness/isolatedDeclarationFixer.ts @@ -3,11 +3,12 @@ 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_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.code, - ts.Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit.code, - 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.code, - ts.Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode.code, -]); + ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit, + ts.Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit, + 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_in_isolated_declaration_mode, + ts.Diagnostics.Function_must_have_an_explicit_type_annotation_with_with_isolatedDeclarations, +].map(d => d.code)); export function fixTestFiles( fs: vfs.FileSystem, diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 9a86995dd15f2..b248a90255200 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -109,9 +109,11 @@ const addAnnotationFix = "add-annotation"; const addInlineTypeAssertion = "add-type-assertion"; const extractExpression = "extract-expression"; const errorCodes = [ - Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.code, - Diagnostics.Assigning_properties_to_functions_without_declaring_them_is_not_supported_with_isolatedDeclarations_Add_an_explicit_declaration_for_the_properties_assigned_to_this_function.code, -]; + Diagnostics.Function_must_have_an_explicit_type_annotation_with_with_isolatedDeclarations, + Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit, + 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, diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 55498c32fa3c1..3af125d167505 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -495,7 +495,9 @@ class IsolatedDeclarationTest extends CompilerTestBase { } delete clonedOptions.outFile; delete clonedOptions.out; - delete clonedOptions.declarationMap; + if (clonedOptions.declarationMap !== false) { + delete clonedOptions.declarationMap; + } const clonedSettings: TestCaseParser.CompilerSettings = { ...compilerEnvironment.testCaseContent.settings, @@ -507,7 +509,9 @@ class IsolatedDeclarationTest extends CompilerTestBase { skipLibCheck: "true", }; delete clonedSettings.outFile; - delete clonedSettings.declarationMap; + if (clonedSettings.declarationMap !== "false") { + delete clonedSettings.declarationMap; + } delete clonedSettings.outfile; delete clonedSettings.out; @@ -574,12 +578,13 @@ class IsolatedDeclarationTest extends CompilerTestBase { }); } private static dteDiagnosticErrors = new Set([ - ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit.code, - ts.Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit.code, - 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.code, - ts.Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode.code, - ts.Diagnostics.Declaration_emit_for_class_expressions_are_not_supported_with_isolatedDeclarations.code, - ]); + ts.Diagnostics.Function_must_have_an_explicit_type_annotation_with_with_isolatedDeclarations, + ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit, + ts.Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit, + 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_in_isolated_declaration_mode, + ts.Diagnostics.Declaration_emit_for_class_expressions_are_not_supported_with_isolatedDeclarations, + ].map(d => d.code)); protected get baselinePath() { return "isolated-declarations/original"; } @@ -684,7 +689,9 @@ class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest { } env.compilerOptions.isolatedDeclarations = false; - env.compilerOptions.declarationMap = true; + if (env.compilerOptions.declarationMap === undefined) { + env.compilerOptions.declarationMap = true; + } env.compilerOptions.forceDtsEmit = false; const autoFixCacheTest = ts.combinePaths("tests/auto-fixed", compilerEnvironment.configuredName); 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 index 9214477f1c60b..87ac77abd7d96 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -4,6 +4,37 @@ +@@ -4,6 +4,39 @@ export interface MutableRefObject { current: T; } @@ -17,7 +17,7 @@ +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + -+/p1/index.ts(7,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++/p1/index.ts(7,29): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations + + +==== /p1/node_modules/csv-parse/lib/index.d.ts (0 errors) ==== @@ -41,7 +41,9 @@ + } + export const useCsvParser = () => { + ~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations ++!!! related TS9600 /p1/index.ts:7:14: Add a type annotation to the variable useCsvParser ++!!! related TS9603 /p1/index.ts:7:29: Add a return type to the function expression + const parserRef = useRef(null); + return parserRef; + }; 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 index 7dc46a7529d14..ff789ee14c654 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,5 +1,42 @@ +@@ -1,5 +1,44 @@ //// [index.d.ts] @@ -16,13 +16,15 @@ +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + -+index.ts(1,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++index.ts(1,18): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations + + +==== index.ts (1 errors) ==== + export const a = async () => (await import("inner")).x(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations ++!!! related TS9600 index.ts:1:14: Add a type annotation to the variable a ++!!! related TS9603 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) ==== 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 index ab256c24c9e6d..a7069f94ae6be 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithInvalidPackageJsonTypings.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithInvalidPackageJsonTypings.d.ts @@ -38,7 +38,7 @@ export declare const useCsvParser: () => invalid; //# sourceMappingURL=index.d.ts.map /// [Errors] //// -/p1/index.ts(7,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/p1/index.ts(7,29): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations ==== /p1/node_modules/csv-parse/lib/index.d.ts (0 errors) ==== @@ -62,7 +62,9 @@ export declare const useCsvParser: () => invalid; } export const useCsvParser = () => { ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 /p1/index.ts:7:14: Add a type annotation to the variable useCsvParser +!!! related TS9603 /p1/index.ts:7:29: Add a return type to the function expression const parserRef = useRef(null); return parserRef; }; 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 index 23da985796e55..2b86ea606575c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts @@ -40,13 +40,15 @@ export declare const a: () => invalid; //# sourceMappingURL=index.d.ts.map /// [Errors] //// -index.ts(1,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +index.ts(1,18): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations ==== index.ts (1 errors) ==== export const a = async () => (await import("inner")).x(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 index.ts:1:14: Add a type annotation to the variable a +!!! related TS9603 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) ==== diff --git a/tests/baselines/reference/isolated-declarations/original/dte/capturedParametersInInitializers1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/capturedParametersInInitializers1.d.ts index 78cf630265b5d..6c40e5db455e3 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/capturedParametersInInitializers1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/capturedParametersInInitializers1.d.ts @@ -65,7 +65,7 @@ declare function foo9(y?: invalid, z?: number): invalid; capturedParametersInInitializers1.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. capturedParametersInInitializers1.ts(2,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. capturedParametersInInitializers1.ts(7,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(7,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(7,19): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations capturedParametersInInitializers1.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. capturedParametersInInitializers1.ts(13,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. capturedParametersInInitializers1.ts(18,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -75,7 +75,7 @@ capturedParametersInInitializers1.ts(22,10): error TS9007: Declaration emit for capturedParametersInInitializers1.ts(22,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. capturedParametersInInitializers1.ts(22,26): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. capturedParametersInInitializers1.ts(26,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(26,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(26,19): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations capturedParametersInInitializers1.ts(30,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. capturedParametersInInitializers1.ts(30,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. capturedParametersInInitializers1.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -100,7 +100,9 @@ capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot ~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 capturedParametersInInitializers1.ts:7:15: Add a type annotation to the parameter y +!!! related TS9603 capturedParametersInInitializers1.ts:7:19: Add a return type to the function expression } @@ -139,7 +141,9 @@ capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot ~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 capturedParametersInInitializers1.ts:26:15: Add a type annotation to the parameter y +!!! related TS9603 capturedParametersInInitializers1.ts:26:19: Add a return type to the function expression } // ok - used inside immediately invoked generator function diff --git a/tests/baselines/reference/isolated-declarations/original/dte/generatedContextualTyping.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/generatedContextualTyping.d.ts index 8acb2214d226e..52ac989ea1c2c 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/generatedContextualTyping.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/generatedContextualTyping.d.ts @@ -1321,30 +1321,30 @@ generatedContextualTyping.ts(327,10): error TS9007: Declaration emit for this fi generatedContextualTyping.ts(328,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. generatedContextualTyping.ts(329,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. generatedContextualTyping.ts(330,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(331,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(332,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(333,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(334,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(335,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(336,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(337,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(338,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(339,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(340,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(341,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(342,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(343,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(344,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(345,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(346,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(347,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(348,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(349,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(350,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(351,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(352,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(353,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(354,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(331,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(332,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(333,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(334,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(335,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(336,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(337,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(338,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(339,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(340,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(341,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(342,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(343,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(344,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(345,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(346,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(347,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(348,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(349,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(350,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(351,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(352,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(353,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(354,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations ==== generatedContextualTyping.ts (59 errors) ==== @@ -1750,73 +1750,121 @@ generatedContextualTyping.ts(354,12): error TS9007: Declaration emit for this fi !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. var x333 = (n: () => Base[]) => n; x333(() => [d1, d2]); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:331:5: Add a type annotation to the variable x333 +!!! related TS9603 generatedContextualTyping.ts:331:12: Add a return type to the function expression var x334 = (n: () => Base[]) => n; x334(function() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:332:5: Add a type annotation to the variable x334 +!!! related TS9603 generatedContextualTyping.ts:332:12: Add a return type to the function expression var x335 = (n: () => Base[]) => n; x335(function named() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:333:5: Add a type annotation to the variable x335 +!!! related TS9603 generatedContextualTyping.ts:333:12: Add a return type to the function expression var x336 = (n: { (): Base[]; }) => n; x336(() => [d1, d2]); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:334:5: Add a type annotation to the variable x336 +!!! related TS9603 generatedContextualTyping.ts:334:12: Add a return type to the function expression var x337 = (n: { (): Base[]; }) => n; x337(function() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:335:5: Add a type annotation to the variable x337 +!!! related TS9603 generatedContextualTyping.ts:335:12: Add a return type to the function expression var x338 = (n: { (): Base[]; }) => n; x338(function named() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:336:5: Add a type annotation to the variable x338 +!!! related TS9603 generatedContextualTyping.ts:336:12: Add a return type to the function expression var x339 = (n: Base[]) => n; x339([d1, d2]); ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:337:5: Add a type annotation to the variable x339 +!!! related TS9603 generatedContextualTyping.ts:337:12: Add a return type to the function expression var x340 = (n: Array) => n; x340([d1, d2]); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:338:5: Add a type annotation to the variable x340 +!!! related TS9603 generatedContextualTyping.ts:338:12: Add a return type to the function expression var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:339:5: Add a type annotation to the variable x341 +!!! related TS9603 generatedContextualTyping.ts:339:12: Add a return type to the function expression var x342 = (n: {n: Base[]; } ) => n; x342({ n: [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:340:5: Add a type annotation to the variable x342 +!!! related TS9603 generatedContextualTyping.ts:340:12: Add a return type to the function expression var x343 = (n: (s: Base[]) => any) => n; x343(n => { var n: Base[]; return null; }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:341:5: Add a type annotation to the variable x343 +!!! related TS9603 generatedContextualTyping.ts:341:12: Add a return type to the function expression var x344 = (n: Genric) => n; x344({ func: n => { return [d1, d2]; } }); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:342:5: Add a type annotation to the variable x344 +!!! related TS9603 generatedContextualTyping.ts:342:12: Add a return type to the function expression var x345 = function(n: () => Base[]) { }; x345(() => [d1, d2]); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:343:5: Add a type annotation to the variable x345 +!!! related TS9603 generatedContextualTyping.ts:343:12: Add a return type to the function expression var x346 = function(n: () => Base[]) { }; x346(function() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:344:5: Add a type annotation to the variable x346 +!!! related TS9603 generatedContextualTyping.ts:344:12: Add a return type to the function expression var x347 = function(n: () => Base[]) { }; x347(function named() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:345:5: Add a type annotation to the variable x347 +!!! related TS9603 generatedContextualTyping.ts:345:12: Add a return type to the function expression var x348 = function(n: { (): Base[]; }) { }; x348(() => [d1, d2]); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:346:5: Add a type annotation to the variable x348 +!!! related TS9603 generatedContextualTyping.ts:346:12: Add a return type to the function expression var x349 = function(n: { (): Base[]; }) { }; x349(function() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:347:5: Add a type annotation to the variable x349 +!!! related TS9603 generatedContextualTyping.ts:347:12: Add a return type to the function expression var x350 = function(n: { (): Base[]; }) { }; x350(function named() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:348:5: Add a type annotation to the variable x350 +!!! related TS9603 generatedContextualTyping.ts:348:12: Add a return type to the function expression var x351 = function(n: Base[]) { }; x351([d1, d2]); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:349:5: Add a type annotation to the variable x351 +!!! related TS9603 generatedContextualTyping.ts:349:12: Add a return type to the function expression var x352 = function(n: Array) { }; x352([d1, d2]); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:350:5: Add a type annotation to the variable x352 +!!! related TS9603 generatedContextualTyping.ts:350:12: Add a return type to the function expression var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:351:5: Add a type annotation to the variable x353 +!!! related TS9603 generatedContextualTyping.ts:351:12: Add a return type to the function expression var x354 = function(n: {n: Base[]; } ) { }; x354({ n: [d1, d2] }); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:352:5: Add a type annotation to the variable x354 +!!! related TS9603 generatedContextualTyping.ts:352:12: Add a return type to the function expression var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; return null; }); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:353:5: Add a type annotation to the variable x355 +!!! related TS9603 generatedContextualTyping.ts:353:12: Add a return type to the function expression var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:354:5: Add a type annotation to the variable x356 +!!! related TS9603 generatedContextualTyping.ts:354:12: Add a return type to the function expression \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument.d.ts index 43f8c0ecf4872..b613fb70dcde1 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument.d.ts @@ -89,7 +89,7 @@ genericTypeReferenceWithoutTypeArgument.ts(11,18): error TS2314: Generic type 'C genericTypeReferenceWithoutTypeArgument.ts(12,11): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. genericTypeReferenceWithoutTypeArgument.ts(12,14): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(12,18): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument.ts(14,9): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations genericTypeReferenceWithoutTypeArgument.ts(14,13): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(14,28): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(16,15): error TS2314: Generic type 'C' requires 1 type argument(s). @@ -141,7 +141,9 @@ genericTypeReferenceWithoutTypeArgument.ts(37,10): error TS2314: Generic type 'E var e = (x: C) => { var y: C; return y; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 genericTypeReferenceWithoutTypeArgument.ts:14:5: Add a type annotation to the variable e +!!! related TS9603 genericTypeReferenceWithoutTypeArgument.ts:14:9: Add a return type to the function expression ~ !!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ diff --git a/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument2.d.ts index 07cdc424ba21a..e168f7f4daab8 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument2.d.ts @@ -89,7 +89,7 @@ genericTypeReferenceWithoutTypeArgument2.ts(11,18): error TS2314: Generic type ' genericTypeReferenceWithoutTypeArgument2.ts(12,11): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. genericTypeReferenceWithoutTypeArgument2.ts(12,14): error TS2314: Generic type 'I' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(12,18): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument2.ts(14,9): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations genericTypeReferenceWithoutTypeArgument2.ts(14,13): error TS2314: Generic type 'I' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(14,28): error TS2314: Generic type 'I' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(16,15): error TS2314: Generic type 'I' requires 1 type argument(s). @@ -144,7 +144,9 @@ genericTypeReferenceWithoutTypeArgument2.ts(37,10): error TS2314: Generic type ' var e = (x: I) => { var y: I; return y; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 genericTypeReferenceWithoutTypeArgument2.ts:14:5: Add a type annotation to the variable e +!!! related TS9603 genericTypeReferenceWithoutTypeArgument2.ts:14:9: Add a return type to the function expression ~ !!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ diff --git a/tests/baselines/reference/isolated-declarations/original/dte/noUncheckedIndexedAccess.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/noUncheckedIndexedAccess.d.ts index f874b61a2f87d..4f2bd2e082111 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/noUncheckedIndexedAccess.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/noUncheckedIndexedAccess.d.ts @@ -234,7 +234,7 @@ noUncheckedIndexedAccess.ts(79,7): error TS2322: Type 'number | boolean | undefi noUncheckedIndexedAccess.ts(85,1): error TS2322: Type 'undefined' is not assignable to type 'string'. noUncheckedIndexedAccess.ts(90,7): error TS2322: Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. -noUncheckedIndexedAccess.ts(97,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +noUncheckedIndexedAccess.ts(97,13): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations noUncheckedIndexedAccess.ts(98,5): error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. Type 'undefined' is not assignable to type 'string'. noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'string | undefined' is not assignable to type 'string'. @@ -402,7 +402,9 @@ noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'string | undefined' is n const fn2 = (key: Key): string => myRecord2[key]; // Should OK const fn3 = (key: Key) => { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 noUncheckedIndexedAccess.ts:97:7: Add a type annotation to the variable fn3 +!!! related TS9603 noUncheckedIndexedAccess.ts:97:13: Add a return type to the function expression myRecord2[key] = undefined; // Should error ~~~~~~~~~~~~~~ !!! error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralGettersAndSetters.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralGettersAndSetters.d.ts index 2009b95e65590..97c89c94535ee 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralGettersAndSetters.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralGettersAndSetters.d.ts @@ -164,8 +164,8 @@ objectLiteralGettersAndSetters.ts(5,24): error TS9007: Declaration emit for this objectLiteralGettersAndSetters.ts(6,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. objectLiteralGettersAndSetters.ts(7,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. objectLiteralGettersAndSetters.ts(10,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(12,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(14,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(12,23): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(14,23): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations objectLiteralGettersAndSetters.ts(22,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. objectLiteralGettersAndSetters.ts(30,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. objectLiteralGettersAndSetters.ts(60,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -201,11 +201,15 @@ objectLiteralGettersAndSetters.ts(76,9): error TS9007: Declaration emit for this var callSig1: { num: (n: number) => string; }; var callSig2 = { num: function (n: number) { return '' } }; ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 objectLiteralGettersAndSetters.ts:12:5: Add a type annotation to the variable callSig2 +!!! related TS9603 objectLiteralGettersAndSetters.ts:12:23: Add a return type to the function expression var callSig2: { num: (n: number) => string; }; var callSig3 = { num: (n: number) => '' }; ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 objectLiteralGettersAndSetters.ts:14:5: Add a type annotation to the variable callSig3 +!!! related TS9603 objectLiteralGettersAndSetters.ts:14:23: Add a return type to the function expression var callSig3: { num: (n: number) => string; }; // Get accessor only, type of the property is the annotated return type of the get accessor diff --git a/tests/baselines/reference/isolated-declarations/original/dte/renamingDestructuredPropertyInFunctionType.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/renamingDestructuredPropertyInFunctionType.d.ts index eb51937c8c2b7..1a34d481960a0 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/renamingDestructuredPropertyInFunctionType.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/renamingDestructuredPropertyInFunctionType.d.ts @@ -170,19 +170,19 @@ renamingDestructuredPropertyInFunctionType.ts(40,9): error TS2842: 'string' is a renamingDestructuredPropertyInFunctionType.ts(43,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(48,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(49,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(48,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +renamingDestructuredPropertyInFunctionType.ts(49,12): error TS9507: Function must have an explicit type annotation with 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. renamingDestructuredPropertyInFunctionType.ts(56,36): error TS4025: Exported variable 'obj2' has or is using private name 'string'. renamingDestructuredPropertyInFunctionType.ts(58,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(59,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(60,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(59,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +renamingDestructuredPropertyInFunctionType.ts(60,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations renamingDestructuredPropertyInFunctionType.ts(61,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. renamingDestructuredPropertyInFunctionType.ts(61,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. renamingDestructuredPropertyInFunctionType.ts(62,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(63,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(63,14): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -325,10 +325,14 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. const f2 = function({ a: string }: O) { }; ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 renamingDestructuredPropertyInFunctionType.ts:48:7: Add a type annotation to the variable f2 +!!! related TS9603 renamingDestructuredPropertyInFunctionType.ts:48:12: Add a return type to the function expression const f3 = ({ a: string, b, c }: O) => { }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 renamingDestructuredPropertyInFunctionType.ts:49:7: Add a type annotation to the variable f3 +!!! related TS9603 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'. @@ -350,10 +354,14 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. const f7 = ({ a: string = "", b, c }: O) => { }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 renamingDestructuredPropertyInFunctionType.ts:59:7: Add a type annotation to the variable f7 +!!! related TS9603 renamingDestructuredPropertyInFunctionType.ts:59:12: Add a return type to the function expression const f8 = ({ "a": string }: O) => { }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 renamingDestructuredPropertyInFunctionType.ts:60:7: Add a type annotation to the variable f8 +!!! related TS9603 renamingDestructuredPropertyInFunctionType.ts:60:12: Add a return type to the function expression function f9 ({ 2: string }) { }; ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -364,7 +372,9 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. const f11 = ({ [2]: string }) => { }; ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 renamingDestructuredPropertyInFunctionType.ts:63:7: Add a type annotation to the variable f11 +!!! related TS9603 renamingDestructuredPropertyInFunctionType.ts:63:14: Add a return type to the function expression ~~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/capturedParametersInInitializers1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/capturedParametersInInitializers1.d.ts index 29b23979b44b6..0407a5130f937 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/capturedParametersInInitializers1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/capturedParametersInInitializers1.d.ts @@ -65,7 +65,7 @@ declare function foo9(y?: invalid, z?: number): invalid; capturedParametersInInitializers1.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. capturedParametersInInitializers1.ts(2,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. capturedParametersInInitializers1.ts(7,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(7,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(7,19): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations capturedParametersInInitializers1.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. capturedParametersInInitializers1.ts(13,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. capturedParametersInInitializers1.ts(18,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -75,7 +75,7 @@ capturedParametersInInitializers1.ts(22,10): error TS9007: Declaration emit for capturedParametersInInitializers1.ts(22,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. capturedParametersInInitializers1.ts(22,26): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. capturedParametersInInitializers1.ts(26,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(26,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(26,19): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations capturedParametersInInitializers1.ts(30,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. capturedParametersInInitializers1.ts(30,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. capturedParametersInInitializers1.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -100,7 +100,9 @@ capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot ~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 capturedParametersInInitializers1.ts:7:15: Add a type annotation to the parameter y +!!! related TS9603 capturedParametersInInitializers1.ts:7:19: Add a return type to the function expression } @@ -139,7 +141,9 @@ capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot ~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 capturedParametersInInitializers1.ts:26:15: Add a type annotation to the parameter y +!!! related TS9603 capturedParametersInInitializers1.ts:26:19: Add a return type to the function expression } // ok - used inside immediately invoked generator function diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/generatedContextualTyping.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/generatedContextualTyping.d.ts index ccf90987aea73..f94223589fd03 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/generatedContextualTyping.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/generatedContextualTyping.d.ts @@ -1317,30 +1317,30 @@ generatedContextualTyping.ts(327,10): error TS9007: Declaration emit for this fi generatedContextualTyping.ts(328,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. generatedContextualTyping.ts(329,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. generatedContextualTyping.ts(330,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(331,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(332,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(333,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(334,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(335,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(336,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(337,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(338,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(339,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(340,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(341,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(342,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(343,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(344,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(345,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(346,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(347,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(348,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(349,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(350,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(351,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(352,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(353,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(354,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +generatedContextualTyping.ts(331,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(332,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(333,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(334,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(335,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(336,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(337,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(338,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(339,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(340,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(341,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(342,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(343,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(344,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(345,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(346,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(347,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(348,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(349,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(350,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(351,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(352,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(353,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(354,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations ==== generatedContextualTyping.ts (59 errors) ==== @@ -1746,73 +1746,121 @@ generatedContextualTyping.ts(354,12): error TS9007: Declaration emit for this fi !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. var x333 = (n: () => Base[]) => n; x333(() => [d1, d2]); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:331:5: Add a type annotation to the variable x333 +!!! related TS9603 generatedContextualTyping.ts:331:12: Add a return type to the function expression var x334 = (n: () => Base[]) => n; x334(function() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:332:5: Add a type annotation to the variable x334 +!!! related TS9603 generatedContextualTyping.ts:332:12: Add a return type to the function expression var x335 = (n: () => Base[]) => n; x335(function named() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:333:5: Add a type annotation to the variable x335 +!!! related TS9603 generatedContextualTyping.ts:333:12: Add a return type to the function expression var x336 = (n: { (): Base[]; }) => n; x336(() => [d1, d2]); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:334:5: Add a type annotation to the variable x336 +!!! related TS9603 generatedContextualTyping.ts:334:12: Add a return type to the function expression var x337 = (n: { (): Base[]; }) => n; x337(function() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:335:5: Add a type annotation to the variable x337 +!!! related TS9603 generatedContextualTyping.ts:335:12: Add a return type to the function expression var x338 = (n: { (): Base[]; }) => n; x338(function named() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:336:5: Add a type annotation to the variable x338 +!!! related TS9603 generatedContextualTyping.ts:336:12: Add a return type to the function expression var x339 = (n: Base[]) => n; x339([d1, d2]); ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:337:5: Add a type annotation to the variable x339 +!!! related TS9603 generatedContextualTyping.ts:337:12: Add a return type to the function expression var x340 = (n: Array) => n; x340([d1, d2]); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:338:5: Add a type annotation to the variable x340 +!!! related TS9603 generatedContextualTyping.ts:338:12: Add a return type to the function expression var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:339:5: Add a type annotation to the variable x341 +!!! related TS9603 generatedContextualTyping.ts:339:12: Add a return type to the function expression var x342 = (n: {n: Base[]; } ) => n; x342({ n: [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:340:5: Add a type annotation to the variable x342 +!!! related TS9603 generatedContextualTyping.ts:340:12: Add a return type to the function expression var x343 = (n: (s: Base[]) => any) => n; x343(n => { var n: Base[]; return null; }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:341:5: Add a type annotation to the variable x343 +!!! related TS9603 generatedContextualTyping.ts:341:12: Add a return type to the function expression var x344 = (n: Genric) => n; x344({ func: n => { return [d1, d2]; } }); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:342:5: Add a type annotation to the variable x344 +!!! related TS9603 generatedContextualTyping.ts:342:12: Add a return type to the function expression var x345 = function(n: () => Base[]) { }; x345(() => [d1, d2]); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:343:5: Add a type annotation to the variable x345 +!!! related TS9603 generatedContextualTyping.ts:343:12: Add a return type to the function expression var x346 = function(n: () => Base[]) { }; x346(function() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:344:5: Add a type annotation to the variable x346 +!!! related TS9603 generatedContextualTyping.ts:344:12: Add a return type to the function expression var x347 = function(n: () => Base[]) { }; x347(function named() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:345:5: Add a type annotation to the variable x347 +!!! related TS9603 generatedContextualTyping.ts:345:12: Add a return type to the function expression var x348 = function(n: { (): Base[]; }) { }; x348(() => [d1, d2]); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:346:5: Add a type annotation to the variable x348 +!!! related TS9603 generatedContextualTyping.ts:346:12: Add a return type to the function expression var x349 = function(n: { (): Base[]; }) { }; x349(function() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:347:5: Add a type annotation to the variable x349 +!!! related TS9603 generatedContextualTyping.ts:347:12: Add a return type to the function expression var x350 = function(n: { (): Base[]; }) { }; x350(function named() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:348:5: Add a type annotation to the variable x350 +!!! related TS9603 generatedContextualTyping.ts:348:12: Add a return type to the function expression var x351 = function(n: Base[]) { }; x351([d1, d2]); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:349:5: Add a type annotation to the variable x351 +!!! related TS9603 generatedContextualTyping.ts:349:12: Add a return type to the function expression var x352 = function(n: Array) { }; x352([d1, d2]); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:350:5: Add a type annotation to the variable x352 +!!! related TS9603 generatedContextualTyping.ts:350:12: Add a return type to the function expression var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:351:5: Add a type annotation to the variable x353 +!!! related TS9603 generatedContextualTyping.ts:351:12: Add a return type to the function expression var x354 = function(n: {n: Base[]; } ) { }; x354({ n: [d1, d2] }); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:352:5: Add a type annotation to the variable x354 +!!! related TS9603 generatedContextualTyping.ts:352:12: Add a return type to the function expression var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; return null; }); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:353:5: Add a type annotation to the variable x355 +!!! related TS9603 generatedContextualTyping.ts:353:12: Add a return type to the function expression var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 generatedContextualTyping.ts:354:5: Add a type annotation to the variable x356 +!!! related TS9603 generatedContextualTyping.ts:354:12: Add a return type to the function expression \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument.d.ts index e7258a5cbc9f9..3111e2ad2a8a4 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument.d.ts @@ -89,7 +89,7 @@ genericTypeReferenceWithoutTypeArgument.ts(11,18): error TS2314: Generic type 'C genericTypeReferenceWithoutTypeArgument.ts(12,11): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. genericTypeReferenceWithoutTypeArgument.ts(12,14): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(12,18): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument.ts(14,9): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations genericTypeReferenceWithoutTypeArgument.ts(14,13): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(14,28): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(16,15): error TS2314: Generic type 'C' requires 1 type argument(s). @@ -141,7 +141,9 @@ genericTypeReferenceWithoutTypeArgument.ts(37,10): error TS2314: Generic type 'E var e = (x: C) => { var y: C; return y; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 genericTypeReferenceWithoutTypeArgument.ts:14:5: Add a type annotation to the variable e +!!! related TS9603 genericTypeReferenceWithoutTypeArgument.ts:14:9: Add a return type to the function expression ~ !!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument2.d.ts index c49ebcb9bad83..06652ffe07762 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument2.d.ts @@ -89,7 +89,7 @@ genericTypeReferenceWithoutTypeArgument2.ts(11,18): error TS2314: Generic type ' genericTypeReferenceWithoutTypeArgument2.ts(12,11): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. genericTypeReferenceWithoutTypeArgument2.ts(12,14): error TS2314: Generic type 'I' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(12,18): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument2.ts(14,9): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations genericTypeReferenceWithoutTypeArgument2.ts(14,13): error TS2314: Generic type 'I' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(14,28): error TS2314: Generic type 'I' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(16,15): error TS2314: Generic type 'I' requires 1 type argument(s). @@ -144,7 +144,9 @@ genericTypeReferenceWithoutTypeArgument2.ts(37,10): error TS2314: Generic type ' var e = (x: I) => { var y: I; return y; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 genericTypeReferenceWithoutTypeArgument2.ts:14:5: Add a type annotation to the variable e +!!! related TS9603 genericTypeReferenceWithoutTypeArgument2.ts:14:9: Add a return type to the function expression ~ !!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/noUncheckedIndexedAccess.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/noUncheckedIndexedAccess.d.ts index 12e6a0bdc017f..4bbfb604d8707 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/noUncheckedIndexedAccess.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/noUncheckedIndexedAccess.d.ts @@ -234,7 +234,7 @@ noUncheckedIndexedAccess.ts(79,7): error TS2322: Type 'number | boolean | undefi noUncheckedIndexedAccess.ts(85,1): error TS2322: Type 'undefined' is not assignable to type 'string'. noUncheckedIndexedAccess.ts(90,7): error TS2322: Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. -noUncheckedIndexedAccess.ts(97,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +noUncheckedIndexedAccess.ts(97,13): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations noUncheckedIndexedAccess.ts(98,5): error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. Type 'undefined' is not assignable to type 'string'. noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'string | undefined' is not assignable to type 'string'. @@ -402,7 +402,9 @@ noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'string | undefined' is n const fn2 = (key: Key): string => myRecord2[key]; // Should OK const fn3 = (key: Key) => { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 noUncheckedIndexedAccess.ts:97:7: Add a type annotation to the variable fn3 +!!! related TS9603 noUncheckedIndexedAccess.ts:97:13: Add a return type to the function expression myRecord2[key] = undefined; // Should error ~~~~~~~~~~~~~~ !!! error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralGettersAndSetters.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralGettersAndSetters.d.ts index 850cf29cb172a..8fafd4a4f5ee3 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralGettersAndSetters.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralGettersAndSetters.d.ts @@ -160,8 +160,8 @@ objectLiteralGettersAndSetters.ts(5,24): error TS9007: Declaration emit for this objectLiteralGettersAndSetters.ts(6,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. objectLiteralGettersAndSetters.ts(7,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. objectLiteralGettersAndSetters.ts(10,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(12,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(14,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(12,23): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(14,23): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations objectLiteralGettersAndSetters.ts(22,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. objectLiteralGettersAndSetters.ts(30,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. objectLiteralGettersAndSetters.ts(60,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -197,11 +197,15 @@ objectLiteralGettersAndSetters.ts(76,9): error TS9007: Declaration emit for this var callSig1: { num: (n: number) => string; }; var callSig2 = { num: function (n: number) { return '' } }; ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 objectLiteralGettersAndSetters.ts:12:5: Add a type annotation to the variable callSig2 +!!! related TS9603 objectLiteralGettersAndSetters.ts:12:23: Add a return type to the function expression var callSig2: { num: (n: number) => string; }; var callSig3 = { num: (n: number) => '' }; ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 objectLiteralGettersAndSetters.ts:14:5: Add a type annotation to the variable callSig3 +!!! related TS9603 objectLiteralGettersAndSetters.ts:14:23: Add a return type to the function expression var callSig3: { num: (n: number) => string; }; // Get accessor only, type of the property is the annotated return type of the get accessor diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/renamingDestructuredPropertyInFunctionType.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/renamingDestructuredPropertyInFunctionType.d.ts index 91405428e140b..48b9a2993c6d8 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/renamingDestructuredPropertyInFunctionType.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/renamingDestructuredPropertyInFunctionType.d.ts @@ -170,19 +170,19 @@ renamingDestructuredPropertyInFunctionType.ts(40,9): error TS2842: 'string' is a renamingDestructuredPropertyInFunctionType.ts(43,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(48,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(49,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(48,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +renamingDestructuredPropertyInFunctionType.ts(49,12): error TS9507: Function must have an explicit type annotation with 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. renamingDestructuredPropertyInFunctionType.ts(56,36): error TS4025: Exported variable 'obj2' has or is using private name 'string'. renamingDestructuredPropertyInFunctionType.ts(58,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(59,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(60,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(59,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +renamingDestructuredPropertyInFunctionType.ts(60,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations renamingDestructuredPropertyInFunctionType.ts(61,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. renamingDestructuredPropertyInFunctionType.ts(61,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. renamingDestructuredPropertyInFunctionType.ts(62,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(63,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +renamingDestructuredPropertyInFunctionType.ts(63,14): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -325,10 +325,14 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. const f2 = function({ a: string }: O) { }; ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 renamingDestructuredPropertyInFunctionType.ts:48:7: Add a type annotation to the variable f2 +!!! related TS9603 renamingDestructuredPropertyInFunctionType.ts:48:12: Add a return type to the function expression const f3 = ({ a: string, b, c }: O) => { }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 renamingDestructuredPropertyInFunctionType.ts:49:7: Add a type annotation to the variable f3 +!!! related TS9603 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'. @@ -350,10 +354,14 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. const f7 = ({ a: string = "", b, c }: O) => { }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 renamingDestructuredPropertyInFunctionType.ts:59:7: Add a type annotation to the variable f7 +!!! related TS9603 renamingDestructuredPropertyInFunctionType.ts:59:12: Add a return type to the function expression const f8 = ({ "a": string }: O) => { }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 renamingDestructuredPropertyInFunctionType.ts:60:7: Add a type annotation to the variable f8 +!!! related TS9603 renamingDestructuredPropertyInFunctionType.ts:60:12: Add a return type to the function expression function f9 ({ 2: string }) { }; ~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -364,7 +372,9 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. const f11 = ({ [2]: string }) => { }; ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 renamingDestructuredPropertyInFunctionType.ts:63:7: Add a type annotation to the variable f11 +!!! related TS9603 renamingDestructuredPropertyInFunctionType.ts:63:14: Add a return type to the function expression ~~~~~~~~~~~~~~~ !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. diff --git a/tests/baselines/reference/isolatedDeclarationErrors.errors.txt b/tests/baselines/reference/isolatedDeclarationErrors.errors.txt index f8bb1b30fd8ae..eec79fe99f503 100644 --- a/tests/baselines/reference/isolatedDeclarationErrors.errors.txt +++ b/tests/baselines/reference/isolatedDeclarationErrors.errors.txt @@ -1,6 +1,6 @@ isolatedDeclarationErrors.ts(2,1): error TS9009: 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 TS9009: 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +isolatedDeclarationErrors.ts(7,30): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations isolatedDeclarationErrors.ts(8,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. @@ -17,7 +17,9 @@ isolatedDeclarationErrors.ts(8,1): error TS9009: Assigning properties to functio const errorOnMissingReturn = () => {} ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 isolatedDeclarationErrors.ts:7:7: Add a type annotation to the variable errorOnMissingReturn +!!! related TS9603 isolatedDeclarationErrors.ts:7:30: Add a return type to the function expression errorOnMissingReturn.a = ""; ~~~~~~~~~~~~~~~~~~~~~~ !!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.errors.txt new file mode 100644 index 0000000000000..bb18b2b63224b --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.errors.txt @@ -0,0 +1,631 @@ +isolatedDeclarationErrorsReturnTypes.ts(2,51): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(3,37): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(5,47): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(6,33): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(8,47): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(9,33): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(13,45): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(16,41): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(19,41): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(34,29): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(35,15): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(36,48): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(37,34): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(39,42): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(40,28): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(41,61): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(42,47): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(67,29): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(68,15): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(70,42): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(71,28): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(73,61): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(74,47): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(109,56): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(109,65): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(110,42): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(110,48): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(112,52): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(112,61): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(113,38): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(113,44): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(115,52): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(115,61): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(116,38): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(116,44): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(119,83): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(120,66): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(122,79): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(123,62): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(125,79): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(126,62): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(138,64): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(138,73): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(139,50): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(139,56): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(141,60): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(141,69): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(142,46): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(142,52): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(144,60): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(144,69): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(145,46): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(145,52): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(151,29): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(151,38): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(152,15): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(152,21): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(153,48): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(153,57): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(154,34): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(154,40): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(156,42): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(156,51): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(157,28): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(157,34): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(158,61): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(158,70): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(159,47): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(159,53): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(162,53): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(163,36): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(164,72): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(165,55): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(167,66): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(168,49): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(169,85): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(170,68): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(173,40): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(174,26): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(175,59): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(176,45): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(178,53): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(179,39): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(180,72): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +isolatedDeclarationErrorsReturnTypes.ts(181,58): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations + + +==== isolatedDeclarationErrorsReturnTypes.ts (85 errors) ==== + // Function Variables + export const fnExpressionConstVariable = function foo() { return 0;} + ~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:2:14: Add a type annotation to the variable fnExpressionConstVariable +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:2:51: Add a return type to the function expression + export const fnArrowConstVariable = () => "S"; + ~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:3:14: Add a type annotation to the variable fnArrowConstVariable +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:3:37: Add a return type to the function expression + + export let fnExpressionLetVariable = function foo() { return 0;} + ~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:5:12: Add a type annotation to the variable fnExpressionLetVariable +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:5:47: Add a return type to the function expression + export let fnArrowLetVariable = () => "S"; + ~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:6:12: Add a type annotation to the variable fnArrowLetVariable +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:6:33: Add a return type to the function expression + + export var fnExpressionVarVariable = function foo() { return 0;} + ~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:8:12: Add a type annotation to the variable fnExpressionVarVariable +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:8:47: Add a return type to the function expression + export var fnArrowVarVariable = () => "S"; + ~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:9:12: Add a type annotation to the variable fnArrowVarVariable +!!! related TS9603 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:13:40: Add a type annotation to the parameter cb +!!! related TS9603 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:16:36: Add a type annotation to the parameter cb +!!! related TS9603 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:19:36: Add a type annotation to the parameter cb +!!! related TS9603 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:34:5: Add a type annotation to the property fnExpression +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:34:29: Add a return type to the function expression + fnArrow = () => "S"; + ~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:35:5: Add a type annotation to the property fnArrow +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:35:15: Add a return type to the function expression + protected fnExpressionProtected = function foo() { return 0; } + ~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:36:15: Add a type annotation to the property fnExpressionProtected +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:36:48: Add a return type to the function expression + protected fnArrowProtected = () => "S"; + ~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:37:15: Add a type annotation to the property fnArrowProtected +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:37:34: Add a return type to the function expression + + static fnStaticExpression = function foo() { return 0; } + ~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:39:12: Add a type annotation to the property fnStaticExpression +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:39:42: Add a return type to the function expression + static fnStaticArrow = () => "S"; + ~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:40:12: Add a type annotation to the property fnStaticArrow +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:40:28: Add a return type to the function expression + protected static fnStaticExpressionProtected = function foo() { return 0; } + ~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:41:22: Add a type annotation to the property fnStaticExpressionProtected +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:41:61: Add a return type to the function expression + protected static fnStaticArrowProtected = () => "S"; + ~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:42:22: Add a type annotation to the property fnStaticArrowProtected +!!! related TS9603 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:67:5: Add a type annotation to the property fnExpression +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:67:29: Add a return type to the function expression + fnArrow = () => "S"; + ~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:68:5: Add a type annotation to the property fnArrow +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:68:15: Add a return type to the function expression + + static fnStaticExpression = function foo() { return 0; } + ~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:70:12: Add a type annotation to the property fnStaticExpression +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:70:42: Add a return type to the function expression + static fnStaticArrow = () => "S"; + ~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:71:12: Add a type annotation to the property fnStaticArrow +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:71:28: Add a return type to the function expression + + protected static fnStaticExpressionProtected = function foo() { return 0; } + ~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:73:22: Add a type annotation to the property fnStaticExpressionProtected +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:73:61: Add a return type to the function expression + protected static fnStaticArrowProtected = () => "S"; + ~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:74:22: Add a type annotation to the property fnStaticArrowProtected +!!! related TS9603 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:109:14: Add a type annotation to the variable fnParamExpressionConstVariable +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:109:56: Add a return type to the function expression + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:109:60: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:109:65: Add a return type to the function expression + export const fnParamArrowConstVariable = (cb = () => 1) => "S"; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:110:14: Add a type annotation to the variable fnParamArrowConstVariable +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:110:42: Add a return type to the function expression + ~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:110:43: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:110:48: Add a return type to the function expression + + export let fnParamExpressionLetVariable = function foo(cb = function(){ }) { return 0;} + ~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:112:12: Add a type annotation to the variable fnParamExpressionLetVariable +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:112:52: Add a return type to the function expression + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:112:56: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:112:61: Add a return type to the function expression + export let fnParamArrowLetVariable = (cb = () => 1) => "S"; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:113:12: Add a type annotation to the variable fnParamArrowLetVariable +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:113:38: Add a return type to the function expression + ~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:113:39: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:113:44: Add a return type to the function expression + + export var fnParamExpressionVarVariable = function foo(cb = function(){ }) { return 0;} + ~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:115:12: Add a type annotation to the variable fnParamExpressionVarVariable +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:115:52: Add a return type to the function expression + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:115:56: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:115:61: Add a return type to the function expression + export var fnParamArrowVarVariable = (cb = () => 1) => "S"; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:116:12: Add a type annotation to the variable fnParamArrowVarVariable +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:116:38: Add a return type to the function expression + ~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:116:39: Add a type annotation to the parameter cb +!!! related TS9603 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:119:78: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:119:83: Add a return type to the function expression + export const fnParamArrowConstVariableOwnerHasReturnType = (cb = function(){ }): string => "S"; + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:120:61: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:120:66: Add a return type to the function expression + + export let fnParamExpressionLetVariableOwnerHasReturnType = function foo(cb = function(){ }): number { return 0;} + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:122:74: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:122:79: Add a return type to the function expression + export let fnParamArrowLetVariableOwnerHasReturnType = (cb = function(){ }): string => "S"; + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:123:57: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:123:62: Add a return type to the function expression + + export var fnParamExpressionVarVariableOwnerHasReturnType = function foo(cb = function(){ }): number { return 0;} + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:125:74: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:125:79: Add a return type to the function expression + export var fnParamArrowVarVariableOwnerHasReturnType = (cb = function(){ }): string => "S"; + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:126:57: Add a type annotation to the parameter cb +!!! related TS9603 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:138:14: Add a type annotation to the variable fnParamExpressionConstVariableInternal +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:138:64: Add a return type to the function expression + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:138:68: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:138:73: Add a return type to the function expression + export const fnParamArrowConstVariableInternal = (cb = () => 1) => "S"; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:139:14: Add a type annotation to the variable fnParamArrowConstVariableInternal +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:139:50: Add a return type to the function expression + ~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:139:51: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:139:56: Add a return type to the function expression + + export let fnParamExpressionLetVariableInternal = function foo(cb = function(){ }) { return 0;} + ~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:141:12: Add a type annotation to the variable fnParamExpressionLetVariableInternal +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:141:60: Add a return type to the function expression + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:141:64: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:141:69: Add a return type to the function expression + export let fnParamArrowLetVariableInternal = (cb = () => 1) => "S"; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:142:12: Add a type annotation to the variable fnParamArrowLetVariableInternal +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:142:46: Add a return type to the function expression + ~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:142:47: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:142:52: Add a return type to the function expression + + export var fnParamExpressionVarVariableInternal = function foo(cb = function(){ }) { return 0;} + ~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:144:12: Add a type annotation to the variable fnParamExpressionVarVariableInternal +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:144:60: Add a return type to the function expression + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:144:64: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:144:69: Add a return type to the function expression + export var fnParamArrowVarVariableInternal = (cb = () => 1) => "S"; + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:145:12: Add a type annotation to the variable fnParamArrowVarVariableInternal +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:145:46: Add a return type to the function expression + ~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:145:47: Add a type annotation to the parameter cb +!!! related TS9603 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:151:5: Add a type annotation to the property fnExpression +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:151:29: Add a return type to the function expression + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:151:33: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:151:38: Add a return type to the function expression + fnArrow = (cb = function(){ }) => "S"; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:152:5: Add a type annotation to the property fnArrow +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:152:15: Add a return type to the function expression + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:152:16: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:152:21: Add a return type to the function expression + protected fnExpressionProtected = function foo(cb = function(){ }) { return 0; } + ~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:153:15: Add a type annotation to the property fnExpressionProtected +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:153:48: Add a return type to the function expression + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:153:52: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:153:57: Add a return type to the function expression + protected fnArrowProtected = (cb = function(){ }) => "S"; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:154:15: Add a type annotation to the property fnArrowProtected +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:154:34: Add a return type to the function expression + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:154:35: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:154:40: Add a return type to the function expression + + static fnStaticExpression = function foo(cb = function(){ }) { return 0; } + ~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:156:12: Add a type annotation to the property fnStaticExpression +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:156:42: Add a return type to the function expression + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:156:46: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:156:51: Add a return type to the function expression + static fnStaticArrow = (cb = function(){ }) => "S"; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:157:12: Add a type annotation to the property fnStaticArrow +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:157:28: Add a return type to the function expression + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:157:29: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:157:34: Add a return type to the function expression + protected static fnStaticExpressionProtected = function foo(cb = function(){ }) { return 0; } + ~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:158:22: Add a type annotation to the property fnStaticExpressionProtected +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:158:61: Add a return type to the function expression + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:158:65: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:158:70: Add a return type to the function expression + protected static fnStaticArrowProtected = (cb = function(){ }) => "S"; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:159:22: Add a type annotation to the property fnStaticArrowProtected +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:159:47: Add a return type to the function expression + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:159:48: Add a type annotation to the parameter cb +!!! related TS9603 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:162:48: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:162:53: Add a return type to the function expression + fnArrowMethodHasReturn = (cb = function(){ }): string => "S"; + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:163:31: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:163:36: Add a return type to the function expression + protected fnExpressionProtectedMethodHasReturn = function foo(cb = function(){ }): number { return 0; } + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:164:67: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:164:72: Add a return type to the function expression + protected fnArrowProtectedMethodHasReturn = (cb = function(){ }): string => "S"; + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:165:50: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:165:55: Add a return type to the function expression + + static fnStaticExpressionMethodHasReturn = function foo(cb = function(){ }): number { return 0; } + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:167:61: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:167:66: Add a return type to the function expression + static fnStaticArrowMethodHasReturn = (cb = function(){ }): string => "S"; + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:168:44: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:168:49: Add a return type to the function expression + protected static fnStaticExpressionProtectedMethodHasReturn = function foo(cb = function(){ }): number { return 0; } + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:169:80: Add a type annotation to the parameter cb +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:169:85: Add a return type to the function expression + protected static fnStaticArrowProtectedMethodHasReturn = (cb = function(){ }): string => "S"; + ~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:170:63: Add a type annotation to the parameter cb +!!! related TS9603 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:173:5: Add a type annotation to the property fnExpressionOnlyOnParam +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:173:40: Add a return type to the function expression + fnArrowOnlyOnParam = (cb = function(): void { }) => "S"; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:174:5: Add a type annotation to the property fnArrowOnlyOnParam +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:174:26: Add a return type to the function expression + protected fnExpressionProtectedOnlyOnParam = function foo(cb = function(): void { }) { return 0; } + ~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:175:15: Add a type annotation to the property fnExpressionProtectedOnlyOnParam +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:175:59: Add a return type to the function expression + protected fnArrowProtectedOnlyOnParam = (cb = function(): void { }) => "S"; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:176:15: Add a type annotation to the property fnArrowProtectedOnlyOnParam +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:176:45: Add a return type to the function expression + + static fnStaticExpressionOnlyOnParam = function foo(cb = function(): void{ }) { return 0; } + ~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:178:12: Add a type annotation to the property fnStaticExpressionOnlyOnParam +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:178:53: Add a return type to the function expression + static fnStaticArrowOnlyOnParam = (cb = function(): void{ }) => "S"; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:179:12: Add a type annotation to the property fnStaticArrowOnlyOnParam +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:179:39: Add a return type to the function expression + protected static fnStaticExpressionProtectedOnlyOnParam = function foo(cb = function(): void{ }) { return 0; } + ~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:180:22: Add a type annotation to the property fnStaticExpressionProtectedOnlyOnParam +!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:180:72: Add a return type to the function expression + protected static fnStaticArrowProtectedOnlyOnParam = (cb = function(): void{ }) => "S"; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:181:22: Add a type annotation to the property fnStaticArrowProtectedOnlyOnParam +!!! related TS9603 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/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"; +} From 03135a7eb4e8b20a2e02c6423544da32d0c8c8e5 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 11 Dec 2023 01:17:14 +0000 Subject: [PATCH 183/224] Improved errors Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/diagnosticMessages.json | 108 +++++-- src/compiler/transformers/declarations.ts | 27 +- .../declarations/localInferenceResolver.ts | 266 ++++++++++++++---- src/compiler/utilities.ts | 29 +- src/harness/isolatedDeclarationFixer.ts | 19 +- .../fixMissingTypeAnnotationOnExports.ts | 31 +- src/testRunner/compilerRunner.ts | 23 +- 7 files changed, 379 insertions(+), 124 deletions(-) diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index f0278013f8d7f..3e9f76f9350ed 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -6726,45 +6726,121 @@ "category": "Error", "code": 9006 }, - "Function must have an explicit type annotation with with --isolatedDeclarations": { + "Function must have an explicit return type annotation with --isolatedDeclarations": { "category": "Error", - "code": 9507 + "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 in isolated declaration mode.": { + "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": 9600 + "code": 9027 }, "Add a type annotation to the parameter {0}": { "category": "Error", - "code": 9601 + "code": 9028 }, "Add a type annotation to the property {0}": { "category": "Error", - "code": 9602 + "code": 9029 }, "Add a return type to the function expression": { "category": "Error", - "code": 9603 + "code": 9030 }, - "Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit.": { + "Add a return type to the function declaration": { "category": "Error", - "code": 9007 + "code": 9031 }, - "Declaration emit for this file requires adding a type reference directive. Add a type reference directive to {0} to unblock declaration emit.": { + "Add a return type to the get accessor declaration": { "category": "Error", - "code": 9008 + "code": 9032 }, - "Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function.": { + "Add a type to parameter of the set accessor declaration": { "category": "Error", - "code": 9009 + "code": 9033 }, - "Reference directives are not supported in isolated declaration mode.": { + "Add a return type to the method": { "category": "Error", - "code": 9010 + "code": 9034 }, - "Declaration emit for class expressions are not supported with --isolatedDeclarations.": { + "Add a type assertion to this expression to make type type explicit": { "category": "Error", - "code": 9011 + "code": 9035 }, "JSX attributes must only be assigned a non-empty 'expression'.": { "category": "Error", diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 324a3c2d04ddf..50ab9a25eb065 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -395,13 +395,6 @@ export function transformDeclarations(context: TransformationContext | IsolatedT }; } } - function reportIsolatedDeclarationError(node: Node) { - const message = createDiagnosticForNode( - node, - Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit, - ); - context.addDiagnostic(message); - } function recordTypeReferenceDirectivesIfNecessary(typeReferenceDirectives: readonly [specifier: string, mode: ResolutionMode][] | undefined, requestingNode: Node | undefined): void { if (!typeReferenceDirectives) { return; @@ -473,7 +466,7 @@ export function transformDeclarations(context: TransformationContext | IsolatedT if (!existingDirective) { context.addDiagnostic(createDiagnosticForNode( requestingNode, - Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit, + Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_which_are_not_supported_with_isolatedDeclarations, typeReferenceDirective[0], )); } @@ -1195,9 +1188,7 @@ export function transformDeclarations(context: TransformationContext | IsolatedT // Augmentation of export depends on import if (resolver.isImportRequiredByAugmentation(decl)) { if (isolatedDeclarations) { - // TODO: Should report better error here. Suggest we add the syntax import type '....' - // Also add a test for this. - reportIsolatedDeclarationError(decl); + 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( @@ -1280,7 +1271,7 @@ export function transformDeclarations(context: TransformationContext | IsolatedT // when it's on, it should be an error on the noImplicitAny side, so we also shouldn't complain. !isInterfaceDeclaration(input.parent) && !isTypeLiteralNode(input.parent) ) { - reportIsolatedDeclarationError(input); + context.addDiagnostic(createDiagnosticForNode(input, Diagnostics.Computed_properties_must_be_number_or_string_literals_variables_or_dotted_expressions_with_isolatedDeclarations)); } else { return; @@ -1742,14 +1733,8 @@ export function transformDeclarations(context: TransformationContext | IsolatedT return undefined; // unique symbol or non-identifier name - omit, since there's no syntax that can preserve it } getSymbolAccessibilityDiagnostic = createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration); - let type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags, symbolTracker); + const type = resolver.createTypeOfDeclaration(p.valueDeclaration, fakespace, declarationEmitNodeBuilderFlags, symbolTracker); getSymbolAccessibilityDiagnostic = oldDiag; - - if (isolatedDeclarations) { - reportIsolatedDeclarationError(p.valueDeclaration); - type = factory.createTypeReferenceNode("invalid"); - } - const isNonContextualKeywordName = isStringANonContextualKeyword(nameStr); const name = isNonContextualKeywordName ? factory.getGeneratedNameForNode(p.valueDeclaration) : factory.createIdentifier(nameStr); if (isNonContextualKeywordName) { @@ -1946,7 +1931,7 @@ export function transformDeclarations(context: TransformationContext | IsolatedT extendsClause.expression.kind !== SyntaxKind.FalseKeyword && extendsClause.expression.kind !== SyntaxKind.TrueKeyword ) { - reportIsolatedDeclarationError(extendsClause); + context.addDiagnostic(createDiagnosticForNode(extendsClause, Diagnostics.Extends_clause_can_t_contain_an_expression_with_isolatedDeclarations)); } return cleanup(factory.updateClassDeclaration( input, @@ -2022,7 +2007,7 @@ export function transformDeclarations(context: TransformationContext | IsolatedT // This will be its own compiler error instead, so don't report. !isComputedPropertyName(m.name) ) { - reportIsolatedDeclarationError(m); + 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) diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 38bfb4fb0c807..6cbd3c7d9eb0d 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -3,6 +3,8 @@ import { ArrayLiteralExpression, ArrowFunction, AsExpression, + BindingElement, + ComputedPropertyName, createDiagnosticForNode, createPropertyNameNodeForIdentifierOrLiteral, Debug, @@ -12,6 +14,7 @@ import { EntityNameOrEntityNameExpression, ExportAssignment, findAncestor, + FunctionDeclaration, FunctionExpression, GetAccessorDeclaration, getCommentRange, @@ -22,6 +25,8 @@ import { HasInferredType, hasSyntacticModifier, Identifier, + isAccessor, + isAsExpression, isBinaryExpression, isClassExpression, isComputedPropertyName, @@ -41,18 +46,23 @@ import { isOmittedExpression, isOptionalDeclaration, isParameter, + isParenthesizedExpression, isPrefixUnaryExpression, isPrivateIdentifier, isPropertyAssignment, isPropertyDeclaration, isPropertyName, + isPropertySignature, + isSetAccessor, isShorthandPropertyAssignment, isSpreadAssignment, isSpreadElement, + isStatement, isStringDoubleQuoted, isStringLiteral, isStringLiteralLike, isThisIdentifier, + isTypeAssertionExpression, isTypeLiteralNode, isTypeNode, isTypeParameterDeclaration, @@ -74,10 +84,14 @@ import { PrefixUnaryExpression, PropertyDeclaration, PropertyName, + PropertySignature, SetAccessorDeclaration, setCommentRange, setTextRange, + ShorthandPropertyAssignment, SourceFile, + SpreadAssignment, + SpreadElement, Symbol, SyntaxKind, TransformationContext, @@ -101,10 +115,35 @@ enum NarrowBehavior { NotKeepLiterals = ~KeepLiterals, } -const errorByDeclarationKind = { +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, +} 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.SpreadElement]: Diagnostics.Arrays_with_spread_elements_can_t_inferred_with_isolatedDeclarations, } satisfies Partial>; /** @@ -155,10 +194,7 @@ export function createLocalInferenceResolver({ currentSourceFile = sourceFile; try { const typeNode = localInferenceFromInitializer(node, type); - if (typeNode !== undefined) { - return { isInvalid: inferenceContext.isInvalid, typeNode }; - } - return { isInvalid: true, typeNode: invalid(node) }; + return { isInvalid: inferenceContext.isInvalid, typeNode }; } finally { currentSourceFile = oldSourceFile; @@ -181,13 +217,6 @@ export function createLocalInferenceResolver({ context.addDiagnostic(message); } - function reportIsolatedDeclarationError(node: Node, diagMessage: DiagnosticMessage = Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit) { - const message = createDiagnosticForNode( - node, - diagMessage, - ); - reportError(node, message); - } function makeInvalidType() { return factory.createTypeReferenceNode("invalid"); @@ -211,14 +240,91 @@ export function createLocalInferenceResolver({ return { getAccessorType, setAccessorType }; } - function createReturnTypeError(node: FunctionExpression | ArrowFunction) { - const diag = createDiagnosticForNode(node, Diagnostics.Function_must_have_an_explicit_type_annotation_with_with_isolatedDeclarations); - const parentDeclaration = findAncestor(node, (n): n is VariableDeclaration | PropertyDeclaration | ParameterDeclaration => isVariableDeclaration(n) || isPropertyDeclaration(n) || isParameter(n)); + function findNearestDeclaration(node: Node) { + const result = findAncestor(node, n => isStatement(n) ? "quit" : isVariableDeclaration(n) || isPropertyDeclaration(n) || isParameter(n)); + return result as VariableDeclaration | PropertyDeclaration | ParameterDeclaration | 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 = 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 = 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 = 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 = getTextOfNode(parentDeclaration.name, /*includeTrivia*/ false); - addRelatedInfo(diag, createDiagnosticForNode(parentDeclaration, errorByDeclarationKind[parentDeclaration.kind], targetStr)); + const parent = findAncestor(node.parent, 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); } - addRelatedInfo(diag, createDiagnosticForNode(node, Diagnostics.Add_a_return_type_to_the_function_expression)); return diag; } function localInference(node: Node, inferenceFlags: NarrowBehavior = NarrowBehavior.None): TypeNode { @@ -244,7 +350,7 @@ export function createLocalInferenceResolver({ const oldEnclosingDeclaration = setEnclosingDeclarations(node); try { const returnType = !fnNode.type ? invalid(fnNode, createReturnTypeError(fnNode)) : - visitTypeAndClone(fnNode.type, fnNode); + visitTypeAndClone(fnNode.type); const fnTypeNode = factory.createFunctionTypeNode( visitNodes(fnNode.typeParameters, visitDeclarationSubtree, isTypeParameterDeclaration)?.map(deepClone), fnNode.parameters.map(p => deepClone(ensureParameter(p))), @@ -272,7 +378,7 @@ export function createLocalInferenceResolver({ ); } - return visitTypeAndClone(type, asExpression); + return visitTypeAndClone(type); } case SyntaxKind.PrefixUnaryExpression: const prefixOp = node as PrefixUnaryExpression; @@ -310,7 +416,7 @@ export function createLocalInferenceResolver({ if (!(inferenceFlags & NarrowBehavior.AsConst)) { return factory.createKeywordTypeNode(SyntaxKind.StringKeyword); } - return invalid(node); + break; case SyntaxKind.NoSubstitutionTemplateLiteral: case SyntaxKind.StringLiteral: return literal(node, SyntaxKind.StringKeyword, inferenceFlags); @@ -320,14 +426,15 @@ export function createLocalInferenceResolver({ case SyntaxKind.FalseKeyword: return literal(node, SyntaxKind.BooleanKeyword, inferenceFlags); case SyntaxKind.ArrayLiteralExpression: + const arrayLiteral = node as ArrayLiteralExpression; + if (!(inferenceFlags & NarrowBehavior.AsConst)) { - return invalid(node); + return invalid(node, createArrayLiteralError(arrayLiteral)); } - const arrayLiteral = node as ArrayLiteralExpression; const elementTypesInfo: TypeNode[] = []; for (const element of arrayLiteral.elements) { if (isSpreadElement(element)) { - return invalid(element); + return invalid(element, createArrayLiteralError(element)); } else if (isOmittedExpression(element)) { elementTypesInfo.push( @@ -351,9 +458,9 @@ export function createLocalInferenceResolver({ } } - return invalid(node); + return invalid(node, createExpressionError(node)); } - function invalid(sourceNode: Node, diagMessage: DiagnosticWithLocation = createDiagnosticForNode(sourceNode, Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit)): TypeNode { + function invalid(sourceNode: Node, diagMessage: DiagnosticWithLocation): TypeNode { reportError(sourceNode, diagMessage); return makeInvalidType(); } @@ -363,11 +470,11 @@ export function createLocalInferenceResolver({ for (let propIndex = 0, length = objectLiteral.properties.length; propIndex < length; propIndex++) { const prop = objectLiteral.properties[propIndex]; if (isShorthandPropertyAssignment(prop)) { - reportIsolatedDeclarationError(prop); + reportError(prop, createObjectLiteralError(prop)); continue; } else if (isSpreadAssignment(prop)) { - reportIsolatedDeclarationError(prop); + reportError(prop, createObjectLiteralError(prop)); continue; } inferenceContext.disableErrors = hasParseError(prop.name) || hasParseError(prop); @@ -382,10 +489,9 @@ export function createLocalInferenceResolver({ } if (isComputedPropertyName(prop.name)) { if (!resolver.isLiteralComputedName(prop.name)) { - reportIsolatedDeclarationError(prop.name); - continue; + reportError(prop.name, createObjectLiteralError(prop.name)); } - if (isEntityNameExpression(prop.name.expression)) { + else if (isEntityNameExpression(prop.name.expression)) { checkEntityNameVisibility(prop.name.expression, prop); } } @@ -411,7 +517,7 @@ export function createLocalInferenceResolver({ ); } else { - newProp = handleAccessors(prop, name, nameKey); + newProp = handleAccessors(prop); } if (newProp) { @@ -443,7 +549,9 @@ export function createLocalInferenceResolver({ function handleMethodDeclaration(method: MethodDeclaration, name: PropertyName, inferenceFlags: NarrowBehavior) { const oldEnclosingDeclaration = setEnclosingDeclarations(method); try { - const returnType = visitTypeAndClone(method.type, method); + 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) { @@ -474,11 +582,7 @@ export function createLocalInferenceResolver({ } } - function handleAccessors(accessor: GetAccessorDeclaration | SetAccessorDeclaration, name: PropertyName, nameKey: string | undefined) { - if (!nameKey) { - return; - } - + 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 @@ -488,28 +592,31 @@ export function createLocalInferenceResolver({ if (isGetAccessor(accessor)) { return factory.createGetAccessorDeclaration( [], - name, + accessor.name, parameters, - visitTypeAndClone(accessor.type, accessor), + visitTypeAndClone(accessorType.getAccessorType), /*body*/ undefined, ); } else { return factory.createSetAccessorDeclaration( [], - name, + accessor.name, parameters, /*body*/ undefined, ); } } else if (firstAccessor === accessor) { - const type = accessorType.getAccessorType ?? accessorType.setAccessorType; + 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)] : [], - name, + accessor.name, /*questionToken*/ undefined, - visitTypeAndClone(type, accessor), + propertyType, ); } } @@ -547,9 +654,8 @@ export function createLocalInferenceResolver({ } } - function visitTypeAndClone(type: TypeNode | undefined, owner: Node) { - const visitedType = visitNode(type, visitDeclarationSubtree, isTypeNode); - if (!visitedType) return invalid(owner); + function visitTypeAndClone(type: TypeNode) { + const visitedType = visitNode(type, visitDeclarationSubtree, isTypeNode)!; return deepClone(visitedType); } @@ -642,9 +748,10 @@ export function createLocalInferenceResolver({ factory.createKeywordTypeNode(SyntaxKind.UndefinedKeyword), ]); } - function localInferenceFromInitializer(node: HasInferredType | ExportAssignment, type: TypeNode | undefined): TypeNode | undefined { - let localType: TypeNode | undefined; + function localInferenceFromInitializer(node: HasInferredType | ExportAssignment, type: TypeNode | undefined): TypeNode { if (isParameter(node)) { + let localType: TypeNode; + if (type) { localType = visitNode(type, visitDeclarationSubtree, isTypeNode)!; } @@ -654,7 +761,7 @@ export function createLocalInferenceResolver({ localType = localInference(node.initializer); } else { - localType = invalid(node); + localType = invalid(node, createParameterError(node)); } if (strictNullChecks && !inferenceContext.isInvalid) { @@ -674,9 +781,10 @@ export function createLocalInferenceResolver({ localType = addUndefinedInUnion(localType); } } + return localType; } else if (isExportAssignment(node)) { - localType = localInference(node.expression, NarrowBehavior.KeepLiterals); + return localInference(node.expression, NarrowBehavior.KeepLiterals); } else if (isVariableDeclaration(node)) { const firstDeclaration = node.symbol.valueDeclaration; @@ -686,11 +794,11 @@ export function createLocalInferenceResolver({ type = type ?? firstDeclaration.type; } if (type) { - localType = visitNode(type, visitDeclarationSubtree, isTypeNode)!; + return visitNode(type, visitDeclarationSubtree, isTypeNode)!; } else if (node.initializer) { if (isClassExpression(node.initializer)) { - localType = invalid(node.initializer, createDiagnosticForNode(node.initializer, Diagnostics.Declaration_emit_for_class_expressions_are_not_supported_with_isolatedDeclarations)); + return invalid(node.initializer, createDiagnosticForNode(node.initializer, Diagnostics.Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations)); } else { if (resolver.isExpandoFunction(node)) { @@ -711,25 +819,59 @@ export function createLocalInferenceResolver({ } }); } - localType = localInference(node.initializer, node.parent.flags & NodeFlags.Const ? NarrowBehavior.KeepLiterals : NarrowBehavior.None); + 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); + return visitNode(type, visitDeclarationSubtree, isTypeNode)!; } - else if (isPropertyDeclaration(node) && node.initializer) { - localType = localInference(node.initializer); - if (isOptionalDeclaration(node)) { - localType = addUndefinedInUnion(localType); + 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 (isInterfaceDeclaration(node.parent) || isTypeLiteralNode(node.parent)) { - return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); + 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 { - reportIsolatedDeclarationError(node); + 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)); + } } - return localType; } } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 110eefa96529a..679f4a3e191bb 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -11054,22 +11054,25 @@ export function createEntityVisibilityChecker isPrimitiveLiteralValue(t.expression)); + return node.templateSpans.every(t => isStringLiteral(t.expression) || isPositiveOrNegativeNumber(t.expression, /*includeBigInt*/ false)); } return false; -} \ No newline at end of file +} diff --git a/src/harness/isolatedDeclarationFixer.ts b/src/harness/isolatedDeclarationFixer.ts index 619c0cdecc8ff..95a7b2c2ebd9c 100644 --- a/src/harness/isolatedDeclarationFixer.ts +++ b/src/harness/isolatedDeclarationFixer.ts @@ -3,11 +3,24 @@ 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_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit, - ts.Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit, + 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_in_isolated_declaration_mode, - ts.Diagnostics.Function_must_have_an_explicit_type_annotation_with_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.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( diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index b248a90255200..f986df7e45565 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -56,6 +56,7 @@ import { isObjectBindingPattern, isObjectLiteralExpression, isOmittedExpression, + isParameter, isPrefixUnaryExpression, isPropertyAccessExpression, isPropertyAssignment, @@ -109,8 +110,21 @@ const addAnnotationFix = "add-annotation"; const addInlineTypeAssertion = "add-type-assertion"; const extractExpression = "extract-expression"; const errorCodes = [ - Diagnostics.Function_must_have_an_explicit_type_annotation_with_with_isolatedDeclarations, - Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit, + 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.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); @@ -244,10 +258,14 @@ function withChanges( const expandoFunction = findExpandoFunction(nodeWithDiag); // No inline assertions for expando members if (expandoFunction) return; - const targetNode = findTargetErrorNode(nodeWithDiag, span) as Expression; + 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; @@ -276,7 +294,6 @@ function withChanges( return undefined; } - const isShorthandPropertyAssignmentTarget = isIdentifier(targetNode) && isShorthandPropertyAssignment(targetNode.parent); if (!(isExpressionTarget || isShorthandPropertyAssignmentTarget)) return undefined; const { typeNode, mutatedTarget } = inferNodeType(targetNode); @@ -465,6 +482,9 @@ function withChanges( ) { 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. @@ -987,6 +1007,9 @@ function withChanges( } function relativeType(node: Node): InferenceResult { + if (isParameter(node)) { + return emptyInferenceResult; + } if (isEntityNameExpression(node)) { return { typeNode: createTypeOfFromEntityNameExpression(node), diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 3af125d167505..60f5e71596931 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -578,12 +578,25 @@ class IsolatedDeclarationTest extends CompilerTestBase { }); } private static dteDiagnosticErrors = new Set([ - ts.Diagnostics.Function_must_have_an_explicit_type_annotation_with_with_isolatedDeclarations, - ts.Diagnostics.Declaration_emit_for_this_file_requires_type_resolution_An_explicit_type_annotation_may_unblock_declaration_emit, - ts.Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit, + 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.Reference_directives_are_not_supported_in_isolated_declaration_mode, - ts.Diagnostics.Declaration_emit_for_class_expressions_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"; @@ -743,7 +756,7 @@ class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest { return env; } private static referenceDirectiveErrors = new Set([ - ts.Diagnostics.Declaration_emit_for_this_file_requires_adding_a_type_reference_directive_Add_a_type_reference_directive_to_0_to_unblock_declaration_emit.code, + 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_in_isolated_declaration_mode.code, ]); constructor(compilerEnvironment: CompilerTestEnvironment) { From 7133c47ce1ded5513bf0925e69f8cbac27d435f8 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 11 Dec 2023 01:19:19 +0000 Subject: [PATCH 184/224] Updated baseline Signed-off-by: Titian Cernicova-Dragomir --- .../reference/ES5SymbolProperty6.errors.txt | 10 +- .../baselines/reference/ES5SymbolProperty6.js | 2 + .../reference/ES5SymbolProperty6.symbols | 7 +- .../reference/ES5SymbolProperty6.types | 3 + .../computedPropertiesNarrowed.errors.txt | 30 +- ...rnTypeErrorInReturnStatement.d.ts.map.diff | 4 +- ...FlatNoCrashInferenceDeclarations.d.ts.diff | 7 +- .../diff/computedEnumTypeWidening.d.ts.diff | 16 +- .../auto-fixed/diff/constEnum2.d.ts.diff | 12 +- .../auto-fixed/diff/declFileEnums.d.ts.diff | 4 +- ...EmitCommonJsModuleReferencedType.d.ts.diff | 7 +- ...efaultExportWithStaticAssignment.d.ts.diff | 20 +- ...DestructuringParameterProperties.d.ts.diff | 60 +- ...onEmitExpandoPropertyPrivateName.d.ts.diff | 4 +- ...EmitForGlobalishSpecifierSymlink.d.ts.diff | 7 +- ...mitForGlobalishSpecifierSymlink2.d.ts.diff | 7 +- ...onEmitFunctionDuplicateNamespace.d.ts.diff | 4 +- ...clarationEmitFunctionKeywordProp.d.ts.diff | 20 +- ...larationEmitLateBoundAssignments.d.ts.diff | 20 +- ...arationEmitLateBoundAssignments2.d.ts.diff | 40 +- ...nEmitObjectAssignedDefaultExport.d.ts.diff | 4 +- ...efersPathKindBasedOnBundling.d.ts.map.diff | 2 +- ...fersPathKindBasedOnBundling2.d.ts.map.diff | 4 +- ...onEmitReexportedSymlinkReference.d.ts.diff | 7 +- ...nEmitReexportedSymlinkReference2.d.ts.diff | 7 +- ...nEmitReexportedSymlinkReference3.d.ts.diff | 7 +- ...mitWithInvalidPackageJsonTypings.d.ts.diff | 8 +- .../diff/declarationFiles.d.ts.diff | 12 +- ...ClassExpressionInDeclarationFile.d.ts.diff | 8 +- ...lassExpressionInDeclarationFile2.d.ts.diff | 4 +- .../diff/enumClassification.d.ts.diff | 16 +- ...hTemplateLiteralsEmitDeclaration.d.ts.diff | 4 +- .../expandoFunctionBlockShadowing.d.ts.diff | 4 +- .../expandoFunctionNestedAssigments.d.ts.diff | 92 +-- .../diff/exportDefaultNamespace.d.ts.diff | 4 +- .../diff/isolatedDeclarationErrors.d.ts.diff | 4 +- ...isolatedDeclarationErrorsClasses.d.ts.diff | 25 + ...isolatedDeclarationErrorsObjects.d.ts.diff | 19 + ...tionMemberAssignmentDeclarations.d.ts.diff | 8 +- ...rtsSpecifierGenerationConditions.d.ts.diff | 8 +- ...nodeModuleReexportFromDottedPath.d.ts.diff | 4 +- ...ecifierResolution(module=node16).d.ts.diff | 7 +- ...ifierResolution(module=nodenext).d.ts.diff | 7 +- ...esExportsSourceTs(module=node16).d.ts.diff | 7 +- ...ExportsSourceTs(module=nodenext).d.ts.diff | 7 +- ...erationConditions(module=node16).d.ts.diff | 7 +- ...ationConditions(module=nodenext).d.ts.diff | 7 +- ...nerationDirectory(module=node16).d.ts.diff | 7 +- ...rationDirectory(module=nodenext).d.ts.diff | 7 +- ...GenerationPattern(module=node16).d.ts.diff | 7 +- ...nerationPattern(module=nodenext).d.ts.diff | 7 +- .../diff/nullPropertyName.d.ts.diff | 312 ++++---- .../diff/numericEnumMappedType.d.ts.diff | 16 +- .../diff/symbolDeclarationEmit12.d.ts.diff | 26 +- ...larationEmitModuleNamesImportRef.d.ts.diff | 7 +- .../diff/templateLiteralTypes4.d.ts.diff | 8 +- .../thisTypeInObjectLiterals2.d.ts.map.diff | 4 +- .../typeFromPropertyAssignment29.d.ts.diff | 24 +- ...ersionsDeclarationEmit.multiFile.d.ts.diff | 12 +- ...mit.multiFileBackReferenceToSelf.d.ts.diff | 7 +- ...multiFileBackReferenceToUnmapped.d.ts.diff | 12 +- .../uniqueSymbolsDeclarationsErrors.d.ts.diff | 4 +- .../diff/varianceAnnotations.d.ts.diff | 8 +- ...dReturnTypeErrorInReturnStatement.d.ts.map | 4 +- ...yFakeFlatNoCrashInferenceDeclarations.d.ts | 5 +- .../dte/computedEnumTypeWidening.d.ts | 16 +- .../auto-fixed/dte/constEnum2.d.ts | 12 +- .../auto-fixed/dte/declFileEnums.d.ts | 4 +- ...ationEmitCommonJsModuleReferencedType.d.ts | 5 +- ...EmitDefaultExportWithStaticAssignment.d.ts | 20 +- ...nEmitDestructuringParameterProperties.d.ts | 29 +- ...arationEmitExpandoPropertyPrivateName.d.ts | 4 +- ...ationEmitForGlobalishSpecifierSymlink.d.ts | 5 +- ...tionEmitForGlobalishSpecifierSymlink2.d.ts | 5 +- ...arationEmitFunctionDuplicateNamespace.d.ts | 4 +- .../declarationEmitFunctionKeywordProp.d.ts | 20 +- .../declarationEmitLateBoundAssignments.d.ts | 20 +- .../declarationEmitLateBoundAssignments2.d.ts | 40 +- ...rationEmitObjectAssignedDefaultExport.d.ts | 4 +- ...mitPrefersPathKindBasedOnBundling.d.ts.map | 2 +- ...itPrefersPathKindBasedOnBundling2.d.ts.map | 4 +- ...arationEmitReexportedSymlinkReference.d.ts | 5 +- ...rationEmitReexportedSymlinkReference2.d.ts | 5 +- ...rationEmitReexportedSymlinkReference3.d.ts | 5 +- ...tionEmitWithInvalidPackageJsonTypings.d.ts | 8 +- .../auto-fixed/dte/declarationFiles.d.ts | 10 +- .../emitClassExpressionInDeclarationFile.d.ts | 8 +- ...emitClassExpressionInDeclarationFile2.d.ts | 4 +- .../auto-fixed/dte/enumClassification.d.ts | 16 +- ...erWithTemplateLiteralsEmitDeclaration.d.ts | 4 +- .../dte/expandoFunctionBlockShadowing.d.ts | 4 +- .../dte/expandoFunctionNestedAssigments.d.ts | 92 +-- .../dte/exportDefaultNamespace.d.ts | 4 +- .../dte/isolatedDeclarationErrors.d.ts | 4 +- .../dte/isolatedDeclarationErrorsClasses.d.ts | 87 +++ .../dte/isolatedDeclarationErrorsObjects.d.ts | 342 +++++++++ ...dFunctionMemberAssignmentDeclarations.d.ts | 8 +- ...sExportsSpecifierGenerationConditions.d.ts | 8 +- .../dte/nodeModuleReexportFromDottedPath.d.ts | 4 +- ...cksSpecifierResolution(module=node16).d.ts | 5 +- ...sSpecifierResolution(module=nodenext).d.ts | 5 +- ...ModulesExportsSourceTs(module=node16).d.ts | 5 +- ...dulesExportsSourceTs(module=nodenext).d.ts | 5 +- ...erGenerationConditions(module=node16).d.ts | 5 +- ...GenerationConditions(module=nodenext).d.ts | 5 +- ...ierGenerationDirectory(module=node16).d.ts | 5 +- ...rGenerationDirectory(module=nodenext).d.ts | 5 +- ...ifierGenerationPattern(module=node16).d.ts | 5 +- ...ierGenerationPattern(module=nodenext).d.ts | 5 +- .../auto-fixed/dte/nullPropertyName.d.ts | 312 ++++---- .../auto-fixed/dte/numericEnumMappedType.d.ts | 16 +- .../dte/symbolDeclarationEmit12.d.ts | 17 +- ...nkDeclarationEmitModuleNamesImportRef.d.ts | 5 +- .../auto-fixed/dte/templateLiteralTypes4.d.ts | 8 +- .../dte/thisTypeInObjectLiterals2.d.ts.map | 4 +- .../dte/typeFromPropertyAssignment29.d.ts | 24 +- ...ypesVersionsDeclarationEmit.multiFile.d.ts | 10 +- ...tionEmit.multiFileBackReferenceToSelf.d.ts | 5 +- ...Emit.multiFileBackReferenceToUnmapped.d.ts | 10 +- .../dte/uniqueSymbolsDeclarationsErrors.d.ts | 4 +- .../auto-fixed/dte/varianceAnnotations.d.ts | 8 +- .../tsc/isolatedDeclarationErrorsClasses.d.ts | 81 +++ .../tsc/isolatedDeclarationErrorsObjects.d.ts | 341 +++++++++ .../tsc/symbolDeclarationEmit12.d.ts | 4 +- .../diff/ES5For-ofTypeCheck10.d.ts.diff | 35 + .../diff/ES5SymbolProperty1.d.ts.diff | 7 +- .../diff/ES5SymbolProperty2.d.ts.diff | 32 + .../diff/ES5SymbolProperty3.d.ts.diff | 30 + .../diff/ES5SymbolProperty4.d.ts.diff | 30 + .../diff/ES5SymbolProperty5.d.ts.diff | 30 + .../diff/ES5SymbolProperty6.d.ts.diff | 34 + .../diff/ES5SymbolProperty7.d.ts.diff | 30 + .../diff/FunctionDeclaration8_es6.d.ts.diff | 19 +- .../MemberFunctionDeclaration3_es6.d.ts.diff | 30 + .../original/diff/asOperator1.d.ts.diff | 2 +- ...asyncFunctionDeclaration8_es2017.d.ts.diff | 19 +- .../asyncFunctionDeclaration8_es5.d.ts.diff | 19 +- .../asyncFunctionDeclaration8_es6.d.ts.diff | 19 +- .../original/diff/bigintIndex.d.ts.diff | 13 +- .../diff/booleanFilterAnyArray.d.ts.diff | 2 +- ...apturedParametersInInitializers1.d.ts.diff | 28 + .../diff/computedPropertiesNarrowed.d.ts.diff | 31 +- .../computedPropertyNames10_ES5.d.ts.diff | 70 ++ .../computedPropertyNames10_ES6.d.ts.diff | 70 ++ .../computedPropertyNames11_ES5.d.ts.diff | 65 ++ .../computedPropertyNames11_ES6.d.ts.diff | 65 ++ .../computedPropertyNames12_ES5.d.ts.diff | 20 +- .../computedPropertyNames12_ES6.d.ts.diff | 20 +- .../computedPropertyNames13_ES5.d.ts.diff | 55 ++ .../computedPropertyNames13_ES6.d.ts.diff | 55 ++ .../computedPropertyNames14_ES5.d.ts.diff | 50 ++ .../computedPropertyNames14_ES6.d.ts.diff | 50 ++ .../computedPropertyNames15_ES5.d.ts.diff | 51 ++ .../computedPropertyNames15_ES6.d.ts.diff | 51 ++ .../computedPropertyNames16_ES5.d.ts.diff | 44 +- .../computedPropertyNames16_ES6.d.ts.diff | 44 +- .../computedPropertyNames17_ES5.d.ts.diff | 50 ++ .../computedPropertyNames17_ES6.d.ts.diff | 50 ++ .../diff/computedPropertyNames2_ES5.d.ts.diff | 69 +- .../diff/computedPropertyNames2_ES6.d.ts.diff | 69 +- .../diff/computedPropertyNames4_ES5.d.ts.diff | 50 +- .../diff/computedPropertyNames4_ES6.d.ts.diff | 50 +- .../diff/computedPropertyNames5_ES5.d.ts.diff | 22 +- .../diff/computedPropertyNames5_ES6.d.ts.diff | 22 +- .../diff/computedPropertyNames6_ES5.d.ts.diff | 17 +- .../diff/computedPropertyNames6_ES6.d.ts.diff | 17 +- ...utedPropertyNamesOnOverloads_ES5.d.ts.diff | 33 +- ...utedPropertyNamesOnOverloads_ES6.d.ts.diff | 33 +- ...dPropertyNamesWithStaticProperty.d.ts.diff | 10 +- .../original/diff/constEnumErrors.d.ts.diff | 6 +- .../contextualReturnTypeOfIIFE2.d.ts.diff | 4 +- ...ionEmitHasTypesRefOnNamespaceUse.d.ts.diff | 4 +- ...larationFilesWithTypeReferences2.d.ts.diff | 4 +- .../decoratorsOnComputedProperties.d.ts.diff | 74 +- ...edClassOverridesProtectedMembers.d.ts.diff | 49 ++ ...dClassOverridesProtectedMembers2.d.ts.diff | 49 ++ ...dClassOverridesProtectedMembers3.d.ts.diff | 28 + ...rivedClassOverridesPublicMembers.d.ts.diff | 49 ++ .../original/diff/forwardRefInEnum.d.ts.diff | 12 +- .../diff/gettersAndSettersErrors.d.ts.diff | 2 +- ...xSignatureMustHaveTypeAnnotation.d.ts.diff | 4 +- .../diff/indexWithoutParamType2.d.ts.diff | 4 +- ...isolatedDeclarationErrorsClasses.d.ts.diff | 62 ++ ...omUsingES6FeaturesWithOnlyES5Lib.d.ts.diff | 56 ++ .../diff/overloadsWithComputedNames.d.ts.diff | 38 +- .../parserComputedPropertyName1.d.ts.diff | 7 +- .../parserComputedPropertyName10.d.ts.diff | 4 +- .../parserComputedPropertyName11.d.ts.diff | 32 + .../parserComputedPropertyName12.d.ts.diff | 30 + .../parserComputedPropertyName17.d.ts.diff | 27 + .../parserComputedPropertyName2.d.ts.diff | 7 +- .../parserComputedPropertyName22.d.ts.diff | 4 +- .../parserComputedPropertyName23.d.ts.diff | 4 +- .../parserComputedPropertyName24.d.ts.diff | 6 +- .../parserComputedPropertyName25.d.ts.diff | 6 +- .../parserComputedPropertyName27.d.ts.diff | 6 +- .../parserComputedPropertyName28.d.ts.diff | 8 +- .../parserComputedPropertyName29.d.ts.diff | 14 +- .../parserComputedPropertyName3.d.ts.diff | 29 + .../parserComputedPropertyName31.d.ts.diff | 8 +- .../parserComputedPropertyName32.d.ts.diff | 4 +- .../parserComputedPropertyName33.d.ts.diff | 6 +- .../parserComputedPropertyName36.d.ts.diff | 4 +- .../parserComputedPropertyName37.d.ts.diff | 7 +- .../parserComputedPropertyName38.d.ts.diff | 31 + .../parserComputedPropertyName39.d.ts.diff | 32 + .../parserComputedPropertyName4.d.ts.diff | 30 + .../parserComputedPropertyName5.d.ts.diff | 32 + .../parserComputedPropertyName6.d.ts.diff | 11 +- .../parserComputedPropertyName7.d.ts.diff | 32 + .../parserComputedPropertyName8.d.ts.diff | 32 + .../parserComputedPropertyName9.d.ts.diff | 4 +- .../parserES5ComputedPropertyName1.d.ts.diff | 4 +- .../parserES5ComputedPropertyName10.d.ts.diff | 4 +- .../parserES5ComputedPropertyName11.d.ts.diff | 32 + .../parserES5ComputedPropertyName2.d.ts.diff | 7 +- .../parserES5ComputedPropertyName3.d.ts.diff | 29 + .../parserES5ComputedPropertyName4.d.ts.diff | 30 + .../parserES5ComputedPropertyName7.d.ts.diff | 32 + .../parserES5ComputedPropertyName9.d.ts.diff | 4 +- .../diff/parserES5SymbolProperty3.d.ts.diff | 4 +- .../diff/parserES5SymbolProperty4.d.ts.diff | 4 +- .../diff/parserES5SymbolProperty5.d.ts.diff | 4 +- .../diff/parserES5SymbolProperty6.d.ts.diff | 4 +- .../diff/parserES5SymbolProperty7.d.ts.diff | 4 +- .../original/diff/parserStrictMode8.d.ts.diff | 7 +- ...s(usedefineforclassfields=false).d.ts.diff | 12 +- ...ts(usedefineforclassfields=true).d.ts.diff | 12 +- .../diff/superSymbolIndexedAccess1.d.ts.diff | 45 ++ .../diff/superSymbolIndexedAccess3.d.ts.diff | 46 ++ .../diff/superSymbolIndexedAccess4.d.ts.diff | 33 + .../diff/superSymbolIndexedAccess5.d.ts.diff | 43 ++ .../diff/superSymbolIndexedAccess6.d.ts.diff | 43 ++ .../diff/symbolDeclarationEmit12.d.ts.diff | 25 +- .../original/diff/symbolProperty1.d.ts.diff | 32 +- .../original/diff/symbolProperty2.d.ts.diff | 37 +- .../original/diff/symbolProperty3.d.ts.diff | 39 +- .../original/diff/symbolProperty52.d.ts.diff | 7 +- .../original/diff/symbolProperty53.d.ts.diff | 7 +- .../original/diff/symbolProperty54.d.ts.diff | 7 +- .../original/diff/symbolProperty58.d.ts.diff | 7 +- .../typeFromPropertyAssignment32.d.ts.diff | 44 +- .../typeFromPropertyAssignment33.d.ts.diff | 44 +- .../diff/typeReferenceDirectives11.d.ts.diff | 8 +- .../diff/typeReferenceDirectives2.d.ts.diff | 4 +- .../diff/typeReferenceDirectives8.d.ts.diff | 10 +- .../original/dte/ES5For-ofTypeCheck10.d.ts | 64 ++ .../original/dte/ES5SymbolProperty2.d.ts | 49 ++ .../original/dte/ES5SymbolProperty3.d.ts | 37 + .../original/dte/ES5SymbolProperty4.d.ts | 39 + .../original/dte/ES5SymbolProperty5.d.ts | 39 + .../original/dte/ES5SymbolProperty6.d.ts | 46 ++ .../original/dte/ES5SymbolProperty7.d.ts | 39 + .../dte/FunctionDeclaration8_es6.d.ts | 6 +- .../dte/MemberFunctionDeclaration3_es6.d.ts | 34 + .../original/dte/arrayFind.d.ts | 5 +- .../original/dte/asOperator1.d.ts | 5 +- .../dte/asyncFunctionDeclaration8_es2017.d.ts | 6 +- .../dte/asyncFunctionDeclaration8_es5.d.ts | 6 +- .../dte/asyncFunctionDeclaration8_es6.d.ts | 6 +- .../original/dte/bigintIndex.d.ts | 10 +- .../original/dte/booleanFilterAnyArray.d.ts | 5 +- .../capturedParametersInInitializers1.d.ts | 97 +-- .../original/dte/complicatedPrivacy.d.ts | 42 +- .../dte/computedPropertiesNarrowed.d.ts | 25 +- .../dte/computedPropertyNames10_ES5.d.ts | 126 ++++ .../dte/computedPropertyNames10_ES6.d.ts | 126 ++++ .../dte/computedPropertyNames11_ES5.d.ts | 115 +++ .../dte/computedPropertyNames11_ES6.d.ts | 115 +++ .../dte/computedPropertyNames12_ES5.d.ts | 5 +- .../dte/computedPropertyNames12_ES6.d.ts | 5 +- .../dte/computedPropertyNames13_ES5.d.ts | 82 +++ .../dte/computedPropertyNames13_ES6.d.ts | 82 +++ .../dte/computedPropertyNames14_ES5.d.ts | 64 ++ .../dte/computedPropertyNames14_ES6.d.ts | 64 ++ .../dte/computedPropertyNames15_ES5.d.ts | 57 ++ .../dte/computedPropertyNames15_ES6.d.ts | 57 ++ .../dte/computedPropertyNames16_ES5.d.ts | 30 +- .../dte/computedPropertyNames16_ES6.d.ts | 30 +- .../dte/computedPropertyNames17_ES5.d.ts | 64 ++ .../dte/computedPropertyNames17_ES6.d.ts | 64 ++ .../dte/computedPropertyNames2_ES5.d.ts | 30 +- .../dte/computedPropertyNames2_ES6.d.ts | 30 +- .../dte/computedPropertyNames4_ES5.d.ts | 38 +- .../dte/computedPropertyNames4_ES6.d.ts | 38 +- .../dte/computedPropertyNames5_ES5.d.ts | 15 +- .../dte/computedPropertyNames5_ES6.d.ts | 15 +- .../computedPropertyNamesOnOverloads_ES5.d.ts | 10 +- .../computedPropertyNamesOnOverloads_ES6.d.ts | 10 +- .../original/dte/constEnumErrors.d.ts | 37 +- .../original/dte/contextualTyping.d.ts | 15 +- .../original/dte/correlatedUnions.d.ts | 75 +- ...larationEmitWithDefaultAsComputedName.d.ts | 4 +- ...arationEmitWithDefaultAsComputedName2.d.ts | 4 +- ...taWithImportDeclarationNameCollision7.d.ts | 5 +- .../dte/decoratorsOnComputedProperties.d.ts | 5 +- ...derivedClassOverridesProtectedMembers.d.ts | 134 ++++ ...erivedClassOverridesProtectedMembers2.d.ts | 250 +++++++ ...erivedClassOverridesProtectedMembers3.d.ts | 289 ++++++++ .../derivedClassOverridesPublicMembers.d.ts | 248 +++++++ .../duplicateVarsAcrossFileBoundaries.d.ts | 10 +- .../original/dte/dynamicNames.d.ts | 20 +- .../original/dte/escapedIdentifiers.d.ts | 30 +- .../original/dte/forwardRefInEnum.d.ts | 16 +- .../dte/generatedContextualTyping.d.ts | 367 +++++----- ...nericTypeReferenceWithoutTypeArgument.d.ts | 18 +- ...ericTypeReferenceWithoutTypeArgument2.d.ts | 18 +- .../original/dte/gettersAndSettersErrors.d.ts | 7 +- .../original/dte/giant.d.ts | 505 +++++++------ .../dte/inKeywordAndIntersection.d.ts | 5 +- .../original/dte/intTypeCheck.d.ts | 55 +- .../dte/isolatedDeclarationErrorsClasses.d.ts | 204 ++++++ .../dte/literalTypesAndTypeAssertions.d.ts | 16 +- ...rorFromUsingES6FeaturesWithOnlyES5Lib.d.ts | 203 ++++++ .../original/dte/namedTupleMembers.d.ts | 20 +- .../dte/noUncheckedIndexedAccess.d.ts | 8 +- ...eDeclarationEmitErrors(module=node16).d.ts | 30 +- ...eclarationEmitErrors(module=nodenext).d.ts | 30 +- ...DeclarationEmitErrors1(module=node16).d.ts | 30 +- ...clarationEmitErrors1(module=nodenext).d.ts | 30 +- .../dte/objectLiteralGettersAndSetters.d.ts | 90 ++- .../dte/optionalChainingInference.d.ts | 36 +- .../dte/overloadsWithComputedNames.d.ts | 5 +- .../dte/parseInvalidNonNullableTypes.d.ts | 20 +- .../dte/parseInvalidNullableTypes.d.ts | 20 +- .../original/dte/parseTypes.d.ts | 10 +- .../dte/parserComputedPropertyName11.d.ts | 37 + .../dte/parserComputedPropertyName12.d.ts | 34 + .../dte/parserComputedPropertyName17.d.ts | 25 + .../dte/parserComputedPropertyName24.d.ts | 5 +- .../dte/parserComputedPropertyName25.d.ts | 5 +- .../dte/parserComputedPropertyName27.d.ts | 5 +- .../dte/parserComputedPropertyName29.d.ts | 5 +- .../dte/parserComputedPropertyName3.d.ts | 26 + .../dte/parserComputedPropertyName33.d.ts | 5 +- .../dte/parserComputedPropertyName38.d.ts | 37 + .../dte/parserComputedPropertyName39.d.ts | 39 + .../dte/parserComputedPropertyName4.d.ts | 28 + .../dte/parserComputedPropertyName5.d.ts | 31 + .../dte/parserComputedPropertyName6.d.ts | 5 +- .../dte/parserComputedPropertyName7.d.ts | 37 + .../dte/parserComputedPropertyName8.d.ts | 37 + .../dte/parserES5ComputedPropertyName11.d.ts | 37 + .../dte/parserES5ComputedPropertyName3.d.ts | 26 + .../dte/parserES5ComputedPropertyName4.d.ts | 28 + .../dte/parserES5ComputedPropertyName7.d.ts | 37 + .../original/dte/parserStrictMode8.d.ts | 5 +- ...ingDestructuredPropertyInFunctionType.d.ts | 161 +++-- ...flicts(usedefineforclassfields=false).d.ts | 50 +- ...nflicts(usedefineforclassfields=true).d.ts | 50 +- .../dte/superSymbolIndexedAccess1.d.ts | 60 ++ .../dte/superSymbolIndexedAccess3.d.ts | 63 ++ .../dte/superSymbolIndexedAccess4.d.ts | 44 ++ .../dte/superSymbolIndexedAccess5.d.ts | 56 ++ .../dte/superSymbolIndexedAccess6.d.ts | 56 ++ .../original/dte/symbolDeclarationEmit12.d.ts | 10 +- .../original/dte/symbolProperty1.d.ts | 11 +- .../original/dte/symbolProperty2.d.ts | 16 +- .../original/dte/symbolProperty3.d.ts | 16 +- .../original/dte/thisTypeErrors.d.ts | 10 +- .../original/dte/thisTypeInAccessors.d.ts | 11 +- .../dte/typeFromPropertyAssignment32.d.ts | 42 +- .../dte/typeFromPropertyAssignment33.d.ts | 42 +- .../dte/typeReferenceDirectives11.d.ts | 5 +- .../dte/typeReferenceDirectives13.d.ts | 4 +- .../dte/typeReferenceDirectives5.d.ts | 4 +- .../dte/typeReferenceDirectives8.d.ts | 5 +- .../dte/typeUsedAsTypeLiteralIndex.d.ts | 5 +- .../original/tsc/ES5For-ofTypeCheck10.d.ts | 67 ++ .../original/tsc/ES5SymbolProperty1.d.ts | 5 +- .../original/tsc/ES5SymbolProperty2.d.ts | 52 ++ .../original/tsc/ES5SymbolProperty3.d.ts | 40 ++ .../original/tsc/ES5SymbolProperty4.d.ts | 42 ++ .../original/tsc/ES5SymbolProperty5.d.ts | 42 ++ .../original/tsc/ES5SymbolProperty6.d.ts | 49 ++ .../original/tsc/ES5SymbolProperty7.d.ts | 42 ++ .../tsc/FunctionDeclaration8_es6.d.ts | 14 +- .../tsc/MemberFunctionDeclaration3_es6.d.ts | 37 + .../original/tsc/arrayFind.d.ts | 5 +- .../original/tsc/asOperator1.d.ts | 5 +- .../tsc/asyncFunctionDeclaration8_es2017.d.ts | 14 +- .../tsc/asyncFunctionDeclaration8_es5.d.ts | 14 +- .../tsc/asyncFunctionDeclaration8_es6.d.ts | 14 +- .../original/tsc/bigintIndex.d.ts | 15 +- .../original/tsc/booleanFilterAnyArray.d.ts | 5 +- .../capturedParametersInInitializers1.d.ts | 103 +-- .../original/tsc/complicatedPrivacy.d.ts | 42 +- .../tsc/computedPropertiesNarrowed.d.ts | 30 +- .../tsc/computedPropertyNames10_ES5.d.ts | 138 ++++ .../tsc/computedPropertyNames10_ES6.d.ts | 138 ++++ .../tsc/computedPropertyNames11_ES5.d.ts | 127 ++++ .../tsc/computedPropertyNames11_ES6.d.ts | 127 ++++ .../tsc/computedPropertyNames12_ES5.d.ts | 17 +- .../tsc/computedPropertyNames12_ES6.d.ts | 17 +- .../tsc/computedPropertyNames13_ES5.d.ts | 91 +++ .../tsc/computedPropertyNames13_ES6.d.ts | 91 +++ .../tsc/computedPropertyNames14_ES5.d.ts | 70 ++ .../tsc/computedPropertyNames14_ES6.d.ts | 70 ++ .../tsc/computedPropertyNames15_ES5.d.ts | 66 ++ .../tsc/computedPropertyNames15_ES6.d.ts | 66 ++ .../tsc/computedPropertyNames16_ES5.d.ts | 43 +- .../tsc/computedPropertyNames16_ES6.d.ts | 43 +- .../tsc/computedPropertyNames17_ES5.d.ts | 70 ++ .../tsc/computedPropertyNames17_ES6.d.ts | 70 ++ .../tsc/computedPropertyNames2_ES5.d.ts | 52 +- .../tsc/computedPropertyNames2_ES6.d.ts | 52 +- .../tsc/computedPropertyNames4_ES5.d.ts | 52 +- .../tsc/computedPropertyNames4_ES6.d.ts | 52 +- .../tsc/computedPropertyNames5_ES5.d.ts | 25 +- .../tsc/computedPropertyNames5_ES6.d.ts | 25 +- .../tsc/computedPropertyNames6_ES5.d.ts | 15 +- .../tsc/computedPropertyNames6_ES6.d.ts | 15 +- .../computedPropertyNamesOnOverloads_ES5.d.ts | 26 +- .../computedPropertyNamesOnOverloads_ES6.d.ts | 26 +- .../original/tsc/constEnumErrors.d.ts | 33 +- .../tsc/contextualReturnTypeOfIIFE2.d.ts | 4 +- .../original/tsc/contextualTyping.d.ts | 15 +- .../original/tsc/correlatedUnions.d.ts | 75 +- ...larationEmitHasTypesRefOnNamespaceUse.d.ts | 4 +- ...larationEmitWithDefaultAsComputedName.d.ts | 4 +- ...arationEmitWithDefaultAsComputedName2.d.ts | 4 +- .../declarationFilesWithTypeReferences2.d.ts | 4 +- ...taWithImportDeclarationNameCollision7.d.ts | 5 +- .../tsc/decoratorsOnComputedProperties.d.ts | 65 +- ...derivedClassOverridesProtectedMembers.d.ts | 144 ++++ ...erivedClassOverridesProtectedMembers2.d.ts | 260 +++++++ ...erivedClassOverridesProtectedMembers3.d.ts | 293 ++++++++ .../derivedClassOverridesPublicMembers.d.ts | 258 +++++++ .../duplicateVarsAcrossFileBoundaries.d.ts | 10 +- .../original/tsc/dynamicNames.d.ts | 20 +- .../original/tsc/escapedIdentifiers.d.ts | 30 +- .../original/tsc/forwardRefInEnum.d.ts | 8 +- .../tsc/generatedContextualTyping.d.ts | 367 +++++----- ...nericTypeReferenceWithoutTypeArgument.d.ts | 18 +- ...ericTypeReferenceWithoutTypeArgument2.d.ts | 18 +- .../original/tsc/gettersAndSettersErrors.d.ts | 7 +- .../original/tsc/giant.d.ts | 505 +++++++------ .../tsc/inKeywordAndIntersection.d.ts | 5 +- .../indexSignatureMustHaveTypeAnnotation.d.ts | 4 +- .../original/tsc/indexWithoutParamType2.d.ts | 4 +- .../original/tsc/intTypeCheck.d.ts | 55 +- .../tsc/isolatedDeclarationErrorsClasses.d.ts | 216 ++++++ .../tsc/literalTypesAndTypeAssertions.d.ts | 16 +- ...rorFromUsingES6FeaturesWithOnlyES5Lib.d.ts | 211 ++++++ ...tionWithSuffixes_one_externalTSModule.d.ts | 5 +- .../original/tsc/namedTupleMembers.d.ts | 20 +- .../tsc/noUncheckedIndexedAccess.d.ts | 8 +- ...eDeclarationEmitErrors(module=node16).d.ts | 30 +- ...eclarationEmitErrors(module=nodenext).d.ts | 30 +- ...DeclarationEmitErrors1(module=node16).d.ts | 30 +- ...clarationEmitErrors1(module=nodenext).d.ts | 30 +- .../tsc/objectLiteralGettersAndSetters.d.ts | 90 ++- .../tsc/optionalChainingInference.d.ts | 36 +- .../tsc/overloadsWithComputedNames.d.ts | 35 +- .../tsc/parseInvalidNonNullableTypes.d.ts | 20 +- .../tsc/parseInvalidNullableTypes.d.ts | 20 +- .../original/tsc/parseTypes.d.ts | 10 +- .../tsc/parserComputedPropertyName1.d.ts | 5 +- .../tsc/parserComputedPropertyName10.d.ts | 4 +- .../tsc/parserComputedPropertyName11.d.ts | 40 ++ .../tsc/parserComputedPropertyName12.d.ts | 37 + .../tsc/parserComputedPropertyName17.d.ts | 29 + .../tsc/parserComputedPropertyName2.d.ts | 5 +- .../tsc/parserComputedPropertyName22.d.ts | 4 +- .../tsc/parserComputedPropertyName23.d.ts | 4 +- .../tsc/parserComputedPropertyName24.d.ts | 9 +- .../tsc/parserComputedPropertyName25.d.ts | 9 +- .../tsc/parserComputedPropertyName27.d.ts | 9 +- .../tsc/parserComputedPropertyName28.d.ts | 8 +- .../tsc/parserComputedPropertyName29.d.ts | 13 +- .../tsc/parserComputedPropertyName3.d.ts | 30 + .../tsc/parserComputedPropertyName31.d.ts | 8 +- .../tsc/parserComputedPropertyName32.d.ts | 4 +- .../tsc/parserComputedPropertyName33.d.ts | 9 +- .../tsc/parserComputedPropertyName36.d.ts | 4 +- .../tsc/parserComputedPropertyName37.d.ts | 5 +- .../tsc/parserComputedPropertyName38.d.ts | 40 ++ .../tsc/parserComputedPropertyName39.d.ts | 42 ++ .../tsc/parserComputedPropertyName4.d.ts | 32 + .../tsc/parserComputedPropertyName5.d.ts | 35 + .../tsc/parserComputedPropertyName6.d.ts | 10 +- .../tsc/parserComputedPropertyName7.d.ts | 40 ++ .../tsc/parserComputedPropertyName8.d.ts | 40 ++ .../tsc/parserComputedPropertyName9.d.ts | 4 +- .../tsc/parserES5ComputedPropertyName1.d.ts | 4 +- .../tsc/parserES5ComputedPropertyName10.d.ts | 4 +- .../tsc/parserES5ComputedPropertyName11.d.ts | 40 ++ .../tsc/parserES5ComputedPropertyName2.d.ts | 5 +- .../tsc/parserES5ComputedPropertyName3.d.ts | 30 + .../tsc/parserES5ComputedPropertyName4.d.ts | 32 + .../tsc/parserES5ComputedPropertyName7.d.ts | 40 ++ .../tsc/parserES5ComputedPropertyName9.d.ts | 4 +- .../tsc/parserES5SymbolProperty3.d.ts | 4 +- .../tsc/parserES5SymbolProperty4.d.ts | 4 +- .../tsc/parserES5SymbolProperty5.d.ts | 4 +- .../tsc/parserES5SymbolProperty6.d.ts | 4 +- .../tsc/parserES5SymbolProperty7.d.ts | 4 +- ...ingDestructuredPropertyInFunctionType.d.ts | 161 +++-- ...flicts(usedefineforclassfields=false).d.ts | 54 +- ...nflicts(usedefineforclassfields=true).d.ts | 54 +- .../tsc/superSymbolIndexedAccess1.d.ts | 66 ++ .../tsc/superSymbolIndexedAccess3.d.ts | 69 ++ .../tsc/superSymbolIndexedAccess4.d.ts | 47 ++ .../tsc/superSymbolIndexedAccess5.d.ts | 62 ++ .../tsc/superSymbolIndexedAccess6.d.ts | 62 ++ .../original/tsc/symbolDeclarationEmit12.d.ts | 7 +- .../original/tsc/symbolProperty1.d.ts | 26 +- .../original/tsc/symbolProperty2.d.ts | 31 +- .../original/tsc/symbolProperty3.d.ts | 31 +- .../original/tsc/symbolProperty52.d.ts | 5 +- .../original/tsc/symbolProperty53.d.ts | 5 +- .../original/tsc/symbolProperty54.d.ts | 5 +- .../original/tsc/symbolProperty58.d.ts | 5 +- .../original/tsc/thisTypeErrors.d.ts | 10 +- .../original/tsc/thisTypeInAccessors.d.ts | 11 +- .../tsc/typeFromPropertyAssignment32.d.ts | 18 +- .../tsc/typeFromPropertyAssignment33.d.ts | 18 +- .../tsc/typeReferenceDirectives11.d.ts | 9 +- .../tsc/typeReferenceDirectives13.d.ts | 4 +- .../tsc/typeReferenceDirectives2.d.ts | 4 +- .../tsc/typeReferenceDirectives5.d.ts | 4 +- .../tsc/typeReferenceDirectives8.d.ts | 9 +- .../tsc/typeUsedAsTypeLiteralIndex.d.ts | 5 +- .../isolatedDeclarationErrors.errors.txt | 20 +- ...solatedDeclarationErrorsClasses.errors.txt | 126 ++++ .../isolatedDeclarationErrorsClasses.js | 82 +++ .../isolatedDeclarationErrorsClasses.symbols | 103 +++ .../isolatedDeclarationErrorsClasses.types | 119 +++ ...tedDeclarationErrorsExpressions.errors.txt | 317 ++++++++ .../isolatedDeclarationErrorsExpressions.js | 251 +++++++ ...olatedDeclarationErrorsExpressions.symbols | 358 +++++++++ ...isolatedDeclarationErrorsExpressions.types | 569 +++++++++++++++ ...ationErrorsFunctionDeclarations.errors.txt | 40 ++ ...edDeclarationErrorsFunctionDeclarations.js | 20 + ...larationErrorsFunctionDeclarations.symbols | 27 + ...eclarationErrorsFunctionDeclarations.types | 43 ++ ...solatedDeclarationErrorsObjects.errors.txt | 179 +++++ .../isolatedDeclarationErrorsObjects.js | 164 +++++ .../isolatedDeclarationErrorsObjects.symbols | 214 ++++++ .../isolatedDeclarationErrorsObjects.types | 255 +++++++ ...tedDeclarationErrorsReturnTypes.errors.txt | 680 +++++++++--------- .../isolatedDeclarationErrorsClasses.ts | 55 ++ .../isolatedDeclarationErrorsExpressions.ts | 142 ++++ ...edDeclarationErrorsFunctionDeclarations.ts | 14 + .../isolatedDeclarationErrorsObjects.ts | 93 +++ ...ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts | 3 +- .../conformance/Symbols/ES5SymbolProperty2.ts | 1 + .../conformance/Symbols/ES5SymbolProperty3.ts | 1 + .../conformance/Symbols/ES5SymbolProperty4.ts | 1 + .../conformance/Symbols/ES5SymbolProperty5.ts | 1 + .../conformance/Symbols/ES5SymbolProperty6.ts | 3 +- .../conformance/Symbols/ES5SymbolProperty7.ts | 1 + .../derivedClassOverridesProtectedMembers.ts | 1 + .../derivedClassOverridesProtectedMembers2.ts | 1 + .../derivedClassOverridesProtectedMembers3.ts | 1 + .../derivedClassOverridesPublicMembers.ts | 1 + .../computedPropertyNames10_ES5.ts | 1 + .../computedPropertyNames10_ES6.ts | 1 + .../computedPropertyNames11_ES5.ts | 1 + .../computedPropertyNames11_ES6.ts | 1 + .../computedPropertyNames13_ES5.ts | 1 + .../computedPropertyNames13_ES6.ts | 1 + .../computedPropertyNames14_ES5.ts | 1 + .../computedPropertyNames14_ES6.ts | 1 + .../computedPropertyNames15_ES5.ts | 1 + .../computedPropertyNames15_ES6.ts | 1 + .../computedPropertyNames17_ES5.ts | 1 + .../computedPropertyNames17_ES6.ts | 1 + .../MemberFunctionDeclaration3_es6.ts | 1 + .../superSymbolIndexedAccess1.ts | 1 + .../superSymbolIndexedAccess3.ts | 1 + .../superSymbolIndexedAccess4.ts | 1 + .../superSymbolIndexedAccess5.ts | 1 + .../superSymbolIndexedAccess6.ts | 1 + .../parserES5ComputedPropertyName11.ts | 1 + .../parserES5ComputedPropertyName3.ts | 1 + .../parserES5ComputedPropertyName4.ts | 1 + .../parserES5ComputedPropertyName7.ts | 1 + .../parserComputedPropertyName11.ts | 1 + .../parserComputedPropertyName12.ts | 1 + .../parserComputedPropertyName17.ts | 1 + .../parserComputedPropertyName3.ts | 1 + .../parserComputedPropertyName38.ts | 1 + .../parserComputedPropertyName39.ts | 1 + .../parserComputedPropertyName4.ts | 1 + .../parserComputedPropertyName5.ts | 1 + .../parserComputedPropertyName7.ts | 1 + .../parserComputedPropertyName8.ts | 1 + .../for-ofStatements/ES5For-ofTypeCheck10.ts | 1 + ...AnnotationOnExports35-inline-short-hand.ts | 2 - ...peAnnotationOnExports48-class-accessors.ts | 22 + ...ionOnExports49-class-set-only-accessors.ts | 20 + 592 files changed, 18416 insertions(+), 4063 deletions(-) create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationErrorsClasses.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationErrorsObjects.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsClasses.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsObjects.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsClasses.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsObjects.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/ES5For-ofTypeCheck10.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty3.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty4.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty7.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/MemberFunctionDeclaration3_es6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers2.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers3.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesPublicMembers.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrorsClasses.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName11.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName12.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName17.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName3.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName38.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName39.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName4.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName7.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName8.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName11.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName3.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName4.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName7.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess1.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess3.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess4.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess5.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/ES5For-ofTypeCheck10.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty7.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/MemberFunctionDeclaration3_es6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesPublicMembers.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsClasses.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName11.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName12.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName17.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName38.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName39.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName7.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName8.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName11.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName7.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/ES5For-ofTypeCheck10.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty7.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/MemberFunctionDeclaration3_es6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers2.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesPublicMembers.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrorsClasses.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName11.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName12.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName17.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName38.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName39.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName7.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName8.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName11.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName7.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess1.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess3.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess4.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess5.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess6.d.ts create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsClasses.errors.txt create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsClasses.js create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsClasses.symbols create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsClasses.types create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsExpressions.errors.txt create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsExpressions.js create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsExpressions.symbols create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsExpressions.types create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.errors.txt create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.js create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.symbols create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.types create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsObjects.errors.txt create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsObjects.js create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsObjects.symbols create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsObjects.types create mode 100644 tests/cases/compiler/isolatedDeclarationErrorsClasses.ts create mode 100644 tests/cases/compiler/isolatedDeclarationErrorsExpressions.ts create mode 100644 tests/cases/compiler/isolatedDeclarationErrorsFunctionDeclarations.ts create mode 100644 tests/cases/compiler/isolatedDeclarationErrorsObjects.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports48-class-accessors.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports49-class-set-only-accessors.ts diff --git a/tests/baselines/reference/ES5SymbolProperty6.errors.txt b/tests/baselines/reference/ES5SymbolProperty6.errors.txt index 3b575eaf033eb..08c9488dfbb0a 100644 --- a/tests/baselines/reference/ES5SymbolProperty6.errors.txt +++ b/tests/baselines/reference/ES5SymbolProperty6.errors.txt @@ -1,8 +1,12 @@ -ES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -ES5SymbolProperty6.ts(5,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +ES5SymbolProperty6.ts(1,1): error TS2304: Cannot find name 'u'. +ES5SymbolProperty6.ts(3,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +ES5SymbolProperty6.ts(6,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -==== ES5SymbolProperty6.ts (2 errors) ==== +==== ES5SymbolProperty6.ts (3 errors) ==== + u//@target: ES5 + ~ +!!! error TS2304: Cannot find name 'u'. class C { [Symbol.iterator]() { } ~~~~~~ diff --git a/tests/baselines/reference/ES5SymbolProperty6.js b/tests/baselines/reference/ES5SymbolProperty6.js index d167efaa059f2..8210dd547f614 100644 --- a/tests/baselines/reference/ES5SymbolProperty6.js +++ b/tests/baselines/reference/ES5SymbolProperty6.js @@ -1,6 +1,7 @@ //// [tests/cases/conformance/Symbols/ES5SymbolProperty6.ts] //// //// [ES5SymbolProperty6.ts] +u//@target: ES5 class C { [Symbol.iterator]() { } } @@ -8,6 +9,7 @@ class C { (new C)[Symbol.iterator] //// [ES5SymbolProperty6.js] +u; //@target: ES5 var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/ES5SymbolProperty6.symbols b/tests/baselines/reference/ES5SymbolProperty6.symbols index 9083c8637b018..e433d002a7b6f 100644 --- a/tests/baselines/reference/ES5SymbolProperty6.symbols +++ b/tests/baselines/reference/ES5SymbolProperty6.symbols @@ -1,13 +1,14 @@ //// [tests/cases/conformance/Symbols/ES5SymbolProperty6.ts] //// === ES5SymbolProperty6.ts === +u//@target: ES5 class C { ->C : Symbol(C, Decl(ES5SymbolProperty6.ts, 0, 0)) +>C : Symbol(C, Decl(ES5SymbolProperty6.ts, 0, 1)) [Symbol.iterator]() { } ->[Symbol.iterator] : Symbol(C[Symbol.iterator], Decl(ES5SymbolProperty6.ts, 0, 9)) +>[Symbol.iterator] : Symbol(C[Symbol.iterator], Decl(ES5SymbolProperty6.ts, 1, 9)) } (new C)[Symbol.iterator] ->C : Symbol(C, Decl(ES5SymbolProperty6.ts, 0, 0)) +>C : Symbol(C, Decl(ES5SymbolProperty6.ts, 0, 1)) diff --git a/tests/baselines/reference/ES5SymbolProperty6.types b/tests/baselines/reference/ES5SymbolProperty6.types index efbb66ceb6647..abd358cbb1b41 100644 --- a/tests/baselines/reference/ES5SymbolProperty6.types +++ b/tests/baselines/reference/ES5SymbolProperty6.types @@ -1,6 +1,9 @@ //// [tests/cases/conformance/Symbols/ES5SymbolProperty6.ts] //// === ES5SymbolProperty6.ts === +u//@target: ES5 +>u : any + class C { >C : C diff --git a/tests/baselines/reference/computedPropertiesNarrowed.errors.txt b/tests/baselines/reference/computedPropertiesNarrowed.errors.txt index 90be07ce96394..a1c96995ba0ff 100644 --- a/tests/baselines/reference/computedPropertiesNarrowed.errors.txt +++ b/tests/baselines/reference/computedPropertiesNarrowed.errors.txt @@ -1,9 +1,9 @@ -computedPropertiesNarrowed.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertiesNarrowed.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertiesNarrowed.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertiesNarrowed.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertiesNarrowed.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertiesNarrowed.ts(47,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -13,7 +13,8 @@ computedPropertiesNarrowed.ts(47,5): error TS9007: Declaration emit for this fil export let o = { [x]: 1 // error narrow type !== declared type ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 } @@ -28,19 +29,22 @@ computedPropertiesNarrowed.ts(47,5): error TS9007: Declaration emit for this fil export let o32 = { [1-1]: 1 } // error number ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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(); @@ -53,7 +57,8 @@ computedPropertiesNarrowed.ts(47,5): error TS9007: Declaration emit for this fil export let o7 = { [foo()]: 1 // Should error ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 @@ -65,6 +70,7 @@ computedPropertiesNarrowed.ts(47,5): error TS9007: Declaration emit for this fil export const o9 = { [ns().v]: 1 ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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/auto-fixed/diff/accessorInferredReturnTypeErrorInReturnStatement.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/accessorInferredReturnTypeErrorInReturnStatement.d.ts.map.diff index 5dc4e009abf00..53ec2fb79fee2 100644 --- 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 @@ -9,8 +9,8 @@ //// [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;0BACH,GAAG;CAIvB,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==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjZXNzb3JJbmZlcnJlZFJldHVyblR5cGVFcnJvckluUmV0dXJuU3RhdGVtZW50LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhY2Nlc3NvckluZmVycmVkUmV0dXJuVHlwZUVycm9ySW5SZXR1cm5TdGF0ZW1lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZUFBTyxJQUFJLGFBQWE7MEJBQ0gsR0FBRztDQUl2QixDQUFDIn0=,ZXhwb3J0IHZhciBiYXNlUHJvdG90eXBlID0gewogIGdldCBwcmltYXJ5UGF0aCgpOiBhbnkgewogICAgdmFyIF90aGlzID0gdGhpczsKICAgIHJldHVybiBfdGhpcy5jb2xsZWN0aW9uLnNjaGVtYS5wcmltYXJ5UGF0aDsKICB9LCAgCn07Cg== ++//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgdmFyIGJhc2VQcm90b3R5cGU6IHsNCiAgICByZWFkb25seSBwcmltYXJ5UGF0aDogYW55Ow0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWFjY2Vzc29ySW5mZXJyZWRSZXR1cm5UeXBlRXJyb3JJblJldHVyblN0YXRlbWVudC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjZXNzb3JJbmZlcnJlZFJldHVyblR5cGVFcnJvckluUmV0dXJuU3RhdGVtZW50LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhY2Nlc3NvckluZmVycmVkUmV0dXJuVHlwZUVycm9ySW5SZXR1cm5TdGF0ZW1lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZUFBTyxJQUFJLGFBQWE7YUFDbEIsV0FBVyxFQUFJLEdBQUc7Q0FJdkIsQ0FBQyJ9,ZXhwb3J0IHZhciBiYXNlUHJvdG90eXBlID0gewogIGdldCBwcmltYXJ5UGF0aCgpOiBhbnkgewogICAgdmFyIF90aGlzID0gdGhpczsKICAgIHJldHVybiBfdGhpcy5jb2xsZWN0aW9uLnNjaGVtYS5wcmltYXJ5UGF0aDsKICB9LCAgCn07Cg== 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 index 39ee065eee5fe..096920e850649 100644 --- 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 @@ -21,7 +21,7 @@ /// [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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++arrayFakeFlatNoCrashInferenceDeclarations.ts(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -==== arrayFakeFlatNoCrashInferenceDeclarations.ts (1 errors) ==== @@ -30,13 +30,14 @@ "done": Arr, "recur": Arr extends ReadonlyArray ? BadFlatArray -@@ -19,6 +31,8 @@ +@@ -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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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/computedEnumTypeWidening.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedEnumTypeWidening.d.ts.diff index 3ca6be61428b2..a1f39c39c629b 100644 --- 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 @@ -15,10 +15,10 @@ +//# sourceMappingURL=computedEnumTypeWidening.d.ts.map +/// [Errors] //// + -+computedEnumTypeWidening.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+computedEnumTypeWidening.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+computedEnumTypeWidening.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+computedEnumTypeWidening.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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) ==== @@ -27,16 +27,16 @@ + enum E { + A = computed(0), + ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations + B = computed(1), + ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations + C = computed(2), + ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations + D = computed(3), + ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations + } + + function f1(): void { 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 index 7e53435c70aa0..c029b97f92918 100644 --- 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 @@ -10,11 +10,11 @@ //# sourceMappingURL=constEnum2.d.ts.map /// [Errors] //// -+constEnum2.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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. @@ -30,17 +30,17 @@ d = 10, e = 199 * Math.floor(Math.random() * 1000), + ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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. } 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 index 0fa6b204f11bd..6d5f4dda3ab45 100644 --- 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 @@ -15,7 +15,7 @@ +//# sourceMappingURL=declFileEnums.d.ts.map +/// [Errors] //// + -+declFileEnums.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declFileEnums.ts(15,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations + + +==== declFileEnums.ts (1 errors) ==== @@ -35,7 +35,7 @@ + a = 10, + b = Math.PI, + ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations + c = a + 3 + } + 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 index fbf0a1f747567..b701e04de83b3 100644 --- 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 @@ -16,12 +16,12 @@ /// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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,14 @@ +@@ -20,12 +27,15 @@ ==== node_modules/root/index.d.ts (0 errors) ==== export interface RootProps {} @@ -34,7 +34,8 @@ ~ !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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/declarationEmitDefaultExportWithStaticAssignment.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDefaultExportWithStaticAssignment.d.ts.diff index 0ba848b2c0ef7..95e0dfe8744be 100644 --- 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 @@ -48,11 +48,11 @@ +//# sourceMappingURL=index4.d.ts.map +/// [Errors] //// + -+index1.ts(3,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++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) ==== @@ -63,7 +63,7 @@ + export default function Example(): void {} + Example.Foo = Foo + ~~~~~~~~~~~ -+!!! error TS9009: 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. + +==== index2.ts (1 errors) ==== + import {Foo} from './foo'; @@ -71,7 +71,7 @@ + export default function Example(): void {} + Example.Foo = Foo + ~~~~~~~~~~~ -+!!! error TS9009: 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. + +==== index3.ts (1 errors) ==== + export class Bar {} @@ -79,7 +79,7 @@ + + Example.Bar = Bar + ~~~~~~~~~~~ -+!!! error TS9009: 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. + +==== index4.ts (2 errors) ==== + function A() { } @@ -92,8 +92,8 @@ + + C.A = A; + ~~~ -+!!! error TS9009: 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. + C.B = B; + ~~~ -+!!! error TS9009: 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. \ 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 index 9cd21a24c8bd8..a9b0d7daff4ab 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,58 +1,85 @@ +@@ -1,29 +1,29 @@ //// [declarationEmitDestructuringParameterProperties.d.ts] @@ -44,61 +44,3 @@ } //# 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(2,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitDestructuringParameterProperties.ts(2,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitDestructuringParameterProperties.ts(2,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - declarationEmitDestructuringParameterProperties.ts(8,17): error TS1187: A parameter property may not be declared using a binding pattern. -+declarationEmitDestructuringParameterProperties.ts(8,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitDestructuringParameterProperties.ts(8,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitDestructuringParameterProperties.ts(8,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - declarationEmitDestructuringParameterProperties.ts(14,17): error TS1187: A parameter property may not be declared using a binding pattern. -+declarationEmitDestructuringParameterProperties.ts(14,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitDestructuringParameterProperties.ts(14,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+declarationEmitDestructuringParameterProperties.ts(14,32): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - --==== declarationEmitDestructuringParameterProperties.ts (3 errors) ==== -+==== declarationEmitDestructuringParameterProperties.ts (12 errors) ==== - class C1 { - constructor(public [x, y, z]: string[]) { - ~~~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS1187: A parameter property may not be declared using a binding pattern. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - } - - 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. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - } - - 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. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+ ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - } - } -\ No newline at end of file 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 index 05c56888cd37a..0b666d90c4e84 100644 --- 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 @@ -16,7 +16,7 @@ /// [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 TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++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) ==== @@ -31,6 +31,6 @@ ~~~~~ !!! error TS4032: Property 'val' of exported interface has or is using name 'I' from private module '"a"'. + ~~~~~ -+!!! error TS9009: 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. \ No newline at end of file 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 index 5e2d28cebf15a..41202594b26d3 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,5 +1,45 @@ +@@ -1,5 +1,46 @@ //// [/p1/index.d.ts] @@ -16,7 +16,7 @@ +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + -+/p1/index.ts(4,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++/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) ==== @@ -49,7 +49,8 @@ + + export const a = getA(); + ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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; + 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 index d511d445031d2..82591826501f2 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,5 +1,33 @@ +@@ -1,5 +1,34 @@ //// [/p1/index.d.ts] @@ -16,7 +16,7 @@ +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + -+/p1/index.ts(4,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++/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) ==== @@ -37,7 +37,8 @@ + + export const a = getA(); + ~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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; + 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 index e72eb1bca6e7f..e9231345bb7ad 100644 --- 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 @@ -18,7 +18,7 @@ +//# sourceMappingURL=declarationEmitFunctionDuplicateNamespace.d.ts.map +/// [Errors] //// + -+declarationEmitFunctionDuplicateNamespace.ts(7,1): error TS9009: 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(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) ==== @@ -30,6 +30,6 @@ + + f.x = 2; + ~~~ -+!!! error TS9009: 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. + \ 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 index c7b89b58a426c..c1dfe66bdfd7b 100644 --- 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 @@ -30,32 +30,32 @@ +//# sourceMappingURL=declarationEmitFunctionKeywordProp.d.ts.map +/// [Errors] //// + -+declarationEmitFunctionKeywordProp.ts(2,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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(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 TS9009: 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. + + function bar(): void {} + bar.async = true; + ~~~~~~~~~ -+!!! error TS9009: 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. + bar.normal = false; + ~~~~~~~~~~ -+!!! error TS9009: 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. + + function baz(): void {} + baz.class = true; + ~~~~~~~~~ -+!!! error TS9009: 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. + baz.normal = false; + ~~~~~~~~~~ -+!!! error TS9009: 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. \ No newline at end of file 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 index 1b0fc18ca895e..17c4c3496516c 100644 --- 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 @@ -19,34 +19,34 @@ +//# sourceMappingURL=declarationEmitLateBoundAssignments.d.ts.map +/// [Errors] //// + -+declarationEmitLateBoundAssignments.ts(2,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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(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 TS9009: 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. + const _private = Symbol(); + foo[_private] = "ok"; + ~~~~~~~~~~~~~ -+!!! error TS9009: 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. + const strMem = "strMemName"; + foo[strMem] = "ok"; + ~~~~~~~~~~~ -+!!! error TS9009: 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. + const dashStrMem = "dashed-str-mem"; + foo[dashStrMem] = "ok"; + ~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. + const numMem = 42; + foo[numMem] = "ok"; + ~~~~~~~~~~~ -+!!! error TS9009: 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. + + const x: string = foo[_private]; + const y: string = foo[strMem]; 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 index f784b50ea72af..696b00ac9a72b 100644 --- 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 @@ -47,16 +47,16 @@ +//# sourceMappingURL=declarationEmitLateBoundAssignments2.d.ts.map +/// [Errors] //// + -+declarationEmitLateBoundAssignments2.ts(10,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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,1): error 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) ==== @@ -71,52 +71,52 @@ + export function decl(): void {} + decl["B"] = 'foo' + ~~~~~~~~~ -+!!! error TS9009: 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. + + export function decl2(): void {} + decl2[c] = 0 + ~~~~~~~~ -+!!! error TS9009: 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. + + export function decl3(): void {} + decl3[77] = 0 + ~~~~~~~~~ -+!!! error TS9009: 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. + + export function decl4(): void {} + decl4[num] = 0 + ~~~~~~~~~~ -+!!! error TS9009: 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. + + export function decl5(): void {} + decl5["101"] = 0 + ~~~~~~~~~~~~ -+!!! error TS9009: 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. + + export function decl6(): void {} + decl6[numStr] = 0 + ~~~~~~~~~~~~~ -+!!! error TS9009: 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. + + export function decl7(): void {} + decl7["qwe rty"] = 0 + ~~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. + + export function decl8(): void {} + decl8[withWhitespace] = 0 + ~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. + + export function decl9(): void {} + decl9["🤪"] = 0 + ~~~~~~~~~~~ -+!!! error TS9009: 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. + + export function decl10(): void {} + decl10[emoji] = 0 + ~~~~~~~~~~~~~ -+!!! error TS9009: 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. + + export const arrow: { + (): void 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 index cae1feee66a4f..64f66b5d926f8 100644 --- 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 @@ -17,7 +17,7 @@ /// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++index.ts(7,16): error TS9013: Expression type can't be inferred with --isolatedDeclarations ==== node_modules/styled-components/node_modules/hoist-non-react-statics/index.d.ts (0 errors) ==== @@ -48,6 +48,6 @@ ~~~ !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations \ No newline at end of file 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 index b9aea9f0b885e..0d09f59d5088c 100644 --- 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 @@ -11,5 +11,5 @@ //// [/.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;;iBAG9C,MAAM;;AADjB,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 index 1d8355dc9f135..af1b880cce162 100644 --- 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 @@ -11,8 +11,8 @@ //// [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;;iBAG9C,MAAM;;AADjB,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,aW1wb3J0IHsgU2NhbGFyIH0gZnJvbSAnLi4vbGliL29wZXJhdG9ycy9zY2FsYXInOw0KZGVjbGFyZSBjb25zdCBfZGVmYXVsdDogew0KICAgIHJlYWRvbmx5IHhzOiBTY2FsYXI7DQp9Ow0KZXhwb3J0IGRlZmF1bHQgX2RlZmF1bHQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1zcGFjaW5nLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BhY2luZy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3BhY2luZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFVLE1BQU0seUJBQXlCLENBQUM7Ozs7QUFFekQsd0JBSUUifQ==,aW1wb3J0IHsgU2NhbGFyLCBzY2FsYXIgfSBmcm9tICcuLi9saWIvb3BlcmF0b3JzL3NjYWxhcic7CgpleHBvcnQgZGVmYXVsdCB7CglnZXQgeHMoKTogU2NhbGFyIHsKCQlyZXR1cm4gc2NhbGFyKCIxNHB4Iik7Cgl9Cn07Cg== -+//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgU2NhbGFyIH0gZnJvbSAnLi4vbGliL29wZXJhdG9ycy9zY2FsYXInOw0KZGVjbGFyZSBjb25zdCBfZGVmYXVsdDogew0KICAgIHJlYWRvbmx5IHhzOiBTY2FsYXI7DQp9Ow0KZXhwb3J0IGRlZmF1bHQgX2RlZmF1bHQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1zcGFjaW5nLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BhY2luZy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3BhY2luZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFVLE1BQU0seUJBQXlCLENBQUM7O2lCQUc5QyxNQUFNOztBQURqQix3QkFJRSJ9,aW1wb3J0IHsgU2NhbGFyLCBzY2FsYXIgfSBmcm9tICcuLi9saWIvb3BlcmF0b3JzL3NjYWxhcic7CgpleHBvcnQgZGVmYXVsdCB7CglnZXQgeHMoKTogU2NhbGFyIHsKCQlyZXR1cm4gc2NhbGFyKCIxNHB4Iik7Cgl9Cn07Cg== ++//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgU2NhbGFyIH0gZnJvbSAnLi4vbGliL29wZXJhdG9ycy9zY2FsYXInOw0KZGVjbGFyZSBjb25zdCBfZGVmYXVsdDogew0KICAgIHJlYWRvbmx5IHhzOiBTY2FsYXI7DQp9Ow0KZXhwb3J0IGRlZmF1bHQgX2RlZmF1bHQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1zcGFjaW5nLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3BhY2luZy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3BhY2luZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFVLE1BQU0seUJBQXlCLENBQUM7O2FBR3BELEVBQUUsRUFBSSxNQUFNOztBQURqQix3QkFJRSJ9,aW1wb3J0IHsgU2NhbGFyLCBzY2FsYXIgfSBmcm9tICcuLi9saWIvb3BlcmF0b3JzL3NjYWxhcic7CgpleHBvcnQgZGVmYXVsdCB7CglnZXQgeHMoKTogU2NhbGFyIHsKCQlyZXR1cm4gc2NhbGFyKCIxNHB4Iik7Cgl9Cn07Cg== 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 index 8a438e525a42c..07af73fbbb4db 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,7 +3,55 @@ +@@ -3,7 +3,56 @@ //// [/.src/monorepo/pkg3/dist/index.d.ts] export * from './keys'; //# sourceMappingURL=index.d.ts.map @@ -18,7 +18,7 @@ +//# sourceMappingURL=keys.d.ts.map +/// [Errors] //// + -+monorepo/pkg3/src/keys.ts(3,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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) ==== @@ -28,7 +28,8 @@ + + export const ADMIN = MetadataAccessor.create('1'); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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) ==== 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 index a2f3d6145b978..4b22c3b8c7dc1 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,7 +3,58 @@ +@@ -3,7 +3,59 @@ //// [/.src/monorepo/pkg3/dist/index.d.ts] export * from './keys'; //# sourceMappingURL=index.d.ts.map @@ -18,7 +18,7 @@ +//# sourceMappingURL=keys.d.ts.map +/// [Errors] //// + -+monorepo/pkg3/src/keys.ts(3,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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) ==== @@ -28,7 +28,8 @@ + + export const ADMIN = MetadataAccessor.create('1'); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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) ==== 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 index 1bf38ab9405ed..b953514a1a889 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -2,21 +2,27 @@ +@@ -2,21 +2,28 @@ //// [/.src/monorepo/pkg3/dist/index.d.ts] export * from './keys'; @@ -16,7 +16,7 @@ /// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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) ==== @@ -29,7 +29,8 @@ ~~~~~ !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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) ==== 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 index 87ac77abd7d96..25532d68ea461 100644 --- 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 @@ -17,7 +17,7 @@ +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + -+/p1/index.ts(7,29): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations ++/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) ==== @@ -41,9 +41,9 @@ + } + export const useCsvParser = () => { + ~~~~~~~ -+!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -+!!! related TS9600 /p1/index.ts:7:14: Add a type annotation to the variable useCsvParser -+!!! related TS9603 /p1/index.ts:7:29: Add a return type to the function expression ++!!! 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; + }; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff index cd0f6180990bb..e949d56aa4e57 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff @@ -54,9 +54,9 @@ declarationFiles.ts(4,20): error TS2526: A 'this' type is available only in a non-static member of a class or interface. declarationFiles.ts(36,5): error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. -+declarationFiles.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationFiles.ts(36,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations declarationFiles.ts(42,5): error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. -+declarationFiles.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++declarationFiles.ts(42,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -==== declarationFiles.ts (3 errors) ==== @@ -65,13 +65,14 @@ x: this; f(x: this): this { return undefined; } constructor(x: this) { } -@@ -46,16 +91,20 @@ +@@ -46,16 +91,22 @@ x4 = (): this => this; f1() { ~~ !!! error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. + ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 declarationFiles.ts:36:5: Add a return type to the method return { a: this }; } f2(): this[] { @@ -81,7 +82,8 @@ ~~ !!! error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. + ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 declarationFiles.ts:42:5: Add a return type to the method return [{ a: this }]; } f4(): () => this { 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 index 8d773e725ee65..02c1a767267f4 100644 --- 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 @@ -41,20 +41,20 @@ +//# sourceMappingURL=emitClassExpressionInDeclarationFile.d.ts.map +/// [Errors] //// + -+emitClassExpressionInDeclarationFile.ts(1,28): error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. -+emitClassExpressionInDeclarationFile.ts(5,38): error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. ++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 TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. ++!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + static getTags() { } + tags() { } + } + export var circularReference = class C { + ~ -+!!! error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. ++!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + static getTags(c: C): C { return c } + tags(c: C): C { return c } + } 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 index 8deeac78180e9..f52e3b41e2884 100644 --- 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 @@ -42,7 +42,7 @@ 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 TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. ++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; }'. @@ -60,7 +60,7 @@ ~~~~~~~~~~ !!! error TS4094: Property 'ps' of exported class expression may not be private or protected. + ~~~~~ -+!!! error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. ++!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. static getTags() { } tags() { } private static ps = -1 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 index 357b4869d9ced..70459994e24ce 100644 --- 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 @@ -15,10 +15,10 @@ +//# sourceMappingURL=enumClassification.d.ts.map +/// [Errors] //// + -+enumClassification.ts(74,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumClassification.ts(75,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumClassification.ts(76,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+enumClassification.ts(77,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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) ==== @@ -97,16 +97,16 @@ + enum E20 { + A = "foo".length, + ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations + B = A + 1, + ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations + C = +"123", + ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations + D = Math.sin(1) + ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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 index 5173b952bc9ad..3f0d0758d5683 100644 --- 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 @@ -15,7 +15,7 @@ +//# sourceMappingURL=enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts.map +/// [Errors] //// + -+enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(32,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(32,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations + + +==== enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts (1 errors) ==== @@ -52,7 +52,7 @@ + a = 1, + b = `12`.length + ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations + } + + declare enum T7 { 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 index a53108c2f5735..09225101948fc 100644 --- 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 @@ -18,7 +18,7 @@ +//# sourceMappingURL=expandoFunctionBlockShadowing.d.ts.map +/// [Errors] //// + -+expandoFunctionBlockShadowing.ts(10,1): error TS9009: 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(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) ==== @@ -33,7 +33,7 @@ + export function Y(): void {} + Y.test = "foo"; + ~~~~~~ -+!!! error TS9009: 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. + const aliasTopY = Y; + if (Math.random()) { + const Y = function Y() {} 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 index 7f0c1ca92f203..cc5eb27b612a8 100644 --- 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 @@ -42,30 +42,30 @@ //# sourceMappingURL=expandoFunctionNestedAssigments.d.ts.map /// [Errors] //// -+expandoFunctionNestedAssigments.ts(4,18): error TS9009: 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(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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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,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) ==== @@ -75,7 +75,7 @@ } let d: number = (Foo.inVariableInit = 1); + ~~~~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. function bar(p: number = (Foo.inNestedFunction = 1)): void { @@ -86,87 +86,87 @@ (Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0); + ~~~~~~~ -+!!! error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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.inIf = 1; + ~~~~~~~~ -+!!! error TS9009: 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. } while(Foo.fromWhileCondition = 1) { + ~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9009: 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.fromWhileBody = 1; + ~~~~~~~~~~~~~~~~~ -+!!! error TS9009: 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.fromWhileBodyNested = 1; + ~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. } } do { Foo.fromDoBody = 1; + ~~~~~~~~~~~~~~ -+!!! error TS9009: 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.fromDoBodyNested = 1; + ~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. } } while(Foo.fromDoCondition = 1); + ~~~~~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. for(Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1){ + ~~~~~~~~~~~ -+!!! error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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.fromForBodyNested = 1; + ~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. } } for(let f of (Foo.forOf = []) ){ + ~~~~~~~~~ -+!!! error TS9009: 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.fromForOfBody = 1; + ~~~~~~~~~~~~~~~~~ -+!!! error TS9009: 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.fromForOfBodyNested = 1; + ~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. } } for(let f in (Foo.forIn = []) ){ + ~~~~~~~~~ -+!!! error TS9009: 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.fromForInBody = 1; + ~~~~~~~~~~~~~~~~~ -+!!! error TS9009: 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.fromForInBodyNested = 1; + ~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. } } \ No newline at end of file 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 index c4061aa1bea42..b66499fe60bfc 100644 --- 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 @@ -20,7 +20,7 @@ +//# sourceMappingURL=exportDefaultNamespace.d.ts.map +/// [Errors] //// + -+exportDefaultNamespace.ts(5,1): error TS9009: 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(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) ==== @@ -30,6 +30,6 @@ + + someFunc.someProp = 'yo'; + ~~~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. + \ No newline at end of file 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 index ee6bf6ba3e74d..cb6edeb6a8d0a 100644 --- 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 @@ -26,14 +26,14 @@ +//# sourceMappingURL=isolatedDeclarationErrors.d.ts.map +/// [Errors] //// + -+isolatedDeclarationErrors.ts(2,1): error TS9009: 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(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 TS9009: 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. + + const errorOnAssignmentBelow: { + (): void; 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..6ea10717fe9da --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationErrorsClasses.d.ts.diff @@ -0,0 +1,25 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/compiler/isolatedDeclarationErrorsClasses.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -17,11 +17,17 @@ + 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 { + [noAnnotationLiteralName](): void; + [noParamAnnotationLiteralName](v: string): void; ++ [noAnnotationStringName](): void; ++ [noParamAnnotationStringName](v: any): void; ++ get [noAnnotationStringName](): number; ++ set [noParamAnnotationStringName](value: any); + } + export {}; 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/lateBoundFunctionMemberAssignmentDeclarations.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/lateBoundFunctionMemberAssignmentDeclarations.d.ts.diff index b2397abe167ab..1605f392a7e9b 100644 --- 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 @@ -18,19 +18,19 @@ +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + -+index.ts(2,1): error TS9009: 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 TS9009: 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,1): error 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 TS9009: 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. + const _private = Symbol(); + foo[_private] = "ok"; + ~~~~~~~~~~~~~ -+!!! error TS9009: 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. + + const x: string = foo[_private]; + 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 index ff789ee14c654..f2fae01d7cc78 100644 --- 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 @@ -16,15 +16,15 @@ +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + -+index.ts(1,18): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations ++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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -+!!! related TS9600 index.ts:1:14: Add a type annotation to the variable a -+!!! related TS9603 index.ts:1:18: Add a return type to the function expression ++!!! 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) ==== 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 index 083441d275c7b..67464726708f4 100644 --- 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 @@ -18,7 +18,7 @@ +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + -+/index.ts(4,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++/index.ts(4,16): error TS9013: Expression type can't be inferred with --isolatedDeclarations + + +==== /node_modules/.prisma/client/index.d.ts (0 errors) ==== @@ -39,6 +39,6 @@ + const EnhancedPrisma = enhancePrisma(PrismaClient); + export default new EnhancedPrisma(); + ~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations + \ No newline at end of file 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 index ef640c148062b..6a25cb7ec91a1 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,23 +1,30 @@ +@@ -1,23 +1,31 @@ + +//// [index.d.ts] @@ -16,7 +16,7 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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. @@ -32,7 +32,8 @@ ~ !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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. ~~~~~~~~~~~~~~~ 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 index ef640c148062b..6a25cb7ec91a1 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,23 +1,30 @@ +@@ -1,23 +1,31 @@ + +//// [index.d.ts] @@ -16,7 +16,7 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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. @@ -32,7 +32,8 @@ ~ !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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. ~~~~~~~~~~~~~~~ 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 index e432b9ef02dd0..a54cd4d44dfcc 100644 --- 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 @@ -15,12 +15,12 @@ export { x } from "./other.js"; //# sourceMappingURL=index.d.ts.map //// [/.src/node_modules/inner/other.d.ts] -@@ -12,21 +15,24 @@ +@@ -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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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. @@ -36,7 +36,8 @@ ~ !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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. ~~~~~~~~~~~~~~~ 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 index e432b9ef02dd0..a54cd4d44dfcc 100644 --- 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 @@ -15,12 +15,12 @@ export { x } from "./other.js"; //# sourceMappingURL=index.d.ts.map //// [/.src/node_modules/inner/other.d.ts] -@@ -12,21 +15,24 @@ +@@ -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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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. @@ -36,7 +36,8 @@ ~ !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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. ~~~~~~~~~~~~~~~ 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 index 181e3db8d0bb5..3b7ddf165aec5 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,24 +1,27 @@ +@@ -1,24 +1,28 @@ //// [index.d.ts] @@ -16,7 +16,7 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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. @@ -30,7 +30,8 @@ !!! error TS2307: Cannot find module 'inner/other.js' or its corresponding type declarations. export const a = (await import("inner")).x(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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. ~~~~~~~~~~~~~~~ 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 index 181e3db8d0bb5..3b7ddf165aec5 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,24 +1,27 @@ +@@ -1,24 +1,28 @@ //// [index.d.ts] @@ -16,7 +16,7 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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. @@ -30,7 +30,8 @@ !!! error TS2307: Cannot find module 'inner/other.js' or its corresponding type declarations. export const a = (await import("inner")).x(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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. ~~~~~~~~~~~~~~~ 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 index ff1ee6aca9022..217e6e7e1cf01 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,24 +1,27 @@ +@@ -1,24 +1,28 @@ //// [index.d.ts] @@ -16,7 +16,7 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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. @@ -30,7 +30,8 @@ !!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. export const a = (await import("inner/index.js")).x(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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. ~~~~~~~~~~~~~~~~~~~~~~~~ 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 index ff1ee6aca9022..217e6e7e1cf01 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,24 +1,27 @@ +@@ -1,24 +1,28 @@ //// [index.d.ts] @@ -16,7 +16,7 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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. @@ -30,7 +30,8 @@ !!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. export const a = (await import("inner/index.js")).x(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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. ~~~~~~~~~~~~~~~~~~~~~~~~ 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 index 29474c9183f11..bc7a1e93686f8 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,24 +1,27 @@ +@@ -1,24 +1,28 @@ //// [index.d.ts] @@ -16,7 +16,7 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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. @@ -30,7 +30,8 @@ !!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. export const a = (await import("inner/index.js")).x(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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. ~~~~~~~~~~~~~~~~~~~~~~~~ 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 index 29474c9183f11..bc7a1e93686f8 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,24 +1,27 @@ +@@ -1,24 +1,28 @@ //// [index.d.ts] @@ -16,7 +16,7 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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. @@ -30,7 +30,8 @@ !!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. export const a = (await import("inner/index.js")).x(); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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. ~~~~~~~~~~~~~~~~~~~~~~~~ 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 index c88c213669622..4cc321285de18 100644 --- 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 @@ -96,84 +96,84 @@ +//# sourceMappingURL=nullPropertyName.d.ts.map +/// [Errors] //// + -+nullPropertyName.ts(3,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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(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) ==== @@ -181,239 +181,239 @@ + // properties + foo.x = 1; + ~~~~~ -+!!! error TS9009: 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.y = 1; + ~~~~~ -+!!! error TS9009: 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. + + // keywords + foo.break = 1; + ~~~~~~~~~ -+!!! error TS9009: 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.case = 1; + ~~~~~~~~ -+!!! error TS9009: 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.catch = 1; + ~~~~~~~~~ -+!!! error TS9009: 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.class = 1; + ~~~~~~~~~ -+!!! error TS9009: 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.const = 1; + ~~~~~~~~~ -+!!! error TS9009: 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.continue = 1; + ~~~~~~~~~~~~ -+!!! error TS9009: 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.debugger = 1; + ~~~~~~~~~~~~ -+!!! error TS9009: 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.default = 1; + ~~~~~~~~~~~ -+!!! error TS9009: 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.delete = 1; + ~~~~~~~~~~ -+!!! error TS9009: 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.do = 1; + ~~~~~~ -+!!! error TS9009: 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.else = 1; + ~~~~~~~~ -+!!! error TS9009: 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.enum = 1; + ~~~~~~~~ -+!!! error TS9009: 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.export = 1; + ~~~~~~~~~~ -+!!! error TS9009: 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.extends = 1; + ~~~~~~~~~~~ -+!!! error TS9009: 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.false = 1; + ~~~~~~~~~ -+!!! error TS9009: 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.finally = 1; + ~~~~~~~~~~~ -+!!! error TS9009: 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.for = 1; + ~~~~~~~ -+!!! error TS9009: 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.function = 1; + ~~~~~~~~~~~~ -+!!! error TS9009: 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.if = 1; + ~~~~~~ -+!!! error TS9009: 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.import = 1; + ~~~~~~~~~~ -+!!! error TS9009: 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.in = 1; + ~~~~~~ -+!!! error TS9009: 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.instanceof = 1; + ~~~~~~~~~~~~~~ -+!!! error TS9009: 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.new = 1; + ~~~~~~~ -+!!! error TS9009: 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.null = 1; + ~~~~~~~~ -+!!! error TS9009: 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.return = 1; + ~~~~~~~~~~ -+!!! error TS9009: 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.super = 1; + ~~~~~~~~~ -+!!! error TS9009: 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.switch = 1; + ~~~~~~~~~~ -+!!! error TS9009: 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.this = 1; + ~~~~~~~~ -+!!! error TS9009: 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.throw = 1; + ~~~~~~~~~ -+!!! error TS9009: 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.true = 1; + ~~~~~~~~ -+!!! error TS9009: 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.try = 1; + ~~~~~~~ -+!!! error TS9009: 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.typeof = 1; + ~~~~~~~~~~ -+!!! error TS9009: 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.var = 1; + ~~~~~~~ -+!!! error TS9009: 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.void = 1; + ~~~~~~~~ -+!!! error TS9009: 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.while = 1; + ~~~~~~~~~ -+!!! error TS9009: 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.with = 1; + ~~~~~~~~ -+!!! error TS9009: 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.implements = 1; + ~~~~~~~~~~~~~~ -+!!! error TS9009: 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.interface = 1; + ~~~~~~~~~~~~~ -+!!! error TS9009: 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.let = 1; + ~~~~~~~ -+!!! error TS9009: 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.package = 1; + ~~~~~~~~~~~ -+!!! error TS9009: 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.private = 1; + ~~~~~~~~~~~ -+!!! error TS9009: 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.protected = 1; + ~~~~~~~~~~~~~ -+!!! error TS9009: 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.public = 1; + ~~~~~~~~~~ -+!!! error TS9009: 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.static = 1; + ~~~~~~~~~~ -+!!! error TS9009: 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.yield = 1; + ~~~~~~~~~ -+!!! error TS9009: 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.abstract = 1; + ~~~~~~~~~~~~ -+!!! error TS9009: 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.as = 1; + ~~~~~~ -+!!! error TS9009: 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.asserts = 1; + ~~~~~~~~~~~ -+!!! error TS9009: 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.any = 1; + ~~~~~~~ -+!!! error TS9009: 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.async = 1; + ~~~~~~~~~ -+!!! error TS9009: 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.await = 1; + ~~~~~~~~~ -+!!! error TS9009: 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.boolean = 1; + ~~~~~~~~~~~ -+!!! error TS9009: 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.constructor = 1; + ~~~~~~~~~~~~~~~ -+!!! error TS9009: 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.declare = 1; + ~~~~~~~~~~~ -+!!! error TS9009: 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.get = 1; + ~~~~~~~ -+!!! error TS9009: 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.infer = 1; + ~~~~~~~~~ -+!!! error TS9009: 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.is = 1; + ~~~~~~ -+!!! error TS9009: 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.keyof = 1; + ~~~~~~~~~ -+!!! error TS9009: 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.module = 1; + ~~~~~~~~~~ -+!!! error TS9009: 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.namespace = 1; + ~~~~~~~~~~~~~ -+!!! error TS9009: 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.never = 1; + ~~~~~~~~~ -+!!! error TS9009: 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.readonly = 1; + ~~~~~~~~~~~~ -+!!! error TS9009: 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.require = 1; + ~~~~~~~~~~~ -+!!! error TS9009: 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.number = 1; + ~~~~~~~~~~ -+!!! error TS9009: 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.object = 1; + ~~~~~~~~~~ -+!!! error TS9009: 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.set = 1; + ~~~~~~~ -+!!! error TS9009: 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.string = 1; + ~~~~~~~~~~ -+!!! error TS9009: 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.symbol = 1; + ~~~~~~~~~~ -+!!! error TS9009: 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.type = 1; + ~~~~~~~~ -+!!! error TS9009: 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.undefined = 1; + ~~~~~~~~~~~~~ -+!!! error TS9009: 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.unique = 1; + ~~~~~~~~~~ -+!!! error TS9009: 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.unknown = 1; + ~~~~~~~~~~~ -+!!! error TS9009: 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.from = 1; + ~~~~~~~~ -+!!! error TS9009: 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.global = 1; + ~~~~~~~~~~ -+!!! error TS9009: 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.bigint = 1; + ~~~~~~~~~~ -+!!! error TS9009: 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.of = 1; + ~~~~~~ -+!!! error TS9009: 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. + \ 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 index f9e62659ec5f4..d73ff0b1a4706 100644 --- 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 @@ -15,10 +15,10 @@ +//# sourceMappingURL=numericEnumMappedType.d.ts.map +/// [Errors] //// + -+numericEnumMappedType.ts(25,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+numericEnumMappedType.ts(25,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+numericEnumMappedType.ts(26,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+numericEnumMappedType.ts(26,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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) ==== @@ -48,14 +48,14 @@ + + enum N1 { A = val(), B = val() } + ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations + ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations + enum N2 { C = val(), D = val() } + ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations + ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations + + type T1 = { [K in N1 | N2]: K }; + 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 index 2792c51b7c55d..d0cb5c96d8156 100644 --- 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 @@ -5,36 +5,48 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,8 +5,9 @@ +@@ -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](): I; ++ get [Symbol.toPrimitive](): invalid; set [Symbol.toPrimitive](x: I); } -@@ -14,18 +15,21 @@ + export {}; } //# sourceMappingURL=symbolDeclarationEmit12.d.ts.map /// [Errors] //// -+symbolDeclarationEmit12.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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 (3 errors) ==== ++==== symbolDeclarationEmit12.ts (4 errors) ==== module M { interface I { } export class C { [Symbol.iterator]: I; [Symbol.toPrimitive](x: I) { } + ~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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](): 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/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts.diff index 0995cac5704b7..ab6065985bd47 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,5 +1,31 @@ +@@ -1,5 +1,32 @@ //// [Folder/monorepo/core/index.d.ts] @@ -16,7 +16,7 @@ +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + -+Folder/monorepo/core/index.ts(3,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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) ==== @@ -24,7 +24,8 @@ + + export function getStyles() { + ~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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; + } + 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 index bd005e6eb744c..2f4b1172f8953 100644 --- 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 @@ -23,8 +23,8 @@ //# sourceMappingURL=templateLiteralTypes4.d.ts.map /// [Errors] //// -+templateLiteralTypes4.ts(43,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+templateLiteralTypes4.ts(43,60): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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'. @@ -41,9 +41,9 @@ // infer from non-literal enums const enum NonLiteralEnum { Zero = NumberLiteralEnum.Zero, One = NumberLiteralEnum.One } + ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations + ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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: 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 index 59a2893747c48..7260aa7436aea 100644 --- 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 @@ -9,8 +9,8 @@ //// [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,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7CiAgICB4OiBudW1iZXI7CiAgICB5OiBudW1iZXI7CiAgICB6PzogbnVtYmVyOwogICAgbW92ZUJ5KGR4OiBudW1iZXIsIGR5OiBudW1iZXIsIGR6PzogbnVtYmVyKTogdm9pZDsKfQoKbGV0IHAxOiBQb2ludCA9IHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9OwoKbGV0IHAyOiBQb2ludCB8IG51bGwgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwMzogUG9pbnQgfCB1bmRlZmluZWQgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwNDogUG9pbnQgfCBudWxsIHwgdW5kZWZpbmVkID0gewogICAgeDogMTAsCiAgICB5OiAyMCwKICAgIG1vdmVCeShkeCwgZHksIGR6KSB7CiAgICAgICAgdGhpcy54ICs9IGR4OwogICAgICAgIHRoaXMueSArPSBkeTsKICAgICAgICBpZiAodGhpcy56ICYmIGR6KSB7CiAgICAgICAgICAgIHRoaXMueiArPSBkejsKICAgICAgICB9CiA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hvZHM6IHsKICAgICAgICBmKHg6IHN0cmluZykgewogICAgICAgICAgICByZXR1cm4gdGhpcy54OwogICAgICAgIH0KICAgIH0sCiAgICBjb21wdXRlZDogewogICAgICAgIHRlc3QoKTogbnVtYmVyIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMueDsKICAgICAgICB9LAogICAgICAgIGhlbGxvOiB7CiAgICAgICAgICAgIGdldCgpIHsKICAgICAgICAgICAgICAgIHJldHVybiAiaGkiOwogICAgICAgICAgICB9LAogICAgICAgICAgICBzZXQodmFsdWU6IHN0cmluZykgewogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQp9KTsKCnZ1ZTsKdnVlLng7CnZ1ZS5mKCJhYmMiKTsKdnVlLnRlc3Q7CnZ1ZS5oZWxsbzsK -+//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBsZXQgb2JqMTogew0KICAgIGE6IG51bWJlcjsNCiAgICBmKCk6IG51bWJlcjsNCiAgICBiOiBzdHJpbmc7DQogICAgYzogew0KICAgICAgICBnKCk6IHZvaWQ7DQogICAgfTsNCiAgICByZWFkb25seSBkOiBudW1iZXI7DQogICAgZTogc3RyaW5nOw0KfTsNCnR5cGUgUG9pbnQgPSB7DQogICAgeDogbnVtYmVyOw0KICAgIHk6IG51bWJlcjsNCiAgICB6PzogbnVtYmVyOw0KICAgIG1vdmVCeShkeDogbnVtYmVyLCBkeTogbnVtYmVyLCBkej86IG51bWJlcik6IHZvaWQ7DQp9Ow0KZGVjbGFyZSBsZXQgcDE6IFBvaW50Ow0KZGVjbGFyZSBsZXQgcDI6IFBvaW50IHwgbnVsbDsNCmRlY2xhcmUgbGV0IHAzOiBQb2ludCB8IHVuZGVmaW5lZDsNCmRlY2xhcmUgbGV0IHA0OiBQb2ludCB8IG51bGwgfCB1bmRlZmluZWQ7DQpkZWNsYXJlIGZ1bmN0aW9uIGYxKHA6IFBvaW50KTogdm9pZDsNCmRlY2xhcmUgZnVuY3Rpb24gZjIocDogUG9pbnQ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dGhlCi8vIGNvbnRleHR1YWwgdHlwZS4KCnR5cGUgUG9pbnQgPSB7CiAgICB4OiBudW1iZXI7CiAgICB5OiBudW1iZXI7CiAgICB6PzogbnVtYmVyOwogICAgbW92ZUJ5KGR4OiBudW1iZXIsIGR5OiBudW1iZXIsIGR6PzogbnVtYmVyKTogdm9pZDsKfQoKbGV0IHAxOiBQb2ludCA9IHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9OwoKbGV0IHAyOiBQb2ludCB8IG51bGwgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwMzogUG9pbnQgfCB1bmRlZmluZWQgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwNDogUG9pbnQgfCBudWxsIHwgdW5kZWZpbmVkID0gewogICAgeDogMTAsCiAgICB5OiAyMCwKICAgIG1vdmVCeShkeCwgZHksIGR6KSB7CiAgICAgICAgdGhpcy54ICs9IGR4OwogICAgICAgIHRoaXMueSArPSBkeTsKICAgICAgICBpZiAodGhpcy56ICYm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ogICAgZGF0YTogKCkgPT4gKHsgeDogMSwgeTogMiB9KSwKICAgIG1ldGhvZHM6IHsKICAgICAgICBmKHg6IHN0cmluZykgewogICAgICAgICAgICByZXR1cm4gdGhpcy54OwogICAgICAgIH0KICAgIH0sCiAgICBjb21wdXRlZDogewogICAgICAgIHRlc3QoKTogbnVtYmVyIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMueDsKICAgICAgICB9LAogICAgICAgIGhlbGxvOiB7CiAgICAgICAgICAgIGdldCgpIHsKICAgICAgICAgICAgICAgIHJldHVybiAiaGkiOwogICAgICAgICAgICB9LAogICAgICAgICAgICBzZXQodmFsdWU6IHN0cmluZykgewogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQp9KTsKCnZ1ZTsKdnVlLng7CnZ1ZS5mKCJhYmMiKTsKdnVlLnRlc3Q7CnZ1ZS5oZWxsbzsK ++//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBsZXQgb2JqMTogew0KICAgIGE6IG51bWJlcjsNCiAgICBmKCk6IG51bWJlcjsNCiAgICBiOiBzdHJpbmc7DQogICAgYzogew0KICAgICAgICBnKCk6IHZvaWQ7DQogICAgfTsNCiAgICByZWFkb25seSBkOiBudW1iZXI7DQogICAgZTogc3RyaW5nOw0KfTsNCnR5cGUgUG9pbnQgPSB7DQogICAgeDogbnVtYmVyOw0KICAgIHk6IG51bWJlcjsNCiAgICB6PzogbnVtYmVyOw0KICAgIG1vdmVCeShkeDogbnVtYmVyLCBkeTogbnVtYmVyLCBkej86IG51bWJlcik6IHZvaWQ7DQp9Ow0KZGVjbGFyZSBsZXQgcDE6IFBvaW50Ow0KZGVjbGFyZSBsZXQgcDI6IFBvaW50IHwgbnVsbDsNCmRlY2xhcmUgbGV0IHAzOiBQb2ludCB8IHVuZGVmaW5lZDsNCmRlY2xhcmUgbGV0IHA0OiBQb2ludCB8IG51bGwgfCB1bmRlZmluZWQ7DQpkZWNsYXJlIGZ1bmN0aW9uIGYxKHA6IFBva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ZXRob2RzIG9mIGFuIG9iamVjdCBsaXRlcmFsIHdpdGggYSBjb250ZXh0dWFsIHR5cGUsICd0aGlzJyBoYXMgdGhlCi8vIGNvbnRleHR1YWwgdHlwZS4KCnR5cGUgUG9pbnQgPSB7CiAgICB4OiBudW1iZXI7CiAgICB5OiBudW1iZXI7CiAgICB6PzogbnVtYmVyOwogICAgbW92ZUJ5KGR4OiBudW1iZXIsIGR5OiBudW1iZXIsIGR6PzogbnVtYmVyKTogdm9pZDsKfQoKbGV0IHAxOiBQb2ludCA9IHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9OwoKbGV0IHAyOiBQb2ludCB8IG51bGwgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwMzogUG9pbnQgfCB1bmRlZmluZWQgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwNDogUG9pbnQgfCBudWxsIHwgdW5kZWZpbmVkID0gewogICAgeDogMTAsCiAgICB5OiAyMCwKICAgIG1vdmVCeShkeCwgZHksIGR6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TogbnVtYmVyOwp9ICYgewogICAgdGVzdDogbnVtYmVyOwogICAgaGVsbG86IHN0cmluZzsKfSA9IG5ldyBWdWUoewogICAgZGF0YTogKCkgPT4gKHsgeDogMSwgeTogMiB9KSwKICAgIG1ldGhvZHM6IHsKICAgICAgICBmKHg6IHN0cmluZykgewogICAgICAgICAgICByZXR1cm4gdGhpcy54OwogICAgICAgIH0KICAgIH0sCiAgICBjb21wdXRlZDogewogICAgICAgIHRlc3QoKTogbnVtYmVyIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMueDsKICAgICAgICB9LAogICAgICAgIGhlbGxvOiB7CiAgICAgICAgICAgIGdldCgpIHsKICAgICAgICAgICAgICAgIHJldHVybiAiaGkiOwogICAgICAgICAgICB9LAogICAgICAgICAgICBzZXQodmFsdWU6IHN0cmluZykgewogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQp9KTsKCnZ1ZTsKdnVlLng7CnZ1ZS5mKCJhYmMiKTsKdnVlLnRlc3Q7CnZ1ZS5oZWxsbzsK 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 index ea19a39afb809..79cc89fd5a326 100644 --- 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 @@ -61,11 +61,11 @@ //# sourceMappingURL=typeFromPropertyAssignment29.d.ts.map /// [Errors] //// -+typeFromPropertyAssignment29.ts(4,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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(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'. @@ -74,7 +74,7 @@ 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 TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. ++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'. @@ -88,10 +88,10 @@ } ExpandoDecl.prop = 2 + ~~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. ExpandoDecl.m = function(n: number) { + ~~~~~~~~~~~~~ -+!!! error TS9009: 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. return n + 1; } var n: number = ExpandoDecl.prop + ExpandoDecl.m(12) + ExpandoDecl(101).length @@ -102,14 +102,14 @@ } ExpandoNested.also = -1; + ~~~~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. function ExpandoMerge(n: number): number { return n * 100; } ExpandoMerge.p1 = 111 + ~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. namespace ExpandoMerge { export var p2 = 222; } @@ -120,7 +120,7 @@ function ExpandoNamespace(): void {} ExpandoNamespace.p6 = 42; + ~~~~~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. export function foo(): typeof ExpandoNamespace { return ExpandoNamespace; } @@ -131,7 +131,7 @@ // Class expressions shouldn't work in typescript either var ExpandoExpr3 = class { + ~~~~~ -+!!! error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. ++!!! 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/typesVersionsDeclarationEmit.multiFile.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typesVersionsDeclarationEmit.multiFile.d.ts.diff index 4fd9b41b74648..1bcc27eae8462 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,6 +1,49 @@ +@@ -1,6 +1,51 @@ //// [/.src/main.d.ts] @@ -18,8 +18,8 @@ +//# sourceMappingURL=main.d.ts.map +/// [Errors] //// + -+main.ts(4,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+main.ts(5,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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) ==== @@ -28,10 +28,12 @@ + + export const va = fa(); + ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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) ==== + { 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 index 94cb85197023f..b153814f8cfcc 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,23 +1,26 @@ +@@ -1,23 +1,27 @@ //// [/.src/main.d.ts] @@ -16,7 +16,7 @@ /// [Errors] //// main.ts(1,10): error TS2305: Module '"ext"' has no exported member 'fa'. -+main.ts(5,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++main.ts(5,19): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -==== main.ts (1 errors) ==== @@ -29,7 +29,8 @@ export const va: any = fa(); export const vb = fb(); + ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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) ==== { 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 index 5b8a5bc692243..d59e493af11b2 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,6 +1,46 @@ +@@ -1,6 +1,48 @@ //// [/.src/main.d.ts] @@ -18,8 +18,8 @@ +//# sourceMappingURL=main.d.ts.map +/// [Errors] //// + -+main.ts(4,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+main.ts(5,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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) ==== @@ -28,10 +28,12 @@ + + export const va = fa(); + ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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) ==== + { 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 index c12207f96018e..3a0b08cdc2baa 100644 --- 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 @@ -31,7 +31,7 @@ +//# sourceMappingURL=uniqueSymbolsDeclarationsErrors.d.ts.map +/// [Errors] //// + -+uniqueSymbolsDeclarationsErrors.ts(15,32): error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. ++uniqueSymbolsDeclarationsErrors.ts(15,32): error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + + +==== uniqueSymbolsDeclarationsErrors.ts (1 errors) ==== @@ -51,7 +51,7 @@ + + export const classExpression = class { + ~~~~~ -+!!! error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. ++!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. + method1(p: typeof s): typeof s { + return p; + } diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/varianceAnnotations.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/varianceAnnotations.d.ts.diff index 2b1ff810a8e88..82657cc7ab838 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/varianceAnnotations.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/varianceAnnotations.d.ts.diff @@ -31,8 +31,8 @@ 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 TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. -+varianceAnnotations.ts(170,20): error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. ++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) ==== @@ -47,7 +47,7 @@ let Anon = class { + ~~~~~ -+!!! error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. ++!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. foo(): InstanceType<(typeof Anon)> { return this; } @@ -55,7 +55,7 @@ let OuterC = class C { + ~ -+!!! error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. ++!!! 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/dte/accessorInferredReturnTypeErrorInReturnStatement.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/accessorInferredReturnTypeErrorInReturnStatement.d.ts.map index 46bd689729d4a..884f80af4d42b 100644 --- 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 @@ -16,7 +16,7 @@ export declare var basePrototype: { //// [accessorInferredReturnTypeErrorInReturnStatement.d.ts.map] -{"version":3,"file":"accessorInferredReturnTypeErrorInReturnStatement.d.ts","sourceRoot":"","sources":["accessorInferredReturnTypeErrorInReturnStatement.ts"],"names":[],"mappings":"AAAA,eAAO,IAAI,aAAa;0BACH,GAAG;CAIvB,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==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjZXNzb3JJbmZlcnJlZFJldHVyblR5cGVFcnJvckluUmV0dXJuU3RhdGVtZW50LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhY2Nlc3NvckluZmVycmVkUmV0dXJuVHlwZUVycm9ySW5SZXR1cm5TdGF0ZW1lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZUFBTyxJQUFJLGFBQWE7MEJBQ0gsR0FBRztDQUl2QixDQUFDIn0=,ZXhwb3J0IHZhciBiYXNlUHJvdG90eXBlID0gewogIGdldCBwcmltYXJ5UGF0aCgpOiBhbnkgewogICAgdmFyIF90aGlzID0gdGhpczsKICAgIHJldHVybiBfdGhpcy5jb2xsZWN0aW9uLnNjaGVtYS5wcmltYXJ5UGF0aDsKICB9LCAgCn07Cg== +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgdmFyIGJhc2VQcm90b3R5cGU6IHsNCiAgICByZWFkb25seSBwcmltYXJ5UGF0aDogYW55Ow0KfTsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWFjY2Vzc29ySW5mZXJyZWRSZXR1cm5UeXBlRXJyb3JJblJldHVyblN0YXRlbWVudC5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjZXNzb3JJbmZlcnJlZFJldHVyblR5cGVFcnJvckluUmV0dXJuU3RhdGVtZW50LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhY2Nlc3NvckluZmVycmVkUmV0dXJuVHlwZUVycm9ySW5SZXR1cm5TdGF0ZW1lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZUFBTyxJQUFJLGFBQWE7YUFDbEIsV0FBVyxFQUFJLEdBQUc7Q0FJdkIsQ0FBQyJ9,ZXhwb3J0IHZhciBiYXNlUHJvdG90eXBlID0gewogIGdldCBwcmltYXJ5UGF0aCgpOiBhbnkgewogICAgdmFyIF90aGlzID0gdGhpczsKICAgIHJldHVybiBfdGhpcy5jb2xsZWN0aW9uLnNjaGVtYS5wcmltYXJ5UGF0aDsKICB9LCAgCn07Cg== 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 index fcb0de4af2c62..d8c36e7ce68a2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrayFakeFlatNoCrashInferenceDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrayFakeFlatNoCrashInferenceDeclarations.d.ts @@ -34,7 +34,7 @@ declare function foo(arr: T[], depth: number): invalid; /// [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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +arrayFakeFlatNoCrashInferenceDeclarations.ts(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations ==== arrayFakeFlatNoCrashInferenceDeclarations.ts (2 errors) ==== @@ -54,6 +54,7 @@ arrayFakeFlatNoCrashInferenceDeclarations.ts(13,10): error TS9007: Declaration e ~~~ !!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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/computedEnumTypeWidening.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedEnumTypeWidening.d.ts index 6add5627b98d7..f0df87606e0d5 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedEnumTypeWidening.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedEnumTypeWidening.d.ts @@ -126,10 +126,10 @@ declare let val2: MyDeclaredEnum; //# sourceMappingURL=computedEnumTypeWidening.d.ts.map /// [Errors] //// -computedEnumTypeWidening.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedEnumTypeWidening.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedEnumTypeWidening.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedEnumTypeWidening.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -138,16 +138,16 @@ computedEnumTypeWidening.ts(7,5): error TS9007: Declaration emit for this file r enum E { A = computed(0), ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations B = computed(1), ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations C = computed(2), ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations D = computed(3), ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations } function f1(): void { 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 index 2737ca1ae3851..136f50bf91ede 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum2.d.ts @@ -30,11 +30,11 @@ declare const enum D { //# sourceMappingURL=constEnum2.d.ts.map /// [Errors] //// -constEnum2.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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. @@ -50,17 +50,17 @@ constEnum2.ts(12,9): error TS2474: const enum member initializers must be consta d = 10, e = 199 * Math.floor(Math.random() * 1000), ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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/declFileEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts index 7a96ecf671fbc..712abbea48b78 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts @@ -73,7 +73,7 @@ declare enum e5 { //# sourceMappingURL=declFileEnums.d.ts.map /// [Errors] //// -declFileEnums.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declFileEnums.ts(15,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations ==== declFileEnums.ts (1 errors) ==== @@ -93,7 +93,7 @@ declFileEnums.ts(15,5): error TS9007: Declaration emit for this file requires ty a = 10, b = Math.PI, ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations c = a + 3 } 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 index 251999dd421f4..2d20a9fd82a41 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCommonJsModuleReferencedType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCommonJsModuleReferencedType.d.ts @@ -36,7 +36,7 @@ export declare const y: RootProps; /// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -63,6 +63,7 @@ r/entry.ts(3,18): error TS9007: Declaration emit for this file requires type res ~ !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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/declarationEmitDefaultExportWithStaticAssignment.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDefaultExportWithStaticAssignment.d.ts index 51818a7074b3a..2b3e7719dfcad 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDefaultExportWithStaticAssignment.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDefaultExportWithStaticAssignment.d.ts @@ -58,11 +58,11 @@ export declare function C(): any; //# sourceMappingURL=index4.d.ts.map /// [Errors] //// -index1.ts(3,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +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) ==== @@ -73,7 +73,7 @@ index4.ts(10,1): error TS9009: Assigning properties to functions without declari export default function Example(): void {} Example.Foo = Foo ~~~~~~~~~~~ -!!! error TS9009: 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. ==== index2.ts (1 errors) ==== import {Foo} from './foo'; @@ -81,7 +81,7 @@ index4.ts(10,1): error TS9009: Assigning properties to functions without declari export default function Example(): void {} Example.Foo = Foo ~~~~~~~~~~~ -!!! error TS9009: 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. ==== index3.ts (1 errors) ==== export class Bar {} @@ -89,7 +89,7 @@ index4.ts(10,1): error TS9009: Assigning properties to functions without declari Example.Bar = Bar ~~~~~~~~~~~ -!!! error TS9009: 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. ==== index4.ts (2 errors) ==== function A() { } @@ -102,7 +102,7 @@ index4.ts(10,1): error TS9009: Assigning properties to functions without declari C.A = A; ~~~ -!!! error TS9009: 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. C.B = B; ~~~ -!!! error TS9009: 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 +!!! error 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 index 3531dad3ce3d1..8abaa81efb566 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringParameterProperties.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDestructuringParameterProperties.d.ts @@ -51,30 +51,15 @@ declare class C3 { /// [Errors] //// declarationEmitDestructuringParameterProperties.ts(2,17): error TS1187: A parameter property may not be declared using a binding pattern. -declarationEmitDestructuringParameterProperties.ts(2,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitDestructuringParameterProperties.ts(2,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitDestructuringParameterProperties.ts(2,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. declarationEmitDestructuringParameterProperties.ts(8,17): error TS1187: A parameter property may not be declared using a binding pattern. -declarationEmitDestructuringParameterProperties.ts(8,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitDestructuringParameterProperties.ts(8,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitDestructuringParameterProperties.ts(8,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. declarationEmitDestructuringParameterProperties.ts(14,17): error TS1187: A parameter property may not be declared using a binding pattern. -declarationEmitDestructuringParameterProperties.ts(14,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitDestructuringParameterProperties.ts(14,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -declarationEmitDestructuringParameterProperties.ts(14,32): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -==== declarationEmitDestructuringParameterProperties.ts (12 errors) ==== +==== 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. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } } @@ -83,12 +68,6 @@ declarationEmitDestructuringParameterProperties.ts(14,32): error TS9007: Declara constructor(public [x, y, z]: TupleType1) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS1187: A parameter property may not be declared using a binding pattern. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } } @@ -97,11 +76,5 @@ declarationEmitDestructuringParameterProperties.ts(14,32): error TS9007: Declara constructor(public { x, y, z }: ObjType1) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS1187: A parameter property may not be declared using a binding pattern. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } } \ No newline at end of file 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 index 1fb7d6fb34781..3b0ad7920b781 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoPropertyPrivateName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitExpandoPropertyPrivateName.d.ts @@ -26,7 +26,7 @@ export declare function q(): void; /// [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 TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +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) ==== @@ -40,5 +40,5 @@ b.ts(4,1): error TS9009: Assigning properties to functions without declaring the ~~~~~ !!! error TS4032: Property 'val' of exported interface has or is using name 'I' from private module '"a"'. ~~~~~ -!!! error TS9009: 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. \ 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 index 043dca9bb0ea3..6b52f2ac43f44 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink.d.ts @@ -43,7 +43,7 @@ export declare const a: invalid; //# sourceMappingURL=index.d.ts.map /// [Errors] //// -/p1/index.ts(4,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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) ==== @@ -76,7 +76,8 @@ export declare const a: invalid; export const a = getA(); ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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; 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 index 04d0533f636d9..150ef9098934c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink2.d.ts @@ -31,7 +31,7 @@ export declare const a: invalid; //# sourceMappingURL=index.d.ts.map /// [Errors] //// -/p1/index.ts(4,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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) ==== @@ -52,7 +52,8 @@ export declare const a: invalid; export const a = getA(); ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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; 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 index 18e083348ca13..c4221d1f6457c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionDuplicateNamespace.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionDuplicateNamespace.d.ts @@ -20,7 +20,7 @@ declare function f(a: 1): 1; //# sourceMappingURL=declarationEmitFunctionDuplicateNamespace.d.ts.map /// [Errors] //// -declarationEmitFunctionDuplicateNamespace.ts(7,1): error TS9009: 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(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) ==== @@ -32,5 +32,5 @@ declarationEmitFunctionDuplicateNamespace.ts(7,1): error TS9009: Assigning prope f.x = 2; ~~~ -!!! error TS9009: 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. \ 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 index cb32568b3490d..efaa7f350054c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionKeywordProp.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitFunctionKeywordProp.d.ts @@ -23,31 +23,31 @@ declare function baz(): void; //# sourceMappingURL=declarationEmitFunctionKeywordProp.d.ts.map /// [Errors] //// -declarationEmitFunctionKeywordProp.ts(2,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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(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 TS9009: 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. function bar(): void {} bar.async = true; ~~~~~~~~~ -!!! error TS9009: 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. bar.normal = false; ~~~~~~~~~~ -!!! error TS9009: 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. function baz(): void {} baz.class = true; ~~~~~~~~~ -!!! error TS9009: 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. baz.normal = false; ~~~~~~~~~~ -!!! error TS9009: 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 +!!! error 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/declarationEmitLateBoundAssignments.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments.d.ts index 5870faeb376be..01d8a916a8ad9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments.d.ts @@ -26,34 +26,34 @@ export declare function foo(): void; //# sourceMappingURL=declarationEmitLateBoundAssignments.d.ts.map /// [Errors] //// -declarationEmitLateBoundAssignments.ts(2,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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(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 TS9009: 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. const _private = Symbol(); foo[_private] = "ok"; ~~~~~~~~~~~~~ -!!! error TS9009: 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. const strMem = "strMemName"; foo[strMem] = "ok"; ~~~~~~~~~~~ -!!! error TS9009: 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. const dashStrMem = "dashed-str-mem"; foo[dashStrMem] = "ok"; ~~~~~~~~~~~~~~~ -!!! error TS9009: 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. const numMem = 42; foo[numMem] = "ok"; ~~~~~~~~~~~ -!!! error TS9009: 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. const x: string = foo[_private]; const y: string = foo[strMem]; 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 index 15a6f7e0c2963..afc47978ed3e1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts @@ -158,16 +158,16 @@ export declare const arrow10: { //# sourceMappingURL=declarationEmitLateBoundAssignments2.d.ts.map /// [Errors] //// -declarationEmitLateBoundAssignments2.ts(10,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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,1): error 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) ==== @@ -182,52 +182,52 @@ declarationEmitLateBoundAssignments2.ts(37,1): error TS9009: Assigning propertie export function decl(): void {} decl["B"] = 'foo' ~~~~~~~~~ -!!! error TS9009: 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. export function decl2(): void {} decl2[c] = 0 ~~~~~~~~ -!!! error TS9009: 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. export function decl3(): void {} decl3[77] = 0 ~~~~~~~~~ -!!! error TS9009: 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. export function decl4(): void {} decl4[num] = 0 ~~~~~~~~~~ -!!! error TS9009: 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. export function decl5(): void {} decl5["101"] = 0 ~~~~~~~~~~~~ -!!! error TS9009: 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. export function decl6(): void {} decl6[numStr] = 0 ~~~~~~~~~~~~~ -!!! error TS9009: 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. export function decl7(): void {} decl7["qwe rty"] = 0 ~~~~~~~~~~~~~~~~ -!!! error TS9009: 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. export function decl8(): void {} decl8[withWhitespace] = 0 ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9009: 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. export function decl9(): void {} decl9["🤪"] = 0 ~~~~~~~~~~~ -!!! error TS9009: 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. export function decl10(): void {} decl10[emoji] = 0 ~~~~~~~~~~~~~ -!!! error TS9009: 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. export const arrow: { (): void 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 index 68c2a527d977b..c6b0b28b04176 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectAssignedDefaultExport.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectAssignedDefaultExport.d.ts @@ -53,7 +53,7 @@ export default _default; /// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +index.ts(7,16): error TS9013: Expression type can't be inferred with --isolatedDeclarations ==== node_modules/styled-components/node_modules/hoist-non-react-statics/index.d.ts (0 errors) ==== @@ -103,5 +103,5 @@ index.ts(7,16): error TS9007: Declaration emit for this file requires type resol ~~~ !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations \ No newline at end of file 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 index 3301f5d268e9f..7920892256e1a 100644 --- 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 @@ -29,5 +29,5 @@ export default _default; //// [/.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;;iBAG9C,MAAM;;AADjB,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/dte/declarationEmitPrefersPathKindBasedOnBundling2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitPrefersPathKindBasedOnBundling2.d.ts.map index 978f0ea124f41..bf6864ce168fd 100644 --- 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 @@ -31,7 +31,7 @@ export default _default; //// [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;;iBAG9C,MAAM;;AADjB,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,aW1wb3J0IHsgU2NhbGFyIH0gZnJvbSAnLi4vbGliL29wZXJhdG9ycy9zY2FsYXInOw0KZGVjbGFyZSB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cm9tICcuLi9saWIvb3BlcmF0b3JzL3NjYWxhcic7CgpleHBvcnQgZGVmYXVsdCB7CglnZXQgeHMoKTogU2NhbGFyIHsKCQlyZXR1cm4gc2NhbGFyKCIxNHB4Iik7Cgl9Cn07Cg== 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 index fdd5676fffcc5..735b6999be626 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference.d.ts @@ -55,7 +55,7 @@ export declare const ADMIN: invalid; //# sourceMappingURL=keys.d.ts.map /// [Errors] //// -monorepo/pkg3/src/keys.ts(3,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -65,7 +65,8 @@ monorepo/pkg3/src/keys.ts(3,22): error TS9007: Declaration emit for this file re export const ADMIN = MetadataAccessor.create('1'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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) ==== 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 index 796347e92419f..4c0a74fbe3a59 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference2.d.ts @@ -58,7 +58,7 @@ export declare const ADMIN: invalid; //# sourceMappingURL=keys.d.ts.map /// [Errors] //// -monorepo/pkg3/src/keys.ts(3,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -68,7 +68,8 @@ monorepo/pkg3/src/keys.ts(3,22): error TS9007: Declaration emit for this file re export const ADMIN = MetadataAccessor.create('1'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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) ==== 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 index 53d0fcc9c1f98..cce6f656ee7a6 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference3.d.ts @@ -56,7 +56,7 @@ export declare const ADMIN: invalid; /// [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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -68,7 +68,8 @@ monorepo/pkg3/src/keys.ts(3,22): error TS9007: Declaration emit for this file re ~~~~~ !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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) ==== 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 index a7069f94ae6be..1d849ea2ca9f1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithInvalidPackageJsonTypings.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithInvalidPackageJsonTypings.d.ts @@ -38,7 +38,7 @@ export declare const useCsvParser: () => invalid; //# sourceMappingURL=index.d.ts.map /// [Errors] //// -/p1/index.ts(7,29): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +/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) ==== @@ -62,9 +62,9 @@ export declare const useCsvParser: () => invalid; } export const useCsvParser = () => { ~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 /p1/index.ts:7:14: Add a type annotation to the variable useCsvParser -!!! related TS9603 /p1/index.ts:7:29: Add a return type to the function expression +!!! 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; }; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts index 4f749fc0f83d7..9c0e95fdfe7b4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts @@ -101,9 +101,9 @@ declare class C4 { declarationFiles.ts(4,20): error TS2526: A 'this' type is available only in a non-static member of a class or interface. declarationFiles.ts(36,5): error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. -declarationFiles.ts(36,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationFiles.ts(36,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations declarationFiles.ts(42,5): error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. -declarationFiles.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +declarationFiles.ts(42,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ==== declarationFiles.ts (5 errors) ==== @@ -148,7 +148,8 @@ declarationFiles.ts(42,5): error TS9007: Declaration emit for this file requires ~~ !!! error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 declarationFiles.ts:36:5: Add a return type to the method return { a: this }; } f2(): this[] { @@ -158,7 +159,8 @@ declarationFiles.ts(42,5): error TS9007: Declaration emit for this file requires ~~ !!! error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 declarationFiles.ts:42:5: Add a return type to the method return [{ a: this }]; } f4(): () => this { 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 index ed328f8a996b5..3ba23a08168c5 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitClassExpressionInDeclarationFile.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitClassExpressionInDeclarationFile.d.ts @@ -81,20 +81,20 @@ export {}; //# sourceMappingURL=emitClassExpressionInDeclarationFile.d.ts.map /// [Errors] //// -emitClassExpressionInDeclarationFile.ts(1,28): error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. -emitClassExpressionInDeclarationFile.ts(5,38): error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. +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 TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. +!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. static getTags() { } tags() { } } export var circularReference = class C { ~ -!!! error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. +!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. static getTags(c: C): C { return c } tags(c: C): C { return c } } 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 index b83031b0636d4..115c7305af4b2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitClassExpressionInDeclarationFile2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/emitClassExpressionInDeclarationFile2.d.ts @@ -86,7 +86,7 @@ export {}; 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 TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. +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; }'. @@ -103,7 +103,7 @@ emitClassExpressionInDeclarationFile2.ts(45,6): error TS2339: Property 'tags' do ~~~~~~~~~~ !!! error TS4094: Property 'ps' of exported class expression may not be private or protected. ~~~~~ -!!! error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. +!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. static getTags() { } tags() { } private static ps = -1 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 index 60dbf08495c53..50dee270165cb 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumClassification.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumClassification.d.ts @@ -146,10 +146,10 @@ declare enum E20 { //# sourceMappingURL=enumClassification.d.ts.map /// [Errors] //// -enumClassification.ts(74,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumClassification.ts(75,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumClassification.ts(76,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -enumClassification.ts(77,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -228,15 +228,15 @@ enumClassification.ts(77,5): error TS9007: Declaration emit for this file requir enum E20 { A = "foo".length, ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations B = A + 1, ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations C = +"123", ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations D = Math.sin(1) ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 index eabddbf6c1426..8bc9f52567c8e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts @@ -83,7 +83,7 @@ declare enum T7 { //# sourceMappingURL=enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts.map /// [Errors] //// -enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(32,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(32,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations ==== enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts (1 errors) ==== @@ -120,7 +120,7 @@ enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(32,5): error TS9007: De a = 1, b = `12`.length ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations } declare enum T7 { 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 index c89fc8a3c931d..e269072c2e2fd 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionBlockShadowing.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionBlockShadowing.d.ts @@ -30,7 +30,7 @@ export declare function Y(): void; //# sourceMappingURL=expandoFunctionBlockShadowing.d.ts.map /// [Errors] //// -expandoFunctionBlockShadowing.ts(10,1): error TS9009: 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(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) ==== @@ -45,7 +45,7 @@ expandoFunctionBlockShadowing.ts(10,1): error TS9009: Assigning properties to fu export function Y(): void {} Y.test = "foo"; ~~~~~~ -!!! error TS9009: 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. const aliasTopY = Y; if (Math.random()) { const Y = function Y() {} 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 index 249fb003077ef..7558306dd7510 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionNestedAssigments.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/expandoFunctionNestedAssigments.d.ts @@ -64,30 +64,30 @@ declare function bar(p?: number): void; //# sourceMappingURL=expandoFunctionNestedAssigments.d.ts.map /// [Errors] //// -expandoFunctionNestedAssigments.ts(4,18): error TS9009: 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(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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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,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) ==== @@ -96,7 +96,7 @@ expandoFunctionNestedAssigments.ts(49,9): error TS9009: Assigning properties to } let d: number = (Foo.inVariableInit = 1); ~~~~~~~~~~~~~~~~~~ -!!! error TS9009: 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. function bar(p: number = (Foo.inNestedFunction = 1)): void { @@ -107,86 +107,86 @@ expandoFunctionNestedAssigments.ts(49,9): error TS9009: Assigning properties to (Foo.bla = { foo: 1}).foo = (Foo.baz = 1) + (Foo.bar = 0); ~~~~~~~ -!!! error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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.inIf = 1; ~~~~~~~~ -!!! error TS9009: 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. } while(Foo.fromWhileCondition = 1) { ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9009: 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.fromWhileBody = 1; ~~~~~~~~~~~~~~~~~ -!!! error TS9009: 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.fromWhileBodyNested = 1; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9009: 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. } } do { Foo.fromDoBody = 1; ~~~~~~~~~~~~~~ -!!! error TS9009: 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.fromDoBodyNested = 1; ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9009: 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. } } while(Foo.fromDoCondition = 1); ~~~~~~~~~~~~~~~~~~~ -!!! error TS9009: 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. for(Foo.forInit = 1; (Foo.forCond = 1) > 1; Foo.forIncr = 1){ ~~~~~~~~~~~ -!!! error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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.fromForBodyNested = 1; ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9009: 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. } } for(let f of (Foo.forOf = []) ){ ~~~~~~~~~ -!!! error TS9009: 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.fromForOfBody = 1; ~~~~~~~~~~~~~~~~~ -!!! error TS9009: 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.fromForOfBodyNested = 1; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9009: 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. } } for(let f in (Foo.forIn = []) ){ ~~~~~~~~~ -!!! error TS9009: 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.fromForInBody = 1; ~~~~~~~~~~~~~~~~~ -!!! error TS9009: 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.fromForInBodyNested = 1; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9009: 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. } } \ 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 index f0638fc126207..8d5c44bda1bb4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportDefaultNamespace.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/exportDefaultNamespace.d.ts @@ -17,7 +17,7 @@ export default function someFunc(): string; //# sourceMappingURL=exportDefaultNamespace.d.ts.map /// [Errors] //// -exportDefaultNamespace.ts(5,1): error TS9009: 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(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) ==== @@ -27,5 +27,5 @@ exportDefaultNamespace.ts(5,1): error TS9009: Assigning properties to functions someFunc.someProp = 'yo'; ~~~~~~~~~~~~~~~~~ -!!! error TS9009: 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. \ No newline at end of file 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 index fd9cd632d6243..88a8b379610d9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrors.d.ts @@ -34,14 +34,14 @@ declare const errorOnMissingReturn: { //# sourceMappingURL=isolatedDeclarationErrors.d.ts.map /// [Errors] //// -isolatedDeclarationErrors.ts(2,1): error TS9009: 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(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 TS9009: 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. const errorOnAssignmentBelow: { (): void; 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..73d28fe1a6ee8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsClasses.d.ts @@ -0,0 +1,87 @@ +//// [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 { + + [noAnnotationLiteralName](): void { } + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName](): void { } + + [noParamAnnotationStringName](v: any): void { } + + get [noAnnotationStringName](): number { return 0;} + + set [noParamAnnotationStringName](value: any) { } +} + + + +/// [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 { + [noAnnotationLiteralName](): void; + [noParamAnnotationLiteralName](v: string): void; + [noAnnotationStringName](): void; + [noParamAnnotationStringName](v: any): void; + get [noAnnotationStringName](): number; + set [noParamAnnotationStringName](value: any); +} +export {}; 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..fc72dcd3bfacd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsObjects.d.ts @@ -0,0 +1,342 @@ +//// [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() { }, + okMethod(): void { }, + a: 1, + bad() { }, + 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(); +enum E { + V = 10, +} +export const oWithComputedProperties: { + [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, +} + +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: { + b: number; + nested: { + a: number; + }; + c: number; + part: { + a: number; + }; +} = { + b: 1, + nested: { + ...part, + }, + c: 1, + part, +} + + +/// [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: 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: { + b: number; + nested: { + a: number; + }; + c: number; + part: { + a: number; + }; +}; +export {}; + +/// [Errors] //// + +isolatedDeclarationErrorsObjects.ts(93,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. +isolatedDeclarationErrorsObjects.ts(108,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() { }, + okMethod(): void { }, + a: 1, + bad() { }, + 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(); + enum E { + V = 10, + } + export const oWithComputedProperties: { + [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, + } + + 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'. + b: number; + nested: { + a: number; + }; + c: number; + part: { + a: number; + }; + } = { + b: 1, + nested: { + ...part, + }, + c: 1, + part, + } + \ 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 index 226cb257f6a08..9c6039d216f4e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/lateBoundFunctionMemberAssignmentDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/lateBoundFunctionMemberAssignmentDeclarations.d.ts @@ -18,19 +18,19 @@ export declare function foo(): void; //# sourceMappingURL=index.d.ts.map /// [Errors] //// -index.ts(2,1): error TS9009: 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 TS9009: 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,1): error 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 TS9009: 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. const _private = Symbol(); foo[_private] = "ok"; ~~~~~~~~~~~~~ -!!! error TS9009: 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. const x: string = foo[_private]; \ No newline at end of file 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 index 2b86ea606575c..b0cdf3573f1b4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts @@ -40,15 +40,15 @@ export declare const a: () => invalid; //# sourceMappingURL=index.d.ts.map /// [Errors] //// -index.ts(1,18): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 index.ts:1:14: Add a type annotation to the variable a -!!! related TS9603 index.ts:1:18: Add a return type to the function expression +!!! 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) ==== 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 index 0b7b1ad2603af..bbe0d828e634d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModuleReexportFromDottedPath.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModuleReexportFromDottedPath.d.ts @@ -29,7 +29,7 @@ export default _default; //# sourceMappingURL=index.d.ts.map /// [Errors] //// -/index.ts(4,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/index.ts(4,16): error TS9013: Expression type can't be inferred with --isolatedDeclarations ==== /node_modules/.prisma/client/index.d.ts (0 errors) ==== @@ -50,5 +50,5 @@ export default _default; const EnhancedPrisma = enhancePrisma(PrismaClient); export default new EnhancedPrisma(); ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations \ 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 index df0ac13b8f26d..60daac6d4ac24 100644 --- 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 @@ -38,7 +38,7 @@ export declare const a: invalid; 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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. @@ -53,7 +53,8 @@ index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Pro ~ !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~~~~~~~~~~~~~~~ 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 index df0ac13b8f26d..60daac6d4ac24 100644 --- 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 @@ -38,7 +38,7 @@ export declare const a: invalid; 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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. @@ -53,7 +53,8 @@ index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Pro ~ !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~~~~~~~~~~~~~~~ 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 index 0bb86851c4940..52c118a05af9b 100644 --- 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 @@ -47,7 +47,7 @@ export declare const x: () => Thing; 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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. @@ -62,7 +62,8 @@ index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Pro ~ !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~~~~~~~~~~~~~~~ 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 index 0bb86851c4940..52c118a05af9b 100644 --- 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 @@ -47,7 +47,7 @@ export declare const x: () => Thing; 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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. @@ -62,7 +62,8 @@ index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Pro ~ !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~~~~~~~~~~~~~~~ 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 index ad02db5ab3d72..d72105da5ad57 100644 --- 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 @@ -44,7 +44,7 @@ export declare const a: invalid; 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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. @@ -57,7 +57,8 @@ index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Pro !!! error TS2307: Cannot find module 'inner/other.js' or its corresponding type declarations. export const a = (await import("inner")).x(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~~~~~~~~~~~~~~~ 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 index ad02db5ab3d72..d72105da5ad57 100644 --- 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 @@ -44,7 +44,7 @@ export declare const a: invalid; 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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. @@ -57,7 +57,8 @@ index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Pro !!! error TS2307: Cannot find module 'inner/other.js' or its corresponding type declarations. export const a = (await import("inner")).x(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~~~~~~~~~~~~~~~ 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 index 868f7b7fd545c..164b279f8f735 100644 --- 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 @@ -39,7 +39,7 @@ export declare const a: invalid; 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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. @@ -52,7 +52,8 @@ index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Pro !!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. export const a = (await import("inner/index.js")).x(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~~~~~~~~~~~~~~~~~~~~~~~~ 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 index 868f7b7fd545c..164b279f8f735 100644 --- 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 @@ -39,7 +39,7 @@ export declare const a: invalid; 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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. @@ -52,7 +52,8 @@ index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Pro !!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. export const a = (await import("inner/index.js")).x(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~~~~~~~~~~~~~~~~~~~~~~~~ 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 index d5d6589e987ab..18a7fac061d4b 100644 --- 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 @@ -39,7 +39,7 @@ export declare const a: invalid; 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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. @@ -52,7 +52,8 @@ index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Pro !!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. export const a = (await import("inner/index.js")).x(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~~~~~~~~~~~~~~~~~~~~~~~~ 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 index d5d6589e987ab..18a7fac061d4b 100644 --- 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 @@ -39,7 +39,7 @@ export declare const a: invalid; 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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. @@ -52,7 +52,8 @@ index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Pro !!! error TS2307: Cannot find module 'inner/other' or its corresponding type declarations. export const a = (await import("inner/index.js")).x(); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~~~~~~~~~~~~~~~~~~~~~~~~ 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 index f480df427ef10..af9b57d227854 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nullPropertyName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nullPropertyName.d.ts @@ -94,84 +94,84 @@ declare function foo(): void; //# sourceMappingURL=nullPropertyName.d.ts.map /// [Errors] //// -nullPropertyName.ts(3,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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(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) ==== @@ -179,238 +179,238 @@ nullPropertyName.ts(82,1): error TS9009: Assigning properties to functions witho // properties foo.x = 1; ~~~~~ -!!! error TS9009: 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.y = 1; ~~~~~ -!!! error TS9009: 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. // keywords foo.break = 1; ~~~~~~~~~ -!!! error TS9009: 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.case = 1; ~~~~~~~~ -!!! error TS9009: 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.catch = 1; ~~~~~~~~~ -!!! error TS9009: 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.class = 1; ~~~~~~~~~ -!!! error TS9009: 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.const = 1; ~~~~~~~~~ -!!! error TS9009: 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.continue = 1; ~~~~~~~~~~~~ -!!! error TS9009: 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.debugger = 1; ~~~~~~~~~~~~ -!!! error TS9009: 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.default = 1; ~~~~~~~~~~~ -!!! error TS9009: 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.delete = 1; ~~~~~~~~~~ -!!! error TS9009: 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.do = 1; ~~~~~~ -!!! error TS9009: 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.else = 1; ~~~~~~~~ -!!! error TS9009: 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.enum = 1; ~~~~~~~~ -!!! error TS9009: 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.export = 1; ~~~~~~~~~~ -!!! error TS9009: 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.extends = 1; ~~~~~~~~~~~ -!!! error TS9009: 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.false = 1; ~~~~~~~~~ -!!! error TS9009: 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.finally = 1; ~~~~~~~~~~~ -!!! error TS9009: 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.for = 1; ~~~~~~~ -!!! error TS9009: 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.function = 1; ~~~~~~~~~~~~ -!!! error TS9009: 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.if = 1; ~~~~~~ -!!! error TS9009: 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.import = 1; ~~~~~~~~~~ -!!! error TS9009: 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.in = 1; ~~~~~~ -!!! error TS9009: 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.instanceof = 1; ~~~~~~~~~~~~~~ -!!! error TS9009: 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.new = 1; ~~~~~~~ -!!! error TS9009: 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.null = 1; ~~~~~~~~ -!!! error TS9009: 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.return = 1; ~~~~~~~~~~ -!!! error TS9009: 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.super = 1; ~~~~~~~~~ -!!! error TS9009: 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.switch = 1; ~~~~~~~~~~ -!!! error TS9009: 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.this = 1; ~~~~~~~~ -!!! error TS9009: 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.throw = 1; ~~~~~~~~~ -!!! error TS9009: 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.true = 1; ~~~~~~~~ -!!! error TS9009: 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.try = 1; ~~~~~~~ -!!! error TS9009: 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.typeof = 1; ~~~~~~~~~~ -!!! error TS9009: 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.var = 1; ~~~~~~~ -!!! error TS9009: 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.void = 1; ~~~~~~~~ -!!! error TS9009: 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.while = 1; ~~~~~~~~~ -!!! error TS9009: 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.with = 1; ~~~~~~~~ -!!! error TS9009: 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.implements = 1; ~~~~~~~~~~~~~~ -!!! error TS9009: 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.interface = 1; ~~~~~~~~~~~~~ -!!! error TS9009: 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.let = 1; ~~~~~~~ -!!! error TS9009: 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.package = 1; ~~~~~~~~~~~ -!!! error TS9009: 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.private = 1; ~~~~~~~~~~~ -!!! error TS9009: 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.protected = 1; ~~~~~~~~~~~~~ -!!! error TS9009: 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.public = 1; ~~~~~~~~~~ -!!! error TS9009: 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.static = 1; ~~~~~~~~~~ -!!! error TS9009: 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.yield = 1; ~~~~~~~~~ -!!! error TS9009: 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.abstract = 1; ~~~~~~~~~~~~ -!!! error TS9009: 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.as = 1; ~~~~~~ -!!! error TS9009: 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.asserts = 1; ~~~~~~~~~~~ -!!! error TS9009: 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.any = 1; ~~~~~~~ -!!! error TS9009: 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.async = 1; ~~~~~~~~~ -!!! error TS9009: 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.await = 1; ~~~~~~~~~ -!!! error TS9009: 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.boolean = 1; ~~~~~~~~~~~ -!!! error TS9009: 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.constructor = 1; ~~~~~~~~~~~~~~~ -!!! error TS9009: 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.declare = 1; ~~~~~~~~~~~ -!!! error TS9009: 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.get = 1; ~~~~~~~ -!!! error TS9009: 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.infer = 1; ~~~~~~~~~ -!!! error TS9009: 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.is = 1; ~~~~~~ -!!! error TS9009: 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.keyof = 1; ~~~~~~~~~ -!!! error TS9009: 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.module = 1; ~~~~~~~~~~ -!!! error TS9009: 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.namespace = 1; ~~~~~~~~~~~~~ -!!! error TS9009: 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.never = 1; ~~~~~~~~~ -!!! error TS9009: 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.readonly = 1; ~~~~~~~~~~~~ -!!! error TS9009: 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.require = 1; ~~~~~~~~~~~ -!!! error TS9009: 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.number = 1; ~~~~~~~~~~ -!!! error TS9009: 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.object = 1; ~~~~~~~~~~ -!!! error TS9009: 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.set = 1; ~~~~~~~ -!!! error TS9009: 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.string = 1; ~~~~~~~~~~ -!!! error TS9009: 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.symbol = 1; ~~~~~~~~~~ -!!! error TS9009: 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.type = 1; ~~~~~~~~ -!!! error TS9009: 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.undefined = 1; ~~~~~~~~~~~~~ -!!! error TS9009: 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.unique = 1; ~~~~~~~~~~ -!!! error TS9009: 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.unknown = 1; ~~~~~~~~~~~ -!!! error TS9009: 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.from = 1; ~~~~~~~~ -!!! error TS9009: 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.global = 1; ~~~~~~~~~~ -!!! error TS9009: 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.bigint = 1; ~~~~~~~~~~ -!!! error TS9009: 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.of = 1; ~~~~~~ -!!! error TS9009: 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. \ 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 index bd10e86efe4ee..8adb653c06216 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/numericEnumMappedType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/numericEnumMappedType.d.ts @@ -86,10 +86,10 @@ declare const x: E.ONE; //# sourceMappingURL=numericEnumMappedType.d.ts.map /// [Errors] //// -numericEnumMappedType.ts(25,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -numericEnumMappedType.ts(25,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -numericEnumMappedType.ts(26,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -numericEnumMappedType.ts(26,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -119,14 +119,14 @@ numericEnumMappedType.ts(26,22): error TS9007: Declaration emit for this file re enum N1 { A = val(), B = val() } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations enum N2 { C = val(), D = val() } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations type T1 = { [K in N1 | N2]: K }; 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 index a1dbcacfad5c2..6f386417abeae 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit12.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit12.d.ts @@ -9,7 +9,7 @@ module M { [Symbol.isConcatSpreadable](): I { return undefined } - get [Symbol.toPrimitive](): I { return undefined; } + get [Symbol.toPrimitive]() { return undefined; } set [Symbol.toPrimitive](x: I) { } } } @@ -26,7 +26,7 @@ declare namespace M { [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 {}; @@ -34,25 +34,30 @@ declare namespace M { //# sourceMappingURL=symbolDeclarationEmit12.d.ts.map /// [Errors] //// -symbolDeclarationEmit12.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 (3 errors) ==== +==== symbolDeclarationEmit12.ts (4 errors) ==== module M { interface I { } export class C { [Symbol.iterator]: I; [Symbol.toPrimitive](x: I) { } ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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](): 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/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts index 847e35281f833..d990a72df9084 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts @@ -29,7 +29,7 @@ export declare function getStyles(): invalid; //# sourceMappingURL=index.d.ts.map /// [Errors] //// -Folder/monorepo/core/index.ts(3,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -37,7 +37,8 @@ Folder/monorepo/core/index.ts(3,17): error TS9007: Declaration emit for this fil export function getStyles() { ~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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; } 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 index 4a693f5269f1c..9d9467eda92c7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes4.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes4.d.ts @@ -469,8 +469,8 @@ declare function f4(s: `**${T}**`): T; //# sourceMappingURL=templateLiteralTypes4.d.ts.map /// [Errors] //// -templateLiteralTypes4.ts(43,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -templateLiteralTypes4.ts(43,60): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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'. @@ -520,9 +520,9 @@ templateLiteralTypes4.ts(289,12): error TS2345: Argument of type '2' is not assi // infer from non-literal enums const enum NonLiteralEnum { Zero = NumberLiteralEnum.Zero, One = NumberLiteralEnum.One } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: 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 index c5bf81438b6b3..a04df70935127 100644 --- 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 @@ -98,7 +98,7 @@ declare let vue: { //// [thisTypeInObjectLiterals2.d.ts.map] -{"version":3,"file":"thisTypeInObjectLiterals2.d.ts","sourceRoot":"","sources":["thisTypeInObjectLiterals2.ts"],"names":[],"mappings":"AAGA,QAAA,IAAI,IAAI;;SAEC,MAAM;;;aAKF,IAAI;;gBAIJ,MAAM;OAGN,MAAM;CAMlB,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,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MuZygpOwogICAgICAgIH0KICAgIH0sCiAgICBnZXQgZCgpOiBudW1iZXIgewogICAgICAgIHJldHVybiB0aGlzLmE7CiAgICB9LAogICAgZ2V0IGUoKTogc3RyaW5nIHsKICAgICAgICByZXR1cm4gdGhpcy5iOwogICAgfSwKICAgIHNldCBlKHZhbHVlKSB7CiAgICAgICAgdGhpcy5iID0gdmFsdWU7CiAgICB9Cn07CgovLyBJbiBtZXRob2RzIG9mIGFuIG9iamVjdCBsaXRlcmFsIHdpdGggYSBjb250ZXh0dWFsIHR5cGUsICd0aGlzJyBoYXMgdGhlCi8vIGNvbnRleHR1YWwgdHlwZS4KCnR5cGUgUG9pbnQgPSB7CiAgICB4OiBudW1iZXI7CiAgICB5OiBudW1iZXI7CiAgICB6PzogbnVtYmVyOwogICAgbW92ZUJ5KGR4OiBudW1iZXIsIGR5OiBudW1iZXIsIGR6PzogbnVtYmVyKTogdm9pZDsKfQoKbGV0IHAxOiBQb2ludCA9IHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9OwoKbGV0IHAyOiBQb2ludCB8IG51bGwgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwMzogUG9pbnQgfCB1bmRlZmluZWQgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwNDogUG9pbnQgfCBudWxsIHwgdW5kZWZpbmVkID0gewogICAgeDogMTAsCiAgICB5OiAyMCwKICAgIG1vdmVCeShkeCwgZHksIGR6KSB7CiAgICAgICAgdGhpcy54ICs9IGR4OwogICAgICAgIHRoaXMueSArPSBkeTsKICAgICAgICBpZiAodGhpcy56ICYmIGR6KSB7CiAgICAgICAgICAgIHRoaXMueiArPSBkejsKICAgICAgICB9CiAgICB9Cn07CgpkZWNsYXJlIGZ1bmN0aW9uIGYxKHA6IFBvaW50KTogdm9pZDsKCmYxKHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9KTsKCmRlY2xhcmUgZnVuY3Rpb24gZjIocDogUG9pbnQgfCBudWxsIHwgdW5kZWZpbmVkKTogdm9pZDsKCmYyKHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9KTsKCi8vIEluIG1ldGhvZHMgb2YgYW4gb2JqZWN0IGxpdGVyYWwgd2l0aCBhIGNvbnRleHR1YWwgdHlwZSB0aGF0IGluY2x1ZGVzIHNvbWUKLy8gVGhpc1R5cGU8VD4sICd0aGlzJyBpcyBvZiB0eXBl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AgY29tcHV0ZWQ/OiBBY2Nlc3NvcnM8UD47Cn0KCmRlY2xhcmUgY29uc3QgVnVlOiBuZXcgPEQsIE0sIFA+KG9wdGlvbnM6IFZ1ZU9wdGlvbnM8RCwgTSwgUD4pID0+IEQgJiBNICYgUDsKCmxldCB2dWU6IHsKICAgIHg6IG51bWJlcjsKICAgIHk6IG51bWJlcjsKfSAmIHsKICAgIGYoeDogc3RyaW5nKTogbnVtYmVyOwp9ICYgewogICAgdGVzdDogbnVtYmVyOwogICAgaGVsbG86IHN0cmluZzsKfSA9IG5ldyBWdWUoewogICAgZGF0YTogKCkgPT4gKHsgeDogMSwgeTogMiB9KSwKICAgIG1ldGhvZHM6IHsKICAgICAgICBmKHg6IHN0cmluZykgewogICAgICAgICAgICByZXR1cm4gdGhpcy54OwogICAgICAgIH0KICAgIH0sCiAgICBjb21wdXRlZDogewogICAgICAgIHRlc3QoKTogbnVtYmVyIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMueDsKICAgICAgICB9LAogICAgICAgIGhlbGxvOiB7CiAgICAgICAgICAgIGdldCgpIHsKICAgICAgICAgICAgICAgIHJldHVybiAiaGkiOwogICAgICAgICAgICB9LAogICAgICAgICAgICBzZXQodmFsdWU6IHN0cmluZykgewogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQp9KTsKCnZ1ZTsKdnVlLng7CnZ1ZS5mKCJhYmMiKTsKdnVlLnRlc3Q7CnZ1ZS5oZWxsbzsK +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBsZXQgb2JqMTogew0KICAgIGE6IG51bWJlcjsNCiAgICBmKCk6IG51bWJlcjsNCiAgICBiOiBzdHJpbmc7DQogICAgYzogew0KICAgICAgICBnKCk6IHZvaWQ7DQogICAgfTsNCiAgICByZWFkb25seSBkOiBudW1iZXI7DQogICAgZTogc3RyaW5nOw0KfTsNCnR5cGUgUG9pbnQgPSB7DQogICAgeDogbnVtYmVyOw0KICAgIHk6IG51bWJlcjsNCiAgICB6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KICAgIH0sCiAgICBiOiAiaGVsbG8iLAogICAgYzogewogICAgICAgIGcoKTogdm9pZCB7CiAgICAgICAgICAgIHRoaXMuZygpOwogICAgICAgIH0KICAgIH0sCiAgICBnZXQgZCgpOiBudW1iZXIgewogICAgICAgIHJldHVybiB0aGlzLmE7CiAgICB9LAogICAgZ2V0IGUoKTogc3RyaW5nIHsKICAgICAgICByZXR1cm4gdGhpcy5iOwogICAgfSwKICAgIHNldCBlKHZhbHVlKSB7CiAgICAgICAgdGhpcy5iID0gdmFsdWU7CiAgICB9Cn07CgovLyBJbiBtZXRob2RzIG9mIGFuIG9iamVjdCBsaXRlcmFsIHdpdGggYSBjb250ZXh0dWFsIHR5cGUsICd0aGlzJyBoYXMgdGhlCi8vIGNvbnRleHR1YWwgdHlwZS4KCnR5cGUgUG9pbnQgPSB7CiAgICB4OiBudW1iZXI7CiAgICB5OiBudW1iZXI7CiAgICB6PzogbnVtYmVyOwogICAgbW92ZUJ5KGR4OiBudW1iZXIsIGR5OiBudW1iZXIsIGR6PzogbnVtYmVyKTogdm9pZDsKfQoKbGV0IHAxOiBQb2ludCA9IHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9OwoKbGV0IHAyOiBQb2ludCB8IG51bGwgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwMzogUG9pbnQgfCB1bmRlZmluZWQgPSB7CiAgICB4OiAxMCwKICAgIHk6IDIwLAogICAgbW92ZUJ5KGR4LCBkeSwgZHopIHsKICAgICAgICB0aGlzLnggKz0gZHg7CiAgICAgICAgdGhpcy55ICs9IGR5OwogICAgICAgIGlmICh0aGlzLnogJiYgZHopIHsKICAgICAgICAgICAgdGhpcy56ICs9IGR6OwogICAgICAgIH0KICAgIH0KfTsKCmxldCBwNDogUG9pbnQgfCBudWxsIHwgdW5kZWZpbmVkID0gewogICAgeDogMTAsCiAgICB5OiAyMCwKICAgIG1vdmVCeShkeCwgZHksIGR6KSB7CiAgICAgICAgdGhpcy54ICs9IGR4OwogICAgICAgIHRoaXMueSArPSBkeTsKICAgICAgICBpZiAodGhpcy56ICYmIGR6KSB7CiAgICAgICAgICAgIHRoaXMueiArPSBkejsKICAgICAgICB9CiAgICB9Cn07CgpkZWNsYXJlIGZ1bmN0aW9uIGYxKHA6IFBvaW50KTogdm9pZDsKCmYxKHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9KTsKCmRlY2xhcmUgZnVuY3Rpb24gZjIocDogUG9pbnQgfCBudWxsIHwgdW5kZWZpbmVkKTogdm9pZDsKCmYyKHsKICAgIHg6IDEwLAogICAgeTogMjAsCiAgICBtb3ZlQnkoZHgsIGR5LCBkeikgewogICAgICAgIHRoaXMueCArPSBkeDsKICAgICAgICB0aGlzLnkgKz0gZHk7CiAgICAgICAgaWYgKHRoaXMueiAmJiBkeikgewogICAgICAgICAgICB0aGlzLnogKz0gZHo7CiAgICAgICAgfQogICAgfQp9KTsKCi8vIEluIG1ldGhvZHMgb2YgYW4gb2JqZWN0IGxpdGVyYWwgd2l0aCBhIGNvbnRleHR1Y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BlPEQgJiBNICYgUD4gJiB7CiAgICBkYXRhPzogRCB8ICgoKSA9PiBEKTsKICAgIG1ldGhvZHM/OiBNOwogICAgY29tcHV0ZWQ/OiBBY2Nlc3NvcnM8UD47Cn0KCmRlY2xhcmUgY29uc3QgVnVlOiBuZXcgPEQsIE0sIFA+KG9wdGlvbnM6IFZ1ZU9wdGlvbnM8RCwgTSwgUD4pID0+IEQgJiBNICYgUDsKCmxldCB2dWU6IHsKICAgIHg6IG51bWJlcjsKICAgIHk6IG51bWJlcjsKfSAmIHsKICAgIGYoeDogc3RyaW5nKTogbnVtYmVyOwp9ICYgewogICAgdGVzdDogbnVtYmVyOwogICAgaGVsbG86IHN0cmluZzsKfSA9IG5ldyBWdWUoewogICAgZGF0YTogKCkgPT4gKHsgeDogMSwgeTogMiB9KSwKICAgIG1ldGhvZHM6IHsKICAgICAgICBmKHg6IHN0cmluZykgewogICAgICAgICAgICByZXR1cm4gdGhpcy54OwogICAgICAgIH0KICAgIH0sCiAgICBjb21wdXRlZDogewogICAgICAgIHRlc3QoKTogbnVtYmVyIHsKICAgICAgICAgICAgcmV0dXJuIHRoaXMueDsKICAgICAgICB9LAogICAgICAgIGhlbGxvOiB7CiAgICAgICAgICAgIGdldCgpIHsKICAgICAgICAgICAgICAgIHJldHVybiAiaGkiOwogICAgICAgICAgICB9LAogICAgICAgICAgICBzZXQodmFsdWU6IHN0cmluZykgewogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQp9KTsKCnZ1ZTsKdnVlLng7CnZ1ZS5mKCJhYmMiKTsKdnVlLnRlc3Q7CnZ1ZS5oZWxsbzsK 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 index 17fe5b21c7ebf..af1ad45ff6186 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts @@ -157,11 +157,11 @@ declare var n: number; //# sourceMappingURL=typeFromPropertyAssignment29.d.ts.map /// [Errors] //// -typeFromPropertyAssignment29.ts(4,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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(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'. @@ -170,7 +170,7 @@ typeFromPropertyAssignment29.ts(87,14): error TS2339: Property 'prop' does not e 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 TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. +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'. @@ -183,10 +183,10 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi } ExpandoDecl.prop = 2 ~~~~~~~~~~~~~~~~ -!!! error TS9009: 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. ExpandoDecl.m = function(n: number) { ~~~~~~~~~~~~~ -!!! error TS9009: 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. return n + 1; } var n: number = ExpandoDecl.prop + ExpandoDecl.m(12) + ExpandoDecl(101).length @@ -234,14 +234,14 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi } ExpandoNested.also = -1; ~~~~~~~~~~~~~~~~~~ -!!! error TS9009: 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. function ExpandoMerge(n: number): number { return n * 100; } ExpandoMerge.p1 = 111 ~~~~~~~~~~~~~~~ -!!! error TS9009: 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. namespace ExpandoMerge { export var p2 = 222; } @@ -254,7 +254,7 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi function ExpandoNamespace(): void {} ExpandoNamespace.p6 = 42; ~~~~~~~~~~~~~~~~~~~ -!!! error TS9009: 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. export function foo(): typeof ExpandoNamespace { return ExpandoNamespace; } @@ -299,7 +299,7 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi // Class expressions shouldn't work in typescript either var ExpandoExpr3 = class { ~~~~~ -!!! error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. +!!! 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/dte/typesVersionsDeclarationEmit.multiFile.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typesVersionsDeclarationEmit.multiFile.d.ts index 0a51548a505dc..354f26e371c13 100644 --- 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 @@ -44,8 +44,8 @@ export declare const vb: invalid; //# sourceMappingURL=main.d.ts.map /// [Errors] //// -main.ts(4,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -main.ts(5,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -54,10 +54,12 @@ main.ts(5,19): error TS9007: Declaration emit for this file requires type resolu export const va = fa(); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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) ==== { 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 index ae06b2ce1ccba..75774be0c85a4 100644 --- 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 @@ -43,7 +43,7 @@ export declare const vb: invalid; /// [Errors] //// main.ts(1,10): error TS2305: Module '"ext"' has no exported member 'fa'. -main.ts(5,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +main.ts(5,19): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations ==== main.ts (2 errors) ==== @@ -55,7 +55,8 @@ main.ts(5,19): error TS9007: Declaration emit for this file requires type resolu export const va: any = fa(); export const vb = fb(); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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) ==== { 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 index 50a7f5c172142..3891b36af9b51 100644 --- 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 @@ -41,8 +41,8 @@ export declare const va2: invalid; //# sourceMappingURL=main.d.ts.map /// [Errors] //// -main.ts(4,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -main.ts(5,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -51,10 +51,12 @@ main.ts(5,20): error TS9007: Declaration emit for this file requires type resolu export const va = fa(); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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) ==== { 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 index f3f2e43899d69..5494c730e535c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/uniqueSymbolsDeclarationsErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/uniqueSymbolsDeclarationsErrors.d.ts @@ -112,7 +112,7 @@ export {}; //# sourceMappingURL=uniqueSymbolsDeclarationsErrors.d.ts.map /// [Errors] //// -uniqueSymbolsDeclarationsErrors.ts(15,32): error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. +uniqueSymbolsDeclarationsErrors.ts(15,32): error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. ==== uniqueSymbolsDeclarationsErrors.ts (1 errors) ==== @@ -132,7 +132,7 @@ uniqueSymbolsDeclarationsErrors.ts(15,32): error TS9011: Declaration emit for cl export const classExpression = class { ~~~~~ -!!! error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. +!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. method1(p: typeof s): typeof s { return p; } 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 index 3a543e6da3380..163f00136a5a3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/varianceAnnotations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/varianceAnnotations.d.ts @@ -357,8 +357,8 @@ varianceAnnotations.ts(160,68): error TS2345: Argument of type 'ActionObject<{ t 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 TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. -varianceAnnotations.ts(170,20): error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. +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) ==== @@ -624,7 +624,7 @@ varianceAnnotations.ts(170,20): error TS9011: Declaration emit for class express let Anon = class { ~~~~~ -!!! error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. +!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. foo(): InstanceType<(typeof Anon)> { return this; } @@ -632,7 +632,7 @@ varianceAnnotations.ts(170,20): error TS9011: Declaration emit for class express let OuterC = class C { ~ -!!! error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. +!!! 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/tsc/isolatedDeclarationErrorsClasses.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsClasses.d.ts new file mode 100644 index 0000000000000..1d1ab297eaec0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsClasses.d.ts @@ -0,0 +1,81 @@ +//// [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 { + + [noAnnotationLiteralName](): void { } + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName](): void { } + + [noParamAnnotationStringName](v: any): void { } + + get [noAnnotationStringName](): number { return 0;} + + set [noParamAnnotationStringName](value: any) { } +} + + + +/// [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 {}; 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..ebd04560eae71 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsObjects.d.ts @@ -0,0 +1,341 @@ +//// [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() { }, + okMethod(): void { }, + a: 1, + bad() { }, + 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(); +enum E { + V = 10, +} +export const oWithComputedProperties: { + [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, +} + +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: { + b: number; + nested: { + a: number; + }; + c: number; + part: { + a: number; + }; +} = { + b: 1, + nested: { + ...part, + }, + c: 1, + part, +} + + +/// [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: 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: { + b: number; + nested: { + a: number; + }; + c: number; + part: { + a: number; + }; +}; +export {}; + +/// [Errors] //// + +isolatedDeclarationErrorsObjects.ts(93,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. +isolatedDeclarationErrorsObjects.ts(108,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() { }, + okMethod(): void { }, + a: 1, + bad() { }, + 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(); + enum E { + V = 10, + } + export const oWithComputedProperties: { + [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, + } + + 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'. + b: number; + nested: { + a: number; + }; + c: number; + part: { + a: number; + }; + } = { + b: 1, + nested: { + ...part, + }, + c: 1, + part, + } + \ No newline at end of file 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 index 19c4a5c25641d..92984de958c6f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit12.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolDeclarationEmit12.d.ts @@ -9,7 +9,7 @@ module M { [Symbol.isConcatSpreadable](): I { return undefined } - get [Symbol.toPrimitive](): I { return undefined; } + get [Symbol.toPrimitive]() { return undefined; } set [Symbol.toPrimitive](x: I) { } } } @@ -46,7 +46,7 @@ symbolDeclarationEmit12.ts(10,13): error TS2300: Duplicate identifier '[Symbol.t [Symbol.isConcatSpreadable](): I { return undefined } - get [Symbol.toPrimitive](): I { return undefined; } + get [Symbol.toPrimitive]() { return undefined; } ~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. set [Symbol.toPrimitive](x: I) { } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5For-ofTypeCheck10.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5For-ofTypeCheck10.d.ts.diff new file mode 100644 index 0000000000000..56059dcc89abb --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5For-ofTypeCheck10.d.ts.diff @@ -0,0 +1,35 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -9,15 +9,14 @@ + /// [Errors] //// + + ES5For-ofTypeCheck10.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + ES5For-ofTypeCheck10.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-ES5For-ofTypeCheck10.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ES5For-ofTypeCheck10.ts(9,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ES5For-ofTypeCheck10.ts(9,6): error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. + ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an array type or a string type. + + +-==== ES5For-ofTypeCheck10.ts (6 errors) ==== ++==== ES5For-ofTypeCheck10.ts (5 errors) ==== + // In ES3/5, you cannot for...of over an arbitrary iterable. + class StringIterator { + next() { + ~~~~ +@@ -31,10 +30,8 @@ + [Symbol.iterator]() { + ~~~~~~~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 ES5For-ofTypeCheck10.ts:9:5: Add a return type to the method +- ~~~~~~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~~~~~~ + !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ + !!! error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff index 92c535c2b2c84..d85223747b1a6 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -4,24 +4,7 @@ +@@ -4,25 +4,7 @@ interface SymbolConstructor { foo: string; } @@ -14,7 +14,7 @@ - -/// [Errors] //// - --ES5SymbolProperty1.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-ES5SymbolProperty1.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - - -==== ES5SymbolProperty1.ts (1 errors) ==== @@ -26,7 +26,8 @@ - var obj = { - [Symbol.foo]: 0 - ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 ES5SymbolProperty1.ts:6:5: Add a type annotation to the variable obj - } - - obj[Symbol.foo]; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty2.d.ts.diff new file mode 100644 index 0000000000000..8686f56c9e369 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty2.d.ts.diff @@ -0,0 +1,32 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/Symbols/ES5SymbolProperty2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -11,23 +11,20 @@ + + /// [Errors] //// + + ES5SymbolProperty2.ts(5,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-ES5SymbolProperty2.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ES5SymbolProperty2.ts(10,11): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + +-==== ES5SymbolProperty2.ts (3 errors) ==== ++==== ES5SymbolProperty2.ts (2 errors) ==== + module M { + var Symbol: any; + + export class C { + [Symbol.iterator]() { } + ~~~~~~~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 ES5SymbolProperty2.ts:5:9: Add a return type to the method +- ~~~~~~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + } + (new C)[Symbol.iterator]; + } + diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty3.d.ts.diff new file mode 100644 index 0000000000000..0bf3947a516e9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty3.d.ts.diff @@ -0,0 +1,30 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/Symbols/ES5SymbolProperty3.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -8,20 +8,17 @@ + + /// [Errors] //// + + ES5SymbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-ES5SymbolProperty3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +-==== ES5SymbolProperty3.ts (2 errors) ==== ++==== ES5SymbolProperty3.ts (1 errors) ==== + var Symbol: any; + + class C { + [Symbol.iterator]() { } + ~~~~~~~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 ES5SymbolProperty3.ts:4:5: Add a return type to the method +- ~~~~~~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + } + + (new C)[Symbol.iterator] +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty4.d.ts.diff new file mode 100644 index 0000000000000..0d7866db58bed --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty4.d.ts.diff @@ -0,0 +1,30 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/Symbols/ES5SymbolProperty4.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -10,20 +10,17 @@ + + /// [Errors] //// + + ES5SymbolProperty4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-ES5SymbolProperty4.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +-==== ES5SymbolProperty4.ts (2 errors) ==== ++==== ES5SymbolProperty4.ts (1 errors) ==== + var Symbol: { iterator: string }; + + class C { + [Symbol.iterator]() { } + ~~~~~~~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 ES5SymbolProperty4.ts:4:5: Add a return type to the method +- ~~~~~~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + } + + (new C)[Symbol.iterator] +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty5.d.ts.diff new file mode 100644 index 0000000000000..73c08fbdd277c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty5.d.ts.diff @@ -0,0 +1,30 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/Symbols/ES5SymbolProperty5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -10,20 +10,17 @@ + + /// [Errors] //// + + ES5SymbolProperty5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-ES5SymbolProperty5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +-==== ES5SymbolProperty5.ts (2 errors) ==== ++==== ES5SymbolProperty5.ts (1 errors) ==== + var Symbol: { iterator: symbol }; + + class C { + [Symbol.iterator]() { } + ~~~~~~~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 ES5SymbolProperty5.ts:4:5: Add a return type to the method +- ~~~~~~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + } + + (new C)[Symbol.iterator](0) // Should error +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty6.d.ts.diff new file mode 100644 index 0000000000000..86aad38b6ae61 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty6.d.ts.diff @@ -0,0 +1,34 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/Symbols/ES5SymbolProperty6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -8,25 +8,22 @@ + /// [Errors] //// + + ES5SymbolProperty6.ts(1,1): error TS2304: Cannot find name 'u'. + ES5SymbolProperty6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-ES5SymbolProperty6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ES5SymbolProperty6.ts(3,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ES5SymbolProperty6.ts(3,6): error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. + ES5SymbolProperty6.ts(6,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + +-==== ES5SymbolProperty6.ts (6 errors) ==== ++==== ES5SymbolProperty6.ts (5 errors) ==== + u//@target: ES5 + ~ + !!! error TS2304: Cannot find name 'u'. + class C { + [Symbol.iterator]() { } + ~~~~~~~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 ES5SymbolProperty6.ts:3:5: Add a return type to the method +- ~~~~~~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~~~~~~ + !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ + !!! error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty7.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty7.d.ts.diff new file mode 100644 index 0000000000000..341c0f034c5d7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty7.d.ts.diff @@ -0,0 +1,30 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/Symbols/ES5SymbolProperty7.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -10,20 +10,17 @@ + + /// [Errors] //// + + ES5SymbolProperty7.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-ES5SymbolProperty7.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +-==== ES5SymbolProperty7.ts (2 errors) ==== ++==== ES5SymbolProperty7.ts (1 errors) ==== + var Symbol: { iterator: any }; + + class C { + [Symbol.iterator]() { } + ~~~~~~~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 ES5SymbolProperty7.ts:4:5: Add a return type to the method +- ~~~~~~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + } + + (new C)[Symbol.iterator] +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff index 99a1a867983e0..3a17255cccfee 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff @@ -5,27 +5,24 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -4,17 +4,17 @@ +@@ -4,19 +4,15 @@ declare var v: invalid; /// [Errors] //// --FunctionDeclaration8_es6.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-FunctionDeclaration8_es6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations FunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'yield'. FunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. -+FunctionDeclaration8_es6.ts(1,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + FunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations - ==== FunctionDeclaration8_es6.ts (3 errors) ==== +-==== FunctionDeclaration8_es6.ts (4 errors) ==== ++==== FunctionDeclaration8_es6.ts (3 errors) ==== var v = { [yield]: foo } - ~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 FunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v ~~~~~ !!! error TS2304: Cannot find name 'yield'. ~~~ -\ No newline at end of file --!!! error TS2304: Cannot find name 'foo'. -+!!! error TS2304: Cannot find name 'foo'. -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -\ No newline at end of file + !!! error TS2304: Cannot find name 'foo'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/MemberFunctionDeclaration3_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/MemberFunctionDeclaration3_es6.d.ts.diff new file mode 100644 index 0000000000000..1dc70d684c4cc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/MemberFunctionDeclaration3_es6.d.ts.diff @@ -0,0 +1,30 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,21 +7,18 @@ + + /// [Errors] //// + + MemberFunctionDeclaration3_es6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-MemberFunctionDeclaration3_es6.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + MemberFunctionDeclaration3_es6.ts(2,6): error TS2304: Cannot find name 'foo'. + MemberFunctionDeclaration3_es6.ts(2,6): error TS4100: Public method '[foo]' of exported class has or is using private name 'foo'. + + +-==== MemberFunctionDeclaration3_es6.ts (4 errors) ==== ++==== MemberFunctionDeclaration3_es6.ts (3 errors) ==== + class C { + *[foo]() { } + ~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 MemberFunctionDeclaration3_es6.ts:2:5: Add a return type to the method +- ~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~~~ + !!! error TS2304: Cannot find name 'foo'. + ~~~ + !!! error TS4100: Public method '[foo]' of exported class has or is using private name 'foo'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asOperator1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asOperator1.d.ts.diff index ea2784c2b0b21..b910b9e1f9b5a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/asOperator1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/asOperator1.d.ts.diff @@ -15,4 +15,4 @@ /// [Errors] //// - asOperator1.ts(3,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + asOperator1.ts(3,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff index 572ce3f984689..e814df9d720ac 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff @@ -5,27 +5,24 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -4,17 +4,17 @@ +@@ -4,19 +4,15 @@ declare var v: invalid; /// [Errors] //// --asyncFunctionDeclaration8_es2017.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-asyncFunctionDeclaration8_es2017.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations asyncFunctionDeclaration8_es2017.ts(1,12): error TS2304: Cannot find name 'await'. asyncFunctionDeclaration8_es2017.ts(1,20): error TS2304: Cannot find name 'foo'. -+asyncFunctionDeclaration8_es2017.ts(1,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + asyncFunctionDeclaration8_es2017.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations - ==== asyncFunctionDeclaration8_es2017.ts (3 errors) ==== +-==== asyncFunctionDeclaration8_es2017.ts (4 errors) ==== ++==== asyncFunctionDeclaration8_es2017.ts (3 errors) ==== var v = { [await]: foo } - ~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 asyncFunctionDeclaration8_es2017.ts:1:5: Add a type annotation to the variable v ~~~~~ !!! error TS2304: Cannot find name 'await'. ~~~ -\ No newline at end of file --!!! error TS2304: Cannot find name 'foo'. -+!!! error TS2304: Cannot find name 'foo'. -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -\ No newline at end of file + !!! error TS2304: Cannot find name 'foo'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff index 5b57a9d60c90f..e043f906b965d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff @@ -5,27 +5,24 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -4,17 +4,17 @@ +@@ -4,19 +4,15 @@ declare var v: invalid; /// [Errors] //// --asyncFunctionDeclaration8_es5.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-asyncFunctionDeclaration8_es5.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations asyncFunctionDeclaration8_es5.ts(1,12): error TS2304: Cannot find name 'await'. asyncFunctionDeclaration8_es5.ts(1,20): error TS2304: Cannot find name 'foo'. -+asyncFunctionDeclaration8_es5.ts(1,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + asyncFunctionDeclaration8_es5.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations - ==== asyncFunctionDeclaration8_es5.ts (3 errors) ==== +-==== asyncFunctionDeclaration8_es5.ts (4 errors) ==== ++==== asyncFunctionDeclaration8_es5.ts (3 errors) ==== var v = { [await]: foo } - ~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 asyncFunctionDeclaration8_es5.ts:1:5: Add a type annotation to the variable v ~~~~~ !!! error TS2304: Cannot find name 'await'. ~~~ -\ No newline at end of file --!!! error TS2304: Cannot find name 'foo'. -+!!! error TS2304: Cannot find name 'foo'. -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -\ No newline at end of file + !!! error TS2304: Cannot find name 'foo'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff index 9b0270e8d1397..5258bb592655d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff @@ -5,27 +5,24 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -4,17 +4,17 @@ +@@ -4,19 +4,15 @@ declare var v: invalid; /// [Errors] //// --asyncFunctionDeclaration8_es6.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-asyncFunctionDeclaration8_es6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations asyncFunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'await'. asyncFunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. -+asyncFunctionDeclaration8_es6.ts(1,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + asyncFunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations - ==== asyncFunctionDeclaration8_es6.ts (3 errors) ==== +-==== asyncFunctionDeclaration8_es6.ts (4 errors) ==== ++==== asyncFunctionDeclaration8_es6.ts (3 errors) ==== var v = { [await]: foo } - ~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 asyncFunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v ~~~~~ !!! error TS2304: Cannot find name 'await'. ~~~ -\ No newline at end of file --!!! error TS2304: Cannot find name 'foo'. -+!!! error TS2304: Cannot find name 'foo'. -+ ~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -\ No newline at end of file + !!! error TS2304: Cannot find name 'foo'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff index 37121767e26fc..bec5f8f7222a7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff @@ -21,14 +21,14 @@ @@ -27,9 +29,8 @@ b.ts(2,19): error TS1128: Declaration or statement expected. b.ts(3,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - b.ts(3,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + b.ts(3,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --b.ts(4,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-b.ts(4,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ==== a.ts (5 errors) ==== interface BigIntIndex { -@@ -65,9 +66,9 @@ +@@ -66,9 +67,9 @@ typedArray["1"] = 0xBB; typedArray[2] = 0xCC; @@ -39,12 +39,13 @@ const a = {1n: 123}; ~~ !!! error TS1136: Property assignment expected. -@@ -82,7 +83,5 @@ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +@@ -84,8 +85,5 @@ + !!! related TS9027 b.ts:3:7: Add a type annotation to the variable b const c = {[bigNum]: 789}; ~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 b.ts:4:7: Add a type annotation to the variable c \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/booleanFilterAnyArray.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/booleanFilterAnyArray.d.ts.diff index 161f0887d9e54..5e7f35e35cb46 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/booleanFilterAnyArray.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/booleanFilterAnyArray.d.ts.diff @@ -21,4 +21,4 @@ /// [Errors] //// - booleanFilterAnyArray.ts(20,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + booleanFilterAnyArray.ts(20,11): error TS9017: Only const arrays can be inferred with --isolatedDeclarations diff --git a/tests/baselines/reference/isolated-declarations/original/diff/capturedParametersInInitializers1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/capturedParametersInInitializers1.d.ts.diff index ada0304951804..401a188da345b 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/capturedParametersInInitializers1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/capturedParametersInInitializers1.d.ts.diff @@ -16,3 +16,31 @@ declare function foo4(y?: invalid, z?: number): invalid; declare function foo5(y?: invalid, z?: number): invalid; declare function foo6(y?: () => invalid, z?: number): invalid; +@@ -35,13 +35,12 @@ + capturedParametersInInitializers1.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations + capturedParametersInInitializers1.ts(34,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations + capturedParametersInInitializers1.ts(38,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations + capturedParametersInInitializers1.ts(38,20): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-capturedParametersInInitializers1.ts(38,20): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. + + +-==== capturedParametersInInitializers1.ts (22 errors) ==== ++==== capturedParametersInInitializers1.ts (21 errors) ==== + // ok - usage is deferred + function foo1(y = class {c = x}, x = 1) { + ~~~~ + !!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +@@ -139,11 +138,8 @@ + ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9028 capturedParametersInInitializers1.ts:38:15: Add a type annotation to the parameter y + !!! related TS9034 capturedParametersInInitializers1.ts:38:20: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9028 capturedParametersInInitializers1.ts:38:15: Add a type annotation to the parameter y + ~ + !!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. + } + +\ No newline at end of file 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 index 47a44435c87b5..bc02b610dcdc5 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff @@ -35,7 +35,7 @@ declare const uu: unique symbol; export declare let o6: { [uu]: number; -@@ -23,31 +29,28 @@ +@@ -23,32 +29,28 @@ declare let E: { readonly A: 1; }; @@ -48,13 +48,13 @@ /// [Errors] //// --computedPropertiesNarrowed.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertiesNarrowed.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --computedPropertiesNarrowed.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+computedPropertiesNarrowed.ts(20,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertiesNarrowed.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertiesNarrowed.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertiesNarrowed.ts(47,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-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) ==== @@ -65,22 +65,25 @@ export let o = { [x]: 1 // error narrow type !== declared type - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! 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 -@@ -63,12 +66,12 @@ - ~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +@@ -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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! 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 ={ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES5.d.ts.diff new file mode 100644 index 0000000000000..fbec1435a9f3a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES5.d.ts.diff @@ -0,0 +1,70 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -8,11 +8,9 @@ + + /// [Errors] //// + + computedPropertyNames10_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames10_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames10_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames10_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames10_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames10_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames10_ES5.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames10_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +@@ -20,17 +18,16 @@ + computedPropertyNames10_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames10_ES5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames10_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames10_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames10_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames10_ES5.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames10_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames10_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames10_ES5.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames10_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +-==== computedPropertyNames10_ES5.ts (19 errors) ==== ++==== computedPropertyNames10_ES5.ts (16 errors) ==== + var s: string; + var n: number; + var a: any; + var v = { +@@ -38,19 +35,13 @@ + ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + !!! related TS9034 computedPropertyNames10_ES5.ts:5:5: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + [n]() { }, + ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + !!! related TS9034 computedPropertyNames10_ES5.ts:6:5: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + [s + s]() { }, + ~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +@@ -88,11 +79,8 @@ + ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + !!! related TS9034 computedPropertyNames10_ES5.ts:12:5: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + [true]() { }, + ~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES6.d.ts.diff new file mode 100644 index 0000000000000..af3ca5de44de5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES6.d.ts.diff @@ -0,0 +1,70 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -8,11 +8,9 @@ + + /// [Errors] //// + + computedPropertyNames10_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames10_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames10_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames10_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames10_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames10_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames10_ES6.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames10_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +@@ -20,17 +18,16 @@ + computedPropertyNames10_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames10_ES6.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames10_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames10_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames10_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames10_ES6.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames10_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames10_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames10_ES6.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames10_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +-==== computedPropertyNames10_ES6.ts (19 errors) ==== ++==== computedPropertyNames10_ES6.ts (16 errors) ==== + var s: string; + var n: number; + var a: any; + var v = { +@@ -38,19 +35,13 @@ + ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + !!! related TS9034 computedPropertyNames10_ES6.ts:5:5: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + [n]() { }, + ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + !!! related TS9034 computedPropertyNames10_ES6.ts:6:5: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + [s + s]() { }, + ~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +@@ -88,11 +79,8 @@ + ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + !!! related TS9034 computedPropertyNames10_ES6.ts:12:5: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + [true]() { }, + ~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES5.d.ts.diff new file mode 100644 index 0000000000000..dbd9238c97978 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES5.d.ts.diff @@ -0,0 +1,65 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -8,10 +8,8 @@ + + /// [Errors] //// + + computedPropertyNames11_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames11_ES5.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames11_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames11_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames11_ES5.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames11_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames11_ES5.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +@@ -19,33 +17,26 @@ + computedPropertyNames11_ES5.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames11_ES5.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames11_ES5.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames11_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames11_ES5.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames11_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames11_ES5.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames11_ES5.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames11_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames11_ES5.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames11_ES5.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +-==== computedPropertyNames11_ES5.ts (19 errors) ==== ++==== computedPropertyNames11_ES5.ts (16 errors) ==== + var s: string; + var n: number; + var a: any; + var v = { + get [s]() { return 0; }, + ~~~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9032 computedPropertyNames11_ES5.ts:5:9: Add a return type to the get accessor declaration +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v + set [n](v) { }, +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v + ~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9033 computedPropertyNames11_ES5.ts:6:9: Add a type to parameter of the set accessor declaration + get [s + s]() { return 0; }, +@@ -77,11 +68,8 @@ + ~~~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9032 computedPropertyNames11_ES5.ts:11:9: Add a return type to the get accessor declaration + set [a](v) { }, +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v + ~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9033 computedPropertyNames11_ES5.ts:12:9: Add a type to parameter of the set accessor declaration + get [true]() { return 0; }, diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES6.d.ts.diff new file mode 100644 index 0000000000000..aa96d995570dc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES6.d.ts.diff @@ -0,0 +1,65 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -8,10 +8,8 @@ + + /// [Errors] //// + + computedPropertyNames11_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames11_ES6.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames11_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames11_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames11_ES6.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames11_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames11_ES6.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +@@ -19,33 +17,26 @@ + computedPropertyNames11_ES6.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames11_ES6.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames11_ES6.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames11_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames11_ES6.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames11_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames11_ES6.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames11_ES6.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames11_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames11_ES6.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames11_ES6.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +-==== computedPropertyNames11_ES6.ts (19 errors) ==== ++==== computedPropertyNames11_ES6.ts (16 errors) ==== + var s: string; + var n: number; + var a: any; + var v = { + get [s]() { return 0; }, + ~~~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9032 computedPropertyNames11_ES6.ts:5:9: Add a return type to the get accessor declaration +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v + set [n](v) { }, +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v + ~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9033 computedPropertyNames11_ES6.ts:6:9: Add a type to parameter of the set accessor declaration + get [s + s]() { return 0; }, +@@ -77,11 +68,8 @@ + ~~~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9032 computedPropertyNames11_ES6.ts:11:9: Add a return type to the get accessor declaration + set [a](v) { }, +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v + ~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9033 computedPropertyNames11_ES6.ts:12:9: Add a type to parameter of the set accessor declaration + get [true]() { return 0; }, diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff index 530218f24ad21..f8273fbc27386 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff @@ -10,15 +10,15 @@ /// [Errors] //// computedPropertyNames12_ES5.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --computedPropertyNames12_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames12_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames12_ES5.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --computedPropertyNames12_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames12_ES5.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames12_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames12_ES5.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations computedPropertyNames12_ES5.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --computedPropertyNames12_ES5.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames12_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames12_ES5.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -33,23 +33,23 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [n] = n; ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations + !!! related TS9029 computedPropertyNames12_ES5.ts:6:5: Add a type annotation to the property [n] static [s + s]: string; - ~~~~~~~ -@@ -59,10 +52,8 @@ +@@ -60,10 +53,8 @@ [0]: number; [a]: number; ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static [true]: number; ~~~~~~~~~~~ !!! 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/computedPropertyNames12_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff index 4e684fcfa3b6b..6b7f066e5bac8 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff @@ -10,15 +10,15 @@ /// [Errors] //// computedPropertyNames12_ES6.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --computedPropertyNames12_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames12_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames12_ES6.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --computedPropertyNames12_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames12_ES6.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames12_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames12_ES6.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations computedPropertyNames12_ES6.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --computedPropertyNames12_ES6.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames12_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames12_ES6.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -33,23 +33,23 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [n] = n; ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations + !!! related TS9029 computedPropertyNames12_ES6.ts:6:5: Add a type annotation to the property [n] static [s + s]: string; - ~~~~~~~ -@@ -59,10 +52,8 @@ +@@ -60,10 +53,8 @@ [0]: number; [a]: number; ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static [true]: number; ~~~~~~~~~~~ !!! 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/computedPropertyNames13_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES5.d.ts.diff new file mode 100644 index 0000000000000..9469bf6274a87 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES5.d.ts.diff @@ -0,0 +1,55 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -15,35 +15,28 @@ + + /// [Errors] //// + + computedPropertyNames13_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames13_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames13_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames13_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames13_ES5.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames13_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames13_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames13_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames13_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + + +-==== computedPropertyNames13_ES5.ts (9 errors) ==== ++==== computedPropertyNames13_ES5.ts (6 errors) ==== + var s: string; + var n: number; + var a: any; + class C { + [s]() {} + ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames13_ES5.ts:5:5: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + [n]() { } + ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames13_ES5.ts:6:5: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static [s + s]() { } + [s + n]() { } + [+s]() { } + static [""]() { } +@@ -57,10 +50,8 @@ + [a]() { } + ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames13_ES5.ts:12:5: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static [true]() { } + [`hello bye`]() { } + ~~~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES6.d.ts.diff new file mode 100644 index 0000000000000..2af04659e9325 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES6.d.ts.diff @@ -0,0 +1,55 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -15,35 +15,28 @@ + + /// [Errors] //// + + computedPropertyNames13_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames13_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames13_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames13_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames13_ES6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames13_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames13_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames13_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames13_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + + +-==== computedPropertyNames13_ES6.ts (9 errors) ==== ++==== computedPropertyNames13_ES6.ts (6 errors) ==== + var s: string; + var n: number; + var a: any; + class C { + [s]() {} + ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames13_ES6.ts:5:5: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + [n]() { } + ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames13_ES6.ts:6:5: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static [s + s]() { } + [s + n]() { } + [+s]() { } + static [""]() { } +@@ -57,10 +50,8 @@ + [a]() { } + ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames13_ES6.ts:12:5: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static [true]() { } + [`hello bye`]() { } + ~~~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES5.d.ts.diff new file mode 100644 index 0000000000000..dc8bd4f00d39a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES5.d.ts.diff @@ -0,0 +1,50 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -10,29 +10,25 @@ + /// [Errors] //// + + computedPropertyNames14_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames14_ES5.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames14_ES5.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames14_ES5.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames14_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames14_ES5.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames14_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames14_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames14_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames14_ES5.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + + +-==== computedPropertyNames14_ES5.ts (10 errors) ==== ++==== computedPropertyNames14_ES5.ts (8 errors) ==== + var b: boolean; + class C { + [b]() {} + ~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames14_ES5.ts:3:5: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static [true]() { } + ~~~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [[]]() { } +@@ -46,10 +42,8 @@ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames14_ES5.ts:7:5: Add a return type to the method +- ~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static [null]() { } + ~~~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES6.d.ts.diff new file mode 100644 index 0000000000000..75821022b0902 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES6.d.ts.diff @@ -0,0 +1,50 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -10,29 +10,25 @@ + /// [Errors] //// + + computedPropertyNames14_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames14_ES6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames14_ES6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames14_ES6.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames14_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames14_ES6.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames14_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames14_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames14_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames14_ES6.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + + +-==== computedPropertyNames14_ES6.ts (10 errors) ==== ++==== computedPropertyNames14_ES6.ts (8 errors) ==== + var b: boolean; + class C { + [b]() {} + ~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames14_ES6.ts:3:5: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static [true]() { } + ~~~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [[]]() { } +@@ -46,10 +42,8 @@ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames14_ES6.ts:7:5: Add a return type to the method +- ~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static [null]() { } + ~~~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES5.d.ts.diff new file mode 100644 index 0000000000000..5881d0e004684 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES5.d.ts.diff @@ -0,0 +1,51 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -12,41 +12,32 @@ + + /// [Errors] //// + + computedPropertyNames15_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames15_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames15_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames15_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames15_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames15_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames15_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames15_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +-==== computedPropertyNames15_ES5.ts (8 errors) ==== ++==== computedPropertyNames15_ES5.ts (5 errors) ==== + var p1: number | string; + var p2: number | number[]; + var p3: string | boolean; + class C { + [p1]() { } + ~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames15_ES5.ts:5:5: Add a return type to the method +- ~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + [p2]() { } + ~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames15_ES5.ts:6:5: Add a return type to the method +- ~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + [p3]() { } + ~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames15_ES5.ts:7:5: Add a return type to the method +- ~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES6.d.ts.diff new file mode 100644 index 0000000000000..3cf7f0401a14e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES6.d.ts.diff @@ -0,0 +1,51 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -12,41 +12,32 @@ + + /// [Errors] //// + + computedPropertyNames15_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames15_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames15_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames15_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames15_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames15_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames15_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames15_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +-==== computedPropertyNames15_ES6.ts (8 errors) ==== ++==== computedPropertyNames15_ES6.ts (5 errors) ==== + var p1: number | string; + var p2: number | number[]; + var p3: string | boolean; + class C { + [p1]() { } + ~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames15_ES6.ts:5:5: Add a return type to the method +- ~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + [p2]() { } + ~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames15_ES6.ts:6:5: Add a return type to the method +- ~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + [p3]() { } + ~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames15_ES6.ts:7:5: Add a return type to the method +- ~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff index ad368c0f9edc2..b8dade3b5f3af 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff @@ -5,21 +5,22 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -15,28 +15,24 @@ +@@ -15,32 +15,25 @@ /// [Errors] //// - computedPropertyNames16_ES5.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --computedPropertyNames16_ES5.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames16_ES5.ts(6,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames16_ES5.ts(10,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames16_ES5.ts(11,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --computedPropertyNames16_ES5.ts(12,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames16_ES5.ts(12,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames16_ES5.ts(14,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames16_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames16_ES5.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames16_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames16_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames16_ES5.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames16_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames16_ES5.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames16_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames16_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --==== computedPropertyNames16_ES5.ts (8 errors) ==== +-==== computedPropertyNames16_ES5.ts (9 errors) ==== +==== computedPropertyNames16_ES5.ts (6 errors) ==== var s: string; var n: number; @@ -27,22 +28,25 @@ class C { get [s]() { return 0;} ~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9032 computedPropertyNames16_ES5.ts:5:9: Add a return type to the get accessor declaration +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations set [n](v) { } - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9033 computedPropertyNames16_ES5.ts:6:9: Add a type to parameter of the set accessor declaration static get [s + s]() { return 0; } - set [s + n](v) { } -@@ -47,10 +43,8 @@ - get [0]() { return 0; } +@@ -54,10 +47,8 @@ ~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9032 computedPropertyNames16_ES5.ts:11:9: Add a return type to the get accessor declaration set [a](v) { } - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9033 computedPropertyNames16_ES5.ts:12:9: Add a type to parameter of the set accessor declaration static get [true]() { return 0; } - set [`hello bye`](v) { } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff index f8ed99b69fb9c..d9ef4e06209d7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff @@ -5,21 +5,22 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -15,28 +15,24 @@ +@@ -15,32 +15,25 @@ /// [Errors] //// - computedPropertyNames16_ES6.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --computedPropertyNames16_ES6.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames16_ES6.ts(6,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames16_ES6.ts(10,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames16_ES6.ts(11,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --computedPropertyNames16_ES6.ts(12,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames16_ES6.ts(12,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames16_ES6.ts(14,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames16_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames16_ES6.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames16_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames16_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames16_ES6.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames16_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames16_ES6.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames16_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + computedPropertyNames16_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --==== computedPropertyNames16_ES6.ts (8 errors) ==== +-==== computedPropertyNames16_ES6.ts (9 errors) ==== +==== computedPropertyNames16_ES6.ts (6 errors) ==== var s: string; var n: number; @@ -27,22 +28,25 @@ class C { get [s]() { return 0;} ~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9032 computedPropertyNames16_ES6.ts:5:9: Add a return type to the get accessor declaration +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations set [n](v) { } - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9033 computedPropertyNames16_ES6.ts:6:9: Add a type to parameter of the set accessor declaration static get [s + s]() { return 0; } - set [s + n](v) { } -@@ -47,10 +43,8 @@ - get [0]() { return 0; } +@@ -54,10 +47,8 @@ ~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9032 computedPropertyNames16_ES6.ts:11:9: Add a return type to the get accessor declaration set [a](v) { } - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9033 computedPropertyNames16_ES6.ts:12:9: Add a type to parameter of the set accessor declaration static get [true]() { return 0; } - set [`hello bye`](v) { } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES5.d.ts.diff new file mode 100644 index 0000000000000..78084f6b5dbb5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES5.d.ts.diff @@ -0,0 +1,50 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -10,29 +10,25 @@ + /// [Errors] //// + + computedPropertyNames17_ES5.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames17_ES5.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames17_ES5.ts(3,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames17_ES5.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames17_ES5.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames17_ES5.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames17_ES5.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames17_ES5.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames17_ES5.ts(7,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames17_ES5.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + + +-==== computedPropertyNames17_ES5.ts (10 errors) ==== ++==== computedPropertyNames17_ES5.ts (8 errors) ==== + var b: boolean; + class C { + get [b]() { return 0;} + ~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9032 computedPropertyNames17_ES5.ts:3:9: Add a return type to the get accessor declaration +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static set [true](v) { } + ~~~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + get [[]]() { return 0; } +@@ -46,10 +42,8 @@ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~~~~~~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9032 computedPropertyNames17_ES5.ts:7:16: Add a return type to the get accessor declaration +- ~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + set [null](v) { } + ~~~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES6.d.ts.diff new file mode 100644 index 0000000000000..168ffaee2f914 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES6.d.ts.diff @@ -0,0 +1,50 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -10,29 +10,25 @@ + /// [Errors] //// + + computedPropertyNames17_ES6.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames17_ES6.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames17_ES6.ts(3,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames17_ES6.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames17_ES6.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames17_ES6.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames17_ES6.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + computedPropertyNames17_ES6.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames17_ES6.ts(7,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames17_ES6.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + + +-==== computedPropertyNames17_ES6.ts (10 errors) ==== ++==== computedPropertyNames17_ES6.ts (8 errors) ==== + var b: boolean; + class C { + get [b]() { return 0;} + ~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9032 computedPropertyNames17_ES6.ts:3:9: Add a return type to the get accessor declaration +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static set [true](v) { } + ~~~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + get [[]]() { return 0; } +@@ -46,10 +42,8 @@ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~~~~~~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9032 computedPropertyNames17_ES6.ts:7:16: Add a return type to the get accessor declaration +- ~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + set [null](v) { } + ~~~~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff index 0dbe5b179d700..1bc26c804a3f7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff @@ -5,43 +5,72 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -17,17 +17,15 @@ - computedPropertyNames2_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames2_ES5.ts(5,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +@@ -14,64 +14,40 @@ + + /// [Errors] //// + + computedPropertyNames2_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames2_ES5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames2_ES5.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames2_ES5.ts(5,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames2_ES5.ts(6,9): error TS2378: A 'get' accessor must return a value. - computedPropertyNames2_ES5.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --computedPropertyNames2_ES5.ts(7,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames2_ES5.ts(7,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames2_ES5.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames2_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames2_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames2_ES5.ts(7,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES5.ts(8,16): error TS2378: A 'get' accessor must return a value. - computedPropertyNames2_ES5.ts(8,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --computedPropertyNames2_ES5.ts(9,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames2_ES5.ts(9,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames2_ES5.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames2_ES5.ts(8,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames2_ES5.ts(9,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames2_ES5.ts(9,31): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --==== computedPropertyNames2_ES5.ts (10 errors) ==== -+==== computedPropertyNames2_ES5.ts (8 errors) ==== +-==== computedPropertyNames2_ES5.ts (14 errors) ==== ++==== computedPropertyNames2_ES5.ts (6 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { [methodName]() { } -@@ -41,19 +39,15 @@ + ~~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames2_ES5.ts:4:5: Add a return type to the method +- ~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static [methodName]() { } + ~~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames2_ES5.ts:5:12: Add a return type to the method +- ~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + get [accessorName]() { } + ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9033 computedPropertyNames2_ES5.ts:7:9: Add a type to parameter of the set accessor declaration + !!! related TS9032 computedPropertyNames2_ES5.ts:6:9: Add a return type to the get accessor declaration +- ~~~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations set [accessorName](v) { } - ~~~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! 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 TS9033 computedPropertyNames2_ES5.ts:7:9: Add a type to parameter of the set accessor declaration static get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9033 computedPropertyNames2_ES5.ts:9:16: Add a type to parameter of the set accessor declaration + !!! related TS9032 computedPropertyNames2_ES5.ts:8:16: Add a return type to the get accessor declaration +- ~~~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static set [accessorName](v) { } - ~~~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! 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 TS9033 computedPropertyNames2_ES5.ts:9:16: Add a type to parameter of the set accessor declaration } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff index f75ea17991cec..477e10d5c9aed 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff @@ -5,43 +5,72 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -17,17 +17,15 @@ - computedPropertyNames2_ES6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames2_ES6.ts(5,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +@@ -14,64 +14,40 @@ + + /// [Errors] //// + + computedPropertyNames2_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames2_ES6.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames2_ES6.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames2_ES6.ts(5,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames2_ES6.ts(6,9): error TS2378: A 'get' accessor must return a value. - computedPropertyNames2_ES6.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --computedPropertyNames2_ES6.ts(7,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames2_ES6.ts(7,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames2_ES6.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames2_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames2_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames2_ES6.ts(7,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES6.ts(8,16): error TS2378: A 'get' accessor must return a value. - computedPropertyNames2_ES6.ts(8,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --computedPropertyNames2_ES6.ts(9,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames2_ES6.ts(9,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames2_ES6.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames2_ES6.ts(8,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames2_ES6.ts(9,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames2_ES6.ts(9,31): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --==== computedPropertyNames2_ES6.ts (10 errors) ==== -+==== computedPropertyNames2_ES6.ts (8 errors) ==== +-==== computedPropertyNames2_ES6.ts (14 errors) ==== ++==== computedPropertyNames2_ES6.ts (6 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { [methodName]() { } -@@ -41,19 +39,15 @@ + ~~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames2_ES6.ts:4:5: Add a return type to the method +- ~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static [methodName]() { } + ~~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames2_ES6.ts:5:12: Add a return type to the method +- ~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + get [accessorName]() { } + ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9033 computedPropertyNames2_ES6.ts:7:9: Add a type to parameter of the set accessor declaration + !!! related TS9032 computedPropertyNames2_ES6.ts:6:9: Add a return type to the get accessor declaration +- ~~~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations set [accessorName](v) { } - ~~~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! 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 TS9033 computedPropertyNames2_ES6.ts:7:9: Add a type to parameter of the set accessor declaration static get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9033 computedPropertyNames2_ES6.ts:9:16: Add a type to parameter of the set accessor declaration + !!! related TS9032 computedPropertyNames2_ES6.ts:8:16: Add a return type to the get accessor declaration +- ~~~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static set [accessorName](v) { } - ~~~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - ~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! 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 TS9033 computedPropertyNames2_ES6.ts:9:16: Add a type to parameter of the set accessor declaration } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff index c8d94ed8bb73b..bfab5e64714b6 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff @@ -5,46 +5,50 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,28 +7,24 @@ +@@ -7,33 +7,24 @@ declare var v: invalid; /// [Errors] //// --computedPropertyNames4_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --computedPropertyNames4_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+computedPropertyNames4_ES5.ts(6,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames4_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames4_ES5.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames4_ES5.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --computedPropertyNames4_ES5.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames4_ES5.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames4_ES5.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames4_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames4_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames4_ES5.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations + computedPropertyNames4_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames4_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames4_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames4_ES5.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations +-computedPropertyNames4_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames4_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames4_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --==== computedPropertyNames4_ES5.ts (8 errors) ==== -+==== computedPropertyNames4_ES5.ts (6 errors) ==== +-==== computedPropertyNames4_ES5.ts (10 errors) ==== ++==== computedPropertyNames4_ES5.ts (7 errors) ==== var s: string; var n: number; var a: any; var v = { [s]: 0, - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v [n]: n, - ~~~ -+ ~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - [s + s]: 1, - ~~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -@@ -40,10 +36,8 @@ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v + ~ + !!! error TS9013: Expression type can't be inferred with --isolatedDeclarations + !!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v + !!! related TS9035 computedPropertyNames4_ES5.ts:6:10: Add a type assertion to this expression to make type type explicit +@@ -55,11 +46,8 @@ + !!! related TS9035 computedPropertyNames4_ES5.ts:9:11: Add a type assertion to this expression to make type type explicit [""]: 0, [0]: 0, [a]: 1, - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v [true]: 0, ~~~~~~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - [`hello bye`]: 0, + !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + !!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff index 95152e6c87e8c..144e9549df058 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff @@ -5,46 +5,50 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,28 +7,24 @@ +@@ -7,33 +7,24 @@ declare var v: invalid; /// [Errors] //// --computedPropertyNames4_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --computedPropertyNames4_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -+computedPropertyNames4_ES6.ts(6,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames4_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames4_ES6.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames4_ES6.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --computedPropertyNames4_ES6.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames4_ES6.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - computedPropertyNames4_ES6.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames4_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames4_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames4_ES6.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations + computedPropertyNames4_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames4_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames4_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames4_ES6.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations +-computedPropertyNames4_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames4_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames4_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --==== computedPropertyNames4_ES6.ts (8 errors) ==== -+==== computedPropertyNames4_ES6.ts (6 errors) ==== +-==== computedPropertyNames4_ES6.ts (10 errors) ==== ++==== computedPropertyNames4_ES6.ts (7 errors) ==== var s: string; var n: number; var a: any; var v = { [s]: 0, - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v [n]: n, - ~~~ -+ ~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - [s + s]: 1, - ~~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -@@ -40,10 +36,8 @@ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v + ~ + !!! error TS9013: Expression type can't be inferred with --isolatedDeclarations + !!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v + !!! related TS9035 computedPropertyNames4_ES6.ts:6:10: Add a type assertion to this expression to make type type explicit +@@ -55,11 +46,8 @@ + !!! related TS9035 computedPropertyNames4_ES6.ts:9:11: Add a type assertion to this expression to make type type explicit [""]: 0, [0]: 0, [a]: 1, - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v [true]: 0, ~~~~~~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - [`hello bye`]: 0, + !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + !!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff index 9a4e735f96137..570198713cc14 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff @@ -5,21 +5,21 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,28 +6,24 @@ +@@ -6,29 +6,24 @@ /// [Errors] //// computedPropertyNames5_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames5_ES5.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames5_ES5.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames5_ES5.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames5_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames5_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames5_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames5_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames5_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames5_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames5_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames5_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames5_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames5_ES5.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames5_ES5.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames5_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== computedPropertyNames5_ES5.ts (11 errors) ==== @@ -30,18 +30,20 @@ ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v [true]: 1, ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. [[]]: 0, -@@ -42,10 +38,8 @@ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +@@ -45,11 +40,8 @@ + !!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v [undefined]: undefined, ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v [null]: null ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff index 18c39074a6c79..5490dab92fa15 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff @@ -5,21 +5,21 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,28 +6,24 @@ +@@ -6,29 +6,24 @@ /// [Errors] //// computedPropertyNames5_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames5_ES6.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames5_ES6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames5_ES6.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames5_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames5_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames5_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames5_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames5_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames5_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames5_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames5_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames5_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames5_ES6.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames5_ES6.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNames5_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== computedPropertyNames5_ES6.ts (11 errors) ==== @@ -30,18 +30,20 @@ ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v [true]: 1, ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. [[]]: 0, -@@ -42,10 +38,8 @@ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +@@ -45,11 +40,8 @@ + !!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v [undefined]: undefined, ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v [null]: null ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff index bb36039c64768..8ab3f68a182e1 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,34 +3,29 @@ +@@ -3,37 +3,29 @@ //// [computedPropertyNames6_ES5.d.ts] declare var p1: number | string; declare var p2: number | number[]; @@ -19,11 +19,11 @@ /// [Errors] //// --computedPropertyNames6_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames6_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames6_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames6_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames6_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames6_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames6_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames6_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== computedPropertyNames6_ES5.ts (5 errors) ==== @@ -34,16 +34,19 @@ var v = { [p1]: 0, - ~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v [p2]: 1, ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v [p3]: 2 ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff index 118e0a3a063f5..363c40fd15e16 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,34 +3,29 @@ +@@ -3,37 +3,29 @@ //// [computedPropertyNames6_ES6.d.ts] declare var p1: number | string; declare var p2: number | number[]; @@ -19,11 +19,11 @@ /// [Errors] //// --computedPropertyNames6_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames6_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames6_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames6_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames6_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames6_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames6_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNames6_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== computedPropertyNames6_ES6.ts (5 errors) ==== @@ -34,16 +34,19 @@ var v = { [p1]: 0, - ~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v [p2]: 1, ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v [p3]: 2 ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff index 07c85b9efc032..43b9374ea4364 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,21 +5,19 @@ +@@ -5,24 +5,19 @@ declare var accessorName: string; declare class C { [methodName](v: string): invalid; @@ -16,24 +16,41 @@ /// [Errors] //// computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --==== computedPropertyNamesOnOverloads_ES5.ts (5 errors) ==== +-==== computedPropertyNamesOnOverloads_ES5.ts (8 errors) ==== +==== computedPropertyNamesOnOverloads_ES5.ts (4 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { [methodName](v: string); -@@ -32,7 +30,5 @@ +@@ -30,21 +25,12 @@ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:4:5: Add a return type to the method +- ~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + [methodName](); + ~~~~~~~~~~~~ + !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:5:5: Add a return type to the method +- ~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [methodName](v?: string) { } - ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:6:5: Add a return type to the method +- ~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff index b34853138f77f..bc16e32c03cdf 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,21 +5,19 @@ +@@ -5,24 +5,19 @@ declare var accessorName: string; declare class C { [methodName](v: string): invalid; @@ -16,24 +16,41 @@ /// [Errors] //// computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --==== computedPropertyNamesOnOverloads_ES6.ts (5 errors) ==== +-==== computedPropertyNamesOnOverloads_ES6.ts (8 errors) ==== +==== computedPropertyNamesOnOverloads_ES6.ts (4 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { [methodName](v: string); -@@ -32,7 +30,5 @@ +@@ -30,21 +25,12 @@ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:4:5: Add a return type to the method +- ~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + [methodName](); + ~~~~~~~~~~~~ + !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:5:5: Add a return type to the method +- ~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [methodName](v?: string) { } - ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:6:5: Add a return type to the method +- ~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff index 871a4eae998e2..cb5263a4e007a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff @@ -2,10 +2,10 @@ //// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -14,18 +14,17 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -14,18 +14,17 @@ computedPropertyNamesWithStaticProperty.ts(2,1): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. computedPropertyNamesWithStaticProperty.ts(4,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. @@ -25,7 +25,7 @@ class C1 { ~~~~~ !!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. -@@ -38,10 +37,8 @@ +@@ -38,10 +37,8 @@ !!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. return "hello"; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff index dbeaaae7002fd..97d9f81fdb48b 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff @@ -21,9 +21,9 @@ constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -+constEnumErrors.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++constEnumErrors.ts(12,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - constEnumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + constEnumErrors.ts(14,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. @@ -58,9 +59,9 @@ @@ -43,7 +43,7 @@ // forward reference to the element of the same enum X = Y, + ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations ~ !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. // forward reference to the element of the same enum diff --git a/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff index 29ef91b84a992..ce1a8b905c7a0 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/contextualReturnTypeOfIIFE2.d.ts.diff @@ -13,7 +13,7 @@ - -/// [Errors] //// - --contextualReturnTypeOfIIFE2.ts(5,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +-contextualReturnTypeOfIIFE2.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. - - -==== contextualReturnTypeOfIIFE2.ts (1 errors) ==== @@ -23,7 +23,7 @@ - - app.foo.bar = (function () { - ~~~~~~~~~~~ --!!! error TS9009: 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. - const someFun = (arg: number) => {}; - return { someFun }; - })(); 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 index 6037998d87fa4..aa2879545b3de 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitHasTypesRefOnNamespaceUse.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitHasTypesRefOnNamespaceUse.d.ts.diff @@ -13,13 +13,13 @@ - -/// [Errors] //// - --/src/index.ts(1,22): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to dep to unblock declaration emit. +-/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 TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to dep to unblock declaration emit. +-!!! 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 { 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 index 45e41f9bc4f09..3ac12755bc395 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/declarationFilesWithTypeReferences2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationFilesWithTypeReferences2.d.ts.diff @@ -13,7 +13,7 @@ - -/// [Errors] //// - --/app.ts(1,17): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to node to unblock declaration emit. +-/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) ==== @@ -24,7 +24,7 @@ -==== /app.ts (1 errors) ==== - function foo(): Error2 { - ~~~~~~ --!!! error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to node to unblock declaration emit. +-!!! 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/decoratorsOnComputedProperties.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff index 4345583213cf3..b32f9973c08b1 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff @@ -10,11 +10,11 @@ decoratorsOnComputedProperties.ts(19,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(20,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(21,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-decoratorsOnComputedProperties.ts(21,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(22,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(22,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-decoratorsOnComputedProperties.ts(22,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(23,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(23,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-decoratorsOnComputedProperties.ts(23,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(27,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(28,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(29,5): error TS1206: Decorators are not valid here. @@ -24,11 +24,11 @@ decoratorsOnComputedProperties.ts(53,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(54,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(55,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(55,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-decoratorsOnComputedProperties.ts(55,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(56,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(56,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-decoratorsOnComputedProperties.ts(56,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(57,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(57,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-decoratorsOnComputedProperties.ts(57,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(62,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(63,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(64,5): error TS1206: Decorators are not valid here. @@ -38,11 +38,11 @@ decoratorsOnComputedProperties.ts(89,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(90,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(92,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(92,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-decoratorsOnComputedProperties.ts(92,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(93,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(93,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-decoratorsOnComputedProperties.ts(93,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(94,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(94,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-decoratorsOnComputedProperties.ts(94,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(98,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(99,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(100,5): error TS1206: Decorators are not valid here. @@ -52,11 +52,11 @@ decoratorsOnComputedProperties.ts(125,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(126,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(128,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(128,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-decoratorsOnComputedProperties.ts(128,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(129,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(129,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-decoratorsOnComputedProperties.ts(129,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(131,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(131,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-decoratorsOnComputedProperties.ts(131,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(135,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(136,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(137,5): error TS1206: Decorators are not valid here. @@ -66,11 +66,11 @@ decoratorsOnComputedProperties.ts(163,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(164,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(166,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(166,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-decoratorsOnComputedProperties.ts(166,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(167,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(167,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-decoratorsOnComputedProperties.ts(167,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(169,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(169,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-decoratorsOnComputedProperties.ts(169,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(173,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(174,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(175,5): error TS1206: Decorators are not valid here. @@ -84,111 +84,111 @@ +==== decoratorsOnComputedProperties.ts (82 errors) ==== function x(o: object, k: PropertyKey) { } ~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - let i = 0; -@@ -205,20 +190,14 @@ + !!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9031 decoratorsOnComputedProperties.ts:1:10: Add a return type to the function declaration +@@ -206,20 +191,14 @@ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. [fieldNameA]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations @x [fieldNameB]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations @x [fieldNameC]: any = null; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } void class B { @x ["property"]: any; -@@ -277,20 +256,14 @@ +@@ -278,20 +257,14 @@ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. [fieldNameA]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations @x [fieldNameB]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations @x [fieldNameC]: any = null; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ["some" + "method"]() {} } void class D { -@@ -352,20 +325,14 @@ +@@ -353,20 +326,14 @@ ["some" + "method"]() {} [fieldNameA]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations @x [fieldNameB]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations @x [fieldNameC]: any = null; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } void class F { @x ["property"]: any; -@@ -426,21 +393,15 @@ +@@ -427,21 +394,15 @@ ["some" + "method"]() {} [fieldNameA]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations @x [fieldNameB]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ["some" + "method2"]() {} @x [fieldNameC]: any = null; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } void class H { @x ["property"]: any; -@@ -502,21 +463,15 @@ +@@ -503,21 +464,15 @@ @x ["some" + "method"]() {} [fieldNameA]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations @x [fieldNameB]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ["some" + "method2"]() {} @x [fieldNameC]: any = null; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } void class J { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers.d.ts.diff new file mode 100644 index 0000000000000..30fb1652a3fe2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers.d.ts.diff @@ -0,0 +1,49 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -10,37 +10,27 @@ + }; + declare class Base { + protected a: typeof x; + protected b(a: typeof x): invalid; +- protected get c(): { +- foo: string; +- }; ++ protected get c(): typeof x; + protected set c(v: typeof x); + protected d: (a: typeof x) => void; + protected static r: typeof x; + protected static s(a: typeof x): invalid; +- protected static get t(): { +- foo: string; +- }; ++ protected static get t(): typeof x; + protected static set t(v: typeof x); + protected static u: (a: typeof x) => void; + constructor(a: typeof x); + } + declare class Derived extends Base { + protected a: typeof y; + protected b(a: typeof y): invalid; +- protected get c(): { +- foo: string; +- bar: string; +- }; ++ protected get c(): typeof y; + protected set c(v: typeof y); + protected d: (a: typeof y) => void; + protected static r: typeof y; + protected static s(a: typeof y): invalid; +- protected static get t(): { +- foo: string; +- bar: string; +- }; ++ protected static get t(): typeof y; + protected static set t(a: typeof y); + protected static u: (a: typeof y) => void; + constructor(a: typeof y); + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers2.d.ts.diff new file mode 100644 index 0000000000000..4e9c3c75e9ef9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers2.d.ts.diff @@ -0,0 +1,49 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers2.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -10,37 +10,27 @@ + }; + declare class Base { + protected a: typeof x; + protected b(a: typeof x): invalid; +- protected get c(): { +- foo: string; +- }; ++ protected get c(): typeof x; + protected set c(v: typeof x); + protected d: (a: typeof x) => void; + protected static r: typeof x; + protected static s(a: typeof x): invalid; +- protected static get t(): { +- foo: string; +- }; ++ protected static get t(): typeof x; + protected static set t(v: typeof x); + protected static u: (a: typeof x) => void; + constructor(a: typeof x); + } + declare class Derived extends Base { + a: typeof y; + b(a: typeof y): invalid; +- get c(): { +- foo: string; +- bar: string; +- }; ++ get c(): typeof y; + set c(v: typeof y); + d: (a: typeof y) => void; + static r: typeof y; + static s(a: typeof y): invalid; +- static get t(): { +- foo: string; +- bar: string; +- }; ++ static get t(): typeof y; + static set t(a: typeof y); + static u: (a: typeof y) => void; + constructor(a: typeof y); + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers3.d.ts.diff new file mode 100644 index 0000000000000..6fcf1cd993d3a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers3.d.ts.diff @@ -0,0 +1,28 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -10,18 +10,14 @@ + }; + declare class Base { + a: typeof x; + b(a: typeof x): invalid; +- get c(): { +- foo: string; +- }; ++ get c(): typeof x; + set c(v: typeof x); + d: (a: typeof x) => void; + static r: typeof x; + static s(a: typeof x): invalid; +- static get t(): { +- foo: string; +- }; ++ static get t(): typeof x; + static set t(v: typeof x); + static u: (a: typeof x) => void; + constructor(a: typeof x); + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesPublicMembers.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesPublicMembers.d.ts.diff new file mode 100644 index 0000000000000..54faeef4a9bd8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesPublicMembers.d.ts.diff @@ -0,0 +1,49 @@ +// [[Reason: TS normalizes types]] //// + +//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -10,37 +10,27 @@ + }; + declare class Base { + a: typeof x; + b(a: typeof x): invalid; +- get c(): { +- foo: string; +- }; ++ get c(): typeof x; + set c(v: typeof x); + d: (a: typeof x) => void; + static r: typeof x; + static s(a: typeof x): invalid; +- static get t(): { +- foo: string; +- }; ++ static get t(): typeof x; + static set t(v: typeof x); + static u: (a: typeof x) => void; + constructor(a: typeof x); + } + declare class Derived extends Base { + a: typeof y; + b(a: typeof y): invalid; +- get c(): { +- foo: string; +- bar: string; +- }; ++ get c(): typeof y; + set c(v: typeof y); + d: (a: typeof y) => void; + static r: typeof y; + static s(a: typeof y): invalid; +- static get t(): { +- foo: string; +- bar: string; +- }; ++ static get t(): typeof y; + static set t(a: typeof y); + static u: (a: typeof y) => void; + constructor(a: typeof y); + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff index b037c2dcb2769..3f809bd2a191b 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff @@ -23,12 +23,12 @@ /// [Errors] //// -+forwardRefInEnum.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++forwardRefInEnum.ts(4,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -+forwardRefInEnum.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++forwardRefInEnum.ts(5,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations forwardRefInEnum.ts(5,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - forwardRefInEnum.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - forwardRefInEnum.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + forwardRefInEnum.ts(7,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations + forwardRefInEnum.ts(8,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations -==== forwardRefInEnum.ts (4 errors) ==== @@ -38,12 +38,12 @@ // forward reference to the element of the same enum X = Y, + ~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations ~ !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. X1 = E1["Y"], + ~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations ~~~~~~~ !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. // forward reference to the element of the same enum diff --git a/tests/baselines/reference/isolated-declarations/original/diff/gettersAndSettersErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/gettersAndSettersErrors.d.ts.diff index ec99812382504..6527aa58a30a1 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/gettersAndSettersErrors.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/gettersAndSettersErrors.d.ts.diff @@ -8,7 +8,7 @@ @@ -3,9 +3,9 @@ //// [gettersAndSettersErrors.d.ts] declare class C { - get Foo(): invalid; + get Foo(): string; set Foo(foo: string); - Foo: string; + Foo: number; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff index 35bee8c3f291a..5d6f6edbfb564 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff @@ -20,7 +20,7 @@ indexSignatureMustHaveTypeAnnotation.ts(3,6): error TS2304: Cannot find name 'x'. indexSignatureMustHaveTypeAnnotation.ts(4,5): error TS1021: An index signature must have a type annotation. indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS2304: Cannot find name 'x'. indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS4031: Public property '[x]' of exported class has or is using private name 'x'. indexSignatureMustHaveTypeAnnotation.ts(14,5): error TS1021: An index signature must have a type annotation. @@ -38,7 +38,7 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'x'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff index 6269f40a18228..ee74d6900179b 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff @@ -10,7 +10,7 @@ /// [Errors] //// indexWithoutParamType2.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --indexWithoutParamType2.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-indexWithoutParamType2.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations indexWithoutParamType2.ts(3,6): error TS2304: Cannot find name 'x'. indexWithoutParamType2.ts(3,6): error TS4031: Public property '[x]' of exported class has or is using private name 'x'. @@ -23,7 +23,7 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'x'. ~ 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..d3fc0e0555188 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrorsClasses.d.ts.diff @@ -0,0 +1,62 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/compiler/isolatedDeclarationErrorsClasses.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -44,21 +44,17 @@ + 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(39,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-isolatedDeclarationErrorsClasses.ts(39,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-isolatedDeclarationErrorsClasses.ts(41,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + isolatedDeclarationErrorsClasses.ts(41,35): error TS7006: Parameter 'v' implicitly has an 'any' type. + isolatedDeclarationErrorsClasses.ts(41,35): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations + isolatedDeclarationErrorsClasses.ts(43,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-isolatedDeclarationErrorsClasses.ts(43,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + isolatedDeclarationErrorsClasses.ts(45,9): error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. +-isolatedDeclarationErrorsClasses.ts(45,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + isolatedDeclarationErrorsClasses.ts(45,39): error TS7006: Parameter 'value' implicitly has an 'any' type. + isolatedDeclarationErrorsClasses.ts(45,39): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + + +-==== isolatedDeclarationErrorsClasses.ts (21 errors) ==== ++==== isolatedDeclarationErrorsClasses.ts (17 errors) ==== + export class Cls { + + field = 1 + 1; + ~~~~~ +@@ -127,14 +123,10 @@ + [noAnnotationStringName]() { } + ~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 isolatedDeclarationErrorsClasses.ts:39:5: Add a return type to the method +- ~~~~~~~~~~~~~~~~~~~~~~~~ +-!!! 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. + ~ + !!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +@@ -143,16 +135,12 @@ + get [noAnnotationStringName]() { return 0;} + ~~~~~~~~~~~~~~~~~~~~~~~~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9032 isolatedDeclarationErrorsClasses.ts:43:9: Add a return type to the get accessor declaration +- ~~~~~~~~~~~~~~~~~~~~~~~~ +-!!! 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. + ~~~~~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations diff --git a/tests/baselines/reference/isolated-declarations/original/diff/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts.diff new file mode 100644 index 0000000000000..a733d5147eb93 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts.diff @@ -0,0 +1,56 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -21,9 +21,8 @@ + modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(16,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations + modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(17,5): error TS2339: Property 'name' does not exist on type '() => void'. + modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(20,6): error TS2550: Property 'sign' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. + modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(29,18): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,13): error TS2304: Cannot find name 'Proxy'. +@@ -33,13 +32,12 @@ + modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(44,5): error TS2550: Property 'includes' does not exist on type 'string'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. + modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + +-==== modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts (22 errors) ==== ++==== modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts (20 errors) ==== + // All will be error from using ES6 features but only include ES5 library + // Using Es6 array + function f(x: number, y: number, z: number) { + ~ +@@ -84,11 +82,8 @@ + ~~~~~~~~~~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:23:5: Add a type annotation to the variable o + !!! related TS9034 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:25:5: Add a return type to the method +- ~~~~~~~~~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:23:5: Add a type annotation to the variable o + ~~~~~~ + !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + return false; + } +@@ -140,11 +135,8 @@ + ~~~~~~~~~~~~~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:50:7: Add a type annotation to the variable o1 + !!! related TS9034 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:51:5: Add a return type to the method +- ~~~~~~~~~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:50:7: Add a type annotation to the variable o1 + ~~~~~~ + !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + return false; + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff index ed4ff2cde9f66..04e79823e265d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff @@ -26,50 +26,55 @@ declare class C3 { [1](): void; [2](): void; -@@ -48,21 +47,16 @@ - overloadsWithComputedNames.ts(8,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +@@ -48,23 +47,16 @@ + overloadsWithComputedNames.ts(8,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations overloadsWithComputedNames.ts(14,5): error TS2391: Function implementation is missing or not immediately following the declaration. overloadsWithComputedNames.ts(16,5): error TS2389: Function implementation name must be '["bar"]'. overloadsWithComputedNames.ts(28,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. --overloadsWithComputedNames.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-overloadsWithComputedNames.ts(28,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations overloadsWithComputedNames.ts(29,5): error TS2391: Function implementation is missing or not immediately following the declaration. overloadsWithComputedNames.ts(35,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. overloadsWithComputedNames.ts(42,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. --overloadsWithComputedNames.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --overloadsWithComputedNames.ts(43,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-overloadsWithComputedNames.ts(42,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-overloadsWithComputedNames.ts(43,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-overloadsWithComputedNames.ts(43,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations overloadsWithComputedNames.ts(47,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. --overloadsWithComputedNames.ts(47,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --overloadsWithComputedNames.ts(48,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-overloadsWithComputedNames.ts(47,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-overloadsWithComputedNames.ts(48,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-overloadsWithComputedNames.ts(48,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is missing or not immediately following the declaration. --==== overloadsWithComputedNames.ts (15 errors) ==== +-==== overloadsWithComputedNames.ts (17 errors) ==== +==== overloadsWithComputedNames.ts (10 errors) ==== // https://github.com/microsoft/TypeScript/issues/52329 class Person { ["B"](a: number): string; ["A"](a: string|number): number | string { -@@ -99,10 +93,8 @@ +@@ -102,10 +94,8 @@ class C1 { [sym](): void; // should error ~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [uniqueSym2](): void; // should error ~~~~~~~~~~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. [uniqueSym](): void; -@@ -121,24 +113,16 @@ +@@ -124,30 +114,16 @@ class C2 { [strUnion](): void; // should error ~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [strUnion]() { } - ~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! related TS9034 overloadsWithComputedNames.ts:43:5: Add a return type to the method +- ~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } class I2 { @@ -77,10 +82,13 @@ ~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [strUnion]() { } - ~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! related TS9034 overloadsWithComputedNames.ts:48:5: Add a return type to the method +- ~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } class C3 { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff index c4dced216a909..801b9e624eed9 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff @@ -5,12 +5,12 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -4,17 +4,14 @@ +@@ -4,18 +4,14 @@ declare var v: invalid; /// [Errors] //// --parserComputedPropertyName1.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserComputedPropertyName1.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName1.ts(1,12): error TS2304: Cannot find name 'e'. parserComputedPropertyName1.ts(1,15): error TS1005: ':' expected. @@ -19,7 +19,8 @@ +==== parserComputedPropertyName1.ts (2 errors) ==== var v = { [e] }; - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 parserComputedPropertyName1.ts:1:5: Add a type annotation to the variable v ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff index 3aaada8c191db..6d69e0466b7a6 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff @@ -10,7 +10,7 @@ /// [Errors] //// parserComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName10.ts(2,4): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserComputedPropertyName10.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. parserComputedPropertyName10.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. @@ -22,7 +22,7 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName11.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName11.d.ts.diff new file mode 100644 index 0000000000000..98e94aae31130 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName11.d.ts.diff @@ -0,0 +1,32 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -8,23 +8,20 @@ + /// [Errors] //// + + parserComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + parserComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-parserComputedPropertyName11.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + parserComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. + parserComputedPropertyName11.ts(2,5): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + + +-==== parserComputedPropertyName11.ts (5 errors) ==== ++==== parserComputedPropertyName11.ts (4 errors) ==== + class C { + [e](); + ~~~ + !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 parserComputedPropertyName11.ts:2:4: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName12.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName12.d.ts.diff new file mode 100644 index 0000000000000..3f441eefbfae6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName12.d.ts.diff @@ -0,0 +1,30 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,21 +7,18 @@ + + /// [Errors] //// + + parserComputedPropertyName12.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-parserComputedPropertyName12.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + parserComputedPropertyName12.ts(2,5): error TS2304: Cannot find name 'e'. + parserComputedPropertyName12.ts(2,5): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + + +-==== parserComputedPropertyName12.ts (4 errors) ==== ++==== parserComputedPropertyName12.ts (3 errors) ==== + class C { + [e]() { } + ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 parserComputedPropertyName12.ts:2:4: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName17.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName17.d.ts.diff new file mode 100644 index 0000000000000..0bddf3b725083 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName17.d.ts.diff @@ -0,0 +1,27 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,18 +4,14 @@ + declare var v: invalid; + + /// [Errors] //// + +-parserComputedPropertyName17.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + parserComputedPropertyName17.ts(1,16): error TS2304: Cannot find name 'e'. + parserComputedPropertyName17.ts(1,19): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + + +-==== parserComputedPropertyName17.ts (3 errors) ==== ++==== parserComputedPropertyName17.ts (2 errors) ==== + var v = { set [e](v) { } } +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 parserComputedPropertyName17.ts:1:5: Add a type annotation to the variable v + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff index e61594d7288d3..500d7ee5602b6 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,17 +1,16 @@ +@@ -1,18 +1,16 @@ //// [parserComputedPropertyName2.d.ts] @@ -16,7 +16,7 @@ /// [Errors] //// --parserComputedPropertyName2.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserComputedPropertyName2.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. @@ -24,7 +24,8 @@ +==== parserComputedPropertyName2.ts (1 errors) ==== var v = { [e]: 1 }; - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 parserComputedPropertyName2.ts:1:5: Add a type annotation to the variable v ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff index 2ddcd38a87492..a091c2883a790 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff @@ -10,7 +10,7 @@ /// [Errors] //// parserComputedPropertyName22.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName22.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserComputedPropertyName22.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName22.ts(2,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName22.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. @@ -22,7 +22,7 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff index 1f362ebaa76f6..eee90f2180d86 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff @@ -10,7 +10,7 @@ /// [Errors] //// --parserComputedPropertyName23.ts(2,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserComputedPropertyName23.ts(2,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName23.ts(2,10): error TS2304: Cannot find name 'e'. parserComputedPropertyName23.ts(2,10): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. @@ -20,7 +20,7 @@ declare class C { get [e](): number - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff index 387795f0b45d8..333e2eead2bd2 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff @@ -10,10 +10,10 @@ /// [Errors] //// --parserComputedPropertyName24.ts(2,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserComputedPropertyName24.ts(2,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName24.ts(2,10): error TS2304: Cannot find name 'e'. parserComputedPropertyName24.ts(2,10): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. - parserComputedPropertyName24.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName24.ts(2,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -==== parserComputedPropertyName24.ts (4 errors) ==== @@ -21,7 +21,7 @@ class C { set [e](v) { } - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff index 2da0c4c35cc34..dc5790aea4008 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff @@ -10,10 +10,10 @@ /// [Errors] //// parserComputedPropertyName25.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName25.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserComputedPropertyName25.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName25.ts(3,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName25.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. - parserComputedPropertyName25.ts(3,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName25.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. @@ -25,7 +25,7 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff index 86780f06bf56d..c65a9e11916f8 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff @@ -10,12 +10,12 @@ /// [Errors] //// --parserComputedPropertyName27.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserComputedPropertyName27.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName27.ts(3,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName27.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName27.ts(4,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName27.ts(4,9): error TS1005: ';' expected. - parserComputedPropertyName27.ts(4,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName27.ts(4,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -==== parserComputedPropertyName27.ts (6 errors) ==== @@ -24,7 +24,7 @@ // No ASI [e]: number = 0 - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff index 4abbe8a7b8122..c43188624cdbf 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff @@ -10,11 +10,11 @@ /// [Errors] //// parserComputedPropertyName28.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName28.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserComputedPropertyName28.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName28.ts(2,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName28.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName28.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName28.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserComputedPropertyName28.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName28.ts(3,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName28.ts(3,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. @@ -26,7 +26,7 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ @@ -35,7 +35,7 @@ ~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~ !!! error TS2304: Cannot find name 'e2'. ~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff index 8610627af93ab..453b845e34653 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff @@ -10,13 +10,13 @@ /// [Errors] //// parserComputedPropertyName29.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName29.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserComputedPropertyName29.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName29.ts(3,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName29.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName29.ts(3,11): error TS2304: Cannot find name 'id'. - parserComputedPropertyName29.ts(3,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName29.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName29.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName29.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserComputedPropertyName29.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName29.ts(4,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName29.ts(4,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. @@ -29,18 +29,18 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -@@ -38,10 +34,8 @@ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +@@ -39,10 +35,8 @@ + !!! related TS9029 parserComputedPropertyName29.ts:3:5: Add a type annotation to the property [e] [e2]: number ~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~ !!! error TS2304: Cannot find name 'e2'. ~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName3.d.ts.diff new file mode 100644 index 0000000000000..293199a509c95 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName3.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,19 +5,15 @@ + + /// [Errors] //// + + parserComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-parserComputedPropertyName3.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + parserComputedPropertyName3.ts(1,12): error TS2304: Cannot find name 'e'. + + +-==== parserComputedPropertyName3.ts (3 errors) ==== ++==== parserComputedPropertyName3.ts (2 errors) ==== + var v = { [e]() { } }; + ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9027 parserComputedPropertyName3.ts:1:5: Add a type annotation to the variable v + !!! related TS9034 parserComputedPropertyName3.ts:1:11: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 parserComputedPropertyName3.ts:1:5: Add a type annotation to the variable v + ~ + !!! error TS2304: Cannot find name 'e'. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff index 405f596c94563..fab3d786b1b19 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff @@ -10,11 +10,11 @@ /// [Errors] //// parserComputedPropertyName31.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName31.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserComputedPropertyName31.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName31.ts(3,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName31.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName31.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName31.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserComputedPropertyName31.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName31.ts(4,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName31.ts(4,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. @@ -27,7 +27,7 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ @@ -36,7 +36,7 @@ ~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~ !!! error TS2304: Cannot find name 'e2'. ~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff index 86b52b410d7bd..85a88cd567a4a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff @@ -10,7 +10,7 @@ /// [Errors] //// parserComputedPropertyName32.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. --parserComputedPropertyName32.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserComputedPropertyName32.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName32.ts(2,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName32.ts(2,6): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. @@ -22,7 +22,7 @@ ~~~ !!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff index 6db218f7c745f..ed140799ba539 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff @@ -10,10 +10,10 @@ /// [Errors] //// --parserComputedPropertyName33.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserComputedPropertyName33.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName33.ts(3,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName33.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. - parserComputedPropertyName33.ts(3,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName33.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName33.ts(4,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName33.ts(4,12): error TS1005: ';' expected. parserComputedPropertyName33.ts(5,1): error TS1128: Declaration or statement expected. @@ -25,7 +25,7 @@ // No ASI [e] = 0 - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff index 0099c7633ecc1..5605e383b3abc 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff @@ -10,7 +10,7 @@ /// [Errors] //// parserComputedPropertyName36.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName36.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserComputedPropertyName36.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName36.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. parserComputedPropertyName36.ts(2,6): error TS2304: Cannot find name 'public'. parserComputedPropertyName36.ts(2,6): error TS4031: Public property '[public ]' of exported class has or is using private name 'public'. @@ -23,7 +23,7 @@ ~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff index 2206d57a1e9f5..b140e3707d85c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,19 +1,18 @@ +@@ -1,20 +1,18 @@ //// [parserComputedPropertyName37.d.ts] @@ -16,7 +16,7 @@ /// [Errors] //// --parserComputedPropertyName37.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserComputedPropertyName37.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName37.ts(2,6): error TS2304: Cannot find name 'public'. @@ -25,7 +25,8 @@ var v = { [public]: 0 - ~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 parserComputedPropertyName37.ts:1:5: Add a type annotation to the variable v ~~~~~~ !!! error TS2304: Cannot find name 'public'. }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName38.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName38.d.ts.diff new file mode 100644 index 0000000000000..6b2f716ed50b3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName38.d.ts.diff @@ -0,0 +1,31 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,22 +7,19 @@ + + /// [Errors] //// + + parserComputedPropertyName38.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-parserComputedPropertyName38.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + parserComputedPropertyName38.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. + parserComputedPropertyName38.ts(2,6): error TS2304: Cannot find name 'public'. + parserComputedPropertyName38.ts(2,6): error TS4100: Public method '[public]' of exported class has or is using private name 'public'. + + +-==== parserComputedPropertyName38.ts (5 errors) ==== ++==== parserComputedPropertyName38.ts (4 errors) ==== + class C { + [public]() { } + ~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 parserComputedPropertyName38.ts:2:5: Add a return type to the method +- ~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~~~~~~ + !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. + ~~~~~~ + !!! error TS2304: Cannot find name 'public'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName39.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName39.d.ts.diff new file mode 100644 index 0000000000000..7951481caeb09 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName39.d.ts.diff @@ -0,0 +1,32 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,23 +7,20 @@ + + /// [Errors] //// + + parserComputedPropertyName39.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-parserComputedPropertyName39.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + parserComputedPropertyName39.ts(3,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. + parserComputedPropertyName39.ts(3,6): error TS2304: Cannot find name 'public'. + parserComputedPropertyName39.ts(3,6): error TS4100: Public method '[public]' of exported class has or is using private name 'public'. + + +-==== parserComputedPropertyName39.ts (5 errors) ==== ++==== parserComputedPropertyName39.ts (4 errors) ==== + "use strict"; + class C { + [public]() { } + ~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 parserComputedPropertyName39.ts:3:5: Add a return type to the method +- ~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~~~~~~ + !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. + ~~~~~~ + !!! error TS2304: Cannot find name 'public'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName4.d.ts.diff new file mode 100644 index 0000000000000..90593aef4f782 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName4.d.ts.diff @@ -0,0 +1,30 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,20 +6,16 @@ + /// [Errors] //// + + parserComputedPropertyName4.ts(1,15): error TS2378: A 'get' accessor must return a value. + parserComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-parserComputedPropertyName4.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + parserComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. + + +-==== parserComputedPropertyName4.ts (4 errors) ==== ++==== parserComputedPropertyName4.ts (3 errors) ==== + var v = { get [e]() { } }; + ~~~ + !!! error TS2378: A 'get' accessor must return a value. + ~~~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9032 parserComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 parserComputedPropertyName4.ts:1:5: Add a type annotation to the variable v + ~ + !!! error TS2304: Cannot find name 'e'. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName5.d.ts.diff new file mode 100644 index 0000000000000..f44863757d442 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName5.d.ts.diff @@ -0,0 +1,32 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,22 +7,18 @@ + + parserComputedPropertyName5.ts(1,11): error TS1042: 'public' modifier cannot be used here. + parserComputedPropertyName5.ts(1,22): error TS2378: A 'get' accessor must return a value. + parserComputedPropertyName5.ts(1,22): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-parserComputedPropertyName5.ts(1,22): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + parserComputedPropertyName5.ts(1,23): error TS2304: Cannot find name 'e'. + + +-==== parserComputedPropertyName5.ts (5 errors) ==== ++==== parserComputedPropertyName5.ts (4 errors) ==== + var v = { public get [e]() { } }; + ~~~~~~ + !!! error TS1042: 'public' modifier cannot be used here. + ~~~ + !!! error TS2378: A 'get' accessor must return a value. + ~~~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9032 parserComputedPropertyName5.ts:1:22: Add a return type to the get accessor declaration +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 parserComputedPropertyName5.ts:1:5: Add a type annotation to the variable v + ~ + !!! error TS2304: Cannot find name 'e'. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff index f6fd112c43d8c..e63ec96f993db 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff @@ -5,14 +5,14 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -4,19 +4,16 @@ +@@ -4,20 +4,16 @@ declare var v: invalid; /// [Errors] //// --parserComputedPropertyName6.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserComputedPropertyName6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName6.ts(1,12): error TS2304: Cannot find name 'e'. - parserComputedPropertyName6.ts(1,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + parserComputedPropertyName6.ts(1,19): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName6.ts(1,20): error TS2304: Cannot find name 'e'. parserComputedPropertyName6.ts(1,24): error TS2304: Cannot find name 'e'. @@ -21,8 +21,9 @@ +==== parserComputedPropertyName6.ts (4 errors) ==== var v = { [e]: 1, [e + e]: 2 }; - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 parserComputedPropertyName6.ts:1:5: Add a type annotation to the variable v ~ !!! error TS2304: Cannot find name 'e'. ~~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName7.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName7.d.ts.diff new file mode 100644 index 0000000000000..32cfb7a626444 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName7.d.ts.diff @@ -0,0 +1,32 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -8,23 +8,20 @@ + /// [Errors] //// + + parserComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + parserComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +-parserComputedPropertyName7.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + parserComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. + parserComputedPropertyName7.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +-==== parserComputedPropertyName7.ts (5 errors) ==== ++==== parserComputedPropertyName7.ts (4 errors) ==== + class C { + [e] + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ + !!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations + !!! related TS9029 parserComputedPropertyName7.ts:2:4: Add a type annotation to the property [e] +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName8.d.ts.diff new file mode 100644 index 0000000000000..4a89a7013b264 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName8.d.ts.diff @@ -0,0 +1,32 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -8,23 +8,20 @@ + /// [Errors] //// + + parserComputedPropertyName8.ts(2,11): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + parserComputedPropertyName8.ts(2,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +-parserComputedPropertyName8.ts(2,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + parserComputedPropertyName8.ts(2,12): error TS2304: Cannot find name 'e'. + parserComputedPropertyName8.ts(2,12): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +-==== parserComputedPropertyName8.ts (5 errors) ==== ++==== parserComputedPropertyName8.ts (4 errors) ==== + class C { + public [e] + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ + !!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations + !!! related TS9029 parserComputedPropertyName8.ts:2:11: Add a type annotation to the property [e] +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff index 3d59b4ea1a2cf..cdb442f69ce4c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff @@ -10,7 +10,7 @@ /// [Errors] //// parserComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName9.ts(2,4): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserComputedPropertyName9.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. parserComputedPropertyName9.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. @@ -24,7 +24,7 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff index f66e7ee5e11f8..47a90062b462c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff @@ -10,7 +10,7 @@ /// [Errors] //// parserES5ComputedPropertyName1.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserES5ComputedPropertyName1.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserES5ComputedPropertyName1.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5ComputedPropertyName1.ts(2,6): error TS2304: Cannot find name 'e'. parserES5ComputedPropertyName1.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. @@ -22,7 +22,7 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff index 133f2707a00c2..c53041fd1f03a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff @@ -10,7 +10,7 @@ /// [Errors] //// parserES5ComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserES5ComputedPropertyName10.ts(2,4): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserES5ComputedPropertyName10.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5ComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. parserES5ComputedPropertyName10.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. @@ -22,7 +22,7 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName11.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName11.d.ts.diff new file mode 100644 index 0000000000000..41f68a552b6c4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName11.d.ts.diff @@ -0,0 +1,32 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -8,23 +8,20 @@ + /// [Errors] //// + + parserES5ComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + parserES5ComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-parserES5ComputedPropertyName11.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + parserES5ComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. + parserES5ComputedPropertyName11.ts(2,5): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + + +-==== parserES5ComputedPropertyName11.ts (5 errors) ==== ++==== parserES5ComputedPropertyName11.ts (4 errors) ==== + class C { + [e](); + ~~~ + !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 parserES5ComputedPropertyName11.ts:2:4: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff index e6dbb9b640785..11ce9cf5f29fd 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,17 +1,16 @@ +@@ -1,18 +1,16 @@ //// [parserES5ComputedPropertyName2.d.ts] @@ -16,7 +16,7 @@ /// [Errors] //// --parserES5ComputedPropertyName2.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserES5ComputedPropertyName2.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5ComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. @@ -24,7 +24,8 @@ +==== parserES5ComputedPropertyName2.ts (1 errors) ==== var v = { [e]: 1 }; - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 parserES5ComputedPropertyName2.ts:1:5: Add a type annotation to the variable v ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName3.d.ts.diff new file mode 100644 index 0000000000000..ebc4b4a0d7c47 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName3.d.ts.diff @@ -0,0 +1,29 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -5,19 +5,15 @@ + + /// [Errors] //// + + parserES5ComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-parserES5ComputedPropertyName3.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + parserES5ComputedPropertyName3.ts(1,12): error TS2304: Cannot find name 'e'. + + +-==== parserES5ComputedPropertyName3.ts (3 errors) ==== ++==== parserES5ComputedPropertyName3.ts (2 errors) ==== + var v = { [e]() { } }; + ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9027 parserES5ComputedPropertyName3.ts:1:5: Add a type annotation to the variable v + !!! related TS9034 parserES5ComputedPropertyName3.ts:1:11: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 parserES5ComputedPropertyName3.ts:1:5: Add a type annotation to the variable v + ~ + !!! error TS2304: Cannot find name 'e'. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName4.d.ts.diff new file mode 100644 index 0000000000000..0083564835564 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName4.d.ts.diff @@ -0,0 +1,30 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,20 +6,16 @@ + /// [Errors] //// + + parserES5ComputedPropertyName4.ts(1,15): error TS2378: A 'get' accessor must return a value. + parserES5ComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-parserES5ComputedPropertyName4.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + parserES5ComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. + + +-==== parserES5ComputedPropertyName4.ts (4 errors) ==== ++==== parserES5ComputedPropertyName4.ts (3 errors) ==== + var v = { get [e]() { } }; + ~~~ + !!! error TS2378: A 'get' accessor must return a value. + ~~~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9032 parserES5ComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 parserES5ComputedPropertyName4.ts:1:5: Add a type annotation to the variable v + ~ + !!! error TS2304: Cannot find name 'e'. +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName7.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName7.d.ts.diff new file mode 100644 index 0000000000000..57d4368465a53 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName7.d.ts.diff @@ -0,0 +1,32 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -8,23 +8,20 @@ + /// [Errors] //// + + parserES5ComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + parserES5ComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +-parserES5ComputedPropertyName7.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + parserES5ComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. + parserES5ComputedPropertyName7.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +-==== parserES5ComputedPropertyName7.ts (5 errors) ==== ++==== parserES5ComputedPropertyName7.ts (4 errors) ==== + class C { + [e] + ~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ + !!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations + !!! related TS9029 parserES5ComputedPropertyName7.ts:2:4: Add a type annotation to the property [e] +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~ + !!! error TS2304: Cannot find name 'e'. + ~ + !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff index 30b1ccdb8300d..358d1b91179dd 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff @@ -10,7 +10,7 @@ /// [Errors] //// parserES5ComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserES5ComputedPropertyName9.ts(2,4): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserES5ComputedPropertyName9.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5ComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. parserES5ComputedPropertyName9.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserES5ComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. @@ -24,7 +24,7 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff index 5bfe332dfd72d..b5625a907c934 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff @@ -10,7 +10,7 @@ /// [Errors] //// parserES5SymbolProperty3.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. --parserES5SymbolProperty3.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserES5SymbolProperty3.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5SymbolProperty3.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. parserES5SymbolProperty3.ts(2,6): error TS4100: Public method '[Symbol.unscopables]' of exported class has or is using private name 'Symbol'. @@ -22,7 +22,7 @@ ~~~~~~~~~~~~~~~~~~~~ !!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff index 0c70334343cf6..2556e6cdb090f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff @@ -10,7 +10,7 @@ /// [Errors] //// parserES5SymbolProperty4.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserES5SymbolProperty4.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserES5SymbolProperty4.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5SymbolProperty4.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. parserES5SymbolProperty4.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. @@ -22,7 +22,7 @@ ~~~~~~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff index 28f4dfe742feb..325865f092dfb 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff @@ -10,7 +10,7 @@ /// [Errors] //// parserES5SymbolProperty5.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserES5SymbolProperty5.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserES5SymbolProperty5.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5SymbolProperty5.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. parserES5SymbolProperty5.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. @@ -22,7 +22,7 @@ ~~~~~~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff index e2d64a928b7bb..fdac68bd9dbfc 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff @@ -10,7 +10,7 @@ /// [Errors] //// parserES5SymbolProperty6.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserES5SymbolProperty6.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserES5SymbolProperty6.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. parserES5SymbolProperty6.ts(2,6): error TS4031: Public property '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. @@ -22,7 +22,7 @@ ~~~~~~~~~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff index 2b5b4c7445aa4..252ef715d61a0 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff @@ -10,7 +10,7 @@ /// [Errors] //// --parserES5SymbolProperty7.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-parserES5SymbolProperty7.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5SymbolProperty7.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. parserES5SymbolProperty7.ts(2,6): error TS4100: Public method '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. @@ -20,7 +20,7 @@ class C { [Symbol.toStringTag](): void { } - ~~~~~~~~~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff index 1cae47c24c2ba..31345ac43bfeb 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,15 +1,19 @@ +@@ -1,15 +1,20 @@ //// [parserStrictMode8.d.ts] @@ -14,7 +14,7 @@ /// [Errors] //// parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. -+parserStrictMode8.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++parserStrictMode8.ts(2,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -==== parserStrictMode8.ts (1 errors) ==== @@ -24,6 +24,7 @@ ~~~~ !!! error TS1100: Invalid use of 'eval' in strict mode. + ~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9031 parserStrictMode8.ts:2:10: Add a return type to the function declaration } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff index 10bcb681fd28d..8e61a25b33f0c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff @@ -6,18 +6,18 @@ --- TSC declarations +++ DTE declarations @@ -112,9 +112,8 @@ - staticPropertyNameConflicts.ts(272,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. --staticPropertyNameConflicts.ts(284,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-staticPropertyNameConflicts.ts(284,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations staticPropertyNameConflicts.ts(289,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prototype'. staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. @@ -138,9 +137,9 @@ - staticPropertyNameConflicts.ts(346,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -==== staticPropertyNameConflicts.ts (85 errors) ==== @@ -26,13 +26,13 @@ name: 'name', length: 'length', prototype: 'prototype', -@@ -545,10 +544,8 @@ +@@ -549,10 +548,8 @@ export class ExportedStaticPrototype { static [FunctionPropertyNames.prototype]: number; // always an error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [FunctionPropertyNames.prototype]: string; // ok } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff index b3c7312b9d481..8c4218669e1a8 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff @@ -6,18 +6,18 @@ --- TSC declarations +++ DTE declarations @@ -72,9 +72,8 @@ - staticPropertyNameConflicts.ts(272,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. --staticPropertyNameConflicts.ts(284,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-staticPropertyNameConflicts.ts(284,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations staticPropertyNameConflicts.ts(289,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prototype'. staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. @@ -90,9 +89,9 @@ - staticPropertyNameConflicts.ts(346,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -==== staticPropertyNameConflicts.ts (37 errors) ==== @@ -26,13 +26,13 @@ name: 'name', length: 'length', prototype: 'prototype', -@@ -417,10 +416,8 @@ +@@ -421,10 +420,8 @@ export class ExportedStaticPrototype { static [FunctionPropertyNames.prototype]: number; // always an error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [FunctionPropertyNames.prototype]: string; // ok } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess1.d.ts.diff new file mode 100644 index 0000000000000..33b30c2d6b28d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess1.d.ts.diff @@ -0,0 +1,45 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess1.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -12,14 +12,12 @@ + /// [Errors] //// + + superSymbolIndexedAccess1.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + superSymbolIndexedAccess1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-superSymbolIndexedAccess1.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + superSymbolIndexedAccess1.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-superSymbolIndexedAccess1.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +-==== superSymbolIndexedAccess1.ts (5 errors) ==== ++==== superSymbolIndexedAccess1.ts (3 errors) ==== + var symbol = Symbol.for('myThing'); + ~~~~~~~~~~~~~~~~~~~~~ + !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + !!! related TS9027 superSymbolIndexedAccess1.ts:1:5: Add a type annotation to the variable symbol +@@ -28,10 +26,8 @@ + [symbol]() { + ~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 superSymbolIndexedAccess1.ts:4:5: Add a return type to the method +- ~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + return 0; + } + } + +@@ -39,9 +35,7 @@ + [symbol]() { + ~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 superSymbolIndexedAccess1.ts:10:5: Add a return type to the method +- ~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + return super[symbol](); + } + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess3.d.ts.diff new file mode 100644 index 0000000000000..226340b51c1d9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess3.d.ts.diff @@ -0,0 +1,46 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess3.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -12,15 +12,13 @@ + /// [Errors] //// + + superSymbolIndexedAccess3.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + superSymbolIndexedAccess3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-superSymbolIndexedAccess3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + superSymbolIndexedAccess3.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-superSymbolIndexedAccess3.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + superSymbolIndexedAccess3.ts(11,22): error TS2538: Type 'typeof Bar' cannot be used as an index type. + + +-==== superSymbolIndexedAccess3.ts (6 errors) ==== ++==== superSymbolIndexedAccess3.ts (4 errors) ==== + var symbol = Symbol.for('myThing'); + ~~~~~~~~~~~~~~~~~~~~~ + !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + !!! related TS9027 superSymbolIndexedAccess3.ts:1:5: Add a type annotation to the variable symbol +@@ -29,10 +27,8 @@ + [symbol]() { + ~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 superSymbolIndexedAccess3.ts:4:5: Add a return type to the method +- ~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + return 0; + } + } + +@@ -40,10 +36,8 @@ + [symbol]() { + ~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 superSymbolIndexedAccess3.ts:10:5: Add a return type to the method +- ~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + return super[Bar](); + ~~~ + !!! error TS2538: Type 'typeof Bar' cannot be used as an index type. + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess4.d.ts.diff new file mode 100644 index 0000000000000..b551ed3a11c97 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess4.d.ts.diff @@ -0,0 +1,33 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess4.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -9,13 +9,12 @@ + /// [Errors] //// + + superSymbolIndexedAccess4.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + superSymbolIndexedAccess4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-superSymbolIndexedAccess4.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + superSymbolIndexedAccess4.ts(5,16): error TS2335: 'super' can only be referenced in a derived class. + + +-==== superSymbolIndexedAccess4.ts (4 errors) ==== ++==== superSymbolIndexedAccess4.ts (3 errors) ==== + var symbol = Symbol.for('myThing'); + ~~~~~~~~~~~~~~~~~~~~~ + !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + !!! related TS9027 superSymbolIndexedAccess4.ts:1:5: Add a type annotation to the variable symbol +@@ -24,10 +23,8 @@ + [symbol]() { + ~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 superSymbolIndexedAccess4.ts:4:5: Add a return type to the method +- ~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + return super[symbol](); + ~~~~~ + !!! error TS2335: 'super' can only be referenced in a derived class. + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess5.d.ts.diff new file mode 100644 index 0000000000000..2c9ae2ca28329 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess5.d.ts.diff @@ -0,0 +1,43 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess5.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -11,23 +11,19 @@ + + /// [Errors] //// + + superSymbolIndexedAccess5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-superSymbolIndexedAccess5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + superSymbolIndexedAccess5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-superSymbolIndexedAccess5.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +-==== superSymbolIndexedAccess5.ts (4 errors) ==== ++==== superSymbolIndexedAccess5.ts (2 errors) ==== + var symbol: any; + + class Foo { + [symbol]() { + ~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 superSymbolIndexedAccess5.ts:4:5: Add a return type to the method +- ~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + return 0; + } + } + +@@ -35,9 +31,7 @@ + [symbol]() { + ~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 superSymbolIndexedAccess5.ts:10:5: Add a return type to the method +- ~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + return super[symbol](); + } + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess6.d.ts.diff new file mode 100644 index 0000000000000..a6032256d143c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess6.d.ts.diff @@ -0,0 +1,43 @@ +// [[Reason: Invalid computed property can only be detected by TSC]] //// + +//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess6.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -11,23 +11,19 @@ + + /// [Errors] //// + + superSymbolIndexedAccess6.ts(4,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-superSymbolIndexedAccess6.ts(4,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + superSymbolIndexedAccess6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-superSymbolIndexedAccess6.ts(10,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +-==== superSymbolIndexedAccess6.ts (4 errors) ==== ++==== superSymbolIndexedAccess6.ts (2 errors) ==== + var symbol: any; + + class Foo { + static [symbol]() { + ~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 superSymbolIndexedAccess6.ts:4:12: Add a return type to the method +- ~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + return 0; + } + } + +@@ -35,9 +31,7 @@ + static [symbol]() { + ~~~~~~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 superSymbolIndexedAccess6.ts:10:12: Add a return type to the method +- ~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + return super[symbol](); + } + } +\ No newline at end of file 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 index 0eef4a4d7e9c4..ac9ef0fd0b94c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts.diff @@ -5,28 +5,29 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,8 +5,9 @@ +@@ -5,33 +5,42 @@ interface I { } export class C { [Symbol.iterator]: I; + [Symbol.toPrimitive](x: I): invalid; [Symbol.isConcatSpreadable](): I; - get [Symbol.toPrimitive](): invalid; +- get [Symbol.toPrimitive](): I; ++ get [Symbol.toPrimitive](): invalid; set [Symbol.toPrimitive](x: I); } -@@ -14,19 +15,22 @@ + export {}; } /// [Errors] //// -+symbolDeclarationEmit12.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++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 (3 errors) ==== +-==== symbolDeclarationEmit12.ts (2 errors) ==== +==== symbolDeclarationEmit12.ts (4 errors) ==== module M { interface I { } @@ -34,8 +35,18 @@ [Symbol.iterator]: I; [Symbol.toPrimitive](x: I) { } + ~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++!!! 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/symbolProperty1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff index bcde5388a7633..3de910a8e7d92 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff @@ -5,24 +5,42 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,19 +5,16 @@ +@@ -5,36 +5,24 @@ declare var x: invalid; /// [Errors] //// --symbolProperty1.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - symbolProperty1.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - symbolProperty1.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-symbolProperty1.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + symbolProperty1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-symbolProperty1.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + symbolProperty1.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-symbolProperty1.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --==== symbolProperty1.ts (3 errors) ==== +-==== symbolProperty1.ts (5 errors) ==== +==== symbolProperty1.ts (2 errors) ==== var s: symbol; var x = { [s]: 0, - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x [s]() { }, ~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x + !!! related TS9034 symbolProperty1.ts:4:5: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x get [s]() { + ~~~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9032 symbolProperty1.ts:5:9: Add a return type to the get accessor declaration +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x + return 0; + } + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff index 454ac3d27f655..16b78cc035bcd 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff @@ -5,26 +5,45 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,21 +6,18 @@ +@@ -6,39 +6,27 @@ /// [Errors] //// - symbolProperty2.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --symbolProperty2.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - symbolProperty2.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - symbolProperty2.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + symbolProperty2.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +-symbolProperty2.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + symbolProperty2.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-symbolProperty2.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + symbolProperty2.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-symbolProperty2.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --==== symbolProperty2.ts (4 errors) ==== +-==== symbolProperty2.ts (6 errors) ==== +==== symbolProperty2.ts (3 errors) ==== var s = Symbol(); ~~~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + !!! related TS9027 symbolProperty2.ts:1:5: Add a type annotation to the variable s var x = { [s]: 0, - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x [s]() { }, ~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x + !!! related TS9034 symbolProperty2.ts:4:5: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x get [s]() { + ~~~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9032 symbolProperty2.ts:5:9: Add a return type to the get accessor declaration +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x + return 0; + } + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff index 4da2f510794c5..532e8ff082efd 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff @@ -5,30 +5,53 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,25 +7,22 @@ +@@ -7,47 +7,35 @@ /// [Errors] //// - symbolProperty3.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + symbolProperty3.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations symbolProperty3.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --symbolProperty3.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-symbolProperty3.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations symbolProperty3.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - symbolProperty3.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + symbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-symbolProperty3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations symbolProperty3.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - symbolProperty3.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + symbolProperty3.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-symbolProperty3.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --==== symbolProperty3.ts (7 errors) ==== +-==== symbolProperty3.ts (9 errors) ==== +==== symbolProperty3.ts (6 errors) ==== var s = Symbol; ~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + !!! related TS9027 symbolProperty3.ts:1:5: Add a type annotation to the variable s var x = { [s]: 0, ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x [s]() { }, ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x + !!! related TS9034 symbolProperty3.ts:4:5: Add a return type to the method +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x + get [s]() { + ~~~ + !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9032 symbolProperty3.ts:5:9: Add a return type to the get accessor declaration +- ~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x + return 0; + } + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff index 4422756562778..35151d4515e7c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,21 +1,20 @@ +@@ -1,22 +1,20 @@ //// [symbolProperty52.d.ts] @@ -16,7 +16,7 @@ /// [Errors] //// --symbolProperty52.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-symbolProperty52.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations symbolProperty52.ts(2,13): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. symbolProperty52.ts(7,12): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. @@ -26,7 +26,8 @@ var obj = { [Symbol.nonsense]: 0 - ~~~~~~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 symbolProperty52.ts:1:5: Add a type annotation to the variable obj ~~~~~~~~ !!! error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff index d6d06b2ffcac3..9689b8e70af47 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,23 +1,22 @@ +@@ -1,24 +1,22 @@ //// [symbolProperty53.d.ts] @@ -17,7 +17,7 @@ /// [Errors] //// symbolProperty53.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --symbolProperty53.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-symbolProperty53.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations symbolProperty53.ts(5,5): error TS2538: Type '(key: string) => symbol' cannot be used as an index type. @@ -28,7 +28,8 @@ ~~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 symbolProperty53.ts:1:5: Add a type annotation to the variable obj }; obj[Symbol.for]; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff index e88974eaf96a2..cea262592c5a5 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,19 +1,18 @@ +@@ -1,20 +1,18 @@ //// [symbolProperty54.d.ts] @@ -17,7 +17,7 @@ /// [Errors] //// symbolProperty54.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --symbolProperty54.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-symbolProperty54.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== symbolProperty54.ts (2 errors) ==== @@ -27,6 +27,7 @@ ~~~~~~~~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 symbolProperty54.ts:1:5: Add a type annotation to the variable obj }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff index 1e7e9c7ae300b..72e7137b14487 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -3,21 +3,7 @@ +@@ -3,22 +3,7 @@ //// [symbolProperty58.d.ts] interface SymbolConstructor { foo: string; @@ -14,7 +14,7 @@ - -/// [Errors] //// - --symbolProperty58.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-symbolProperty58.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - - -==== symbolProperty58.ts (1 errors) ==== @@ -25,7 +25,8 @@ - var obj = { - [Symbol.foo]: 0 - ~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! related TS9027 symbolProperty58.ts:5:5: Add a type annotation to the variable obj - } \ No newline at end of file +declare var obj: { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment32.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment32.d.ts.diff index bf75437f17e85..146a6e24d408a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment32.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment32.d.ts.diff @@ -7,18 +7,18 @@ +++ DTE declarations @@ -22,16 +22,22 @@ - expando.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - expando.ts(4,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - expando.ts(5,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+expando.ts(8,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+expando.ts(9,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+expando.ts(10,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+expando.ts(11,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations + expando.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. + expando.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. ++expando.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. ++expando.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. ++expando.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. ++expando.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. expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -+expando.ts(12,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expando.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. expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -+expando.ts(13,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - expando.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++expando.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. + expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. @@ -27,35 +27,35 @@ +==== expando.ts (12 errors) ==== function ExpandoMerge(n: number) { ~~~~~~~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - return n; -@@ -44,17 +50,29 @@ - !!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + !!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9031 expando.ts:1:10: Add a return type to the function declaration +@@ -45,17 +51,29 @@ + !!! error 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; } ExpandoMerge.p4 = 44444; + ~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. ExpandoMerge.p5 = 555555; + ~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. ExpandoMerge.p6 = 66666; + ~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. ExpandoMerge.p7 = 777777; + ~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. ExpandoMerge.p8 = false; // type error ~~~~~~~~~~~~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'number'. + ~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. ExpandoMerge.p9 = false; // type error ~~~~~~~~~~~~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'number'. + ~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - + !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + !!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment33.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment33.d.ts.diff index 5e53b17453465..67fa4023e941b 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment33.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment33.d.ts.diff @@ -7,18 +7,18 @@ +++ DTE declarations @@ -22,10 +22,16 @@ - expando.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - expando.ts(4,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - expando.ts(5,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+expando.ts(8,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+expando.ts(9,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+expando.ts(10,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -+expando.ts(11,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations + expando.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. + expando.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. ++expando.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. ++expando.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. ++expando.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. ++expando.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. expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -+expando.ts(12,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. ++expando.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. expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -+expando.ts(13,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - expando.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ++expando.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. + expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. @@ -31,35 +31,35 @@ +==== expando.ts (12 errors) ==== function ExpandoMerge(n: number) { ~~~~~~~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - return n; -@@ -63,17 +69,29 @@ - !!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. + !!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9031 expando.ts:1:10: Add a return type to the function declaration +@@ -64,17 +70,29 @@ + !!! error 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; } ExpandoMerge.p4 = 44444; + ~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. ExpandoMerge.p5 = 555555; + ~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. ExpandoMerge.p6 = 66666; + ~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. ExpandoMerge.p7 = 777777; + ~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. ExpandoMerge.p8 = false; // type error ~~~~~~~~~~~~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'number'. + ~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. ExpandoMerge.p9 = false; // type error ~~~~~~~~~~~~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'number'. + ~~~~~~~~~~~~~~~ -+!!! error TS9009: 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. var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - + !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + !!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n 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 index 07a228f35fb2f..1feb7273caca2 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives11.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives11.d.ts.diff @@ -10,12 +10,12 @@ /// [Errors] //// --/mod1.ts(1,24): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. - /mod2.ts(2,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-/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 @@ +@@ -21,9 +20,7 @@ ==== /types/lib/index.d.ts (0 errors) ==== interface Lib { x } @@ -24,6 +24,6 @@ +==== /mod1.ts (0 errors) ==== export function foo(): Lib { return {x: 1} } - ~~~ --!!! error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. +-!!! 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/typeReferenceDirectives2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives2.d.ts.diff index 3cf1304e8901f..5de344bdfb7c8 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives2.d.ts.diff @@ -13,14 +13,14 @@ - -/// [Errors] //// - --/app.ts(2,8): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. +-/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 TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. +-!!! 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 } 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 index f03dba9dd0ac6..45a59bc817f42 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives8.d.ts.diff @@ -10,13 +10,13 @@ /// [Errors] //// --/mod1.ts(1,24): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. - /mod2.ts(2,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-/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) ==== -@@ -19,9 +18,7 @@ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +@@ -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 } @@ -24,6 +24,6 @@ +==== /mod1.ts (0 errors) ==== export function foo(): Lib { return {x: 1} } - ~~~ --!!! error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. +-!!! 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/ES5For-ofTypeCheck10.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5For-ofTypeCheck10.d.ts new file mode 100644 index 0000000000000..028f9f031fda3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/ES5For-ofTypeCheck10.d.ts @@ -0,0 +1,64 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts] //// + +//// [ES5For-ofTypeCheck10.ts] +// In ES3/5, you cannot for...of over an arbitrary iterable. +class StringIterator { + next() { + return { + done: true, + value: "" + }; + } + [Symbol.iterator]() { + return this; + } +} + +for (var v of new StringIterator) { } + +/// [Declarations] //// + + + +//// [ES5For-ofTypeCheck10.d.ts] +declare class StringIterator { + next(): invalid; + [Symbol.iterator](): invalid; +} + +/// [Errors] //// + +ES5For-ofTypeCheck10.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5For-ofTypeCheck10.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5For-ofTypeCheck10.ts(9,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +ES5For-ofTypeCheck10.ts(9,6): error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. +ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an array type or a string type. + + +==== ES5For-ofTypeCheck10.ts (5 errors) ==== + // In ES3/5, you cannot for...of over an arbitrary iterable. + class StringIterator { + next() { + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 ES5For-ofTypeCheck10.ts:3:5: Add a return type to the method + return { + done: true, + value: "" + }; + } + [Symbol.iterator]() { + ~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 ES5For-ofTypeCheck10.ts:9:5: Add a return type to the method + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ +!!! error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. + return this; + } + } + + for (var v of new StringIterator) { } + ~~~~~~~~~~~~~~~~~~ +!!! error TS2495: Type 'StringIterator' is not an array type or a string type. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty2.d.ts new file mode 100644 index 0000000000000..ec4bfdc07b9b8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty2.d.ts @@ -0,0 +1,49 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty2.ts] //// + +//// [ES5SymbolProperty2.ts] +module M { + var Symbol: any; + + export class C { + [Symbol.iterator]() { } + } + (new C)[Symbol.iterator]; +} + +(new M.C)[Symbol.iterator]; + +/// [Declarations] //// + + + +//// [ES5SymbolProperty2.d.ts] +declare namespace M { + var Symbol: any; + export class C { + [Symbol.iterator](): invalid; + } + export {}; +} + +/// [Errors] //// + +ES5SymbolProperty2.ts(5,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5SymbolProperty2.ts(10,11): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + +==== ES5SymbolProperty2.ts (2 errors) ==== + module M { + var Symbol: any; + + export class C { + [Symbol.iterator]() { } + ~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 ES5SymbolProperty2.ts:5:9: Add a return type to the method + } + (new C)[Symbol.iterator]; + } + + (new M.C)[Symbol.iterator]; + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty3.d.ts new file mode 100644 index 0000000000000..1159d465147a3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty3.d.ts @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty3.ts] //// + +//// [ES5SymbolProperty3.ts] +var Symbol: any; + +class C { + [Symbol.iterator]() { } +} + +(new C)[Symbol.iterator] + +/// [Declarations] //// + + + +//// [ES5SymbolProperty3.d.ts] +declare var Symbol: any; +declare class C { + [Symbol.iterator](): invalid; +} + +/// [Errors] //// + +ES5SymbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + + +==== ES5SymbolProperty3.ts (1 errors) ==== + var Symbol: any; + + class C { + [Symbol.iterator]() { } + ~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 ES5SymbolProperty3.ts:4:5: Add a return type to the method + } + + (new C)[Symbol.iterator] \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty4.d.ts new file mode 100644 index 0000000000000..616b1b5d2aba4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty4.d.ts @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty4.ts] //// + +//// [ES5SymbolProperty4.ts] +var Symbol: { iterator: string }; + +class C { + [Symbol.iterator]() { } +} + +(new C)[Symbol.iterator] + +/// [Declarations] //// + + + +//// [ES5SymbolProperty4.d.ts] +declare var Symbol: { + iterator: string; +}; +declare class C { + [Symbol.iterator](): invalid; +} + +/// [Errors] //// + +ES5SymbolProperty4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + + +==== ES5SymbolProperty4.ts (1 errors) ==== + var Symbol: { iterator: string }; + + class C { + [Symbol.iterator]() { } + ~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 ES5SymbolProperty4.ts:4:5: Add a return type to the method + } + + (new C)[Symbol.iterator] \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty5.d.ts new file mode 100644 index 0000000000000..7e757bee9c093 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty5.d.ts @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty5.ts] //// + +//// [ES5SymbolProperty5.ts] +var Symbol: { iterator: symbol }; + +class C { + [Symbol.iterator]() { } +} + +(new C)[Symbol.iterator](0) // Should error + +/// [Declarations] //// + + + +//// [ES5SymbolProperty5.d.ts] +declare var Symbol: { + iterator: symbol; +}; +declare class C { + [Symbol.iterator](): invalid; +} + +/// [Errors] //// + +ES5SymbolProperty5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + + +==== ES5SymbolProperty5.ts (1 errors) ==== + var Symbol: { iterator: symbol }; + + class C { + [Symbol.iterator]() { } + ~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 ES5SymbolProperty5.ts:4:5: Add a return type to the method + } + + (new C)[Symbol.iterator](0) // Should error \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty6.d.ts new file mode 100644 index 0000000000000..55646fe874fa6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty6.d.ts @@ -0,0 +1,46 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty6.ts] //// + +//// [ES5SymbolProperty6.ts] +u//@target: ES5 +class C { + [Symbol.iterator]() { } +} + +(new C)[Symbol.iterator] + +/// [Declarations] //// + + + +//// [ES5SymbolProperty6.d.ts] +declare class C { + [Symbol.iterator](): invalid; +} + +/// [Errors] //// + +ES5SymbolProperty6.ts(1,1): error TS2304: Cannot find name 'u'. +ES5SymbolProperty6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5SymbolProperty6.ts(3,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +ES5SymbolProperty6.ts(3,6): error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. +ES5SymbolProperty6.ts(6,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + +==== ES5SymbolProperty6.ts (5 errors) ==== + u//@target: ES5 + ~ +!!! error TS2304: Cannot find name 'u'. + class C { + [Symbol.iterator]() { } + ~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 ES5SymbolProperty6.ts:3:5: Add a return type to the method + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ +!!! error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. + } + + (new C)[Symbol.iterator] + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty7.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty7.d.ts new file mode 100644 index 0000000000000..5eea9d02c7d65 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty7.d.ts @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty7.ts] //// + +//// [ES5SymbolProperty7.ts] +var Symbol: { iterator: any }; + +class C { + [Symbol.iterator]() { } +} + +(new C)[Symbol.iterator] + +/// [Declarations] //// + + + +//// [ES5SymbolProperty7.d.ts] +declare var Symbol: { + iterator: any; +}; +declare class C { + [Symbol.iterator](): invalid; +} + +/// [Errors] //// + +ES5SymbolProperty7.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + + +==== ES5SymbolProperty7.ts (1 errors) ==== + var Symbol: { iterator: any }; + + class C { + [Symbol.iterator]() { } + ~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 ES5SymbolProperty7.ts:4:5: Add a return type to the method + } + + (new C)[Symbol.iterator] \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts index 4341b60171f83..723f20fcc8be6 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts @@ -14,7 +14,7 @@ declare var v: invalid; FunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'yield'. FunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. -FunctionDeclaration8_es6.ts(1,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +FunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations ==== FunctionDeclaration8_es6.ts (3 errors) ==== @@ -24,4 +24,6 @@ FunctionDeclaration8_es6.ts(1,20): error TS9007: Declaration emit for this file ~~~ !!! error TS2304: Cannot find name 'foo'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 FunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v +!!! related TS9035 FunctionDeclaration8_es6.ts:1:20: Add a type assertion to this expression to make type type explicit \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/MemberFunctionDeclaration3_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/MemberFunctionDeclaration3_es6.d.ts new file mode 100644 index 0000000000000..b225a7506b607 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/MemberFunctionDeclaration3_es6.d.ts @@ -0,0 +1,34 @@ +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts] //// + +//// [MemberFunctionDeclaration3_es6.ts] +class C { + *[foo]() { } +} + +/// [Declarations] //// + + + +//// [MemberFunctionDeclaration3_es6.d.ts] +declare class C { + [foo](): invalid; +} + +/// [Errors] //// + +MemberFunctionDeclaration3_es6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +MemberFunctionDeclaration3_es6.ts(2,6): error TS2304: Cannot find name 'foo'. +MemberFunctionDeclaration3_es6.ts(2,6): error TS4100: Public method '[foo]' of exported class has or is using private name 'foo'. + + +==== MemberFunctionDeclaration3_es6.ts (3 errors) ==== + class C { + *[foo]() { } + ~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 MemberFunctionDeclaration3_es6.ts:2:5: Add a return type to the method + ~~~ +!!! error TS2304: Cannot find name 'foo'. + ~~~ +!!! error TS4100: Public method '[foo]' of exported class has or is using private name 'foo'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/arrayFind.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/arrayFind.d.ts index 7a8774c878c64..32f469fdaac3e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/arrayFind.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/arrayFind.d.ts @@ -26,7 +26,7 @@ declare const readonlyFoundNumber: number | undefined; /// [Errors] //// -arrayFind.ts(6,42): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +arrayFind.ts(6,42): error TS9017: Only const arrays can be inferred with --isolatedDeclarations ==== arrayFind.ts (1 errors) ==== @@ -37,7 +37,8 @@ arrayFind.ts(6,42): error TS9007: Declaration emit for this file requires type r const arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations +!!! related TS9027 arrayFind.ts:6:7: Add a type annotation to the variable arrayOfStringsNumbersAndBooleans const foundNumber: number | undefined = arrayOfStringsNumbersAndBooleans.find(isNumber); const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans as ReadonlyArray; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asOperator1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asOperator1.d.ts index 494dfa55b54bb..8ea4b4f90e0ff 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/asOperator1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/asOperator1.d.ts @@ -24,7 +24,7 @@ declare var j: number | string; /// [Errors] //// -asOperator1.ts(3,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +asOperator1.ts(3,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations ==== asOperator1.ts (1 errors) ==== @@ -32,7 +32,8 @@ asOperator1.ts(3,9): error TS9007: Declaration emit for this file requires type var x = undefined as number; var y = (null as string).length; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 asOperator1.ts:3:5: Add a type annotation to the variable y var z = Date as any as string; // Should parse as a union type, not a bitwise 'or' of (32 as number) and 'string' diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts index e780b280cea95..819dbc2d29eb1 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts @@ -14,7 +14,7 @@ declare var v: invalid; asyncFunctionDeclaration8_es2017.ts(1,12): error TS2304: Cannot find name 'await'. asyncFunctionDeclaration8_es2017.ts(1,20): error TS2304: Cannot find name 'foo'. -asyncFunctionDeclaration8_es2017.ts(1,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +asyncFunctionDeclaration8_es2017.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations ==== asyncFunctionDeclaration8_es2017.ts (3 errors) ==== @@ -24,4 +24,6 @@ asyncFunctionDeclaration8_es2017.ts(1,20): error TS9007: Declaration emit for th ~~~ !!! error TS2304: Cannot find name 'foo'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 asyncFunctionDeclaration8_es2017.ts:1:5: Add a type annotation to the variable v +!!! related TS9035 asyncFunctionDeclaration8_es2017.ts:1:20: Add a type assertion to this expression to make type type explicit \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts index d985a2e36fb69..df49403932d98 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts @@ -14,7 +14,7 @@ declare var v: invalid; asyncFunctionDeclaration8_es5.ts(1,12): error TS2304: Cannot find name 'await'. asyncFunctionDeclaration8_es5.ts(1,20): error TS2304: Cannot find name 'foo'. -asyncFunctionDeclaration8_es5.ts(1,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +asyncFunctionDeclaration8_es5.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations ==== asyncFunctionDeclaration8_es5.ts (3 errors) ==== @@ -24,4 +24,6 @@ asyncFunctionDeclaration8_es5.ts(1,20): error TS9007: Declaration emit for this ~~~ !!! error TS2304: Cannot find name 'foo'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 asyncFunctionDeclaration8_es5.ts:1:5: Add a type annotation to the variable v +!!! related TS9035 asyncFunctionDeclaration8_es5.ts:1:20: Add a type assertion to this expression to make type type explicit \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts index 7423476e957c3..9e928c23730d0 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts @@ -14,7 +14,7 @@ declare var v: invalid; asyncFunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'await'. asyncFunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. -asyncFunctionDeclaration8_es6.ts(1,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +asyncFunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations ==== asyncFunctionDeclaration8_es6.ts (3 errors) ==== @@ -24,4 +24,6 @@ asyncFunctionDeclaration8_es6.ts(1,20): error TS9007: Declaration emit for this ~~~ !!! error TS2304: Cannot find name 'foo'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 asyncFunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v +!!! related TS9035 asyncFunctionDeclaration8_es6.ts:1:20: Add a type assertion to this expression to make type type explicit \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts index fcc5a6b52a458..c241c054a55c8 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts @@ -58,13 +58,13 @@ declare const c: { a.ts(2,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. a.ts(8,11): error TS2538: Type '1n' cannot be used as an index type. a.ts(14,1): error TS2322: Type 'bigint' is not assignable to type 'string | number | symbol'. -a.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +a.ts(18,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations a.ts(19,12): error TS2538: Type 'bigint' cannot be used as an index type. b.ts(2,12): error TS1136: Property assignment expected. b.ts(2,14): error TS1005: ';' expected. b.ts(2,19): error TS1128: Declaration or statement expected. b.ts(3,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -b.ts(3,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +b.ts(3,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -94,7 +94,8 @@ b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'nu const bigNum: bigint = 0n; const typedArray = new Uint8Array(3); ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 a.ts:18:7: Add a type annotation to the variable typedArray typedArray[bigNum] = 0xAA; // should error ~~~~~~ !!! error TS2538: Type 'bigint' cannot be used as an index type. @@ -116,7 +117,8 @@ b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'nu ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 b.ts:3:7: Add a type annotation to the variable b const c = {[bigNum]: 789}; ~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/booleanFilterAnyArray.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/booleanFilterAnyArray.d.ts index f44e66e183e1c..cd7a4fcb4ad1e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/booleanFilterAnyArray.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/booleanFilterAnyArray.d.ts @@ -61,7 +61,7 @@ declare var foos: Array; /// [Errors] //// -booleanFilterAnyArray.ts(20,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +booleanFilterAnyArray.ts(20,11): error TS9017: Only const arrays can be inferred with --isolatedDeclarations ==== booleanFilterAnyArray.ts (1 errors) ==== @@ -86,7 +86,8 @@ booleanFilterAnyArray.ts(20,11): error TS9007: Declaration emit for this file re var foo = [{ name: 'x' }] ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations +!!! related TS9027 booleanFilterAnyArray.ts:20:5: Add a type annotation to the variable foo var foor: Array<{name: string}> var foor = foo.filter(x => x.name) var foos: Array diff --git a/tests/baselines/reference/isolated-declarations/original/dte/capturedParametersInInitializers1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/capturedParametersInInitializers1.d.ts index 6c40e5db455e3..5b27332cbc4e9 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/capturedParametersInInitializers1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/capturedParametersInInitializers1.d.ts @@ -62,26 +62,26 @@ declare function foo9(y?: invalid, z?: number): invalid; /// [Errors] //// -capturedParametersInInitializers1.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(2,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(7,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(7,19): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -capturedParametersInInitializers1.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(13,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(18,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(2,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(2,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(7,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(7,19): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(12,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(18,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations capturedParametersInInitializers1.ts(18,20): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. -capturedParametersInInitializers1.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(22,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(22,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(18,20): error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations +capturedParametersInInitializers1.ts(22,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(22,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations capturedParametersInInitializers1.ts(22,26): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. -capturedParametersInInitializers1.ts(26,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(26,19): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -capturedParametersInInitializers1.ts(30,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(30,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(34,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(38,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(38,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(26,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(26,19): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(30,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(30,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(34,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(38,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(38,20): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. @@ -89,49 +89,58 @@ capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot // ok - usage is deferred function foo1(y = class {c = x}, x = 1) { ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 capturedParametersInInitializers1.ts:2:10: Add a return type to the function declaration ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 capturedParametersInInitializers1.ts:2:15: Add a type annotation to the parameter y new y().c; } // ok - used in file function foo2(y = function(x: typeof z) {}, z = 1) { ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 capturedParametersInInitializers1.ts:7:10: Add a return type to the function declaration ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 capturedParametersInInitializers1.ts:7:15: Add a type annotation to the parameter y -!!! related TS9603 capturedParametersInInitializers1.ts:7:19: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9028 capturedParametersInInitializers1.ts:7:15: Add a type annotation to the parameter y +!!! related TS9030 capturedParametersInInitializers1.ts:7:19: Add a return type to the function expression } // ok -used in type let a; ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 capturedParametersInInitializers1.ts:12:5: Add a type annotation to the variable a function foo3(y = { x: a }, z = 1) { ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 capturedParametersInInitializers1.ts:13:10: Add a return type to the function declaration } // error - used before declaration function foo4(y = {z}, z = 1) { ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 capturedParametersInInitializers1.ts:18:10: Add a return type to the function declaration ~ !!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations +!!! related TS9028 capturedParametersInInitializers1.ts:18:15: Add a type annotation to the parameter y } // error - used before declaration, IIFEs are inlined function foo5(y = (() => z)(), z = 1) { ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 capturedParametersInInitializers1.ts:22:10: Add a return type to the function declaration ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 capturedParametersInInitializers1.ts:22:15: Add a type annotation to the parameter y ~ !!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. } @@ -139,35 +148,43 @@ capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot // ok - IIFE inside another function function foo6(y = () => (() => z)(), z = 1) { ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 capturedParametersInInitializers1.ts:26:10: Add a return type to the function declaration ~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 capturedParametersInInitializers1.ts:26:15: Add a type annotation to the parameter y -!!! related TS9603 capturedParametersInInitializers1.ts:26:19: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9028 capturedParametersInInitializers1.ts:26:15: Add a type annotation to the parameter y +!!! related TS9030 capturedParametersInInitializers1.ts:26:19: Add a return type to the function expression } // ok - used inside immediately invoked generator function function foo7(y = (function*() {yield z})(), z = 1) { ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 capturedParametersInInitializers1.ts:30:10: Add a return type to the function declaration ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 capturedParametersInInitializers1.ts:30:15: Add a type annotation to the parameter y } // ok - used inside immediately invoked async function function foo8(y = (async () => z)(), z = 1) { ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 capturedParametersInInitializers1.ts:34:10: Add a return type to the function declaration ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 capturedParametersInInitializers1.ts:34:15: Add a type annotation to the parameter y } // error - used as computed name of method function foo9(y = {[z]() { return z; }}, z = 1) { ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 capturedParametersInInitializers1.ts:38:10: Add a return type to the function declaration ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9028 capturedParametersInInitializers1.ts:38:15: Add a type annotation to the parameter y +!!! related TS9034 capturedParametersInInitializers1.ts:38:20: Add a return type to the method ~ !!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts index 7d025827958c7..ebfd63e1dedf3 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts @@ -116,7 +116,7 @@ declare namespace m1 { function f1(c1: C1): invalid; function f2(c2: C2): invalid; class C2 implements m3.i3 { - get p1(): invalid; + get p1(): C1; set p1(arg1: C1); f55(): invalid; } @@ -167,40 +167,39 @@ declare namespace mglo5 { /// [Errors] //// -complicatedPrivacy.ts(5,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -complicatedPrivacy.ts(7,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(5,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +complicatedPrivacy.ts(7,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations complicatedPrivacy.ts(11,24): error TS1054: A 'get' accessor cannot have parameters. -complicatedPrivacy.ts(11,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -complicatedPrivacy.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -complicatedPrivacy.ts(24,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -complicatedPrivacy.ts(33,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(18,20): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +complicatedPrivacy.ts(24,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +complicatedPrivacy.ts(33,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations complicatedPrivacy.ts(35,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. complicatedPrivacy.ts(35,6): error TS2693: 'number' only refers to a type, but is being used as a value here. -complicatedPrivacy.ts(40,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(40,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported member 'i6'. -complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(74,13): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -==== complicatedPrivacy.ts (12 errors) ==== +==== complicatedPrivacy.ts (11 errors) ==== module m1 { export module m2 { export function f1(c1: C1) { ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 complicatedPrivacy.ts:5:25: Add a return type to the function declaration } export function f2(c2: C2) { ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 complicatedPrivacy.ts:7:25: Add a return type to the function declaration } export class C2 implements m3.i3 { public get p1(arg) { ~~ !!! error TS1054: A 'get' accessor cannot have parameters. - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. return new C1(); } @@ -209,7 +208,8 @@ complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requi public f55() { ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 complicatedPrivacy.ts:18:20: Add a return type to the method return "Hello world"; } } @@ -217,7 +217,8 @@ complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requi export function f2(arg1: { x?: C1, y: number }) { ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 complicatedPrivacy.ts:24:21: Add a return type to the function declaration } export function f3(): { @@ -228,7 +229,8 @@ complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requi export function f4(arg1: ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 complicatedPrivacy.ts:33:21: Add a return type to the function declaration { [number]: C1; // Used to be indexer, now it is a computed property ~~~~~~~~ @@ -241,7 +243,8 @@ complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requi export function f5(arg2: { ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 complicatedPrivacy.ts:40:21: Add a return type to the function declaration new (arg1: C1) : C1 }) { } @@ -279,7 +282,8 @@ complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requi !!! error TS2694: Namespace 'mglo5' has no exported member 'i6'. f1() { ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 complicatedPrivacy.ts:74:13: Add a return type to the method return "Hello"; } } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts index bce705a668f92..9b3e6ed8d49d9 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts @@ -92,11 +92,11 @@ export {}; /// [Errors] //// -computedPropertiesNarrowed.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertiesNarrowed.ts(20,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertiesNarrowed.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertiesNarrowed.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertiesNarrowed.ts(47,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -119,11 +119,13 @@ computedPropertiesNarrowed.ts(47,5): error TS9007: Declaration emit for this fil export let o32 = { [1-1]: 1 } // error number ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 } @@ -131,7 +133,8 @@ computedPropertiesNarrowed.ts(47,5): error TS9007: Declaration emit for this fil export let o5 ={ [Symbol()]: 1 // Should error ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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(); @@ -144,7 +147,8 @@ computedPropertiesNarrowed.ts(47,5): error TS9007: Declaration emit for this fil export let o7 = { [foo()]: 1 // Should error ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 @@ -156,6 +160,7 @@ computedPropertiesNarrowed.ts(47,5): error TS9007: Declaration emit for this fil export const o9 = { [ns().v]: 1 ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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/computedPropertyNames10_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES5.d.ts new file mode 100644 index 0000000000000..fd2ab26565d9b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES5.d.ts @@ -0,0 +1,126 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts] //// + +//// [computedPropertyNames10_ES5.ts] +var s: string; +var n: number; +var a: any; +var v = { + [s]() { }, + [n]() { }, + [s + s]() { }, + [s + n]() { }, + [+s]() { }, + [""]() { }, + [0]() { }, + [a]() { }, + [true]() { }, + [`hello bye`]() { }, + [`hello ${a} bye`]() { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames10_ES5.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare var v: invalid; + +/// [Errors] //// + +computedPropertyNames10_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES5.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES5.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +==== computedPropertyNames10_ES5.ts (16 errors) ==== + var s: string; + var n: number; + var a: any; + var v = { + [s]() { }, + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:5:5: Add a return type to the method + [n]() { }, + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:6:5: Add a return type to the method + [s + s]() { }, + ~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:7:5: Add a return type to the method + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + [s + n]() { }, + ~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:8:5: Add a return type to the method + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + [+s]() { }, + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:9:5: Add a return type to the method + ~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + [""]() { }, + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:10:5: Add a return type to the method + [0]() { }, + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:11:5: Add a return type to the method + [a]() { }, + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:12:5: Add a return type to the method + [true]() { }, + ~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:13:5: Add a return type to the method + ~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + [`hello bye`]() { }, + ~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:14:5: Add a return type to the method + [`hello ${a} bye`]() { } + ~~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:15:5: Add a return type to the method + ~~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES6.d.ts new file mode 100644 index 0000000000000..c48a26f974086 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES6.d.ts @@ -0,0 +1,126 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts] //// + +//// [computedPropertyNames10_ES6.ts] +var s: string; +var n: number; +var a: any; +var v = { + [s]() { }, + [n]() { }, + [s + s]() { }, + [s + n]() { }, + [+s]() { }, + [""]() { }, + [0]() { }, + [a]() { }, + [true]() { }, + [`hello bye`]() { }, + [`hello ${a} bye`]() { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames10_ES6.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare var v: invalid; + +/// [Errors] //// + +computedPropertyNames10_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES6.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES6.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES6.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +==== computedPropertyNames10_ES6.ts (16 errors) ==== + var s: string; + var n: number; + var a: any; + var v = { + [s]() { }, + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:5:5: Add a return type to the method + [n]() { }, + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:6:5: Add a return type to the method + [s + s]() { }, + ~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:7:5: Add a return type to the method + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + [s + n]() { }, + ~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:8:5: Add a return type to the method + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + [+s]() { }, + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:9:5: Add a return type to the method + ~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + [""]() { }, + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:10:5: Add a return type to the method + [0]() { }, + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:11:5: Add a return type to the method + [a]() { }, + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:12:5: Add a return type to the method + [true]() { }, + ~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:13:5: Add a return type to the method + ~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + [`hello bye`]() { }, + ~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:14:5: Add a return type to the method + [`hello ${a} bye`]() { } + ~~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:15:5: Add a return type to the method + ~~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES5.d.ts new file mode 100644 index 0000000000000..213ea2a3d2f91 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES5.d.ts @@ -0,0 +1,115 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES5.ts] //// + +//// [computedPropertyNames11_ES5.ts] +var s: string; +var n: number; +var a: any; +var v = { + get [s]() { return 0; }, + set [n](v) { }, + get [s + s]() { return 0; }, + set [s + n](v) { }, + get [+s]() { return 0; }, + set [""](v) { }, + get [0]() { return 0; }, + set [a](v) { }, + get [true]() { return 0; }, + set [`hello bye`](v) { }, + get [`hello ${a} bye`]() { return 0; } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames11_ES5.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare var v: invalid; + +/// [Errors] //// + +computedPropertyNames11_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES5.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES5.ts(8,17): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES5.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +==== computedPropertyNames11_ES5.ts (16 errors) ==== + var s: string; + var n: number; + var a: any; + var v = { + get [s]() { return 0; }, + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES5.ts:5:9: Add a return type to the get accessor declaration + set [n](v) { }, + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames11_ES5.ts:6:9: Add a type to parameter of the set accessor declaration + get [s + s]() { return 0; }, + ~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES5.ts:7:9: Add a return type to the get accessor declaration + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v + set [s + n](v) { }, + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames11_ES5.ts:8:9: Add a type to parameter of the set accessor declaration + get [+s]() { return 0; }, + ~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES5.ts:9:9: Add a return type to the get accessor declaration + ~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v + set [""](v) { }, + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames11_ES5.ts:10:9: Add a type to parameter of the set accessor declaration + get [0]() { return 0; }, + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES5.ts:11:9: Add a return type to the get accessor declaration + set [a](v) { }, + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames11_ES5.ts:12:9: Add a type to parameter of the set accessor declaration + get [true]() { return 0; }, + ~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES5.ts:13:9: Add a return type to the get accessor declaration + ~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v + set [`hello bye`](v) { }, + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames11_ES5.ts:14:9: Add a type to parameter of the set accessor declaration + get [`hello ${a} bye`]() { return 0; } + ~~~~~~~~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES5.ts:15:9: Add a return type to the get accessor declaration + ~~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES6.d.ts new file mode 100644 index 0000000000000..b6bc1acca095f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES6.d.ts @@ -0,0 +1,115 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES6.ts] //// + +//// [computedPropertyNames11_ES6.ts] +var s: string; +var n: number; +var a: any; +var v = { + get [s]() { return 0; }, + set [n](v) { }, + get [s + s]() { return 0; }, + set [s + n](v) { }, + get [+s]() { return 0; }, + set [""](v) { }, + get [0]() { return 0; }, + set [a](v) { }, + get [true]() { return 0; }, + set [`hello bye`](v) { }, + get [`hello ${a} bye`]() { return 0; } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames11_ES6.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare var v: invalid; + +/// [Errors] //// + +computedPropertyNames11_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES6.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES6.ts(8,17): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES6.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +==== computedPropertyNames11_ES6.ts (16 errors) ==== + var s: string; + var n: number; + var a: any; + var v = { + get [s]() { return 0; }, + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES6.ts:5:9: Add a return type to the get accessor declaration + set [n](v) { }, + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames11_ES6.ts:6:9: Add a type to parameter of the set accessor declaration + get [s + s]() { return 0; }, + ~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES6.ts:7:9: Add a return type to the get accessor declaration + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v + set [s + n](v) { }, + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames11_ES6.ts:8:9: Add a type to parameter of the set accessor declaration + get [+s]() { return 0; }, + ~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES6.ts:9:9: Add a return type to the get accessor declaration + ~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v + set [""](v) { }, + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames11_ES6.ts:10:9: Add a type to parameter of the set accessor declaration + get [0]() { return 0; }, + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES6.ts:11:9: Add a return type to the get accessor declaration + set [a](v) { }, + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames11_ES6.ts:12:9: Add a type to parameter of the set accessor declaration + get [true]() { return 0; }, + ~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES6.ts:13:9: Add a return type to the get accessor declaration + ~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v + set [`hello bye`](v) { }, + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames11_ES6.ts:14:9: Add a type to parameter of the set accessor declaration + get [`hello ${a} bye`]() { return 0; } + ~~~~~~~~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES6.ts:15:9: Add a return type to the get accessor declaration + ~~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts index a78cbc6924a77..6e01f9a38ad1d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts @@ -39,7 +39,7 @@ declare class C { computedPropertyNames12_ES5.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames12_ES5.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations computedPropertyNames12_ES5.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -60,7 +60,8 @@ computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +!!! related TS9029 computedPropertyNames12_ES5.ts:6:5: Add a type annotation to the property [n] static [s + s]: string; ~~~~~~~ !!! 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/dte/computedPropertyNames12_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts index 29fbb1047f12b..0a45fbc56a7e1 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts @@ -39,7 +39,7 @@ declare class C { computedPropertyNames12_ES6.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames12_ES6.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations computedPropertyNames12_ES6.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -60,7 +60,8 @@ computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +!!! related TS9029 computedPropertyNames12_ES6.ts:6:5: Add a type annotation to the property [n] static [s + s]: string; ~~~~~~~ !!! 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/dte/computedPropertyNames13_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES5.d.ts new file mode 100644 index 0000000000000..8e9725d0c3c05 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES5.d.ts @@ -0,0 +1,82 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES5.ts] //// + +//// [computedPropertyNames13_ES5.ts] +var s: string; +var n: number; +var a: any; +class C { + [s]() {} + [n]() { } + static [s + s]() { } + [s + n]() { } + [+s]() { } + static [""]() { } + [0]() { } + [a]() { } + static [true]() { } + [`hello bye`]() { } + static [`hello ${a} bye`]() { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames13_ES5.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare class C { + [s](): invalid; + [n](): invalid; + static [""](): invalid; + [0](): invalid; + [a](): invalid; + [`hello bye`](): invalid; +} + +/// [Errors] //// + +computedPropertyNames13_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES5.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + + +==== computedPropertyNames13_ES5.ts (6 errors) ==== + var s: string; + var n: number; + var a: any; + class C { + [s]() {} + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES5.ts:5:5: Add a return type to the method + [n]() { } + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES5.ts:6:5: Add a return type to the method + static [s + s]() { } + [s + n]() { } + [+s]() { } + static [""]() { } + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES5.ts:10:12: Add a return type to the method + [0]() { } + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES5.ts:11:5: Add a return type to the method + [a]() { } + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES5.ts:12:5: Add a return type to the method + static [true]() { } + [`hello bye`]() { } + ~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES5.ts:14:5: Add a return type to the method + static [`hello ${a} bye`]() { } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES6.d.ts new file mode 100644 index 0000000000000..9e5f689437cb2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES6.d.ts @@ -0,0 +1,82 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES6.ts] //// + +//// [computedPropertyNames13_ES6.ts] +var s: string; +var n: number; +var a: any; +class C { + [s]() {} + [n]() { } + static [s + s]() { } + [s + n]() { } + [+s]() { } + static [""]() { } + [0]() { } + [a]() { } + static [true]() { } + [`hello bye`]() { } + static [`hello ${a} bye`]() { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames13_ES6.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare class C { + [s](): invalid; + [n](): invalid; + static [""](): invalid; + [0](): invalid; + [a](): invalid; + [`hello bye`](): invalid; +} + +/// [Errors] //// + +computedPropertyNames13_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + + +==== computedPropertyNames13_ES6.ts (6 errors) ==== + var s: string; + var n: number; + var a: any; + class C { + [s]() {} + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES6.ts:5:5: Add a return type to the method + [n]() { } + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES6.ts:6:5: Add a return type to the method + static [s + s]() { } + [s + n]() { } + [+s]() { } + static [""]() { } + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES6.ts:10:12: Add a return type to the method + [0]() { } + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES6.ts:11:5: Add a return type to the method + [a]() { } + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES6.ts:12:5: Add a return type to the method + static [true]() { } + [`hello bye`]() { } + ~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES6.ts:14:5: Add a return type to the method + static [`hello ${a} bye`]() { } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES5.d.ts new file mode 100644 index 0000000000000..3dee7483ce8c6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES5.d.ts @@ -0,0 +1,64 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES5.ts] //// + +//// [computedPropertyNames14_ES5.ts] +var b: boolean; +class C { + [b]() {} + static [true]() { } + [[]]() { } + static [{}]() { } + [undefined]() { } + static [null]() { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames14_ES5.d.ts] +declare var b: boolean; +declare class C { + [b](): invalid; + [undefined](): invalid; +} + +/// [Errors] //// + +computedPropertyNames14_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames14_ES5.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames14_ES5.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames14_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames14_ES5.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames14_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames14_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames14_ES5.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + + +==== computedPropertyNames14_ES5.ts (8 errors) ==== + var b: boolean; + class C { + [b]() {} + ~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames14_ES5.ts:3:5: Add a return type to the method + static [true]() { } + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [[]]() { } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + static [{}]() { } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [undefined]() { } + ~~~~~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames14_ES5.ts:7:5: Add a return type to the method + static [null]() { } + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES6.d.ts new file mode 100644 index 0000000000000..211e8ecc8f05f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES6.d.ts @@ -0,0 +1,64 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES6.ts] //// + +//// [computedPropertyNames14_ES6.ts] +var b: boolean; +class C { + [b]() {} + static [true]() { } + [[]]() { } + static [{}]() { } + [undefined]() { } + static [null]() { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames14_ES6.d.ts] +declare var b: boolean; +declare class C { + [b](): invalid; + [undefined](): invalid; +} + +/// [Errors] //// + +computedPropertyNames14_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames14_ES6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames14_ES6.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames14_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames14_ES6.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames14_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames14_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames14_ES6.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + + +==== computedPropertyNames14_ES6.ts (8 errors) ==== + var b: boolean; + class C { + [b]() {} + ~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames14_ES6.ts:3:5: Add a return type to the method + static [true]() { } + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [[]]() { } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + static [{}]() { } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [undefined]() { } + ~~~~~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames14_ES6.ts:7:5: Add a return type to the method + static [null]() { } + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES5.d.ts new file mode 100644 index 0000000000000..097907adf02d3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES5.d.ts @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts] //// + +//// [computedPropertyNames15_ES5.ts] +var p1: number | string; +var p2: number | number[]; +var p3: string | boolean; +class C { + [p1]() { } + [p2]() { } + [p3]() { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames15_ES5.d.ts] +declare var p1: number | string; +declare var p2: number | number[]; +declare var p3: string | boolean; +declare class C { + [p1](): invalid; + [p2](): invalid; + [p3](): invalid; +} + +/// [Errors] //// + +computedPropertyNames15_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames15_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames15_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames15_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames15_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + + +==== computedPropertyNames15_ES5.ts (5 errors) ==== + var p1: number | string; + var p2: number | number[]; + var p3: string | boolean; + class C { + [p1]() { } + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames15_ES5.ts:5:5: Add a return type to the method + [p2]() { } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames15_ES5.ts:6:5: Add a return type to the method + [p3]() { } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames15_ES5.ts:7:5: Add a return type to the method + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES6.d.ts new file mode 100644 index 0000000000000..644eb56c7cded --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES6.d.ts @@ -0,0 +1,57 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES6.ts] //// + +//// [computedPropertyNames15_ES6.ts] +var p1: number | string; +var p2: number | number[]; +var p3: string | boolean; +class C { + [p1]() { } + [p2]() { } + [p3]() { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames15_ES6.d.ts] +declare var p1: number | string; +declare var p2: number | number[]; +declare var p3: string | boolean; +declare class C { + [p1](): invalid; + [p2](): invalid; + [p3](): invalid; +} + +/// [Errors] //// + +computedPropertyNames15_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames15_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames15_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames15_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames15_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + + +==== computedPropertyNames15_ES6.ts (5 errors) ==== + var p1: number | string; + var p2: number | number[]; + var p3: string | boolean; + class C { + [p1]() { } + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames15_ES6.ts:5:5: Add a return type to the method + [p2]() { } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames15_ES6.ts:6:5: Add a return type to the method + [p3]() { } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames15_ES6.ts:7:5: Add a return type to the method + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts index e92bc8a2a7792..971768a1e000f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts @@ -37,12 +37,12 @@ declare class C { /// [Errors] //// -computedPropertyNames16_ES5.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES5.ts(6,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES5.ts(10,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES5.ts(11,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES5.ts(12,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES5.ts(14,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES5.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ==== computedPropertyNames16_ES5.ts (6 errors) ==== @@ -52,25 +52,31 @@ computedPropertyNames16_ES5.ts(14,23): error TS9007: Declaration emit for this f class C { get [s]() { return 0;} ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames16_ES5.ts:5:9: Add a return type to the get accessor declaration set [n](v) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames16_ES5.ts:6:9: Add a type to parameter of the set accessor declaration static get [s + s]() { return 0; } set [s + n](v) { } get [+s]() { return 0; } static set [""](v) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames16_ES5.ts:10:16: Add a type to parameter of the set accessor declaration get [0]() { return 0; } ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames16_ES5.ts:11:9: Add a return type to the get accessor declaration set [a](v) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames16_ES5.ts:12:9: Add a type to parameter of the set accessor declaration static get [true]() { return 0; } set [`hello bye`](v) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames16_ES5.ts:14:9: Add a type to parameter of the set accessor declaration get [`hello ${a} bye`]() { return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts index 7c0d499e47042..910a5e4cc8228 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts @@ -37,12 +37,12 @@ declare class C { /// [Errors] //// -computedPropertyNames16_ES6.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES6.ts(6,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES6.ts(10,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES6.ts(11,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES6.ts(12,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES6.ts(14,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES6.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ==== computedPropertyNames16_ES6.ts (6 errors) ==== @@ -52,25 +52,31 @@ computedPropertyNames16_ES6.ts(14,23): error TS9007: Declaration emit for this f class C { get [s]() { return 0;} ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames16_ES6.ts:5:9: Add a return type to the get accessor declaration set [n](v) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames16_ES6.ts:6:9: Add a type to parameter of the set accessor declaration static get [s + s]() { return 0; } set [s + n](v) { } get [+s]() { return 0; } static set [""](v) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames16_ES6.ts:10:16: Add a type to parameter of the set accessor declaration get [0]() { return 0; } ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames16_ES6.ts:11:9: Add a return type to the get accessor declaration set [a](v) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames16_ES6.ts:12:9: Add a type to parameter of the set accessor declaration static get [true]() { return 0; } set [`hello bye`](v) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames16_ES6.ts:14:9: Add a type to parameter of the set accessor declaration get [`hello ${a} bye`]() { return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES5.d.ts new file mode 100644 index 0000000000000..10e2532e44356 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES5.d.ts @@ -0,0 +1,64 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES5.ts] //// + +//// [computedPropertyNames17_ES5.ts] +var b: boolean; +class C { + get [b]() { return 0;} + static set [true](v) { } + get [[]]() { return 0; } + set [{}](v) { } + static get [undefined]() { return 0; } + set [null](v) { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames17_ES5.d.ts] +declare var b: boolean; +declare class C { + get [b](): invalid; + static get [undefined](): invalid; +} + +/// [Errors] //// + +computedPropertyNames17_ES5.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames17_ES5.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames17_ES5.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames17_ES5.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames17_ES5.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames17_ES5.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames17_ES5.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames17_ES5.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + + +==== computedPropertyNames17_ES5.ts (8 errors) ==== + var b: boolean; + class C { + get [b]() { return 0;} + ~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames17_ES5.ts:3:9: Add a return type to the get accessor declaration + static set [true](v) { } + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + get [[]]() { return 0; } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + set [{}](v) { } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + static get [undefined]() { return 0; } + ~~~~~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames17_ES5.ts:7:16: Add a return type to the get accessor declaration + set [null](v) { } + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES6.d.ts new file mode 100644 index 0000000000000..522ed887dcdb0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES6.d.ts @@ -0,0 +1,64 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts] //// + +//// [computedPropertyNames17_ES6.ts] +var b: boolean; +class C { + get [b]() { return 0;} + static set [true](v) { } + get [[]]() { return 0; } + set [{}](v) { } + static get [undefined]() { return 0; } + set [null](v) { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames17_ES6.d.ts] +declare var b: boolean; +declare class C { + get [b](): invalid; + static get [undefined](): invalid; +} + +/// [Errors] //// + +computedPropertyNames17_ES6.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames17_ES6.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames17_ES6.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames17_ES6.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames17_ES6.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames17_ES6.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames17_ES6.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames17_ES6.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + + +==== computedPropertyNames17_ES6.ts (8 errors) ==== + var b: boolean; + class C { + get [b]() { return 0;} + ~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames17_ES6.ts:3:9: Add a return type to the get accessor declaration + static set [true](v) { } + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + get [[]]() { return 0; } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + set [{}](v) { } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + static get [undefined]() { return 0; } + ~~~~~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames17_ES6.ts:7:16: Add a return type to the get accessor declaration + set [null](v) { } + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts index f7aff894c6295..18eaddeafcc71 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts @@ -30,40 +30,40 @@ declare class C { /// [Errors] //// -computedPropertyNames2_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames2_ES5.ts(5,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames2_ES5.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES5.ts(6,9): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES5.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames2_ES5.ts(7,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES5.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES5.ts(8,16): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES5.ts(8,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames2_ES5.ts(9,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES5.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -==== computedPropertyNames2_ES5.ts (8 errors) ==== +==== computedPropertyNames2_ES5.ts (6 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { [methodName]() { } ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames2_ES5.ts:4:5: Add a return type to the method static [methodName]() { } ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames2_ES5.ts:5:12: Add a return type to the method get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames2_ES5.ts:7:9: Add a type to parameter of the set accessor declaration +!!! related TS9032 computedPropertyNames2_ES5.ts:6:9: Add a return type to the get accessor declaration set [accessorName](v) { } - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames2_ES5.ts:9:16: Add a type to parameter of the set accessor declaration +!!! related TS9032 computedPropertyNames2_ES5.ts:8:16: Add a return type to the get accessor declaration static set [accessorName](v) { } - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts index 048e86ae27b6d..4a48f333530a9 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts @@ -30,40 +30,40 @@ declare class C { /// [Errors] //// -computedPropertyNames2_ES6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames2_ES6.ts(5,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames2_ES6.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES6.ts(6,9): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES6.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames2_ES6.ts(7,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES6.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES6.ts(8,16): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES6.ts(8,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames2_ES6.ts(9,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES6.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -==== computedPropertyNames2_ES6.ts (8 errors) ==== +==== computedPropertyNames2_ES6.ts (6 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { [methodName]() { } ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames2_ES6.ts:4:5: Add a return type to the method static [methodName]() { } ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames2_ES6.ts:5:12: Add a return type to the method get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames2_ES6.ts:7:9: Add a type to parameter of the set accessor declaration +!!! related TS9032 computedPropertyNames2_ES6.ts:6:9: Add a return type to the get accessor declaration set [accessorName](v) { } - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. static get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames2_ES6.ts:9:16: Add a type to parameter of the set accessor declaration +!!! related TS9032 computedPropertyNames2_ES6.ts:8:16: Add a return type to the get accessor declaration static set [accessorName](v) { } - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts index 13a8f4d07962a..3d7645740d26c 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts @@ -30,15 +30,16 @@ declare var v: invalid; /// [Errors] //// -computedPropertyNames4_ES5.ts(6,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES5.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES5.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES5.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES5.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES5.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations +computedPropertyNames4_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES5.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations +computedPropertyNames4_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== computedPropertyNames4_ES5.ts (6 errors) ==== +==== computedPropertyNames4_ES5.ts (7 errors) ==== var s: string; var n: number; var a: any; @@ -46,24 +47,35 @@ computedPropertyNames4_ES5.ts(15,5): error TS9007: Declaration emit for this fil [s]: 0, [n]: n, ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9035 computedPropertyNames4_ES5.ts:6:10: Add a type assertion to this expression to make type type explicit [s + s]: 1, ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v [s + n]: 2, ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v [+s]: s, ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v + ~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9035 computedPropertyNames4_ES5.ts:9:11: Add a type assertion to this expression to make type type explicit [""]: 0, [0]: 0, [a]: 1, [true]: 0, ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v [`hello bye`]: 0, [`hello ${a} bye`]: 0 ~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts index 16b062b1642ed..5e7efa2fab368 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts @@ -30,15 +30,16 @@ declare var v: invalid; /// [Errors] //// -computedPropertyNames4_ES6.ts(6,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES6.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES6.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES6.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES6.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES6.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations +computedPropertyNames4_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES6.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations +computedPropertyNames4_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== computedPropertyNames4_ES6.ts (6 errors) ==== +==== computedPropertyNames4_ES6.ts (7 errors) ==== var s: string; var n: number; var a: any; @@ -46,24 +47,35 @@ computedPropertyNames4_ES6.ts(15,5): error TS9007: Declaration emit for this fil [s]: 0, [n]: n, ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9035 computedPropertyNames4_ES6.ts:6:10: Add a type assertion to this expression to make type type explicit [s + s]: 1, ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v [s + n]: 2, ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v [+s]: s, ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v + ~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9035 computedPropertyNames4_ES6.ts:9:11: Add a type assertion to this expression to make type type explicit [""]: 0, [0]: 0, [a]: 1, [true]: 0, ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v [`hello bye`]: 0, [`hello ${a} bye`]: 0 ~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts index 951d692364184..84cfa73e62d26 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts @@ -24,12 +24,12 @@ declare var v: invalid; computedPropertyNames5_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames5_ES5.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames5_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames5_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames5_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames5_ES5.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ==== computedPropertyNames5_ES5.ts (9 errors) ==== @@ -45,12 +45,14 @@ computedPropertyNames5_ES5.ts(8,5): error TS9007: Declaration emit for this file ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v [{}]: 0, ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v [undefined]: undefined, ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -58,5 +60,6 @@ computedPropertyNames5_ES5.ts(8,5): error TS9007: Declaration emit for this file ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts index 98098bf79adbb..7b85f4581fb37 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts @@ -24,12 +24,12 @@ declare var v: invalid; computedPropertyNames5_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames5_ES6.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames5_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames5_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames5_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames5_ES6.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ==== computedPropertyNames5_ES6.ts (9 errors) ==== @@ -45,12 +45,14 @@ computedPropertyNames5_ES6.ts(8,5): error TS9007: Declaration emit for this file ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v [{}]: 0, ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v [undefined]: undefined, ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -58,5 +60,6 @@ computedPropertyNames5_ES6.ts(8,5): error TS9007: Declaration emit for this file ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts index 0e70d22b6807c..1529024574012 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts @@ -24,9 +24,9 @@ declare class C { /// [Errors] //// computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ==== computedPropertyNamesOnOverloads_ES5.ts (4 errors) ==== @@ -37,11 +37,13 @@ computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9007: Declaration emit for ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:4:5: Add a return type to the method [methodName](); ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:5:5: Add a return type to the method [methodName](v?: string) { } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts index 230f57a770d3d..9b6656728ed96 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts @@ -24,9 +24,9 @@ declare class C { /// [Errors] //// computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ==== computedPropertyNamesOnOverloads_ES6.ts (4 errors) ==== @@ -37,11 +37,13 @@ computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9007: Declaration emit for ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:4:5: Add a return type to the method [methodName](); ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:5:5: Add a return type to the method [methodName](v?: string) { } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts index 49a78394d5604..3cb403f01015f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts @@ -86,23 +86,23 @@ declare const enum NaNOrInfinity { constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -constEnumErrors.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(12,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -constEnumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(14,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. -constEnumErrors.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(15,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations constEnumErrors.ts(15,10): error TS2474: const enum member initializers must be constant expressions. constEnumErrors.ts(15,13): error TS2339: Property 'Z' does not exist on type 'typeof E1'. -constEnumErrors.ts(22,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(22,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations constEnumErrors.ts(22,13): error TS2476: A const enum member can only be accessed using a string literal. -constEnumErrors.ts(24,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(24,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations constEnumErrors.ts(24,13): error TS2476: A const enum member can only be accessed using a string literal. -constEnumErrors.ts(25,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(25,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations constEnumErrors.ts(25,13): error TS2476: A const enum member can only be accessed using a string literal. constEnumErrors.ts(27,9): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -constEnumErrors.ts(27,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumErrors.ts(28,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(27,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +constEnumErrors.ts(28,9): error TS9017: Only const arrays can be inferred with --isolatedDeclarations constEnumErrors.ts(28,10): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. constEnumErrors.ts(33,5): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. constEnumErrors.ts(41,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. @@ -128,20 +128,20 @@ constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was eval // forward reference to the element of the same enum X = Y, ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations ~ !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. // forward reference to the element of the same enum Y = E1.Z, ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~ !!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. Y1 = E1["Z"] ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~~~ @@ -154,18 +154,21 @@ constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was eval var y0 = E2[1] ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 constEnumErrors.ts:22:5: Add a type annotation to the variable y0 ~ !!! error TS2476: A const enum member can only be accessed using a string literal. var name = "A"; var y1 = E2[name]; ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 constEnumErrors.ts:24:5: Add a type annotation to the variable y1 ~~~~ !!! error TS2476: A const enum member can only be accessed using a string literal. var y2 = E2[`${name}`]; ~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 constEnumErrors.ts:25:5: Add a type annotation to the variable y2 ~~~~~~~~~ !!! error TS2476: A const enum member can only be accessed using a string literal. @@ -173,10 +176,12 @@ constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was eval ~~ !!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 constEnumErrors.ts:27:5: Add a type annotation to the variable x var y = [E2]; ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations +!!! related TS9027 constEnumErrors.ts:28:5: Add a type annotation to the variable y ~~ !!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping.d.ts index 19c8649925841..184967145d4b9 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping.d.ts @@ -356,10 +356,10 @@ declare var x: B; /// [Errors] //// -contextualTyping.ts(146,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -contextualTyping.ts(156,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +contextualTyping.ts(146,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +contextualTyping.ts(156,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations contextualTyping.ts(189,18): error TS2384: Overload signatures must all be ambient or non-ambient. -contextualTyping.ts(193,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +contextualTyping.ts(193,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' but required in type 'B'. @@ -511,7 +511,8 @@ contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' b // CONTEXT: Function call function c9t5(f: (n: number) => IFoo) {}; ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 contextualTyping.ts:146:10: Add a return type to the function declaration c9t5(function(n) { return ({}); }); @@ -523,7 +524,8 @@ contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' b class C11t5 { constructor(f: (n: number) => IFoo) { } }; var i = new C11t5(function(n) { return ({}) }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 contextualTyping.ts:156:5: Add a type annotation to the variable i // CONTEXT: Type annotated expression var c12t1 = <(s: string) => string> (function(s) { return s }); @@ -564,7 +566,8 @@ contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' b var efv = EF1(1,2); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 contextualTyping.ts:193:5: Add a type annotation to the variable efv // contextually typing from ambient class declarations diff --git a/tests/baselines/reference/isolated-declarations/original/dte/correlatedUnions.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/correlatedUnions.d.ts index a54753c35adc6..5146a453de0cf 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/correlatedUnions.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/correlatedUnions.d.ts @@ -473,21 +473,21 @@ declare function getValueConcrete(o: Partial, k: K): /// [Errors] //// -correlatedUnions.ts(10,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(36,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(37,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(44,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(76,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(113,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(123,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(128,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(142,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(166,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(170,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(175,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(180,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(218,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -502,7 +502,8 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir function processRecord(rec: UnionRecord) { ~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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); } @@ -530,10 +531,12 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir function renderTextField(props: TextFieldData) {} ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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, @@ -542,7 +545,8 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir function renderField(field: FormField) { ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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); } @@ -576,7 +580,8 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir function process(data: DataEntry[]) { ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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) @@ -615,7 +620,8 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir function processEvents(events: Ev[]) { ~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 }); } @@ -633,7 +639,8 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ }); ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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({ ~~~~~~~~~~~~~~~~~~~~~ @@ -643,7 +650,8 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ }); ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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]); @@ -656,7 +664,8 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir function ff1() { ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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] @@ -682,27 +691,31 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir function f1(funcs: Funcs, key: K, arg: ArgMap[K]) { ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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; } @@ -742,7 +755,8 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir function foo(prop: T, f: Required) { ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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]); } @@ -757,7 +771,8 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir const BAR_LOOKUP = makeCompleteLookupMapping(ALL_BARS, 'name'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName.d.ts index 4f691b708c97d..3106e1c9a4d49 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName.d.ts @@ -33,7 +33,7 @@ export default _default; /// [Errors] //// -other.ts(7,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +other.ts(7,16): error TS9013: Expression type can't be inferred with --isolatedDeclarations ==== other.ts (1 errors) ==== @@ -49,7 +49,7 @@ other.ts(7,16): error TS9007: Declaration emit for this file requires type resol ~~~~~~~~~~~~~~~ }); ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations ==== main.ts (0 errors) ==== import other from "./other"; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName2.d.ts index a2446c289aeaa..82058c283648d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName2.d.ts @@ -33,7 +33,7 @@ export default _default; /// [Errors] //// -other.ts(7,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +other.ts(7,16): error TS9013: Expression type can't be inferred with --isolatedDeclarations ==== other.ts (1 errors) ==== @@ -49,7 +49,7 @@ other.ts(7,16): error TS9007: Declaration emit for this file requires type resol ~~~~~~~~~~~~~~~ }); ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations ==== main.ts (0 errors) ==== import * as other2 from "./other"; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/decoratorMetadataWithImportDeclarationNameCollision7.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/decoratorMetadataWithImportDeclarationNameCollision7.d.ts index 0a1bc07f3e760..80bbe9e6ef2d5 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/decoratorMetadataWithImportDeclarationNameCollision7.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/decoratorMetadataWithImportDeclarationNameCollision7.d.ts @@ -42,7 +42,7 @@ export { MyClass }; /// [Errors] //// -db.ts(2,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +db.ts(2,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations service.ts(7,9): error TS2702: 'db' only refers to a type, but is being used as a namespace here. service.ts(7,9): error TS4031: Public property 'db' of exported class has or is using private name 'db'. service.ts(9,21): error TS2702: 'db' only refers to a type, but is being used as a namespace here. @@ -53,7 +53,8 @@ service.ts(9,21): error TS4063: Parameter 'db' of constructor from exported clas export default class db { public doSomething() { ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 db.ts:2:12: Add a return type to the method } } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts index 8e9158dfba3dd..5aa7bce70af8e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts @@ -270,7 +270,7 @@ declare class I { /// [Errors] //// -decoratorsOnComputedProperties.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations decoratorsOnComputedProperties.ts(18,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(19,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(20,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -357,7 +357,8 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid ==== decoratorsOnComputedProperties.ts (82 errors) ==== function x(o: object, k: PropertyKey) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 decoratorsOnComputedProperties.ts:1:10: Add a return type to the function declaration let i = 0; function foo(): string { return ++i + ""; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers.d.ts new file mode 100644 index 0000000000000..41380e55f9817 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers.d.ts @@ -0,0 +1,134 @@ +//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers.ts] //// + +//// [derivedClassOverridesProtectedMembers.ts] +var x: { foo: string; } +var y: { foo: string; bar: string; } + +class Base { + protected a: typeof x; + protected b(a: typeof x) { } + protected get c() { return x; } + protected set c(v: typeof x) { } + protected d: (a: typeof x) => void; + + protected static r: typeof x; + protected static s(a: typeof x) { } + protected static get t() { return x; } + protected static set t(v: typeof x) { } + protected static u: (a: typeof x) => void; + + constructor(a: typeof x) { } +} + +class Derived extends Base { + protected a: typeof y; + protected b(a: typeof y) { } + protected get c() { return y; } + protected set c(v: typeof y) { } + protected d: (a: typeof y) => void; + + protected static r: typeof y; + protected static s(a: typeof y) { } + protected static get t() { return y; } + protected static set t(a: typeof y) { } + protected static u: (a: typeof y) => void; + + constructor(a: typeof y) { super(x) } +} + + +/// [Declarations] //// + + + +//// [derivedClassOverridesProtectedMembers.d.ts] +declare var x: { + foo: string; +}; +declare var y: { + foo: string; + bar: string; +}; +declare class Base { + protected a: typeof x; + protected b(a: typeof x): invalid; + protected get c(): typeof x; + protected set c(v: typeof x); + protected d: (a: typeof x) => void; + protected static r: typeof x; + protected static s(a: typeof x): invalid; + protected static get t(): typeof x; + protected static set t(v: typeof x); + protected static u: (a: typeof x) => void; + constructor(a: typeof x); +} +declare class Derived extends Base { + protected a: typeof y; + protected b(a: typeof y): invalid; + protected get c(): typeof y; + protected set c(v: typeof y); + protected d: (a: typeof y) => void; + protected static r: typeof y; + protected static s(a: typeof y): invalid; + protected static get t(): typeof y; + protected static set t(a: typeof y); + protected static u: (a: typeof y) => void; + constructor(a: typeof y); +} + +/// [Errors] //// + +derivedClassOverridesProtectedMembers.ts(6,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers.ts(12,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers.ts(22,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers.ts(28,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + + +==== derivedClassOverridesProtectedMembers.ts (4 errors) ==== + var x: { foo: string; } + var y: { foo: string; bar: string; } + + class Base { + protected a: typeof x; + protected b(a: typeof x) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers.ts:6:15: Add a return type to the method + protected get c() { return x; } + protected set c(v: typeof x) { } + protected d: (a: typeof x) => void; + + protected static r: typeof x; + protected static s(a: typeof x) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers.ts:12:22: Add a return type to the method + protected static get t() { return x; } + protected static set t(v: typeof x) { } + protected static u: (a: typeof x) => void; + + constructor(a: typeof x) { } + } + + class Derived extends Base { + protected a: typeof y; + protected b(a: typeof y) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers.ts:22:15: Add a return type to the method + protected get c() { return y; } + protected set c(v: typeof y) { } + protected d: (a: typeof y) => void; + + protected static r: typeof y; + protected static s(a: typeof y) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers.ts:28:22: Add a return type to the method + protected static get t() { return y; } + protected static set t(a: typeof y) { } + protected static u: (a: typeof y) => void; + + constructor(a: typeof y) { super(x) } + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers2.d.ts new file mode 100644 index 0000000000000..67d14d3944b9a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers2.d.ts @@ -0,0 +1,250 @@ +//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers2.ts] //// + +//// [derivedClassOverridesProtectedMembers2.ts] +var x: { foo: string; } +var y: { foo: string; bar: string; } + +class Base { + protected a: typeof x; + protected b(a: typeof x) { } + protected get c() { return x; } + protected set c(v: typeof x) { } + protected d: (a: typeof x) => void ; + + protected static r: typeof x; + protected static s(a: typeof x) { } + protected static get t() { return x; } + protected static set t(v: typeof x) { } + protected static u: (a: typeof x) => void ; + +constructor(a: typeof x) { } +} + +// Increase visibility of all protected members to public +class Derived extends Base { + a: typeof y; + b(a: typeof y) { } + get c() { return y; } + set c(v: typeof y) { } + d: (a: typeof y) => void; + + static r: typeof y; + static s(a: typeof y) { } + static get t() { return y; } + static set t(a: typeof y) { } + static u: (a: typeof y) => void; + + constructor(a: typeof y) { super(a); } +} + +var d: Derived = new Derived(y); +var r1 = d.a; +var r2 = d.b(y); +var r3 = d.c; +var r3a = d.d; +d.c = y; +var r4 = Derived.r; +var r5 = Derived.s(y); +var r6 = Derived.t; +var r6a = Derived.u; +Derived.t = y; + +class Base2 { + [i: string]: Object; + [i: number]: typeof x; +} + +class Derived2 extends Base2 { + [i: string]: typeof x; + [i: number]: typeof y; +} + +var d2: Derived2; +var r7 = d2['']; +var r8 = d2[1]; + + + +/// [Declarations] //// + + + +//// [derivedClassOverridesProtectedMembers2.d.ts] +declare var x: { + foo: string; +}; +declare var y: { + foo: string; + bar: string; +}; +declare class Base { + protected a: typeof x; + protected b(a: typeof x): invalid; + protected get c(): typeof x; + protected set c(v: typeof x); + protected d: (a: typeof x) => void; + protected static r: typeof x; + protected static s(a: typeof x): invalid; + protected static get t(): typeof x; + protected static set t(v: typeof x); + protected static u: (a: typeof x) => void; + constructor(a: typeof x); +} +declare class Derived extends Base { + a: typeof y; + b(a: typeof y): invalid; + get c(): typeof y; + set c(v: typeof y); + d: (a: typeof y) => void; + static r: typeof y; + static s(a: typeof y): invalid; + static get t(): typeof y; + static set t(a: typeof y); + static u: (a: typeof y) => void; + constructor(a: typeof y); +} +declare var d: Derived; +declare var r1: invalid; +declare var r2: invalid; +declare var r3: invalid; +declare var r3a: invalid; +declare var r4: invalid; +declare var r5: invalid; +declare var r6: invalid; +declare var r6a: invalid; +declare class Base2 { + [i: string]: Object; + [i: number]: typeof x; +} +declare class Derived2 extends Base2 { + [i: string]: typeof x; + [i: number]: typeof y; +} +declare var d2: Derived2; +declare var r7: invalid; +declare var r8: invalid; + +/// [Errors] //// + +derivedClassOverridesProtectedMembers2.ts(6,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(12,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(23,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(29,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(38,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(39,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(40,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(41,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(43,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(44,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(45,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(46,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(60,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(61,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + + +==== derivedClassOverridesProtectedMembers2.ts (14 errors) ==== + var x: { foo: string; } + var y: { foo: string; bar: string; } + + class Base { + protected a: typeof x; + protected b(a: typeof x) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers2.ts:6:15: Add a return type to the method + protected get c() { return x; } + protected set c(v: typeof x) { } + protected d: (a: typeof x) => void ; + + protected static r: typeof x; + protected static s(a: typeof x) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers2.ts:12:22: Add a return type to the method + protected static get t() { return x; } + protected static set t(v: typeof x) { } + protected static u: (a: typeof x) => void ; + + constructor(a: typeof x) { } + } + + // Increase visibility of all protected members to public + class Derived extends Base { + a: typeof y; + b(a: typeof y) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers2.ts:23:5: Add a return type to the method + get c() { return y; } + set c(v: typeof y) { } + d: (a: typeof y) => void; + + static r: typeof y; + static s(a: typeof y) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers2.ts:29:12: Add a return type to the method + static get t() { return y; } + static set t(a: typeof y) { } + static u: (a: typeof y) => void; + + constructor(a: typeof y) { super(a); } + } + + var d: Derived = new Derived(y); + var r1 = d.a; + ~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:38:5: Add a type annotation to the variable r1 + var r2 = d.b(y); + ~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:39:5: Add a type annotation to the variable r2 + var r3 = d.c; + ~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:40:5: Add a type annotation to the variable r3 + var r3a = d.d; + ~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:41:5: Add a type annotation to the variable r3a + d.c = y; + var r4 = Derived.r; + ~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:43:5: Add a type annotation to the variable r4 + var r5 = Derived.s(y); + ~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:44:5: Add a type annotation to the variable r5 + var r6 = Derived.t; + ~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:45:5: Add a type annotation to the variable r6 + var r6a = Derived.u; + ~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:46:5: Add a type annotation to the variable r6a + Derived.t = y; + + class Base2 { + [i: string]: Object; + [i: number]: typeof x; + } + + class Derived2 extends Base2 { + [i: string]: typeof x; + [i: number]: typeof y; + } + + var d2: Derived2; + var r7 = d2['']; + ~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:60:5: Add a type annotation to the variable r7 + var r8 = d2[1]; + ~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:61:5: Add a type annotation to the variable r8 + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers3.d.ts new file mode 100644 index 0000000000000..6be38a4876051 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers3.d.ts @@ -0,0 +1,289 @@ +//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts] //// + +//// [derivedClassOverridesProtectedMembers3.ts] +var x: { foo: string; } +var y: { foo: string; bar: string; } + +class Base { + a: typeof x; + b(a: typeof x) { } + get c() { return x; } + set c(v: typeof x) { } + d: (a: typeof x) => void; + + static r: typeof x; + static s(a: typeof x) { } + static get t() { return x; } + static set t(v: typeof x) { } + static u: (a: typeof x) => void; + + constructor(a: typeof x) {} +} + +// Errors +// decrease visibility of all public members to protected +class Derived1 extends Base { + protected a: typeof x; + constructor(a: typeof x) { super(a); } +} + +class Derived2 extends Base { + protected b(a: typeof x) { } + constructor(a: typeof x) { super(a); } +} + +class Derived3 extends Base { + protected get c() { return x; } + constructor(a: typeof x) { super(a); } +} + +class Derived4 extends Base { + protected set c(v: typeof x) { } + constructor(a: typeof x) { super(a); } +} + +class Derived5 extends Base { + protected d: (a: typeof x) => void ; + constructor(a: typeof x) { super(a); } +} + +class Derived6 extends Base { + protected static r: typeof x; + constructor(a: typeof x) { super(a); } +} + +class Derived7 extends Base { + protected static s(a: typeof x) { } + constructor(a: typeof x) { super(a); } +} + +class Derived8 extends Base { + protected static get t() { return x; } + constructor(a: typeof x) { super(a); } +} + +class Derived9 extends Base { + protected static set t(v: typeof x) { } + constructor(a: typeof x) { super(a); } +} + +class Derived10 extends Base { + protected static u: (a: typeof x) => void ; + constructor(a: typeof x) { super(a); } +} + +/// [Declarations] //// + + + +//// [derivedClassOverridesProtectedMembers3.d.ts] +declare var x: { + foo: string; +}; +declare var y: { + foo: string; + bar: string; +}; +declare class Base { + a: typeof x; + b(a: typeof x): invalid; + get c(): typeof x; + set c(v: typeof x); + d: (a: typeof x) => void; + static r: typeof x; + static s(a: typeof x): invalid; + static get t(): typeof x; + static set t(v: typeof x); + static u: (a: typeof x) => void; + constructor(a: typeof x); +} +declare class Derived1 extends Base { + protected a: typeof x; + constructor(a: typeof x); +} +declare class Derived2 extends Base { + protected b(a: typeof x): invalid; + constructor(a: typeof x); +} +declare class Derived3 extends Base { + protected get c(): invalid; + constructor(a: typeof x); +} +declare class Derived4 extends Base { + protected set c(v: typeof x); + constructor(a: typeof x); +} +declare class Derived5 extends Base { + protected d: (a: typeof x) => void; + constructor(a: typeof x); +} +declare class Derived6 extends Base { + protected static r: typeof x; + constructor(a: typeof x); +} +declare class Derived7 extends Base { + protected static s(a: typeof x): invalid; + constructor(a: typeof x); +} +declare class Derived8 extends Base { + protected static get t(): invalid; + constructor(a: typeof x); +} +declare class Derived9 extends Base { + protected static set t(v: typeof x); + constructor(a: typeof x); +} +declare class Derived10 extends Base { + protected static u: (a: typeof x) => void; + constructor(a: typeof x); +} + +/// [Errors] //// + +derivedClassOverridesProtectedMembers3.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(12,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(22,7): error TS2415: Class 'Derived1' incorrectly extends base class 'Base'. + Property 'a' is protected in type 'Derived1' but public in type 'Base'. +derivedClassOverridesProtectedMembers3.ts(27,7): error TS2415: Class 'Derived2' incorrectly extends base class 'Base'. + Property 'b' is protected in type 'Derived2' but public in type 'Base'. +derivedClassOverridesProtectedMembers3.ts(28,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(32,7): error TS2415: Class 'Derived3' incorrectly extends base class 'Base'. + Property 'c' is protected in type 'Derived3' but public in type 'Base'. +derivedClassOverridesProtectedMembers3.ts(33,19): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(37,7): error TS2415: Class 'Derived4' incorrectly extends base class 'Base'. + Property 'c' is protected in type 'Derived4' but public in type 'Base'. +derivedClassOverridesProtectedMembers3.ts(42,7): error TS2415: Class 'Derived5' incorrectly extends base class 'Base'. + Property 'd' is protected in type 'Derived5' but public in type 'Base'. +derivedClassOverridesProtectedMembers3.ts(47,7): error TS2417: Class static side 'typeof Derived6' incorrectly extends base class static side 'typeof Base'. + Property 'r' is protected in type 'typeof Derived6' but public in type 'typeof Base'. +derivedClassOverridesProtectedMembers3.ts(52,7): error TS2417: Class static side 'typeof Derived7' incorrectly extends base class static side 'typeof Base'. + Property 's' is protected in type 'typeof Derived7' but public in type 'typeof Base'. +derivedClassOverridesProtectedMembers3.ts(53,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(57,7): error TS2417: Class static side 'typeof Derived8' incorrectly extends base class static side 'typeof Base'. + Property 't' is protected in type 'typeof Derived8' but public in type 'typeof Base'. +derivedClassOverridesProtectedMembers3.ts(58,26): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(62,7): error TS2417: Class static side 'typeof Derived9' incorrectly extends base class static side 'typeof Base'. + Property 't' is protected in type 'typeof Derived9' but public in type 'typeof Base'. +derivedClassOverridesProtectedMembers3.ts(67,7): error TS2417: Class static side 'typeof Derived10' incorrectly extends base class static side 'typeof Base'. + Property 'u' is protected in type 'typeof Derived10' but public in type 'typeof Base'. + + +==== derivedClassOverridesProtectedMembers3.ts (16 errors) ==== + var x: { foo: string; } + var y: { foo: string; bar: string; } + + class Base { + a: typeof x; + b(a: typeof x) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers3.ts:6:5: Add a return type to the method + get c() { return x; } + set c(v: typeof x) { } + d: (a: typeof x) => void; + + static r: typeof x; + static s(a: typeof x) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers3.ts:12:12: Add a return type to the method + static get t() { return x; } + static set t(v: typeof x) { } + static u: (a: typeof x) => void; + + constructor(a: typeof x) {} + } + + // Errors + // decrease visibility of all public members to protected + class Derived1 extends Base { + ~~~~~~~~ +!!! error TS2415: Class 'Derived1' incorrectly extends base class 'Base'. +!!! error TS2415: Property 'a' is protected in type 'Derived1' but public in type 'Base'. + protected a: typeof x; + constructor(a: typeof x) { super(a); } + } + + class Derived2 extends Base { + ~~~~~~~~ +!!! error TS2415: Class 'Derived2' incorrectly extends base class 'Base'. +!!! error TS2415: Property 'b' is protected in type 'Derived2' but public in type 'Base'. + protected b(a: typeof x) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers3.ts:28:15: Add a return type to the method + constructor(a: typeof x) { super(a); } + } + + class Derived3 extends Base { + ~~~~~~~~ +!!! error TS2415: Class 'Derived3' incorrectly extends base class 'Base'. +!!! error TS2415: Property 'c' is protected in type 'Derived3' but public in type 'Base'. + protected get c() { return x; } + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 derivedClassOverridesProtectedMembers3.ts:33:19: Add a return type to the get accessor declaration + constructor(a: typeof x) { super(a); } + } + + class Derived4 extends Base { + ~~~~~~~~ +!!! error TS2415: Class 'Derived4' incorrectly extends base class 'Base'. +!!! error TS2415: Property 'c' is protected in type 'Derived4' but public in type 'Base'. + protected set c(v: typeof x) { } + constructor(a: typeof x) { super(a); } + } + + class Derived5 extends Base { + ~~~~~~~~ +!!! error TS2415: Class 'Derived5' incorrectly extends base class 'Base'. +!!! error TS2415: Property 'd' is protected in type 'Derived5' but public in type 'Base'. + protected d: (a: typeof x) => void ; + constructor(a: typeof x) { super(a); } + } + + class Derived6 extends Base { + ~~~~~~~~ +!!! error TS2417: Class static side 'typeof Derived6' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Property 'r' is protected in type 'typeof Derived6' but public in type 'typeof Base'. + protected static r: typeof x; + constructor(a: typeof x) { super(a); } + } + + class Derived7 extends Base { + ~~~~~~~~ +!!! error TS2417: Class static side 'typeof Derived7' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Property 's' is protected in type 'typeof Derived7' but public in type 'typeof Base'. + protected static s(a: typeof x) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers3.ts:53:22: Add a return type to the method + constructor(a: typeof x) { super(a); } + } + + class Derived8 extends Base { + ~~~~~~~~ +!!! error TS2417: Class static side 'typeof Derived8' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Property 't' is protected in type 'typeof Derived8' but public in type 'typeof Base'. + protected static get t() { return x; } + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 derivedClassOverridesProtectedMembers3.ts:58:26: Add a return type to the get accessor declaration + constructor(a: typeof x) { super(a); } + } + + class Derived9 extends Base { + ~~~~~~~~ +!!! error TS2417: Class static side 'typeof Derived9' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Property 't' is protected in type 'typeof Derived9' but public in type 'typeof Base'. + protected static set t(v: typeof x) { } + constructor(a: typeof x) { super(a); } + } + + class Derived10 extends Base { + ~~~~~~~~~ +!!! error TS2417: Class static side 'typeof Derived10' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Property 'u' is protected in type 'typeof Derived10' but public in type 'typeof Base'. + protected static u: (a: typeof x) => void ; + constructor(a: typeof x) { super(a); } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesPublicMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesPublicMembers.d.ts new file mode 100644 index 0000000000000..59479921e533c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesPublicMembers.d.ts @@ -0,0 +1,248 @@ +//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts] //// + +//// [derivedClassOverridesPublicMembers.ts] +var x: { foo: string; } +var y: { foo: string; bar: string; } + +class Base { + a: typeof x; + b(a: typeof x) { } + get c() { return x; } + set c(v: typeof x) { } + d: (a: typeof x) => void; + + static r: typeof x; + static s(a: typeof x) { } + static get t() { return x; } + static set t(v: typeof x) { } + static u: (a: typeof x) => void; + + constructor(a: typeof x) { } +} + +class Derived extends Base { + a: typeof y; + b(a: typeof y) { } + get c() { return y; } + set c(v: typeof y) { } + d: (a: typeof y) => void; + + static r: typeof y; + static s(a: typeof y) { } + static get t() { return y; } + static set t(a: typeof y) { } + static u: (a: typeof y) => void; + + constructor(a: typeof y) { super(x) } +} + +var d: Derived = new Derived(y); +var r1 = d.a; +var r2 = d.b(y); +var r3 = d.c; +var r3a = d.d; +d.c = y; +var r4 = Derived.r; +var r5 = Derived.s(y); +var r6 = Derived.t; +var r6a = Derived.u; +Derived.t = y; + +class Base2 { + [i: string]: Object; + [i: number]: typeof x; +} + +class Derived2 extends Base2 { + [i: string]: typeof x; + [i: number]: typeof y; +} + +var d2: Derived2; +var r7 = d2['']; +var r8 = d2[1]; + + + +/// [Declarations] //// + + + +//// [derivedClassOverridesPublicMembers.d.ts] +declare var x: { + foo: string; +}; +declare var y: { + foo: string; + bar: string; +}; +declare class Base { + a: typeof x; + b(a: typeof x): invalid; + get c(): typeof x; + set c(v: typeof x); + d: (a: typeof x) => void; + static r: typeof x; + static s(a: typeof x): invalid; + static get t(): typeof x; + static set t(v: typeof x); + static u: (a: typeof x) => void; + constructor(a: typeof x); +} +declare class Derived extends Base { + a: typeof y; + b(a: typeof y): invalid; + get c(): typeof y; + set c(v: typeof y); + d: (a: typeof y) => void; + static r: typeof y; + static s(a: typeof y): invalid; + static get t(): typeof y; + static set t(a: typeof y); + static u: (a: typeof y) => void; + constructor(a: typeof y); +} +declare var d: Derived; +declare var r1: invalid; +declare var r2: invalid; +declare var r3: invalid; +declare var r3a: invalid; +declare var r4: invalid; +declare var r5: invalid; +declare var r6: invalid; +declare var r6a: invalid; +declare class Base2 { + [i: string]: Object; + [i: number]: typeof x; +} +declare class Derived2 extends Base2 { + [i: string]: typeof x; + [i: number]: typeof y; +} +declare var d2: Derived2; +declare var r7: invalid; +declare var r8: invalid; + +/// [Errors] //// + +derivedClassOverridesPublicMembers.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(12,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(22,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(28,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(37,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(38,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(39,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(40,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(42,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(43,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(44,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(45,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(59,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(60,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + + +==== derivedClassOverridesPublicMembers.ts (14 errors) ==== + var x: { foo: string; } + var y: { foo: string; bar: string; } + + class Base { + a: typeof x; + b(a: typeof x) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesPublicMembers.ts:6:5: Add a return type to the method + get c() { return x; } + set c(v: typeof x) { } + d: (a: typeof x) => void; + + static r: typeof x; + static s(a: typeof x) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesPublicMembers.ts:12:12: Add a return type to the method + static get t() { return x; } + static set t(v: typeof x) { } + static u: (a: typeof x) => void; + + constructor(a: typeof x) { } + } + + class Derived extends Base { + a: typeof y; + b(a: typeof y) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesPublicMembers.ts:22:5: Add a return type to the method + get c() { return y; } + set c(v: typeof y) { } + d: (a: typeof y) => void; + + static r: typeof y; + static s(a: typeof y) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesPublicMembers.ts:28:12: Add a return type to the method + static get t() { return y; } + static set t(a: typeof y) { } + static u: (a: typeof y) => void; + + constructor(a: typeof y) { super(x) } + } + + var d: Derived = new Derived(y); + var r1 = d.a; + ~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesPublicMembers.ts:37:5: Add a type annotation to the variable r1 + var r2 = d.b(y); + ~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesPublicMembers.ts:38:5: Add a type annotation to the variable r2 + var r3 = d.c; + ~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesPublicMembers.ts:39:5: Add a type annotation to the variable r3 + var r3a = d.d; + ~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesPublicMembers.ts:40:5: Add a type annotation to the variable r3a + d.c = y; + var r4 = Derived.r; + ~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesPublicMembers.ts:42:5: Add a type annotation to the variable r4 + var r5 = Derived.s(y); + ~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesPublicMembers.ts:43:5: Add a type annotation to the variable r5 + var r6 = Derived.t; + ~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesPublicMembers.ts:44:5: Add a type annotation to the variable r6 + var r6a = Derived.u; + ~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesPublicMembers.ts:45:5: Add a type annotation to the variable r6a + Derived.t = y; + + class Base2 { + [i: string]: Object; + [i: number]: typeof x; + } + + class Derived2 extends Base2 { + [i: string]: typeof x; + [i: number]: typeof y; + } + + var d2: Derived2; + var r7 = d2['']; + ~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesPublicMembers.ts:59:5: Add a type annotation to the variable r7 + var r8 = d2[1]; + ~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesPublicMembers.ts:60:5: Add a type annotation to the variable r8 + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/duplicateVarsAcrossFileBoundaries.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/duplicateVarsAcrossFileBoundaries.d.ts index 9e7370dae1483..229b2c76b572c 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/duplicateVarsAcrossFileBoundaries.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/duplicateVarsAcrossFileBoundaries.d.ts @@ -66,8 +66,8 @@ duplicateVarsAcrossFileBoundaries_1.ts(1,5): error TS2403: Subsequent variable d duplicateVarsAcrossFileBoundaries_2.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. duplicateVarsAcrossFileBoundaries_2.ts(2,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'number'. duplicateVarsAcrossFileBoundaries_2.ts(3,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'boolean'. -duplicateVarsAcrossFileBoundaries_4.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -duplicateVarsAcrossFileBoundaries_5.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +duplicateVarsAcrossFileBoundaries_4.ts(3,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +duplicateVarsAcrossFileBoundaries_5.ts(3,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations ==== duplicateVarsAcrossFileBoundaries_0.ts (0 errors) ==== @@ -105,11 +105,13 @@ duplicateVarsAcrossFileBoundaries_5.ts(3,5): error TS9007: Declaration emit for import p = P; var q; ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 duplicateVarsAcrossFileBoundaries_4.ts:3:5: Add a type annotation to the variable q ==== duplicateVarsAcrossFileBoundaries_5.ts (1 errors) ==== module Q { } import q = Q; var p; ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 duplicateVarsAcrossFileBoundaries_5.ts:3:5: Add a type annotation to the variable p \ 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 index 7832a15244adb..4fc443de6f27d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/dynamicNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/dynamicNames.d.ts @@ -197,10 +197,10 @@ export declare type T3 = { /// [Errors] //// -main.ts(109,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -main.ts(110,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -main.ts(111,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -module.ts(3,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -208,7 +208,8 @@ module.ts(3,19): error TS9007: Declaration emit for this file requires type reso export const c1 = 1; export const s0 = Symbol(); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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; @@ -338,13 +339,16 @@ module.ts(3,19): error TS9007: Declaration emit for this file requires type reso // check element access types export const o1_c4 = o1[c4]; ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/escapedIdentifiers.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/escapedIdentifiers.d.ts index 8c8df917537b5..ea529d3bf5c07 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/escapedIdentifiers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/escapedIdentifiers.d.ts @@ -168,12 +168,12 @@ declare var constructorTestObject: invalid; /// [Errors] //// -escapedIdentifiers.ts(43,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -escapedIdentifiers.ts(45,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -escapedIdentifiers.ts(47,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -escapedIdentifiers.ts(49,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -escapedIdentifiers.ts(72,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -escapedIdentifiers.ts(85,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +escapedIdentifiers.ts(43,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +escapedIdentifiers.ts(45,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +escapedIdentifiers.ts(47,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +escapedIdentifiers.ts(49,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +escapedIdentifiers.ts(72,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +escapedIdentifiers.ts(85,29): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations ==== escapedIdentifiers.ts (6 errors) ==== @@ -221,19 +221,23 @@ escapedIdentifiers.ts(85,29): error TS9007: Declaration emit for this file requi var classType1Object1 = new classType1(); ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 escapedIdentifiers.ts:43:5: Add a type annotation to the variable classType1Object1 classType1Object1.foo1 = 2; var classType1Object2 = new classType\u0031(); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 escapedIdentifiers.ts:45:5: Add a type annotation to the variable classType1Object2 classType1Object2.foo1 = 2; var classType2Object1 = new classType2(); ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 escapedIdentifiers.ts:47:5: Add a type annotation to the variable classType2Object1 classType2Object1.foo2 = 2; var classType2Object2 = new classType\u0032(); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 escapedIdentifiers.ts:49:5: Add a type annotation to the variable classType2Object2 classType2Object2.foo2 = 2; // interfaces @@ -258,7 +262,8 @@ escapedIdentifiers.ts(85,29): error TS9007: Declaration emit for this file requi class testClass { public func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number) { ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 escapedIdentifiers.ts:72:12: Add a return type to the method arg\u0031 = 1; arg2 = 'string'; arg\u0033 = true; @@ -273,7 +278,8 @@ escapedIdentifiers.ts(85,29): error TS9007: Declaration emit for this file requi } var constructorTestObject = new constructorTestClass(1, 'string', true, 2); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 escapedIdentifiers.ts:85:5: Add a type annotation to the variable constructorTestObject constructorTestObject.arg\u0031 = 1; constructorTestObject.arg2 = 'string'; constructorTestObject.arg\u0033 = true; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts index cdf5631afd8b7..808a6b5ae2f20 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts @@ -33,12 +33,12 @@ declare enum E1 { /// [Errors] //// -forwardRefInEnum.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(4,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -forwardRefInEnum.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(5,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations forwardRefInEnum.ts(5,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -forwardRefInEnum.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -forwardRefInEnum.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(7,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations +forwardRefInEnum.ts(8,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations ==== forwardRefInEnum.ts (6 errors) ==== @@ -47,21 +47,21 @@ forwardRefInEnum.ts(8,5): error TS9007: Declaration emit for this file requires // forward reference to the element of the same enum X = Y, ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations ~ !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. X1 = E1["Y"], ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations ~~~~~~~ !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. // forward reference to the element of the same enum Y = E1.Z, ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations Y1 = E1["Z"] ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations } enum E1 { diff --git a/tests/baselines/reference/isolated-declarations/original/dte/generatedContextualTyping.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/generatedContextualTyping.d.ts index 52ac989ea1c2c..af9214048ab18 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/generatedContextualTyping.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/generatedContextualTyping.d.ts @@ -1286,65 +1286,65 @@ declare var x356: (n: Genric) => invalid; /// [Errors] //// -generatedContextualTyping.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(5,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(5,47): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(126,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(127,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(128,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(129,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(130,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(131,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(132,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(133,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(134,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(135,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(136,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(137,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(219,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(220,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(221,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(222,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(223,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(224,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(225,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(226,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(319,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(320,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(321,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(322,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(323,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(324,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(325,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(326,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(327,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(328,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(329,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(330,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(331,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(332,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(333,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(334,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(335,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(336,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(337,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(338,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(339,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(340,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(341,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(342,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(343,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(344,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(345,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(346,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(347,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(348,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(349,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(350,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(351,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(352,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(353,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(354,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(5,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(5,26): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(5,47): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(126,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(127,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(128,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(129,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(130,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(131,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(132,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(133,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(134,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(135,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(136,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(137,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(219,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(220,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(221,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(222,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(223,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(224,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(225,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(226,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(319,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(320,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(321,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(322,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(323,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(324,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(325,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(326,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(327,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(328,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(329,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(330,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(331,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(332,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(333,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(334,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(335,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(336,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(337,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(338,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(339,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(340,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(341,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(342,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(343,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(344,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(345,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(346,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(347,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(348,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(349,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(350,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(351,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(352,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(353,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(354,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations ==== generatedContextualTyping.ts (59 errors) ==== @@ -1354,11 +1354,14 @@ generatedContextualTyping.ts(354,12): error TS9507: Function must have an explic interface Genric { func(n: T[]); } var b = new Base(), d1 = new Derived1(), d2 = new Derived2(); ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:5:5: Add a type annotation to the variable b ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:5:21: Add a type annotation to the variable d1 ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:5:42: Add a type annotation to the variable d2 var x1: () => Base[] = () => [d1, d2]; var x2: () => Base[] = function() { return [d1, d2] }; var x3: () => Base[] = function named() { return [d1, d2] }; @@ -1481,40 +1484,52 @@ generatedContextualTyping.ts(354,12): error TS9507: Function must have an explic class x120 { constructor(private parm: Genric = { func: n => { return [d1, d2]; } }) { } } function x121(parm: () => Base[] = () => [d1, d2]) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:126:10: Add a return type to the function declaration function x122(parm: () => Base[] = function() { return [d1, d2] }) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:127:10: Add a return type to the function declaration function x123(parm: () => Base[] = function named() { return [d1, d2] }) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:128:10: Add a return type to the function declaration function x124(parm: { (): Base[]; } = () => [d1, d2]) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:129:10: Add a return type to the function declaration function x125(parm: { (): Base[]; } = function() { return [d1, d2] }) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:130:10: Add a return type to the function declaration function x126(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:131:10: Add a return type to the function declaration function x127(parm: Base[] = [d1, d2]) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:132:10: Add a return type to the function declaration function x128(parm: Array = [d1, d2]) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:133:10: Add a return type to the function declaration function x129(parm: { [n: number]: Base; } = [d1, d2]) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:134:10: Add a return type to the function declaration function x130(parm: {n: Base[]; } = { n: [d1, d2] }) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:135:10: Add a return type to the function declaration function x131(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:136:10: Add a return type to the function declaration function x132(parm: Genric = { func: n => { return [d1, d2]; } }) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:137:10: Add a return type to the function declaration function x133(): () => Base[] { return () => [d1, d2]; } function x134(): () => Base[] { return function() { return [d1, d2] }; } function x135(): () => Base[] { return function named() { return [d1, d2] }; } @@ -1598,28 +1613,36 @@ generatedContextualTyping.ts(354,12): error TS9507: Function must have an explic var x216 = >{ func: n => { return [d1, d2]; } }; var x217 = (<() => Base[]>undefined) || function() { return [d1, d2] }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:219:5: Add a type annotation to the variable x217 var x218 = (<() => Base[]>undefined) || function named() { return [d1, d2] }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:220:5: Add a type annotation to the variable x218 var x219 = (<{ (): Base[]; }>undefined) || function() { return [d1, d2] }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:221:5: Add a type annotation to the variable x219 var x220 = (<{ (): Base[]; }>undefined) || function named() { return [d1, d2] }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:222:5: Add a type annotation to the variable x220 var x221 = (undefined) || [d1, d2]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:223:5: Add a type annotation to the variable x221 var x222 = (>undefined) || [d1, d2]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:224:5: Add a type annotation to the variable x222 var x223 = (<{ [n: number]: Base; }>undefined) || [d1, d2]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:225:5: Add a type annotation to the variable x223 var x224 = (<{n: Base[]; } >undefined) || { n: [d1, d2] }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:226:5: Add a type annotation to the variable x224 var x225: () => Base[]; x225 = () => [d1, d2]; var x226: () => Base[]; x226 = function() { return [d1, d2] }; var x227: () => Base[]; x227 = function named() { return [d1, d2] }; @@ -1714,157 +1737,169 @@ generatedContextualTyping.ts(354,12): error TS9507: Function must have an explic var x320: Genric = true ? { func: n => { return [d1, d2]; } } : undefined; function x321(n: () => Base[]) { }; x321(() => [d1, d2]); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:319:10: Add a return type to the function declaration function x322(n: () => Base[]) { }; x322(function() { return [d1, d2] }); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:320:10: Add a return type to the function declaration function x323(n: () => Base[]) { }; x323(function named() { return [d1, d2] }); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:321:10: Add a return type to the function declaration function x324(n: { (): Base[]; }) { }; x324(() => [d1, d2]); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:322:10: Add a return type to the function declaration function x325(n: { (): Base[]; }) { }; x325(function() { return [d1, d2] }); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:323:10: Add a return type to the function declaration function x326(n: { (): Base[]; }) { }; x326(function named() { return [d1, d2] }); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:324:10: Add a return type to the function declaration function x327(n: Base[]) { }; x327([d1, d2]); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:325:10: Add a return type to the function declaration function x328(n: Array) { }; x328([d1, d2]); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:326:10: Add a return type to the function declaration function x329(n: { [n: number]: Base; }) { }; x329([d1, d2]); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:327:10: Add a return type to the function declaration function x330(n: {n: Base[]; } ) { }; x330({ n: [d1, d2] }); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:328:10: Add a return type to the function declaration function x331(n: (s: Base[]) => any) { }; x331(n => { var n: Base[]; return null; }); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:329:10: Add a return type to the function declaration function x332(n: Genric) { }; x332({ func: n => { return [d1, d2]; } }); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:330:10: Add a return type to the function declaration var x333 = (n: () => Base[]) => n; x333(() => [d1, d2]); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:331:5: Add a type annotation to the variable x333 -!!! related TS9603 generatedContextualTyping.ts:331:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:331:5: Add a type annotation to the variable x333 +!!! related TS9030 generatedContextualTyping.ts:331:12: Add a return type to the function expression var x334 = (n: () => Base[]) => n; x334(function() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:332:5: Add a type annotation to the variable x334 -!!! related TS9603 generatedContextualTyping.ts:332:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:332:5: Add a type annotation to the variable x334 +!!! related TS9030 generatedContextualTyping.ts:332:12: Add a return type to the function expression var x335 = (n: () => Base[]) => n; x335(function named() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:333:5: Add a type annotation to the variable x335 -!!! related TS9603 generatedContextualTyping.ts:333:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:333:5: Add a type annotation to the variable x335 +!!! related TS9030 generatedContextualTyping.ts:333:12: Add a return type to the function expression var x336 = (n: { (): Base[]; }) => n; x336(() => [d1, d2]); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:334:5: Add a type annotation to the variable x336 -!!! related TS9603 generatedContextualTyping.ts:334:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:334:5: Add a type annotation to the variable x336 +!!! related TS9030 generatedContextualTyping.ts:334:12: Add a return type to the function expression var x337 = (n: { (): Base[]; }) => n; x337(function() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:335:5: Add a type annotation to the variable x337 -!!! related TS9603 generatedContextualTyping.ts:335:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:335:5: Add a type annotation to the variable x337 +!!! related TS9030 generatedContextualTyping.ts:335:12: Add a return type to the function expression var x338 = (n: { (): Base[]; }) => n; x338(function named() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:336:5: Add a type annotation to the variable x338 -!!! related TS9603 generatedContextualTyping.ts:336:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:336:5: Add a type annotation to the variable x338 +!!! related TS9030 generatedContextualTyping.ts:336:12: Add a return type to the function expression var x339 = (n: Base[]) => n; x339([d1, d2]); ~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:337:5: Add a type annotation to the variable x339 -!!! related TS9603 generatedContextualTyping.ts:337:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:337:5: Add a type annotation to the variable x339 +!!! related TS9030 generatedContextualTyping.ts:337:12: Add a return type to the function expression var x340 = (n: Array) => n; x340([d1, d2]); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:338:5: Add a type annotation to the variable x340 -!!! related TS9603 generatedContextualTyping.ts:338:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:338:5: Add a type annotation to the variable x340 +!!! related TS9030 generatedContextualTyping.ts:338:12: Add a return type to the function expression var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:339:5: Add a type annotation to the variable x341 -!!! related TS9603 generatedContextualTyping.ts:339:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:339:5: Add a type annotation to the variable x341 +!!! related TS9030 generatedContextualTyping.ts:339:12: Add a return type to the function expression var x342 = (n: {n: Base[]; } ) => n; x342({ n: [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:340:5: Add a type annotation to the variable x342 -!!! related TS9603 generatedContextualTyping.ts:340:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:340:5: Add a type annotation to the variable x342 +!!! related TS9030 generatedContextualTyping.ts:340:12: Add a return type to the function expression var x343 = (n: (s: Base[]) => any) => n; x343(n => { var n: Base[]; return null; }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:341:5: Add a type annotation to the variable x343 -!!! related TS9603 generatedContextualTyping.ts:341:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:341:5: Add a type annotation to the variable x343 +!!! related TS9030 generatedContextualTyping.ts:341:12: Add a return type to the function expression var x344 = (n: Genric) => n; x344({ func: n => { return [d1, d2]; } }); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:342:5: Add a type annotation to the variable x344 -!!! related TS9603 generatedContextualTyping.ts:342:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:342:5: Add a type annotation to the variable x344 +!!! related TS9030 generatedContextualTyping.ts:342:12: Add a return type to the function expression var x345 = function(n: () => Base[]) { }; x345(() => [d1, d2]); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:343:5: Add a type annotation to the variable x345 -!!! related TS9603 generatedContextualTyping.ts:343:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:343:5: Add a type annotation to the variable x345 +!!! related TS9030 generatedContextualTyping.ts:343:12: Add a return type to the function expression var x346 = function(n: () => Base[]) { }; x346(function() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:344:5: Add a type annotation to the variable x346 -!!! related TS9603 generatedContextualTyping.ts:344:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:344:5: Add a type annotation to the variable x346 +!!! related TS9030 generatedContextualTyping.ts:344:12: Add a return type to the function expression var x347 = function(n: () => Base[]) { }; x347(function named() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:345:5: Add a type annotation to the variable x347 -!!! related TS9603 generatedContextualTyping.ts:345:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:345:5: Add a type annotation to the variable x347 +!!! related TS9030 generatedContextualTyping.ts:345:12: Add a return type to the function expression var x348 = function(n: { (): Base[]; }) { }; x348(() => [d1, d2]); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:346:5: Add a type annotation to the variable x348 -!!! related TS9603 generatedContextualTyping.ts:346:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:346:5: Add a type annotation to the variable x348 +!!! related TS9030 generatedContextualTyping.ts:346:12: Add a return type to the function expression var x349 = function(n: { (): Base[]; }) { }; x349(function() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:347:5: Add a type annotation to the variable x349 -!!! related TS9603 generatedContextualTyping.ts:347:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:347:5: Add a type annotation to the variable x349 +!!! related TS9030 generatedContextualTyping.ts:347:12: Add a return type to the function expression var x350 = function(n: { (): Base[]; }) { }; x350(function named() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:348:5: Add a type annotation to the variable x350 -!!! related TS9603 generatedContextualTyping.ts:348:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:348:5: Add a type annotation to the variable x350 +!!! related TS9030 generatedContextualTyping.ts:348:12: Add a return type to the function expression var x351 = function(n: Base[]) { }; x351([d1, d2]); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:349:5: Add a type annotation to the variable x351 -!!! related TS9603 generatedContextualTyping.ts:349:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:349:5: Add a type annotation to the variable x351 +!!! related TS9030 generatedContextualTyping.ts:349:12: Add a return type to the function expression var x352 = function(n: Array) { }; x352([d1, d2]); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:350:5: Add a type annotation to the variable x352 -!!! related TS9603 generatedContextualTyping.ts:350:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:350:5: Add a type annotation to the variable x352 +!!! related TS9030 generatedContextualTyping.ts:350:12: Add a return type to the function expression var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:351:5: Add a type annotation to the variable x353 -!!! related TS9603 generatedContextualTyping.ts:351:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:351:5: Add a type annotation to the variable x353 +!!! related TS9030 generatedContextualTyping.ts:351:12: Add a return type to the function expression var x354 = function(n: {n: Base[]; } ) { }; x354({ n: [d1, d2] }); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:352:5: Add a type annotation to the variable x354 -!!! related TS9603 generatedContextualTyping.ts:352:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:352:5: Add a type annotation to the variable x354 +!!! related TS9030 generatedContextualTyping.ts:352:12: Add a return type to the function expression var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; return null; }); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:353:5: Add a type annotation to the variable x355 -!!! related TS9603 generatedContextualTyping.ts:353:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:353:5: Add a type annotation to the variable x355 +!!! related TS9030 generatedContextualTyping.ts:353:12: Add a return type to the function expression var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:354:5: Add a type annotation to the variable x356 -!!! related TS9603 generatedContextualTyping.ts:354:12: Add a return type to the function expression \ No newline at end of file +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:354:5: Add a type annotation to the variable x356 +!!! related TS9030 generatedContextualTyping.ts:354:12: Add a return type to the function expression \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument.d.ts index b613fb70dcde1..e7d2ea2ec3085 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument.d.ts @@ -89,7 +89,7 @@ genericTypeReferenceWithoutTypeArgument.ts(11,18): error TS2314: Generic type 'C genericTypeReferenceWithoutTypeArgument.ts(12,11): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. genericTypeReferenceWithoutTypeArgument.ts(12,14): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(12,18): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(14,9): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +genericTypeReferenceWithoutTypeArgument.ts(14,9): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations genericTypeReferenceWithoutTypeArgument.ts(14,13): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(14,28): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(16,15): error TS2314: Generic type 'C' requires 1 type argument(s). @@ -103,9 +103,9 @@ genericTypeReferenceWithoutTypeArgument.ts(23,21): error TS2314: Generic type 'C genericTypeReferenceWithoutTypeArgument.ts(29,18): error TS2314: Generic type 'E' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(30,20): error TS2314: Generic type 'E' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(31,22): error TS2314: Generic type 'E' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(33,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument.ts(33,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations genericTypeReferenceWithoutTypeArgument.ts(33,22): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations genericTypeReferenceWithoutTypeArgument.ts(34,22): error TS2314: Generic type 'E' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(36,10): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(37,10): error TS2314: Generic type 'E' requires 1 type argument(s). @@ -141,9 +141,9 @@ genericTypeReferenceWithoutTypeArgument.ts(37,10): error TS2314: Generic type 'E var e = (x: C) => { var y: C; return y; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 genericTypeReferenceWithoutTypeArgument.ts:14:5: Add a type annotation to the variable e -!!! related TS9603 genericTypeReferenceWithoutTypeArgument.ts:14:9: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 genericTypeReferenceWithoutTypeArgument.ts:14:5: Add a type annotation to the variable e +!!! related TS9030 genericTypeReferenceWithoutTypeArgument.ts:14:9: Add a return type to the function expression ~ !!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ @@ -190,12 +190,14 @@ genericTypeReferenceWithoutTypeArgument.ts(37,10): error TS2314: Generic type 'E function h(x: T) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 genericTypeReferenceWithoutTypeArgument.ts:33:10: Add a return type to the function declaration ~ !!! error TS2314: Generic type 'C' requires 1 type argument(s). function i(x: T) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 genericTypeReferenceWithoutTypeArgument.ts:34:10: Add a return type to the function declaration ~~~ !!! error TS2314: Generic type 'E' requires 1 type argument(s). diff --git a/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument2.d.ts index e168f7f4daab8..d188e3e6f6b1b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument2.d.ts @@ -89,7 +89,7 @@ genericTypeReferenceWithoutTypeArgument2.ts(11,18): error TS2314: Generic type ' genericTypeReferenceWithoutTypeArgument2.ts(12,11): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. genericTypeReferenceWithoutTypeArgument2.ts(12,14): error TS2314: Generic type 'I' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(12,18): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(14,9): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +genericTypeReferenceWithoutTypeArgument2.ts(14,9): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations genericTypeReferenceWithoutTypeArgument2.ts(14,13): error TS2314: Generic type 'I' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(14,28): error TS2314: Generic type 'I' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(16,15): error TS2314: Generic type 'I' requires 1 type argument(s). @@ -105,9 +105,9 @@ genericTypeReferenceWithoutTypeArgument2.ts(29,18): error TS2708: Cannot use nam genericTypeReferenceWithoutTypeArgument2.ts(29,18): error TS4020: 'extends' clause of exported class 'D2' has or is using private name 'M'. genericTypeReferenceWithoutTypeArgument2.ts(30,24): error TS2314: Generic type 'E' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(31,24): error TS2694: Namespace 'M' has no exported member 'C'. -genericTypeReferenceWithoutTypeArgument2.ts(33,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument2.ts(33,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations genericTypeReferenceWithoutTypeArgument2.ts(33,22): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument2.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations genericTypeReferenceWithoutTypeArgument2.ts(34,22): error TS2314: Generic type 'E' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(36,10): error TS2304: Cannot find name 'C'. genericTypeReferenceWithoutTypeArgument2.ts(36,10): error TS4025: Exported variable 'j' has or is using private name 'C'. @@ -144,9 +144,9 @@ genericTypeReferenceWithoutTypeArgument2.ts(37,10): error TS2314: Generic type ' var e = (x: I) => { var y: I; return y; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 genericTypeReferenceWithoutTypeArgument2.ts:14:5: Add a type annotation to the variable e -!!! related TS9603 genericTypeReferenceWithoutTypeArgument2.ts:14:9: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 genericTypeReferenceWithoutTypeArgument2.ts:14:5: Add a type annotation to the variable e +!!! related TS9030 genericTypeReferenceWithoutTypeArgument2.ts:14:9: Add a return type to the function expression ~ !!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ @@ -197,12 +197,14 @@ genericTypeReferenceWithoutTypeArgument2.ts(37,10): error TS2314: Generic type ' function h(x: T) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 genericTypeReferenceWithoutTypeArgument2.ts:33:10: Add a return type to the function declaration ~ !!! error TS2314: Generic type 'I' requires 1 type argument(s). function i(x: T) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 genericTypeReferenceWithoutTypeArgument2.ts:34:10: Add a return type to the function declaration ~~~ !!! error TS2314: Generic type 'E' requires 1 type argument(s). diff --git a/tests/baselines/reference/isolated-declarations/original/dte/gettersAndSettersErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/gettersAndSettersErrors.d.ts index c5ea3b14106ee..e66f09df31b80 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/gettersAndSettersErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/gettersAndSettersErrors.d.ts @@ -24,7 +24,7 @@ class E { //// [gettersAndSettersErrors.d.ts] declare class C { - get Foo(): invalid; + get Foo(): string; set Foo(foo: string); Foo: number; get Goo(): string; @@ -37,7 +37,6 @@ declare class E { /// [Errors] //// -gettersAndSettersErrors.ts(2,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. gettersAndSettersErrors.ts(5,12): error TS2300: Duplicate identifier 'Foo'. gettersAndSettersErrors.ts(5,12): error TS2717: Subsequent property declarations must have the same type. Property 'Foo' must be of type 'string', but here has type 'number'. gettersAndSettersErrors.ts(6,16): error TS1054: A 'get' accessor cannot have parameters. @@ -46,11 +45,9 @@ gettersAndSettersErrors.ts(11,17): error TS2808: A get accessor must be at least gettersAndSettersErrors.ts(12,16): error TS2808: A get accessor must be at least as accessible as the setter -==== gettersAndSettersErrors.ts (7 errors) ==== +==== gettersAndSettersErrors.ts (6 errors) ==== class C { public get Foo() { return "foo";} // ok - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. public set Foo(foo:string) {} // ok public Foo = 0; // error - duplicate identifier Foo - confirmed diff --git a/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts index db4ed57f56993..039dd466de27a 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts @@ -1083,17 +1083,17 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(273,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(276,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(278,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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'. @@ -1102,28 +1102,28 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(289,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(332,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(332,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(333,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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. @@ -1148,17 +1148,17 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(416,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(419,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(421,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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'. @@ -1167,48 +1167,48 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(432,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(475,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(475,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(476,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(484,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(485,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(489,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(490,33): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(495,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(500,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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'. @@ -1217,40 +1217,40 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(511,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(518,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(519,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(524,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(531,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(536,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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'. @@ -1259,80 +1259,80 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(547,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(554,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(555,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(560,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(562,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(600,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(600,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(601,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(604,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(605,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(610,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(620,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(625,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(627,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(666,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(666,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(667,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(670,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(671,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(675,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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. @@ -1804,37 +1804,44 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient } export var eV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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'. @@ -1858,15 +1865,18 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! error TS1005: '{' expected. static tV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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'. @@ -1876,12 +1886,14 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. } @@ -1891,7 +1903,8 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient (): number; (p); ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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[]); @@ -1933,19 +1946,24 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient p5? (): void; p6(pa1): void; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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; @@ -2077,37 +2095,44 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient } export var eV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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'. @@ -2131,15 +2156,18 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! error TS1005: '{' expected. static tV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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'. @@ -2149,12 +2177,14 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. } @@ -2164,7 +2194,8 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient (): number; (p); ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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[]); @@ -2206,19 +2237,24 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient p5? (): void; p6(pa1): void; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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; @@ -2228,19 +2264,23 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient module M { }; export var eV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 { }; @@ -2248,10 +2288,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient } export declare var eaV; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 { @@ -2260,11 +2302,13 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! error TS1183: An implementation cannot be declared in ambient contexts. public pV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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() { } @@ -2274,19 +2318,22 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'pgF'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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) @@ -2310,17 +2357,20 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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) @@ -2330,22 +2380,26 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~ @@ -2355,10 +2409,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient module M { } export var eV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 { } @@ -2368,10 +2424,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient } export declare var eaV; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 { @@ -2380,11 +2438,13 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! error TS1183: An implementation cannot be declared in ambient contexts. public pV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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() { } @@ -2394,19 +2454,22 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'pgF'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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) @@ -2430,17 +2493,20 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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) @@ -2450,22 +2516,26 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~ @@ -2476,19 +2546,23 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! error TS1183: An implementation cannot be declared in ambient contexts. public pV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. } @@ -2537,27 +2611,34 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient p5? (): void; p6(pa1): void; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~ @@ -2567,10 +2648,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient module M { } export var eV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 { } @@ -2580,12 +2663,14 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~~~~~ !!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 { } @@ -2597,10 +2682,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient } export var eV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 { @@ -2609,19 +2696,23 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! error TS1183: An implementation cannot be declared in ambient contexts. public pV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. } @@ -2631,7 +2722,8 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient (): number; (p); ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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[]); @@ -2673,27 +2765,34 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient p5? (): void; p6(pa1): void; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~ @@ -2702,10 +2801,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient module M { } export var eV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 { } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/inKeywordAndIntersection.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/inKeywordAndIntersection.d.ts index aea64b9af3438..67555970d4dd3 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/inKeywordAndIntersection.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/inKeywordAndIntersection.d.ts @@ -61,7 +61,7 @@ declare const ClassOne: { /// [Errors] //// -inKeywordAndIntersection.ts(4,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +inKeywordAndIntersection.ts(4,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations ==== inKeywordAndIntersection.ts (1 errors) ==== @@ -70,7 +70,8 @@ inKeywordAndIntersection.ts(4,10): error TS9007: Declaration emit for this file function f10(obj: A & { x: string } | B) { ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 inKeywordAndIntersection.ts:4:10: Add a return type to the function declaration if (obj instanceof Object) { obj; // A & { x: string } | B } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts index fcd5e9d4fdc9f..26d83c0da13a3 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts @@ -372,20 +372,20 @@ declare var obj87: i8; /// [Errors] //// -intTypeCheck.ts(9,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -intTypeCheck.ts(10,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -intTypeCheck.ts(10,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -intTypeCheck.ts(16,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(9,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +intTypeCheck.ts(10,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +intTypeCheck.ts(10,15): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +intTypeCheck.ts(16,6): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations intTypeCheck.ts(35,6): error TS2304: Cannot find name 'p'. -intTypeCheck.ts(46,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -intTypeCheck.ts(52,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(46,14): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +intTypeCheck.ts(52,6): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations intTypeCheck.ts(71,6): error TS2304: Cannot find name 'p'. -intTypeCheck.ts(83,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -intTypeCheck.ts(84,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -intTypeCheck.ts(84,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(83,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +intTypeCheck.ts(84,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +intTypeCheck.ts(84,13): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations intTypeCheck.ts(85,5): error TS2386: Overload signatures must all be optional or required. -intTypeCheck.ts(85,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -intTypeCheck.ts(85,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(85,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +intTypeCheck.ts(85,15): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations intTypeCheck.ts(99,5): error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? Type 'Object' is missing the following properties from type 'i1': p, p3, p6 intTypeCheck.ts(100,20): error TS2351: This expression is not constructable. @@ -492,12 +492,15 @@ intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. p5? (): void; p6(pa1): void; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 intTypeCheck.ts:9:8: Add a type annotation to the parameter pa1 p7? (pa1, pa2): void; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 intTypeCheck.ts:10:10: Add a type annotation to the parameter pa1 ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 intTypeCheck.ts:10:15: Add a type annotation to the parameter pa2 } interface i2 { //Call Signatures @@ -505,7 +508,8 @@ intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. (): number; (p); ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 intTypeCheck.ts:16:6: Add a type annotation to the parameter p (p1: string); (p2?: string); (...p3: any[]); @@ -539,7 +543,8 @@ intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. class Base { foo() { } } ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 intTypeCheck.ts:46:14: Add a return type to the method interface i11 { //Call Signatures @@ -547,7 +552,8 @@ intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. (): number; (p); ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 intTypeCheck.ts:52:6: Add a type annotation to the parameter p (p1: string); (p2?: string); (...p3: any[]); @@ -582,19 +588,24 @@ intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. p5? (): void; p6(pa1): void; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 intTypeCheck.ts:83:8: Add a type annotation to the parameter pa1 p7(pa1, pa2): void; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 intTypeCheck.ts:84:8: Add a type annotation to the parameter pa1 ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 intTypeCheck.ts:84:13: Add a type annotation to the parameter pa2 p7? (pa1, pa2): void; ~~ !!! error TS2386: Overload signatures must all be optional or required. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 intTypeCheck.ts:85:10: Add a type annotation to the parameter pa1 ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 intTypeCheck.ts:85:15: Add a type annotation to the parameter pa2 } var anyVar: any; 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..a95818422f506 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsClasses.d.ts @@ -0,0 +1,204 @@ +//// [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 { + + [noAnnotationLiteralName](): void { } + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName]() { } + + [noParamAnnotationStringName](v): void { } + + get [noAnnotationStringName]() { return 0;} + + set [noParamAnnotationStringName](value) { } +} + + + +/// [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 { + [noAnnotationLiteralName](): void; + [noParamAnnotationLiteralName](v: string): void; + [noAnnotationStringName](): invalid; + [noParamAnnotationStringName](v: invalid): void; + get [noAnnotationStringName](): invalid; + set [noParamAnnotationStringName](value: invalid); +} +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(39,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(41,35): error TS7006: Parameter 'v' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(41,35): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(43,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(45,9): error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. +isolatedDeclarationErrorsClasses.ts(45,39): error TS7006: Parameter 'value' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(45,39): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + + +==== isolatedDeclarationErrorsClasses.ts (17 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 { + + [noAnnotationLiteralName](): void { } + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName]() { } + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 isolatedDeclarationErrorsClasses.ts:39:5: Add a return type to the method + + [noParamAnnotationStringName](v): void { } + ~ +!!! error TS7006: Parameter 'v' implicitly has an 'any' type. + ~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 isolatedDeclarationErrorsClasses.ts:41:35: Add a type annotation to the parameter v + + get [noAnnotationStringName]() { return 0;} + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 isolatedDeclarationErrorsClasses.ts:43: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:45:9: Add a type to parameter of the set accessor declaration + } + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/literalTypesAndTypeAssertions.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/literalTypesAndTypeAssertions.d.ts index f05d32428d4cf..0a01966f31548 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/literalTypesAndTypeAssertions.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/literalTypesAndTypeAssertions.d.ts @@ -35,10 +35,10 @@ declare let d: invalid; /// [Errors] //// -literalTypesAndTypeAssertions.ts(10,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -literalTypesAndTypeAssertions.ts(11,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -literalTypesAndTypeAssertions.ts(12,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -literalTypesAndTypeAssertions.ts(13,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +literalTypesAndTypeAssertions.ts(10,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations +literalTypesAndTypeAssertions.ts(11,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations +literalTypesAndTypeAssertions.ts(12,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations +literalTypesAndTypeAssertions.ts(13,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations ==== literalTypesAndTypeAssertions.ts (4 errors) ==== @@ -53,14 +53,14 @@ literalTypesAndTypeAssertions.ts(13,7): error TS9007: Declaration emit for this let { a = "foo" } = { a: "foo" }; ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations let { b = "foo" as "foo" } = { b: "bar" }; ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations let { c = "foo" } = { c: "bar" as "bar" }; ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations let { d = "foo" as "foo" } = { d: "bar" as "bar" }; ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts new file mode 100644 index 0000000000000..d6c6c13fe3eef --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts @@ -0,0 +1,203 @@ +//// [tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts] //// + +//// [modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts] +// All will be error from using ES6 features but only include ES5 library +// Using Es6 array +function f(x: number, y: number, z: number) { + return Array.from(arguments); +} + +f(1, 2, 3); // no error + +// Using ES6 collection +var m = new Map(); +m.clear(); +// Using ES6 iterable +m.keys(); + +// Using ES6 function +function Baz() { } +Baz.name; + +// Using ES6 math +Math.sign(1); + +// Using ES6 object +var o = { + a: 2, + [Symbol.hasInstance](value: any) { + return false; + } +}; +o.hasOwnProperty(Symbol.hasInstance); + +// Using Es6 proxy +var t = {} +var p = new Proxy(t, {}); + +// Using ES6 reflect +Reflect.isExtensible({}); + +// Using Es6 regexp +var reg = new RegExp("/s"); +reg.flags; + +// Using ES6 string +var str = "Hello world"; +str.includes("hello", 0); + +// Using ES6 symbol +var s = Symbol(); + +// Using ES6 wellknown-symbol +const o1 = { + [Symbol.hasInstance](value: any) { + return false; + } +} + +/// [Declarations] //// + + + +//// [modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts] +declare function f(x: number, y: number, z: number): invalid; +declare var m: invalid; +declare function Baz(): invalid; +declare var o: invalid; +declare var t: {}; +declare var p: invalid; +declare var reg: invalid; +declare var str: string; +declare var s: invalid; +declare const o1: invalid; + +/// [Errors] //// + +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(3,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(4,18): error TS2550: Property 'from' does not exist on type 'ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(10,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(10,13): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(16,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(17,5): error TS2339: Property 'name' does not exist on type '() => void'. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(20,6): error TS2550: Property 'sign' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(29,18): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,13): error TS2304: Cannot find name 'Proxy'. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(36,1): error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(39,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(40,5): error TS2550: Property 'flags' does not exist on type 'RegExp'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(44,5): error TS2550: Property 'includes' does not exist on type 'string'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + +==== modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts (20 errors) ==== + // All will be error from using ES6 features but only include ES5 library + // Using Es6 array + function f(x: number, y: number, z: number) { + ~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:3:10: Add a return type to the function declaration + return Array.from(arguments); + ~~~~ +!!! error TS2550: Property 'from' does not exist on type 'ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. + } + + f(1, 2, 3); // no error + + // Using ES6 collection + var m = new Map(); + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:10:5: Add a type annotation to the variable m + ~~~ +!!! error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. + m.clear(); + // Using ES6 iterable + m.keys(); + + // Using ES6 function + function Baz() { } + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:16:10: Add a return type to the function declaration + Baz.name; + ~~~~ +!!! error TS2339: Property 'name' does not exist on type '() => void'. + + // Using ES6 math + Math.sign(1); + ~~~~ +!!! error TS2550: Property 'sign' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. + + // Using ES6 object + var o = { + a: 2, + [Symbol.hasInstance](value: any) { + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:23:5: Add a type annotation to the variable o +!!! related TS9034 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:25:5: Add a return type to the method + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + return false; + } + }; + o.hasOwnProperty(Symbol.hasInstance); + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + // Using Es6 proxy + var t = {} + var p = new Proxy(t, {}); + ~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:33:5: Add a type annotation to the variable p + ~~~~~ +!!! error TS2304: Cannot find name 'Proxy'. + + // Using ES6 reflect + Reflect.isExtensible({}); + ~~~~~~~ +!!! error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. + + // Using Es6 regexp + var reg = new RegExp("/s"); + ~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:39:5: Add a type annotation to the variable reg + reg.flags; + ~~~~~ +!!! error TS2550: Property 'flags' does not exist on type 'RegExp'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. + + // Using ES6 string + var str = "Hello world"; + str.includes("hello", 0); + ~~~~~~~~ +!!! error TS2550: Property 'includes' does not exist on type 'string'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. + + // Using ES6 symbol + var s = Symbol(); + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:47:5: Add a type annotation to the variable s + + // Using ES6 wellknown-symbol + const o1 = { + [Symbol.hasInstance](value: any) { + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:50:7: Add a type annotation to the variable o1 +!!! related TS9034 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:51:5: Add a return type to the method + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + return false; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/namedTupleMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/namedTupleMembers.d.ts index 051ca82fa6f4e..982e9bc56c9a5 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/namedTupleMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/namedTupleMembers.d.ts @@ -112,10 +112,10 @@ export declare const argumentsOfG: invalid; /// [Errors] //// -namedTupleMembers.ts(41,62): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -namedTupleMembers.ts(48,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -namedTupleMembers.ts(76,44): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -namedTupleMembers.ts(77,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -161,7 +161,8 @@ namedTupleMembers.ts(77,29): error TS9007: Declaration emit for this file requir export function useState(initial: T): [value: T, setter: (T) => void] { ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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; } @@ -170,7 +171,8 @@ namedTupleMembers.ts(77,29): error TS9007: Declaration emit for this file requir export function readSegment([length, count]: [number, number]) {} ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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]; @@ -200,8 +202,10 @@ namedTupleMembers.ts(77,29): error TS9007: Declaration emit for this file requir export const argumentsOfGAsFirstArgument = f(getArgsForInjection(g)); // one tuple with captures arguments as first member ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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/noUncheckedIndexedAccess.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/noUncheckedIndexedAccess.d.ts index 4f2bd2e082111..c56df569d6385 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/noUncheckedIndexedAccess.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/noUncheckedIndexedAccess.d.ts @@ -234,7 +234,7 @@ noUncheckedIndexedAccess.ts(79,7): error TS2322: Type 'number | boolean | undefi noUncheckedIndexedAccess.ts(85,1): error TS2322: Type 'undefined' is not assignable to type 'string'. noUncheckedIndexedAccess.ts(90,7): error TS2322: Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. -noUncheckedIndexedAccess.ts(97,13): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +noUncheckedIndexedAccess.ts(97,13): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations noUncheckedIndexedAccess.ts(98,5): error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. Type 'undefined' is not assignable to type 'string'. noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'string | undefined' is not assignable to type 'string'. @@ -402,9 +402,9 @@ noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'string | undefined' is n const fn2 = (key: Key): string => myRecord2[key]; // Should OK const fn3 = (key: Key) => { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 noUncheckedIndexedAccess.ts:97:7: Add a type annotation to the variable fn3 -!!! related TS9603 noUncheckedIndexedAccess.ts:97:13: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 noUncheckedIndexedAccess.ts:97:7: Add a type annotation to the variable fn3 +!!! related TS9030 noUncheckedIndexedAccess.ts:97:13: Add a return type to the function expression myRecord2[key] = undefined; // Should error ~~~~~~~~~~~~~~ !!! error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. 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 index 6dee46aa4aa14..e21bdcbe952d0 100644 --- 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 @@ -154,12 +154,12 @@ error TS2468: Cannot find global value 'Promise'. /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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. @@ -175,17 +175,17 @@ error TS2468: Cannot find global value 'Promise'. /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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'. @@ -339,7 +339,8 @@ error TS2468: Cannot find global value 'Promise'. export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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')'? ~ @@ -351,7 +352,8 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: ',' expected. export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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')'? ~ @@ -400,13 +402,15 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: '{' expected. !!! related TS1007 /other4.ts:9:48: The parser expected to find a '}' to match the '{' token here. ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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); @@ -416,13 +420,15 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: '{' expected. !!! related TS1007 /other4.ts:10:48: The parser expected to find a '}' to match the '{' token here. ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. 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 index 6dee46aa4aa14..e21bdcbe952d0 100644 --- 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 @@ -154,12 +154,12 @@ error TS2468: Cannot find global value 'Promise'. /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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. @@ -175,17 +175,17 @@ error TS2468: Cannot find global value 'Promise'. /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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'. @@ -339,7 +339,8 @@ error TS2468: Cannot find global value 'Promise'. export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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')'? ~ @@ -351,7 +352,8 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: ',' expected. export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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')'? ~ @@ -400,13 +402,15 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: '{' expected. !!! related TS1007 /other4.ts:9:48: The parser expected to find a '}' to match the '{' token here. ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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); @@ -416,13 +420,15 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: '{' expected. !!! related TS1007 /other4.ts:10:48: The parser expected to find a '}' to match the '{' token here. ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. 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 index 0a3530d800564..78670aa6456cd 100644 --- 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 @@ -148,12 +148,12 @@ error TS2468: Cannot find global value 'Promise'. /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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. @@ -169,17 +169,17 @@ error TS2468: Cannot find global value 'Promise'. /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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`. @@ -328,7 +328,8 @@ error TS2468: Cannot find global value 'Promise'. export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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')'? ~ @@ -340,7 +341,8 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: ',' expected. export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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')'? ~ @@ -388,13 +390,15 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: '{' expected. !!! related TS1007 /other4.ts:9:48: The parser expected to find a '}' to match the '{' token here. ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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); @@ -404,13 +408,15 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: '{' expected. !!! related TS1007 /other4.ts:10:48: The parser expected to find a '}' to match the '{' token here. ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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) ==== 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 index 0a3530d800564..78670aa6456cd 100644 --- 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 @@ -148,12 +148,12 @@ error TS2468: Cannot find global value 'Promise'. /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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. @@ -169,17 +169,17 @@ error TS2468: Cannot find global value 'Promise'. /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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`. @@ -328,7 +328,8 @@ error TS2468: Cannot find global value 'Promise'. export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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')'? ~ @@ -340,7 +341,8 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: ',' expected. export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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')'? ~ @@ -388,13 +390,15 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: '{' expected. !!! related TS1007 /other4.ts:9:48: The parser expected to find a '}' to match the '{' token here. ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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); @@ -404,13 +408,15 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: '{' expected. !!! related TS1007 /other4.ts:10:48: The parser expected to find a '}' to match the '{' token here. ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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) ==== diff --git a/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralGettersAndSetters.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralGettersAndSetters.d.ts index 97c89c94535ee..4d63cabd89d1d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralGettersAndSetters.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralGettersAndSetters.d.ts @@ -157,59 +157,73 @@ declare var getParamType3: invalid; /// [Errors] //// -objectLiteralGettersAndSetters.ts(2,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(3,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(4,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(5,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(6,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(7,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(10,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(12,23): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(14,23): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(22,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(30,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(60,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(67,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(76,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(2,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(3,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(4,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(5,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(6,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(7,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(10,18): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(12,23): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(14,23): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(22,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(30,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(64,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(67,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(76,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ==== objectLiteralGettersAndSetters.ts (14 errors) ==== // Get and set accessor with the same name var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 objectLiteralGettersAndSetters.ts:2:50: Add a type to parameter of the set accessor declaration +!!! related TS9032 objectLiteralGettersAndSetters.ts:2:24: Add a return type to the get accessor declaration var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } }; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 objectLiteralGettersAndSetters.ts:3:50: Add a type to parameter of the set accessor declaration +!!! related TS9032 objectLiteralGettersAndSetters.ts:3:24: Add a return type to the get accessor declaration var sameName3a = { get 0x20() { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 objectLiteralGettersAndSetters.ts:4:51: Add a type to parameter of the set accessor declaration +!!! related TS9032 objectLiteralGettersAndSetters.ts:4:24: Add a return type to the get accessor declaration var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p: string; } }; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 objectLiteralGettersAndSetters.ts:5:49: Add a type to parameter of the set accessor declaration +!!! related TS9032 objectLiteralGettersAndSetters.ts:5:24: Add a return type to the get accessor declaration var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p: string; } }; ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 objectLiteralGettersAndSetters.ts:6:51: Add a type to parameter of the set accessor declaration +!!! related TS9032 objectLiteralGettersAndSetters.ts:6:24: Add a return type to the get accessor declaration var sameName6a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 objectLiteralGettersAndSetters.ts:7:50: Add a type to parameter of the set accessor declaration +!!! related TS9032 objectLiteralGettersAndSetters.ts:7:24: Add a return type to the get accessor declaration // PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} var callSig1 = { num(n: number) { return '' } }; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 objectLiteralGettersAndSetters.ts:10:5: Add a type annotation to the variable callSig1 +!!! related TS9034 objectLiteralGettersAndSetters.ts:10:18: Add a return type to the method var callSig1: { num: (n: number) => string; }; var callSig2 = { num: function (n: number) { return '' } }; ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 objectLiteralGettersAndSetters.ts:12:5: Add a type annotation to the variable callSig2 -!!! related TS9603 objectLiteralGettersAndSetters.ts:12:23: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 objectLiteralGettersAndSetters.ts:12:5: Add a type annotation to the variable callSig2 +!!! related TS9030 objectLiteralGettersAndSetters.ts:12:23: Add a return type to the function expression var callSig2: { num: (n: number) => string; }; var callSig3 = { num: (n: number) => '' }; ~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 objectLiteralGettersAndSetters.ts:14:5: Add a type annotation to the variable callSig3 -!!! related TS9603 objectLiteralGettersAndSetters.ts:14:23: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 objectLiteralGettersAndSetters.ts:14:5: Add a type annotation to the variable callSig3 +!!! related TS9030 objectLiteralGettersAndSetters.ts:14:23: Add a return type to the function expression var callSig3: { num: (n: number) => string; }; // Get accessor only, type of the property is the annotated return type of the get accessor @@ -219,7 +233,8 @@ objectLiteralGettersAndSetters.ts(76,9): error TS9007: Declaration emit for this // Get accessor only, type of the property is the inferred return type of the get accessor var getter2 = { get x() { return ''; } }; ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 objectLiteralGettersAndSetters.ts:22:21: Add a return type to the get accessor declaration var getter2: { readonly x: string; } // Set accessor only, type of the property is the param type of the set accessor @@ -228,8 +243,9 @@ objectLiteralGettersAndSetters.ts(76,9): error TS9007: Declaration emit for this // Set accessor only, type of the property is Any for an unannotated set accessor var setter2 = { set x(n) { } }; - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 objectLiteralGettersAndSetters.ts:30:21: Add a type to parameter of the set accessor declaration var setter2: { x: any }; var anyVar: any; @@ -260,17 +276,21 @@ objectLiteralGettersAndSetters.ts(76,9): error TS9007: Declaration emit for this // Type of unannotated set accessor parameter is the return type annotation of the get accessor var getParamType1 = { set n(x) { - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. var y = x; var y: string; }, get n() { return ''; } + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 objectLiteralGettersAndSetters.ts:60:9: Add a type to parameter of the set accessor declaration +!!! related TS9032 objectLiteralGettersAndSetters.ts:64:9: Add a return type to the get accessor declaration }; var getParamType2 = { get n() { return ''; }, ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 objectLiteralGettersAndSetters.ts:68:9: Add a type to parameter of the set accessor declaration +!!! related TS9032 objectLiteralGettersAndSetters.ts:67:9: Add a return type to the get accessor declaration set n(x) { var y = x; var y: string; @@ -281,7 +301,9 @@ objectLiteralGettersAndSetters.ts(76,9): error TS9007: Declaration emit for this var getParamType3 = { get n() { return ''; }, ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 objectLiteralGettersAndSetters.ts:77:9: Add a type to parameter of the set accessor declaration +!!! related TS9032 objectLiteralGettersAndSetters.ts:76:9: Add a return type to the get accessor declaration set n(x) { var y = x; var y: string; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/optionalChainingInference.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/optionalChainingInference.d.ts index 805d807c790c4..1ea36a48685ee 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/optionalChainingInference.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/optionalChainingInference.d.ts @@ -73,12 +73,12 @@ declare const v8: number; /// [Errors] //// -optionalChainingInference.ts(8,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -optionalChainingInference.ts(17,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -optionalChainingInference.ts(20,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -optionalChainingInference.ts(23,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -optionalChainingInference.ts(26,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -optionalChainingInference.ts(29,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +optionalChainingInference.ts(8,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations +optionalChainingInference.ts(17,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations +optionalChainingInference.ts(20,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations +optionalChainingInference.ts(23,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations +optionalChainingInference.ts(26,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations +optionalChainingInference.ts(29,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations ==== optionalChainingInference.ts (6 errors) ==== @@ -91,7 +91,9 @@ optionalChainingInference.ts(29,21): error TS9007: Declaration emit for this fil const b1 = { value: su?.length }; ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 optionalChainingInference.ts:8:7: Add a type annotation to the variable b1 +!!! related TS9035 optionalChainingInference.ts:8:21: Add a type assertion to this expression to make type type explicit const v1: number = unbox(b1); const b2 = { value: su?.length as number | undefined }; @@ -102,27 +104,37 @@ optionalChainingInference.ts(29,21): error TS9007: Declaration emit for this fil const b4 = { value: fnu?.() }; ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 optionalChainingInference.ts:17:7: Add a type annotation to the variable b4 +!!! related TS9035 optionalChainingInference.ts:17:21: Add a type assertion to this expression to make type type explicit const v4: number = unbox(b4); const b5 = { value: su?.["length"] }; ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 optionalChainingInference.ts:20:7: Add a type annotation to the variable b5 +!!! related TS9035 optionalChainingInference.ts:20:21: Add a type assertion to this expression to make type type explicit const v5: number = unbox(b5); const b6 = { value: osu?.prop.length }; ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 optionalChainingInference.ts:23:7: Add a type annotation to the variable b6 +!!! related TS9035 optionalChainingInference.ts:23:21: Add a type assertion to this expression to make type type explicit const v6: number = unbox(b6); const b7 = { value: osu?.prop["length"] }; ~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 optionalChainingInference.ts:26:7: Add a type annotation to the variable b7 +!!! related TS9035 optionalChainingInference.ts:26:21: Add a type assertion to this expression to make type type explicit const v7: number = unbox(b7); const b8 = { value: ofnu?.prop() }; ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 optionalChainingInference.ts:29:7: Add a type annotation to the variable b8 +!!! related TS9035 optionalChainingInference.ts:29:21: Add a type assertion to this expression to make type type explicit const v8: number = unbox(b8); \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts index 721815effd692..98c514c93d112 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts @@ -111,7 +111,7 @@ interface I3 { /// [Errors] //// overloadsWithComputedNames.ts(4,5): error TS2389: Function implementation name must be '["B"]'. -overloadsWithComputedNames.ts(8,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +overloadsWithComputedNames.ts(8,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations overloadsWithComputedNames.ts(14,5): error TS2391: Function implementation is missing or not immediately following the declaration. overloadsWithComputedNames.ts(16,5): error TS2389: Function implementation name must be '["bar"]'. overloadsWithComputedNames.ts(28,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. @@ -134,7 +134,8 @@ overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is mi } let p = new Person(); ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 overloadsWithComputedNames.ts:8:5: Add a type annotation to the variable p p.A(0) p.B(0) diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNonNullableTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNonNullableTypes.d.ts index 76cc602703227..b1a9470a08f43 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNonNullableTypes.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNonNullableTypes.d.ts @@ -47,13 +47,13 @@ declare const d: !number; parseInvalidNonNullableTypes.ts(1,30): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? parseInvalidNonNullableTypes.ts(5,30): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(9,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNonNullableTypes.ts(9,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations parseInvalidNonNullableTypes.ts(9,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(10,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNonNullableTypes.ts(10,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations parseInvalidNonNullableTypes.ts(10,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? -parseInvalidNonNullableTypes.ts(12,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNonNullableTypes.ts(12,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations parseInvalidNonNullableTypes.ts(12,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(13,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNonNullableTypes.ts(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations parseInvalidNonNullableTypes.ts(13,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? parseInvalidNonNullableTypes.ts(15,16): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. parseInvalidNonNullableTypes.ts(15,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? @@ -80,23 +80,27 @@ parseInvalidNonNullableTypes.ts(22,10): error TS17020: '!' at the start of a typ function f3(a: string!) {} ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parseInvalidNonNullableTypes.ts:9:10: Add a return type to the function declaration ~~~~~~~ !!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? function f4(a: number!) {} ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parseInvalidNonNullableTypes.ts:10:10: Add a return type to the function declaration ~~~~~~~ !!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? function f5(a: !string) {} ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parseInvalidNonNullableTypes.ts:12:10: Add a return type to the function declaration ~~~~~~~ !!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? function f6(a: !number) {} ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parseInvalidNonNullableTypes.ts:13:10: Add a return type to the function declaration ~~~~~~~ !!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNullableTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNullableTypes.d.ts index b20d98019af3d..6f87de3cc01cb 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNullableTypes.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNullableTypes.d.ts @@ -53,13 +53,13 @@ parseInvalidNullableTypes.ts(1,30): error TS2677: A type predicate's type must b Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. parseInvalidNullableTypes.ts(1,30): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? -parseInvalidNullableTypes.ts(5,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNullableTypes.ts(5,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations parseInvalidNullableTypes.ts(5,16): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string | undefined'? -parseInvalidNullableTypes.ts(6,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNullableTypes.ts(6,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations parseInvalidNullableTypes.ts(6,16): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? -parseInvalidNullableTypes.ts(8,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNullableTypes.ts(8,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations parseInvalidNullableTypes.ts(8,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? -parseInvalidNullableTypes.ts(9,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNullableTypes.ts(9,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations parseInvalidNullableTypes.ts(9,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? parseInvalidNullableTypes.ts(11,25): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? parseInvalidNullableTypes.ts(12,5): error TS2322: Type 'boolean' is not assignable to type 'string'. @@ -86,23 +86,27 @@ parseInvalidNullableTypes.ts(24,8): error TS17019: '?' at the end of a type is n function f2(a: string?) {} ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parseInvalidNullableTypes.ts:5:10: Add a return type to the function declaration ~~~~~~~ !!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string | undefined'? function f3(a: number?) {} ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parseInvalidNullableTypes.ts:6:10: Add a return type to the function declaration ~~~~~~~ !!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? function f4(a: ?string) {} ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parseInvalidNullableTypes.ts:8:10: Add a return type to the function declaration ~~~~~~~ !!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? function f5(a: ?number) {} ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parseInvalidNullableTypes.ts:9:10: Add a return type to the function declaration ~~~~~~~ !!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseTypes.d.ts index 2535d1a2533a8..7834c12bf1e9d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parseTypes.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parseTypes.d.ts @@ -34,8 +34,8 @@ declare function g(s: string): invalid; /// [Errors] //// -parseTypes.ts(5,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parseTypes.ts(6,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseTypes.ts(5,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parseTypes.ts(6,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations parseTypes.ts(8,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. Target signature provides too few arguments. Expected 1 or more, but got 0. parseTypes.ts(9,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. @@ -53,10 +53,12 @@ parseTypes.ts(11,1): error TS2322: Type '(s: string) => void' is not assignable var w = <{[x:number]: number; }>null function f() { return 3 }; ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parseTypes.ts:5:10: Add a return type to the function declaration function g(s: string) { true }; ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parseTypes.ts:6:10: Add a return type to the function declaration y=f; y=g; ~ diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName11.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName11.d.ts new file mode 100644 index 0000000000000..d7ad1130f561f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName11.d.ts @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts] //// + +//// [parserComputedPropertyName11.ts] +class C { + [e](); +} + +/// [Declarations] //// + + + +//// [parserComputedPropertyName11.d.ts] +declare class C { + [e](): invalid; +} + +/// [Errors] //// + +parserComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. +parserComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. +parserComputedPropertyName11.ts(2,5): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + + +==== parserComputedPropertyName11.ts (4 errors) ==== + class C { + [e](); + ~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 parserComputedPropertyName11.ts:2:4: Add a return type to the method + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName12.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName12.d.ts new file mode 100644 index 0000000000000..965a45368de20 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName12.d.ts @@ -0,0 +1,34 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts] //// + +//// [parserComputedPropertyName12.ts] +class C { + [e]() { } +} + +/// [Declarations] //// + + + +//// [parserComputedPropertyName12.d.ts] +declare class C { + [e](): invalid; +} + +/// [Errors] //// + +parserComputedPropertyName12.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName12.ts(2,5): error TS2304: Cannot find name 'e'. +parserComputedPropertyName12.ts(2,5): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + + +==== parserComputedPropertyName12.ts (3 errors) ==== + class C { + [e]() { } + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 parserComputedPropertyName12.ts:2:4: Add a return type to the method + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName17.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName17.d.ts new file mode 100644 index 0000000000000..8a282e14fc214 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName17.d.ts @@ -0,0 +1,25 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts] //// + +//// [parserComputedPropertyName17.ts] +var v = { set [e](v) { } } + +/// [Declarations] //// + + + +//// [parserComputedPropertyName17.d.ts] +declare var v: invalid; + +/// [Errors] //// + +parserComputedPropertyName17.ts(1,16): error TS2304: Cannot find name 'e'. +parserComputedPropertyName17.ts(1,19): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + + +==== parserComputedPropertyName17.ts (2 errors) ==== + var v = { set [e](v) { } } + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 parserComputedPropertyName17.ts:1:15: Add a type to parameter of the set accessor declaration \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts index a865ef5783dae..1d0c68d3fbebf 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts @@ -18,7 +18,7 @@ declare class C { parserComputedPropertyName24.ts(2,10): error TS2304: Cannot find name 'e'. parserComputedPropertyName24.ts(2,10): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -parserComputedPropertyName24.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName24.ts(2,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ==== parserComputedPropertyName24.ts (3 errors) ==== @@ -29,5 +29,6 @@ parserComputedPropertyName24.ts(2,13): error TS9007: Declaration emit for this f ~ !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 parserComputedPropertyName24.ts:2:9: Add a type to parameter of the set accessor declaration } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts index 7b6219fda8e56..1e22bbda64a1e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts @@ -21,7 +21,7 @@ declare class C { parserComputedPropertyName25.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName25.ts(3,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName25.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -parserComputedPropertyName25.ts(3,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName25.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. @@ -38,7 +38,8 @@ parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. ~ [e2] = 1 ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +!!! related TS9029 parserComputedPropertyName25.ts:3:5: Add a type annotation to the property [e] ~~ !!! error TS2304: Cannot find name 'e2'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts index 5cb2ff7322f92..a5516a4844715 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts @@ -23,7 +23,7 @@ parserComputedPropertyName27.ts(3,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName27.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName27.ts(4,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName27.ts(4,9): error TS1005: ';' expected. -parserComputedPropertyName27.ts(4,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName27.ts(4,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ==== parserComputedPropertyName27.ts (5 errors) ==== @@ -40,5 +40,6 @@ parserComputedPropertyName27.ts(4,11): error TS9007: Declaration emit for this f ~ !!! error TS1005: ';' expected. ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +!!! related TS9029 parserComputedPropertyName27.ts:4:11: Add a type annotation to the property number } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts index bc7e8b609c3c2..f2e6e4e1cb2f3 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts @@ -23,7 +23,7 @@ parserComputedPropertyName29.ts(3,5): error TS1166: A computed property name in parserComputedPropertyName29.ts(3,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName29.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName29.ts(3,11): error TS2304: Cannot find name 'id'. -parserComputedPropertyName29.ts(3,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName29.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName29.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName29.ts(4,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName29.ts(4,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. @@ -42,7 +42,8 @@ parserComputedPropertyName29.ts(4,6): error TS4031: Public property '[e2]' of ex ~~ !!! error TS2304: Cannot find name 'id'. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +!!! related TS9029 parserComputedPropertyName29.ts:3:5: Add a type annotation to the property [e] [e2]: number ~~~~ !!! 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/dte/parserComputedPropertyName3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName3.d.ts new file mode 100644 index 0000000000000..ded9e00505590 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName3.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts] //// + +//// [parserComputedPropertyName3.ts] +var v = { [e]() { } }; + +/// [Declarations] //// + + + +//// [parserComputedPropertyName3.d.ts] +declare var v: invalid; + +/// [Errors] //// + +parserComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName3.ts(1,12): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName3.ts (2 errors) ==== + var v = { [e]() { } }; + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 parserComputedPropertyName3.ts:1:5: Add a type annotation to the variable v +!!! related TS9034 parserComputedPropertyName3.ts:1:11: Add a return type to the method + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts index ea41ffbf55077..20cc5df6e9f93 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts @@ -20,7 +20,7 @@ declare class C { parserComputedPropertyName33.ts(3,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName33.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -parserComputedPropertyName33.ts(3,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName33.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName33.ts(4,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName33.ts(4,12): error TS1005: ';' expected. parserComputedPropertyName33.ts(5,1): error TS1128: Declaration or statement expected. @@ -37,7 +37,8 @@ parserComputedPropertyName33.ts(5,1): error TS1128: Declaration or statement exp ~ [e2]() { } ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +!!! related TS9029 parserComputedPropertyName33.ts:3:5: Add a type annotation to the property [e] ~~ !!! error TS2304: Cannot find name 'e2'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName38.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName38.d.ts new file mode 100644 index 0000000000000..1833bb4a85f99 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName38.d.ts @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts] //// + +//// [parserComputedPropertyName38.ts] +class C { + [public]() { } +} + +/// [Declarations] //// + + + +//// [parserComputedPropertyName38.d.ts] +declare class C { + [public](): invalid; +} + +/// [Errors] //// + +parserComputedPropertyName38.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName38.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. +parserComputedPropertyName38.ts(2,6): error TS2304: Cannot find name 'public'. +parserComputedPropertyName38.ts(2,6): error TS4100: Public method '[public]' of exported class has or is using private name 'public'. + + +==== parserComputedPropertyName38.ts (4 errors) ==== + class C { + [public]() { } + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 parserComputedPropertyName38.ts:2:5: Add a return type to the method + ~~~~~~ +!!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. + ~~~~~~ +!!! error TS2304: Cannot find name 'public'. + ~~~~~~ +!!! error TS4100: Public method '[public]' of exported class has or is using private name 'public'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName39.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName39.d.ts new file mode 100644 index 0000000000000..9e7e1801fa487 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName39.d.ts @@ -0,0 +1,39 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts] //// + +//// [parserComputedPropertyName39.ts] +"use strict"; +class C { + [public]() { } +} + +/// [Declarations] //// + + + +//// [parserComputedPropertyName39.d.ts] +declare class C { + [public](): invalid; +} + +/// [Errors] //// + +parserComputedPropertyName39.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName39.ts(3,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. +parserComputedPropertyName39.ts(3,6): error TS2304: Cannot find name 'public'. +parserComputedPropertyName39.ts(3,6): error TS4100: Public method '[public]' of exported class has or is using private name 'public'. + + +==== parserComputedPropertyName39.ts (4 errors) ==== + "use strict"; + class C { + [public]() { } + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 parserComputedPropertyName39.ts:3:5: Add a return type to the method + ~~~~~~ +!!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. + ~~~~~~ +!!! error TS2304: Cannot find name 'public'. + ~~~~~~ +!!! error TS4100: Public method '[public]' of exported class has or is using private name 'public'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName4.d.ts new file mode 100644 index 0000000000000..9f8b6dd170972 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName4.d.ts @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts] //// + +//// [parserComputedPropertyName4.ts] +var v = { get [e]() { } }; + +/// [Declarations] //// + + + +//// [parserComputedPropertyName4.d.ts] +declare var v: invalid; + +/// [Errors] //// + +parserComputedPropertyName4.ts(1,15): error TS2378: A 'get' accessor must return a value. +parserComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName4.ts (3 errors) ==== + var v = { get [e]() { } }; + ~~~ +!!! error TS2378: A 'get' accessor must return a value. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 parserComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName5.d.ts new file mode 100644 index 0000000000000..f2a2260818bca --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName5.d.ts @@ -0,0 +1,31 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName5.ts] //// + +//// [parserComputedPropertyName5.ts] +var v = { public get [e]() { } }; + +/// [Declarations] //// + + + +//// [parserComputedPropertyName5.d.ts] +declare var v: invalid; + +/// [Errors] //// + +parserComputedPropertyName5.ts(1,11): error TS1042: 'public' modifier cannot be used here. +parserComputedPropertyName5.ts(1,22): error TS2378: A 'get' accessor must return a value. +parserComputedPropertyName5.ts(1,22): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName5.ts(1,23): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName5.ts (4 errors) ==== + var v = { public get [e]() { } }; + ~~~~~~ +!!! error TS1042: 'public' modifier cannot be used here. + ~~~ +!!! error TS2378: A 'get' accessor must return a value. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 parserComputedPropertyName5.ts:1:22: Add a return type to the get accessor declaration + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts index 9babd98fbfabe..121293185219e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts @@ -13,7 +13,7 @@ declare var v: invalid; /// [Errors] //// parserComputedPropertyName6.ts(1,12): error TS2304: Cannot find name 'e'. -parserComputedPropertyName6.ts(1,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName6.ts(1,19): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName6.ts(1,20): error TS2304: Cannot find name 'e'. parserComputedPropertyName6.ts(1,24): error TS2304: Cannot find name 'e'. @@ -23,7 +23,8 @@ parserComputedPropertyName6.ts(1,24): error TS2304: Cannot find name 'e'. ~ !!! error TS2304: Cannot find name 'e'. ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 parserComputedPropertyName6.ts:1:5: Add a type annotation to the variable v ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName7.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName7.d.ts new file mode 100644 index 0000000000000..23f8cf6d7957a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName7.d.ts @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts] //// + +//// [parserComputedPropertyName7.ts] +class C { + [e] +} + +/// [Declarations] //// + + + +//// [parserComputedPropertyName7.d.ts] +declare class C { + [e]: invalid; +} + +/// [Errors] //// + +parserComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +parserComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. +parserComputedPropertyName7.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +==== parserComputedPropertyName7.ts (4 errors) ==== + class C { + [e] + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +!!! related TS9029 parserComputedPropertyName7.ts:2:4: Add a type annotation to the property [e] + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName8.d.ts new file mode 100644 index 0000000000000..7dfbdeb02492b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName8.d.ts @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts] //// + +//// [parserComputedPropertyName8.ts] +class C { + public [e] +} + +/// [Declarations] //// + + + +//// [parserComputedPropertyName8.d.ts] +declare class C { + [e]: invalid; +} + +/// [Errors] //// + +parserComputedPropertyName8.ts(2,11): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName8.ts(2,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +parserComputedPropertyName8.ts(2,12): error TS2304: Cannot find name 'e'. +parserComputedPropertyName8.ts(2,12): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +==== parserComputedPropertyName8.ts (4 errors) ==== + class C { + public [e] + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +!!! related TS9029 parserComputedPropertyName8.ts:2:11: Add a type annotation to the property [e] + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName11.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName11.d.ts new file mode 100644 index 0000000000000..fd9a7905fe969 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName11.d.ts @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts] //// + +//// [parserES5ComputedPropertyName11.ts] +class C { + [e](); +} + +/// [Declarations] //// + + + +//// [parserES5ComputedPropertyName11.d.ts] +declare class C { + [e](): invalid; +} + +/// [Errors] //// + +parserES5ComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. +parserES5ComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserES5ComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. +parserES5ComputedPropertyName11.ts(2,5): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + + +==== parserES5ComputedPropertyName11.ts (4 errors) ==== + class C { + [e](); + ~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 parserES5ComputedPropertyName11.ts:2:4: Add a return type to the method + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName3.d.ts new file mode 100644 index 0000000000000..f26de7ec5564a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName3.d.ts @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts] //// + +//// [parserES5ComputedPropertyName3.ts] +var v = { [e]() { } }; + +/// [Declarations] //// + + + +//// [parserES5ComputedPropertyName3.d.ts] +declare var v: invalid; + +/// [Errors] //// + +parserES5ComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserES5ComputedPropertyName3.ts(1,12): error TS2304: Cannot find name 'e'. + + +==== parserES5ComputedPropertyName3.ts (2 errors) ==== + var v = { [e]() { } }; + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 parserES5ComputedPropertyName3.ts:1:5: Add a type annotation to the variable v +!!! related TS9034 parserES5ComputedPropertyName3.ts:1:11: Add a return type to the method + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName4.d.ts new file mode 100644 index 0000000000000..2047025384fba --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName4.d.ts @@ -0,0 +1,28 @@ +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts] //// + +//// [parserES5ComputedPropertyName4.ts] +var v = { get [e]() { } }; + +/// [Declarations] //// + + + +//// [parserES5ComputedPropertyName4.d.ts] +declare var v: invalid; + +/// [Errors] //// + +parserES5ComputedPropertyName4.ts(1,15): error TS2378: A 'get' accessor must return a value. +parserES5ComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +parserES5ComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. + + +==== parserES5ComputedPropertyName4.ts (3 errors) ==== + var v = { get [e]() { } }; + ~~~ +!!! error TS2378: A 'get' accessor must return a value. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 parserES5ComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName7.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName7.d.ts new file mode 100644 index 0000000000000..4af8dc6385dc8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName7.d.ts @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts] //// + +//// [parserES5ComputedPropertyName7.ts] +class C { + [e] +} + +/// [Declarations] //// + + + +//// [parserES5ComputedPropertyName7.d.ts] +declare class C { + [e]: invalid; +} + +/// [Errors] //// + +parserES5ComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserES5ComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +parserES5ComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. +parserES5ComputedPropertyName7.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +==== parserES5ComputedPropertyName7.ts (4 errors) ==== + class C { + [e] + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +!!! related TS9029 parserES5ComputedPropertyName7.ts:2:4: Add a type annotation to the property [e] + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts index 266fdfaabb347..dc5ad0a8a3eee 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts @@ -15,7 +15,7 @@ declare function eval(): invalid; /// [Errors] //// parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. -parserStrictMode8.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserStrictMode8.ts(2,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations ==== parserStrictMode8.ts (2 errors) ==== @@ -24,5 +24,6 @@ parserStrictMode8.ts(2,10): error TS9007: Declaration emit for this file require ~~~~ !!! error TS1100: Invalid use of 'eval' in strict mode. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parserStrictMode8.ts:2:10: Add a return type to the function declaration } \ 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 index 1a34d481960a0..1983adcf67284 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/renamingDestructuredPropertyInFunctionType.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/renamingDestructuredPropertyInFunctionType.d.ts @@ -135,55 +135,55 @@ renamingDestructuredPropertyInFunctionType.ts(5,17): error TS2842: 'string' is a 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(10,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(20,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(22,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(26,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(48,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -renamingDestructuredPropertyInFunctionType.ts(49,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(59,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -renamingDestructuredPropertyInFunctionType.ts(60,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -renamingDestructuredPropertyInFunctionType.ts(61,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(61,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(62,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(63,14): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -205,19 +205,23 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 @@ -234,31 +238,37 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. @@ -267,19 +277,22 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. @@ -288,7 +301,8 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. @@ -297,7 +311,8 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration method1(arg: number): any; // OK method2({ a: string }): any; // Error ~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. @@ -305,7 +320,8 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration (arg: number): any; // OK ({ a: string }): any; // Error ~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. @@ -313,7 +329,8 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration new (arg: number): any; // OK new ({ a: string }): any; // Error ~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. @@ -322,17 +339,18 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration // Below are OK but renaming should be removed from declaration emit function f1({ a: string }: O) { } ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 renamingDestructuredPropertyInFunctionType.ts:48:7: Add a type annotation to the variable f2 -!!! related TS9603 renamingDestructuredPropertyInFunctionType.ts:48:12: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 renamingDestructuredPropertyInFunctionType.ts:49:7: Add a type annotation to the variable f3 -!!! related TS9603 renamingDestructuredPropertyInFunctionType.ts:49:12: Add a return type to the function expression +!!! 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'. @@ -342,7 +360,9 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration const obj1 = { method({ a: string }: O) { } ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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; } @@ -351,32 +371,37 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration }; function f6({ a: string = "" }: O) { } ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 renamingDestructuredPropertyInFunctionType.ts:59:7: Add a type annotation to the variable f7 -!!! related TS9603 renamingDestructuredPropertyInFunctionType.ts:59:12: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 renamingDestructuredPropertyInFunctionType.ts:60:7: Add a type annotation to the variable f8 -!!! related TS9603 renamingDestructuredPropertyInFunctionType.ts:60:12: Add a return type to the function expression +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 renamingDestructuredPropertyInFunctionType.ts:63:7: Add a type annotation to the variable f11 -!!! related TS9603 renamingDestructuredPropertyInFunctionType.ts:63:14: Add a return type to the function expression +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts index 0fd3fcf5b7397..faf6e1c3736c3 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts @@ -454,16 +454,16 @@ staticPropertyNameConflicts.ts(228,16): error TS2699: Static property 'name' con staticPropertyNameConflicts.ts(234,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticName'. staticPropertyNameConflicts.ts(240,16): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. staticPropertyNameConflicts.ts(246,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticNameFn'. -staticPropertyNameConflicts.ts(246,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticPropertyNameConflicts.ts(247,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(246,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(247,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations staticPropertyNameConflicts.ts(252,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(253,16): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. staticPropertyNameConflicts.ts(259,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLength'. staticPropertyNameConflicts.ts(264,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(265,16): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. staticPropertyNameConflicts.ts(271,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLengthFn'. -staticPropertyNameConflicts.ts(271,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticPropertyNameConflicts.ts(272,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(271,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. @@ -472,24 +472,24 @@ staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prot staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. staticPropertyNameConflicts.ts(296,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. -staticPropertyNameConflicts.ts(296,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticPropertyNameConflicts.ts(297,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(296,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(297,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations staticPropertyNameConflicts.ts(302,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(303,16): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. staticPropertyNameConflicts.ts(309,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCaller'. staticPropertyNameConflicts.ts(314,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(315,16): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. staticPropertyNameConflicts.ts(321,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCallerFn'. -staticPropertyNameConflicts.ts(321,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticPropertyNameConflicts.ts(322,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(321,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(322,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations staticPropertyNameConflicts.ts(327,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(328,16): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. staticPropertyNameConflicts.ts(334,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArguments'. staticPropertyNameConflicts.ts(339,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(340,16): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. staticPropertyNameConflicts.ts(346,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArgumentsFn'. -staticPropertyNameConflicts.ts(346,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ==== staticPropertyNameConflicts.ts (84 errors) ==== @@ -836,10 +836,12 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticNameFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:246:12: Add a return type to the method [FunctionPropertyNames.name]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:247:5: Add a return type to the method } // length @@ -877,10 +879,12 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLengthFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:271:12: Add a return type to the method [FunctionPropertyNames.length]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:272:5: Add a return type to the method } // prototype @@ -922,10 +926,12 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:296:12: Add a return type to the method [FunctionPropertyNames.prototype]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:297:5: Add a return type to the method } // caller @@ -963,10 +969,12 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCallerFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:321:12: Add a return type to the method [FunctionPropertyNames.caller]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:322:5: Add a return type to the method } // arguments @@ -1004,8 +1012,10 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArgumentsFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:346:12: Add a return type to the method [FunctionPropertyNames.arguments]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:347:5: Add a return type to the method } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts index 58b592d2a454d..c0144415230f0 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts @@ -418,12 +418,12 @@ staticPropertyNameConflicts.ts(171,12): error TS2300: Duplicate identifier 'prot staticPropertyNameConflicts.ts(171,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous'. staticPropertyNameConflicts.ts(176,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. staticPropertyNameConflicts.ts(176,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous2'. -staticPropertyNameConflicts.ts(246,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticPropertyNameConflicts.ts(247,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(246,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(247,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations staticPropertyNameConflicts.ts(252,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(264,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(271,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticPropertyNameConflicts.ts(272,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(271,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. @@ -432,16 +432,16 @@ staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prot staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. staticPropertyNameConflicts.ts(296,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. -staticPropertyNameConflicts.ts(296,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticPropertyNameConflicts.ts(297,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(296,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(297,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations staticPropertyNameConflicts.ts(302,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(314,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(321,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticPropertyNameConflicts.ts(322,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(321,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(322,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations staticPropertyNameConflicts.ts(327,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(339,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(346,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ==== staticPropertyNameConflicts.ts (36 errors) ==== @@ -716,10 +716,12 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f export class ExportedStaticNameFn { static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:246:12: Add a return type to the method [FunctionPropertyNames.name]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:247:5: Add a return type to the method } // length @@ -749,10 +751,12 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f export class ExportedStaticLengthFn { static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:271:12: Add a return type to the method [FunctionPropertyNames.length]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:272:5: Add a return type to the method } // prototype @@ -794,10 +798,12 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:296:12: Add a return type to the method [FunctionPropertyNames.prototype]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:297:5: Add a return type to the method } // caller @@ -827,10 +833,12 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f export class ExportedStaticCallerFn { static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:321:12: Add a return type to the method [FunctionPropertyNames.caller]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:322:5: Add a return type to the method } // arguments @@ -860,8 +868,10 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f export class ExportedStaticArgumentsFn { static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:346:12: Add a return type to the method [FunctionPropertyNames.arguments]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:347:5: Add a return type to the method } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess1.d.ts new file mode 100644 index 0000000000000..666944df37a2a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess1.d.ts @@ -0,0 +1,60 @@ +//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess1.ts] //// + +//// [superSymbolIndexedAccess1.ts] +var symbol = Symbol.for('myThing'); + +class Foo { + [symbol]() { + return 0; + } +} + +class Bar extends Foo { + [symbol]() { + return super[symbol](); + } +} + +/// [Declarations] //// + + + +//// [superSymbolIndexedAccess1.d.ts] +declare var symbol: invalid; +declare class Foo { + [symbol](): invalid; +} +declare class Bar extends Foo { + [symbol](): invalid; +} + +/// [Errors] //// + +superSymbolIndexedAccess1.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +superSymbolIndexedAccess1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +superSymbolIndexedAccess1.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + + +==== superSymbolIndexedAccess1.ts (3 errors) ==== + var symbol = Symbol.for('myThing'); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 superSymbolIndexedAccess1.ts:1:5: Add a type annotation to the variable symbol + + class Foo { + [symbol]() { + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 superSymbolIndexedAccess1.ts:4:5: Add a return type to the method + return 0; + } + } + + class Bar extends Foo { + [symbol]() { + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 superSymbolIndexedAccess1.ts:10:5: Add a return type to the method + return super[symbol](); + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess3.d.ts new file mode 100644 index 0000000000000..3d454c80e5204 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess3.d.ts @@ -0,0 +1,63 @@ +//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess3.ts] //// + +//// [superSymbolIndexedAccess3.ts] +var symbol = Symbol.for('myThing'); + +class Foo { + [symbol]() { + return 0; + } +} + +class Bar extends Foo { + [symbol]() { + return super[Bar](); + } +} + +/// [Declarations] //// + + + +//// [superSymbolIndexedAccess3.d.ts] +declare var symbol: invalid; +declare class Foo { + [symbol](): invalid; +} +declare class Bar extends Foo { + [symbol](): invalid; +} + +/// [Errors] //// + +superSymbolIndexedAccess3.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +superSymbolIndexedAccess3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +superSymbolIndexedAccess3.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +superSymbolIndexedAccess3.ts(11,22): error TS2538: Type 'typeof Bar' cannot be used as an index type. + + +==== superSymbolIndexedAccess3.ts (4 errors) ==== + var symbol = Symbol.for('myThing'); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 superSymbolIndexedAccess3.ts:1:5: Add a type annotation to the variable symbol + + class Foo { + [symbol]() { + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 superSymbolIndexedAccess3.ts:4:5: Add a return type to the method + return 0; + } + } + + class Bar extends Foo { + [symbol]() { + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 superSymbolIndexedAccess3.ts:10:5: Add a return type to the method + return super[Bar](); + ~~~ +!!! error TS2538: Type 'typeof Bar' cannot be used as an index type. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess4.d.ts new file mode 100644 index 0000000000000..ca9afef113867 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess4.d.ts @@ -0,0 +1,44 @@ +//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess4.ts] //// + +//// [superSymbolIndexedAccess4.ts] +var symbol = Symbol.for('myThing'); + +class Bar { + [symbol]() { + return super[symbol](); + } +} + +/// [Declarations] //// + + + +//// [superSymbolIndexedAccess4.d.ts] +declare var symbol: invalid; +declare class Bar { + [symbol](): invalid; +} + +/// [Errors] //// + +superSymbolIndexedAccess4.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +superSymbolIndexedAccess4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +superSymbolIndexedAccess4.ts(5,16): error TS2335: 'super' can only be referenced in a derived class. + + +==== superSymbolIndexedAccess4.ts (3 errors) ==== + var symbol = Symbol.for('myThing'); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 superSymbolIndexedAccess4.ts:1:5: Add a type annotation to the variable symbol + + class Bar { + [symbol]() { + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 superSymbolIndexedAccess4.ts:4:5: Add a return type to the method + return super[symbol](); + ~~~~~ +!!! error TS2335: 'super' can only be referenced in a derived class. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess5.d.ts new file mode 100644 index 0000000000000..7afe98edbb276 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess5.d.ts @@ -0,0 +1,56 @@ +//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess5.ts] //// + +//// [superSymbolIndexedAccess5.ts] +var symbol: any; + +class Foo { + [symbol]() { + return 0; + } +} + +class Bar extends Foo { + [symbol]() { + return super[symbol](); + } +} + +/// [Declarations] //// + + + +//// [superSymbolIndexedAccess5.d.ts] +declare var symbol: any; +declare class Foo { + [symbol](): invalid; +} +declare class Bar extends Foo { + [symbol](): invalid; +} + +/// [Errors] //// + +superSymbolIndexedAccess5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +superSymbolIndexedAccess5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + + +==== superSymbolIndexedAccess5.ts (2 errors) ==== + var symbol: any; + + class Foo { + [symbol]() { + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 superSymbolIndexedAccess5.ts:4:5: Add a return type to the method + return 0; + } + } + + class Bar extends Foo { + [symbol]() { + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 superSymbolIndexedAccess5.ts:10:5: Add a return type to the method + return super[symbol](); + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess6.d.ts new file mode 100644 index 0000000000000..158ea1b3a2561 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess6.d.ts @@ -0,0 +1,56 @@ +//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess6.ts] //// + +//// [superSymbolIndexedAccess6.ts] +var symbol: any; + +class Foo { + static [symbol]() { + return 0; + } +} + +class Bar extends Foo { + static [symbol]() { + return super[symbol](); + } +} + +/// [Declarations] //// + + + +//// [superSymbolIndexedAccess6.d.ts] +declare var symbol: any; +declare class Foo { + static [symbol](): invalid; +} +declare class Bar extends Foo { + static [symbol](): invalid; +} + +/// [Errors] //// + +superSymbolIndexedAccess6.ts(4,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +superSymbolIndexedAccess6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + + +==== superSymbolIndexedAccess6.ts (2 errors) ==== + var symbol: any; + + class Foo { + static [symbol]() { + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 superSymbolIndexedAccess6.ts:4:12: Add a return type to the method + return 0; + } + } + + class Bar extends Foo { + static [symbol]() { + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 superSymbolIndexedAccess6.ts:10:12: Add a return type to the method + return super[symbol](); + } + } \ 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 index 2466cd6c13224..2b0351fcbd7a1 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolDeclarationEmit12.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolDeclarationEmit12.d.ts @@ -34,9 +34,9 @@ declare namespace M { /// [Errors] //// -symbolDeclarationEmit12.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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]'. @@ -47,7 +47,8 @@ symbolDeclarationEmit12.ts(10,13): error TS2300: Duplicate identifier '[Symbol.t [Symbol.iterator]: I; [Symbol.toPrimitive](x: I) { } ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 } @@ -55,7 +56,8 @@ symbolDeclarationEmit12.ts(10,13): error TS2300: Duplicate identifier '[Symbol.t ~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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/dte/symbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts index 5211f0c8633a6..9df447fdfae12 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts @@ -20,8 +20,8 @@ declare var x: invalid; /// [Errors] //// -symbolProperty1.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -symbolProperty1.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +symbolProperty1.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ==== symbolProperty1.ts (2 errors) ==== @@ -30,10 +30,13 @@ symbolProperty1.ts(5,9): error TS9007: Declaration emit for this file requires t [s]: 0, [s]() { }, ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x +!!! related TS9034 symbolProperty1.ts:4:5: Add a return type to the method get [s]() { ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 symbolProperty1.ts:5:9: Add a return type to the get accessor declaration return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts index 4ed7089688969..3e30d1a24524a 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts @@ -20,23 +20,27 @@ declare var x: invalid; /// [Errors] //// -symbolProperty2.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -symbolProperty2.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -symbolProperty2.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty2.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +symbolProperty2.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +symbolProperty2.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ==== symbolProperty2.ts (3 errors) ==== var s = Symbol(); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 symbolProperty2.ts:1:5: Add a type annotation to the variable s var x = { [s]: 0, [s]() { }, ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x +!!! related TS9034 symbolProperty2.ts:4:5: Add a return type to the method get [s]() { ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 symbolProperty2.ts:5:9: Add a return type to the get accessor declaration return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts index ee9167862be41..5c7f075d1ae80 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts @@ -20,18 +20,19 @@ declare var x: invalid; /// [Errors] //// -symbolProperty3.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty3.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations symbolProperty3.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. symbolProperty3.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty3.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations symbolProperty3.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty3.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty3.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ==== symbolProperty3.ts (6 errors) ==== var s = Symbol; ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 symbolProperty3.ts:1:5: Add a type annotation to the variable s var x = { [s]: 0, ~~~ @@ -40,12 +41,15 @@ symbolProperty3.ts(5,9): error TS9007: Declaration emit for this file requires t ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x +!!! related TS9034 symbolProperty3.ts:4:5: Add a return type to the method get [s]() { ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 symbolProperty3.ts:5:9: Add a return type to the get accessor declaration return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/thisTypeErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/thisTypeErrors.d.ts index 591464e21db9b..7756a94d61b5f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/thisTypeErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/thisTypeErrors.d.ts @@ -145,10 +145,10 @@ thisTypeErrors.ts(29,19): error TS2526: A 'this' type is available only in a non thisTypeErrors.ts(29,26): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeErrors.ts(35,19): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeErrors.ts(36,20): error TS2331: 'this' cannot be referenced in a module or namespace body. -thisTypeErrors.ts(36,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +thisTypeErrors.ts(36,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations thisTypeErrors.ts(41,14): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeErrors.ts(41,21): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(45,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +thisTypeErrors.ts(45,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations thisTypeErrors.ts(46,23): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeErrors.ts(46,30): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeErrors.ts(50,18): error TS2526: A 'this' type is available only in a non-static member of a class or interface. @@ -241,7 +241,8 @@ thisTypeErrors.ts(50,25): error TS2526: A 'this' type is available only in a non ~~~~ !!! error TS2331: 'this' cannot be referenced in a module or namespace body. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 thisTypeErrors.ts:36:16: Add a type annotation to the variable y } class C3 { @@ -256,7 +257,8 @@ thisTypeErrors.ts(50,25): error TS2526: A 'this' type is available only in a non } f() { ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 thisTypeErrors.ts:45:5: Add a return type to the method function g(x: this): this { ~~~~ !!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/thisTypeInAccessors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/thisTypeInAccessors.d.ts index 2e0073367ae5e..17696500dea73 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/thisTypeInAccessors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/thisTypeInAccessors.d.ts @@ -77,12 +77,12 @@ thisTypeInAccessors.ts(8,11): error TS2784: 'get' and 'set' accessors cannot dec thisTypeInAccessors.ts(9,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. thisTypeInAccessors.ts(13,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. thisTypeInAccessors.ts(19,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(23,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +thisTypeInAccessors.ts(23,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations thisTypeInAccessors.ts(23,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. thisTypeInAccessors.ts(24,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. thisTypeInAccessors.ts(29,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. thisTypeInAccessors.ts(30,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(34,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +thisTypeInAccessors.ts(34,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ==== thisTypeInAccessors.ts (10 errors) ==== @@ -118,7 +118,9 @@ thisTypeInAccessors.ts(34,9): error TS9007: Declaration emit for this file requi n: 16, get x(this: Foo) { return this.n }, ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 thisTypeInAccessors.ts:24:9: Add a type to parameter of the set accessor declaration +!!! related TS9032 thisTypeInAccessors.ts:23:9: Add a return type to the get accessor declaration ~~~~~~~~~ !!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. set x(this, n) { this.n = n; } @@ -139,6 +141,7 @@ thisTypeInAccessors.ts(34,9): error TS9007: Declaration emit for this file requi n = 21; get x() { return this.n } // inside a class, so already correct ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 thisTypeInAccessors.ts:34:9: Add a return type to the get accessor declaration } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment32.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment32.d.ts index 0b4c572598512..25b97f9eda029 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment32.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment32.d.ts @@ -55,18 +55,18 @@ declare namespace ExpandoMerge { /// [Errors] //// -expando.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -expando.ts(4,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -expando.ts(5,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -expando.ts(8,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -expando.ts(9,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -expando.ts(10,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -expando.ts(11,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +expando.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. +expando.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. +expando.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. +expando.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. +expando.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. +expando.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. expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -expando.ts(12,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.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. expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -expando.ts(13,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -expando.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +expando.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. +expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. @@ -74,42 +74,44 @@ ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different fil ==== expando.ts (12 errors) ==== function ExpandoMerge(n: number) { ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 expando.ts:1:10: Add a return type to the function declaration return n; } ExpandoMerge.p1 = 111 ~~~~~~~~~~~~~~~ -!!! error TS9009: 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. ExpandoMerge.m = function(n: number) { ~~~~~~~~~~~~~~ -!!! error TS9009: 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. return n + 1; } ExpandoMerge.p4 = 44444; ~~~~~~~~~~~~~~~ -!!! error TS9009: 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. ExpandoMerge.p5 = 555555; ~~~~~~~~~~~~~~~ -!!! error TS9009: 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. ExpandoMerge.p6 = 66666; ~~~~~~~~~~~~~~~ -!!! error TS9009: 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. ExpandoMerge.p7 = 777777; ~~~~~~~~~~~~~~~ -!!! error TS9009: 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. ExpandoMerge.p8 = false; // type error ~~~~~~~~~~~~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'number'. ~~~~~~~~~~~~~~~ -!!! error TS9009: 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. ExpandoMerge.p9 = false; // type error ~~~~~~~~~~~~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'number'. ~~~~~~~~~~~~~~~ -!!! error TS9009: 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. var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n ==== ns.ts (2 errors) ==== namespace ExpandoMerge { diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment33.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment33.d.ts index 09f7fb3e8b4f4..5c88407924421 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment33.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment33.d.ts @@ -57,18 +57,18 @@ declare namespace ExpandoMerge { /// [Errors] //// -expando.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -expando.ts(4,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -expando.ts(5,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -expando.ts(8,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -expando.ts(9,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -expando.ts(10,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -expando.ts(11,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +expando.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. +expando.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. +expando.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. +expando.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. +expando.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. +expando.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. expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -expando.ts(12,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.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. expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -expando.ts(13,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -expando.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +expando.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. +expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. @@ -95,41 +95,43 @@ ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different fil ==== expando.ts (12 errors) ==== function ExpandoMerge(n: number) { ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 expando.ts:1:10: Add a return type to the function declaration return n; } ExpandoMerge.p1 = 111 ~~~~~~~~~~~~~~~ -!!! error TS9009: 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. ExpandoMerge.m = function(n: number) { ~~~~~~~~~~~~~~ -!!! error TS9009: 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. return n + 1; } ExpandoMerge.p4 = 44444; ~~~~~~~~~~~~~~~ -!!! error TS9009: 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. ExpandoMerge.p5 = 555555; ~~~~~~~~~~~~~~~ -!!! error TS9009: 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. ExpandoMerge.p6 = 66666; ~~~~~~~~~~~~~~~ -!!! error TS9009: 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. ExpandoMerge.p7 = 777777; ~~~~~~~~~~~~~~~ -!!! error TS9009: 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. ExpandoMerge.p8 = false; // type error ~~~~~~~~~~~~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'number'. ~~~~~~~~~~~~~~~ -!!! error TS9009: 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. ExpandoMerge.p9 = false; // type error ~~~~~~~~~~~~~~~ !!! error TS2322: Type 'boolean' is not assignable to type 'number'. ~~~~~~~~~~~~~~~ -!!! error TS9009: 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. var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n \ 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 index dd4145b11dd96..6e338f6aabd74 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives11.d.ts @@ -23,14 +23,15 @@ export declare const bar: invalid; /// [Errors] //// -/mod2.ts(2,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives13.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives13.d.ts index 35a13e0312d5f..b6a8191fa7d14 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives13.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives13.d.ts @@ -26,13 +26,13 @@ export interface A { /// [Errors] //// -/app.ts(1,23): error TS9010: Reference directives are not supported in isolated declaration mode. +/app.ts(1,23): error TS9025: Reference directives are not supported in isolated declaration mode. ==== /app.ts (1 errors) ==== /// ~~~ -!!! error TS9010: Reference directives are not supported in isolated declaration mode. +!!! error TS9025: Reference directives are not supported in isolated declaration mode. import {$} from "./ref"; export interface A { x: () => typeof $ diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives5.d.ts index 84e28ffd3f869..200fe2d316cba 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives5.d.ts @@ -25,13 +25,13 @@ export interface A { /// [Errors] //// -/app.ts(1,23): error TS9010: Reference directives are not supported in isolated declaration mode. +/app.ts(1,23): error TS9025: Reference directives are not supported in isolated declaration mode. ==== /app.ts (1 errors) ==== /// ~~~ -!!! error TS9010: Reference directives are not supported in isolated declaration mode. +!!! error TS9025: Reference directives are not supported in isolated declaration mode. import {$} from "./ref"; export interface A { x: typeof $; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts index 114789e7f0e3b..268cef5306535 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts @@ -22,14 +22,15 @@ export declare const bar: invalid; /// [Errors] //// -/mod2.ts(2,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts index f88bc78781ab8..a077b178d2b94 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts @@ -59,7 +59,7 @@ type T4 = { typeUsedAsTypeLiteralIndex.ts(3,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. typeUsedAsTypeLiteralIndex.ts(3,6): error TS2690: 'K' only refers to a type, but is being used as a value here. Did you mean to use 'P in K'? -typeUsedAsTypeLiteralIndex.ts(6,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +typeUsedAsTypeLiteralIndex.ts(6,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations typeUsedAsTypeLiteralIndex.ts(13,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. typeUsedAsTypeLiteralIndex.ts(13,6): error TS2690: 'K2' only refers to a type, but is being used as a value here. Did you mean to use 'K in K2'? typeUsedAsTypeLiteralIndex.ts(18,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. @@ -80,7 +80,8 @@ typeUsedAsTypeLiteralIndex.ts(23,6): error TS2693: 'K4' only refers to a type, b const K1 = Symbol(); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 typeUsedAsTypeLiteralIndex.ts:6:7: Add a type annotation to the variable K1 type T1 = { [K1]: number; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5For-ofTypeCheck10.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5For-ofTypeCheck10.d.ts new file mode 100644 index 0000000000000..fdeb566e70766 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5For-ofTypeCheck10.d.ts @@ -0,0 +1,67 @@ +//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts] //// + +//// [ES5For-ofTypeCheck10.ts] +// In ES3/5, you cannot for...of over an arbitrary iterable. +class StringIterator { + next() { + return { + done: true, + value: "" + }; + } + [Symbol.iterator]() { + return this; + } +} + +for (var v of new StringIterator) { } + +/// [Declarations] //// + + + +//// [ES5For-ofTypeCheck10.d.ts] +declare class StringIterator { + next(): invalid; + [Symbol.iterator](): invalid; +} + +/// [Errors] //// + +ES5For-ofTypeCheck10.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5For-ofTypeCheck10.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5For-ofTypeCheck10.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +ES5For-ofTypeCheck10.ts(9,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +ES5For-ofTypeCheck10.ts(9,6): error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. +ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an array type or a string type. + + +==== ES5For-ofTypeCheck10.ts (6 errors) ==== + // In ES3/5, you cannot for...of over an arbitrary iterable. + class StringIterator { + next() { + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 ES5For-ofTypeCheck10.ts:3:5: Add a return type to the method + return { + done: true, + value: "" + }; + } + [Symbol.iterator]() { + ~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 ES5For-ofTypeCheck10.ts:9:5: Add a return type to the method + ~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ +!!! error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. + return this; + } + } + + for (var v of new StringIterator) { } + ~~~~~~~~~~~~~~~~~~ +!!! error TS2495: Type 'StringIterator' is not an array type or a string type. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts index 8f3904addf074..ef19d5ab8a32b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts @@ -25,7 +25,7 @@ declare var obj: invalid; /// [Errors] //// -ES5SymbolProperty1.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +ES5SymbolProperty1.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ==== ES5SymbolProperty1.ts (1 errors) ==== @@ -37,7 +37,8 @@ ES5SymbolProperty1.ts(7,5): error TS9007: Declaration emit for this file require var obj = { [Symbol.foo]: 0 ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 ES5SymbolProperty1.ts:6:5: Add a type annotation to the variable obj } obj[Symbol.foo]; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty2.d.ts new file mode 100644 index 0000000000000..c3ccec9c06038 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty2.d.ts @@ -0,0 +1,52 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty2.ts] //// + +//// [ES5SymbolProperty2.ts] +module M { + var Symbol: any; + + export class C { + [Symbol.iterator]() { } + } + (new C)[Symbol.iterator]; +} + +(new M.C)[Symbol.iterator]; + +/// [Declarations] //// + + + +//// [ES5SymbolProperty2.d.ts] +declare namespace M { + var Symbol: any; + export class C { + [Symbol.iterator](): invalid; + } + export {}; +} + +/// [Errors] //// + +ES5SymbolProperty2.ts(5,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5SymbolProperty2.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +ES5SymbolProperty2.ts(10,11): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + +==== ES5SymbolProperty2.ts (3 errors) ==== + module M { + var Symbol: any; + + export class C { + [Symbol.iterator]() { } + ~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 ES5SymbolProperty2.ts:5:9: Add a return type to the method + ~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + } + (new C)[Symbol.iterator]; + } + + (new M.C)[Symbol.iterator]; + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty3.d.ts new file mode 100644 index 0000000000000..7ebe95faf820a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty3.d.ts @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty3.ts] //// + +//// [ES5SymbolProperty3.ts] +var Symbol: any; + +class C { + [Symbol.iterator]() { } +} + +(new C)[Symbol.iterator] + +/// [Declarations] //// + + + +//// [ES5SymbolProperty3.d.ts] +declare var Symbol: any; +declare class C { + [Symbol.iterator](): invalid; +} + +/// [Errors] //// + +ES5SymbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5SymbolProperty3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +==== ES5SymbolProperty3.ts (2 errors) ==== + var Symbol: any; + + class C { + [Symbol.iterator]() { } + ~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 ES5SymbolProperty3.ts:4:5: Add a return type to the method + ~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + } + + (new C)[Symbol.iterator] \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty4.d.ts new file mode 100644 index 0000000000000..a34657fac35e9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty4.d.ts @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty4.ts] //// + +//// [ES5SymbolProperty4.ts] +var Symbol: { iterator: string }; + +class C { + [Symbol.iterator]() { } +} + +(new C)[Symbol.iterator] + +/// [Declarations] //// + + + +//// [ES5SymbolProperty4.d.ts] +declare var Symbol: { + iterator: string; +}; +declare class C { + [Symbol.iterator](): invalid; +} + +/// [Errors] //// + +ES5SymbolProperty4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5SymbolProperty4.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +==== ES5SymbolProperty4.ts (2 errors) ==== + var Symbol: { iterator: string }; + + class C { + [Symbol.iterator]() { } + ~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 ES5SymbolProperty4.ts:4:5: Add a return type to the method + ~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + } + + (new C)[Symbol.iterator] \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty5.d.ts new file mode 100644 index 0000000000000..17127e53075fc --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty5.d.ts @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty5.ts] //// + +//// [ES5SymbolProperty5.ts] +var Symbol: { iterator: symbol }; + +class C { + [Symbol.iterator]() { } +} + +(new C)[Symbol.iterator](0) // Should error + +/// [Declarations] //// + + + +//// [ES5SymbolProperty5.d.ts] +declare var Symbol: { + iterator: symbol; +}; +declare class C { + [Symbol.iterator](): invalid; +} + +/// [Errors] //// + +ES5SymbolProperty5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5SymbolProperty5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +==== ES5SymbolProperty5.ts (2 errors) ==== + var Symbol: { iterator: symbol }; + + class C { + [Symbol.iterator]() { } + ~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 ES5SymbolProperty5.ts:4:5: Add a return type to the method + ~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + } + + (new C)[Symbol.iterator](0) // Should error \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty6.d.ts new file mode 100644 index 0000000000000..591e9c1657ca1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty6.d.ts @@ -0,0 +1,49 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty6.ts] //// + +//// [ES5SymbolProperty6.ts] +u//@target: ES5 +class C { + [Symbol.iterator]() { } +} + +(new C)[Symbol.iterator] + +/// [Declarations] //// + + + +//// [ES5SymbolProperty6.d.ts] +declare class C { + [Symbol.iterator](): invalid; +} + +/// [Errors] //// + +ES5SymbolProperty6.ts(1,1): error TS2304: Cannot find name 'u'. +ES5SymbolProperty6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5SymbolProperty6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +ES5SymbolProperty6.ts(3,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +ES5SymbolProperty6.ts(3,6): error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. +ES5SymbolProperty6.ts(6,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + +==== ES5SymbolProperty6.ts (6 errors) ==== + u//@target: ES5 + ~ +!!! error TS2304: Cannot find name 'u'. + class C { + [Symbol.iterator]() { } + ~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 ES5SymbolProperty6.ts:3:5: Add a return type to the method + ~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~ +!!! error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. + } + + (new C)[Symbol.iterator] + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty7.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty7.d.ts new file mode 100644 index 0000000000000..30d13310d5b3a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty7.d.ts @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/Symbols/ES5SymbolProperty7.ts] //// + +//// [ES5SymbolProperty7.ts] +var Symbol: { iterator: any }; + +class C { + [Symbol.iterator]() { } +} + +(new C)[Symbol.iterator] + +/// [Declarations] //// + + + +//// [ES5SymbolProperty7.d.ts] +declare var Symbol: { + iterator: any; +}; +declare class C { + [Symbol.iterator](): invalid; +} + +/// [Errors] //// + +ES5SymbolProperty7.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5SymbolProperty7.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +==== ES5SymbolProperty7.ts (2 errors) ==== + var Symbol: { iterator: any }; + + class C { + [Symbol.iterator]() { } + ~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 ES5SymbolProperty7.ts:4:5: Add a return type to the method + ~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + } + + (new C)[Symbol.iterator] \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts index 47e5d2a49bd9d..425131cb17f92 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts @@ -12,16 +12,22 @@ declare var v: invalid; /// [Errors] //// -FunctionDeclaration8_es6.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +FunctionDeclaration8_es6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations FunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'yield'. FunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. +FunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations -==== FunctionDeclaration8_es6.ts (3 errors) ==== +==== FunctionDeclaration8_es6.ts (4 errors) ==== var v = { [yield]: foo } ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 FunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v ~~~~~ !!! error TS2304: Cannot find name 'yield'. ~~~ -!!! error TS2304: Cannot find name 'foo'. \ No newline at end of file +!!! error TS2304: Cannot find name 'foo'. + ~~~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 FunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v +!!! related TS9035 FunctionDeclaration8_es6.ts:1:20: Add a type assertion to this expression to make type type explicit \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/MemberFunctionDeclaration3_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/MemberFunctionDeclaration3_es6.d.ts new file mode 100644 index 0000000000000..215276a21a289 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/MemberFunctionDeclaration3_es6.d.ts @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts] //// + +//// [MemberFunctionDeclaration3_es6.ts] +class C { + *[foo]() { } +} + +/// [Declarations] //// + + + +//// [MemberFunctionDeclaration3_es6.d.ts] +declare class C { + [foo](): invalid; +} + +/// [Errors] //// + +MemberFunctionDeclaration3_es6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +MemberFunctionDeclaration3_es6.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +MemberFunctionDeclaration3_es6.ts(2,6): error TS2304: Cannot find name 'foo'. +MemberFunctionDeclaration3_es6.ts(2,6): error TS4100: Public method '[foo]' of exported class has or is using private name 'foo'. + + +==== MemberFunctionDeclaration3_es6.ts (4 errors) ==== + class C { + *[foo]() { } + ~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 MemberFunctionDeclaration3_es6.ts:2:5: Add a return type to the method + ~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~~~ +!!! error TS2304: Cannot find name 'foo'. + ~~~ +!!! error TS4100: Public method '[foo]' of exported class has or is using private name 'foo'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/arrayFind.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/arrayFind.d.ts index 2d67be6693af0..ce2497d1c972b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/arrayFind.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/arrayFind.d.ts @@ -26,7 +26,7 @@ declare const readonlyFoundNumber: number | undefined; /// [Errors] //// -arrayFind.ts(6,42): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +arrayFind.ts(6,42): error TS9017: Only const arrays can be inferred with --isolatedDeclarations ==== arrayFind.ts (1 errors) ==== @@ -37,7 +37,8 @@ arrayFind.ts(6,42): error TS9007: Declaration emit for this file requires type r const arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations +!!! related TS9027 arrayFind.ts:6:7: Add a type annotation to the variable arrayOfStringsNumbersAndBooleans const foundNumber: number | undefined = arrayOfStringsNumbersAndBooleans.find(isNumber); const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans as ReadonlyArray; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asOperator1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asOperator1.d.ts index 75443ffc89404..b1350e5c66bee 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/asOperator1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/asOperator1.d.ts @@ -24,7 +24,7 @@ declare var j: string | number; /// [Errors] //// -asOperator1.ts(3,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +asOperator1.ts(3,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations ==== asOperator1.ts (1 errors) ==== @@ -32,7 +32,8 @@ asOperator1.ts(3,9): error TS9007: Declaration emit for this file requires type var x = undefined as number; var y = (null as string).length; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 asOperator1.ts:3:5: Add a type annotation to the variable y var z = Date as any as string; // Should parse as a union type, not a bitwise 'or' of (32 as number) and 'string' diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts index ee53e2223c157..7010f774e445a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts @@ -12,16 +12,22 @@ declare var v: invalid; /// [Errors] //// -asyncFunctionDeclaration8_es2017.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +asyncFunctionDeclaration8_es2017.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations asyncFunctionDeclaration8_es2017.ts(1,12): error TS2304: Cannot find name 'await'. asyncFunctionDeclaration8_es2017.ts(1,20): error TS2304: Cannot find name 'foo'. +asyncFunctionDeclaration8_es2017.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations -==== asyncFunctionDeclaration8_es2017.ts (3 errors) ==== +==== asyncFunctionDeclaration8_es2017.ts (4 errors) ==== var v = { [await]: foo } ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 asyncFunctionDeclaration8_es2017.ts:1:5: Add a type annotation to the variable v ~~~~~ !!! error TS2304: Cannot find name 'await'. ~~~ -!!! error TS2304: Cannot find name 'foo'. \ No newline at end of file +!!! error TS2304: Cannot find name 'foo'. + ~~~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 asyncFunctionDeclaration8_es2017.ts:1:5: Add a type annotation to the variable v +!!! related TS9035 asyncFunctionDeclaration8_es2017.ts:1:20: Add a type assertion to this expression to make type type explicit \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts index 5c6fa711c50ab..4308699e91939 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts @@ -12,16 +12,22 @@ declare var v: invalid; /// [Errors] //// -asyncFunctionDeclaration8_es5.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +asyncFunctionDeclaration8_es5.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations asyncFunctionDeclaration8_es5.ts(1,12): error TS2304: Cannot find name 'await'. asyncFunctionDeclaration8_es5.ts(1,20): error TS2304: Cannot find name 'foo'. +asyncFunctionDeclaration8_es5.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations -==== asyncFunctionDeclaration8_es5.ts (3 errors) ==== +==== asyncFunctionDeclaration8_es5.ts (4 errors) ==== var v = { [await]: foo } ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 asyncFunctionDeclaration8_es5.ts:1:5: Add a type annotation to the variable v ~~~~~ !!! error TS2304: Cannot find name 'await'. ~~~ -!!! error TS2304: Cannot find name 'foo'. \ No newline at end of file +!!! error TS2304: Cannot find name 'foo'. + ~~~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 asyncFunctionDeclaration8_es5.ts:1:5: Add a type annotation to the variable v +!!! related TS9035 asyncFunctionDeclaration8_es5.ts:1:20: Add a type assertion to this expression to make type type explicit \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts index 7d5b2453477d4..89b6c20e65def 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts @@ -12,16 +12,22 @@ declare var v: invalid; /// [Errors] //// -asyncFunctionDeclaration8_es6.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +asyncFunctionDeclaration8_es6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations asyncFunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'await'. asyncFunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. +asyncFunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations -==== asyncFunctionDeclaration8_es6.ts (3 errors) ==== +==== asyncFunctionDeclaration8_es6.ts (4 errors) ==== var v = { [await]: foo } ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 asyncFunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v ~~~~~ !!! error TS2304: Cannot find name 'await'. ~~~ -!!! error TS2304: Cannot find name 'foo'. \ No newline at end of file +!!! error TS2304: Cannot find name 'foo'. + ~~~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 asyncFunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v +!!! related TS9035 asyncFunctionDeclaration8_es6.ts:1:20: Add a type assertion to this expression to make type type explicit \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts index 2477fe81ef9ea..6d313ea58d204 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts @@ -56,15 +56,15 @@ declare const c: invalid; a.ts(2,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. a.ts(8,11): error TS2538: Type '1n' cannot be used as an index type. a.ts(14,1): error TS2322: Type 'bigint' is not assignable to type 'string | number | symbol'. -a.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +a.ts(18,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations a.ts(19,12): error TS2538: Type 'bigint' cannot be used as an index type. b.ts(2,12): error TS1136: Property assignment expected. b.ts(2,14): error TS1005: ';' expected. b.ts(2,19): error TS1128: Declaration or statement expected. b.ts(3,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -b.ts(3,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +b.ts(3,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -b.ts(4,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +b.ts(4,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ==== a.ts (5 errors) ==== @@ -93,7 +93,8 @@ b.ts(4,12): error TS9007: Declaration emit for this file requires type resolutio const bigNum: bigint = 0n; const typedArray = new Uint8Array(3); ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 a.ts:18:7: Add a type annotation to the variable typedArray typedArray[bigNum] = 0xAA; // should error ~~~~~~ !!! error TS2538: Type 'bigint' cannot be used as an index type. @@ -115,10 +116,12 @@ b.ts(4,12): error TS9007: Declaration emit for this file requires type resolutio ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 b.ts:3:7: Add a type annotation to the variable b const c = {[bigNum]: 789}; ~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 b.ts:4:7: Add a type annotation to the variable c \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/booleanFilterAnyArray.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/booleanFilterAnyArray.d.ts index 3985251cd1662..0732a891ce180 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/booleanFilterAnyArray.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/booleanFilterAnyArray.d.ts @@ -61,7 +61,7 @@ declare var foos: boolean[]; /// [Errors] //// -booleanFilterAnyArray.ts(20,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +booleanFilterAnyArray.ts(20,11): error TS9017: Only const arrays can be inferred with --isolatedDeclarations ==== booleanFilterAnyArray.ts (1 errors) ==== @@ -86,7 +86,8 @@ booleanFilterAnyArray.ts(20,11): error TS9007: Declaration emit for this file re var foo = [{ name: 'x' }] ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations +!!! related TS9027 booleanFilterAnyArray.ts:20:5: Add a type annotation to the variable foo var foor: Array<{name: string}> var foor = foo.filter(x => x.name) var foos: Array diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/capturedParametersInInitializers1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/capturedParametersInInitializers1.d.ts index 0407a5130f937..8607ba8e3fd23 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/capturedParametersInInitializers1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/capturedParametersInInitializers1.d.ts @@ -62,76 +62,86 @@ declare function foo9(y?: invalid, z?: number): invalid; /// [Errors] //// -capturedParametersInInitializers1.ts(2,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(2,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(7,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(7,19): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -capturedParametersInInitializers1.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(13,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(18,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(2,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(2,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(7,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(7,19): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(12,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(18,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations capturedParametersInInitializers1.ts(18,20): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. -capturedParametersInInitializers1.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(22,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(22,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(18,20): error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations +capturedParametersInInitializers1.ts(22,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(22,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations capturedParametersInInitializers1.ts(22,26): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. -capturedParametersInInitializers1.ts(26,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(26,19): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -capturedParametersInInitializers1.ts(30,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(30,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(34,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(38,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -capturedParametersInInitializers1.ts(38,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +capturedParametersInInitializers1.ts(26,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(26,19): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(30,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(30,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(34,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(38,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(38,20): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(38,20): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. -==== capturedParametersInInitializers1.ts (21 errors) ==== +==== capturedParametersInInitializers1.ts (22 errors) ==== // ok - usage is deferred function foo1(y = class {c = x}, x = 1) { ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 capturedParametersInInitializers1.ts:2:10: Add a return type to the function declaration ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 capturedParametersInInitializers1.ts:2:15: Add a type annotation to the parameter y new y().c; } // ok - used in file function foo2(y = function(x: typeof z) {}, z = 1) { ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 capturedParametersInInitializers1.ts:7:10: Add a return type to the function declaration ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 capturedParametersInInitializers1.ts:7:15: Add a type annotation to the parameter y -!!! related TS9603 capturedParametersInInitializers1.ts:7:19: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9028 capturedParametersInInitializers1.ts:7:15: Add a type annotation to the parameter y +!!! related TS9030 capturedParametersInInitializers1.ts:7:19: Add a return type to the function expression } // ok -used in type let a; ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 capturedParametersInInitializers1.ts:12:5: Add a type annotation to the variable a function foo3(y = { x: a }, z = 1) { ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 capturedParametersInInitializers1.ts:13:10: Add a return type to the function declaration } // error - used before declaration function foo4(y = {z}, z = 1) { ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 capturedParametersInInitializers1.ts:18:10: Add a return type to the function declaration ~ !!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations +!!! related TS9028 capturedParametersInInitializers1.ts:18:15: Add a type annotation to the parameter y } // error - used before declaration, IIFEs are inlined function foo5(y = (() => z)(), z = 1) { ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 capturedParametersInInitializers1.ts:22:10: Add a return type to the function declaration ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 capturedParametersInInitializers1.ts:22:15: Add a type annotation to the parameter y ~ !!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. } @@ -139,35 +149,46 @@ capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot // ok - IIFE inside another function function foo6(y = () => (() => z)(), z = 1) { ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 capturedParametersInInitializers1.ts:26:10: Add a return type to the function declaration ~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 capturedParametersInInitializers1.ts:26:15: Add a type annotation to the parameter y -!!! related TS9603 capturedParametersInInitializers1.ts:26:19: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9028 capturedParametersInInitializers1.ts:26:15: Add a type annotation to the parameter y +!!! related TS9030 capturedParametersInInitializers1.ts:26:19: Add a return type to the function expression } // ok - used inside immediately invoked generator function function foo7(y = (function*() {yield z})(), z = 1) { ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 capturedParametersInInitializers1.ts:30:10: Add a return type to the function declaration ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 capturedParametersInInitializers1.ts:30:15: Add a type annotation to the parameter y } // ok - used inside immediately invoked async function function foo8(y = (async () => z)(), z = 1) { ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 capturedParametersInInitializers1.ts:34:10: Add a return type to the function declaration ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 capturedParametersInInitializers1.ts:34:15: Add a type annotation to the parameter y } // error - used as computed name of method function foo9(y = {[z]() { return z; }}, z = 1) { ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 capturedParametersInInitializers1.ts:38:10: Add a return type to the function declaration ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9028 capturedParametersInInitializers1.ts:38:15: Add a type annotation to the parameter y +!!! related TS9034 capturedParametersInInitializers1.ts:38:20: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9028 capturedParametersInInitializers1.ts:38:15: Add a type annotation to the parameter y ~ !!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts index 2ec9ceba777a1..3343efa334a47 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts @@ -116,7 +116,7 @@ declare namespace m1 { function f1(c1: C1): invalid; function f2(c2: C2): invalid; class C2 implements m3.i3 { - get p1(): invalid; + get p1(): C1; set p1(arg1: C1); f55(): invalid; } @@ -165,40 +165,39 @@ declare namespace mglo5 { /// [Errors] //// -complicatedPrivacy.ts(5,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -complicatedPrivacy.ts(7,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(5,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +complicatedPrivacy.ts(7,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations complicatedPrivacy.ts(11,24): error TS1054: A 'get' accessor cannot have parameters. -complicatedPrivacy.ts(11,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -complicatedPrivacy.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -complicatedPrivacy.ts(24,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -complicatedPrivacy.ts(33,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(18,20): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +complicatedPrivacy.ts(24,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +complicatedPrivacy.ts(33,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations complicatedPrivacy.ts(35,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. complicatedPrivacy.ts(35,6): error TS2693: 'number' only refers to a type, but is being used as a value here. -complicatedPrivacy.ts(40,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(40,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported member 'i6'. -complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +complicatedPrivacy.ts(74,13): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -==== complicatedPrivacy.ts (12 errors) ==== +==== complicatedPrivacy.ts (11 errors) ==== module m1 { export module m2 { export function f1(c1: C1) { ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 complicatedPrivacy.ts:5:25: Add a return type to the function declaration } export function f2(c2: C2) { ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 complicatedPrivacy.ts:7:25: Add a return type to the function declaration } export class C2 implements m3.i3 { public get p1(arg) { ~~ !!! error TS1054: A 'get' accessor cannot have parameters. - ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. return new C1(); } @@ -207,7 +206,8 @@ complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requi public f55() { ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 complicatedPrivacy.ts:18:20: Add a return type to the method return "Hello world"; } } @@ -215,7 +215,8 @@ complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requi export function f2(arg1: { x?: C1, y: number }) { ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 complicatedPrivacy.ts:24:21: Add a return type to the function declaration } export function f3(): { @@ -226,7 +227,8 @@ complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requi export function f4(arg1: ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 complicatedPrivacy.ts:33:21: Add a return type to the function declaration { [number]: C1; // Used to be indexer, now it is a computed property ~~~~~~~~ @@ -239,7 +241,8 @@ complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requi export function f5(arg2: { ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 complicatedPrivacy.ts:40:21: Add a return type to the function declaration new (arg1: C1) : C1 }) { } @@ -277,7 +280,8 @@ complicatedPrivacy.ts(74,13): error TS9007: Declaration emit for this file requi !!! error TS2694: Namespace 'mglo5' has no exported member 'i6'. f1() { ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 complicatedPrivacy.ts:74:13: Add a return type to the method return "Hello"; } } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts index 10da9c73d8b8d..4e0b55350d70a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts @@ -86,12 +86,12 @@ export {}; /// [Errors] //// -computedPropertiesNarrowed.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertiesNarrowed.ts(18,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertiesNarrowed.ts(22,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertiesNarrowed.ts(26,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertiesNarrowed.ts(37,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertiesNarrowed.ts(47,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -101,7 +101,8 @@ computedPropertiesNarrowed.ts(47,5): error TS9007: Declaration emit for this fil export let o = { [x]: 1 // error narrow type !== declared type ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 } @@ -116,19 +117,22 @@ computedPropertiesNarrowed.ts(47,5): error TS9007: Declaration emit for this fil export let o32 = { [1-1]: 1 } // error number ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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(); @@ -141,7 +145,8 @@ computedPropertiesNarrowed.ts(47,5): error TS9007: Declaration emit for this fil export let o7 = { [foo()]: 1 // Should error ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 @@ -153,6 +158,7 @@ computedPropertiesNarrowed.ts(47,5): error TS9007: Declaration emit for this fil export const o9 = { [ns().v]: 1 ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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/computedPropertyNames10_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES5.d.ts new file mode 100644 index 0000000000000..0ef3e445cc036 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES5.d.ts @@ -0,0 +1,138 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts] //// + +//// [computedPropertyNames10_ES5.ts] +var s: string; +var n: number; +var a: any; +var v = { + [s]() { }, + [n]() { }, + [s + s]() { }, + [s + n]() { }, + [+s]() { }, + [""]() { }, + [0]() { }, + [a]() { }, + [true]() { }, + [`hello bye`]() { }, + [`hello ${a} bye`]() { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames10_ES5.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare var v: invalid; + +/// [Errors] //// + +computedPropertyNames10_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES5.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES5.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES5.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +==== computedPropertyNames10_ES5.ts (19 errors) ==== + var s: string; + var n: number; + var a: any; + var v = { + [s]() { }, + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:5:5: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + [n]() { }, + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:6:5: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + [s + s]() { }, + ~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:7:5: Add a return type to the method + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + [s + n]() { }, + ~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:8:5: Add a return type to the method + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + [+s]() { }, + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:9:5: Add a return type to the method + ~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + [""]() { }, + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:10:5: Add a return type to the method + [0]() { }, + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:11:5: Add a return type to the method + [a]() { }, + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:12:5: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + [true]() { }, + ~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:13:5: Add a return type to the method + ~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + [`hello bye`]() { }, + ~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:14:5: Add a return type to the method + [`hello ${a} bye`]() { } + ~~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES5.ts:15:5: Add a return type to the method + ~~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES6.d.ts new file mode 100644 index 0000000000000..a0b1820e06755 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES6.d.ts @@ -0,0 +1,138 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts] //// + +//// [computedPropertyNames10_ES6.ts] +var s: string; +var n: number; +var a: any; +var v = { + [s]() { }, + [n]() { }, + [s + s]() { }, + [s + n]() { }, + [+s]() { }, + [""]() { }, + [0]() { }, + [a]() { }, + [true]() { }, + [`hello bye`]() { }, + [`hello ${a} bye`]() { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames10_ES6.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare var v: invalid; + +/// [Errors] //// + +computedPropertyNames10_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES6.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES6.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES6.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES6.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames10_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +==== computedPropertyNames10_ES6.ts (19 errors) ==== + var s: string; + var n: number; + var a: any; + var v = { + [s]() { }, + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:5:5: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + [n]() { }, + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:6:5: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + [s + s]() { }, + ~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:7:5: Add a return type to the method + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + [s + n]() { }, + ~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:8:5: Add a return type to the method + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + [+s]() { }, + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:9:5: Add a return type to the method + ~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + [""]() { }, + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:10:5: Add a return type to the method + [0]() { }, + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:11:5: Add a return type to the method + [a]() { }, + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:12:5: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + [true]() { }, + ~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:13:5: Add a return type to the method + ~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + [`hello bye`]() { }, + ~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:14:5: Add a return type to the method + [`hello ${a} bye`]() { } + ~~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9034 computedPropertyNames10_ES6.ts:15:5: Add a return type to the method + ~~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES5.d.ts new file mode 100644 index 0000000000000..5d5019e20c121 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES5.d.ts @@ -0,0 +1,127 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES5.ts] //// + +//// [computedPropertyNames11_ES5.ts] +var s: string; +var n: number; +var a: any; +var v = { + get [s]() { return 0; }, + set [n](v) { }, + get [s + s]() { return 0; }, + set [s + n](v) { }, + get [+s]() { return 0; }, + set [""](v) { }, + get [0]() { return 0; }, + set [a](v) { }, + get [true]() { return 0; }, + set [`hello bye`](v) { }, + get [`hello ${a} bye`]() { return 0; } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames11_ES5.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare var v: invalid; + +/// [Errors] //// + +computedPropertyNames11_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES5.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES5.ts(8,17): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES5.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES5.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +==== computedPropertyNames11_ES5.ts (19 errors) ==== + var s: string; + var n: number; + var a: any; + var v = { + get [s]() { return 0; }, + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES5.ts:5:9: Add a return type to the get accessor declaration + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v + set [n](v) { }, + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames11_ES5.ts:6:9: Add a type to parameter of the set accessor declaration + get [s + s]() { return 0; }, + ~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES5.ts:7:9: Add a return type to the get accessor declaration + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v + set [s + n](v) { }, + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames11_ES5.ts:8:9: Add a type to parameter of the set accessor declaration + get [+s]() { return 0; }, + ~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES5.ts:9:9: Add a return type to the get accessor declaration + ~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v + set [""](v) { }, + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames11_ES5.ts:10:9: Add a type to parameter of the set accessor declaration + get [0]() { return 0; }, + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES5.ts:11:9: Add a return type to the get accessor declaration + set [a](v) { }, + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames11_ES5.ts:12:9: Add a type to parameter of the set accessor declaration + get [true]() { return 0; }, + ~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES5.ts:13:9: Add a return type to the get accessor declaration + ~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v + set [`hello bye`](v) { }, + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames11_ES5.ts:14:9: Add a type to parameter of the set accessor declaration + get [`hello ${a} bye`]() { return 0; } + ~~~~~~~~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES5.ts:15:9: Add a return type to the get accessor declaration + ~~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES6.d.ts new file mode 100644 index 0000000000000..cfc27727a5b20 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES6.d.ts @@ -0,0 +1,127 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES6.ts] //// + +//// [computedPropertyNames11_ES6.ts] +var s: string; +var n: number; +var a: any; +var v = { + get [s]() { return 0; }, + set [n](v) { }, + get [s + s]() { return 0; }, + set [s + n](v) { }, + get [+s]() { return 0; }, + set [""](v) { }, + get [0]() { return 0; }, + set [a](v) { }, + get [true]() { return 0; }, + set [`hello bye`](v) { }, + get [`hello ${a} bye`]() { return 0; } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames11_ES6.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare var v: invalid; + +/// [Errors] //// + +computedPropertyNames11_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES6.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES6.ts(8,17): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES6.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames11_ES6.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +==== computedPropertyNames11_ES6.ts (19 errors) ==== + var s: string; + var n: number; + var a: any; + var v = { + get [s]() { return 0; }, + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES6.ts:5:9: Add a return type to the get accessor declaration + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v + set [n](v) { }, + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames11_ES6.ts:6:9: Add a type to parameter of the set accessor declaration + get [s + s]() { return 0; }, + ~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES6.ts:7:9: Add a return type to the get accessor declaration + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v + set [s + n](v) { }, + ~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames11_ES6.ts:8:9: Add a type to parameter of the set accessor declaration + get [+s]() { return 0; }, + ~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES6.ts:9:9: Add a return type to the get accessor declaration + ~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v + set [""](v) { }, + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames11_ES6.ts:10:9: Add a type to parameter of the set accessor declaration + get [0]() { return 0; }, + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES6.ts:11:9: Add a return type to the get accessor declaration + set [a](v) { }, + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames11_ES6.ts:12:9: Add a type to parameter of the set accessor declaration + get [true]() { return 0; }, + ~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES6.ts:13:9: Add a return type to the get accessor declaration + ~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v + set [`hello bye`](v) { }, + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames11_ES6.ts:14:9: Add a type to parameter of the set accessor declaration + get [`hello ${a} bye`]() { return 0; } + ~~~~~~~~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames11_ES6.ts:15:9: Add a return type to the get accessor declaration + ~~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts index 8da0faef43857..3e7778c04bd79 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts @@ -38,15 +38,15 @@ declare class C { /// [Errors] //// computedPropertyNames12_ES5.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames12_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames12_ES5.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames12_ES5.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames12_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames12_ES5.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations computedPropertyNames12_ES5.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames12_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames12_ES5.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -60,14 +60,15 @@ computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [n] = n; ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +!!! related TS9029 computedPropertyNames12_ES5.ts:6:5: Add a type annotation to the property [n] static [s + s]: string; ~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -83,7 +84,7 @@ computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static [true]: number; ~~~~~~~~~~~ !!! 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/tsc/computedPropertyNames12_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts index 9031721f1aa77..4f3b36fc6edb1 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts @@ -38,15 +38,15 @@ declare class C { /// [Errors] //// computedPropertyNames12_ES6.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames12_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames12_ES6.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames12_ES6.ts(6,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames12_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames12_ES6.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations computedPropertyNames12_ES6.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames12_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames12_ES6.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -60,14 +60,15 @@ computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [n] = n; ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +!!! related TS9029 computedPropertyNames12_ES6.ts:6:5: Add a type annotation to the property [n] static [s + s]: string; ~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -83,7 +84,7 @@ computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static [true]: number; ~~~~~~~~~~~ !!! 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/tsc/computedPropertyNames13_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES5.d.ts new file mode 100644 index 0000000000000..28e4393ed807f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES5.d.ts @@ -0,0 +1,91 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES5.ts] //// + +//// [computedPropertyNames13_ES5.ts] +var s: string; +var n: number; +var a: any; +class C { + [s]() {} + [n]() { } + static [s + s]() { } + [s + n]() { } + [+s]() { } + static [""]() { } + [0]() { } + [a]() { } + static [true]() { } + [`hello bye`]() { } + static [`hello ${a} bye`]() { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames13_ES5.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare class C { + [s](): invalid; + [n](): invalid; + static [""](): invalid; + [0](): invalid; + [a](): invalid; + [`hello bye`](): invalid; +} + +/// [Errors] //// + +computedPropertyNames13_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames13_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames13_ES5.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames13_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + + +==== computedPropertyNames13_ES5.ts (9 errors) ==== + var s: string; + var n: number; + var a: any; + class C { + [s]() {} + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES5.ts:5:5: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + [n]() { } + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES5.ts:6:5: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static [s + s]() { } + [s + n]() { } + [+s]() { } + static [""]() { } + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES5.ts:10:12: Add a return type to the method + [0]() { } + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES5.ts:11:5: Add a return type to the method + [a]() { } + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES5.ts:12:5: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static [true]() { } + [`hello bye`]() { } + ~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES5.ts:14:5: Add a return type to the method + static [`hello ${a} bye`]() { } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES6.d.ts new file mode 100644 index 0000000000000..6e574ac6da49a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES6.d.ts @@ -0,0 +1,91 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES6.ts] //// + +//// [computedPropertyNames13_ES6.ts] +var s: string; +var n: number; +var a: any; +class C { + [s]() {} + [n]() { } + static [s + s]() { } + [s + n]() { } + [+s]() { } + static [""]() { } + [0]() { } + [a]() { } + static [true]() { } + [`hello bye`]() { } + static [`hello ${a} bye`]() { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames13_ES6.d.ts] +declare var s: string; +declare var n: number; +declare var a: any; +declare class C { + [s](): invalid; + [n](): invalid; + static [""](): invalid; + [0](): invalid; + [a](): invalid; + [`hello bye`](): invalid; +} + +/// [Errors] //// + +computedPropertyNames13_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames13_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames13_ES6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames13_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + + +==== computedPropertyNames13_ES6.ts (9 errors) ==== + var s: string; + var n: number; + var a: any; + class C { + [s]() {} + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES6.ts:5:5: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + [n]() { } + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES6.ts:6:5: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static [s + s]() { } + [s + n]() { } + [+s]() { } + static [""]() { } + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES6.ts:10:12: Add a return type to the method + [0]() { } + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES6.ts:11:5: Add a return type to the method + [a]() { } + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES6.ts:12:5: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static [true]() { } + [`hello bye`]() { } + ~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames13_ES6.ts:14:5: Add a return type to the method + static [`hello ${a} bye`]() { } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES5.d.ts new file mode 100644 index 0000000000000..1ea25be13cb0a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES5.d.ts @@ -0,0 +1,70 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES5.ts] //// + +//// [computedPropertyNames14_ES5.ts] +var b: boolean; +class C { + [b]() {} + static [true]() { } + [[]]() { } + static [{}]() { } + [undefined]() { } + static [null]() { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames14_ES5.d.ts] +declare var b: boolean; +declare class C { + [b](): invalid; + [undefined](): invalid; +} + +/// [Errors] //// + +computedPropertyNames14_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames14_ES5.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames14_ES5.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames14_ES5.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames14_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames14_ES5.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames14_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames14_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames14_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames14_ES5.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + + +==== computedPropertyNames14_ES5.ts (10 errors) ==== + var b: boolean; + class C { + [b]() {} + ~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames14_ES5.ts:3:5: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static [true]() { } + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [[]]() { } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + static [{}]() { } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [undefined]() { } + ~~~~~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames14_ES5.ts:7:5: Add a return type to the method + ~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static [null]() { } + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES6.d.ts new file mode 100644 index 0000000000000..ada608f7fd88d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES6.d.ts @@ -0,0 +1,70 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES6.ts] //// + +//// [computedPropertyNames14_ES6.ts] +var b: boolean; +class C { + [b]() {} + static [true]() { } + [[]]() { } + static [{}]() { } + [undefined]() { } + static [null]() { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames14_ES6.d.ts] +declare var b: boolean; +declare class C { + [b](): invalid; + [undefined](): invalid; +} + +/// [Errors] //// + +computedPropertyNames14_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames14_ES6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames14_ES6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames14_ES6.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames14_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames14_ES6.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames14_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames14_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames14_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames14_ES6.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + + +==== computedPropertyNames14_ES6.ts (10 errors) ==== + var b: boolean; + class C { + [b]() {} + ~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames14_ES6.ts:3:5: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static [true]() { } + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [[]]() { } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + static [{}]() { } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + [undefined]() { } + ~~~~~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames14_ES6.ts:7:5: Add a return type to the method + ~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static [null]() { } + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES5.d.ts new file mode 100644 index 0000000000000..34f81f50bccea --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES5.d.ts @@ -0,0 +1,66 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts] //// + +//// [computedPropertyNames15_ES5.ts] +var p1: number | string; +var p2: number | number[]; +var p3: string | boolean; +class C { + [p1]() { } + [p2]() { } + [p3]() { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames15_ES5.d.ts] +declare var p1: number | string; +declare var p2: number | number[]; +declare var p3: string | boolean; +declare class C { + [p1](): invalid; + [p2](): invalid; + [p3](): invalid; +} + +/// [Errors] //// + +computedPropertyNames15_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames15_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames15_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames15_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames15_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames15_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames15_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames15_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +==== computedPropertyNames15_ES5.ts (8 errors) ==== + var p1: number | string; + var p2: number | number[]; + var p3: string | boolean; + class C { + [p1]() { } + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames15_ES5.ts:5:5: Add a return type to the method + ~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + [p2]() { } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames15_ES5.ts:6:5: Add a return type to the method + ~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + [p3]() { } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames15_ES5.ts:7:5: Add a return type to the method + ~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES6.d.ts new file mode 100644 index 0000000000000..0077e1712c6dd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES6.d.ts @@ -0,0 +1,66 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES6.ts] //// + +//// [computedPropertyNames15_ES6.ts] +var p1: number | string; +var p2: number | number[]; +var p3: string | boolean; +class C { + [p1]() { } + [p2]() { } + [p3]() { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames15_ES6.d.ts] +declare var p1: number | string; +declare var p2: number | number[]; +declare var p3: string | boolean; +declare class C { + [p1](): invalid; + [p2](): invalid; + [p3](): invalid; +} + +/// [Errors] //// + +computedPropertyNames15_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames15_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames15_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames15_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames15_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames15_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames15_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames15_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +==== computedPropertyNames15_ES6.ts (8 errors) ==== + var p1: number | string; + var p2: number | number[]; + var p3: string | boolean; + class C { + [p1]() { } + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames15_ES6.ts:5:5: Add a return type to the method + ~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + [p2]() { } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames15_ES6.ts:6:5: Add a return type to the method + ~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + [p3]() { } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames15_ES6.ts:7:5: Add a return type to the method + ~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts index 3ad2143f2b9c5..93ad39159aba4 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts @@ -37,46 +37,55 @@ declare class C { /// [Errors] //// -computedPropertyNames16_ES5.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES5.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES5.ts(6,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES5.ts(10,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES5.ts(11,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES5.ts(12,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES5.ts(12,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES5.ts(14,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES5.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames16_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames16_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES5.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES5.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames16_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -==== computedPropertyNames16_ES5.ts (8 errors) ==== +==== computedPropertyNames16_ES5.ts (9 errors) ==== var s: string; var n: number; var a: any; class C { get [s]() { return 0;} ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames16_ES5.ts:5:9: Add a return type to the get accessor declaration + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations set [n](v) { } ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames16_ES5.ts:6:9: Add a type to parameter of the set accessor declaration static get [s + s]() { return 0; } set [s + n](v) { } get [+s]() { return 0; } static set [""](v) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames16_ES5.ts:10:16: Add a type to parameter of the set accessor declaration get [0]() { return 0; } ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames16_ES5.ts:11:9: Add a return type to the get accessor declaration set [a](v) { } ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames16_ES5.ts:12:9: Add a type to parameter of the set accessor declaration static get [true]() { return 0; } set [`hello bye`](v) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames16_ES5.ts:14:9: Add a type to parameter of the set accessor declaration get [`hello ${a} bye`]() { return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts index 9f5ab9633a99b..76bfbdcdbaccb 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts @@ -37,46 +37,55 @@ declare class C { /// [Errors] //// -computedPropertyNames16_ES6.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES6.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES6.ts(6,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES6.ts(10,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES6.ts(11,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES6.ts(12,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES6.ts(12,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames16_ES6.ts(14,23): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames16_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES6.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames16_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames16_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES6.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES6.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames16_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -==== computedPropertyNames16_ES6.ts (8 errors) ==== +==== computedPropertyNames16_ES6.ts (9 errors) ==== var s: string; var n: number; var a: any; class C { get [s]() { return 0;} ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames16_ES6.ts:5:9: Add a return type to the get accessor declaration + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations set [n](v) { } ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames16_ES6.ts:6:9: Add a type to parameter of the set accessor declaration static get [s + s]() { return 0; } set [s + n](v) { } get [+s]() { return 0; } static set [""](v) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames16_ES6.ts:10:16: Add a type to parameter of the set accessor declaration get [0]() { return 0; } ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames16_ES6.ts:11:9: Add a return type to the get accessor declaration set [a](v) { } ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames16_ES6.ts:12:9: Add a type to parameter of the set accessor declaration static get [true]() { return 0; } set [`hello bye`](v) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames16_ES6.ts:14:9: Add a type to parameter of the set accessor declaration get [`hello ${a} bye`]() { return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES5.d.ts new file mode 100644 index 0000000000000..78a3aadf6266b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES5.d.ts @@ -0,0 +1,70 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES5.ts] //// + +//// [computedPropertyNames17_ES5.ts] +var b: boolean; +class C { + get [b]() { return 0;} + static set [true](v) { } + get [[]]() { return 0; } + set [{}](v) { } + static get [undefined]() { return 0; } + set [null](v) { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames17_ES5.d.ts] +declare var b: boolean; +declare class C { + get [b](): invalid; + static get [undefined](): invalid; +} + +/// [Errors] //// + +computedPropertyNames17_ES5.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames17_ES5.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames17_ES5.ts(3,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames17_ES5.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames17_ES5.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames17_ES5.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames17_ES5.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames17_ES5.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames17_ES5.ts(7,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames17_ES5.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + + +==== computedPropertyNames17_ES5.ts (10 errors) ==== + var b: boolean; + class C { + get [b]() { return 0;} + ~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames17_ES5.ts:3:9: Add a return type to the get accessor declaration + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static set [true](v) { } + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + get [[]]() { return 0; } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + set [{}](v) { } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + static get [undefined]() { return 0; } + ~~~~~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames17_ES5.ts:7:16: Add a return type to the get accessor declaration + ~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + set [null](v) { } + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES6.d.ts new file mode 100644 index 0000000000000..941baee991217 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES6.d.ts @@ -0,0 +1,70 @@ +//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts] //// + +//// [computedPropertyNames17_ES6.ts] +var b: boolean; +class C { + get [b]() { return 0;} + static set [true](v) { } + get [[]]() { return 0; } + set [{}](v) { } + static get [undefined]() { return 0; } + set [null](v) { } +} + +/// [Declarations] //// + + + +//// [computedPropertyNames17_ES6.d.ts] +declare var b: boolean; +declare class C { + get [b](): invalid; + static get [undefined](): invalid; +} + +/// [Errors] //// + +computedPropertyNames17_ES6.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames17_ES6.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames17_ES6.ts(3,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames17_ES6.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames17_ES6.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames17_ES6.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames17_ES6.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. +computedPropertyNames17_ES6.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames17_ES6.ts(7,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames17_ES6.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + + +==== computedPropertyNames17_ES6.ts (10 errors) ==== + var b: boolean; + class C { + get [b]() { return 0;} + ~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames17_ES6.ts:3:9: Add a return type to the get accessor declaration + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + static set [true](v) { } + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + get [[]]() { return 0; } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + set [{}](v) { } + ~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + static get [undefined]() { return 0; } + ~~~~~~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + ~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames17_ES6.ts:7:16: Add a return type to the get accessor declaration + ~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + set [null](v) { } + ~~~~~~ +!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts index e1ed989cdfd84..630d6c96420e6 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts @@ -30,46 +30,64 @@ declare class C { /// [Errors] //// -computedPropertyNames2_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames2_ES5.ts(5,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames2_ES5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames2_ES5.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames2_ES5.ts(5,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames2_ES5.ts(6,9): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES5.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames2_ES5.ts(7,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames2_ES5.ts(7,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES5.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames2_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames2_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames2_ES5.ts(7,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES5.ts(8,16): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES5.ts(8,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames2_ES5.ts(9,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames2_ES5.ts(9,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES5.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames2_ES5.ts(8,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames2_ES5.ts(9,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames2_ES5.ts(9,31): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -==== computedPropertyNames2_ES5.ts (10 errors) ==== +==== computedPropertyNames2_ES5.ts (14 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { [methodName]() { } ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames2_ES5.ts:4:5: Add a return type to the method + ~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static [methodName]() { } ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames2_ES5.ts:5:12: Add a return type to the method + ~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames2_ES5.ts:6:9: Add a return type to the get accessor declaration + ~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations set [accessorName](v) { } ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames2_ES5.ts:7:9: Add a type to parameter of the set accessor declaration static get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames2_ES5.ts:8:16: Add a return type to the get accessor declaration + ~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static set [accessorName](v) { } ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames2_ES5.ts:9:16: Add a type to parameter of the set accessor declaration } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts index afd514f26ce95..45714ef05a0bd 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts @@ -30,46 +30,64 @@ declare class C { /// [Errors] //// -computedPropertyNames2_ES6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames2_ES6.ts(5,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames2_ES6.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames2_ES6.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames2_ES6.ts(5,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames2_ES6.ts(6,9): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES6.ts(6,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames2_ES6.ts(7,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames2_ES6.ts(7,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES6.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames2_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames2_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames2_ES6.ts(7,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES6.ts(8,16): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES6.ts(8,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames2_ES6.ts(9,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames2_ES6.ts(9,31): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames2_ES6.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames2_ES6.ts(8,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames2_ES6.ts(9,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames2_ES6.ts(9,31): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -==== computedPropertyNames2_ES6.ts (10 errors) ==== +==== computedPropertyNames2_ES6.ts (14 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { [methodName]() { } ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames2_ES6.ts:4:5: Add a return type to the method + ~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static [methodName]() { } ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNames2_ES6.ts:5:12: Add a return type to the method + ~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames2_ES6.ts:6:9: Add a return type to the get accessor declaration + ~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations set [accessorName](v) { } ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames2_ES6.ts:7:9: Add a type to parameter of the set accessor declaration static get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 computedPropertyNames2_ES6.ts:8:16: Add a return type to the get accessor declaration + ~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static set [accessorName](v) { } ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 computedPropertyNames2_ES6.ts:9:16: Add a type to parameter of the set accessor declaration } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts index 44f3a81010ddb..e9d75efdbdfff 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts @@ -30,46 +30,64 @@ declare var v: invalid; /// [Errors] //// -computedPropertyNames4_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES5.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES5.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES5.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES5.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES5.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES5.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations +computedPropertyNames4_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES5.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations +computedPropertyNames4_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== computedPropertyNames4_ES5.ts (8 errors) ==== +==== computedPropertyNames4_ES5.ts (10 errors) ==== var s: string; var n: number; var a: any; var v = { [s]: 0, ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v [n]: n, ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v + ~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9035 computedPropertyNames4_ES5.ts:6:10: Add a type assertion to this expression to make type type explicit [s + s]: 1, ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v [s + n]: 2, ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v [+s]: s, ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v + ~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v +!!! related TS9035 computedPropertyNames4_ES5.ts:9:11: Add a type assertion to this expression to make type type explicit [""]: 0, [0]: 0, [a]: 1, ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v [true]: 0, ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v [`hello bye`]: 0, [`hello ${a} bye`]: 0 ~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts index b5d6865a3e0f9..e1efb6b73b68f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts @@ -30,46 +30,64 @@ declare var v: invalid; /// [Errors] //// -computedPropertyNames4_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES6.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES6.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES6.ts(12,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES6.ts(13,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNames4_ES6.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames4_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES6.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations +computedPropertyNames4_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES6.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations +computedPropertyNames4_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== computedPropertyNames4_ES6.ts (8 errors) ==== +==== computedPropertyNames4_ES6.ts (10 errors) ==== var s: string; var n: number; var a: any; var v = { [s]: 0, ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v [n]: n, ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v + ~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9035 computedPropertyNames4_ES6.ts:6:10: Add a type assertion to this expression to make type type explicit [s + s]: 1, ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v [s + n]: 2, ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v [+s]: s, ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v + ~ +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v +!!! related TS9035 computedPropertyNames4_ES6.ts:9:11: Add a type assertion to this expression to make type type explicit [""]: 0, [0]: 0, [a]: 1, ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v [true]: 0, ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v [`hello bye`]: 0, [`hello ${a} bye`]: 0 ~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts index 9a624c0bf7a45..fa0adfc60a51c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts @@ -22,16 +22,16 @@ declare var v: invalid; /// [Errors] //// computedPropertyNames5_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES5.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames5_ES5.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames5_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames5_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames5_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames5_ES5.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ==== computedPropertyNames5_ES5.ts (11 errors) ==== @@ -41,7 +41,8 @@ computedPropertyNames5_ES5.ts(8,5): error TS9007: Declaration emit for this file ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v [true]: 1, ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -49,20 +50,24 @@ computedPropertyNames5_ES5.ts(8,5): error TS9007: Declaration emit for this file ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v [{}]: 0, ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v [undefined]: undefined, ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v [null]: null ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts index 9aaeb97ec0a85..73c97e9ca2298 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts @@ -22,16 +22,16 @@ declare var v: invalid; /// [Errors] //// computedPropertyNames5_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames5_ES6.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames5_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames5_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames5_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames5_ES6.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames5_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ==== computedPropertyNames5_ES6.ts (11 errors) ==== @@ -41,7 +41,8 @@ computedPropertyNames5_ES6.ts(8,5): error TS9007: Declaration emit for this file ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v [true]: 1, ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -49,20 +50,24 @@ computedPropertyNames5_ES6.ts(8,5): error TS9007: Declaration emit for this file ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v [{}]: 0, ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v [undefined]: undefined, ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v [null]: null ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts index 083b60320f903..6a5a6f5efa57f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts @@ -22,11 +22,11 @@ declare var v: invalid; /// [Errors] //// -computedPropertyNames6_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames6_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames6_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames6_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames6_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames6_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames6_ES5.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames6_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ==== computedPropertyNames6_ES5.ts (5 errors) ==== @@ -36,15 +36,18 @@ computedPropertyNames6_ES5.ts(7,5): error TS9007: Declaration emit for this file var v = { [p1]: 0, ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v [p2]: 1, ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v [p3]: 2 ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts index 49275578669ef..5a161b7ef2dbe 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts @@ -22,11 +22,11 @@ declare var v: invalid; /// [Errors] //// -computedPropertyNames6_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames6_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames6_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames6_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames6_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames6_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames6_ES6.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNames6_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ==== computedPropertyNames6_ES6.ts (5 errors) ==== @@ -36,15 +36,18 @@ computedPropertyNames6_ES6.ts(7,5): error TS9007: Declaration emit for this file var v = { [p1]: 0, ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v [p2]: 1, ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v [p3]: 2 ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts index c048cce9b8d89..95f66099bcdaf 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts @@ -25,13 +25,16 @@ declare class C { /// [Errors] //// computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== computedPropertyNamesOnOverloads_ES5.ts (5 errors) ==== +==== computedPropertyNamesOnOverloads_ES5.ts (8 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { @@ -39,13 +42,22 @@ computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9007: Declaration emit for ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:4:5: Add a return type to the method + ~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [methodName](); ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:5:5: Add a return type to the method + ~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [methodName](v?: string) { } ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:6:5: Add a return type to the method + ~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts index 7d628a92d1a98..399752a9d821f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts @@ -25,13 +25,16 @@ declare class C { /// [Errors] //// computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== computedPropertyNamesOnOverloads_ES6.ts (5 errors) ==== +==== computedPropertyNamesOnOverloads_ES6.ts (8 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { @@ -39,13 +42,22 @@ computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9007: Declaration emit for ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:4:5: Add a return type to the method + ~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [methodName](); ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:5:5: Add a return type to the method + ~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [methodName](v?: string) { } ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:6:5: Add a return type to the method + ~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts index 675a12bcdb255..ddd8ee0e33ce3 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts @@ -87,21 +87,21 @@ declare const enum NaNOrInfinity { constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -constEnumErrors.ts(14,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(14,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. -constEnumErrors.ts(15,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(15,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations constEnumErrors.ts(15,10): error TS2474: const enum member initializers must be constant expressions. constEnumErrors.ts(15,13): error TS2339: Property 'Z' does not exist on type 'typeof E1'. -constEnumErrors.ts(22,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(22,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations constEnumErrors.ts(22,13): error TS2476: A const enum member can only be accessed using a string literal. -constEnumErrors.ts(24,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(24,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations constEnumErrors.ts(24,13): error TS2476: A const enum member can only be accessed using a string literal. -constEnumErrors.ts(25,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(25,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations constEnumErrors.ts(25,13): error TS2476: A const enum member can only be accessed using a string literal. constEnumErrors.ts(27,9): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -constEnumErrors.ts(27,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -constEnumErrors.ts(28,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +constEnumErrors.ts(27,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +constEnumErrors.ts(28,9): error TS9017: Only const arrays can be inferred with --isolatedDeclarations constEnumErrors.ts(28,10): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. constEnumErrors.ts(33,5): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. constEnumErrors.ts(41,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. @@ -131,14 +131,14 @@ constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was eval // forward reference to the element of the same enum Y = E1.Z, ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~ !!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. Y1 = E1["Z"] ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~~~ @@ -151,18 +151,21 @@ constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was eval var y0 = E2[1] ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 constEnumErrors.ts:22:5: Add a type annotation to the variable y0 ~ !!! error TS2476: A const enum member can only be accessed using a string literal. var name = "A"; var y1 = E2[name]; ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 constEnumErrors.ts:24:5: Add a type annotation to the variable y1 ~~~~ !!! error TS2476: A const enum member can only be accessed using a string literal. var y2 = E2[`${name}`]; ~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 constEnumErrors.ts:25:5: Add a type annotation to the variable y2 ~~~~~~~~~ !!! error TS2476: A const enum member can only be accessed using a string literal. @@ -170,10 +173,12 @@ constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was eval ~~ !!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 constEnumErrors.ts:27:5: Add a type annotation to the variable x var y = [E2]; ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations +!!! related TS9027 constEnumErrors.ts:28:5: Add a type annotation to the variable y ~~ !!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts index 7c393fd9f0a13..b15704f76e65b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/contextualReturnTypeOfIIFE2.d.ts @@ -24,7 +24,7 @@ declare namespace app { /// [Errors] //// -contextualReturnTypeOfIIFE2.ts(5,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +contextualReturnTypeOfIIFE2.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. ==== contextualReturnTypeOfIIFE2.ts (1 errors) ==== @@ -34,7 +34,7 @@ contextualReturnTypeOfIIFE2.ts(5,1): error TS9009: Assigning properties to funct app.foo.bar = (function () { ~~~~~~~~~~~ -!!! error TS9009: 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. const someFun = (arg: number) => {}; return { someFun }; })(); diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping.d.ts index 973f98b091ded..9bb4d34546191 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping.d.ts @@ -352,10 +352,10 @@ declare var x: B; /// [Errors] //// -contextualTyping.ts(146,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -contextualTyping.ts(156,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +contextualTyping.ts(146,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +contextualTyping.ts(156,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations contextualTyping.ts(189,18): error TS2384: Overload signatures must all be ambient or non-ambient. -contextualTyping.ts(193,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +contextualTyping.ts(193,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' but required in type 'B'. @@ -507,7 +507,8 @@ contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' b // CONTEXT: Function call function c9t5(f: (n: number) => IFoo) {}; ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 contextualTyping.ts:146:10: Add a return type to the function declaration c9t5(function(n) { return ({}); }); @@ -519,7 +520,8 @@ contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' b class C11t5 { constructor(f: (n: number) => IFoo) { } }; var i = new C11t5(function(n) { return ({}) }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 contextualTyping.ts:156:5: Add a type annotation to the variable i // CONTEXT: Type annotated expression var c12t1 = <(s: string) => string> (function(s) { return s }); @@ -560,7 +562,8 @@ contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' b var efv = EF1(1,2); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 contextualTyping.ts:193:5: Add a type annotation to the variable efv // contextually typing from ambient class declarations diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/correlatedUnions.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/correlatedUnions.d.ts index 2f3bd8d92c77f..e2684ad6db46f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/correlatedUnions.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/correlatedUnions.d.ts @@ -473,21 +473,21 @@ declare function getValueConcrete(o: Partial, k: K): /// [Errors] //// -correlatedUnions.ts(10,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(36,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(37,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(44,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(76,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(113,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(123,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(128,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(142,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(166,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(170,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(175,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(180,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(218,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -502,7 +502,8 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir function processRecord(rec: UnionRecord) { ~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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); } @@ -530,10 +531,12 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir function renderTextField(props: TextFieldData) {} ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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, @@ -542,7 +545,8 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir function renderField(field: FormField) { ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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); } @@ -576,7 +580,8 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir function process(data: DataEntry[]) { ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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) @@ -615,7 +620,8 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir function processEvents(events: Ev[]) { ~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 }); } @@ -633,7 +639,8 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ }); ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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({ ~~~~~~~~~~~~~~~~~~~~~ @@ -643,7 +650,8 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ }); ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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]); @@ -656,7 +664,8 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir function ff1() { ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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] @@ -682,27 +691,31 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir function f1(funcs: Funcs, key: K, arg: ArgMap[K]) { ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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; } @@ -742,7 +755,8 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir function foo(prop: T, f: Required) { ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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]); } @@ -757,7 +771,8 @@ correlatedUnions.ts(231,20): error TS9007: Declaration emit for this file requir const BAR_LOOKUP = makeCompleteLookupMapping(ALL_BARS, 'name'); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitHasTypesRefOnNamespaceUse.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitHasTypesRefOnNamespaceUse.d.ts index 1b545ed50901a..642d0f5d96c17 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitHasTypesRefOnNamespaceUse.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitHasTypesRefOnNamespaceUse.d.ts @@ -23,13 +23,13 @@ declare class Src implements NS.Dep { /// [Errors] //// -/src/index.ts(1,22): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to dep to unblock declaration emit. +/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 TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to dep to unblock declaration emit. +!!! 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 { diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName.d.ts index 8420c9189bcfa..3d23184f9673d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName.d.ts @@ -33,7 +33,7 @@ export default _default; /// [Errors] //// -other.ts(7,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +other.ts(7,16): error TS9013: Expression type can't be inferred with --isolatedDeclarations ==== other.ts (1 errors) ==== @@ -49,7 +49,7 @@ other.ts(7,16): error TS9007: Declaration emit for this file requires type resol ~~~~~~~~~~~~~~~ }); ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations ==== main.ts (0 errors) ==== import other from "./other"; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName2.d.ts index 5986a5a04377a..0725d22ac1354 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName2.d.ts @@ -33,7 +33,7 @@ export default _default; /// [Errors] //// -other.ts(7,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +other.ts(7,16): error TS9013: Expression type can't be inferred with --isolatedDeclarations ==== other.ts (1 errors) ==== @@ -49,7 +49,7 @@ other.ts(7,16): error TS9007: Declaration emit for this file requires type resol ~~~~~~~~~~~~~~~ }); ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations ==== main.ts (0 errors) ==== import * as other2 from "./other"; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationFilesWithTypeReferences2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationFilesWithTypeReferences2.d.ts index 118d9a58b5a11..abe1a7644c416 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/declarationFilesWithTypeReferences2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationFilesWithTypeReferences2.d.ts @@ -19,7 +19,7 @@ declare function foo(): Error2; /// [Errors] //// -/app.ts(1,17): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to node to unblock declaration emit. +/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) ==== @@ -30,6 +30,6 @@ declare function foo(): Error2; ==== /app.ts (1 errors) ==== function foo(): Error2 { ~~~~~~ -!!! error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to node to unblock declaration emit. +!!! 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/decoratorMetadataWithImportDeclarationNameCollision7.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/decoratorMetadataWithImportDeclarationNameCollision7.d.ts index 291f028c94a17..be65499aadd39 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/decoratorMetadataWithImportDeclarationNameCollision7.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/decoratorMetadataWithImportDeclarationNameCollision7.d.ts @@ -41,7 +41,7 @@ export { MyClass }; /// [Errors] //// -db.ts(2,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +db.ts(2,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations service.ts(7,9): error TS2702: 'db' only refers to a type, but is being used as a namespace here. service.ts(7,9): error TS4031: Public property 'db' of exported class has or is using private name 'db'. service.ts(9,21): error TS2702: 'db' only refers to a type, but is being used as a namespace here. @@ -52,7 +52,8 @@ service.ts(9,21): error TS4063: Parameter 'db' of constructor from exported clas export default class db { public doSomething() { ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 db.ts:2:12: Add a return type to the method } } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts index d84d143a8a5f6..19e7ab3f05dbc 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts @@ -270,16 +270,16 @@ declare class I { /// [Errors] //// -decoratorsOnComputedProperties.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations decoratorsOnComputedProperties.ts(18,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(19,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(20,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(21,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(21,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(21,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(22,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(22,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(22,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(23,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(23,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(23,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(27,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(28,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(29,5): error TS1206: Decorators are not valid here. @@ -294,11 +294,11 @@ decoratorsOnComputedProperties.ts(52,5): error TS1166: A computed property name decoratorsOnComputedProperties.ts(53,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(54,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(55,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(55,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(55,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(56,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(56,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(56,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(57,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(57,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(57,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(62,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(63,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(64,5): error TS1206: Decorators are not valid here. @@ -313,11 +313,11 @@ decoratorsOnComputedProperties.ts(88,5): error TS1166: A computed property name decoratorsOnComputedProperties.ts(89,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(90,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(92,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(92,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(92,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(93,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(93,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(93,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(94,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(94,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(94,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(98,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(99,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(100,5): error TS1206: Decorators are not valid here. @@ -332,11 +332,11 @@ decoratorsOnComputedProperties.ts(124,5): error TS1166: A computed property name decoratorsOnComputedProperties.ts(125,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(126,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(128,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(128,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(128,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(129,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(129,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(129,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(131,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(131,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(131,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(135,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(136,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(137,5): error TS1206: Decorators are not valid here. @@ -351,11 +351,11 @@ decoratorsOnComputedProperties.ts(162,5): error TS1166: A computed property name decoratorsOnComputedProperties.ts(163,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(164,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(166,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(166,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(166,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(167,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(167,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(167,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(169,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(169,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +decoratorsOnComputedProperties.ts(169,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations decoratorsOnComputedProperties.ts(173,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(174,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(175,5): error TS1206: Decorators are not valid here. @@ -372,7 +372,8 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid ==== decoratorsOnComputedProperties.ts (97 errors) ==== function x(o: object, k: PropertyKey) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 decoratorsOnComputedProperties.ts:1:10: Add a return type to the function declaration let i = 0; function foo(): string { return ++i + ""; } @@ -402,17 +403,17 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations @x [fieldNameB]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations @x [fieldNameC]: any = null; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } void class B { @@ -474,17 +475,17 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations @x [fieldNameB]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations @x [fieldNameC]: any = null; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ["some" + "method"]() {} } @@ -549,17 +550,17 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations @x [fieldNameB]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations @x [fieldNameC]: any = null; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } void class F { @@ -623,18 +624,18 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations @x [fieldNameB]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ["some" + "method2"]() {} @x [fieldNameC]: any = null; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } void class H { @@ -699,18 +700,18 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations @x [fieldNameB]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ["some" + "method2"]() {} @x [fieldNameC]: any = null; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } void class J { diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers.d.ts new file mode 100644 index 0000000000000..9c0758310a191 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers.d.ts @@ -0,0 +1,144 @@ +//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers.ts] //// + +//// [derivedClassOverridesProtectedMembers.ts] +var x: { foo: string; } +var y: { foo: string; bar: string; } + +class Base { + protected a: typeof x; + protected b(a: typeof x) { } + protected get c() { return x; } + protected set c(v: typeof x) { } + protected d: (a: typeof x) => void; + + protected static r: typeof x; + protected static s(a: typeof x) { } + protected static get t() { return x; } + protected static set t(v: typeof x) { } + protected static u: (a: typeof x) => void; + + constructor(a: typeof x) { } +} + +class Derived extends Base { + protected a: typeof y; + protected b(a: typeof y) { } + protected get c() { return y; } + protected set c(v: typeof y) { } + protected d: (a: typeof y) => void; + + protected static r: typeof y; + protected static s(a: typeof y) { } + protected static get t() { return y; } + protected static set t(a: typeof y) { } + protected static u: (a: typeof y) => void; + + constructor(a: typeof y) { super(x) } +} + + +/// [Declarations] //// + + + +//// [derivedClassOverridesProtectedMembers.d.ts] +declare var x: { + foo: string; +}; +declare var y: { + foo: string; + bar: string; +}; +declare class Base { + protected a: typeof x; + protected b(a: typeof x): invalid; + protected get c(): { + foo: string; + }; + protected set c(v: typeof x); + protected d: (a: typeof x) => void; + protected static r: typeof x; + protected static s(a: typeof x): invalid; + protected static get t(): { + foo: string; + }; + protected static set t(v: typeof x); + protected static u: (a: typeof x) => void; + constructor(a: typeof x); +} +declare class Derived extends Base { + protected a: typeof y; + protected b(a: typeof y): invalid; + protected get c(): { + foo: string; + bar: string; + }; + protected set c(v: typeof y); + protected d: (a: typeof y) => void; + protected static r: typeof y; + protected static s(a: typeof y): invalid; + protected static get t(): { + foo: string; + bar: string; + }; + protected static set t(a: typeof y); + protected static u: (a: typeof y) => void; + constructor(a: typeof y); +} + +/// [Errors] //// + +derivedClassOverridesProtectedMembers.ts(6,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers.ts(12,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers.ts(22,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers.ts(28,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + + +==== derivedClassOverridesProtectedMembers.ts (4 errors) ==== + var x: { foo: string; } + var y: { foo: string; bar: string; } + + class Base { + protected a: typeof x; + protected b(a: typeof x) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers.ts:6:15: Add a return type to the method + protected get c() { return x; } + protected set c(v: typeof x) { } + protected d: (a: typeof x) => void; + + protected static r: typeof x; + protected static s(a: typeof x) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers.ts:12:22: Add a return type to the method + protected static get t() { return x; } + protected static set t(v: typeof x) { } + protected static u: (a: typeof x) => void; + + constructor(a: typeof x) { } + } + + class Derived extends Base { + protected a: typeof y; + protected b(a: typeof y) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers.ts:22:15: Add a return type to the method + protected get c() { return y; } + protected set c(v: typeof y) { } + protected d: (a: typeof y) => void; + + protected static r: typeof y; + protected static s(a: typeof y) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers.ts:28:22: Add a return type to the method + protected static get t() { return y; } + protected static set t(a: typeof y) { } + protected static u: (a: typeof y) => void; + + constructor(a: typeof y) { super(x) } + } + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers2.d.ts new file mode 100644 index 0000000000000..c7570c544f5aa --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers2.d.ts @@ -0,0 +1,260 @@ +//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers2.ts] //// + +//// [derivedClassOverridesProtectedMembers2.ts] +var x: { foo: string; } +var y: { foo: string; bar: string; } + +class Base { + protected a: typeof x; + protected b(a: typeof x) { } + protected get c() { return x; } + protected set c(v: typeof x) { } + protected d: (a: typeof x) => void ; + + protected static r: typeof x; + protected static s(a: typeof x) { } + protected static get t() { return x; } + protected static set t(v: typeof x) { } + protected static u: (a: typeof x) => void ; + +constructor(a: typeof x) { } +} + +// Increase visibility of all protected members to public +class Derived extends Base { + a: typeof y; + b(a: typeof y) { } + get c() { return y; } + set c(v: typeof y) { } + d: (a: typeof y) => void; + + static r: typeof y; + static s(a: typeof y) { } + static get t() { return y; } + static set t(a: typeof y) { } + static u: (a: typeof y) => void; + + constructor(a: typeof y) { super(a); } +} + +var d: Derived = new Derived(y); +var r1 = d.a; +var r2 = d.b(y); +var r3 = d.c; +var r3a = d.d; +d.c = y; +var r4 = Derived.r; +var r5 = Derived.s(y); +var r6 = Derived.t; +var r6a = Derived.u; +Derived.t = y; + +class Base2 { + [i: string]: Object; + [i: number]: typeof x; +} + +class Derived2 extends Base2 { + [i: string]: typeof x; + [i: number]: typeof y; +} + +var d2: Derived2; +var r7 = d2['']; +var r8 = d2[1]; + + + +/// [Declarations] //// + + + +//// [derivedClassOverridesProtectedMembers2.d.ts] +declare var x: { + foo: string; +}; +declare var y: { + foo: string; + bar: string; +}; +declare class Base { + protected a: typeof x; + protected b(a: typeof x): invalid; + protected get c(): { + foo: string; + }; + protected set c(v: typeof x); + protected d: (a: typeof x) => void; + protected static r: typeof x; + protected static s(a: typeof x): invalid; + protected static get t(): { + foo: string; + }; + protected static set t(v: typeof x); + protected static u: (a: typeof x) => void; + constructor(a: typeof x); +} +declare class Derived extends Base { + a: typeof y; + b(a: typeof y): invalid; + get c(): { + foo: string; + bar: string; + }; + set c(v: typeof y); + d: (a: typeof y) => void; + static r: typeof y; + static s(a: typeof y): invalid; + static get t(): { + foo: string; + bar: string; + }; + static set t(a: typeof y); + static u: (a: typeof y) => void; + constructor(a: typeof y); +} +declare var d: Derived; +declare var r1: invalid; +declare var r2: invalid; +declare var r3: invalid; +declare var r3a: invalid; +declare var r4: invalid; +declare var r5: invalid; +declare var r6: invalid; +declare var r6a: invalid; +declare class Base2 { + [i: string]: Object; + [i: number]: typeof x; +} +declare class Derived2 extends Base2 { + [i: string]: typeof x; + [i: number]: typeof y; +} +declare var d2: Derived2; +declare var r7: invalid; +declare var r8: invalid; + +/// [Errors] //// + +derivedClassOverridesProtectedMembers2.ts(6,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(12,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(23,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(29,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(38,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(39,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(40,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(41,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(43,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(44,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(45,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(46,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(60,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(61,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + + +==== derivedClassOverridesProtectedMembers2.ts (14 errors) ==== + var x: { foo: string; } + var y: { foo: string; bar: string; } + + class Base { + protected a: typeof x; + protected b(a: typeof x) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers2.ts:6:15: Add a return type to the method + protected get c() { return x; } + protected set c(v: typeof x) { } + protected d: (a: typeof x) => void ; + + protected static r: typeof x; + protected static s(a: typeof x) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers2.ts:12:22: Add a return type to the method + protected static get t() { return x; } + protected static set t(v: typeof x) { } + protected static u: (a: typeof x) => void ; + + constructor(a: typeof x) { } + } + + // Increase visibility of all protected members to public + class Derived extends Base { + a: typeof y; + b(a: typeof y) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers2.ts:23:5: Add a return type to the method + get c() { return y; } + set c(v: typeof y) { } + d: (a: typeof y) => void; + + static r: typeof y; + static s(a: typeof y) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers2.ts:29:12: Add a return type to the method + static get t() { return y; } + static set t(a: typeof y) { } + static u: (a: typeof y) => void; + + constructor(a: typeof y) { super(a); } + } + + var d: Derived = new Derived(y); + var r1 = d.a; + ~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:38:5: Add a type annotation to the variable r1 + var r2 = d.b(y); + ~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:39:5: Add a type annotation to the variable r2 + var r3 = d.c; + ~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:40:5: Add a type annotation to the variable r3 + var r3a = d.d; + ~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:41:5: Add a type annotation to the variable r3a + d.c = y; + var r4 = Derived.r; + ~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:43:5: Add a type annotation to the variable r4 + var r5 = Derived.s(y); + ~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:44:5: Add a type annotation to the variable r5 + var r6 = Derived.t; + ~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:45:5: Add a type annotation to the variable r6 + var r6a = Derived.u; + ~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:46:5: Add a type annotation to the variable r6a + Derived.t = y; + + class Base2 { + [i: string]: Object; + [i: number]: typeof x; + } + + class Derived2 extends Base2 { + [i: string]: typeof x; + [i: number]: typeof y; + } + + var d2: Derived2; + var r7 = d2['']; + ~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:60:5: Add a type annotation to the variable r7 + var r8 = d2[1]; + ~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:61:5: Add a type annotation to the variable r8 + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers3.d.ts new file mode 100644 index 0000000000000..e1cbdec74079c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers3.d.ts @@ -0,0 +1,293 @@ +//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts] //// + +//// [derivedClassOverridesProtectedMembers3.ts] +var x: { foo: string; } +var y: { foo: string; bar: string; } + +class Base { + a: typeof x; + b(a: typeof x) { } + get c() { return x; } + set c(v: typeof x) { } + d: (a: typeof x) => void; + + static r: typeof x; + static s(a: typeof x) { } + static get t() { return x; } + static set t(v: typeof x) { } + static u: (a: typeof x) => void; + + constructor(a: typeof x) {} +} + +// Errors +// decrease visibility of all public members to protected +class Derived1 extends Base { + protected a: typeof x; + constructor(a: typeof x) { super(a); } +} + +class Derived2 extends Base { + protected b(a: typeof x) { } + constructor(a: typeof x) { super(a); } +} + +class Derived3 extends Base { + protected get c() { return x; } + constructor(a: typeof x) { super(a); } +} + +class Derived4 extends Base { + protected set c(v: typeof x) { } + constructor(a: typeof x) { super(a); } +} + +class Derived5 extends Base { + protected d: (a: typeof x) => void ; + constructor(a: typeof x) { super(a); } +} + +class Derived6 extends Base { + protected static r: typeof x; + constructor(a: typeof x) { super(a); } +} + +class Derived7 extends Base { + protected static s(a: typeof x) { } + constructor(a: typeof x) { super(a); } +} + +class Derived8 extends Base { + protected static get t() { return x; } + constructor(a: typeof x) { super(a); } +} + +class Derived9 extends Base { + protected static set t(v: typeof x) { } + constructor(a: typeof x) { super(a); } +} + +class Derived10 extends Base { + protected static u: (a: typeof x) => void ; + constructor(a: typeof x) { super(a); } +} + +/// [Declarations] //// + + + +//// [derivedClassOverridesProtectedMembers3.d.ts] +declare var x: { + foo: string; +}; +declare var y: { + foo: string; + bar: string; +}; +declare class Base { + a: typeof x; + b(a: typeof x): invalid; + get c(): { + foo: string; + }; + set c(v: typeof x); + d: (a: typeof x) => void; + static r: typeof x; + static s(a: typeof x): invalid; + static get t(): { + foo: string; + }; + static set t(v: typeof x); + static u: (a: typeof x) => void; + constructor(a: typeof x); +} +declare class Derived1 extends Base { + protected a: typeof x; + constructor(a: typeof x); +} +declare class Derived2 extends Base { + protected b(a: typeof x): invalid; + constructor(a: typeof x); +} +declare class Derived3 extends Base { + protected get c(): invalid; + constructor(a: typeof x); +} +declare class Derived4 extends Base { + protected set c(v: typeof x); + constructor(a: typeof x); +} +declare class Derived5 extends Base { + protected d: (a: typeof x) => void; + constructor(a: typeof x); +} +declare class Derived6 extends Base { + protected static r: typeof x; + constructor(a: typeof x); +} +declare class Derived7 extends Base { + protected static s(a: typeof x): invalid; + constructor(a: typeof x); +} +declare class Derived8 extends Base { + protected static get t(): invalid; + constructor(a: typeof x); +} +declare class Derived9 extends Base { + protected static set t(v: typeof x); + constructor(a: typeof x); +} +declare class Derived10 extends Base { + protected static u: (a: typeof x) => void; + constructor(a: typeof x); +} + +/// [Errors] //// + +derivedClassOverridesProtectedMembers3.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(12,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(22,7): error TS2415: Class 'Derived1' incorrectly extends base class 'Base'. + Property 'a' is protected in type 'Derived1' but public in type 'Base'. +derivedClassOverridesProtectedMembers3.ts(27,7): error TS2415: Class 'Derived2' incorrectly extends base class 'Base'. + Property 'b' is protected in type 'Derived2' but public in type 'Base'. +derivedClassOverridesProtectedMembers3.ts(28,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(32,7): error TS2415: Class 'Derived3' incorrectly extends base class 'Base'. + Property 'c' is protected in type 'Derived3' but public in type 'Base'. +derivedClassOverridesProtectedMembers3.ts(33,19): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(37,7): error TS2415: Class 'Derived4' incorrectly extends base class 'Base'. + Property 'c' is protected in type 'Derived4' but public in type 'Base'. +derivedClassOverridesProtectedMembers3.ts(42,7): error TS2415: Class 'Derived5' incorrectly extends base class 'Base'. + Property 'd' is protected in type 'Derived5' but public in type 'Base'. +derivedClassOverridesProtectedMembers3.ts(47,7): error TS2417: Class static side 'typeof Derived6' incorrectly extends base class static side 'typeof Base'. + Property 'r' is protected in type 'typeof Derived6' but public in type 'typeof Base'. +derivedClassOverridesProtectedMembers3.ts(52,7): error TS2417: Class static side 'typeof Derived7' incorrectly extends base class static side 'typeof Base'. + Property 's' is protected in type 'typeof Derived7' but public in type 'typeof Base'. +derivedClassOverridesProtectedMembers3.ts(53,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(57,7): error TS2417: Class static side 'typeof Derived8' incorrectly extends base class static side 'typeof Base'. + Property 't' is protected in type 'typeof Derived8' but public in type 'typeof Base'. +derivedClassOverridesProtectedMembers3.ts(58,26): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(62,7): error TS2417: Class static side 'typeof Derived9' incorrectly extends base class static side 'typeof Base'. + Property 't' is protected in type 'typeof Derived9' but public in type 'typeof Base'. +derivedClassOverridesProtectedMembers3.ts(67,7): error TS2417: Class static side 'typeof Derived10' incorrectly extends base class static side 'typeof Base'. + Property 'u' is protected in type 'typeof Derived10' but public in type 'typeof Base'. + + +==== derivedClassOverridesProtectedMembers3.ts (16 errors) ==== + var x: { foo: string; } + var y: { foo: string; bar: string; } + + class Base { + a: typeof x; + b(a: typeof x) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers3.ts:6:5: Add a return type to the method + get c() { return x; } + set c(v: typeof x) { } + d: (a: typeof x) => void; + + static r: typeof x; + static s(a: typeof x) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers3.ts:12:12: Add a return type to the method + static get t() { return x; } + static set t(v: typeof x) { } + static u: (a: typeof x) => void; + + constructor(a: typeof x) {} + } + + // Errors + // decrease visibility of all public members to protected + class Derived1 extends Base { + ~~~~~~~~ +!!! error TS2415: Class 'Derived1' incorrectly extends base class 'Base'. +!!! error TS2415: Property 'a' is protected in type 'Derived1' but public in type 'Base'. + protected a: typeof x; + constructor(a: typeof x) { super(a); } + } + + class Derived2 extends Base { + ~~~~~~~~ +!!! error TS2415: Class 'Derived2' incorrectly extends base class 'Base'. +!!! error TS2415: Property 'b' is protected in type 'Derived2' but public in type 'Base'. + protected b(a: typeof x) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers3.ts:28:15: Add a return type to the method + constructor(a: typeof x) { super(a); } + } + + class Derived3 extends Base { + ~~~~~~~~ +!!! error TS2415: Class 'Derived3' incorrectly extends base class 'Base'. +!!! error TS2415: Property 'c' is protected in type 'Derived3' but public in type 'Base'. + protected get c() { return x; } + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 derivedClassOverridesProtectedMembers3.ts:33:19: Add a return type to the get accessor declaration + constructor(a: typeof x) { super(a); } + } + + class Derived4 extends Base { + ~~~~~~~~ +!!! error TS2415: Class 'Derived4' incorrectly extends base class 'Base'. +!!! error TS2415: Property 'c' is protected in type 'Derived4' but public in type 'Base'. + protected set c(v: typeof x) { } + constructor(a: typeof x) { super(a); } + } + + class Derived5 extends Base { + ~~~~~~~~ +!!! error TS2415: Class 'Derived5' incorrectly extends base class 'Base'. +!!! error TS2415: Property 'd' is protected in type 'Derived5' but public in type 'Base'. + protected d: (a: typeof x) => void ; + constructor(a: typeof x) { super(a); } + } + + class Derived6 extends Base { + ~~~~~~~~ +!!! error TS2417: Class static side 'typeof Derived6' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Property 'r' is protected in type 'typeof Derived6' but public in type 'typeof Base'. + protected static r: typeof x; + constructor(a: typeof x) { super(a); } + } + + class Derived7 extends Base { + ~~~~~~~~ +!!! error TS2417: Class static side 'typeof Derived7' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Property 's' is protected in type 'typeof Derived7' but public in type 'typeof Base'. + protected static s(a: typeof x) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesProtectedMembers3.ts:53:22: Add a return type to the method + constructor(a: typeof x) { super(a); } + } + + class Derived8 extends Base { + ~~~~~~~~ +!!! error TS2417: Class static side 'typeof Derived8' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Property 't' is protected in type 'typeof Derived8' but public in type 'typeof Base'. + protected static get t() { return x; } + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 derivedClassOverridesProtectedMembers3.ts:58:26: Add a return type to the get accessor declaration + constructor(a: typeof x) { super(a); } + } + + class Derived9 extends Base { + ~~~~~~~~ +!!! error TS2417: Class static side 'typeof Derived9' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Property 't' is protected in type 'typeof Derived9' but public in type 'typeof Base'. + protected static set t(v: typeof x) { } + constructor(a: typeof x) { super(a); } + } + + class Derived10 extends Base { + ~~~~~~~~~ +!!! error TS2417: Class static side 'typeof Derived10' incorrectly extends base class static side 'typeof Base'. +!!! error TS2417: Property 'u' is protected in type 'typeof Derived10' but public in type 'typeof Base'. + protected static u: (a: typeof x) => void ; + constructor(a: typeof x) { super(a); } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesPublicMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesPublicMembers.d.ts new file mode 100644 index 0000000000000..6ed4c3b93fe66 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesPublicMembers.d.ts @@ -0,0 +1,258 @@ +//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts] //// + +//// [derivedClassOverridesPublicMembers.ts] +var x: { foo: string; } +var y: { foo: string; bar: string; } + +class Base { + a: typeof x; + b(a: typeof x) { } + get c() { return x; } + set c(v: typeof x) { } + d: (a: typeof x) => void; + + static r: typeof x; + static s(a: typeof x) { } + static get t() { return x; } + static set t(v: typeof x) { } + static u: (a: typeof x) => void; + + constructor(a: typeof x) { } +} + +class Derived extends Base { + a: typeof y; + b(a: typeof y) { } + get c() { return y; } + set c(v: typeof y) { } + d: (a: typeof y) => void; + + static r: typeof y; + static s(a: typeof y) { } + static get t() { return y; } + static set t(a: typeof y) { } + static u: (a: typeof y) => void; + + constructor(a: typeof y) { super(x) } +} + +var d: Derived = new Derived(y); +var r1 = d.a; +var r2 = d.b(y); +var r3 = d.c; +var r3a = d.d; +d.c = y; +var r4 = Derived.r; +var r5 = Derived.s(y); +var r6 = Derived.t; +var r6a = Derived.u; +Derived.t = y; + +class Base2 { + [i: string]: Object; + [i: number]: typeof x; +} + +class Derived2 extends Base2 { + [i: string]: typeof x; + [i: number]: typeof y; +} + +var d2: Derived2; +var r7 = d2['']; +var r8 = d2[1]; + + + +/// [Declarations] //// + + + +//// [derivedClassOverridesPublicMembers.d.ts] +declare var x: { + foo: string; +}; +declare var y: { + foo: string; + bar: string; +}; +declare class Base { + a: typeof x; + b(a: typeof x): invalid; + get c(): { + foo: string; + }; + set c(v: typeof x); + d: (a: typeof x) => void; + static r: typeof x; + static s(a: typeof x): invalid; + static get t(): { + foo: string; + }; + static set t(v: typeof x); + static u: (a: typeof x) => void; + constructor(a: typeof x); +} +declare class Derived extends Base { + a: typeof y; + b(a: typeof y): invalid; + get c(): { + foo: string; + bar: string; + }; + set c(v: typeof y); + d: (a: typeof y) => void; + static r: typeof y; + static s(a: typeof y): invalid; + static get t(): { + foo: string; + bar: string; + }; + static set t(a: typeof y); + static u: (a: typeof y) => void; + constructor(a: typeof y); +} +declare var d: Derived; +declare var r1: invalid; +declare var r2: invalid; +declare var r3: invalid; +declare var r3a: invalid; +declare var r4: invalid; +declare var r5: invalid; +declare var r6: invalid; +declare var r6a: invalid; +declare class Base2 { + [i: string]: Object; + [i: number]: typeof x; +} +declare class Derived2 extends Base2 { + [i: string]: typeof x; + [i: number]: typeof y; +} +declare var d2: Derived2; +declare var r7: invalid; +declare var r8: invalid; + +/// [Errors] //// + +derivedClassOverridesPublicMembers.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(12,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(22,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(28,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(37,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(38,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(39,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(40,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(42,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(43,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(44,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(45,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(59,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(60,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + + +==== derivedClassOverridesPublicMembers.ts (14 errors) ==== + var x: { foo: string; } + var y: { foo: string; bar: string; } + + class Base { + a: typeof x; + b(a: typeof x) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesPublicMembers.ts:6:5: Add a return type to the method + get c() { return x; } + set c(v: typeof x) { } + d: (a: typeof x) => void; + + static r: typeof x; + static s(a: typeof x) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesPublicMembers.ts:12:12: Add a return type to the method + static get t() { return x; } + static set t(v: typeof x) { } + static u: (a: typeof x) => void; + + constructor(a: typeof x) { } + } + + class Derived extends Base { + a: typeof y; + b(a: typeof y) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesPublicMembers.ts:22:5: Add a return type to the method + get c() { return y; } + set c(v: typeof y) { } + d: (a: typeof y) => void; + + static r: typeof y; + static s(a: typeof y) { } + ~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 derivedClassOverridesPublicMembers.ts:28:12: Add a return type to the method + static get t() { return y; } + static set t(a: typeof y) { } + static u: (a: typeof y) => void; + + constructor(a: typeof y) { super(x) } + } + + var d: Derived = new Derived(y); + var r1 = d.a; + ~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesPublicMembers.ts:37:5: Add a type annotation to the variable r1 + var r2 = d.b(y); + ~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesPublicMembers.ts:38:5: Add a type annotation to the variable r2 + var r3 = d.c; + ~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesPublicMembers.ts:39:5: Add a type annotation to the variable r3 + var r3a = d.d; + ~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesPublicMembers.ts:40:5: Add a type annotation to the variable r3a + d.c = y; + var r4 = Derived.r; + ~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesPublicMembers.ts:42:5: Add a type annotation to the variable r4 + var r5 = Derived.s(y); + ~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesPublicMembers.ts:43:5: Add a type annotation to the variable r5 + var r6 = Derived.t; + ~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesPublicMembers.ts:44:5: Add a type annotation to the variable r6 + var r6a = Derived.u; + ~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesPublicMembers.ts:45:5: Add a type annotation to the variable r6a + Derived.t = y; + + class Base2 { + [i: string]: Object; + [i: number]: typeof x; + } + + class Derived2 extends Base2 { + [i: string]: typeof x; + [i: number]: typeof y; + } + + var d2: Derived2; + var r7 = d2['']; + ~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesPublicMembers.ts:59:5: Add a type annotation to the variable r7 + var r8 = d2[1]; + ~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 derivedClassOverridesPublicMembers.ts:60:5: Add a type annotation to the variable r8 + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/duplicateVarsAcrossFileBoundaries.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/duplicateVarsAcrossFileBoundaries.d.ts index f107986f96035..9ea0d8044587e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/duplicateVarsAcrossFileBoundaries.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/duplicateVarsAcrossFileBoundaries.d.ts @@ -66,8 +66,8 @@ duplicateVarsAcrossFileBoundaries_1.ts(1,5): error TS2403: Subsequent variable d duplicateVarsAcrossFileBoundaries_2.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. duplicateVarsAcrossFileBoundaries_2.ts(2,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'number'. duplicateVarsAcrossFileBoundaries_2.ts(3,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'boolean'. -duplicateVarsAcrossFileBoundaries_4.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -duplicateVarsAcrossFileBoundaries_5.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +duplicateVarsAcrossFileBoundaries_4.ts(3,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +duplicateVarsAcrossFileBoundaries_5.ts(3,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations ==== duplicateVarsAcrossFileBoundaries_0.ts (0 errors) ==== @@ -105,11 +105,13 @@ duplicateVarsAcrossFileBoundaries_5.ts(3,5): error TS9007: Declaration emit for import p = P; var q; ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 duplicateVarsAcrossFileBoundaries_4.ts:3:5: Add a type annotation to the variable q ==== duplicateVarsAcrossFileBoundaries_5.ts (1 errors) ==== module Q { } import q = Q; var p; ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. \ No newline at end of file +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 duplicateVarsAcrossFileBoundaries_5.ts:3:5: Add a type annotation to the variable p \ 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 index 2bbb73860cf74..6972bf6b59ff2 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/dynamicNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/dynamicNames.d.ts @@ -197,10 +197,10 @@ export declare type T3 = { /// [Errors] //// -main.ts(109,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -main.ts(110,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -main.ts(111,22): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -module.ts(3,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -208,7 +208,8 @@ module.ts(3,19): error TS9007: Declaration emit for this file requires type reso export const c1 = 1; export const s0 = Symbol(); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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; @@ -338,13 +339,16 @@ module.ts(3,19): error TS9007: Declaration emit for this file requires type reso // check element access types export const o1_c4 = o1[c4]; ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/escapedIdentifiers.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/escapedIdentifiers.d.ts index 225f2fe96625e..e9eb7a90f50da 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/escapedIdentifiers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/escapedIdentifiers.d.ts @@ -168,12 +168,12 @@ declare var constructorTestObject: invalid; /// [Errors] //// -escapedIdentifiers.ts(43,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -escapedIdentifiers.ts(45,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -escapedIdentifiers.ts(47,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -escapedIdentifiers.ts(49,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -escapedIdentifiers.ts(72,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -escapedIdentifiers.ts(85,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +escapedIdentifiers.ts(43,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +escapedIdentifiers.ts(45,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +escapedIdentifiers.ts(47,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +escapedIdentifiers.ts(49,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +escapedIdentifiers.ts(72,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +escapedIdentifiers.ts(85,29): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations ==== escapedIdentifiers.ts (6 errors) ==== @@ -221,19 +221,23 @@ escapedIdentifiers.ts(85,29): error TS9007: Declaration emit for this file requi var classType1Object1 = new classType1(); ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 escapedIdentifiers.ts:43:5: Add a type annotation to the variable classType1Object1 classType1Object1.foo1 = 2; var classType1Object2 = new classType\u0031(); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 escapedIdentifiers.ts:45:5: Add a type annotation to the variable classType1Object2 classType1Object2.foo1 = 2; var classType2Object1 = new classType2(); ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 escapedIdentifiers.ts:47:5: Add a type annotation to the variable classType2Object1 classType2Object1.foo2 = 2; var classType2Object2 = new classType\u0032(); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 escapedIdentifiers.ts:49:5: Add a type annotation to the variable classType2Object2 classType2Object2.foo2 = 2; // interfaces @@ -258,7 +262,8 @@ escapedIdentifiers.ts(85,29): error TS9007: Declaration emit for this file requi class testClass { public func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number) { ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 escapedIdentifiers.ts:72:12: Add a return type to the method arg\u0031 = 1; arg2 = 'string'; arg\u0033 = true; @@ -273,7 +278,8 @@ escapedIdentifiers.ts(85,29): error TS9007: Declaration emit for this file requi } var constructorTestObject = new constructorTestClass(1, 'string', true, 2); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 escapedIdentifiers.ts:85:5: Add a type annotation to the variable constructorTestObject constructorTestObject.arg\u0031 = 1; constructorTestObject.arg2 = 'string'; constructorTestObject.arg\u0033 = true; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts index 78f4569ca9d76..0d1a11933380c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts @@ -35,8 +35,8 @@ declare enum E1 { forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. forwardRefInEnum.ts(5,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -forwardRefInEnum.ts(7,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -forwardRefInEnum.ts(8,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +forwardRefInEnum.ts(7,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations +forwardRefInEnum.ts(8,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations ==== forwardRefInEnum.ts (4 errors) ==== @@ -52,10 +52,10 @@ forwardRefInEnum.ts(8,5): error TS9007: Declaration emit for this file requires // forward reference to the element of the same enum Y = E1.Z, ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations Y1 = E1["Z"] ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations } enum E1 { diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/generatedContextualTyping.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/generatedContextualTyping.d.ts index f94223589fd03..3848b97662ebf 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/generatedContextualTyping.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/generatedContextualTyping.d.ts @@ -1282,65 +1282,65 @@ declare var x356: (n: Genric) => invalid; /// [Errors] //// -generatedContextualTyping.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(5,26): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(5,47): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(126,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(127,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(128,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(129,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(130,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(131,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(132,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(133,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(134,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(135,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(136,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(137,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(219,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(220,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(221,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(222,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(223,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(224,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(225,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(226,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(319,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(320,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(321,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(322,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(323,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(324,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(325,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(326,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(327,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(328,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(329,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(330,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -generatedContextualTyping.ts(331,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(332,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(333,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(334,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(335,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(336,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(337,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(338,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(339,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(340,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(341,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(342,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(343,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(344,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(345,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(346,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(347,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(348,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(349,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(350,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(351,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(352,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(353,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -generatedContextualTyping.ts(354,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +generatedContextualTyping.ts(5,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(5,26): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(5,47): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(126,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(127,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(128,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(129,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(130,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(131,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(132,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(133,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(134,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(135,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(136,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(137,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(219,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(220,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(221,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(222,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(223,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(224,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(225,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(226,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +generatedContextualTyping.ts(319,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(320,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(321,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(322,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(323,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(324,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(325,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(326,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(327,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(328,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(329,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(330,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(331,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(332,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(333,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(334,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(335,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(336,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(337,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(338,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(339,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(340,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(341,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(342,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(343,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(344,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(345,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(346,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(347,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(348,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(349,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(350,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(351,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(352,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(353,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(354,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations ==== generatedContextualTyping.ts (59 errors) ==== @@ -1350,11 +1350,14 @@ generatedContextualTyping.ts(354,12): error TS9507: Function must have an explic interface Genric { func(n: T[]); } var b = new Base(), d1 = new Derived1(), d2 = new Derived2(); ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:5:5: Add a type annotation to the variable b ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:5:21: Add a type annotation to the variable d1 ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:5:42: Add a type annotation to the variable d2 var x1: () => Base[] = () => [d1, d2]; var x2: () => Base[] = function() { return [d1, d2] }; var x3: () => Base[] = function named() { return [d1, d2] }; @@ -1477,40 +1480,52 @@ generatedContextualTyping.ts(354,12): error TS9507: Function must have an explic class x120 { constructor(private parm: Genric = { func: n => { return [d1, d2]; } }) { } } function x121(parm: () => Base[] = () => [d1, d2]) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:126:10: Add a return type to the function declaration function x122(parm: () => Base[] = function() { return [d1, d2] }) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:127:10: Add a return type to the function declaration function x123(parm: () => Base[] = function named() { return [d1, d2] }) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:128:10: Add a return type to the function declaration function x124(parm: { (): Base[]; } = () => [d1, d2]) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:129:10: Add a return type to the function declaration function x125(parm: { (): Base[]; } = function() { return [d1, d2] }) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:130:10: Add a return type to the function declaration function x126(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:131:10: Add a return type to the function declaration function x127(parm: Base[] = [d1, d2]) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:132:10: Add a return type to the function declaration function x128(parm: Array = [d1, d2]) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:133:10: Add a return type to the function declaration function x129(parm: { [n: number]: Base; } = [d1, d2]) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:134:10: Add a return type to the function declaration function x130(parm: {n: Base[]; } = { n: [d1, d2] }) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:135:10: Add a return type to the function declaration function x131(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:136:10: Add a return type to the function declaration function x132(parm: Genric = { func: n => { return [d1, d2]; } }) { } ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:137:10: Add a return type to the function declaration function x133(): () => Base[] { return () => [d1, d2]; } function x134(): () => Base[] { return function() { return [d1, d2] }; } function x135(): () => Base[] { return function named() { return [d1, d2] }; } @@ -1594,28 +1609,36 @@ generatedContextualTyping.ts(354,12): error TS9507: Function must have an explic var x216 = >{ func: n => { return [d1, d2]; } }; var x217 = (<() => Base[]>undefined) || function() { return [d1, d2] }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:219:5: Add a type annotation to the variable x217 var x218 = (<() => Base[]>undefined) || function named() { return [d1, d2] }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:220:5: Add a type annotation to the variable x218 var x219 = (<{ (): Base[]; }>undefined) || function() { return [d1, d2] }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:221:5: Add a type annotation to the variable x219 var x220 = (<{ (): Base[]; }>undefined) || function named() { return [d1, d2] }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:222:5: Add a type annotation to the variable x220 var x221 = (undefined) || [d1, d2]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:223:5: Add a type annotation to the variable x221 var x222 = (>undefined) || [d1, d2]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:224:5: Add a type annotation to the variable x222 var x223 = (<{ [n: number]: Base; }>undefined) || [d1, d2]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:225:5: Add a type annotation to the variable x223 var x224 = (<{n: Base[]; } >undefined) || { n: [d1, d2] }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:226:5: Add a type annotation to the variable x224 var x225: () => Base[]; x225 = () => [d1, d2]; var x226: () => Base[]; x226 = function() { return [d1, d2] }; var x227: () => Base[]; x227 = function named() { return [d1, d2] }; @@ -1710,157 +1733,169 @@ generatedContextualTyping.ts(354,12): error TS9507: Function must have an explic var x320: Genric = true ? { func: n => { return [d1, d2]; } } : undefined; function x321(n: () => Base[]) { }; x321(() => [d1, d2]); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:319:10: Add a return type to the function declaration function x322(n: () => Base[]) { }; x322(function() { return [d1, d2] }); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:320:10: Add a return type to the function declaration function x323(n: () => Base[]) { }; x323(function named() { return [d1, d2] }); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:321:10: Add a return type to the function declaration function x324(n: { (): Base[]; }) { }; x324(() => [d1, d2]); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:322:10: Add a return type to the function declaration function x325(n: { (): Base[]; }) { }; x325(function() { return [d1, d2] }); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:323:10: Add a return type to the function declaration function x326(n: { (): Base[]; }) { }; x326(function named() { return [d1, d2] }); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:324:10: Add a return type to the function declaration function x327(n: Base[]) { }; x327([d1, d2]); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:325:10: Add a return type to the function declaration function x328(n: Array) { }; x328([d1, d2]); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:326:10: Add a return type to the function declaration function x329(n: { [n: number]: Base; }) { }; x329([d1, d2]); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:327:10: Add a return type to the function declaration function x330(n: {n: Base[]; } ) { }; x330({ n: [d1, d2] }); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:328:10: Add a return type to the function declaration function x331(n: (s: Base[]) => any) { }; x331(n => { var n: Base[]; return null; }); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:329:10: Add a return type to the function declaration function x332(n: Genric) { }; x332({ func: n => { return [d1, d2]; } }); ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 generatedContextualTyping.ts:330:10: Add a return type to the function declaration var x333 = (n: () => Base[]) => n; x333(() => [d1, d2]); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:331:5: Add a type annotation to the variable x333 -!!! related TS9603 generatedContextualTyping.ts:331:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:331:5: Add a type annotation to the variable x333 +!!! related TS9030 generatedContextualTyping.ts:331:12: Add a return type to the function expression var x334 = (n: () => Base[]) => n; x334(function() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:332:5: Add a type annotation to the variable x334 -!!! related TS9603 generatedContextualTyping.ts:332:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:332:5: Add a type annotation to the variable x334 +!!! related TS9030 generatedContextualTyping.ts:332:12: Add a return type to the function expression var x335 = (n: () => Base[]) => n; x335(function named() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:333:5: Add a type annotation to the variable x335 -!!! related TS9603 generatedContextualTyping.ts:333:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:333:5: Add a type annotation to the variable x335 +!!! related TS9030 generatedContextualTyping.ts:333:12: Add a return type to the function expression var x336 = (n: { (): Base[]; }) => n; x336(() => [d1, d2]); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:334:5: Add a type annotation to the variable x336 -!!! related TS9603 generatedContextualTyping.ts:334:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:334:5: Add a type annotation to the variable x336 +!!! related TS9030 generatedContextualTyping.ts:334:12: Add a return type to the function expression var x337 = (n: { (): Base[]; }) => n; x337(function() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:335:5: Add a type annotation to the variable x337 -!!! related TS9603 generatedContextualTyping.ts:335:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:335:5: Add a type annotation to the variable x337 +!!! related TS9030 generatedContextualTyping.ts:335:12: Add a return type to the function expression var x338 = (n: { (): Base[]; }) => n; x338(function named() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:336:5: Add a type annotation to the variable x338 -!!! related TS9603 generatedContextualTyping.ts:336:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:336:5: Add a type annotation to the variable x338 +!!! related TS9030 generatedContextualTyping.ts:336:12: Add a return type to the function expression var x339 = (n: Base[]) => n; x339([d1, d2]); ~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:337:5: Add a type annotation to the variable x339 -!!! related TS9603 generatedContextualTyping.ts:337:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:337:5: Add a type annotation to the variable x339 +!!! related TS9030 generatedContextualTyping.ts:337:12: Add a return type to the function expression var x340 = (n: Array) => n; x340([d1, d2]); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:338:5: Add a type annotation to the variable x340 -!!! related TS9603 generatedContextualTyping.ts:338:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:338:5: Add a type annotation to the variable x340 +!!! related TS9030 generatedContextualTyping.ts:338:12: Add a return type to the function expression var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:339:5: Add a type annotation to the variable x341 -!!! related TS9603 generatedContextualTyping.ts:339:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:339:5: Add a type annotation to the variable x341 +!!! related TS9030 generatedContextualTyping.ts:339:12: Add a return type to the function expression var x342 = (n: {n: Base[]; } ) => n; x342({ n: [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:340:5: Add a type annotation to the variable x342 -!!! related TS9603 generatedContextualTyping.ts:340:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:340:5: Add a type annotation to the variable x342 +!!! related TS9030 generatedContextualTyping.ts:340:12: Add a return type to the function expression var x343 = (n: (s: Base[]) => any) => n; x343(n => { var n: Base[]; return null; }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:341:5: Add a type annotation to the variable x343 -!!! related TS9603 generatedContextualTyping.ts:341:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:341:5: Add a type annotation to the variable x343 +!!! related TS9030 generatedContextualTyping.ts:341:12: Add a return type to the function expression var x344 = (n: Genric) => n; x344({ func: n => { return [d1, d2]; } }); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:342:5: Add a type annotation to the variable x344 -!!! related TS9603 generatedContextualTyping.ts:342:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:342:5: Add a type annotation to the variable x344 +!!! related TS9030 generatedContextualTyping.ts:342:12: Add a return type to the function expression var x345 = function(n: () => Base[]) { }; x345(() => [d1, d2]); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:343:5: Add a type annotation to the variable x345 -!!! related TS9603 generatedContextualTyping.ts:343:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:343:5: Add a type annotation to the variable x345 +!!! related TS9030 generatedContextualTyping.ts:343:12: Add a return type to the function expression var x346 = function(n: () => Base[]) { }; x346(function() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:344:5: Add a type annotation to the variable x346 -!!! related TS9603 generatedContextualTyping.ts:344:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:344:5: Add a type annotation to the variable x346 +!!! related TS9030 generatedContextualTyping.ts:344:12: Add a return type to the function expression var x347 = function(n: () => Base[]) { }; x347(function named() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:345:5: Add a type annotation to the variable x347 -!!! related TS9603 generatedContextualTyping.ts:345:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:345:5: Add a type annotation to the variable x347 +!!! related TS9030 generatedContextualTyping.ts:345:12: Add a return type to the function expression var x348 = function(n: { (): Base[]; }) { }; x348(() => [d1, d2]); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:346:5: Add a type annotation to the variable x348 -!!! related TS9603 generatedContextualTyping.ts:346:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:346:5: Add a type annotation to the variable x348 +!!! related TS9030 generatedContextualTyping.ts:346:12: Add a return type to the function expression var x349 = function(n: { (): Base[]; }) { }; x349(function() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:347:5: Add a type annotation to the variable x349 -!!! related TS9603 generatedContextualTyping.ts:347:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:347:5: Add a type annotation to the variable x349 +!!! related TS9030 generatedContextualTyping.ts:347:12: Add a return type to the function expression var x350 = function(n: { (): Base[]; }) { }; x350(function named() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:348:5: Add a type annotation to the variable x350 -!!! related TS9603 generatedContextualTyping.ts:348:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:348:5: Add a type annotation to the variable x350 +!!! related TS9030 generatedContextualTyping.ts:348:12: Add a return type to the function expression var x351 = function(n: Base[]) { }; x351([d1, d2]); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:349:5: Add a type annotation to the variable x351 -!!! related TS9603 generatedContextualTyping.ts:349:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:349:5: Add a type annotation to the variable x351 +!!! related TS9030 generatedContextualTyping.ts:349:12: Add a return type to the function expression var x352 = function(n: Array) { }; x352([d1, d2]); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:350:5: Add a type annotation to the variable x352 -!!! related TS9603 generatedContextualTyping.ts:350:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:350:5: Add a type annotation to the variable x352 +!!! related TS9030 generatedContextualTyping.ts:350:12: Add a return type to the function expression var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:351:5: Add a type annotation to the variable x353 -!!! related TS9603 generatedContextualTyping.ts:351:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:351:5: Add a type annotation to the variable x353 +!!! related TS9030 generatedContextualTyping.ts:351:12: Add a return type to the function expression var x354 = function(n: {n: Base[]; } ) { }; x354({ n: [d1, d2] }); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:352:5: Add a type annotation to the variable x354 -!!! related TS9603 generatedContextualTyping.ts:352:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:352:5: Add a type annotation to the variable x354 +!!! related TS9030 generatedContextualTyping.ts:352:12: Add a return type to the function expression var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; return null; }); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:353:5: Add a type annotation to the variable x355 -!!! related TS9603 generatedContextualTyping.ts:353:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:353:5: Add a type annotation to the variable x355 +!!! related TS9030 generatedContextualTyping.ts:353:12: Add a return type to the function expression var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 generatedContextualTyping.ts:354:5: Add a type annotation to the variable x356 -!!! related TS9603 generatedContextualTyping.ts:354:12: Add a return type to the function expression \ No newline at end of file +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 generatedContextualTyping.ts:354:5: Add a type annotation to the variable x356 +!!! related TS9030 generatedContextualTyping.ts:354:12: Add a return type to the function expression \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument.d.ts index 3111e2ad2a8a4..48577be53d984 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument.d.ts @@ -89,7 +89,7 @@ genericTypeReferenceWithoutTypeArgument.ts(11,18): error TS2314: Generic type 'C genericTypeReferenceWithoutTypeArgument.ts(12,11): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. genericTypeReferenceWithoutTypeArgument.ts(12,14): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(12,18): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(14,9): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +genericTypeReferenceWithoutTypeArgument.ts(14,9): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations genericTypeReferenceWithoutTypeArgument.ts(14,13): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(14,28): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(16,15): error TS2314: Generic type 'C' requires 1 type argument(s). @@ -103,9 +103,9 @@ genericTypeReferenceWithoutTypeArgument.ts(23,21): error TS2314: Generic type 'C genericTypeReferenceWithoutTypeArgument.ts(29,18): error TS2314: Generic type 'E' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(30,20): error TS2314: Generic type 'E' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(31,22): error TS2314: Generic type 'E' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(33,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument.ts(33,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations genericTypeReferenceWithoutTypeArgument.ts(33,22): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations genericTypeReferenceWithoutTypeArgument.ts(34,22): error TS2314: Generic type 'E' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(36,10): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(37,10): error TS2314: Generic type 'E' requires 1 type argument(s). @@ -141,9 +141,9 @@ genericTypeReferenceWithoutTypeArgument.ts(37,10): error TS2314: Generic type 'E var e = (x: C) => { var y: C; return y; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 genericTypeReferenceWithoutTypeArgument.ts:14:5: Add a type annotation to the variable e -!!! related TS9603 genericTypeReferenceWithoutTypeArgument.ts:14:9: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 genericTypeReferenceWithoutTypeArgument.ts:14:5: Add a type annotation to the variable e +!!! related TS9030 genericTypeReferenceWithoutTypeArgument.ts:14:9: Add a return type to the function expression ~ !!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ @@ -190,12 +190,14 @@ genericTypeReferenceWithoutTypeArgument.ts(37,10): error TS2314: Generic type 'E function h(x: T) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 genericTypeReferenceWithoutTypeArgument.ts:33:10: Add a return type to the function declaration ~ !!! error TS2314: Generic type 'C' requires 1 type argument(s). function i(x: T) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 genericTypeReferenceWithoutTypeArgument.ts:34:10: Add a return type to the function declaration ~~~ !!! error TS2314: Generic type 'E' requires 1 type argument(s). diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument2.d.ts index 06652ffe07762..8f98ec2e936be 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument2.d.ts @@ -89,7 +89,7 @@ genericTypeReferenceWithoutTypeArgument2.ts(11,18): error TS2314: Generic type ' genericTypeReferenceWithoutTypeArgument2.ts(12,11): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. genericTypeReferenceWithoutTypeArgument2.ts(12,14): error TS2314: Generic type 'I' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(12,18): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(14,9): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +genericTypeReferenceWithoutTypeArgument2.ts(14,9): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations genericTypeReferenceWithoutTypeArgument2.ts(14,13): error TS2314: Generic type 'I' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(14,28): error TS2314: Generic type 'I' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(16,15): error TS2314: Generic type 'I' requires 1 type argument(s). @@ -105,9 +105,9 @@ genericTypeReferenceWithoutTypeArgument2.ts(29,18): error TS2708: Cannot use nam genericTypeReferenceWithoutTypeArgument2.ts(29,18): error TS4020: 'extends' clause of exported class 'D2' has or is using private name 'M'. genericTypeReferenceWithoutTypeArgument2.ts(30,24): error TS2314: Generic type 'E' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(31,24): error TS2694: Namespace 'M' has no exported member 'C'. -genericTypeReferenceWithoutTypeArgument2.ts(33,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument2.ts(33,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations genericTypeReferenceWithoutTypeArgument2.ts(33,22): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(34,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +genericTypeReferenceWithoutTypeArgument2.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations genericTypeReferenceWithoutTypeArgument2.ts(34,22): error TS2314: Generic type 'E' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(36,10): error TS2304: Cannot find name 'C'. genericTypeReferenceWithoutTypeArgument2.ts(36,10): error TS4025: Exported variable 'j' has or is using private name 'C'. @@ -144,9 +144,9 @@ genericTypeReferenceWithoutTypeArgument2.ts(37,10): error TS2314: Generic type ' var e = (x: I) => { var y: I; return y; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 genericTypeReferenceWithoutTypeArgument2.ts:14:5: Add a type annotation to the variable e -!!! related TS9603 genericTypeReferenceWithoutTypeArgument2.ts:14:9: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 genericTypeReferenceWithoutTypeArgument2.ts:14:5: Add a type annotation to the variable e +!!! related TS9030 genericTypeReferenceWithoutTypeArgument2.ts:14:9: Add a return type to the function expression ~ !!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ @@ -197,12 +197,14 @@ genericTypeReferenceWithoutTypeArgument2.ts(37,10): error TS2314: Generic type ' function h(x: T) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 genericTypeReferenceWithoutTypeArgument2.ts:33:10: Add a return type to the function declaration ~ !!! error TS2314: Generic type 'I' requires 1 type argument(s). function i(x: T) { } ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 genericTypeReferenceWithoutTypeArgument2.ts:34:10: Add a return type to the function declaration ~~~ !!! error TS2314: Generic type 'E' requires 1 type argument(s). diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/gettersAndSettersErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/gettersAndSettersErrors.d.ts index 0d592483fa118..10ef662967b45 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/gettersAndSettersErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/gettersAndSettersErrors.d.ts @@ -24,7 +24,7 @@ class E { //// [gettersAndSettersErrors.d.ts] declare class C { - get Foo(): invalid; + get Foo(): string; set Foo(foo: string); Foo: string; get Goo(): string; @@ -37,7 +37,6 @@ declare class E { /// [Errors] //// -gettersAndSettersErrors.ts(2,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. gettersAndSettersErrors.ts(5,12): error TS2300: Duplicate identifier 'Foo'. gettersAndSettersErrors.ts(5,12): error TS2717: Subsequent property declarations must have the same type. Property 'Foo' must be of type 'string', but here has type 'number'. gettersAndSettersErrors.ts(6,16): error TS1054: A 'get' accessor cannot have parameters. @@ -46,11 +45,9 @@ gettersAndSettersErrors.ts(11,17): error TS2808: A get accessor must be at least gettersAndSettersErrors.ts(12,16): error TS2808: A get accessor must be at least as accessible as the setter -==== gettersAndSettersErrors.ts (7 errors) ==== +==== gettersAndSettersErrors.ts (6 errors) ==== class C { public get Foo() { return "foo";} // ok - ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. public set Foo(foo:string) {} // ok public Foo = 0; // error - duplicate identifier Foo - confirmed diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts index f8be2aa8c2693..4d6897d7c9807 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts @@ -1079,17 +1079,17 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(273,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(276,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(278,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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'. @@ -1098,28 +1098,28 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(289,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(332,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(332,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(333,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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. @@ -1144,17 +1144,17 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(416,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(419,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(421,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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'. @@ -1163,48 +1163,48 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(432,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(475,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(475,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(476,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(484,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(485,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(489,28): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(490,33): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(495,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(500,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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'. @@ -1213,40 +1213,40 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(511,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(518,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(519,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(524,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(531,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(536,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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'. @@ -1255,80 +1255,80 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(547,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(554,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(555,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(560,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(562,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(600,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(600,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(601,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(604,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(605,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(610,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(620,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(625,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(627,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(666,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(666,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(667,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(670,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(671,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -giant.ts(675,25): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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. @@ -1800,37 +1800,44 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient } export var eV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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'. @@ -1854,15 +1861,18 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! error TS1005: '{' expected. static tV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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'. @@ -1872,12 +1882,14 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. } @@ -1887,7 +1899,8 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient (): number; (p); ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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[]); @@ -1929,19 +1942,24 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient p5? (): void; p6(pa1): void; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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; @@ -2073,37 +2091,44 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient } export var eV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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'. @@ -2127,15 +2152,18 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! error TS1005: '{' expected. static tV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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'. @@ -2145,12 +2173,14 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. } @@ -2160,7 +2190,8 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient (): number; (p); ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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[]); @@ -2202,19 +2233,24 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient p5? (): void; p6(pa1): void; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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; @@ -2224,19 +2260,23 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient module M { }; export var eV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 { }; @@ -2244,10 +2284,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient } export declare var eaV; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 { @@ -2256,11 +2298,13 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! error TS1183: An implementation cannot be declared in ambient contexts. public pV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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() { } @@ -2270,19 +2314,22 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'pgF'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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) @@ -2306,17 +2353,20 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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) @@ -2326,22 +2376,26 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~ @@ -2351,10 +2405,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient module M { } export var eV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 { } @@ -2364,10 +2420,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient } export declare var eaV; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 { @@ -2376,11 +2434,13 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! error TS1183: An implementation cannot be declared in ambient contexts. public pV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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() { } @@ -2390,19 +2450,22 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'pgF'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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) @@ -2426,17 +2489,20 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! error TS2300: Duplicate identifier 'rsF'. static tV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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) @@ -2446,22 +2512,26 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~ @@ -2472,19 +2542,23 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! error TS1183: An implementation cannot be declared in ambient contexts. public pV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. } @@ -2533,27 +2607,34 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient p5? (): void; p6(pa1): void; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~ @@ -2563,10 +2644,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient module M { } export var eV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 { } @@ -2576,12 +2659,14 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~~~~~ !!! error TS1038: A 'declare' modifier cannot be used in an already ambient context. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 { } @@ -2593,10 +2678,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient } export var eV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 { @@ -2605,19 +2692,23 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! error TS1183: An implementation cannot be declared in ambient contexts. public pV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. } @@ -2627,7 +2718,8 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient (): number; (p); ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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[]); @@ -2669,27 +2761,34 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient p5? (): void; p6(pa1): void; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. ~ @@ -2698,10 +2797,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient module M { } export var eV; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 { } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/inKeywordAndIntersection.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/inKeywordAndIntersection.d.ts index 08cf5031c86fa..2855cd9cfce3b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/inKeywordAndIntersection.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/inKeywordAndIntersection.d.ts @@ -59,7 +59,7 @@ declare const ClassOne: (new () => InstanceOne) & { /// [Errors] //// -inKeywordAndIntersection.ts(4,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +inKeywordAndIntersection.ts(4,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations ==== inKeywordAndIntersection.ts (1 errors) ==== @@ -68,7 +68,8 @@ inKeywordAndIntersection.ts(4,10): error TS9007: Declaration emit for this file function f10(obj: A & { x: string } | B) { ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 inKeywordAndIntersection.ts:4:10: Add a return type to the function declaration if (obj instanceof Object) { obj; // A & { x: string } | B } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts index 425ad4ace6024..098aec9e84703 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts @@ -38,7 +38,7 @@ indexSignatureMustHaveTypeAnnotation.ts(3,5): error TS1169: A computed property indexSignatureMustHaveTypeAnnotation.ts(3,6): error TS2304: Cannot find name 'x'. indexSignatureMustHaveTypeAnnotation.ts(4,5): error TS1021: An index signature must have a type annotation. indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS2304: Cannot find name 'x'. indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS4031: Public property '[x]' of exported class has or is using private name 'x'. indexSignatureMustHaveTypeAnnotation.ts(14,5): error TS1021: An index signature must have a type annotation. @@ -63,7 +63,7 @@ indexSignatureMustHaveTypeAnnotation.ts(14,5): error TS1021: An index signature ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'x'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts index 6ba310ce761a4..58bb11f4c8fe6 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts @@ -18,7 +18,7 @@ declare class C { /// [Errors] //// indexWithoutParamType2.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -indexWithoutParamType2.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +indexWithoutParamType2.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations indexWithoutParamType2.ts(3,6): error TS2304: Cannot find name 'x'. indexWithoutParamType2.ts(3,6): error TS4031: Public property '[x]' of exported class has or is using private name 'x'. @@ -30,7 +30,7 @@ indexWithoutParamType2.ts(3,6): error TS4031: Public property '[x]' of exported ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'x'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts index 7fff6d9192fb8..25e05ba7944f7 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts @@ -370,20 +370,20 @@ declare var obj87: i8; /// [Errors] //// -intTypeCheck.ts(9,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -intTypeCheck.ts(10,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -intTypeCheck.ts(10,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -intTypeCheck.ts(16,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(9,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +intTypeCheck.ts(10,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +intTypeCheck.ts(10,15): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +intTypeCheck.ts(16,6): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations intTypeCheck.ts(35,6): error TS2304: Cannot find name 'p'. -intTypeCheck.ts(46,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -intTypeCheck.ts(52,6): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(46,14): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +intTypeCheck.ts(52,6): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations intTypeCheck.ts(71,6): error TS2304: Cannot find name 'p'. -intTypeCheck.ts(83,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -intTypeCheck.ts(84,8): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -intTypeCheck.ts(84,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(83,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +intTypeCheck.ts(84,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +intTypeCheck.ts(84,13): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations intTypeCheck.ts(85,5): error TS2386: Overload signatures must all be optional or required. -intTypeCheck.ts(85,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -intTypeCheck.ts(85,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +intTypeCheck.ts(85,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +intTypeCheck.ts(85,15): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations intTypeCheck.ts(99,5): error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? Type 'Object' is missing the following properties from type 'i1': p, p3, p6 intTypeCheck.ts(100,20): error TS2351: This expression is not constructable. @@ -490,12 +490,15 @@ intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. p5? (): void; p6(pa1): void; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 intTypeCheck.ts:9:8: Add a type annotation to the parameter pa1 p7? (pa1, pa2): void; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 intTypeCheck.ts:10:10: Add a type annotation to the parameter pa1 ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 intTypeCheck.ts:10:15: Add a type annotation to the parameter pa2 } interface i2 { //Call Signatures @@ -503,7 +506,8 @@ intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. (): number; (p); ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 intTypeCheck.ts:16:6: Add a type annotation to the parameter p (p1: string); (p2?: string); (...p3: any[]); @@ -537,7 +541,8 @@ intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. class Base { foo() { } } ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 intTypeCheck.ts:46:14: Add a return type to the method interface i11 { //Call Signatures @@ -545,7 +550,8 @@ intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. (): number; (p); ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 intTypeCheck.ts:52:6: Add a type annotation to the parameter p (p1: string); (p2?: string); (...p3: any[]); @@ -580,19 +586,24 @@ intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. p5? (): void; p6(pa1): void; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 intTypeCheck.ts:83:8: Add a type annotation to the parameter pa1 p7(pa1, pa2): void; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 intTypeCheck.ts:84:8: Add a type annotation to the parameter pa1 ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 intTypeCheck.ts:84:13: Add a type annotation to the parameter pa2 p7? (pa1, pa2): void; ~~ !!! error TS2386: Overload signatures must all be optional or required. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 intTypeCheck.ts:85:10: Add a type annotation to the parameter pa1 ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 intTypeCheck.ts:85:15: Add a type annotation to the parameter pa2 } var anyVar: any; 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..b6f51afcd5507 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrorsClasses.d.ts @@ -0,0 +1,216 @@ +//// [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 { + + [noAnnotationLiteralName](): void { } + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName]() { } + + [noParamAnnotationStringName](v): void { } + + get [noAnnotationStringName]() { return 0;} + + set [noParamAnnotationStringName](value) { } +} + + + +/// [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 { + [noAnnotationLiteralName](): void; + [noParamAnnotationLiteralName](v: string): void; + [noAnnotationStringName](): invalid; + [noParamAnnotationStringName](v: invalid): void; + get [noAnnotationStringName](): invalid; + set [noParamAnnotationStringName](value: invalid); +} +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(39,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(39,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(41,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(41,35): error TS7006: Parameter 'v' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(41,35): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(43,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(43,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(45,9): error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. +isolatedDeclarationErrorsClasses.ts(45,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(45,39): error TS7006: Parameter 'value' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(45,39): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + + +==== isolatedDeclarationErrorsClasses.ts (21 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 { + + [noAnnotationLiteralName](): void { } + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName]() { } + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 isolatedDeclarationErrorsClasses.ts:39:5: Add a return type to the method + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! 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. + ~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 isolatedDeclarationErrorsClasses.ts:41:35: Add a type annotation to the parameter v + + get [noAnnotationStringName]() { return 0;} + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 isolatedDeclarationErrorsClasses.ts:43:9: Add a return type to the get accessor declaration + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! 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. + ~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 isolatedDeclarationErrorsClasses.ts:45:9: Add a type to parameter of the set accessor declaration + } + + \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/literalTypesAndTypeAssertions.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/literalTypesAndTypeAssertions.d.ts index 71254564f0955..e84e4ad6f765f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/literalTypesAndTypeAssertions.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/literalTypesAndTypeAssertions.d.ts @@ -35,10 +35,10 @@ declare let d: invalid; /// [Errors] //// -literalTypesAndTypeAssertions.ts(10,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -literalTypesAndTypeAssertions.ts(11,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -literalTypesAndTypeAssertions.ts(12,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -literalTypesAndTypeAssertions.ts(13,7): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +literalTypesAndTypeAssertions.ts(10,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations +literalTypesAndTypeAssertions.ts(11,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations +literalTypesAndTypeAssertions.ts(12,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations +literalTypesAndTypeAssertions.ts(13,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations ==== literalTypesAndTypeAssertions.ts (4 errors) ==== @@ -53,14 +53,14 @@ literalTypesAndTypeAssertions.ts(13,7): error TS9007: Declaration emit for this let { a = "foo" } = { a: "foo" }; ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations let { b = "foo" as "foo" } = { b: "bar" }; ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations let { c = "foo" } = { c: "bar" as "bar" }; ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations let { d = "foo" as "foo" } = { d: "bar" as "bar" }; ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts new file mode 100644 index 0000000000000..8d7cc63700e89 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts @@ -0,0 +1,211 @@ +//// [tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts] //// + +//// [modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts] +// All will be error from using ES6 features but only include ES5 library +// Using Es6 array +function f(x: number, y: number, z: number) { + return Array.from(arguments); +} + +f(1, 2, 3); // no error + +// Using ES6 collection +var m = new Map(); +m.clear(); +// Using ES6 iterable +m.keys(); + +// Using ES6 function +function Baz() { } +Baz.name; + +// Using ES6 math +Math.sign(1); + +// Using ES6 object +var o = { + a: 2, + [Symbol.hasInstance](value: any) { + return false; + } +}; +o.hasOwnProperty(Symbol.hasInstance); + +// Using Es6 proxy +var t = {} +var p = new Proxy(t, {}); + +// Using ES6 reflect +Reflect.isExtensible({}); + +// Using Es6 regexp +var reg = new RegExp("/s"); +reg.flags; + +// Using ES6 string +var str = "Hello world"; +str.includes("hello", 0); + +// Using ES6 symbol +var s = Symbol(); + +// Using ES6 wellknown-symbol +const o1 = { + [Symbol.hasInstance](value: any) { + return false; + } +} + +/// [Declarations] //// + + + +//// [modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts] +declare function f(x: number, y: number, z: number): invalid; +declare var m: invalid; +declare function Baz(): invalid; +declare var o: invalid; +declare var t: {}; +declare var p: invalid; +declare var reg: invalid; +declare var str: string; +declare var s: invalid; +declare const o1: invalid; + +/// [Errors] //// + +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(3,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(4,18): error TS2550: Property 'from' does not exist on type 'ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(10,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(10,13): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(16,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(17,5): error TS2339: Property 'name' does not exist on type '() => void'. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(20,6): error TS2550: Property 'sign' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(29,18): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,13): error TS2304: Cannot find name 'Proxy'. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(36,1): error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(39,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(40,5): error TS2550: Property 'flags' does not exist on type 'RegExp'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(44,5): error TS2550: Property 'includes' does not exist on type 'string'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + +==== modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts (22 errors) ==== + // All will be error from using ES6 features but only include ES5 library + // Using Es6 array + function f(x: number, y: number, z: number) { + ~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:3:10: Add a return type to the function declaration + return Array.from(arguments); + ~~~~ +!!! error TS2550: Property 'from' does not exist on type 'ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. + } + + f(1, 2, 3); // no error + + // Using ES6 collection + var m = new Map(); + ~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:10:5: Add a type annotation to the variable m + ~~~ +!!! error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. + m.clear(); + // Using ES6 iterable + m.keys(); + + // Using ES6 function + function Baz() { } + ~~~ +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:16:10: Add a return type to the function declaration + Baz.name; + ~~~~ +!!! error TS2339: Property 'name' does not exist on type '() => void'. + + // Using ES6 math + Math.sign(1); + ~~~~ +!!! error TS2550: Property 'sign' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. + + // Using ES6 object + var o = { + a: 2, + [Symbol.hasInstance](value: any) { + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:23:5: Add a type annotation to the variable o +!!! related TS9034 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:25:5: Add a return type to the method + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:23:5: Add a type annotation to the variable o + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + return false; + } + }; + o.hasOwnProperty(Symbol.hasInstance); + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + + // Using Es6 proxy + var t = {} + var p = new Proxy(t, {}); + ~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:33:5: Add a type annotation to the variable p + ~~~~~ +!!! error TS2304: Cannot find name 'Proxy'. + + // Using ES6 reflect + Reflect.isExtensible({}); + ~~~~~~~ +!!! error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. + + // Using Es6 regexp + var reg = new RegExp("/s"); + ~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:39:5: Add a type annotation to the variable reg + reg.flags; + ~~~~~ +!!! error TS2550: Property 'flags' does not exist on type 'RegExp'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. + + // Using ES6 string + var str = "Hello world"; + str.includes("hello", 0); + ~~~~~~~~ +!!! error TS2550: Property 'includes' does not exist on type 'string'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. + + // Using ES6 symbol + var s = Symbol(); + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:47:5: Add a type annotation to the variable s + + // Using ES6 wellknown-symbol + const o1 = { + [Symbol.hasInstance](value: any) { + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:50:7: Add a type annotation to the variable o1 +!!! related TS9034 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:51:5: Add a return type to the method + ~~~~~~~~~~~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:50:7: Add a type annotation to the variable o1 + ~~~~~~ +!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + return false; + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/moduleResolutionWithSuffixes_one_externalTSModule.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/moduleResolutionWithSuffixes_one_externalTSModule.d.ts index 40de3e7fa9c03..9e346a299c290 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/moduleResolutionWithSuffixes_one_externalTSModule.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/moduleResolutionWithSuffixes_one_externalTSModule.d.ts @@ -17,7 +17,7 @@ export {}; /// [Errors] //// -/node_modules/some-library/index.ios.ts(1,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/node_modules/some-library/index.ios.ts(1,17): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations ==== /test.ts (0 errors) ==== @@ -26,6 +26,7 @@ export {}; ==== /node_modules/some-library/index.ios.ts (1 errors) ==== export function ios() {} ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 /node_modules/some-library/index.ios.ts:1:17: Add a return type to the function declaration ==== /node_modules/some-library/index.ts (0 errors) ==== export function base() {} \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/namedTupleMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/namedTupleMembers.d.ts index 44d2f9509dbf1..f71e9201caeef 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/namedTupleMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/namedTupleMembers.d.ts @@ -112,10 +112,10 @@ export declare const argumentsOfG: invalid; /// [Errors] //// -namedTupleMembers.ts(41,62): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -namedTupleMembers.ts(48,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -namedTupleMembers.ts(76,44): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -namedTupleMembers.ts(77,29): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -161,7 +161,8 @@ namedTupleMembers.ts(77,29): error TS9007: Declaration emit for this file requir export function useState(initial: T): [value: T, setter: (T) => void] { ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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; } @@ -170,7 +171,8 @@ namedTupleMembers.ts(77,29): error TS9007: Declaration emit for this file requir export function readSegment([length, count]: [number, number]) {} ~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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]; @@ -200,8 +202,10 @@ namedTupleMembers.ts(77,29): error TS9007: Declaration emit for this file requir export const argumentsOfGAsFirstArgument = f(getArgsForInjection(g)); // one tuple with captures arguments as first member ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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/noUncheckedIndexedAccess.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/noUncheckedIndexedAccess.d.ts index 4bbfb604d8707..e18a9182aa7cf 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/noUncheckedIndexedAccess.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/noUncheckedIndexedAccess.d.ts @@ -234,7 +234,7 @@ noUncheckedIndexedAccess.ts(79,7): error TS2322: Type 'number | boolean | undefi noUncheckedIndexedAccess.ts(85,1): error TS2322: Type 'undefined' is not assignable to type 'string'. noUncheckedIndexedAccess.ts(90,7): error TS2322: Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. -noUncheckedIndexedAccess.ts(97,13): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +noUncheckedIndexedAccess.ts(97,13): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations noUncheckedIndexedAccess.ts(98,5): error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. Type 'undefined' is not assignable to type 'string'. noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'string | undefined' is not assignable to type 'string'. @@ -402,9 +402,9 @@ noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'string | undefined' is n const fn2 = (key: Key): string => myRecord2[key]; // Should OK const fn3 = (key: Key) => { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 noUncheckedIndexedAccess.ts:97:7: Add a type annotation to the variable fn3 -!!! related TS9603 noUncheckedIndexedAccess.ts:97:13: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 noUncheckedIndexedAccess.ts:97:7: Add a type annotation to the variable fn3 +!!! related TS9030 noUncheckedIndexedAccess.ts:97:13: Add a return type to the function expression myRecord2[key] = undefined; // Should error ~~~~~~~~~~~~~~ !!! error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. 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 index c893b1ce2fdc9..b8e61dffbbc52 100644 --- 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 @@ -154,12 +154,12 @@ error TS2468: Cannot find global value 'Promise'. /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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. @@ -175,17 +175,17 @@ error TS2468: Cannot find global value 'Promise'. /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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'. @@ -339,7 +339,8 @@ error TS2468: Cannot find global value 'Promise'. export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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')'? ~ @@ -351,7 +352,8 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: ',' expected. export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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')'? ~ @@ -400,13 +402,15 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: '{' expected. !!! related TS1007 /other4.ts:9:48: The parser expected to find a '}' to match the '{' token here. ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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); @@ -416,13 +420,15 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: '{' expected. !!! related TS1007 /other4.ts:10:48: The parser expected to find a '}' to match the '{' token here. ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. 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 index c893b1ce2fdc9..b8e61dffbbc52 100644 --- 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 @@ -154,12 +154,12 @@ error TS2468: Cannot find global value 'Promise'. /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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. @@ -175,17 +175,17 @@ error TS2468: Cannot find global value 'Promise'. /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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'. @@ -339,7 +339,8 @@ error TS2468: Cannot find global value 'Promise'. export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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')'? ~ @@ -351,7 +352,8 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: ',' expected. export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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')'? ~ @@ -400,13 +402,15 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: '{' expected. !!! related TS1007 /other4.ts:9:48: The parser expected to find a '}' to match the '{' token here. ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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); @@ -416,13 +420,15 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: '{' expected. !!! related TS1007 /other4.ts:10:48: The parser expected to find a '}' to match the '{' token here. ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. 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 index 31a64496b9c93..e303ea4a73542 100644 --- 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 @@ -148,12 +148,12 @@ error TS2468: Cannot find global value 'Promise'. /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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. @@ -169,17 +169,17 @@ error TS2468: Cannot find global value 'Promise'. /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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`. @@ -328,7 +328,8 @@ error TS2468: Cannot find global value 'Promise'. export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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')'? ~ @@ -340,7 +341,8 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: ',' expected. export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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')'? ~ @@ -388,13 +390,15 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: '{' expected. !!! related TS1007 /other4.ts:9:48: The parser expected to find a '}' to match the '{' token here. ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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); @@ -404,13 +408,15 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: '{' expected. !!! related TS1007 /other4.ts:10:48: The parser expected to find a '}' to match the '{' token here. ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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) ==== 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 index 31a64496b9c93..e303ea4a73542 100644 --- 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 @@ -148,12 +148,12 @@ error TS2468: Cannot find global value 'Promise'. /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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. @@ -169,17 +169,17 @@ error TS2468: Cannot find global value 'Promise'. /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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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`. @@ -328,7 +328,8 @@ error TS2468: Cannot find global value 'Promise'. export const a = (null as any as import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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')'? ~ @@ -340,7 +341,8 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: ',' expected. export const b = (null as any as import("pkg", [ {"resolution-mode": "import"} ]).ImportInterface); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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')'? ~ @@ -388,13 +390,15 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: '{' expected. !!! related TS1007 /other4.ts:9:48: The parser expected to find a '}' to match the '{' token here. ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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); @@ -404,13 +408,15 @@ error TS2468: Cannot find global value 'Promise'. !!! error TS1005: '{' expected. !!! related TS1007 /other4.ts:10:48: The parser expected to find a '}' to match the '{' token here. ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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) ==== diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralGettersAndSetters.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralGettersAndSetters.d.ts index 8fafd4a4f5ee3..c18971c322275 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralGettersAndSetters.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralGettersAndSetters.d.ts @@ -153,59 +153,73 @@ declare var getParamType3: invalid; /// [Errors] //// -objectLiteralGettersAndSetters.ts(2,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(3,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(4,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(5,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(6,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(7,24): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(10,18): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(12,23): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(14,23): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(22,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(30,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(60,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(67,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -objectLiteralGettersAndSetters.ts(76,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +objectLiteralGettersAndSetters.ts(2,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(3,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(4,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(5,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(6,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(7,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(10,18): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(12,23): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(14,23): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(22,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(30,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(64,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(67,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(76,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ==== objectLiteralGettersAndSetters.ts (14 errors) ==== // Get and set accessor with the same name var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 objectLiteralGettersAndSetters.ts:2:50: Add a type to parameter of the set accessor declaration +!!! related TS9032 objectLiteralGettersAndSetters.ts:2:24: Add a return type to the get accessor declaration var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } }; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 objectLiteralGettersAndSetters.ts:3:50: Add a type to parameter of the set accessor declaration +!!! related TS9032 objectLiteralGettersAndSetters.ts:3:24: Add a return type to the get accessor declaration var sameName3a = { get 0x20() { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 objectLiteralGettersAndSetters.ts:4:51: Add a type to parameter of the set accessor declaration +!!! related TS9032 objectLiteralGettersAndSetters.ts:4:24: Add a return type to the get accessor declaration var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p: string; } }; ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 objectLiteralGettersAndSetters.ts:5:49: Add a type to parameter of the set accessor declaration +!!! related TS9032 objectLiteralGettersAndSetters.ts:5:24: Add a return type to the get accessor declaration var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p: string; } }; ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 objectLiteralGettersAndSetters.ts:6:51: Add a type to parameter of the set accessor declaration +!!! related TS9032 objectLiteralGettersAndSetters.ts:6:24: Add a return type to the get accessor declaration var sameName6a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 objectLiteralGettersAndSetters.ts:7:50: Add a type to parameter of the set accessor declaration +!!! related TS9032 objectLiteralGettersAndSetters.ts:7:24: Add a return type to the get accessor declaration // PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} var callSig1 = { num(n: number) { return '' } }; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 objectLiteralGettersAndSetters.ts:10:5: Add a type annotation to the variable callSig1 +!!! related TS9034 objectLiteralGettersAndSetters.ts:10:18: Add a return type to the method var callSig1: { num: (n: number) => string; }; var callSig2 = { num: function (n: number) { return '' } }; ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 objectLiteralGettersAndSetters.ts:12:5: Add a type annotation to the variable callSig2 -!!! related TS9603 objectLiteralGettersAndSetters.ts:12:23: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 objectLiteralGettersAndSetters.ts:12:5: Add a type annotation to the variable callSig2 +!!! related TS9030 objectLiteralGettersAndSetters.ts:12:23: Add a return type to the function expression var callSig2: { num: (n: number) => string; }; var callSig3 = { num: (n: number) => '' }; ~~~~~~~~~~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 objectLiteralGettersAndSetters.ts:14:5: Add a type annotation to the variable callSig3 -!!! related TS9603 objectLiteralGettersAndSetters.ts:14:23: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 objectLiteralGettersAndSetters.ts:14:5: Add a type annotation to the variable callSig3 +!!! related TS9030 objectLiteralGettersAndSetters.ts:14:23: Add a return type to the function expression var callSig3: { num: (n: number) => string; }; // Get accessor only, type of the property is the annotated return type of the get accessor @@ -215,7 +229,8 @@ objectLiteralGettersAndSetters.ts(76,9): error TS9007: Declaration emit for this // Get accessor only, type of the property is the inferred return type of the get accessor var getter2 = { get x() { return ''; } }; ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 objectLiteralGettersAndSetters.ts:22:21: Add a return type to the get accessor declaration var getter2: { readonly x: string; } // Set accessor only, type of the property is the param type of the set accessor @@ -224,8 +239,9 @@ objectLiteralGettersAndSetters.ts(76,9): error TS9007: Declaration emit for this // Set accessor only, type of the property is Any for an unannotated set accessor var setter2 = { set x(n) { } }; - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 objectLiteralGettersAndSetters.ts:30:21: Add a type to parameter of the set accessor declaration var setter2: { x: any }; var anyVar: any; @@ -256,17 +272,21 @@ objectLiteralGettersAndSetters.ts(76,9): error TS9007: Declaration emit for this // Type of unannotated set accessor parameter is the return type annotation of the get accessor var getParamType1 = { set n(x) { - ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. var y = x; var y: string; }, get n() { return ''; } + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 objectLiteralGettersAndSetters.ts:60:9: Add a type to parameter of the set accessor declaration +!!! related TS9032 objectLiteralGettersAndSetters.ts:64:9: Add a return type to the get accessor declaration }; var getParamType2 = { get n() { return ''; }, ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 objectLiteralGettersAndSetters.ts:68:9: Add a type to parameter of the set accessor declaration +!!! related TS9032 objectLiteralGettersAndSetters.ts:67:9: Add a return type to the get accessor declaration set n(x) { var y = x; var y: string; @@ -277,7 +297,9 @@ objectLiteralGettersAndSetters.ts(76,9): error TS9007: Declaration emit for this var getParamType3 = { get n() { return ''; }, ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 objectLiteralGettersAndSetters.ts:77:9: Add a type to parameter of the set accessor declaration +!!! related TS9032 objectLiteralGettersAndSetters.ts:76:9: Add a return type to the get accessor declaration set n(x) { var y = x; var y: string; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/optionalChainingInference.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/optionalChainingInference.d.ts index c184b8539409d..6307834807bbf 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/optionalChainingInference.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/optionalChainingInference.d.ts @@ -73,12 +73,12 @@ declare const v8: number; /// [Errors] //// -optionalChainingInference.ts(8,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -optionalChainingInference.ts(17,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -optionalChainingInference.ts(20,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -optionalChainingInference.ts(23,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -optionalChainingInference.ts(26,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -optionalChainingInference.ts(29,21): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +optionalChainingInference.ts(8,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations +optionalChainingInference.ts(17,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations +optionalChainingInference.ts(20,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations +optionalChainingInference.ts(23,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations +optionalChainingInference.ts(26,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations +optionalChainingInference.ts(29,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations ==== optionalChainingInference.ts (6 errors) ==== @@ -91,7 +91,9 @@ optionalChainingInference.ts(29,21): error TS9007: Declaration emit for this fil const b1 = { value: su?.length }; ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 optionalChainingInference.ts:8:7: Add a type annotation to the variable b1 +!!! related TS9035 optionalChainingInference.ts:8:21: Add a type assertion to this expression to make type type explicit const v1: number = unbox(b1); const b2 = { value: su?.length as number | undefined }; @@ -102,27 +104,37 @@ optionalChainingInference.ts(29,21): error TS9007: Declaration emit for this fil const b4 = { value: fnu?.() }; ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 optionalChainingInference.ts:17:7: Add a type annotation to the variable b4 +!!! related TS9035 optionalChainingInference.ts:17:21: Add a type assertion to this expression to make type type explicit const v4: number = unbox(b4); const b5 = { value: su?.["length"] }; ~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 optionalChainingInference.ts:20:7: Add a type annotation to the variable b5 +!!! related TS9035 optionalChainingInference.ts:20:21: Add a type assertion to this expression to make type type explicit const v5: number = unbox(b5); const b6 = { value: osu?.prop.length }; ~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 optionalChainingInference.ts:23:7: Add a type annotation to the variable b6 +!!! related TS9035 optionalChainingInference.ts:23:21: Add a type assertion to this expression to make type type explicit const v6: number = unbox(b6); const b7 = { value: osu?.prop["length"] }; ~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 optionalChainingInference.ts:26:7: Add a type annotation to the variable b7 +!!! related TS9035 optionalChainingInference.ts:26:21: Add a type assertion to this expression to make type type explicit const v7: number = unbox(b7); const b8 = { value: ofnu?.prop() }; ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! related TS9027 optionalChainingInference.ts:29:7: Add a type annotation to the variable b8 +!!! related TS9035 optionalChainingInference.ts:29:21: Add a type assertion to this expression to make type type explicit const v8: number = unbox(b8); \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts index 0ed296293e2d4..adeacfe66e2a2 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts @@ -112,23 +112,25 @@ interface I3 { /// [Errors] //// overloadsWithComputedNames.ts(4,5): error TS2389: Function implementation name must be '["B"]'. -overloadsWithComputedNames.ts(8,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +overloadsWithComputedNames.ts(8,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations overloadsWithComputedNames.ts(14,5): error TS2391: Function implementation is missing or not immediately following the declaration. overloadsWithComputedNames.ts(16,5): error TS2389: Function implementation name must be '["bar"]'. overloadsWithComputedNames.ts(28,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -overloadsWithComputedNames.ts(28,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +overloadsWithComputedNames.ts(28,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations overloadsWithComputedNames.ts(29,5): error TS2391: Function implementation is missing or not immediately following the declaration. overloadsWithComputedNames.ts(35,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. overloadsWithComputedNames.ts(42,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -overloadsWithComputedNames.ts(42,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -overloadsWithComputedNames.ts(43,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +overloadsWithComputedNames.ts(42,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +overloadsWithComputedNames.ts(43,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +overloadsWithComputedNames.ts(43,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations overloadsWithComputedNames.ts(47,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -overloadsWithComputedNames.ts(47,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -overloadsWithComputedNames.ts(48,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +overloadsWithComputedNames.ts(47,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +overloadsWithComputedNames.ts(48,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +overloadsWithComputedNames.ts(48,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is missing or not immediately following the declaration. -==== overloadsWithComputedNames.ts (15 errors) ==== +==== overloadsWithComputedNames.ts (17 errors) ==== // https://github.com/microsoft/TypeScript/issues/52329 class Person { ["B"](a: number): string; @@ -140,7 +142,8 @@ overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is mi } let p = new Person(); ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 overloadsWithComputedNames.ts:8:5: Add a type annotation to the variable p p.A(0) p.B(0) @@ -168,7 +171,7 @@ overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is mi ~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [uniqueSym2](): void; // should error ~~~~~~~~~~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. @@ -190,10 +193,13 @@ overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is mi ~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [strUnion]() { } ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 overloadsWithComputedNames.ts:43:5: Add a return type to the method + ~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } class I2 { @@ -201,10 +207,13 @@ overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is mi ~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [strUnion]() { } ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 overloadsWithComputedNames.ts:48:5: Add a return type to the method + ~~~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } class C3 { diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNonNullableTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNonNullableTypes.d.ts index c2d5538f294c0..0885ed5afe450 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNonNullableTypes.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNonNullableTypes.d.ts @@ -47,13 +47,13 @@ declare const d: !number; parseInvalidNonNullableTypes.ts(1,30): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? parseInvalidNonNullableTypes.ts(5,30): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(9,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNonNullableTypes.ts(9,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations parseInvalidNonNullableTypes.ts(9,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(10,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNonNullableTypes.ts(10,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations parseInvalidNonNullableTypes.ts(10,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? -parseInvalidNonNullableTypes.ts(12,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNonNullableTypes.ts(12,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations parseInvalidNonNullableTypes.ts(12,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(13,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNonNullableTypes.ts(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations parseInvalidNonNullableTypes.ts(13,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? parseInvalidNonNullableTypes.ts(15,16): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. parseInvalidNonNullableTypes.ts(15,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? @@ -80,23 +80,27 @@ parseInvalidNonNullableTypes.ts(22,10): error TS17020: '!' at the start of a typ function f3(a: string!) {} ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parseInvalidNonNullableTypes.ts:9:10: Add a return type to the function declaration ~~~~~~~ !!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? function f4(a: number!) {} ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parseInvalidNonNullableTypes.ts:10:10: Add a return type to the function declaration ~~~~~~~ !!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? function f5(a: !string) {} ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parseInvalidNonNullableTypes.ts:12:10: Add a return type to the function declaration ~~~~~~~ !!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? function f6(a: !number) {} ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parseInvalidNonNullableTypes.ts:13:10: Add a return type to the function declaration ~~~~~~~ !!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNullableTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNullableTypes.d.ts index 3eff6950ce7aa..364545318dcfb 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNullableTypes.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNullableTypes.d.ts @@ -53,13 +53,13 @@ parseInvalidNullableTypes.ts(1,30): error TS2677: A type predicate's type must b Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. parseInvalidNullableTypes.ts(1,30): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? -parseInvalidNullableTypes.ts(5,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNullableTypes.ts(5,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations parseInvalidNullableTypes.ts(5,16): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string | undefined'? -parseInvalidNullableTypes.ts(6,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNullableTypes.ts(6,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations parseInvalidNullableTypes.ts(6,16): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? -parseInvalidNullableTypes.ts(8,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNullableTypes.ts(8,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations parseInvalidNullableTypes.ts(8,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? -parseInvalidNullableTypes.ts(9,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseInvalidNullableTypes.ts(9,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations parseInvalidNullableTypes.ts(9,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? parseInvalidNullableTypes.ts(11,25): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? parseInvalidNullableTypes.ts(12,5): error TS2322: Type 'boolean' is not assignable to type 'string'. @@ -86,23 +86,27 @@ parseInvalidNullableTypes.ts(24,8): error TS17019: '?' at the end of a type is n function f2(a: string?) {} ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parseInvalidNullableTypes.ts:5:10: Add a return type to the function declaration ~~~~~~~ !!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string | undefined'? function f3(a: number?) {} ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parseInvalidNullableTypes.ts:6:10: Add a return type to the function declaration ~~~~~~~ !!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? function f4(a: ?string) {} ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parseInvalidNullableTypes.ts:8:10: Add a return type to the function declaration ~~~~~~~ !!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? function f5(a: ?number) {} ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parseInvalidNullableTypes.ts:9:10: Add a return type to the function declaration ~~~~~~~ !!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parseTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseTypes.d.ts index 058d1c5f9c89a..64a23cbd7f7ac 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parseTypes.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parseTypes.d.ts @@ -30,8 +30,8 @@ declare function g(s: string): invalid; /// [Errors] //// -parseTypes.ts(5,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parseTypes.ts(6,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parseTypes.ts(5,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parseTypes.ts(6,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations parseTypes.ts(8,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. Target signature provides too few arguments. Expected 1 or more, but got 0. parseTypes.ts(9,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. @@ -49,10 +49,12 @@ parseTypes.ts(11,1): error TS2322: Type '(s: string) => void' is not assignable var w = <{[x:number]: number; }>null function f() { return 3 }; ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parseTypes.ts:5:10: Add a return type to the function declaration function g(s: string) { true }; ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 parseTypes.ts:6:10: Add a return type to the function declaration y=f; y=g; ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts index e53ae7321066b..4bdfa3ed67e78 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts @@ -12,7 +12,7 @@ declare var v: invalid; /// [Errors] //// -parserComputedPropertyName1.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName1.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName1.ts(1,12): error TS2304: Cannot find name 'e'. parserComputedPropertyName1.ts(1,15): error TS1005: ':' expected. @@ -20,7 +20,8 @@ parserComputedPropertyName1.ts(1,15): error TS1005: ':' expected. ==== parserComputedPropertyName1.ts (3 errors) ==== var v = { [e] }; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 parserComputedPropertyName1.ts:1:5: Add a type annotation to the variable v ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts index c31d09460edc1..a18d208fa802f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts @@ -17,7 +17,7 @@ declare class C { /// [Errors] //// parserComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName10.ts(2,4): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName10.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. parserComputedPropertyName10.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. @@ -28,7 +28,7 @@ parserComputedPropertyName10.ts(2,5): error TS4031: Public property '[e]' of exp ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName11.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName11.d.ts new file mode 100644 index 0000000000000..fe2ae99504610 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName11.d.ts @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts] //// + +//// [parserComputedPropertyName11.ts] +class C { + [e](); +} + +/// [Declarations] //// + + + +//// [parserComputedPropertyName11.d.ts] +declare class C { + [e](): invalid; +} + +/// [Errors] //// + +parserComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. +parserComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName11.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. +parserComputedPropertyName11.ts(2,5): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + + +==== parserComputedPropertyName11.ts (5 errors) ==== + class C { + [e](); + ~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 parserComputedPropertyName11.ts:2:4: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName12.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName12.d.ts new file mode 100644 index 0000000000000..753aa718da009 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName12.d.ts @@ -0,0 +1,37 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts] //// + +//// [parserComputedPropertyName12.ts] +class C { + [e]() { } +} + +/// [Declarations] //// + + + +//// [parserComputedPropertyName12.d.ts] +declare class C { + [e](): invalid; +} + +/// [Errors] //// + +parserComputedPropertyName12.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName12.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserComputedPropertyName12.ts(2,5): error TS2304: Cannot find name 'e'. +parserComputedPropertyName12.ts(2,5): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + + +==== parserComputedPropertyName12.ts (4 errors) ==== + class C { + [e]() { } + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 parserComputedPropertyName12.ts:2:4: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName17.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName17.d.ts new file mode 100644 index 0000000000000..52cce6d7091cf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName17.d.ts @@ -0,0 +1,29 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts] //// + +//// [parserComputedPropertyName17.ts] +var v = { set [e](v) { } } + +/// [Declarations] //// + + + +//// [parserComputedPropertyName17.d.ts] +declare var v: invalid; + +/// [Errors] //// + +parserComputedPropertyName17.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserComputedPropertyName17.ts(1,16): error TS2304: Cannot find name 'e'. +parserComputedPropertyName17.ts(1,19): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + + +==== parserComputedPropertyName17.ts (3 errors) ==== + var v = { set [e](v) { } } + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 parserComputedPropertyName17.ts:1:5: Add a type annotation to the variable v + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 parserComputedPropertyName17.ts:1:15: Add a type to parameter of the set accessor declaration \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts index 15f5b1b1e74fa..60e9d37aa99a8 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts @@ -12,13 +12,14 @@ declare var v: invalid; /// [Errors] //// -parserComputedPropertyName2.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName2.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. ==== parserComputedPropertyName2.ts (2 errors) ==== var v = { [e]: 1 }; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 parserComputedPropertyName2.ts:1:5: Add a type annotation to the variable v ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts index 2adfd1d271910..75c465fca7a50 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts @@ -17,7 +17,7 @@ declare class C { /// [Errors] //// parserComputedPropertyName22.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName22.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName22.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName22.ts(2,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName22.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. @@ -28,7 +28,7 @@ parserComputedPropertyName22.ts(2,6): error TS4031: Public property '[e]' of exp ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts index 7402f13ac85b0..ef6c9dfbe8581 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts @@ -16,7 +16,7 @@ declare class C { /// [Errors] //// -parserComputedPropertyName23.ts(2,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName23.ts(2,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName23.ts(2,10): error TS2304: Cannot find name 'e'. parserComputedPropertyName23.ts(2,10): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. @@ -25,7 +25,7 @@ parserComputedPropertyName23.ts(2,10): error TS4031: Public property '[e]' of ex declare class C { get [e](): number ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts index 2f4af09dc4bc2..6a4ac7ea62f26 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts @@ -16,21 +16,22 @@ declare class C { /// [Errors] //// -parserComputedPropertyName24.ts(2,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName24.ts(2,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName24.ts(2,10): error TS2304: Cannot find name 'e'. parserComputedPropertyName24.ts(2,10): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -parserComputedPropertyName24.ts(2,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName24.ts(2,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ==== parserComputedPropertyName24.ts (4 errors) ==== class C { set [e](v) { } ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 parserComputedPropertyName24.ts:2:9: Add a type to parameter of the set accessor declaration } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts index 59aa0181ad47b..6f8cae2048f51 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts @@ -19,10 +19,10 @@ declare class C { /// [Errors] //// parserComputedPropertyName25.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName25.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName25.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName25.ts(3,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName25.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -parserComputedPropertyName25.ts(3,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName25.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. @@ -33,7 +33,7 @@ parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ @@ -41,7 +41,8 @@ parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. ~ [e2] = 1 ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +!!! related TS9029 parserComputedPropertyName25.ts:3:5: Add a type annotation to the property [e] ~~ !!! error TS2304: Cannot find name 'e2'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts index 06c906e820daf..cea6c96151590 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts @@ -19,12 +19,12 @@ declare class C { /// [Errors] //// -parserComputedPropertyName27.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName27.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName27.ts(3,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName27.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName27.ts(4,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName27.ts(4,9): error TS1005: ';' expected. -parserComputedPropertyName27.ts(4,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName27.ts(4,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ==== parserComputedPropertyName27.ts (6 errors) ==== @@ -32,7 +32,7 @@ parserComputedPropertyName27.ts(4,11): error TS9007: Declaration emit for this f // No ASI [e]: number = 0 ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ @@ -43,5 +43,6 @@ parserComputedPropertyName27.ts(4,11): error TS9007: Declaration emit for this f ~ !!! error TS1005: ';' expected. ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +!!! related TS9029 parserComputedPropertyName27.ts:4:11: Add a type annotation to the property number } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts index 1b427ea69fc7c..de736b5530a6d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts @@ -19,11 +19,11 @@ declare class C { /// [Errors] //// parserComputedPropertyName28.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName28.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName28.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName28.ts(2,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName28.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName28.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName28.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName28.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName28.ts(3,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName28.ts(3,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. @@ -34,7 +34,7 @@ parserComputedPropertyName28.ts(3,6): error TS4031: Public property '[e2]' of ex ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ @@ -43,7 +43,7 @@ parserComputedPropertyName28.ts(3,6): error TS4031: Public property '[e2]' of ex ~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~ !!! error TS2304: Cannot find name 'e2'. ~~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts index f633e68502474..9ca712ea70048 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts @@ -20,13 +20,13 @@ declare class C { /// [Errors] //// parserComputedPropertyName29.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName29.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName29.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName29.ts(3,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName29.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName29.ts(3,11): error TS2304: Cannot find name 'id'. -parserComputedPropertyName29.ts(3,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName29.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName29.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName29.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName29.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName29.ts(4,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName29.ts(4,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. @@ -38,7 +38,7 @@ parserComputedPropertyName29.ts(4,6): error TS4031: Public property '[e2]' of ex ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ @@ -46,12 +46,13 @@ parserComputedPropertyName29.ts(4,6): error TS4031: Public property '[e2]' of ex ~~ !!! error TS2304: Cannot find name 'id'. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +!!! related TS9029 parserComputedPropertyName29.ts:3:5: Add a type annotation to the property [e] [e2]: number ~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~ !!! error TS2304: Cannot find name 'e2'. ~~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName3.d.ts new file mode 100644 index 0000000000000..85c0203687f64 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName3.d.ts @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts] //// + +//// [parserComputedPropertyName3.ts] +var v = { [e]() { } }; + +/// [Declarations] //// + + + +//// [parserComputedPropertyName3.d.ts] +declare var v: invalid; + +/// [Errors] //// + +parserComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName3.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserComputedPropertyName3.ts(1,12): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName3.ts (3 errors) ==== + var v = { [e]() { } }; + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 parserComputedPropertyName3.ts:1:5: Add a type annotation to the variable v +!!! related TS9034 parserComputedPropertyName3.ts:1:11: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 parserComputedPropertyName3.ts:1:5: Add a type annotation to the variable v + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts index a9b92b608f813..a25ae58040962 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts @@ -20,11 +20,11 @@ declare class C { /// [Errors] //// parserComputedPropertyName31.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName31.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName31.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName31.ts(3,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName31.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName31.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName31.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName31.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName31.ts(4,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName31.ts(4,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. @@ -36,7 +36,7 @@ parserComputedPropertyName31.ts(4,6): error TS4031: Public property '[e2]' of ex ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ @@ -45,7 +45,7 @@ parserComputedPropertyName31.ts(4,6): error TS4031: Public property '[e2]' of ex ~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~ !!! error TS2304: Cannot find name 'e2'. ~~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts index cc717cdc1ae45..52a65b724b88b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts @@ -17,7 +17,7 @@ declare class C { /// [Errors] //// parserComputedPropertyName32.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. -parserComputedPropertyName32.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName32.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName32.ts(2,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName32.ts(2,6): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. @@ -28,7 +28,7 @@ parserComputedPropertyName32.ts(2,6): error TS4100: Public method '[e]' of expor ~~~ !!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts index f4a60f5eb5b40..d688bfda30fbb 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts @@ -18,10 +18,10 @@ declare class C { /// [Errors] //// -parserComputedPropertyName33.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName33.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName33.ts(3,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName33.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -parserComputedPropertyName33.ts(3,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName33.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName33.ts(4,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName33.ts(4,12): error TS1005: ';' expected. parserComputedPropertyName33.ts(5,1): error TS1128: Declaration or statement expected. @@ -32,7 +32,7 @@ parserComputedPropertyName33.ts(5,1): error TS1128: Declaration or statement exp // No ASI [e] = 0 ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ @@ -40,7 +40,8 @@ parserComputedPropertyName33.ts(5,1): error TS1128: Declaration or statement exp ~ [e2]() { } ~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +!!! related TS9029 parserComputedPropertyName33.ts:3:5: Add a type annotation to the property [e] ~~ !!! error TS2304: Cannot find name 'e2'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts index aae2e7644c51d..2224f83270ed2 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts @@ -17,7 +17,7 @@ declare class C { /// [Errors] //// parserComputedPropertyName36.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName36.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName36.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName36.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. parserComputedPropertyName36.ts(2,6): error TS2304: Cannot find name 'public'. parserComputedPropertyName36.ts(2,6): error TS4031: Public property '[public ]' of exported class has or is using private name 'public'. @@ -29,7 +29,7 @@ parserComputedPropertyName36.ts(2,6): error TS4031: Public property '[public ]' ~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts index 7b3235ee281cf..a65be4cc7e266 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts @@ -14,7 +14,7 @@ declare var v: invalid; /// [Errors] //// -parserComputedPropertyName37.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName37.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName37.ts(2,6): error TS2304: Cannot find name 'public'. @@ -22,7 +22,8 @@ parserComputedPropertyName37.ts(2,6): error TS2304: Cannot find name 'public'. var v = { [public]: 0 ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 parserComputedPropertyName37.ts:1:5: Add a type annotation to the variable v ~~~~~~ !!! error TS2304: Cannot find name 'public'. }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName38.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName38.d.ts new file mode 100644 index 0000000000000..0966975024229 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName38.d.ts @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts] //// + +//// [parserComputedPropertyName38.ts] +class C { + [public]() { } +} + +/// [Declarations] //// + + + +//// [parserComputedPropertyName38.d.ts] +declare class C { + [public](): invalid; +} + +/// [Errors] //// + +parserComputedPropertyName38.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName38.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserComputedPropertyName38.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. +parserComputedPropertyName38.ts(2,6): error TS2304: Cannot find name 'public'. +parserComputedPropertyName38.ts(2,6): error TS4100: Public method '[public]' of exported class has or is using private name 'public'. + + +==== parserComputedPropertyName38.ts (5 errors) ==== + class C { + [public]() { } + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 parserComputedPropertyName38.ts:2:5: Add a return type to the method + ~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~~~~~~ +!!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. + ~~~~~~ +!!! error TS2304: Cannot find name 'public'. + ~~~~~~ +!!! error TS4100: Public method '[public]' of exported class has or is using private name 'public'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName39.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName39.d.ts new file mode 100644 index 0000000000000..08995a5d2f236 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName39.d.ts @@ -0,0 +1,42 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts] //// + +//// [parserComputedPropertyName39.ts] +"use strict"; +class C { + [public]() { } +} + +/// [Declarations] //// + + + +//// [parserComputedPropertyName39.d.ts] +declare class C { + [public](): invalid; +} + +/// [Errors] //// + +parserComputedPropertyName39.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName39.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserComputedPropertyName39.ts(3,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. +parserComputedPropertyName39.ts(3,6): error TS2304: Cannot find name 'public'. +parserComputedPropertyName39.ts(3,6): error TS4100: Public method '[public]' of exported class has or is using private name 'public'. + + +==== parserComputedPropertyName39.ts (5 errors) ==== + "use strict"; + class C { + [public]() { } + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 parserComputedPropertyName39.ts:3:5: Add a return type to the method + ~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~~~~~~ +!!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. + ~~~~~~ +!!! error TS2304: Cannot find name 'public'. + ~~~~~~ +!!! error TS4100: Public method '[public]' of exported class has or is using private name 'public'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName4.d.ts new file mode 100644 index 0000000000000..3da0cfd0023f9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName4.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts] //// + +//// [parserComputedPropertyName4.ts] +var v = { get [e]() { } }; + +/// [Declarations] //// + + + +//// [parserComputedPropertyName4.d.ts] +declare var v: invalid; + +/// [Errors] //// + +parserComputedPropertyName4.ts(1,15): error TS2378: A 'get' accessor must return a value. +parserComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName4.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName4.ts (4 errors) ==== + var v = { get [e]() { } }; + ~~~ +!!! error TS2378: A 'get' accessor must return a value. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 parserComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 parserComputedPropertyName4.ts:1:5: Add a type annotation to the variable v + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName5.d.ts new file mode 100644 index 0000000000000..a4bca591d42bf --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName5.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName5.ts] //// + +//// [parserComputedPropertyName5.ts] +var v = { public get [e]() { } }; + +/// [Declarations] //// + + + +//// [parserComputedPropertyName5.d.ts] +declare var v: invalid; + +/// [Errors] //// + +parserComputedPropertyName5.ts(1,11): error TS1042: 'public' modifier cannot be used here. +parserComputedPropertyName5.ts(1,22): error TS2378: A 'get' accessor must return a value. +parserComputedPropertyName5.ts(1,22): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName5.ts(1,22): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserComputedPropertyName5.ts(1,23): error TS2304: Cannot find name 'e'. + + +==== parserComputedPropertyName5.ts (5 errors) ==== + var v = { public get [e]() { } }; + ~~~~~~ +!!! error TS1042: 'public' modifier cannot be used here. + ~~~ +!!! error TS2378: A 'get' accessor must return a value. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 parserComputedPropertyName5.ts:1:22: Add a return type to the get accessor declaration + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 parserComputedPropertyName5.ts:1:5: Add a type annotation to the variable v + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts index 4af3c097df185..4a3ad01382fb9 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts @@ -12,9 +12,9 @@ declare var v: invalid; /// [Errors] //// -parserComputedPropertyName6.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName6.ts(1,12): error TS2304: Cannot find name 'e'. -parserComputedPropertyName6.ts(1,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName6.ts(1,19): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName6.ts(1,20): error TS2304: Cannot find name 'e'. parserComputedPropertyName6.ts(1,24): error TS2304: Cannot find name 'e'. @@ -22,11 +22,13 @@ parserComputedPropertyName6.ts(1,24): error TS2304: Cannot find name 'e'. ==== parserComputedPropertyName6.ts (5 errors) ==== var v = { [e]: 1, [e + e]: 2 }; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 parserComputedPropertyName6.ts:1:5: Add a type annotation to the variable v ~ !!! error TS2304: Cannot find name 'e'. ~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 parserComputedPropertyName6.ts:1:5: Add a type annotation to the variable v ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName7.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName7.d.ts new file mode 100644 index 0000000000000..bc0d189c206f6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName7.d.ts @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts] //// + +//// [parserComputedPropertyName7.ts] +class C { + [e] +} + +/// [Declarations] //// + + + +//// [parserComputedPropertyName7.d.ts] +declare class C { + [e]: invalid; +} + +/// [Errors] //// + +parserComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +parserComputedPropertyName7.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. +parserComputedPropertyName7.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +==== parserComputedPropertyName7.ts (5 errors) ==== + class C { + [e] + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +!!! related TS9029 parserComputedPropertyName7.ts:2:4: Add a type annotation to the property [e] + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName8.d.ts new file mode 100644 index 0000000000000..66751f358cc63 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName8.d.ts @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts] //// + +//// [parserComputedPropertyName8.ts] +class C { + public [e] +} + +/// [Declarations] //// + + + +//// [parserComputedPropertyName8.d.ts] +declare class C { + [e]: invalid; +} + +/// [Errors] //// + +parserComputedPropertyName8.ts(2,11): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserComputedPropertyName8.ts(2,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +parserComputedPropertyName8.ts(2,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserComputedPropertyName8.ts(2,12): error TS2304: Cannot find name 'e'. +parserComputedPropertyName8.ts(2,12): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +==== parserComputedPropertyName8.ts (5 errors) ==== + class C { + public [e] + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +!!! related TS9029 parserComputedPropertyName8.ts:2:11: Add a type annotation to the property [e] + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts index bce04c64b1f39..cffbfa9f7983b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts @@ -17,7 +17,7 @@ declare class C { /// [Errors] //// parserComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName9.ts(2,4): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserComputedPropertyName9.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. parserComputedPropertyName9.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. @@ -30,7 +30,7 @@ parserComputedPropertyName9.ts(2,9): error TS4031: Public property '[e]' of expo ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts index 3dcbb3215890c..04e98e7059cb2 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts @@ -17,7 +17,7 @@ declare class C { /// [Errors] //// parserES5ComputedPropertyName1.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5ComputedPropertyName1.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserES5ComputedPropertyName1.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5ComputedPropertyName1.ts(2,6): error TS2304: Cannot find name 'e'. parserES5ComputedPropertyName1.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. @@ -28,7 +28,7 @@ parserES5ComputedPropertyName1.ts(2,6): error TS4031: Public property '[e]' of e ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts index 2021982f96afa..386bad8803116 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts @@ -17,7 +17,7 @@ declare class C { /// [Errors] //// parserES5ComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5ComputedPropertyName10.ts(2,4): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserES5ComputedPropertyName10.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5ComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. parserES5ComputedPropertyName10.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. @@ -28,7 +28,7 @@ parserES5ComputedPropertyName10.ts(2,5): error TS4031: Public property '[e]' of ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName11.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName11.d.ts new file mode 100644 index 0000000000000..91d09cafe41d9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName11.d.ts @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts] //// + +//// [parserES5ComputedPropertyName11.ts] +class C { + [e](); +} + +/// [Declarations] //// + + + +//// [parserES5ComputedPropertyName11.d.ts] +declare class C { + [e](): invalid; +} + +/// [Errors] //// + +parserES5ComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. +parserES5ComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserES5ComputedPropertyName11.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserES5ComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. +parserES5ComputedPropertyName11.ts(2,5): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + + +==== parserES5ComputedPropertyName11.ts (5 errors) ==== + class C { + [e](); + ~~~ +!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 parserES5ComputedPropertyName11.ts:2:4: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts index d6ed17c275e4c..d853438535753 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts @@ -12,13 +12,14 @@ declare var v: invalid; /// [Errors] //// -parserES5ComputedPropertyName2.ts(1,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserES5ComputedPropertyName2.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5ComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. ==== parserES5ComputedPropertyName2.ts (2 errors) ==== var v = { [e]: 1 }; ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 parserES5ComputedPropertyName2.ts:1:5: Add a type annotation to the variable v ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName3.d.ts new file mode 100644 index 0000000000000..331b30534483d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName3.d.ts @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts] //// + +//// [parserES5ComputedPropertyName3.ts] +var v = { [e]() { } }; + +/// [Declarations] //// + + + +//// [parserES5ComputedPropertyName3.d.ts] +declare var v: invalid; + +/// [Errors] //// + +parserES5ComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserES5ComputedPropertyName3.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserES5ComputedPropertyName3.ts(1,12): error TS2304: Cannot find name 'e'. + + +==== parserES5ComputedPropertyName3.ts (3 errors) ==== + var v = { [e]() { } }; + ~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 parserES5ComputedPropertyName3.ts:1:5: Add a type annotation to the variable v +!!! related TS9034 parserES5ComputedPropertyName3.ts:1:11: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 parserES5ComputedPropertyName3.ts:1:5: Add a type annotation to the variable v + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName4.d.ts new file mode 100644 index 0000000000000..9f36e0a970c41 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName4.d.ts @@ -0,0 +1,32 @@ +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts] //// + +//// [parserES5ComputedPropertyName4.ts] +var v = { get [e]() { } }; + +/// [Declarations] //// + + + +//// [parserES5ComputedPropertyName4.d.ts] +declare var v: invalid; + +/// [Errors] //// + +parserES5ComputedPropertyName4.ts(1,15): error TS2378: A 'get' accessor must return a value. +parserES5ComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +parserES5ComputedPropertyName4.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserES5ComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. + + +==== parserES5ComputedPropertyName4.ts (4 errors) ==== + var v = { get [e]() { } }; + ~~~ +!!! error TS2378: A 'get' accessor must return a value. + ~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 parserES5ComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 parserES5ComputedPropertyName4.ts:1:5: Add a type annotation to the variable v + ~ +!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName7.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName7.d.ts new file mode 100644 index 0000000000000..58d266d133405 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName7.d.ts @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts] //// + +//// [parserES5ComputedPropertyName7.ts] +class C { + [e] +} + +/// [Declarations] //// + + + +//// [parserES5ComputedPropertyName7.d.ts] +declare class C { + [e]: invalid; +} + +/// [Errors] //// + +parserES5ComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. +parserES5ComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +parserES5ComputedPropertyName7.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserES5ComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. +parserES5ComputedPropertyName7.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + + +==== parserES5ComputedPropertyName7.ts (5 errors) ==== + class C { + [e] + ~~~ +!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +!!! related TS9029 parserES5ComputedPropertyName7.ts:2:4: Add a type annotation to the property [e] + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~ +!!! error TS2304: Cannot find name 'e'. + ~ +!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts index 43f7feab6ce0d..414c805b5b8b5 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts @@ -17,7 +17,7 @@ declare class C { /// [Errors] //// parserES5ComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5ComputedPropertyName9.ts(2,4): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserES5ComputedPropertyName9.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5ComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. parserES5ComputedPropertyName9.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserES5ComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. @@ -30,7 +30,7 @@ parserES5ComputedPropertyName9.ts(2,9): error TS4031: Public property '[e]' of e ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts index 6cbb47f63df31..eee413a72334e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts @@ -17,7 +17,7 @@ declare class C { /// [Errors] //// parserES5SymbolProperty3.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. -parserES5SymbolProperty3.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserES5SymbolProperty3.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5SymbolProperty3.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. parserES5SymbolProperty3.ts(2,6): error TS4100: Public method '[Symbol.unscopables]' of exported class has or is using private name 'Symbol'. @@ -28,7 +28,7 @@ parserES5SymbolProperty3.ts(2,6): error TS4100: Public method '[Symbol.unscopabl ~~~~~~~~~~~~~~~~~~~~ !!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts index 999eb03262bca..3b2984ec78719 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts @@ -17,7 +17,7 @@ declare class C { /// [Errors] //// parserES5SymbolProperty4.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5SymbolProperty4.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserES5SymbolProperty4.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5SymbolProperty4.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. parserES5SymbolProperty4.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. @@ -28,7 +28,7 @@ parserES5SymbolProperty4.ts(2,6): error TS4031: Public property '[Symbol.isRegEx ~~~~~~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts index 3405fa376a222..8da18a0e1d282 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts @@ -17,7 +17,7 @@ declare class C { /// [Errors] //// parserES5SymbolProperty5.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5SymbolProperty5.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserES5SymbolProperty5.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5SymbolProperty5.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. parserES5SymbolProperty5.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. @@ -28,7 +28,7 @@ parserES5SymbolProperty5.ts(2,6): error TS4031: Public property '[Symbol.isRegEx ~~~~~~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts index c32c53f400432..d7b3befe0d8b6 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts @@ -17,7 +17,7 @@ declare class C { /// [Errors] //// parserES5SymbolProperty6.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5SymbolProperty6.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserES5SymbolProperty6.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. parserES5SymbolProperty6.ts(2,6): error TS4031: Public property '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. @@ -28,7 +28,7 @@ parserES5SymbolProperty6.ts(2,6): error TS4031: Public property '[Symbol.toStrin ~~~~~~~~~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts index f7a44aa7a24da..8411511fdaf75 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts @@ -16,7 +16,7 @@ declare class C { /// [Errors] //// -parserES5SymbolProperty7.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +parserES5SymbolProperty7.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5SymbolProperty7.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. parserES5SymbolProperty7.ts(2,6): error TS4100: Public method '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. @@ -25,7 +25,7 @@ parserES5SymbolProperty7.ts(2,6): error TS4100: Public method '[Symbol.toStringT class C { [Symbol.toStringTag](): void { } ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/renamingDestructuredPropertyInFunctionType.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/renamingDestructuredPropertyInFunctionType.d.ts index 48b9a2993c6d8..e830f4cb01948 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/renamingDestructuredPropertyInFunctionType.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/renamingDestructuredPropertyInFunctionType.d.ts @@ -135,55 +135,55 @@ renamingDestructuredPropertyInFunctionType.ts(5,17): error TS2842: 'string' is a 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(10,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(12,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(20,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(22,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(26,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(48,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -renamingDestructuredPropertyInFunctionType.ts(49,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(59,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -renamingDestructuredPropertyInFunctionType.ts(60,12): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -renamingDestructuredPropertyInFunctionType.ts(61,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(61,14): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(62,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -renamingDestructuredPropertyInFunctionType.ts(63,14): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +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) ==== @@ -205,19 +205,23 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 @@ -234,31 +238,37 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. @@ -267,19 +277,22 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. @@ -288,7 +301,8 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration !!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. @@ -297,7 +311,8 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration method1(arg: number): any; // OK method2({ a: string }): any; // Error ~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. @@ -305,7 +320,8 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration (arg: number): any; // OK ({ a: string }): any; // Error ~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. @@ -313,7 +329,8 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration new (arg: number): any; // OK new ({ a: string }): any; // Error ~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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. @@ -322,17 +339,18 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration // Below are OK but renaming should be removed from declaration emit function f1({ a: string }: O) { } ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 renamingDestructuredPropertyInFunctionType.ts:48:7: Add a type annotation to the variable f2 -!!! related TS9603 renamingDestructuredPropertyInFunctionType.ts:48:12: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 renamingDestructuredPropertyInFunctionType.ts:49:7: Add a type annotation to the variable f3 -!!! related TS9603 renamingDestructuredPropertyInFunctionType.ts:49:12: Add a return type to the function expression +!!! 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'. @@ -342,7 +360,9 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration const obj1 = { method({ a: string }: O) { } ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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; } @@ -351,32 +371,37 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9007: Declaration }; function f6({ a: string = "" }: O) { } ~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 renamingDestructuredPropertyInFunctionType.ts:59:7: Add a type annotation to the variable f7 -!!! related TS9603 renamingDestructuredPropertyInFunctionType.ts:59:12: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 renamingDestructuredPropertyInFunctionType.ts:60:7: Add a type annotation to the variable f8 -!!! related TS9603 renamingDestructuredPropertyInFunctionType.ts:60:12: Add a return type to the function expression +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 renamingDestructuredPropertyInFunctionType.ts:63:7: Add a type annotation to the variable f11 -!!! related TS9603 renamingDestructuredPropertyInFunctionType.ts:63:14: Add a return type to the function expression +!!! 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts index d542b56acd3b6..dc7565f024fb0 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts @@ -454,43 +454,43 @@ staticPropertyNameConflicts.ts(228,16): error TS2699: Static property 'name' con staticPropertyNameConflicts.ts(234,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticName'. staticPropertyNameConflicts.ts(240,16): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. staticPropertyNameConflicts.ts(246,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticNameFn'. -staticPropertyNameConflicts.ts(246,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticPropertyNameConflicts.ts(247,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(246,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(247,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations staticPropertyNameConflicts.ts(252,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(253,16): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. staticPropertyNameConflicts.ts(259,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLength'. staticPropertyNameConflicts.ts(264,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(265,16): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. staticPropertyNameConflicts.ts(271,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLengthFn'. -staticPropertyNameConflicts.ts(271,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticPropertyNameConflicts.ts(272,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(271,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. -staticPropertyNameConflicts.ts(284,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(284,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations staticPropertyNameConflicts.ts(289,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prototype'. staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. staticPropertyNameConflicts.ts(296,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. -staticPropertyNameConflicts.ts(296,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticPropertyNameConflicts.ts(297,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(296,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(297,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations staticPropertyNameConflicts.ts(302,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(303,16): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. staticPropertyNameConflicts.ts(309,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCaller'. staticPropertyNameConflicts.ts(314,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(315,16): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. staticPropertyNameConflicts.ts(321,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCallerFn'. -staticPropertyNameConflicts.ts(321,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticPropertyNameConflicts.ts(322,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(321,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(322,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations staticPropertyNameConflicts.ts(327,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(328,16): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. staticPropertyNameConflicts.ts(334,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArguments'. staticPropertyNameConflicts.ts(339,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(340,16): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. staticPropertyNameConflicts.ts(346,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArgumentsFn'. -staticPropertyNameConflicts.ts(346,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ==== staticPropertyNameConflicts.ts (85 errors) ==== @@ -837,10 +837,12 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticNameFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:246:12: Add a return type to the method [FunctionPropertyNames.name]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:247:5: Add a return type to the method } // length @@ -878,10 +880,12 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLengthFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:271:12: Add a return type to the method [FunctionPropertyNames.length]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:272:5: Add a return type to the method } // prototype @@ -901,7 +905,7 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [FunctionPropertyNames.prototype]: string; // ok } @@ -925,10 +929,12 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:296:12: Add a return type to the method [FunctionPropertyNames.prototype]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:297:5: Add a return type to the method } // caller @@ -966,10 +972,12 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCallerFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:321:12: Add a return type to the method [FunctionPropertyNames.caller]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:322:5: Add a return type to the method } // arguments @@ -1007,8 +1015,10 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArgumentsFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:346:12: Add a return type to the method [FunctionPropertyNames.arguments]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:347:5: Add a return type to the method } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts index 7ed02b43ffe05..52a9272a2f86a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts @@ -418,31 +418,31 @@ staticPropertyNameConflicts.ts(171,12): error TS2300: Duplicate identifier 'prot staticPropertyNameConflicts.ts(171,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous'. staticPropertyNameConflicts.ts(176,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. staticPropertyNameConflicts.ts(176,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous2'. -staticPropertyNameConflicts.ts(246,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticPropertyNameConflicts.ts(247,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(246,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(247,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations staticPropertyNameConflicts.ts(252,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(264,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(271,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticPropertyNameConflicts.ts(272,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(271,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. -staticPropertyNameConflicts.ts(284,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(284,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations staticPropertyNameConflicts.ts(289,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prototype'. staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. staticPropertyNameConflicts.ts(296,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. -staticPropertyNameConflicts.ts(296,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticPropertyNameConflicts.ts(297,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(296,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(297,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations staticPropertyNameConflicts.ts(302,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(314,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(321,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticPropertyNameConflicts.ts(322,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(321,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(322,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations staticPropertyNameConflicts.ts(327,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(339,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(346,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ==== staticPropertyNameConflicts.ts (37 errors) ==== @@ -717,10 +717,12 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f export class ExportedStaticNameFn { static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:246:12: Add a return type to the method [FunctionPropertyNames.name]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:247:5: Add a return type to the method } // length @@ -750,10 +752,12 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f export class ExportedStaticLengthFn { static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:271:12: Add a return type to the method [FunctionPropertyNames.length]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:272:5: Add a return type to the method } // prototype @@ -773,7 +777,7 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [FunctionPropertyNames.prototype]: string; // ok } @@ -797,10 +801,12 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:296:12: Add a return type to the method [FunctionPropertyNames.prototype]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:297:5: Add a return type to the method } // caller @@ -830,10 +836,12 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f export class ExportedStaticCallerFn { static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:321:12: Add a return type to the method [FunctionPropertyNames.caller]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:322:5: Add a return type to the method } // arguments @@ -863,8 +871,10 @@ staticPropertyNameConflicts.ts(347,5): error TS9007: Declaration emit for this f export class ExportedStaticArgumentsFn { static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:346:12: Add a return type to the method [FunctionPropertyNames.arguments]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 staticPropertyNameConflicts.ts:347:5: Add a return type to the method } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess1.d.ts new file mode 100644 index 0000000000000..757a5a2810a70 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess1.d.ts @@ -0,0 +1,66 @@ +//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess1.ts] //// + +//// [superSymbolIndexedAccess1.ts] +var symbol = Symbol.for('myThing'); + +class Foo { + [symbol]() { + return 0; + } +} + +class Bar extends Foo { + [symbol]() { + return super[symbol](); + } +} + +/// [Declarations] //// + + + +//// [superSymbolIndexedAccess1.d.ts] +declare var symbol: invalid; +declare class Foo { + [symbol](): invalid; +} +declare class Bar extends Foo { + [symbol](): invalid; +} + +/// [Errors] //// + +superSymbolIndexedAccess1.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +superSymbolIndexedAccess1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +superSymbolIndexedAccess1.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +superSymbolIndexedAccess1.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +superSymbolIndexedAccess1.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +==== superSymbolIndexedAccess1.ts (5 errors) ==== + var symbol = Symbol.for('myThing'); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 superSymbolIndexedAccess1.ts:1:5: Add a type annotation to the variable symbol + + class Foo { + [symbol]() { + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 superSymbolIndexedAccess1.ts:4:5: Add a return type to the method + ~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + return 0; + } + } + + class Bar extends Foo { + [symbol]() { + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 superSymbolIndexedAccess1.ts:10:5: Add a return type to the method + ~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + return super[symbol](); + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess3.d.ts new file mode 100644 index 0000000000000..999e98431665a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess3.d.ts @@ -0,0 +1,69 @@ +//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess3.ts] //// + +//// [superSymbolIndexedAccess3.ts] +var symbol = Symbol.for('myThing'); + +class Foo { + [symbol]() { + return 0; + } +} + +class Bar extends Foo { + [symbol]() { + return super[Bar](); + } +} + +/// [Declarations] //// + + + +//// [superSymbolIndexedAccess3.d.ts] +declare var symbol: invalid; +declare class Foo { + [symbol](): invalid; +} +declare class Bar extends Foo { + [symbol](): invalid; +} + +/// [Errors] //// + +superSymbolIndexedAccess3.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +superSymbolIndexedAccess3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +superSymbolIndexedAccess3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +superSymbolIndexedAccess3.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +superSymbolIndexedAccess3.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +superSymbolIndexedAccess3.ts(11,22): error TS2538: Type 'typeof Bar' cannot be used as an index type. + + +==== superSymbolIndexedAccess3.ts (6 errors) ==== + var symbol = Symbol.for('myThing'); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 superSymbolIndexedAccess3.ts:1:5: Add a type annotation to the variable symbol + + class Foo { + [symbol]() { + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 superSymbolIndexedAccess3.ts:4:5: Add a return type to the method + ~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + return 0; + } + } + + class Bar extends Foo { + [symbol]() { + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 superSymbolIndexedAccess3.ts:10:5: Add a return type to the method + ~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + return super[Bar](); + ~~~ +!!! error TS2538: Type 'typeof Bar' cannot be used as an index type. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess4.d.ts new file mode 100644 index 0000000000000..3650b3bfd786b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess4.d.ts @@ -0,0 +1,47 @@ +//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess4.ts] //// + +//// [superSymbolIndexedAccess4.ts] +var symbol = Symbol.for('myThing'); + +class Bar { + [symbol]() { + return super[symbol](); + } +} + +/// [Declarations] //// + + + +//// [superSymbolIndexedAccess4.d.ts] +declare var symbol: invalid; +declare class Bar { + [symbol](): invalid; +} + +/// [Errors] //// + +superSymbolIndexedAccess4.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +superSymbolIndexedAccess4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +superSymbolIndexedAccess4.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +superSymbolIndexedAccess4.ts(5,16): error TS2335: 'super' can only be referenced in a derived class. + + +==== superSymbolIndexedAccess4.ts (4 errors) ==== + var symbol = Symbol.for('myThing'); + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 superSymbolIndexedAccess4.ts:1:5: Add a type annotation to the variable symbol + + class Bar { + [symbol]() { + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 superSymbolIndexedAccess4.ts:4:5: Add a return type to the method + ~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + return super[symbol](); + ~~~~~ +!!! error TS2335: 'super' can only be referenced in a derived class. + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess5.d.ts new file mode 100644 index 0000000000000..79db076b0b430 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess5.d.ts @@ -0,0 +1,62 @@ +//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess5.ts] //// + +//// [superSymbolIndexedAccess5.ts] +var symbol: any; + +class Foo { + [symbol]() { + return 0; + } +} + +class Bar extends Foo { + [symbol]() { + return super[symbol](); + } +} + +/// [Declarations] //// + + + +//// [superSymbolIndexedAccess5.d.ts] +declare var symbol: any; +declare class Foo { + [symbol](): invalid; +} +declare class Bar extends Foo { + [symbol](): invalid; +} + +/// [Errors] //// + +superSymbolIndexedAccess5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +superSymbolIndexedAccess5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +superSymbolIndexedAccess5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +superSymbolIndexedAccess5.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +==== superSymbolIndexedAccess5.ts (4 errors) ==== + var symbol: any; + + class Foo { + [symbol]() { + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 superSymbolIndexedAccess5.ts:4:5: Add a return type to the method + ~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + return 0; + } + } + + class Bar extends Foo { + [symbol]() { + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 superSymbolIndexedAccess5.ts:10:5: Add a return type to the method + ~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + return super[symbol](); + } + } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess6.d.ts new file mode 100644 index 0000000000000..8bb980434fae6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess6.d.ts @@ -0,0 +1,62 @@ +//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess6.ts] //// + +//// [superSymbolIndexedAccess6.ts] +var symbol: any; + +class Foo { + static [symbol]() { + return 0; + } +} + +class Bar extends Foo { + static [symbol]() { + return super[symbol](); + } +} + +/// [Declarations] //// + + + +//// [superSymbolIndexedAccess6.d.ts] +declare var symbol: any; +declare class Foo { + static [symbol](): invalid; +} +declare class Bar extends Foo { + static [symbol](): invalid; +} + +/// [Errors] //// + +superSymbolIndexedAccess6.ts(4,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +superSymbolIndexedAccess6.ts(4,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +superSymbolIndexedAccess6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +superSymbolIndexedAccess6.ts(10,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + + +==== superSymbolIndexedAccess6.ts (4 errors) ==== + var symbol: any; + + class Foo { + static [symbol]() { + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 superSymbolIndexedAccess6.ts:4:12: Add a return type to the method + ~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + return 0; + } + } + + class Bar extends Foo { + static [symbol]() { + ~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 superSymbolIndexedAccess6.ts:10:12: Add a return type to the method + ~~~~~~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + return super[symbol](); + } + } \ 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 index 4cecb3179e7f1..1569fbc871bf6 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolDeclarationEmit12.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolDeclarationEmit12.d.ts @@ -25,7 +25,7 @@ declare namespace M { export class C { [Symbol.iterator]: I; [Symbol.isConcatSpreadable](): I; - get [Symbol.toPrimitive](): invalid; + get [Symbol.toPrimitive](): I; set [Symbol.toPrimitive](x: I); } export {}; @@ -34,11 +34,10 @@ declare namespace M { /// [Errors] //// symbolDeclarationEmit12.ts(9,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. -symbolDeclarationEmit12.ts(9,13): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. symbolDeclarationEmit12.ts(10,13): error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. -==== symbolDeclarationEmit12.ts (3 errors) ==== +==== symbolDeclarationEmit12.ts (2 errors) ==== module M { interface I { } export class C { @@ -50,8 +49,6 @@ symbolDeclarationEmit12.ts(10,13): error TS2300: Duplicate identifier '[Symbol.t get [Symbol.toPrimitive]() { return undefined; } ~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. set [Symbol.toPrimitive](x: I) { } ~~~~~~~~~~~~~~~~~~~~ !!! error TS2300: Duplicate identifier '[Symbol.toPrimitive]'. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts index fd8e6b4c2df90..bc8d7c67c937f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts @@ -20,23 +20,35 @@ declare var x: invalid; /// [Errors] //// -symbolProperty1.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -symbolProperty1.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -symbolProperty1.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty1.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +symbolProperty1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +symbolProperty1.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +symbolProperty1.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +symbolProperty1.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== symbolProperty1.ts (3 errors) ==== +==== symbolProperty1.ts (5 errors) ==== var s: symbol; var x = { [s]: 0, ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x [s]() { }, ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x +!!! related TS9034 symbolProperty1.ts:4:5: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x get [s]() { ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 symbolProperty1.ts:5:9: Add a return type to the get accessor declaration + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts index aaadfbfe72d81..ce7cb0710720d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts @@ -20,26 +20,39 @@ declare var x: invalid; /// [Errors] //// -symbolProperty2.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -symbolProperty2.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -symbolProperty2.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -symbolProperty2.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty2.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +symbolProperty2.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +symbolProperty2.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +symbolProperty2.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +symbolProperty2.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +symbolProperty2.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== symbolProperty2.ts (4 errors) ==== +==== symbolProperty2.ts (6 errors) ==== var s = Symbol(); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 symbolProperty2.ts:1:5: Add a type annotation to the variable s var x = { [s]: 0, ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x [s]() { }, ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x +!!! related TS9034 symbolProperty2.ts:4:5: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x get [s]() { ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 symbolProperty2.ts:5:9: Add a return type to the get accessor declaration + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts index 4c59aefbd6a4d..286cca2a6fafd 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts @@ -20,35 +20,48 @@ declare var x: invalid; /// [Errors] //// -symbolProperty3.ts(1,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty3.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations symbolProperty3.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty3.ts(3,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty3.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations symbolProperty3.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty3.ts(4,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +symbolProperty3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations symbolProperty3.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty3.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty3.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +symbolProperty3.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== symbolProperty3.ts (7 errors) ==== +==== symbolProperty3.ts (9 errors) ==== var s = Symbol; ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 symbolProperty3.ts:1:5: Add a type annotation to the variable s var x = { [s]: 0, ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x [s]() { }, ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x +!!! related TS9034 symbolProperty3.ts:4:5: Add a return type to the method + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x get [s]() { ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 symbolProperty3.ts:5:9: Add a return type to the get accessor declaration + ~~~ +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts index 8007a6863297d..1ceae306fa140 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts @@ -18,7 +18,7 @@ declare var obj: invalid; /// [Errors] //// -symbolProperty52.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty52.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations symbolProperty52.ts(2,13): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. symbolProperty52.ts(7,12): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. @@ -27,7 +27,8 @@ symbolProperty52.ts(7,12): error TS2339: Property 'nonsense' does not exist on t var obj = { [Symbol.nonsense]: 0 ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 symbolProperty52.ts:1:5: Add a type annotation to the variable obj ~~~~~~~~ !!! error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. }; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts index a1570d96938d2..e7d7b00de47cc 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts @@ -17,7 +17,7 @@ declare var obj: invalid; /// [Errors] //// symbolProperty53.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty53.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty53.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations symbolProperty53.ts(5,5): error TS2538: Type '(key: string) => symbol' cannot be used as an index type. @@ -27,7 +27,8 @@ symbolProperty53.ts(5,5): error TS2538: Type '(key: string) => symbol' cannot be ~~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 symbolProperty53.ts:1:5: Add a type annotation to the variable obj }; obj[Symbol.for]; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts index 3f13c10638280..c694c0341cb74 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts @@ -15,7 +15,7 @@ declare var obj: invalid; /// [Errors] //// symbolProperty54.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty54.ts(2,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty54.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ==== symbolProperty54.ts (2 errors) ==== @@ -24,5 +24,6 @@ symbolProperty54.ts(2,5): error TS9007: Declaration emit for this file requires ~~~~~~~~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 symbolProperty54.ts:1:5: Add a type annotation to the variable obj }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts index 43b8e49bc7b7f..2c12c37c3533a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts @@ -21,7 +21,7 @@ declare var obj: invalid; /// [Errors] //// -symbolProperty58.ts(6,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +symbolProperty58.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ==== symbolProperty58.ts (1 errors) ==== @@ -32,5 +32,6 @@ symbolProperty58.ts(6,5): error TS9007: Declaration emit for this file requires var obj = { [Symbol.foo]: 0 ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! related TS9027 symbolProperty58.ts:5:5: Add a type annotation to the variable obj } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeErrors.d.ts index 6dcef2d700c2f..0342ac1bfe5e0 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeErrors.d.ts @@ -145,10 +145,10 @@ thisTypeErrors.ts(29,19): error TS2526: A 'this' type is available only in a non thisTypeErrors.ts(29,26): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeErrors.ts(35,19): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeErrors.ts(36,20): error TS2331: 'this' cannot be referenced in a module or namespace body. -thisTypeErrors.ts(36,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +thisTypeErrors.ts(36,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations thisTypeErrors.ts(41,14): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeErrors.ts(41,21): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(45,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +thisTypeErrors.ts(45,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations thisTypeErrors.ts(46,23): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeErrors.ts(46,30): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeErrors.ts(50,18): error TS2526: A 'this' type is available only in a non-static member of a class or interface. @@ -241,7 +241,8 @@ thisTypeErrors.ts(50,25): error TS2526: A 'this' type is available only in a non ~~~~ !!! error TS2331: 'this' cannot be referenced in a module or namespace body. ~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 thisTypeErrors.ts:36:16: Add a type annotation to the variable y } class C3 { @@ -256,7 +257,8 @@ thisTypeErrors.ts(50,25): error TS2526: A 'this' type is available only in a non } f() { ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 thisTypeErrors.ts:45:5: Add a return type to the method function g(x: this): this { ~~~~ !!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeInAccessors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeInAccessors.d.ts index e15981f3c572f..5710ac8b7ecf5 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeInAccessors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeInAccessors.d.ts @@ -76,12 +76,12 @@ thisTypeInAccessors.ts(8,11): error TS2784: 'get' and 'set' accessors cannot dec thisTypeInAccessors.ts(9,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. thisTypeInAccessors.ts(13,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. thisTypeInAccessors.ts(19,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(23,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +thisTypeInAccessors.ts(23,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations thisTypeInAccessors.ts(23,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. thisTypeInAccessors.ts(24,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. thisTypeInAccessors.ts(29,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. thisTypeInAccessors.ts(30,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(34,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +thisTypeInAccessors.ts(34,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ==== thisTypeInAccessors.ts (10 errors) ==== @@ -117,7 +117,9 @@ thisTypeInAccessors.ts(34,9): error TS9007: Declaration emit for this file requi n: 16, get x(this: Foo) { return this.n }, ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 thisTypeInAccessors.ts:24:9: Add a type to parameter of the set accessor declaration +!!! related TS9032 thisTypeInAccessors.ts:23:9: Add a return type to the get accessor declaration ~~~~~~~~~ !!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. set x(this, n) { this.n = n; } @@ -138,6 +140,7 @@ thisTypeInAccessors.ts(34,9): error TS9007: Declaration emit for this file requi n = 21; get x() { return this.n } // inside a class, so already correct ~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 thisTypeInAccessors.ts:34:9: Add a return type to the get accessor declaration } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment32.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment32.d.ts index efb5f71209342..d02bd9e23e49a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment32.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment32.d.ts @@ -55,12 +55,12 @@ declare namespace ExpandoMerge { /// [Errors] //// -expando.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -expando.ts(4,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -expando.ts(5,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +expando.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. +expando.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. expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -expando.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. @@ -68,15 +68,16 @@ ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different fil ==== expando.ts (6 errors) ==== function ExpandoMerge(n: number) { ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 expando.ts:1:10: Add a return type to the function declaration return n; } ExpandoMerge.p1 = 111 ~~~~~~~~~~~~~~~ -!!! error TS9009: 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. ExpandoMerge.m = function(n: number) { ~~~~~~~~~~~~~~ -!!! error TS9009: 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. return n + 1; } ExpandoMerge.p4 = 44444; @@ -91,7 +92,8 @@ ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different fil !!! error TS2322: Type 'boolean' is not assignable to type 'number'. var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n ==== ns.ts (2 errors) ==== namespace ExpandoMerge { diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment33.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment33.d.ts index ec931b0ae189c..4544c745ba9ea 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment33.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment33.d.ts @@ -57,12 +57,12 @@ declare namespace ExpandoMerge { /// [Errors] //// -expando.ts(1,10): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -expando.ts(4,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. -expando.ts(5,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. +expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +expando.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. +expando.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. expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -expando.ts(14,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. @@ -89,15 +89,16 @@ ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different fil ==== expando.ts (6 errors) ==== function ExpandoMerge(n: number) { ~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9031 expando.ts:1:10: Add a return type to the function declaration return n; } ExpandoMerge.p1 = 111 ~~~~~~~~~~~~~~~ -!!! error TS9009: 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. ExpandoMerge.m = function(n: number) { ~~~~~~~~~~~~~~ -!!! error TS9009: 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. return n + 1; } ExpandoMerge.p4 = 44444; @@ -112,6 +113,7 @@ ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different fil !!! error TS2322: Type 'boolean' is not assignable to type 'number'. var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n \ 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 index 7e8dde130b1b3..0c81b2e4cab91 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives11.d.ts @@ -23,15 +23,16 @@ export declare const bar: invalid; /// [Errors] //// -/mod1.ts(1,24): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. -/mod2.ts(2,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 } @@ -39,5 +40,5 @@ export declare const bar: invalid; ==== /mod1.ts (1 errors) ==== export function foo(): Lib { return {x: 1} } ~~~ -!!! error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. +!!! 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 index 361b1a3af5a9e..13340bbcee849 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives13.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives13.d.ts @@ -25,13 +25,13 @@ export interface A { /// [Errors] //// -/app.ts(1,23): error TS9010: Reference directives are not supported in isolated declaration mode. +/app.ts(1,23): error TS9025: Reference directives are not supported in isolated declaration mode. ==== /app.ts (1 errors) ==== /// ~~~ -!!! error TS9010: Reference directives are not supported in isolated declaration mode. +!!! error TS9025: Reference directives are not supported in isolated declaration mode. import {$} from "./ref"; export interface A { x: () => typeof $ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives2.d.ts index fdad9b16876e9..a66e24ae78c68 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives2.d.ts @@ -19,14 +19,14 @@ interface A { /// [Errors] //// -/app.ts(2,8): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. +/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 TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. +!!! 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 } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives5.d.ts index 6d429be56daf4..9b2d6eda9838f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives5.d.ts @@ -24,13 +24,13 @@ export interface A { /// [Errors] //// -/app.ts(1,23): error TS9010: Reference directives are not supported in isolated declaration mode. +/app.ts(1,23): error TS9025: Reference directives are not supported in isolated declaration mode. ==== /app.ts (1 errors) ==== /// ~~~ -!!! error TS9010: Reference directives are not supported in isolated declaration mode. +!!! error TS9025: Reference directives are not supported in isolated declaration mode. import {$} from "./ref"; export interface A { x: typeof $; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts index 8c22009f6cafd..a33c860fcabab 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts @@ -22,20 +22,21 @@ export declare const bar: invalid; /// [Errors] //// -/mod1.ts(1,24): error TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. -/mod2.ts(2,20): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +/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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! 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 TS9008: Declaration emit for this file requires adding a type reference directive. Add a type reference directive to lib to unblock declaration emit. +!!! 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/typeUsedAsTypeLiteralIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts index 0df2f72b95d23..ac706ddaaeb1d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts @@ -52,7 +52,7 @@ type T4 = { typeUsedAsTypeLiteralIndex.ts(3,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. typeUsedAsTypeLiteralIndex.ts(3,6): error TS2690: 'K' only refers to a type, but is being used as a value here. Did you mean to use 'P in K'? -typeUsedAsTypeLiteralIndex.ts(6,12): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +typeUsedAsTypeLiteralIndex.ts(6,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations typeUsedAsTypeLiteralIndex.ts(13,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. typeUsedAsTypeLiteralIndex.ts(13,6): error TS2690: 'K2' only refers to a type, but is being used as a value here. Did you mean to use 'K in K2'? typeUsedAsTypeLiteralIndex.ts(18,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. @@ -73,7 +73,8 @@ typeUsedAsTypeLiteralIndex.ts(23,6): error TS2693: 'K4' only refers to a type, b const K1 = Symbol(); ~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +!!! related TS9027 typeUsedAsTypeLiteralIndex.ts:6:7: Add a type annotation to the variable K1 type T1 = { [K1]: number; } diff --git a/tests/baselines/reference/isolatedDeclarationErrors.errors.txt b/tests/baselines/reference/isolatedDeclarationErrors.errors.txt index eec79fe99f503..56a0ebbfba2d1 100644 --- a/tests/baselines/reference/isolatedDeclarationErrors.errors.txt +++ b/tests/baselines/reference/isolatedDeclarationErrors.errors.txt @@ -1,26 +1,26 @@ -isolatedDeclarationErrors.ts(2,1): error TS9009: 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 TS9009: 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrors.ts(8,1): error TS9009: 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(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 TS9009: 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. const errorOnAssignmentBelow = (): void => {} errorOnAssignmentBelow.a = ""; ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9009: 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. const errorOnMissingReturn = () => {} ~~~~~~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 isolatedDeclarationErrors.ts:7:7: Add a type annotation to the variable errorOnMissingReturn -!!! related TS9603 isolatedDeclarationErrors.ts:7:30: Add a return type to the function expression +!!! 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 TS9009: 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. \ No newline at end of file diff --git a/tests/baselines/reference/isolatedDeclarationErrorsClasses.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsClasses.errors.txt new file mode 100644 index 0000000000000..0824aaddcad02 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsClasses.errors.txt @@ -0,0 +1,126 @@ +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(39,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(39,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(41,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(41,35): error TS7006: Parameter 'v' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(41,35): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(43,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(43,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(45,9): error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. +isolatedDeclarationErrorsClasses.ts(45,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(45,39): error TS7006: Parameter 'value' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(45,39): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + + +==== isolatedDeclarationErrorsClasses.ts (21 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 { + + [noAnnotationLiteralName](): void { } + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName]() { } + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 isolatedDeclarationErrorsClasses.ts:39:5: Add a return type to the method + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! 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. + ~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 isolatedDeclarationErrorsClasses.ts:41:35: Add a type annotation to the parameter v + + get [noAnnotationStringName]() { return 0;} + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9032 isolatedDeclarationErrorsClasses.ts:43:9: Add a return type to the get accessor declaration + ~~~~~~~~~~~~~~~~~~~~~~~~ +!!! 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. + ~~~~~ +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9033 isolatedDeclarationErrorsClasses.ts:45:9: Add a type to parameter of the set accessor declaration + } + + \ 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..70635239c0b41 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsClasses.js @@ -0,0 +1,82 @@ +//// [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 { + + [noAnnotationLiteralName](): void { } + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName]() { } + + [noParamAnnotationStringName](v): void { } + + get [noAnnotationStringName]() { return 0;} + + set [noParamAnnotationStringName](value) { } +} + + + +//// [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 { + [noAnnotationLiteralName]() { } + [noParamAnnotationLiteralName](v) { } + [noAnnotationStringName]() { } + [noParamAnnotationStringName](v) { } + get [noAnnotationStringName]() { return 0; } + set [noParamAnnotationStringName](value) { } +} diff --git a/tests/baselines/reference/isolatedDeclarationErrorsClasses.symbols b/tests/baselines/reference/isolatedDeclarationErrorsClasses.symbols new file mode 100644 index 0000000000000..ce3b4a523ae1f --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsClasses.symbols @@ -0,0 +1,103 @@ +//// [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)) + + [noAnnotationLiteralName](): void { } +>[noAnnotationLiteralName] : Symbol(C[noAnnotationLiteralName], Decl(isolatedDeclarationErrorsClasses.ts, 32, 16)) +>noAnnotationLiteralName : Symbol(noAnnotationLiteralName, Decl(isolatedDeclarationErrorsClasses.ts, 29, 5)) + + [noParamAnnotationLiteralName](v: string): void { } +>[noParamAnnotationLiteralName] : Symbol(C[noParamAnnotationLiteralName], Decl(isolatedDeclarationErrorsClasses.ts, 34, 41)) +>noParamAnnotationLiteralName : Symbol(noParamAnnotationLiteralName, Decl(isolatedDeclarationErrorsClasses.ts, 30, 5)) +>v : Symbol(v, Decl(isolatedDeclarationErrorsClasses.ts, 36, 35)) + + [noAnnotationStringName]() { } +>[noAnnotationStringName] : Symbol(C[noAnnotationStringName], Decl(isolatedDeclarationErrorsClasses.ts, 36, 55)) +>noAnnotationStringName : Symbol(noAnnotationStringName, Decl(isolatedDeclarationErrorsClasses.ts, 26, 3)) + + [noParamAnnotationStringName](v): void { } +>[noParamAnnotationStringName] : Symbol(C[noParamAnnotationStringName], Decl(isolatedDeclarationErrorsClasses.ts, 38, 34)) +>noParamAnnotationStringName : Symbol(noParamAnnotationStringName, Decl(isolatedDeclarationErrorsClasses.ts, 27, 3)) +>v : Symbol(v, Decl(isolatedDeclarationErrorsClasses.ts, 40, 34)) + + get [noAnnotationStringName]() { return 0;} +>[noAnnotationStringName] : Symbol(C[noAnnotationStringName], Decl(isolatedDeclarationErrorsClasses.ts, 40, 46)) +>noAnnotationStringName : Symbol(noAnnotationStringName, Decl(isolatedDeclarationErrorsClasses.ts, 26, 3)) + + set [noParamAnnotationStringName](value) { } +>[noParamAnnotationStringName] : Symbol(C[noParamAnnotationStringName], Decl(isolatedDeclarationErrorsClasses.ts, 42, 47)) +>noParamAnnotationStringName : Symbol(noParamAnnotationStringName, Decl(isolatedDeclarationErrorsClasses.ts, 27, 3)) +>value : Symbol(value, Decl(isolatedDeclarationErrorsClasses.ts, 44, 38)) +} + + diff --git a/tests/baselines/reference/isolatedDeclarationErrorsClasses.types b/tests/baselines/reference/isolatedDeclarationErrorsClasses.types new file mode 100644 index 0000000000000..43a7383ac03a5 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsClasses.types @@ -0,0 +1,119 @@ +//// [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 + + [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 +} + + diff --git a/tests/baselines/reference/isolatedDeclarationErrorsExpressions.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsExpressions.errors.txt new file mode 100644 index 0000000000000..fac5d12e9a4da --- /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..dba4b53f51b10 --- /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..fd3e14b6a9a71 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsObjects.errors.txt @@ -0,0 +1,179 @@ +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(63,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +isolatedDeclarationErrorsObjects.ts(64,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +isolatedDeclarationErrorsObjects.ts(71,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. +isolatedDeclarationErrorsObjects.ts(73,5): error TS9015: Objects that contain spread assignments can't be inferred with --isolatedDeclarations +isolatedDeclarationErrorsObjects.ts(75,5): error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations +isolatedDeclarationErrorsObjects.ts(79,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. +isolatedDeclarationErrorsObjects.ts(82,9): error TS9015: Objects that contain spread assignments can't be inferred with --isolatedDeclarations +isolatedDeclarationErrorsObjects.ts(85,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(); + 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:61: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:61:14: Add a type annotation to the variable oWithComputedProperties + [s]: 1, + [E.V]: 1, + } + + 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:71: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:71: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:79: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:79: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..9ddc7d77fe1c6 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsObjects.js @@ -0,0 +1,164 @@ +//// [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(); +enum E { + V = 10, +} +export const oWithComputedProperties = { + [1]: 1, + [1 + 3]: 1, + [prop(2)]: 2, + [s]: 1, + [E.V]: 1, +} + +const part = { a: 1 }; + +export const oWithSpread = { + b: 1, + ...part, + c: 1, + part, +} + + +export const oWithSpread = { + b: 1, + nested: { + ...part, + }, + c: 1, + part, +} + + +//// [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(); +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, +}; +const part = { a: 1 }; +export const oWithSpread = { + b: 1, + ...part, + c: 1, + part, +}; +export const oWithSpread = { + b: 1, + nested: { + ...part, + }, + c: 1, + part, +}; diff --git a/tests/baselines/reference/isolatedDeclarationErrorsObjects.symbols b/tests/baselines/reference/isolatedDeclarationErrorsObjects.symbols new file mode 100644 index 0000000000000..c849b65f0786c --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsObjects.symbols @@ -0,0 +1,214 @@ +//// [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, --, --)) + +enum E { +>E : Symbol(E, Decl(isolatedDeclarationErrorsObjects.ts, 56, 34)) + + V = 10, +>V : Symbol(E.V, Decl(isolatedDeclarationErrorsObjects.ts, 57, 8)) +} +export const oWithComputedProperties = { +>oWithComputedProperties : Symbol(oWithComputedProperties, Decl(isolatedDeclarationErrorsObjects.ts, 60, 12)) + + [1]: 1, +>[1] : Symbol([1], Decl(isolatedDeclarationErrorsObjects.ts, 60, 40)) +>1 : Symbol([1], Decl(isolatedDeclarationErrorsObjects.ts, 60, 40)) + + [1 + 3]: 1, +>[1 + 3] : Symbol([1 + 3], Decl(isolatedDeclarationErrorsObjects.ts, 61, 11)) + + [prop(2)]: 2, +>[prop(2)] : Symbol([prop(2)], Decl(isolatedDeclarationErrorsObjects.ts, 62, 15)) +>prop : Symbol(prop, Decl(isolatedDeclarationErrorsObjects.ts, 52, 1)) + + [s]: 1, +>[s] : Symbol([s], Decl(isolatedDeclarationErrorsObjects.ts, 63, 17)) +>s : Symbol(s, Decl(isolatedDeclarationErrorsObjects.ts, 56, 5)) + + [E.V]: 1, +>[E.V] : Symbol([E.V], Decl(isolatedDeclarationErrorsObjects.ts, 64, 11)) +>E.V : Symbol(E.V, Decl(isolatedDeclarationErrorsObjects.ts, 57, 8)) +>E : Symbol(E, Decl(isolatedDeclarationErrorsObjects.ts, 56, 34)) +>V : Symbol(E.V, Decl(isolatedDeclarationErrorsObjects.ts, 57, 8)) +} + +const part = { a: 1 }; +>part : Symbol(part, Decl(isolatedDeclarationErrorsObjects.ts, 68, 5)) +>a : Symbol(a, Decl(isolatedDeclarationErrorsObjects.ts, 68, 14)) + +export const oWithSpread = { +>oWithSpread : Symbol(oWithSpread, Decl(isolatedDeclarationErrorsObjects.ts, 70, 12)) + + b: 1, +>b : Symbol(b, Decl(isolatedDeclarationErrorsObjects.ts, 70, 28)) + + ...part, +>part : Symbol(part, Decl(isolatedDeclarationErrorsObjects.ts, 68, 5)) + + c: 1, +>c : Symbol(c, Decl(isolatedDeclarationErrorsObjects.ts, 72, 12)) + + part, +>part : Symbol(part, Decl(isolatedDeclarationErrorsObjects.ts, 73, 9)) +} + + +export const oWithSpread = { +>oWithSpread : Symbol(oWithSpread, Decl(isolatedDeclarationErrorsObjects.ts, 78, 12)) + + b: 1, +>b : Symbol(b, Decl(isolatedDeclarationErrorsObjects.ts, 78, 28)) + + nested: { +>nested : Symbol(nested, Decl(isolatedDeclarationErrorsObjects.ts, 79, 9)) + + ...part, +>part : Symbol(part, Decl(isolatedDeclarationErrorsObjects.ts, 68, 5)) + + }, + c: 1, +>c : Symbol(c, Decl(isolatedDeclarationErrorsObjects.ts, 82, 6)) + + part, +>part : Symbol(part, Decl(isolatedDeclarationErrorsObjects.ts, 83, 9)) +} + diff --git a/tests/baselines/reference/isolatedDeclarationErrorsObjects.types b/tests/baselines/reference/isolatedDeclarationErrorsObjects.types new file mode 100644 index 0000000000000..b9db8c899efa7 --- /dev/null +++ b/tests/baselines/reference/isolatedDeclarationErrorsObjects.types @@ -0,0 +1,255 @@ +//// [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 + +enum E { +>E : E + + V = 10, +>V : E.V +>10 : 10 +} +export const oWithComputedProperties = { +>oWithComputedProperties : { [x: number]: number; 1: number; 2: number; [s]: number; 10: number; } +>{ [1]: 1, [1 + 3]: 1, [prop(2)]: 2, [s]: 1, [E.V]: 1,} : { [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 +} + +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 : { b: number; nested: { a: number; }; c: number; part: { a: number; }; } +>{ b: 1, nested: { ...part, }, c: 1, part,} : { 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; } +} + diff --git a/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.errors.txt index bb18b2b63224b..b413e244d79fe 100644 --- a/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.errors.txt +++ b/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.errors.txt @@ -1,146 +1,146 @@ -isolatedDeclarationErrorsReturnTypes.ts(2,51): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(3,37): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(5,47): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(6,33): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(8,47): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(9,33): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(13,45): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(16,41): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(19,41): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(34,29): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(35,15): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(36,48): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(37,34): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(39,42): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(40,28): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(41,61): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(42,47): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(67,29): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(68,15): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(70,42): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(71,28): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(73,61): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(74,47): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(109,56): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(109,65): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(110,42): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(110,48): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(112,52): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(112,61): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(113,38): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(113,44): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(115,52): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(115,61): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(116,38): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(116,44): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(119,83): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(120,66): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(122,79): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(123,62): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(125,79): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(126,62): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(138,64): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(138,73): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(139,50): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(139,56): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(141,60): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(141,69): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(142,46): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(142,52): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(144,60): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(144,69): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(145,46): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(145,52): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(151,29): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(151,38): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(152,15): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(152,21): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(153,48): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(153,57): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(154,34): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(154,40): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(156,42): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(156,51): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(157,28): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(157,34): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(158,61): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(158,70): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(159,47): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(159,53): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(162,53): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(163,36): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(164,72): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(165,55): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(167,66): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(168,49): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(169,85): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(170,68): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(173,40): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(174,26): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(175,59): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(176,45): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(178,53): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(179,39): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(180,72): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -isolatedDeclarationErrorsReturnTypes.ts(181,58): error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations +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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:2:14: Add a type annotation to the variable fnExpressionConstVariable -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:2:51: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:3:14: Add a type annotation to the variable fnArrowConstVariable -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:3:37: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:5:12: Add a type annotation to the variable fnExpressionLetVariable -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:5:47: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:6:12: Add a type annotation to the variable fnArrowLetVariable -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:6:33: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:8:12: Add a type annotation to the variable fnExpressionVarVariable -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:8:47: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:9:12: Add a type annotation to the variable fnArrowVarVariable -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:9:33: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:13:40: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:13:45: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:16:36: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:16:41: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:19:36: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:19:41: Add a return type to the function expression +!!! 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;} @@ -157,45 +157,45 @@ isolatedDeclarationErrorsReturnTypes.ts(181,58): error TS9507: Function must hav // Should Error fnExpression = function foo() { return 0; } ~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:34:5: Add a type annotation to the property fnExpression -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:34:29: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:35:5: Add a type annotation to the property fnArrow -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:35:15: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:36:15: Add a type annotation to the property fnExpressionProtected -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:36:48: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:37:15: Add a type annotation to the property fnArrowProtected -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:37:34: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:39:12: Add a type annotation to the property fnStaticExpression -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:39:42: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:40:12: Add a type annotation to the property fnStaticArrow -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:40:28: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:41:22: Add a type annotation to the property fnStaticExpressionProtected -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:41:61: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:42:22: Add a type annotation to the property fnStaticArrowProtected -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:42:47: Add a return type to the function expression +!!! 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; } @@ -222,36 +222,36 @@ isolatedDeclarationErrorsReturnTypes.ts(181,58): error TS9507: Function must hav class IndirectlyExportedClass { fnExpression = function foo() { return 0; } ~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:67:5: Add a type annotation to the property fnExpression -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:67:29: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:68:5: Add a type annotation to the property fnArrow -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:68:15: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:70:12: Add a type annotation to the property fnStaticExpression -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:70:42: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:71:12: Add a type annotation to the property fnStaticArrow -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:71:28: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:73:22: Add a type annotation to the property fnStaticExpressionProtected -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:73:61: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:74:22: Add a type annotation to the property fnStaticArrowProtected -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:74:47: Add a return type to the function expression +!!! 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"; @@ -288,94 +288,94 @@ isolatedDeclarationErrorsReturnTypes.ts(181,58): error TS9507: Function must hav // In Function Variables - No annotations export const fnParamExpressionConstVariable = function foo(cb = function(){ }) { return 0;} ~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:109:14: Add a type annotation to the variable fnParamExpressionConstVariable -!!! related TS9603 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 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:109:60: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:109:65: 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:110:14: Add a type annotation to the variable fnParamArrowConstVariable -!!! related TS9603 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 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:110:43: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:110: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: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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:112:12: Add a type annotation to the variable fnParamExpressionLetVariable -!!! related TS9603 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 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:112:56: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:112: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: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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:113:12: Add a type annotation to the variable fnParamArrowLetVariable -!!! related TS9603 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 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:113:39: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:113:44: 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:115:12: Add a type annotation to the variable fnParamExpressionVarVariable -!!! related TS9603 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 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:115:56: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:115: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: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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:116:12: Add a type annotation to the variable fnParamArrowVarVariable -!!! related TS9603 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 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:116:39: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:116:44: 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:119:78: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:119:83: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:120:61: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:120:66: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:122:74: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:122:79: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:123:57: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:123:62: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:125:74: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:125:79: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:126:57: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:126:62: Add a return type to the function expression +!!! 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;} @@ -389,60 +389,60 @@ isolatedDeclarationErrorsReturnTypes.ts(181,58): error TS9507: Function must hav export const fnParamExpressionConstVariableInternal = function foo(cb = function(){ }) { return 0;} ~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:138:14: Add a type annotation to the variable fnParamExpressionConstVariableInternal -!!! related TS9603 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 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:138:68: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:138:73: 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:139:14: Add a type annotation to the variable fnParamArrowConstVariableInternal -!!! related TS9603 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 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:139:51: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:139: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: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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:141:12: Add a type annotation to the variable fnParamExpressionLetVariableInternal -!!! related TS9603 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 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:141:64: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:141:69: 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:142:12: Add a type annotation to the variable fnParamArrowLetVariableInternal -!!! related TS9603 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 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:142:47: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:142: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: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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:144:12: Add a type annotation to the variable fnParamExpressionVarVariableInternal -!!! related TS9603 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 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:144:64: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:144:69: 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9600 isolatedDeclarationErrorsReturnTypes.ts:145:12: Add a type annotation to the variable fnParamArrowVarVariableInternal -!!! related TS9603 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 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:145:47: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:145: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: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 @@ -450,163 +450,163 @@ isolatedDeclarationErrorsReturnTypes.ts(181,58): error TS9507: Function must hav // Should Error fnExpression = function foo(cb = function(){ }) { return 0; } ~~~ -!!! error TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:151:5: Add a type annotation to the property fnExpression -!!! related TS9603 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 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:151:33: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:151: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: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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:152:5: Add a type annotation to the property fnArrow -!!! related TS9603 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 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:152:16: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:152:21: 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:153:15: Add a type annotation to the property fnExpressionProtected -!!! related TS9603 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 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:153:52: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:153:57: 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:154:15: Add a type annotation to the property fnArrowProtected -!!! related TS9603 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 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:154:35: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:154:40: 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:156:12: Add a type annotation to the property fnStaticExpression -!!! related TS9603 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 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:156:46: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:156:51: 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:157:12: Add a type annotation to the property fnStaticArrow -!!! related TS9603 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 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:157:29: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:157: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: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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:158:22: Add a type annotation to the property fnStaticExpressionProtected -!!! related TS9603 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 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:158:65: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:158:70: 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:159:22: Add a type annotation to the property fnStaticArrowProtected -!!! related TS9603 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 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:159:48: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:159:53: 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:162:48: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:162:53: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:163:31: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:163:36: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:164:67: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:164:72: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:165:50: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:165:55: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:167:61: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:167:66: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:168:44: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:168:49: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:169:80: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:169:85: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9601 isolatedDeclarationErrorsReturnTypes.ts:170:63: Add a type annotation to the parameter cb -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:170:68: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:173:5: Add a type annotation to the property fnExpressionOnlyOnParam -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:173:40: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:174:5: Add a type annotation to the property fnArrowOnlyOnParam -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:174:26: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:175:15: Add a type annotation to the property fnExpressionProtectedOnlyOnParam -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:175:59: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:176:15: Add a type annotation to the property fnArrowProtectedOnlyOnParam -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:176:45: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:178:12: Add a type annotation to the property fnStaticExpressionOnlyOnParam -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:178:53: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:179:12: Add a type annotation to the property fnStaticArrowOnlyOnParam -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:179:39: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:180:22: Add a type annotation to the property fnStaticExpressionProtectedOnlyOnParam -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:180:72: Add a return type to the function expression +!!! 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 TS9507: Function must have an explicit type annotation with with --isolatedDeclarations -!!! related TS9602 isolatedDeclarationErrorsReturnTypes.ts:181:22: Add a type annotation to the property fnStaticArrowProtectedOnlyOnParam -!!! related TS9603 isolatedDeclarationErrorsReturnTypes.ts:181:58: Add a return type to the function expression +!!! 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; } diff --git a/tests/cases/compiler/isolatedDeclarationErrorsClasses.ts b/tests/cases/compiler/isolatedDeclarationErrorsClasses.ts new file mode 100644 index 0000000000000..aee8891c9875a --- /dev/null +++ b/tests/cases/compiler/isolatedDeclarationErrorsClasses.ts @@ -0,0 +1,55 @@ +// @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 { + + [noAnnotationLiteralName](): void { } + + [noParamAnnotationLiteralName](v: string): void { } + + [noAnnotationStringName]() { } + + [noParamAnnotationStringName](v): void { } + + get [noAnnotationStringName]() { return 0;} + + set [noParamAnnotationStringName](value) { } +} + 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..62ead187c7c7f --- /dev/null +++ b/tests/cases/compiler/isolatedDeclarationErrorsObjects.ts @@ -0,0 +1,93 @@ +// @declaration: true +// @isolatedDeclarations: true +// @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(); +enum E { + V = 10, +} +export const oWithComputedProperties = { + [1]: 1, + [1 + 3]: 1, + [prop(2)]: 2, + [s]: 1, + [E.V]: 1, +} + +const part = { a: 1 }; + +export const oWithSpread = { + b: 1, + ...part, + c: 1, + part, +} + + +export const oWithSpread = { + b: 1, + nested: { + ...part, + }, + c: 1, + part, +} diff --git a/tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts b/tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts index 290cf0e42119f..8a9ce2e980093 100644 --- a/tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts +++ b/tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts @@ -1,4 +1,5 @@ -// @lib: es5 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC +// @lib: es5 // @target: es6 // All will be error from using ES6 features but only include ES5 library diff --git a/tests/cases/conformance/Symbols/ES5SymbolProperty2.ts b/tests/cases/conformance/Symbols/ES5SymbolProperty2.ts index 6bfce5fc58ddb..14d3c5668d7bd 100644 --- a/tests/cases/conformance/Symbols/ES5SymbolProperty2.ts +++ b/tests/cases/conformance/Symbols/ES5SymbolProperty2.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 module M { var Symbol: any; diff --git a/tests/cases/conformance/Symbols/ES5SymbolProperty3.ts b/tests/cases/conformance/Symbols/ES5SymbolProperty3.ts index a6eecc721241d..de77c6b169495 100644 --- a/tests/cases/conformance/Symbols/ES5SymbolProperty3.ts +++ b/tests/cases/conformance/Symbols/ES5SymbolProperty3.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 var Symbol: any; diff --git a/tests/cases/conformance/Symbols/ES5SymbolProperty4.ts b/tests/cases/conformance/Symbols/ES5SymbolProperty4.ts index 2b14e64a33ced..c7fb56b65ed5a 100644 --- a/tests/cases/conformance/Symbols/ES5SymbolProperty4.ts +++ b/tests/cases/conformance/Symbols/ES5SymbolProperty4.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 var Symbol: { iterator: string }; diff --git a/tests/cases/conformance/Symbols/ES5SymbolProperty5.ts b/tests/cases/conformance/Symbols/ES5SymbolProperty5.ts index ec46ddad21dc1..012c3cdb5ff0d 100644 --- a/tests/cases/conformance/Symbols/ES5SymbolProperty5.ts +++ b/tests/cases/conformance/Symbols/ES5SymbolProperty5.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 var Symbol: { iterator: symbol }; diff --git a/tests/cases/conformance/Symbols/ES5SymbolProperty6.ts b/tests/cases/conformance/Symbols/ES5SymbolProperty6.ts index 59b7d2291aada..2a9abf242382d 100644 --- a/tests/cases/conformance/Symbols/ES5SymbolProperty6.ts +++ b/tests/cases/conformance/Symbols/ES5SymbolProperty6.ts @@ -1,4 +1,5 @@ -//@target: ES5 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC +u//@target: ES5 class C { [Symbol.iterator]() { } } diff --git a/tests/cases/conformance/Symbols/ES5SymbolProperty7.ts b/tests/cases/conformance/Symbols/ES5SymbolProperty7.ts index 766b86f9b5d33..517bd01a069bb 100644 --- a/tests/cases/conformance/Symbols/ES5SymbolProperty7.ts +++ b/tests/cases/conformance/Symbols/ES5SymbolProperty7.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 var Symbol: { iterator: any }; diff --git a/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers.ts b/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers.ts index 76c03c73d6336..a59887c6f70d8 100644 --- a/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers.ts +++ b/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: TS normalizes types // @target: ES5 var x: { foo: string; } diff --git a/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers2.ts b/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers2.ts index fb1955f1d952d..94047c58376fd 100644 --- a/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers2.ts +++ b/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers2.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: TS normalizes types // @target: ES5 var x: { foo: string; } var y: { foo: string; bar: string; } diff --git a/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts b/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts index d24e313c24093..a55b2a6dc596e 100644 --- a/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts +++ b/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: TS normalizes types // @target: ES5 var x: { foo: string; } diff --git a/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts b/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts index eebed0cd5c6a5..99925431cebed 100644 --- a/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts +++ b/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: TS normalizes types var x: { foo: string; } var y: { foo: string; bar: string; } diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts index 59a8e9d34200d..8746d4950a6e0 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es5 var s: string; var n: number; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts index 0ab74d788c832..d90af9f003620 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es6 var s: string; var n: number; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES5.ts index 33288184b16d6..693cb7ef13d39 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES5.ts @@ -1,4 +1,5 @@ // @target: es5 +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var s: string; var n: number; var a: any; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES6.ts index d41c56fe953ed..68457f8f8ade9 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES6.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es6 var s: string; var n: number; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES5.ts index fb44bfb41452a..7e0f5379b38db 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES5.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es5 var s: string; var n: number; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES6.ts index de40dc4e774ea..fc91cb9d237c9 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES6.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es6 var s: string; var n: number; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES5.ts index 8f78f279eba2f..07d5febbdd480 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES5.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es5 var b: boolean; class C { diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES6.ts index d90f2d7f9767d..6ba3016e523e6 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES6.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es6 var b: boolean; class C { diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts index 2baa39cf61ae7..a961b1e83af65 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es5 var p1: number | string; var p2: number | number[]; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES6.ts index 60b62d2903496..2a271f40534b1 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES6.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es6 var p1: number | string; var p2: number | number[]; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES5.ts index e52067cc7f42e..9aeb797ffd135 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES5.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es5 var b: boolean; class C { diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts index d795b527d064d..ae8268a23f8fb 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es6 var b: boolean; class C { diff --git a/tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts b/tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts index 4872449161067..bf95ce89ff9ad 100644 --- a/tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts +++ b/tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es6 class C { *[foo]() { } diff --git a/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess1.ts b/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess1.ts index 160a76f5c6108..ee95cee9d15a8 100644 --- a/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess1.ts +++ b/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess1.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 var symbol = Symbol.for('myThing'); diff --git a/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess3.ts b/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess3.ts index 2fbbbdc63e60a..8656fedbea08b 100644 --- a/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess3.ts +++ b/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess3.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 var symbol = Symbol.for('myThing'); diff --git a/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess4.ts b/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess4.ts index 095fcc1dbb7ed..c87b7cbe90e95 100644 --- a/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess4.ts +++ b/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess4.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 var symbol = Symbol.for('myThing'); diff --git a/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess5.ts b/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess5.ts index 3c1a376eab6d3..79e9ec37c6a3c 100644 --- a/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess5.ts +++ b/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess5.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 var symbol: any; diff --git a/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess6.ts b/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess6.ts index 3850821e9f3de..19451904a92dd 100644 --- a/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess6.ts +++ b/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess6.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 var symbol: any; diff --git a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts index b5e27ecc71b38..be39e9a454fae 100644 --- a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts +++ b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 class C { [e](); diff --git a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts index 5091ee0b98cb3..0faa43fef992e 100644 --- a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts +++ b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts @@ -1,2 +1,3 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 var v = { [e]() { } }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts index 67b97a6a0bb5e..b2e78d51c95b3 100644 --- a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts +++ b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts @@ -1,2 +1,3 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 var v = { get [e]() { } }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts index 280dc1a5a0ddd..44474c6ab3346 100644 --- a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts +++ b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 class C { [e] diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts index 17af42fcca36a..74bd87980a1a0 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 class C { [e](); diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts index b9b870a9ec930..239f36daca18e 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 class C { [e]() { } diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts index 6e6485ea85f31..292128fee03de 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts @@ -1,2 +1,3 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 var v = { set [e](v) { } } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts index 0988e19a1ef02..3a1b3a8de5567 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts @@ -1,2 +1,3 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 var v = { [e]() { } }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts index 21d13e569ddb2..d1bda6cf47f0e 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 class C { [public]() { } diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts index af56d4d23fe41..2ab65bba6a823 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 "use strict"; class C { diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts index e36773105fe7b..1d3a0beb6f3e1 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts @@ -1,2 +1,3 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 var v = { get [e]() { } }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName5.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName5.ts index 869f340929b82..533c30327f529 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName5.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName5.ts @@ -1,2 +1,3 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 var v = { public get [e]() { } }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts index 8f918c6116049..e6a5f6b46c3bd 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 class C { [e] diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts index 6e55c04b7a17c..8e9fd09e9ab77 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 class C { public [e] diff --git a/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts b/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts index b832d57855ed2..ac1091044d404 100644 --- a/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts +++ b/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts @@ -1,3 +1,4 @@ +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 // In ES3/5, you cannot for...of over an arbitrary iterable. diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports35-inline-short-hand.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports35-inline-short-hand.ts index 6f37fc36dc22b..de2bc11800412 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports35-inline-short-hand.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports35-inline-short-hand.ts @@ -8,8 +8,6 @@ //// x ////}; -goTo.file("/code.ts"); - verify.codeFix({ description: "Add inline type assertion to 'number'", index: 1, 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 From d1f598a7858308ce67a16152f7f235a3e073920f Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 11 Dec 2023 10:50:45 +0000 Subject: [PATCH 185/224] Fix bug in code fix for shorthand assignment. Signed-off-by: Titian Cernicova-Dragomir --- src/services/codefixes/fixMissingTypeAnnotationOnExports.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index f986df7e45565..1401b79614bf6 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -304,7 +304,7 @@ function withChanges( sourceFile, targetNode.end, createAsExpression( - getSynthesizedDeepClone(targetNode), + getSynthesizedDeepClone(targetNode.name), typeNode, ), { From 20c5351413dcfbc555c7f7e848c7b93557af976f Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 11 Dec 2023 14:29:41 +0000 Subject: [PATCH 186/224] Remove extra errors when a computed property already isn't valid. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/transformers/declarations.ts | 18 +- ...isolatedDeclarationErrorsClasses.d.ts.diff | 55 +++- .../dte/isolatedDeclarationErrorsClasses.d.ts | 119 ++++++- .../dte/isolatedDeclarationErrorsObjects.d.ts | 22 +- .../tsc/isolatedDeclarationErrorsClasses.d.ts | 105 +++++- .../tsc/isolatedDeclarationErrorsObjects.d.ts | 22 +- .../diff/ES5For-ofTypeCheck10.d.ts.diff | 34 +- .../diff/ES5SymbolProperty2.d.ts.diff | 26 +- .../diff/ES5SymbolProperty3.d.ts.diff | 18 +- .../diff/ES5SymbolProperty4.d.ts.diff | 18 +- .../diff/ES5SymbolProperty5.d.ts.diff | 18 +- .../diff/ES5SymbolProperty6.d.ts.diff | 29 +- .../diff/ES5SymbolProperty7.d.ts.diff | 18 +- .../MemberFunctionDeclaration3_es6.d.ts.diff | 28 +- .../computedPropertyNames12_ES5.d.ts.diff | 28 +- .../computedPropertyNames12_ES6.d.ts.diff | 28 +- .../computedPropertyNames13_ES5.d.ts.diff | 44 ++- .../computedPropertyNames13_ES6.d.ts.diff | 44 ++- .../computedPropertyNames14_ES5.d.ts.diff | 34 +- .../computedPropertyNames14_ES6.d.ts.diff | 34 +- .../computedPropertyNames15_ES5.d.ts.diff | 36 +- .../computedPropertyNames15_ES6.d.ts.diff | 36 +- .../computedPropertyNames16_ES5.d.ts.diff | 50 ++- .../computedPropertyNames16_ES6.d.ts.diff | 50 ++- .../computedPropertyNames17_ES5.d.ts.diff | 34 +- .../computedPropertyNames17_ES6.d.ts.diff | 34 +- .../diff/computedPropertyNames2_ES5.d.ts.diff | 55 ++-- .../diff/computedPropertyNames2_ES6.d.ts.diff | 55 ++-- ...utedPropertyNamesOnOverloads_ES5.d.ts.diff | 31 +- ...utedPropertyNamesOnOverloads_ES6.d.ts.diff | 31 +- .../decoratorsOnComputedProperties.d.ts.diff | 82 ++++- ...xSignatureMustHaveTypeAnnotation.d.ts.diff | 36 +- .../diff/indexWithoutParamType2.d.ts.diff | 25 +- ...isolatedDeclarationErrorsClasses.d.ts.diff | 89 +++-- ...isolatedDeclarationErrorsObjects.d.ts.diff | 61 ++++ .../diff/overloadsWithComputedNames.d.ts.diff | 29 +- .../parserComputedPropertyName10.d.ts.diff | 24 +- .../parserComputedPropertyName11.d.ts.diff | 29 +- .../parserComputedPropertyName12.d.ts.diff | 28 +- .../parserComputedPropertyName22.d.ts.diff | 24 +- .../parserComputedPropertyName23.d.ts.diff | 22 +- .../parserComputedPropertyName24.d.ts.diff | 24 +- .../parserComputedPropertyName25.d.ts.diff | 29 +- .../parserComputedPropertyName27.d.ts.diff | 28 +- .../parserComputedPropertyName28.d.ts.diff | 38 +-- .../parserComputedPropertyName29.d.ts.diff | 37 +-- .../parserComputedPropertyName31.d.ts.diff | 39 +-- .../parserComputedPropertyName32.d.ts.diff | 24 +- .../parserComputedPropertyName33.d.ts.diff | 28 +- .../parserComputedPropertyName36.d.ts.diff | 25 +- .../parserComputedPropertyName38.d.ts.diff | 24 +- .../parserComputedPropertyName39.d.ts.diff | 24 +- .../parserComputedPropertyName7.d.ts.diff | 29 +- .../parserComputedPropertyName8.d.ts.diff | 29 +- .../parserComputedPropertyName9.d.ts.diff | 26 +- .../parserES5ComputedPropertyName1.d.ts.diff | 24 +- .../parserES5ComputedPropertyName10.d.ts.diff | 24 +- .../parserES5ComputedPropertyName11.d.ts.diff | 29 +- .../parserES5ComputedPropertyName7.d.ts.diff | 29 +- .../parserES5ComputedPropertyName9.d.ts.diff | 26 +- .../diff/parserES5SymbolProperty3.d.ts.diff | 24 +- .../diff/parserES5SymbolProperty4.d.ts.diff | 24 +- .../diff/parserES5SymbolProperty5.d.ts.diff | 24 +- .../diff/parserES5SymbolProperty6.d.ts.diff | 24 +- .../diff/parserES5SymbolProperty7.d.ts.diff | 22 +- ...s(usedefineforclassfields=false).d.ts.diff | 42 +-- ...ts(usedefineforclassfields=true).d.ts.diff | 42 +-- .../diff/superSymbolIndexedAccess1.d.ts.diff | 38 ++- .../diff/superSymbolIndexedAccess3.d.ts.diff | 39 ++- .../diff/superSymbolIndexedAccess4.d.ts.diff | 27 +- .../diff/superSymbolIndexedAccess5.d.ts.diff | 30 +- .../diff/superSymbolIndexedAccess6.d.ts.diff | 30 +- .../original/dte/ES5For-ofTypeCheck10.d.ts | 5 +- .../original/dte/ES5SymbolProperty6.d.ts | 5 +- .../dte/MemberFunctionDeclaration3_es6.d.ts | 5 +- .../indexSignatureMustHaveTypeAnnotation.d.ts | 5 +- .../original/dte/indexWithoutParamType2.d.ts | 5 +- .../dte/isolatedDeclarationErrorsClasses.d.ts | 66 +++- .../dte/isolatedDeclarationErrorsObjects.d.ts | 303 +++++++++++++++++ .../dte/parserComputedPropertyName10.d.ts | 5 +- .../dte/parserComputedPropertyName11.d.ts | 5 +- .../dte/parserComputedPropertyName12.d.ts | 5 +- .../dte/parserComputedPropertyName22.d.ts | 5 +- .../dte/parserComputedPropertyName23.d.ts | 5 +- .../dte/parserComputedPropertyName24.d.ts | 5 +- .../dte/parserComputedPropertyName25.d.ts | 5 +- .../dte/parserComputedPropertyName27.d.ts | 5 +- .../dte/parserComputedPropertyName28.d.ts | 8 +- .../dte/parserComputedPropertyName29.d.ts | 8 +- .../dte/parserComputedPropertyName31.d.ts | 8 +- .../dte/parserComputedPropertyName32.d.ts | 5 +- .../dte/parserComputedPropertyName33.d.ts | 5 +- .../dte/parserComputedPropertyName36.d.ts | 5 +- .../dte/parserComputedPropertyName38.d.ts | 5 +- .../dte/parserComputedPropertyName39.d.ts | 5 +- .../dte/parserComputedPropertyName7.d.ts | 5 +- .../dte/parserComputedPropertyName8.d.ts | 5 +- .../dte/parserComputedPropertyName9.d.ts | 8 +- .../dte/parserES5ComputedPropertyName1.d.ts | 5 +- .../dte/parserES5ComputedPropertyName10.d.ts | 5 +- .../dte/parserES5ComputedPropertyName11.d.ts | 5 +- .../dte/parserES5ComputedPropertyName7.d.ts | 5 +- .../dte/parserES5ComputedPropertyName9.d.ts | 8 +- .../dte/parserES5SymbolProperty3.d.ts | 5 +- .../dte/parserES5SymbolProperty4.d.ts | 5 +- .../dte/parserES5SymbolProperty5.d.ts | 5 +- .../dte/parserES5SymbolProperty6.d.ts | 5 +- .../dte/parserES5SymbolProperty7.d.ts | 5 +- .../original/tsc/ES5For-ofTypeCheck10.d.ts | 13 +- .../original/tsc/ES5SymbolProperty2.d.ts | 11 +- .../original/tsc/ES5SymbolProperty3.d.ts | 7 +- .../original/tsc/ES5SymbolProperty4.d.ts | 7 +- .../original/tsc/ES5SymbolProperty5.d.ts | 7 +- .../original/tsc/ES5SymbolProperty6.d.ts | 13 +- .../original/tsc/ES5SymbolProperty7.d.ts | 7 +- .../tsc/MemberFunctionDeclaration3_es6.d.ts | 13 +- .../tsc/computedPropertyNames12_ES5.d.ts | 9 +- .../tsc/computedPropertyNames12_ES6.d.ts | 9 +- .../tsc/computedPropertyNames13_ES5.d.ts | 17 +- .../tsc/computedPropertyNames13_ES6.d.ts | 17 +- .../tsc/computedPropertyNames14_ES5.d.ts | 12 +- .../tsc/computedPropertyNames14_ES6.d.ts | 12 +- .../tsc/computedPropertyNames15_ES5.d.ts | 17 +- .../tsc/computedPropertyNames15_ES6.d.ts | 17 +- .../tsc/computedPropertyNames16_ES5.d.ts | 17 +- .../tsc/computedPropertyNames16_ES6.d.ts | 17 +- .../tsc/computedPropertyNames17_ES5.d.ts | 12 +- .../tsc/computedPropertyNames17_ES6.d.ts | 12 +- .../tsc/computedPropertyNames2_ES5.d.ts | 32 +- .../tsc/computedPropertyNames2_ES6.d.ts | 32 +- .../computedPropertyNamesOnOverloads_ES5.d.ts | 17 +- .../computedPropertyNamesOnOverloads_ES6.d.ts | 17 +- .../tsc/decoratorsOnComputedProperties.d.ts | 15 - .../indexSignatureMustHaveTypeAnnotation.d.ts | 9 +- .../original/tsc/indexWithoutParamType2.d.ts | 9 +- .../tsc/isolatedDeclarationErrorsClasses.d.ts | 78 +++-- .../tsc/isolatedDeclarationErrorsObjects.d.ts | 310 ++++++++++++++++++ .../tsc/overloadsWithComputedNames.d.ts | 15 +- .../tsc/parserComputedPropertyName10.d.ts | 9 +- .../tsc/parserComputedPropertyName11.d.ts | 13 +- .../tsc/parserComputedPropertyName12.d.ts | 13 +- .../tsc/parserComputedPropertyName22.d.ts | 9 +- .../tsc/parserComputedPropertyName23.d.ts | 9 +- .../tsc/parserComputedPropertyName24.d.ts | 13 +- .../tsc/parserComputedPropertyName25.d.ts | 14 +- .../tsc/parserComputedPropertyName27.d.ts | 9 +- .../tsc/parserComputedPropertyName28.d.ts | 16 +- .../tsc/parserComputedPropertyName29.d.ts | 20 +- .../tsc/parserComputedPropertyName31.d.ts | 16 +- .../tsc/parserComputedPropertyName32.d.ts | 9 +- .../tsc/parserComputedPropertyName33.d.ts | 14 +- .../tsc/parserComputedPropertyName36.d.ts | 9 +- .../tsc/parserComputedPropertyName38.d.ts | 13 +- .../tsc/parserComputedPropertyName39.d.ts | 13 +- .../tsc/parserComputedPropertyName7.d.ts | 13 +- .../tsc/parserComputedPropertyName8.d.ts | 13 +- .../tsc/parserComputedPropertyName9.d.ts | 12 +- .../tsc/parserES5ComputedPropertyName1.d.ts | 9 +- .../tsc/parserES5ComputedPropertyName10.d.ts | 9 +- .../tsc/parserES5ComputedPropertyName11.d.ts | 13 +- .../tsc/parserES5ComputedPropertyName7.d.ts | 13 +- .../tsc/parserES5ComputedPropertyName9.d.ts | 12 +- .../tsc/parserES5SymbolProperty3.d.ts | 9 +- .../tsc/parserES5SymbolProperty4.d.ts | 9 +- .../tsc/parserES5SymbolProperty5.d.ts | 9 +- .../tsc/parserES5SymbolProperty6.d.ts | 9 +- .../tsc/parserES5SymbolProperty7.d.ts | 9 +- ...flicts(usedefineforclassfields=false).d.ts | 6 +- ...nflicts(usedefineforclassfields=true).d.ts | 6 +- .../tsc/superSymbolIndexedAccess1.d.ts | 12 +- .../tsc/superSymbolIndexedAccess3.d.ts | 12 +- .../tsc/superSymbolIndexedAccess4.d.ts | 7 +- .../tsc/superSymbolIndexedAccess5.d.ts | 12 +- .../tsc/superSymbolIndexedAccess6.d.ts | 12 +- ...solatedDeclarationErrorsClasses.errors.txt | 58 ++-- .../isolatedDeclarationErrorsClasses.js | 14 +- .../isolatedDeclarationErrorsClasses.symbols | 36 +- .../isolatedDeclarationErrorsClasses.types | 24 ++ ...solatedDeclarationErrorsObjects.errors.txt | 39 ++- .../isolatedDeclarationErrorsObjects.js | 6 + .../isolatedDeclarationErrorsObjects.symbols | 61 ++-- .../isolatedDeclarationErrorsObjects.types | 22 +- .../isolatedDeclarationErrorsClasses.ts | 10 + .../isolatedDeclarationErrorsObjects.ts | 6 +- 184 files changed, 2417 insertions(+), 2103 deletions(-) create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrorsObjects.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsObjects.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrorsObjects.d.ts diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 50ab9a25eb065..bf28aa6b2a619 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -155,7 +155,6 @@ import { isTupleTypeNode, isTypeAliasDeclaration, isTypeElement, - isTypeLiteralNode, isTypeNode, isTypeParameterDeclaration, isTypeQueryNode, @@ -1266,16 +1265,19 @@ export function transformDeclarations(context: TransformationContext | IsolatedT if (isDeclarationAndNotVisible(input)) return; if (hasDynamicName(input) && !resolver.isLateBound(getParseTreeNode(input) as Declaration)) { if ( - isolatedDeclarations && hasIdentifierComputedName(input) && - // When --noImplicitAny is off, it's automatically 'any' type so we shouldn't complain. - // when it's on, it should be an error on the noImplicitAny side, so we also shouldn't complain. - !isInterfaceDeclaration(input.parent) && !isTypeLiteralNode(input.parent) + 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)); } - else { - return; - } + return; } } 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 index 6ea10717fe9da..369c0fd0cc2f5 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -17,11 +17,17 @@ +@@ -17,15 +17,23 @@ set getSetOk2(value: number); get getSetOk3(): number; set getSetOk3(value: number); @@ -15,11 +15,60 @@ declare const noAnnotationLiteralName = "noAnnotationLiteralName"; declare const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; export declare class C { ++ [missing]: number; [noAnnotationLiteralName](): void; [noParamAnnotationLiteralName](v: string): void; + [noAnnotationStringName](): void; -+ [noParamAnnotationStringName](v: any): void; ++ [noParamAnnotationStringName](v: invalid): void; + get [noAnnotationStringName](): number; -+ set [noParamAnnotationStringName](value: any); ++ set [noParamAnnotationStringName](value: invalid); + } + export interface I { ++ [noAnnotationStringName]: 10; + [noAnnotationLiteralName](): any; } export {}; + +@@ -33,16 +41,18 @@ + + 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(44,35): error TS9011: Parameter must have an explicit 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 (8 errors) ==== ++==== isolatedDeclarationErrorsClasses.ts (10 errors) ==== + export class Cls { + + field: number = 1 + 1; + method(): void {} +@@ -91,16 +101,22 @@ + + [noParamAnnotationStringName](v): void { } + ~ + !!! error TS7006: Parameter 'v' implicitly has an 'any' type. ++ ~ ++!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations ++!!! related TS9028 isolatedDeclarationErrorsClasses.ts:44:35: Add a type annotation to the parameter v + + 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. 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 index 73d28fe1a6ee8..8bafd974ef6d0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsClasses.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsClasses.d.ts @@ -35,20 +35,29 @@ 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: any): void { } + [noParamAnnotationStringName](v): void { } get [noAnnotationStringName](): number { return 0;} - set [noParamAnnotationStringName](value: any) { } + set [noParamAnnotationStringName](value) { } + + [("A" + "B") as "AB"] = 1; + } - +export interface I { + [noAnnotationStringName]: 10; + [noAnnotationLiteralName](); +} /// [Declarations] //// @@ -77,11 +86,111 @@ declare let noParamAnnotationStringName: string; declare const noAnnotationLiteralName = "noAnnotationLiteralName"; declare const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; export declare class C { + [missing]: number; [noAnnotationLiteralName](): void; [noParamAnnotationLiteralName](v: string): void; [noAnnotationStringName](): void; - [noParamAnnotationStringName](v: any): void; + [noParamAnnotationStringName](v: invalid): void; get [noAnnotationStringName](): number; - set [noParamAnnotationStringName](value: any); + 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(44,35): error TS9011: Parameter must have an explicit 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 (10 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. + ~ +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +!!! related TS9028 isolatedDeclarationErrorsClasses.ts:44:35: Add a type annotation to the parameter v + + 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/isolatedDeclarationErrorsObjects.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsObjects.d.ts index fc72dcd3bfacd..b1c4e20c0537f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsObjects.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsObjects.d.ts @@ -74,10 +74,12 @@ export let oWithAccessor = { 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; @@ -89,6 +91,7 @@ export const oWithComputedProperties: { [prop(2)]: 2, [s]: 1, [E.V]: 1, + [str]: 0, } const part = { a: 1 }; @@ -109,6 +112,9 @@ export const oWithSpread: { export const oWithSpread: { + [x: string]: number | { + a: number; + }; b: number; nested: { a: number; @@ -124,6 +130,7 @@ export const oWithSpread: { }, c: 1, part, + [str]: 0, } @@ -178,6 +185,7 @@ declare enum E { V = 10 } export declare const oWithComputedProperties: { + [x: string]: number; [x: number]: number; 1: number; 2: number; @@ -193,6 +201,9 @@ export declare const oWithSpread: { b: number; }; export declare const oWithSpread: { + [x: string]: number | { + a: number; + }; b: number; nested: { a: number; @@ -206,8 +217,8 @@ export {}; /// [Errors] //// -isolatedDeclarationErrorsObjects.ts(93,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. -isolatedDeclarationErrorsObjects.ts(108,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. +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) ==== @@ -284,10 +295,12 @@ isolatedDeclarationErrorsObjects.ts(108,14): error TS2451: Cannot redeclare bloc 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; @@ -299,6 +312,7 @@ isolatedDeclarationErrorsObjects.ts(108,14): error TS2451: Cannot redeclare bloc [prop(2)]: 2, [s]: 1, [E.V]: 1, + [str]: 0, } const part = { a: 1 }; @@ -323,6 +337,9 @@ isolatedDeclarationErrorsObjects.ts(108,14): error TS2451: Cannot redeclare bloc export const oWithSpread: { ~~~~~~~~~~~ !!! error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. + [x: string]: number | { + a: number; + }; b: number; nested: { a: number; @@ -338,5 +355,6 @@ isolatedDeclarationErrorsObjects.ts(108,14): error TS2451: Cannot redeclare bloc }, c: 1, part, + [str]: 0, } \ 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 index 1d1ab297eaec0..e7a234f6373f8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsClasses.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsClasses.d.ts @@ -35,20 +35,29 @@ 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: any): void { } + [noParamAnnotationStringName](v): void { } get [noAnnotationStringName](): number { return 0;} - set [noParamAnnotationStringName](value: any) { } + set [noParamAnnotationStringName](value) { } + + [("A" + "B") as "AB"] = 1; + } - +export interface I { + [noAnnotationStringName]: 10; + [noAnnotationLiteralName](); +} /// [Declarations] //// @@ -78,4 +87,94 @@ 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/isolatedDeclarationErrorsObjects.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsObjects.d.ts index ebd04560eae71..a18d8820aa996 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsObjects.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsObjects.d.ts @@ -74,10 +74,12 @@ export let oWithAccessor = { 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; @@ -89,6 +91,7 @@ export const oWithComputedProperties: { [prop(2)]: 2, [s]: 1, [E.V]: 1, + [str]: 0, } const part = { a: 1 }; @@ -109,6 +112,9 @@ export const oWithSpread: { export const oWithSpread: { + [x: string]: number | { + a: number; + }; b: number; nested: { a: number; @@ -124,6 +130,7 @@ export const oWithSpread: { }, c: 1, part, + [str]: 0, } @@ -177,6 +184,7 @@ declare enum E { V = 10 } export declare const oWithComputedProperties: { + [x: string]: number; [x: number]: number; 1: number; 2: number; @@ -192,6 +200,9 @@ export declare const oWithSpread: { b: number; }; export declare const oWithSpread: { + [x: string]: number | { + a: number; + }; b: number; nested: { a: number; @@ -205,8 +216,8 @@ export {}; /// [Errors] //// -isolatedDeclarationErrorsObjects.ts(93,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. -isolatedDeclarationErrorsObjects.ts(108,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. +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) ==== @@ -283,10 +294,12 @@ isolatedDeclarationErrorsObjects.ts(108,14): error TS2451: Cannot redeclare bloc 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; @@ -298,6 +311,7 @@ isolatedDeclarationErrorsObjects.ts(108,14): error TS2451: Cannot redeclare bloc [prop(2)]: 2, [s]: 1, [E.V]: 1, + [str]: 0, } const part = { a: 1 }; @@ -322,6 +336,9 @@ isolatedDeclarationErrorsObjects.ts(108,14): error TS2451: Cannot redeclare bloc export const oWithSpread: { ~~~~~~~~~~~ !!! error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. + [x: string]: number | { + a: number; + }; b: number; nested: { a: number; @@ -337,5 +354,6 @@ isolatedDeclarationErrorsObjects.ts(108,14): error TS2451: Cannot redeclare bloc }, c: 1, part, + [str]: 0, } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5For-ofTypeCheck10.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5For-ofTypeCheck10.d.ts.diff index 56059dcc89abb..30be2c9355e80 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5For-ofTypeCheck10.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5For-ofTypeCheck10.d.ts.diff @@ -5,31 +5,37 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -9,15 +9,14 @@ +@@ -2,18 +2,20 @@ + + //// [ES5For-ofTypeCheck10.d.ts] + declare class StringIterator { + next(): invalid; ++ [Symbol.iterator](): invalid; + } + /// [Errors] //// ES5For-ofTypeCheck10.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - ES5For-ofTypeCheck10.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --ES5For-ofTypeCheck10.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++ES5For-ofTypeCheck10.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ES5For-ofTypeCheck10.ts(9,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ES5For-ofTypeCheck10.ts(9,6): error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an array type or a string type. --==== ES5For-ofTypeCheck10.ts (6 errors) ==== -+==== ES5For-ofTypeCheck10.ts (5 errors) ==== +-==== ES5For-ofTypeCheck10.ts (3 errors) ==== ++==== ES5For-ofTypeCheck10.ts (4 errors) ==== // In ES3/5, you cannot for...of over an arbitrary iterable. class StringIterator { next() { ~~~~ -@@ -31,10 +30,8 @@ +@@ -24,8 +26,11 @@ + value: "" + }; + } [Symbol.iterator]() { - ~~~~~~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 ES5For-ofTypeCheck10.ts:9:5: Add a return type to the method -- ~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 ES5For-ofTypeCheck10.ts:9:5: Add a return type to the method ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ - !!! error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. + return this; + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty2.d.ts.diff index 8686f56c9e369..50587a536b025 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty2.d.ts.diff @@ -5,27 +5,35 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -11,23 +11,20 @@ +@@ -1,15 +1,18 @@ + + + //// [ES5SymbolProperty2.d.ts] + declare namespace M { +- class C { ++ var Symbol: any; ++ export class C { ++ [Symbol.iterator](): invalid; + } ++ export {}; + } /// [Errors] //// - ES5SymbolProperty2.ts(5,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -ES5SymbolProperty2.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++ES5SymbolProperty2.ts(5,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ES5SymbolProperty2.ts(10,11): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. --==== ES5SymbolProperty2.ts (3 errors) ==== -+==== ES5SymbolProperty2.ts (2 errors) ==== - module M { - var Symbol: any; + ==== ES5SymbolProperty2.ts (2 errors) ==== +@@ -18,9 +21,10 @@ export class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 ES5SymbolProperty2.ts:5:9: Add a return type to the method -- ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 ES5SymbolProperty2.ts:5:9: Add a return type to the method } (new C)[Symbol.iterator]; } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty3.d.ts.diff index 0bf3947a516e9..8d3b77074c6c4 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty3.d.ts.diff @@ -5,25 +5,29 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -8,20 +8,17 @@ +@@ -2,21 +2,23 @@ + + //// [ES5SymbolProperty3.d.ts] + declare var Symbol: any; + declare class C { ++ [Symbol.iterator](): invalid; + } /// [Errors] //// - ES5SymbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -ES5SymbolProperty3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++ES5SymbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --==== ES5SymbolProperty3.ts (2 errors) ==== -+==== ES5SymbolProperty3.ts (1 errors) ==== + ==== ES5SymbolProperty3.ts (1 errors) ==== var Symbol: any; class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 ES5SymbolProperty3.ts:4:5: Add a return type to the method -- ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 ES5SymbolProperty3.ts:4:5: Add a return type to the method } (new C)[Symbol.iterator] diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty4.d.ts.diff index 0d7866db58bed..97974aa3a1bde 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty4.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty4.d.ts.diff @@ -5,25 +5,29 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -10,20 +10,17 @@ +@@ -4,21 +4,23 @@ + declare var Symbol: { + iterator: string; + }; + declare class C { ++ [Symbol.iterator](): invalid; + } /// [Errors] //// - ES5SymbolProperty4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -ES5SymbolProperty4.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++ES5SymbolProperty4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --==== ES5SymbolProperty4.ts (2 errors) ==== -+==== ES5SymbolProperty4.ts (1 errors) ==== + ==== ES5SymbolProperty4.ts (1 errors) ==== var Symbol: { iterator: string }; class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 ES5SymbolProperty4.ts:4:5: Add a return type to the method -- ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 ES5SymbolProperty4.ts:4:5: Add a return type to the method } (new C)[Symbol.iterator] diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty5.d.ts.diff index 73c08fbdd277c..7937f0b623557 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty5.d.ts.diff @@ -5,25 +5,29 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -10,20 +10,17 @@ +@@ -4,21 +4,23 @@ + declare var Symbol: { + iterator: symbol; + }; + declare class C { ++ [Symbol.iterator](): invalid; + } /// [Errors] //// - ES5SymbolProperty5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -ES5SymbolProperty5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++ES5SymbolProperty5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --==== ES5SymbolProperty5.ts (2 errors) ==== -+==== ES5SymbolProperty5.ts (1 errors) ==== + ==== ES5SymbolProperty5.ts (1 errors) ==== var Symbol: { iterator: symbol }; class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 ES5SymbolProperty5.ts:4:5: Add a return type to the method -- ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 ES5SymbolProperty5.ts:4:5: Add a return type to the method } (new C)[Symbol.iterator](0) // Should error diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty6.d.ts.diff index 86aad38b6ae61..89d3b84330f9e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty6.d.ts.diff @@ -5,30 +5,33 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -8,25 +8,22 @@ +@@ -1,23 +1,28 @@ + + + //// [ES5SymbolProperty6.d.ts] + declare class C { ++ [Symbol.iterator](): invalid; + } + /// [Errors] //// ES5SymbolProperty6.ts(1,1): error TS2304: Cannot find name 'u'. - ES5SymbolProperty6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --ES5SymbolProperty6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++ES5SymbolProperty6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ES5SymbolProperty6.ts(3,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ES5SymbolProperty6.ts(3,6): error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. ES5SymbolProperty6.ts(6,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. --==== ES5SymbolProperty6.ts (6 errors) ==== -+==== ES5SymbolProperty6.ts (5 errors) ==== +-==== ES5SymbolProperty6.ts (3 errors) ==== ++==== ES5SymbolProperty6.ts (4 errors) ==== u//@target: ES5 ~ !!! error TS2304: Cannot find name 'u'. class C { [Symbol.iterator]() { } - ~~~~~~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 ES5SymbolProperty6.ts:3:5: Add a return type to the method -- ~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++ ~~~~~~~~~~~~~~~~~ ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 ES5SymbolProperty6.ts:3:5: Add a return type to the method ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ - !!! error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. + } + diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty7.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty7.d.ts.diff index 341c0f034c5d7..c64f27cdf5375 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty7.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty7.d.ts.diff @@ -5,25 +5,29 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -10,20 +10,17 @@ +@@ -4,21 +4,23 @@ + declare var Symbol: { + iterator: any; + }; + declare class C { ++ [Symbol.iterator](): invalid; + } /// [Errors] //// - ES5SymbolProperty7.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -ES5SymbolProperty7.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++ES5SymbolProperty7.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --==== ES5SymbolProperty7.ts (2 errors) ==== -+==== ES5SymbolProperty7.ts (1 errors) ==== + ==== ES5SymbolProperty7.ts (1 errors) ==== var Symbol: { iterator: any }; class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 ES5SymbolProperty7.ts:4:5: Add a return type to the method -- ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 ES5SymbolProperty7.ts:4:5: Add a return type to the method } (new C)[Symbol.iterator] diff --git a/tests/baselines/reference/isolated-declarations/original/diff/MemberFunctionDeclaration3_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/MemberFunctionDeclaration3_es6.d.ts.diff index 1dc70d684c4cc..d77659ccb91df 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/MemberFunctionDeclaration3_es6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/MemberFunctionDeclaration3_es6.d.ts.diff @@ -5,26 +5,28 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,21 +7,18 @@ +@@ -1,17 +1,22 @@ + + + //// [MemberFunctionDeclaration3_es6.d.ts] + declare class C { ++ [foo](): invalid; + } /// [Errors] //// - MemberFunctionDeclaration3_es6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --MemberFunctionDeclaration3_es6.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++MemberFunctionDeclaration3_es6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations MemberFunctionDeclaration3_es6.ts(2,6): error TS2304: Cannot find name 'foo'. - MemberFunctionDeclaration3_es6.ts(2,6): error TS4100: Public method '[foo]' of exported class has or is using private name 'foo'. --==== MemberFunctionDeclaration3_es6.ts (4 errors) ==== -+==== MemberFunctionDeclaration3_es6.ts (3 errors) ==== +-==== MemberFunctionDeclaration3_es6.ts (1 errors) ==== ++==== MemberFunctionDeclaration3_es6.ts (2 errors) ==== class C { *[foo]() { } - ~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 MemberFunctionDeclaration3_es6.ts:2:5: Add a return type to the method -- ~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++ ~~~~~ ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 MemberFunctionDeclaration3_es6.ts:2:5: Add a return type to the method ~~~ !!! error TS2304: Cannot find name 'foo'. - ~~~ - !!! error TS4100: Public method '[foo]' of exported class has or is using private name 'foo'. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff index f8273fbc27386..f6fc122b13f76 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff @@ -5,7 +5,18 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -15,36 +15,29 @@ +@@ -4,43 +4,43 @@ + declare var s: string; + declare var n: number; + declare var a: any; + declare class C { ++ [s]: number; ++ [n]: invalid; + static [""]: number; + [0]: number; ++ [a]: number; + [`hello bye`]: number; + } /// [Errors] //// @@ -13,7 +24,7 @@ -computedPropertyNames12_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames12_ES5.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames12_ES5.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ++computedPropertyNames12_ES5.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations computedPropertyNames12_ES5.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -23,7 +34,7 @@ computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --==== computedPropertyNames12_ES5.ts (12 errors) ==== +-==== computedPropertyNames12_ES5.ts (11 errors) ==== +==== computedPropertyNames12_ES5.ts (9 errors) ==== var s: string; var n: number; @@ -39,11 +50,14 @@ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~ - !!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations - !!! related TS9029 computedPropertyNames12_ES5.ts:6:5: Add a type annotation to the property [n] ++ ~ ++!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ++!!! related TS9029 computedPropertyNames12_ES5.ts:6:5: Add a type annotation to the property [n] static [s + s]: string; -@@ -60,10 +53,8 @@ + ~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [s + n] = 2; +@@ -53,10 +53,8 @@ [0]: number; [a]: number; ~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff index 6b7f066e5bac8..ebb305027a3cf 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff @@ -5,7 +5,18 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -15,36 +15,29 @@ +@@ -4,43 +4,43 @@ + declare var s: string; + declare var n: number; + declare var a: any; + declare class C { ++ [s]: number; ++ [n]: invalid; + static [""]: number; + [0]: number; ++ [a]: number; + [`hello bye`]: number; + } /// [Errors] //// @@ -13,7 +24,7 @@ -computedPropertyNames12_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames12_ES6.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames12_ES6.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ++computedPropertyNames12_ES6.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations computedPropertyNames12_ES6.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -23,7 +34,7 @@ computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --==== computedPropertyNames12_ES6.ts (12 errors) ==== +-==== computedPropertyNames12_ES6.ts (11 errors) ==== +==== computedPropertyNames12_ES6.ts (9 errors) ==== var s: string; var n: number; @@ -39,11 +50,14 @@ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~ - !!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations - !!! related TS9029 computedPropertyNames12_ES6.ts:6:5: Add a type annotation to the property [n] ++ ~ ++!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ++!!! related TS9029 computedPropertyNames12_ES6.ts:6:5: Add a type annotation to the property [n] static [s + s]: string; -@@ -60,10 +53,8 @@ + ~~~~~~~ + !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + [s + n] = 2; +@@ -53,10 +53,8 @@ [0]: number; [a]: number; ~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES5.d.ts.diff index 9469bf6274a87..edd2f31b35c60 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES5.d.ts.diff @@ -5,50 +5,58 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -15,35 +15,28 @@ +@@ -4,20 +4,23 @@ + declare var s: string; + declare var n: number; + declare var a: any; + declare class C { ++ [s](): invalid; ++ [n](): invalid; + static [""](): invalid; + [0](): invalid; ++ [a](): invalid; + [`hello bye`](): invalid; + } /// [Errors] //// - computedPropertyNames13_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames13_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNames13_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++computedPropertyNames13_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames13_ES5.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames13_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames13_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNames13_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames13_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --==== computedPropertyNames13_ES5.ts (9 errors) ==== -+==== computedPropertyNames13_ES5.ts (6 errors) ==== - var s: string; - var n: number; + ==== computedPropertyNames13_ES5.ts (6 errors) ==== +@@ -26,12 +29,14 @@ var a: any; class C { [s]() {} ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNames13_ES5.ts:5:5: Add a return type to the method -- ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNames13_ES5.ts:5:5: Add a return type to the method [n]() { } ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNames13_ES5.ts:6:5: Add a return type to the method -- ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNames13_ES5.ts:6:5: Add a return type to the method static [s + s]() { } [s + n]() { } [+s]() { } static [""]() { } -@@ -57,10 +50,8 @@ +@@ -43,9 +48,10 @@ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames13_ES5.ts:11:5: Add a return type to the method [a]() { } ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNames13_ES5.ts:12:5: Add a return type to the method -- ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNames13_ES5.ts:12:5: Add a return type to the method static [true]() { } [`hello bye`]() { } ~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES6.d.ts.diff index 2af04659e9325..1492bed922ffd 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES6.d.ts.diff @@ -5,50 +5,58 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -15,35 +15,28 @@ +@@ -4,20 +4,23 @@ + declare var s: string; + declare var n: number; + declare var a: any; + declare class C { ++ [s](): invalid; ++ [n](): invalid; + static [""](): invalid; + [0](): invalid; ++ [a](): invalid; + [`hello bye`](): invalid; + } /// [Errors] //// - computedPropertyNames13_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames13_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNames13_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++computedPropertyNames13_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames13_ES6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames13_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames13_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNames13_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames13_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --==== computedPropertyNames13_ES6.ts (9 errors) ==== -+==== computedPropertyNames13_ES6.ts (6 errors) ==== - var s: string; - var n: number; + ==== computedPropertyNames13_ES6.ts (6 errors) ==== +@@ -26,12 +29,14 @@ var a: any; class C { [s]() {} ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNames13_ES6.ts:5:5: Add a return type to the method -- ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNames13_ES6.ts:5:5: Add a return type to the method [n]() { } ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNames13_ES6.ts:6:5: Add a return type to the method -- ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNames13_ES6.ts:6:5: Add a return type to the method static [s + s]() { } [s + n]() { } [+s]() { } static [""]() { } -@@ -57,10 +50,8 @@ +@@ -43,9 +48,10 @@ + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! related TS9034 computedPropertyNames13_ES6.ts:11:5: Add a return type to the method [a]() { } ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNames13_ES6.ts:12:5: Add a return type to the method -- ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNames13_ES6.ts:12:5: Add a return type to the method static [true]() { } [`hello bye`]() { } ~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES5.d.ts.diff index dc8bd4f00d39a..b1866845d6c8d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES5.d.ts.diff @@ -5,44 +5,50 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -10,29 +10,25 @@ +@@ -2,19 +2,21 @@ + + //// [computedPropertyNames14_ES5.d.ts] + declare var b: boolean; + declare class C { ++ [b](): invalid; ++ [undefined](): invalid; + } + /// [Errors] //// computedPropertyNames14_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames14_ES5.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames14_ES5.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNames14_ES5.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames14_ES5.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES5.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames14_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames14_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNames14_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames14_ES5.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --==== computedPropertyNames14_ES5.ts (10 errors) ==== -+==== computedPropertyNames14_ES5.ts (8 errors) ==== - var b: boolean; - class C { + ==== computedPropertyNames14_ES5.ts (8 errors) ==== +@@ -23,9 +25,10 @@ [b]() {} ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNames14_ES5.ts:3:5: Add a return type to the method -- ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNames14_ES5.ts:3:5: Add a return type to the method static [true]() { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. [[]]() { } -@@ -46,10 +42,8 @@ +@@ -37,9 +40,10 @@ + [undefined]() { } + ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNames14_ES5.ts:7:5: Add a return type to the method -- ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNames14_ES5.ts:7:5: Add a return type to the method static [null]() { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES6.d.ts.diff index 75821022b0902..eb6a4833194fc 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES6.d.ts.diff @@ -5,44 +5,50 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -10,29 +10,25 @@ +@@ -2,19 +2,21 @@ + + //// [computedPropertyNames14_ES6.d.ts] + declare var b: boolean; + declare class C { ++ [b](): invalid; ++ [undefined](): invalid; + } + /// [Errors] //// computedPropertyNames14_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames14_ES6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames14_ES6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNames14_ES6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames14_ES6.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES6.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames14_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames14_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNames14_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames14_ES6.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --==== computedPropertyNames14_ES6.ts (10 errors) ==== -+==== computedPropertyNames14_ES6.ts (8 errors) ==== - var b: boolean; - class C { + ==== computedPropertyNames14_ES6.ts (8 errors) ==== +@@ -23,9 +25,10 @@ [b]() {} ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNames14_ES6.ts:3:5: Add a return type to the method -- ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNames14_ES6.ts:3:5: Add a return type to the method static [true]() { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. [[]]() { } -@@ -46,10 +42,8 @@ +@@ -37,9 +40,10 @@ + [undefined]() { } + ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNames14_ES6.ts:7:5: Add a return type to the method -- ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNames14_ES6.ts:7:5: Add a return type to the method static [null]() { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES5.d.ts.diff index 5881d0e004684..c879188440ff0 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES5.d.ts.diff @@ -5,47 +5,51 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -12,41 +12,32 @@ +@@ -4,17 +4,20 @@ + declare var p1: number | string; + declare var p2: number | number[]; + declare var p3: string | boolean; + declare class C { ++ [p1](): invalid; ++ [p2](): invalid; ++ [p3](): invalid; + } /// [Errors] //// - computedPropertyNames15_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames15_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNames15_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames15_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames15_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames15_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNames15_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames15_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames15_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames15_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNames15_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --==== computedPropertyNames15_ES5.ts (8 errors) ==== -+==== computedPropertyNames15_ES5.ts (5 errors) ==== + ==== computedPropertyNames15_ES5.ts (5 errors) ==== var p1: number | string; - var p2: number | number[]; +@@ -22,16 +25,19 @@ var p3: string | boolean; class C { [p1]() { } ~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNames15_ES5.ts:5:5: Add a return type to the method -- ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNames15_ES5.ts:5:5: Add a return type to the method [p2]() { } ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNames15_ES5.ts:6:5: Add a return type to the method -- ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNames15_ES5.ts:6:5: Add a return type to the method [p3]() { } ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNames15_ES5.ts:7:5: Add a return type to the method -- ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNames15_ES5.ts:7:5: Add a return type to the method } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES6.d.ts.diff index 3cf7f0401a14e..3aac144a6ede4 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES6.d.ts.diff @@ -5,47 +5,51 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -12,41 +12,32 @@ +@@ -4,17 +4,20 @@ + declare var p1: number | string; + declare var p2: number | number[]; + declare var p3: string | boolean; + declare class C { ++ [p1](): invalid; ++ [p2](): invalid; ++ [p3](): invalid; + } /// [Errors] //// - computedPropertyNames15_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames15_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNames15_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames15_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames15_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames15_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNames15_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames15_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames15_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames15_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNames15_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --==== computedPropertyNames15_ES6.ts (8 errors) ==== -+==== computedPropertyNames15_ES6.ts (5 errors) ==== + ==== computedPropertyNames15_ES6.ts (5 errors) ==== var p1: number | string; - var p2: number | number[]; +@@ -22,16 +25,19 @@ var p3: string | boolean; class C { [p1]() { } ~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNames15_ES6.ts:5:5: Add a return type to the method -- ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNames15_ES6.ts:5:5: Add a return type to the method [p2]() { } ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNames15_ES6.ts:6:5: Add a return type to the method -- ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNames15_ES6.ts:6:5: Add a return type to the method [p3]() { } ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNames15_ES6.ts:7:5: Add a return type to the method -- ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNames15_ES6.ts:7:5: Add a return type to the method } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff index b8dade3b5f3af..2f85610696778 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff @@ -5,48 +5,62 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -15,32 +15,25 @@ +@@ -4,20 +4,23 @@ + declare var s: string; + declare var n: number; + declare var a: any; + declare class C { ++ get [s](): invalid; ++ set [n](v: invalid); + static set [""](v: invalid); + get [0](): invalid; ++ set [a](v: invalid); + set [`hello bye`](v: invalid); + } /// [Errors] //// - computedPropertyNames16_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames16_ES5.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames16_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames16_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++computedPropertyNames16_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++computedPropertyNames16_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames16_ES5.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames16_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames16_ES5.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames16_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++computedPropertyNames16_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames16_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --==== computedPropertyNames16_ES5.ts (9 errors) ==== -+==== computedPropertyNames16_ES5.ts (6 errors) ==== - var s: string; - var n: number; + ==== computedPropertyNames16_ES5.ts (6 errors) ==== +@@ -26,12 +29,14 @@ var a: any; class C { get [s]() { return 0;} ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9032 computedPropertyNames16_ES5.ts:5:9: Add a return type to the get accessor declaration -- ~~~ -!!! 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 computedPropertyNames16_ES5.ts:5:9: Add a return type to the get accessor declaration set [n](v) { } - ~~~ -!!! 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 TS9033 computedPropertyNames16_ES5.ts:6:9: Add a type to parameter of the set accessor declaration ++ ~ ++!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9033 computedPropertyNames16_ES5.ts:6:9: Add a type to parameter of the set accessor declaration static get [s + s]() { return 0; } -@@ -54,10 +47,8 @@ + set [s + n](v) { } + get [+s]() { return 0; } + static set [""](v) { } +@@ -42,10 +47,11 @@ ~~~ !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations !!! related TS9032 computedPropertyNames16_ES5.ts:11:9: Add a return type to the get accessor declaration set [a](v) { } - ~~~ -!!! 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 TS9033 computedPropertyNames16_ES5.ts:12:9: Add a type to parameter of the set accessor declaration ++ ~ ++!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9033 computedPropertyNames16_ES5.ts:12:9: Add a type to parameter of the set accessor declaration static get [true]() { return 0; } + set [`hello bye`](v) { } + ~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff index d9ef4e06209d7..d34004232b767 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff @@ -5,48 +5,62 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -15,32 +15,25 @@ +@@ -4,20 +4,23 @@ + declare var s: string; + declare var n: number; + declare var a: any; + declare class C { ++ get [s](): invalid; ++ set [n](v: invalid); + static set [""](v: invalid); + get [0](): invalid; ++ set [a](v: invalid); + set [`hello bye`](v: invalid); + } /// [Errors] //// - computedPropertyNames16_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames16_ES6.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames16_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames16_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++computedPropertyNames16_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++computedPropertyNames16_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames16_ES6.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames16_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames16_ES6.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames16_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++computedPropertyNames16_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames16_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --==== computedPropertyNames16_ES6.ts (9 errors) ==== -+==== computedPropertyNames16_ES6.ts (6 errors) ==== - var s: string; - var n: number; + ==== computedPropertyNames16_ES6.ts (6 errors) ==== +@@ -26,12 +29,14 @@ var a: any; class C { get [s]() { return 0;} ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9032 computedPropertyNames16_ES6.ts:5:9: Add a return type to the get accessor declaration -- ~~~ -!!! 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 computedPropertyNames16_ES6.ts:5:9: Add a return type to the get accessor declaration set [n](v) { } - ~~~ -!!! 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 TS9033 computedPropertyNames16_ES6.ts:6:9: Add a type to parameter of the set accessor declaration ++ ~ ++!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9033 computedPropertyNames16_ES6.ts:6:9: Add a type to parameter of the set accessor declaration static get [s + s]() { return 0; } -@@ -54,10 +47,8 @@ + set [s + n](v) { } + get [+s]() { return 0; } + static set [""](v) { } +@@ -42,10 +47,11 @@ ~~~ !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations !!! related TS9032 computedPropertyNames16_ES6.ts:11:9: Add a return type to the get accessor declaration set [a](v) { } - ~~~ -!!! 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 TS9033 computedPropertyNames16_ES6.ts:12:9: Add a type to parameter of the set accessor declaration ++ ~ ++!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9033 computedPropertyNames16_ES6.ts:12:9: Add a type to parameter of the set accessor declaration static get [true]() { return 0; } + set [`hello bye`](v) { } + ~ + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES5.d.ts.diff index 78084f6b5dbb5..8c4200a787231 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES5.d.ts.diff @@ -5,44 +5,50 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -10,29 +10,25 @@ +@@ -2,19 +2,21 @@ + + //// [computedPropertyNames17_ES5.d.ts] + declare var b: boolean; + declare class C { ++ get [b](): invalid; ++ static get [undefined](): invalid; + } + /// [Errors] //// computedPropertyNames17_ES5.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames17_ES5.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames17_ES5.ts(3,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNames17_ES5.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames17_ES5.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES5.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES5.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES5.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames17_ES5.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames17_ES5.ts(7,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNames17_ES5.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames17_ES5.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --==== computedPropertyNames17_ES5.ts (10 errors) ==== -+==== computedPropertyNames17_ES5.ts (8 errors) ==== - var b: boolean; - class C { + ==== computedPropertyNames17_ES5.ts (8 errors) ==== +@@ -23,9 +25,10 @@ get [b]() { return 0;} ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9032 computedPropertyNames17_ES5.ts:3:9: Add a return type to the get accessor declaration -- ~~~ -!!! 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 computedPropertyNames17_ES5.ts:3:9: Add a return type to the get accessor declaration static set [true](v) { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. get [[]]() { return 0; } -@@ -46,10 +42,8 @@ +@@ -37,9 +40,10 @@ + static get [undefined]() { return 0; } + ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9032 computedPropertyNames17_ES5.ts:7:16: Add a return type to the get accessor declaration -- ~~~~~~~~~~~ -!!! 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 computedPropertyNames17_ES5.ts:7:16: Add a return type to the get accessor declaration set [null](v) { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES6.d.ts.diff index 168ffaee2f914..39b9288f7898f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES6.d.ts.diff @@ -5,44 +5,50 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -10,29 +10,25 @@ +@@ -2,19 +2,21 @@ + + //// [computedPropertyNames17_ES6.d.ts] + declare var b: boolean; + declare class C { ++ get [b](): invalid; ++ static get [undefined](): invalid; + } + /// [Errors] //// computedPropertyNames17_ES6.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames17_ES6.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames17_ES6.ts(3,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNames17_ES6.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames17_ES6.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES6.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES6.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES6.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames17_ES6.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames17_ES6.ts(7,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNames17_ES6.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames17_ES6.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --==== computedPropertyNames17_ES6.ts (10 errors) ==== -+==== computedPropertyNames17_ES6.ts (8 errors) ==== - var b: boolean; - class C { + ==== computedPropertyNames17_ES6.ts (8 errors) ==== +@@ -23,9 +25,10 @@ get [b]() { return 0;} ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9032 computedPropertyNames17_ES6.ts:3:9: Add a return type to the get accessor declaration -- ~~~ -!!! 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 computedPropertyNames17_ES6.ts:3:9: Add a return type to the get accessor declaration static set [true](v) { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. get [[]]() { return 0; } -@@ -46,10 +42,8 @@ +@@ -37,9 +40,10 @@ + static get [undefined]() { return 0; } + ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9032 computedPropertyNames17_ES6.ts:7:16: Add a return type to the get accessor declaration -- ~~~~~~~~~~~ -!!! 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 computedPropertyNames17_ES6.ts:7:16: Add a return type to the get accessor declaration set [null](v) { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff index 1bc26c804a3f7..dd1683c43efe4 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff @@ -5,72 +5,71 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -14,64 +14,40 @@ +@@ -3,45 +3,51 @@ + //// [computedPropertyNames2_ES5.d.ts] + declare var methodName: string; + declare var accessorName: string; + declare class C { ++ [methodName](): invalid; ++ static [methodName](): invalid; ++ get [accessorName](): invalid; ++ set [accessorName](v: invalid); ++ static get [accessorName](): invalid; ++ static set [accessorName](v: invalid); + } /// [Errors] //// - computedPropertyNames2_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames2_ES5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames2_ES5.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames2_ES5.ts(5,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNames2_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++computedPropertyNames2_ES5.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES5.ts(6,9): error TS2378: A 'get' accessor must return a value. - computedPropertyNames2_ES5.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames2_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames2_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNames2_ES5.ts(7,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++computedPropertyNames2_ES5.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES5.ts(8,16): error TS2378: A 'get' accessor must return a value. - computedPropertyNames2_ES5.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames2_ES5.ts(8,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames2_ES5.ts(9,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNames2_ES5.ts(9,31): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++computedPropertyNames2_ES5.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --==== computedPropertyNames2_ES5.ts (14 errors) ==== +-==== computedPropertyNames2_ES5.ts (8 errors) ==== +==== computedPropertyNames2_ES5.ts (6 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { [methodName]() { } ~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNames2_ES5.ts:4:5: Add a return type to the method -- ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNames2_ES5.ts:4:5: Add a return type to the method static [methodName]() { } ~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNames2_ES5.ts:5:12: Add a return type to the method -- ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNames2_ES5.ts:5:12: Add a return type to the method get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -+!!! related TS9033 computedPropertyNames2_ES5.ts:7:9: Add a type to parameter of the set accessor declaration - !!! related TS9032 computedPropertyNames2_ES5.ts:6:9: Add a return type to the get accessor declaration -- ~~~~~~~~~~~~~~ -!!! 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 TS9033 computedPropertyNames2_ES5.ts:7:9: Add a type to parameter of the set accessor declaration ++!!! related TS9032 computedPropertyNames2_ES5.ts:6:9: Add a return type to the get accessor declaration set [accessorName](v) { } - ~~~~~~~~~~~~~~ -!!! 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 TS9033 computedPropertyNames2_ES5.ts:7:9: Add a type to parameter of the set accessor declaration static get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -+!!! related TS9033 computedPropertyNames2_ES5.ts:9:16: Add a type to parameter of the set accessor declaration - !!! related TS9032 computedPropertyNames2_ES5.ts:8:16: Add a return type to the get accessor declaration -- ~~~~~~~~~~~~~~ -!!! 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 TS9033 computedPropertyNames2_ES5.ts:9:16: Add a type to parameter of the set accessor declaration ++!!! related TS9032 computedPropertyNames2_ES5.ts:8:16: Add a return type to the get accessor declaration static set [accessorName](v) { } - ~~~~~~~~~~~~~~ -!!! 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 TS9033 computedPropertyNames2_ES5.ts:9:16: Add a type to parameter of the set accessor declaration } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff index 477e10d5c9aed..611bafe217a53 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff @@ -5,72 +5,71 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -14,64 +14,40 @@ +@@ -3,45 +3,51 @@ + //// [computedPropertyNames2_ES6.d.ts] + declare var methodName: string; + declare var accessorName: string; + declare class C { ++ [methodName](): invalid; ++ static [methodName](): invalid; ++ get [accessorName](): invalid; ++ set [accessorName](v: invalid); ++ static get [accessorName](): invalid; ++ static set [accessorName](v: invalid); + } /// [Errors] //// - computedPropertyNames2_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames2_ES6.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames2_ES6.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames2_ES6.ts(5,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNames2_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++computedPropertyNames2_ES6.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES6.ts(6,9): error TS2378: A 'get' accessor must return a value. - computedPropertyNames2_ES6.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames2_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames2_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNames2_ES6.ts(7,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++computedPropertyNames2_ES6.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES6.ts(8,16): error TS2378: A 'get' accessor must return a value. - computedPropertyNames2_ES6.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames2_ES6.ts(8,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames2_ES6.ts(9,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNames2_ES6.ts(9,31): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++computedPropertyNames2_ES6.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --==== computedPropertyNames2_ES6.ts (14 errors) ==== +-==== computedPropertyNames2_ES6.ts (8 errors) ==== +==== computedPropertyNames2_ES6.ts (6 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { [methodName]() { } ~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNames2_ES6.ts:4:5: Add a return type to the method -- ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNames2_ES6.ts:4:5: Add a return type to the method static [methodName]() { } ~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNames2_ES6.ts:5:12: Add a return type to the method -- ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNames2_ES6.ts:5:12: Add a return type to the method get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -+!!! related TS9033 computedPropertyNames2_ES6.ts:7:9: Add a type to parameter of the set accessor declaration - !!! related TS9032 computedPropertyNames2_ES6.ts:6:9: Add a return type to the get accessor declaration -- ~~~~~~~~~~~~~~ -!!! 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 TS9033 computedPropertyNames2_ES6.ts:7:9: Add a type to parameter of the set accessor declaration ++!!! related TS9032 computedPropertyNames2_ES6.ts:6:9: Add a return type to the get accessor declaration set [accessorName](v) { } - ~~~~~~~~~~~~~~ -!!! 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 TS9033 computedPropertyNames2_ES6.ts:7:9: Add a type to parameter of the set accessor declaration static get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -+!!! related TS9033 computedPropertyNames2_ES6.ts:9:16: Add a type to parameter of the set accessor declaration - !!! related TS9032 computedPropertyNames2_ES6.ts:8:16: Add a return type to the get accessor declaration -- ~~~~~~~~~~~~~~ -!!! 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 TS9033 computedPropertyNames2_ES6.ts:9:16: Add a type to parameter of the set accessor declaration ++!!! related TS9032 computedPropertyNames2_ES6.ts:8:16: Add a return type to the get accessor declaration static set [accessorName](v) { } - ~~~~~~~~~~~~~~ -!!! 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 TS9033 computedPropertyNames2_ES6.ts:9:16: Add a type to parameter of the set accessor declaration } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff index 43b9374ea4364..24024b95c08ec 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff @@ -5,52 +5,47 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,24 +5,19 @@ +@@ -3,33 +3,34 @@ + //// [computedPropertyNamesOnOverloads_ES5.d.ts] + declare var methodName: string; declare var accessorName: string; declare class C { - [methodName](v: string): invalid; - [methodName](): invalid; -- [methodName](v?: string): invalid; ++ [methodName](v: string): invalid; ++ [methodName](): invalid; } /// [Errors] //// computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --==== computedPropertyNamesOnOverloads_ES5.ts (8 errors) ==== +-==== computedPropertyNamesOnOverloads_ES5.ts (5 errors) ==== +==== computedPropertyNamesOnOverloads_ES5.ts (4 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { [methodName](v: string); -@@ -30,21 +25,12 @@ + ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:4:5: Add a return type to the method -- ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:4:5: Add a return type to the method [methodName](); ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:5:5: Add a return type to the method -- ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:5:5: Add a return type to the method [methodName](v?: string) { } - ~~~~~~~~~~~~ --!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --!!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:6:5: Add a return type to the method -- ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff index bc16e32c03cdf..55ab39bf10fed 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff @@ -5,52 +5,47 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -5,24 +5,19 @@ +@@ -3,33 +3,34 @@ + //// [computedPropertyNamesOnOverloads_ES6.d.ts] + declare var methodName: string; declare var accessorName: string; declare class C { - [methodName](v: string): invalid; - [methodName](): invalid; -- [methodName](v?: string): invalid; ++ [methodName](v: string): invalid; ++ [methodName](): invalid; } /// [Errors] //// computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --==== computedPropertyNamesOnOverloads_ES6.ts (8 errors) ==== +-==== computedPropertyNamesOnOverloads_ES6.ts (5 errors) ==== +==== computedPropertyNamesOnOverloads_ES6.ts (4 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { [methodName](v: string); -@@ -30,21 +25,12 @@ + ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:4:5: Add a return type to the method -- ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:4:5: Add a return type to the method [methodName](); ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:5:5: Add a return type to the method -- ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:5:5: Add a return type to the method [methodName](v?: string) { } - ~~~~~~~~~~~~ --!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --!!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:6:5: Add a return type to the method -- ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff index b32f9973c08b1..40c52884651b7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff @@ -5,7 +5,67 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -79,13 +79,10 @@ +@@ -15,8 +15,11 @@ + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any; + [Symbol.match]: any; ++ [fieldNameA]: any; ++ [fieldNameB]: any; ++ [fieldNameC]: any; + } + declare class C { + ["property"]: any; + [Symbol.toStringTag]: any; +@@ -25,8 +28,11 @@ + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any; + [Symbol.match]: any; ++ [fieldNameA]: any; ++ [fieldNameB]: any; ++ [fieldNameC]: any; + } + declare class E { + ["property"]: any; + [Symbol.toStringTag]: any; +@@ -35,8 +41,11 @@ + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any; + [Symbol.match]: any; ++ [fieldNameA]: any; ++ [fieldNameB]: any; ++ [fieldNameC]: any; + } + declare class G { + ["property"]: any; + [Symbol.toStringTag]: any; +@@ -45,8 +54,11 @@ + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any; + [Symbol.match]: any; ++ [fieldNameA]: any; ++ [fieldNameB]: any; ++ [fieldNameC]: any; + } + declare class I { + ["property"]: any; + [Symbol.toStringTag]: any; +@@ -55,8 +67,11 @@ + ["property3"]: any; + [Symbol.isConcatSpreadable]: any; + ["property4"]: any; + [Symbol.match]: any; ++ [fieldNameA]: any; ++ [fieldNameB]: any; ++ [fieldNameC]: any; + } + + /// [Errors] //// + +@@ -64,13 +79,10 @@ decoratorsOnComputedProperties.ts(18,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(19,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(20,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -19,7 +79,7 @@ decoratorsOnComputedProperties.ts(28,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(29,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(30,5): error TS1206: Decorators are not valid here. -@@ -98,13 +95,10 @@ +@@ -83,13 +95,10 @@ decoratorsOnComputedProperties.ts(52,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(53,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(54,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -33,7 +93,7 @@ decoratorsOnComputedProperties.ts(63,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(64,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(65,5): error TS1206: Decorators are not valid here. -@@ -117,13 +111,10 @@ +@@ -102,13 +111,10 @@ decoratorsOnComputedProperties.ts(88,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(89,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(90,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -47,7 +107,7 @@ decoratorsOnComputedProperties.ts(99,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(100,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(101,5): error TS1206: Decorators are not valid here. -@@ -136,13 +127,10 @@ +@@ -121,13 +127,10 @@ decoratorsOnComputedProperties.ts(124,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(125,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(126,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -61,7 +121,7 @@ decoratorsOnComputedProperties.ts(136,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(137,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(138,5): error TS1206: Decorators are not valid here. -@@ -155,13 +143,10 @@ +@@ -140,13 +143,10 @@ decoratorsOnComputedProperties.ts(162,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(163,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(164,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -75,7 +135,7 @@ decoratorsOnComputedProperties.ts(174,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(175,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(176,5): error TS1206: Decorators are not valid here. -@@ -173,9 +158,9 @@ +@@ -158,9 +158,9 @@ decoratorsOnComputedProperties.ts(186,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid here. @@ -86,7 +146,7 @@ ~ !!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations !!! related TS9031 decoratorsOnComputedProperties.ts:1:10: Add a return type to the function declaration -@@ -206,20 +191,14 @@ +@@ -191,20 +191,14 @@ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. [fieldNameA]: any; ~~~~~~~~~~~~ @@ -107,7 +167,7 @@ void class B { @x ["property"]: any; -@@ -278,20 +257,14 @@ +@@ -263,20 +257,14 @@ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. [fieldNameA]: any; ~~~~~~~~~~~~ @@ -128,7 +188,7 @@ } void class D { -@@ -353,20 +326,14 @@ +@@ -338,20 +326,14 @@ ["some" + "method"]() {} [fieldNameA]: any; ~~~~~~~~~~~~ @@ -149,7 +209,7 @@ void class F { @x ["property"]: any; -@@ -427,21 +394,15 @@ +@@ -412,21 +394,15 @@ ["some" + "method"]() {} [fieldNameA]: any; ~~~~~~~~~~~~ @@ -171,7 +231,7 @@ void class H { @x ["property"]: any; -@@ -503,21 +464,15 @@ +@@ -488,21 +464,15 @@ @x ["some" + "method"]() {} [fieldNameA]: any; ~~~~~~~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff index 5d6f6edbfb564..aa7d983257d89 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,8 +1,9 @@ +@@ -1,11 +1,13 @@ //// [indexSignatureMustHaveTypeAnnotation.d.ts] @@ -14,32 +14,8 @@ [x: string]: any; } declare class C { - [x]: string; -@@ -16,15 +17,14 @@ - indexSignatureMustHaveTypeAnnotation.ts(3,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. - indexSignatureMustHaveTypeAnnotation.ts(3,6): error TS2304: Cannot find name 'x'. - indexSignatureMustHaveTypeAnnotation.ts(4,5): error TS1021: An index signature must have a type annotation. - indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS2304: Cannot find name 'x'. - indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS4031: Public property '[x]' of exported class has or is using private name 'x'. - indexSignatureMustHaveTypeAnnotation.ts(14,5): error TS1021: An index signature must have a type annotation. - - --==== indexSignatureMustHaveTypeAnnotation.ts (8 errors) ==== -+==== indexSignatureMustHaveTypeAnnotation.ts (7 errors) ==== - interface I { - // Used to be indexer, now it is a computed property - [x]: string; - ~~~ -@@ -40,10 +40,8 @@ - // Used to be indexer, now it is a computed property - [x]: string - ~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~ - !!! error TS2304: Cannot find name 'x'. - ~ - !!! error TS4031: Public property '[x]' of exported class has or is using private name 'x'. ++ [x]: string; + } + declare class C2 { + [x: string]: any; + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff index ee74d6900179b..a0a1b9e1149a5 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff @@ -5,26 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,21 +7,18 @@ +@@ -1,8 +1,9 @@ - /// [Errors] //// - indexWithoutParamType2.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --indexWithoutParamType2.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - indexWithoutParamType2.ts(3,6): error TS2304: Cannot find name 'x'. - indexWithoutParamType2.ts(3,6): error TS4031: Public property '[x]' of exported class has or is using private name 'x'. + //// [indexWithoutParamType2.d.ts] + declare class C { ++ [x]: string; + } + /// [Errors] //// --==== indexWithoutParamType2.ts (4 errors) ==== -+==== indexWithoutParamType2.ts (3 errors) ==== - class C { - // Used to be indexer, now it is a computed property - [x]: string - ~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~ - !!! error TS2304: Cannot find name 'x'. - ~ - !!! error TS4031: Public property '[x]' of exported class has or is using private name 'x'. 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 index d3fc0e0555188..e10939d2da23e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrorsClasses.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrorsClasses.d.ts.diff @@ -5,51 +5,73 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -44,21 +44,17 @@ - isolatedDeclarationErrorsClasses.ts(12,17): error TS7006: Parameter 'value' implicitly has an 'any' type. +@@ -17,15 +17,23 @@ + 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; ++ [noAnnotationStringName](): invalid; ++ [noParamAnnotationStringName](v: invalid): void; ++ get [noAnnotationStringName](): invalid; ++ set [noParamAnnotationStringName](value: invalid); + } + export interface I { ++ [noAnnotationStringName]: 10; + [noAnnotationLiteralName](): any; + } + export {}; + +@@ -42,15 +50,15 @@ 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(39,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --isolatedDeclarationErrorsClasses.ts(39,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --isolatedDeclarationErrorsClasses.ts(41,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - isolatedDeclarationErrorsClasses.ts(41,35): error TS7006: Parameter 'v' implicitly has an 'any' type. - isolatedDeclarationErrorsClasses.ts(41,35): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations - isolatedDeclarationErrorsClasses.ts(43,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --isolatedDeclarationErrorsClasses.ts(43,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - isolatedDeclarationErrorsClasses.ts(45,9): error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. --isolatedDeclarationErrorsClasses.ts(45,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - isolatedDeclarationErrorsClasses.ts(45,39): error TS7006: Parameter 'value' implicitly has an 'any' type. - isolatedDeclarationErrorsClasses.ts(45,39): 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(42,5): error TS9008: Method must have an explicit return type annotation 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(44,35): error TS9011: Parameter must have an explicit type annotation 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 (21 errors) ==== -+==== isolatedDeclarationErrorsClasses.ts (17 errors) ==== - export class Cls { +@@ -130,27 +138,31 @@ + [noParamAnnotationLiteralName](v: string): void { } - field = 1 + 1; - ~~~~~ -@@ -127,14 +123,10 @@ [noAnnotationStringName]() { } ~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 isolatedDeclarationErrorsClasses.ts:39:5: Add a return type to the method -- ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 isolatedDeclarationErrorsClasses.ts:42:5: Add a return type to the method [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. - ~ - !!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -@@ -143,16 +135,12 @@ ++ ~ ++!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations ++!!! related TS9028 isolatedDeclarationErrorsClasses.ts:44:35: Add a type annotation to the parameter v + get [noAnnotationStringName]() { return 0;} ~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9032 isolatedDeclarationErrorsClasses.ts:43:9: Add a return type to the get accessor declaration -- ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! 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) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -58,5 +80,10 @@ -!!! 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 ++ ~~~~~ ++!!! 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..930495476e4c0 --- /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/overloadsWithComputedNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff index 04e79823e265d..0da044b8c033e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff @@ -5,7 +5,12 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -19,19 +19,18 @@ +@@ -14,19 +14,23 @@ + declare const uniqueSym2: unique symbol; + declare const sym: symbol; + declare const strUnion: 'foo' | 'bar'; + declare class C1 { ++ [sym](): void; [uniqueSym2](): void; [uniqueSym](): void; } @@ -16,17 +21,15 @@ [uniqueSym](): void; } declare class C2 { - [strUnion](): void; -- [strUnion](): invalid; ++ [strUnion](): void; } declare class I2 { - [strUnion](): void; -- [strUnion](): invalid; ++ [strUnion](): void; } declare class C3 { [1](): void; [2](): void; -@@ -48,23 +47,16 @@ +@@ -43,21 +47,16 @@ overloadsWithComputedNames.ts(8,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations overloadsWithComputedNames.ts(14,5): error TS2391: Function implementation is missing or not immediately following the declaration. overloadsWithComputedNames.ts(16,5): error TS2389: Function implementation name must be '["bar"]'. @@ -36,22 +39,20 @@ overloadsWithComputedNames.ts(35,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. overloadsWithComputedNames.ts(42,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -overloadsWithComputedNames.ts(42,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --overloadsWithComputedNames.ts(43,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -overloadsWithComputedNames.ts(43,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations overloadsWithComputedNames.ts(47,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -overloadsWithComputedNames.ts(47,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --overloadsWithComputedNames.ts(48,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -overloadsWithComputedNames.ts(48,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is missing or not immediately following the declaration. --==== overloadsWithComputedNames.ts (17 errors) ==== +-==== overloadsWithComputedNames.ts (15 errors) ==== +==== overloadsWithComputedNames.ts (10 errors) ==== // https://github.com/microsoft/TypeScript/issues/52329 class Person { ["B"](a: number): string; ["A"](a: string|number): number | string { -@@ -102,10 +94,8 @@ +@@ -95,10 +94,8 @@ class C1 { [sym](): void; // should error ~~~~~ @@ -62,7 +63,7 @@ ~~~~~~~~~~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. [uniqueSym](): void; -@@ -124,30 +114,16 @@ +@@ -117,24 +114,16 @@ class C2 { [strUnion](): void; // should error ~~~~~~~~~~ @@ -71,9 +72,6 @@ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [strUnion]() { } - ~~~~~~~~~~ --!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --!!! related TS9034 overloadsWithComputedNames.ts:43:5: Add a return type to the method -- ~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } @@ -85,9 +83,6 @@ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [strUnion]() { } - ~~~~~~~~~~ --!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --!!! related TS9034 overloadsWithComputedNames.ts:48:5: Add a return type to the method -- ~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff index 6d69e0466b7a6..1a4dba00a1cc7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff @@ -5,25 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,20 +7,17 @@ +@@ -1,8 +1,9 @@ - /// [Errors] //// - parserComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName10.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - parserComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. - parserComputedPropertyName10.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + //// [parserComputedPropertyName10.d.ts] + declare class C { ++ [e]: number; + } + /// [Errors] //// --==== parserComputedPropertyName10.ts (4 errors) ==== -+==== parserComputedPropertyName10.ts (3 errors) ==== - class C { - [e] = 1 - ~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~ - !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName11.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName11.d.ts.diff index 98e94aae31130..a061791f6ad69 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName11.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName11.d.ts.diff @@ -5,28 +5,31 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -8,23 +8,20 @@ +@@ -1,20 +1,25 @@ + + + //// [parserComputedPropertyName11.d.ts] + declare class C { ++ [e](): invalid; + } + /// [Errors] //// parserComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --parserComputedPropertyName11.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++parserComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations parserComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. - parserComputedPropertyName11.ts(2,5): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. --==== parserComputedPropertyName11.ts (5 errors) ==== -+==== parserComputedPropertyName11.ts (4 errors) ==== +-==== parserComputedPropertyName11.ts (2 errors) ==== ++==== parserComputedPropertyName11.ts (3 errors) ==== class C { [e](); ~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 parserComputedPropertyName11.ts:2:4: Add a return type to the method -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++ ~~~ ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 parserComputedPropertyName11.ts:2:4: Add a return type to the method ~ !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName12.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName12.d.ts.diff index 3f441eefbfae6..10a845e2f22bf 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName12.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName12.d.ts.diff @@ -5,26 +5,28 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,21 +7,18 @@ +@@ -1,17 +1,22 @@ + + + //// [parserComputedPropertyName12.d.ts] + declare class C { ++ [e](): invalid; + } /// [Errors] //// - parserComputedPropertyName12.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --parserComputedPropertyName12.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++parserComputedPropertyName12.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations parserComputedPropertyName12.ts(2,5): error TS2304: Cannot find name 'e'. - parserComputedPropertyName12.ts(2,5): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. --==== parserComputedPropertyName12.ts (4 errors) ==== -+==== parserComputedPropertyName12.ts (3 errors) ==== +-==== parserComputedPropertyName12.ts (1 errors) ==== ++==== parserComputedPropertyName12.ts (2 errors) ==== class C { [e]() { } - ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 parserComputedPropertyName12.ts:2:4: Add a return type to the method -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++ ~~~ ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 parserComputedPropertyName12.ts:2:4: Add a return type to the method ~ !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff index a091c2883a790..e602a93c1338a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff @@ -5,25 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,20 +7,17 @@ +@@ -1,8 +1,9 @@ - /// [Errors] //// - parserComputedPropertyName22.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName22.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - parserComputedPropertyName22.ts(2,6): error TS2304: Cannot find name 'e'. - parserComputedPropertyName22.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + //// [parserComputedPropertyName22.d.ts] + declare class C { ++ [e]: number; + } + /// [Errors] //// --==== parserComputedPropertyName22.ts (4 errors) ==== -+==== parserComputedPropertyName22.ts (3 errors) ==== - declare class C { - [e]: number - ~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~ - !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff index eee90f2180d86..7399125fab2bd 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff @@ -5,23 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,18 +6,15 @@ - } +@@ -1,8 +1,9 @@ - /// [Errors] //// --parserComputedPropertyName23.ts(2,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - parserComputedPropertyName23.ts(2,10): error TS2304: Cannot find name 'e'. - parserComputedPropertyName23.ts(2,10): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + //// [parserComputedPropertyName23.d.ts] + declare class C { ++ get [e](): number; + } + /// [Errors] //// --==== parserComputedPropertyName23.ts (3 errors) ==== -+==== parserComputedPropertyName23.ts (2 errors) ==== - declare class C { - get [e](): number -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~ - !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff index 333e2eead2bd2..c29c694a65bf1 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff @@ -5,24 +5,28 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,19 +6,16 @@ +@@ -1,17 +1,22 @@ + + + //// [parserComputedPropertyName24.d.ts] + declare class C { ++ set [e](v: invalid); } /// [Errors] //// --parserComputedPropertyName24.ts(2,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName24.ts(2,10): error TS2304: Cannot find name 'e'. - parserComputedPropertyName24.ts(2,10): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. - parserComputedPropertyName24.ts(2,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++parserComputedPropertyName24.ts(2,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --==== parserComputedPropertyName24.ts (4 errors) ==== -+==== parserComputedPropertyName24.ts (3 errors) ==== +-==== parserComputedPropertyName24.ts (1 errors) ==== ++==== parserComputedPropertyName24.ts (2 errors) ==== class C { set [e](v) { } -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. ++ ~ ++!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9033 parserComputedPropertyName24.ts:2:9: Add a type to parameter of the set accessor declaration + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff index dc5790aea4008..405729e720b6d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff @@ -5,28 +5,37 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,23 +7,20 @@ +@@ -1,25 +1,31 @@ + + + //// [parserComputedPropertyName25.d.ts] + declare class C { ++ [e]: invalid; + } /// [Errors] //// parserComputedPropertyName25.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName25.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName25.ts(3,6): error TS2304: Cannot find name 'e'. - parserComputedPropertyName25.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. - parserComputedPropertyName25.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ++parserComputedPropertyName25.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. --==== parserComputedPropertyName25.ts (6 errors) ==== -+==== parserComputedPropertyName25.ts (5 errors) ==== +-==== parserComputedPropertyName25.ts (3 errors) ==== ++==== parserComputedPropertyName25.ts (4 errors) ==== class C { // No ASI [e] = 0 ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. ++ ~ + [e2] = 1 ++ ~~~~~~~~~~~~ ++!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ++!!! related TS9029 parserComputedPropertyName25.ts:3:5: Add a type annotation to the property [e] + ~~ + !!! error TS2304: Cannot find name 'e2'. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff index c65a9e11916f8..263589eb9ba33 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff @@ -5,27 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,22 +7,19 @@ - } - - /// [Errors] //// +@@ -1,8 +1,9 @@ --parserComputedPropertyName27.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - parserComputedPropertyName27.ts(3,6): error TS2304: Cannot find name 'e'. - parserComputedPropertyName27.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. - parserComputedPropertyName27.ts(4,6): error TS2304: Cannot find name 'e2'. - parserComputedPropertyName27.ts(4,9): error TS1005: ';' expected. - parserComputedPropertyName27.ts(4,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations + //// [parserComputedPropertyName27.d.ts] + declare class C { ++ [e]: number; + number: invalid; + } --==== parserComputedPropertyName27.ts (6 errors) ==== -+==== parserComputedPropertyName27.ts (5 errors) ==== - class C { - // No ASI - [e]: number = 0 -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~ - !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff index c43188624cdbf..fdf7208012043 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff @@ -5,38 +5,14 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -8,33 +8,27 @@ +@@ -1,8 +1,10 @@ - /// [Errors] //// - parserComputedPropertyName28.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName28.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - parserComputedPropertyName28.ts(2,6): error TS2304: Cannot find name 'e'. - parserComputedPropertyName28.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. - parserComputedPropertyName28.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName28.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - parserComputedPropertyName28.ts(3,6): error TS2304: Cannot find name 'e2'. - parserComputedPropertyName28.ts(3,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. + //// [parserComputedPropertyName28.d.ts] + declare class C { ++ [e]: number; ++ [e2]: number; + } + /// [Errors] //// --==== parserComputedPropertyName28.ts (8 errors) ==== -+==== parserComputedPropertyName28.ts (6 errors) ==== - class C { - [e]: number = 0; - ~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~ - !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. - [e2]: number - ~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~~ - !!! error TS2304: Cannot find name 'e2'. - ~~ - !!! error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff index 453b845e34653..dc27687f1033a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff @@ -5,43 +5,40 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -8,27 +8,23 @@ +@@ -1,20 +1,23 @@ + + + //// [parserComputedPropertyName29.d.ts] + declare class C { ++ [e]: invalid; ++ [e2]: number; + } /// [Errors] //// parserComputedPropertyName29.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName29.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName29.ts(3,6): error TS2304: Cannot find name 'e'. - parserComputedPropertyName29.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName29.ts(3,11): error TS2304: Cannot find name 'id'. - parserComputedPropertyName29.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ++parserComputedPropertyName29.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName29.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName29.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName29.ts(4,6): error TS2304: Cannot find name 'e2'. - parserComputedPropertyName29.ts(4,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. --==== parserComputedPropertyName29.ts (10 errors) ==== -+==== parserComputedPropertyName29.ts (8 errors) ==== +-==== parserComputedPropertyName29.ts (5 errors) ==== ++==== parserComputedPropertyName29.ts (6 errors) ==== class C { // yes ASI [e] = id++ ~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +@@ -22,8 +25,11 @@ ~ !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -@@ -39,10 +35,8 @@ - !!! related TS9029 parserComputedPropertyName29.ts:3:5: Add a type annotation to the property [e] + ~~ + !!! error TS2304: Cannot find name 'id'. ++ ~~~~ ++!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ++!!! related TS9029 parserComputedPropertyName29.ts:3:5: Add a type annotation to the property [e] [e2]: number ~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~~ - !!! error TS2304: Cannot find name 'e2'. ~~ - !!! error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff index fab3d786b1b19..b07e6f7cf7df3 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff @@ -5,39 +5,14 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -8,34 +8,28 @@ +@@ -1,8 +1,10 @@ - /// [Errors] //// - parserComputedPropertyName31.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName31.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - parserComputedPropertyName31.ts(3,6): error TS2304: Cannot find name 'e'. - parserComputedPropertyName31.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. - parserComputedPropertyName31.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName31.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - parserComputedPropertyName31.ts(4,6): error TS2304: Cannot find name 'e2'. - parserComputedPropertyName31.ts(4,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. + //// [parserComputedPropertyName31.d.ts] + declare class C { ++ [e]: number; ++ [e2]: number; + } + /// [Errors] //// --==== parserComputedPropertyName31.ts (8 errors) ==== -+==== parserComputedPropertyName31.ts (6 errors) ==== - class C { - // yes ASI - [e]: number - ~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~ - !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. - [e2]: number - ~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~~ - !!! error TS2304: Cannot find name 'e2'. - ~~ - !!! error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff index 85a88cd567a4a..265e3bb213099 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff @@ -5,25 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,20 +7,17 @@ +@@ -1,8 +1,9 @@ - /// [Errors] //// - parserComputedPropertyName32.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. --parserComputedPropertyName32.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - parserComputedPropertyName32.ts(2,6): error TS2304: Cannot find name 'e'. - parserComputedPropertyName32.ts(2,6): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + //// [parserComputedPropertyName32.d.ts] + declare class C { ++ [e](): number; + } + /// [Errors] //// --==== parserComputedPropertyName32.ts (4 errors) ==== -+==== parserComputedPropertyName32.ts (3 errors) ==== - declare class C { - [e](): number - ~~~ - !!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~ - !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff index ed140799ba539..7b3a2460adf15 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff @@ -5,28 +5,36 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,23 +6,20 @@ +@@ -1,25 +1,31 @@ + + + //// [parserComputedPropertyName33.d.ts] + declare class C { ++ [e]: invalid; } /// [Errors] //// --parserComputedPropertyName33.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName33.ts(3,6): error TS2304: Cannot find name 'e'. - parserComputedPropertyName33.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. - parserComputedPropertyName33.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ++parserComputedPropertyName33.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName33.ts(4,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName33.ts(4,12): error TS1005: ';' expected. parserComputedPropertyName33.ts(5,1): error TS1128: Declaration or statement expected. --==== parserComputedPropertyName33.ts (7 errors) ==== -+==== parserComputedPropertyName33.ts (6 errors) ==== +-==== parserComputedPropertyName33.ts (4 errors) ==== ++==== parserComputedPropertyName33.ts (5 errors) ==== class C { // No ASI [e] = 0 -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. ++ ~ + [e2]() { } ++ ~~~~~~~~~~ ++!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ++!!! related TS9029 parserComputedPropertyName33.ts:3:5: Add a type annotation to the property [e] + ~~ + !!! error TS2304: Cannot find name 'e2'. + ~ + !!! error TS1005: ';' expected. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff index 5605e383b3abc..8e85ddc0d23da 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff @@ -5,26 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,21 +7,18 @@ +@@ -1,8 +1,9 @@ - /// [Errors] //// - parserComputedPropertyName36.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName36.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - parserComputedPropertyName36.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. - parserComputedPropertyName36.ts(2,6): error TS2304: Cannot find name 'public'. - parserComputedPropertyName36.ts(2,6): error TS4031: Public property '[public ]' of exported class has or is using private name 'public'. + //// [parserComputedPropertyName36.d.ts] + declare class C { ++ [public]: string; + } + /// [Errors] //// --==== parserComputedPropertyName36.ts (5 errors) ==== -+==== parserComputedPropertyName36.ts (4 errors) ==== - class C { - [public ]: string; - ~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~~~~~~ - !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. - ~~~~~~ - !!! error TS2304: Cannot find name 'public'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName38.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName38.d.ts.diff index 6b2f716ed50b3..024672025e0f9 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName38.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName38.d.ts.diff @@ -5,26 +5,28 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,22 +7,19 @@ +@@ -1,19 +1,24 @@ + + + //// [parserComputedPropertyName38.d.ts] + declare class C { ++ [public](): invalid; + } /// [Errors] //// - parserComputedPropertyName38.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --parserComputedPropertyName38.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++parserComputedPropertyName38.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations parserComputedPropertyName38.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. parserComputedPropertyName38.ts(2,6): error TS2304: Cannot find name 'public'. - parserComputedPropertyName38.ts(2,6): error TS4100: Public method '[public]' of exported class has or is using private name 'public'. --==== parserComputedPropertyName38.ts (5 errors) ==== -+==== parserComputedPropertyName38.ts (4 errors) ==== +-==== parserComputedPropertyName38.ts (2 errors) ==== ++==== parserComputedPropertyName38.ts (3 errors) ==== class C { [public]() { } - ~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 parserComputedPropertyName38.ts:2:5: Add a return type to the method -- ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++ ~~~~~~~~ ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 parserComputedPropertyName38.ts:2:5: Add a return type to the method ~~~~~~ !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName39.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName39.d.ts.diff index 7951481caeb09..f95911148c966 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName39.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName39.d.ts.diff @@ -5,27 +5,29 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,23 +7,20 @@ +@@ -1,20 +1,25 @@ + + + //// [parserComputedPropertyName39.d.ts] + declare class C { ++ [public](): invalid; + } /// [Errors] //// - parserComputedPropertyName39.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --parserComputedPropertyName39.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++parserComputedPropertyName39.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations parserComputedPropertyName39.ts(3,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. parserComputedPropertyName39.ts(3,6): error TS2304: Cannot find name 'public'. - parserComputedPropertyName39.ts(3,6): error TS4100: Public method '[public]' of exported class has or is using private name 'public'. --==== parserComputedPropertyName39.ts (5 errors) ==== -+==== parserComputedPropertyName39.ts (4 errors) ==== +-==== parserComputedPropertyName39.ts (2 errors) ==== ++==== parserComputedPropertyName39.ts (3 errors) ==== "use strict"; class C { [public]() { } - ~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 parserComputedPropertyName39.ts:3:5: Add a return type to the method -- ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++ ~~~~~~~~ ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 parserComputedPropertyName39.ts:3:5: Add a return type to the method ~~~~~~ !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName7.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName7.d.ts.diff index 32cfb7a626444..7b3054d5b49ca 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName7.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName7.d.ts.diff @@ -5,28 +5,31 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -8,23 +8,20 @@ +@@ -1,20 +1,25 @@ + + + //// [parserComputedPropertyName7.d.ts] + declare class C { ++ [e]: invalid; + } + /// [Errors] //// parserComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations --parserComputedPropertyName7.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++parserComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. - parserComputedPropertyName7.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. --==== parserComputedPropertyName7.ts (5 errors) ==== -+==== parserComputedPropertyName7.ts (4 errors) ==== +-==== parserComputedPropertyName7.ts (2 errors) ==== ++==== parserComputedPropertyName7.ts (3 errors) ==== class C { [e] ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ - !!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations - !!! related TS9029 parserComputedPropertyName7.ts:2:4: Add a type annotation to the property [e] -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++ ~~~ ++!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ++!!! related TS9029 parserComputedPropertyName7.ts:2:4: Add a type annotation to the property [e] ~ !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName8.d.ts.diff index 4a89a7013b264..eebd8ad9ab0ef 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName8.d.ts.diff @@ -5,28 +5,31 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -8,23 +8,20 @@ +@@ -1,20 +1,25 @@ + + + //// [parserComputedPropertyName8.d.ts] + declare class C { ++ [e]: invalid; + } + /// [Errors] //// parserComputedPropertyName8.ts(2,11): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserComputedPropertyName8.ts(2,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations --parserComputedPropertyName8.ts(2,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++parserComputedPropertyName8.ts(2,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName8.ts(2,12): error TS2304: Cannot find name 'e'. - parserComputedPropertyName8.ts(2,12): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. --==== parserComputedPropertyName8.ts (5 errors) ==== -+==== parserComputedPropertyName8.ts (4 errors) ==== +-==== parserComputedPropertyName8.ts (2 errors) ==== ++==== parserComputedPropertyName8.ts (3 errors) ==== class C { public [e] ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ - !!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations - !!! related TS9029 parserComputedPropertyName8.ts:2:11: Add a type annotation to the property [e] -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++ ~~~ ++!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ++!!! related TS9029 parserComputedPropertyName8.ts:2:11: Add a type annotation to the property [e] ~ !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff index cdb442f69ce4c..c7b08b4993180 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff @@ -5,27 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,22 +7,19 @@ +@@ -1,8 +1,9 @@ - /// [Errors] //// - parserComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserComputedPropertyName9.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - parserComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. - parserComputedPropertyName9.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. - parserComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. - parserComputedPropertyName9.ts(2,9): error TS4031: Public property '[e]' of exported class has or is using private name 'Type'. + //// [parserComputedPropertyName9.d.ts] + declare class C { ++ [e]: Type; + } + /// [Errors] //// --==== parserComputedPropertyName9.ts (6 errors) ==== -+==== parserComputedPropertyName9.ts (5 errors) ==== - class C { - [e]: Type - ~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~ - !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff index 47a90062b462c..06a2dd70caa35 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff @@ -5,25 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,20 +7,17 @@ +@@ -1,8 +1,9 @@ - /// [Errors] //// - parserES5ComputedPropertyName1.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserES5ComputedPropertyName1.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - parserES5ComputedPropertyName1.ts(2,6): error TS2304: Cannot find name 'e'. - parserES5ComputedPropertyName1.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + //// [parserES5ComputedPropertyName1.d.ts] + declare class C { ++ [e]: number; + } + /// [Errors] //// --==== parserES5ComputedPropertyName1.ts (4 errors) ==== -+==== parserES5ComputedPropertyName1.ts (3 errors) ==== - declare class C { - [e]: number - ~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~ - !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff index c53041fd1f03a..86cdcc20d8660 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff @@ -5,25 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,20 +7,17 @@ +@@ -1,8 +1,9 @@ - /// [Errors] //// - parserES5ComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserES5ComputedPropertyName10.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - parserES5ComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. - parserES5ComputedPropertyName10.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + //// [parserES5ComputedPropertyName10.d.ts] + declare class C { ++ [e]: number; + } + /// [Errors] //// --==== parserES5ComputedPropertyName10.ts (4 errors) ==== -+==== parserES5ComputedPropertyName10.ts (3 errors) ==== - class C { - [e] = 1 - ~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~ - !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName11.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName11.d.ts.diff index 41f68a552b6c4..a2f795c3cd487 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName11.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName11.d.ts.diff @@ -5,28 +5,31 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -8,23 +8,20 @@ +@@ -1,20 +1,25 @@ + + + //// [parserES5ComputedPropertyName11.d.ts] + declare class C { ++ [e](): invalid; + } + /// [Errors] //// parserES5ComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - parserES5ComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --parserES5ComputedPropertyName11.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++parserES5ComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations parserES5ComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. - parserES5ComputedPropertyName11.ts(2,5): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. --==== parserES5ComputedPropertyName11.ts (5 errors) ==== -+==== parserES5ComputedPropertyName11.ts (4 errors) ==== +-==== parserES5ComputedPropertyName11.ts (2 errors) ==== ++==== parserES5ComputedPropertyName11.ts (3 errors) ==== class C { [e](); ~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 parserES5ComputedPropertyName11.ts:2:4: Add a return type to the method -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++ ~~~ ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 parserES5ComputedPropertyName11.ts:2:4: Add a return type to the method ~ !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName7.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName7.d.ts.diff index 57d4368465a53..c2f8c0895d560 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName7.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName7.d.ts.diff @@ -5,28 +5,31 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -8,23 +8,20 @@ +@@ -1,20 +1,25 @@ + + + //// [parserES5ComputedPropertyName7.d.ts] + declare class C { ++ [e]: invalid; + } + /// [Errors] //// parserES5ComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserES5ComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations --parserES5ComputedPropertyName7.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++parserES5ComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserES5ComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. - parserES5ComputedPropertyName7.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. --==== parserES5ComputedPropertyName7.ts (5 errors) ==== -+==== parserES5ComputedPropertyName7.ts (4 errors) ==== +-==== parserES5ComputedPropertyName7.ts (2 errors) ==== ++==== parserES5ComputedPropertyName7.ts (3 errors) ==== class C { [e] ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ - !!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations - !!! related TS9029 parserES5ComputedPropertyName7.ts:2:4: Add a type annotation to the property [e] -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++ ~~~ ++!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ++!!! related TS9029 parserES5ComputedPropertyName7.ts:2:4: Add a type annotation to the property [e] ~ !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. + } +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff index 358d1b91179dd..9cb58374251a3 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff @@ -5,27 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,22 +7,19 @@ +@@ -1,8 +1,9 @@ - /// [Errors] //// - parserES5ComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserES5ComputedPropertyName9.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - parserES5ComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. - parserES5ComputedPropertyName9.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. - parserES5ComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. - parserES5ComputedPropertyName9.ts(2,9): error TS4031: Public property '[e]' of exported class has or is using private name 'Type'. + //// [parserES5ComputedPropertyName9.d.ts] + declare class C { ++ [e]: Type; + } + /// [Errors] //// --==== parserES5ComputedPropertyName9.ts (6 errors) ==== -+==== parserES5ComputedPropertyName9.ts (5 errors) ==== - class C { - [e]: Type - ~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~ - !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff index b5625a907c934..affbb77c46b9a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff @@ -5,25 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,20 +7,17 @@ +@@ -1,8 +1,9 @@ - /// [Errors] //// - parserES5SymbolProperty3.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. --parserES5SymbolProperty3.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - parserES5SymbolProperty3.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - parserES5SymbolProperty3.ts(2,6): error TS4100: Public method '[Symbol.unscopables]' of exported class has or is using private name 'Symbol'. + //// [parserES5SymbolProperty3.d.ts] + declare class C { ++ [Symbol.unscopables](): string; + } + /// [Errors] //// --==== parserES5SymbolProperty3.ts (4 errors) ==== -+==== parserES5SymbolProperty3.ts (3 errors) ==== - declare class C { - [Symbol.unscopables](): string; - ~~~~~~~~~~~~~~~~~~~~ - !!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. -- ~~~~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~~~~~~ - !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ - !!! error TS4100: Public method '[Symbol.unscopables]' of exported class has or is using private name 'Symbol'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff index 2556e6cdb090f..3a736be3a4d5d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff @@ -5,25 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,20 +7,17 @@ +@@ -1,8 +1,9 @@ - /// [Errors] //// - parserES5SymbolProperty4.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserES5SymbolProperty4.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - parserES5SymbolProperty4.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - parserES5SymbolProperty4.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. + //// [parserES5SymbolProperty4.d.ts] + declare class C { ++ [Symbol.isRegExp]: string; + } + /// [Errors] //// --==== parserES5SymbolProperty4.ts (4 errors) ==== -+==== parserES5SymbolProperty4.ts (3 errors) ==== - declare class C { - [Symbol.isRegExp]: string; - ~~~~~~~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~~~~~~ - !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ - !!! error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff index 325865f092dfb..793b81b64e041 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff @@ -5,25 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,20 +7,17 @@ +@@ -1,8 +1,9 @@ - /// [Errors] //// - parserES5SymbolProperty5.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserES5SymbolProperty5.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - parserES5SymbolProperty5.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - parserES5SymbolProperty5.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. + //// [parserES5SymbolProperty5.d.ts] + declare class C { ++ [Symbol.isRegExp]: string; + } + /// [Errors] //// --==== parserES5SymbolProperty5.ts (4 errors) ==== -+==== parserES5SymbolProperty5.ts (3 errors) ==== - class C { - [Symbol.isRegExp]: string; - ~~~~~~~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~~~~~~ - !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ - !!! error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff index fdac68bd9dbfc..934a038a1b354 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff @@ -5,25 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -7,20 +7,17 @@ +@@ -1,8 +1,9 @@ - /// [Errors] //// - parserES5SymbolProperty6.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --parserES5SymbolProperty6.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - parserES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - parserES5SymbolProperty6.ts(2,6): error TS4031: Public property '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. + //// [parserES5SymbolProperty6.d.ts] + declare class C { ++ [Symbol.toStringTag]: string; + } + /// [Errors] //// --==== parserES5SymbolProperty6.ts (4 errors) ==== -+==== parserES5SymbolProperty6.ts (3 errors) ==== - class C { - [Symbol.toStringTag]: string = ""; - ~~~~~~~~~~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~~~~~~ - !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ - !!! error TS4031: Public property '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff index 252ef715d61a0..6ad72b5f0930f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff @@ -5,23 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -6,18 +6,15 @@ - } +@@ -1,8 +1,9 @@ - /// [Errors] //// --parserES5SymbolProperty7.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - parserES5SymbolProperty7.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - parserES5SymbolProperty7.ts(2,6): error TS4100: Public method '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. + //// [parserES5SymbolProperty7.d.ts] + declare class C { ++ [Symbol.toStringTag](): void; + } + /// [Errors] //// --==== parserES5SymbolProperty7.ts (3 errors) ==== -+==== parserES5SymbolProperty7.ts (2 errors) ==== - class C { - [Symbol.toStringTag](): void { } -- ~~~~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~~~~~~ - !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ - !!! error TS4100: Public method '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff index 8e61a25b33f0c..5c47a03614500 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff @@ -5,35 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -112,9 +112,8 @@ - staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. - staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. - staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. --staticPropertyNameConflicts.ts(284,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - staticPropertyNameConflicts.ts(289,12): error TS1319: A default export can only be used in an ECMAScript-style module. - staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prototype'. - staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. - staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. -@@ -138,9 +137,9 @@ - staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - - --==== staticPropertyNameConflicts.ts (85 errors) ==== -+==== staticPropertyNameConflicts.ts (84 errors) ==== - const FunctionPropertyNames = { - name: 'name', - length: 'length', - prototype: 'prototype', -@@ -549,10 +548,8 @@ - export class ExportedStaticPrototype { - static [FunctionPropertyNames.prototype]: number; // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - [FunctionPropertyNames.prototype]: string; // ok - } - - module TestOnDefaultExportedClass_6 { +@@ -24,8 +24,9 @@ + static [FunctionPropertyNames.length](): invalid; + [FunctionPropertyNames.length](): invalid; + } + export declare class ExportedStaticPrototype { ++ static [FunctionPropertyNames.prototype]: number; + [FunctionPropertyNames.prototype]: string; + } + export declare class ExportedStaticPrototypeFn { + static [FunctionPropertyNames.prototype](): invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff index 8c4218669e1a8..5c47a03614500 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff @@ -5,35 +5,13 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -72,9 +72,8 @@ - staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. - staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. - staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. --staticPropertyNameConflicts.ts(284,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - staticPropertyNameConflicts.ts(289,12): error TS1319: A default export can only be used in an ECMAScript-style module. - staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prototype'. - staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. - staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. -@@ -90,9 +89,9 @@ - staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - - --==== staticPropertyNameConflicts.ts (37 errors) ==== -+==== staticPropertyNameConflicts.ts (36 errors) ==== - const FunctionPropertyNames = { - name: 'name', - length: 'length', - prototype: 'prototype', -@@ -421,10 +420,8 @@ - export class ExportedStaticPrototype { - static [FunctionPropertyNames.prototype]: number; // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - [FunctionPropertyNames.prototype]: string; // ok - } - - module TestOnDefaultExportedClass_6 { +@@ -24,8 +24,9 @@ + static [FunctionPropertyNames.length](): invalid; + [FunctionPropertyNames.length](): invalid; + } + export declare class ExportedStaticPrototype { ++ static [FunctionPropertyNames.prototype]: number; + [FunctionPropertyNames.prototype]: string; + } + export declare class ExportedStaticPrototypeFn { + static [FunctionPropertyNames.prototype](): invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess1.d.ts.diff index 33b30c2d6b28d..3525f41f5a34c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess1.d.ts.diff @@ -5,40 +5,46 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -12,14 +12,12 @@ +@@ -2,17 +2,19 @@ + + //// [superSymbolIndexedAccess1.d.ts] + declare var symbol: invalid; + declare class Foo { ++ [symbol](): invalid; + } + declare class Bar extends Foo { ++ [symbol](): invalid; + } + /// [Errors] //// superSymbolIndexedAccess1.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations - superSymbolIndexedAccess1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -superSymbolIndexedAccess1.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - superSymbolIndexedAccess1.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -superSymbolIndexedAccess1.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++superSymbolIndexedAccess1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++superSymbolIndexedAccess1.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --==== superSymbolIndexedAccess1.ts (5 errors) ==== -+==== superSymbolIndexedAccess1.ts (3 errors) ==== + ==== superSymbolIndexedAccess1.ts (3 errors) ==== var symbol = Symbol.for('myThing'); - ~~~~~~~~~~~~~~~~~~~~~ - !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations - !!! related TS9027 superSymbolIndexedAccess1.ts:1:5: Add a type annotation to the variable symbol -@@ -28,10 +26,8 @@ +@@ -22,16 +24,18 @@ + + class Foo { [symbol]() { ~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 superSymbolIndexedAccess1.ts:4:5: Add a return type to the method -- ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 superSymbolIndexedAccess1.ts:4:5: Add a return type to the method return 0; } } -@@ -39,9 +35,7 @@ + class Bar extends Foo { [symbol]() { ~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 superSymbolIndexedAccess1.ts:10:5: Add a return type to the method -- ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 superSymbolIndexedAccess1.ts:10:5: Add a return type to the method return super[symbol](); } } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess3.d.ts.diff index 226340b51c1d9..66e80096f82bc 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess3.d.ts.diff @@ -5,41 +5,46 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -12,15 +12,13 @@ +@@ -2,17 +2,19 @@ + + //// [superSymbolIndexedAccess3.d.ts] + declare var symbol: invalid; + declare class Foo { ++ [symbol](): invalid; + } + declare class Bar extends Foo { ++ [symbol](): invalid; + } + /// [Errors] //// superSymbolIndexedAccess3.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations - superSymbolIndexedAccess3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -superSymbolIndexedAccess3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - superSymbolIndexedAccess3.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -superSymbolIndexedAccess3.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++superSymbolIndexedAccess3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++superSymbolIndexedAccess3.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations superSymbolIndexedAccess3.ts(11,22): error TS2538: Type 'typeof Bar' cannot be used as an index type. --==== superSymbolIndexedAccess3.ts (6 errors) ==== -+==== superSymbolIndexedAccess3.ts (4 errors) ==== - var symbol = Symbol.for('myThing'); - ~~~~~~~~~~~~~~~~~~~~~ - !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations - !!! related TS9027 superSymbolIndexedAccess3.ts:1:5: Add a type annotation to the variable symbol -@@ -29,10 +27,8 @@ + ==== superSymbolIndexedAccess3.ts (4 errors) ==== +@@ -23,17 +25,19 @@ + + class Foo { [symbol]() { ~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 superSymbolIndexedAccess3.ts:4:5: Add a return type to the method -- ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 superSymbolIndexedAccess3.ts:4:5: Add a return type to the method return 0; } } -@@ -40,10 +36,8 @@ + class Bar extends Foo { [symbol]() { ~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 superSymbolIndexedAccess3.ts:10:5: Add a return type to the method -- ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 superSymbolIndexedAccess3.ts:10:5: Add a return type to the method return super[Bar](); ~~~ !!! error TS2538: Type 'typeof Bar' cannot be used as an index type. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess4.d.ts.diff index b551ed3a11c97..b45d454704e2b 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess4.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess4.d.ts.diff @@ -5,28 +5,31 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -9,13 +9,12 @@ +@@ -2,14 +2,15 @@ + + //// [superSymbolIndexedAccess4.d.ts] + declare var symbol: invalid; + declare class Bar { ++ [symbol](): invalid; + } + /// [Errors] //// superSymbolIndexedAccess4.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations - superSymbolIndexedAccess4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -superSymbolIndexedAccess4.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++superSymbolIndexedAccess4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations superSymbolIndexedAccess4.ts(5,16): error TS2335: 'super' can only be referenced in a derived class. --==== superSymbolIndexedAccess4.ts (4 errors) ==== -+==== superSymbolIndexedAccess4.ts (3 errors) ==== - var symbol = Symbol.for('myThing'); - ~~~~~~~~~~~~~~~~~~~~~ - !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations - !!! related TS9027 superSymbolIndexedAccess4.ts:1:5: Add a type annotation to the variable symbol -@@ -24,10 +23,8 @@ + ==== superSymbolIndexedAccess4.ts (3 errors) ==== +@@ -20,9 +21,10 @@ + + class Bar { [symbol]() { ~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 superSymbolIndexedAccess4.ts:4:5: Add a return type to the method -- ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 superSymbolIndexedAccess4.ts:4:5: Add a return type to the method return super[symbol](); ~~~~~ !!! error TS2335: 'super' can only be referenced in a derived class. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess5.d.ts.diff index 2c9ae2ca28329..0e0aa56702f76 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess5.d.ts.diff @@ -5,38 +5,44 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -11,23 +11,19 @@ +@@ -2,32 +2,36 @@ + + //// [superSymbolIndexedAccess5.d.ts] + declare var symbol: any; + declare class Foo { ++ [symbol](): invalid; + } + declare class Bar extends Foo { ++ [symbol](): invalid; + } /// [Errors] //// - superSymbolIndexedAccess5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -superSymbolIndexedAccess5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - superSymbolIndexedAccess5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -superSymbolIndexedAccess5.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++superSymbolIndexedAccess5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++superSymbolIndexedAccess5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --==== superSymbolIndexedAccess5.ts (4 errors) ==== -+==== superSymbolIndexedAccess5.ts (2 errors) ==== + ==== superSymbolIndexedAccess5.ts (2 errors) ==== var symbol: any; class Foo { [symbol]() { ~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 superSymbolIndexedAccess5.ts:4:5: Add a return type to the method -- ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 superSymbolIndexedAccess5.ts:4:5: Add a return type to the method return 0; } } -@@ -35,9 +31,7 @@ + class Bar extends Foo { [symbol]() { ~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 superSymbolIndexedAccess5.ts:10:5: Add a return type to the method -- ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 superSymbolIndexedAccess5.ts:10:5: Add a return type to the method return super[symbol](); } } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess6.d.ts.diff index a6032256d143c..8e1365c06aa8e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess6.d.ts.diff @@ -5,38 +5,44 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -11,23 +11,19 @@ +@@ -2,32 +2,36 @@ + + //// [superSymbolIndexedAccess6.d.ts] + declare var symbol: any; + declare class Foo { ++ static [symbol](): invalid; + } + declare class Bar extends Foo { ++ static [symbol](): invalid; + } /// [Errors] //// - superSymbolIndexedAccess6.ts(4,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -superSymbolIndexedAccess6.ts(4,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - superSymbolIndexedAccess6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -superSymbolIndexedAccess6.ts(10,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++superSymbolIndexedAccess6.ts(4,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++superSymbolIndexedAccess6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --==== superSymbolIndexedAccess6.ts (4 errors) ==== -+==== superSymbolIndexedAccess6.ts (2 errors) ==== + ==== superSymbolIndexedAccess6.ts (2 errors) ==== var symbol: any; class Foo { static [symbol]() { ~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 superSymbolIndexedAccess6.ts:4:12: Add a return type to the method -- ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 superSymbolIndexedAccess6.ts:4:12: Add a return type to the method return 0; } } -@@ -35,9 +31,7 @@ + class Bar extends Foo { static [symbol]() { ~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9034 superSymbolIndexedAccess6.ts:10:12: Add a return type to the method -- ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 superSymbolIndexedAccess6.ts:10:12: Add a return type to the method return super[symbol](); } } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5For-ofTypeCheck10.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5For-ofTypeCheck10.d.ts index 028f9f031fda3..919987e4fae88 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/ES5For-ofTypeCheck10.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/ES5For-ofTypeCheck10.d.ts @@ -31,11 +31,10 @@ declare class StringIterator { ES5For-ofTypeCheck10.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ES5For-ofTypeCheck10.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ES5For-ofTypeCheck10.ts(9,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -ES5For-ofTypeCheck10.ts(9,6): error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an array type or a string type. -==== ES5For-ofTypeCheck10.ts (5 errors) ==== +==== ES5For-ofTypeCheck10.ts (4 errors) ==== // In ES3/5, you cannot for...of over an arbitrary iterable. class StringIterator { next() { @@ -53,8 +52,6 @@ ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an ar !!! related TS9034 ES5For-ofTypeCheck10.ts:9:5: Add a return type to the method ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ -!!! error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. return this; } } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty6.d.ts index 55646fe874fa6..b48420584c07f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty6.d.ts @@ -22,11 +22,10 @@ declare class C { ES5SymbolProperty6.ts(1,1): error TS2304: Cannot find name 'u'. ES5SymbolProperty6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ES5SymbolProperty6.ts(3,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -ES5SymbolProperty6.ts(3,6): error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. ES5SymbolProperty6.ts(6,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -==== ES5SymbolProperty6.ts (5 errors) ==== +==== ES5SymbolProperty6.ts (4 errors) ==== u//@target: ES5 ~ !!! error TS2304: Cannot find name 'u'. @@ -37,8 +36,6 @@ ES5SymbolProperty6.ts(6,9): error TS2585: 'Symbol' only refers to a type, but is !!! related TS9034 ES5SymbolProperty6.ts:3:5: Add a return type to the method ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ -!!! error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. } (new C)[Symbol.iterator] diff --git a/tests/baselines/reference/isolated-declarations/original/dte/MemberFunctionDeclaration3_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/MemberFunctionDeclaration3_es6.d.ts index b225a7506b607..d85c63aaf95fe 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/MemberFunctionDeclaration3_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/MemberFunctionDeclaration3_es6.d.ts @@ -18,10 +18,9 @@ declare class C { MemberFunctionDeclaration3_es6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations MemberFunctionDeclaration3_es6.ts(2,6): error TS2304: Cannot find name 'foo'. -MemberFunctionDeclaration3_es6.ts(2,6): error TS4100: Public method '[foo]' of exported class has or is using private name 'foo'. -==== MemberFunctionDeclaration3_es6.ts (3 errors) ==== +==== MemberFunctionDeclaration3_es6.ts (2 errors) ==== class C { *[foo]() { } ~~~~~ @@ -29,6 +28,4 @@ MemberFunctionDeclaration3_es6.ts(2,6): error TS4100: Public method '[foo]' of e !!! related TS9034 MemberFunctionDeclaration3_es6.ts:2:5: Add a return type to the method ~~~ !!! error TS2304: Cannot find name 'foo'. - ~~~ -!!! error TS4100: Public method '[foo]' of exported class has or is using private name 'foo'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts index e62e187e5ec0b..83ffe2b29b5f2 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts @@ -40,11 +40,10 @@ indexSignatureMustHaveTypeAnnotation.ts(3,6): error TS2304: Cannot find name 'x' indexSignatureMustHaveTypeAnnotation.ts(4,5): error TS1021: An index signature must have a type annotation. indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS2304: Cannot find name 'x'. -indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS4031: Public property '[x]' of exported class has or is using private name 'x'. indexSignatureMustHaveTypeAnnotation.ts(14,5): error TS1021: An index signature must have a type annotation. -==== indexSignatureMustHaveTypeAnnotation.ts (7 errors) ==== +==== indexSignatureMustHaveTypeAnnotation.ts (6 errors) ==== interface I { // Used to be indexer, now it is a computed property [x]: string; @@ -64,8 +63,6 @@ indexSignatureMustHaveTypeAnnotation.ts(14,5): error TS1021: An index signature !!! 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 'x'. - ~ -!!! error TS4031: Public property '[x]' of exported class has or is using private name 'x'. } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/indexWithoutParamType2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/indexWithoutParamType2.d.ts index 5ad20a5ea4e56..a38e7fe9c9ed1 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/indexWithoutParamType2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/indexWithoutParamType2.d.ts @@ -19,10 +19,9 @@ declare class C { indexWithoutParamType2.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. indexWithoutParamType2.ts(3,6): error TS2304: Cannot find name 'x'. -indexWithoutParamType2.ts(3,6): error TS4031: Public property '[x]' of exported class has or is using private name 'x'. -==== indexWithoutParamType2.ts (3 errors) ==== +==== indexWithoutParamType2.ts (2 errors) ==== class C { // Used to be indexer, now it is a computed property [x]: string @@ -30,6 +29,4 @@ indexWithoutParamType2.ts(3,6): error TS4031: Public property '[x]' of exported !!! 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 'x'. - ~ -!!! error TS4031: Public property '[x]' of exported class has or is using private name 'x'. } \ 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 index a95818422f506..4539f4595c7db 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsClasses.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsClasses.d.ts @@ -35,6 +35,9 @@ const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; export class C { + // Should not be reported as an isolated declaration error + [missing] = 1; + [noAnnotationLiteralName](): void { } [noParamAnnotationLiteralName](v: string): void { } @@ -46,9 +49,15 @@ export class C { get [noAnnotationStringName]() { return 0;} set [noParamAnnotationStringName](value) { } + + [("A" + "B") as "AB"] = 1; + } - +export interface I { + [noAnnotationStringName]: 10; + [noAnnotationLiteralName](); +} /// [Declarations] //// @@ -77,6 +86,7 @@ declare let noParamAnnotationStringName: string; declare const noAnnotationLiteralName = "noAnnotationLiteralName"; declare const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; export declare class C { + [missing]: number; [noAnnotationLiteralName](): void; [noParamAnnotationLiteralName](v: string): void; [noAnnotationStringName](): invalid; @@ -84,6 +94,10 @@ export declare class C { get [noAnnotationStringName](): invalid; set [noParamAnnotationStringName](value: invalid); } +export interface I { + [noAnnotationStringName]: 10; + [noAnnotationLiteralName](): any; +} export {}; /// [Errors] //// @@ -98,16 +112,21 @@ isolatedDeclarationErrorsClasses.ts(12,9): error TS7032: Property 'setOnly' impl 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(39,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -isolatedDeclarationErrorsClasses.ts(41,35): error TS7006: Parameter 'v' implicitly has an 'any' type. -isolatedDeclarationErrorsClasses.ts(41,35): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -isolatedDeclarationErrorsClasses.ts(43,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -isolatedDeclarationErrorsClasses.ts(45,9): error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. -isolatedDeclarationErrorsClasses.ts(45,39): error TS7006: Parameter 'value' implicitly has an 'any' type. -isolatedDeclarationErrorsClasses.ts(45,39): 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 TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(44,35): error TS7006: Parameter 'v' implicitly has an 'any' type. +isolatedDeclarationErrorsClasses.ts(44,35): error TS9011: Parameter must have an explicit type annotation 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,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 (17 errors) ==== +==== isolatedDeclarationErrorsClasses.ts (22 errors) ==== export class Cls { field = 1 + 1; @@ -170,6 +189,13 @@ isolatedDeclarationErrorsClasses.ts(45,39): error TS9009: At least one accessor 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 { } @@ -177,19 +203,19 @@ isolatedDeclarationErrorsClasses.ts(45,39): error TS9009: At least one accessor [noAnnotationStringName]() { } ~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 isolatedDeclarationErrorsClasses.ts:39:5: Add a return type to the method +!!! related TS9034 isolatedDeclarationErrorsClasses.ts:42:5: Add a return type to the method [noParamAnnotationStringName](v): void { } ~ !!! error TS7006: Parameter 'v' implicitly has an 'any' type. ~ !!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 isolatedDeclarationErrorsClasses.ts:41:35: Add a type annotation to the parameter v +!!! related TS9028 isolatedDeclarationErrorsClasses.ts:44:35: Add a type annotation to the parameter v get [noAnnotationStringName]() { return 0;} ~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 isolatedDeclarationErrorsClasses.ts:43:9: Add a return type to the get accessor declaration +!!! related TS9032 isolatedDeclarationErrorsClasses.ts:46:9: Add a return type to the get accessor declaration set [noParamAnnotationStringName](value) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -198,7 +224,19 @@ isolatedDeclarationErrorsClasses.ts(45,39): error TS9009: At least one accessor !!! 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:45:9: Add a type to parameter of the set accessor declaration +!!! 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. + } - \ No newline at end of file + 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..8e5833252d55f --- /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/parserComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName10.d.ts index bb73ae60d1ce0..52a6ab804ba46 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName10.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName10.d.ts @@ -18,16 +18,13 @@ declare class C { parserComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. -parserComputedPropertyName10.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -==== parserComputedPropertyName10.ts (3 errors) ==== +==== parserComputedPropertyName10.ts (2 errors) ==== class C { [e] = 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 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName11.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName11.d.ts index d7ad1130f561f..a297585628126 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName11.d.ts @@ -19,10 +19,9 @@ declare class C { parserComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. parserComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations parserComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. -parserComputedPropertyName11.ts(2,5): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. -==== parserComputedPropertyName11.ts (4 errors) ==== +==== parserComputedPropertyName11.ts (3 errors) ==== class C { [e](); ~~~ @@ -32,6 +31,4 @@ parserComputedPropertyName11.ts(2,5): error TS4100: Public method '[e]' of expor !!! related TS9034 parserComputedPropertyName11.ts:2:4: Add a return type to the method ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName12.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName12.d.ts index 965a45368de20..e37a6ff84420f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName12.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName12.d.ts @@ -18,10 +18,9 @@ declare class C { parserComputedPropertyName12.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations parserComputedPropertyName12.ts(2,5): error TS2304: Cannot find name 'e'. -parserComputedPropertyName12.ts(2,5): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. -==== parserComputedPropertyName12.ts (3 errors) ==== +==== parserComputedPropertyName12.ts (2 errors) ==== class C { [e]() { } ~~~ @@ -29,6 +28,4 @@ parserComputedPropertyName12.ts(2,5): error TS4100: Public method '[e]' of expor !!! related TS9034 parserComputedPropertyName12.ts:2:4: Add a return type to the method ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName22.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName22.d.ts index 5c4bcde714403..3551611db6a9f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName22.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName22.d.ts @@ -18,16 +18,13 @@ declare class C { parserComputedPropertyName22.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName22.ts(2,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName22.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -==== parserComputedPropertyName22.ts (3 errors) ==== +==== parserComputedPropertyName22.ts (2 errors) ==== declare class C { [e]: number ~~~ !!! 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 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName23.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName23.d.ts index 58be205f27105..fb1de357011c9 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName23.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName23.d.ts @@ -17,14 +17,11 @@ declare class C { /// [Errors] //// parserComputedPropertyName23.ts(2,10): error TS2304: Cannot find name 'e'. -parserComputedPropertyName23.ts(2,10): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -==== parserComputedPropertyName23.ts (2 errors) ==== +==== parserComputedPropertyName23.ts (1 errors) ==== declare class C { get [e](): number ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts index 1d0c68d3fbebf..6e5a01f8b7a12 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts @@ -17,17 +17,14 @@ declare class C { /// [Errors] //// parserComputedPropertyName24.ts(2,10): error TS2304: Cannot find name 'e'. -parserComputedPropertyName24.ts(2,10): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName24.ts(2,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -==== parserComputedPropertyName24.ts (3 errors) ==== +==== parserComputedPropertyName24.ts (2 errors) ==== class C { set [e](v) { } ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. ~ !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations !!! related TS9033 parserComputedPropertyName24.ts:2:9: Add a type to parameter of the set accessor declaration diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts index 1e22bbda64a1e..1c127b6aaa740 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts @@ -20,12 +20,11 @@ declare class C { parserComputedPropertyName25.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName25.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName25.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName25.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. -==== parserComputedPropertyName25.ts (5 errors) ==== +==== parserComputedPropertyName25.ts (4 errors) ==== class C { // No ASI [e] = 0 @@ -33,8 +32,6 @@ parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. !!! 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 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. ~ [e2] = 1 ~~~~~~~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts index a5516a4844715..a97cdaba143f6 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts @@ -20,20 +20,17 @@ declare class C { /// [Errors] //// parserComputedPropertyName27.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName27.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName27.ts(4,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName27.ts(4,9): error TS1005: ';' expected. parserComputedPropertyName27.ts(4,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -==== parserComputedPropertyName27.ts (5 errors) ==== +==== parserComputedPropertyName27.ts (4 errors) ==== class C { // No ASI [e]: number = 0 ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. [e2]: number ~~ !!! error TS2304: Cannot find name 'e2'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName28.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName28.d.ts index 4b22eddb12919..9c461a72935b9 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName28.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName28.d.ts @@ -20,26 +20,20 @@ declare class C { parserComputedPropertyName28.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName28.ts(2,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName28.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName28.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName28.ts(3,6): error TS2304: Cannot find name 'e2'. -parserComputedPropertyName28.ts(3,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. -==== parserComputedPropertyName28.ts (6 errors) ==== +==== parserComputedPropertyName28.ts (4 errors) ==== class C { [e]: number = 0; ~~~ !!! 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 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. [e2]: number ~~~~ !!! 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 'e2'. - ~~ -!!! error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts index f2e6e4e1cb2f3..481057201fbee 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts @@ -21,15 +21,13 @@ declare class C { parserComputedPropertyName29.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName29.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName29.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName29.ts(3,11): error TS2304: Cannot find name 'id'. parserComputedPropertyName29.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName29.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName29.ts(4,6): error TS2304: Cannot find name 'e2'. -parserComputedPropertyName29.ts(4,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. -==== parserComputedPropertyName29.ts (8 errors) ==== +==== parserComputedPropertyName29.ts (6 errors) ==== class C { // yes ASI [e] = id++ @@ -37,8 +35,6 @@ parserComputedPropertyName29.ts(4,6): error TS4031: Public property '[e2]' of ex !!! 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 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. ~~ !!! error TS2304: Cannot find name 'id'. ~~~~ @@ -49,6 +45,4 @@ parserComputedPropertyName29.ts(4,6): error TS4031: Public property '[e2]' of ex !!! 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 'e2'. - ~~ -!!! error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName31.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName31.d.ts index 53b06485443c9..189c3effcd298 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName31.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName31.d.ts @@ -21,13 +21,11 @@ declare class C { parserComputedPropertyName31.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName31.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName31.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName31.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName31.ts(4,6): error TS2304: Cannot find name 'e2'. -parserComputedPropertyName31.ts(4,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. -==== parserComputedPropertyName31.ts (6 errors) ==== +==== parserComputedPropertyName31.ts (4 errors) ==== class C { // yes ASI [e]: number @@ -35,13 +33,9 @@ parserComputedPropertyName31.ts(4,6): error TS4031: Public property '[e2]' of ex !!! 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 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. [e2]: number ~~~~ !!! 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 'e2'. - ~~ -!!! error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName32.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName32.d.ts index 22c4a60361d7d..2ad7e3177e4e3 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName32.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName32.d.ts @@ -18,16 +18,13 @@ declare class C { parserComputedPropertyName32.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. parserComputedPropertyName32.ts(2,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName32.ts(2,6): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. -==== parserComputedPropertyName32.ts (3 errors) ==== +==== parserComputedPropertyName32.ts (2 errors) ==== declare class C { [e](): number ~~~ !!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts index 20cc5df6e9f93..d641f0d03008f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts @@ -19,21 +19,18 @@ declare class C { /// [Errors] //// parserComputedPropertyName33.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName33.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName33.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName33.ts(4,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName33.ts(4,12): error TS1005: ';' expected. parserComputedPropertyName33.ts(5,1): error TS1128: Declaration or statement expected. -==== parserComputedPropertyName33.ts (6 errors) ==== +==== parserComputedPropertyName33.ts (5 errors) ==== class C { // No ASI [e] = 0 ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. ~ [e2]() { } ~~~~~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName36.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName36.d.ts index 99abfcb83e72e..8198a691bc0ba 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName36.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName36.d.ts @@ -19,10 +19,9 @@ declare class C { parserComputedPropertyName36.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName36.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. parserComputedPropertyName36.ts(2,6): error TS2304: Cannot find name 'public'. -parserComputedPropertyName36.ts(2,6): error TS4031: Public property '[public ]' of exported class has or is using private name 'public'. -==== parserComputedPropertyName36.ts (4 errors) ==== +==== parserComputedPropertyName36.ts (3 errors) ==== class C { [public ]: string; ~~~~~~~~~ @@ -31,6 +30,4 @@ parserComputedPropertyName36.ts(2,6): error TS4031: Public property '[public ]' !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. ~~~~~~ !!! error TS2304: Cannot find name 'public'. - ~~~~~~ -!!! error TS4031: Public property '[public ]' of exported class has or is using private name 'public'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName38.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName38.d.ts index 1833bb4a85f99..e13287d24cb20 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName38.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName38.d.ts @@ -19,10 +19,9 @@ declare class C { parserComputedPropertyName38.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations parserComputedPropertyName38.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. parserComputedPropertyName38.ts(2,6): error TS2304: Cannot find name 'public'. -parserComputedPropertyName38.ts(2,6): error TS4100: Public method '[public]' of exported class has or is using private name 'public'. -==== parserComputedPropertyName38.ts (4 errors) ==== +==== parserComputedPropertyName38.ts (3 errors) ==== class C { [public]() { } ~~~~~~~~ @@ -32,6 +31,4 @@ parserComputedPropertyName38.ts(2,6): error TS4100: Public method '[public]' of !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. ~~~~~~ !!! error TS2304: Cannot find name 'public'. - ~~~~~~ -!!! error TS4100: Public method '[public]' of exported class has or is using private name 'public'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName39.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName39.d.ts index 9e7e1801fa487..bf44935d34134 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName39.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName39.d.ts @@ -20,10 +20,9 @@ declare class C { parserComputedPropertyName39.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations parserComputedPropertyName39.ts(3,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. parserComputedPropertyName39.ts(3,6): error TS2304: Cannot find name 'public'. -parserComputedPropertyName39.ts(3,6): error TS4100: Public method '[public]' of exported class has or is using private name 'public'. -==== parserComputedPropertyName39.ts (4 errors) ==== +==== parserComputedPropertyName39.ts (3 errors) ==== "use strict"; class C { [public]() { } @@ -34,6 +33,4 @@ parserComputedPropertyName39.ts(3,6): error TS4100: Public method '[public]' of !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. ~~~~~~ !!! error TS2304: Cannot find name 'public'. - ~~~~~~ -!!! error TS4100: Public method '[public]' of exported class has or is using private name 'public'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName7.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName7.d.ts index 23f8cf6d7957a..89e2ec14a5082 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName7.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName7.d.ts @@ -19,10 +19,9 @@ declare class C { parserComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. -parserComputedPropertyName7.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -==== parserComputedPropertyName7.ts (4 errors) ==== +==== parserComputedPropertyName7.ts (3 errors) ==== class C { [e] ~~~ @@ -32,6 +31,4 @@ parserComputedPropertyName7.ts(2,5): error TS4031: Public property '[e]' of expo !!! related TS9029 parserComputedPropertyName7.ts:2:4: Add a type annotation to the property [e] ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName8.d.ts index 7dfbdeb02492b..6e339bc1f2c65 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName8.d.ts @@ -19,10 +19,9 @@ declare class C { parserComputedPropertyName8.ts(2,11): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName8.ts(2,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName8.ts(2,12): error TS2304: Cannot find name 'e'. -parserComputedPropertyName8.ts(2,12): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -==== parserComputedPropertyName8.ts (4 errors) ==== +==== parserComputedPropertyName8.ts (3 errors) ==== class C { public [e] ~~~ @@ -32,6 +31,4 @@ parserComputedPropertyName8.ts(2,12): error TS4031: Public property '[e]' of exp !!! related TS9029 parserComputedPropertyName8.ts:2:11: Add a type annotation to the property [e] ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName9.d.ts index 7f54587bf4b63..49a1126e29143 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName9.d.ts @@ -18,22 +18,16 @@ declare class C { parserComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. -parserComputedPropertyName9.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. -parserComputedPropertyName9.ts(2,9): error TS4031: Public property '[e]' of exported class has or is using private name 'Type'. -==== parserComputedPropertyName9.ts (5 errors) ==== +==== parserComputedPropertyName9.ts (3 errors) ==== class C { [e]: Type ~~~ !!! 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 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. ~~~~ !!! error TS2304: Cannot find name 'Type'. - ~~~~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'Type'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName1.d.ts index e5acc3369844b..6dce6ac33512b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName1.d.ts @@ -18,16 +18,13 @@ declare class C { parserES5ComputedPropertyName1.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserES5ComputedPropertyName1.ts(2,6): error TS2304: Cannot find name 'e'. -parserES5ComputedPropertyName1.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -==== parserES5ComputedPropertyName1.ts (3 errors) ==== +==== parserES5ComputedPropertyName1.ts (2 errors) ==== declare class C { [e]: number ~~~ !!! 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 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName10.d.ts index 80436820d5f08..cc6a96aa72c8c 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName10.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName10.d.ts @@ -18,16 +18,13 @@ declare class C { parserES5ComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserES5ComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. -parserES5ComputedPropertyName10.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -==== parserES5ComputedPropertyName10.ts (3 errors) ==== +==== parserES5ComputedPropertyName10.ts (2 errors) ==== class C { [e] = 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 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName11.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName11.d.ts index fd9a7905fe969..4950f8be22a65 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName11.d.ts @@ -19,10 +19,9 @@ declare class C { parserES5ComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. parserES5ComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations parserES5ComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. -parserES5ComputedPropertyName11.ts(2,5): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. -==== parserES5ComputedPropertyName11.ts (4 errors) ==== +==== parserES5ComputedPropertyName11.ts (3 errors) ==== class C { [e](); ~~~ @@ -32,6 +31,4 @@ parserES5ComputedPropertyName11.ts(2,5): error TS4100: Public method '[e]' of ex !!! related TS9034 parserES5ComputedPropertyName11.ts:2:4: Add a return type to the method ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName7.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName7.d.ts index 4af8dc6385dc8..69fb15e962dfd 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName7.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName7.d.ts @@ -19,10 +19,9 @@ declare class C { parserES5ComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserES5ComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserES5ComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. -parserES5ComputedPropertyName7.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -==== parserES5ComputedPropertyName7.ts (4 errors) ==== +==== parserES5ComputedPropertyName7.ts (3 errors) ==== class C { [e] ~~~ @@ -32,6 +31,4 @@ parserES5ComputedPropertyName7.ts(2,5): error TS4031: Public property '[e]' of e !!! related TS9029 parserES5ComputedPropertyName7.ts:2:4: Add a type annotation to the property [e] ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName9.d.ts index bdd6e47bfb384..ca7aa76034e00 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName9.d.ts @@ -18,22 +18,16 @@ declare class C { parserES5ComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserES5ComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. -parserES5ComputedPropertyName9.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserES5ComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. -parserES5ComputedPropertyName9.ts(2,9): error TS4031: Public property '[e]' of exported class has or is using private name 'Type'. -==== parserES5ComputedPropertyName9.ts (5 errors) ==== +==== parserES5ComputedPropertyName9.ts (3 errors) ==== class C { [e]: Type ~~~ !!! 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 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. ~~~~ !!! error TS2304: Cannot find name 'Type'. - ~~~~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'Type'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty3.d.ts index 9269dc869480d..05e2383f6c3bf 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty3.d.ts @@ -18,16 +18,13 @@ declare class C { parserES5SymbolProperty3.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. parserES5SymbolProperty3.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -parserES5SymbolProperty3.ts(2,6): error TS4100: Public method '[Symbol.unscopables]' of exported class has or is using private name 'Symbol'. -==== parserES5SymbolProperty3.ts (3 errors) ==== +==== parserES5SymbolProperty3.ts (2 errors) ==== declare class C { [Symbol.unscopables](): string; ~~~~~~~~~~~~~~~~~~~~ !!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ -!!! error TS4100: Public method '[Symbol.unscopables]' of exported class has or is using private name 'Symbol'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts index 2d96420f38230..5c36c2c1d12da 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts @@ -18,16 +18,13 @@ declare class C { parserES5SymbolProperty4.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserES5SymbolProperty4.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -parserES5SymbolProperty4.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. -==== parserES5SymbolProperty4.ts (3 errors) ==== +==== parserES5SymbolProperty4.ts (2 errors) ==== declare class C { [Symbol.isRegExp]: string; ~~~~~~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ -!!! error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty5.d.ts index 1464fdba02c9d..f3898afdf755b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty5.d.ts @@ -18,16 +18,13 @@ declare class C { parserES5SymbolProperty5.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserES5SymbolProperty5.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -parserES5SymbolProperty5.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. -==== parserES5SymbolProperty5.ts (3 errors) ==== +==== parserES5SymbolProperty5.ts (2 errors) ==== class C { [Symbol.isRegExp]: string; ~~~~~~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ -!!! error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty6.d.ts index ddf3315126ea9..680075a704fc1 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty6.d.ts @@ -18,16 +18,13 @@ declare class C { parserES5SymbolProperty6.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -parserES5SymbolProperty6.ts(2,6): error TS4031: Public property '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. -==== parserES5SymbolProperty6.ts (3 errors) ==== +==== parserES5SymbolProperty6.ts (2 errors) ==== class C { [Symbol.toStringTag]: string = ""; ~~~~~~~~~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ -!!! error TS4031: Public property '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty7.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty7.d.ts index 513a9d1a7f4be..6078a9a0eba3e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty7.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty7.d.ts @@ -17,14 +17,11 @@ declare class C { /// [Errors] //// parserES5SymbolProperty7.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -parserES5SymbolProperty7.ts(2,6): error TS4100: Public method '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. -==== parserES5SymbolProperty7.ts (2 errors) ==== +==== parserES5SymbolProperty7.ts (1 errors) ==== class C { [Symbol.toStringTag](): void { } ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ -!!! error TS4100: Public method '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5For-ofTypeCheck10.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5For-ofTypeCheck10.d.ts index fdeb566e70766..67e29b37c9f41 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5For-ofTypeCheck10.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5For-ofTypeCheck10.d.ts @@ -23,20 +23,16 @@ for (var v of new StringIterator) { } //// [ES5For-ofTypeCheck10.d.ts] declare class StringIterator { next(): invalid; - [Symbol.iterator](): invalid; } /// [Errors] //// ES5For-ofTypeCheck10.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -ES5For-ofTypeCheck10.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -ES5For-ofTypeCheck10.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ES5For-ofTypeCheck10.ts(9,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -ES5For-ofTypeCheck10.ts(9,6): error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an array type or a string type. -==== ES5For-ofTypeCheck10.ts (6 errors) ==== +==== ES5For-ofTypeCheck10.ts (3 errors) ==== // In ES3/5, you cannot for...of over an arbitrary iterable. class StringIterator { next() { @@ -49,15 +45,8 @@ ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an ar }; } [Symbol.iterator]() { - ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 ES5For-ofTypeCheck10.ts:9:5: Add a return type to the method - ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ -!!! error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. return this; } } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty2.d.ts index c3ccec9c06038..83abff8ae47e8 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty2.d.ts @@ -18,30 +18,23 @@ module M { //// [ES5SymbolProperty2.d.ts] declare namespace M { - var Symbol: any; - export class C { - [Symbol.iterator](): invalid; + class C { } - export {}; } /// [Errors] //// -ES5SymbolProperty2.ts(5,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ES5SymbolProperty2.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ES5SymbolProperty2.ts(10,11): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -==== ES5SymbolProperty2.ts (3 errors) ==== +==== ES5SymbolProperty2.ts (2 errors) ==== module M { var Symbol: any; export class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 ES5SymbolProperty2.ts:5:9: Add a return type to the method - ~~~~~~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } (new C)[Symbol.iterator]; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty3.d.ts index 7ebe95faf820a..b112dbaabf8d2 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty3.d.ts @@ -16,24 +16,19 @@ class C { //// [ES5SymbolProperty3.d.ts] declare var Symbol: any; declare class C { - [Symbol.iterator](): invalid; } /// [Errors] //// -ES5SymbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ES5SymbolProperty3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== ES5SymbolProperty3.ts (2 errors) ==== +==== ES5SymbolProperty3.ts (1 errors) ==== var Symbol: any; class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 ES5SymbolProperty3.ts:4:5: Add a return type to the method - ~~~~~~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty4.d.ts index a34657fac35e9..ba4cead4a7d90 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty4.d.ts @@ -18,24 +18,19 @@ declare var Symbol: { iterator: string; }; declare class C { - [Symbol.iterator](): invalid; } /// [Errors] //// -ES5SymbolProperty4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ES5SymbolProperty4.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== ES5SymbolProperty4.ts (2 errors) ==== +==== ES5SymbolProperty4.ts (1 errors) ==== var Symbol: { iterator: string }; class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 ES5SymbolProperty4.ts:4:5: Add a return type to the method - ~~~~~~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty5.d.ts index 17127e53075fc..bb657a4b225b0 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty5.d.ts @@ -18,24 +18,19 @@ declare var Symbol: { iterator: symbol; }; declare class C { - [Symbol.iterator](): invalid; } /// [Errors] //// -ES5SymbolProperty5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ES5SymbolProperty5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== ES5SymbolProperty5.ts (2 errors) ==== +==== ES5SymbolProperty5.ts (1 errors) ==== var Symbol: { iterator: symbol }; class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 ES5SymbolProperty5.ts:4:5: Add a return type to the method - ~~~~~~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty6.d.ts index 591e9c1657ca1..cb3f8d6f1b6b4 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty6.d.ts @@ -14,34 +14,23 @@ class C { //// [ES5SymbolProperty6.d.ts] declare class C { - [Symbol.iterator](): invalid; } /// [Errors] //// ES5SymbolProperty6.ts(1,1): error TS2304: Cannot find name 'u'. -ES5SymbolProperty6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -ES5SymbolProperty6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ES5SymbolProperty6.ts(3,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -ES5SymbolProperty6.ts(3,6): error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. ES5SymbolProperty6.ts(6,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -==== ES5SymbolProperty6.ts (6 errors) ==== +==== ES5SymbolProperty6.ts (3 errors) ==== u//@target: ES5 ~ !!! error TS2304: Cannot find name 'u'. class C { [Symbol.iterator]() { } - ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 ES5SymbolProperty6.ts:3:5: Add a return type to the method - ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ -!!! error TS4100: Public method '[Symbol.iterator]' of exported class has or is using private name 'Symbol'. } (new C)[Symbol.iterator] diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty7.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty7.d.ts index 30d13310d5b3a..78bc2c8ddf573 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty7.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty7.d.ts @@ -18,24 +18,19 @@ declare var Symbol: { iterator: any; }; declare class C { - [Symbol.iterator](): invalid; } /// [Errors] //// -ES5SymbolProperty7.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ES5SymbolProperty7.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== ES5SymbolProperty7.ts (2 errors) ==== +==== ES5SymbolProperty7.ts (1 errors) ==== var Symbol: { iterator: any }; class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 ES5SymbolProperty7.ts:4:5: Add a return type to the method - ~~~~~~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/MemberFunctionDeclaration3_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/MemberFunctionDeclaration3_es6.d.ts index 215276a21a289..2561b593666dd 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/MemberFunctionDeclaration3_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/MemberFunctionDeclaration3_es6.d.ts @@ -11,27 +11,16 @@ class C { //// [MemberFunctionDeclaration3_es6.d.ts] declare class C { - [foo](): invalid; } /// [Errors] //// -MemberFunctionDeclaration3_es6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -MemberFunctionDeclaration3_es6.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations MemberFunctionDeclaration3_es6.ts(2,6): error TS2304: Cannot find name 'foo'. -MemberFunctionDeclaration3_es6.ts(2,6): error TS4100: Public method '[foo]' of exported class has or is using private name 'foo'. -==== MemberFunctionDeclaration3_es6.ts (4 errors) ==== +==== MemberFunctionDeclaration3_es6.ts (1 errors) ==== class C { *[foo]() { } - ~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 MemberFunctionDeclaration3_es6.ts:2:5: Add a return type to the method - ~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~ !!! error TS2304: Cannot find name 'foo'. - ~~~ -!!! error TS4100: Public method '[foo]' of exported class has or is using private name 'foo'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts index 3e7778c04bd79..05bba986c1b75 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts @@ -27,11 +27,8 @@ declare var s: string; declare var n: number; declare var a: any; declare class C { - [s]: number; - [n]: invalid; static [""]: number; [0]: number; - [a]: number; [`hello bye`]: number; } @@ -41,7 +38,6 @@ computedPropertyNames12_ES5.ts(5,5): error TS1166: A computed property name in a computedPropertyNames12_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames12_ES5.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames12_ES5.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations computedPropertyNames12_ES5.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -51,7 +47,7 @@ computedPropertyNames12_ES5.ts(13,12): error TS1166: A computed property name in computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -==== computedPropertyNames12_ES5.ts (12 errors) ==== +==== computedPropertyNames12_ES5.ts (11 errors) ==== var s: string; var n: number; var a: any; @@ -66,9 +62,6 @@ computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -!!! related TS9029 computedPropertyNames12_ES5.ts:6:5: Add a type annotation to the property [n] static [s + s]: string; ~~~~~~~ !!! 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/tsc/computedPropertyNames12_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts index 4f3b36fc6edb1..caa83582fdbca 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts @@ -27,11 +27,8 @@ declare var s: string; declare var n: number; declare var a: any; declare class C { - [s]: number; - [n]: invalid; static [""]: number; [0]: number; - [a]: number; [`hello bye`]: number; } @@ -41,7 +38,6 @@ computedPropertyNames12_ES6.ts(5,5): error TS1166: A computed property name in a computedPropertyNames12_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames12_ES6.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames12_ES6.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations computedPropertyNames12_ES6.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -51,7 +47,7 @@ computedPropertyNames12_ES6.ts(13,12): error TS1166: A computed property name in computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -==== computedPropertyNames12_ES6.ts (12 errors) ==== +==== computedPropertyNames12_ES6.ts (11 errors) ==== var s: string; var n: number; var a: any; @@ -66,9 +62,6 @@ computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - ~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -!!! related TS9029 computedPropertyNames12_ES6.ts:6:5: Add a type annotation to the property [n] static [s + s]: string; ~~~~~~~ !!! 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/tsc/computedPropertyNames13_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES5.d.ts index 28e4393ed807f..d0c7659f1be1c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES5.d.ts @@ -27,43 +27,31 @@ declare var s: string; declare var n: number; declare var a: any; declare class C { - [s](): invalid; - [n](): invalid; static [""](): invalid; [0](): invalid; - [a](): invalid; [`hello bye`](): invalid; } /// [Errors] //// -computedPropertyNames13_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames13_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames13_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames13_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames13_ES5.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames13_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames13_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames13_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -==== computedPropertyNames13_ES5.ts (9 errors) ==== +==== computedPropertyNames13_ES5.ts (6 errors) ==== var s: string; var n: number; var a: any; class C { [s]() {} ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNames13_ES5.ts:5:5: Add a return type to the method - ~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [n]() { } ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNames13_ES5.ts:6:5: Add a return type to the method - ~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static [s + s]() { } [s + n]() { } @@ -78,9 +66,6 @@ computedPropertyNames13_ES5.ts(14,5): error TS9008: Method must have an explicit !!! related TS9034 computedPropertyNames13_ES5.ts:11:5: Add a return type to the method [a]() { } ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNames13_ES5.ts:12:5: Add a return type to the method - ~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static [true]() { } [`hello bye`]() { } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES6.d.ts index 6e574ac6da49a..df7cfb818dffc 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES6.d.ts @@ -27,43 +27,31 @@ declare var s: string; declare var n: number; declare var a: any; declare class C { - [s](): invalid; - [n](): invalid; static [""](): invalid; [0](): invalid; - [a](): invalid; [`hello bye`](): invalid; } /// [Errors] //// -computedPropertyNames13_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames13_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames13_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames13_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames13_ES6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames13_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames13_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames13_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -==== computedPropertyNames13_ES6.ts (9 errors) ==== +==== computedPropertyNames13_ES6.ts (6 errors) ==== var s: string; var n: number; var a: any; class C { [s]() {} ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNames13_ES6.ts:5:5: Add a return type to the method - ~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [n]() { } ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNames13_ES6.ts:6:5: Add a return type to the method - ~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static [s + s]() { } [s + n]() { } @@ -78,9 +66,6 @@ computedPropertyNames13_ES6.ts(14,5): error TS9008: Method must have an explicit !!! related TS9034 computedPropertyNames13_ES6.ts:11:5: Add a return type to the method [a]() { } ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNames13_ES6.ts:12:5: Add a return type to the method - ~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static [true]() { } [`hello bye`]() { } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES5.d.ts index 1ea25be13cb0a..d8464353ecda4 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES5.d.ts @@ -18,34 +18,27 @@ class C { //// [computedPropertyNames14_ES5.d.ts] declare var b: boolean; declare class C { - [b](): invalid; - [undefined](): invalid; } /// [Errors] //// computedPropertyNames14_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES5.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames14_ES5.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames14_ES5.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES5.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames14_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames14_ES5.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -==== computedPropertyNames14_ES5.ts (10 errors) ==== +==== computedPropertyNames14_ES5.ts (8 errors) ==== var b: boolean; class C { [b]() {} ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNames14_ES5.ts:3:5: Add a return type to the method - ~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static [true]() { } ~~~~~~ @@ -60,9 +53,6 @@ computedPropertyNames14_ES5.ts(8,12): error TS2464: A computed property name mus ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNames14_ES5.ts:7:5: Add a return type to the method - ~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static [null]() { } ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES6.d.ts index ada608f7fd88d..f1e3f95e2141e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES6.d.ts @@ -18,34 +18,27 @@ class C { //// [computedPropertyNames14_ES6.d.ts] declare var b: boolean; declare class C { - [b](): invalid; - [undefined](): invalid; } /// [Errors] //// computedPropertyNames14_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames14_ES6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames14_ES6.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES6.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames14_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames14_ES6.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -==== computedPropertyNames14_ES6.ts (10 errors) ==== +==== computedPropertyNames14_ES6.ts (8 errors) ==== var b: boolean; class C { [b]() {} ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNames14_ES6.ts:3:5: Add a return type to the method - ~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static [true]() { } ~~~~~~ @@ -60,9 +53,6 @@ computedPropertyNames14_ES6.ts(8,12): error TS2464: A computed property name mus ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNames14_ES6.ts:7:5: Add a return type to the method - ~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static [null]() { } ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES5.d.ts index 34f81f50bccea..9208e9e34fea2 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES5.d.ts @@ -19,48 +19,33 @@ declare var p1: number | string; declare var p2: number | number[]; declare var p3: string | boolean; declare class C { - [p1](): invalid; - [p2](): invalid; - [p3](): invalid; } /// [Errors] //// -computedPropertyNames15_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames15_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames15_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames15_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames15_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames15_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames15_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames15_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== computedPropertyNames15_ES5.ts (8 errors) ==== +==== computedPropertyNames15_ES5.ts (5 errors) ==== var p1: number | string; var p2: number | number[]; var p3: string | boolean; class C { [p1]() { } ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNames15_ES5.ts:5:5: Add a return type to the method - ~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [p2]() { } ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNames15_ES5.ts:6:5: Add a return type to the method - ~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [p3]() { } ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNames15_ES5.ts:7:5: Add a return type to the method - ~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES6.d.ts index 0077e1712c6dd..60478221f1f4f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES6.d.ts @@ -19,48 +19,33 @@ declare var p1: number | string; declare var p2: number | number[]; declare var p3: string | boolean; declare class C { - [p1](): invalid; - [p2](): invalid; - [p3](): invalid; } /// [Errors] //// -computedPropertyNames15_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames15_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames15_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames15_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames15_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames15_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames15_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames15_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== computedPropertyNames15_ES6.ts (8 errors) ==== +==== computedPropertyNames15_ES6.ts (5 errors) ==== var p1: number | string; var p2: number | number[]; var p3: string | boolean; class C { [p1]() { } ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNames15_ES6.ts:5:5: Add a return type to the method - ~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [p2]() { } ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNames15_ES6.ts:6:5: Add a return type to the method - ~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [p3]() { } ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNames15_ES6.ts:7:5: Add a return type to the method - ~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts index 93ad39159aba4..f81bc63923f9d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts @@ -27,44 +27,32 @@ declare var s: string; declare var n: number; declare var a: any; declare class C { - get [s](): invalid; - set [n](v: invalid); static set [""](v: invalid); get [0](): invalid; - set [a](v: invalid); set [`hello bye`](v: invalid); } /// [Errors] //// -computedPropertyNames16_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames16_ES5.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames16_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames16_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames16_ES5.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames16_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames16_ES5.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames16_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames16_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -==== computedPropertyNames16_ES5.ts (9 errors) ==== +==== computedPropertyNames16_ES5.ts (6 errors) ==== var s: string; var n: number; var a: any; class C { get [s]() { return 0;} ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames16_ES5.ts:5:9: Add a return type to the get accessor declaration - ~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations set [n](v) { } ~~~ !!! 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 TS9033 computedPropertyNames16_ES5.ts:6:9: Add a type to parameter of the set accessor declaration static get [s + s]() { return 0; } set [s + n](v) { } get [+s]() { return 0; } @@ -79,9 +67,6 @@ computedPropertyNames16_ES5.ts(14,23): error TS9009: At least one accessor must set [a](v) { } ~~~ !!! 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 TS9033 computedPropertyNames16_ES5.ts:12:9: Add a type to parameter of the set accessor declaration static get [true]() { return 0; } set [`hello bye`](v) { } ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts index 76bfbdcdbaccb..ae512163f495d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts @@ -27,44 +27,32 @@ declare var s: string; declare var n: number; declare var a: any; declare class C { - get [s](): invalid; - set [n](v: invalid); static set [""](v: invalid); get [0](): invalid; - set [a](v: invalid); set [`hello bye`](v: invalid); } /// [Errors] //// -computedPropertyNames16_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames16_ES6.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames16_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames16_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames16_ES6.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames16_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames16_ES6.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames16_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames16_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -==== computedPropertyNames16_ES6.ts (9 errors) ==== +==== computedPropertyNames16_ES6.ts (6 errors) ==== var s: string; var n: number; var a: any; class C { get [s]() { return 0;} ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames16_ES6.ts:5:9: Add a return type to the get accessor declaration - ~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations set [n](v) { } ~~~ !!! 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 TS9033 computedPropertyNames16_ES6.ts:6:9: Add a type to parameter of the set accessor declaration static get [s + s]() { return 0; } set [s + n](v) { } get [+s]() { return 0; } @@ -79,9 +67,6 @@ computedPropertyNames16_ES6.ts(14,23): error TS9009: At least one accessor must set [a](v) { } ~~~ !!! 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 TS9033 computedPropertyNames16_ES6.ts:12:9: Add a type to parameter of the set accessor declaration static get [true]() { return 0; } set [`hello bye`](v) { } ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES5.d.ts index 78a3aadf6266b..5395e81f8f731 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES5.d.ts @@ -18,34 +18,27 @@ class C { //// [computedPropertyNames17_ES5.d.ts] declare var b: boolean; declare class C { - get [b](): invalid; - static get [undefined](): invalid; } /// [Errors] //// computedPropertyNames17_ES5.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES5.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames17_ES5.ts(3,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames17_ES5.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES5.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES5.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES5.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES5.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames17_ES5.ts(7,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames17_ES5.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -==== computedPropertyNames17_ES5.ts (10 errors) ==== +==== computedPropertyNames17_ES5.ts (8 errors) ==== var b: boolean; class C { get [b]() { return 0;} ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames17_ES5.ts:3:9: Add a return type to the get accessor declaration - ~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static set [true](v) { } ~~~~~~ @@ -60,9 +53,6 @@ computedPropertyNames17_ES5.ts(8,9): error TS2464: A computed property name must ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames17_ES5.ts:7:16: Add a return type to the get accessor declaration - ~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations set [null](v) { } ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES6.d.ts index 941baee991217..975bd0f67dade 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES6.d.ts @@ -18,34 +18,27 @@ class C { //// [computedPropertyNames17_ES6.d.ts] declare var b: boolean; declare class C { - get [b](): invalid; - static get [undefined](): invalid; } /// [Errors] //// computedPropertyNames17_ES6.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES6.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames17_ES6.ts(3,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames17_ES6.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES6.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES6.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES6.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES6.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames17_ES6.ts(7,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames17_ES6.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -==== computedPropertyNames17_ES6.ts (10 errors) ==== +==== computedPropertyNames17_ES6.ts (8 errors) ==== var b: boolean; class C { get [b]() { return 0;} ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames17_ES6.ts:3:9: Add a return type to the get accessor declaration - ~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static set [true](v) { } ~~~~~~ @@ -60,9 +53,6 @@ computedPropertyNames17_ES6.ts(8,9): error TS2464: A computed property name must ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames17_ES6.ts:7:16: Add a return type to the get accessor declaration - ~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations set [null](v) { } ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts index 630d6c96420e6..4d414aa08c456 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts @@ -20,74 +20,44 @@ class C { declare var methodName: string; declare var accessorName: string; declare class C { - [methodName](): invalid; - static [methodName](): invalid; - get [accessorName](): invalid; - set [accessorName](v: invalid); - static get [accessorName](): invalid; - static set [accessorName](v: invalid); } /// [Errors] //// -computedPropertyNames2_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames2_ES5.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES5.ts(5,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames2_ES5.ts(6,9): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES5.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames2_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames2_ES5.ts(7,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES5.ts(8,16): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES5.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES5.ts(8,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames2_ES5.ts(9,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames2_ES5.ts(9,31): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -==== computedPropertyNames2_ES5.ts (14 errors) ==== +==== computedPropertyNames2_ES5.ts (8 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { [methodName]() { } ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNames2_ES5.ts:4:5: Add a return type to the method - ~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static [methodName]() { } ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNames2_ES5.ts:5:12: Add a return type to the method - ~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames2_ES5.ts:6:9: Add a return type to the get accessor declaration - ~~~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations set [accessorName](v) { } ~~~~~~~~~~~~~~ !!! 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 TS9033 computedPropertyNames2_ES5.ts:7:9: Add a type to parameter of the set accessor declaration static get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames2_ES5.ts:8:16: Add a return type to the get accessor declaration - ~~~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static set [accessorName](v) { } ~~~~~~~~~~~~~~ !!! 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 TS9033 computedPropertyNames2_ES5.ts:9:16: Add a type to parameter of the set accessor declaration } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts index 45714ef05a0bd..f5f8b0bf06038 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts @@ -20,74 +20,44 @@ class C { declare var methodName: string; declare var accessorName: string; declare class C { - [methodName](): invalid; - static [methodName](): invalid; - get [accessorName](): invalid; - set [accessorName](v: invalid); - static get [accessorName](): invalid; - static set [accessorName](v: invalid); } /// [Errors] //// -computedPropertyNames2_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES6.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames2_ES6.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES6.ts(5,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames2_ES6.ts(6,9): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES6.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames2_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames2_ES6.ts(7,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES6.ts(8,16): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES6.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations computedPropertyNames2_ES6.ts(8,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNames2_ES6.ts(9,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames2_ES6.ts(9,31): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -==== computedPropertyNames2_ES6.ts (14 errors) ==== +==== computedPropertyNames2_ES6.ts (8 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { [methodName]() { } ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNames2_ES6.ts:4:5: Add a return type to the method - ~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static [methodName]() { } ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNames2_ES6.ts:5:12: Add a return type to the method - ~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames2_ES6.ts:6:9: Add a return type to the get accessor declaration - ~~~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations set [accessorName](v) { } ~~~~~~~~~~~~~~ !!! 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 TS9033 computedPropertyNames2_ES6.ts:7:9: Add a type to parameter of the set accessor declaration static get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames2_ES6.ts:8:16: Add a return type to the get accessor declaration - ~~~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations static set [accessorName](v) { } ~~~~~~~~~~~~~~ !!! 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 TS9033 computedPropertyNames2_ES6.ts:9:16: Add a type to parameter of the set accessor declaration } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts index 95f66099bcdaf..efb5bf092af2b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts @@ -17,24 +17,18 @@ class C { declare var methodName: string; declare var accessorName: string; declare class C { - [methodName](v: string): invalid; - [methodName](): invalid; - [methodName](v?: string): invalid; } /// [Errors] //// computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== computedPropertyNamesOnOverloads_ES5.ts (8 errors) ==== +==== computedPropertyNamesOnOverloads_ES5.ts (5 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { @@ -42,22 +36,13 @@ computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9014: Computed properties ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:4:5: Add a return type to the method - ~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [methodName](); ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:5:5: Add a return type to the method - ~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [methodName](v?: string) { } ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:6:5: Add a return type to the method - ~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts index 399752a9d821f..f565ec873b5fa 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts @@ -17,24 +17,18 @@ class C { declare var methodName: string; declare var accessorName: string; declare class C { - [methodName](v: string): invalid; - [methodName](): invalid; - [methodName](v?: string): invalid; } /// [Errors] //// computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== computedPropertyNamesOnOverloads_ES6.ts (8 errors) ==== +==== computedPropertyNamesOnOverloads_ES6.ts (5 errors) ==== var methodName = "method"; var accessorName = "accessor"; class C { @@ -42,22 +36,13 @@ computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9014: Computed properties ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:4:5: Add a return type to the method - ~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [methodName](); ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:5:5: Add a return type to the method - ~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [methodName](v?: string) { } ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:6:5: Add a return type to the method - ~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts index 19e7ab3f05dbc..2d2a06ed7d455 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts @@ -211,9 +211,6 @@ declare class A { [Symbol.isConcatSpreadable]: any; ["property4"]: any; [Symbol.match]: any; - [fieldNameA]: any; - [fieldNameB]: any; - [fieldNameC]: any; } declare class C { ["property"]: any; @@ -224,9 +221,6 @@ declare class C { [Symbol.isConcatSpreadable]: any; ["property4"]: any; [Symbol.match]: any; - [fieldNameA]: any; - [fieldNameB]: any; - [fieldNameC]: any; } declare class E { ["property"]: any; @@ -237,9 +231,6 @@ declare class E { [Symbol.isConcatSpreadable]: any; ["property4"]: any; [Symbol.match]: any; - [fieldNameA]: any; - [fieldNameB]: any; - [fieldNameC]: any; } declare class G { ["property"]: any; @@ -250,9 +241,6 @@ declare class G { [Symbol.isConcatSpreadable]: any; ["property4"]: any; [Symbol.match]: any; - [fieldNameA]: any; - [fieldNameB]: any; - [fieldNameC]: any; } declare class I { ["property"]: any; @@ -263,9 +251,6 @@ declare class I { [Symbol.isConcatSpreadable]: any; ["property4"]: any; [Symbol.match]: any; - [fieldNameA]: any; - [fieldNameB]: any; - [fieldNameC]: any; } /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts index 098aec9e84703..ab4adbcc7fda2 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts @@ -26,7 +26,6 @@ interface I { [x: string]: any; } declare class C { - [x]: string; } declare class C2 { [x: string]: any; @@ -38,13 +37,11 @@ indexSignatureMustHaveTypeAnnotation.ts(3,5): error TS1169: A computed property indexSignatureMustHaveTypeAnnotation.ts(3,6): error TS2304: Cannot find name 'x'. indexSignatureMustHaveTypeAnnotation.ts(4,5): error TS1021: An index signature must have a type annotation. indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS2304: Cannot find name 'x'. -indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS4031: Public property '[x]' of exported class has or is using private name 'x'. indexSignatureMustHaveTypeAnnotation.ts(14,5): error TS1021: An index signature must have a type annotation. -==== indexSignatureMustHaveTypeAnnotation.ts (8 errors) ==== +==== indexSignatureMustHaveTypeAnnotation.ts (6 errors) ==== interface I { // Used to be indexer, now it is a computed property [x]: string; @@ -62,12 +59,8 @@ indexSignatureMustHaveTypeAnnotation.ts(14,5): error TS1021: An index signature [x]: string ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'x'. - ~ -!!! error TS4031: Public property '[x]' of exported class has or is using private name 'x'. } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts index 58bb11f4c8fe6..97a13bb8c2cd6 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts @@ -12,27 +12,20 @@ class C { //// [indexWithoutParamType2.d.ts] declare class C { - [x]: string; } /// [Errors] //// indexWithoutParamType2.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -indexWithoutParamType2.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations indexWithoutParamType2.ts(3,6): error TS2304: Cannot find name 'x'. -indexWithoutParamType2.ts(3,6): error TS4031: Public property '[x]' of exported class has or is using private name 'x'. -==== indexWithoutParamType2.ts (4 errors) ==== +==== indexWithoutParamType2.ts (2 errors) ==== class C { // Used to be indexer, now it is a computed property [x]: string ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'x'. - ~ -!!! error TS4031: Public property '[x]' of exported class has or is using private name 'x'. } \ 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 index b6f51afcd5507..2e8f116adedfd 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrorsClasses.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrorsClasses.d.ts @@ -35,6 +35,9 @@ const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; export class C { + // Should not be reported as an isolated declaration error + [missing] = 1; + [noAnnotationLiteralName](): void { } [noParamAnnotationLiteralName](v: string): void { } @@ -46,9 +49,15 @@ export class C { get [noAnnotationStringName]() { return 0;} set [noParamAnnotationStringName](value) { } + + [("A" + "B") as "AB"] = 1; + } - +export interface I { + [noAnnotationStringName]: 10; + [noAnnotationLiteralName](); +} /// [Declarations] //// @@ -72,17 +81,14 @@ export declare class Cls { 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 { [noAnnotationLiteralName](): void; [noParamAnnotationLiteralName](v: string): void; - [noAnnotationStringName](): invalid; - [noParamAnnotationStringName](v: invalid): void; - get [noAnnotationStringName](): invalid; - set [noParamAnnotationStringName](value: invalid); +} +export interface I { + [noAnnotationLiteralName](): any; } export {}; @@ -98,20 +104,21 @@ isolatedDeclarationErrorsClasses.ts(12,9): error TS7032: Property 'setOnly' impl 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(39,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -isolatedDeclarationErrorsClasses.ts(39,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -isolatedDeclarationErrorsClasses.ts(41,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -isolatedDeclarationErrorsClasses.ts(41,35): error TS7006: Parameter 'v' implicitly has an 'any' type. -isolatedDeclarationErrorsClasses.ts(41,35): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -isolatedDeclarationErrorsClasses.ts(43,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -isolatedDeclarationErrorsClasses.ts(43,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -isolatedDeclarationErrorsClasses.ts(45,9): error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. -isolatedDeclarationErrorsClasses.ts(45,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -isolatedDeclarationErrorsClasses.ts(45,39): error TS7006: Parameter 'value' implicitly has an 'any' type. -isolatedDeclarationErrorsClasses.ts(45,39): 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 (21 errors) ==== +==== isolatedDeclarationErrorsClasses.ts (22 errors) ==== export class Cls { field = 1 + 1; @@ -174,15 +181,19 @@ isolatedDeclarationErrorsClasses.ts(45,39): error TS9009: At least one accessor 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 TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 isolatedDeclarationErrorsClasses.ts:39:5: Add a return type to the method - ~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [noParamAnnotationStringName](v): void { } @@ -190,15 +201,9 @@ isolatedDeclarationErrorsClasses.ts(45,39): error TS9009: At least one accessor !!! 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. - ~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 isolatedDeclarationErrorsClasses.ts:41:35: Add a type annotation to the parameter v get [noAnnotationStringName]() { return 0;} ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 isolatedDeclarationErrorsClasses.ts:43:9: Add a return type to the get accessor declaration - ~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations set [noParamAnnotationStringName](value) { } @@ -208,9 +213,18 @@ isolatedDeclarationErrorsClasses.ts(45,39): error TS9009: At least one accessor !!! 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:45: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. + } - \ No newline at end of file + 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..951ea9a49bd93 --- /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/overloadsWithComputedNames.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts index adeacfe66e2a2..626a5823af521 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts @@ -82,7 +82,6 @@ declare const uniqueSym2: unique symbol; declare const sym: symbol; declare const strUnion: 'foo' | 'bar'; declare class C1 { - [sym](): void; [uniqueSym2](): void; [uniqueSym](): void; } @@ -92,12 +91,8 @@ interface I1 { [uniqueSym](): void; } declare class C2 { - [strUnion](): void; - [strUnion](): invalid; } declare class I2 { - [strUnion](): void; - [strUnion](): invalid; } declare class C3 { [1](): void; @@ -121,16 +116,14 @@ overloadsWithComputedNames.ts(29,5): error TS2391: Function implementation is mi overloadsWithComputedNames.ts(35,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. overloadsWithComputedNames.ts(42,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. overloadsWithComputedNames.ts(42,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -overloadsWithComputedNames.ts(43,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations overloadsWithComputedNames.ts(43,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations overloadsWithComputedNames.ts(47,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. overloadsWithComputedNames.ts(47,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -overloadsWithComputedNames.ts(48,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations overloadsWithComputedNames.ts(48,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is missing or not immediately following the declaration. -==== overloadsWithComputedNames.ts (17 errors) ==== +==== overloadsWithComputedNames.ts (15 errors) ==== // https://github.com/microsoft/TypeScript/issues/52329 class Person { ["B"](a: number): string; @@ -196,9 +189,6 @@ overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is mi !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [strUnion]() { } ~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 overloadsWithComputedNames.ts:43:5: Add a return type to the method - ~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } @@ -210,9 +200,6 @@ overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is mi !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [strUnion]() { } ~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 overloadsWithComputedNames.ts:48:5: Add a return type to the method - ~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts index a18d208fa802f..5c7a6688c7b83 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts @@ -11,26 +11,19 @@ class C { //// [parserComputedPropertyName10.d.ts] declare class C { - [e]: number; } /// [Errors] //// parserComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName10.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. -parserComputedPropertyName10.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -==== parserComputedPropertyName10.ts (4 errors) ==== +==== parserComputedPropertyName10.ts (2 errors) ==== class C { [e] = 1 ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName11.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName11.d.ts index fe2ae99504610..7560d526e665f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName11.d.ts @@ -11,30 +11,19 @@ class C { //// [parserComputedPropertyName11.d.ts] declare class C { - [e](): invalid; } /// [Errors] //// parserComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -parserComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -parserComputedPropertyName11.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. -parserComputedPropertyName11.ts(2,5): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. -==== parserComputedPropertyName11.ts (5 errors) ==== +==== parserComputedPropertyName11.ts (2 errors) ==== class C { [e](); ~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 parserComputedPropertyName11.ts:2:4: Add a return type to the method - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName12.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName12.d.ts index 753aa718da009..18f0c0f9afec8 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName12.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName12.d.ts @@ -11,27 +11,16 @@ class C { //// [parserComputedPropertyName12.d.ts] declare class C { - [e](): invalid; } /// [Errors] //// -parserComputedPropertyName12.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -parserComputedPropertyName12.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName12.ts(2,5): error TS2304: Cannot find name 'e'. -parserComputedPropertyName12.ts(2,5): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. -==== parserComputedPropertyName12.ts (4 errors) ==== +==== parserComputedPropertyName12.ts (1 errors) ==== class C { [e]() { } - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 parserComputedPropertyName12.ts:2:4: Add a return type to the method - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts index 75c465fca7a50..7a7737c08dd11 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts @@ -11,26 +11,19 @@ declare class C { //// [parserComputedPropertyName22.d.ts] declare class C { - [e]: number; } /// [Errors] //// parserComputedPropertyName22.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName22.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName22.ts(2,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName22.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -==== parserComputedPropertyName22.ts (4 errors) ==== +==== parserComputedPropertyName22.ts (2 errors) ==== declare class C { [e]: number ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts index ef6c9dfbe8581..58720270d110d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts @@ -11,23 +11,16 @@ declare class C { //// [parserComputedPropertyName23.d.ts] declare class C { - get [e](): number; } /// [Errors] //// -parserComputedPropertyName23.ts(2,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName23.ts(2,10): error TS2304: Cannot find name 'e'. -parserComputedPropertyName23.ts(2,10): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -==== parserComputedPropertyName23.ts (3 errors) ==== +==== parserComputedPropertyName23.ts (1 errors) ==== declare class C { get [e](): number - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts index 6a4ac7ea62f26..c1dfa2c3b0625 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts @@ -11,27 +11,16 @@ class C { //// [parserComputedPropertyName24.d.ts] declare class C { - set [e](v: invalid); } /// [Errors] //// -parserComputedPropertyName24.ts(2,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName24.ts(2,10): error TS2304: Cannot find name 'e'. -parserComputedPropertyName24.ts(2,10): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -parserComputedPropertyName24.ts(2,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -==== parserComputedPropertyName24.ts (4 errors) ==== +==== parserComputedPropertyName24.ts (1 errors) ==== class C { set [e](v) { } - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 parserComputedPropertyName24.ts:2:9: Add a type to parameter of the set accessor declaration } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts index 6f8cae2048f51..b03b681f819ab 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts @@ -13,36 +13,24 @@ class C { //// [parserComputedPropertyName25.d.ts] declare class C { - [e]: invalid; } /// [Errors] //// parserComputedPropertyName25.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName25.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName25.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName25.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -parserComputedPropertyName25.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. -==== parserComputedPropertyName25.ts (6 errors) ==== +==== parserComputedPropertyName25.ts (3 errors) ==== class C { // No ASI [e] = 0 ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. - ~ [e2] = 1 - ~~~~~~~~~~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -!!! related TS9029 parserComputedPropertyName25.ts:3:5: Add a type annotation to the property [e] ~~ !!! error TS2304: Cannot find name 'e2'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts index cea6c96151590..1fc76c329885b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts @@ -13,30 +13,23 @@ class C { //// [parserComputedPropertyName27.d.ts] declare class C { - [e]: number; number: invalid; } /// [Errors] //// -parserComputedPropertyName27.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName27.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName27.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName27.ts(4,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName27.ts(4,9): error TS1005: ';' expected. parserComputedPropertyName27.ts(4,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -==== parserComputedPropertyName27.ts (6 errors) ==== +==== parserComputedPropertyName27.ts (4 errors) ==== class C { // No ASI [e]: number = 0 - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. [e2]: number ~~ !!! error TS2304: Cannot find name 'e2'. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts index de736b5530a6d..d9b2874cc6a68 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts @@ -12,40 +12,26 @@ class C { //// [parserComputedPropertyName28.d.ts] declare class C { - [e]: number; - [e2]: number; } /// [Errors] //// parserComputedPropertyName28.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName28.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName28.ts(2,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName28.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName28.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName28.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName28.ts(3,6): error TS2304: Cannot find name 'e2'. -parserComputedPropertyName28.ts(3,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. -==== parserComputedPropertyName28.ts (8 errors) ==== +==== parserComputedPropertyName28.ts (4 errors) ==== class C { [e]: number = 0; ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. [e2]: number ~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~ !!! error TS2304: Cannot find name 'e2'. - ~~ -!!! error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts index 9ca712ea70048..0c03e3b5fcc0c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts @@ -13,48 +13,30 @@ class C { //// [parserComputedPropertyName29.d.ts] declare class C { - [e]: invalid; - [e2]: number; } /// [Errors] //// parserComputedPropertyName29.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName29.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName29.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName29.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName29.ts(3,11): error TS2304: Cannot find name 'id'. -parserComputedPropertyName29.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName29.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName29.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName29.ts(4,6): error TS2304: Cannot find name 'e2'. -parserComputedPropertyName29.ts(4,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. -==== parserComputedPropertyName29.ts (10 errors) ==== +==== parserComputedPropertyName29.ts (5 errors) ==== class C { // yes ASI [e] = id++ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. ~~ !!! error TS2304: Cannot find name 'id'. - ~~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -!!! related TS9029 parserComputedPropertyName29.ts:3:5: Add a type annotation to the property [e] [e2]: number ~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~ !!! error TS2304: Cannot find name 'e2'. - ~~ -!!! error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts index a25ae58040962..5cffe45891118 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts @@ -13,41 +13,27 @@ class C { //// [parserComputedPropertyName31.d.ts] declare class C { - [e]: number; - [e2]: number; } /// [Errors] //// parserComputedPropertyName31.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName31.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName31.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName31.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName31.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName31.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName31.ts(4,6): error TS2304: Cannot find name 'e2'. -parserComputedPropertyName31.ts(4,6): error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. -==== parserComputedPropertyName31.ts (8 errors) ==== +==== parserComputedPropertyName31.ts (4 errors) ==== class C { // yes ASI [e]: number ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. [e2]: number ~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~ !!! error TS2304: Cannot find name 'e2'. - ~~ -!!! error TS4031: Public property '[e2]' of exported class has or is using private name 'e2'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts index 52a65b724b88b..c6fd8d5ed9d44 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts @@ -11,26 +11,19 @@ declare class C { //// [parserComputedPropertyName32.d.ts] declare class C { - [e](): number; } /// [Errors] //// parserComputedPropertyName32.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. -parserComputedPropertyName32.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName32.ts(2,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName32.ts(2,6): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. -==== parserComputedPropertyName32.ts (4 errors) ==== +==== parserComputedPropertyName32.ts (2 errors) ==== declare class C { [e](): number ~~~ !!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts index d688bfda30fbb..225a53eadd08d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts @@ -13,35 +13,23 @@ class C { //// [parserComputedPropertyName33.d.ts] declare class C { - [e]: invalid; } /// [Errors] //// -parserComputedPropertyName33.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName33.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName33.ts(3,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -parserComputedPropertyName33.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations parserComputedPropertyName33.ts(4,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName33.ts(4,12): error TS1005: ';' expected. parserComputedPropertyName33.ts(5,1): error TS1128: Declaration or statement expected. -==== parserComputedPropertyName33.ts (7 errors) ==== +==== parserComputedPropertyName33.ts (4 errors) ==== class C { // No ASI [e] = 0 - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. - ~ [e2]() { } - ~~~~~~~~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -!!! related TS9029 parserComputedPropertyName33.ts:3:5: Add a type annotation to the property [e] ~~ !!! error TS2304: Cannot find name 'e2'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts index 2224f83270ed2..fefbe2031d0ea 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts @@ -11,29 +11,22 @@ class C { //// [parserComputedPropertyName36.d.ts] declare class C { - [public]: string; } /// [Errors] //// parserComputedPropertyName36.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName36.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName36.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. parserComputedPropertyName36.ts(2,6): error TS2304: Cannot find name 'public'. -parserComputedPropertyName36.ts(2,6): error TS4031: Public property '[public ]' of exported class has or is using private name 'public'. -==== parserComputedPropertyName36.ts (5 errors) ==== +==== parserComputedPropertyName36.ts (3 errors) ==== class C { [public ]: string; ~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. ~~~~~~ !!! error TS2304: Cannot find name 'public'. - ~~~~~~ -!!! error TS4031: Public property '[public ]' of exported class has or is using private name 'public'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName38.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName38.d.ts index 0966975024229..9ec08329abc86 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName38.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName38.d.ts @@ -11,30 +11,19 @@ class C { //// [parserComputedPropertyName38.d.ts] declare class C { - [public](): invalid; } /// [Errors] //// -parserComputedPropertyName38.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -parserComputedPropertyName38.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName38.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. parserComputedPropertyName38.ts(2,6): error TS2304: Cannot find name 'public'. -parserComputedPropertyName38.ts(2,6): error TS4100: Public method '[public]' of exported class has or is using private name 'public'. -==== parserComputedPropertyName38.ts (5 errors) ==== +==== parserComputedPropertyName38.ts (2 errors) ==== class C { [public]() { } - ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 parserComputedPropertyName38.ts:2:5: Add a return type to the method - ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. ~~~~~~ !!! error TS2304: Cannot find name 'public'. - ~~~~~~ -!!! error TS4100: Public method '[public]' of exported class has or is using private name 'public'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName39.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName39.d.ts index 08995a5d2f236..9cb8fda433a53 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName39.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName39.d.ts @@ -12,31 +12,20 @@ class C { //// [parserComputedPropertyName39.d.ts] declare class C { - [public](): invalid; } /// [Errors] //// -parserComputedPropertyName39.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -parserComputedPropertyName39.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName39.ts(3,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. parserComputedPropertyName39.ts(3,6): error TS2304: Cannot find name 'public'. -parserComputedPropertyName39.ts(3,6): error TS4100: Public method '[public]' of exported class has or is using private name 'public'. -==== parserComputedPropertyName39.ts (5 errors) ==== +==== parserComputedPropertyName39.ts (2 errors) ==== "use strict"; class C { [public]() { } - ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 parserComputedPropertyName39.ts:3:5: Add a return type to the method - ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. ~~~~~~ !!! error TS2304: Cannot find name 'public'. - ~~~~~~ -!!! error TS4100: Public method '[public]' of exported class has or is using private name 'public'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName7.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName7.d.ts index bc0d189c206f6..f851cf80bc24f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName7.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName7.d.ts @@ -11,30 +11,19 @@ class C { //// [parserComputedPropertyName7.d.ts] declare class C { - [e]: invalid; } /// [Errors] //// parserComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -parserComputedPropertyName7.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. -parserComputedPropertyName7.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -==== parserComputedPropertyName7.ts (5 errors) ==== +==== parserComputedPropertyName7.ts (2 errors) ==== class C { [e] ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -!!! related TS9029 parserComputedPropertyName7.ts:2:4: Add a type annotation to the property [e] - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName8.d.ts index 66751f358cc63..8334c285ef8c7 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName8.d.ts @@ -11,30 +11,19 @@ class C { //// [parserComputedPropertyName8.d.ts] declare class C { - [e]: invalid; } /// [Errors] //// parserComputedPropertyName8.ts(2,11): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName8.ts(2,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -parserComputedPropertyName8.ts(2,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName8.ts(2,12): error TS2304: Cannot find name 'e'. -parserComputedPropertyName8.ts(2,12): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -==== parserComputedPropertyName8.ts (5 errors) ==== +==== parserComputedPropertyName8.ts (2 errors) ==== class C { public [e] ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -!!! related TS9029 parserComputedPropertyName8.ts:2:11: Add a type annotation to the property [e] - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts index cffbfa9f7983b..8646752a83814 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts @@ -11,32 +11,22 @@ class C { //// [parserComputedPropertyName9.d.ts] declare class C { - [e]: Type; } /// [Errors] //// parserComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName9.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. -parserComputedPropertyName9.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. -parserComputedPropertyName9.ts(2,9): error TS4031: Public property '[e]' of exported class has or is using private name 'Type'. -==== parserComputedPropertyName9.ts (6 errors) ==== +==== parserComputedPropertyName9.ts (3 errors) ==== class C { [e]: Type ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. ~~~~ !!! error TS2304: Cannot find name 'Type'. - ~~~~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'Type'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts index 04e98e7059cb2..252cb26ef9c43 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts @@ -11,26 +11,19 @@ declare class C { //// [parserES5ComputedPropertyName1.d.ts] declare class C { - [e]: number; } /// [Errors] //// parserES5ComputedPropertyName1.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5ComputedPropertyName1.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5ComputedPropertyName1.ts(2,6): error TS2304: Cannot find name 'e'. -parserES5ComputedPropertyName1.ts(2,6): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -==== parserES5ComputedPropertyName1.ts (4 errors) ==== +==== parserES5ComputedPropertyName1.ts (2 errors) ==== declare class C { [e]: number ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts index 386bad8803116..50ccfc16574a4 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts @@ -11,26 +11,19 @@ class C { //// [parserES5ComputedPropertyName10.d.ts] declare class C { - [e]: number; } /// [Errors] //// parserES5ComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5ComputedPropertyName10.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5ComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. -parserES5ComputedPropertyName10.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -==== parserES5ComputedPropertyName10.ts (4 errors) ==== +==== parserES5ComputedPropertyName10.ts (2 errors) ==== class C { [e] = 1 ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName11.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName11.d.ts index 91d09cafe41d9..b3c5b9ce721c9 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName11.d.ts @@ -11,30 +11,19 @@ class C { //// [parserES5ComputedPropertyName11.d.ts] declare class C { - [e](): invalid; } /// [Errors] //// parserES5ComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -parserES5ComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -parserES5ComputedPropertyName11.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5ComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. -parserES5ComputedPropertyName11.ts(2,5): error TS4100: Public method '[e]' of exported class has or is using private name 'e'. -==== parserES5ComputedPropertyName11.ts (5 errors) ==== +==== parserES5ComputedPropertyName11.ts (2 errors) ==== class C { [e](); ~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 parserES5ComputedPropertyName11.ts:2:4: Add a return type to the method - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4100: Public method '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName7.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName7.d.ts index 58d266d133405..a60411aaf2a98 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName7.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName7.d.ts @@ -11,30 +11,19 @@ class C { //// [parserES5ComputedPropertyName7.d.ts] declare class C { - [e]: invalid; } /// [Errors] //// parserES5ComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5ComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -parserES5ComputedPropertyName7.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5ComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. -parserES5ComputedPropertyName7.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. -==== parserES5ComputedPropertyName7.ts (5 errors) ==== +==== parserES5ComputedPropertyName7.ts (2 errors) ==== class C { [e] ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -!!! related TS9029 parserES5ComputedPropertyName7.ts:2:4: Add a type annotation to the property [e] - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts index 414c805b5b8b5..2a34fe8740d4c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts @@ -11,32 +11,22 @@ class C { //// [parserES5ComputedPropertyName9.d.ts] declare class C { - [e]: Type; } /// [Errors] //// parserES5ComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5ComputedPropertyName9.ts(2,4): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5ComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. -parserES5ComputedPropertyName9.ts(2,5): error TS4031: Public property '[e]' of exported class has or is using private name 'e'. parserES5ComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. -parserES5ComputedPropertyName9.ts(2,9): error TS4031: Public property '[e]' of exported class has or is using private name 'Type'. -==== parserES5ComputedPropertyName9.ts (6 errors) ==== +==== parserES5ComputedPropertyName9.ts (3 errors) ==== class C { [e]: Type ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~ !!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'e'. ~~~~ !!! error TS2304: Cannot find name 'Type'. - ~~~~ -!!! error TS4031: Public property '[e]' of exported class has or is using private name 'Type'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts index eee413a72334e..a6117d0c32494 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts @@ -11,26 +11,19 @@ declare class C { //// [parserES5SymbolProperty3.d.ts] declare class C { - [Symbol.unscopables](): string; } /// [Errors] //// parserES5SymbolProperty3.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. -parserES5SymbolProperty3.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5SymbolProperty3.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -parserES5SymbolProperty3.ts(2,6): error TS4100: Public method '[Symbol.unscopables]' of exported class has or is using private name 'Symbol'. -==== parserES5SymbolProperty3.ts (4 errors) ==== +==== parserES5SymbolProperty3.ts (2 errors) ==== declare class C { [Symbol.unscopables](): string; ~~~~~~~~~~~~~~~~~~~~ !!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ -!!! error TS4100: Public method '[Symbol.unscopables]' of exported class has or is using private name 'Symbol'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts index 3b2984ec78719..145645c25187a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts @@ -11,26 +11,19 @@ declare class C { //// [parserES5SymbolProperty4.d.ts] declare class C { - [Symbol.isRegExp]: string; } /// [Errors] //// parserES5SymbolProperty4.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5SymbolProperty4.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5SymbolProperty4.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -parserES5SymbolProperty4.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. -==== parserES5SymbolProperty4.ts (4 errors) ==== +==== parserES5SymbolProperty4.ts (2 errors) ==== declare class C { [Symbol.isRegExp]: string; ~~~~~~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ -!!! error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts index 8da18a0e1d282..286d046657c47 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts @@ -11,26 +11,19 @@ class C { //// [parserES5SymbolProperty5.d.ts] declare class C { - [Symbol.isRegExp]: string; } /// [Errors] //// parserES5SymbolProperty5.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5SymbolProperty5.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5SymbolProperty5.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -parserES5SymbolProperty5.ts(2,6): error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. -==== parserES5SymbolProperty5.ts (4 errors) ==== +==== parserES5SymbolProperty5.ts (2 errors) ==== class C { [Symbol.isRegExp]: string; ~~~~~~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ -!!! error TS4031: Public property '[Symbol.isRegExp]' of exported class has or is using private name 'Symbol'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts index d7b3befe0d8b6..78baf79a72c65 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts @@ -11,26 +11,19 @@ class C { //// [parserES5SymbolProperty6.d.ts] declare class C { - [Symbol.toStringTag]: string; } /// [Errors] //// parserES5SymbolProperty6.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5SymbolProperty6.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -parserES5SymbolProperty6.ts(2,6): error TS4031: Public property '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. -==== parserES5SymbolProperty6.ts (4 errors) ==== +==== parserES5SymbolProperty6.ts (2 errors) ==== class C { [Symbol.toStringTag]: string = ""; ~~~~~~~~~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ -!!! error TS4031: Public property '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts index 8411511fdaf75..e08c63211052b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts @@ -11,23 +11,16 @@ class C { //// [parserES5SymbolProperty7.d.ts] declare class C { - [Symbol.toStringTag](): void; } /// [Errors] //// -parserES5SymbolProperty7.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations parserES5SymbolProperty7.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -parserES5SymbolProperty7.ts(2,6): error TS4100: Public method '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. -==== parserES5SymbolProperty7.ts (3 errors) ==== +==== parserES5SymbolProperty7.ts (1 errors) ==== class C { [Symbol.toStringTag](): void { } - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~ -!!! error TS4100: Public method '[Symbol.toStringTag]' of exported class has or is using private name 'Symbol'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts index dc7565f024fb0..023ea80f5fdd1 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts @@ -379,7 +379,6 @@ export declare class ExportedStaticLengthFn { [FunctionPropertyNames.length](): invalid; } export declare class ExportedStaticPrototype { - static [FunctionPropertyNames.prototype]: number; [FunctionPropertyNames.prototype]: string; } export declare class ExportedStaticPrototypeFn { @@ -467,7 +466,6 @@ staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explici staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. -staticPropertyNameConflicts.ts(284,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations staticPropertyNameConflicts.ts(289,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prototype'. staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. @@ -493,7 +491,7 @@ staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explic staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -==== staticPropertyNameConflicts.ts (85 errors) ==== +==== staticPropertyNameConflicts.ts (84 errors) ==== const FunctionPropertyNames = { name: 'name', length: 'length', @@ -904,8 +902,6 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici static [FunctionPropertyNames.prototype]: number; // always an error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [FunctionPropertyNames.prototype]: string; // ok } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts index 52a9272a2f86a..3b31360a14e0e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts @@ -379,7 +379,6 @@ export declare class ExportedStaticLengthFn { [FunctionPropertyNames.length](): invalid; } export declare class ExportedStaticPrototype { - static [FunctionPropertyNames.prototype]: number; [FunctionPropertyNames.prototype]: string; } export declare class ExportedStaticPrototypeFn { @@ -427,7 +426,6 @@ staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explici staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. -staticPropertyNameConflicts.ts(284,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations staticPropertyNameConflicts.ts(289,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prototype'. staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. @@ -445,7 +443,7 @@ staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explic staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -==== staticPropertyNameConflicts.ts (37 errors) ==== +==== staticPropertyNameConflicts.ts (36 errors) ==== const FunctionPropertyNames = { name: 'name', length: 'length', @@ -776,8 +774,6 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici static [FunctionPropertyNames.prototype]: number; // always an error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [FunctionPropertyNames.prototype]: string; // ok } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess1.d.ts index 757a5a2810a70..417b85f47b4d0 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess1.d.ts @@ -22,22 +22,18 @@ class Bar extends Foo { //// [superSymbolIndexedAccess1.d.ts] declare var symbol: invalid; declare class Foo { - [symbol](): invalid; } declare class Bar extends Foo { - [symbol](): invalid; } /// [Errors] //// superSymbolIndexedAccess1.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -superSymbolIndexedAccess1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations superSymbolIndexedAccess1.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -superSymbolIndexedAccess1.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations superSymbolIndexedAccess1.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== superSymbolIndexedAccess1.ts (5 errors) ==== +==== superSymbolIndexedAccess1.ts (3 errors) ==== var symbol = Symbol.for('myThing'); ~~~~~~~~~~~~~~~~~~~~~ !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations @@ -46,9 +42,6 @@ superSymbolIndexedAccess1.ts(10,5): error TS9014: Computed properties must be nu class Foo { [symbol]() { ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 superSymbolIndexedAccess1.ts:4:5: Add a return type to the method - ~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations return 0; } @@ -57,9 +50,6 @@ superSymbolIndexedAccess1.ts(10,5): error TS9014: Computed properties must be nu class Bar extends Foo { [symbol]() { ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 superSymbolIndexedAccess1.ts:10:5: Add a return type to the method - ~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations return super[symbol](); } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess3.d.ts index 999e98431665a..46f6c5eb0e911 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess3.d.ts @@ -22,23 +22,19 @@ class Bar extends Foo { //// [superSymbolIndexedAccess3.d.ts] declare var symbol: invalid; declare class Foo { - [symbol](): invalid; } declare class Bar extends Foo { - [symbol](): invalid; } /// [Errors] //// superSymbolIndexedAccess3.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -superSymbolIndexedAccess3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations superSymbolIndexedAccess3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -superSymbolIndexedAccess3.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations superSymbolIndexedAccess3.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations superSymbolIndexedAccess3.ts(11,22): error TS2538: Type 'typeof Bar' cannot be used as an index type. -==== superSymbolIndexedAccess3.ts (6 errors) ==== +==== superSymbolIndexedAccess3.ts (4 errors) ==== var symbol = Symbol.for('myThing'); ~~~~~~~~~~~~~~~~~~~~~ !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations @@ -47,9 +43,6 @@ superSymbolIndexedAccess3.ts(11,22): error TS2538: Type 'typeof Bar' cannot be u class Foo { [symbol]() { ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 superSymbolIndexedAccess3.ts:4:5: Add a return type to the method - ~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations return 0; } @@ -58,9 +51,6 @@ superSymbolIndexedAccess3.ts(11,22): error TS2538: Type 'typeof Bar' cannot be u class Bar extends Foo { [symbol]() { ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 superSymbolIndexedAccess3.ts:10:5: Add a return type to the method - ~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations return super[Bar](); ~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess4.d.ts index 3650b3bfd786b..ebd32fc4e0993 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess4.d.ts @@ -16,18 +16,16 @@ class Bar { //// [superSymbolIndexedAccess4.d.ts] declare var symbol: invalid; declare class Bar { - [symbol](): invalid; } /// [Errors] //// superSymbolIndexedAccess4.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -superSymbolIndexedAccess4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations superSymbolIndexedAccess4.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations superSymbolIndexedAccess4.ts(5,16): error TS2335: 'super' can only be referenced in a derived class. -==== superSymbolIndexedAccess4.ts (4 errors) ==== +==== superSymbolIndexedAccess4.ts (3 errors) ==== var symbol = Symbol.for('myThing'); ~~~~~~~~~~~~~~~~~~~~~ !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations @@ -36,9 +34,6 @@ superSymbolIndexedAccess4.ts(5,16): error TS2335: 'super' can only be referenced class Bar { [symbol]() { ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 superSymbolIndexedAccess4.ts:4:5: Add a return type to the method - ~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations return super[symbol](); ~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess5.d.ts index 79db076b0b430..1a1bb0b215e60 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess5.d.ts @@ -22,29 +22,22 @@ class Bar extends Foo { //// [superSymbolIndexedAccess5.d.ts] declare var symbol: any; declare class Foo { - [symbol](): invalid; } declare class Bar extends Foo { - [symbol](): invalid; } /// [Errors] //// -superSymbolIndexedAccess5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations superSymbolIndexedAccess5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -superSymbolIndexedAccess5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations superSymbolIndexedAccess5.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== superSymbolIndexedAccess5.ts (4 errors) ==== +==== superSymbolIndexedAccess5.ts (2 errors) ==== var symbol: any; class Foo { [symbol]() { ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 superSymbolIndexedAccess5.ts:4:5: Add a return type to the method - ~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations return 0; } @@ -53,9 +46,6 @@ superSymbolIndexedAccess5.ts(10,5): error TS9014: Computed properties must be nu class Bar extends Foo { [symbol]() { ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 superSymbolIndexedAccess5.ts:10:5: Add a return type to the method - ~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations return super[symbol](); } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess6.d.ts index 8bb980434fae6..6a971a54194e5 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess6.d.ts @@ -22,29 +22,22 @@ class Bar extends Foo { //// [superSymbolIndexedAccess6.d.ts] declare var symbol: any; declare class Foo { - static [symbol](): invalid; } declare class Bar extends Foo { - static [symbol](): invalid; } /// [Errors] //// -superSymbolIndexedAccess6.ts(4,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations superSymbolIndexedAccess6.ts(4,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -superSymbolIndexedAccess6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations superSymbolIndexedAccess6.ts(10,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -==== superSymbolIndexedAccess6.ts (4 errors) ==== +==== superSymbolIndexedAccess6.ts (2 errors) ==== var symbol: any; class Foo { static [symbol]() { ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 superSymbolIndexedAccess6.ts:4:12: Add a return type to the method - ~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations return 0; } @@ -53,9 +46,6 @@ superSymbolIndexedAccess6.ts(10,12): error TS9014: Computed properties must be n class Bar extends Foo { static [symbol]() { ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 superSymbolIndexedAccess6.ts:10:12: Add a return type to the method - ~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations return super[symbol](); } diff --git a/tests/baselines/reference/isolatedDeclarationErrorsClasses.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsClasses.errors.txt index 0824aaddcad02..528ebfb7f5d2b 100644 --- a/tests/baselines/reference/isolatedDeclarationErrorsClasses.errors.txt +++ b/tests/baselines/reference/isolatedDeclarationErrorsClasses.errors.txt @@ -8,20 +8,21 @@ isolatedDeclarationErrorsClasses.ts(12,9): error TS7032: Property 'setOnly' impl 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(39,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -isolatedDeclarationErrorsClasses.ts(39,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -isolatedDeclarationErrorsClasses.ts(41,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -isolatedDeclarationErrorsClasses.ts(41,35): error TS7006: Parameter 'v' implicitly has an 'any' type. -isolatedDeclarationErrorsClasses.ts(41,35): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -isolatedDeclarationErrorsClasses.ts(43,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -isolatedDeclarationErrorsClasses.ts(43,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -isolatedDeclarationErrorsClasses.ts(45,9): error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. -isolatedDeclarationErrorsClasses.ts(45,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -isolatedDeclarationErrorsClasses.ts(45,39): error TS7006: Parameter 'value' implicitly has an 'any' type. -isolatedDeclarationErrorsClasses.ts(45,39): 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 (21 errors) ==== +==== isolatedDeclarationErrorsClasses.ts (22 errors) ==== export class Cls { field = 1 + 1; @@ -84,15 +85,19 @@ isolatedDeclarationErrorsClasses.ts(45,39): error TS9009: At least one accessor 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 TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 isolatedDeclarationErrorsClasses.ts:39:5: Add a return type to the method - ~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations [noParamAnnotationStringName](v): void { } @@ -100,15 +105,9 @@ isolatedDeclarationErrorsClasses.ts(45,39): error TS9009: At least one accessor !!! 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. - ~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 isolatedDeclarationErrorsClasses.ts:41:35: Add a type annotation to the parameter v get [noAnnotationStringName]() { return 0;} ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 isolatedDeclarationErrorsClasses.ts:43:9: Add a return type to the get accessor declaration - ~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations set [noParamAnnotationStringName](value) { } @@ -118,9 +117,18 @@ isolatedDeclarationErrorsClasses.ts(45,39): error TS9009: At least one accessor !!! 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:45: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. + } - \ No newline at end of file + 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 index 70635239c0b41..ed0968f566093 100644 --- a/tests/baselines/reference/isolatedDeclarationErrorsClasses.js +++ b/tests/baselines/reference/isolatedDeclarationErrorsClasses.js @@ -35,6 +35,9 @@ const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; export class C { + // Should not be reported as an isolated declaration error + [missing] = 1; + [noAnnotationLiteralName](): void { } [noParamAnnotationLiteralName](v: string): void { } @@ -46,9 +49,15 @@ export class C { get [noAnnotationStringName]() { return 0;} set [noParamAnnotationStringName](value) { } + + [("A" + "B") as "AB"] = 1; + } - +export interface I { + [noAnnotationStringName]: 10; + [noAnnotationLiteralName](); +} //// [isolatedDeclarationErrorsClasses.js] export class Cls { @@ -73,10 +82,13 @@ 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 index ce3b4a523ae1f..b6c6ab48a20bf 100644 --- a/tests/baselines/reference/isolatedDeclarationErrorsClasses.symbols +++ b/tests/baselines/reference/isolatedDeclarationErrorsClasses.symbols @@ -72,32 +72,50 @@ const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; 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, 32, 16)) +>[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, 34, 41)) +>[noParamAnnotationLiteralName] : Symbol(C[noParamAnnotationLiteralName], Decl(isolatedDeclarationErrorsClasses.ts, 37, 41)) >noParamAnnotationLiteralName : Symbol(noParamAnnotationLiteralName, Decl(isolatedDeclarationErrorsClasses.ts, 30, 5)) ->v : Symbol(v, Decl(isolatedDeclarationErrorsClasses.ts, 36, 35)) +>v : Symbol(v, Decl(isolatedDeclarationErrorsClasses.ts, 39, 35)) [noAnnotationStringName]() { } ->[noAnnotationStringName] : Symbol(C[noAnnotationStringName], Decl(isolatedDeclarationErrorsClasses.ts, 36, 55)) +>[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, 38, 34)) +>[noParamAnnotationStringName] : Symbol(C[noParamAnnotationStringName], Decl(isolatedDeclarationErrorsClasses.ts, 41, 34)) >noParamAnnotationStringName : Symbol(noParamAnnotationStringName, Decl(isolatedDeclarationErrorsClasses.ts, 27, 3)) ->v : Symbol(v, Decl(isolatedDeclarationErrorsClasses.ts, 40, 34)) +>v : Symbol(v, Decl(isolatedDeclarationErrorsClasses.ts, 43, 34)) get [noAnnotationStringName]() { return 0;} ->[noAnnotationStringName] : Symbol(C[noAnnotationStringName], Decl(isolatedDeclarationErrorsClasses.ts, 40, 46)) +>[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, 42, 47)) +>[noParamAnnotationStringName] : Symbol(C[noParamAnnotationStringName], Decl(isolatedDeclarationErrorsClasses.ts, 45, 47)) >noParamAnnotationStringName : Symbol(noParamAnnotationStringName, Decl(isolatedDeclarationErrorsClasses.ts, 27, 3)) ->value : Symbol(value, Decl(isolatedDeclarationErrorsClasses.ts, 44, 38)) +>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 index 43a7383ac03a5..5c010607a2fdd 100644 --- a/tests/baselines/reference/isolatedDeclarationErrorsClasses.types +++ b/tests/baselines/reference/isolatedDeclarationErrorsClasses.types @@ -87,6 +87,12 @@ const 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" @@ -114,6 +120,24 @@ export class C { >[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/isolatedDeclarationErrorsObjects.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsObjects.errors.txt index fd3e14b6a9a71..55eb0cdc1ccbb 100644 --- a/tests/baselines/reference/isolatedDeclarationErrorsObjects.errors.txt +++ b/tests/baselines/reference/isolatedDeclarationErrorsObjects.errors.txt @@ -11,17 +11,19 @@ isolatedDeclarationErrorsObjects.ts(40,9): error TS7032: Property 'singleSetterB 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(63,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations isolatedDeclarationErrorsObjects.ts(64,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -isolatedDeclarationErrorsObjects.ts(71,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. -isolatedDeclarationErrorsObjects.ts(73,5): error TS9015: Objects that contain spread assignments can't be inferred with --isolatedDeclarations -isolatedDeclarationErrorsObjects.ts(75,5): error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations -isolatedDeclarationErrorsObjects.ts(79,14): error TS2451: Cannot redeclare block-scoped variable 'oWithSpread'. -isolatedDeclarationErrorsObjects.ts(82,9): error TS9015: Objects that contain spread assignments can't be inferred with --isolatedDeclarations -isolatedDeclarationErrorsObjects.ts(85,5): error TS9016: Objects that contain shorthand properties can't be inferred 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 (21 errors) ==== +==== isolatedDeclarationErrorsObjects.ts (23 errors) ==== export let o = { a: 1, b: "" @@ -125,6 +127,7 @@ isolatedDeclarationErrorsObjects.ts(85,5): error TS9016: Objects that contain sh function prop(v: T): T { return v } const s: unique symbol = Symbol(); + const str: string = ""; enum E { V = 10, } @@ -133,13 +136,17 @@ isolatedDeclarationErrorsObjects.ts(85,5): error TS9016: Objects that contain sh [1 + 3]: 1, ~~~~~~~ !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 isolatedDeclarationErrorsObjects.ts:61:14: Add a type annotation to the variable oWithComputedProperties +!!! 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:61:14: Add a type annotation to the variable oWithComputedProperties +!!! 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 }; @@ -151,12 +158,12 @@ isolatedDeclarationErrorsObjects.ts(85,5): error TS9016: Objects that contain sh ...part, ~~~~~~~ !!! error TS9015: Objects that contain spread assignments can't be inferred with --isolatedDeclarations -!!! related TS9027 isolatedDeclarationErrorsObjects.ts:71:14: Add a type annotation to the variable oWithSpread +!!! 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:71:14: Add a type annotation to the variable oWithSpread +!!! related TS9027 isolatedDeclarationErrorsObjects.ts:73:14: Add a type annotation to the variable oWithSpread } @@ -168,12 +175,16 @@ isolatedDeclarationErrorsObjects.ts(85,5): error TS9016: Objects that contain sh ...part, ~~~~~~~ !!! error TS9015: Objects that contain spread assignments can't be inferred with --isolatedDeclarations -!!! related TS9027 isolatedDeclarationErrorsObjects.ts:79:14: Add a type annotation to the variable oWithSpread +!!! 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:79:14: Add a type annotation to the variable oWithSpread +!!! 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 index 9ddc7d77fe1c6..875acd986fea8 100644 --- a/tests/baselines/reference/isolatedDeclarationErrorsObjects.js +++ b/tests/baselines/reference/isolatedDeclarationErrorsObjects.js @@ -58,6 +58,7 @@ export let oWithAccessor = { function prop(v: T): T { return v } const s: unique symbol = Symbol(); +const str: string = ""; enum E { V = 10, } @@ -67,6 +68,7 @@ export const oWithComputedProperties = { [prop(2)]: 2, [s]: 1, [E.V]: 1, + [str]: 0, } const part = { a: 1 }; @@ -86,6 +88,7 @@ export const oWithSpread = { }, c: 1, part, + [str]: 0, } @@ -136,6 +139,7 @@ export let oWithAccessor = { }; function prop(v) { return v; } const s = Symbol(); +const str = ""; var E; (function (E) { E[E["V"] = 10] = "V"; @@ -146,6 +150,7 @@ export const oWithComputedProperties = { [prop(2)]: 2, [s]: 1, [E.V]: 1, + [str]: 0, }; const part = { a: 1 }; export const oWithSpread = { @@ -161,4 +166,5 @@ export const oWithSpread = { }, c: 1, part, + [str]: 0, }; diff --git a/tests/baselines/reference/isolatedDeclarationErrorsObjects.symbols b/tests/baselines/reference/isolatedDeclarationErrorsObjects.symbols index c849b65f0786c..b115c16fb45dc 100644 --- a/tests/baselines/reference/isolatedDeclarationErrorsObjects.symbols +++ b/tests/baselines/reference/isolatedDeclarationErrorsObjects.symbols @@ -140,75 +140,86 @@ 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, 56, 34)) +>E : Symbol(E, Decl(isolatedDeclarationErrorsObjects.ts, 57, 23)) V = 10, ->V : Symbol(E.V, Decl(isolatedDeclarationErrorsObjects.ts, 57, 8)) +>V : Symbol(E.V, Decl(isolatedDeclarationErrorsObjects.ts, 58, 8)) } export const oWithComputedProperties = { ->oWithComputedProperties : Symbol(oWithComputedProperties, Decl(isolatedDeclarationErrorsObjects.ts, 60, 12)) +>oWithComputedProperties : Symbol(oWithComputedProperties, Decl(isolatedDeclarationErrorsObjects.ts, 61, 12)) [1]: 1, ->[1] : Symbol([1], Decl(isolatedDeclarationErrorsObjects.ts, 60, 40)) ->1 : Symbol([1], Decl(isolatedDeclarationErrorsObjects.ts, 60, 40)) +>[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, 61, 11)) +>[1 + 3] : Symbol([1 + 3], Decl(isolatedDeclarationErrorsObjects.ts, 62, 11)) [prop(2)]: 2, ->[prop(2)] : Symbol([prop(2)], Decl(isolatedDeclarationErrorsObjects.ts, 62, 15)) +>[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, 63, 17)) +>[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, 64, 11)) ->E.V : Symbol(E.V, Decl(isolatedDeclarationErrorsObjects.ts, 57, 8)) ->E : Symbol(E, Decl(isolatedDeclarationErrorsObjects.ts, 56, 34)) ->V : Symbol(E.V, Decl(isolatedDeclarationErrorsObjects.ts, 57, 8)) +>[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, 68, 5)) ->a : Symbol(a, Decl(isolatedDeclarationErrorsObjects.ts, 68, 14)) +>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, 70, 12)) +>oWithSpread : Symbol(oWithSpread, Decl(isolatedDeclarationErrorsObjects.ts, 72, 12)) b: 1, ->b : Symbol(b, Decl(isolatedDeclarationErrorsObjects.ts, 70, 28)) +>b : Symbol(b, Decl(isolatedDeclarationErrorsObjects.ts, 72, 28)) ...part, ->part : Symbol(part, Decl(isolatedDeclarationErrorsObjects.ts, 68, 5)) +>part : Symbol(part, Decl(isolatedDeclarationErrorsObjects.ts, 70, 5)) c: 1, ->c : Symbol(c, Decl(isolatedDeclarationErrorsObjects.ts, 72, 12)) +>c : Symbol(c, Decl(isolatedDeclarationErrorsObjects.ts, 74, 12)) part, ->part : Symbol(part, Decl(isolatedDeclarationErrorsObjects.ts, 73, 9)) +>part : Symbol(part, Decl(isolatedDeclarationErrorsObjects.ts, 75, 9)) } export const oWithSpread = { ->oWithSpread : Symbol(oWithSpread, Decl(isolatedDeclarationErrorsObjects.ts, 78, 12)) +>oWithSpread : Symbol(oWithSpread, Decl(isolatedDeclarationErrorsObjects.ts, 80, 12)) b: 1, ->b : Symbol(b, Decl(isolatedDeclarationErrorsObjects.ts, 78, 28)) +>b : Symbol(b, Decl(isolatedDeclarationErrorsObjects.ts, 80, 28)) nested: { ->nested : Symbol(nested, Decl(isolatedDeclarationErrorsObjects.ts, 79, 9)) +>nested : Symbol(nested, Decl(isolatedDeclarationErrorsObjects.ts, 81, 9)) ...part, ->part : Symbol(part, Decl(isolatedDeclarationErrorsObjects.ts, 68, 5)) +>part : Symbol(part, Decl(isolatedDeclarationErrorsObjects.ts, 70, 5)) }, c: 1, ->c : Symbol(c, Decl(isolatedDeclarationErrorsObjects.ts, 82, 6)) +>c : Symbol(c, Decl(isolatedDeclarationErrorsObjects.ts, 84, 6)) part, ->part : Symbol(part, Decl(isolatedDeclarationErrorsObjects.ts, 83, 9)) +>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 index b9db8c899efa7..f0a9f2a79299b 100644 --- a/tests/baselines/reference/isolatedDeclarationErrorsObjects.types +++ b/tests/baselines/reference/isolatedDeclarationErrorsObjects.types @@ -160,6 +160,10 @@ const s: unique symbol = Symbol(); >Symbol() : unique symbol >Symbol : SymbolConstructor +const str: string = ""; +>str : string +>"" : "" + enum E { >E : E @@ -168,8 +172,8 @@ enum E { >10 : 10 } export const oWithComputedProperties = { ->oWithComputedProperties : { [x: number]: number; 1: number; 2: number; [s]: number; 10: number; } ->{ [1]: 1, [1 + 3]: 1, [prop(2)]: 2, [s]: 1, [E.V]: 1,} : { [x: number]: number; 1: number; 2: number; [s]: number; 10: number; } +>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 @@ -201,6 +205,11 @@ export const oWithComputedProperties = { >E : typeof E >V : E >1 : 1 + + [str]: 0, +>[str] : number +>str : string +>0 : 0 } const part = { a: 1 }; @@ -230,8 +239,8 @@ export const oWithSpread = { export const oWithSpread = { ->oWithSpread : { b: number; nested: { a: number; }; c: number; part: { a: number; }; } ->{ b: 1, nested: { ...part, }, c: 1, part,} : { b: number; nested: { a: number; }; c: number; part: { a: number; }; } +>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 @@ -251,5 +260,10 @@ export const oWithSpread = { part, >part : { a: number; } + + [str]: 0, +>[str] : number +>str : string +>0 : 0 } diff --git a/tests/cases/compiler/isolatedDeclarationErrorsClasses.ts b/tests/cases/compiler/isolatedDeclarationErrorsClasses.ts index aee8891c9875a..3744ef442dd74 100644 --- a/tests/cases/compiler/isolatedDeclarationErrorsClasses.ts +++ b/tests/cases/compiler/isolatedDeclarationErrorsClasses.ts @@ -40,6 +40,9 @@ const noParamAnnotationLiteralName = "noParamAnnotationLiteralName"; export class C { + // Should not be reported as an isolated declaration error + [missing] = 1; + [noAnnotationLiteralName](): void { } [noParamAnnotationLiteralName](v: string): void { } @@ -51,5 +54,12 @@ export class C { 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/isolatedDeclarationErrorsObjects.ts b/tests/cases/compiler/isolatedDeclarationErrorsObjects.ts index 62ead187c7c7f..cbd3cbb36b028 100644 --- a/tests/cases/compiler/isolatedDeclarationErrorsObjects.ts +++ b/tests/cases/compiler/isolatedDeclarationErrorsObjects.ts @@ -1,5 +1,6 @@ // @declaration: true -// @isolatedDeclarations: true +// @isolatedDeclarations: true +// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @isolatedDeclarationFixedDiffReason: Accessors are not unified in DTE // @declarationMap: false // @strict: true @@ -62,6 +63,7 @@ export let oWithAccessor = { function prop(v: T): T { return v } const s: unique symbol = Symbol(); +const str: string = ""; enum E { V = 10, } @@ -71,6 +73,7 @@ export const oWithComputedProperties = { [prop(2)]: 2, [s]: 1, [E.V]: 1, + [str]: 0, } const part = { a: 1 }; @@ -90,4 +93,5 @@ export const oWithSpread = { }, c: 1, part, + [str]: 0, } From 9ecd15ffabcb4a58fd4672961d70c74efe41ac2e Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 11 Dec 2023 15:56:44 +0000 Subject: [PATCH 187/224] Added specific error for default exports. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/diagnosticMessages.json | 8 +++ .../declarations/localInferenceResolver.ts | 16 +++--- src/harness/isolatedDeclarationFixer.ts | 1 + .../fixMissingTypeAnnotationOnExports.ts | 1 + src/testRunner/compilerRunner.ts | 1 + ...nEmitObjectAssignedDefaultExport.d.ts.diff | 7 ++- ...nodeModuleReexportFromDottedPath.d.ts.diff | 7 ++- ...rationEmitObjectAssignedDefaultExport.d.ts | 5 +- .../dte/nodeModuleReexportFromDottedPath.d.ts | 5 +- ...larationEmitWithDefaultAsComputedName.d.ts | 5 +- ...arationEmitWithDefaultAsComputedName2.d.ts | 5 +- ...larationEmitWithDefaultAsComputedName.d.ts | 5 +- ...arationEmitWithDefaultAsComputedName2.d.ts | 5 +- ...solatedDeclarationErrorsDefault.errors.txt | 44 +++++++++++++++ .../isolatedDeclarationErrorsDefault.js | 42 ++++++++++++++ .../isolatedDeclarationErrorsDefault.symbols | 33 +++++++++++ .../isolatedDeclarationErrorsDefault.types | 56 +++++++++++++++++++ .../isolatedDeclarationErrorsDefault.ts | 25 +++++++++ ...ypeAnnotationOnExports50-default-export.ts | 16 ++++++ 19 files changed, 262 insertions(+), 25 deletions(-) create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsDefault.errors.txt create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsDefault.js create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsDefault.symbols create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsDefault.types create mode 100644 tests/cases/compiler/isolatedDeclarationErrorsDefault.ts create mode 100644 tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports50-default-export.ts diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 3e9f76f9350ed..0a39c961fe26a 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -6842,6 +6842,14 @@ "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 diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 6cbd3c7d9eb0d..7e1165d38d861 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -126,6 +126,7 @@ const relatedSuggestionByDeclarationKind = { [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 = { @@ -143,6 +144,7 @@ const errorByDeclarationKind = { [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>; @@ -241,8 +243,8 @@ export function createLocalInferenceResolver({ } function findNearestDeclaration(node: Node) { - const result = findAncestor(node, n => isStatement(n) ? "quit" : isVariableDeclaration(n) || isPropertyDeclaration(n) || isParameter(n)); - return result as VariableDeclaration | PropertyDeclaration | ParameterDeclaration | undefined; + 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) { @@ -263,7 +265,7 @@ export function createLocalInferenceResolver({ const diag = createDiagnosticForNode(node, errorByDeclarationKind[node.kind]); const parentDeclaration = findNearestDeclaration(node); if (parentDeclaration) { - const targetStr = getTextOfNode(parentDeclaration.name, /*includeTrivia*/ false); + const targetStr = isExportAssignment(parentDeclaration) ? "" : getTextOfNode(parentDeclaration.name, /*includeTrivia*/ false); addRelatedInfo(diag, createDiagnosticForNode(parentDeclaration, relatedSuggestionByDeclarationKind[parentDeclaration.kind], targetStr)); } return diag; @@ -272,7 +274,7 @@ export function createLocalInferenceResolver({ const diag = createDiagnosticForNode(node, errorByDeclarationKind[node.kind]); const parentDeclaration = findNearestDeclaration(node); if (parentDeclaration) { - const targetStr = getTextOfNode(parentDeclaration.name, /*includeTrivia*/ false); + const targetStr = isExportAssignment(parentDeclaration) ? "" : getTextOfNode(parentDeclaration.name, /*includeTrivia*/ false); addRelatedInfo(diag, createDiagnosticForNode(parentDeclaration, relatedSuggestionByDeclarationKind[parentDeclaration.kind], targetStr)); } return diag; @@ -281,7 +283,7 @@ export function createLocalInferenceResolver({ const diag = createDiagnosticForNode(node, errorByDeclarationKind[node.kind]); const parentDeclaration = findNearestDeclaration(node); if (parentDeclaration) { - const targetStr = getTextOfNode(parentDeclaration.name, /*includeTrivia*/ false); + const targetStr = isExportAssignment(parentDeclaration) ? "" : getTextOfNode(parentDeclaration.name, /*includeTrivia*/ false); addRelatedInfo(diag, createDiagnosticForNode(parentDeclaration, relatedSuggestionByDeclarationKind[parentDeclaration.kind], targetStr)); } addRelatedInfo(diag, createDiagnosticForNode(node, relatedSuggestionByDeclarationKind[node.kind])); @@ -310,8 +312,8 @@ export function createLocalInferenceResolver({ const parentDeclaration = findNearestDeclaration(node); let diag: DiagnosticWithLocation; if (parentDeclaration) { - const targetStr = getTextOfNode(parentDeclaration.name, /*includeTrivia*/ false); - const parent = findAncestor(node.parent, n => isStatement(n) ? "quit" : !isParenthesizedExpression(n) && !isTypeAssertionExpression(n) && !isAsExpression(n)); + 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)); diff --git a/src/harness/isolatedDeclarationFixer.ts b/src/harness/isolatedDeclarationFixer.ts index 95a7b2c2ebd9c..a19a396bf04c9 100644 --- a/src/harness/isolatedDeclarationFixer.ts +++ b/src/harness/isolatedDeclarationFixer.ts @@ -18,6 +18,7 @@ export const isolatedDeclarationsErrors = new Set([ 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, diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 1401b79614bf6..c8c3280c8c4fd 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -124,6 +124,7 @@ const errorCodes = [ 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); diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 60f5e71596931..77676af749701 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -595,6 +595,7 @@ class IsolatedDeclarationTest extends CompilerTestBase { 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_in_isolated_declaration_mode, ts.Diagnostics.Inference_from_class_expressions_is_not_supported_with_isolatedDeclarations, ].map(d => d.code)); 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 index 64f66b5d926f8..95356d7d16706 100644 --- 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 @@ -17,12 +17,12 @@ /// [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 TS9013: Expression type can't be inferred with --isolatedDeclarations ++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,26 @@ +@@ -30,21 +38,27 @@ } declare const styled: StyledInterface; @@ -48,6 +48,7 @@ ~~~ !!! 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 TS9013: Expression type can't be inferred with --isolatedDeclarations ++!!! 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/nodeModuleReexportFromDottedPath.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/nodeModuleReexportFromDottedPath.d.ts.diff index 67464726708f4..c96b288b50ee6 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,7 +1,31 @@ +@@ -1,7 +1,32 @@ //// [/index.d.ts] @@ -18,7 +18,7 @@ +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + -+/index.ts(4,16): error TS9013: Expression type can't be inferred with --isolatedDeclarations ++/index.ts(4,16): error TS9037: Default exports can't be inferred with --isolatedDeclarations. + + +==== /node_modules/.prisma/client/index.d.ts (0 errors) ==== @@ -39,6 +39,7 @@ + const EnhancedPrisma = enhancePrisma(PrismaClient); + export default new EnhancedPrisma(); + ~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations ++!!! 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/declarationEmitObjectAssignedDefaultExport.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectAssignedDefaultExport.d.ts index c6b0b28b04176..247ca822669b9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectAssignedDefaultExport.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectAssignedDefaultExport.d.ts @@ -53,7 +53,7 @@ export default _default; /// [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 TS9013: Expression type can't be inferred with --isolatedDeclarations +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) ==== @@ -103,5 +103,6 @@ index.ts(7,16): error TS9013: Expression type can't be inferred with --isolatedD ~~~ !!! 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 TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! 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/nodeModuleReexportFromDottedPath.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModuleReexportFromDottedPath.d.ts index bbe0d828e634d..ab1cb15b492f9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModuleReexportFromDottedPath.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModuleReexportFromDottedPath.d.ts @@ -29,7 +29,7 @@ export default _default; //# sourceMappingURL=index.d.ts.map /// [Errors] //// -/index.ts(4,16): error TS9013: Expression type can't be inferred with --isolatedDeclarations +/index.ts(4,16): error TS9037: Default exports can't be inferred with --isolatedDeclarations. ==== /node_modules/.prisma/client/index.d.ts (0 errors) ==== @@ -50,5 +50,6 @@ export default _default; const EnhancedPrisma = enhancePrisma(PrismaClient); export default new EnhancedPrisma(); ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! 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/original/dte/declarationEmitWithDefaultAsComputedName.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName.d.ts index 3106e1c9a4d49..362bad0a66d40 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName.d.ts @@ -33,7 +33,7 @@ export default _default; /// [Errors] //// -other.ts(7,16): error TS9013: Expression type can't be inferred with --isolatedDeclarations +other.ts(7,16): error TS9037: Default exports can't be inferred with --isolatedDeclarations. ==== other.ts (1 errors) ==== @@ -49,7 +49,8 @@ other.ts(7,16): error TS9013: Expression type can't be inferred with --isolatedD ~~~~~~~~~~~~~~~ }); ~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! 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"; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName2.d.ts index 82058c283648d..8dcaff87a2ebe 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitWithDefaultAsComputedName2.d.ts @@ -33,7 +33,7 @@ export default _default; /// [Errors] //// -other.ts(7,16): error TS9013: Expression type can't be inferred with --isolatedDeclarations +other.ts(7,16): error TS9037: Default exports can't be inferred with --isolatedDeclarations. ==== other.ts (1 errors) ==== @@ -49,7 +49,8 @@ other.ts(7,16): error TS9013: Expression type can't be inferred with --isolatedD ~~~~~~~~~~~~~~~ }); ~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! 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"; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName.d.ts index 3d23184f9673d..53de168e23ad9 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName.d.ts @@ -33,7 +33,7 @@ export default _default; /// [Errors] //// -other.ts(7,16): error TS9013: Expression type can't be inferred with --isolatedDeclarations +other.ts(7,16): error TS9037: Default exports can't be inferred with --isolatedDeclarations. ==== other.ts (1 errors) ==== @@ -49,7 +49,8 @@ other.ts(7,16): error TS9013: Expression type can't be inferred with --isolatedD ~~~~~~~~~~~~~~~ }); ~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! 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"; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName2.d.ts index 0725d22ac1354..ffbf562723203 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitWithDefaultAsComputedName2.d.ts @@ -33,7 +33,7 @@ export default _default; /// [Errors] //// -other.ts(7,16): error TS9013: Expression type can't be inferred with --isolatedDeclarations +other.ts(7,16): error TS9037: Default exports can't be inferred with --isolatedDeclarations. ==== other.ts (1 errors) ==== @@ -49,7 +49,8 @@ other.ts(7,16): error TS9013: Expression type can't be inferred with --isolatedD ~~~~~~~~~~~~~~~ }); ~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! 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"; diff --git a/tests/baselines/reference/isolatedDeclarationErrorsDefault.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsDefault.errors.txt new file mode 100644 index 0000000000000..1f76a0d4acc2a --- /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/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/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 From 3f0ca54a57bb0b88df1081b12dffd29751cc34cc Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 11 Dec 2023 23:31:18 +0000 Subject: [PATCH 188/224] Updated baseline. Signed-off-by: Titian Cernicova-Dragomir --- ...dPropertyNamesWithStaticProperty.d.ts.diff | 46 +++++++++++++++---- ...ithSuffixes_one_externalTSModule.d.ts.diff | 7 +-- ...mputedPropertyNamesWithStaticProperty.d.ts | 12 ++--- ...mputedPropertyNamesWithStaticProperty.d.ts | 15 +++--- 4 files changed, 51 insertions(+), 29 deletions(-) diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff index cb5263a4e007a..2765131554501 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff @@ -2,17 +2,28 @@ //// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -14,18 +14,17 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -4,49 +4,47 @@ + declare class C { + } + declare class C1 { + static staticProp: number; ++ get [C1.staticProp](): string; ++ set [C1.staticProp](x: string); ++ [C1.staticProp](): invalid; + } + + /// [Errors] //// computedPropertyNamesWithStaticProperty.ts(2,1): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. - computedPropertyNamesWithStaticProperty.ts(4,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNamesWithStaticProperty.ts(4,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNamesWithStaticProperty.ts(4,10): error TS2449: Class 'C1' used before its declaration. --computedPropertyNamesWithStaticProperty.ts(7,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNamesWithStaticProperty.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNamesWithStaticProperty.ts(7,10): error TS2449: Class 'C1' used before its declaration. - computedPropertyNamesWithStaticProperty.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-computedPropertyNamesWithStaticProperty.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++computedPropertyNamesWithStaticProperty.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations 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. @@ -20,19 +31,34 @@ -==== computedPropertyNamesWithStaticProperty.ts (10 errors) ==== -+==== computedPropertyNamesWithStaticProperty.ts (9 errors) ==== ++==== computedPropertyNamesWithStaticProperty.ts (8 errors) ==== class C { class C1 { ~~~~~ !!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. -@@ -38,10 +37,8 @@ + static staticProp = 10; + get [C1.staticProp]() { +- ~~~~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + ~~ + !!! error TS2449: Class 'C1' used before its declaration. !!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. return "hello"; } set [C1.staticProp](x: string) { - ~~~~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~ !!! error TS2449: Class 'C1' used before its declaration. !!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. var y = x; + } + [C1.staticProp]() { } + ~~~~~~~~~~~~~~~ +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! related TS9034 computedPropertyNamesWithStaticProperty.ts:10:5: Add a return type to the method + ~~ + !!! error TS2449: Class 'C1' used before its declaration. + !!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. + } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff index fec371d4f32db..7597a0f5909c9 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,19 +1,4 @@ +@@ -1,20 +1,4 @@ //// [/bin/test.d.ts] @@ -13,7 +13,7 @@ - -/// [Errors] //// - --/node_modules/some-library/index.ios.ts(1,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-/node_modules/some-library/index.ios.ts(1,17): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations - - -==== /test.ts (0 errors) ==== @@ -22,7 +22,8 @@ -==== /node_modules/some-library/index.ios.ts (1 errors) ==== - export function ios() {} - ~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +-!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +-!!! related TS9031 /node_modules/some-library/index.ios.ts:1:17: Add a return type to the function declaration -==== /node_modules/some-library/index.ts (0 errors) ==== - export function base() {} \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts index f070887c9cc4f..b06afee2af554 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts @@ -34,7 +34,7 @@ declare class C { } declare class C1 { static staticProp: number; - get [C1.staticProp](): invalid; + get [C1.staticProp](): string; set [C1.staticProp](x: string); [C1.staticProp](): invalid; } @@ -42,25 +42,22 @@ declare class C1 { /// [Errors] //// computedPropertyNamesWithStaticProperty.ts(2,1): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. -computedPropertyNamesWithStaticProperty.ts(4,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesWithStaticProperty.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations 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 (9 errors) ==== +==== computedPropertyNamesWithStaticProperty.ts (8 errors) ==== class C { class C1 { ~~~~~ !!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. static staticProp = 10; get [C1.staticProp]() { - ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. ~~ !!! error TS2449: Class 'C1' used before its declaration. !!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. @@ -74,7 +71,8 @@ computedPropertyNamesWithStaticProperty.ts(21,6): error TS2449: Class 'C2' used } [C1.staticProp]() { } ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! related TS9034 computedPropertyNamesWithStaticProperty.ts:10:5: Add a return type to the method ~~ !!! error TS2449: Class 'C1' used before its declaration. !!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts index d4bf683f67953..2669d0611cb69 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts @@ -34,19 +34,16 @@ declare class C { } declare class C1 { static staticProp: number; - get [C1.staticProp](): invalid; - set [C1.staticProp](x: string); - [C1.staticProp](): invalid; } /// [Errors] //// computedPropertyNamesWithStaticProperty.ts(2,1): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. -computedPropertyNamesWithStaticProperty.ts(4,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesWithStaticProperty.ts(4,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNamesWithStaticProperty.ts(4,10): error TS2449: Class 'C1' used before its declaration. -computedPropertyNamesWithStaticProperty.ts(7,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesWithStaticProperty.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations computedPropertyNamesWithStaticProperty.ts(7,10): error TS2449: Class 'C1' used before its declaration. -computedPropertyNamesWithStaticProperty.ts(10,5): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +computedPropertyNamesWithStaticProperty.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations 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. @@ -61,7 +58,7 @@ computedPropertyNamesWithStaticProperty.ts(21,6): error TS2449: Class 'C2' used static staticProp = 10; get [C1.staticProp]() { ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~ !!! error TS2449: Class 'C1' used before its declaration. !!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. @@ -69,7 +66,7 @@ computedPropertyNamesWithStaticProperty.ts(21,6): error TS2449: Class 'C2' used } set [C1.staticProp](x: string) { ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~ !!! error TS2449: Class 'C1' used before its declaration. !!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. @@ -77,7 +74,7 @@ computedPropertyNamesWithStaticProperty.ts(21,6): error TS2449: Class 'C2' used } [C1.staticProp]() { } ~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations ~~ !!! error TS2449: Class 'C1' used before its declaration. !!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. From 4164b9b5c47e92065eb79c360ed0c6ffbadef98d Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 12 Dec 2023 09:56:52 +0000 Subject: [PATCH 189/224] Updated baseline. Removed unused reasons. Signed-off-by: Titian Cernicova-Dragomir --- src/testRunner/compilerRunner.ts | 7 +- .../es6ImportNamedImportWithExport.d.ts.map.f | 1459 ----------------- .../es6ImportNamedImportWithExport.d.ts.map.f | 1360 --------------- .../diff/accessorBodyInTypeContext.d.ts.diff | 25 - ...gModuleAugmentationRetainsImport.d.ts.diff | 32 - .../diff/isolatedDeclarationErrors.d.ts.diff | 21 - .../dte/accessorBodyInTypeContext.d.ts | 73 - ...ortingModuleAugmentationRetainsImport.d.ts | 65 - .../dte/isolatedDeclarationErrors.d.ts | 33 - .../tsc/accessorBodyInTypeContext.d.ts | 73 - ...ortingModuleAugmentationRetainsImport.d.ts | 68 - .../tsc/isolatedDeclarationErrors.d.ts | 36 - .../compiler/accessorBodyInTypeContext.ts | 1 - .../cases/compiler/declFileRegressionTests.ts | 1 - ...onEmitDestructuringObjectLiteralPattern.ts | 1 - ...nEmitDestructuringObjectLiteralPattern1.ts | 1 - ...nEmitDestructuringObjectLiteralPattern2.ts | 1 - ...mportingModuleAugmentationRetainsImport.ts | 1 - ...clarationEmitInferredDefaultExportType2.ts | 1 - .../escapedReservedCompilerNamedIdentifier.ts | 1 - .../stringLiteralObjectLiteralDeclaration1.ts | 1 - tests/cases/compiler/vardecl.ts | 1 - tests/cases/compiler/withExportDecl.ts | 1 - .../controlFlow/controlFlowAliasing.ts | 1 - .../salsa/typeFromPropertyAssignment36.ts | 2 - .../types/literal/templateLiteralTypes2.ts | 1 - .../thisType/thisTypeInObjectLiterals2.ts | 1 - 27 files changed, 6 insertions(+), 3262 deletions(-) delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/es6ImportNamedImportWithExport.d.ts.map.f delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/es6ImportNamedImportWithExport.d.ts.map.f delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/accessorBodyInTypeContext.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrors.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/accessorBodyInTypeContext.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/accessorBodyInTypeContext.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrors.d.ts diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 77676af749701..096804e1bcb66 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -655,7 +655,12 @@ class IsolatedDeclarationTest extends CompilerTestBase { } verifyDiff() { - if (this.isOutputEquivalent && this.isDiagnosticEquivalent) return; + if (this.isOutputEquivalent && this.isDiagnosticEquivalent) { + if (this.isOutputMapEquivalent) { + ts.Debug.assert(this.diffReason === undefined, "Should not have a diff reason if everything is equivalent"); + } + return; + } Compiler.doDeclarationDiffBaseline( this.configuredName, this.baselinePath + "/diff", diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/es6ImportNamedImportWithExport.d.ts.map.f b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/es6ImportNamedImportWithExport.d.ts.map.f deleted file mode 100644 index c0c660d4caa37..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/es6ImportNamedImportWithExport.d.ts.map.f +++ /dev/null @@ -1,1459 +0,0 @@ -//// [es6ImportNamedImportWithExport.ts] //// - -//// [client.d.ts.map] -{ - "version": 3, - "file": "client.d.ts", - "sourceRoot": "", - "sources": [ - "client.ts" - ], - "names": [], - "mappings": [ - { - "generatedLine": 1, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 1, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 1, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 1, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 15, - "name": null, - "generatedText": "xxxx", - "sourceText": "xxxx" - }, - { - "generatedLine": 1, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 17, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 1, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 27, - "name": null, - "generatedText": "number", - "sourceText": "number = a" - }, - { - "generatedLine": 1, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 28, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 2, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 5, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 2, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 5, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 2, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 5, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 2, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 5, - "originalColumn": 15, - "name": null, - "generatedText": "xxxx", - "sourceText": "xxxx" - }, - { - "generatedLine": 2, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 17, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 2, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 5, - "originalColumn": 19, - "name": null, - "generatedText": "number", - "sourceText": " b" - }, - { - "generatedLine": 2, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 5, - "originalColumn": 20, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 3, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 7, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 3, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 7, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 3, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 7, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 3, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 7, - "originalColumn": 15, - "name": null, - "generatedText": "xxxx", - "sourceText": "xxxx" - }, - { - "generatedLine": 3, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 17, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 3, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 7, - "originalColumn": 19, - "name": null, - "generatedText": "number", - "sourceText": " x" - }, - { - "generatedLine": 3, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 7, - "originalColumn": 20, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 4, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 8, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 4, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 8, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 4, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 8, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 4, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 8, - "originalColumn": 15, - "name": null, - "generatedText": "xxxx", - "sourceText": "xxxx" - }, - { - "generatedLine": 4, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 17, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 4, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 8, - "originalColumn": 19, - "name": null, - "generatedText": "number", - "sourceText": " y" - }, - { - "generatedLine": 4, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 8, - "originalColumn": 20, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 5, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 10, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 5, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 10, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 5, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 10, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 5, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 10, - "originalColumn": 15, - "name": null, - "generatedText": "xxxx", - "sourceText": "xxxx" - }, - { - "generatedLine": 5, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 17, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 5, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 10, - "originalColumn": 19, - "name": null, - "generatedText": "number", - "sourceText": " z" - }, - { - "generatedLine": 5, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 10, - "originalColumn": 20, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 6, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 12, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 6, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 12, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 6, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 12, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 6, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 12, - "originalColumn": 15, - "name": null, - "generatedText": "xxxx", - "sourceText": "xxxx" - }, - { - "generatedLine": 6, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 17, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 6, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 12, - "originalColumn": 19, - "name": null, - "generatedText": "number", - "sourceText": " m" - }, - { - "generatedLine": 6, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 12, - "originalColumn": 20, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 7, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 14, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 7, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 14, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 7, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 14, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 7, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 14, - "originalColumn": 15, - "name": null, - "generatedText": "xxxx", - "sourceText": "xxxx" - }, - { - "generatedLine": 7, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 17, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 7, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 14, - "originalColumn": 20, - "name": null, - "generatedText": "number", - "sourceText": " a1" - }, - { - "generatedLine": 7, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 14, - "originalColumn": 21, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 8, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 15, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 8, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 15, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 8, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 15, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 8, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 15, - "originalColumn": 15, - "name": null, - "generatedText": "xxxx", - "sourceText": "xxxx" - }, - { - "generatedLine": 8, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 17, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 8, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 15, - "originalColumn": 20, - "name": null, - "generatedText": "number", - "sourceText": " x1" - }, - { - "generatedLine": 8, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 15, - "originalColumn": 21, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 9, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 17, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 9, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 17, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 9, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 17, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 9, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 17, - "originalColumn": 15, - "name": null, - "generatedText": "xxxx", - "sourceText": "xxxx" - }, - { - "generatedLine": 9, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 17, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 9, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 17, - "originalColumn": 21, - "name": null, - "generatedText": "number", - "sourceText": " a11" - }, - { - "generatedLine": 9, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 17, - "originalColumn": 22, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 10, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 18, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 10, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 18, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 10, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 18, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 10, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 18, - "originalColumn": 15, - "name": null, - "generatedText": "xxxx", - "sourceText": "xxxx" - }, - { - "generatedLine": 10, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 17, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 10, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 18, - "originalColumn": 21, - "name": null, - "generatedText": "number", - "sourceText": " x11" - }, - { - "generatedLine": 10, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 18, - "originalColumn": 22, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 11, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 20, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 11, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 20, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 11, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 20, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 11, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 20, - "originalColumn": 15, - "name": null, - "generatedText": "z111", - "sourceText": "z111" - }, - { - "generatedLine": 11, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 20, - "originalColumn": 17, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 11, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 20, - "originalColumn": 28, - "name": null, - "generatedText": "number", - "sourceText": "number = z1" - }, - { - "generatedLine": 11, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 20, - "originalColumn": 29, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 12, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 22, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 12, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 22, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 12, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 22, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 12, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 22, - "originalColumn": 13, - "name": null, - "generatedText": "z2", - "sourceText": "z2" - }, - { - "generatedLine": 12, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 22, - "originalColumn": 15, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 12, - "generatedColumn": 29, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 22, - "originalColumn": 26, - "name": null, - "generatedText": "number", - "sourceText": "number = z3" - }, - { - "generatedLine": 12, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 22, - "originalColumn": 27, - "name": null, - "generatedText": ";", - "sourceText": ";" - } - ] -}//// [server.d.ts.map] -{ - "version": 3, - "file": "server.d.ts", - "sourceRoot": "", - "sources": [ - "server.ts" - ], - "names": [], - "mappings": [ - { - "generatedLine": 1, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 1, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 1, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 1, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 1, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 1, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 1, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 1, - "originalColumn": 12, - "name": null, - "generatedText": "a", - "sourceText": "a" - }, - { - "generatedLine": 1, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 1, - "originalColumn": 17, - "name": null, - "generatedText": ": number", - "sourceText": " = 10" - }, - { - "generatedLine": 1, - "generatedColumn": 29, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 1, - "originalColumn": 18, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 2, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 2, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 2, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 2, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 2, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 2, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 2, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 2, - "originalColumn": 12, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 2, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 2, - "originalColumn": 14, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 2, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 2, - "originalColumn": 24, - "name": null, - "generatedText": "number", - "sourceText": "number = a" - }, - { - "generatedLine": 2, - "generatedColumn": 29, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 2, - "originalColumn": 25, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 3, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 3, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 3, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 3, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 3, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 3, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 3, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 3, - "originalColumn": 12, - "name": null, - "generatedText": "m", - "sourceText": "m" - }, - { - "generatedLine": 3, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 3, - "originalColumn": 14, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 3, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 3, - "originalColumn": 24, - "name": null, - "generatedText": "number", - "sourceText": "number = a" - }, - { - "generatedLine": 3, - "generatedColumn": 29, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 3, - "originalColumn": 25, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 4, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 4, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 4, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 4, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 4, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 4, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 4, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 4, - "originalColumn": 13, - "name": null, - "generatedText": "a1", - "sourceText": "a1" - }, - { - "generatedLine": 4, - "generatedColumn": 29, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 4, - "originalColumn": 18, - "name": null, - "generatedText": ": number", - "sourceText": " = 10" - }, - { - "generatedLine": 4, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 4, - "originalColumn": 19, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 5, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 5, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 5, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 5, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 5, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 5, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 5, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 5, - "originalColumn": 13, - "name": null, - "generatedText": "x1", - "sourceText": "x1" - }, - { - "generatedLine": 5, - "generatedColumn": 29, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 5, - "originalColumn": 18, - "name": null, - "generatedText": ": number", - "sourceText": " = 10" - }, - { - "generatedLine": 5, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 5, - "originalColumn": 19, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 6, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 6, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 6, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 6, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 6, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 6, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 6, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 6, - "originalColumn": 13, - "name": null, - "generatedText": "z1", - "sourceText": "z1" - }, - { - "generatedLine": 6, - "generatedColumn": 29, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 6, - "originalColumn": 18, - "name": null, - "generatedText": ": number", - "sourceText": " = 10" - }, - { - "generatedLine": 6, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 6, - "originalColumn": 19, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 7, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 7, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 7, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 7, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 7, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 7, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 7, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 7, - "originalColumn": 13, - "name": null, - "generatedText": "z2", - "sourceText": "z2" - }, - { - "generatedLine": 7, - "generatedColumn": 29, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 7, - "originalColumn": 18, - "name": null, - "generatedText": ": number", - "sourceText": " = 10" - }, - { - "generatedLine": 7, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 7, - "originalColumn": 19, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 8, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 8, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 8, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 8, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 8, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 8, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 8, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 8, - "originalColumn": 15, - "name": null, - "generatedText": "aaaa", - "sourceText": "aaaa" - }, - { - "generatedLine": 8, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 8, - "originalColumn": 20, - "name": null, - "generatedText": ": number", - "sourceText": " = 10" - }, - { - "generatedLine": 8, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 8, - "originalColumn": 21, - "name": null, - "generatedText": ";", - "sourceText": ";" - } - ] -} \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/es6ImportNamedImportWithExport.d.ts.map.f b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/es6ImportNamedImportWithExport.d.ts.map.f deleted file mode 100644 index 07d27157cfb0d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/es6ImportNamedImportWithExport.d.ts.map.f +++ /dev/null @@ -1,1360 +0,0 @@ -//// [es6ImportNamedImportWithExport.ts] //// - -//// [client.d.ts.map] -{ - "version": 3, - "file": "client.d.ts", - "sourceRoot": "", - "sources": [ - "client.ts" - ], - "names": [], - "mappings": [ - { - "generatedLine": 1, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 1, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 1, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 1, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 15, - "name": null, - "generatedText": "xxxx", - "sourceText": "xxxx" - }, - { - "generatedLine": 1, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 17, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 1, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 27, - "name": null, - "generatedText": "number", - "sourceText": "number = a" - }, - { - "generatedLine": 1, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 3, - "originalColumn": 28, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 2, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 5, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 2, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 5, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 2, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 5, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 2, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 5, - "originalColumn": 15, - "name": null, - "generatedText": "xxxx", - "sourceText": "xxxx" - }, - { - "generatedLine": 2, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 5, - "originalColumn": 19, - "name": null, - "generatedText": ": number", - "sourceText": " = b" - }, - { - "generatedLine": 2, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 5, - "originalColumn": 20, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 3, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 7, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 3, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 7, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 3, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 7, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 3, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 7, - "originalColumn": 15, - "name": null, - "generatedText": "xxxx", - "sourceText": "xxxx" - }, - { - "generatedLine": 3, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 7, - "originalColumn": 19, - "name": null, - "generatedText": ": number", - "sourceText": " = x" - }, - { - "generatedLine": 3, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 7, - "originalColumn": 20, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 4, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 8, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 4, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 8, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 4, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 8, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 4, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 8, - "originalColumn": 15, - "name": null, - "generatedText": "xxxx", - "sourceText": "xxxx" - }, - { - "generatedLine": 4, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 8, - "originalColumn": 19, - "name": null, - "generatedText": ": number", - "sourceText": " = y" - }, - { - "generatedLine": 4, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 8, - "originalColumn": 20, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 5, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 10, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 5, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 10, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 5, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 10, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 5, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 10, - "originalColumn": 15, - "name": null, - "generatedText": "xxxx", - "sourceText": "xxxx" - }, - { - "generatedLine": 5, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 10, - "originalColumn": 19, - "name": null, - "generatedText": ": number", - "sourceText": " = z" - }, - { - "generatedLine": 5, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 10, - "originalColumn": 20, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 6, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 12, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 6, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 12, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 6, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 12, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 6, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 12, - "originalColumn": 15, - "name": null, - "generatedText": "xxxx", - "sourceText": "xxxx" - }, - { - "generatedLine": 6, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 12, - "originalColumn": 19, - "name": null, - "generatedText": ": number", - "sourceText": " = m" - }, - { - "generatedLine": 6, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 12, - "originalColumn": 20, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 7, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 14, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 7, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 14, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 7, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 14, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 7, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 14, - "originalColumn": 15, - "name": null, - "generatedText": "xxxx", - "sourceText": "xxxx" - }, - { - "generatedLine": 7, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 14, - "originalColumn": 20, - "name": null, - "generatedText": ": number", - "sourceText": " = a1" - }, - { - "generatedLine": 7, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 14, - "originalColumn": 21, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 8, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 15, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 8, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 15, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 8, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 15, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 8, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 15, - "originalColumn": 15, - "name": null, - "generatedText": "xxxx", - "sourceText": "xxxx" - }, - { - "generatedLine": 8, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 15, - "originalColumn": 20, - "name": null, - "generatedText": ": number", - "sourceText": " = x1" - }, - { - "generatedLine": 8, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 15, - "originalColumn": 21, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 9, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 17, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 9, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 17, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 9, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 17, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 9, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 17, - "originalColumn": 15, - "name": null, - "generatedText": "xxxx", - "sourceText": "xxxx" - }, - { - "generatedLine": 9, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 17, - "originalColumn": 21, - "name": null, - "generatedText": ": number", - "sourceText": " = a11" - }, - { - "generatedLine": 9, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 17, - "originalColumn": 22, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 10, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 18, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 10, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 18, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 10, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 18, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 10, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 18, - "originalColumn": 15, - "name": null, - "generatedText": "xxxx", - "sourceText": "xxxx" - }, - { - "generatedLine": 10, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 18, - "originalColumn": 21, - "name": null, - "generatedText": ": number", - "sourceText": " = x11" - }, - { - "generatedLine": 10, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 18, - "originalColumn": 22, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 11, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 20, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 11, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 20, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 11, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 20, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 11, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 20, - "originalColumn": 15, - "name": null, - "generatedText": "z111", - "sourceText": "z111" - }, - { - "generatedLine": 11, - "generatedColumn": 25, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 20, - "originalColumn": 17, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 11, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 20, - "originalColumn": 28, - "name": null, - "generatedText": "number", - "sourceText": "number = z1" - }, - { - "generatedLine": 11, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 20, - "originalColumn": 29, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 12, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 22, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 12, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 22, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 12, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 22, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 12, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 22, - "originalColumn": 13, - "name": null, - "generatedText": "z2", - "sourceText": "z2" - }, - { - "generatedLine": 12, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 22, - "originalColumn": 15, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 12, - "generatedColumn": 29, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 22, - "originalColumn": 26, - "name": null, - "generatedText": "number", - "sourceText": "number = z3" - }, - { - "generatedLine": 12, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "client.ts", - "originalLine": 22, - "originalColumn": 27, - "name": null, - "generatedText": ";", - "sourceText": ";" - } - ] -}//// [server.d.ts.map] -{ - "version": 3, - "file": "server.d.ts", - "sourceRoot": "", - "sources": [ - "server.ts" - ], - "names": [], - "mappings": [ - { - "generatedLine": 1, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 1, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 1, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 1, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 1, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 1, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 1, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 1, - "originalColumn": 12, - "name": null, - "generatedText": "a", - "sourceText": "a" - }, - { - "generatedLine": 1, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 1, - "originalColumn": 17, - "name": null, - "generatedText": ": number", - "sourceText": " = 10" - }, - { - "generatedLine": 1, - "generatedColumn": 29, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 1, - "originalColumn": 18, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 2, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 2, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 2, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 2, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 2, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 2, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 2, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 2, - "originalColumn": 12, - "name": null, - "generatedText": "x", - "sourceText": "x" - }, - { - "generatedLine": 2, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 2, - "originalColumn": 14, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 2, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 2, - "originalColumn": 24, - "name": null, - "generatedText": "number", - "sourceText": "number = a" - }, - { - "generatedLine": 2, - "generatedColumn": 29, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 2, - "originalColumn": 25, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 3, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 3, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 3, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 3, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 3, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 3, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 3, - "generatedColumn": 20, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 3, - "originalColumn": 12, - "name": null, - "generatedText": "m", - "sourceText": "m" - }, - { - "generatedLine": 3, - "generatedColumn": 22, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 3, - "originalColumn": 14, - "name": null, - "generatedText": ": ", - "sourceText": ": " - }, - { - "generatedLine": 3, - "generatedColumn": 28, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 3, - "originalColumn": 24, - "name": null, - "generatedText": "number", - "sourceText": "number = a" - }, - { - "generatedLine": 3, - "generatedColumn": 29, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 3, - "originalColumn": 25, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 4, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 4, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 4, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 4, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 4, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 4, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 4, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 4, - "originalColumn": 13, - "name": null, - "generatedText": "a1", - "sourceText": "a1" - }, - { - "generatedLine": 4, - "generatedColumn": 29, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 4, - "originalColumn": 18, - "name": null, - "generatedText": ": number", - "sourceText": " = 10" - }, - { - "generatedLine": 4, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 4, - "originalColumn": 19, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 5, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 5, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 5, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 5, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 5, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 5, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 5, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 5, - "originalColumn": 13, - "name": null, - "generatedText": "x1", - "sourceText": "x1" - }, - { - "generatedLine": 5, - "generatedColumn": 29, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 5, - "originalColumn": 18, - "name": null, - "generatedText": ": number", - "sourceText": " = 10" - }, - { - "generatedLine": 5, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 5, - "originalColumn": 19, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 6, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 6, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 6, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 6, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 6, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 6, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 6, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 6, - "originalColumn": 13, - "name": null, - "generatedText": "z1", - "sourceText": "z1" - }, - { - "generatedLine": 6, - "generatedColumn": 29, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 6, - "originalColumn": 18, - "name": null, - "generatedText": ": number", - "sourceText": " = 10" - }, - { - "generatedLine": 6, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 6, - "originalColumn": 19, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 7, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 7, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 7, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 7, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 7, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 7, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 7, - "generatedColumn": 21, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 7, - "originalColumn": 13, - "name": null, - "generatedText": "z2", - "sourceText": "z2" - }, - { - "generatedLine": 7, - "generatedColumn": 29, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 7, - "originalColumn": 18, - "name": null, - "generatedText": ": number", - "sourceText": " = 10" - }, - { - "generatedLine": 7, - "generatedColumn": 30, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 7, - "originalColumn": 19, - "name": null, - "generatedText": ";", - "sourceText": ";" - }, - { - "generatedLine": 8, - "generatedColumn": 0, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 8, - "originalColumn": 0, - "name": null - }, - { - "generatedLine": 8, - "generatedColumn": 15, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 8, - "originalColumn": 7, - "name": null, - "generatedText": "export declare ", - "sourceText": "export " - }, - { - "generatedLine": 8, - "generatedColumn": 19, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 8, - "originalColumn": 11, - "name": null, - "generatedText": "var ", - "sourceText": "var " - }, - { - "generatedLine": 8, - "generatedColumn": 23, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 8, - "originalColumn": 15, - "name": null, - "generatedText": "aaaa", - "sourceText": "aaaa" - }, - { - "generatedLine": 8, - "generatedColumn": 31, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 8, - "originalColumn": 20, - "name": null, - "generatedText": ": number", - "sourceText": " = 10" - }, - { - "generatedLine": 8, - "generatedColumn": 32, - "lastGeneratedColumn": null, - "source": "server.ts", - "originalLine": 8, - "originalColumn": 21, - "name": null, - "generatedText": ";", - "sourceText": ";" - } - ] -} \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/accessorBodyInTypeContext.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/accessorBodyInTypeContext.d.ts.diff deleted file mode 100644 index 6c0726e3f59fc..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/accessorBodyInTypeContext.d.ts.diff +++ /dev/null @@ -1,25 +0,0 @@ -// [[Reason: Syntactically invalid.]] //// - -//// [tests/cases/compiler/accessorBodyInTypeContext.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,15 +1,15 @@ - - - //// [accessorBodyInTypeContext.d.ts] - type A = { -- get foo(): number; -+ get foo(): any; - }; - type B = { - set foo(v: any); - }; - interface X { -- get foo(): number; -+ get foo(): any; - } - interface Y { - set foo(v: any); - } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff deleted file mode 100644 index 6fe1e9716049a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts.diff +++ /dev/null @@ -1,32 +0,0 @@ -// [[Reason: TSC adds import for augmentation, DTE can't know about the augmentation.]] //// - -//// [tests/cases/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -15,9 +15,8 @@ - - /// [Errors] //// - - child1.ts(9,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. --parent.ts(1,1): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - - ==== child1.ts (1 errors) ==== - import { ParentThing } from './parent'; -@@ -33,12 +32,10 @@ - !!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - prototype.add = (a: number, b: number) => a + b; - } - --==== parent.ts (1 errors) ==== -+==== parent.ts (0 errors) ==== - import { child1 } from './child1'; // this import should still exist in some form in the output, since it augments this module -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - export class ParentThing implements ParentThing {} - - child1(ParentThing.prototype); -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrors.d.ts.diff deleted file mode 100644 index 708a5a4d22af3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrors.d.ts.diff +++ /dev/null @@ -1,21 +0,0 @@ -// [[Reason: undefined]] //// - -//// [tests/cases/compiler/isolatedDeclarationErrors.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,12 +1,9 @@ - - - //// [isolatedDeclarationErrors.d.ts] - declare function Foo(): void; --declare const fn: { -- (): void; -- a: string; --}; -+declare const fn: invalid; - - /// [Errors] //// - - isolatedDeclarationErrors.ts(2,1): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/accessorBodyInTypeContext.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/accessorBodyInTypeContext.d.ts deleted file mode 100644 index 012614d0f5d04..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/accessorBodyInTypeContext.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -//// [tests/cases/compiler/accessorBodyInTypeContext.ts] //// - -//// [accessorBodyInTypeContext.ts] -type A = { - get foo() { return 0 } -}; - -type B = { - set foo(v: any) { } -}; - -interface X { - get foo() { return 0 } -} - -interface Y { - set foo(v: any) { } -} - - - -/// [Declarations] //// - - - -//// [accessorBodyInTypeContext.d.ts] -type A = { - get foo(): any; -}; -type B = { - set foo(v: any); -}; -interface X { - get foo(): any; -} -interface Y { - set foo(v: any); -} - -/// [Errors] //// - -accessorBodyInTypeContext.ts(2,15): error TS1183: An implementation cannot be declared in ambient contexts. -accessorBodyInTypeContext.ts(6,21): error TS1183: An implementation cannot be declared in ambient contexts. -accessorBodyInTypeContext.ts(10,15): error TS1183: An implementation cannot be declared in ambient contexts. -accessorBodyInTypeContext.ts(14,21): error TS1183: An implementation cannot be declared in ambient contexts. - - -==== accessorBodyInTypeContext.ts (4 errors) ==== - type A = { - get foo() { return 0 } - ~~~~~~~~~~~~ -!!! error TS1183: An implementation cannot be declared in ambient contexts. - }; - - type B = { - set foo(v: any) { } - ~~~ -!!! error TS1183: An implementation cannot be declared in ambient contexts. - }; - - interface X { - get foo() { return 0 } - ~~~~~~~~~~~~ -!!! error TS1183: An implementation cannot be declared in ambient contexts. - } - - interface Y { - set foo(v: any) { } - ~~~ -!!! error TS1183: An implementation cannot be declared in ambient contexts. - } - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts deleted file mode 100644 index e6ed98dd2c5a5..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -//// [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) { - 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): invalid; - -//// [/.src/parent.d.ts] -export declare class ParentThing implements ParentThing { -} - -/// [Errors] //// - -child1.ts(9,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== child1.ts (1 errors) ==== - import { ParentThing } from './parent'; - - declare module './parent' { - interface ParentThing { - add: (a: number, b: number) => number; - } - } - - export function child1(prototype: ParentThing) { - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - prototype.add = (a: number, b: number) => a + b; - } - -==== parent.ts (0 errors) ==== - 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); \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrors.d.ts deleted file mode 100644 index 46bd678e31efa..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrors.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/compiler/isolatedDeclarationErrors.ts] //// - -//// [isolatedDeclarationErrors.ts] -function Foo(): void {} -Foo.a = ""; - -const fn = (): void => {} -fn.a = ""; - -/// [Declarations] //// - - - -//// [isolatedDeclarationErrors.d.ts] -declare function Foo(): void; -declare const fn: invalid; - -/// [Errors] //// - -isolatedDeclarationErrors.ts(2,1): error TS9009: 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 TS9009: 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 (2 errors) ==== - function Foo(): void {} - Foo.a = ""; - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - - const fn = (): void => {} - fn.a = ""; - ~~~~ -!!! error TS9009: 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/original/tsc/accessorBodyInTypeContext.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/accessorBodyInTypeContext.d.ts deleted file mode 100644 index 3c3c662f59479..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/accessorBodyInTypeContext.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -//// [tests/cases/compiler/accessorBodyInTypeContext.ts] //// - -//// [accessorBodyInTypeContext.ts] -type A = { - get foo() { return 0 } -}; - -type B = { - set foo(v: any) { } -}; - -interface X { - get foo() { return 0 } -} - -interface Y { - set foo(v: any) { } -} - - - -/// [Declarations] //// - - - -//// [accessorBodyInTypeContext.d.ts] -type A = { - get foo(): number; -}; -type B = { - set foo(v: any); -}; -interface X { - get foo(): number; -} -interface Y { - set foo(v: any); -} - -/// [Errors] //// - -accessorBodyInTypeContext.ts(2,15): error TS1183: An implementation cannot be declared in ambient contexts. -accessorBodyInTypeContext.ts(6,21): error TS1183: An implementation cannot be declared in ambient contexts. -accessorBodyInTypeContext.ts(10,15): error TS1183: An implementation cannot be declared in ambient contexts. -accessorBodyInTypeContext.ts(14,21): error TS1183: An implementation cannot be declared in ambient contexts. - - -==== accessorBodyInTypeContext.ts (4 errors) ==== - type A = { - get foo() { return 0 } - ~~~~~~~~~~~~ -!!! error TS1183: An implementation cannot be declared in ambient contexts. - }; - - type B = { - set foo(v: any) { } - ~~~ -!!! error TS1183: An implementation cannot be declared in ambient contexts. - }; - - interface X { - get foo() { return 0 } - ~~~~~~~~~~~~ -!!! error TS1183: An implementation cannot be declared in ambient contexts. - } - - interface Y { - set foo(v: any) { } - ~~~ -!!! error TS1183: An implementation cannot be declared in ambient contexts. - } - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts deleted file mode 100644 index 6629429cd1ed6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitForModuleImportingModuleAugmentationRetainsImport.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -//// [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) { - 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): invalid; - -//// [/.src/parent.d.ts] -export declare class ParentThing implements ParentThing { -} - -/// [Errors] //// - -child1.ts(9,17): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. -parent.ts(1,1): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - -==== child1.ts (1 errors) ==== - import { ParentThing } from './parent'; - - declare module './parent' { - interface ParentThing { - add: (a: number, b: number) => number; - } - } - - export function child1(prototype: ParentThing) { - ~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - prototype.add = (a: number, b: number) => a + b; - } - -==== parent.ts (1 errors) ==== - import { child1 } from './child1'; // this import should still exist in some form in the output, since it augments this module - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. - - export class ParentThing implements ParentThing {} - - child1(ParentThing.prototype); \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrors.d.ts deleted file mode 100644 index 7b23bb67de42b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrors.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -//// [tests/cases/compiler/isolatedDeclarationErrors.ts] //// - -//// [isolatedDeclarationErrors.ts] -function Foo(): void {} -Foo.a = ""; - -const fn = (): void => {} -fn.a = ""; - -/// [Declarations] //// - - - -//// [isolatedDeclarationErrors.d.ts] -declare function Foo(): void; -declare const fn: { - (): void; - a: string; -}; - -/// [Errors] //// - -isolatedDeclarationErrors.ts(2,1): error TS9009: 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 TS9009: 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 (2 errors) ==== - function Foo(): void {} - Foo.a = ""; - ~~~~~ -!!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - - const fn = (): void => {} - fn.a = ""; - ~~~~ -!!! error TS9009: 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/cases/compiler/accessorBodyInTypeContext.ts b/tests/cases/compiler/accessorBodyInTypeContext.ts index 88a9c47360a06..bfbc183077af4 100644 --- a/tests/cases/compiler/accessorBodyInTypeContext.ts +++ b/tests/cases/compiler/accessorBodyInTypeContext.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Syntactically invalid. type A = { get foo() { return 0 } }; diff --git a/tests/cases/compiler/declFileRegressionTests.ts b/tests/cases/compiler/declFileRegressionTests.ts index 1cd0affff7a76..4d19696bacfa2 100644 --- a/tests/cases/compiler/declFileRegressionTests.ts +++ b/tests/cases/compiler/declFileRegressionTests.ts @@ -1,5 +1,4 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // 'null' not converted to 'any' in d.ts // function types not piped through correctly var n = { w: null, x: '', y: () => { }, z: 32 }; diff --git a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts index 77c7fa764abdc..89e5b65a9d3b3 100644 --- a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts +++ b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts @@ -1,5 +1,4 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed var { } = { x: 5, y: "hello" }; var { x4 } = { x4: 5, y4: "hello" }; diff --git a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts index 7fec471e91878..6a65c92546504 100644 --- a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts +++ b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts @@ -1,5 +1,4 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed var { } = { x: 5, y: "hello" }; var { x4 } = { x4: 5, y4: "hello" }; diff --git a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts index 94fa868e0b0e8..f700e68e39727 100644 --- a/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts +++ b/tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts @@ -1,5 +1,4 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed var { a: x11, b: { a: y11, b: { a: z11 }}} = { a: 1, b: { a: "hello", b: { a: true } } }; diff --git a/tests/cases/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts b/tests/cases/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts index a07f71ccadd58..bdb0404f5a0b8 100644 --- a/tests/cases/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts +++ b/tests/cases/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts @@ -1,5 +1,4 @@ // @declaration: true -// @isolatedDeclarationDiffReason: TSC adds import for augmentation, DTE can't know about the augmentation. // @isolatedDeclarationFixedDiffReason: TSC adds import for augmentation, DTE can't know about the augmentation. // @filename: child1.ts diff --git a/tests/cases/compiler/declarationEmitInferredDefaultExportType2.ts b/tests/cases/compiler/declarationEmitInferredDefaultExportType2.ts index 77dd225eb17c7..274996cbe1291 100644 --- a/tests/cases/compiler/declarationEmitInferredDefaultExportType2.ts +++ b/tests/cases/compiler/declarationEmitInferredDefaultExportType2.ts @@ -1,6 +1,5 @@ // @declaration: true // @module: commonjs -// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // test.ts export = { diff --git a/tests/cases/compiler/escapedReservedCompilerNamedIdentifier.ts b/tests/cases/compiler/escapedReservedCompilerNamedIdentifier.ts index 30334957cec08..da874acf73a7c 100644 --- a/tests/cases/compiler/escapedReservedCompilerNamedIdentifier.ts +++ b/tests/cases/compiler/escapedReservedCompilerNamedIdentifier.ts @@ -1,5 +1,4 @@ //@declaration: true -// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // double underscores var __proto__ = 10; var o = { diff --git a/tests/cases/compiler/stringLiteralObjectLiteralDeclaration1.ts b/tests/cases/compiler/stringLiteralObjectLiteralDeclaration1.ts index 15d330358f4c1..2d88a86f791ca 100644 --- a/tests/cases/compiler/stringLiteralObjectLiteralDeclaration1.ts +++ b/tests/cases/compiler/stringLiteralObjectLiteralDeclaration1.ts @@ -1,5 +1,4 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed module m1 { export var n = { 'foo bar': 4 }; } diff --git a/tests/cases/compiler/vardecl.ts b/tests/cases/compiler/vardecl.ts index 23c12c0e5227f..e5b96d6ef6d18 100644 --- a/tests/cases/compiler/vardecl.ts +++ b/tests/cases/compiler/vardecl.ts @@ -1,5 +1,4 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed var simpleVar; var anotherVar: any; diff --git a/tests/cases/compiler/withExportDecl.ts b/tests/cases/compiler/withExportDecl.ts index c4510ecd23a7b..f3c926ad7071a 100644 --- a/tests/cases/compiler/withExportDecl.ts +++ b/tests/cases/compiler/withExportDecl.ts @@ -1,6 +1,5 @@ //@module: amd // @declaration: true -// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed var simpleVar; export var exportedSimpleVar; diff --git a/tests/cases/conformance/controlFlow/controlFlowAliasing.ts b/tests/cases/conformance/controlFlow/controlFlowAliasing.ts index f828111aab6a1..b32f80abae94f 100644 --- a/tests/cases/conformance/controlFlow/controlFlowAliasing.ts +++ b/tests/cases/conformance/controlFlow/controlFlowAliasing.ts @@ -1,6 +1,5 @@ // @strict: true // @declaration: true -// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed // Narrowing by aliased conditional expressions diff --git a/tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts b/tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts index 0bedb337e65af..306e116bde80e 100644 --- a/tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts +++ b/tests/cases/conformance/salsa/typeFromPropertyAssignment36.ts @@ -1,6 +1,4 @@ // @strict: true -// @isolatedDeclarationFixedDiffReason: TODO Need to fix DTE looking recursively for assigned members. -// @isolatedDeclarationDiffReason: TODO Need to fix DTE looking recursively for assigned members. function f(b: boolean) { function d() { diff --git a/tests/cases/conformance/types/literal/templateLiteralTypes2.ts b/tests/cases/conformance/types/literal/templateLiteralTypes2.ts index 39e36003644ac..e353afa1d5deb 100644 --- a/tests/cases/conformance/types/literal/templateLiteralTypes2.ts +++ b/tests/cases/conformance/types/literal/templateLiteralTypes2.ts @@ -1,6 +1,5 @@ // @strict: true // @declaration: true -// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed function ft1(s: string, n: number, u: 'foo' | 'bar' | 'baz', t: T) { const c1 = `abc${s}`; diff --git a/tests/cases/conformance/types/thisType/thisTypeInObjectLiterals2.ts b/tests/cases/conformance/types/thisType/thisTypeInObjectLiterals2.ts index a4c4ad48d1ed4..27861f81da6a6 100644 --- a/tests/cases/conformance/types/thisType/thisTypeInObjectLiterals2.ts +++ b/tests/cases/conformance/types/thisType/thisTypeInObjectLiterals2.ts @@ -1,7 +1,6 @@ // @declaration: true // @strict: true // @target: es5 -// @isolatedDeclarationDiffReason: Sourcemap is more detailed // In methods of an object literal with no contextual type, 'this' has the type // of the object literal. From d99cdf5c840a5bc5ad41dd41a942c320d3f69196 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 12 Dec 2023 11:59:32 +0000 Subject: [PATCH 190/224] Minor fixes to code. Signed-off-by: Titian Cernicova-Dragomir --- .../transformers/declarations/emitResolver.ts | 2 +- src/testRunner/compilerRunner.ts | 51 ++++--------------- src/testRunner/parallel/host.ts | 2 +- .../reference/ES5SymbolProperty6.errors.txt | 10 ++-- .../baselines/reference/ES5SymbolProperty6.js | 2 - .../reference/ES5SymbolProperty6.symbols | 7 ++- .../reference/ES5SymbolProperty6.types | 3 -- .../diff/ES5SymbolProperty6.d.ts.diff | 18 +++---- .../original/dte/ES5SymbolProperty6.d.ts | 15 ++---- .../original/tsc/ES5SymbolProperty6.d.ts | 11 ++-- .../conformance/Symbols/ES5SymbolProperty6.ts | 2 +- 11 files changed, 34 insertions(+), 89 deletions(-) diff --git a/src/compiler/transformers/declarations/emitResolver.ts b/src/compiler/transformers/declarations/emitResolver.ts index 1c9f21f9bb8a6..de4d3f641b9d1 100644 --- a/src/compiler/transformers/declarations/emitResolver.ts +++ b/src/compiler/transformers/declarations/emitResolver.ts @@ -394,4 +394,4 @@ export function createEmitDeclarationResolver(file: SourceFile): CoreEmitResolve return false; } - } +} diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 096804e1bcb66..6ebdad8122c7e 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -713,48 +713,17 @@ class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest { } env.compilerOptions.forceDtsEmit = false; - const autoFixCacheTest = ts.combinePaths("tests/auto-fixed", compilerEnvironment.configuredName); - const existingTransformedTest = IO.readFile(autoFixCacheTest); - const hash = ts.sys.createHash!(env.testCaseContent.sourceCode); - const fixedTest = existingTransformedTest && TestCaseParser.makeUnitsFromTest(existingTransformedTest, compilerEnvironment.fileName); - let transformSucceeded = true; - let hasReferenceDirectiveErrors = false; - if (fixedTest && fixedTest.settings.hash === hash + "!") { - transformSucceeded = fixedTest.settings.succeeded !== "false"; - hasReferenceDirectiveErrors = fixedTest.settings.hasReferenceDirectiveErrors !== "false"; - if (transformSucceeded) { - env.allFiles = env.allFiles.map(f => { - const testUnit = fixedTest.testUnitData.find(t => t.name === f.unitName); - ts.Debug.assert(testUnit, "All files should be in the cached auto fixed version of the test"); - env.fileSystem.writeFileSync(testUnit.name, testUnit.content); - return this.createHarnessTestFile(testUnit); - }); - env.otherFiles = env.otherFiles.map(o => env.allFiles.find(f => f.unitName === o.unitName)!); - env.toBeCompiled = env.toBeCompiled.map(o => env.allFiles.find(f => f.unitName === o.unitName)!); - } + 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; } - else { - const fixerOptions = ts.cloneCompilerOptions(env.compilerOptions); - fixerOptions.isolatedDeclarations = true; - const fixResults = fixTestFiles(env.fileSystem, env.programFileNames, fixerOptions); - let cachedTest = "// @hash: " + hash + "\n"; - if (!fixResults.success) { - transformSucceeded = false; - cachedTest += "// @succeeded: false\n"; - } - else { - hasReferenceDirectiveErrors = fixResults.unfixedDiagnostics.some(d => FixedIsolatedDeclarationTest.referenceDirectiveErrors.has(d.code)); - cachedTest += "// @hasReferenceDirectiveErrors: " + hasReferenceDirectiveErrors + "\n"; - for (const file of env.allFiles) { - cachedTest += "\n// @fileName: " + file.unitName + "\n"; - const content = env.fileSystem.readFileSync(file.unitName, "utf-8"); - file.content = content; - cachedTest += content; - } - } - IO.writeFile(autoFixCacheTest, cachedTest); - } - if (!transformSucceeded || hasReferenceDirectiveErrors) { + + if (!fixResults.success || hasReferenceDirectiveErrors) { return undefined; } env.fileSystem.makeReadonly(); diff --git a/src/testRunner/parallel/host.ts b/src/testRunner/parallel/host.ts index 035fc21f46652..126e06cff4e4a 100644 --- a/src/testRunner/parallel/host.ts +++ b/src/testRunner/parallel/host.ts @@ -34,7 +34,7 @@ export function start() { const readline = require("readline") as typeof import("readline"); const os = require("os") as typeof import("os"); const tty = require("tty") as typeof import("tty"); - const isatty = (tty.isatty(1) && tty.isatty(2)) || !process.env.IS_TTY; + const isatty = tty.isatty(1) && tty.isatty(2); const path = require("path") as typeof import("path"); const { fork } = require("child_process") as typeof import("child_process"); const { statSync } = require("fs") as typeof import("fs"); diff --git a/tests/baselines/reference/ES5SymbolProperty6.errors.txt b/tests/baselines/reference/ES5SymbolProperty6.errors.txt index 08c9488dfbb0a..3b575eaf033eb 100644 --- a/tests/baselines/reference/ES5SymbolProperty6.errors.txt +++ b/tests/baselines/reference/ES5SymbolProperty6.errors.txt @@ -1,12 +1,8 @@ -ES5SymbolProperty6.ts(1,1): error TS2304: Cannot find name 'u'. -ES5SymbolProperty6.ts(3,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -ES5SymbolProperty6.ts(6,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +ES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +ES5SymbolProperty6.ts(5,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -==== ES5SymbolProperty6.ts (3 errors) ==== - u//@target: ES5 - ~ -!!! error TS2304: Cannot find name 'u'. +==== ES5SymbolProperty6.ts (2 errors) ==== class C { [Symbol.iterator]() { } ~~~~~~ diff --git a/tests/baselines/reference/ES5SymbolProperty6.js b/tests/baselines/reference/ES5SymbolProperty6.js index 8210dd547f614..d167efaa059f2 100644 --- a/tests/baselines/reference/ES5SymbolProperty6.js +++ b/tests/baselines/reference/ES5SymbolProperty6.js @@ -1,7 +1,6 @@ //// [tests/cases/conformance/Symbols/ES5SymbolProperty6.ts] //// //// [ES5SymbolProperty6.ts] -u//@target: ES5 class C { [Symbol.iterator]() { } } @@ -9,7 +8,6 @@ class C { (new C)[Symbol.iterator] //// [ES5SymbolProperty6.js] -u; //@target: ES5 var C = /** @class */ (function () { function C() { } diff --git a/tests/baselines/reference/ES5SymbolProperty6.symbols b/tests/baselines/reference/ES5SymbolProperty6.symbols index e433d002a7b6f..9083c8637b018 100644 --- a/tests/baselines/reference/ES5SymbolProperty6.symbols +++ b/tests/baselines/reference/ES5SymbolProperty6.symbols @@ -1,14 +1,13 @@ //// [tests/cases/conformance/Symbols/ES5SymbolProperty6.ts] //// === ES5SymbolProperty6.ts === -u//@target: ES5 class C { ->C : Symbol(C, Decl(ES5SymbolProperty6.ts, 0, 1)) +>C : Symbol(C, Decl(ES5SymbolProperty6.ts, 0, 0)) [Symbol.iterator]() { } ->[Symbol.iterator] : Symbol(C[Symbol.iterator], Decl(ES5SymbolProperty6.ts, 1, 9)) +>[Symbol.iterator] : Symbol(C[Symbol.iterator], Decl(ES5SymbolProperty6.ts, 0, 9)) } (new C)[Symbol.iterator] ->C : Symbol(C, Decl(ES5SymbolProperty6.ts, 0, 1)) +>C : Symbol(C, Decl(ES5SymbolProperty6.ts, 0, 0)) diff --git a/tests/baselines/reference/ES5SymbolProperty6.types b/tests/baselines/reference/ES5SymbolProperty6.types index abd358cbb1b41..efbb66ceb6647 100644 --- a/tests/baselines/reference/ES5SymbolProperty6.types +++ b/tests/baselines/reference/ES5SymbolProperty6.types @@ -1,9 +1,6 @@ //// [tests/cases/conformance/Symbols/ES5SymbolProperty6.ts] //// === ES5SymbolProperty6.ts === -u//@target: ES5 ->u : any - class C { >C : C diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty6.d.ts.diff index 89d3b84330f9e..dc841d5adbb45 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty6.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -1,23 +1,28 @@ +@@ -1,19 +1,24 @@ //// [ES5SymbolProperty6.d.ts] @@ -15,22 +15,18 @@ /// [Errors] //// - ES5SymbolProperty6.ts(1,1): error TS2304: Cannot find name 'u'. -+ES5SymbolProperty6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - ES5SymbolProperty6.ts(3,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ES5SymbolProperty6.ts(6,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. ++ES5SymbolProperty6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + ES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. + ES5SymbolProperty6.ts(5,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. --==== ES5SymbolProperty6.ts (3 errors) ==== -+==== ES5SymbolProperty6.ts (4 errors) ==== - u//@target: ES5 - ~ - !!! error TS2304: Cannot find name 'u'. +-==== ES5SymbolProperty6.ts (2 errors) ==== ++==== ES5SymbolProperty6.ts (3 errors) ==== class C { [Symbol.iterator]() { } + ~~~~~~~~~~~~~~~~~ +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -+!!! related TS9034 ES5SymbolProperty6.ts:3:5: Add a return type to the method ++!!! related TS9034 ES5SymbolProperty6.ts:2:5: Add a return type to the method ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty6.d.ts index b48420584c07f..bac33bbb3b864 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty6.d.ts @@ -1,7 +1,6 @@ //// [tests/cases/conformance/Symbols/ES5SymbolProperty6.ts] //// //// [ES5SymbolProperty6.ts] -u//@target: ES5 class C { [Symbol.iterator]() { } } @@ -19,21 +18,17 @@ declare class C { /// [Errors] //// -ES5SymbolProperty6.ts(1,1): error TS2304: Cannot find name 'u'. -ES5SymbolProperty6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -ES5SymbolProperty6.ts(3,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -ES5SymbolProperty6.ts(6,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +ES5SymbolProperty6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +ES5SymbolProperty6.ts(5,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -==== ES5SymbolProperty6.ts (4 errors) ==== - u//@target: ES5 - ~ -!!! error TS2304: Cannot find name 'u'. +==== ES5SymbolProperty6.ts (3 errors) ==== class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9034 ES5SymbolProperty6.ts:3:5: Add a return type to the method +!!! related TS9034 ES5SymbolProperty6.ts:2:5: Add a return type to the method ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty6.d.ts index cb3f8d6f1b6b4..17967cf86260f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty6.d.ts @@ -1,7 +1,6 @@ //// [tests/cases/conformance/Symbols/ES5SymbolProperty6.ts] //// //// [ES5SymbolProperty6.ts] -u//@target: ES5 class C { [Symbol.iterator]() { } } @@ -18,15 +17,11 @@ declare class C { /// [Errors] //// -ES5SymbolProperty6.ts(1,1): error TS2304: Cannot find name 'u'. -ES5SymbolProperty6.ts(3,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -ES5SymbolProperty6.ts(6,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +ES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. +ES5SymbolProperty6.ts(5,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -==== ES5SymbolProperty6.ts (3 errors) ==== - u//@target: ES5 - ~ -!!! error TS2304: Cannot find name 'u'. +==== ES5SymbolProperty6.ts (2 errors) ==== class C { [Symbol.iterator]() { } ~~~~~~ diff --git a/tests/cases/conformance/Symbols/ES5SymbolProperty6.ts b/tests/cases/conformance/Symbols/ES5SymbolProperty6.ts index 2a9abf242382d..20c0fdc0165f1 100644 --- a/tests/cases/conformance/Symbols/ES5SymbolProperty6.ts +++ b/tests/cases/conformance/Symbols/ES5SymbolProperty6.ts @@ -1,5 +1,5 @@ // @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC -u//@target: ES5 +//@target: ES5 class C { [Symbol.iterator]() { } } From 857f90bda4a6ee5f5522d85c79f82dc4727ad59f Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 12 Dec 2023 21:23:01 +0000 Subject: [PATCH 191/224] Updated error messages. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/diagnosticMessages.json | 50 +- src/compiler/transformers/declarations.ts | 6 +- src/harness/isolatedDeclarationFixer.ts | 2 +- src/testRunner/compilerRunner.ts | 6 +- .../computedPropertiesNarrowed.errors.txt | 36 +- ...FlatNoCrashInferenceDeclarations.d.ts.diff | 6 +- .../diff/computedEnumTypeWidening.d.ts.diff | 16 +- .../auto-fixed/diff/constEnum2.d.ts.diff | 12 +- .../auto-fixed/diff/declFileEnums.d.ts.diff | 4 +- ...EmitCommonJsModuleReferencedType.d.ts.diff | 6 +- ...EmitForGlobalishSpecifierSymlink.d.ts.diff | 6 +- ...mitForGlobalishSpecifierSymlink2.d.ts.diff | 6 +- ...onEmitReexportedSymlinkReference.d.ts.diff | 6 +- ...nEmitReexportedSymlinkReference2.d.ts.diff | 6 +- ...nEmitReexportedSymlinkReference3.d.ts.diff | 6 +- ...mitWithInvalidPackageJsonTypings.d.ts.diff | 8 +- .../diff/declarationFiles.d.ts.diff | 8 +- .../diff/enumClassification.d.ts.diff | 16 +- ...hTemplateLiteralsEmitDeclaration.d.ts.diff | 4 +- ...isolatedDeclarationErrorsClasses.d.ts.diff | 12 +- ...rtsSpecifierGenerationConditions.d.ts.diff | 8 +- ...ecifierResolution(module=node16).d.ts.diff | 6 +- ...ifierResolution(module=nodenext).d.ts.diff | 6 +- ...esExportsSourceTs(module=node16).d.ts.diff | 6 +- ...ExportsSourceTs(module=nodenext).d.ts.diff | 6 +- ...erationConditions(module=node16).d.ts.diff | 6 +- ...ationConditions(module=nodenext).d.ts.diff | 6 +- ...nerationDirectory(module=node16).d.ts.diff | 6 +- ...rationDirectory(module=nodenext).d.ts.diff | 6 +- ...GenerationPattern(module=node16).d.ts.diff | 6 +- ...nerationPattern(module=nodenext).d.ts.diff | 6 +- .../diff/numericEnumMappedType.d.ts.diff | 16 +- .../diff/symbolDeclarationEmit12.d.ts.diff | 10 +- ...larationEmitModuleNamesImportRef.d.ts.diff | 6 +- .../diff/templateLiteralTypes4.d.ts.diff | 8 +- ...ersionsDeclarationEmit.multiFile.d.ts.diff | 12 +- ...mit.multiFileBackReferenceToSelf.d.ts.diff | 6 +- ...multiFileBackReferenceToUnmapped.d.ts.diff | 12 +- ...yFakeFlatNoCrashInferenceDeclarations.d.ts | 6 +- .../dte/computedEnumTypeWidening.d.ts | 16 +- .../auto-fixed/dte/constEnum2.d.ts | 12 +- .../auto-fixed/dte/declFileEnums.d.ts | 4 +- ...ationEmitCommonJsModuleReferencedType.d.ts | 6 +- ...ationEmitForGlobalishSpecifierSymlink.d.ts | 6 +- ...tionEmitForGlobalishSpecifierSymlink2.d.ts | 6 +- ...arationEmitReexportedSymlinkReference.d.ts | 6 +- ...rationEmitReexportedSymlinkReference2.d.ts | 6 +- ...rationEmitReexportedSymlinkReference3.d.ts | 6 +- ...tionEmitWithInvalidPackageJsonTypings.d.ts | 8 +- .../auto-fixed/dte/declarationFiles.d.ts | 8 +- .../auto-fixed/dte/enumClassification.d.ts | 16 +- ...erWithTemplateLiteralsEmitDeclaration.d.ts | 4 +- .../dte/isolatedDeclarationErrorsClasses.d.ts | 12 +- ...sExportsSpecifierGenerationConditions.d.ts | 8 +- ...cksSpecifierResolution(module=node16).d.ts | 6 +- ...sSpecifierResolution(module=nodenext).d.ts | 6 +- ...ModulesExportsSourceTs(module=node16).d.ts | 6 +- ...dulesExportsSourceTs(module=nodenext).d.ts | 6 +- ...erGenerationConditions(module=node16).d.ts | 6 +- ...GenerationConditions(module=nodenext).d.ts | 6 +- ...ierGenerationDirectory(module=node16).d.ts | 6 +- ...rGenerationDirectory(module=nodenext).d.ts | 6 +- ...ifierGenerationPattern(module=node16).d.ts | 6 +- ...ierGenerationPattern(module=nodenext).d.ts | 6 +- .../auto-fixed/dte/numericEnumMappedType.d.ts | 16 +- .../dte/symbolDeclarationEmit12.d.ts | 10 +- ...nkDeclarationEmitModuleNamesImportRef.d.ts | 6 +- .../auto-fixed/dte/templateLiteralTypes4.d.ts | 8 +- ...ypesVersionsDeclarationEmit.multiFile.d.ts | 12 +- ...tionEmit.multiFileBackReferenceToSelf.d.ts | 6 +- ...Emit.multiFileBackReferenceToUnmapped.d.ts | 12 +- .../diff/ES5For-ofTypeCheck10.d.ts.diff | 6 +- .../diff/ES5SymbolProperty1.d.ts.diff | 6 +- .../diff/ES5SymbolProperty2.d.ts.diff | 8 +- .../diff/ES5SymbolProperty3.d.ts.diff | 8 +- .../diff/ES5SymbolProperty4.d.ts.diff | 8 +- .../diff/ES5SymbolProperty5.d.ts.diff | 8 +- .../diff/ES5SymbolProperty6.d.ts.diff | 4 +- .../diff/ES5SymbolProperty7.d.ts.diff | 8 +- .../diff/FunctionDeclaration8_es6.d.ts.diff | 8 +- .../MemberFunctionDeclaration3_es6.d.ts.diff | 4 +- .../original/diff/asOperator1.d.ts.diff | 2 +- ...asyncFunctionDeclaration8_es2017.d.ts.diff | 8 +- .../asyncFunctionDeclaration8_es5.d.ts.diff | 8 +- .../asyncFunctionDeclaration8_es6.d.ts.diff | 8 +- .../original/diff/bigintIndex.d.ts.diff | 10 +- .../diff/booleanFilterAnyArray.d.ts.diff | 2 +- ...apturedParametersInInitializers1.d.ts.diff | 20 +- .../diff/computedPropertiesNarrowed.d.ts.diff | 30 +- .../computedPropertyNames10_ES5.d.ts.diff | 68 +- .../computedPropertyNames10_ES6.d.ts.diff | 68 +- .../computedPropertyNames11_ES5.d.ts.diff | 64 +- .../computedPropertyNames11_ES6.d.ts.diff | 64 +- .../computedPropertyNames12_ES5.d.ts.diff | 18 +- .../computedPropertyNames12_ES6.d.ts.diff | 18 +- .../computedPropertyNames13_ES5.d.ts.diff | 34 +- .../computedPropertyNames13_ES6.d.ts.diff | 34 +- .../computedPropertyNames14_ES5.d.ts.diff | 16 +- .../computedPropertyNames14_ES6.d.ts.diff | 16 +- .../computedPropertyNames15_ES5.d.ts.diff | 24 +- .../computedPropertyNames15_ES6.d.ts.diff | 24 +- .../computedPropertyNames16_ES5.d.ts.diff | 42 +- .../computedPropertyNames16_ES6.d.ts.diff | 42 +- .../computedPropertyNames17_ES5.d.ts.diff | 20 +- .../computedPropertyNames17_ES6.d.ts.diff | 20 +- .../diff/computedPropertyNames2_ES5.d.ts.diff | 48 +- .../diff/computedPropertyNames2_ES6.d.ts.diff | 48 +- .../diff/computedPropertyNames4_ES5.d.ts.diff | 44 +- .../diff/computedPropertyNames4_ES6.d.ts.diff | 44 +- .../diff/computedPropertyNames5_ES5.d.ts.diff | 20 +- .../diff/computedPropertyNames5_ES6.d.ts.diff | 20 +- .../diff/computedPropertyNames6_ES5.d.ts.diff | 18 +- .../diff/computedPropertyNames6_ES6.d.ts.diff | 18 +- ...utedPropertyNamesOnOverloads_ES5.d.ts.diff | 20 +- ...utedPropertyNamesOnOverloads_ES6.d.ts.diff | 20 +- ...dPropertyNamesWithStaticProperty.d.ts.diff | 16 +- .../original/diff/constEnumErrors.d.ts.diff | 6 +- .../decoratorsOnComputedProperties.d.ts.diff | 64 +- .../original/diff/forwardRefInEnum.d.ts.diff | 12 +- ...isolatedDeclarationErrorsClasses.d.ts.diff | 42 +- ...isolatedDeclarationErrorsObjects.d.ts.diff | 34 +- ...omUsingES6FeaturesWithOnlyES5Lib.d.ts.diff | 30 +- ...ithSuffixes_one_externalTSModule.d.ts.diff | 6 +- .../diff/overloadsWithComputedNames.d.ts.diff | 22 +- .../parserComputedPropertyName1.d.ts.diff | 6 +- .../parserComputedPropertyName11.d.ts.diff | 4 +- .../parserComputedPropertyName12.d.ts.diff | 4 +- .../parserComputedPropertyName17.d.ts.diff | 10 +- .../parserComputedPropertyName2.d.ts.diff | 6 +- .../parserComputedPropertyName24.d.ts.diff | 6 +- .../parserComputedPropertyName25.d.ts.diff | 6 +- .../parserComputedPropertyName29.d.ts.diff | 6 +- .../parserComputedPropertyName3.d.ts.diff | 12 +- .../parserComputedPropertyName33.d.ts.diff | 6 +- .../parserComputedPropertyName37.d.ts.diff | 6 +- .../parserComputedPropertyName38.d.ts.diff | 4 +- .../parserComputedPropertyName39.d.ts.diff | 4 +- .../parserComputedPropertyName4.d.ts.diff | 12 +- .../parserComputedPropertyName5.d.ts.diff | 12 +- .../parserComputedPropertyName6.d.ts.diff | 10 +- .../parserComputedPropertyName7.d.ts.diff | 6 +- .../parserComputedPropertyName8.d.ts.diff | 6 +- .../parserES5ComputedPropertyName11.d.ts.diff | 4 +- .../parserES5ComputedPropertyName2.d.ts.diff | 6 +- .../parserES5ComputedPropertyName3.d.ts.diff | 12 +- .../parserES5ComputedPropertyName4.d.ts.diff | 12 +- .../parserES5ComputedPropertyName7.d.ts.diff | 6 +- .../original/diff/parserStrictMode8.d.ts.diff | 6 +- .../diff/superSymbolIndexedAccess1.d.ts.diff | 18 +- .../diff/superSymbolIndexedAccess3.d.ts.diff | 18 +- .../diff/superSymbolIndexedAccess4.d.ts.diff | 10 +- .../diff/superSymbolIndexedAccess5.d.ts.diff | 16 +- .../diff/superSymbolIndexedAccess6.d.ts.diff | 16 +- .../diff/symbolDeclarationEmit12.d.ts.diff | 10 +- .../original/diff/symbolProperty1.d.ts.diff | 30 +- .../original/diff/symbolProperty2.d.ts.diff | 36 +- .../original/diff/symbolProperty3.d.ts.diff | 36 +- .../original/diff/symbolProperty52.d.ts.diff | 6 +- .../original/diff/symbolProperty53.d.ts.diff | 6 +- .../original/diff/symbolProperty54.d.ts.diff | 6 +- .../original/diff/symbolProperty58.d.ts.diff | 6 +- .../typeFromPropertyAssignment32.d.ts.diff | 12 +- .../typeFromPropertyAssignment33.d.ts.diff | 12 +- .../diff/typeReferenceDirectives11.d.ts.diff | 2 +- .../diff/typeReferenceDirectives8.d.ts.diff | 4 +- .../original/dte/ES5For-ofTypeCheck10.d.ts | 8 +- .../original/dte/ES5SymbolProperty2.d.ts | 4 +- .../original/dte/ES5SymbolProperty3.d.ts | 4 +- .../original/dte/ES5SymbolProperty4.d.ts | 4 +- .../original/dte/ES5SymbolProperty5.d.ts | 4 +- .../original/dte/ES5SymbolProperty6.d.ts | 4 +- .../original/dte/ES5SymbolProperty7.d.ts | 4 +- .../dte/FunctionDeclaration8_es6.d.ts | 8 +- .../dte/MemberFunctionDeclaration3_es6.d.ts | 4 +- .../original/dte/arrayFind.d.ts | 6 +- .../original/dte/asOperator1.d.ts | 6 +- .../dte/asyncFunctionDeclaration8_es2017.d.ts | 8 +- .../dte/asyncFunctionDeclaration8_es5.d.ts | 8 +- .../dte/asyncFunctionDeclaration8_es6.d.ts | 8 +- .../original/dte/bigintIndex.d.ts | 12 +- .../original/dte/booleanFilterAnyArray.d.ts | 6 +- .../capturedParametersInInitializers1.d.ts | 112 +-- .../original/dte/complicatedPrivacy.d.ts | 38 +- .../dte/computedPropertiesNarrowed.d.ts | 30 +- .../dte/computedPropertyNames10_ES5.d.ts | 96 +-- .../dte/computedPropertyNames10_ES6.d.ts | 96 +-- .../dte/computedPropertyNames11_ES5.d.ts | 96 +-- .../dte/computedPropertyNames11_ES6.d.ts | 96 +-- .../dte/computedPropertyNames12_ES5.d.ts | 6 +- .../dte/computedPropertyNames12_ES6.d.ts | 6 +- .../dte/computedPropertyNames13_ES5.d.ts | 24 +- .../dte/computedPropertyNames13_ES6.d.ts | 24 +- .../dte/computedPropertyNames14_ES5.d.ts | 8 +- .../dte/computedPropertyNames14_ES6.d.ts | 8 +- .../dte/computedPropertyNames15_ES5.d.ts | 12 +- .../dte/computedPropertyNames15_ES6.d.ts | 12 +- .../dte/computedPropertyNames16_ES5.d.ts | 36 +- .../dte/computedPropertyNames16_ES6.d.ts | 36 +- .../dte/computedPropertyNames17_ES5.d.ts | 12 +- .../dte/computedPropertyNames17_ES6.d.ts | 12 +- .../dte/computedPropertyNames2_ES5.d.ts | 24 +- .../dte/computedPropertyNames2_ES6.d.ts | 24 +- .../dte/computedPropertyNames4_ES5.d.ts | 46 +- .../dte/computedPropertyNames4_ES6.d.ts | 46 +- .../dte/computedPropertyNames5_ES5.d.ts | 18 +- .../dte/computedPropertyNames5_ES6.d.ts | 18 +- .../computedPropertyNamesOnOverloads_ES5.d.ts | 8 +- .../computedPropertyNamesOnOverloads_ES6.d.ts | 8 +- ...mputedPropertyNamesWithStaticProperty.d.ts | 4 +- .../original/dte/constEnumErrors.d.ts | 42 +- .../original/dte/contextualTyping.d.ts | 18 +- .../original/dte/correlatedUnions.d.ts | 90 +-- ...taWithImportDeclarationNameCollision7.d.ts | 4 +- .../dte/decoratorsOnComputedProperties.d.ts | 6 +- ...derivedClassOverridesProtectedMembers.d.ts | 16 +- ...erivedClassOverridesProtectedMembers2.d.ts | 76 +- ...erivedClassOverridesProtectedMembers3.d.ts | 28 +- .../derivedClassOverridesPublicMembers.d.ts | 76 +- .../duplicateVarsAcrossFileBoundaries.d.ts | 12 +- .../original/dte/dynamicNames.d.ts | 24 +- .../original/dte/escapedIdentifiers.d.ts | 34 +- .../original/dte/forwardRefInEnum.d.ts | 16 +- .../dte/generatedContextualTyping.d.ts | 402 +++++------ ...nericTypeReferenceWithoutTypeArgument.d.ts | 20 +- ...ericTypeReferenceWithoutTypeArgument2.d.ts | 20 +- .../original/dte/giant.d.ts | 550 +++++++------- .../dte/inKeywordAndIntersection.d.ts | 6 +- .../original/dte/intTypeCheck.d.ts | 64 +- .../dte/isolatedDeclarationErrorsClasses.d.ts | 64 +- .../dte/isolatedDeclarationErrorsObjects.d.ts | 112 +-- .../dte/literalTypesAndTypeAssertions.d.ts | 16 +- ...rorFromUsingES6FeaturesWithOnlyES5Lib.d.ts | 48 +- .../original/dte/namedTupleMembers.d.ts | 24 +- .../dte/noUncheckedIndexedAccess.d.ts | 8 +- ...eDeclarationEmitErrors(module=node16).d.ts | 36 +- ...eclarationEmitErrors(module=nodenext).d.ts | 36 +- ...DeclarationEmitErrors1(module=node16).d.ts | 36 +- ...clarationEmitErrors1(module=nodenext).d.ts | 36 +- .../dte/objectLiteralGettersAndSetters.d.ts | 106 +-- .../dte/optionalChainingInference.d.ts | 48 +- .../dte/overloadsWithComputedNames.d.ts | 6 +- .../dte/parseInvalidNonNullableTypes.d.ts | 24 +- .../dte/parseInvalidNullableTypes.d.ts | 24 +- .../original/dte/parseTypes.d.ts | 12 +- .../dte/parserComputedPropertyName11.d.ts | 4 +- .../dte/parserComputedPropertyName12.d.ts | 4 +- .../dte/parserComputedPropertyName17.d.ts | 6 +- .../dte/parserComputedPropertyName24.d.ts | 6 +- .../dte/parserComputedPropertyName25.d.ts | 6 +- .../dte/parserComputedPropertyName27.d.ts | 6 +- .../dte/parserComputedPropertyName29.d.ts | 6 +- .../dte/parserComputedPropertyName3.d.ts | 6 +- .../dte/parserComputedPropertyName33.d.ts | 6 +- .../dte/parserComputedPropertyName38.d.ts | 4 +- .../dte/parserComputedPropertyName39.d.ts | 4 +- .../dte/parserComputedPropertyName4.d.ts | 6 +- .../dte/parserComputedPropertyName5.d.ts | 6 +- .../dte/parserComputedPropertyName6.d.ts | 6 +- .../dte/parserComputedPropertyName7.d.ts | 6 +- .../dte/parserComputedPropertyName8.d.ts | 6 +- .../dte/parserES5ComputedPropertyName11.d.ts | 4 +- .../dte/parserES5ComputedPropertyName3.d.ts | 6 +- .../dte/parserES5ComputedPropertyName4.d.ts | 6 +- .../dte/parserES5ComputedPropertyName7.d.ts | 6 +- .../original/dte/parserStrictMode8.d.ts | 6 +- ...ingDestructuredPropertyInFunctionType.d.ts | 184 ++--- ...flicts(usedefineforclassfields=false).d.ts | 40 +- ...nflicts(usedefineforclassfields=true).d.ts | 40 +- .../dte/superSymbolIndexedAccess1.d.ts | 14 +- .../dte/superSymbolIndexedAccess3.d.ts | 14 +- .../dte/superSymbolIndexedAccess4.d.ts | 10 +- .../dte/superSymbolIndexedAccess5.d.ts | 8 +- .../dte/superSymbolIndexedAccess6.d.ts | 8 +- .../original/dte/symbolDeclarationEmit12.d.ts | 10 +- .../original/dte/symbolProperty1.d.ts | 12 +- .../original/dte/symbolProperty2.d.ts | 18 +- .../original/dte/symbolProperty3.d.ts | 18 +- .../original/dte/thisTypeErrors.d.ts | 10 +- .../original/dte/thisTypeInAccessors.d.ts | 14 +- .../dte/typeFromPropertyAssignment32.d.ts | 12 +- .../dte/typeFromPropertyAssignment33.d.ts | 12 +- .../dte/typeReferenceDirectives11.d.ts | 6 +- .../dte/typeReferenceDirectives13.d.ts | 4 +- .../dte/typeReferenceDirectives5.d.ts | 4 +- .../dte/typeReferenceDirectives8.d.ts | 6 +- .../dte/typeUsedAsTypeLiteralIndex.d.ts | 6 +- .../original/tsc/ES5For-ofTypeCheck10.d.ts | 4 +- .../original/tsc/ES5SymbolProperty1.d.ts | 6 +- .../original/tsc/ES5SymbolProperty2.d.ts | 4 +- .../original/tsc/ES5SymbolProperty3.d.ts | 4 +- .../original/tsc/ES5SymbolProperty4.d.ts | 4 +- .../original/tsc/ES5SymbolProperty5.d.ts | 4 +- .../original/tsc/ES5SymbolProperty7.d.ts | 4 +- .../tsc/FunctionDeclaration8_es6.d.ts | 14 +- .../original/tsc/arrayFind.d.ts | 6 +- .../original/tsc/asOperator1.d.ts | 6 +- .../tsc/asyncFunctionDeclaration8_es2017.d.ts | 14 +- .../tsc/asyncFunctionDeclaration8_es5.d.ts | 14 +- .../tsc/asyncFunctionDeclaration8_es6.d.ts | 14 +- .../original/tsc/bigintIndex.d.ts | 18 +- .../original/tsc/booleanFilterAnyArray.d.ts | 6 +- .../capturedParametersInInitializers1.d.ts | 118 +-- .../original/tsc/complicatedPrivacy.d.ts | 38 +- .../tsc/computedPropertiesNarrowed.d.ts | 36 +- .../tsc/computedPropertyNames10_ES5.d.ts | 114 +-- .../tsc/computedPropertyNames10_ES6.d.ts | 114 +-- .../tsc/computedPropertyNames11_ES5.d.ts | 114 +-- .../tsc/computedPropertyNames11_ES6.d.ts | 114 +-- .../tsc/computedPropertyNames12_ES5.d.ts | 12 +- .../tsc/computedPropertyNames12_ES6.d.ts | 12 +- .../tsc/computedPropertyNames13_ES5.d.ts | 24 +- .../tsc/computedPropertyNames13_ES6.d.ts | 24 +- .../tsc/computedPropertyNames14_ES5.d.ts | 8 +- .../tsc/computedPropertyNames14_ES6.d.ts | 8 +- .../tsc/computedPropertyNames15_ES5.d.ts | 12 +- .../tsc/computedPropertyNames15_ES6.d.ts | 12 +- .../tsc/computedPropertyNames16_ES5.d.ts | 30 +- .../tsc/computedPropertyNames16_ES6.d.ts | 30 +- .../tsc/computedPropertyNames17_ES5.d.ts | 8 +- .../tsc/computedPropertyNames17_ES6.d.ts | 8 +- .../tsc/computedPropertyNames2_ES5.d.ts | 24 +- .../tsc/computedPropertyNames2_ES6.d.ts | 24 +- .../tsc/computedPropertyNames4_ES5.d.ts | 64 +- .../tsc/computedPropertyNames4_ES6.d.ts | 64 +- .../tsc/computedPropertyNames5_ES5.d.ts | 30 +- .../tsc/computedPropertyNames5_ES6.d.ts | 30 +- .../tsc/computedPropertyNames6_ES5.d.ts | 18 +- .../tsc/computedPropertyNames6_ES6.d.ts | 18 +- .../computedPropertyNamesOnOverloads_ES5.d.ts | 12 +- .../computedPropertyNamesOnOverloads_ES6.d.ts | 12 +- ...mputedPropertyNamesWithStaticProperty.d.ts | 12 +- .../original/tsc/constEnumErrors.d.ts | 38 +- .../original/tsc/contextualTyping.d.ts | 18 +- .../original/tsc/correlatedUnions.d.ts | 90 +-- ...taWithImportDeclarationNameCollision7.d.ts | 4 +- .../tsc/decoratorsOnComputedProperties.d.ts | 66 +- ...derivedClassOverridesProtectedMembers.d.ts | 16 +- ...erivedClassOverridesProtectedMembers2.d.ts | 76 +- ...erivedClassOverridesProtectedMembers3.d.ts | 28 +- .../derivedClassOverridesPublicMembers.d.ts | 76 +- .../duplicateVarsAcrossFileBoundaries.d.ts | 12 +- .../original/tsc/dynamicNames.d.ts | 24 +- .../original/tsc/escapedIdentifiers.d.ts | 34 +- .../original/tsc/forwardRefInEnum.d.ts | 8 +- .../tsc/generatedContextualTyping.d.ts | 402 +++++------ ...nericTypeReferenceWithoutTypeArgument.d.ts | 20 +- ...ericTypeReferenceWithoutTypeArgument2.d.ts | 20 +- .../original/tsc/giant.d.ts | 550 +++++++------- .../tsc/inKeywordAndIntersection.d.ts | 6 +- .../original/tsc/intTypeCheck.d.ts | 64 +- .../tsc/isolatedDeclarationErrorsClasses.d.ts | 58 +- .../tsc/isolatedDeclarationErrorsObjects.d.ts | 124 ++-- .../tsc/literalTypesAndTypeAssertions.d.ts | 16 +- ...rorFromUsingES6FeaturesWithOnlyES5Lib.d.ts | 60 +- ...tionWithSuffixes_one_externalTSModule.d.ts | 6 +- .../original/tsc/namedTupleMembers.d.ts | 24 +- .../tsc/noUncheckedIndexedAccess.d.ts | 8 +- ...eDeclarationEmitErrors(module=node16).d.ts | 36 +- ...eclarationEmitErrors(module=nodenext).d.ts | 36 +- ...DeclarationEmitErrors1(module=node16).d.ts | 36 +- ...clarationEmitErrors1(module=nodenext).d.ts | 36 +- .../tsc/objectLiteralGettersAndSetters.d.ts | 106 +-- .../tsc/optionalChainingInference.d.ts | 48 +- .../tsc/overloadsWithComputedNames.d.ts | 26 +- .../tsc/parseInvalidNonNullableTypes.d.ts | 24 +- .../tsc/parseInvalidNullableTypes.d.ts | 24 +- .../original/tsc/parseTypes.d.ts | 12 +- .../tsc/parserComputedPropertyName1.d.ts | 6 +- .../tsc/parserComputedPropertyName17.d.ts | 12 +- .../tsc/parserComputedPropertyName2.d.ts | 6 +- .../tsc/parserComputedPropertyName27.d.ts | 6 +- .../tsc/parserComputedPropertyName3.d.ts | 12 +- .../tsc/parserComputedPropertyName37.d.ts | 6 +- .../tsc/parserComputedPropertyName4.d.ts | 12 +- .../tsc/parserComputedPropertyName5.d.ts | 12 +- .../tsc/parserComputedPropertyName6.d.ts | 12 +- .../tsc/parserES5ComputedPropertyName2.d.ts | 6 +- .../tsc/parserES5ComputedPropertyName3.d.ts | 12 +- .../tsc/parserES5ComputedPropertyName4.d.ts | 12 +- ...ingDestructuredPropertyInFunctionType.d.ts | 184 ++--- ...flicts(usedefineforclassfields=false).d.ts | 40 +- ...nflicts(usedefineforclassfields=true).d.ts | 40 +- .../tsc/superSymbolIndexedAccess1.d.ts | 14 +- .../tsc/superSymbolIndexedAccess3.d.ts | 14 +- .../tsc/superSymbolIndexedAccess4.d.ts | 10 +- .../tsc/superSymbolIndexedAccess5.d.ts | 8 +- .../tsc/superSymbolIndexedAccess6.d.ts | 8 +- .../original/tsc/symbolProperty1.d.ts | 30 +- .../original/tsc/symbolProperty2.d.ts | 36 +- .../original/tsc/symbolProperty3.d.ts | 36 +- .../original/tsc/symbolProperty52.d.ts | 6 +- .../original/tsc/symbolProperty53.d.ts | 6 +- .../original/tsc/symbolProperty54.d.ts | 6 +- .../original/tsc/symbolProperty58.d.ts | 6 +- .../original/tsc/thisTypeErrors.d.ts | 10 +- .../original/tsc/thisTypeInAccessors.d.ts | 14 +- .../tsc/typeFromPropertyAssignment32.d.ts | 12 +- .../tsc/typeFromPropertyAssignment33.d.ts | 12 +- .../tsc/typeReferenceDirectives11.d.ts | 6 +- .../tsc/typeReferenceDirectives13.d.ts | 4 +- .../tsc/typeReferenceDirectives5.d.ts | 4 +- .../tsc/typeReferenceDirectives8.d.ts | 6 +- .../tsc/typeUsedAsTypeLiteralIndex.d.ts | 6 +- .../isolatedDeclarationErrors.errors.txt | 8 +- ...solatedDeclarationErrorsClasses.errors.txt | 58 +- ...solatedDeclarationErrorsDefault.errors.txt | 22 +- ...tedDeclarationErrorsExpressions.errors.txt | 266 +++---- ...ationErrorsFunctionDeclarations.errors.txt | 42 +- ...solatedDeclarationErrorsObjects.errors.txt | 124 ++-- ...tedDeclarationErrorsReturnTypes.errors.txt | 680 +++++++++--------- 410 files changed, 5693 insertions(+), 5693 deletions(-) diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 0a39c961fe26a..c1131a7da15e8 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -6726,63 +6726,63 @@ "category": "Error", "code": 9006 }, - "Function must have an explicit return type annotation with --isolatedDeclarations": { + "Function must have an explicit return type annotation with --isolatedDeclarations.": { "category": "Error", "code": 9007 }, - "Method must have an explicit return type annotation with --isolatedDeclarations": { + "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": { + "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": { + "Variable must have an explicit type annotation with --isolatedDeclarations.": { "category": "Error", "code": 9010 }, - "Parameter must have an explicit type annotation with --isolatedDeclarations": { + "Parameter must have an explicit type annotation with --isolatedDeclarations.": { "category": "Error", "code": 9011 }, - "Property must have an explicit type annotation with --isolatedDeclarations": { + "Property must have an explicit type annotation with --isolatedDeclarations.": { "category": "Error", "code": 9012 }, - "Expression type can't be inferred with --isolatedDeclarations": { + "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": { + "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": { + "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": { + "Objects that contain shorthand properties can't be inferred with --isolatedDeclarations.": { "category": "Error", "code": 9016 }, - "Only const arrays can be inferred with --isolatedDeclarations": { + "Only const arrays can be inferred with --isolatedDeclarations.": { "category": "Error", "code": 9017 }, - "Arrays with spread elements can't inferred with --isolatedDeclarations": { + "Arrays with spread elements can't inferred with --isolatedDeclarations.": { "category": "Error", "code": 9018 }, - "Binding elements can't be exported directly with --isolatedDeclarations": { + "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": { + "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": { + "Extends clause can't contain an expression with --isolatedDeclarations.": { "category": "Error", "code": 9021 }, @@ -6798,39 +6798,39 @@ "category": "Error", "code": 9024 }, - "Reference directives are not supported in isolated declaration mode.": { + "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": { + "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}": { + "Add a type annotation to the variable {0}.": { "category": "Error", "code": 9027 }, - "Add a type annotation to the parameter {0}": { + "Add a type annotation to the parameter {0}.": { "category": "Error", "code": 9028 }, - "Add a type annotation to the property {0}": { + "Add a type annotation to the property {0}.": { "category": "Error", "code": 9029 }, - "Add a return type to the function expression": { + "Add a return type to the function expression.": { "category": "Error", "code": 9030 }, - "Add a return type to the function declaration": { + "Add a return type to the function declaration.": { "category": "Error", "code": 9031 }, - "Add a return type to the get accessor declaration": { + "Add a return type to the get accessor declaration.": { "category": "Error", "code": 9032 }, - "Add a type to parameter of the set accessor declaration": { + "Add a type to parameter of the set accessor declaration.": { "category": "Error", "code": 9033 }, @@ -6838,7 +6838,7 @@ "category": "Error", "code": 9034 }, - "Add a type assertion to this expression to make type type explicit": { + "Add a type assertion to this expression to make type type explicit.": { "category": "Error", "code": 9035 }, diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index bf28aa6b2a619..2518a4b255bb9 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -438,21 +438,21 @@ export function transformDeclarations(context: TransformationContext | IsolatedT context.addDiagnostic(createDiagnosticForRange( file, ref, - Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode, + Diagnostics.Reference_directives_are_not_supported_with_isolatedDeclarations, )); }); file.typeReferenceDirectives.forEach(ref => { context.addDiagnostic(createDiagnosticForRange( file, ref, - Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode, + Diagnostics.Reference_directives_are_not_supported_with_isolatedDeclarations, )); }); file.referencedFiles.forEach(ref => { context.addDiagnostic(createDiagnosticForRange( file, ref, - Diagnostics.Reference_directives_are_not_supported_in_isolated_declaration_mode, + Diagnostics.Reference_directives_are_not_supported_with_isolatedDeclarations, )); }); } diff --git a/src/harness/isolatedDeclarationFixer.ts b/src/harness/isolatedDeclarationFixer.ts index a19a396bf04c9..3bf7dfa89d8a3 100644 --- a/src/harness/isolatedDeclarationFixer.ts +++ b/src/harness/isolatedDeclarationFixer.ts @@ -5,7 +5,7 @@ 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_in_isolated_declaration_mode, + 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, diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 6ebdad8122c7e..f92471fbdd736 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -596,7 +596,7 @@ class IsolatedDeclarationTest extends CompilerTestBase { 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_in_isolated_declaration_mode, + 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() { @@ -732,14 +732,14 @@ class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest { } 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_in_isolated_declaration_mode.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_in_isolated_declaration_mode.code) + this.dteDiagnostics.some(d => d.code === ts.Diagnostics.Reference_directives_are_not_supported_with_isolatedDeclarations.code) ) { this.isOutputMapEquivalent = true; this.isDiagnosticEquivalent = true; diff --git a/tests/baselines/reference/computedPropertiesNarrowed.errors.txt b/tests/baselines/reference/computedPropertiesNarrowed.errors.txt index a1c96995ba0ff..9a9a1276100c9 100644 --- a/tests/baselines/reference/computedPropertiesNarrowed.errors.txt +++ b/tests/baselines/reference/computedPropertiesNarrowed.errors.txt @@ -1,9 +1,9 @@ -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(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) ==== @@ -13,8 +13,8 @@ computedPropertiesNarrowed.ts(47,5): error TS9014: Computed properties must be n 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 +!!! 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. } @@ -29,22 +29,22 @@ computedPropertiesNarrowed.ts(47,5): error TS9014: Computed properties must be n 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 +!!! 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 +!!! 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 +!!! 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(); @@ -57,8 +57,8 @@ computedPropertiesNarrowed.ts(47,5): error TS9014: Computed properties must be n 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 +!!! 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 @@ -70,7 +70,7 @@ computedPropertiesNarrowed.ts(47,5): error TS9014: Computed properties must be n 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 +!!! 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/auto-fixed/diff/arrayFakeFlatNoCrashInferenceDeclarations.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/arrayFakeFlatNoCrashInferenceDeclarations.d.ts.diff index 096920e850649..2eec583daf74e 100644 --- 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 @@ -21,7 +21,7 @@ /// [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(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -==== arrayFakeFlatNoCrashInferenceDeclarations.ts (1 errors) ==== @@ -36,8 +36,8 @@ ~~~ !!! 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 ++!!! 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/computedEnumTypeWidening.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/computedEnumTypeWidening.d.ts.diff index a1f39c39c629b..cdd718968de70 100644 --- 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 @@ -15,10 +15,10 @@ +//# 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,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) ==== @@ -27,16 +27,16 @@ + enum E { + A = computed(0), + ~ -+!!! 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. + B = computed(1), + ~ -+!!! 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. + C = computed(2), + ~ -+!!! 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. + D = computed(3), + ~ -+!!! 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. + } + + function f1(): void { 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 index c029b97f92918..c128a5cb2f512 100644 --- 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 @@ -10,11 +10,11 @@ //# 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,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,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,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. @@ -30,17 +30,17 @@ 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 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 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 TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ~~~~~ !!! error TS2474: const enum member initializers must be constant expressions. } 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 index 6d5f4dda3ab45..8cd84d30f8620 100644 --- 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 @@ -15,7 +15,7 @@ +//# 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(15,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + + +==== declFileEnums.ts (1 errors) ==== @@ -35,7 +35,7 @@ + a = 10, + b = Math.PI, + ~ -+!!! 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. + c = a + 3 + } + 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 index b701e04de83b3..1a9629c8b802d 100644 --- 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 @@ -16,7 +16,7 @@ /// [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/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) ==== @@ -34,8 +34,8 @@ ~ !!! 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 ++!!! 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/declarationEmitForGlobalishSpecifierSymlink.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitForGlobalishSpecifierSymlink.d.ts.diff index 41202594b26d3..1fc0d4dfeab21 100644 --- 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 @@ -16,7 +16,7 @@ +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + -+/p1/index.ts(4,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations ++/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) ==== @@ -49,8 +49,8 @@ + + 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 ++!!! 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; + 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 index 82591826501f2..abafadc54762d 100644 --- 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 @@ -16,7 +16,7 @@ +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + -+/p1/index.ts(4,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations ++/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) ==== @@ -37,8 +37,8 @@ + + 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 ++!!! 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; + 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 index 07af73fbbb4db..db4154b598169 100644 --- 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 @@ -18,7 +18,7 @@ +//# 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/keys.ts(3,22): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== monorepo/pkg3/src/index.ts (0 errors) ==== @@ -28,8 +28,8 @@ + + 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 ++!!! 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) ==== 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 index 4b22c3b8c7dc1..f1046297a27b3 100644 --- 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 @@ -18,7 +18,7 @@ +//# 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/keys.ts(3,22): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + + +==== monorepo/pkg3/src/index.ts (0 errors) ==== @@ -28,8 +28,8 @@ + + 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 ++!!! 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) ==== 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 index b953514a1a889..b48ff132c57fa 100644 --- 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 @@ -16,7 +16,7 @@ /// [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/keys.ts(3,22): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ==== monorepo/pkg3/src/index.ts (0 errors) ==== @@ -29,8 +29,8 @@ ~~~~~ !!! 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 ++!!! 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) ==== 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 index 25532d68ea461..c89380bb2a510 100644 --- 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 @@ -17,7 +17,7 @@ +//# sourceMappingURL=index.d.ts.map +/// [Errors] //// + -+/p1/index.ts(7,29): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations ++/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) ==== @@ -41,9 +41,9 @@ + } + 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 ++!!! 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; + }; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff index e949d56aa4e57..e1680f78d45f1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff @@ -54,9 +54,9 @@ declarationFiles.ts(4,20): error TS2526: A 'this' type is available only in a non-static member of a class or interface. declarationFiles.ts(36,5): error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. -+declarationFiles.ts(36,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++declarationFiles.ts(36,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. declarationFiles.ts(42,5): error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. -+declarationFiles.ts(42,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++declarationFiles.ts(42,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -==== declarationFiles.ts (3 errors) ==== @@ -71,7 +71,7 @@ ~~ !!! error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. + ~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 declarationFiles.ts:36:5: Add a return type to the method return { a: this }; } @@ -82,7 +82,7 @@ ~~ !!! error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. + ~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 declarationFiles.ts:42:5: Add a return type to the method return [{ a: this }]; } 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 index 70459994e24ce..1feef596f12d3 100644 --- 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 @@ -15,10 +15,10 @@ +//# 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(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) ==== @@ -97,16 +97,16 @@ + enum E20 { + A = "foo".length, + ~ -+!!! 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. + B = A + 1, + ~ -+!!! 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. + C = +"123", + ~ -+!!! 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. + D = Math.sin(1) + ~ -+!!! 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. + } + \ 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 index 3f0d0758d5683..a17510963a5f1 100644 --- 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 @@ -15,7 +15,7 @@ +//# 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(32,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + + +==== enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts (1 errors) ==== @@ -52,7 +52,7 @@ + a = 1, + b = `12`.length + ~ -+!!! 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. + } + + declare enum T7 { 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 index 369c0fd0cc2f5..e6fca408e428b 100644 --- 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 @@ -34,10 +34,10 @@ 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(44,35): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations ++isolatedDeclarationErrorsClasses.ts(44,35): error TS9011: Parameter must have an explicit 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(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. @@ -55,8 +55,8 @@ ~ !!! error TS7006: Parameter 'v' implicitly has an 'any' type. + ~ -+!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -+!!! related TS9028 isolatedDeclarationErrorsClasses.ts:44:35: Add a type annotation to the parameter v ++!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9028 isolatedDeclarationErrorsClasses.ts:44:35: Add a type annotation to the parameter v. get [noAnnotationStringName](): number { return 0;} @@ -66,8 +66,8 @@ ~~~~~ !!! 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 ++!!! 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; ~~~~~~~~~~~~~~~~~~~~~ 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 index f2fae01d7cc78..999a59d05192e 100644 --- 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 @@ -16,15 +16,15 @@ +//# 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,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 ++!!! 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) ==== 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 index 6a25cb7ec91a1..3befbed1d7dc7 100644 --- 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 @@ -16,7 +16,7 @@ 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,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. @@ -32,8 +32,8 @@ ~ !!! 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 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. ~~~~~~~~~~~~~~~ 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 index 6a25cb7ec91a1..3befbed1d7dc7 100644 --- 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 @@ -16,7 +16,7 @@ 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,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. @@ -32,8 +32,8 @@ ~ !!! 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 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. ~~~~~~~~~~~~~~~ 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 index a54cd4d44dfcc..1e942a0b48e3c 100644 --- 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 @@ -20,7 +20,7 @@ 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,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. @@ -36,8 +36,8 @@ ~ !!! 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 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. ~~~~~~~~~~~~~~~ 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 index a54cd4d44dfcc..1e942a0b48e3c 100644 --- 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 @@ -20,7 +20,7 @@ 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,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. @@ -36,8 +36,8 @@ ~ !!! 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 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. ~~~~~~~~~~~~~~~ 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 index 3b7ddf165aec5..811852b47f186 100644 --- 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 @@ -16,7 +16,7 @@ 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,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. @@ -30,8 +30,8 @@ !!! 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 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. ~~~~~~~~~~~~~~~ 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 index 3b7ddf165aec5..811852b47f186 100644 --- 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 @@ -16,7 +16,7 @@ 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,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. @@ -30,8 +30,8 @@ !!! 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 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. ~~~~~~~~~~~~~~~ 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 index 217e6e7e1cf01..25e3b0261e9d1 100644 --- 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 @@ -16,7 +16,7 @@ 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,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. @@ -30,8 +30,8 @@ !!! 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 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. ~~~~~~~~~~~~~~~~~~~~~~~~ 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 index 217e6e7e1cf01..25e3b0261e9d1 100644 --- 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 @@ -16,7 +16,7 @@ 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,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. @@ -30,8 +30,8 @@ !!! 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 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. ~~~~~~~~~~~~~~~~~~~~~~~~ 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 index bc7a1e93686f8..d4421a88cb91e 100644 --- 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 @@ -16,7 +16,7 @@ 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,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. @@ -30,8 +30,8 @@ !!! 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 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. ~~~~~~~~~~~~~~~~~~~~~~~~ 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 index bc7a1e93686f8..d4421a88cb91e 100644 --- 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 @@ -16,7 +16,7 @@ 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,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. @@ -30,8 +30,8 @@ !!! 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 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. ~~~~~~~~~~~~~~~~~~~~~~~~ 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 index d73ff0b1a4706..fe2bc96db65f4 100644 --- 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 @@ -15,10 +15,10 @@ +//# 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(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) ==== @@ -48,14 +48,14 @@ + + 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. + ~ -+!!! 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. + ~ -+!!! 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 }; + 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 index d0cb5c96d8156..d4d9d6704263b 100644 --- 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 @@ -21,9 +21,9 @@ //# sourceMappingURL=symbolDeclarationEmit12.d.ts.map /// [Errors] //// -+symbolDeclarationEmit12.ts(5,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++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(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]'. @@ -35,7 +35,7 @@ [Symbol.iterator]: I; [Symbol.toPrimitive](x: I) { } + ~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! 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 @@ -44,8 +44,8 @@ ~~~~~~~~~~~~~~~~~~~~ !!! 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 ++!!! 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/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts.diff index ab6065985bd47..9ca19f3760fb9 100644 --- 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 @@ -16,7 +16,7 @@ +//# 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(3,17): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. + + +==== Folder/monorepo/core/index.ts (1 errors) ==== @@ -24,8 +24,8 @@ + + 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 ++!!! 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; + } + 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 index 2f4b1172f8953..3acafeda3a641 100644 --- 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 @@ -23,8 +23,8 @@ //# 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(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'. @@ -41,9 +41,9 @@ // 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. + ~~~ -+!!! 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: 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 index 1bcc27eae8462..dad54a9ea6d64 100644 --- 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 @@ -18,8 +18,8 @@ +//# 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(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) ==== @@ -28,12 +28,12 @@ + + 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 ++!!! 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 ++!!! 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) ==== + { 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 index b153814f8cfcc..903262f80348e 100644 --- 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 @@ -16,7 +16,7 @@ /// [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(5,19): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -==== main.ts (1 errors) ==== @@ -29,8 +29,8 @@ 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 ++!!! 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) ==== { 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 index d59e493af11b2..db0134c18f81f 100644 --- 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 @@ -18,8 +18,8 @@ +//# 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(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) ==== @@ -28,12 +28,12 @@ + + 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 ++!!! 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 ++!!! 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) ==== + { 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 index d8c36e7ce68a2..5f82d670c77f9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrayFakeFlatNoCrashInferenceDeclarations.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/arrayFakeFlatNoCrashInferenceDeclarations.d.ts @@ -34,7 +34,7 @@ declare function foo(arr: T[], depth: number): invalid; /// [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(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. ==== arrayFakeFlatNoCrashInferenceDeclarations.ts (2 errors) ==== @@ -54,7 +54,7 @@ arrayFakeFlatNoCrashInferenceDeclarations.ts(13,10): error TS9007: Function must ~~~ !!! 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 +!!! 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/computedEnumTypeWidening.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedEnumTypeWidening.d.ts index f0df87606e0d5..ff4358d957377 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedEnumTypeWidening.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/computedEnumTypeWidening.d.ts @@ -126,10 +126,10 @@ 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,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) ==== @@ -138,16 +138,16 @@ computedEnumTypeWidening.ts(7,5): error TS9020: Enum member initializers must be enum E { A = computed(0), ~ -!!! 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. B = computed(1), ~ -!!! 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. C = computed(2), ~ -!!! 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. D = computed(3), ~ -!!! 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. } function f1(): void { 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 index 136f50bf91ede..6543e534016b9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constEnum2.d.ts @@ -30,11 +30,11 @@ declare const enum D { //# 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,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,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,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. @@ -50,17 +50,17 @@ constEnum2.ts(12,9): error TS2474: const enum member initializers must be consta 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 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 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 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/declFileEnums.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts index 712abbea48b78..e365d9985eb52 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declFileEnums.d.ts @@ -73,7 +73,7 @@ declare enum e5 { //# 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(15,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ==== declFileEnums.ts (1 errors) ==== @@ -93,7 +93,7 @@ declFileEnums.ts(15,5): error TS9020: Enum member initializers must be computabl a = 10, b = Math.PI, ~ -!!! 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. c = a + 3 } 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 index 2d20a9fd82a41..9b635a528a4f1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCommonJsModuleReferencedType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCommonJsModuleReferencedType.d.ts @@ -36,7 +36,7 @@ export declare const y: RootProps; /// [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/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) ==== @@ -63,7 +63,7 @@ r/entry.ts(3,18): error TS9010: Variable must have an explicit type annotation w ~ !!! 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 +!!! 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/declarationEmitForGlobalishSpecifierSymlink.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink.d.ts index 6b52f2ac43f44..f11f31b1d2c3d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink.d.ts @@ -43,7 +43,7 @@ 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/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) ==== @@ -76,8 +76,8 @@ export declare const a: invalid; 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 +!!! 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; 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 index 150ef9098934c..05ac9e53b27c2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink2.d.ts @@ -31,7 +31,7 @@ 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/index.ts(4,18): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ==== /cache/typescript-fsa/src/impl.d.ts (0 errors) ==== @@ -52,8 +52,8 @@ export declare const a: invalid; 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 +!!! 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; 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 index 735b6999be626..89513d623c5f3 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference.d.ts @@ -55,7 +55,7 @@ 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/keys.ts(3,22): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ==== monorepo/pkg3/src/index.ts (0 errors) ==== @@ -65,8 +65,8 @@ monorepo/pkg3/src/keys.ts(3,22): error TS9010: Variable must have an explicit ty 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 +!!! 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) ==== 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 index 4c0a74fbe3a59..fab73c602c839 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference2.d.ts @@ -58,7 +58,7 @@ 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/keys.ts(3,22): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ==== monorepo/pkg3/src/index.ts (0 errors) ==== @@ -68,8 +68,8 @@ monorepo/pkg3/src/keys.ts(3,22): error TS9010: Variable must have an explicit ty 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 +!!! 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) ==== 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 index cce6f656ee7a6..b05cc96ee1d66 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference3.d.ts @@ -56,7 +56,7 @@ export declare const ADMIN: invalid; /// [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/keys.ts(3,22): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ==== monorepo/pkg3/src/index.ts (0 errors) ==== @@ -68,8 +68,8 @@ monorepo/pkg3/src/keys.ts(3,22): error TS9010: Variable must have an explicit ty ~~~~~ !!! 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 +!!! 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) ==== 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 index 1d849ea2ca9f1..91c368eddc9d0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithInvalidPackageJsonTypings.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitWithInvalidPackageJsonTypings.d.ts @@ -38,7 +38,7 @@ 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/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) ==== @@ -62,9 +62,9 @@ export declare const useCsvParser: () => invalid; } 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 +!!! 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; }; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts index 9c0e95fdfe7b4..3973bc05d7d8a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts @@ -101,9 +101,9 @@ declare class C4 { declarationFiles.ts(4,20): error TS2526: A 'this' type is available only in a non-static member of a class or interface. declarationFiles.ts(36,5): error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. -declarationFiles.ts(36,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +declarationFiles.ts(36,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. declarationFiles.ts(42,5): error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. -declarationFiles.ts(42,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +declarationFiles.ts(42,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== declarationFiles.ts (5 errors) ==== @@ -148,7 +148,7 @@ declarationFiles.ts(42,5): error TS9008: Method must have an explicit return typ ~~ !!! error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. ~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 declarationFiles.ts:36:5: Add a return type to the method return { a: this }; } @@ -159,7 +159,7 @@ declarationFiles.ts(42,5): error TS9008: Method must have an explicit return typ ~~ !!! error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. ~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 declarationFiles.ts:42:5: Add a return type to the method return [{ a: this }]; } 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 index 50dee270165cb..45b1c4fa70455 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumClassification.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumClassification.d.ts @@ -146,10 +146,10 @@ declare enum E20 { //# 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(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) ==== @@ -228,15 +228,15 @@ enumClassification.ts(77,5): error TS9020: Enum member initializers must be comp enum E20 { A = "foo".length, ~ -!!! 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. B = A + 1, ~ -!!! 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. C = +"123", ~ -!!! 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. D = Math.sin(1) ~ -!!! 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. } \ 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 index 8bc9f52567c8e..86b652c061cb7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/enumConstantMemberWithTemplateLiteralsEmitDeclaration.d.ts @@ -83,7 +83,7 @@ declare enum T7 { //# 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(32,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ==== enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts (1 errors) ==== @@ -120,7 +120,7 @@ enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts(32,5): error TS9020: En a = 1, b = `12`.length ~ -!!! 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. } declare enum T7 { 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 index 8bafd974ef6d0..deea9e5fed88d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsClasses.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsClasses.d.ts @@ -105,10 +105,10 @@ export {}; 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(44,35): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(44,35): error TS9011: Parameter must have an explicit 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(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. @@ -166,8 +166,8 @@ isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralNa ~ !!! error TS7006: Parameter 'v' implicitly has an 'any' type. ~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 isolatedDeclarationErrorsClasses.ts:44:35: Add a type annotation to the parameter v +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsClasses.ts:44:35: Add a type annotation to the parameter v. get [noAnnotationStringName](): number { return 0;} @@ -177,8 +177,8 @@ isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralNa ~~~~~ !!! 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 +!!! 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; ~~~~~~~~~~~~~~~~~~~~~ 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 index b0cdf3573f1b4..c9c178e9c9a2d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts @@ -40,15 +40,15 @@ 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,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 +!!! 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) ==== 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 index 60daac6d4ac24..abcbc8a3af885 100644 --- 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 @@ -38,7 +38,7 @@ export declare const a: invalid; 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,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. @@ -53,8 +53,8 @@ index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Pro ~ !!! 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 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. ~~~~~~~~~~~~~~~ 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 index 60daac6d4ac24..abcbc8a3af885 100644 --- 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 @@ -38,7 +38,7 @@ export declare const a: invalid; 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,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. @@ -53,8 +53,8 @@ index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Pro ~ !!! 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 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. ~~~~~~~~~~~~~~~ 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 index 52c118a05af9b..c3205326f945b 100644 --- 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 @@ -47,7 +47,7 @@ export declare const x: () => Thing; 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,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. @@ -62,8 +62,8 @@ index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Pro ~ !!! 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 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. ~~~~~~~~~~~~~~~ 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 index 52c118a05af9b..c3205326f945b 100644 --- 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 @@ -47,7 +47,7 @@ export declare const x: () => Thing; 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,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. @@ -62,8 +62,8 @@ index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Pro ~ !!! 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 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. ~~~~~~~~~~~~~~~ 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 index d72105da5ad57..92d6ed2b87fc2 100644 --- 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 @@ -44,7 +44,7 @@ export declare const a: invalid; 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,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. @@ -57,8 +57,8 @@ index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Pro !!! 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 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. ~~~~~~~~~~~~~~~ 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 index d72105da5ad57..92d6ed2b87fc2 100644 --- 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 @@ -44,7 +44,7 @@ export declare const a: invalid; 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,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. @@ -57,8 +57,8 @@ index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Pro !!! 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 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. ~~~~~~~~~~~~~~~ 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 index 164b279f8f735..024783c5ac0f4 100644 --- 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 @@ -39,7 +39,7 @@ export declare const a: invalid; 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,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. @@ -52,8 +52,8 @@ index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Pro !!! 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 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. ~~~~~~~~~~~~~~~~~~~~~~~~ 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 index 164b279f8f735..024783c5ac0f4 100644 --- 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 @@ -39,7 +39,7 @@ export declare const a: invalid; 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,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. @@ -52,8 +52,8 @@ index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Pro !!! 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 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. ~~~~~~~~~~~~~~~~~~~~~~~~ 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 index 18a7fac061d4b..21d79e2aa8893 100644 --- 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 @@ -39,7 +39,7 @@ export declare const a: invalid; 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,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. @@ -52,8 +52,8 @@ index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Pro !!! 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 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. ~~~~~~~~~~~~~~~~~~~~~~~~ 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 index 18a7fac061d4b..21d79e2aa8893 100644 --- 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 @@ -39,7 +39,7 @@ export declare const a: invalid; 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,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. @@ -52,8 +52,8 @@ index.ts(3,25): error TS2712: A dynamic import call in ES5/ES3 requires the 'Pro !!! 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 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. ~~~~~~~~~~~~~~~~~~~~~~~~ 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 index 8adb653c06216..d8d9720d3cbff 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/numericEnumMappedType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/numericEnumMappedType.d.ts @@ -86,10 +86,10 @@ 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(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) ==== @@ -119,14 +119,14 @@ numericEnumMappedType.ts(26,22): error TS9020: Enum member initializers must be 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. ~ -!!! 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. ~ -!!! 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 }; 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 index 6f386417abeae..856b849355be2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit12.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit12.d.ts @@ -34,9 +34,9 @@ declare namespace M { //# sourceMappingURL=symbolDeclarationEmit12.d.ts.map /// [Errors] //// -symbolDeclarationEmit12.ts(5,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +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(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]'. @@ -47,7 +47,7 @@ symbolDeclarationEmit12.ts(10,13): error TS2300: Duplicate identifier '[Symbol.t [Symbol.iterator]: I; [Symbol.toPrimitive](x: I) { } ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! 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 @@ -56,8 +56,8 @@ symbolDeclarationEmit12.ts(10,13): error TS2300: Duplicate identifier '[Symbol.t ~~~~~~~~~~~~~~~~~~~~ !!! 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 +!!! 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/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts index d990a72df9084..b507d0d91ec13 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts @@ -29,7 +29,7 @@ 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(3,17): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. ==== Folder/monorepo/core/index.ts (1 errors) ==== @@ -37,8 +37,8 @@ Folder/monorepo/core/index.ts(3,17): error TS9007: Function must have an explici 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 +!!! 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; } 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 index 9d9467eda92c7..77f41dcc542f0 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes4.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes4.d.ts @@ -469,8 +469,8 @@ 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(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'. @@ -520,9 +520,9 @@ templateLiteralTypes4.ts(289,12): error TS2345: Argument of type '2' is not assi // 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. ~~~ -!!! 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: 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 index 354f26e371c13..5e69e04312b14 100644 --- 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 @@ -44,8 +44,8 @@ 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(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) ==== @@ -54,12 +54,12 @@ main.ts(5,19): error TS9010: Variable must have an explicit type annotation with 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 +!!! 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 +!!! 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) ==== { 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 index 75774be0c85a4..1d26160bccf09 100644 --- 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 @@ -43,7 +43,7 @@ export declare const vb: invalid; /// [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(5,19): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ==== main.ts (2 errors) ==== @@ -55,8 +55,8 @@ main.ts(5,19): error TS9010: Variable must have an explicit type annotation with 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 +!!! 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) ==== { 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 index 3891b36af9b51..53c57fa309214 100644 --- 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 @@ -41,8 +41,8 @@ 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(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) ==== @@ -51,12 +51,12 @@ main.ts(5,20): error TS9010: Variable must have an explicit type annotation with 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 +!!! 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 +!!! 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) ==== { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5For-ofTypeCheck10.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5For-ofTypeCheck10.d.ts.diff index 30be2c9355e80..2bc3391fedffc 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5For-ofTypeCheck10.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5For-ofTypeCheck10.d.ts.diff @@ -15,8 +15,8 @@ /// [Errors] //// - ES5For-ofTypeCheck10.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -+ES5For-ofTypeCheck10.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + ES5For-ofTypeCheck10.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ++ES5For-ofTypeCheck10.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ES5For-ofTypeCheck10.ts(9,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an array type or a string type. @@ -33,7 +33,7 @@ } [Symbol.iterator]() { + ~~~~~~~~~~~~~~~~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 ES5For-ofTypeCheck10.ts:9:5: Add a return type to the method ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff index d85223747b1a6..9b7ac0004a1ae 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff @@ -14,7 +14,7 @@ - -/// [Errors] //// - --ES5SymbolProperty1.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-ES5SymbolProperty1.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== ES5SymbolProperty1.ts (1 errors) ==== @@ -26,8 +26,8 @@ - var obj = { - [Symbol.foo]: 0 - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 ES5SymbolProperty1.ts:6:5: Add a type annotation to the variable obj +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 ES5SymbolProperty1.ts:6:5: Add a type annotation to the variable obj. - } - - obj[Symbol.foo]; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty2.d.ts.diff index 50587a536b025..ff9cd853ad240 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty2.d.ts.diff @@ -20,8 +20,8 @@ /// [Errors] //// --ES5SymbolProperty2.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+ES5SymbolProperty2.ts(5,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-ES5SymbolProperty2.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++ES5SymbolProperty2.ts(5,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ES5SymbolProperty2.ts(10,11): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. @@ -31,8 +31,8 @@ export class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 ES5SymbolProperty2.ts:5:9: Add a return type to the method } (new C)[Symbol.iterator]; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty3.d.ts.diff index 8d3b77074c6c4..d3e7a29575e31 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty3.d.ts.diff @@ -15,8 +15,8 @@ /// [Errors] //// --ES5SymbolProperty3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+ES5SymbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-ES5SymbolProperty3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++ES5SymbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== ES5SymbolProperty3.ts (1 errors) ==== @@ -25,8 +25,8 @@ class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 ES5SymbolProperty3.ts:4:5: Add a return type to the method } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty4.d.ts.diff index 97974aa3a1bde..c2ddf790d9f08 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty4.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty4.d.ts.diff @@ -15,8 +15,8 @@ /// [Errors] //// --ES5SymbolProperty4.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+ES5SymbolProperty4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-ES5SymbolProperty4.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++ES5SymbolProperty4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== ES5SymbolProperty4.ts (1 errors) ==== @@ -25,8 +25,8 @@ class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 ES5SymbolProperty4.ts:4:5: Add a return type to the method } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty5.d.ts.diff index 7937f0b623557..04e2953ba91a6 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty5.d.ts.diff @@ -15,8 +15,8 @@ /// [Errors] //// --ES5SymbolProperty5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+ES5SymbolProperty5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-ES5SymbolProperty5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++ES5SymbolProperty5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== ES5SymbolProperty5.ts (1 errors) ==== @@ -25,8 +25,8 @@ class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 ES5SymbolProperty5.ts:4:5: Add a return type to the method } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty6.d.ts.diff index dc841d5adbb45..981d5a5fc79d7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty6.d.ts.diff @@ -15,7 +15,7 @@ /// [Errors] //// -+ES5SymbolProperty6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++ES5SymbolProperty6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. ES5SymbolProperty6.ts(5,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. @@ -25,7 +25,7 @@ class C { [Symbol.iterator]() { } + ~~~~~~~~~~~~~~~~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 ES5SymbolProperty6.ts:2:5: Add a return type to the method ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty7.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty7.d.ts.diff index c64f27cdf5375..d368721b0de29 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty7.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty7.d.ts.diff @@ -15,8 +15,8 @@ /// [Errors] //// --ES5SymbolProperty7.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+ES5SymbolProperty7.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-ES5SymbolProperty7.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++ES5SymbolProperty7.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== ES5SymbolProperty7.ts (1 errors) ==== @@ -25,8 +25,8 @@ class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 ES5SymbolProperty7.ts:4:5: Add a return type to the method } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff index 3a17255cccfee..405f41522456b 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff @@ -10,18 +10,18 @@ /// [Errors] //// --FunctionDeclaration8_es6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-FunctionDeclaration8_es6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. FunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'yield'. FunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. - FunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations + FunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -==== FunctionDeclaration8_es6.ts (4 errors) ==== +==== FunctionDeclaration8_es6.ts (3 errors) ==== var v = { [yield]: foo } - ~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 FunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 FunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v. ~~~~~ !!! error TS2304: Cannot find name 'yield'. ~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/MemberFunctionDeclaration3_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/MemberFunctionDeclaration3_es6.d.ts.diff index d77659ccb91df..001d4bd66ec5c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/MemberFunctionDeclaration3_es6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/MemberFunctionDeclaration3_es6.d.ts.diff @@ -15,7 +15,7 @@ /// [Errors] //// -+MemberFunctionDeclaration3_es6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++MemberFunctionDeclaration3_es6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. MemberFunctionDeclaration3_es6.ts(2,6): error TS2304: Cannot find name 'foo'. @@ -24,7 +24,7 @@ class C { *[foo]() { } + ~~~~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 MemberFunctionDeclaration3_es6.ts:2:5: Add a return type to the method ~~~ !!! error TS2304: Cannot find name 'foo'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asOperator1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asOperator1.d.ts.diff index b910b9e1f9b5a..5bab5f5961bef 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/asOperator1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/asOperator1.d.ts.diff @@ -15,4 +15,4 @@ /// [Errors] //// - asOperator1.ts(3,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + asOperator1.ts(3,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff index e814df9d720ac..194eb7c3466c2 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff @@ -10,18 +10,18 @@ /// [Errors] //// --asyncFunctionDeclaration8_es2017.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-asyncFunctionDeclaration8_es2017.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. asyncFunctionDeclaration8_es2017.ts(1,12): error TS2304: Cannot find name 'await'. asyncFunctionDeclaration8_es2017.ts(1,20): error TS2304: Cannot find name 'foo'. - asyncFunctionDeclaration8_es2017.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations + asyncFunctionDeclaration8_es2017.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -==== asyncFunctionDeclaration8_es2017.ts (4 errors) ==== +==== asyncFunctionDeclaration8_es2017.ts (3 errors) ==== var v = { [await]: foo } - ~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 asyncFunctionDeclaration8_es2017.ts:1:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 asyncFunctionDeclaration8_es2017.ts:1:5: Add a type annotation to the variable v. ~~~~~ !!! error TS2304: Cannot find name 'await'. ~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff index e043f906b965d..a932211bcfc1e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff @@ -10,18 +10,18 @@ /// [Errors] //// --asyncFunctionDeclaration8_es5.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-asyncFunctionDeclaration8_es5.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. asyncFunctionDeclaration8_es5.ts(1,12): error TS2304: Cannot find name 'await'. asyncFunctionDeclaration8_es5.ts(1,20): error TS2304: Cannot find name 'foo'. - asyncFunctionDeclaration8_es5.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations + asyncFunctionDeclaration8_es5.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -==== asyncFunctionDeclaration8_es5.ts (4 errors) ==== +==== asyncFunctionDeclaration8_es5.ts (3 errors) ==== var v = { [await]: foo } - ~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 asyncFunctionDeclaration8_es5.ts:1:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 asyncFunctionDeclaration8_es5.ts:1:5: Add a type annotation to the variable v. ~~~~~ !!! error TS2304: Cannot find name 'await'. ~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff index 5258bb592655d..023d66d019bd2 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff @@ -10,18 +10,18 @@ /// [Errors] //// --asyncFunctionDeclaration8_es6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-asyncFunctionDeclaration8_es6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. asyncFunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'await'. asyncFunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. - asyncFunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations + asyncFunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -==== asyncFunctionDeclaration8_es6.ts (4 errors) ==== +==== asyncFunctionDeclaration8_es6.ts (3 errors) ==== var v = { [await]: foo } - ~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 asyncFunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 asyncFunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v. ~~~~~ !!! error TS2304: Cannot find name 'await'. ~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff index bec5f8f7222a7..b19095a606e5c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff @@ -21,9 +21,9 @@ @@ -27,9 +29,8 @@ b.ts(2,19): error TS1128: Declaration or statement expected. b.ts(3,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - b.ts(3,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + b.ts(3,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --b.ts(4,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-b.ts(4,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== a.ts (5 errors) ==== @@ -40,12 +40,12 @@ ~~ !!! error TS1136: Property assignment expected. @@ -84,8 +85,5 @@ - !!! related TS9027 b.ts:3:7: Add a type annotation to the variable b + !!! related TS9027 b.ts:3:7: Add a type annotation to the variable b. const c = {[bigNum]: 789}; ~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 b.ts:4:7: Add a type annotation to the variable c +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 b.ts:4:7: Add a type annotation to the variable c. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/booleanFilterAnyArray.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/booleanFilterAnyArray.d.ts.diff index 5e7f35e35cb46..59b273564bc1d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/booleanFilterAnyArray.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/booleanFilterAnyArray.d.ts.diff @@ -21,4 +21,4 @@ /// [Errors] //// - booleanFilterAnyArray.ts(20,11): error TS9017: Only const arrays can be inferred with --isolatedDeclarations + booleanFilterAnyArray.ts(20,11): error TS9017: Only const arrays can be inferred with --isolatedDeclarations. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/capturedParametersInInitializers1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/capturedParametersInInitializers1.d.ts.diff index 401a188da345b..ae44a5bcedd0f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/capturedParametersInInitializers1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/capturedParametersInInitializers1.d.ts.diff @@ -17,11 +17,11 @@ declare function foo5(y?: invalid, z?: number): invalid; declare function foo6(y?: () => invalid, z?: number): invalid; @@ -35,13 +35,12 @@ - capturedParametersInInitializers1.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations - capturedParametersInInitializers1.ts(34,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations - capturedParametersInInitializers1.ts(38,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations - capturedParametersInInitializers1.ts(38,20): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --capturedParametersInInitializers1.ts(38,20): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + capturedParametersInInitializers1.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. + capturedParametersInInitializers1.ts(34,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. + capturedParametersInInitializers1.ts(38,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. + capturedParametersInInitializers1.ts(38,20): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +-capturedParametersInInitializers1.ts(38,20): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. @@ -30,15 +30,15 @@ // ok - usage is deferred function foo1(y = class {c = x}, x = 1) { ~~~~ - !!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations + !!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. @@ -139,11 +138,8 @@ ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9028 capturedParametersInInitializers1.ts:38:15: Add a type annotation to the parameter y + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9028 capturedParametersInInitializers1.ts:38:15: Add a type annotation to the parameter y. !!! related TS9034 capturedParametersInInitializers1.ts:38:20: Add a return type to the method - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9028 capturedParametersInInitializers1.ts:38:15: Add a type annotation to the parameter y +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9028 capturedParametersInInitializers1.ts:38:15: Add a type annotation to the parameter y. ~ !!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. } 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 index bc02b610dcdc5..9100816b166a8 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertiesNarrowed.d.ts.diff @@ -48,13 +48,13 @@ /// [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(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) ==== @@ -65,25 +65,25 @@ 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 +-!!! 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 + !!! 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 ++!!! 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 +-!!! 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 ={ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES5.d.ts.diff index fbec1435a9f3a..c41183705cc13 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES5.d.ts.diff @@ -9,25 +9,25 @@ /// [Errors] //// - computedPropertyNames10_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --computedPropertyNames10_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames10_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --computedPropertyNames10_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames10_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames10_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames10_ES5.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames10_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames10_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +-computedPropertyNames10_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames10_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +-computedPropertyNames10_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames10_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames10_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames10_ES5.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames10_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. @@ -20,17 +18,16 @@ - computedPropertyNames10_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames10_ES5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames10_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames10_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --computedPropertyNames10_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames10_ES5.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames10_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames10_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames10_ES5.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames10_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames10_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames10_ES5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames10_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames10_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +-computedPropertyNames10_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames10_ES5.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames10_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames10_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames10_ES5.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames10_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -==== computedPropertyNames10_ES5.ts (19 errors) ==== @@ -38,33 +38,33 @@ var v = { @@ -38,19 +35,13 @@ ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:5:5: Add a return type to the method - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. [n]() { }, ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:6:5: Add a return type to the method - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. [s + s]() { }, ~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. @@ -88,11 +79,8 @@ ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:12:5: Add a return type to the method - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. [true]() { }, ~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES6.d.ts.diff index af3ca5de44de5..f5e8e583dbeaf 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES6.d.ts.diff @@ -9,25 +9,25 @@ /// [Errors] //// - computedPropertyNames10_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --computedPropertyNames10_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames10_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --computedPropertyNames10_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames10_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames10_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames10_ES6.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames10_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames10_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +-computedPropertyNames10_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames10_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +-computedPropertyNames10_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames10_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames10_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames10_ES6.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames10_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. @@ -20,17 +18,16 @@ - computedPropertyNames10_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames10_ES6.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames10_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames10_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --computedPropertyNames10_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames10_ES6.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames10_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames10_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames10_ES6.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames10_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames10_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames10_ES6.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames10_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames10_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +-computedPropertyNames10_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames10_ES6.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames10_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames10_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames10_ES6.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames10_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -==== computedPropertyNames10_ES6.ts (19 errors) ==== @@ -38,33 +38,33 @@ var v = { @@ -38,19 +35,13 @@ ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:5:5: Add a return type to the method - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. [n]() { }, ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:6:5: Add a return type to the method - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. [s + s]() { }, ~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. @@ -88,11 +79,8 @@ ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:12:5: Add a return type to the method - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. [true]() { }, ~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES5.d.ts.diff index dbd9238c97978..340f1194cb32d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES5.d.ts.diff @@ -9,25 +9,25 @@ /// [Errors] //// - computedPropertyNames11_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --computedPropertyNames11_ES5.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNames11_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames11_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames11_ES5.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames11_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames11_ES5.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames11_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +-computedPropertyNames11_ES5.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-computedPropertyNames11_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames11_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames11_ES5.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames11_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames11_ES5.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. @@ -19,33 +17,26 @@ - computedPropertyNames11_ES5.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames11_ES5.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames11_ES5.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames11_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --computedPropertyNames11_ES5.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames11_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames11_ES5.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames11_ES5.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames11_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames11_ES5.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames11_ES5.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames11_ES5.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames11_ES5.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames11_ES5.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames11_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +-computedPropertyNames11_ES5.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames11_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames11_ES5.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames11_ES5.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames11_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames11_ES5.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames11_ES5.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -==== computedPropertyNames11_ES5.ts (19 errors) ==== @@ -38,28 +38,28 @@ var v = { get [s]() { return 0; }, ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9032 computedPropertyNames11_ES5.ts:5:9: Add a return type to the get accessor declaration + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9032 computedPropertyNames11_ES5.ts:5:9: Add a return type to the get accessor declaration. - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. set [n](v) { }, - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. ~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9033 computedPropertyNames11_ES5.ts:6:9: Add a type to parameter of the set accessor declaration + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9033 computedPropertyNames11_ES5.ts:6:9: Add a type to parameter of the set accessor declaration. get [s + s]() { return 0; }, @@ -77,11 +68,8 @@ ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9032 computedPropertyNames11_ES5.ts:11:9: Add a return type to the get accessor declaration + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9032 computedPropertyNames11_ES5.ts:11:9: Add a return type to the get accessor declaration. set [a](v) { }, - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. ~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9033 computedPropertyNames11_ES5.ts:12:9: Add a type to parameter of the set accessor declaration + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9033 computedPropertyNames11_ES5.ts:12:9: Add a type to parameter of the set accessor declaration. get [true]() { return 0; }, diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES6.d.ts.diff index aa96d995570dc..e8f703258ecb8 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES6.d.ts.diff @@ -9,25 +9,25 @@ /// [Errors] //// - computedPropertyNames11_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --computedPropertyNames11_ES6.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNames11_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames11_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames11_ES6.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames11_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames11_ES6.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames11_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +-computedPropertyNames11_ES6.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-computedPropertyNames11_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames11_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames11_ES6.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames11_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames11_ES6.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. @@ -19,33 +17,26 @@ - computedPropertyNames11_ES6.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames11_ES6.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames11_ES6.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames11_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --computedPropertyNames11_ES6.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames11_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames11_ES6.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames11_ES6.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames11_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames11_ES6.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames11_ES6.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames11_ES6.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames11_ES6.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames11_ES6.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames11_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +-computedPropertyNames11_ES6.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames11_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames11_ES6.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames11_ES6.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames11_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames11_ES6.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames11_ES6.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -==== computedPropertyNames11_ES6.ts (19 errors) ==== @@ -38,28 +38,28 @@ var v = { get [s]() { return 0; }, ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9032 computedPropertyNames11_ES6.ts:5:9: Add a return type to the get accessor declaration + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9032 computedPropertyNames11_ES6.ts:5:9: Add a return type to the get accessor declaration. - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. set [n](v) { }, - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. ~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9033 computedPropertyNames11_ES6.ts:6:9: Add a type to parameter of the set accessor declaration + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9033 computedPropertyNames11_ES6.ts:6:9: Add a type to parameter of the set accessor declaration. get [s + s]() { return 0; }, @@ -77,11 +68,8 @@ ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9032 computedPropertyNames11_ES6.ts:11:9: Add a return type to the get accessor declaration + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9032 computedPropertyNames11_ES6.ts:11:9: Add a return type to the get accessor declaration. set [a](v) { }, - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. ~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9033 computedPropertyNames11_ES6.ts:12:9: Add a type to parameter of the set accessor declaration + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9033 computedPropertyNames11_ES6.ts:12:9: Add a type to parameter of the set accessor declaration. get [true]() { return 0; }, diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff index f6fc122b13f76..4173851265669 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff @@ -21,15 +21,15 @@ /// [Errors] //// computedPropertyNames12_ES5.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --computedPropertyNames12_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames12_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames12_ES5.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --computedPropertyNames12_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames12_ES5.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +-computedPropertyNames12_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames12_ES5.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. computedPropertyNames12_ES5.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --computedPropertyNames12_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames12_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames12_ES5.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -44,15 +44,15 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. [n] = n; ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + ~ -+!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -+!!! related TS9029 computedPropertyNames12_ES5.ts:6:5: Add a type annotation to the property [n] ++!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9029 computedPropertyNames12_ES5.ts:6:5: Add a type annotation to the property [n]. static [s + s]: string; ~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -63,7 +63,7 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static [true]: number; ~~~~~~~~~~~ !!! 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/computedPropertyNames12_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff index ebb305027a3cf..6db318e653142 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff @@ -21,15 +21,15 @@ /// [Errors] //// computedPropertyNames12_ES6.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --computedPropertyNames12_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames12_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames12_ES6.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --computedPropertyNames12_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames12_ES6.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +-computedPropertyNames12_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames12_ES6.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. computedPropertyNames12_ES6.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --computedPropertyNames12_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames12_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames12_ES6.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -44,15 +44,15 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. [n] = n; ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + ~ -+!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -+!!! related TS9029 computedPropertyNames12_ES6.ts:6:5: Add a type annotation to the property [n] ++!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9029 computedPropertyNames12_ES6.ts:6:5: Add a type annotation to the property [n]. static [s + s]: string; ~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -63,7 +63,7 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static [true]: number; ~~~~~~~~~~~ !!! 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/computedPropertyNames13_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES5.d.ts.diff index edd2f31b35c60..be38d8e5a8028 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES5.d.ts.diff @@ -20,15 +20,15 @@ /// [Errors] //// --computedPropertyNames13_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNames13_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames13_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -+computedPropertyNames13_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames13_ES5.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames13_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --computedPropertyNames13_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames13_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames13_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames13_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-computedPropertyNames13_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames13_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ++computedPropertyNames13_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames13_ES5.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames13_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +-computedPropertyNames13_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames13_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames13_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== computedPropertyNames13_ES5.ts (6 errors) ==== @@ -37,27 +37,27 @@ class C { [s]() {} ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNames13_ES5.ts:5:5: Add a return type to the method [n]() { } ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNames13_ES5.ts:6:5: Add a return type to the method static [s + s]() { } [s + n]() { } [+s]() { } static [""]() { } @@ -43,9 +48,10 @@ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames13_ES5.ts:11:5: Add a return type to the method [a]() { } ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNames13_ES5.ts:12:5: Add a return type to the method static [true]() { } [`hello bye`]() { } ~~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES6.d.ts.diff index 1492bed922ffd..e86cc100d7330 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES6.d.ts.diff @@ -20,15 +20,15 @@ /// [Errors] //// --computedPropertyNames13_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNames13_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames13_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -+computedPropertyNames13_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames13_ES6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames13_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --computedPropertyNames13_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames13_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames13_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames13_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-computedPropertyNames13_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames13_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ++computedPropertyNames13_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames13_ES6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames13_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +-computedPropertyNames13_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames13_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames13_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== computedPropertyNames13_ES6.ts (6 errors) ==== @@ -37,27 +37,27 @@ class C { [s]() {} ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNames13_ES6.ts:5:5: Add a return type to the method [n]() { } ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNames13_ES6.ts:6:5: Add a return type to the method static [s + s]() { } [s + n]() { } [+s]() { } static [""]() { } @@ -43,9 +48,10 @@ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames13_ES6.ts:11:5: Add a return type to the method [a]() { } ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNames13_ES6.ts:12:5: Add a return type to the method static [true]() { } [`hello bye`]() { } ~~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES5.d.ts.diff index b1866845d6c8d..167f5bbf55397 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES5.d.ts.diff @@ -17,14 +17,14 @@ /// [Errors] //// computedPropertyNames14_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames14_ES5.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames14_ES5.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames14_ES5.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames14_ES5.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames14_ES5.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES5.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames14_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames14_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames14_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames14_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames14_ES5.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -34,8 +34,8 @@ ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNames14_ES5.ts:3:5: Add a return type to the method static [true]() { } ~~~~~~ @@ -46,8 +46,8 @@ ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNames14_ES5.ts:7:5: Add a return type to the method static [null]() { } ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES6.d.ts.diff index eb6a4833194fc..47550ec130f24 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES6.d.ts.diff @@ -17,14 +17,14 @@ /// [Errors] //// computedPropertyNames14_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames14_ES6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames14_ES6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames14_ES6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames14_ES6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames14_ES6.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES6.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames14_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames14_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames14_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames14_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames14_ES6.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -34,8 +34,8 @@ ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNames14_ES6.ts:3:5: Add a return type to the method static [true]() { } ~~~~~~ @@ -46,8 +46,8 @@ ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNames14_ES6.ts:7:5: Add a return type to the method static [null]() { } ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES5.d.ts.diff index c879188440ff0..20b3fc6fa819e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES5.d.ts.diff @@ -17,14 +17,14 @@ /// [Errors] //// --computedPropertyNames15_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames15_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames15_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames15_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames15_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames15_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames15_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames15_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames15_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames15_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames15_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames15_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames15_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames15_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== computedPropertyNames15_ES5.ts (5 errors) ==== @@ -34,22 +34,22 @@ class C { [p1]() { } ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNames15_ES5.ts:5:5: Add a return type to the method [p2]() { } ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNames15_ES5.ts:6:5: Add a return type to the method [p3]() { } ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNames15_ES5.ts:7:5: Add a return type to the method } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES6.d.ts.diff index 3aac144a6ede4..9289abad6a795 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES6.d.ts.diff @@ -17,14 +17,14 @@ /// [Errors] //// --computedPropertyNames15_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames15_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames15_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames15_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames15_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames15_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames15_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames15_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames15_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames15_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames15_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames15_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames15_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames15_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== computedPropertyNames15_ES6.ts (5 errors) ==== @@ -34,22 +34,22 @@ class C { [p1]() { } ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNames15_ES6.ts:5:5: Add a return type to the method [p2]() { } ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNames15_ES6.ts:6:5: Add a return type to the method [p3]() { } ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNames15_ES6.ts:7:5: Add a return type to the method } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff index 2f85610696778..353ab9124ba4d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff @@ -20,15 +20,15 @@ /// [Errors] //// --computedPropertyNames16_ES5.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNames16_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames16_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -+computedPropertyNames16_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames16_ES5.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames16_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --computedPropertyNames16_ES5.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames16_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames16_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames16_ES5.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-computedPropertyNames16_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames16_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ++computedPropertyNames16_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames16_ES5.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames16_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +-computedPropertyNames16_ES5.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames16_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames16_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ==== computedPropertyNames16_ES5.ts (6 errors) ==== @@ -37,30 +37,30 @@ class C { get [s]() { 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 computedPropertyNames16_ES5.ts:5:9: Add a return type to the get accessor declaration +-!!! 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 computedPropertyNames16_ES5.ts:5:9: Add a return type to the get accessor declaration. set [n](v) { } - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! 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 TS9033 computedPropertyNames16_ES5.ts:6:9: Add a type to parameter of the set accessor declaration ++!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ++!!! related TS9033 computedPropertyNames16_ES5.ts:6:9: Add a type to parameter of the set accessor declaration. static get [s + s]() { return 0; } set [s + n](v) { } get [+s]() { return 0; } static set [""](v) { } @@ -42,10 +47,11 @@ ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9032 computedPropertyNames16_ES5.ts:11:9: Add a return type to the get accessor declaration + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9032 computedPropertyNames16_ES5.ts:11:9: Add a return type to the get accessor declaration. set [a](v) { } - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! 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 TS9033 computedPropertyNames16_ES5.ts:12:9: Add a type to parameter of the set accessor declaration ++!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ++!!! related TS9033 computedPropertyNames16_ES5.ts:12:9: Add a type to parameter of the set accessor declaration. static get [true]() { return 0; } set [`hello bye`](v) { } ~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff index d34004232b767..96359e0c76a95 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff @@ -20,15 +20,15 @@ /// [Errors] //// --computedPropertyNames16_ES6.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNames16_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames16_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -+computedPropertyNames16_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames16_ES6.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames16_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --computedPropertyNames16_ES6.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames16_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - computedPropertyNames16_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames16_ES6.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-computedPropertyNames16_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames16_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ++computedPropertyNames16_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames16_ES6.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames16_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +-computedPropertyNames16_ES6.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames16_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + computedPropertyNames16_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ==== computedPropertyNames16_ES6.ts (6 errors) ==== @@ -37,30 +37,30 @@ class C { get [s]() { 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 computedPropertyNames16_ES6.ts:5:9: Add a return type to the get accessor declaration +-!!! 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 computedPropertyNames16_ES6.ts:5:9: Add a return type to the get accessor declaration. set [n](v) { } - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! 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 TS9033 computedPropertyNames16_ES6.ts:6:9: Add a type to parameter of the set accessor declaration ++!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ++!!! related TS9033 computedPropertyNames16_ES6.ts:6:9: Add a type to parameter of the set accessor declaration. static get [s + s]() { return 0; } set [s + n](v) { } get [+s]() { return 0; } static set [""](v) { } @@ -42,10 +47,11 @@ ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9032 computedPropertyNames16_ES6.ts:11:9: Add a return type to the get accessor declaration + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9032 computedPropertyNames16_ES6.ts:11:9: Add a return type to the get accessor declaration. set [a](v) { } - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! 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 TS9033 computedPropertyNames16_ES6.ts:12:9: Add a type to parameter of the set accessor declaration ++!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ++!!! related TS9033 computedPropertyNames16_ES6.ts:12:9: Add a type to parameter of the set accessor declaration. static get [true]() { return 0; } set [`hello bye`](v) { } ~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES5.d.ts.diff index 8c4200a787231..12da53db69b3c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES5.d.ts.diff @@ -17,14 +17,14 @@ /// [Errors] //// computedPropertyNames17_ES5.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames17_ES5.ts(3,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames17_ES5.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames17_ES5.ts(3,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames17_ES5.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames17_ES5.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES5.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES5.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES5.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames17_ES5.ts(7,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames17_ES5.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames17_ES5.ts(7,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames17_ES5.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames17_ES5.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -34,9 +34,9 @@ ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ --!!! 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 computedPropertyNames17_ES5.ts:3:9: Add a return type to the get accessor declaration +-!!! 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 computedPropertyNames17_ES5.ts:3:9: Add a return type to the get accessor declaration. static set [true](v) { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -46,9 +46,9 @@ ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ --!!! 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 computedPropertyNames17_ES5.ts:7:16: Add a return type to the get accessor declaration +-!!! 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 computedPropertyNames17_ES5.ts:7:16: Add a return type to the get accessor declaration. set [null](v) { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES6.d.ts.diff index 39b9288f7898f..ffa8a258a533f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES6.d.ts.diff @@ -17,14 +17,14 @@ /// [Errors] //// computedPropertyNames17_ES6.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames17_ES6.ts(3,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames17_ES6.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames17_ES6.ts(3,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames17_ES6.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames17_ES6.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES6.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES6.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES6.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames17_ES6.ts(7,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames17_ES6.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames17_ES6.ts(7,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames17_ES6.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames17_ES6.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -34,9 +34,9 @@ ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ --!!! 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 computedPropertyNames17_ES6.ts:3:9: Add a return type to the get accessor declaration +-!!! 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 computedPropertyNames17_ES6.ts:3:9: Add a return type to the get accessor declaration. static set [true](v) { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -46,9 +46,9 @@ ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ --!!! 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 computedPropertyNames17_ES6.ts:7:16: Add a return type to the get accessor declaration +-!!! 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 computedPropertyNames17_ES6.ts:7:16: Add a return type to the get accessor declaration. set [null](v) { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff index dd1683c43efe4..535a61cffa38c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff @@ -20,18 +20,18 @@ /// [Errors] //// --computedPropertyNames2_ES5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNames2_ES5.ts(5,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames2_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -+computedPropertyNames2_ES5.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames2_ES5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-computedPropertyNames2_ES5.ts(5,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames2_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ++computedPropertyNames2_ES5.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames2_ES5.ts(6,9): error TS2378: A 'get' accessor must return a value. --computedPropertyNames2_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNames2_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames2_ES5.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames2_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-computedPropertyNames2_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames2_ES5.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames2_ES5.ts(8,16): error TS2378: A 'get' accessor must return a value. --computedPropertyNames2_ES5.ts(8,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNames2_ES5.ts(9,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames2_ES5.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames2_ES5.ts(8,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-computedPropertyNames2_ES5.ts(9,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames2_ES5.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -==== computedPropertyNames2_ES5.ts (8 errors) ==== @@ -41,35 +41,35 @@ class C { [methodName]() { } ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNames2_ES5.ts:4:5: Add a return type to the method static [methodName]() { } ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNames2_ES5.ts:5:12: Add a return type to the method get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ --!!! 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 TS9033 computedPropertyNames2_ES5.ts:7:9: Add a type to parameter of the set accessor declaration -+!!! related TS9032 computedPropertyNames2_ES5.ts:6:9: Add a return type to the get accessor declaration +-!!! 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 TS9033 computedPropertyNames2_ES5.ts:7:9: Add a type to parameter of the set accessor declaration. ++!!! related TS9032 computedPropertyNames2_ES5.ts:6:9: Add a return type to the get accessor declaration. set [accessorName](v) { } - ~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ --!!! 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 TS9033 computedPropertyNames2_ES5.ts:9:16: Add a type to parameter of the set accessor declaration -+!!! related TS9032 computedPropertyNames2_ES5.ts:8:16: Add a return type to the get accessor declaration +-!!! 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 TS9033 computedPropertyNames2_ES5.ts:9:16: Add a type to parameter of the set accessor declaration. ++!!! related TS9032 computedPropertyNames2_ES5.ts:8:16: Add a return type to the get accessor declaration. static set [accessorName](v) { } - ~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff index 611bafe217a53..ba3282ccd3eac 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff @@ -20,18 +20,18 @@ /// [Errors] //// --computedPropertyNames2_ES6.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNames2_ES6.ts(5,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames2_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -+computedPropertyNames2_ES6.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames2_ES6.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-computedPropertyNames2_ES6.ts(5,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames2_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ++computedPropertyNames2_ES6.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames2_ES6.ts(6,9): error TS2378: A 'get' accessor must return a value. --computedPropertyNames2_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNames2_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames2_ES6.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames2_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-computedPropertyNames2_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames2_ES6.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames2_ES6.ts(8,16): error TS2378: A 'get' accessor must return a value. --computedPropertyNames2_ES6.ts(8,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNames2_ES6.ts(9,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNames2_ES6.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNames2_ES6.ts(8,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-computedPropertyNames2_ES6.ts(9,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNames2_ES6.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -==== computedPropertyNames2_ES6.ts (8 errors) ==== @@ -41,35 +41,35 @@ class C { [methodName]() { } ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNames2_ES6.ts:4:5: Add a return type to the method static [methodName]() { } ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNames2_ES6.ts:5:12: Add a return type to the method get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ --!!! 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 TS9033 computedPropertyNames2_ES6.ts:7:9: Add a type to parameter of the set accessor declaration -+!!! related TS9032 computedPropertyNames2_ES6.ts:6:9: Add a return type to the get accessor declaration +-!!! 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 TS9033 computedPropertyNames2_ES6.ts:7:9: Add a type to parameter of the set accessor declaration. ++!!! related TS9032 computedPropertyNames2_ES6.ts:6:9: Add a return type to the get accessor declaration. set [accessorName](v) { } - ~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ --!!! 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 TS9033 computedPropertyNames2_ES6.ts:9:16: Add a type to parameter of the set accessor declaration -+!!! related TS9032 computedPropertyNames2_ES6.ts:8:16: Add a return type to the get accessor declaration +-!!! 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 TS9033 computedPropertyNames2_ES6.ts:9:16: Add a type to parameter of the set accessor declaration. ++!!! related TS9032 computedPropertyNames2_ES6.ts:8:16: Add a return type to the get accessor declaration. static set [accessorName](v) { } - ~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff index bfab5e64714b6..21130c1692c00 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff @@ -10,16 +10,16 @@ /// [Errors] //// --computedPropertyNames4_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNames4_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames4_ES5.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations - computedPropertyNames4_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames4_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames4_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames4_ES5.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations --computedPropertyNames4_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames4_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames4_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames4_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-computedPropertyNames4_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames4_ES5.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations. + computedPropertyNames4_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames4_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames4_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames4_ES5.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +-computedPropertyNames4_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames4_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames4_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -==== computedPropertyNames4_ES5.ts (10 errors) ==== @@ -30,25 +30,25 @@ var v = { [s]: 0, - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. [n]: n, - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. ~ - !!! error TS9013: Expression type can't be inferred with --isolatedDeclarations - !!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v - !!! related TS9035 computedPropertyNames4_ES5.ts:6:10: Add a type assertion to this expression to make type type explicit + !!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. + !!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. + !!! related TS9035 computedPropertyNames4_ES5.ts:6:10: Add a type assertion to this expression to make type type explicit. @@ -55,11 +46,8 @@ - !!! related TS9035 computedPropertyNames4_ES5.ts:9:11: Add a type assertion to this expression to make type type explicit + !!! related TS9035 computedPropertyNames4_ES5.ts:9:11: Add a type assertion to this expression to make type type explicit. [""]: 0, [0]: 0, [a]: 1, - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. [true]: 0, ~~~~~~~~~~~ - !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - !!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v + !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + !!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff index 144e9549df058..ffde3d6444576 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff @@ -10,16 +10,16 @@ /// [Errors] //// --computedPropertyNames4_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNames4_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames4_ES6.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations - computedPropertyNames4_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames4_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames4_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames4_ES6.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations --computedPropertyNames4_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames4_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - computedPropertyNames4_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames4_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-computedPropertyNames4_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames4_ES6.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations. + computedPropertyNames4_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames4_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames4_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames4_ES6.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +-computedPropertyNames4_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames4_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + computedPropertyNames4_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -==== computedPropertyNames4_ES6.ts (10 errors) ==== @@ -30,25 +30,25 @@ var v = { [s]: 0, - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. [n]: n, - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. ~ - !!! error TS9013: Expression type can't be inferred with --isolatedDeclarations - !!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v - !!! related TS9035 computedPropertyNames4_ES6.ts:6:10: Add a type assertion to this expression to make type type explicit + !!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. + !!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. + !!! related TS9035 computedPropertyNames4_ES6.ts:6:10: Add a type assertion to this expression to make type type explicit. @@ -55,11 +46,8 @@ - !!! related TS9035 computedPropertyNames4_ES6.ts:9:11: Add a type assertion to this expression to make type type explicit + !!! related TS9035 computedPropertyNames4_ES6.ts:9:11: Add a type assertion to this expression to make type type explicit. [""]: 0, [0]: 0, [a]: 1, - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. [true]: 0, ~~~~~~~~~~~ - !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - !!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v + !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + !!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff index 570198713cc14..1e71244b75080 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff @@ -10,16 +10,16 @@ /// [Errors] //// computedPropertyNames5_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames5_ES5.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames5_ES5.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames5_ES5.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames5_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames5_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames5_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames5_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames5_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames5_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames5_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames5_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames5_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames5_ES5.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames5_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames5_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -==== computedPropertyNames5_ES5.ts (11 errors) ==== @@ -30,20 +30,20 @@ ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. [true]: 1, ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. [[]]: 0, @@ -45,11 +40,8 @@ - !!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v + !!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. [undefined]: undefined, ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. [null]: null ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff index 5490dab92fa15..579a811b4e691 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff @@ -10,16 +10,16 @@ /// [Errors] //// computedPropertyNames5_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames5_ES6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames5_ES6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames5_ES6.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames5_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames5_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames5_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames5_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames5_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames5_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames5_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames5_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames5_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames5_ES6.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames5_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + computedPropertyNames5_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -==== computedPropertyNames5_ES6.ts (11 errors) ==== @@ -30,20 +30,20 @@ ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. [true]: 1, ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. [[]]: 0, @@ -45,11 +40,8 @@ - !!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v + !!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. [undefined]: undefined, ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. [null]: null ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff index 8ab3f68a182e1..8eaa60154eacb 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff @@ -19,11 +19,11 @@ /// [Errors] //// --computedPropertyNames6_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames6_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames6_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames6_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames6_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames6_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames6_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames6_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -==== computedPropertyNames6_ES5.ts (5 errors) ==== @@ -34,19 +34,19 @@ var v = { [p1]: 0, - ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v. [p2]: 1, ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v. [p3]: 2 ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff index 363c40fd15e16..5f9d115ab2190 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff @@ -19,11 +19,11 @@ /// [Errors] //// --computedPropertyNames6_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames6_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames6_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames6_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames6_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames6_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames6_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNames6_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -==== computedPropertyNames6_ES6.ts (5 errors) ==== @@ -34,19 +34,19 @@ var v = { [p1]: 0, - ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v. [p2]: 1, ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v. [p3]: 2 ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff index 24024b95c08ec..0e4f9f11d17b3 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff @@ -17,12 +17,12 @@ /// [Errors] //// computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. --computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. --computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -==== computedPropertyNamesOnOverloads_ES5.ts (5 errors) ==== @@ -34,18 +34,18 @@ ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:4:5: Add a return type to the method [methodName](); ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:5:5: Add a return type to the method [methodName](v?: string) { } - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff index 55ab39bf10fed..3bf9fd225606d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff @@ -17,12 +17,12 @@ /// [Errors] //// computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. --computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. --computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -==== computedPropertyNamesOnOverloads_ES6.ts (5 errors) ==== @@ -34,18 +34,18 @@ ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:4:5: Add a return type to the method [methodName](); ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:5:5: Add a return type to the method [methodName](v?: string) { } - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff index 2765131554501..4e6a14815f671 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff @@ -18,12 +18,12 @@ /// [Errors] //// computedPropertyNamesWithStaticProperty.ts(2,1): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. --computedPropertyNamesWithStaticProperty.ts(4,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNamesWithStaticProperty.ts(4,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNamesWithStaticProperty.ts(4,10): error TS2449: Class 'C1' used before its declaration. --computedPropertyNamesWithStaticProperty.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-computedPropertyNamesWithStaticProperty.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNamesWithStaticProperty.ts(7,10): error TS2449: Class 'C1' used before its declaration. --computedPropertyNamesWithStaticProperty.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+computedPropertyNamesWithStaticProperty.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-computedPropertyNamesWithStaticProperty.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++computedPropertyNamesWithStaticProperty.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. 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. @@ -39,7 +39,7 @@ static staticProp = 10; get [C1.staticProp]() { - ~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ~~ !!! error TS2449: Class 'C1' used before its declaration. !!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. @@ -47,7 +47,7 @@ } set [C1.staticProp](x: string) { - ~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ~~ !!! error TS2449: Class 'C1' used before its declaration. !!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. @@ -55,8 +55,8 @@ } [C1.staticProp]() { } ~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 computedPropertyNamesWithStaticProperty.ts:10:5: Add a return type to the method ~~ !!! error TS2449: Class 'C1' used before its declaration. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff index 97d9f81fdb48b..4f79133fa619e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff @@ -21,9 +21,9 @@ constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -+constEnumErrors.ts(12,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations ++constEnumErrors.ts(12,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - constEnumErrors.ts(14,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations + constEnumErrors.ts(14,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. @@ -58,9 +59,9 @@ @@ -43,7 +43,7 @@ // forward reference to the element of the same enum X = Y, + ~ -+!!! 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. ~ !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. // forward reference to the element of the same enum diff --git a/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff index 40c52884651b7..9db5c30da6a5f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff @@ -70,11 +70,11 @@ decoratorsOnComputedProperties.ts(19,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(20,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(21,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(21,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-decoratorsOnComputedProperties.ts(21,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(22,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(22,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-decoratorsOnComputedProperties.ts(22,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(23,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(23,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-decoratorsOnComputedProperties.ts(23,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(27,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(28,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(29,5): error TS1206: Decorators are not valid here. @@ -84,11 +84,11 @@ decoratorsOnComputedProperties.ts(53,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(54,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(55,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(55,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-decoratorsOnComputedProperties.ts(55,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(56,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(56,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-decoratorsOnComputedProperties.ts(56,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(57,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(57,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-decoratorsOnComputedProperties.ts(57,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(62,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(63,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(64,5): error TS1206: Decorators are not valid here. @@ -98,11 +98,11 @@ decoratorsOnComputedProperties.ts(89,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(90,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(92,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(92,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-decoratorsOnComputedProperties.ts(92,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(93,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(93,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-decoratorsOnComputedProperties.ts(93,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(94,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(94,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-decoratorsOnComputedProperties.ts(94,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(98,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(99,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(100,5): error TS1206: Decorators are not valid here. @@ -112,11 +112,11 @@ decoratorsOnComputedProperties.ts(125,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(126,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(128,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(128,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-decoratorsOnComputedProperties.ts(128,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(129,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(129,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-decoratorsOnComputedProperties.ts(129,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(131,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(131,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-decoratorsOnComputedProperties.ts(131,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(135,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(136,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(137,5): error TS1206: Decorators are not valid here. @@ -126,11 +126,11 @@ decoratorsOnComputedProperties.ts(163,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(164,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(166,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(166,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-decoratorsOnComputedProperties.ts(166,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(167,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(167,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-decoratorsOnComputedProperties.ts(167,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(169,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(169,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-decoratorsOnComputedProperties.ts(169,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(173,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(174,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(175,5): error TS1206: Decorators are not valid here. @@ -144,25 +144,25 @@ +==== decoratorsOnComputedProperties.ts (82 errors) ==== function x(o: object, k: PropertyKey) { } ~ - !!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9031 decoratorsOnComputedProperties.ts:1:10: Add a return type to the function declaration + !!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9031 decoratorsOnComputedProperties.ts:1:10: Add a return type to the function declaration. @@ -191,20 +191,14 @@ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. [fieldNameA]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. @x [fieldNameB]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. @x [fieldNameC]: any = null; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } void class B { @@ -173,17 +173,17 @@ ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. @x [fieldNameB]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. @x [fieldNameC]: any = null; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ["some" + "method"]() {} } @@ -194,17 +194,17 @@ ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. @x [fieldNameB]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. @x [fieldNameC]: any = null; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } void class F { @@ -215,18 +215,18 @@ ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. @x [fieldNameB]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ["some" + "method2"]() {} @x [fieldNameC]: any = null; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } void class H { @@ -237,18 +237,18 @@ ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. @x [fieldNameB]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ["some" + "method2"]() {} @x [fieldNameC]: any = null; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } void class J { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff index 3f809bd2a191b..fe53f98bf9cbb 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff @@ -23,12 +23,12 @@ /// [Errors] //// -+forwardRefInEnum.ts(4,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations ++forwardRefInEnum.ts(4,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -+forwardRefInEnum.ts(5,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations ++forwardRefInEnum.ts(5,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. forwardRefInEnum.ts(5,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - forwardRefInEnum.ts(7,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations - forwardRefInEnum.ts(8,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations + forwardRefInEnum.ts(7,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. + forwardRefInEnum.ts(8,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. -==== forwardRefInEnum.ts (4 errors) ==== @@ -38,12 +38,12 @@ // forward reference to the element of the same enum X = Y, + ~ -+!!! 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. ~ !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. X1 = E1["Y"], + ~~ -+!!! 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. ~~~~~~~ !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. // forward reference to the element of the same enum 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 index e10939d2da23e..2ef3cc8ae222f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrorsClasses.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrorsClasses.d.ts.diff @@ -30,21 +30,21 @@ export {}; @@ -42,15 +50,15 @@ - 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(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(42,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-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(42,5): error TS9008: Method must have an explicit return type annotation 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(44,35): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -+isolatedDeclarationErrorsClasses.ts(46,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +-isolatedDeclarationErrorsClasses.ts(46,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++isolatedDeclarationErrorsClasses.ts(44,35): error TS9011: Parameter must have an explicit type annotation 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,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(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. @@ -54,35 +54,35 @@ [noAnnotationStringName]() { } ~~~~~~~~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 isolatedDeclarationErrorsClasses.ts:42:5: Add a return type to the method [noParamAnnotationStringName](v): void { } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! 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. + ~ -+!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -+!!! related TS9028 isolatedDeclarationErrorsClasses.ts:44:35: Add a type annotation to the parameter v ++!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9028 isolatedDeclarationErrorsClasses.ts:44:35: Add a type annotation to the parameter v. 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 +-!!! 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 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 ++!!! 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; ~~~~~~~~~~~~~~~~~~~~~ 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 index 930495476e4c0..e23ad21fe1f9f 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrorsObjects.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrorsObjects.d.ts.diff @@ -16,18 +16,18 @@ } 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(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(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(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) ==== @@ -37,25 +37,25 @@ b: "" } @@ -167,11 +166,8 @@ - !!! related TS9027 isolatedDeclarationErrorsObjects.ts:62:14: Add a type annotation to the variable oWithComputedProperties + !!! 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 +-!!! 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 + !!! 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 +-!!! 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/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts.diff index a733d5147eb93..f3b68a579b342 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts.diff @@ -6,21 +6,21 @@ --- TSC declarations +++ DTE declarations @@ -21,9 +21,8 @@ - modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(16,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations + modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(16,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(17,5): error TS2339: Property 'name' does not exist on type '() => void'. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(20,6): error TS2550: Property 'sign' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. - modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +-modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(29,18): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,13): error TS2304: Cannot find name 'Proxy'. @@ -33,13 +32,12 @@ modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(44,5): error TS2550: Property 'includes' does not exist on type 'string'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations - modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +-modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. @@ -32,24 +32,24 @@ ~ @@ -84,11 +82,8 @@ ~~~~~~~~~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:23:5: Add a type annotation to the variable o + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:23:5: Add a type annotation to the variable o. !!! related TS9034 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:25:5: Add a return type to the method - ~~~~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:23:5: Add a type annotation to the variable o +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:23:5: Add a type annotation to the variable o. ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. return false; } @@ -140,11 +135,8 @@ ~~~~~~~~~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:50:7: Add a type annotation to the variable o1 + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:50:7: Add a type annotation to the variable o1. !!! related TS9034 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:51:5: Add a return type to the method - ~~~~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:50:7: Add a type annotation to the variable o1 +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:50:7: Add a type annotation to the variable o1. ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. return false; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff index 7597a0f5909c9..6a2abfb0d1dc8 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff @@ -13,7 +13,7 @@ - -/// [Errors] //// - --/node_modules/some-library/index.ios.ts(1,17): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +-/node_modules/some-library/index.ios.ts(1,17): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. - - -==== /test.ts (0 errors) ==== @@ -22,8 +22,8 @@ -==== /node_modules/some-library/index.ios.ts (1 errors) ==== - export function ios() {} - ~~~ --!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations --!!! related TS9031 /node_modules/some-library/index.ios.ts:1:17: Add a return type to the function declaration +-!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +-!!! related TS9031 /node_modules/some-library/index.ios.ts:1:17: Add a return type to the function declaration. -==== /node_modules/some-library/index.ts (0 errors) ==== - export function base() {} \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff index 0da044b8c033e..f19945c701a3a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff @@ -30,19 +30,19 @@ [1](): void; [2](): void; @@ -43,21 +47,16 @@ - overloadsWithComputedNames.ts(8,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + overloadsWithComputedNames.ts(8,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. overloadsWithComputedNames.ts(14,5): error TS2391: Function implementation is missing or not immediately following the declaration. overloadsWithComputedNames.ts(16,5): error TS2389: Function implementation name must be '["bar"]'. overloadsWithComputedNames.ts(28,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. --overloadsWithComputedNames.ts(28,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-overloadsWithComputedNames.ts(28,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. overloadsWithComputedNames.ts(29,5): error TS2391: Function implementation is missing or not immediately following the declaration. overloadsWithComputedNames.ts(35,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. overloadsWithComputedNames.ts(42,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. --overloadsWithComputedNames.ts(42,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --overloadsWithComputedNames.ts(43,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-overloadsWithComputedNames.ts(42,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-overloadsWithComputedNames.ts(43,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. overloadsWithComputedNames.ts(47,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. --overloadsWithComputedNames.ts(47,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --overloadsWithComputedNames.ts(48,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-overloadsWithComputedNames.ts(47,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-overloadsWithComputedNames.ts(48,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is missing or not immediately following the declaration. @@ -58,7 +58,7 @@ ~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. [uniqueSym2](): void; // should error ~~~~~~~~~~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. @@ -69,10 +69,10 @@ ~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. [strUnion]() { } - ~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } class I2 { @@ -80,10 +80,10 @@ ~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. [strUnion]() { } - ~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } class C3 { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff index 801b9e624eed9..bfd2f420a44d7 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff @@ -10,7 +10,7 @@ /// [Errors] //// --parserComputedPropertyName1.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-parserComputedPropertyName1.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserComputedPropertyName1.ts(1,12): error TS2304: Cannot find name 'e'. parserComputedPropertyName1.ts(1,15): error TS1005: ':' expected. @@ -19,8 +19,8 @@ +==== parserComputedPropertyName1.ts (2 errors) ==== var v = { [e] }; - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 parserComputedPropertyName1.ts:1:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 parserComputedPropertyName1.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName11.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName11.d.ts.diff index a061791f6ad69..875983ca6cfa6 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName11.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName11.d.ts.diff @@ -16,7 +16,7 @@ /// [Errors] //// parserComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -+parserComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++parserComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. parserComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. @@ -27,7 +27,7 @@ ~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 parserComputedPropertyName11.ts:2:4: Add a return type to the method ~ !!! error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName12.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName12.d.ts.diff index 10a845e2f22bf..06e9ef63fe49d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName12.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName12.d.ts.diff @@ -15,7 +15,7 @@ /// [Errors] //// -+parserComputedPropertyName12.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++parserComputedPropertyName12.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. parserComputedPropertyName12.ts(2,5): error TS2304: Cannot find name 'e'. @@ -24,7 +24,7 @@ class C { [e]() { } + ~~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 parserComputedPropertyName12.ts:2:4: Add a return type to the method ~ !!! error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName17.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName17.d.ts.diff index 0bddf3b725083..2bfd9d984f24d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName17.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName17.d.ts.diff @@ -10,18 +10,18 @@ /// [Errors] //// --parserComputedPropertyName17.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-parserComputedPropertyName17.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserComputedPropertyName17.ts(1,16): error TS2304: Cannot find name 'e'. - parserComputedPropertyName17.ts(1,19): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + parserComputedPropertyName17.ts(1,19): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -==== parserComputedPropertyName17.ts (3 errors) ==== +==== parserComputedPropertyName17.ts (2 errors) ==== var v = { set [e](v) { } } - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 parserComputedPropertyName17.ts:1:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 parserComputedPropertyName17.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. ~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff index 500d7ee5602b6..c711ef5a29464 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff @@ -16,7 +16,7 @@ /// [Errors] //// --parserComputedPropertyName2.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-parserComputedPropertyName2.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. @@ -24,8 +24,8 @@ +==== parserComputedPropertyName2.ts (1 errors) ==== var v = { [e]: 1 }; - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 parserComputedPropertyName2.ts:1:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 parserComputedPropertyName2.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff index c29c694a65bf1..c4c7a4cb6763b 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff @@ -16,7 +16,7 @@ /// [Errors] //// parserComputedPropertyName24.ts(2,10): error TS2304: Cannot find name 'e'. -+parserComputedPropertyName24.ts(2,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations ++parserComputedPropertyName24.ts(2,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -==== parserComputedPropertyName24.ts (1 errors) ==== @@ -26,7 +26,7 @@ ~ !!! error TS2304: Cannot find name 'e'. + ~ -+!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -+!!! related TS9033 parserComputedPropertyName24.ts:2:9: Add a type to parameter of the set accessor declaration ++!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ++!!! related TS9033 parserComputedPropertyName24.ts:2:9: Add a type to parameter of the set accessor declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff index 405729e720b6d..6532db5787fb0 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff @@ -17,7 +17,7 @@ parserComputedPropertyName25.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName25.ts(3,6): error TS2304: Cannot find name 'e'. -+parserComputedPropertyName25.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ++parserComputedPropertyName25.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. @@ -33,8 +33,8 @@ + ~ [e2] = 1 + ~~~~~~~~~~~~ -+!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -+!!! related TS9029 parserComputedPropertyName25.ts:3:5: Add a type annotation to the property [e] ++!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9029 parserComputedPropertyName25.ts:3:5: Add a type annotation to the property [e]. ~~ !!! error TS2304: Cannot find name 'e2'. } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff index dc27687f1033a..5924ed3dc039a 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff @@ -19,7 +19,7 @@ parserComputedPropertyName29.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName29.ts(3,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName29.ts(3,11): error TS2304: Cannot find name 'id'. -+parserComputedPropertyName29.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ++parserComputedPropertyName29.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. parserComputedPropertyName29.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName29.ts(4,6): error TS2304: Cannot find name 'e2'. @@ -36,8 +36,8 @@ ~~ !!! error TS2304: Cannot find name 'id'. + ~~~~ -+!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -+!!! related TS9029 parserComputedPropertyName29.ts:3:5: Add a type annotation to the property [e] ++!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9029 parserComputedPropertyName29.ts:3:5: Add a type annotation to the property [e]. [e2]: number ~~~~ !!! 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/parserComputedPropertyName3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName3.d.ts.diff index 293199a509c95..10162151c841d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName3.d.ts.diff @@ -9,8 +9,8 @@ /// [Errors] //// - parserComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --parserComputedPropertyName3.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + parserComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +-parserComputedPropertyName3.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserComputedPropertyName3.ts(1,12): error TS2304: Cannot find name 'e'. @@ -18,12 +18,12 @@ +==== parserComputedPropertyName3.ts (2 errors) ==== var v = { [e]() { } }; ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9027 parserComputedPropertyName3.ts:1:5: Add a type annotation to the variable v + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9027 parserComputedPropertyName3.ts:1:5: Add a type annotation to the variable v. !!! related TS9034 parserComputedPropertyName3.ts:1:11: Add a return type to the method - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 parserComputedPropertyName3.ts:1:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 parserComputedPropertyName3.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff index 7b3a2460adf15..2738dd4b76f22 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff @@ -16,7 +16,7 @@ /// [Errors] //// parserComputedPropertyName33.ts(3,6): error TS2304: Cannot find name 'e'. -+parserComputedPropertyName33.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ++parserComputedPropertyName33.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. parserComputedPropertyName33.ts(4,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName33.ts(4,12): error TS1005: ';' expected. parserComputedPropertyName33.ts(5,1): error TS1128: Declaration or statement expected. @@ -32,8 +32,8 @@ + ~ [e2]() { } + ~~~~~~~~~~ -+!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -+!!! related TS9029 parserComputedPropertyName33.ts:3:5: Add a type annotation to the property [e] ++!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9029 parserComputedPropertyName33.ts:3:5: Add a type annotation to the property [e]. ~~ !!! error TS2304: Cannot find name 'e2'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff index b140e3707d85c..5cbfdc962e847 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff @@ -16,7 +16,7 @@ /// [Errors] //// --parserComputedPropertyName37.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-parserComputedPropertyName37.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserComputedPropertyName37.ts(2,6): error TS2304: Cannot find name 'public'. @@ -25,8 +25,8 @@ var v = { [public]: 0 - ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 parserComputedPropertyName37.ts:1:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 parserComputedPropertyName37.ts:1:5: Add a type annotation to the variable v. ~~~~~~ !!! error TS2304: Cannot find name 'public'. }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName38.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName38.d.ts.diff index 024672025e0f9..bb7547c74d659 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName38.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName38.d.ts.diff @@ -15,7 +15,7 @@ /// [Errors] //// -+parserComputedPropertyName38.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++parserComputedPropertyName38.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. parserComputedPropertyName38.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. parserComputedPropertyName38.ts(2,6): error TS2304: Cannot find name 'public'. @@ -25,7 +25,7 @@ class C { [public]() { } + ~~~~~~~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 parserComputedPropertyName38.ts:2:5: Add a return type to the method ~~~~~~ !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName39.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName39.d.ts.diff index f95911148c966..a949192d3267d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName39.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName39.d.ts.diff @@ -15,7 +15,7 @@ /// [Errors] //// -+parserComputedPropertyName39.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++parserComputedPropertyName39.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. parserComputedPropertyName39.ts(3,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. parserComputedPropertyName39.ts(3,6): error TS2304: Cannot find name 'public'. @@ -26,7 +26,7 @@ class C { [public]() { } + ~~~~~~~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 parserComputedPropertyName39.ts:3:5: Add a return type to the method ~~~~~~ !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName4.d.ts.diff index 90593aef4f782..630706bf1d1b4 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName4.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName4.d.ts.diff @@ -9,8 +9,8 @@ /// [Errors] //// parserComputedPropertyName4.ts(1,15): error TS2378: A 'get' accessor must return a value. - parserComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --parserComputedPropertyName4.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + parserComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +-parserComputedPropertyName4.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. @@ -20,11 +20,11 @@ ~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9032 parserComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9032 parserComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration. - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 parserComputedPropertyName4.ts:1:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 parserComputedPropertyName4.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName5.d.ts.diff index f44863757d442..80176bc52e05b 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName5.d.ts.diff @@ -9,8 +9,8 @@ parserComputedPropertyName5.ts(1,11): error TS1042: 'public' modifier cannot be used here. parserComputedPropertyName5.ts(1,22): error TS2378: A 'get' accessor must return a value. - parserComputedPropertyName5.ts(1,22): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --parserComputedPropertyName5.ts(1,22): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + parserComputedPropertyName5.ts(1,22): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +-parserComputedPropertyName5.ts(1,22): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserComputedPropertyName5.ts(1,23): error TS2304: Cannot find name 'e'. @@ -22,11 +22,11 @@ ~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9032 parserComputedPropertyName5.ts:1:22: Add a return type to the get accessor declaration + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9032 parserComputedPropertyName5.ts:1:22: Add a return type to the get accessor declaration. - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 parserComputedPropertyName5.ts:1:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 parserComputedPropertyName5.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff index e63ec96f993db..bcad126b2ace6 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff @@ -10,9 +10,9 @@ /// [Errors] //// --parserComputedPropertyName6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-parserComputedPropertyName6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserComputedPropertyName6.ts(1,12): error TS2304: Cannot find name 'e'. - parserComputedPropertyName6.ts(1,19): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + parserComputedPropertyName6.ts(1,19): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserComputedPropertyName6.ts(1,20): error TS2304: Cannot find name 'e'. parserComputedPropertyName6.ts(1,24): error TS2304: Cannot find name 'e'. @@ -21,9 +21,9 @@ +==== parserComputedPropertyName6.ts (4 errors) ==== var v = { [e]: 1, [e + e]: 2 }; - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 parserComputedPropertyName6.ts:1:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 parserComputedPropertyName6.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. ~~~~~~~ - !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName7.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName7.d.ts.diff index 7b3054d5b49ca..98522b2a07098 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName7.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName7.d.ts.diff @@ -16,7 +16,7 @@ /// [Errors] //// parserComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+parserComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ++parserComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. parserComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. @@ -27,8 +27,8 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ -+!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -+!!! related TS9029 parserComputedPropertyName7.ts:2:4: Add a type annotation to the property [e] ++!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9029 parserComputedPropertyName7.ts:2:4: Add a type annotation to the property [e]. ~ !!! error TS2304: Cannot find name 'e'. } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName8.d.ts.diff index eebd8ad9ab0ef..8a80206e061f2 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName8.d.ts.diff @@ -16,7 +16,7 @@ /// [Errors] //// parserComputedPropertyName8.ts(2,11): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+parserComputedPropertyName8.ts(2,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ++parserComputedPropertyName8.ts(2,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. parserComputedPropertyName8.ts(2,12): error TS2304: Cannot find name 'e'. @@ -27,8 +27,8 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ -+!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -+!!! related TS9029 parserComputedPropertyName8.ts:2:11: Add a type annotation to the property [e] ++!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9029 parserComputedPropertyName8.ts:2:11: Add a type annotation to the property [e]. ~ !!! error TS2304: Cannot find name 'e'. } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName11.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName11.d.ts.diff index a2f795c3cd487..a145bbe0eb1a1 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName11.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName11.d.ts.diff @@ -16,7 +16,7 @@ /// [Errors] //// parserES5ComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -+parserES5ComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++parserES5ComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. parserES5ComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. @@ -27,7 +27,7 @@ ~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. + ~~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 parserES5ComputedPropertyName11.ts:2:4: Add a return type to the method ~ !!! error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff index 11ce9cf5f29fd..7c4d325d887d3 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff @@ -16,7 +16,7 @@ /// [Errors] //// --parserES5ComputedPropertyName2.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-parserES5ComputedPropertyName2.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserES5ComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. @@ -24,8 +24,8 @@ +==== parserES5ComputedPropertyName2.ts (1 errors) ==== var v = { [e]: 1 }; - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 parserES5ComputedPropertyName2.ts:1:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 parserES5ComputedPropertyName2.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName3.d.ts.diff index ebc4b4a0d7c47..b44380399a64d 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName3.d.ts.diff @@ -9,8 +9,8 @@ /// [Errors] //// - parserES5ComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --parserES5ComputedPropertyName3.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + parserES5ComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +-parserES5ComputedPropertyName3.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserES5ComputedPropertyName3.ts(1,12): error TS2304: Cannot find name 'e'. @@ -18,12 +18,12 @@ +==== parserES5ComputedPropertyName3.ts (2 errors) ==== var v = { [e]() { } }; ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9027 parserES5ComputedPropertyName3.ts:1:5: Add a type annotation to the variable v + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9027 parserES5ComputedPropertyName3.ts:1:5: Add a type annotation to the variable v. !!! related TS9034 parserES5ComputedPropertyName3.ts:1:11: Add a return type to the method - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 parserES5ComputedPropertyName3.ts:1:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 parserES5ComputedPropertyName3.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName4.d.ts.diff index 0083564835564..11615b3501a5c 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName4.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName4.d.ts.diff @@ -9,8 +9,8 @@ /// [Errors] //// parserES5ComputedPropertyName4.ts(1,15): error TS2378: A 'get' accessor must return a value. - parserES5ComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --parserES5ComputedPropertyName4.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + parserES5ComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +-parserES5ComputedPropertyName4.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserES5ComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. @@ -20,11 +20,11 @@ ~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9032 parserES5ComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9032 parserES5ComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration. - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 parserES5ComputedPropertyName4.ts:1:5: Add a type annotation to the variable v +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 parserES5ComputedPropertyName4.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName7.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName7.d.ts.diff index c2f8c0895d560..37f7abd37d8d8 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName7.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName7.d.ts.diff @@ -16,7 +16,7 @@ /// [Errors] //// parserES5ComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+parserES5ComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations ++parserES5ComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. parserES5ComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. @@ -27,8 +27,8 @@ ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. + ~~~ -+!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -+!!! related TS9029 parserES5ComputedPropertyName7.ts:2:4: Add a type annotation to the property [e] ++!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. ++!!! related TS9029 parserES5ComputedPropertyName7.ts:2:4: Add a type annotation to the property [e]. ~ !!! error TS2304: Cannot find name 'e'. } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff index 31345ac43bfeb..a79730e41d146 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff @@ -14,7 +14,7 @@ /// [Errors] //// parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. -+parserStrictMode8.ts(2,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations ++parserStrictMode8.ts(2,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -==== parserStrictMode8.ts (1 errors) ==== @@ -24,7 +24,7 @@ ~~~~ !!! error TS1100: Invalid use of 'eval' in strict mode. + ~~~~ -+!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -+!!! related TS9031 parserStrictMode8.ts:2:10: Add a return type to the function declaration ++!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. ++!!! related TS9031 parserStrictMode8.ts:2:10: Add a return type to the function declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess1.d.ts.diff index 3525f41f5a34c..bf930ae2a313e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess1.d.ts.diff @@ -18,11 +18,11 @@ /// [Errors] //// - superSymbolIndexedAccess1.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations --superSymbolIndexedAccess1.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --superSymbolIndexedAccess1.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+superSymbolIndexedAccess1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -+superSymbolIndexedAccess1.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + superSymbolIndexedAccess1.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +-superSymbolIndexedAccess1.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-superSymbolIndexedAccess1.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++superSymbolIndexedAccess1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ++superSymbolIndexedAccess1.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== superSymbolIndexedAccess1.ts (3 errors) ==== @@ -32,8 +32,8 @@ class Foo { [symbol]() { ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 superSymbolIndexedAccess1.ts:4:5: Add a return type to the method return 0; } @@ -42,8 +42,8 @@ class Bar extends Foo { [symbol]() { ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 superSymbolIndexedAccess1.ts:10:5: Add a return type to the method return super[symbol](); } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess3.d.ts.diff index 66e80096f82bc..b08fa5221b8e9 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess3.d.ts.diff @@ -18,11 +18,11 @@ /// [Errors] //// - superSymbolIndexedAccess3.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations --superSymbolIndexedAccess3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --superSymbolIndexedAccess3.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+superSymbolIndexedAccess3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -+superSymbolIndexedAccess3.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + superSymbolIndexedAccess3.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +-superSymbolIndexedAccess3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-superSymbolIndexedAccess3.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++superSymbolIndexedAccess3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ++superSymbolIndexedAccess3.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. superSymbolIndexedAccess3.ts(11,22): error TS2538: Type 'typeof Bar' cannot be used as an index type. @@ -32,8 +32,8 @@ class Foo { [symbol]() { ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 superSymbolIndexedAccess3.ts:4:5: Add a return type to the method return 0; } @@ -42,8 +42,8 @@ class Bar extends Foo { [symbol]() { ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 superSymbolIndexedAccess3.ts:10:5: Add a return type to the method return super[Bar](); ~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess4.d.ts.diff index b45d454704e2b..8ddf472a8f403 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess4.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess4.d.ts.diff @@ -15,9 +15,9 @@ /// [Errors] //// - superSymbolIndexedAccess4.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations --superSymbolIndexedAccess4.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+superSymbolIndexedAccess4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations + superSymbolIndexedAccess4.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +-superSymbolIndexedAccess4.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++superSymbolIndexedAccess4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. superSymbolIndexedAccess4.ts(5,16): error TS2335: 'super' can only be referenced in a derived class. @@ -27,8 +27,8 @@ class Bar { [symbol]() { ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 superSymbolIndexedAccess4.ts:4:5: Add a return type to the method return super[symbol](); ~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess5.d.ts.diff index 0e0aa56702f76..f9c8156c1c8f4 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess5.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess5.d.ts.diff @@ -18,10 +18,10 @@ /// [Errors] //// --superSymbolIndexedAccess5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --superSymbolIndexedAccess5.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+superSymbolIndexedAccess5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -+superSymbolIndexedAccess5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-superSymbolIndexedAccess5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-superSymbolIndexedAccess5.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++superSymbolIndexedAccess5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ++superSymbolIndexedAccess5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== superSymbolIndexedAccess5.ts (2 errors) ==== @@ -30,8 +30,8 @@ class Foo { [symbol]() { ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 superSymbolIndexedAccess5.ts:4:5: Add a return type to the method return 0; } @@ -40,8 +40,8 @@ class Bar extends Foo { [symbol]() { ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 superSymbolIndexedAccess5.ts:10:5: Add a return type to the method return super[symbol](); } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess6.d.ts.diff index 8e1365c06aa8e..6c82147022f60 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess6.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess6.d.ts.diff @@ -18,10 +18,10 @@ /// [Errors] //// --superSymbolIndexedAccess6.ts(4,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --superSymbolIndexedAccess6.ts(10,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+superSymbolIndexedAccess6.ts(4,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -+superSymbolIndexedAccess6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-superSymbolIndexedAccess6.ts(4,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-superSymbolIndexedAccess6.ts(10,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++superSymbolIndexedAccess6.ts(4,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ++superSymbolIndexedAccess6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== superSymbolIndexedAccess6.ts (2 errors) ==== @@ -30,8 +30,8 @@ class Foo { static [symbol]() { ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 superSymbolIndexedAccess6.ts:4:12: Add a return type to the method return 0; } @@ -40,8 +40,8 @@ class Bar extends Foo { static [symbol]() { ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ++!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9034 superSymbolIndexedAccess6.ts:10:12: Add a return type to the method return super[symbol](); } 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 index ac9ef0fd0b94c..89ff3124a63df 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolDeclarationEmit12.d.ts.diff @@ -21,9 +21,9 @@ /// [Errors] //// -+symbolDeclarationEmit12.ts(5,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++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(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]'. @@ -35,7 +35,7 @@ [Symbol.iterator]: I; [Symbol.toPrimitive](x: I) { } + ~~~~~~~~~~~~~~~~~~~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations ++!!! 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 @@ -44,8 +44,8 @@ ~~~~~~~~~~~~~~~~~~~~ !!! 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 ++!!! 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/symbolProperty1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff index 3de910a8e7d92..dd53f570fc160 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff @@ -10,11 +10,11 @@ /// [Errors] //// --symbolProperty1.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - symbolProperty1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --symbolProperty1.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - symbolProperty1.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --symbolProperty1.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-symbolProperty1.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + symbolProperty1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +-symbolProperty1.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + symbolProperty1.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +-symbolProperty1.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -==== symbolProperty1.ts (5 errors) ==== @@ -23,23 +23,23 @@ var x = { [s]: 0, - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x. [s]() { }, ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x. !!! related TS9034 symbolProperty1.ts:4:5: Add a return type to the method - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x. get [s]() { ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9032 symbolProperty1.ts:5:9: Add a return type to the get accessor declaration + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9032 symbolProperty1.ts:5:9: Add a return type to the get accessor declaration. - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x. return 0; } } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff index 16b78cc035bcd..608774e56efb8 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff @@ -9,40 +9,40 @@ /// [Errors] //// - symbolProperty2.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations --symbolProperty2.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - symbolProperty2.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --symbolProperty2.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations - symbolProperty2.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --symbolProperty2.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + symbolProperty2.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +-symbolProperty2.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + symbolProperty2.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +-symbolProperty2.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. + symbolProperty2.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +-symbolProperty2.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -==== symbolProperty2.ts (6 errors) ==== +==== symbolProperty2.ts (3 errors) ==== var s = Symbol(); ~~~~~~~~ - !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations - !!! related TS9027 symbolProperty2.ts:1:5: Add a type annotation to the variable s + !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + !!! related TS9027 symbolProperty2.ts:1:5: Add a type annotation to the variable s. var x = { [s]: 0, - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x. [s]() { }, ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x. !!! related TS9034 symbolProperty2.ts:4:5: Add a return type to the method - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x. get [s]() { ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9032 symbolProperty2.ts:5:9: Add a return type to the get accessor declaration + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9032 symbolProperty2.ts:5:9: Add a return type to the get accessor declaration. - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x. return 0; } } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff index 532e8ff082efd..c27f2b1611d6e 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff @@ -8,49 +8,49 @@ @@ -7,47 +7,35 @@ /// [Errors] //// - symbolProperty3.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + symbolProperty3.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. symbolProperty3.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --symbolProperty3.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-symbolProperty3.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. symbolProperty3.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - symbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations --symbolProperty3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + symbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +-symbolProperty3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. symbolProperty3.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - symbolProperty3.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations --symbolProperty3.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations + symbolProperty3.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +-symbolProperty3.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -==== symbolProperty3.ts (9 errors) ==== +==== symbolProperty3.ts (6 errors) ==== var s = Symbol; ~~~~~~ - !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations - !!! related TS9027 symbolProperty3.ts:1:5: Add a type annotation to the variable s + !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + !!! related TS9027 symbolProperty3.ts:1:5: Add a type annotation to the variable s. var x = { [s]: 0, ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x. [s]() { }, ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x + !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x. !!! related TS9034 symbolProperty3.ts:4:5: Add a return type to the method - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x. get [s]() { ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9032 symbolProperty3.ts:5:9: Add a return type to the get accessor declaration + !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9032 symbolProperty3.ts:5:9: Add a return type to the get accessor declaration. - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x. return 0; } } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff index 35151d4515e7c..42432feb8cbf6 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff @@ -16,7 +16,7 @@ /// [Errors] //// --symbolProperty52.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-symbolProperty52.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. symbolProperty52.ts(2,13): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. symbolProperty52.ts(7,12): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. @@ -26,8 +26,8 @@ var obj = { [Symbol.nonsense]: 0 - ~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 symbolProperty52.ts:1:5: Add a type annotation to the variable obj +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 symbolProperty52.ts:1:5: Add a type annotation to the variable obj. ~~~~~~~~ !!! error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff index 9689b8e70af47..f6cd005e28bee 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff @@ -17,7 +17,7 @@ /// [Errors] //// symbolProperty53.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --symbolProperty53.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-symbolProperty53.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. symbolProperty53.ts(5,5): error TS2538: Type '(key: string) => symbol' cannot be used as an index type. @@ -28,8 +28,8 @@ ~~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 symbolProperty53.ts:1:5: Add a type annotation to the variable obj +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 symbolProperty53.ts:1:5: Add a type annotation to the variable obj. }; obj[Symbol.for]; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff index cea262592c5a5..4e791fc222b93 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff @@ -17,7 +17,7 @@ /// [Errors] //// symbolProperty54.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --symbolProperty54.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-symbolProperty54.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -==== symbolProperty54.ts (2 errors) ==== @@ -27,7 +27,7 @@ ~~~~~~~~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 symbolProperty54.ts:1:5: Add a type annotation to the variable obj +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 symbolProperty54.ts:1:5: Add a type annotation to the variable obj. }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff index 72e7137b14487..c27adeec9a842 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff @@ -14,7 +14,7 @@ - -/// [Errors] //// - --symbolProperty58.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +-symbolProperty58.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== symbolProperty58.ts (1 errors) ==== @@ -25,8 +25,8 @@ - var obj = { - [Symbol.foo]: 0 - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations --!!! related TS9027 symbolProperty58.ts:5:5: Add a type annotation to the variable obj +-!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +-!!! related TS9027 symbolProperty58.ts:5:5: Add a type annotation to the variable obj. - } \ No newline at end of file +declare var obj: { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment32.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment32.d.ts.diff index 146a6e24d408a..69c61a6957cbd 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment32.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment32.d.ts.diff @@ -7,7 +7,7 @@ +++ DTE declarations @@ -22,16 +22,22 @@ - expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations + expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. expando.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. expando.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. +expando.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. @@ -18,7 +18,7 @@ +expando.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. expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. +expando.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. - expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. @@ -27,8 +27,8 @@ +==== expando.ts (12 errors) ==== function ExpandoMerge(n: number) { ~~~~~~~~~~~~ - !!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9031 expando.ts:1:10: Add a return type to the function declaration + !!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9031 expando.ts:1:10: Add a return type to the function declaration. @@ -45,17 +51,29 @@ !!! error 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; @@ -57,5 +57,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. var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations - !!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n + !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + !!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment33.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment33.d.ts.diff index 67fa4023e941b..99e1e7fa35dd5 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment33.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment33.d.ts.diff @@ -7,7 +7,7 @@ +++ DTE declarations @@ -22,10 +22,16 @@ - expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations + expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. expando.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. expando.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. +expando.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. @@ -18,7 +18,7 @@ +expando.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. expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. +expando.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. - expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations + expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. @@ -31,8 +31,8 @@ +==== expando.ts (12 errors) ==== function ExpandoMerge(n: number) { ~~~~~~~~~~~~ - !!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations - !!! related TS9031 expando.ts:1:10: Add a return type to the function declaration + !!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. + !!! related TS9031 expando.ts:1:10: Add a return type to the function declaration. @@ -64,17 +70,29 @@ !!! error 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; @@ -61,5 +61,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. var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations - !!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n + !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. + !!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n. 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 index 1feb7273caca2..445292c6b7b30 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives11.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives11.d.ts.diff @@ -11,7 +11,7 @@ /// [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(2,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ==== /mod2.ts (1 errors) ==== 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 index 45a59bc817f42..c2835fa154abf 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives8.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/typeReferenceDirectives8.d.ts.diff @@ -11,12 +11,12 @@ /// [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(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 + !!! related TS9027 /mod2.ts:2:14: Add a type annotation to the variable bar. ==== /types/lib/index.d.ts (0 errors) ==== interface Lib { x } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5For-ofTypeCheck10.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5For-ofTypeCheck10.d.ts index 919987e4fae88..6c8b74754beea 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/ES5For-ofTypeCheck10.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/ES5For-ofTypeCheck10.d.ts @@ -28,8 +28,8 @@ declare class StringIterator { /// [Errors] //// -ES5For-ofTypeCheck10.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -ES5For-ofTypeCheck10.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5For-ofTypeCheck10.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +ES5For-ofTypeCheck10.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ES5For-ofTypeCheck10.ts(9,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an array type or a string type. @@ -39,7 +39,7 @@ ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an ar class StringIterator { next() { ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 ES5For-ofTypeCheck10.ts:3:5: Add a return type to the method return { done: true, @@ -48,7 +48,7 @@ ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an ar } [Symbol.iterator]() { ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 ES5For-ofTypeCheck10.ts:9:5: Add a return type to the method ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty2.d.ts index ec4bfdc07b9b8..6c9109ffddbfb 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty2.d.ts @@ -27,7 +27,7 @@ declare namespace M { /// [Errors] //// -ES5SymbolProperty2.ts(5,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5SymbolProperty2.ts(5,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ES5SymbolProperty2.ts(10,11): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. @@ -38,7 +38,7 @@ ES5SymbolProperty2.ts(10,11): error TS2585: 'Symbol' only refers to a type, but export class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 ES5SymbolProperty2.ts:5:9: Add a return type to the method } (new C)[Symbol.iterator]; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty3.d.ts index 1159d465147a3..803a307c8c48a 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty3.d.ts @@ -21,7 +21,7 @@ declare class C { /// [Errors] //// -ES5SymbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5SymbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== ES5SymbolProperty3.ts (1 errors) ==== @@ -30,7 +30,7 @@ ES5SymbolProperty3.ts(4,5): error TS9008: Method must have an explicit return ty class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 ES5SymbolProperty3.ts:4:5: Add a return type to the method } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty4.d.ts index 616b1b5d2aba4..b79e8398172b0 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty4.d.ts @@ -23,7 +23,7 @@ declare class C { /// [Errors] //// -ES5SymbolProperty4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5SymbolProperty4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== ES5SymbolProperty4.ts (1 errors) ==== @@ -32,7 +32,7 @@ ES5SymbolProperty4.ts(4,5): error TS9008: Method must have an explicit return ty class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 ES5SymbolProperty4.ts:4:5: Add a return type to the method } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty5.d.ts index 7e757bee9c093..2a16f64f09fe4 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty5.d.ts @@ -23,7 +23,7 @@ declare class C { /// [Errors] //// -ES5SymbolProperty5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5SymbolProperty5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== ES5SymbolProperty5.ts (1 errors) ==== @@ -32,7 +32,7 @@ ES5SymbolProperty5.ts(4,5): error TS9008: Method must have an explicit return ty class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 ES5SymbolProperty5.ts:4:5: Add a return type to the method } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty6.d.ts index bac33bbb3b864..3f883282c2593 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty6.d.ts @@ -18,7 +18,7 @@ declare class C { /// [Errors] //// -ES5SymbolProperty6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5SymbolProperty6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. ES5SymbolProperty6.ts(5,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. @@ -27,7 +27,7 @@ ES5SymbolProperty6.ts(5,9): error TS2585: 'Symbol' only refers to a type, but is class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 ES5SymbolProperty6.ts:2:5: Add a return type to the method ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty7.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty7.d.ts index 5eea9d02c7d65..9dfcb91af6fc7 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty7.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty7.d.ts @@ -23,7 +23,7 @@ declare class C { /// [Errors] //// -ES5SymbolProperty7.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5SymbolProperty7.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== ES5SymbolProperty7.ts (1 errors) ==== @@ -32,7 +32,7 @@ ES5SymbolProperty7.ts(4,5): error TS9008: Method must have an explicit return ty class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 ES5SymbolProperty7.ts:4:5: Add a return type to the method } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts index 723f20fcc8be6..c005bb0c00dc2 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts @@ -14,7 +14,7 @@ declare var v: invalid; FunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'yield'. FunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. -FunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations +FunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. ==== FunctionDeclaration8_es6.ts (3 errors) ==== @@ -24,6 +24,6 @@ FunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferr ~~~ !!! error TS2304: Cannot find name 'foo'. ~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 FunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v -!!! related TS9035 FunctionDeclaration8_es6.ts:1:20: Add a type assertion to this expression to make type type explicit \ No newline at end of file +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 FunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v. +!!! related TS9035 FunctionDeclaration8_es6.ts:1:20: Add a type assertion to this expression to make type type explicit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/MemberFunctionDeclaration3_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/MemberFunctionDeclaration3_es6.d.ts index d85c63aaf95fe..768fa7756e3f5 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/MemberFunctionDeclaration3_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/MemberFunctionDeclaration3_es6.d.ts @@ -16,7 +16,7 @@ declare class C { /// [Errors] //// -MemberFunctionDeclaration3_es6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +MemberFunctionDeclaration3_es6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. MemberFunctionDeclaration3_es6.ts(2,6): error TS2304: Cannot find name 'foo'. @@ -24,7 +24,7 @@ MemberFunctionDeclaration3_es6.ts(2,6): error TS2304: Cannot find name 'foo'. class C { *[foo]() { } ~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 MemberFunctionDeclaration3_es6.ts:2:5: Add a return type to the method ~~~ !!! error TS2304: Cannot find name 'foo'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/arrayFind.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/arrayFind.d.ts index 32f469fdaac3e..42c79699db61f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/arrayFind.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/arrayFind.d.ts @@ -26,7 +26,7 @@ declare const readonlyFoundNumber: number | undefined; /// [Errors] //// -arrayFind.ts(6,42): error TS9017: Only const arrays can be inferred with --isolatedDeclarations +arrayFind.ts(6,42): error TS9017: Only const arrays can be inferred with --isolatedDeclarations. ==== arrayFind.ts (1 errors) ==== @@ -37,8 +37,8 @@ arrayFind.ts(6,42): error TS9017: Only const arrays can be inferred with --isola const arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations -!!! related TS9027 arrayFind.ts:6:7: Add a type annotation to the variable arrayOfStringsNumbersAndBooleans +!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations. +!!! related TS9027 arrayFind.ts:6:7: Add a type annotation to the variable arrayOfStringsNumbersAndBooleans. const foundNumber: number | undefined = arrayOfStringsNumbersAndBooleans.find(isNumber); const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans as ReadonlyArray; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asOperator1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asOperator1.d.ts index 8ea4b4f90e0ff..2faf6f0c1ef3b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/asOperator1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/asOperator1.d.ts @@ -24,7 +24,7 @@ declare var j: number | string; /// [Errors] //// -asOperator1.ts(3,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +asOperator1.ts(3,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ==== asOperator1.ts (1 errors) ==== @@ -32,8 +32,8 @@ asOperator1.ts(3,9): error TS9010: Variable must have an explicit type annotatio var x = undefined as number; var y = (null as string).length; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 asOperator1.ts:3:5: Add a type annotation to the variable y +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 asOperator1.ts:3:5: Add a type annotation to the variable y. var z = Date as any as string; // Should parse as a union type, not a bitwise 'or' of (32 as number) and 'string' diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts index 819dbc2d29eb1..df5bcd9ebc6a6 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts @@ -14,7 +14,7 @@ declare var v: invalid; asyncFunctionDeclaration8_es2017.ts(1,12): error TS2304: Cannot find name 'await'. asyncFunctionDeclaration8_es2017.ts(1,20): error TS2304: Cannot find name 'foo'. -asyncFunctionDeclaration8_es2017.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations +asyncFunctionDeclaration8_es2017.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. ==== asyncFunctionDeclaration8_es2017.ts (3 errors) ==== @@ -24,6 +24,6 @@ asyncFunctionDeclaration8_es2017.ts(1,20): error TS9013: Expression type can't b ~~~ !!! error TS2304: Cannot find name 'foo'. ~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 asyncFunctionDeclaration8_es2017.ts:1:5: Add a type annotation to the variable v -!!! related TS9035 asyncFunctionDeclaration8_es2017.ts:1:20: Add a type assertion to this expression to make type type explicit \ No newline at end of file +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 asyncFunctionDeclaration8_es2017.ts:1:5: Add a type annotation to the variable v. +!!! related TS9035 asyncFunctionDeclaration8_es2017.ts:1:20: Add a type assertion to this expression to make type type explicit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts index df49403932d98..f805ebd12fffa 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts @@ -14,7 +14,7 @@ declare var v: invalid; asyncFunctionDeclaration8_es5.ts(1,12): error TS2304: Cannot find name 'await'. asyncFunctionDeclaration8_es5.ts(1,20): error TS2304: Cannot find name 'foo'. -asyncFunctionDeclaration8_es5.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations +asyncFunctionDeclaration8_es5.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. ==== asyncFunctionDeclaration8_es5.ts (3 errors) ==== @@ -24,6 +24,6 @@ asyncFunctionDeclaration8_es5.ts(1,20): error TS9013: Expression type can't be i ~~~ !!! error TS2304: Cannot find name 'foo'. ~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 asyncFunctionDeclaration8_es5.ts:1:5: Add a type annotation to the variable v -!!! related TS9035 asyncFunctionDeclaration8_es5.ts:1:20: Add a type assertion to this expression to make type type explicit \ No newline at end of file +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 asyncFunctionDeclaration8_es5.ts:1:5: Add a type annotation to the variable v. +!!! related TS9035 asyncFunctionDeclaration8_es5.ts:1:20: Add a type assertion to this expression to make type type explicit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts index 9e928c23730d0..596bffdab67f4 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts @@ -14,7 +14,7 @@ declare var v: invalid; asyncFunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'await'. asyncFunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. -asyncFunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations +asyncFunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. ==== asyncFunctionDeclaration8_es6.ts (3 errors) ==== @@ -24,6 +24,6 @@ asyncFunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be i ~~~ !!! error TS2304: Cannot find name 'foo'. ~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 asyncFunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v -!!! related TS9035 asyncFunctionDeclaration8_es6.ts:1:20: Add a type assertion to this expression to make type type explicit \ No newline at end of file +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 asyncFunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v. +!!! related TS9035 asyncFunctionDeclaration8_es6.ts:1:20: Add a type assertion to this expression to make type type explicit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts index c241c054a55c8..cd3b57e3616ab 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts @@ -58,13 +58,13 @@ declare const c: { a.ts(2,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. a.ts(8,11): error TS2538: Type '1n' cannot be used as an index type. a.ts(14,1): error TS2322: Type 'bigint' is not assignable to type 'string | number | symbol'. -a.ts(18,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +a.ts(18,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. a.ts(19,12): error TS2538: Type 'bigint' cannot be used as an index type. b.ts(2,12): error TS1136: Property assignment expected. b.ts(2,14): error TS1005: ';' expected. b.ts(2,19): error TS1128: Declaration or statement expected. b.ts(3,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -b.ts(3,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +b.ts(3,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -94,8 +94,8 @@ b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'nu const bigNum: bigint = 0n; const typedArray = new Uint8Array(3); ~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 a.ts:18:7: Add a type annotation to the variable typedArray +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 a.ts:18:7: Add a type annotation to the variable typedArray. typedArray[bigNum] = 0xAA; // should error ~~~~~~ !!! error TS2538: Type 'bigint' cannot be used as an index type. @@ -117,8 +117,8 @@ b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'nu ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 b.ts:3:7: Add a type annotation to the variable b +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 b.ts:3:7: Add a type annotation to the variable b. const c = {[bigNum]: 789}; ~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/booleanFilterAnyArray.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/booleanFilterAnyArray.d.ts index cd7a4fcb4ad1e..11c71b27726af 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/booleanFilterAnyArray.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/booleanFilterAnyArray.d.ts @@ -61,7 +61,7 @@ declare var foos: Array; /// [Errors] //// -booleanFilterAnyArray.ts(20,11): error TS9017: Only const arrays can be inferred with --isolatedDeclarations +booleanFilterAnyArray.ts(20,11): error TS9017: Only const arrays can be inferred with --isolatedDeclarations. ==== booleanFilterAnyArray.ts (1 errors) ==== @@ -86,8 +86,8 @@ booleanFilterAnyArray.ts(20,11): error TS9017: Only const arrays can be inferred var foo = [{ name: 'x' }] ~~~~~~~~~~~~~~~ -!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations -!!! related TS9027 booleanFilterAnyArray.ts:20:5: Add a type annotation to the variable foo +!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations. +!!! related TS9027 booleanFilterAnyArray.ts:20:5: Add a type annotation to the variable foo. var foor: Array<{name: string}> var foor = foo.filter(x => x.name) var foos: Array diff --git a/tests/baselines/reference/isolated-declarations/original/dte/capturedParametersInInitializers1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/capturedParametersInInitializers1.d.ts index 5b27332cbc4e9..754c662eb2ba2 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/capturedParametersInInitializers1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/capturedParametersInInitializers1.d.ts @@ -62,26 +62,26 @@ declare function foo9(y?: invalid, z?: number): invalid; /// [Errors] //// -capturedParametersInInitializers1.ts(2,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(2,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(7,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(7,19): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(12,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(18,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(2,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(2,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(7,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(7,19): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(12,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(18,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. capturedParametersInInitializers1.ts(18,20): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. -capturedParametersInInitializers1.ts(18,20): error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations -capturedParametersInInitializers1.ts(22,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(22,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(18,20): error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. +capturedParametersInInitializers1.ts(22,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(22,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. capturedParametersInInitializers1.ts(22,26): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. -capturedParametersInInitializers1.ts(26,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(26,19): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(30,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(30,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(34,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(38,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(38,20): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(26,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(26,19): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(30,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(30,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(34,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(38,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(38,20): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. @@ -89,58 +89,58 @@ capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot // ok - usage is deferred function foo1(y = class {c = x}, x = 1) { ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 capturedParametersInInitializers1.ts:2:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 capturedParametersInInitializers1.ts:2:10: Add a return type to the function declaration. ~~~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 capturedParametersInInitializers1.ts:2:15: Add a type annotation to the parameter y +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 capturedParametersInInitializers1.ts:2:15: Add a type annotation to the parameter y. new y().c; } // ok - used in file function foo2(y = function(x: typeof z) {}, z = 1) { ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 capturedParametersInInitializers1.ts:7:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 capturedParametersInInitializers1.ts:7:10: Add a return type to the function declaration. ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9028 capturedParametersInInitializers1.ts:7:15: Add a type annotation to the parameter y -!!! related TS9030 capturedParametersInInitializers1.ts:7:19: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 capturedParametersInInitializers1.ts:7:15: Add a type annotation to the parameter y. +!!! related TS9030 capturedParametersInInitializers1.ts:7:19: Add a return type to the function expression. } // ok -used in type let a; ~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 capturedParametersInInitializers1.ts:12:5: Add a type annotation to the variable a +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 capturedParametersInInitializers1.ts:12:5: Add a type annotation to the variable a. function foo3(y = { x: a }, z = 1) { ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 capturedParametersInInitializers1.ts:13:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 capturedParametersInInitializers1.ts:13:10: Add a return type to the function declaration. } // error - used before declaration function foo4(y = {z}, z = 1) { ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 capturedParametersInInitializers1.ts:18:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 capturedParametersInInitializers1.ts:18:10: Add a return type to the function declaration. ~ !!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. ~ -!!! error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations -!!! related TS9028 capturedParametersInInitializers1.ts:18:15: Add a type annotation to the parameter y +!!! error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. +!!! related TS9028 capturedParametersInInitializers1.ts:18:15: Add a type annotation to the parameter y. } // error - used before declaration, IIFEs are inlined function foo5(y = (() => z)(), z = 1) { ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 capturedParametersInInitializers1.ts:22:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 capturedParametersInInitializers1.ts:22:10: Add a return type to the function declaration. ~~~~~~~~~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 capturedParametersInInitializers1.ts:22:15: Add a type annotation to the parameter y +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 capturedParametersInInitializers1.ts:22:15: Add a type annotation to the parameter y. ~ !!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. } @@ -148,42 +148,42 @@ capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot // ok - IIFE inside another function function foo6(y = () => (() => z)(), z = 1) { ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 capturedParametersInInitializers1.ts:26:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 capturedParametersInInitializers1.ts:26:10: Add a return type to the function declaration. ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9028 capturedParametersInInitializers1.ts:26:15: Add a type annotation to the parameter y -!!! related TS9030 capturedParametersInInitializers1.ts:26:19: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 capturedParametersInInitializers1.ts:26:15: Add a type annotation to the parameter y. +!!! related TS9030 capturedParametersInInitializers1.ts:26:19: Add a return type to the function expression. } // ok - used inside immediately invoked generator function function foo7(y = (function*() {yield z})(), z = 1) { ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 capturedParametersInInitializers1.ts:30:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 capturedParametersInInitializers1.ts:30:10: Add a return type to the function declaration. ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 capturedParametersInInitializers1.ts:30:15: Add a type annotation to the parameter y +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 capturedParametersInInitializers1.ts:30:15: Add a type annotation to the parameter y. } // ok - used inside immediately invoked async function function foo8(y = (async () => z)(), z = 1) { ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 capturedParametersInInitializers1.ts:34:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 capturedParametersInInitializers1.ts:34:10: Add a return type to the function declaration. ~~~~~~~~~~~~~~~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 capturedParametersInInitializers1.ts:34:15: Add a type annotation to the parameter y +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 capturedParametersInInitializers1.ts:34:15: Add a type annotation to the parameter y. } // error - used as computed name of method function foo9(y = {[z]() { return z; }}, z = 1) { ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 capturedParametersInInitializers1.ts:38:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 capturedParametersInInitializers1.ts:38:10: Add a return type to the function declaration. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9028 capturedParametersInInitializers1.ts:38:15: Add a type annotation to the parameter y +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 capturedParametersInInitializers1.ts:38:15: Add a type annotation to the parameter y. !!! related TS9034 capturedParametersInInitializers1.ts:38:20: Add a return type to the method ~ !!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts index ebfd63e1dedf3..028656bf8ebcb 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts @@ -167,17 +167,17 @@ declare namespace mglo5 { /// [Errors] //// -complicatedPrivacy.ts(5,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -complicatedPrivacy.ts(7,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +complicatedPrivacy.ts(5,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +complicatedPrivacy.ts(7,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. complicatedPrivacy.ts(11,24): error TS1054: A 'get' accessor cannot have parameters. -complicatedPrivacy.ts(18,20): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -complicatedPrivacy.ts(24,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -complicatedPrivacy.ts(33,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +complicatedPrivacy.ts(18,20): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +complicatedPrivacy.ts(24,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +complicatedPrivacy.ts(33,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. complicatedPrivacy.ts(35,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. complicatedPrivacy.ts(35,6): error TS2693: 'number' only refers to a type, but is being used as a value here. -complicatedPrivacy.ts(40,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +complicatedPrivacy.ts(40,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported member 'i6'. -complicatedPrivacy.ts(74,13): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +complicatedPrivacy.ts(74,13): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== complicatedPrivacy.ts (11 errors) ==== @@ -187,13 +187,13 @@ complicatedPrivacy.ts(74,13): error TS9008: Method must have an explicit return export function f1(c1: C1) { ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 complicatedPrivacy.ts:5:25: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 complicatedPrivacy.ts:5:25: Add a return type to the function declaration. } export function f2(c2: C2) { ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 complicatedPrivacy.ts:7:25: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 complicatedPrivacy.ts:7:25: Add a return type to the function declaration. } export class C2 implements m3.i3 { @@ -208,7 +208,7 @@ complicatedPrivacy.ts(74,13): error TS9008: Method must have an explicit return public f55() { ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 complicatedPrivacy.ts:18:20: Add a return type to the method return "Hello world"; } @@ -217,8 +217,8 @@ complicatedPrivacy.ts(74,13): error TS9008: Method must have an explicit return export function f2(arg1: { x?: C1, y: number }) { ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 complicatedPrivacy.ts:24:21: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 complicatedPrivacy.ts:24:21: Add a return type to the function declaration. } export function f3(): { @@ -229,8 +229,8 @@ complicatedPrivacy.ts(74,13): error TS9008: Method must have an explicit return export function f4(arg1: ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 complicatedPrivacy.ts:33:21: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 complicatedPrivacy.ts:33:21: Add a return type to the function declaration. { [number]: C1; // Used to be indexer, now it is a computed property ~~~~~~~~ @@ -243,8 +243,8 @@ complicatedPrivacy.ts(74,13): error TS9008: Method must have an explicit return export function f5(arg2: { ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 complicatedPrivacy.ts:40:21: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 complicatedPrivacy.ts:40:21: Add a return type to the function declaration. new (arg1: C1) : C1 }) { } @@ -282,7 +282,7 @@ complicatedPrivacy.ts(74,13): error TS9008: Method must have an explicit return !!! error TS2694: Namespace 'mglo5' has no exported member 'i6'. f1() { ~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 complicatedPrivacy.ts:74:13: Add a return type to the method return "Hello"; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts index 9b3e6ed8d49d9..5433a1bcea4cb 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertiesNarrowed.d.ts @@ -92,11 +92,11 @@ 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(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) ==== @@ -119,13 +119,13 @@ computedPropertiesNarrowed.ts(47,5): error TS9014: Computed properties must be n 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 +!!! 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 +!!! 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 } @@ -133,8 +133,8 @@ computedPropertiesNarrowed.ts(47,5): error TS9014: Computed properties must be n 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 +!!! 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(); @@ -147,8 +147,8 @@ computedPropertiesNarrowed.ts(47,5): error TS9014: Computed properties must be n 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 +!!! 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 @@ -160,7 +160,7 @@ computedPropertiesNarrowed.ts(47,5): error TS9014: Computed properties must be n 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 +!!! 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/computedPropertyNames10_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES5.d.ts index fd2ab26565d9b..bc992660d0637 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES5.d.ts @@ -30,22 +30,22 @@ declare var v: invalid; /// [Errors] //// -computedPropertyNames10_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES5.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES5.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames10_ES5.ts (16 errors) ==== @@ -55,72 +55,72 @@ computedPropertyNames10_ES5.ts(15,5): error TS9014: Computed properties must be var v = { [s]() { }, ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:5:5: Add a return type to the method [n]() { }, ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:6:5: Add a return type to the method [s + s]() { }, ~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:7:5: Add a return type to the method ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. [s + n]() { }, ~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:8:5: Add a return type to the method ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. [+s]() { }, ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:9:5: Add a return type to the method ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. [""]() { }, ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:10:5: Add a return type to the method [0]() { }, ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:11:5: Add a return type to the method [a]() { }, ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:12:5: Add a return type to the method [true]() { }, ~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:13:5: Add a return type to the method ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. [`hello bye`]() { }, ~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:14:5: Add a return type to the method [`hello ${a} bye`]() { } ~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:15:5: Add a return type to the method ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES6.d.ts index c48a26f974086..b0da57a9d8058 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES6.d.ts @@ -30,22 +30,22 @@ declare var v: invalid; /// [Errors] //// -computedPropertyNames10_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES6.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES6.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES6.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames10_ES6.ts (16 errors) ==== @@ -55,72 +55,72 @@ computedPropertyNames10_ES6.ts(15,5): error TS9014: Computed properties must be var v = { [s]() { }, ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:5:5: Add a return type to the method [n]() { }, ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:6:5: Add a return type to the method [s + s]() { }, ~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:7:5: Add a return type to the method ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. [s + n]() { }, ~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:8:5: Add a return type to the method ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. [+s]() { }, ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:9:5: Add a return type to the method ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. [""]() { }, ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:10:5: Add a return type to the method [0]() { }, ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:11:5: Add a return type to the method [a]() { }, ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:12:5: Add a return type to the method [true]() { }, ~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:13:5: Add a return type to the method ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. [`hello bye`]() { }, ~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:14:5: Add a return type to the method [`hello ${a} bye`]() { } ~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:15:5: Add a return type to the method ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES5.d.ts index 213ea2a3d2f91..68407608fa1fc 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES5.d.ts @@ -30,22 +30,22 @@ declare var v: invalid; /// [Errors] //// -computedPropertyNames11_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES5.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES5.ts(8,17): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES5.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(8,17): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames11_ES5.ts (16 errors) ==== @@ -55,61 +55,61 @@ computedPropertyNames11_ES5.ts(15,9): error TS9014: Computed properties must be var v = { get [s]() { return 0; }, ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES5.ts:5:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES5.ts:5:9: Add a return type to the get accessor declaration. set [n](v) { }, ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames11_ES5.ts:6:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames11_ES5.ts:6:9: Add a type to parameter of the set accessor declaration. get [s + s]() { return 0; }, ~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES5.ts:7:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES5.ts:7:9: Add a return type to the get accessor declaration. ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. set [s + n](v) { }, ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames11_ES5.ts:8:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames11_ES5.ts:8:9: Add a type to parameter of the set accessor declaration. get [+s]() { return 0; }, ~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES5.ts:9:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES5.ts:9:9: Add a return type to the get accessor declaration. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. set [""](v) { }, ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames11_ES5.ts:10:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames11_ES5.ts:10:9: Add a type to parameter of the set accessor declaration. get [0]() { return 0; }, ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES5.ts:11:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES5.ts:11:9: Add a return type to the get accessor declaration. set [a](v) { }, ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames11_ES5.ts:12:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames11_ES5.ts:12:9: Add a type to parameter of the set accessor declaration. get [true]() { return 0; }, ~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES5.ts:13:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES5.ts:13:9: Add a return type to the get accessor declaration. ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. set [`hello bye`](v) { }, ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames11_ES5.ts:14:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames11_ES5.ts:14:9: Add a type to parameter of the set accessor declaration. get [`hello ${a} bye`]() { return 0; } ~~~~~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES5.ts:15:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES5.ts:15:9: Add a return type to the get accessor declaration. ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES6.d.ts index b6bc1acca095f..d4c9f5eee362f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES6.d.ts @@ -30,22 +30,22 @@ declare var v: invalid; /// [Errors] //// -computedPropertyNames11_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES6.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES6.ts(8,17): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES6.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(8,17): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames11_ES6.ts (16 errors) ==== @@ -55,61 +55,61 @@ computedPropertyNames11_ES6.ts(15,9): error TS9014: Computed properties must be var v = { get [s]() { return 0; }, ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES6.ts:5:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES6.ts:5:9: Add a return type to the get accessor declaration. set [n](v) { }, ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames11_ES6.ts:6:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames11_ES6.ts:6:9: Add a type to parameter of the set accessor declaration. get [s + s]() { return 0; }, ~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES6.ts:7:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES6.ts:7:9: Add a return type to the get accessor declaration. ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. set [s + n](v) { }, ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames11_ES6.ts:8:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames11_ES6.ts:8:9: Add a type to parameter of the set accessor declaration. get [+s]() { return 0; }, ~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES6.ts:9:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES6.ts:9:9: Add a return type to the get accessor declaration. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. set [""](v) { }, ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames11_ES6.ts:10:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames11_ES6.ts:10:9: Add a type to parameter of the set accessor declaration. get [0]() { return 0; }, ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES6.ts:11:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES6.ts:11:9: Add a return type to the get accessor declaration. set [a](v) { }, ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames11_ES6.ts:12:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames11_ES6.ts:12:9: Add a type to parameter of the set accessor declaration. get [true]() { return 0; }, ~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES6.ts:13:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES6.ts:13:9: Add a return type to the get accessor declaration. ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. set [`hello bye`](v) { }, ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames11_ES6.ts:14:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames11_ES6.ts:14:9: Add a type to parameter of the set accessor declaration. get [`hello ${a} bye`]() { return 0; } ~~~~~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES6.ts:15:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES6.ts:15:9: Add a return type to the get accessor declaration. ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts index 6e01f9a38ad1d..46522e4e38c00 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts @@ -39,7 +39,7 @@ declare class C { computedPropertyNames12_ES5.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +computedPropertyNames12_ES5.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. computedPropertyNames12_ES5.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -60,8 +60,8 @@ computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -!!! related TS9029 computedPropertyNames12_ES5.ts:6:5: Add a type annotation to the property [n] +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 computedPropertyNames12_ES5.ts:6:5: Add a type annotation to the property [n]. static [s + s]: string; ~~~~~~~ !!! 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/dte/computedPropertyNames12_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts index 0a45fbc56a7e1..b928e6f19c89f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts @@ -39,7 +39,7 @@ declare class C { computedPropertyNames12_ES6.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +computedPropertyNames12_ES6.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. computedPropertyNames12_ES6.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -60,8 +60,8 @@ computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -!!! related TS9029 computedPropertyNames12_ES6.ts:6:5: Add a type annotation to the property [n] +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 computedPropertyNames12_ES6.ts:6:5: Add a type annotation to the property [n]. static [s + s]: string; ~~~~~~~ !!! 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/dte/computedPropertyNames13_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES5.d.ts index 8e9725d0c3c05..6da7ec2b14be4 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES5.d.ts @@ -37,12 +37,12 @@ declare class C { /// [Errors] //// -computedPropertyNames13_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES5.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames13_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames13_ES5.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames13_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames13_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames13_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== computedPropertyNames13_ES5.ts (6 errors) ==== @@ -52,31 +52,31 @@ computedPropertyNames13_ES5.ts(14,5): error TS9008: Method must have an explicit class C { [s]() {} ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames13_ES5.ts:5:5: Add a return type to the method [n]() { } ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames13_ES5.ts:6:5: Add a return type to the method static [s + s]() { } [s + n]() { } [+s]() { } static [""]() { } ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames13_ES5.ts:10:12: Add a return type to the method [0]() { } ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames13_ES5.ts:11:5: Add a return type to the method [a]() { } ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames13_ES5.ts:12:5: Add a return type to the method static [true]() { } [`hello bye`]() { } ~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames13_ES5.ts:14:5: Add a return type to the method static [`hello ${a} bye`]() { } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES6.d.ts index 9e5f689437cb2..4309ecb583c50 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES6.d.ts @@ -37,12 +37,12 @@ declare class C { /// [Errors] //// -computedPropertyNames13_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames13_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames13_ES6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames13_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames13_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames13_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== computedPropertyNames13_ES6.ts (6 errors) ==== @@ -52,31 +52,31 @@ computedPropertyNames13_ES6.ts(14,5): error TS9008: Method must have an explicit class C { [s]() {} ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames13_ES6.ts:5:5: Add a return type to the method [n]() { } ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames13_ES6.ts:6:5: Add a return type to the method static [s + s]() { } [s + n]() { } [+s]() { } static [""]() { } ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames13_ES6.ts:10:12: Add a return type to the method [0]() { } ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames13_ES6.ts:11:5: Add a return type to the method [a]() { } ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames13_ES6.ts:12:5: Add a return type to the method static [true]() { } [`hello bye`]() { } ~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames13_ES6.ts:14:5: Add a return type to the method static [`hello ${a} bye`]() { } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES5.d.ts index 3dee7483ce8c6..418d8f3d62722 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES5.d.ts @@ -25,12 +25,12 @@ declare class C { /// [Errors] //// computedPropertyNames14_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES5.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames14_ES5.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames14_ES5.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES5.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames14_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames14_ES5.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -41,7 +41,7 @@ computedPropertyNames14_ES5.ts(8,12): error TS2464: A computed property name mus ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames14_ES5.ts:3:5: Add a return type to the method static [true]() { } ~~~~~~ @@ -56,7 +56,7 @@ computedPropertyNames14_ES5.ts(8,12): error TS2464: A computed property name mus ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames14_ES5.ts:7:5: Add a return type to the method static [null]() { } ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES6.d.ts index 211e8ecc8f05f..e384ee84cc3b1 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES6.d.ts @@ -25,12 +25,12 @@ declare class C { /// [Errors] //// computedPropertyNames14_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames14_ES6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames14_ES6.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES6.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames14_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames14_ES6.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -41,7 +41,7 @@ computedPropertyNames14_ES6.ts(8,12): error TS2464: A computed property name mus ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames14_ES6.ts:3:5: Add a return type to the method static [true]() { } ~~~~~~ @@ -56,7 +56,7 @@ computedPropertyNames14_ES6.ts(8,12): error TS2464: A computed property name mus ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames14_ES6.ts:7:5: Add a return type to the method static [null]() { } ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES5.d.ts index 097907adf02d3..683ef11cd2666 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES5.d.ts @@ -26,11 +26,11 @@ declare class C { /// [Errors] //// -computedPropertyNames15_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames15_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames15_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames15_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames15_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames15_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames15_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames15_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== computedPropertyNames15_ES5.ts (5 errors) ==== @@ -40,18 +40,18 @@ computedPropertyNames15_ES5.ts(7,5): error TS9008: Method must have an explicit class C { [p1]() { } ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames15_ES5.ts:5:5: Add a return type to the method [p2]() { } ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames15_ES5.ts:6:5: Add a return type to the method [p3]() { } ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames15_ES5.ts:7:5: Add a return type to the method } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES6.d.ts index 644eb56c7cded..f29d4685bbd07 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES6.d.ts @@ -26,11 +26,11 @@ declare class C { /// [Errors] //// -computedPropertyNames15_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames15_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames15_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames15_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames15_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames15_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames15_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames15_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== computedPropertyNames15_ES6.ts (5 errors) ==== @@ -40,18 +40,18 @@ computedPropertyNames15_ES6.ts(7,5): error TS9008: Method must have an explicit class C { [p1]() { } ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames15_ES6.ts:5:5: Add a return type to the method [p2]() { } ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames15_ES6.ts:6:5: Add a return type to the method [p3]() { } ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames15_ES6.ts:7:5: Add a return type to the method } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts index 971768a1e000f..935b67d582676 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts @@ -37,12 +37,12 @@ declare class C { /// [Errors] //// -computedPropertyNames16_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames16_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames16_ES5.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames16_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames16_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames16_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames16_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames16_ES5.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames16_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames16_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames16_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ==== computedPropertyNames16_ES5.ts (6 errors) ==== @@ -52,31 +52,31 @@ computedPropertyNames16_ES5.ts(14,23): error TS9009: At least one accessor must class C { get [s]() { return 0;} ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames16_ES5.ts:5:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames16_ES5.ts:5:9: Add a return type to the get accessor declaration. set [n](v) { } ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames16_ES5.ts:6:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames16_ES5.ts:6:9: Add a type to parameter of the set accessor declaration. static get [s + s]() { return 0; } set [s + n](v) { } get [+s]() { return 0; } static set [""](v) { } ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames16_ES5.ts:10:16: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames16_ES5.ts:10:16: Add a type to parameter of the set accessor declaration. get [0]() { return 0; } ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames16_ES5.ts:11:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames16_ES5.ts:11:9: Add a return type to the get accessor declaration. set [a](v) { } ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames16_ES5.ts:12:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames16_ES5.ts:12:9: Add a type to parameter of the set accessor declaration. static get [true]() { return 0; } set [`hello bye`](v) { } ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames16_ES5.ts:14:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames16_ES5.ts:14:9: Add a type to parameter of the set accessor declaration. get [`hello ${a} bye`]() { return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts index 910a5e4cc8228..dd55b6ccea9bd 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts @@ -37,12 +37,12 @@ declare class C { /// [Errors] //// -computedPropertyNames16_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames16_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames16_ES6.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames16_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames16_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames16_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames16_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames16_ES6.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames16_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames16_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames16_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ==== computedPropertyNames16_ES6.ts (6 errors) ==== @@ -52,31 +52,31 @@ computedPropertyNames16_ES6.ts(14,23): error TS9009: At least one accessor must class C { get [s]() { return 0;} ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames16_ES6.ts:5:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames16_ES6.ts:5:9: Add a return type to the get accessor declaration. set [n](v) { } ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames16_ES6.ts:6:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames16_ES6.ts:6:9: Add a type to parameter of the set accessor declaration. static get [s + s]() { return 0; } set [s + n](v) { } get [+s]() { return 0; } static set [""](v) { } ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames16_ES6.ts:10:16: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames16_ES6.ts:10:16: Add a type to parameter of the set accessor declaration. get [0]() { return 0; } ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames16_ES6.ts:11:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames16_ES6.ts:11:9: Add a return type to the get accessor declaration. set [a](v) { } ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames16_ES6.ts:12:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames16_ES6.ts:12:9: Add a type to parameter of the set accessor declaration. static get [true]() { return 0; } set [`hello bye`](v) { } ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames16_ES6.ts:14:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames16_ES6.ts:14:9: Add a type to parameter of the set accessor declaration. get [`hello ${a} bye`]() { return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES5.d.ts index 10e2532e44356..597fc332b5357 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES5.d.ts @@ -25,12 +25,12 @@ declare class C { /// [Errors] //// computedPropertyNames17_ES5.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES5.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames17_ES5.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames17_ES5.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES5.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES5.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES5.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES5.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames17_ES5.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames17_ES5.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -41,8 +41,8 @@ computedPropertyNames17_ES5.ts(8,9): error TS2464: A computed property name must ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames17_ES5.ts:3:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames17_ES5.ts:3:9: Add a return type to the get accessor declaration. static set [true](v) { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -56,8 +56,8 @@ computedPropertyNames17_ES5.ts(8,9): error TS2464: A computed property name must ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames17_ES5.ts:7:16: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames17_ES5.ts:7:16: Add a return type to the get accessor declaration. set [null](v) { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES6.d.ts index 522ed887dcdb0..641c287d9521f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES6.d.ts @@ -25,12 +25,12 @@ declare class C { /// [Errors] //// computedPropertyNames17_ES6.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES6.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames17_ES6.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames17_ES6.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES6.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES6.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES6.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES6.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames17_ES6.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames17_ES6.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -41,8 +41,8 @@ computedPropertyNames17_ES6.ts(8,9): error TS2464: A computed property name must ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames17_ES6.ts:3:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames17_ES6.ts:3:9: Add a return type to the get accessor declaration. static set [true](v) { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -56,8 +56,8 @@ computedPropertyNames17_ES6.ts(8,9): error TS2464: A computed property name must ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames17_ES6.ts:7:16: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames17_ES6.ts:7:16: Add a return type to the get accessor declaration. set [null](v) { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts index 18eaddeafcc71..03f71d4cfc3f0 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts @@ -30,12 +30,12 @@ declare class C { /// [Errors] //// -computedPropertyNames2_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames2_ES5.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames2_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames2_ES5.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames2_ES5.ts(6,9): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES5.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames2_ES5.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames2_ES5.ts(8,16): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES5.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames2_ES5.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ==== computedPropertyNames2_ES5.ts (6 errors) ==== @@ -44,26 +44,26 @@ computedPropertyNames2_ES5.ts(8,16): error TS9009: At least one accessor must ha class C { [methodName]() { } ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames2_ES5.ts:4:5: Add a return type to the method static [methodName]() { } ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames2_ES5.ts:5:12: Add a return type to the method get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames2_ES5.ts:7:9: Add a type to parameter of the set accessor declaration -!!! related TS9032 computedPropertyNames2_ES5.ts:6:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames2_ES5.ts:7:9: Add a type to parameter of the set accessor declaration. +!!! related TS9032 computedPropertyNames2_ES5.ts:6:9: Add a return type to the get accessor declaration. set [accessorName](v) { } static get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames2_ES5.ts:9:16: Add a type to parameter of the set accessor declaration -!!! related TS9032 computedPropertyNames2_ES5.ts:8:16: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames2_ES5.ts:9:16: Add a type to parameter of the set accessor declaration. +!!! related TS9032 computedPropertyNames2_ES5.ts:8:16: Add a return type to the get accessor declaration. static set [accessorName](v) { } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts index 4a48f333530a9..854630c27e03b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts @@ -30,12 +30,12 @@ declare class C { /// [Errors] //// -computedPropertyNames2_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames2_ES6.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames2_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames2_ES6.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames2_ES6.ts(6,9): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES6.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames2_ES6.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNames2_ES6.ts(8,16): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES6.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames2_ES6.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ==== computedPropertyNames2_ES6.ts (6 errors) ==== @@ -44,26 +44,26 @@ computedPropertyNames2_ES6.ts(8,16): error TS9009: At least one accessor must ha class C { [methodName]() { } ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames2_ES6.ts:4:5: Add a return type to the method static [methodName]() { } ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames2_ES6.ts:5:12: Add a return type to the method get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames2_ES6.ts:7:9: Add a type to parameter of the set accessor declaration -!!! related TS9032 computedPropertyNames2_ES6.ts:6:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames2_ES6.ts:7:9: Add a type to parameter of the set accessor declaration. +!!! related TS9032 computedPropertyNames2_ES6.ts:6:9: Add a return type to the get accessor declaration. set [accessorName](v) { } static get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames2_ES6.ts:9:16: Add a type to parameter of the set accessor declaration -!!! related TS9032 computedPropertyNames2_ES6.ts:8:16: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames2_ES6.ts:9:16: Add a type to parameter of the set accessor declaration. +!!! related TS9032 computedPropertyNames2_ES6.ts:8:16: Add a return type to the get accessor declaration. static set [accessorName](v) { } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts index 3d7645740d26c..e3633d2dc84a9 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts @@ -30,13 +30,13 @@ declare var v: invalid; /// [Errors] //// -computedPropertyNames4_ES5.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations -computedPropertyNames4_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES5.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations -computedPropertyNames4_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES5.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +computedPropertyNames4_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES5.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +computedPropertyNames4_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames4_ES5.ts (7 errors) ==== @@ -47,35 +47,35 @@ computedPropertyNames4_ES5.ts(15,5): error TS9014: Computed properties must be n [s]: 0, [n]: n, ~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v -!!! related TS9035 computedPropertyNames4_ES5.ts:6:10: Add a type assertion to this expression to make type type explicit +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. +!!! related TS9035 computedPropertyNames4_ES5.ts:6:10: Add a type assertion to this expression to make type type explicit. [s + s]: 1, ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. [s + n]: 2, ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. [+s]: s, ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. ~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v -!!! related TS9035 computedPropertyNames4_ES5.ts:9:11: Add a type assertion to this expression to make type type explicit +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. +!!! related TS9035 computedPropertyNames4_ES5.ts:9:11: Add a type assertion to this expression to make type type explicit. [""]: 0, [0]: 0, [a]: 1, [true]: 0, ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. [`hello bye`]: 0, [`hello ${a} bye`]: 0 ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts index 5e7efa2fab368..0bd8c94d47fd0 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts @@ -30,13 +30,13 @@ declare var v: invalid; /// [Errors] //// -computedPropertyNames4_ES6.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations -computedPropertyNames4_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES6.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations -computedPropertyNames4_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES6.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +computedPropertyNames4_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES6.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +computedPropertyNames4_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames4_ES6.ts (7 errors) ==== @@ -47,35 +47,35 @@ computedPropertyNames4_ES6.ts(15,5): error TS9014: Computed properties must be n [s]: 0, [n]: n, ~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v -!!! related TS9035 computedPropertyNames4_ES6.ts:6:10: Add a type assertion to this expression to make type type explicit +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. +!!! related TS9035 computedPropertyNames4_ES6.ts:6:10: Add a type assertion to this expression to make type type explicit. [s + s]: 1, ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. [s + n]: 2, ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. [+s]: s, ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. ~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v -!!! related TS9035 computedPropertyNames4_ES6.ts:9:11: Add a type assertion to this expression to make type type explicit +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. +!!! related TS9035 computedPropertyNames4_ES6.ts:9:11: Add a type assertion to this expression to make type type explicit. [""]: 0, [0]: 0, [a]: 1, [true]: 0, ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. [`hello bye`]: 0, [`hello ${a} bye`]: 0 ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts index 84cfa73e62d26..c4f9cfeb7271b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts @@ -24,12 +24,12 @@ declare var v: invalid; computedPropertyNames5_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames5_ES5.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames5_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames5_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames5_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames5_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames5_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames5_ES5.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames5_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames5_ES5.ts (9 errors) ==== @@ -45,14 +45,14 @@ computedPropertyNames5_ES5.ts(8,5): error TS9014: Computed properties must be nu ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. [{}]: 0, ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. [undefined]: undefined, ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -60,6 +60,6 @@ computedPropertyNames5_ES5.ts(8,5): error TS9014: Computed properties must be nu ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts index 7b85f4581fb37..d63c6f7cf9ac7 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts @@ -24,12 +24,12 @@ declare var v: invalid; computedPropertyNames5_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames5_ES6.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames5_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames5_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames5_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames5_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames5_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames5_ES6.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames5_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames5_ES6.ts (9 errors) ==== @@ -45,14 +45,14 @@ computedPropertyNames5_ES6.ts(8,5): error TS9014: Computed properties must be nu ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. [{}]: 0, ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. [undefined]: undefined, ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -60,6 +60,6 @@ computedPropertyNames5_ES6.ts(8,5): error TS9014: Computed properties must be nu ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts index 1529024574012..c800dd09fe39c 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts @@ -24,9 +24,9 @@ declare class C { /// [Errors] //// computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== computedPropertyNamesOnOverloads_ES5.ts (4 errors) ==== @@ -37,13 +37,13 @@ computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9008: Method must have an ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:4:5: Add a return type to the method [methodName](); ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:5:5: Add a return type to the method [methodName](v?: string) { } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts index 9b6656728ed96..c416a26661313 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts @@ -24,9 +24,9 @@ declare class C { /// [Errors] //// computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== computedPropertyNamesOnOverloads_ES6.ts (4 errors) ==== @@ -37,13 +37,13 @@ computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9008: Method must have an ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:4:5: Add a return type to the method [methodName](); ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:5:5: Add a return type to the method [methodName](v?: string) { } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts index b06afee2af554..64d5dd84fb2af 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts @@ -44,7 +44,7 @@ declare class C1 { 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,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNamesWithStaticProperty.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. 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. @@ -71,7 +71,7 @@ computedPropertyNamesWithStaticProperty.ts(21,6): error TS2449: Class 'C2' used } [C1.staticProp]() { } ~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNamesWithStaticProperty.ts:10:5: Add a return type to the method ~~ !!! error TS2449: Class 'C1' used before its declaration. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts index 3cb403f01015f..c6ab81f230956 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts @@ -86,23 +86,23 @@ declare const enum NaNOrInfinity { constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -constEnumErrors.ts(12,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations +constEnumErrors.ts(12,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -constEnumErrors.ts(14,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations +constEnumErrors.ts(14,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. -constEnumErrors.ts(15,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations +constEnumErrors.ts(15,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. constEnumErrors.ts(15,10): error TS2474: const enum member initializers must be constant expressions. constEnumErrors.ts(15,13): error TS2339: Property 'Z' does not exist on type 'typeof E1'. -constEnumErrors.ts(22,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +constEnumErrors.ts(22,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. constEnumErrors.ts(22,13): error TS2476: A const enum member can only be accessed using a string literal. -constEnumErrors.ts(24,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +constEnumErrors.ts(24,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. constEnumErrors.ts(24,13): error TS2476: A const enum member can only be accessed using a string literal. -constEnumErrors.ts(25,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +constEnumErrors.ts(25,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. constEnumErrors.ts(25,13): error TS2476: A const enum member can only be accessed using a string literal. constEnumErrors.ts(27,9): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -constEnumErrors.ts(27,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -constEnumErrors.ts(28,9): error TS9017: Only const arrays can be inferred with --isolatedDeclarations +constEnumErrors.ts(27,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +constEnumErrors.ts(28,9): error TS9017: Only const arrays can be inferred with --isolatedDeclarations. constEnumErrors.ts(28,10): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. constEnumErrors.ts(33,5): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. constEnumErrors.ts(41,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. @@ -128,20 +128,20 @@ constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was eval // forward reference to the element of the same enum X = Y, ~ -!!! 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. ~ !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. // forward reference to the element of the same enum Y = E1.Z, ~ -!!! 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. ~~~~ !!! error TS2474: const enum member initializers must be constant expressions. ~ !!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. Y1 = E1["Z"] ~~ -!!! 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. ~~~~~~~ !!! error TS2474: const enum member initializers must be constant expressions. ~~~ @@ -154,21 +154,21 @@ constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was eval var y0 = E2[1] ~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 constEnumErrors.ts:22:5: Add a type annotation to the variable y0 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 constEnumErrors.ts:22:5: Add a type annotation to the variable y0. ~ !!! error TS2476: A const enum member can only be accessed using a string literal. var name = "A"; var y1 = E2[name]; ~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 constEnumErrors.ts:24:5: Add a type annotation to the variable y1 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 constEnumErrors.ts:24:5: Add a type annotation to the variable y1. ~~~~ !!! error TS2476: A const enum member can only be accessed using a string literal. var y2 = E2[`${name}`]; ~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 constEnumErrors.ts:25:5: Add a type annotation to the variable y2 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 constEnumErrors.ts:25:5: Add a type annotation to the variable y2. ~~~~~~~~~ !!! error TS2476: A const enum member can only be accessed using a string literal. @@ -176,12 +176,12 @@ constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was eval ~~ !!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. ~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 constEnumErrors.ts:27:5: Add a type annotation to the variable x +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 constEnumErrors.ts:27:5: Add a type annotation to the variable x. var y = [E2]; ~~~~ -!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations -!!! related TS9027 constEnumErrors.ts:28:5: Add a type annotation to the variable y +!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations. +!!! related TS9027 constEnumErrors.ts:28:5: Add a type annotation to the variable y. ~~ !!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping.d.ts index 184967145d4b9..66cb771a6f450 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping.d.ts @@ -356,10 +356,10 @@ declare var x: B; /// [Errors] //// -contextualTyping.ts(146,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -contextualTyping.ts(156,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +contextualTyping.ts(146,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +contextualTyping.ts(156,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. contextualTyping.ts(189,18): error TS2384: Overload signatures must all be ambient or non-ambient. -contextualTyping.ts(193,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +contextualTyping.ts(193,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' but required in type 'B'. @@ -511,8 +511,8 @@ contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' b // CONTEXT: Function call function c9t5(f: (n: number) => IFoo) {}; ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 contextualTyping.ts:146:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 contextualTyping.ts:146:10: Add a return type to the function declaration. c9t5(function(n) { return ({}); }); @@ -524,8 +524,8 @@ contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' b class C11t5 { constructor(f: (n: number) => IFoo) { } }; var i = new C11t5(function(n) { return ({}) }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 contextualTyping.ts:156:5: Add a type annotation to the variable i +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 contextualTyping.ts:156:5: Add a type annotation to the variable i. // CONTEXT: Type annotated expression var c12t1 = <(s: string) => string> (function(s) { return s }); @@ -566,8 +566,8 @@ contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' b var efv = EF1(1,2); ~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 contextualTyping.ts:193:5: Add a type annotation to the variable efv +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 contextualTyping.ts:193:5: Add a type annotation to the variable efv. // contextually typing from ambient class declarations diff --git a/tests/baselines/reference/isolated-declarations/original/dte/correlatedUnions.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/correlatedUnions.d.ts index 5146a453de0cf..a1251bdc90968 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/correlatedUnions.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/correlatedUnions.d.ts @@ -473,21 +473,21 @@ declare function getValueConcrete(o: Partial, k: K): /// [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(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) ==== @@ -502,8 +502,8 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a 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 +!!! 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); } @@ -531,12 +531,12 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a 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 +!!! 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 +!!! 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, @@ -545,8 +545,8 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a 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 +!!! 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); } @@ -580,8 +580,8 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a 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 +!!! 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) @@ -620,8 +620,8 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a 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 +!!! 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 }); } @@ -639,8 +639,8 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ }); ~~ -!!! 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 +!!! 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({ ~~~~~~~~~~~~~~~~~~~~~ @@ -650,8 +650,8 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ }); ~~ -!!! 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 +!!! 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]); @@ -664,8 +664,8 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a 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 +!!! 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] @@ -691,31 +691,31 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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; } @@ -755,8 +755,8 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a 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 +!!! 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]); } @@ -771,8 +771,8 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a 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 +!!! 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; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/decoratorMetadataWithImportDeclarationNameCollision7.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/decoratorMetadataWithImportDeclarationNameCollision7.d.ts index 80bbe9e6ef2d5..8ce31d87ccb8c 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/decoratorMetadataWithImportDeclarationNameCollision7.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/decoratorMetadataWithImportDeclarationNameCollision7.d.ts @@ -42,7 +42,7 @@ export { MyClass }; /// [Errors] //// -db.ts(2,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +db.ts(2,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. service.ts(7,9): error TS2702: 'db' only refers to a type, but is being used as a namespace here. service.ts(7,9): error TS4031: Public property 'db' of exported class has or is using private name 'db'. service.ts(9,21): error TS2702: 'db' only refers to a type, but is being used as a namespace here. @@ -53,7 +53,7 @@ service.ts(9,21): error TS4063: Parameter 'db' of constructor from exported clas export default class db { public doSomething() { ~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 db.ts:2:12: Add a return type to the method } } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts index 5aa7bce70af8e..5a16fea90a571 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts @@ -270,7 +270,7 @@ declare class I { /// [Errors] //// -decoratorsOnComputedProperties.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +decoratorsOnComputedProperties.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. decoratorsOnComputedProperties.ts(18,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(19,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(20,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -357,8 +357,8 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid ==== decoratorsOnComputedProperties.ts (82 errors) ==== function x(o: object, k: PropertyKey) { } ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 decoratorsOnComputedProperties.ts:1:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 decoratorsOnComputedProperties.ts:1:10: Add a return type to the function declaration. let i = 0; function foo(): string { return ++i + ""; } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers.d.ts index 41380e55f9817..95eee2448ee8a 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers.d.ts @@ -78,10 +78,10 @@ declare class Derived extends Base { /// [Errors] //// -derivedClassOverridesProtectedMembers.ts(6,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers.ts(12,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers.ts(22,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers.ts(28,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers.ts(6,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers.ts(12,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers.ts(22,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers.ts(28,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== derivedClassOverridesProtectedMembers.ts (4 errors) ==== @@ -92,7 +92,7 @@ derivedClassOverridesProtectedMembers.ts(28,22): error TS9008: Method must have protected a: typeof x; protected b(a: typeof x) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers.ts:6:15: Add a return type to the method protected get c() { return x; } protected set c(v: typeof x) { } @@ -101,7 +101,7 @@ derivedClassOverridesProtectedMembers.ts(28,22): error TS9008: Method must have protected static r: typeof x; protected static s(a: typeof x) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers.ts:12:22: Add a return type to the method protected static get t() { return x; } protected static set t(v: typeof x) { } @@ -114,7 +114,7 @@ derivedClassOverridesProtectedMembers.ts(28,22): error TS9008: Method must have protected a: typeof y; protected b(a: typeof y) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers.ts:22:15: Add a return type to the method protected get c() { return y; } protected set c(v: typeof y) { } @@ -123,7 +123,7 @@ derivedClassOverridesProtectedMembers.ts(28,22): error TS9008: Method must have protected static r: typeof y; protected static s(a: typeof y) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers.ts:28:22: Add a return type to the method protected static get t() { return y; } protected static set t(a: typeof y) { } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers2.d.ts index 67d14d3944b9a..d31a394c92a5b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers2.d.ts @@ -126,20 +126,20 @@ declare var r8: invalid; /// [Errors] //// -derivedClassOverridesProtectedMembers2.ts(6,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(12,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(23,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(29,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(38,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(39,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(40,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(41,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(43,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(44,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(45,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(46,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(60,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(61,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(6,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(12,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(23,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(29,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(38,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(39,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(40,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(41,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(43,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(44,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(45,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(46,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(60,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(61,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ==== derivedClassOverridesProtectedMembers2.ts (14 errors) ==== @@ -150,7 +150,7 @@ derivedClassOverridesProtectedMembers2.ts(61,10): error TS9010: Variable must ha protected a: typeof x; protected b(a: typeof x) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers2.ts:6:15: Add a return type to the method protected get c() { return x; } protected set c(v: typeof x) { } @@ -159,7 +159,7 @@ derivedClassOverridesProtectedMembers2.ts(61,10): error TS9010: Variable must ha protected static r: typeof x; protected static s(a: typeof x) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers2.ts:12:22: Add a return type to the method protected static get t() { return x; } protected static set t(v: typeof x) { } @@ -173,7 +173,7 @@ derivedClassOverridesProtectedMembers2.ts(61,10): error TS9010: Variable must ha a: typeof y; b(a: typeof y) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers2.ts:23:5: Add a return type to the method get c() { return y; } set c(v: typeof y) { } @@ -182,7 +182,7 @@ derivedClassOverridesProtectedMembers2.ts(61,10): error TS9010: Variable must ha static r: typeof y; static s(a: typeof y) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers2.ts:29:12: Add a return type to the method static get t() { return y; } static set t(a: typeof y) { } @@ -194,37 +194,37 @@ derivedClassOverridesProtectedMembers2.ts(61,10): error TS9010: Variable must ha var d: Derived = new Derived(y); var r1 = d.a; ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:38:5: Add a type annotation to the variable r1 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:38:5: Add a type annotation to the variable r1. var r2 = d.b(y); ~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:39:5: Add a type annotation to the variable r2 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:39:5: Add a type annotation to the variable r2. var r3 = d.c; ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:40:5: Add a type annotation to the variable r3 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:40:5: Add a type annotation to the variable r3. var r3a = d.d; ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:41:5: Add a type annotation to the variable r3a +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:41:5: Add a type annotation to the variable r3a. d.c = y; var r4 = Derived.r; ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:43:5: Add a type annotation to the variable r4 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:43:5: Add a type annotation to the variable r4. var r5 = Derived.s(y); ~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:44:5: Add a type annotation to the variable r5 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:44:5: Add a type annotation to the variable r5. var r6 = Derived.t; ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:45:5: Add a type annotation to the variable r6 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:45:5: Add a type annotation to the variable r6. var r6a = Derived.u; ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:46:5: Add a type annotation to the variable r6a +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:46:5: Add a type annotation to the variable r6a. Derived.t = y; class Base2 { @@ -240,11 +240,11 @@ derivedClassOverridesProtectedMembers2.ts(61,10): error TS9010: Variable must ha var d2: Derived2; var r7 = d2['']; ~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:60:5: Add a type annotation to the variable r7 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:60:5: Add a type annotation to the variable r7. var r8 = d2[1]; ~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:61:5: Add a type annotation to the variable r8 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:61:5: Add a type annotation to the variable r8. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers3.d.ts index 6be38a4876051..9f751d0168558 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers3.d.ts @@ -140,16 +140,16 @@ declare class Derived10 extends Base { /// [Errors] //// -derivedClassOverridesProtectedMembers3.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers3.ts(12,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers3.ts(12,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. derivedClassOverridesProtectedMembers3.ts(22,7): error TS2415: Class 'Derived1' incorrectly extends base class 'Base'. Property 'a' is protected in type 'Derived1' but public in type 'Base'. derivedClassOverridesProtectedMembers3.ts(27,7): error TS2415: Class 'Derived2' incorrectly extends base class 'Base'. Property 'b' is protected in type 'Derived2' but public in type 'Base'. -derivedClassOverridesProtectedMembers3.ts(28,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(28,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. derivedClassOverridesProtectedMembers3.ts(32,7): error TS2415: Class 'Derived3' incorrectly extends base class 'Base'. Property 'c' is protected in type 'Derived3' but public in type 'Base'. -derivedClassOverridesProtectedMembers3.ts(33,19): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(33,19): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. derivedClassOverridesProtectedMembers3.ts(37,7): error TS2415: Class 'Derived4' incorrectly extends base class 'Base'. Property 'c' is protected in type 'Derived4' but public in type 'Base'. derivedClassOverridesProtectedMembers3.ts(42,7): error TS2415: Class 'Derived5' incorrectly extends base class 'Base'. @@ -158,10 +158,10 @@ derivedClassOverridesProtectedMembers3.ts(47,7): error TS2417: Class static side Property 'r' is protected in type 'typeof Derived6' but public in type 'typeof Base'. derivedClassOverridesProtectedMembers3.ts(52,7): error TS2417: Class static side 'typeof Derived7' incorrectly extends base class static side 'typeof Base'. Property 's' is protected in type 'typeof Derived7' but public in type 'typeof Base'. -derivedClassOverridesProtectedMembers3.ts(53,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(53,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. derivedClassOverridesProtectedMembers3.ts(57,7): error TS2417: Class static side 'typeof Derived8' incorrectly extends base class static side 'typeof Base'. Property 't' is protected in type 'typeof Derived8' but public in type 'typeof Base'. -derivedClassOverridesProtectedMembers3.ts(58,26): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(58,26): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. derivedClassOverridesProtectedMembers3.ts(62,7): error TS2417: Class static side 'typeof Derived9' incorrectly extends base class static side 'typeof Base'. Property 't' is protected in type 'typeof Derived9' but public in type 'typeof Base'. derivedClassOverridesProtectedMembers3.ts(67,7): error TS2417: Class static side 'typeof Derived10' incorrectly extends base class static side 'typeof Base'. @@ -176,7 +176,7 @@ derivedClassOverridesProtectedMembers3.ts(67,7): error TS2417: Class static side a: typeof x; b(a: typeof x) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers3.ts:6:5: Add a return type to the method get c() { return x; } set c(v: typeof x) { } @@ -185,7 +185,7 @@ derivedClassOverridesProtectedMembers3.ts(67,7): error TS2417: Class static side static r: typeof x; static s(a: typeof x) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers3.ts:12:12: Add a return type to the method static get t() { return x; } static set t(v: typeof x) { } @@ -210,7 +210,7 @@ derivedClassOverridesProtectedMembers3.ts(67,7): error TS2417: Class static side !!! error TS2415: Property 'b' is protected in type 'Derived2' but public in type 'Base'. protected b(a: typeof x) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers3.ts:28:15: Add a return type to the method constructor(a: typeof x) { super(a); } } @@ -221,8 +221,8 @@ derivedClassOverridesProtectedMembers3.ts(67,7): error TS2417: Class static side !!! error TS2415: Property 'c' is protected in type 'Derived3' but public in type 'Base'. protected get c() { return x; } ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 derivedClassOverridesProtectedMembers3.ts:33:19: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 derivedClassOverridesProtectedMembers3.ts:33:19: Add a return type to the get accessor declaration. constructor(a: typeof x) { super(a); } } @@ -256,7 +256,7 @@ derivedClassOverridesProtectedMembers3.ts(67,7): error TS2417: Class static side !!! error TS2417: Property 's' is protected in type 'typeof Derived7' but public in type 'typeof Base'. protected static s(a: typeof x) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers3.ts:53:22: Add a return type to the method constructor(a: typeof x) { super(a); } } @@ -267,8 +267,8 @@ derivedClassOverridesProtectedMembers3.ts(67,7): error TS2417: Class static side !!! error TS2417: Property 't' is protected in type 'typeof Derived8' but public in type 'typeof Base'. protected static get t() { return x; } ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 derivedClassOverridesProtectedMembers3.ts:58:26: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 derivedClassOverridesProtectedMembers3.ts:58:26: Add a return type to the get accessor declaration. constructor(a: typeof x) { super(a); } } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesPublicMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesPublicMembers.d.ts index 59479921e533c..f738de8118689 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesPublicMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesPublicMembers.d.ts @@ -125,20 +125,20 @@ declare var r8: invalid; /// [Errors] //// -derivedClassOverridesPublicMembers.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(12,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(22,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(28,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(37,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(38,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(39,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(40,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(42,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(43,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(44,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(45,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(59,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(60,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(12,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(22,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(28,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(37,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(38,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(39,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(40,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(42,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(43,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(44,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(45,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(59,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(60,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ==== derivedClassOverridesPublicMembers.ts (14 errors) ==== @@ -149,7 +149,7 @@ derivedClassOverridesPublicMembers.ts(60,10): error TS9010: Variable must have a a: typeof x; b(a: typeof x) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesPublicMembers.ts:6:5: Add a return type to the method get c() { return x; } set c(v: typeof x) { } @@ -158,7 +158,7 @@ derivedClassOverridesPublicMembers.ts(60,10): error TS9010: Variable must have a static r: typeof x; static s(a: typeof x) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesPublicMembers.ts:12:12: Add a return type to the method static get t() { return x; } static set t(v: typeof x) { } @@ -171,7 +171,7 @@ derivedClassOverridesPublicMembers.ts(60,10): error TS9010: Variable must have a a: typeof y; b(a: typeof y) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesPublicMembers.ts:22:5: Add a return type to the method get c() { return y; } set c(v: typeof y) { } @@ -180,7 +180,7 @@ derivedClassOverridesPublicMembers.ts(60,10): error TS9010: Variable must have a static r: typeof y; static s(a: typeof y) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesPublicMembers.ts:28:12: Add a return type to the method static get t() { return y; } static set t(a: typeof y) { } @@ -192,37 +192,37 @@ derivedClassOverridesPublicMembers.ts(60,10): error TS9010: Variable must have a var d: Derived = new Derived(y); var r1 = d.a; ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesPublicMembers.ts:37:5: Add a type annotation to the variable r1 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesPublicMembers.ts:37:5: Add a type annotation to the variable r1. var r2 = d.b(y); ~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesPublicMembers.ts:38:5: Add a type annotation to the variable r2 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesPublicMembers.ts:38:5: Add a type annotation to the variable r2. var r3 = d.c; ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesPublicMembers.ts:39:5: Add a type annotation to the variable r3 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesPublicMembers.ts:39:5: Add a type annotation to the variable r3. var r3a = d.d; ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesPublicMembers.ts:40:5: Add a type annotation to the variable r3a +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesPublicMembers.ts:40:5: Add a type annotation to the variable r3a. d.c = y; var r4 = Derived.r; ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesPublicMembers.ts:42:5: Add a type annotation to the variable r4 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesPublicMembers.ts:42:5: Add a type annotation to the variable r4. var r5 = Derived.s(y); ~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesPublicMembers.ts:43:5: Add a type annotation to the variable r5 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesPublicMembers.ts:43:5: Add a type annotation to the variable r5. var r6 = Derived.t; ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesPublicMembers.ts:44:5: Add a type annotation to the variable r6 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesPublicMembers.ts:44:5: Add a type annotation to the variable r6. var r6a = Derived.u; ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesPublicMembers.ts:45:5: Add a type annotation to the variable r6a +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesPublicMembers.ts:45:5: Add a type annotation to the variable r6a. Derived.t = y; class Base2 { @@ -238,11 +238,11 @@ derivedClassOverridesPublicMembers.ts(60,10): error TS9010: Variable must have a var d2: Derived2; var r7 = d2['']; ~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesPublicMembers.ts:59:5: Add a type annotation to the variable r7 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesPublicMembers.ts:59:5: Add a type annotation to the variable r7. var r8 = d2[1]; ~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesPublicMembers.ts:60:5: Add a type annotation to the variable r8 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesPublicMembers.ts:60:5: Add a type annotation to the variable r8. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/duplicateVarsAcrossFileBoundaries.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/duplicateVarsAcrossFileBoundaries.d.ts index 229b2c76b572c..f34322e4a4eec 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/duplicateVarsAcrossFileBoundaries.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/duplicateVarsAcrossFileBoundaries.d.ts @@ -66,8 +66,8 @@ duplicateVarsAcrossFileBoundaries_1.ts(1,5): error TS2403: Subsequent variable d duplicateVarsAcrossFileBoundaries_2.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. duplicateVarsAcrossFileBoundaries_2.ts(2,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'number'. duplicateVarsAcrossFileBoundaries_2.ts(3,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'boolean'. -duplicateVarsAcrossFileBoundaries_4.ts(3,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -duplicateVarsAcrossFileBoundaries_5.ts(3,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +duplicateVarsAcrossFileBoundaries_4.ts(3,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +duplicateVarsAcrossFileBoundaries_5.ts(3,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ==== duplicateVarsAcrossFileBoundaries_0.ts (0 errors) ==== @@ -105,13 +105,13 @@ duplicateVarsAcrossFileBoundaries_5.ts(3,5): error TS9010: Variable must have an import p = P; var q; ~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 duplicateVarsAcrossFileBoundaries_4.ts:3:5: Add a type annotation to the variable q +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 duplicateVarsAcrossFileBoundaries_4.ts:3:5: Add a type annotation to the variable q. ==== duplicateVarsAcrossFileBoundaries_5.ts (1 errors) ==== module Q { } import q = Q; var p; ~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 duplicateVarsAcrossFileBoundaries_5.ts:3:5: Add a type annotation to the variable p \ No newline at end of file +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 duplicateVarsAcrossFileBoundaries_5.ts:3:5: Add a type annotation to the variable p. \ 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 index 4fc443de6f27d..44222ff3e0340 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/dynamicNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/dynamicNames.d.ts @@ -197,10 +197,10 @@ export declare type T3 = { /// [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 +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) ==== @@ -208,8 +208,8 @@ module.ts(3,19): error TS9010: Variable must have an explicit type annotation wi 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 +!!! 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; @@ -339,16 +339,16 @@ module.ts(3,19): error TS9010: Variable must have an explicit type annotation wi // 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 +!!! 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 +!!! 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 +!!! 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; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/escapedIdentifiers.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/escapedIdentifiers.d.ts index ea529d3bf5c07..e01dae07b9fd3 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/escapedIdentifiers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/escapedIdentifiers.d.ts @@ -168,12 +168,12 @@ declare var constructorTestObject: invalid; /// [Errors] //// -escapedIdentifiers.ts(43,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -escapedIdentifiers.ts(45,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -escapedIdentifiers.ts(47,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -escapedIdentifiers.ts(49,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -escapedIdentifiers.ts(72,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -escapedIdentifiers.ts(85,29): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +escapedIdentifiers.ts(43,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +escapedIdentifiers.ts(45,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +escapedIdentifiers.ts(47,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +escapedIdentifiers.ts(49,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +escapedIdentifiers.ts(72,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +escapedIdentifiers.ts(85,29): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ==== escapedIdentifiers.ts (6 errors) ==== @@ -221,23 +221,23 @@ escapedIdentifiers.ts(85,29): error TS9010: Variable must have an explicit type var classType1Object1 = new classType1(); ~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 escapedIdentifiers.ts:43:5: Add a type annotation to the variable classType1Object1 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 escapedIdentifiers.ts:43:5: Add a type annotation to the variable classType1Object1. classType1Object1.foo1 = 2; var classType1Object2 = new classType\u0031(); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 escapedIdentifiers.ts:45:5: Add a type annotation to the variable classType1Object2 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 escapedIdentifiers.ts:45:5: Add a type annotation to the variable classType1Object2. classType1Object2.foo1 = 2; var classType2Object1 = new classType2(); ~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 escapedIdentifiers.ts:47:5: Add a type annotation to the variable classType2Object1 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 escapedIdentifiers.ts:47:5: Add a type annotation to the variable classType2Object1. classType2Object1.foo2 = 2; var classType2Object2 = new classType\u0032(); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 escapedIdentifiers.ts:49:5: Add a type annotation to the variable classType2Object2 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 escapedIdentifiers.ts:49:5: Add a type annotation to the variable classType2Object2. classType2Object2.foo2 = 2; // interfaces @@ -262,7 +262,7 @@ escapedIdentifiers.ts(85,29): error TS9010: Variable must have an explicit type class testClass { public func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number) { ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 escapedIdentifiers.ts:72:12: Add a return type to the method arg\u0031 = 1; arg2 = 'string'; @@ -278,8 +278,8 @@ escapedIdentifiers.ts(85,29): error TS9010: Variable must have an explicit type } var constructorTestObject = new constructorTestClass(1, 'string', true, 2); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 escapedIdentifiers.ts:85:5: Add a type annotation to the variable constructorTestObject +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 escapedIdentifiers.ts:85:5: Add a type annotation to the variable constructorTestObject. constructorTestObject.arg\u0031 = 1; constructorTestObject.arg2 = 'string'; constructorTestObject.arg\u0033 = true; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts index 808a6b5ae2f20..13276b13d966d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts @@ -33,12 +33,12 @@ declare enum E1 { /// [Errors] //// -forwardRefInEnum.ts(4,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations +forwardRefInEnum.ts(4,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -forwardRefInEnum.ts(5,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations +forwardRefInEnum.ts(5,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. forwardRefInEnum.ts(5,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -forwardRefInEnum.ts(7,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations -forwardRefInEnum.ts(8,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations +forwardRefInEnum.ts(7,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. +forwardRefInEnum.ts(8,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ==== forwardRefInEnum.ts (6 errors) ==== @@ -47,21 +47,21 @@ forwardRefInEnum.ts(8,5): error TS9020: Enum member initializers must be computa // forward reference to the element of the same enum X = Y, ~ -!!! 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. ~ !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. X1 = E1["Y"], ~~ -!!! 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. ~~~~~~~ !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. // forward reference to the element of the same enum Y = E1.Z, ~ -!!! 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. Y1 = E1["Z"] ~~ -!!! 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 E1 { diff --git a/tests/baselines/reference/isolated-declarations/original/dte/generatedContextualTyping.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/generatedContextualTyping.d.ts index af9214048ab18..c1ad23069472a 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/generatedContextualTyping.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/generatedContextualTyping.d.ts @@ -1286,65 +1286,65 @@ declare var x356: (n: Genric) => invalid; /// [Errors] //// -generatedContextualTyping.ts(5,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(5,26): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(5,47): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(126,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(127,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(128,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(129,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(130,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(131,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(132,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(133,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(134,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(135,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(136,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(137,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(219,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(220,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(221,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(222,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(223,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(224,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(225,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(226,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(319,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(320,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(321,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(322,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(323,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(324,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(325,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(326,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(327,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(328,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(329,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(330,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(331,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(332,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(333,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(334,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(335,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(336,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(337,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(338,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(339,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(340,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(341,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(342,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(343,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(344,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(345,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(346,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(347,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(348,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(349,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(350,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(351,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(352,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(353,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(354,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(5,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(5,26): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(5,47): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(126,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(127,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(128,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(129,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(130,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(131,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(132,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(133,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(134,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(135,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(136,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(137,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(219,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(220,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(221,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(222,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(223,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(224,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(225,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(226,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(319,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(320,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(321,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(322,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(323,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(324,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(325,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(326,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(327,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(328,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(329,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(330,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(331,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(332,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(333,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(334,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(335,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(336,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(337,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(338,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(339,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(340,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(341,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(342,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(343,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(344,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(345,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(346,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(347,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(348,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(349,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(350,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(351,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(352,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(353,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(354,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. ==== generatedContextualTyping.ts (59 errors) ==== @@ -1354,14 +1354,14 @@ generatedContextualTyping.ts(354,12): error TS9007: Function must have an explic interface Genric { func(n: T[]); } var b = new Base(), d1 = new Derived1(), d2 = new Derived2(); ~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:5:5: Add a type annotation to the variable b +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:5:5: Add a type annotation to the variable b. ~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:5:21: Add a type annotation to the variable d1 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:5:21: Add a type annotation to the variable d1. ~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:5:42: Add a type annotation to the variable d2 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:5:42: Add a type annotation to the variable d2. var x1: () => Base[] = () => [d1, d2]; var x2: () => Base[] = function() { return [d1, d2] }; var x3: () => Base[] = function named() { return [d1, d2] }; @@ -1484,52 +1484,52 @@ generatedContextualTyping.ts(354,12): error TS9007: Function must have an explic class x120 { constructor(private parm: Genric = { func: n => { return [d1, d2]; } }) { } } function x121(parm: () => Base[] = () => [d1, d2]) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:126:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:126:10: Add a return type to the function declaration. function x122(parm: () => Base[] = function() { return [d1, d2] }) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:127:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:127:10: Add a return type to the function declaration. function x123(parm: () => Base[] = function named() { return [d1, d2] }) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:128:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:128:10: Add a return type to the function declaration. function x124(parm: { (): Base[]; } = () => [d1, d2]) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:129:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:129:10: Add a return type to the function declaration. function x125(parm: { (): Base[]; } = function() { return [d1, d2] }) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:130:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:130:10: Add a return type to the function declaration. function x126(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:131:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:131:10: Add a return type to the function declaration. function x127(parm: Base[] = [d1, d2]) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:132:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:132:10: Add a return type to the function declaration. function x128(parm: Array = [d1, d2]) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:133:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:133:10: Add a return type to the function declaration. function x129(parm: { [n: number]: Base; } = [d1, d2]) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:134:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:134:10: Add a return type to the function declaration. function x130(parm: {n: Base[]; } = { n: [d1, d2] }) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:135:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:135:10: Add a return type to the function declaration. function x131(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:136:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:136:10: Add a return type to the function declaration. function x132(parm: Genric = { func: n => { return [d1, d2]; } }) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:137:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:137:10: Add a return type to the function declaration. function x133(): () => Base[] { return () => [d1, d2]; } function x134(): () => Base[] { return function() { return [d1, d2] }; } function x135(): () => Base[] { return function named() { return [d1, d2] }; } @@ -1613,36 +1613,36 @@ generatedContextualTyping.ts(354,12): error TS9007: Function must have an explic var x216 = >{ func: n => { return [d1, d2]; } }; var x217 = (<() => Base[]>undefined) || function() { return [d1, d2] }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:219:5: Add a type annotation to the variable x217 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:219:5: Add a type annotation to the variable x217. var x218 = (<() => Base[]>undefined) || function named() { return [d1, d2] }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:220:5: Add a type annotation to the variable x218 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:220:5: Add a type annotation to the variable x218. var x219 = (<{ (): Base[]; }>undefined) || function() { return [d1, d2] }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:221:5: Add a type annotation to the variable x219 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:221:5: Add a type annotation to the variable x219. var x220 = (<{ (): Base[]; }>undefined) || function named() { return [d1, d2] }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:222:5: Add a type annotation to the variable x220 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:222:5: Add a type annotation to the variable x220. var x221 = (undefined) || [d1, d2]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:223:5: Add a type annotation to the variable x221 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:223:5: Add a type annotation to the variable x221. var x222 = (>undefined) || [d1, d2]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:224:5: Add a type annotation to the variable x222 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:224:5: Add a type annotation to the variable x222. var x223 = (<{ [n: number]: Base; }>undefined) || [d1, d2]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:225:5: Add a type annotation to the variable x223 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:225:5: Add a type annotation to the variable x223. var x224 = (<{n: Base[]; } >undefined) || { n: [d1, d2] }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:226:5: Add a type annotation to the variable x224 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:226:5: Add a type annotation to the variable x224. var x225: () => Base[]; x225 = () => [d1, d2]; var x226: () => Base[]; x226 = function() { return [d1, d2] }; var x227: () => Base[]; x227 = function named() { return [d1, d2] }; @@ -1737,169 +1737,169 @@ generatedContextualTyping.ts(354,12): error TS9007: Function must have an explic var x320: Genric = true ? { func: n => { return [d1, d2]; } } : undefined; function x321(n: () => Base[]) { }; x321(() => [d1, d2]); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:319:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:319:10: Add a return type to the function declaration. function x322(n: () => Base[]) { }; x322(function() { return [d1, d2] }); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:320:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:320:10: Add a return type to the function declaration. function x323(n: () => Base[]) { }; x323(function named() { return [d1, d2] }); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:321:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:321:10: Add a return type to the function declaration. function x324(n: { (): Base[]; }) { }; x324(() => [d1, d2]); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:322:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:322:10: Add a return type to the function declaration. function x325(n: { (): Base[]; }) { }; x325(function() { return [d1, d2] }); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:323:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:323:10: Add a return type to the function declaration. function x326(n: { (): Base[]; }) { }; x326(function named() { return [d1, d2] }); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:324:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:324:10: Add a return type to the function declaration. function x327(n: Base[]) { }; x327([d1, d2]); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:325:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:325:10: Add a return type to the function declaration. function x328(n: Array) { }; x328([d1, d2]); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:326:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:326:10: Add a return type to the function declaration. function x329(n: { [n: number]: Base; }) { }; x329([d1, d2]); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:327:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:327:10: Add a return type to the function declaration. function x330(n: {n: Base[]; } ) { }; x330({ n: [d1, d2] }); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:328:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:328:10: Add a return type to the function declaration. function x331(n: (s: Base[]) => any) { }; x331(n => { var n: Base[]; return null; }); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:329:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:329:10: Add a return type to the function declaration. function x332(n: Genric) { }; x332({ func: n => { return [d1, d2]; } }); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:330:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:330:10: Add a return type to the function declaration. var x333 = (n: () => Base[]) => n; x333(() => [d1, d2]); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:331:5: Add a type annotation to the variable x333 -!!! related TS9030 generatedContextualTyping.ts:331:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:331:5: Add a type annotation to the variable x333. +!!! related TS9030 generatedContextualTyping.ts:331:12: Add a return type to the function expression. var x334 = (n: () => Base[]) => n; x334(function() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:332:5: Add a type annotation to the variable x334 -!!! related TS9030 generatedContextualTyping.ts:332:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:332:5: Add a type annotation to the variable x334. +!!! related TS9030 generatedContextualTyping.ts:332:12: Add a return type to the function expression. var x335 = (n: () => Base[]) => n; x335(function named() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:333:5: Add a type annotation to the variable x335 -!!! related TS9030 generatedContextualTyping.ts:333:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:333:5: Add a type annotation to the variable x335. +!!! related TS9030 generatedContextualTyping.ts:333:12: Add a return type to the function expression. var x336 = (n: { (): Base[]; }) => n; x336(() => [d1, d2]); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:334:5: Add a type annotation to the variable x336 -!!! related TS9030 generatedContextualTyping.ts:334:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:334:5: Add a type annotation to the variable x336. +!!! related TS9030 generatedContextualTyping.ts:334:12: Add a return type to the function expression. var x337 = (n: { (): Base[]; }) => n; x337(function() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:335:5: Add a type annotation to the variable x337 -!!! related TS9030 generatedContextualTyping.ts:335:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:335:5: Add a type annotation to the variable x337. +!!! related TS9030 generatedContextualTyping.ts:335:12: Add a return type to the function expression. var x338 = (n: { (): Base[]; }) => n; x338(function named() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:336:5: Add a type annotation to the variable x338 -!!! related TS9030 generatedContextualTyping.ts:336:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:336:5: Add a type annotation to the variable x338. +!!! related TS9030 generatedContextualTyping.ts:336:12: Add a return type to the function expression. var x339 = (n: Base[]) => n; x339([d1, d2]); ~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:337:5: Add a type annotation to the variable x339 -!!! related TS9030 generatedContextualTyping.ts:337:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:337:5: Add a type annotation to the variable x339. +!!! related TS9030 generatedContextualTyping.ts:337:12: Add a return type to the function expression. var x340 = (n: Array) => n; x340([d1, d2]); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:338:5: Add a type annotation to the variable x340 -!!! related TS9030 generatedContextualTyping.ts:338:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:338:5: Add a type annotation to the variable x340. +!!! related TS9030 generatedContextualTyping.ts:338:12: Add a return type to the function expression. var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:339:5: Add a type annotation to the variable x341 -!!! related TS9030 generatedContextualTyping.ts:339:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:339:5: Add a type annotation to the variable x341. +!!! related TS9030 generatedContextualTyping.ts:339:12: Add a return type to the function expression. var x342 = (n: {n: Base[]; } ) => n; x342({ n: [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:340:5: Add a type annotation to the variable x342 -!!! related TS9030 generatedContextualTyping.ts:340:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:340:5: Add a type annotation to the variable x342. +!!! related TS9030 generatedContextualTyping.ts:340:12: Add a return type to the function expression. var x343 = (n: (s: Base[]) => any) => n; x343(n => { var n: Base[]; return null; }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:341:5: Add a type annotation to the variable x343 -!!! related TS9030 generatedContextualTyping.ts:341:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:341:5: Add a type annotation to the variable x343. +!!! related TS9030 generatedContextualTyping.ts:341:12: Add a return type to the function expression. var x344 = (n: Genric) => n; x344({ func: n => { return [d1, d2]; } }); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:342:5: Add a type annotation to the variable x344 -!!! related TS9030 generatedContextualTyping.ts:342:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:342:5: Add a type annotation to the variable x344. +!!! related TS9030 generatedContextualTyping.ts:342:12: Add a return type to the function expression. var x345 = function(n: () => Base[]) { }; x345(() => [d1, d2]); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:343:5: Add a type annotation to the variable x345 -!!! related TS9030 generatedContextualTyping.ts:343:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:343:5: Add a type annotation to the variable x345. +!!! related TS9030 generatedContextualTyping.ts:343:12: Add a return type to the function expression. var x346 = function(n: () => Base[]) { }; x346(function() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:344:5: Add a type annotation to the variable x346 -!!! related TS9030 generatedContextualTyping.ts:344:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:344:5: Add a type annotation to the variable x346. +!!! related TS9030 generatedContextualTyping.ts:344:12: Add a return type to the function expression. var x347 = function(n: () => Base[]) { }; x347(function named() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:345:5: Add a type annotation to the variable x347 -!!! related TS9030 generatedContextualTyping.ts:345:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:345:5: Add a type annotation to the variable x347. +!!! related TS9030 generatedContextualTyping.ts:345:12: Add a return type to the function expression. var x348 = function(n: { (): Base[]; }) { }; x348(() => [d1, d2]); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:346:5: Add a type annotation to the variable x348 -!!! related TS9030 generatedContextualTyping.ts:346:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:346:5: Add a type annotation to the variable x348. +!!! related TS9030 generatedContextualTyping.ts:346:12: Add a return type to the function expression. var x349 = function(n: { (): Base[]; }) { }; x349(function() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:347:5: Add a type annotation to the variable x349 -!!! related TS9030 generatedContextualTyping.ts:347:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:347:5: Add a type annotation to the variable x349. +!!! related TS9030 generatedContextualTyping.ts:347:12: Add a return type to the function expression. var x350 = function(n: { (): Base[]; }) { }; x350(function named() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:348:5: Add a type annotation to the variable x350 -!!! related TS9030 generatedContextualTyping.ts:348:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:348:5: Add a type annotation to the variable x350. +!!! related TS9030 generatedContextualTyping.ts:348:12: Add a return type to the function expression. var x351 = function(n: Base[]) { }; x351([d1, d2]); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:349:5: Add a type annotation to the variable x351 -!!! related TS9030 generatedContextualTyping.ts:349:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:349:5: Add a type annotation to the variable x351. +!!! related TS9030 generatedContextualTyping.ts:349:12: Add a return type to the function expression. var x352 = function(n: Array) { }; x352([d1, d2]); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:350:5: Add a type annotation to the variable x352 -!!! related TS9030 generatedContextualTyping.ts:350:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:350:5: Add a type annotation to the variable x352. +!!! related TS9030 generatedContextualTyping.ts:350:12: Add a return type to the function expression. var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:351:5: Add a type annotation to the variable x353 -!!! related TS9030 generatedContextualTyping.ts:351:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:351:5: Add a type annotation to the variable x353. +!!! related TS9030 generatedContextualTyping.ts:351:12: Add a return type to the function expression. var x354 = function(n: {n: Base[]; } ) { }; x354({ n: [d1, d2] }); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:352:5: Add a type annotation to the variable x354 -!!! related TS9030 generatedContextualTyping.ts:352:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:352:5: Add a type annotation to the variable x354. +!!! related TS9030 generatedContextualTyping.ts:352:12: Add a return type to the function expression. var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; return null; }); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:353:5: Add a type annotation to the variable x355 -!!! related TS9030 generatedContextualTyping.ts:353:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:353:5: Add a type annotation to the variable x355. +!!! related TS9030 generatedContextualTyping.ts:353:12: Add a return type to the function expression. var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:354:5: Add a type annotation to the variable x356 -!!! related TS9030 generatedContextualTyping.ts:354:12: Add a return type to the function expression \ No newline at end of file +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:354:5: Add a type annotation to the variable x356. +!!! related TS9030 generatedContextualTyping.ts:354:12: Add a return type to the function expression. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument.d.ts index e7d2ea2ec3085..661adbce3d0e3 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument.d.ts @@ -89,7 +89,7 @@ genericTypeReferenceWithoutTypeArgument.ts(11,18): error TS2314: Generic type 'C genericTypeReferenceWithoutTypeArgument.ts(12,11): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. genericTypeReferenceWithoutTypeArgument.ts(12,14): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(12,18): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(14,9): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +genericTypeReferenceWithoutTypeArgument.ts(14,9): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. genericTypeReferenceWithoutTypeArgument.ts(14,13): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(14,28): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(16,15): error TS2314: Generic type 'C' requires 1 type argument(s). @@ -103,9 +103,9 @@ genericTypeReferenceWithoutTypeArgument.ts(23,21): error TS2314: Generic type 'C genericTypeReferenceWithoutTypeArgument.ts(29,18): error TS2314: Generic type 'E' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(30,20): error TS2314: Generic type 'E' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(31,22): error TS2314: Generic type 'E' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(33,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +genericTypeReferenceWithoutTypeArgument.ts(33,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. genericTypeReferenceWithoutTypeArgument.ts(33,22): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +genericTypeReferenceWithoutTypeArgument.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. genericTypeReferenceWithoutTypeArgument.ts(34,22): error TS2314: Generic type 'E' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(36,10): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(37,10): error TS2314: Generic type 'E' requires 1 type argument(s). @@ -141,9 +141,9 @@ genericTypeReferenceWithoutTypeArgument.ts(37,10): error TS2314: Generic type 'E var e = (x: C) => { var y: C; return y; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 genericTypeReferenceWithoutTypeArgument.ts:14:5: Add a type annotation to the variable e -!!! related TS9030 genericTypeReferenceWithoutTypeArgument.ts:14:9: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 genericTypeReferenceWithoutTypeArgument.ts:14:5: Add a type annotation to the variable e. +!!! related TS9030 genericTypeReferenceWithoutTypeArgument.ts:14:9: Add a return type to the function expression. ~ !!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ @@ -190,14 +190,14 @@ genericTypeReferenceWithoutTypeArgument.ts(37,10): error TS2314: Generic type 'E function h(x: T) { } ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 genericTypeReferenceWithoutTypeArgument.ts:33:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 genericTypeReferenceWithoutTypeArgument.ts:33:10: Add a return type to the function declaration. ~ !!! error TS2314: Generic type 'C' requires 1 type argument(s). function i(x: T) { } ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 genericTypeReferenceWithoutTypeArgument.ts:34:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 genericTypeReferenceWithoutTypeArgument.ts:34:10: Add a return type to the function declaration. ~~~ !!! error TS2314: Generic type 'E' requires 1 type argument(s). diff --git a/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument2.d.ts index d188e3e6f6b1b..e3725acf694b5 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument2.d.ts @@ -89,7 +89,7 @@ genericTypeReferenceWithoutTypeArgument2.ts(11,18): error TS2314: Generic type ' genericTypeReferenceWithoutTypeArgument2.ts(12,11): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. genericTypeReferenceWithoutTypeArgument2.ts(12,14): error TS2314: Generic type 'I' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(12,18): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(14,9): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +genericTypeReferenceWithoutTypeArgument2.ts(14,9): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. genericTypeReferenceWithoutTypeArgument2.ts(14,13): error TS2314: Generic type 'I' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(14,28): error TS2314: Generic type 'I' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(16,15): error TS2314: Generic type 'I' requires 1 type argument(s). @@ -105,9 +105,9 @@ genericTypeReferenceWithoutTypeArgument2.ts(29,18): error TS2708: Cannot use nam genericTypeReferenceWithoutTypeArgument2.ts(29,18): error TS4020: 'extends' clause of exported class 'D2' has or is using private name 'M'. genericTypeReferenceWithoutTypeArgument2.ts(30,24): error TS2314: Generic type 'E' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(31,24): error TS2694: Namespace 'M' has no exported member 'C'. -genericTypeReferenceWithoutTypeArgument2.ts(33,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +genericTypeReferenceWithoutTypeArgument2.ts(33,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. genericTypeReferenceWithoutTypeArgument2.ts(33,22): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +genericTypeReferenceWithoutTypeArgument2.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. genericTypeReferenceWithoutTypeArgument2.ts(34,22): error TS2314: Generic type 'E' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(36,10): error TS2304: Cannot find name 'C'. genericTypeReferenceWithoutTypeArgument2.ts(36,10): error TS4025: Exported variable 'j' has or is using private name 'C'. @@ -144,9 +144,9 @@ genericTypeReferenceWithoutTypeArgument2.ts(37,10): error TS2314: Generic type ' var e = (x: I) => { var y: I; return y; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 genericTypeReferenceWithoutTypeArgument2.ts:14:5: Add a type annotation to the variable e -!!! related TS9030 genericTypeReferenceWithoutTypeArgument2.ts:14:9: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 genericTypeReferenceWithoutTypeArgument2.ts:14:5: Add a type annotation to the variable e. +!!! related TS9030 genericTypeReferenceWithoutTypeArgument2.ts:14:9: Add a return type to the function expression. ~ !!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ @@ -197,14 +197,14 @@ genericTypeReferenceWithoutTypeArgument2.ts(37,10): error TS2314: Generic type ' function h(x: T) { } ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 genericTypeReferenceWithoutTypeArgument2.ts:33:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 genericTypeReferenceWithoutTypeArgument2.ts:33:10: Add a return type to the function declaration. ~ !!! error TS2314: Generic type 'I' requires 1 type argument(s). function i(x: T) { } ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 genericTypeReferenceWithoutTypeArgument2.ts:34:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 genericTypeReferenceWithoutTypeArgument2.ts:34:10: Add a return type to the function declaration. ~~~ !!! error TS2314: Generic type 'E' requires 1 type argument(s). diff --git a/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts index 039dd466de27a..8695f728c49e1 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/giant.d.ts @@ -1083,17 +1083,17 @@ 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(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(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,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(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'. @@ -1102,28 +1102,28 @@ 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(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(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(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,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(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(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(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. @@ -1148,17 +1148,17 @@ 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(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(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,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(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'. @@ -1167,48 +1167,48 @@ 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(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(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(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,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(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(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(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(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(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,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(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,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'. @@ -1217,40 +1217,40 @@ 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(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,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,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(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(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(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(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,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(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,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'. @@ -1259,80 +1259,80 @@ 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(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,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,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(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(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(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(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(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(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(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,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(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(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(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(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(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(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(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. @@ -1804,43 +1804,43 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient } 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 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 +!!! 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) ~~~ @@ -1865,17 +1865,17 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! 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 +!!! 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 +!!! 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 +!!! 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) ~~~ @@ -1886,14 +1886,14 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! 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 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. } @@ -1903,8 +1903,8 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient (): 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 +!!! 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[]); @@ -1946,24 +1946,24 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient 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 +!!! 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: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 +!!! 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: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 +!!! 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; @@ -2095,43 +2095,43 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient } 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 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 +!!! 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) ~~~ @@ -2156,17 +2156,17 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! 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 +!!! 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 +!!! 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 +!!! 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) ~~~ @@ -2177,14 +2177,14 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! 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 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. } @@ -2194,8 +2194,8 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient (): 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 +!!! 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[]); @@ -2237,24 +2237,24 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient 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 +!!! 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: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 +!!! 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: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 +!!! 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; @@ -2264,23 +2264,23 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient 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 +!!! 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 +!!! 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 +!!! 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 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 { }; @@ -2288,12 +2288,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient } 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 +!!! 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 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 { @@ -2302,12 +2302,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! 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 +!!! 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 +!!! 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. @@ -2318,7 +2318,7 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'pgF'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! 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. @@ -2326,13 +2326,13 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! 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 +!!! 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 +!!! 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. @@ -2357,11 +2357,11 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! 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 +!!! 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 +!!! 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. @@ -2369,7 +2369,7 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'tsF'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! 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. @@ -2380,7 +2380,7 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! 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. @@ -2388,18 +2388,18 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! 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 +!!! 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 +!!! 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 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. ~ @@ -2409,12 +2409,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient 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 +!!! 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 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 { } @@ -2424,12 +2424,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient } 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 +!!! 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 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 { @@ -2438,12 +2438,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! 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 +!!! 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 +!!! 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. @@ -2454,7 +2454,7 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'pgF'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! 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. @@ -2462,13 +2462,13 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! 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 +!!! 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 +!!! 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. @@ -2493,11 +2493,11 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! 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 +!!! 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 +!!! 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. @@ -2505,7 +2505,7 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'tsF'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! 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. @@ -2516,7 +2516,7 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! 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. @@ -2524,18 +2524,18 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! 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 +!!! 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 +!!! 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 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. ~ @@ -2546,22 +2546,22 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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. @@ -2611,34 +2611,34 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient 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 +!!! 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: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 +!!! 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: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 +!!! 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 +!!! 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 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. ~ @@ -2648,12 +2648,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient 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 +!!! 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 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 { } @@ -2663,14 +2663,14 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~~~~~ !!! 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 +!!! 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 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 { } @@ -2682,12 +2682,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient } 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 +!!! 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 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 { @@ -2696,22 +2696,22 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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. @@ -2722,8 +2722,8 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient (): 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 +!!! 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[]); @@ -2765,34 +2765,34 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient 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 +!!! 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: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 +!!! 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: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 +!!! 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 +!!! 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 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. ~ @@ -2801,12 +2801,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient 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 +!!! 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 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 { } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/inKeywordAndIntersection.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/inKeywordAndIntersection.d.ts index 67555970d4dd3..92c28d06966d6 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/inKeywordAndIntersection.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/inKeywordAndIntersection.d.ts @@ -61,7 +61,7 @@ declare const ClassOne: { /// [Errors] //// -inKeywordAndIntersection.ts(4,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +inKeywordAndIntersection.ts(4,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. ==== inKeywordAndIntersection.ts (1 errors) ==== @@ -70,8 +70,8 @@ inKeywordAndIntersection.ts(4,10): error TS9007: Function must have an explicit function f10(obj: A & { x: string } | B) { ~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 inKeywordAndIntersection.ts:4:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 inKeywordAndIntersection.ts:4:10: Add a return type to the function declaration. if (obj instanceof Object) { obj; // A & { x: string } | B } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts index 26d83c0da13a3..b84d541cf7d61 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts @@ -372,20 +372,20 @@ declare var obj87: i8; /// [Errors] //// -intTypeCheck.ts(9,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -intTypeCheck.ts(10,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -intTypeCheck.ts(10,15): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -intTypeCheck.ts(16,6): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +intTypeCheck.ts(9,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +intTypeCheck.ts(10,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +intTypeCheck.ts(10,15): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +intTypeCheck.ts(16,6): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. intTypeCheck.ts(35,6): error TS2304: Cannot find name 'p'. -intTypeCheck.ts(46,14): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -intTypeCheck.ts(52,6): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +intTypeCheck.ts(46,14): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +intTypeCheck.ts(52,6): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. intTypeCheck.ts(71,6): error TS2304: Cannot find name 'p'. -intTypeCheck.ts(83,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -intTypeCheck.ts(84,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -intTypeCheck.ts(84,13): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +intTypeCheck.ts(83,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +intTypeCheck.ts(84,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +intTypeCheck.ts(84,13): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. intTypeCheck.ts(85,5): error TS2386: Overload signatures must all be optional or required. -intTypeCheck.ts(85,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -intTypeCheck.ts(85,15): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +intTypeCheck.ts(85,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +intTypeCheck.ts(85,15): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. intTypeCheck.ts(99,5): error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? Type 'Object' is missing the following properties from type 'i1': p, p3, p6 intTypeCheck.ts(100,20): error TS2351: This expression is not constructable. @@ -492,15 +492,15 @@ intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. p5? (): void; p6(pa1): void; ~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 intTypeCheck.ts:9:8: Add a type annotation to the parameter pa1 +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 intTypeCheck.ts:9: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 intTypeCheck.ts:10:10: Add a type annotation to the parameter pa1 +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 intTypeCheck.ts:10:10: Add a type annotation to the parameter pa1. ~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 intTypeCheck.ts:10:15: Add a type annotation to the parameter pa2 +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 intTypeCheck.ts:10:15: Add a type annotation to the parameter pa2. } interface i2 { //Call Signatures @@ -508,8 +508,8 @@ intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. (): number; (p); ~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 intTypeCheck.ts:16:6: Add a type annotation to the parameter p +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 intTypeCheck.ts:16:6: Add a type annotation to the parameter p. (p1: string); (p2?: string); (...p3: any[]); @@ -543,7 +543,7 @@ intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. class Base { foo() { } } ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 intTypeCheck.ts:46:14: Add a return type to the method interface i11 { @@ -552,8 +552,8 @@ intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. (): number; (p); ~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 intTypeCheck.ts:52:6: Add a type annotation to the parameter p +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 intTypeCheck.ts:52:6: Add a type annotation to the parameter p. (p1: string); (p2?: string); (...p3: any[]); @@ -588,24 +588,24 @@ intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. p5? (): void; p6(pa1): void; ~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 intTypeCheck.ts:83:8: Add a type annotation to the parameter pa1 +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 intTypeCheck.ts:83: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 intTypeCheck.ts:84:8: Add a type annotation to the parameter pa1 +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 intTypeCheck.ts:84:8: Add a type annotation to the parameter pa1. ~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 intTypeCheck.ts:84:13: Add a type annotation to the parameter pa2 +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 intTypeCheck.ts:84: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 intTypeCheck.ts:85:10: Add a type annotation to the parameter pa1 +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 intTypeCheck.ts:85:10: Add a type annotation to the parameter pa1. ~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 intTypeCheck.ts:85:15: Add a type annotation to the parameter pa2 +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 intTypeCheck.ts:85:15: Add a type annotation to the parameter pa2. } var anyVar: any; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsClasses.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsClasses.d.ts index 4539f4595c7db..44cf94c995b06 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsClasses.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsClasses.d.ts @@ -102,25 +102,25 @@ 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(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(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(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 TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(42,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. isolatedDeclarationErrorsClasses.ts(44,35): error TS7006: Parameter 'v' implicitly has an 'any' type. -isolatedDeclarationErrorsClasses.ts(44,35): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -isolatedDeclarationErrorsClasses.ts(46,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +isolatedDeclarationErrorsClasses.ts(44,35): error TS9011: Parameter must have an explicit type annotation 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,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(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. @@ -131,11 +131,11 @@ isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralNa 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 +!!! 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 +!!! 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 {} @@ -144,31 +144,31 @@ isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralNa ~ !!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 } @@ -202,20 +202,20 @@ isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralNa [noAnnotationStringName]() { } ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 isolatedDeclarationErrorsClasses.ts:42:5: Add a return type to the method [noParamAnnotationStringName](v): void { } ~ !!! error TS7006: Parameter 'v' implicitly has an 'any' type. ~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 isolatedDeclarationErrorsClasses.ts:44:35: Add a type annotation to the parameter v +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 isolatedDeclarationErrorsClasses.ts:44:35: Add a type annotation to the parameter v. 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 +!!! 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) { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -223,8 +223,8 @@ isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralNa ~~~~~ !!! 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 +!!! 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; ~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsObjects.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsObjects.d.ts index 8e5833252d55f..150b4ee03c460 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsObjects.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsObjects.d.ts @@ -119,27 +119,27 @@ 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(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(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(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(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) ==== @@ -151,61 +151,61 @@ isolatedDeclarationErrorsObjects.ts(87,5): error TS9016: Objects that contain sh 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 } } @@ -215,22 +215,22 @@ isolatedDeclarationErrorsObjects.ts(87,5): error TS9016: Objects that contain sh 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 +!!! 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 +!!! 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 +!!! 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 }, @@ -254,12 +254,12 @@ isolatedDeclarationErrorsObjects.ts(87,5): error TS9016: Objects that contain sh [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 +!!! 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 +!!! 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, @@ -273,13 +273,13 @@ isolatedDeclarationErrorsObjects.ts(87,5): error TS9016: Objects that contain sh 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 +!!! 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 +!!! 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. } @@ -290,14 +290,14 @@ isolatedDeclarationErrorsObjects.ts(87,5): error TS9016: Objects that contain sh 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 +!!! 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 +!!! 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/literalTypesAndTypeAssertions.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/literalTypesAndTypeAssertions.d.ts index 0a01966f31548..b2aab4796edde 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/literalTypesAndTypeAssertions.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/literalTypesAndTypeAssertions.d.ts @@ -35,10 +35,10 @@ declare let d: invalid; /// [Errors] //// -literalTypesAndTypeAssertions.ts(10,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations -literalTypesAndTypeAssertions.ts(11,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations -literalTypesAndTypeAssertions.ts(12,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations -literalTypesAndTypeAssertions.ts(13,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations +literalTypesAndTypeAssertions.ts(10,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. +literalTypesAndTypeAssertions.ts(11,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. +literalTypesAndTypeAssertions.ts(12,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. +literalTypesAndTypeAssertions.ts(13,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. ==== literalTypesAndTypeAssertions.ts (4 errors) ==== @@ -53,14 +53,14 @@ literalTypesAndTypeAssertions.ts(13,7): error TS9019: Binding elements can't be let { a = "foo" } = { a: "foo" }; ~ -!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations +!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. let { b = "foo" as "foo" } = { b: "bar" }; ~ -!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations +!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. let { c = "foo" } = { c: "bar" as "bar" }; ~ -!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations +!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. let { d = "foo" as "foo" } = { d: "bar" as "bar" }; ~ -!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations +!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts index d6c6c13fe3eef..45b856858a8aa 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts @@ -74,25 +74,25 @@ declare const o1: invalid; /// [Errors] //// -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(3,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(3,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(4,18): error TS2550: Property 'from' does not exist on type 'ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(10,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(10,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(10,13): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(16,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(16,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(17,5): error TS2339: Property 'name' does not exist on type '() => void'. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(20,6): error TS2550: Property 'sign' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(29,18): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,13): error TS2304: Cannot find name 'Proxy'. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(36,1): error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(39,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(39,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(40,5): error TS2550: Property 'flags' does not exist on type 'RegExp'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(44,5): error TS2550: Property 'includes' does not exist on type 'string'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. @@ -101,8 +101,8 @@ modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585 // Using Es6 array function f(x: number, y: number, z: number) { ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:3:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:3:10: Add a return type to the function declaration. return Array.from(arguments); ~~~~ !!! error TS2550: Property 'from' does not exist on type 'ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. @@ -113,8 +113,8 @@ modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585 // Using ES6 collection var m = new Map(); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:10:5: Add a type annotation to the variable m +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:10:5: Add a type annotation to the variable m. ~~~ !!! error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. m.clear(); @@ -124,8 +124,8 @@ modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585 // Using ES6 function function Baz() { } ~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:16:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:16:10: Add a return type to the function declaration. Baz.name; ~~~~ !!! error TS2339: Property 'name' does not exist on type '() => void'. @@ -140,8 +140,8 @@ modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585 a: 2, [Symbol.hasInstance](value: any) { ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:23:5: Add a type annotation to the variable o +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:23:5: Add a type annotation to the variable o. !!! related TS9034 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:25:5: Add a return type to the method ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. @@ -156,8 +156,8 @@ modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585 var t = {} var p = new Proxy(t, {}); ~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:33:5: Add a type annotation to the variable p +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:33:5: Add a type annotation to the variable p. ~~~~~ !!! error TS2304: Cannot find name 'Proxy'. @@ -169,8 +169,8 @@ modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585 // Using Es6 regexp var reg = new RegExp("/s"); ~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:39:5: Add a type annotation to the variable reg +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:39:5: Add a type annotation to the variable reg. reg.flags; ~~~~~ !!! error TS2550: Property 'flags' does not exist on type 'RegExp'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. @@ -186,15 +186,15 @@ modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585 ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. ~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:47:5: Add a type annotation to the variable s +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:47:5: Add a type annotation to the variable s. // Using ES6 wellknown-symbol const o1 = { [Symbol.hasInstance](value: any) { ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:50:7: Add a type annotation to the variable o1 +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:50:7: Add a type annotation to the variable o1. !!! related TS9034 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:51:5: Add a return type to the method ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/namedTupleMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/namedTupleMembers.d.ts index 982e9bc56c9a5..797c973d9a20b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/namedTupleMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/namedTupleMembers.d.ts @@ -112,10 +112,10 @@ 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(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) ==== @@ -161,8 +161,8 @@ namedTupleMembers.ts(77,29): error TS9010: Variable must have an explicit type a 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 +!!! 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; } @@ -171,8 +171,8 @@ namedTupleMembers.ts(77,29): error TS9010: Variable must have an explicit type a 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 +!!! 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]; @@ -202,10 +202,10 @@ namedTupleMembers.ts(77,29): error TS9010: Variable must have an explicit type a 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 +!!! 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 +!!! 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/noUncheckedIndexedAccess.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/noUncheckedIndexedAccess.d.ts index c56df569d6385..5b6bb77aaab3b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/noUncheckedIndexedAccess.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/noUncheckedIndexedAccess.d.ts @@ -234,7 +234,7 @@ noUncheckedIndexedAccess.ts(79,7): error TS2322: Type 'number | boolean | undefi noUncheckedIndexedAccess.ts(85,1): error TS2322: Type 'undefined' is not assignable to type 'string'. noUncheckedIndexedAccess.ts(90,7): error TS2322: Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. -noUncheckedIndexedAccess.ts(97,13): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +noUncheckedIndexedAccess.ts(97,13): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. noUncheckedIndexedAccess.ts(98,5): error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. Type 'undefined' is not assignable to type 'string'. noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'string | undefined' is not assignable to type 'string'. @@ -402,9 +402,9 @@ noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'string | undefined' is n const fn2 = (key: Key): string => myRecord2[key]; // Should OK const fn3 = (key: Key) => { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 noUncheckedIndexedAccess.ts:97:7: Add a type annotation to the variable fn3 -!!! related TS9030 noUncheckedIndexedAccess.ts:97:13: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 noUncheckedIndexedAccess.ts:97:7: Add a type annotation to the variable fn3. +!!! related TS9030 noUncheckedIndexedAccess.ts:97:13: Add a return type to the function expression. myRecord2[key] = undefined; // Should error ~~~~~~~~~~~~~~ !!! error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. 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 index e21bdcbe952d0..fec91f74af30d 100644 --- 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 @@ -154,12 +154,12 @@ error TS2468: Cannot find global value 'Promise'. /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,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,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. @@ -175,17 +175,17 @@ error TS2468: Cannot find global value 'Promise'. /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,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,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,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,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'. @@ -339,8 +339,8 @@ error TS2468: Cannot find global value 'Promise'. 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 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')'? ~ @@ -352,8 +352,8 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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')'? ~ @@ -402,15 +402,15 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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 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); @@ -420,15 +420,15 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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 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. 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 index e21bdcbe952d0..fec91f74af30d 100644 --- 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 @@ -154,12 +154,12 @@ error TS2468: Cannot find global value 'Promise'. /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,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,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. @@ -175,17 +175,17 @@ error TS2468: Cannot find global value 'Promise'. /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,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,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,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,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'. @@ -339,8 +339,8 @@ error TS2468: Cannot find global value 'Promise'. 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 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')'? ~ @@ -352,8 +352,8 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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')'? ~ @@ -402,15 +402,15 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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 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); @@ -420,15 +420,15 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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 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. 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 index 78670aa6456cd..087965900048c 100644 --- 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 @@ -148,12 +148,12 @@ error TS2468: Cannot find global value 'Promise'. /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,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,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. @@ -169,17 +169,17 @@ error TS2468: Cannot find global value 'Promise'. /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,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,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,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,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`. @@ -328,8 +328,8 @@ error TS2468: Cannot find global value 'Promise'. 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 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')'? ~ @@ -341,8 +341,8 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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')'? ~ @@ -390,15 +390,15 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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 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); @@ -408,15 +408,15 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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 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) ==== 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 index 78670aa6456cd..087965900048c 100644 --- 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 @@ -148,12 +148,12 @@ error TS2468: Cannot find global value 'Promise'. /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,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,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. @@ -169,17 +169,17 @@ error TS2468: Cannot find global value 'Promise'. /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,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,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,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,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`. @@ -328,8 +328,8 @@ error TS2468: Cannot find global value 'Promise'. 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 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')'? ~ @@ -341,8 +341,8 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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')'? ~ @@ -390,15 +390,15 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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 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); @@ -408,15 +408,15 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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 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) ==== diff --git a/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralGettersAndSetters.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralGettersAndSetters.d.ts index 4d63cabd89d1d..23b9da8446033 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralGettersAndSetters.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralGettersAndSetters.d.ts @@ -157,73 +157,73 @@ declare var getParamType3: invalid; /// [Errors] //// -objectLiteralGettersAndSetters.ts(2,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(3,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(4,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(5,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(6,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(7,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(10,18): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(12,23): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(14,23): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(22,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(30,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(64,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(67,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(76,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(2,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(3,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(4,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(5,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(6,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(7,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(10,18): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(12,23): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(14,23): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(22,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(30,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(64,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(67,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(76,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ==== objectLiteralGettersAndSetters.ts (14 errors) ==== // Get and set accessor with the same name var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 objectLiteralGettersAndSetters.ts:2:50: Add a type to parameter of the set accessor declaration -!!! related TS9032 objectLiteralGettersAndSetters.ts:2:24: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 objectLiteralGettersAndSetters.ts:2:50: Add a type to parameter of the set accessor declaration. +!!! related TS9032 objectLiteralGettersAndSetters.ts:2:24: Add a return type to the get accessor declaration. var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } }; ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 objectLiteralGettersAndSetters.ts:3:50: Add a type to parameter of the set accessor declaration -!!! related TS9032 objectLiteralGettersAndSetters.ts:3:24: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 objectLiteralGettersAndSetters.ts:3:50: Add a type to parameter of the set accessor declaration. +!!! related TS9032 objectLiteralGettersAndSetters.ts:3:24: Add a return type to the get accessor declaration. var sameName3a = { get 0x20() { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; ~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 objectLiteralGettersAndSetters.ts:4:51: Add a type to parameter of the set accessor declaration -!!! related TS9032 objectLiteralGettersAndSetters.ts:4:24: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 objectLiteralGettersAndSetters.ts:4:51: Add a type to parameter of the set accessor declaration. +!!! related TS9032 objectLiteralGettersAndSetters.ts:4:24: Add a return type to the get accessor declaration. var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p: string; } }; ~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 objectLiteralGettersAndSetters.ts:5:49: Add a type to parameter of the set accessor declaration -!!! related TS9032 objectLiteralGettersAndSetters.ts:5:24: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 objectLiteralGettersAndSetters.ts:5:49: Add a type to parameter of the set accessor declaration. +!!! related TS9032 objectLiteralGettersAndSetters.ts:5:24: Add a return type to the get accessor declaration. var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p: string; } }; ~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 objectLiteralGettersAndSetters.ts:6:51: Add a type to parameter of the set accessor declaration -!!! related TS9032 objectLiteralGettersAndSetters.ts:6:24: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 objectLiteralGettersAndSetters.ts:6:51: Add a type to parameter of the set accessor declaration. +!!! related TS9032 objectLiteralGettersAndSetters.ts:6:24: Add a return type to the get accessor declaration. var sameName6a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 objectLiteralGettersAndSetters.ts:7:50: Add a type to parameter of the set accessor declaration -!!! related TS9032 objectLiteralGettersAndSetters.ts:7:24: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 objectLiteralGettersAndSetters.ts:7:50: Add a type to parameter of the set accessor declaration. +!!! related TS9032 objectLiteralGettersAndSetters.ts:7:24: Add a return type to the get accessor declaration. // PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} var callSig1 = { num(n: number) { return '' } }; ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 objectLiteralGettersAndSetters.ts:10:5: Add a type annotation to the variable callSig1 +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 objectLiteralGettersAndSetters.ts:10:5: Add a type annotation to the variable callSig1. !!! related TS9034 objectLiteralGettersAndSetters.ts:10:18: Add a return type to the method var callSig1: { num: (n: number) => string; }; var callSig2 = { num: function (n: number) { return '' } }; ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 objectLiteralGettersAndSetters.ts:12:5: Add a type annotation to the variable callSig2 -!!! related TS9030 objectLiteralGettersAndSetters.ts:12:23: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 objectLiteralGettersAndSetters.ts:12:5: Add a type annotation to the variable callSig2. +!!! related TS9030 objectLiteralGettersAndSetters.ts:12:23: Add a return type to the function expression. var callSig2: { num: (n: number) => string; }; var callSig3 = { num: (n: number) => '' }; ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 objectLiteralGettersAndSetters.ts:14:5: Add a type annotation to the variable callSig3 -!!! related TS9030 objectLiteralGettersAndSetters.ts:14:23: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 objectLiteralGettersAndSetters.ts:14:5: Add a type annotation to the variable callSig3. +!!! related TS9030 objectLiteralGettersAndSetters.ts:14:23: Add a return type to the function expression. var callSig3: { num: (n: number) => string; }; // Get accessor only, type of the property is the annotated return type of the get accessor @@ -233,8 +233,8 @@ objectLiteralGettersAndSetters.ts(76,9): error TS9009: At least one accessor mus // Get accessor only, type of the property is the inferred return type of the get accessor var getter2 = { get x() { return ''; } }; ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 objectLiteralGettersAndSetters.ts:22:21: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 objectLiteralGettersAndSetters.ts:22:21: Add a return type to the get accessor declaration. var getter2: { readonly x: string; } // Set accessor only, type of the property is the param type of the set accessor @@ -244,8 +244,8 @@ objectLiteralGettersAndSetters.ts(76,9): error TS9009: At least one accessor mus // Set accessor only, type of the property is Any for an unannotated set accessor var setter2 = { set x(n) { } }; ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 objectLiteralGettersAndSetters.ts:30:21: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 objectLiteralGettersAndSetters.ts:30:21: Add a type to parameter of the set accessor declaration. var setter2: { x: any }; var anyVar: any; @@ -281,16 +281,16 @@ objectLiteralGettersAndSetters.ts(76,9): error TS9009: At least one accessor mus }, get n() { return ''; } ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 objectLiteralGettersAndSetters.ts:60:9: Add a type to parameter of the set accessor declaration -!!! related TS9032 objectLiteralGettersAndSetters.ts:64:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 objectLiteralGettersAndSetters.ts:60:9: Add a type to parameter of the set accessor declaration. +!!! related TS9032 objectLiteralGettersAndSetters.ts:64:9: Add a return type to the get accessor declaration. }; var getParamType2 = { get n() { return ''; }, ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 objectLiteralGettersAndSetters.ts:68:9: Add a type to parameter of the set accessor declaration -!!! related TS9032 objectLiteralGettersAndSetters.ts:67:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 objectLiteralGettersAndSetters.ts:68:9: Add a type to parameter of the set accessor declaration. +!!! related TS9032 objectLiteralGettersAndSetters.ts:67:9: Add a return type to the get accessor declaration. set n(x) { var y = x; var y: string; @@ -301,9 +301,9 @@ objectLiteralGettersAndSetters.ts(76,9): error TS9009: At least one accessor mus var getParamType3 = { get n() { return ''; }, ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 objectLiteralGettersAndSetters.ts:77:9: Add a type to parameter of the set accessor declaration -!!! related TS9032 objectLiteralGettersAndSetters.ts:76:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 objectLiteralGettersAndSetters.ts:77:9: Add a type to parameter of the set accessor declaration. +!!! related TS9032 objectLiteralGettersAndSetters.ts:76:9: Add a return type to the get accessor declaration. set n(x) { var y = x; var y: string; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/optionalChainingInference.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/optionalChainingInference.d.ts index 1ea36a48685ee..bf08ff776c50e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/optionalChainingInference.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/optionalChainingInference.d.ts @@ -73,12 +73,12 @@ declare const v8: number; /// [Errors] //// -optionalChainingInference.ts(8,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations -optionalChainingInference.ts(17,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations -optionalChainingInference.ts(20,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations -optionalChainingInference.ts(23,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations -optionalChainingInference.ts(26,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations -optionalChainingInference.ts(29,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations +optionalChainingInference.ts(8,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +optionalChainingInference.ts(17,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +optionalChainingInference.ts(20,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +optionalChainingInference.ts(23,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +optionalChainingInference.ts(26,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +optionalChainingInference.ts(29,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. ==== optionalChainingInference.ts (6 errors) ==== @@ -91,9 +91,9 @@ optionalChainingInference.ts(29,21): error TS9013: Expression type can't be infe const b1 = { value: su?.length }; ~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 optionalChainingInference.ts:8:7: Add a type annotation to the variable b1 -!!! related TS9035 optionalChainingInference.ts:8:21: Add a type assertion to this expression to make type type explicit +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 optionalChainingInference.ts:8:7: Add a type annotation to the variable b1. +!!! related TS9035 optionalChainingInference.ts:8:21: Add a type assertion to this expression to make type type explicit. const v1: number = unbox(b1); const b2 = { value: su?.length as number | undefined }; @@ -104,37 +104,37 @@ optionalChainingInference.ts(29,21): error TS9013: Expression type can't be infe const b4 = { value: fnu?.() }; ~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 optionalChainingInference.ts:17:7: Add a type annotation to the variable b4 -!!! related TS9035 optionalChainingInference.ts:17:21: Add a type assertion to this expression to make type type explicit +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 optionalChainingInference.ts:17:7: Add a type annotation to the variable b4. +!!! related TS9035 optionalChainingInference.ts:17:21: Add a type assertion to this expression to make type type explicit. const v4: number = unbox(b4); const b5 = { value: su?.["length"] }; ~~~~~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 optionalChainingInference.ts:20:7: Add a type annotation to the variable b5 -!!! related TS9035 optionalChainingInference.ts:20:21: Add a type assertion to this expression to make type type explicit +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 optionalChainingInference.ts:20:7: Add a type annotation to the variable b5. +!!! related TS9035 optionalChainingInference.ts:20:21: Add a type assertion to this expression to make type type explicit. const v5: number = unbox(b5); const b6 = { value: osu?.prop.length }; ~~~~~~~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 optionalChainingInference.ts:23:7: Add a type annotation to the variable b6 -!!! related TS9035 optionalChainingInference.ts:23:21: Add a type assertion to this expression to make type type explicit +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 optionalChainingInference.ts:23:7: Add a type annotation to the variable b6. +!!! related TS9035 optionalChainingInference.ts:23:21: Add a type assertion to this expression to make type type explicit. const v6: number = unbox(b6); const b7 = { value: osu?.prop["length"] }; ~~~~~~~~~~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 optionalChainingInference.ts:26:7: Add a type annotation to the variable b7 -!!! related TS9035 optionalChainingInference.ts:26:21: Add a type assertion to this expression to make type type explicit +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 optionalChainingInference.ts:26:7: Add a type annotation to the variable b7. +!!! related TS9035 optionalChainingInference.ts:26:21: Add a type assertion to this expression to make type type explicit. const v7: number = unbox(b7); const b8 = { value: ofnu?.prop() }; ~~~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 optionalChainingInference.ts:29:7: Add a type annotation to the variable b8 -!!! related TS9035 optionalChainingInference.ts:29:21: Add a type assertion to this expression to make type type explicit +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 optionalChainingInference.ts:29:7: Add a type annotation to the variable b8. +!!! related TS9035 optionalChainingInference.ts:29:21: Add a type assertion to this expression to make type type explicit. const v8: number = unbox(b8); \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts index 98c514c93d112..61f85a17b43db 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts @@ -111,7 +111,7 @@ interface I3 { /// [Errors] //// overloadsWithComputedNames.ts(4,5): error TS2389: Function implementation name must be '["B"]'. -overloadsWithComputedNames.ts(8,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +overloadsWithComputedNames.ts(8,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. overloadsWithComputedNames.ts(14,5): error TS2391: Function implementation is missing or not immediately following the declaration. overloadsWithComputedNames.ts(16,5): error TS2389: Function implementation name must be '["bar"]'. overloadsWithComputedNames.ts(28,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. @@ -134,8 +134,8 @@ overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is mi } let p = new Person(); ~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 overloadsWithComputedNames.ts:8:5: Add a type annotation to the variable p +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 overloadsWithComputedNames.ts:8:5: Add a type annotation to the variable p. p.A(0) p.B(0) diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNonNullableTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNonNullableTypes.d.ts index b1a9470a08f43..8740bde888fb7 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNonNullableTypes.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNonNullableTypes.d.ts @@ -47,13 +47,13 @@ declare const d: !number; parseInvalidNonNullableTypes.ts(1,30): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? parseInvalidNonNullableTypes.ts(5,30): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(9,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parseInvalidNonNullableTypes.ts(9,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. parseInvalidNonNullableTypes.ts(9,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(10,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parseInvalidNonNullableTypes.ts(10,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. parseInvalidNonNullableTypes.ts(10,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? -parseInvalidNonNullableTypes.ts(12,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parseInvalidNonNullableTypes.ts(12,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. parseInvalidNonNullableTypes.ts(12,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parseInvalidNonNullableTypes.ts(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. parseInvalidNonNullableTypes.ts(13,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? parseInvalidNonNullableTypes.ts(15,16): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. parseInvalidNonNullableTypes.ts(15,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? @@ -80,27 +80,27 @@ parseInvalidNonNullableTypes.ts(22,10): error TS17020: '!' at the start of a typ function f3(a: string!) {} ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parseInvalidNonNullableTypes.ts:9:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parseInvalidNonNullableTypes.ts:9:10: Add a return type to the function declaration. ~~~~~~~ !!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? function f4(a: number!) {} ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parseInvalidNonNullableTypes.ts:10:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parseInvalidNonNullableTypes.ts:10:10: Add a return type to the function declaration. ~~~~~~~ !!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? function f5(a: !string) {} ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parseInvalidNonNullableTypes.ts:12:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parseInvalidNonNullableTypes.ts:12:10: Add a return type to the function declaration. ~~~~~~~ !!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? function f6(a: !number) {} ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parseInvalidNonNullableTypes.ts:13:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parseInvalidNonNullableTypes.ts:13:10: Add a return type to the function declaration. ~~~~~~~ !!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNullableTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNullableTypes.d.ts index 6f87de3cc01cb..c6fa83353795d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNullableTypes.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNullableTypes.d.ts @@ -53,13 +53,13 @@ parseInvalidNullableTypes.ts(1,30): error TS2677: A type predicate's type must b Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. parseInvalidNullableTypes.ts(1,30): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? -parseInvalidNullableTypes.ts(5,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parseInvalidNullableTypes.ts(5,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. parseInvalidNullableTypes.ts(5,16): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string | undefined'? -parseInvalidNullableTypes.ts(6,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parseInvalidNullableTypes.ts(6,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. parseInvalidNullableTypes.ts(6,16): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? -parseInvalidNullableTypes.ts(8,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parseInvalidNullableTypes.ts(8,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. parseInvalidNullableTypes.ts(8,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? -parseInvalidNullableTypes.ts(9,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parseInvalidNullableTypes.ts(9,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. parseInvalidNullableTypes.ts(9,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? parseInvalidNullableTypes.ts(11,25): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? parseInvalidNullableTypes.ts(12,5): error TS2322: Type 'boolean' is not assignable to type 'string'. @@ -86,27 +86,27 @@ parseInvalidNullableTypes.ts(24,8): error TS17019: '?' at the end of a type is n function f2(a: string?) {} ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parseInvalidNullableTypes.ts:5:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parseInvalidNullableTypes.ts:5:10: Add a return type to the function declaration. ~~~~~~~ !!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string | undefined'? function f3(a: number?) {} ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parseInvalidNullableTypes.ts:6:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parseInvalidNullableTypes.ts:6:10: Add a return type to the function declaration. ~~~~~~~ !!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? function f4(a: ?string) {} ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parseInvalidNullableTypes.ts:8:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parseInvalidNullableTypes.ts:8:10: Add a return type to the function declaration. ~~~~~~~ !!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? function f5(a: ?number) {} ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parseInvalidNullableTypes.ts:9:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parseInvalidNullableTypes.ts:9:10: Add a return type to the function declaration. ~~~~~~~ !!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseTypes.d.ts index 7834c12bf1e9d..b0c20fae6632e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parseTypes.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parseTypes.d.ts @@ -34,8 +34,8 @@ declare function g(s: string): invalid; /// [Errors] //// -parseTypes.ts(5,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -parseTypes.ts(6,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parseTypes.ts(5,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +parseTypes.ts(6,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. parseTypes.ts(8,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. Target signature provides too few arguments. Expected 1 or more, but got 0. parseTypes.ts(9,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. @@ -53,12 +53,12 @@ parseTypes.ts(11,1): error TS2322: Type '(s: string) => void' is not assignable var w = <{[x:number]: number; }>null function f() { return 3 }; ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parseTypes.ts:5:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parseTypes.ts:5:10: Add a return type to the function declaration. function g(s: string) { true }; ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parseTypes.ts:6:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parseTypes.ts:6:10: Add a return type to the function declaration. y=f; y=g; ~ diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName11.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName11.d.ts index a297585628126..08475b41450ad 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName11.d.ts @@ -17,7 +17,7 @@ declare class C { /// [Errors] //// parserComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -parserComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. parserComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. @@ -27,7 +27,7 @@ parserComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. ~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 parserComputedPropertyName11.ts:2:4: Add a return type to the method ~ !!! error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName12.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName12.d.ts index e37a6ff84420f..3208d29dafa84 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName12.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName12.d.ts @@ -16,7 +16,7 @@ declare class C { /// [Errors] //// -parserComputedPropertyName12.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName12.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. parserComputedPropertyName12.ts(2,5): error TS2304: Cannot find name 'e'. @@ -24,7 +24,7 @@ parserComputedPropertyName12.ts(2,5): error TS2304: Cannot find name 'e'. class C { [e]() { } ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 parserComputedPropertyName12.ts:2:4: Add a return type to the method ~ !!! error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName17.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName17.d.ts index 8a282e14fc214..ec80034de4616 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName17.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName17.d.ts @@ -13,7 +13,7 @@ declare var v: invalid; /// [Errors] //// parserComputedPropertyName17.ts(1,16): error TS2304: Cannot find name 'e'. -parserComputedPropertyName17.ts(1,19): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName17.ts(1,19): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ==== parserComputedPropertyName17.ts (2 errors) ==== @@ -21,5 +21,5 @@ parserComputedPropertyName17.ts(1,19): error TS9009: At least one accessor must ~ !!! error TS2304: Cannot find name 'e'. ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 parserComputedPropertyName17.ts:1:15: Add a type to parameter of the set accessor declaration \ No newline at end of file +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 parserComputedPropertyName17.ts:1:15: Add a type to parameter of the set accessor declaration. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts index 6e5a01f8b7a12..f605361de6b84 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts @@ -17,7 +17,7 @@ declare class C { /// [Errors] //// parserComputedPropertyName24.ts(2,10): error TS2304: Cannot find name 'e'. -parserComputedPropertyName24.ts(2,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName24.ts(2,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ==== parserComputedPropertyName24.ts (2 errors) ==== @@ -26,6 +26,6 @@ parserComputedPropertyName24.ts(2,13): error TS9009: At least one accessor must ~ !!! error TS2304: Cannot find name 'e'. ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 parserComputedPropertyName24.ts:2:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 parserComputedPropertyName24.ts:2:9: Add a type to parameter of the set accessor declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts index 1c127b6aaa740..21a0669ce57d8 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts @@ -20,7 +20,7 @@ declare class C { parserComputedPropertyName25.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName25.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName25.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +parserComputedPropertyName25.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. @@ -35,8 +35,8 @@ parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. ~ [e2] = 1 ~~~~~~~~~~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -!!! related TS9029 parserComputedPropertyName25.ts:3:5: Add a type annotation to the property [e] +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 parserComputedPropertyName25.ts:3:5: Add a type annotation to the property [e]. ~~ !!! error TS2304: Cannot find name 'e2'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts index a97cdaba143f6..02d375af29d59 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts @@ -22,7 +22,7 @@ declare class C { parserComputedPropertyName27.ts(3,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName27.ts(4,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName27.ts(4,9): error TS1005: ';' expected. -parserComputedPropertyName27.ts(4,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +parserComputedPropertyName27.ts(4,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. ==== parserComputedPropertyName27.ts (4 errors) ==== @@ -37,6 +37,6 @@ parserComputedPropertyName27.ts(4,11): error TS9012: Property must have an expli ~ !!! error TS1005: ';' expected. ~~~~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -!!! related TS9029 parserComputedPropertyName27.ts:4:11: Add a type annotation to the property number +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 parserComputedPropertyName27.ts:4:11: Add a type annotation to the property number. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts index 481057201fbee..0a751cd278536 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts @@ -22,7 +22,7 @@ declare class C { parserComputedPropertyName29.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName29.ts(3,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName29.ts(3,11): error TS2304: Cannot find name 'id'. -parserComputedPropertyName29.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +parserComputedPropertyName29.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. parserComputedPropertyName29.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. parserComputedPropertyName29.ts(4,6): error TS2304: Cannot find name 'e2'. @@ -38,8 +38,8 @@ parserComputedPropertyName29.ts(4,6): error TS2304: Cannot find name 'e2'. ~~ !!! error TS2304: Cannot find name 'id'. ~~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -!!! related TS9029 parserComputedPropertyName29.ts:3:5: Add a type annotation to the property [e] +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 parserComputedPropertyName29.ts:3:5: Add a type annotation to the property [e]. [e2]: number ~~~~ !!! 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/dte/parserComputedPropertyName3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName3.d.ts index ded9e00505590..14c4c66fa61a5 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName3.d.ts @@ -12,15 +12,15 @@ declare var v: invalid; /// [Errors] //// -parserComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. parserComputedPropertyName3.ts(1,12): error TS2304: Cannot find name 'e'. ==== parserComputedPropertyName3.ts (2 errors) ==== var v = { [e]() { } }; ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 parserComputedPropertyName3.ts:1:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 parserComputedPropertyName3.ts:1:5: Add a type annotation to the variable v. !!! related TS9034 parserComputedPropertyName3.ts:1:11: Add a return type to the method ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts index d641f0d03008f..70810c0a1f637 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts @@ -19,7 +19,7 @@ declare class C { /// [Errors] //// parserComputedPropertyName33.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName33.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +parserComputedPropertyName33.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. parserComputedPropertyName33.ts(4,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName33.ts(4,12): error TS1005: ';' expected. parserComputedPropertyName33.ts(5,1): error TS1128: Declaration or statement expected. @@ -34,8 +34,8 @@ parserComputedPropertyName33.ts(5,1): error TS1128: Declaration or statement exp ~ [e2]() { } ~~~~~~~~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -!!! related TS9029 parserComputedPropertyName33.ts:3:5: Add a type annotation to the property [e] +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 parserComputedPropertyName33.ts:3:5: Add a type annotation to the property [e]. ~~ !!! error TS2304: Cannot find name 'e2'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName38.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName38.d.ts index e13287d24cb20..ce72580edde08 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName38.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName38.d.ts @@ -16,7 +16,7 @@ declare class C { /// [Errors] //// -parserComputedPropertyName38.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName38.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. parserComputedPropertyName38.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. parserComputedPropertyName38.ts(2,6): error TS2304: Cannot find name 'public'. @@ -25,7 +25,7 @@ parserComputedPropertyName38.ts(2,6): error TS2304: Cannot find name 'public'. class C { [public]() { } ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 parserComputedPropertyName38.ts:2:5: Add a return type to the method ~~~~~~ !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName39.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName39.d.ts index bf44935d34134..4f7311552732b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName39.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName39.d.ts @@ -17,7 +17,7 @@ declare class C { /// [Errors] //// -parserComputedPropertyName39.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName39.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. parserComputedPropertyName39.ts(3,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. parserComputedPropertyName39.ts(3,6): error TS2304: Cannot find name 'public'. @@ -27,7 +27,7 @@ parserComputedPropertyName39.ts(3,6): error TS2304: Cannot find name 'public'. class C { [public]() { } ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 parserComputedPropertyName39.ts:3:5: Add a return type to the method ~~~~~~ !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName4.d.ts index 9f8b6dd170972..9e602a31b5b67 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName4.d.ts @@ -13,7 +13,7 @@ declare var v: invalid; /// [Errors] //// parserComputedPropertyName4.ts(1,15): error TS2378: A 'get' accessor must return a value. -parserComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. parserComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. @@ -22,7 +22,7 @@ parserComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. ~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 parserComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 parserComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName5.d.ts index f2a2260818bca..345b14da7df01 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName5.d.ts @@ -14,7 +14,7 @@ declare var v: invalid; parserComputedPropertyName5.ts(1,11): error TS1042: 'public' modifier cannot be used here. parserComputedPropertyName5.ts(1,22): error TS2378: A 'get' accessor must return a value. -parserComputedPropertyName5.ts(1,22): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName5.ts(1,22): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. parserComputedPropertyName5.ts(1,23): error TS2304: Cannot find name 'e'. @@ -25,7 +25,7 @@ parserComputedPropertyName5.ts(1,23): error TS2304: Cannot find name 'e'. ~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 parserComputedPropertyName5.ts:1:22: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 parserComputedPropertyName5.ts:1:22: Add a return type to the get accessor declaration. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts index 121293185219e..89864c8f15afe 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts @@ -13,7 +13,7 @@ declare var v: invalid; /// [Errors] //// parserComputedPropertyName6.ts(1,12): error TS2304: Cannot find name 'e'. -parserComputedPropertyName6.ts(1,19): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserComputedPropertyName6.ts(1,19): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserComputedPropertyName6.ts(1,20): error TS2304: Cannot find name 'e'. parserComputedPropertyName6.ts(1,24): error TS2304: Cannot find name 'e'. @@ -23,8 +23,8 @@ parserComputedPropertyName6.ts(1,24): error TS2304: Cannot find name 'e'. ~ !!! error TS2304: Cannot find name 'e'. ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 parserComputedPropertyName6.ts:1:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 parserComputedPropertyName6.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName7.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName7.d.ts index 89e2ec14a5082..3357e79ac740c 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName7.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName7.d.ts @@ -17,7 +17,7 @@ declare class C { /// [Errors] //// parserComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +parserComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. parserComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. @@ -27,8 +27,8 @@ parserComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -!!! related TS9029 parserComputedPropertyName7.ts:2:4: Add a type annotation to the property [e] +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 parserComputedPropertyName7.ts:2:4: Add a type annotation to the property [e]. ~ !!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName8.d.ts index 6e339bc1f2c65..6a91656a0d5e9 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName8.d.ts @@ -17,7 +17,7 @@ declare class C { /// [Errors] //// parserComputedPropertyName8.ts(2,11): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName8.ts(2,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +parserComputedPropertyName8.ts(2,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. parserComputedPropertyName8.ts(2,12): error TS2304: Cannot find name 'e'. @@ -27,8 +27,8 @@ parserComputedPropertyName8.ts(2,12): error TS2304: Cannot find name 'e'. ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -!!! related TS9029 parserComputedPropertyName8.ts:2:11: Add a type annotation to the property [e] +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 parserComputedPropertyName8.ts:2:11: Add a type annotation to the property [e]. ~ !!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName11.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName11.d.ts index 4950f8be22a65..10292880fd20b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName11.d.ts @@ -17,7 +17,7 @@ declare class C { /// [Errors] //// parserES5ComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -parserES5ComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserES5ComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. parserES5ComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. @@ -27,7 +27,7 @@ parserES5ComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. ~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 parserES5ComputedPropertyName11.ts:2:4: Add a return type to the method ~ !!! error TS2304: Cannot find name 'e'. diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName3.d.ts index f26de7ec5564a..1e5b1240f67ea 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName3.d.ts @@ -12,15 +12,15 @@ declare var v: invalid; /// [Errors] //// -parserES5ComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +parserES5ComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. parserES5ComputedPropertyName3.ts(1,12): error TS2304: Cannot find name 'e'. ==== parserES5ComputedPropertyName3.ts (2 errors) ==== var v = { [e]() { } }; ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 parserES5ComputedPropertyName3.ts:1:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 parserES5ComputedPropertyName3.ts:1:5: Add a type annotation to the variable v. !!! related TS9034 parserES5ComputedPropertyName3.ts:1:11: Add a return type to the method ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName4.d.ts index 2047025384fba..ad08e77874105 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName4.d.ts @@ -13,7 +13,7 @@ declare var v: invalid; /// [Errors] //// parserES5ComputedPropertyName4.ts(1,15): error TS2378: A 'get' accessor must return a value. -parserES5ComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +parserES5ComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. parserES5ComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. @@ -22,7 +22,7 @@ parserES5ComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. ~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 parserES5ComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 parserES5ComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName7.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName7.d.ts index 69fb15e962dfd..ec42854a17ada 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName7.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName7.d.ts @@ -17,7 +17,7 @@ declare class C { /// [Errors] //// parserES5ComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5ComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +parserES5ComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. parserES5ComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. @@ -27,8 +27,8 @@ parserES5ComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -!!! related TS9029 parserES5ComputedPropertyName7.ts:2:4: Add a type annotation to the property [e] +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 parserES5ComputedPropertyName7.ts:2:4: Add a type annotation to the property [e]. ~ !!! error TS2304: Cannot find name 'e'. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts index dc5ad0a8a3eee..4c97427f1ed06 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts @@ -15,7 +15,7 @@ declare function eval(): invalid; /// [Errors] //// parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. -parserStrictMode8.ts(2,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parserStrictMode8.ts(2,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. ==== parserStrictMode8.ts (2 errors) ==== @@ -24,6 +24,6 @@ parserStrictMode8.ts(2,10): error TS9007: Function must have an explicit return ~~~~ !!! error TS1100: Invalid use of 'eval' in strict mode. ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parserStrictMode8.ts:2:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parserStrictMode8.ts:2:10: Add a return type to the function declaration. } \ 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 index 1983adcf67284..8c398216dee4b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/renamingDestructuredPropertyInFunctionType.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/renamingDestructuredPropertyInFunctionType.d.ts @@ -135,55 +135,55 @@ renamingDestructuredPropertyInFunctionType.ts(5,17): error TS2842: 'string' is a 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(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(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(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(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,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,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,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,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,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,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,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,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(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(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(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) ==== @@ -205,23 +205,23 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter mu !!! 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 } +!!! 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 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 } +!!! 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] +!!! 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 @@ -238,37 +238,37 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter mu !!! 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 } +!!! 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 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 } +!!! 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] +!!! 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 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 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. @@ -277,22 +277,22 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter mu !!! 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 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 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 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. @@ -301,8 +301,8 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter mu !!! 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 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. @@ -311,8 +311,8 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter mu 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 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. @@ -320,8 +320,8 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter mu (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 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. @@ -329,8 +329,8 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter mu 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 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. @@ -339,18 +339,18 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter mu // 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 +!!! 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 +!!! 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 +!!! 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'. @@ -360,8 +360,8 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter mu 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 +!!! 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 = { @@ -371,37 +371,37 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter mu }; 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 +!!! 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 +!!! 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 +!!! 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 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 } +!!! 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 +!!! 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 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 } +!!! 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/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts index faf6e1c3736c3..24040c67c3452 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts @@ -454,16 +454,16 @@ staticPropertyNameConflicts.ts(228,16): error TS2699: Static property 'name' con staticPropertyNameConflicts.ts(234,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticName'. staticPropertyNameConflicts.ts(240,16): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. staticPropertyNameConflicts.ts(246,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticNameFn'. -staticPropertyNameConflicts.ts(246,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -staticPropertyNameConflicts.ts(247,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(246,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +staticPropertyNameConflicts.ts(247,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. staticPropertyNameConflicts.ts(252,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(253,16): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. staticPropertyNameConflicts.ts(259,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLength'. staticPropertyNameConflicts.ts(264,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(265,16): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. staticPropertyNameConflicts.ts(271,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLengthFn'. -staticPropertyNameConflicts.ts(271,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(271,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. @@ -472,24 +472,24 @@ staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prot staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. staticPropertyNameConflicts.ts(296,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. -staticPropertyNameConflicts.ts(296,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -staticPropertyNameConflicts.ts(297,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(296,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +staticPropertyNameConflicts.ts(297,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. staticPropertyNameConflicts.ts(302,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(303,16): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. staticPropertyNameConflicts.ts(309,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCaller'. staticPropertyNameConflicts.ts(314,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(315,16): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. staticPropertyNameConflicts.ts(321,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCallerFn'. -staticPropertyNameConflicts.ts(321,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -staticPropertyNameConflicts.ts(322,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(321,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +staticPropertyNameConflicts.ts(322,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. staticPropertyNameConflicts.ts(327,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(328,16): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. staticPropertyNameConflicts.ts(334,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArguments'. staticPropertyNameConflicts.ts(339,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(340,16): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. staticPropertyNameConflicts.ts(346,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArgumentsFn'. -staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== staticPropertyNameConflicts.ts (84 errors) ==== @@ -836,11 +836,11 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticNameFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:246:12: Add a return type to the method [FunctionPropertyNames.name]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:247:5: Add a return type to the method } @@ -879,11 +879,11 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLengthFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:271:12: Add a return type to the method [FunctionPropertyNames.length]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:272:5: Add a return type to the method } @@ -926,11 +926,11 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:296:12: Add a return type to the method [FunctionPropertyNames.prototype]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:297:5: Add a return type to the method } @@ -969,11 +969,11 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCallerFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:321:12: Add a return type to the method [FunctionPropertyNames.caller]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:322:5: Add a return type to the method } @@ -1012,10 +1012,10 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArgumentsFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:346:12: Add a return type to the method [FunctionPropertyNames.arguments]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:347:5: Add a return type to the method } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts index c0144415230f0..ee17de5adb43a 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts @@ -418,12 +418,12 @@ staticPropertyNameConflicts.ts(171,12): error TS2300: Duplicate identifier 'prot staticPropertyNameConflicts.ts(171,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous'. staticPropertyNameConflicts.ts(176,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. staticPropertyNameConflicts.ts(176,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous2'. -staticPropertyNameConflicts.ts(246,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -staticPropertyNameConflicts.ts(247,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(246,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +staticPropertyNameConflicts.ts(247,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. staticPropertyNameConflicts.ts(252,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(264,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(271,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(271,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. @@ -432,16 +432,16 @@ staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prot staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. staticPropertyNameConflicts.ts(296,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. -staticPropertyNameConflicts.ts(296,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -staticPropertyNameConflicts.ts(297,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(296,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +staticPropertyNameConflicts.ts(297,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. staticPropertyNameConflicts.ts(302,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(314,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(321,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -staticPropertyNameConflicts.ts(322,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(321,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +staticPropertyNameConflicts.ts(322,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. staticPropertyNameConflicts.ts(327,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(339,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== staticPropertyNameConflicts.ts (36 errors) ==== @@ -716,11 +716,11 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici export class ExportedStaticNameFn { static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:246:12: Add a return type to the method [FunctionPropertyNames.name]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:247:5: Add a return type to the method } @@ -751,11 +751,11 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici export class ExportedStaticLengthFn { static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:271:12: Add a return type to the method [FunctionPropertyNames.length]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:272:5: Add a return type to the method } @@ -798,11 +798,11 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:296:12: Add a return type to the method [FunctionPropertyNames.prototype]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:297:5: Add a return type to the method } @@ -833,11 +833,11 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici export class ExportedStaticCallerFn { static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:321:12: Add a return type to the method [FunctionPropertyNames.caller]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:322:5: Add a return type to the method } @@ -868,10 +868,10 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici export class ExportedStaticArgumentsFn { static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:346:12: Add a return type to the method [FunctionPropertyNames.arguments]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:347:5: Add a return type to the method } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess1.d.ts index 666944df37a2a..f4f5182fc74b4 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess1.d.ts @@ -30,21 +30,21 @@ declare class Bar extends Foo { /// [Errors] //// -superSymbolIndexedAccess1.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -superSymbolIndexedAccess1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -superSymbolIndexedAccess1.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +superSymbolIndexedAccess1.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +superSymbolIndexedAccess1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +superSymbolIndexedAccess1.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== superSymbolIndexedAccess1.ts (3 errors) ==== var symbol = Symbol.for('myThing'); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 superSymbolIndexedAccess1.ts:1:5: Add a type annotation to the variable symbol +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 superSymbolIndexedAccess1.ts:1:5: Add a type annotation to the variable symbol. class Foo { [symbol]() { ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 superSymbolIndexedAccess1.ts:4:5: Add a return type to the method return 0; } @@ -53,7 +53,7 @@ superSymbolIndexedAccess1.ts(10,5): error TS9008: Method must have an explicit r class Bar extends Foo { [symbol]() { ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 superSymbolIndexedAccess1.ts:10:5: Add a return type to the method return super[symbol](); } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess3.d.ts index 3d454c80e5204..4294d3d7e3dc7 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess3.d.ts @@ -30,22 +30,22 @@ declare class Bar extends Foo { /// [Errors] //// -superSymbolIndexedAccess3.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -superSymbolIndexedAccess3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -superSymbolIndexedAccess3.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +superSymbolIndexedAccess3.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +superSymbolIndexedAccess3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +superSymbolIndexedAccess3.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. superSymbolIndexedAccess3.ts(11,22): error TS2538: Type 'typeof Bar' cannot be used as an index type. ==== superSymbolIndexedAccess3.ts (4 errors) ==== var symbol = Symbol.for('myThing'); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 superSymbolIndexedAccess3.ts:1:5: Add a type annotation to the variable symbol +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 superSymbolIndexedAccess3.ts:1:5: Add a type annotation to the variable symbol. class Foo { [symbol]() { ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 superSymbolIndexedAccess3.ts:4:5: Add a return type to the method return 0; } @@ -54,7 +54,7 @@ superSymbolIndexedAccess3.ts(11,22): error TS2538: Type 'typeof Bar' cannot be u class Bar extends Foo { [symbol]() { ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 superSymbolIndexedAccess3.ts:10:5: Add a return type to the method return super[Bar](); ~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess4.d.ts index ca9afef113867..850bc938269d9 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess4.d.ts @@ -21,21 +21,21 @@ declare class Bar { /// [Errors] //// -superSymbolIndexedAccess4.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -superSymbolIndexedAccess4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +superSymbolIndexedAccess4.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +superSymbolIndexedAccess4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. superSymbolIndexedAccess4.ts(5,16): error TS2335: 'super' can only be referenced in a derived class. ==== superSymbolIndexedAccess4.ts (3 errors) ==== var symbol = Symbol.for('myThing'); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 superSymbolIndexedAccess4.ts:1:5: Add a type annotation to the variable symbol +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 superSymbolIndexedAccess4.ts:1:5: Add a type annotation to the variable symbol. class Bar { [symbol]() { ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 superSymbolIndexedAccess4.ts:4:5: Add a return type to the method return super[symbol](); ~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess5.d.ts index 7afe98edbb276..7f0c57725203c 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess5.d.ts @@ -30,8 +30,8 @@ declare class Bar extends Foo { /// [Errors] //// -superSymbolIndexedAccess5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -superSymbolIndexedAccess5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +superSymbolIndexedAccess5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +superSymbolIndexedAccess5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== superSymbolIndexedAccess5.ts (2 errors) ==== @@ -40,7 +40,7 @@ superSymbolIndexedAccess5.ts(10,5): error TS9008: Method must have an explicit r class Foo { [symbol]() { ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 superSymbolIndexedAccess5.ts:4:5: Add a return type to the method return 0; } @@ -49,7 +49,7 @@ superSymbolIndexedAccess5.ts(10,5): error TS9008: Method must have an explicit r class Bar extends Foo { [symbol]() { ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 superSymbolIndexedAccess5.ts:10:5: Add a return type to the method return super[symbol](); } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess6.d.ts index 158ea1b3a2561..558bbd0438da1 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess6.d.ts @@ -30,8 +30,8 @@ declare class Bar extends Foo { /// [Errors] //// -superSymbolIndexedAccess6.ts(4,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -superSymbolIndexedAccess6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +superSymbolIndexedAccess6.ts(4,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +superSymbolIndexedAccess6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== superSymbolIndexedAccess6.ts (2 errors) ==== @@ -40,7 +40,7 @@ superSymbolIndexedAccess6.ts(10,12): error TS9008: Method must have an explicit class Foo { static [symbol]() { ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 superSymbolIndexedAccess6.ts:4:12: Add a return type to the method return 0; } @@ -49,7 +49,7 @@ superSymbolIndexedAccess6.ts(10,12): error TS9008: Method must have an explicit class Bar extends Foo { static [symbol]() { ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 superSymbolIndexedAccess6.ts:10:12: Add a return type to the method return super[symbol](); } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolDeclarationEmit12.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolDeclarationEmit12.d.ts index 2b0351fcbd7a1..7bbb9488c783d 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolDeclarationEmit12.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolDeclarationEmit12.d.ts @@ -34,9 +34,9 @@ declare namespace M { /// [Errors] //// -symbolDeclarationEmit12.ts(5,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +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(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]'. @@ -47,7 +47,7 @@ symbolDeclarationEmit12.ts(10,13): error TS2300: Duplicate identifier '[Symbol.t [Symbol.iterator]: I; [Symbol.toPrimitive](x: I) { } ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! 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 @@ -56,8 +56,8 @@ symbolDeclarationEmit12.ts(10,13): error TS2300: Duplicate identifier '[Symbol.t ~~~~~~~~~~~~~~~~~~~~ !!! 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 +!!! 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/dte/symbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts index 9df447fdfae12..eaec939561c51 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts @@ -20,8 +20,8 @@ declare var x: invalid; /// [Errors] //// -symbolProperty1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -symbolProperty1.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +symbolProperty1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +symbolProperty1.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ==== symbolProperty1.ts (2 errors) ==== @@ -30,13 +30,13 @@ symbolProperty1.ts(5,9): error TS9009: At least one accessor must have an explic [s]: 0, [s]() { }, ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x. !!! related TS9034 symbolProperty1.ts:4:5: Add a return type to the method get [s]() { ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 symbolProperty1.ts:5:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 symbolProperty1.ts:5:9: Add a return type to the get accessor declaration. return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts index 3e30d1a24524a..65215f66fdc35 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts @@ -20,27 +20,27 @@ declare var x: invalid; /// [Errors] //// -symbolProperty2.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -symbolProperty2.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -symbolProperty2.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +symbolProperty2.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +symbolProperty2.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +symbolProperty2.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ==== symbolProperty2.ts (3 errors) ==== var s = Symbol(); ~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 symbolProperty2.ts:1:5: Add a type annotation to the variable s +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 symbolProperty2.ts:1:5: Add a type annotation to the variable s. var x = { [s]: 0, [s]() { }, ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x. !!! related TS9034 symbolProperty2.ts:4:5: Add a return type to the method get [s]() { ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 symbolProperty2.ts:5:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 symbolProperty2.ts:5:9: Add a return type to the get accessor declaration. return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts index 5c7f075d1ae80..7b20b6d90809a 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts @@ -20,19 +20,19 @@ declare var x: invalid; /// [Errors] //// -symbolProperty3.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +symbolProperty3.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. symbolProperty3.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. symbolProperty3.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +symbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. symbolProperty3.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty3.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +symbolProperty3.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ==== symbolProperty3.ts (6 errors) ==== var s = Symbol; ~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 symbolProperty3.ts:1:5: Add a type annotation to the variable s +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 symbolProperty3.ts:1:5: Add a type annotation to the variable s. var x = { [s]: 0, ~~~ @@ -41,15 +41,15 @@ symbolProperty3.ts(5,9): error TS9009: At least one accessor must have an explic ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x. !!! related TS9034 symbolProperty3.ts:4:5: Add a return type to the method get [s]() { ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 symbolProperty3.ts:5:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 symbolProperty3.ts:5:9: Add a return type to the get accessor declaration. return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/thisTypeErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/thisTypeErrors.d.ts index 7756a94d61b5f..b5f3e4c4e82e0 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/thisTypeErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/thisTypeErrors.d.ts @@ -145,10 +145,10 @@ thisTypeErrors.ts(29,19): error TS2526: A 'this' type is available only in a non thisTypeErrors.ts(29,26): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeErrors.ts(35,19): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeErrors.ts(36,20): error TS2331: 'this' cannot be referenced in a module or namespace body. -thisTypeErrors.ts(36,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +thisTypeErrors.ts(36,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. thisTypeErrors.ts(41,14): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeErrors.ts(41,21): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(45,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +thisTypeErrors.ts(45,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. thisTypeErrors.ts(46,23): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeErrors.ts(46,30): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeErrors.ts(50,18): error TS2526: A 'this' type is available only in a non-static member of a class or interface. @@ -241,8 +241,8 @@ thisTypeErrors.ts(50,25): error TS2526: A 'this' type is available only in a non ~~~~ !!! error TS2331: 'this' cannot be referenced in a module or namespace body. ~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 thisTypeErrors.ts:36:16: Add a type annotation to the variable y +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 thisTypeErrors.ts:36:16: Add a type annotation to the variable y. } class C3 { @@ -257,7 +257,7 @@ thisTypeErrors.ts(50,25): error TS2526: A 'this' type is available only in a non } f() { ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 thisTypeErrors.ts:45:5: Add a return type to the method function g(x: this): this { ~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/dte/thisTypeInAccessors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/thisTypeInAccessors.d.ts index 17696500dea73..b51412f29ca58 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/thisTypeInAccessors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/thisTypeInAccessors.d.ts @@ -77,12 +77,12 @@ thisTypeInAccessors.ts(8,11): error TS2784: 'get' and 'set' accessors cannot dec thisTypeInAccessors.ts(9,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. thisTypeInAccessors.ts(13,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. thisTypeInAccessors.ts(19,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(23,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +thisTypeInAccessors.ts(23,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. thisTypeInAccessors.ts(23,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. thisTypeInAccessors.ts(24,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. thisTypeInAccessors.ts(29,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. thisTypeInAccessors.ts(30,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(34,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +thisTypeInAccessors.ts(34,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ==== thisTypeInAccessors.ts (10 errors) ==== @@ -118,9 +118,9 @@ thisTypeInAccessors.ts(34,9): error TS9009: At least one accessor must have an e n: 16, get x(this: Foo) { return this.n }, ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 thisTypeInAccessors.ts:24:9: Add a type to parameter of the set accessor declaration -!!! related TS9032 thisTypeInAccessors.ts:23:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 thisTypeInAccessors.ts:24:9: Add a type to parameter of the set accessor declaration. +!!! related TS9032 thisTypeInAccessors.ts:23:9: Add a return type to the get accessor declaration. ~~~~~~~~~ !!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. set x(this, n) { this.n = n; } @@ -141,7 +141,7 @@ thisTypeInAccessors.ts(34,9): error TS9009: At least one accessor must have an e n = 21; get x() { return this.n } // inside a class, so already correct ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 thisTypeInAccessors.ts:34:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 thisTypeInAccessors.ts:34:9: Add a return type to the get accessor declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment32.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment32.d.ts index 25b97f9eda029..253ff44390d5e 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment32.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment32.d.ts @@ -55,7 +55,7 @@ declare namespace ExpandoMerge { /// [Errors] //// -expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. expando.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. expando.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. expando.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. @@ -66,7 +66,7 @@ expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number expando.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. expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. expando.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. -expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. @@ -74,8 +74,8 @@ ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different fil ==== expando.ts (12 errors) ==== function ExpandoMerge(n: number) { ~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 expando.ts:1:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 expando.ts:1:10: Add a return type to the function declaration. return n; } ExpandoMerge.p1 = 111 @@ -110,8 +110,8 @@ ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different fil !!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n. ==== ns.ts (2 errors) ==== namespace ExpandoMerge { diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment33.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment33.d.ts index 5c88407924421..8131bf586bf02 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment33.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment33.d.ts @@ -57,7 +57,7 @@ declare namespace ExpandoMerge { /// [Errors] //// -expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. expando.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. expando.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. expando.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. @@ -68,7 +68,7 @@ expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number expando.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. expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. expando.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. -expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. @@ -95,8 +95,8 @@ ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different fil ==== expando.ts (12 errors) ==== function ExpandoMerge(n: number) { ~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 expando.ts:1:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 expando.ts:1:10: Add a return type to the function declaration. return n; } ExpandoMerge.p1 = 111 @@ -131,7 +131,7 @@ ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different fil !!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n. \ 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 index 6e338f6aabd74..825cefac8f643 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives11.d.ts @@ -23,15 +23,15 @@ export declare const bar: invalid; /// [Errors] //// -/mod2.ts(2,20): error TS9010: Variable must have an explicit type annotation 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 +!!! 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 } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives13.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives13.d.ts index b6a8191fa7d14..5674e3a755243 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives13.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives13.d.ts @@ -26,13 +26,13 @@ export interface A { /// [Errors] //// -/app.ts(1,23): error TS9025: Reference directives are not supported in isolated declaration mode. +/app.ts(1,23): error TS9025: Reference directives are not supported with --isolatedDeclarations. ==== /app.ts (1 errors) ==== /// ~~~ -!!! error TS9025: Reference directives are not supported in isolated declaration mode. +!!! error TS9025: Reference directives are not supported with --isolatedDeclarations. import {$} from "./ref"; export interface A { x: () => typeof $ diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives5.d.ts index 200fe2d316cba..48ac75f180737 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives5.d.ts @@ -25,13 +25,13 @@ export interface A { /// [Errors] //// -/app.ts(1,23): error TS9025: Reference directives are not supported in isolated declaration mode. +/app.ts(1,23): error TS9025: Reference directives are not supported with --isolatedDeclarations. ==== /app.ts (1 errors) ==== /// ~~~ -!!! error TS9025: Reference directives are not supported in isolated declaration mode. +!!! error TS9025: Reference directives are not supported with --isolatedDeclarations. import {$} from "./ref"; export interface A { x: typeof $; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts index 268cef5306535..0dd9ed42dba44 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts @@ -22,15 +22,15 @@ export declare const bar: invalid; /// [Errors] //// -/mod2.ts(2,20): error TS9010: Variable must have an explicit type annotation 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 +!!! 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 } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts index a077b178d2b94..aa1e487bf704f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts @@ -59,7 +59,7 @@ type T4 = { typeUsedAsTypeLiteralIndex.ts(3,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. typeUsedAsTypeLiteralIndex.ts(3,6): error TS2690: 'K' only refers to a type, but is being used as a value here. Did you mean to use 'P in K'? -typeUsedAsTypeLiteralIndex.ts(6,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +typeUsedAsTypeLiteralIndex.ts(6,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. typeUsedAsTypeLiteralIndex.ts(13,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. typeUsedAsTypeLiteralIndex.ts(13,6): error TS2690: 'K2' only refers to a type, but is being used as a value here. Did you mean to use 'K in K2'? typeUsedAsTypeLiteralIndex.ts(18,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. @@ -80,8 +80,8 @@ typeUsedAsTypeLiteralIndex.ts(23,6): error TS2693: 'K4' only refers to a type, b const K1 = Symbol(); ~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 typeUsedAsTypeLiteralIndex.ts:6:7: Add a type annotation to the variable K1 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 typeUsedAsTypeLiteralIndex.ts:6:7: Add a type annotation to the variable K1. type T1 = { [K1]: number; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5For-ofTypeCheck10.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5For-ofTypeCheck10.d.ts index 67e29b37c9f41..e739b817d61b3 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5For-ofTypeCheck10.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5For-ofTypeCheck10.d.ts @@ -27,7 +27,7 @@ declare class StringIterator { /// [Errors] //// -ES5For-ofTypeCheck10.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +ES5For-ofTypeCheck10.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ES5For-ofTypeCheck10.ts(9,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an array type or a string type. @@ -37,7 +37,7 @@ ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an ar class StringIterator { next() { ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 ES5For-ofTypeCheck10.ts:3:5: Add a return type to the method return { done: true, diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts index ef19d5ab8a32b..7d3b6b0cdb9d6 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts @@ -25,7 +25,7 @@ declare var obj: invalid; /// [Errors] //// -ES5SymbolProperty1.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +ES5SymbolProperty1.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== ES5SymbolProperty1.ts (1 errors) ==== @@ -37,8 +37,8 @@ ES5SymbolProperty1.ts(7,5): error TS9014: Computed properties must be number or var obj = { [Symbol.foo]: 0 ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 ES5SymbolProperty1.ts:6:5: Add a type annotation to the variable obj +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 ES5SymbolProperty1.ts:6:5: Add a type annotation to the variable obj. } obj[Symbol.foo]; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty2.d.ts index 83abff8ae47e8..4e270425cd42b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty2.d.ts @@ -24,7 +24,7 @@ declare namespace M { /// [Errors] //// -ES5SymbolProperty2.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +ES5SymbolProperty2.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ES5SymbolProperty2.ts(10,11): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. @@ -35,7 +35,7 @@ ES5SymbolProperty2.ts(10,11): error TS2585: 'Symbol' only refers to a type, but export class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } (new C)[Symbol.iterator]; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty3.d.ts index b112dbaabf8d2..36609d47f9027 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty3.d.ts @@ -20,7 +20,7 @@ declare class C { /// [Errors] //// -ES5SymbolProperty3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +ES5SymbolProperty3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== ES5SymbolProperty3.ts (1 errors) ==== @@ -29,7 +29,7 @@ ES5SymbolProperty3.ts(4,5): error TS9014: Computed properties must be number or class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } (new C)[Symbol.iterator] \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty4.d.ts index ba4cead4a7d90..fab1b107396ff 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty4.d.ts @@ -22,7 +22,7 @@ declare class C { /// [Errors] //// -ES5SymbolProperty4.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +ES5SymbolProperty4.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== ES5SymbolProperty4.ts (1 errors) ==== @@ -31,7 +31,7 @@ ES5SymbolProperty4.ts(4,5): error TS9014: Computed properties must be number or class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } (new C)[Symbol.iterator] \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty5.d.ts index bb657a4b225b0..b78624cf67140 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty5.d.ts @@ -22,7 +22,7 @@ declare class C { /// [Errors] //// -ES5SymbolProperty5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +ES5SymbolProperty5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== ES5SymbolProperty5.ts (1 errors) ==== @@ -31,7 +31,7 @@ ES5SymbolProperty5.ts(4,5): error TS9014: Computed properties must be number or class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } (new C)[Symbol.iterator](0) // Should error \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty7.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty7.d.ts index 78bc2c8ddf573..bc59e366471b5 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty7.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty7.d.ts @@ -22,7 +22,7 @@ declare class C { /// [Errors] //// -ES5SymbolProperty7.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +ES5SymbolProperty7.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== ES5SymbolProperty7.ts (1 errors) ==== @@ -31,7 +31,7 @@ ES5SymbolProperty7.ts(4,5): error TS9014: Computed properties must be number or class C { [Symbol.iterator]() { } ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } (new C)[Symbol.iterator] \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts index 425131cb17f92..f230d3057a3bf 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts @@ -12,22 +12,22 @@ declare var v: invalid; /// [Errors] //// -FunctionDeclaration8_es6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +FunctionDeclaration8_es6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. FunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'yield'. FunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. -FunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations +FunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. ==== FunctionDeclaration8_es6.ts (4 errors) ==== var v = { [yield]: foo } ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 FunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 FunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v. ~~~~~ !!! error TS2304: Cannot find name 'yield'. ~~~ !!! error TS2304: Cannot find name 'foo'. ~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 FunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v -!!! related TS9035 FunctionDeclaration8_es6.ts:1:20: Add a type assertion to this expression to make type type explicit \ No newline at end of file +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 FunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v. +!!! related TS9035 FunctionDeclaration8_es6.ts:1:20: Add a type assertion to this expression to make type type explicit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/arrayFind.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/arrayFind.d.ts index ce2497d1c972b..56c066624b369 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/arrayFind.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/arrayFind.d.ts @@ -26,7 +26,7 @@ declare const readonlyFoundNumber: number | undefined; /// [Errors] //// -arrayFind.ts(6,42): error TS9017: Only const arrays can be inferred with --isolatedDeclarations +arrayFind.ts(6,42): error TS9017: Only const arrays can be inferred with --isolatedDeclarations. ==== arrayFind.ts (1 errors) ==== @@ -37,8 +37,8 @@ arrayFind.ts(6,42): error TS9017: Only const arrays can be inferred with --isola const arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations -!!! related TS9027 arrayFind.ts:6:7: Add a type annotation to the variable arrayOfStringsNumbersAndBooleans +!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations. +!!! related TS9027 arrayFind.ts:6:7: Add a type annotation to the variable arrayOfStringsNumbersAndBooleans. const foundNumber: number | undefined = arrayOfStringsNumbersAndBooleans.find(isNumber); const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans as ReadonlyArray; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asOperator1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asOperator1.d.ts index b1350e5c66bee..ee3b2efd33857 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/asOperator1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/asOperator1.d.ts @@ -24,7 +24,7 @@ declare var j: string | number; /// [Errors] //// -asOperator1.ts(3,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +asOperator1.ts(3,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ==== asOperator1.ts (1 errors) ==== @@ -32,8 +32,8 @@ asOperator1.ts(3,9): error TS9010: Variable must have an explicit type annotatio var x = undefined as number; var y = (null as string).length; ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 asOperator1.ts:3:5: Add a type annotation to the variable y +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 asOperator1.ts:3:5: Add a type annotation to the variable y. var z = Date as any as string; // Should parse as a union type, not a bitwise 'or' of (32 as number) and 'string' diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts index 7010f774e445a..636db8e6c11ee 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts @@ -12,22 +12,22 @@ declare var v: invalid; /// [Errors] //// -asyncFunctionDeclaration8_es2017.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +asyncFunctionDeclaration8_es2017.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. asyncFunctionDeclaration8_es2017.ts(1,12): error TS2304: Cannot find name 'await'. asyncFunctionDeclaration8_es2017.ts(1,20): error TS2304: Cannot find name 'foo'. -asyncFunctionDeclaration8_es2017.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations +asyncFunctionDeclaration8_es2017.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. ==== asyncFunctionDeclaration8_es2017.ts (4 errors) ==== var v = { [await]: foo } ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 asyncFunctionDeclaration8_es2017.ts:1:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 asyncFunctionDeclaration8_es2017.ts:1:5: Add a type annotation to the variable v. ~~~~~ !!! error TS2304: Cannot find name 'await'. ~~~ !!! error TS2304: Cannot find name 'foo'. ~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 asyncFunctionDeclaration8_es2017.ts:1:5: Add a type annotation to the variable v -!!! related TS9035 asyncFunctionDeclaration8_es2017.ts:1:20: Add a type assertion to this expression to make type type explicit \ No newline at end of file +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 asyncFunctionDeclaration8_es2017.ts:1:5: Add a type annotation to the variable v. +!!! related TS9035 asyncFunctionDeclaration8_es2017.ts:1:20: Add a type assertion to this expression to make type type explicit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts index 4308699e91939..7b57671bc4687 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts @@ -12,22 +12,22 @@ declare var v: invalid; /// [Errors] //// -asyncFunctionDeclaration8_es5.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +asyncFunctionDeclaration8_es5.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. asyncFunctionDeclaration8_es5.ts(1,12): error TS2304: Cannot find name 'await'. asyncFunctionDeclaration8_es5.ts(1,20): error TS2304: Cannot find name 'foo'. -asyncFunctionDeclaration8_es5.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations +asyncFunctionDeclaration8_es5.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. ==== asyncFunctionDeclaration8_es5.ts (4 errors) ==== var v = { [await]: foo } ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 asyncFunctionDeclaration8_es5.ts:1:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 asyncFunctionDeclaration8_es5.ts:1:5: Add a type annotation to the variable v. ~~~~~ !!! error TS2304: Cannot find name 'await'. ~~~ !!! error TS2304: Cannot find name 'foo'. ~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 asyncFunctionDeclaration8_es5.ts:1:5: Add a type annotation to the variable v -!!! related TS9035 asyncFunctionDeclaration8_es5.ts:1:20: Add a type assertion to this expression to make type type explicit \ No newline at end of file +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 asyncFunctionDeclaration8_es5.ts:1:5: Add a type annotation to the variable v. +!!! related TS9035 asyncFunctionDeclaration8_es5.ts:1:20: Add a type assertion to this expression to make type type explicit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts index 89b6c20e65def..e04a9619c23aa 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts @@ -12,22 +12,22 @@ declare var v: invalid; /// [Errors] //// -asyncFunctionDeclaration8_es6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +asyncFunctionDeclaration8_es6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. asyncFunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'await'. asyncFunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. -asyncFunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations +asyncFunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. ==== asyncFunctionDeclaration8_es6.ts (4 errors) ==== var v = { [await]: foo } ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 asyncFunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 asyncFunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v. ~~~~~ !!! error TS2304: Cannot find name 'await'. ~~~ !!! error TS2304: Cannot find name 'foo'. ~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 asyncFunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v -!!! related TS9035 asyncFunctionDeclaration8_es6.ts:1:20: Add a type assertion to this expression to make type type explicit \ No newline at end of file +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 asyncFunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v. +!!! related TS9035 asyncFunctionDeclaration8_es6.ts:1:20: Add a type assertion to this expression to make type type explicit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts index 6d313ea58d204..d34b803391185 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts @@ -56,15 +56,15 @@ declare const c: invalid; a.ts(2,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. a.ts(8,11): error TS2538: Type '1n' cannot be used as an index type. a.ts(14,1): error TS2322: Type 'bigint' is not assignable to type 'string | number | symbol'. -a.ts(18,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +a.ts(18,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. a.ts(19,12): error TS2538: Type 'bigint' cannot be used as an index type. b.ts(2,12): error TS1136: Property assignment expected. b.ts(2,14): error TS1005: ';' expected. b.ts(2,19): error TS1128: Declaration or statement expected. b.ts(3,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -b.ts(3,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +b.ts(3,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -b.ts(4,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +b.ts(4,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== a.ts (5 errors) ==== @@ -93,8 +93,8 @@ b.ts(4,12): error TS9014: Computed properties must be number or string literals, const bigNum: bigint = 0n; const typedArray = new Uint8Array(3); ~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 a.ts:18:7: Add a type annotation to the variable typedArray +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 a.ts:18:7: Add a type annotation to the variable typedArray. typedArray[bigNum] = 0xAA; // should error ~~~~~~ !!! error TS2538: Type 'bigint' cannot be used as an index type. @@ -116,12 +116,12 @@ b.ts(4,12): error TS9014: Computed properties must be number or string literals, ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 b.ts:3:7: Add a type annotation to the variable b +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 b.ts:3:7: Add a type annotation to the variable b. const c = {[bigNum]: 789}; ~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 b.ts:4:7: Add a type annotation to the variable c +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 b.ts:4:7: Add a type annotation to the variable c. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/booleanFilterAnyArray.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/booleanFilterAnyArray.d.ts index 0732a891ce180..075b8ce9a6868 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/booleanFilterAnyArray.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/booleanFilterAnyArray.d.ts @@ -61,7 +61,7 @@ declare var foos: boolean[]; /// [Errors] //// -booleanFilterAnyArray.ts(20,11): error TS9017: Only const arrays can be inferred with --isolatedDeclarations +booleanFilterAnyArray.ts(20,11): error TS9017: Only const arrays can be inferred with --isolatedDeclarations. ==== booleanFilterAnyArray.ts (1 errors) ==== @@ -86,8 +86,8 @@ booleanFilterAnyArray.ts(20,11): error TS9017: Only const arrays can be inferred var foo = [{ name: 'x' }] ~~~~~~~~~~~~~~~ -!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations -!!! related TS9027 booleanFilterAnyArray.ts:20:5: Add a type annotation to the variable foo +!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations. +!!! related TS9027 booleanFilterAnyArray.ts:20:5: Add a type annotation to the variable foo. var foor: Array<{name: string}> var foor = foo.filter(x => x.name) var foos: Array diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/capturedParametersInInitializers1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/capturedParametersInInitializers1.d.ts index 8607ba8e3fd23..953533d3c9a82 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/capturedParametersInInitializers1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/capturedParametersInInitializers1.d.ts @@ -62,27 +62,27 @@ declare function foo9(y?: invalid, z?: number): invalid; /// [Errors] //// -capturedParametersInInitializers1.ts(2,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(2,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(7,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(7,19): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(12,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(18,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(2,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(2,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(7,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(7,19): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(12,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(18,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. capturedParametersInInitializers1.ts(18,20): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. -capturedParametersInInitializers1.ts(18,20): error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations -capturedParametersInInitializers1.ts(22,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(22,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +capturedParametersInInitializers1.ts(18,20): error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. +capturedParametersInInitializers1.ts(22,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(22,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. capturedParametersInInitializers1.ts(22,26): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. -capturedParametersInInitializers1.ts(26,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(26,19): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(30,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(30,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(34,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(38,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(38,20): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -capturedParametersInInitializers1.ts(38,20): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +capturedParametersInInitializers1.ts(26,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(26,19): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(30,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(30,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(34,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(38,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(38,20): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +capturedParametersInInitializers1.ts(38,20): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. @@ -90,58 +90,58 @@ capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot // ok - usage is deferred function foo1(y = class {c = x}, x = 1) { ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 capturedParametersInInitializers1.ts:2:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 capturedParametersInInitializers1.ts:2:10: Add a return type to the function declaration. ~~~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 capturedParametersInInitializers1.ts:2:15: Add a type annotation to the parameter y +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 capturedParametersInInitializers1.ts:2:15: Add a type annotation to the parameter y. new y().c; } // ok - used in file function foo2(y = function(x: typeof z) {}, z = 1) { ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 capturedParametersInInitializers1.ts:7:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 capturedParametersInInitializers1.ts:7:10: Add a return type to the function declaration. ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9028 capturedParametersInInitializers1.ts:7:15: Add a type annotation to the parameter y -!!! related TS9030 capturedParametersInInitializers1.ts:7:19: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 capturedParametersInInitializers1.ts:7:15: Add a type annotation to the parameter y. +!!! related TS9030 capturedParametersInInitializers1.ts:7:19: Add a return type to the function expression. } // ok -used in type let a; ~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 capturedParametersInInitializers1.ts:12:5: Add a type annotation to the variable a +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 capturedParametersInInitializers1.ts:12:5: Add a type annotation to the variable a. function foo3(y = { x: a }, z = 1) { ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 capturedParametersInInitializers1.ts:13:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 capturedParametersInInitializers1.ts:13:10: Add a return type to the function declaration. } // error - used before declaration function foo4(y = {z}, z = 1) { ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 capturedParametersInInitializers1.ts:18:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 capturedParametersInInitializers1.ts:18:10: Add a return type to the function declaration. ~ !!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. ~ -!!! error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations -!!! related TS9028 capturedParametersInInitializers1.ts:18:15: Add a type annotation to the parameter y +!!! error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. +!!! related TS9028 capturedParametersInInitializers1.ts:18:15: Add a type annotation to the parameter y. } // error - used before declaration, IIFEs are inlined function foo5(y = (() => z)(), z = 1) { ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 capturedParametersInInitializers1.ts:22:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 capturedParametersInInitializers1.ts:22:10: Add a return type to the function declaration. ~~~~~~~~~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 capturedParametersInInitializers1.ts:22:15: Add a type annotation to the parameter y +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 capturedParametersInInitializers1.ts:22:15: Add a type annotation to the parameter y. ~ !!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. } @@ -149,46 +149,46 @@ capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot // ok - IIFE inside another function function foo6(y = () => (() => z)(), z = 1) { ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 capturedParametersInInitializers1.ts:26:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 capturedParametersInInitializers1.ts:26:10: Add a return type to the function declaration. ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9028 capturedParametersInInitializers1.ts:26:15: Add a type annotation to the parameter y -!!! related TS9030 capturedParametersInInitializers1.ts:26:19: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 capturedParametersInInitializers1.ts:26:15: Add a type annotation to the parameter y. +!!! related TS9030 capturedParametersInInitializers1.ts:26:19: Add a return type to the function expression. } // ok - used inside immediately invoked generator function function foo7(y = (function*() {yield z})(), z = 1) { ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 capturedParametersInInitializers1.ts:30:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 capturedParametersInInitializers1.ts:30:10: Add a return type to the function declaration. ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 capturedParametersInInitializers1.ts:30:15: Add a type annotation to the parameter y +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 capturedParametersInInitializers1.ts:30:15: Add a type annotation to the parameter y. } // ok - used inside immediately invoked async function function foo8(y = (async () => z)(), z = 1) { ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 capturedParametersInInitializers1.ts:34:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 capturedParametersInInitializers1.ts:34:10: Add a return type to the function declaration. ~~~~~~~~~~~~~~~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 capturedParametersInInitializers1.ts:34:15: Add a type annotation to the parameter y +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 capturedParametersInInitializers1.ts:34:15: Add a type annotation to the parameter y. } // error - used as computed name of method function foo9(y = {[z]() { return z; }}, z = 1) { ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 capturedParametersInInitializers1.ts:38:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 capturedParametersInInitializers1.ts:38:10: Add a return type to the function declaration. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9028 capturedParametersInInitializers1.ts:38:15: Add a type annotation to the parameter y +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9028 capturedParametersInInitializers1.ts:38:15: Add a type annotation to the parameter y. !!! related TS9034 capturedParametersInInitializers1.ts:38:20: Add a return type to the method ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9028 capturedParametersInInitializers1.ts:38:15: Add a type annotation to the parameter y +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9028 capturedParametersInInitializers1.ts:38:15: Add a type annotation to the parameter y. ~ !!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts index 3343efa334a47..2da6b8c81dc21 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts @@ -165,17 +165,17 @@ declare namespace mglo5 { /// [Errors] //// -complicatedPrivacy.ts(5,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -complicatedPrivacy.ts(7,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +complicatedPrivacy.ts(5,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +complicatedPrivacy.ts(7,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. complicatedPrivacy.ts(11,24): error TS1054: A 'get' accessor cannot have parameters. -complicatedPrivacy.ts(18,20): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -complicatedPrivacy.ts(24,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -complicatedPrivacy.ts(33,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +complicatedPrivacy.ts(18,20): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +complicatedPrivacy.ts(24,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +complicatedPrivacy.ts(33,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. complicatedPrivacy.ts(35,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. complicatedPrivacy.ts(35,6): error TS2693: 'number' only refers to a type, but is being used as a value here. -complicatedPrivacy.ts(40,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +complicatedPrivacy.ts(40,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported member 'i6'. -complicatedPrivacy.ts(74,13): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +complicatedPrivacy.ts(74,13): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== complicatedPrivacy.ts (11 errors) ==== @@ -185,13 +185,13 @@ complicatedPrivacy.ts(74,13): error TS9008: Method must have an explicit return export function f1(c1: C1) { ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 complicatedPrivacy.ts:5:25: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 complicatedPrivacy.ts:5:25: Add a return type to the function declaration. } export function f2(c2: C2) { ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 complicatedPrivacy.ts:7:25: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 complicatedPrivacy.ts:7:25: Add a return type to the function declaration. } export class C2 implements m3.i3 { @@ -206,7 +206,7 @@ complicatedPrivacy.ts(74,13): error TS9008: Method must have an explicit return public f55() { ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 complicatedPrivacy.ts:18:20: Add a return type to the method return "Hello world"; } @@ -215,8 +215,8 @@ complicatedPrivacy.ts(74,13): error TS9008: Method must have an explicit return export function f2(arg1: { x?: C1, y: number }) { ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 complicatedPrivacy.ts:24:21: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 complicatedPrivacy.ts:24:21: Add a return type to the function declaration. } export function f3(): { @@ -227,8 +227,8 @@ complicatedPrivacy.ts(74,13): error TS9008: Method must have an explicit return export function f4(arg1: ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 complicatedPrivacy.ts:33:21: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 complicatedPrivacy.ts:33:21: Add a return type to the function declaration. { [number]: C1; // Used to be indexer, now it is a computed property ~~~~~~~~ @@ -241,8 +241,8 @@ complicatedPrivacy.ts(74,13): error TS9008: Method must have an explicit return export function f5(arg2: { ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 complicatedPrivacy.ts:40:21: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 complicatedPrivacy.ts:40:21: Add a return type to the function declaration. new (arg1: C1) : C1 }) { } @@ -280,7 +280,7 @@ complicatedPrivacy.ts(74,13): error TS9008: Method must have an explicit return !!! error TS2694: Namespace 'mglo5' has no exported member 'i6'. f1() { ~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 complicatedPrivacy.ts:74:13: Add a return type to the method return "Hello"; } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts index 4e0b55350d70a..69900aa02d3b5 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertiesNarrowed.d.ts @@ -86,12 +86,12 @@ 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(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) ==== @@ -101,8 +101,8 @@ computedPropertiesNarrowed.ts(47,5): error TS9014: Computed properties must be n 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 +!!! 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. } @@ -117,22 +117,22 @@ computedPropertiesNarrowed.ts(47,5): error TS9014: Computed properties must be n 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 +!!! 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 +!!! 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 +!!! 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(); @@ -145,8 +145,8 @@ computedPropertiesNarrowed.ts(47,5): error TS9014: Computed properties must be n 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 +!!! 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 @@ -158,7 +158,7 @@ computedPropertiesNarrowed.ts(47,5): error TS9014: Computed properties must be n 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 +!!! 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/computedPropertyNames10_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES5.d.ts index 0ef3e445cc036..f1466f734739c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES5.d.ts @@ -30,25 +30,25 @@ declare var v: invalid; /// [Errors] //// -computedPropertyNames10_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES5.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES5.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES5.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames10_ES5.ts (19 errors) ==== @@ -58,81 +58,81 @@ computedPropertyNames10_ES5.ts(15,5): error TS9014: Computed properties must be var v = { [s]() { }, ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:5:5: Add a return type to the method ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. [n]() { }, ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:6:5: Add a return type to the method ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. [s + s]() { }, ~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:7:5: Add a return type to the method ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. [s + n]() { }, ~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:8:5: Add a return type to the method ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. [+s]() { }, ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:9:5: Add a return type to the method ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. [""]() { }, ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:10:5: Add a return type to the method [0]() { }, ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:11:5: Add a return type to the method [a]() { }, ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:12:5: Add a return type to the method ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. [true]() { }, ~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:13:5: Add a return type to the method ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. [`hello bye`]() { }, ~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:14:5: Add a return type to the method [`hello ${a} bye`]() { } ~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES5.ts:15:5: Add a return type to the method ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES6.d.ts index a0b1820e06755..81b547dc161a3 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES6.d.ts @@ -30,25 +30,25 @@ declare var v: invalid; /// [Errors] //// -computedPropertyNames10_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES6.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES6.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES6.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES6.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames10_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames10_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames10_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames10_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames10_ES6.ts (19 errors) ==== @@ -58,81 +58,81 @@ computedPropertyNames10_ES6.ts(15,5): error TS9014: Computed properties must be var v = { [s]() { }, ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:5:5: Add a return type to the method ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. [n]() { }, ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:6:5: Add a return type to the method ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. [s + s]() { }, ~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:7:5: Add a return type to the method ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. [s + n]() { }, ~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:8:5: Add a return type to the method ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. [+s]() { }, ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:9:5: Add a return type to the method ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. [""]() { }, ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:10:5: Add a return type to the method [0]() { }, ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:11:5: Add a return type to the method [a]() { }, ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:12:5: Add a return type to the method ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. [true]() { }, ~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:13:5: Add a return type to the method ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. [`hello bye`]() { }, ~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:14:5: Add a return type to the method [`hello ${a} bye`]() { } ~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. !!! related TS9034 computedPropertyNames10_ES6.ts:15:5: Add a return type to the method ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES5.d.ts index 5d5019e20c121..36547f969d6c7 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES5.d.ts @@ -30,25 +30,25 @@ declare var v: invalid; /// [Errors] //// -computedPropertyNames11_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES5.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES5.ts(8,17): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES5.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES5.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(8,17): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES5.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames11_ES5.ts (19 errors) ==== @@ -58,70 +58,70 @@ computedPropertyNames11_ES5.ts(15,9): error TS9014: Computed properties must be var v = { get [s]() { return 0; }, ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES5.ts:5:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES5.ts:5:9: Add a return type to the get accessor declaration. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. set [n](v) { }, ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames11_ES5.ts:6:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames11_ES5.ts:6:9: Add a type to parameter of the set accessor declaration. get [s + s]() { return 0; }, ~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES5.ts:7:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES5.ts:7:9: Add a return type to the get accessor declaration. ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. set [s + n](v) { }, ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames11_ES5.ts:8:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames11_ES5.ts:8:9: Add a type to parameter of the set accessor declaration. get [+s]() { return 0; }, ~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES5.ts:9:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES5.ts:9:9: Add a return type to the get accessor declaration. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. set [""](v) { }, ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames11_ES5.ts:10:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames11_ES5.ts:10:9: Add a type to parameter of the set accessor declaration. get [0]() { return 0; }, ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES5.ts:11:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES5.ts:11:9: Add a return type to the get accessor declaration. set [a](v) { }, ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames11_ES5.ts:12:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames11_ES5.ts:12:9: Add a type to parameter of the set accessor declaration. get [true]() { return 0; }, ~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES5.ts:13:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES5.ts:13:9: Add a return type to the get accessor declaration. ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. set [`hello bye`](v) { }, ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames11_ES5.ts:14:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames11_ES5.ts:14:9: Add a type to parameter of the set accessor declaration. get [`hello ${a} bye`]() { return 0; } ~~~~~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES5.ts:15:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES5.ts:15:9: Add a return type to the get accessor declaration. ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES6.d.ts index cfc27727a5b20..e37f26707e667 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES6.d.ts @@ -30,25 +30,25 @@ declare var v: invalid; /// [Errors] //// -computedPropertyNames11_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES6.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES6.ts(8,17): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES6.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames11_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames11_ES6.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames11_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(8,17): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames11_ES6.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames11_ES6.ts (19 errors) ==== @@ -58,70 +58,70 @@ computedPropertyNames11_ES6.ts(15,9): error TS9014: Computed properties must be var v = { get [s]() { return 0; }, ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES6.ts:5:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES6.ts:5:9: Add a return type to the get accessor declaration. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. set [n](v) { }, ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames11_ES6.ts:6:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames11_ES6.ts:6:9: Add a type to parameter of the set accessor declaration. get [s + s]() { return 0; }, ~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES6.ts:7:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES6.ts:7:9: Add a return type to the get accessor declaration. ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. set [s + n](v) { }, ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames11_ES6.ts:8:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames11_ES6.ts:8:9: Add a type to parameter of the set accessor declaration. get [+s]() { return 0; }, ~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES6.ts:9:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES6.ts:9:9: Add a return type to the get accessor declaration. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. set [""](v) { }, ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames11_ES6.ts:10:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames11_ES6.ts:10:9: Add a type to parameter of the set accessor declaration. get [0]() { return 0; }, ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES6.ts:11:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES6.ts:11:9: Add a return type to the get accessor declaration. set [a](v) { }, ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames11_ES6.ts:12:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames11_ES6.ts:12:9: Add a type to parameter of the set accessor declaration. get [true]() { return 0; }, ~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES6.ts:13:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES6.ts:13:9: Add a return type to the get accessor declaration. ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. set [`hello bye`](v) { }, ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames11_ES6.ts:14:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames11_ES6.ts:14:9: Add a type to parameter of the set accessor declaration. get [`hello ${a} bye`]() { return 0; } ~~~~~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames11_ES6.ts:15:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames11_ES6.ts:15:9: Add a return type to the get accessor declaration. ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts index 05bba986c1b75..16e142c3a3883 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts @@ -35,14 +35,14 @@ declare class C { /// [Errors] //// computedPropertyNames12_ES5.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames12_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames12_ES5.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames12_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames12_ES5.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames12_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames12_ES5.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -56,12 +56,12 @@ computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. [n] = n; ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static [s + s]: string; ~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -77,7 +77,7 @@ computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static [true]: number; ~~~~~~~~~~~ !!! 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/tsc/computedPropertyNames12_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts index caa83582fdbca..e0801e702de82 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts @@ -35,14 +35,14 @@ declare class C { /// [Errors] //// computedPropertyNames12_ES6.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames12_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames12_ES6.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames12_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames12_ES6.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames12_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames12_ES6.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -56,12 +56,12 @@ computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. [n] = n; ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static [s + s]: string; ~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. @@ -77,7 +77,7 @@ computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in ~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static [true]: number; ~~~~~~~~~~~ !!! 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/tsc/computedPropertyNames13_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES5.d.ts index d0c7659f1be1c..a5ffd4be0fac9 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES5.d.ts @@ -34,12 +34,12 @@ declare class C { /// [Errors] //// -computedPropertyNames13_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames13_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames13_ES5.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames13_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames13_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames13_ES5.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames13_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames13_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames13_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== computedPropertyNames13_ES5.ts (6 errors) ==== @@ -49,28 +49,28 @@ computedPropertyNames13_ES5.ts(14,5): error TS9008: Method must have an explicit class C { [s]() {} ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. [n]() { } ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static [s + s]() { } [s + n]() { } [+s]() { } static [""]() { } ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames13_ES5.ts:10:12: Add a return type to the method [0]() { } ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames13_ES5.ts:11:5: Add a return type to the method [a]() { } ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static [true]() { } [`hello bye`]() { } ~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames13_ES5.ts:14:5: Add a return type to the method static [`hello ${a} bye`]() { } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES6.d.ts index df7cfb818dffc..603aec1df95e9 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES6.d.ts @@ -34,12 +34,12 @@ declare class C { /// [Errors] //// -computedPropertyNames13_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames13_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames13_ES6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames13_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames13_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames13_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames13_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames13_ES6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames13_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames13_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames13_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== computedPropertyNames13_ES6.ts (6 errors) ==== @@ -49,28 +49,28 @@ computedPropertyNames13_ES6.ts(14,5): error TS9008: Method must have an explicit class C { [s]() {} ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. [n]() { } ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static [s + s]() { } [s + n]() { } [+s]() { } static [""]() { } ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames13_ES6.ts:10:12: Add a return type to the method [0]() { } ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames13_ES6.ts:11:5: Add a return type to the method [a]() { } ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static [true]() { } [`hello bye`]() { } ~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 computedPropertyNames13_ES6.ts:14:5: Add a return type to the method static [`hello ${a} bye`]() { } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES5.d.ts index d8464353ecda4..dae47ae15d153 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES5.d.ts @@ -23,12 +23,12 @@ declare class C { /// [Errors] //// computedPropertyNames14_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES5.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames14_ES5.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames14_ES5.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES5.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames14_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames14_ES5.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -39,7 +39,7 @@ computedPropertyNames14_ES5.ts(8,12): error TS2464: A computed property name mus ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static [true]() { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -53,7 +53,7 @@ computedPropertyNames14_ES5.ts(8,12): error TS2464: A computed property name mus ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static [null]() { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES6.d.ts index f1e3f95e2141e..5286480224a6f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES6.d.ts @@ -23,12 +23,12 @@ declare class C { /// [Errors] //// computedPropertyNames14_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames14_ES6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames14_ES6.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES6.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames14_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames14_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames14_ES6.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -39,7 +39,7 @@ computedPropertyNames14_ES6.ts(8,12): error TS2464: A computed property name mus ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static [true]() { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -53,7 +53,7 @@ computedPropertyNames14_ES6.ts(8,12): error TS2464: A computed property name mus ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static [null]() { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES5.d.ts index 9208e9e34fea2..7e251ee43e0e8 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES5.d.ts @@ -23,11 +23,11 @@ declare class C { /// [Errors] //// -computedPropertyNames15_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames15_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames15_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames15_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames15_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames15_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames15_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames15_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames15_ES5.ts (5 errors) ==== @@ -37,15 +37,15 @@ computedPropertyNames15_ES5.ts(7,5): error TS9014: Computed properties must be n class C { [p1]() { } ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. [p2]() { } ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. [p3]() { } ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES6.d.ts index 60478221f1f4f..7341c90ea585b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES6.d.ts @@ -23,11 +23,11 @@ declare class C { /// [Errors] //// -computedPropertyNames15_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames15_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames15_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames15_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames15_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames15_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames15_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames15_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames15_ES6.ts (5 errors) ==== @@ -37,15 +37,15 @@ computedPropertyNames15_ES6.ts(7,5): error TS9014: Computed properties must be n class C { [p1]() { } ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. [p2]() { } ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. [p3]() { } ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts index f81bc63923f9d..653944862c485 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts @@ -34,12 +34,12 @@ declare class C { /// [Errors] //// -computedPropertyNames16_ES5.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames16_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames16_ES5.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames16_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames16_ES5.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames16_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES5.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames16_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames16_ES5.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames16_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames16_ES5.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames16_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ==== computedPropertyNames16_ES5.ts (6 errors) ==== @@ -49,28 +49,28 @@ computedPropertyNames16_ES5.ts(14,23): error TS9009: At least one accessor must class C { get [s]() { return 0;} ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. set [n](v) { } ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static get [s + s]() { return 0; } set [s + n](v) { } get [+s]() { return 0; } static set [""](v) { } ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames16_ES5.ts:10:16: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames16_ES5.ts:10:16: Add a type to parameter of the set accessor declaration. get [0]() { return 0; } ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames16_ES5.ts:11:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames16_ES5.ts:11:9: Add a return type to the get accessor declaration. set [a](v) { } ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static get [true]() { return 0; } set [`hello bye`](v) { } ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames16_ES5.ts:14:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames16_ES5.ts:14:9: Add a type to parameter of the set accessor declaration. get [`hello ${a} bye`]() { return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts index ae512163f495d..a0796ca7b8dc9 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts @@ -34,12 +34,12 @@ declare class C { /// [Errors] //// -computedPropertyNames16_ES6.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames16_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames16_ES6.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames16_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -computedPropertyNames16_ES6.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames16_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +computedPropertyNames16_ES6.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames16_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames16_ES6.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames16_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +computedPropertyNames16_ES6.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames16_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ==== computedPropertyNames16_ES6.ts (6 errors) ==== @@ -49,28 +49,28 @@ computedPropertyNames16_ES6.ts(14,23): error TS9009: At least one accessor must class C { get [s]() { return 0;} ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. set [n](v) { } ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static get [s + s]() { return 0; } set [s + n](v) { } get [+s]() { return 0; } static set [""](v) { } ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames16_ES6.ts:10:16: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames16_ES6.ts:10:16: Add a type to parameter of the set accessor declaration. get [0]() { return 0; } ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 computedPropertyNames16_ES6.ts:11:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 computedPropertyNames16_ES6.ts:11:9: Add a return type to the get accessor declaration. set [a](v) { } ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static get [true]() { return 0; } set [`hello bye`](v) { } ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 computedPropertyNames16_ES6.ts:14:9: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 computedPropertyNames16_ES6.ts:14:9: Add a type to parameter of the set accessor declaration. get [`hello ${a} bye`]() { return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES5.d.ts index 5395e81f8f731..45917f98c143c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES5.d.ts @@ -23,12 +23,12 @@ declare class C { /// [Errors] //// computedPropertyNames17_ES5.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES5.ts(3,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames17_ES5.ts(3,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames17_ES5.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES5.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES5.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES5.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES5.ts(7,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames17_ES5.ts(7,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames17_ES5.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -39,7 +39,7 @@ computedPropertyNames17_ES5.ts(8,9): error TS2464: A computed property name must ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static set [true](v) { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -53,7 +53,7 @@ computedPropertyNames17_ES5.ts(8,9): error TS2464: A computed property name must ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. set [null](v) { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES6.d.ts index 975bd0f67dade..2f472d0260e41 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES6.d.ts @@ -23,12 +23,12 @@ declare class C { /// [Errors] //// computedPropertyNames17_ES6.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES6.ts(3,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames17_ES6.ts(3,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames17_ES6.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES6.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES6.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames17_ES6.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES6.ts(7,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames17_ES6.ts(7,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames17_ES6.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -39,7 +39,7 @@ computedPropertyNames17_ES6.ts(8,9): error TS2464: A computed property name must ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static set [true](v) { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -53,7 +53,7 @@ computedPropertyNames17_ES6.ts(8,9): error TS2464: A computed property name must ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. set [null](v) { } ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts index 4d414aa08c456..a4f9c1f14b414 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts @@ -24,14 +24,14 @@ declare class C { /// [Errors] //// -computedPropertyNames2_ES5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames2_ES5.ts(5,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames2_ES5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames2_ES5.ts(5,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames2_ES5.ts(6,9): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames2_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames2_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames2_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames2_ES5.ts(8,16): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES5.ts(8,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames2_ES5.ts(9,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames2_ES5.ts(8,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames2_ES5.ts(9,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames2_ES5.ts (8 errors) ==== @@ -40,24 +40,24 @@ computedPropertyNames2_ES5.ts(9,16): error TS9014: Computed properties must be n class C { [methodName]() { } ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static [methodName]() { } ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. set [accessorName](v) { } ~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static set [accessorName](v) { } ~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts index f5f8b0bf06038..fb1a36bced6e6 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts @@ -24,14 +24,14 @@ declare class C { /// [Errors] //// -computedPropertyNames2_ES6.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames2_ES6.ts(5,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames2_ES6.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames2_ES6.ts(5,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames2_ES6.ts(6,9): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames2_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames2_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames2_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames2_ES6.ts(8,16): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES6.ts(8,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames2_ES6.ts(9,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames2_ES6.ts(8,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames2_ES6.ts(9,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames2_ES6.ts (8 errors) ==== @@ -40,24 +40,24 @@ computedPropertyNames2_ES6.ts(9,16): error TS9014: Computed properties must be n class C { [methodName]() { } ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static [methodName]() { } ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. set [accessorName](v) { } ~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static get [accessorName]() { } ~~~~~~~~~~~~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. static set [accessorName](v) { } ~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts index e9d75efdbdfff..60407bb6af4c9 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts @@ -30,16 +30,16 @@ declare var v: invalid; /// [Errors] //// -computedPropertyNames4_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES5.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations -computedPropertyNames4_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES5.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations -computedPropertyNames4_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES5.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +computedPropertyNames4_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES5.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +computedPropertyNames4_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames4_ES5.ts (10 errors) ==== @@ -49,45 +49,45 @@ computedPropertyNames4_ES5.ts(15,5): error TS9014: Computed properties must be n var v = { [s]: 0, ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. [n]: n, ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. ~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v -!!! related TS9035 computedPropertyNames4_ES5.ts:6:10: Add a type assertion to this expression to make type type explicit +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. +!!! related TS9035 computedPropertyNames4_ES5.ts:6:10: Add a type assertion to this expression to make type type explicit. [s + s]: 1, ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. [s + n]: 2, ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. [+s]: s, ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. ~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v -!!! related TS9035 computedPropertyNames4_ES5.ts:9:11: Add a type assertion to this expression to make type type explicit +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. +!!! related TS9035 computedPropertyNames4_ES5.ts:9:11: Add a type assertion to this expression to make type type explicit. [""]: 0, [0]: 0, [a]: 1, ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. [true]: 0, ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. [`hello bye`]: 0, [`hello ${a} bye`]: 0 ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts index e1efb6b73b68f..c748f8cf01843 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts @@ -30,16 +30,16 @@ declare var v: invalid; /// [Errors] //// -computedPropertyNames4_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES6.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations -computedPropertyNames4_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES6.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations -computedPropertyNames4_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNames4_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames4_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES6.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +computedPropertyNames4_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES6.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +computedPropertyNames4_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNames4_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames4_ES6.ts (10 errors) ==== @@ -49,45 +49,45 @@ computedPropertyNames4_ES6.ts(15,5): error TS9014: Computed properties must be n var v = { [s]: 0, ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. [n]: n, ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. ~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v -!!! related TS9035 computedPropertyNames4_ES6.ts:6:10: Add a type assertion to this expression to make type type explicit +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. +!!! related TS9035 computedPropertyNames4_ES6.ts:6:10: Add a type assertion to this expression to make type type explicit. [s + s]: 1, ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. [s + n]: 2, ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. [+s]: s, ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. ~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v -!!! related TS9035 computedPropertyNames4_ES6.ts:9:11: Add a type assertion to this expression to make type type explicit +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. +!!! related TS9035 computedPropertyNames4_ES6.ts:9:11: Add a type assertion to this expression to make type type explicit. [""]: 0, [0]: 0, [a]: 1, ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. [true]: 0, ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. [`hello bye`]: 0, [`hello ${a} bye`]: 0 ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts index fa0adfc60a51c..ec18ac62c408f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts @@ -22,16 +22,16 @@ declare var v: invalid; /// [Errors] //// computedPropertyNames5_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames5_ES5.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames5_ES5.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames5_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames5_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames5_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames5_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames5_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames5_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames5_ES5.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames5_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames5_ES5.ts (11 errors) ==== @@ -41,8 +41,8 @@ computedPropertyNames5_ES5.ts(8,5): error TS9014: Computed properties must be nu ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. [true]: 1, ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -50,24 +50,24 @@ computedPropertyNames5_ES5.ts(8,5): error TS9014: Computed properties must be nu ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. [{}]: 0, ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. [undefined]: undefined, ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. [null]: null ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts index 73c97e9ca2298..d746bd476b909 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts @@ -22,16 +22,16 @@ declare var v: invalid; /// [Errors] //// computedPropertyNames5_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames5_ES6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames5_ES6.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. computedPropertyNames5_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames5_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames5_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames5_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames5_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames5_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames5_ES6.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames5_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames5_ES6.ts (11 errors) ==== @@ -41,8 +41,8 @@ computedPropertyNames5_ES6.ts(8,5): error TS9014: Computed properties must be nu ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. [true]: 1, ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -50,24 +50,24 @@ computedPropertyNames5_ES6.ts(8,5): error TS9014: Computed properties must be nu ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. [{}]: 0, ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. [undefined]: undefined, ~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. [null]: null ~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts index 6a5a6f5efa57f..86f841077b05c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts @@ -22,11 +22,11 @@ declare var v: invalid; /// [Errors] //// -computedPropertyNames6_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames6_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames6_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames6_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames6_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames6_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames6_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames6_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames6_ES5.ts (5 errors) ==== @@ -36,18 +36,18 @@ computedPropertyNames6_ES5.ts(7,5): error TS9014: Computed properties must be nu var v = { [p1]: 0, ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v. [p2]: 1, ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v. [p3]: 2 ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts index 5a161b7ef2dbe..556cb1223820d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts @@ -22,11 +22,11 @@ declare var v: invalid; /// [Errors] //// -computedPropertyNames6_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames6_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames6_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames6_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames6_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNames6_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames6_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNames6_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNames6_ES6.ts (5 errors) ==== @@ -36,18 +36,18 @@ computedPropertyNames6_ES6.ts(7,5): error TS9014: Computed properties must be nu var v = { [p1]: 0, ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v. [p2]: 1, ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v. [p3]: 2 ~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts index efb5bf092af2b..a68eb59ce0bab 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts @@ -22,10 +22,10 @@ declare class C { /// [Errors] //// computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNamesOnOverloads_ES5.ts (5 errors) ==== @@ -36,13 +36,13 @@ computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9014: Computed properties ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. [methodName](); ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. [methodName](v?: string) { } ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts index f565ec873b5fa..4e6e21b762a20 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts @@ -22,10 +22,10 @@ declare class C { /// [Errors] //// computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== computedPropertyNamesOnOverloads_ES6.ts (5 errors) ==== @@ -36,13 +36,13 @@ computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9014: Computed properties ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. [methodName](); ~~~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. [methodName](v?: string) { } ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts index 2669d0611cb69..ed70e0a46a315 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts @@ -39,11 +39,11 @@ declare class C1 { /// [Errors] //// computedPropertyNamesWithStaticProperty.ts(2,1): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. -computedPropertyNamesWithStaticProperty.ts(4,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNamesWithStaticProperty.ts(4,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNamesWithStaticProperty.ts(4,10): error TS2449: Class 'C1' used before its declaration. -computedPropertyNamesWithStaticProperty.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNamesWithStaticProperty.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. computedPropertyNamesWithStaticProperty.ts(7,10): error TS2449: Class 'C1' used before its declaration. -computedPropertyNamesWithStaticProperty.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +computedPropertyNamesWithStaticProperty.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. 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. @@ -58,7 +58,7 @@ computedPropertyNamesWithStaticProperty.ts(21,6): error TS2449: Class 'C2' used static staticProp = 10; get [C1.staticProp]() { ~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ~~ !!! error TS2449: Class 'C1' used before its declaration. !!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. @@ -66,7 +66,7 @@ computedPropertyNamesWithStaticProperty.ts(21,6): error TS2449: Class 'C2' used } set [C1.staticProp](x: string) { ~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ~~ !!! error TS2449: Class 'C1' used before its declaration. !!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. @@ -74,7 +74,7 @@ computedPropertyNamesWithStaticProperty.ts(21,6): error TS2449: Class 'C2' used } [C1.staticProp]() { } ~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ~~ !!! error TS2449: Class 'C1' used before its declaration. !!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts index ddd8ee0e33ce3..9fdedc888fb75 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts @@ -87,21 +87,21 @@ declare const enum NaNOrInfinity { constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -constEnumErrors.ts(14,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations +constEnumErrors.ts(14,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. -constEnumErrors.ts(15,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations +constEnumErrors.ts(15,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. constEnumErrors.ts(15,10): error TS2474: const enum member initializers must be constant expressions. constEnumErrors.ts(15,13): error TS2339: Property 'Z' does not exist on type 'typeof E1'. -constEnumErrors.ts(22,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +constEnumErrors.ts(22,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. constEnumErrors.ts(22,13): error TS2476: A const enum member can only be accessed using a string literal. -constEnumErrors.ts(24,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +constEnumErrors.ts(24,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. constEnumErrors.ts(24,13): error TS2476: A const enum member can only be accessed using a string literal. -constEnumErrors.ts(25,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +constEnumErrors.ts(25,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. constEnumErrors.ts(25,13): error TS2476: A const enum member can only be accessed using a string literal. constEnumErrors.ts(27,9): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -constEnumErrors.ts(27,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -constEnumErrors.ts(28,9): error TS9017: Only const arrays can be inferred with --isolatedDeclarations +constEnumErrors.ts(27,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +constEnumErrors.ts(28,9): error TS9017: Only const arrays can be inferred with --isolatedDeclarations. constEnumErrors.ts(28,10): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. constEnumErrors.ts(33,5): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. constEnumErrors.ts(41,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. @@ -131,14 +131,14 @@ constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was eval // forward reference to the element of the same enum Y = E1.Z, ~ -!!! 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. ~~~~ !!! error TS2474: const enum member initializers must be constant expressions. ~ !!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. Y1 = E1["Z"] ~~ -!!! 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. ~~~~~~~ !!! error TS2474: const enum member initializers must be constant expressions. ~~~ @@ -151,21 +151,21 @@ constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was eval var y0 = E2[1] ~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 constEnumErrors.ts:22:5: Add a type annotation to the variable y0 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 constEnumErrors.ts:22:5: Add a type annotation to the variable y0. ~ !!! error TS2476: A const enum member can only be accessed using a string literal. var name = "A"; var y1 = E2[name]; ~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 constEnumErrors.ts:24:5: Add a type annotation to the variable y1 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 constEnumErrors.ts:24:5: Add a type annotation to the variable y1. ~~~~ !!! error TS2476: A const enum member can only be accessed using a string literal. var y2 = E2[`${name}`]; ~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 constEnumErrors.ts:25:5: Add a type annotation to the variable y2 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 constEnumErrors.ts:25:5: Add a type annotation to the variable y2. ~~~~~~~~~ !!! error TS2476: A const enum member can only be accessed using a string literal. @@ -173,12 +173,12 @@ constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was eval ~~ !!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. ~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 constEnumErrors.ts:27:5: Add a type annotation to the variable x +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 constEnumErrors.ts:27:5: Add a type annotation to the variable x. var y = [E2]; ~~~~ -!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations -!!! related TS9027 constEnumErrors.ts:28:5: Add a type annotation to the variable y +!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations. +!!! related TS9027 constEnumErrors.ts:28:5: Add a type annotation to the variable y. ~~ !!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping.d.ts index 9bb4d34546191..5c0863b9bec4b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping.d.ts @@ -352,10 +352,10 @@ declare var x: B; /// [Errors] //// -contextualTyping.ts(146,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -contextualTyping.ts(156,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +contextualTyping.ts(146,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +contextualTyping.ts(156,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. contextualTyping.ts(189,18): error TS2384: Overload signatures must all be ambient or non-ambient. -contextualTyping.ts(193,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +contextualTyping.ts(193,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' but required in type 'B'. @@ -507,8 +507,8 @@ contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' b // CONTEXT: Function call function c9t5(f: (n: number) => IFoo) {}; ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 contextualTyping.ts:146:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 contextualTyping.ts:146:10: Add a return type to the function declaration. c9t5(function(n) { return ({}); }); @@ -520,8 +520,8 @@ contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' b class C11t5 { constructor(f: (n: number) => IFoo) { } }; var i = new C11t5(function(n) { return ({}) }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 contextualTyping.ts:156:5: Add a type annotation to the variable i +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 contextualTyping.ts:156:5: Add a type annotation to the variable i. // CONTEXT: Type annotated expression var c12t1 = <(s: string) => string> (function(s) { return s }); @@ -562,8 +562,8 @@ contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' b var efv = EF1(1,2); ~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 contextualTyping.ts:193:5: Add a type annotation to the variable efv +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 contextualTyping.ts:193:5: Add a type annotation to the variable efv. // contextually typing from ambient class declarations diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/correlatedUnions.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/correlatedUnions.d.ts index e2684ad6db46f..227385c887ee2 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/correlatedUnions.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/correlatedUnions.d.ts @@ -473,21 +473,21 @@ declare function getValueConcrete(o: Partial, k: K): /// [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(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) ==== @@ -502,8 +502,8 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a 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 +!!! 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); } @@ -531,12 +531,12 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a 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 +!!! 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 +!!! 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, @@ -545,8 +545,8 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a 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 +!!! 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); } @@ -580,8 +580,8 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a 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 +!!! 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) @@ -620,8 +620,8 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a 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 +!!! 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 }); } @@ -639,8 +639,8 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ }); ~~ -!!! 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 +!!! 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({ ~~~~~~~~~~~~~~~~~~~~~ @@ -650,8 +650,8 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ }); ~~ -!!! 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 +!!! 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]); @@ -664,8 +664,8 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a 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 +!!! 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] @@ -691,31 +691,31 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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; } @@ -755,8 +755,8 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a 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 +!!! 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]); } @@ -771,8 +771,8 @@ correlatedUnions.ts(231,20): error TS9010: Variable must have an explicit type a 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 +!!! 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; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/decoratorMetadataWithImportDeclarationNameCollision7.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/decoratorMetadataWithImportDeclarationNameCollision7.d.ts index be65499aadd39..d7158b4e7e320 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/decoratorMetadataWithImportDeclarationNameCollision7.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/decoratorMetadataWithImportDeclarationNameCollision7.d.ts @@ -41,7 +41,7 @@ export { MyClass }; /// [Errors] //// -db.ts(2,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +db.ts(2,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. service.ts(7,9): error TS2702: 'db' only refers to a type, but is being used as a namespace here. service.ts(7,9): error TS4031: Public property 'db' of exported class has or is using private name 'db'. service.ts(9,21): error TS2702: 'db' only refers to a type, but is being used as a namespace here. @@ -52,7 +52,7 @@ service.ts(9,21): error TS4063: Parameter 'db' of constructor from exported clas export default class db { public doSomething() { ~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 db.ts:2:12: Add a return type to the method } } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts index 2d2a06ed7d455..ed63dd516893b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts @@ -255,16 +255,16 @@ declare class I { /// [Errors] //// -decoratorsOnComputedProperties.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +decoratorsOnComputedProperties.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. decoratorsOnComputedProperties.ts(18,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(19,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(20,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(21,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(21,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +decoratorsOnComputedProperties.ts(21,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(22,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(22,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +decoratorsOnComputedProperties.ts(22,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(23,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(23,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +decoratorsOnComputedProperties.ts(23,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(27,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(28,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(29,5): error TS1206: Decorators are not valid here. @@ -279,11 +279,11 @@ decoratorsOnComputedProperties.ts(52,5): error TS1166: A computed property name decoratorsOnComputedProperties.ts(53,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(54,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(55,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(55,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +decoratorsOnComputedProperties.ts(55,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(56,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(56,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +decoratorsOnComputedProperties.ts(56,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(57,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(57,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +decoratorsOnComputedProperties.ts(57,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(62,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(63,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(64,5): error TS1206: Decorators are not valid here. @@ -298,11 +298,11 @@ decoratorsOnComputedProperties.ts(88,5): error TS1166: A computed property name decoratorsOnComputedProperties.ts(89,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(90,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(92,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(92,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +decoratorsOnComputedProperties.ts(92,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(93,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(93,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +decoratorsOnComputedProperties.ts(93,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(94,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(94,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +decoratorsOnComputedProperties.ts(94,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(98,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(99,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(100,5): error TS1206: Decorators are not valid here. @@ -317,11 +317,11 @@ decoratorsOnComputedProperties.ts(124,5): error TS1166: A computed property name decoratorsOnComputedProperties.ts(125,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(126,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(128,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(128,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +decoratorsOnComputedProperties.ts(128,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(129,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(129,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +decoratorsOnComputedProperties.ts(129,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(131,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(131,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +decoratorsOnComputedProperties.ts(131,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(135,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(136,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(137,5): error TS1206: Decorators are not valid here. @@ -336,11 +336,11 @@ decoratorsOnComputedProperties.ts(162,5): error TS1166: A computed property name decoratorsOnComputedProperties.ts(163,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(164,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. decoratorsOnComputedProperties.ts(166,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(166,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +decoratorsOnComputedProperties.ts(166,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(167,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(167,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +decoratorsOnComputedProperties.ts(167,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(169,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(169,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +decoratorsOnComputedProperties.ts(169,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. decoratorsOnComputedProperties.ts(173,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(174,5): error TS1206: Decorators are not valid here. decoratorsOnComputedProperties.ts(175,5): error TS1206: Decorators are not valid here. @@ -357,8 +357,8 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid ==== decoratorsOnComputedProperties.ts (97 errors) ==== function x(o: object, k: PropertyKey) { } ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 decoratorsOnComputedProperties.ts:1:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 decoratorsOnComputedProperties.ts:1:10: Add a return type to the function declaration. let i = 0; function foo(): string { return ++i + ""; } @@ -388,17 +388,17 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. @x [fieldNameB]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. @x [fieldNameC]: any = null; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } void class B { @@ -460,17 +460,17 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. @x [fieldNameB]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. @x [fieldNameC]: any = null; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ["some" + "method"]() {} } @@ -535,17 +535,17 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. @x [fieldNameB]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. @x [fieldNameC]: any = null; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } void class F { @@ -609,18 +609,18 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. @x [fieldNameB]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ["some" + "method2"]() {} @x [fieldNameC]: any = null; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } void class H { @@ -685,18 +685,18 @@ decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. @x [fieldNameB]: any; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ["some" + "method2"]() {} @x [fieldNameC]: any = null; ~~~~~~~~~~~~ !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } void class J { diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers.d.ts index 9c0758310a191..7cc4b48b22f93 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers.d.ts @@ -88,10 +88,10 @@ declare class Derived extends Base { /// [Errors] //// -derivedClassOverridesProtectedMembers.ts(6,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers.ts(12,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers.ts(22,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers.ts(28,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers.ts(6,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers.ts(12,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers.ts(22,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers.ts(28,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== derivedClassOverridesProtectedMembers.ts (4 errors) ==== @@ -102,7 +102,7 @@ derivedClassOverridesProtectedMembers.ts(28,22): error TS9008: Method must have protected a: typeof x; protected b(a: typeof x) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers.ts:6:15: Add a return type to the method protected get c() { return x; } protected set c(v: typeof x) { } @@ -111,7 +111,7 @@ derivedClassOverridesProtectedMembers.ts(28,22): error TS9008: Method must have protected static r: typeof x; protected static s(a: typeof x) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers.ts:12:22: Add a return type to the method protected static get t() { return x; } protected static set t(v: typeof x) { } @@ -124,7 +124,7 @@ derivedClassOverridesProtectedMembers.ts(28,22): error TS9008: Method must have protected a: typeof y; protected b(a: typeof y) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers.ts:22:15: Add a return type to the method protected get c() { return y; } protected set c(v: typeof y) { } @@ -133,7 +133,7 @@ derivedClassOverridesProtectedMembers.ts(28,22): error TS9008: Method must have protected static r: typeof y; protected static s(a: typeof y) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers.ts:28:22: Add a return type to the method protected static get t() { return y; } protected static set t(a: typeof y) { } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers2.d.ts index c7570c544f5aa..130a1eebedf1e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers2.d.ts @@ -136,20 +136,20 @@ declare var r8: invalid; /// [Errors] //// -derivedClassOverridesProtectedMembers2.ts(6,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(12,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(23,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(29,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(38,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(39,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(40,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(41,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(43,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(44,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(45,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(46,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(60,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers2.ts(61,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers2.ts(6,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(12,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(23,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(29,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(38,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(39,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(40,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(41,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(43,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(44,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(45,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(46,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(60,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers2.ts(61,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ==== derivedClassOverridesProtectedMembers2.ts (14 errors) ==== @@ -160,7 +160,7 @@ derivedClassOverridesProtectedMembers2.ts(61,10): error TS9010: Variable must ha protected a: typeof x; protected b(a: typeof x) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers2.ts:6:15: Add a return type to the method protected get c() { return x; } protected set c(v: typeof x) { } @@ -169,7 +169,7 @@ derivedClassOverridesProtectedMembers2.ts(61,10): error TS9010: Variable must ha protected static r: typeof x; protected static s(a: typeof x) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers2.ts:12:22: Add a return type to the method protected static get t() { return x; } protected static set t(v: typeof x) { } @@ -183,7 +183,7 @@ derivedClassOverridesProtectedMembers2.ts(61,10): error TS9010: Variable must ha a: typeof y; b(a: typeof y) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers2.ts:23:5: Add a return type to the method get c() { return y; } set c(v: typeof y) { } @@ -192,7 +192,7 @@ derivedClassOverridesProtectedMembers2.ts(61,10): error TS9010: Variable must ha static r: typeof y; static s(a: typeof y) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers2.ts:29:12: Add a return type to the method static get t() { return y; } static set t(a: typeof y) { } @@ -204,37 +204,37 @@ derivedClassOverridesProtectedMembers2.ts(61,10): error TS9010: Variable must ha var d: Derived = new Derived(y); var r1 = d.a; ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:38:5: Add a type annotation to the variable r1 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:38:5: Add a type annotation to the variable r1. var r2 = d.b(y); ~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:39:5: Add a type annotation to the variable r2 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:39:5: Add a type annotation to the variable r2. var r3 = d.c; ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:40:5: Add a type annotation to the variable r3 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:40:5: Add a type annotation to the variable r3. var r3a = d.d; ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:41:5: Add a type annotation to the variable r3a +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:41:5: Add a type annotation to the variable r3a. d.c = y; var r4 = Derived.r; ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:43:5: Add a type annotation to the variable r4 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:43:5: Add a type annotation to the variable r4. var r5 = Derived.s(y); ~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:44:5: Add a type annotation to the variable r5 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:44:5: Add a type annotation to the variable r5. var r6 = Derived.t; ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:45:5: Add a type annotation to the variable r6 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:45:5: Add a type annotation to the variable r6. var r6a = Derived.u; ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:46:5: Add a type annotation to the variable r6a +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:46:5: Add a type annotation to the variable r6a. Derived.t = y; class Base2 { @@ -250,11 +250,11 @@ derivedClassOverridesProtectedMembers2.ts(61,10): error TS9010: Variable must ha var d2: Derived2; var r7 = d2['']; ~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:60:5: Add a type annotation to the variable r7 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:60:5: Add a type annotation to the variable r7. var r8 = d2[1]; ~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:61:5: Add a type annotation to the variable r8 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:61:5: Add a type annotation to the variable r8. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers3.d.ts index e1cbdec74079c..d773c7a161870 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers3.d.ts @@ -144,16 +144,16 @@ declare class Derived10 extends Base { /// [Errors] //// -derivedClassOverridesProtectedMembers3.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesProtectedMembers3.ts(12,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesProtectedMembers3.ts(12,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. derivedClassOverridesProtectedMembers3.ts(22,7): error TS2415: Class 'Derived1' incorrectly extends base class 'Base'. Property 'a' is protected in type 'Derived1' but public in type 'Base'. derivedClassOverridesProtectedMembers3.ts(27,7): error TS2415: Class 'Derived2' incorrectly extends base class 'Base'. Property 'b' is protected in type 'Derived2' but public in type 'Base'. -derivedClassOverridesProtectedMembers3.ts(28,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(28,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. derivedClassOverridesProtectedMembers3.ts(32,7): error TS2415: Class 'Derived3' incorrectly extends base class 'Base'. Property 'c' is protected in type 'Derived3' but public in type 'Base'. -derivedClassOverridesProtectedMembers3.ts(33,19): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(33,19): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. derivedClassOverridesProtectedMembers3.ts(37,7): error TS2415: Class 'Derived4' incorrectly extends base class 'Base'. Property 'c' is protected in type 'Derived4' but public in type 'Base'. derivedClassOverridesProtectedMembers3.ts(42,7): error TS2415: Class 'Derived5' incorrectly extends base class 'Base'. @@ -162,10 +162,10 @@ derivedClassOverridesProtectedMembers3.ts(47,7): error TS2417: Class static side Property 'r' is protected in type 'typeof Derived6' but public in type 'typeof Base'. derivedClassOverridesProtectedMembers3.ts(52,7): error TS2417: Class static side 'typeof Derived7' incorrectly extends base class static side 'typeof Base'. Property 's' is protected in type 'typeof Derived7' but public in type 'typeof Base'. -derivedClassOverridesProtectedMembers3.ts(53,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(53,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. derivedClassOverridesProtectedMembers3.ts(57,7): error TS2417: Class static side 'typeof Derived8' incorrectly extends base class static side 'typeof Base'. Property 't' is protected in type 'typeof Derived8' but public in type 'typeof Base'. -derivedClassOverridesProtectedMembers3.ts(58,26): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +derivedClassOverridesProtectedMembers3.ts(58,26): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. derivedClassOverridesProtectedMembers3.ts(62,7): error TS2417: Class static side 'typeof Derived9' incorrectly extends base class static side 'typeof Base'. Property 't' is protected in type 'typeof Derived9' but public in type 'typeof Base'. derivedClassOverridesProtectedMembers3.ts(67,7): error TS2417: Class static side 'typeof Derived10' incorrectly extends base class static side 'typeof Base'. @@ -180,7 +180,7 @@ derivedClassOverridesProtectedMembers3.ts(67,7): error TS2417: Class static side a: typeof x; b(a: typeof x) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers3.ts:6:5: Add a return type to the method get c() { return x; } set c(v: typeof x) { } @@ -189,7 +189,7 @@ derivedClassOverridesProtectedMembers3.ts(67,7): error TS2417: Class static side static r: typeof x; static s(a: typeof x) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers3.ts:12:12: Add a return type to the method static get t() { return x; } static set t(v: typeof x) { } @@ -214,7 +214,7 @@ derivedClassOverridesProtectedMembers3.ts(67,7): error TS2417: Class static side !!! error TS2415: Property 'b' is protected in type 'Derived2' but public in type 'Base'. protected b(a: typeof x) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers3.ts:28:15: Add a return type to the method constructor(a: typeof x) { super(a); } } @@ -225,8 +225,8 @@ derivedClassOverridesProtectedMembers3.ts(67,7): error TS2417: Class static side !!! error TS2415: Property 'c' is protected in type 'Derived3' but public in type 'Base'. protected get c() { return x; } ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 derivedClassOverridesProtectedMembers3.ts:33:19: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 derivedClassOverridesProtectedMembers3.ts:33:19: Add a return type to the get accessor declaration. constructor(a: typeof x) { super(a); } } @@ -260,7 +260,7 @@ derivedClassOverridesProtectedMembers3.ts(67,7): error TS2417: Class static side !!! error TS2417: Property 's' is protected in type 'typeof Derived7' but public in type 'typeof Base'. protected static s(a: typeof x) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesProtectedMembers3.ts:53:22: Add a return type to the method constructor(a: typeof x) { super(a); } } @@ -271,8 +271,8 @@ derivedClassOverridesProtectedMembers3.ts(67,7): error TS2417: Class static side !!! error TS2417: Property 't' is protected in type 'typeof Derived8' but public in type 'typeof Base'. protected static get t() { return x; } ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 derivedClassOverridesProtectedMembers3.ts:58:26: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 derivedClassOverridesProtectedMembers3.ts:58:26: Add a return type to the get accessor declaration. constructor(a: typeof x) { super(a); } } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesPublicMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesPublicMembers.d.ts index 6ed4c3b93fe66..7d69b5dedfdcf 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesPublicMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesPublicMembers.d.ts @@ -135,20 +135,20 @@ declare var r8: invalid; /// [Errors] //// -derivedClassOverridesPublicMembers.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(12,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(22,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(28,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(37,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(38,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(39,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(40,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(42,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(43,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(44,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(45,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(59,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -derivedClassOverridesPublicMembers.ts(60,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +derivedClassOverridesPublicMembers.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(12,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(22,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(28,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(37,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(38,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(39,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(40,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(42,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(43,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(44,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(45,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(59,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +derivedClassOverridesPublicMembers.ts(60,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ==== derivedClassOverridesPublicMembers.ts (14 errors) ==== @@ -159,7 +159,7 @@ derivedClassOverridesPublicMembers.ts(60,10): error TS9010: Variable must have a a: typeof x; b(a: typeof x) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesPublicMembers.ts:6:5: Add a return type to the method get c() { return x; } set c(v: typeof x) { } @@ -168,7 +168,7 @@ derivedClassOverridesPublicMembers.ts(60,10): error TS9010: Variable must have a static r: typeof x; static s(a: typeof x) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesPublicMembers.ts:12:12: Add a return type to the method static get t() { return x; } static set t(v: typeof x) { } @@ -181,7 +181,7 @@ derivedClassOverridesPublicMembers.ts(60,10): error TS9010: Variable must have a a: typeof y; b(a: typeof y) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesPublicMembers.ts:22:5: Add a return type to the method get c() { return y; } set c(v: typeof y) { } @@ -190,7 +190,7 @@ derivedClassOverridesPublicMembers.ts(60,10): error TS9010: Variable must have a static r: typeof y; static s(a: typeof y) { } ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 derivedClassOverridesPublicMembers.ts:28:12: Add a return type to the method static get t() { return y; } static set t(a: typeof y) { } @@ -202,37 +202,37 @@ derivedClassOverridesPublicMembers.ts(60,10): error TS9010: Variable must have a var d: Derived = new Derived(y); var r1 = d.a; ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesPublicMembers.ts:37:5: Add a type annotation to the variable r1 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesPublicMembers.ts:37:5: Add a type annotation to the variable r1. var r2 = d.b(y); ~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesPublicMembers.ts:38:5: Add a type annotation to the variable r2 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesPublicMembers.ts:38:5: Add a type annotation to the variable r2. var r3 = d.c; ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesPublicMembers.ts:39:5: Add a type annotation to the variable r3 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesPublicMembers.ts:39:5: Add a type annotation to the variable r3. var r3a = d.d; ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesPublicMembers.ts:40:5: Add a type annotation to the variable r3a +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesPublicMembers.ts:40:5: Add a type annotation to the variable r3a. d.c = y; var r4 = Derived.r; ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesPublicMembers.ts:42:5: Add a type annotation to the variable r4 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesPublicMembers.ts:42:5: Add a type annotation to the variable r4. var r5 = Derived.s(y); ~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesPublicMembers.ts:43:5: Add a type annotation to the variable r5 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesPublicMembers.ts:43:5: Add a type annotation to the variable r5. var r6 = Derived.t; ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesPublicMembers.ts:44:5: Add a type annotation to the variable r6 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesPublicMembers.ts:44:5: Add a type annotation to the variable r6. var r6a = Derived.u; ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesPublicMembers.ts:45:5: Add a type annotation to the variable r6a +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesPublicMembers.ts:45:5: Add a type annotation to the variable r6a. Derived.t = y; class Base2 { @@ -248,11 +248,11 @@ derivedClassOverridesPublicMembers.ts(60,10): error TS9010: Variable must have a var d2: Derived2; var r7 = d2['']; ~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesPublicMembers.ts:59:5: Add a type annotation to the variable r7 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesPublicMembers.ts:59:5: Add a type annotation to the variable r7. var r8 = d2[1]; ~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 derivedClassOverridesPublicMembers.ts:60:5: Add a type annotation to the variable r8 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 derivedClassOverridesPublicMembers.ts:60:5: Add a type annotation to the variable r8. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/duplicateVarsAcrossFileBoundaries.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/duplicateVarsAcrossFileBoundaries.d.ts index 9ea0d8044587e..c33baf4205dfc 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/duplicateVarsAcrossFileBoundaries.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/duplicateVarsAcrossFileBoundaries.d.ts @@ -66,8 +66,8 @@ duplicateVarsAcrossFileBoundaries_1.ts(1,5): error TS2403: Subsequent variable d duplicateVarsAcrossFileBoundaries_2.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. duplicateVarsAcrossFileBoundaries_2.ts(2,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'number'. duplicateVarsAcrossFileBoundaries_2.ts(3,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'boolean'. -duplicateVarsAcrossFileBoundaries_4.ts(3,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -duplicateVarsAcrossFileBoundaries_5.ts(3,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +duplicateVarsAcrossFileBoundaries_4.ts(3,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +duplicateVarsAcrossFileBoundaries_5.ts(3,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ==== duplicateVarsAcrossFileBoundaries_0.ts (0 errors) ==== @@ -105,13 +105,13 @@ duplicateVarsAcrossFileBoundaries_5.ts(3,5): error TS9010: Variable must have an import p = P; var q; ~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 duplicateVarsAcrossFileBoundaries_4.ts:3:5: Add a type annotation to the variable q +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 duplicateVarsAcrossFileBoundaries_4.ts:3:5: Add a type annotation to the variable q. ==== duplicateVarsAcrossFileBoundaries_5.ts (1 errors) ==== module Q { } import q = Q; var p; ~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 duplicateVarsAcrossFileBoundaries_5.ts:3:5: Add a type annotation to the variable p \ No newline at end of file +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 duplicateVarsAcrossFileBoundaries_5.ts:3:5: Add a type annotation to the variable p. \ 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 index 6972bf6b59ff2..e9c5b84d6f2c0 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/dynamicNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/dynamicNames.d.ts @@ -197,10 +197,10 @@ export declare type T3 = { /// [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 +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) ==== @@ -208,8 +208,8 @@ module.ts(3,19): error TS9010: Variable must have an explicit type annotation wi 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 +!!! 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; @@ -339,16 +339,16 @@ module.ts(3,19): error TS9010: Variable must have an explicit type annotation wi // 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 +!!! 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 +!!! 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 +!!! 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; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/escapedIdentifiers.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/escapedIdentifiers.d.ts index e9eb7a90f50da..60d4c1428d2e9 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/escapedIdentifiers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/escapedIdentifiers.d.ts @@ -168,12 +168,12 @@ declare var constructorTestObject: invalid; /// [Errors] //// -escapedIdentifiers.ts(43,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -escapedIdentifiers.ts(45,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -escapedIdentifiers.ts(47,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -escapedIdentifiers.ts(49,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -escapedIdentifiers.ts(72,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -escapedIdentifiers.ts(85,29): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +escapedIdentifiers.ts(43,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +escapedIdentifiers.ts(45,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +escapedIdentifiers.ts(47,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +escapedIdentifiers.ts(49,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +escapedIdentifiers.ts(72,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +escapedIdentifiers.ts(85,29): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ==== escapedIdentifiers.ts (6 errors) ==== @@ -221,23 +221,23 @@ escapedIdentifiers.ts(85,29): error TS9010: Variable must have an explicit type var classType1Object1 = new classType1(); ~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 escapedIdentifiers.ts:43:5: Add a type annotation to the variable classType1Object1 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 escapedIdentifiers.ts:43:5: Add a type annotation to the variable classType1Object1. classType1Object1.foo1 = 2; var classType1Object2 = new classType\u0031(); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 escapedIdentifiers.ts:45:5: Add a type annotation to the variable classType1Object2 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 escapedIdentifiers.ts:45:5: Add a type annotation to the variable classType1Object2. classType1Object2.foo1 = 2; var classType2Object1 = new classType2(); ~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 escapedIdentifiers.ts:47:5: Add a type annotation to the variable classType2Object1 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 escapedIdentifiers.ts:47:5: Add a type annotation to the variable classType2Object1. classType2Object1.foo2 = 2; var classType2Object2 = new classType\u0032(); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 escapedIdentifiers.ts:49:5: Add a type annotation to the variable classType2Object2 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 escapedIdentifiers.ts:49:5: Add a type annotation to the variable classType2Object2. classType2Object2.foo2 = 2; // interfaces @@ -262,7 +262,7 @@ escapedIdentifiers.ts(85,29): error TS9010: Variable must have an explicit type class testClass { public func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number) { ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 escapedIdentifiers.ts:72:12: Add a return type to the method arg\u0031 = 1; arg2 = 'string'; @@ -278,8 +278,8 @@ escapedIdentifiers.ts(85,29): error TS9010: Variable must have an explicit type } var constructorTestObject = new constructorTestClass(1, 'string', true, 2); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 escapedIdentifiers.ts:85:5: Add a type annotation to the variable constructorTestObject +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 escapedIdentifiers.ts:85:5: Add a type annotation to the variable constructorTestObject. constructorTestObject.arg\u0031 = 1; constructorTestObject.arg2 = 'string'; constructorTestObject.arg\u0033 = true; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts index 0d1a11933380c..ed2f14fe87b4b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts @@ -35,8 +35,8 @@ declare enum E1 { forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. forwardRefInEnum.ts(5,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -forwardRefInEnum.ts(7,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations -forwardRefInEnum.ts(8,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations +forwardRefInEnum.ts(7,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. +forwardRefInEnum.ts(8,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. ==== forwardRefInEnum.ts (4 errors) ==== @@ -52,10 +52,10 @@ forwardRefInEnum.ts(8,5): error TS9020: Enum member initializers must be computa // forward reference to the element of the same enum Y = E1.Z, ~ -!!! 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. Y1 = E1["Z"] ~~ -!!! 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 E1 { diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/generatedContextualTyping.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/generatedContextualTyping.d.ts index 3848b97662ebf..f0d0e92900e4f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/generatedContextualTyping.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/generatedContextualTyping.d.ts @@ -1282,65 +1282,65 @@ declare var x356: (n: Genric) => invalid; /// [Errors] //// -generatedContextualTyping.ts(5,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(5,26): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(5,47): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(126,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(127,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(128,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(129,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(130,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(131,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(132,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(133,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(134,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(135,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(136,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(137,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(219,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(220,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(221,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(222,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(223,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(224,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(225,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(226,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -generatedContextualTyping.ts(319,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(320,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(321,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(322,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(323,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(324,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(325,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(326,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(327,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(328,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(329,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(330,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(331,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(332,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(333,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(334,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(335,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(336,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(337,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(338,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(339,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(340,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(341,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(342,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(343,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(344,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(345,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(346,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(347,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(348,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(349,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(350,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(351,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(352,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(353,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -generatedContextualTyping.ts(354,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +generatedContextualTyping.ts(5,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(5,26): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(5,47): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(126,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(127,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(128,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(129,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(130,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(131,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(132,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(133,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(134,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(135,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(136,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(137,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(219,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(220,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(221,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(222,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(223,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(224,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(225,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(226,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(319,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(320,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(321,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(322,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(323,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(324,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(325,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(326,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(327,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(328,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(329,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(330,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(331,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(332,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(333,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(334,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(335,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(336,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(337,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(338,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(339,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(340,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(341,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(342,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(343,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(344,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(345,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(346,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(347,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(348,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(349,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(350,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(351,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(352,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(353,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +generatedContextualTyping.ts(354,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. ==== generatedContextualTyping.ts (59 errors) ==== @@ -1350,14 +1350,14 @@ generatedContextualTyping.ts(354,12): error TS9007: Function must have an explic interface Genric { func(n: T[]); } var b = new Base(), d1 = new Derived1(), d2 = new Derived2(); ~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:5:5: Add a type annotation to the variable b +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:5:5: Add a type annotation to the variable b. ~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:5:21: Add a type annotation to the variable d1 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:5:21: Add a type annotation to the variable d1. ~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:5:42: Add a type annotation to the variable d2 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:5:42: Add a type annotation to the variable d2. var x1: () => Base[] = () => [d1, d2]; var x2: () => Base[] = function() { return [d1, d2] }; var x3: () => Base[] = function named() { return [d1, d2] }; @@ -1480,52 +1480,52 @@ generatedContextualTyping.ts(354,12): error TS9007: Function must have an explic class x120 { constructor(private parm: Genric = { func: n => { return [d1, d2]; } }) { } } function x121(parm: () => Base[] = () => [d1, d2]) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:126:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:126:10: Add a return type to the function declaration. function x122(parm: () => Base[] = function() { return [d1, d2] }) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:127:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:127:10: Add a return type to the function declaration. function x123(parm: () => Base[] = function named() { return [d1, d2] }) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:128:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:128:10: Add a return type to the function declaration. function x124(parm: { (): Base[]; } = () => [d1, d2]) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:129:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:129:10: Add a return type to the function declaration. function x125(parm: { (): Base[]; } = function() { return [d1, d2] }) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:130:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:130:10: Add a return type to the function declaration. function x126(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:131:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:131:10: Add a return type to the function declaration. function x127(parm: Base[] = [d1, d2]) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:132:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:132:10: Add a return type to the function declaration. function x128(parm: Array = [d1, d2]) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:133:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:133:10: Add a return type to the function declaration. function x129(parm: { [n: number]: Base; } = [d1, d2]) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:134:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:134:10: Add a return type to the function declaration. function x130(parm: {n: Base[]; } = { n: [d1, d2] }) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:135:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:135:10: Add a return type to the function declaration. function x131(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:136:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:136:10: Add a return type to the function declaration. function x132(parm: Genric = { func: n => { return [d1, d2]; } }) { } ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:137:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:137:10: Add a return type to the function declaration. function x133(): () => Base[] { return () => [d1, d2]; } function x134(): () => Base[] { return function() { return [d1, d2] }; } function x135(): () => Base[] { return function named() { return [d1, d2] }; } @@ -1609,36 +1609,36 @@ generatedContextualTyping.ts(354,12): error TS9007: Function must have an explic var x216 = >{ func: n => { return [d1, d2]; } }; var x217 = (<() => Base[]>undefined) || function() { return [d1, d2] }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:219:5: Add a type annotation to the variable x217 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:219:5: Add a type annotation to the variable x217. var x218 = (<() => Base[]>undefined) || function named() { return [d1, d2] }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:220:5: Add a type annotation to the variable x218 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:220:5: Add a type annotation to the variable x218. var x219 = (<{ (): Base[]; }>undefined) || function() { return [d1, d2] }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:221:5: Add a type annotation to the variable x219 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:221:5: Add a type annotation to the variable x219. var x220 = (<{ (): Base[]; }>undefined) || function named() { return [d1, d2] }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:222:5: Add a type annotation to the variable x220 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:222:5: Add a type annotation to the variable x220. var x221 = (undefined) || [d1, d2]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:223:5: Add a type annotation to the variable x221 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:223:5: Add a type annotation to the variable x221. var x222 = (>undefined) || [d1, d2]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:224:5: Add a type annotation to the variable x222 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:224:5: Add a type annotation to the variable x222. var x223 = (<{ [n: number]: Base; }>undefined) || [d1, d2]; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:225:5: Add a type annotation to the variable x223 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:225:5: Add a type annotation to the variable x223. var x224 = (<{n: Base[]; } >undefined) || { n: [d1, d2] }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:226:5: Add a type annotation to the variable x224 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:226:5: Add a type annotation to the variable x224. var x225: () => Base[]; x225 = () => [d1, d2]; var x226: () => Base[]; x226 = function() { return [d1, d2] }; var x227: () => Base[]; x227 = function named() { return [d1, d2] }; @@ -1733,169 +1733,169 @@ generatedContextualTyping.ts(354,12): error TS9007: Function must have an explic var x320: Genric = true ? { func: n => { return [d1, d2]; } } : undefined; function x321(n: () => Base[]) { }; x321(() => [d1, d2]); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:319:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:319:10: Add a return type to the function declaration. function x322(n: () => Base[]) { }; x322(function() { return [d1, d2] }); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:320:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:320:10: Add a return type to the function declaration. function x323(n: () => Base[]) { }; x323(function named() { return [d1, d2] }); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:321:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:321:10: Add a return type to the function declaration. function x324(n: { (): Base[]; }) { }; x324(() => [d1, d2]); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:322:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:322:10: Add a return type to the function declaration. function x325(n: { (): Base[]; }) { }; x325(function() { return [d1, d2] }); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:323:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:323:10: Add a return type to the function declaration. function x326(n: { (): Base[]; }) { }; x326(function named() { return [d1, d2] }); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:324:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:324:10: Add a return type to the function declaration. function x327(n: Base[]) { }; x327([d1, d2]); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:325:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:325:10: Add a return type to the function declaration. function x328(n: Array) { }; x328([d1, d2]); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:326:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:326:10: Add a return type to the function declaration. function x329(n: { [n: number]: Base; }) { }; x329([d1, d2]); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:327:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:327:10: Add a return type to the function declaration. function x330(n: {n: Base[]; } ) { }; x330({ n: [d1, d2] }); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:328:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:328:10: Add a return type to the function declaration. function x331(n: (s: Base[]) => any) { }; x331(n => { var n: Base[]; return null; }); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:329:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:329:10: Add a return type to the function declaration. function x332(n: Genric) { }; x332({ func: n => { return [d1, d2]; } }); ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 generatedContextualTyping.ts:330:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 generatedContextualTyping.ts:330:10: Add a return type to the function declaration. var x333 = (n: () => Base[]) => n; x333(() => [d1, d2]); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:331:5: Add a type annotation to the variable x333 -!!! related TS9030 generatedContextualTyping.ts:331:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:331:5: Add a type annotation to the variable x333. +!!! related TS9030 generatedContextualTyping.ts:331:12: Add a return type to the function expression. var x334 = (n: () => Base[]) => n; x334(function() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:332:5: Add a type annotation to the variable x334 -!!! related TS9030 generatedContextualTyping.ts:332:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:332:5: Add a type annotation to the variable x334. +!!! related TS9030 generatedContextualTyping.ts:332:12: Add a return type to the function expression. var x335 = (n: () => Base[]) => n; x335(function named() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:333:5: Add a type annotation to the variable x335 -!!! related TS9030 generatedContextualTyping.ts:333:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:333:5: Add a type annotation to the variable x335. +!!! related TS9030 generatedContextualTyping.ts:333:12: Add a return type to the function expression. var x336 = (n: { (): Base[]; }) => n; x336(() => [d1, d2]); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:334:5: Add a type annotation to the variable x336 -!!! related TS9030 generatedContextualTyping.ts:334:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:334:5: Add a type annotation to the variable x336. +!!! related TS9030 generatedContextualTyping.ts:334:12: Add a return type to the function expression. var x337 = (n: { (): Base[]; }) => n; x337(function() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:335:5: Add a type annotation to the variable x337 -!!! related TS9030 generatedContextualTyping.ts:335:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:335:5: Add a type annotation to the variable x337. +!!! related TS9030 generatedContextualTyping.ts:335:12: Add a return type to the function expression. var x338 = (n: { (): Base[]; }) => n; x338(function named() { return [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:336:5: Add a type annotation to the variable x338 -!!! related TS9030 generatedContextualTyping.ts:336:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:336:5: Add a type annotation to the variable x338. +!!! related TS9030 generatedContextualTyping.ts:336:12: Add a return type to the function expression. var x339 = (n: Base[]) => n; x339([d1, d2]); ~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:337:5: Add a type annotation to the variable x339 -!!! related TS9030 generatedContextualTyping.ts:337:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:337:5: Add a type annotation to the variable x339. +!!! related TS9030 generatedContextualTyping.ts:337:12: Add a return type to the function expression. var x340 = (n: Array) => n; x340([d1, d2]); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:338:5: Add a type annotation to the variable x340 -!!! related TS9030 generatedContextualTyping.ts:338:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:338:5: Add a type annotation to the variable x340. +!!! related TS9030 generatedContextualTyping.ts:338:12: Add a return type to the function expression. var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:339:5: Add a type annotation to the variable x341 -!!! related TS9030 generatedContextualTyping.ts:339:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:339:5: Add a type annotation to the variable x341. +!!! related TS9030 generatedContextualTyping.ts:339:12: Add a return type to the function expression. var x342 = (n: {n: Base[]; } ) => n; x342({ n: [d1, d2] }); ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:340:5: Add a type annotation to the variable x342 -!!! related TS9030 generatedContextualTyping.ts:340:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:340:5: Add a type annotation to the variable x342. +!!! related TS9030 generatedContextualTyping.ts:340:12: Add a return type to the function expression. var x343 = (n: (s: Base[]) => any) => n; x343(n => { var n: Base[]; return null; }); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:341:5: Add a type annotation to the variable x343 -!!! related TS9030 generatedContextualTyping.ts:341:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:341:5: Add a type annotation to the variable x343. +!!! related TS9030 generatedContextualTyping.ts:341:12: Add a return type to the function expression. var x344 = (n: Genric) => n; x344({ func: n => { return [d1, d2]; } }); ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:342:5: Add a type annotation to the variable x344 -!!! related TS9030 generatedContextualTyping.ts:342:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:342:5: Add a type annotation to the variable x344. +!!! related TS9030 generatedContextualTyping.ts:342:12: Add a return type to the function expression. var x345 = function(n: () => Base[]) { }; x345(() => [d1, d2]); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:343:5: Add a type annotation to the variable x345 -!!! related TS9030 generatedContextualTyping.ts:343:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:343:5: Add a type annotation to the variable x345. +!!! related TS9030 generatedContextualTyping.ts:343:12: Add a return type to the function expression. var x346 = function(n: () => Base[]) { }; x346(function() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:344:5: Add a type annotation to the variable x346 -!!! related TS9030 generatedContextualTyping.ts:344:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:344:5: Add a type annotation to the variable x346. +!!! related TS9030 generatedContextualTyping.ts:344:12: Add a return type to the function expression. var x347 = function(n: () => Base[]) { }; x347(function named() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:345:5: Add a type annotation to the variable x347 -!!! related TS9030 generatedContextualTyping.ts:345:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:345:5: Add a type annotation to the variable x347. +!!! related TS9030 generatedContextualTyping.ts:345:12: Add a return type to the function expression. var x348 = function(n: { (): Base[]; }) { }; x348(() => [d1, d2]); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:346:5: Add a type annotation to the variable x348 -!!! related TS9030 generatedContextualTyping.ts:346:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:346:5: Add a type annotation to the variable x348. +!!! related TS9030 generatedContextualTyping.ts:346:12: Add a return type to the function expression. var x349 = function(n: { (): Base[]; }) { }; x349(function() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:347:5: Add a type annotation to the variable x349 -!!! related TS9030 generatedContextualTyping.ts:347:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:347:5: Add a type annotation to the variable x349. +!!! related TS9030 generatedContextualTyping.ts:347:12: Add a return type to the function expression. var x350 = function(n: { (): Base[]; }) { }; x350(function named() { return [d1, d2] }); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:348:5: Add a type annotation to the variable x350 -!!! related TS9030 generatedContextualTyping.ts:348:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:348:5: Add a type annotation to the variable x350. +!!! related TS9030 generatedContextualTyping.ts:348:12: Add a return type to the function expression. var x351 = function(n: Base[]) { }; x351([d1, d2]); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:349:5: Add a type annotation to the variable x351 -!!! related TS9030 generatedContextualTyping.ts:349:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:349:5: Add a type annotation to the variable x351. +!!! related TS9030 generatedContextualTyping.ts:349:12: Add a return type to the function expression. var x352 = function(n: Array) { }; x352([d1, d2]); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:350:5: Add a type annotation to the variable x352 -!!! related TS9030 generatedContextualTyping.ts:350:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:350:5: Add a type annotation to the variable x352. +!!! related TS9030 generatedContextualTyping.ts:350:12: Add a return type to the function expression. var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:351:5: Add a type annotation to the variable x353 -!!! related TS9030 generatedContextualTyping.ts:351:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:351:5: Add a type annotation to the variable x353. +!!! related TS9030 generatedContextualTyping.ts:351:12: Add a return type to the function expression. var x354 = function(n: {n: Base[]; } ) { }; x354({ n: [d1, d2] }); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:352:5: Add a type annotation to the variable x354 -!!! related TS9030 generatedContextualTyping.ts:352:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:352:5: Add a type annotation to the variable x354. +!!! related TS9030 generatedContextualTyping.ts:352:12: Add a return type to the function expression. var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; return null; }); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:353:5: Add a type annotation to the variable x355 -!!! related TS9030 generatedContextualTyping.ts:353:12: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:353:5: Add a type annotation to the variable x355. +!!! related TS9030 generatedContextualTyping.ts:353:12: Add a return type to the function expression. var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 generatedContextualTyping.ts:354:5: Add a type annotation to the variable x356 -!!! related TS9030 generatedContextualTyping.ts:354:12: Add a return type to the function expression \ No newline at end of file +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 generatedContextualTyping.ts:354:5: Add a type annotation to the variable x356. +!!! related TS9030 generatedContextualTyping.ts:354:12: Add a return type to the function expression. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument.d.ts index 48577be53d984..462a2c5b57d9f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument.d.ts @@ -89,7 +89,7 @@ genericTypeReferenceWithoutTypeArgument.ts(11,18): error TS2314: Generic type 'C genericTypeReferenceWithoutTypeArgument.ts(12,11): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. genericTypeReferenceWithoutTypeArgument.ts(12,14): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(12,18): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(14,9): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +genericTypeReferenceWithoutTypeArgument.ts(14,9): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. genericTypeReferenceWithoutTypeArgument.ts(14,13): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(14,28): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(16,15): error TS2314: Generic type 'C' requires 1 type argument(s). @@ -103,9 +103,9 @@ genericTypeReferenceWithoutTypeArgument.ts(23,21): error TS2314: Generic type 'C genericTypeReferenceWithoutTypeArgument.ts(29,18): error TS2314: Generic type 'E' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(30,20): error TS2314: Generic type 'E' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(31,22): error TS2314: Generic type 'E' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(33,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +genericTypeReferenceWithoutTypeArgument.ts(33,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. genericTypeReferenceWithoutTypeArgument.ts(33,22): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +genericTypeReferenceWithoutTypeArgument.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. genericTypeReferenceWithoutTypeArgument.ts(34,22): error TS2314: Generic type 'E' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(36,10): error TS2314: Generic type 'C' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument.ts(37,10): error TS2314: Generic type 'E' requires 1 type argument(s). @@ -141,9 +141,9 @@ genericTypeReferenceWithoutTypeArgument.ts(37,10): error TS2314: Generic type 'E var e = (x: C) => { var y: C; return y; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 genericTypeReferenceWithoutTypeArgument.ts:14:5: Add a type annotation to the variable e -!!! related TS9030 genericTypeReferenceWithoutTypeArgument.ts:14:9: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 genericTypeReferenceWithoutTypeArgument.ts:14:5: Add a type annotation to the variable e. +!!! related TS9030 genericTypeReferenceWithoutTypeArgument.ts:14:9: Add a return type to the function expression. ~ !!! error TS2314: Generic type 'C' requires 1 type argument(s). ~ @@ -190,14 +190,14 @@ genericTypeReferenceWithoutTypeArgument.ts(37,10): error TS2314: Generic type 'E function h(x: T) { } ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 genericTypeReferenceWithoutTypeArgument.ts:33:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 genericTypeReferenceWithoutTypeArgument.ts:33:10: Add a return type to the function declaration. ~ !!! error TS2314: Generic type 'C' requires 1 type argument(s). function i(x: T) { } ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 genericTypeReferenceWithoutTypeArgument.ts:34:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 genericTypeReferenceWithoutTypeArgument.ts:34:10: Add a return type to the function declaration. ~~~ !!! error TS2314: Generic type 'E' requires 1 type argument(s). diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument2.d.ts index 8f98ec2e936be..934d5701ac3d6 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument2.d.ts @@ -89,7 +89,7 @@ genericTypeReferenceWithoutTypeArgument2.ts(11,18): error TS2314: Generic type ' genericTypeReferenceWithoutTypeArgument2.ts(12,11): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. genericTypeReferenceWithoutTypeArgument2.ts(12,14): error TS2314: Generic type 'I' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(12,18): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(14,9): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +genericTypeReferenceWithoutTypeArgument2.ts(14,9): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. genericTypeReferenceWithoutTypeArgument2.ts(14,13): error TS2314: Generic type 'I' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(14,28): error TS2314: Generic type 'I' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(16,15): error TS2314: Generic type 'I' requires 1 type argument(s). @@ -105,9 +105,9 @@ genericTypeReferenceWithoutTypeArgument2.ts(29,18): error TS2708: Cannot use nam genericTypeReferenceWithoutTypeArgument2.ts(29,18): error TS4020: 'extends' clause of exported class 'D2' has or is using private name 'M'. genericTypeReferenceWithoutTypeArgument2.ts(30,24): error TS2314: Generic type 'E' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(31,24): error TS2694: Namespace 'M' has no exported member 'C'. -genericTypeReferenceWithoutTypeArgument2.ts(33,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +genericTypeReferenceWithoutTypeArgument2.ts(33,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. genericTypeReferenceWithoutTypeArgument2.ts(33,22): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +genericTypeReferenceWithoutTypeArgument2.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. genericTypeReferenceWithoutTypeArgument2.ts(34,22): error TS2314: Generic type 'E' requires 1 type argument(s). genericTypeReferenceWithoutTypeArgument2.ts(36,10): error TS2304: Cannot find name 'C'. genericTypeReferenceWithoutTypeArgument2.ts(36,10): error TS4025: Exported variable 'j' has or is using private name 'C'. @@ -144,9 +144,9 @@ genericTypeReferenceWithoutTypeArgument2.ts(37,10): error TS2314: Generic type ' var e = (x: I) => { var y: I; return y; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 genericTypeReferenceWithoutTypeArgument2.ts:14:5: Add a type annotation to the variable e -!!! related TS9030 genericTypeReferenceWithoutTypeArgument2.ts:14:9: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 genericTypeReferenceWithoutTypeArgument2.ts:14:5: Add a type annotation to the variable e. +!!! related TS9030 genericTypeReferenceWithoutTypeArgument2.ts:14:9: Add a return type to the function expression. ~ !!! error TS2314: Generic type 'I' requires 1 type argument(s). ~ @@ -197,14 +197,14 @@ genericTypeReferenceWithoutTypeArgument2.ts(37,10): error TS2314: Generic type ' function h(x: T) { } ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 genericTypeReferenceWithoutTypeArgument2.ts:33:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 genericTypeReferenceWithoutTypeArgument2.ts:33:10: Add a return type to the function declaration. ~ !!! error TS2314: Generic type 'I' requires 1 type argument(s). function i(x: T) { } ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 genericTypeReferenceWithoutTypeArgument2.ts:34:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 genericTypeReferenceWithoutTypeArgument2.ts:34:10: Add a return type to the function declaration. ~~~ !!! error TS2314: Generic type 'E' requires 1 type argument(s). diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts index 4d6897d7c9807..5bcce1543b51c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/giant.d.ts @@ -1079,17 +1079,17 @@ 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(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(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,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(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'. @@ -1098,28 +1098,28 @@ 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(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(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(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,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(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(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(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. @@ -1144,17 +1144,17 @@ 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(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(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,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(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'. @@ -1163,48 +1163,48 @@ 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(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(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(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,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(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(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(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(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(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,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(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,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'. @@ -1213,40 +1213,40 @@ 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(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,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,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(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(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(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(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,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(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,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'. @@ -1255,80 +1255,80 @@ 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(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,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,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(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(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(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(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(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(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(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,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(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(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(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(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(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(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(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. @@ -1800,43 +1800,43 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient } 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 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 +!!! 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) ~~~ @@ -1861,17 +1861,17 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! 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 +!!! 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 +!!! 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 +!!! 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) ~~~ @@ -1882,14 +1882,14 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! 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 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. } @@ -1899,8 +1899,8 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient (): 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 +!!! 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[]); @@ -1942,24 +1942,24 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient 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 +!!! 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: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 +!!! 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: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 +!!! 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; @@ -2091,43 +2091,43 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient } 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 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 +!!! 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) ~~~ @@ -2152,17 +2152,17 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! 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 +!!! 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 +!!! 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 +!!! 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) ~~~ @@ -2173,14 +2173,14 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! 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 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. } @@ -2190,8 +2190,8 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient (): 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 +!!! 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[]); @@ -2233,24 +2233,24 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient 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 +!!! 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: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 +!!! 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: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 +!!! 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; @@ -2260,23 +2260,23 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient 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 +!!! 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 +!!! 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 +!!! 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 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 { }; @@ -2284,12 +2284,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient } 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 +!!! 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 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 { @@ -2298,12 +2298,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! 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 +!!! 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 +!!! 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. @@ -2314,7 +2314,7 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'pgF'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! 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. @@ -2322,13 +2322,13 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! 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 +!!! 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 +!!! 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. @@ -2353,11 +2353,11 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! 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 +!!! 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 +!!! 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. @@ -2365,7 +2365,7 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'tsF'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! 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. @@ -2376,7 +2376,7 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! 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. @@ -2384,18 +2384,18 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! 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 +!!! 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 +!!! 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 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. ~ @@ -2405,12 +2405,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient 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 +!!! 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 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 { } @@ -2420,12 +2420,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient } 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 +!!! 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 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 { @@ -2434,12 +2434,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! 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 +!!! 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 +!!! 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. @@ -2450,7 +2450,7 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'pgF'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! 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. @@ -2458,13 +2458,13 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! 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 +!!! 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 +!!! 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. @@ -2489,11 +2489,11 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! 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 +!!! 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 +!!! 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. @@ -2501,7 +2501,7 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'tsF'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! 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. @@ -2512,7 +2512,7 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! error TS2300: Duplicate identifier 'tgF'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! 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. @@ -2520,18 +2520,18 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~ !!! 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 +!!! 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 +!!! 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 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. ~ @@ -2542,22 +2542,22 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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. @@ -2607,34 +2607,34 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient 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 +!!! 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: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 +!!! 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: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 +!!! 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 +!!! 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 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. ~ @@ -2644,12 +2644,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient 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 +!!! 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 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 { } @@ -2659,14 +2659,14 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient ~~~~~~~ !!! 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 +!!! 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 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 { } @@ -2678,12 +2678,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient } 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 +!!! 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 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 { @@ -2692,22 +2692,22 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient !!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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. @@ -2718,8 +2718,8 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient (): 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 +!!! 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[]); @@ -2761,34 +2761,34 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient 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 +!!! 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: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 +!!! 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: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 +!!! 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 +!!! 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 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. ~ @@ -2797,12 +2797,12 @@ giant.ts(675,30): error TS1183: An implementation cannot be declared in ambient 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 +!!! 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 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 { } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/inKeywordAndIntersection.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/inKeywordAndIntersection.d.ts index 2855cd9cfce3b..7630ba897ab2e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/inKeywordAndIntersection.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/inKeywordAndIntersection.d.ts @@ -59,7 +59,7 @@ declare const ClassOne: (new () => InstanceOne) & { /// [Errors] //// -inKeywordAndIntersection.ts(4,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +inKeywordAndIntersection.ts(4,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. ==== inKeywordAndIntersection.ts (1 errors) ==== @@ -68,8 +68,8 @@ inKeywordAndIntersection.ts(4,10): error TS9007: Function must have an explicit function f10(obj: A & { x: string } | B) { ~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 inKeywordAndIntersection.ts:4:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 inKeywordAndIntersection.ts:4:10: Add a return type to the function declaration. if (obj instanceof Object) { obj; // A & { x: string } | B } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts index 25e05ba7944f7..c480bd47543f4 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts @@ -370,20 +370,20 @@ declare var obj87: i8; /// [Errors] //// -intTypeCheck.ts(9,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -intTypeCheck.ts(10,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -intTypeCheck.ts(10,15): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -intTypeCheck.ts(16,6): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +intTypeCheck.ts(9,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +intTypeCheck.ts(10,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +intTypeCheck.ts(10,15): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +intTypeCheck.ts(16,6): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. intTypeCheck.ts(35,6): error TS2304: Cannot find name 'p'. -intTypeCheck.ts(46,14): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -intTypeCheck.ts(52,6): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +intTypeCheck.ts(46,14): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +intTypeCheck.ts(52,6): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. intTypeCheck.ts(71,6): error TS2304: Cannot find name 'p'. -intTypeCheck.ts(83,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -intTypeCheck.ts(84,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -intTypeCheck.ts(84,13): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +intTypeCheck.ts(83,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +intTypeCheck.ts(84,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +intTypeCheck.ts(84,13): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. intTypeCheck.ts(85,5): error TS2386: Overload signatures must all be optional or required. -intTypeCheck.ts(85,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -intTypeCheck.ts(85,15): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations +intTypeCheck.ts(85,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +intTypeCheck.ts(85,15): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. intTypeCheck.ts(99,5): error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? Type 'Object' is missing the following properties from type 'i1': p, p3, p6 intTypeCheck.ts(100,20): error TS2351: This expression is not constructable. @@ -490,15 +490,15 @@ intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. p5? (): void; p6(pa1): void; ~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 intTypeCheck.ts:9:8: Add a type annotation to the parameter pa1 +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 intTypeCheck.ts:9: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 intTypeCheck.ts:10:10: Add a type annotation to the parameter pa1 +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 intTypeCheck.ts:10:10: Add a type annotation to the parameter pa1. ~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 intTypeCheck.ts:10:15: Add a type annotation to the parameter pa2 +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 intTypeCheck.ts:10:15: Add a type annotation to the parameter pa2. } interface i2 { //Call Signatures @@ -506,8 +506,8 @@ intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. (): number; (p); ~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 intTypeCheck.ts:16:6: Add a type annotation to the parameter p +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 intTypeCheck.ts:16:6: Add a type annotation to the parameter p. (p1: string); (p2?: string); (...p3: any[]); @@ -541,7 +541,7 @@ intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. class Base { foo() { } } ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 intTypeCheck.ts:46:14: Add a return type to the method interface i11 { @@ -550,8 +550,8 @@ intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. (): number; (p); ~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 intTypeCheck.ts:52:6: Add a type annotation to the parameter p +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 intTypeCheck.ts:52:6: Add a type annotation to the parameter p. (p1: string); (p2?: string); (...p3: any[]); @@ -586,24 +586,24 @@ intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. p5? (): void; p6(pa1): void; ~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 intTypeCheck.ts:83:8: Add a type annotation to the parameter pa1 +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 intTypeCheck.ts:83: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 intTypeCheck.ts:84:8: Add a type annotation to the parameter pa1 +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 intTypeCheck.ts:84:8: Add a type annotation to the parameter pa1. ~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 intTypeCheck.ts:84:13: Add a type annotation to the parameter pa2 +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 intTypeCheck.ts:84: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 intTypeCheck.ts:85:10: Add a type annotation to the parameter pa1 +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 intTypeCheck.ts:85:10: Add a type annotation to the parameter pa1. ~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations -!!! related TS9028 intTypeCheck.ts:85:15: Add a type annotation to the parameter pa2 +!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9028 intTypeCheck.ts:85:15: Add a type annotation to the parameter pa2. } var anyVar: any; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrorsClasses.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrorsClasses.d.ts index 2e8f116adedfd..92f592af315ca 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrorsClasses.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrorsClasses.d.ts @@ -94,24 +94,24 @@ 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(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(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(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(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 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,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. @@ -123,11 +123,11 @@ isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralNa 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 +!!! 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 +!!! 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 {} @@ -136,31 +136,31 @@ isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralNa ~ !!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 } @@ -194,23 +194,23 @@ isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralNa [noAnnotationStringName]() { } ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! 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 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 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 TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ~~~~~ !!! error TS7006: Parameter 'value' implicitly has an 'any' type. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrorsObjects.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrorsObjects.d.ts index 951ea9a49bd93..d97a4fae1e5ad 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrorsObjects.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/isolatedDeclarationErrorsObjects.d.ts @@ -118,29 +118,29 @@ 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(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(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(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(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) ==== @@ -152,61 +152,61 @@ isolatedDeclarationErrorsObjects.ts(88,5): error TS9014: Computed properties mus 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 } } @@ -216,22 +216,22 @@ isolatedDeclarationErrorsObjects.ts(88,5): error TS9014: Computed properties mus 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 +!!! 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 +!!! 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 +!!! 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 }, @@ -255,18 +255,18 @@ isolatedDeclarationErrorsObjects.ts(88,5): error TS9014: Computed properties mus [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 +!!! 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 +!!! 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 +!!! 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 }; @@ -277,13 +277,13 @@ isolatedDeclarationErrorsObjects.ts(88,5): error TS9014: Computed properties mus 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 +!!! 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 +!!! 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. } @@ -294,17 +294,17 @@ isolatedDeclarationErrorsObjects.ts(88,5): error TS9014: Computed properties mus 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 +!!! 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 +!!! 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 +!!! 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/literalTypesAndTypeAssertions.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/literalTypesAndTypeAssertions.d.ts index e84e4ad6f765f..c5aac7e44d686 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/literalTypesAndTypeAssertions.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/literalTypesAndTypeAssertions.d.ts @@ -35,10 +35,10 @@ declare let d: invalid; /// [Errors] //// -literalTypesAndTypeAssertions.ts(10,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations -literalTypesAndTypeAssertions.ts(11,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations -literalTypesAndTypeAssertions.ts(12,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations -literalTypesAndTypeAssertions.ts(13,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations +literalTypesAndTypeAssertions.ts(10,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. +literalTypesAndTypeAssertions.ts(11,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. +literalTypesAndTypeAssertions.ts(12,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. +literalTypesAndTypeAssertions.ts(13,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. ==== literalTypesAndTypeAssertions.ts (4 errors) ==== @@ -53,14 +53,14 @@ literalTypesAndTypeAssertions.ts(13,7): error TS9019: Binding elements can't be let { a = "foo" } = { a: "foo" }; ~ -!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations +!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. let { b = "foo" as "foo" } = { b: "bar" }; ~ -!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations +!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. let { c = "foo" } = { c: "bar" as "bar" }; ~ -!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations +!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. let { d = "foo" as "foo" } = { d: "bar" as "bar" }; ~ -!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations +!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts index 8d7cc63700e89..63f451503a866 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts @@ -74,27 +74,27 @@ declare const o1: invalid; /// [Errors] //// -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(3,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(3,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(4,18): error TS2550: Property 'from' does not exist on type 'ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(10,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(10,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(10,13): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(16,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(16,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(17,5): error TS2339: Property 'name' does not exist on type '() => void'. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(20,6): error TS2550: Property 'sign' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(29,18): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,13): error TS2304: Cannot find name 'Proxy'. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(36,1): error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(39,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(39,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(40,5): error TS2550: Property 'flags' does not exist on type 'RegExp'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(44,5): error TS2550: Property 'includes' does not exist on type 'string'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. @@ -103,8 +103,8 @@ modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585 // Using Es6 array function f(x: number, y: number, z: number) { ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:3:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:3:10: Add a return type to the function declaration. return Array.from(arguments); ~~~~ !!! error TS2550: Property 'from' does not exist on type 'ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. @@ -115,8 +115,8 @@ modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585 // Using ES6 collection var m = new Map(); ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:10:5: Add a type annotation to the variable m +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:10:5: Add a type annotation to the variable m. ~~~ !!! error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. m.clear(); @@ -126,8 +126,8 @@ modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585 // Using ES6 function function Baz() { } ~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:16:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:16:10: Add a return type to the function declaration. Baz.name; ~~~~ !!! error TS2339: Property 'name' does not exist on type '() => void'. @@ -142,12 +142,12 @@ modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585 a: 2, [Symbol.hasInstance](value: any) { ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:23:5: Add a type annotation to the variable o +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:23:5: Add a type annotation to the variable o. !!! related TS9034 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:25:5: Add a return type to the method ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:23:5: Add a type annotation to the variable o +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:23:5: Add a type annotation to the variable o. ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. return false; @@ -161,8 +161,8 @@ modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585 var t = {} var p = new Proxy(t, {}); ~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:33:5: Add a type annotation to the variable p +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:33:5: Add a type annotation to the variable p. ~~~~~ !!! error TS2304: Cannot find name 'Proxy'. @@ -174,8 +174,8 @@ modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585 // Using Es6 regexp var reg = new RegExp("/s"); ~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:39:5: Add a type annotation to the variable reg +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:39:5: Add a type annotation to the variable reg. reg.flags; ~~~~~ !!! error TS2550: Property 'flags' does not exist on type 'RegExp'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. @@ -191,19 +191,19 @@ modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585 ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. ~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:47:5: Add a type annotation to the variable s +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:47:5: Add a type annotation to the variable s. // Using ES6 wellknown-symbol const o1 = { [Symbol.hasInstance](value: any) { ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:50:7: Add a type annotation to the variable o1 +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:50:7: Add a type annotation to the variable o1. !!! related TS9034 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:51:5: Add a return type to the method ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:50:7: Add a type annotation to the variable o1 +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:50:7: Add a type annotation to the variable o1. ~~~~~~ !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. return false; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/moduleResolutionWithSuffixes_one_externalTSModule.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/moduleResolutionWithSuffixes_one_externalTSModule.d.ts index 9e346a299c290..7e69022659894 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/moduleResolutionWithSuffixes_one_externalTSModule.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/moduleResolutionWithSuffixes_one_externalTSModule.d.ts @@ -17,7 +17,7 @@ export {}; /// [Errors] //// -/node_modules/some-library/index.ios.ts(1,17): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +/node_modules/some-library/index.ios.ts(1,17): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. ==== /test.ts (0 errors) ==== @@ -26,7 +26,7 @@ export {}; ==== /node_modules/some-library/index.ios.ts (1 errors) ==== export function ios() {} ~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 /node_modules/some-library/index.ios.ts:1:17: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 /node_modules/some-library/index.ios.ts:1:17: Add a return type to the function declaration. ==== /node_modules/some-library/index.ts (0 errors) ==== export function base() {} \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/namedTupleMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/namedTupleMembers.d.ts index f71e9201caeef..16bc2c981b1bf 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/namedTupleMembers.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/namedTupleMembers.d.ts @@ -112,10 +112,10 @@ 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(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) ==== @@ -161,8 +161,8 @@ namedTupleMembers.ts(77,29): error TS9010: Variable must have an explicit type a 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 +!!! 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; } @@ -171,8 +171,8 @@ namedTupleMembers.ts(77,29): error TS9010: Variable must have an explicit type a 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 +!!! 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]; @@ -202,10 +202,10 @@ namedTupleMembers.ts(77,29): error TS9010: Variable must have an explicit type a 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 +!!! 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 +!!! 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/noUncheckedIndexedAccess.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/noUncheckedIndexedAccess.d.ts index e18a9182aa7cf..7358020877e9e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/noUncheckedIndexedAccess.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/noUncheckedIndexedAccess.d.ts @@ -234,7 +234,7 @@ noUncheckedIndexedAccess.ts(79,7): error TS2322: Type 'number | boolean | undefi noUncheckedIndexedAccess.ts(85,1): error TS2322: Type 'undefined' is not assignable to type 'string'. noUncheckedIndexedAccess.ts(90,7): error TS2322: Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. -noUncheckedIndexedAccess.ts(97,13): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +noUncheckedIndexedAccess.ts(97,13): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. noUncheckedIndexedAccess.ts(98,5): error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. Type 'undefined' is not assignable to type 'string'. noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'string | undefined' is not assignable to type 'string'. @@ -402,9 +402,9 @@ noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'string | undefined' is n const fn2 = (key: Key): string => myRecord2[key]; // Should OK const fn3 = (key: Key) => { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 noUncheckedIndexedAccess.ts:97:7: Add a type annotation to the variable fn3 -!!! related TS9030 noUncheckedIndexedAccess.ts:97:13: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 noUncheckedIndexedAccess.ts:97:7: Add a type annotation to the variable fn3. +!!! related TS9030 noUncheckedIndexedAccess.ts:97:13: Add a return type to the function expression. myRecord2[key] = undefined; // Should error ~~~~~~~~~~~~~~ !!! error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. 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 index b8e61dffbbc52..7c4e323e17eab 100644 --- 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 @@ -154,12 +154,12 @@ error TS2468: Cannot find global value 'Promise'. /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,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,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. @@ -175,17 +175,17 @@ error TS2468: Cannot find global value 'Promise'. /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,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,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,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,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'. @@ -339,8 +339,8 @@ error TS2468: Cannot find global value 'Promise'. 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 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')'? ~ @@ -352,8 +352,8 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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')'? ~ @@ -402,15 +402,15 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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 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); @@ -420,15 +420,15 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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 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. 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 index b8e61dffbbc52..7c4e323e17eab 100644 --- 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 @@ -154,12 +154,12 @@ error TS2468: Cannot find global value 'Promise'. /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,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,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. @@ -175,17 +175,17 @@ error TS2468: Cannot find global value 'Promise'. /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,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,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,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,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'. @@ -339,8 +339,8 @@ error TS2468: Cannot find global value 'Promise'. 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 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')'? ~ @@ -352,8 +352,8 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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')'? ~ @@ -402,15 +402,15 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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 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); @@ -420,15 +420,15 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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 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. 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 index e303ea4a73542..58dda95bb2dfc 100644 --- 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 @@ -148,12 +148,12 @@ error TS2468: Cannot find global value 'Promise'. /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,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,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. @@ -169,17 +169,17 @@ error TS2468: Cannot find global value 'Promise'. /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,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,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,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,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`. @@ -328,8 +328,8 @@ error TS2468: Cannot find global value 'Promise'. 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 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')'? ~ @@ -341,8 +341,8 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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')'? ~ @@ -390,15 +390,15 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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 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); @@ -408,15 +408,15 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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 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) ==== 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 index e303ea4a73542..58dda95bb2dfc 100644 --- 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 @@ -148,12 +148,12 @@ error TS2468: Cannot find global value 'Promise'. /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,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,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. @@ -169,17 +169,17 @@ error TS2468: Cannot find global value 'Promise'. /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,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,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,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,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`. @@ -328,8 +328,8 @@ error TS2468: Cannot find global value 'Promise'. 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 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')'? ~ @@ -341,8 +341,8 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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')'? ~ @@ -390,15 +390,15 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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 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); @@ -408,15 +408,15 @@ error TS2468: Cannot find global value 'Promise'. !!! 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 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 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) ==== diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralGettersAndSetters.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralGettersAndSetters.d.ts index c18971c322275..b3ed5159a2b1b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralGettersAndSetters.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralGettersAndSetters.d.ts @@ -153,73 +153,73 @@ declare var getParamType3: invalid; /// [Errors] //// -objectLiteralGettersAndSetters.ts(2,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(3,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(4,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(5,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(6,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(7,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(10,18): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(12,23): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(14,23): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(22,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(30,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(64,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(67,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -objectLiteralGettersAndSetters.ts(76,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +objectLiteralGettersAndSetters.ts(2,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(3,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(4,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(5,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(6,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(7,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(10,18): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(12,23): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(14,23): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(22,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(30,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(64,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(67,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +objectLiteralGettersAndSetters.ts(76,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ==== objectLiteralGettersAndSetters.ts (14 errors) ==== // Get and set accessor with the same name var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 objectLiteralGettersAndSetters.ts:2:50: Add a type to parameter of the set accessor declaration -!!! related TS9032 objectLiteralGettersAndSetters.ts:2:24: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 objectLiteralGettersAndSetters.ts:2:50: Add a type to parameter of the set accessor declaration. +!!! related TS9032 objectLiteralGettersAndSetters.ts:2:24: Add a return type to the get accessor declaration. var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } }; ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 objectLiteralGettersAndSetters.ts:3:50: Add a type to parameter of the set accessor declaration -!!! related TS9032 objectLiteralGettersAndSetters.ts:3:24: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 objectLiteralGettersAndSetters.ts:3:50: Add a type to parameter of the set accessor declaration. +!!! related TS9032 objectLiteralGettersAndSetters.ts:3:24: Add a return type to the get accessor declaration. var sameName3a = { get 0x20() { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; ~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 objectLiteralGettersAndSetters.ts:4:51: Add a type to parameter of the set accessor declaration -!!! related TS9032 objectLiteralGettersAndSetters.ts:4:24: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 objectLiteralGettersAndSetters.ts:4:51: Add a type to parameter of the set accessor declaration. +!!! related TS9032 objectLiteralGettersAndSetters.ts:4:24: Add a return type to the get accessor declaration. var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p: string; } }; ~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 objectLiteralGettersAndSetters.ts:5:49: Add a type to parameter of the set accessor declaration -!!! related TS9032 objectLiteralGettersAndSetters.ts:5:24: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 objectLiteralGettersAndSetters.ts:5:49: Add a type to parameter of the set accessor declaration. +!!! related TS9032 objectLiteralGettersAndSetters.ts:5:24: Add a return type to the get accessor declaration. var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p: string; } }; ~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 objectLiteralGettersAndSetters.ts:6:51: Add a type to parameter of the set accessor declaration -!!! related TS9032 objectLiteralGettersAndSetters.ts:6:24: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 objectLiteralGettersAndSetters.ts:6:51: Add a type to parameter of the set accessor declaration. +!!! related TS9032 objectLiteralGettersAndSetters.ts:6:24: Add a return type to the get accessor declaration. var sameName6a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 objectLiteralGettersAndSetters.ts:7:50: Add a type to parameter of the set accessor declaration -!!! related TS9032 objectLiteralGettersAndSetters.ts:7:24: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 objectLiteralGettersAndSetters.ts:7:50: Add a type to parameter of the set accessor declaration. +!!! related TS9032 objectLiteralGettersAndSetters.ts:7:24: Add a return type to the get accessor declaration. // PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} var callSig1 = { num(n: number) { return '' } }; ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 objectLiteralGettersAndSetters.ts:10:5: Add a type annotation to the variable callSig1 +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 objectLiteralGettersAndSetters.ts:10:5: Add a type annotation to the variable callSig1. !!! related TS9034 objectLiteralGettersAndSetters.ts:10:18: Add a return type to the method var callSig1: { num: (n: number) => string; }; var callSig2 = { num: function (n: number) { return '' } }; ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 objectLiteralGettersAndSetters.ts:12:5: Add a type annotation to the variable callSig2 -!!! related TS9030 objectLiteralGettersAndSetters.ts:12:23: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 objectLiteralGettersAndSetters.ts:12:5: Add a type annotation to the variable callSig2. +!!! related TS9030 objectLiteralGettersAndSetters.ts:12:23: Add a return type to the function expression. var callSig2: { num: (n: number) => string; }; var callSig3 = { num: (n: number) => '' }; ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 objectLiteralGettersAndSetters.ts:14:5: Add a type annotation to the variable callSig3 -!!! related TS9030 objectLiteralGettersAndSetters.ts:14:23: Add a return type to the function expression +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 objectLiteralGettersAndSetters.ts:14:5: Add a type annotation to the variable callSig3. +!!! related TS9030 objectLiteralGettersAndSetters.ts:14:23: Add a return type to the function expression. var callSig3: { num: (n: number) => string; }; // Get accessor only, type of the property is the annotated return type of the get accessor @@ -229,8 +229,8 @@ objectLiteralGettersAndSetters.ts(76,9): error TS9009: At least one accessor mus // Get accessor only, type of the property is the inferred return type of the get accessor var getter2 = { get x() { return ''; } }; ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 objectLiteralGettersAndSetters.ts:22:21: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 objectLiteralGettersAndSetters.ts:22:21: Add a return type to the get accessor declaration. var getter2: { readonly x: string; } // Set accessor only, type of the property is the param type of the set accessor @@ -240,8 +240,8 @@ objectLiteralGettersAndSetters.ts(76,9): error TS9009: At least one accessor mus // Set accessor only, type of the property is Any for an unannotated set accessor var setter2 = { set x(n) { } }; ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 objectLiteralGettersAndSetters.ts:30:21: Add a type to parameter of the set accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 objectLiteralGettersAndSetters.ts:30:21: Add a type to parameter of the set accessor declaration. var setter2: { x: any }; var anyVar: any; @@ -277,16 +277,16 @@ objectLiteralGettersAndSetters.ts(76,9): error TS9009: At least one accessor mus }, get n() { return ''; } ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 objectLiteralGettersAndSetters.ts:60:9: Add a type to parameter of the set accessor declaration -!!! related TS9032 objectLiteralGettersAndSetters.ts:64:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 objectLiteralGettersAndSetters.ts:60:9: Add a type to parameter of the set accessor declaration. +!!! related TS9032 objectLiteralGettersAndSetters.ts:64:9: Add a return type to the get accessor declaration. }; var getParamType2 = { get n() { return ''; }, ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 objectLiteralGettersAndSetters.ts:68:9: Add a type to parameter of the set accessor declaration -!!! related TS9032 objectLiteralGettersAndSetters.ts:67:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 objectLiteralGettersAndSetters.ts:68:9: Add a type to parameter of the set accessor declaration. +!!! related TS9032 objectLiteralGettersAndSetters.ts:67:9: Add a return type to the get accessor declaration. set n(x) { var y = x; var y: string; @@ -297,9 +297,9 @@ objectLiteralGettersAndSetters.ts(76,9): error TS9009: At least one accessor mus var getParamType3 = { get n() { return ''; }, ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 objectLiteralGettersAndSetters.ts:77:9: Add a type to parameter of the set accessor declaration -!!! related TS9032 objectLiteralGettersAndSetters.ts:76:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 objectLiteralGettersAndSetters.ts:77:9: Add a type to parameter of the set accessor declaration. +!!! related TS9032 objectLiteralGettersAndSetters.ts:76:9: Add a return type to the get accessor declaration. set n(x) { var y = x; var y: string; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/optionalChainingInference.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/optionalChainingInference.d.ts index 6307834807bbf..c793c31e17a9c 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/optionalChainingInference.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/optionalChainingInference.d.ts @@ -73,12 +73,12 @@ declare const v8: number; /// [Errors] //// -optionalChainingInference.ts(8,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations -optionalChainingInference.ts(17,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations -optionalChainingInference.ts(20,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations -optionalChainingInference.ts(23,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations -optionalChainingInference.ts(26,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations -optionalChainingInference.ts(29,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations +optionalChainingInference.ts(8,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +optionalChainingInference.ts(17,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +optionalChainingInference.ts(20,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +optionalChainingInference.ts(23,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +optionalChainingInference.ts(26,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. +optionalChainingInference.ts(29,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. ==== optionalChainingInference.ts (6 errors) ==== @@ -91,9 +91,9 @@ optionalChainingInference.ts(29,21): error TS9013: Expression type can't be infe const b1 = { value: su?.length }; ~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 optionalChainingInference.ts:8:7: Add a type annotation to the variable b1 -!!! related TS9035 optionalChainingInference.ts:8:21: Add a type assertion to this expression to make type type explicit +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 optionalChainingInference.ts:8:7: Add a type annotation to the variable b1. +!!! related TS9035 optionalChainingInference.ts:8:21: Add a type assertion to this expression to make type type explicit. const v1: number = unbox(b1); const b2 = { value: su?.length as number | undefined }; @@ -104,37 +104,37 @@ optionalChainingInference.ts(29,21): error TS9013: Expression type can't be infe const b4 = { value: fnu?.() }; ~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 optionalChainingInference.ts:17:7: Add a type annotation to the variable b4 -!!! related TS9035 optionalChainingInference.ts:17:21: Add a type assertion to this expression to make type type explicit +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 optionalChainingInference.ts:17:7: Add a type annotation to the variable b4. +!!! related TS9035 optionalChainingInference.ts:17:21: Add a type assertion to this expression to make type type explicit. const v4: number = unbox(b4); const b5 = { value: su?.["length"] }; ~~~~~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 optionalChainingInference.ts:20:7: Add a type annotation to the variable b5 -!!! related TS9035 optionalChainingInference.ts:20:21: Add a type assertion to this expression to make type type explicit +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 optionalChainingInference.ts:20:7: Add a type annotation to the variable b5. +!!! related TS9035 optionalChainingInference.ts:20:21: Add a type assertion to this expression to make type type explicit. const v5: number = unbox(b5); const b6 = { value: osu?.prop.length }; ~~~~~~~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 optionalChainingInference.ts:23:7: Add a type annotation to the variable b6 -!!! related TS9035 optionalChainingInference.ts:23:21: Add a type assertion to this expression to make type type explicit +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 optionalChainingInference.ts:23:7: Add a type annotation to the variable b6. +!!! related TS9035 optionalChainingInference.ts:23:21: Add a type assertion to this expression to make type type explicit. const v6: number = unbox(b6); const b7 = { value: osu?.prop["length"] }; ~~~~~~~~~~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 optionalChainingInference.ts:26:7: Add a type annotation to the variable b7 -!!! related TS9035 optionalChainingInference.ts:26:21: Add a type assertion to this expression to make type type explicit +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 optionalChainingInference.ts:26:7: Add a type annotation to the variable b7. +!!! related TS9035 optionalChainingInference.ts:26:21: Add a type assertion to this expression to make type type explicit. const v7: number = unbox(b7); const b8 = { value: ofnu?.prop() }; ~~~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations -!!! related TS9027 optionalChainingInference.ts:29:7: Add a type annotation to the variable b8 -!!! related TS9035 optionalChainingInference.ts:29:21: Add a type assertion to this expression to make type type explicit +!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. +!!! related TS9027 optionalChainingInference.ts:29:7: Add a type annotation to the variable b8. +!!! related TS9035 optionalChainingInference.ts:29:21: Add a type assertion to this expression to make type type explicit. const v8: number = unbox(b8); \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts index 626a5823af521..4b6db613a4151 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts @@ -107,19 +107,19 @@ interface I3 { /// [Errors] //// overloadsWithComputedNames.ts(4,5): error TS2389: Function implementation name must be '["B"]'. -overloadsWithComputedNames.ts(8,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +overloadsWithComputedNames.ts(8,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. overloadsWithComputedNames.ts(14,5): error TS2391: Function implementation is missing or not immediately following the declaration. overloadsWithComputedNames.ts(16,5): error TS2389: Function implementation name must be '["bar"]'. overloadsWithComputedNames.ts(28,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -overloadsWithComputedNames.ts(28,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +overloadsWithComputedNames.ts(28,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. overloadsWithComputedNames.ts(29,5): error TS2391: Function implementation is missing or not immediately following the declaration. overloadsWithComputedNames.ts(35,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. overloadsWithComputedNames.ts(42,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -overloadsWithComputedNames.ts(42,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -overloadsWithComputedNames.ts(43,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +overloadsWithComputedNames.ts(42,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +overloadsWithComputedNames.ts(43,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. overloadsWithComputedNames.ts(47,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -overloadsWithComputedNames.ts(47,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -overloadsWithComputedNames.ts(48,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +overloadsWithComputedNames.ts(47,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +overloadsWithComputedNames.ts(48,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is missing or not immediately following the declaration. @@ -135,8 +135,8 @@ overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is mi } let p = new Person(); ~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 overloadsWithComputedNames.ts:8:5: Add a type annotation to the variable p +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 overloadsWithComputedNames.ts:8:5: Add a type annotation to the variable p. p.A(0) p.B(0) @@ -164,7 +164,7 @@ overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is mi ~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. [uniqueSym2](): void; // should error ~~~~~~~~~~~~ !!! error TS2391: Function implementation is missing or not immediately following the declaration. @@ -186,10 +186,10 @@ overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is mi ~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. [strUnion]() { } ~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } class I2 { @@ -197,10 +197,10 @@ overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is mi ~~~~~~~~~~ !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. ~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. [strUnion]() { } ~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. } class C3 { diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNonNullableTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNonNullableTypes.d.ts index 0885ed5afe450..5bb58ff76710f 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNonNullableTypes.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNonNullableTypes.d.ts @@ -47,13 +47,13 @@ declare const d: !number; parseInvalidNonNullableTypes.ts(1,30): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? parseInvalidNonNullableTypes.ts(5,30): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(9,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parseInvalidNonNullableTypes.ts(9,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. parseInvalidNonNullableTypes.ts(9,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(10,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parseInvalidNonNullableTypes.ts(10,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. parseInvalidNonNullableTypes.ts(10,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? -parseInvalidNonNullableTypes.ts(12,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parseInvalidNonNullableTypes.ts(12,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. parseInvalidNonNullableTypes.ts(12,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parseInvalidNonNullableTypes.ts(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. parseInvalidNonNullableTypes.ts(13,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? parseInvalidNonNullableTypes.ts(15,16): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. parseInvalidNonNullableTypes.ts(15,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? @@ -80,27 +80,27 @@ parseInvalidNonNullableTypes.ts(22,10): error TS17020: '!' at the start of a typ function f3(a: string!) {} ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parseInvalidNonNullableTypes.ts:9:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parseInvalidNonNullableTypes.ts:9:10: Add a return type to the function declaration. ~~~~~~~ !!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? function f4(a: number!) {} ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parseInvalidNonNullableTypes.ts:10:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parseInvalidNonNullableTypes.ts:10:10: Add a return type to the function declaration. ~~~~~~~ !!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? function f5(a: !string) {} ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parseInvalidNonNullableTypes.ts:12:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parseInvalidNonNullableTypes.ts:12:10: Add a return type to the function declaration. ~~~~~~~ !!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? function f6(a: !number) {} ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parseInvalidNonNullableTypes.ts:13:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parseInvalidNonNullableTypes.ts:13:10: Add a return type to the function declaration. ~~~~~~~ !!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNullableTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNullableTypes.d.ts index 364545318dcfb..20d6a9457291e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNullableTypes.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNullableTypes.d.ts @@ -53,13 +53,13 @@ parseInvalidNullableTypes.ts(1,30): error TS2677: A type predicate's type must b Type 'string | null' is not assignable to type 'string'. Type 'null' is not assignable to type 'string'. parseInvalidNullableTypes.ts(1,30): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? -parseInvalidNullableTypes.ts(5,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parseInvalidNullableTypes.ts(5,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. parseInvalidNullableTypes.ts(5,16): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string | undefined'? -parseInvalidNullableTypes.ts(6,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parseInvalidNullableTypes.ts(6,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. parseInvalidNullableTypes.ts(6,16): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? -parseInvalidNullableTypes.ts(8,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parseInvalidNullableTypes.ts(8,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. parseInvalidNullableTypes.ts(8,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? -parseInvalidNullableTypes.ts(9,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parseInvalidNullableTypes.ts(9,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. parseInvalidNullableTypes.ts(9,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? parseInvalidNullableTypes.ts(11,25): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? parseInvalidNullableTypes.ts(12,5): error TS2322: Type 'boolean' is not assignable to type 'string'. @@ -86,27 +86,27 @@ parseInvalidNullableTypes.ts(24,8): error TS17019: '?' at the end of a type is n function f2(a: string?) {} ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parseInvalidNullableTypes.ts:5:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parseInvalidNullableTypes.ts:5:10: Add a return type to the function declaration. ~~~~~~~ !!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string | undefined'? function f3(a: number?) {} ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parseInvalidNullableTypes.ts:6:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parseInvalidNullableTypes.ts:6:10: Add a return type to the function declaration. ~~~~~~~ !!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? function f4(a: ?string) {} ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parseInvalidNullableTypes.ts:8:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parseInvalidNullableTypes.ts:8:10: Add a return type to the function declaration. ~~~~~~~ !!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? function f5(a: ?number) {} ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parseInvalidNullableTypes.ts:9:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parseInvalidNullableTypes.ts:9:10: Add a return type to the function declaration. ~~~~~~~ !!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parseTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseTypes.d.ts index 64a23cbd7f7ac..c6487e4d48649 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parseTypes.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parseTypes.d.ts @@ -30,8 +30,8 @@ declare function g(s: string): invalid; /// [Errors] //// -parseTypes.ts(5,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -parseTypes.ts(6,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +parseTypes.ts(5,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +parseTypes.ts(6,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. parseTypes.ts(8,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. Target signature provides too few arguments. Expected 1 or more, but got 0. parseTypes.ts(9,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. @@ -49,12 +49,12 @@ parseTypes.ts(11,1): error TS2322: Type '(s: string) => void' is not assignable var w = <{[x:number]: number; }>null function f() { return 3 }; ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parseTypes.ts:5:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parseTypes.ts:5:10: Add a return type to the function declaration. function g(s: string) { true }; ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 parseTypes.ts:6:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 parseTypes.ts:6:10: Add a return type to the function declaration. y=f; y=g; ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts index 4bdfa3ed67e78..e04701f279955 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts @@ -12,7 +12,7 @@ declare var v: invalid; /// [Errors] //// -parserComputedPropertyName1.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserComputedPropertyName1.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserComputedPropertyName1.ts(1,12): error TS2304: Cannot find name 'e'. parserComputedPropertyName1.ts(1,15): error TS1005: ':' expected. @@ -20,8 +20,8 @@ parserComputedPropertyName1.ts(1,15): error TS1005: ':' expected. ==== parserComputedPropertyName1.ts (3 errors) ==== var v = { [e] }; ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 parserComputedPropertyName1.ts:1:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 parserComputedPropertyName1.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName17.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName17.d.ts index 52cce6d7091cf..ce144e1627dfb 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName17.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName17.d.ts @@ -12,18 +12,18 @@ declare var v: invalid; /// [Errors] //// -parserComputedPropertyName17.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserComputedPropertyName17.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserComputedPropertyName17.ts(1,16): error TS2304: Cannot find name 'e'. -parserComputedPropertyName17.ts(1,19): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +parserComputedPropertyName17.ts(1,19): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ==== parserComputedPropertyName17.ts (3 errors) ==== var v = { set [e](v) { } } ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 parserComputedPropertyName17.ts:1:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 parserComputedPropertyName17.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 parserComputedPropertyName17.ts:1:15: Add a type to parameter of the set accessor declaration \ No newline at end of file +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 parserComputedPropertyName17.ts:1:15: Add a type to parameter of the set accessor declaration. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts index 60e9d37aa99a8..36054a0557a5d 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts @@ -12,14 +12,14 @@ declare var v: invalid; /// [Errors] //// -parserComputedPropertyName2.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserComputedPropertyName2.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. ==== parserComputedPropertyName2.ts (2 errors) ==== var v = { [e]: 1 }; ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 parserComputedPropertyName2.ts:1:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 parserComputedPropertyName2.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts index 1fc76c329885b..dc74a4e6f0469 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts @@ -21,7 +21,7 @@ declare class C { parserComputedPropertyName27.ts(3,6): error TS2304: Cannot find name 'e'. parserComputedPropertyName27.ts(4,6): error TS2304: Cannot find name 'e2'. parserComputedPropertyName27.ts(4,9): error TS1005: ';' expected. -parserComputedPropertyName27.ts(4,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations +parserComputedPropertyName27.ts(4,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. ==== parserComputedPropertyName27.ts (4 errors) ==== @@ -36,6 +36,6 @@ parserComputedPropertyName27.ts(4,11): error TS9012: Property must have an expli ~ !!! error TS1005: ';' expected. ~~~~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations -!!! related TS9029 parserComputedPropertyName27.ts:4:11: Add a type annotation to the property number +!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9029 parserComputedPropertyName27.ts:4:11: Add a type annotation to the property number. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName3.d.ts index 85c0203687f64..b152c535c71bb 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName3.d.ts @@ -12,19 +12,19 @@ declare var v: invalid; /// [Errors] //// -parserComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -parserComputedPropertyName3.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +parserComputedPropertyName3.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserComputedPropertyName3.ts(1,12): error TS2304: Cannot find name 'e'. ==== parserComputedPropertyName3.ts (3 errors) ==== var v = { [e]() { } }; ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 parserComputedPropertyName3.ts:1:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 parserComputedPropertyName3.ts:1:5: Add a type annotation to the variable v. !!! related TS9034 parserComputedPropertyName3.ts:1:11: Add a return type to the method ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 parserComputedPropertyName3.ts:1:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 parserComputedPropertyName3.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts index a65be4cc7e266..6c6cb7ac49591 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts @@ -14,7 +14,7 @@ declare var v: invalid; /// [Errors] //// -parserComputedPropertyName37.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserComputedPropertyName37.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserComputedPropertyName37.ts(2,6): error TS2304: Cannot find name 'public'. @@ -22,8 +22,8 @@ parserComputedPropertyName37.ts(2,6): error TS2304: Cannot find name 'public'. var v = { [public]: 0 ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 parserComputedPropertyName37.ts:1:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 parserComputedPropertyName37.ts:1:5: Add a type annotation to the variable v. ~~~~~~ !!! error TS2304: Cannot find name 'public'. }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName4.d.ts index 3da0cfd0023f9..08e459a246145 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName4.d.ts @@ -13,8 +13,8 @@ declare var v: invalid; /// [Errors] //// parserComputedPropertyName4.ts(1,15): error TS2378: A 'get' accessor must return a value. -parserComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -parserComputedPropertyName4.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +parserComputedPropertyName4.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. @@ -23,10 +23,10 @@ parserComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. ~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 parserComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 parserComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 parserComputedPropertyName4.ts:1:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 parserComputedPropertyName4.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName5.d.ts index a4bca591d42bf..c3c215ae91b95 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName5.d.ts @@ -14,8 +14,8 @@ declare var v: invalid; parserComputedPropertyName5.ts(1,11): error TS1042: 'public' modifier cannot be used here. parserComputedPropertyName5.ts(1,22): error TS2378: A 'get' accessor must return a value. -parserComputedPropertyName5.ts(1,22): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -parserComputedPropertyName5.ts(1,22): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserComputedPropertyName5.ts(1,22): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +parserComputedPropertyName5.ts(1,22): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserComputedPropertyName5.ts(1,23): error TS2304: Cannot find name 'e'. @@ -26,10 +26,10 @@ parserComputedPropertyName5.ts(1,23): error TS2304: Cannot find name 'e'. ~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 parserComputedPropertyName5.ts:1:22: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 parserComputedPropertyName5.ts:1:22: Add a return type to the get accessor declaration. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 parserComputedPropertyName5.ts:1:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 parserComputedPropertyName5.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts index 4a3ad01382fb9..aa5cd55dcd4b4 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts @@ -12,9 +12,9 @@ declare var v: invalid; /// [Errors] //// -parserComputedPropertyName6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserComputedPropertyName6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserComputedPropertyName6.ts(1,12): error TS2304: Cannot find name 'e'. -parserComputedPropertyName6.ts(1,19): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserComputedPropertyName6.ts(1,19): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserComputedPropertyName6.ts(1,20): error TS2304: Cannot find name 'e'. parserComputedPropertyName6.ts(1,24): error TS2304: Cannot find name 'e'. @@ -22,13 +22,13 @@ parserComputedPropertyName6.ts(1,24): error TS2304: Cannot find name 'e'. ==== parserComputedPropertyName6.ts (5 errors) ==== var v = { [e]: 1, [e + e]: 2 }; ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 parserComputedPropertyName6.ts:1:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 parserComputedPropertyName6.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 parserComputedPropertyName6.ts:1:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 parserComputedPropertyName6.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. ~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts index d853438535753..cab4fd86a1d55 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts @@ -12,14 +12,14 @@ declare var v: invalid; /// [Errors] //// -parserES5ComputedPropertyName2.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserES5ComputedPropertyName2.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserES5ComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. ==== parserES5ComputedPropertyName2.ts (2 errors) ==== var v = { [e]: 1 }; ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 parserES5ComputedPropertyName2.ts:1:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 parserES5ComputedPropertyName2.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName3.d.ts index 331b30534483d..45f6bb4f18b99 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName3.d.ts @@ -12,19 +12,19 @@ declare var v: invalid; /// [Errors] //// -parserES5ComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -parserES5ComputedPropertyName3.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserES5ComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +parserES5ComputedPropertyName3.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserES5ComputedPropertyName3.ts(1,12): error TS2304: Cannot find name 'e'. ==== parserES5ComputedPropertyName3.ts (3 errors) ==== var v = { [e]() { } }; ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 parserES5ComputedPropertyName3.ts:1:5: Add a type annotation to the variable v +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 parserES5ComputedPropertyName3.ts:1:5: Add a type annotation to the variable v. !!! related TS9034 parserES5ComputedPropertyName3.ts:1:11: Add a return type to the method ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 parserES5ComputedPropertyName3.ts:1:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 parserES5ComputedPropertyName3.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName4.d.ts index 9f36e0a970c41..3bd78e32530d3 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName4.d.ts @@ -13,8 +13,8 @@ declare var v: invalid; /// [Errors] //// parserES5ComputedPropertyName4.ts(1,15): error TS2378: A 'get' accessor must return a value. -parserES5ComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -parserES5ComputedPropertyName4.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +parserES5ComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +parserES5ComputedPropertyName4.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. parserES5ComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. @@ -23,10 +23,10 @@ parserES5ComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. ~~~ !!! error TS2378: A 'get' accessor must return a value. ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 parserES5ComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 parserES5ComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 parserES5ComputedPropertyName4.ts:1:5: Add a type annotation to the variable v +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 parserES5ComputedPropertyName4.ts:1:5: Add a type annotation to the variable v. ~ !!! error TS2304: Cannot find name 'e'. \ 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 index e830f4cb01948..3f7954f937255 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/renamingDestructuredPropertyInFunctionType.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/renamingDestructuredPropertyInFunctionType.d.ts @@ -135,55 +135,55 @@ renamingDestructuredPropertyInFunctionType.ts(5,17): error TS2842: 'string' is a 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(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(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(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(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,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,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,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,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,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,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,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,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(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(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(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) ==== @@ -205,23 +205,23 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter mu !!! 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 } +!!! 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 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 } +!!! 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] +!!! 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 @@ -238,37 +238,37 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter mu !!! 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 } +!!! 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 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 } +!!! 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] +!!! 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 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 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. @@ -277,22 +277,22 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter mu !!! 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 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 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 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. @@ -301,8 +301,8 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter mu !!! 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 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. @@ -311,8 +311,8 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter mu 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 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. @@ -320,8 +320,8 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter mu (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 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. @@ -329,8 +329,8 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter mu 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 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. @@ -339,18 +339,18 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter mu // 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 +!!! 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 +!!! 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 +!!! 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'. @@ -360,8 +360,8 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter mu 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 +!!! 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 = { @@ -371,37 +371,37 @@ renamingDestructuredPropertyInFunctionType.ts(63,15): error TS9011: Parameter mu }; 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 +!!! 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 +!!! 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 +!!! 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 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 } +!!! 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 +!!! 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 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 } +!!! 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/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts index 023ea80f5fdd1..6e92b68a5b965 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts @@ -453,16 +453,16 @@ staticPropertyNameConflicts.ts(228,16): error TS2699: Static property 'name' con staticPropertyNameConflicts.ts(234,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticName'. staticPropertyNameConflicts.ts(240,16): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. staticPropertyNameConflicts.ts(246,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticNameFn'. -staticPropertyNameConflicts.ts(246,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -staticPropertyNameConflicts.ts(247,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(246,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +staticPropertyNameConflicts.ts(247,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. staticPropertyNameConflicts.ts(252,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(253,16): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. staticPropertyNameConflicts.ts(259,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLength'. staticPropertyNameConflicts.ts(264,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(265,16): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. staticPropertyNameConflicts.ts(271,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLengthFn'. -staticPropertyNameConflicts.ts(271,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(271,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. @@ -471,24 +471,24 @@ staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prot staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. staticPropertyNameConflicts.ts(296,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. -staticPropertyNameConflicts.ts(296,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -staticPropertyNameConflicts.ts(297,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(296,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +staticPropertyNameConflicts.ts(297,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. staticPropertyNameConflicts.ts(302,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(303,16): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. staticPropertyNameConflicts.ts(309,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCaller'. staticPropertyNameConflicts.ts(314,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(315,16): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. staticPropertyNameConflicts.ts(321,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCallerFn'. -staticPropertyNameConflicts.ts(321,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -staticPropertyNameConflicts.ts(322,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(321,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +staticPropertyNameConflicts.ts(322,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. staticPropertyNameConflicts.ts(327,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(328,16): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. staticPropertyNameConflicts.ts(334,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArguments'. staticPropertyNameConflicts.ts(339,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(340,16): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. staticPropertyNameConflicts.ts(346,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArgumentsFn'. -staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== staticPropertyNameConflicts.ts (84 errors) ==== @@ -835,11 +835,11 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticNameFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:246:12: Add a return type to the method [FunctionPropertyNames.name]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:247:5: Add a return type to the method } @@ -878,11 +878,11 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLengthFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:271:12: Add a return type to the method [FunctionPropertyNames.length]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:272:5: Add a return type to the method } @@ -925,11 +925,11 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:296:12: Add a return type to the method [FunctionPropertyNames.prototype]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:297:5: Add a return type to the method } @@ -968,11 +968,11 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCallerFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:321:12: Add a return type to the method [FunctionPropertyNames.caller]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:322:5: Add a return type to the method } @@ -1011,10 +1011,10 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArgumentsFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:346:12: Add a return type to the method [FunctionPropertyNames.arguments]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:347:5: Add a return type to the method } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts index 3b31360a14e0e..59eaae2355e76 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts @@ -417,12 +417,12 @@ staticPropertyNameConflicts.ts(171,12): error TS2300: Duplicate identifier 'prot staticPropertyNameConflicts.ts(171,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous'. staticPropertyNameConflicts.ts(176,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. staticPropertyNameConflicts.ts(176,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous2'. -staticPropertyNameConflicts.ts(246,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -staticPropertyNameConflicts.ts(247,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(246,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +staticPropertyNameConflicts.ts(247,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. staticPropertyNameConflicts.ts(252,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(264,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(271,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(271,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. @@ -431,16 +431,16 @@ staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prot staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. staticPropertyNameConflicts.ts(296,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. -staticPropertyNameConflicts.ts(296,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -staticPropertyNameConflicts.ts(297,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(296,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +staticPropertyNameConflicts.ts(297,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. staticPropertyNameConflicts.ts(302,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(314,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(321,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -staticPropertyNameConflicts.ts(322,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(321,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +staticPropertyNameConflicts.ts(322,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. staticPropertyNameConflicts.ts(327,12): error TS1319: A default export can only be used in an ECMAScript-style module. staticPropertyNameConflicts.ts(339,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. ==== staticPropertyNameConflicts.ts (36 errors) ==== @@ -715,11 +715,11 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici export class ExportedStaticNameFn { static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:246:12: Add a return type to the method [FunctionPropertyNames.name]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:247:5: Add a return type to the method } @@ -750,11 +750,11 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici export class ExportedStaticLengthFn { static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:271:12: Add a return type to the method [FunctionPropertyNames.length]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:272:5: Add a return type to the method } @@ -797,11 +797,11 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:296:12: Add a return type to the method [FunctionPropertyNames.prototype]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:297:5: Add a return type to the method } @@ -832,11 +832,11 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici export class ExportedStaticCallerFn { static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:321:12: Add a return type to the method [FunctionPropertyNames.caller]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:322:5: Add a return type to the method } @@ -867,10 +867,10 @@ staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explici export class ExportedStaticArgumentsFn { static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:346:12: Add a return type to the method [FunctionPropertyNames.arguments]() {} // ok ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 staticPropertyNameConflicts.ts:347:5: Add a return type to the method } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess1.d.ts index 417b85f47b4d0..adfffcd1e5e40 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess1.d.ts @@ -28,21 +28,21 @@ declare class Bar extends Foo { /// [Errors] //// -superSymbolIndexedAccess1.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -superSymbolIndexedAccess1.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -superSymbolIndexedAccess1.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +superSymbolIndexedAccess1.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +superSymbolIndexedAccess1.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +superSymbolIndexedAccess1.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== superSymbolIndexedAccess1.ts (3 errors) ==== var symbol = Symbol.for('myThing'); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 superSymbolIndexedAccess1.ts:1:5: Add a type annotation to the variable symbol +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 superSymbolIndexedAccess1.ts:1:5: Add a type annotation to the variable symbol. class Foo { [symbol]() { ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. return 0; } } @@ -50,7 +50,7 @@ superSymbolIndexedAccess1.ts(10,5): error TS9014: Computed properties must be nu class Bar extends Foo { [symbol]() { ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. return super[symbol](); } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess3.d.ts index 46f6c5eb0e911..4d7e6275b50af 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess3.d.ts @@ -28,22 +28,22 @@ declare class Bar extends Foo { /// [Errors] //// -superSymbolIndexedAccess3.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -superSymbolIndexedAccess3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -superSymbolIndexedAccess3.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +superSymbolIndexedAccess3.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +superSymbolIndexedAccess3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +superSymbolIndexedAccess3.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. superSymbolIndexedAccess3.ts(11,22): error TS2538: Type 'typeof Bar' cannot be used as an index type. ==== superSymbolIndexedAccess3.ts (4 errors) ==== var symbol = Symbol.for('myThing'); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 superSymbolIndexedAccess3.ts:1:5: Add a type annotation to the variable symbol +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 superSymbolIndexedAccess3.ts:1:5: Add a type annotation to the variable symbol. class Foo { [symbol]() { ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. return 0; } } @@ -51,7 +51,7 @@ superSymbolIndexedAccess3.ts(11,22): error TS2538: Type 'typeof Bar' cannot be u class Bar extends Foo { [symbol]() { ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. return super[Bar](); ~~~ !!! error TS2538: Type 'typeof Bar' cannot be used as an index type. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess4.d.ts index ebd32fc4e0993..be51df8df1074 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess4.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess4.d.ts @@ -20,21 +20,21 @@ declare class Bar { /// [Errors] //// -superSymbolIndexedAccess4.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -superSymbolIndexedAccess4.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +superSymbolIndexedAccess4.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +superSymbolIndexedAccess4.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. superSymbolIndexedAccess4.ts(5,16): error TS2335: 'super' can only be referenced in a derived class. ==== superSymbolIndexedAccess4.ts (3 errors) ==== var symbol = Symbol.for('myThing'); ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 superSymbolIndexedAccess4.ts:1:5: Add a type annotation to the variable symbol +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 superSymbolIndexedAccess4.ts:1:5: Add a type annotation to the variable symbol. class Bar { [symbol]() { ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. return super[symbol](); ~~~~~ !!! error TS2335: 'super' can only be referenced in a derived class. diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess5.d.ts index 1a1bb0b215e60..b4f2e0a466a4a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess5.d.ts @@ -28,8 +28,8 @@ declare class Bar extends Foo { /// [Errors] //// -superSymbolIndexedAccess5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -superSymbolIndexedAccess5.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +superSymbolIndexedAccess5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +superSymbolIndexedAccess5.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== superSymbolIndexedAccess5.ts (2 errors) ==== @@ -38,7 +38,7 @@ superSymbolIndexedAccess5.ts(10,5): error TS9014: Computed properties must be nu class Foo { [symbol]() { ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. return 0; } } @@ -46,7 +46,7 @@ superSymbolIndexedAccess5.ts(10,5): error TS9014: Computed properties must be nu class Bar extends Foo { [symbol]() { ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. return super[symbol](); } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess6.d.ts index 6a971a54194e5..628f2c7be6b59 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess6.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess6.d.ts @@ -28,8 +28,8 @@ declare class Bar extends Foo { /// [Errors] //// -superSymbolIndexedAccess6.ts(4,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -superSymbolIndexedAccess6.ts(10,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +superSymbolIndexedAccess6.ts(4,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +superSymbolIndexedAccess6.ts(10,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== superSymbolIndexedAccess6.ts (2 errors) ==== @@ -38,7 +38,7 @@ superSymbolIndexedAccess6.ts(10,12): error TS9014: Computed properties must be n class Foo { static [symbol]() { ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. return 0; } } @@ -46,7 +46,7 @@ superSymbolIndexedAccess6.ts(10,12): error TS9014: Computed properties must be n class Bar extends Foo { static [symbol]() { ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. return super[symbol](); } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts index bc8d7c67c937f..b506f85c8002e 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts @@ -20,11 +20,11 @@ declare var x: invalid; /// [Errors] //// -symbolProperty1.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -symbolProperty1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -symbolProperty1.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -symbolProperty1.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -symbolProperty1.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +symbolProperty1.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +symbolProperty1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +symbolProperty1.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +symbolProperty1.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +symbolProperty1.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== symbolProperty1.ts (5 errors) ==== @@ -32,23 +32,23 @@ symbolProperty1.ts(5,9): error TS9014: Computed properties must be number or str var x = { [s]: 0, ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x. [s]() { }, ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x. !!! related TS9034 symbolProperty1.ts:4:5: Add a return type to the method ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x. get [s]() { ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 symbolProperty1.ts:5:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 symbolProperty1.ts:5:9: Add a return type to the get accessor declaration. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x. return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts index ce7cb0710720d..485bc2dacf457 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts @@ -20,39 +20,39 @@ declare var x: invalid; /// [Errors] //// -symbolProperty2.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -symbolProperty2.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -symbolProperty2.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -symbolProperty2.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -symbolProperty2.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -symbolProperty2.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +symbolProperty2.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +symbolProperty2.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +symbolProperty2.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +symbolProperty2.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +symbolProperty2.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +symbolProperty2.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== symbolProperty2.ts (6 errors) ==== var s = Symbol(); ~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 symbolProperty2.ts:1:5: Add a type annotation to the variable s +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 symbolProperty2.ts:1:5: Add a type annotation to the variable s. var x = { [s]: 0, ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x. [s]() { }, ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x. !!! related TS9034 symbolProperty2.ts:4:5: Add a return type to the method ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x. get [s]() { ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 symbolProperty2.ts:5:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 symbolProperty2.ts:5:9: Add a return type to the get accessor declaration. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x. return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts index 286cca2a6fafd..0a349e576a791 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts @@ -20,48 +20,48 @@ declare var x: invalid; /// [Errors] //// -symbolProperty3.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +symbolProperty3.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. symbolProperty3.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty3.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +symbolProperty3.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. symbolProperty3.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -symbolProperty3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +symbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +symbolProperty3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. symbolProperty3.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty3.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -symbolProperty3.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +symbolProperty3.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +symbolProperty3.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== symbolProperty3.ts (9 errors) ==== var s = Symbol; ~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 symbolProperty3.ts:1:5: Add a type annotation to the variable s +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 symbolProperty3.ts:1:5: Add a type annotation to the variable s. var x = { [s]: 0, ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x. [s]() { }, ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x. !!! related TS9034 symbolProperty3.ts:4:5: Add a return type to the method ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x. get [s]() { ~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 symbolProperty3.ts:5:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 symbolProperty3.ts:5:9: Add a return type to the get accessor declaration. ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x. return 0; } } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts index 1ceae306fa140..9dc32259545f7 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts @@ -18,7 +18,7 @@ declare var obj: invalid; /// [Errors] //// -symbolProperty52.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +symbolProperty52.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. symbolProperty52.ts(2,13): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. symbolProperty52.ts(7,12): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. @@ -27,8 +27,8 @@ symbolProperty52.ts(7,12): error TS2339: Property 'nonsense' does not exist on t var obj = { [Symbol.nonsense]: 0 ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 symbolProperty52.ts:1:5: Add a type annotation to the variable obj +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 symbolProperty52.ts:1:5: Add a type annotation to the variable obj. ~~~~~~~~ !!! error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. }; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts index e7d7b00de47cc..a69ff386c7bc7 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts @@ -17,7 +17,7 @@ declare var obj: invalid; /// [Errors] //// symbolProperty53.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty53.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +symbolProperty53.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. symbolProperty53.ts(5,5): error TS2538: Type '(key: string) => symbol' cannot be used as an index type. @@ -27,8 +27,8 @@ symbolProperty53.ts(5,5): error TS2538: Type '(key: string) => symbol' cannot be ~~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 symbolProperty53.ts:1:5: Add a type annotation to the variable obj +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 symbolProperty53.ts:1:5: Add a type annotation to the variable obj. }; obj[Symbol.for]; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts index c694c0341cb74..2a69012fee7bf 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts @@ -15,7 +15,7 @@ declare var obj: invalid; /// [Errors] //// symbolProperty54.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty54.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +symbolProperty54.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== symbolProperty54.ts (2 errors) ==== @@ -24,6 +24,6 @@ symbolProperty54.ts(2,5): error TS9014: Computed properties must be number or st ~~~~~~~~~~~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 symbolProperty54.ts:1:5: Add a type annotation to the variable obj +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 symbolProperty54.ts:1:5: Add a type annotation to the variable obj. }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts index 2c12c37c3533a..74047242805b4 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts @@ -21,7 +21,7 @@ declare var obj: invalid; /// [Errors] //// -symbolProperty58.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +symbolProperty58.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ==== symbolProperty58.ts (1 errors) ==== @@ -32,6 +32,6 @@ symbolProperty58.ts(6,5): error TS9014: Computed properties must be number or st var obj = { [Symbol.foo]: 0 ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations -!!! related TS9027 symbolProperty58.ts:5:5: Add a type annotation to the variable obj +!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. +!!! related TS9027 symbolProperty58.ts:5:5: Add a type annotation to the variable obj. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeErrors.d.ts index 0342ac1bfe5e0..ab977f59595b8 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeErrors.d.ts @@ -145,10 +145,10 @@ thisTypeErrors.ts(29,19): error TS2526: A 'this' type is available only in a non thisTypeErrors.ts(29,26): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeErrors.ts(35,19): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeErrors.ts(36,20): error TS2331: 'this' cannot be referenced in a module or namespace body. -thisTypeErrors.ts(36,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +thisTypeErrors.ts(36,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. thisTypeErrors.ts(41,14): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeErrors.ts(41,21): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(45,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +thisTypeErrors.ts(45,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. thisTypeErrors.ts(46,23): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeErrors.ts(46,30): error TS2526: A 'this' type is available only in a non-static member of a class or interface. thisTypeErrors.ts(50,18): error TS2526: A 'this' type is available only in a non-static member of a class or interface. @@ -241,8 +241,8 @@ thisTypeErrors.ts(50,25): error TS2526: A 'this' type is available only in a non ~~~~ !!! error TS2331: 'this' cannot be referenced in a module or namespace body. ~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 thisTypeErrors.ts:36:16: Add a type annotation to the variable y +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 thisTypeErrors.ts:36:16: Add a type annotation to the variable y. } class C3 { @@ -257,7 +257,7 @@ thisTypeErrors.ts(50,25): error TS2526: A 'this' type is available only in a non } f() { ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations +!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. !!! related TS9034 thisTypeErrors.ts:45:5: Add a return type to the method function g(x: this): this { ~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeInAccessors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeInAccessors.d.ts index 5710ac8b7ecf5..46ceccc1c5691 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeInAccessors.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeInAccessors.d.ts @@ -76,12 +76,12 @@ thisTypeInAccessors.ts(8,11): error TS2784: 'get' and 'set' accessors cannot dec thisTypeInAccessors.ts(9,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. thisTypeInAccessors.ts(13,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. thisTypeInAccessors.ts(19,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(23,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +thisTypeInAccessors.ts(23,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. thisTypeInAccessors.ts(23,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. thisTypeInAccessors.ts(24,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. thisTypeInAccessors.ts(29,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. thisTypeInAccessors.ts(30,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(34,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations +thisTypeInAccessors.ts(34,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. ==== thisTypeInAccessors.ts (10 errors) ==== @@ -117,9 +117,9 @@ thisTypeInAccessors.ts(34,9): error TS9009: At least one accessor must have an e n: 16, get x(this: Foo) { return this.n }, ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9033 thisTypeInAccessors.ts:24:9: Add a type to parameter of the set accessor declaration -!!! related TS9032 thisTypeInAccessors.ts:23:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9033 thisTypeInAccessors.ts:24:9: Add a type to parameter of the set accessor declaration. +!!! related TS9032 thisTypeInAccessors.ts:23:9: Add a return type to the get accessor declaration. ~~~~~~~~~ !!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. set x(this, n) { this.n = n; } @@ -140,7 +140,7 @@ thisTypeInAccessors.ts(34,9): error TS9009: At least one accessor must have an e n = 21; get x() { return this.n } // inside a class, so already correct ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9032 thisTypeInAccessors.ts:34:9: Add a return type to the get accessor declaration +!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9032 thisTypeInAccessors.ts:34:9: Add a return type to the get accessor declaration. } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment32.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment32.d.ts index d02bd9e23e49a..462577add5337 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment32.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment32.d.ts @@ -55,12 +55,12 @@ declare namespace ExpandoMerge { /// [Errors] //// -expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. expando.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. expando.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. expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. @@ -68,8 +68,8 @@ ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different fil ==== expando.ts (6 errors) ==== function ExpandoMerge(n: number) { ~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 expando.ts:1:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 expando.ts:1:10: Add a return type to the function declaration. return n; } ExpandoMerge.p1 = 111 @@ -92,8 +92,8 @@ ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different fil !!! error TS2322: Type 'boolean' is not assignable to type 'number'. var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n. ==== ns.ts (2 errors) ==== namespace ExpandoMerge { diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment33.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment33.d.ts index 4544c745ba9ea..e2d540d4aade4 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment33.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment33.d.ts @@ -57,12 +57,12 @@ declare namespace ExpandoMerge { /// [Errors] //// -expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations +expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. expando.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. expando.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. expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. @@ -89,8 +89,8 @@ ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different fil ==== expando.ts (6 errors) ==== function ExpandoMerge(n: number) { ~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations -!!! related TS9031 expando.ts:1:10: Add a return type to the function declaration +!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. +!!! related TS9031 expando.ts:1:10: Add a return type to the function declaration. return n; } ExpandoMerge.p1 = 111 @@ -113,7 +113,7 @@ ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different fil !!! error TS2322: Type 'boolean' is not assignable to type 'number'. var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n. \ 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 index 0c81b2e4cab91..e8482a871cc8b 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives11.d.ts @@ -24,15 +24,15 @@ 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(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 +!!! 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 } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives13.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives13.d.ts index 13340bbcee849..85405f4a243f0 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives13.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives13.d.ts @@ -25,13 +25,13 @@ export interface A { /// [Errors] //// -/app.ts(1,23): error TS9025: Reference directives are not supported in isolated declaration mode. +/app.ts(1,23): error TS9025: Reference directives are not supported with --isolatedDeclarations. ==== /app.ts (1 errors) ==== /// ~~~ -!!! error TS9025: Reference directives are not supported in isolated declaration mode. +!!! error TS9025: Reference directives are not supported with --isolatedDeclarations. import {$} from "./ref"; export interface A { x: () => typeof $ diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives5.d.ts index 9b2d6eda9838f..e4b3ec017b3b8 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives5.d.ts @@ -24,13 +24,13 @@ export interface A { /// [Errors] //// -/app.ts(1,23): error TS9025: Reference directives are not supported in isolated declaration mode. +/app.ts(1,23): error TS9025: Reference directives are not supported with --isolatedDeclarations. ==== /app.ts (1 errors) ==== /// ~~~ -!!! error TS9025: Reference directives are not supported in isolated declaration mode. +!!! error TS9025: Reference directives are not supported with --isolatedDeclarations. import {$} from "./ref"; export interface A { x: typeof $; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts index a33c860fcabab..c13cd850b26a5 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts @@ -23,15 +23,15 @@ 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(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 +!!! 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 } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts index ac706ddaaeb1d..8b4251e707c39 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts @@ -52,7 +52,7 @@ type T4 = { typeUsedAsTypeLiteralIndex.ts(3,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. typeUsedAsTypeLiteralIndex.ts(3,6): error TS2690: 'K' only refers to a type, but is being used as a value here. Did you mean to use 'P in K'? -typeUsedAsTypeLiteralIndex.ts(6,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations +typeUsedAsTypeLiteralIndex.ts(6,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. typeUsedAsTypeLiteralIndex.ts(13,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. typeUsedAsTypeLiteralIndex.ts(13,6): error TS2690: 'K2' only refers to a type, but is being used as a value here. Did you mean to use 'K in K2'? typeUsedAsTypeLiteralIndex.ts(18,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. @@ -73,8 +73,8 @@ typeUsedAsTypeLiteralIndex.ts(23,6): error TS2693: 'K4' only refers to a type, b const K1 = Symbol(); ~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations -!!! related TS9027 typeUsedAsTypeLiteralIndex.ts:6:7: Add a type annotation to the variable K1 +!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. +!!! related TS9027 typeUsedAsTypeLiteralIndex.ts:6:7: Add a type annotation to the variable K1. type T1 = { [K1]: number; } diff --git a/tests/baselines/reference/isolatedDeclarationErrors.errors.txt b/tests/baselines/reference/isolatedDeclarationErrors.errors.txt index 56a0ebbfba2d1..2bc5caf198c2e 100644 --- a/tests/baselines/reference/isolatedDeclarationErrors.errors.txt +++ b/tests/baselines/reference/isolatedDeclarationErrors.errors.txt @@ -1,6 +1,6 @@ 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(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. @@ -17,9 +17,9 @@ isolatedDeclarationErrors.ts(8,1): error TS9023: Assigning properties to functio 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 +!!! 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. diff --git a/tests/baselines/reference/isolatedDeclarationErrorsClasses.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsClasses.errors.txt index 528ebfb7f5d2b..32bdf1fd8a67f 100644 --- a/tests/baselines/reference/isolatedDeclarationErrorsClasses.errors.txt +++ b/tests/baselines/reference/isolatedDeclarationErrorsClasses.errors.txt @@ -1,21 +1,21 @@ -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(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(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(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(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 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,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. @@ -27,11 +27,11 @@ isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralNa 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 +!!! 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 +!!! 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 {} @@ -40,31 +40,31 @@ isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralNa ~ !!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 } @@ -98,23 +98,23 @@ isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralNa [noAnnotationStringName]() { } ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations +!!! 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 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 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 TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. ~~~~~ !!! error TS7006: Parameter 'value' implicitly has an 'any' type. diff --git a/tests/baselines/reference/isolatedDeclarationErrorsDefault.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsDefault.errors.txt index 1f76a0d4acc2a..4169640f60a21 100644 --- a/tests/baselines/reference/isolatedDeclarationErrorsDefault.errors.txt +++ b/tests/baselines/reference/isolatedDeclarationErrorsDefault.errors.txt @@ -1,8 +1,8 @@ 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 +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) ==== @@ -15,29 +15,29 @@ e.ts(1,24): error TS9013: Expression type can't be inferred with --isolatedDecla ==== b.ts (1 errors) ==== export default { foo: 1 + 1 }; ~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 }; diff --git a/tests/baselines/reference/isolatedDeclarationErrorsExpressions.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsExpressions.errors.txt index fac5d12e9a4da..29b5c17bbe289 100644 --- a/tests/baselines/reference/isolatedDeclarationErrorsExpressions.errors.txt +++ b/tests/baselines/reference/isolatedDeclarationErrorsExpressions.errors.txt @@ -1,48 +1,48 @@ -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(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) ==== @@ -50,36 +50,36 @@ isolatedDeclarationErrorsExpressions.ts(128,19): error TS9019: Binding elements 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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`; @@ -91,36 +91,36 @@ isolatedDeclarationErrorsExpressions.ts(128,19): error TS9019: Binding elements 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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"}`; @@ -138,61 +138,61 @@ isolatedDeclarationErrorsExpressions.ts(128,19): error TS9019: Binding elements 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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"}`; @@ -203,36 +203,36 @@ isolatedDeclarationErrorsExpressions.ts(128,19): error TS9019: Binding elements 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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"}`; @@ -248,52 +248,52 @@ isolatedDeclarationErrorsExpressions.ts(128,19): error TS9019: Binding elements 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 { }; @@ -303,10 +303,10 @@ isolatedDeclarationErrorsExpressions.ts(128,19): error TS9019: Binding elements export const { a } = { a: 1 }; ~ -!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations +!!! 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 +!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. export function foo([, , b]: [ number, diff --git a/tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.errors.txt index dba4b53f51b10..833cae006ab9d 100644 --- a/tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.errors.txt +++ b/tests/baselines/reference/isolatedDeclarationErrorsFunctionDeclarations.errors.txt @@ -1,40 +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(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 +!!! 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 +!!! 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 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: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 +!!! 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 +!!! 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/isolatedDeclarationErrorsObjects.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsObjects.errors.txt index 55eb0cdc1ccbb..1ecfe2ba28a1e 100644 --- a/tests/baselines/reference/isolatedDeclarationErrorsObjects.errors.txt +++ b/tests/baselines/reference/isolatedDeclarationErrorsObjects.errors.txt @@ -1,26 +1,26 @@ -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(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(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(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(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) ==== @@ -32,61 +32,61 @@ isolatedDeclarationErrorsObjects.ts(88,5): error TS9014: Computed properties mus 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 } } @@ -96,22 +96,22 @@ isolatedDeclarationErrorsObjects.ts(88,5): error TS9014: Computed properties mus 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 +!!! 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 +!!! 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 +!!! 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 }, @@ -135,18 +135,18 @@ isolatedDeclarationErrorsObjects.ts(88,5): error TS9014: Computed properties mus [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 +!!! 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 +!!! 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 +!!! 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 }; @@ -157,13 +157,13 @@ isolatedDeclarationErrorsObjects.ts(88,5): error TS9014: Computed properties mus 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 +!!! 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 +!!! 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. } @@ -174,17 +174,17 @@ isolatedDeclarationErrorsObjects.ts(88,5): error TS9014: Computed properties mus 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 +!!! 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 +!!! 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 +!!! 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/isolatedDeclarationErrorsReturnTypes.errors.txt b/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.errors.txt index b413e244d79fe..91d5732f5600c 100644 --- a/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.errors.txt +++ b/tests/baselines/reference/isolatedDeclarationErrorsReturnTypes.errors.txt @@ -1,146 +1,146 @@ -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(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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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;} @@ -157,45 +157,45 @@ isolatedDeclarationErrorsReturnTypes.ts(181,58): error TS9007: Function must hav // 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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; } @@ -222,36 +222,36 @@ isolatedDeclarationErrorsReturnTypes.ts(181,58): error TS9007: Function must hav 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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"; @@ -288,94 +288,94 @@ isolatedDeclarationErrorsReturnTypes.ts(181,58): error TS9007: Function must hav // 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 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 +!!! 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 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 +!!! 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 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 +!!! 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 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 +!!! 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 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 +!!! 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 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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;} @@ -389,60 +389,60 @@ isolatedDeclarationErrorsReturnTypes.ts(181,58): error TS9007: Function must hav 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 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 +!!! 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 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 +!!! 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 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 +!!! 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 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 +!!! 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 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 +!!! 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 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 +!!! 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 @@ -450,163 +450,163 @@ isolatedDeclarationErrorsReturnTypes.ts(181,58): error TS9007: Function must hav // 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 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 +!!! 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 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 +!!! 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 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 +!!! 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 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 +!!! 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 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 +!!! 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 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 +!!! 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 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 +!!! 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 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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 +!!! 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; } From a3a5049c3b9c195c333f2a31a09020ad1fb37055 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 3 Jan 2024 11:27:13 +0000 Subject: [PATCH 192/224] Added back runtime members to nullTransformationContext Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/transformer.ts | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index 9c4cc9ac9fd7a..a0bc8ebfa38db 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -39,6 +39,7 @@ import { NodeFactory, NodeFlags, noop, + notImplemented, NullTransformationContext, returnUndefined, ScriptTarget, @@ -665,11 +666,15 @@ export function transformNodes(resolver: EmitResolver | undefine } } -/** @internal */ -export const nullTransformationContext: NullTransformationContext = { +// NullTransformationContext does not have all members of TransformationContext and nullTransformationContext should only be used as a CoreTransformationContext +// To ensure backward compatibility, nullTransformationContext will continue to have all members of TransformationContext (with unsupported methods throwing errors) +const _nullTransformationContext: Omit & { kind: TransformationContextKind.NullContext } = { kind: TransformationContextKind.NullContext, factory: factory, // eslint-disable-line object-shorthand getCompilerOptions: () => ({}), + getEmitResolver: notImplemented, + getEmitHost: notImplemented, + getEmitHelperFactory: notImplemented, startLexicalEnvironment: noop, resumeLexicalEnvironment: noop, suspendLexicalEnvironment: noop, @@ -682,4 +687,16 @@ export const nullTransformationContext: NullTransformationContext = { startBlockScope: noop, endBlockScope: returnUndefined, addBlockScopedVariable: noop, + requestEmitHelper: noop, + readEmitHelpers: notImplemented, + enableSubstitution: noop, + enableEmitNotification: noop, + isSubstitutionEnabled: notImplemented, + isEmitNotificationEnabled: notImplemented, + onSubstituteNode: noEmitSubstitution, + onEmitNode: noEmitNotification, + addDiagnostic: noop, }; + +/** @internal */ +export const nullTransformationContext: NullTransformationContext = _nullTransformationContext From 202d522ddc2438f51e802f3b25dc7b285ef721e9 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 4 Jan 2024 13:47:34 +0000 Subject: [PATCH 193/224] Changed null context to have all methods from the regular transformation context. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/transformer.ts | 8 ++------ src/compiler/types.ts | 8 +++++++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index a0bc8ebfa38db..28e17448e2cff 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -666,9 +666,8 @@ export function transformNodes(resolver: EmitResolver | undefine } } -// NullTransformationContext does not have all members of TransformationContext and nullTransformationContext should only be used as a CoreTransformationContext -// To ensure backward compatibility, nullTransformationContext will continue to have all members of TransformationContext (with unsupported methods throwing errors) -const _nullTransformationContext: Omit & { kind: TransformationContextKind.NullContext } = { +/** @internal */ +export const nullTransformationContext: NullTransformationContext = { kind: TransformationContextKind.NullContext, factory: factory, // eslint-disable-line object-shorthand getCompilerOptions: () => ({}), @@ -697,6 +696,3 @@ const _nullTransformationContext: Omit & { kind: onEmitNode: noEmitNotification, addDiagnostic: noop, }; - -/** @internal */ -export const nullTransformationContext: NullTransformationContext = _nullTransformationContext diff --git a/src/compiler/types.ts b/src/compiler/types.ts index c786c2ee5fa78..c285e7bcd495a 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -9276,8 +9276,14 @@ export interface IsolatedTransformationContext extends CoreTransformationContext addDiagnostic(diag: Diagnostic): void; } /** @internal */ -export interface NullTransformationContext extends CoreTransformationContext { +export interface NullTransformationContext extends Omit { kind: TransformationContextKind.NullContext; + getEmitResolver(): never; + getEmitHost(): never; + getEmitHelperFactory(): never; + readEmitHelpers(): never; + isSubstitutionEnabled(): never; + isEmitNotificationEnabled(): never; } export interface TransformationResult { From c3c863d3109f464aeeaf90c8cf603acd4953354a Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Wed, 29 Nov 2023 14:54:36 +0000 Subject: [PATCH 194/224] Factor out repeated code and call one from another, Also make the functions use the new type CoreEmitHost to take into account of methods that are not available from DTE mode. Signed-off-by: Hana Joo --- src/compiler/emitter.ts | 124 +++++++++--------- .../declarations/transpileDeclaration.ts | 72 +--------- src/compiler/types.ts | 22 +++- src/compiler/utilities.ts | 3 +- 4 files changed, 83 insertions(+), 138 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 2bf585ef8c0d3..e286881896a29 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, @@ -722,6 +724,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)) { @@ -983,7 +1041,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, ); } @@ -1005,6 +1063,7 @@ export function emitFiles(resolver: EmitResolver, host: EmitHost, targetSourceFi } const sourceMappingURL = getSourceMappingURL( + host, mapOptions, sourceMapGenerator, jsFilePath, @@ -1040,15 +1099,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)); @@ -1060,60 +1110,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 */ diff --git a/src/compiler/transformers/declarations/transpileDeclaration.ts b/src/compiler/transformers/declarations/transpileDeclaration.ts index 23cdb47e42827..a9024039ff2c4 100644 --- a/src/compiler/transformers/declarations/transpileDeclaration.ts +++ b/src/compiler/transformers/declarations/transpileDeclaration.ts @@ -1,32 +1,23 @@ import { - base64encode, - combinePaths, CompilerOptions, createEmitDeclarationResolver, createGetCanonicalFileName, createPrinter, createSourceMapGenerator, createTextWriter, - Debug, Diagnostic, - EmitHost, ensureTrailingDirectorySeparator, getAreDeclarationMapsEnabled, getBaseFileName, getDeclarationEmitOutputFilePathWorker, - getDirectoryPath, getNewLineCharacter, - getRelativePathToDirectoryOrUrl, - getRootLength, - getSourceFilePathInNewDir, + getSourceMapDirectory, + getSourceMappingURL, IsolatedTransformationContext, - normalizePath, normalizeSlashes, nullTransformationContext, PrinterOptions, SourceFile, - SourceMapGenerator, - sys, TransformationContextKind, transformDeclarations, TranspileDeclarationsOptions, @@ -94,25 +85,6 @@ export function transpileDeclaration(sourceFile: SourceFile, transpileOptions: T diagnostics, }; - // logic replicated from emitter.ts - function getSourceMapDirectory(mapOptions: CompilerOptions, filePath: string, sourceFile: SourceFile | undefined) { - if (mapOptions.sourceRoot) return emitHost.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, emitHost as unknown as EmitHost, sourceMapDir)); - } - if (getRootLength(sourceMapDir) === 0) { - // The relative paths are relative to the common directory - sourceMapDir = combinePaths(emitHost.getCommonSourceDirectory(), sourceMapDir); - } - return sourceMapDir; - } - return getDirectoryPath(normalizePath(filePath)); - } - // logic replicated from emitter.ts function getSourceMapGenerator(declarationFilePath: string, declarationMapPath: string) { if (!getAreDeclarationMapsEnabled(compilerOptions)) return; @@ -129,11 +101,12 @@ export function transpileDeclaration(sourceFile: SourceFile, transpileOptions: T emitHost, getBaseFileName(normalizeSlashes(declarationFilePath)), sourceRoot ? ensureTrailingDirectorySeparator(sourceRoot) : sourceRoot, - getSourceMapDirectory(compilerOptions, declarationFilePath, sourceFile), + getSourceMapDirectory(emitHost, compilerOptions, declarationFilePath, sourceFile), mapOptions, ); const sourceMappingURL = getSourceMappingURL( + emitHost, mapOptions, sourceMapGenerator, declarationFilePath, @@ -142,41 +115,4 @@ export function transpileDeclaration(sourceFile: SourceFile, transpileOptions: T ); return { sourceMapGenerator, sourceMappingURL: `//# ${"sourceMappingURL"}=${sourceMappingURL}` }; } - - // logic replicated from emitter.ts - function getSourceMappingURL(mapOptions: CompilerOptions, 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, emitHost as unknown as EmitHost, sourceMapDir)); - } - if (getRootLength(sourceMapDir) === 0) { - // The relative paths are relative to the common directory - sourceMapDir = combinePaths(emitHost.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 - emitHost.getCurrentDirectory(), - emitHost.getCanonicalFileName, - /*isAbsolutePathAnUrl*/ true, - ), - ); - } - else { - return encodeURI(combinePaths(sourceMapDir, sourceMapFile)); - } - } - return encodeURI(sourceMapFile); - } } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index c285e7bcd495a..6bee51e8180c8 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -8197,18 +8197,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)[]; @@ -9681,6 +9683,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; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 110eefa96529a..464f100bdebbd 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -80,6 +80,7 @@ import { ContainerFlags, contains, containsPath, + CoreEmitHost, createGetCanonicalFileName, createMultiMap, createScanner, @@ -6409,7 +6410,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)); } From a97dfbce53a7988f0c2ef953c527f2b21e55e742 Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Wed, 6 Dec 2023 12:31:36 +0000 Subject: [PATCH 195/224] Update baselines Signed-off-by: Hana Joo --- .../typeFromPropertyAssignment29.d.ts.diff | 12 ++--- ...eInternalTypesProduceUniqueTypeParams.d.ts | 3 +- .../dte/typeFromPropertyAssignment29.d.ts | 44 +++++++++---------- ...eInternalTypesProduceUniqueTypeParams.d.ts | 3 +- .../tsc/typeFromPropertyAssignment29.d.ts | 44 +++++++++---------- 5 files changed, 54 insertions(+), 52 deletions(-) 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 index ea19a39afb809..05aa3b0763da6 100644 --- 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 @@ -68,17 +68,17 @@ +typeFromPropertyAssignment29.ts(67,5): error TS9009: 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(81,30): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. + typeFromPropertyAssignment29.ts(81,50): 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(91,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. + typeFromPropertyAssignment29.ts(91,50): error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. +typeFromPropertyAssignment29.ts(94,20): error TS9011: Declaration emit for class expressions are 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(101,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. + typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. -==== typeFromPropertyAssignment29.ts (12 errors) ==== 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 index 74f9e381d77ba..94bfb966f9572 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts @@ -7,7 +7,8 @@ // 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 & { +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; }) & { 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 index 17fe5b21c7ebf..4fc606253920c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts @@ -28,7 +28,7 @@ ExpandoExpr.prop = { y: "" } ExpandoExpr.m = function(n: number) { return n + 1; } -var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length +var n: number = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length const ExpandoArrow: { (n: number): string; @@ -63,7 +63,7 @@ namespace ExpandoMerge { namespace ExpandoMerge { export var p3 = 333; } -var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); +var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); namespace Ns { function ExpandoNamespace(): void {} @@ -81,7 +81,7 @@ ExpandoExpr2.prop = 2 ExpandoExpr2.m = function(n: number) { return n + 1; } -var n = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length +var n: number = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length // Should not work in typescript -- classes already have statics class ExpandoClass { @@ -91,7 +91,7 @@ ExpandoClass.prop = 2 ExpandoClass.m = function(n: number) { return n + 1; } -var n = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n +var n: number = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n // Class expressions shouldn't work in typescript either var ExpandoExpr3 = class { @@ -101,7 +101,7 @@ ExpandoExpr3.prop = 3 ExpandoExpr3.m = function(n: number) { return n + 1; } -var n = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n +var n: number = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n @@ -164,17 +164,17 @@ typeFromPropertyAssignment29.ts(56,1): error TS9009: Assigning properties to fun typeFromPropertyAssignment29.ts(67,5): error TS9009: 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(81,30): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. +typeFromPropertyAssignment29.ts(81,50): 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(91,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. +typeFromPropertyAssignment29.ts(91,50): error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. typeFromPropertyAssignment29.ts(94,20): error TS9011: Declaration emit for class expressions are 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(101,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. +typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. ==== typeFromPropertyAssignment29.ts (18 errors) ==== @@ -209,7 +209,7 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi ExpandoExpr.m = function(n: number) { return n + 1; } - var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length + var n: number = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length const ExpandoArrow: { (n: number): string; @@ -248,7 +248,7 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi namespace ExpandoMerge { export var p3 = 333; } - var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); + var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); namespace Ns { function ExpandoNamespace(): void {} @@ -272,10 +272,10 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi !!! 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 - ~~~~ + var n: number = 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 @@ -290,10 +290,10 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. return n + 1; } - var n = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n - ~~~~ + var n: number = 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 @@ -310,10 +310,10 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. return n + 1; } - var n = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n - ~~~~ + var n: number = 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/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts index c17d56766b7df..504bb20812993 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts @@ -7,7 +7,8 @@ // 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 & { +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; }) & { 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 index fe1da833bf6e6..f42a8d5cecbd9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts @@ -28,7 +28,7 @@ ExpandoExpr.prop = { y: "" } ExpandoExpr.m = function(n: number) { return n + 1; } -var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length +var n: number = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length const ExpandoArrow: { (n: number): string; @@ -63,7 +63,7 @@ namespace ExpandoMerge { namespace ExpandoMerge { export var p3 = 333; } -var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); +var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); namespace Ns { function ExpandoNamespace(): void {} @@ -81,7 +81,7 @@ ExpandoExpr2.prop = 2 ExpandoExpr2.m = function(n: number) { return n + 1; } -var n = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length +var n: number = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length // Should not work in typescript -- classes already have statics class ExpandoClass { @@ -91,7 +91,7 @@ ExpandoClass.prop = 2 ExpandoClass.m = function(n: number) { return n + 1; } -var n = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n +var n: number = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n // Class expressions shouldn't work in typescript either var ExpandoExpr3 = class { @@ -101,7 +101,7 @@ ExpandoExpr3.prop = 3 ExpandoExpr3.m = function(n: number) { return n + 1; } -var n = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n +var n: number = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n @@ -176,16 +176,16 @@ declare var n: number; 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(81,30): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. +typeFromPropertyAssignment29.ts(81,50): 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(91,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. +typeFromPropertyAssignment29.ts(91,50): 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(101,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. +typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. ==== typeFromPropertyAssignment29.ts (12 errors) ==== @@ -216,7 +216,7 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi ExpandoExpr.m = function(n: number) { return n + 1; } - var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length + var n: number = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length const ExpandoArrow: { (n: number): string; @@ -251,7 +251,7 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi namespace ExpandoMerge { export var p3 = 333; } - var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); + var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); namespace Ns { function ExpandoNamespace(): void {} @@ -273,10 +273,10 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi !!! 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 - ~~~~ + var n: number = 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 @@ -291,10 +291,10 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. return n + 1; } - var n = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n - ~~~~ + var n: number = 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 @@ -309,10 +309,10 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. return n + 1; } - var n = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n - ~~~~ + var n: number = 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 From 52158b543a0b29bf2b9940d4a26cac67451263a3 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 3 Jan 2024 15:05:39 +0000 Subject: [PATCH 196/224] skipErrorComparison for isolated declaration tests. Signed-off-by: Titian Cernicova-Dragomir --- src/harness/compilerImpl.ts | 12 ++++++++++-- src/harness/harnessIO.ts | 3 ++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/harness/compilerImpl.ts b/src/harness/compilerImpl.ts index d6ec7334d38ae..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, forceDtsEmit?: boolean): 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,7 +271,8 @@ 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); diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index 6ee76e5faf080..20c38514ab279 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -319,6 +319,7 @@ export namespace Compiler { libFiles?: string; noTypesAndSymbols?: boolean; forceDtsEmit?: boolean; + skipErrorComparison?: boolean; } // Additional options not already in ts.optionDeclarations @@ -493,7 +494,7 @@ export namespace Compiler { { 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); + const result = compiler.compileFiles(host, programFileNames, compilerOptions, typeScriptVersion, compilerOptions.forceDtsEmit, compilerOptions.skipErrorComparison); result.symlinks = symlinks; return result; } From 999d03e4d112a4b2fddf68adfd4c194d86b08fbc Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 3 Jan 2024 16:48:04 +0000 Subject: [PATCH 197/224] Skip tests with syntactic errors. Signed-off-by: Titian Cernicova-Dragomir --- src/testRunner/compilerRunner.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index f92471fbdd736..d12ff9b064602 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -94,6 +94,7 @@ export class CompilerBaselineRunner extends RunnerBase { // Everything declared here should be cleared out in the "after" callback. let compilerTest!: CompilerTest; let environment!: CompilerTestEnvironment; + let hasSyntacticErrors: boolean; before(() => { let payload; if (test && test.content) { @@ -106,6 +107,7 @@ export class CompilerBaselineRunner extends RunnerBase { ...environment, fileSystem: fileSystem.shadow(), }); + hasSyntacticErrors = compilerTest.hasSyntacticDiagnostics; }); it(`Correct errors for ${fileName}`, () => compilerTest.verifyDiagnostics()); it(`Correct module resolution tracing for ${fileName}`, () => compilerTest.verifyModuleResolution()); @@ -116,7 +118,10 @@ export class CompilerBaselineRunner extends RunnerBase { describe("isolated declarations", () => { let isolatedTest: IsolatedDeclarationTest | undefined; - before(() => { + before(function () { + if (hasSyntacticErrors) { + this.skip(); + } const isolatedTestEnv = IsolatedDeclarationTest.transformEnvironment(environment); if (isolatedTestEnv) { isolatedTest = new IsolatedDeclarationTest(isolatedTestEnv); @@ -133,13 +138,17 @@ export class CompilerBaselineRunner extends RunnerBase { describe("isolated declarations fixed", () => { let fixedIsolatedTest: FixedIsolatedDeclarationTest | undefined; - before(() => { + before(function () { + if (hasSyntacticErrors) { + this.skip(); + } const fixedIsolatedTestEnv = FixedIsolatedDeclarationTest.fixTestProject(environment); if (fixedIsolatedTestEnv) { fixedIsolatedTest = new FixedIsolatedDeclarationTest(fixedIsolatedTestEnv); } }); it(`Correct dte emit for ${fileName}`, () => fixedIsolatedTest?.verifyDteOutput()); + it(`Correct dte emit for ${fileName}`, () => fixedIsolatedTest?.verifyDteOutput()); it(`Correct tsc emit for ${fileName}`, () => fixedIsolatedTest?.verifyTscOutput()); it(`Correct dte/tsc diff ${fileName}`, () => fixedIsolatedTest?.verifyDiff()); it(`Correct dte map emit for ${fileName}`, () => fixedIsolatedTest?.verifyDteMapOutput()); @@ -236,6 +245,7 @@ class CompilerTestBase { protected configuredName: string; protected harnessSettings: TestCaseParser.CompilerSettings; protected hasNonDtsFiles: boolean; + public readonly hasSyntacticDiagnostics: boolean; protected result: compiler.CompilationResult; protected options: ts.CompilerOptions; protected tsConfigFiles: Compiler.TestFile[]; @@ -259,6 +269,7 @@ class CompilerTestBase { this.result = Compiler.compileFilesWithEnvironment(compilerEnvironment); + this.hasSyntacticDiagnostics = this.result.diagnostics.some(p => p.code < 2200); this.options = this.result.options; } From 5a1db4f71442629c532a4adfc3b42ebfc0f3152c Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 3 Jan 2024 17:27:22 +0000 Subject: [PATCH 198/224] Only run declaration tests. Signed-off-by: Titian Cernicova-Dragomir --- src/testRunner/compilerRunner.ts | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index d12ff9b064602..e81482938b755 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -94,7 +94,6 @@ export class CompilerBaselineRunner extends RunnerBase { // Everything declared here should be cleared out in the "after" callback. let compilerTest!: CompilerTest; let environment!: CompilerTestEnvironment; - let hasSyntacticErrors: boolean; before(() => { let payload; if (test && test.content) { @@ -107,7 +106,6 @@ export class CompilerBaselineRunner extends RunnerBase { ...environment, fileSystem: fileSystem.shadow(), }); - hasSyntacticErrors = compilerTest.hasSyntacticDiagnostics; }); it(`Correct errors for ${fileName}`, () => compilerTest.verifyDiagnostics()); it(`Correct module resolution tracing for ${fileName}`, () => compilerTest.verifyModuleResolution()); @@ -119,12 +117,11 @@ export class CompilerBaselineRunner extends RunnerBase { describe("isolated declarations", () => { let isolatedTest: IsolatedDeclarationTest | undefined; before(function () { - if (hasSyntacticErrors) { - this.skip(); - } const isolatedTestEnv = IsolatedDeclarationTest.transformEnvironment(environment); if (isolatedTestEnv) { isolatedTest = new IsolatedDeclarationTest(isolatedTestEnv); + } else { + this.skip(); } }); it(`Correct dte emit for ${fileName}`, () => isolatedTest?.verifyDteOutput()); @@ -139,12 +136,11 @@ export class CompilerBaselineRunner extends RunnerBase { describe("isolated declarations fixed", () => { let fixedIsolatedTest: FixedIsolatedDeclarationTest | undefined; before(function () { - if (hasSyntacticErrors) { - this.skip(); - } const fixedIsolatedTestEnv = FixedIsolatedDeclarationTest.fixTestProject(environment); if (fixedIsolatedTestEnv) { fixedIsolatedTest = new FixedIsolatedDeclarationTest(fixedIsolatedTestEnv); + } else { + this.skip(); } }); it(`Correct dte emit for ${fileName}`, () => fixedIsolatedTest?.verifyDteOutput()); @@ -245,7 +241,6 @@ class CompilerTestBase { protected configuredName: string; protected harnessSettings: TestCaseParser.CompilerSettings; protected hasNonDtsFiles: boolean; - public readonly hasSyntacticDiagnostics: boolean; protected result: compiler.CompilationResult; protected options: ts.CompilerOptions; protected tsConfigFiles: Compiler.TestFile[]; @@ -269,7 +264,6 @@ class CompilerTestBase { this.result = Compiler.compileFilesWithEnvironment(compilerEnvironment); - this.hasSyntacticDiagnostics = this.result.diagnostics.some(p => p.code < 2200); this.options = this.result.options; } @@ -490,11 +484,10 @@ class IsolatedDeclarationTest extends CompilerTestBase { // 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) { + if (options.isolatedDeclarations === false || options.noEmit || options.noTypesAndSymbols || !options.declaration) { return undefined; } const clonedOptions: ts.CompilerOptions & Compiler.HarnessOptions = ts.cloneCompilerOptions(compilerEnvironment.compilerOptions); - clonedOptions.declaration = true; if (clonedOptions.isolatedDeclarations === undefined) { clonedOptions.isolatedDeclarations = true; } @@ -514,7 +507,6 @@ class IsolatedDeclarationTest extends CompilerTestBase { ...compilerEnvironment.testCaseContent.settings, allowJS: "false", checkJS: "false", - declaration: "true", isolatedDeclarations: "true", forceDtsEmit: "true", skipLibCheck: "true", From d097266f41e31275791cf8200c21ff0493298d92 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 3 Jan 2024 18:07:48 +0000 Subject: [PATCH 199/224] Removed unused baseline. Signed-off-by: Titian Cernicova-Dragomir --- .../diff/ES5SymbolProperty1.d.ts.diff | 37 - .../diff/FunctionDeclaration8_es6.d.ts.diff | 28 - .../original/diff/arrayFind.d.ts.diff | 18 - .../original/diff/asOperator1.d.ts.diff | 18 - ...asyncFunctionDeclaration8_es2017.d.ts.diff | 28 - .../asyncFunctionDeclaration8_es5.d.ts.diff | 28 - .../asyncFunctionDeclaration8_es6.d.ts.diff | 28 - .../original/diff/bigintIndex.d.ts.diff | 51 - .../diff/booleanFilterAnyArray.d.ts.diff | 24 - ...apturedParametersInInitializers1.d.ts.diff | 46 - .../circularObjectLiteralAccessors.d.ts.diff | 18 - .../diff/complicatedPrivacy.d.ts.diff | 20 - .../computedPropertyNames12_ES5.d.ts.diff | 70 - .../computedPropertyNames12_ES6.d.ts.diff | 70 - .../computedPropertyNames16_ES5.d.ts.diff | 66 - .../computedPropertyNames16_ES6.d.ts.diff | 66 - .../diff/computedPropertyNames2_ES5.d.ts.diff | 75 - .../diff/computedPropertyNames2_ES6.d.ts.diff | 75 - .../diff/computedPropertyNames4_ES5.d.ts.diff | 54 - .../diff/computedPropertyNames4_ES6.d.ts.diff | 54 - .../diff/computedPropertyNames5_ES5.d.ts.diff | 50 - .../diff/computedPropertyNames5_ES6.d.ts.diff | 50 - .../diff/computedPropertyNames6_ES5.d.ts.diff | 52 - .../diff/computedPropertyNames6_ES6.d.ts.diff | 52 - .../diff/computedPropertyNames7_ES5.d.ts.diff | 15 - .../diff/computedPropertyNames7_ES6.d.ts.diff | 15 - ...utedPropertyNamesOnOverloads_ES5.d.ts.diff | 51 - ...utedPropertyNamesOnOverloads_ES6.d.ts.diff | 51 - ...dPropertyNamesWithStaticProperty.d.ts.diff | 64 - .../original/diff/constEnumErrors.d.ts.diff | 50 - ...contextualSignatureInstantiation.d.ts.diff | 24 - .../original/diff/contextualTyping.d.ts.diff | 27 - .../diff/contextualTyping38.d.ts.diff | 15 - .../diff/contextualTyping39.d.ts.diff | 19 - ...hImportDeclarationNameCollision7.d.ts.diff | 17 - .../decoratorsOnComputedProperties.d.ts.diff | 255 --- ...ectLiteralProperty_computedName1.d.ts.diff | 18 - ...ectLiteralProperty_computedName2.d.ts.diff | 30 - ...uplicateVarsAcrossFileBoundaries.d.ts.diff | 27 - .../diff/escapedIdentifiers.d.ts.diff | 20 - .../original/diff/forwardRefInEnum.d.ts.diff | 50 - .../diff/generatedContextualTyping.d.ts.diff | 27 - ...TypeReferenceWithoutTypeArgument.d.ts.diff | 31 - ...ypeReferenceWithoutTypeArgument2.d.ts.diff | 29 - .../diff/gettersAndSettersErrors.d.ts.diff | 18 - .../diff/inKeywordAndIntersection.d.ts.diff | 20 - ...xSignatureMustHaveTypeAnnotation.d.ts.diff | 21 - .../diff/indexWithoutParamType2.d.ts.diff | 17 - .../original/diff/intTypeCheck.d.ts.diff | 27 - .../literalTypesAndTypeAssertions.d.ts.diff | 18 - ...ithSuffixes_one_externalTSModule.d.ts.diff | 29 - .../diff/noUncheckedIndexedAccess.d.ts.diff | 20 - .../objectLiteralEnumPropertyNames.d.ts.diff | 49 - .../objectLiteralGettersAndSetters.d.ts.diff | 34 - .../diff/optionalChainingInference.d.ts.diff | 18 - .../diff/overloadsWithComputedNames.d.ts.diff | 90 - .../parseInvalidNonNullableTypes.d.ts.diff | 21 - .../diff/parseInvalidNullableTypes.d.ts.diff | 21 - .../original/diff/parseTypes.d.ts.diff | 24 - .../parserComputedPropertyName1.d.ts.diff | 28 - .../parserComputedPropertyName10.d.ts.diff | 17 - .../parserComputedPropertyName13.d.ts.diff | 19 - .../parserComputedPropertyName14.d.ts.diff | 19 - .../parserComputedPropertyName15.d.ts.diff | 17 - .../parserComputedPropertyName18.d.ts.diff | 19 - .../parserComputedPropertyName19.d.ts.diff | 19 - .../parserComputedPropertyName2.d.ts.diff | 31 - .../parserComputedPropertyName20.d.ts.diff | 17 - .../parserComputedPropertyName21.d.ts.diff | 17 - .../parserComputedPropertyName22.d.ts.diff | 17 - .../parserComputedPropertyName23.d.ts.diff | 17 - .../parserComputedPropertyName24.d.ts.diff | 32 - .../parserComputedPropertyName25.d.ts.diff | 41 - .../parserComputedPropertyName27.d.ts.diff | 17 - .../parserComputedPropertyName28.d.ts.diff | 18 - .../parserComputedPropertyName29.d.ts.diff | 44 - .../parserComputedPropertyName31.d.ts.diff | 18 - .../parserComputedPropertyName32.d.ts.diff | 17 - .../parserComputedPropertyName33.d.ts.diff | 40 - .../parserComputedPropertyName36.d.ts.diff | 17 - .../parserComputedPropertyName37.d.ts.diff | 33 - .../parserComputedPropertyName6.d.ts.diff | 29 - .../parserComputedPropertyName9.d.ts.diff | 17 - .../parserES5ComputedPropertyName1.d.ts.diff | 17 - .../parserES5ComputedPropertyName10.d.ts.diff | 17 - .../parserES5ComputedPropertyName2.d.ts.diff | 31 - .../parserES5ComputedPropertyName5.d.ts.diff | 17 - .../parserES5ComputedPropertyName8.d.ts.diff | 19 - .../parserES5ComputedPropertyName9.d.ts.diff | 17 - .../diff/parserES5SymbolProperty1.d.ts.diff | 17 - .../diff/parserES5SymbolProperty2.d.ts.diff | 17 - .../diff/parserES5SymbolProperty3.d.ts.diff | 17 - .../diff/parserES5SymbolProperty4.d.ts.diff | 17 - .../diff/parserES5SymbolProperty5.d.ts.diff | 17 - .../diff/parserES5SymbolProperty6.d.ts.diff | 17 - .../diff/parserES5SymbolProperty7.d.ts.diff | 17 - .../diff/parserES5SymbolProperty8.d.ts.diff | 19 - .../diff/parserES5SymbolProperty9.d.ts.diff | 19 - .../diff/parserIndexSignature11.d.ts.diff | 17 - .../diff/parserIndexSignature5.d.ts.diff | 17 - .../original/diff/parserStrictMode8.d.ts.diff | 30 - .../diff/propertyAssignment.d.ts.diff | 20 - .../reExportAliasMakesInstantiated.d.ts.diff | 17 - .../diff/recursiveTypesWithTypeof.d.ts.diff | 40 - ...s(usedefineforclassfields=false).d.ts.diff | 17 - ...ts(usedefineforclassfields=true).d.ts.diff | 17 - ...ringLiteralsWithTypeAssertions01.d.ts.diff | 14 - .../original/diff/symbolProperty1.d.ts.diff | 46 - .../original/diff/symbolProperty2.d.ts.diff | 49 - .../original/diff/symbolProperty3.d.ts.diff | 57 - .../original/diff/symbolProperty52.d.ts.diff | 34 - .../original/diff/symbolProperty53.d.ts.diff | 36 - .../original/diff/symbolProperty54.d.ts.diff | 33 - .../original/diff/symbolProperty58.d.ts.diff | 34 - .../original/diff/symbolProperty59.d.ts.diff | 17 - .../original/diff/thisTypeErrors.d.ts.diff | 28 - .../diff/thisTypeInAccessors.d.ts.diff | 19 - .../typeFromPropertyAssignment32.d.ts.diff | 61 - .../typeFromPropertyAssignment33.d.ts.diff | 65 - .../diff/typeUsedAsTypeLiteralIndex.d.ts.diff | 37 - .../original/dte/ES5SymbolProperty1.d.ts | 26 - .../dte/FunctionDeclaration8_es6.d.ts | 29 - .../original/dte/arrayFind.d.ts | 46 - .../original/dte/asOperator1.d.ts | 42 - .../dte/asyncFunctionDeclaration8_es2017.d.ts | 29 - .../dte/asyncFunctionDeclaration8_es5.d.ts | 29 - .../dte/asyncFunctionDeclaration8_es6.d.ts | 29 - .../original/dte/bigintIndex.d.ts | 125 -- .../original/dte/booleanFilterAnyArray.d.ts | 95 - .../capturedParametersInInitializers1.d.ts | 191 -- .../dte/circularObjectLiteralAccessors.d.ts | 29 - .../original/dte/complicatedPrivacy.d.ts | 316 --- .../dte/computedPropertyNames12_ES5.d.ts | 86 - .../dte/computedPropertyNames12_ES6.d.ts | 86 - .../dte/computedPropertyNames16_ES5.d.ts | 82 - .../dte/computedPropertyNames16_ES6.d.ts | 82 - .../dte/computedPropertyNames2_ES5.d.ts | 69 - .../dte/computedPropertyNames2_ES6.d.ts | 69 - .../dte/computedPropertyNames4_ES5.d.ts | 81 - .../dte/computedPropertyNames4_ES6.d.ts | 81 - .../dte/computedPropertyNames5_ES5.d.ts | 65 - .../dte/computedPropertyNames5_ES6.d.ts | 65 - .../dte/computedPropertyNames6_ES5.d.ts | 45 - .../dte/computedPropertyNames6_ES6.d.ts | 45 - .../dte/computedPropertyNames7_ES5.d.ts | 21 - .../dte/computedPropertyNames7_ES6.d.ts | 21 - .../computedPropertyNamesOnOverloads_ES5.d.ts | 49 - .../computedPropertyNamesOnOverloads_ES6.d.ts | 49 - ...mputedPropertyNamesWithStaticProperty.d.ts | 100 - .../original/dte/constEnumErrors.d.ts | 210 -- .../dte/contextualSignatureInstantiation.d.ts | 124 -- .../original/dte/contextualTyping.d.ts | 604 ------ .../original/dte/contextualTyping38.d.ts | 13 - .../original/dte/contextualTyping39.d.ts | 25 - ...taWithImportDeclarationNameCollision7.d.ts | 84 - .../dte/decoratorsOnComputedProperties.d.ts | 711 ------ ...teObjectLiteralProperty_computedName1.d.ts | 125 -- ...teObjectLiteralProperty_computedName2.d.ts | 97 - .../duplicateVarsAcrossFileBoundaries.d.ts | 117 - .../original/dte/escapedIdentifiers.d.ts | 316 --- .../original/dte/forwardRefInEnum.d.ts | 70 - .../dte/generatedContextualTyping.d.ts | 1905 ----------------- ...nericTypeReferenceWithoutTypeArgument.d.ts | 209 -- ...ericTypeReferenceWithoutTypeArgument2.d.ts | 218 -- .../original/dte/gettersAndSettersErrors.d.ts | 77 - .../dte/inKeywordAndIntersection.d.ts | 100 - .../indexSignatureMustHaveTypeAnnotation.d.ts | 73 - .../original/dte/indexWithoutParamType2.d.ts | 32 - .../original/dte/intTypeCheck.d.ts | 881 -------- .../dte/literalTypesAndTypeAssertions.d.ts | 66 - ...tionWithSuffixes_one_externalTSModule.d.ts | 16 - .../dte/noUncheckedIndexedAccess.d.ts | 418 ---- .../dte/objectLiteralEnumPropertyNames.d.ts | 102 - .../dte/objectLiteralGettersAndSetters.d.ts | 313 --- .../dte/optionalChainingInference.d.ts | 140 -- .../dte/overloadsWithComputedNames.d.ts | 207 -- .../dte/parseInvalidNonNullableTypes.d.ts | 131 -- .../dte/parseInvalidNullableTypes.d.ts | 147 -- .../original/dte/parseTypes.d.ts | 79 - .../dte/parserComputedPropertyName1.d.ts | 24 - .../dte/parserComputedPropertyName10.d.ts | 30 - .../dte/parserComputedPropertyName13.d.ts | 26 - .../dte/parserComputedPropertyName14.d.ts | 26 - .../dte/parserComputedPropertyName15.d.ts | 27 - .../dte/parserComputedPropertyName18.d.ts | 26 - .../dte/parserComputedPropertyName19.d.ts | 26 - .../dte/parserComputedPropertyName2.d.ts | 23 - .../dte/parserComputedPropertyName20.d.ts | 30 - .../dte/parserComputedPropertyName21.d.ts | 30 - .../dte/parserComputedPropertyName22.d.ts | 30 - .../dte/parserComputedPropertyName23.d.ts | 27 - .../dte/parserComputedPropertyName24.d.ts | 31 - .../dte/parserComputedPropertyName25.d.ts | 42 - .../dte/parserComputedPropertyName27.d.ts | 42 - .../dte/parserComputedPropertyName28.d.ts | 39 - .../dte/parserComputedPropertyName29.d.ts | 48 - .../dte/parserComputedPropertyName31.d.ts | 41 - .../dte/parserComputedPropertyName32.d.ts | 30 - .../dte/parserComputedPropertyName33.d.ts | 45 - .../dte/parserComputedPropertyName36.d.ts | 33 - .../dte/parserComputedPropertyName37.d.ts | 27 - .../dte/parserComputedPropertyName6.d.ts | 31 - .../dte/parserComputedPropertyName9.d.ts | 33 - .../dte/parserES5ComputedPropertyName1.d.ts | 30 - .../dte/parserES5ComputedPropertyName10.d.ts | 30 - .../dte/parserES5ComputedPropertyName2.d.ts | 23 - .../dte/parserES5ComputedPropertyName5.d.ts | 30 - .../dte/parserES5ComputedPropertyName8.d.ts | 26 - .../dte/parserES5ComputedPropertyName9.d.ts | 33 - .../dte/parserES5SymbolProperty1.d.ts | 30 - .../dte/parserES5SymbolProperty2.d.ts | 30 - .../dte/parserES5SymbolProperty3.d.ts | 30 - .../dte/parserES5SymbolProperty4.d.ts | 30 - .../dte/parserES5SymbolProperty5.d.ts | 30 - .../dte/parserES5SymbolProperty6.d.ts | 30 - .../dte/parserES5SymbolProperty7.d.ts | 27 - .../dte/parserES5SymbolProperty8.d.ts | 30 - .../dte/parserES5SymbolProperty9.d.ts | 30 - .../original/dte/parserIndexSignature11.d.ts | 42 - .../original/dte/parserIndexSignature5.d.ts | 30 - .../original/dte/parserStrictMode8.d.ts | 29 - .../original/dte/propertyAssignment.d.ts | 77 - .../dte/reExportAliasMakesInstantiated.d.ts | 39 - .../dte/recursiveTypesWithTypeof.d.ts | 200 -- ...flicts(usedefineforclassfields=false).d.ts | 1021 --------- ...nflicts(usedefineforclassfields=true).d.ts | 877 -------- .../stringLiteralsWithTypeAssertions01.d.ts | 24 - .../original/dte/symbolProperty1.d.ts | 42 - .../original/dte/symbolProperty2.d.ts | 46 - .../original/dte/symbolProperty3.d.ts | 55 - .../original/dte/symbolProperty52.d.ts | 38 - .../original/dte/symbolProperty53.d.ts | 34 - .../original/dte/symbolProperty54.d.ts | 27 - .../original/dte/symbolProperty58.d.ts | 22 - .../original/dte/symbolProperty59.d.ts | 30 - .../original/dte/thisTypeErrors.d.ts | 280 --- .../original/dte/thisTypeInAccessors.d.ts | 147 -- .../dte/typeFromPropertyAssignment32.d.ts | 133 -- .../dte/typeFromPropertyAssignment33.d.ts | 137 -- .../dte/typeUsedAsTypeLiteralIndex.d.ts | 116 - .../original/tsc/ES5SymbolProperty1.d.ts | 44 - .../tsc/FunctionDeclaration8_es6.d.ts | 33 - .../original/tsc/arrayFind.d.ts | 46 - .../original/tsc/asOperator1.d.ts | 42 - .../tsc/asyncFunctionDeclaration8_es2017.d.ts | 33 - .../tsc/asyncFunctionDeclaration8_es5.d.ts | 33 - .../tsc/asyncFunctionDeclaration8_es6.d.ts | 33 - .../original/tsc/bigintIndex.d.ts | 127 -- .../original/tsc/booleanFilterAnyArray.d.ts | 95 - .../capturedParametersInInitializers1.d.ts | 195 -- .../tsc/circularObjectLiteralAccessors.d.ts | 28 - .../original/tsc/complicatedPrivacy.d.ts | 314 --- .../tsc/computedPropertyNames12_ES5.d.ts | 88 - .../tsc/computedPropertyNames12_ES6.d.ts | 88 - .../tsc/computedPropertyNames16_ES5.d.ts | 76 - .../tsc/computedPropertyNames16_ES6.d.ts | 76 - .../tsc/computedPropertyNames2_ES5.d.ts | 63 - .../tsc/computedPropertyNames2_ES6.d.ts | 63 - .../tsc/computedPropertyNames4_ES5.d.ts | 93 - .../tsc/computedPropertyNames4_ES6.d.ts | 93 - .../tsc/computedPropertyNames5_ES5.d.ts | 73 - .../tsc/computedPropertyNames5_ES6.d.ts | 73 - .../tsc/computedPropertyNames6_ES5.d.ts | 53 - .../tsc/computedPropertyNames6_ES6.d.ts | 53 - .../tsc/computedPropertyNames7_ES5.d.ts | 21 - .../tsc/computedPropertyNames7_ES6.d.ts | 21 - .../computedPropertyNamesOnOverloads_ES5.d.ts | 48 - .../computedPropertyNamesOnOverloads_ES6.d.ts | 48 - ...mputedPropertyNamesWithStaticProperty.d.ts | 102 - .../original/tsc/constEnumErrors.d.ts | 207 -- .../tsc/contextualSignatureInstantiation.d.ts | 124 -- .../original/tsc/contextualTyping.d.ts | 600 ------ .../original/tsc/contextualTyping38.d.ts | 11 - .../original/tsc/contextualTyping39.d.ts | 23 - ...taWithImportDeclarationNameCollision7.d.ts | 83 - .../tsc/decoratorsOnComputedProperties.d.ts | 741 ------- ...teObjectLiteralProperty_computedName1.d.ts | 125 -- ...teObjectLiteralProperty_computedName2.d.ts | 97 - .../duplicateVarsAcrossFileBoundaries.d.ts | 117 - .../original/tsc/escapedIdentifiers.d.ts | 316 --- .../original/tsc/forwardRefInEnum.d.ts | 64 - .../tsc/generatedContextualTyping.d.ts | 1901 ---------------- ...nericTypeReferenceWithoutTypeArgument.d.ts | 209 -- ...ericTypeReferenceWithoutTypeArgument2.d.ts | 218 -- .../original/tsc/gettersAndSettersErrors.d.ts | 77 - .../tsc/inKeywordAndIntersection.d.ts | 98 - .../indexSignatureMustHaveTypeAnnotation.d.ts | 71 - .../original/tsc/indexWithoutParamType2.d.ts | 31 - .../original/tsc/intTypeCheck.d.ts | 879 -------- .../tsc/literalTypesAndTypeAssertions.d.ts | 66 - ...tionWithSuffixes_one_externalTSModule.d.ts | 32 - .../tsc/noUncheckedIndexedAccess.d.ts | 418 ---- .../tsc/objectLiteralEnumPropertyNames.d.ts | 102 - .../tsc/objectLiteralGettersAndSetters.d.ts | 309 --- .../tsc/optionalChainingInference.d.ts | 140 -- .../tsc/overloadsWithComputedNames.d.ts | 218 -- .../tsc/parseInvalidNonNullableTypes.d.ts | 131 -- .../tsc/parseInvalidNullableTypes.d.ts | 147 -- .../original/tsc/parseTypes.d.ts | 75 - .../tsc/parserComputedPropertyName1.d.ts | 28 - .../tsc/parserComputedPropertyName10.d.ts | 29 - .../tsc/parserComputedPropertyName13.d.ts | 24 - .../tsc/parserComputedPropertyName14.d.ts | 24 - .../tsc/parserComputedPropertyName15.d.ts | 26 - .../tsc/parserComputedPropertyName18.d.ts | 24 - .../tsc/parserComputedPropertyName19.d.ts | 24 - .../tsc/parserComputedPropertyName2.d.ts | 25 - .../tsc/parserComputedPropertyName20.d.ts | 29 - .../tsc/parserComputedPropertyName21.d.ts | 29 - .../tsc/parserComputedPropertyName22.d.ts | 29 - .../tsc/parserComputedPropertyName23.d.ts | 26 - .../tsc/parserComputedPropertyName24.d.ts | 26 - .../tsc/parserComputedPropertyName25.d.ts | 36 - .../tsc/parserComputedPropertyName27.d.ts | 41 - .../tsc/parserComputedPropertyName28.d.ts | 37 - .../tsc/parserComputedPropertyName29.d.ts | 42 - .../tsc/parserComputedPropertyName31.d.ts | 39 - .../tsc/parserComputedPropertyName32.d.ts | 29 - .../tsc/parserComputedPropertyName33.d.ts | 39 - .../tsc/parserComputedPropertyName36.d.ts | 32 - .../tsc/parserComputedPropertyName37.d.ts | 29 - .../tsc/parserComputedPropertyName6.d.ts | 35 - .../tsc/parserComputedPropertyName9.d.ts | 32 - .../tsc/parserES5ComputedPropertyName1.d.ts | 29 - .../tsc/parserES5ComputedPropertyName10.d.ts | 29 - .../tsc/parserES5ComputedPropertyName2.d.ts | 25 - .../tsc/parserES5ComputedPropertyName5.d.ts | 29 - .../tsc/parserES5ComputedPropertyName8.d.ts | 24 - .../tsc/parserES5ComputedPropertyName9.d.ts | 32 - .../tsc/parserES5SymbolProperty1.d.ts | 29 - .../tsc/parserES5SymbolProperty2.d.ts | 29 - .../tsc/parserES5SymbolProperty3.d.ts | 29 - .../tsc/parserES5SymbolProperty4.d.ts | 29 - .../tsc/parserES5SymbolProperty5.d.ts | 29 - .../tsc/parserES5SymbolProperty6.d.ts | 29 - .../tsc/parserES5SymbolProperty7.d.ts | 26 - .../tsc/parserES5SymbolProperty8.d.ts | 28 - .../tsc/parserES5SymbolProperty9.d.ts | 28 - .../original/tsc/parserIndexSignature11.d.ts | 41 - .../original/tsc/parserIndexSignature5.d.ts | 29 - .../original/tsc/parserStrictMode8.d.ts | 24 - .../original/tsc/propertyAssignment.d.ts | 75 - .../tsc/reExportAliasMakesInstantiated.d.ts | 43 - .../tsc/recursiveTypesWithTypeof.d.ts | 200 -- ...flicts(usedefineforclassfields=false).d.ts | 1020 --------- ...nflicts(usedefineforclassfields=true).d.ts | 876 -------- .../stringLiteralsWithTypeAssertions01.d.ts | 24 - .../original/tsc/symbolProperty1.d.ts | 54 - .../original/tsc/symbolProperty2.d.ts | 58 - .../original/tsc/symbolProperty3.d.ts | 67 - .../original/tsc/symbolProperty52.d.ts | 40 - .../original/tsc/symbolProperty53.d.ts | 36 - .../original/tsc/symbolProperty54.d.ts | 29 - .../original/tsc/symbolProperty58.d.ts | 37 - .../original/tsc/symbolProperty59.d.ts | 29 - .../original/tsc/thisTypeErrors.d.ts | 280 --- .../original/tsc/thisTypeInAccessors.d.ts | 146 -- .../tsc/typeFromPropertyAssignment32.d.ts | 115 - .../tsc/typeFromPropertyAssignment33.d.ts | 119 - .../tsc/typeUsedAsTypeLiteralIndex.d.ts | 109 - 360 files changed, 32618 deletions(-) delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/arrayFind.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/asOperator1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/booleanFilterAnyArray.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/capturedParametersInInitializers1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/circularObjectLiteralAccessors.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/complicatedPrivacy.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames7_ES5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames7_ES6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/contextualSignatureInstantiation.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/contextualTyping.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/contextualTyping38.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/contextualTyping39.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/decoratorMetadataWithImportDeclarationNameCollision7.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/duplicateObjectLiteralProperty_computedName1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/duplicateObjectLiteralProperty_computedName2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/duplicateVarsAcrossFileBoundaries.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/escapedIdentifiers.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/generatedContextualTyping.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/genericTypeReferenceWithoutTypeArgument.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/genericTypeReferenceWithoutTypeArgument2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/gettersAndSettersErrors.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/inKeywordAndIntersection.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/intTypeCheck.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/literalTypesAndTypeAssertions.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/noUncheckedIndexedAccess.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/objectLiteralEnumPropertyNames.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/objectLiteralGettersAndSetters.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/optionalChainingInference.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parseInvalidNonNullableTypes.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parseInvalidNullableTypes.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parseTypes.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/propertyAssignment.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/reExportAliasMakesInstantiated.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/recursiveTypesWithTypeof.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/stringLiteralsWithTypeAssertions01.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/thisTypeErrors.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/thisTypeInAccessors.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment32.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment33.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/arrayFind.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/asOperator1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/booleanFilterAnyArray.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/capturedParametersInInitializers1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/circularObjectLiteralAccessors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames7_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames7_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/contextualSignatureInstantiation.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/contextualTyping.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/contextualTyping38.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/contextualTyping39.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/decoratorMetadataWithImportDeclarationNameCollision7.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/duplicateObjectLiteralProperty_computedName1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/duplicateObjectLiteralProperty_computedName2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/duplicateVarsAcrossFileBoundaries.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/escapedIdentifiers.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/generatedContextualTyping.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/gettersAndSettersErrors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/inKeywordAndIntersection.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/indexWithoutParamType2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/literalTypesAndTypeAssertions.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/moduleResolutionWithSuffixes_one_externalTSModule.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/noUncheckedIndexedAccess.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/objectLiteralEnumPropertyNames.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/objectLiteralGettersAndSetters.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/optionalChainingInference.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNonNullableTypes.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNullableTypes.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parseTypes.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName10.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName13.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName14.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName15.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName18.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName19.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName20.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName21.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName22.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName23.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName28.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName31.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName32.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName36.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName37.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName9.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName10.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName8.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName9.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty7.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty9.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature11.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/propertyAssignment.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/reExportAliasMakesInstantiated.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/recursiveTypesWithTypeof.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/stringLiteralsWithTypeAssertions01.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/symbolProperty52.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/symbolProperty53.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/symbolProperty54.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/symbolProperty58.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/symbolProperty59.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/thisTypeErrors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/thisTypeInAccessors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment32.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment33.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/arrayFind.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/asOperator1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/booleanFilterAnyArray.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/capturedParametersInInitializers1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/circularObjectLiteralAccessors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames7_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames7_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/contextualSignatureInstantiation.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping38.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping39.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/decoratorMetadataWithImportDeclarationNameCollision7.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/duplicateObjectLiteralProperty_computedName1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/duplicateObjectLiteralProperty_computedName2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/duplicateVarsAcrossFileBoundaries.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/escapedIdentifiers.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/generatedContextualTyping.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/gettersAndSettersErrors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/inKeywordAndIntersection.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/literalTypesAndTypeAssertions.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/moduleResolutionWithSuffixes_one_externalTSModule.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/noUncheckedIndexedAccess.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralEnumPropertyNames.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralGettersAndSetters.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/optionalChainingInference.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNonNullableTypes.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNullableTypes.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parseTypes.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName13.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName14.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName15.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName18.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName19.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName20.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName21.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName8.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty9.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature11.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserStrictMode8.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/propertyAssignment.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/reExportAliasMakesInstantiated.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/recursiveTypesWithTypeof.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/stringLiteralsWithTypeAssertions01.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty59.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/thisTypeErrors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/thisTypeInAccessors.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment32.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment33.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff deleted file mode 100644 index 9b7ac0004a1ae..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty1.d.ts.diff +++ /dev/null @@ -1,37 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/Symbols/ES5SymbolProperty1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,25 +4,7 @@ - interface SymbolConstructor { - foo: string; - } - declare var Symbol: SymbolConstructor; --declare var obj: invalid; -- --/// [Errors] //// -- --ES5SymbolProperty1.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -- -- --==== ES5SymbolProperty1.ts (1 errors) ==== -- interface SymbolConstructor { -- foo: string; -- } -- var Symbol: SymbolConstructor; -- -- var obj = { -- [Symbol.foo]: 0 -- ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 ES5SymbolProperty1.ts:6:5: Add a type annotation to the variable obj. -- } -- -- obj[Symbol.foo]; -\ No newline at end of file -+declare var obj: { -+ [Symbol.foo]: number; -+}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff deleted file mode 100644 index 405f41522456b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/FunctionDeclaration8_es6.d.ts.diff +++ /dev/null @@ -1,28 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,19 +4,15 @@ - declare var v: invalid; - - /// [Errors] //// - --FunctionDeclaration8_es6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - FunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'yield'. - FunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. - FunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. - - --==== FunctionDeclaration8_es6.ts (4 errors) ==== -+==== FunctionDeclaration8_es6.ts (3 errors) ==== - var v = { [yield]: foo } -- ~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 FunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v. - ~~~~~ - !!! error TS2304: Cannot find name 'yield'. - ~~~ - !!! error TS2304: Cannot find name 'foo'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/arrayFind.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/arrayFind.d.ts.diff deleted file mode 100644 index c9c6445a39566..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/arrayFind.d.ts.diff +++ /dev/null @@ -1,18 +0,0 @@ -// [[Reason: TS normalizes types]] //// - -//// [tests/cases/compiler/arrayFind.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -3,9 +3,9 @@ - //// [arrayFind.d.ts] - declare function isNumber(x: any): x is number; - declare const arrayOfStringsNumbersAndBooleans: invalid; - declare const foundNumber: number | undefined; --declare const readonlyArrayOfStringsNumbersAndBooleans: readonly (string | number | boolean)[]; -+declare const readonlyArrayOfStringsNumbersAndBooleans: ReadonlyArray; - declare const readonlyFoundNumber: number | undefined; - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asOperator1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asOperator1.d.ts.diff deleted file mode 100644 index 5bab5f5961bef..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/asOperator1.d.ts.diff +++ /dev/null @@ -1,18 +0,0 @@ -// [[Reason: TS changes the order of union constituents]] //// - -//// [tests/cases/conformance/expressions/asOperator/asOperator1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,9 +4,9 @@ - declare var as: number; - declare var x: number; - declare var y: invalid; - declare var z: string; --declare var j: string | number; -+declare var j: number | string; - - /// [Errors] //// - - asOperator1.ts(3,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff deleted file mode 100644 index 194eb7c3466c2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es2017.d.ts.diff +++ /dev/null @@ -1,28 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,19 +4,15 @@ - declare var v: invalid; - - /// [Errors] //// - --asyncFunctionDeclaration8_es2017.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - asyncFunctionDeclaration8_es2017.ts(1,12): error TS2304: Cannot find name 'await'. - asyncFunctionDeclaration8_es2017.ts(1,20): error TS2304: Cannot find name 'foo'. - asyncFunctionDeclaration8_es2017.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. - - --==== asyncFunctionDeclaration8_es2017.ts (4 errors) ==== -+==== asyncFunctionDeclaration8_es2017.ts (3 errors) ==== - var v = { [await]: foo } -- ~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 asyncFunctionDeclaration8_es2017.ts:1:5: Add a type annotation to the variable v. - ~~~~~ - !!! error TS2304: Cannot find name 'await'. - ~~~ - !!! error TS2304: Cannot find name 'foo'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff deleted file mode 100644 index a932211bcfc1e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es5.d.ts.diff +++ /dev/null @@ -1,28 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,19 +4,15 @@ - declare var v: invalid; - - /// [Errors] //// - --asyncFunctionDeclaration8_es5.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - asyncFunctionDeclaration8_es5.ts(1,12): error TS2304: Cannot find name 'await'. - asyncFunctionDeclaration8_es5.ts(1,20): error TS2304: Cannot find name 'foo'. - asyncFunctionDeclaration8_es5.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. - - --==== asyncFunctionDeclaration8_es5.ts (4 errors) ==== -+==== asyncFunctionDeclaration8_es5.ts (3 errors) ==== - var v = { [await]: foo } -- ~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 asyncFunctionDeclaration8_es5.ts:1:5: Add a type annotation to the variable v. - ~~~~~ - !!! error TS2304: Cannot find name 'await'. - ~~~ - !!! error TS2304: Cannot find name 'foo'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff deleted file mode 100644 index 023d66d019bd2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/asyncFunctionDeclaration8_es6.d.ts.diff +++ /dev/null @@ -1,28 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,19 +4,15 @@ - declare var v: invalid; - - /// [Errors] //// - --asyncFunctionDeclaration8_es6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - asyncFunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'await'. - asyncFunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. - asyncFunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. - - --==== asyncFunctionDeclaration8_es6.ts (4 errors) ==== -+==== asyncFunctionDeclaration8_es6.ts (3 errors) ==== - var v = { [await]: foo } -- ~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 asyncFunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v. - ~~~~~ - !!! error TS2304: Cannot find name 'await'. - ~~~ - !!! error TS2304: Cannot find name 'foo'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff deleted file mode 100644 index b19095a606e5c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/bigintIndex.d.ts.diff +++ /dev/null @@ -1,51 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/compiler/bigintIndex.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -12,9 +12,11 @@ - - //// [b.d.ts] - declare const a: {}; - declare const b: invalid; --declare const c: invalid; -+declare const c: { -+ [bigNum]: number; -+}; - - /// [Errors] //// - - a.ts(2,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. -@@ -27,9 +29,8 @@ - b.ts(2,19): error TS1128: Declaration or statement expected. - b.ts(3,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - b.ts(3,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --b.ts(4,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - - ==== a.ts (5 errors) ==== - interface BigIntIndex { -@@ -66,9 +67,9 @@ - typedArray["1"] = 0xBB; - typedArray[2] = 0xCC; - - // {1n: 123} is a syntax error; must go in separate file so BigIntIndex error is shown --==== b.ts (7 errors) ==== -+==== b.ts (6 errors) ==== - // BigInt cannot be used as an object literal property - const a = {1n: 123}; - ~~ - !!! error TS1136: Property assignment expected. -@@ -84,8 +85,5 @@ - !!! related TS9027 b.ts:3:7: Add a type annotation to the variable b. - const c = {[bigNum]: 789}; - ~~~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -- ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 b.ts:4:7: Add a type annotation to the variable c. - -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/booleanFilterAnyArray.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/booleanFilterAnyArray.d.ts.diff deleted file mode 100644 index 59b273564bc1d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/booleanFilterAnyArray.d.ts.diff +++ /dev/null @@ -1,24 +0,0 @@ -// [[Reason: TS normalizes types]] //// - -//// [tests/cases/compiler/booleanFilterAnyArray.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -21,13 +21,13 @@ - declare var foo: invalid; - declare var foor: Array<{ - name: string; - }>; --declare var foor: { -+declare var foor: Array<{ - name: string; --}[]; -+}>; - declare var foos: Array; --declare var foos: boolean[]; -+declare var foos: Array; - - /// [Errors] //// - - booleanFilterAnyArray.ts(20,11): error TS9017: Only const arrays can be inferred with --isolatedDeclarations. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/capturedParametersInInitializers1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/capturedParametersInInitializers1.d.ts.diff deleted file mode 100644 index ae44a5bcedd0f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/capturedParametersInInitializers1.d.ts.diff +++ /dev/null @@ -1,46 +0,0 @@ -// [[Reason: TS normalizes types]] //// - -//// [tests/cases/compiler/capturedParametersInInitializers1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,9 +4,9 @@ - declare function foo1(y?: invalid, x?: number): invalid; - declare function foo2(y?: (x: typeof z) => invalid, z?: number): invalid; - declare let a: invalid; - declare function foo3(y?: { -- x: number; -+ x: typeof z; - }, z?: number): invalid; - declare function foo4(y?: invalid, z?: number): invalid; - declare function foo5(y?: invalid, z?: number): invalid; - declare function foo6(y?: () => invalid, z?: number): invalid; -@@ -35,13 +35,12 @@ - capturedParametersInInitializers1.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. - capturedParametersInInitializers1.ts(34,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. - capturedParametersInInitializers1.ts(38,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. - capturedParametersInInitializers1.ts(38,20): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. --capturedParametersInInitializers1.ts(38,20): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. - - --==== capturedParametersInInitializers1.ts (22 errors) ==== -+==== capturedParametersInInitializers1.ts (21 errors) ==== - // ok - usage is deferred - function foo1(y = class {c = x}, x = 1) { - ~~~~ - !!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -@@ -139,11 +138,8 @@ - ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9028 capturedParametersInInitializers1.ts:38:15: Add a type annotation to the parameter y. - !!! related TS9034 capturedParametersInInitializers1.ts:38:20: Add a return type to the method -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9028 capturedParametersInInitializers1.ts:38:15: Add a type annotation to the parameter y. - ~ - !!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. - } - -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/circularObjectLiteralAccessors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/circularObjectLiteralAccessors.d.ts.diff deleted file mode 100644 index 371880d3b2e36..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/circularObjectLiteralAccessors.d.ts.diff +++ /dev/null @@ -1,18 +0,0 @@ -// [[Reason: TS merges accessors with the same type. DTE can only merge if one type is specified.]] //// - -//// [tests/cases/compiler/circularObjectLiteralAccessors.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,8 +2,9 @@ - - //// [circularObjectLiteralAccessors.d.ts] - declare const a: { - b: { -- foo: string; -+ get foo(): string; -+ set foo(value: string); - }; - foo: string; - }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/complicatedPrivacy.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/complicatedPrivacy.d.ts.diff deleted file mode 100644 index d1a00c65cd4b5..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/complicatedPrivacy.d.ts.diff +++ /dev/null @@ -1,20 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/compiler/complicatedPrivacy.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -17,9 +17,11 @@ - }): invalid; - export function f3(): { - (a: number): C1; - }; -- export function f4(arg1: {}): invalid; -+ export function f4(arg1: { -+ [number]: C1; -+ }): invalid; - export function f5(arg2: { - new (arg1: C1): C1; - }): invalid; - namespace m3 { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff deleted file mode 100644 index 4173851265669..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES5.d.ts.diff +++ /dev/null @@ -1,70 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,43 +4,43 @@ - declare var s: string; - declare var n: number; - declare var a: any; - declare class C { -+ [s]: number; -+ [n]: invalid; - static [""]: number; - [0]: number; -+ [a]: number; - [`hello bye`]: number; - } - - /// [Errors] //// - - computedPropertyNames12_ES5.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --computedPropertyNames12_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames12_ES5.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --computedPropertyNames12_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames12_ES5.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. - computedPropertyNames12_ES5.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - computedPropertyNames12_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - computedPropertyNames12_ES5.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - computedPropertyNames12_ES5.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --computedPropertyNames12_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames12_ES5.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - - --==== computedPropertyNames12_ES5.ts (11 errors) ==== -+==== computedPropertyNames12_ES5.ts (9 errors) ==== - var s: string; - var n: number; - var a: any; - class C { - [s]: number; - ~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - [n] = n; - ~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+ ~ -+!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -+!!! related TS9029 computedPropertyNames12_ES5.ts:6:5: Add a type annotation to the property [n]. - static [s + s]: string; - ~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [s + n] = 2; -@@ -53,10 +53,8 @@ - [0]: number; - [a]: number; - ~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static [true]: number; - ~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [`hello bye`] = 0; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff deleted file mode 100644 index 6db318e653142..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames12_ES6.d.ts.diff +++ /dev/null @@ -1,70 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,43 +4,43 @@ - declare var s: string; - declare var n: number; - declare var a: any; - declare class C { -+ [s]: number; -+ [n]: invalid; - static [""]: number; - [0]: number; -+ [a]: number; - [`hello bye`]: number; - } - - /// [Errors] //// - - computedPropertyNames12_ES6.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --computedPropertyNames12_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames12_ES6.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --computedPropertyNames12_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames12_ES6.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. - computedPropertyNames12_ES6.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - computedPropertyNames12_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - computedPropertyNames12_ES6.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - computedPropertyNames12_ES6.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --computedPropertyNames12_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames12_ES6.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - - --==== computedPropertyNames12_ES6.ts (11 errors) ==== -+==== computedPropertyNames12_ES6.ts (9 errors) ==== - var s: string; - var n: number; - var a: any; - class C { - [s]: number; - ~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - [n] = n; - ~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+ ~ -+!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -+!!! related TS9029 computedPropertyNames12_ES6.ts:6:5: Add a type annotation to the property [n]. - static [s + s]: string; - ~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [s + n] = 2; -@@ -53,10 +53,8 @@ - [0]: number; - [a]: number; - ~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static [true]: number; - ~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [`hello bye`] = 0; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff deleted file mode 100644 index 353ab9124ba4d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES5.d.ts.diff +++ /dev/null @@ -1,66 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,20 +4,23 @@ - declare var s: string; - declare var n: number; - declare var a: any; - declare class C { -+ get [s](): invalid; -+ set [n](v: invalid); - static set [""](v: invalid); - get [0](): invalid; -+ set [a](v: invalid); - set [`hello bye`](v: invalid); - } - - /// [Errors] //// - --computedPropertyNames16_ES5.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --computedPropertyNames16_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames16_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -+computedPropertyNames16_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames16_ES5.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames16_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. --computedPropertyNames16_ES5.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames16_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames16_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - - ==== computedPropertyNames16_ES5.ts (6 errors) ==== -@@ -26,12 +29,14 @@ - var a: any; - class C { - get [s]() { 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 computedPropertyNames16_ES5.ts:5:9: Add a return type to the get accessor declaration. - set [n](v) { } -- ~~~ --!!! 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 TS9033 computedPropertyNames16_ES5.ts:6:9: Add a type to parameter of the set accessor declaration. - static get [s + s]() { return 0; } - set [s + n](v) { } - get [+s]() { return 0; } - static set [""](v) { } -@@ -42,10 +47,11 @@ - ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9032 computedPropertyNames16_ES5.ts:11:9: Add a return type to the get accessor declaration. - set [a](v) { } -- ~~~ --!!! 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 TS9033 computedPropertyNames16_ES5.ts:12:9: Add a type to parameter of the set accessor declaration. - static get [true]() { return 0; } - set [`hello bye`](v) { } - ~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff deleted file mode 100644 index 96359e0c76a95..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames16_ES6.d.ts.diff +++ /dev/null @@ -1,66 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,20 +4,23 @@ - declare var s: string; - declare var n: number; - declare var a: any; - declare class C { -+ get [s](): invalid; -+ set [n](v: invalid); - static set [""](v: invalid); - get [0](): invalid; -+ set [a](v: invalid); - set [`hello bye`](v: invalid); - } - - /// [Errors] //// - --computedPropertyNames16_ES6.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --computedPropertyNames16_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames16_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -+computedPropertyNames16_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames16_ES6.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames16_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. --computedPropertyNames16_ES6.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames16_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames16_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - - ==== computedPropertyNames16_ES6.ts (6 errors) ==== -@@ -26,12 +29,14 @@ - var a: any; - class C { - get [s]() { 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 computedPropertyNames16_ES6.ts:5:9: Add a return type to the get accessor declaration. - set [n](v) { } -- ~~~ --!!! 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 TS9033 computedPropertyNames16_ES6.ts:6:9: Add a type to parameter of the set accessor declaration. - static get [s + s]() { return 0; } - set [s + n](v) { } - get [+s]() { return 0; } - static set [""](v) { } -@@ -42,10 +47,11 @@ - ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9032 computedPropertyNames16_ES6.ts:11:9: Add a return type to the get accessor declaration. - set [a](v) { } -- ~~~ --!!! 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 TS9033 computedPropertyNames16_ES6.ts:12:9: Add a type to parameter of the set accessor declaration. - static get [true]() { return 0; } - set [`hello bye`](v) { } - ~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff deleted file mode 100644 index 535a61cffa38c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES5.d.ts.diff +++ /dev/null @@ -1,75 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -3,45 +3,51 @@ - //// [computedPropertyNames2_ES5.d.ts] - declare var methodName: string; - declare var accessorName: string; - declare class C { -+ [methodName](): invalid; -+ static [methodName](): invalid; -+ get [accessorName](): invalid; -+ set [accessorName](v: invalid); -+ static get [accessorName](): invalid; -+ static set [accessorName](v: invalid); - } - - /// [Errors] //// - --computedPropertyNames2_ES5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --computedPropertyNames2_ES5.ts(5,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames2_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+computedPropertyNames2_ES5.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames2_ES5.ts(6,9): error TS2378: A 'get' accessor must return a value. --computedPropertyNames2_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --computedPropertyNames2_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames2_ES5.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames2_ES5.ts(8,16): error TS2378: A 'get' accessor must return a value. --computedPropertyNames2_ES5.ts(8,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --computedPropertyNames2_ES5.ts(9,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames2_ES5.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - --==== computedPropertyNames2_ES5.ts (8 errors) ==== -+==== computedPropertyNames2_ES5.ts (6 errors) ==== - var methodName = "method"; - var accessorName = "accessor"; - class C { - [methodName]() { } - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNames2_ES5.ts:4:5: Add a return type to the method - static [methodName]() { } - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNames2_ES5.ts:5:12: Add a return type to the method - get [accessorName]() { } - ~~~~~~~~~~~~~~ - !!! error TS2378: A 'get' accessor must return a value. - ~~~~~~~~~~~~~~ --!!! 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 TS9033 computedPropertyNames2_ES5.ts:7:9: Add a type to parameter of the set accessor declaration. -+!!! related TS9032 computedPropertyNames2_ES5.ts:6:9: Add a return type to the get accessor declaration. - set [accessorName](v) { } -- ~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static get [accessorName]() { } - ~~~~~~~~~~~~~~ - !!! error TS2378: A 'get' accessor must return a value. - ~~~~~~~~~~~~~~ --!!! 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 TS9033 computedPropertyNames2_ES5.ts:9:16: Add a type to parameter of the set accessor declaration. -+!!! related TS9032 computedPropertyNames2_ES5.ts:8:16: Add a return type to the get accessor declaration. - static set [accessorName](v) { } -- ~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff deleted file mode 100644 index ba3282ccd3eac..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames2_ES6.d.ts.diff +++ /dev/null @@ -1,75 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -3,45 +3,51 @@ - //// [computedPropertyNames2_ES6.d.ts] - declare var methodName: string; - declare var accessorName: string; - declare class C { -+ [methodName](): invalid; -+ static [methodName](): invalid; -+ get [accessorName](): invalid; -+ set [accessorName](v: invalid); -+ static get [accessorName](): invalid; -+ static set [accessorName](v: invalid); - } - - /// [Errors] //// - --computedPropertyNames2_ES6.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --computedPropertyNames2_ES6.ts(5,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames2_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+computedPropertyNames2_ES6.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames2_ES6.ts(6,9): error TS2378: A 'get' accessor must return a value. --computedPropertyNames2_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --computedPropertyNames2_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames2_ES6.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames2_ES6.ts(8,16): error TS2378: A 'get' accessor must return a value. --computedPropertyNames2_ES6.ts(8,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --computedPropertyNames2_ES6.ts(9,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames2_ES6.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - --==== computedPropertyNames2_ES6.ts (8 errors) ==== -+==== computedPropertyNames2_ES6.ts (6 errors) ==== - var methodName = "method"; - var accessorName = "accessor"; - class C { - [methodName]() { } - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNames2_ES6.ts:4:5: Add a return type to the method - static [methodName]() { } - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNames2_ES6.ts:5:12: Add a return type to the method - get [accessorName]() { } - ~~~~~~~~~~~~~~ - !!! error TS2378: A 'get' accessor must return a value. - ~~~~~~~~~~~~~~ --!!! 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 TS9033 computedPropertyNames2_ES6.ts:7:9: Add a type to parameter of the set accessor declaration. -+!!! related TS9032 computedPropertyNames2_ES6.ts:6:9: Add a return type to the get accessor declaration. - set [accessorName](v) { } -- ~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static get [accessorName]() { } - ~~~~~~~~~~~~~~ - !!! error TS2378: A 'get' accessor must return a value. - ~~~~~~~~~~~~~~ --!!! 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 TS9033 computedPropertyNames2_ES6.ts:9:16: Add a type to parameter of the set accessor declaration. -+!!! related TS9032 computedPropertyNames2_ES6.ts:8:16: Add a return type to the get accessor declaration. - static set [accessorName](v) { } -- ~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff deleted file mode 100644 index 21130c1692c00..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES5.d.ts.diff +++ /dev/null @@ -1,54 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -7,33 +7,24 @@ - declare var v: invalid; - - /// [Errors] //// - --computedPropertyNames4_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --computedPropertyNames4_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames4_ES5.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations. - computedPropertyNames4_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames4_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames4_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames4_ES5.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations. --computedPropertyNames4_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames4_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames4_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - --==== computedPropertyNames4_ES5.ts (10 errors) ==== -+==== computedPropertyNames4_ES5.ts (7 errors) ==== - var s: string; - var n: number; - var a: any; - var v = { - [s]: 0, -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. - [n]: n, -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. - ~ - !!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. - !!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. - !!! related TS9035 computedPropertyNames4_ES5.ts:6:10: Add a type assertion to this expression to make type type explicit. -@@ -55,11 +46,8 @@ - !!! related TS9035 computedPropertyNames4_ES5.ts:9:11: Add a type assertion to this expression to make type type explicit. - [""]: 0, - [0]: 0, - [a]: 1, -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. - [true]: 0, - ~~~~~~~~~~~ - !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - !!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff deleted file mode 100644 index ffde3d6444576..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames4_ES6.d.ts.diff +++ /dev/null @@ -1,54 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -7,33 +7,24 @@ - declare var v: invalid; - - /// [Errors] //// - --computedPropertyNames4_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --computedPropertyNames4_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames4_ES6.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations. - computedPropertyNames4_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames4_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames4_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames4_ES6.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations. --computedPropertyNames4_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames4_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames4_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - --==== computedPropertyNames4_ES6.ts (10 errors) ==== -+==== computedPropertyNames4_ES6.ts (7 errors) ==== - var s: string; - var n: number; - var a: any; - var v = { - [s]: 0, -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. - [n]: n, -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. - ~ - !!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. - !!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. - !!! related TS9035 computedPropertyNames4_ES6.ts:6:10: Add a type assertion to this expression to make type type explicit. -@@ -55,11 +46,8 @@ - !!! related TS9035 computedPropertyNames4_ES6.ts:9:11: Add a type assertion to this expression to make type type explicit. - [""]: 0, - [0]: 0, - [a]: 1, -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. - [true]: 0, - ~~~~~~~~~~~ - !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - !!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff deleted file mode 100644 index 1e71244b75080..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES5.d.ts.diff +++ /dev/null @@ -1,50 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -6,29 +6,24 @@ - - /// [Errors] //// - - computedPropertyNames5_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames5_ES5.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames5_ES5.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames5_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames5_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames5_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames5_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames5_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames5_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames5_ES5.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames5_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - --==== computedPropertyNames5_ES5.ts (11 errors) ==== -+==== computedPropertyNames5_ES5.ts (9 errors) ==== - var b: boolean; - var v = { - [b]: 0, - ~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. - [true]: 1, - ~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [[]]: 0, -@@ -45,11 +40,8 @@ - !!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. - [undefined]: undefined, - ~~~~~~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -- ~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. - [null]: null - ~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff deleted file mode 100644 index 579a811b4e691..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames5_ES6.d.ts.diff +++ /dev/null @@ -1,50 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -6,29 +6,24 @@ - - /// [Errors] //// - - computedPropertyNames5_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames5_ES6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames5_ES6.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames5_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames5_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames5_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames5_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames5_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames5_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames5_ES6.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames5_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - --==== computedPropertyNames5_ES6.ts (11 errors) ==== -+==== computedPropertyNames5_ES6.ts (9 errors) ==== - var b: boolean; - var v = { - [b]: 0, - ~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. - [true]: 1, - ~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [[]]: 0, -@@ -45,11 +40,8 @@ - !!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. - [undefined]: undefined, - ~~~~~~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -- ~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. - [null]: null - ~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff deleted file mode 100644 index 8eaa60154eacb..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES5.d.ts.diff +++ /dev/null @@ -1,52 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -3,37 +3,29 @@ - //// [computedPropertyNames6_ES5.d.ts] - declare var p1: number | string; - declare var p2: number | number[]; - declare var p3: string | boolean; --declare var v: invalid; -+declare var v: { -+ [p1]: number; -+ [p2]: number; -+ [p3]: number; -+}; - - /// [Errors] //// - --computedPropertyNames6_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames6_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames6_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames6_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames6_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - --==== computedPropertyNames6_ES5.ts (5 errors) ==== -+==== computedPropertyNames6_ES5.ts (2 errors) ==== - var p1: number | string; - var p2: number | number[]; - var p3: string | boolean; - var v = { - [p1]: 0, -- ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v. - [p2]: 1, - ~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -- ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v. - [p3]: 2 - ~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -- ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff deleted file mode 100644 index 5f9d115ab2190..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames6_ES6.d.ts.diff +++ /dev/null @@ -1,52 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -3,37 +3,29 @@ - //// [computedPropertyNames6_ES6.d.ts] - declare var p1: number | string; - declare var p2: number | number[]; - declare var p3: string | boolean; --declare var v: invalid; -+declare var v: { -+ [p1]: number; -+ [p2]: number; -+ [p3]: number; -+}; - - /// [Errors] //// - --computedPropertyNames6_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames6_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames6_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames6_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames6_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - --==== computedPropertyNames6_ES6.ts (5 errors) ==== -+==== computedPropertyNames6_ES6.ts (2 errors) ==== - var p1: number | string; - var p2: number | number[]; - var p3: string | boolean; - var v = { - [p1]: 0, -- ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v. - [p2]: 1, - ~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -- ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v. - [p3]: 2 - ~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -- ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames7_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames7_ES5.d.ts.diff deleted file mode 100644 index 0f1929ea81dd9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames7_ES5.d.ts.diff +++ /dev/null @@ -1,15 +0,0 @@ -// [[Reason: Computed property are not resolved]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,6 +4,6 @@ - declare enum E { - member = 0 - } - declare var v: { -- 0: number; -+ [E.member]: number; - }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames7_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames7_ES6.d.ts.diff deleted file mode 100644 index 9cf4a7ed3979d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames7_ES6.d.ts.diff +++ /dev/null @@ -1,15 +0,0 @@ -// [[Reason: Computed property are not resolved]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,6 +4,6 @@ - declare enum E { - member = 0 - } - declare var v: { -- 0: number; -+ [E.member]: number; - }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff deleted file mode 100644 index 0e4f9f11d17b3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES5.d.ts.diff +++ /dev/null @@ -1,51 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -3,33 +3,34 @@ - //// [computedPropertyNamesOnOverloads_ES5.d.ts] - declare var methodName: string; - declare var accessorName: string; - declare class C { -+ [methodName](v: string): invalid; -+ [methodName](): invalid; - } - - /// [Errors] //// - - computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. --computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. --computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - --==== computedPropertyNamesOnOverloads_ES5.ts (5 errors) ==== -+==== computedPropertyNamesOnOverloads_ES5.ts (4 errors) ==== - var methodName = "method"; - var accessorName = "accessor"; - class C { - [methodName](v: string); - ~~~~~~~~~~~~ - !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:4:5: Add a return type to the method - [methodName](); - ~~~~~~~~~~~~ - !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:5:5: Add a return type to the method - [methodName](v?: string) { } -- ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff deleted file mode 100644 index 3bf9fd225606d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesOnOverloads_ES6.d.ts.diff +++ /dev/null @@ -1,51 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -3,33 +3,34 @@ - //// [computedPropertyNamesOnOverloads_ES6.d.ts] - declare var methodName: string; - declare var accessorName: string; - declare class C { -+ [methodName](v: string): invalid; -+ [methodName](): invalid; - } - - /// [Errors] //// - - computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. --computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. --computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - --==== computedPropertyNamesOnOverloads_ES6.ts (5 errors) ==== -+==== computedPropertyNamesOnOverloads_ES6.ts (4 errors) ==== - var methodName = "method"; - var accessorName = "accessor"; - class C { - [methodName](v: string); - ~~~~~~~~~~~~ - !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:4:5: Add a return type to the method - [methodName](); - ~~~~~~~~~~~~ - !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:5:5: Add a return type to the method - [methodName](v?: string) { } -- ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff deleted file mode 100644 index 4e6a14815f671..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNamesWithStaticProperty.d.ts.diff +++ /dev/null @@ -1,64 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,49 +4,47 @@ - declare class C { - } - declare class C1 { - static staticProp: number; -+ get [C1.staticProp](): string; -+ set [C1.staticProp](x: string); -+ [C1.staticProp](): invalid; - } - - /// [Errors] //// - - computedPropertyNamesWithStaticProperty.ts(2,1): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. --computedPropertyNamesWithStaticProperty.ts(4,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNamesWithStaticProperty.ts(4,10): error TS2449: Class 'C1' used before its declaration. --computedPropertyNamesWithStaticProperty.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNamesWithStaticProperty.ts(7,10): error TS2449: Class 'C1' used before its declaration. --computedPropertyNamesWithStaticProperty.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNamesWithStaticProperty.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - 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 (10 errors) ==== -+==== computedPropertyNamesWithStaticProperty.ts (8 errors) ==== - class C { - class C1 { - ~~~~~ - !!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. - static staticProp = 10; - get [C1.staticProp]() { -- ~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - ~~ - !!! error TS2449: Class 'C1' used before its declaration. - !!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. - return "hello"; - } - set [C1.staticProp](x: string) { -- ~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - ~~ - !!! error TS2449: Class 'C1' used before its declaration. - !!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. - var y = x; - } - [C1.staticProp]() { } - ~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNamesWithStaticProperty.ts:10:5: Add a return type to the method - ~~ - !!! error TS2449: Class 'C1' used before its declaration. - !!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. - } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff deleted file mode 100644 index 4f79133fa619e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/constEnumErrors.d.ts.diff +++ /dev/null @@ -1,50 +0,0 @@ -// [[Reason: TSC detects forward ref which is not allowed and so enum value is undefined, which is also the way we detect isolated declaration errors.]] //// - -//// [tests/cases/compiler/constEnumErrors.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -6,9 +6,9 @@ - } - declare namespace E { - } - declare const enum E1 { -- X = 0, -+ X, - Y, - Y1 - } - declare const enum E2 { -@@ -35,8 +35,9 @@ - /// [Errors] //// - - constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. - constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -+constEnumErrors.ts(12,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. - constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - constEnumErrors.ts(14,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. - constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. - constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. -@@ -58,9 +59,9 @@ - constEnumErrors.ts(42,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - - --==== constEnumErrors.ts (23 errors) ==== -+==== constEnumErrors.ts (24 errors) ==== - const enum E { - ~ - !!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. - A -@@ -75,8 +76,10 @@ - const enum E1 { - // illegal case - // forward reference to the element of the same enum - X = Y, -+ ~ -+!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. - ~ - !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - // forward reference to the element of the same enum - Y = E1.Z, diff --git a/tests/baselines/reference/isolated-declarations/original/diff/contextualSignatureInstantiation.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/contextualSignatureInstantiation.d.ts.diff deleted file mode 100644 index 895f4927e0a7a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/contextualSignatureInstantiation.d.ts.diff +++ /dev/null @@ -1,24 +0,0 @@ -// [[Reason: TS changes the order of union constituents]] //// - -//// [tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -9,12 +9,12 @@ - declare var a: number; - declare var a: number; - declare var a: number; - declare var b: number | string; --declare var b: string | number; --declare var b: string | number; --declare var b: string | number; --declare var b: string | number; -+declare var b: number | string; -+declare var b: number | string; -+declare var b: number | string; -+declare var b: number | string; - declare var d: number[] | string[]; - declare var d: number[] | string[]; - declare var d: number[] | string[]; - declare var d: number[] | string[]; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/contextualTyping.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/contextualTyping.d.ts.diff deleted file mode 100644 index 1c76dd597f056..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/contextualTyping.d.ts.diff +++ /dev/null @@ -1,27 +0,0 @@ -// [[Reason: TS normalizes types]] //// - -//// [tests/cases/compiler/contextualTyping.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -95,13 +95,17 @@ - declare var c12t3: number[]; - declare var c12t4: () => IFoo; - declare var c12t5: (n: number) => IFoo; - declare var c12t6: (n: number, s: string) => IFoo; --declare var c12t7: (n: number, s: string) => number; -+declare var c12t7: { -+ (n: number, s: string): number; -+}; - declare var c12t8: (n: number, s: string) => number; - declare var c12t9: number[][]; - declare var c12t10: IFoo[]; --declare var c12t11: ((n: number, s: string) => string)[]; -+declare var c12t11: { -+ (n: number, s: string): string; -+}[]; - declare var c12t12: IBar; - declare var c12t13: IFoo; - declare var c12t14: IFoo; - declare function EF1(a: number, b: number): number; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/contextualTyping38.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/contextualTyping38.d.ts.diff deleted file mode 100644 index 6cc157241e6cb..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/contextualTyping38.d.ts.diff +++ /dev/null @@ -1,15 +0,0 @@ -// [[Reason: TS normalizes types]] //// - -//// [tests/cases/compiler/contextualTyping38.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,4 +1,6 @@ - - - //// [contextualTyping38.d.ts] --declare var foo: () => number; -+declare var foo: { -+ (): number; -+}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/contextualTyping39.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/contextualTyping39.d.ts.diff deleted file mode 100644 index 885354c18c85d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/contextualTyping39.d.ts.diff +++ /dev/null @@ -1,19 +0,0 @@ -// [[Reason: TS normalizes types]] //// - -//// [tests/cases/compiler/contextualTyping39.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,10 @@ - - - //// [contextualTyping39.d.ts] --declare var foo: () => number; -+declare var foo: { -+ (): number; -+}; - - /// [Errors] //// - - contextualTyping39.ts(1,11): error TS2352: Conversion of type '() => string' to type '() => number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/decoratorMetadataWithImportDeclarationNameCollision7.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/decoratorMetadataWithImportDeclarationNameCollision7.d.ts.diff deleted file mode 100644 index 93478914fa4c1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/decoratorMetadataWithImportDeclarationNameCollision7.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: TSC removes import that is not used in a semantically valid way. DTE can't know about this.]] //// - -//// [tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -5,8 +5,9 @@ - doSomething(): invalid; - } - - //// [service.d.ts] -+import db from './db'; - declare class MyClass { - db: db.db; - constructor(db: db.db); - } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff deleted file mode 100644 index 9db5c30da6a5f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/decoratorsOnComputedProperties.d.ts.diff +++ /dev/null @@ -1,255 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/compiler/decoratorsOnComputedProperties.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -15,8 +15,11 @@ - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any; - [Symbol.match]: any; -+ [fieldNameA]: any; -+ [fieldNameB]: any; -+ [fieldNameC]: any; - } - declare class C { - ["property"]: any; - [Symbol.toStringTag]: any; -@@ -25,8 +28,11 @@ - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any; - [Symbol.match]: any; -+ [fieldNameA]: any; -+ [fieldNameB]: any; -+ [fieldNameC]: any; - } - declare class E { - ["property"]: any; - [Symbol.toStringTag]: any; -@@ -35,8 +41,11 @@ - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any; - [Symbol.match]: any; -+ [fieldNameA]: any; -+ [fieldNameB]: any; -+ [fieldNameC]: any; - } - declare class G { - ["property"]: any; - [Symbol.toStringTag]: any; -@@ -45,8 +54,11 @@ - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any; - [Symbol.match]: any; -+ [fieldNameA]: any; -+ [fieldNameB]: any; -+ [fieldNameC]: any; - } - declare class I { - ["property"]: any; - [Symbol.toStringTag]: any; -@@ -55,8 +67,11 @@ - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any; - [Symbol.match]: any; -+ [fieldNameA]: any; -+ [fieldNameB]: any; -+ [fieldNameC]: any; - } - - /// [Errors] //// - -@@ -64,13 +79,10 @@ - decoratorsOnComputedProperties.ts(18,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(19,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(20,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(21,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(21,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - decoratorsOnComputedProperties.ts(22,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(22,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - decoratorsOnComputedProperties.ts(23,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(23,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - decoratorsOnComputedProperties.ts(27,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(28,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(29,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(30,5): error TS1206: Decorators are not valid here. -@@ -83,13 +95,10 @@ - decoratorsOnComputedProperties.ts(52,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(53,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(54,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(55,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(55,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - decoratorsOnComputedProperties.ts(56,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(56,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - decoratorsOnComputedProperties.ts(57,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(57,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - decoratorsOnComputedProperties.ts(62,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(63,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(64,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(65,5): error TS1206: Decorators are not valid here. -@@ -102,13 +111,10 @@ - decoratorsOnComputedProperties.ts(88,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(89,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(90,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(92,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(92,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - decoratorsOnComputedProperties.ts(93,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(93,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - decoratorsOnComputedProperties.ts(94,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(94,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - decoratorsOnComputedProperties.ts(98,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(99,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(100,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(101,5): error TS1206: Decorators are not valid here. -@@ -121,13 +127,10 @@ - decoratorsOnComputedProperties.ts(124,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(125,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(126,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(128,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(128,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - decoratorsOnComputedProperties.ts(129,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(129,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - decoratorsOnComputedProperties.ts(131,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(131,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - decoratorsOnComputedProperties.ts(135,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(136,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(137,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(138,5): error TS1206: Decorators are not valid here. -@@ -140,13 +143,10 @@ - decoratorsOnComputedProperties.ts(162,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(163,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(164,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - decoratorsOnComputedProperties.ts(166,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(166,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - decoratorsOnComputedProperties.ts(167,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(167,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - decoratorsOnComputedProperties.ts(169,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. --decoratorsOnComputedProperties.ts(169,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - decoratorsOnComputedProperties.ts(173,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(174,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(175,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(176,5): error TS1206: Decorators are not valid here. -@@ -158,9 +158,9 @@ - decoratorsOnComputedProperties.ts(186,5): error TS1206: Decorators are not valid here. - decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid here. - - --==== decoratorsOnComputedProperties.ts (97 errors) ==== -+==== decoratorsOnComputedProperties.ts (82 errors) ==== - function x(o: object, k: PropertyKey) { } - ~ - !!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9031 decoratorsOnComputedProperties.ts:1:10: Add a return type to the function declaration. -@@ -191,20 +191,14 @@ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [fieldNameA]: any; - ~~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - @x [fieldNameB]: any; - ~~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - @x [fieldNameC]: any = null; - ~~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } - - void class B { - @x ["property"]: any; -@@ -263,20 +257,14 @@ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [fieldNameA]: any; - ~~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - @x [fieldNameB]: any; - ~~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - @x [fieldNameC]: any = null; - ~~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - ["some" + "method"]() {} - } - - void class D { -@@ -338,20 +326,14 @@ - ["some" + "method"]() {} - [fieldNameA]: any; - ~~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - @x [fieldNameB]: any; - ~~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - @x [fieldNameC]: any = null; - ~~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } - - void class F { - @x ["property"]: any; -@@ -412,21 +394,15 @@ - ["some" + "method"]() {} - [fieldNameA]: any; - ~~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - @x [fieldNameB]: any; - ~~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - ["some" + "method2"]() {} - @x [fieldNameC]: any = null; - ~~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } - - void class H { - @x ["property"]: any; -@@ -488,21 +464,15 @@ - @x ["some" + "method"]() {} - [fieldNameA]: any; - ~~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - @x [fieldNameB]: any; - ~~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - ["some" + "method2"]() {} - @x [fieldNameC]: any = null; - ~~~~~~~~~~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -- ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } - - void class J { - @x ["property"]: any; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/duplicateObjectLiteralProperty_computedName1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/duplicateObjectLiteralProperty_computedName1.d.ts.diff deleted file mode 100644 index 6b4bc641f7f7b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/duplicateObjectLiteralProperty_computedName1.d.ts.diff +++ /dev/null @@ -1,18 +0,0 @@ -// [[Reason: DTE preserves different duplicate identifier]] //// - -//// [tests/cases/compiler/duplicateObjectLiteralProperty_computedName1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -17,9 +17,9 @@ - declare const t5: { - "+1": number; - }; - declare const t6: { -- [-1]: number; -+ "-1": number; - }; - declare const t7: { - "-1": number; - }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/duplicateObjectLiteralProperty_computedName2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/duplicateObjectLiteralProperty_computedName2.d.ts.diff deleted file mode 100644 index 1293e34f74b91..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/duplicateObjectLiteralProperty_computedName2.d.ts.diff +++ /dev/null @@ -1,30 +0,0 @@ -// [[Reason: Computed property are not resolved]] //// - -//// [tests/cases/compiler/duplicateObjectLiteralProperty_computedName2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -9,18 +9,18 @@ - declare enum E2 { - B = 0 - } - declare const t1: { -- 1: number; -+ [n]: number; - }; - declare const t2: { -- s: number; -+ [s]: number; - }; - declare const t3: { -- ENUM_KEY: number; -+ [E1.A]: number; - }; - declare const t4: { -- 0: number; -+ [E2.B]: number; - }; - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/duplicateVarsAcrossFileBoundaries.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/duplicateVarsAcrossFileBoundaries.d.ts.diff deleted file mode 100644 index 42117b2a87a68..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/duplicateVarsAcrossFileBoundaries.d.ts.diff +++ /dev/null @@ -1,27 +0,0 @@ -// [[Reason: TSC Resolves variable types across files.]] //// - -//// [tests/cases/compiler/duplicateVarsAcrossFileBoundaries.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,15 +4,15 @@ - declare var x: number; - declare var y: string; - - //// [duplicateVarsAcrossFileBoundaries_1.d.ts] --declare var x: number; -+declare var x: boolean; - declare var z: number; - - //// [duplicateVarsAcrossFileBoundaries_2.d.ts] --declare var x: number; --declare var y: string; --declare var z: number; -+declare var x: string; -+declare var y: number; -+declare var z: boolean; - - //// [duplicateVarsAcrossFileBoundaries_3.d.ts] - declare var x: number; - declare var y: string; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/escapedIdentifiers.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/escapedIdentifiers.d.ts.diff deleted file mode 100644 index ea124e3a02989..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/escapedIdentifiers.d.ts.diff +++ /dev/null @@ -1,20 +0,0 @@ -// [[Reason: DTE resolves unicode escapes in some cases.]] //// - -//// [tests/cases/compiler/escapedIdentifiers.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -26,10 +26,10 @@ - bar2: number; - } - declare var interfaceType1Object1: interfaceType1; - declare var interfaceType1Object2: interfaceType1; --declare var interfaceType2Object1: interfaceType\u0032; --declare var interfaceType2Object2: interfaceType\u0032; -+declare var interfaceType2Object1: interfaceType2; -+declare var interfaceType2Object2: interfaceType2; - declare class testClass { - func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number): invalid; - } - declare class constructorTestClass { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff deleted file mode 100644 index fe53f98bf9cbb..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/forwardRefInEnum.d.ts.diff +++ /dev/null @@ -1,50 +0,0 @@ -// [[Reason: TSC detects forward ref which is not allowed and so enum value is undefined, which is also the way we detect isolated declaration errors.]] //// - -//// [tests/cases/compiler/forwardRefInEnum.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,10 +1,10 @@ - - - //// [forwardRefInEnum.d.ts] - declare enum E1 { -- X = 0, -- X1 = 0, -+ X, -+ X1, - Y, - Y1 - } - declare enum E1 { -@@ -12,22 +12,28 @@ - } - - /// [Errors] //// - -+forwardRefInEnum.ts(4,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. - forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -+forwardRefInEnum.ts(5,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. - forwardRefInEnum.ts(5,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - forwardRefInEnum.ts(7,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. - forwardRefInEnum.ts(8,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. - - --==== forwardRefInEnum.ts (4 errors) ==== -+==== forwardRefInEnum.ts (6 errors) ==== - enum E1 { - // illegal case - // forward reference to the element of the same enum - X = Y, -+ ~ -+!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. - ~ - !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - X1 = E1["Y"], -+ ~~ -+!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. - ~~~~~~~ - !!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - // forward reference to the element of the same enum - Y = E1.Z, diff --git a/tests/baselines/reference/isolated-declarations/original/diff/generatedContextualTyping.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/generatedContextualTyping.d.ts.diff deleted file mode 100644 index d66ce139c395b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/generatedContextualTyping.d.ts.diff +++ /dev/null @@ -1,27 +0,0 @@ -// [[Reason: TS normalizes types]] //// - -//// [tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -633,12 +633,16 @@ - var t: Genric; - } - declare var x206: () => Base[]; - declare var x207: () => Base[]; --declare var x209: () => Base[]; --declare var x210: () => Base[]; -+declare var x209: { -+ (): Base[]; -+}; -+declare var x210: { -+ (): Base[]; -+}; - declare var x211: Base[]; --declare var x212: Base[]; -+declare var x212: Array; - declare var x213: { - [n: number]: Base; - }; - declare var x214: { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/genericTypeReferenceWithoutTypeArgument.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/genericTypeReferenceWithoutTypeArgument.d.ts.diff deleted file mode 100644 index 11005c1224c9c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/genericTypeReferenceWithoutTypeArgument.d.ts.diff +++ /dev/null @@ -1,31 +0,0 @@ -// [[Reason: TS resolves types]] //// - -//// [tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -15,9 +15,9 @@ - [x: C]: C; - }; - declare var e: (x: C) => invalid; - declare function f(x: C): C; --declare var g: (x: any) => any; -+declare var g: (x: C) => C; - declare class D extends C { - } - interface I extends C { - } -@@ -33,10 +33,10 @@ - interface I2 extends M.E { - } - declare function h(x: T): invalid; - declare function i(x: T): invalid; --declare var j: any; --declare var k: any; -+declare var j: C; -+declare var k: M.E; - - /// [Errors] //// - - genericTypeReferenceWithoutTypeArgument.ts(8,8): error TS2314: Generic type 'C' requires 1 type argument(s). diff --git a/tests/baselines/reference/isolated-declarations/original/diff/genericTypeReferenceWithoutTypeArgument2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/genericTypeReferenceWithoutTypeArgument2.d.ts.diff deleted file mode 100644 index 16a0461946d69..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/genericTypeReferenceWithoutTypeArgument2.d.ts.diff +++ /dev/null @@ -1,29 +0,0 @@ -// [[Reason: TS resolves types]] //// - -//// [tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -15,9 +15,9 @@ - [x: I]: I; - }; - declare var e: (x: I) => invalid; - declare function f(x: I): I; --declare var g: (x: any) => any; -+declare var g: (x: I) => I; - declare class D extends I { - } - interface U extends I { - } -@@ -34,9 +34,9 @@ - } - declare function h(x: T): invalid; - declare function i(x: T): invalid; - declare var j: C; --declare var k: any; -+declare var k: M.E; - - /// [Errors] //// - - genericTypeReferenceWithoutTypeArgument2.ts(8,8): error TS2314: Generic type 'I' requires 1 type argument(s). diff --git a/tests/baselines/reference/isolated-declarations/original/diff/gettersAndSettersErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/gettersAndSettersErrors.d.ts.diff deleted file mode 100644 index 6527aa58a30a1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/gettersAndSettersErrors.d.ts.diff +++ /dev/null @@ -1,18 +0,0 @@ -// [[Reason: Duplicate identifiers in class result in different types]] //// - -//// [tests/cases/compiler/gettersAndSettersErrors.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -3,9 +3,9 @@ - //// [gettersAndSettersErrors.d.ts] - declare class C { - get Foo(): string; - set Foo(foo: string); -- Foo: string; -+ Foo: number; - get Goo(): string; - set Goo(v: string): string; - } - declare class E { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/inKeywordAndIntersection.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/inKeywordAndIntersection.d.ts.diff deleted file mode 100644 index de672ca16231c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/inKeywordAndIntersection.d.ts.diff +++ /dev/null @@ -1,20 +0,0 @@ -// [[Reason: TS normalizes types]] //// - -//// [tests/cases/compiler/inKeywordAndIntersection.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -16,9 +16,11 @@ - interface InstanceTwo { - two(): void; - } - declare const instance: InstanceOne | InstanceTwo; --declare const ClassOne: (new () => InstanceOne) & { -+declare const ClassOne: { -+ new (): InstanceOne; -+} & { - foo: true; - }; - - /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff deleted file mode 100644 index aa7d983257d89..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/indexSignatureMustHaveTypeAnnotation.d.ts.diff +++ /dev/null @@ -1,21 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,11 +1,13 @@ - - - //// [indexSignatureMustHaveTypeAnnotation.d.ts] - interface I { -+ [x]: string; - [x: string]: any; - } - declare class C { -+ [x]: string; - } - declare class C2 { - [x: string]: any; - } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff deleted file mode 100644 index a0a1b9e1149a5..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/indexWithoutParamType2.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/compiler/indexWithoutParamType2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [indexWithoutParamType2.d.ts] - declare class C { -+ [x]: string; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/intTypeCheck.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/intTypeCheck.d.ts.diff deleted file mode 100644 index 6f3f383a9b315..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/intTypeCheck.d.ts.diff +++ /dev/null @@ -1,27 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/compiler/intTypeCheck.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -30,8 +30,9 @@ - new (p4: string, p5?: string): any; - new (p6: string, ...p7: any[]): any; - } - interface i4 { -+ [p]: any; - [p1: string]: any; - [p2: string, p3: number]: any; - } - interface i5 extends i1 { -@@ -62,8 +63,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/literalTypesAndTypeAssertions.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/literalTypesAndTypeAssertions.d.ts.diff deleted file mode 100644 index d6a100b70e7b3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/literalTypesAndTypeAssertions.d.ts.diff +++ /dev/null @@ -1,18 +0,0 @@ -// [[Reason: TS normalizes types]] //// - -//// [tests/cases/conformance/types/literal/literalTypesAndTypeAssertions.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -5,9 +5,9 @@ - a: "foo"; - b: "foo"; - c: string; - }; --declare let x1: 0 | 1; -+declare let x1: (0 | 1); - declare let x2: number; - declare let a: invalid; - declare let b: invalid; - declare let c: invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff deleted file mode 100644 index 6a2abfb0d1dc8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/moduleResolutionWithSuffixes_one_externalTSModule.d.ts.diff +++ /dev/null @@ -1,29 +0,0 @@ -// [[Reason: checker.typeToTypeNode deliberately fails on types that originate from node_modules]] //// - -//// [tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,20 +1,4 @@ - - - //// [/bin/test.d.ts] - export {}; -- --/// [Errors] //// -- --/node_modules/some-library/index.ios.ts(1,17): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -- -- --==== /test.ts (0 errors) ==== -- import { ios } from "some-library"; -- --==== /node_modules/some-library/index.ios.ts (1 errors) ==== -- export function ios() {} -- ~~~ --!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. --!!! related TS9031 /node_modules/some-library/index.ios.ts:1:17: Add a return type to the function declaration. --==== /node_modules/some-library/index.ts (0 errors) ==== -- export function base() {} -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/noUncheckedIndexedAccess.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/noUncheckedIndexedAccess.d.ts.diff deleted file mode 100644 index a6a7bc026eea2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/noUncheckedIndexedAccess.d.ts.diff +++ /dev/null @@ -1,20 +0,0 @@ -// [[Reason: TS normalizes types]] //// - -//// [tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -86,10 +86,10 @@ - a: string; - b: string; - [key: string]: string; - }; --declare const fn1: (key: Key) => string; --declare const fn2: (key: Key) => string; -+declare const fn1: (key: Key) => string; -+declare const fn2: (key: Key) => string; - declare const fn3: (key: Key) => invalid; - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/objectLiteralEnumPropertyNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/objectLiteralEnumPropertyNames.d.ts.diff deleted file mode 100644 index 86e9b420ef71f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/objectLiteralEnumPropertyNames.d.ts.diff +++ /dev/null @@ -1,49 +0,0 @@ -// [[Reason: Computed property are not resolved]] //// - -//// [tests/cases/compiler/objectLiteralEnumPropertyNames.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -9,18 +9,18 @@ - [key in Strs]: string; - }; - declare const x: TestStrs; - declare const ux: { -- a: string; -- b: string; -+ [Strs.A]: string; -+ [Strs.B]: string; - }; - declare const y: TestStrs; - declare const a = "a"; - declare const b = "b"; - declare const z: TestStrs; - declare const uz: { -- a: string; -- b: string; -+ [a]: string; -+ [b]: string; - }; - declare enum Nums { - A = 0, - B = 1 -@@ -30,14 +30,14 @@ - 1: number; - }; - declare const n: TestNums; - declare const un: { -- 0: number; -- 1: number; -+ [Nums.A]: number; -+ [Nums.B]: number; - }; - declare const an = 0; - declare const bn = 1; - declare const m: TestNums; - declare const um: { -- 0: number; -- 1: number; -+ [an]: number; -+ [bn]: number; - }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/objectLiteralGettersAndSetters.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/objectLiteralGettersAndSetters.d.ts.diff deleted file mode 100644 index 868f3ff1927ba..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/objectLiteralGettersAndSetters.d.ts.diff +++ /dev/null @@ -1,34 +0,0 @@ -// [[Reason: TS merges accessors with the same type. DTE can only merge if one type is specified.]] //// - -//// [tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -40,18 +40,22 @@ - x: any; - }; - declare var anyVar: any; - declare var sameType1: { -- x: string; -+ get x(): string; -+ set x(n: string); - }; - declare var sameType2: { -- x: number[]; -+ get x(): Array; -+ set x(n: number[]); - }; - declare var sameType3: { -- x: any; -+ get x(): any; -+ set x(n: typeof anyVar); - }; - declare var sameType4: { -- x: Date; -+ get x(): Date; -+ set x(n: Date); - }; - declare var setParamType1: { - n: (t: string) => void; - }; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/optionalChainingInference.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/optionalChainingInference.d.ts.diff deleted file mode 100644 index 541a0a335d3f9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/optionalChainingInference.d.ts.diff +++ /dev/null @@ -1,18 +0,0 @@ -// [[Reason: TS normalizes types]] //// - -//// [tests/cases/conformance/expressions/optionalChaining/optionalChainingInference.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -14,9 +14,9 @@ - } | undefined; - declare const b1: invalid; - declare const v1: number; - declare const b2: { -- value: number; -+ value: number | undefined; - }; - declare const v2: number; - declare const b3: { - value: number | undefined; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff deleted file mode 100644 index f19945c701a3a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/overloadsWithComputedNames.d.ts.diff +++ /dev/null @@ -1,90 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/compiler/overloadsWithComputedNames.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -14,19 +14,23 @@ - declare const uniqueSym2: unique symbol; - declare const sym: symbol; - declare const strUnion: 'foo' | 'bar'; - declare class C1 { -+ [sym](): void; - [uniqueSym2](): void; - [uniqueSym](): void; - } - interface I1 { -+ [sym](): void; - [uniqueSym2](): void; - [uniqueSym](): void; - [uniqueSym](): void; - } - declare class C2 { -+ [strUnion](): void; - } - declare class I2 { -+ [strUnion](): void; - } - declare class C3 { - [1](): void; - [2](): void; -@@ -43,21 +47,16 @@ - overloadsWithComputedNames.ts(8,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. - overloadsWithComputedNames.ts(14,5): error TS2391: Function implementation is missing or not immediately following the declaration. - overloadsWithComputedNames.ts(16,5): error TS2389: Function implementation name must be '["bar"]'. - overloadsWithComputedNames.ts(28,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. --overloadsWithComputedNames.ts(28,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - overloadsWithComputedNames.ts(29,5): error TS2391: Function implementation is missing or not immediately following the declaration. - overloadsWithComputedNames.ts(35,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. - overloadsWithComputedNames.ts(42,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. --overloadsWithComputedNames.ts(42,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --overloadsWithComputedNames.ts(43,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - overloadsWithComputedNames.ts(47,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. --overloadsWithComputedNames.ts(47,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --overloadsWithComputedNames.ts(48,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is missing or not immediately following the declaration. - - --==== overloadsWithComputedNames.ts (15 errors) ==== -+==== overloadsWithComputedNames.ts (10 errors) ==== - // https://github.com/microsoft/TypeScript/issues/52329 - class Person { - ["B"](a: number): string; - ["A"](a: string|number): number | string { -@@ -95,10 +94,8 @@ - class C1 { - [sym](): void; // should error - ~~~~~ - !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -- ~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - [uniqueSym2](): void; // should error - ~~~~~~~~~~~~ - !!! error TS2391: Function implementation is missing or not immediately following the declaration. - [uniqueSym](): void; -@@ -117,24 +114,16 @@ - class C2 { - [strUnion](): void; // should error - ~~~~~~~~~~ - !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -- ~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - [strUnion]() { } -- ~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } - - class I2 { - [strUnion](): void; // should error - ~~~~~~~~~~ - !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -- ~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - [strUnion]() { } -- ~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } - - class C3 { - [1](): void; // should error diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parseInvalidNonNullableTypes.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parseInvalidNonNullableTypes.d.ts.diff deleted file mode 100644 index 2657995c83b9b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parseInvalidNonNullableTypes.d.ts.diff +++ /dev/null @@ -1,21 +0,0 @@ -// [[Reason: Syntactically invalid.]] //// - -//// [tests/cases/compiler/parseInvalidNonNullableTypes.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -8,11 +8,11 @@ - declare function f5(a: !string): invalid; - declare function f6(a: !number): invalid; - declare function f7(): !string; - declare function f8(): !string; --declare const a: any; -+declare const a: !any; - declare const b: !number; --declare const c: any; -+declare const c: !any; - declare const d: !number; - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parseInvalidNullableTypes.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parseInvalidNullableTypes.d.ts.diff deleted file mode 100644 index 3f2a0a97d218b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parseInvalidNullableTypes.d.ts.diff +++ /dev/null @@ -1,21 +0,0 @@ -// [[Reason: Syntactically invalid.]] //// - -//// [tests/cases/compiler/parseInvalidNullableTypes.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -6,11 +6,11 @@ - declare function f3(a: ?number): invalid; - declare function f4(a: ?string): invalid; - declare function f5(a: ?number): invalid; - declare function f6(a: string): ?string; --declare const a: any; -+declare const a: ?any; - declare const b: ?number; --declare const c: any; -+declare const c: ?any; - declare const d: ?number; - declare let e: ?unknown; - declare let f: ?never; - declare let g: ?void; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parseTypes.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parseTypes.d.ts.diff deleted file mode 100644 index 3faa8c4d288a3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parseTypes.d.ts.diff +++ /dev/null @@ -1,24 +0,0 @@ -// [[Reason: TS normalizes types]] //// - -//// [tests/cases/compiler/parseTypes.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,10 +1,14 @@ - - - //// [parseTypes.d.ts] - declare var x: () => number; --declare var y: () => number; --declare var z: new () => number; -+declare var y: { -+ (): number; -+}; -+declare var z: { -+ new (): number; -+}; - declare var w: { - [x: number]: number; - }; - declare function f(): invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff deleted file mode 100644 index bfd2f420a44d7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName1.d.ts.diff +++ /dev/null @@ -1,28 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,18 +4,14 @@ - declare var v: invalid; - - /// [Errors] //// - --parserComputedPropertyName1.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - parserComputedPropertyName1.ts(1,12): error TS2304: Cannot find name 'e'. - parserComputedPropertyName1.ts(1,15): error TS1005: ':' expected. - - --==== parserComputedPropertyName1.ts (3 errors) ==== -+==== parserComputedPropertyName1.ts (2 errors) ==== - var v = { [e] }; -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 parserComputedPropertyName1.ts:1:5: Add a type annotation to the variable v. - ~ - !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS1005: ':' expected. -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff deleted file mode 100644 index 1a4dba00a1cc7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName10.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserComputedPropertyName10.d.ts] - declare class C { -+ [e]: number; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff deleted file mode 100644 index a88368e4bd783..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName13.d.ts.diff +++ /dev/null @@ -1,19 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,10 @@ - - - //// [parserComputedPropertyName13.d.ts] --declare var v: {}; -+declare var v: { -+ [e]: number; -+}; - - /// [Errors] //// - - parserComputedPropertyName13.ts(1,10): 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/original/diff/parserComputedPropertyName14.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff deleted file mode 100644 index 232e8c46d007f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName14.d.ts.diff +++ /dev/null @@ -1,19 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,10 @@ - - - //// [parserComputedPropertyName14.d.ts] --declare var v: {}; -+declare var v: { -+ [e](): number; -+}; - - /// [Errors] //// - - parserComputedPropertyName14.ts(1,10): 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/original/diff/parserComputedPropertyName15.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff deleted file mode 100644 index 2548eb058e035..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName15.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,8 +2,9 @@ - - //// [parserComputedPropertyName15.d.ts] - declare var v: { - [e: number]: string; -+ [e]: number; - }; - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff deleted file mode 100644 index 22e8844737288..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName18.d.ts.diff +++ /dev/null @@ -1,19 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,10 @@ - - - //// [parserComputedPropertyName18.d.ts] --declare var v: {}; -+declare var v: { -+ [e]?(): number; -+}; - - /// [Errors] //// - - parserComputedPropertyName18.ts(1,10): 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/original/diff/parserComputedPropertyName19.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff deleted file mode 100644 index f45b092be072c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName19.d.ts.diff +++ /dev/null @@ -1,19 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,10 @@ - - - //// [parserComputedPropertyName19.d.ts] --declare var v: {}; -+declare var v: { -+ [e]?: any; -+}; - - /// [Errors] //// - - parserComputedPropertyName19.ts(1,10): 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/original/diff/parserComputedPropertyName2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff deleted file mode 100644 index c711ef5a29464..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName2.d.ts.diff +++ /dev/null @@ -1,31 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,18 +1,16 @@ - - - //// [parserComputedPropertyName2.d.ts] --declare var v: invalid; -+declare var v: { -+ [e]: number; -+}; - - /// [Errors] //// - --parserComputedPropertyName2.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - parserComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName2.ts (2 errors) ==== -+==== parserComputedPropertyName2.ts (1 errors) ==== - var v = { [e]: 1 }; -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 parserComputedPropertyName2.ts:1:5: Add a type annotation to the variable v. - ~ - !!! error TS2304: Cannot find name 'e'. -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff deleted file mode 100644 index 870ebbb677d0c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName20.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserComputedPropertyName20.d.ts] - interface I { -+ [e](): number; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff deleted file mode 100644 index ed71830478c07..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName21.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserComputedPropertyName21.d.ts] - interface I { -+ [e]: number; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff deleted file mode 100644 index e602a93c1338a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName22.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserComputedPropertyName22.d.ts] - declare class C { -+ [e]: number; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff deleted file mode 100644 index 7399125fab2bd..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName23.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserComputedPropertyName23.d.ts] - declare class C { -+ get [e](): number; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff deleted file mode 100644 index c4c7a4cb6763b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName24.d.ts.diff +++ /dev/null @@ -1,32 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,17 +1,22 @@ - - - //// [parserComputedPropertyName24.d.ts] - declare class C { -+ set [e](v: invalid); - } - - /// [Errors] //// - - parserComputedPropertyName24.ts(2,10): error TS2304: Cannot find name 'e'. -+parserComputedPropertyName24.ts(2,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - --==== parserComputedPropertyName24.ts (1 errors) ==== -+==== parserComputedPropertyName24.ts (2 errors) ==== - class C { - set [e](v) { } - ~ - !!! error TS2304: Cannot find name 'e'. -+ ~ -+!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9033 parserComputedPropertyName24.ts:2:9: Add a type to parameter of the set accessor declaration. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff deleted file mode 100644 index 6532db5787fb0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName25.d.ts.diff +++ /dev/null @@ -1,41 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,25 +1,31 @@ - - - //// [parserComputedPropertyName25.d.ts] - declare class C { -+ [e]: invalid; - } - - /// [Errors] //// - - parserComputedPropertyName25.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserComputedPropertyName25.ts(3,6): error TS2304: Cannot find name 'e'. -+parserComputedPropertyName25.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. - parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. - - --==== parserComputedPropertyName25.ts (3 errors) ==== -+==== parserComputedPropertyName25.ts (4 errors) ==== - class C { - // No ASI - [e] = 0 - ~~~ - !!! 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 'e'. -+ ~ - [e2] = 1 -+ ~~~~~~~~~~~~ -+!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -+!!! related TS9029 parserComputedPropertyName25.ts:3:5: Add a type annotation to the property [e]. - ~~ - !!! error TS2304: Cannot find name 'e2'. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff deleted file mode 100644 index 263589eb9ba33..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName27.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserComputedPropertyName27.d.ts] - declare class C { -+ [e]: number; - number: invalid; - } - - /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff deleted file mode 100644 index fdf7208012043..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName28.d.ts.diff +++ /dev/null @@ -1,18 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,10 @@ - - - //// [parserComputedPropertyName28.d.ts] - declare class C { -+ [e]: number; -+ [e2]: number; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff deleted file mode 100644 index 5924ed3dc039a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName29.d.ts.diff +++ /dev/null @@ -1,44 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,20 +1,23 @@ - - - //// [parserComputedPropertyName29.d.ts] - declare class C { -+ [e]: invalid; -+ [e2]: number; - } - - /// [Errors] //// - - parserComputedPropertyName29.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserComputedPropertyName29.ts(3,6): error TS2304: Cannot find name 'e'. - parserComputedPropertyName29.ts(3,11): error TS2304: Cannot find name 'id'. -+parserComputedPropertyName29.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. - parserComputedPropertyName29.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - parserComputedPropertyName29.ts(4,6): error TS2304: Cannot find name 'e2'. - - --==== parserComputedPropertyName29.ts (5 errors) ==== -+==== parserComputedPropertyName29.ts (6 errors) ==== - class C { - // yes ASI - [e] = id++ - ~~~ -@@ -22,8 +25,11 @@ - ~ - !!! error TS2304: Cannot find name 'e'. - ~~ - !!! error TS2304: Cannot find name 'id'. -+ ~~~~ -+!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -+!!! related TS9029 parserComputedPropertyName29.ts:3:5: Add a type annotation to the property [e]. - [e2]: number - ~~~~ - !!! 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/parserComputedPropertyName31.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff deleted file mode 100644 index b07e6f7cf7df3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName31.d.ts.diff +++ /dev/null @@ -1,18 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,10 @@ - - - //// [parserComputedPropertyName31.d.ts] - declare class C { -+ [e]: number; -+ [e2]: number; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff deleted file mode 100644 index 265e3bb213099..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName32.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserComputedPropertyName32.d.ts] - declare class C { -+ [e](): number; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff deleted file mode 100644 index 2738dd4b76f22..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName33.d.ts.diff +++ /dev/null @@ -1,40 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,25 +1,31 @@ - - - //// [parserComputedPropertyName33.d.ts] - declare class C { -+ [e]: invalid; - } - - /// [Errors] //// - - parserComputedPropertyName33.ts(3,6): error TS2304: Cannot find name 'e'. -+parserComputedPropertyName33.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. - parserComputedPropertyName33.ts(4,6): error TS2304: Cannot find name 'e2'. - parserComputedPropertyName33.ts(4,12): error TS1005: ';' expected. - parserComputedPropertyName33.ts(5,1): error TS1128: Declaration or statement expected. - - --==== parserComputedPropertyName33.ts (4 errors) ==== -+==== parserComputedPropertyName33.ts (5 errors) ==== - class C { - // No ASI - [e] = 0 - ~ - !!! error TS2304: Cannot find name 'e'. -+ ~ - [e2]() { } -+ ~~~~~~~~~~ -+!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -+!!! related TS9029 parserComputedPropertyName33.ts:3:5: Add a type annotation to the property [e]. - ~~ - !!! error TS2304: Cannot find name 'e2'. - ~ - !!! error TS1005: ';' expected. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff deleted file mode 100644 index 8e85ddc0d23da..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName36.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserComputedPropertyName36.d.ts] - declare class C { -+ [public]: string; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff deleted file mode 100644 index 5cbfdc962e847..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName37.d.ts.diff +++ /dev/null @@ -1,33 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,20 +1,18 @@ - - - //// [parserComputedPropertyName37.d.ts] --declare var v: invalid; -+declare var v: { -+ [public]: number; -+}; - - /// [Errors] //// - --parserComputedPropertyName37.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - parserComputedPropertyName37.ts(2,6): error TS2304: Cannot find name 'public'. - - --==== parserComputedPropertyName37.ts (2 errors) ==== -+==== parserComputedPropertyName37.ts (1 errors) ==== - var v = { - [public]: 0 -- ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 parserComputedPropertyName37.ts:1:5: Add a type annotation to the variable v. - ~~~~~~ - !!! error TS2304: Cannot find name 'public'. - }; -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff deleted file mode 100644 index bcad126b2ace6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName6.d.ts.diff +++ /dev/null @@ -1,29 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,20 +4,16 @@ - declare var v: invalid; - - /// [Errors] //// - --parserComputedPropertyName6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - parserComputedPropertyName6.ts(1,12): error TS2304: Cannot find name 'e'. - parserComputedPropertyName6.ts(1,19): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - parserComputedPropertyName6.ts(1,20): error TS2304: Cannot find name 'e'. - parserComputedPropertyName6.ts(1,24): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName6.ts (5 errors) ==== -+==== parserComputedPropertyName6.ts (4 errors) ==== - var v = { [e]: 1, [e + e]: 2 }; -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 parserComputedPropertyName6.ts:1:5: Add a type annotation to the variable v. - ~ - !!! error TS2304: Cannot find name 'e'. - ~~~~~~~ - !!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff deleted file mode 100644 index c7b08b4993180..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName9.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserComputedPropertyName9.d.ts] - declare class C { -+ [e]: Type; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff deleted file mode 100644 index 06a2dd70caa35..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName1.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserES5ComputedPropertyName1.d.ts] - declare class C { -+ [e]: number; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff deleted file mode 100644 index 86cdcc20d8660..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName10.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserES5ComputedPropertyName10.d.ts] - declare class C { -+ [e]: number; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff deleted file mode 100644 index 7c4d325d887d3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName2.d.ts.diff +++ /dev/null @@ -1,31 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,18 +1,16 @@ - - - //// [parserES5ComputedPropertyName2.d.ts] --declare var v: invalid; -+declare var v: { -+ [e]: number; -+}; - - /// [Errors] //// - --parserES5ComputedPropertyName2.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - parserES5ComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. - - --==== parserES5ComputedPropertyName2.ts (2 errors) ==== -+==== parserES5ComputedPropertyName2.ts (1 errors) ==== - var v = { [e]: 1 }; -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 parserES5ComputedPropertyName2.ts:1:5: Add a type annotation to the variable v. - ~ - !!! error TS2304: Cannot find name 'e'. -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff deleted file mode 100644 index 67de32456f7b6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName5.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserES5ComputedPropertyName5.d.ts] - interface I { -+ [e]: number; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff deleted file mode 100644 index 1a95e1616093d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName8.d.ts.diff +++ /dev/null @@ -1,19 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,10 @@ - - - //// [parserES5ComputedPropertyName8.d.ts] --declare var v: {}; -+declare var v: { -+ [e]: number; -+}; - - /// [Errors] //// - - parserES5ComputedPropertyName8.ts(1,10): 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/original/diff/parserES5ComputedPropertyName9.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff deleted file mode 100644 index 9cb58374251a3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName9.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserES5ComputedPropertyName9.d.ts] - declare class C { -+ [e]: Type; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff deleted file mode 100644 index 701c9c4d4cb3e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty1.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserES5SymbolProperty1.d.ts] - interface I { -+ [Symbol.iterator]: string; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff deleted file mode 100644 index e7dfb8738e4c2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty2.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserES5SymbolProperty2.d.ts] - interface I { -+ [Symbol.unscopables](): string; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff deleted file mode 100644 index affbb77c46b9a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty3.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty3.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserES5SymbolProperty3.d.ts] - declare class C { -+ [Symbol.unscopables](): string; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff deleted file mode 100644 index 3a736be3a4d5d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty4.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserES5SymbolProperty4.d.ts] - declare class C { -+ [Symbol.isRegExp]: string; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff deleted file mode 100644 index 793b81b64e041..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty5.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserES5SymbolProperty5.d.ts] - declare class C { -+ [Symbol.isRegExp]: string; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff deleted file mode 100644 index 934a038a1b354..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty6.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserES5SymbolProperty6.d.ts] - declare class C { -+ [Symbol.toStringTag]: string; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff deleted file mode 100644 index 6ad72b5f0930f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty7.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty7.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserES5SymbolProperty7.d.ts] - declare class C { -+ [Symbol.toStringTag](): void; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff deleted file mode 100644 index 943ccc507791c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty8.d.ts.diff +++ /dev/null @@ -1,19 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,10 @@ - - - //// [parserES5SymbolProperty8.d.ts] --declare var x: {}; -+declare var x: { -+ [Symbol.toPrimitive](): string; -+}; - - /// [Errors] //// - - parserES5SymbolProperty8.ts(2,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/original/diff/parserES5SymbolProperty9.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff deleted file mode 100644 index 913991df89a38..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5SymbolProperty9.d.ts.diff +++ /dev/null @@ -1,19 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty9.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,10 @@ - - - //// [parserES5SymbolProperty9.d.ts] --declare var x: {}; -+declare var x: { -+ [Symbol.toPrimitive]: string; -+}; - - /// [Errors] //// - - parserES5SymbolProperty9.ts(2,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/original/diff/parserIndexSignature11.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff deleted file mode 100644 index 91ce8549fafe4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature11.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserIndexSignature11.d.ts] - interface I { -+ [p]: any; - [p1: string]: any; - [p2: string, p3: number]: any; - } - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff deleted file mode 100644 index 974d641ef7826..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserIndexSignature5.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [parserIndexSignature5.d.ts] - interface I { -+ [a]: any; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff deleted file mode 100644 index a79730e41d146..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserStrictMode8.d.ts.diff +++ /dev/null @@ -1,30 +0,0 @@ -// [[Reason: Symbol merges with global eval and is not written to declarations.]] //// - -//// [tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,15 +1,20 @@ - - - //// [parserStrictMode8.d.ts] -+declare function eval(): invalid; - - /// [Errors] //// - - parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. -+parserStrictMode8.ts(2,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. - - --==== parserStrictMode8.ts (1 errors) ==== -+==== parserStrictMode8.ts (2 errors) ==== - "use strict"; - function eval() { - ~~~~ - !!! error TS1100: Invalid use of 'eval' in strict mode. -+ ~~~~ -+!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9031 parserStrictMode8.ts:2:10: Add a return type to the function declaration. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/propertyAssignment.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/propertyAssignment.d.ts.diff deleted file mode 100644 index 54692b95a9b2d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/propertyAssignment.d.ts.diff +++ /dev/null @@ -1,20 +0,0 @@ -// [[Reason: Syntactically invalid.]] //// - -//// [tests/cases/compiler/propertyAssignment.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -6,9 +6,11 @@ - }; - declare var bar1: { - x: number; - }; --declare var foo2: {}; -+declare var foo2: { -+ [index]: any; -+}; - declare var bar2: { - x: number; - }; - declare var foo3: { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/reExportAliasMakesInstantiated.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/reExportAliasMakesInstantiated.d.ts.diff deleted file mode 100644 index 1b790598e0f34..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/reExportAliasMakesInstantiated.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: GH#55571]] //// - -//// [tests/cases/conformance/internalModules/moduleDeclarations/reExportAliasMakesInstantiated.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -9,9 +9,5 @@ - import test1 = pack1.test1; - export { test1 }; - } - export import test1 = pack2.test1; --declare namespace mod1 { -- type test1 = string; -- export { test1 }; --} - export {}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/recursiveTypesWithTypeof.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/recursiveTypesWithTypeof.d.ts.diff deleted file mode 100644 index afba8f6dbad1a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/recursiveTypesWithTypeof.d.ts.diff +++ /dev/null @@ -1,40 +0,0 @@ -// [[Reason: TS normalizes types]] //// - -//// [tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -23,26 +23,26 @@ - declare var h: () => typeof h; - declare var i: (x: typeof i) => typeof x; - declare var i: (x: typeof i) => typeof x; - declare var j: (x: T) => T; --declare var j: (x: T) => T; -+declare var j: (x: T) => T; - declare var h2: new () => typeof h2; - declare var h2: new () => typeof h2; - declare var i2: new (x: typeof i2) => typeof x; - declare var i2: new (x: typeof i2) => typeof x; - declare var j2: new (x: T) => T; --declare var j2: new (x: T) => T; -+declare var j2: new (x: T) => T; - declare var k: { - [n: number]: typeof k; - [s: string]: typeof k; - }; - declare var k: { -- [n: number]: any; -- [s: string]: any; -+ [n: number]: typeof k; -+ [s: string]: typeof k; - }; - declare var k: { -- [n: number]: any; -- [s: string]: any; -+ [n: number]: typeof k; -+ [s: string]: typeof k; - }; - declare var hy1: { - x: typeof hy1; - }[]; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff deleted file mode 100644 index 5c47a03614500..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -24,8 +24,9 @@ - static [FunctionPropertyNames.length](): invalid; - [FunctionPropertyNames.length](): invalid; - } - export declare class ExportedStaticPrototype { -+ static [FunctionPropertyNames.prototype]: number; - [FunctionPropertyNames.prototype]: string; - } - export declare class ExportedStaticPrototypeFn { - static [FunctionPropertyNames.prototype](): invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff deleted file mode 100644 index 5c47a03614500..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -24,8 +24,9 @@ - static [FunctionPropertyNames.length](): invalid; - [FunctionPropertyNames.length](): invalid; - } - export declare class ExportedStaticPrototype { -+ static [FunctionPropertyNames.prototype]: number; - [FunctionPropertyNames.prototype]: string; - } - export declare class ExportedStaticPrototypeFn { - static [FunctionPropertyNames.prototype](): invalid; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/stringLiteralsWithTypeAssertions01.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/stringLiteralsWithTypeAssertions01.d.ts.diff deleted file mode 100644 index e46daf8e2c2f6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/stringLiteralsWithTypeAssertions01.d.ts.diff +++ /dev/null @@ -1,14 +0,0 @@ -// [[Reason: TS normalizes types]] //// - -//// [tests/cases/conformance/types/literal/stringLiteralsWithTypeAssertions01.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -6,5 +6,5 @@ - declare let b: "foo"; - declare let c: "foo"; - declare let d: "bar"; - declare let e: "baz"; --declare let f: "foo" | "bar"; -+declare let f: typeof fooOrBar; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff deleted file mode 100644 index dd53f570fc160..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty1.d.ts.diff +++ /dev/null @@ -1,46 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/Symbols/symbolProperty1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -5,36 +5,24 @@ - declare var x: invalid; - - /// [Errors] //// - --symbolProperty1.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - symbolProperty1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. --symbolProperty1.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - symbolProperty1.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. --symbolProperty1.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - --==== symbolProperty1.ts (5 errors) ==== -+==== symbolProperty1.ts (2 errors) ==== - var s: symbol; - var x = { - [s]: 0, -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x. - [s]() { }, - ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x. - !!! related TS9034 symbolProperty1.ts:4:5: Add a return type to the method -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x. - get [s]() { - ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9032 symbolProperty1.ts:5:9: Add a return type to the get accessor declaration. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x. - return 0; - } - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff deleted file mode 100644 index 608774e56efb8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty2.d.ts.diff +++ /dev/null @@ -1,49 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/Symbols/symbolProperty2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -6,39 +6,27 @@ - - /// [Errors] //// - - symbolProperty2.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. --symbolProperty2.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - symbolProperty2.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. --symbolProperty2.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - symbolProperty2.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. --symbolProperty2.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - --==== symbolProperty2.ts (6 errors) ==== -+==== symbolProperty2.ts (3 errors) ==== - var s = Symbol(); - ~~~~~~~~ - !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. - !!! related TS9027 symbolProperty2.ts:1:5: Add a type annotation to the variable s. - var x = { - [s]: 0, -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x. - [s]() { }, - ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x. - !!! related TS9034 symbolProperty2.ts:4:5: Add a return type to the method -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x. - get [s]() { - ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9032 symbolProperty2.ts:5:9: Add a return type to the get accessor declaration. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x. - return 0; - } - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff deleted file mode 100644 index c27f2b1611d6e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty3.d.ts.diff +++ /dev/null @@ -1,57 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/Symbols/symbolProperty3.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -7,47 +7,35 @@ - /// [Errors] //// - - symbolProperty3.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. - symbolProperty3.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --symbolProperty3.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - symbolProperty3.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - symbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. --symbolProperty3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - symbolProperty3.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - symbolProperty3.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. --symbolProperty3.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - --==== symbolProperty3.ts (9 errors) ==== -+==== symbolProperty3.ts (6 errors) ==== - var s = Symbol; - ~~~~~~ - !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. - !!! related TS9027 symbolProperty3.ts:1:5: Add a type annotation to the variable s. - var x = { - [s]: 0, - ~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x. - [s]() { }, - ~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x. - !!! related TS9034 symbolProperty3.ts:4:5: Add a return type to the method -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x. - get [s]() { - ~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9032 symbolProperty3.ts:5:9: Add a return type to the get accessor declaration. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x. - return 0; - } - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff deleted file mode 100644 index 42432feb8cbf6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty52.d.ts.diff +++ /dev/null @@ -1,34 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/Symbols/symbolProperty52.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,22 +1,20 @@ - - - //// [symbolProperty52.d.ts] --declare var obj: invalid; -+declare var obj: { -+ [Symbol.nonsense]: number; -+}; - - /// [Errors] //// - --symbolProperty52.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - symbolProperty52.ts(2,13): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. - symbolProperty52.ts(7,12): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. - - --==== symbolProperty52.ts (3 errors) ==== -+==== symbolProperty52.ts (2 errors) ==== - var obj = { - [Symbol.nonsense]: 0 -- ~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 symbolProperty52.ts:1:5: Add a type annotation to the variable obj. - ~~~~~~~~ - !!! error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. - }; - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff deleted file mode 100644 index f6cd005e28bee..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty53.d.ts.diff +++ /dev/null @@ -1,36 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/Symbols/symbolProperty53.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,24 +1,22 @@ - - - //// [symbolProperty53.d.ts] --declare var obj: invalid; -+declare var obj: { -+ [Symbol.for]: number; -+}; - - /// [Errors] //// - - symbolProperty53.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --symbolProperty53.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - symbolProperty53.ts(5,5): error TS2538: Type '(key: string) => symbol' cannot be used as an index type. - - --==== symbolProperty53.ts (3 errors) ==== -+==== symbolProperty53.ts (2 errors) ==== - var obj = { - [Symbol.for]: 0 - ~~~~~~~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -- ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 symbolProperty53.ts:1:5: Add a type annotation to the variable obj. - }; - - obj[Symbol.for]; - ~~~~~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff deleted file mode 100644 index 4e791fc222b93..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty54.d.ts.diff +++ /dev/null @@ -1,33 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/Symbols/symbolProperty54.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,20 +1,18 @@ - - - //// [symbolProperty54.d.ts] --declare var obj: invalid; -+declare var obj: { -+ [Symbol.prototype]: number; -+}; - - /// [Errors] //// - - symbolProperty54.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --symbolProperty54.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - --==== symbolProperty54.ts (2 errors) ==== -+==== symbolProperty54.ts (1 errors) ==== - var obj = { - [Symbol.prototype]: 0 - ~~~~~~~~~~~~~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -- ~~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 symbolProperty54.ts:1:5: Add a type annotation to the variable obj. - }; -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff deleted file mode 100644 index c27adeec9a842..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty58.d.ts.diff +++ /dev/null @@ -1,34 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/Symbols/symbolProperty58.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -3,22 +3,7 @@ - //// [symbolProperty58.d.ts] - interface SymbolConstructor { - foo: string; - } --declare var obj: invalid; -- --/// [Errors] //// -- --symbolProperty58.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -- -- --==== symbolProperty58.ts (1 errors) ==== -- interface SymbolConstructor { -- foo: string; -- } -- -- var obj = { -- [Symbol.foo]: 0 -- ~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 symbolProperty58.ts:5:5: Add a type annotation to the variable obj. -- } -\ No newline at end of file -+declare var obj: { -+ [Symbol.foo]: number; -+}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff deleted file mode 100644 index 8bead576c8ae0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/symbolProperty59.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/Symbols/symbolProperty59.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,9 @@ - - - //// [symbolProperty59.d.ts] - interface I { -+ [Symbol.keyFor]: string; - } - - /// [Errors] //// - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/thisTypeErrors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/thisTypeErrors.d.ts.diff deleted file mode 100644 index 04a865e651838..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/thisTypeErrors.d.ts.diff +++ /dev/null @@ -1,28 +0,0 @@ -// [[Reason: TS resolves invalid types to any]] //// - -//// [tests/cases/conformance/types/thisType/thisTypeErrors.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -42,18 +42,18 @@ - }; - } - declare class C2 { - static x: this; -- static y: any; -+ static y: this; - static foo(x: this): this; - } - declare namespace N1 { - var x: this; - var y: invalid; - } - declare class C3 { - x1: { -- g(x: any): any; -+ g(x: this): this; - }; - f(): invalid; - } - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/thisTypeInAccessors.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/thisTypeInAccessors.d.ts.diff deleted file mode 100644 index 2caaa980227b0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/thisTypeInAccessors.d.ts.diff +++ /dev/null @@ -1,19 +0,0 @@ -// [[Reason: TS merges accessors with the same type. DTE can only merge if one type is specified.]] //// - -//// [tests/cases/conformance/types/thisType/thisTypeInAccessors.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -6,9 +6,10 @@ - x: number; - } - declare const explicit: { - n: number; -- x: number; -+ get x(this: Foo): number; -+ set x(this: Foo, n: number); - }; - declare const copiedFromGetter: { - n: number; - x: number; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment32.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment32.d.ts.diff deleted file mode 100644 index 69c61a6957cbd..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment32.d.ts.diff +++ /dev/null @@ -1,61 +0,0 @@ -// [[Reason: Property is defined in another file. DTE can't detect this but TSC has another error for this already]] //// - -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -22,16 +22,22 @@ - - expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. - expando.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. - expando.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. -+expando.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. -+expando.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. -+expando.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. -+expando.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. - expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -+expando.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. - expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -+expando.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. - expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. - ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - - --==== expando.ts (6 errors) ==== -+==== expando.ts (12 errors) ==== - function ExpandoMerge(n: number) { - ~~~~~~~~~~~~ - !!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9031 expando.ts:1:10: Add a return type to the function declaration. -@@ -45,17 +51,29 @@ - !!! error 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; - } - ExpandoMerge.p4 = 44444; -+ ~~~~~~~~~~~~~~~ -+!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - ExpandoMerge.p5 = 555555; -+ ~~~~~~~~~~~~~~~ -+!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - ExpandoMerge.p6 = 66666; -+ ~~~~~~~~~~~~~~~ -+!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - ExpandoMerge.p7 = 777777; -+ ~~~~~~~~~~~~~~~ -+!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - ExpandoMerge.p8 = false; // type error - ~~~~~~~~~~~~~~~ - !!! error TS2322: Type 'boolean' is not assignable to type '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. - ExpandoMerge.p9 = false; // type error - ~~~~~~~~~~~~~~~ - !!! error TS2322: Type 'boolean' is not assignable to type '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. - var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. - !!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment33.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment33.d.ts.diff deleted file mode 100644 index 99e1e7fa35dd5..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeFromPropertyAssignment33.d.ts.diff +++ /dev/null @@ -1,65 +0,0 @@ -// [[Reason: Property is defined in another file. DTE can't detect this but TSC has another error for this already]] //// - -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -22,10 +22,16 @@ - - expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. - expando.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. - expando.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. -+expando.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. -+expando.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. -+expando.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. -+expando.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. - expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -+expando.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. - expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -+expando.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. - expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. - ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - -@@ -48,9 +54,9 @@ - export var p2 = 222; - } - - --==== expando.ts (6 errors) ==== -+==== expando.ts (12 errors) ==== - function ExpandoMerge(n: number) { - ~~~~~~~~~~~~ - !!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9031 expando.ts:1:10: Add a return type to the function declaration. -@@ -64,17 +70,29 @@ - !!! error 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; - } - ExpandoMerge.p4 = 44444; -+ ~~~~~~~~~~~~~~~ -+!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - ExpandoMerge.p5 = 555555; -+ ~~~~~~~~~~~~~~~ -+!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - ExpandoMerge.p6 = 66666; -+ ~~~~~~~~~~~~~~~ -+!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - ExpandoMerge.p7 = 777777; -+ ~~~~~~~~~~~~~~~ -+!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - ExpandoMerge.p8 = false; // type error - ~~~~~~~~~~~~~~~ - !!! error TS2322: Type 'boolean' is not assignable to type '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. - ExpandoMerge.p9 = false; // type error - ~~~~~~~~~~~~~~~ - !!! error TS2322: Type 'boolean' is not assignable to type '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. - var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - !!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. - !!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff deleted file mode 100644 index 9056b055f3f64..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/typeUsedAsTypeLiteralIndex.d.ts.diff +++ /dev/null @@ -1,37 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/compiler/typeUsedAsTypeLiteralIndex.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,19 +1,26 @@ - - - //// [typeUsedAsTypeLiteralIndex.d.ts] - type K = number | string; --type T = {}; -+type T = { -+ [K]: number; -+}; - declare const K1: invalid; - type T1 = { - [K1]: number; - }; - type K2 = "x" | "y"; --type T2 = {}; -+type T2 = { -+ [K2]: number; -+}; - type K3 = number | string; --type T3 = {}; -+type T3 = { -+ [K3]: number; -+}; - type K4 = number | string; - type T4 = { -+ [K4]: number; - k4: string; - }; - - /// [Errors] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty1.d.ts deleted file mode 100644 index c677617c849c9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty1.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -//// [tests/cases/conformance/Symbols/ES5SymbolProperty1.ts] //// - -//// [ES5SymbolProperty1.ts] -interface SymbolConstructor { - foo: string; -} -var Symbol: SymbolConstructor; - -var obj = { - [Symbol.foo]: 0 -} - -obj[Symbol.foo]; - -/// [Declarations] //// - - - -//// [ES5SymbolProperty1.d.ts] -interface SymbolConstructor { - foo: string; -} -declare var Symbol: SymbolConstructor; -declare var obj: { - [Symbol.foo]: number; -}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts deleted file mode 100644 index c005bb0c00dc2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/FunctionDeclaration8_es6.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts] //// - -//// [FunctionDeclaration8_es6.ts] -var v = { [yield]: foo } - -/// [Declarations] //// - - - -//// [FunctionDeclaration8_es6.d.ts] -declare var v: invalid; - -/// [Errors] //// - -FunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'yield'. -FunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. -FunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. - - -==== FunctionDeclaration8_es6.ts (3 errors) ==== - var v = { [yield]: foo } - ~~~~~ -!!! error TS2304: Cannot find name 'yield'. - ~~~ -!!! error TS2304: Cannot find name 'foo'. - ~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 FunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v. -!!! related TS9035 FunctionDeclaration8_es6.ts:1:20: Add a type assertion to this expression to make type type explicit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/arrayFind.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/arrayFind.d.ts deleted file mode 100644 index 42c79699db61f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/arrayFind.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -//// [tests/cases/compiler/arrayFind.ts] //// - -//// [arrayFind.ts] -// test fix for #18112, type guard predicates should narrow returned element -function isNumber(x: any): x is number { - return typeof x === "number"; -} - -const arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true]; -const foundNumber: number | undefined = arrayOfStringsNumbersAndBooleans.find(isNumber); - -const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans as ReadonlyArray; -const readonlyFoundNumber: number | undefined = readonlyArrayOfStringsNumbersAndBooleans.find(isNumber); - - -/// [Declarations] //// - - - -//// [arrayFind.d.ts] -declare function isNumber(x: any): x is number; -declare const arrayOfStringsNumbersAndBooleans: invalid; -declare const foundNumber: number | undefined; -declare const readonlyArrayOfStringsNumbersAndBooleans: ReadonlyArray; -declare const readonlyFoundNumber: number | undefined; - -/// [Errors] //// - -arrayFind.ts(6,42): error TS9017: Only const arrays can be inferred with --isolatedDeclarations. - - -==== arrayFind.ts (1 errors) ==== - // test fix for #18112, type guard predicates should narrow returned element - function isNumber(x: any): x is number { - return typeof x === "number"; - } - - const arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations. -!!! related TS9027 arrayFind.ts:6:7: Add a type annotation to the variable arrayOfStringsNumbersAndBooleans. - const foundNumber: number | undefined = arrayOfStringsNumbersAndBooleans.find(isNumber); - - const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans as ReadonlyArray; - const readonlyFoundNumber: number | undefined = readonlyArrayOfStringsNumbersAndBooleans.find(isNumber); - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asOperator1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asOperator1.d.ts deleted file mode 100644 index 2faf6f0c1ef3b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/asOperator1.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -//// [tests/cases/conformance/expressions/asOperator/asOperator1.ts] //// - -//// [asOperator1.ts] -var as = 43; -var x = undefined as number; -var y = (null as string).length; -var z = Date as any as string; - -// Should parse as a union type, not a bitwise 'or' of (32 as number) and 'string' -var j = 32 as number|string; -j = ''; - - -/// [Declarations] //// - - - -//// [asOperator1.d.ts] -declare var as: number; -declare var x: number; -declare var y: invalid; -declare var z: string; -declare var j: number | string; - -/// [Errors] //// - -asOperator1.ts(3,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. - - -==== asOperator1.ts (1 errors) ==== - var as = 43; - var x = undefined as number; - var y = (null as string).length; - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 asOperator1.ts:3:5: Add a type annotation to the variable y. - var z = Date as any as string; - - // Should parse as a union type, not a bitwise 'or' of (32 as number) and 'string' - var j = 32 as number|string; - j = ''; - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts deleted file mode 100644 index df5bcd9ebc6a6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es2017.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts] //// - -//// [asyncFunctionDeclaration8_es2017.ts] -var v = { [await]: foo } - -/// [Declarations] //// - - - -//// [asyncFunctionDeclaration8_es2017.d.ts] -declare var v: invalid; - -/// [Errors] //// - -asyncFunctionDeclaration8_es2017.ts(1,12): error TS2304: Cannot find name 'await'. -asyncFunctionDeclaration8_es2017.ts(1,20): error TS2304: Cannot find name 'foo'. -asyncFunctionDeclaration8_es2017.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. - - -==== asyncFunctionDeclaration8_es2017.ts (3 errors) ==== - var v = { [await]: foo } - ~~~~~ -!!! error TS2304: Cannot find name 'await'. - ~~~ -!!! error TS2304: Cannot find name 'foo'. - ~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 asyncFunctionDeclaration8_es2017.ts:1:5: Add a type annotation to the variable v. -!!! related TS9035 asyncFunctionDeclaration8_es2017.ts:1:20: Add a type assertion to this expression to make type type explicit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts deleted file mode 100644 index f805ebd12fffa..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es5.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts] //// - -//// [asyncFunctionDeclaration8_es5.ts] -var v = { [await]: foo } - -/// [Declarations] //// - - - -//// [asyncFunctionDeclaration8_es5.d.ts] -declare var v: invalid; - -/// [Errors] //// - -asyncFunctionDeclaration8_es5.ts(1,12): error TS2304: Cannot find name 'await'. -asyncFunctionDeclaration8_es5.ts(1,20): error TS2304: Cannot find name 'foo'. -asyncFunctionDeclaration8_es5.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. - - -==== asyncFunctionDeclaration8_es5.ts (3 errors) ==== - var v = { [await]: foo } - ~~~~~ -!!! error TS2304: Cannot find name 'await'. - ~~~ -!!! error TS2304: Cannot find name 'foo'. - ~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 asyncFunctionDeclaration8_es5.ts:1:5: Add a type annotation to the variable v. -!!! related TS9035 asyncFunctionDeclaration8_es5.ts:1:20: Add a type assertion to this expression to make type type explicit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts deleted file mode 100644 index 596bffdab67f4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/asyncFunctionDeclaration8_es6.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts] //// - -//// [asyncFunctionDeclaration8_es6.ts] -var v = { [await]: foo } - -/// [Declarations] //// - - - -//// [asyncFunctionDeclaration8_es6.d.ts] -declare var v: invalid; - -/// [Errors] //// - -asyncFunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'await'. -asyncFunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. -asyncFunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. - - -==== asyncFunctionDeclaration8_es6.ts (3 errors) ==== - var v = { [await]: foo } - ~~~~~ -!!! error TS2304: Cannot find name 'await'. - ~~~ -!!! error TS2304: Cannot find name 'foo'. - ~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 asyncFunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v. -!!! related TS9035 asyncFunctionDeclaration8_es6.ts:1:20: Add a type assertion to this expression to make type type explicit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts deleted file mode 100644 index cd3b57e3616ab..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/bigintIndex.d.ts +++ /dev/null @@ -1,125 +0,0 @@ -//// [tests/cases/compiler/bigintIndex.ts] //// - -//// [a.ts] -interface BigIntIndex { - [index: bigint]: E; // should error -} - -const arr: number[] = [1, 2, 3]; -let num: number = arr[1]; -num = arr["1"]; -num = arr[1n]; // should error - -let key: keyof any; // should be type "string | number | symbol" -key = 123; -key = "abc"; -key = Symbol(); -key = 123n; // should error - -// Show correct usage of bigint index: explicitly convert to string -const bigNum: bigint = 0n; -const typedArray = new Uint8Array(3); -typedArray[bigNum] = 0xAA; // should error -typedArray[String(bigNum)] = 0xAA; -typedArray["1"] = 0xBB; -typedArray[2] = 0xCC; - -// {1n: 123} is a syntax error; must go in separate file so BigIntIndex error is shown -//// [b.ts] -// BigInt cannot be used as an object literal property -const a = {1n: 123}; -const b = {[1n]: 456}; -const c = {[bigNum]: 789}; - - -/// [Declarations] //// - - - -//// [a.d.ts] -interface BigIntIndex { - [index: bigint]: E; -} -declare const arr: number[]; -declare let num: number; -declare let key: keyof any; -declare const bigNum: bigint; -declare const typedArray: invalid; - -//// [b.d.ts] -declare const a: {}; -declare const b: invalid; -declare const c: { - [bigNum]: number; -}; - -/// [Errors] //// - -a.ts(2,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. -a.ts(8,11): error TS2538: Type '1n' cannot be used as an index type. -a.ts(14,1): error TS2322: Type 'bigint' is not assignable to type 'string | number | symbol'. -a.ts(18,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -a.ts(19,12): error TS2538: Type 'bigint' cannot be used as an index type. -b.ts(2,12): error TS1136: Property assignment expected. -b.ts(2,14): error TS1005: ';' expected. -b.ts(2,19): error TS1128: Declaration or statement expected. -b.ts(3,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -b.ts(3,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - -==== a.ts (5 errors) ==== - interface BigIntIndex { - [index: bigint]: E; // should error - ~~~~~ -!!! error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. - } - - const arr: number[] = [1, 2, 3]; - let num: number = arr[1]; - num = arr["1"]; - num = arr[1n]; // should error - ~~ -!!! error TS2538: Type '1n' cannot be used as an index type. - - let key: keyof any; // should be type "string | number | symbol" - key = 123; - key = "abc"; - key = Symbol(); - key = 123n; // should error - ~~~ -!!! error TS2322: Type 'bigint' is not assignable to type 'string | number | symbol'. - - // Show correct usage of bigint index: explicitly convert to string - const bigNum: bigint = 0n; - const typedArray = new Uint8Array(3); - ~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 a.ts:18:7: Add a type annotation to the variable typedArray. - typedArray[bigNum] = 0xAA; // should error - ~~~~~~ -!!! error TS2538: Type 'bigint' cannot be used as an index type. - typedArray[String(bigNum)] = 0xAA; - typedArray["1"] = 0xBB; - typedArray[2] = 0xCC; - - // {1n: 123} is a syntax error; must go in separate file so BigIntIndex error is shown -==== b.ts (6 errors) ==== - // BigInt cannot be used as an object literal property - const a = {1n: 123}; - ~~ -!!! error TS1136: Property assignment expected. - ~ -!!! error TS1005: ';' expected. - ~ -!!! error TS1128: Declaration or statement expected. - const b = {[1n]: 456}; - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 b.ts:3:7: Add a type annotation to the variable b. - const c = {[bigNum]: 789}; - ~~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/booleanFilterAnyArray.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/booleanFilterAnyArray.d.ts deleted file mode 100644 index 11c71b27726af..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/booleanFilterAnyArray.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -//// [tests/cases/compiler/booleanFilterAnyArray.ts] //// - -//// [booleanFilterAnyArray.ts] -interface Bullean { } -interface BulleanConstructor { - new(v1?: any): Bullean; - (v2?: T): v2 is T; -} - -interface 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; -var xs: Ari; -var xs = anys.filter(Bullean) - -declare let realanys: any[]; -var ys: any[]; -var ys = realanys.filter(Boolean) - -var foo = [{ name: 'x' }] -var foor: Array<{name: string}> -var foor = foo.filter(x => x.name) -var foos: Array -var foos = [true, true, false, null].filter((thing): thing is boolean => thing !== null) - - -/// [Declarations] //// - - - -//// [booleanFilterAnyArray.d.ts] -interface Bullean { -} -interface BulleanConstructor { - new (v1?: any): Bullean; - (v2?: T): v2 is T; -} -interface 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; -declare var xs: Ari; -declare var xs: Ari; -declare let realanys: any[]; -declare var ys: any[]; -declare var ys: any[]; -declare var foo: invalid; -declare var foor: Array<{ - name: string; -}>; -declare var foor: Array<{ - name: string; -}>; -declare var foos: Array; -declare var foos: Array; - -/// [Errors] //// - -booleanFilterAnyArray.ts(20,11): error TS9017: Only const arrays can be inferred with --isolatedDeclarations. - - -==== booleanFilterAnyArray.ts (1 errors) ==== - interface Bullean { } - interface BulleanConstructor { - new(v1?: any): Bullean; - (v2?: T): v2 is T; - } - - interface 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; - var xs: Ari; - var xs = anys.filter(Bullean) - - declare let realanys: any[]; - var ys: any[]; - var ys = realanys.filter(Boolean) - - var foo = [{ name: 'x' }] - ~~~~~~~~~~~~~~~ -!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations. -!!! related TS9027 booleanFilterAnyArray.ts:20:5: Add a type annotation to the variable foo. - var foor: Array<{name: string}> - var foor = foo.filter(x => x.name) - var foos: Array - var foos = [true, true, false, null].filter((thing): thing is boolean => thing !== null) - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/capturedParametersInInitializers1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/capturedParametersInInitializers1.d.ts deleted file mode 100644 index 754c662eb2ba2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/capturedParametersInInitializers1.d.ts +++ /dev/null @@ -1,191 +0,0 @@ -//// [tests/cases/compiler/capturedParametersInInitializers1.ts] //// - -//// [capturedParametersInInitializers1.ts] -// ok - usage is deferred -function foo1(y = class {c = x}, x = 1) { - new y().c; -} - -// ok - used in file -function foo2(y = function(x: typeof z) {}, z = 1) { - -} - -// ok -used in type -let a; -function foo3(y = { x: a }, z = 1) { - -} - -// error - used before declaration -function foo4(y = {z}, z = 1) { -} - -// error - used before declaration, IIFEs are inlined -function foo5(y = (() => z)(), z = 1) { -} - -// ok - IIFE inside another function -function foo6(y = () => (() => z)(), z = 1) { -} - -// ok - used inside immediately invoked generator function -function foo7(y = (function*() {yield z})(), z = 1) { -} - -// ok - used inside immediately invoked async function -function foo8(y = (async () => z)(), z = 1) { -} - -// error - used as computed name of method -function foo9(y = {[z]() { return z; }}, z = 1) { -} - - -/// [Declarations] //// - - - -//// [capturedParametersInInitializers1.d.ts] -declare function foo1(y?: invalid, x?: number): invalid; -declare function foo2(y?: (x: typeof z) => invalid, z?: number): invalid; -declare let a: invalid; -declare function foo3(y?: { - x: typeof z; -}, z?: number): invalid; -declare function foo4(y?: invalid, z?: number): invalid; -declare function foo5(y?: invalid, z?: number): invalid; -declare function foo6(y?: () => invalid, z?: number): invalid; -declare function foo7(y?: invalid, z?: number): invalid; -declare function foo8(y?: invalid, z?: number): invalid; -declare function foo9(y?: invalid, z?: number): invalid; - -/// [Errors] //// - -capturedParametersInInitializers1.ts(2,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(2,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(7,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(7,19): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(12,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(18,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(18,20): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. -capturedParametersInInitializers1.ts(18,20): error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. -capturedParametersInInitializers1.ts(22,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(22,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(22,26): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. -capturedParametersInInitializers1.ts(26,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(26,19): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(30,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(30,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(34,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(38,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(38,20): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. - - -==== capturedParametersInInitializers1.ts (21 errors) ==== - // ok - usage is deferred - function foo1(y = class {c = x}, x = 1) { - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 capturedParametersInInitializers1.ts:2:10: Add a return type to the function declaration. - ~~~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 capturedParametersInInitializers1.ts:2:15: Add a type annotation to the parameter y. - new y().c; - } - - // ok - used in file - function foo2(y = function(x: typeof z) {}, z = 1) { - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 capturedParametersInInitializers1.ts:7:10: Add a return type to the function declaration. - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9028 capturedParametersInInitializers1.ts:7:15: Add a type annotation to the parameter y. -!!! related TS9030 capturedParametersInInitializers1.ts:7:19: Add a return type to the function expression. - - } - - // ok -used in type - let a; - ~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 capturedParametersInInitializers1.ts:12:5: Add a type annotation to the variable a. - function foo3(y = { x: a }, z = 1) { - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 capturedParametersInInitializers1.ts:13:10: Add a return type to the function declaration. - - } - - // error - used before declaration - function foo4(y = {z}, z = 1) { - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 capturedParametersInInitializers1.ts:18:10: Add a return type to the function declaration. - ~ -!!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. - ~ -!!! error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. -!!! related TS9028 capturedParametersInInitializers1.ts:18:15: Add a type annotation to the parameter y. - } - - // error - used before declaration, IIFEs are inlined - function foo5(y = (() => z)(), z = 1) { - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 capturedParametersInInitializers1.ts:22:10: Add a return type to the function declaration. - ~~~~~~~~~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 capturedParametersInInitializers1.ts:22:15: Add a type annotation to the parameter y. - ~ -!!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. - } - - // ok - IIFE inside another function - function foo6(y = () => (() => z)(), z = 1) { - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 capturedParametersInInitializers1.ts:26:10: Add a return type to the function declaration. - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9028 capturedParametersInInitializers1.ts:26:15: Add a type annotation to the parameter y. -!!! related TS9030 capturedParametersInInitializers1.ts:26:19: Add a return type to the function expression. - } - - // ok - used inside immediately invoked generator function - function foo7(y = (function*() {yield z})(), z = 1) { - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 capturedParametersInInitializers1.ts:30:10: Add a return type to the function declaration. - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 capturedParametersInInitializers1.ts:30:15: Add a type annotation to the parameter y. - } - - // ok - used inside immediately invoked async function - function foo8(y = (async () => z)(), z = 1) { - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 capturedParametersInInitializers1.ts:34:10: Add a return type to the function declaration. - ~~~~~~~~~~~~~~~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 capturedParametersInInitializers1.ts:34:15: Add a type annotation to the parameter y. - } - - // error - used as computed name of method - function foo9(y = {[z]() { return z; }}, z = 1) { - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 capturedParametersInInitializers1.ts:38:10: Add a return type to the function declaration. - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9028 capturedParametersInInitializers1.ts:38:15: Add a type annotation to the parameter y. -!!! related TS9034 capturedParametersInInitializers1.ts:38:20: Add a return type to the method - ~ -!!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/circularObjectLiteralAccessors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/circularObjectLiteralAccessors.d.ts deleted file mode 100644 index 43d428ccd54a6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/circularObjectLiteralAccessors.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/compiler/circularObjectLiteralAccessors.ts] //// - -//// [circularObjectLiteralAccessors.ts] -// Repro from #6000 - -const a = { - b: { - get foo(): string { - return a.foo; - }, - set foo(value: string) { - a.foo = value; - } - }, - foo: '' -}; - -/// [Declarations] //// - - - -//// [circularObjectLiteralAccessors.d.ts] -declare const a: { - b: { - get foo(): string; - set foo(value: string); - }; - foo: string; -}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts deleted file mode 100644 index 028656bf8ebcb..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/complicatedPrivacy.d.ts +++ /dev/null @@ -1,316 +0,0 @@ -//// [tests/cases/compiler/complicatedPrivacy.ts] //// - -//// [complicatedPrivacy.ts] -module m1 { - export module m2 { - - - export function f1(c1: C1) { - } - export function f2(c2: C2) { - } - - export class C2 implements m3.i3 { - public get p1(arg) { - return new C1(); - } - - public set p1(arg1: C1) { - } - - public f55() { - return "Hello world"; - } - } - } - - export function f2(arg1: { x?: C1, y: number }) { - } - - export function f3(): { - (a: number) : C1; - } { - return null; - } - - export function f4(arg1: - { - [number]: C1; // Used to be indexer, now it is a computed property - }) { - } - - - export function f5(arg2: { - new (arg1: C1) : C1 - }) { - } - module m3 { - function f2(f1: C1) { - } - - export interface i3 { - f55(): string; - } - } - - class C1 { - } - - interface i { - x: number; - } - - export class C5 implements i { - public x: number; - } - - export var v2: C1[]; -} - -class C2 { -} - -module m2 { - export module m3 { - - export class c_pr implements mglo5.i5, mglo5.i6 { - f1() { - return "Hello"; - } - } - - module m4 { - class C { - } - module m5 { - - export module m6 { - function f1() { - return new C(); - } - } - } - } - - } -} - -module mglo5 { - export interface i5 { - f1(): string; - } - - interface i6 { - f6(): number; - } -} - - -/// [Declarations] //// - - - -//// [complicatedPrivacy.d.ts] -declare namespace m1 { - export namespace m2 { - function f1(c1: C1): invalid; - function f2(c2: C2): invalid; - class C2 implements m3.i3 { - get p1(): C1; - set p1(arg1: C1); - f55(): invalid; - } - } - export function f2(arg1: { - x?: C1; - y: number; - }): invalid; - export function f3(): { - (a: number): C1; - }; - export function f4(arg1: { - [number]: C1; - }): invalid; - export function f5(arg2: { - new (arg1: C1): C1; - }): invalid; - namespace m3 { - interface i3 { - f55(): string; - } - } - class C1 { - } - interface i { - x: number; - } - export class C5 implements i { - x: number; - } - export var v2: C1[]; - export {}; -} -declare class C2 { -} -declare namespace m2 { - namespace m3 { - class c_pr implements mglo5.i5, mglo5.i6 { - f1(): invalid; - } - } -} -declare namespace mglo5 { - interface i5 { - f1(): string; - } -} - -/// [Errors] //// - -complicatedPrivacy.ts(5,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -complicatedPrivacy.ts(7,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -complicatedPrivacy.ts(11,24): error TS1054: A 'get' accessor cannot have parameters. -complicatedPrivacy.ts(18,20): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -complicatedPrivacy.ts(24,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -complicatedPrivacy.ts(33,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -complicatedPrivacy.ts(35,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. -complicatedPrivacy.ts(35,6): error TS2693: 'number' only refers to a type, but is being used as a value here. -complicatedPrivacy.ts(40,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported member 'i6'. -complicatedPrivacy.ts(74,13): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== complicatedPrivacy.ts (11 errors) ==== - module m1 { - export module m2 { - - - export function f1(c1: C1) { - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 complicatedPrivacy.ts:5:25: Add a return type to the function declaration. - } - export function f2(c2: C2) { - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 complicatedPrivacy.ts:7:25: Add a return type to the function declaration. - } - - export class C2 implements m3.i3 { - public get p1(arg) { - ~~ -!!! error TS1054: A 'get' accessor cannot have parameters. - return new C1(); - } - - public set p1(arg1: C1) { - } - - public f55() { - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 complicatedPrivacy.ts:18:20: Add a return type to the method - return "Hello world"; - } - } - } - - export function f2(arg1: { x?: C1, y: number }) { - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 complicatedPrivacy.ts:24:21: Add a return type to the function declaration. - } - - export function f3(): { - (a: number) : C1; - } { - return null; - } - - export function f4(arg1: - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 complicatedPrivacy.ts:33:21: Add a return type to the function declaration. - { - [number]: C1; // Used to be indexer, now it is a computed property - ~~~~~~~~ -!!! 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 TS2693: 'number' only refers to a type, but is being used as a value here. - }) { - } - - - export function f5(arg2: { - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 complicatedPrivacy.ts:40:21: Add a return type to the function declaration. - new (arg1: C1) : C1 - }) { - } - module m3 { - function f2(f1: C1) { - } - - export interface i3 { - f55(): string; - } - } - - class C1 { - } - - interface i { - x: number; - } - - export class C5 implements i { - public x: number; - } - - export var v2: C1[]; - } - - class C2 { - } - - module m2 { - export module m3 { - - export class c_pr implements mglo5.i5, mglo5.i6 { - ~~ -!!! error TS2694: Namespace 'mglo5' has no exported member 'i6'. - f1() { - ~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 complicatedPrivacy.ts:74:13: Add a return type to the method - return "Hello"; - } - } - - module m4 { - class C { - } - module m5 { - - export module m6 { - function f1() { - return new C(); - } - } - } - } - - } - } - - module mglo5 { - export interface i5 { - f1(): string; - } - - interface i6 { - f6(): number; - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts deleted file mode 100644 index 46522e4e38c00..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES5.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts] //// - -//// [computedPropertyNames12_ES5.ts] -var s: string; -var n: number; -var a: any; -class C { - [s]: number; - [n] = n; - static [s + s]: string; - [s + n] = 2; - [+s]: typeof s; - static [""]: number; - [0]: number; - [a]: number; - static [true]: number; - [`hello bye`] = 0; - static [`hello ${a} bye`] = 0 -} - -/// [Declarations] //// - - - -//// [computedPropertyNames12_ES5.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare class C { - [s]: number; - [n]: invalid; - static [""]: number; - [0]: number; - [a]: number; - [`hello bye`]: number; -} - -/// [Errors] //// - -computedPropertyNames12_ES5.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -computedPropertyNames12_ES5.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - - -==== computedPropertyNames12_ES5.ts (9 errors) ==== - var s: string; - var n: number; - var a: any; - class C { - [s]: number; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [n] = n; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9029 computedPropertyNames12_ES5.ts:6:5: Add a type annotation to the property [n]. - static [s + s]: string; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [s + n] = 2; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [+s]: typeof s; - ~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - static [""]: number; - [0]: number; - [a]: number; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - static [true]: number; - ~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [`hello bye`] = 0; - static [`hello ${a} bye`] = 0 - ~~~~~~~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts deleted file mode 100644 index b928e6f19c89f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames12_ES6.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts] //// - -//// [computedPropertyNames12_ES6.ts] -var s: string; -var n: number; -var a: any; -class C { - [s]: number; - [n] = n; - static [s + s]: string; - [s + n] = 2; - [+s]: typeof s; - static [""]: number; - [0]: number; - [a]: number; - static [true]: number; - [`hello bye`] = 0; - static [`hello ${a} bye`] = 0 -} - -/// [Declarations] //// - - - -//// [computedPropertyNames12_ES6.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare class C { - [s]: number; - [n]: invalid; - static [""]: number; - [0]: number; - [a]: number; - [`hello bye`]: number; -} - -/// [Errors] //// - -computedPropertyNames12_ES6.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(6,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -computedPropertyNames12_ES6.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - - -==== computedPropertyNames12_ES6.ts (9 errors) ==== - var s: string; - var n: number; - var a: any; - class C { - [s]: number; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [n] = n; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9029 computedPropertyNames12_ES6.ts:6:5: Add a type annotation to the property [n]. - static [s + s]: string; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [s + n] = 2; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [+s]: typeof s; - ~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - static [""]: number; - [0]: number; - [a]: number; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - static [true]: number; - ~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [`hello bye`] = 0; - static [`hello ${a} bye`] = 0 - ~~~~~~~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts deleted file mode 100644 index 935b67d582676..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES5.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES5.ts] //// - -//// [computedPropertyNames16_ES5.ts] -var s: string; -var n: number; -var a: any; -class C { - get [s]() { return 0;} - set [n](v) { } - static get [s + s]() { return 0; } - set [s + n](v) { } - get [+s]() { return 0; } - static set [""](v) { } - get [0]() { return 0; } - set [a](v) { } - static get [true]() { return 0; } - set [`hello bye`](v) { } - get [`hello ${a} bye`]() { return 0; } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames16_ES5.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare class C { - get [s](): invalid; - set [n](v: invalid); - static set [""](v: invalid); - get [0](): invalid; - set [a](v: invalid); - set [`hello bye`](v: invalid); -} - -/// [Errors] //// - -computedPropertyNames16_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames16_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames16_ES5.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames16_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames16_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames16_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - -==== computedPropertyNames16_ES5.ts (6 errors) ==== - var s: string; - var n: number; - var a: any; - class C { - get [s]() { return 0;} - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames16_ES5.ts:5:9: Add a return type to the get accessor declaration. - set [n](v) { } - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames16_ES5.ts:6:9: Add a type to parameter of the set accessor declaration. - static get [s + s]() { return 0; } - set [s + n](v) { } - get [+s]() { return 0; } - static set [""](v) { } - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames16_ES5.ts:10:16: Add a type to parameter of the set accessor declaration. - get [0]() { return 0; } - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames16_ES5.ts:11:9: Add a return type to the get accessor declaration. - set [a](v) { } - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames16_ES5.ts:12:9: Add a type to parameter of the set accessor declaration. - static get [true]() { return 0; } - set [`hello bye`](v) { } - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames16_ES5.ts:14:9: Add a type to parameter of the set accessor declaration. - get [`hello ${a} bye`]() { return 0; } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts deleted file mode 100644 index dd55b6ccea9bd..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames16_ES6.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES6.ts] //// - -//// [computedPropertyNames16_ES6.ts] -var s: string; -var n: number; -var a: any; -class C { - get [s]() { return 0;} - set [n](v) { } - static get [s + s]() { return 0; } - set [s + n](v) { } - get [+s]() { return 0; } - static set [""](v) { } - get [0]() { return 0; } - set [a](v) { } - static get [true]() { return 0; } - set [`hello bye`](v) { } - get [`hello ${a} bye`]() { return 0; } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames16_ES6.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare class C { - get [s](): invalid; - set [n](v: invalid); - static set [""](v: invalid); - get [0](): invalid; - set [a](v: invalid); - set [`hello bye`](v: invalid); -} - -/// [Errors] //// - -computedPropertyNames16_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames16_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames16_ES6.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames16_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames16_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames16_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - -==== computedPropertyNames16_ES6.ts (6 errors) ==== - var s: string; - var n: number; - var a: any; - class C { - get [s]() { return 0;} - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames16_ES6.ts:5:9: Add a return type to the get accessor declaration. - set [n](v) { } - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames16_ES6.ts:6:9: Add a type to parameter of the set accessor declaration. - static get [s + s]() { return 0; } - set [s + n](v) { } - get [+s]() { return 0; } - static set [""](v) { } - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames16_ES6.ts:10:16: Add a type to parameter of the set accessor declaration. - get [0]() { return 0; } - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames16_ES6.ts:11:9: Add a return type to the get accessor declaration. - set [a](v) { } - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames16_ES6.ts:12:9: Add a type to parameter of the set accessor declaration. - static get [true]() { return 0; } - set [`hello bye`](v) { } - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames16_ES6.ts:14:9: Add a type to parameter of the set accessor declaration. - get [`hello ${a} bye`]() { return 0; } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts deleted file mode 100644 index 03f71d4cfc3f0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES5.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES5.ts] //// - -//// [computedPropertyNames2_ES5.ts] -var methodName = "method"; -var accessorName = "accessor"; -class C { - [methodName]() { } - static [methodName]() { } - get [accessorName]() { } - set [accessorName](v) { } - static get [accessorName]() { } - static set [accessorName](v) { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames2_ES5.d.ts] -declare var methodName: string; -declare var accessorName: string; -declare class C { - [methodName](): invalid; - static [methodName](): invalid; - get [accessorName](): invalid; - set [accessorName](v: invalid); - static get [accessorName](): invalid; - static set [accessorName](v: invalid); -} - -/// [Errors] //// - -computedPropertyNames2_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames2_ES5.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames2_ES5.ts(6,9): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES5.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames2_ES5.ts(8,16): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES5.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - -==== computedPropertyNames2_ES5.ts (6 errors) ==== - var methodName = "method"; - var accessorName = "accessor"; - class C { - [methodName]() { } - ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames2_ES5.ts:4:5: Add a return type to the method - static [methodName]() { } - ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames2_ES5.ts:5:12: Add a return type to the method - get [accessorName]() { } - ~~~~~~~~~~~~~~ -!!! error TS2378: A 'get' accessor must return a value. - ~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames2_ES5.ts:7:9: Add a type to parameter of the set accessor declaration. -!!! related TS9032 computedPropertyNames2_ES5.ts:6:9: Add a return type to the get accessor declaration. - set [accessorName](v) { } - static get [accessorName]() { } - ~~~~~~~~~~~~~~ -!!! error TS2378: A 'get' accessor must return a value. - ~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames2_ES5.ts:9:16: Add a type to parameter of the set accessor declaration. -!!! related TS9032 computedPropertyNames2_ES5.ts:8:16: Add a return type to the get accessor declaration. - static set [accessorName](v) { } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts deleted file mode 100644 index 854630c27e03b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames2_ES6.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES6.ts] //// - -//// [computedPropertyNames2_ES6.ts] -var methodName = "method"; -var accessorName = "accessor"; -class C { - [methodName]() { } - static [methodName]() { } - get [accessorName]() { } - set [accessorName](v) { } - static get [accessorName]() { } - static set [accessorName](v) { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames2_ES6.d.ts] -declare var methodName: string; -declare var accessorName: string; -declare class C { - [methodName](): invalid; - static [methodName](): invalid; - get [accessorName](): invalid; - set [accessorName](v: invalid); - static get [accessorName](): invalid; - static set [accessorName](v: invalid); -} - -/// [Errors] //// - -computedPropertyNames2_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames2_ES6.ts(5,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames2_ES6.ts(6,9): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES6.ts(6,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames2_ES6.ts(8,16): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES6.ts(8,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - -==== computedPropertyNames2_ES6.ts (6 errors) ==== - var methodName = "method"; - var accessorName = "accessor"; - class C { - [methodName]() { } - ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames2_ES6.ts:4:5: Add a return type to the method - static [methodName]() { } - ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames2_ES6.ts:5:12: Add a return type to the method - get [accessorName]() { } - ~~~~~~~~~~~~~~ -!!! error TS2378: A 'get' accessor must return a value. - ~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames2_ES6.ts:7:9: Add a type to parameter of the set accessor declaration. -!!! related TS9032 computedPropertyNames2_ES6.ts:6:9: Add a return type to the get accessor declaration. - set [accessorName](v) { } - static get [accessorName]() { } - ~~~~~~~~~~~~~~ -!!! error TS2378: A 'get' accessor must return a value. - ~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames2_ES6.ts:9:16: Add a type to parameter of the set accessor declaration. -!!! related TS9032 computedPropertyNames2_ES6.ts:8:16: Add a return type to the get accessor declaration. - static set [accessorName](v) { } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts deleted file mode 100644 index e3633d2dc84a9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES5.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES5.ts] //// - -//// [computedPropertyNames4_ES5.ts] -var s: string; -var n: number; -var a: any; -var v = { - [s]: 0, - [n]: n, - [s + s]: 1, - [s + n]: 2, - [+s]: s, - [""]: 0, - [0]: 0, - [a]: 1, - [true]: 0, - [`hello bye`]: 0, - [`hello ${a} bye`]: 0 -} - -/// [Declarations] //// - - - -//// [computedPropertyNames4_ES5.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare var v: invalid; - -/// [Errors] //// - -computedPropertyNames4_ES5.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -computedPropertyNames4_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES5.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -computedPropertyNames4_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames4_ES5.ts (7 errors) ==== - var s: string; - var n: number; - var a: any; - var v = { - [s]: 0, - [n]: n, - ~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9035 computedPropertyNames4_ES5.ts:6:10: Add a type assertion to this expression to make type type explicit. - [s + s]: 1, - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. - [s + n]: 2, - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. - [+s]: s, - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. - ~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9035 computedPropertyNames4_ES5.ts:9:11: Add a type assertion to this expression to make type type explicit. - [""]: 0, - [0]: 0, - [a]: 1, - [true]: 0, - ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. - [`hello bye`]: 0, - [`hello ${a} bye`]: 0 - ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts deleted file mode 100644 index 0bd8c94d47fd0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames4_ES6.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES6.ts] //// - -//// [computedPropertyNames4_ES6.ts] -var s: string; -var n: number; -var a: any; -var v = { - [s]: 0, - [n]: n, - [s + s]: 1, - [s + n]: 2, - [+s]: s, - [""]: 0, - [0]: 0, - [a]: 1, - [true]: 0, - [`hello bye`]: 0, - [`hello ${a} bye`]: 0 -} - -/// [Declarations] //// - - - -//// [computedPropertyNames4_ES6.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare var v: invalid; - -/// [Errors] //// - -computedPropertyNames4_ES6.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -computedPropertyNames4_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES6.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -computedPropertyNames4_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames4_ES6.ts (7 errors) ==== - var s: string; - var n: number; - var a: any; - var v = { - [s]: 0, - [n]: n, - ~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9035 computedPropertyNames4_ES6.ts:6:10: Add a type assertion to this expression to make type type explicit. - [s + s]: 1, - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. - [s + n]: 2, - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. - [+s]: s, - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. - ~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9035 computedPropertyNames4_ES6.ts:9:11: Add a type assertion to this expression to make type type explicit. - [""]: 0, - [0]: 0, - [a]: 1, - [true]: 0, - ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. - [`hello bye`]: 0, - [`hello ${a} bye`]: 0 - ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts deleted file mode 100644 index c4f9cfeb7271b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES5.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES5.ts] //// - -//// [computedPropertyNames5_ES5.ts] -var b: boolean; -var v = { - [b]: 0, - [true]: 1, - [[]]: 0, - [{}]: 0, - [undefined]: undefined, - [null]: null -} - -/// [Declarations] //// - - - -//// [computedPropertyNames5_ES5.d.ts] -declare var b: boolean; -declare var v: invalid; - -/// [Errors] //// - -computedPropertyNames5_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames5_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames5_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames5_ES5.ts (9 errors) ==== - var b: boolean; - var v = { - [b]: 0, - ~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [true]: 1, - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [[]]: 0, - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. - [{}]: 0, - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. - [undefined]: undefined, - ~~~~~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [null]: null - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts deleted file mode 100644 index d63c6f7cf9ac7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames5_ES6.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES6.ts] //// - -//// [computedPropertyNames5_ES6.ts] -var b: boolean; -var v = { - [b]: 0, - [true]: 1, - [[]]: 0, - [{}]: 0, - [undefined]: undefined, - [null]: null -} - -/// [Declarations] //// - - - -//// [computedPropertyNames5_ES6.d.ts] -declare var b: boolean; -declare var v: invalid; - -/// [Errors] //// - -computedPropertyNames5_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames5_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames5_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames5_ES6.ts (9 errors) ==== - var b: boolean; - var v = { - [b]: 0, - ~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [true]: 1, - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [[]]: 0, - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. - [{}]: 0, - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. - [undefined]: undefined, - ~~~~~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [null]: null - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES5.d.ts deleted file mode 100644 index 28ac4e908ccb3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES5.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES5.ts] //// - -//// [computedPropertyNames6_ES5.ts] -var p1: number | string; -var p2: number | number[]; -var p3: string | boolean; -var v = { - [p1]: 0, - [p2]: 1, - [p3]: 2 -} - -/// [Declarations] //// - - - -//// [computedPropertyNames6_ES5.d.ts] -declare var p1: number | string; -declare var p2: number | number[]; -declare var p3: string | boolean; -declare var v: { - [p1]: number; - [p2]: number; - [p3]: number; -}; - -/// [Errors] //// - -computedPropertyNames6_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames6_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - -==== computedPropertyNames6_ES5.ts (2 errors) ==== - var p1: number | string; - var p2: number | number[]; - var p3: string | boolean; - var v = { - [p1]: 0, - [p2]: 1, - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [p3]: 2 - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES6.d.ts deleted file mode 100644 index 31c68455079fa..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames6_ES6.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES6.ts] //// - -//// [computedPropertyNames6_ES6.ts] -var p1: number | string; -var p2: number | number[]; -var p3: string | boolean; -var v = { - [p1]: 0, - [p2]: 1, - [p3]: 2 -} - -/// [Declarations] //// - - - -//// [computedPropertyNames6_ES6.d.ts] -declare var p1: number | string; -declare var p2: number | number[]; -declare var p3: string | boolean; -declare var v: { - [p1]: number; - [p2]: number; - [p3]: number; -}; - -/// [Errors] //// - -computedPropertyNames6_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames6_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - -==== computedPropertyNames6_ES6.ts (2 errors) ==== - var p1: number | string; - var p2: number | number[]; - var p3: string | boolean; - var v = { - [p1]: 0, - [p2]: 1, - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [p3]: 2 - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames7_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames7_ES5.d.ts deleted file mode 100644 index d84176ceab005..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames7_ES5.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES5.ts] //// - -//// [computedPropertyNames7_ES5.ts] -enum E { - member -} -var v = { - [E.member]: 0 -} - -/// [Declarations] //// - - - -//// [computedPropertyNames7_ES5.d.ts] -declare enum E { - member = 0 -} -declare var v: { - [E.member]: number; -}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames7_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames7_ES6.d.ts deleted file mode 100644 index 89828ea54cd69..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames7_ES6.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES6.ts] //// - -//// [computedPropertyNames7_ES6.ts] -enum E { - member -} -var v = { - [E.member]: 0 -} - -/// [Declarations] //// - - - -//// [computedPropertyNames7_ES6.d.ts] -declare enum E { - member = 0 -} -declare var v: { - [E.member]: number; -}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts deleted file mode 100644 index c800dd09fe39c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES5.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts] //// - -//// [computedPropertyNamesOnOverloads_ES5.ts] -var methodName = "method"; -var accessorName = "accessor"; -class C { - [methodName](v: string); - [methodName](); - [methodName](v?: string) { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNamesOnOverloads_ES5.d.ts] -declare var methodName: string; -declare var accessorName: string; -declare class C { - [methodName](v: string): invalid; - [methodName](): invalid; -} - -/// [Errors] //// - -computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== computedPropertyNamesOnOverloads_ES5.ts (4 errors) ==== - var methodName = "method"; - var accessorName = "accessor"; - class C { - [methodName](v: string); - ~~~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:4:5: Add a return type to the method - [methodName](); - ~~~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNamesOnOverloads_ES5.ts:5:5: Add a return type to the method - [methodName](v?: string) { } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts deleted file mode 100644 index c416a26661313..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesOnOverloads_ES6.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts] //// - -//// [computedPropertyNamesOnOverloads_ES6.ts] -var methodName = "method"; -var accessorName = "accessor"; -class C { - [methodName](v: string); - [methodName](); - [methodName](v?: string) { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNamesOnOverloads_ES6.d.ts] -declare var methodName: string; -declare var accessorName: string; -declare class C { - [methodName](v: string): invalid; - [methodName](): invalid; -} - -/// [Errors] //// - -computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== computedPropertyNamesOnOverloads_ES6.ts (4 errors) ==== - var methodName = "method"; - var accessorName = "accessor"; - class C { - [methodName](v: string); - ~~~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:4:5: Add a return type to the method - [methodName](); - ~~~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNamesOnOverloads_ES6.ts:5:5: Add a return type to the method - [methodName](v?: string) { } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts deleted file mode 100644 index 64d5dd84fb2af..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNamesWithStaticProperty.d.ts +++ /dev/null @@ -1,100 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts] //// - -//// [computedPropertyNamesWithStaticProperty.ts] -class C { -class C1 { - static staticProp = 10; - get [C1.staticProp]() { - return "hello"; - } - set [C1.staticProp](x: string) { - var y = x; - } - [C1.staticProp]() { } -} - -(class C2 { - static staticProp = 10; - get [C2.staticProp]() { - return "hello"; - } - set [C2.staticProp](x: string) { - var y = x; - } - [C2.staticProp]() { } -}) - - -/// [Declarations] //// - - - -//// [computedPropertyNamesWithStaticProperty.d.ts] -declare class C { -} -declare class C1 { - static staticProp: number; - get [C1.staticProp](): string; - set [C1.staticProp](x: string); - [C1.staticProp](): invalid; -} - -/// [Errors] //// - -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,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -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 (8 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: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:2:7: 'C1' is declared here. - var y = x; - } - [C1.staticProp]() { } - ~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNamesWithStaticProperty.ts:10:5: Add a return type to the method - ~~ -!!! error TS2449: Class 'C1' used before its declaration. -!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. - } - - (class C2 { - static staticProp = 10; - get [C2.staticProp]() { - ~~ -!!! error TS2449: Class 'C2' used before its declaration. -!!! 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:13:8: 'C2' is declared here. - var y = x; - } - [C2.staticProp]() { } - ~~ -!!! error TS2449: Class 'C2' used before its declaration. -!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:13:8: 'C2' is declared here. - }) - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts deleted file mode 100644 index c6ab81f230956..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/constEnumErrors.d.ts +++ /dev/null @@ -1,210 +0,0 @@ -//// [tests/cases/compiler/constEnumErrors.ts] //// - -//// [constEnumErrors.ts] -const enum E { - A -} - -module E { - var x = 1; -} - -const enum E1 { - // illegal case - // forward reference to the element of the same enum - X = Y, - // forward reference to the element of the same enum - Y = E1.Z, - Y1 = E1["Z"] -} - -const enum E2 { - A -} - -var y0 = E2[1] -var name = "A"; -var y1 = E2[name]; -var y2 = E2[`${name}`]; - -var x = E2; -var y = [E2]; - -function foo(t: any): void { -} - -foo(E2); - -const enum NaNOrInfinity { - A = 9007199254740992, - B = A * A, - C = B * B, - D = C * C, - E = D * D, - F = E * E, // overflow - G = 1 / 0, // overflow - H = 0 / 0 // NaN -} - -/// [Declarations] //// - - - -//// [constEnumErrors.d.ts] -declare const enum E { - A = 0 -} -declare namespace E { -} -declare const enum E1 { - X, - Y, - Y1 -} -declare const enum E2 { - A = 0 -} -declare var y0: invalid; -declare var name: string; -declare var y1: invalid; -declare var y2: invalid; -declare var x: invalid; -declare var y: invalid; -declare function foo(t: any): void; -declare const enum NaNOrInfinity { - A = 9007199254740992, - B = 8.112963841460668e+31, - C = 6.582018229284824e+63, - D = 4.332296397063773e+127, - E = 1.876879207201175e+255, - F = Infinity,// overflow - G = Infinity,// overflow - H = NaN -} - -/// [Errors] //// - -constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -constEnumErrors.ts(12,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. -constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -constEnumErrors.ts(14,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. -constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. -constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. -constEnumErrors.ts(15,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. -constEnumErrors.ts(15,10): error TS2474: const enum member initializers must be constant expressions. -constEnumErrors.ts(15,13): error TS2339: Property 'Z' does not exist on type 'typeof E1'. -constEnumErrors.ts(22,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -constEnumErrors.ts(22,13): error TS2476: A const enum member can only be accessed using a string literal. -constEnumErrors.ts(24,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -constEnumErrors.ts(24,13): error TS2476: A const enum member can only be accessed using a string literal. -constEnumErrors.ts(25,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -constEnumErrors.ts(25,13): error TS2476: A const enum member can only be accessed using a string literal. -constEnumErrors.ts(27,9): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -constEnumErrors.ts(27,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -constEnumErrors.ts(28,9): error TS9017: Only const arrays can be inferred with --isolatedDeclarations. -constEnumErrors.ts(28,10): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -constEnumErrors.ts(33,5): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -constEnumErrors.ts(41,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -constEnumErrors.ts(42,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - - -==== constEnumErrors.ts (24 errors) ==== - const enum E { - ~ -!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. - A - } - - module E { - ~ -!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. - var x = 1; - } - - const enum E1 { - // illegal case - // forward reference to the element of the same enum - X = Y, - ~ -!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. - ~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - // forward reference to the element of the same enum - Y = E1.Z, - ~ -!!! 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. - ~ -!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. - Y1 = E1["Z"] - ~~ -!!! 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. - ~~~ -!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. - } - - const enum E2 { - A - } - - var y0 = E2[1] - ~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 constEnumErrors.ts:22:5: Add a type annotation to the variable y0. - ~ -!!! error TS2476: A const enum member can only be accessed using a string literal. - var name = "A"; - var y1 = E2[name]; - ~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 constEnumErrors.ts:24:5: Add a type annotation to the variable y1. - ~~~~ -!!! error TS2476: A const enum member can only be accessed using a string literal. - var y2 = E2[`${name}`]; - ~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 constEnumErrors.ts:25:5: Add a type annotation to the variable y2. - ~~~~~~~~~ -!!! error TS2476: A const enum member can only be accessed using a string literal. - - var x = E2; - ~~ -!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. - ~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 constEnumErrors.ts:27:5: Add a type annotation to the variable x. - var y = [E2]; - ~~~~ -!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations. -!!! related TS9027 constEnumErrors.ts:28:5: Add a type annotation to the variable y. - ~~ -!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. - - function foo(t: any): void { - } - - foo(E2); - ~~ -!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. - - const enum NaNOrInfinity { - A = 9007199254740992, - B = A * A, - C = B * B, - D = C * C, - E = D * D, - F = E * E, // overflow - ~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - G = 1 / 0, // overflow - ~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - H = 0 / 0 // NaN - ~~~~~ -!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/contextualSignatureInstantiation.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/contextualSignatureInstantiation.d.ts deleted file mode 100644 index 8c2441d21e784..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/contextualSignatureInstantiation.d.ts +++ /dev/null @@ -1,124 +0,0 @@ -//// [tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts] //// - -//// [contextualSignatureInstantiation.ts] -// TypeScript Spec, section 4.12.2: -// If e is an expression of a function type that contains exactly one generic call signature and no other members, -// and T is a function type with exactly one non - generic call signature and no other members, then any inferences -// made for type parameters referenced by the parameters of T's call signature are fixed, and e's type is changed -// to a function type with e's call signature instantiated in the context of T's call signature (section 3.8.5). - -declare function foo(cb: (x: number, y: string) => T): T; -declare function bar(x: T, y: U, cb: (x: T, y: U) => V): V; -declare function baz(x: T, y: T, cb: (x: T, y: T) => U): U; - -declare function g(x: T, y: T): T; -declare function h(x: T, y: U): T[] | U[]; - -var a: number; -var a = bar(1, 1, g); // Should be number -var a = baz(1, 1, g); // Should be number - -var b: number | string; -var b = foo(g); // Error, number and string are disjoint types -var b = bar(1, "one", g); // Error, number and string are disjoint types -var b = bar("one", 1, g); // Error, number and string are disjoint types -var b = baz(b, b, g); // Should be number | string - -var d: number[] | string[]; -var d = foo(h); // Should be number[] | string[] -var d = bar(1, "one", h); // Should be number[] | string[] -var d = bar("one", 1, h); // Should be number[] | string[] -var d = baz(d, d, g); // Should be number[] | string[] - - -/// [Declarations] //// - - - -//// [contextualSignatureInstantiation.d.ts] -declare function foo(cb: (x: number, y: string) => T): T; -declare function bar(x: T, y: U, cb: (x: T, y: U) => V): V; -declare function baz(x: T, y: T, cb: (x: T, y: T) => U): U; -declare function g(x: T, y: T): T; -declare function h(x: T, y: U): T[] | U[]; -declare var a: number; -declare var a: number; -declare var a: number; -declare var b: number | string; -declare var b: number | string; -declare var b: number | string; -declare var b: number | string; -declare var b: number | string; -declare var d: number[] | string[]; -declare var d: number[] | string[]; -declare var d: number[] | string[]; -declare var d: number[] | string[]; -declare var d: number[] | string[]; - -/// [Errors] //// - -contextualSignatureInstantiation.ts(19,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. -contextualSignatureInstantiation.ts(19,13): error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. - Types of parameters 'y' and 'y' are incompatible. - Type 'string' is not assignable to type 'number'. -contextualSignatureInstantiation.ts(20,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. -contextualSignatureInstantiation.ts(20,23): error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. - Types of parameters 'y' and 'y' are incompatible. - Type 'string' is not assignable to type 'number'. -contextualSignatureInstantiation.ts(21,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. -contextualSignatureInstantiation.ts(21,23): error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: string, y: number) => string'. - Types of parameters 'y' and 'y' are incompatible. - Type 'number' is not assignable to type 'string'. - - -==== contextualSignatureInstantiation.ts (6 errors) ==== - // TypeScript Spec, section 4.12.2: - // If e is an expression of a function type that contains exactly one generic call signature and no other members, - // and T is a function type with exactly one non - generic call signature and no other members, then any inferences - // made for type parameters referenced by the parameters of T's call signature are fixed, and e's type is changed - // to a function type with e's call signature instantiated in the context of T's call signature (section 3.8.5). - - declare function foo(cb: (x: number, y: string) => T): T; - declare function bar(x: T, y: U, cb: (x: T, y: U) => V): V; - declare function baz(x: T, y: T, cb: (x: T, y: T) => U): U; - - declare function g(x: T, y: T): T; - declare function h(x: T, y: U): T[] | U[]; - - var a: number; - var a = bar(1, 1, g); // Should be number - var a = baz(1, 1, g); // Should be number - - var b: number | string; - var b = foo(g); // Error, number and string are disjoint types - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. -!!! related TS6203 contextualSignatureInstantiation.ts:18:5: 'b' was also declared here. - ~ -!!! error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. -!!! error TS2345: Types of parameters 'y' and 'y' are incompatible. -!!! error TS2345: Type 'string' is not assignable to type 'number'. - var b = bar(1, "one", g); // Error, number and string are disjoint types - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. -!!! related TS6203 contextualSignatureInstantiation.ts:18:5: 'b' was also declared here. - ~ -!!! error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. -!!! error TS2345: Types of parameters 'y' and 'y' are incompatible. -!!! error TS2345: Type 'string' is not assignable to type 'number'. - var b = bar("one", 1, g); // Error, number and string are disjoint types - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. -!!! related TS6203 contextualSignatureInstantiation.ts:18:5: 'b' was also declared here. - ~ -!!! error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: string, y: number) => string'. -!!! error TS2345: Types of parameters 'y' and 'y' are incompatible. -!!! error TS2345: Type 'number' is not assignable to type 'string'. - var b = baz(b, b, g); // Should be number | string - - var d: number[] | string[]; - var d = foo(h); // Should be number[] | string[] - var d = bar(1, "one", h); // Should be number[] | string[] - var d = bar("one", 1, h); // Should be number[] | string[] - var d = baz(d, d, g); // Should be number[] | string[] - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping.d.ts deleted file mode 100644 index 66cb771a6f450..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping.d.ts +++ /dev/null @@ -1,604 +0,0 @@ -//// [tests/cases/compiler/contextualTyping.ts] //// - -//// [contextualTyping.ts] -// DEFAULT INTERFACES -interface IFoo { - n: number; - s: string; - f(i: number, s: string): string; - a: number[]; -} - -interface IBar { - foo: IFoo; -} - -// CONTEXT: Class property declaration -class C1T5 { - foo: (i: number, s: string) => number = function(i) { - return i; - } -} - -// CONTEXT: Module property declaration -module C2T5 { - export var foo: (i: number, s: string) => number = function(i) { - return i; - } -} - -// CONTEXT: Variable declaration -var c3t1: (s: string) => string = (function(s) { return s }); -var c3t2 = ({ - n: 1 -}) -var c3t3: number[] = []; -var c3t4: () => IFoo = function() { return ({}) }; -var c3t5: (n: number) => IFoo = function(n) { return ({}) }; -var c3t6: (n: number, s: string) => IFoo = function(n, s) { return ({}) }; -var c3t7: { - (n: number): number; - (s1: string): number; -} = function(n) { return n; }; - -var c3t8: (n: number, s: string) => number = function(n) { return n; }; -var c3t9: number[][] = [[],[]]; -var c3t10: IFoo[] = [({}),({})]; -var c3t11: {(n: number, s: string): string;}[] = [function(n, s) { return s; }]; -var c3t12: IBar = { - foo: ({}) -} -var c3t13 = ({ - f: function(i, s) { return s; } -}) -var c3t14 = ({ - a: [] -}) - -// CONTEXT: Class property assignment -class C4T5 { - foo: (i: number, s: string) => string; - constructor() { - this.foo = function(i, s) { - return s; - } - } -} - -// CONTEXT: Module property assignment -module C5T5 { - export var foo: (i: number, s: string) => string; - foo = function(i, s) { - return s; - } -} - -// CONTEXT: Variable assignment -var c6t5: (n: number) => IFoo; -c6t5 = <(n: number) => IFoo>function(n) { return ({}) }; - -// CONTEXT: Array index assignment -var c7t2: IFoo[]; -c7t2[0] = ({n: 1}); - -// CONTEXT: Object property assignment -interface IPlaceHolder { - t1: (s: string) => string; - t2: IFoo; - t3: number[]; - t4: () => IFoo; - t5: (n: number) => IFoo; - t6: (n: number, s: string) => IFoo; - t7: { - (n: number, s: string): number; - //(s1: string, s2: string): number; - }; - t8: (n: number, s: string) => number; - t9: number[][]; - t10: IFoo[]; - t11: {(n: number, s: string): string;}[]; - t12: IBar; - t13: IFoo; - t14: IFoo; - } - -var objc8: { - t1: (s: string) => string; - t2: IFoo; - t3: number[]; - t4: () => IFoo; - t5: (n: number) => IFoo; - t6: (n: number, s: string) => IFoo; - t7: { - (n: number, s: string): number; - //(s1: string, s2: string): number; - }; - t8: (n: number, s: string) => number; - t9: number[][]; - t10: IFoo[]; - t11: {(n: number, s: string): string;}[]; - t12: IBar; - t13: IFoo; - t14: IFoo; -} = ({}); - -objc8.t1 = (function(s) { return s }); -objc8.t2 = ({ - n: 1 -}); -objc8.t3 = []; -objc8.t4 = function() { return ({}) }; -objc8.t5 = function(n) { return ({}) }; -objc8.t6 = function(n, s) { return ({}) }; -objc8.t7 = function(n: number) { return n }; - -objc8.t8 = function(n) { return n; }; -objc8.t9 = [[],[]]; -objc8.t10 = [({}),({})]; -objc8.t11 = [function(n, s) { return s; }]; -objc8.t12 = { - foo: ({}) -} -objc8.t13 = ({ - f: function(i, s) { return s; } -}) -objc8.t14 = ({ - a: [] -}) -// CONTEXT: Function call -function c9t5(f: (n: number) => IFoo) {}; -c9t5(function(n) { - return ({}); -}); - -// CONTEXT: Return statement -var c10t5: () => (n: number) => IFoo = function() { return function(n) { return ({}) } }; - -// CONTEXT: Newing a class -class C11t5 { constructor(f: (n: number) => IFoo) { } }; -var i = new C11t5(function(n) { return ({}) }); - -// CONTEXT: Type annotated expression -var c12t1 = <(s: string) => string> (function(s) { return s }); -var c12t2 = ({ - n: 1 -}); -var c12t3 = []; -var c12t4 = <() => IFoo> function() { return ({}) }; -var c12t5 = <(n: number) => IFoo> function(n) { return ({}) }; -var c12t6 = <(n: number, s: string) => IFoo> function(n, s) { return ({}) }; -var c12t7 = <{ - (n: number, s: string): number; - //(s1: string, s2: string): number; -}> function(n:number) { return n }; - -var c12t8 = <(n: number, s: string) => number> function(n) { return n; }; -var c12t9 = [[],[]]; -var c12t10 = [({}),({})]; -var c12t11 = <{(n: number, s: string): string;}[]> [function(n, s) { return s; }]; -var c12t12 = { - foo: ({}) -} -var c12t13 = ({ - f: function(i, s) { return s; } -}) -var c12t14 = ({ - a: [] -}) - -// CONTEXT: Contextual typing declarations - -// contextually typing function declarations -declare function EF1(a:number, b:number):number; - -function EF1(a,b) { return a+b; } - -var efv = EF1(1,2); - - -// contextually typing from ambient class declarations -declare class Point -{ - constructor(x: number, y: number); - x: number; - y: number; - add(dx: number, dy: number): Point; - static origin: Point; - -} - -Point.origin = new Point(0, 0); - -Point.prototype.add = function(dx, dy) { - return new Point(this.x + dx, this.y + dy); -}; - -Point.prototype = { - x: 0, - y: 0, - add: function(dx, dy) { - return new Point(this.x + dx, this.y + dy); - } -}; - -interface A { x: string; } -interface B extends A { } -var x: B = { }; - - -/// [Declarations] //// - - - -//// [contextualTyping.d.ts] -interface IFoo { - n: number; - s: string; - f(i: number, s: string): string; - a: number[]; -} -interface IBar { - foo: IFoo; -} -declare class C1T5 { - foo: (i: number, s: string) => number; -} -declare namespace C2T5 { - var foo: (i: number, s: string) => number; -} -declare var c3t1: (s: string) => string; -declare var c3t2: IFoo; -declare var c3t3: number[]; -declare var c3t4: () => IFoo; -declare var c3t5: (n: number) => IFoo; -declare var c3t6: (n: number, s: string) => IFoo; -declare var c3t7: { - (n: number): number; - (s1: string): number; -}; -declare var c3t8: (n: number, s: string) => number; -declare var c3t9: number[][]; -declare var c3t10: IFoo[]; -declare var c3t11: { - (n: number, s: string): string; -}[]; -declare var c3t12: IBar; -declare var c3t13: IFoo; -declare var c3t14: IFoo; -declare class C4T5 { - foo: (i: number, s: string) => string; - constructor(); -} -declare namespace C5T5 { - var foo: (i: number, s: string) => string; -} -declare var c6t5: (n: number) => IFoo; -declare var c7t2: IFoo[]; -interface IPlaceHolder { - t1: (s: string) => string; - t2: IFoo; - t3: number[]; - t4: () => IFoo; - t5: (n: number) => IFoo; - t6: (n: number, s: string) => IFoo; - t7: { - (n: number, s: string): number; - }; - t8: (n: number, s: string) => number; - t9: number[][]; - t10: IFoo[]; - t11: { - (n: number, s: string): string; - }[]; - t12: IBar; - t13: IFoo; - t14: IFoo; -} -declare var objc8: { - t1: (s: string) => string; - t2: IFoo; - t3: number[]; - t4: () => IFoo; - t5: (n: number) => IFoo; - t6: (n: number, s: string) => IFoo; - t7: { - (n: number, s: string): number; - }; - t8: (n: number, s: string) => number; - t9: number[][]; - t10: IFoo[]; - t11: { - (n: number, s: string): string; - }[]; - t12: IBar; - t13: IFoo; - t14: IFoo; -}; -declare function c9t5(f: (n: number) => IFoo): invalid; -declare var c10t5: () => (n: number) => IFoo; -declare class C11t5 { - constructor(f: (n: number) => IFoo); -} -declare var i: invalid; -declare var c12t1: (s: string) => string; -declare var c12t2: IFoo; -declare var c12t3: number[]; -declare var c12t4: () => IFoo; -declare var c12t5: (n: number) => IFoo; -declare var c12t6: (n: number, s: string) => IFoo; -declare var c12t7: { - (n: number, s: string): number; -}; -declare var c12t8: (n: number, s: string) => number; -declare var c12t9: number[][]; -declare var c12t10: IFoo[]; -declare var c12t11: { - (n: number, s: string): string; -}[]; -declare var c12t12: IBar; -declare var c12t13: IFoo; -declare var c12t14: IFoo; -declare function EF1(a: number, b: number): number; -declare var efv: invalid; -declare class Point { - constructor(x: number, y: number); - x: number; - y: number; - add(dx: number, dy: number): Point; - static origin: Point; -} -interface A { - x: string; -} -interface B extends A { -} -declare var x: B; - -/// [Errors] //// - -contextualTyping.ts(146,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -contextualTyping.ts(156,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -contextualTyping.ts(189,18): error TS2384: Overload signatures must all be ambient or non-ambient. -contextualTyping.ts(193,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' but required in type 'B'. - - -==== contextualTyping.ts (5 errors) ==== - // DEFAULT INTERFACES - interface IFoo { - n: number; - s: string; - f(i: number, s: string): string; - a: number[]; - } - - interface IBar { - foo: IFoo; - } - - // CONTEXT: Class property declaration - class C1T5 { - foo: (i: number, s: string) => number = function(i) { - return i; - } - } - - // CONTEXT: Module property declaration - module C2T5 { - export var foo: (i: number, s: string) => number = function(i) { - return i; - } - } - - // CONTEXT: Variable declaration - var c3t1: (s: string) => string = (function(s) { return s }); - var c3t2 = ({ - n: 1 - }) - var c3t3: number[] = []; - var c3t4: () => IFoo = function() { return ({}) }; - var c3t5: (n: number) => IFoo = function(n) { return ({}) }; - var c3t6: (n: number, s: string) => IFoo = function(n, s) { return ({}) }; - var c3t7: { - (n: number): number; - (s1: string): number; - } = function(n) { return n; }; - - var c3t8: (n: number, s: string) => number = function(n) { return n; }; - var c3t9: number[][] = [[],[]]; - var c3t10: IFoo[] = [({}),({})]; - var c3t11: {(n: number, s: string): string;}[] = [function(n, s) { return s; }]; - var c3t12: IBar = { - foo: ({}) - } - var c3t13 = ({ - f: function(i, s) { return s; } - }) - var c3t14 = ({ - a: [] - }) - - // CONTEXT: Class property assignment - class C4T5 { - foo: (i: number, s: string) => string; - constructor() { - this.foo = function(i, s) { - return s; - } - } - } - - // CONTEXT: Module property assignment - module C5T5 { - export var foo: (i: number, s: string) => string; - foo = function(i, s) { - return s; - } - } - - // CONTEXT: Variable assignment - var c6t5: (n: number) => IFoo; - c6t5 = <(n: number) => IFoo>function(n) { return ({}) }; - - // CONTEXT: Array index assignment - var c7t2: IFoo[]; - c7t2[0] = ({n: 1}); - - // CONTEXT: Object property assignment - interface IPlaceHolder { - t1: (s: string) => string; - t2: IFoo; - t3: number[]; - t4: () => IFoo; - t5: (n: number) => IFoo; - t6: (n: number, s: string) => IFoo; - t7: { - (n: number, s: string): number; - //(s1: string, s2: string): number; - }; - t8: (n: number, s: string) => number; - t9: number[][]; - t10: IFoo[]; - t11: {(n: number, s: string): string;}[]; - t12: IBar; - t13: IFoo; - t14: IFoo; - } - - var objc8: { - t1: (s: string) => string; - t2: IFoo; - t3: number[]; - t4: () => IFoo; - t5: (n: number) => IFoo; - t6: (n: number, s: string) => IFoo; - t7: { - (n: number, s: string): number; - //(s1: string, s2: string): number; - }; - t8: (n: number, s: string) => number; - t9: number[][]; - t10: IFoo[]; - t11: {(n: number, s: string): string;}[]; - t12: IBar; - t13: IFoo; - t14: IFoo; - } = ({}); - - objc8.t1 = (function(s) { return s }); - objc8.t2 = ({ - n: 1 - }); - objc8.t3 = []; - objc8.t4 = function() { return ({}) }; - objc8.t5 = function(n) { return ({}) }; - objc8.t6 = function(n, s) { return ({}) }; - objc8.t7 = function(n: number) { return n }; - - objc8.t8 = function(n) { return n; }; - objc8.t9 = [[],[]]; - objc8.t10 = [({}),({})]; - objc8.t11 = [function(n, s) { return s; }]; - objc8.t12 = { - foo: ({}) - } - objc8.t13 = ({ - f: function(i, s) { return s; } - }) - objc8.t14 = ({ - a: [] - }) - // CONTEXT: Function call - function c9t5(f: (n: number) => IFoo) {}; - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 contextualTyping.ts:146:10: Add a return type to the function declaration. - c9t5(function(n) { - return ({}); - }); - - // CONTEXT: Return statement - var c10t5: () => (n: number) => IFoo = function() { return function(n) { return ({}) } }; - - // CONTEXT: Newing a class - class C11t5 { constructor(f: (n: number) => IFoo) { } }; - var i = new C11t5(function(n) { return ({}) }); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 contextualTyping.ts:156:5: Add a type annotation to the variable i. - - // CONTEXT: Type annotated expression - var c12t1 = <(s: string) => string> (function(s) { return s }); - var c12t2 = ({ - n: 1 - }); - var c12t3 = []; - var c12t4 = <() => IFoo> function() { return ({}) }; - var c12t5 = <(n: number) => IFoo> function(n) { return ({}) }; - var c12t6 = <(n: number, s: string) => IFoo> function(n, s) { return ({}) }; - var c12t7 = <{ - (n: number, s: string): number; - //(s1: string, s2: string): number; - }> function(n:number) { return n }; - - var c12t8 = <(n: number, s: string) => number> function(n) { return n; }; - var c12t9 = [[],[]]; - var c12t10 = [({}),({})]; - var c12t11 = <{(n: number, s: string): string;}[]> [function(n, s) { return s; }]; - var c12t12 = { - foo: ({}) - } - var c12t13 = ({ - f: function(i, s) { return s; } - }) - var c12t14 = ({ - a: [] - }) - - // CONTEXT: Contextual typing declarations - - // contextually typing function declarations - declare function EF1(a:number, b:number):number; - ~~~ -!!! error TS2384: Overload signatures must all be ambient or non-ambient. - - function EF1(a,b) { return a+b; } - - var efv = EF1(1,2); - ~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 contextualTyping.ts:193:5: Add a type annotation to the variable efv. - - - // contextually typing from ambient class declarations - declare class Point - { - constructor(x: number, y: number); - x: number; - y: number; - add(dx: number, dy: number): Point; - static origin: Point; - - } - - Point.origin = new Point(0, 0); - - Point.prototype.add = function(dx, dy) { - return new Point(this.x + dx, this.y + dy); - }; - - Point.prototype = { - x: 0, - y: 0, - add: function(dx, dy) { - return new Point(this.x + dx, this.y + dy); - } - }; - - interface A { x: string; } - interface B extends A { } - var x: B = { }; - ~ -!!! error TS2741: Property 'x' is missing in type '{}' but required in type 'B'. -!!! related TS2728 contextualTyping.ts:221:15: 'x' is declared here. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping38.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping38.d.ts deleted file mode 100644 index 21825271bce55..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping38.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -//// [tests/cases/compiler/contextualTyping38.ts] //// - -//// [contextualTyping38.ts] -var foo = <{ (): number; }> function(a) { return a }; - -/// [Declarations] //// - - - -//// [contextualTyping38.d.ts] -declare var foo: { - (): number; -}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping39.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping39.d.ts deleted file mode 100644 index dcf03612ed18c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/contextualTyping39.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -//// [tests/cases/compiler/contextualTyping39.ts] //// - -//// [contextualTyping39.ts] -var foo = <{ (): number; }> function() { return "err"; }; - -/// [Declarations] //// - - - -//// [contextualTyping39.d.ts] -declare var foo: { - (): number; -}; - -/// [Errors] //// - -contextualTyping39.ts(1,11): error TS2352: Conversion of type '() => string' to type '() => number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. - Type 'string' is not comparable to type 'number'. - - -==== contextualTyping39.ts (1 errors) ==== - var foo = <{ (): number; }> function() { return "err"; }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2352: Conversion of type '() => string' to type '() => number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: Type 'string' is not comparable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/decoratorMetadataWithImportDeclarationNameCollision7.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/decoratorMetadataWithImportDeclarationNameCollision7.d.ts deleted file mode 100644 index 8ce31d87ccb8c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/decoratorMetadataWithImportDeclarationNameCollision7.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -//// [tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts] //// - -//// [db.ts] -export default class db { - public doSomething() { - } -} - -//// [service.ts] -import db from './db'; -function someDecorator(target) { - return target; -} -@someDecorator -class MyClass { - db: db.db; //error - - constructor(db: db.db) { // error - this.db = db; - this.db.doSomething(); - } -} -export {MyClass}; - - -/// [Declarations] //// - - - -//// [db.d.ts] -export default class db { - doSomething(): invalid; -} - -//// [service.d.ts] -import db from './db'; -declare class MyClass { - db: db.db; - constructor(db: db.db); -} -export { MyClass }; - -/// [Errors] //// - -db.ts(2,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -service.ts(7,9): error TS2702: 'db' only refers to a type, but is being used as a namespace here. -service.ts(7,9): error TS4031: Public property 'db' of exported class has or is using private name 'db'. -service.ts(9,21): error TS2702: 'db' only refers to a type, but is being used as a namespace here. -service.ts(9,21): error TS4063: Parameter 'db' of constructor from exported class has or is using private name 'db'. - - -==== db.ts (1 errors) ==== - export default class db { - public doSomething() { - ~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 db.ts:2:12: Add a return type to the method - } - } - -==== service.ts (4 errors) ==== - import db from './db'; - function someDecorator(target) { - return target; - } - @someDecorator - class MyClass { - db: db.db; //error - ~~ -!!! error TS2702: 'db' only refers to a type, but is being used as a namespace here. - ~~ -!!! error TS4031: Public property 'db' of exported class has or is using private name 'db'. - - constructor(db: db.db) { // error - ~~ -!!! error TS2702: 'db' only refers to a type, but is being used as a namespace here. - ~~ -!!! error TS4063: Parameter 'db' of constructor from exported class has or is using private name 'db'. - this.db = db; - this.db.doSomething(); - } - } - export {MyClass}; - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts deleted file mode 100644 index 5a16fea90a571..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/decoratorsOnComputedProperties.d.ts +++ /dev/null @@ -1,711 +0,0 @@ -//// [tests/cases/compiler/decoratorsOnComputedProperties.ts] //// - -//// [decoratorsOnComputedProperties.ts] -function x(o: object, k: PropertyKey) { } -let i = 0; -function foo(): string { return ++i + ""; } - -const fieldNameA: string = "fieldName1"; -const fieldNameB: string = "fieldName2"; -const fieldNameC: string = "fieldName3"; - -class A { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - @x [foo()]: any; - @x [foo()]: any = null; - [fieldNameA]: any; - @x [fieldNameB]: any; - @x [fieldNameC]: any = null; -} - -void class B { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - @x [foo()]: any; - @x [foo()]: any = null; - [fieldNameA]: any; - @x [fieldNameB]: any; - @x [fieldNameC]: any = null; -}; - -class C { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - @x [foo()]: any; - @x [foo()]: any = null; - [fieldNameA]: any; - @x [fieldNameB]: any; - @x [fieldNameC]: any = null; - ["some" + "method"]() {} -} - -void class D { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - @x [foo()]: any; - @x [foo()]: any = null; - [fieldNameA]: any; - @x [fieldNameB]: any; - @x [fieldNameC]: any = null; - ["some" + "method"]() {} -}; - -class E { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - @x [foo()]: any; - @x [foo()]: any = null; - ["some" + "method"]() {} - [fieldNameA]: any; - @x [fieldNameB]: any; - @x [fieldNameC]: any = null; -} - -void class F { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - @x [foo()]: any; - @x [foo()]: any = null; - ["some" + "method"]() {} - [fieldNameA]: any; - @x [fieldNameB]: any; - @x [fieldNameC]: any = null; -}; - -class G { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - @x [foo()]: any; - @x [foo()]: any = null; - ["some" + "method"]() {} - [fieldNameA]: any; - @x [fieldNameB]: any; - ["some" + "method2"]() {} - @x [fieldNameC]: any = null; -} - -void class H { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - @x [foo()]: any; - @x [foo()]: any = null; - ["some" + "method"]() {} - [fieldNameA]: any; - @x [fieldNameB]: any; - ["some" + "method2"]() {} - @x [fieldNameC]: any = null; -}; - -class I { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - @x [foo()]: any; - @x [foo()]: any = null; - @x ["some" + "method"]() {} - [fieldNameA]: any; - @x [fieldNameB]: any; - ["some" + "method2"]() {} - @x [fieldNameC]: any = null; -} - -void class J { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - @x [foo()]: any; - @x [foo()]: any = null; - @x ["some" + "method"]() {} - [fieldNameA]: any; - @x [fieldNameB]: any; - ["some" + "method2"]() {} - @x [fieldNameC]: any = null; -}; - -/// [Declarations] //// - - - -//// [decoratorsOnComputedProperties.d.ts] -declare function x(o: object, k: PropertyKey): invalid; -declare let i: number; -declare function foo(): string; -declare const fieldNameA: string; -declare const fieldNameB: string; -declare const fieldNameC: string; -declare class A { - ["property"]: any; - [Symbol.toStringTag]: any; - ["property2"]: any; - [Symbol.iterator]: any; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any; - [Symbol.match]: any; - [fieldNameA]: any; - [fieldNameB]: any; - [fieldNameC]: any; -} -declare class C { - ["property"]: any; - [Symbol.toStringTag]: any; - ["property2"]: any; - [Symbol.iterator]: any; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any; - [Symbol.match]: any; - [fieldNameA]: any; - [fieldNameB]: any; - [fieldNameC]: any; -} -declare class E { - ["property"]: any; - [Symbol.toStringTag]: any; - ["property2"]: any; - [Symbol.iterator]: any; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any; - [Symbol.match]: any; - [fieldNameA]: any; - [fieldNameB]: any; - [fieldNameC]: any; -} -declare class G { - ["property"]: any; - [Symbol.toStringTag]: any; - ["property2"]: any; - [Symbol.iterator]: any; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any; - [Symbol.match]: any; - [fieldNameA]: any; - [fieldNameB]: any; - [fieldNameC]: any; -} -declare class I { - ["property"]: any; - [Symbol.toStringTag]: any; - ["property2"]: any; - [Symbol.iterator]: any; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any; - [Symbol.match]: any; - [fieldNameA]: any; - [fieldNameB]: any; - [fieldNameC]: any; -} - -/// [Errors] //// - -decoratorsOnComputedProperties.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -decoratorsOnComputedProperties.ts(18,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(19,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(20,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(21,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(22,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(23,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(27,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(28,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(29,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(30,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(35,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(36,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(37,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(38,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(39,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(40,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(52,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(53,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(54,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(55,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(56,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(57,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(62,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(63,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(64,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(65,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(70,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(71,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(72,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(73,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(74,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(75,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(88,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(89,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(90,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(92,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(93,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(94,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(98,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(99,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(100,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(101,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(106,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(107,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(108,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(110,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(111,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(112,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(124,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(125,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(126,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(128,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(129,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(131,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(135,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(136,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(137,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(138,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(143,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(144,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(145,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(147,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(148,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(150,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(162,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(163,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(164,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(166,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(167,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(169,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(173,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(174,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(175,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(176,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(181,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(182,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(183,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(184,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(185,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(186,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid here. - - -==== decoratorsOnComputedProperties.ts (82 errors) ==== - function x(o: object, k: PropertyKey) { } - ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 decoratorsOnComputedProperties.ts:1:10: Add a return type to the function declaration. - let i = 0; - function foo(): string { return ++i + ""; } - - const fieldNameA: string = "fieldName1"; - const fieldNameB: string = "fieldName2"; - const fieldNameC: string = "fieldName3"; - - class A { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any = null; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameC]: any = null; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - } - - void class B { - @x ["property"]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [Symbol.toStringTag]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x ["property2"]: any = 2; - ~ -!!! error TS1206: Decorators are not valid here. - @x [Symbol.iterator]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [foo()]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [fieldNameC]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - }; - - class C { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any = null; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameC]: any = null; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ["some" + "method"]() {} - } - - void class D { - @x ["property"]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [Symbol.toStringTag]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x ["property2"]: any = 2; - ~ -!!! error TS1206: Decorators are not valid here. - @x [Symbol.iterator]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [foo()]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [fieldNameC]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - ["some" + "method"]() {} - }; - - class E { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any = null; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ["some" + "method"]() {} - [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameC]: any = null; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - } - - void class F { - @x ["property"]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [Symbol.toStringTag]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x ["property2"]: any = 2; - ~ -!!! error TS1206: Decorators are not valid here. - @x [Symbol.iterator]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [foo()]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - ["some" + "method"]() {} - [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [fieldNameC]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - }; - - class G { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any = null; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ["some" + "method"]() {} - [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ["some" + "method2"]() {} - @x [fieldNameC]: any = null; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - } - - void class H { - @x ["property"]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [Symbol.toStringTag]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x ["property2"]: any = 2; - ~ -!!! error TS1206: Decorators are not valid here. - @x [Symbol.iterator]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [foo()]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - ["some" + "method"]() {} - [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; - ~ -!!! error TS1206: Decorators are not valid here. - ["some" + "method2"]() {} - @x [fieldNameC]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - }; - - class I { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any = null; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x ["some" + "method"]() {} - [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ["some" + "method2"]() {} - @x [fieldNameC]: any = null; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - } - - void class J { - @x ["property"]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [Symbol.toStringTag]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x ["property2"]: any = 2; - ~ -!!! error TS1206: Decorators are not valid here. - @x [Symbol.iterator]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [foo()]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - @x ["some" + "method"]() {} - ~ -!!! error TS1206: Decorators are not valid here. - [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; - ~ -!!! error TS1206: Decorators are not valid here. - ["some" + "method2"]() {} - @x [fieldNameC]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/duplicateObjectLiteralProperty_computedName1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/duplicateObjectLiteralProperty_computedName1.d.ts deleted file mode 100644 index 3c0f6afafe9c3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/duplicateObjectLiteralProperty_computedName1.d.ts +++ /dev/null @@ -1,125 +0,0 @@ -//// [tests/cases/compiler/duplicateObjectLiteralProperty_computedName1.ts] //// - -//// [duplicateObjectLiteralProperty_computedName1.ts] -const t1 = { - 1: 1, - [1]: 0 // duplicate -} - -const t2 = { - 1: 1, - [+1]: 0 // duplicate -} - -const t3 = { - "1": 1, - [+1]: 0 // duplicate -} - -const t4 = { - "+1": 1, - [+1]: 0 // two different keys, "+1", "1" -} - -const t5 = { - "+1": 1, - ["+1"]: 0 // duplicate -} - -const t6 = { - "-1": 1, - [-1]: 0 // duplicate -} - -const t7 = { - "-1": 1, - ["-1"]: 0 // duplicate -} - - -/// [Declarations] //// - - - -//// [duplicateObjectLiteralProperty_computedName1.d.ts] -declare const t1: { - 1: number; -}; -declare const t2: { - 1: number; -}; -declare const t3: { - 1: number; -}; -declare const t4: { - "+1": number; - 1: number; -}; -declare const t5: { - "+1": number; -}; -declare const t6: { - "-1": number; -}; -declare const t7: { - "-1": number; -}; - -/// [Errors] //// - -duplicateObjectLiteralProperty_computedName1.ts(3,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty_computedName1.ts(8,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty_computedName1.ts(13,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty_computedName1.ts(23,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty_computedName1.ts(28,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty_computedName1.ts(33,5): error TS1117: An object literal cannot have multiple properties with the same name. - - -==== duplicateObjectLiteralProperty_computedName1.ts (6 errors) ==== - const t1 = { - 1: 1, - [1]: 0 // duplicate - ~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - - const t2 = { - 1: 1, - [+1]: 0 // duplicate - ~~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - - const t3 = { - "1": 1, - [+1]: 0 // duplicate - ~~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - - const t4 = { - "+1": 1, - [+1]: 0 // two different keys, "+1", "1" - } - - const t5 = { - "+1": 1, - ["+1"]: 0 // duplicate - ~~~~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - - const t6 = { - "-1": 1, - [-1]: 0 // duplicate - ~~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - - const t7 = { - "-1": 1, - ["-1"]: 0 // duplicate - ~~~~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/duplicateObjectLiteralProperty_computedName2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/duplicateObjectLiteralProperty_computedName2.d.ts deleted file mode 100644 index bf6df44369654..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/duplicateObjectLiteralProperty_computedName2.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -//// [tests/cases/compiler/duplicateObjectLiteralProperty_computedName2.ts] //// - -//// [duplicateObjectLiteralProperty_computedName2.ts] -const n = 1; -const s = "s"; -enum E1 { A = "ENUM_KEY" } -enum E2 { B } - -const t1 = { - [n]: 1, - [n]: 1, // duplicate -} - -const t2 = { - [s]: 1, - [s]: 1, // duplicate -} - -const t3 = { - [E1.A]: 1, - [E1.A]: 1, // duplicate -} - -const t4 = { - [E2.B]: 1, - [E2.B]: 1, // duplicate -} - - -/// [Declarations] //// - - - -//// [duplicateObjectLiteralProperty_computedName2.d.ts] -declare const n = 1; -declare const s = "s"; -declare enum E1 { - A = "ENUM_KEY" -} -declare enum E2 { - B = 0 -} -declare const t1: { - [n]: number; -}; -declare const t2: { - [s]: number; -}; -declare const t3: { - [E1.A]: number; -}; -declare const t4: { - [E2.B]: number; -}; - -/// [Errors] //// - -duplicateObjectLiteralProperty_computedName2.ts(8,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty_computedName2.ts(13,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty_computedName2.ts(18,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty_computedName2.ts(23,5): error TS1117: An object literal cannot have multiple properties with the same name. - - -==== duplicateObjectLiteralProperty_computedName2.ts (4 errors) ==== - const n = 1; - const s = "s"; - enum E1 { A = "ENUM_KEY" } - enum E2 { B } - - const t1 = { - [n]: 1, - [n]: 1, // duplicate - ~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - - const t2 = { - [s]: 1, - [s]: 1, // duplicate - ~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - - const t3 = { - [E1.A]: 1, - [E1.A]: 1, // duplicate - ~~~~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - - const t4 = { - [E2.B]: 1, - [E2.B]: 1, // duplicate - ~~~~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/duplicateVarsAcrossFileBoundaries.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/duplicateVarsAcrossFileBoundaries.d.ts deleted file mode 100644 index f34322e4a4eec..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/duplicateVarsAcrossFileBoundaries.d.ts +++ /dev/null @@ -1,117 +0,0 @@ -//// [tests/cases/compiler/duplicateVarsAcrossFileBoundaries.ts] //// - -//// [duplicateVarsAcrossFileBoundaries_0.ts] -var x = 3; -var y = ""; - -//// [duplicateVarsAcrossFileBoundaries_1.ts] -var x = true; -var z = 3; - -//// [duplicateVarsAcrossFileBoundaries_2.ts] -var x = ""; -var y = 3; -var z = false; - -//// [duplicateVarsAcrossFileBoundaries_3.ts] -var x = 0; -var y = ""; -var z = 0; - -//// [duplicateVarsAcrossFileBoundaries_4.ts] -module P { } -import p = P; -var q; - -//// [duplicateVarsAcrossFileBoundaries_5.ts] -module Q { } -import q = Q; -var p; - -/// [Declarations] //// - - - -//// [duplicateVarsAcrossFileBoundaries_0.d.ts] -declare var x: number; -declare var y: string; - -//// [duplicateVarsAcrossFileBoundaries_1.d.ts] -declare var x: boolean; -declare var z: number; - -//// [duplicateVarsAcrossFileBoundaries_2.d.ts] -declare var x: string; -declare var y: number; -declare var z: boolean; - -//// [duplicateVarsAcrossFileBoundaries_3.d.ts] -declare var x: number; -declare var y: string; -declare var z: number; - -//// [duplicateVarsAcrossFileBoundaries_4.d.ts] -declare namespace P { } -import p = P; -declare var q: invalid; - -//// [duplicateVarsAcrossFileBoundaries_5.d.ts] -declare namespace Q { } -import q = Q; -declare var p: invalid; - -/// [Errors] //// - -duplicateVarsAcrossFileBoundaries_1.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'boolean'. -duplicateVarsAcrossFileBoundaries_2.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. -duplicateVarsAcrossFileBoundaries_2.ts(2,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'number'. -duplicateVarsAcrossFileBoundaries_2.ts(3,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'boolean'. -duplicateVarsAcrossFileBoundaries_4.ts(3,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -duplicateVarsAcrossFileBoundaries_5.ts(3,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. - - -==== duplicateVarsAcrossFileBoundaries_0.ts (0 errors) ==== - var x = 3; - var y = ""; - -==== duplicateVarsAcrossFileBoundaries_1.ts (1 errors) ==== - var x = true; - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'boolean'. -!!! related TS6203 duplicateVarsAcrossFileBoundaries_0.ts:1:5: 'x' was also declared here. - var z = 3; - -==== duplicateVarsAcrossFileBoundaries_2.ts (3 errors) ==== - var x = ""; - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. -!!! related TS6203 duplicateVarsAcrossFileBoundaries_0.ts:1:5: 'x' was also declared here. - var y = 3; - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'number'. -!!! related TS6203 duplicateVarsAcrossFileBoundaries_0.ts:2:5: 'y' was also declared here. - var z = false; - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'boolean'. -!!! related TS6203 duplicateVarsAcrossFileBoundaries_1.ts:2:5: 'z' was also declared here. - -==== duplicateVarsAcrossFileBoundaries_3.ts (0 errors) ==== - var x = 0; - var y = ""; - var z = 0; - -==== duplicateVarsAcrossFileBoundaries_4.ts (1 errors) ==== - module P { } - import p = P; - var q; - ~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 duplicateVarsAcrossFileBoundaries_4.ts:3:5: Add a type annotation to the variable q. - -==== duplicateVarsAcrossFileBoundaries_5.ts (1 errors) ==== - module Q { } - import q = Q; - var p; - ~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 duplicateVarsAcrossFileBoundaries_5.ts:3:5: Add a type annotation to the variable p. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/escapedIdentifiers.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/escapedIdentifiers.d.ts deleted file mode 100644 index e01dae07b9fd3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/escapedIdentifiers.d.ts +++ /dev/null @@ -1,316 +0,0 @@ -//// [tests/cases/compiler/escapedIdentifiers.ts] //// - -//// [escapedIdentifiers.ts] -/* - 0 .. \u0030 - 9 .. \u0039 - - A .. \u0041 - Z .. \u005a - - a .. \u0061 - z .. \u00za -*/ - -// var decl -var \u0061 = 1; -a ++; -\u0061 ++; - -var b = 1; -b ++; -\u0062 ++; - -// modules -module moduleType1 { - export var baz1: number; -} -module moduleType\u0032 { - export var baz2: number; -} - -moduleType1.baz1 = 3; -moduleType\u0031.baz1 = 3; -moduleType2.baz2 = 3; -moduleType\u0032.baz2 = 3; - -// classes - -class classType1 { - public foo1: number; -} -class classType\u0032 { - public foo2: number; -} - -var classType1Object1 = new classType1(); -classType1Object1.foo1 = 2; -var classType1Object2 = new classType\u0031(); -classType1Object2.foo1 = 2; -var classType2Object1 = new classType2(); -classType2Object1.foo2 = 2; -var classType2Object2 = new classType\u0032(); -classType2Object2.foo2 = 2; - -// interfaces -interface interfaceType1 { - bar1: number; -} -interface interfaceType\u0032 { - bar2: number; -} - -var interfaceType1Object1 = { bar1: 0 }; -interfaceType1Object1.bar1 = 2; -var interfaceType1Object2 = { bar1: 0 }; -interfaceType1Object2.bar1 = 2; -var interfaceType2Object1 = { bar2: 0 }; -interfaceType2Object1.bar2 = 2; -var interfaceType2Object2 = { bar2: 0 }; -interfaceType2Object2.bar2 = 2; - - -// arguments -class testClass { - public func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number) { - arg\u0031 = 1; - arg2 = 'string'; - arg\u0033 = true; - arg4 = 2; - } -} - -// constructors -class constructorTestClass { - constructor (public arg1: number,public arg\u0032: string,public arg\u0033: boolean,public arg4: number) { - } -} -var constructorTestObject = new constructorTestClass(1, 'string', true, 2); -constructorTestObject.arg\u0031 = 1; -constructorTestObject.arg2 = 'string'; -constructorTestObject.arg\u0033 = true; -constructorTestObject.arg4 = 2; - -// Lables - -l\u0061bel1: - while (false) - { - while(false) - continue label1; // it will go to next iteration of outer loop - } - -label2: - while (false) - { - while(false) - continue l\u0061bel2; // it will go to next iteration of outer loop - } - -label3: - while (false) - { - while(false) - continue label3; // it will go to next iteration of outer loop - } - -l\u0061bel4: - while (false) - { - while(false) - continue l\u0061bel4; // it will go to next iteration of outer loop - } - -/// [Declarations] //// - - - -//// [escapedIdentifiers.d.ts] -declare var \u0061: number; -declare var b: number; -declare namespace moduleType1 { - var baz1: number; -} -declare namespace moduleType\u0032 { - var baz2: number; -} -declare class classType1 { - foo1: number; -} -declare class classType\u0032 { - foo2: number; -} -declare var classType1Object1: invalid; -declare var classType1Object2: invalid; -declare var classType2Object1: invalid; -declare var classType2Object2: invalid; -interface interfaceType1 { - bar1: number; -} -interface interfaceType\u0032 { - bar2: number; -} -declare var interfaceType1Object1: interfaceType1; -declare var interfaceType1Object2: interfaceType1; -declare var interfaceType2Object1: interfaceType2; -declare var interfaceType2Object2: interfaceType2; -declare class testClass { - func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number): invalid; -} -declare class constructorTestClass { - arg1: number; - arg\u0032: string; - arg\u0033: boolean; - arg4: number; - constructor(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number); -} -declare var constructorTestObject: invalid; - -/// [Errors] //// - -escapedIdentifiers.ts(43,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -escapedIdentifiers.ts(45,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -escapedIdentifiers.ts(47,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -escapedIdentifiers.ts(49,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -escapedIdentifiers.ts(72,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -escapedIdentifiers.ts(85,29): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. - - -==== escapedIdentifiers.ts (6 errors) ==== - /* - 0 .. \u0030 - 9 .. \u0039 - - A .. \u0041 - Z .. \u005a - - a .. \u0061 - z .. \u00za - */ - - // var decl - var \u0061 = 1; - a ++; - \u0061 ++; - - var b = 1; - b ++; - \u0062 ++; - - // modules - module moduleType1 { - export var baz1: number; - } - module moduleType\u0032 { - export var baz2: number; - } - - moduleType1.baz1 = 3; - moduleType\u0031.baz1 = 3; - moduleType2.baz2 = 3; - moduleType\u0032.baz2 = 3; - - // classes - - class classType1 { - public foo1: number; - } - class classType\u0032 { - public foo2: number; - } - - var classType1Object1 = new classType1(); - ~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 escapedIdentifiers.ts:43:5: Add a type annotation to the variable classType1Object1. - classType1Object1.foo1 = 2; - var classType1Object2 = new classType\u0031(); - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 escapedIdentifiers.ts:45:5: Add a type annotation to the variable classType1Object2. - classType1Object2.foo1 = 2; - var classType2Object1 = new classType2(); - ~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 escapedIdentifiers.ts:47:5: Add a type annotation to the variable classType2Object1. - classType2Object1.foo2 = 2; - var classType2Object2 = new classType\u0032(); - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 escapedIdentifiers.ts:49:5: Add a type annotation to the variable classType2Object2. - classType2Object2.foo2 = 2; - - // interfaces - interface interfaceType1 { - bar1: number; - } - interface interfaceType\u0032 { - bar2: number; - } - - var interfaceType1Object1 = { bar1: 0 }; - interfaceType1Object1.bar1 = 2; - var interfaceType1Object2 = { bar1: 0 }; - interfaceType1Object2.bar1 = 2; - var interfaceType2Object1 = { bar2: 0 }; - interfaceType2Object1.bar2 = 2; - var interfaceType2Object2 = { bar2: 0 }; - interfaceType2Object2.bar2 = 2; - - - // arguments - class testClass { - public func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number) { - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 escapedIdentifiers.ts:72:12: Add a return type to the method - arg\u0031 = 1; - arg2 = 'string'; - arg\u0033 = true; - arg4 = 2; - } - } - - // constructors - class constructorTestClass { - constructor (public arg1: number,public arg\u0032: string,public arg\u0033: boolean,public arg4: number) { - } - } - var constructorTestObject = new constructorTestClass(1, 'string', true, 2); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 escapedIdentifiers.ts:85:5: Add a type annotation to the variable constructorTestObject. - constructorTestObject.arg\u0031 = 1; - constructorTestObject.arg2 = 'string'; - constructorTestObject.arg\u0033 = true; - constructorTestObject.arg4 = 2; - - // Lables - - l\u0061bel1: - while (false) - { - while(false) - continue label1; // it will go to next iteration of outer loop - } - - label2: - while (false) - { - while(false) - continue l\u0061bel2; // it will go to next iteration of outer loop - } - - label3: - while (false) - { - while(false) - continue label3; // it will go to next iteration of outer loop - } - - l\u0061bel4: - while (false) - { - while(false) - continue l\u0061bel4; // it will go to next iteration of outer loop - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts deleted file mode 100644 index 13276b13d966d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/forwardRefInEnum.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -//// [tests/cases/compiler/forwardRefInEnum.ts] //// - -//// [forwardRefInEnum.ts] -enum E1 { - // illegal case - // forward reference to the element of the same enum - X = Y, - X1 = E1["Y"], - // forward reference to the element of the same enum - Y = E1.Z, - Y1 = E1["Z"] -} - -enum E1 { - Z = 4 -} - - -/// [Declarations] //// - - - -//// [forwardRefInEnum.d.ts] -declare enum E1 { - X, - X1, - Y, - Y1 -} -declare enum E1 { - Z = 4 -} - -/// [Errors] //// - -forwardRefInEnum.ts(4,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. -forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -forwardRefInEnum.ts(5,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. -forwardRefInEnum.ts(5,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -forwardRefInEnum.ts(7,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. -forwardRefInEnum.ts(8,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. - - -==== forwardRefInEnum.ts (6 errors) ==== - enum E1 { - // illegal case - // forward reference to the element of the same enum - X = Y, - ~ -!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. - ~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - X1 = E1["Y"], - ~~ -!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. - ~~~~~~~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - // forward reference to the element of the same enum - Y = E1.Z, - ~ -!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. - Y1 = E1["Z"] - ~~ -!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. - } - - enum E1 { - Z = 4 - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/generatedContextualTyping.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/generatedContextualTyping.d.ts deleted file mode 100644 index c1ad23069472a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/generatedContextualTyping.d.ts +++ /dev/null @@ -1,1905 +0,0 @@ -//// [tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts] //// - -//// [generatedContextualTyping.ts] -class Base { private p; } -class Derived1 extends Base { private m; } -class Derived2 extends Base { private n; } -interface Genric { func(n: T[]); } -var b = new Base(), d1 = new Derived1(), d2 = new Derived2(); -var x1: () => Base[] = () => [d1, d2]; -var x2: () => Base[] = function() { return [d1, d2] }; -var x3: () => Base[] = function named() { return [d1, d2] }; -var x4: { (): Base[]; } = () => [d1, d2]; -var x5: { (): Base[]; } = function() { return [d1, d2] }; -var x6: { (): Base[]; } = function named() { return [d1, d2] }; -var x7: Base[] = [d1, d2]; -var x8: Array = [d1, d2]; -var x9: { [n: number]: Base; } = [d1, d2]; -var x10: {n: Base[]; } = { n: [d1, d2] }; -var x11: (s: Base[]) => any = n => { var n: Base[]; return null; }; -var x12: Genric = { func: n => { return [d1, d2]; } }; -class x13 { member: () => Base[] = () => [d1, d2] } -class x14 { member: () => Base[] = function() { return [d1, d2] } } -class x15 { member: () => Base[] = function named() { return [d1, d2] } } -class x16 { member: { (): Base[]; } = () => [d1, d2] } -class x17 { member: { (): Base[]; } = function() { return [d1, d2] } } -class x18 { member: { (): Base[]; } = function named() { return [d1, d2] } } -class x19 { member: Base[] = [d1, d2] } -class x20 { member: Array = [d1, d2] } -class x21 { member: { [n: number]: Base; } = [d1, d2] } -class x22 { member: {n: Base[]; } = { n: [d1, d2] } } -class x23 { member: (s: Base[]) => any = n => { var n: Base[]; return null; } } -class x24 { member: Genric = { func: n => { return [d1, d2]; } } } -class x25 { private member: () => Base[] = () => [d1, d2] } -class x26 { private member: () => Base[] = function() { return [d1, d2] } } -class x27 { private member: () => Base[] = function named() { return [d1, d2] } } -class x28 { private member: { (): Base[]; } = () => [d1, d2] } -class x29 { private member: { (): Base[]; } = function() { return [d1, d2] } } -class x30 { private member: { (): Base[]; } = function named() { return [d1, d2] } } -class x31 { private member: Base[] = [d1, d2] } -class x32 { private member: Array = [d1, d2] } -class x33 { private member: { [n: number]: Base; } = [d1, d2] } -class x34 { private member: {n: Base[]; } = { n: [d1, d2] } } -class x35 { private member: (s: Base[]) => any = n => { var n: Base[]; return null; } } -class x36 { private member: Genric = { func: n => { return [d1, d2]; } } } -class x37 { public member: () => Base[] = () => [d1, d2] } -class x38 { public member: () => Base[] = function() { return [d1, d2] } } -class x39 { public member: () => Base[] = function named() { return [d1, d2] } } -class x40 { public member: { (): Base[]; } = () => [d1, d2] } -class x41 { public member: { (): Base[]; } = function() { return [d1, d2] } } -class x42 { public member: { (): Base[]; } = function named() { return [d1, d2] } } -class x43 { public member: Base[] = [d1, d2] } -class x44 { public member: Array = [d1, d2] } -class x45 { public member: { [n: number]: Base; } = [d1, d2] } -class x46 { public member: {n: Base[]; } = { n: [d1, d2] } } -class x47 { public member: (s: Base[]) => any = n => { var n: Base[]; return null; } } -class x48 { public member: Genric = { func: n => { return [d1, d2]; } } } -class x49 { static member: () => Base[] = () => [d1, d2] } -class x50 { static member: () => Base[] = function() { return [d1, d2] } } -class x51 { static member: () => Base[] = function named() { return [d1, d2] } } -class x52 { static member: { (): Base[]; } = () => [d1, d2] } -class x53 { static member: { (): Base[]; } = function() { return [d1, d2] } } -class x54 { static member: { (): Base[]; } = function named() { return [d1, d2] } } -class x55 { static member: Base[] = [d1, d2] } -class x56 { static member: Array = [d1, d2] } -class x57 { static member: { [n: number]: Base; } = [d1, d2] } -class x58 { static member: {n: Base[]; } = { n: [d1, d2] } } -class x59 { static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } -class x60 { static member: Genric = { func: n => { return [d1, d2]; } } } -class x61 { private static member: () => Base[] = () => [d1, d2] } -class x62 { private static member: () => Base[] = function() { return [d1, d2] } } -class x63 { private static member: () => Base[] = function named() { return [d1, d2] } } -class x64 { private static member: { (): Base[]; } = () => [d1, d2] } -class x65 { private static member: { (): Base[]; } = function() { return [d1, d2] } } -class x66 { private static member: { (): Base[]; } = function named() { return [d1, d2] } } -class x67 { private static member: Base[] = [d1, d2] } -class x68 { private static member: Array = [d1, d2] } -class x69 { private static member: { [n: number]: Base; } = [d1, d2] } -class x70 { private static member: {n: Base[]; } = { n: [d1, d2] } } -class x71 { private static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } -class x72 { private static member: Genric = { func: n => { return [d1, d2]; } } } -class x73 { public static member: () => Base[] = () => [d1, d2] } -class x74 { public static member: () => Base[] = function() { return [d1, d2] } } -class x75 { public static member: () => Base[] = function named() { return [d1, d2] } } -class x76 { public static member: { (): Base[]; } = () => [d1, d2] } -class x77 { public static member: { (): Base[]; } = function() { return [d1, d2] } } -class x78 { public static member: { (): Base[]; } = function named() { return [d1, d2] } } -class x79 { public static member: Base[] = [d1, d2] } -class x80 { public static member: Array = [d1, d2] } -class x81 { public static member: { [n: number]: Base; } = [d1, d2] } -class x82 { public static member: {n: Base[]; } = { n: [d1, d2] } } -class x83 { public static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } -class x84 { public static member: Genric = { func: n => { return [d1, d2]; } } } -class x85 { constructor(parm: () => Base[] = () => [d1, d2]) { } } -class x86 { constructor(parm: () => Base[] = function() { return [d1, d2] }) { } } -class x87 { constructor(parm: () => Base[] = function named() { return [d1, d2] }) { } } -class x88 { constructor(parm: { (): Base[]; } = () => [d1, d2]) { } } -class x89 { constructor(parm: { (): Base[]; } = function() { return [d1, d2] }) { } } -class x90 { constructor(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } -class x91 { constructor(parm: Base[] = [d1, d2]) { } } -class x92 { constructor(parm: Array = [d1, d2]) { } } -class x93 { constructor(parm: { [n: number]: Base; } = [d1, d2]) { } } -class x94 { constructor(parm: {n: Base[]; } = { n: [d1, d2] }) { } } -class x95 { constructor(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } -class x96 { constructor(parm: Genric = { func: n => { return [d1, d2]; } }) { } } -class x97 { constructor(public parm: () => Base[] = () => [d1, d2]) { } } -class x98 { constructor(public parm: () => Base[] = function() { return [d1, d2] }) { } } -class x99 { constructor(public parm: () => Base[] = function named() { return [d1, d2] }) { } } -class x100 { constructor(public parm: { (): Base[]; } = () => [d1, d2]) { } } -class x101 { constructor(public parm: { (): Base[]; } = function() { return [d1, d2] }) { } } -class x102 { constructor(public parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } -class x103 { constructor(public parm: Base[] = [d1, d2]) { } } -class x104 { constructor(public parm: Array = [d1, d2]) { } } -class x105 { constructor(public parm: { [n: number]: Base; } = [d1, d2]) { } } -class x106 { constructor(public parm: {n: Base[]; } = { n: [d1, d2] }) { } } -class x107 { constructor(public parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } -class x108 { constructor(public parm: Genric = { func: n => { return [d1, d2]; } }) { } } -class x109 { constructor(private parm: () => Base[] = () => [d1, d2]) { } } -class x110 { constructor(private parm: () => Base[] = function() { return [d1, d2] }) { } } -class x111 { constructor(private parm: () => Base[] = function named() { return [d1, d2] }) { } } -class x112 { constructor(private parm: { (): Base[]; } = () => [d1, d2]) { } } -class x113 { constructor(private parm: { (): Base[]; } = function() { return [d1, d2] }) { } } -class x114 { constructor(private parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } -class x115 { constructor(private parm: Base[] = [d1, d2]) { } } -class x116 { constructor(private parm: Array = [d1, d2]) { } } -class x117 { constructor(private parm: { [n: number]: Base; } = [d1, d2]) { } } -class x118 { constructor(private parm: {n: Base[]; } = { n: [d1, d2] }) { } } -class x119 { constructor(private parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } -class x120 { constructor(private parm: Genric = { func: n => { return [d1, d2]; } }) { } } -function x121(parm: () => Base[] = () => [d1, d2]) { } -function x122(parm: () => Base[] = function() { return [d1, d2] }) { } -function x123(parm: () => Base[] = function named() { return [d1, d2] }) { } -function x124(parm: { (): Base[]; } = () => [d1, d2]) { } -function x125(parm: { (): Base[]; } = function() { return [d1, d2] }) { } -function x126(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } -function x127(parm: Base[] = [d1, d2]) { } -function x128(parm: Array = [d1, d2]) { } -function x129(parm: { [n: number]: Base; } = [d1, d2]) { } -function x130(parm: {n: Base[]; } = { n: [d1, d2] }) { } -function x131(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } -function x132(parm: Genric = { func: n => { return [d1, d2]; } }) { } -function x133(): () => Base[] { return () => [d1, d2]; } -function x134(): () => Base[] { return function() { return [d1, d2] }; } -function x135(): () => Base[] { return function named() { return [d1, d2] }; } -function x136(): { (): Base[]; } { return () => [d1, d2]; } -function x137(): { (): Base[]; } { return function() { return [d1, d2] }; } -function x138(): { (): Base[]; } { return function named() { return [d1, d2] }; } -function x139(): Base[] { return [d1, d2]; } -function x140(): Array { return [d1, d2]; } -function x141(): { [n: number]: Base; } { return [d1, d2]; } -function x142(): {n: Base[]; } { return { n: [d1, d2] }; } -function x143(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; } -function x144(): Genric { return { func: n => { return [d1, d2]; } }; } -function x145(): () => Base[] { return () => [d1, d2]; return () => [d1, d2]; } -function x146(): () => Base[] { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } -function x147(): () => Base[] { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } -function x148(): { (): Base[]; } { return () => [d1, d2]; return () => [d1, d2]; } -function x149(): { (): Base[]; } { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } -function x150(): { (): Base[]; } { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } -function x151(): Base[] { return [d1, d2]; return [d1, d2]; } -function x152(): Array { return [d1, d2]; return [d1, d2]; } -function x153(): { [n: number]: Base; } { return [d1, d2]; return [d1, d2]; } -function x154(): {n: Base[]; } { return { n: [d1, d2] }; return { n: [d1, d2] }; } -function x155(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; return n => { var n: Base[]; return null; }; } -function x156(): Genric { return { func: n => { return [d1, d2]; } }; return { func: n => { return [d1, d2]; } }; } -var x157: () => () => Base[] = () => { return () => [d1, d2]; }; -var x158: () => () => Base[] = () => { return function() { return [d1, d2] }; }; -var x159: () => () => Base[] = () => { return function named() { return [d1, d2] }; }; -var x160: () => { (): Base[]; } = () => { return () => [d1, d2]; }; -var x161: () => { (): Base[]; } = () => { return function() { return [d1, d2] }; }; -var x162: () => { (): Base[]; } = () => { return function named() { return [d1, d2] }; }; -var x163: () => Base[] = () => { return [d1, d2]; }; -var x164: () => Array = () => { return [d1, d2]; }; -var x165: () => { [n: number]: Base; } = () => { return [d1, d2]; }; -var x166: () => {n: Base[]; } = () => { return { n: [d1, d2] }; }; -var x167: () => (s: Base[]) => any = () => { return n => { var n: Base[]; return null; }; }; -var x168: () => Genric = () => { return { func: n => { return [d1, d2]; } }; }; -var x169: () => () => Base[] = function() { return () => [d1, d2]; }; -var x170: () => () => Base[] = function() { return function() { return [d1, d2] }; }; -var x171: () => () => Base[] = function() { return function named() { return [d1, d2] }; }; -var x172: () => { (): Base[]; } = function() { return () => [d1, d2]; }; -var x173: () => { (): Base[]; } = function() { return function() { return [d1, d2] }; }; -var x174: () => { (): Base[]; } = function() { return function named() { return [d1, d2] }; }; -var x175: () => Base[] = function() { return [d1, d2]; }; -var x176: () => Array = function() { return [d1, d2]; }; -var x177: () => { [n: number]: Base; } = function() { return [d1, d2]; }; -var x178: () => {n: Base[]; } = function() { return { n: [d1, d2] }; }; -var x179: () => (s: Base[]) => any = function() { return n => { var n: Base[]; return null; }; }; -var x180: () => Genric = function() { return { func: n => { return [d1, d2]; } }; }; -module x181 { var t: () => Base[] = () => [d1, d2]; } -module x182 { var t: () => Base[] = function() { return [d1, d2] }; } -module x183 { var t: () => Base[] = function named() { return [d1, d2] }; } -module x184 { var t: { (): Base[]; } = () => [d1, d2]; } -module x185 { var t: { (): Base[]; } = function() { return [d1, d2] }; } -module x186 { var t: { (): Base[]; } = function named() { return [d1, d2] }; } -module x187 { var t: Base[] = [d1, d2]; } -module x188 { var t: Array = [d1, d2]; } -module x189 { var t: { [n: number]: Base; } = [d1, d2]; } -module x190 { var t: {n: Base[]; } = { n: [d1, d2] }; } -module x191 { var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } -module x192 { var t: Genric = { func: n => { return [d1, d2]; } }; } -module x193 { export var t: () => Base[] = () => [d1, d2]; } -module x194 { export var t: () => Base[] = function() { return [d1, d2] }; } -module x195 { export var t: () => Base[] = function named() { return [d1, d2] }; } -module x196 { export var t: { (): Base[]; } = () => [d1, d2]; } -module x197 { export var t: { (): Base[]; } = function() { return [d1, d2] }; } -module x198 { export var t: { (): Base[]; } = function named() { return [d1, d2] }; } -module x199 { export var t: Base[] = [d1, d2]; } -module x200 { export var t: Array = [d1, d2]; } -module x201 { export var t: { [n: number]: Base; } = [d1, d2]; } -module x202 { export var t: {n: Base[]; } = { n: [d1, d2] }; } -module x203 { export var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } -module x204 { export var t: Genric = { func: n => { return [d1, d2]; } }; } -var x206 = <() => Base[]>function() { return [d1, d2] }; -var x207 = <() => Base[]>function named() { return [d1, d2] }; -var x209 = <{ (): Base[]; }>function() { return [d1, d2] }; -var x210 = <{ (): Base[]; }>function named() { return [d1, d2] }; -var x211 = [d1, d2]; -var x212 = >[d1, d2]; -var x213 = <{ [n: number]: Base; }>[d1, d2]; -var x214 = <{n: Base[]; } >{ n: [d1, d2] }; -var x216 = >{ func: n => { return [d1, d2]; } }; -var x217 = (<() => Base[]>undefined) || function() { return [d1, d2] }; -var x218 = (<() => Base[]>undefined) || function named() { return [d1, d2] }; -var x219 = (<{ (): Base[]; }>undefined) || function() { return [d1, d2] }; -var x220 = (<{ (): Base[]; }>undefined) || function named() { return [d1, d2] }; -var x221 = (undefined) || [d1, d2]; -var x222 = (>undefined) || [d1, d2]; -var x223 = (<{ [n: number]: Base; }>undefined) || [d1, d2]; -var x224 = (<{n: Base[]; } >undefined) || { n: [d1, d2] }; -var x225: () => Base[]; x225 = () => [d1, d2]; -var x226: () => Base[]; x226 = function() { return [d1, d2] }; -var x227: () => Base[]; x227 = function named() { return [d1, d2] }; -var x228: { (): Base[]; }; x228 = () => [d1, d2]; -var x229: { (): Base[]; }; x229 = function() { return [d1, d2] }; -var x230: { (): Base[]; }; x230 = function named() { return [d1, d2] }; -var x231: Base[]; x231 = [d1, d2]; -var x232: Array; x232 = [d1, d2]; -var x233: { [n: number]: Base; }; x233 = [d1, d2]; -var x234: {n: Base[]; } ; x234 = { n: [d1, d2] }; -var x235: (s: Base[]) => any; x235 = n => { var n: Base[]; return null; }; -var x236: Genric; x236 = { func: n => { return [d1, d2]; } }; -var x237: { n: () => Base[]; } = { n: () => [d1, d2] }; -var x238: { n: () => Base[]; } = { n: function() { return [d1, d2] } }; -var x239: { n: () => Base[]; } = { n: function named() { return [d1, d2] } }; -var x240: { n: { (): Base[]; }; } = { n: () => [d1, d2] }; -var x241: { n: { (): Base[]; }; } = { n: function() { return [d1, d2] } }; -var x242: { n: { (): Base[]; }; } = { n: function named() { return [d1, d2] } }; -var x243: { n: Base[]; } = { n: [d1, d2] }; -var x244: { n: Array; } = { n: [d1, d2] }; -var x245: { n: { [n: number]: Base; }; } = { n: [d1, d2] }; -var x246: { n: {n: Base[]; } ; } = { n: { n: [d1, d2] } }; -var x247: { n: (s: Base[]) => any; } = { n: n => { var n: Base[]; return null; } }; -var x248: { n: Genric; } = { n: { func: n => { return [d1, d2]; } } }; -var x252: { (): Base[]; }[] = [() => [d1, d2]]; -var x253: { (): Base[]; }[] = [function() { return [d1, d2] }]; -var x254: { (): Base[]; }[] = [function named() { return [d1, d2] }]; -var x255: Base[][] = [[d1, d2]]; -var x256: Array[] = [[d1, d2]]; -var x257: { [n: number]: Base; }[] = [[d1, d2]]; -var x258: {n: Base[]; } [] = [{ n: [d1, d2] }]; -var x260: Genric[] = [{ func: n => { return [d1, d2]; } }]; -var x261: () => Base[] = function() { return [d1, d2] } || undefined; -var x262: () => Base[] = function named() { return [d1, d2] } || undefined; -var x263: { (): Base[]; } = function() { return [d1, d2] } || undefined; -var x264: { (): Base[]; } = function named() { return [d1, d2] } || undefined; -var x265: Base[] = [d1, d2] || undefined; -var x266: Array = [d1, d2] || undefined; -var x267: { [n: number]: Base; } = [d1, d2] || undefined; -var x268: {n: Base[]; } = { n: [d1, d2] } || undefined; -var x269: () => Base[] = undefined || function() { return [d1, d2] }; -var x270: () => Base[] = undefined || function named() { return [d1, d2] }; -var x271: { (): Base[]; } = undefined || function() { return [d1, d2] }; -var x272: { (): Base[]; } = undefined || function named() { return [d1, d2] }; -var x273: Base[] = undefined || [d1, d2]; -var x274: Array = undefined || [d1, d2]; -var x275: { [n: number]: Base; } = undefined || [d1, d2]; -var x276: {n: Base[]; } = undefined || { n: [d1, d2] }; -var x277: () => Base[] = function() { return [d1, d2] } || function() { return [d1, d2] }; -var x278: () => Base[] = function named() { return [d1, d2] } || function named() { return [d1, d2] }; -var x279: { (): Base[]; } = function() { return [d1, d2] } || function() { return [d1, d2] }; -var x280: { (): Base[]; } = function named() { return [d1, d2] } || function named() { return [d1, d2] }; -var x281: Base[] = [d1, d2] || [d1, d2]; -var x282: Array = [d1, d2] || [d1, d2]; -var x283: { [n: number]: Base; } = [d1, d2] || [d1, d2]; -var x284: {n: Base[]; } = { n: [d1, d2] } || { n: [d1, d2] }; -var x285: () => Base[] = true ? () => [d1, d2] : () => [d1, d2]; -var x286: () => Base[] = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; -var x287: () => Base[] = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; -var x288: { (): Base[]; } = true ? () => [d1, d2] : () => [d1, d2]; -var x289: { (): Base[]; } = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; -var x290: { (): Base[]; } = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; -var x291: Base[] = true ? [d1, d2] : [d1, d2]; -var x292: Array = true ? [d1, d2] : [d1, d2]; -var x293: { [n: number]: Base; } = true ? [d1, d2] : [d1, d2]; -var x294: {n: Base[]; } = true ? { n: [d1, d2] } : { n: [d1, d2] }; -var x295: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : n => { var n: Base[]; return null; }; -var x296: Genric = true ? { func: n => { return [d1, d2]; } } : { func: n => { return [d1, d2]; } }; -var x297: () => Base[] = true ? undefined : () => [d1, d2]; -var x298: () => Base[] = true ? undefined : function() { return [d1, d2] }; -var x299: () => Base[] = true ? undefined : function named() { return [d1, d2] }; -var x300: { (): Base[]; } = true ? undefined : () => [d1, d2]; -var x301: { (): Base[]; } = true ? undefined : function() { return [d1, d2] }; -var x302: { (): Base[]; } = true ? undefined : function named() { return [d1, d2] }; -var x303: Base[] = true ? undefined : [d1, d2]; -var x304: Array = true ? undefined : [d1, d2]; -var x305: { [n: number]: Base; } = true ? undefined : [d1, d2]; -var x306: {n: Base[]; } = true ? undefined : { n: [d1, d2] }; -var x307: (s: Base[]) => any = true ? undefined : n => { var n: Base[]; return null; }; -var x308: Genric = true ? undefined : { func: n => { return [d1, d2]; } }; -var x309: () => Base[] = true ? () => [d1, d2] : undefined; -var x310: () => Base[] = true ? function() { return [d1, d2] } : undefined; -var x311: () => Base[] = true ? function named() { return [d1, d2] } : undefined; -var x312: { (): Base[]; } = true ? () => [d1, d2] : undefined; -var x313: { (): Base[]; } = true ? function() { return [d1, d2] } : undefined; -var x314: { (): Base[]; } = true ? function named() { return [d1, d2] } : undefined; -var x315: Base[] = true ? [d1, d2] : undefined; -var x316: Array = true ? [d1, d2] : undefined; -var x317: { [n: number]: Base; } = true ? [d1, d2] : undefined; -var x318: {n: Base[]; } = true ? { n: [d1, d2] } : undefined; -var x319: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : undefined; -var x320: Genric = true ? { func: n => { return [d1, d2]; } } : undefined; -function x321(n: () => Base[]) { }; x321(() => [d1, d2]); -function x322(n: () => Base[]) { }; x322(function() { return [d1, d2] }); -function x323(n: () => Base[]) { }; x323(function named() { return [d1, d2] }); -function x324(n: { (): Base[]; }) { }; x324(() => [d1, d2]); -function x325(n: { (): Base[]; }) { }; x325(function() { return [d1, d2] }); -function x326(n: { (): Base[]; }) { }; x326(function named() { return [d1, d2] }); -function x327(n: Base[]) { }; x327([d1, d2]); -function x328(n: Array) { }; x328([d1, d2]); -function x329(n: { [n: number]: Base; }) { }; x329([d1, d2]); -function x330(n: {n: Base[]; } ) { }; x330({ n: [d1, d2] }); -function x331(n: (s: Base[]) => any) { }; x331(n => { var n: Base[]; return null; }); -function x332(n: Genric) { }; x332({ func: n => { return [d1, d2]; } }); -var x333 = (n: () => Base[]) => n; x333(() => [d1, d2]); -var x334 = (n: () => Base[]) => n; x334(function() { return [d1, d2] }); -var x335 = (n: () => Base[]) => n; x335(function named() { return [d1, d2] }); -var x336 = (n: { (): Base[]; }) => n; x336(() => [d1, d2]); -var x337 = (n: { (): Base[]; }) => n; x337(function() { return [d1, d2] }); -var x338 = (n: { (): Base[]; }) => n; x338(function named() { return [d1, d2] }); -var x339 = (n: Base[]) => n; x339([d1, d2]); -var x340 = (n: Array) => n; x340([d1, d2]); -var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); -var x342 = (n: {n: Base[]; } ) => n; x342({ n: [d1, d2] }); -var x343 = (n: (s: Base[]) => any) => n; x343(n => { var n: Base[]; return null; }); -var x344 = (n: Genric) => n; x344({ func: n => { return [d1, d2]; } }); -var x345 = function(n: () => Base[]) { }; x345(() => [d1, d2]); -var x346 = function(n: () => Base[]) { }; x346(function() { return [d1, d2] }); -var x347 = function(n: () => Base[]) { }; x347(function named() { return [d1, d2] }); -var x348 = function(n: { (): Base[]; }) { }; x348(() => [d1, d2]); -var x349 = function(n: { (): Base[]; }) { }; x349(function() { return [d1, d2] }); -var x350 = function(n: { (): Base[]; }) { }; x350(function named() { return [d1, d2] }); -var x351 = function(n: Base[]) { }; x351([d1, d2]); -var x352 = function(n: Array) { }; x352([d1, d2]); -var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); -var x354 = function(n: {n: Base[]; } ) { }; x354({ n: [d1, d2] }); -var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; return null; }); -var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); - -/// [Declarations] //// - - - -//// [generatedContextualTyping.d.ts] -declare class Base { - private p; -} -declare class Derived1 extends Base { - private m; -} -declare class Derived2 extends Base { - private n; -} -interface Genric { - func(n: T[]): any; -} -declare var b: invalid, d1: invalid, d2: invalid; -declare var x1: () => Base[]; -declare var x2: () => Base[]; -declare var x3: () => Base[]; -declare var x4: { - (): Base[]; -}; -declare var x5: { - (): Base[]; -}; -declare var x6: { - (): Base[]; -}; -declare var x7: Base[]; -declare var x8: Array; -declare var x9: { - [n: number]: Base; -}; -declare var x10: { - n: Base[]; -}; -declare var x11: (s: Base[]) => any; -declare var x12: Genric; -declare class x13 { - member: () => Base[]; -} -declare class x14 { - member: () => Base[]; -} -declare class x15 { - member: () => Base[]; -} -declare class x16 { - member: { - (): Base[]; - }; -} -declare class x17 { - member: { - (): Base[]; - }; -} -declare class x18 { - member: { - (): Base[]; - }; -} -declare class x19 { - member: Base[]; -} -declare class x20 { - member: Array; -} -declare class x21 { - member: { - [n: number]: Base; - }; -} -declare class x22 { - member: { - n: Base[]; - }; -} -declare class x23 { - member: (s: Base[]) => any; -} -declare class x24 { - member: Genric; -} -declare class x25 { - private member; -} -declare class x26 { - private member; -} -declare class x27 { - private member; -} -declare class x28 { - private member; -} -declare class x29 { - private member; -} -declare class x30 { - private member; -} -declare class x31 { - private member; -} -declare class x32 { - private member; -} -declare class x33 { - private member; -} -declare class x34 { - private member; -} -declare class x35 { - private member; -} -declare class x36 { - private member; -} -declare class x37 { - member: () => Base[]; -} -declare class x38 { - member: () => Base[]; -} -declare class x39 { - member: () => Base[]; -} -declare class x40 { - member: { - (): Base[]; - }; -} -declare class x41 { - member: { - (): Base[]; - }; -} -declare class x42 { - member: { - (): Base[]; - }; -} -declare class x43 { - member: Base[]; -} -declare class x44 { - member: Array; -} -declare class x45 { - member: { - [n: number]: Base; - }; -} -declare class x46 { - member: { - n: Base[]; - }; -} -declare class x47 { - member: (s: Base[]) => any; -} -declare class x48 { - member: Genric; -} -declare class x49 { - static member: () => Base[]; -} -declare class x50 { - static member: () => Base[]; -} -declare class x51 { - static member: () => Base[]; -} -declare class x52 { - static member: { - (): Base[]; - }; -} -declare class x53 { - static member: { - (): Base[]; - }; -} -declare class x54 { - static member: { - (): Base[]; - }; -} -declare class x55 { - static member: Base[]; -} -declare class x56 { - static member: Array; -} -declare class x57 { - static member: { - [n: number]: Base; - }; -} -declare class x58 { - static member: { - n: Base[]; - }; -} -declare class x59 { - static member: (s: Base[]) => any; -} -declare class x60 { - static member: Genric; -} -declare class x61 { - private static member; -} -declare class x62 { - private static member; -} -declare class x63 { - private static member; -} -declare class x64 { - private static member; -} -declare class x65 { - private static member; -} -declare class x66 { - private static member; -} -declare class x67 { - private static member; -} -declare class x68 { - private static member; -} -declare class x69 { - private static member; -} -declare class x70 { - private static member; -} -declare class x71 { - private static member; -} -declare class x72 { - private static member; -} -declare class x73 { - static member: () => Base[]; -} -declare class x74 { - static member: () => Base[]; -} -declare class x75 { - static member: () => Base[]; -} -declare class x76 { - static member: { - (): Base[]; - }; -} -declare class x77 { - static member: { - (): Base[]; - }; -} -declare class x78 { - static member: { - (): Base[]; - }; -} -declare class x79 { - static member: Base[]; -} -declare class x80 { - static member: Array; -} -declare class x81 { - static member: { - [n: number]: Base; - }; -} -declare class x82 { - static member: { - n: Base[]; - }; -} -declare class x83 { - static member: (s: Base[]) => any; -} -declare class x84 { - static member: Genric; -} -declare class x85 { - constructor(parm?: () => Base[]); -} -declare class x86 { - constructor(parm?: () => Base[]); -} -declare class x87 { - constructor(parm?: () => Base[]); -} -declare class x88 { - constructor(parm?: { - (): Base[]; - }); -} -declare class x89 { - constructor(parm?: { - (): Base[]; - }); -} -declare class x90 { - constructor(parm?: { - (): Base[]; - }); -} -declare class x91 { - constructor(parm?: Base[]); -} -declare class x92 { - constructor(parm?: Array); -} -declare class x93 { - constructor(parm?: { - [n: number]: Base; - }); -} -declare class x94 { - constructor(parm?: { - n: Base[]; - }); -} -declare class x95 { - constructor(parm?: (s: Base[]) => any); -} -declare class x96 { - constructor(parm?: Genric); -} -declare class x97 { - parm: () => Base[]; - constructor(parm?: () => Base[]); -} -declare class x98 { - parm: () => Base[]; - constructor(parm?: () => Base[]); -} -declare class x99 { - parm: () => Base[]; - constructor(parm?: () => Base[]); -} -declare class x100 { - parm: { - (): Base[]; - }; - constructor(parm?: { - (): Base[]; - }); -} -declare class x101 { - parm: { - (): Base[]; - }; - constructor(parm?: { - (): Base[]; - }); -} -declare class x102 { - parm: { - (): Base[]; - }; - constructor(parm?: { - (): Base[]; - }); -} -declare class x103 { - parm: Base[]; - constructor(parm?: Base[]); -} -declare class x104 { - parm: Array; - constructor(parm?: Array); -} -declare class x105 { - parm: { - [n: number]: Base; - }; - constructor(parm?: { - [n: number]: Base; - }); -} -declare class x106 { - parm: { - n: Base[]; - }; - constructor(parm?: { - n: Base[]; - }); -} -declare class x107 { - parm: (s: Base[]) => any; - constructor(parm?: (s: Base[]) => any); -} -declare class x108 { - parm: Genric; - constructor(parm?: Genric); -} -declare class x109 { - private parm; - constructor(parm?: () => Base[]); -} -declare class x110 { - private parm; - constructor(parm?: () => Base[]); -} -declare class x111 { - private parm; - constructor(parm?: () => Base[]); -} -declare class x112 { - private parm; - constructor(parm?: { - (): Base[]; - }); -} -declare class x113 { - private parm; - constructor(parm?: { - (): Base[]; - }); -} -declare class x114 { - private parm; - constructor(parm?: { - (): Base[]; - }); -} -declare class x115 { - private parm; - constructor(parm?: Base[]); -} -declare class x116 { - private parm; - constructor(parm?: Array); -} -declare class x117 { - private parm; - constructor(parm?: { - [n: number]: Base; - }); -} -declare class x118 { - private parm; - constructor(parm?: { - n: Base[]; - }); -} -declare class x119 { - private parm; - constructor(parm?: (s: Base[]) => any); -} -declare class x120 { - private parm; - constructor(parm?: Genric); -} -declare function x121(parm?: () => Base[]): invalid; -declare function x122(parm?: () => Base[]): invalid; -declare function x123(parm?: () => Base[]): invalid; -declare function x124(parm?: { - (): Base[]; -}): invalid; -declare function x125(parm?: { - (): Base[]; -}): invalid; -declare function x126(parm?: { - (): Base[]; -}): invalid; -declare function x127(parm?: Base[]): invalid; -declare function x128(parm?: Array): invalid; -declare function x129(parm?: { - [n: number]: Base; -}): invalid; -declare function x130(parm?: { - n: Base[]; -}): invalid; -declare function x131(parm?: (s: Base[]) => any): invalid; -declare function x132(parm?: Genric): invalid; -declare function x133(): () => Base[]; -declare function x134(): () => Base[]; -declare function x135(): () => Base[]; -declare function x136(): { - (): Base[]; -}; -declare function x137(): { - (): Base[]; -}; -declare function x138(): { - (): Base[]; -}; -declare function x139(): Base[]; -declare function x140(): Array; -declare function x141(): { - [n: number]: Base; -}; -declare function x142(): { - n: Base[]; -}; -declare function x143(): (s: Base[]) => any; -declare function x144(): Genric; -declare function x145(): () => Base[]; -declare function x146(): () => Base[]; -declare function x147(): () => Base[]; -declare function x148(): { - (): Base[]; -}; -declare function x149(): { - (): Base[]; -}; -declare function x150(): { - (): Base[]; -}; -declare function x151(): Base[]; -declare function x152(): Array; -declare function x153(): { - [n: number]: Base; -}; -declare function x154(): { - n: Base[]; -}; -declare function x155(): (s: Base[]) => any; -declare function x156(): Genric; -declare var x157: () => () => Base[]; -declare var x158: () => () => Base[]; -declare var x159: () => () => Base[]; -declare var x160: () => { - (): Base[]; -}; -declare var x161: () => { - (): Base[]; -}; -declare var x162: () => { - (): Base[]; -}; -declare var x163: () => Base[]; -declare var x164: () => Array; -declare var x165: () => { - [n: number]: Base; -}; -declare var x166: () => { - n: Base[]; -}; -declare var x167: () => (s: Base[]) => any; -declare var x168: () => Genric; -declare var x169: () => () => Base[]; -declare var x170: () => () => Base[]; -declare var x171: () => () => Base[]; -declare var x172: () => { - (): Base[]; -}; -declare var x173: () => { - (): Base[]; -}; -declare var x174: () => { - (): Base[]; -}; -declare var x175: () => Base[]; -declare var x176: () => Array; -declare var x177: () => { - [n: number]: Base; -}; -declare var x178: () => { - n: Base[]; -}; -declare var x179: () => (s: Base[]) => any; -declare var x180: () => Genric; -declare namespace x181 { } -declare namespace x182 { } -declare namespace x183 { } -declare namespace x184 { } -declare namespace x185 { } -declare namespace x186 { } -declare namespace x187 { } -declare namespace x188 { } -declare namespace x189 { } -declare namespace x190 { } -declare namespace x191 { } -declare namespace x192 { } -declare namespace x193 { - var t: () => Base[]; -} -declare namespace x194 { - var t: () => Base[]; -} -declare namespace x195 { - var t: () => Base[]; -} -declare namespace x196 { - var t: { - (): Base[]; - }; -} -declare namespace x197 { - var t: { - (): Base[]; - }; -} -declare namespace x198 { - var t: { - (): Base[]; - }; -} -declare namespace x199 { - var t: Base[]; -} -declare namespace x200 { - var t: Array; -} -declare namespace x201 { - var t: { - [n: number]: Base; - }; -} -declare namespace x202 { - var t: { - n: Base[]; - }; -} -declare namespace x203 { - var t: (s: Base[]) => any; -} -declare namespace x204 { - var t: Genric; -} -declare var x206: () => Base[]; -declare var x207: () => Base[]; -declare var x209: { - (): Base[]; -}; -declare var x210: { - (): Base[]; -}; -declare var x211: Base[]; -declare var x212: Array; -declare var x213: { - [n: number]: Base; -}; -declare var x214: { - n: Base[]; -}; -declare var x216: Genric; -declare var x217: invalid; -declare var x218: invalid; -declare var x219: invalid; -declare var x220: invalid; -declare var x221: invalid; -declare var x222: invalid; -declare var x223: invalid; -declare var x224: invalid; -declare var x225: () => Base[]; -declare var x226: () => Base[]; -declare var x227: () => Base[]; -declare var x228: { - (): Base[]; -}; -declare var x229: { - (): Base[]; -}; -declare var x230: { - (): Base[]; -}; -declare var x231: Base[]; -declare var x232: Array; -declare var x233: { - [n: number]: Base; -}; -declare var x234: { - n: Base[]; -}; -declare var x235: (s: Base[]) => any; -declare var x236: Genric; -declare var x237: { - n: () => Base[]; -}; -declare var x238: { - n: () => Base[]; -}; -declare var x239: { - n: () => Base[]; -}; -declare var x240: { - n: { - (): Base[]; - }; -}; -declare var x241: { - n: { - (): Base[]; - }; -}; -declare var x242: { - n: { - (): Base[]; - }; -}; -declare var x243: { - n: Base[]; -}; -declare var x244: { - n: Array; -}; -declare var x245: { - n: { - [n: number]: Base; - }; -}; -declare var x246: { - n: { - n: Base[]; - }; -}; -declare var x247: { - n: (s: Base[]) => any; -}; -declare var x248: { - n: Genric; -}; -declare var x252: { - (): Base[]; -}[]; -declare var x253: { - (): Base[]; -}[]; -declare var x254: { - (): Base[]; -}[]; -declare var x255: Base[][]; -declare var x256: Array[]; -declare var x257: { - [n: number]: Base; -}[]; -declare var x258: { - n: Base[]; -}[]; -declare var x260: Genric[]; -declare var x261: () => Base[]; -declare var x262: () => Base[]; -declare var x263: { - (): Base[]; -}; -declare var x264: { - (): Base[]; -}; -declare var x265: Base[]; -declare var x266: Array; -declare var x267: { - [n: number]: Base; -}; -declare var x268: { - n: Base[]; -}; -declare var x269: () => Base[]; -declare var x270: () => Base[]; -declare var x271: { - (): Base[]; -}; -declare var x272: { - (): Base[]; -}; -declare var x273: Base[]; -declare var x274: Array; -declare var x275: { - [n: number]: Base; -}; -declare var x276: { - n: Base[]; -}; -declare var x277: () => Base[]; -declare var x278: () => Base[]; -declare var x279: { - (): Base[]; -}; -declare var x280: { - (): Base[]; -}; -declare var x281: Base[]; -declare var x282: Array; -declare var x283: { - [n: number]: Base; -}; -declare var x284: { - n: Base[]; -}; -declare var x285: () => Base[]; -declare var x286: () => Base[]; -declare var x287: () => Base[]; -declare var x288: { - (): Base[]; -}; -declare var x289: { - (): Base[]; -}; -declare var x290: { - (): Base[]; -}; -declare var x291: Base[]; -declare var x292: Array; -declare var x293: { - [n: number]: Base; -}; -declare var x294: { - n: Base[]; -}; -declare var x295: (s: Base[]) => any; -declare var x296: Genric; -declare var x297: () => Base[]; -declare var x298: () => Base[]; -declare var x299: () => Base[]; -declare var x300: { - (): Base[]; -}; -declare var x301: { - (): Base[]; -}; -declare var x302: { - (): Base[]; -}; -declare var x303: Base[]; -declare var x304: Array; -declare var x305: { - [n: number]: Base; -}; -declare var x306: { - n: Base[]; -}; -declare var x307: (s: Base[]) => any; -declare var x308: Genric; -declare var x309: () => Base[]; -declare var x310: () => Base[]; -declare var x311: () => Base[]; -declare var x312: { - (): Base[]; -}; -declare var x313: { - (): Base[]; -}; -declare var x314: { - (): Base[]; -}; -declare var x315: Base[]; -declare var x316: Array; -declare var x317: { - [n: number]: Base; -}; -declare var x318: { - n: Base[]; -}; -declare var x319: (s: Base[]) => any; -declare var x320: Genric; -declare function x321(n: () => Base[]): invalid; -declare function x322(n: () => Base[]): invalid; -declare function x323(n: () => Base[]): invalid; -declare function x324(n: { - (): Base[]; -}): invalid; -declare function x325(n: { - (): Base[]; -}): invalid; -declare function x326(n: { - (): Base[]; -}): invalid; -declare function x327(n: Base[]): invalid; -declare function x328(n: Array): invalid; -declare function x329(n: { - [n: number]: Base; -}): invalid; -declare function x330(n: { - n: Base[]; -}): invalid; -declare function x331(n: (s: Base[]) => any): invalid; -declare function x332(n: Genric): invalid; -declare var x333: (n: () => Base[]) => invalid; -declare var x334: (n: () => Base[]) => invalid; -declare var x335: (n: () => Base[]) => invalid; -declare var x336: (n: { - (): Base[]; -}) => invalid; -declare var x337: (n: { - (): Base[]; -}) => invalid; -declare var x338: (n: { - (): Base[]; -}) => invalid; -declare var x339: (n: Base[]) => invalid; -declare var x340: (n: Array) => invalid; -declare var x341: (n: { - [n: number]: Base; -}) => invalid; -declare var x342: (n: { - n: Base[]; -}) => invalid; -declare var x343: (n: (s: Base[]) => any) => invalid; -declare var x344: (n: Genric) => invalid; -declare var x345: (n: () => Base[]) => invalid; -declare var x346: (n: () => Base[]) => invalid; -declare var x347: (n: () => Base[]) => invalid; -declare var x348: (n: { - (): Base[]; -}) => invalid; -declare var x349: (n: { - (): Base[]; -}) => invalid; -declare var x350: (n: { - (): Base[]; -}) => invalid; -declare var x351: (n: Base[]) => invalid; -declare var x352: (n: Array) => invalid; -declare var x353: (n: { - [n: number]: Base; -}) => invalid; -declare var x354: (n: { - n: Base[]; -}) => invalid; -declare var x355: (n: (s: Base[]) => any) => invalid; -declare var x356: (n: Genric) => invalid; - -/// [Errors] //// - -generatedContextualTyping.ts(5,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(5,26): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(5,47): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(126,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(127,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(128,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(129,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(130,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(131,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(132,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(133,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(134,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(135,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(136,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(137,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(219,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(220,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(221,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(222,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(223,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(224,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(225,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(226,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(319,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(320,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(321,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(322,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(323,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(324,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(325,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(326,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(327,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(328,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(329,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(330,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(331,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(332,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(333,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(334,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(335,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(336,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(337,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(338,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(339,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(340,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(341,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(342,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(343,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(344,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(345,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(346,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(347,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(348,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(349,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(350,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(351,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(352,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(353,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(354,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. - - -==== generatedContextualTyping.ts (59 errors) ==== - class Base { private p; } - class Derived1 extends Base { private m; } - class Derived2 extends Base { private n; } - interface Genric { func(n: T[]); } - var b = new Base(), d1 = new Derived1(), d2 = new Derived2(); - ~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:5:5: Add a type annotation to the variable b. - ~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:5:21: Add a type annotation to the variable d1. - ~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:5:42: Add a type annotation to the variable d2. - var x1: () => Base[] = () => [d1, d2]; - var x2: () => Base[] = function() { return [d1, d2] }; - var x3: () => Base[] = function named() { return [d1, d2] }; - var x4: { (): Base[]; } = () => [d1, d2]; - var x5: { (): Base[]; } = function() { return [d1, d2] }; - var x6: { (): Base[]; } = function named() { return [d1, d2] }; - var x7: Base[] = [d1, d2]; - var x8: Array = [d1, d2]; - var x9: { [n: number]: Base; } = [d1, d2]; - var x10: {n: Base[]; } = { n: [d1, d2] }; - var x11: (s: Base[]) => any = n => { var n: Base[]; return null; }; - var x12: Genric = { func: n => { return [d1, d2]; } }; - class x13 { member: () => Base[] = () => [d1, d2] } - class x14 { member: () => Base[] = function() { return [d1, d2] } } - class x15 { member: () => Base[] = function named() { return [d1, d2] } } - class x16 { member: { (): Base[]; } = () => [d1, d2] } - class x17 { member: { (): Base[]; } = function() { return [d1, d2] } } - class x18 { member: { (): Base[]; } = function named() { return [d1, d2] } } - class x19 { member: Base[] = [d1, d2] } - class x20 { member: Array = [d1, d2] } - class x21 { member: { [n: number]: Base; } = [d1, d2] } - class x22 { member: {n: Base[]; } = { n: [d1, d2] } } - class x23 { member: (s: Base[]) => any = n => { var n: Base[]; return null; } } - class x24 { member: Genric = { func: n => { return [d1, d2]; } } } - class x25 { private member: () => Base[] = () => [d1, d2] } - class x26 { private member: () => Base[] = function() { return [d1, d2] } } - class x27 { private member: () => Base[] = function named() { return [d1, d2] } } - class x28 { private member: { (): Base[]; } = () => [d1, d2] } - class x29 { private member: { (): Base[]; } = function() { return [d1, d2] } } - class x30 { private member: { (): Base[]; } = function named() { return [d1, d2] } } - class x31 { private member: Base[] = [d1, d2] } - class x32 { private member: Array = [d1, d2] } - class x33 { private member: { [n: number]: Base; } = [d1, d2] } - class x34 { private member: {n: Base[]; } = { n: [d1, d2] } } - class x35 { private member: (s: Base[]) => any = n => { var n: Base[]; return null; } } - class x36 { private member: Genric = { func: n => { return [d1, d2]; } } } - class x37 { public member: () => Base[] = () => [d1, d2] } - class x38 { public member: () => Base[] = function() { return [d1, d2] } } - class x39 { public member: () => Base[] = function named() { return [d1, d2] } } - class x40 { public member: { (): Base[]; } = () => [d1, d2] } - class x41 { public member: { (): Base[]; } = function() { return [d1, d2] } } - class x42 { public member: { (): Base[]; } = function named() { return [d1, d2] } } - class x43 { public member: Base[] = [d1, d2] } - class x44 { public member: Array = [d1, d2] } - class x45 { public member: { [n: number]: Base; } = [d1, d2] } - class x46 { public member: {n: Base[]; } = { n: [d1, d2] } } - class x47 { public member: (s: Base[]) => any = n => { var n: Base[]; return null; } } - class x48 { public member: Genric = { func: n => { return [d1, d2]; } } } - class x49 { static member: () => Base[] = () => [d1, d2] } - class x50 { static member: () => Base[] = function() { return [d1, d2] } } - class x51 { static member: () => Base[] = function named() { return [d1, d2] } } - class x52 { static member: { (): Base[]; } = () => [d1, d2] } - class x53 { static member: { (): Base[]; } = function() { return [d1, d2] } } - class x54 { static member: { (): Base[]; } = function named() { return [d1, d2] } } - class x55 { static member: Base[] = [d1, d2] } - class x56 { static member: Array = [d1, d2] } - class x57 { static member: { [n: number]: Base; } = [d1, d2] } - class x58 { static member: {n: Base[]; } = { n: [d1, d2] } } - class x59 { static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } - class x60 { static member: Genric = { func: n => { return [d1, d2]; } } } - class x61 { private static member: () => Base[] = () => [d1, d2] } - class x62 { private static member: () => Base[] = function() { return [d1, d2] } } - class x63 { private static member: () => Base[] = function named() { return [d1, d2] } } - class x64 { private static member: { (): Base[]; } = () => [d1, d2] } - class x65 { private static member: { (): Base[]; } = function() { return [d1, d2] } } - class x66 { private static member: { (): Base[]; } = function named() { return [d1, d2] } } - class x67 { private static member: Base[] = [d1, d2] } - class x68 { private static member: Array = [d1, d2] } - class x69 { private static member: { [n: number]: Base; } = [d1, d2] } - class x70 { private static member: {n: Base[]; } = { n: [d1, d2] } } - class x71 { private static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } - class x72 { private static member: Genric = { func: n => { return [d1, d2]; } } } - class x73 { public static member: () => Base[] = () => [d1, d2] } - class x74 { public static member: () => Base[] = function() { return [d1, d2] } } - class x75 { public static member: () => Base[] = function named() { return [d1, d2] } } - class x76 { public static member: { (): Base[]; } = () => [d1, d2] } - class x77 { public static member: { (): Base[]; } = function() { return [d1, d2] } } - class x78 { public static member: { (): Base[]; } = function named() { return [d1, d2] } } - class x79 { public static member: Base[] = [d1, d2] } - class x80 { public static member: Array = [d1, d2] } - class x81 { public static member: { [n: number]: Base; } = [d1, d2] } - class x82 { public static member: {n: Base[]; } = { n: [d1, d2] } } - class x83 { public static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } - class x84 { public static member: Genric = { func: n => { return [d1, d2]; } } } - class x85 { constructor(parm: () => Base[] = () => [d1, d2]) { } } - class x86 { constructor(parm: () => Base[] = function() { return [d1, d2] }) { } } - class x87 { constructor(parm: () => Base[] = function named() { return [d1, d2] }) { } } - class x88 { constructor(parm: { (): Base[]; } = () => [d1, d2]) { } } - class x89 { constructor(parm: { (): Base[]; } = function() { return [d1, d2] }) { } } - class x90 { constructor(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } - class x91 { constructor(parm: Base[] = [d1, d2]) { } } - class x92 { constructor(parm: Array = [d1, d2]) { } } - class x93 { constructor(parm: { [n: number]: Base; } = [d1, d2]) { } } - class x94 { constructor(parm: {n: Base[]; } = { n: [d1, d2] }) { } } - class x95 { constructor(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } - class x96 { constructor(parm: Genric = { func: n => { return [d1, d2]; } }) { } } - class x97 { constructor(public parm: () => Base[] = () => [d1, d2]) { } } - class x98 { constructor(public parm: () => Base[] = function() { return [d1, d2] }) { } } - class x99 { constructor(public parm: () => Base[] = function named() { return [d1, d2] }) { } } - class x100 { constructor(public parm: { (): Base[]; } = () => [d1, d2]) { } } - class x101 { constructor(public parm: { (): Base[]; } = function() { return [d1, d2] }) { } } - class x102 { constructor(public parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } - class x103 { constructor(public parm: Base[] = [d1, d2]) { } } - class x104 { constructor(public parm: Array = [d1, d2]) { } } - class x105 { constructor(public parm: { [n: number]: Base; } = [d1, d2]) { } } - class x106 { constructor(public parm: {n: Base[]; } = { n: [d1, d2] }) { } } - class x107 { constructor(public parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } - class x108 { constructor(public parm: Genric = { func: n => { return [d1, d2]; } }) { } } - class x109 { constructor(private parm: () => Base[] = () => [d1, d2]) { } } - class x110 { constructor(private parm: () => Base[] = function() { return [d1, d2] }) { } } - class x111 { constructor(private parm: () => Base[] = function named() { return [d1, d2] }) { } } - class x112 { constructor(private parm: { (): Base[]; } = () => [d1, d2]) { } } - class x113 { constructor(private parm: { (): Base[]; } = function() { return [d1, d2] }) { } } - class x114 { constructor(private parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } - class x115 { constructor(private parm: Base[] = [d1, d2]) { } } - class x116 { constructor(private parm: Array = [d1, d2]) { } } - class x117 { constructor(private parm: { [n: number]: Base; } = [d1, d2]) { } } - class x118 { constructor(private parm: {n: Base[]; } = { n: [d1, d2] }) { } } - class x119 { constructor(private parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } - class x120 { constructor(private parm: Genric = { func: n => { return [d1, d2]; } }) { } } - function x121(parm: () => Base[] = () => [d1, d2]) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:126:10: Add a return type to the function declaration. - function x122(parm: () => Base[] = function() { return [d1, d2] }) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:127:10: Add a return type to the function declaration. - function x123(parm: () => Base[] = function named() { return [d1, d2] }) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:128:10: Add a return type to the function declaration. - function x124(parm: { (): Base[]; } = () => [d1, d2]) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:129:10: Add a return type to the function declaration. - function x125(parm: { (): Base[]; } = function() { return [d1, d2] }) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:130:10: Add a return type to the function declaration. - function x126(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:131:10: Add a return type to the function declaration. - function x127(parm: Base[] = [d1, d2]) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:132:10: Add a return type to the function declaration. - function x128(parm: Array = [d1, d2]) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:133:10: Add a return type to the function declaration. - function x129(parm: { [n: number]: Base; } = [d1, d2]) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:134:10: Add a return type to the function declaration. - function x130(parm: {n: Base[]; } = { n: [d1, d2] }) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:135:10: Add a return type to the function declaration. - function x131(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:136:10: Add a return type to the function declaration. - function x132(parm: Genric = { func: n => { return [d1, d2]; } }) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:137:10: Add a return type to the function declaration. - function x133(): () => Base[] { return () => [d1, d2]; } - function x134(): () => Base[] { return function() { return [d1, d2] }; } - function x135(): () => Base[] { return function named() { return [d1, d2] }; } - function x136(): { (): Base[]; } { return () => [d1, d2]; } - function x137(): { (): Base[]; } { return function() { return [d1, d2] }; } - function x138(): { (): Base[]; } { return function named() { return [d1, d2] }; } - function x139(): Base[] { return [d1, d2]; } - function x140(): Array { return [d1, d2]; } - function x141(): { [n: number]: Base; } { return [d1, d2]; } - function x142(): {n: Base[]; } { return { n: [d1, d2] }; } - function x143(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; } - function x144(): Genric { return { func: n => { return [d1, d2]; } }; } - function x145(): () => Base[] { return () => [d1, d2]; return () => [d1, d2]; } - function x146(): () => Base[] { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } - function x147(): () => Base[] { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } - function x148(): { (): Base[]; } { return () => [d1, d2]; return () => [d1, d2]; } - function x149(): { (): Base[]; } { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } - function x150(): { (): Base[]; } { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } - function x151(): Base[] { return [d1, d2]; return [d1, d2]; } - function x152(): Array { return [d1, d2]; return [d1, d2]; } - function x153(): { [n: number]: Base; } { return [d1, d2]; return [d1, d2]; } - function x154(): {n: Base[]; } { return { n: [d1, d2] }; return { n: [d1, d2] }; } - function x155(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; return n => { var n: Base[]; return null; }; } - function x156(): Genric { return { func: n => { return [d1, d2]; } }; return { func: n => { return [d1, d2]; } }; } - var x157: () => () => Base[] = () => { return () => [d1, d2]; }; - var x158: () => () => Base[] = () => { return function() { return [d1, d2] }; }; - var x159: () => () => Base[] = () => { return function named() { return [d1, d2] }; }; - var x160: () => { (): Base[]; } = () => { return () => [d1, d2]; }; - var x161: () => { (): Base[]; } = () => { return function() { return [d1, d2] }; }; - var x162: () => { (): Base[]; } = () => { return function named() { return [d1, d2] }; }; - var x163: () => Base[] = () => { return [d1, d2]; }; - var x164: () => Array = () => { return [d1, d2]; }; - var x165: () => { [n: number]: Base; } = () => { return [d1, d2]; }; - var x166: () => {n: Base[]; } = () => { return { n: [d1, d2] }; }; - var x167: () => (s: Base[]) => any = () => { return n => { var n: Base[]; return null; }; }; - var x168: () => Genric = () => { return { func: n => { return [d1, d2]; } }; }; - var x169: () => () => Base[] = function() { return () => [d1, d2]; }; - var x170: () => () => Base[] = function() { return function() { return [d1, d2] }; }; - var x171: () => () => Base[] = function() { return function named() { return [d1, d2] }; }; - var x172: () => { (): Base[]; } = function() { return () => [d1, d2]; }; - var x173: () => { (): Base[]; } = function() { return function() { return [d1, d2] }; }; - var x174: () => { (): Base[]; } = function() { return function named() { return [d1, d2] }; }; - var x175: () => Base[] = function() { return [d1, d2]; }; - var x176: () => Array = function() { return [d1, d2]; }; - var x177: () => { [n: number]: Base; } = function() { return [d1, d2]; }; - var x178: () => {n: Base[]; } = function() { return { n: [d1, d2] }; }; - var x179: () => (s: Base[]) => any = function() { return n => { var n: Base[]; return null; }; }; - var x180: () => Genric = function() { return { func: n => { return [d1, d2]; } }; }; - module x181 { var t: () => Base[] = () => [d1, d2]; } - module x182 { var t: () => Base[] = function() { return [d1, d2] }; } - module x183 { var t: () => Base[] = function named() { return [d1, d2] }; } - module x184 { var t: { (): Base[]; } = () => [d1, d2]; } - module x185 { var t: { (): Base[]; } = function() { return [d1, d2] }; } - module x186 { var t: { (): Base[]; } = function named() { return [d1, d2] }; } - module x187 { var t: Base[] = [d1, d2]; } - module x188 { var t: Array = [d1, d2]; } - module x189 { var t: { [n: number]: Base; } = [d1, d2]; } - module x190 { var t: {n: Base[]; } = { n: [d1, d2] }; } - module x191 { var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } - module x192 { var t: Genric = { func: n => { return [d1, d2]; } }; } - module x193 { export var t: () => Base[] = () => [d1, d2]; } - module x194 { export var t: () => Base[] = function() { return [d1, d2] }; } - module x195 { export var t: () => Base[] = function named() { return [d1, d2] }; } - module x196 { export var t: { (): Base[]; } = () => [d1, d2]; } - module x197 { export var t: { (): Base[]; } = function() { return [d1, d2] }; } - module x198 { export var t: { (): Base[]; } = function named() { return [d1, d2] }; } - module x199 { export var t: Base[] = [d1, d2]; } - module x200 { export var t: Array = [d1, d2]; } - module x201 { export var t: { [n: number]: Base; } = [d1, d2]; } - module x202 { export var t: {n: Base[]; } = { n: [d1, d2] }; } - module x203 { export var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } - module x204 { export var t: Genric = { func: n => { return [d1, d2]; } }; } - var x206 = <() => Base[]>function() { return [d1, d2] }; - var x207 = <() => Base[]>function named() { return [d1, d2] }; - var x209 = <{ (): Base[]; }>function() { return [d1, d2] }; - var x210 = <{ (): Base[]; }>function named() { return [d1, d2] }; - var x211 = [d1, d2]; - var x212 = >[d1, d2]; - var x213 = <{ [n: number]: Base; }>[d1, d2]; - var x214 = <{n: Base[]; } >{ n: [d1, d2] }; - var x216 = >{ func: n => { return [d1, d2]; } }; - var x217 = (<() => Base[]>undefined) || function() { return [d1, d2] }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:219:5: Add a type annotation to the variable x217. - var x218 = (<() => Base[]>undefined) || function named() { return [d1, d2] }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:220:5: Add a type annotation to the variable x218. - var x219 = (<{ (): Base[]; }>undefined) || function() { return [d1, d2] }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:221:5: Add a type annotation to the variable x219. - var x220 = (<{ (): Base[]; }>undefined) || function named() { return [d1, d2] }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:222:5: Add a type annotation to the variable x220. - var x221 = (undefined) || [d1, d2]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:223:5: Add a type annotation to the variable x221. - var x222 = (>undefined) || [d1, d2]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:224:5: Add a type annotation to the variable x222. - var x223 = (<{ [n: number]: Base; }>undefined) || [d1, d2]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:225:5: Add a type annotation to the variable x223. - var x224 = (<{n: Base[]; } >undefined) || { n: [d1, d2] }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:226:5: Add a type annotation to the variable x224. - var x225: () => Base[]; x225 = () => [d1, d2]; - var x226: () => Base[]; x226 = function() { return [d1, d2] }; - var x227: () => Base[]; x227 = function named() { return [d1, d2] }; - var x228: { (): Base[]; }; x228 = () => [d1, d2]; - var x229: { (): Base[]; }; x229 = function() { return [d1, d2] }; - var x230: { (): Base[]; }; x230 = function named() { return [d1, d2] }; - var x231: Base[]; x231 = [d1, d2]; - var x232: Array; x232 = [d1, d2]; - var x233: { [n: number]: Base; }; x233 = [d1, d2]; - var x234: {n: Base[]; } ; x234 = { n: [d1, d2] }; - var x235: (s: Base[]) => any; x235 = n => { var n: Base[]; return null; }; - var x236: Genric; x236 = { func: n => { return [d1, d2]; } }; - var x237: { n: () => Base[]; } = { n: () => [d1, d2] }; - var x238: { n: () => Base[]; } = { n: function() { return [d1, d2] } }; - var x239: { n: () => Base[]; } = { n: function named() { return [d1, d2] } }; - var x240: { n: { (): Base[]; }; } = { n: () => [d1, d2] }; - var x241: { n: { (): Base[]; }; } = { n: function() { return [d1, d2] } }; - var x242: { n: { (): Base[]; }; } = { n: function named() { return [d1, d2] } }; - var x243: { n: Base[]; } = { n: [d1, d2] }; - var x244: { n: Array; } = { n: [d1, d2] }; - var x245: { n: { [n: number]: Base; }; } = { n: [d1, d2] }; - var x246: { n: {n: Base[]; } ; } = { n: { n: [d1, d2] } }; - var x247: { n: (s: Base[]) => any; } = { n: n => { var n: Base[]; return null; } }; - var x248: { n: Genric; } = { n: { func: n => { return [d1, d2]; } } }; - var x252: { (): Base[]; }[] = [() => [d1, d2]]; - var x253: { (): Base[]; }[] = [function() { return [d1, d2] }]; - var x254: { (): Base[]; }[] = [function named() { return [d1, d2] }]; - var x255: Base[][] = [[d1, d2]]; - var x256: Array[] = [[d1, d2]]; - var x257: { [n: number]: Base; }[] = [[d1, d2]]; - var x258: {n: Base[]; } [] = [{ n: [d1, d2] }]; - var x260: Genric[] = [{ func: n => { return [d1, d2]; } }]; - var x261: () => Base[] = function() { return [d1, d2] } || undefined; - var x262: () => Base[] = function named() { return [d1, d2] } || undefined; - var x263: { (): Base[]; } = function() { return [d1, d2] } || undefined; - var x264: { (): Base[]; } = function named() { return [d1, d2] } || undefined; - var x265: Base[] = [d1, d2] || undefined; - var x266: Array = [d1, d2] || undefined; - var x267: { [n: number]: Base; } = [d1, d2] || undefined; - var x268: {n: Base[]; } = { n: [d1, d2] } || undefined; - var x269: () => Base[] = undefined || function() { return [d1, d2] }; - var x270: () => Base[] = undefined || function named() { return [d1, d2] }; - var x271: { (): Base[]; } = undefined || function() { return [d1, d2] }; - var x272: { (): Base[]; } = undefined || function named() { return [d1, d2] }; - var x273: Base[] = undefined || [d1, d2]; - var x274: Array = undefined || [d1, d2]; - var x275: { [n: number]: Base; } = undefined || [d1, d2]; - var x276: {n: Base[]; } = undefined || { n: [d1, d2] }; - var x277: () => Base[] = function() { return [d1, d2] } || function() { return [d1, d2] }; - var x278: () => Base[] = function named() { return [d1, d2] } || function named() { return [d1, d2] }; - var x279: { (): Base[]; } = function() { return [d1, d2] } || function() { return [d1, d2] }; - var x280: { (): Base[]; } = function named() { return [d1, d2] } || function named() { return [d1, d2] }; - var x281: Base[] = [d1, d2] || [d1, d2]; - var x282: Array = [d1, d2] || [d1, d2]; - var x283: { [n: number]: Base; } = [d1, d2] || [d1, d2]; - var x284: {n: Base[]; } = { n: [d1, d2] } || { n: [d1, d2] }; - var x285: () => Base[] = true ? () => [d1, d2] : () => [d1, d2]; - var x286: () => Base[] = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; - var x287: () => Base[] = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; - var x288: { (): Base[]; } = true ? () => [d1, d2] : () => [d1, d2]; - var x289: { (): Base[]; } = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; - var x290: { (): Base[]; } = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; - var x291: Base[] = true ? [d1, d2] : [d1, d2]; - var x292: Array = true ? [d1, d2] : [d1, d2]; - var x293: { [n: number]: Base; } = true ? [d1, d2] : [d1, d2]; - var x294: {n: Base[]; } = true ? { n: [d1, d2] } : { n: [d1, d2] }; - var x295: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : n => { var n: Base[]; return null; }; - var x296: Genric = true ? { func: n => { return [d1, d2]; } } : { func: n => { return [d1, d2]; } }; - var x297: () => Base[] = true ? undefined : () => [d1, d2]; - var x298: () => Base[] = true ? undefined : function() { return [d1, d2] }; - var x299: () => Base[] = true ? undefined : function named() { return [d1, d2] }; - var x300: { (): Base[]; } = true ? undefined : () => [d1, d2]; - var x301: { (): Base[]; } = true ? undefined : function() { return [d1, d2] }; - var x302: { (): Base[]; } = true ? undefined : function named() { return [d1, d2] }; - var x303: Base[] = true ? undefined : [d1, d2]; - var x304: Array = true ? undefined : [d1, d2]; - var x305: { [n: number]: Base; } = true ? undefined : [d1, d2]; - var x306: {n: Base[]; } = true ? undefined : { n: [d1, d2] }; - var x307: (s: Base[]) => any = true ? undefined : n => { var n: Base[]; return null; }; - var x308: Genric = true ? undefined : { func: n => { return [d1, d2]; } }; - var x309: () => Base[] = true ? () => [d1, d2] : undefined; - var x310: () => Base[] = true ? function() { return [d1, d2] } : undefined; - var x311: () => Base[] = true ? function named() { return [d1, d2] } : undefined; - var x312: { (): Base[]; } = true ? () => [d1, d2] : undefined; - var x313: { (): Base[]; } = true ? function() { return [d1, d2] } : undefined; - var x314: { (): Base[]; } = true ? function named() { return [d1, d2] } : undefined; - var x315: Base[] = true ? [d1, d2] : undefined; - var x316: Array = true ? [d1, d2] : undefined; - var x317: { [n: number]: Base; } = true ? [d1, d2] : undefined; - var x318: {n: Base[]; } = true ? { n: [d1, d2] } : undefined; - var x319: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : undefined; - var x320: Genric = true ? { func: n => { return [d1, d2]; } } : undefined; - function x321(n: () => Base[]) { }; x321(() => [d1, d2]); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:319:10: Add a return type to the function declaration. - function x322(n: () => Base[]) { }; x322(function() { return [d1, d2] }); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:320:10: Add a return type to the function declaration. - function x323(n: () => Base[]) { }; x323(function named() { return [d1, d2] }); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:321:10: Add a return type to the function declaration. - function x324(n: { (): Base[]; }) { }; x324(() => [d1, d2]); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:322:10: Add a return type to the function declaration. - function x325(n: { (): Base[]; }) { }; x325(function() { return [d1, d2] }); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:323:10: Add a return type to the function declaration. - function x326(n: { (): Base[]; }) { }; x326(function named() { return [d1, d2] }); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:324:10: Add a return type to the function declaration. - function x327(n: Base[]) { }; x327([d1, d2]); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:325:10: Add a return type to the function declaration. - function x328(n: Array) { }; x328([d1, d2]); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:326:10: Add a return type to the function declaration. - function x329(n: { [n: number]: Base; }) { }; x329([d1, d2]); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:327:10: Add a return type to the function declaration. - function x330(n: {n: Base[]; } ) { }; x330({ n: [d1, d2] }); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:328:10: Add a return type to the function declaration. - function x331(n: (s: Base[]) => any) { }; x331(n => { var n: Base[]; return null; }); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:329:10: Add a return type to the function declaration. - function x332(n: Genric) { }; x332({ func: n => { return [d1, d2]; } }); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:330:10: Add a return type to the function declaration. - var x333 = (n: () => Base[]) => n; x333(() => [d1, d2]); - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:331:5: Add a type annotation to the variable x333. -!!! related TS9030 generatedContextualTyping.ts:331:12: Add a return type to the function expression. - var x334 = (n: () => Base[]) => n; x334(function() { return [d1, d2] }); - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:332:5: Add a type annotation to the variable x334. -!!! related TS9030 generatedContextualTyping.ts:332:12: Add a return type to the function expression. - var x335 = (n: () => Base[]) => n; x335(function named() { return [d1, d2] }); - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:333:5: Add a type annotation to the variable x335. -!!! related TS9030 generatedContextualTyping.ts:333:12: Add a return type to the function expression. - var x336 = (n: { (): Base[]; }) => n; x336(() => [d1, d2]); - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:334:5: Add a type annotation to the variable x336. -!!! related TS9030 generatedContextualTyping.ts:334:12: Add a return type to the function expression. - var x337 = (n: { (): Base[]; }) => n; x337(function() { return [d1, d2] }); - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:335:5: Add a type annotation to the variable x337. -!!! related TS9030 generatedContextualTyping.ts:335:12: Add a return type to the function expression. - var x338 = (n: { (): Base[]; }) => n; x338(function named() { return [d1, d2] }); - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:336:5: Add a type annotation to the variable x338. -!!! related TS9030 generatedContextualTyping.ts:336:12: Add a return type to the function expression. - var x339 = (n: Base[]) => n; x339([d1, d2]); - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:337:5: Add a type annotation to the variable x339. -!!! related TS9030 generatedContextualTyping.ts:337:12: Add a return type to the function expression. - var x340 = (n: Array) => n; x340([d1, d2]); - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:338:5: Add a type annotation to the variable x340. -!!! related TS9030 generatedContextualTyping.ts:338:12: Add a return type to the function expression. - var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:339:5: Add a type annotation to the variable x341. -!!! related TS9030 generatedContextualTyping.ts:339:12: Add a return type to the function expression. - var x342 = (n: {n: Base[]; } ) => n; x342({ n: [d1, d2] }); - ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:340:5: Add a type annotation to the variable x342. -!!! related TS9030 generatedContextualTyping.ts:340:12: Add a return type to the function expression. - var x343 = (n: (s: Base[]) => any) => n; x343(n => { var n: Base[]; return null; }); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:341:5: Add a type annotation to the variable x343. -!!! related TS9030 generatedContextualTyping.ts:341:12: Add a return type to the function expression. - var x344 = (n: Genric) => n; x344({ func: n => { return [d1, d2]; } }); - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:342:5: Add a type annotation to the variable x344. -!!! related TS9030 generatedContextualTyping.ts:342:12: Add a return type to the function expression. - var x345 = function(n: () => Base[]) { }; x345(() => [d1, d2]); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:343:5: Add a type annotation to the variable x345. -!!! related TS9030 generatedContextualTyping.ts:343:12: Add a return type to the function expression. - var x346 = function(n: () => Base[]) { }; x346(function() { return [d1, d2] }); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:344:5: Add a type annotation to the variable x346. -!!! related TS9030 generatedContextualTyping.ts:344:12: Add a return type to the function expression. - var x347 = function(n: () => Base[]) { }; x347(function named() { return [d1, d2] }); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:345:5: Add a type annotation to the variable x347. -!!! related TS9030 generatedContextualTyping.ts:345:12: Add a return type to the function expression. - var x348 = function(n: { (): Base[]; }) { }; x348(() => [d1, d2]); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:346:5: Add a type annotation to the variable x348. -!!! related TS9030 generatedContextualTyping.ts:346:12: Add a return type to the function expression. - var x349 = function(n: { (): Base[]; }) { }; x349(function() { return [d1, d2] }); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:347:5: Add a type annotation to the variable x349. -!!! related TS9030 generatedContextualTyping.ts:347:12: Add a return type to the function expression. - var x350 = function(n: { (): Base[]; }) { }; x350(function named() { return [d1, d2] }); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:348:5: Add a type annotation to the variable x350. -!!! related TS9030 generatedContextualTyping.ts:348:12: Add a return type to the function expression. - var x351 = function(n: Base[]) { }; x351([d1, d2]); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:349:5: Add a type annotation to the variable x351. -!!! related TS9030 generatedContextualTyping.ts:349:12: Add a return type to the function expression. - var x352 = function(n: Array) { }; x352([d1, d2]); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:350:5: Add a type annotation to the variable x352. -!!! related TS9030 generatedContextualTyping.ts:350:12: Add a return type to the function expression. - var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:351:5: Add a type annotation to the variable x353. -!!! related TS9030 generatedContextualTyping.ts:351:12: Add a return type to the function expression. - var x354 = function(n: {n: Base[]; } ) { }; x354({ n: [d1, d2] }); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:352:5: Add a type annotation to the variable x354. -!!! related TS9030 generatedContextualTyping.ts:352:12: Add a return type to the function expression. - var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; return null; }); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:353:5: Add a type annotation to the variable x355. -!!! related TS9030 generatedContextualTyping.ts:353:12: Add a return type to the function expression. - var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:354:5: Add a type annotation to the variable x356. -!!! related TS9030 generatedContextualTyping.ts:354:12: Add a return type to the function expression. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument.d.ts deleted file mode 100644 index 661adbce3d0e3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument.d.ts +++ /dev/null @@ -1,209 +0,0 @@ -//// [tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts] //// - -//// [genericTypeReferenceWithoutTypeArgument.ts] -// it is an error to use a generic type without type arguments -// all of these are errors - -class C { - foo: T; -} - -var c: C; - -var a: { x: C }; -var b: { (x: C): C }; -var d: { [x: C]: C }; - -var e = (x: C) => { var y: C; return y; } - -function f(x: C): C { var y: C; return y; } - -var g = function f(x: C): C { var y: C; return y; } - -class D extends C { -} - -interface I extends C {} - -module M { - export class E { foo: T } -} - -class D2 extends M.E { } -class D3 { } -interface I2 extends M.E { } - -function h(x: T) { } -function i(x: T) { } - -var j = null; -var k = null; - -/// [Declarations] //// - - - -//// [genericTypeReferenceWithoutTypeArgument.d.ts] -declare class C { - foo: T; -} -declare var c: C; -declare var a: { - x: C; -}; -declare var b: { - (x: C): C; -}; -declare var d: { - [x: C]: C; -}; -declare var e: (x: C) => invalid; -declare function f(x: C): C; -declare var g: (x: C) => C; -declare class D extends C { -} -interface I extends C { -} -declare namespace M { - class E { - foo: T; - } -} -declare class D2 extends M.E { -} -declare class D3 { -} -interface I2 extends M.E { -} -declare function h(x: T): invalid; -declare function i(x: T): invalid; -declare var j: C; -declare var k: M.E; - -/// [Errors] //// - -genericTypeReferenceWithoutTypeArgument.ts(8,8): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(10,13): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(11,14): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(11,18): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(12,11): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. -genericTypeReferenceWithoutTypeArgument.ts(12,14): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(12,18): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(14,9): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -genericTypeReferenceWithoutTypeArgument.ts(14,13): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(14,28): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(16,15): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(16,19): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(16,30): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(18,23): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(18,27): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(18,38): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(20,17): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(23,21): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(29,18): error TS2314: Generic type 'E' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(30,20): error TS2314: Generic type 'E' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(31,22): error TS2314: Generic type 'E' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(33,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -genericTypeReferenceWithoutTypeArgument.ts(33,22): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -genericTypeReferenceWithoutTypeArgument.ts(34,22): error TS2314: Generic type 'E' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(36,10): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(37,10): error TS2314: Generic type 'E' requires 1 type argument(s). - - -==== genericTypeReferenceWithoutTypeArgument.ts (27 errors) ==== - // it is an error to use a generic type without type arguments - // all of these are errors - - class C { - foo: T; - } - - var c: C; - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - - var a: { x: C }; - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - var b: { (x: C): C }; - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - var d: { [x: C]: C }; - ~ -!!! error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - - var e = (x: C) => { var y: C; return y; } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 genericTypeReferenceWithoutTypeArgument.ts:14:5: Add a type annotation to the variable e. -!!! related TS9030 genericTypeReferenceWithoutTypeArgument.ts:14:9: Add a return type to the function expression. - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - - function f(x: C): C { var y: C; return y; } - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - - var g = function f(x: C): C { var y: C; return y; } - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - - class D extends C { - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - } - - interface I extends C {} - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - - module M { - export class E { foo: T } - } - - class D2 extends M.E { } - ~~~ -!!! error TS2314: Generic type 'E' requires 1 type argument(s). - class D3 { } - ~~~ -!!! error TS2314: Generic type 'E' requires 1 type argument(s). - interface I2 extends M.E { } - ~~~ -!!! error TS2314: Generic type 'E' requires 1 type argument(s). - - function h(x: T) { } - ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 genericTypeReferenceWithoutTypeArgument.ts:33:10: Add a return type to the function declaration. - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - function i(x: T) { } - ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 genericTypeReferenceWithoutTypeArgument.ts:34:10: Add a return type to the function declaration. - ~~~ -!!! error TS2314: Generic type 'E' requires 1 type argument(s). - - var j = null; - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - var k = null; - ~~~ -!!! error TS2314: Generic type 'E' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument2.d.ts deleted file mode 100644 index e3725acf694b5..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/genericTypeReferenceWithoutTypeArgument2.d.ts +++ /dev/null @@ -1,218 +0,0 @@ -//// [tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts] //// - -//// [genericTypeReferenceWithoutTypeArgument2.ts] -// it is an error to use a generic type without type arguments -// all of these are errors - -interface I { - foo: T; -} - -var c: I; - -var a: { x: I }; -var b: { (x: I): I }; -var d: { [x: I]: I }; - -var e = (x: I) => { var y: I; return y; } - -function f(x: I): I { var y: I; return y; } - -var g = function f(x: I): I { var y: I; return y; } - -class D extends I { -} - -interface U extends I {} - -module M { - export interface E { foo: T } -} - -class D2 extends M.C { } -interface D3 { } -interface I2 extends M.C { } - -function h(x: T) { } -function i(x: T) { } - -var j = null; -var k = null; - -/// [Declarations] //// - - - -//// [genericTypeReferenceWithoutTypeArgument2.d.ts] -interface I { - foo: T; -} -declare var c: I; -declare var a: { - x: I; -}; -declare var b: { - (x: I): I; -}; -declare var d: { - [x: I]: I; -}; -declare var e: (x: I) => invalid; -declare function f(x: I): I; -declare var g: (x: I) => I; -declare class D extends I { -} -interface U extends I { -} -declare namespace M { - interface E { - foo: T; - } -} -declare class D2 extends M.C { -} -interface D3 { -} -interface I2 extends M.C { -} -declare function h(x: T): invalid; -declare function i(x: T): invalid; -declare var j: C; -declare var k: M.E; - -/// [Errors] //// - -genericTypeReferenceWithoutTypeArgument2.ts(8,8): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(10,13): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(11,14): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(11,18): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(12,11): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. -genericTypeReferenceWithoutTypeArgument2.ts(12,14): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(12,18): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(14,9): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -genericTypeReferenceWithoutTypeArgument2.ts(14,13): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(14,28): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(16,15): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(16,19): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(16,30): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(18,23): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(18,27): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(18,38): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(20,17): error TS2689: Cannot extend an interface 'I'. Did you mean 'implements'? -genericTypeReferenceWithoutTypeArgument2.ts(20,17): error TS4020: 'extends' clause of exported class 'D' has or is using private name 'I'. -genericTypeReferenceWithoutTypeArgument2.ts(23,21): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(29,18): error TS2708: Cannot use namespace 'M' as a value. -genericTypeReferenceWithoutTypeArgument2.ts(29,18): error TS4020: 'extends' clause of exported class 'D2' has or is using private name 'M'. -genericTypeReferenceWithoutTypeArgument2.ts(30,24): error TS2314: Generic type 'E' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(31,24): error TS2694: Namespace 'M' has no exported member 'C'. -genericTypeReferenceWithoutTypeArgument2.ts(33,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -genericTypeReferenceWithoutTypeArgument2.ts(33,22): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -genericTypeReferenceWithoutTypeArgument2.ts(34,22): error TS2314: Generic type 'E' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(36,10): error TS2304: Cannot find name 'C'. -genericTypeReferenceWithoutTypeArgument2.ts(36,10): error TS4025: Exported variable 'j' has or is using private name 'C'. -genericTypeReferenceWithoutTypeArgument2.ts(37,10): error TS2314: Generic type 'E' requires 1 type argument(s). - - -==== genericTypeReferenceWithoutTypeArgument2.ts (30 errors) ==== - // it is an error to use a generic type without type arguments - // all of these are errors - - interface I { - foo: T; - } - - var c: I; - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - - var a: { x: I }; - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - var b: { (x: I): I }; - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - var d: { [x: I]: I }; - ~ -!!! error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - - var e = (x: I) => { var y: I; return y; } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 genericTypeReferenceWithoutTypeArgument2.ts:14:5: Add a type annotation to the variable e. -!!! related TS9030 genericTypeReferenceWithoutTypeArgument2.ts:14:9: Add a return type to the function expression. - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - - function f(x: I): I { var y: I; return y; } - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - - var g = function f(x: I): I { var y: I; return y; } - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - - class D extends I { - ~ -!!! error TS2689: Cannot extend an interface 'I'. Did you mean 'implements'? - ~ -!!! error TS4020: 'extends' clause of exported class 'D' has or is using private name 'I'. - } - - interface U extends I {} - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - - module M { - export interface E { foo: T } - } - - class D2 extends M.C { } - ~ -!!! error TS2708: Cannot use namespace 'M' as a value. - ~ -!!! error TS4020: 'extends' clause of exported class 'D2' has or is using private name 'M'. - interface D3 { } - ~~~ -!!! error TS2314: Generic type 'E' requires 1 type argument(s). - interface I2 extends M.C { } - ~ -!!! error TS2694: Namespace 'M' has no exported member 'C'. - - function h(x: T) { } - ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 genericTypeReferenceWithoutTypeArgument2.ts:33:10: Add a return type to the function declaration. - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - function i(x: T) { } - ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 genericTypeReferenceWithoutTypeArgument2.ts:34:10: Add a return type to the function declaration. - ~~~ -!!! error TS2314: Generic type 'E' requires 1 type argument(s). - - var j = null; - ~ -!!! error TS2304: Cannot find name 'C'. - ~ -!!! error TS4025: Exported variable 'j' has or is using private name 'C'. - var k = null; - ~~~ -!!! error TS2314: Generic type 'E' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/gettersAndSettersErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/gettersAndSettersErrors.d.ts deleted file mode 100644 index e66f09df31b80..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/gettersAndSettersErrors.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -//// [tests/cases/compiler/gettersAndSettersErrors.ts] //// - -//// [gettersAndSettersErrors.ts] -class C { - public get Foo() { return "foo";} // ok - public set Foo(foo:string) {} // ok - - public Foo = 0; // error - duplicate identifier Foo - confirmed - public get Goo(v:string):string {return null;} // error - getters must not have a parameter - public set Goo(v:string):string {} // error - setters must not specify a return type -} - -class E { - private get Baz():number { return 0; } - public set Baz(n:number) {} // error - accessors do not agree in visibility -} - - - - -/// [Declarations] //// - - - -//// [gettersAndSettersErrors.d.ts] -declare class C { - get Foo(): string; - set Foo(foo: string); - Foo: number; - get Goo(): string; - set Goo(v: string): string; -} -declare class E { - private get Baz(); - set Baz(n: number); -} - -/// [Errors] //// - -gettersAndSettersErrors.ts(5,12): error TS2300: Duplicate identifier 'Foo'. -gettersAndSettersErrors.ts(5,12): error TS2717: Subsequent property declarations must have the same type. Property 'Foo' must be of type 'string', but here has type 'number'. -gettersAndSettersErrors.ts(6,16): error TS1054: A 'get' accessor cannot have parameters. -gettersAndSettersErrors.ts(7,16): error TS1095: A 'set' accessor cannot have a return type annotation. -gettersAndSettersErrors.ts(11,17): error TS2808: A get accessor must be at least as accessible as the setter -gettersAndSettersErrors.ts(12,16): error TS2808: A get accessor must be at least as accessible as the setter - - -==== gettersAndSettersErrors.ts (6 errors) ==== - class C { - public get Foo() { return "foo";} // ok - public set Foo(foo:string) {} // ok - - public Foo = 0; // error - duplicate identifier Foo - confirmed - ~~~ -!!! error TS2300: Duplicate identifier 'Foo'. - ~~~ -!!! error TS2717: Subsequent property declarations must have the same type. Property 'Foo' must be of type 'string', but here has type 'number'. -!!! related TS6203 gettersAndSettersErrors.ts:2:16: 'Foo' was also declared here. - public get Goo(v:string):string {return null;} // error - getters must not have a parameter - ~~~ -!!! error TS1054: A 'get' accessor cannot have parameters. - public set Goo(v:string):string {} // error - setters must not specify a return type - ~~~ -!!! error TS1095: A 'set' accessor cannot have a return type annotation. - } - - class E { - private get Baz():number { return 0; } - ~~~ -!!! error TS2808: A get accessor must be at least as accessible as the setter - public set Baz(n:number) {} // error - accessors do not agree in visibility - ~~~ -!!! error TS2808: A get accessor must be at least as accessible as the setter - } - - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/inKeywordAndIntersection.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/inKeywordAndIntersection.d.ts deleted file mode 100644 index 92c28d06966d6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/inKeywordAndIntersection.d.ts +++ /dev/null @@ -1,100 +0,0 @@ -//// [tests/cases/compiler/inKeywordAndIntersection.ts] //// - -//// [inKeywordAndIntersection.ts] -class A { a = 0 } -class B { b = 0 } - -function f10(obj: A & { x: string } | B) { - if (obj instanceof Object) { - obj; // A & { x: string } | B - } - else { - obj; // Error - } -} - -// Repro from #50844 - -interface InstanceOne { - one(): void -} - -interface InstanceTwo { - two(): void -} - -const instance = {} as InstanceOne | InstanceTwo - -const ClassOne = {} as { new(): InstanceOne } & { foo: true }; - -if (instance instanceof ClassOne) { - instance.one(); -} - - -/// [Declarations] //// - - - -//// [inKeywordAndIntersection.d.ts] -declare class A { - a: number; -} -declare class B { - b: number; -} -declare function f10(obj: A & { - x: string; -} | B): invalid; -interface InstanceOne { - one(): void; -} -interface InstanceTwo { - two(): void; -} -declare const instance: InstanceOne | InstanceTwo; -declare const ClassOne: { - new (): InstanceOne; -} & { - foo: true; -}; - -/// [Errors] //// - -inKeywordAndIntersection.ts(4,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. - - -==== inKeywordAndIntersection.ts (1 errors) ==== - class A { a = 0 } - class B { b = 0 } - - function f10(obj: A & { x: string } | B) { - ~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 inKeywordAndIntersection.ts:4:10: Add a return type to the function declaration. - if (obj instanceof Object) { - obj; // A & { x: string } | B - } - else { - obj; // Error - } - } - - // Repro from #50844 - - interface InstanceOne { - one(): void - } - - interface InstanceTwo { - two(): void - } - - const instance = {} as InstanceOne | InstanceTwo - - const ClassOne = {} as { new(): InstanceOne } & { foo: true }; - - if (instance instanceof ClassOne) { - instance.one(); - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts deleted file mode 100644 index 83ffe2b29b5f2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/indexSignatureMustHaveTypeAnnotation.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -//// [tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts] //// - -//// [indexSignatureMustHaveTypeAnnotation.ts] -interface I { - // Used to be indexer, now it is a computed property - [x]: string; - [x: string]; -} - -class C { - // Used to be indexer, now it is a computed property - [x]: string - -} - -class C2 { - [x: string] -} - -/// [Declarations] //// - - - -//// [indexSignatureMustHaveTypeAnnotation.d.ts] -interface I { - [x]: string; - [x: string]: any; -} -declare class C { - [x]: string; -} -declare class C2 { - [x: string]: any; -} - -/// [Errors] //// - -indexSignatureMustHaveTypeAnnotation.ts(3,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. -indexSignatureMustHaveTypeAnnotation.ts(3,6): error TS2304: Cannot find name 'x'. -indexSignatureMustHaveTypeAnnotation.ts(4,5): error TS1021: An index signature must have a type annotation. -indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS2304: Cannot find name 'x'. -indexSignatureMustHaveTypeAnnotation.ts(14,5): error TS1021: An index signature must have a type annotation. - - -==== indexSignatureMustHaveTypeAnnotation.ts (6 errors) ==== - interface I { - // Used to be indexer, now it is a computed property - [x]: string; - ~~~ -!!! 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 'x'. - [x: string]; - ~~~~~~~~~~~~ -!!! error TS1021: An index signature must have a type annotation. - } - - class C { - // Used to be indexer, now it is a computed property - [x]: string - ~~~ -!!! 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 'x'. - - } - - class C2 { - [x: string] - ~~~~~~~~~~~ -!!! error TS1021: An index signature must have a type annotation. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/indexWithoutParamType2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/indexWithoutParamType2.d.ts deleted file mode 100644 index a38e7fe9c9ed1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/indexWithoutParamType2.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -//// [tests/cases/compiler/indexWithoutParamType2.ts] //// - -//// [indexWithoutParamType2.ts] -class C { - // Used to be indexer, now it is a computed property - [x]: string -} - -/// [Declarations] //// - - - -//// [indexWithoutParamType2.d.ts] -declare class C { - [x]: string; -} - -/// [Errors] //// - -indexWithoutParamType2.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -indexWithoutParamType2.ts(3,6): error TS2304: Cannot find name 'x'. - - -==== indexWithoutParamType2.ts (2 errors) ==== - class C { - // Used to be indexer, now it is a computed property - [x]: string - ~~~ -!!! 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 'x'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts deleted file mode 100644 index b84d541cf7d61..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/intTypeCheck.d.ts +++ /dev/null @@ -1,881 +0,0 @@ -//// [tests/cases/compiler/intTypeCheck.ts] //// - -//// [intTypeCheck.ts] -interface i1 { - //Property Signatures - p; - p1?; - p2?: string; - p3(); - p4? (); - p5? (): void; - p6(pa1): void; - p7? (pa1, pa2): void; -} -interface i2 { - //Call Signatures - (); - (): number; - (p); - (p1: string); - (p2?: string); - (...p3: any[]); - (p4: string, p5?: string); - (p6: string, ...p7: any[]); -} -interface i3 { - //Construct Signatures - new (); - new (): number; - new (p: string); - new (p2?: string); - new (...p3: any[]); - new (p4: string, p5?: string); - new (p6: string, ...p7: any[]); -} -interface i4 { - // Used to be indexer, now it is a computed property - [p]; - //Index Signatures - [p1: string]; - [p2: string, p3: number]; -} -interface i5 extends i1 { } -interface i6 extends i2 { } -interface i7 extends i3 { } -interface i8 extends i4 { } -interface i9 { } - -class Base { foo() { } } - -interface i11 { - //Call Signatures - (); - (): 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 Signatures - new (); - new (): number; - new (p: string); - new (p2?: string); - new (...p3: any[]); - new (p4: string, p5?: string); - new (p6: string, ...p7: any[]); - - // Used to be indexer, now it is a computed property - [p]; - //Index Signatures - [p1: string]; - [p2: string, p3: number]; - - //Property Signatures - p; - p1?; - p2?: string; - p3(); - p4? (); - p5? (): void; - p6(pa1): void; - p7(pa1, pa2): void; - p7? (pa1, pa2): void; -} - -var anyVar: any; -// -// Property signatures -// -var obj0: i1; -var obj1: i1 = { - p: null, - p3: function ():any { return 0; }, - p6: function (pa1):any { return 0; }, - p7: function (pa1, pa2):any { return 0; } -}; -var obj2: i1 = new Object(); -var obj3: i1 = new obj0; -var obj4: i1 = new Base; -var obj5: i1 = null; -var obj6: i1 = function () { }; -//var obj7: i1 = function foo() { }; -var obj8: i1 = anyVar; -var obj9: i1 = new anyVar; -var obj10: i1 = new {}; -// -// Call signatures -// -var obj11: i2; -var obj12: i2 = {}; -var obj13: i2 = new Object(); -var obj14: i2 = new obj11; -var obj15: i2 = new Base; -var obj16: i2 = null; -var obj17: i2 = function ():any { return 0; }; -//var obj18: i2 = function foo() { }; -var obj19: i2 = anyVar; -var obj20: i2 = new anyVar; -var obj21: i2 = new {}; -// -// Construct Signatures -// -var obj22: i3; -var obj23: i3 = {}; -var obj24: i3 = new Object(); -var obj25: i3 = new obj22; -var obj26: i3 = new Base; -var obj27: i3 = null; -var obj28: i3 = function () { }; -//var obj29: i3 = function foo() { }; -var obj30: i3 = anyVar; -var obj31: i3 = new anyVar; -var obj32: i3 = new {}; -// -// Index Signatures -// -var obj33: i4; -var obj34: i4 = {}; -var obj35: i4 = new Object(); -var obj36: i4 = new obj33; -var obj37: i4 = new Base; -var obj38: i4 = null; -var obj39: i4 = function () { }; -//var obj40: i4 = function foo() { }; -var obj41: i4 = anyVar; -var obj42: i4 = new anyVar; -var obj43: i4 = new {}; -// -// Interface Derived I1 -// -var obj44: i5; -var obj45: i5 = {}; -var obj46: i5 = new Object(); -var obj47: i5 = new obj44; -var obj48: i5 = new Base; -var obj49: i5 = null; -var obj50: i5 = function () { }; -//var obj51: i5 = function foo() { }; -var obj52: i5 = anyVar; -var obj53: i5 = new anyVar; -var obj54: i5 = new {}; -// -// Interface Derived I2 -// -var obj55: i6; -var obj56: i6 = {}; -var obj57: i6 = new Object(); -var obj58: i6 = new obj55; -var obj59: i6 = new Base; -var obj60: i6 = null; -var obj61: i6 = function () { }; -//var obj62: i6 = function foo() { }; -var obj63: i6 = anyVar; -var obj64: i6 = new anyVar; -var obj65: i6 = new {}; -// -// Interface Derived I3 -// -var obj66: i7; -var obj67: i7 = {}; -var obj68: i7 = new Object(); -var obj69: i7 = new obj66; -var obj70: i7 = new Base; -var obj71: i7 = null; -var obj72: i7 = function () { }; -//var obj73: i7 = function foo() { }; -var obj74: i7 = anyVar; -var obj75: i7 = new anyVar; -var obj76: i7 = new {}; -// -// Interface Derived I4 -// -var obj77: i8; -var obj78: i8 = {}; -var obj79: i8 = new Object(); -var obj80: i8 = new obj77; -var obj81: i8 = new Base; -var obj82: i8 = null; -var obj83: i8 = function () { }; -//var obj84: i8 = function foo() { }; -var obj85: i8 = anyVar; -var obj86: i8 = new anyVar; -var obj87: i8 = new {}; - -/// [Declarations] //// - - - -//// [intTypeCheck.d.ts] -interface i1 { - p: any; - p1?: any; - p2?: string; - p3(): any; - p4?(): any; - p5?(): void; - p6(pa1: invalid): void; - p7?(pa1: invalid, pa2: invalid): void; -} -interface i2 { - (): any; - (): number; - (p: invalid): any; - (p1: string): any; - (p2?: string): any; - (...p3: any[]): any; - (p4: string, p5?: string): any; - (p6: string, ...p7: any[]): any; -} -interface i3 { - 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; -} -interface i4 { - [p]: any; - [p1: string]: any; - [p2: string, p3: number]: any; -} -interface i5 extends i1 { -} -interface i6 extends i2 { -} -interface i7 extends i3 { -} -interface i8 extends i4 { -} -interface i9 { -} -declare class Base { - foo(): invalid; -} -interface i11 { - (): 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; -} -declare var anyVar: any; -declare var obj0: i1; -declare var obj1: i1; -declare var obj2: i1; -declare var obj3: i1; -declare var obj4: i1; -declare var obj5: i1; -declare var obj6: i1; -declare var obj8: i1; -declare var obj9: i1; -declare var obj10: i1; -declare var obj11: i2; -declare var obj12: i2; -declare var obj13: i2; -declare var obj14: i2; -declare var obj15: i2; -declare var obj16: i2; -declare var obj17: i2; -declare var obj19: i2; -declare var obj20: i2; -declare var obj21: i2; -declare var obj22: i3; -declare var obj23: i3; -declare var obj24: i3; -declare var obj25: i3; -declare var obj26: i3; -declare var obj27: i3; -declare var obj28: i3; -declare var obj30: i3; -declare var obj31: i3; -declare var obj32: i3; -declare var obj33: i4; -declare var obj34: i4; -declare var obj35: i4; -declare var obj36: i4; -declare var obj37: i4; -declare var obj38: i4; -declare var obj39: i4; -declare var obj41: i4; -declare var obj42: i4; -declare var obj43: i4; -declare var obj44: i5; -declare var obj45: i5; -declare var obj46: i5; -declare var obj47: i5; -declare var obj48: i5; -declare var obj49: i5; -declare var obj50: i5; -declare var obj52: i5; -declare var obj53: i5; -declare var obj54: i5; -declare var obj55: i6; -declare var obj56: i6; -declare var obj57: i6; -declare var obj58: i6; -declare var obj59: i6; -declare var obj60: i6; -declare var obj61: i6; -declare var obj63: i6; -declare var obj64: i6; -declare var obj65: i6; -declare var obj66: i7; -declare var obj67: i7; -declare var obj68: i7; -declare var obj69: i7; -declare var obj70: i7; -declare var obj71: i7; -declare var obj72: i7; -declare var obj74: i7; -declare var obj75: i7; -declare var obj76: i7; -declare var obj77: i8; -declare var obj78: i8; -declare var obj79: i8; -declare var obj80: i8; -declare var obj81: i8; -declare var obj82: i8; -declare var obj83: i8; -declare var obj85: i8; -declare var obj86: i8; -declare var obj87: i8; - -/// [Errors] //// - -intTypeCheck.ts(9,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -intTypeCheck.ts(10,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -intTypeCheck.ts(10,15): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -intTypeCheck.ts(16,6): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -intTypeCheck.ts(35,6): error TS2304: Cannot find name 'p'. -intTypeCheck.ts(46,14): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -intTypeCheck.ts(52,6): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -intTypeCheck.ts(71,6): error TS2304: Cannot find name 'p'. -intTypeCheck.ts(83,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -intTypeCheck.ts(84,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -intTypeCheck.ts(84,13): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -intTypeCheck.ts(85,5): error TS2386: Overload signatures must all be optional or required. -intTypeCheck.ts(85,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -intTypeCheck.ts(85,15): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -intTypeCheck.ts(99,5): error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? - Type 'Object' is missing the following properties from type 'i1': p, p3, p6 -intTypeCheck.ts(100,20): error TS2351: This expression is not constructable. - Type 'i1' has no construct signatures. -intTypeCheck.ts(101,5): error TS2739: Type 'Base' is missing the following properties from type 'i1': p, p3, p6 -intTypeCheck.ts(103,5): error TS2322: Type '() => void' is not assignable to type 'i1'. -intTypeCheck.ts(106,5): error TS2322: Type 'boolean' is not assignable to type 'i1'. -intTypeCheck.ts(106,20): error TS1109: Expression expected. -intTypeCheck.ts(106,21): error TS2693: 'i1' only refers to a type, but is being used as a value here. -intTypeCheck.ts(107,21): error TS2351: This expression is not constructable. - Type '{}' has no construct signatures. -intTypeCheck.ts(112,5): error TS2322: Type '{}' is not assignable to type 'i2'. - Type '{}' provides no match for the signature '(): any'. -intTypeCheck.ts(113,5): error TS2322: Type 'Object' is not assignable to type 'i2'. - The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? - Type 'Object' provides no match for the signature '(): any'. -intTypeCheck.ts(114,17): error TS2350: Only a void function can be called with the 'new' keyword. -intTypeCheck.ts(115,5): error TS2322: Type 'Base' is not assignable to type 'i2'. - Type 'Base' provides no match for the signature '(): any'. -intTypeCheck.ts(120,5): error TS2322: Type 'boolean' is not assignable to type 'i2'. -intTypeCheck.ts(120,21): error TS1109: Expression expected. -intTypeCheck.ts(120,22): error TS2693: 'i2' only refers to a type, but is being used as a value here. -intTypeCheck.ts(121,21): error TS2351: This expression is not constructable. - Type '{}' has no construct signatures. -intTypeCheck.ts(126,5): error TS2322: Type '{}' is not assignable to type 'i3'. - Type '{}' provides no match for the signature 'new (): any'. -intTypeCheck.ts(127,5): error TS2322: Type 'Object' is not assignable to type 'i3'. - The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? - Type 'Object' provides no match for the signature 'new (): any'. -intTypeCheck.ts(129,5): error TS2322: Type 'Base' is not assignable to type 'i3'. - Type 'Base' provides no match for the signature 'new (): any'. -intTypeCheck.ts(131,5): error TS2322: Type '() => void' is not assignable to type 'i3'. - Type '() => void' provides no match for the signature 'new (): any'. -intTypeCheck.ts(134,5): error TS2322: Type 'boolean' is not assignable to type 'i3'. -intTypeCheck.ts(134,21): error TS1109: Expression expected. -intTypeCheck.ts(134,22): error TS2693: 'i3' only refers to a type, but is being used as a value here. -intTypeCheck.ts(135,21): error TS2351: This expression is not constructable. - Type '{}' has no construct signatures. -intTypeCheck.ts(142,21): error TS2351: This expression is not constructable. - Type 'i4' has no construct signatures. -intTypeCheck.ts(148,5): error TS2322: Type 'boolean' is not assignable to type 'i4'. -intTypeCheck.ts(148,21): error TS1109: Expression expected. -intTypeCheck.ts(148,22): error TS2693: 'i4' only refers to a type, but is being used as a value here. -intTypeCheck.ts(149,21): error TS2351: This expression is not constructable. - Type '{}' has no construct signatures. -intTypeCheck.ts(154,5): error TS2739: Type '{}' is missing the following properties from type 'i5': p, p3, p6 -intTypeCheck.ts(155,5): error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? - Type 'Object' is missing the following properties from type 'i5': p, p3, p6 -intTypeCheck.ts(156,21): error TS2351: This expression is not constructable. - Type 'i5' has no construct signatures. -intTypeCheck.ts(157,5): error TS2739: Type 'Base' is missing the following properties from type 'i5': p, p3, p6 -intTypeCheck.ts(159,5): error TS2322: Type '() => void' is not assignable to type 'i5'. -intTypeCheck.ts(162,5): error TS2322: Type 'boolean' is not assignable to type 'i5'. -intTypeCheck.ts(162,21): error TS1109: Expression expected. -intTypeCheck.ts(162,22): error TS2693: 'i5' only refers to a type, but is being used as a value here. -intTypeCheck.ts(163,21): error TS2351: This expression is not constructable. - Type '{}' has no construct signatures. -intTypeCheck.ts(168,5): error TS2322: Type '{}' is not assignable to type 'i6'. - Type '{}' provides no match for the signature '(): any'. -intTypeCheck.ts(169,5): error TS2322: Type 'Object' is not assignable to type 'i6'. - The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? - Type 'Object' provides no match for the signature '(): any'. -intTypeCheck.ts(170,17): error TS2350: Only a void function can be called with the 'new' keyword. -intTypeCheck.ts(171,5): error TS2322: Type 'Base' is not assignable to type 'i6'. - Type 'Base' provides no match for the signature '(): any'. -intTypeCheck.ts(173,5): error TS2322: Type '() => void' is not assignable to type 'i6'. - Type 'void' is not assignable to type 'number'. -intTypeCheck.ts(176,5): error TS2322: Type 'boolean' is not assignable to type 'i6'. -intTypeCheck.ts(176,21): error TS1109: Expression expected. -intTypeCheck.ts(176,22): error TS2693: 'i6' only refers to a type, but is being used as a value here. -intTypeCheck.ts(177,21): error TS2351: This expression is not constructable. - Type '{}' has no construct signatures. -intTypeCheck.ts(182,5): error TS2322: Type '{}' is not assignable to type 'i7'. - Type '{}' provides no match for the signature 'new (): any'. -intTypeCheck.ts(183,5): error TS2322: Type 'Object' is not assignable to type 'i7'. - The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? - Type 'Object' provides no match for the signature 'new (): any'. -intTypeCheck.ts(185,17): error TS2352: Conversion of type 'Base' to type 'i7' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. - Type 'Base' provides no match for the signature 'new (): any'. -intTypeCheck.ts(187,5): error TS2322: Type '() => void' is not assignable to type 'i7'. - Type '() => void' provides no match for the signature 'new (): any'. -intTypeCheck.ts(190,5): error TS2322: Type 'boolean' is not assignable to type 'i7'. -intTypeCheck.ts(190,21): error TS1109: Expression expected. -intTypeCheck.ts(190,22): error TS2693: 'i7' only refers to a type, but is being used as a value here. -intTypeCheck.ts(191,21): error TS2351: This expression is not constructable. - Type '{}' has no construct signatures. -intTypeCheck.ts(198,21): error TS2351: This expression is not constructable. - Type 'i8' has no construct signatures. -intTypeCheck.ts(204,5): error TS2322: Type 'boolean' is not assignable to type 'i8'. -intTypeCheck.ts(204,21): error TS1109: Expression expected. -intTypeCheck.ts(204,22): error TS2693: 'i8' only refers to a type, but is being used as a value here. -intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. - Type '{}' has no construct signatures. - - -==== intTypeCheck.ts (74 errors) ==== - interface i1 { - //Property Signatures - p; - p1?; - p2?: string; - p3(); - p4? (); - p5? (): void; - p6(pa1): void; - ~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 intTypeCheck.ts:9: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 intTypeCheck.ts:10:10: Add a type annotation to the parameter pa1. - ~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 intTypeCheck.ts:10:15: Add a type annotation to the parameter pa2. - } - interface i2 { - //Call Signatures - (); - (): number; - (p); - ~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 intTypeCheck.ts:16:6: Add a type annotation to the parameter p. - (p1: string); - (p2?: string); - (...p3: any[]); - (p4: string, p5?: string); - (p6: string, ...p7: any[]); - } - interface i3 { - //Construct Signatures - new (); - new (): number; - new (p: string); - new (p2?: string); - new (...p3: any[]); - new (p4: string, p5?: string); - new (p6: string, ...p7: any[]); - } - interface i4 { - // Used to be indexer, now it is a computed property - [p]; - ~ -!!! error TS2304: Cannot find name 'p'. - //Index Signatures - [p1: string]; - [p2: string, p3: number]; - } - interface i5 extends i1 { } - interface i6 extends i2 { } - interface i7 extends i3 { } - interface i8 extends i4 { } - interface i9 { } - - class Base { foo() { } } - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 intTypeCheck.ts:46:14: Add a return type to the method - - interface i11 { - //Call Signatures - (); - (): number; - (p); - ~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 intTypeCheck.ts:52: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 Signatures - new (); - new (): number; - new (p: string); - new (p2?: string); - new (...p3: any[]); - new (p4: string, p5?: string); - new (p6: string, ...p7: any[]); - - // Used to be indexer, now it is a computed property - [p]; - ~ -!!! error TS2304: Cannot find name 'p'. - //Index Signatures - [p1: string]; - [p2: string, p3: number]; - - //Property Signatures - p; - p1?; - p2?: string; - p3(); - p4? (); - p5? (): void; - p6(pa1): void; - ~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 intTypeCheck.ts:83: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 intTypeCheck.ts:84:8: Add a type annotation to the parameter pa1. - ~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 intTypeCheck.ts:84: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 intTypeCheck.ts:85:10: Add a type annotation to the parameter pa1. - ~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 intTypeCheck.ts:85:15: Add a type annotation to the parameter pa2. - } - - var anyVar: any; - // - // Property signatures - // - var obj0: i1; - var obj1: i1 = { - p: null, - p3: function ():any { return 0; }, - p6: function (pa1):any { return 0; }, - p7: function (pa1, pa2):any { return 0; } - }; - var obj2: i1 = new Object(); - ~~~~ -!!! error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? -!!! error TS2696: Type 'Object' is missing the following properties from type 'i1': p, p3, p6 - var obj3: i1 = new obj0; - ~~~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type 'i1' has no construct signatures. - var obj4: i1 = new Base; - ~~~~ -!!! error TS2739: Type 'Base' is missing the following properties from type 'i1': p, p3, p6 - var obj5: i1 = null; - var obj6: i1 = function () { }; - ~~~~ -!!! error TS2322: Type '() => void' is not assignable to type 'i1'. - //var obj7: i1 = function foo() { }; - var obj8: i1 = anyVar; - var obj9: i1 = new anyVar; - ~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i1'. - ~ -!!! error TS1109: Expression expected. - ~~ -!!! error TS2693: 'i1' only refers to a type, but is being used as a value here. - var obj10: i1 = new {}; - ~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type '{}' has no construct signatures. - // - // Call signatures - // - var obj11: i2; - var obj12: i2 = {}; - ~~~~~ -!!! error TS2322: Type '{}' is not assignable to type 'i2'. -!!! error TS2322: Type '{}' provides no match for the signature '(): any'. - var obj13: i2 = new Object(); - ~~~~~ -!!! error TS2322: Type 'Object' is not assignable to type 'i2'. -!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? -!!! error TS2322: Type 'Object' provides no match for the signature '(): any'. - var obj14: i2 = new obj11; - ~~~~~~~~~ -!!! error TS2350: Only a void function can be called with the 'new' keyword. - var obj15: i2 = new Base; - ~~~~~ -!!! error TS2322: Type 'Base' is not assignable to type 'i2'. -!!! error TS2322: Type 'Base' provides no match for the signature '(): any'. - var obj16: i2 = null; - var obj17: i2 = function ():any { return 0; }; - //var obj18: i2 = function foo() { }; - var obj19: i2 = anyVar; - var obj20: i2 = new anyVar; - ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i2'. - ~ -!!! error TS1109: Expression expected. - ~~ -!!! error TS2693: 'i2' only refers to a type, but is being used as a value here. - var obj21: i2 = new {}; - ~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type '{}' has no construct signatures. - // - // Construct Signatures - // - var obj22: i3; - var obj23: i3 = {}; - ~~~~~ -!!! error TS2322: Type '{}' is not assignable to type 'i3'. -!!! error TS2322: Type '{}' provides no match for the signature 'new (): any'. - var obj24: i3 = new Object(); - ~~~~~ -!!! error TS2322: Type 'Object' is not assignable to type 'i3'. -!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? -!!! error TS2322: Type 'Object' provides no match for the signature 'new (): any'. - var obj25: i3 = new obj22; - var obj26: i3 = new Base; - ~~~~~ -!!! error TS2322: Type 'Base' is not assignable to type 'i3'. -!!! error TS2322: Type 'Base' provides no match for the signature 'new (): any'. - var obj27: i3 = null; - var obj28: i3 = function () { }; - ~~~~~ -!!! error TS2322: Type '() => void' is not assignable to type 'i3'. -!!! error TS2322: Type '() => void' provides no match for the signature 'new (): any'. - //var obj29: i3 = function foo() { }; - var obj30: i3 = anyVar; - var obj31: i3 = new anyVar; - ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i3'. - ~ -!!! error TS1109: Expression expected. - ~~ -!!! error TS2693: 'i3' only refers to a type, but is being used as a value here. - var obj32: i3 = new {}; - ~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type '{}' has no construct signatures. - // - // Index Signatures - // - var obj33: i4; - var obj34: i4 = {}; - var obj35: i4 = new Object(); - var obj36: i4 = new obj33; - ~~~~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type 'i4' has no construct signatures. - var obj37: i4 = new Base; - var obj38: i4 = null; - var obj39: i4 = function () { }; - //var obj40: i4 = function foo() { }; - var obj41: i4 = anyVar; - var obj42: i4 = new anyVar; - ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i4'. - ~ -!!! error TS1109: Expression expected. - ~~ -!!! error TS2693: 'i4' only refers to a type, but is being used as a value here. - var obj43: i4 = new {}; - ~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type '{}' has no construct signatures. - // - // Interface Derived I1 - // - var obj44: i5; - var obj45: i5 = {}; - ~~~~~ -!!! error TS2739: Type '{}' is missing the following properties from type 'i5': p, p3, p6 - var obj46: i5 = new Object(); - ~~~~~ -!!! error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? -!!! error TS2696: Type 'Object' is missing the following properties from type 'i5': p, p3, p6 - var obj47: i5 = new obj44; - ~~~~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type 'i5' has no construct signatures. - var obj48: i5 = new Base; - ~~~~~ -!!! error TS2739: Type 'Base' is missing the following properties from type 'i5': p, p3, p6 - var obj49: i5 = null; - var obj50: i5 = function () { }; - ~~~~~ -!!! error TS2322: Type '() => void' is not assignable to type 'i5'. - //var obj51: i5 = function foo() { }; - var obj52: i5 = anyVar; - var obj53: i5 = new anyVar; - ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i5'. - ~ -!!! error TS1109: Expression expected. - ~~ -!!! error TS2693: 'i5' only refers to a type, but is being used as a value here. - var obj54: i5 = new {}; - ~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type '{}' has no construct signatures. - // - // Interface Derived I2 - // - var obj55: i6; - var obj56: i6 = {}; - ~~~~~ -!!! error TS2322: Type '{}' is not assignable to type 'i6'. -!!! error TS2322: Type '{}' provides no match for the signature '(): any'. - var obj57: i6 = new Object(); - ~~~~~ -!!! error TS2322: Type 'Object' is not assignable to type 'i6'. -!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? -!!! error TS2322: Type 'Object' provides no match for the signature '(): any'. - var obj58: i6 = new obj55; - ~~~~~~~~~ -!!! error TS2350: Only a void function can be called with the 'new' keyword. - var obj59: i6 = new Base; - ~~~~~ -!!! error TS2322: Type 'Base' is not assignable to type 'i6'. -!!! error TS2322: Type 'Base' provides no match for the signature '(): any'. - var obj60: i6 = null; - var obj61: i6 = function () { }; - ~~~~~ -!!! error TS2322: Type '() => void' is not assignable to type 'i6'. -!!! error TS2322: Type 'void' is not assignable to type 'number'. - //var obj62: i6 = function foo() { }; - var obj63: i6 = anyVar; - var obj64: i6 = new anyVar; - ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i6'. - ~ -!!! error TS1109: Expression expected. - ~~ -!!! error TS2693: 'i6' only refers to a type, but is being used as a value here. - var obj65: i6 = new {}; - ~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type '{}' has no construct signatures. - // - // Interface Derived I3 - // - var obj66: i7; - var obj67: i7 = {}; - ~~~~~ -!!! error TS2322: Type '{}' is not assignable to type 'i7'. -!!! error TS2322: Type '{}' provides no match for the signature 'new (): any'. - var obj68: i7 = new Object(); - ~~~~~ -!!! error TS2322: Type 'Object' is not assignable to type 'i7'. -!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? -!!! error TS2322: Type 'Object' provides no match for the signature 'new (): any'. - var obj69: i7 = new obj66; - var obj70: i7 = new Base; - ~~~~~~~~~~~~ -!!! error TS2352: Conversion of type 'Base' to type 'i7' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: Type 'Base' provides no match for the signature 'new (): any'. - var obj71: i7 = null; - var obj72: i7 = function () { }; - ~~~~~ -!!! error TS2322: Type '() => void' is not assignable to type 'i7'. -!!! error TS2322: Type '() => void' provides no match for the signature 'new (): any'. - //var obj73: i7 = function foo() { }; - var obj74: i7 = anyVar; - var obj75: i7 = new anyVar; - ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i7'. - ~ -!!! error TS1109: Expression expected. - ~~ -!!! error TS2693: 'i7' only refers to a type, but is being used as a value here. - var obj76: i7 = new {}; - ~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type '{}' has no construct signatures. - // - // Interface Derived I4 - // - var obj77: i8; - var obj78: i8 = {}; - var obj79: i8 = new Object(); - var obj80: i8 = new obj77; - ~~~~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type 'i8' has no construct signatures. - var obj81: i8 = new Base; - var obj82: i8 = null; - var obj83: i8 = function () { }; - //var obj84: i8 = function foo() { }; - var obj85: i8 = anyVar; - var obj86: i8 = new anyVar; - ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i8'. - ~ -!!! error TS1109: Expression expected. - ~~ -!!! error TS2693: 'i8' only refers to a type, but is being used as a value here. - var obj87: i8 = new {}; - ~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type '{}' has no construct signatures. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/literalTypesAndTypeAssertions.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/literalTypesAndTypeAssertions.d.ts deleted file mode 100644 index b2aab4796edde..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/literalTypesAndTypeAssertions.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -//// [tests/cases/conformance/types/literal/literalTypesAndTypeAssertions.ts] //// - -//// [literalTypesAndTypeAssertions.ts] -const obj = { - a: "foo" as "foo", - b: <"foo">"foo", - c: "foo" -}; - -let x1 = 1 as (0 | 1); -let x2 = 1; - -let { a = "foo" } = { a: "foo" }; -let { b = "foo" as "foo" } = { b: "bar" }; -let { c = "foo" } = { c: "bar" as "bar" }; -let { d = "foo" as "foo" } = { d: "bar" as "bar" }; - - -/// [Declarations] //// - - - -//// [literalTypesAndTypeAssertions.d.ts] -declare const obj: { - a: "foo"; - b: "foo"; - c: string; -}; -declare let x1: (0 | 1); -declare let x2: number; -declare let a: invalid; -declare let b: invalid; -declare let c: invalid; -declare let d: invalid; - -/// [Errors] //// - -literalTypesAndTypeAssertions.ts(10,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. -literalTypesAndTypeAssertions.ts(11,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. -literalTypesAndTypeAssertions.ts(12,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. -literalTypesAndTypeAssertions.ts(13,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. - - -==== literalTypesAndTypeAssertions.ts (4 errors) ==== - const obj = { - a: "foo" as "foo", - b: <"foo">"foo", - c: "foo" - }; - - let x1 = 1 as (0 | 1); - let x2 = 1; - - let { a = "foo" } = { a: "foo" }; - ~ -!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. - let { b = "foo" as "foo" } = { b: "bar" }; - ~ -!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. - let { c = "foo" } = { c: "bar" as "bar" }; - ~ -!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. - let { d = "foo" as "foo" } = { d: "bar" as "bar" }; - ~ -!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/moduleResolutionWithSuffixes_one_externalTSModule.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/moduleResolutionWithSuffixes_one_externalTSModule.d.ts deleted file mode 100644 index f8d6a006cb2fd..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/moduleResolutionWithSuffixes_one_externalTSModule.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -//// [tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts] //// - -//// [/test.ts] -import { ios } from "some-library"; - -//// [/node_modules/some-library/index.ios.ts] -export function ios() {} -//// [/node_modules/some-library/index.ts] -export function base() {} - -/// [Declarations] //// - - - -//// [/bin/test.d.ts] -export {}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/noUncheckedIndexedAccess.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/noUncheckedIndexedAccess.d.ts deleted file mode 100644 index 5b6bb77aaab3b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/noUncheckedIndexedAccess.d.ts +++ /dev/null @@ -1,418 +0,0 @@ -//// [tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts] //// - -//// [noUncheckedIndexedAccess.ts] -type CheckBooleanOnly = any; -// Validate CheckBooleanOnly works - should error -type T_ERR1 = CheckBooleanOnly; - -enum NumericEnum1 { A, B, C } -enum NumericEnum2 { A = 0, B = 1 , C = 2 } -enum StringEnum1 { A = "Alpha", B = "Beta" } - -declare const strMap: { [s: string]: boolean }; - -// All of these should be errors -const e1: boolean = strMap["foo"]; -const e2: boolean = strMap.bar; -const e3: boolean = strMap[0]; -const e4: boolean = strMap[0 as string | number]; -const e5: boolean = strMap[0 as string | 0 | 1]; -const e6: boolean = strMap[0 as 0 | 1]; -const e7: boolean = strMap["foo" as "foo" | "baz"]; -const e8: boolean = strMap[NumericEnum1.A]; -const e9: boolean = strMap[NumericEnum2.A]; -const e10: boolean = strMap[StringEnum1.A]; -const e11: boolean = strMap[StringEnum1.A as StringEnum1]; -const e12: boolean = strMap[NumericEnum1.A as NumericEnum1]; -const e13: boolean = strMap[NumericEnum2.A as NumericEnum2]; -const e14: boolean = strMap[null as any]; - -// Should be OK -const ok1: boolean | undefined = strMap["foo"]; -const ok2: boolean | undefined = strMap.bar; - -type T_OK1 = CheckBooleanOnly<(typeof strMap)[string]>; -type T_OK2 = CheckBooleanOnly<(typeof strMap)["foo"]>; -type T_OK3 = CheckBooleanOnly<(typeof strMap)["bar" | "baz"]>; -type T_OK4 = CheckBooleanOnly<(typeof strMap)[number]>; -type T_OK5 = CheckBooleanOnly<(typeof strMap)[any]>; - -// Writes don't allow 'undefined'; all should be errors -strMap["baz"] = undefined; -strMap.qua = undefined; -strMap[0] = undefined; -strMap[null as any] = undefined; - -// Numeric lookups are unaffected -declare const numMap: { [s: number]: boolean }; -// All of these should be ok -const num_ok1: boolean = numMap[0]; -const num_ok2: boolean = numMap[0 as number]; -const num_ok3: boolean = numMap[0 as 0 | 1]; -const num_ok4: boolean = numMap[NumericEnum1.A]; -const num_ok5: boolean = numMap[NumericEnum2.A]; - -// Generics -function generic1(arg: T): boolean { - // Should error - return arg["blah"]; -} -function generic2(arg: T): boolean { - // Should OK - return arg["blah"]!; -} -function generic3(arg: T): boolean { - // Should error - return strMap[arg]; -} - -// Element access into known properties is ok -declare const obj1: { x: string, y: number, [key: string]: string | number }; -obj1["x"]; -const y = "y"; -obj1[y]; -let yy = "y"; -obj1[yy]; -let z = "z"; -obj1[z]; - -// Distributivity cases -declare const strMapUnion: { [s: string]: boolean } | { [s: string]: number }; -// Should error -const f1: boolean | number = strMapUnion["foo"]; - -// Symbol index signatures -declare const s: unique symbol; -declare const symbolMap: { [s]: string }; -const e15: string = symbolMap[s]; // Should OK -symbolMap[s] = undefined; // Should error - -// Variadic tuples -declare const nonEmptyStringArray: [string, ...string[]]; -const variadicOk1: string = nonEmptyStringArray[0]; // Should OK -const variadicError1: string = nonEmptyStringArray[1]; // Should error - -// Generic index type -declare const myRecord1: { a: string; b: string }; -declare const myRecord2: { a: string; b: string, [key: string]: string }; -const fn1 = (key: Key): string => myRecord1[key]; // Should OK -const fn2 = (key: Key): string => myRecord2[key]; // Should OK -const fn3 = (key: Key) => { - myRecord2[key] = undefined; // Should error - const v: string = myRecord2[key]; // Should error -}; - - - -/// [Declarations] //// - - - -//// [noUncheckedIndexedAccess.d.ts] -type CheckBooleanOnly = any; -type T_ERR1 = CheckBooleanOnly; -declare enum NumericEnum1 { - A = 0, - B = 1, - C = 2 -} -declare enum NumericEnum2 { - A = 0, - B = 1, - C = 2 -} -declare enum StringEnum1 { - A = "Alpha", - B = "Beta" -} -declare const strMap: { - [s: string]: boolean; -}; -declare const e1: boolean; -declare const e2: boolean; -declare const e3: boolean; -declare const e4: boolean; -declare const e5: boolean; -declare const e6: boolean; -declare const e7: boolean; -declare const e8: boolean; -declare const e9: boolean; -declare const e10: boolean; -declare const e11: boolean; -declare const e12: boolean; -declare const e13: boolean; -declare const e14: boolean; -declare const ok1: boolean | undefined; -declare const ok2: boolean | undefined; -type T_OK1 = CheckBooleanOnly<(typeof strMap)[string]>; -type T_OK2 = CheckBooleanOnly<(typeof strMap)["foo"]>; -type T_OK3 = CheckBooleanOnly<(typeof strMap)["bar" | "baz"]>; -type T_OK4 = CheckBooleanOnly<(typeof strMap)[number]>; -type T_OK5 = CheckBooleanOnly<(typeof strMap)[any]>; -declare const numMap: { - [s: number]: boolean; -}; -declare const num_ok1: boolean; -declare const num_ok2: boolean; -declare const num_ok3: boolean; -declare const num_ok4: boolean; -declare const num_ok5: boolean; -declare function generic1(arg: T): boolean; -declare function generic2(arg: T): boolean; -declare function generic3(arg: T): boolean; -declare const obj1: { - x: string; - y: number; - [key: string]: string | number; -}; -declare const y = "y"; -declare let yy: string; -declare let z: string; -declare const strMapUnion: { - [s: string]: boolean; -} | { - [s: string]: number; -}; -declare const f1: boolean | number; -declare const s: unique symbol; -declare const symbolMap: { - [s]: string; -}; -declare const e15: string; -declare const nonEmptyStringArray: [string, ...string[]]; -declare const variadicOk1: string; -declare const variadicError1: string; -declare const myRecord1: { - a: string; - b: string; -}; -declare const myRecord2: { - a: string; - b: string; - [key: string]: string; -}; -declare const fn1: (key: Key) => string; -declare const fn2: (key: Key) => string; -declare const fn3: (key: Key) => invalid; - -/// [Errors] //// - -noUncheckedIndexedAccess.ts(3,32): error TS2344: Type 'boolean | undefined' does not satisfy the constraint 'boolean'. - Type 'undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(12,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - Type 'undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(13,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(14,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(15,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(16,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(17,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(18,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(19,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(20,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(21,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(22,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(23,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(24,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(25,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(38,1): error TS2322: Type 'undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(39,1): error TS2322: Type 'undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(40,1): error TS2322: Type 'undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(41,1): error TS2322: Type 'undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(46,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(47,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(48,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(49,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(50,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(55,5): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(63,5): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(79,7): error TS2322: Type 'number | boolean | undefined' is not assignable to type 'number | boolean'. - Type 'undefined' is not assignable to type 'number | boolean'. -noUncheckedIndexedAccess.ts(85,1): error TS2322: Type 'undefined' is not assignable to type 'string'. -noUncheckedIndexedAccess.ts(90,7): error TS2322: Type 'string | undefined' is not assignable to type 'string'. - Type 'undefined' is not assignable to type 'string'. -noUncheckedIndexedAccess.ts(97,13): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -noUncheckedIndexedAccess.ts(98,5): error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. - Type 'undefined' is not assignable to type 'string'. -noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'string | undefined' is not assignable to type 'string'. - Type 'undefined' is not assignable to type 'string'. - - -==== noUncheckedIndexedAccess.ts (32 errors) ==== - type CheckBooleanOnly = any; - // Validate CheckBooleanOnly works - should error - type T_ERR1 = CheckBooleanOnly; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2344: Type 'boolean | undefined' does not satisfy the constraint 'boolean'. -!!! error TS2344: Type 'undefined' is not assignable to type 'boolean'. - - enum NumericEnum1 { A, B, C } - enum NumericEnum2 { A = 0, B = 1 , C = 2 } - enum StringEnum1 { A = "Alpha", B = "Beta" } - - declare const strMap: { [s: string]: boolean }; - - // All of these should be errors - const e1: boolean = strMap["foo"]; - ~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. - const e2: boolean = strMap.bar; - ~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e3: boolean = strMap[0]; - ~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e4: boolean = strMap[0 as string | number]; - ~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e5: boolean = strMap[0 as string | 0 | 1]; - ~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e6: boolean = strMap[0 as 0 | 1]; - ~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e7: boolean = strMap["foo" as "foo" | "baz"]; - ~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e8: boolean = strMap[NumericEnum1.A]; - ~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e9: boolean = strMap[NumericEnum2.A]; - ~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e10: boolean = strMap[StringEnum1.A]; - ~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e11: boolean = strMap[StringEnum1.A as StringEnum1]; - ~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e12: boolean = strMap[NumericEnum1.A as NumericEnum1]; - ~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e13: boolean = strMap[NumericEnum2.A as NumericEnum2]; - ~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e14: boolean = strMap[null as any]; - ~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - - // Should be OK - const ok1: boolean | undefined = strMap["foo"]; - const ok2: boolean | undefined = strMap.bar; - - type T_OK1 = CheckBooleanOnly<(typeof strMap)[string]>; - type T_OK2 = CheckBooleanOnly<(typeof strMap)["foo"]>; - type T_OK3 = CheckBooleanOnly<(typeof strMap)["bar" | "baz"]>; - type T_OK4 = CheckBooleanOnly<(typeof strMap)[number]>; - type T_OK5 = CheckBooleanOnly<(typeof strMap)[any]>; - - // Writes don't allow 'undefined'; all should be errors - strMap["baz"] = undefined; - ~~~~~~~~~~~~~ -!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. - strMap.qua = undefined; - ~~~~~~~~~~ -!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. - strMap[0] = undefined; - ~~~~~~~~~ -!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. - strMap[null as any] = undefined; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. - - // Numeric lookups are unaffected - declare const numMap: { [s: number]: boolean }; - // All of these should be ok - const num_ok1: boolean = numMap[0]; - ~~~~~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const num_ok2: boolean = numMap[0 as number]; - ~~~~~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const num_ok3: boolean = numMap[0 as 0 | 1]; - ~~~~~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const num_ok4: boolean = numMap[NumericEnum1.A]; - ~~~~~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const num_ok5: boolean = numMap[NumericEnum2.A]; - ~~~~~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - - // Generics - function generic1(arg: T): boolean { - // Should error - return arg["blah"]; - ~~~~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - } - function generic2(arg: T): boolean { - // Should OK - return arg["blah"]!; - } - function generic3(arg: T): boolean { - // Should error - return strMap[arg]; - ~~~~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - } - - // Element access into known properties is ok - declare const obj1: { x: string, y: number, [key: string]: string | number }; - obj1["x"]; - const y = "y"; - obj1[y]; - let yy = "y"; - obj1[yy]; - let z = "z"; - obj1[z]; - - // Distributivity cases - declare const strMapUnion: { [s: string]: boolean } | { [s: string]: number }; - // Should error - const f1: boolean | number = strMapUnion["foo"]; - ~~ -!!! error TS2322: Type 'number | boolean | undefined' is not assignable to type 'number | boolean'. -!!! error TS2322: Type 'undefined' is not assignable to type 'number | boolean'. - - // Symbol index signatures - declare const s: unique symbol; - declare const symbolMap: { [s]: string }; - const e15: string = symbolMap[s]; // Should OK - symbolMap[s] = undefined; // Should error - ~~~~~~~~~~~~ -!!! error TS2322: Type 'undefined' is not assignable to type 'string'. - - // Variadic tuples - declare const nonEmptyStringArray: [string, ...string[]]; - const variadicOk1: string = nonEmptyStringArray[0]; // Should OK - const variadicError1: string = nonEmptyStringArray[1]; // Should error - ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'string | undefined' is not assignable to type 'string'. -!!! error TS2322: Type 'undefined' is not assignable to type 'string'. - - // Generic index type - declare const myRecord1: { a: string; b: string }; - declare const myRecord2: { a: string; b: string, [key: string]: string }; - const fn1 = (key: Key): string => myRecord1[key]; // Should OK - const fn2 = (key: Key): string => myRecord2[key]; // Should OK - const fn3 = (key: Key) => { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 noUncheckedIndexedAccess.ts:97:7: Add a type annotation to the variable fn3. -!!! related TS9030 noUncheckedIndexedAccess.ts:97:13: Add a return type to the function expression. - myRecord2[key] = undefined; // Should error - ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. -!!! error TS2322: Type 'undefined' is not assignable to type 'string'. - const v: string = myRecord2[key]; // Should error - ~ -!!! error TS2322: Type 'string | undefined' is not assignable to type 'string'. -!!! error TS2322: Type 'undefined' is not assignable to type 'string'. - }; - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralEnumPropertyNames.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralEnumPropertyNames.d.ts deleted file mode 100644 index cbdd97311130a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralEnumPropertyNames.d.ts +++ /dev/null @@ -1,102 +0,0 @@ -//// [tests/cases/compiler/objectLiteralEnumPropertyNames.ts] //// - -//// [objectLiteralEnumPropertyNames.ts] -// Fixes #16887 -enum Strs { - A = 'a', - B = 'b' -} -type TestStrs = { [key in Strs]: string } -const x: TestStrs = { - [Strs.A]: 'xo', - [Strs.B]: 'xe' -} -const ux = { - [Strs.A]: 'xo', - [Strs.B]: 'xe' -} -const y: TestStrs = { - ['a']: 'yo', - ['b']: 'ye' -} -const a = 'a'; -const b = 'b'; -const z: TestStrs = { - [a]: 'zo', - [b]: 'ze' -} -const uz = { - [a]: 'zo', - [b]: 'ze' -} - -enum Nums { - A, - B -} -type TestNums = { 0: number, 1: number } -const n: TestNums = { - [Nums.A]: 1, - [Nums.B]: 2 -} -const un = { - [Nums.A]: 3, - [Nums.B]: 4 -} -const an = 0; -const bn = 1; -const m: TestNums = { - [an]: 5, - [bn]: 6 -} -const um = { - [an]: 7, - [bn]: 8 -} - - -/// [Declarations] //// - - - -//// [objectLiteralEnumPropertyNames.d.ts] -declare enum Strs { - A = "a", - B = "b" -} -type TestStrs = { - [key in Strs]: string; -}; -declare const x: TestStrs; -declare const ux: { - [Strs.A]: string; - [Strs.B]: string; -}; -declare const y: TestStrs; -declare const a = "a"; -declare const b = "b"; -declare const z: TestStrs; -declare const uz: { - [a]: string; - [b]: string; -}; -declare enum Nums { - A = 0, - B = 1 -} -type TestNums = { - 0: number; - 1: number; -}; -declare const n: TestNums; -declare const un: { - [Nums.A]: number; - [Nums.B]: number; -}; -declare const an = 0; -declare const bn = 1; -declare const m: TestNums; -declare const um: { - [an]: number; - [bn]: number; -}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralGettersAndSetters.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralGettersAndSetters.d.ts deleted file mode 100644 index 23b9da8446033..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/objectLiteralGettersAndSetters.d.ts +++ /dev/null @@ -1,313 +0,0 @@ -//// [tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts] //// - -//// [objectLiteralGettersAndSetters.ts] -// Get and set accessor with the same name -var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; -var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } }; -var sameName3a = { get 0x20() { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; -var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p: string; } }; -var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p: string; } }; -var sameName6a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; - -// PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} -var callSig1 = { num(n: number) { return '' } }; -var callSig1: { num: (n: number) => string; }; -var callSig2 = { num: function (n: number) { return '' } }; -var callSig2: { num: (n: number) => string; }; -var callSig3 = { num: (n: number) => '' }; -var callSig3: { num: (n: number) => string; }; - -// Get accessor only, type of the property is the annotated return type of the get accessor -var getter1 = { get x(): string { return undefined; } }; -var getter1: { readonly x: string; } - -// Get accessor only, type of the property is the inferred return type of the get accessor -var getter2 = { get x() { return ''; } }; -var getter2: { readonly x: string; } - -// Set accessor only, type of the property is the param type of the set accessor -var setter1 = { set x(n: number) { } }; -var setter1: { x: number }; - -// Set accessor only, type of the property is Any for an unannotated set accessor -var setter2 = { set x(n) { } }; -var setter2: { x: any }; - -var anyVar: any; -// Get and set accessor with matching type annotations -var sameType1 = { get x(): string { return undefined; }, set x(n: string) { } }; -var sameType2 = { get x(): Array { return undefined; }, set x(n: number[]) { } }; -var sameType3 = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; -var sameType4 = { get x(): Date { return undefined; }, set x(n: Date) { } }; - -// Type of unannotated get accessor return type is the type annotation of the set accessor param -var setParamType1 = { - set n(x: (t: string) => void) { }, - get n() { return (t) => { - var p: string; - var p = t; - } - } -}; -var setParamType2 = { - get n() { return (t) => { - var p: string; - var p = t; - } - }, - set n(x: (t: string) => void) { } -}; - -// Type of unannotated set accessor parameter is the return type annotation of the get accessor -var getParamType1 = { - set n(x) { - var y = x; - var y: string; - }, - get n() { return ''; } -}; -var getParamType2 = { - get n() { return ''; }, - set n(x) { - var y = x; - var y: string; - } -}; - -// Type of unannotated accessors is the inferred return type of the get accessor -var getParamType3 = { - get n() { return ''; }, - set n(x) { - var y = x; - var y: string; - } -}; - - - -/// [Declarations] //// - - - -//// [objectLiteralGettersAndSetters.d.ts] -declare var sameName1a: invalid; -declare var sameName2a: invalid; -declare var sameName3a: invalid; -declare var sameName4a: invalid; -declare var sameName5a: invalid; -declare var sameName6a: invalid; -declare var callSig1: invalid; -declare var callSig1: { - num: (n: number) => string; -}; -declare var callSig2: invalid; -declare var callSig2: { - num: (n: number) => string; -}; -declare var callSig3: invalid; -declare var callSig3: { - num: (n: number) => string; -}; -declare var getter1: { - readonly x: string; -}; -declare var getter1: { - readonly x: string; -}; -declare var getter2: invalid; -declare var getter2: { - readonly x: string; -}; -declare var setter1: { - x: number; -}; -declare var setter1: { - x: number; -}; -declare var setter2: invalid; -declare var setter2: { - x: any; -}; -declare var anyVar: any; -declare var sameType1: { - get x(): string; - set x(n: string); -}; -declare var sameType2: { - get x(): Array; - set x(n: number[]); -}; -declare var sameType3: { - get x(): any; - set x(n: typeof anyVar); -}; -declare var sameType4: { - get x(): Date; - set x(n: Date); -}; -declare var setParamType1: { - n: (t: string) => void; -}; -declare var setParamType2: { - n: (t: string) => void; -}; -declare var getParamType1: invalid; -declare var getParamType2: invalid; -declare var getParamType3: invalid; - -/// [Errors] //// - -objectLiteralGettersAndSetters.ts(2,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(3,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(4,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(5,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(6,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(7,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(10,18): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(12,23): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(14,23): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(22,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(30,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(64,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(67,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(76,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - -==== objectLiteralGettersAndSetters.ts (14 errors) ==== - // Get and set accessor with the same name - var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 objectLiteralGettersAndSetters.ts:2:50: Add a type to parameter of the set accessor declaration. -!!! related TS9032 objectLiteralGettersAndSetters.ts:2:24: Add a return type to the get accessor declaration. - var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } }; - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 objectLiteralGettersAndSetters.ts:3:50: Add a type to parameter of the set accessor declaration. -!!! related TS9032 objectLiteralGettersAndSetters.ts:3:24: Add a return type to the get accessor declaration. - var sameName3a = { get 0x20() { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; - ~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 objectLiteralGettersAndSetters.ts:4:51: Add a type to parameter of the set accessor declaration. -!!! related TS9032 objectLiteralGettersAndSetters.ts:4:24: Add a return type to the get accessor declaration. - var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p: string; } }; - ~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 objectLiteralGettersAndSetters.ts:5:49: Add a type to parameter of the set accessor declaration. -!!! related TS9032 objectLiteralGettersAndSetters.ts:5:24: Add a return type to the get accessor declaration. - var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p: string; } }; - ~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 objectLiteralGettersAndSetters.ts:6:51: Add a type to parameter of the set accessor declaration. -!!! related TS9032 objectLiteralGettersAndSetters.ts:6:24: Add a return type to the get accessor declaration. - var sameName6a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 objectLiteralGettersAndSetters.ts:7:50: Add a type to parameter of the set accessor declaration. -!!! related TS9032 objectLiteralGettersAndSetters.ts:7:24: Add a return type to the get accessor declaration. - - // PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} - var callSig1 = { num(n: number) { return '' } }; - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 objectLiteralGettersAndSetters.ts:10:5: Add a type annotation to the variable callSig1. -!!! related TS9034 objectLiteralGettersAndSetters.ts:10:18: Add a return type to the method - var callSig1: { num: (n: number) => string; }; - var callSig2 = { num: function (n: number) { return '' } }; - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 objectLiteralGettersAndSetters.ts:12:5: Add a type annotation to the variable callSig2. -!!! related TS9030 objectLiteralGettersAndSetters.ts:12:23: Add a return type to the function expression. - var callSig2: { num: (n: number) => string; }; - var callSig3 = { num: (n: number) => '' }; - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 objectLiteralGettersAndSetters.ts:14:5: Add a type annotation to the variable callSig3. -!!! related TS9030 objectLiteralGettersAndSetters.ts:14:23: Add a return type to the function expression. - var callSig3: { num: (n: number) => string; }; - - // Get accessor only, type of the property is the annotated return type of the get accessor - var getter1 = { get x(): string { return undefined; } }; - var getter1: { readonly x: string; } - - // Get accessor only, type of the property is the inferred return type of the get accessor - var getter2 = { get x() { return ''; } }; - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 objectLiteralGettersAndSetters.ts:22:21: Add a return type to the get accessor declaration. - var getter2: { readonly x: string; } - - // Set accessor only, type of the property is the param type of the set accessor - var setter1 = { set x(n: number) { } }; - var setter1: { x: number }; - - // Set accessor only, type of the property is Any for an unannotated set accessor - var setter2 = { set x(n) { } }; - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 objectLiteralGettersAndSetters.ts:30:21: Add a type to parameter of the set accessor declaration. - var setter2: { x: any }; - - var anyVar: any; - // Get and set accessor with matching type annotations - var sameType1 = { get x(): string { return undefined; }, set x(n: string) { } }; - var sameType2 = { get x(): Array { return undefined; }, set x(n: number[]) { } }; - var sameType3 = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; - var sameType4 = { get x(): Date { return undefined; }, set x(n: Date) { } }; - - // Type of unannotated get accessor return type is the type annotation of the set accessor param - var setParamType1 = { - set n(x: (t: string) => void) { }, - get n() { return (t) => { - var p: string; - var p = t; - } - } - }; - var setParamType2 = { - get n() { return (t) => { - var p: string; - var p = t; - } - }, - set n(x: (t: string) => void) { } - }; - - // Type of unannotated set accessor parameter is the return type annotation of the get accessor - var getParamType1 = { - set n(x) { - var y = x; - var y: string; - }, - get n() { return ''; } - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 objectLiteralGettersAndSetters.ts:60:9: Add a type to parameter of the set accessor declaration. -!!! related TS9032 objectLiteralGettersAndSetters.ts:64:9: Add a return type to the get accessor declaration. - }; - var getParamType2 = { - get n() { return ''; }, - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 objectLiteralGettersAndSetters.ts:68:9: Add a type to parameter of the set accessor declaration. -!!! related TS9032 objectLiteralGettersAndSetters.ts:67:9: Add a return type to the get accessor declaration. - set n(x) { - var y = x; - var y: string; - } - }; - - // Type of unannotated accessors is the inferred return type of the get accessor - var getParamType3 = { - get n() { return ''; }, - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 objectLiteralGettersAndSetters.ts:77:9: Add a type to parameter of the set accessor declaration. -!!! related TS9032 objectLiteralGettersAndSetters.ts:76:9: Add a return type to the get accessor declaration. - set n(x) { - var y = x; - var y: string; - } - }; - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/optionalChainingInference.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/optionalChainingInference.d.ts deleted file mode 100644 index bf08ff776c50e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/optionalChainingInference.d.ts +++ /dev/null @@ -1,140 +0,0 @@ -//// [tests/cases/conformance/expressions/optionalChaining/optionalChainingInference.ts] //// - -//// [optionalChainingInference.ts] -// https://github.com/microsoft/TypeScript/issues/34579 -declare function unbox(box: { value: T | undefined }): T; -declare const su: string | undefined; -declare const fnu: (() => number) | undefined; -declare const osu: { prop: string } | undefined; -declare const ofnu: { prop: () => number } | undefined; - -const b1 = { value: su?.length }; -const v1: number = unbox(b1); - -const b2 = { value: su?.length as number | undefined }; -const v2: number = unbox(b2); - -const b3: { value: number | undefined } = { value: su?.length }; -const v3: number = unbox(b3); - -const b4 = { value: fnu?.() }; -const v4: number = unbox(b4); - -const b5 = { value: su?.["length"] }; -const v5: number = unbox(b5); - -const b6 = { value: osu?.prop.length }; -const v6: number = unbox(b6); - -const b7 = { value: osu?.prop["length"] }; -const v7: number = unbox(b7); - -const b8 = { value: ofnu?.prop() }; -const v8: number = unbox(b8); - - - -/// [Declarations] //// - - - -//// [optionalChainingInference.d.ts] -declare function unbox(box: { - value: T | undefined; -}): T; -declare const su: string | undefined; -declare const fnu: (() => number) | undefined; -declare const osu: { - prop: string; -} | undefined; -declare const ofnu: { - prop: () => number; -} | undefined; -declare const b1: invalid; -declare const v1: number; -declare const b2: { - value: number | undefined; -}; -declare const v2: number; -declare const b3: { - value: number | undefined; -}; -declare const v3: number; -declare const b4: invalid; -declare const v4: number; -declare const b5: invalid; -declare const v5: number; -declare const b6: invalid; -declare const v6: number; -declare const b7: invalid; -declare const v7: number; -declare const b8: invalid; -declare const v8: number; - -/// [Errors] //// - -optionalChainingInference.ts(8,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -optionalChainingInference.ts(17,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -optionalChainingInference.ts(20,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -optionalChainingInference.ts(23,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -optionalChainingInference.ts(26,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -optionalChainingInference.ts(29,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. - - -==== optionalChainingInference.ts (6 errors) ==== - // https://github.com/microsoft/TypeScript/issues/34579 - declare function unbox(box: { value: T | undefined }): T; - declare const su: string | undefined; - declare const fnu: (() => number) | undefined; - declare const osu: { prop: string } | undefined; - declare const ofnu: { prop: () => number } | undefined; - - const b1 = { value: su?.length }; - ~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 optionalChainingInference.ts:8:7: Add a type annotation to the variable b1. -!!! related TS9035 optionalChainingInference.ts:8:21: Add a type assertion to this expression to make type type explicit. - const v1: number = unbox(b1); - - const b2 = { value: su?.length as number | undefined }; - const v2: number = unbox(b2); - - const b3: { value: number | undefined } = { value: su?.length }; - const v3: number = unbox(b3); - - const b4 = { value: fnu?.() }; - ~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 optionalChainingInference.ts:17:7: Add a type annotation to the variable b4. -!!! related TS9035 optionalChainingInference.ts:17:21: Add a type assertion to this expression to make type type explicit. - const v4: number = unbox(b4); - - const b5 = { value: su?.["length"] }; - ~~~~~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 optionalChainingInference.ts:20:7: Add a type annotation to the variable b5. -!!! related TS9035 optionalChainingInference.ts:20:21: Add a type assertion to this expression to make type type explicit. - const v5: number = unbox(b5); - - const b6 = { value: osu?.prop.length }; - ~~~~~~~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 optionalChainingInference.ts:23:7: Add a type annotation to the variable b6. -!!! related TS9035 optionalChainingInference.ts:23:21: Add a type assertion to this expression to make type type explicit. - const v6: number = unbox(b6); - - const b7 = { value: osu?.prop["length"] }; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 optionalChainingInference.ts:26:7: Add a type annotation to the variable b7. -!!! related TS9035 optionalChainingInference.ts:26:21: Add a type assertion to this expression to make type type explicit. - const v7: number = unbox(b7); - - const b8 = { value: ofnu?.prop() }; - ~~~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 optionalChainingInference.ts:29:7: Add a type annotation to the variable b8. -!!! related TS9035 optionalChainingInference.ts:29:21: Add a type assertion to this expression to make type type explicit. - const v8: number = unbox(b8); - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts deleted file mode 100644 index 61f85a17b43db..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/overloadsWithComputedNames.d.ts +++ /dev/null @@ -1,207 +0,0 @@ -//// [tests/cases/compiler/overloadsWithComputedNames.ts] //// - -//// [overloadsWithComputedNames.ts] -// https://github.com/microsoft/TypeScript/issues/52329 -class Person { - ["B"](a: number): string; - ["A"](a: string|number): number | string { - return 0; - } -} -let p = new Person(); -p.A(0) -p.B(0) - -// https://github.com/microsoft/TypeScript/issues/17345 -class C { - ["foo"](): void - ["bar"](): void; - ["foo"]() { - return 0; - } -} - -declare const uniqueSym: unique symbol; -declare const uniqueSym2: unique symbol; -declare const sym: symbol; - -declare const strUnion: 'foo' | 'bar'; - -class C1 { - [sym](): void; // should error - [uniqueSym2](): void; // should error - [uniqueSym](): void; - [uniqueSym]() { } -} - -interface I1 { - [sym](): void; // should error - [uniqueSym2](): void; - [uniqueSym](): void; - [uniqueSym](): void; -} - -class C2 { - [strUnion](): void; // should error - [strUnion]() { } -} - -class I2 { - [strUnion](): void; // should error - [strUnion]() { } -} - -class C3 { - [1](): void; // should error - [2](): void; - [2]() { } -} - -interface I3 { - [1](): void; - [2](): void; - [2](): void; -} - -/// [Declarations] //// - - - -//// [overloadsWithComputedNames.d.ts] -declare class Person { - ["B"](a: number): string; - ["A"](a: string | number): number | string; -} -declare let p: invalid; -declare class C { - ["foo"](): void; - ["bar"](): void; -} -declare const uniqueSym: unique symbol; -declare const uniqueSym2: unique symbol; -declare const sym: symbol; -declare const strUnion: 'foo' | 'bar'; -declare class C1 { - [sym](): void; - [uniqueSym2](): void; - [uniqueSym](): void; -} -interface I1 { - [sym](): void; - [uniqueSym2](): void; - [uniqueSym](): void; - [uniqueSym](): void; -} -declare class C2 { - [strUnion](): void; -} -declare class I2 { - [strUnion](): void; -} -declare class C3 { - [1](): void; - [2](): void; -} -interface I3 { - [1](): void; - [2](): void; - [2](): void; -} - -/// [Errors] //// - -overloadsWithComputedNames.ts(4,5): error TS2389: Function implementation name must be '["B"]'. -overloadsWithComputedNames.ts(8,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -overloadsWithComputedNames.ts(14,5): error TS2391: Function implementation is missing or not immediately following the declaration. -overloadsWithComputedNames.ts(16,5): error TS2389: Function implementation name must be '["bar"]'. -overloadsWithComputedNames.ts(28,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -overloadsWithComputedNames.ts(29,5): error TS2391: Function implementation is missing or not immediately following the declaration. -overloadsWithComputedNames.ts(35,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. -overloadsWithComputedNames.ts(42,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -overloadsWithComputedNames.ts(47,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is missing or not immediately following the declaration. - - -==== overloadsWithComputedNames.ts (10 errors) ==== - // https://github.com/microsoft/TypeScript/issues/52329 - class Person { - ["B"](a: number): string; - ["A"](a: string|number): number | string { - ~~~~~ -!!! error TS2389: Function implementation name must be '["B"]'. - return 0; - } - } - let p = new Person(); - ~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 overloadsWithComputedNames.ts:8:5: Add a type annotation to the variable p. - p.A(0) - p.B(0) - - // https://github.com/microsoft/TypeScript/issues/17345 - class C { - ["foo"](): void - ~~~~~~~ -!!! error TS2391: Function implementation is missing or not immediately following the declaration. - ["bar"](): void; - ["foo"]() { - ~~~~~~~ -!!! error TS2389: Function implementation name must be '["bar"]'. - return 0; - } - } - - declare const uniqueSym: unique symbol; - declare const uniqueSym2: unique symbol; - declare const sym: symbol; - - declare const strUnion: 'foo' | 'bar'; - - class C1 { - [sym](): void; // should error - ~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - [uniqueSym2](): void; // should error - ~~~~~~~~~~~~ -!!! error TS2391: Function implementation is missing or not immediately following the declaration. - [uniqueSym](): void; - [uniqueSym]() { } - } - - interface I1 { - [sym](): void; // should error - ~~~~~ -!!! 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. - [uniqueSym2](): void; - [uniqueSym](): void; - [uniqueSym](): void; - } - - class C2 { - [strUnion](): void; // should error - ~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - [strUnion]() { } - } - - class I2 { - [strUnion](): void; // should error - ~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - [strUnion]() { } - } - - class C3 { - [1](): void; // should error - ~~~ -!!! error TS2391: Function implementation is missing or not immediately following the declaration. - [2](): void; - [2]() { } - } - - interface I3 { - [1](): void; - [2](): void; - [2](): void; - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNonNullableTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNonNullableTypes.d.ts deleted file mode 100644 index 8740bde888fb7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNonNullableTypes.d.ts +++ /dev/null @@ -1,131 +0,0 @@ -//// [tests/cases/compiler/parseInvalidNonNullableTypes.ts] //// - -//// [parseInvalidNonNullableTypes.ts] -function f1(a: string): a is string! { - return true; -} - -function f2(a: string): a is !string { - return true; -} - -function f3(a: string!) {} -function f4(a: number!) {} - -function f5(a: !string) {} -function f6(a: !number) {} - -function f7(): string! {} -function f8(): !string {} - -const a = 1 as any!; -const b: number! = 1; - -const c = 1 as !any; -const d: !number = 1; - - -/// [Declarations] //// - - - -//// [parseInvalidNonNullableTypes.d.ts] -declare function f1(a: string): a is !string; -declare function f2(a: string): a is !string; -declare function f3(a: !string): invalid; -declare function f4(a: !number): invalid; -declare function f5(a: !string): invalid; -declare function f6(a: !number): invalid; -declare function f7(): !string; -declare function f8(): !string; -declare const a: !any; -declare const b: !number; -declare const c: !any; -declare const d: !number; - -/// [Errors] //// - -parseInvalidNonNullableTypes.ts(1,30): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(5,30): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(9,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -parseInvalidNonNullableTypes.ts(9,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(10,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -parseInvalidNonNullableTypes.ts(10,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? -parseInvalidNonNullableTypes.ts(12,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -parseInvalidNonNullableTypes.ts(12,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -parseInvalidNonNullableTypes.ts(13,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? -parseInvalidNonNullableTypes.ts(15,16): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. -parseInvalidNonNullableTypes.ts(15,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(16,16): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. -parseInvalidNonNullableTypes.ts(16,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(18,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'any'? -parseInvalidNonNullableTypes.ts(19,10): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? -parseInvalidNonNullableTypes.ts(21,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'any'? -parseInvalidNonNullableTypes.ts(22,10): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? - - -==== parseInvalidNonNullableTypes.ts (18 errors) ==== - function f1(a: string): a is string! { - ~~~~~~~ -!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? - return true; - } - - function f2(a: string): a is !string { - ~~~~~~~ -!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? - return true; - } - - function f3(a: string!) {} - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parseInvalidNonNullableTypes.ts:9:10: Add a return type to the function declaration. - ~~~~~~~ -!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? - function f4(a: number!) {} - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parseInvalidNonNullableTypes.ts:10:10: Add a return type to the function declaration. - ~~~~~~~ -!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? - - function f5(a: !string) {} - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parseInvalidNonNullableTypes.ts:12:10: Add a return type to the function declaration. - ~~~~~~~ -!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? - function f6(a: !number) {} - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parseInvalidNonNullableTypes.ts:13:10: Add a return type to the function declaration. - ~~~~~~~ -!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? - - function f7(): string! {} - ~~~~~~~ -!!! error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. - ~~~~~~~ -!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? - function f8(): !string {} - ~~~~~~~ -!!! error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. - ~~~~~~~ -!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? - - const a = 1 as any!; - ~~~~ -!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'any'? - const b: number! = 1; - ~~~~~~~ -!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? - - const c = 1 as !any; - ~~~~ -!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'any'? - const d: !number = 1; - ~~~~~~~ -!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNullableTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNullableTypes.d.ts deleted file mode 100644 index c6fa83353795d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parseInvalidNullableTypes.d.ts +++ /dev/null @@ -1,147 +0,0 @@ -//// [tests/cases/compiler/parseInvalidNullableTypes.ts] //// - -//// [parseInvalidNullableTypes.ts] -function f1(a: string): a is ?string { - return true; -} - -function f2(a: string?) {} -function f3(a: number?) {} - -function f4(a: ?string) {} -function f5(a: ?number) {} - -function f6(a: string): ?string { - return true; -} - -const a = 1 as any?; -const b: number? = 1; - -const c = 1 as ?any; -const d: ?number = 1; - -let e: unknown?; -let f: never?; -let g: void?; -let h: undefined?; - - -/// [Declarations] //// - - - -//// [parseInvalidNullableTypes.d.ts] -declare function f1(a: string): a is ?string; -declare function f2(a: ?string): invalid; -declare function f3(a: ?number): invalid; -declare function f4(a: ?string): invalid; -declare function f5(a: ?number): invalid; -declare function f6(a: string): ?string; -declare const a: ?any; -declare const b: ?number; -declare const c: ?any; -declare const d: ?number; -declare let e: ?unknown; -declare let f: ?never; -declare let g: ?void; -declare let h: ?undefined; - -/// [Errors] //// - -parseInvalidNullableTypes.ts(1,30): error TS2677: A type predicate's type must be assignable to its parameter's type. - Type 'string | null' is not assignable to type 'string'. - Type 'null' is not assignable to type 'string'. -parseInvalidNullableTypes.ts(1,30): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? -parseInvalidNullableTypes.ts(5,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -parseInvalidNullableTypes.ts(5,16): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string | undefined'? -parseInvalidNullableTypes.ts(6,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -parseInvalidNullableTypes.ts(6,16): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? -parseInvalidNullableTypes.ts(8,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -parseInvalidNullableTypes.ts(8,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? -parseInvalidNullableTypes.ts(9,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -parseInvalidNullableTypes.ts(9,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? -parseInvalidNullableTypes.ts(11,25): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? -parseInvalidNullableTypes.ts(12,5): error TS2322: Type 'boolean' is not assignable to type 'string'. -parseInvalidNullableTypes.ts(15,16): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'any'? -parseInvalidNullableTypes.ts(16,10): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? -parseInvalidNullableTypes.ts(18,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'any'? -parseInvalidNullableTypes.ts(19,10): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? -parseInvalidNullableTypes.ts(21,8): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'unknown'? -parseInvalidNullableTypes.ts(22,8): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'never'? -parseInvalidNullableTypes.ts(23,8): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'void'? -parseInvalidNullableTypes.ts(24,8): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'undefined'? - - -==== parseInvalidNullableTypes.ts (20 errors) ==== - function f1(a: string): a is ?string { - ~~~~~~~ -!!! error TS2677: A type predicate's type must be assignable to its parameter's type. -!!! error TS2677: Type 'string | null' is not assignable to type 'string'. -!!! error TS2677: Type 'null' is not assignable to type 'string'. - ~~~~~~~ -!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? - return true; - } - - function f2(a: string?) {} - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parseInvalidNullableTypes.ts:5:10: Add a return type to the function declaration. - ~~~~~~~ -!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string | undefined'? - function f3(a: number?) {} - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parseInvalidNullableTypes.ts:6:10: Add a return type to the function declaration. - ~~~~~~~ -!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? - - function f4(a: ?string) {} - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parseInvalidNullableTypes.ts:8:10: Add a return type to the function declaration. - ~~~~~~~ -!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? - function f5(a: ?number) {} - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parseInvalidNullableTypes.ts:9:10: Add a return type to the function declaration. - ~~~~~~~ -!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? - - function f6(a: string): ?string { - ~~~~~~~ -!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? - return true; - ~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'string'. - } - - const a = 1 as any?; - ~~~~ -!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'any'? - const b: number? = 1; - ~~~~~~~ -!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? - - const c = 1 as ?any; - ~~~~ -!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'any'? - const d: ?number = 1; - ~~~~~~~ -!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? - - let e: unknown?; - ~~~~~~~~ -!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'unknown'? - let f: never?; - ~~~~~~ -!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'never'? - let g: void?; - ~~~~~ -!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'void'? - let h: undefined?; - ~~~~~~~~~~ -!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'undefined'? - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseTypes.d.ts deleted file mode 100644 index b0c20fae6632e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parseTypes.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -//// [tests/cases/compiler/parseTypes.ts] //// - -//// [parseTypes.ts] -var x = <() => number>null; -var y = <{(): number; }>null; -var z = <{new(): number; }>null -var w = <{[x:number]: number; }>null -function f() { return 3 }; -function g(s: string) { true }; -y=f; -y=g; -x=g; -w=g; -z=g; - - -/// [Declarations] //// - - - -//// [parseTypes.d.ts] -declare var x: () => number; -declare var y: { - (): number; -}; -declare var z: { - new (): number; -}; -declare var w: { - [x: number]: number; -}; -declare function f(): invalid; -declare function g(s: string): invalid; - -/// [Errors] //// - -parseTypes.ts(5,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -parseTypes.ts(6,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -parseTypes.ts(8,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. - Target signature provides too few arguments. Expected 1 or more, but got 0. -parseTypes.ts(9,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. - Target signature provides too few arguments. Expected 1 or more, but got 0. -parseTypes.ts(10,1): error TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }'. - Index signature for type 'number' is missing in type '(s: string) => void'. -parseTypes.ts(11,1): error TS2322: Type '(s: string) => void' is not assignable to type 'new () => number'. - Type '(s: string) => void' provides no match for the signature 'new (): number'. - - -==== parseTypes.ts (6 errors) ==== - var x = <() => number>null; - var y = <{(): number; }>null; - var z = <{new(): number; }>null - var w = <{[x:number]: number; }>null - function f() { return 3 }; - ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parseTypes.ts:5:10: Add a return type to the function declaration. - function g(s: string) { true }; - ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parseTypes.ts:6:10: Add a return type to the function declaration. - y=f; - y=g; - ~ -!!! error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. -!!! error TS2322: Target signature provides too few arguments. Expected 1 or more, but got 0. - x=g; - ~ -!!! error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. -!!! error TS2322: Target signature provides too few arguments. Expected 1 or more, but got 0. - w=g; - ~ -!!! error TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }'. -!!! error TS2322: Index signature for type 'number' is missing in type '(s: string) => void'. - z=g; - ~ -!!! error TS2322: Type '(s: string) => void' is not assignable to type 'new () => number'. -!!! error TS2322: Type '(s: string) => void' provides no match for the signature 'new (): number'. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName1.d.ts deleted file mode 100644 index 967d9847b85c5..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName1.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName1.ts] //// - -//// [parserComputedPropertyName1.ts] -var v = { [e] }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName1.d.ts] -declare var v: invalid; - -/// [Errors] //// - -parserComputedPropertyName1.ts(1,12): error TS2304: Cannot find name 'e'. -parserComputedPropertyName1.ts(1,15): error TS1005: ':' expected. - - -==== parserComputedPropertyName1.ts (2 errors) ==== - var v = { [e] }; - ~ -!!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS1005: ':' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName10.d.ts deleted file mode 100644 index 52a6ab804ba46..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName10.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts] //// - -//// [parserComputedPropertyName10.ts] -class C { - [e] = 1 -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName10.d.ts] -declare class C { - [e]: number; -} - -/// [Errors] //// - -parserComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName10.ts (2 errors) ==== - class C { - [e] = 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 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName13.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName13.d.ts deleted file mode 100644 index b4a6ce40d3184..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName13.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts] //// - -//// [parserComputedPropertyName13.ts] -var v: { [e]: number }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName13.d.ts] -declare var v: { - [e]: number; -}; - -/// [Errors] //// - -parserComputedPropertyName13.ts(1,10): 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. -parserComputedPropertyName13.ts(1,11): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName13.ts (2 errors) ==== - var v: { [e]: number }; - ~~~ -!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName14.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName14.d.ts deleted file mode 100644 index 62e2f40c3ecdf..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName14.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts] //// - -//// [parserComputedPropertyName14.ts] -var v: { [e](): number }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName14.d.ts] -declare var v: { - [e](): number; -}; - -/// [Errors] //// - -parserComputedPropertyName14.ts(1,10): 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. -parserComputedPropertyName14.ts(1,11): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName14.ts (2 errors) ==== - var v: { [e](): number }; - ~~~ -!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName15.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName15.d.ts deleted file mode 100644 index 7300b84646dca..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName15.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts] //// - -//// [parserComputedPropertyName15.ts] -var v: { [e: number]: string; [e]: number }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName15.d.ts] -declare var v: { - [e: number]: string; - [e]: number; -}; - -/// [Errors] //// - -parserComputedPropertyName15.ts(1,31): 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. -parserComputedPropertyName15.ts(1,32): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName15.ts (2 errors) ==== - var v: { [e: number]: string; [e]: number }; - ~~~ -!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName18.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName18.d.ts deleted file mode 100644 index c2bff76748ac3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName18.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts] //// - -//// [parserComputedPropertyName18.ts] -var v: { [e]?(): number }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName18.d.ts] -declare var v: { - [e]?(): number; -}; - -/// [Errors] //// - -parserComputedPropertyName18.ts(1,10): 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. -parserComputedPropertyName18.ts(1,11): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName18.ts (2 errors) ==== - var v: { [e]?(): number }; - ~~~ -!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName19.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName19.d.ts deleted file mode 100644 index 8d5a0fc326d61..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName19.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts] //// - -//// [parserComputedPropertyName19.ts] -var v: { [e]? }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName19.d.ts] -declare var v: { - [e]?: any; -}; - -/// [Errors] //// - -parserComputedPropertyName19.ts(1,10): 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. -parserComputedPropertyName19.ts(1,11): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName19.ts (2 errors) ==== - var v: { [e]? }; - ~~~ -!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName2.d.ts deleted file mode 100644 index aa62c99329405..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName2.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts] //// - -//// [parserComputedPropertyName2.ts] -var v = { [e]: 1 }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName2.d.ts] -declare var v: { - [e]: number; -}; - -/// [Errors] //// - -parserComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName2.ts (1 errors) ==== - var v = { [e]: 1 }; - ~ -!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName20.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName20.d.ts deleted file mode 100644 index 551b62cf8f19e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName20.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts] //// - -//// [parserComputedPropertyName20.ts] -interface I { - [e](): number -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName20.d.ts] -interface I { - [e](): number; -} - -/// [Errors] //// - -parserComputedPropertyName20.ts(2,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. -parserComputedPropertyName20.ts(2,6): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName20.ts (2 errors) ==== - interface I { - [e](): number - ~~~ -!!! 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 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName21.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName21.d.ts deleted file mode 100644 index 884032d23171e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName21.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts] //// - -//// [parserComputedPropertyName21.ts] -interface I { - [e]: number -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName21.d.ts] -interface I { - [e]: number; -} - -/// [Errors] //// - -parserComputedPropertyName21.ts(2,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. -parserComputedPropertyName21.ts(2,6): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName21.ts (2 errors) ==== - interface I { - [e]: number - ~~~ -!!! 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 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName22.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName22.d.ts deleted file mode 100644 index 3551611db6a9f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName22.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts] //// - -//// [parserComputedPropertyName22.ts] -declare class C { - [e]: number -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName22.d.ts] -declare class C { - [e]: number; -} - -/// [Errors] //// - -parserComputedPropertyName22.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName22.ts(2,6): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName22.ts (2 errors) ==== - declare class C { - [e]: number - ~~~ -!!! 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 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName23.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName23.d.ts deleted file mode 100644 index fb1de357011c9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName23.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts] //// - -//// [parserComputedPropertyName23.ts] -declare class C { - get [e](): number -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName23.d.ts] -declare class C { - get [e](): number; -} - -/// [Errors] //// - -parserComputedPropertyName23.ts(2,10): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName23.ts (1 errors) ==== - declare class C { - get [e](): number - ~ -!!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts deleted file mode 100644 index f605361de6b84..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName24.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts] //// - -//// [parserComputedPropertyName24.ts] -class C { - set [e](v) { } -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName24.d.ts] -declare class C { - set [e](v: invalid); -} - -/// [Errors] //// - -parserComputedPropertyName24.ts(2,10): error TS2304: Cannot find name 'e'. -parserComputedPropertyName24.ts(2,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - -==== parserComputedPropertyName24.ts (2 errors) ==== - class C { - set [e](v) { } - ~ -!!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 parserComputedPropertyName24.ts:2:9: Add a type to parameter of the set accessor declaration. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts deleted file mode 100644 index 21a0669ce57d8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName25.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts] //// - -//// [parserComputedPropertyName25.ts] -class C { - // No ASI - [e] = 0 - [e2] = 1 -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName25.d.ts] -declare class C { - [e]: invalid; -} - -/// [Errors] //// - -parserComputedPropertyName25.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName25.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName25.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. - - -==== parserComputedPropertyName25.ts (4 errors) ==== - class C { - // No ASI - [e] = 0 - ~~~ -!!! 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 'e'. - ~ - [e2] = 1 - ~~~~~~~~~~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9029 parserComputedPropertyName25.ts:3:5: Add a type annotation to the property [e]. - ~~ -!!! error TS2304: Cannot find name 'e2'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts deleted file mode 100644 index 02d375af29d59..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName27.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts] //// - -//// [parserComputedPropertyName27.ts] -class C { - // No ASI - [e]: number = 0 - [e2]: number -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName27.d.ts] -declare class C { - [e]: number; - number: invalid; -} - -/// [Errors] //// - -parserComputedPropertyName27.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName27.ts(4,6): error TS2304: Cannot find name 'e2'. -parserComputedPropertyName27.ts(4,9): error TS1005: ';' expected. -parserComputedPropertyName27.ts(4,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. - - -==== parserComputedPropertyName27.ts (4 errors) ==== - class C { - // No ASI - [e]: number = 0 - ~ -!!! error TS2304: Cannot find name 'e'. - [e2]: number - ~~ -!!! error TS2304: Cannot find name 'e2'. - ~ -!!! error TS1005: ';' expected. - ~~~~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9029 parserComputedPropertyName27.ts:4:11: Add a type annotation to the property number. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName28.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName28.d.ts deleted file mode 100644 index 9c461a72935b9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName28.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts] //// - -//// [parserComputedPropertyName28.ts] -class C { - [e]: number = 0; - [e2]: number -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName28.d.ts] -declare class C { - [e]: number; - [e2]: number; -} - -/// [Errors] //// - -parserComputedPropertyName28.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName28.ts(2,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName28.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName28.ts(3,6): error TS2304: Cannot find name 'e2'. - - -==== parserComputedPropertyName28.ts (4 errors) ==== - class C { - [e]: number = 0; - ~~~ -!!! 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 'e'. - [e2]: number - ~~~~ -!!! 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 'e2'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts deleted file mode 100644 index 0a751cd278536..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName29.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts] //// - -//// [parserComputedPropertyName29.ts] -class C { - // yes ASI - [e] = id++ - [e2]: number -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName29.d.ts] -declare class C { - [e]: invalid; - [e2]: number; -} - -/// [Errors] //// - -parserComputedPropertyName29.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName29.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName29.ts(3,11): error TS2304: Cannot find name 'id'. -parserComputedPropertyName29.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -parserComputedPropertyName29.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName29.ts(4,6): error TS2304: Cannot find name 'e2'. - - -==== parserComputedPropertyName29.ts (6 errors) ==== - class C { - // yes ASI - [e] = id++ - ~~~ -!!! 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 'e'. - ~~ -!!! error TS2304: Cannot find name 'id'. - ~~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9029 parserComputedPropertyName29.ts:3:5: Add a type annotation to the property [e]. - [e2]: number - ~~~~ -!!! 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 'e2'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName31.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName31.d.ts deleted file mode 100644 index 189c3effcd298..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName31.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts] //// - -//// [parserComputedPropertyName31.ts] -class C { - // yes ASI - [e]: number - [e2]: number -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName31.d.ts] -declare class C { - [e]: number; - [e2]: number; -} - -/// [Errors] //// - -parserComputedPropertyName31.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName31.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName31.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName31.ts(4,6): error TS2304: Cannot find name 'e2'. - - -==== parserComputedPropertyName31.ts (4 errors) ==== - class C { - // yes ASI - [e]: number - ~~~ -!!! 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 'e'. - [e2]: number - ~~~~ -!!! 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 'e2'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName32.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName32.d.ts deleted file mode 100644 index 2ad7e3177e4e3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName32.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts] //// - -//// [parserComputedPropertyName32.ts] -declare class C { - [e](): number -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName32.d.ts] -declare class C { - [e](): number; -} - -/// [Errors] //// - -parserComputedPropertyName32.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. -parserComputedPropertyName32.ts(2,6): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName32.ts (2 errors) ==== - declare class C { - [e](): number - ~~~ -!!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ -!!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts deleted file mode 100644 index 70810c0a1f637..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName33.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts] //// - -//// [parserComputedPropertyName33.ts] -class C { - // No ASI - [e] = 0 - [e2]() { } -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName33.d.ts] -declare class C { - [e]: invalid; -} - -/// [Errors] //// - -parserComputedPropertyName33.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName33.ts(3,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -parserComputedPropertyName33.ts(4,6): error TS2304: Cannot find name 'e2'. -parserComputedPropertyName33.ts(4,12): error TS1005: ';' expected. -parserComputedPropertyName33.ts(5,1): error TS1128: Declaration or statement expected. - - -==== parserComputedPropertyName33.ts (5 errors) ==== - class C { - // No ASI - [e] = 0 - ~ -!!! error TS2304: Cannot find name 'e'. - ~ - [e2]() { } - ~~~~~~~~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9029 parserComputedPropertyName33.ts:3:5: Add a type annotation to the property [e]. - ~~ -!!! error TS2304: Cannot find name 'e2'. - ~ -!!! error TS1005: ';' expected. - } - ~ -!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName36.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName36.d.ts deleted file mode 100644 index 8198a691bc0ba..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName36.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts] //// - -//// [parserComputedPropertyName36.ts] -class C { - [public ]: string; -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName36.d.ts] -declare class C { - [public]: string; -} - -/// [Errors] //// - -parserComputedPropertyName36.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName36.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. -parserComputedPropertyName36.ts(2,6): error TS2304: Cannot find name 'public'. - - -==== parserComputedPropertyName36.ts (3 errors) ==== - class C { - [public ]: string; - ~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~ -!!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. - ~~~~~~ -!!! error TS2304: Cannot find name 'public'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName37.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName37.d.ts deleted file mode 100644 index e80bfec6284d0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName37.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts] //// - -//// [parserComputedPropertyName37.ts] -var v = { - [public]: 0 -}; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName37.d.ts] -declare var v: { - [public]: number; -}; - -/// [Errors] //// - -parserComputedPropertyName37.ts(2,6): error TS2304: Cannot find name 'public'. - - -==== parserComputedPropertyName37.ts (1 errors) ==== - var v = { - [public]: 0 - ~~~~~~ -!!! error TS2304: Cannot find name 'public'. - }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts deleted file mode 100644 index 89864c8f15afe..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName6.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts] //// - -//// [parserComputedPropertyName6.ts] -var v = { [e]: 1, [e + e]: 2 }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName6.d.ts] -declare var v: invalid; - -/// [Errors] //// - -parserComputedPropertyName6.ts(1,12): error TS2304: Cannot find name 'e'. -parserComputedPropertyName6.ts(1,19): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -parserComputedPropertyName6.ts(1,20): error TS2304: Cannot find name 'e'. -parserComputedPropertyName6.ts(1,24): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName6.ts (4 errors) ==== - var v = { [e]: 1, [e + e]: 2 }; - ~ -!!! error TS2304: Cannot find name 'e'. - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 parserComputedPropertyName6.ts:1:5: Add a type annotation to the variable v. - ~ -!!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName9.d.ts deleted file mode 100644 index 49a1126e29143..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName9.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts] //// - -//// [parserComputedPropertyName9.ts] -class C { - [e]: Type -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName9.d.ts] -declare class C { - [e]: Type; -} - -/// [Errors] //// - -parserComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. -parserComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. - - -==== parserComputedPropertyName9.ts (3 errors) ==== - class C { - [e]: Type - ~~~ -!!! 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 'e'. - ~~~~ -!!! error TS2304: Cannot find name 'Type'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName1.d.ts deleted file mode 100644 index 6dce6ac33512b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName1.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts] //// - -//// [parserES5ComputedPropertyName1.ts] -declare class C { - [e]: number -} - -/// [Declarations] //// - - - -//// [parserES5ComputedPropertyName1.d.ts] -declare class C { - [e]: number; -} - -/// [Errors] //// - -parserES5ComputedPropertyName1.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5ComputedPropertyName1.ts(2,6): error TS2304: Cannot find name 'e'. - - -==== parserES5ComputedPropertyName1.ts (2 errors) ==== - declare class C { - [e]: number - ~~~ -!!! 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 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName10.d.ts deleted file mode 100644 index cc6a96aa72c8c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName10.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts] //// - -//// [parserES5ComputedPropertyName10.ts] -class C { - [e] = 1 -} - -/// [Declarations] //// - - - -//// [parserES5ComputedPropertyName10.d.ts] -declare class C { - [e]: number; -} - -/// [Errors] //// - -parserES5ComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5ComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. - - -==== parserES5ComputedPropertyName10.ts (2 errors) ==== - class C { - [e] = 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 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName2.d.ts deleted file mode 100644 index 48ec6c0d3c1e7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName2.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts] //// - -//// [parserES5ComputedPropertyName2.ts] -var v = { [e]: 1 }; - -/// [Declarations] //// - - - -//// [parserES5ComputedPropertyName2.d.ts] -declare var v: { - [e]: number; -}; - -/// [Errors] //// - -parserES5ComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. - - -==== parserES5ComputedPropertyName2.ts (1 errors) ==== - var v = { [e]: 1 }; - ~ -!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName5.d.ts deleted file mode 100644 index 62a8be9fe86e6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName5.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts] //// - -//// [parserES5ComputedPropertyName5.ts] -interface I { - [e]: number -} - -/// [Declarations] //// - - - -//// [parserES5ComputedPropertyName5.d.ts] -interface I { - [e]: number; -} - -/// [Errors] //// - -parserES5ComputedPropertyName5.ts(2,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. -parserES5ComputedPropertyName5.ts(2,6): error TS2304: Cannot find name 'e'. - - -==== parserES5ComputedPropertyName5.ts (2 errors) ==== - interface I { - [e]: number - ~~~ -!!! 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 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName8.d.ts deleted file mode 100644 index 98ad892eadafc..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName8.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts] //// - -//// [parserES5ComputedPropertyName8.ts] -var v: { [e]: number }; - -/// [Declarations] //// - - - -//// [parserES5ComputedPropertyName8.d.ts] -declare var v: { - [e]: number; -}; - -/// [Errors] //// - -parserES5ComputedPropertyName8.ts(1,10): 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. -parserES5ComputedPropertyName8.ts(1,11): error TS2304: Cannot find name 'e'. - - -==== parserES5ComputedPropertyName8.ts (2 errors) ==== - var v: { [e]: number }; - ~~~ -!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName9.d.ts deleted file mode 100644 index ca7aa76034e00..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName9.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts] //// - -//// [parserES5ComputedPropertyName9.ts] -class C { - [e]: Type -} - -/// [Declarations] //// - - - -//// [parserES5ComputedPropertyName9.d.ts] -declare class C { - [e]: Type; -} - -/// [Errors] //// - -parserES5ComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5ComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. -parserES5ComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. - - -==== parserES5ComputedPropertyName9.ts (3 errors) ==== - class C { - [e]: Type - ~~~ -!!! 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 'e'. - ~~~~ -!!! error TS2304: Cannot find name 'Type'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty1.d.ts deleted file mode 100644 index 7e6ead699580e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty1.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty1.ts] //// - -//// [parserES5SymbolProperty1.ts] -interface I { - [Symbol.iterator]: string; -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty1.d.ts] -interface I { - [Symbol.iterator]: string; -} - -/// [Errors] //// - -parserES5SymbolProperty1.ts(2,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. -parserES5SymbolProperty1.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== parserES5SymbolProperty1.ts (2 errors) ==== - interface I { - [Symbol.iterator]: string; - ~~~~~~~~~~~~~~~~~ -!!! 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 TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty2.d.ts deleted file mode 100644 index 5648323fda326..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty2.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty2.ts] //// - -//// [parserES5SymbolProperty2.ts] -interface I { - [Symbol.unscopables](): string; -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty2.d.ts] -interface I { - [Symbol.unscopables](): string; -} - -/// [Errors] //// - -parserES5SymbolProperty2.ts(2,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. -parserES5SymbolProperty2.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== parserES5SymbolProperty2.ts (2 errors) ==== - interface I { - [Symbol.unscopables](): string; - ~~~~~~~~~~~~~~~~~~~~ -!!! 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 TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty3.d.ts deleted file mode 100644 index 05e2383f6c3bf..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty3.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty3.ts] //// - -//// [parserES5SymbolProperty3.ts] -declare class C { - [Symbol.unscopables](): string; -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty3.d.ts] -declare class C { - [Symbol.unscopables](): string; -} - -/// [Errors] //// - -parserES5SymbolProperty3.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. -parserES5SymbolProperty3.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== parserES5SymbolProperty3.ts (2 errors) ==== - declare class C { - [Symbol.unscopables](): string; - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts deleted file mode 100644 index 5c36c2c1d12da..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty4.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts] //// - -//// [parserES5SymbolProperty4.ts] -declare class C { - [Symbol.isRegExp]: string; -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty4.d.ts] -declare class C { - [Symbol.isRegExp]: string; -} - -/// [Errors] //// - -parserES5SymbolProperty4.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5SymbolProperty4.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== parserES5SymbolProperty4.ts (2 errors) ==== - declare class C { - [Symbol.isRegExp]: string; - ~~~~~~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty5.d.ts deleted file mode 100644 index f3898afdf755b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty5.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty5.ts] //// - -//// [parserES5SymbolProperty5.ts] -class C { - [Symbol.isRegExp]: string; -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty5.d.ts] -declare class C { - [Symbol.isRegExp]: string; -} - -/// [Errors] //// - -parserES5SymbolProperty5.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5SymbolProperty5.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== parserES5SymbolProperty5.ts (2 errors) ==== - class C { - [Symbol.isRegExp]: string; - ~~~~~~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty6.d.ts deleted file mode 100644 index 680075a704fc1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty6.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty6.ts] //// - -//// [parserES5SymbolProperty6.ts] -class C { - [Symbol.toStringTag]: string = ""; -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty6.d.ts] -declare class C { - [Symbol.toStringTag]: string; -} - -/// [Errors] //// - -parserES5SymbolProperty6.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== parserES5SymbolProperty6.ts (2 errors) ==== - class C { - [Symbol.toStringTag]: string = ""; - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty7.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty7.d.ts deleted file mode 100644 index 6078a9a0eba3e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty7.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty7.ts] //// - -//// [parserES5SymbolProperty7.ts] -class C { - [Symbol.toStringTag](): void { } -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty7.d.ts] -declare class C { - [Symbol.toStringTag](): void; -} - -/// [Errors] //// - -parserES5SymbolProperty7.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== parserES5SymbolProperty7.ts (1 errors) ==== - class C { - [Symbol.toStringTag](): void { } - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts deleted file mode 100644 index 4934e408820f3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty8.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts] //// - -//// [parserES5SymbolProperty8.ts] -var x: { - [Symbol.toPrimitive](): string -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty8.d.ts] -declare var x: { - [Symbol.toPrimitive](): string; -}; - -/// [Errors] //// - -parserES5SymbolProperty8.ts(2,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. -parserES5SymbolProperty8.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== parserES5SymbolProperty8.ts (2 errors) ==== - var x: { - [Symbol.toPrimitive](): 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 TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty9.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty9.d.ts deleted file mode 100644 index 3cc2ff2d00bff..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5SymbolProperty9.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty9.ts] //// - -//// [parserES5SymbolProperty9.ts] -var x: { - [Symbol.toPrimitive]: string -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty9.d.ts] -declare var x: { - [Symbol.toPrimitive]: string; -}; - -/// [Errors] //// - -parserES5SymbolProperty9.ts(2,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. -parserES5SymbolProperty9.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== parserES5SymbolProperty9.ts (2 errors) ==== - var x: { - [Symbol.toPrimitive]: 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 TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature11.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature11.d.ts deleted file mode 100644 index 2aee14a054d08..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature11.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts] //// - -//// [parserIndexSignature11.ts] -interface I { - [p]; // Used to be indexer, now it is a computed property - [p1: string]; - [p2: string, p3: number]; -} - -/// [Declarations] //// - - - -//// [parserIndexSignature11.d.ts] -interface I { - [p]: any; - [p1: string]: any; - [p2: string, p3: number]: any; -} - -/// [Errors] //// - -parserIndexSignature11.ts(2,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. -parserIndexSignature11.ts(2,10): error TS2304: Cannot find name 'p'. -parserIndexSignature11.ts(3,9): error TS1021: An index signature must have a type annotation. -parserIndexSignature11.ts(4,10): error TS1096: An index signature must have exactly one parameter. - - -==== parserIndexSignature11.ts (4 errors) ==== - interface I { - [p]; // Used to be indexer, now it is a computed property - ~~~ -!!! 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. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature5.d.ts deleted file mode 100644 index d80dc933460b2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserIndexSignature5.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts] //// - -//// [parserIndexSignature5.ts] -interface I { - [a] // Used to be indexer, now it is a computed property -} - -/// [Declarations] //// - - - -//// [parserIndexSignature5.d.ts] -interface I { - [a]: any; -} - -/// [Errors] //// - -parserIndexSignature5.ts(2,3): 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. -parserIndexSignature5.ts(2,4): error TS2304: Cannot find name 'a'. - - -==== parserIndexSignature5.ts (2 errors) ==== - interface I { - [a] // Used to be indexer, now it is a computed property - ~~~ -!!! 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 'a'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts deleted file mode 100644 index 4c97427f1ed06..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserStrictMode8.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts] //// - -//// [parserStrictMode8.ts] -"use strict"; -function eval() { -} - -/// [Declarations] //// - - - -//// [parserStrictMode8.d.ts] -declare function eval(): invalid; - -/// [Errors] //// - -parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. -parserStrictMode8.ts(2,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. - - -==== parserStrictMode8.ts (2 errors) ==== - "use strict"; - function eval() { - ~~~~ -!!! error TS1100: Invalid use of 'eval' in strict mode. - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parserStrictMode8.ts:2:10: Add a return type to the function declaration. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/propertyAssignment.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/propertyAssignment.d.ts deleted file mode 100644 index f9061bc2cf548..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/propertyAssignment.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -//// [tests/cases/compiler/propertyAssignment.ts] //// - -//// [propertyAssignment.ts] -var foo1: { new ():any; } -var bar1: { x : number; } - -var foo2: { [index]; } // should be an error, used to be indexer, now it is a computed property -var bar2: { x : number; } - -var foo3: { ():void; } -var bar3: { x : number; } - - - -foo1 = bar1; // should be an error -foo2 = bar2; -foo3 = bar3; // should be an error - -/// [Declarations] //// - - - -//// [propertyAssignment.d.ts] -declare var foo1: { - new (): any; -}; -declare var bar1: { - x: number; -}; -declare var foo2: { - [index]: any; -}; -declare var bar2: { - x: number; -}; -declare var foo3: { - (): void; -}; -declare var bar3: { - x: number; -}; - -/// [Errors] //// - -propertyAssignment.ts(4,13): 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. -propertyAssignment.ts(4,14): error TS2304: Cannot find name 'index'. -propertyAssignment.ts(12,1): error TS2322: Type '{ x: number; }' is not assignable to type 'new () => any'. - Type '{ x: number; }' provides no match for the signature 'new (): any'. -propertyAssignment.ts(14,1): error TS2322: Type '{ x: number; }' is not assignable to type '() => void'. - Type '{ x: number; }' provides no match for the signature '(): void'. - - -==== propertyAssignment.ts (4 errors) ==== - var foo1: { new ():any; } - var bar1: { x : number; } - - var foo2: { [index]; } // should be an error, used to be indexer, now it is a computed property - ~~~~~~~ -!!! 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 'index'. - var bar2: { x : number; } - - var foo3: { ():void; } - var bar3: { x : number; } - - - - foo1 = bar1; // should be an error - ~~~~ -!!! error TS2322: Type '{ x: number; }' is not assignable to type 'new () => any'. -!!! error TS2322: Type '{ x: number; }' provides no match for the signature 'new (): any'. - foo2 = bar2; - foo3 = bar3; // should be an error - ~~~~ -!!! error TS2322: Type '{ x: number; }' is not assignable to type '() => void'. -!!! error TS2322: Type '{ x: number; }' provides no match for the signature '(): void'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/reExportAliasMakesInstantiated.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/reExportAliasMakesInstantiated.d.ts deleted file mode 100644 index 52db356edf23b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/reExportAliasMakesInstantiated.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -//// [tests/cases/conformance/internalModules/moduleDeclarations/reExportAliasMakesInstantiated.ts] //// - -//// [reExportAliasMakesInstantiated.ts] -declare module pack1 { - const test1: string; - export { test1 }; -} -declare module pack2 { - import test1 = pack1.test1; - export { test1 }; -} -export import test1 = pack2.test1; - -declare module mod1 { - type test1 = string; - export { test1 }; -} -declare module mod2 { - import test1 = mod1.test1; - export { test1 }; -} -const test2 = mod2; // Possible false positive instantiation, but ok - - -/// [Declarations] //// - - - -//// [reExportAliasMakesInstantiated.d.ts] -declare namespace pack1 { - const test1: string; - export { test1 }; -} -declare namespace pack2 { - import test1 = pack1.test1; - export { test1 }; -} -export import test1 = pack2.test1; -export {}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/recursiveTypesWithTypeof.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/recursiveTypesWithTypeof.d.ts deleted file mode 100644 index c6c56d2238479..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/recursiveTypesWithTypeof.d.ts +++ /dev/null @@ -1,200 +0,0 @@ -//// [tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts] //// - -//// [recursiveTypesWithTypeof.ts] -// The following are errors because of circular references -var c: typeof c; -var c: any; -var d: typeof e; -var d: any; -var e: typeof d; -var e: any; - -interface Foo { } -var f: Array; -var f: any; -var f2: Foo; -var f2: any; -var f3: Foo[]; -var f3: any; - -// None of these declarations should have any errors! -// Truly recursive types -var g: { x: typeof g; }; -var g: typeof g.x; -var h: () => typeof h; -var h = h(); -var i: (x: typeof i) => typeof x; -var i = i(i); -var j: (x: T) => T; -var j = j(j); - -// Same as h, i, j with construct signatures -var h2: new () => typeof h2; -var h2 = new h2(); -var i2: new (x: typeof i2) => typeof x; -var i2 = new i2(i2); -var j2: new (x: T) => T; -var j2 = new j2(j2); - -// Indexers -var k: { [n: number]: typeof k;[s: string]: typeof k }; -var k = k[0]; -var k = k['']; - -// Hybrid - contains type literals as well as type arguments -// These two are recursive -var hy1: { x: typeof hy1 }[]; -var hy1 = hy1[0].x; -var hy2: { x: Array }; -var hy2 = hy2.x[0]; - -interface Foo2 { } - -// This one should be an error because the first type argument is not contained inside a type literal -var hy3: Foo2; -var hy3: any; - -/// [Declarations] //// - - - -//// [recursiveTypesWithTypeof.d.ts] -declare var c: typeof c; -declare var c: any; -declare var d: typeof e; -declare var d: any; -declare var e: typeof d; -declare var e: any; -interface Foo { -} -declare var f: Array; -declare var f: any; -declare var f2: Foo; -declare var f2: any; -declare var f3: Foo[]; -declare var f3: any; -declare var g: { - x: typeof g; -}; -declare var g: typeof g.x; -declare var h: () => typeof h; -declare var h: () => typeof h; -declare var i: (x: typeof i) => typeof x; -declare var i: (x: typeof i) => typeof x; -declare var j: (x: T) => T; -declare var j: (x: T) => T; -declare var h2: new () => typeof h2; -declare var h2: new () => typeof h2; -declare var i2: new (x: typeof i2) => typeof x; -declare var i2: new (x: typeof i2) => typeof x; -declare var j2: new (x: T) => T; -declare var j2: new (x: T) => T; -declare var k: { - [n: number]: typeof k; - [s: string]: typeof k; -}; -declare var k: { - [n: number]: typeof k; - [s: string]: typeof k; -}; -declare var k: { - [n: number]: typeof k; - [s: string]: typeof k; -}; -declare var hy1: { - x: typeof hy1; -}[]; -declare var hy1: { - x: typeof hy1; -}[]; -declare var hy2: { - x: Array; -}; -declare var hy2: { - x: Array; -}; -interface Foo2 { -} -declare var hy3: Foo2; -declare var hy3: any; - -/// [Errors] //// - -recursiveTypesWithTypeof.ts(2,5): error TS2502: 'c' is referenced directly or indirectly in its own type annotation. -recursiveTypesWithTypeof.ts(4,5): error TS2502: 'd' is referenced directly or indirectly in its own type annotation. -recursiveTypesWithTypeof.ts(6,5): error TS2502: 'e' is referenced directly or indirectly in its own type annotation. -recursiveTypesWithTypeof.ts(10,5): error TS2502: 'f' is referenced directly or indirectly in its own type annotation. -recursiveTypesWithTypeof.ts(12,5): error TS2502: 'f2' is referenced directly or indirectly in its own type annotation. -recursiveTypesWithTypeof.ts(14,5): error TS2502: 'f3' is referenced directly or indirectly in its own type annotation. -recursiveTypesWithTypeof.ts(51,5): error TS2502: 'hy3' is referenced directly or indirectly in its own type annotation. - - -==== recursiveTypesWithTypeof.ts (7 errors) ==== - // The following are errors because of circular references - var c: typeof c; - ~ -!!! error TS2502: 'c' is referenced directly or indirectly in its own type annotation. - var c: any; - var d: typeof e; - ~ -!!! error TS2502: 'd' is referenced directly or indirectly in its own type annotation. - var d: any; - var e: typeof d; - ~ -!!! error TS2502: 'e' is referenced directly or indirectly in its own type annotation. - var e: any; - - interface Foo { } - var f: Array; - ~ -!!! error TS2502: 'f' is referenced directly or indirectly in its own type annotation. - var f: any; - var f2: Foo; - ~~ -!!! error TS2502: 'f2' is referenced directly or indirectly in its own type annotation. - var f2: any; - var f3: Foo[]; - ~~ -!!! error TS2502: 'f3' is referenced directly or indirectly in its own type annotation. - var f3: any; - - // None of these declarations should have any errors! - // Truly recursive types - var g: { x: typeof g; }; - var g: typeof g.x; - var h: () => typeof h; - var h = h(); - var i: (x: typeof i) => typeof x; - var i = i(i); - var j: (x: T) => T; - var j = j(j); - - // Same as h, i, j with construct signatures - var h2: new () => typeof h2; - var h2 = new h2(); - var i2: new (x: typeof i2) => typeof x; - var i2 = new i2(i2); - var j2: new (x: T) => T; - var j2 = new j2(j2); - - // Indexers - var k: { [n: number]: typeof k;[s: string]: typeof k }; - var k = k[0]; - var k = k['']; - - // Hybrid - contains type literals as well as type arguments - // These two are recursive - var hy1: { x: typeof hy1 }[]; - var hy1 = hy1[0].x; - var hy2: { x: Array }; - var hy2 = hy2.x[0]; - - interface Foo2 { } - - // This one should be an error because the first type argument is not contained inside a type literal - var hy3: Foo2; - ~~~ -!!! error TS2502: 'hy3' is referenced directly or indirectly in its own type annotation. - var hy3: any; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts deleted file mode 100644 index 24040c67c3452..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts +++ /dev/null @@ -1,1021 +0,0 @@ -//// [tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts] //// - -//// [staticPropertyNameConflicts.ts] -const FunctionPropertyNames = { - name: 'name', - length: 'length', - prototype: 'prototype', - caller: 'caller', - arguments: 'arguments', -} as const; - -// name -class StaticName { - static name: number; // error without useDefineForClassFields - name: string; // ok -} - -class StaticName2 { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - [FunctionPropertyNames.name]: number; // ok -} - -class StaticNameFn { - static name() {} // error without useDefineForClassFields - name() {} // ok -} - -class StaticNameFn2 { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - [FunctionPropertyNames.name]() {} // ok -} - -// length -class StaticLength { - static length: number; // error without useDefineForClassFields - length: string; // ok -} - -class StaticLength2 { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - [FunctionPropertyNames.length]: number; // ok -} - -class StaticLengthFn { - static length() {} // error without useDefineForClassFields - length() {} // ok -} - -class StaticLengthFn2 { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - [FunctionPropertyNames.length]() {} // ok -} - -// prototype -class StaticPrototype { - static prototype: number; // always an error - prototype: string; // ok -} - -class StaticPrototype2 { - static [FunctionPropertyNames.prototype]: number; // always an error - [FunctionPropertyNames.prototype]: string; // ok -} - -class StaticPrototypeFn { - static prototype() {} // always an error - prototype() {} // ok -} - -class StaticPrototypeFn2 { - static [FunctionPropertyNames.prototype]() {} // always an error - [FunctionPropertyNames.prototype]() {} // ok -} - -// caller -class StaticCaller { - static caller: number; // error without useDefineForClassFields - caller: string; // ok -} - -class StaticCaller2 { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - [FunctionPropertyNames.caller]: string; // ok -} - -class StaticCallerFn { - static caller() {} // error without useDefineForClassFields - caller() {} // ok -} - -class StaticCallerFn2 { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - [FunctionPropertyNames.caller]() {} // ok -} - -// arguments -class StaticArguments { - static arguments: number; // error without useDefineForClassFields - arguments: string; // ok -} - -class StaticArguments2 { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - [FunctionPropertyNames.arguments]: string; // ok -} - -class StaticArgumentsFn { - static arguments() {} // error without useDefineForClassFields - arguments() {} // ok -} - -class StaticArgumentsFn2 { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - [FunctionPropertyNames.arguments]() {} // ok -} - - -// === Static properties on anonymous classes === - -// name -var StaticName_Anonymous = class { - static name: number; // error without useDefineForClassFields - name: string; // ok -} - -var StaticName_Anonymous2 = class { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - [FunctionPropertyNames.name]: string; // ok -} - -var StaticNameFn_Anonymous = class { - static name() {} // error without useDefineForClassFields - name() {} // ok -} - -var StaticNameFn_Anonymous2 = class { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - [FunctionPropertyNames.name]() {} // ok -} - -// length -var StaticLength_Anonymous = class { - static length: number; // error without useDefineForClassFields - length: string; // ok -} - -var StaticLength_Anonymous2 = class { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - [FunctionPropertyNames.length]: string; // ok -} - -var StaticLengthFn_Anonymous = class { - static length() {} // error without useDefineForClassFields - length() {} // ok -} - -var StaticLengthFn_Anonymous2 = class { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - [FunctionPropertyNames.length]() {} // ok -} - -// prototype -var StaticPrototype_Anonymous = class { - static prototype: number; // always an error - prototype: string; // ok -} - -var StaticPrototype_Anonymous2 = class { - static [FunctionPropertyNames.prototype]: number; // always an error - [FunctionPropertyNames.prototype]: string; // ok -} - -var StaticPrototypeFn_Anonymous = class { - static prototype() {} // always an error - prototype() {} // ok -} - -var StaticPrototypeFn_Anonymous2 = class { - static [FunctionPropertyNames.prototype]() {} // always an error - [FunctionPropertyNames.prototype]() {} // ok -} - -// caller -var StaticCaller_Anonymous = class { - static caller: number; // error without useDefineForClassFields - caller: string; // ok -} - -var StaticCaller_Anonymous2 = class { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - [FunctionPropertyNames.caller]: string; // ok -} - -var StaticCallerFn_Anonymous = class { - static caller() {} // error without useDefineForClassFields - caller() {} // ok -} - -var StaticCallerFn_Anonymous2 = class { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - [FunctionPropertyNames.caller]() {} // ok -} - -// arguments -var StaticArguments_Anonymous = class { - static arguments: number; // error without useDefineForClassFields - arguments: string; // ok -} - -var StaticArguments_Anonymous2 = class { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - [FunctionPropertyNames.arguments]: string; // ok -} - -var StaticArgumentsFn_Anonymous = class { - static arguments() {} // error without useDefineForClassFields - arguments() {} // ok -} - -var StaticArgumentsFn_Anonymous2 = class { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - [FunctionPropertyNames.arguments]() {} // ok -} - - -// === Static properties on default exported classes === - -// name -module TestOnDefaultExportedClass_1 { - class StaticName { - static name: number; // error without useDefineForClassFields - name: string; // ok - } -} - -export class ExportedStaticName { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - [FunctionPropertyNames.name]: string; // ok -} - -module TestOnDefaultExportedClass_2 { - class StaticNameFn { - static name() {} // error without useDefineForClassFields - name() {} // ok - } -} - -export class ExportedStaticNameFn { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - [FunctionPropertyNames.name]() {} // ok -} - -// length -module TestOnDefaultExportedClass_3 { - export default class StaticLength { - static length: number; // error without useDefineForClassFields - length: string; // ok - } -} - -export class ExportedStaticLength { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - [FunctionPropertyNames.length]: string; // ok -} - -module TestOnDefaultExportedClass_4 { - export default class StaticLengthFn { - static length() {} // error without useDefineForClassFields - length() {} // ok - } -} - -export class ExportedStaticLengthFn { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - [FunctionPropertyNames.length]() {} // ok -} - -// prototype -module TestOnDefaultExportedClass_5 { - export default class StaticPrototype { - static prototype: number; // always an error - prototype: string; // ok - } -} - -export class ExportedStaticPrototype { - static [FunctionPropertyNames.prototype]: number; // always an error - [FunctionPropertyNames.prototype]: string; // ok -} - -module TestOnDefaultExportedClass_6 { - export default class StaticPrototypeFn { - static prototype() {} // always an error - prototype() {} // ok - } -} - -export class ExportedStaticPrototypeFn { - static [FunctionPropertyNames.prototype]() {} // always an error - [FunctionPropertyNames.prototype]() {} // ok -} - -// caller -module TestOnDefaultExportedClass_7 { - export default class StaticCaller { - static caller: number; // error without useDefineForClassFields - caller: string; // ok - } -} - -export class ExportedStaticCaller { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - [FunctionPropertyNames.caller]: string; // ok -} - -module TestOnDefaultExportedClass_8 { - export default class StaticCallerFn { - static caller() {} // error without useDefineForClassFields - caller() {} // ok - } -} - -export class ExportedStaticCallerFn { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - [FunctionPropertyNames.caller]() {} // ok -} - -// arguments -module TestOnDefaultExportedClass_9 { - export default class StaticArguments { - static arguments: number; // error without useDefineForClassFields - arguments: string; // ok - } -} - -export class ExportedStaticArguments { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - [FunctionPropertyNames.arguments]: string; // ok -} - -module TestOnDefaultExportedClass_10 { - export default class StaticArgumentsFn { - static arguments() {} // error without useDefineForClassFields - arguments() {} // ok - } -} - -export class ExportedStaticArgumentsFn { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - [FunctionPropertyNames.arguments]() {} // ok -} - -/// [Declarations] //// - - - -//// [staticPropertyNameConflicts.d.ts] -declare const FunctionPropertyNames: { - readonly name: "name"; - readonly length: "length"; - readonly prototype: "prototype"; - readonly caller: "caller"; - readonly arguments: "arguments"; -}; -export declare class ExportedStaticName { - static [FunctionPropertyNames.name]: number; - [FunctionPropertyNames.name]: string; -} -export declare class ExportedStaticNameFn { - static [FunctionPropertyNames.name](): invalid; - [FunctionPropertyNames.name](): invalid; -} -export declare class ExportedStaticLength { - static [FunctionPropertyNames.length]: number; - [FunctionPropertyNames.length]: string; -} -export declare class ExportedStaticLengthFn { - static [FunctionPropertyNames.length](): invalid; - [FunctionPropertyNames.length](): invalid; -} -export declare class ExportedStaticPrototype { - static [FunctionPropertyNames.prototype]: number; - [FunctionPropertyNames.prototype]: string; -} -export declare class ExportedStaticPrototypeFn { - static [FunctionPropertyNames.prototype](): invalid; - [FunctionPropertyNames.prototype](): invalid; -} -export declare class ExportedStaticCaller { - static [FunctionPropertyNames.caller]: number; - [FunctionPropertyNames.caller]: string; -} -export declare class ExportedStaticCallerFn { - static [FunctionPropertyNames.caller](): invalid; - [FunctionPropertyNames.caller](): invalid; -} -export declare class ExportedStaticArguments { - static [FunctionPropertyNames.arguments]: number; - [FunctionPropertyNames.arguments]: string; -} -export declare class ExportedStaticArgumentsFn { - static [FunctionPropertyNames.arguments](): invalid; - [FunctionPropertyNames.arguments](): invalid; -} -export {}; - -/// [Errors] //// - -staticPropertyNameConflicts.ts(11,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. -staticPropertyNameConflicts.ts(16,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName2'. -staticPropertyNameConflicts.ts(21,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. -staticPropertyNameConflicts.ts(26,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn2'. -staticPropertyNameConflicts.ts(32,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. -staticPropertyNameConflicts.ts(37,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength2'. -staticPropertyNameConflicts.ts(42,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. -staticPropertyNameConflicts.ts(47,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn2'. -staticPropertyNameConflicts.ts(53,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. -staticPropertyNameConflicts.ts(58,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype2'. -staticPropertyNameConflicts.ts(63,12): error TS2300: Duplicate identifier 'prototype'. -staticPropertyNameConflicts.ts(63,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. -staticPropertyNameConflicts.ts(68,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. -staticPropertyNameConflicts.ts(68,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn2'. -staticPropertyNameConflicts.ts(74,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. -staticPropertyNameConflicts.ts(79,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller2'. -staticPropertyNameConflicts.ts(84,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. -staticPropertyNameConflicts.ts(89,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn2'. -staticPropertyNameConflicts.ts(95,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. -staticPropertyNameConflicts.ts(100,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments2'. -staticPropertyNameConflicts.ts(105,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. -staticPropertyNameConflicts.ts(110,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn2'. -staticPropertyNameConflicts.ts(119,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName_Anonymous'. -staticPropertyNameConflicts.ts(124,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName_Anonymous2'. -staticPropertyNameConflicts.ts(129,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn_Anonymous'. -staticPropertyNameConflicts.ts(134,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn_Anonymous2'. -staticPropertyNameConflicts.ts(140,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength_Anonymous'. -staticPropertyNameConflicts.ts(145,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength_Anonymous2'. -staticPropertyNameConflicts.ts(150,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn_Anonymous'. -staticPropertyNameConflicts.ts(155,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn_Anonymous2'. -staticPropertyNameConflicts.ts(161,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous'. -staticPropertyNameConflicts.ts(166,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous2'. -staticPropertyNameConflicts.ts(171,12): error TS2300: Duplicate identifier 'prototype'. -staticPropertyNameConflicts.ts(171,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous'. -staticPropertyNameConflicts.ts(176,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. -staticPropertyNameConflicts.ts(176,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous2'. -staticPropertyNameConflicts.ts(182,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller_Anonymous'. -staticPropertyNameConflicts.ts(187,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller_Anonymous2'. -staticPropertyNameConflicts.ts(192,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn_Anonymous'. -staticPropertyNameConflicts.ts(197,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn_Anonymous2'. -staticPropertyNameConflicts.ts(203,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments_Anonymous'. -staticPropertyNameConflicts.ts(208,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments_Anonymous2'. -staticPropertyNameConflicts.ts(213,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn_Anonymous'. -staticPropertyNameConflicts.ts(218,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn_Anonymous2'. -staticPropertyNameConflicts.ts(228,16): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. -staticPropertyNameConflicts.ts(234,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticName'. -staticPropertyNameConflicts.ts(240,16): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. -staticPropertyNameConflicts.ts(246,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticNameFn'. -staticPropertyNameConflicts.ts(246,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(247,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(252,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(253,16): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. -staticPropertyNameConflicts.ts(259,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLength'. -staticPropertyNameConflicts.ts(264,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(265,16): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. -staticPropertyNameConflicts.ts(271,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLengthFn'. -staticPropertyNameConflicts.ts(271,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. -staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. -staticPropertyNameConflicts.ts(289,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prototype'. -staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. -staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. -staticPropertyNameConflicts.ts(296,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. -staticPropertyNameConflicts.ts(296,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(297,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(302,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(303,16): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. -staticPropertyNameConflicts.ts(309,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCaller'. -staticPropertyNameConflicts.ts(314,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(315,16): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. -staticPropertyNameConflicts.ts(321,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCallerFn'. -staticPropertyNameConflicts.ts(321,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(322,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(327,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(328,16): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. -staticPropertyNameConflicts.ts(334,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArguments'. -staticPropertyNameConflicts.ts(339,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(340,16): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. -staticPropertyNameConflicts.ts(346,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArgumentsFn'. -staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== staticPropertyNameConflicts.ts (84 errors) ==== - const FunctionPropertyNames = { - name: 'name', - length: 'length', - prototype: 'prototype', - caller: 'caller', - arguments: 'arguments', - } as const; - - // name - class StaticName { - static name: number; // error without useDefineForClassFields - ~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. - name: string; // ok - } - - class StaticName2 { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName2'. - [FunctionPropertyNames.name]: number; // ok - } - - class StaticNameFn { - static name() {} // error without useDefineForClassFields - ~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. - name() {} // ok - } - - class StaticNameFn2 { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn2'. - [FunctionPropertyNames.name]() {} // ok - } - - // length - class StaticLength { - static length: number; // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. - length: string; // ok - } - - class StaticLength2 { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength2'. - [FunctionPropertyNames.length]: number; // ok - } - - class StaticLengthFn { - static length() {} // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. - length() {} // ok - } - - class StaticLengthFn2 { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn2'. - [FunctionPropertyNames.length]() {} // ok - } - - // prototype - class StaticPrototype { - static prototype: number; // always an error - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. - prototype: string; // ok - } - - class StaticPrototype2 { - static [FunctionPropertyNames.prototype]: number; // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype2'. - [FunctionPropertyNames.prototype]: string; // ok - } - - class StaticPrototypeFn { - static prototype() {} // always an error - ~~~~~~~~~ -!!! error TS2300: Duplicate identifier 'prototype'. - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. - prototype() {} // ok - } - - class StaticPrototypeFn2 { - static [FunctionPropertyNames.prototype]() {} // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn2'. - [FunctionPropertyNames.prototype]() {} // ok - } - - // caller - class StaticCaller { - static caller: number; // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. - caller: string; // ok - } - - class StaticCaller2 { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller2'. - [FunctionPropertyNames.caller]: string; // ok - } - - class StaticCallerFn { - static caller() {} // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. - caller() {} // ok - } - - class StaticCallerFn2 { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn2'. - [FunctionPropertyNames.caller]() {} // ok - } - - // arguments - class StaticArguments { - static arguments: number; // error without useDefineForClassFields - ~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. - arguments: string; // ok - } - - class StaticArguments2 { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments2'. - [FunctionPropertyNames.arguments]: string; // ok - } - - class StaticArgumentsFn { - static arguments() {} // error without useDefineForClassFields - ~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. - arguments() {} // ok - } - - class StaticArgumentsFn2 { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn2'. - [FunctionPropertyNames.arguments]() {} // ok - } - - - // === Static properties on anonymous classes === - - // name - var StaticName_Anonymous = class { - static name: number; // error without useDefineForClassFields - ~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName_Anonymous'. - name: string; // ok - } - - var StaticName_Anonymous2 = class { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName_Anonymous2'. - [FunctionPropertyNames.name]: string; // ok - } - - var StaticNameFn_Anonymous = class { - static name() {} // error without useDefineForClassFields - ~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn_Anonymous'. - name() {} // ok - } - - var StaticNameFn_Anonymous2 = class { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn_Anonymous2'. - [FunctionPropertyNames.name]() {} // ok - } - - // length - var StaticLength_Anonymous = class { - static length: number; // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength_Anonymous'. - length: string; // ok - } - - var StaticLength_Anonymous2 = class { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength_Anonymous2'. - [FunctionPropertyNames.length]: string; // ok - } - - var StaticLengthFn_Anonymous = class { - static length() {} // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn_Anonymous'. - length() {} // ok - } - - var StaticLengthFn_Anonymous2 = class { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn_Anonymous2'. - [FunctionPropertyNames.length]() {} // ok - } - - // prototype - var StaticPrototype_Anonymous = class { - static prototype: number; // always an error - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous'. - prototype: string; // ok - } - - var StaticPrototype_Anonymous2 = class { - static [FunctionPropertyNames.prototype]: number; // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous2'. - [FunctionPropertyNames.prototype]: string; // ok - } - - var StaticPrototypeFn_Anonymous = class { - static prototype() {} // always an error - ~~~~~~~~~ -!!! error TS2300: Duplicate identifier 'prototype'. - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous'. - prototype() {} // ok - } - - var StaticPrototypeFn_Anonymous2 = class { - static [FunctionPropertyNames.prototype]() {} // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous2'. - [FunctionPropertyNames.prototype]() {} // ok - } - - // caller - var StaticCaller_Anonymous = class { - static caller: number; // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller_Anonymous'. - caller: string; // ok - } - - var StaticCaller_Anonymous2 = class { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller_Anonymous2'. - [FunctionPropertyNames.caller]: string; // ok - } - - var StaticCallerFn_Anonymous = class { - static caller() {} // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn_Anonymous'. - caller() {} // ok - } - - var StaticCallerFn_Anonymous2 = class { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn_Anonymous2'. - [FunctionPropertyNames.caller]() {} // ok - } - - // arguments - var StaticArguments_Anonymous = class { - static arguments: number; // error without useDefineForClassFields - ~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments_Anonymous'. - arguments: string; // ok - } - - var StaticArguments_Anonymous2 = class { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments_Anonymous2'. - [FunctionPropertyNames.arguments]: string; // ok - } - - var StaticArgumentsFn_Anonymous = class { - static arguments() {} // error without useDefineForClassFields - ~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn_Anonymous'. - arguments() {} // ok - } - - var StaticArgumentsFn_Anonymous2 = class { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn_Anonymous2'. - [FunctionPropertyNames.arguments]() {} // ok - } - - - // === Static properties on default exported classes === - - // name - module TestOnDefaultExportedClass_1 { - class StaticName { - static name: number; // error without useDefineForClassFields - ~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. - name: string; // ok - } - } - - export class ExportedStaticName { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticName'. - [FunctionPropertyNames.name]: string; // ok - } - - module TestOnDefaultExportedClass_2 { - class StaticNameFn { - static name() {} // error without useDefineForClassFields - ~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. - name() {} // ok - } - } - - export class ExportedStaticNameFn { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticNameFn'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:246:12: Add a return type to the method - [FunctionPropertyNames.name]() {} // ok - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:247:5: Add a return type to the method - } - - // length - module TestOnDefaultExportedClass_3 { - export default class StaticLength { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static length: number; // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. - length: string; // ok - } - } - - export class ExportedStaticLength { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLength'. - [FunctionPropertyNames.length]: string; // ok - } - - module TestOnDefaultExportedClass_4 { - export default class StaticLengthFn { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static length() {} // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. - length() {} // ok - } - } - - export class ExportedStaticLengthFn { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLengthFn'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:271:12: Add a return type to the method - [FunctionPropertyNames.length]() {} // ok - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:272:5: Add a return type to the method - } - - // prototype - module TestOnDefaultExportedClass_5 { - export default class StaticPrototype { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static prototype: number; // always an error - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. - prototype: string; // ok - } - } - - export class ExportedStaticPrototype { - static [FunctionPropertyNames.prototype]: number; // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. - [FunctionPropertyNames.prototype]: string; // ok - } - - module TestOnDefaultExportedClass_6 { - export default class StaticPrototypeFn { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static prototype() {} // always an error - ~~~~~~~~~ -!!! error TS2300: Duplicate identifier 'prototype'. - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. - prototype() {} // ok - } - } - - export class ExportedStaticPrototypeFn { - static [FunctionPropertyNames.prototype]() {} // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:296:12: Add a return type to the method - [FunctionPropertyNames.prototype]() {} // ok - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:297:5: Add a return type to the method - } - - // caller - module TestOnDefaultExportedClass_7 { - export default class StaticCaller { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static caller: number; // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. - caller: string; // ok - } - } - - export class ExportedStaticCaller { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCaller'. - [FunctionPropertyNames.caller]: string; // ok - } - - module TestOnDefaultExportedClass_8 { - export default class StaticCallerFn { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static caller() {} // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. - caller() {} // ok - } - } - - export class ExportedStaticCallerFn { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCallerFn'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:321:12: Add a return type to the method - [FunctionPropertyNames.caller]() {} // ok - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:322:5: Add a return type to the method - } - - // arguments - module TestOnDefaultExportedClass_9 { - export default class StaticArguments { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static arguments: number; // error without useDefineForClassFields - ~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. - arguments: string; // ok - } - } - - export class ExportedStaticArguments { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArguments'. - [FunctionPropertyNames.arguments]: string; // ok - } - - module TestOnDefaultExportedClass_10 { - export default class StaticArgumentsFn { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static arguments() {} // error without useDefineForClassFields - ~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. - arguments() {} // ok - } - } - - export class ExportedStaticArgumentsFn { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArgumentsFn'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:346:12: Add a return type to the method - [FunctionPropertyNames.arguments]() {} // ok - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:347:5: Add a return type to the method - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts b/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts deleted file mode 100644 index ee17de5adb43a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts +++ /dev/null @@ -1,877 +0,0 @@ -//// [tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts] //// - -//// [staticPropertyNameConflicts.ts] -const FunctionPropertyNames = { - name: 'name', - length: 'length', - prototype: 'prototype', - caller: 'caller', - arguments: 'arguments', -} as const; - -// name -class StaticName { - static name: number; // error without useDefineForClassFields - name: string; // ok -} - -class StaticName2 { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - [FunctionPropertyNames.name]: number; // ok -} - -class StaticNameFn { - static name() {} // error without useDefineForClassFields - name() {} // ok -} - -class StaticNameFn2 { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - [FunctionPropertyNames.name]() {} // ok -} - -// length -class StaticLength { - static length: number; // error without useDefineForClassFields - length: string; // ok -} - -class StaticLength2 { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - [FunctionPropertyNames.length]: number; // ok -} - -class StaticLengthFn { - static length() {} // error without useDefineForClassFields - length() {} // ok -} - -class StaticLengthFn2 { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - [FunctionPropertyNames.length]() {} // ok -} - -// prototype -class StaticPrototype { - static prototype: number; // always an error - prototype: string; // ok -} - -class StaticPrototype2 { - static [FunctionPropertyNames.prototype]: number; // always an error - [FunctionPropertyNames.prototype]: string; // ok -} - -class StaticPrototypeFn { - static prototype() {} // always an error - prototype() {} // ok -} - -class StaticPrototypeFn2 { - static [FunctionPropertyNames.prototype]() {} // always an error - [FunctionPropertyNames.prototype]() {} // ok -} - -// caller -class StaticCaller { - static caller: number; // error without useDefineForClassFields - caller: string; // ok -} - -class StaticCaller2 { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - [FunctionPropertyNames.caller]: string; // ok -} - -class StaticCallerFn { - static caller() {} // error without useDefineForClassFields - caller() {} // ok -} - -class StaticCallerFn2 { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - [FunctionPropertyNames.caller]() {} // ok -} - -// arguments -class StaticArguments { - static arguments: number; // error without useDefineForClassFields - arguments: string; // ok -} - -class StaticArguments2 { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - [FunctionPropertyNames.arguments]: string; // ok -} - -class StaticArgumentsFn { - static arguments() {} // error without useDefineForClassFields - arguments() {} // ok -} - -class StaticArgumentsFn2 { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - [FunctionPropertyNames.arguments]() {} // ok -} - - -// === Static properties on anonymous classes === - -// name -var StaticName_Anonymous = class { - static name: number; // error without useDefineForClassFields - name: string; // ok -} - -var StaticName_Anonymous2 = class { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - [FunctionPropertyNames.name]: string; // ok -} - -var StaticNameFn_Anonymous = class { - static name() {} // error without useDefineForClassFields - name() {} // ok -} - -var StaticNameFn_Anonymous2 = class { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - [FunctionPropertyNames.name]() {} // ok -} - -// length -var StaticLength_Anonymous = class { - static length: number; // error without useDefineForClassFields - length: string; // ok -} - -var StaticLength_Anonymous2 = class { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - [FunctionPropertyNames.length]: string; // ok -} - -var StaticLengthFn_Anonymous = class { - static length() {} // error without useDefineForClassFields - length() {} // ok -} - -var StaticLengthFn_Anonymous2 = class { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - [FunctionPropertyNames.length]() {} // ok -} - -// prototype -var StaticPrototype_Anonymous = class { - static prototype: number; // always an error - prototype: string; // ok -} - -var StaticPrototype_Anonymous2 = class { - static [FunctionPropertyNames.prototype]: number; // always an error - [FunctionPropertyNames.prototype]: string; // ok -} - -var StaticPrototypeFn_Anonymous = class { - static prototype() {} // always an error - prototype() {} // ok -} - -var StaticPrototypeFn_Anonymous2 = class { - static [FunctionPropertyNames.prototype]() {} // always an error - [FunctionPropertyNames.prototype]() {} // ok -} - -// caller -var StaticCaller_Anonymous = class { - static caller: number; // error without useDefineForClassFields - caller: string; // ok -} - -var StaticCaller_Anonymous2 = class { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - [FunctionPropertyNames.caller]: string; // ok -} - -var StaticCallerFn_Anonymous = class { - static caller() {} // error without useDefineForClassFields - caller() {} // ok -} - -var StaticCallerFn_Anonymous2 = class { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - [FunctionPropertyNames.caller]() {} // ok -} - -// arguments -var StaticArguments_Anonymous = class { - static arguments: number; // error without useDefineForClassFields - arguments: string; // ok -} - -var StaticArguments_Anonymous2 = class { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - [FunctionPropertyNames.arguments]: string; // ok -} - -var StaticArgumentsFn_Anonymous = class { - static arguments() {} // error without useDefineForClassFields - arguments() {} // ok -} - -var StaticArgumentsFn_Anonymous2 = class { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - [FunctionPropertyNames.arguments]() {} // ok -} - - -// === Static properties on default exported classes === - -// name -module TestOnDefaultExportedClass_1 { - class StaticName { - static name: number; // error without useDefineForClassFields - name: string; // ok - } -} - -export class ExportedStaticName { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - [FunctionPropertyNames.name]: string; // ok -} - -module TestOnDefaultExportedClass_2 { - class StaticNameFn { - static name() {} // error without useDefineForClassFields - name() {} // ok - } -} - -export class ExportedStaticNameFn { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - [FunctionPropertyNames.name]() {} // ok -} - -// length -module TestOnDefaultExportedClass_3 { - export default class StaticLength { - static length: number; // error without useDefineForClassFields - length: string; // ok - } -} - -export class ExportedStaticLength { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - [FunctionPropertyNames.length]: string; // ok -} - -module TestOnDefaultExportedClass_4 { - export default class StaticLengthFn { - static length() {} // error without useDefineForClassFields - length() {} // ok - } -} - -export class ExportedStaticLengthFn { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - [FunctionPropertyNames.length]() {} // ok -} - -// prototype -module TestOnDefaultExportedClass_5 { - export default class StaticPrototype { - static prototype: number; // always an error - prototype: string; // ok - } -} - -export class ExportedStaticPrototype { - static [FunctionPropertyNames.prototype]: number; // always an error - [FunctionPropertyNames.prototype]: string; // ok -} - -module TestOnDefaultExportedClass_6 { - export default class StaticPrototypeFn { - static prototype() {} // always an error - prototype() {} // ok - } -} - -export class ExportedStaticPrototypeFn { - static [FunctionPropertyNames.prototype]() {} // always an error - [FunctionPropertyNames.prototype]() {} // ok -} - -// caller -module TestOnDefaultExportedClass_7 { - export default class StaticCaller { - static caller: number; // error without useDefineForClassFields - caller: string; // ok - } -} - -export class ExportedStaticCaller { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - [FunctionPropertyNames.caller]: string; // ok -} - -module TestOnDefaultExportedClass_8 { - export default class StaticCallerFn { - static caller() {} // error without useDefineForClassFields - caller() {} // ok - } -} - -export class ExportedStaticCallerFn { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - [FunctionPropertyNames.caller]() {} // ok -} - -// arguments -module TestOnDefaultExportedClass_9 { - export default class StaticArguments { - static arguments: number; // error without useDefineForClassFields - arguments: string; // ok - } -} - -export class ExportedStaticArguments { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - [FunctionPropertyNames.arguments]: string; // ok -} - -module TestOnDefaultExportedClass_10 { - export default class StaticArgumentsFn { - static arguments() {} // error without useDefineForClassFields - arguments() {} // ok - } -} - -export class ExportedStaticArgumentsFn { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - [FunctionPropertyNames.arguments]() {} // ok -} - -/// [Declarations] //// - - - -//// [staticPropertyNameConflicts.d.ts] -declare const FunctionPropertyNames: { - readonly name: "name"; - readonly length: "length"; - readonly prototype: "prototype"; - readonly caller: "caller"; - readonly arguments: "arguments"; -}; -export declare class ExportedStaticName { - static [FunctionPropertyNames.name]: number; - [FunctionPropertyNames.name]: string; -} -export declare class ExportedStaticNameFn { - static [FunctionPropertyNames.name](): invalid; - [FunctionPropertyNames.name](): invalid; -} -export declare class ExportedStaticLength { - static [FunctionPropertyNames.length]: number; - [FunctionPropertyNames.length]: string; -} -export declare class ExportedStaticLengthFn { - static [FunctionPropertyNames.length](): invalid; - [FunctionPropertyNames.length](): invalid; -} -export declare class ExportedStaticPrototype { - static [FunctionPropertyNames.prototype]: number; - [FunctionPropertyNames.prototype]: string; -} -export declare class ExportedStaticPrototypeFn { - static [FunctionPropertyNames.prototype](): invalid; - [FunctionPropertyNames.prototype](): invalid; -} -export declare class ExportedStaticCaller { - static [FunctionPropertyNames.caller]: number; - [FunctionPropertyNames.caller]: string; -} -export declare class ExportedStaticCallerFn { - static [FunctionPropertyNames.caller](): invalid; - [FunctionPropertyNames.caller](): invalid; -} -export declare class ExportedStaticArguments { - static [FunctionPropertyNames.arguments]: number; - [FunctionPropertyNames.arguments]: string; -} -export declare class ExportedStaticArgumentsFn { - static [FunctionPropertyNames.arguments](): invalid; - [FunctionPropertyNames.arguments](): invalid; -} -export {}; - -/// [Errors] //// - -staticPropertyNameConflicts.ts(53,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. -staticPropertyNameConflicts.ts(58,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype2'. -staticPropertyNameConflicts.ts(63,12): error TS2300: Duplicate identifier 'prototype'. -staticPropertyNameConflicts.ts(63,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. -staticPropertyNameConflicts.ts(68,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. -staticPropertyNameConflicts.ts(68,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn2'. -staticPropertyNameConflicts.ts(161,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous'. -staticPropertyNameConflicts.ts(166,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous2'. -staticPropertyNameConflicts.ts(171,12): error TS2300: Duplicate identifier 'prototype'. -staticPropertyNameConflicts.ts(171,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous'. -staticPropertyNameConflicts.ts(176,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. -staticPropertyNameConflicts.ts(176,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous2'. -staticPropertyNameConflicts.ts(246,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(247,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(252,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(264,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(271,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. -staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. -staticPropertyNameConflicts.ts(289,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prototype'. -staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. -staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. -staticPropertyNameConflicts.ts(296,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. -staticPropertyNameConflicts.ts(296,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(297,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(302,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(314,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(321,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(322,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(327,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(339,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== staticPropertyNameConflicts.ts (36 errors) ==== - const FunctionPropertyNames = { - name: 'name', - length: 'length', - prototype: 'prototype', - caller: 'caller', - arguments: 'arguments', - } as const; - - // name - class StaticName { - static name: number; // error without useDefineForClassFields - name: string; // ok - } - - class StaticName2 { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - [FunctionPropertyNames.name]: number; // ok - } - - class StaticNameFn { - static name() {} // error without useDefineForClassFields - name() {} // ok - } - - class StaticNameFn2 { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - [FunctionPropertyNames.name]() {} // ok - } - - // length - class StaticLength { - static length: number; // error without useDefineForClassFields - length: string; // ok - } - - class StaticLength2 { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - [FunctionPropertyNames.length]: number; // ok - } - - class StaticLengthFn { - static length() {} // error without useDefineForClassFields - length() {} // ok - } - - class StaticLengthFn2 { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - [FunctionPropertyNames.length]() {} // ok - } - - // prototype - class StaticPrototype { - static prototype: number; // always an error - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. - prototype: string; // ok - } - - class StaticPrototype2 { - static [FunctionPropertyNames.prototype]: number; // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype2'. - [FunctionPropertyNames.prototype]: string; // ok - } - - class StaticPrototypeFn { - static prototype() {} // always an error - ~~~~~~~~~ -!!! error TS2300: Duplicate identifier 'prototype'. - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. - prototype() {} // ok - } - - class StaticPrototypeFn2 { - static [FunctionPropertyNames.prototype]() {} // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn2'. - [FunctionPropertyNames.prototype]() {} // ok - } - - // caller - class StaticCaller { - static caller: number; // error without useDefineForClassFields - caller: string; // ok - } - - class StaticCaller2 { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - [FunctionPropertyNames.caller]: string; // ok - } - - class StaticCallerFn { - static caller() {} // error without useDefineForClassFields - caller() {} // ok - } - - class StaticCallerFn2 { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - [FunctionPropertyNames.caller]() {} // ok - } - - // arguments - class StaticArguments { - static arguments: number; // error without useDefineForClassFields - arguments: string; // ok - } - - class StaticArguments2 { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - [FunctionPropertyNames.arguments]: string; // ok - } - - class StaticArgumentsFn { - static arguments() {} // error without useDefineForClassFields - arguments() {} // ok - } - - class StaticArgumentsFn2 { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - [FunctionPropertyNames.arguments]() {} // ok - } - - - // === Static properties on anonymous classes === - - // name - var StaticName_Anonymous = class { - static name: number; // error without useDefineForClassFields - name: string; // ok - } - - var StaticName_Anonymous2 = class { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - [FunctionPropertyNames.name]: string; // ok - } - - var StaticNameFn_Anonymous = class { - static name() {} // error without useDefineForClassFields - name() {} // ok - } - - var StaticNameFn_Anonymous2 = class { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - [FunctionPropertyNames.name]() {} // ok - } - - // length - var StaticLength_Anonymous = class { - static length: number; // error without useDefineForClassFields - length: string; // ok - } - - var StaticLength_Anonymous2 = class { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - [FunctionPropertyNames.length]: string; // ok - } - - var StaticLengthFn_Anonymous = class { - static length() {} // error without useDefineForClassFields - length() {} // ok - } - - var StaticLengthFn_Anonymous2 = class { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - [FunctionPropertyNames.length]() {} // ok - } - - // prototype - var StaticPrototype_Anonymous = class { - static prototype: number; // always an error - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous'. - prototype: string; // ok - } - - var StaticPrototype_Anonymous2 = class { - static [FunctionPropertyNames.prototype]: number; // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous2'. - [FunctionPropertyNames.prototype]: string; // ok - } - - var StaticPrototypeFn_Anonymous = class { - static prototype() {} // always an error - ~~~~~~~~~ -!!! error TS2300: Duplicate identifier 'prototype'. - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous'. - prototype() {} // ok - } - - var StaticPrototypeFn_Anonymous2 = class { - static [FunctionPropertyNames.prototype]() {} // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous2'. - [FunctionPropertyNames.prototype]() {} // ok - } - - // caller - var StaticCaller_Anonymous = class { - static caller: number; // error without useDefineForClassFields - caller: string; // ok - } - - var StaticCaller_Anonymous2 = class { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - [FunctionPropertyNames.caller]: string; // ok - } - - var StaticCallerFn_Anonymous = class { - static caller() {} // error without useDefineForClassFields - caller() {} // ok - } - - var StaticCallerFn_Anonymous2 = class { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - [FunctionPropertyNames.caller]() {} // ok - } - - // arguments - var StaticArguments_Anonymous = class { - static arguments: number; // error without useDefineForClassFields - arguments: string; // ok - } - - var StaticArguments_Anonymous2 = class { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - [FunctionPropertyNames.arguments]: string; // ok - } - - var StaticArgumentsFn_Anonymous = class { - static arguments() {} // error without useDefineForClassFields - arguments() {} // ok - } - - var StaticArgumentsFn_Anonymous2 = class { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - [FunctionPropertyNames.arguments]() {} // ok - } - - - // === Static properties on default exported classes === - - // name - module TestOnDefaultExportedClass_1 { - class StaticName { - static name: number; // error without useDefineForClassFields - name: string; // ok - } - } - - export class ExportedStaticName { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - [FunctionPropertyNames.name]: string; // ok - } - - module TestOnDefaultExportedClass_2 { - class StaticNameFn { - static name() {} // error without useDefineForClassFields - name() {} // ok - } - } - - export class ExportedStaticNameFn { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:246:12: Add a return type to the method - [FunctionPropertyNames.name]() {} // ok - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:247:5: Add a return type to the method - } - - // length - module TestOnDefaultExportedClass_3 { - export default class StaticLength { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static length: number; // error without useDefineForClassFields - length: string; // ok - } - } - - export class ExportedStaticLength { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - [FunctionPropertyNames.length]: string; // ok - } - - module TestOnDefaultExportedClass_4 { - export default class StaticLengthFn { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static length() {} // error without useDefineForClassFields - length() {} // ok - } - } - - export class ExportedStaticLengthFn { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:271:12: Add a return type to the method - [FunctionPropertyNames.length]() {} // ok - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:272:5: Add a return type to the method - } - - // prototype - module TestOnDefaultExportedClass_5 { - export default class StaticPrototype { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static prototype: number; // always an error - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. - prototype: string; // ok - } - } - - export class ExportedStaticPrototype { - static [FunctionPropertyNames.prototype]: number; // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. - [FunctionPropertyNames.prototype]: string; // ok - } - - module TestOnDefaultExportedClass_6 { - export default class StaticPrototypeFn { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static prototype() {} // always an error - ~~~~~~~~~ -!!! error TS2300: Duplicate identifier 'prototype'. - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. - prototype() {} // ok - } - } - - export class ExportedStaticPrototypeFn { - static [FunctionPropertyNames.prototype]() {} // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:296:12: Add a return type to the method - [FunctionPropertyNames.prototype]() {} // ok - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:297:5: Add a return type to the method - } - - // caller - module TestOnDefaultExportedClass_7 { - export default class StaticCaller { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static caller: number; // error without useDefineForClassFields - caller: string; // ok - } - } - - export class ExportedStaticCaller { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - [FunctionPropertyNames.caller]: string; // ok - } - - module TestOnDefaultExportedClass_8 { - export default class StaticCallerFn { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static caller() {} // error without useDefineForClassFields - caller() {} // ok - } - } - - export class ExportedStaticCallerFn { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:321:12: Add a return type to the method - [FunctionPropertyNames.caller]() {} // ok - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:322:5: Add a return type to the method - } - - // arguments - module TestOnDefaultExportedClass_9 { - export default class StaticArguments { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static arguments: number; // error without useDefineForClassFields - arguments: string; // ok - } - } - - export class ExportedStaticArguments { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - [FunctionPropertyNames.arguments]: string; // ok - } - - module TestOnDefaultExportedClass_10 { - export default class StaticArgumentsFn { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static arguments() {} // error without useDefineForClassFields - arguments() {} // ok - } - } - - export class ExportedStaticArgumentsFn { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:346:12: Add a return type to the method - [FunctionPropertyNames.arguments]() {} // ok - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:347:5: Add a return type to the method - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/stringLiteralsWithTypeAssertions01.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/stringLiteralsWithTypeAssertions01.d.ts deleted file mode 100644 index 7dae1d22499de..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/stringLiteralsWithTypeAssertions01.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -//// [tests/cases/conformance/types/literal/stringLiteralsWithTypeAssertions01.ts] //// - -//// [stringLiteralsWithTypeAssertions01.ts] -let fooOrBar: "foo" | "bar"; - -let a = "foo" as "bar"; -let b = "bar" as "foo"; -let c = fooOrBar as "foo"; -let d = fooOrBar as "bar"; -let e = fooOrBar as "baz"; -let f = "baz" as typeof fooOrBar; - -/// [Declarations] //// - - - -//// [stringLiteralsWithTypeAssertions01.d.ts] -declare let fooOrBar: "foo" | "bar"; -declare let a: "bar"; -declare let b: "foo"; -declare let c: "foo"; -declare let d: "bar"; -declare let e: "baz"; -declare let f: typeof fooOrBar; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts deleted file mode 100644 index eaec939561c51..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty1.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -//// [tests/cases/conformance/es6/Symbols/symbolProperty1.ts] //// - -//// [symbolProperty1.ts] -var s: symbol; -var x = { - [s]: 0, - [s]() { }, - get [s]() { - return 0; - } -} - -/// [Declarations] //// - - - -//// [symbolProperty1.d.ts] -declare var s: symbol; -declare var x: invalid; - -/// [Errors] //// - -symbolProperty1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -symbolProperty1.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - -==== symbolProperty1.ts (2 errors) ==== - var s: symbol; - var x = { - [s]: 0, - [s]() { }, - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x. -!!! related TS9034 symbolProperty1.ts:4:5: Add a return type to the method - get [s]() { - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 symbolProperty1.ts:5:9: Add a return type to the get accessor declaration. - return 0; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts deleted file mode 100644 index 65215f66fdc35..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty2.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -//// [tests/cases/conformance/es6/Symbols/symbolProperty2.ts] //// - -//// [symbolProperty2.ts] -var s = Symbol(); -var x = { - [s]: 0, - [s]() { }, - get [s]() { - return 0; - } -} - -/// [Declarations] //// - - - -//// [symbolProperty2.d.ts] -declare var s: invalid; -declare var x: invalid; - -/// [Errors] //// - -symbolProperty2.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -symbolProperty2.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -symbolProperty2.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - -==== symbolProperty2.ts (3 errors) ==== - var s = Symbol(); - ~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 symbolProperty2.ts:1:5: Add a type annotation to the variable s. - var x = { - [s]: 0, - [s]() { }, - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x. -!!! related TS9034 symbolProperty2.ts:4:5: Add a return type to the method - get [s]() { - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 symbolProperty2.ts:5:9: Add a return type to the get accessor declaration. - return 0; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts deleted file mode 100644 index 7b20b6d90809a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty3.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -//// [tests/cases/conformance/es6/Symbols/symbolProperty3.ts] //// - -//// [symbolProperty3.ts] -var s = Symbol; -var x = { - [s]: 0, - [s]() { }, - get [s]() { - return 0; - } -} - -/// [Declarations] //// - - - -//// [symbolProperty3.d.ts] -declare var s: invalid; -declare var x: invalid; - -/// [Errors] //// - -symbolProperty3.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -symbolProperty3.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty3.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -symbolProperty3.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty3.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - -==== symbolProperty3.ts (6 errors) ==== - var s = Symbol; - ~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 symbolProperty3.ts:1:5: Add a type annotation to the variable s. - var x = { - [s]: 0, - ~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [s]() { }, - ~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x. -!!! related TS9034 symbolProperty3.ts:4:5: Add a return type to the method - get [s]() { - ~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 symbolProperty3.ts:5:9: Add a return type to the get accessor declaration. - return 0; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty52.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty52.d.ts deleted file mode 100644 index 104d711d2f769..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty52.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -//// [tests/cases/conformance/es6/Symbols/symbolProperty52.ts] //// - -//// [symbolProperty52.ts] -var obj = { - [Symbol.nonsense]: 0 -}; - -obj = {}; - -obj[Symbol.nonsense]; - -/// [Declarations] //// - - - -//// [symbolProperty52.d.ts] -declare var obj: { - [Symbol.nonsense]: number; -}; - -/// [Errors] //// - -symbolProperty52.ts(2,13): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. -symbolProperty52.ts(7,12): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. - - -==== symbolProperty52.ts (2 errors) ==== - var obj = { - [Symbol.nonsense]: 0 - ~~~~~~~~ -!!! error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. - }; - - obj = {}; - - obj[Symbol.nonsense]; - ~~~~~~~~ -!!! error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty53.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty53.d.ts deleted file mode 100644 index fe6cb9dbd47d1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty53.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -//// [tests/cases/conformance/es6/Symbols/symbolProperty53.ts] //// - -//// [symbolProperty53.ts] -var obj = { - [Symbol.for]: 0 -}; - -obj[Symbol.for]; - -/// [Declarations] //// - - - -//// [symbolProperty53.d.ts] -declare var obj: { - [Symbol.for]: number; -}; - -/// [Errors] //// - -symbolProperty53.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty53.ts(5,5): error TS2538: Type '(key: string) => symbol' cannot be used as an index type. - - -==== symbolProperty53.ts (2 errors) ==== - var obj = { - [Symbol.for]: 0 - ~~~~~~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - }; - - obj[Symbol.for]; - ~~~~~~~~~~ -!!! error TS2538: Type '(key: string) => symbol' cannot be used as an index type. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty54.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty54.d.ts deleted file mode 100644 index 730d3c5ba7509..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty54.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -//// [tests/cases/conformance/es6/Symbols/symbolProperty54.ts] //// - -//// [symbolProperty54.ts] -var obj = { - [Symbol.prototype]: 0 -}; - -/// [Declarations] //// - - - -//// [symbolProperty54.d.ts] -declare var obj: { - [Symbol.prototype]: number; -}; - -/// [Errors] //// - -symbolProperty54.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - -==== symbolProperty54.ts (1 errors) ==== - var obj = { - [Symbol.prototype]: 0 - ~~~~~~~~~~~~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty58.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty58.d.ts deleted file mode 100644 index f87e43fc5ab04..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty58.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -//// [tests/cases/conformance/es6/Symbols/symbolProperty58.ts] //// - -//// [symbolProperty58.ts] -interface SymbolConstructor { - foo: string; -} - -var obj = { - [Symbol.foo]: 0 -} - -/// [Declarations] //// - - - -//// [symbolProperty58.d.ts] -interface SymbolConstructor { - foo: string; -} -declare var obj: { - [Symbol.foo]: number; -}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty59.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty59.d.ts deleted file mode 100644 index 56847aa8e3b78..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/symbolProperty59.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/es6/Symbols/symbolProperty59.ts] //// - -//// [symbolProperty59.ts] -interface I { - [Symbol.keyFor]: string; -} - -/// [Declarations] //// - - - -//// [symbolProperty59.d.ts] -interface I { - [Symbol.keyFor]: string; -} - -/// [Errors] //// - -symbolProperty59.ts(2,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. -symbolProperty59.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - -==== symbolProperty59.ts (2 errors) ==== - interface I { - [Symbol.keyFor]: string; - ~~~~~~~~~~~~~~~ -!!! 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 TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/thisTypeErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/thisTypeErrors.d.ts deleted file mode 100644 index b5f3e4c4e82e0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/thisTypeErrors.d.ts +++ /dev/null @@ -1,280 +0,0 @@ -//// [tests/cases/conformance/types/thisType/thisTypeErrors.ts] //// - -//// [thisTypeErrors.ts] -var x1: this; -var x2: { a: this }; -var x3: this[]; - -function f1(x: this): this { - var y: this; - return this; -} - -interface I1 { - a: { x: this }; - b: { (): this }; - c: { new (): this }; - d: { [x: string]: this }; - e: { f(x: this): this }; -} - -class C1 { - a: { x: this }; - b: { (): this }; - c: { new (): this }; - d: { [x: string]: this }; - e: { f(x: this): this }; -} - -class C2 { - static x: this; - static y = undefined; - static foo(x: this): this { - return undefined; - } -} - -namespace N1 { - export var x: this; - export var y = this; -} - -class C3 { - x1 = { - g(x: this): this { - return undefined; - } - } - f() { - function g(x: this): this { - return undefined; - } - let x2 = { - h(x: this): this { - return undefined; - } - } - } -} - - -/// [Declarations] //// - - - -//// [thisTypeErrors.d.ts] -declare var x1: this; -declare var x2: { - a: this; -}; -declare var x3: this[]; -declare function f1(x: this): this; -interface I1 { - a: { - x: this; - }; - b: { - (): this; - }; - c: { - new (): this; - }; - d: { - [x: string]: this; - }; - e: { - f(x: this): this; - }; -} -declare class C1 { - a: { - x: this; - }; - b: { - (): this; - }; - c: { - new (): this; - }; - d: { - [x: string]: this; - }; - e: { - f(x: this): this; - }; -} -declare class C2 { - static x: this; - static y: this; - static foo(x: this): this; -} -declare namespace N1 { - var x: this; - var y: invalid; -} -declare class C3 { - x1: { - g(x: this): this; - }; - f(): invalid; -} - -/// [Errors] //// - -thisTypeErrors.ts(1,9): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(2,14): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(3,9): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(5,16): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(5,23): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(6,12): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(11,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(12,14): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(13,18): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(14,23): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(15,15): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(15,22): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(19,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(20,14): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(21,18): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(22,23): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(23,15): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(23,22): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(27,15): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(28,17): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(29,19): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(29,26): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(35,19): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(36,20): error TS2331: 'this' cannot be referenced in a module or namespace body. -thisTypeErrors.ts(36,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -thisTypeErrors.ts(41,14): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(41,21): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(45,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -thisTypeErrors.ts(46,23): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(46,30): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(50,18): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(50,25): error TS2526: A 'this' type is available only in a non-static member of a class or interface. - - -==== thisTypeErrors.ts (32 errors) ==== - var x1: this; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - var x2: { a: this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - var x3: this[]; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - - function f1(x: this): this { - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - var y: this; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - return this; - } - - interface I1 { - a: { x: this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - b: { (): this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - c: { new (): this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - d: { [x: string]: this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - e: { f(x: this): this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - } - - class C1 { - a: { x: this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - b: { (): this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - c: { new (): this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - d: { [x: string]: this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - e: { f(x: this): this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - } - - class C2 { - static x: this; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - static y = undefined; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - static foo(x: this): this { - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - return undefined; - } - } - - namespace N1 { - export var x: this; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - export var y = this; - ~~~~ -!!! error TS2331: 'this' cannot be referenced in a module or namespace body. - ~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 thisTypeErrors.ts:36:16: Add a type annotation to the variable y. - } - - class C3 { - x1 = { - g(x: this): this { - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - return undefined; - } - } - f() { - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 thisTypeErrors.ts:45:5: Add a return type to the method - function g(x: this): this { - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - return undefined; - } - let x2 = { - h(x: this): this { - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - return undefined; - } - } - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/thisTypeInAccessors.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/thisTypeInAccessors.d.ts deleted file mode 100644 index b51412f29ca58..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/thisTypeInAccessors.d.ts +++ /dev/null @@ -1,147 +0,0 @@ -//// [tests/cases/conformance/types/thisType/thisTypeInAccessors.ts] //// - -//// [thisTypeInAccessors.ts] -interface Foo { - n: number; - x: number; -} - -const explicit = { - n: 12, - get x(this: Foo): number { return this.n; }, - set x(this: Foo, n: number) { this.n = n; } -} -const copiedFromGetter = { - n: 14, - get x(this: Foo): number { return this.n; }, - set x(n) { this.n = n; } -} -const copiedFromSetter = { - n: 15, - get x() { return this.n }, - set x(this: Foo, n: number) { this.n = n; } -} -const copiedFromGetterUnannotated = { - n: 16, - get x(this: Foo) { return this.n }, - set x(this, n) { this.n = n; } -} - -class Explicit { - n = 17; - get x(this: Foo): number { return this.n; } - set x(this: Foo, n: number) { this.n = n; } -} -class Contextual { - n = 21; - get x() { return this.n } // inside a class, so already correct -} - - -/// [Declarations] //// - - - -//// [thisTypeInAccessors.d.ts] -interface Foo { - n: number; - x: number; -} -declare const explicit: { - n: number; - get x(this: Foo): number; - set x(this: Foo, n: number); -}; -declare const copiedFromGetter: { - n: number; - x: number; -}; -declare const copiedFromSetter: { - n: number; - x: number; -}; -declare const copiedFromGetterUnannotated: invalid; -declare class Explicit { - n: number; - get x(this: Foo): number; - set x(this: Foo, n: Foo); -} -declare class Contextual { - n: number; - get x(): invalid; -} - -/// [Errors] //// - -thisTypeInAccessors.ts(8,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(9,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(13,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(19,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(23,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -thisTypeInAccessors.ts(23,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(24,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(29,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(30,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(34,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - -==== thisTypeInAccessors.ts (10 errors) ==== - interface Foo { - n: number; - x: number; - } - - const explicit = { - n: 12, - get x(this: Foo): number { return this.n; }, - ~~~~~~~~~ -!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. - set x(this: Foo, n: number) { this.n = n; } - ~~~~~~~~~ -!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. - } - const copiedFromGetter = { - n: 14, - get x(this: Foo): number { return this.n; }, - ~~~~~~~~~ -!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. - set x(n) { this.n = n; } - } - const copiedFromSetter = { - n: 15, - get x() { return this.n }, - set x(this: Foo, n: number) { this.n = n; } - ~~~~~~~~~ -!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. - } - const copiedFromGetterUnannotated = { - n: 16, - get x(this: Foo) { return this.n }, - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 thisTypeInAccessors.ts:24:9: Add a type to parameter of the set accessor declaration. -!!! related TS9032 thisTypeInAccessors.ts:23:9: Add a return type to the get accessor declaration. - ~~~~~~~~~ -!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. - set x(this, n) { this.n = n; } - ~~~~ -!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. - } - - class Explicit { - n = 17; - get x(this: Foo): number { return this.n; } - ~~~~~~~~~ -!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. - set x(this: Foo, n: number) { this.n = n; } - ~~~~~~~~~ -!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. - } - class Contextual { - n = 21; - get x() { return this.n } // inside a class, so already correct - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 thisTypeInAccessors.ts:34:9: Add a return type to the get accessor declaration. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment32.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment32.d.ts deleted file mode 100644 index 253ff44390d5e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment32.d.ts +++ /dev/null @@ -1,133 +0,0 @@ -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts] //// - -//// [expando.ts] -function ExpandoMerge(n: number) { - return n; -} -ExpandoMerge.p1 = 111 -ExpandoMerge.m = function(n: number) { - return n + 1; -} -ExpandoMerge.p4 = 44444; -ExpandoMerge.p5 = 555555; -ExpandoMerge.p6 = 66666; -ExpandoMerge.p7 = 777777; -ExpandoMerge.p8 = false; // type error -ExpandoMerge.p9 = false; // type error -var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - -//// [ns.ts] -namespace ExpandoMerge { - export var p3 = 333; - export var p4 = 4; - export var p5 = 5; - export let p6 = 6; - export let p7 = 7; - export var p8 = 6; - export let p9 = 7; -} -namespace ExpandoMerge { - export var p2 = 222; -} - - -/// [Declarations] //// - - - -//// [expando.d.ts] -declare function ExpandoMerge(n: number): invalid; -declare var n: invalid; - -//// [ns.d.ts] -declare namespace ExpandoMerge { - var p3: number; - var p4: number; - var p5: number; - let p6: number; - let p7: number; - var p8: number; - let p9: number; -} -declare namespace ExpandoMerge { - var p2: number; -} - -/// [Errors] //// - -expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -expando.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. -expando.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. -expando.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. -expando.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. -expando.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. -expando.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. -expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -expando.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. -expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -expando.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. -expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. -ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - - -==== expando.ts (12 errors) ==== - function ExpandoMerge(n: number) { - ~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 expando.ts:1:10: Add a return type to the function declaration. - return n; - } - 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. - ExpandoMerge.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; - } - ExpandoMerge.p4 = 44444; - ~~~~~~~~~~~~~~~ -!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - ExpandoMerge.p5 = 555555; - ~~~~~~~~~~~~~~~ -!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - ExpandoMerge.p6 = 66666; - ~~~~~~~~~~~~~~~ -!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - ExpandoMerge.p7 = 777777; - ~~~~~~~~~~~~~~~ -!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - ExpandoMerge.p8 = false; // type error - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type '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. - ExpandoMerge.p9 = false; // type error - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type '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. - var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n. - -==== ns.ts (2 errors) ==== - namespace ExpandoMerge { - ~~~~~~~~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - export var p3 = 333; - export var p4 = 4; - export var p5 = 5; - export let p6 = 6; - export let p7 = 7; - export var p8 = 6; - export let p9 = 7; - } - namespace ExpandoMerge { - ~~~~~~~~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - export var p2 = 222; - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment33.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment33.d.ts deleted file mode 100644 index 8131bf586bf02..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeFromPropertyAssignment33.d.ts +++ /dev/null @@ -1,137 +0,0 @@ -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts] //// - -//// [ns.ts] -namespace ExpandoMerge { - export var p3 = 333; - export var p4 = 4; - export var p5 = 5; - export let p6 = 6; - export let p7 = 7; - export var p8 = 6; - export let p9 = 7; -} -namespace ExpandoMerge { - export var p2 = 222; -} - - -//// [expando.ts] -function ExpandoMerge(n: number) { - return n; -} -ExpandoMerge.p1 = 111 -ExpandoMerge.m = function(n: number) { - return n + 1; -} -ExpandoMerge.p4 = 44444; -ExpandoMerge.p5 = 555555; -ExpandoMerge.p6 = 66666; -ExpandoMerge.p7 = 777777; -ExpandoMerge.p8 = false; // type error -ExpandoMerge.p9 = false; // type error -var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - - - -/// [Declarations] //// - - - -//// [expando.d.ts] -declare function ExpandoMerge(n: number): invalid; -declare var n: invalid; - -//// [ns.d.ts] -declare namespace ExpandoMerge { - var p3: number; - var p4: number; - var p5: number; - let p6: number; - let p7: number; - var p8: number; - let p9: number; -} -declare namespace ExpandoMerge { - var p2: number; -} - -/// [Errors] //// - -expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -expando.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. -expando.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. -expando.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. -expando.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. -expando.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. -expando.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. -expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -expando.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. -expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -expando.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. -expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. -ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - - -==== ns.ts (2 errors) ==== - namespace ExpandoMerge { - ~~~~~~~~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - export var p3 = 333; - export var p4 = 4; - export var p5 = 5; - export let p6 = 6; - export let p7 = 7; - export var p8 = 6; - export let p9 = 7; - } - namespace ExpandoMerge { - ~~~~~~~~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - export var p2 = 222; - } - - -==== expando.ts (12 errors) ==== - function ExpandoMerge(n: number) { - ~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 expando.ts:1:10: Add a return type to the function declaration. - return n; - } - 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. - ExpandoMerge.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; - } - ExpandoMerge.p4 = 44444; - ~~~~~~~~~~~~~~~ -!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - ExpandoMerge.p5 = 555555; - ~~~~~~~~~~~~~~~ -!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - ExpandoMerge.p6 = 66666; - ~~~~~~~~~~~~~~~ -!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - ExpandoMerge.p7 = 777777; - ~~~~~~~~~~~~~~~ -!!! error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. - ExpandoMerge.p8 = false; // type error - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type '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. - ExpandoMerge.p9 = false; // type error - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type '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. - var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n. - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts deleted file mode 100644 index aa1e487bf704f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeUsedAsTypeLiteralIndex.d.ts +++ /dev/null @@ -1,116 +0,0 @@ -//// [tests/cases/compiler/typeUsedAsTypeLiteralIndex.ts] //// - -//// [typeUsedAsTypeLiteralIndex.ts] -type K = number | string; -type T = { - [K]: number; // Did you mean to use 'P in K'? -} - -const K1 = Symbol(); -type T1 = { - [K1]: number; -} - -type K2 = "x" | "y"; -type T2 = { - [K2]: number; // Did you mean to use 'K in K2'? -} - -type K3 = number | string; -type T3 = { - [K3]: number; // Did you mean to use 'K in K3'? -} - -type K4 = number | string; -type T4 = { - [K4]: number; - k4: string; -} - - -/// [Declarations] //// - - - -//// [typeUsedAsTypeLiteralIndex.d.ts] -type K = number | string; -type T = { - [K]: number; -}; -declare const K1: invalid; -type T1 = { - [K1]: number; -}; -type K2 = "x" | "y"; -type T2 = { - [K2]: number; -}; -type K3 = number | string; -type T3 = { - [K3]: number; -}; -type K4 = number | string; -type T4 = { - [K4]: number; - k4: string; -}; - -/// [Errors] //// - -typeUsedAsTypeLiteralIndex.ts(3,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. -typeUsedAsTypeLiteralIndex.ts(3,6): error TS2690: 'K' only refers to a type, but is being used as a value here. Did you mean to use 'P in K'? -typeUsedAsTypeLiteralIndex.ts(6,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -typeUsedAsTypeLiteralIndex.ts(13,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. -typeUsedAsTypeLiteralIndex.ts(13,6): error TS2690: 'K2' only refers to a type, but is being used as a value here. Did you mean to use 'K in K2'? -typeUsedAsTypeLiteralIndex.ts(18,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. -typeUsedAsTypeLiteralIndex.ts(18,6): error TS2690: 'K3' only refers to a type, but is being used as a value here. Did you mean to use 'K in K3'? -typeUsedAsTypeLiteralIndex.ts(23,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. -typeUsedAsTypeLiteralIndex.ts(23,6): error TS2693: 'K4' only refers to a type, but is being used as a value here. - - -==== typeUsedAsTypeLiteralIndex.ts (9 errors) ==== - type K = number | string; - type T = { - [K]: number; // Did you mean to use 'P in K'? - ~~~ -!!! 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 TS2690: 'K' only refers to a type, but is being used as a value here. Did you mean to use 'P in K'? - } - - const K1 = Symbol(); - ~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 typeUsedAsTypeLiteralIndex.ts:6:7: Add a type annotation to the variable K1. - type T1 = { - [K1]: number; - } - - type K2 = "x" | "y"; - type T2 = { - [K2]: number; // Did you mean to use 'K in K2'? - ~~~~ -!!! 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 TS2690: 'K2' only refers to a type, but is being used as a value here. Did you mean to use 'K in K2'? - } - - type K3 = number | string; - type T3 = { - [K3]: number; // Did you mean to use 'K in K3'? - ~~~~ -!!! 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 TS2690: 'K3' only refers to a type, but is being used as a value here. Did you mean to use 'K in K3'? - } - - type K4 = number | string; - type T4 = { - [K4]: number; - ~~~~ -!!! 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 TS2693: 'K4' only refers to a type, but is being used as a value here. - k4: string; - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts deleted file mode 100644 index 7d3b6b0cdb9d6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty1.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -//// [tests/cases/conformance/Symbols/ES5SymbolProperty1.ts] //// - -//// [ES5SymbolProperty1.ts] -interface SymbolConstructor { - foo: string; -} -var Symbol: SymbolConstructor; - -var obj = { - [Symbol.foo]: 0 -} - -obj[Symbol.foo]; - -/// [Declarations] //// - - - -//// [ES5SymbolProperty1.d.ts] -interface SymbolConstructor { - foo: string; -} -declare var Symbol: SymbolConstructor; -declare var obj: invalid; - -/// [Errors] //// - -ES5SymbolProperty1.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== ES5SymbolProperty1.ts (1 errors) ==== - interface SymbolConstructor { - foo: string; - } - var Symbol: SymbolConstructor; - - var obj = { - [Symbol.foo]: 0 - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 ES5SymbolProperty1.ts:6:5: Add a type annotation to the variable obj. - } - - obj[Symbol.foo]; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts deleted file mode 100644 index f230d3057a3bf..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/FunctionDeclaration8_es6.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts] //// - -//// [FunctionDeclaration8_es6.ts] -var v = { [yield]: foo } - -/// [Declarations] //// - - - -//// [FunctionDeclaration8_es6.d.ts] -declare var v: invalid; - -/// [Errors] //// - -FunctionDeclaration8_es6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -FunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'yield'. -FunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. -FunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. - - -==== FunctionDeclaration8_es6.ts (4 errors) ==== - var v = { [yield]: foo } - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 FunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v. - ~~~~~ -!!! error TS2304: Cannot find name 'yield'. - ~~~ -!!! error TS2304: Cannot find name 'foo'. - ~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 FunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v. -!!! related TS9035 FunctionDeclaration8_es6.ts:1:20: Add a type assertion to this expression to make type type explicit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/arrayFind.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/arrayFind.d.ts deleted file mode 100644 index 56c066624b369..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/arrayFind.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -//// [tests/cases/compiler/arrayFind.ts] //// - -//// [arrayFind.ts] -// test fix for #18112, type guard predicates should narrow returned element -function isNumber(x: any): x is number { - return typeof x === "number"; -} - -const arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true]; -const foundNumber: number | undefined = arrayOfStringsNumbersAndBooleans.find(isNumber); - -const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans as ReadonlyArray; -const readonlyFoundNumber: number | undefined = readonlyArrayOfStringsNumbersAndBooleans.find(isNumber); - - -/// [Declarations] //// - - - -//// [arrayFind.d.ts] -declare function isNumber(x: any): x is number; -declare const arrayOfStringsNumbersAndBooleans: invalid; -declare const foundNumber: number | undefined; -declare const readonlyArrayOfStringsNumbersAndBooleans: readonly (string | number | boolean)[]; -declare const readonlyFoundNumber: number | undefined; - -/// [Errors] //// - -arrayFind.ts(6,42): error TS9017: Only const arrays can be inferred with --isolatedDeclarations. - - -==== arrayFind.ts (1 errors) ==== - // test fix for #18112, type guard predicates should narrow returned element - function isNumber(x: any): x is number { - return typeof x === "number"; - } - - const arrayOfStringsNumbersAndBooleans = ["string", false, 0, "strung", 1, true]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations. -!!! related TS9027 arrayFind.ts:6:7: Add a type annotation to the variable arrayOfStringsNumbersAndBooleans. - const foundNumber: number | undefined = arrayOfStringsNumbersAndBooleans.find(isNumber); - - const readonlyArrayOfStringsNumbersAndBooleans = arrayOfStringsNumbersAndBooleans as ReadonlyArray; - const readonlyFoundNumber: number | undefined = readonlyArrayOfStringsNumbersAndBooleans.find(isNumber); - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asOperator1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asOperator1.d.ts deleted file mode 100644 index ee3b2efd33857..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/asOperator1.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -//// [tests/cases/conformance/expressions/asOperator/asOperator1.ts] //// - -//// [asOperator1.ts] -var as = 43; -var x = undefined as number; -var y = (null as string).length; -var z = Date as any as string; - -// Should parse as a union type, not a bitwise 'or' of (32 as number) and 'string' -var j = 32 as number|string; -j = ''; - - -/// [Declarations] //// - - - -//// [asOperator1.d.ts] -declare var as: number; -declare var x: number; -declare var y: invalid; -declare var z: string; -declare var j: string | number; - -/// [Errors] //// - -asOperator1.ts(3,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. - - -==== asOperator1.ts (1 errors) ==== - var as = 43; - var x = undefined as number; - var y = (null as string).length; - ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 asOperator1.ts:3:5: Add a type annotation to the variable y. - var z = Date as any as string; - - // Should parse as a union type, not a bitwise 'or' of (32 as number) and 'string' - var j = 32 as number|string; - j = ''; - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts deleted file mode 100644 index 636db8e6c11ee..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es2017.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts] //// - -//// [asyncFunctionDeclaration8_es2017.ts] -var v = { [await]: foo } - -/// [Declarations] //// - - - -//// [asyncFunctionDeclaration8_es2017.d.ts] -declare var v: invalid; - -/// [Errors] //// - -asyncFunctionDeclaration8_es2017.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -asyncFunctionDeclaration8_es2017.ts(1,12): error TS2304: Cannot find name 'await'. -asyncFunctionDeclaration8_es2017.ts(1,20): error TS2304: Cannot find name 'foo'. -asyncFunctionDeclaration8_es2017.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. - - -==== asyncFunctionDeclaration8_es2017.ts (4 errors) ==== - var v = { [await]: foo } - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 asyncFunctionDeclaration8_es2017.ts:1:5: Add a type annotation to the variable v. - ~~~~~ -!!! error TS2304: Cannot find name 'await'. - ~~~ -!!! error TS2304: Cannot find name 'foo'. - ~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 asyncFunctionDeclaration8_es2017.ts:1:5: Add a type annotation to the variable v. -!!! related TS9035 asyncFunctionDeclaration8_es2017.ts:1:20: Add a type assertion to this expression to make type type explicit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts deleted file mode 100644 index 7b57671bc4687..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es5.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts] //// - -//// [asyncFunctionDeclaration8_es5.ts] -var v = { [await]: foo } - -/// [Declarations] //// - - - -//// [asyncFunctionDeclaration8_es5.d.ts] -declare var v: invalid; - -/// [Errors] //// - -asyncFunctionDeclaration8_es5.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -asyncFunctionDeclaration8_es5.ts(1,12): error TS2304: Cannot find name 'await'. -asyncFunctionDeclaration8_es5.ts(1,20): error TS2304: Cannot find name 'foo'. -asyncFunctionDeclaration8_es5.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. - - -==== asyncFunctionDeclaration8_es5.ts (4 errors) ==== - var v = { [await]: foo } - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 asyncFunctionDeclaration8_es5.ts:1:5: Add a type annotation to the variable v. - ~~~~~ -!!! error TS2304: Cannot find name 'await'. - ~~~ -!!! error TS2304: Cannot find name 'foo'. - ~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 asyncFunctionDeclaration8_es5.ts:1:5: Add a type annotation to the variable v. -!!! related TS9035 asyncFunctionDeclaration8_es5.ts:1:20: Add a type assertion to this expression to make type type explicit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts deleted file mode 100644 index e04a9619c23aa..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/asyncFunctionDeclaration8_es6.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts] //// - -//// [asyncFunctionDeclaration8_es6.ts] -var v = { [await]: foo } - -/// [Declarations] //// - - - -//// [asyncFunctionDeclaration8_es6.d.ts] -declare var v: invalid; - -/// [Errors] //// - -asyncFunctionDeclaration8_es6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -asyncFunctionDeclaration8_es6.ts(1,12): error TS2304: Cannot find name 'await'. -asyncFunctionDeclaration8_es6.ts(1,20): error TS2304: Cannot find name 'foo'. -asyncFunctionDeclaration8_es6.ts(1,20): error TS9013: Expression type can't be inferred with --isolatedDeclarations. - - -==== asyncFunctionDeclaration8_es6.ts (4 errors) ==== - var v = { [await]: foo } - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 asyncFunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v. - ~~~~~ -!!! error TS2304: Cannot find name 'await'. - ~~~ -!!! error TS2304: Cannot find name 'foo'. - ~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 asyncFunctionDeclaration8_es6.ts:1:5: Add a type annotation to the variable v. -!!! related TS9035 asyncFunctionDeclaration8_es6.ts:1:20: Add a type assertion to this expression to make type type explicit. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts deleted file mode 100644 index d34b803391185..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/bigintIndex.d.ts +++ /dev/null @@ -1,127 +0,0 @@ -//// [tests/cases/compiler/bigintIndex.ts] //// - -//// [a.ts] -interface BigIntIndex { - [index: bigint]: E; // should error -} - -const arr: number[] = [1, 2, 3]; -let num: number = arr[1]; -num = arr["1"]; -num = arr[1n]; // should error - -let key: keyof any; // should be type "string | number | symbol" -key = 123; -key = "abc"; -key = Symbol(); -key = 123n; // should error - -// Show correct usage of bigint index: explicitly convert to string -const bigNum: bigint = 0n; -const typedArray = new Uint8Array(3); -typedArray[bigNum] = 0xAA; // should error -typedArray[String(bigNum)] = 0xAA; -typedArray["1"] = 0xBB; -typedArray[2] = 0xCC; - -// {1n: 123} is a syntax error; must go in separate file so BigIntIndex error is shown -//// [b.ts] -// BigInt cannot be used as an object literal property -const a = {1n: 123}; -const b = {[1n]: 456}; -const c = {[bigNum]: 789}; - - -/// [Declarations] //// - - - -//// [a.d.ts] -interface BigIntIndex { - [index: bigint]: E; -} -declare const arr: number[]; -declare let num: number; -declare let key: keyof any; -declare const bigNum: bigint; -declare const typedArray: invalid; - -//// [b.d.ts] -declare const a: {}; -declare const b: invalid; -declare const c: invalid; - -/// [Errors] //// - -a.ts(2,6): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. -a.ts(8,11): error TS2538: Type '1n' cannot be used as an index type. -a.ts(14,1): error TS2322: Type 'bigint' is not assignable to type 'string | number | symbol'. -a.ts(18,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -a.ts(19,12): error TS2538: Type 'bigint' cannot be used as an index type. -b.ts(2,12): error TS1136: Property assignment expected. -b.ts(2,14): error TS1005: ';' expected. -b.ts(2,19): error TS1128: Declaration or statement expected. -b.ts(3,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -b.ts(3,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -b.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -b.ts(4,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== a.ts (5 errors) ==== - interface BigIntIndex { - [index: bigint]: E; // should error - ~~~~~ -!!! error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. - } - - const arr: number[] = [1, 2, 3]; - let num: number = arr[1]; - num = arr["1"]; - num = arr[1n]; // should error - ~~ -!!! error TS2538: Type '1n' cannot be used as an index type. - - let key: keyof any; // should be type "string | number | symbol" - key = 123; - key = "abc"; - key = Symbol(); - key = 123n; // should error - ~~~ -!!! error TS2322: Type 'bigint' is not assignable to type 'string | number | symbol'. - - // Show correct usage of bigint index: explicitly convert to string - const bigNum: bigint = 0n; - const typedArray = new Uint8Array(3); - ~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 a.ts:18:7: Add a type annotation to the variable typedArray. - typedArray[bigNum] = 0xAA; // should error - ~~~~~~ -!!! error TS2538: Type 'bigint' cannot be used as an index type. - typedArray[String(bigNum)] = 0xAA; - typedArray["1"] = 0xBB; - typedArray[2] = 0xCC; - - // {1n: 123} is a syntax error; must go in separate file so BigIntIndex error is shown -==== b.ts (7 errors) ==== - // BigInt cannot be used as an object literal property - const a = {1n: 123}; - ~~ -!!! error TS1136: Property assignment expected. - ~ -!!! error TS1005: ';' expected. - ~ -!!! error TS1128: Declaration or statement expected. - const b = {[1n]: 456}; - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 b.ts:3:7: Add a type annotation to the variable b. - const c = {[bigNum]: 789}; - ~~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 b.ts:4:7: Add a type annotation to the variable c. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/booleanFilterAnyArray.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/booleanFilterAnyArray.d.ts deleted file mode 100644 index 075b8ce9a6868..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/booleanFilterAnyArray.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -//// [tests/cases/compiler/booleanFilterAnyArray.ts] //// - -//// [booleanFilterAnyArray.ts] -interface Bullean { } -interface BulleanConstructor { - new(v1?: any): Bullean; - (v2?: T): v2 is T; -} - -interface 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; -var xs: Ari; -var xs = anys.filter(Bullean) - -declare let realanys: any[]; -var ys: any[]; -var ys = realanys.filter(Boolean) - -var foo = [{ name: 'x' }] -var foor: Array<{name: string}> -var foor = foo.filter(x => x.name) -var foos: Array -var foos = [true, true, false, null].filter((thing): thing is boolean => thing !== null) - - -/// [Declarations] //// - - - -//// [booleanFilterAnyArray.d.ts] -interface Bullean { -} -interface BulleanConstructor { - new (v1?: any): Bullean; - (v2?: T): v2 is T; -} -interface 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; -declare var xs: Ari; -declare var xs: Ari; -declare let realanys: any[]; -declare var ys: any[]; -declare var ys: any[]; -declare var foo: invalid; -declare var foor: Array<{ - name: string; -}>; -declare var foor: { - name: string; -}[]; -declare var foos: Array; -declare var foos: boolean[]; - -/// [Errors] //// - -booleanFilterAnyArray.ts(20,11): error TS9017: Only const arrays can be inferred with --isolatedDeclarations. - - -==== booleanFilterAnyArray.ts (1 errors) ==== - interface Bullean { } - interface BulleanConstructor { - new(v1?: any): Bullean; - (v2?: T): v2 is T; - } - - interface 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; - var xs: Ari; - var xs = anys.filter(Bullean) - - declare let realanys: any[]; - var ys: any[]; - var ys = realanys.filter(Boolean) - - var foo = [{ name: 'x' }] - ~~~~~~~~~~~~~~~ -!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations. -!!! related TS9027 booleanFilterAnyArray.ts:20:5: Add a type annotation to the variable foo. - var foor: Array<{name: string}> - var foor = foo.filter(x => x.name) - var foos: Array - var foos = [true, true, false, null].filter((thing): thing is boolean => thing !== null) - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/capturedParametersInInitializers1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/capturedParametersInInitializers1.d.ts deleted file mode 100644 index 953533d3c9a82..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/capturedParametersInInitializers1.d.ts +++ /dev/null @@ -1,195 +0,0 @@ -//// [tests/cases/compiler/capturedParametersInInitializers1.ts] //// - -//// [capturedParametersInInitializers1.ts] -// ok - usage is deferred -function foo1(y = class {c = x}, x = 1) { - new y().c; -} - -// ok - used in file -function foo2(y = function(x: typeof z) {}, z = 1) { - -} - -// ok -used in type -let a; -function foo3(y = { x: a }, z = 1) { - -} - -// error - used before declaration -function foo4(y = {z}, z = 1) { -} - -// error - used before declaration, IIFEs are inlined -function foo5(y = (() => z)(), z = 1) { -} - -// ok - IIFE inside another function -function foo6(y = () => (() => z)(), z = 1) { -} - -// ok - used inside immediately invoked generator function -function foo7(y = (function*() {yield z})(), z = 1) { -} - -// ok - used inside immediately invoked async function -function foo8(y = (async () => z)(), z = 1) { -} - -// error - used as computed name of method -function foo9(y = {[z]() { return z; }}, z = 1) { -} - - -/// [Declarations] //// - - - -//// [capturedParametersInInitializers1.d.ts] -declare function foo1(y?: invalid, x?: number): invalid; -declare function foo2(y?: (x: typeof z) => invalid, z?: number): invalid; -declare let a: invalid; -declare function foo3(y?: { - x: number; -}, z?: number): invalid; -declare function foo4(y?: invalid, z?: number): invalid; -declare function foo5(y?: invalid, z?: number): invalid; -declare function foo6(y?: () => invalid, z?: number): invalid; -declare function foo7(y?: invalid, z?: number): invalid; -declare function foo8(y?: invalid, z?: number): invalid; -declare function foo9(y?: invalid, z?: number): invalid; - -/// [Errors] //// - -capturedParametersInInitializers1.ts(2,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(2,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(7,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(7,19): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(12,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(18,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(18,20): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. -capturedParametersInInitializers1.ts(18,20): error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. -capturedParametersInInitializers1.ts(22,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(22,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(22,26): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. -capturedParametersInInitializers1.ts(26,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(26,19): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(30,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(30,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(34,19): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(38,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(38,20): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -capturedParametersInInitializers1.ts(38,20): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -capturedParametersInInitializers1.ts(38,21): error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. - - -==== capturedParametersInInitializers1.ts (22 errors) ==== - // ok - usage is deferred - function foo1(y = class {c = x}, x = 1) { - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 capturedParametersInInitializers1.ts:2:10: Add a return type to the function declaration. - ~~~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 capturedParametersInInitializers1.ts:2:15: Add a type annotation to the parameter y. - new y().c; - } - - // ok - used in file - function foo2(y = function(x: typeof z) {}, z = 1) { - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 capturedParametersInInitializers1.ts:7:10: Add a return type to the function declaration. - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9028 capturedParametersInInitializers1.ts:7:15: Add a type annotation to the parameter y. -!!! related TS9030 capturedParametersInInitializers1.ts:7:19: Add a return type to the function expression. - - } - - // ok -used in type - let a; - ~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 capturedParametersInInitializers1.ts:12:5: Add a type annotation to the variable a. - function foo3(y = { x: a }, z = 1) { - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 capturedParametersInInitializers1.ts:13:10: Add a return type to the function declaration. - - } - - // error - used before declaration - function foo4(y = {z}, z = 1) { - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 capturedParametersInInitializers1.ts:18:10: Add a return type to the function declaration. - ~ -!!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. - ~ -!!! error TS9016: Objects that contain shorthand properties can't be inferred with --isolatedDeclarations. -!!! related TS9028 capturedParametersInInitializers1.ts:18:15: Add a type annotation to the parameter y. - } - - // error - used before declaration, IIFEs are inlined - function foo5(y = (() => z)(), z = 1) { - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 capturedParametersInInitializers1.ts:22:10: Add a return type to the function declaration. - ~~~~~~~~~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 capturedParametersInInitializers1.ts:22:15: Add a type annotation to the parameter y. - ~ -!!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. - } - - // ok - IIFE inside another function - function foo6(y = () => (() => z)(), z = 1) { - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 capturedParametersInInitializers1.ts:26:10: Add a return type to the function declaration. - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9028 capturedParametersInInitializers1.ts:26:15: Add a type annotation to the parameter y. -!!! related TS9030 capturedParametersInInitializers1.ts:26:19: Add a return type to the function expression. - } - - // ok - used inside immediately invoked generator function - function foo7(y = (function*() {yield z})(), z = 1) { - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 capturedParametersInInitializers1.ts:30:10: Add a return type to the function declaration. - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 capturedParametersInInitializers1.ts:30:15: Add a type annotation to the parameter y. - } - - // ok - used inside immediately invoked async function - function foo8(y = (async () => z)(), z = 1) { - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 capturedParametersInInitializers1.ts:34:10: Add a return type to the function declaration. - ~~~~~~~~~~~~~~~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 capturedParametersInInitializers1.ts:34:15: Add a type annotation to the parameter y. - } - - // error - used as computed name of method - function foo9(y = {[z]() { return z; }}, z = 1) { - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 capturedParametersInInitializers1.ts:38:10: Add a return type to the function declaration. - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9028 capturedParametersInInitializers1.ts:38:15: Add a type annotation to the parameter y. -!!! related TS9034 capturedParametersInInitializers1.ts:38:20: Add a return type to the method - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9028 capturedParametersInInitializers1.ts:38:15: Add a type annotation to the parameter y. - ~ -!!! error TS2373: Parameter 'y' cannot reference identifier 'z' declared after it. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/circularObjectLiteralAccessors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/circularObjectLiteralAccessors.d.ts deleted file mode 100644 index 63719a7708cbb..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/circularObjectLiteralAccessors.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -//// [tests/cases/compiler/circularObjectLiteralAccessors.ts] //// - -//// [circularObjectLiteralAccessors.ts] -// Repro from #6000 - -const a = { - b: { - get foo(): string { - return a.foo; - }, - set foo(value: string) { - a.foo = value; - } - }, - foo: '' -}; - -/// [Declarations] //// - - - -//// [circularObjectLiteralAccessors.d.ts] -declare const a: { - b: { - foo: string; - }; - foo: string; -}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts deleted file mode 100644 index 2da6b8c81dc21..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/complicatedPrivacy.d.ts +++ /dev/null @@ -1,314 +0,0 @@ -//// [tests/cases/compiler/complicatedPrivacy.ts] //// - -//// [complicatedPrivacy.ts] -module m1 { - export module m2 { - - - export function f1(c1: C1) { - } - export function f2(c2: C2) { - } - - export class C2 implements m3.i3 { - public get p1(arg) { - return new C1(); - } - - public set p1(arg1: C1) { - } - - public f55() { - return "Hello world"; - } - } - } - - export function f2(arg1: { x?: C1, y: number }) { - } - - export function f3(): { - (a: number) : C1; - } { - return null; - } - - export function f4(arg1: - { - [number]: C1; // Used to be indexer, now it is a computed property - }) { - } - - - export function f5(arg2: { - new (arg1: C1) : C1 - }) { - } - module m3 { - function f2(f1: C1) { - } - - export interface i3 { - f55(): string; - } - } - - class C1 { - } - - interface i { - x: number; - } - - export class C5 implements i { - public x: number; - } - - export var v2: C1[]; -} - -class C2 { -} - -module m2 { - export module m3 { - - export class c_pr implements mglo5.i5, mglo5.i6 { - f1() { - return "Hello"; - } - } - - module m4 { - class C { - } - module m5 { - - export module m6 { - function f1() { - return new C(); - } - } - } - } - - } -} - -module mglo5 { - export interface i5 { - f1(): string; - } - - interface i6 { - f6(): number; - } -} - - -/// [Declarations] //// - - - -//// [complicatedPrivacy.d.ts] -declare namespace m1 { - export namespace m2 { - function f1(c1: C1): invalid; - function f2(c2: C2): invalid; - class C2 implements m3.i3 { - get p1(): C1; - set p1(arg1: C1); - f55(): invalid; - } - } - export function f2(arg1: { - x?: C1; - y: number; - }): invalid; - export function f3(): { - (a: number): C1; - }; - export function f4(arg1: {}): invalid; - export function f5(arg2: { - new (arg1: C1): C1; - }): invalid; - namespace m3 { - interface i3 { - f55(): string; - } - } - class C1 { - } - interface i { - x: number; - } - export class C5 implements i { - x: number; - } - export var v2: C1[]; - export {}; -} -declare class C2 { -} -declare namespace m2 { - namespace m3 { - class c_pr implements mglo5.i5, mglo5.i6 { - f1(): invalid; - } - } -} -declare namespace mglo5 { - interface i5 { - f1(): string; - } -} - -/// [Errors] //// - -complicatedPrivacy.ts(5,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -complicatedPrivacy.ts(7,25): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -complicatedPrivacy.ts(11,24): error TS1054: A 'get' accessor cannot have parameters. -complicatedPrivacy.ts(18,20): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -complicatedPrivacy.ts(24,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -complicatedPrivacy.ts(33,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -complicatedPrivacy.ts(35,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. -complicatedPrivacy.ts(35,6): error TS2693: 'number' only refers to a type, but is being used as a value here. -complicatedPrivacy.ts(40,21): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported member 'i6'. -complicatedPrivacy.ts(74,13): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== complicatedPrivacy.ts (11 errors) ==== - module m1 { - export module m2 { - - - export function f1(c1: C1) { - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 complicatedPrivacy.ts:5:25: Add a return type to the function declaration. - } - export function f2(c2: C2) { - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 complicatedPrivacy.ts:7:25: Add a return type to the function declaration. - } - - export class C2 implements m3.i3 { - public get p1(arg) { - ~~ -!!! error TS1054: A 'get' accessor cannot have parameters. - return new C1(); - } - - public set p1(arg1: C1) { - } - - public f55() { - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 complicatedPrivacy.ts:18:20: Add a return type to the method - return "Hello world"; - } - } - } - - export function f2(arg1: { x?: C1, y: number }) { - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 complicatedPrivacy.ts:24:21: Add a return type to the function declaration. - } - - export function f3(): { - (a: number) : C1; - } { - return null; - } - - export function f4(arg1: - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 complicatedPrivacy.ts:33:21: Add a return type to the function declaration. - { - [number]: C1; // Used to be indexer, now it is a computed property - ~~~~~~~~ -!!! 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 TS2693: 'number' only refers to a type, but is being used as a value here. - }) { - } - - - export function f5(arg2: { - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 complicatedPrivacy.ts:40:21: Add a return type to the function declaration. - new (arg1: C1) : C1 - }) { - } - module m3 { - function f2(f1: C1) { - } - - export interface i3 { - f55(): string; - } - } - - class C1 { - } - - interface i { - x: number; - } - - export class C5 implements i { - public x: number; - } - - export var v2: C1[]; - } - - class C2 { - } - - module m2 { - export module m3 { - - export class c_pr implements mglo5.i5, mglo5.i6 { - ~~ -!!! error TS2694: Namespace 'mglo5' has no exported member 'i6'. - f1() { - ~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 complicatedPrivacy.ts:74:13: Add a return type to the method - return "Hello"; - } - } - - module m4 { - class C { - } - module m5 { - - export module m6 { - function f1() { - return new C(); - } - } - } - } - - } - } - - module mglo5 { - export interface i5 { - f1(): string; - } - - interface i6 { - f6(): number; - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts deleted file mode 100644 index 16e142c3a3883..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES5.d.ts +++ /dev/null @@ -1,88 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts] //// - -//// [computedPropertyNames12_ES5.ts] -var s: string; -var n: number; -var a: any; -class C { - [s]: number; - [n] = n; - static [s + s]: string; - [s + n] = 2; - [+s]: typeof s; - static [""]: number; - [0]: number; - [a]: number; - static [true]: number; - [`hello bye`] = 0; - static [`hello ${a} bye`] = 0 -} - -/// [Declarations] //// - - - -//// [computedPropertyNames12_ES5.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare class C { - static [""]: number; - [0]: number; - [`hello bye`]: number; -} - -/// [Errors] //// - -computedPropertyNames12_ES5.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames12_ES5.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames12_ES5.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames12_ES5.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - - -==== computedPropertyNames12_ES5.ts (11 errors) ==== - var s: string; - var n: number; - var a: any; - class C { - [s]: number; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - [n] = n; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static [s + s]: string; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [s + n] = 2; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [+s]: typeof s; - ~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - static [""]: number; - [0]: number; - [a]: number; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static [true]: number; - ~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [`hello bye`] = 0; - static [`hello ${a} bye`] = 0 - ~~~~~~~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts deleted file mode 100644 index e0801e702de82..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames12_ES6.d.ts +++ /dev/null @@ -1,88 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts] //// - -//// [computedPropertyNames12_ES6.ts] -var s: string; -var n: number; -var a: any; -class C { - [s]: number; - [n] = n; - static [s + s]: string; - [s + n] = 2; - [+s]: typeof s; - static [""]: number; - [0]: number; - [a]: number; - static [true]: number; - [`hello bye`] = 0; - static [`hello ${a} bye`] = 0 -} - -/// [Declarations] //// - - - -//// [computedPropertyNames12_ES6.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare class C { - static [""]: number; - [0]: number; - [`hello bye`]: number; -} - -/// [Errors] //// - -computedPropertyNames12_ES6.ts(5,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames12_ES6.ts(6,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames12_ES6.ts(7,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(12,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames12_ES6.ts(13,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - - -==== computedPropertyNames12_ES6.ts (11 errors) ==== - var s: string; - var n: number; - var a: any; - class C { - [s]: number; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - [n] = n; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static [s + s]: string; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [s + n] = 2; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [+s]: typeof s; - ~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - static [""]: number; - [0]: number; - [a]: number; - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static [true]: number; - ~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [`hello bye`] = 0; - static [`hello ${a} bye`] = 0 - ~~~~~~~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts deleted file mode 100644 index 653944862c485..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES5.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES5.ts] //// - -//// [computedPropertyNames16_ES5.ts] -var s: string; -var n: number; -var a: any; -class C { - get [s]() { return 0;} - set [n](v) { } - static get [s + s]() { return 0; } - set [s + n](v) { } - get [+s]() { return 0; } - static set [""](v) { } - get [0]() { return 0; } - set [a](v) { } - static get [true]() { return 0; } - set [`hello bye`](v) { } - get [`hello ${a} bye`]() { return 0; } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames16_ES5.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare class C { - static set [""](v: invalid); - get [0](): invalid; - set [`hello bye`](v: invalid); -} - -/// [Errors] //// - -computedPropertyNames16_ES5.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames16_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames16_ES5.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames16_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames16_ES5.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames16_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - -==== computedPropertyNames16_ES5.ts (6 errors) ==== - var s: string; - var n: number; - var a: any; - class C { - get [s]() { return 0;} - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - set [n](v) { } - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static get [s + s]() { return 0; } - set [s + n](v) { } - get [+s]() { return 0; } - static set [""](v) { } - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames16_ES5.ts:10:16: Add a type to parameter of the set accessor declaration. - get [0]() { return 0; } - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames16_ES5.ts:11:9: Add a return type to the get accessor declaration. - set [a](v) { } - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static get [true]() { return 0; } - set [`hello bye`](v) { } - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames16_ES5.ts:14:9: Add a type to parameter of the set accessor declaration. - get [`hello ${a} bye`]() { return 0; } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts deleted file mode 100644 index a0796ca7b8dc9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames16_ES6.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES6.ts] //// - -//// [computedPropertyNames16_ES6.ts] -var s: string; -var n: number; -var a: any; -class C { - get [s]() { return 0;} - set [n](v) { } - static get [s + s]() { return 0; } - set [s + n](v) { } - get [+s]() { return 0; } - static set [""](v) { } - get [0]() { return 0; } - set [a](v) { } - static get [true]() { return 0; } - set [`hello bye`](v) { } - get [`hello ${a} bye`]() { return 0; } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames16_ES6.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare class C { - static set [""](v: invalid); - get [0](): invalid; - set [`hello bye`](v: invalid); -} - -/// [Errors] //// - -computedPropertyNames16_ES6.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames16_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames16_ES6.ts(10,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames16_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames16_ES6.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames16_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - -==== computedPropertyNames16_ES6.ts (6 errors) ==== - var s: string; - var n: number; - var a: any; - class C { - get [s]() { return 0;} - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - set [n](v) { } - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static get [s + s]() { return 0; } - set [s + n](v) { } - get [+s]() { return 0; } - static set [""](v) { } - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames16_ES6.ts:10:16: Add a type to parameter of the set accessor declaration. - get [0]() { return 0; } - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames16_ES6.ts:11:9: Add a return type to the get accessor declaration. - set [a](v) { } - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static get [true]() { return 0; } - set [`hello bye`](v) { } - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames16_ES6.ts:14:9: Add a type to parameter of the set accessor declaration. - get [`hello ${a} bye`]() { return 0; } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts deleted file mode 100644 index a4f9c1f14b414..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES5.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES5.ts] //// - -//// [computedPropertyNames2_ES5.ts] -var methodName = "method"; -var accessorName = "accessor"; -class C { - [methodName]() { } - static [methodName]() { } - get [accessorName]() { } - set [accessorName](v) { } - static get [accessorName]() { } - static set [accessorName](v) { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames2_ES5.d.ts] -declare var methodName: string; -declare var accessorName: string; -declare class C { -} - -/// [Errors] //// - -computedPropertyNames2_ES5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames2_ES5.ts(5,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames2_ES5.ts(6,9): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames2_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames2_ES5.ts(8,16): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES5.ts(8,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames2_ES5.ts(9,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames2_ES5.ts (8 errors) ==== - var methodName = "method"; - var accessorName = "accessor"; - class C { - [methodName]() { } - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static [methodName]() { } - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - get [accessorName]() { } - ~~~~~~~~~~~~~~ -!!! error TS2378: A 'get' accessor must return a value. - ~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - set [accessorName](v) { } - ~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static get [accessorName]() { } - ~~~~~~~~~~~~~~ -!!! error TS2378: A 'get' accessor must return a value. - ~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static set [accessorName](v) { } - ~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts deleted file mode 100644 index fb1a36bced6e6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames2_ES6.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES6.ts] //// - -//// [computedPropertyNames2_ES6.ts] -var methodName = "method"; -var accessorName = "accessor"; -class C { - [methodName]() { } - static [methodName]() { } - get [accessorName]() { } - set [accessorName](v) { } - static get [accessorName]() { } - static set [accessorName](v) { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames2_ES6.d.ts] -declare var methodName: string; -declare var accessorName: string; -declare class C { -} - -/// [Errors] //// - -computedPropertyNames2_ES6.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames2_ES6.ts(5,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames2_ES6.ts(6,9): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames2_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames2_ES6.ts(8,16): error TS2378: A 'get' accessor must return a value. -computedPropertyNames2_ES6.ts(8,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames2_ES6.ts(9,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames2_ES6.ts (8 errors) ==== - var methodName = "method"; - var accessorName = "accessor"; - class C { - [methodName]() { } - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static [methodName]() { } - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - get [accessorName]() { } - ~~~~~~~~~~~~~~ -!!! error TS2378: A 'get' accessor must return a value. - ~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - set [accessorName](v) { } - ~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static get [accessorName]() { } - ~~~~~~~~~~~~~~ -!!! error TS2378: A 'get' accessor must return a value. - ~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static set [accessorName](v) { } - ~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts deleted file mode 100644 index 60407bb6af4c9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES5.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES5.ts] //// - -//// [computedPropertyNames4_ES5.ts] -var s: string; -var n: number; -var a: any; -var v = { - [s]: 0, - [n]: n, - [s + s]: 1, - [s + n]: 2, - [+s]: s, - [""]: 0, - [0]: 0, - [a]: 1, - [true]: 0, - [`hello bye`]: 0, - [`hello ${a} bye`]: 0 -} - -/// [Declarations] //// - - - -//// [computedPropertyNames4_ES5.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare var v: invalid; - -/// [Errors] //// - -computedPropertyNames4_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES5.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -computedPropertyNames4_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES5.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -computedPropertyNames4_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames4_ES5.ts (10 errors) ==== - var s: string; - var n: number; - var a: any; - var v = { - [s]: 0, - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. - [n]: n, - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. - ~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9035 computedPropertyNames4_ES5.ts:6:10: Add a type assertion to this expression to make type type explicit. - [s + s]: 1, - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. - [s + n]: 2, - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. - [+s]: s, - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. - ~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9035 computedPropertyNames4_ES5.ts:9:11: Add a type assertion to this expression to make type type explicit. - [""]: 0, - [0]: 0, - [a]: 1, - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. - [true]: 0, - ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. - [`hello bye`]: 0, - [`hello ${a} bye`]: 0 - ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES5.ts:4:5: Add a type annotation to the variable v. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts deleted file mode 100644 index c748f8cf01843..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames4_ES6.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES6.ts] //// - -//// [computedPropertyNames4_ES6.ts] -var s: string; -var n: number; -var a: any; -var v = { - [s]: 0, - [n]: n, - [s + s]: 1, - [s + n]: 2, - [+s]: s, - [""]: 0, - [0]: 0, - [a]: 1, - [true]: 0, - [`hello bye`]: 0, - [`hello ${a} bye`]: 0 -} - -/// [Declarations] //// - - - -//// [computedPropertyNames4_ES6.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare var v: invalid; - -/// [Errors] //// - -computedPropertyNames4_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES6.ts(6,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -computedPropertyNames4_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES6.ts(9,11): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -computedPropertyNames4_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames4_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames4_ES6.ts (10 errors) ==== - var s: string; - var n: number; - var a: any; - var v = { - [s]: 0, - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. - [n]: n, - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. - ~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9035 computedPropertyNames4_ES6.ts:6:10: Add a type assertion to this expression to make type type explicit. - [s + s]: 1, - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. - [s + n]: 2, - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. - [+s]: s, - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. - ~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9035 computedPropertyNames4_ES6.ts:9:11: Add a type assertion to this expression to make type type explicit. - [""]: 0, - [0]: 0, - [a]: 1, - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. - [true]: 0, - ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. - [`hello bye`]: 0, - [`hello ${a} bye`]: 0 - ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames4_ES6.ts:4:5: Add a type annotation to the variable v. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts deleted file mode 100644 index ec18ac62c408f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES5.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES5.ts] //// - -//// [computedPropertyNames5_ES5.ts] -var b: boolean; -var v = { - [b]: 0, - [true]: 1, - [[]]: 0, - [{}]: 0, - [undefined]: undefined, - [null]: null -} - -/// [Declarations] //// - - - -//// [computedPropertyNames5_ES5.d.ts] -declare var b: boolean; -declare var v: invalid; - -/// [Errors] //// - -computedPropertyNames5_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames5_ES5.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames5_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames5_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames5_ES5.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames5_ES5.ts (11 errors) ==== - var b: boolean; - var v = { - [b]: 0, - ~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. - [true]: 1, - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [[]]: 0, - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. - [{}]: 0, - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. - [undefined]: undefined, - ~~~~~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. - [null]: null - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames5_ES5.ts:2:5: Add a type annotation to the variable v. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts deleted file mode 100644 index d746bd476b909..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames5_ES6.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES6.ts] //// - -//// [computedPropertyNames5_ES6.ts] -var b: boolean; -var v = { - [b]: 0, - [true]: 1, - [[]]: 0, - [{}]: 0, - [undefined]: undefined, - [null]: null -} - -/// [Declarations] //// - - - -//// [computedPropertyNames5_ES6.d.ts] -declare var b: boolean; -declare var v: invalid; - -/// [Errors] //// - -computedPropertyNames5_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames5_ES6.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames5_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames5_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames5_ES6.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames5_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames5_ES6.ts (11 errors) ==== - var b: boolean; - var v = { - [b]: 0, - ~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. - [true]: 1, - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [[]]: 0, - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. - [{}]: 0, - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. - [undefined]: undefined, - ~~~~~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. - [null]: null - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames5_ES6.ts:2:5: Add a type annotation to the variable v. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts deleted file mode 100644 index 86f841077b05c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES5.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES5.ts] //// - -//// [computedPropertyNames6_ES5.ts] -var p1: number | string; -var p2: number | number[]; -var p3: string | boolean; -var v = { - [p1]: 0, - [p2]: 1, - [p3]: 2 -} - -/// [Declarations] //// - - - -//// [computedPropertyNames6_ES5.d.ts] -declare var p1: number | string; -declare var p2: number | number[]; -declare var p3: string | boolean; -declare var v: invalid; - -/// [Errors] //// - -computedPropertyNames6_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames6_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames6_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames6_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames6_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames6_ES5.ts (5 errors) ==== - var p1: number | string; - var p2: number | number[]; - var p3: string | boolean; - var v = { - [p1]: 0, - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v. - [p2]: 1, - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v. - [p3]: 2 - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames6_ES5.ts:4:5: Add a type annotation to the variable v. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts deleted file mode 100644 index 556cb1223820d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames6_ES6.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES6.ts] //// - -//// [computedPropertyNames6_ES6.ts] -var p1: number | string; -var p2: number | number[]; -var p3: string | boolean; -var v = { - [p1]: 0, - [p2]: 1, - [p3]: 2 -} - -/// [Declarations] //// - - - -//// [computedPropertyNames6_ES6.d.ts] -declare var p1: number | string; -declare var p2: number | number[]; -declare var p3: string | boolean; -declare var v: invalid; - -/// [Errors] //// - -computedPropertyNames6_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames6_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames6_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames6_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames6_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames6_ES6.ts (5 errors) ==== - var p1: number | string; - var p2: number | number[]; - var p3: string | boolean; - var v = { - [p1]: 0, - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v. - [p2]: 1, - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v. - [p3]: 2 - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames6_ES6.ts:4:5: Add a type annotation to the variable v. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames7_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames7_ES5.d.ts deleted file mode 100644 index a6f444bd8a804..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames7_ES5.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES5.ts] //// - -//// [computedPropertyNames7_ES5.ts] -enum E { - member -} -var v = { - [E.member]: 0 -} - -/// [Declarations] //// - - - -//// [computedPropertyNames7_ES5.d.ts] -declare enum E { - member = 0 -} -declare var v: { - 0: number; -}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames7_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames7_ES6.d.ts deleted file mode 100644 index d48821e7999ac..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames7_ES6.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES6.ts] //// - -//// [computedPropertyNames7_ES6.ts] -enum E { - member -} -var v = { - [E.member]: 0 -} - -/// [Declarations] //// - - - -//// [computedPropertyNames7_ES6.d.ts] -declare enum E { - member = 0 -} -declare var v: { - 0: number; -}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts deleted file mode 100644 index a68eb59ce0bab..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES5.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts] //// - -//// [computedPropertyNamesOnOverloads_ES5.ts] -var methodName = "method"; -var accessorName = "accessor"; -class C { - [methodName](v: string); - [methodName](); - [methodName](v?: string) { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNamesOnOverloads_ES5.d.ts] -declare var methodName: string; -declare var accessorName: string; -declare class C { -} - -/// [Errors] //// - -computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNamesOnOverloads_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNamesOnOverloads_ES5.ts (5 errors) ==== - var methodName = "method"; - var accessorName = "accessor"; - class C { - [methodName](v: string); - ~~~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - [methodName](); - ~~~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - [methodName](v?: string) { } - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts deleted file mode 100644 index 4e6e21b762a20..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesOnOverloads_ES6.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts] //// - -//// [computedPropertyNamesOnOverloads_ES6.ts] -var methodName = "method"; -var accessorName = "accessor"; -class C { - [methodName](v: string); - [methodName](); - [methodName](v?: string) { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNamesOnOverloads_ES6.d.ts] -declare var methodName: string; -declare var accessorName: string; -declare class C { -} - -/// [Errors] //// - -computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNamesOnOverloads_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNamesOnOverloads_ES6.ts (5 errors) ==== - var methodName = "method"; - var accessorName = "accessor"; - class C { - [methodName](v: string); - ~~~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - [methodName](); - ~~~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - [methodName](v?: string) { } - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts deleted file mode 100644 index ed70e0a46a315..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNamesWithStaticProperty.d.ts +++ /dev/null @@ -1,102 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts] //// - -//// [computedPropertyNamesWithStaticProperty.ts] -class C { -class C1 { - static staticProp = 10; - get [C1.staticProp]() { - return "hello"; - } - set [C1.staticProp](x: string) { - var y = x; - } - [C1.staticProp]() { } -} - -(class C2 { - static staticProp = 10; - get [C2.staticProp]() { - return "hello"; - } - set [C2.staticProp](x: string) { - var y = x; - } - [C2.staticProp]() { } -}) - - -/// [Declarations] //// - - - -//// [computedPropertyNamesWithStaticProperty.d.ts] -declare class C { -} -declare class C1 { - static staticProp: number; -} - -/// [Errors] //// - -computedPropertyNamesWithStaticProperty.ts(2,1): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. -computedPropertyNamesWithStaticProperty.ts(4,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNamesWithStaticProperty.ts(4,10): error TS2449: Class 'C1' used before its declaration. -computedPropertyNamesWithStaticProperty.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNamesWithStaticProperty.ts(7,10): error TS2449: Class 'C1' used before its declaration. -computedPropertyNamesWithStaticProperty.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -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 (10 errors) ==== - class C { - class C1 { - ~~~~~ -!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. - static staticProp = 10; - get [C1.staticProp]() { - ~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - ~~ -!!! error TS2449: Class 'C1' used before its declaration. -!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. - return "hello"; - } - set [C1.staticProp](x: string) { - ~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - ~~ -!!! error TS2449: Class 'C1' used before its declaration. -!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. - var y = x; - } - [C1.staticProp]() { } - ~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - ~~ -!!! error TS2449: Class 'C1' used before its declaration. -!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:2:7: 'C1' is declared here. - } - - (class C2 { - static staticProp = 10; - get [C2.staticProp]() { - ~~ -!!! error TS2449: Class 'C2' used before its declaration. -!!! 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:13:8: 'C2' is declared here. - var y = x; - } - [C2.staticProp]() { } - ~~ -!!! error TS2449: Class 'C2' used before its declaration. -!!! related TS2728 computedPropertyNamesWithStaticProperty.ts:13:8: 'C2' is declared here. - }) - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts deleted file mode 100644 index 9fdedc888fb75..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/constEnumErrors.d.ts +++ /dev/null @@ -1,207 +0,0 @@ -//// [tests/cases/compiler/constEnumErrors.ts] //// - -//// [constEnumErrors.ts] -const enum E { - A -} - -module E { - var x = 1; -} - -const enum E1 { - // illegal case - // forward reference to the element of the same enum - X = Y, - // forward reference to the element of the same enum - Y = E1.Z, - Y1 = E1["Z"] -} - -const enum E2 { - A -} - -var y0 = E2[1] -var name = "A"; -var y1 = E2[name]; -var y2 = E2[`${name}`]; - -var x = E2; -var y = [E2]; - -function foo(t: any): void { -} - -foo(E2); - -const enum NaNOrInfinity { - A = 9007199254740992, - B = A * A, - C = B * B, - D = C * C, - E = D * D, - F = E * E, // overflow - G = 1 / 0, // overflow - H = 0 / 0 // NaN -} - -/// [Declarations] //// - - - -//// [constEnumErrors.d.ts] -declare const enum E { - A = 0 -} -declare namespace E { -} -declare const enum E1 { - X = 0, - Y, - Y1 -} -declare const enum E2 { - A = 0 -} -declare var y0: invalid; -declare var name: string; -declare var y1: invalid; -declare var y2: invalid; -declare var x: invalid; -declare var y: invalid; -declare function foo(t: any): void; -declare const enum NaNOrInfinity { - A = 9007199254740992, - B = 8.112963841460668e+31, - C = 6.582018229284824e+63, - D = 4.332296397063773e+127, - E = 1.876879207201175e+255, - F = Infinity,// overflow - G = Infinity,// overflow - H = NaN -} - -/// [Errors] //// - -constEnumErrors.ts(1,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -constEnumErrors.ts(5,8): error TS2567: Enum declarations can only merge with namespace or other enum declarations. -constEnumErrors.ts(12,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -constEnumErrors.ts(14,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. -constEnumErrors.ts(14,9): error TS2474: const enum member initializers must be constant expressions. -constEnumErrors.ts(14,12): error TS2339: Property 'Z' does not exist on type 'typeof E1'. -constEnumErrors.ts(15,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. -constEnumErrors.ts(15,10): error TS2474: const enum member initializers must be constant expressions. -constEnumErrors.ts(15,13): error TS2339: Property 'Z' does not exist on type 'typeof E1'. -constEnumErrors.ts(22,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -constEnumErrors.ts(22,13): error TS2476: A const enum member can only be accessed using a string literal. -constEnumErrors.ts(24,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -constEnumErrors.ts(24,13): error TS2476: A const enum member can only be accessed using a string literal. -constEnumErrors.ts(25,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -constEnumErrors.ts(25,13): error TS2476: A const enum member can only be accessed using a string literal. -constEnumErrors.ts(27,9): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -constEnumErrors.ts(27,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -constEnumErrors.ts(28,9): error TS9017: Only const arrays can be inferred with --isolatedDeclarations. -constEnumErrors.ts(28,10): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -constEnumErrors.ts(33,5): error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. -constEnumErrors.ts(41,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -constEnumErrors.ts(42,9): error TS2477: 'const' enum member initializer was evaluated to a non-finite value. -constEnumErrors.ts(43,9): error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - - -==== constEnumErrors.ts (23 errors) ==== - const enum E { - ~ -!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. - A - } - - module E { - ~ -!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations. - var x = 1; - } - - const enum E1 { - // illegal case - // forward reference to the element of the same enum - X = Y, - ~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - // forward reference to the element of the same enum - Y = E1.Z, - ~ -!!! 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. - ~ -!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. - Y1 = E1["Z"] - ~~ -!!! 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. - ~~~ -!!! error TS2339: Property 'Z' does not exist on type 'typeof E1'. - } - - const enum E2 { - A - } - - var y0 = E2[1] - ~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 constEnumErrors.ts:22:5: Add a type annotation to the variable y0. - ~ -!!! error TS2476: A const enum member can only be accessed using a string literal. - var name = "A"; - var y1 = E2[name]; - ~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 constEnumErrors.ts:24:5: Add a type annotation to the variable y1. - ~~~~ -!!! error TS2476: A const enum member can only be accessed using a string literal. - var y2 = E2[`${name}`]; - ~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 constEnumErrors.ts:25:5: Add a type annotation to the variable y2. - ~~~~~~~~~ -!!! error TS2476: A const enum member can only be accessed using a string literal. - - var x = E2; - ~~ -!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. - ~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 constEnumErrors.ts:27:5: Add a type annotation to the variable x. - var y = [E2]; - ~~~~ -!!! error TS9017: Only const arrays can be inferred with --isolatedDeclarations. -!!! related TS9027 constEnumErrors.ts:28:5: Add a type annotation to the variable y. - ~~ -!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. - - function foo(t: any): void { - } - - foo(E2); - ~~ -!!! error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query. - - const enum NaNOrInfinity { - A = 9007199254740992, - B = A * A, - C = B * B, - D = C * C, - E = D * D, - F = E * E, // overflow - ~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - G = 1 / 0, // overflow - ~~~~~ -!!! error TS2477: 'const' enum member initializer was evaluated to a non-finite value. - H = 0 / 0 // NaN - ~~~~~ -!!! error TS2478: 'const' enum member initializer was evaluated to disallowed value 'NaN'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/contextualSignatureInstantiation.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/contextualSignatureInstantiation.d.ts deleted file mode 100644 index ebdd4a54519ec..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/contextualSignatureInstantiation.d.ts +++ /dev/null @@ -1,124 +0,0 @@ -//// [tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts] //// - -//// [contextualSignatureInstantiation.ts] -// TypeScript Spec, section 4.12.2: -// If e is an expression of a function type that contains exactly one generic call signature and no other members, -// and T is a function type with exactly one non - generic call signature and no other members, then any inferences -// made for type parameters referenced by the parameters of T's call signature are fixed, and e's type is changed -// to a function type with e's call signature instantiated in the context of T's call signature (section 3.8.5). - -declare function foo(cb: (x: number, y: string) => T): T; -declare function bar(x: T, y: U, cb: (x: T, y: U) => V): V; -declare function baz(x: T, y: T, cb: (x: T, y: T) => U): U; - -declare function g(x: T, y: T): T; -declare function h(x: T, y: U): T[] | U[]; - -var a: number; -var a = bar(1, 1, g); // Should be number -var a = baz(1, 1, g); // Should be number - -var b: number | string; -var b = foo(g); // Error, number and string are disjoint types -var b = bar(1, "one", g); // Error, number and string are disjoint types -var b = bar("one", 1, g); // Error, number and string are disjoint types -var b = baz(b, b, g); // Should be number | string - -var d: number[] | string[]; -var d = foo(h); // Should be number[] | string[] -var d = bar(1, "one", h); // Should be number[] | string[] -var d = bar("one", 1, h); // Should be number[] | string[] -var d = baz(d, d, g); // Should be number[] | string[] - - -/// [Declarations] //// - - - -//// [contextualSignatureInstantiation.d.ts] -declare function foo(cb: (x: number, y: string) => T): T; -declare function bar(x: T, y: U, cb: (x: T, y: U) => V): V; -declare function baz(x: T, y: T, cb: (x: T, y: T) => U): U; -declare function g(x: T, y: T): T; -declare function h(x: T, y: U): T[] | U[]; -declare var a: number; -declare var a: number; -declare var a: number; -declare var b: number | string; -declare var b: string | number; -declare var b: string | number; -declare var b: string | number; -declare var b: string | number; -declare var d: number[] | string[]; -declare var d: number[] | string[]; -declare var d: number[] | string[]; -declare var d: number[] | string[]; -declare var d: number[] | string[]; - -/// [Errors] //// - -contextualSignatureInstantiation.ts(19,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. -contextualSignatureInstantiation.ts(19,13): error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. - Types of parameters 'y' and 'y' are incompatible. - Type 'string' is not assignable to type 'number'. -contextualSignatureInstantiation.ts(20,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. -contextualSignatureInstantiation.ts(20,23): error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. - Types of parameters 'y' and 'y' are incompatible. - Type 'string' is not assignable to type 'number'. -contextualSignatureInstantiation.ts(21,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. -contextualSignatureInstantiation.ts(21,23): error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: string, y: number) => string'. - Types of parameters 'y' and 'y' are incompatible. - Type 'number' is not assignable to type 'string'. - - -==== contextualSignatureInstantiation.ts (6 errors) ==== - // TypeScript Spec, section 4.12.2: - // If e is an expression of a function type that contains exactly one generic call signature and no other members, - // and T is a function type with exactly one non - generic call signature and no other members, then any inferences - // made for type parameters referenced by the parameters of T's call signature are fixed, and e's type is changed - // to a function type with e's call signature instantiated in the context of T's call signature (section 3.8.5). - - declare function foo(cb: (x: number, y: string) => T): T; - declare function bar(x: T, y: U, cb: (x: T, y: U) => V): V; - declare function baz(x: T, y: T, cb: (x: T, y: T) => U): U; - - declare function g(x: T, y: T): T; - declare function h(x: T, y: U): T[] | U[]; - - var a: number; - var a = bar(1, 1, g); // Should be number - var a = baz(1, 1, g); // Should be number - - var b: number | string; - var b = foo(g); // Error, number and string are disjoint types - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. -!!! related TS6203 contextualSignatureInstantiation.ts:18:5: 'b' was also declared here. - ~ -!!! error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. -!!! error TS2345: Types of parameters 'y' and 'y' are incompatible. -!!! error TS2345: Type 'string' is not assignable to type 'number'. - var b = bar(1, "one", g); // Error, number and string are disjoint types - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. -!!! related TS6203 contextualSignatureInstantiation.ts:18:5: 'b' was also declared here. - ~ -!!! error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: number, y: string) => number'. -!!! error TS2345: Types of parameters 'y' and 'y' are incompatible. -!!! error TS2345: Type 'string' is not assignable to type 'number'. - var b = bar("one", 1, g); // Error, number and string are disjoint types - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'b' must be of type 'string | number', but here has type 'unknown'. -!!! related TS6203 contextualSignatureInstantiation.ts:18:5: 'b' was also declared here. - ~ -!!! error TS2345: Argument of type '(x: T, y: T) => T' is not assignable to parameter of type '(x: string, y: number) => string'. -!!! error TS2345: Types of parameters 'y' and 'y' are incompatible. -!!! error TS2345: Type 'number' is not assignable to type 'string'. - var b = baz(b, b, g); // Should be number | string - - var d: number[] | string[]; - var d = foo(h); // Should be number[] | string[] - var d = bar(1, "one", h); // Should be number[] | string[] - var d = bar("one", 1, h); // Should be number[] | string[] - var d = baz(d, d, g); // Should be number[] | string[] - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping.d.ts deleted file mode 100644 index 5c0863b9bec4b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping.d.ts +++ /dev/null @@ -1,600 +0,0 @@ -//// [tests/cases/compiler/contextualTyping.ts] //// - -//// [contextualTyping.ts] -// DEFAULT INTERFACES -interface IFoo { - n: number; - s: string; - f(i: number, s: string): string; - a: number[]; -} - -interface IBar { - foo: IFoo; -} - -// CONTEXT: Class property declaration -class C1T5 { - foo: (i: number, s: string) => number = function(i) { - return i; - } -} - -// CONTEXT: Module property declaration -module C2T5 { - export var foo: (i: number, s: string) => number = function(i) { - return i; - } -} - -// CONTEXT: Variable declaration -var c3t1: (s: string) => string = (function(s) { return s }); -var c3t2 = ({ - n: 1 -}) -var c3t3: number[] = []; -var c3t4: () => IFoo = function() { return ({}) }; -var c3t5: (n: number) => IFoo = function(n) { return ({}) }; -var c3t6: (n: number, s: string) => IFoo = function(n, s) { return ({}) }; -var c3t7: { - (n: number): number; - (s1: string): number; -} = function(n) { return n; }; - -var c3t8: (n: number, s: string) => number = function(n) { return n; }; -var c3t9: number[][] = [[],[]]; -var c3t10: IFoo[] = [({}),({})]; -var c3t11: {(n: number, s: string): string;}[] = [function(n, s) { return s; }]; -var c3t12: IBar = { - foo: ({}) -} -var c3t13 = ({ - f: function(i, s) { return s; } -}) -var c3t14 = ({ - a: [] -}) - -// CONTEXT: Class property assignment -class C4T5 { - foo: (i: number, s: string) => string; - constructor() { - this.foo = function(i, s) { - return s; - } - } -} - -// CONTEXT: Module property assignment -module C5T5 { - export var foo: (i: number, s: string) => string; - foo = function(i, s) { - return s; - } -} - -// CONTEXT: Variable assignment -var c6t5: (n: number) => IFoo; -c6t5 = <(n: number) => IFoo>function(n) { return ({}) }; - -// CONTEXT: Array index assignment -var c7t2: IFoo[]; -c7t2[0] = ({n: 1}); - -// CONTEXT: Object property assignment -interface IPlaceHolder { - t1: (s: string) => string; - t2: IFoo; - t3: number[]; - t4: () => IFoo; - t5: (n: number) => IFoo; - t6: (n: number, s: string) => IFoo; - t7: { - (n: number, s: string): number; - //(s1: string, s2: string): number; - }; - t8: (n: number, s: string) => number; - t9: number[][]; - t10: IFoo[]; - t11: {(n: number, s: string): string;}[]; - t12: IBar; - t13: IFoo; - t14: IFoo; - } - -var objc8: { - t1: (s: string) => string; - t2: IFoo; - t3: number[]; - t4: () => IFoo; - t5: (n: number) => IFoo; - t6: (n: number, s: string) => IFoo; - t7: { - (n: number, s: string): number; - //(s1: string, s2: string): number; - }; - t8: (n: number, s: string) => number; - t9: number[][]; - t10: IFoo[]; - t11: {(n: number, s: string): string;}[]; - t12: IBar; - t13: IFoo; - t14: IFoo; -} = ({}); - -objc8.t1 = (function(s) { return s }); -objc8.t2 = ({ - n: 1 -}); -objc8.t3 = []; -objc8.t4 = function() { return ({}) }; -objc8.t5 = function(n) { return ({}) }; -objc8.t6 = function(n, s) { return ({}) }; -objc8.t7 = function(n: number) { return n }; - -objc8.t8 = function(n) { return n; }; -objc8.t9 = [[],[]]; -objc8.t10 = [({}),({})]; -objc8.t11 = [function(n, s) { return s; }]; -objc8.t12 = { - foo: ({}) -} -objc8.t13 = ({ - f: function(i, s) { return s; } -}) -objc8.t14 = ({ - a: [] -}) -// CONTEXT: Function call -function c9t5(f: (n: number) => IFoo) {}; -c9t5(function(n) { - return ({}); -}); - -// CONTEXT: Return statement -var c10t5: () => (n: number) => IFoo = function() { return function(n) { return ({}) } }; - -// CONTEXT: Newing a class -class C11t5 { constructor(f: (n: number) => IFoo) { } }; -var i = new C11t5(function(n) { return ({}) }); - -// CONTEXT: Type annotated expression -var c12t1 = <(s: string) => string> (function(s) { return s }); -var c12t2 = ({ - n: 1 -}); -var c12t3 = []; -var c12t4 = <() => IFoo> function() { return ({}) }; -var c12t5 = <(n: number) => IFoo> function(n) { return ({}) }; -var c12t6 = <(n: number, s: string) => IFoo> function(n, s) { return ({}) }; -var c12t7 = <{ - (n: number, s: string): number; - //(s1: string, s2: string): number; -}> function(n:number) { return n }; - -var c12t8 = <(n: number, s: string) => number> function(n) { return n; }; -var c12t9 = [[],[]]; -var c12t10 = [({}),({})]; -var c12t11 = <{(n: number, s: string): string;}[]> [function(n, s) { return s; }]; -var c12t12 = { - foo: ({}) -} -var c12t13 = ({ - f: function(i, s) { return s; } -}) -var c12t14 = ({ - a: [] -}) - -// CONTEXT: Contextual typing declarations - -// contextually typing function declarations -declare function EF1(a:number, b:number):number; - -function EF1(a,b) { return a+b; } - -var efv = EF1(1,2); - - -// contextually typing from ambient class declarations -declare class Point -{ - constructor(x: number, y: number); - x: number; - y: number; - add(dx: number, dy: number): Point; - static origin: Point; - -} - -Point.origin = new Point(0, 0); - -Point.prototype.add = function(dx, dy) { - return new Point(this.x + dx, this.y + dy); -}; - -Point.prototype = { - x: 0, - y: 0, - add: function(dx, dy) { - return new Point(this.x + dx, this.y + dy); - } -}; - -interface A { x: string; } -interface B extends A { } -var x: B = { }; - - -/// [Declarations] //// - - - -//// [contextualTyping.d.ts] -interface IFoo { - n: number; - s: string; - f(i: number, s: string): string; - a: number[]; -} -interface IBar { - foo: IFoo; -} -declare class C1T5 { - foo: (i: number, s: string) => number; -} -declare namespace C2T5 { - var foo: (i: number, s: string) => number; -} -declare var c3t1: (s: string) => string; -declare var c3t2: IFoo; -declare var c3t3: number[]; -declare var c3t4: () => IFoo; -declare var c3t5: (n: number) => IFoo; -declare var c3t6: (n: number, s: string) => IFoo; -declare var c3t7: { - (n: number): number; - (s1: string): number; -}; -declare var c3t8: (n: number, s: string) => number; -declare var c3t9: number[][]; -declare var c3t10: IFoo[]; -declare var c3t11: { - (n: number, s: string): string; -}[]; -declare var c3t12: IBar; -declare var c3t13: IFoo; -declare var c3t14: IFoo; -declare class C4T5 { - foo: (i: number, s: string) => string; - constructor(); -} -declare namespace C5T5 { - var foo: (i: number, s: string) => string; -} -declare var c6t5: (n: number) => IFoo; -declare var c7t2: IFoo[]; -interface IPlaceHolder { - t1: (s: string) => string; - t2: IFoo; - t3: number[]; - t4: () => IFoo; - t5: (n: number) => IFoo; - t6: (n: number, s: string) => IFoo; - t7: { - (n: number, s: string): number; - }; - t8: (n: number, s: string) => number; - t9: number[][]; - t10: IFoo[]; - t11: { - (n: number, s: string): string; - }[]; - t12: IBar; - t13: IFoo; - t14: IFoo; -} -declare var objc8: { - t1: (s: string) => string; - t2: IFoo; - t3: number[]; - t4: () => IFoo; - t5: (n: number) => IFoo; - t6: (n: number, s: string) => IFoo; - t7: { - (n: number, s: string): number; - }; - t8: (n: number, s: string) => number; - t9: number[][]; - t10: IFoo[]; - t11: { - (n: number, s: string): string; - }[]; - t12: IBar; - t13: IFoo; - t14: IFoo; -}; -declare function c9t5(f: (n: number) => IFoo): invalid; -declare var c10t5: () => (n: number) => IFoo; -declare class C11t5 { - constructor(f: (n: number) => IFoo); -} -declare var i: invalid; -declare var c12t1: (s: string) => string; -declare var c12t2: IFoo; -declare var c12t3: number[]; -declare var c12t4: () => IFoo; -declare var c12t5: (n: number) => IFoo; -declare var c12t6: (n: number, s: string) => IFoo; -declare var c12t7: (n: number, s: string) => number; -declare var c12t8: (n: number, s: string) => number; -declare var c12t9: number[][]; -declare var c12t10: IFoo[]; -declare var c12t11: ((n: number, s: string) => string)[]; -declare var c12t12: IBar; -declare var c12t13: IFoo; -declare var c12t14: IFoo; -declare function EF1(a: number, b: number): number; -declare var efv: invalid; -declare class Point { - constructor(x: number, y: number); - x: number; - y: number; - add(dx: number, dy: number): Point; - static origin: Point; -} -interface A { - x: string; -} -interface B extends A { -} -declare var x: B; - -/// [Errors] //// - -contextualTyping.ts(146,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -contextualTyping.ts(156,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -contextualTyping.ts(189,18): error TS2384: Overload signatures must all be ambient or non-ambient. -contextualTyping.ts(193,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -contextualTyping.ts(223,5): error TS2741: Property 'x' is missing in type '{}' but required in type 'B'. - - -==== contextualTyping.ts (5 errors) ==== - // DEFAULT INTERFACES - interface IFoo { - n: number; - s: string; - f(i: number, s: string): string; - a: number[]; - } - - interface IBar { - foo: IFoo; - } - - // CONTEXT: Class property declaration - class C1T5 { - foo: (i: number, s: string) => number = function(i) { - return i; - } - } - - // CONTEXT: Module property declaration - module C2T5 { - export var foo: (i: number, s: string) => number = function(i) { - return i; - } - } - - // CONTEXT: Variable declaration - var c3t1: (s: string) => string = (function(s) { return s }); - var c3t2 = ({ - n: 1 - }) - var c3t3: number[] = []; - var c3t4: () => IFoo = function() { return ({}) }; - var c3t5: (n: number) => IFoo = function(n) { return ({}) }; - var c3t6: (n: number, s: string) => IFoo = function(n, s) { return ({}) }; - var c3t7: { - (n: number): number; - (s1: string): number; - } = function(n) { return n; }; - - var c3t8: (n: number, s: string) => number = function(n) { return n; }; - var c3t9: number[][] = [[],[]]; - var c3t10: IFoo[] = [({}),({})]; - var c3t11: {(n: number, s: string): string;}[] = [function(n, s) { return s; }]; - var c3t12: IBar = { - foo: ({}) - } - var c3t13 = ({ - f: function(i, s) { return s; } - }) - var c3t14 = ({ - a: [] - }) - - // CONTEXT: Class property assignment - class C4T5 { - foo: (i: number, s: string) => string; - constructor() { - this.foo = function(i, s) { - return s; - } - } - } - - // CONTEXT: Module property assignment - module C5T5 { - export var foo: (i: number, s: string) => string; - foo = function(i, s) { - return s; - } - } - - // CONTEXT: Variable assignment - var c6t5: (n: number) => IFoo; - c6t5 = <(n: number) => IFoo>function(n) { return ({}) }; - - // CONTEXT: Array index assignment - var c7t2: IFoo[]; - c7t2[0] = ({n: 1}); - - // CONTEXT: Object property assignment - interface IPlaceHolder { - t1: (s: string) => string; - t2: IFoo; - t3: number[]; - t4: () => IFoo; - t5: (n: number) => IFoo; - t6: (n: number, s: string) => IFoo; - t7: { - (n: number, s: string): number; - //(s1: string, s2: string): number; - }; - t8: (n: number, s: string) => number; - t9: number[][]; - t10: IFoo[]; - t11: {(n: number, s: string): string;}[]; - t12: IBar; - t13: IFoo; - t14: IFoo; - } - - var objc8: { - t1: (s: string) => string; - t2: IFoo; - t3: number[]; - t4: () => IFoo; - t5: (n: number) => IFoo; - t6: (n: number, s: string) => IFoo; - t7: { - (n: number, s: string): number; - //(s1: string, s2: string): number; - }; - t8: (n: number, s: string) => number; - t9: number[][]; - t10: IFoo[]; - t11: {(n: number, s: string): string;}[]; - t12: IBar; - t13: IFoo; - t14: IFoo; - } = ({}); - - objc8.t1 = (function(s) { return s }); - objc8.t2 = ({ - n: 1 - }); - objc8.t3 = []; - objc8.t4 = function() { return ({}) }; - objc8.t5 = function(n) { return ({}) }; - objc8.t6 = function(n, s) { return ({}) }; - objc8.t7 = function(n: number) { return n }; - - objc8.t8 = function(n) { return n; }; - objc8.t9 = [[],[]]; - objc8.t10 = [({}),({})]; - objc8.t11 = [function(n, s) { return s; }]; - objc8.t12 = { - foo: ({}) - } - objc8.t13 = ({ - f: function(i, s) { return s; } - }) - objc8.t14 = ({ - a: [] - }) - // CONTEXT: Function call - function c9t5(f: (n: number) => IFoo) {}; - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 contextualTyping.ts:146:10: Add a return type to the function declaration. - c9t5(function(n) { - return ({}); - }); - - // CONTEXT: Return statement - var c10t5: () => (n: number) => IFoo = function() { return function(n) { return ({}) } }; - - // CONTEXT: Newing a class - class C11t5 { constructor(f: (n: number) => IFoo) { } }; - var i = new C11t5(function(n) { return ({}) }); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 contextualTyping.ts:156:5: Add a type annotation to the variable i. - - // CONTEXT: Type annotated expression - var c12t1 = <(s: string) => string> (function(s) { return s }); - var c12t2 = ({ - n: 1 - }); - var c12t3 = []; - var c12t4 = <() => IFoo> function() { return ({}) }; - var c12t5 = <(n: number) => IFoo> function(n) { return ({}) }; - var c12t6 = <(n: number, s: string) => IFoo> function(n, s) { return ({}) }; - var c12t7 = <{ - (n: number, s: string): number; - //(s1: string, s2: string): number; - }> function(n:number) { return n }; - - var c12t8 = <(n: number, s: string) => number> function(n) { return n; }; - var c12t9 = [[],[]]; - var c12t10 = [({}),({})]; - var c12t11 = <{(n: number, s: string): string;}[]> [function(n, s) { return s; }]; - var c12t12 = { - foo: ({}) - } - var c12t13 = ({ - f: function(i, s) { return s; } - }) - var c12t14 = ({ - a: [] - }) - - // CONTEXT: Contextual typing declarations - - // contextually typing function declarations - declare function EF1(a:number, b:number):number; - ~~~ -!!! error TS2384: Overload signatures must all be ambient or non-ambient. - - function EF1(a,b) { return a+b; } - - var efv = EF1(1,2); - ~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 contextualTyping.ts:193:5: Add a type annotation to the variable efv. - - - // contextually typing from ambient class declarations - declare class Point - { - constructor(x: number, y: number); - x: number; - y: number; - add(dx: number, dy: number): Point; - static origin: Point; - - } - - Point.origin = new Point(0, 0); - - Point.prototype.add = function(dx, dy) { - return new Point(this.x + dx, this.y + dy); - }; - - Point.prototype = { - x: 0, - y: 0, - add: function(dx, dy) { - return new Point(this.x + dx, this.y + dy); - } - }; - - interface A { x: string; } - interface B extends A { } - var x: B = { }; - ~ -!!! error TS2741: Property 'x' is missing in type '{}' but required in type 'B'. -!!! related TS2728 contextualTyping.ts:221:15: 'x' is declared here. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping38.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping38.d.ts deleted file mode 100644 index c5cd9659d821f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping38.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -//// [tests/cases/compiler/contextualTyping38.ts] //// - -//// [contextualTyping38.ts] -var foo = <{ (): number; }> function(a) { return a }; - -/// [Declarations] //// - - - -//// [contextualTyping38.d.ts] -declare var foo: () => number; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping39.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping39.d.ts deleted file mode 100644 index 4e0cd53bb9234..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/contextualTyping39.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -//// [tests/cases/compiler/contextualTyping39.ts] //// - -//// [contextualTyping39.ts] -var foo = <{ (): number; }> function() { return "err"; }; - -/// [Declarations] //// - - - -//// [contextualTyping39.d.ts] -declare var foo: () => number; - -/// [Errors] //// - -contextualTyping39.ts(1,11): error TS2352: Conversion of type '() => string' to type '() => number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. - Type 'string' is not comparable to type 'number'. - - -==== contextualTyping39.ts (1 errors) ==== - var foo = <{ (): number; }> function() { return "err"; }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2352: Conversion of type '() => string' to type '() => number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: Type 'string' is not comparable to type 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/decoratorMetadataWithImportDeclarationNameCollision7.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/decoratorMetadataWithImportDeclarationNameCollision7.d.ts deleted file mode 100644 index d7158b4e7e320..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/decoratorMetadataWithImportDeclarationNameCollision7.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -//// [tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts] //// - -//// [db.ts] -export default class db { - public doSomething() { - } -} - -//// [service.ts] -import db from './db'; -function someDecorator(target) { - return target; -} -@someDecorator -class MyClass { - db: db.db; //error - - constructor(db: db.db) { // error - this.db = db; - this.db.doSomething(); - } -} -export {MyClass}; - - -/// [Declarations] //// - - - -//// [db.d.ts] -export default class db { - doSomething(): invalid; -} - -//// [service.d.ts] -declare class MyClass { - db: db.db; - constructor(db: db.db); -} -export { MyClass }; - -/// [Errors] //// - -db.ts(2,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -service.ts(7,9): error TS2702: 'db' only refers to a type, but is being used as a namespace here. -service.ts(7,9): error TS4031: Public property 'db' of exported class has or is using private name 'db'. -service.ts(9,21): error TS2702: 'db' only refers to a type, but is being used as a namespace here. -service.ts(9,21): error TS4063: Parameter 'db' of constructor from exported class has or is using private name 'db'. - - -==== db.ts (1 errors) ==== - export default class db { - public doSomething() { - ~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 db.ts:2:12: Add a return type to the method - } - } - -==== service.ts (4 errors) ==== - import db from './db'; - function someDecorator(target) { - return target; - } - @someDecorator - class MyClass { - db: db.db; //error - ~~ -!!! error TS2702: 'db' only refers to a type, but is being used as a namespace here. - ~~ -!!! error TS4031: Public property 'db' of exported class has or is using private name 'db'. - - constructor(db: db.db) { // error - ~~ -!!! error TS2702: 'db' only refers to a type, but is being used as a namespace here. - ~~ -!!! error TS4063: Parameter 'db' of constructor from exported class has or is using private name 'db'. - this.db = db; - this.db.doSomething(); - } - } - export {MyClass}; - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts deleted file mode 100644 index ed63dd516893b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/decoratorsOnComputedProperties.d.ts +++ /dev/null @@ -1,741 +0,0 @@ -//// [tests/cases/compiler/decoratorsOnComputedProperties.ts] //// - -//// [decoratorsOnComputedProperties.ts] -function x(o: object, k: PropertyKey) { } -let i = 0; -function foo(): string { return ++i + ""; } - -const fieldNameA: string = "fieldName1"; -const fieldNameB: string = "fieldName2"; -const fieldNameC: string = "fieldName3"; - -class A { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - @x [foo()]: any; - @x [foo()]: any = null; - [fieldNameA]: any; - @x [fieldNameB]: any; - @x [fieldNameC]: any = null; -} - -void class B { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - @x [foo()]: any; - @x [foo()]: any = null; - [fieldNameA]: any; - @x [fieldNameB]: any; - @x [fieldNameC]: any = null; -}; - -class C { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - @x [foo()]: any; - @x [foo()]: any = null; - [fieldNameA]: any; - @x [fieldNameB]: any; - @x [fieldNameC]: any = null; - ["some" + "method"]() {} -} - -void class D { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - @x [foo()]: any; - @x [foo()]: any = null; - [fieldNameA]: any; - @x [fieldNameB]: any; - @x [fieldNameC]: any = null; - ["some" + "method"]() {} -}; - -class E { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - @x [foo()]: any; - @x [foo()]: any = null; - ["some" + "method"]() {} - [fieldNameA]: any; - @x [fieldNameB]: any; - @x [fieldNameC]: any = null; -} - -void class F { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - @x [foo()]: any; - @x [foo()]: any = null; - ["some" + "method"]() {} - [fieldNameA]: any; - @x [fieldNameB]: any; - @x [fieldNameC]: any = null; -}; - -class G { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - @x [foo()]: any; - @x [foo()]: any = null; - ["some" + "method"]() {} - [fieldNameA]: any; - @x [fieldNameB]: any; - ["some" + "method2"]() {} - @x [fieldNameC]: any = null; -} - -void class H { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - @x [foo()]: any; - @x [foo()]: any = null; - ["some" + "method"]() {} - [fieldNameA]: any; - @x [fieldNameB]: any; - ["some" + "method2"]() {} - @x [fieldNameC]: any = null; -}; - -class I { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - @x [foo()]: any; - @x [foo()]: any = null; - @x ["some" + "method"]() {} - [fieldNameA]: any; - @x [fieldNameB]: any; - ["some" + "method2"]() {} - @x [fieldNameC]: any = null; -} - -void class J { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - @x [foo()]: any; - @x [foo()]: any = null; - @x ["some" + "method"]() {} - [fieldNameA]: any; - @x [fieldNameB]: any; - ["some" + "method2"]() {} - @x [fieldNameC]: any = null; -}; - -/// [Declarations] //// - - - -//// [decoratorsOnComputedProperties.d.ts] -declare function x(o: object, k: PropertyKey): invalid; -declare let i: number; -declare function foo(): string; -declare const fieldNameA: string; -declare const fieldNameB: string; -declare const fieldNameC: string; -declare class A { - ["property"]: any; - [Symbol.toStringTag]: any; - ["property2"]: any; - [Symbol.iterator]: any; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any; - [Symbol.match]: any; -} -declare class C { - ["property"]: any; - [Symbol.toStringTag]: any; - ["property2"]: any; - [Symbol.iterator]: any; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any; - [Symbol.match]: any; -} -declare class E { - ["property"]: any; - [Symbol.toStringTag]: any; - ["property2"]: any; - [Symbol.iterator]: any; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any; - [Symbol.match]: any; -} -declare class G { - ["property"]: any; - [Symbol.toStringTag]: any; - ["property2"]: any; - [Symbol.iterator]: any; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any; - [Symbol.match]: any; -} -declare class I { - ["property"]: any; - [Symbol.toStringTag]: any; - ["property2"]: any; - [Symbol.iterator]: any; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any; - [Symbol.match]: any; -} - -/// [Errors] //// - -decoratorsOnComputedProperties.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -decoratorsOnComputedProperties.ts(18,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(19,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(20,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(21,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(21,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -decoratorsOnComputedProperties.ts(22,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(22,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -decoratorsOnComputedProperties.ts(23,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(23,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -decoratorsOnComputedProperties.ts(27,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(28,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(29,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(30,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(35,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(36,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(37,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(38,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(39,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(40,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(52,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(53,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(54,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(55,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(55,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -decoratorsOnComputedProperties.ts(56,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(56,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -decoratorsOnComputedProperties.ts(57,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(57,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -decoratorsOnComputedProperties.ts(62,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(63,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(64,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(65,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(70,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(71,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(72,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(73,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(74,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(75,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(88,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(89,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(90,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(92,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(92,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -decoratorsOnComputedProperties.ts(93,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(93,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -decoratorsOnComputedProperties.ts(94,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(94,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -decoratorsOnComputedProperties.ts(98,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(99,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(100,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(101,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(106,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(107,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(108,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(110,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(111,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(112,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(124,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(125,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(126,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(128,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(128,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -decoratorsOnComputedProperties.ts(129,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(129,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -decoratorsOnComputedProperties.ts(131,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(131,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -decoratorsOnComputedProperties.ts(135,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(136,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(137,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(138,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(143,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(144,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(145,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(147,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(148,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(150,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(162,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(163,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(164,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(166,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(166,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -decoratorsOnComputedProperties.ts(167,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(167,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -decoratorsOnComputedProperties.ts(169,8): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(169,8): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -decoratorsOnComputedProperties.ts(173,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(174,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(175,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(176,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(181,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(182,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(183,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(184,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(185,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -decoratorsOnComputedProperties.ts(186,5): error TS1206: Decorators are not valid here. -decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid here. - - -==== decoratorsOnComputedProperties.ts (97 errors) ==== - function x(o: object, k: PropertyKey) { } - ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 decoratorsOnComputedProperties.ts:1:10: Add a return type to the function declaration. - let i = 0; - function foo(): string { return ++i + ""; } - - const fieldNameA: string = "fieldName1"; - const fieldNameB: string = "fieldName2"; - const fieldNameC: string = "fieldName3"; - - class A { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any = null; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - @x [fieldNameB]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - @x [fieldNameC]: any = null; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } - - void class B { - @x ["property"]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [Symbol.toStringTag]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x ["property2"]: any = 2; - ~ -!!! error TS1206: Decorators are not valid here. - @x [Symbol.iterator]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [foo()]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [fieldNameC]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - }; - - class C { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any = null; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - @x [fieldNameB]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - @x [fieldNameC]: any = null; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - ["some" + "method"]() {} - } - - void class D { - @x ["property"]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [Symbol.toStringTag]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x ["property2"]: any = 2; - ~ -!!! error TS1206: Decorators are not valid here. - @x [Symbol.iterator]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [foo()]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [fieldNameC]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - ["some" + "method"]() {} - }; - - class E { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any = null; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ["some" + "method"]() {} - [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - @x [fieldNameB]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - @x [fieldNameC]: any = null; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } - - void class F { - @x ["property"]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [Symbol.toStringTag]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x ["property2"]: any = 2; - ~ -!!! error TS1206: Decorators are not valid here. - @x [Symbol.iterator]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [foo()]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - ["some" + "method"]() {} - [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [fieldNameC]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - }; - - class G { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any = null; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ["some" + "method"]() {} - [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - @x [fieldNameB]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - ["some" + "method2"]() {} - @x [fieldNameC]: any = null; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } - - void class H { - @x ["property"]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [Symbol.toStringTag]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x ["property2"]: any = 2; - ~ -!!! error TS1206: Decorators are not valid here. - @x [Symbol.iterator]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [foo()]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - ["some" + "method"]() {} - [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; - ~ -!!! error TS1206: Decorators are not valid here. - ["some" + "method2"]() {} - @x [fieldNameC]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - }; - - class I { - @x ["property"]: any; - @x [Symbol.toStringTag]: any; - @x ["property2"]: any = 2; - @x [Symbol.iterator]: any = null; - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any = null; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x ["some" + "method"]() {} - [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - @x [fieldNameB]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - ["some" + "method2"]() {} - @x [fieldNameC]: any = null; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } - - void class J { - @x ["property"]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [Symbol.toStringTag]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x ["property2"]: any = 2; - ~ -!!! error TS1206: Decorators are not valid here. - @x [Symbol.iterator]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - ["property3"]: any; - [Symbol.isConcatSpreadable]: any; - ["property4"]: any = 2; - [Symbol.match]: any = null; - [foo()]: any; - ~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [foo()]: any; - ~ -!!! error TS1206: Decorators are not valid here. - @x [foo()]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - @x ["some" + "method"]() {} - ~ -!!! error TS1206: Decorators are not valid here. - [fieldNameA]: any; - ~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - @x [fieldNameB]: any; - ~ -!!! error TS1206: Decorators are not valid here. - ["some" + "method2"]() {} - @x [fieldNameC]: any = null; - ~ -!!! error TS1206: Decorators are not valid here. - }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/duplicateObjectLiteralProperty_computedName1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/duplicateObjectLiteralProperty_computedName1.d.ts deleted file mode 100644 index 1e87fb05d8d31..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/duplicateObjectLiteralProperty_computedName1.d.ts +++ /dev/null @@ -1,125 +0,0 @@ -//// [tests/cases/compiler/duplicateObjectLiteralProperty_computedName1.ts] //// - -//// [duplicateObjectLiteralProperty_computedName1.ts] -const t1 = { - 1: 1, - [1]: 0 // duplicate -} - -const t2 = { - 1: 1, - [+1]: 0 // duplicate -} - -const t3 = { - "1": 1, - [+1]: 0 // duplicate -} - -const t4 = { - "+1": 1, - [+1]: 0 // two different keys, "+1", "1" -} - -const t5 = { - "+1": 1, - ["+1"]: 0 // duplicate -} - -const t6 = { - "-1": 1, - [-1]: 0 // duplicate -} - -const t7 = { - "-1": 1, - ["-1"]: 0 // duplicate -} - - -/// [Declarations] //// - - - -//// [duplicateObjectLiteralProperty_computedName1.d.ts] -declare const t1: { - 1: number; -}; -declare const t2: { - 1: number; -}; -declare const t3: { - 1: number; -}; -declare const t4: { - "+1": number; - 1: number; -}; -declare const t5: { - "+1": number; -}; -declare const t6: { - [-1]: number; -}; -declare const t7: { - "-1": number; -}; - -/// [Errors] //// - -duplicateObjectLiteralProperty_computedName1.ts(3,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty_computedName1.ts(8,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty_computedName1.ts(13,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty_computedName1.ts(23,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty_computedName1.ts(28,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty_computedName1.ts(33,5): error TS1117: An object literal cannot have multiple properties with the same name. - - -==== duplicateObjectLiteralProperty_computedName1.ts (6 errors) ==== - const t1 = { - 1: 1, - [1]: 0 // duplicate - ~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - - const t2 = { - 1: 1, - [+1]: 0 // duplicate - ~~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - - const t3 = { - "1": 1, - [+1]: 0 // duplicate - ~~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - - const t4 = { - "+1": 1, - [+1]: 0 // two different keys, "+1", "1" - } - - const t5 = { - "+1": 1, - ["+1"]: 0 // duplicate - ~~~~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - - const t6 = { - "-1": 1, - [-1]: 0 // duplicate - ~~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - - const t7 = { - "-1": 1, - ["-1"]: 0 // duplicate - ~~~~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/duplicateObjectLiteralProperty_computedName2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/duplicateObjectLiteralProperty_computedName2.d.ts deleted file mode 100644 index c6b227c32191d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/duplicateObjectLiteralProperty_computedName2.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -//// [tests/cases/compiler/duplicateObjectLiteralProperty_computedName2.ts] //// - -//// [duplicateObjectLiteralProperty_computedName2.ts] -const n = 1; -const s = "s"; -enum E1 { A = "ENUM_KEY" } -enum E2 { B } - -const t1 = { - [n]: 1, - [n]: 1, // duplicate -} - -const t2 = { - [s]: 1, - [s]: 1, // duplicate -} - -const t3 = { - [E1.A]: 1, - [E1.A]: 1, // duplicate -} - -const t4 = { - [E2.B]: 1, - [E2.B]: 1, // duplicate -} - - -/// [Declarations] //// - - - -//// [duplicateObjectLiteralProperty_computedName2.d.ts] -declare const n = 1; -declare const s = "s"; -declare enum E1 { - A = "ENUM_KEY" -} -declare enum E2 { - B = 0 -} -declare const t1: { - 1: number; -}; -declare const t2: { - s: number; -}; -declare const t3: { - ENUM_KEY: number; -}; -declare const t4: { - 0: number; -}; - -/// [Errors] //// - -duplicateObjectLiteralProperty_computedName2.ts(8,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty_computedName2.ts(13,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty_computedName2.ts(18,5): error TS1117: An object literal cannot have multiple properties with the same name. -duplicateObjectLiteralProperty_computedName2.ts(23,5): error TS1117: An object literal cannot have multiple properties with the same name. - - -==== duplicateObjectLiteralProperty_computedName2.ts (4 errors) ==== - const n = 1; - const s = "s"; - enum E1 { A = "ENUM_KEY" } - enum E2 { B } - - const t1 = { - [n]: 1, - [n]: 1, // duplicate - ~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - - const t2 = { - [s]: 1, - [s]: 1, // duplicate - ~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - - const t3 = { - [E1.A]: 1, - [E1.A]: 1, // duplicate - ~~~~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - - const t4 = { - [E2.B]: 1, - [E2.B]: 1, // duplicate - ~~~~~~ -!!! error TS1117: An object literal cannot have multiple properties with the same name. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/duplicateVarsAcrossFileBoundaries.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/duplicateVarsAcrossFileBoundaries.d.ts deleted file mode 100644 index c33baf4205dfc..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/duplicateVarsAcrossFileBoundaries.d.ts +++ /dev/null @@ -1,117 +0,0 @@ -//// [tests/cases/compiler/duplicateVarsAcrossFileBoundaries.ts] //// - -//// [duplicateVarsAcrossFileBoundaries_0.ts] -var x = 3; -var y = ""; - -//// [duplicateVarsAcrossFileBoundaries_1.ts] -var x = true; -var z = 3; - -//// [duplicateVarsAcrossFileBoundaries_2.ts] -var x = ""; -var y = 3; -var z = false; - -//// [duplicateVarsAcrossFileBoundaries_3.ts] -var x = 0; -var y = ""; -var z = 0; - -//// [duplicateVarsAcrossFileBoundaries_4.ts] -module P { } -import p = P; -var q; - -//// [duplicateVarsAcrossFileBoundaries_5.ts] -module Q { } -import q = Q; -var p; - -/// [Declarations] //// - - - -//// [duplicateVarsAcrossFileBoundaries_0.d.ts] -declare var x: number; -declare var y: string; - -//// [duplicateVarsAcrossFileBoundaries_1.d.ts] -declare var x: number; -declare var z: number; - -//// [duplicateVarsAcrossFileBoundaries_2.d.ts] -declare var x: number; -declare var y: string; -declare var z: number; - -//// [duplicateVarsAcrossFileBoundaries_3.d.ts] -declare var x: number; -declare var y: string; -declare var z: number; - -//// [duplicateVarsAcrossFileBoundaries_4.d.ts] -declare namespace P { } -import p = P; -declare var q: invalid; - -//// [duplicateVarsAcrossFileBoundaries_5.d.ts] -declare namespace Q { } -import q = Q; -declare var p: invalid; - -/// [Errors] //// - -duplicateVarsAcrossFileBoundaries_1.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'boolean'. -duplicateVarsAcrossFileBoundaries_2.ts(1,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. -duplicateVarsAcrossFileBoundaries_2.ts(2,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'number'. -duplicateVarsAcrossFileBoundaries_2.ts(3,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'boolean'. -duplicateVarsAcrossFileBoundaries_4.ts(3,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -duplicateVarsAcrossFileBoundaries_5.ts(3,5): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. - - -==== duplicateVarsAcrossFileBoundaries_0.ts (0 errors) ==== - var x = 3; - var y = ""; - -==== duplicateVarsAcrossFileBoundaries_1.ts (1 errors) ==== - var x = true; - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'boolean'. -!!! related TS6203 duplicateVarsAcrossFileBoundaries_0.ts:1:5: 'x' was also declared here. - var z = 3; - -==== duplicateVarsAcrossFileBoundaries_2.ts (3 errors) ==== - var x = ""; - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'number', but here has type 'string'. -!!! related TS6203 duplicateVarsAcrossFileBoundaries_0.ts:1:5: 'x' was also declared here. - var y = 3; - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string', but here has type 'number'. -!!! related TS6203 duplicateVarsAcrossFileBoundaries_0.ts:2:5: 'y' was also declared here. - var z = false; - ~ -!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'number', but here has type 'boolean'. -!!! related TS6203 duplicateVarsAcrossFileBoundaries_1.ts:2:5: 'z' was also declared here. - -==== duplicateVarsAcrossFileBoundaries_3.ts (0 errors) ==== - var x = 0; - var y = ""; - var z = 0; - -==== duplicateVarsAcrossFileBoundaries_4.ts (1 errors) ==== - module P { } - import p = P; - var q; - ~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 duplicateVarsAcrossFileBoundaries_4.ts:3:5: Add a type annotation to the variable q. - -==== duplicateVarsAcrossFileBoundaries_5.ts (1 errors) ==== - module Q { } - import q = Q; - var p; - ~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 duplicateVarsAcrossFileBoundaries_5.ts:3:5: Add a type annotation to the variable p. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/escapedIdentifiers.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/escapedIdentifiers.d.ts deleted file mode 100644 index 60d4c1428d2e9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/escapedIdentifiers.d.ts +++ /dev/null @@ -1,316 +0,0 @@ -//// [tests/cases/compiler/escapedIdentifiers.ts] //// - -//// [escapedIdentifiers.ts] -/* - 0 .. \u0030 - 9 .. \u0039 - - A .. \u0041 - Z .. \u005a - - a .. \u0061 - z .. \u00za -*/ - -// var decl -var \u0061 = 1; -a ++; -\u0061 ++; - -var b = 1; -b ++; -\u0062 ++; - -// modules -module moduleType1 { - export var baz1: number; -} -module moduleType\u0032 { - export var baz2: number; -} - -moduleType1.baz1 = 3; -moduleType\u0031.baz1 = 3; -moduleType2.baz2 = 3; -moduleType\u0032.baz2 = 3; - -// classes - -class classType1 { - public foo1: number; -} -class classType\u0032 { - public foo2: number; -} - -var classType1Object1 = new classType1(); -classType1Object1.foo1 = 2; -var classType1Object2 = new classType\u0031(); -classType1Object2.foo1 = 2; -var classType2Object1 = new classType2(); -classType2Object1.foo2 = 2; -var classType2Object2 = new classType\u0032(); -classType2Object2.foo2 = 2; - -// interfaces -interface interfaceType1 { - bar1: number; -} -interface interfaceType\u0032 { - bar2: number; -} - -var interfaceType1Object1 = { bar1: 0 }; -interfaceType1Object1.bar1 = 2; -var interfaceType1Object2 = { bar1: 0 }; -interfaceType1Object2.bar1 = 2; -var interfaceType2Object1 = { bar2: 0 }; -interfaceType2Object1.bar2 = 2; -var interfaceType2Object2 = { bar2: 0 }; -interfaceType2Object2.bar2 = 2; - - -// arguments -class testClass { - public func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number) { - arg\u0031 = 1; - arg2 = 'string'; - arg\u0033 = true; - arg4 = 2; - } -} - -// constructors -class constructorTestClass { - constructor (public arg1: number,public arg\u0032: string,public arg\u0033: boolean,public arg4: number) { - } -} -var constructorTestObject = new constructorTestClass(1, 'string', true, 2); -constructorTestObject.arg\u0031 = 1; -constructorTestObject.arg2 = 'string'; -constructorTestObject.arg\u0033 = true; -constructorTestObject.arg4 = 2; - -// Lables - -l\u0061bel1: - while (false) - { - while(false) - continue label1; // it will go to next iteration of outer loop - } - -label2: - while (false) - { - while(false) - continue l\u0061bel2; // it will go to next iteration of outer loop - } - -label3: - while (false) - { - while(false) - continue label3; // it will go to next iteration of outer loop - } - -l\u0061bel4: - while (false) - { - while(false) - continue l\u0061bel4; // it will go to next iteration of outer loop - } - -/// [Declarations] //// - - - -//// [escapedIdentifiers.d.ts] -declare var \u0061: number; -declare var b: number; -declare namespace moduleType1 { - var baz1: number; -} -declare namespace moduleType\u0032 { - var baz2: number; -} -declare class classType1 { - foo1: number; -} -declare class classType\u0032 { - foo2: number; -} -declare var classType1Object1: invalid; -declare var classType1Object2: invalid; -declare var classType2Object1: invalid; -declare var classType2Object2: invalid; -interface interfaceType1 { - bar1: number; -} -interface interfaceType\u0032 { - bar2: number; -} -declare var interfaceType1Object1: interfaceType1; -declare var interfaceType1Object2: interfaceType1; -declare var interfaceType2Object1: interfaceType\u0032; -declare var interfaceType2Object2: interfaceType\u0032; -declare class testClass { - func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number): invalid; -} -declare class constructorTestClass { - arg1: number; - arg\u0032: string; - arg\u0033: boolean; - arg4: number; - constructor(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number); -} -declare var constructorTestObject: invalid; - -/// [Errors] //// - -escapedIdentifiers.ts(43,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -escapedIdentifiers.ts(45,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -escapedIdentifiers.ts(47,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -escapedIdentifiers.ts(49,25): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -escapedIdentifiers.ts(72,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -escapedIdentifiers.ts(85,29): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. - - -==== escapedIdentifiers.ts (6 errors) ==== - /* - 0 .. \u0030 - 9 .. \u0039 - - A .. \u0041 - Z .. \u005a - - a .. \u0061 - z .. \u00za - */ - - // var decl - var \u0061 = 1; - a ++; - \u0061 ++; - - var b = 1; - b ++; - \u0062 ++; - - // modules - module moduleType1 { - export var baz1: number; - } - module moduleType\u0032 { - export var baz2: number; - } - - moduleType1.baz1 = 3; - moduleType\u0031.baz1 = 3; - moduleType2.baz2 = 3; - moduleType\u0032.baz2 = 3; - - // classes - - class classType1 { - public foo1: number; - } - class classType\u0032 { - public foo2: number; - } - - var classType1Object1 = new classType1(); - ~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 escapedIdentifiers.ts:43:5: Add a type annotation to the variable classType1Object1. - classType1Object1.foo1 = 2; - var classType1Object2 = new classType\u0031(); - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 escapedIdentifiers.ts:45:5: Add a type annotation to the variable classType1Object2. - classType1Object2.foo1 = 2; - var classType2Object1 = new classType2(); - ~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 escapedIdentifiers.ts:47:5: Add a type annotation to the variable classType2Object1. - classType2Object1.foo2 = 2; - var classType2Object2 = new classType\u0032(); - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 escapedIdentifiers.ts:49:5: Add a type annotation to the variable classType2Object2. - classType2Object2.foo2 = 2; - - // interfaces - interface interfaceType1 { - bar1: number; - } - interface interfaceType\u0032 { - bar2: number; - } - - var interfaceType1Object1 = { bar1: 0 }; - interfaceType1Object1.bar1 = 2; - var interfaceType1Object2 = { bar1: 0 }; - interfaceType1Object2.bar1 = 2; - var interfaceType2Object1 = { bar2: 0 }; - interfaceType2Object1.bar2 = 2; - var interfaceType2Object2 = { bar2: 0 }; - interfaceType2Object2.bar2 = 2; - - - // arguments - class testClass { - public func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number) { - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 escapedIdentifiers.ts:72:12: Add a return type to the method - arg\u0031 = 1; - arg2 = 'string'; - arg\u0033 = true; - arg4 = 2; - } - } - - // constructors - class constructorTestClass { - constructor (public arg1: number,public arg\u0032: string,public arg\u0033: boolean,public arg4: number) { - } - } - var constructorTestObject = new constructorTestClass(1, 'string', true, 2); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 escapedIdentifiers.ts:85:5: Add a type annotation to the variable constructorTestObject. - constructorTestObject.arg\u0031 = 1; - constructorTestObject.arg2 = 'string'; - constructorTestObject.arg\u0033 = true; - constructorTestObject.arg4 = 2; - - // Lables - - l\u0061bel1: - while (false) - { - while(false) - continue label1; // it will go to next iteration of outer loop - } - - label2: - while (false) - { - while(false) - continue l\u0061bel2; // it will go to next iteration of outer loop - } - - label3: - while (false) - { - while(false) - continue label3; // it will go to next iteration of outer loop - } - - l\u0061bel4: - while (false) - { - while(false) - continue l\u0061bel4; // it will go to next iteration of outer loop - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts deleted file mode 100644 index ed2f14fe87b4b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/forwardRefInEnum.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -//// [tests/cases/compiler/forwardRefInEnum.ts] //// - -//// [forwardRefInEnum.ts] -enum E1 { - // illegal case - // forward reference to the element of the same enum - X = Y, - X1 = E1["Y"], - // forward reference to the element of the same enum - Y = E1.Z, - Y1 = E1["Z"] -} - -enum E1 { - Z = 4 -} - - -/// [Declarations] //// - - - -//// [forwardRefInEnum.d.ts] -declare enum E1 { - X = 0, - X1 = 0, - Y, - Y1 -} -declare enum E1 { - Z = 4 -} - -/// [Errors] //// - -forwardRefInEnum.ts(4,9): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -forwardRefInEnum.ts(5,10): error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. -forwardRefInEnum.ts(7,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. -forwardRefInEnum.ts(8,5): error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. - - -==== forwardRefInEnum.ts (4 errors) ==== - enum E1 { - // illegal case - // forward reference to the element of the same enum - X = Y, - ~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - X1 = E1["Y"], - ~~~~~~~ -!!! error TS2651: A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums. - // forward reference to the element of the same enum - Y = E1.Z, - ~ -!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. - Y1 = E1["Z"] - ~~ -!!! error TS9020: Enum member initializers must be computable without references to external symbols with --isolatedDeclarations. - } - - enum E1 { - Z = 4 - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/generatedContextualTyping.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/generatedContextualTyping.d.ts deleted file mode 100644 index f0d0e92900e4f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/generatedContextualTyping.d.ts +++ /dev/null @@ -1,1901 +0,0 @@ -//// [tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts] //// - -//// [generatedContextualTyping.ts] -class Base { private p; } -class Derived1 extends Base { private m; } -class Derived2 extends Base { private n; } -interface Genric { func(n: T[]); } -var b = new Base(), d1 = new Derived1(), d2 = new Derived2(); -var x1: () => Base[] = () => [d1, d2]; -var x2: () => Base[] = function() { return [d1, d2] }; -var x3: () => Base[] = function named() { return [d1, d2] }; -var x4: { (): Base[]; } = () => [d1, d2]; -var x5: { (): Base[]; } = function() { return [d1, d2] }; -var x6: { (): Base[]; } = function named() { return [d1, d2] }; -var x7: Base[] = [d1, d2]; -var x8: Array = [d1, d2]; -var x9: { [n: number]: Base; } = [d1, d2]; -var x10: {n: Base[]; } = { n: [d1, d2] }; -var x11: (s: Base[]) => any = n => { var n: Base[]; return null; }; -var x12: Genric = { func: n => { return [d1, d2]; } }; -class x13 { member: () => Base[] = () => [d1, d2] } -class x14 { member: () => Base[] = function() { return [d1, d2] } } -class x15 { member: () => Base[] = function named() { return [d1, d2] } } -class x16 { member: { (): Base[]; } = () => [d1, d2] } -class x17 { member: { (): Base[]; } = function() { return [d1, d2] } } -class x18 { member: { (): Base[]; } = function named() { return [d1, d2] } } -class x19 { member: Base[] = [d1, d2] } -class x20 { member: Array = [d1, d2] } -class x21 { member: { [n: number]: Base; } = [d1, d2] } -class x22 { member: {n: Base[]; } = { n: [d1, d2] } } -class x23 { member: (s: Base[]) => any = n => { var n: Base[]; return null; } } -class x24 { member: Genric = { func: n => { return [d1, d2]; } } } -class x25 { private member: () => Base[] = () => [d1, d2] } -class x26 { private member: () => Base[] = function() { return [d1, d2] } } -class x27 { private member: () => Base[] = function named() { return [d1, d2] } } -class x28 { private member: { (): Base[]; } = () => [d1, d2] } -class x29 { private member: { (): Base[]; } = function() { return [d1, d2] } } -class x30 { private member: { (): Base[]; } = function named() { return [d1, d2] } } -class x31 { private member: Base[] = [d1, d2] } -class x32 { private member: Array = [d1, d2] } -class x33 { private member: { [n: number]: Base; } = [d1, d2] } -class x34 { private member: {n: Base[]; } = { n: [d1, d2] } } -class x35 { private member: (s: Base[]) => any = n => { var n: Base[]; return null; } } -class x36 { private member: Genric = { func: n => { return [d1, d2]; } } } -class x37 { public member: () => Base[] = () => [d1, d2] } -class x38 { public member: () => Base[] = function() { return [d1, d2] } } -class x39 { public member: () => Base[] = function named() { return [d1, d2] } } -class x40 { public member: { (): Base[]; } = () => [d1, d2] } -class x41 { public member: { (): Base[]; } = function() { return [d1, d2] } } -class x42 { public member: { (): Base[]; } = function named() { return [d1, d2] } } -class x43 { public member: Base[] = [d1, d2] } -class x44 { public member: Array = [d1, d2] } -class x45 { public member: { [n: number]: Base; } = [d1, d2] } -class x46 { public member: {n: Base[]; } = { n: [d1, d2] } } -class x47 { public member: (s: Base[]) => any = n => { var n: Base[]; return null; } } -class x48 { public member: Genric = { func: n => { return [d1, d2]; } } } -class x49 { static member: () => Base[] = () => [d1, d2] } -class x50 { static member: () => Base[] = function() { return [d1, d2] } } -class x51 { static member: () => Base[] = function named() { return [d1, d2] } } -class x52 { static member: { (): Base[]; } = () => [d1, d2] } -class x53 { static member: { (): Base[]; } = function() { return [d1, d2] } } -class x54 { static member: { (): Base[]; } = function named() { return [d1, d2] } } -class x55 { static member: Base[] = [d1, d2] } -class x56 { static member: Array = [d1, d2] } -class x57 { static member: { [n: number]: Base; } = [d1, d2] } -class x58 { static member: {n: Base[]; } = { n: [d1, d2] } } -class x59 { static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } -class x60 { static member: Genric = { func: n => { return [d1, d2]; } } } -class x61 { private static member: () => Base[] = () => [d1, d2] } -class x62 { private static member: () => Base[] = function() { return [d1, d2] } } -class x63 { private static member: () => Base[] = function named() { return [d1, d2] } } -class x64 { private static member: { (): Base[]; } = () => [d1, d2] } -class x65 { private static member: { (): Base[]; } = function() { return [d1, d2] } } -class x66 { private static member: { (): Base[]; } = function named() { return [d1, d2] } } -class x67 { private static member: Base[] = [d1, d2] } -class x68 { private static member: Array = [d1, d2] } -class x69 { private static member: { [n: number]: Base; } = [d1, d2] } -class x70 { private static member: {n: Base[]; } = { n: [d1, d2] } } -class x71 { private static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } -class x72 { private static member: Genric = { func: n => { return [d1, d2]; } } } -class x73 { public static member: () => Base[] = () => [d1, d2] } -class x74 { public static member: () => Base[] = function() { return [d1, d2] } } -class x75 { public static member: () => Base[] = function named() { return [d1, d2] } } -class x76 { public static member: { (): Base[]; } = () => [d1, d2] } -class x77 { public static member: { (): Base[]; } = function() { return [d1, d2] } } -class x78 { public static member: { (): Base[]; } = function named() { return [d1, d2] } } -class x79 { public static member: Base[] = [d1, d2] } -class x80 { public static member: Array = [d1, d2] } -class x81 { public static member: { [n: number]: Base; } = [d1, d2] } -class x82 { public static member: {n: Base[]; } = { n: [d1, d2] } } -class x83 { public static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } -class x84 { public static member: Genric = { func: n => { return [d1, d2]; } } } -class x85 { constructor(parm: () => Base[] = () => [d1, d2]) { } } -class x86 { constructor(parm: () => Base[] = function() { return [d1, d2] }) { } } -class x87 { constructor(parm: () => Base[] = function named() { return [d1, d2] }) { } } -class x88 { constructor(parm: { (): Base[]; } = () => [d1, d2]) { } } -class x89 { constructor(parm: { (): Base[]; } = function() { return [d1, d2] }) { } } -class x90 { constructor(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } -class x91 { constructor(parm: Base[] = [d1, d2]) { } } -class x92 { constructor(parm: Array = [d1, d2]) { } } -class x93 { constructor(parm: { [n: number]: Base; } = [d1, d2]) { } } -class x94 { constructor(parm: {n: Base[]; } = { n: [d1, d2] }) { } } -class x95 { constructor(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } -class x96 { constructor(parm: Genric = { func: n => { return [d1, d2]; } }) { } } -class x97 { constructor(public parm: () => Base[] = () => [d1, d2]) { } } -class x98 { constructor(public parm: () => Base[] = function() { return [d1, d2] }) { } } -class x99 { constructor(public parm: () => Base[] = function named() { return [d1, d2] }) { } } -class x100 { constructor(public parm: { (): Base[]; } = () => [d1, d2]) { } } -class x101 { constructor(public parm: { (): Base[]; } = function() { return [d1, d2] }) { } } -class x102 { constructor(public parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } -class x103 { constructor(public parm: Base[] = [d1, d2]) { } } -class x104 { constructor(public parm: Array = [d1, d2]) { } } -class x105 { constructor(public parm: { [n: number]: Base; } = [d1, d2]) { } } -class x106 { constructor(public parm: {n: Base[]; } = { n: [d1, d2] }) { } } -class x107 { constructor(public parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } -class x108 { constructor(public parm: Genric = { func: n => { return [d1, d2]; } }) { } } -class x109 { constructor(private parm: () => Base[] = () => [d1, d2]) { } } -class x110 { constructor(private parm: () => Base[] = function() { return [d1, d2] }) { } } -class x111 { constructor(private parm: () => Base[] = function named() { return [d1, d2] }) { } } -class x112 { constructor(private parm: { (): Base[]; } = () => [d1, d2]) { } } -class x113 { constructor(private parm: { (): Base[]; } = function() { return [d1, d2] }) { } } -class x114 { constructor(private parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } -class x115 { constructor(private parm: Base[] = [d1, d2]) { } } -class x116 { constructor(private parm: Array = [d1, d2]) { } } -class x117 { constructor(private parm: { [n: number]: Base; } = [d1, d2]) { } } -class x118 { constructor(private parm: {n: Base[]; } = { n: [d1, d2] }) { } } -class x119 { constructor(private parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } -class x120 { constructor(private parm: Genric = { func: n => { return [d1, d2]; } }) { } } -function x121(parm: () => Base[] = () => [d1, d2]) { } -function x122(parm: () => Base[] = function() { return [d1, d2] }) { } -function x123(parm: () => Base[] = function named() { return [d1, d2] }) { } -function x124(parm: { (): Base[]; } = () => [d1, d2]) { } -function x125(parm: { (): Base[]; } = function() { return [d1, d2] }) { } -function x126(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } -function x127(parm: Base[] = [d1, d2]) { } -function x128(parm: Array = [d1, d2]) { } -function x129(parm: { [n: number]: Base; } = [d1, d2]) { } -function x130(parm: {n: Base[]; } = { n: [d1, d2] }) { } -function x131(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } -function x132(parm: Genric = { func: n => { return [d1, d2]; } }) { } -function x133(): () => Base[] { return () => [d1, d2]; } -function x134(): () => Base[] { return function() { return [d1, d2] }; } -function x135(): () => Base[] { return function named() { return [d1, d2] }; } -function x136(): { (): Base[]; } { return () => [d1, d2]; } -function x137(): { (): Base[]; } { return function() { return [d1, d2] }; } -function x138(): { (): Base[]; } { return function named() { return [d1, d2] }; } -function x139(): Base[] { return [d1, d2]; } -function x140(): Array { return [d1, d2]; } -function x141(): { [n: number]: Base; } { return [d1, d2]; } -function x142(): {n: Base[]; } { return { n: [d1, d2] }; } -function x143(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; } -function x144(): Genric { return { func: n => { return [d1, d2]; } }; } -function x145(): () => Base[] { return () => [d1, d2]; return () => [d1, d2]; } -function x146(): () => Base[] { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } -function x147(): () => Base[] { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } -function x148(): { (): Base[]; } { return () => [d1, d2]; return () => [d1, d2]; } -function x149(): { (): Base[]; } { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } -function x150(): { (): Base[]; } { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } -function x151(): Base[] { return [d1, d2]; return [d1, d2]; } -function x152(): Array { return [d1, d2]; return [d1, d2]; } -function x153(): { [n: number]: Base; } { return [d1, d2]; return [d1, d2]; } -function x154(): {n: Base[]; } { return { n: [d1, d2] }; return { n: [d1, d2] }; } -function x155(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; return n => { var n: Base[]; return null; }; } -function x156(): Genric { return { func: n => { return [d1, d2]; } }; return { func: n => { return [d1, d2]; } }; } -var x157: () => () => Base[] = () => { return () => [d1, d2]; }; -var x158: () => () => Base[] = () => { return function() { return [d1, d2] }; }; -var x159: () => () => Base[] = () => { return function named() { return [d1, d2] }; }; -var x160: () => { (): Base[]; } = () => { return () => [d1, d2]; }; -var x161: () => { (): Base[]; } = () => { return function() { return [d1, d2] }; }; -var x162: () => { (): Base[]; } = () => { return function named() { return [d1, d2] }; }; -var x163: () => Base[] = () => { return [d1, d2]; }; -var x164: () => Array = () => { return [d1, d2]; }; -var x165: () => { [n: number]: Base; } = () => { return [d1, d2]; }; -var x166: () => {n: Base[]; } = () => { return { n: [d1, d2] }; }; -var x167: () => (s: Base[]) => any = () => { return n => { var n: Base[]; return null; }; }; -var x168: () => Genric = () => { return { func: n => { return [d1, d2]; } }; }; -var x169: () => () => Base[] = function() { return () => [d1, d2]; }; -var x170: () => () => Base[] = function() { return function() { return [d1, d2] }; }; -var x171: () => () => Base[] = function() { return function named() { return [d1, d2] }; }; -var x172: () => { (): Base[]; } = function() { return () => [d1, d2]; }; -var x173: () => { (): Base[]; } = function() { return function() { return [d1, d2] }; }; -var x174: () => { (): Base[]; } = function() { return function named() { return [d1, d2] }; }; -var x175: () => Base[] = function() { return [d1, d2]; }; -var x176: () => Array = function() { return [d1, d2]; }; -var x177: () => { [n: number]: Base; } = function() { return [d1, d2]; }; -var x178: () => {n: Base[]; } = function() { return { n: [d1, d2] }; }; -var x179: () => (s: Base[]) => any = function() { return n => { var n: Base[]; return null; }; }; -var x180: () => Genric = function() { return { func: n => { return [d1, d2]; } }; }; -module x181 { var t: () => Base[] = () => [d1, d2]; } -module x182 { var t: () => Base[] = function() { return [d1, d2] }; } -module x183 { var t: () => Base[] = function named() { return [d1, d2] }; } -module x184 { var t: { (): Base[]; } = () => [d1, d2]; } -module x185 { var t: { (): Base[]; } = function() { return [d1, d2] }; } -module x186 { var t: { (): Base[]; } = function named() { return [d1, d2] }; } -module x187 { var t: Base[] = [d1, d2]; } -module x188 { var t: Array = [d1, d2]; } -module x189 { var t: { [n: number]: Base; } = [d1, d2]; } -module x190 { var t: {n: Base[]; } = { n: [d1, d2] }; } -module x191 { var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } -module x192 { var t: Genric = { func: n => { return [d1, d2]; } }; } -module x193 { export var t: () => Base[] = () => [d1, d2]; } -module x194 { export var t: () => Base[] = function() { return [d1, d2] }; } -module x195 { export var t: () => Base[] = function named() { return [d1, d2] }; } -module x196 { export var t: { (): Base[]; } = () => [d1, d2]; } -module x197 { export var t: { (): Base[]; } = function() { return [d1, d2] }; } -module x198 { export var t: { (): Base[]; } = function named() { return [d1, d2] }; } -module x199 { export var t: Base[] = [d1, d2]; } -module x200 { export var t: Array = [d1, d2]; } -module x201 { export var t: { [n: number]: Base; } = [d1, d2]; } -module x202 { export var t: {n: Base[]; } = { n: [d1, d2] }; } -module x203 { export var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } -module x204 { export var t: Genric = { func: n => { return [d1, d2]; } }; } -var x206 = <() => Base[]>function() { return [d1, d2] }; -var x207 = <() => Base[]>function named() { return [d1, d2] }; -var x209 = <{ (): Base[]; }>function() { return [d1, d2] }; -var x210 = <{ (): Base[]; }>function named() { return [d1, d2] }; -var x211 = [d1, d2]; -var x212 = >[d1, d2]; -var x213 = <{ [n: number]: Base; }>[d1, d2]; -var x214 = <{n: Base[]; } >{ n: [d1, d2] }; -var x216 = >{ func: n => { return [d1, d2]; } }; -var x217 = (<() => Base[]>undefined) || function() { return [d1, d2] }; -var x218 = (<() => Base[]>undefined) || function named() { return [d1, d2] }; -var x219 = (<{ (): Base[]; }>undefined) || function() { return [d1, d2] }; -var x220 = (<{ (): Base[]; }>undefined) || function named() { return [d1, d2] }; -var x221 = (undefined) || [d1, d2]; -var x222 = (>undefined) || [d1, d2]; -var x223 = (<{ [n: number]: Base; }>undefined) || [d1, d2]; -var x224 = (<{n: Base[]; } >undefined) || { n: [d1, d2] }; -var x225: () => Base[]; x225 = () => [d1, d2]; -var x226: () => Base[]; x226 = function() { return [d1, d2] }; -var x227: () => Base[]; x227 = function named() { return [d1, d2] }; -var x228: { (): Base[]; }; x228 = () => [d1, d2]; -var x229: { (): Base[]; }; x229 = function() { return [d1, d2] }; -var x230: { (): Base[]; }; x230 = function named() { return [d1, d2] }; -var x231: Base[]; x231 = [d1, d2]; -var x232: Array; x232 = [d1, d2]; -var x233: { [n: number]: Base; }; x233 = [d1, d2]; -var x234: {n: Base[]; } ; x234 = { n: [d1, d2] }; -var x235: (s: Base[]) => any; x235 = n => { var n: Base[]; return null; }; -var x236: Genric; x236 = { func: n => { return [d1, d2]; } }; -var x237: { n: () => Base[]; } = { n: () => [d1, d2] }; -var x238: { n: () => Base[]; } = { n: function() { return [d1, d2] } }; -var x239: { n: () => Base[]; } = { n: function named() { return [d1, d2] } }; -var x240: { n: { (): Base[]; }; } = { n: () => [d1, d2] }; -var x241: { n: { (): Base[]; }; } = { n: function() { return [d1, d2] } }; -var x242: { n: { (): Base[]; }; } = { n: function named() { return [d1, d2] } }; -var x243: { n: Base[]; } = { n: [d1, d2] }; -var x244: { n: Array; } = { n: [d1, d2] }; -var x245: { n: { [n: number]: Base; }; } = { n: [d1, d2] }; -var x246: { n: {n: Base[]; } ; } = { n: { n: [d1, d2] } }; -var x247: { n: (s: Base[]) => any; } = { n: n => { var n: Base[]; return null; } }; -var x248: { n: Genric; } = { n: { func: n => { return [d1, d2]; } } }; -var x252: { (): Base[]; }[] = [() => [d1, d2]]; -var x253: { (): Base[]; }[] = [function() { return [d1, d2] }]; -var x254: { (): Base[]; }[] = [function named() { return [d1, d2] }]; -var x255: Base[][] = [[d1, d2]]; -var x256: Array[] = [[d1, d2]]; -var x257: { [n: number]: Base; }[] = [[d1, d2]]; -var x258: {n: Base[]; } [] = [{ n: [d1, d2] }]; -var x260: Genric[] = [{ func: n => { return [d1, d2]; } }]; -var x261: () => Base[] = function() { return [d1, d2] } || undefined; -var x262: () => Base[] = function named() { return [d1, d2] } || undefined; -var x263: { (): Base[]; } = function() { return [d1, d2] } || undefined; -var x264: { (): Base[]; } = function named() { return [d1, d2] } || undefined; -var x265: Base[] = [d1, d2] || undefined; -var x266: Array = [d1, d2] || undefined; -var x267: { [n: number]: Base; } = [d1, d2] || undefined; -var x268: {n: Base[]; } = { n: [d1, d2] } || undefined; -var x269: () => Base[] = undefined || function() { return [d1, d2] }; -var x270: () => Base[] = undefined || function named() { return [d1, d2] }; -var x271: { (): Base[]; } = undefined || function() { return [d1, d2] }; -var x272: { (): Base[]; } = undefined || function named() { return [d1, d2] }; -var x273: Base[] = undefined || [d1, d2]; -var x274: Array = undefined || [d1, d2]; -var x275: { [n: number]: Base; } = undefined || [d1, d2]; -var x276: {n: Base[]; } = undefined || { n: [d1, d2] }; -var x277: () => Base[] = function() { return [d1, d2] } || function() { return [d1, d2] }; -var x278: () => Base[] = function named() { return [d1, d2] } || function named() { return [d1, d2] }; -var x279: { (): Base[]; } = function() { return [d1, d2] } || function() { return [d1, d2] }; -var x280: { (): Base[]; } = function named() { return [d1, d2] } || function named() { return [d1, d2] }; -var x281: Base[] = [d1, d2] || [d1, d2]; -var x282: Array = [d1, d2] || [d1, d2]; -var x283: { [n: number]: Base; } = [d1, d2] || [d1, d2]; -var x284: {n: Base[]; } = { n: [d1, d2] } || { n: [d1, d2] }; -var x285: () => Base[] = true ? () => [d1, d2] : () => [d1, d2]; -var x286: () => Base[] = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; -var x287: () => Base[] = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; -var x288: { (): Base[]; } = true ? () => [d1, d2] : () => [d1, d2]; -var x289: { (): Base[]; } = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; -var x290: { (): Base[]; } = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; -var x291: Base[] = true ? [d1, d2] : [d1, d2]; -var x292: Array = true ? [d1, d2] : [d1, d2]; -var x293: { [n: number]: Base; } = true ? [d1, d2] : [d1, d2]; -var x294: {n: Base[]; } = true ? { n: [d1, d2] } : { n: [d1, d2] }; -var x295: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : n => { var n: Base[]; return null; }; -var x296: Genric = true ? { func: n => { return [d1, d2]; } } : { func: n => { return [d1, d2]; } }; -var x297: () => Base[] = true ? undefined : () => [d1, d2]; -var x298: () => Base[] = true ? undefined : function() { return [d1, d2] }; -var x299: () => Base[] = true ? undefined : function named() { return [d1, d2] }; -var x300: { (): Base[]; } = true ? undefined : () => [d1, d2]; -var x301: { (): Base[]; } = true ? undefined : function() { return [d1, d2] }; -var x302: { (): Base[]; } = true ? undefined : function named() { return [d1, d2] }; -var x303: Base[] = true ? undefined : [d1, d2]; -var x304: Array = true ? undefined : [d1, d2]; -var x305: { [n: number]: Base; } = true ? undefined : [d1, d2]; -var x306: {n: Base[]; } = true ? undefined : { n: [d1, d2] }; -var x307: (s: Base[]) => any = true ? undefined : n => { var n: Base[]; return null; }; -var x308: Genric = true ? undefined : { func: n => { return [d1, d2]; } }; -var x309: () => Base[] = true ? () => [d1, d2] : undefined; -var x310: () => Base[] = true ? function() { return [d1, d2] } : undefined; -var x311: () => Base[] = true ? function named() { return [d1, d2] } : undefined; -var x312: { (): Base[]; } = true ? () => [d1, d2] : undefined; -var x313: { (): Base[]; } = true ? function() { return [d1, d2] } : undefined; -var x314: { (): Base[]; } = true ? function named() { return [d1, d2] } : undefined; -var x315: Base[] = true ? [d1, d2] : undefined; -var x316: Array = true ? [d1, d2] : undefined; -var x317: { [n: number]: Base; } = true ? [d1, d2] : undefined; -var x318: {n: Base[]; } = true ? { n: [d1, d2] } : undefined; -var x319: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : undefined; -var x320: Genric = true ? { func: n => { return [d1, d2]; } } : undefined; -function x321(n: () => Base[]) { }; x321(() => [d1, d2]); -function x322(n: () => Base[]) { }; x322(function() { return [d1, d2] }); -function x323(n: () => Base[]) { }; x323(function named() { return [d1, d2] }); -function x324(n: { (): Base[]; }) { }; x324(() => [d1, d2]); -function x325(n: { (): Base[]; }) { }; x325(function() { return [d1, d2] }); -function x326(n: { (): Base[]; }) { }; x326(function named() { return [d1, d2] }); -function x327(n: Base[]) { }; x327([d1, d2]); -function x328(n: Array) { }; x328([d1, d2]); -function x329(n: { [n: number]: Base; }) { }; x329([d1, d2]); -function x330(n: {n: Base[]; } ) { }; x330({ n: [d1, d2] }); -function x331(n: (s: Base[]) => any) { }; x331(n => { var n: Base[]; return null; }); -function x332(n: Genric) { }; x332({ func: n => { return [d1, d2]; } }); -var x333 = (n: () => Base[]) => n; x333(() => [d1, d2]); -var x334 = (n: () => Base[]) => n; x334(function() { return [d1, d2] }); -var x335 = (n: () => Base[]) => n; x335(function named() { return [d1, d2] }); -var x336 = (n: { (): Base[]; }) => n; x336(() => [d1, d2]); -var x337 = (n: { (): Base[]; }) => n; x337(function() { return [d1, d2] }); -var x338 = (n: { (): Base[]; }) => n; x338(function named() { return [d1, d2] }); -var x339 = (n: Base[]) => n; x339([d1, d2]); -var x340 = (n: Array) => n; x340([d1, d2]); -var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); -var x342 = (n: {n: Base[]; } ) => n; x342({ n: [d1, d2] }); -var x343 = (n: (s: Base[]) => any) => n; x343(n => { var n: Base[]; return null; }); -var x344 = (n: Genric) => n; x344({ func: n => { return [d1, d2]; } }); -var x345 = function(n: () => Base[]) { }; x345(() => [d1, d2]); -var x346 = function(n: () => Base[]) { }; x346(function() { return [d1, d2] }); -var x347 = function(n: () => Base[]) { }; x347(function named() { return [d1, d2] }); -var x348 = function(n: { (): Base[]; }) { }; x348(() => [d1, d2]); -var x349 = function(n: { (): Base[]; }) { }; x349(function() { return [d1, d2] }); -var x350 = function(n: { (): Base[]; }) { }; x350(function named() { return [d1, d2] }); -var x351 = function(n: Base[]) { }; x351([d1, d2]); -var x352 = function(n: Array) { }; x352([d1, d2]); -var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); -var x354 = function(n: {n: Base[]; } ) { }; x354({ n: [d1, d2] }); -var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; return null; }); -var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); - -/// [Declarations] //// - - - -//// [generatedContextualTyping.d.ts] -declare class Base { - private p; -} -declare class Derived1 extends Base { - private m; -} -declare class Derived2 extends Base { - private n; -} -interface Genric { - func(n: T[]): any; -} -declare var b: invalid, d1: invalid, d2: invalid; -declare var x1: () => Base[]; -declare var x2: () => Base[]; -declare var x3: () => Base[]; -declare var x4: { - (): Base[]; -}; -declare var x5: { - (): Base[]; -}; -declare var x6: { - (): Base[]; -}; -declare var x7: Base[]; -declare var x8: Array; -declare var x9: { - [n: number]: Base; -}; -declare var x10: { - n: Base[]; -}; -declare var x11: (s: Base[]) => any; -declare var x12: Genric; -declare class x13 { - member: () => Base[]; -} -declare class x14 { - member: () => Base[]; -} -declare class x15 { - member: () => Base[]; -} -declare class x16 { - member: { - (): Base[]; - }; -} -declare class x17 { - member: { - (): Base[]; - }; -} -declare class x18 { - member: { - (): Base[]; - }; -} -declare class x19 { - member: Base[]; -} -declare class x20 { - member: Array; -} -declare class x21 { - member: { - [n: number]: Base; - }; -} -declare class x22 { - member: { - n: Base[]; - }; -} -declare class x23 { - member: (s: Base[]) => any; -} -declare class x24 { - member: Genric; -} -declare class x25 { - private member; -} -declare class x26 { - private member; -} -declare class x27 { - private member; -} -declare class x28 { - private member; -} -declare class x29 { - private member; -} -declare class x30 { - private member; -} -declare class x31 { - private member; -} -declare class x32 { - private member; -} -declare class x33 { - private member; -} -declare class x34 { - private member; -} -declare class x35 { - private member; -} -declare class x36 { - private member; -} -declare class x37 { - member: () => Base[]; -} -declare class x38 { - member: () => Base[]; -} -declare class x39 { - member: () => Base[]; -} -declare class x40 { - member: { - (): Base[]; - }; -} -declare class x41 { - member: { - (): Base[]; - }; -} -declare class x42 { - member: { - (): Base[]; - }; -} -declare class x43 { - member: Base[]; -} -declare class x44 { - member: Array; -} -declare class x45 { - member: { - [n: number]: Base; - }; -} -declare class x46 { - member: { - n: Base[]; - }; -} -declare class x47 { - member: (s: Base[]) => any; -} -declare class x48 { - member: Genric; -} -declare class x49 { - static member: () => Base[]; -} -declare class x50 { - static member: () => Base[]; -} -declare class x51 { - static member: () => Base[]; -} -declare class x52 { - static member: { - (): Base[]; - }; -} -declare class x53 { - static member: { - (): Base[]; - }; -} -declare class x54 { - static member: { - (): Base[]; - }; -} -declare class x55 { - static member: Base[]; -} -declare class x56 { - static member: Array; -} -declare class x57 { - static member: { - [n: number]: Base; - }; -} -declare class x58 { - static member: { - n: Base[]; - }; -} -declare class x59 { - static member: (s: Base[]) => any; -} -declare class x60 { - static member: Genric; -} -declare class x61 { - private static member; -} -declare class x62 { - private static member; -} -declare class x63 { - private static member; -} -declare class x64 { - private static member; -} -declare class x65 { - private static member; -} -declare class x66 { - private static member; -} -declare class x67 { - private static member; -} -declare class x68 { - private static member; -} -declare class x69 { - private static member; -} -declare class x70 { - private static member; -} -declare class x71 { - private static member; -} -declare class x72 { - private static member; -} -declare class x73 { - static member: () => Base[]; -} -declare class x74 { - static member: () => Base[]; -} -declare class x75 { - static member: () => Base[]; -} -declare class x76 { - static member: { - (): Base[]; - }; -} -declare class x77 { - static member: { - (): Base[]; - }; -} -declare class x78 { - static member: { - (): Base[]; - }; -} -declare class x79 { - static member: Base[]; -} -declare class x80 { - static member: Array; -} -declare class x81 { - static member: { - [n: number]: Base; - }; -} -declare class x82 { - static member: { - n: Base[]; - }; -} -declare class x83 { - static member: (s: Base[]) => any; -} -declare class x84 { - static member: Genric; -} -declare class x85 { - constructor(parm?: () => Base[]); -} -declare class x86 { - constructor(parm?: () => Base[]); -} -declare class x87 { - constructor(parm?: () => Base[]); -} -declare class x88 { - constructor(parm?: { - (): Base[]; - }); -} -declare class x89 { - constructor(parm?: { - (): Base[]; - }); -} -declare class x90 { - constructor(parm?: { - (): Base[]; - }); -} -declare class x91 { - constructor(parm?: Base[]); -} -declare class x92 { - constructor(parm?: Array); -} -declare class x93 { - constructor(parm?: { - [n: number]: Base; - }); -} -declare class x94 { - constructor(parm?: { - n: Base[]; - }); -} -declare class x95 { - constructor(parm?: (s: Base[]) => any); -} -declare class x96 { - constructor(parm?: Genric); -} -declare class x97 { - parm: () => Base[]; - constructor(parm?: () => Base[]); -} -declare class x98 { - parm: () => Base[]; - constructor(parm?: () => Base[]); -} -declare class x99 { - parm: () => Base[]; - constructor(parm?: () => Base[]); -} -declare class x100 { - parm: { - (): Base[]; - }; - constructor(parm?: { - (): Base[]; - }); -} -declare class x101 { - parm: { - (): Base[]; - }; - constructor(parm?: { - (): Base[]; - }); -} -declare class x102 { - parm: { - (): Base[]; - }; - constructor(parm?: { - (): Base[]; - }); -} -declare class x103 { - parm: Base[]; - constructor(parm?: Base[]); -} -declare class x104 { - parm: Array; - constructor(parm?: Array); -} -declare class x105 { - parm: { - [n: number]: Base; - }; - constructor(parm?: { - [n: number]: Base; - }); -} -declare class x106 { - parm: { - n: Base[]; - }; - constructor(parm?: { - n: Base[]; - }); -} -declare class x107 { - parm: (s: Base[]) => any; - constructor(parm?: (s: Base[]) => any); -} -declare class x108 { - parm: Genric; - constructor(parm?: Genric); -} -declare class x109 { - private parm; - constructor(parm?: () => Base[]); -} -declare class x110 { - private parm; - constructor(parm?: () => Base[]); -} -declare class x111 { - private parm; - constructor(parm?: () => Base[]); -} -declare class x112 { - private parm; - constructor(parm?: { - (): Base[]; - }); -} -declare class x113 { - private parm; - constructor(parm?: { - (): Base[]; - }); -} -declare class x114 { - private parm; - constructor(parm?: { - (): Base[]; - }); -} -declare class x115 { - private parm; - constructor(parm?: Base[]); -} -declare class x116 { - private parm; - constructor(parm?: Array); -} -declare class x117 { - private parm; - constructor(parm?: { - [n: number]: Base; - }); -} -declare class x118 { - private parm; - constructor(parm?: { - n: Base[]; - }); -} -declare class x119 { - private parm; - constructor(parm?: (s: Base[]) => any); -} -declare class x120 { - private parm; - constructor(parm?: Genric); -} -declare function x121(parm?: () => Base[]): invalid; -declare function x122(parm?: () => Base[]): invalid; -declare function x123(parm?: () => Base[]): invalid; -declare function x124(parm?: { - (): Base[]; -}): invalid; -declare function x125(parm?: { - (): Base[]; -}): invalid; -declare function x126(parm?: { - (): Base[]; -}): invalid; -declare function x127(parm?: Base[]): invalid; -declare function x128(parm?: Array): invalid; -declare function x129(parm?: { - [n: number]: Base; -}): invalid; -declare function x130(parm?: { - n: Base[]; -}): invalid; -declare function x131(parm?: (s: Base[]) => any): invalid; -declare function x132(parm?: Genric): invalid; -declare function x133(): () => Base[]; -declare function x134(): () => Base[]; -declare function x135(): () => Base[]; -declare function x136(): { - (): Base[]; -}; -declare function x137(): { - (): Base[]; -}; -declare function x138(): { - (): Base[]; -}; -declare function x139(): Base[]; -declare function x140(): Array; -declare function x141(): { - [n: number]: Base; -}; -declare function x142(): { - n: Base[]; -}; -declare function x143(): (s: Base[]) => any; -declare function x144(): Genric; -declare function x145(): () => Base[]; -declare function x146(): () => Base[]; -declare function x147(): () => Base[]; -declare function x148(): { - (): Base[]; -}; -declare function x149(): { - (): Base[]; -}; -declare function x150(): { - (): Base[]; -}; -declare function x151(): Base[]; -declare function x152(): Array; -declare function x153(): { - [n: number]: Base; -}; -declare function x154(): { - n: Base[]; -}; -declare function x155(): (s: Base[]) => any; -declare function x156(): Genric; -declare var x157: () => () => Base[]; -declare var x158: () => () => Base[]; -declare var x159: () => () => Base[]; -declare var x160: () => { - (): Base[]; -}; -declare var x161: () => { - (): Base[]; -}; -declare var x162: () => { - (): Base[]; -}; -declare var x163: () => Base[]; -declare var x164: () => Array; -declare var x165: () => { - [n: number]: Base; -}; -declare var x166: () => { - n: Base[]; -}; -declare var x167: () => (s: Base[]) => any; -declare var x168: () => Genric; -declare var x169: () => () => Base[]; -declare var x170: () => () => Base[]; -declare var x171: () => () => Base[]; -declare var x172: () => { - (): Base[]; -}; -declare var x173: () => { - (): Base[]; -}; -declare var x174: () => { - (): Base[]; -}; -declare var x175: () => Base[]; -declare var x176: () => Array; -declare var x177: () => { - [n: number]: Base; -}; -declare var x178: () => { - n: Base[]; -}; -declare var x179: () => (s: Base[]) => any; -declare var x180: () => Genric; -declare namespace x181 { } -declare namespace x182 { } -declare namespace x183 { } -declare namespace x184 { } -declare namespace x185 { } -declare namespace x186 { } -declare namespace x187 { } -declare namespace x188 { } -declare namespace x189 { } -declare namespace x190 { } -declare namespace x191 { } -declare namespace x192 { } -declare namespace x193 { - var t: () => Base[]; -} -declare namespace x194 { - var t: () => Base[]; -} -declare namespace x195 { - var t: () => Base[]; -} -declare namespace x196 { - var t: { - (): Base[]; - }; -} -declare namespace x197 { - var t: { - (): Base[]; - }; -} -declare namespace x198 { - var t: { - (): Base[]; - }; -} -declare namespace x199 { - var t: Base[]; -} -declare namespace x200 { - var t: Array; -} -declare namespace x201 { - var t: { - [n: number]: Base; - }; -} -declare namespace x202 { - var t: { - n: Base[]; - }; -} -declare namespace x203 { - var t: (s: Base[]) => any; -} -declare namespace x204 { - var t: Genric; -} -declare var x206: () => Base[]; -declare var x207: () => Base[]; -declare var x209: () => Base[]; -declare var x210: () => Base[]; -declare var x211: Base[]; -declare var x212: Base[]; -declare var x213: { - [n: number]: Base; -}; -declare var x214: { - n: Base[]; -}; -declare var x216: Genric; -declare var x217: invalid; -declare var x218: invalid; -declare var x219: invalid; -declare var x220: invalid; -declare var x221: invalid; -declare var x222: invalid; -declare var x223: invalid; -declare var x224: invalid; -declare var x225: () => Base[]; -declare var x226: () => Base[]; -declare var x227: () => Base[]; -declare var x228: { - (): Base[]; -}; -declare var x229: { - (): Base[]; -}; -declare var x230: { - (): Base[]; -}; -declare var x231: Base[]; -declare var x232: Array; -declare var x233: { - [n: number]: Base; -}; -declare var x234: { - n: Base[]; -}; -declare var x235: (s: Base[]) => any; -declare var x236: Genric; -declare var x237: { - n: () => Base[]; -}; -declare var x238: { - n: () => Base[]; -}; -declare var x239: { - n: () => Base[]; -}; -declare var x240: { - n: { - (): Base[]; - }; -}; -declare var x241: { - n: { - (): Base[]; - }; -}; -declare var x242: { - n: { - (): Base[]; - }; -}; -declare var x243: { - n: Base[]; -}; -declare var x244: { - n: Array; -}; -declare var x245: { - n: { - [n: number]: Base; - }; -}; -declare var x246: { - n: { - n: Base[]; - }; -}; -declare var x247: { - n: (s: Base[]) => any; -}; -declare var x248: { - n: Genric; -}; -declare var x252: { - (): Base[]; -}[]; -declare var x253: { - (): Base[]; -}[]; -declare var x254: { - (): Base[]; -}[]; -declare var x255: Base[][]; -declare var x256: Array[]; -declare var x257: { - [n: number]: Base; -}[]; -declare var x258: { - n: Base[]; -}[]; -declare var x260: Genric[]; -declare var x261: () => Base[]; -declare var x262: () => Base[]; -declare var x263: { - (): Base[]; -}; -declare var x264: { - (): Base[]; -}; -declare var x265: Base[]; -declare var x266: Array; -declare var x267: { - [n: number]: Base; -}; -declare var x268: { - n: Base[]; -}; -declare var x269: () => Base[]; -declare var x270: () => Base[]; -declare var x271: { - (): Base[]; -}; -declare var x272: { - (): Base[]; -}; -declare var x273: Base[]; -declare var x274: Array; -declare var x275: { - [n: number]: Base; -}; -declare var x276: { - n: Base[]; -}; -declare var x277: () => Base[]; -declare var x278: () => Base[]; -declare var x279: { - (): Base[]; -}; -declare var x280: { - (): Base[]; -}; -declare var x281: Base[]; -declare var x282: Array; -declare var x283: { - [n: number]: Base; -}; -declare var x284: { - n: Base[]; -}; -declare var x285: () => Base[]; -declare var x286: () => Base[]; -declare var x287: () => Base[]; -declare var x288: { - (): Base[]; -}; -declare var x289: { - (): Base[]; -}; -declare var x290: { - (): Base[]; -}; -declare var x291: Base[]; -declare var x292: Array; -declare var x293: { - [n: number]: Base; -}; -declare var x294: { - n: Base[]; -}; -declare var x295: (s: Base[]) => any; -declare var x296: Genric; -declare var x297: () => Base[]; -declare var x298: () => Base[]; -declare var x299: () => Base[]; -declare var x300: { - (): Base[]; -}; -declare var x301: { - (): Base[]; -}; -declare var x302: { - (): Base[]; -}; -declare var x303: Base[]; -declare var x304: Array; -declare var x305: { - [n: number]: Base; -}; -declare var x306: { - n: Base[]; -}; -declare var x307: (s: Base[]) => any; -declare var x308: Genric; -declare var x309: () => Base[]; -declare var x310: () => Base[]; -declare var x311: () => Base[]; -declare var x312: { - (): Base[]; -}; -declare var x313: { - (): Base[]; -}; -declare var x314: { - (): Base[]; -}; -declare var x315: Base[]; -declare var x316: Array; -declare var x317: { - [n: number]: Base; -}; -declare var x318: { - n: Base[]; -}; -declare var x319: (s: Base[]) => any; -declare var x320: Genric; -declare function x321(n: () => Base[]): invalid; -declare function x322(n: () => Base[]): invalid; -declare function x323(n: () => Base[]): invalid; -declare function x324(n: { - (): Base[]; -}): invalid; -declare function x325(n: { - (): Base[]; -}): invalid; -declare function x326(n: { - (): Base[]; -}): invalid; -declare function x327(n: Base[]): invalid; -declare function x328(n: Array): invalid; -declare function x329(n: { - [n: number]: Base; -}): invalid; -declare function x330(n: { - n: Base[]; -}): invalid; -declare function x331(n: (s: Base[]) => any): invalid; -declare function x332(n: Genric): invalid; -declare var x333: (n: () => Base[]) => invalid; -declare var x334: (n: () => Base[]) => invalid; -declare var x335: (n: () => Base[]) => invalid; -declare var x336: (n: { - (): Base[]; -}) => invalid; -declare var x337: (n: { - (): Base[]; -}) => invalid; -declare var x338: (n: { - (): Base[]; -}) => invalid; -declare var x339: (n: Base[]) => invalid; -declare var x340: (n: Array) => invalid; -declare var x341: (n: { - [n: number]: Base; -}) => invalid; -declare var x342: (n: { - n: Base[]; -}) => invalid; -declare var x343: (n: (s: Base[]) => any) => invalid; -declare var x344: (n: Genric) => invalid; -declare var x345: (n: () => Base[]) => invalid; -declare var x346: (n: () => Base[]) => invalid; -declare var x347: (n: () => Base[]) => invalid; -declare var x348: (n: { - (): Base[]; -}) => invalid; -declare var x349: (n: { - (): Base[]; -}) => invalid; -declare var x350: (n: { - (): Base[]; -}) => invalid; -declare var x351: (n: Base[]) => invalid; -declare var x352: (n: Array) => invalid; -declare var x353: (n: { - [n: number]: Base; -}) => invalid; -declare var x354: (n: { - n: Base[]; -}) => invalid; -declare var x355: (n: (s: Base[]) => any) => invalid; -declare var x356: (n: Genric) => invalid; - -/// [Errors] //// - -generatedContextualTyping.ts(5,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(5,26): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(5,47): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(126,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(127,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(128,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(129,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(130,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(131,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(132,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(133,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(134,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(135,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(136,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(137,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(219,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(220,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(221,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(222,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(223,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(224,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(225,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(226,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(319,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(320,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(321,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(322,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(323,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(324,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(325,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(326,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(327,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(328,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(329,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(330,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(331,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(332,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(333,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(334,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(335,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(336,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(337,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(338,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(339,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(340,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(341,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(342,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(343,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(344,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(345,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(346,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(347,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(348,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(349,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(350,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(351,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(352,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(353,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -generatedContextualTyping.ts(354,12): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. - - -==== generatedContextualTyping.ts (59 errors) ==== - class Base { private p; } - class Derived1 extends Base { private m; } - class Derived2 extends Base { private n; } - interface Genric { func(n: T[]); } - var b = new Base(), d1 = new Derived1(), d2 = new Derived2(); - ~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:5:5: Add a type annotation to the variable b. - ~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:5:21: Add a type annotation to the variable d1. - ~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:5:42: Add a type annotation to the variable d2. - var x1: () => Base[] = () => [d1, d2]; - var x2: () => Base[] = function() { return [d1, d2] }; - var x3: () => Base[] = function named() { return [d1, d2] }; - var x4: { (): Base[]; } = () => [d1, d2]; - var x5: { (): Base[]; } = function() { return [d1, d2] }; - var x6: { (): Base[]; } = function named() { return [d1, d2] }; - var x7: Base[] = [d1, d2]; - var x8: Array = [d1, d2]; - var x9: { [n: number]: Base; } = [d1, d2]; - var x10: {n: Base[]; } = { n: [d1, d2] }; - var x11: (s: Base[]) => any = n => { var n: Base[]; return null; }; - var x12: Genric = { func: n => { return [d1, d2]; } }; - class x13 { member: () => Base[] = () => [d1, d2] } - class x14 { member: () => Base[] = function() { return [d1, d2] } } - class x15 { member: () => Base[] = function named() { return [d1, d2] } } - class x16 { member: { (): Base[]; } = () => [d1, d2] } - class x17 { member: { (): Base[]; } = function() { return [d1, d2] } } - class x18 { member: { (): Base[]; } = function named() { return [d1, d2] } } - class x19 { member: Base[] = [d1, d2] } - class x20 { member: Array = [d1, d2] } - class x21 { member: { [n: number]: Base; } = [d1, d2] } - class x22 { member: {n: Base[]; } = { n: [d1, d2] } } - class x23 { member: (s: Base[]) => any = n => { var n: Base[]; return null; } } - class x24 { member: Genric = { func: n => { return [d1, d2]; } } } - class x25 { private member: () => Base[] = () => [d1, d2] } - class x26 { private member: () => Base[] = function() { return [d1, d2] } } - class x27 { private member: () => Base[] = function named() { return [d1, d2] } } - class x28 { private member: { (): Base[]; } = () => [d1, d2] } - class x29 { private member: { (): Base[]; } = function() { return [d1, d2] } } - class x30 { private member: { (): Base[]; } = function named() { return [d1, d2] } } - class x31 { private member: Base[] = [d1, d2] } - class x32 { private member: Array = [d1, d2] } - class x33 { private member: { [n: number]: Base; } = [d1, d2] } - class x34 { private member: {n: Base[]; } = { n: [d1, d2] } } - class x35 { private member: (s: Base[]) => any = n => { var n: Base[]; return null; } } - class x36 { private member: Genric = { func: n => { return [d1, d2]; } } } - class x37 { public member: () => Base[] = () => [d1, d2] } - class x38 { public member: () => Base[] = function() { return [d1, d2] } } - class x39 { public member: () => Base[] = function named() { return [d1, d2] } } - class x40 { public member: { (): Base[]; } = () => [d1, d2] } - class x41 { public member: { (): Base[]; } = function() { return [d1, d2] } } - class x42 { public member: { (): Base[]; } = function named() { return [d1, d2] } } - class x43 { public member: Base[] = [d1, d2] } - class x44 { public member: Array = [d1, d2] } - class x45 { public member: { [n: number]: Base; } = [d1, d2] } - class x46 { public member: {n: Base[]; } = { n: [d1, d2] } } - class x47 { public member: (s: Base[]) => any = n => { var n: Base[]; return null; } } - class x48 { public member: Genric = { func: n => { return [d1, d2]; } } } - class x49 { static member: () => Base[] = () => [d1, d2] } - class x50 { static member: () => Base[] = function() { return [d1, d2] } } - class x51 { static member: () => Base[] = function named() { return [d1, d2] } } - class x52 { static member: { (): Base[]; } = () => [d1, d2] } - class x53 { static member: { (): Base[]; } = function() { return [d1, d2] } } - class x54 { static member: { (): Base[]; } = function named() { return [d1, d2] } } - class x55 { static member: Base[] = [d1, d2] } - class x56 { static member: Array = [d1, d2] } - class x57 { static member: { [n: number]: Base; } = [d1, d2] } - class x58 { static member: {n: Base[]; } = { n: [d1, d2] } } - class x59 { static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } - class x60 { static member: Genric = { func: n => { return [d1, d2]; } } } - class x61 { private static member: () => Base[] = () => [d1, d2] } - class x62 { private static member: () => Base[] = function() { return [d1, d2] } } - class x63 { private static member: () => Base[] = function named() { return [d1, d2] } } - class x64 { private static member: { (): Base[]; } = () => [d1, d2] } - class x65 { private static member: { (): Base[]; } = function() { return [d1, d2] } } - class x66 { private static member: { (): Base[]; } = function named() { return [d1, d2] } } - class x67 { private static member: Base[] = [d1, d2] } - class x68 { private static member: Array = [d1, d2] } - class x69 { private static member: { [n: number]: Base; } = [d1, d2] } - class x70 { private static member: {n: Base[]; } = { n: [d1, d2] } } - class x71 { private static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } - class x72 { private static member: Genric = { func: n => { return [d1, d2]; } } } - class x73 { public static member: () => Base[] = () => [d1, d2] } - class x74 { public static member: () => Base[] = function() { return [d1, d2] } } - class x75 { public static member: () => Base[] = function named() { return [d1, d2] } } - class x76 { public static member: { (): Base[]; } = () => [d1, d2] } - class x77 { public static member: { (): Base[]; } = function() { return [d1, d2] } } - class x78 { public static member: { (): Base[]; } = function named() { return [d1, d2] } } - class x79 { public static member: Base[] = [d1, d2] } - class x80 { public static member: Array = [d1, d2] } - class x81 { public static member: { [n: number]: Base; } = [d1, d2] } - class x82 { public static member: {n: Base[]; } = { n: [d1, d2] } } - class x83 { public static member: (s: Base[]) => any = n => { var n: Base[]; return null; } } - class x84 { public static member: Genric = { func: n => { return [d1, d2]; } } } - class x85 { constructor(parm: () => Base[] = () => [d1, d2]) { } } - class x86 { constructor(parm: () => Base[] = function() { return [d1, d2] }) { } } - class x87 { constructor(parm: () => Base[] = function named() { return [d1, d2] }) { } } - class x88 { constructor(parm: { (): Base[]; } = () => [d1, d2]) { } } - class x89 { constructor(parm: { (): Base[]; } = function() { return [d1, d2] }) { } } - class x90 { constructor(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } - class x91 { constructor(parm: Base[] = [d1, d2]) { } } - class x92 { constructor(parm: Array = [d1, d2]) { } } - class x93 { constructor(parm: { [n: number]: Base; } = [d1, d2]) { } } - class x94 { constructor(parm: {n: Base[]; } = { n: [d1, d2] }) { } } - class x95 { constructor(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } - class x96 { constructor(parm: Genric = { func: n => { return [d1, d2]; } }) { } } - class x97 { constructor(public parm: () => Base[] = () => [d1, d2]) { } } - class x98 { constructor(public parm: () => Base[] = function() { return [d1, d2] }) { } } - class x99 { constructor(public parm: () => Base[] = function named() { return [d1, d2] }) { } } - class x100 { constructor(public parm: { (): Base[]; } = () => [d1, d2]) { } } - class x101 { constructor(public parm: { (): Base[]; } = function() { return [d1, d2] }) { } } - class x102 { constructor(public parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } - class x103 { constructor(public parm: Base[] = [d1, d2]) { } } - class x104 { constructor(public parm: Array = [d1, d2]) { } } - class x105 { constructor(public parm: { [n: number]: Base; } = [d1, d2]) { } } - class x106 { constructor(public parm: {n: Base[]; } = { n: [d1, d2] }) { } } - class x107 { constructor(public parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } - class x108 { constructor(public parm: Genric = { func: n => { return [d1, d2]; } }) { } } - class x109 { constructor(private parm: () => Base[] = () => [d1, d2]) { } } - class x110 { constructor(private parm: () => Base[] = function() { return [d1, d2] }) { } } - class x111 { constructor(private parm: () => Base[] = function named() { return [d1, d2] }) { } } - class x112 { constructor(private parm: { (): Base[]; } = () => [d1, d2]) { } } - class x113 { constructor(private parm: { (): Base[]; } = function() { return [d1, d2] }) { } } - class x114 { constructor(private parm: { (): Base[]; } = function named() { return [d1, d2] }) { } } - class x115 { constructor(private parm: Base[] = [d1, d2]) { } } - class x116 { constructor(private parm: Array = [d1, d2]) { } } - class x117 { constructor(private parm: { [n: number]: Base; } = [d1, d2]) { } } - class x118 { constructor(private parm: {n: Base[]; } = { n: [d1, d2] }) { } } - class x119 { constructor(private parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } } - class x120 { constructor(private parm: Genric = { func: n => { return [d1, d2]; } }) { } } - function x121(parm: () => Base[] = () => [d1, d2]) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:126:10: Add a return type to the function declaration. - function x122(parm: () => Base[] = function() { return [d1, d2] }) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:127:10: Add a return type to the function declaration. - function x123(parm: () => Base[] = function named() { return [d1, d2] }) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:128:10: Add a return type to the function declaration. - function x124(parm: { (): Base[]; } = () => [d1, d2]) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:129:10: Add a return type to the function declaration. - function x125(parm: { (): Base[]; } = function() { return [d1, d2] }) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:130:10: Add a return type to the function declaration. - function x126(parm: { (): Base[]; } = function named() { return [d1, d2] }) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:131:10: Add a return type to the function declaration. - function x127(parm: Base[] = [d1, d2]) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:132:10: Add a return type to the function declaration. - function x128(parm: Array = [d1, d2]) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:133:10: Add a return type to the function declaration. - function x129(parm: { [n: number]: Base; } = [d1, d2]) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:134:10: Add a return type to the function declaration. - function x130(parm: {n: Base[]; } = { n: [d1, d2] }) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:135:10: Add a return type to the function declaration. - function x131(parm: (s: Base[]) => any = n => { var n: Base[]; return null; }) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:136:10: Add a return type to the function declaration. - function x132(parm: Genric = { func: n => { return [d1, d2]; } }) { } - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:137:10: Add a return type to the function declaration. - function x133(): () => Base[] { return () => [d1, d2]; } - function x134(): () => Base[] { return function() { return [d1, d2] }; } - function x135(): () => Base[] { return function named() { return [d1, d2] }; } - function x136(): { (): Base[]; } { return () => [d1, d2]; } - function x137(): { (): Base[]; } { return function() { return [d1, d2] }; } - function x138(): { (): Base[]; } { return function named() { return [d1, d2] }; } - function x139(): Base[] { return [d1, d2]; } - function x140(): Array { return [d1, d2]; } - function x141(): { [n: number]: Base; } { return [d1, d2]; } - function x142(): {n: Base[]; } { return { n: [d1, d2] }; } - function x143(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; } - function x144(): Genric { return { func: n => { return [d1, d2]; } }; } - function x145(): () => Base[] { return () => [d1, d2]; return () => [d1, d2]; } - function x146(): () => Base[] { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } - function x147(): () => Base[] { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } - function x148(): { (): Base[]; } { return () => [d1, d2]; return () => [d1, d2]; } - function x149(): { (): Base[]; } { return function() { return [d1, d2] }; return function() { return [d1, d2] }; } - function x150(): { (): Base[]; } { return function named() { return [d1, d2] }; return function named() { return [d1, d2] }; } - function x151(): Base[] { return [d1, d2]; return [d1, d2]; } - function x152(): Array { return [d1, d2]; return [d1, d2]; } - function x153(): { [n: number]: Base; } { return [d1, d2]; return [d1, d2]; } - function x154(): {n: Base[]; } { return { n: [d1, d2] }; return { n: [d1, d2] }; } - function x155(): (s: Base[]) => any { return n => { var n: Base[]; return null; }; return n => { var n: Base[]; return null; }; } - function x156(): Genric { return { func: n => { return [d1, d2]; } }; return { func: n => { return [d1, d2]; } }; } - var x157: () => () => Base[] = () => { return () => [d1, d2]; }; - var x158: () => () => Base[] = () => { return function() { return [d1, d2] }; }; - var x159: () => () => Base[] = () => { return function named() { return [d1, d2] }; }; - var x160: () => { (): Base[]; } = () => { return () => [d1, d2]; }; - var x161: () => { (): Base[]; } = () => { return function() { return [d1, d2] }; }; - var x162: () => { (): Base[]; } = () => { return function named() { return [d1, d2] }; }; - var x163: () => Base[] = () => { return [d1, d2]; }; - var x164: () => Array = () => { return [d1, d2]; }; - var x165: () => { [n: number]: Base; } = () => { return [d1, d2]; }; - var x166: () => {n: Base[]; } = () => { return { n: [d1, d2] }; }; - var x167: () => (s: Base[]) => any = () => { return n => { var n: Base[]; return null; }; }; - var x168: () => Genric = () => { return { func: n => { return [d1, d2]; } }; }; - var x169: () => () => Base[] = function() { return () => [d1, d2]; }; - var x170: () => () => Base[] = function() { return function() { return [d1, d2] }; }; - var x171: () => () => Base[] = function() { return function named() { return [d1, d2] }; }; - var x172: () => { (): Base[]; } = function() { return () => [d1, d2]; }; - var x173: () => { (): Base[]; } = function() { return function() { return [d1, d2] }; }; - var x174: () => { (): Base[]; } = function() { return function named() { return [d1, d2] }; }; - var x175: () => Base[] = function() { return [d1, d2]; }; - var x176: () => Array = function() { return [d1, d2]; }; - var x177: () => { [n: number]: Base; } = function() { return [d1, d2]; }; - var x178: () => {n: Base[]; } = function() { return { n: [d1, d2] }; }; - var x179: () => (s: Base[]) => any = function() { return n => { var n: Base[]; return null; }; }; - var x180: () => Genric = function() { return { func: n => { return [d1, d2]; } }; }; - module x181 { var t: () => Base[] = () => [d1, d2]; } - module x182 { var t: () => Base[] = function() { return [d1, d2] }; } - module x183 { var t: () => Base[] = function named() { return [d1, d2] }; } - module x184 { var t: { (): Base[]; } = () => [d1, d2]; } - module x185 { var t: { (): Base[]; } = function() { return [d1, d2] }; } - module x186 { var t: { (): Base[]; } = function named() { return [d1, d2] }; } - module x187 { var t: Base[] = [d1, d2]; } - module x188 { var t: Array = [d1, d2]; } - module x189 { var t: { [n: number]: Base; } = [d1, d2]; } - module x190 { var t: {n: Base[]; } = { n: [d1, d2] }; } - module x191 { var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } - module x192 { var t: Genric = { func: n => { return [d1, d2]; } }; } - module x193 { export var t: () => Base[] = () => [d1, d2]; } - module x194 { export var t: () => Base[] = function() { return [d1, d2] }; } - module x195 { export var t: () => Base[] = function named() { return [d1, d2] }; } - module x196 { export var t: { (): Base[]; } = () => [d1, d2]; } - module x197 { export var t: { (): Base[]; } = function() { return [d1, d2] }; } - module x198 { export var t: { (): Base[]; } = function named() { return [d1, d2] }; } - module x199 { export var t: Base[] = [d1, d2]; } - module x200 { export var t: Array = [d1, d2]; } - module x201 { export var t: { [n: number]: Base; } = [d1, d2]; } - module x202 { export var t: {n: Base[]; } = { n: [d1, d2] }; } - module x203 { export var t: (s: Base[]) => any = n => { var n: Base[]; return null; }; } - module x204 { export var t: Genric = { func: n => { return [d1, d2]; } }; } - var x206 = <() => Base[]>function() { return [d1, d2] }; - var x207 = <() => Base[]>function named() { return [d1, d2] }; - var x209 = <{ (): Base[]; }>function() { return [d1, d2] }; - var x210 = <{ (): Base[]; }>function named() { return [d1, d2] }; - var x211 = [d1, d2]; - var x212 = >[d1, d2]; - var x213 = <{ [n: number]: Base; }>[d1, d2]; - var x214 = <{n: Base[]; } >{ n: [d1, d2] }; - var x216 = >{ func: n => { return [d1, d2]; } }; - var x217 = (<() => Base[]>undefined) || function() { return [d1, d2] }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:219:5: Add a type annotation to the variable x217. - var x218 = (<() => Base[]>undefined) || function named() { return [d1, d2] }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:220:5: Add a type annotation to the variable x218. - var x219 = (<{ (): Base[]; }>undefined) || function() { return [d1, d2] }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:221:5: Add a type annotation to the variable x219. - var x220 = (<{ (): Base[]; }>undefined) || function named() { return [d1, d2] }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:222:5: Add a type annotation to the variable x220. - var x221 = (undefined) || [d1, d2]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:223:5: Add a type annotation to the variable x221. - var x222 = (>undefined) || [d1, d2]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:224:5: Add a type annotation to the variable x222. - var x223 = (<{ [n: number]: Base; }>undefined) || [d1, d2]; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:225:5: Add a type annotation to the variable x223. - var x224 = (<{n: Base[]; } >undefined) || { n: [d1, d2] }; - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:226:5: Add a type annotation to the variable x224. - var x225: () => Base[]; x225 = () => [d1, d2]; - var x226: () => Base[]; x226 = function() { return [d1, d2] }; - var x227: () => Base[]; x227 = function named() { return [d1, d2] }; - var x228: { (): Base[]; }; x228 = () => [d1, d2]; - var x229: { (): Base[]; }; x229 = function() { return [d1, d2] }; - var x230: { (): Base[]; }; x230 = function named() { return [d1, d2] }; - var x231: Base[]; x231 = [d1, d2]; - var x232: Array; x232 = [d1, d2]; - var x233: { [n: number]: Base; }; x233 = [d1, d2]; - var x234: {n: Base[]; } ; x234 = { n: [d1, d2] }; - var x235: (s: Base[]) => any; x235 = n => { var n: Base[]; return null; }; - var x236: Genric; x236 = { func: n => { return [d1, d2]; } }; - var x237: { n: () => Base[]; } = { n: () => [d1, d2] }; - var x238: { n: () => Base[]; } = { n: function() { return [d1, d2] } }; - var x239: { n: () => Base[]; } = { n: function named() { return [d1, d2] } }; - var x240: { n: { (): Base[]; }; } = { n: () => [d1, d2] }; - var x241: { n: { (): Base[]; }; } = { n: function() { return [d1, d2] } }; - var x242: { n: { (): Base[]; }; } = { n: function named() { return [d1, d2] } }; - var x243: { n: Base[]; } = { n: [d1, d2] }; - var x244: { n: Array; } = { n: [d1, d2] }; - var x245: { n: { [n: number]: Base; }; } = { n: [d1, d2] }; - var x246: { n: {n: Base[]; } ; } = { n: { n: [d1, d2] } }; - var x247: { n: (s: Base[]) => any; } = { n: n => { var n: Base[]; return null; } }; - var x248: { n: Genric; } = { n: { func: n => { return [d1, d2]; } } }; - var x252: { (): Base[]; }[] = [() => [d1, d2]]; - var x253: { (): Base[]; }[] = [function() { return [d1, d2] }]; - var x254: { (): Base[]; }[] = [function named() { return [d1, d2] }]; - var x255: Base[][] = [[d1, d2]]; - var x256: Array[] = [[d1, d2]]; - var x257: { [n: number]: Base; }[] = [[d1, d2]]; - var x258: {n: Base[]; } [] = [{ n: [d1, d2] }]; - var x260: Genric[] = [{ func: n => { return [d1, d2]; } }]; - var x261: () => Base[] = function() { return [d1, d2] } || undefined; - var x262: () => Base[] = function named() { return [d1, d2] } || undefined; - var x263: { (): Base[]; } = function() { return [d1, d2] } || undefined; - var x264: { (): Base[]; } = function named() { return [d1, d2] } || undefined; - var x265: Base[] = [d1, d2] || undefined; - var x266: Array = [d1, d2] || undefined; - var x267: { [n: number]: Base; } = [d1, d2] || undefined; - var x268: {n: Base[]; } = { n: [d1, d2] } || undefined; - var x269: () => Base[] = undefined || function() { return [d1, d2] }; - var x270: () => Base[] = undefined || function named() { return [d1, d2] }; - var x271: { (): Base[]; } = undefined || function() { return [d1, d2] }; - var x272: { (): Base[]; } = undefined || function named() { return [d1, d2] }; - var x273: Base[] = undefined || [d1, d2]; - var x274: Array = undefined || [d1, d2]; - var x275: { [n: number]: Base; } = undefined || [d1, d2]; - var x276: {n: Base[]; } = undefined || { n: [d1, d2] }; - var x277: () => Base[] = function() { return [d1, d2] } || function() { return [d1, d2] }; - var x278: () => Base[] = function named() { return [d1, d2] } || function named() { return [d1, d2] }; - var x279: { (): Base[]; } = function() { return [d1, d2] } || function() { return [d1, d2] }; - var x280: { (): Base[]; } = function named() { return [d1, d2] } || function named() { return [d1, d2] }; - var x281: Base[] = [d1, d2] || [d1, d2]; - var x282: Array = [d1, d2] || [d1, d2]; - var x283: { [n: number]: Base; } = [d1, d2] || [d1, d2]; - var x284: {n: Base[]; } = { n: [d1, d2] } || { n: [d1, d2] }; - var x285: () => Base[] = true ? () => [d1, d2] : () => [d1, d2]; - var x286: () => Base[] = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; - var x287: () => Base[] = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; - var x288: { (): Base[]; } = true ? () => [d1, d2] : () => [d1, d2]; - var x289: { (): Base[]; } = true ? function() { return [d1, d2] } : function() { return [d1, d2] }; - var x290: { (): Base[]; } = true ? function named() { return [d1, d2] } : function named() { return [d1, d2] }; - var x291: Base[] = true ? [d1, d2] : [d1, d2]; - var x292: Array = true ? [d1, d2] : [d1, d2]; - var x293: { [n: number]: Base; } = true ? [d1, d2] : [d1, d2]; - var x294: {n: Base[]; } = true ? { n: [d1, d2] } : { n: [d1, d2] }; - var x295: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : n => { var n: Base[]; return null; }; - var x296: Genric = true ? { func: n => { return [d1, d2]; } } : { func: n => { return [d1, d2]; } }; - var x297: () => Base[] = true ? undefined : () => [d1, d2]; - var x298: () => Base[] = true ? undefined : function() { return [d1, d2] }; - var x299: () => Base[] = true ? undefined : function named() { return [d1, d2] }; - var x300: { (): Base[]; } = true ? undefined : () => [d1, d2]; - var x301: { (): Base[]; } = true ? undefined : function() { return [d1, d2] }; - var x302: { (): Base[]; } = true ? undefined : function named() { return [d1, d2] }; - var x303: Base[] = true ? undefined : [d1, d2]; - var x304: Array = true ? undefined : [d1, d2]; - var x305: { [n: number]: Base; } = true ? undefined : [d1, d2]; - var x306: {n: Base[]; } = true ? undefined : { n: [d1, d2] }; - var x307: (s: Base[]) => any = true ? undefined : n => { var n: Base[]; return null; }; - var x308: Genric = true ? undefined : { func: n => { return [d1, d2]; } }; - var x309: () => Base[] = true ? () => [d1, d2] : undefined; - var x310: () => Base[] = true ? function() { return [d1, d2] } : undefined; - var x311: () => Base[] = true ? function named() { return [d1, d2] } : undefined; - var x312: { (): Base[]; } = true ? () => [d1, d2] : undefined; - var x313: { (): Base[]; } = true ? function() { return [d1, d2] } : undefined; - var x314: { (): Base[]; } = true ? function named() { return [d1, d2] } : undefined; - var x315: Base[] = true ? [d1, d2] : undefined; - var x316: Array = true ? [d1, d2] : undefined; - var x317: { [n: number]: Base; } = true ? [d1, d2] : undefined; - var x318: {n: Base[]; } = true ? { n: [d1, d2] } : undefined; - var x319: (s: Base[]) => any = true ? n => { var n: Base[]; return null; } : undefined; - var x320: Genric = true ? { func: n => { return [d1, d2]; } } : undefined; - function x321(n: () => Base[]) { }; x321(() => [d1, d2]); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:319:10: Add a return type to the function declaration. - function x322(n: () => Base[]) { }; x322(function() { return [d1, d2] }); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:320:10: Add a return type to the function declaration. - function x323(n: () => Base[]) { }; x323(function named() { return [d1, d2] }); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:321:10: Add a return type to the function declaration. - function x324(n: { (): Base[]; }) { }; x324(() => [d1, d2]); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:322:10: Add a return type to the function declaration. - function x325(n: { (): Base[]; }) { }; x325(function() { return [d1, d2] }); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:323:10: Add a return type to the function declaration. - function x326(n: { (): Base[]; }) { }; x326(function named() { return [d1, d2] }); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:324:10: Add a return type to the function declaration. - function x327(n: Base[]) { }; x327([d1, d2]); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:325:10: Add a return type to the function declaration. - function x328(n: Array) { }; x328([d1, d2]); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:326:10: Add a return type to the function declaration. - function x329(n: { [n: number]: Base; }) { }; x329([d1, d2]); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:327:10: Add a return type to the function declaration. - function x330(n: {n: Base[]; } ) { }; x330({ n: [d1, d2] }); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:328:10: Add a return type to the function declaration. - function x331(n: (s: Base[]) => any) { }; x331(n => { var n: Base[]; return null; }); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:329:10: Add a return type to the function declaration. - function x332(n: Genric) { }; x332({ func: n => { return [d1, d2]; } }); - ~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 generatedContextualTyping.ts:330:10: Add a return type to the function declaration. - var x333 = (n: () => Base[]) => n; x333(() => [d1, d2]); - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:331:5: Add a type annotation to the variable x333. -!!! related TS9030 generatedContextualTyping.ts:331:12: Add a return type to the function expression. - var x334 = (n: () => Base[]) => n; x334(function() { return [d1, d2] }); - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:332:5: Add a type annotation to the variable x334. -!!! related TS9030 generatedContextualTyping.ts:332:12: Add a return type to the function expression. - var x335 = (n: () => Base[]) => n; x335(function named() { return [d1, d2] }); - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:333:5: Add a type annotation to the variable x335. -!!! related TS9030 generatedContextualTyping.ts:333:12: Add a return type to the function expression. - var x336 = (n: { (): Base[]; }) => n; x336(() => [d1, d2]); - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:334:5: Add a type annotation to the variable x336. -!!! related TS9030 generatedContextualTyping.ts:334:12: Add a return type to the function expression. - var x337 = (n: { (): Base[]; }) => n; x337(function() { return [d1, d2] }); - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:335:5: Add a type annotation to the variable x337. -!!! related TS9030 generatedContextualTyping.ts:335:12: Add a return type to the function expression. - var x338 = (n: { (): Base[]; }) => n; x338(function named() { return [d1, d2] }); - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:336:5: Add a type annotation to the variable x338. -!!! related TS9030 generatedContextualTyping.ts:336:12: Add a return type to the function expression. - var x339 = (n: Base[]) => n; x339([d1, d2]); - ~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:337:5: Add a type annotation to the variable x339. -!!! related TS9030 generatedContextualTyping.ts:337:12: Add a return type to the function expression. - var x340 = (n: Array) => n; x340([d1, d2]); - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:338:5: Add a type annotation to the variable x340. -!!! related TS9030 generatedContextualTyping.ts:338:12: Add a return type to the function expression. - var x341 = (n: { [n: number]: Base; }) => n; x341([d1, d2]); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:339:5: Add a type annotation to the variable x341. -!!! related TS9030 generatedContextualTyping.ts:339:12: Add a return type to the function expression. - var x342 = (n: {n: Base[]; } ) => n; x342({ n: [d1, d2] }); - ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:340:5: Add a type annotation to the variable x342. -!!! related TS9030 generatedContextualTyping.ts:340:12: Add a return type to the function expression. - var x343 = (n: (s: Base[]) => any) => n; x343(n => { var n: Base[]; return null; }); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:341:5: Add a type annotation to the variable x343. -!!! related TS9030 generatedContextualTyping.ts:341:12: Add a return type to the function expression. - var x344 = (n: Genric) => n; x344({ func: n => { return [d1, d2]; } }); - ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:342:5: Add a type annotation to the variable x344. -!!! related TS9030 generatedContextualTyping.ts:342:12: Add a return type to the function expression. - var x345 = function(n: () => Base[]) { }; x345(() => [d1, d2]); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:343:5: Add a type annotation to the variable x345. -!!! related TS9030 generatedContextualTyping.ts:343:12: Add a return type to the function expression. - var x346 = function(n: () => Base[]) { }; x346(function() { return [d1, d2] }); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:344:5: Add a type annotation to the variable x346. -!!! related TS9030 generatedContextualTyping.ts:344:12: Add a return type to the function expression. - var x347 = function(n: () => Base[]) { }; x347(function named() { return [d1, d2] }); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:345:5: Add a type annotation to the variable x347. -!!! related TS9030 generatedContextualTyping.ts:345:12: Add a return type to the function expression. - var x348 = function(n: { (): Base[]; }) { }; x348(() => [d1, d2]); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:346:5: Add a type annotation to the variable x348. -!!! related TS9030 generatedContextualTyping.ts:346:12: Add a return type to the function expression. - var x349 = function(n: { (): Base[]; }) { }; x349(function() { return [d1, d2] }); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:347:5: Add a type annotation to the variable x349. -!!! related TS9030 generatedContextualTyping.ts:347:12: Add a return type to the function expression. - var x350 = function(n: { (): Base[]; }) { }; x350(function named() { return [d1, d2] }); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:348:5: Add a type annotation to the variable x350. -!!! related TS9030 generatedContextualTyping.ts:348:12: Add a return type to the function expression. - var x351 = function(n: Base[]) { }; x351([d1, d2]); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:349:5: Add a type annotation to the variable x351. -!!! related TS9030 generatedContextualTyping.ts:349:12: Add a return type to the function expression. - var x352 = function(n: Array) { }; x352([d1, d2]); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:350:5: Add a type annotation to the variable x352. -!!! related TS9030 generatedContextualTyping.ts:350:12: Add a return type to the function expression. - var x353 = function(n: { [n: number]: Base; }) { }; x353([d1, d2]); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:351:5: Add a type annotation to the variable x353. -!!! related TS9030 generatedContextualTyping.ts:351:12: Add a return type to the function expression. - var x354 = function(n: {n: Base[]; } ) { }; x354({ n: [d1, d2] }); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:352:5: Add a type annotation to the variable x354. -!!! related TS9030 generatedContextualTyping.ts:352:12: Add a return type to the function expression. - var x355 = function(n: (s: Base[]) => any) { }; x355(n => { var n: Base[]; return null; }); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:353:5: Add a type annotation to the variable x355. -!!! related TS9030 generatedContextualTyping.ts:353:12: Add a return type to the function expression. - var x356 = function(n: Genric) { }; x356({ func: n => { return [d1, d2]; } }); - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 generatedContextualTyping.ts:354:5: Add a type annotation to the variable x356. -!!! related TS9030 generatedContextualTyping.ts:354:12: Add a return type to the function expression. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument.d.ts deleted file mode 100644 index 462a2c5b57d9f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument.d.ts +++ /dev/null @@ -1,209 +0,0 @@ -//// [tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts] //// - -//// [genericTypeReferenceWithoutTypeArgument.ts] -// it is an error to use a generic type without type arguments -// all of these are errors - -class C { - foo: T; -} - -var c: C; - -var a: { x: C }; -var b: { (x: C): C }; -var d: { [x: C]: C }; - -var e = (x: C) => { var y: C; return y; } - -function f(x: C): C { var y: C; return y; } - -var g = function f(x: C): C { var y: C; return y; } - -class D extends C { -} - -interface I extends C {} - -module M { - export class E { foo: T } -} - -class D2 extends M.E { } -class D3 { } -interface I2 extends M.E { } - -function h(x: T) { } -function i(x: T) { } - -var j = null; -var k = null; - -/// [Declarations] //// - - - -//// [genericTypeReferenceWithoutTypeArgument.d.ts] -declare class C { - foo: T; -} -declare var c: C; -declare var a: { - x: C; -}; -declare var b: { - (x: C): C; -}; -declare var d: { - [x: C]: C; -}; -declare var e: (x: C) => invalid; -declare function f(x: C): C; -declare var g: (x: any) => any; -declare class D extends C { -} -interface I extends C { -} -declare namespace M { - class E { - foo: T; - } -} -declare class D2 extends M.E { -} -declare class D3 { -} -interface I2 extends M.E { -} -declare function h(x: T): invalid; -declare function i(x: T): invalid; -declare var j: any; -declare var k: any; - -/// [Errors] //// - -genericTypeReferenceWithoutTypeArgument.ts(8,8): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(10,13): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(11,14): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(11,18): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(12,11): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. -genericTypeReferenceWithoutTypeArgument.ts(12,14): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(12,18): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(14,9): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -genericTypeReferenceWithoutTypeArgument.ts(14,13): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(14,28): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(16,15): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(16,19): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(16,30): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(18,23): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(18,27): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(18,38): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(20,17): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(23,21): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(29,18): error TS2314: Generic type 'E' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(30,20): error TS2314: Generic type 'E' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(31,22): error TS2314: Generic type 'E' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(33,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -genericTypeReferenceWithoutTypeArgument.ts(33,22): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -genericTypeReferenceWithoutTypeArgument.ts(34,22): error TS2314: Generic type 'E' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(36,10): error TS2314: Generic type 'C' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument.ts(37,10): error TS2314: Generic type 'E' requires 1 type argument(s). - - -==== genericTypeReferenceWithoutTypeArgument.ts (27 errors) ==== - // it is an error to use a generic type without type arguments - // all of these are errors - - class C { - foo: T; - } - - var c: C; - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - - var a: { x: C }; - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - var b: { (x: C): C }; - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - var d: { [x: C]: C }; - ~ -!!! error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - - var e = (x: C) => { var y: C; return y; } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 genericTypeReferenceWithoutTypeArgument.ts:14:5: Add a type annotation to the variable e. -!!! related TS9030 genericTypeReferenceWithoutTypeArgument.ts:14:9: Add a return type to the function expression. - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - - function f(x: C): C { var y: C; return y; } - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - - var g = function f(x: C): C { var y: C; return y; } - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - - class D extends C { - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - } - - interface I extends C {} - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - - module M { - export class E { foo: T } - } - - class D2 extends M.E { } - ~~~ -!!! error TS2314: Generic type 'E' requires 1 type argument(s). - class D3 { } - ~~~ -!!! error TS2314: Generic type 'E' requires 1 type argument(s). - interface I2 extends M.E { } - ~~~ -!!! error TS2314: Generic type 'E' requires 1 type argument(s). - - function h(x: T) { } - ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 genericTypeReferenceWithoutTypeArgument.ts:33:10: Add a return type to the function declaration. - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - function i(x: T) { } - ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 genericTypeReferenceWithoutTypeArgument.ts:34:10: Add a return type to the function declaration. - ~~~ -!!! error TS2314: Generic type 'E' requires 1 type argument(s). - - var j = null; - ~ -!!! error TS2314: Generic type 'C' requires 1 type argument(s). - var k = null; - ~~~ -!!! error TS2314: Generic type 'E' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument2.d.ts deleted file mode 100644 index 934d5701ac3d6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/genericTypeReferenceWithoutTypeArgument2.d.ts +++ /dev/null @@ -1,218 +0,0 @@ -//// [tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts] //// - -//// [genericTypeReferenceWithoutTypeArgument2.ts] -// it is an error to use a generic type without type arguments -// all of these are errors - -interface I { - foo: T; -} - -var c: I; - -var a: { x: I }; -var b: { (x: I): I }; -var d: { [x: I]: I }; - -var e = (x: I) => { var y: I; return y; } - -function f(x: I): I { var y: I; return y; } - -var g = function f(x: I): I { var y: I; return y; } - -class D extends I { -} - -interface U extends I {} - -module M { - export interface E { foo: T } -} - -class D2 extends M.C { } -interface D3 { } -interface I2 extends M.C { } - -function h(x: T) { } -function i(x: T) { } - -var j = null; -var k = null; - -/// [Declarations] //// - - - -//// [genericTypeReferenceWithoutTypeArgument2.d.ts] -interface I { - foo: T; -} -declare var c: I; -declare var a: { - x: I; -}; -declare var b: { - (x: I): I; -}; -declare var d: { - [x: I]: I; -}; -declare var e: (x: I) => invalid; -declare function f(x: I): I; -declare var g: (x: any) => any; -declare class D extends I { -} -interface U extends I { -} -declare namespace M { - interface E { - foo: T; - } -} -declare class D2 extends M.C { -} -interface D3 { -} -interface I2 extends M.C { -} -declare function h(x: T): invalid; -declare function i(x: T): invalid; -declare var j: C; -declare var k: any; - -/// [Errors] //// - -genericTypeReferenceWithoutTypeArgument2.ts(8,8): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(10,13): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(11,14): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(11,18): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(12,11): error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. -genericTypeReferenceWithoutTypeArgument2.ts(12,14): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(12,18): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(14,9): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -genericTypeReferenceWithoutTypeArgument2.ts(14,13): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(14,28): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(16,15): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(16,19): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(16,30): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(18,23): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(18,27): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(18,38): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(20,17): error TS2689: Cannot extend an interface 'I'. Did you mean 'implements'? -genericTypeReferenceWithoutTypeArgument2.ts(20,17): error TS4020: 'extends' clause of exported class 'D' has or is using private name 'I'. -genericTypeReferenceWithoutTypeArgument2.ts(23,21): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(29,18): error TS2708: Cannot use namespace 'M' as a value. -genericTypeReferenceWithoutTypeArgument2.ts(29,18): error TS4020: 'extends' clause of exported class 'D2' has or is using private name 'M'. -genericTypeReferenceWithoutTypeArgument2.ts(30,24): error TS2314: Generic type 'E' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(31,24): error TS2694: Namespace 'M' has no exported member 'C'. -genericTypeReferenceWithoutTypeArgument2.ts(33,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -genericTypeReferenceWithoutTypeArgument2.ts(33,22): error TS2314: Generic type 'I' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(34,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -genericTypeReferenceWithoutTypeArgument2.ts(34,22): error TS2314: Generic type 'E' requires 1 type argument(s). -genericTypeReferenceWithoutTypeArgument2.ts(36,10): error TS2304: Cannot find name 'C'. -genericTypeReferenceWithoutTypeArgument2.ts(36,10): error TS4025: Exported variable 'j' has or is using private name 'C'. -genericTypeReferenceWithoutTypeArgument2.ts(37,10): error TS2314: Generic type 'E' requires 1 type argument(s). - - -==== genericTypeReferenceWithoutTypeArgument2.ts (30 errors) ==== - // it is an error to use a generic type without type arguments - // all of these are errors - - interface I { - foo: T; - } - - var c: I; - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - - var a: { x: I }; - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - var b: { (x: I): I }; - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - var d: { [x: I]: I }; - ~ -!!! error TS1268: An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type. - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - - var e = (x: I) => { var y: I; return y; } - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 genericTypeReferenceWithoutTypeArgument2.ts:14:5: Add a type annotation to the variable e. -!!! related TS9030 genericTypeReferenceWithoutTypeArgument2.ts:14:9: Add a return type to the function expression. - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - - function f(x: I): I { var y: I; return y; } - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - - var g = function f(x: I): I { var y: I; return y; } - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - - class D extends I { - ~ -!!! error TS2689: Cannot extend an interface 'I'. Did you mean 'implements'? - ~ -!!! error TS4020: 'extends' clause of exported class 'D' has or is using private name 'I'. - } - - interface U extends I {} - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - - module M { - export interface E { foo: T } - } - - class D2 extends M.C { } - ~ -!!! error TS2708: Cannot use namespace 'M' as a value. - ~ -!!! error TS4020: 'extends' clause of exported class 'D2' has or is using private name 'M'. - interface D3 { } - ~~~ -!!! error TS2314: Generic type 'E' requires 1 type argument(s). - interface I2 extends M.C { } - ~ -!!! error TS2694: Namespace 'M' has no exported member 'C'. - - function h(x: T) { } - ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 genericTypeReferenceWithoutTypeArgument2.ts:33:10: Add a return type to the function declaration. - ~ -!!! error TS2314: Generic type 'I' requires 1 type argument(s). - function i(x: T) { } - ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 genericTypeReferenceWithoutTypeArgument2.ts:34:10: Add a return type to the function declaration. - ~~~ -!!! error TS2314: Generic type 'E' requires 1 type argument(s). - - var j = null; - ~ -!!! error TS2304: Cannot find name 'C'. - ~ -!!! error TS4025: Exported variable 'j' has or is using private name 'C'. - var k = null; - ~~~ -!!! error TS2314: Generic type 'E' requires 1 type argument(s). \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/gettersAndSettersErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/gettersAndSettersErrors.d.ts deleted file mode 100644 index 10ef662967b45..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/gettersAndSettersErrors.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -//// [tests/cases/compiler/gettersAndSettersErrors.ts] //// - -//// [gettersAndSettersErrors.ts] -class C { - public get Foo() { return "foo";} // ok - public set Foo(foo:string) {} // ok - - public Foo = 0; // error - duplicate identifier Foo - confirmed - public get Goo(v:string):string {return null;} // error - getters must not have a parameter - public set Goo(v:string):string {} // error - setters must not specify a return type -} - -class E { - private get Baz():number { return 0; } - public set Baz(n:number) {} // error - accessors do not agree in visibility -} - - - - -/// [Declarations] //// - - - -//// [gettersAndSettersErrors.d.ts] -declare class C { - get Foo(): string; - set Foo(foo: string); - Foo: string; - get Goo(): string; - set Goo(v: string): string; -} -declare class E { - private get Baz(); - set Baz(n: number); -} - -/// [Errors] //// - -gettersAndSettersErrors.ts(5,12): error TS2300: Duplicate identifier 'Foo'. -gettersAndSettersErrors.ts(5,12): error TS2717: Subsequent property declarations must have the same type. Property 'Foo' must be of type 'string', but here has type 'number'. -gettersAndSettersErrors.ts(6,16): error TS1054: A 'get' accessor cannot have parameters. -gettersAndSettersErrors.ts(7,16): error TS1095: A 'set' accessor cannot have a return type annotation. -gettersAndSettersErrors.ts(11,17): error TS2808: A get accessor must be at least as accessible as the setter -gettersAndSettersErrors.ts(12,16): error TS2808: A get accessor must be at least as accessible as the setter - - -==== gettersAndSettersErrors.ts (6 errors) ==== - class C { - public get Foo() { return "foo";} // ok - public set Foo(foo:string) {} // ok - - public Foo = 0; // error - duplicate identifier Foo - confirmed - ~~~ -!!! error TS2300: Duplicate identifier 'Foo'. - ~~~ -!!! error TS2717: Subsequent property declarations must have the same type. Property 'Foo' must be of type 'string', but here has type 'number'. -!!! related TS6203 gettersAndSettersErrors.ts:2:16: 'Foo' was also declared here. - public get Goo(v:string):string {return null;} // error - getters must not have a parameter - ~~~ -!!! error TS1054: A 'get' accessor cannot have parameters. - public set Goo(v:string):string {} // error - setters must not specify a return type - ~~~ -!!! error TS1095: A 'set' accessor cannot have a return type annotation. - } - - class E { - private get Baz():number { return 0; } - ~~~ -!!! error TS2808: A get accessor must be at least as accessible as the setter - public set Baz(n:number) {} // error - accessors do not agree in visibility - ~~~ -!!! error TS2808: A get accessor must be at least as accessible as the setter - } - - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/inKeywordAndIntersection.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/inKeywordAndIntersection.d.ts deleted file mode 100644 index 7630ba897ab2e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/inKeywordAndIntersection.d.ts +++ /dev/null @@ -1,98 +0,0 @@ -//// [tests/cases/compiler/inKeywordAndIntersection.ts] //// - -//// [inKeywordAndIntersection.ts] -class A { a = 0 } -class B { b = 0 } - -function f10(obj: A & { x: string } | B) { - if (obj instanceof Object) { - obj; // A & { x: string } | B - } - else { - obj; // Error - } -} - -// Repro from #50844 - -interface InstanceOne { - one(): void -} - -interface InstanceTwo { - two(): void -} - -const instance = {} as InstanceOne | InstanceTwo - -const ClassOne = {} as { new(): InstanceOne } & { foo: true }; - -if (instance instanceof ClassOne) { - instance.one(); -} - - -/// [Declarations] //// - - - -//// [inKeywordAndIntersection.d.ts] -declare class A { - a: number; -} -declare class B { - b: number; -} -declare function f10(obj: A & { - x: string; -} | B): invalid; -interface InstanceOne { - one(): void; -} -interface InstanceTwo { - two(): void; -} -declare const instance: InstanceOne | InstanceTwo; -declare const ClassOne: (new () => InstanceOne) & { - foo: true; -}; - -/// [Errors] //// - -inKeywordAndIntersection.ts(4,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. - - -==== inKeywordAndIntersection.ts (1 errors) ==== - class A { a = 0 } - class B { b = 0 } - - function f10(obj: A & { x: string } | B) { - ~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 inKeywordAndIntersection.ts:4:10: Add a return type to the function declaration. - if (obj instanceof Object) { - obj; // A & { x: string } | B - } - else { - obj; // Error - } - } - - // Repro from #50844 - - interface InstanceOne { - one(): void - } - - interface InstanceTwo { - two(): void - } - - const instance = {} as InstanceOne | InstanceTwo - - const ClassOne = {} as { new(): InstanceOne } & { foo: true }; - - if (instance instanceof ClassOne) { - instance.one(); - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts deleted file mode 100644 index ab4adbcc7fda2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/indexSignatureMustHaveTypeAnnotation.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -//// [tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts] //// - -//// [indexSignatureMustHaveTypeAnnotation.ts] -interface I { - // Used to be indexer, now it is a computed property - [x]: string; - [x: string]; -} - -class C { - // Used to be indexer, now it is a computed property - [x]: string - -} - -class C2 { - [x: string] -} - -/// [Declarations] //// - - - -//// [indexSignatureMustHaveTypeAnnotation.d.ts] -interface I { - [x: string]: any; -} -declare class C { -} -declare class C2 { - [x: string]: any; -} - -/// [Errors] //// - -indexSignatureMustHaveTypeAnnotation.ts(3,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. -indexSignatureMustHaveTypeAnnotation.ts(3,6): error TS2304: Cannot find name 'x'. -indexSignatureMustHaveTypeAnnotation.ts(4,5): error TS1021: An index signature must have a type annotation. -indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS2304: Cannot find name 'x'. -indexSignatureMustHaveTypeAnnotation.ts(14,5): error TS1021: An index signature must have a type annotation. - - -==== indexSignatureMustHaveTypeAnnotation.ts (6 errors) ==== - interface I { - // Used to be indexer, now it is a computed property - [x]: string; - ~~~ -!!! 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 'x'. - [x: string]; - ~~~~~~~~~~~~ -!!! error TS1021: An index signature must have a type annotation. - } - - class C { - // Used to be indexer, now it is a computed property - [x]: string - ~~~ -!!! 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 'x'. - - } - - class C2 { - [x: string] - ~~~~~~~~~~~ -!!! error TS1021: An index signature must have a type annotation. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts deleted file mode 100644 index 97a13bb8c2cd6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/indexWithoutParamType2.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -//// [tests/cases/compiler/indexWithoutParamType2.ts] //// - -//// [indexWithoutParamType2.ts] -class C { - // Used to be indexer, now it is a computed property - [x]: string -} - -/// [Declarations] //// - - - -//// [indexWithoutParamType2.d.ts] -declare class C { -} - -/// [Errors] //// - -indexWithoutParamType2.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -indexWithoutParamType2.ts(3,6): error TS2304: Cannot find name 'x'. - - -==== indexWithoutParamType2.ts (2 errors) ==== - class C { - // Used to be indexer, now it is a computed property - [x]: string - ~~~ -!!! 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 'x'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts deleted file mode 100644 index c480bd47543f4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/intTypeCheck.d.ts +++ /dev/null @@ -1,879 +0,0 @@ -//// [tests/cases/compiler/intTypeCheck.ts] //// - -//// [intTypeCheck.ts] -interface i1 { - //Property Signatures - p; - p1?; - p2?: string; - p3(); - p4? (); - p5? (): void; - p6(pa1): void; - p7? (pa1, pa2): void; -} -interface i2 { - //Call Signatures - (); - (): number; - (p); - (p1: string); - (p2?: string); - (...p3: any[]); - (p4: string, p5?: string); - (p6: string, ...p7: any[]); -} -interface i3 { - //Construct Signatures - new (); - new (): number; - new (p: string); - new (p2?: string); - new (...p3: any[]); - new (p4: string, p5?: string); - new (p6: string, ...p7: any[]); -} -interface i4 { - // Used to be indexer, now it is a computed property - [p]; - //Index Signatures - [p1: string]; - [p2: string, p3: number]; -} -interface i5 extends i1 { } -interface i6 extends i2 { } -interface i7 extends i3 { } -interface i8 extends i4 { } -interface i9 { } - -class Base { foo() { } } - -interface i11 { - //Call Signatures - (); - (): 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 Signatures - new (); - new (): number; - new (p: string); - new (p2?: string); - new (...p3: any[]); - new (p4: string, p5?: string); - new (p6: string, ...p7: any[]); - - // Used to be indexer, now it is a computed property - [p]; - //Index Signatures - [p1: string]; - [p2: string, p3: number]; - - //Property Signatures - p; - p1?; - p2?: string; - p3(); - p4? (); - p5? (): void; - p6(pa1): void; - p7(pa1, pa2): void; - p7? (pa1, pa2): void; -} - -var anyVar: any; -// -// Property signatures -// -var obj0: i1; -var obj1: i1 = { - p: null, - p3: function ():any { return 0; }, - p6: function (pa1):any { return 0; }, - p7: function (pa1, pa2):any { return 0; } -}; -var obj2: i1 = new Object(); -var obj3: i1 = new obj0; -var obj4: i1 = new Base; -var obj5: i1 = null; -var obj6: i1 = function () { }; -//var obj7: i1 = function foo() { }; -var obj8: i1 = anyVar; -var obj9: i1 = new anyVar; -var obj10: i1 = new {}; -// -// Call signatures -// -var obj11: i2; -var obj12: i2 = {}; -var obj13: i2 = new Object(); -var obj14: i2 = new obj11; -var obj15: i2 = new Base; -var obj16: i2 = null; -var obj17: i2 = function ():any { return 0; }; -//var obj18: i2 = function foo() { }; -var obj19: i2 = anyVar; -var obj20: i2 = new anyVar; -var obj21: i2 = new {}; -// -// Construct Signatures -// -var obj22: i3; -var obj23: i3 = {}; -var obj24: i3 = new Object(); -var obj25: i3 = new obj22; -var obj26: i3 = new Base; -var obj27: i3 = null; -var obj28: i3 = function () { }; -//var obj29: i3 = function foo() { }; -var obj30: i3 = anyVar; -var obj31: i3 = new anyVar; -var obj32: i3 = new {}; -// -// Index Signatures -// -var obj33: i4; -var obj34: i4 = {}; -var obj35: i4 = new Object(); -var obj36: i4 = new obj33; -var obj37: i4 = new Base; -var obj38: i4 = null; -var obj39: i4 = function () { }; -//var obj40: i4 = function foo() { }; -var obj41: i4 = anyVar; -var obj42: i4 = new anyVar; -var obj43: i4 = new {}; -// -// Interface Derived I1 -// -var obj44: i5; -var obj45: i5 = {}; -var obj46: i5 = new Object(); -var obj47: i5 = new obj44; -var obj48: i5 = new Base; -var obj49: i5 = null; -var obj50: i5 = function () { }; -//var obj51: i5 = function foo() { }; -var obj52: i5 = anyVar; -var obj53: i5 = new anyVar; -var obj54: i5 = new {}; -// -// Interface Derived I2 -// -var obj55: i6; -var obj56: i6 = {}; -var obj57: i6 = new Object(); -var obj58: i6 = new obj55; -var obj59: i6 = new Base; -var obj60: i6 = null; -var obj61: i6 = function () { }; -//var obj62: i6 = function foo() { }; -var obj63: i6 = anyVar; -var obj64: i6 = new anyVar; -var obj65: i6 = new {}; -// -// Interface Derived I3 -// -var obj66: i7; -var obj67: i7 = {}; -var obj68: i7 = new Object(); -var obj69: i7 = new obj66; -var obj70: i7 = new Base; -var obj71: i7 = null; -var obj72: i7 = function () { }; -//var obj73: i7 = function foo() { }; -var obj74: i7 = anyVar; -var obj75: i7 = new anyVar; -var obj76: i7 = new {}; -// -// Interface Derived I4 -// -var obj77: i8; -var obj78: i8 = {}; -var obj79: i8 = new Object(); -var obj80: i8 = new obj77; -var obj81: i8 = new Base; -var obj82: i8 = null; -var obj83: i8 = function () { }; -//var obj84: i8 = function foo() { }; -var obj85: i8 = anyVar; -var obj86: i8 = new anyVar; -var obj87: i8 = new {}; - -/// [Declarations] //// - - - -//// [intTypeCheck.d.ts] -interface i1 { - p: any; - p1?: any; - p2?: string; - p3(): any; - p4?(): any; - p5?(): void; - p6(pa1: invalid): void; - p7?(pa1: invalid, pa2: invalid): void; -} -interface i2 { - (): any; - (): number; - (p: invalid): any; - (p1: string): any; - (p2?: string): any; - (...p3: any[]): any; - (p4: string, p5?: string): any; - (p6: string, ...p7: any[]): any; -} -interface i3 { - 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; -} -interface i4 { - [p1: string]: any; - [p2: string, p3: number]: any; -} -interface i5 extends i1 { -} -interface i6 extends i2 { -} -interface i7 extends i3 { -} -interface i8 extends i4 { -} -interface i9 { -} -declare class Base { - foo(): invalid; -} -interface i11 { - (): 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; -} -declare var anyVar: any; -declare var obj0: i1; -declare var obj1: i1; -declare var obj2: i1; -declare var obj3: i1; -declare var obj4: i1; -declare var obj5: i1; -declare var obj6: i1; -declare var obj8: i1; -declare var obj9: i1; -declare var obj10: i1; -declare var obj11: i2; -declare var obj12: i2; -declare var obj13: i2; -declare var obj14: i2; -declare var obj15: i2; -declare var obj16: i2; -declare var obj17: i2; -declare var obj19: i2; -declare var obj20: i2; -declare var obj21: i2; -declare var obj22: i3; -declare var obj23: i3; -declare var obj24: i3; -declare var obj25: i3; -declare var obj26: i3; -declare var obj27: i3; -declare var obj28: i3; -declare var obj30: i3; -declare var obj31: i3; -declare var obj32: i3; -declare var obj33: i4; -declare var obj34: i4; -declare var obj35: i4; -declare var obj36: i4; -declare var obj37: i4; -declare var obj38: i4; -declare var obj39: i4; -declare var obj41: i4; -declare var obj42: i4; -declare var obj43: i4; -declare var obj44: i5; -declare var obj45: i5; -declare var obj46: i5; -declare var obj47: i5; -declare var obj48: i5; -declare var obj49: i5; -declare var obj50: i5; -declare var obj52: i5; -declare var obj53: i5; -declare var obj54: i5; -declare var obj55: i6; -declare var obj56: i6; -declare var obj57: i6; -declare var obj58: i6; -declare var obj59: i6; -declare var obj60: i6; -declare var obj61: i6; -declare var obj63: i6; -declare var obj64: i6; -declare var obj65: i6; -declare var obj66: i7; -declare var obj67: i7; -declare var obj68: i7; -declare var obj69: i7; -declare var obj70: i7; -declare var obj71: i7; -declare var obj72: i7; -declare var obj74: i7; -declare var obj75: i7; -declare var obj76: i7; -declare var obj77: i8; -declare var obj78: i8; -declare var obj79: i8; -declare var obj80: i8; -declare var obj81: i8; -declare var obj82: i8; -declare var obj83: i8; -declare var obj85: i8; -declare var obj86: i8; -declare var obj87: i8; - -/// [Errors] //// - -intTypeCheck.ts(9,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -intTypeCheck.ts(10,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -intTypeCheck.ts(10,15): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -intTypeCheck.ts(16,6): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -intTypeCheck.ts(35,6): error TS2304: Cannot find name 'p'. -intTypeCheck.ts(46,14): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -intTypeCheck.ts(52,6): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -intTypeCheck.ts(71,6): error TS2304: Cannot find name 'p'. -intTypeCheck.ts(83,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -intTypeCheck.ts(84,8): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -intTypeCheck.ts(84,13): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -intTypeCheck.ts(85,5): error TS2386: Overload signatures must all be optional or required. -intTypeCheck.ts(85,10): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -intTypeCheck.ts(85,15): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -intTypeCheck.ts(99,5): error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? - Type 'Object' is missing the following properties from type 'i1': p, p3, p6 -intTypeCheck.ts(100,20): error TS2351: This expression is not constructable. - Type 'i1' has no construct signatures. -intTypeCheck.ts(101,5): error TS2739: Type 'Base' is missing the following properties from type 'i1': p, p3, p6 -intTypeCheck.ts(103,5): error TS2322: Type '() => void' is not assignable to type 'i1'. -intTypeCheck.ts(106,5): error TS2322: Type 'boolean' is not assignable to type 'i1'. -intTypeCheck.ts(106,20): error TS1109: Expression expected. -intTypeCheck.ts(106,21): error TS2693: 'i1' only refers to a type, but is being used as a value here. -intTypeCheck.ts(107,21): error TS2351: This expression is not constructable. - Type '{}' has no construct signatures. -intTypeCheck.ts(112,5): error TS2322: Type '{}' is not assignable to type 'i2'. - Type '{}' provides no match for the signature '(): any'. -intTypeCheck.ts(113,5): error TS2322: Type 'Object' is not assignable to type 'i2'. - The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? - Type 'Object' provides no match for the signature '(): any'. -intTypeCheck.ts(114,17): error TS2350: Only a void function can be called with the 'new' keyword. -intTypeCheck.ts(115,5): error TS2322: Type 'Base' is not assignable to type 'i2'. - Type 'Base' provides no match for the signature '(): any'. -intTypeCheck.ts(120,5): error TS2322: Type 'boolean' is not assignable to type 'i2'. -intTypeCheck.ts(120,21): error TS1109: Expression expected. -intTypeCheck.ts(120,22): error TS2693: 'i2' only refers to a type, but is being used as a value here. -intTypeCheck.ts(121,21): error TS2351: This expression is not constructable. - Type '{}' has no construct signatures. -intTypeCheck.ts(126,5): error TS2322: Type '{}' is not assignable to type 'i3'. - Type '{}' provides no match for the signature 'new (): any'. -intTypeCheck.ts(127,5): error TS2322: Type 'Object' is not assignable to type 'i3'. - The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? - Type 'Object' provides no match for the signature 'new (): any'. -intTypeCheck.ts(129,5): error TS2322: Type 'Base' is not assignable to type 'i3'. - Type 'Base' provides no match for the signature 'new (): any'. -intTypeCheck.ts(131,5): error TS2322: Type '() => void' is not assignable to type 'i3'. - Type '() => void' provides no match for the signature 'new (): any'. -intTypeCheck.ts(134,5): error TS2322: Type 'boolean' is not assignable to type 'i3'. -intTypeCheck.ts(134,21): error TS1109: Expression expected. -intTypeCheck.ts(134,22): error TS2693: 'i3' only refers to a type, but is being used as a value here. -intTypeCheck.ts(135,21): error TS2351: This expression is not constructable. - Type '{}' has no construct signatures. -intTypeCheck.ts(142,21): error TS2351: This expression is not constructable. - Type 'i4' has no construct signatures. -intTypeCheck.ts(148,5): error TS2322: Type 'boolean' is not assignable to type 'i4'. -intTypeCheck.ts(148,21): error TS1109: Expression expected. -intTypeCheck.ts(148,22): error TS2693: 'i4' only refers to a type, but is being used as a value here. -intTypeCheck.ts(149,21): error TS2351: This expression is not constructable. - Type '{}' has no construct signatures. -intTypeCheck.ts(154,5): error TS2739: Type '{}' is missing the following properties from type 'i5': p, p3, p6 -intTypeCheck.ts(155,5): error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? - Type 'Object' is missing the following properties from type 'i5': p, p3, p6 -intTypeCheck.ts(156,21): error TS2351: This expression is not constructable. - Type 'i5' has no construct signatures. -intTypeCheck.ts(157,5): error TS2739: Type 'Base' is missing the following properties from type 'i5': p, p3, p6 -intTypeCheck.ts(159,5): error TS2322: Type '() => void' is not assignable to type 'i5'. -intTypeCheck.ts(162,5): error TS2322: Type 'boolean' is not assignable to type 'i5'. -intTypeCheck.ts(162,21): error TS1109: Expression expected. -intTypeCheck.ts(162,22): error TS2693: 'i5' only refers to a type, but is being used as a value here. -intTypeCheck.ts(163,21): error TS2351: This expression is not constructable. - Type '{}' has no construct signatures. -intTypeCheck.ts(168,5): error TS2322: Type '{}' is not assignable to type 'i6'. - Type '{}' provides no match for the signature '(): any'. -intTypeCheck.ts(169,5): error TS2322: Type 'Object' is not assignable to type 'i6'. - The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? - Type 'Object' provides no match for the signature '(): any'. -intTypeCheck.ts(170,17): error TS2350: Only a void function can be called with the 'new' keyword. -intTypeCheck.ts(171,5): error TS2322: Type 'Base' is not assignable to type 'i6'. - Type 'Base' provides no match for the signature '(): any'. -intTypeCheck.ts(173,5): error TS2322: Type '() => void' is not assignable to type 'i6'. - Type 'void' is not assignable to type 'number'. -intTypeCheck.ts(176,5): error TS2322: Type 'boolean' is not assignable to type 'i6'. -intTypeCheck.ts(176,21): error TS1109: Expression expected. -intTypeCheck.ts(176,22): error TS2693: 'i6' only refers to a type, but is being used as a value here. -intTypeCheck.ts(177,21): error TS2351: This expression is not constructable. - Type '{}' has no construct signatures. -intTypeCheck.ts(182,5): error TS2322: Type '{}' is not assignable to type 'i7'. - Type '{}' provides no match for the signature 'new (): any'. -intTypeCheck.ts(183,5): error TS2322: Type 'Object' is not assignable to type 'i7'. - The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? - Type 'Object' provides no match for the signature 'new (): any'. -intTypeCheck.ts(185,17): error TS2352: Conversion of type 'Base' to type 'i7' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. - Type 'Base' provides no match for the signature 'new (): any'. -intTypeCheck.ts(187,5): error TS2322: Type '() => void' is not assignable to type 'i7'. - Type '() => void' provides no match for the signature 'new (): any'. -intTypeCheck.ts(190,5): error TS2322: Type 'boolean' is not assignable to type 'i7'. -intTypeCheck.ts(190,21): error TS1109: Expression expected. -intTypeCheck.ts(190,22): error TS2693: 'i7' only refers to a type, but is being used as a value here. -intTypeCheck.ts(191,21): error TS2351: This expression is not constructable. - Type '{}' has no construct signatures. -intTypeCheck.ts(198,21): error TS2351: This expression is not constructable. - Type 'i8' has no construct signatures. -intTypeCheck.ts(204,5): error TS2322: Type 'boolean' is not assignable to type 'i8'. -intTypeCheck.ts(204,21): error TS1109: Expression expected. -intTypeCheck.ts(204,22): error TS2693: 'i8' only refers to a type, but is being used as a value here. -intTypeCheck.ts(205,21): error TS2351: This expression is not constructable. - Type '{}' has no construct signatures. - - -==== intTypeCheck.ts (74 errors) ==== - interface i1 { - //Property Signatures - p; - p1?; - p2?: string; - p3(); - p4? (); - p5? (): void; - p6(pa1): void; - ~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 intTypeCheck.ts:9: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 intTypeCheck.ts:10:10: Add a type annotation to the parameter pa1. - ~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 intTypeCheck.ts:10:15: Add a type annotation to the parameter pa2. - } - interface i2 { - //Call Signatures - (); - (): number; - (p); - ~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 intTypeCheck.ts:16:6: Add a type annotation to the parameter p. - (p1: string); - (p2?: string); - (...p3: any[]); - (p4: string, p5?: string); - (p6: string, ...p7: any[]); - } - interface i3 { - //Construct Signatures - new (); - new (): number; - new (p: string); - new (p2?: string); - new (...p3: any[]); - new (p4: string, p5?: string); - new (p6: string, ...p7: any[]); - } - interface i4 { - // Used to be indexer, now it is a computed property - [p]; - ~ -!!! error TS2304: Cannot find name 'p'. - //Index Signatures - [p1: string]; - [p2: string, p3: number]; - } - interface i5 extends i1 { } - interface i6 extends i2 { } - interface i7 extends i3 { } - interface i8 extends i4 { } - interface i9 { } - - class Base { foo() { } } - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 intTypeCheck.ts:46:14: Add a return type to the method - - interface i11 { - //Call Signatures - (); - (): number; - (p); - ~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 intTypeCheck.ts:52: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 Signatures - new (); - new (): number; - new (p: string); - new (p2?: string); - new (...p3: any[]); - new (p4: string, p5?: string); - new (p6: string, ...p7: any[]); - - // Used to be indexer, now it is a computed property - [p]; - ~ -!!! error TS2304: Cannot find name 'p'. - //Index Signatures - [p1: string]; - [p2: string, p3: number]; - - //Property Signatures - p; - p1?; - p2?: string; - p3(); - p4? (); - p5? (): void; - p6(pa1): void; - ~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 intTypeCheck.ts:83: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 intTypeCheck.ts:84:8: Add a type annotation to the parameter pa1. - ~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 intTypeCheck.ts:84: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 intTypeCheck.ts:85:10: Add a type annotation to the parameter pa1. - ~~~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 intTypeCheck.ts:85:15: Add a type annotation to the parameter pa2. - } - - var anyVar: any; - // - // Property signatures - // - var obj0: i1; - var obj1: i1 = { - p: null, - p3: function ():any { return 0; }, - p6: function (pa1):any { return 0; }, - p7: function (pa1, pa2):any { return 0; } - }; - var obj2: i1 = new Object(); - ~~~~ -!!! error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? -!!! error TS2696: Type 'Object' is missing the following properties from type 'i1': p, p3, p6 - var obj3: i1 = new obj0; - ~~~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type 'i1' has no construct signatures. - var obj4: i1 = new Base; - ~~~~ -!!! error TS2739: Type 'Base' is missing the following properties from type 'i1': p, p3, p6 - var obj5: i1 = null; - var obj6: i1 = function () { }; - ~~~~ -!!! error TS2322: Type '() => void' is not assignable to type 'i1'. - //var obj7: i1 = function foo() { }; - var obj8: i1 = anyVar; - var obj9: i1 = new anyVar; - ~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i1'. - ~ -!!! error TS1109: Expression expected. - ~~ -!!! error TS2693: 'i1' only refers to a type, but is being used as a value here. - var obj10: i1 = new {}; - ~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type '{}' has no construct signatures. - // - // Call signatures - // - var obj11: i2; - var obj12: i2 = {}; - ~~~~~ -!!! error TS2322: Type '{}' is not assignable to type 'i2'. -!!! error TS2322: Type '{}' provides no match for the signature '(): any'. - var obj13: i2 = new Object(); - ~~~~~ -!!! error TS2322: Type 'Object' is not assignable to type 'i2'. -!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? -!!! error TS2322: Type 'Object' provides no match for the signature '(): any'. - var obj14: i2 = new obj11; - ~~~~~~~~~ -!!! error TS2350: Only a void function can be called with the 'new' keyword. - var obj15: i2 = new Base; - ~~~~~ -!!! error TS2322: Type 'Base' is not assignable to type 'i2'. -!!! error TS2322: Type 'Base' provides no match for the signature '(): any'. - var obj16: i2 = null; - var obj17: i2 = function ():any { return 0; }; - //var obj18: i2 = function foo() { }; - var obj19: i2 = anyVar; - var obj20: i2 = new anyVar; - ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i2'. - ~ -!!! error TS1109: Expression expected. - ~~ -!!! error TS2693: 'i2' only refers to a type, but is being used as a value here. - var obj21: i2 = new {}; - ~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type '{}' has no construct signatures. - // - // Construct Signatures - // - var obj22: i3; - var obj23: i3 = {}; - ~~~~~ -!!! error TS2322: Type '{}' is not assignable to type 'i3'. -!!! error TS2322: Type '{}' provides no match for the signature 'new (): any'. - var obj24: i3 = new Object(); - ~~~~~ -!!! error TS2322: Type 'Object' is not assignable to type 'i3'. -!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? -!!! error TS2322: Type 'Object' provides no match for the signature 'new (): any'. - var obj25: i3 = new obj22; - var obj26: i3 = new Base; - ~~~~~ -!!! error TS2322: Type 'Base' is not assignable to type 'i3'. -!!! error TS2322: Type 'Base' provides no match for the signature 'new (): any'. - var obj27: i3 = null; - var obj28: i3 = function () { }; - ~~~~~ -!!! error TS2322: Type '() => void' is not assignable to type 'i3'. -!!! error TS2322: Type '() => void' provides no match for the signature 'new (): any'. - //var obj29: i3 = function foo() { }; - var obj30: i3 = anyVar; - var obj31: i3 = new anyVar; - ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i3'. - ~ -!!! error TS1109: Expression expected. - ~~ -!!! error TS2693: 'i3' only refers to a type, but is being used as a value here. - var obj32: i3 = new {}; - ~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type '{}' has no construct signatures. - // - // Index Signatures - // - var obj33: i4; - var obj34: i4 = {}; - var obj35: i4 = new Object(); - var obj36: i4 = new obj33; - ~~~~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type 'i4' has no construct signatures. - var obj37: i4 = new Base; - var obj38: i4 = null; - var obj39: i4 = function () { }; - //var obj40: i4 = function foo() { }; - var obj41: i4 = anyVar; - var obj42: i4 = new anyVar; - ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i4'. - ~ -!!! error TS1109: Expression expected. - ~~ -!!! error TS2693: 'i4' only refers to a type, but is being used as a value here. - var obj43: i4 = new {}; - ~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type '{}' has no construct signatures. - // - // Interface Derived I1 - // - var obj44: i5; - var obj45: i5 = {}; - ~~~~~ -!!! error TS2739: Type '{}' is missing the following properties from type 'i5': p, p3, p6 - var obj46: i5 = new Object(); - ~~~~~ -!!! error TS2696: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? -!!! error TS2696: Type 'Object' is missing the following properties from type 'i5': p, p3, p6 - var obj47: i5 = new obj44; - ~~~~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type 'i5' has no construct signatures. - var obj48: i5 = new Base; - ~~~~~ -!!! error TS2739: Type 'Base' is missing the following properties from type 'i5': p, p3, p6 - var obj49: i5 = null; - var obj50: i5 = function () { }; - ~~~~~ -!!! error TS2322: Type '() => void' is not assignable to type 'i5'. - //var obj51: i5 = function foo() { }; - var obj52: i5 = anyVar; - var obj53: i5 = new anyVar; - ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i5'. - ~ -!!! error TS1109: Expression expected. - ~~ -!!! error TS2693: 'i5' only refers to a type, but is being used as a value here. - var obj54: i5 = new {}; - ~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type '{}' has no construct signatures. - // - // Interface Derived I2 - // - var obj55: i6; - var obj56: i6 = {}; - ~~~~~ -!!! error TS2322: Type '{}' is not assignable to type 'i6'. -!!! error TS2322: Type '{}' provides no match for the signature '(): any'. - var obj57: i6 = new Object(); - ~~~~~ -!!! error TS2322: Type 'Object' is not assignable to type 'i6'. -!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? -!!! error TS2322: Type 'Object' provides no match for the signature '(): any'. - var obj58: i6 = new obj55; - ~~~~~~~~~ -!!! error TS2350: Only a void function can be called with the 'new' keyword. - var obj59: i6 = new Base; - ~~~~~ -!!! error TS2322: Type 'Base' is not assignable to type 'i6'. -!!! error TS2322: Type 'Base' provides no match for the signature '(): any'. - var obj60: i6 = null; - var obj61: i6 = function () { }; - ~~~~~ -!!! error TS2322: Type '() => void' is not assignable to type 'i6'. -!!! error TS2322: Type 'void' is not assignable to type 'number'. - //var obj62: i6 = function foo() { }; - var obj63: i6 = anyVar; - var obj64: i6 = new anyVar; - ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i6'. - ~ -!!! error TS1109: Expression expected. - ~~ -!!! error TS2693: 'i6' only refers to a type, but is being used as a value here. - var obj65: i6 = new {}; - ~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type '{}' has no construct signatures. - // - // Interface Derived I3 - // - var obj66: i7; - var obj67: i7 = {}; - ~~~~~ -!!! error TS2322: Type '{}' is not assignable to type 'i7'. -!!! error TS2322: Type '{}' provides no match for the signature 'new (): any'. - var obj68: i7 = new Object(); - ~~~~~ -!!! error TS2322: Type 'Object' is not assignable to type 'i7'. -!!! error TS2322: The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? -!!! error TS2322: Type 'Object' provides no match for the signature 'new (): any'. - var obj69: i7 = new obj66; - var obj70: i7 = new Base; - ~~~~~~~~~~~~ -!!! error TS2352: Conversion of type 'Base' to type 'i7' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -!!! error TS2352: Type 'Base' provides no match for the signature 'new (): any'. - var obj71: i7 = null; - var obj72: i7 = function () { }; - ~~~~~ -!!! error TS2322: Type '() => void' is not assignable to type 'i7'. -!!! error TS2322: Type '() => void' provides no match for the signature 'new (): any'. - //var obj73: i7 = function foo() { }; - var obj74: i7 = anyVar; - var obj75: i7 = new anyVar; - ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i7'. - ~ -!!! error TS1109: Expression expected. - ~~ -!!! error TS2693: 'i7' only refers to a type, but is being used as a value here. - var obj76: i7 = new {}; - ~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type '{}' has no construct signatures. - // - // Interface Derived I4 - // - var obj77: i8; - var obj78: i8 = {}; - var obj79: i8 = new Object(); - var obj80: i8 = new obj77; - ~~~~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type 'i8' has no construct signatures. - var obj81: i8 = new Base; - var obj82: i8 = null; - var obj83: i8 = function () { }; - //var obj84: i8 = function foo() { }; - var obj85: i8 = anyVar; - var obj86: i8 = new anyVar; - ~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'i8'. - ~ -!!! error TS1109: Expression expected. - ~~ -!!! error TS2693: 'i8' only refers to a type, but is being used as a value here. - var obj87: i8 = new {}; - ~~ -!!! error TS2351: This expression is not constructable. -!!! error TS2351: Type '{}' has no construct signatures. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/literalTypesAndTypeAssertions.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/literalTypesAndTypeAssertions.d.ts deleted file mode 100644 index c5aac7e44d686..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/literalTypesAndTypeAssertions.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -//// [tests/cases/conformance/types/literal/literalTypesAndTypeAssertions.ts] //// - -//// [literalTypesAndTypeAssertions.ts] -const obj = { - a: "foo" as "foo", - b: <"foo">"foo", - c: "foo" -}; - -let x1 = 1 as (0 | 1); -let x2 = 1; - -let { a = "foo" } = { a: "foo" }; -let { b = "foo" as "foo" } = { b: "bar" }; -let { c = "foo" } = { c: "bar" as "bar" }; -let { d = "foo" as "foo" } = { d: "bar" as "bar" }; - - -/// [Declarations] //// - - - -//// [literalTypesAndTypeAssertions.d.ts] -declare const obj: { - a: "foo"; - b: "foo"; - c: string; -}; -declare let x1: 0 | 1; -declare let x2: number; -declare let a: invalid; -declare let b: invalid; -declare let c: invalid; -declare let d: invalid; - -/// [Errors] //// - -literalTypesAndTypeAssertions.ts(10,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. -literalTypesAndTypeAssertions.ts(11,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. -literalTypesAndTypeAssertions.ts(12,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. -literalTypesAndTypeAssertions.ts(13,7): error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. - - -==== literalTypesAndTypeAssertions.ts (4 errors) ==== - const obj = { - a: "foo" as "foo", - b: <"foo">"foo", - c: "foo" - }; - - let x1 = 1 as (0 | 1); - let x2 = 1; - - let { a = "foo" } = { a: "foo" }; - ~ -!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. - let { b = "foo" as "foo" } = { b: "bar" }; - ~ -!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. - let { c = "foo" } = { c: "bar" as "bar" }; - ~ -!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. - let { d = "foo" as "foo" } = { d: "bar" as "bar" }; - ~ -!!! error TS9019: Binding elements can't be exported directly with --isolatedDeclarations. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/moduleResolutionWithSuffixes_one_externalTSModule.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/moduleResolutionWithSuffixes_one_externalTSModule.d.ts deleted file mode 100644 index 7e69022659894..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/moduleResolutionWithSuffixes_one_externalTSModule.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -//// [tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts] //// - -//// [/test.ts] -import { ios } from "some-library"; - -//// [/node_modules/some-library/index.ios.ts] -export function ios() {} -//// [/node_modules/some-library/index.ts] -export function base() {} - -/// [Declarations] //// - - - -//// [/bin/test.d.ts] -export {}; - -/// [Errors] //// - -/node_modules/some-library/index.ios.ts(1,17): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. - - -==== /test.ts (0 errors) ==== - import { ios } from "some-library"; - -==== /node_modules/some-library/index.ios.ts (1 errors) ==== - export function ios() {} - ~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 /node_modules/some-library/index.ios.ts:1:17: Add a return type to the function declaration. -==== /node_modules/some-library/index.ts (0 errors) ==== - export function base() {} \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/noUncheckedIndexedAccess.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/noUncheckedIndexedAccess.d.ts deleted file mode 100644 index 7358020877e9e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/noUncheckedIndexedAccess.d.ts +++ /dev/null @@ -1,418 +0,0 @@ -//// [tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts] //// - -//// [noUncheckedIndexedAccess.ts] -type CheckBooleanOnly = any; -// Validate CheckBooleanOnly works - should error -type T_ERR1 = CheckBooleanOnly; - -enum NumericEnum1 { A, B, C } -enum NumericEnum2 { A = 0, B = 1 , C = 2 } -enum StringEnum1 { A = "Alpha", B = "Beta" } - -declare const strMap: { [s: string]: boolean }; - -// All of these should be errors -const e1: boolean = strMap["foo"]; -const e2: boolean = strMap.bar; -const e3: boolean = strMap[0]; -const e4: boolean = strMap[0 as string | number]; -const e5: boolean = strMap[0 as string | 0 | 1]; -const e6: boolean = strMap[0 as 0 | 1]; -const e7: boolean = strMap["foo" as "foo" | "baz"]; -const e8: boolean = strMap[NumericEnum1.A]; -const e9: boolean = strMap[NumericEnum2.A]; -const e10: boolean = strMap[StringEnum1.A]; -const e11: boolean = strMap[StringEnum1.A as StringEnum1]; -const e12: boolean = strMap[NumericEnum1.A as NumericEnum1]; -const e13: boolean = strMap[NumericEnum2.A as NumericEnum2]; -const e14: boolean = strMap[null as any]; - -// Should be OK -const ok1: boolean | undefined = strMap["foo"]; -const ok2: boolean | undefined = strMap.bar; - -type T_OK1 = CheckBooleanOnly<(typeof strMap)[string]>; -type T_OK2 = CheckBooleanOnly<(typeof strMap)["foo"]>; -type T_OK3 = CheckBooleanOnly<(typeof strMap)["bar" | "baz"]>; -type T_OK4 = CheckBooleanOnly<(typeof strMap)[number]>; -type T_OK5 = CheckBooleanOnly<(typeof strMap)[any]>; - -// Writes don't allow 'undefined'; all should be errors -strMap["baz"] = undefined; -strMap.qua = undefined; -strMap[0] = undefined; -strMap[null as any] = undefined; - -// Numeric lookups are unaffected -declare const numMap: { [s: number]: boolean }; -// All of these should be ok -const num_ok1: boolean = numMap[0]; -const num_ok2: boolean = numMap[0 as number]; -const num_ok3: boolean = numMap[0 as 0 | 1]; -const num_ok4: boolean = numMap[NumericEnum1.A]; -const num_ok5: boolean = numMap[NumericEnum2.A]; - -// Generics -function generic1(arg: T): boolean { - // Should error - return arg["blah"]; -} -function generic2(arg: T): boolean { - // Should OK - return arg["blah"]!; -} -function generic3(arg: T): boolean { - // Should error - return strMap[arg]; -} - -// Element access into known properties is ok -declare const obj1: { x: string, y: number, [key: string]: string | number }; -obj1["x"]; -const y = "y"; -obj1[y]; -let yy = "y"; -obj1[yy]; -let z = "z"; -obj1[z]; - -// Distributivity cases -declare const strMapUnion: { [s: string]: boolean } | { [s: string]: number }; -// Should error -const f1: boolean | number = strMapUnion["foo"]; - -// Symbol index signatures -declare const s: unique symbol; -declare const symbolMap: { [s]: string }; -const e15: string = symbolMap[s]; // Should OK -symbolMap[s] = undefined; // Should error - -// Variadic tuples -declare const nonEmptyStringArray: [string, ...string[]]; -const variadicOk1: string = nonEmptyStringArray[0]; // Should OK -const variadicError1: string = nonEmptyStringArray[1]; // Should error - -// Generic index type -declare const myRecord1: { a: string; b: string }; -declare const myRecord2: { a: string; b: string, [key: string]: string }; -const fn1 = (key: Key): string => myRecord1[key]; // Should OK -const fn2 = (key: Key): string => myRecord2[key]; // Should OK -const fn3 = (key: Key) => { - myRecord2[key] = undefined; // Should error - const v: string = myRecord2[key]; // Should error -}; - - - -/// [Declarations] //// - - - -//// [noUncheckedIndexedAccess.d.ts] -type CheckBooleanOnly = any; -type T_ERR1 = CheckBooleanOnly; -declare enum NumericEnum1 { - A = 0, - B = 1, - C = 2 -} -declare enum NumericEnum2 { - A = 0, - B = 1, - C = 2 -} -declare enum StringEnum1 { - A = "Alpha", - B = "Beta" -} -declare const strMap: { - [s: string]: boolean; -}; -declare const e1: boolean; -declare const e2: boolean; -declare const e3: boolean; -declare const e4: boolean; -declare const e5: boolean; -declare const e6: boolean; -declare const e7: boolean; -declare const e8: boolean; -declare const e9: boolean; -declare const e10: boolean; -declare const e11: boolean; -declare const e12: boolean; -declare const e13: boolean; -declare const e14: boolean; -declare const ok1: boolean | undefined; -declare const ok2: boolean | undefined; -type T_OK1 = CheckBooleanOnly<(typeof strMap)[string]>; -type T_OK2 = CheckBooleanOnly<(typeof strMap)["foo"]>; -type T_OK3 = CheckBooleanOnly<(typeof strMap)["bar" | "baz"]>; -type T_OK4 = CheckBooleanOnly<(typeof strMap)[number]>; -type T_OK5 = CheckBooleanOnly<(typeof strMap)[any]>; -declare const numMap: { - [s: number]: boolean; -}; -declare const num_ok1: boolean; -declare const num_ok2: boolean; -declare const num_ok3: boolean; -declare const num_ok4: boolean; -declare const num_ok5: boolean; -declare function generic1(arg: T): boolean; -declare function generic2(arg: T): boolean; -declare function generic3(arg: T): boolean; -declare const obj1: { - x: string; - y: number; - [key: string]: string | number; -}; -declare const y = "y"; -declare let yy: string; -declare let z: string; -declare const strMapUnion: { - [s: string]: boolean; -} | { - [s: string]: number; -}; -declare const f1: boolean | number; -declare const s: unique symbol; -declare const symbolMap: { - [s]: string; -}; -declare const e15: string; -declare const nonEmptyStringArray: [string, ...string[]]; -declare const variadicOk1: string; -declare const variadicError1: string; -declare const myRecord1: { - a: string; - b: string; -}; -declare const myRecord2: { - a: string; - b: string; - [key: string]: string; -}; -declare const fn1: (key: Key) => string; -declare const fn2: (key: Key) => string; -declare const fn3: (key: Key) => invalid; - -/// [Errors] //// - -noUncheckedIndexedAccess.ts(3,32): error TS2344: Type 'boolean | undefined' does not satisfy the constraint 'boolean'. - Type 'undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(12,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - Type 'undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(13,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(14,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(15,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(16,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(17,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(18,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(19,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(20,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(21,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(22,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(23,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(24,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(25,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(38,1): error TS2322: Type 'undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(39,1): error TS2322: Type 'undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(40,1): error TS2322: Type 'undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(41,1): error TS2322: Type 'undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(46,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(47,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(48,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(49,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(50,7): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(55,5): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(63,5): error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -noUncheckedIndexedAccess.ts(79,7): error TS2322: Type 'number | boolean | undefined' is not assignable to type 'number | boolean'. - Type 'undefined' is not assignable to type 'number | boolean'. -noUncheckedIndexedAccess.ts(85,1): error TS2322: Type 'undefined' is not assignable to type 'string'. -noUncheckedIndexedAccess.ts(90,7): error TS2322: Type 'string | undefined' is not assignable to type 'string'. - Type 'undefined' is not assignable to type 'string'. -noUncheckedIndexedAccess.ts(97,13): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -noUncheckedIndexedAccess.ts(98,5): error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. - Type 'undefined' is not assignable to type 'string'. -noUncheckedIndexedAccess.ts(99,11): error TS2322: Type 'string | undefined' is not assignable to type 'string'. - Type 'undefined' is not assignable to type 'string'. - - -==== noUncheckedIndexedAccess.ts (32 errors) ==== - type CheckBooleanOnly = any; - // Validate CheckBooleanOnly works - should error - type T_ERR1 = CheckBooleanOnly; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2344: Type 'boolean | undefined' does not satisfy the constraint 'boolean'. -!!! error TS2344: Type 'undefined' is not assignable to type 'boolean'. - - enum NumericEnum1 { A, B, C } - enum NumericEnum2 { A = 0, B = 1 , C = 2 } - enum StringEnum1 { A = "Alpha", B = "Beta" } - - declare const strMap: { [s: string]: boolean }; - - // All of these should be errors - const e1: boolean = strMap["foo"]; - ~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. -!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. - const e2: boolean = strMap.bar; - ~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e3: boolean = strMap[0]; - ~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e4: boolean = strMap[0 as string | number]; - ~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e5: boolean = strMap[0 as string | 0 | 1]; - ~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e6: boolean = strMap[0 as 0 | 1]; - ~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e7: boolean = strMap["foo" as "foo" | "baz"]; - ~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e8: boolean = strMap[NumericEnum1.A]; - ~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e9: boolean = strMap[NumericEnum2.A]; - ~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e10: boolean = strMap[StringEnum1.A]; - ~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e11: boolean = strMap[StringEnum1.A as StringEnum1]; - ~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e12: boolean = strMap[NumericEnum1.A as NumericEnum1]; - ~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e13: boolean = strMap[NumericEnum2.A as NumericEnum2]; - ~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const e14: boolean = strMap[null as any]; - ~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - - // Should be OK - const ok1: boolean | undefined = strMap["foo"]; - const ok2: boolean | undefined = strMap.bar; - - type T_OK1 = CheckBooleanOnly<(typeof strMap)[string]>; - type T_OK2 = CheckBooleanOnly<(typeof strMap)["foo"]>; - type T_OK3 = CheckBooleanOnly<(typeof strMap)["bar" | "baz"]>; - type T_OK4 = CheckBooleanOnly<(typeof strMap)[number]>; - type T_OK5 = CheckBooleanOnly<(typeof strMap)[any]>; - - // Writes don't allow 'undefined'; all should be errors - strMap["baz"] = undefined; - ~~~~~~~~~~~~~ -!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. - strMap.qua = undefined; - ~~~~~~~~~~ -!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. - strMap[0] = undefined; - ~~~~~~~~~ -!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. - strMap[null as any] = undefined; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'. - - // Numeric lookups are unaffected - declare const numMap: { [s: number]: boolean }; - // All of these should be ok - const num_ok1: boolean = numMap[0]; - ~~~~~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const num_ok2: boolean = numMap[0 as number]; - ~~~~~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const num_ok3: boolean = numMap[0 as 0 | 1]; - ~~~~~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const num_ok4: boolean = numMap[NumericEnum1.A]; - ~~~~~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - const num_ok5: boolean = numMap[NumericEnum2.A]; - ~~~~~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - - // Generics - function generic1(arg: T): boolean { - // Should error - return arg["blah"]; - ~~~~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - } - function generic2(arg: T): boolean { - // Should OK - return arg["blah"]!; - } - function generic3(arg: T): boolean { - // Should error - return strMap[arg]; - ~~~~~~ -!!! error TS2322: Type 'boolean | undefined' is not assignable to type 'boolean'. - } - - // Element access into known properties is ok - declare const obj1: { x: string, y: number, [key: string]: string | number }; - obj1["x"]; - const y = "y"; - obj1[y]; - let yy = "y"; - obj1[yy]; - let z = "z"; - obj1[z]; - - // Distributivity cases - declare const strMapUnion: { [s: string]: boolean } | { [s: string]: number }; - // Should error - const f1: boolean | number = strMapUnion["foo"]; - ~~ -!!! error TS2322: Type 'number | boolean | undefined' is not assignable to type 'number | boolean'. -!!! error TS2322: Type 'undefined' is not assignable to type 'number | boolean'. - - // Symbol index signatures - declare const s: unique symbol; - declare const symbolMap: { [s]: string }; - const e15: string = symbolMap[s]; // Should OK - symbolMap[s] = undefined; // Should error - ~~~~~~~~~~~~ -!!! error TS2322: Type 'undefined' is not assignable to type 'string'. - - // Variadic tuples - declare const nonEmptyStringArray: [string, ...string[]]; - const variadicOk1: string = nonEmptyStringArray[0]; // Should OK - const variadicError1: string = nonEmptyStringArray[1]; // Should error - ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'string | undefined' is not assignable to type 'string'. -!!! error TS2322: Type 'undefined' is not assignable to type 'string'. - - // Generic index type - declare const myRecord1: { a: string; b: string }; - declare const myRecord2: { a: string; b: string, [key: string]: string }; - const fn1 = (key: Key): string => myRecord1[key]; // Should OK - const fn2 = (key: Key): string => myRecord2[key]; // Should OK - const fn3 = (key: Key) => { - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 noUncheckedIndexedAccess.ts:97:7: Add a type annotation to the variable fn3. -!!! related TS9030 noUncheckedIndexedAccess.ts:97:13: Add a return type to the function expression. - myRecord2[key] = undefined; // Should error - ~~~~~~~~~~~~~~ -!!! error TS2322: Type 'undefined' is not assignable to type '{ [key: string]: string; a: string; b: string; }[Key]'. -!!! error TS2322: Type 'undefined' is not assignable to type 'string'. - const v: string = myRecord2[key]; // Should error - ~ -!!! error TS2322: Type 'string | undefined' is not assignable to type 'string'. -!!! error TS2322: Type 'undefined' is not assignable to type 'string'. - }; - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralEnumPropertyNames.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralEnumPropertyNames.d.ts deleted file mode 100644 index a4fe0a8f3d18b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralEnumPropertyNames.d.ts +++ /dev/null @@ -1,102 +0,0 @@ -//// [tests/cases/compiler/objectLiteralEnumPropertyNames.ts] //// - -//// [objectLiteralEnumPropertyNames.ts] -// Fixes #16887 -enum Strs { - A = 'a', - B = 'b' -} -type TestStrs = { [key in Strs]: string } -const x: TestStrs = { - [Strs.A]: 'xo', - [Strs.B]: 'xe' -} -const ux = { - [Strs.A]: 'xo', - [Strs.B]: 'xe' -} -const y: TestStrs = { - ['a']: 'yo', - ['b']: 'ye' -} -const a = 'a'; -const b = 'b'; -const z: TestStrs = { - [a]: 'zo', - [b]: 'ze' -} -const uz = { - [a]: 'zo', - [b]: 'ze' -} - -enum Nums { - A, - B -} -type TestNums = { 0: number, 1: number } -const n: TestNums = { - [Nums.A]: 1, - [Nums.B]: 2 -} -const un = { - [Nums.A]: 3, - [Nums.B]: 4 -} -const an = 0; -const bn = 1; -const m: TestNums = { - [an]: 5, - [bn]: 6 -} -const um = { - [an]: 7, - [bn]: 8 -} - - -/// [Declarations] //// - - - -//// [objectLiteralEnumPropertyNames.d.ts] -declare enum Strs { - A = "a", - B = "b" -} -type TestStrs = { - [key in Strs]: string; -}; -declare const x: TestStrs; -declare const ux: { - a: string; - b: string; -}; -declare const y: TestStrs; -declare const a = "a"; -declare const b = "b"; -declare const z: TestStrs; -declare const uz: { - a: string; - b: string; -}; -declare enum Nums { - A = 0, - B = 1 -} -type TestNums = { - 0: number; - 1: number; -}; -declare const n: TestNums; -declare const un: { - 0: number; - 1: number; -}; -declare const an = 0; -declare const bn = 1; -declare const m: TestNums; -declare const um: { - 0: number; - 1: number; -}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralGettersAndSetters.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralGettersAndSetters.d.ts deleted file mode 100644 index b3ed5159a2b1b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/objectLiteralGettersAndSetters.d.ts +++ /dev/null @@ -1,309 +0,0 @@ -//// [tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts] //// - -//// [objectLiteralGettersAndSetters.ts] -// Get and set accessor with the same name -var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; -var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } }; -var sameName3a = { get 0x20() { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; -var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p: string; } }; -var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p: string; } }; -var sameName6a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; - -// PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} -var callSig1 = { num(n: number) { return '' } }; -var callSig1: { num: (n: number) => string; }; -var callSig2 = { num: function (n: number) { return '' } }; -var callSig2: { num: (n: number) => string; }; -var callSig3 = { num: (n: number) => '' }; -var callSig3: { num: (n: number) => string; }; - -// Get accessor only, type of the property is the annotated return type of the get accessor -var getter1 = { get x(): string { return undefined; } }; -var getter1: { readonly x: string; } - -// Get accessor only, type of the property is the inferred return type of the get accessor -var getter2 = { get x() { return ''; } }; -var getter2: { readonly x: string; } - -// Set accessor only, type of the property is the param type of the set accessor -var setter1 = { set x(n: number) { } }; -var setter1: { x: number }; - -// Set accessor only, type of the property is Any for an unannotated set accessor -var setter2 = { set x(n) { } }; -var setter2: { x: any }; - -var anyVar: any; -// Get and set accessor with matching type annotations -var sameType1 = { get x(): string { return undefined; }, set x(n: string) { } }; -var sameType2 = { get x(): Array { return undefined; }, set x(n: number[]) { } }; -var sameType3 = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; -var sameType4 = { get x(): Date { return undefined; }, set x(n: Date) { } }; - -// Type of unannotated get accessor return type is the type annotation of the set accessor param -var setParamType1 = { - set n(x: (t: string) => void) { }, - get n() { return (t) => { - var p: string; - var p = t; - } - } -}; -var setParamType2 = { - get n() { return (t) => { - var p: string; - var p = t; - } - }, - set n(x: (t: string) => void) { } -}; - -// Type of unannotated set accessor parameter is the return type annotation of the get accessor -var getParamType1 = { - set n(x) { - var y = x; - var y: string; - }, - get n() { return ''; } -}; -var getParamType2 = { - get n() { return ''; }, - set n(x) { - var y = x; - var y: string; - } -}; - -// Type of unannotated accessors is the inferred return type of the get accessor -var getParamType3 = { - get n() { return ''; }, - set n(x) { - var y = x; - var y: string; - } -}; - - - -/// [Declarations] //// - - - -//// [objectLiteralGettersAndSetters.d.ts] -declare var sameName1a: invalid; -declare var sameName2a: invalid; -declare var sameName3a: invalid; -declare var sameName4a: invalid; -declare var sameName5a: invalid; -declare var sameName6a: invalid; -declare var callSig1: invalid; -declare var callSig1: { - num: (n: number) => string; -}; -declare var callSig2: invalid; -declare var callSig2: { - num: (n: number) => string; -}; -declare var callSig3: invalid; -declare var callSig3: { - num: (n: number) => string; -}; -declare var getter1: { - readonly x: string; -}; -declare var getter1: { - readonly x: string; -}; -declare var getter2: invalid; -declare var getter2: { - readonly x: string; -}; -declare var setter1: { - x: number; -}; -declare var setter1: { - x: number; -}; -declare var setter2: invalid; -declare var setter2: { - x: any; -}; -declare var anyVar: any; -declare var sameType1: { - x: string; -}; -declare var sameType2: { - x: number[]; -}; -declare var sameType3: { - x: any; -}; -declare var sameType4: { - x: Date; -}; -declare var setParamType1: { - n: (t: string) => void; -}; -declare var setParamType2: { - n: (t: string) => void; -}; -declare var getParamType1: invalid; -declare var getParamType2: invalid; -declare var getParamType3: invalid; - -/// [Errors] //// - -objectLiteralGettersAndSetters.ts(2,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(3,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(4,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(5,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(6,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(7,24): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(10,18): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(12,23): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(14,23): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(22,21): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(30,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(64,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(67,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -objectLiteralGettersAndSetters.ts(76,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - -==== objectLiteralGettersAndSetters.ts (14 errors) ==== - // Get and set accessor with the same name - var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 objectLiteralGettersAndSetters.ts:2:50: Add a type to parameter of the set accessor declaration. -!!! related TS9032 objectLiteralGettersAndSetters.ts:2:24: Add a return type to the get accessor declaration. - var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } }; - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 objectLiteralGettersAndSetters.ts:3:50: Add a type to parameter of the set accessor declaration. -!!! related TS9032 objectLiteralGettersAndSetters.ts:3:24: Add a return type to the get accessor declaration. - var sameName3a = { get 0x20() { return ''; }, set 3.2e1(n) { var p = n; var p: string; } }; - ~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 objectLiteralGettersAndSetters.ts:4:51: Add a type to parameter of the set accessor declaration. -!!! related TS9032 objectLiteralGettersAndSetters.ts:4:24: Add a return type to the get accessor declaration. - var sameName4a = { get ''() { return ''; }, set ""(n) { var p = n; var p: string; } }; - ~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 objectLiteralGettersAndSetters.ts:5:49: Add a type to parameter of the set accessor declaration. -!!! related TS9032 objectLiteralGettersAndSetters.ts:5:24: Add a return type to the get accessor declaration. - var sameName5a = { get '\t'() { return ''; }, set '\t'(n) { var p = n; var p: string; } }; - ~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 objectLiteralGettersAndSetters.ts:6:51: Add a type to parameter of the set accessor declaration. -!!! related TS9032 objectLiteralGettersAndSetters.ts:6:24: Add a return type to the get accessor declaration. - var sameName6a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 objectLiteralGettersAndSetters.ts:7:50: Add a type to parameter of the set accessor declaration. -!!! related TS9032 objectLiteralGettersAndSetters.ts:7:24: Add a return type to the get accessor declaration. - - // PropertyName CallSignature{FunctionBody} is equivalent to PropertyName:function CallSignature{FunctionBody} - var callSig1 = { num(n: number) { return '' } }; - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 objectLiteralGettersAndSetters.ts:10:5: Add a type annotation to the variable callSig1. -!!! related TS9034 objectLiteralGettersAndSetters.ts:10:18: Add a return type to the method - var callSig1: { num: (n: number) => string; }; - var callSig2 = { num: function (n: number) { return '' } }; - ~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 objectLiteralGettersAndSetters.ts:12:5: Add a type annotation to the variable callSig2. -!!! related TS9030 objectLiteralGettersAndSetters.ts:12:23: Add a return type to the function expression. - var callSig2: { num: (n: number) => string; }; - var callSig3 = { num: (n: number) => '' }; - ~~~~~~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 objectLiteralGettersAndSetters.ts:14:5: Add a type annotation to the variable callSig3. -!!! related TS9030 objectLiteralGettersAndSetters.ts:14:23: Add a return type to the function expression. - var callSig3: { num: (n: number) => string; }; - - // Get accessor only, type of the property is the annotated return type of the get accessor - var getter1 = { get x(): string { return undefined; } }; - var getter1: { readonly x: string; } - - // Get accessor only, type of the property is the inferred return type of the get accessor - var getter2 = { get x() { return ''; } }; - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 objectLiteralGettersAndSetters.ts:22:21: Add a return type to the get accessor declaration. - var getter2: { readonly x: string; } - - // Set accessor only, type of the property is the param type of the set accessor - var setter1 = { set x(n: number) { } }; - var setter1: { x: number }; - - // Set accessor only, type of the property is Any for an unannotated set accessor - var setter2 = { set x(n) { } }; - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 objectLiteralGettersAndSetters.ts:30:21: Add a type to parameter of the set accessor declaration. - var setter2: { x: any }; - - var anyVar: any; - // Get and set accessor with matching type annotations - var sameType1 = { get x(): string { return undefined; }, set x(n: string) { } }; - var sameType2 = { get x(): Array { return undefined; }, set x(n: number[]) { } }; - var sameType3 = { get x(): any { return undefined; }, set x(n: typeof anyVar) { } }; - var sameType4 = { get x(): Date { return undefined; }, set x(n: Date) { } }; - - // Type of unannotated get accessor return type is the type annotation of the set accessor param - var setParamType1 = { - set n(x: (t: string) => void) { }, - get n() { return (t) => { - var p: string; - var p = t; - } - } - }; - var setParamType2 = { - get n() { return (t) => { - var p: string; - var p = t; - } - }, - set n(x: (t: string) => void) { } - }; - - // Type of unannotated set accessor parameter is the return type annotation of the get accessor - var getParamType1 = { - set n(x) { - var y = x; - var y: string; - }, - get n() { return ''; } - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 objectLiteralGettersAndSetters.ts:60:9: Add a type to parameter of the set accessor declaration. -!!! related TS9032 objectLiteralGettersAndSetters.ts:64:9: Add a return type to the get accessor declaration. - }; - var getParamType2 = { - get n() { return ''; }, - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 objectLiteralGettersAndSetters.ts:68:9: Add a type to parameter of the set accessor declaration. -!!! related TS9032 objectLiteralGettersAndSetters.ts:67:9: Add a return type to the get accessor declaration. - set n(x) { - var y = x; - var y: string; - } - }; - - // Type of unannotated accessors is the inferred return type of the get accessor - var getParamType3 = { - get n() { return ''; }, - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 objectLiteralGettersAndSetters.ts:77:9: Add a type to parameter of the set accessor declaration. -!!! related TS9032 objectLiteralGettersAndSetters.ts:76:9: Add a return type to the get accessor declaration. - set n(x) { - var y = x; - var y: string; - } - }; - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/optionalChainingInference.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/optionalChainingInference.d.ts deleted file mode 100644 index c793c31e17a9c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/optionalChainingInference.d.ts +++ /dev/null @@ -1,140 +0,0 @@ -//// [tests/cases/conformance/expressions/optionalChaining/optionalChainingInference.ts] //// - -//// [optionalChainingInference.ts] -// https://github.com/microsoft/TypeScript/issues/34579 -declare function unbox(box: { value: T | undefined }): T; -declare const su: string | undefined; -declare const fnu: (() => number) | undefined; -declare const osu: { prop: string } | undefined; -declare const ofnu: { prop: () => number } | undefined; - -const b1 = { value: su?.length }; -const v1: number = unbox(b1); - -const b2 = { value: su?.length as number | undefined }; -const v2: number = unbox(b2); - -const b3: { value: number | undefined } = { value: su?.length }; -const v3: number = unbox(b3); - -const b4 = { value: fnu?.() }; -const v4: number = unbox(b4); - -const b5 = { value: su?.["length"] }; -const v5: number = unbox(b5); - -const b6 = { value: osu?.prop.length }; -const v6: number = unbox(b6); - -const b7 = { value: osu?.prop["length"] }; -const v7: number = unbox(b7); - -const b8 = { value: ofnu?.prop() }; -const v8: number = unbox(b8); - - - -/// [Declarations] //// - - - -//// [optionalChainingInference.d.ts] -declare function unbox(box: { - value: T | undefined; -}): T; -declare const su: string | undefined; -declare const fnu: (() => number) | undefined; -declare const osu: { - prop: string; -} | undefined; -declare const ofnu: { - prop: () => number; -} | undefined; -declare const b1: invalid; -declare const v1: number; -declare const b2: { - value: number; -}; -declare const v2: number; -declare const b3: { - value: number | undefined; -}; -declare const v3: number; -declare const b4: invalid; -declare const v4: number; -declare const b5: invalid; -declare const v5: number; -declare const b6: invalid; -declare const v6: number; -declare const b7: invalid; -declare const v7: number; -declare const b8: invalid; -declare const v8: number; - -/// [Errors] //// - -optionalChainingInference.ts(8,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -optionalChainingInference.ts(17,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -optionalChainingInference.ts(20,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -optionalChainingInference.ts(23,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -optionalChainingInference.ts(26,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. -optionalChainingInference.ts(29,21): error TS9013: Expression type can't be inferred with --isolatedDeclarations. - - -==== optionalChainingInference.ts (6 errors) ==== - // https://github.com/microsoft/TypeScript/issues/34579 - declare function unbox(box: { value: T | undefined }): T; - declare const su: string | undefined; - declare const fnu: (() => number) | undefined; - declare const osu: { prop: string } | undefined; - declare const ofnu: { prop: () => number } | undefined; - - const b1 = { value: su?.length }; - ~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 optionalChainingInference.ts:8:7: Add a type annotation to the variable b1. -!!! related TS9035 optionalChainingInference.ts:8:21: Add a type assertion to this expression to make type type explicit. - const v1: number = unbox(b1); - - const b2 = { value: su?.length as number | undefined }; - const v2: number = unbox(b2); - - const b3: { value: number | undefined } = { value: su?.length }; - const v3: number = unbox(b3); - - const b4 = { value: fnu?.() }; - ~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 optionalChainingInference.ts:17:7: Add a type annotation to the variable b4. -!!! related TS9035 optionalChainingInference.ts:17:21: Add a type assertion to this expression to make type type explicit. - const v4: number = unbox(b4); - - const b5 = { value: su?.["length"] }; - ~~~~~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 optionalChainingInference.ts:20:7: Add a type annotation to the variable b5. -!!! related TS9035 optionalChainingInference.ts:20:21: Add a type assertion to this expression to make type type explicit. - const v5: number = unbox(b5); - - const b6 = { value: osu?.prop.length }; - ~~~~~~~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 optionalChainingInference.ts:23:7: Add a type annotation to the variable b6. -!!! related TS9035 optionalChainingInference.ts:23:21: Add a type assertion to this expression to make type type explicit. - const v6: number = unbox(b6); - - const b7 = { value: osu?.prop["length"] }; - ~~~~~~~~~~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 optionalChainingInference.ts:26:7: Add a type annotation to the variable b7. -!!! related TS9035 optionalChainingInference.ts:26:21: Add a type assertion to this expression to make type type explicit. - const v7: number = unbox(b7); - - const b8 = { value: ofnu?.prop() }; - ~~~~~~~~~~~~ -!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations. -!!! related TS9027 optionalChainingInference.ts:29:7: Add a type annotation to the variable b8. -!!! related TS9035 optionalChainingInference.ts:29:21: Add a type assertion to this expression to make type type explicit. - const v8: number = unbox(b8); - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts deleted file mode 100644 index 4b6db613a4151..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/overloadsWithComputedNames.d.ts +++ /dev/null @@ -1,218 +0,0 @@ -//// [tests/cases/compiler/overloadsWithComputedNames.ts] //// - -//// [overloadsWithComputedNames.ts] -// https://github.com/microsoft/TypeScript/issues/52329 -class Person { - ["B"](a: number): string; - ["A"](a: string|number): number | string { - return 0; - } -} -let p = new Person(); -p.A(0) -p.B(0) - -// https://github.com/microsoft/TypeScript/issues/17345 -class C { - ["foo"](): void - ["bar"](): void; - ["foo"]() { - return 0; - } -} - -declare const uniqueSym: unique symbol; -declare const uniqueSym2: unique symbol; -declare const sym: symbol; - -declare const strUnion: 'foo' | 'bar'; - -class C1 { - [sym](): void; // should error - [uniqueSym2](): void; // should error - [uniqueSym](): void; - [uniqueSym]() { } -} - -interface I1 { - [sym](): void; // should error - [uniqueSym2](): void; - [uniqueSym](): void; - [uniqueSym](): void; -} - -class C2 { - [strUnion](): void; // should error - [strUnion]() { } -} - -class I2 { - [strUnion](): void; // should error - [strUnion]() { } -} - -class C3 { - [1](): void; // should error - [2](): void; - [2]() { } -} - -interface I3 { - [1](): void; - [2](): void; - [2](): void; -} - -/// [Declarations] //// - - - -//// [overloadsWithComputedNames.d.ts] -declare class Person { - ["B"](a: number): string; - ["A"](a: string | number): number | string; -} -declare let p: invalid; -declare class C { - ["foo"](): void; - ["bar"](): void; -} -declare const uniqueSym: unique symbol; -declare const uniqueSym2: unique symbol; -declare const sym: symbol; -declare const strUnion: 'foo' | 'bar'; -declare class C1 { - [uniqueSym2](): void; - [uniqueSym](): void; -} -interface I1 { - [uniqueSym2](): void; - [uniqueSym](): void; - [uniqueSym](): void; -} -declare class C2 { -} -declare class I2 { -} -declare class C3 { - [1](): void; - [2](): void; -} -interface I3 { - [1](): void; - [2](): void; - [2](): void; -} - -/// [Errors] //// - -overloadsWithComputedNames.ts(4,5): error TS2389: Function implementation name must be '["B"]'. -overloadsWithComputedNames.ts(8,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -overloadsWithComputedNames.ts(14,5): error TS2391: Function implementation is missing or not immediately following the declaration. -overloadsWithComputedNames.ts(16,5): error TS2389: Function implementation name must be '["bar"]'. -overloadsWithComputedNames.ts(28,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -overloadsWithComputedNames.ts(28,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -overloadsWithComputedNames.ts(29,5): error TS2391: Function implementation is missing or not immediately following the declaration. -overloadsWithComputedNames.ts(35,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. -overloadsWithComputedNames.ts(42,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -overloadsWithComputedNames.ts(42,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -overloadsWithComputedNames.ts(43,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -overloadsWithComputedNames.ts(47,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -overloadsWithComputedNames.ts(47,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -overloadsWithComputedNames.ts(48,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -overloadsWithComputedNames.ts(52,5): error TS2391: Function implementation is missing or not immediately following the declaration. - - -==== overloadsWithComputedNames.ts (15 errors) ==== - // https://github.com/microsoft/TypeScript/issues/52329 - class Person { - ["B"](a: number): string; - ["A"](a: string|number): number | string { - ~~~~~ -!!! error TS2389: Function implementation name must be '["B"]'. - return 0; - } - } - let p = new Person(); - ~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 overloadsWithComputedNames.ts:8:5: Add a type annotation to the variable p. - p.A(0) - p.B(0) - - // https://github.com/microsoft/TypeScript/issues/17345 - class C { - ["foo"](): void - ~~~~~~~ -!!! error TS2391: Function implementation is missing or not immediately following the declaration. - ["bar"](): void; - ["foo"]() { - ~~~~~~~ -!!! error TS2389: Function implementation name must be '["bar"]'. - return 0; - } - } - - declare const uniqueSym: unique symbol; - declare const uniqueSym2: unique symbol; - declare const sym: symbol; - - declare const strUnion: 'foo' | 'bar'; - - class C1 { - [sym](): void; // should error - ~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - [uniqueSym2](): void; // should error - ~~~~~~~~~~~~ -!!! error TS2391: Function implementation is missing or not immediately following the declaration. - [uniqueSym](): void; - [uniqueSym]() { } - } - - interface I1 { - [sym](): void; // should error - ~~~~~ -!!! 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. - [uniqueSym2](): void; - [uniqueSym](): void; - [uniqueSym](): void; - } - - class C2 { - [strUnion](): void; // should error - ~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - [strUnion]() { } - ~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } - - class I2 { - [strUnion](): void; // should error - ~~~~~~~~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - [strUnion]() { } - ~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } - - class C3 { - [1](): void; // should error - ~~~ -!!! error TS2391: Function implementation is missing or not immediately following the declaration. - [2](): void; - [2]() { } - } - - interface I3 { - [1](): void; - [2](): void; - [2](): void; - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNonNullableTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNonNullableTypes.d.ts deleted file mode 100644 index 5bb58ff76710f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNonNullableTypes.d.ts +++ /dev/null @@ -1,131 +0,0 @@ -//// [tests/cases/compiler/parseInvalidNonNullableTypes.ts] //// - -//// [parseInvalidNonNullableTypes.ts] -function f1(a: string): a is string! { - return true; -} - -function f2(a: string): a is !string { - return true; -} - -function f3(a: string!) {} -function f4(a: number!) {} - -function f5(a: !string) {} -function f6(a: !number) {} - -function f7(): string! {} -function f8(): !string {} - -const a = 1 as any!; -const b: number! = 1; - -const c = 1 as !any; -const d: !number = 1; - - -/// [Declarations] //// - - - -//// [parseInvalidNonNullableTypes.d.ts] -declare function f1(a: string): a is !string; -declare function f2(a: string): a is !string; -declare function f3(a: !string): invalid; -declare function f4(a: !number): invalid; -declare function f5(a: !string): invalid; -declare function f6(a: !number): invalid; -declare function f7(): !string; -declare function f8(): !string; -declare const a: any; -declare const b: !number; -declare const c: any; -declare const d: !number; - -/// [Errors] //// - -parseInvalidNonNullableTypes.ts(1,30): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(5,30): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(9,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -parseInvalidNonNullableTypes.ts(9,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(10,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -parseInvalidNonNullableTypes.ts(10,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? -parseInvalidNonNullableTypes.ts(12,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -parseInvalidNonNullableTypes.ts(12,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(13,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -parseInvalidNonNullableTypes.ts(13,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? -parseInvalidNonNullableTypes.ts(15,16): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. -parseInvalidNonNullableTypes.ts(15,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(16,16): error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. -parseInvalidNonNullableTypes.ts(16,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? -parseInvalidNonNullableTypes.ts(18,16): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'any'? -parseInvalidNonNullableTypes.ts(19,10): error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? -parseInvalidNonNullableTypes.ts(21,16): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'any'? -parseInvalidNonNullableTypes.ts(22,10): error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? - - -==== parseInvalidNonNullableTypes.ts (18 errors) ==== - function f1(a: string): a is string! { - ~~~~~~~ -!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? - return true; - } - - function f2(a: string): a is !string { - ~~~~~~~ -!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? - return true; - } - - function f3(a: string!) {} - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parseInvalidNonNullableTypes.ts:9:10: Add a return type to the function declaration. - ~~~~~~~ -!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? - function f4(a: number!) {} - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parseInvalidNonNullableTypes.ts:10:10: Add a return type to the function declaration. - ~~~~~~~ -!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? - - function f5(a: !string) {} - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parseInvalidNonNullableTypes.ts:12:10: Add a return type to the function declaration. - ~~~~~~~ -!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? - function f6(a: !number) {} - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parseInvalidNonNullableTypes.ts:13:10: Add a return type to the function declaration. - ~~~~~~~ -!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? - - function f7(): string! {} - ~~~~~~~ -!!! error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. - ~~~~~~~ -!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string'? - function f8(): !string {} - ~~~~~~~ -!!! error TS2355: A function whose declared type is neither 'undefined', 'void', nor 'any' must return a value. - ~~~~~~~ -!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string'? - - const a = 1 as any!; - ~~~~ -!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'any'? - const b: number! = 1; - ~~~~~~~ -!!! error TS17019: '!' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number'? - - const c = 1 as !any; - ~~~~ -!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'any'? - const d: !number = 1; - ~~~~~~~ -!!! error TS17020: '!' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number'? - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNullableTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNullableTypes.d.ts deleted file mode 100644 index 20d6a9457291e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parseInvalidNullableTypes.d.ts +++ /dev/null @@ -1,147 +0,0 @@ -//// [tests/cases/compiler/parseInvalidNullableTypes.ts] //// - -//// [parseInvalidNullableTypes.ts] -function f1(a: string): a is ?string { - return true; -} - -function f2(a: string?) {} -function f3(a: number?) {} - -function f4(a: ?string) {} -function f5(a: ?number) {} - -function f6(a: string): ?string { - return true; -} - -const a = 1 as any?; -const b: number? = 1; - -const c = 1 as ?any; -const d: ?number = 1; - -let e: unknown?; -let f: never?; -let g: void?; -let h: undefined?; - - -/// [Declarations] //// - - - -//// [parseInvalidNullableTypes.d.ts] -declare function f1(a: string): a is ?string; -declare function f2(a: ?string): invalid; -declare function f3(a: ?number): invalid; -declare function f4(a: ?string): invalid; -declare function f5(a: ?number): invalid; -declare function f6(a: string): ?string; -declare const a: any; -declare const b: ?number; -declare const c: any; -declare const d: ?number; -declare let e: ?unknown; -declare let f: ?never; -declare let g: ?void; -declare let h: ?undefined; - -/// [Errors] //// - -parseInvalidNullableTypes.ts(1,30): error TS2677: A type predicate's type must be assignable to its parameter's type. - Type 'string | null' is not assignable to type 'string'. - Type 'null' is not assignable to type 'string'. -parseInvalidNullableTypes.ts(1,30): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? -parseInvalidNullableTypes.ts(5,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -parseInvalidNullableTypes.ts(5,16): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string | undefined'? -parseInvalidNullableTypes.ts(6,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -parseInvalidNullableTypes.ts(6,16): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? -parseInvalidNullableTypes.ts(8,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -parseInvalidNullableTypes.ts(8,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? -parseInvalidNullableTypes.ts(9,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -parseInvalidNullableTypes.ts(9,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? -parseInvalidNullableTypes.ts(11,25): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? -parseInvalidNullableTypes.ts(12,5): error TS2322: Type 'boolean' is not assignable to type 'string'. -parseInvalidNullableTypes.ts(15,16): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'any'? -parseInvalidNullableTypes.ts(16,10): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? -parseInvalidNullableTypes.ts(18,16): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'any'? -parseInvalidNullableTypes.ts(19,10): error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? -parseInvalidNullableTypes.ts(21,8): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'unknown'? -parseInvalidNullableTypes.ts(22,8): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'never'? -parseInvalidNullableTypes.ts(23,8): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'void'? -parseInvalidNullableTypes.ts(24,8): error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'undefined'? - - -==== parseInvalidNullableTypes.ts (20 errors) ==== - function f1(a: string): a is ?string { - ~~~~~~~ -!!! error TS2677: A type predicate's type must be assignable to its parameter's type. -!!! error TS2677: Type 'string | null' is not assignable to type 'string'. -!!! error TS2677: Type 'null' is not assignable to type 'string'. - ~~~~~~~ -!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? - return true; - } - - function f2(a: string?) {} - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parseInvalidNullableTypes.ts:5:10: Add a return type to the function declaration. - ~~~~~~~ -!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'string | undefined'? - function f3(a: number?) {} - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parseInvalidNullableTypes.ts:6:10: Add a return type to the function declaration. - ~~~~~~~ -!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? - - function f4(a: ?string) {} - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parseInvalidNullableTypes.ts:8:10: Add a return type to the function declaration. - ~~~~~~~ -!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? - function f5(a: ?number) {} - ~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parseInvalidNullableTypes.ts:9:10: Add a return type to the function declaration. - ~~~~~~~ -!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? - - function f6(a: string): ?string { - ~~~~~~~ -!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'string | null | undefined'? - return true; - ~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'string'. - } - - const a = 1 as any?; - ~~~~ -!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'any'? - const b: number? = 1; - ~~~~~~~ -!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'number | undefined'? - - const c = 1 as ?any; - ~~~~ -!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'any'? - const d: ?number = 1; - ~~~~~~~ -!!! error TS17020: '?' at the start of a type is not valid TypeScript syntax. Did you mean to write 'number | null | undefined'? - - let e: unknown?; - ~~~~~~~~ -!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'unknown'? - let f: never?; - ~~~~~~ -!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'never'? - let g: void?; - ~~~~~ -!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'void'? - let h: undefined?; - ~~~~~~~~~~ -!!! error TS17019: '?' at the end of a type is not valid TypeScript syntax. Did you mean to write 'undefined'? - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parseTypes.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseTypes.d.ts deleted file mode 100644 index c6487e4d48649..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parseTypes.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -//// [tests/cases/compiler/parseTypes.ts] //// - -//// [parseTypes.ts] -var x = <() => number>null; -var y = <{(): number; }>null; -var z = <{new(): number; }>null -var w = <{[x:number]: number; }>null -function f() { return 3 }; -function g(s: string) { true }; -y=f; -y=g; -x=g; -w=g; -z=g; - - -/// [Declarations] //// - - - -//// [parseTypes.d.ts] -declare var x: () => number; -declare var y: () => number; -declare var z: new () => number; -declare var w: { - [x: number]: number; -}; -declare function f(): invalid; -declare function g(s: string): invalid; - -/// [Errors] //// - -parseTypes.ts(5,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -parseTypes.ts(6,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -parseTypes.ts(8,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. - Target signature provides too few arguments. Expected 1 or more, but got 0. -parseTypes.ts(9,1): error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. - Target signature provides too few arguments. Expected 1 or more, but got 0. -parseTypes.ts(10,1): error TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }'. - Index signature for type 'number' is missing in type '(s: string) => void'. -parseTypes.ts(11,1): error TS2322: Type '(s: string) => void' is not assignable to type 'new () => number'. - Type '(s: string) => void' provides no match for the signature 'new (): number'. - - -==== parseTypes.ts (6 errors) ==== - var x = <() => number>null; - var y = <{(): number; }>null; - var z = <{new(): number; }>null - var w = <{[x:number]: number; }>null - function f() { return 3 }; - ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parseTypes.ts:5:10: Add a return type to the function declaration. - function g(s: string) { true }; - ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 parseTypes.ts:6:10: Add a return type to the function declaration. - y=f; - y=g; - ~ -!!! error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. -!!! error TS2322: Target signature provides too few arguments. Expected 1 or more, but got 0. - x=g; - ~ -!!! error TS2322: Type '(s: string) => void' is not assignable to type '() => number'. -!!! error TS2322: Target signature provides too few arguments. Expected 1 or more, but got 0. - w=g; - ~ -!!! error TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }'. -!!! error TS2322: Index signature for type 'number' is missing in type '(s: string) => void'. - z=g; - ~ -!!! error TS2322: Type '(s: string) => void' is not assignable to type 'new () => number'. -!!! error TS2322: Type '(s: string) => void' provides no match for the signature 'new (): number'. - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts deleted file mode 100644 index e04701f279955..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName1.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName1.ts] //// - -//// [parserComputedPropertyName1.ts] -var v = { [e] }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName1.d.ts] -declare var v: invalid; - -/// [Errors] //// - -parserComputedPropertyName1.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -parserComputedPropertyName1.ts(1,12): error TS2304: Cannot find name 'e'. -parserComputedPropertyName1.ts(1,15): error TS1005: ':' expected. - - -==== parserComputedPropertyName1.ts (3 errors) ==== - var v = { [e] }; - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 parserComputedPropertyName1.ts:1:5: Add a type annotation to the variable v. - ~ -!!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS1005: ':' expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts deleted file mode 100644 index 5c7a6688c7b83..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName10.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts] //// - -//// [parserComputedPropertyName10.ts] -class C { - [e] = 1 -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName10.d.ts] -declare class C { -} - -/// [Errors] //// - -parserComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName10.ts (2 errors) ==== - class C { - [e] = 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 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName13.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName13.d.ts deleted file mode 100644 index 86cba9272e562..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName13.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts] //// - -//// [parserComputedPropertyName13.ts] -var v: { [e]: number }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName13.d.ts] -declare var v: {}; - -/// [Errors] //// - -parserComputedPropertyName13.ts(1,10): 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. -parserComputedPropertyName13.ts(1,11): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName13.ts (2 errors) ==== - var v: { [e]: number }; - ~~~ -!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName14.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName14.d.ts deleted file mode 100644 index 663e2b65cf44a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName14.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts] //// - -//// [parserComputedPropertyName14.ts] -var v: { [e](): number }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName14.d.ts] -declare var v: {}; - -/// [Errors] //// - -parserComputedPropertyName14.ts(1,10): 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. -parserComputedPropertyName14.ts(1,11): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName14.ts (2 errors) ==== - var v: { [e](): number }; - ~~~ -!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName15.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName15.d.ts deleted file mode 100644 index 4fc173ae75abd..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName15.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts] //// - -//// [parserComputedPropertyName15.ts] -var v: { [e: number]: string; [e]: number }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName15.d.ts] -declare var v: { - [e: number]: string; -}; - -/// [Errors] //// - -parserComputedPropertyName15.ts(1,31): 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. -parserComputedPropertyName15.ts(1,32): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName15.ts (2 errors) ==== - var v: { [e: number]: string; [e]: number }; - ~~~ -!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName18.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName18.d.ts deleted file mode 100644 index 6982238d125bb..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName18.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts] //// - -//// [parserComputedPropertyName18.ts] -var v: { [e]?(): number }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName18.d.ts] -declare var v: {}; - -/// [Errors] //// - -parserComputedPropertyName18.ts(1,10): 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. -parserComputedPropertyName18.ts(1,11): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName18.ts (2 errors) ==== - var v: { [e]?(): number }; - ~~~ -!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName19.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName19.d.ts deleted file mode 100644 index 3944a152a14ff..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName19.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts] //// - -//// [parserComputedPropertyName19.ts] -var v: { [e]? }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName19.d.ts] -declare var v: {}; - -/// [Errors] //// - -parserComputedPropertyName19.ts(1,10): 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. -parserComputedPropertyName19.ts(1,11): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName19.ts (2 errors) ==== - var v: { [e]? }; - ~~~ -!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts deleted file mode 100644 index 36054a0557a5d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName2.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts] //// - -//// [parserComputedPropertyName2.ts] -var v = { [e]: 1 }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName2.d.ts] -declare var v: invalid; - -/// [Errors] //// - -parserComputedPropertyName2.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -parserComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName2.ts (2 errors) ==== - var v = { [e]: 1 }; - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 parserComputedPropertyName2.ts:1:5: Add a type annotation to the variable v. - ~ -!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName20.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName20.d.ts deleted file mode 100644 index 7aa1ea0b45b49..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName20.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts] //// - -//// [parserComputedPropertyName20.ts] -interface I { - [e](): number -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName20.d.ts] -interface I { -} - -/// [Errors] //// - -parserComputedPropertyName20.ts(2,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. -parserComputedPropertyName20.ts(2,6): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName20.ts (2 errors) ==== - interface I { - [e](): number - ~~~ -!!! 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 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName21.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName21.d.ts deleted file mode 100644 index 432e578489aa7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName21.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts] //// - -//// [parserComputedPropertyName21.ts] -interface I { - [e]: number -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName21.d.ts] -interface I { -} - -/// [Errors] //// - -parserComputedPropertyName21.ts(2,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. -parserComputedPropertyName21.ts(2,6): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName21.ts (2 errors) ==== - interface I { - [e]: number - ~~~ -!!! 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 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts deleted file mode 100644 index 7a7737c08dd11..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName22.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts] //// - -//// [parserComputedPropertyName22.ts] -declare class C { - [e]: number -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName22.d.ts] -declare class C { -} - -/// [Errors] //// - -parserComputedPropertyName22.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName22.ts(2,6): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName22.ts (2 errors) ==== - declare class C { - [e]: number - ~~~ -!!! 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 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts deleted file mode 100644 index 58720270d110d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName23.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts] //// - -//// [parserComputedPropertyName23.ts] -declare class C { - get [e](): number -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName23.d.ts] -declare class C { -} - -/// [Errors] //// - -parserComputedPropertyName23.ts(2,10): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName23.ts (1 errors) ==== - declare class C { - get [e](): number - ~ -!!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts deleted file mode 100644 index c1dfa2c3b0625..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName24.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts] //// - -//// [parserComputedPropertyName24.ts] -class C { - set [e](v) { } -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName24.d.ts] -declare class C { -} - -/// [Errors] //// - -parserComputedPropertyName24.ts(2,10): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName24.ts (1 errors) ==== - class C { - set [e](v) { } - ~ -!!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts deleted file mode 100644 index b03b681f819ab..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName25.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts] //// - -//// [parserComputedPropertyName25.ts] -class C { - // No ASI - [e] = 0 - [e2] = 1 -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName25.d.ts] -declare class C { -} - -/// [Errors] //// - -parserComputedPropertyName25.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName25.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'. - - -==== parserComputedPropertyName25.ts (3 errors) ==== - class C { - // No ASI - [e] = 0 - ~~~ -!!! 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 'e'. - [e2] = 1 - ~~ -!!! error TS2304: Cannot find name 'e2'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts deleted file mode 100644 index dc74a4e6f0469..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName27.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts] //// - -//// [parserComputedPropertyName27.ts] -class C { - // No ASI - [e]: number = 0 - [e2]: number -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName27.d.ts] -declare class C { - number: invalid; -} - -/// [Errors] //// - -parserComputedPropertyName27.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName27.ts(4,6): error TS2304: Cannot find name 'e2'. -parserComputedPropertyName27.ts(4,9): error TS1005: ';' expected. -parserComputedPropertyName27.ts(4,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. - - -==== parserComputedPropertyName27.ts (4 errors) ==== - class C { - // No ASI - [e]: number = 0 - ~ -!!! error TS2304: Cannot find name 'e'. - [e2]: number - ~~ -!!! error TS2304: Cannot find name 'e2'. - ~ -!!! error TS1005: ';' expected. - ~~~~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9029 parserComputedPropertyName27.ts:4:11: Add a type annotation to the property number. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts deleted file mode 100644 index d9b2874cc6a68..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName28.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts] //// - -//// [parserComputedPropertyName28.ts] -class C { - [e]: number = 0; - [e2]: number -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName28.d.ts] -declare class C { -} - -/// [Errors] //// - -parserComputedPropertyName28.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName28.ts(2,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName28.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName28.ts(3,6): error TS2304: Cannot find name 'e2'. - - -==== parserComputedPropertyName28.ts (4 errors) ==== - class C { - [e]: number = 0; - ~~~ -!!! 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 'e'. - [e2]: number - ~~~~ -!!! 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 'e2'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts deleted file mode 100644 index 0c03e3b5fcc0c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName29.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts] //// - -//// [parserComputedPropertyName29.ts] -class C { - // yes ASI - [e] = id++ - [e2]: number -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName29.d.ts] -declare class C { -} - -/// [Errors] //// - -parserComputedPropertyName29.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName29.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName29.ts(3,11): error TS2304: Cannot find name 'id'. -parserComputedPropertyName29.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName29.ts(4,6): error TS2304: Cannot find name 'e2'. - - -==== parserComputedPropertyName29.ts (5 errors) ==== - class C { - // yes ASI - [e] = id++ - ~~~ -!!! 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 'e'. - ~~ -!!! error TS2304: Cannot find name 'id'. - [e2]: number - ~~~~ -!!! 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 'e2'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts deleted file mode 100644 index 5cffe45891118..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName31.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts] //// - -//// [parserComputedPropertyName31.ts] -class C { - // yes ASI - [e]: number - [e2]: number -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName31.d.ts] -declare class C { -} - -/// [Errors] //// - -parserComputedPropertyName31.ts(3,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName31.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName31.ts(4,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName31.ts(4,6): error TS2304: Cannot find name 'e2'. - - -==== parserComputedPropertyName31.ts (4 errors) ==== - class C { - // yes ASI - [e]: number - ~~~ -!!! 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 'e'. - [e2]: number - ~~~~ -!!! 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 'e2'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts deleted file mode 100644 index c6fd8d5ed9d44..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName32.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts] //// - -//// [parserComputedPropertyName32.ts] -declare class C { - [e](): number -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName32.d.ts] -declare class C { -} - -/// [Errors] //// - -parserComputedPropertyName32.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. -parserComputedPropertyName32.ts(2,6): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName32.ts (2 errors) ==== - declare class C { - [e](): number - ~~~ -!!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ -!!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts deleted file mode 100644 index 225a53eadd08d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName33.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts] //// - -//// [parserComputedPropertyName33.ts] -class C { - // No ASI - [e] = 0 - [e2]() { } -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName33.d.ts] -declare class C { -} - -/// [Errors] //// - -parserComputedPropertyName33.ts(3,6): error TS2304: Cannot find name 'e'. -parserComputedPropertyName33.ts(4,6): error TS2304: Cannot find name 'e2'. -parserComputedPropertyName33.ts(4,12): error TS1005: ';' expected. -parserComputedPropertyName33.ts(5,1): error TS1128: Declaration or statement expected. - - -==== parserComputedPropertyName33.ts (4 errors) ==== - class C { - // No ASI - [e] = 0 - ~ -!!! error TS2304: Cannot find name 'e'. - [e2]() { } - ~~ -!!! error TS2304: Cannot find name 'e2'. - ~ -!!! error TS1005: ';' expected. - } - ~ -!!! error TS1128: Declaration or statement expected. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts deleted file mode 100644 index fefbe2031d0ea..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName36.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts] //// - -//// [parserComputedPropertyName36.ts] -class C { - [public ]: string; -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName36.d.ts] -declare class C { -} - -/// [Errors] //// - -parserComputedPropertyName36.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName36.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. -parserComputedPropertyName36.ts(2,6): error TS2304: Cannot find name 'public'. - - -==== parserComputedPropertyName36.ts (3 errors) ==== - class C { - [public ]: string; - ~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~ -!!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. - ~~~~~~ -!!! error TS2304: Cannot find name 'public'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts deleted file mode 100644 index 6c6cb7ac49591..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName37.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts] //// - -//// [parserComputedPropertyName37.ts] -var v = { - [public]: 0 -}; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName37.d.ts] -declare var v: invalid; - -/// [Errors] //// - -parserComputedPropertyName37.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -parserComputedPropertyName37.ts(2,6): error TS2304: Cannot find name 'public'. - - -==== parserComputedPropertyName37.ts (2 errors) ==== - var v = { - [public]: 0 - ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 parserComputedPropertyName37.ts:1:5: Add a type annotation to the variable v. - ~~~~~~ -!!! error TS2304: Cannot find name 'public'. - }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts deleted file mode 100644 index aa5cd55dcd4b4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName6.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts] //// - -//// [parserComputedPropertyName6.ts] -var v = { [e]: 1, [e + e]: 2 }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName6.d.ts] -declare var v: invalid; - -/// [Errors] //// - -parserComputedPropertyName6.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -parserComputedPropertyName6.ts(1,12): error TS2304: Cannot find name 'e'. -parserComputedPropertyName6.ts(1,19): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -parserComputedPropertyName6.ts(1,20): error TS2304: Cannot find name 'e'. -parserComputedPropertyName6.ts(1,24): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName6.ts (5 errors) ==== - var v = { [e]: 1, [e + e]: 2 }; - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 parserComputedPropertyName6.ts:1:5: Add a type annotation to the variable v. - ~ -!!! error TS2304: Cannot find name 'e'. - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 parserComputedPropertyName6.ts:1:5: Add a type annotation to the variable v. - ~ -!!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts deleted file mode 100644 index 8646752a83814..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName9.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts] //// - -//// [parserComputedPropertyName9.ts] -class C { - [e]: Type -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName9.d.ts] -declare class C { -} - -/// [Errors] //// - -parserComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. -parserComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. - - -==== parserComputedPropertyName9.ts (3 errors) ==== - class C { - [e]: Type - ~~~ -!!! 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 'e'. - ~~~~ -!!! error TS2304: Cannot find name 'Type'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts deleted file mode 100644 index 252cb26ef9c43..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName1.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts] //// - -//// [parserES5ComputedPropertyName1.ts] -declare class C { - [e]: number -} - -/// [Declarations] //// - - - -//// [parserES5ComputedPropertyName1.d.ts] -declare class C { -} - -/// [Errors] //// - -parserES5ComputedPropertyName1.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5ComputedPropertyName1.ts(2,6): error TS2304: Cannot find name 'e'. - - -==== parserES5ComputedPropertyName1.ts (2 errors) ==== - declare class C { - [e]: number - ~~~ -!!! 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 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts deleted file mode 100644 index 50ccfc16574a4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName10.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts] //// - -//// [parserES5ComputedPropertyName10.ts] -class C { - [e] = 1 -} - -/// [Declarations] //// - - - -//// [parserES5ComputedPropertyName10.d.ts] -declare class C { -} - -/// [Errors] //// - -parserES5ComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5ComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'. - - -==== parserES5ComputedPropertyName10.ts (2 errors) ==== - class C { - [e] = 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 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts deleted file mode 100644 index cab4fd86a1d55..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName2.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts] //// - -//// [parserES5ComputedPropertyName2.ts] -var v = { [e]: 1 }; - -/// [Declarations] //// - - - -//// [parserES5ComputedPropertyName2.d.ts] -declare var v: invalid; - -/// [Errors] //// - -parserES5ComputedPropertyName2.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -parserES5ComputedPropertyName2.ts(1,12): error TS2304: Cannot find name 'e'. - - -==== parserES5ComputedPropertyName2.ts (2 errors) ==== - var v = { [e]: 1 }; - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 parserES5ComputedPropertyName2.ts:1:5: Add a type annotation to the variable v. - ~ -!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName5.d.ts deleted file mode 100644 index 58bc644c433d6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName5.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts] //// - -//// [parserES5ComputedPropertyName5.ts] -interface I { - [e]: number -} - -/// [Declarations] //// - - - -//// [parserES5ComputedPropertyName5.d.ts] -interface I { -} - -/// [Errors] //// - -parserES5ComputedPropertyName5.ts(2,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. -parserES5ComputedPropertyName5.ts(2,6): error TS2304: Cannot find name 'e'. - - -==== parserES5ComputedPropertyName5.ts (2 errors) ==== - interface I { - [e]: number - ~~~ -!!! 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 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName8.d.ts deleted file mode 100644 index a9fd50bb1b5cd..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName8.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts] //// - -//// [parserES5ComputedPropertyName8.ts] -var v: { [e]: number }; - -/// [Declarations] //// - - - -//// [parserES5ComputedPropertyName8.d.ts] -declare var v: {}; - -/// [Errors] //// - -parserES5ComputedPropertyName8.ts(1,10): 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. -parserES5ComputedPropertyName8.ts(1,11): error TS2304: Cannot find name 'e'. - - -==== parserES5ComputedPropertyName8.ts (2 errors) ==== - var v: { [e]: number }; - ~~~ -!!! 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 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts deleted file mode 100644 index 2a34fe8740d4c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName9.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts] //// - -//// [parserES5ComputedPropertyName9.ts] -class C { - [e]: Type -} - -/// [Declarations] //// - - - -//// [parserES5ComputedPropertyName9.d.ts] -declare class C { -} - -/// [Errors] //// - -parserES5ComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5ComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'. -parserES5ComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'. - - -==== parserES5ComputedPropertyName9.ts (3 errors) ==== - class C { - [e]: Type - ~~~ -!!! 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 'e'. - ~~~~ -!!! error TS2304: Cannot find name 'Type'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty1.d.ts deleted file mode 100644 index cc205d900fd85..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty1.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty1.ts] //// - -//// [parserES5SymbolProperty1.ts] -interface I { - [Symbol.iterator]: string; -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty1.d.ts] -interface I { -} - -/// [Errors] //// - -parserES5SymbolProperty1.ts(2,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. -parserES5SymbolProperty1.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== parserES5SymbolProperty1.ts (2 errors) ==== - interface I { - [Symbol.iterator]: string; - ~~~~~~~~~~~~~~~~~ -!!! 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 TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty2.d.ts deleted file mode 100644 index 2fcdaaad96fc7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty2.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty2.ts] //// - -//// [parserES5SymbolProperty2.ts] -interface I { - [Symbol.unscopables](): string; -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty2.d.ts] -interface I { -} - -/// [Errors] //// - -parserES5SymbolProperty2.ts(2,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. -parserES5SymbolProperty2.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== parserES5SymbolProperty2.ts (2 errors) ==== - interface I { - [Symbol.unscopables](): string; - ~~~~~~~~~~~~~~~~~~~~ -!!! 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 TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts deleted file mode 100644 index a6117d0c32494..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty3.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty3.ts] //// - -//// [parserES5SymbolProperty3.ts] -declare class C { - [Symbol.unscopables](): string; -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty3.d.ts] -declare class C { -} - -/// [Errors] //// - -parserES5SymbolProperty3.ts(2,5): error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. -parserES5SymbolProperty3.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== parserES5SymbolProperty3.ts (2 errors) ==== - declare class C { - [Symbol.unscopables](): string; - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS1165: A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts deleted file mode 100644 index 145645c25187a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty4.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts] //// - -//// [parserES5SymbolProperty4.ts] -declare class C { - [Symbol.isRegExp]: string; -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty4.d.ts] -declare class C { -} - -/// [Errors] //// - -parserES5SymbolProperty4.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5SymbolProperty4.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== parserES5SymbolProperty4.ts (2 errors) ==== - declare class C { - [Symbol.isRegExp]: string; - ~~~~~~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts deleted file mode 100644 index 286d046657c47..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty5.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty5.ts] //// - -//// [parserES5SymbolProperty5.ts] -class C { - [Symbol.isRegExp]: string; -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty5.d.ts] -declare class C { -} - -/// [Errors] //// - -parserES5SymbolProperty5.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5SymbolProperty5.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== parserES5SymbolProperty5.ts (2 errors) ==== - class C { - [Symbol.isRegExp]: string; - ~~~~~~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts deleted file mode 100644 index 78baf79a72c65..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty6.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty6.ts] //// - -//// [parserES5SymbolProperty6.ts] -class C { - [Symbol.toStringTag]: string = ""; -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty6.d.ts] -declare class C { -} - -/// [Errors] //// - -parserES5SymbolProperty6.ts(2,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== parserES5SymbolProperty6.ts (2 errors) ==== - class C { - [Symbol.toStringTag]: string = ""; - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts deleted file mode 100644 index e08c63211052b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty7.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty7.ts] //// - -//// [parserES5SymbolProperty7.ts] -class C { - [Symbol.toStringTag](): void { } -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty7.d.ts] -declare class C { -} - -/// [Errors] //// - -parserES5SymbolProperty7.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== parserES5SymbolProperty7.ts (1 errors) ==== - class C { - [Symbol.toStringTag](): void { } - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts deleted file mode 100644 index 516618b30e4a8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty8.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts] //// - -//// [parserES5SymbolProperty8.ts] -var x: { - [Symbol.toPrimitive](): string -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty8.d.ts] -declare var x: {}; - -/// [Errors] //// - -parserES5SymbolProperty8.ts(2,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. -parserES5SymbolProperty8.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== parserES5SymbolProperty8.ts (2 errors) ==== - var x: { - [Symbol.toPrimitive](): 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 TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty9.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty9.d.ts deleted file mode 100644 index 548bf2597544b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5SymbolProperty9.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty9.ts] //// - -//// [parserES5SymbolProperty9.ts] -var x: { - [Symbol.toPrimitive]: string -} - -/// [Declarations] //// - - - -//// [parserES5SymbolProperty9.d.ts] -declare var x: {}; - -/// [Errors] //// - -parserES5SymbolProperty9.ts(2,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. -parserES5SymbolProperty9.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== parserES5SymbolProperty9.ts (2 errors) ==== - var x: { - [Symbol.toPrimitive]: 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 TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature11.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature11.d.ts deleted file mode 100644 index 9bac2defb1b3b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature11.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts] //// - -//// [parserIndexSignature11.ts] -interface I { - [p]; // Used to be indexer, now it is a computed property - [p1: string]; - [p2: string, p3: number]; -} - -/// [Declarations] //// - - - -//// [parserIndexSignature11.d.ts] -interface I { - [p1: string]: any; - [p2: string, p3: number]: any; -} - -/// [Errors] //// - -parserIndexSignature11.ts(2,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. -parserIndexSignature11.ts(2,10): error TS2304: Cannot find name 'p'. -parserIndexSignature11.ts(3,9): error TS1021: An index signature must have a type annotation. -parserIndexSignature11.ts(4,10): error TS1096: An index signature must have exactly one parameter. - - -==== parserIndexSignature11.ts (4 errors) ==== - interface I { - [p]; // Used to be indexer, now it is a computed property - ~~~ -!!! 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. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature5.d.ts deleted file mode 100644 index e4e31a3cee77b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserIndexSignature5.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts] //// - -//// [parserIndexSignature5.ts] -interface I { - [a] // Used to be indexer, now it is a computed property -} - -/// [Declarations] //// - - - -//// [parserIndexSignature5.d.ts] -interface I { -} - -/// [Errors] //// - -parserIndexSignature5.ts(2,3): 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. -parserIndexSignature5.ts(2,4): error TS2304: Cannot find name 'a'. - - -==== parserIndexSignature5.ts (2 errors) ==== - interface I { - [a] // Used to be indexer, now it is a computed property - ~~~ -!!! 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 'a'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserStrictMode8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserStrictMode8.d.ts deleted file mode 100644 index d3db0a9c92416..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserStrictMode8.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts] //// - -//// [parserStrictMode8.ts] -"use strict"; -function eval() { -} - -/// [Declarations] //// - - - -//// [parserStrictMode8.d.ts] - -/// [Errors] //// - -parserStrictMode8.ts(2,10): error TS1100: Invalid use of 'eval' in strict mode. - - -==== parserStrictMode8.ts (1 errors) ==== - "use strict"; - function eval() { - ~~~~ -!!! error TS1100: Invalid use of 'eval' in strict mode. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/propertyAssignment.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/propertyAssignment.d.ts deleted file mode 100644 index 888039f7736fb..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/propertyAssignment.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -//// [tests/cases/compiler/propertyAssignment.ts] //// - -//// [propertyAssignment.ts] -var foo1: { new ():any; } -var bar1: { x : number; } - -var foo2: { [index]; } // should be an error, used to be indexer, now it is a computed property -var bar2: { x : number; } - -var foo3: { ():void; } -var bar3: { x : number; } - - - -foo1 = bar1; // should be an error -foo2 = bar2; -foo3 = bar3; // should be an error - -/// [Declarations] //// - - - -//// [propertyAssignment.d.ts] -declare var foo1: { - new (): any; -}; -declare var bar1: { - x: number; -}; -declare var foo2: {}; -declare var bar2: { - x: number; -}; -declare var foo3: { - (): void; -}; -declare var bar3: { - x: number; -}; - -/// [Errors] //// - -propertyAssignment.ts(4,13): 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. -propertyAssignment.ts(4,14): error TS2304: Cannot find name 'index'. -propertyAssignment.ts(12,1): error TS2322: Type '{ x: number; }' is not assignable to type 'new () => any'. - Type '{ x: number; }' provides no match for the signature 'new (): any'. -propertyAssignment.ts(14,1): error TS2322: Type '{ x: number; }' is not assignable to type '() => void'. - Type '{ x: number; }' provides no match for the signature '(): void'. - - -==== propertyAssignment.ts (4 errors) ==== - var foo1: { new ():any; } - var bar1: { x : number; } - - var foo2: { [index]; } // should be an error, used to be indexer, now it is a computed property - ~~~~~~~ -!!! 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 'index'. - var bar2: { x : number; } - - var foo3: { ():void; } - var bar3: { x : number; } - - - - foo1 = bar1; // should be an error - ~~~~ -!!! error TS2322: Type '{ x: number; }' is not assignable to type 'new () => any'. -!!! error TS2322: Type '{ x: number; }' provides no match for the signature 'new (): any'. - foo2 = bar2; - foo3 = bar3; // should be an error - ~~~~ -!!! error TS2322: Type '{ x: number; }' is not assignable to type '() => void'. -!!! error TS2322: Type '{ x: number; }' provides no match for the signature '(): void'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/reExportAliasMakesInstantiated.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/reExportAliasMakesInstantiated.d.ts deleted file mode 100644 index f696deecb848a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/reExportAliasMakesInstantiated.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -//// [tests/cases/conformance/internalModules/moduleDeclarations/reExportAliasMakesInstantiated.ts] //// - -//// [reExportAliasMakesInstantiated.ts] -declare module pack1 { - const test1: string; - export { test1 }; -} -declare module pack2 { - import test1 = pack1.test1; - export { test1 }; -} -export import test1 = pack2.test1; - -declare module mod1 { - type test1 = string; - export { test1 }; -} -declare module mod2 { - import test1 = mod1.test1; - export { test1 }; -} -const test2 = mod2; // Possible false positive instantiation, but ok - - -/// [Declarations] //// - - - -//// [reExportAliasMakesInstantiated.d.ts] -declare namespace pack1 { - const test1: string; - export { test1 }; -} -declare namespace pack2 { - import test1 = pack1.test1; - export { test1 }; -} -export import test1 = pack2.test1; -declare namespace mod1 { - type test1 = string; - export { test1 }; -} -export {}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/recursiveTypesWithTypeof.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/recursiveTypesWithTypeof.d.ts deleted file mode 100644 index ca7e3dcb693b8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/recursiveTypesWithTypeof.d.ts +++ /dev/null @@ -1,200 +0,0 @@ -//// [tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts] //// - -//// [recursiveTypesWithTypeof.ts] -// The following are errors because of circular references -var c: typeof c; -var c: any; -var d: typeof e; -var d: any; -var e: typeof d; -var e: any; - -interface Foo { } -var f: Array; -var f: any; -var f2: Foo; -var f2: any; -var f3: Foo[]; -var f3: any; - -// None of these declarations should have any errors! -// Truly recursive types -var g: { x: typeof g; }; -var g: typeof g.x; -var h: () => typeof h; -var h = h(); -var i: (x: typeof i) => typeof x; -var i = i(i); -var j: (x: T) => T; -var j = j(j); - -// Same as h, i, j with construct signatures -var h2: new () => typeof h2; -var h2 = new h2(); -var i2: new (x: typeof i2) => typeof x; -var i2 = new i2(i2); -var j2: new (x: T) => T; -var j2 = new j2(j2); - -// Indexers -var k: { [n: number]: typeof k;[s: string]: typeof k }; -var k = k[0]; -var k = k['']; - -// Hybrid - contains type literals as well as type arguments -// These two are recursive -var hy1: { x: typeof hy1 }[]; -var hy1 = hy1[0].x; -var hy2: { x: Array }; -var hy2 = hy2.x[0]; - -interface Foo2 { } - -// This one should be an error because the first type argument is not contained inside a type literal -var hy3: Foo2; -var hy3: any; - -/// [Declarations] //// - - - -//// [recursiveTypesWithTypeof.d.ts] -declare var c: typeof c; -declare var c: any; -declare var d: typeof e; -declare var d: any; -declare var e: typeof d; -declare var e: any; -interface Foo { -} -declare var f: Array; -declare var f: any; -declare var f2: Foo; -declare var f2: any; -declare var f3: Foo[]; -declare var f3: any; -declare var g: { - x: typeof g; -}; -declare var g: typeof g.x; -declare var h: () => typeof h; -declare var h: () => typeof h; -declare var i: (x: typeof i) => typeof x; -declare var i: (x: typeof i) => typeof x; -declare var j: (x: T) => T; -declare var j: (x: T) => T; -declare var h2: new () => typeof h2; -declare var h2: new () => typeof h2; -declare var i2: new (x: typeof i2) => typeof x; -declare var i2: new (x: typeof i2) => typeof x; -declare var j2: new (x: T) => T; -declare var j2: new (x: T) => T; -declare var k: { - [n: number]: typeof k; - [s: string]: typeof k; -}; -declare var k: { - [n: number]: any; - [s: string]: any; -}; -declare var k: { - [n: number]: any; - [s: string]: any; -}; -declare var hy1: { - x: typeof hy1; -}[]; -declare var hy1: { - x: typeof hy1; -}[]; -declare var hy2: { - x: Array; -}; -declare var hy2: { - x: Array; -}; -interface Foo2 { -} -declare var hy3: Foo2; -declare var hy3: any; - -/// [Errors] //// - -recursiveTypesWithTypeof.ts(2,5): error TS2502: 'c' is referenced directly or indirectly in its own type annotation. -recursiveTypesWithTypeof.ts(4,5): error TS2502: 'd' is referenced directly or indirectly in its own type annotation. -recursiveTypesWithTypeof.ts(6,5): error TS2502: 'e' is referenced directly or indirectly in its own type annotation. -recursiveTypesWithTypeof.ts(10,5): error TS2502: 'f' is referenced directly or indirectly in its own type annotation. -recursiveTypesWithTypeof.ts(12,5): error TS2502: 'f2' is referenced directly or indirectly in its own type annotation. -recursiveTypesWithTypeof.ts(14,5): error TS2502: 'f3' is referenced directly or indirectly in its own type annotation. -recursiveTypesWithTypeof.ts(51,5): error TS2502: 'hy3' is referenced directly or indirectly in its own type annotation. - - -==== recursiveTypesWithTypeof.ts (7 errors) ==== - // The following are errors because of circular references - var c: typeof c; - ~ -!!! error TS2502: 'c' is referenced directly or indirectly in its own type annotation. - var c: any; - var d: typeof e; - ~ -!!! error TS2502: 'd' is referenced directly or indirectly in its own type annotation. - var d: any; - var e: typeof d; - ~ -!!! error TS2502: 'e' is referenced directly or indirectly in its own type annotation. - var e: any; - - interface Foo { } - var f: Array; - ~ -!!! error TS2502: 'f' is referenced directly or indirectly in its own type annotation. - var f: any; - var f2: Foo; - ~~ -!!! error TS2502: 'f2' is referenced directly or indirectly in its own type annotation. - var f2: any; - var f3: Foo[]; - ~~ -!!! error TS2502: 'f3' is referenced directly or indirectly in its own type annotation. - var f3: any; - - // None of these declarations should have any errors! - // Truly recursive types - var g: { x: typeof g; }; - var g: typeof g.x; - var h: () => typeof h; - var h = h(); - var i: (x: typeof i) => typeof x; - var i = i(i); - var j: (x: T) => T; - var j = j(j); - - // Same as h, i, j with construct signatures - var h2: new () => typeof h2; - var h2 = new h2(); - var i2: new (x: typeof i2) => typeof x; - var i2 = new i2(i2); - var j2: new (x: T) => T; - var j2 = new j2(j2); - - // Indexers - var k: { [n: number]: typeof k;[s: string]: typeof k }; - var k = k[0]; - var k = k['']; - - // Hybrid - contains type literals as well as type arguments - // These two are recursive - var hy1: { x: typeof hy1 }[]; - var hy1 = hy1[0].x; - var hy2: { x: Array }; - var hy2 = hy2.x[0]; - - interface Foo2 { } - - // This one should be an error because the first type argument is not contained inside a type literal - var hy3: Foo2; - ~~~ -!!! error TS2502: 'hy3' is referenced directly or indirectly in its own type annotation. - var hy3: any; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts deleted file mode 100644 index 6e92b68a5b965..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=false).d.ts +++ /dev/null @@ -1,1020 +0,0 @@ -//// [tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts] //// - -//// [staticPropertyNameConflicts.ts] -const FunctionPropertyNames = { - name: 'name', - length: 'length', - prototype: 'prototype', - caller: 'caller', - arguments: 'arguments', -} as const; - -// name -class StaticName { - static name: number; // error without useDefineForClassFields - name: string; // ok -} - -class StaticName2 { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - [FunctionPropertyNames.name]: number; // ok -} - -class StaticNameFn { - static name() {} // error without useDefineForClassFields - name() {} // ok -} - -class StaticNameFn2 { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - [FunctionPropertyNames.name]() {} // ok -} - -// length -class StaticLength { - static length: number; // error without useDefineForClassFields - length: string; // ok -} - -class StaticLength2 { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - [FunctionPropertyNames.length]: number; // ok -} - -class StaticLengthFn { - static length() {} // error without useDefineForClassFields - length() {} // ok -} - -class StaticLengthFn2 { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - [FunctionPropertyNames.length]() {} // ok -} - -// prototype -class StaticPrototype { - static prototype: number; // always an error - prototype: string; // ok -} - -class StaticPrototype2 { - static [FunctionPropertyNames.prototype]: number; // always an error - [FunctionPropertyNames.prototype]: string; // ok -} - -class StaticPrototypeFn { - static prototype() {} // always an error - prototype() {} // ok -} - -class StaticPrototypeFn2 { - static [FunctionPropertyNames.prototype]() {} // always an error - [FunctionPropertyNames.prototype]() {} // ok -} - -// caller -class StaticCaller { - static caller: number; // error without useDefineForClassFields - caller: string; // ok -} - -class StaticCaller2 { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - [FunctionPropertyNames.caller]: string; // ok -} - -class StaticCallerFn { - static caller() {} // error without useDefineForClassFields - caller() {} // ok -} - -class StaticCallerFn2 { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - [FunctionPropertyNames.caller]() {} // ok -} - -// arguments -class StaticArguments { - static arguments: number; // error without useDefineForClassFields - arguments: string; // ok -} - -class StaticArguments2 { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - [FunctionPropertyNames.arguments]: string; // ok -} - -class StaticArgumentsFn { - static arguments() {} // error without useDefineForClassFields - arguments() {} // ok -} - -class StaticArgumentsFn2 { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - [FunctionPropertyNames.arguments]() {} // ok -} - - -// === Static properties on anonymous classes === - -// name -var StaticName_Anonymous = class { - static name: number; // error without useDefineForClassFields - name: string; // ok -} - -var StaticName_Anonymous2 = class { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - [FunctionPropertyNames.name]: string; // ok -} - -var StaticNameFn_Anonymous = class { - static name() {} // error without useDefineForClassFields - name() {} // ok -} - -var StaticNameFn_Anonymous2 = class { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - [FunctionPropertyNames.name]() {} // ok -} - -// length -var StaticLength_Anonymous = class { - static length: number; // error without useDefineForClassFields - length: string; // ok -} - -var StaticLength_Anonymous2 = class { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - [FunctionPropertyNames.length]: string; // ok -} - -var StaticLengthFn_Anonymous = class { - static length() {} // error without useDefineForClassFields - length() {} // ok -} - -var StaticLengthFn_Anonymous2 = class { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - [FunctionPropertyNames.length]() {} // ok -} - -// prototype -var StaticPrototype_Anonymous = class { - static prototype: number; // always an error - prototype: string; // ok -} - -var StaticPrototype_Anonymous2 = class { - static [FunctionPropertyNames.prototype]: number; // always an error - [FunctionPropertyNames.prototype]: string; // ok -} - -var StaticPrototypeFn_Anonymous = class { - static prototype() {} // always an error - prototype() {} // ok -} - -var StaticPrototypeFn_Anonymous2 = class { - static [FunctionPropertyNames.prototype]() {} // always an error - [FunctionPropertyNames.prototype]() {} // ok -} - -// caller -var StaticCaller_Anonymous = class { - static caller: number; // error without useDefineForClassFields - caller: string; // ok -} - -var StaticCaller_Anonymous2 = class { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - [FunctionPropertyNames.caller]: string; // ok -} - -var StaticCallerFn_Anonymous = class { - static caller() {} // error without useDefineForClassFields - caller() {} // ok -} - -var StaticCallerFn_Anonymous2 = class { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - [FunctionPropertyNames.caller]() {} // ok -} - -// arguments -var StaticArguments_Anonymous = class { - static arguments: number; // error without useDefineForClassFields - arguments: string; // ok -} - -var StaticArguments_Anonymous2 = class { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - [FunctionPropertyNames.arguments]: string; // ok -} - -var StaticArgumentsFn_Anonymous = class { - static arguments() {} // error without useDefineForClassFields - arguments() {} // ok -} - -var StaticArgumentsFn_Anonymous2 = class { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - [FunctionPropertyNames.arguments]() {} // ok -} - - -// === Static properties on default exported classes === - -// name -module TestOnDefaultExportedClass_1 { - class StaticName { - static name: number; // error without useDefineForClassFields - name: string; // ok - } -} - -export class ExportedStaticName { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - [FunctionPropertyNames.name]: string; // ok -} - -module TestOnDefaultExportedClass_2 { - class StaticNameFn { - static name() {} // error without useDefineForClassFields - name() {} // ok - } -} - -export class ExportedStaticNameFn { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - [FunctionPropertyNames.name]() {} // ok -} - -// length -module TestOnDefaultExportedClass_3 { - export default class StaticLength { - static length: number; // error without useDefineForClassFields - length: string; // ok - } -} - -export class ExportedStaticLength { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - [FunctionPropertyNames.length]: string; // ok -} - -module TestOnDefaultExportedClass_4 { - export default class StaticLengthFn { - static length() {} // error without useDefineForClassFields - length() {} // ok - } -} - -export class ExportedStaticLengthFn { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - [FunctionPropertyNames.length]() {} // ok -} - -// prototype -module TestOnDefaultExportedClass_5 { - export default class StaticPrototype { - static prototype: number; // always an error - prototype: string; // ok - } -} - -export class ExportedStaticPrototype { - static [FunctionPropertyNames.prototype]: number; // always an error - [FunctionPropertyNames.prototype]: string; // ok -} - -module TestOnDefaultExportedClass_6 { - export default class StaticPrototypeFn { - static prototype() {} // always an error - prototype() {} // ok - } -} - -export class ExportedStaticPrototypeFn { - static [FunctionPropertyNames.prototype]() {} // always an error - [FunctionPropertyNames.prototype]() {} // ok -} - -// caller -module TestOnDefaultExportedClass_7 { - export default class StaticCaller { - static caller: number; // error without useDefineForClassFields - caller: string; // ok - } -} - -export class ExportedStaticCaller { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - [FunctionPropertyNames.caller]: string; // ok -} - -module TestOnDefaultExportedClass_8 { - export default class StaticCallerFn { - static caller() {} // error without useDefineForClassFields - caller() {} // ok - } -} - -export class ExportedStaticCallerFn { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - [FunctionPropertyNames.caller]() {} // ok -} - -// arguments -module TestOnDefaultExportedClass_9 { - export default class StaticArguments { - static arguments: number; // error without useDefineForClassFields - arguments: string; // ok - } -} - -export class ExportedStaticArguments { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - [FunctionPropertyNames.arguments]: string; // ok -} - -module TestOnDefaultExportedClass_10 { - export default class StaticArgumentsFn { - static arguments() {} // error without useDefineForClassFields - arguments() {} // ok - } -} - -export class ExportedStaticArgumentsFn { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - [FunctionPropertyNames.arguments]() {} // ok -} - -/// [Declarations] //// - - - -//// [staticPropertyNameConflicts.d.ts] -declare const FunctionPropertyNames: { - readonly name: "name"; - readonly length: "length"; - readonly prototype: "prototype"; - readonly caller: "caller"; - readonly arguments: "arguments"; -}; -export declare class ExportedStaticName { - static [FunctionPropertyNames.name]: number; - [FunctionPropertyNames.name]: string; -} -export declare class ExportedStaticNameFn { - static [FunctionPropertyNames.name](): invalid; - [FunctionPropertyNames.name](): invalid; -} -export declare class ExportedStaticLength { - static [FunctionPropertyNames.length]: number; - [FunctionPropertyNames.length]: string; -} -export declare class ExportedStaticLengthFn { - static [FunctionPropertyNames.length](): invalid; - [FunctionPropertyNames.length](): invalid; -} -export declare class ExportedStaticPrototype { - [FunctionPropertyNames.prototype]: string; -} -export declare class ExportedStaticPrototypeFn { - static [FunctionPropertyNames.prototype](): invalid; - [FunctionPropertyNames.prototype](): invalid; -} -export declare class ExportedStaticCaller { - static [FunctionPropertyNames.caller]: number; - [FunctionPropertyNames.caller]: string; -} -export declare class ExportedStaticCallerFn { - static [FunctionPropertyNames.caller](): invalid; - [FunctionPropertyNames.caller](): invalid; -} -export declare class ExportedStaticArguments { - static [FunctionPropertyNames.arguments]: number; - [FunctionPropertyNames.arguments]: string; -} -export declare class ExportedStaticArgumentsFn { - static [FunctionPropertyNames.arguments](): invalid; - [FunctionPropertyNames.arguments](): invalid; -} -export {}; - -/// [Errors] //// - -staticPropertyNameConflicts.ts(11,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. -staticPropertyNameConflicts.ts(16,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName2'. -staticPropertyNameConflicts.ts(21,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. -staticPropertyNameConflicts.ts(26,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn2'. -staticPropertyNameConflicts.ts(32,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. -staticPropertyNameConflicts.ts(37,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength2'. -staticPropertyNameConflicts.ts(42,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. -staticPropertyNameConflicts.ts(47,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn2'. -staticPropertyNameConflicts.ts(53,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. -staticPropertyNameConflicts.ts(58,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype2'. -staticPropertyNameConflicts.ts(63,12): error TS2300: Duplicate identifier 'prototype'. -staticPropertyNameConflicts.ts(63,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. -staticPropertyNameConflicts.ts(68,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. -staticPropertyNameConflicts.ts(68,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn2'. -staticPropertyNameConflicts.ts(74,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. -staticPropertyNameConflicts.ts(79,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller2'. -staticPropertyNameConflicts.ts(84,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. -staticPropertyNameConflicts.ts(89,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn2'. -staticPropertyNameConflicts.ts(95,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. -staticPropertyNameConflicts.ts(100,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments2'. -staticPropertyNameConflicts.ts(105,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. -staticPropertyNameConflicts.ts(110,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn2'. -staticPropertyNameConflicts.ts(119,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName_Anonymous'. -staticPropertyNameConflicts.ts(124,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName_Anonymous2'. -staticPropertyNameConflicts.ts(129,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn_Anonymous'. -staticPropertyNameConflicts.ts(134,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn_Anonymous2'. -staticPropertyNameConflicts.ts(140,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength_Anonymous'. -staticPropertyNameConflicts.ts(145,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength_Anonymous2'. -staticPropertyNameConflicts.ts(150,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn_Anonymous'. -staticPropertyNameConflicts.ts(155,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn_Anonymous2'. -staticPropertyNameConflicts.ts(161,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous'. -staticPropertyNameConflicts.ts(166,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous2'. -staticPropertyNameConflicts.ts(171,12): error TS2300: Duplicate identifier 'prototype'. -staticPropertyNameConflicts.ts(171,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous'. -staticPropertyNameConflicts.ts(176,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. -staticPropertyNameConflicts.ts(176,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous2'. -staticPropertyNameConflicts.ts(182,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller_Anonymous'. -staticPropertyNameConflicts.ts(187,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller_Anonymous2'. -staticPropertyNameConflicts.ts(192,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn_Anonymous'. -staticPropertyNameConflicts.ts(197,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn_Anonymous2'. -staticPropertyNameConflicts.ts(203,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments_Anonymous'. -staticPropertyNameConflicts.ts(208,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments_Anonymous2'. -staticPropertyNameConflicts.ts(213,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn_Anonymous'. -staticPropertyNameConflicts.ts(218,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn_Anonymous2'. -staticPropertyNameConflicts.ts(228,16): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. -staticPropertyNameConflicts.ts(234,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticName'. -staticPropertyNameConflicts.ts(240,16): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. -staticPropertyNameConflicts.ts(246,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticNameFn'. -staticPropertyNameConflicts.ts(246,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(247,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(252,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(253,16): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. -staticPropertyNameConflicts.ts(259,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLength'. -staticPropertyNameConflicts.ts(264,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(265,16): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. -staticPropertyNameConflicts.ts(271,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLengthFn'. -staticPropertyNameConflicts.ts(271,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. -staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. -staticPropertyNameConflicts.ts(289,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prototype'. -staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. -staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. -staticPropertyNameConflicts.ts(296,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. -staticPropertyNameConflicts.ts(296,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(297,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(302,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(303,16): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. -staticPropertyNameConflicts.ts(309,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCaller'. -staticPropertyNameConflicts.ts(314,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(315,16): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. -staticPropertyNameConflicts.ts(321,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCallerFn'. -staticPropertyNameConflicts.ts(321,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(322,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(327,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(328,16): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. -staticPropertyNameConflicts.ts(334,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArguments'. -staticPropertyNameConflicts.ts(339,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(340,16): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. -staticPropertyNameConflicts.ts(346,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArgumentsFn'. -staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== staticPropertyNameConflicts.ts (84 errors) ==== - const FunctionPropertyNames = { - name: 'name', - length: 'length', - prototype: 'prototype', - caller: 'caller', - arguments: 'arguments', - } as const; - - // name - class StaticName { - static name: number; // error without useDefineForClassFields - ~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. - name: string; // ok - } - - class StaticName2 { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName2'. - [FunctionPropertyNames.name]: number; // ok - } - - class StaticNameFn { - static name() {} // error without useDefineForClassFields - ~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. - name() {} // ok - } - - class StaticNameFn2 { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn2'. - [FunctionPropertyNames.name]() {} // ok - } - - // length - class StaticLength { - static length: number; // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. - length: string; // ok - } - - class StaticLength2 { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength2'. - [FunctionPropertyNames.length]: number; // ok - } - - class StaticLengthFn { - static length() {} // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. - length() {} // ok - } - - class StaticLengthFn2 { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn2'. - [FunctionPropertyNames.length]() {} // ok - } - - // prototype - class StaticPrototype { - static prototype: number; // always an error - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. - prototype: string; // ok - } - - class StaticPrototype2 { - static [FunctionPropertyNames.prototype]: number; // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype2'. - [FunctionPropertyNames.prototype]: string; // ok - } - - class StaticPrototypeFn { - static prototype() {} // always an error - ~~~~~~~~~ -!!! error TS2300: Duplicate identifier 'prototype'. - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. - prototype() {} // ok - } - - class StaticPrototypeFn2 { - static [FunctionPropertyNames.prototype]() {} // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn2'. - [FunctionPropertyNames.prototype]() {} // ok - } - - // caller - class StaticCaller { - static caller: number; // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. - caller: string; // ok - } - - class StaticCaller2 { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller2'. - [FunctionPropertyNames.caller]: string; // ok - } - - class StaticCallerFn { - static caller() {} // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. - caller() {} // ok - } - - class StaticCallerFn2 { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn2'. - [FunctionPropertyNames.caller]() {} // ok - } - - // arguments - class StaticArguments { - static arguments: number; // error without useDefineForClassFields - ~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. - arguments: string; // ok - } - - class StaticArguments2 { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments2'. - [FunctionPropertyNames.arguments]: string; // ok - } - - class StaticArgumentsFn { - static arguments() {} // error without useDefineForClassFields - ~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. - arguments() {} // ok - } - - class StaticArgumentsFn2 { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn2'. - [FunctionPropertyNames.arguments]() {} // ok - } - - - // === Static properties on anonymous classes === - - // name - var StaticName_Anonymous = class { - static name: number; // error without useDefineForClassFields - ~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName_Anonymous'. - name: string; // ok - } - - var StaticName_Anonymous2 = class { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName_Anonymous2'. - [FunctionPropertyNames.name]: string; // ok - } - - var StaticNameFn_Anonymous = class { - static name() {} // error without useDefineForClassFields - ~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn_Anonymous'. - name() {} // ok - } - - var StaticNameFn_Anonymous2 = class { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn_Anonymous2'. - [FunctionPropertyNames.name]() {} // ok - } - - // length - var StaticLength_Anonymous = class { - static length: number; // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength_Anonymous'. - length: string; // ok - } - - var StaticLength_Anonymous2 = class { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength_Anonymous2'. - [FunctionPropertyNames.length]: string; // ok - } - - var StaticLengthFn_Anonymous = class { - static length() {} // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn_Anonymous'. - length() {} // ok - } - - var StaticLengthFn_Anonymous2 = class { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn_Anonymous2'. - [FunctionPropertyNames.length]() {} // ok - } - - // prototype - var StaticPrototype_Anonymous = class { - static prototype: number; // always an error - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous'. - prototype: string; // ok - } - - var StaticPrototype_Anonymous2 = class { - static [FunctionPropertyNames.prototype]: number; // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous2'. - [FunctionPropertyNames.prototype]: string; // ok - } - - var StaticPrototypeFn_Anonymous = class { - static prototype() {} // always an error - ~~~~~~~~~ -!!! error TS2300: Duplicate identifier 'prototype'. - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous'. - prototype() {} // ok - } - - var StaticPrototypeFn_Anonymous2 = class { - static [FunctionPropertyNames.prototype]() {} // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous2'. - [FunctionPropertyNames.prototype]() {} // ok - } - - // caller - var StaticCaller_Anonymous = class { - static caller: number; // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller_Anonymous'. - caller: string; // ok - } - - var StaticCaller_Anonymous2 = class { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller_Anonymous2'. - [FunctionPropertyNames.caller]: string; // ok - } - - var StaticCallerFn_Anonymous = class { - static caller() {} // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn_Anonymous'. - caller() {} // ok - } - - var StaticCallerFn_Anonymous2 = class { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn_Anonymous2'. - [FunctionPropertyNames.caller]() {} // ok - } - - // arguments - var StaticArguments_Anonymous = class { - static arguments: number; // error without useDefineForClassFields - ~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments_Anonymous'. - arguments: string; // ok - } - - var StaticArguments_Anonymous2 = class { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments_Anonymous2'. - [FunctionPropertyNames.arguments]: string; // ok - } - - var StaticArgumentsFn_Anonymous = class { - static arguments() {} // error without useDefineForClassFields - ~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn_Anonymous'. - arguments() {} // ok - } - - var StaticArgumentsFn_Anonymous2 = class { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn_Anonymous2'. - [FunctionPropertyNames.arguments]() {} // ok - } - - - // === Static properties on default exported classes === - - // name - module TestOnDefaultExportedClass_1 { - class StaticName { - static name: number; // error without useDefineForClassFields - ~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. - name: string; // ok - } - } - - export class ExportedStaticName { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticName'. - [FunctionPropertyNames.name]: string; // ok - } - - module TestOnDefaultExportedClass_2 { - class StaticNameFn { - static name() {} // error without useDefineForClassFields - ~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. - name() {} // ok - } - } - - export class ExportedStaticNameFn { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'ExportedStaticNameFn'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:246:12: Add a return type to the method - [FunctionPropertyNames.name]() {} // ok - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:247:5: Add a return type to the method - } - - // length - module TestOnDefaultExportedClass_3 { - export default class StaticLength { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static length: number; // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. - length: string; // ok - } - } - - export class ExportedStaticLength { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLength'. - [FunctionPropertyNames.length]: string; // ok - } - - module TestOnDefaultExportedClass_4 { - export default class StaticLengthFn { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static length() {} // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. - length() {} // ok - } - } - - export class ExportedStaticLengthFn { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'ExportedStaticLengthFn'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:271:12: Add a return type to the method - [FunctionPropertyNames.length]() {} // ok - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:272:5: Add a return type to the method - } - - // prototype - module TestOnDefaultExportedClass_5 { - export default class StaticPrototype { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static prototype: number; // always an error - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. - prototype: string; // ok - } - } - - export class ExportedStaticPrototype { - static [FunctionPropertyNames.prototype]: number; // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. - [FunctionPropertyNames.prototype]: string; // ok - } - - module TestOnDefaultExportedClass_6 { - export default class StaticPrototypeFn { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static prototype() {} // always an error - ~~~~~~~~~ -!!! error TS2300: Duplicate identifier 'prototype'. - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. - prototype() {} // ok - } - } - - export class ExportedStaticPrototypeFn { - static [FunctionPropertyNames.prototype]() {} // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:296:12: Add a return type to the method - [FunctionPropertyNames.prototype]() {} // ok - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:297:5: Add a return type to the method - } - - // caller - module TestOnDefaultExportedClass_7 { - export default class StaticCaller { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static caller: number; // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. - caller: string; // ok - } - } - - export class ExportedStaticCaller { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCaller'. - [FunctionPropertyNames.caller]: string; // ok - } - - module TestOnDefaultExportedClass_8 { - export default class StaticCallerFn { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static caller() {} // error without useDefineForClassFields - ~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. - caller() {} // ok - } - } - - export class ExportedStaticCallerFn { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'ExportedStaticCallerFn'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:321:12: Add a return type to the method - [FunctionPropertyNames.caller]() {} // ok - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:322:5: Add a return type to the method - } - - // arguments - module TestOnDefaultExportedClass_9 { - export default class StaticArguments { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static arguments: number; // error without useDefineForClassFields - ~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. - arguments: string; // ok - } - } - - export class ExportedStaticArguments { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArguments'. - [FunctionPropertyNames.arguments]: string; // ok - } - - module TestOnDefaultExportedClass_10 { - export default class StaticArgumentsFn { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static arguments() {} // error without useDefineForClassFields - ~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. - arguments() {} // ok - } - } - - export class ExportedStaticArgumentsFn { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'ExportedStaticArgumentsFn'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:346:12: Add a return type to the method - [FunctionPropertyNames.arguments]() {} // ok - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:347:5: Add a return type to the method - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts deleted file mode 100644 index 59eaae2355e76..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/staticPropertyNameConflicts(usedefineforclassfields=true).d.ts +++ /dev/null @@ -1,876 +0,0 @@ -//// [tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts] //// - -//// [staticPropertyNameConflicts.ts] -const FunctionPropertyNames = { - name: 'name', - length: 'length', - prototype: 'prototype', - caller: 'caller', - arguments: 'arguments', -} as const; - -// name -class StaticName { - static name: number; // error without useDefineForClassFields - name: string; // ok -} - -class StaticName2 { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - [FunctionPropertyNames.name]: number; // ok -} - -class StaticNameFn { - static name() {} // error without useDefineForClassFields - name() {} // ok -} - -class StaticNameFn2 { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - [FunctionPropertyNames.name]() {} // ok -} - -// length -class StaticLength { - static length: number; // error without useDefineForClassFields - length: string; // ok -} - -class StaticLength2 { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - [FunctionPropertyNames.length]: number; // ok -} - -class StaticLengthFn { - static length() {} // error without useDefineForClassFields - length() {} // ok -} - -class StaticLengthFn2 { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - [FunctionPropertyNames.length]() {} // ok -} - -// prototype -class StaticPrototype { - static prototype: number; // always an error - prototype: string; // ok -} - -class StaticPrototype2 { - static [FunctionPropertyNames.prototype]: number; // always an error - [FunctionPropertyNames.prototype]: string; // ok -} - -class StaticPrototypeFn { - static prototype() {} // always an error - prototype() {} // ok -} - -class StaticPrototypeFn2 { - static [FunctionPropertyNames.prototype]() {} // always an error - [FunctionPropertyNames.prototype]() {} // ok -} - -// caller -class StaticCaller { - static caller: number; // error without useDefineForClassFields - caller: string; // ok -} - -class StaticCaller2 { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - [FunctionPropertyNames.caller]: string; // ok -} - -class StaticCallerFn { - static caller() {} // error without useDefineForClassFields - caller() {} // ok -} - -class StaticCallerFn2 { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - [FunctionPropertyNames.caller]() {} // ok -} - -// arguments -class StaticArguments { - static arguments: number; // error without useDefineForClassFields - arguments: string; // ok -} - -class StaticArguments2 { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - [FunctionPropertyNames.arguments]: string; // ok -} - -class StaticArgumentsFn { - static arguments() {} // error without useDefineForClassFields - arguments() {} // ok -} - -class StaticArgumentsFn2 { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - [FunctionPropertyNames.arguments]() {} // ok -} - - -// === Static properties on anonymous classes === - -// name -var StaticName_Anonymous = class { - static name: number; // error without useDefineForClassFields - name: string; // ok -} - -var StaticName_Anonymous2 = class { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - [FunctionPropertyNames.name]: string; // ok -} - -var StaticNameFn_Anonymous = class { - static name() {} // error without useDefineForClassFields - name() {} // ok -} - -var StaticNameFn_Anonymous2 = class { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - [FunctionPropertyNames.name]() {} // ok -} - -// length -var StaticLength_Anonymous = class { - static length: number; // error without useDefineForClassFields - length: string; // ok -} - -var StaticLength_Anonymous2 = class { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - [FunctionPropertyNames.length]: string; // ok -} - -var StaticLengthFn_Anonymous = class { - static length() {} // error without useDefineForClassFields - length() {} // ok -} - -var StaticLengthFn_Anonymous2 = class { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - [FunctionPropertyNames.length]() {} // ok -} - -// prototype -var StaticPrototype_Anonymous = class { - static prototype: number; // always an error - prototype: string; // ok -} - -var StaticPrototype_Anonymous2 = class { - static [FunctionPropertyNames.prototype]: number; // always an error - [FunctionPropertyNames.prototype]: string; // ok -} - -var StaticPrototypeFn_Anonymous = class { - static prototype() {} // always an error - prototype() {} // ok -} - -var StaticPrototypeFn_Anonymous2 = class { - static [FunctionPropertyNames.prototype]() {} // always an error - [FunctionPropertyNames.prototype]() {} // ok -} - -// caller -var StaticCaller_Anonymous = class { - static caller: number; // error without useDefineForClassFields - caller: string; // ok -} - -var StaticCaller_Anonymous2 = class { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - [FunctionPropertyNames.caller]: string; // ok -} - -var StaticCallerFn_Anonymous = class { - static caller() {} // error without useDefineForClassFields - caller() {} // ok -} - -var StaticCallerFn_Anonymous2 = class { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - [FunctionPropertyNames.caller]() {} // ok -} - -// arguments -var StaticArguments_Anonymous = class { - static arguments: number; // error without useDefineForClassFields - arguments: string; // ok -} - -var StaticArguments_Anonymous2 = class { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - [FunctionPropertyNames.arguments]: string; // ok -} - -var StaticArgumentsFn_Anonymous = class { - static arguments() {} // error without useDefineForClassFields - arguments() {} // ok -} - -var StaticArgumentsFn_Anonymous2 = class { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - [FunctionPropertyNames.arguments]() {} // ok -} - - -// === Static properties on default exported classes === - -// name -module TestOnDefaultExportedClass_1 { - class StaticName { - static name: number; // error without useDefineForClassFields - name: string; // ok - } -} - -export class ExportedStaticName { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - [FunctionPropertyNames.name]: string; // ok -} - -module TestOnDefaultExportedClass_2 { - class StaticNameFn { - static name() {} // error without useDefineForClassFields - name() {} // ok - } -} - -export class ExportedStaticNameFn { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - [FunctionPropertyNames.name]() {} // ok -} - -// length -module TestOnDefaultExportedClass_3 { - export default class StaticLength { - static length: number; // error without useDefineForClassFields - length: string; // ok - } -} - -export class ExportedStaticLength { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - [FunctionPropertyNames.length]: string; // ok -} - -module TestOnDefaultExportedClass_4 { - export default class StaticLengthFn { - static length() {} // error without useDefineForClassFields - length() {} // ok - } -} - -export class ExportedStaticLengthFn { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - [FunctionPropertyNames.length]() {} // ok -} - -// prototype -module TestOnDefaultExportedClass_5 { - export default class StaticPrototype { - static prototype: number; // always an error - prototype: string; // ok - } -} - -export class ExportedStaticPrototype { - static [FunctionPropertyNames.prototype]: number; // always an error - [FunctionPropertyNames.prototype]: string; // ok -} - -module TestOnDefaultExportedClass_6 { - export default class StaticPrototypeFn { - static prototype() {} // always an error - prototype() {} // ok - } -} - -export class ExportedStaticPrototypeFn { - static [FunctionPropertyNames.prototype]() {} // always an error - [FunctionPropertyNames.prototype]() {} // ok -} - -// caller -module TestOnDefaultExportedClass_7 { - export default class StaticCaller { - static caller: number; // error without useDefineForClassFields - caller: string; // ok - } -} - -export class ExportedStaticCaller { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - [FunctionPropertyNames.caller]: string; // ok -} - -module TestOnDefaultExportedClass_8 { - export default class StaticCallerFn { - static caller() {} // error without useDefineForClassFields - caller() {} // ok - } -} - -export class ExportedStaticCallerFn { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - [FunctionPropertyNames.caller]() {} // ok -} - -// arguments -module TestOnDefaultExportedClass_9 { - export default class StaticArguments { - static arguments: number; // error without useDefineForClassFields - arguments: string; // ok - } -} - -export class ExportedStaticArguments { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - [FunctionPropertyNames.arguments]: string; // ok -} - -module TestOnDefaultExportedClass_10 { - export default class StaticArgumentsFn { - static arguments() {} // error without useDefineForClassFields - arguments() {} // ok - } -} - -export class ExportedStaticArgumentsFn { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - [FunctionPropertyNames.arguments]() {} // ok -} - -/// [Declarations] //// - - - -//// [staticPropertyNameConflicts.d.ts] -declare const FunctionPropertyNames: { - readonly name: "name"; - readonly length: "length"; - readonly prototype: "prototype"; - readonly caller: "caller"; - readonly arguments: "arguments"; -}; -export declare class ExportedStaticName { - static [FunctionPropertyNames.name]: number; - [FunctionPropertyNames.name]: string; -} -export declare class ExportedStaticNameFn { - static [FunctionPropertyNames.name](): invalid; - [FunctionPropertyNames.name](): invalid; -} -export declare class ExportedStaticLength { - static [FunctionPropertyNames.length]: number; - [FunctionPropertyNames.length]: string; -} -export declare class ExportedStaticLengthFn { - static [FunctionPropertyNames.length](): invalid; - [FunctionPropertyNames.length](): invalid; -} -export declare class ExportedStaticPrototype { - [FunctionPropertyNames.prototype]: string; -} -export declare class ExportedStaticPrototypeFn { - static [FunctionPropertyNames.prototype](): invalid; - [FunctionPropertyNames.prototype](): invalid; -} -export declare class ExportedStaticCaller { - static [FunctionPropertyNames.caller]: number; - [FunctionPropertyNames.caller]: string; -} -export declare class ExportedStaticCallerFn { - static [FunctionPropertyNames.caller](): invalid; - [FunctionPropertyNames.caller](): invalid; -} -export declare class ExportedStaticArguments { - static [FunctionPropertyNames.arguments]: number; - [FunctionPropertyNames.arguments]: string; -} -export declare class ExportedStaticArgumentsFn { - static [FunctionPropertyNames.arguments](): invalid; - [FunctionPropertyNames.arguments](): invalid; -} -export {}; - -/// [Errors] //// - -staticPropertyNameConflicts.ts(53,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. -staticPropertyNameConflicts.ts(58,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype2'. -staticPropertyNameConflicts.ts(63,12): error TS2300: Duplicate identifier 'prototype'. -staticPropertyNameConflicts.ts(63,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. -staticPropertyNameConflicts.ts(68,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. -staticPropertyNameConflicts.ts(68,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn2'. -staticPropertyNameConflicts.ts(161,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous'. -staticPropertyNameConflicts.ts(166,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous2'. -staticPropertyNameConflicts.ts(171,12): error TS2300: Duplicate identifier 'prototype'. -staticPropertyNameConflicts.ts(171,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous'. -staticPropertyNameConflicts.ts(176,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. -staticPropertyNameConflicts.ts(176,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous2'. -staticPropertyNameConflicts.ts(246,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(247,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(252,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(264,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(271,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(272,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(277,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(278,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. -staticPropertyNameConflicts.ts(284,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. -staticPropertyNameConflicts.ts(289,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(290,16): error TS2300: Duplicate identifier 'prototype'. -staticPropertyNameConflicts.ts(290,16): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. -staticPropertyNameConflicts.ts(296,12): error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. -staticPropertyNameConflicts.ts(296,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. -staticPropertyNameConflicts.ts(296,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(297,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(302,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(314,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(321,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(322,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(327,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(339,12): error TS1319: A default export can only be used in an ECMAScript-style module. -staticPropertyNameConflicts.ts(346,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -staticPropertyNameConflicts.ts(347,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== staticPropertyNameConflicts.ts (36 errors) ==== - const FunctionPropertyNames = { - name: 'name', - length: 'length', - prototype: 'prototype', - caller: 'caller', - arguments: 'arguments', - } as const; - - // name - class StaticName { - static name: number; // error without useDefineForClassFields - name: string; // ok - } - - class StaticName2 { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - [FunctionPropertyNames.name]: number; // ok - } - - class StaticNameFn { - static name() {} // error without useDefineForClassFields - name() {} // ok - } - - class StaticNameFn2 { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - [FunctionPropertyNames.name]() {} // ok - } - - // length - class StaticLength { - static length: number; // error without useDefineForClassFields - length: string; // ok - } - - class StaticLength2 { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - [FunctionPropertyNames.length]: number; // ok - } - - class StaticLengthFn { - static length() {} // error without useDefineForClassFields - length() {} // ok - } - - class StaticLengthFn2 { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - [FunctionPropertyNames.length]() {} // ok - } - - // prototype - class StaticPrototype { - static prototype: number; // always an error - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. - prototype: string; // ok - } - - class StaticPrototype2 { - static [FunctionPropertyNames.prototype]: number; // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype2'. - [FunctionPropertyNames.prototype]: string; // ok - } - - class StaticPrototypeFn { - static prototype() {} // always an error - ~~~~~~~~~ -!!! error TS2300: Duplicate identifier 'prototype'. - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. - prototype() {} // ok - } - - class StaticPrototypeFn2 { - static [FunctionPropertyNames.prototype]() {} // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn2'. - [FunctionPropertyNames.prototype]() {} // ok - } - - // caller - class StaticCaller { - static caller: number; // error without useDefineForClassFields - caller: string; // ok - } - - class StaticCaller2 { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - [FunctionPropertyNames.caller]: string; // ok - } - - class StaticCallerFn { - static caller() {} // error without useDefineForClassFields - caller() {} // ok - } - - class StaticCallerFn2 { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - [FunctionPropertyNames.caller]() {} // ok - } - - // arguments - class StaticArguments { - static arguments: number; // error without useDefineForClassFields - arguments: string; // ok - } - - class StaticArguments2 { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - [FunctionPropertyNames.arguments]: string; // ok - } - - class StaticArgumentsFn { - static arguments() {} // error without useDefineForClassFields - arguments() {} // ok - } - - class StaticArgumentsFn2 { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - [FunctionPropertyNames.arguments]() {} // ok - } - - - // === Static properties on anonymous classes === - - // name - var StaticName_Anonymous = class { - static name: number; // error without useDefineForClassFields - name: string; // ok - } - - var StaticName_Anonymous2 = class { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - [FunctionPropertyNames.name]: string; // ok - } - - var StaticNameFn_Anonymous = class { - static name() {} // error without useDefineForClassFields - name() {} // ok - } - - var StaticNameFn_Anonymous2 = class { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - [FunctionPropertyNames.name]() {} // ok - } - - // length - var StaticLength_Anonymous = class { - static length: number; // error without useDefineForClassFields - length: string; // ok - } - - var StaticLength_Anonymous2 = class { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - [FunctionPropertyNames.length]: string; // ok - } - - var StaticLengthFn_Anonymous = class { - static length() {} // error without useDefineForClassFields - length() {} // ok - } - - var StaticLengthFn_Anonymous2 = class { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - [FunctionPropertyNames.length]() {} // ok - } - - // prototype - var StaticPrototype_Anonymous = class { - static prototype: number; // always an error - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous'. - prototype: string; // ok - } - - var StaticPrototype_Anonymous2 = class { - static [FunctionPropertyNames.prototype]: number; // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype_Anonymous2'. - [FunctionPropertyNames.prototype]: string; // ok - } - - var StaticPrototypeFn_Anonymous = class { - static prototype() {} // always an error - ~~~~~~~~~ -!!! error TS2300: Duplicate identifier 'prototype'. - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous'. - prototype() {} // ok - } - - var StaticPrototypeFn_Anonymous2 = class { - static [FunctionPropertyNames.prototype]() {} // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn_Anonymous2'. - [FunctionPropertyNames.prototype]() {} // ok - } - - // caller - var StaticCaller_Anonymous = class { - static caller: number; // error without useDefineForClassFields - caller: string; // ok - } - - var StaticCaller_Anonymous2 = class { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - [FunctionPropertyNames.caller]: string; // ok - } - - var StaticCallerFn_Anonymous = class { - static caller() {} // error without useDefineForClassFields - caller() {} // ok - } - - var StaticCallerFn_Anonymous2 = class { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - [FunctionPropertyNames.caller]() {} // ok - } - - // arguments - var StaticArguments_Anonymous = class { - static arguments: number; // error without useDefineForClassFields - arguments: string; // ok - } - - var StaticArguments_Anonymous2 = class { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - [FunctionPropertyNames.arguments]: string; // ok - } - - var StaticArgumentsFn_Anonymous = class { - static arguments() {} // error without useDefineForClassFields - arguments() {} // ok - } - - var StaticArgumentsFn_Anonymous2 = class { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - [FunctionPropertyNames.arguments]() {} // ok - } - - - // === Static properties on default exported classes === - - // name - module TestOnDefaultExportedClass_1 { - class StaticName { - static name: number; // error without useDefineForClassFields - name: string; // ok - } - } - - export class ExportedStaticName { - static [FunctionPropertyNames.name]: number; // error without useDefineForClassFields - [FunctionPropertyNames.name]: string; // ok - } - - module TestOnDefaultExportedClass_2 { - class StaticNameFn { - static name() {} // error without useDefineForClassFields - name() {} // ok - } - } - - export class ExportedStaticNameFn { - static [FunctionPropertyNames.name]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:246:12: Add a return type to the method - [FunctionPropertyNames.name]() {} // ok - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:247:5: Add a return type to the method - } - - // length - module TestOnDefaultExportedClass_3 { - export default class StaticLength { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static length: number; // error without useDefineForClassFields - length: string; // ok - } - } - - export class ExportedStaticLength { - static [FunctionPropertyNames.length]: number; // error without useDefineForClassFields - [FunctionPropertyNames.length]: string; // ok - } - - module TestOnDefaultExportedClass_4 { - export default class StaticLengthFn { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static length() {} // error without useDefineForClassFields - length() {} // ok - } - } - - export class ExportedStaticLengthFn { - static [FunctionPropertyNames.length]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:271:12: Add a return type to the method - [FunctionPropertyNames.length]() {} // ok - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:272:5: Add a return type to the method - } - - // prototype - module TestOnDefaultExportedClass_5 { - export default class StaticPrototype { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static prototype: number; // always an error - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. - prototype: string; // ok - } - } - - export class ExportedStaticPrototype { - static [FunctionPropertyNames.prototype]: number; // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototype'. - [FunctionPropertyNames.prototype]: string; // ok - } - - module TestOnDefaultExportedClass_6 { - export default class StaticPrototypeFn { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static prototype() {} // always an error - ~~~~~~~~~ -!!! error TS2300: Duplicate identifier 'prototype'. - ~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. - prototype() {} // ok - } - } - - export class ExportedStaticPrototypeFn { - static [FunctionPropertyNames.prototype]() {} // always an error - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2300: Duplicate identifier '[FunctionPropertyNames.prototype]'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'ExportedStaticPrototypeFn'. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:296:12: Add a return type to the method - [FunctionPropertyNames.prototype]() {} // ok - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:297:5: Add a return type to the method - } - - // caller - module TestOnDefaultExportedClass_7 { - export default class StaticCaller { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static caller: number; // error without useDefineForClassFields - caller: string; // ok - } - } - - export class ExportedStaticCaller { - static [FunctionPropertyNames.caller]: number; // error without useDefineForClassFields - [FunctionPropertyNames.caller]: string; // ok - } - - module TestOnDefaultExportedClass_8 { - export default class StaticCallerFn { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static caller() {} // error without useDefineForClassFields - caller() {} // ok - } - } - - export class ExportedStaticCallerFn { - static [FunctionPropertyNames.caller]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:321:12: Add a return type to the method - [FunctionPropertyNames.caller]() {} // ok - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:322:5: Add a return type to the method - } - - // arguments - module TestOnDefaultExportedClass_9 { - export default class StaticArguments { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static arguments: number; // error without useDefineForClassFields - arguments: string; // ok - } - } - - export class ExportedStaticArguments { - static [FunctionPropertyNames.arguments]: number; // error without useDefineForClassFields - [FunctionPropertyNames.arguments]: string; // ok - } - - module TestOnDefaultExportedClass_10 { - export default class StaticArgumentsFn { - ~~~~~~~ -!!! error TS1319: A default export can only be used in an ECMAScript-style module. - static arguments() {} // error without useDefineForClassFields - arguments() {} // ok - } - } - - export class ExportedStaticArgumentsFn { - static [FunctionPropertyNames.arguments]() {} // error without useDefineForClassFields - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:346:12: Add a return type to the method - [FunctionPropertyNames.arguments]() {} // ok - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 staticPropertyNameConflicts.ts:347:5: Add a return type to the method - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/stringLiteralsWithTypeAssertions01.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/stringLiteralsWithTypeAssertions01.d.ts deleted file mode 100644 index e39bdff493a74..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/stringLiteralsWithTypeAssertions01.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -//// [tests/cases/conformance/types/literal/stringLiteralsWithTypeAssertions01.ts] //// - -//// [stringLiteralsWithTypeAssertions01.ts] -let fooOrBar: "foo" | "bar"; - -let a = "foo" as "bar"; -let b = "bar" as "foo"; -let c = fooOrBar as "foo"; -let d = fooOrBar as "bar"; -let e = fooOrBar as "baz"; -let f = "baz" as typeof fooOrBar; - -/// [Declarations] //// - - - -//// [stringLiteralsWithTypeAssertions01.d.ts] -declare let fooOrBar: "foo" | "bar"; -declare let a: "bar"; -declare let b: "foo"; -declare let c: "foo"; -declare let d: "bar"; -declare let e: "baz"; -declare let f: "foo" | "bar"; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts deleted file mode 100644 index b506f85c8002e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty1.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -//// [tests/cases/conformance/es6/Symbols/symbolProperty1.ts] //// - -//// [symbolProperty1.ts] -var s: symbol; -var x = { - [s]: 0, - [s]() { }, - get [s]() { - return 0; - } -} - -/// [Declarations] //// - - - -//// [symbolProperty1.d.ts] -declare var s: symbol; -declare var x: invalid; - -/// [Errors] //// - -symbolProperty1.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -symbolProperty1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -symbolProperty1.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -symbolProperty1.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -symbolProperty1.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== symbolProperty1.ts (5 errors) ==== - var s: symbol; - var x = { - [s]: 0, - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x. - [s]() { }, - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x. -!!! related TS9034 symbolProperty1.ts:4:5: Add a return type to the method - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x. - get [s]() { - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 symbolProperty1.ts:5:9: Add a return type to the get accessor declaration. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 symbolProperty1.ts:2:5: Add a type annotation to the variable x. - return 0; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts deleted file mode 100644 index 485bc2dacf457..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty2.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -//// [tests/cases/conformance/es6/Symbols/symbolProperty2.ts] //// - -//// [symbolProperty2.ts] -var s = Symbol(); -var x = { - [s]: 0, - [s]() { }, - get [s]() { - return 0; - } -} - -/// [Declarations] //// - - - -//// [symbolProperty2.d.ts] -declare var s: invalid; -declare var x: invalid; - -/// [Errors] //// - -symbolProperty2.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -symbolProperty2.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -symbolProperty2.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -symbolProperty2.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -symbolProperty2.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -symbolProperty2.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== symbolProperty2.ts (6 errors) ==== - var s = Symbol(); - ~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 symbolProperty2.ts:1:5: Add a type annotation to the variable s. - var x = { - [s]: 0, - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x. - [s]() { }, - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x. -!!! related TS9034 symbolProperty2.ts:4:5: Add a return type to the method - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x. - get [s]() { - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 symbolProperty2.ts:5:9: Add a return type to the get accessor declaration. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 symbolProperty2.ts:2:5: Add a type annotation to the variable x. - return 0; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts deleted file mode 100644 index 0a349e576a791..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty3.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -//// [tests/cases/conformance/es6/Symbols/symbolProperty3.ts] //// - -//// [symbolProperty3.ts] -var s = Symbol; -var x = { - [s]: 0, - [s]() { }, - get [s]() { - return 0; - } -} - -/// [Declarations] //// - - - -//// [symbolProperty3.d.ts] -declare var s: invalid; -declare var x: invalid; - -/// [Errors] //// - -symbolProperty3.ts(1,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -symbolProperty3.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty3.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -symbolProperty3.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -symbolProperty3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -symbolProperty3.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty3.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -symbolProperty3.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== symbolProperty3.ts (9 errors) ==== - var s = Symbol; - ~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 symbolProperty3.ts:1:5: Add a type annotation to the variable s. - var x = { - [s]: 0, - ~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x. - [s]() { }, - ~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x. -!!! related TS9034 symbolProperty3.ts:4:5: Add a return type to the method - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x. - get [s]() { - ~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 symbolProperty3.ts:5:9: Add a return type to the get accessor declaration. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 symbolProperty3.ts:2:5: Add a type annotation to the variable x. - return 0; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts deleted file mode 100644 index 9dc32259545f7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty52.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -//// [tests/cases/conformance/es6/Symbols/symbolProperty52.ts] //// - -//// [symbolProperty52.ts] -var obj = { - [Symbol.nonsense]: 0 -}; - -obj = {}; - -obj[Symbol.nonsense]; - -/// [Declarations] //// - - - -//// [symbolProperty52.d.ts] -declare var obj: invalid; - -/// [Errors] //// - -symbolProperty52.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -symbolProperty52.ts(2,13): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. -symbolProperty52.ts(7,12): error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. - - -==== symbolProperty52.ts (3 errors) ==== - var obj = { - [Symbol.nonsense]: 0 - ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 symbolProperty52.ts:1:5: Add a type annotation to the variable obj. - ~~~~~~~~ -!!! error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. - }; - - obj = {}; - - obj[Symbol.nonsense]; - ~~~~~~~~ -!!! error TS2339: Property 'nonsense' does not exist on type 'SymbolConstructor'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts deleted file mode 100644 index a69ff386c7bc7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty53.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -//// [tests/cases/conformance/es6/Symbols/symbolProperty53.ts] //// - -//// [symbolProperty53.ts] -var obj = { - [Symbol.for]: 0 -}; - -obj[Symbol.for]; - -/// [Declarations] //// - - - -//// [symbolProperty53.d.ts] -declare var obj: invalid; - -/// [Errors] //// - -symbolProperty53.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty53.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -symbolProperty53.ts(5,5): error TS2538: Type '(key: string) => symbol' cannot be used as an index type. - - -==== symbolProperty53.ts (3 errors) ==== - var obj = { - [Symbol.for]: 0 - ~~~~~~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 symbolProperty53.ts:1:5: Add a type annotation to the variable obj. - }; - - obj[Symbol.for]; - ~~~~~~~~~~ -!!! error TS2538: Type '(key: string) => symbol' cannot be used as an index type. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts deleted file mode 100644 index 2a69012fee7bf..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty54.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/es6/Symbols/symbolProperty54.ts] //// - -//// [symbolProperty54.ts] -var obj = { - [Symbol.prototype]: 0 -}; - -/// [Declarations] //// - - - -//// [symbolProperty54.d.ts] -declare var obj: invalid; - -/// [Errors] //// - -symbolProperty54.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -symbolProperty54.ts(2,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== symbolProperty54.ts (2 errors) ==== - var obj = { - [Symbol.prototype]: 0 - ~~~~~~~~~~~~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 symbolProperty54.ts:1:5: Add a type annotation to the variable obj. - }; \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts deleted file mode 100644 index 74047242805b4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty58.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -//// [tests/cases/conformance/es6/Symbols/symbolProperty58.ts] //// - -//// [symbolProperty58.ts] -interface SymbolConstructor { - foo: string; -} - -var obj = { - [Symbol.foo]: 0 -} - -/// [Declarations] //// - - - -//// [symbolProperty58.d.ts] -interface SymbolConstructor { - foo: string; -} -declare var obj: invalid; - -/// [Errors] //// - -symbolProperty58.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== symbolProperty58.ts (1 errors) ==== - interface SymbolConstructor { - foo: string; - } - - var obj = { - [Symbol.foo]: 0 - ~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 symbolProperty58.ts:5:5: Add a type annotation to the variable obj. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty59.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty59.d.ts deleted file mode 100644 index 4ccec59cc3e39..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/symbolProperty59.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/es6/Symbols/symbolProperty59.ts] //// - -//// [symbolProperty59.ts] -interface I { - [Symbol.keyFor]: string; -} - -/// [Declarations] //// - - - -//// [symbolProperty59.d.ts] -interface I { -} - -/// [Errors] //// - -symbolProperty59.ts(2,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. -symbolProperty59.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - -==== symbolProperty59.ts (2 errors) ==== - interface I { - [Symbol.keyFor]: string; - ~~~~~~~~~~~~~~~ -!!! 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 TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeErrors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeErrors.d.ts deleted file mode 100644 index ab977f59595b8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeErrors.d.ts +++ /dev/null @@ -1,280 +0,0 @@ -//// [tests/cases/conformance/types/thisType/thisTypeErrors.ts] //// - -//// [thisTypeErrors.ts] -var x1: this; -var x2: { a: this }; -var x3: this[]; - -function f1(x: this): this { - var y: this; - return this; -} - -interface I1 { - a: { x: this }; - b: { (): this }; - c: { new (): this }; - d: { [x: string]: this }; - e: { f(x: this): this }; -} - -class C1 { - a: { x: this }; - b: { (): this }; - c: { new (): this }; - d: { [x: string]: this }; - e: { f(x: this): this }; -} - -class C2 { - static x: this; - static y = undefined; - static foo(x: this): this { - return undefined; - } -} - -namespace N1 { - export var x: this; - export var y = this; -} - -class C3 { - x1 = { - g(x: this): this { - return undefined; - } - } - f() { - function g(x: this): this { - return undefined; - } - let x2 = { - h(x: this): this { - return undefined; - } - } - } -} - - -/// [Declarations] //// - - - -//// [thisTypeErrors.d.ts] -declare var x1: this; -declare var x2: { - a: this; -}; -declare var x3: this[]; -declare function f1(x: this): this; -interface I1 { - a: { - x: this; - }; - b: { - (): this; - }; - c: { - new (): this; - }; - d: { - [x: string]: this; - }; - e: { - f(x: this): this; - }; -} -declare class C1 { - a: { - x: this; - }; - b: { - (): this; - }; - c: { - new (): this; - }; - d: { - [x: string]: this; - }; - e: { - f(x: this): this; - }; -} -declare class C2 { - static x: this; - static y: any; - static foo(x: this): this; -} -declare namespace N1 { - var x: this; - var y: invalid; -} -declare class C3 { - x1: { - g(x: any): any; - }; - f(): invalid; -} - -/// [Errors] //// - -thisTypeErrors.ts(1,9): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(2,14): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(3,9): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(5,16): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(5,23): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(6,12): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(11,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(12,14): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(13,18): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(14,23): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(15,15): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(15,22): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(19,13): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(20,14): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(21,18): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(22,23): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(23,15): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(23,22): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(27,15): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(28,17): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(29,19): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(29,26): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(35,19): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(36,20): error TS2331: 'this' cannot be referenced in a module or namespace body. -thisTypeErrors.ts(36,20): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -thisTypeErrors.ts(41,14): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(41,21): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(45,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -thisTypeErrors.ts(46,23): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(46,30): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(50,18): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -thisTypeErrors.ts(50,25): error TS2526: A 'this' type is available only in a non-static member of a class or interface. - - -==== thisTypeErrors.ts (32 errors) ==== - var x1: this; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - var x2: { a: this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - var x3: this[]; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - - function f1(x: this): this { - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - var y: this; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - return this; - } - - interface I1 { - a: { x: this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - b: { (): this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - c: { new (): this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - d: { [x: string]: this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - e: { f(x: this): this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - } - - class C1 { - a: { x: this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - b: { (): this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - c: { new (): this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - d: { [x: string]: this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - e: { f(x: this): this }; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - } - - class C2 { - static x: this; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - static y = undefined; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - static foo(x: this): this { - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - return undefined; - } - } - - namespace N1 { - export var x: this; - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - export var y = this; - ~~~~ -!!! error TS2331: 'this' cannot be referenced in a module or namespace body. - ~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 thisTypeErrors.ts:36:16: Add a type annotation to the variable y. - } - - class C3 { - x1 = { - g(x: this): this { - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - return undefined; - } - } - f() { - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 thisTypeErrors.ts:45:5: Add a return type to the method - function g(x: this): this { - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - return undefined; - } - let x2 = { - h(x: this): this { - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - return undefined; - } - } - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeInAccessors.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeInAccessors.d.ts deleted file mode 100644 index 46ceccc1c5691..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/thisTypeInAccessors.d.ts +++ /dev/null @@ -1,146 +0,0 @@ -//// [tests/cases/conformance/types/thisType/thisTypeInAccessors.ts] //// - -//// [thisTypeInAccessors.ts] -interface Foo { - n: number; - x: number; -} - -const explicit = { - n: 12, - get x(this: Foo): number { return this.n; }, - set x(this: Foo, n: number) { this.n = n; } -} -const copiedFromGetter = { - n: 14, - get x(this: Foo): number { return this.n; }, - set x(n) { this.n = n; } -} -const copiedFromSetter = { - n: 15, - get x() { return this.n }, - set x(this: Foo, n: number) { this.n = n; } -} -const copiedFromGetterUnannotated = { - n: 16, - get x(this: Foo) { return this.n }, - set x(this, n) { this.n = n; } -} - -class Explicit { - n = 17; - get x(this: Foo): number { return this.n; } - set x(this: Foo, n: number) { this.n = n; } -} -class Contextual { - n = 21; - get x() { return this.n } // inside a class, so already correct -} - - -/// [Declarations] //// - - - -//// [thisTypeInAccessors.d.ts] -interface Foo { - n: number; - x: number; -} -declare const explicit: { - n: number; - x: number; -}; -declare const copiedFromGetter: { - n: number; - x: number; -}; -declare const copiedFromSetter: { - n: number; - x: number; -}; -declare const copiedFromGetterUnannotated: invalid; -declare class Explicit { - n: number; - get x(this: Foo): number; - set x(this: Foo, n: Foo); -} -declare class Contextual { - n: number; - get x(): invalid; -} - -/// [Errors] //// - -thisTypeInAccessors.ts(8,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(9,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(13,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(19,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(23,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -thisTypeInAccessors.ts(23,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(24,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(29,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(30,11): error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. -thisTypeInAccessors.ts(34,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - -==== thisTypeInAccessors.ts (10 errors) ==== - interface Foo { - n: number; - x: number; - } - - const explicit = { - n: 12, - get x(this: Foo): number { return this.n; }, - ~~~~~~~~~ -!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. - set x(this: Foo, n: number) { this.n = n; } - ~~~~~~~~~ -!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. - } - const copiedFromGetter = { - n: 14, - get x(this: Foo): number { return this.n; }, - ~~~~~~~~~ -!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. - set x(n) { this.n = n; } - } - const copiedFromSetter = { - n: 15, - get x() { return this.n }, - set x(this: Foo, n: number) { this.n = n; } - ~~~~~~~~~ -!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. - } - const copiedFromGetterUnannotated = { - n: 16, - get x(this: Foo) { return this.n }, - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 thisTypeInAccessors.ts:24:9: Add a type to parameter of the set accessor declaration. -!!! related TS9032 thisTypeInAccessors.ts:23:9: Add a return type to the get accessor declaration. - ~~~~~~~~~ -!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. - set x(this, n) { this.n = n; } - ~~~~ -!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. - } - - class Explicit { - n = 17; - get x(this: Foo): number { return this.n; } - ~~~~~~~~~ -!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. - set x(this: Foo, n: number) { this.n = n; } - ~~~~~~~~~ -!!! error TS2784: 'get' and 'set' accessors cannot declare 'this' parameters. - } - class Contextual { - n = 21; - get x() { return this.n } // inside a class, so already correct - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 thisTypeInAccessors.ts:34:9: Add a return type to the get accessor declaration. - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment32.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment32.d.ts deleted file mode 100644 index 462577add5337..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment32.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts] //// - -//// [expando.ts] -function ExpandoMerge(n: number) { - return n; -} -ExpandoMerge.p1 = 111 -ExpandoMerge.m = function(n: number) { - return n + 1; -} -ExpandoMerge.p4 = 44444; -ExpandoMerge.p5 = 555555; -ExpandoMerge.p6 = 66666; -ExpandoMerge.p7 = 777777; -ExpandoMerge.p8 = false; // type error -ExpandoMerge.p9 = false; // type error -var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - -//// [ns.ts] -namespace ExpandoMerge { - export var p3 = 333; - export var p4 = 4; - export var p5 = 5; - export let p6 = 6; - export let p7 = 7; - export var p8 = 6; - export let p9 = 7; -} -namespace ExpandoMerge { - export var p2 = 222; -} - - -/// [Declarations] //// - - - -//// [expando.d.ts] -declare function ExpandoMerge(n: number): invalid; -declare var n: invalid; - -//// [ns.d.ts] -declare namespace ExpandoMerge { - var p3: number; - var p4: number; - var p5: number; - let p6: number; - let p7: number; - var p8: number; - let p9: number; -} -declare namespace ExpandoMerge { - var p2: number; -} - -/// [Errors] //// - -expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -expando.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. -expando.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. -expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. -ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - - -==== expando.ts (6 errors) ==== - function ExpandoMerge(n: number) { - ~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 expando.ts:1:10: Add a return type to the function declaration. - return n; - } - 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. - ExpandoMerge.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; - } - ExpandoMerge.p4 = 44444; - ExpandoMerge.p5 = 555555; - ExpandoMerge.p6 = 66666; - ExpandoMerge.p7 = 777777; - ExpandoMerge.p8 = false; // type error - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - ExpandoMerge.p9 = false; // type error - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n. - -==== ns.ts (2 errors) ==== - namespace ExpandoMerge { - ~~~~~~~~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - export var p3 = 333; - export var p4 = 4; - export var p5 = 5; - export let p6 = 6; - export let p7 = 7; - export var p8 = 6; - export let p9 = 7; - } - namespace ExpandoMerge { - ~~~~~~~~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - export var p2 = 222; - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment33.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment33.d.ts deleted file mode 100644 index e2d540d4aade4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeFromPropertyAssignment33.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -//// [tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts] //// - -//// [ns.ts] -namespace ExpandoMerge { - export var p3 = 333; - export var p4 = 4; - export var p5 = 5; - export let p6 = 6; - export let p7 = 7; - export var p8 = 6; - export let p9 = 7; -} -namespace ExpandoMerge { - export var p2 = 222; -} - - -//// [expando.ts] -function ExpandoMerge(n: number) { - return n; -} -ExpandoMerge.p1 = 111 -ExpandoMerge.m = function(n: number) { - return n + 1; -} -ExpandoMerge.p4 = 44444; -ExpandoMerge.p5 = 555555; -ExpandoMerge.p6 = 66666; -ExpandoMerge.p7 = 777777; -ExpandoMerge.p8 = false; // type error -ExpandoMerge.p9 = false; // type error -var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - - - -/// [Declarations] //// - - - -//// [expando.d.ts] -declare function ExpandoMerge(n: number): invalid; -declare var n: invalid; - -//// [ns.d.ts] -declare namespace ExpandoMerge { - var p3: number; - var p4: number; - var p5: number; - let p6: number; - let p7: number; - var p8: number; - let p9: number; -} -declare namespace ExpandoMerge { - var p2: number; -} - -/// [Errors] //// - -expando.ts(1,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -expando.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. -expando.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. -expando.ts(12,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -expando.ts(13,1): error TS2322: Type 'boolean' is not assignable to type 'number'. -expando.ts(14,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -ns.ts(1,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. -ns.ts(10,11): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - - -==== ns.ts (2 errors) ==== - namespace ExpandoMerge { - ~~~~~~~~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - export var p3 = 333; - export var p4 = 4; - export var p5 = 5; - export let p6 = 6; - export let p7 = 7; - export var p8 = 6; - export let p9 = 7; - } - namespace ExpandoMerge { - ~~~~~~~~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. - export var p2 = 222; - } - - -==== expando.ts (6 errors) ==== - function ExpandoMerge(n: number) { - ~~~~~~~~~~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 expando.ts:1:10: Add a return type to the function declaration. - return n; - } - 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. - ExpandoMerge.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; - } - ExpandoMerge.p4 = 44444; - ExpandoMerge.p5 = 555555; - ExpandoMerge.p6 = 66666; - ExpandoMerge.p7 = 777777; - ExpandoMerge.p8 = false; // type error - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - ExpandoMerge.p9 = false; // type error - ~~~~~~~~~~~~~~~ -!!! error TS2322: Type 'boolean' is not assignable to type 'number'. - var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge.p4 + ExpandoMerge.p5 + ExpandoMerge.p6 + ExpandoMerge.p7 + ExpandoMerge.p8 + ExpandoMerge.p9 + ExpandoMerge.m(12) + ExpandoMerge(1001); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 expando.ts:14:5: Add a type annotation to the variable n. - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts deleted file mode 100644 index 8b4251e707c39..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeUsedAsTypeLiteralIndex.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -//// [tests/cases/compiler/typeUsedAsTypeLiteralIndex.ts] //// - -//// [typeUsedAsTypeLiteralIndex.ts] -type K = number | string; -type T = { - [K]: number; // Did you mean to use 'P in K'? -} - -const K1 = Symbol(); -type T1 = { - [K1]: number; -} - -type K2 = "x" | "y"; -type T2 = { - [K2]: number; // Did you mean to use 'K in K2'? -} - -type K3 = number | string; -type T3 = { - [K3]: number; // Did you mean to use 'K in K3'? -} - -type K4 = number | string; -type T4 = { - [K4]: number; - k4: string; -} - - -/// [Declarations] //// - - - -//// [typeUsedAsTypeLiteralIndex.d.ts] -type K = number | string; -type T = {}; -declare const K1: invalid; -type T1 = { - [K1]: number; -}; -type K2 = "x" | "y"; -type T2 = {}; -type K3 = number | string; -type T3 = {}; -type K4 = number | string; -type T4 = { - k4: string; -}; - -/// [Errors] //// - -typeUsedAsTypeLiteralIndex.ts(3,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. -typeUsedAsTypeLiteralIndex.ts(3,6): error TS2690: 'K' only refers to a type, but is being used as a value here. Did you mean to use 'P in K'? -typeUsedAsTypeLiteralIndex.ts(6,12): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -typeUsedAsTypeLiteralIndex.ts(13,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. -typeUsedAsTypeLiteralIndex.ts(13,6): error TS2690: 'K2' only refers to a type, but is being used as a value here. Did you mean to use 'K in K2'? -typeUsedAsTypeLiteralIndex.ts(18,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. -typeUsedAsTypeLiteralIndex.ts(18,6): error TS2690: 'K3' only refers to a type, but is being used as a value here. Did you mean to use 'K in K3'? -typeUsedAsTypeLiteralIndex.ts(23,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. -typeUsedAsTypeLiteralIndex.ts(23,6): error TS2693: 'K4' only refers to a type, but is being used as a value here. - - -==== typeUsedAsTypeLiteralIndex.ts (9 errors) ==== - type K = number | string; - type T = { - [K]: number; // Did you mean to use 'P in K'? - ~~~ -!!! 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 TS2690: 'K' only refers to a type, but is being used as a value here. Did you mean to use 'P in K'? - } - - const K1 = Symbol(); - ~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 typeUsedAsTypeLiteralIndex.ts:6:7: Add a type annotation to the variable K1. - type T1 = { - [K1]: number; - } - - type K2 = "x" | "y"; - type T2 = { - [K2]: number; // Did you mean to use 'K in K2'? - ~~~~ -!!! 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 TS2690: 'K2' only refers to a type, but is being used as a value here. Did you mean to use 'K in K2'? - } - - type K3 = number | string; - type T3 = { - [K3]: number; // Did you mean to use 'K in K3'? - ~~~~ -!!! 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 TS2690: 'K3' only refers to a type, but is being used as a value here. Did you mean to use 'K in K3'? - } - - type K4 = number | string; - type T4 = { - [K4]: number; - ~~~~ -!!! 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 TS2693: 'K4' only refers to a type, but is being used as a value here. - k4: string; - } - \ No newline at end of file From 8b4221e41bc6a7d3713962c123e8b4b789371956 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 4 Jan 2024 14:45:46 +0000 Subject: [PATCH 200/224] Use combined code fix Signed-off-by: Titian Cernicova-Dragomir --- src/harness/isolatedDeclarationFixer.ts | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/src/harness/isolatedDeclarationFixer.ts b/src/harness/isolatedDeclarationFixer.ts index 3bf7dfa89d8a3..c64d92df90c91 100644 --- a/src/harness/isolatedDeclarationFixer.ts +++ b/src/harness/isolatedDeclarationFixer.ts @@ -95,27 +95,8 @@ export function fixProjectInternal( let diagnostics = getIsolatedDeclarationsErrors(file.fileName); if (diagnostics.length === 0) continue; - 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); - if (fixes.length === 0) { - skipCount++; - continue; - } - const fix = fixes[0]; + while (diagnostics.length > 0) { + const fix = service.getCombinedCodeFix({ type: "file", fileName: file.fileName }, "fixMissingTypeAnnotationOnExports", defaultFormatOptions, userPreferences); const changedFiles: { file: string; old: VersionedScriptSnapshot; @@ -132,7 +113,6 @@ export function fixProjectInternal( old: snapshot, }); } - lastFixedDiagnostic = diag; diagnostics = getIsolatedDeclarationsErrors(file.fileName); } } From 868f25094a002b93242400a30a49176667a38e8f Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 4 Jan 2024 15:33:26 +0000 Subject: [PATCH 201/224] Add back fixing diagnostic by diagnostic after fix all. Signed-off-by: Titian Cernicova-Dragomir --- src/harness/isolatedDeclarationFixer.ts | 53 +++-- .../diff/constAssertions.d.ts.map.diff | 8 +- ...arationEmitLateBoundAssignments2.d.ts.diff | 20 +- .../auto-fixed/dte/constAssertions.d.ts.map | 4 +- .../declarationEmitLateBoundAssignments2.d.ts | 40 ++-- .../dte/typeFromPropertyAssignment29.d.ts | 76 +++---- .../auto-fixed/tsc/constAssertions.d.ts.map | 4 +- .../declarationEmitLateBoundAssignments2.d.ts | 20 +- .../tsc/typeFromPropertyAssignment29.d.ts | 210 +++++++++--------- 9 files changed, 228 insertions(+), 207 deletions(-) diff --git a/src/harness/isolatedDeclarationFixer.ts b/src/harness/isolatedDeclarationFixer.ts index c64d92df90c91..e6f3b0895984e 100644 --- a/src/harness/isolatedDeclarationFixer.ts +++ b/src/harness/isolatedDeclarationFixer.ts @@ -95,24 +95,38 @@ export function fixProjectInternal( let diagnostics = getIsolatedDeclarationsErrors(file.fileName); if (diagnostics.length === 0) continue; - while (diagnostics.length > 0) { - const fix = service.getCombinedCodeFix({ type: "file", fileName: file.fileName }, "fixMissingTypeAnnotationOnExports", defaultFormatOptions, userPreferences); - const changedFiles: { - file: string; - old: VersionedScriptSnapshot; - new: VersionedScriptSnapshot; - }[] = []; - for (const fileChanges of fix.changes) { - const snapshot = snapShotRegistry.getSnapshot(fileChanges.fileName)!; - const newSnapShot = applyChangesSnapShot(snapshot, fileChanges.textChanges); - snapShotRegistry.setSnapshot(fileChanges.fileName, newSnapShot); - changedFiles.push({ - file: fileChanges.fileName, - new: newSnapShot, - old: snapshot, - }); + // Try to fix all + 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); } } @@ -121,6 +135,13 @@ export function fixProjectInternal( 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 []; 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 index 6978fb1c05d89..2a71e5e39a085 100644 --- 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 @@ -8,9 +8,9 @@ @@ -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;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,GAAG,EAAE,KAAU,CAAC;AACpB,QAAA,IAAI,GAAG,EAAE,KAAU,CAAC;AAEpB,QAAA,IAAI,EAAE,aAAc,CAAC;AACrB,QAAA,IAAI,EAAE,oBAAqB,CAAC;AAC5B,QAAA,IAAI,EAAE,8BAA+B,CAAC;AACtC,QAAA,IAAI,EAAE,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAA2B,CAAC;AACrD,QAAA,IAAI,EAAE,EAAE,MAAM,EAAc,CAAC;AAC7B,QAAA,IAAI,EAAE,EAAE,SAAS,MAAM,EAAqB,CAAC;AAC7C,QAAA,IAAI,EAAE,EAAE,M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bWUgPSBgJHthY3Rpb259XyR7Y29udGVudE1hdGNofWAgYXMgY29uc3Q7CiAgICByZXR1cm4gb3V0Y29tZTsKfQoKZnVuY3Rpb24gYWNjZXNzb3JOYW1lczxTIGV4dGVuZHMgc3RyaW5nPihwcm9wTmFtZTogUyk6IHJlYWRvbmx5IFtgZ2V0LSR7U31gLCBgc2V0LSR7U31gXSB7CiAgICByZXR1cm4gW2BnZXQtJHtwcm9wTmFtZX1gLCBgc2V0LSR7cHJvcE5hbWV9YF0gYXMgY29uc3Q7Cn0KCmNvbnN0IG5zMTogcmVhZG9ubHkgWyJnZXQtZm9vIiwgInNldC1mb28iXSA9IGFjY2Vzc29yTmFtZXMoJ2ZvbycpOwoKLy8gcmVwcm8gZnJvbSBodHRwczovL2dpdGh1Yi5jb20vbWljcm9zb2Z0L1R5cGVTY3JpcHQvaXNzdWVzLzU0Mzc0CmludGVyZmFjZSBGb281NDM3NCB7CiAgYTogMTsKICBiOiAyOwp9Cgpjb25zdCBmb29Db25zdDU0Mzc0OiBGb281NDM3NCA9IHsKICBhOiAxLAogIGI6IDMKfSBhcyBjb25zdAo= 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 index 696b00ac9a72b..32c47d935c1aa 100644 --- 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 @@ -121,61 +121,61 @@ + 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/constAssertions.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/constAssertions.d.ts.map index 54ed29b4e1816..a9961d3a96348 100644 --- 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 @@ -133,7 +133,7 @@ declare const fooConst54374: Foo54374; //// [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,CAAC;AACtB,QAAA,IAAI,EAAE,EAAI,EAAW,CAAC;AACtB,QAAA,IAAI,EAAE,EAAG,GAAY,CAAC;AACtB,QAAA,IAAI,EAAE,EAAG,CAAC,GAAY,CAAC;AACvB,QAAA,IAAI,EAAE,EAAG,IAAa,CAAC;AACvB,QAAA,IAAI,EAAE,EAAG,KAAc,CAAC;AAExB,QAAA,IAAI,EAAE,OAAiB,CAAC;AACx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YDsKICAgIGNvbnN0IG91dGNvbWUgPSBgJHthY3Rpb259XyR7Y29udGVudE1hdGNofWAgYXMgY29uc3Q7CiAgICByZXR1cm4gb3V0Y29tZTsKfQoKZnVuY3Rpb24gYWNjZXNzb3JOYW1lczxTIGV4dGVuZHMgc3RyaW5nPihwcm9wTmFtZTogUyk6IHJlYWRvbmx5IFtgZ2V0LSR7U31gLCBgc2V0LSR7U31gXSB7CiAgICByZXR1cm4gW2BnZXQtJHtwcm9wTmFtZX1gLCBgc2V0LSR7cHJvcE5hbWV9YF0gYXMgY29uc3Q7Cn0KCmNvbnN0IG5zMTogcmVhZG9ubHkgWyJnZXQtZm9vIiwgInNldC1mb28iXSA9IGFjY2Vzc29yTmFtZXMoJ2ZvbycpOwoKLy8gcmVwcm8gZnJvbSBodHRwczovL2dpdGh1Yi5jb20vbWljcm9zb2Z0L1R5cGVTY3JpcHQvaXNzdWVzLzU0Mzc0CmludGVyZmFjZSBGb281NDM3NCB7CiAgYTogMTsKICBiOiAyOwp9Cgpjb25zdCBmb29Db25zdDU0Mzc0OiBGb281NDM3NCA9IHsKICBhOiAxLAogIGI6IDMKfSBhcyBjb25zdAo= 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 index afc47978ed3e1..131a519653fb6 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitLateBoundAssignments2.d.ts @@ -42,61 +42,61 @@ 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 @@ -232,60 +232,60 @@ declarationEmitLateBoundAssignments2.ts(37,1): error TS9023: Assigning propertie 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/typeFromPropertyAssignment29.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts index c116d0b043c10..a47d7040c6182 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts @@ -20,7 +20,7 @@ const ExpandoExpr: { x?: undefined; }; m(n: number): number; -} = function (n: number) { +} = function (n: number): string { return n.toString(); } ExpandoExpr.prop = { x: 2 } @@ -28,13 +28,13 @@ ExpandoExpr.prop = { y: "" } ExpandoExpr.m = function(n: number) { return n + 1; } -var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length +var n: number = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length const ExpandoArrow: { (n: number): string; prop: number; m(n: number): number; -} = (n: number) => n.toString(); +} = (n: number): string => n.toString(); ExpandoArrow.prop = 2 ExpandoArrow.m = function(n: number) { return n + 1; @@ -63,7 +63,7 @@ namespace ExpandoMerge { namespace ExpandoMerge { export var p3 = 333; } -var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); +var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); namespace Ns { function ExpandoNamespace(): void {} @@ -81,7 +81,7 @@ ExpandoExpr2.prop = 2 ExpandoExpr2.m = function(n: number) { return n + 1; } -var n = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length +var n: number = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length // Should not work in typescript -- classes already have statics class ExpandoClass { @@ -91,7 +91,7 @@ ExpandoClass.prop = 2 ExpandoClass.m = function(n: number) { return n + 1; } -var n = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n +var n: number = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n // Class expressions shouldn't work in typescript either var ExpandoExpr3 = class { @@ -101,7 +101,7 @@ ExpandoExpr3.prop = 3 ExpandoExpr3.m = function(n: number) { return n + 1; } -var n = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n +var n: number = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n @@ -157,24 +157,24 @@ 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(4,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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(81,30): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. +typeFromPropertyAssignment29.ts(81,50): 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(91,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. +typeFromPropertyAssignment29.ts(91,50): error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. +typeFromPropertyAssignment29.ts(94,20): error TS9011: Declaration emit for class expressions are 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(101,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. +typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. ==== typeFromPropertyAssignment29.ts (18 errors) ==== @@ -183,10 +183,10 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi } 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. +!!! error TS9009: 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. +!!! error TS9009: 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 @@ -201,7 +201,7 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi x?: undefined; }; m(n: number): number; - } = function (n: number) { + } = function (n: number): string { return n.toString(); } ExpandoExpr.prop = { x: 2 } @@ -209,13 +209,13 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi ExpandoExpr.m = function(n: number) { return n + 1; } - var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length + var n: number = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length const ExpandoArrow: { (n: number): string; prop: number; m(n: number): number; - } = (n: number) => n.toString(); + } = (n: number): string => n.toString(); ExpandoArrow.prop = 2 ExpandoArrow.m = function(n: number) { return n + 1; @@ -234,27 +234,27 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi } 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. +!!! error TS9009: 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. +!!! error TS9009: 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); + var n: number = 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. +!!! error TS9009: 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; } @@ -272,10 +272,10 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi !!! 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 - ~~~~ + var n: number = 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 @@ -290,16 +290,16 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. return n + 1; } - var n = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n - ~~~~ + var n: number = 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. +!!! error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. n = 10001; } ExpandoExpr3.prop = 3 @@ -310,10 +310,10 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. return n + 1; } - var n = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n - ~~~~ + var n: number = 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/constAssertions.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constAssertions.d.ts.map index fe01917a7549c..085d0eaf1049d 100644 --- 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 @@ -133,7 +133,7 @@ declare const fooConst54374: Foo54374; //// [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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VzLzU0Mzc0CmludGVyZmFjZSBGb281NDM3NCB7CiAgYTogMTsKICBiOiAyOwp9Cgpjb25zdCBmb29Db25zdDU0Mzc0OiBGb281NDM3NCA9IHsKICBhOiAxLAogIGI6IDMKfSBhcyBjb25zdAo= 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 index 070446cb28309..4f37594def992 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitLateBoundAssignments2.d.ts @@ -42,61 +42,61 @@ 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 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 index 9e24beb8b12dc..449678946e565 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts @@ -1,108 +1,108 @@ //// [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) { - return n.toString(); -} -ExpandoExpr.prop = { x: 2 } -ExpandoExpr.prop = { y: "" } -ExpandoExpr.m = function(n: number) { - return n + 1; -} +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) => 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; -} + +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; -} + +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; -} + +// 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; -} + +// 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] //// @@ -208,7 +208,7 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi x?: undefined; }; m(n: number): number; - } = function (n: number) { + } = function (n: number): string { return n.toString(); } ExpandoExpr.prop = { x: 2 } @@ -222,7 +222,7 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi (n: number): string; prop: number; m(n: number): number; - } = (n: number) => n.toString(); + } = (n: number): string => n.toString(); ExpandoArrow.prop = 2 ExpandoArrow.m = function(n: number) { return n + 1; @@ -274,9 +274,9 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi 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 @@ -292,9 +292,9 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi 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 @@ -310,9 +310,9 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi 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 From 4097ae169534c45102c5cb4d3a018147cfe38c1f Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 8 Jan 2024 11:36:48 +0000 Subject: [PATCH 202/224] Updated baseline Signed-off-by: Titian Cernicova-Dragomir --- ...itMappedTypeTemplateTypeofSymbol.d.ts.diff | 8 +- ...tionEmitReadonlyComputedProperty.d.ts.diff | 8 +- .../diff/isolatedDeclarationErrors.d.ts.diff | 2 +- .../typeFromPropertyAssignment29.d.ts.diff | 18 +- .../dte/isolatedDeclarationErrors.d.ts | 4 +- .../dte/isolatedDeclarationErrorsObjects.d.ts | 8 +- .../dte/typeFromPropertyAssignment29.d.ts | 262 +++++++++--------- .../tsc/isolatedDeclarationErrors.d.ts | 2 +- .../tsc/isolatedDeclarationErrorsObjects.d.ts | 8 +- .../tsc/typeFromPropertyAssignment29.d.ts | 22 +- 10 files changed, 171 insertions(+), 171 deletions(-) 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 index 90e3422e10f18..8e68160e714cc 100644 --- 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 @@ -2,10 +2,10 @@ //// [tests/cases/compiler/declarationEmitMappedTypeTemplateTypeofSymbol.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -6,9 +6,11 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,9 +6,11 @@ [x.timestampSymbol]: true; }; //# sourceMappingURL=b.d.ts.map 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 index c9d712f4aa952..b0903003ff21d 100644 --- 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 @@ -2,10 +2,10 @@ //// [tests/cases/compiler/declarationEmitReadonlyComputedProperty.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -7,9 +7,11 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,9 +7,11 @@ } export declare function createInstance(): Interface; //# sourceMappingURL=bug.d.ts.map 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 index cb6edeb6a8d0a..d7be9ded15eeb 100644 --- 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 @@ -44,7 +44,7 @@ + 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/typeFromPropertyAssignment29.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/typeFromPropertyAssignment29.d.ts.diff index e5d535fb45c66..79cc89fd5a326 100644 --- 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 @@ -2,10 +2,10 @@ //// [tests/cases/conformance/salsa/typeFromPropertyAssignment29.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,12 +1,8 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,12 +1,8 @@ //// [typeFromPropertyAssignment29.d.ts] @@ -18,7 +18,7 @@ declare const ExpandoExpr: { (n: number): string; prop: { -@@ -27,27 +23,18 @@ +@@ -27,27 +23,18 @@ declare function ExpandoNested(n: number): { (m: number): number; total: number; @@ -46,7 +46,7 @@ export {}; } declare var ExpandoExpr2: (n: number) => string; -@@ -55,37 +42,43 @@ +@@ -55,37 +42,43 @@ declare class ExpandoClass { n: number; } @@ -96,7 +96,7 @@ } var n: number = ExpandoDecl.prop + ExpandoDecl.m(12) + ExpandoDecl(101).length -@@ -130,13 +123,17 @@ +@@ -130,13 +123,17 @@ nested.total = n + 1_000_000; return nested; } @@ -114,7 +114,7 @@ export var p2 = 222; } namespace ExpandoMerge { -@@ -146,8 +143,10 @@ +@@ -146,8 +143,10 @@ namespace Ns { function ExpandoNamespace(): void {} @@ -125,7 +125,7 @@ return ExpandoNamespace; } } -@@ -189,8 +188,10 @@ +@@ -189,8 +188,10 @@ !!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. // Class expressions shouldn't work in typescript either 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 index 88a8b379610d9..d10fe78248290 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrors.d.ts @@ -13,7 +13,7 @@ errorOnAssignmentBelow.a = ""; const errorOnMissingReturn: { (): void; a: string; -} = () => {} +} = (): void => {} errorOnMissingReturn.a = ""; @@ -52,6 +52,6 @@ isolatedDeclarationErrors.ts(2,1): error TS9023: Assigning properties to functio 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/isolatedDeclarationErrorsObjects.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsObjects.d.ts index b1c4e20c0537f..77a9a83229bf5 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsObjects.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsObjects.d.ts @@ -37,10 +37,10 @@ export let oWithMethods: { bad(): void; e: number; } = { - method() { }, + method(): void { }, okMethod(): void { }, a: 1, - bad() { }, + bad(): void { }, e: V, } export let oWithMethodsNested = { @@ -258,10 +258,10 @@ isolatedDeclarationErrorsObjects.ts(111,14): error TS2451: Cannot redeclare bloc bad(): void; e: number; } = { - method() { }, + method(): void { }, okMethod(): void { }, a: 1, - bad() { }, + bad(): void { }, e: V, } export let oWithMethodsNested = { 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 index a47d7040c6182..eb5251057632e 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts @@ -1,108 +1,108 @@ //// [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: number = (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: number = 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: number = 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: number = 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: number = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n - +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] //// @@ -157,24 +157,24 @@ declare var n: number; //# sourceMappingURL=typeFromPropertyAssignment29.d.ts.map /// [Errors] //// -typeFromPropertyAssignment29.ts(4,1): error TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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 TS9009: 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(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,30): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. -typeFromPropertyAssignment29.ts(81,50): 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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. -typeFromPropertyAssignment29.ts(91,50): error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. -typeFromPropertyAssignment29.ts(94,20): error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. +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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. -typeFromPropertyAssignment29.ts(101,50): 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) ==== @@ -183,10 +183,10 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi } ExpandoDecl.prop = 2 ~~~~~~~~~~~~~~~~ -!!! error TS9009: 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. ExpandoDecl.m = function(n: number) { ~~~~~~~~~~~~~ -!!! error TS9009: 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. return n + 1; } var n: number = ExpandoDecl.prop + ExpandoDecl.m(12) + ExpandoDecl(101).length @@ -209,7 +209,7 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi ExpandoExpr.m = function(n: number) { return n + 1; } - var n: number = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length + var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length const ExpandoArrow: { (n: number): string; @@ -234,27 +234,27 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi } ExpandoNested.also = -1; ~~~~~~~~~~~~~~~~~~ -!!! error TS9009: 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. function ExpandoMerge(n: number): number { return n * 100; } ExpandoMerge.p1 = 111 ~~~~~~~~~~~~~~~ -!!! error TS9009: 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. namespace ExpandoMerge { export var p2 = 222; } namespace ExpandoMerge { export var p3 = 333; } - var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); + var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); namespace Ns { function ExpandoNamespace(): void {} ExpandoNamespace.p6 = 42; ~~~~~~~~~~~~~~~~~~~ -!!! error TS9009: 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. export function foo(): typeof ExpandoNamespace { return ExpandoNamespace; } @@ -272,10 +272,10 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type '(n: number) => string'. return n + 1; } - var n: number = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length - ~~~~ + 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 @@ -290,16 +290,16 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. return n + 1; } - var n: number = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n - ~~~~ + 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 TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. +!!! error TS9022: Inference from class expressions is not supported with --isolatedDeclarations. n = 10001; } ExpandoExpr3.prop = 3 @@ -310,10 +310,10 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. return n + 1; } - var n: number = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n - ~~~~ + 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/isolatedDeclarationErrors.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrors.d.ts index 826924af9f6e2..eea40f9c56eca 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrors.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrors.d.ts @@ -13,7 +13,7 @@ errorOnAssignmentBelow.a = ""; const errorOnMissingReturn: { (): void; a: string; -} = () => {} +} = (): void => {} errorOnMissingReturn.a = ""; 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 index a18d8820aa996..f74be46fb85b1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsObjects.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsObjects.d.ts @@ -37,10 +37,10 @@ export let oWithMethods: { bad(): void; e: number; } = { - method() { }, + method(): void { }, okMethod(): void { }, a: 1, - bad() { }, + bad(): void { }, e: V, } export let oWithMethodsNested = { @@ -257,10 +257,10 @@ isolatedDeclarationErrorsObjects.ts(111,14): error TS2451: Cannot redeclare bloc bad(): void; e: number; } = { - method() { }, + method(): void { }, okMethod(): void { }, a: 1, - bad() { }, + bad(): void { }, e: V, } export let oWithMethodsNested = { 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 index 449678946e565..dbb3b7a9e7ab9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts @@ -28,7 +28,7 @@ ExpandoExpr.prop = { y: "" } ExpandoExpr.m = function(n: number) { return n + 1; } -var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length +var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length const ExpandoArrow: { (n: number): string; @@ -63,7 +63,7 @@ namespace ExpandoMerge { namespace ExpandoMerge { export var p3 = 333; } -var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); +var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); namespace Ns { function ExpandoNamespace(): void {} @@ -81,7 +81,7 @@ ExpandoExpr2.prop = 2 ExpandoExpr2.m = function(n: number) { return n + 1; } -var n = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length +var n = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length // Should not work in typescript -- classes already have statics class ExpandoClass { @@ -91,7 +91,7 @@ ExpandoClass.prop = 2 ExpandoClass.m = function(n: number) { return n + 1; } -var n = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n +var n = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n // Class expressions shouldn't work in typescript either var ExpandoExpr3 = class { @@ -101,7 +101,7 @@ ExpandoExpr3.prop = 3 ExpandoExpr3.m = function(n: number) { return n + 1; } -var n = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n +var n = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n @@ -274,9 +274,9 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi 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 @@ -292,9 +292,9 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi 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 @@ -310,9 +310,9 @@ typeFromPropertyAssignment29.ts(101,42): error TS2339: Property 'm' does not exi 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 From c0b48672f2e7894c340e6b388571326af121142b Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 8 Jan 2024 17:45:15 +0000 Subject: [PATCH 203/224] Addressed code review. Signed-off-by: Titian Cernicova-Dragomir --- src/harness/isolatedDeclarationFixer.ts | 1 - src/testRunner/compilerRunner.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/src/harness/isolatedDeclarationFixer.ts b/src/harness/isolatedDeclarationFixer.ts index e6f3b0895984e..2805458947294 100644 --- a/src/harness/isolatedDeclarationFixer.ts +++ b/src/harness/isolatedDeclarationFixer.ts @@ -96,7 +96,6 @@ export function fixProjectInternal( if (diagnostics.length === 0) continue; - // Try to fix all const fixAll = service.getCombinedCodeFix({ type: "file", fileName: file.fileName }, "fixMissingTypeAnnotationOnExports", defaultFormatOptions, userPreferences); applyFix(fixAll.changes); diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index e81482938b755..f634d4ea07b77 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -144,7 +144,6 @@ export class CompilerBaselineRunner extends RunnerBase { } }); it(`Correct dte emit for ${fileName}`, () => fixedIsolatedTest?.verifyDteOutput()); - it(`Correct dte emit for ${fileName}`, () => fixedIsolatedTest?.verifyDteOutput()); it(`Correct tsc emit for ${fileName}`, () => fixedIsolatedTest?.verifyTscOutput()); it(`Correct dte/tsc diff ${fileName}`, () => fixedIsolatedTest?.verifyDiff()); it(`Correct dte map emit for ${fileName}`, () => fixedIsolatedTest?.verifyDteMapOutput()); From 7cf44474f0948f3620fedf47d617315b5130d414 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 9 Jan 2024 15:14:48 +0000 Subject: [PATCH 204/224] Update binding element differences. --- src/compiler/checker.ts | 4 + .../transformers/declarations/emitBinder.ts | 5 +- ...ndingPatternWithReservedWord.d.ts.map.diff | 16 -- ...clarationEmitBindingPatterns.d.ts.map.diff | 16 -- ...itMappedTypeTemplateTypeofSymbol.d.ts.diff | 8 +- ...tionEmitReadonlyComputedProperty.d.ts.diff | 8 +- ...pendentDestructuredVariables.d.ts.map.diff | 8 +- .../destructuringInFunctionType.d.ts.diff | 18 -- .../typeFromPropertyAssignment29.d.ts.diff | 12 +- ...mitBindingPatternWithReservedWord.d.ts.map | 30 --- .../declarationEmitBindingPatterns.d.ts.map | 24 --- ...eInternalTypesProduceUniqueTypeParams.d.ts | 3 +- .../dependentDestructuredVariables.d.ts.map | 7 +- .../dte/destructuringInFunctionType.d.ts | 178 ------------------ .../dte/typeFromPropertyAssignment29.d.ts | 44 ++--- ...mitBindingPatternWithReservedWord.d.ts.map | 30 --- .../declarationEmitBindingPatterns.d.ts.map | 24 --- ...eInternalTypesProduceUniqueTypeParams.d.ts | 3 +- .../dependentDestructuredVariables.d.ts.map | 7 +- .../tsc/destructuringInFunctionType.d.ts | 178 ------------------ .../tsc/typeFromPropertyAssignment29.d.ts | 44 ++--- ...ationEmitBindingPatternWithReservedWord.ts | 3 +- .../declarationEmitBindingPatterns.ts | 2 +- .../destructuringInFunctionType.ts | 2 +- 24 files changed, 86 insertions(+), 588 deletions(-) delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatternWithReservedWord.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatterns.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringInFunctionType.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatternWithReservedWord.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatterns.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringInFunctionType.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternWithReservedWord.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatterns.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringInFunctionType.d.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 2f109361fb8b0..96fb2d7846bb8 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14813,6 +14813,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return true; } + if(nodeIsSynthesized(node)) { + return false; + } + if (node.initializer) { const signature = getSignatureFromDeclaration(node.parent); const parameterIndex = node.parent.parameters.indexOf(node); diff --git a/src/compiler/transformers/declarations/emitBinder.ts b/src/compiler/transformers/declarations/emitBinder.ts index 2e3b23df00945..5ac1b14c41e0a 100644 --- a/src/compiler/transformers/declarations/emitBinder.ts +++ b/src/compiler/transformers/declarations/emitBinder.ts @@ -9,6 +9,7 @@ import { ComputedPropertyName, ConditionalTypeNode, ConstructorDeclaration, + ConstructorTypeNode, ConstructSignatureDeclaration, Declaration, EnumDeclaration, @@ -556,6 +557,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { case SyntaxKind.CallSignature: case SyntaxKind.ConstructSignature: case SyntaxKind.FunctionType: + case SyntaxKind.ConstructorType: bindFunctionLikeContainer(node as FunctionLikeContainer); break; case SyntaxKind.ClassExpression: @@ -669,7 +671,8 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { | FunctionDeclaration | CallSignatureDeclaration | ConstructSignatureDeclaration - | FunctionTypeNode; + | FunctionTypeNode + | ConstructorTypeNode; function bindFunctionLikeContainer(node: FunctionLikeContainer) { const isExported = hasSyntacticModifier(node, ModifierFlags.Export); const declarationFlags = tryGetSymbolFlagsForNode(node); 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 deleted file mode 100644 index 1102b77dc06dc..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatternWithReservedWord.d.ts.map.diff +++ /dev/null @@ -1,16 +0,0 @@ -// [[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,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,dHlwZSBMb2NhbGVEYXRhID0gUmVjb3JkPHN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Mb2NhbGVzT3B0aW9uczxUPik6IENvbnZlcnRMb2NhbGVDb25maWc8VD4gPT4gewogICAgcmV0dXJuIGRlZmF1bHRMb2NhbGVzQ29uZmlnOwp9Owo= - 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 deleted file mode 100644 index 102ffda460902..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatterns.d.ts.map.diff +++ /dev/null @@ -1,16 +0,0 @@ -// [[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=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0QmluZGluZ1BhdHRlcm5zLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkZWNsYXJhdGlvbkVtaXRCaW5kaW5nUGF0dGVybnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsUUFBQSxNQUFNLENBQUMsYUFBa0I7SUFDakIsQ0FBQyxDQUFDLEVBQUUsTUFBTSxDQUFDO0NBQ2QsS0FBRyxJQUFXLENBQUE7QUFFbkIsUUFBQSxJQUFJLENBQUMsRUFBRSxHQUFHLENBQUM7QUFDWCxpQkFBUyxDQUFDLENBQUMsRUFBRSxHQUFFLEdBQU8sRUFBRSxFQUFFLEdBQUUsR0FBTyxFQUFFLEVBQUUsQ0FBQyxFQUFFLEVBQU0sRUFBQyxHQUFFLEdBQU8sR0FBRyxJQUFJLENBQ2hFIn0=,Y29uc3QgayA9ICh7eDogeiA9ICd5J306IHsKICAgICAgICB4Pzogc3RyaW5nOwogICAgfSk6IHZvaWQgPT4geyB9Cgp2YXIgYTogYW55OwpmdW5jdGlvbiBmKHt9OiBhbnkgPSBhLCBbXTogYW55ID0gYSwgeyBwOiB7fSA9IGF9OiBhbnkgPSBhKTogdm9pZCB7Cn0= -+//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBrOiAoeyB4OiB6IH06IHsNCiAgICB4Pzogc3RyaW5nOw0KfSkgPT4gdm9pZDsNCmRlY2xhcmUgdmFyIGE6IGFueTsNCmRlY2xhcmUgZnVuY3Rpb24gZih7fT86IGFueSwgW10/OiBhbnksIHsgcDoge30gfT86IGFueSk6IHZvaWQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbkVtaXRCaW5kaW5nUGF0dGVybnMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0QmluZGluZ1BhdHRlcm5zLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJkZWNsYXJhdGlvbkVtaXRCaW5kaW5nUGF0dGVybnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsUUFBQSxNQUFNLENBQUMsR0FBSSxFQUFDLENBQUMsRUFBRSxDQUFPLEVBQUMsRUFBRTtJQUNqQixDQUFDLENBQUMsRUFBRSxNQUFNLENBQUM7Q0FDZCxLQUFHLElBQVcsQ0FBQTtBQUVuQixRQUFBLElBQUksQ0FBQyxFQUFFLEdBQUcsQ0FBQztBQUNYLGlCQUFTLENBQUMsQ0FBQyxFQUFFLEdBQUUsR0FBTyxFQUFFLEVBQUUsR0FBRSxHQUFPLEVBQUUsRUFBRSxDQUFDLEVBQUUsRUFBTSxFQUFDLEdBQUUsR0FBTyxHQUFHLElBQUksQ0FDaEUifQ==,Y29uc3QgayA9ICh7eDogeiA9ICd5J306IHsKICAgICAgICB4Pzogc3RyaW5nOwogICAgfSk6IHZvaWQgPT4geyB9Cgp2YXIgYTogYW55OwpmdW5jdGlvbiBmKHt9OiBhbnkgPSBhLCBbXTogYW55ID0gYSwgeyBwOiB7fSA9IGF9OiBhbnkgPSBhKTogdm9pZCB7Cn0= - 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 index 90e3422e10f18..8e68160e714cc 100644 --- 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 @@ -2,10 +2,10 @@ //// [tests/cases/compiler/declarationEmitMappedTypeTemplateTypeofSymbol.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -6,9 +6,11 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -6,9 +6,11 @@ [x.timestampSymbol]: true; }; //# sourceMappingURL=b.d.ts.map 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 index c9d712f4aa952..b0903003ff21d 100644 --- 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 @@ -2,10 +2,10 @@ //// [tests/cases/compiler/declarationEmitReadonlyComputedProperty.ts] //// -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -7,9 +7,11 @@ +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -7,9 +7,11 @@ } export declare function createInstance(): Interface; //# sourceMappingURL=bug.d.ts.map diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/dependentDestructuredVariables.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/dependentDestructuredVariables.d.ts.map.diff index 6488ff5b782a3..c98e39ed95732 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/dependentDestructuredVariables.d.ts.map.diff +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/dependentDestructuredVariables.d.ts.map.diff @@ -8,9 +8,9 @@ @@ -1,6 +1,6 @@ //// [dependentDestructuredVariables.d.ts.map] --{"version":3,"file":"dependentDestructuredVariables.d.ts","sourceRoot":"","sources":["dependentDestructuredVariables.ts"],"names":[],"mappings":"AAAA,KAAK,MAAM,GACL;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAErC,iBAAS,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,MAAM,GAAG,IAAI,CAO5C;AAED,iBAAS,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAQjC;AAED,iBAAS,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,MAAM,GAAG,IAAI,CAW5C;AAGD,iBAAS,GAAG,CAAC,CAAC,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,GAAG,IAAI,CAOzD;AAED,iBAAS,GAAG,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,CAQzC;AAED,KAAK,OAAO,GACN;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEjD,iBAAS,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,OAAO,GAAG,IAAI,CAS7C;AAED,iBAAS,GAAG,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAUlC;AAED,iBAAS,GAAG,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAUlC;AAED,iBAAS,GAAG,CAAC,EAAE,IAAI,EA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TogdW5rbm93bltdXSB8IFtlcnI6IEVycm9yLCBkYXRhOiB1bmRlZmluZWRdKSA9PiB2b2lkKTogdm9pZDsNCnR5cGUgUmVkdWNlckFyZ3MgPSBbImFkZCIsIHsNCiAgICBhOiBudW1iZXI7DQogICAgYjogbnVtYmVyOw0KfV0gfCBbImNvbmNhdCIsIHsNCiAgICBmaXJzdEFycjogYW55W107DQogICAgc2Vjb25kQXJyOiBhbnlbXTsNCn1dOw0KZGVjbGFyZSBjb25zdCByZWR1Y2VyOiAoLi4uYXJnczogUmVkdWNlckFyZ3MpID0+IHZvaWQ7DQp0eXBlIEZvb01ldGhvZCA9IHsNCiAgICBtZXRob2QoLi4uYXJnczogWw0KICAgICAgICB0eXBlOiAic3RyIiwNCiAgICAgICAgY2I6IChlOiBzdHJpbmcpID0+IHZvaWQNCiAgICBdIHwgWw0KICAgICAgICB0eXBlOiAibnVtIiwNCiAgICAgICAgY2I6IChlOiBudW1iZXIpID0+IHZvaWQNCiAgICBdKTogdm9pZDsNCn07DQpkZWNsYXJlIGxldCBmb29NOiBGb29NZXRob2Q7DQp0eXBlIEZvb0FzeW5jTWV0aG9kID0gew0KICAgIG1ldGhvZCguLi5hcmdzOiBbDQogICAgICAgIHR5cGU6ICJzdHIiLA0KICAgICAgICBjYjogKGU6IHN0cmluZykgPT4gdm9pZA0KICAgIF0gfCBbDQogICAgICAgIHR5cGU6ICJudW0iLA0KICAgICAgICBjYjogKGU6IG51bWJlcikgPT4gdm9pZA0KICAgIF0pOiBQcm9taXNlPGFueT47DQp9Ow0KZGVjbGFyZSBsZXQgZm9vQXN5bmNNOiBGb29Bc3luY01ldGhvZDsNCnR5cGUgRm9vR2VuTWV0aG9kID0gew0KICAgIG1ldGhvZCguLi5hcmdzOiBbDQogICAgICAgIHR5cGU6ICJzdHIiLA0KICAgICAgICBjYjogKGU6IHN0cmluZykgPT4gdm9pZA0KICAgIF0gfCBbDQogICAgICAgIHR5cGU6ICJudW0iLA0KICAgICAgICBjYjogK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kIH06IEFjdGlvbik6IHZvaWQgewogICAgc3dpdGNoIChraW5kKSB7CiAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICBwYXlsb2FkOyAgLy8gbmV2ZXIKICAgIH0KfQoKLy8gcmVwcm8gIzUwMjA2CmZ1bmN0aW9uIGYxMzxUIGV4dGVuZHMgQWN0aW9uPih7IGtpbmQsIHBheWxvYWQgfTogVCk6IHZvaWQgewogICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgfQogICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgIH0KfQoKZnVuY3Rpb24gZjE0PFQgZXh0ZW5kcyBBY3Rpb24+KHQ6IFQpOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCwgcGF5bG9hZCB9ID0gdDsKICAgIGlmIChraW5kID09PSAnQScpIHsKICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICB9Cn0KCnR5cGUgQWN0aW9uMiA9CiAgICB8IHsga2luZDogJ0EnLCBwYXlsb2FkOiBudW1iZXIgfCB1bmRlZmluZWQgfQogICAgfCB7IGtpbmQ6ICdCJywgcGF5bG9hZDogc3RyaW5nIHwgdW5kZWZpbmVkIH07CgpmdW5jdGlvbiBmMjAoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbjIpOiB2b2lkIHsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjEoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjIoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBpZiAoYWN0aW9uLnBheWxvYWQpIHsKICAgICAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgICAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgIH0KICAgICAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICB9CiAgICB9Cn0KCmZ1bmN0aW9uIGYyMyh7IGtpbmQsIHBheWxvYWQgfTogQWN0aW9uMik6IHZvaWQgewogICAgaWYgKHBheWxvYWQpIHsKICAgICAgICBzd2l0Y2ggKGtpbmQpIHsKICAgICAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgIC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ywgNF0gfCBbNV0pOiB2b2lkIHsKICAgIGlmICh5ID09PSAyKSB7CiAgICAgICAgeDsgIC8vIDEKICAgIH0KICAgIGlmICh5ID09PSA0KSB7CiAgICAgICAgeDsgIC8vIDMKICAgIH0KICAgIGlmICh5ID09PSB1bmRlZmluZWQpIHsKICAgICAgICB4OyAgLy8gNQogICAgfQogICAgaWYgKHggPT09IDEpIHsKICAgICAgICB5OyAgLy8gMgogICAgfQogICAgaWYgKHggPT09IDMpIHsKICAgICAgICB5OyAgLy8gNAogICAgfQogICAgaWYgKHggPT09IDUpIHsKICAgICAgICB5OyAgLy8gdW5kZWZpbmVkCiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzU1NjYxCgpmdW5jdGlvbiB0b29OYXJyb3coW3gsIHldOiBbMSwgMV0gfCBbMSwgMl0gfCBbMV0pOiB2b2lkIHsKICAgIGlmICh5ID09PSB1bmRlZmluZWQpIHsKICAgICAgICBjb25zdCBzaG91bGROb3RCZU9rOiBuZXZlciA9IHg7ICAvLyBFcnJvcgogICAgfQp9Cg== -+//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBBY3Rpb24gPSB7DQogICAga2luZDogJ0EnOw0KICAgIHBheWxvYWQ6IG51bWJlcjsNCn0gfCB7DQogICAga2luZDogJ0InOw0KICAgIHBheWxvYWQ6IHN0cmluZzsNCn07DQpkZWNsYXJlIGZ1bmN0aW9uIGYxMCh7IGtpbmQsIHBheWxvYWQgfTogQWN0aW9uKTogdm9pZDsNCmRlY2xhcmUgZnVuY3Rpb24gZjExKGFjdGlvbjogQWN0aW9uKTogdm9pZDsNCmRlY2xhcmUgZnVuY3Rpb24gZjEyKHsga2luZCwgcGF5bG9hZCB9OiBBY3Rpb24pOiB2b2lkOw0KZGVjbGFyZSBmdW5jdGlvbiBmMTM8VCBleHRlbmRzIEFjdGlvbj4oeyBraW5kLCBwYXlsb2FkIH06IFQpOiB2b2lkOw0KZGVjbGFyZSBmdW5jdGlvbiBmMTQ8VCBleHRl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bm93bltdXSB8IFtlcnI6IEVycm9yLCBkYXRhOiB1bmRlZmluZWRdKSA9PiB2b2lkKTogdm9pZDsNCnR5cGUgUmVkdWNlckFyZ3MgPSBbImFkZCIsIHsNCiAgICBhOiBudW1iZXI7DQogICAgYjogbnVtYmVyOw0KfV0gfCBbImNvbmNhdCIsIHsNCiAgICBmaXJzdEFycjogYW55W107DQogICAgc2Vjb25kQXJyOiBhbnlbXTsNCn1dOw0KZGVjbGFyZSBjb25zdCByZWR1Y2VyOiAoLi4uYXJnczogUmVkdWNlckFyZ3MpID0+IHZvaWQ7DQp0eXBlIEZvb01ldGhvZCA9IHsNCiAgICBtZXRob2QoLi4uYXJnczogWw0KICAgICAgICB0eXBlOiAic3RyIiwNCiAgICAgICAgY2I6IChlOiBzdHJpbmcpID0+IHZvaWQNCiAgICBdIHwgWw0KICAgICAgICB0eXBlOiAibnVtIiwNCiAgICAgICAgY2I6IChlOiBudW1iZXIpID0+IHZvaWQNCiAgICBdKTogdm9pZDsNCn07DQpkZWNsYXJlIGxldCBmb29NOiBGb29NZXRob2Q7DQp0eXBlIEZvb0FzeW5jTWV0aG9kID0gew0KICAgIG1ldGhvZCguLi5hcmdzOiBbDQogICAgICAgIHR5cGU6ICJzdHIiLA0KICAgICAgICBjYjogKGU6IHN0cmluZykgPT4gdm9pZA0KICAgIF0gfCBbDQogICAgICAgIHR5cGU6ICJudW0iLA0KICAgICAgICBjYjogKGU6IG51bWJlcikgPT4gdm9pZA0KICAgIF0pOiBQcm9taXNlPGFueT47DQp9Ow0KZGVjbGFyZSBsZXQgZm9vQXN5bmNNOiBGb29Bc3luY01ldGhvZDsNCnR5cGUgRm9vR2VuTWV0aG9kID0gew0KICAgIG1ldGhvZCguLi5hcmdzOiBbDQogICAgICAgIHR5cGU6ICJzdHIiLA0KICAgICAgICBjYjogKGU6IHN0cmluZykgPT4gdm9pZA0KICAgIF0gfCBbDQogICAgICAgIHR5cGU6ICJudW0iLA0KICAgICAgICBjYjogKGU6IG51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mdW5jdGlvbiBmMTIoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbik6IHZvaWQgewogICAgc3dpdGNoIChraW5kKSB7CiAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICBwYXlsb2FkOyAgLy8gbmV2ZXIKICAgIH0KfQoKLy8gcmVwcm8gIzUwMjA2CmZ1bmN0aW9uIGYxMzxUIGV4dGVuZHMgQWN0aW9uPih7IGtpbmQsIHBheWxvYWQgfTogVCk6IHZvaWQgewogICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgfQogICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgIH0KfQoKZnVuY3Rpb24gZjE0PFQgZXh0ZW5kcyBBY3Rpb24+KHQ6IFQpOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCwgcGF5bG9hZCB9ID0gdDsKICAgIGlmIChraW5kID09PSAnQScpIHsKICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICB9Cn0KCnR5cGUgQWN0aW9uMiA9CiAgICB8IHsga2luZDogJ0EnLCBwYXlsb2FkOiBudW1iZXIgfCB1bmRlZmluZWQgfQogICAgfCB7IGtpbmQ6ICdCJywgcGF5bG9hZDogc3RyaW5nIHwgdW5kZWZpbmVkIH07CgpmdW5jdGlvbiBmMjAoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbjIpOiB2b2lkIHsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjEoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjIoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBpZiAoYWN0aW9uLnBheWxvYWQpIHsKICAgICAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgICAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgIH0KICAgICAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICB9CiAgICB9Cn0KCmZ1bmN0aW9uIGYyMyh7IGtpbmQsIHBheWxvYWQgfTogQWN0aW9uMik6IHZvaWQgewogICAgaWYgKHBheWxvYWQpIHsKICAgICAgICBzd2l0Y2ggKGtpbmQpIHsKICAgICAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgICAgI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dGlvbiBmejEoW3gsIHldOiBbMSwgMl0gfCBbMywgNF0gfCBbNV0pOiB2b2lkIHsKICAgIGlmICh5ID09PSAyKSB7CiAgICAgICAgeDsgIC8vIDEKICAgIH0KICAgIGlmICh5ID09PSA0KSB7CiAgICAgICAgeDsgIC8vIDMKICAgIH0KICAgIGlmICh5ID09PSB1bmRlZmluZWQpIHsKICAgICAgICB4OyAgLy8gNQogICAgfQogICAgaWYgKHggPT09IDEpIHsKICAgICAgICB5OyAgLy8gMgogICAgfQogICAgaWYgKHggPT09IDMpIHsKICAgICAgICB5OyAgLy8gNAogICAgfQogICAgaWYgKHggPT09IDUpIHsKICAgICAgICB5OyAgLy8gdW5kZWZpbmVkCiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzU1NjYxCgpmdW5jdGlvbiB0b29OYXJyb3coW3gsIHldOiBbMSwgMV0gfCBbMSwgMl0gfCBbMV0pOiB2b2lkIHsKICAgIGlmICh5ID09PSB1bmRlZmluZWQpIHsKICAgICAgICBjb25zdCBzaG91bGROb3RCZU9rOiBuZXZlciA9IHg7ICAvLyBFcnJvcgogICAgfQp9Cg== +-//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBBY3Rpb24gPSB7DQogICAga2luZDogJ0EnOw0KICAgIHBheWxvYWQ6IG51bWJlcjsNCn0gfCB7DQogICAga2luZDogJ0InOw0KICAgIHBheWxvYWQ6IHN0cmluZzsNCn07DQpkZWNsYXJlIGZ1bmN0aW9uIGYxMCh7IGtpbmQsIHBheWxvYWQgfTogQWN0aW9uKTogdm9pZDsNCmRlY2xhcmUgZnVuY3Rpb24gZjExKGFjdGlvbjogQWN0aW9uKTogdm9pZDsNCmRlY2xhcmUgZnVuY3Rpb24gZjEyKHsga2luZCwgcGF5bG9hZCB9OiBBY3Rpb24pOiB2b2lkOw0KZGVjbGFyZSBmdW5jdGlvbiBmMTM8VCBleHRlbmRzIEFjdGlvbj4oeyBraW5kLCBwYXlsb2FkIH06IFQpOiB2b2lkOw0KZ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Li4uYXJnczogW2VycjogbnVsbCwgZGF0YTogdW5rbm93bltdXSB8IFtlcnI6IEVycm9yLCBkYXRhOiB1bmRlZmluZWRdKSA9PiB2b2lkKTogdm9pZDsNCnR5cGUgUmVkdWNlckFyZ3MgPSBbImFkZCIsIHsNCiAgICBhOiBudW1iZXI7DQogICAgYjogbnVtYmVyOw0KfV0gfCBbImNvbmNhdCIsIHsNCiAgICBmaXJzdEFycjogYW55W107DQogICAgc2Vjb25kQXJyOiBhbnlbXTsNCn1dOw0KZGVjbGFyZSBjb25zdCByZWR1Y2VyOiAoLi4uYXJnczogUmVkdWNlckFyZ3MpID0+IHZvaWQ7DQp0eXBlIEZvb01ldGhvZCA9IHsNCiAgICBtZXRob2QoLi4uYXJnczogWw0KICAgICAgICB0eXBlOiAic3RyIiwNCiAgICAgICAgY2I6IChlOiBzdHJpbmcpID0+IHZvaWQNCiAgICBdIHwgWw0KICAgICAgICB0eXBlOiAibnVtIiwNCiAgICAgICAgY2I6IChlOiBudW1iZXIpID0+IHZvaWQNCiAgICBdKTogdm9pZDsNCn07DQpkZWNsYXJlIGxldCBmb29NOiBGb29NZXRob2Q7DQp0eXBlIEZvb0FzeW5jTWV0aG9kID0gew0KICAgIG1ldGhvZCguLi5hcmdzOiBbDQogICAgICAgIHR5cGU6ICJzdHIiLA0KICAgICAgICBjYjogKGU6IHN0cmluZykgPT4gdm9pZA0KICAgIF0gfCBbDQogICAgICAgIHR5cGU6ICJudW0iLA0KICAgICAgICBjYjogKGU6IG51bWJlcikgPT4gdm9pZA0KICAgIF0pOiBQcm9taXNlPGFueT47DQp9Ow0KZGVjbGFyZSBsZXQgZm9vQXN5bmNNOiBGb29Bc3luY01ldGhvZDsNCnR5cGUgRm9vR2VuTWV0aG9kID0gew0KICAgIG1ldGhvZCguLi5hcmdzOiBbDQogICAgICAgIHR5cGU6ICJzdHIiLA0KICAgICAgICBjYjogKGU6IHN0cmluZykgPT4gdm9pZA0KICAgIF0gfCBbDQogICAgICAgIHR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vYWQgfSA9IGFjdGlvbjsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjIoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBpZiAoYWN0aW9uLnBheWxvYWQpIHsKICAgICAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgICAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgIH0KICAgICAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICB9CiAgICB9Cn0KCmZ1bmN0aW9uIGYyMyh7IGtpbmQsIHBheWxvYWQgfTogQWN0aW9uMik6IHZvaWQgewogICAgaWYgKHBheWxvYWQpIHsKICAgICAgICBzd2l0Y2ggKGtpbmQpIHsKICAgICAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgcGF5bG9hZDsgIC8vIG5ldmVyCiAgICAgICAgfQogICAgfQp9Cgp0eXBlIEZvbyA9CiAgICB8IHsga2luZDogJ0EnLCBpc0E6IHRydWUgfQogICAgfCB7IGtpbmQ6ICdCJywgaXNBOiBmYWxzZSB9CiAgICB8IHsga2luZDogJ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FkLnRvVXBwZXJDYXNlKCk7CiAgICB9Cn0KCmZ1bmN0aW9uIGYxMShhY3Rpb246IEFjdGlvbik6IHZvaWQgewogICAgY29uc3QgeyBraW5kLCBwYXlsb2FkIH0gPSBhY3Rpb247CiAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgcGF5bG9hZC50b0ZpeGVkKCk7CiAgICB9CiAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgfQp9CgpmdW5jdGlvbiBmMTIoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbik6IHZvaWQgewogICAgc3dpdGNoIChraW5kKSB7CiAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICBwYXlsb2FkOyAgLy8gbmV2ZXIKICAgIH0KfQoKLy8gcmVwcm8gIzUwMjA2CmZ1bmN0aW9uIGYxMzxUIGV4dGVuZHMgQWN0aW9uPih7IGtpbmQsIHBheWxvYWQgfTogVCk6IHZvaWQgewogICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgfQogICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgIH0KfQoKZnVuY3Rpb24gZjE0PFQgZXh0ZW5kcyBBY3Rpb24+KHQ6IFQpOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCwgcGF5bG9hZCB9ID0gdDsKICAgIGlmIChraW5kID09PSAnQScpIHsKICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICB9Cn0KCnR5cGUgQWN0aW9uMiA9CiAgICB8IHsga2luZDogJ0EnLCBwYXlsb2FkOiBudW1iZXIgfCB1bmRlZmluZWQgfQogICAgfCB7IGtpbmQ6ICdCJywgcGF5bG9hZDogc3RyaW5nIHwgdW5kZWZpbmVkIH07CgpmdW5jdGlvbiBmMjAoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbjIpOiB2b2lkIHsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjEoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjIoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBpZiAoYWN0aW9uLnBheWxvYWQpIHsKICAgICAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgICAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgIH0KICAgICAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICB9CiAgICB9Cn0KCmZ1bmN0aW9uIGYyMyh7IGtpbmQsIHBheWxvYWQgfTogQWN0aW9uMik6IHZvaWQgewogICAgaWYgKHBheWxvYWQpIHsKICAgICAgICBzd2l0Y2ggKGtpbmQpIHsKICAgICAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgcGF5bG9hZDsgIC8vIG5ldmVyCiAgICAgICAgfQogICAgfQp9Cgp0eXBlIEZvbyA9CiAgICB8IHsga2luZDogJ0EnLCBpc0E6IHRydWUgfQogICAgfCB7IGtpbmQ6ICdCJywgaXNBOiBmYWxzZSB9CiAgICB8IHsga2luZDogJ0MnLCBpc0E6IGZhbHNlIH07CgpmdW5jdGlvbiBmMzAoeyBraW5kLCBpc0EgfTogRm9vKTogdm9pZCB7CiAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgaXNBOyAgIC8vIHRydWUKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBpc0E7ICAgLy8gZmFsc2UKICAgIH0KICAgIGlmIChraW5kID09PSAnQycpIHsKICAgICAgICBpc0E7ICAgLy8gZmFsc2UKICAgIH0KICAgIGlmIChpc0EpIHsKICAgICAgICBraW5kOyAgLy8gJ0EnCiAgICB9CiAgICBlbHNlIHsKICAgICAgICBraW5kOyAgLy8gJ0InIHwgJ0MnCiAgICB9Cn0KCnR5cGUgQXJncyA9IFsnQScsIG51bWJlcl0gfCBbJ0InLCBzdHJpbmddCgpmdW5jdGlvbiBmNDAoLi4uW2tpbmQsIGRhdGFdOiBBcmdzKTogdm9pZCB7CiAgICBpZi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LnJhbmRvbSgpKSB7CiAgICB4ID0gMTsKICB9CiAgaWYgKHkgPT09IDIpIHsKICAgIHg7IC8vIDEgfCAzCiAgfQp9CgpmdW5jdGlvbiBwYXJhbWV0ZXJSZWFzc2lnbmVkMihbeCwgeV06IFsxLCAyXSB8IFszLCA0XSk6IHZvaWQgewogIGlmIChNYXRoLnJhbmRvbSgpKSB7CiAgICB5ID0gMjsKICB9CiAgaWYgKHkgPT09IDIpIHsKICAgIHg7IC8vIDEgfCAzCiAgfQp9CgovLyBodHRwczovL2dpdGh1Yi5jb20vbWljcm9zb2Z0L1R5cGVTY3JpcHQvcHVsbC81NjMxMyNkaXNjdXNzaW9uX3IxNDE2NDgyNDkwCgpjb25zdCBwYXJhbWV0ZXJSZWFzc2lnbmVkQ29udGV4dHVhbFJlc3QxOiAoLi4uYXJnczogWzEsIDJdIHwgWzMsIDRdKSA9PiB2b2lkID0gKHgsIHkpID0+IHsKICBpZiAoTWF0aC5yYW5kb20oKSkgewogICAgeSA9IDI7CiAgfQogIGlmICh5ID09PSAyKSB7CiAgICB4OyAvLyAxIHwgMwogIH0KfQo= diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringInFunctionType.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringInFunctionType.d.ts.diff deleted file mode 100644 index 5d9dde5059e00..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringInFunctionType.d.ts.diff +++ /dev/null @@ -1,18 +0,0 @@ -// [[Reason: Aliases are preserved for binding patterns GH#55654]] //// - -//// [tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -26,9 +26,9 @@ - a: b; - }, { - b: a; - }]); --type F3 = ([{ a }, { b }]: [ -+type F3 = ([{ a: b }, { b: a }]: [ - { - a: any; - }, - { 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 index 05aa3b0763da6..ea19a39afb809 100644 --- 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 @@ -68,17 +68,17 @@ +typeFromPropertyAssignment29.ts(67,5): error TS9009: 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,30): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. - typeFromPropertyAssignment29.ts(81,50): 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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. - typeFromPropertyAssignment29.ts(91,50): 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 TS9011: Declaration emit for class expressions are 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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. - typeFromPropertyAssignment29.ts(101,50): 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) ==== 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 deleted file mode 100644 index 6c0fec12a018b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatternWithReservedWord.d.ts.map +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts] //// - - - -/// [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,CAA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2NhbGVzQ29uZmlnLAogICAgY29uZmlnOiB1c2VyTG9jYWxlc0NvbmZpZyA9IHt9LAp9OiBHZXRMb2NhbGVzT3B0aW9uczxUPik6IENvbnZlcnRMb2NhbGVDb25maWc8VD4gPT4gewogICAgcmV0dXJuIGRlZmF1bHRMb2NhbGVzQ29uZmlnOwp9Owo= - 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 deleted file mode 100644 index 99b38229a9c9a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatterns.d.ts.map +++ /dev/null @@ -1,24 +0,0 @@ -//// [tests/cases/compiler/declarationEmitBindingPatterns.ts] //// - - - -/// [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/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts index 94bfb966f9572..74f9e381d77ba 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts @@ -7,8 +7,7 @@ // 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 & -{ +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; }) & { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/dependentDestructuredVariables.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/dependentDestructuredVariables.d.ts.map index 8f001afcb07ae..2f1507a2286e7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/dependentDestructuredVariables.d.ts.map +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/dependentDestructuredVariables.d.ts.map @@ -156,13 +156,16 @@ declare class Client { declare const bot: Client; declare function fz1([x, y]: [1, 2] | [3, 4] | [5]): void; declare function tooNarrow([x, y]: [1, 1] | [1, 2] | [1]): void; +declare function parameterReassigned1([x, y]: [1, 2] | [3, 4]): void; +declare function parameterReassigned2([x, y]: [1, 2] | [3, 4]): void; +declare const parameterReassignedContextualRest1: (...args: [1, 2] | [3, 4]) => void; //# sourceMappingURL=dependentDestructuredVariables.d.ts.map /// [Declarations Maps] //// //// [dependentDestructuredVariables.d.ts.map] -{"version":3,"file":"dependentDestructuredVariables.d.ts","sourceRoot":"","sources":["dependentDestructuredVariables.ts"],"names":[],"mappings":"AAAA,KAAK,MAAM,GACL;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAErC,iBAAS,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,MAAM,GAAG,IAAI,CAO5C;AAED,iBAAS,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAQjC;AAED,iBAAS,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,MAAM,GAAG,IAAI,CAW5C;AAGD,iBAAS,GAAG,CAAC,CAAC,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,CAAC,GAAG,IAAI,CAOzD;AAED,iBAAS,GAAG,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,CAQzC;AAED,KAAK,OAAO,GACN;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEjD,iBAAS,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,OAAO,GAAG,IAAI,CAS7C;AAED,iBAAS,GAAG,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAUlC;AAED,iBAAS,GAAG,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAUlC;AAED,iB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Xlsb2FkLnRvRml4ZWQoKTsKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICB9Cn0KCmZ1bmN0aW9uIGYxMShhY3Rpb246IEFjdGlvbik6IHZvaWQgewogICAgY29uc3QgeyBraW5kLCBwYXlsb2FkIH0gPSBhY3Rpb247CiAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgcGF5bG9hZC50b0ZpeGVkKCk7CiAgICB9CiAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgfQp9CgpmdW5jdGlvbiBmMTIoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbik6IHZvaWQgewogICAgc3dpdGNoIChraW5kKSB7CiAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICBwYXlsb2FkOyAgLy8gbmV2ZXIKICAgIH0KfQoKLy8gcmVwcm8gIzUwMjA2CmZ1bmN0aW9uIGYxMzxUIGV4dGVuZHMgQWN0aW9uPih7IGtpbmQsIHBheWxvYWQgfTogVCk6IHZvaWQgewogICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgfQogICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgIH0KfQoKZnVuY3Rpb24gZjE0PFQgZXh0ZW5kcyBBY3Rpb24+KHQ6IFQpOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCwgcGF5bG9hZCB9ID0gdDsKICAgIGlmIChraW5kID09PSAnQScpIHsKICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICB9Cn0KCnR5cGUgQWN0aW9uMiA9CiAgICB8IHsga2luZDogJ0EnLCBwYXlsb2FkOiBudW1iZXIgfCB1bmRlZmluZWQgfQogICAgfCB7IGtpbmQ6ICdCJywgcGF5bG9hZDogc3RyaW5nIHwgdW5kZWZpbmVkIH07CgpmdW5jdGlvbiBmMjAoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbjIpOiB2b2lkIHsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjEoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjIoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBpZiAoYWN0aW9uLnBheWxvYWQpIHsKICAgICAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgICAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgIH0KICAgICAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICB9CiAgICB9Cn0KCmZ1bmN0aW9uIGYyMyh7IGtpbmQsIHBheWxvYWQgfTogQWN0aW9uMik6IHZvaWQgewogICAgaWYgKHBheWxvYWQpIHsKICAgICAgICBzd2l0Y2ggKGtpbmQpIHsKICAgICAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgcGF5bG9hZDsgIC8vIG5ldmVyCiAgICAgICAgfQogICAgfQp9Cgp0eXBlIEZvbyA9CiAgICB8IHsga2luZDogJ0EnLCBpc0E6IHRydWUgfQogICAgfCB7IGtpbmQ6ICdCJywgaXNBOiBmYWxzZSB9CiAgICB8IHsga2luZDogJ0MnLCBpc0E6IGZhbHNlIH07CgpmdW5jdGlvbiBmMzAoeyBraW5kLCBpc0EgfTogRm9vKTogdm9pZCB7CiAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgaXNBOyAgIC8vIHRydWUKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBpc0E7ICAgLy8gZmFsc2UKICAgIH0KICAgIGlmIChraW5kID09PSAnQycpIHsKICAgICAgICBpc0E7ICAgLy8gZmFsc2UKICAgIH0KICAgIGlmIChpc0EpIHsKICAgICAgICBraW5kOyAgLy8gJ0EnCiAgICB9CiAgICBlbHNlIHsKICAgICAgICBraW5kOyAgLy8gJ0InIHwgJ0MnCiAgICB9Cn0KCnR5cGUgQXJncyA9IFsnQScsIG51bWJlcl0gfCBbJ0InLCBzdHJp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Y29ubmVjdCIsIChldmVudCwgc2hhcmQpID0+IGNvbnNvbGUubG9nKGBTaGFyZCAke3NoYXJkfSBkaXNjb25uZWN0ZWQgKCR7ZXZlbnQuY29kZX0sJHtldmVudC53YXNDbGVhbn0pOiAke2V2ZW50LnJlYXNvbn1gKSk7CmJvdC5vbigic2hhcmREaXNjb25uZWN0IiwgZXZlbnQgPT4gY29uc29sZS5sb2coYCR7ZXZlbnQuY29kZX0gJHtldmVudC53YXNDbGVhbn0gJHtldmVudC5yZWFzb259YCkpOwoKLy8gRGVzdHJ1Y3R1cmluZyB0dXBsZSB0eXBlcyB3aXRoIGRpZmZlcmVudCBhcml0aWVzCgpmdW5jdGlvbiBmejEoW3gsIHldOiBbMSwgMl0gfCBbMywgNF0gfCBbNV0pOiB2b2lkIHsKICAgIGlmICh5ID09PSAyKSB7CiAgICAgICAgeDsgIC8vIDEKICAgIH0KICAgIGlmICh5ID09PSA0KSB7CiAgICAgICAgeDsgIC8vIDMKICAgIH0KICAgIGlmICh5ID09PSB1bmRlZmluZWQpIHsKICAgICAgICB4OyAgLy8gNQogICAgfQogICAgaWYgKHggPT09IDEpIHsKICAgICAgICB5OyAgLy8gMgogICAgfQogICAgaWYgKHggPT09IDMpIHsKICAgICAgICB5OyAgLy8gNAogICAgfQogICAgaWYgKHggPT09IDUpIHsKICAgICAgICB5OyAgLy8gdW5kZWZpbmVkCiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzU1NjYxCgpmdW5jdGlvbiB0b29OYXJyb3coW3gsIHldOiBbMSwgMV0gfCBbMSwgMl0gfCBbMV0pOiB2b2lkIHsKICAgIGlmICh5ID09PSB1bmRlZmluZWQpIHsKICAgICAgICBjb25zdCBzaG91bGROb3RCZU9rOiBuZXZlciA9IHg7ICAvLyBFcnJvcgogICAgfQp9Cg== +//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBBY3Rpb24gPSB7DQogICAga2luZDogJ0EnOw0KICAgIHBheWxvYWQ6IG51bWJlcjsNCn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CA9PT0gJ0EnKSB7CiAgICAgICAgcGF5bG9hZC50b0ZpeGVkKCk7CiAgICB9CiAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgfQp9CgpmdW5jdGlvbiBmMTIoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbik6IHZvaWQgewogICAgc3dpdGNoIChraW5kKSB7CiAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICBwYXlsb2FkOyAgLy8gbmV2ZXIKICAgIH0KfQoKLy8gcmVwcm8gIzUwMjA2CmZ1bmN0aW9uIGYxMzxUIGV4dGVuZHMgQWN0aW9uPih7IGtpbmQsIHBheWxvYWQgfTogVCk6IHZvaWQgewogICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgfQogICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgIH0KfQoKZnVuY3Rpb24gZjE0PFQgZXh0ZW5kcyBBY3Rpb24+KHQ6IFQpOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCwgcGF5bG9hZCB9ID0gdDsKICAgIGlmIChraW5kID09PSAnQScpIHsKICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICB9Cn0KCnR5cGUgQWN0aW9uMiA9CiAgICB8IHsga2luZDogJ0EnLCBwYXlsb2FkOiBudW1iZXIgfCB1bmRlZmluZWQgfQogICAgfCB7IGtpbmQ6ICdCJywgcGF5bG9hZDogc3RyaW5nIHwgdW5kZWZpbmVkIH07CgpmdW5jdGlvbiBmMjAoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbjIpOiB2b2lkIHsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjEoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjIoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBpZiAoYWN0aW9uLnBheWxvYWQpIHsKICAgICAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgICAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgIH0KICAgICAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICB9CiAgICB9Cn0KCmZ1bmN0aW9uIGYyMyh7IGtpbmQsIHBheWxvYWQgfTogQWN0aW9uMik6IHZvaWQgewogICAgaWYgKHBheWxvYWQpIHsKICAgICAgICBzd2l0Y2ggKGtpbmQpIHsKICAgICAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgcGF5bG9hZDsgIC8vIG5ldmVyCiAgICAgICAgfQogICAgfQp9Cgp0eXBlIEZvbyA9CiAgICB8IHsga2luZDogJ0EnLCBpc0E6IHRydWUgfQogICAgfCB7IGtpbmQ6ICdCJywgaXNBOiBmYWxzZSB9CiAgICB8IHsga2luZDogJ0MnLCBpc0E6IGZhbHNlIH07CgpmdW5jdGlvbiBmMzAoeyBraW5kLCBpc0EgfTogRm9vKTogdm9pZCB7CiAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgaXNBOyAgIC8vIHRydWUKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBpc0E7ICAgLy8gZmFsc2UKICAgIH0KICAgIGlmIChraW5kID09PSAnQycpIHsKICAgICAgICBpc0E7ICAgLy8gZmFsc2UKICAgIH0KICAgIGlmIChpc0EpIHsKICAgICAgICBraW5kOyAgLy8gJ0EnCiAgICB9CiAgICBlbHNlIHsKICAgICAgICBraW5kOyAgLy8gJ0InIHwgJ0MnCiAgICB9Cn0KCnR5cGUgQXJncyA9IFsnQScsIG51bWJlcl0gfCBbJ0InLCBzdHJpbmddCgpmdW5jdGlvbiBmNDAoLi4uW2tpbmQsIGRhdGFdOiBBcmdzKTogdm9pZCB7CiAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgZGF0YS50b0ZpeGVkKCk7CiAgICB9CiAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgZGF0YS50b1VwcGVyQ2FzZSgpOwogICAgfQp9CgovLyBSZ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AyXSB8IFszLCA0XSk6IHZvaWQgewogIGlmIChNYXRoLnJhbmRvbSgpKSB7CiAgICB5ID0gMjsKICB9CiAgaWYgKHkgPT09IDIpIHsKICAgIHg7IC8vIDEgfCAzCiAgfQp9CgovLyBodHRwczovL2dpdGh1Yi5jb20vbWljcm9zb2Z0L1R5cGVTY3JpcHQvcHVsbC81NjMxMyNkaXNjdXNzaW9uX3IxNDE2NDgyNDkwCgpjb25zdCBwYXJhbWV0ZXJSZWFzc2lnbmVkQ29udGV4dHVhbFJlc3QxOiAoLi4uYXJnczogWzEsIDJdIHwgWzMsIDRdKSA9PiB2b2lkID0gKHgsIHkpID0+IHsKICBpZiAoTWF0aC5yYW5kb20oKSkgewogICAgeSA9IDI7CiAgfQogIGlmICh5ID09PSAyKSB7CiAgICB4OyAvLyAxIHwgMwogIH0KfQo= diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringInFunctionType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringInFunctionType.d.ts deleted file mode 100644 index 6e59c281d8c7c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringInFunctionType.d.ts +++ /dev/null @@ -1,178 +0,0 @@ -//// [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 -/// [Errors] //// - -destructuringInFunctionType.ts(18,18): error TS2842: 'b' is an unused renaming of 'a'. Did you intend to use it as a type annotation? -destructuringInFunctionType.ts(18,28): error TS2842: 'a' is an unused renaming of 'b'. Did you intend to use it as a type annotation? - - -==== destructuringInFunctionType.ts (2 errors) ==== - 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 }]: [ - ~ -!!! error TS2842: 'b' is an unused renaming of 'a'. Did you intend to use it as a type annotation? - ~ -!!! error TS2842: 'a' is an unused renaming of 'b'. Did you intend to use it as a type annotation? - { - 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; - \ No newline at end of file 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 index 4fc606253920c..17fe5b21c7ebf 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts @@ -28,7 +28,7 @@ ExpandoExpr.prop = { y: "" } ExpandoExpr.m = function(n: number) { return n + 1; } -var n: number = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length +var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length const ExpandoArrow: { (n: number): string; @@ -63,7 +63,7 @@ namespace ExpandoMerge { namespace ExpandoMerge { export var p3 = 333; } -var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); +var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); namespace Ns { function ExpandoNamespace(): void {} @@ -81,7 +81,7 @@ ExpandoExpr2.prop = 2 ExpandoExpr2.m = function(n: number) { return n + 1; } -var n: number = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length +var n = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length // Should not work in typescript -- classes already have statics class ExpandoClass { @@ -91,7 +91,7 @@ ExpandoClass.prop = 2 ExpandoClass.m = function(n: number) { return n + 1; } -var n: number = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n +var n = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n // Class expressions shouldn't work in typescript either var ExpandoExpr3 = class { @@ -101,7 +101,7 @@ ExpandoExpr3.prop = 3 ExpandoExpr3.m = function(n: number) { return n + 1; } -var n: number = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n +var n = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n @@ -164,17 +164,17 @@ typeFromPropertyAssignment29.ts(56,1): error TS9009: Assigning properties to fun typeFromPropertyAssignment29.ts(67,5): error TS9009: 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,30): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. -typeFromPropertyAssignment29.ts(81,50): 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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. -typeFromPropertyAssignment29.ts(91,50): 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 TS9011: Declaration emit for class expressions are 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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. -typeFromPropertyAssignment29.ts(101,50): 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) ==== @@ -209,7 +209,7 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi ExpandoExpr.m = function(n: number) { return n + 1; } - var n: number = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length + var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length const ExpandoArrow: { (n: number): string; @@ -248,7 +248,7 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi namespace ExpandoMerge { export var p3 = 333; } - var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); + var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); namespace Ns { function ExpandoNamespace(): void {} @@ -272,10 +272,10 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type '(n: number) => string'. return n + 1; } - var n: number = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length - ~~~~ + 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 @@ -290,10 +290,10 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. return n + 1; } - var n: number = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n - ~~~~ + 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 @@ -310,10 +310,10 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. return n + 1; } - var n: number = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n - ~~~~ + 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/declarationEmitBindingPatternWithReservedWord.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternWithReservedWord.d.ts.map deleted file mode 100644 index 5e39436a2b9e8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternWithReservedWord.d.ts.map +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts] //// - - - -/// [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+IHsNCiAgICBhcHA6IHVua25vd247DQogICAgZGVmYXVs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OiBHZXRMb2NhbGVzT3B0aW9uczxUPik6IENvbnZlcnRMb2NhbGVDb25maWc8VD4gPT4gewogICAgcmV0dXJuIGRlZmF1bHRMb2NhbGVzQ29uZmlnOwp9Owo= - 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 deleted file mode 100644 index 1a2f9dce6fce6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatterns.d.ts.map +++ /dev/null @@ -1,24 +0,0 @@ -//// [tests/cases/compiler/declarationEmitBindingPatterns.ts] //// - - - -/// [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/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts index 504bb20812993..c17d56766b7df 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.d.ts @@ -7,8 +7,7 @@ // 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 & -{ +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; }) & { diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/dependentDestructuredVariables.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/dependentDestructuredVariables.d.ts.map index 4ce400370686b..2b764a8c369e5 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/dependentDestructuredVariables.d.ts.map +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/dependentDestructuredVariables.d.ts.map @@ -156,13 +156,16 @@ declare class Client { declare const bot: Client; declare function fz1([x, y]: [1, 2] | [3, 4] | [5]): void; declare function tooNarrow([x, y]: [1, 1] | [1, 2] | [1]): void; +declare function parameterReassigned1([x, y]: [1, 2] | [3, 4]): void; +declare function parameterReassigned2([x, y]: [1, 2] | [3, 4]): void; +declare const parameterReassignedContextualRest1: (...args: [1, 2] | [3, 4]) => void; //# sourceMappingURL=dependentDestructuredVariables.d.ts.map /// [Declarations Maps] //// //// [dependentDestructuredVariables.d.ts.map] -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AgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgcGF5bG9hZC50b0ZpeGVkKCk7CiAgICB9CiAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgfQp9CgpmdW5jdGlvbiBmMTIoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbik6IHZvaWQgewogICAgc3dpdGNoIChraW5kKSB7CiAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICBwYXlsb2FkOyAgLy8gbmV2ZXIKICAgIH0KfQoKLy8gcmVwcm8gIzUwMjA2CmZ1bmN0aW9uIGYxMzxUIGV4dGVuZHMgQWN0aW9uPih7IGtpbmQsIHBheWxvYWQgfTogVCk6IHZvaWQgewogICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgfQogICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgIH0KfQoKZnVuY3Rpb24gZjE0PFQgZXh0ZW5kcyBBY3Rpb24+KHQ6IFQpOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCwgcGF5bG9hZCB9ID0gdDsKICAgIGlmIChraW5kID09PSAnQScpIHsKICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICB9Cn0KCnR5cGUgQWN0aW9uMiA9CiAgICB8IHsga2luZDogJ0EnLCBwYXlsb2FkOiBudW1iZXIgfCB1bmRlZmluZWQgfQogICAgfCB7IGtpbmQ6ICdCJywgcGF5bG9hZDogc3RyaW5nIHwgdW5kZWZpbmVkIH07CgpmdW5jdGlvbiBmMjAoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbjIpOiB2b2lkIHsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjEoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjIoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBpZiAoYWN0aW9uLnBheWxvYWQpIHsKICAgICAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgICAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgIH0KICAgICAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICB9CiAgICB9Cn0KCmZ1bmN0aW9uIGYyMyh7IGtpbmQsIHBheWxvYWQgfTogQWN0aW9uMik6IHZvaWQgewogICAgaWYgKHBheWxvYWQpIHsKICAgICAgICBzd2l0Y2ggKGtpbmQpIHsKICAgICAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgcGF5bG9hZDsgIC8vIG5ldmVyCiAgICAgICAgfQogICAgfQp9Cgp0eXBlIEZvbyA9CiAgICB8IHsga2luZDogJ0EnLCBpc0E6IHRydWUgfQogICAgfCB7IGtpbmQ6ICdCJywgaXNBOiBmYWxzZSB9CiAgICB8IHsga2luZDogJ0MnLCBpc0E6IGZhbHNlIH07CgpmdW5jdGlvbiBmMzAoeyBraW5kLCBpc0EgfTogRm9vKTogdm9pZCB7CiAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgaXNBOyAgIC8vIHRydWUKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBpc0E7ICAgLy8gZmFsc2UKICAgIH0KICAgIGlmIChraW5kID09PSAnQycpIHsKICAgICAgICBpc0E7ICAgLy8gZmFsc2UKICAgIH0KICAgIGlmIChpc0EpIHsKICAgICAgICBraW5kOyAgLy8gJ0EnCiAgICB9CiAgICBlbHNlIHsKICAgICAgICBraW5kOyAgLy8gJ0InIHwgJ0MnCiAgICB9Cn0KCnR5cGUgQXJncyA9IFsnQScsIG51bWJlcl0gfCBbJ0InLCBzdHJpbmddCgpmdW5jdGlvbiBmNDAoLi4uW2tpbmQsIGRhdGFdOiBBcmdzKTogdm9pZCB7CiAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgZGF0YS50b0ZpeGVkKCk7CiAgICB9CiAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgZGF0YS50b1VwcGVyQ2FzZSgpOwogICA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uc29sZS5sb2coYCR7ZXZlbnQuY29kZX0gJHtldmVudC53YXNDbGVhbn0gJHtldmVudC5yZWFzb259YCkpOwoKLy8gRGVzdHJ1Y3R1cmluZyB0dXBsZSB0eXBlcyB3aXRoIGRpZmZlcmVudCBhcml0aWVzCgpmdW5jdGlvbiBmejEoW3gsIHldOiBbMSwgMl0gfCBbMywgNF0gfCBbNV0pOiB2b2lkIHsKICAgIGlmICh5ID09PSAyKSB7CiAgICAgICAgeDsgIC8vIDEKICAgIH0KICAgIGlmICh5ID09PSA0KSB7CiAgICAgICAgeDsgIC8vIDMKICAgIH0KICAgIGlmICh5ID09PSB1bmRlZmluZWQpIHsKICAgICAgICB4OyAgLy8gNQogICAgfQogICAgaWYgKHggPT09IDEpIHsKICAgICAgICB5OyAgLy8gMgogICAgfQogICAgaWYgKHggPT09IDMpIHsKICAgICAgICB5OyAgLy8gNAogICAgfQogICAgaWYgKHggPT09IDUpIHsKICAgICAgICB5OyAgLy8gdW5kZWZpbmVkCiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzU1NjYxCgpmdW5jdGlvbiB0b29OYXJyb3coW3gsIHldOiBbMSwgMV0gfCBbMSwgMl0gfCBbMV0pOiB2b2lkIHsKICAgIGlmICh5ID09PSB1bmRlZmluZWQpIHsKICAgICAgICBjb25zdCBzaG91bGROb3RCZU9rOiBuZXZlciA9IHg7ICAvLyBFcnJvcgogICAgfQp9Cg== +//// https://sokra.github.io/source-map-visualization#base64,dHlwZSBBY3Rpb24gPSB7DQogICAga2luZDogJ0EnOw0KICAgIHBheWxvYWQ6IG51bWJlcjsNCn0gfCB7DQogICAga2luZDogJ0InOw0KICAgIHBheWxvYWQ6IHN0cmluZzsNCn07DQpkZWNsYXJlIGZ1bmN0aW9uIGYxMCh7IGtpbmQsIHBheWxvYWQgfTogQWN0aW9uKTogdm9pZDsNCmRlY2xhcmUgZnVuY3Rpb24gZjExKGFjdGlvbjogQWN0aW9uKTogdm9pZDsNCmRlY2xhcmUgZn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nQSc6CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICBwYXlsb2FkOyAgLy8gbmV2ZXIKICAgIH0KfQoKLy8gcmVwcm8gIzUwMjA2CmZ1bmN0aW9uIGYxMzxUIGV4dGVuZHMgQWN0aW9uPih7IGtpbmQsIHBheWxvYWQgfTogVCk6IHZvaWQgewogICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgfQogICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgIH0KfQoKZnVuY3Rpb24gZjE0PFQgZXh0ZW5kcyBBY3Rpb24+KHQ6IFQpOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCwgcGF5bG9hZCB9ID0gdDsKICAgIGlmIChraW5kID09PSAnQScpIHsKICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICB9Cn0KCnR5cGUgQWN0aW9uMiA9CiAgICB8IHsga2luZDogJ0EnLCBwYXlsb2FkOiBudW1iZXIgfCB1bmRlZmluZWQgfQogICAgfCB7IGtpbmQ6ICdCJywgcGF5bG9hZDogc3RyaW5nIHwgdW5kZWZpbmVkIH07CgpmdW5jdGlvbiBmMjAoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbjIpOiB2b2lkIHsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjEoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjIoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBpZiAoYWN0aW9uLnBheWxvYWQpIHsKICAgICAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgICAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgIH0KICAgICAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICB9CiAgICB9Cn0KCmZ1bmN0aW9uIGYyMyh7IGtpbmQsIHBheWxvYWQgfTogQWN0aW9uMik6IHZvaWQgewogICAgaWYgKHBheWxvYWQpIHsKICAgICAgICBzd2l0Y2ggKGtpbmQpIHsKICAgICAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgcGF5bG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bWV0ZXJSZWFzc2lnbmVkQ29udGV4dHVhbFJlc3QxOiAoLi4uYXJnczogWzEsIDJdIHwgWzMsIDRdKSA9PiB2b2lkID0gKHgsIHkpID0+IHsKICBpZiAoTWF0aC5yYW5kb20oKSkgewogICAgeSA9IDI7CiAgfQogIGlmICh5ID09PSAyKSB7CiAgICB4OyAvLyAxIHwgMwogIH0KfQo= diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringInFunctionType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringInFunctionType.d.ts deleted file mode 100644 index 957bb9e6e37e7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringInFunctionType.d.ts +++ /dev/null @@ -1,178 +0,0 @@ -//// [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 }]: [ - { - 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 -/// [Errors] //// - -destructuringInFunctionType.ts(18,18): error TS2842: 'b' is an unused renaming of 'a'. Did you intend to use it as a type annotation? -destructuringInFunctionType.ts(18,28): error TS2842: 'a' is an unused renaming of 'b'. Did you intend to use it as a type annotation? - - -==== destructuringInFunctionType.ts (2 errors) ==== - 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 }]: [ - ~ -!!! error TS2842: 'b' is an unused renaming of 'a'. Did you intend to use it as a type annotation? - ~ -!!! error TS2842: 'a' is an unused renaming of 'b'. Did you intend to use it as a type annotation? - { - 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; - \ No newline at end of file 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 index f42a8d5cecbd9..fe1da833bf6e6 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typeFromPropertyAssignment29.d.ts @@ -28,7 +28,7 @@ ExpandoExpr.prop = { y: "" } ExpandoExpr.m = function(n: number) { return n + 1; } -var n: number = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length +var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length const ExpandoArrow: { (n: number): string; @@ -63,7 +63,7 @@ namespace ExpandoMerge { namespace ExpandoMerge { export var p3 = 333; } -var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); +var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); namespace Ns { function ExpandoNamespace(): void {} @@ -81,7 +81,7 @@ ExpandoExpr2.prop = 2 ExpandoExpr2.m = function(n: number) { return n + 1; } -var n: number = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length +var n = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length // Should not work in typescript -- classes already have statics class ExpandoClass { @@ -91,7 +91,7 @@ ExpandoClass.prop = 2 ExpandoClass.m = function(n: number) { return n + 1; } -var n: number = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n +var n = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n // Class expressions shouldn't work in typescript either var ExpandoExpr3 = class { @@ -101,7 +101,7 @@ ExpandoExpr3.prop = 3 ExpandoExpr3.m = function(n: number) { return n + 1; } -var n: number = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n +var n = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n @@ -176,16 +176,16 @@ declare var n: number; 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,30): error TS2339: Property 'prop' does not exist on type '(n: number) => string'. -typeFromPropertyAssignment29.ts(81,50): 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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. -typeFromPropertyAssignment29.ts(91,50): 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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. -typeFromPropertyAssignment29.ts(101,50): 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) ==== @@ -216,7 +216,7 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi ExpandoExpr.m = function(n: number) { return n + 1; } - var n: number = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length + var n = (ExpandoExpr.prop.x || 0) + ExpandoExpr.m(12) + ExpandoExpr(101).length const ExpandoArrow: { (n: number): string; @@ -251,7 +251,7 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi namespace ExpandoMerge { export var p3 = 333; } - var n: number = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); + var n = ExpandoMerge.p1 + ExpandoMerge.p2 + ExpandoMerge.p3 + ExpandoMerge(1); namespace Ns { function ExpandoNamespace(): void {} @@ -273,10 +273,10 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type '(n: number) => string'. return n + 1; } - var n: number = ExpandoExpr2.prop + ExpandoExpr2.m(12) + ExpandoExpr2(101).length - ~~~~ + 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 @@ -291,10 +291,10 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. return n + 1; } - var n: number = ExpandoClass.prop + ExpandoClass.m(12) + new ExpandoClass().n - ~~~~ + 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 @@ -309,10 +309,10 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi !!! error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. return n + 1; } - var n: number = ExpandoExpr3.prop + ExpandoExpr3.m(13) + new ExpandoExpr3().n - ~~~~ + 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/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts b/tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts index 2b2e35b5e6a7d..23275bd5888ab 100644 --- a/tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts +++ b/tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts @@ -1,5 +1,6 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed +// @isolatedDeclarationFixedDiffReason: #56992 Type printer preserves binding element aliases. +// @isolatedDeclarationDiffReason: #56992 Type printer preserves binding element aliases. type LocaleData = Record type ConvertLocaleConfig = Record< string, diff --git a/tests/cases/compiler/declarationEmitBindingPatterns.ts b/tests/cases/compiler/declarationEmitBindingPatterns.ts index 6b8b76afc463f..a30c09f20799b 100644 --- a/tests/cases/compiler/declarationEmitBindingPatterns.ts +++ b/tests/cases/compiler/declarationEmitBindingPatterns.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed +// @isolatedDeclarationFixedDiffReason: #56992 Type printer preserves binding element aliases. const k = ({x: z = 'y'}) => { } diff --git a/tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts b/tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts index af7905bd79691..d9ac5c1e807a3 100644 --- a/tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts +++ b/tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: Aliases are preserved for binding patterns GH#55654 +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed interface a { a } interface b { b } From 0ad2847572de5c24408a40ed27d84ae2fa3737c6 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 9 Jan 2024 16:29:11 +0000 Subject: [PATCH 205/224] Updated baseline. --- ...itBindingPatternWithReservedWord.d.ts.diff | 17 + .../declarationEmitBindingPatterns.d.ts.diff | 17 + ...tDuplicateParameterDestructuring.d.ts.diff | 24 ++ ...licateParameterDestructuring.d.ts.map.diff | 16 - ...larationEmitKeywordDestructuring.d.ts.diff | 34 -- .../diff/declarationFiles.d.ts.diff | 90 ------ ...pendentDestructuredVariables.d.ts.map.diff | 16 - .../destructuringInFunctionType.d.ts.map.diff | 16 + ...paramterDestrcuturingDeclaration.d.ts.diff | 22 -- ...ionEmitBindingPatternWithReservedWord.d.ts | 44 +++ .../dte/declarationEmitBindingPatterns.d.ts | 22 ++ ...onEmitDuplicateParameterDestructuring.d.ts | 22 ++ ...itDuplicateParameterDestructuring.d.ts.map | 27 -- .../declarationEmitKeywordDestructuring.d.ts | 112 ------- .../auto-fixed/dte/declarationFiles.d.ts | 170 ---------- .../dependentDestructuredVariables.d.ts.map | 171 ---------- .../dte/destructuringInFunctionType.d.ts.map | 76 +++++ .../dte/paramterDestrcuturingDeclaration.d.ts | 47 --- ...ionEmitBindingPatternWithReservedWord.d.ts | 44 +++ .../tsc/declarationEmitBindingPatterns.d.ts | 22 ++ ...onEmitDuplicateParameterDestructuring.d.ts | 22 ++ ...itDuplicateParameterDestructuring.d.ts.map | 27 -- .../declarationEmitKeywordDestructuring.d.ts | 112 ------- .../auto-fixed/tsc/declarationFiles.d.ts | 119 ------- .../dependentDestructuredVariables.d.ts.map | 171 ---------- .../tsc/destructuringInFunctionType.d.ts.map | 76 +++++ .../tsc/paramterDestrcuturingDeclaration.d.ts | 47 --- .../diff/ES5For-ofTypeCheck10.d.ts.diff | 41 --- .../diff/ES5SymbolProperty2.d.ts.diff | 40 --- .../diff/ES5SymbolProperty3.d.ts.diff | 34 -- .../diff/ES5SymbolProperty4.d.ts.diff | 34 -- .../diff/ES5SymbolProperty5.d.ts.diff | 34 -- .../diff/ES5SymbolProperty6.d.ts.diff | 33 -- .../diff/ES5SymbolProperty7.d.ts.diff | 34 -- .../MemberFunctionDeclaration3_es6.d.ts.diff | 32 -- .../computedPropertyNames10_ES5.d.ts.diff | 70 ----- .../computedPropertyNames10_ES6.d.ts.diff | 70 ----- .../computedPropertyNames11_ES5.d.ts.diff | 65 ---- .../computedPropertyNames11_ES6.d.ts.diff | 65 ---- .../computedPropertyNames13_ES5.d.ts.diff | 63 ---- .../computedPropertyNames13_ES6.d.ts.diff | 63 ---- .../computedPropertyNames14_ES5.d.ts.diff | 56 ---- .../computedPropertyNames14_ES6.d.ts.diff | 56 ---- .../computedPropertyNames15_ES5.d.ts.diff | 55 ---- .../computedPropertyNames15_ES6.d.ts.diff | 55 ---- .../computedPropertyNames17_ES5.d.ts.diff | 56 ---- .../computedPropertyNames17_ES6.d.ts.diff | 56 ---- ...itBindingPatternWithReservedWord.d.ts.diff | 15 + ...edClassOverridesProtectedMembers.d.ts.diff | 49 --- ...dClassOverridesProtectedMembers2.d.ts.diff | 49 --- ...dClassOverridesProtectedMembers3.d.ts.diff | 28 -- ...rivedClassOverridesPublicMembers.d.ts.diff | 49 --- ...omUsingES6FeaturesWithOnlyES5Lib.d.ts.diff | 56 ---- .../parserComputedPropertyName11.d.ts.diff | 35 --- .../parserComputedPropertyName12.d.ts.diff | 32 -- .../parserComputedPropertyName17.d.ts.diff | 27 -- .../parserComputedPropertyName3.d.ts.diff | 29 -- .../parserComputedPropertyName38.d.ts.diff | 33 -- .../parserComputedPropertyName39.d.ts.diff | 34 -- .../parserComputedPropertyName4.d.ts.diff | 30 -- .../parserComputedPropertyName5.d.ts.diff | 32 -- .../parserComputedPropertyName7.d.ts.diff | 35 --- .../parserComputedPropertyName8.d.ts.diff | 35 --- .../parserES5ComputedPropertyName11.d.ts.diff | 35 --- .../parserES5ComputedPropertyName3.d.ts.diff | 29 -- .../parserES5ComputedPropertyName4.d.ts.diff | 30 -- .../parserES5ComputedPropertyName7.d.ts.diff | 35 --- .../diff/superSymbolIndexedAccess1.d.ts.diff | 51 --- .../diff/superSymbolIndexedAccess3.d.ts.diff | 51 --- .../diff/superSymbolIndexedAccess4.d.ts.diff | 36 --- .../diff/superSymbolIndexedAccess5.d.ts.diff | 49 --- .../diff/superSymbolIndexedAccess6.d.ts.diff | 49 --- .../original/dte/ES5For-ofTypeCheck10.d.ts | 61 ---- .../original/dte/ES5SymbolProperty2.d.ts | 49 --- .../original/dte/ES5SymbolProperty3.d.ts | 37 --- .../original/dte/ES5SymbolProperty4.d.ts | 39 --- .../original/dte/ES5SymbolProperty5.d.ts | 39 --- .../original/dte/ES5SymbolProperty6.d.ts | 38 --- .../original/dte/ES5SymbolProperty7.d.ts | 39 --- .../dte/MemberFunctionDeclaration3_es6.d.ts | 31 -- .../dte/computedPropertyNames10_ES5.d.ts | 126 -------- .../dte/computedPropertyNames10_ES6.d.ts | 126 -------- .../dte/computedPropertyNames11_ES5.d.ts | 115 ------- .../dte/computedPropertyNames11_ES6.d.ts | 115 ------- .../dte/computedPropertyNames13_ES5.d.ts | 82 ----- .../dte/computedPropertyNames13_ES6.d.ts | 82 ----- .../dte/computedPropertyNames14_ES5.d.ts | 64 ---- .../dte/computedPropertyNames14_ES6.d.ts | 64 ---- .../dte/computedPropertyNames15_ES5.d.ts | 57 ---- .../dte/computedPropertyNames15_ES6.d.ts | 57 ---- .../dte/computedPropertyNames17_ES5.d.ts | 64 ---- .../dte/computedPropertyNames17_ES6.d.ts | 64 ---- ...ionEmitBindingPatternWithReservedWord.d.ts | 43 +++ ...derivedClassOverridesProtectedMembers.d.ts | 134 -------- ...erivedClassOverridesProtectedMembers2.d.ts | 250 --------------- ...erivedClassOverridesProtectedMembers3.d.ts | 289 ----------------- .../derivedClassOverridesPublicMembers.d.ts | 248 --------------- ...rorFromUsingES6FeaturesWithOnlyES5Lib.d.ts | 203 ------------ .../dte/parserComputedPropertyName11.d.ts | 34 -- .../dte/parserComputedPropertyName12.d.ts | 31 -- .../dte/parserComputedPropertyName17.d.ts | 25 -- .../dte/parserComputedPropertyName3.d.ts | 26 -- .../dte/parserComputedPropertyName38.d.ts | 34 -- .../dte/parserComputedPropertyName39.d.ts | 36 --- .../dte/parserComputedPropertyName4.d.ts | 28 -- .../dte/parserComputedPropertyName5.d.ts | 31 -- .../dte/parserComputedPropertyName7.d.ts | 34 -- .../dte/parserComputedPropertyName8.d.ts | 34 -- .../dte/parserES5ComputedPropertyName11.d.ts | 34 -- .../dte/parserES5ComputedPropertyName3.d.ts | 26 -- .../dte/parserES5ComputedPropertyName4.d.ts | 28 -- .../dte/parserES5ComputedPropertyName7.d.ts | 34 -- .../dte/superSymbolIndexedAccess1.d.ts | 60 ---- .../dte/superSymbolIndexedAccess3.d.ts | 63 ---- .../dte/superSymbolIndexedAccess4.d.ts | 44 --- .../dte/superSymbolIndexedAccess5.d.ts | 56 ---- .../dte/superSymbolIndexedAccess6.d.ts | 56 ---- .../original/tsc/ES5For-ofTypeCheck10.d.ts | 56 ---- .../original/tsc/ES5SymbolProperty2.d.ts | 45 --- .../original/tsc/ES5SymbolProperty3.d.ts | 35 --- .../original/tsc/ES5SymbolProperty4.d.ts | 37 --- .../original/tsc/ES5SymbolProperty5.d.ts | 37 --- .../original/tsc/ES5SymbolProperty6.d.ts | 33 -- .../original/tsc/ES5SymbolProperty7.d.ts | 37 --- .../tsc/MemberFunctionDeclaration3_es6.d.ts | 26 -- .../tsc/computedPropertyNames10_ES5.d.ts | 138 --------- .../tsc/computedPropertyNames10_ES6.d.ts | 138 --------- .../tsc/computedPropertyNames11_ES5.d.ts | 127 -------- .../tsc/computedPropertyNames11_ES6.d.ts | 127 -------- .../tsc/computedPropertyNames13_ES5.d.ts | 76 ----- .../tsc/computedPropertyNames13_ES6.d.ts | 76 ----- .../tsc/computedPropertyNames14_ES5.d.ts | 60 ---- .../tsc/computedPropertyNames14_ES6.d.ts | 60 ---- .../tsc/computedPropertyNames15_ES5.d.ts | 51 --- .../tsc/computedPropertyNames15_ES6.d.ts | 51 --- .../tsc/computedPropertyNames17_ES5.d.ts | 60 ---- .../tsc/computedPropertyNames17_ES6.d.ts | 60 ---- ...ionEmitBindingPatternWithReservedWord.d.ts | 43 +++ ...derivedClassOverridesProtectedMembers.d.ts | 144 --------- ...erivedClassOverridesProtectedMembers2.d.ts | 260 ---------------- ...erivedClassOverridesProtectedMembers3.d.ts | 293 ------------------ .../derivedClassOverridesPublicMembers.d.ts | 258 --------------- ...rorFromUsingES6FeaturesWithOnlyES5Lib.d.ts | 211 ------------- .../tsc/parserComputedPropertyName11.d.ts | 29 -- .../tsc/parserComputedPropertyName12.d.ts | 26 -- .../tsc/parserComputedPropertyName17.d.ts | 29 -- .../tsc/parserComputedPropertyName3.d.ts | 30 -- .../tsc/parserComputedPropertyName38.d.ts | 29 -- .../tsc/parserComputedPropertyName39.d.ts | 31 -- .../tsc/parserComputedPropertyName4.d.ts | 32 -- .../tsc/parserComputedPropertyName5.d.ts | 35 --- .../tsc/parserComputedPropertyName7.d.ts | 29 -- .../tsc/parserComputedPropertyName8.d.ts | 29 -- .../tsc/parserES5ComputedPropertyName11.d.ts | 29 -- .../tsc/parserES5ComputedPropertyName3.d.ts | 30 -- .../tsc/parserES5ComputedPropertyName4.d.ts | 32 -- .../tsc/parserES5ComputedPropertyName7.d.ts | 29 -- .../tsc/superSymbolIndexedAccess1.d.ts | 56 ---- .../tsc/superSymbolIndexedAccess3.d.ts | 59 ---- .../tsc/superSymbolIndexedAccess4.d.ts | 42 --- .../tsc/superSymbolIndexedAccess5.d.ts | 52 ---- .../tsc/superSymbolIndexedAccess6.d.ts | 52 ---- 162 files changed, 503 insertions(+), 9474 deletions(-) create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatternWithReservedWord.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatterns.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDuplicateParameterDestructuring.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDuplicateParameterDestructuring.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitKeywordDestructuring.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/dependentDestructuredVariables.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/destructuringInFunctionType.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/paramterDestrcuturingDeclaration.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatternWithReservedWord.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatterns.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDuplicateParameterDestructuring.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDuplicateParameterDestructuring.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitKeywordDestructuring.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/dependentDestructuredVariables.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringInFunctionType.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/paramterDestrcuturingDeclaration.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternWithReservedWord.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatterns.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDuplicateParameterDestructuring.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDuplicateParameterDestructuring.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitKeywordDestructuring.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFiles.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/dependentDestructuredVariables.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringInFunctionType.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/paramterDestrcuturingDeclaration.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/ES5For-ofTypeCheck10.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty3.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty4.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty7.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/MemberFunctionDeclaration3_es6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES6.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/original/diff/declarationEmitBindingPatternWithReservedWord.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers2.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers3.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesPublicMembers.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName11.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName12.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName17.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName3.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName38.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName39.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName4.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName7.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName8.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName11.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName3.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName4.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName7.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess1.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess3.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess4.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess5.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess6.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/ES5For-ofTypeCheck10.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty4.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty7.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/MemberFunctionDeclaration3_es6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/dte/declarationEmitBindingPatternWithReservedWord.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesPublicMembers.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName11.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName12.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName17.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName38.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName39.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName4.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName7.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName8.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName11.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName4.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName7.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess4.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/ES5For-ofTypeCheck10.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty4.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty7.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/MemberFunctionDeclaration3_es6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES6.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES6.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitBindingPatternWithReservedWord.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers2.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesPublicMembers.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName11.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName12.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName17.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName38.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName39.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName4.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName7.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName8.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName11.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName4.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName7.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess1.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess3.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess4.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess5.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess6.d.ts diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatternWithReservedWord.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatternWithReservedWord.d.ts.diff new file mode 100644 index 0000000000000..a4b532e9f5d33 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatternWithReservedWord.d.ts.diff @@ -0,0 +1,17 @@ +// [[Reason: #56992 Type printer preserves binding element aliases.]] //// + +//// [tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -9,7 +9,7 @@ + default: ConvertLocaleConfig; + config?: LocaleConfig | undefined; + name?: string; + } +-export declare const getLocales: ({ app, name, default: defaultLocalesConfig, config: userLocalesConfig, }: GetLocalesOptions) => ConvertLocaleConfig; ++export declare const getLocales: ({ app, name, default: defaultLocalesConfig, config, }: GetLocalesOptions) => ConvertLocaleConfig; + export {}; + //# sourceMappingURL=declarationEmitBindingPatternWithReservedWord.d.ts.map +\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatterns.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatterns.d.ts.diff new file mode 100644 index 0000000000000..3f4537aafdcf6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatterns.d.ts.diff @@ -0,0 +1,17 @@ +// [[Reason: #56992 Type printer preserves binding element aliases.]] //// + +//// [tests/cases/compiler/declarationEmitBindingPatterns.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,8 +1,8 @@ + + + //// [declarationEmitBindingPatterns.d.ts] +-declare const k: ({ x: z }: { ++declare const k: ({ x }: { + x?: string; + }) => void; + declare var a: any; + declare function f({}?: any, []?: any, { p: {} }?: any): void; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDuplicateParameterDestructuring.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDuplicateParameterDestructuring.d.ts.diff new file mode 100644 index 0000000000000..c9b500a1c1433 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDuplicateParameterDestructuring.d.ts.diff @@ -0,0 +1,24 @@ +// [[Reason: Sourcemap is more detailed]] //// + +//// [tests/cases/compiler/declarationEmitDuplicateParameterDestructuring.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -1,12 +1,12 @@ + + + //// [declarationEmitDuplicateParameterDestructuring.d.ts] +-export declare const fn1: ({ prop: a, prop: b }: { ++export declare const fn1: ({ prop, prop }: { + prop: number; + }) => number; +-export declare const fn2: ({ prop: a }: { ++export declare const fn2: ({ prop }: { + prop: number; +-}, { prop: b }: { ++}, { prop }: { + prop: number; + }) => number; + //# sourceMappingURL=declarationEmitDuplicateParameterDestructuring.d.ts.map +\ No newline at end of file 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 deleted file mode 100644 index 89b878bb9f938..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDuplicateParameterDestructuring.d.ts.map.diff +++ /dev/null @@ -1,16 +0,0 @@ -// [[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,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZm4xOiAoeyBwcm9wOiBhLCBwcm9wOiBiIH06IHsNCiAgICBwcm9wOiBudW1iZXI7DQp9KSA9PiBudW1iZXI7DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmbjI6ICh7IHByb3A6IGEgfTogew0KICAgIHByb3A6IG51bWJlcjsNCn0sIHsgcHJvcDogYiB9OiB7DQogICAgcHJvcDogbnVtYmVyOw0KfSkgPT4gbnVtYmVyOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZGVjbGFyYXRpb25FbWl0RHVwbGljYXRlUGFyYW1ldGVyRGVzdHJ1Y3R1cmluZy5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0RHVwbGljYXRlUGFyYW1ldGVyRGVzdHJ1Y3R1cmluZy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZGVjbGFyYXRpb25FbWl0RHVwbGljYXRlUGFyYW1ldGVyRGVzdH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XMiOlsiZGVjbGFyYXRpb25FbWl0RHVwbGljYXRlUGFyYW1ldGVyRGVzdHJ1Y3R1cmluZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxlQUFPLE1BQU0sR0FBRyxHQUFJLEVBQUUsSUFBSSxFQUFFLENBQUMsRUFBRSxJQUFJLEVBQUUsQ0FBQyxFQUFFLEVBQUU7SUFBRSxJQUFJLEVBQUUsTUFBTSxDQUFBO0NBQUUsS0FBRyxNQUFlLENBQUM7QUFFN0UsZUFBTyxNQUFNLEdBQUcsR0FBSSxFQUFFLElBQUksRUFBRSxDQUFDLEVBQUUsRUFBRTtJQUFFLElBQUksRUFBRSxNQUFNLENBQUE7Q0FBRSxFQUFFLEVBQUUsSUFBSSxFQUFFLENBQUMsRUFBRSxFQUFFO0lBQUUsSUFBSSxFQUFFLE1BQU0sQ0FBQTtDQUFFLEtBQUcsTUFBZSxDQUFDIn0=,ZXhwb3J0IGNvbnN0IGZuMSA9ICh7IHByb3A6IGEsIHByb3A6IGIgfTogeyBwcm9wOiBudW1iZXIgfSk6IG51bWJlciA9PiBhICsgYjsKCmV4cG9ydCBjb25zdCBmbjIgPSAoeyBwcm9wOiBhIH06IHsgcHJvcDogbnVtYmVyIH0sIHsgcHJvcDogYiB9OiB7IHByb3A6IG51bWJlciB9KTogbnVtYmVyID0+IGEgKyBiOwo= - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitKeywordDestructuring.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitKeywordDestructuring.d.ts.diff deleted file mode 100644 index 13363ea396907..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitKeywordDestructuring.d.ts.diff +++ /dev/null @@ -1,34 +0,0 @@ -// [[Reason: Aliases are preserved for binding patterns GH#55654]] //// - -//// [tests/cases/compiler/declarationEmitKeywordDestructuring.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -22,23 +22,23 @@ - async: boolean; - await: boolean; - one: boolean; - }; --declare function f3({ abstract, ...rest }: P): { -+declare function f3({ abstract: _abstract, ...rest }: P): { - enum: boolean; - function: boolean; - async: boolean; - await: boolean; - one: boolean; - }; --declare function f4({ async, ...rest }: P): { -+declare function f4({ async: _async, ...rest }: P): { - enum: boolean; - function: boolean; - abstract: boolean; - await: boolean; - one: boolean; - }; --declare function f5({ await, ...rest }: P): { -+declare function f5({ await: _await, ...rest }: P): { - enum: boolean; - function: boolean; - abstract: boolean; - async: boolean; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff deleted file mode 100644 index e1680f78d45f1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationFiles.d.ts.diff +++ /dev/null @@ -1,90 +0,0 @@ -// [[Reason: Declarations types can't be named so can't be fixed]] //// - -//// [tests/cases/conformance/types/thisType/declarationFiles.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,13 +1,58 @@ - -+ -+//// [declarationFiles.d.ts] -+declare class C1 { -+ x: this; -+ f(x: this): this; -+ constructor(x: this); -+} -+declare class C2 { -+ [x: string]: this; -+} -+interface Foo { -+ x: T; -+ y: this; -+} -+declare class C3 { -+ a: this[]; -+ b: [this, this]; -+ c: this | Date; -+ d: this & Date; -+ e: (((this))); -+ f: (x: this) => this; -+ g: new (x: this) => this; -+ h: Foo; -+ i: Foo this)>; -+ j: (x: any) => x is this; -+} -+declare const x3_a: typeof globalThis; -+declare const x1_a: typeof globalThis; -+declare class C4 { -+ x1: { -+ a: typeof x1_a; -+ }; -+ x2: this[]; -+ x3: readonly [{ -+ readonly a: typeof x3_a; -+ }]; -+ x4: () => this; -+ f1(): invalid; -+ f2(): this[]; -+ f3(): invalid; -+ f4(): () => this; -+} -+//# sourceMappingURL=declarationFiles.d.ts.map - /// [Errors] //// - - declarationFiles.ts(4,20): error TS2526: A 'this' type is available only in a non-static member of a class or interface. - declarationFiles.ts(36,5): error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. -+declarationFiles.ts(36,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - declarationFiles.ts(42,5): error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. -+declarationFiles.ts(42,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - --==== declarationFiles.ts (3 errors) ==== -+==== declarationFiles.ts (5 errors) ==== - class C1 { - x: this; - f(x: this): this { return undefined; } - constructor(x: this) { } -@@ -46,16 +91,22 @@ - x4 = (): this => this; - f1() { - ~~ - !!! error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. -+ ~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 declarationFiles.ts:36:5: Add a return type to the method - return { a: this }; - } - f2(): this[] { - return [this]; - } - f3() { - ~~ - !!! error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. -+ ~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 declarationFiles.ts:42:5: Add a return type to the method - return [{ a: this }]; - } - f4(): () => this { - return () => this; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/dependentDestructuredVariables.d.ts.map.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/dependentDestructuredVariables.d.ts.map.diff deleted file mode 100644 index c98e39ed95732..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/dependentDestructuredVariables.d.ts.map.diff +++ /dev/null @@ -1,16 +0,0 @@ -// [[Reason: Sourcemap is more detailed]] //// - -//// [tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,6 +1,6 @@ - - //// [dependentDestructuredVariables.d.ts.map] --{"version":3,"file":"dependentDestructuredVariables.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B9Cn0KCmZ1bmN0aW9uIGYxMShhY3Rpb246IEFjdGlvbik6IHZvaWQgewogICAgY29uc3QgeyBraW5kLCBwYXlsb2FkIH0gPSBhY3Rpb247CiAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgcGF5bG9hZC50b0ZpeGVkKCk7CiAgICB9CiAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgfQp9CgpmdW5jdGlvbiBmMTIoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbik6IHZvaWQgewogICAgc3dpdGNoIChraW5kKSB7CiAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICBwYXlsb2FkOyAgLy8gbmV2ZXIKICAgIH0KfQoKLy8gcmVwcm8gIzUwMjA2CmZ1bmN0aW9uIGYxMzxUIGV4dGVuZHMgQWN0aW9uPih7IGtpbmQsIHBheWxvYWQgfTogVCk6IHZvaWQgewogICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgfQogICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgIH0KfQoKZnVuY3Rpb24gZjE0PFQgZXh0ZW5kcyBBY3Rpb24+KHQ6IFQpOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCwgcGF5bG9hZCB9ID0gdDsKICAgIGlmIChraW5kID09PSAnQScpIHsKICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICB9Cn0KCnR5cGUgQWN0aW9uMiA9CiAgICB8IHsga2luZDogJ0EnLCBwYXlsb2FkOiBudW1iZXIgfCB1bmRlZmluZWQgfQogICAgfCB7IGtpbmQ6ICdCJywgcGF5bG9hZDogc3RyaW5nIHwgdW5kZWZpbmVkIH07CgpmdW5jdGlvbiBmMjAoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbjIpOiB2b2lkIHsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjEoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjIoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBpZiAoYWN0aW9uLnBheWxvYWQpIHsKICAgICAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgICAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgIH0KICAgICAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICB9CiAgICB9Cn0KCmZ1bmN0aW9uIGYyMyh7IGtpbmQsIHBheWxvYWQgfTogQWN0aW9uMik6IHZvaWQgewogICAgaWYgKHBheWxvYWQpIHsKICAgICAgICBzd2l0Y2ggKGtpbmQpIHsKICAgICAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgcGF5bG9hZDsgIC8vIG5ldmVyCiAgICAgICAgfQogICAgfQp9Cgp0eXBlIEZvbyA9CiAgICB8IHsga2luZDogJ0EnLCBpc0E6IHRydWUgfQogICAgfCB7IGtpbmQ6ICdCJywgaXNBOiBmYWxzZSB9CiAgICB8IHsga2luZDogJ0MnLCBpc0E6IGZhbHNlIH07CgpmdW5jdGlvbiBmMzAoeyBraW5kLCBpc0EgfTogRm9vKTogdm9pZCB7CiAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgaXNBOyAgIC8vIHRydWUKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBpc0E7ICAgLy8gZmFsc2UKICAgIH0KICAgIGlmIChraW5kID09PSAnQycpIHsKICAgICAgICBpc0E7ICAgLy8gZmFsc2UKICAgIH0KICAgIGlmIChpc0EpIHsKICAgICAgICBraW5kOyAgLy8gJ0EnCiAgICB9CiAgICBlbHNlIHsKICAgICAgICBraW5kOyAgLy8gJ0InIHwgJ0MnCiAgICB9Cn0KCnR5cGUgQXJncyA9IFsnQScsIG51bWJlcl0gfCBbJ0InLCBzdHJpbmddCgpmdW5jdGlvbiBmNDAoLi4uW2tpbmQsIGRhdGFdOiBBcmdzKTogdm9pZCB7CiAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgIC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rbm93bltdXSB8IFtlcnI6IEVycm9yLCBkYXRhOiB1bmRlZmluZWRdKSA9PiB2b2lkKTogdm9pZDsNCnR5cGUgUmVkdWNlckFyZ3MgPSBbImFkZCIsIHsNCiAgICBhOiBudW1iZXI7DQogICAgYjogbnVtYmVyOw0KfV0gfCBbImNvbmNhdCIsIHsNCiAgICBmaXJzdEFycjogYW55W107DQogICAgc2Vjb25kQXJyOiBhbnlbXTsNCn1dOw0KZGVjbGFyZSBjb25zdCByZWR1Y2VyOiAoLi4uYXJnczogUmVkdWNlckFyZ3MpID0+IHZvaWQ7DQp0eXBlIEZvb01ldGhvZCA9IHsNCiAgICBtZXRob2QoLi4uYXJnczogWw0KICAgICAgICB0eXBlOiAic3RyIiwNCiAgICAgICAgY2I6IChlOiBzdHJpbmcpID0+IHZvaWQNCiAgICBdIHwgWw0KICAgICAgICB0eXBlOiAibnVtIiwNCiAgICAgICAgY2I6IChlOiBudW1iZXIpID0+IHZvaWQNCiAgICBdKTogdm9pZDsNCn07DQpkZWNsYXJlIGxldCBmb29NOiBGb29NZXRob2Q7DQp0eXBlIEZvb0FzeW5jTWV0aG9kID0gew0KICAgIG1ldGhvZCguLi5hcmdzOiBbDQogICAgICAgIHR5cGU6ICJzdHIiLA0KICAgICAgICBjYjogKGU6IHN0cmluZykgPT4gdm9pZA0KICAgIF0gfCBbDQogICAgICAgIHR5cGU6ICJudW0iLA0KICAgICAgICBjYjogKGU6IG51bWJlcikgPT4gdm9pZA0KICAgIF0pOiBQcm9taXNlPGFueT47DQp9Ow0KZGVjbGFyZSBsZXQgZm9vQXN5bmNNOiBGb29Bc3luY01ldGhvZDsNCnR5cGUgRm9vR2VuTWV0aG9kID0gew0KICAgIG1ldGhvZCguLi5hcmdzOiBbDQogICAgICAgIHR5cGU6ICJzdHIiLA0KICAgICAgICBjYjogKGU6IHN0cmluZykgPT4gdm9pZA0KICAgIF0gfCBbDQogICAgICAgIHR5cGU6ICJudW0iLA0KICAgICAgICBjYjogKGU6IG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heWxvYWQgfSA9IGFjdGlvbjsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjIoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBpZiAoYWN0aW9uLnBheWxvYWQpIHsKICAgICAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgICAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgIH0KICAgICAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICB9CiAgICB9Cn0KCmZ1bmN0aW9uIGYyMyh7IGtpbmQsIHBheWxvYWQgfTogQWN0aW9uMik6IHZvaWQgewogICAgaWYgKHBheWxvYWQpIHsKICAgICAgICBzd2l0Y2ggKGtpbmQpIHsKICAgICAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgcGF5bG9hZDsgIC8vIG5ldmVyCiAgICAgICAgfQogICAgfQp9Cgp0eXBlIEZvbyA9CiAgICB8IHsga2luZDogJ0EnLCBpc0E6IHRydWUgfQogICAgfCB7IGtpbmQ6ICdCJywgaXNBOiBmYWxzZSB9CiAgICB8IHsga2luZ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fQogIGlmICh5ID09PSAyKSB7CiAgICB4OyAvLyAxIHwgMwogIH0KfQo= - 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..6dfad6547e8c9 --- /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"],"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,CAA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,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE;IAChB,GAAG;IACH,GAAG;IACH,GAAG;CACN,KAAK,MAAM,CAAC"} + +-//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIGEgew0KICAgIGE6IGFueTsNCn0NCmludGVyZmFjZSBiIHsNCiAgICBiOiBhbnk7DQp9DQppbnRlcmZhY2UgYyB7DQogICAgYzogYW55Ow0KfQ0KdHlwZSBUMSA9IChbYSwgYiwgY10pOw0KdHlwZSBGMSA9IChbYSwgYiwgY106IFsNCiAgICBhbnksDQogICAgYW55LA0KICAgIGFueQ0KXSkgPT4gdm9pZDsNCnR5cGUgVDIgPSAoew0KICAgIGE6IGFueTsNCn0pOw0KdHlwZSBGMiA9ICh7IGEgfTogew0KICAgIGE6IGFueTsNCn0pID0+IHZvaWQ7DQp0eXBlIFQzID0gKFt7DQogICAgYTogYjsNCn0sIHsNCiAgICBiOiBhOw0KfV0pOw0KdHlwZSBGMyA9IChbeyBhIH0sIHsgYiB9XTogWw0KICAgIHsNCiAgICAgICAgYTogYW55Ow0KICAgIH0sDQogICAgew0KICAgICAgICBiOiBhbnk7DQogICAgfQ0KXSkgPT4gdm9pZDsNCnR5cGUgVDQgPSAoW3sNCiAgICBhOiBbYiwgY107DQp9XSk7DQp0eXBlIEY0ID0gKFt7IGE6IFtiLCBjXSB9XTogWw0KICAgIHsNCiAgICAgICAgYTogW2FueSwgYW55XTsNCiAgICB9DQpdKSA9PiB2b2lkOw0KdHlwZSBDMSA9IG5ldyAoW3sgYTogW2IsIGNdIH1dOiBbDQogICAgew0KICAgICAgICBhOiBbYW55LCBhbnldOw0KICAgIH0NCl0pID0+IHZvaWQ7DQpkZWNsYXJlIHZhciB2MTogKFthLCBiLCBjXTogWw0KICAgIGFueSwNCiAgICBhbnksDQogICAgYW55DQpdKSA9PiBzdHJpbmc7DQpkZWNsYXJlIHZhciB2MjogKFthLCBiLCBjXTogWw0KICAgI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sQ0FBQyJ9,aW50ZXJmYWNlIGEgeyBhIH0KaW50ZXJmYWNlIGIgeyBiIH0KaW50ZXJmYWNlIGMgeyBjIH0KCnR5cGUgVDEgPSAoW2EsIGIsIGNdKTsKdHlwZSBGMSA9IChbYSwgYiwgY106IFsKICAgIGFueSwKICAgIGFueSwKICAgIGFueQpdKSA9PiB2b2lkOwoKdHlwZSBUMiA9ICh7IGEgfSk7CnR5cGUgRjIgPSAoeyBhIH06IHsKICAgIGE6IGFueTsKfSkgPT4gdm9pZDsKCnR5cGUgVDMgPSAoW3sgYTogYiB9LCB7IGI6IGEgfV0pOwp0eXBlIEYzID0gKFt7IGE6IGIgfSwgeyBiOiBhIH1dOiBbCiAgICB7CiAgICAgICAgYTogYW55OwogICAgfSwKICAgIHsKICAgICAgICBiOiBhbnk7CiAgICB9Cl0pID0+IHZvaWQ7Cgp0eXBlIFQ0ID0gKFt7IGE6IFtiLCBjXSB9XSk7CnR5cGUgRjQgPSAoW3sgYTogW2IsIGNdIH1dOiBbCiAgICB7CiAgICAgICAgYTogW2FueSwgYW55XTsKICAgIH0KXSkgPT4gdm9pZDsKCnR5cGUgQzEgPSBuZXcgKFt7IGE6IFtiLCBjXSB9XTogWwogICAgICAgIHsKICAgICAgICAgICAgYTogW2FueSwgYW55XTsKICAgICAgICB9CiAgICBdKSA9PiB2b2lkOwoKdmFyIHYxID0gKFthLCBiLCBjXTogWwogICAgICAgIGFueSwKICAgICAgICBhbnksCiAgICAgICAgYW55CiAgICBdKTogc3RyaW5nID0+ICJoZWxsbyI7CnZhciB2MjogKFthLCBiLCBjXTogWwogICAgYW55LAogICAgYW55LAogICAgYW55Cl0pID0+IHN0cmluZzsK ++//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIGEgew0KICAgIGE6IGFueTsNCn0NCmludGVyZmFjZSBiIHsNCiAgICBiOiBhbnk7DQp9DQppbnRlcmZhY2UgYyB7DQogICAgYzogYW55Ow0KfQ0KdHlwZSBUMSA9IChbYS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h7IGEgfSk7CnR5cGUgRjIgPSAoeyBhIH06IHsKICAgIGE6IGFueTsKfSkgPT4gdm9pZDsKCnR5cGUgVDMgPSAoW3sgYTogYiB9LCB7IGI6IGEgfV0pOwp0eXBlIEYzID0gKFt7IGE6IGIgfSwgeyBiOiBhIH1dOiBbCiAgICB7CiAgICAgICAgYTogYW55OwogICAgfSwKICAgIHsKICAgICAgICBiOiBhbnk7CiAgICB9Cl0pID0+IHZvaWQ7Cgp0eXBlIFQ0ID0gKFt7IGE6IFtiLCBjXSB9XSk7CnR5cGUgRjQgPSAoW3sgYTogW2IsIGNdIH1dOiBbCiAgICB7CiAgICAgICAgYTogW2FueSwgYW55XTsKICAgIH0KXSkgPT4gdm9pZDsKCnR5cGUgQzEgPSBuZXcgKFt7IGE6IFtiLCBjXSB9XTogWwogICAgICAgIHsKICAgICAgICAgICAgYTogW2FueSwgYW55XTsKICAgICAgICB9CiAgICBdKSA9PiB2b2lkOwoKdmFyIHYxID0gKFthLCBiLCBjXTogWwogICAgICAgIGFueSwKICAgICAgICBhbnksCiAgICAgICAgYW55CiAgICBdKTogc3RyaW5nID0+ICJoZWxsbyI7CnZhciB2MjogKFthLCBiLCBjXTogWwogICAgYW55LAogICAgYW55LAogICAgYW55Cl0pID0+IHN0cmluZzsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/paramterDestrcuturingDeclaration.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/paramterDestrcuturingDeclaration.d.ts.diff deleted file mode 100644 index d7ee4bc3ac83b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/paramterDestrcuturingDeclaration.d.ts.diff +++ /dev/null @@ -1,22 +0,0 @@ -// [[Reason: Aliases are preserved for binding patterns GH#55654]] //// - -//// [tests/cases/compiler/paramterDestrcuturingDeclaration.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,12 +1,12 @@ - - - //// [paramterDestrcuturingDeclaration.d.ts] - interface C { -- ({ p }: { -+ ({ p: name }: { - p: any; - }): any; -- new ({ p }: { -+ new ({ p: boolean }: { - p: any; - }): any; - } - //# sourceMappingURL=paramterDestrcuturingDeclaration.d.ts.map diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatternWithReservedWord.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatternWithReservedWord.d.ts new file mode 100644 index 0000000000000..d0acf03ac476a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatternWithReservedWord.d.ts @@ -0,0 +1,44 @@ +//// [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, }: GetLocalesOptions) => ConvertLocaleConfig; +export {}; +//# sourceMappingURL=declarationEmitBindingPatternWithReservedWord.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatterns.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatterns.d.ts new file mode 100644 index 0000000000000..9e1f9a8eb98ac --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatterns.d.ts @@ -0,0 +1,22 @@ +//// [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 }: { + x?: string; +}) => void; +declare var a: any; +declare function f({}?: any, []?: any, { p: {} }?: any): void; +//# sourceMappingURL=declarationEmitBindingPatterns.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDuplicateParameterDestructuring.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDuplicateParameterDestructuring.d.ts new file mode 100644 index 0000000000000..bd6274512b00a --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDuplicateParameterDestructuring.d.ts @@ -0,0 +1,22 @@ +//// [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, prop }: { + prop: number; +}) => number; +export declare const fn2: ({ prop }: { + prop: number; +}, { prop }: { + prop: number; +}) => number; +//# sourceMappingURL=declarationEmitDuplicateParameterDestructuring.d.ts.map \ No newline at end of file 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 deleted file mode 100644 index 87e7169563da7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDuplicateParameterDestructuring.d.ts.map +++ /dev/null @@ -1,27 +0,0 @@ -//// [tests/cases/compiler/declarationEmitDuplicateParameterDestructuring.ts] //// - - - -/// [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,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZm4xOiAoeyBwcm9wOiBhLCBwcm9wOiBiIH06IHsNCiAgICBwcm9wOiBudW1iZXI7DQp9KSA9PiBudW1iZXI7DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmbjI6ICh7IHByb3A6IGEgfTogew0KICAgIHByb3A6IG51bWJlcjsNCn0sIHsgcHJvcDogYiB9OiB7DQogICAgcHJvcDogbnVtYmVyOw0KfSkgPT4gbnVtYmVyOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZGVjbGFyYXRpb25FbWl0RHVwbGljYXRlUGFyYW1ldGVyRGVzdHJ1Y3R1cmluZy5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0RHVwbGljYXRlUGFyYW1ldGVyRGVzdHJ1Y3R1cmluZy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZGVjbGFyYXRpb25FbWl0RHVwbGljYXRlUGFyYW1ldGVyRGVzdHJ1Y3R1cmluZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxlQUFPLE1BQU0sR0FBRyxHQUFJLEVBQUUsSUFBSSxFQUFFLENBQUMsRUFBRSxJQUFJLEVBQUUsQ0FBQyxFQUFFLEVBQUU7SUFBRSxJQUFJLEVBQUUsTUFBTSxDQUFBO0NBQUUsS0FBRyxNQUFlLENBQUM7QUFFN0UsZUFBTyxNQUFNLEdBQUcsR0FBSSxFQUFFLElBQUksRUFBRSxDQUFDLEVBQUUsRUFBRTtJQUFFLElBQUksRUFBRSxNQUFNLENBQUE7Q0FBRSxFQUFFLEVBQUUsSUFBSSxFQUFFLENBQUMsRUFBRSxFQUFFO0lBQUUsSUFBSSxFQUFFLE1BQU0sQ0FBQTtDQUFFLEtBQUcsTUFBZSxDQUFDIn0=,ZXhwb3J0IGNvbnN0IGZuMSA9ICh7IHByb3A6IGEsIHByb3A6IGIgfTogeyBwcm9wOiBudW1iZXIgfSk6IG51bWJlciA9PiBhICsgYjsKCmV4cG9ydCBjb25zdCBmbjIgPSAoeyBwcm9wOiBhIH06IHsgcHJvcDogbnVtYmVyIH0sIHsgcHJvcDogYiB9OiB7IHByb3A6IG51bWJlciB9KTogbnVtYmVyID0+IGEgKyBiOwo= - diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitKeywordDestructuring.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitKeywordDestructuring.d.ts deleted file mode 100644 index 866844bd24784..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitKeywordDestructuring.d.ts +++ /dev/null @@ -1,112 +0,0 @@ -//// [tests/cases/compiler/declarationEmitKeywordDestructuring.ts] //// - -//// [declarationEmitKeywordDestructuring.ts] -type P = { - enum: boolean; - function: boolean; - abstract: boolean; - async: boolean; - await: boolean; - one: boolean; -}; - -function f1({ enum: _enum, ...rest }: P): { - function: boolean; - abstract: boolean; - async: boolean; - await: boolean; - one: boolean; -} { - return rest; -} - -function f2({ function: _function, ...rest }: P): { - enum: boolean; - abstract: boolean; - async: boolean; - await: boolean; - one: boolean; -} { - return rest; -} - -function f3({ abstract: _abstract, ...rest }: P): { - enum: boolean; - function: boolean; - async: boolean; - await: boolean; - one: boolean; -} { - return rest; -} - -function f4({ async: _async, ...rest }: P): { - enum: boolean; - function: boolean; - abstract: boolean; - await: boolean; - one: boolean; -} { - return rest; -} - -function f5({ await: _await, ...rest }: P): { - enum: boolean; - function: boolean; - abstract: boolean; - async: boolean; - one: boolean; -} { - return rest; -} - - -/// [Declarations] //// - - - -//// [declarationEmitKeywordDestructuring.d.ts] -type P = { - enum: boolean; - function: boolean; - abstract: boolean; - async: boolean; - await: boolean; - one: boolean; -}; -declare function f1({ enum: _enum, ...rest }: P): { - function: boolean; - abstract: boolean; - async: boolean; - await: boolean; - one: boolean; -}; -declare function f2({ function: _function, ...rest }: P): { - enum: boolean; - abstract: boolean; - async: boolean; - await: boolean; - one: boolean; -}; -declare function f3({ abstract: _abstract, ...rest }: P): { - enum: boolean; - function: boolean; - async: boolean; - await: boolean; - one: boolean; -}; -declare function f4({ async: _async, ...rest }: P): { - enum: boolean; - function: boolean; - abstract: boolean; - await: boolean; - one: boolean; -}; -declare function f5({ await: _await, ...rest }: P): { - enum: boolean; - function: boolean; - abstract: boolean; - async: boolean; - one: boolean; -}; -//# sourceMappingURL=declarationEmitKeywordDestructuring.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts deleted file mode 100644 index 3973bc05d7d8a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationFiles.d.ts +++ /dev/null @@ -1,170 +0,0 @@ -//// [tests/cases/conformance/types/thisType/declarationFiles.ts] //// - -//// [declarationFiles.ts] -class C1 { - x: this; - f(x: this): this { return undefined; } - constructor(x: this) { } -} - -class C2 { - [x: string]: this; -} - -interface Foo { - x: T; - y: this; -} - -class C3 { - a: this[]; - b: [this, this]; - c: this | Date; - d: this & Date; - e: (((this))); - f: (x: this) => this; - g: new (x: this) => this; - h: Foo; - i: Foo this)>; - j: (x: any) => x is this; -} - -const x3_a: typeof globalThis = this; -const x1_a: typeof globalThis = this; -class C4 { - x1 = { a: x1_a as typeof x1_a }; - x2: this[] = [this]; - x3 = [{ a: x3_a as typeof x3_a }] as const; - x4 = (): this => this; - f1() { - return { a: this }; - } - f2(): this[] { - return [this]; - } - f3() { - return [{ a: this }]; - } - f4(): () => this { - return () => this; - } -} - - -/// [Declarations] //// - - - -//// [declarationFiles.d.ts] -declare class C1 { - x: this; - f(x: this): this; - constructor(x: this); -} -declare class C2 { - [x: string]: this; -} -interface Foo { - x: T; - y: this; -} -declare class C3 { - a: this[]; - b: [this, this]; - c: this | Date; - d: this & Date; - e: (((this))); - f: (x: this) => this; - g: new (x: this) => this; - h: Foo; - i: Foo this)>; - j: (x: any) => x is this; -} -declare const x3_a: typeof globalThis; -declare const x1_a: typeof globalThis; -declare class C4 { - x1: { - a: typeof x1_a; - }; - x2: this[]; - x3: readonly [{ - readonly a: typeof x3_a; - }]; - x4: () => this; - f1(): invalid; - f2(): this[]; - f3(): invalid; - f4(): () => this; -} -//# sourceMappingURL=declarationFiles.d.ts.map -/// [Errors] //// - -declarationFiles.ts(4,20): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -declarationFiles.ts(36,5): error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. -declarationFiles.ts(36,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -declarationFiles.ts(42,5): error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. -declarationFiles.ts(42,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== declarationFiles.ts (5 errors) ==== - class C1 { - x: this; - f(x: this): this { return undefined; } - constructor(x: this) { } - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - } - - class C2 { - [x: string]: this; - } - - interface Foo { - x: T; - y: this; - } - - class C3 { - a: this[]; - b: [this, this]; - c: this | Date; - d: this & Date; - e: (((this))); - f: (x: this) => this; - g: new (x: this) => this; - h: Foo; - i: Foo this)>; - j: (x: any) => x is this; - } - - const x3_a: typeof globalThis = this; - const x1_a: typeof globalThis = this; - class C4 { - x1 = { a: x1_a as typeof x1_a }; - x2: this[] = [this]; - x3 = [{ a: x3_a as typeof x3_a }] as const; - x4 = (): this => this; - f1() { - ~~ -!!! error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. - ~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 declarationFiles.ts:36:5: Add a return type to the method - return { a: this }; - } - f2(): this[] { - return [this]; - } - f3() { - ~~ -!!! error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. - ~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 declarationFiles.ts:42:5: Add a return type to the method - return [{ a: this }]; - } - f4(): () => this { - return () => this; - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/dependentDestructuredVariables.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/dependentDestructuredVariables.d.ts.map deleted file mode 100644 index 2f1507a2286e7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/dependentDestructuredVariables.d.ts.map +++ /dev/null @@ -1,171 +0,0 @@ -//// [tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts] //// - - - -/// [Declarations] //// - - - -//// [dependentDestructuredVariables.d.ts] -type Action = { - kind: 'A'; - payload: number; -} | { - kind: 'B'; - payload: string; -}; -declare function f10({ kind, payload }: Action): void; -declare function f11(action: Action): void; -declare function f12({ kind, payload }: Action): void; -declare function f13({ kind, payload }: T): void; -declare function f14(t: T): void; -type Action2 = { - kind: 'A'; - payload: number | undefined; -} | { - kind: 'B'; - payload: string | undefined; -}; -declare function f20({ kind, payload }: Action2): void; -declare function f21(action: Action2): void; -declare function f22(action: Action2): void; -declare function f23({ kind, payload }: Action2): void; -type Foo = { - kind: 'A'; - isA: true; -} | { - kind: 'B'; - isA: false; -} | { - kind: 'C'; - isA: false; -}; -declare function f30({ kind, isA }: Foo): void; -type Args = ['A', number] | ['B', string]; -declare function f40(...[kind, data]: Args): void; -interface A { - variant: 'a'; - value: T; -} -interface B { - variant: 'b'; - value: Array; -} -type AB = A | B; -declare function printValue(t: T): void; -declare function printValueList(t: Array): void; -declare function unrefined1(ab: AB): void; -type Action3 = { - type: 'add'; - payload: { - toAdd: number; - }; -} | { - type: 'remove'; - payload: { - toRemove: number; - }; -}; -declare const reducerBroken: (state: number, { type, payload }: Action3) => number; -declare var it: Iterator; -declare const dest: IteratorResult; -declare const value: any; -declare const done: boolean | undefined; -declare function f50(cb: (...args: Args) => void): void; -declare const f51: (...args: ['A', number] | ['B', string]) => void; -declare const f52: (...args: ['A', number] | ['B']) => void; -declare function readFile(path: string, callback: (...args: [err: null, data: unknown[]] | [err: Error, data: undefined]) => void): void; -type ReducerArgs = ["add", { - a: number; - b: number; -}] | ["concat", { - firstArr: any[]; - secondArr: any[]; -}]; -declare const reducer: (...args: ReducerArgs) => void; -type FooMethod = { - method(...args: [ - type: "str", - cb: (e: string) => void - ] | [ - type: "num", - cb: (e: number) => void - ]): void; -}; -declare let fooM: FooMethod; -type FooAsyncMethod = { - method(...args: [ - type: "str", - cb: (e: string) => void - ] | [ - type: "num", - cb: (e: number) => void - ]): Promise; -}; -declare let fooAsyncM: FooAsyncMethod; -type FooGenMethod = { - method(...args: [ - type: "str", - cb: (e: string) => void - ] | [ - type: "num", - cb: (e: number) => void - ]): Generator; -}; -declare let fooGenM: FooGenMethod; -type FooAsyncGenMethod = { - method(...args: [ - type: "str", - cb: (e: string) => void - ] | [ - type: "num", - cb: (e: number) => void - ]): AsyncGenerator; -}; -declare let fooAsyncGenM: FooAsyncGenMethod; -type Func = (...args: T) => void; -declare const f60: Func; -declare function foo({ value1, test1, test2, test3, test4, test5, test6, test7, test8, test9 }: { - value1: any; - test1?: any; - test2?: any; - test3?: any; - test4?: any; - test5?: any; - test6?: any; - test7?: any; - test8?: any; - test9?: any; -}): void; -declare function fa1(x: [true, number] | [false, string]): void; -declare function fa2(x: { - guard: true; - value: number; -} | { - guard: false; - value: string; -}): void; -declare const fa3: (...args: [true, number] | [false, string]) => void; -interface ClientEvents { - warn: [message: string]; - shardDisconnect: [closeEvent: CloseEvent, shardId: number]; -} -declare class Client { - on(event: K, listener: (...args: ClientEvents[K]) => void): void; -} -declare const bot: Client; -declare function fz1([x, y]: [1, 2] | [3, 4] | [5]): void; -declare function tooNarrow([x, y]: [1, 1] | [1, 2] | [1]): void; -declare function parameterReassigned1([x, y]: [1, 2] | [3, 4]): void; -declare function parameterReassigned2([x, y]: [1, 2] | [3, 4]): void; -declare const parameterReassignedContextualRest1: (...args: [1, 2] | [3, 4]) => void; -//# sourceMappingURL=dependentDestructuredVariables.d.ts.map - -/// [Declarations Maps] //// - - -//// [dependentDestructuredVariables.d.ts.map] -{"version":3,"file":"dependentDestructuredVariables.d.ts","sourceRoot":"","sources":["dependentDestructuredVariables.ts"],"names":[],"mappings":"AAAA,KAAK,MAAM,GACL;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAErC,iBAAS,GAAG,CAAC,EAAE,IAAI,EAAE,OA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ICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgfQp9CgpmdW5jdGlvbiBmMTIoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbik6IHZvaWQgewogICAgc3dpdGNoIChraW5kKSB7CiAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICBwYXlsb2FkOyAgLy8gbmV2ZXIKICAgIH0KfQoKLy8gcmVwcm8gIzUwMjA2CmZ1bmN0aW9uIGYxMzxUIGV4dGVuZHMgQWN0aW9uPih7IGtpbmQsIHBheWxvYWQgfTogVCk6IHZvaWQgewogICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgfQogICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgIH0KfQoKZnVuY3Rpb24gZjE0PFQgZXh0ZW5kcyBBY3Rpb24+KHQ6IFQpOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCwgcGF5bG9hZCB9ID0gdDsKICAgIGlmIChraW5kID09PSAnQScpIHsKICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICB9Cn0KCnR5cGUgQWN0aW9uMiA9CiAgICB8IHsga2luZDogJ0EnLCBwYXlsb2FkOiBudW1iZXIgfCB1bmRlZmluZWQgfQogICAgfCB7IGtpbmQ6ICdCJywgcGF5bG9hZDogc3RyaW5nIHwgdW5kZWZpbmVkIH07CgpmdW5jdGlvbiBmMjAoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbjIpOiB2b2lkIHsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjEoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjIoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBpZiAoYWN0aW9uLnBheWxvYWQpIHsKICAgICAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgICAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgIH0KICAgICAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICB9CiAgICB9Cn0KCmZ1bmN0aW9uIGYyMyh7IGtpbmQsIHBheWxvYWQgfTogQWN0aW9uMik6IHZvaWQgewogICAgaWYgKHBheWxvYWQpIHsKICAgICAgICBzd2l0Y2ggKGtpbmQpIHsKICAgICAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgcGF5bG9hZDsgIC8vIG5ldmVyCiAgICAgICAgfQogICAgfQp9Cgp0eXBlIEZvbyA9CiAgICB8IHsga2luZDogJ0EnLCBpc0E6IHRydWUgfQogICAgfCB7IGtpbmQ6ICdCJywgaXNBOiBmYWxzZSB9CiAgICB8IHsga2luZDogJ0MnLCBpc0E6IGZhbHNlIH07CgpmdW5jdGlvbiBmMzAoeyBraW5kLCBpc0EgfTogRm9vKTogdm9pZCB7CiAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgaXNBOyAgIC8vIHRydWUKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBpc0E7ICAgLy8gZmFsc2UKICAgIH0KICAgIGlmIChraW5kID09PSAnQycpIHsKICAgICAgICBpc0E7ICAgLy8gZmFsc2UKICAgIH0KICAgIGlmIChpc0EpIHsKICAgICAgICBraW5kOyAgLy8gJ0EnCiAgICB9CiAgICBlbHNlIHsKICAgICAgICBraW5kOyAgLy8gJ0InIHwgJ0MnCiAgICB9Cn0KCnR5cGUgQXJncyA9IFsnQScsIG51bWJlcl0gfCBbJ0InLCBzdHJpbmddCgpmdW5jdGlvbiBmNDAoLi4uW2tpbmQsIGRhdGFdOiBBcmdzKTogdm9pZCB7CiAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgZGF0YS50b0ZpeGVkKCk7CiAgICB9CiAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgZGF0YS50b1VwcGVyQ2FzZSgpOwogICAgfQp9CgovLyBSZXBybyBmcm9tICMzNTI4MwoKaW50ZXJmYWNlIEE8VD4geyB2YXJpYW50OiAnYScsIHZhbHVlOiBUIH0KCmludGVyZmFjZSBCPFQ+I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KICAgIHg7IC8vIDEgfCAzCiAgfQp9CgovLyBodHRwczovL2dpdGh1Yi5jb20vbWljcm9zb2Z0L1R5cGVTY3JpcHQvcHVsbC81NjMxMyNkaXNjdXNzaW9uX3IxNDE2NDgyNDkwCgpjb25zdCBwYXJhbWV0ZXJSZWFzc2lnbmVkQ29udGV4dHVhbFJlc3QxOiAoLi4uYXJnczogWzEsIDJdIHwgWzMsIDRdKSA9PiB2b2lkID0gKHgsIHkpID0+IHsKICBpZiAoTWF0aC5yYW5kb20oKSkgewogICAgeSA9IDI7CiAgfQogIGlmICh5ID09PSAyKSB7CiAgICB4OyAvLyAxIHwgMwogIH0KfQo= - 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..4ab5dc5ceac63 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/destructuringInFunctionType.d.ts.map @@ -0,0 +1,76 @@ +//// [tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts] //// + + + +/// [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 }]: [ + { + 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,CAAI,EAAE,EAAE,EAAE,CAAI,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,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;IACxB;QACI,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;K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gYW55XTsKICAgICAgICB9CiAgICBdKSA9PiB2b2lkOwoKdmFyIHYxID0gKFthLCBiLCBjXTogWwogICAgICAgIGFueSwKICAgICAgICBhbnksCiAgICAgICAgYW55CiAgICBdKTogc3RyaW5nID0+ICJoZWxsbyI7CnZhciB2MjogKFthLCBiLCBjXTogWwogICAgYW55LAogICAgYW55LAogICAgYW55Cl0pID0+IHN0cmluZzsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/paramterDestrcuturingDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/paramterDestrcuturingDeclaration.d.ts deleted file mode 100644 index 00699300847e4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/paramterDestrcuturingDeclaration.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -//// [tests/cases/compiler/paramterDestrcuturingDeclaration.ts] //// - -//// [paramterDestrcuturingDeclaration.ts] -interface C { - ({p: name}: { - p: any; - }): any; - new ({p: boolean}: { - p: any; - }): any; -} - - -/// [Declarations] //// - - - -//// [paramterDestrcuturingDeclaration.d.ts] -interface C { - ({ p: name }: { - p: any; - }): any; - new ({ p: boolean }: { - p: any; - }): any; -} -//# sourceMappingURL=paramterDestrcuturingDeclaration.d.ts.map -/// [Errors] //// - -paramterDestrcuturingDeclaration.ts(2,10): error TS2842: 'name' is an unused renaming of 'p'. Did you intend to use it as a type annotation? -paramterDestrcuturingDeclaration.ts(5,14): error TS2842: 'boolean' is an unused renaming of 'p'. Did you intend to use it as a type annotation? - - -==== paramterDestrcuturingDeclaration.ts (2 errors) ==== - interface C { - ({p: name}: { - ~~~~ -!!! error TS2842: 'name' is an unused renaming of 'p'. Did you intend to use it as a type annotation? - p: any; - }): any; - new ({p: boolean}: { - ~~~~~~~ -!!! error TS2842: 'boolean' is an unused renaming of 'p'. Did you intend to use it as a type annotation? - p: any; - }): any; - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternWithReservedWord.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternWithReservedWord.d.ts new file mode 100644 index 0000000000000..7ec6c70421fd7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternWithReservedWord.d.ts @@ -0,0 +1,44 @@ +//// [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 \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatterns.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatterns.d.ts new file mode 100644 index 0000000000000..3bdc1f24420bd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatterns.d.ts @@ -0,0 +1,22 @@ +//// [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 \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDuplicateParameterDestructuring.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDuplicateParameterDestructuring.d.ts new file mode 100644 index 0000000000000..828362f6c4b48 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDuplicateParameterDestructuring.d.ts @@ -0,0 +1,22 @@ +//// [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 \ No newline at end of file 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 deleted file mode 100644 index 48d0f70f4ba5c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDuplicateParameterDestructuring.d.ts.map +++ /dev/null @@ -1,27 +0,0 @@ -//// [tests/cases/compiler/declarationEmitDuplicateParameterDestructuring.ts] //// - - - -/// [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/declarationEmitKeywordDestructuring.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitKeywordDestructuring.d.ts deleted file mode 100644 index 1cb28db051774..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitKeywordDestructuring.d.ts +++ /dev/null @@ -1,112 +0,0 @@ -//// [tests/cases/compiler/declarationEmitKeywordDestructuring.ts] //// - -//// [declarationEmitKeywordDestructuring.ts] -type P = { - enum: boolean; - function: boolean; - abstract: boolean; - async: boolean; - await: boolean; - one: boolean; -}; - -function f1({ enum: _enum, ...rest }: P): { - function: boolean; - abstract: boolean; - async: boolean; - await: boolean; - one: boolean; -} { - return rest; -} - -function f2({ function: _function, ...rest }: P): { - enum: boolean; - abstract: boolean; - async: boolean; - await: boolean; - one: boolean; -} { - return rest; -} - -function f3({ abstract: _abstract, ...rest }: P): { - enum: boolean; - function: boolean; - async: boolean; - await: boolean; - one: boolean; -} { - return rest; -} - -function f4({ async: _async, ...rest }: P): { - enum: boolean; - function: boolean; - abstract: boolean; - await: boolean; - one: boolean; -} { - return rest; -} - -function f5({ await: _await, ...rest }: P): { - enum: boolean; - function: boolean; - abstract: boolean; - async: boolean; - one: boolean; -} { - return rest; -} - - -/// [Declarations] //// - - - -//// [declarationEmitKeywordDestructuring.d.ts] -type P = { - enum: boolean; - function: boolean; - abstract: boolean; - async: boolean; - await: boolean; - one: boolean; -}; -declare function f1({ enum: _enum, ...rest }: P): { - function: boolean; - abstract: boolean; - async: boolean; - await: boolean; - one: boolean; -}; -declare function f2({ function: _function, ...rest }: P): { - enum: boolean; - abstract: boolean; - async: boolean; - await: boolean; - one: boolean; -}; -declare function f3({ abstract, ...rest }: P): { - enum: boolean; - function: boolean; - async: boolean; - await: boolean; - one: boolean; -}; -declare function f4({ async, ...rest }: P): { - enum: boolean; - function: boolean; - abstract: boolean; - await: boolean; - one: boolean; -}; -declare function f5({ await, ...rest }: P): { - enum: boolean; - function: boolean; - abstract: boolean; - async: boolean; - one: boolean; -}; -//# sourceMappingURL=declarationEmitKeywordDestructuring.d.ts.map \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFiles.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFiles.d.ts deleted file mode 100644 index ff4f06ecdf3af..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationFiles.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -//// [tests/cases/conformance/types/thisType/declarationFiles.ts] //// - -//// [declarationFiles.ts] -class C1 { - x: this; - f(x: this): this { return undefined; } - constructor(x: this) { } -} - -class C2 { - [x: string]: this; -} - -interface Foo { - x: T; - y: this; -} - -class C3 { - a: this[]; - b: [this, this]; - c: this | Date; - d: this & Date; - e: (((this))); - f: (x: this) => this; - g: new (x: this) => this; - h: Foo; - i: Foo this)>; - j: (x: any) => x is this; -} - -const x3_a: typeof globalThis = this; -const x1_a: typeof globalThis = this; -class C4 { - x1 = { a: x1_a as typeof x1_a }; - x2: this[] = [this]; - x3 = [{ a: x3_a as typeof x3_a }] as const; - x4 = (): this => this; - f1() { - return { a: this }; - } - f2(): this[] { - return [this]; - } - f3() { - return [{ a: this }]; - } - f4(): () => this { - return () => this; - } -} - - -/// [Declarations] //// - - -/// [Errors] //// - -declarationFiles.ts(4,20): error TS2526: A 'this' type is available only in a non-static member of a class or interface. -declarationFiles.ts(36,5): error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. -declarationFiles.ts(42,5): error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. - - -==== declarationFiles.ts (3 errors) ==== - class C1 { - x: this; - f(x: this): this { return undefined; } - constructor(x: this) { } - ~~~~ -!!! error TS2526: A 'this' type is available only in a non-static member of a class or interface. - } - - class C2 { - [x: string]: this; - } - - interface Foo { - x: T; - y: this; - } - - class C3 { - a: this[]; - b: [this, this]; - c: this | Date; - d: this & Date; - e: (((this))); - f: (x: this) => this; - g: new (x: this) => this; - h: Foo; - i: Foo this)>; - j: (x: any) => x is this; - } - - const x3_a: typeof globalThis = this; - const x1_a: typeof globalThis = this; - class C4 { - x1 = { a: x1_a as typeof x1_a }; - x2: this[] = [this]; - x3 = [{ a: x3_a as typeof x3_a }] as const; - x4 = (): this => this; - f1() { - ~~ -!!! error TS2527: The inferred type of 'f1' references an inaccessible 'this' type. A type annotation is necessary. - return { a: this }; - } - f2(): this[] { - return [this]; - } - f3() { - ~~ -!!! error TS2527: The inferred type of 'f3' references an inaccessible 'this' type. A type annotation is necessary. - return [{ a: this }]; - } - f4(): () => this { - return () => this; - } - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/dependentDestructuredVariables.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/dependentDestructuredVariables.d.ts.map deleted file mode 100644 index 2b764a8c369e5..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/dependentDestructuredVariables.d.ts.map +++ /dev/null @@ -1,171 +0,0 @@ -//// [tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts] //// - - - -/// [Declarations] //// - - - -//// [dependentDestructuredVariables.d.ts] -type Action = { - kind: 'A'; - payload: number; -} | { - kind: 'B'; - payload: string; -}; -declare function f10({ kind, payload }: Action): void; -declare function f11(action: Action): void; -declare function f12({ kind, payload }: Action): void; -declare function f13({ kind, payload }: T): void; -declare function f14(t: T): void; -type Action2 = { - kind: 'A'; - payload: number | undefined; -} | { - kind: 'B'; - payload: string | undefined; -}; -declare function f20({ kind, payload }: Action2): void; -declare function f21(action: Action2): void; -declare function f22(action: Action2): void; -declare function f23({ kind, payload }: Action2): void; -type Foo = { - kind: 'A'; - isA: true; -} | { - kind: 'B'; - isA: false; -} | { - kind: 'C'; - isA: false; -}; -declare function f30({ kind, isA }: Foo): void; -type Args = ['A', number] | ['B', string]; -declare function f40(...[kind, data]: Args): void; -interface A { - variant: 'a'; - value: T; -} -interface B { - variant: 'b'; - value: Array; -} -type AB = A | B; -declare function printValue(t: T): void; -declare function printValueList(t: Array): void; -declare function unrefined1(ab: AB): void; -type Action3 = { - type: 'add'; - payload: { - toAdd: number; - }; -} | { - type: 'remove'; - payload: { - toRemove: number; - }; -}; -declare const reducerBroken: (state: number, { type, payload }: Action3) => number; -declare var it: Iterator; -declare const dest: IteratorResult; -declare const value: any; -declare const done: boolean | undefined; -declare function f50(cb: (...args: Args) => void): void; -declare const f51: (...args: ['A', number] | ['B', string]) => void; -declare const f52: (...args: ['A', number] | ['B']) => void; -declare function readFile(path: string, callback: (...args: [err: null, data: unknown[]] | [err: Error, data: undefined]) => void): void; -type ReducerArgs = ["add", { - a: number; - b: number; -}] | ["concat", { - firstArr: any[]; - secondArr: any[]; -}]; -declare const reducer: (...args: ReducerArgs) => void; -type FooMethod = { - method(...args: [ - type: "str", - cb: (e: string) => void - ] | [ - type: "num", - cb: (e: number) => void - ]): void; -}; -declare let fooM: FooMethod; -type FooAsyncMethod = { - method(...args: [ - type: "str", - cb: (e: string) => void - ] | [ - type: "num", - cb: (e: number) => void - ]): Promise; -}; -declare let fooAsyncM: FooAsyncMethod; -type FooGenMethod = { - method(...args: [ - type: "str", - cb: (e: string) => void - ] | [ - type: "num", - cb: (e: number) => void - ]): Generator; -}; -declare let fooGenM: FooGenMethod; -type FooAsyncGenMethod = { - method(...args: [ - type: "str", - cb: (e: string) => void - ] | [ - type: "num", - cb: (e: number) => void - ]): AsyncGenerator; -}; -declare let fooAsyncGenM: FooAsyncGenMethod; -type Func = (...args: T) => void; -declare const f60: Func; -declare function foo({ value1, test1, test2, test3, test4, test5, test6, test7, test8, test9 }: { - value1: any; - test1?: any; - test2?: any; - test3?: any; - test4?: any; - test5?: any; - test6?: any; - test7?: any; - test8?: any; - test9?: any; -}): void; -declare function fa1(x: [true, number] | [false, string]): void; -declare function fa2(x: { - guard: true; - value: number; -} | { - guard: false; - value: string; -}): void; -declare const fa3: (...args: [true, number] | [false, string]) => void; -interface ClientEvents { - warn: [message: string]; - shardDisconnect: [closeEvent: CloseEvent, shardId: number]; -} -declare class Client { - on(event: K, listener: (...args: ClientEvents[K]) => void): void; -} -declare const bot: Client; -declare function fz1([x, y]: [1, 2] | [3, 4] | [5]): void; -declare function tooNarrow([x, y]: [1, 1] | [1, 2] | [1]): void; -declare function parameterReassigned1([x, y]: [1, 2] | [3, 4]): void; -declare function parameterReassigned2([x, y]: [1, 2] | [3, 4]): void; -declare const parameterReassignedContextualRest1: (...args: [1, 2] | [3, 4]) => void; -//# sourceMappingURL=dependentDestructuredVariables.d.ts.map - -/// [Declarations Maps] //// - - -//// [dependentDestructuredVariables.d.ts.map] -{"version":3,"file":"dependentDestructuredVariables.d.ts","sourceRoot":"","sources":["dependentDestructuredVariables.ts"],"names":[],"mappings":"AAAA,KAAK,MAAM,GACL;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,GAAG,CAAC;I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cGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgfQp9CgpmdW5jdGlvbiBmMTIoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbik6IHZvaWQgewogICAgc3dpdGNoIChraW5kKSB7CiAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICBwYXlsb2FkOyAgLy8gbmV2ZXIKICAgIH0KfQoKLy8gcmVwcm8gIzUwMjA2CmZ1bmN0aW9uIGYxMzxUIGV4dGVuZHMgQWN0aW9uPih7IGtpbmQsIHBheWxvYWQgfTogVCk6IHZvaWQgewogICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgfQogICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgIH0KfQoKZnVuY3Rpb24gZjE0PFQgZXh0ZW5kcyBBY3Rpb24+KHQ6IFQpOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCwgcGF5bG9hZCB9ID0gdDsKICAgIGlmIChraW5kID09PSAnQScpIHsKICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICB9Cn0KCnR5cGUgQWN0aW9uMiA9CiAgICB8IHsga2luZDogJ0EnLCBwYXlsb2FkOiBudW1iZXIgfCB1bmRlZmluZWQgfQogICAgfCB7IGtpbmQ6ICdCJywgcGF5bG9hZDogc3RyaW5nIHwgdW5kZWZpbmVkIH07CgpmdW5jdGlvbiBmMjAoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbjIpOiB2b2lkIHsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjEoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjIoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBpZiAoYWN0aW9uLnBheWxvYWQpIHsKICAgICAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgICAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgIH0KICAgICAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICB9CiAgICB9Cn0KCmZ1bmN0aW9uIGYyMyh7IGtpbmQsIHBheWxvYWQgfTogQWN0aW9uMik6IHZvaWQgewogICAgaWYgKHBheWxvYWQpIHsKICAgICAgICBzd2l0Y2ggKGtpbmQpIHsKICAgICAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgcGF5bG9hZDsgIC8vIG5ldmVyCiAgICAgICAgfQogICAgfQp9Cgp0eXBlIEZvbyA9CiAgICB8IHsga2luZDogJ0EnLCBpc0E6IHRydWUgfQogICAgfCB7IGtpbmQ6ICdCJywgaXNBOiBmYWxzZSB9CiAgICB8IHsga2luZDogJ0MnLCBpc0E6IGZhbHNlIH07CgpmdW5jdGlvbiBmMzAoeyBraW5kLCBpc0EgfTogRm9vKTogdm9pZCB7CiAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgaXNBOyAgIC8vIHRydWUKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBpc0E7ICAgLy8gZmFsc2UKICAgIH0KICAgIGlmIChraW5kID09PSAnQycpIHsKICAgICAgICBpc0E7ICAgLy8gZmFsc2UKICAgIH0KICAgIGlmIChpc0EpIHsKICAgICAgICBraW5kOyAgLy8gJ0EnCiAgICB9CiAgICBlbHNlIHsKICAgICAgICBraW5kOyAgLy8gJ0InIHwgJ0MnCiAgICB9Cn0KCnR5cGUgQXJncyA9IFsnQScsIG51bWJlcl0gfCBbJ0InLCBzdHJpbmddCgpmdW5jdGlvbiBmNDAoLi4uW2tpbmQsIGRhdGFdOiBBcmdzKTogdm9pZCB7CiAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgZGF0YS50b0ZpeGVkKCk7CiAgICB9CiAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgZGF0YS50b1VwcGVyQ2FzZSgpOwogICAgfQp9CgovLyBSZXBybyBmcm9tICMzNTI4MwoKaW50ZXJmYWNlIEE8VD4geyB2YXJpYW50OiAnYScsIHZhbHVlOiBUIH0KCmludGVyZmFjZSBCPFQ+IHsg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gIHg7IC8vIDEgfCAzCiAgfQp9CgovLyBodHRwczovL2dpdGh1Yi5jb20vbWljcm9zb2Z0L1R5cGVTY3JpcHQvcHVsbC81NjMxMyNkaXNjdXNzaW9uX3IxNDE2NDgyNDkwCgpjb25zdCBwYXJhbWV0ZXJSZWFzc2lnbmVkQ29udGV4dHVhbFJlc3QxOiAoLi4uYXJnczogWzEsIDJdIHwgWzMsIDRdKSA9PiB2b2lkID0gKHgsIHkpID0+IHsKICBpZiAoTWF0aC5yYW5kb20oKSkgewogICAgeSA9IDI7CiAgfQogIGlmICh5ID09PSAyKSB7CiAgICB4OyAvLyAxIHwgMwogIH0KfQo= - 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..e14ea0723a524 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringInFunctionType.d.ts.map @@ -0,0 +1,76 @@ +//// [tests/cases/conformance/es6/destructuring/destructuringInFunctionType.ts] //// + + + +/// [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 }]: [ + { + 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,CAAI,EAAE,EAAE,EAAE,CAAI,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,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;IACxB;QACI,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;KACjB;CACJ,KAAK,IAAI,CAAC;AAEX,KAAK,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;IACxB;QACI,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;KACjB;CACJ,KAAK,IAAI,CAAC;AAEf,QAAA,IAAI,EAAE,cAAe;IACb,GAAG;IACH,GAAG;IACH,GAAG;CACN,KAAG,MAAiB,CAAC;AAC1B,QAAA,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE;IAChB,GAAG;IACH,GAAG;IACH,GAAG;CACN,KAAK,MAAM,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIGEgew0KICAgIGE6IGFueTsNCn0NCmludGVyZmFjZSBiIHsNCiAgICBiOiBhbnk7DQp9DQppbnRlcmZhY2UgYyB7DQogICAgYzogYW55Ow0KfQ0KdHlwZSBUMSA9IChbYSwgYiwgY10pOw0KdHlwZSBGMSA9IChbYSwgYiwgY106IFsNCiAgICBhbnksDQogICAgYW55LA0KICAgIGFueQ0KXSkgPT4gdm9pZDsNCnR5cGUgVDIgPSAoew0KICAgIGE6IGFueTsNCn0pOw0KdHlwZSBGMiA9ICh7IGEgfTogew0KICAgIGE6IGFueTsNCn0pID0+IHZvaWQ7DQp0eXBlIFQzID0gKFt7DQogICAgYTogYjsNCn0sIHsNCiAgICBiOiBhOw0KfV0pOw0KdHlwZSBGMyA9IChbeyBhIH0sIHsgYiB9XTogWw0KICAgIHsNCiAgICAgICAgYTogYW55Ow0KICAgIH0sDQogICAgew0KICAgICAgICBiOiBhbnk7DQogICAgfQ0KXSkgPT4gdm9pZDsNCnR5cGUgVDQgPSAoW3sNCiAgICBhOiBbYiwgY107DQp9XSk7DQp0eXBlIEY0ID0gKFt7IGE6IFtiLCBjXSB9XTogWw0KICAgIHsNCiAgICAgICAgYTogW2FueSwgYW55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ICAgYW55CiAgICBdKTogc3RyaW5nID0+ICJoZWxsbyI7CnZhciB2MjogKFthLCBiLCBjXTogWwogICAgYW55LAogICAgYW55LAogICAgYW55Cl0pID0+IHN0cmluZzsK + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/paramterDestrcuturingDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/paramterDestrcuturingDeclaration.d.ts deleted file mode 100644 index 130d6b3ab5a1f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/paramterDestrcuturingDeclaration.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -//// [tests/cases/compiler/paramterDestrcuturingDeclaration.ts] //// - -//// [paramterDestrcuturingDeclaration.ts] -interface C { - ({p: name}: { - p: any; - }): any; - new ({p: boolean}: { - p: any; - }): any; -} - - -/// [Declarations] //// - - - -//// [paramterDestrcuturingDeclaration.d.ts] -interface C { - ({ p }: { - p: any; - }): any; - new ({ p }: { - p: any; - }): any; -} -//# sourceMappingURL=paramterDestrcuturingDeclaration.d.ts.map -/// [Errors] //// - -paramterDestrcuturingDeclaration.ts(2,10): error TS2842: 'name' is an unused renaming of 'p'. Did you intend to use it as a type annotation? -paramterDestrcuturingDeclaration.ts(5,14): error TS2842: 'boolean' is an unused renaming of 'p'. Did you intend to use it as a type annotation? - - -==== paramterDestrcuturingDeclaration.ts (2 errors) ==== - interface C { - ({p: name}: { - ~~~~ -!!! error TS2842: 'name' is an unused renaming of 'p'. Did you intend to use it as a type annotation? - p: any; - }): any; - new ({p: boolean}: { - ~~~~~~~ -!!! error TS2842: 'boolean' is an unused renaming of 'p'. Did you intend to use it as a type annotation? - p: any; - }): any; - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5For-ofTypeCheck10.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5For-ofTypeCheck10.d.ts.diff deleted file mode 100644 index 2bc3391fedffc..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5For-ofTypeCheck10.d.ts.diff +++ /dev/null @@ -1,41 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,18 +2,20 @@ - - //// [ES5For-ofTypeCheck10.d.ts] - declare class StringIterator { - next(): invalid; -+ [Symbol.iterator](): invalid; - } - - /// [Errors] //// - - ES5For-ofTypeCheck10.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+ES5For-ofTypeCheck10.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - ES5For-ofTypeCheck10.ts(9,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an array type or a string type. - - --==== ES5For-ofTypeCheck10.ts (3 errors) ==== -+==== ES5For-ofTypeCheck10.ts (4 errors) ==== - // In ES3/5, you cannot for...of over an arbitrary iterable. - class StringIterator { - next() { - ~~~~ -@@ -24,8 +26,11 @@ - value: "" - }; - } - [Symbol.iterator]() { -+ ~~~~~~~~~~~~~~~~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 ES5For-ofTypeCheck10.ts:9:5: Add a return type to the method - ~~~~~~ - !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - return this; - } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty2.d.ts.diff deleted file mode 100644 index ff9cd853ad240..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty2.d.ts.diff +++ /dev/null @@ -1,40 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/Symbols/ES5SymbolProperty2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,15 +1,18 @@ - - - //// [ES5SymbolProperty2.d.ts] - declare namespace M { -- class C { -+ var Symbol: any; -+ export class C { -+ [Symbol.iterator](): invalid; - } -+ export {}; - } - - /// [Errors] //// - --ES5SymbolProperty2.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+ES5SymbolProperty2.ts(5,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - ES5SymbolProperty2.ts(10,11): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - - ==== ES5SymbolProperty2.ts (2 errors) ==== -@@ -18,9 +21,10 @@ - - export class C { - [Symbol.iterator]() { } - ~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 ES5SymbolProperty2.ts:5:9: Add a return type to the method - } - (new C)[Symbol.iterator]; - } - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty3.d.ts.diff deleted file mode 100644 index d3e7a29575e31..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty3.d.ts.diff +++ /dev/null @@ -1,34 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/Symbols/ES5SymbolProperty3.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,21 +2,23 @@ - - //// [ES5SymbolProperty3.d.ts] - declare var Symbol: any; - declare class C { -+ [Symbol.iterator](): invalid; - } - - /// [Errors] //// - --ES5SymbolProperty3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+ES5SymbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - - ==== ES5SymbolProperty3.ts (1 errors) ==== - var Symbol: any; - - class C { - [Symbol.iterator]() { } - ~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 ES5SymbolProperty3.ts:4:5: Add a return type to the method - } - - (new C)[Symbol.iterator] -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty4.d.ts.diff deleted file mode 100644 index c2ddf790d9f08..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty4.d.ts.diff +++ /dev/null @@ -1,34 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/Symbols/ES5SymbolProperty4.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,21 +4,23 @@ - declare var Symbol: { - iterator: string; - }; - declare class C { -+ [Symbol.iterator](): invalid; - } - - /// [Errors] //// - --ES5SymbolProperty4.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+ES5SymbolProperty4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - - ==== ES5SymbolProperty4.ts (1 errors) ==== - var Symbol: { iterator: string }; - - class C { - [Symbol.iterator]() { } - ~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 ES5SymbolProperty4.ts:4:5: Add a return type to the method - } - - (new C)[Symbol.iterator] -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty5.d.ts.diff deleted file mode 100644 index 04e2953ba91a6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty5.d.ts.diff +++ /dev/null @@ -1,34 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/Symbols/ES5SymbolProperty5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,21 +4,23 @@ - declare var Symbol: { - iterator: symbol; - }; - declare class C { -+ [Symbol.iterator](): invalid; - } - - /// [Errors] //// - --ES5SymbolProperty5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+ES5SymbolProperty5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - - ==== ES5SymbolProperty5.ts (1 errors) ==== - var Symbol: { iterator: symbol }; - - class C { - [Symbol.iterator]() { } - ~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 ES5SymbolProperty5.ts:4:5: Add a return type to the method - } - - (new C)[Symbol.iterator](0) // Should error -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty6.d.ts.diff deleted file mode 100644 index 981d5a5fc79d7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty6.d.ts.diff +++ /dev/null @@ -1,33 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/Symbols/ES5SymbolProperty6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,19 +1,24 @@ - - - //// [ES5SymbolProperty6.d.ts] - declare class C { -+ [Symbol.iterator](): invalid; - } - - /// [Errors] //// - -+ES5SymbolProperty6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - ES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ES5SymbolProperty6.ts(5,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - --==== ES5SymbolProperty6.ts (2 errors) ==== -+==== ES5SymbolProperty6.ts (3 errors) ==== - class C { - [Symbol.iterator]() { } -+ ~~~~~~~~~~~~~~~~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 ES5SymbolProperty6.ts:2:5: Add a return type to the method - ~~~~~~ - !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } - diff --git a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty7.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty7.d.ts.diff deleted file mode 100644 index d368721b0de29..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/ES5SymbolProperty7.d.ts.diff +++ /dev/null @@ -1,34 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/Symbols/ES5SymbolProperty7.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,21 +4,23 @@ - declare var Symbol: { - iterator: any; - }; - declare class C { -+ [Symbol.iterator](): invalid; - } - - /// [Errors] //// - --ES5SymbolProperty7.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+ES5SymbolProperty7.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - - ==== ES5SymbolProperty7.ts (1 errors) ==== - var Symbol: { iterator: any }; - - class C { - [Symbol.iterator]() { } - ~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 ES5SymbolProperty7.ts:4:5: Add a return type to the method - } - - (new C)[Symbol.iterator] -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/MemberFunctionDeclaration3_es6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/MemberFunctionDeclaration3_es6.d.ts.diff deleted file mode 100644 index 001d4bd66ec5c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/MemberFunctionDeclaration3_es6.d.ts.diff +++ /dev/null @@ -1,32 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,17 +1,22 @@ - - - //// [MemberFunctionDeclaration3_es6.d.ts] - declare class C { -+ [foo](): invalid; - } - - /// [Errors] //// - -+MemberFunctionDeclaration3_es6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - MemberFunctionDeclaration3_es6.ts(2,6): error TS2304: Cannot find name 'foo'. - - --==== MemberFunctionDeclaration3_es6.ts (1 errors) ==== -+==== MemberFunctionDeclaration3_es6.ts (2 errors) ==== - class C { - *[foo]() { } -+ ~~~~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 MemberFunctionDeclaration3_es6.ts:2:5: Add a return type to the method - ~~~ - !!! error TS2304: Cannot find name 'foo'. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES5.d.ts.diff deleted file mode 100644 index c41183705cc13..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES5.d.ts.diff +++ /dev/null @@ -1,70 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -8,11 +8,9 @@ - - /// [Errors] //// - - computedPropertyNames10_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. --computedPropertyNames10_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames10_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. --computedPropertyNames10_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames10_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames10_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames10_ES5.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames10_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -@@ -20,17 +18,16 @@ - computedPropertyNames10_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames10_ES5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames10_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames10_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. --computedPropertyNames10_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames10_ES5.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames10_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames10_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames10_ES5.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames10_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - --==== computedPropertyNames10_ES5.ts (19 errors) ==== -+==== computedPropertyNames10_ES5.ts (16 errors) ==== - var s: string; - var n: number; - var a: any; - var v = { -@@ -38,19 +35,13 @@ - ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. - !!! related TS9034 computedPropertyNames10_ES5.ts:5:5: Add a return type to the method -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. - [n]() { }, - ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. - !!! related TS9034 computedPropertyNames10_ES5.ts:6:5: Add a return type to the method -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. - [s + s]() { }, - ~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -@@ -88,11 +79,8 @@ - ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. - !!! related TS9034 computedPropertyNames10_ES5.ts:12:5: Add a return type to the method -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. - [true]() { }, - ~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES6.d.ts.diff deleted file mode 100644 index f5e8e583dbeaf..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames10_ES6.d.ts.diff +++ /dev/null @@ -1,70 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -8,11 +8,9 @@ - - /// [Errors] //// - - computedPropertyNames10_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. --computedPropertyNames10_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames10_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. --computedPropertyNames10_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames10_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames10_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames10_ES6.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames10_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -@@ -20,17 +18,16 @@ - computedPropertyNames10_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames10_ES6.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames10_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames10_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. --computedPropertyNames10_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames10_ES6.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames10_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames10_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames10_ES6.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames10_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - --==== computedPropertyNames10_ES6.ts (19 errors) ==== -+==== computedPropertyNames10_ES6.ts (16 errors) ==== - var s: string; - var n: number; - var a: any; - var v = { -@@ -38,19 +35,13 @@ - ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. - !!! related TS9034 computedPropertyNames10_ES6.ts:5:5: Add a return type to the method -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. - [n]() { }, - ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. - !!! related TS9034 computedPropertyNames10_ES6.ts:6:5: Add a return type to the method -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. - [s + s]() { }, - ~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -@@ -88,11 +79,8 @@ - ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. - !!! related TS9034 computedPropertyNames10_ES6.ts:12:5: Add a return type to the method -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. - [true]() { }, - ~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES5.d.ts.diff deleted file mode 100644 index 340f1194cb32d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES5.d.ts.diff +++ /dev/null @@ -1,65 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -8,10 +8,8 @@ - - /// [Errors] //// - - computedPropertyNames11_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. --computedPropertyNames11_ES5.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --computedPropertyNames11_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames11_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames11_ES5.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames11_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames11_ES5.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -@@ -19,33 +17,26 @@ - computedPropertyNames11_ES5.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames11_ES5.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames11_ES5.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames11_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. --computedPropertyNames11_ES5.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames11_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames11_ES5.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames11_ES5.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames11_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames11_ES5.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames11_ES5.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - --==== computedPropertyNames11_ES5.ts (19 errors) ==== -+==== computedPropertyNames11_ES5.ts (16 errors) ==== - var s: string; - var n: number; - var a: any; - var v = { - get [s]() { return 0; }, - ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9032 computedPropertyNames11_ES5.ts:5:9: Add a return type to the get accessor declaration. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. - set [n](v) { }, -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. - ~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9033 computedPropertyNames11_ES5.ts:6:9: Add a type to parameter of the set accessor declaration. - get [s + s]() { return 0; }, -@@ -77,11 +68,8 @@ - ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9032 computedPropertyNames11_ES5.ts:11:9: Add a return type to the get accessor declaration. - set [a](v) { }, -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. - ~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9033 computedPropertyNames11_ES5.ts:12:9: Add a type to parameter of the set accessor declaration. - get [true]() { return 0; }, diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES6.d.ts.diff deleted file mode 100644 index e8f703258ecb8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames11_ES6.d.ts.diff +++ /dev/null @@ -1,65 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -8,10 +8,8 @@ - - /// [Errors] //// - - computedPropertyNames11_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. --computedPropertyNames11_ES6.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --computedPropertyNames11_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames11_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames11_ES6.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames11_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames11_ES6.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -@@ -19,33 +17,26 @@ - computedPropertyNames11_ES6.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames11_ES6.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames11_ES6.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames11_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. --computedPropertyNames11_ES6.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames11_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames11_ES6.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames11_ES6.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - computedPropertyNames11_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames11_ES6.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames11_ES6.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - --==== computedPropertyNames11_ES6.ts (19 errors) ==== -+==== computedPropertyNames11_ES6.ts (16 errors) ==== - var s: string; - var n: number; - var a: any; - var v = { - get [s]() { return 0; }, - ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9032 computedPropertyNames11_ES6.ts:5:9: Add a return type to the get accessor declaration. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. - set [n](v) { }, -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. - ~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9033 computedPropertyNames11_ES6.ts:6:9: Add a type to parameter of the set accessor declaration. - get [s + s]() { return 0; }, -@@ -77,11 +68,8 @@ - ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9032 computedPropertyNames11_ES6.ts:11:9: Add a return type to the get accessor declaration. - set [a](v) { }, -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. - ~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9033 computedPropertyNames11_ES6.ts:12:9: Add a type to parameter of the set accessor declaration. - get [true]() { return 0; }, diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES5.d.ts.diff deleted file mode 100644 index be38d8e5a8028..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES5.d.ts.diff +++ /dev/null @@ -1,63 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,20 +4,23 @@ - declare var s: string; - declare var n: number; - declare var a: any; - declare class C { -+ [s](): invalid; -+ [n](): invalid; - static [""](): invalid; - [0](): invalid; -+ [a](): invalid; - [`hello bye`](): invalid; - } - - /// [Errors] //// - --computedPropertyNames13_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --computedPropertyNames13_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames13_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+computedPropertyNames13_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames13_ES5.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames13_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. --computedPropertyNames13_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames13_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames13_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - - ==== computedPropertyNames13_ES5.ts (6 errors) ==== -@@ -26,12 +29,14 @@ - var a: any; - class C { - [s]() {} - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNames13_ES5.ts:5:5: Add a return type to the method - [n]() { } - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNames13_ES5.ts:6:5: Add a return type to the method - static [s + s]() { } - [s + n]() { } - [+s]() { } - static [""]() { } -@@ -43,9 +48,10 @@ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9034 computedPropertyNames13_ES5.ts:11:5: Add a return type to the method - [a]() { } - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNames13_ES5.ts:12:5: Add a return type to the method - static [true]() { } - [`hello bye`]() { } - ~~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES6.d.ts.diff deleted file mode 100644 index e86cc100d7330..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames13_ES6.d.ts.diff +++ /dev/null @@ -1,63 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,20 +4,23 @@ - declare var s: string; - declare var n: number; - declare var a: any; - declare class C { -+ [s](): invalid; -+ [n](): invalid; - static [""](): invalid; - [0](): invalid; -+ [a](): invalid; - [`hello bye`](): invalid; - } - - /// [Errors] //// - --computedPropertyNames13_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --computedPropertyNames13_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames13_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+computedPropertyNames13_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames13_ES6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames13_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. --computedPropertyNames13_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames13_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames13_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - - ==== computedPropertyNames13_ES6.ts (6 errors) ==== -@@ -26,12 +29,14 @@ - var a: any; - class C { - [s]() {} - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNames13_ES6.ts:5:5: Add a return type to the method - [n]() { } - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNames13_ES6.ts:6:5: Add a return type to the method - static [s + s]() { } - [s + n]() { } - [+s]() { } - static [""]() { } -@@ -43,9 +48,10 @@ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9034 computedPropertyNames13_ES6.ts:11:5: Add a return type to the method - [a]() { } - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNames13_ES6.ts:12:5: Add a return type to the method - static [true]() { } - [`hello bye`]() { } - ~~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES5.d.ts.diff deleted file mode 100644 index 167f5bbf55397..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES5.d.ts.diff +++ /dev/null @@ -1,56 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,19 +2,21 @@ - - //// [computedPropertyNames14_ES5.d.ts] - declare var b: boolean; - declare class C { -+ [b](): invalid; -+ [undefined](): invalid; - } - - /// [Errors] //// - - computedPropertyNames14_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames14_ES5.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames14_ES5.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames14_ES5.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames14_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames14_ES5.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames14_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames14_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames14_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames14_ES5.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - - ==== computedPropertyNames14_ES5.ts (8 errors) ==== -@@ -23,9 +25,10 @@ - [b]() {} - ~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNames14_ES5.ts:3:5: Add a return type to the method - static [true]() { } - ~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [[]]() { } -@@ -37,9 +40,10 @@ - [undefined]() { } - ~~~~~~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNames14_ES5.ts:7:5: Add a return type to the method - static [null]() { } - ~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES6.d.ts.diff deleted file mode 100644 index 47550ec130f24..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames14_ES6.d.ts.diff +++ /dev/null @@ -1,56 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,19 +2,21 @@ - - //// [computedPropertyNames14_ES6.d.ts] - declare var b: boolean; - declare class C { -+ [b](): invalid; -+ [undefined](): invalid; - } - - /// [Errors] //// - - computedPropertyNames14_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames14_ES6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames14_ES6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames14_ES6.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames14_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames14_ES6.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames14_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames14_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames14_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames14_ES6.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - - ==== computedPropertyNames14_ES6.ts (8 errors) ==== -@@ -23,9 +25,10 @@ - [b]() {} - ~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNames14_ES6.ts:3:5: Add a return type to the method - static [true]() { } - ~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [[]]() { } -@@ -37,9 +40,10 @@ - [undefined]() { } - ~~~~~~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNames14_ES6.ts:7:5: Add a return type to the method - static [null]() { } - ~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES5.d.ts.diff deleted file mode 100644 index 20b3fc6fa819e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES5.d.ts.diff +++ /dev/null @@ -1,55 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,17 +4,20 @@ - declare var p1: number | string; - declare var p2: number | number[]; - declare var p3: string | boolean; - declare class C { -+ [p1](): invalid; -+ [p2](): invalid; -+ [p3](): invalid; - } - - /// [Errors] //// - --computedPropertyNames15_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames15_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames15_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames15_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames15_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames15_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames15_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames15_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - - ==== computedPropertyNames15_ES5.ts (5 errors) ==== - var p1: number | string; -@@ -22,16 +25,19 @@ - var p3: string | boolean; - class C { - [p1]() { } - ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNames15_ES5.ts:5:5: Add a return type to the method - [p2]() { } - ~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNames15_ES5.ts:6:5: Add a return type to the method - [p3]() { } - ~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNames15_ES5.ts:7:5: Add a return type to the method - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES6.d.ts.diff deleted file mode 100644 index 9289abad6a795..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames15_ES6.d.ts.diff +++ /dev/null @@ -1,55 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,17 +4,20 @@ - declare var p1: number | string; - declare var p2: number | number[]; - declare var p3: string | boolean; - declare class C { -+ [p1](): invalid; -+ [p2](): invalid; -+ [p3](): invalid; - } - - /// [Errors] //// - --computedPropertyNames15_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames15_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames15_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames15_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames15_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames15_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames15_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames15_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - - ==== computedPropertyNames15_ES6.ts (5 errors) ==== - var p1: number | string; -@@ -22,16 +25,19 @@ - var p3: string | boolean; - class C { - [p1]() { } - ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNames15_ES6.ts:5:5: Add a return type to the method - [p2]() { } - ~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNames15_ES6.ts:6:5: Add a return type to the method - [p3]() { } - ~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 computedPropertyNames15_ES6.ts:7:5: Add a return type to the method - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES5.d.ts.diff deleted file mode 100644 index 12da53db69b3c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES5.d.ts.diff +++ /dev/null @@ -1,56 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,19 +2,21 @@ - - //// [computedPropertyNames17_ES5.d.ts] - declare var b: boolean; - declare class C { -+ get [b](): invalid; -+ static get [undefined](): invalid; - } - - /// [Errors] //// - - computedPropertyNames17_ES5.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames17_ES5.ts(3,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames17_ES5.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames17_ES5.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames17_ES5.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames17_ES5.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames17_ES5.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames17_ES5.ts(7,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames17_ES5.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames17_ES5.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - - ==== computedPropertyNames17_ES5.ts (8 errors) ==== -@@ -23,9 +25,10 @@ - get [b]() { return 0;} - ~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ --!!! 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 computedPropertyNames17_ES5.ts:3:9: Add a return type to the get accessor declaration. - static set [true](v) { } - ~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - get [[]]() { return 0; } -@@ -37,9 +40,10 @@ - static get [undefined]() { return 0; } - ~~~~~~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~ --!!! 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 computedPropertyNames17_ES5.ts:7:16: Add a return type to the get accessor declaration. - set [null](v) { } - ~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES6.d.ts.diff deleted file mode 100644 index ffa8a258a533f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/computedPropertyNames17_ES6.d.ts.diff +++ /dev/null @@ -1,56 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,19 +2,21 @@ - - //// [computedPropertyNames17_ES6.d.ts] - declare var b: boolean; - declare class C { -+ get [b](): invalid; -+ static get [undefined](): invalid; - } - - /// [Errors] //// - - computedPropertyNames17_ES6.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames17_ES6.ts(3,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames17_ES6.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames17_ES6.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames17_ES6.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames17_ES6.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - computedPropertyNames17_ES6.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. --computedPropertyNames17_ES6.ts(7,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+computedPropertyNames17_ES6.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - computedPropertyNames17_ES6.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - - ==== computedPropertyNames17_ES6.ts (8 errors) ==== -@@ -23,9 +25,10 @@ - get [b]() { return 0;} - ~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ --!!! 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 computedPropertyNames17_ES6.ts:3:9: Add a return type to the get accessor declaration. - static set [true](v) { } - ~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - get [[]]() { return 0; } -@@ -37,9 +40,10 @@ - static get [undefined]() { return 0; } - ~~~~~~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~ --!!! 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 computedPropertyNames17_ES6.ts:7:16: Add a return type to the get accessor declaration. - set [null](v) { } - ~~~~~~ - !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitBindingPatternWithReservedWord.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitBindingPatternWithReservedWord.d.ts.diff new file mode 100644 index 0000000000000..d57a1fb92e008 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitBindingPatternWithReservedWord.d.ts.diff @@ -0,0 +1,15 @@ +// [[Reason: #56992 Type printer preserves binding element aliases.]] //// + +//// [tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts] //// + +=================================================================== +--- TSC declarations ++++ DTE declarations +@@ -9,6 +9,6 @@ + default: ConvertLocaleConfig; + config?: LocaleConfig | undefined; + name?: string; + } +-export declare const getLocales: ({ app, name, default: defaultLocalesConfig, config: userLocalesConfig, }: GetLocalesOptions) => ConvertLocaleConfig; ++export declare const getLocales: ({ app, name, default: defaultLocalesConfig, config, }: GetLocalesOptions) => ConvertLocaleConfig; + export {}; diff --git a/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers.d.ts.diff deleted file mode 100644 index 30fb1652a3fe2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers.d.ts.diff +++ /dev/null @@ -1,49 +0,0 @@ -// [[Reason: TS normalizes types]] //// - -//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -10,37 +10,27 @@ - }; - declare class Base { - protected a: typeof x; - protected b(a: typeof x): invalid; -- protected get c(): { -- foo: string; -- }; -+ protected get c(): typeof x; - protected set c(v: typeof x); - protected d: (a: typeof x) => void; - protected static r: typeof x; - protected static s(a: typeof x): invalid; -- protected static get t(): { -- foo: string; -- }; -+ protected static get t(): typeof x; - protected static set t(v: typeof x); - protected static u: (a: typeof x) => void; - constructor(a: typeof x); - } - declare class Derived extends Base { - protected a: typeof y; - protected b(a: typeof y): invalid; -- protected get c(): { -- foo: string; -- bar: string; -- }; -+ protected get c(): typeof y; - protected set c(v: typeof y); - protected d: (a: typeof y) => void; - protected static r: typeof y; - protected static s(a: typeof y): invalid; -- protected static get t(): { -- foo: string; -- bar: string; -- }; -+ protected static get t(): typeof y; - protected static set t(a: typeof y); - protected static u: (a: typeof y) => void; - constructor(a: typeof y); - } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers2.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers2.d.ts.diff deleted file mode 100644 index 4e9c3c75e9ef9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers2.d.ts.diff +++ /dev/null @@ -1,49 +0,0 @@ -// [[Reason: TS normalizes types]] //// - -//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers2.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -10,37 +10,27 @@ - }; - declare class Base { - protected a: typeof x; - protected b(a: typeof x): invalid; -- protected get c(): { -- foo: string; -- }; -+ protected get c(): typeof x; - protected set c(v: typeof x); - protected d: (a: typeof x) => void; - protected static r: typeof x; - protected static s(a: typeof x): invalid; -- protected static get t(): { -- foo: string; -- }; -+ protected static get t(): typeof x; - protected static set t(v: typeof x); - protected static u: (a: typeof x) => void; - constructor(a: typeof x); - } - declare class Derived extends Base { - a: typeof y; - b(a: typeof y): invalid; -- get c(): { -- foo: string; -- bar: string; -- }; -+ get c(): typeof y; - set c(v: typeof y); - d: (a: typeof y) => void; - static r: typeof y; - static s(a: typeof y): invalid; -- static get t(): { -- foo: string; -- bar: string; -- }; -+ static get t(): typeof y; - static set t(a: typeof y); - static u: (a: typeof y) => void; - constructor(a: typeof y); - } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers3.d.ts.diff deleted file mode 100644 index 6fcf1cd993d3a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesProtectedMembers3.d.ts.diff +++ /dev/null @@ -1,28 +0,0 @@ -// [[Reason: TS normalizes types]] //// - -//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -10,18 +10,14 @@ - }; - declare class Base { - a: typeof x; - b(a: typeof x): invalid; -- get c(): { -- foo: string; -- }; -+ get c(): typeof x; - set c(v: typeof x); - d: (a: typeof x) => void; - static r: typeof x; - static s(a: typeof x): invalid; -- static get t(): { -- foo: string; -- }; -+ static get t(): typeof x; - static set t(v: typeof x); - static u: (a: typeof x) => void; - constructor(a: typeof x); - } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesPublicMembers.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesPublicMembers.d.ts.diff deleted file mode 100644 index 54faeef4a9bd8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/derivedClassOverridesPublicMembers.d.ts.diff +++ /dev/null @@ -1,49 +0,0 @@ -// [[Reason: TS normalizes types]] //// - -//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -10,37 +10,27 @@ - }; - declare class Base { - a: typeof x; - b(a: typeof x): invalid; -- get c(): { -- foo: string; -- }; -+ get c(): typeof x; - set c(v: typeof x); - d: (a: typeof x) => void; - static r: typeof x; - static s(a: typeof x): invalid; -- static get t(): { -- foo: string; -- }; -+ static get t(): typeof x; - static set t(v: typeof x); - static u: (a: typeof x) => void; - constructor(a: typeof x); - } - declare class Derived extends Base { - a: typeof y; - b(a: typeof y): invalid; -- get c(): { -- foo: string; -- bar: string; -- }; -+ get c(): typeof y; - set c(v: typeof y); - d: (a: typeof y) => void; - static r: typeof y; - static s(a: typeof y): invalid; -- static get t(): { -- foo: string; -- bar: string; -- }; -+ static get t(): typeof y; - static set t(a: typeof y); - static u: (a: typeof y) => void; - constructor(a: typeof y); - } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts.diff deleted file mode 100644 index f3b68a579b342..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts.diff +++ /dev/null @@ -1,56 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -21,9 +21,8 @@ - modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(16,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. - modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(17,5): error TS2339: Property 'name' does not exist on type '() => void'. - modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(20,6): error TS2550: Property 'sign' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. - modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. --modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(29,18): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. - modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,13): error TS2304: Cannot find name 'Proxy'. -@@ -33,13 +32,12 @@ - modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(44,5): error TS2550: Property 'includes' does not exist on type 'string'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. - modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. - modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. --modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - --==== modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts (22 errors) ==== -+==== modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts (20 errors) ==== - // All will be error from using ES6 features but only include ES5 library - // Using Es6 array - function f(x: number, y: number, z: number) { - ~ -@@ -84,11 +82,8 @@ - ~~~~~~~~~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:23:5: Add a type annotation to the variable o. - !!! related TS9034 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:25:5: Add a return type to the method -- ~~~~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:23:5: Add a type annotation to the variable o. - ~~~~~~ - !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - return false; - } -@@ -140,11 +135,8 @@ - ~~~~~~~~~~~~~~~~~~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:50:7: Add a type annotation to the variable o1. - !!! related TS9034 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:51:5: Add a return type to the method -- ~~~~~~~~~~~~~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:50:7: Add a type annotation to the variable o1. - ~~~~~~ - !!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - return false; - } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName11.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName11.d.ts.diff deleted file mode 100644 index 875983ca6cfa6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName11.d.ts.diff +++ /dev/null @@ -1,35 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,20 +1,25 @@ - - - //// [parserComputedPropertyName11.d.ts] - declare class C { -+ [e](): invalid; - } - - /// [Errors] //// - - parserComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -+parserComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - parserComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName11.ts (2 errors) ==== -+==== parserComputedPropertyName11.ts (3 errors) ==== - class C { - [e](); - ~~~ - !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -+ ~~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 parserComputedPropertyName11.ts:2:4: Add a return type to the method - ~ - !!! error TS2304: Cannot find name 'e'. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName12.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName12.d.ts.diff deleted file mode 100644 index 06e9ef63fe49d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName12.d.ts.diff +++ /dev/null @@ -1,32 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,17 +1,22 @@ - - - //// [parserComputedPropertyName12.d.ts] - declare class C { -+ [e](): invalid; - } - - /// [Errors] //// - -+parserComputedPropertyName12.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - parserComputedPropertyName12.ts(2,5): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName12.ts (1 errors) ==== -+==== parserComputedPropertyName12.ts (2 errors) ==== - class C { - [e]() { } -+ ~~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 parserComputedPropertyName12.ts:2:4: Add a return type to the method - ~ - !!! error TS2304: Cannot find name 'e'. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName17.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName17.d.ts.diff deleted file mode 100644 index 2bfd9d984f24d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName17.d.ts.diff +++ /dev/null @@ -1,27 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -4,18 +4,14 @@ - declare var v: invalid; - - /// [Errors] //// - --parserComputedPropertyName17.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - parserComputedPropertyName17.ts(1,16): error TS2304: Cannot find name 'e'. - parserComputedPropertyName17.ts(1,19): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - --==== parserComputedPropertyName17.ts (3 errors) ==== -+==== parserComputedPropertyName17.ts (2 errors) ==== - var v = { set [e](v) { } } -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 parserComputedPropertyName17.ts:1:5: Add a type annotation to the variable v. - ~ - !!! error TS2304: Cannot find name 'e'. - ~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName3.d.ts.diff deleted file mode 100644 index 10162151c841d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName3.d.ts.diff +++ /dev/null @@ -1,29 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -5,19 +5,15 @@ - - /// [Errors] //// - - parserComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. --parserComputedPropertyName3.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - parserComputedPropertyName3.ts(1,12): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName3.ts (3 errors) ==== -+==== parserComputedPropertyName3.ts (2 errors) ==== - var v = { [e]() { } }; - ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9027 parserComputedPropertyName3.ts:1:5: Add a type annotation to the variable v. - !!! related TS9034 parserComputedPropertyName3.ts:1:11: Add a return type to the method -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 parserComputedPropertyName3.ts:1:5: Add a type annotation to the variable v. - ~ - !!! error TS2304: Cannot find name 'e'. -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName38.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName38.d.ts.diff deleted file mode 100644 index bb7547c74d659..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName38.d.ts.diff +++ /dev/null @@ -1,33 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,19 +1,24 @@ - - - //// [parserComputedPropertyName38.d.ts] - declare class C { -+ [public](): invalid; - } - - /// [Errors] //// - -+parserComputedPropertyName38.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - parserComputedPropertyName38.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. - parserComputedPropertyName38.ts(2,6): error TS2304: Cannot find name 'public'. - - --==== parserComputedPropertyName38.ts (2 errors) ==== -+==== parserComputedPropertyName38.ts (3 errors) ==== - class C { - [public]() { } -+ ~~~~~~~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 parserComputedPropertyName38.ts:2:5: Add a return type to the method - ~~~~~~ - !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. - ~~~~~~ - !!! error TS2304: Cannot find name 'public'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName39.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName39.d.ts.diff deleted file mode 100644 index a949192d3267d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName39.d.ts.diff +++ /dev/null @@ -1,34 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,20 +1,25 @@ - - - //// [parserComputedPropertyName39.d.ts] - declare class C { -+ [public](): invalid; - } - - /// [Errors] //// - -+parserComputedPropertyName39.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - parserComputedPropertyName39.ts(3,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. - parserComputedPropertyName39.ts(3,6): error TS2304: Cannot find name 'public'. - - --==== parserComputedPropertyName39.ts (2 errors) ==== -+==== parserComputedPropertyName39.ts (3 errors) ==== - "use strict"; - class C { - [public]() { } -+ ~~~~~~~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 parserComputedPropertyName39.ts:3:5: Add a return type to the method - ~~~~~~ - !!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. - ~~~~~~ - !!! error TS2304: Cannot find name 'public'. diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName4.d.ts.diff deleted file mode 100644 index 630706bf1d1b4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName4.d.ts.diff +++ /dev/null @@ -1,30 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -6,20 +6,16 @@ - /// [Errors] //// - - parserComputedPropertyName4.ts(1,15): error TS2378: A 'get' accessor must return a value. - parserComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. --parserComputedPropertyName4.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - parserComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName4.ts (4 errors) ==== -+==== parserComputedPropertyName4.ts (3 errors) ==== - var v = { get [e]() { } }; - ~~~ - !!! error TS2378: A 'get' accessor must return a value. - ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9032 parserComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 parserComputedPropertyName4.ts:1:5: Add a type annotation to the variable v. - ~ - !!! error TS2304: Cannot find name 'e'. -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName5.d.ts.diff deleted file mode 100644 index 80176bc52e05b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName5.d.ts.diff +++ /dev/null @@ -1,32 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -7,22 +7,18 @@ - - parserComputedPropertyName5.ts(1,11): error TS1042: 'public' modifier cannot be used here. - parserComputedPropertyName5.ts(1,22): error TS2378: A 'get' accessor must return a value. - parserComputedPropertyName5.ts(1,22): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. --parserComputedPropertyName5.ts(1,22): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - parserComputedPropertyName5.ts(1,23): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName5.ts (5 errors) ==== -+==== parserComputedPropertyName5.ts (4 errors) ==== - var v = { public get [e]() { } }; - ~~~~~~ - !!! error TS1042: 'public' modifier cannot be used here. - ~~~ - !!! error TS2378: A 'get' accessor must return a value. - ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9032 parserComputedPropertyName5.ts:1:22: Add a return type to the get accessor declaration. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 parserComputedPropertyName5.ts:1:5: Add a type annotation to the variable v. - ~ - !!! error TS2304: Cannot find name 'e'. -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName7.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName7.d.ts.diff deleted file mode 100644 index 98522b2a07098..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName7.d.ts.diff +++ /dev/null @@ -1,35 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,20 +1,25 @@ - - - //// [parserComputedPropertyName7.d.ts] - declare class C { -+ [e]: invalid; - } - - /// [Errors] //// - - parserComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+parserComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. - parserComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName7.ts (2 errors) ==== -+==== parserComputedPropertyName7.ts (3 errors) ==== - class C { - [e] - ~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+ ~~~ -+!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -+!!! related TS9029 parserComputedPropertyName7.ts:2:4: Add a type annotation to the property [e]. - ~ - !!! error TS2304: Cannot find name 'e'. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName8.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName8.d.ts.diff deleted file mode 100644 index 8a80206e061f2..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserComputedPropertyName8.d.ts.diff +++ /dev/null @@ -1,35 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,20 +1,25 @@ - - - //// [parserComputedPropertyName8.d.ts] - declare class C { -+ [e]: invalid; - } - - /// [Errors] //// - - parserComputedPropertyName8.ts(2,11): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+parserComputedPropertyName8.ts(2,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. - parserComputedPropertyName8.ts(2,12): error TS2304: Cannot find name 'e'. - - --==== parserComputedPropertyName8.ts (2 errors) ==== -+==== parserComputedPropertyName8.ts (3 errors) ==== - class C { - public [e] - ~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+ ~~~ -+!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -+!!! related TS9029 parserComputedPropertyName8.ts:2:11: Add a type annotation to the property [e]. - ~ - !!! error TS2304: Cannot find name 'e'. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName11.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName11.d.ts.diff deleted file mode 100644 index a145bbe0eb1a1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName11.d.ts.diff +++ /dev/null @@ -1,35 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,20 +1,25 @@ - - - //// [parserES5ComputedPropertyName11.d.ts] - declare class C { -+ [e](): invalid; - } - - /// [Errors] //// - - parserES5ComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -+parserES5ComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - parserES5ComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. - - --==== parserES5ComputedPropertyName11.ts (2 errors) ==== -+==== parserES5ComputedPropertyName11.ts (3 errors) ==== - class C { - [e](); - ~~~ - !!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -+ ~~~ -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 parserES5ComputedPropertyName11.ts:2:4: Add a return type to the method - ~ - !!! error TS2304: Cannot find name 'e'. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName3.d.ts.diff deleted file mode 100644 index b44380399a64d..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName3.d.ts.diff +++ /dev/null @@ -1,29 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -5,19 +5,15 @@ - - /// [Errors] //// - - parserES5ComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. --parserES5ComputedPropertyName3.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - parserES5ComputedPropertyName3.ts(1,12): error TS2304: Cannot find name 'e'. - - --==== parserES5ComputedPropertyName3.ts (3 errors) ==== -+==== parserES5ComputedPropertyName3.ts (2 errors) ==== - var v = { [e]() { } }; - ~~~ - !!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9027 parserES5ComputedPropertyName3.ts:1:5: Add a type annotation to the variable v. - !!! related TS9034 parserES5ComputedPropertyName3.ts:1:11: Add a return type to the method -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 parserES5ComputedPropertyName3.ts:1:5: Add a type annotation to the variable v. - ~ - !!! error TS2304: Cannot find name 'e'. -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName4.d.ts.diff deleted file mode 100644 index 11615b3501a5c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName4.d.ts.diff +++ /dev/null @@ -1,30 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -6,20 +6,16 @@ - /// [Errors] //// - - parserES5ComputedPropertyName4.ts(1,15): error TS2378: A 'get' accessor must return a value. - parserES5ComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. --parserES5ComputedPropertyName4.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - parserES5ComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. - - --==== parserES5ComputedPropertyName4.ts (4 errors) ==== -+==== parserES5ComputedPropertyName4.ts (3 errors) ==== - var v = { get [e]() { } }; - ~~~ - !!! error TS2378: A 'get' accessor must return a value. - ~~~ - !!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - !!! related TS9032 parserES5ComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration. -- ~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --!!! related TS9027 parserES5ComputedPropertyName4.ts:1:5: Add a type annotation to the variable v. - ~ - !!! error TS2304: Cannot find name 'e'. -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName7.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName7.d.ts.diff deleted file mode 100644 index 37f7abd37d8d8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/parserES5ComputedPropertyName7.d.ts.diff +++ /dev/null @@ -1,35 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,20 +1,25 @@ - - - //// [parserES5ComputedPropertyName7.d.ts] - declare class C { -+ [e]: invalid; - } - - /// [Errors] //// - - parserES5ComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+parserES5ComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. - parserES5ComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. - - --==== parserES5ComputedPropertyName7.ts (2 errors) ==== -+==== parserES5ComputedPropertyName7.ts (3 errors) ==== - class C { - [e] - ~~~ - !!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -+ ~~~ -+!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -+!!! related TS9029 parserES5ComputedPropertyName7.ts:2:4: Add a type annotation to the property [e]. - ~ - !!! error TS2304: Cannot find name 'e'. - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess1.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess1.d.ts.diff deleted file mode 100644 index bf930ae2a313e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess1.d.ts.diff +++ /dev/null @@ -1,51 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess1.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,17 +2,19 @@ - - //// [superSymbolIndexedAccess1.d.ts] - declare var symbol: invalid; - declare class Foo { -+ [symbol](): invalid; - } - declare class Bar extends Foo { -+ [symbol](): invalid; - } - - /// [Errors] //// - - superSymbolIndexedAccess1.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. --superSymbolIndexedAccess1.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --superSymbolIndexedAccess1.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+superSymbolIndexedAccess1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+superSymbolIndexedAccess1.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - - ==== superSymbolIndexedAccess1.ts (3 errors) ==== - var symbol = Symbol.for('myThing'); -@@ -22,16 +24,18 @@ - - class Foo { - [symbol]() { - ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 superSymbolIndexedAccess1.ts:4:5: Add a return type to the method - return 0; - } - } - - class Bar extends Foo { - [symbol]() { - ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 superSymbolIndexedAccess1.ts:10:5: Add a return type to the method - return super[symbol](); - } - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess3.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess3.d.ts.diff deleted file mode 100644 index b08fa5221b8e9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess3.d.ts.diff +++ /dev/null @@ -1,51 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess3.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,17 +2,19 @@ - - //// [superSymbolIndexedAccess3.d.ts] - declare var symbol: invalid; - declare class Foo { -+ [symbol](): invalid; - } - declare class Bar extends Foo { -+ [symbol](): invalid; - } - - /// [Errors] //// - - superSymbolIndexedAccess3.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. --superSymbolIndexedAccess3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --superSymbolIndexedAccess3.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+superSymbolIndexedAccess3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+superSymbolIndexedAccess3.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - superSymbolIndexedAccess3.ts(11,22): error TS2538: Type 'typeof Bar' cannot be used as an index type. - - - ==== superSymbolIndexedAccess3.ts (4 errors) ==== -@@ -23,17 +25,19 @@ - - class Foo { - [symbol]() { - ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 superSymbolIndexedAccess3.ts:4:5: Add a return type to the method - return 0; - } - } - - class Bar extends Foo { - [symbol]() { - ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 superSymbolIndexedAccess3.ts:10:5: Add a return type to the method - return super[Bar](); - ~~~ - !!! error TS2538: Type 'typeof Bar' cannot be used as an index type. - } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess4.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess4.d.ts.diff deleted file mode 100644 index 8ddf472a8f403..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess4.d.ts.diff +++ /dev/null @@ -1,36 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess4.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,14 +2,15 @@ - - //// [superSymbolIndexedAccess4.d.ts] - declare var symbol: invalid; - declare class Bar { -+ [symbol](): invalid; - } - - /// [Errors] //// - - superSymbolIndexedAccess4.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. --superSymbolIndexedAccess4.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+superSymbolIndexedAccess4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - superSymbolIndexedAccess4.ts(5,16): error TS2335: 'super' can only be referenced in a derived class. - - - ==== superSymbolIndexedAccess4.ts (3 errors) ==== -@@ -20,9 +21,10 @@ - - class Bar { - [symbol]() { - ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 superSymbolIndexedAccess4.ts:4:5: Add a return type to the method - return super[symbol](); - ~~~~~ - !!! error TS2335: 'super' can only be referenced in a derived class. - } diff --git a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess5.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess5.d.ts.diff deleted file mode 100644 index f9c8156c1c8f4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess5.d.ts.diff +++ /dev/null @@ -1,49 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess5.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,32 +2,36 @@ - - //// [superSymbolIndexedAccess5.d.ts] - declare var symbol: any; - declare class Foo { -+ [symbol](): invalid; - } - declare class Bar extends Foo { -+ [symbol](): invalid; - } - - /// [Errors] //// - --superSymbolIndexedAccess5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --superSymbolIndexedAccess5.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+superSymbolIndexedAccess5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+superSymbolIndexedAccess5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - - ==== superSymbolIndexedAccess5.ts (2 errors) ==== - var symbol: any; - - class Foo { - [symbol]() { - ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 superSymbolIndexedAccess5.ts:4:5: Add a return type to the method - return 0; - } - } - - class Bar extends Foo { - [symbol]() { - ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 superSymbolIndexedAccess5.ts:10:5: Add a return type to the method - return super[symbol](); - } - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess6.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess6.d.ts.diff deleted file mode 100644 index 6c82147022f60..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/superSymbolIndexedAccess6.d.ts.diff +++ /dev/null @@ -1,49 +0,0 @@ -// [[Reason: Invalid computed property can only be detected by TSC]] //// - -//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess6.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -2,32 +2,36 @@ - - //// [superSymbolIndexedAccess6.d.ts] - declare var symbol: any; - declare class Foo { -+ static [symbol](): invalid; - } - declare class Bar extends Foo { -+ static [symbol](): invalid; - } - - /// [Errors] //// - --superSymbolIndexedAccess6.ts(4,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. --superSymbolIndexedAccess6.ts(10,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+superSymbolIndexedAccess6.ts(4,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+superSymbolIndexedAccess6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - - ==== superSymbolIndexedAccess6.ts (2 errors) ==== - var symbol: any; - - class Foo { - static [symbol]() { - ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 superSymbolIndexedAccess6.ts:4:12: Add a return type to the method - return 0; - } - } - - class Bar extends Foo { - static [symbol]() { - ~~~~~~~~ --!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 superSymbolIndexedAccess6.ts:10:12: Add a return type to the method - return super[symbol](); - } - } -\ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5For-ofTypeCheck10.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5For-ofTypeCheck10.d.ts deleted file mode 100644 index 6c8b74754beea..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/ES5For-ofTypeCheck10.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts] //// - -//// [ES5For-ofTypeCheck10.ts] -// In ES3/5, you cannot for...of over an arbitrary iterable. -class StringIterator { - next() { - return { - done: true, - value: "" - }; - } - [Symbol.iterator]() { - return this; - } -} - -for (var v of new StringIterator) { } - -/// [Declarations] //// - - - -//// [ES5For-ofTypeCheck10.d.ts] -declare class StringIterator { - next(): invalid; - [Symbol.iterator](): invalid; -} - -/// [Errors] //// - -ES5For-ofTypeCheck10.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -ES5For-ofTypeCheck10.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -ES5For-ofTypeCheck10.ts(9,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an array type or a string type. - - -==== ES5For-ofTypeCheck10.ts (4 errors) ==== - // In ES3/5, you cannot for...of over an arbitrary iterable. - class StringIterator { - next() { - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 ES5For-ofTypeCheck10.ts:3:5: Add a return type to the method - return { - done: true, - value: "" - }; - } - [Symbol.iterator]() { - ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 ES5For-ofTypeCheck10.ts:9:5: Add a return type to the method - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - return this; - } - } - - for (var v of new StringIterator) { } - ~~~~~~~~~~~~~~~~~~ -!!! error TS2495: Type 'StringIterator' is not an array type or a string type. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty2.d.ts deleted file mode 100644 index 6c9109ffddbfb..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty2.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -//// [tests/cases/conformance/Symbols/ES5SymbolProperty2.ts] //// - -//// [ES5SymbolProperty2.ts] -module M { - var Symbol: any; - - export class C { - [Symbol.iterator]() { } - } - (new C)[Symbol.iterator]; -} - -(new M.C)[Symbol.iterator]; - -/// [Declarations] //// - - - -//// [ES5SymbolProperty2.d.ts] -declare namespace M { - var Symbol: any; - export class C { - [Symbol.iterator](): invalid; - } - export {}; -} - -/// [Errors] //// - -ES5SymbolProperty2.ts(5,9): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -ES5SymbolProperty2.ts(10,11): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== ES5SymbolProperty2.ts (2 errors) ==== - module M { - var Symbol: any; - - export class C { - [Symbol.iterator]() { } - ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 ES5SymbolProperty2.ts:5:9: Add a return type to the method - } - (new C)[Symbol.iterator]; - } - - (new M.C)[Symbol.iterator]; - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty3.d.ts deleted file mode 100644 index 803a307c8c48a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty3.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -//// [tests/cases/conformance/Symbols/ES5SymbolProperty3.ts] //// - -//// [ES5SymbolProperty3.ts] -var Symbol: any; - -class C { - [Symbol.iterator]() { } -} - -(new C)[Symbol.iterator] - -/// [Declarations] //// - - - -//// [ES5SymbolProperty3.d.ts] -declare var Symbol: any; -declare class C { - [Symbol.iterator](): invalid; -} - -/// [Errors] //// - -ES5SymbolProperty3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== ES5SymbolProperty3.ts (1 errors) ==== - var Symbol: any; - - class C { - [Symbol.iterator]() { } - ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 ES5SymbolProperty3.ts:4:5: Add a return type to the method - } - - (new C)[Symbol.iterator] \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty4.d.ts deleted file mode 100644 index b79e8398172b0..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty4.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -//// [tests/cases/conformance/Symbols/ES5SymbolProperty4.ts] //// - -//// [ES5SymbolProperty4.ts] -var Symbol: { iterator: string }; - -class C { - [Symbol.iterator]() { } -} - -(new C)[Symbol.iterator] - -/// [Declarations] //// - - - -//// [ES5SymbolProperty4.d.ts] -declare var Symbol: { - iterator: string; -}; -declare class C { - [Symbol.iterator](): invalid; -} - -/// [Errors] //// - -ES5SymbolProperty4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== ES5SymbolProperty4.ts (1 errors) ==== - var Symbol: { iterator: string }; - - class C { - [Symbol.iterator]() { } - ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 ES5SymbolProperty4.ts:4:5: Add a return type to the method - } - - (new C)[Symbol.iterator] \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty5.d.ts deleted file mode 100644 index 2a16f64f09fe4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty5.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -//// [tests/cases/conformance/Symbols/ES5SymbolProperty5.ts] //// - -//// [ES5SymbolProperty5.ts] -var Symbol: { iterator: symbol }; - -class C { - [Symbol.iterator]() { } -} - -(new C)[Symbol.iterator](0) // Should error - -/// [Declarations] //// - - - -//// [ES5SymbolProperty5.d.ts] -declare var Symbol: { - iterator: symbol; -}; -declare class C { - [Symbol.iterator](): invalid; -} - -/// [Errors] //// - -ES5SymbolProperty5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== ES5SymbolProperty5.ts (1 errors) ==== - var Symbol: { iterator: symbol }; - - class C { - [Symbol.iterator]() { } - ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 ES5SymbolProperty5.ts:4:5: Add a return type to the method - } - - (new C)[Symbol.iterator](0) // Should error \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty6.d.ts deleted file mode 100644 index 3f883282c2593..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty6.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -//// [tests/cases/conformance/Symbols/ES5SymbolProperty6.ts] //// - -//// [ES5SymbolProperty6.ts] -class C { - [Symbol.iterator]() { } -} - -(new C)[Symbol.iterator] - -/// [Declarations] //// - - - -//// [ES5SymbolProperty6.d.ts] -declare class C { - [Symbol.iterator](): invalid; -} - -/// [Errors] //// - -ES5SymbolProperty6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -ES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -ES5SymbolProperty6.ts(5,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== ES5SymbolProperty6.ts (3 errors) ==== - class C { - [Symbol.iterator]() { } - ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 ES5SymbolProperty6.ts:2:5: Add a return type to the method - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } - - (new C)[Symbol.iterator] - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty7.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty7.d.ts deleted file mode 100644 index 9dfcb91af6fc7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/ES5SymbolProperty7.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -//// [tests/cases/conformance/Symbols/ES5SymbolProperty7.ts] //// - -//// [ES5SymbolProperty7.ts] -var Symbol: { iterator: any }; - -class C { - [Symbol.iterator]() { } -} - -(new C)[Symbol.iterator] - -/// [Declarations] //// - - - -//// [ES5SymbolProperty7.d.ts] -declare var Symbol: { - iterator: any; -}; -declare class C { - [Symbol.iterator](): invalid; -} - -/// [Errors] //// - -ES5SymbolProperty7.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== ES5SymbolProperty7.ts (1 errors) ==== - var Symbol: { iterator: any }; - - class C { - [Symbol.iterator]() { } - ~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 ES5SymbolProperty7.ts:4:5: Add a return type to the method - } - - (new C)[Symbol.iterator] \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/MemberFunctionDeclaration3_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/MemberFunctionDeclaration3_es6.d.ts deleted file mode 100644 index 768fa7756e3f5..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/MemberFunctionDeclaration3_es6.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts] //// - -//// [MemberFunctionDeclaration3_es6.ts] -class C { - *[foo]() { } -} - -/// [Declarations] //// - - - -//// [MemberFunctionDeclaration3_es6.d.ts] -declare class C { - [foo](): invalid; -} - -/// [Errors] //// - -MemberFunctionDeclaration3_es6.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -MemberFunctionDeclaration3_es6.ts(2,6): error TS2304: Cannot find name 'foo'. - - -==== MemberFunctionDeclaration3_es6.ts (2 errors) ==== - class C { - *[foo]() { } - ~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 MemberFunctionDeclaration3_es6.ts:2:5: Add a return type to the method - ~~~ -!!! error TS2304: Cannot find name 'foo'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES5.d.ts deleted file mode 100644 index bc992660d0637..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES5.d.ts +++ /dev/null @@ -1,126 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts] //// - -//// [computedPropertyNames10_ES5.ts] -var s: string; -var n: number; -var a: any; -var v = { - [s]() { }, - [n]() { }, - [s + s]() { }, - [s + n]() { }, - [+s]() { }, - [""]() { }, - [0]() { }, - [a]() { }, - [true]() { }, - [`hello bye`]() { }, - [`hello ${a} bye`]() { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames10_ES5.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare var v: invalid; - -/// [Errors] //// - -computedPropertyNames10_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames10_ES5.ts (16 errors) ==== - var s: string; - var n: number; - var a: any; - var v = { - [s]() { }, - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:5:5: Add a return type to the method - [n]() { }, - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:6:5: Add a return type to the method - [s + s]() { }, - ~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:7:5: Add a return type to the method - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. - [s + n]() { }, - ~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:8:5: Add a return type to the method - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. - [+s]() { }, - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:9:5: Add a return type to the method - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. - [""]() { }, - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:10:5: Add a return type to the method - [0]() { }, - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:11:5: Add a return type to the method - [a]() { }, - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:12:5: Add a return type to the method - [true]() { }, - ~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:13:5: Add a return type to the method - ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. - [`hello bye`]() { }, - ~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:14:5: Add a return type to the method - [`hello ${a} bye`]() { } - ~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:15:5: Add a return type to the method - ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES6.d.ts deleted file mode 100644 index b0da57a9d8058..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames10_ES6.d.ts +++ /dev/null @@ -1,126 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts] //// - -//// [computedPropertyNames10_ES6.ts] -var s: string; -var n: number; -var a: any; -var v = { - [s]() { }, - [n]() { }, - [s + s]() { }, - [s + n]() { }, - [+s]() { }, - [""]() { }, - [0]() { }, - [a]() { }, - [true]() { }, - [`hello bye`]() { }, - [`hello ${a} bye`]() { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames10_ES6.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare var v: invalid; - -/// [Errors] //// - -computedPropertyNames10_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames10_ES6.ts (16 errors) ==== - var s: string; - var n: number; - var a: any; - var v = { - [s]() { }, - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:5:5: Add a return type to the method - [n]() { }, - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:6:5: Add a return type to the method - [s + s]() { }, - ~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:7:5: Add a return type to the method - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. - [s + n]() { }, - ~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:8:5: Add a return type to the method - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. - [+s]() { }, - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:9:5: Add a return type to the method - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. - [""]() { }, - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:10:5: Add a return type to the method - [0]() { }, - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:11:5: Add a return type to the method - [a]() { }, - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:12:5: Add a return type to the method - [true]() { }, - ~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:13:5: Add a return type to the method - ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. - [`hello bye`]() { }, - ~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:14:5: Add a return type to the method - [`hello ${a} bye`]() { } - ~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:15:5: Add a return type to the method - ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES5.d.ts deleted file mode 100644 index 68407608fa1fc..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES5.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES5.ts] //// - -//// [computedPropertyNames11_ES5.ts] -var s: string; -var n: number; -var a: any; -var v = { - get [s]() { return 0; }, - set [n](v) { }, - get [s + s]() { return 0; }, - set [s + n](v) { }, - get [+s]() { return 0; }, - set [""](v) { }, - get [0]() { return 0; }, - set [a](v) { }, - get [true]() { return 0; }, - set [`hello bye`](v) { }, - get [`hello ${a} bye`]() { return 0; } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames11_ES5.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare var v: invalid; - -/// [Errors] //// - -computedPropertyNames11_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(8,17): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames11_ES5.ts (16 errors) ==== - var s: string; - var n: number; - var a: any; - var v = { - get [s]() { return 0; }, - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES5.ts:5:9: Add a return type to the get accessor declaration. - set [n](v) { }, - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames11_ES5.ts:6:9: Add a type to parameter of the set accessor declaration. - get [s + s]() { return 0; }, - ~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES5.ts:7:9: Add a return type to the get accessor declaration. - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. - set [s + n](v) { }, - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames11_ES5.ts:8:9: Add a type to parameter of the set accessor declaration. - get [+s]() { return 0; }, - ~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES5.ts:9:9: Add a return type to the get accessor declaration. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. - set [""](v) { }, - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames11_ES5.ts:10:9: Add a type to parameter of the set accessor declaration. - get [0]() { return 0; }, - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES5.ts:11:9: Add a return type to the get accessor declaration. - set [a](v) { }, - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames11_ES5.ts:12:9: Add a type to parameter of the set accessor declaration. - get [true]() { return 0; }, - ~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES5.ts:13:9: Add a return type to the get accessor declaration. - ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. - set [`hello bye`](v) { }, - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames11_ES5.ts:14:9: Add a type to parameter of the set accessor declaration. - get [`hello ${a} bye`]() { return 0; } - ~~~~~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES5.ts:15:9: Add a return type to the get accessor declaration. - ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES6.d.ts deleted file mode 100644 index d4c9f5eee362f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames11_ES6.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES6.ts] //// - -//// [computedPropertyNames11_ES6.ts] -var s: string; -var n: number; -var a: any; -var v = { - get [s]() { return 0; }, - set [n](v) { }, - get [s + s]() { return 0; }, - set [s + n](v) { }, - get [+s]() { return 0; }, - set [""](v) { }, - get [0]() { return 0; }, - set [a](v) { }, - get [true]() { return 0; }, - set [`hello bye`](v) { }, - get [`hello ${a} bye`]() { return 0; } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames11_ES6.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare var v: invalid; - -/// [Errors] //// - -computedPropertyNames11_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(8,17): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames11_ES6.ts (16 errors) ==== - var s: string; - var n: number; - var a: any; - var v = { - get [s]() { return 0; }, - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES6.ts:5:9: Add a return type to the get accessor declaration. - set [n](v) { }, - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames11_ES6.ts:6:9: Add a type to parameter of the set accessor declaration. - get [s + s]() { return 0; }, - ~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES6.ts:7:9: Add a return type to the get accessor declaration. - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. - set [s + n](v) { }, - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames11_ES6.ts:8:9: Add a type to parameter of the set accessor declaration. - get [+s]() { return 0; }, - ~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES6.ts:9:9: Add a return type to the get accessor declaration. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. - set [""](v) { }, - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames11_ES6.ts:10:9: Add a type to parameter of the set accessor declaration. - get [0]() { return 0; }, - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES6.ts:11:9: Add a return type to the get accessor declaration. - set [a](v) { }, - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames11_ES6.ts:12:9: Add a type to parameter of the set accessor declaration. - get [true]() { return 0; }, - ~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES6.ts:13:9: Add a return type to the get accessor declaration. - ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. - set [`hello bye`](v) { }, - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames11_ES6.ts:14:9: Add a type to parameter of the set accessor declaration. - get [`hello ${a} bye`]() { return 0; } - ~~~~~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES6.ts:15:9: Add a return type to the get accessor declaration. - ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES5.d.ts deleted file mode 100644 index 6da7ec2b14be4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES5.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES5.ts] //// - -//// [computedPropertyNames13_ES5.ts] -var s: string; -var n: number; -var a: any; -class C { - [s]() {} - [n]() { } - static [s + s]() { } - [s + n]() { } - [+s]() { } - static [""]() { } - [0]() { } - [a]() { } - static [true]() { } - [`hello bye`]() { } - static [`hello ${a} bye`]() { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames13_ES5.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare class C { - [s](): invalid; - [n](): invalid; - static [""](): invalid; - [0](): invalid; - [a](): invalid; - [`hello bye`](): invalid; -} - -/// [Errors] //// - -computedPropertyNames13_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames13_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames13_ES5.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames13_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames13_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames13_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== computedPropertyNames13_ES5.ts (6 errors) ==== - var s: string; - var n: number; - var a: any; - class C { - [s]() {} - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames13_ES5.ts:5:5: Add a return type to the method - [n]() { } - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames13_ES5.ts:6:5: Add a return type to the method - static [s + s]() { } - [s + n]() { } - [+s]() { } - static [""]() { } - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames13_ES5.ts:10:12: Add a return type to the method - [0]() { } - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames13_ES5.ts:11:5: Add a return type to the method - [a]() { } - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames13_ES5.ts:12:5: Add a return type to the method - static [true]() { } - [`hello bye`]() { } - ~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames13_ES5.ts:14:5: Add a return type to the method - static [`hello ${a} bye`]() { } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES6.d.ts deleted file mode 100644 index 4309ecb583c50..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames13_ES6.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES6.ts] //// - -//// [computedPropertyNames13_ES6.ts] -var s: string; -var n: number; -var a: any; -class C { - [s]() {} - [n]() { } - static [s + s]() { } - [s + n]() { } - [+s]() { } - static [""]() { } - [0]() { } - [a]() { } - static [true]() { } - [`hello bye`]() { } - static [`hello ${a} bye`]() { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames13_ES6.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare class C { - [s](): invalid; - [n](): invalid; - static [""](): invalid; - [0](): invalid; - [a](): invalid; - [`hello bye`](): invalid; -} - -/// [Errors] //// - -computedPropertyNames13_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames13_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames13_ES6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames13_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames13_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames13_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== computedPropertyNames13_ES6.ts (6 errors) ==== - var s: string; - var n: number; - var a: any; - class C { - [s]() {} - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames13_ES6.ts:5:5: Add a return type to the method - [n]() { } - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames13_ES6.ts:6:5: Add a return type to the method - static [s + s]() { } - [s + n]() { } - [+s]() { } - static [""]() { } - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames13_ES6.ts:10:12: Add a return type to the method - [0]() { } - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames13_ES6.ts:11:5: Add a return type to the method - [a]() { } - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames13_ES6.ts:12:5: Add a return type to the method - static [true]() { } - [`hello bye`]() { } - ~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames13_ES6.ts:14:5: Add a return type to the method - static [`hello ${a} bye`]() { } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES5.d.ts deleted file mode 100644 index 418d8f3d62722..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES5.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES5.ts] //// - -//// [computedPropertyNames14_ES5.ts] -var b: boolean; -class C { - [b]() {} - static [true]() { } - [[]]() { } - static [{}]() { } - [undefined]() { } - static [null]() { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames14_ES5.d.ts] -declare var b: boolean; -declare class C { - [b](): invalid; - [undefined](): invalid; -} - -/// [Errors] //// - -computedPropertyNames14_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES5.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames14_ES5.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES5.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames14_ES5.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - -==== computedPropertyNames14_ES5.ts (8 errors) ==== - var b: boolean; - class C { - [b]() {} - ~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames14_ES5.ts:3:5: Add a return type to the method - static [true]() { } - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [[]]() { } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - static [{}]() { } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [undefined]() { } - ~~~~~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames14_ES5.ts:7:5: Add a return type to the method - static [null]() { } - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES6.d.ts deleted file mode 100644 index e384ee84cc3b1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames14_ES6.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES6.ts] //// - -//// [computedPropertyNames14_ES6.ts] -var b: boolean; -class C { - [b]() {} - static [true]() { } - [[]]() { } - static [{}]() { } - [undefined]() { } - static [null]() { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames14_ES6.d.ts] -declare var b: boolean; -declare class C { - [b](): invalid; - [undefined](): invalid; -} - -/// [Errors] //// - -computedPropertyNames14_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES6.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames14_ES6.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES6.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames14_ES6.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - -==== computedPropertyNames14_ES6.ts (8 errors) ==== - var b: boolean; - class C { - [b]() {} - ~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames14_ES6.ts:3:5: Add a return type to the method - static [true]() { } - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [[]]() { } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - static [{}]() { } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [undefined]() { } - ~~~~~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames14_ES6.ts:7:5: Add a return type to the method - static [null]() { } - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES5.d.ts deleted file mode 100644 index 683ef11cd2666..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES5.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts] //// - -//// [computedPropertyNames15_ES5.ts] -var p1: number | string; -var p2: number | number[]; -var p3: string | boolean; -class C { - [p1]() { } - [p2]() { } - [p3]() { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames15_ES5.d.ts] -declare var p1: number | string; -declare var p2: number | number[]; -declare var p3: string | boolean; -declare class C { - [p1](): invalid; - [p2](): invalid; - [p3](): invalid; -} - -/// [Errors] //// - -computedPropertyNames15_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames15_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames15_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames15_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames15_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== computedPropertyNames15_ES5.ts (5 errors) ==== - var p1: number | string; - var p2: number | number[]; - var p3: string | boolean; - class C { - [p1]() { } - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames15_ES5.ts:5:5: Add a return type to the method - [p2]() { } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames15_ES5.ts:6:5: Add a return type to the method - [p3]() { } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames15_ES5.ts:7:5: Add a return type to the method - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES6.d.ts deleted file mode 100644 index f29d4685bbd07..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames15_ES6.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES6.ts] //// - -//// [computedPropertyNames15_ES6.ts] -var p1: number | string; -var p2: number | number[]; -var p3: string | boolean; -class C { - [p1]() { } - [p2]() { } - [p3]() { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames15_ES6.d.ts] -declare var p1: number | string; -declare var p2: number | number[]; -declare var p3: string | boolean; -declare class C { - [p1](): invalid; - [p2](): invalid; - [p3](): invalid; -} - -/// [Errors] //// - -computedPropertyNames15_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames15_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames15_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames15_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames15_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== computedPropertyNames15_ES6.ts (5 errors) ==== - var p1: number | string; - var p2: number | number[]; - var p3: string | boolean; - class C { - [p1]() { } - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames15_ES6.ts:5:5: Add a return type to the method - [p2]() { } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames15_ES6.ts:6:5: Add a return type to the method - [p3]() { } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames15_ES6.ts:7:5: Add a return type to the method - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES5.d.ts deleted file mode 100644 index 597fc332b5357..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES5.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES5.ts] //// - -//// [computedPropertyNames17_ES5.ts] -var b: boolean; -class C { - get [b]() { return 0;} - static set [true](v) { } - get [[]]() { return 0; } - set [{}](v) { } - static get [undefined]() { return 0; } - set [null](v) { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames17_ES5.d.ts] -declare var b: boolean; -declare class C { - get [b](): invalid; - static get [undefined](): invalid; -} - -/// [Errors] //// - -computedPropertyNames17_ES5.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES5.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames17_ES5.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES5.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES5.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES5.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES5.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames17_ES5.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - -==== computedPropertyNames17_ES5.ts (8 errors) ==== - var b: boolean; - class C { - get [b]() { return 0;} - ~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames17_ES5.ts:3:9: Add a return type to the get accessor declaration. - static set [true](v) { } - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - get [[]]() { return 0; } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - set [{}](v) { } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - static get [undefined]() { return 0; } - ~~~~~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames17_ES5.ts:7:16: Add a return type to the get accessor declaration. - set [null](v) { } - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES6.d.ts deleted file mode 100644 index 641c287d9521f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/computedPropertyNames17_ES6.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts] //// - -//// [computedPropertyNames17_ES6.ts] -var b: boolean; -class C { - get [b]() { return 0;} - static set [true](v) { } - get [[]]() { return 0; } - set [{}](v) { } - static get [undefined]() { return 0; } - set [null](v) { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames17_ES6.d.ts] -declare var b: boolean; -declare class C { - get [b](): invalid; - static get [undefined](): invalid; -} - -/// [Errors] //// - -computedPropertyNames17_ES6.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES6.ts(3,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames17_ES6.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES6.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES6.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES6.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES6.ts(7,16): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames17_ES6.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - -==== computedPropertyNames17_ES6.ts (8 errors) ==== - var b: boolean; - class C { - get [b]() { return 0;} - ~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames17_ES6.ts:3:9: Add a return type to the get accessor declaration. - static set [true](v) { } - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - get [[]]() { return 0; } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - set [{}](v) { } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - static get [undefined]() { return 0; } - ~~~~~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames17_ES6.ts:7:16: Add a return type to the get accessor declaration. - set [null](v) { } - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitBindingPatternWithReservedWord.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitBindingPatternWithReservedWord.d.ts new file mode 100644 index 0000000000000..46b8b82ba5f76 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitBindingPatternWithReservedWord.d.ts @@ -0,0 +1,43 @@ +//// [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, }: GetLocalesOptions) => ConvertLocaleConfig; +export {}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers.d.ts deleted file mode 100644 index 95eee2448ee8a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers.d.ts +++ /dev/null @@ -1,134 +0,0 @@ -//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers.ts] //// - -//// [derivedClassOverridesProtectedMembers.ts] -var x: { foo: string; } -var y: { foo: string; bar: string; } - -class Base { - protected a: typeof x; - protected b(a: typeof x) { } - protected get c() { return x; } - protected set c(v: typeof x) { } - protected d: (a: typeof x) => void; - - protected static r: typeof x; - protected static s(a: typeof x) { } - protected static get t() { return x; } - protected static set t(v: typeof x) { } - protected static u: (a: typeof x) => void; - - constructor(a: typeof x) { } -} - -class Derived extends Base { - protected a: typeof y; - protected b(a: typeof y) { } - protected get c() { return y; } - protected set c(v: typeof y) { } - protected d: (a: typeof y) => void; - - protected static r: typeof y; - protected static s(a: typeof y) { } - protected static get t() { return y; } - protected static set t(a: typeof y) { } - protected static u: (a: typeof y) => void; - - constructor(a: typeof y) { super(x) } -} - - -/// [Declarations] //// - - - -//// [derivedClassOverridesProtectedMembers.d.ts] -declare var x: { - foo: string; -}; -declare var y: { - foo: string; - bar: string; -}; -declare class Base { - protected a: typeof x; - protected b(a: typeof x): invalid; - protected get c(): typeof x; - protected set c(v: typeof x); - protected d: (a: typeof x) => void; - protected static r: typeof x; - protected static s(a: typeof x): invalid; - protected static get t(): typeof x; - protected static set t(v: typeof x); - protected static u: (a: typeof x) => void; - constructor(a: typeof x); -} -declare class Derived extends Base { - protected a: typeof y; - protected b(a: typeof y): invalid; - protected get c(): typeof y; - protected set c(v: typeof y); - protected d: (a: typeof y) => void; - protected static r: typeof y; - protected static s(a: typeof y): invalid; - protected static get t(): typeof y; - protected static set t(a: typeof y); - protected static u: (a: typeof y) => void; - constructor(a: typeof y); -} - -/// [Errors] //// - -derivedClassOverridesProtectedMembers.ts(6,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers.ts(12,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers.ts(22,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers.ts(28,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== derivedClassOverridesProtectedMembers.ts (4 errors) ==== - var x: { foo: string; } - var y: { foo: string; bar: string; } - - class Base { - protected a: typeof x; - protected b(a: typeof x) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers.ts:6:15: Add a return type to the method - protected get c() { return x; } - protected set c(v: typeof x) { } - protected d: (a: typeof x) => void; - - protected static r: typeof x; - protected static s(a: typeof x) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers.ts:12:22: Add a return type to the method - protected static get t() { return x; } - protected static set t(v: typeof x) { } - protected static u: (a: typeof x) => void; - - constructor(a: typeof x) { } - } - - class Derived extends Base { - protected a: typeof y; - protected b(a: typeof y) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers.ts:22:15: Add a return type to the method - protected get c() { return y; } - protected set c(v: typeof y) { } - protected d: (a: typeof y) => void; - - protected static r: typeof y; - protected static s(a: typeof y) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers.ts:28:22: Add a return type to the method - protected static get t() { return y; } - protected static set t(a: typeof y) { } - protected static u: (a: typeof y) => void; - - constructor(a: typeof y) { super(x) } - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers2.d.ts deleted file mode 100644 index d31a394c92a5b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers2.d.ts +++ /dev/null @@ -1,250 +0,0 @@ -//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers2.ts] //// - -//// [derivedClassOverridesProtectedMembers2.ts] -var x: { foo: string; } -var y: { foo: string; bar: string; } - -class Base { - protected a: typeof x; - protected b(a: typeof x) { } - protected get c() { return x; } - protected set c(v: typeof x) { } - protected d: (a: typeof x) => void ; - - protected static r: typeof x; - protected static s(a: typeof x) { } - protected static get t() { return x; } - protected static set t(v: typeof x) { } - protected static u: (a: typeof x) => void ; - -constructor(a: typeof x) { } -} - -// Increase visibility of all protected members to public -class Derived extends Base { - a: typeof y; - b(a: typeof y) { } - get c() { return y; } - set c(v: typeof y) { } - d: (a: typeof y) => void; - - static r: typeof y; - static s(a: typeof y) { } - static get t() { return y; } - static set t(a: typeof y) { } - static u: (a: typeof y) => void; - - constructor(a: typeof y) { super(a); } -} - -var d: Derived = new Derived(y); -var r1 = d.a; -var r2 = d.b(y); -var r3 = d.c; -var r3a = d.d; -d.c = y; -var r4 = Derived.r; -var r5 = Derived.s(y); -var r6 = Derived.t; -var r6a = Derived.u; -Derived.t = y; - -class Base2 { - [i: string]: Object; - [i: number]: typeof x; -} - -class Derived2 extends Base2 { - [i: string]: typeof x; - [i: number]: typeof y; -} - -var d2: Derived2; -var r7 = d2['']; -var r8 = d2[1]; - - - -/// [Declarations] //// - - - -//// [derivedClassOverridesProtectedMembers2.d.ts] -declare var x: { - foo: string; -}; -declare var y: { - foo: string; - bar: string; -}; -declare class Base { - protected a: typeof x; - protected b(a: typeof x): invalid; - protected get c(): typeof x; - protected set c(v: typeof x); - protected d: (a: typeof x) => void; - protected static r: typeof x; - protected static s(a: typeof x): invalid; - protected static get t(): typeof x; - protected static set t(v: typeof x); - protected static u: (a: typeof x) => void; - constructor(a: typeof x); -} -declare class Derived extends Base { - a: typeof y; - b(a: typeof y): invalid; - get c(): typeof y; - set c(v: typeof y); - d: (a: typeof y) => void; - static r: typeof y; - static s(a: typeof y): invalid; - static get t(): typeof y; - static set t(a: typeof y); - static u: (a: typeof y) => void; - constructor(a: typeof y); -} -declare var d: Derived; -declare var r1: invalid; -declare var r2: invalid; -declare var r3: invalid; -declare var r3a: invalid; -declare var r4: invalid; -declare var r5: invalid; -declare var r6: invalid; -declare var r6a: invalid; -declare class Base2 { - [i: string]: Object; - [i: number]: typeof x; -} -declare class Derived2 extends Base2 { - [i: string]: typeof x; - [i: number]: typeof y; -} -declare var d2: Derived2; -declare var r7: invalid; -declare var r8: invalid; - -/// [Errors] //// - -derivedClassOverridesProtectedMembers2.ts(6,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(12,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(23,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(29,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(38,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(39,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(40,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(41,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(43,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(44,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(45,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(46,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(60,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(61,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. - - -==== derivedClassOverridesProtectedMembers2.ts (14 errors) ==== - var x: { foo: string; } - var y: { foo: string; bar: string; } - - class Base { - protected a: typeof x; - protected b(a: typeof x) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers2.ts:6:15: Add a return type to the method - protected get c() { return x; } - protected set c(v: typeof x) { } - protected d: (a: typeof x) => void ; - - protected static r: typeof x; - protected static s(a: typeof x) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers2.ts:12:22: Add a return type to the method - protected static get t() { return x; } - protected static set t(v: typeof x) { } - protected static u: (a: typeof x) => void ; - - constructor(a: typeof x) { } - } - - // Increase visibility of all protected members to public - class Derived extends Base { - a: typeof y; - b(a: typeof y) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers2.ts:23:5: Add a return type to the method - get c() { return y; } - set c(v: typeof y) { } - d: (a: typeof y) => void; - - static r: typeof y; - static s(a: typeof y) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers2.ts:29:12: Add a return type to the method - static get t() { return y; } - static set t(a: typeof y) { } - static u: (a: typeof y) => void; - - constructor(a: typeof y) { super(a); } - } - - var d: Derived = new Derived(y); - var r1 = d.a; - ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:38:5: Add a type annotation to the variable r1. - var r2 = d.b(y); - ~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:39:5: Add a type annotation to the variable r2. - var r3 = d.c; - ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:40:5: Add a type annotation to the variable r3. - var r3a = d.d; - ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:41:5: Add a type annotation to the variable r3a. - d.c = y; - var r4 = Derived.r; - ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:43:5: Add a type annotation to the variable r4. - var r5 = Derived.s(y); - ~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:44:5: Add a type annotation to the variable r5. - var r6 = Derived.t; - ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:45:5: Add a type annotation to the variable r6. - var r6a = Derived.u; - ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:46:5: Add a type annotation to the variable r6a. - Derived.t = y; - - class Base2 { - [i: string]: Object; - [i: number]: typeof x; - } - - class Derived2 extends Base2 { - [i: string]: typeof x; - [i: number]: typeof y; - } - - var d2: Derived2; - var r7 = d2['']; - ~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:60:5: Add a type annotation to the variable r7. - var r8 = d2[1]; - ~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:61:5: Add a type annotation to the variable r8. - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers3.d.ts deleted file mode 100644 index 9f751d0168558..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesProtectedMembers3.d.ts +++ /dev/null @@ -1,289 +0,0 @@ -//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts] //// - -//// [derivedClassOverridesProtectedMembers3.ts] -var x: { foo: string; } -var y: { foo: string; bar: string; } - -class Base { - a: typeof x; - b(a: typeof x) { } - get c() { return x; } - set c(v: typeof x) { } - d: (a: typeof x) => void; - - static r: typeof x; - static s(a: typeof x) { } - static get t() { return x; } - static set t(v: typeof x) { } - static u: (a: typeof x) => void; - - constructor(a: typeof x) {} -} - -// Errors -// decrease visibility of all public members to protected -class Derived1 extends Base { - protected a: typeof x; - constructor(a: typeof x) { super(a); } -} - -class Derived2 extends Base { - protected b(a: typeof x) { } - constructor(a: typeof x) { super(a); } -} - -class Derived3 extends Base { - protected get c() { return x; } - constructor(a: typeof x) { super(a); } -} - -class Derived4 extends Base { - protected set c(v: typeof x) { } - constructor(a: typeof x) { super(a); } -} - -class Derived5 extends Base { - protected d: (a: typeof x) => void ; - constructor(a: typeof x) { super(a); } -} - -class Derived6 extends Base { - protected static r: typeof x; - constructor(a: typeof x) { super(a); } -} - -class Derived7 extends Base { - protected static s(a: typeof x) { } - constructor(a: typeof x) { super(a); } -} - -class Derived8 extends Base { - protected static get t() { return x; } - constructor(a: typeof x) { super(a); } -} - -class Derived9 extends Base { - protected static set t(v: typeof x) { } - constructor(a: typeof x) { super(a); } -} - -class Derived10 extends Base { - protected static u: (a: typeof x) => void ; - constructor(a: typeof x) { super(a); } -} - -/// [Declarations] //// - - - -//// [derivedClassOverridesProtectedMembers3.d.ts] -declare var x: { - foo: string; -}; -declare var y: { - foo: string; - bar: string; -}; -declare class Base { - a: typeof x; - b(a: typeof x): invalid; - get c(): typeof x; - set c(v: typeof x); - d: (a: typeof x) => void; - static r: typeof x; - static s(a: typeof x): invalid; - static get t(): typeof x; - static set t(v: typeof x); - static u: (a: typeof x) => void; - constructor(a: typeof x); -} -declare class Derived1 extends Base { - protected a: typeof x; - constructor(a: typeof x); -} -declare class Derived2 extends Base { - protected b(a: typeof x): invalid; - constructor(a: typeof x); -} -declare class Derived3 extends Base { - protected get c(): invalid; - constructor(a: typeof x); -} -declare class Derived4 extends Base { - protected set c(v: typeof x); - constructor(a: typeof x); -} -declare class Derived5 extends Base { - protected d: (a: typeof x) => void; - constructor(a: typeof x); -} -declare class Derived6 extends Base { - protected static r: typeof x; - constructor(a: typeof x); -} -declare class Derived7 extends Base { - protected static s(a: typeof x): invalid; - constructor(a: typeof x); -} -declare class Derived8 extends Base { - protected static get t(): invalid; - constructor(a: typeof x); -} -declare class Derived9 extends Base { - protected static set t(v: typeof x); - constructor(a: typeof x); -} -declare class Derived10 extends Base { - protected static u: (a: typeof x) => void; - constructor(a: typeof x); -} - -/// [Errors] //// - -derivedClassOverridesProtectedMembers3.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers3.ts(12,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers3.ts(22,7): error TS2415: Class 'Derived1' incorrectly extends base class 'Base'. - Property 'a' is protected in type 'Derived1' but public in type 'Base'. -derivedClassOverridesProtectedMembers3.ts(27,7): error TS2415: Class 'Derived2' incorrectly extends base class 'Base'. - Property 'b' is protected in type 'Derived2' but public in type 'Base'. -derivedClassOverridesProtectedMembers3.ts(28,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers3.ts(32,7): error TS2415: Class 'Derived3' incorrectly extends base class 'Base'. - Property 'c' is protected in type 'Derived3' but public in type 'Base'. -derivedClassOverridesProtectedMembers3.ts(33,19): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers3.ts(37,7): error TS2415: Class 'Derived4' incorrectly extends base class 'Base'. - Property 'c' is protected in type 'Derived4' but public in type 'Base'. -derivedClassOverridesProtectedMembers3.ts(42,7): error TS2415: Class 'Derived5' incorrectly extends base class 'Base'. - Property 'd' is protected in type 'Derived5' but public in type 'Base'. -derivedClassOverridesProtectedMembers3.ts(47,7): error TS2417: Class static side 'typeof Derived6' incorrectly extends base class static side 'typeof Base'. - Property 'r' is protected in type 'typeof Derived6' but public in type 'typeof Base'. -derivedClassOverridesProtectedMembers3.ts(52,7): error TS2417: Class static side 'typeof Derived7' incorrectly extends base class static side 'typeof Base'. - Property 's' is protected in type 'typeof Derived7' but public in type 'typeof Base'. -derivedClassOverridesProtectedMembers3.ts(53,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers3.ts(57,7): error TS2417: Class static side 'typeof Derived8' incorrectly extends base class static side 'typeof Base'. - Property 't' is protected in type 'typeof Derived8' but public in type 'typeof Base'. -derivedClassOverridesProtectedMembers3.ts(58,26): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers3.ts(62,7): error TS2417: Class static side 'typeof Derived9' incorrectly extends base class static side 'typeof Base'. - Property 't' is protected in type 'typeof Derived9' but public in type 'typeof Base'. -derivedClassOverridesProtectedMembers3.ts(67,7): error TS2417: Class static side 'typeof Derived10' incorrectly extends base class static side 'typeof Base'. - Property 'u' is protected in type 'typeof Derived10' but public in type 'typeof Base'. - - -==== derivedClassOverridesProtectedMembers3.ts (16 errors) ==== - var x: { foo: string; } - var y: { foo: string; bar: string; } - - class Base { - a: typeof x; - b(a: typeof x) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers3.ts:6:5: Add a return type to the method - get c() { return x; } - set c(v: typeof x) { } - d: (a: typeof x) => void; - - static r: typeof x; - static s(a: typeof x) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers3.ts:12:12: Add a return type to the method - static get t() { return x; } - static set t(v: typeof x) { } - static u: (a: typeof x) => void; - - constructor(a: typeof x) {} - } - - // Errors - // decrease visibility of all public members to protected - class Derived1 extends Base { - ~~~~~~~~ -!!! error TS2415: Class 'Derived1' incorrectly extends base class 'Base'. -!!! error TS2415: Property 'a' is protected in type 'Derived1' but public in type 'Base'. - protected a: typeof x; - constructor(a: typeof x) { super(a); } - } - - class Derived2 extends Base { - ~~~~~~~~ -!!! error TS2415: Class 'Derived2' incorrectly extends base class 'Base'. -!!! error TS2415: Property 'b' is protected in type 'Derived2' but public in type 'Base'. - protected b(a: typeof x) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers3.ts:28:15: Add a return type to the method - constructor(a: typeof x) { super(a); } - } - - class Derived3 extends Base { - ~~~~~~~~ -!!! error TS2415: Class 'Derived3' incorrectly extends base class 'Base'. -!!! error TS2415: Property 'c' is protected in type 'Derived3' but public in type 'Base'. - protected get c() { return x; } - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 derivedClassOverridesProtectedMembers3.ts:33:19: Add a return type to the get accessor declaration. - constructor(a: typeof x) { super(a); } - } - - class Derived4 extends Base { - ~~~~~~~~ -!!! error TS2415: Class 'Derived4' incorrectly extends base class 'Base'. -!!! error TS2415: Property 'c' is protected in type 'Derived4' but public in type 'Base'. - protected set c(v: typeof x) { } - constructor(a: typeof x) { super(a); } - } - - class Derived5 extends Base { - ~~~~~~~~ -!!! error TS2415: Class 'Derived5' incorrectly extends base class 'Base'. -!!! error TS2415: Property 'd' is protected in type 'Derived5' but public in type 'Base'. - protected d: (a: typeof x) => void ; - constructor(a: typeof x) { super(a); } - } - - class Derived6 extends Base { - ~~~~~~~~ -!!! error TS2417: Class static side 'typeof Derived6' incorrectly extends base class static side 'typeof Base'. -!!! error TS2417: Property 'r' is protected in type 'typeof Derived6' but public in type 'typeof Base'. - protected static r: typeof x; - constructor(a: typeof x) { super(a); } - } - - class Derived7 extends Base { - ~~~~~~~~ -!!! error TS2417: Class static side 'typeof Derived7' incorrectly extends base class static side 'typeof Base'. -!!! error TS2417: Property 's' is protected in type 'typeof Derived7' but public in type 'typeof Base'. - protected static s(a: typeof x) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers3.ts:53:22: Add a return type to the method - constructor(a: typeof x) { super(a); } - } - - class Derived8 extends Base { - ~~~~~~~~ -!!! error TS2417: Class static side 'typeof Derived8' incorrectly extends base class static side 'typeof Base'. -!!! error TS2417: Property 't' is protected in type 'typeof Derived8' but public in type 'typeof Base'. - protected static get t() { return x; } - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 derivedClassOverridesProtectedMembers3.ts:58:26: Add a return type to the get accessor declaration. - constructor(a: typeof x) { super(a); } - } - - class Derived9 extends Base { - ~~~~~~~~ -!!! error TS2417: Class static side 'typeof Derived9' incorrectly extends base class static side 'typeof Base'. -!!! error TS2417: Property 't' is protected in type 'typeof Derived9' but public in type 'typeof Base'. - protected static set t(v: typeof x) { } - constructor(a: typeof x) { super(a); } - } - - class Derived10 extends Base { - ~~~~~~~~~ -!!! error TS2417: Class static side 'typeof Derived10' incorrectly extends base class static side 'typeof Base'. -!!! error TS2417: Property 'u' is protected in type 'typeof Derived10' but public in type 'typeof Base'. - protected static u: (a: typeof x) => void ; - constructor(a: typeof x) { super(a); } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesPublicMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesPublicMembers.d.ts deleted file mode 100644 index f738de8118689..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/derivedClassOverridesPublicMembers.d.ts +++ /dev/null @@ -1,248 +0,0 @@ -//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts] //// - -//// [derivedClassOverridesPublicMembers.ts] -var x: { foo: string; } -var y: { foo: string; bar: string; } - -class Base { - a: typeof x; - b(a: typeof x) { } - get c() { return x; } - set c(v: typeof x) { } - d: (a: typeof x) => void; - - static r: typeof x; - static s(a: typeof x) { } - static get t() { return x; } - static set t(v: typeof x) { } - static u: (a: typeof x) => void; - - constructor(a: typeof x) { } -} - -class Derived extends Base { - a: typeof y; - b(a: typeof y) { } - get c() { return y; } - set c(v: typeof y) { } - d: (a: typeof y) => void; - - static r: typeof y; - static s(a: typeof y) { } - static get t() { return y; } - static set t(a: typeof y) { } - static u: (a: typeof y) => void; - - constructor(a: typeof y) { super(x) } -} - -var d: Derived = new Derived(y); -var r1 = d.a; -var r2 = d.b(y); -var r3 = d.c; -var r3a = d.d; -d.c = y; -var r4 = Derived.r; -var r5 = Derived.s(y); -var r6 = Derived.t; -var r6a = Derived.u; -Derived.t = y; - -class Base2 { - [i: string]: Object; - [i: number]: typeof x; -} - -class Derived2 extends Base2 { - [i: string]: typeof x; - [i: number]: typeof y; -} - -var d2: Derived2; -var r7 = d2['']; -var r8 = d2[1]; - - - -/// [Declarations] //// - - - -//// [derivedClassOverridesPublicMembers.d.ts] -declare var x: { - foo: string; -}; -declare var y: { - foo: string; - bar: string; -}; -declare class Base { - a: typeof x; - b(a: typeof x): invalid; - get c(): typeof x; - set c(v: typeof x); - d: (a: typeof x) => void; - static r: typeof x; - static s(a: typeof x): invalid; - static get t(): typeof x; - static set t(v: typeof x); - static u: (a: typeof x) => void; - constructor(a: typeof x); -} -declare class Derived extends Base { - a: typeof y; - b(a: typeof y): invalid; - get c(): typeof y; - set c(v: typeof y); - d: (a: typeof y) => void; - static r: typeof y; - static s(a: typeof y): invalid; - static get t(): typeof y; - static set t(a: typeof y); - static u: (a: typeof y) => void; - constructor(a: typeof y); -} -declare var d: Derived; -declare var r1: invalid; -declare var r2: invalid; -declare var r3: invalid; -declare var r3a: invalid; -declare var r4: invalid; -declare var r5: invalid; -declare var r6: invalid; -declare var r6a: invalid; -declare class Base2 { - [i: string]: Object; - [i: number]: typeof x; -} -declare class Derived2 extends Base2 { - [i: string]: typeof x; - [i: number]: typeof y; -} -declare var d2: Derived2; -declare var r7: invalid; -declare var r8: invalid; - -/// [Errors] //// - -derivedClassOverridesPublicMembers.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(12,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(22,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(28,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(37,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(38,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(39,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(40,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(42,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(43,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(44,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(45,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(59,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(60,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. - - -==== derivedClassOverridesPublicMembers.ts (14 errors) ==== - var x: { foo: string; } - var y: { foo: string; bar: string; } - - class Base { - a: typeof x; - b(a: typeof x) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesPublicMembers.ts:6:5: Add a return type to the method - get c() { return x; } - set c(v: typeof x) { } - d: (a: typeof x) => void; - - static r: typeof x; - static s(a: typeof x) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesPublicMembers.ts:12:12: Add a return type to the method - static get t() { return x; } - static set t(v: typeof x) { } - static u: (a: typeof x) => void; - - constructor(a: typeof x) { } - } - - class Derived extends Base { - a: typeof y; - b(a: typeof y) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesPublicMembers.ts:22:5: Add a return type to the method - get c() { return y; } - set c(v: typeof y) { } - d: (a: typeof y) => void; - - static r: typeof y; - static s(a: typeof y) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesPublicMembers.ts:28:12: Add a return type to the method - static get t() { return y; } - static set t(a: typeof y) { } - static u: (a: typeof y) => void; - - constructor(a: typeof y) { super(x) } - } - - var d: Derived = new Derived(y); - var r1 = d.a; - ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesPublicMembers.ts:37:5: Add a type annotation to the variable r1. - var r2 = d.b(y); - ~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesPublicMembers.ts:38:5: Add a type annotation to the variable r2. - var r3 = d.c; - ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesPublicMembers.ts:39:5: Add a type annotation to the variable r3. - var r3a = d.d; - ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesPublicMembers.ts:40:5: Add a type annotation to the variable r3a. - d.c = y; - var r4 = Derived.r; - ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesPublicMembers.ts:42:5: Add a type annotation to the variable r4. - var r5 = Derived.s(y); - ~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesPublicMembers.ts:43:5: Add a type annotation to the variable r5. - var r6 = Derived.t; - ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesPublicMembers.ts:44:5: Add a type annotation to the variable r6. - var r6a = Derived.u; - ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesPublicMembers.ts:45:5: Add a type annotation to the variable r6a. - Derived.t = y; - - class Base2 { - [i: string]: Object; - [i: number]: typeof x; - } - - class Derived2 extends Base2 { - [i: string]: typeof x; - [i: number]: typeof y; - } - - var d2: Derived2; - var r7 = d2['']; - ~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesPublicMembers.ts:59:5: Add a type annotation to the variable r7. - var r8 = d2[1]; - ~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesPublicMembers.ts:60:5: Add a type annotation to the variable r8. - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts deleted file mode 100644 index 45b856858a8aa..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts +++ /dev/null @@ -1,203 +0,0 @@ -//// [tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts] //// - -//// [modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts] -// All will be error from using ES6 features but only include ES5 library -// Using Es6 array -function f(x: number, y: number, z: number) { - return Array.from(arguments); -} - -f(1, 2, 3); // no error - -// Using ES6 collection -var m = new Map(); -m.clear(); -// Using ES6 iterable -m.keys(); - -// Using ES6 function -function Baz() { } -Baz.name; - -// Using ES6 math -Math.sign(1); - -// Using ES6 object -var o = { - a: 2, - [Symbol.hasInstance](value: any) { - return false; - } -}; -o.hasOwnProperty(Symbol.hasInstance); - -// Using Es6 proxy -var t = {} -var p = new Proxy(t, {}); - -// Using ES6 reflect -Reflect.isExtensible({}); - -// Using Es6 regexp -var reg = new RegExp("/s"); -reg.flags; - -// Using ES6 string -var str = "Hello world"; -str.includes("hello", 0); - -// Using ES6 symbol -var s = Symbol(); - -// Using ES6 wellknown-symbol -const o1 = { - [Symbol.hasInstance](value: any) { - return false; - } -} - -/// [Declarations] //// - - - -//// [modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts] -declare function f(x: number, y: number, z: number): invalid; -declare var m: invalid; -declare function Baz(): invalid; -declare var o: invalid; -declare var t: {}; -declare var p: invalid; -declare var reg: invalid; -declare var str: string; -declare var s: invalid; -declare const o1: invalid; - -/// [Errors] //// - -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(3,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(4,18): error TS2550: Property 'from' does not exist on type 'ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(10,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(10,13): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(16,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(17,5): error TS2339: Property 'name' does not exist on type '() => void'. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(20,6): error TS2550: Property 'sign' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(29,18): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,13): error TS2304: Cannot find name 'Proxy'. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(36,1): error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(39,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(40,5): error TS2550: Property 'flags' does not exist on type 'RegExp'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(44,5): error TS2550: Property 'includes' does not exist on type 'string'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts (20 errors) ==== - // All will be error from using ES6 features but only include ES5 library - // Using Es6 array - function f(x: number, y: number, z: number) { - ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:3:10: Add a return type to the function declaration. - return Array.from(arguments); - ~~~~ -!!! error TS2550: Property 'from' does not exist on type 'ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. - } - - f(1, 2, 3); // no error - - // Using ES6 collection - var m = new Map(); - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:10:5: Add a type annotation to the variable m. - ~~~ -!!! error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. - m.clear(); - // Using ES6 iterable - m.keys(); - - // Using ES6 function - function Baz() { } - ~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:16:10: Add a return type to the function declaration. - Baz.name; - ~~~~ -!!! error TS2339: Property 'name' does not exist on type '() => void'. - - // Using ES6 math - Math.sign(1); - ~~~~ -!!! error TS2550: Property 'sign' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. - - // Using ES6 object - var o = { - a: 2, - [Symbol.hasInstance](value: any) { - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:23:5: Add a type annotation to the variable o. -!!! related TS9034 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:25:5: Add a return type to the method - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - return false; - } - }; - o.hasOwnProperty(Symbol.hasInstance); - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - // Using Es6 proxy - var t = {} - var p = new Proxy(t, {}); - ~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:33:5: Add a type annotation to the variable p. - ~~~~~ -!!! error TS2304: Cannot find name 'Proxy'. - - // Using ES6 reflect - Reflect.isExtensible({}); - ~~~~~~~ -!!! error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. - - // Using Es6 regexp - var reg = new RegExp("/s"); - ~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:39:5: Add a type annotation to the variable reg. - reg.flags; - ~~~~~ -!!! error TS2550: Property 'flags' does not exist on type 'RegExp'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. - - // Using ES6 string - var str = "Hello world"; - str.includes("hello", 0); - ~~~~~~~~ -!!! error TS2550: Property 'includes' does not exist on type 'string'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. - - // Using ES6 symbol - var s = Symbol(); - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:47:5: Add a type annotation to the variable s. - - // Using ES6 wellknown-symbol - const o1 = { - [Symbol.hasInstance](value: any) { - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:50:7: Add a type annotation to the variable o1. -!!! related TS9034 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:51:5: Add a return type to the method - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - return false; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName11.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName11.d.ts deleted file mode 100644 index 08475b41450ad..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName11.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts] //// - -//// [parserComputedPropertyName11.ts] -class C { - [e](); -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName11.d.ts] -declare class C { - [e](): invalid; -} - -/// [Errors] //// - -parserComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -parserComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -parserComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName11.ts (3 errors) ==== - class C { - [e](); - ~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 parserComputedPropertyName11.ts:2:4: Add a return type to the method - ~ -!!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName12.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName12.d.ts deleted file mode 100644 index 3208d29dafa84..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName12.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts] //// - -//// [parserComputedPropertyName12.ts] -class C { - [e]() { } -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName12.d.ts] -declare class C { - [e](): invalid; -} - -/// [Errors] //// - -parserComputedPropertyName12.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -parserComputedPropertyName12.ts(2,5): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName12.ts (2 errors) ==== - class C { - [e]() { } - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 parserComputedPropertyName12.ts:2:4: Add a return type to the method - ~ -!!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName17.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName17.d.ts deleted file mode 100644 index ec80034de4616..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName17.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts] //// - -//// [parserComputedPropertyName17.ts] -var v = { set [e](v) { } } - -/// [Declarations] //// - - - -//// [parserComputedPropertyName17.d.ts] -declare var v: invalid; - -/// [Errors] //// - -parserComputedPropertyName17.ts(1,16): error TS2304: Cannot find name 'e'. -parserComputedPropertyName17.ts(1,19): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - -==== parserComputedPropertyName17.ts (2 errors) ==== - var v = { set [e](v) { } } - ~ -!!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 parserComputedPropertyName17.ts:1:15: Add a type to parameter of the set accessor declaration. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName3.d.ts deleted file mode 100644 index 14c4c66fa61a5..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName3.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts] //// - -//// [parserComputedPropertyName3.ts] -var v = { [e]() { } }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName3.d.ts] -declare var v: invalid; - -/// [Errors] //// - -parserComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -parserComputedPropertyName3.ts(1,12): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName3.ts (2 errors) ==== - var v = { [e]() { } }; - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 parserComputedPropertyName3.ts:1:5: Add a type annotation to the variable v. -!!! related TS9034 parserComputedPropertyName3.ts:1:11: Add a return type to the method - ~ -!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName38.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName38.d.ts deleted file mode 100644 index ce72580edde08..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName38.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts] //// - -//// [parserComputedPropertyName38.ts] -class C { - [public]() { } -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName38.d.ts] -declare class C { - [public](): invalid; -} - -/// [Errors] //// - -parserComputedPropertyName38.ts(2,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -parserComputedPropertyName38.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. -parserComputedPropertyName38.ts(2,6): error TS2304: Cannot find name 'public'. - - -==== parserComputedPropertyName38.ts (3 errors) ==== - class C { - [public]() { } - ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 parserComputedPropertyName38.ts:2:5: Add a return type to the method - ~~~~~~ -!!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. - ~~~~~~ -!!! error TS2304: Cannot find name 'public'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName39.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName39.d.ts deleted file mode 100644 index 4f7311552732b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName39.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts] //// - -//// [parserComputedPropertyName39.ts] -"use strict"; -class C { - [public]() { } -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName39.d.ts] -declare class C { - [public](): invalid; -} - -/// [Errors] //// - -parserComputedPropertyName39.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -parserComputedPropertyName39.ts(3,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. -parserComputedPropertyName39.ts(3,6): error TS2304: Cannot find name 'public'. - - -==== parserComputedPropertyName39.ts (3 errors) ==== - "use strict"; - class C { - [public]() { } - ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 parserComputedPropertyName39.ts:3:5: Add a return type to the method - ~~~~~~ -!!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. - ~~~~~~ -!!! error TS2304: Cannot find name 'public'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName4.d.ts deleted file mode 100644 index 9e602a31b5b67..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName4.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts] //// - -//// [parserComputedPropertyName4.ts] -var v = { get [e]() { } }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName4.d.ts] -declare var v: invalid; - -/// [Errors] //// - -parserComputedPropertyName4.ts(1,15): error TS2378: A 'get' accessor must return a value. -parserComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -parserComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName4.ts (3 errors) ==== - var v = { get [e]() { } }; - ~~~ -!!! error TS2378: A 'get' accessor must return a value. - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 parserComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration. - ~ -!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName5.d.ts deleted file mode 100644 index 345b14da7df01..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName5.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName5.ts] //// - -//// [parserComputedPropertyName5.ts] -var v = { public get [e]() { } }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName5.d.ts] -declare var v: invalid; - -/// [Errors] //// - -parserComputedPropertyName5.ts(1,11): error TS1042: 'public' modifier cannot be used here. -parserComputedPropertyName5.ts(1,22): error TS2378: A 'get' accessor must return a value. -parserComputedPropertyName5.ts(1,22): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -parserComputedPropertyName5.ts(1,23): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName5.ts (4 errors) ==== - var v = { public get [e]() { } }; - ~~~~~~ -!!! error TS1042: 'public' modifier cannot be used here. - ~~~ -!!! error TS2378: A 'get' accessor must return a value. - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 parserComputedPropertyName5.ts:1:22: Add a return type to the get accessor declaration. - ~ -!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName7.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName7.d.ts deleted file mode 100644 index 3357e79ac740c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName7.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts] //// - -//// [parserComputedPropertyName7.ts] -class C { - [e] -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName7.d.ts] -declare class C { - [e]: invalid; -} - -/// [Errors] //// - -parserComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -parserComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName7.ts (3 errors) ==== - class C { - [e] - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9029 parserComputedPropertyName7.ts:2:4: Add a type annotation to the property [e]. - ~ -!!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName8.d.ts deleted file mode 100644 index 6a91656a0d5e9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserComputedPropertyName8.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts] //// - -//// [parserComputedPropertyName8.ts] -class C { - public [e] -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName8.d.ts] -declare class C { - [e]: invalid; -} - -/// [Errors] //// - -parserComputedPropertyName8.ts(2,11): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName8.ts(2,11): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -parserComputedPropertyName8.ts(2,12): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName8.ts (3 errors) ==== - class C { - public [e] - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9029 parserComputedPropertyName8.ts:2:11: Add a type annotation to the property [e]. - ~ -!!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName11.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName11.d.ts deleted file mode 100644 index 10292880fd20b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName11.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts] //// - -//// [parserES5ComputedPropertyName11.ts] -class C { - [e](); -} - -/// [Declarations] //// - - - -//// [parserES5ComputedPropertyName11.d.ts] -declare class C { - [e](): invalid; -} - -/// [Errors] //// - -parserES5ComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -parserES5ComputedPropertyName11.ts(2,4): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -parserES5ComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. - - -==== parserES5ComputedPropertyName11.ts (3 errors) ==== - class C { - [e](); - ~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 parserES5ComputedPropertyName11.ts:2:4: Add a return type to the method - ~ -!!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName3.d.ts deleted file mode 100644 index 1e5b1240f67ea..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName3.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts] //// - -//// [parserES5ComputedPropertyName3.ts] -var v = { [e]() { } }; - -/// [Declarations] //// - - - -//// [parserES5ComputedPropertyName3.d.ts] -declare var v: invalid; - -/// [Errors] //// - -parserES5ComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -parserES5ComputedPropertyName3.ts(1,12): error TS2304: Cannot find name 'e'. - - -==== parserES5ComputedPropertyName3.ts (2 errors) ==== - var v = { [e]() { } }; - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 parserES5ComputedPropertyName3.ts:1:5: Add a type annotation to the variable v. -!!! related TS9034 parserES5ComputedPropertyName3.ts:1:11: Add a return type to the method - ~ -!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName4.d.ts deleted file mode 100644 index ad08e77874105..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName4.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts] //// - -//// [parserES5ComputedPropertyName4.ts] -var v = { get [e]() { } }; - -/// [Declarations] //// - - - -//// [parserES5ComputedPropertyName4.d.ts] -declare var v: invalid; - -/// [Errors] //// - -parserES5ComputedPropertyName4.ts(1,15): error TS2378: A 'get' accessor must return a value. -parserES5ComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -parserES5ComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. - - -==== parserES5ComputedPropertyName4.ts (3 errors) ==== - var v = { get [e]() { } }; - ~~~ -!!! error TS2378: A 'get' accessor must return a value. - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 parserES5ComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration. - ~ -!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName7.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName7.d.ts deleted file mode 100644 index ec42854a17ada..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/parserES5ComputedPropertyName7.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts] //// - -//// [parserES5ComputedPropertyName7.ts] -class C { - [e] -} - -/// [Declarations] //// - - - -//// [parserES5ComputedPropertyName7.d.ts] -declare class C { - [e]: invalid; -} - -/// [Errors] //// - -parserES5ComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5ComputedPropertyName7.ts(2,4): error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -parserES5ComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. - - -==== parserES5ComputedPropertyName7.ts (3 errors) ==== - class C { - [e] - ~~~ -!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. - ~~~ -!!! error TS9012: Property must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9029 parserES5ComputedPropertyName7.ts:2:4: Add a type annotation to the property [e]. - ~ -!!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess1.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess1.d.ts deleted file mode 100644 index f4f5182fc74b4..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess1.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess1.ts] //// - -//// [superSymbolIndexedAccess1.ts] -var symbol = Symbol.for('myThing'); - -class Foo { - [symbol]() { - return 0; - } -} - -class Bar extends Foo { - [symbol]() { - return super[symbol](); - } -} - -/// [Declarations] //// - - - -//// [superSymbolIndexedAccess1.d.ts] -declare var symbol: invalid; -declare class Foo { - [symbol](): invalid; -} -declare class Bar extends Foo { - [symbol](): invalid; -} - -/// [Errors] //// - -superSymbolIndexedAccess1.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -superSymbolIndexedAccess1.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -superSymbolIndexedAccess1.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== superSymbolIndexedAccess1.ts (3 errors) ==== - var symbol = Symbol.for('myThing'); - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 superSymbolIndexedAccess1.ts:1:5: Add a type annotation to the variable symbol. - - class Foo { - [symbol]() { - ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 superSymbolIndexedAccess1.ts:4:5: Add a return type to the method - return 0; - } - } - - class Bar extends Foo { - [symbol]() { - ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 superSymbolIndexedAccess1.ts:10:5: Add a return type to the method - return super[symbol](); - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess3.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess3.d.ts deleted file mode 100644 index 4294d3d7e3dc7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess3.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess3.ts] //// - -//// [superSymbolIndexedAccess3.ts] -var symbol = Symbol.for('myThing'); - -class Foo { - [symbol]() { - return 0; - } -} - -class Bar extends Foo { - [symbol]() { - return super[Bar](); - } -} - -/// [Declarations] //// - - - -//// [superSymbolIndexedAccess3.d.ts] -declare var symbol: invalid; -declare class Foo { - [symbol](): invalid; -} -declare class Bar extends Foo { - [symbol](): invalid; -} - -/// [Errors] //// - -superSymbolIndexedAccess3.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -superSymbolIndexedAccess3.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -superSymbolIndexedAccess3.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -superSymbolIndexedAccess3.ts(11,22): error TS2538: Type 'typeof Bar' cannot be used as an index type. - - -==== superSymbolIndexedAccess3.ts (4 errors) ==== - var symbol = Symbol.for('myThing'); - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 superSymbolIndexedAccess3.ts:1:5: Add a type annotation to the variable symbol. - - class Foo { - [symbol]() { - ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 superSymbolIndexedAccess3.ts:4:5: Add a return type to the method - return 0; - } - } - - class Bar extends Foo { - [symbol]() { - ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 superSymbolIndexedAccess3.ts:10:5: Add a return type to the method - return super[Bar](); - ~~~ -!!! error TS2538: Type 'typeof Bar' cannot be used as an index type. - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess4.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess4.d.ts deleted file mode 100644 index 850bc938269d9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess4.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess4.ts] //// - -//// [superSymbolIndexedAccess4.ts] -var symbol = Symbol.for('myThing'); - -class Bar { - [symbol]() { - return super[symbol](); - } -} - -/// [Declarations] //// - - - -//// [superSymbolIndexedAccess4.d.ts] -declare var symbol: invalid; -declare class Bar { - [symbol](): invalid; -} - -/// [Errors] //// - -superSymbolIndexedAccess4.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -superSymbolIndexedAccess4.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -superSymbolIndexedAccess4.ts(5,16): error TS2335: 'super' can only be referenced in a derived class. - - -==== superSymbolIndexedAccess4.ts (3 errors) ==== - var symbol = Symbol.for('myThing'); - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 superSymbolIndexedAccess4.ts:1:5: Add a type annotation to the variable symbol. - - class Bar { - [symbol]() { - ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 superSymbolIndexedAccess4.ts:4:5: Add a return type to the method - return super[symbol](); - ~~~~~ -!!! error TS2335: 'super' can only be referenced in a derived class. - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess5.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess5.d.ts deleted file mode 100644 index 7f0c57725203c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess5.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess5.ts] //// - -//// [superSymbolIndexedAccess5.ts] -var symbol: any; - -class Foo { - [symbol]() { - return 0; - } -} - -class Bar extends Foo { - [symbol]() { - return super[symbol](); - } -} - -/// [Declarations] //// - - - -//// [superSymbolIndexedAccess5.d.ts] -declare var symbol: any; -declare class Foo { - [symbol](): invalid; -} -declare class Bar extends Foo { - [symbol](): invalid; -} - -/// [Errors] //// - -superSymbolIndexedAccess5.ts(4,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -superSymbolIndexedAccess5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== superSymbolIndexedAccess5.ts (2 errors) ==== - var symbol: any; - - class Foo { - [symbol]() { - ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 superSymbolIndexedAccess5.ts:4:5: Add a return type to the method - return 0; - } - } - - class Bar extends Foo { - [symbol]() { - ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 superSymbolIndexedAccess5.ts:10:5: Add a return type to the method - return super[symbol](); - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess6.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess6.d.ts deleted file mode 100644 index 558bbd0438da1..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/superSymbolIndexedAccess6.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess6.ts] //// - -//// [superSymbolIndexedAccess6.ts] -var symbol: any; - -class Foo { - static [symbol]() { - return 0; - } -} - -class Bar extends Foo { - static [symbol]() { - return super[symbol](); - } -} - -/// [Declarations] //// - - - -//// [superSymbolIndexedAccess6.d.ts] -declare var symbol: any; -declare class Foo { - static [symbol](): invalid; -} -declare class Bar extends Foo { - static [symbol](): invalid; -} - -/// [Errors] //// - -superSymbolIndexedAccess6.ts(4,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -superSymbolIndexedAccess6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== superSymbolIndexedAccess6.ts (2 errors) ==== - var symbol: any; - - class Foo { - static [symbol]() { - ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 superSymbolIndexedAccess6.ts:4:12: Add a return type to the method - return 0; - } - } - - class Bar extends Foo { - static [symbol]() { - ~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 superSymbolIndexedAccess6.ts:10:12: Add a return type to the method - return super[symbol](); - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5For-ofTypeCheck10.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5For-ofTypeCheck10.d.ts deleted file mode 100644 index e739b817d61b3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5For-ofTypeCheck10.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -//// [tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts] //// - -//// [ES5For-ofTypeCheck10.ts] -// In ES3/5, you cannot for...of over an arbitrary iterable. -class StringIterator { - next() { - return { - done: true, - value: "" - }; - } - [Symbol.iterator]() { - return this; - } -} - -for (var v of new StringIterator) { } - -/// [Declarations] //// - - - -//// [ES5For-ofTypeCheck10.d.ts] -declare class StringIterator { - next(): invalid; -} - -/// [Errors] //// - -ES5For-ofTypeCheck10.ts(3,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -ES5For-ofTypeCheck10.ts(9,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -ES5For-ofTypeCheck10.ts(14,15): error TS2495: Type 'StringIterator' is not an array type or a string type. - - -==== ES5For-ofTypeCheck10.ts (3 errors) ==== - // In ES3/5, you cannot for...of over an arbitrary iterable. - class StringIterator { - next() { - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 ES5For-ofTypeCheck10.ts:3:5: Add a return type to the method - return { - done: true, - value: "" - }; - } - [Symbol.iterator]() { - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - return this; - } - } - - for (var v of new StringIterator) { } - ~~~~~~~~~~~~~~~~~~ -!!! error TS2495: Type 'StringIterator' is not an array type or a string type. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty2.d.ts deleted file mode 100644 index 4e270425cd42b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty2.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -//// [tests/cases/conformance/Symbols/ES5SymbolProperty2.ts] //// - -//// [ES5SymbolProperty2.ts] -module M { - var Symbol: any; - - export class C { - [Symbol.iterator]() { } - } - (new C)[Symbol.iterator]; -} - -(new M.C)[Symbol.iterator]; - -/// [Declarations] //// - - - -//// [ES5SymbolProperty2.d.ts] -declare namespace M { - class C { - } -} - -/// [Errors] //// - -ES5SymbolProperty2.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -ES5SymbolProperty2.ts(10,11): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== ES5SymbolProperty2.ts (2 errors) ==== - module M { - var Symbol: any; - - export class C { - [Symbol.iterator]() { } - ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } - (new C)[Symbol.iterator]; - } - - (new M.C)[Symbol.iterator]; - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty3.d.ts deleted file mode 100644 index 36609d47f9027..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty3.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -//// [tests/cases/conformance/Symbols/ES5SymbolProperty3.ts] //// - -//// [ES5SymbolProperty3.ts] -var Symbol: any; - -class C { - [Symbol.iterator]() { } -} - -(new C)[Symbol.iterator] - -/// [Declarations] //// - - - -//// [ES5SymbolProperty3.d.ts] -declare var Symbol: any; -declare class C { -} - -/// [Errors] //// - -ES5SymbolProperty3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== ES5SymbolProperty3.ts (1 errors) ==== - var Symbol: any; - - class C { - [Symbol.iterator]() { } - ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } - - (new C)[Symbol.iterator] \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty4.d.ts deleted file mode 100644 index fab1b107396ff..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty4.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -//// [tests/cases/conformance/Symbols/ES5SymbolProperty4.ts] //// - -//// [ES5SymbolProperty4.ts] -var Symbol: { iterator: string }; - -class C { - [Symbol.iterator]() { } -} - -(new C)[Symbol.iterator] - -/// [Declarations] //// - - - -//// [ES5SymbolProperty4.d.ts] -declare var Symbol: { - iterator: string; -}; -declare class C { -} - -/// [Errors] //// - -ES5SymbolProperty4.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== ES5SymbolProperty4.ts (1 errors) ==== - var Symbol: { iterator: string }; - - class C { - [Symbol.iterator]() { } - ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } - - (new C)[Symbol.iterator] \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty5.d.ts deleted file mode 100644 index b78624cf67140..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty5.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -//// [tests/cases/conformance/Symbols/ES5SymbolProperty5.ts] //// - -//// [ES5SymbolProperty5.ts] -var Symbol: { iterator: symbol }; - -class C { - [Symbol.iterator]() { } -} - -(new C)[Symbol.iterator](0) // Should error - -/// [Declarations] //// - - - -//// [ES5SymbolProperty5.d.ts] -declare var Symbol: { - iterator: symbol; -}; -declare class C { -} - -/// [Errors] //// - -ES5SymbolProperty5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== ES5SymbolProperty5.ts (1 errors) ==== - var Symbol: { iterator: symbol }; - - class C { - [Symbol.iterator]() { } - ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } - - (new C)[Symbol.iterator](0) // Should error \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty6.d.ts deleted file mode 100644 index 17967cf86260f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty6.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -//// [tests/cases/conformance/Symbols/ES5SymbolProperty6.ts] //// - -//// [ES5SymbolProperty6.ts] -class C { - [Symbol.iterator]() { } -} - -(new C)[Symbol.iterator] - -/// [Declarations] //// - - - -//// [ES5SymbolProperty6.d.ts] -declare class C { -} - -/// [Errors] //// - -ES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -ES5SymbolProperty6.ts(5,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== ES5SymbolProperty6.ts (2 errors) ==== - class C { - [Symbol.iterator]() { } - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - } - - (new C)[Symbol.iterator] - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty7.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty7.d.ts deleted file mode 100644 index bc59e366471b5..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/ES5SymbolProperty7.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -//// [tests/cases/conformance/Symbols/ES5SymbolProperty7.ts] //// - -//// [ES5SymbolProperty7.ts] -var Symbol: { iterator: any }; - -class C { - [Symbol.iterator]() { } -} - -(new C)[Symbol.iterator] - -/// [Declarations] //// - - - -//// [ES5SymbolProperty7.d.ts] -declare var Symbol: { - iterator: any; -}; -declare class C { -} - -/// [Errors] //// - -ES5SymbolProperty7.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== ES5SymbolProperty7.ts (1 errors) ==== - var Symbol: { iterator: any }; - - class C { - [Symbol.iterator]() { } - ~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } - - (new C)[Symbol.iterator] \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/MemberFunctionDeclaration3_es6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/MemberFunctionDeclaration3_es6.d.ts deleted file mode 100644 index 2561b593666dd..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/MemberFunctionDeclaration3_es6.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -//// [tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts] //// - -//// [MemberFunctionDeclaration3_es6.ts] -class C { - *[foo]() { } -} - -/// [Declarations] //// - - - -//// [MemberFunctionDeclaration3_es6.d.ts] -declare class C { -} - -/// [Errors] //// - -MemberFunctionDeclaration3_es6.ts(2,6): error TS2304: Cannot find name 'foo'. - - -==== MemberFunctionDeclaration3_es6.ts (1 errors) ==== - class C { - *[foo]() { } - ~~~ -!!! error TS2304: Cannot find name 'foo'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES5.d.ts deleted file mode 100644 index f1466f734739c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES5.d.ts +++ /dev/null @@ -1,138 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts] //// - -//// [computedPropertyNames10_ES5.ts] -var s: string; -var n: number; -var a: any; -var v = { - [s]() { }, - [n]() { }, - [s + s]() { }, - [s + n]() { }, - [+s]() { }, - [""]() { }, - [0]() { }, - [a]() { }, - [true]() { }, - [`hello bye`]() { }, - [`hello ${a} bye`]() { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames10_ES5.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare var v: invalid; - -/// [Errors] //// - -computedPropertyNames10_ES5.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES5.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames10_ES5.ts (19 errors) ==== - var s: string; - var n: number; - var a: any; - var v = { - [s]() { }, - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:5:5: Add a return type to the method - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. - [n]() { }, - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:6:5: Add a return type to the method - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. - [s + s]() { }, - ~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:7:5: Add a return type to the method - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. - [s + n]() { }, - ~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:8:5: Add a return type to the method - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. - [+s]() { }, - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:9:5: Add a return type to the method - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. - [""]() { }, - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:10:5: Add a return type to the method - [0]() { }, - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:11:5: Add a return type to the method - [a]() { }, - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:12:5: Add a return type to the method - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. - [true]() { }, - ~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:13:5: Add a return type to the method - ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. - [`hello bye`]() { }, - ~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:14:5: Add a return type to the method - [`hello ${a} bye`]() { } - ~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES5.ts:15:5: Add a return type to the method - ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES5.ts:4:5: Add a type annotation to the variable v. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES6.d.ts deleted file mode 100644 index 81b547dc161a3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames10_ES6.d.ts +++ /dev/null @@ -1,138 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts] //// - -//// [computedPropertyNames10_ES6.ts] -var s: string; -var n: number; -var a: any; -var v = { - [s]() { }, - [n]() { }, - [s + s]() { }, - [s + n]() { }, - [+s]() { }, - [""]() { }, - [0]() { }, - [a]() { }, - [true]() { }, - [`hello bye`]() { }, - [`hello ${a} bye`]() { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames10_ES6.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare var v: invalid; - -/// [Errors] //// - -computedPropertyNames10_ES6.ts(5,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(7,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(8,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(8,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(9,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(9,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(10,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(12,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(13,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(13,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(15,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames10_ES6.ts(15,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames10_ES6.ts (19 errors) ==== - var s: string; - var n: number; - var a: any; - var v = { - [s]() { }, - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:5:5: Add a return type to the method - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. - [n]() { }, - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:6:5: Add a return type to the method - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. - [s + s]() { }, - ~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:7:5: Add a return type to the method - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. - [s + n]() { }, - ~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:8:5: Add a return type to the method - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. - [+s]() { }, - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:9:5: Add a return type to the method - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. - [""]() { }, - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:10:5: Add a return type to the method - [0]() { }, - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:11:5: Add a return type to the method - [a]() { }, - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:12:5: Add a return type to the method - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. - [true]() { }, - ~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:13:5: Add a return type to the method - ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. - [`hello bye`]() { }, - ~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:14:5: Add a return type to the method - [`hello ${a} bye`]() { } - ~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. -!!! related TS9034 computedPropertyNames10_ES6.ts:15:5: Add a return type to the method - ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames10_ES6.ts:4:5: Add a type annotation to the variable v. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES5.d.ts deleted file mode 100644 index 36547f969d6c7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES5.d.ts +++ /dev/null @@ -1,127 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES5.ts] //// - -//// [computedPropertyNames11_ES5.ts] -var s: string; -var n: number; -var a: any; -var v = { - get [s]() { return 0; }, - set [n](v) { }, - get [s + s]() { return 0; }, - set [s + n](v) { }, - get [+s]() { return 0; }, - set [""](v) { }, - get [0]() { return 0; }, - set [a](v) { }, - get [true]() { return 0; }, - set [`hello bye`](v) { }, - get [`hello ${a} bye`]() { return 0; } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames11_ES5.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare var v: invalid; - -/// [Errors] //// - -computedPropertyNames11_ES5.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(8,17): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES5.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames11_ES5.ts (19 errors) ==== - var s: string; - var n: number; - var a: any; - var v = { - get [s]() { return 0; }, - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES5.ts:5:9: Add a return type to the get accessor declaration. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. - set [n](v) { }, - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames11_ES5.ts:6:9: Add a type to parameter of the set accessor declaration. - get [s + s]() { return 0; }, - ~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES5.ts:7:9: Add a return type to the get accessor declaration. - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. - set [s + n](v) { }, - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames11_ES5.ts:8:9: Add a type to parameter of the set accessor declaration. - get [+s]() { return 0; }, - ~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES5.ts:9:9: Add a return type to the get accessor declaration. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. - set [""](v) { }, - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames11_ES5.ts:10:9: Add a type to parameter of the set accessor declaration. - get [0]() { return 0; }, - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES5.ts:11:9: Add a return type to the get accessor declaration. - set [a](v) { }, - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames11_ES5.ts:12:9: Add a type to parameter of the set accessor declaration. - get [true]() { return 0; }, - ~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES5.ts:13:9: Add a return type to the get accessor declaration. - ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. - set [`hello bye`](v) { }, - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames11_ES5.ts:14:9: Add a type to parameter of the set accessor declaration. - get [`hello ${a} bye`]() { return 0; } - ~~~~~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES5.ts:15:9: Add a return type to the get accessor declaration. - ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES5.ts:4:5: Add a type annotation to the variable v. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES6.d.ts deleted file mode 100644 index e37f26707e667..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames11_ES6.d.ts +++ /dev/null @@ -1,127 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES6.ts] //// - -//// [computedPropertyNames11_ES6.ts] -var s: string; -var n: number; -var a: any; -var v = { - get [s]() { return 0; }, - set [n](v) { }, - get [s + s]() { return 0; }, - set [s + n](v) { }, - get [+s]() { return 0; }, - set [""](v) { }, - get [0]() { return 0; }, - set [a](v) { }, - get [true]() { return 0; }, - set [`hello bye`](v) { }, - get [`hello ${a} bye`]() { return 0; } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames11_ES6.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare var v: invalid; - -/// [Errors] //// - -computedPropertyNames11_ES6.ts(5,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(5,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(6,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(6,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(7,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(7,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(8,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(8,17): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(9,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(9,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(10,14): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(11,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(12,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(12,13): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(13,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(13,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(14,23): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(15,9): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames11_ES6.ts(15,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames11_ES6.ts (19 errors) ==== - var s: string; - var n: number; - var a: any; - var v = { - get [s]() { return 0; }, - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES6.ts:5:9: Add a return type to the get accessor declaration. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. - set [n](v) { }, - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames11_ES6.ts:6:9: Add a type to parameter of the set accessor declaration. - get [s + s]() { return 0; }, - ~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES6.ts:7:9: Add a return type to the get accessor declaration. - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. - set [s + n](v) { }, - ~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames11_ES6.ts:8:9: Add a type to parameter of the set accessor declaration. - get [+s]() { return 0; }, - ~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES6.ts:9:9: Add a return type to the get accessor declaration. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. - set [""](v) { }, - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames11_ES6.ts:10:9: Add a type to parameter of the set accessor declaration. - get [0]() { return 0; }, - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES6.ts:11:9: Add a return type to the get accessor declaration. - set [a](v) { }, - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames11_ES6.ts:12:9: Add a type to parameter of the set accessor declaration. - get [true]() { return 0; }, - ~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES6.ts:13:9: Add a return type to the get accessor declaration. - ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. - set [`hello bye`](v) { }, - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 computedPropertyNames11_ES6.ts:14:9: Add a type to parameter of the set accessor declaration. - get [`hello ${a} bye`]() { return 0; } - ~~~~~~~~~~~~~~~~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 computedPropertyNames11_ES6.ts:15:9: Add a return type to the get accessor declaration. - ~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 computedPropertyNames11_ES6.ts:4:5: Add a type annotation to the variable v. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES5.d.ts deleted file mode 100644 index a5ffd4be0fac9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES5.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES5.ts] //// - -//// [computedPropertyNames13_ES5.ts] -var s: string; -var n: number; -var a: any; -class C { - [s]() {} - [n]() { } - static [s + s]() { } - [s + n]() { } - [+s]() { } - static [""]() { } - [0]() { } - [a]() { } - static [true]() { } - [`hello bye`]() { } - static [`hello ${a} bye`]() { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames13_ES5.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare class C { - static [""](): invalid; - [0](): invalid; - [`hello bye`](): invalid; -} - -/// [Errors] //// - -computedPropertyNames13_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames13_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames13_ES5.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames13_ES5.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames13_ES5.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames13_ES5.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== computedPropertyNames13_ES5.ts (6 errors) ==== - var s: string; - var n: number; - var a: any; - class C { - [s]() {} - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - [n]() { } - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static [s + s]() { } - [s + n]() { } - [+s]() { } - static [""]() { } - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames13_ES5.ts:10:12: Add a return type to the method - [0]() { } - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames13_ES5.ts:11:5: Add a return type to the method - [a]() { } - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static [true]() { } - [`hello bye`]() { } - ~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames13_ES5.ts:14:5: Add a return type to the method - static [`hello ${a} bye`]() { } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES6.d.ts deleted file mode 100644 index 603aec1df95e9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames13_ES6.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES6.ts] //// - -//// [computedPropertyNames13_ES6.ts] -var s: string; -var n: number; -var a: any; -class C { - [s]() {} - [n]() { } - static [s + s]() { } - [s + n]() { } - [+s]() { } - static [""]() { } - [0]() { } - [a]() { } - static [true]() { } - [`hello bye`]() { } - static [`hello ${a} bye`]() { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames13_ES6.d.ts] -declare var s: string; -declare var n: number; -declare var a: any; -declare class C { - static [""](): invalid; - [0](): invalid; - [`hello bye`](): invalid; -} - -/// [Errors] //// - -computedPropertyNames13_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames13_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames13_ES6.ts(10,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames13_ES6.ts(11,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -computedPropertyNames13_ES6.ts(12,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames13_ES6.ts(14,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== computedPropertyNames13_ES6.ts (6 errors) ==== - var s: string; - var n: number; - var a: any; - class C { - [s]() {} - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - [n]() { } - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static [s + s]() { } - [s + n]() { } - [+s]() { } - static [""]() { } - ~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames13_ES6.ts:10:12: Add a return type to the method - [0]() { } - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames13_ES6.ts:11:5: Add a return type to the method - [a]() { } - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static [true]() { } - [`hello bye`]() { } - ~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 computedPropertyNames13_ES6.ts:14:5: Add a return type to the method - static [`hello ${a} bye`]() { } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES5.d.ts deleted file mode 100644 index dae47ae15d153..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES5.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES5.ts] //// - -//// [computedPropertyNames14_ES5.ts] -var b: boolean; -class C { - [b]() {} - static [true]() { } - [[]]() { } - static [{}]() { } - [undefined]() { } - static [null]() { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames14_ES5.d.ts] -declare var b: boolean; -declare class C { -} - -/// [Errors] //// - -computedPropertyNames14_ES5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES5.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames14_ES5.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES5.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames14_ES5.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - -==== computedPropertyNames14_ES5.ts (8 errors) ==== - var b: boolean; - class C { - [b]() {} - ~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static [true]() { } - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [[]]() { } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - static [{}]() { } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [undefined]() { } - ~~~~~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static [null]() { } - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES6.d.ts deleted file mode 100644 index 5286480224a6f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames14_ES6.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES6.ts] //// - -//// [computedPropertyNames14_ES6.ts] -var b: boolean; -class C { - [b]() {} - static [true]() { } - [[]]() { } - static [{}]() { } - [undefined]() { } - static [null]() { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames14_ES6.d.ts] -declare var b: boolean; -declare class C { -} - -/// [Errors] //// - -computedPropertyNames14_ES6.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES6.ts(3,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames14_ES6.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES6.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES6.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames14_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames14_ES6.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - -==== computedPropertyNames14_ES6.ts (8 errors) ==== - var b: boolean; - class C { - [b]() {} - ~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static [true]() { } - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [[]]() { } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - static [{}]() { } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - [undefined]() { } - ~~~~~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static [null]() { } - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES5.d.ts deleted file mode 100644 index 7e251ee43e0e8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES5.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts] //// - -//// [computedPropertyNames15_ES5.ts] -var p1: number | string; -var p2: number | number[]; -var p3: string | boolean; -class C { - [p1]() { } - [p2]() { } - [p3]() { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames15_ES5.d.ts] -declare var p1: number | string; -declare var p2: number | number[]; -declare var p3: string | boolean; -declare class C { -} - -/// [Errors] //// - -computedPropertyNames15_ES5.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames15_ES5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames15_ES5.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames15_ES5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames15_ES5.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames15_ES5.ts (5 errors) ==== - var p1: number | string; - var p2: number | number[]; - var p3: string | boolean; - class C { - [p1]() { } - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - [p2]() { } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - [p3]() { } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES6.d.ts deleted file mode 100644 index 7341c90ea585b..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames15_ES6.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES6.ts] //// - -//// [computedPropertyNames15_ES6.ts] -var p1: number | string; -var p2: number | number[]; -var p3: string | boolean; -class C { - [p1]() { } - [p2]() { } - [p3]() { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames15_ES6.d.ts] -declare var p1: number | string; -declare var p2: number | number[]; -declare var p3: string | boolean; -declare class C { -} - -/// [Errors] //// - -computedPropertyNames15_ES6.ts(5,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames15_ES6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames15_ES6.ts(6,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames15_ES6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames15_ES6.ts(7,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== computedPropertyNames15_ES6.ts (5 errors) ==== - var p1: number | string; - var p2: number | number[]; - var p3: string | boolean; - class C { - [p1]() { } - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - [p2]() { } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - [p3]() { } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES5.d.ts deleted file mode 100644 index 45917f98c143c..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES5.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES5.ts] //// - -//// [computedPropertyNames17_ES5.ts] -var b: boolean; -class C { - get [b]() { return 0;} - static set [true](v) { } - get [[]]() { return 0; } - set [{}](v) { } - static get [undefined]() { return 0; } - set [null](v) { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames17_ES5.d.ts] -declare var b: boolean; -declare class C { -} - -/// [Errors] //// - -computedPropertyNames17_ES5.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES5.ts(3,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames17_ES5.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES5.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES5.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES5.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES5.ts(7,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames17_ES5.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - -==== computedPropertyNames17_ES5.ts (8 errors) ==== - var b: boolean; - class C { - get [b]() { return 0;} - ~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static set [true](v) { } - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - get [[]]() { return 0; } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - set [{}](v) { } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - static get [undefined]() { return 0; } - ~~~~~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - set [null](v) { } - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES6.d.ts deleted file mode 100644 index 2f472d0260e41..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/computedPropertyNames17_ES6.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -//// [tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts] //// - -//// [computedPropertyNames17_ES6.ts] -var b: boolean; -class C { - get [b]() { return 0;} - static set [true](v) { } - get [[]]() { return 0; } - set [{}](v) { } - static get [undefined]() { return 0; } - set [null](v) { } -} - -/// [Declarations] //// - - - -//// [computedPropertyNames17_ES6.d.ts] -declare var b: boolean; -declare class C { -} - -/// [Errors] //// - -computedPropertyNames17_ES6.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES6.ts(3,9): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames17_ES6.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES6.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES6.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES6.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. -computedPropertyNames17_ES6.ts(7,16): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -computedPropertyNames17_ES6.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - - -==== computedPropertyNames17_ES6.ts (8 errors) ==== - var b: boolean; - class C { - get [b]() { return 0;} - ~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - static set [true](v) { } - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - get [[]]() { return 0; } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - set [{}](v) { } - ~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - static get [undefined]() { return 0; } - ~~~~~~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - ~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - set [null](v) { } - ~~~~~~ -!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitBindingPatternWithReservedWord.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitBindingPatternWithReservedWord.d.ts new file mode 100644 index 0000000000000..22a24f3e4160e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitBindingPatternWithReservedWord.d.ts @@ -0,0 +1,43 @@ +//// [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 {}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers.d.ts deleted file mode 100644 index 7cc4b48b22f93..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers.ts] //// - -//// [derivedClassOverridesProtectedMembers.ts] -var x: { foo: string; } -var y: { foo: string; bar: string; } - -class Base { - protected a: typeof x; - protected b(a: typeof x) { } - protected get c() { return x; } - protected set c(v: typeof x) { } - protected d: (a: typeof x) => void; - - protected static r: typeof x; - protected static s(a: typeof x) { } - protected static get t() { return x; } - protected static set t(v: typeof x) { } - protected static u: (a: typeof x) => void; - - constructor(a: typeof x) { } -} - -class Derived extends Base { - protected a: typeof y; - protected b(a: typeof y) { } - protected get c() { return y; } - protected set c(v: typeof y) { } - protected d: (a: typeof y) => void; - - protected static r: typeof y; - protected static s(a: typeof y) { } - protected static get t() { return y; } - protected static set t(a: typeof y) { } - protected static u: (a: typeof y) => void; - - constructor(a: typeof y) { super(x) } -} - - -/// [Declarations] //// - - - -//// [derivedClassOverridesProtectedMembers.d.ts] -declare var x: { - foo: string; -}; -declare var y: { - foo: string; - bar: string; -}; -declare class Base { - protected a: typeof x; - protected b(a: typeof x): invalid; - protected get c(): { - foo: string; - }; - protected set c(v: typeof x); - protected d: (a: typeof x) => void; - protected static r: typeof x; - protected static s(a: typeof x): invalid; - protected static get t(): { - foo: string; - }; - protected static set t(v: typeof x); - protected static u: (a: typeof x) => void; - constructor(a: typeof x); -} -declare class Derived extends Base { - protected a: typeof y; - protected b(a: typeof y): invalid; - protected get c(): { - foo: string; - bar: string; - }; - protected set c(v: typeof y); - protected d: (a: typeof y) => void; - protected static r: typeof y; - protected static s(a: typeof y): invalid; - protected static get t(): { - foo: string; - bar: string; - }; - protected static set t(a: typeof y); - protected static u: (a: typeof y) => void; - constructor(a: typeof y); -} - -/// [Errors] //// - -derivedClassOverridesProtectedMembers.ts(6,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers.ts(12,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers.ts(22,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers.ts(28,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. - - -==== derivedClassOverridesProtectedMembers.ts (4 errors) ==== - var x: { foo: string; } - var y: { foo: string; bar: string; } - - class Base { - protected a: typeof x; - protected b(a: typeof x) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers.ts:6:15: Add a return type to the method - protected get c() { return x; } - protected set c(v: typeof x) { } - protected d: (a: typeof x) => void; - - protected static r: typeof x; - protected static s(a: typeof x) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers.ts:12:22: Add a return type to the method - protected static get t() { return x; } - protected static set t(v: typeof x) { } - protected static u: (a: typeof x) => void; - - constructor(a: typeof x) { } - } - - class Derived extends Base { - protected a: typeof y; - protected b(a: typeof y) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers.ts:22:15: Add a return type to the method - protected get c() { return y; } - protected set c(v: typeof y) { } - protected d: (a: typeof y) => void; - - protected static r: typeof y; - protected static s(a: typeof y) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers.ts:28:22: Add a return type to the method - protected static get t() { return y; } - protected static set t(a: typeof y) { } - protected static u: (a: typeof y) => void; - - constructor(a: typeof y) { super(x) } - } - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers2.d.ts deleted file mode 100644 index 130a1eebedf1e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers2.d.ts +++ /dev/null @@ -1,260 +0,0 @@ -//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers2.ts] //// - -//// [derivedClassOverridesProtectedMembers2.ts] -var x: { foo: string; } -var y: { foo: string; bar: string; } - -class Base { - protected a: typeof x; - protected b(a: typeof x) { } - protected get c() { return x; } - protected set c(v: typeof x) { } - protected d: (a: typeof x) => void ; - - protected static r: typeof x; - protected static s(a: typeof x) { } - protected static get t() { return x; } - protected static set t(v: typeof x) { } - protected static u: (a: typeof x) => void ; - -constructor(a: typeof x) { } -} - -// Increase visibility of all protected members to public -class Derived extends Base { - a: typeof y; - b(a: typeof y) { } - get c() { return y; } - set c(v: typeof y) { } - d: (a: typeof y) => void; - - static r: typeof y; - static s(a: typeof y) { } - static get t() { return y; } - static set t(a: typeof y) { } - static u: (a: typeof y) => void; - - constructor(a: typeof y) { super(a); } -} - -var d: Derived = new Derived(y); -var r1 = d.a; -var r2 = d.b(y); -var r3 = d.c; -var r3a = d.d; -d.c = y; -var r4 = Derived.r; -var r5 = Derived.s(y); -var r6 = Derived.t; -var r6a = Derived.u; -Derived.t = y; - -class Base2 { - [i: string]: Object; - [i: number]: typeof x; -} - -class Derived2 extends Base2 { - [i: string]: typeof x; - [i: number]: typeof y; -} - -var d2: Derived2; -var r7 = d2['']; -var r8 = d2[1]; - - - -/// [Declarations] //// - - - -//// [derivedClassOverridesProtectedMembers2.d.ts] -declare var x: { - foo: string; -}; -declare var y: { - foo: string; - bar: string; -}; -declare class Base { - protected a: typeof x; - protected b(a: typeof x): invalid; - protected get c(): { - foo: string; - }; - protected set c(v: typeof x); - protected d: (a: typeof x) => void; - protected static r: typeof x; - protected static s(a: typeof x): invalid; - protected static get t(): { - foo: string; - }; - protected static set t(v: typeof x); - protected static u: (a: typeof x) => void; - constructor(a: typeof x); -} -declare class Derived extends Base { - a: typeof y; - b(a: typeof y): invalid; - get c(): { - foo: string; - bar: string; - }; - set c(v: typeof y); - d: (a: typeof y) => void; - static r: typeof y; - static s(a: typeof y): invalid; - static get t(): { - foo: string; - bar: string; - }; - static set t(a: typeof y); - static u: (a: typeof y) => void; - constructor(a: typeof y); -} -declare var d: Derived; -declare var r1: invalid; -declare var r2: invalid; -declare var r3: invalid; -declare var r3a: invalid; -declare var r4: invalid; -declare var r5: invalid; -declare var r6: invalid; -declare var r6a: invalid; -declare class Base2 { - [i: string]: Object; - [i: number]: typeof x; -} -declare class Derived2 extends Base2 { - [i: string]: typeof x; - [i: number]: typeof y; -} -declare var d2: Derived2; -declare var r7: invalid; -declare var r8: invalid; - -/// [Errors] //// - -derivedClassOverridesProtectedMembers2.ts(6,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(12,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(23,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(29,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(38,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(39,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(40,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(41,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(43,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(44,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(45,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(46,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(60,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers2.ts(61,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. - - -==== derivedClassOverridesProtectedMembers2.ts (14 errors) ==== - var x: { foo: string; } - var y: { foo: string; bar: string; } - - class Base { - protected a: typeof x; - protected b(a: typeof x) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers2.ts:6:15: Add a return type to the method - protected get c() { return x; } - protected set c(v: typeof x) { } - protected d: (a: typeof x) => void ; - - protected static r: typeof x; - protected static s(a: typeof x) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers2.ts:12:22: Add a return type to the method - protected static get t() { return x; } - protected static set t(v: typeof x) { } - protected static u: (a: typeof x) => void ; - - constructor(a: typeof x) { } - } - - // Increase visibility of all protected members to public - class Derived extends Base { - a: typeof y; - b(a: typeof y) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers2.ts:23:5: Add a return type to the method - get c() { return y; } - set c(v: typeof y) { } - d: (a: typeof y) => void; - - static r: typeof y; - static s(a: typeof y) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers2.ts:29:12: Add a return type to the method - static get t() { return y; } - static set t(a: typeof y) { } - static u: (a: typeof y) => void; - - constructor(a: typeof y) { super(a); } - } - - var d: Derived = new Derived(y); - var r1 = d.a; - ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:38:5: Add a type annotation to the variable r1. - var r2 = d.b(y); - ~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:39:5: Add a type annotation to the variable r2. - var r3 = d.c; - ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:40:5: Add a type annotation to the variable r3. - var r3a = d.d; - ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:41:5: Add a type annotation to the variable r3a. - d.c = y; - var r4 = Derived.r; - ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:43:5: Add a type annotation to the variable r4. - var r5 = Derived.s(y); - ~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:44:5: Add a type annotation to the variable r5. - var r6 = Derived.t; - ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:45:5: Add a type annotation to the variable r6. - var r6a = Derived.u; - ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:46:5: Add a type annotation to the variable r6a. - Derived.t = y; - - class Base2 { - [i: string]: Object; - [i: number]: typeof x; - } - - class Derived2 extends Base2 { - [i: string]: typeof x; - [i: number]: typeof y; - } - - var d2: Derived2; - var r7 = d2['']; - ~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:60:5: Add a type annotation to the variable r7. - var r8 = d2[1]; - ~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesProtectedMembers2.ts:61:5: Add a type annotation to the variable r8. - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers3.d.ts deleted file mode 100644 index d773c7a161870..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesProtectedMembers3.d.ts +++ /dev/null @@ -1,293 +0,0 @@ -//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts] //// - -//// [derivedClassOverridesProtectedMembers3.ts] -var x: { foo: string; } -var y: { foo: string; bar: string; } - -class Base { - a: typeof x; - b(a: typeof x) { } - get c() { return x; } - set c(v: typeof x) { } - d: (a: typeof x) => void; - - static r: typeof x; - static s(a: typeof x) { } - static get t() { return x; } - static set t(v: typeof x) { } - static u: (a: typeof x) => void; - - constructor(a: typeof x) {} -} - -// Errors -// decrease visibility of all public members to protected -class Derived1 extends Base { - protected a: typeof x; - constructor(a: typeof x) { super(a); } -} - -class Derived2 extends Base { - protected b(a: typeof x) { } - constructor(a: typeof x) { super(a); } -} - -class Derived3 extends Base { - protected get c() { return x; } - constructor(a: typeof x) { super(a); } -} - -class Derived4 extends Base { - protected set c(v: typeof x) { } - constructor(a: typeof x) { super(a); } -} - -class Derived5 extends Base { - protected d: (a: typeof x) => void ; - constructor(a: typeof x) { super(a); } -} - -class Derived6 extends Base { - protected static r: typeof x; - constructor(a: typeof x) { super(a); } -} - -class Derived7 extends Base { - protected static s(a: typeof x) { } - constructor(a: typeof x) { super(a); } -} - -class Derived8 extends Base { - protected static get t() { return x; } - constructor(a: typeof x) { super(a); } -} - -class Derived9 extends Base { - protected static set t(v: typeof x) { } - constructor(a: typeof x) { super(a); } -} - -class Derived10 extends Base { - protected static u: (a: typeof x) => void ; - constructor(a: typeof x) { super(a); } -} - -/// [Declarations] //// - - - -//// [derivedClassOverridesProtectedMembers3.d.ts] -declare var x: { - foo: string; -}; -declare var y: { - foo: string; - bar: string; -}; -declare class Base { - a: typeof x; - b(a: typeof x): invalid; - get c(): { - foo: string; - }; - set c(v: typeof x); - d: (a: typeof x) => void; - static r: typeof x; - static s(a: typeof x): invalid; - static get t(): { - foo: string; - }; - static set t(v: typeof x); - static u: (a: typeof x) => void; - constructor(a: typeof x); -} -declare class Derived1 extends Base { - protected a: typeof x; - constructor(a: typeof x); -} -declare class Derived2 extends Base { - protected b(a: typeof x): invalid; - constructor(a: typeof x); -} -declare class Derived3 extends Base { - protected get c(): invalid; - constructor(a: typeof x); -} -declare class Derived4 extends Base { - protected set c(v: typeof x); - constructor(a: typeof x); -} -declare class Derived5 extends Base { - protected d: (a: typeof x) => void; - constructor(a: typeof x); -} -declare class Derived6 extends Base { - protected static r: typeof x; - constructor(a: typeof x); -} -declare class Derived7 extends Base { - protected static s(a: typeof x): invalid; - constructor(a: typeof x); -} -declare class Derived8 extends Base { - protected static get t(): invalid; - constructor(a: typeof x); -} -declare class Derived9 extends Base { - protected static set t(v: typeof x); - constructor(a: typeof x); -} -declare class Derived10 extends Base { - protected static u: (a: typeof x) => void; - constructor(a: typeof x); -} - -/// [Errors] //// - -derivedClassOverridesProtectedMembers3.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers3.ts(12,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers3.ts(22,7): error TS2415: Class 'Derived1' incorrectly extends base class 'Base'. - Property 'a' is protected in type 'Derived1' but public in type 'Base'. -derivedClassOverridesProtectedMembers3.ts(27,7): error TS2415: Class 'Derived2' incorrectly extends base class 'Base'. - Property 'b' is protected in type 'Derived2' but public in type 'Base'. -derivedClassOverridesProtectedMembers3.ts(28,15): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers3.ts(32,7): error TS2415: Class 'Derived3' incorrectly extends base class 'Base'. - Property 'c' is protected in type 'Derived3' but public in type 'Base'. -derivedClassOverridesProtectedMembers3.ts(33,19): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers3.ts(37,7): error TS2415: Class 'Derived4' incorrectly extends base class 'Base'. - Property 'c' is protected in type 'Derived4' but public in type 'Base'. -derivedClassOverridesProtectedMembers3.ts(42,7): error TS2415: Class 'Derived5' incorrectly extends base class 'Base'. - Property 'd' is protected in type 'Derived5' but public in type 'Base'. -derivedClassOverridesProtectedMembers3.ts(47,7): error TS2417: Class static side 'typeof Derived6' incorrectly extends base class static side 'typeof Base'. - Property 'r' is protected in type 'typeof Derived6' but public in type 'typeof Base'. -derivedClassOverridesProtectedMembers3.ts(52,7): error TS2417: Class static side 'typeof Derived7' incorrectly extends base class static side 'typeof Base'. - Property 's' is protected in type 'typeof Derived7' but public in type 'typeof Base'. -derivedClassOverridesProtectedMembers3.ts(53,22): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers3.ts(57,7): error TS2417: Class static side 'typeof Derived8' incorrectly extends base class static side 'typeof Base'. - Property 't' is protected in type 'typeof Derived8' but public in type 'typeof Base'. -derivedClassOverridesProtectedMembers3.ts(58,26): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesProtectedMembers3.ts(62,7): error TS2417: Class static side 'typeof Derived9' incorrectly extends base class static side 'typeof Base'. - Property 't' is protected in type 'typeof Derived9' but public in type 'typeof Base'. -derivedClassOverridesProtectedMembers3.ts(67,7): error TS2417: Class static side 'typeof Derived10' incorrectly extends base class static side 'typeof Base'. - Property 'u' is protected in type 'typeof Derived10' but public in type 'typeof Base'. - - -==== derivedClassOverridesProtectedMembers3.ts (16 errors) ==== - var x: { foo: string; } - var y: { foo: string; bar: string; } - - class Base { - a: typeof x; - b(a: typeof x) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers3.ts:6:5: Add a return type to the method - get c() { return x; } - set c(v: typeof x) { } - d: (a: typeof x) => void; - - static r: typeof x; - static s(a: typeof x) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers3.ts:12:12: Add a return type to the method - static get t() { return x; } - static set t(v: typeof x) { } - static u: (a: typeof x) => void; - - constructor(a: typeof x) {} - } - - // Errors - // decrease visibility of all public members to protected - class Derived1 extends Base { - ~~~~~~~~ -!!! error TS2415: Class 'Derived1' incorrectly extends base class 'Base'. -!!! error TS2415: Property 'a' is protected in type 'Derived1' but public in type 'Base'. - protected a: typeof x; - constructor(a: typeof x) { super(a); } - } - - class Derived2 extends Base { - ~~~~~~~~ -!!! error TS2415: Class 'Derived2' incorrectly extends base class 'Base'. -!!! error TS2415: Property 'b' is protected in type 'Derived2' but public in type 'Base'. - protected b(a: typeof x) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers3.ts:28:15: Add a return type to the method - constructor(a: typeof x) { super(a); } - } - - class Derived3 extends Base { - ~~~~~~~~ -!!! error TS2415: Class 'Derived3' incorrectly extends base class 'Base'. -!!! error TS2415: Property 'c' is protected in type 'Derived3' but public in type 'Base'. - protected get c() { return x; } - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 derivedClassOverridesProtectedMembers3.ts:33:19: Add a return type to the get accessor declaration. - constructor(a: typeof x) { super(a); } - } - - class Derived4 extends Base { - ~~~~~~~~ -!!! error TS2415: Class 'Derived4' incorrectly extends base class 'Base'. -!!! error TS2415: Property 'c' is protected in type 'Derived4' but public in type 'Base'. - protected set c(v: typeof x) { } - constructor(a: typeof x) { super(a); } - } - - class Derived5 extends Base { - ~~~~~~~~ -!!! error TS2415: Class 'Derived5' incorrectly extends base class 'Base'. -!!! error TS2415: Property 'd' is protected in type 'Derived5' but public in type 'Base'. - protected d: (a: typeof x) => void ; - constructor(a: typeof x) { super(a); } - } - - class Derived6 extends Base { - ~~~~~~~~ -!!! error TS2417: Class static side 'typeof Derived6' incorrectly extends base class static side 'typeof Base'. -!!! error TS2417: Property 'r' is protected in type 'typeof Derived6' but public in type 'typeof Base'. - protected static r: typeof x; - constructor(a: typeof x) { super(a); } - } - - class Derived7 extends Base { - ~~~~~~~~ -!!! error TS2417: Class static side 'typeof Derived7' incorrectly extends base class static side 'typeof Base'. -!!! error TS2417: Property 's' is protected in type 'typeof Derived7' but public in type 'typeof Base'. - protected static s(a: typeof x) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesProtectedMembers3.ts:53:22: Add a return type to the method - constructor(a: typeof x) { super(a); } - } - - class Derived8 extends Base { - ~~~~~~~~ -!!! error TS2417: Class static side 'typeof Derived8' incorrectly extends base class static side 'typeof Base'. -!!! error TS2417: Property 't' is protected in type 'typeof Derived8' but public in type 'typeof Base'. - protected static get t() { return x; } - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 derivedClassOverridesProtectedMembers3.ts:58:26: Add a return type to the get accessor declaration. - constructor(a: typeof x) { super(a); } - } - - class Derived9 extends Base { - ~~~~~~~~ -!!! error TS2417: Class static side 'typeof Derived9' incorrectly extends base class static side 'typeof Base'. -!!! error TS2417: Property 't' is protected in type 'typeof Derived9' but public in type 'typeof Base'. - protected static set t(v: typeof x) { } - constructor(a: typeof x) { super(a); } - } - - class Derived10 extends Base { - ~~~~~~~~~ -!!! error TS2417: Class static side 'typeof Derived10' incorrectly extends base class static side 'typeof Base'. -!!! error TS2417: Property 'u' is protected in type 'typeof Derived10' but public in type 'typeof Base'. - protected static u: (a: typeof x) => void ; - constructor(a: typeof x) { super(a); } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesPublicMembers.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesPublicMembers.d.ts deleted file mode 100644 index 7d69b5dedfdcf..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/derivedClassOverridesPublicMembers.d.ts +++ /dev/null @@ -1,258 +0,0 @@ -//// [tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts] //// - -//// [derivedClassOverridesPublicMembers.ts] -var x: { foo: string; } -var y: { foo: string; bar: string; } - -class Base { - a: typeof x; - b(a: typeof x) { } - get c() { return x; } - set c(v: typeof x) { } - d: (a: typeof x) => void; - - static r: typeof x; - static s(a: typeof x) { } - static get t() { return x; } - static set t(v: typeof x) { } - static u: (a: typeof x) => void; - - constructor(a: typeof x) { } -} - -class Derived extends Base { - a: typeof y; - b(a: typeof y) { } - get c() { return y; } - set c(v: typeof y) { } - d: (a: typeof y) => void; - - static r: typeof y; - static s(a: typeof y) { } - static get t() { return y; } - static set t(a: typeof y) { } - static u: (a: typeof y) => void; - - constructor(a: typeof y) { super(x) } -} - -var d: Derived = new Derived(y); -var r1 = d.a; -var r2 = d.b(y); -var r3 = d.c; -var r3a = d.d; -d.c = y; -var r4 = Derived.r; -var r5 = Derived.s(y); -var r6 = Derived.t; -var r6a = Derived.u; -Derived.t = y; - -class Base2 { - [i: string]: Object; - [i: number]: typeof x; -} - -class Derived2 extends Base2 { - [i: string]: typeof x; - [i: number]: typeof y; -} - -var d2: Derived2; -var r7 = d2['']; -var r8 = d2[1]; - - - -/// [Declarations] //// - - - -//// [derivedClassOverridesPublicMembers.d.ts] -declare var x: { - foo: string; -}; -declare var y: { - foo: string; - bar: string; -}; -declare class Base { - a: typeof x; - b(a: typeof x): invalid; - get c(): { - foo: string; - }; - set c(v: typeof x); - d: (a: typeof x) => void; - static r: typeof x; - static s(a: typeof x): invalid; - static get t(): { - foo: string; - }; - static set t(v: typeof x); - static u: (a: typeof x) => void; - constructor(a: typeof x); -} -declare class Derived extends Base { - a: typeof y; - b(a: typeof y): invalid; - get c(): { - foo: string; - bar: string; - }; - set c(v: typeof y); - d: (a: typeof y) => void; - static r: typeof y; - static s(a: typeof y): invalid; - static get t(): { - foo: string; - bar: string; - }; - static set t(a: typeof y); - static u: (a: typeof y) => void; - constructor(a: typeof y); -} -declare var d: Derived; -declare var r1: invalid; -declare var r2: invalid; -declare var r3: invalid; -declare var r3a: invalid; -declare var r4: invalid; -declare var r5: invalid; -declare var r6: invalid; -declare var r6a: invalid; -declare class Base2 { - [i: string]: Object; - [i: number]: typeof x; -} -declare class Derived2 extends Base2 { - [i: string]: typeof x; - [i: number]: typeof y; -} -declare var d2: Derived2; -declare var r7: invalid; -declare var r8: invalid; - -/// [Errors] //// - -derivedClassOverridesPublicMembers.ts(6,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(12,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(22,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(28,12): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(37,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(38,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(39,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(40,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(42,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(43,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(44,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(45,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(59,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -derivedClassOverridesPublicMembers.ts(60,10): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. - - -==== derivedClassOverridesPublicMembers.ts (14 errors) ==== - var x: { foo: string; } - var y: { foo: string; bar: string; } - - class Base { - a: typeof x; - b(a: typeof x) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesPublicMembers.ts:6:5: Add a return type to the method - get c() { return x; } - set c(v: typeof x) { } - d: (a: typeof x) => void; - - static r: typeof x; - static s(a: typeof x) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesPublicMembers.ts:12:12: Add a return type to the method - static get t() { return x; } - static set t(v: typeof x) { } - static u: (a: typeof x) => void; - - constructor(a: typeof x) { } - } - - class Derived extends Base { - a: typeof y; - b(a: typeof y) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesPublicMembers.ts:22:5: Add a return type to the method - get c() { return y; } - set c(v: typeof y) { } - d: (a: typeof y) => void; - - static r: typeof y; - static s(a: typeof y) { } - ~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 derivedClassOverridesPublicMembers.ts:28:12: Add a return type to the method - static get t() { return y; } - static set t(a: typeof y) { } - static u: (a: typeof y) => void; - - constructor(a: typeof y) { super(x) } - } - - var d: Derived = new Derived(y); - var r1 = d.a; - ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesPublicMembers.ts:37:5: Add a type annotation to the variable r1. - var r2 = d.b(y); - ~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesPublicMembers.ts:38:5: Add a type annotation to the variable r2. - var r3 = d.c; - ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesPublicMembers.ts:39:5: Add a type annotation to the variable r3. - var r3a = d.d; - ~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesPublicMembers.ts:40:5: Add a type annotation to the variable r3a. - d.c = y; - var r4 = Derived.r; - ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesPublicMembers.ts:42:5: Add a type annotation to the variable r4. - var r5 = Derived.s(y); - ~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesPublicMembers.ts:43:5: Add a type annotation to the variable r5. - var r6 = Derived.t; - ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesPublicMembers.ts:44:5: Add a type annotation to the variable r6. - var r6a = Derived.u; - ~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesPublicMembers.ts:45:5: Add a type annotation to the variable r6a. - Derived.t = y; - - class Base2 { - [i: string]: Object; - [i: number]: typeof x; - } - - class Derived2 extends Base2 { - [i: string]: typeof x; - [i: number]: typeof y; - } - - var d2: Derived2; - var r7 = d2['']; - ~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesPublicMembers.ts:59:5: Add a type annotation to the variable r7. - var r8 = d2[1]; - ~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 derivedClassOverridesPublicMembers.ts:60:5: Add a type annotation to the variable r8. - - \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts deleted file mode 100644 index 63f451503a866..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts +++ /dev/null @@ -1,211 +0,0 @@ -//// [tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts] //// - -//// [modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts] -// All will be error from using ES6 features but only include ES5 library -// Using Es6 array -function f(x: number, y: number, z: number) { - return Array.from(arguments); -} - -f(1, 2, 3); // no error - -// Using ES6 collection -var m = new Map(); -m.clear(); -// Using ES6 iterable -m.keys(); - -// Using ES6 function -function Baz() { } -Baz.name; - -// Using ES6 math -Math.sign(1); - -// Using ES6 object -var o = { - a: 2, - [Symbol.hasInstance](value: any) { - return false; - } -}; -o.hasOwnProperty(Symbol.hasInstance); - -// Using Es6 proxy -var t = {} -var p = new Proxy(t, {}); - -// Using ES6 reflect -Reflect.isExtensible({}); - -// Using Es6 regexp -var reg = new RegExp("/s"); -reg.flags; - -// Using ES6 string -var str = "Hello world"; -str.includes("hello", 0); - -// Using ES6 symbol -var s = Symbol(); - -// Using ES6 wellknown-symbol -const o1 = { - [Symbol.hasInstance](value: any) { - return false; - } -} - -/// [Declarations] //// - - - -//// [modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.d.ts] -declare function f(x: number, y: number, z: number): invalid; -declare var m: invalid; -declare function Baz(): invalid; -declare var o: invalid; -declare var t: {}; -declare var p: invalid; -declare var reg: invalid; -declare var str: string; -declare var s: invalid; -declare const o1: invalid; - -/// [Errors] //// - -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(3,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(4,18): error TS2550: Property 'from' does not exist on type 'ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(10,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(10,13): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(16,10): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(17,5): error TS2339: Property 'name' does not exist on type '() => void'. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(20,6): error TS2550: Property 'sign' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(29,18): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,13): error TS2304: Cannot find name 'Proxy'. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(36,1): error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(39,11): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(40,5): error TS2550: Property 'flags' does not exist on type 'RegExp'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(44,5): error TS2550: Property 'includes' does not exist on type 'string'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - -==== modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts (22 errors) ==== - // All will be error from using ES6 features but only include ES5 library - // Using Es6 array - function f(x: number, y: number, z: number) { - ~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:3:10: Add a return type to the function declaration. - return Array.from(arguments); - ~~~~ -!!! error TS2550: Property 'from' does not exist on type 'ArrayConstructor'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. - } - - f(1, 2, 3); // no error - - // Using ES6 collection - var m = new Map(); - ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:10:5: Add a type annotation to the variable m. - ~~~ -!!! error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. - m.clear(); - // Using ES6 iterable - m.keys(); - - // Using ES6 function - function Baz() { } - ~~~ -!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9031 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:16:10: Add a return type to the function declaration. - Baz.name; - ~~~~ -!!! error TS2339: Property 'name' does not exist on type '() => void'. - - // Using ES6 math - Math.sign(1); - ~~~~ -!!! error TS2550: Property 'sign' does not exist on type 'Math'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. - - // Using ES6 object - var o = { - a: 2, - [Symbol.hasInstance](value: any) { - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:23:5: Add a type annotation to the variable o. -!!! related TS9034 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:25:5: Add a return type to the method - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:23:5: Add a type annotation to the variable o. - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - return false; - } - }; - o.hasOwnProperty(Symbol.hasInstance); - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - - // Using Es6 proxy - var t = {} - var p = new Proxy(t, {}); - ~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:33:5: Add a type annotation to the variable p. - ~~~~~ -!!! error TS2304: Cannot find name 'Proxy'. - - // Using ES6 reflect - Reflect.isExtensible({}); - ~~~~~~~ -!!! error TS2583: Cannot find name 'Reflect'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. - - // Using Es6 regexp - var reg = new RegExp("/s"); - ~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:39:5: Add a type annotation to the variable reg. - reg.flags; - ~~~~~ -!!! error TS2550: Property 'flags' does not exist on type 'RegExp'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. - - // Using ES6 string - var str = "Hello world"; - str.includes("hello", 0); - ~~~~~~~~ -!!! error TS2550: Property 'includes' does not exist on type 'string'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. - - // Using ES6 symbol - var s = Symbol(); - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - ~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:47:5: Add a type annotation to the variable s. - - // Using ES6 wellknown-symbol - const o1 = { - [Symbol.hasInstance](value: any) { - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:50:7: Add a type annotation to the variable o1. -!!! related TS9034 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:51:5: Add a return type to the method - ~~~~~~~~~~~~~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts:50:7: Add a type annotation to the variable o1. - ~~~~~~ -!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later. - return false; - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName11.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName11.d.ts deleted file mode 100644 index 7560d526e665f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName11.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts] //// - -//// [parserComputedPropertyName11.ts] -class C { - [e](); -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName11.d.ts] -declare class C { -} - -/// [Errors] //// - -parserComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -parserComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName11.ts (2 errors) ==== - class C { - [e](); - ~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ -!!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName12.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName12.d.ts deleted file mode 100644 index 18f0c0f9afec8..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName12.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts] //// - -//// [parserComputedPropertyName12.ts] -class C { - [e]() { } -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName12.d.ts] -declare class C { -} - -/// [Errors] //// - -parserComputedPropertyName12.ts(2,5): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName12.ts (1 errors) ==== - class C { - [e]() { } - ~ -!!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName17.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName17.d.ts deleted file mode 100644 index ce144e1627dfb..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName17.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts] //// - -//// [parserComputedPropertyName17.ts] -var v = { set [e](v) { } } - -/// [Declarations] //// - - - -//// [parserComputedPropertyName17.d.ts] -declare var v: invalid; - -/// [Errors] //// - -parserComputedPropertyName17.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -parserComputedPropertyName17.ts(1,16): error TS2304: Cannot find name 'e'. -parserComputedPropertyName17.ts(1,19): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. - - -==== parserComputedPropertyName17.ts (3 errors) ==== - var v = { set [e](v) { } } - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 parserComputedPropertyName17.ts:1:5: Add a type annotation to the variable v. - ~ -!!! error TS2304: Cannot find name 'e'. - ~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9033 parserComputedPropertyName17.ts:1:15: Add a type to parameter of the set accessor declaration. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName3.d.ts deleted file mode 100644 index b152c535c71bb..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName3.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts] //// - -//// [parserComputedPropertyName3.ts] -var v = { [e]() { } }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName3.d.ts] -declare var v: invalid; - -/// [Errors] //// - -parserComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -parserComputedPropertyName3.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -parserComputedPropertyName3.ts(1,12): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName3.ts (3 errors) ==== - var v = { [e]() { } }; - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 parserComputedPropertyName3.ts:1:5: Add a type annotation to the variable v. -!!! related TS9034 parserComputedPropertyName3.ts:1:11: Add a return type to the method - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 parserComputedPropertyName3.ts:1:5: Add a type annotation to the variable v. - ~ -!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName38.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName38.d.ts deleted file mode 100644 index 9ec08329abc86..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName38.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts] //// - -//// [parserComputedPropertyName38.ts] -class C { - [public]() { } -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName38.d.ts] -declare class C { -} - -/// [Errors] //// - -parserComputedPropertyName38.ts(2,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. -parserComputedPropertyName38.ts(2,6): error TS2304: Cannot find name 'public'. - - -==== parserComputedPropertyName38.ts (2 errors) ==== - class C { - [public]() { } - ~~~~~~ -!!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. - ~~~~~~ -!!! error TS2304: Cannot find name 'public'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName39.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName39.d.ts deleted file mode 100644 index 9cb8fda433a53..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName39.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts] //// - -//// [parserComputedPropertyName39.ts] -"use strict"; -class C { - [public]() { } -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName39.d.ts] -declare class C { -} - -/// [Errors] //// - -parserComputedPropertyName39.ts(3,6): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. -parserComputedPropertyName39.ts(3,6): error TS2304: Cannot find name 'public'. - - -==== parserComputedPropertyName39.ts (2 errors) ==== - "use strict"; - class C { - [public]() { } - ~~~~~~ -!!! error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. - ~~~~~~ -!!! error TS2304: Cannot find name 'public'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName4.d.ts deleted file mode 100644 index 08e459a246145..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName4.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts] //// - -//// [parserComputedPropertyName4.ts] -var v = { get [e]() { } }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName4.d.ts] -declare var v: invalid; - -/// [Errors] //// - -parserComputedPropertyName4.ts(1,15): error TS2378: A 'get' accessor must return a value. -parserComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -parserComputedPropertyName4.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -parserComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName4.ts (4 errors) ==== - var v = { get [e]() { } }; - ~~~ -!!! error TS2378: A 'get' accessor must return a value. - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 parserComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 parserComputedPropertyName4.ts:1:5: Add a type annotation to the variable v. - ~ -!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName5.d.ts deleted file mode 100644 index c3c215ae91b95..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName5.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName5.ts] //// - -//// [parserComputedPropertyName5.ts] -var v = { public get [e]() { } }; - -/// [Declarations] //// - - - -//// [parserComputedPropertyName5.d.ts] -declare var v: invalid; - -/// [Errors] //// - -parserComputedPropertyName5.ts(1,11): error TS1042: 'public' modifier cannot be used here. -parserComputedPropertyName5.ts(1,22): error TS2378: A 'get' accessor must return a value. -parserComputedPropertyName5.ts(1,22): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -parserComputedPropertyName5.ts(1,22): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -parserComputedPropertyName5.ts(1,23): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName5.ts (5 errors) ==== - var v = { public get [e]() { } }; - ~~~~~~ -!!! error TS1042: 'public' modifier cannot be used here. - ~~~ -!!! error TS2378: A 'get' accessor must return a value. - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 parserComputedPropertyName5.ts:1:22: Add a return type to the get accessor declaration. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 parserComputedPropertyName5.ts:1:5: Add a type annotation to the variable v. - ~ -!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName7.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName7.d.ts deleted file mode 100644 index f851cf80bc24f..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName7.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts] //// - -//// [parserComputedPropertyName7.ts] -class C { - [e] -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName7.d.ts] -declare class C { -} - -/// [Errors] //// - -parserComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName7.ts (2 errors) ==== - class C { - [e] - ~~~ -!!! 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 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName8.d.ts deleted file mode 100644 index 8334c285ef8c7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserComputedPropertyName8.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts] //// - -//// [parserComputedPropertyName8.ts] -class C { - public [e] -} - -/// [Declarations] //// - - - -//// [parserComputedPropertyName8.d.ts] -declare class C { -} - -/// [Errors] //// - -parserComputedPropertyName8.ts(2,11): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserComputedPropertyName8.ts(2,12): error TS2304: Cannot find name 'e'. - - -==== parserComputedPropertyName8.ts (2 errors) ==== - class C { - public [e] - ~~~ -!!! 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 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName11.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName11.d.ts deleted file mode 100644 index b3c5b9ce721c9..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName11.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts] //// - -//// [parserES5ComputedPropertyName11.ts] -class C { - [e](); -} - -/// [Declarations] //// - - - -//// [parserES5ComputedPropertyName11.d.ts] -declare class C { -} - -/// [Errors] //// - -parserES5ComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. -parserES5ComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'. - - -==== parserES5ComputedPropertyName11.ts (2 errors) ==== - class C { - [e](); - ~~~ -!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type. - ~ -!!! error TS2304: Cannot find name 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName3.d.ts deleted file mode 100644 index 45f6bb4f18b99..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName3.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts] //// - -//// [parserES5ComputedPropertyName3.ts] -var v = { [e]() { } }; - -/// [Declarations] //// - - - -//// [parserES5ComputedPropertyName3.d.ts] -declare var v: invalid; - -/// [Errors] //// - -parserES5ComputedPropertyName3.ts(1,11): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -parserES5ComputedPropertyName3.ts(1,11): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -parserES5ComputedPropertyName3.ts(1,12): error TS2304: Cannot find name 'e'. - - -==== parserES5ComputedPropertyName3.ts (3 errors) ==== - var v = { [e]() { } }; - ~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9027 parserES5ComputedPropertyName3.ts:1:5: Add a type annotation to the variable v. -!!! related TS9034 parserES5ComputedPropertyName3.ts:1:11: Add a return type to the method - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 parserES5ComputedPropertyName3.ts:1:5: Add a type annotation to the variable v. - ~ -!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName4.d.ts deleted file mode 100644 index 3bd78e32530d3..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName4.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts] //// - -//// [parserES5ComputedPropertyName4.ts] -var v = { get [e]() { } }; - -/// [Declarations] //// - - - -//// [parserES5ComputedPropertyName4.d.ts] -declare var v: invalid; - -/// [Errors] //// - -parserES5ComputedPropertyName4.ts(1,15): error TS2378: A 'get' accessor must return a value. -parserES5ComputedPropertyName4.ts(1,15): error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -parserES5ComputedPropertyName4.ts(1,15): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -parserES5ComputedPropertyName4.ts(1,16): error TS2304: Cannot find name 'e'. - - -==== parserES5ComputedPropertyName4.ts (4 errors) ==== - var v = { get [e]() { } }; - ~~~ -!!! error TS2378: A 'get' accessor must return a value. - ~~~ -!!! error TS9009: At least one accessor must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9032 parserES5ComputedPropertyName4.ts:1:15: Add a return type to the get accessor declaration. - ~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -!!! related TS9027 parserES5ComputedPropertyName4.ts:1:5: Add a type annotation to the variable v. - ~ -!!! error TS2304: Cannot find name 'e'. \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName7.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName7.d.ts deleted file mode 100644 index a60411aaf2a98..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parserES5ComputedPropertyName7.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -//// [tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts] //// - -//// [parserES5ComputedPropertyName7.ts] -class C { - [e] -} - -/// [Declarations] //// - - - -//// [parserES5ComputedPropertyName7.d.ts] -declare class C { -} - -/// [Errors] //// - -parserES5ComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type. -parserES5ComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'. - - -==== parserES5ComputedPropertyName7.ts (2 errors) ==== - class C { - [e] - ~~~ -!!! 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 'e'. - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess1.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess1.d.ts deleted file mode 100644 index adfffcd1e5e40..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess1.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess1.ts] //// - -//// [superSymbolIndexedAccess1.ts] -var symbol = Symbol.for('myThing'); - -class Foo { - [symbol]() { - return 0; - } -} - -class Bar extends Foo { - [symbol]() { - return super[symbol](); - } -} - -/// [Declarations] //// - - - -//// [superSymbolIndexedAccess1.d.ts] -declare var symbol: invalid; -declare class Foo { -} -declare class Bar extends Foo { -} - -/// [Errors] //// - -superSymbolIndexedAccess1.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -superSymbolIndexedAccess1.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -superSymbolIndexedAccess1.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== superSymbolIndexedAccess1.ts (3 errors) ==== - var symbol = Symbol.for('myThing'); - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 superSymbolIndexedAccess1.ts:1:5: Add a type annotation to the variable symbol. - - class Foo { - [symbol]() { - ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - return 0; - } - } - - class Bar extends Foo { - [symbol]() { - ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - return super[symbol](); - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess3.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess3.d.ts deleted file mode 100644 index 4d7e6275b50af..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess3.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess3.ts] //// - -//// [superSymbolIndexedAccess3.ts] -var symbol = Symbol.for('myThing'); - -class Foo { - [symbol]() { - return 0; - } -} - -class Bar extends Foo { - [symbol]() { - return super[Bar](); - } -} - -/// [Declarations] //// - - - -//// [superSymbolIndexedAccess3.d.ts] -declare var symbol: invalid; -declare class Foo { -} -declare class Bar extends Foo { -} - -/// [Errors] //// - -superSymbolIndexedAccess3.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -superSymbolIndexedAccess3.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -superSymbolIndexedAccess3.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -superSymbolIndexedAccess3.ts(11,22): error TS2538: Type 'typeof Bar' cannot be used as an index type. - - -==== superSymbolIndexedAccess3.ts (4 errors) ==== - var symbol = Symbol.for('myThing'); - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 superSymbolIndexedAccess3.ts:1:5: Add a type annotation to the variable symbol. - - class Foo { - [symbol]() { - ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - return 0; - } - } - - class Bar extends Foo { - [symbol]() { - ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - return super[Bar](); - ~~~ -!!! error TS2538: Type 'typeof Bar' cannot be used as an index type. - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess4.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess4.d.ts deleted file mode 100644 index be51df8df1074..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess4.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess4.ts] //// - -//// [superSymbolIndexedAccess4.ts] -var symbol = Symbol.for('myThing'); - -class Bar { - [symbol]() { - return super[symbol](); - } -} - -/// [Declarations] //// - - - -//// [superSymbolIndexedAccess4.d.ts] -declare var symbol: invalid; -declare class Bar { -} - -/// [Errors] //// - -superSymbolIndexedAccess4.ts(1,14): error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -superSymbolIndexedAccess4.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -superSymbolIndexedAccess4.ts(5,16): error TS2335: 'super' can only be referenced in a derived class. - - -==== superSymbolIndexedAccess4.ts (3 errors) ==== - var symbol = Symbol.for('myThing'); - ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9010: Variable must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9027 superSymbolIndexedAccess4.ts:1:5: Add a type annotation to the variable symbol. - - class Bar { - [symbol]() { - ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - return super[symbol](); - ~~~~~ -!!! error TS2335: 'super' can only be referenced in a derived class. - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess5.d.ts deleted file mode 100644 index b4f2e0a466a4a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess5.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess5.ts] //// - -//// [superSymbolIndexedAccess5.ts] -var symbol: any; - -class Foo { - [symbol]() { - return 0; - } -} - -class Bar extends Foo { - [symbol]() { - return super[symbol](); - } -} - -/// [Declarations] //// - - - -//// [superSymbolIndexedAccess5.d.ts] -declare var symbol: any; -declare class Foo { -} -declare class Bar extends Foo { -} - -/// [Errors] //// - -superSymbolIndexedAccess5.ts(4,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -superSymbolIndexedAccess5.ts(10,5): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== superSymbolIndexedAccess5.ts (2 errors) ==== - var symbol: any; - - class Foo { - [symbol]() { - ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - return 0; - } - } - - class Bar extends Foo { - [symbol]() { - ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - return super[symbol](); - } - } \ No newline at end of file diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess6.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess6.d.ts deleted file mode 100644 index 628f2c7be6b59..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/superSymbolIndexedAccess6.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -//// [tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess6.ts] //// - -//// [superSymbolIndexedAccess6.ts] -var symbol: any; - -class Foo { - static [symbol]() { - return 0; - } -} - -class Bar extends Foo { - static [symbol]() { - return super[symbol](); - } -} - -/// [Declarations] //// - - - -//// [superSymbolIndexedAccess6.d.ts] -declare var symbol: any; -declare class Foo { -} -declare class Bar extends Foo { -} - -/// [Errors] //// - -superSymbolIndexedAccess6.ts(4,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. -superSymbolIndexedAccess6.ts(10,12): error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - - -==== superSymbolIndexedAccess6.ts (2 errors) ==== - var symbol: any; - - class Foo { - static [symbol]() { - ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - return 0; - } - } - - class Bar extends Foo { - static [symbol]() { - ~~~~~~~~ -!!! error TS9014: Computed properties must be number or string literals, variables or dotted expressions with --isolatedDeclarations. - return super[symbol](); - } - } \ No newline at end of file From d27c7848e85fcc50e0e87413ec0e2fdc2f1ed3c4 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 12 Jan 2024 14:50:30 +0000 Subject: [PATCH 206/224] Added sources to baseline to show auto-fixed code. --- src/harness/harnessIO.ts | 23 +- ...lternativeContainingModules1.d.ts.map.diff | 16 + ...lternativeContainingModules2.d.ts.map.diff | 16 + ...clarationEmitUsingTypeAlias1.d.ts.map.diff | 16 + ...dReturnTypeErrorInReturnStatement.d.ts.map | 7 + .../dte/coAndContraVariantInferences.d.ts.map | 35 ++ .../auto-fixed/dte/commentsVarDecl.d.ts.map | 44 +- .../auto-fixed/dte/conditionalTypes1.d.ts.map | 371 +++++++++++++++ .../auto-fixed/dte/constAssertions.d.ts.map | 143 ++++++ ...edStringLiteralsInJsxAttributes01.d.ts.map | 18 +- .../dte/declFileEmitDeclarationOnly.d.ts.map | 13 + .../declarationEmitAliasExportStar.d.ts.map | 7 + ...rationEmitBundleWithAmbientReferences.d.ts | 6 +- ...ationEmitCommonJsModuleReferencedType.d.ts | 12 +- ...mputedNameCausesImportToBePainted.d.ts.map | 14 +- ...mitCrossFileImportTypeOfAmbientModule.d.ts | 6 +- ...tDistributiveConditionalWithInfer.d.ts.map | 5 + ...nEmitExpandoWithGenericConstraint.d.ts.map | 19 +- ...EmitExportAliasVisibiilityMarking.d.ts.map | 20 + ...ationEmitForGlobalishSpecifierSymlink.d.ts | 16 +- ...tionEmitForGlobalishSpecifierSymlink2.d.ts | 10 +- ...eclarationEmitGlobalThisPreserved.d.ts.map | 108 +++++ ...ionEmitMappedPrivateTypeTypeParameter.d.ts | 4 +- .../declarationEmitNameConflicts3.d.ts.map | 28 +- ...rationEmitObjectAssignedDefaultExport.d.ts | 4 +- .../declarationEmitOptionalMethod.d.ts.map | 9 +- .../declarationEmitParameterProperty.d.ts.map | 5 + ...mitPrefersPathKindBasedOnBundling.d.ts.map | 17 + ...itPrefersPathKindBasedOnBundling2.d.ts.map | 17 + ...ecursiveConditionalAliasPreserved.d.ts.map | 101 ++++ ...arationEmitReexportedSymlinkReference.d.ts | 16 +- ...rationEmitReexportedSymlinkReference2.d.ts | 18 +- ...rationEmitReexportedSymlinkReference3.d.ts | 16 +- ...larationEmitRetainsJsdocyComments.d.ts.map | 55 +++ ...ionEmitReusesLambdaParameterNodes.d.ts.map | 9 + .../declarationEmitThisPredicates02.d.ts.map | 14 +- ...itThisPredicatesWithPrivateName02.d.ts.map | 14 +- ...TupleRestSignatureLeadingVariadic.d.ts.map | 3 +- ...nEmitTypeAliasWithTypeParameters1.d.ts.map | 5 +- ...nEmitTypeAliasWithTypeParameters2.d.ts.map | 6 +- ...EmitTypeParameterNameInOuterScope.d.ts.map | 14 + ...peParameterNameShadowedInternally.d.ts.map | 5 + ...singAlternativeContainingModules1.d.ts.map | 263 +++++++++++ ...singAlternativeContainingModules2.d.ts.map | 263 +++++++++++ .../declarationEmitUsingTypeAlias1.d.ts.map | 47 ++ ...tionEmitWithInvalidPackageJsonTypings.d.ts | 6 +- ...AddsUndefinedWithStrictNullChecks.d.ts.map | 59 +++ .../dte/destructuringInFunctionType.d.ts.map | 50 ++ .../dte/dynamicNamesErrors.d.ts.map | 61 ++- .../dte/emitMethodCalledNew.d.ts.map | 12 + .../dte/emptyTuplesTypeAssertion01.d.ts.map | 4 +- .../dte/emptyTuplesTypeAssertion02.d.ts.map | 4 +- .../es6ImportNamedImportWithExport.d.ts.map | 37 ++ .../dte/exhaustiveSwitchStatements1.d.ts.map | 251 +++++++++- ...ssignmentMembersVisibleInAugmentation.d.ts | 6 +- .../flatArrayNoExcessiveStackDepth.d.ts.map | 22 + .../dte/genericContextualTypes1.d.ts.map | 50 ++ .../auto-fixed/dte/indexSignatures1.d.ts.map | 338 ++++++++++++++ .../dte/intraExpressionInferences.d.ts.map | 347 ++++++++++++++ ...olatedDeclarationBinderSignatures.d.ts.map | 97 ++++ .../isomorphicMappedTypeInference.d.ts.map | 209 +++++++++ .../leaveOptionalParameterAsWritten.d.ts.map | 17 +- ...sExportsSpecifierGenerationConditions.d.ts | 8 +- .../dte/mappedTypeConstraints2.d.ts.map | 58 +++ .../mappedTypeGenericIndexedAccess.d.ts.map | 44 ++ .../dte/mixinClassesAnnotated.d.ts.map | 68 +++ ...portStarShadowingGlobalIsNameable.d.ts.map | 23 + .../dte/nodeModuleReexportFromDottedPath.d.ts | 6 +- ...portHelpersCollisions2(module=node16).d.ts | 4 +- ...rtHelpersCollisions2(module=nodenext).d.ts | 4 +- ...cksSpecifierResolution(module=node16).d.ts | 6 +- ...sSpecifierResolution(module=nodenext).d.ts | 6 +- ...ModulesExportsSourceTs(module=node16).d.ts | 6 +- ...dulesExportsSourceTs(module=nodenext).d.ts | 6 +- ...erGenerationConditions(module=node16).d.ts | 6 +- ...GenerationConditions(module=nodenext).d.ts | 6 +- ...ierGenerationDirectory(module=node16).d.ts | 6 +- ...rGenerationDirectory(module=nodenext).d.ts | 6 +- ...ifierGenerationPattern(module=node16).d.ts | 6 +- ...ierGenerationPattern(module=nodenext).d.ts | 6 +- ...ulesForbidenSyntax(module=node16).d.ts.map | 66 ++- ...esForbidenSyntax(module=nodenext).d.ts.map | 66 ++- ...dulesImportAssignments(module=node16).d.ts | 4 +- ...lesImportAssignments(module=nodenext).d.ts | 4 +- ...ypeModeDeclarationEmit(module=node16).d.ts | 8 +- ...eModeDeclarationEmit(module=nodenext).d.ts | 8 +- ...portHelpersCollisions2(module=node16).d.ts | 4 +- ...rtHelpersCollisions2(module=nodenext).d.ts | 4 +- ...portHelpersCollisions3(module=node16).d.ts | 4 +- ...rtHelpersCollisions3(module=nodenext).d.ts | 4 +- ...peModeDeclarationEmit1(module=node16).d.ts | 8 +- ...ModeDeclarationEmit1(module=nodenext).d.ts | 8 +- .../auto-fixed/dte/optionalMethods.d.ts.map | 56 +++ .../dte/optionalProperties01.d.ts.map | 9 + ...rameterDestructuringObjectLiteral.d.ts.map | 10 + ...isDoesNotBlockAliasSymbolCreation.d.ts.map | 17 + ...portWrittenCorrectlyInDeclaration.d.ts.map | 16 + .../dte/symbolDeclarationEmit10.d.ts.map | 6 +- .../dte/symbolDeclarationEmit8.d.ts.map | 5 +- .../dte/symbolDeclarationEmit9.d.ts.map | 5 +- ...nkDeclarationEmitModuleNamesImportRef.d.ts | 8 +- ...rMismatchingPolyfillsWorkTogether.d.ts.map | 12 +- .../dte/templateLiteralsInTypes.d.ts.map | 4 + .../dte/thisTypeInObjectLiterals2.d.ts.map | 263 +++++++++++ .../dte/trackedSymbolsNoCrash.d.ts.map | 316 +++++++++++++ .../dte/typeGuardFunctionOfFormThis.d.ts.map | 143 ++++++ .../dte/typeofImportTypeOnlyExport.d.ts.map | 22 + ...ypesVersionsDeclarationEmit.multiFile.d.ts | 10 +- ...tionEmit.multiFileBackReferenceToSelf.d.ts | 10 +- ...Emit.multiFileBackReferenceToUnmapped.d.ts | 8 +- .../auto-fixed/dte/variadicTuples1.d.ts.map | 437 ++++++++++++++++++ .../dte/weakTypesAndLiterals01.d.ts.map | 48 ++ ...dReturnTypeErrorInReturnStatement.d.ts.map | 7 + .../tsc/coAndContraVariantInferences.d.ts.map | 35 ++ .../auto-fixed/tsc/commentsVarDecl.d.ts.map | 44 +- .../auto-fixed/tsc/conditionalTypes1.d.ts.map | 371 +++++++++++++++ .../auto-fixed/tsc/constAssertions.d.ts.map | 143 ++++++ ...edStringLiteralsInJsxAttributes01.d.ts.map | 18 +- .../tsc/declFileEmitDeclarationOnly.d.ts.map | 13 + .../declarationEmitAliasExportStar.d.ts.map | 7 + ...rationEmitBundleWithAmbientReferences.d.ts | 6 +- ...ationEmitCommonJsModuleReferencedType.d.ts | 12 +- ...mputedNameCausesImportToBePainted.d.ts.map | 14 +- ...mitCrossFileImportTypeOfAmbientModule.d.ts | 6 +- ...tDistributiveConditionalWithInfer.d.ts.map | 5 + ...nEmitExpandoWithGenericConstraint.d.ts.map | 19 +- ...EmitExportAliasVisibiilityMarking.d.ts.map | 20 + ...ationEmitForGlobalishSpecifierSymlink.d.ts | 16 +- ...tionEmitForGlobalishSpecifierSymlink2.d.ts | 10 +- ...eclarationEmitGlobalThisPreserved.d.ts.map | 108 +++++ ...ionEmitMappedPrivateTypeTypeParameter.d.ts | 4 +- .../declarationEmitNameConflicts3.d.ts.map | 28 +- ...rationEmitObjectAssignedDefaultExport.d.ts | 4 +- .../declarationEmitOptionalMethod.d.ts.map | 9 +- .../declarationEmitParameterProperty.d.ts.map | 5 + ...mitPrefersPathKindBasedOnBundling.d.ts.map | 17 + ...itPrefersPathKindBasedOnBundling2.d.ts.map | 17 + ...ecursiveConditionalAliasPreserved.d.ts.map | 101 ++++ ...arationEmitReexportedSymlinkReference.d.ts | 16 +- ...rationEmitReexportedSymlinkReference2.d.ts | 18 +- ...rationEmitReexportedSymlinkReference3.d.ts | 16 +- ...larationEmitRetainsJsdocyComments.d.ts.map | 55 +++ ...ionEmitReusesLambdaParameterNodes.d.ts.map | 9 + .../declarationEmitThisPredicates02.d.ts.map | 14 +- ...itThisPredicatesWithPrivateName02.d.ts.map | 14 +- ...TupleRestSignatureLeadingVariadic.d.ts.map | 3 +- ...nEmitTypeAliasWithTypeParameters1.d.ts.map | 5 +- ...nEmitTypeAliasWithTypeParameters2.d.ts.map | 6 +- ...EmitTypeParameterNameInOuterScope.d.ts.map | 14 + ...peParameterNameShadowedInternally.d.ts.map | 5 + ...singAlternativeContainingModules1.d.ts.map | 263 +++++++++++ ...singAlternativeContainingModules2.d.ts.map | 263 +++++++++++ .../declarationEmitUsingTypeAlias1.d.ts.map | 47 ++ ...tionEmitWithInvalidPackageJsonTypings.d.ts | 6 +- ...AddsUndefinedWithStrictNullChecks.d.ts.map | 59 +++ .../tsc/destructuringInFunctionType.d.ts.map | 50 ++ .../tsc/dynamicNamesErrors.d.ts.map | 61 ++- .../tsc/emitMethodCalledNew.d.ts.map | 12 + .../tsc/emptyTuplesTypeAssertion01.d.ts.map | 4 +- .../tsc/emptyTuplesTypeAssertion02.d.ts.map | 4 +- .../es6ImportNamedImportWithExport.d.ts.map | 37 ++ .../tsc/exhaustiveSwitchStatements1.d.ts.map | 251 +++++++++- ...ssignmentMembersVisibleInAugmentation.d.ts | 6 +- .../flatArrayNoExcessiveStackDepth.d.ts.map | 22 + .../tsc/genericContextualTypes1.d.ts.map | 50 ++ .../auto-fixed/tsc/indexSignatures1.d.ts.map | 338 ++++++++++++++ .../tsc/intraExpressionInferences.d.ts.map | 347 ++++++++++++++ ...olatedDeclarationBinderSignatures.d.ts.map | 97 ++++ .../isomorphicMappedTypeInference.d.ts.map | 209 +++++++++ .../leaveOptionalParameterAsWritten.d.ts.map | 17 +- ...sExportsSpecifierGenerationConditions.d.ts | 8 +- .../tsc/mappedTypeConstraints2.d.ts.map | 58 +++ .../mappedTypeGenericIndexedAccess.d.ts.map | 44 ++ .../tsc/mixinClassesAnnotated.d.ts.map | 68 +++ ...portStarShadowingGlobalIsNameable.d.ts.map | 23 + .../tsc/nodeModuleReexportFromDottedPath.d.ts | 6 +- ...portHelpersCollisions2(module=node16).d.ts | 4 +- ...rtHelpersCollisions2(module=nodenext).d.ts | 4 +- ...cksSpecifierResolution(module=node16).d.ts | 6 +- ...sSpecifierResolution(module=nodenext).d.ts | 6 +- ...ModulesExportsSourceTs(module=node16).d.ts | 6 +- ...dulesExportsSourceTs(module=nodenext).d.ts | 6 +- ...erGenerationConditions(module=node16).d.ts | 6 +- ...GenerationConditions(module=nodenext).d.ts | 6 +- ...ierGenerationDirectory(module=node16).d.ts | 6 +- ...rGenerationDirectory(module=nodenext).d.ts | 6 +- ...ifierGenerationPattern(module=node16).d.ts | 6 +- ...ierGenerationPattern(module=nodenext).d.ts | 6 +- ...ulesForbidenSyntax(module=node16).d.ts.map | 66 ++- ...esForbidenSyntax(module=nodenext).d.ts.map | 66 ++- ...dulesImportAssignments(module=node16).d.ts | 4 +- ...lesImportAssignments(module=nodenext).d.ts | 4 +- ...ypeModeDeclarationEmit(module=node16).d.ts | 8 +- ...eModeDeclarationEmit(module=nodenext).d.ts | 8 +- ...portHelpersCollisions2(module=node16).d.ts | 4 +- ...rtHelpersCollisions2(module=nodenext).d.ts | 4 +- ...portHelpersCollisions3(module=node16).d.ts | 4 +- ...rtHelpersCollisions3(module=nodenext).d.ts | 4 +- ...peModeDeclarationEmit1(module=node16).d.ts | 8 +- ...ModeDeclarationEmit1(module=nodenext).d.ts | 8 +- .../auto-fixed/tsc/optionalMethods.d.ts.map | 56 +++ .../tsc/optionalProperties01.d.ts.map | 9 + ...rameterDestructuringObjectLiteral.d.ts.map | 10 + ...isDoesNotBlockAliasSymbolCreation.d.ts.map | 17 + ...portWrittenCorrectlyInDeclaration.d.ts.map | 16 + .../tsc/symbolDeclarationEmit10.d.ts.map | 6 +- .../tsc/symbolDeclarationEmit8.d.ts.map | 5 +- .../tsc/symbolDeclarationEmit9.d.ts.map | 5 +- ...nkDeclarationEmitModuleNamesImportRef.d.ts | 8 +- ...rMismatchingPolyfillsWorkTogether.d.ts.map | 12 +- .../tsc/templateLiteralsInTypes.d.ts.map | 4 + .../tsc/thisTypeInObjectLiterals2.d.ts.map | 263 +++++++++++ .../tsc/trackedSymbolsNoCrash.d.ts.map | 316 +++++++++++++ .../tsc/typeGuardFunctionOfFormThis.d.ts.map | 143 ++++++ .../tsc/typeofImportTypeOnlyExport.d.ts.map | 22 + ...ypesVersionsDeclarationEmit.multiFile.d.ts | 10 +- ...tionEmit.multiFileBackReferenceToSelf.d.ts | 10 +- ...Emit.multiFileBackReferenceToUnmapped.d.ts | 8 +- .../auto-fixed/tsc/variadicTuples1.d.ts.map | 437 ++++++++++++++++++ .../tsc/weakTypesAndLiterals01.d.ts.map | 48 ++ ...larationEmitHasTypesRefOnNamespaceUse.d.ts | 6 +- .../declarationFilesWithTypeReferences2.d.ts | 4 +- ...ypeModeDeclarationEmit(module=node16).d.ts | 8 +- ...eModeDeclarationEmit(module=nodenext).d.ts | 8 +- ...eDeclarationEmitErrors(module=node16).d.ts | 18 +- ...eclarationEmitErrors(module=nodenext).d.ts | 18 +- ...peModeDeclarationEmit1(module=node16).d.ts | 8 +- ...ModeDeclarationEmit1(module=nodenext).d.ts | 8 +- ...DeclarationEmitErrors1(module=node16).d.ts | 18 +- ...clarationEmitErrors1(module=nodenext).d.ts | 18 +- .../original/dte/parseAssertEntriesError.d.ts | 8 +- .../dte/parseImportAttributesError.d.ts | 8 +- .../dte/typeReferenceDirectives11.d.ts | 6 +- .../dte/typeReferenceDirectives13.d.ts | 6 +- .../dte/typeReferenceDirectives2.d.ts | 4 +- .../dte/typeReferenceDirectives5.d.ts | 6 +- .../dte/typeReferenceDirectives8.d.ts | 6 +- ...larationEmitHasTypesRefOnNamespaceUse.d.ts | 6 +- .../declarationFilesWithTypeReferences2.d.ts | 4 +- ...ypeModeDeclarationEmit(module=node16).d.ts | 8 +- ...eModeDeclarationEmit(module=nodenext).d.ts | 8 +- ...eDeclarationEmitErrors(module=node16).d.ts | 18 +- ...eclarationEmitErrors(module=nodenext).d.ts | 18 +- ...peModeDeclarationEmit1(module=node16).d.ts | 8 +- ...ModeDeclarationEmit1(module=nodenext).d.ts | 8 +- ...DeclarationEmitErrors1(module=node16).d.ts | 18 +- ...clarationEmitErrors1(module=nodenext).d.ts | 18 +- .../original/tsc/parseAssertEntriesError.d.ts | 8 +- .../tsc/parseImportAttributesError.d.ts | 8 +- .../tsc/typeReferenceDirectives11.d.ts | 6 +- .../tsc/typeReferenceDirectives13.d.ts | 6 +- .../tsc/typeReferenceDirectives2.d.ts | 4 +- .../tsc/typeReferenceDirectives5.d.ts | 6 +- .../tsc/typeReferenceDirectives8.d.ts | 6 +- 254 files changed, 10332 insertions(+), 505 deletions(-) create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitUsingAlternativeContainingModules1.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitUsingAlternativeContainingModules2.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitUsingTypeAlias1.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitUsingAlternativeContainingModules1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitUsingAlternativeContainingModules2.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitUsingTypeAlias1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitUsingAlternativeContainingModules1.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitUsingAlternativeContainingModules2.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitUsingTypeAlias1.d.ts.map diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index 8dc7381ac8223..4aac0d486938f 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -1078,6 +1078,14 @@ export namespace Compiler { throw new Error("The test is not equivalent between TSC and DTE. Please provide an isolatedDeclarationDiffReason/isolatedDeclarationFixedDiffReason setting in the test if this is intentional"); } } + 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) { @@ -1122,10 +1130,7 @@ export namespace Compiler { let code = ""; code += "//// [" + header + "] ////\r\n\r\n"; - for (let i = 0; i < tsSources.length; i++) { - code += "//// [" + tsSources[i].unitName + "]\r\n"; - code += tsSources[i].content + (i < (tsSources.length - 1) ? "\r\n" : ""); - } + code += sourceContent(tsSources); code += "\r\n\r\n/// [Declarations] ////\r\n\r\n"; code += declarationContent(declarationFiles, tsSources, errors, prettyErrors); @@ -1134,6 +1139,7 @@ export namespace Compiler { Baseline.runBaseline(type + "/" + baselinePath.replace(/\.tsx?/, `.d.ts`), code.length > 0 ? code : null); } + export function doDeclarationMapBaseline( baselinePath: string, type: string, @@ -1144,6 +1150,9 @@ export namespace Compiler { ) { 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"; @@ -1162,11 +1171,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 => { 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..d0b2781411da7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitUsingAlternativeContainingModules1.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: undefined]] //// + +//// [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,MAAM,CAAA;IACZ,KAAK,EAAE,OAAO,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,M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mZhY2UgSUVudHJ5IHsKICBBUEk6IHN0cmluZwogIERlc2NyaXB0aW9uOiBzdHJpbmcKICBBdXRoOiBzdHJpbmcKICBIVFRQUzogYm9vbGVhbgogIENvcnM6IHN0cmluZwogIExpbms6IHN0cmluZwogIENhdGVnb3J5OiBzdHJpbmcKfQoKY29uc3QgdGVzdEFwaSA9IHsKICBnZXRFbnRyaWVzOiAoKTogUHJvbWlzZTxJRW50cnlbXT4gPT4gewogICAgcmV0dXJuIGZldGNoKGJhc2VVcmwgKyAnZW50cmllcycpCiAgICAgIC50aGVuKChyZXMpID0+IHJlcy5qc29uKCkpCiAgICAgIC50aGVuKChkYXRhKSA9PiBkYXRhLmVudHJpZXMpCiAgICAgIC5jYXRjaCgoZXJyKSA9PiBjb25zb2xlLmxvZyhlcnIpKQogIH0KfQoKY29uc3QgZW50cnlLZXlzID0gewogIGFsbDogWydlbnRyaWVzJ10gYXMgY29uc3QsCiAgbGlzdDogKCkgPT4gWy4uLmVudHJ5S2V5cy5hbGwsICdsaXN0J10gYXMgY29uc3QKfQoKZXhwb3J0IGNvbnN0IHVzZUVudHJpZXMgPSAoKTogVXNlUXVlcnlSZXR1cm5UeXBlPElFbnRyeVtdLCBFcnJvcj4gPT4gewogIHJldHVybiB1c2VRdWVyeSh7CiAgICBxdWVyeUtleTogZW50cnlLZXlzLmxpc3QoKSwKICAgIHF1ZXJ5Rm46IHRlc3RBcGkuZ2V0RW50cmllcywKICAgIHNlbGVjdDogKGRhdGEpID0+IGRhdGEuc2xpY2UoMCwgMTApCiAgfSkKfQo= ++//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIElFbnRyeSB7DQogICAgQVBJOiBzdHJpbmc7DQogICAgRGVzY3JpcHRpb246IHN0cmluZzsNCiAgICBBdXRoOiBzdHJpbmc7DQogICAgSFRUUFM6IGJvb2xlYW47DQogICAgQ29yczogc3RyaW5nOw0KICAgIExpbms6IHN0cmluZzsNCiAgICBDYXRlZ29yeTogc3RyaW5nO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Jhc2VVcmwgKyAnZW50cmllcycpCiAgICAgIC50aGVuKChyZXMpID0+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..7b95b348ef398 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitUsingAlternativeContainingModules2.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: undefined]] //// + +//// [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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC5tdHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSUEsVUFBVSxNQUFNO0lBQ2QsR0FBRyxFQUFFLE1BQU0sQ0FBQTtJQUNYLFdBQVcsRUFBR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woKY29uc3QgYmFzZVVybCA9ICdodHRwczovL2FwaS5wdWJsaWNhcGlzLm9yZy8nCgppbnRlcmZhY2UgSUVudHJ5IHsKICBBUEk6IHN0cmluZwogIERlc2NyaXB0aW9uOiBzdHJpbmcKICBBdXRoOiBzdHJpbmcKICBIVFRQUzogYm9vbGVhbgogIENvcnM6IHN0cmluZwogIExpbms6IHN0cmluZwogIENhdGVnb3J5OiBzdHJpbmcKfQoKY29uc3QgdGVzdEFwaSA9IHsKICBnZXRFbnRyaWVzOiAoKTogUHJvbWlzZTxJRW50cnlbXT4gPT4gewogICAgcmV0dXJuIGZldGNoKGJhc2VVcmwgKyAnZW50cmllcycpCiAgICAgIC50aGVuKChyZXMpID0+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..f51f04b702369 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitUsingTypeAlias1.d.ts.map.diff @@ -0,0 +1,16 @@ +// [[Reason: undefined]] //// + +//// [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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxVQUFVLENBQUM7QUFFcEMsZUFBTyxNQUFNLEdBQUcsVUFBVyxRQUFRLEtBQUcsU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gY29uc3QgYmFyID0gKHRoaW5nOiBTb21lVHlwZSk6IE90aGVyID0+IHsKICByZXR1cm4gdGhpbmcuYXJnOwp9Ow== + 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 index 884f80af4d42b..73fd425a8e10f 100644 --- 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 @@ -1,5 +1,12 @@ //// [tests/cases/compiler/accessorInferredReturnTypeErrorInReturnStatement.ts] //// +//// [accessorInferredReturnTypeErrorInReturnStatement.ts] +export var basePrototype = { + get primaryPath(): any { + var _this = this; + return _this.collection.schema.primaryPath; + }, +}; /// [Declarations] //// 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 index 54be16916d2a3..f9ab380bac18a 100644 --- 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 @@ -1,5 +1,40 @@ //// [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] //// 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 index dfe8672bf9c79..9202b366b6d56 100644 --- 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 @@ -1,6 +1,48 @@ //// [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] //// 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 index 565aec85c870a..ec9915c1cbaa4 100644 --- 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 @@ -1,5 +1,376 @@ //// [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] //// 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 index a9961d3a96348..f6c717df54ad9 100644 --- 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 @@ -1,5 +1,148 @@ //// [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] //// 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 index 82761a3c710e4..d559e1a5107f5 100644 --- 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 @@ -1,6 +1,22 @@ //// [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] //// 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 index 21301634aa308..7f11a63cbc24e 100644 --- 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 @@ -1,5 +1,18 @@ //// [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] //// 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 index 6e10e232c83e0..9837502c96925 100644 --- 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 @@ -1,5 +1,12 @@ //// [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] //// 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 index 03a8d599d3916..d13697ad6bb74 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBundleWithAmbientReferences.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBundleWithAmbientReferences.d.ts @@ -1,18 +1,18 @@ //// [tests/cases/compiler/declarationEmitBundleWithAmbientReferences.ts] //// -//// [lib/lib.d.ts] +//// [lib.d.ts] declare module "lib/result" { export type Result = (E & Failure) | (T & Success); export interface Failure { } export interface Success { } } -//// [src/datastore_result.ts] +//// [datastore_result.ts] import { Result } from "lib/result"; export type T = Result; -//// [src/conditional_directive_field.ts] +//// [conditional_directive_field.ts] import * as DatastoreResult from "src/datastore_result"; export const build = (): DatastoreResult.T => { 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 index 9b635a528a4f1..d286a593f1753 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCommonJsModuleReferencedType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCommonJsModuleReferencedType.d.ts @@ -1,23 +1,23 @@ //// [tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts] //// -//// [r/node_modules/foo/node_modules/nested/index.d.ts] +//// [index.d.ts] export interface NestedProps {} -//// [r/node_modules/foo/other/index.d.ts] +//// [index.d.ts] export interface OtherIndexProps {} -//// [r/node_modules/foo/other.d.ts] +//// [other.d.ts] export interface OtherProps {} -//// [r/node_modules/foo/index.d.ts] +//// [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]; -//// [node_modules/root/index.d.ts] +//// [index.d.ts] export interface RootProps {} export function bar(): RootProps; -//// [r/entry.ts] +//// [entry.ts] import { foo } from "foo"; import { RootProps, bar } from "root"; export const x = foo(); 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 index 511bc14221b77..685b0ea31ed85 100644 --- 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 @@ -1,6 +1,18 @@ //// [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] //// 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 index 65c2f7f47e1ab..1a5587a493da4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCrossFileImportTypeOfAmbientModule.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitCrossFileImportTypeOfAmbientModule.d.ts @@ -1,13 +1,13 @@ //// [tests/cases/compiler/declarationEmitCrossFileImportTypeOfAmbientModule.ts] //// -//// [types/component.d.ts] +//// [component.d.ts] declare module '@namespace/component' { export class Foo {} } -//// [packages/somepackage/index.d.ts] +//// [index.d.ts] import { Foo } from "@namespace/component"; export declare const item: typeof Foo; -//// [packages/secondpackage/index.ts] +//// [index.ts] import { Foo } from "@namespace/component"; import { item } from "../somepackage"; export const reeexported: Foo = item; 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 index 46ca0dc12018b..2a771e2cdbadc 100644 --- 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 @@ -1,5 +1,10 @@ //// [tests/cases/compiler/declarationEmitDistributiveConditionalWithInfer.ts] //// +//// [declarationEmitDistributiveConditionalWithInfer.ts] +// This function's type is changed on declaration +export const fun = ( + subFun: () + => FlatArray[]): void => { }; /// [Declarations] //// 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 index bd904a2f09b1a..9f0faeb02e630 100644 --- 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 @@ -1,6 +1,23 @@ //// [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] //// 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 index e98623e83eca9..d4be1e6131800 100644 --- 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 @@ -1,5 +1,25 @@ //// [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] //// 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 index f11f31b1d2c3d..928bbb9fb8fce 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink.d.ts @@ -1,35 +1,35 @@ //// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts] //// -//// [/p1/node_modules/typescript-fsa/src/impl.d.ts] +//// [impl.d.ts] export function getA(): A; export enum A { Val } -//// [/p1/node_modules/typescript-fsa/index.d.ts] +//// [index.d.ts] export * from "./src/impl"; -//// [/p1/node_modules/typescript-fsa/package.json] +//// [package.json] { "name": "typescript-fsa", "version": "1.0.0" } -//// [/p2/node_modules/typescript-fsa/src/impl.d.ts] +//// [impl.d.ts] export function getA(): A; export enum A { Val } -//// [/p2/node_modules/typescript-fsa/index.d.ts] +//// [index.d.ts] export * from "./src/impl"; -//// [/p2/node_modules/typescript-fsa/package.json] +//// [package.json] { "name": "typescript-fsa", "version": "1.0.0" } -//// [/p1/index.ts] +//// [index.ts] import * as _whatever from "p2"; import { getA } from "typescript-fsa"; export const a = getA(); -//// [/p2/index.d.ts] +//// [index.d.ts] export const a: import("typescript-fsa").A; 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 index 05ac9e53b27c2..b282330d7d5bf 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitForGlobalishSpecifierSymlink2.d.ts @@ -1,23 +1,23 @@ //// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts] //// -//// [/cache/typescript-fsa/src/impl.d.ts] +//// [impl.d.ts] export function getA(): A; export enum A { Val } -//// [/cache/typescript-fsa/index.d.ts] +//// [index.d.ts] export * from "./src/impl"; -//// [/cache/typescript-fsa/package.json] +//// [package.json] { "name": "typescript-fsa", "version": "1.0.0" } -//// [/p1/index.ts] +//// [index.ts] import * as _whatever from "p2"; import { getA } from "typescript-fsa"; export const a = getA(); -//// [/p2/index.d.ts] +//// [index.d.ts] export const a: import("typescript-fsa").A; 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 index b727810db7acb..1aebcb1cfcbf5 100644 --- 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 @@ -1,5 +1,113 @@ //// [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] //// 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 index c425b0fa86d00..2c8c84fdafbf2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitMappedPrivateTypeTypeParameter.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitMappedPrivateTypeTypeParameter.d.ts @@ -1,9 +1,9 @@ //// [tests/cases/compiler/declarationEmitMappedPrivateTypeTypeParameter.ts] //// -//// [/Helpers.ts] +//// [Helpers.ts] export type StringKeyOf = Extract; -//// [/FromFactor.ts] +//// [FromFactor.ts] export type RowToColumns = { [TName in StringKeyOf]: any; } 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 index 703d672f73bd4..98c4d50a1eccb 100644 --- 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 @@ -1,6 +1,32 @@ //// [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] //// 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 index 247ca822669b9..4df5916584557 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectAssignedDefaultExport.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitObjectAssignedDefaultExport.d.ts @@ -1,6 +1,6 @@ //// [tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts] //// -//// [node_modules/styled-components/node_modules/hoist-non-react-statics/index.d.ts] +//// [index.d.ts] interface Statics { "$$whatever": string; } @@ -8,7 +8,7 @@ declare namespace hoistNonReactStatics { type NonReactStatics = {[X in Exclude]: T[X]} } export = hoistNonReactStatics; -//// [node_modules/styled-components/index.d.ts] +//// [index.d.ts] import * as hoistNonReactStatics from "hoist-non-react-statics"; export interface DefaultTheme {} export type StyledComponent = 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 index 6413c12b3bbc6..d23639f5fe679 100644 --- 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 @@ -1,6 +1,13 @@ //// [tests/cases/compiler/declarationEmitOptionalMethod.ts] //// - +//// [declarationEmitOptionalMethod.ts] +export const Foo = (opts: { + a?(): void, + b?: () => void, +}): { + c?(): void, + d?: () => void, +} => ({ }); /// [Declarations] //// 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 index daade8fde7e38..5e216376c1e2b 100644 --- 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 @@ -1,5 +1,10 @@ //// [tests/cases/compiler/declarationEmitParameterProperty.ts] //// +//// [declarationEmitParameterProperty.ts] +export class Foo { + constructor(public bar?: string) { + } +} /// [Declarations] //// 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 index 7920892256e1a..92c6964431b87 100644 --- 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 @@ -1,5 +1,22 @@ //// [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] //// 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 index bf6864ce168fd..4dc853b4a7327 100644 --- 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 @@ -1,5 +1,22 @@ //// [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] //// 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 index 12ebd89f8f2dc..51edaeaa648c8 100644 --- 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 @@ -1,6 +1,107 @@ //// [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] //// 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 index 89513d623c5f3..47deda1cd00c7 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference.d.ts @@ -1,14 +1,14 @@ //// [tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts] //// -//// [monorepo/pkg3/src/index.ts] +//// [index.ts] export * from './keys'; -//// [monorepo/pkg3/src/keys.ts] +//// [keys.ts] import {MetadataAccessor} from "@raymondfeng/pkg2"; export const ADMIN = MetadataAccessor.create('1'); -//// [monorepo/pkg1/dist/index.d.ts] +//// [index.d.ts] export * from './types'; -//// [monorepo/pkg1/dist/types.d.ts] +//// [types.d.ts] export declare type A = { id: string; }; @@ -22,7 +22,7 @@ export declare class MetadataAccessor { toString(): string; static create(key: string): MetadataAccessor; } -//// [monorepo/pkg1/package.json] +//// [package.json] { "name": "@raymondfeng/pkg1", "version": "1.0.0", @@ -30,11 +30,11 @@ export declare class MetadataAccessor { "main": "dist/index.js", "typings": "dist/index.d.ts" } -//// [monorepo/pkg2/dist/index.d.ts] +//// [index.d.ts] export * from './types'; -//// [monorepo/pkg2/dist/types.d.ts] +//// [types.d.ts] export * from '@raymondfeng/pkg1'; -//// [monorepo/pkg2/package.json] +//// [package.json] { "name": "@raymondfeng/pkg2", "version": "1.0.0", 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 index fab73c602c839..a1fb2b7d60100 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference2.d.ts @@ -1,14 +1,14 @@ //// [tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts] //// -//// [monorepo/pkg3/src/index.ts] +//// [index.ts] export * from './keys'; -//// [monorepo/pkg3/src/keys.ts] +//// [keys.ts] import {MetadataAccessor} from "@raymondfeng/pkg2"; export const ADMIN = MetadataAccessor.create('1'); -//// [monorepo/pkg1/dist/index.d.ts] +//// [index.d.ts] export * from './types'; -//// [monorepo/pkg1/dist/types.d.ts] +//// [types.d.ts] export declare type A = { id: string; }; @@ -22,7 +22,7 @@ export declare class MetadataAccessor { toString(): string; static create(key: string): MetadataAccessor; } -//// [monorepo/pkg1/package.json] +//// [package.json] { "name": "@raymondfeng/pkg1", "version": "1.0.0", @@ -30,14 +30,14 @@ export declare class MetadataAccessor { "main": "dist/index.js", "typings": "dist/index.d.ts" } -//// [monorepo/pkg2/dist/index.d.ts] +//// [index.d.ts] import "./secondary"; export * from './types'; -//// [monorepo/pkg2/dist/types.d.ts] +//// [types.d.ts] export {MetadataAccessor} from '@raymondfeng/pkg1'; -//// [monorepo/pkg2/dist/secondary.d.ts] +//// [secondary.d.ts] export {IdType} from '@raymondfeng/pkg1'; -//// [monorepo/pkg2/package.json] +//// [package.json] { "name": "@raymondfeng/pkg2", "version": "1.0.0", 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 index b05cc96ee1d66..3233e1cbe9f44 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitReexportedSymlinkReference3.d.ts @@ -1,14 +1,14 @@ //// [tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts] //// -//// [monorepo/pkg3/src/index.ts] +//// [index.ts] export * from './keys'; -//// [monorepo/pkg3/src/keys.ts] +//// [keys.ts] import {MetadataAccessor} from "@raymondfeng/pkg2"; export const ADMIN = MetadataAccessor.create('1'); -//// [monorepo/pkg1/dist/index.d.ts] +//// [index.d.ts] export * from './types'; -//// [monorepo/pkg1/dist/types.d.ts] +//// [types.d.ts] export declare type A = { id: string; }; @@ -22,7 +22,7 @@ export declare class MetadataAccessor { toString(): string; static create(key: string): MetadataAccessor; } -//// [monorepo/pkg1/package.json] +//// [package.json] { "name": "@raymondfeng/pkg1", "version": "1.0.0", @@ -30,11 +30,11 @@ export declare class MetadataAccessor { "main": "dist/index.js", "typings": "dist/index.d.ts" } -//// [monorepo/pkg2/dist/index.d.ts] +//// [index.d.ts] export * from './types'; -//// [monorepo/pkg2/dist/types.d.ts] +//// [types.d.ts] export {MetadataAccessor} from '@raymondfeng/pkg1'; -//// [monorepo/pkg2/package.json] +//// [package.json] { "name": "@raymondfeng/pkg2", "version": "1.0.0", 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 index b92dd11ae5b51..610851639cb7c 100644 --- 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 @@ -1,5 +1,60 @@ //// [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] //// 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 index ad383205fed50..3e9b4ed8fdd9f 100644 --- 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 @@ -1,5 +1,14 @@ //// [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[] = 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] //// 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 index 5eb064b930ca4..07d8cf63547b1 100644 --- 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 @@ -1,5 +1,343 @@ //// [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] //// 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 index 1d5bbf4c80991..4636785801d25 100644 --- 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 @@ -1,5 +1,352 @@ //// [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] //// 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 index fbc62e0938a23..53b35dbdcd1a7 100644 --- 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 @@ -1,5 +1,102 @@ //// [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] //// 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 index fe396c3f04bf4..4a905ca79d304 100644 --- 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 @@ -1,5 +1,214 @@ //// [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] //// 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 index 4d2e7e53e70c1..3ea90e0b055b8 100644 --- 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 @@ -1,6 +1,21 @@ //// [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] //// 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 index c9c178e9c9a2d..bb4b4bb308ea4 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts @@ -2,12 +2,12 @@ //// [index.ts] export const a = async () => (await import("inner")).x(); -//// [node_modules/inner/index.d.ts] +//// [index.d.ts] export { x } from "./other.js"; -//// [node_modules/inner/other.d.ts] +//// [other.d.ts] import { Thing } from "./private.js" export const x: () => Thing; -//// [node_modules/inner/private.d.ts] +//// [private.d.ts] export interface Thing {} // not exported in export map, inaccessible under new module modes //// [package.json] { @@ -16,7 +16,7 @@ export interface Thing {} // not exported in export map, inaccessible under new "type": "module", "exports": "./index.js" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index d7bc38500205e..7b619c8ed1924 100644 --- 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 @@ -1,5 +1,63 @@ //// [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] //// 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 index 2576057761f97..99ba4a446df33 100644 --- 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 @@ -1,5 +1,49 @@ //// [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] //// 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 index 9464b8ca8029c..f4a8d46d3093e 100644 --- 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 @@ -1,5 +1,73 @@ //// [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] //// 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 index 06dbaeb2fdd70..af1f7194b1251 100644 --- 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 @@ -1,5 +1,28 @@ //// [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] //// 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 index ab1cb15b492f9..d61e6fe31796c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModuleReexportFromDottedPath.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModuleReexportFromDottedPath.d.ts @@ -1,6 +1,6 @@ //// [tests/cases/compiler/nodeModuleReexportFromDottedPath.ts] //// -//// [/node_modules/.prisma/client/index.d.ts] +//// [index.d.ts] export interface PrismaClientOptions { rejectOnNotFound?: any; } @@ -9,10 +9,10 @@ export class PrismaClient { private fetcher; } -//// [/node_modules/@prisma/client/index.d.ts] +//// [index.d.ts] export * from ".prisma/client"; -//// [/index.ts] +//// [index.ts] import { PrismaClient } from "@prisma/client"; declare const enhancePrisma: (client: TPrismaClientCtor) => TPrismaClientCtor & { enhanced: unknown }; const EnhancedPrisma = enhancePrisma(PrismaClient); 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 index 28fbb8d6585f1..ec15374d6fb4c 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts] //// -//// [subfolder/index.ts] +//// [index.ts] // cjs format file export * from "fs"; export * as fs from "fs"; @@ -14,7 +14,7 @@ export * as fs from "fs"; "private": true, "type": "module" } -//// [subfolder/package.json] +//// [package.json] { "type": "commonjs" } 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 index 28fbb8d6585f1..ec15374d6fb4c 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts] //// -//// [subfolder/index.ts] +//// [index.ts] // cjs format file export * from "fs"; export * as fs from "fs"; @@ -14,7 +14,7 @@ export * as fs from "fs"; "private": true, "type": "module" } -//// [subfolder/package.json] +//// [package.json] { "type": "commonjs" } 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 index abcbc8a3af885..f179f2ae3dee0 100644 --- 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 @@ -4,10 +4,10 @@ // esm format file import { Thing } from "inner/other"; export const a = (await import("inner")).x(); -//// [node_modules/inner/index.d.ts] +//// [index.d.ts] // esm format file export { x } from "./other.js"; -//// [node_modules/inner/other.d.ts] +//// [other.d.ts] // esm format file export interface Thing {} export const x: () => Thing; @@ -18,7 +18,7 @@ export const x: () => Thing; "type": "module", "exports": "./index.js" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index abcbc8a3af885..f179f2ae3dee0 100644 --- 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 @@ -4,10 +4,10 @@ // esm format file import { Thing } from "inner/other"; export const a = (await import("inner")).x(); -//// [node_modules/inner/index.d.ts] +//// [index.d.ts] // esm format file export { x } from "./other.js"; -//// [node_modules/inner/other.d.ts] +//// [other.d.ts] // esm format file export interface Thing {} export const x: () => Thing; @@ -18,7 +18,7 @@ export const x: () => Thing; "type": "module", "exports": "./index.js" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index c3205326f945b..476c5a3e7e531 100644 --- 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 @@ -5,10 +5,10 @@ import { Thing } from "inner/other"; export const a = (await import("inner")).x(); import {a as a2} from "package"; -//// [node_modules/inner/index.ts] +//// [index.ts] // esm format file export { x } from "./other.js"; -//// [node_modules/inner/other.ts] +//// [other.ts] // esm format file export interface Thing {} export const x: () => Thing = null as any; @@ -19,7 +19,7 @@ export const x: () => Thing = null as any; "type": "module", "exports": "./index.ts" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index c3205326f945b..476c5a3e7e531 100644 --- 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 @@ -5,10 +5,10 @@ import { Thing } from "inner/other"; export const a = (await import("inner")).x(); import {a as a2} from "package"; -//// [node_modules/inner/index.ts] +//// [index.ts] // esm format file export { x } from "./other.js"; -//// [node_modules/inner/other.ts] +//// [other.ts] // esm format file export interface Thing {} export const x: () => Thing = null as any; @@ -19,7 +19,7 @@ export const x: () => Thing = null as any; "type": "module", "exports": "./index.ts" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index 92d6ed2b87fc2..049838f351d34 100644 --- 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 @@ -4,10 +4,10 @@ // esm format file import { Thing } from "inner/other.js"; // should fail export const a = (await import("inner")).x(); -//// [node_modules/inner/index.d.ts] +//// [index.d.ts] // esm format file export { x } from "./other.js"; -//// [node_modules/inner/other.d.ts] +//// [other.d.ts] // esm format file export interface Thing {} export const x: () => Thing; @@ -18,7 +18,7 @@ export const x: () => Thing; "type": "module", "exports": "./index.js" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index 92d6ed2b87fc2..049838f351d34 100644 --- 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 @@ -4,10 +4,10 @@ // esm format file import { Thing } from "inner/other.js"; // should fail export const a = (await import("inner")).x(); -//// [node_modules/inner/index.d.ts] +//// [index.d.ts] // esm format file export { x } from "./other.js"; -//// [node_modules/inner/other.d.ts] +//// [other.d.ts] // esm format file export interface Thing {} export const x: () => Thing; @@ -18,7 +18,7 @@ export const x: () => Thing; "type": "module", "exports": "./index.js" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index 024783c5ac0f4..ad9045f89262c 100644 --- 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 @@ -4,10 +4,10 @@ // esm format file import { Thing } from "inner/other"; export const a = (await import("inner/index.js")).x(); -//// [node_modules/inner/index.d.ts] +//// [index.d.ts] // esm format file export { x } from "./other.js"; -//// [node_modules/inner/other.d.ts] +//// [other.d.ts] // esm format file export interface Thing {} export const x: () => Thing; @@ -18,7 +18,7 @@ export const x: () => Thing; "type": "module", "exports": "./index.js" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index 024783c5ac0f4..ad9045f89262c 100644 --- 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 @@ -4,10 +4,10 @@ // esm format file import { Thing } from "inner/other"; export const a = (await import("inner/index.js")).x(); -//// [node_modules/inner/index.d.ts] +//// [index.d.ts] // esm format file export { x } from "./other.js"; -//// [node_modules/inner/other.d.ts] +//// [other.d.ts] // esm format file export interface Thing {} export const x: () => Thing; @@ -18,7 +18,7 @@ export const x: () => Thing; "type": "module", "exports": "./index.js" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index 21d79e2aa8893..a133ba7c73f45 100644 --- 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 @@ -4,10 +4,10 @@ // esm format file import { Thing } from "inner/other"; export const a = (await import("inner/index.js")).x(); -//// [node_modules/inner/index.d.ts] +//// [index.d.ts] // esm format file export { x } from "./other.js"; -//// [node_modules/inner/other.d.ts] +//// [other.d.ts] // esm format file export interface Thing {} export const x: () => Thing; @@ -18,7 +18,7 @@ export const x: () => Thing; "type": "module", "exports": "./index.js" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index 21d79e2aa8893..a133ba7c73f45 100644 --- 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 @@ -4,10 +4,10 @@ // esm format file import { Thing } from "inner/other"; export const a = (await import("inner/index.js")).x(); -//// [node_modules/inner/index.d.ts] +//// [index.d.ts] // esm format file export { x } from "./other.js"; -//// [node_modules/inner/other.d.ts] +//// [other.d.ts] // esm format file export interface Thing {} export const x: () => Thing; @@ -18,7 +18,7 @@ export const x: () => Thing; "type": "module", "exports": "./index.js" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index 29cc871488826..cc5ff46e05b64 100644 --- 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 @@ -1,6 +1,70 @@ //// [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] //// 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 index 29cc871488826..cc5ff46e05b64 100644 --- 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 @@ -1,6 +1,70 @@ //// [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] //// 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 index 832db12d182cf..4a3e1a1fb4ba3 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportAssignments.ts] //// -//// [subfolder/index.ts] +//// [index.ts] // cjs format file import fs = require("fs"); fs.readFile; @@ -23,7 +23,7 @@ export import fs2 = require("fs"); "private": true, "type": "module" } -//// [subfolder/package.json] +//// [package.json] { "type": "commonjs" } 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 index 832db12d182cf..4a3e1a1fb4ba3 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportAssignments.ts] //// -//// [subfolder/index.ts] +//// [index.ts] // cjs format file import fs = require("fs"); fs.readFile; @@ -23,7 +23,7 @@ export import fs2 = require("fs"); "private": true, "type": "module" } -//// [subfolder/package.json] +//// [package.json] { "type": "commonjs" } 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 index 6e944e455cd2a..afbea2184f891 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; @@ -8,7 +8,7 @@ export type LocalInterface = 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); -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -17,9 +17,9 @@ export const b = (null as any as import("pkg", { with: {"resolution-mode": "impo "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} /// [Declarations] //// 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 index 6e944e455cd2a..afbea2184f891 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; @@ -8,7 +8,7 @@ export type LocalInterface = 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); -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -17,9 +17,9 @@ export const b = (null as any as import("pkg", { with: {"resolution-mode": "impo "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} /// [Declarations] //// 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 index 0953d29a97d5f..44093cc82ac19 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts] //// -//// [subfolder/index.ts] +//// [index.ts] // cjs format file export * from "fs"; export * as fs from "fs"; @@ -14,7 +14,7 @@ export * as fs from "fs"; "private": true, "type": "module" } -//// [subfolder/package.json] +//// [package.json] { "type": "commonjs" } 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 index 0953d29a97d5f..44093cc82ac19 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts] //// -//// [subfolder/index.ts] +//// [index.ts] // cjs format file export * from "fs"; export * as fs from "fs"; @@ -14,7 +14,7 @@ export * as fs from "fs"; "private": true, "type": "module" } -//// [subfolder/package.json] +//// [package.json] { "type": "commonjs" } 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 index 6b04ed6bbe2dd..532a7eb886ec6 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts] //// -//// [subfolder/index.ts] +//// [index.ts] // cjs format file export {default} from "fs"; //// [index.ts] @@ -12,7 +12,7 @@ export {default} from "fs"; "private": true, "type": "module" } -//// [subfolder/package.json] +//// [package.json] { "type": "commonjs" } 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 index 6b04ed6bbe2dd..532a7eb886ec6 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts] //// -//// [subfolder/index.ts] +//// [index.ts] // cjs format file export {default} from "fs"; //// [index.ts] @@ -12,7 +12,7 @@ export {default} from "fs"; "private": true, "type": "module" } -//// [subfolder/package.json] +//// [package.json] { "type": "commonjs" } 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 index 78e25837599e9..698bf76391861 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; @@ -8,7 +8,7 @@ export type LocalInterface = 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); -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -17,9 +17,9 @@ export const b = (null as any as import("pkg", { assert: {"resolution-mode": "im "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} /// [Declarations] //// 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 index 78e25837599e9..698bf76391861 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; @@ -8,7 +8,7 @@ export type LocalInterface = 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); -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -17,9 +17,9 @@ export const b = (null as any as import("pkg", { assert: {"resolution-mode": "im "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} /// [Declarations] //// 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 index fcd90228c2f88..7c85f14be7b07 100644 --- 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 @@ -1,5 +1,61 @@ //// [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] //// 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 index f7fac24e04ed9..fc46783214126 100644 --- 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 @@ -1,5 +1,14 @@ //// [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] //// 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 index 0ec623098199f..723f093a8dd49 100644 --- 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 @@ -1,5 +1,15 @@ //// [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] //// 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 index 64ae3564dc852..cc5e4ad7c3c27 100644 --- 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 @@ -1,5 +1,22 @@ //// [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] //// 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 index d0b2421080ed3..068322c1e1e90 100644 --- 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 @@ -1,6 +1,22 @@ //// [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] //// 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 index 8008f0e7b6006..49397cd9e12af 100644 --- 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 @@ -1,6 +1,10 @@ //// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit10.ts] //// - +//// [symbolDeclarationEmit10.ts] +var obj = { + get [Symbol.isConcatSpreadable](): string { return '' }, + set [Symbol.isConcatSpreadable](x) { } +} /// [Declarations] //// 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 index 95e610bc0f65f..9b52f8d138e2d 100644 --- 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 @@ -1,6 +1,9 @@ //// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit8.ts] //// - +//// [symbolDeclarationEmit8.ts] +var obj = { + [Symbol.isConcatSpreadable]: 0 +} /// [Declarations] //// 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 index 3e4ac70a09d84..7df855c8d594d 100644 --- 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 @@ -1,6 +1,9 @@ //// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit9.ts] //// - +//// [symbolDeclarationEmit9.ts] +var obj = { + [Symbol.isConcatSpreadable](): void { } +} /// [Declarations] //// 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 index b507d0d91ec13..9f0e53d31e04a 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts @@ -1,23 +1,23 @@ //// [tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts] //// -//// [Folder/monorepo/core/index.ts] +//// [index.ts] import { styles } from "package-a"; export function getStyles() { return styles; } -//// [Folder/monorepo/package-a/index.d.ts] +//// [index.d.ts] export declare const styles: import("styled-components").InterpolationValue[]; -//// [Folder/node_modules/styled-components/package.json] +//// [package.json] { "name": "styled-components", "version": "3.3.3", "typings": "typings/styled-components.d.ts" } -//// [Folder/node_modules/styled-components/typings/styled-components.d.ts] +//// [styled-components.d.ts] export interface InterpolationValue {} /// [Declarations] //// 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 index eed66802f5fc8..57805137636fa 100644 --- 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 @@ -1,6 +1,16 @@ //// [tests/cases/compiler/symbolObserverMismatchingPolyfillsWorkTogether.ts] //// - +//// [symbolObserverMismatchingPolyfillsWorkTogether.ts] +interface SymbolConstructor { + readonly observer: symbol; +} +interface SymbolConstructor { + readonly observer: unique symbol; +} + +const obj = { + [Symbol.observer]: 0 +}; /// [Declarations] //// 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 index 494bac7079780..2f63239bcb4ba 100644 --- 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 @@ -1,5 +1,9 @@ //// [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] //// 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 index a04df70935127..9c3aeedcd13c0 100644 --- 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 @@ -1,5 +1,268 @@ //// [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] //// 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 index 84751ccf199ea..41f869acf44e5 100644 --- 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 @@ -1,5 +1,321 @@ //// [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] //// 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 index 3ba650af51802..453a1e803e557 100644 --- 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 @@ -1,5 +1,148 @@ //// [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] //// 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 index b4055aefa1565..f19271103d853 100644 --- 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 @@ -1,5 +1,27 @@ //// [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] //// 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 index 5e69e04312b14..a1931acaa51ce 100644 --- 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 @@ -7,7 +7,7 @@ import { fb } from "ext/other"; export const va = fa(); export const vb = fb(); -//// [node_modules/ext/package.json] +//// [package.json] { "name": "ext", "version": "1.0.0", @@ -17,19 +17,19 @@ export const vb = fb(); } } -//// [node_modules/ext/index.d.ts] +//// [index.d.ts] export interface A {} export function fa(): A; -//// [node_modules/ext/other.d.ts] +//// [other.d.ts] export interface B {} export function fb(): B; -//// [node_modules/ext/ts3.1/index.d.ts] +//// [index.d.ts] export interface A {} export function fa(): A; -//// [node_modules/ext/ts3.1/other.d.ts] +//// [other.d.ts] export interface B {} export function fb(): B; 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 index 1d26160bccf09..307061f950d4a 100644 --- 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 @@ -7,7 +7,7 @@ import { fb } from "ext/other"; export const va: any = fa(); export const vb = fb(); -//// [node_modules/ext/package.json] +//// [package.json] { "name": "ext", "version": "1.0.0", @@ -17,18 +17,18 @@ export const vb = fb(); } } -//// [node_modules/ext/index.d.ts] +//// [index.d.ts] export interface A {} export function fa(): A; -//// [node_modules/ext/other.d.ts] +//// [other.d.ts] export interface B {} export function fb(): B; -//// [node_modules/ext/ts3.1/index.d.ts] +//// [index.d.ts] export * from "../"; -//// [node_modules/ext/ts3.1/other.d.ts] +//// [other.d.ts] export * from "../other"; 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 index 53c57fa309214..764f67f2bf1ec 100644 --- 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 @@ -7,7 +7,7 @@ import { fa as fa2 } from "ext/other"; export const va = fa(); export const va2 = fa2(); -//// [node_modules/ext/package.json] +//// [package.json] { "name": "ext", "version": "1.0.0", @@ -19,15 +19,15 @@ export const va2 = fa2(); } } -//// [node_modules/ext/index.d.ts] +//// [index.d.ts] export interface A {} export function fa(): A; -//// [node_modules/ext/other.d.ts] +//// [other.d.ts] export interface A2 {} export function fa(): A2; -//// [node_modules/ext/ts3.1/index.d.ts] +//// [index.d.ts] export * from "../other"; 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 index 4ecc64a92f273..ebefe005a9c1f 100644 --- 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 @@ -1,5 +1,442 @@ //// [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] //// 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 index 3a2c6f576d0b6..f703ffa49bc1c 100644 --- 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 @@ -1,5 +1,53 @@ //// [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] //// 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 index 009e63e258ff4..e0328d6992cd2 100644 --- 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 @@ -1,5 +1,12 @@ //// [tests/cases/compiler/accessorInferredReturnTypeErrorInReturnStatement.ts] //// +//// [accessorInferredReturnTypeErrorInReturnStatement.ts] +export var basePrototype = { + get primaryPath(): any { + var _this = this; + return _this.collection.schema.primaryPath; + }, +}; /// [Declarations] //// 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 index 150fdf77c2307..fa65fca8e7055 100644 --- 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 @@ -1,5 +1,40 @@ //// [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] //// 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 index 3562e6c15c736..e0bc4717bbd9e 100644 --- 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 @@ -1,6 +1,48 @@ //// [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] //// 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 index f47895fe60b4d..a539e47bfc0f7 100644 --- 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 @@ -1,5 +1,376 @@ //// [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] //// 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 index 085d0eaf1049d..b4a8eb8274446 100644 --- 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 @@ -1,5 +1,148 @@ //// [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] //// 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 index 130135920b575..8b3856587bfd7 100644 --- 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 @@ -1,6 +1,22 @@ //// [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] //// 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 index 08651037cbaab..81a8078d136b7 100644 --- 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 @@ -1,5 +1,18 @@ //// [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] //// 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 index d5db661bd7c71..c827861793204 100644 --- 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 @@ -1,5 +1,12 @@ //// [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] //// 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 index 9f8a9745aa0f6..36ece4ac201b9 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBundleWithAmbientReferences.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBundleWithAmbientReferences.d.ts @@ -1,18 +1,18 @@ //// [tests/cases/compiler/declarationEmitBundleWithAmbientReferences.ts] //// -//// [lib/lib.d.ts] +//// [lib.d.ts] declare module "lib/result" { export type Result = (E & Failure) | (T & Success); export interface Failure { } export interface Success { } } -//// [src/datastore_result.ts] +//// [datastore_result.ts] import { Result } from "lib/result"; export type T = Result; -//// [src/conditional_directive_field.ts] +//// [conditional_directive_field.ts] import * as DatastoreResult from "src/datastore_result"; export const build = (): DatastoreResult.T => { 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 index 84f60fbd73504..19b51ba130039 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCommonJsModuleReferencedType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCommonJsModuleReferencedType.d.ts @@ -1,23 +1,23 @@ //// [tests/cases/compiler/declarationEmitCommonJsModuleReferencedType.ts] //// -//// [r/node_modules/foo/node_modules/nested/index.d.ts] +//// [index.d.ts] export interface NestedProps {} -//// [r/node_modules/foo/other/index.d.ts] +//// [index.d.ts] export interface OtherIndexProps {} -//// [r/node_modules/foo/other.d.ts] +//// [other.d.ts] export interface OtherProps {} -//// [r/node_modules/foo/index.d.ts] +//// [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]; -//// [node_modules/root/index.d.ts] +//// [index.d.ts] export interface RootProps {} export function bar(): RootProps; -//// [r/entry.ts] +//// [entry.ts] import { foo } from "foo"; import { RootProps, bar } from "root"; export const x = foo(); 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 index 543d35c1e2079..1a145b3965e42 100644 --- 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 @@ -1,6 +1,18 @@ //// [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] //// 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 index f960a1a1c6173..caaf3c3cdf44d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCrossFileImportTypeOfAmbientModule.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCrossFileImportTypeOfAmbientModule.d.ts @@ -1,13 +1,13 @@ //// [tests/cases/compiler/declarationEmitCrossFileImportTypeOfAmbientModule.ts] //// -//// [types/component.d.ts] +//// [component.d.ts] declare module '@namespace/component' { export class Foo {} } -//// [packages/somepackage/index.d.ts] +//// [index.d.ts] import { Foo } from "@namespace/component"; export declare const item: typeof Foo; -//// [packages/secondpackage/index.ts] +//// [index.ts] import { Foo } from "@namespace/component"; import { item } from "../somepackage"; export const reeexported: Foo = item; 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 index d0d2ba4538c98..ec9828d6925e4 100644 --- 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 @@ -1,5 +1,10 @@ //// [tests/cases/compiler/declarationEmitDistributiveConditionalWithInfer.ts] //// +//// [declarationEmitDistributiveConditionalWithInfer.ts] +// This function's type is changed on declaration +export const fun = ( + subFun: () + => FlatArray[]): void => { }; /// [Declarations] //// 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 index 8752f31de6117..d9f155b0d1cac 100644 --- 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 @@ -1,6 +1,23 @@ //// [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] //// 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 index e512100ee04a0..f10ac05ca166b 100644 --- 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 @@ -1,5 +1,25 @@ //// [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] //// 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 index 1f63c28b8ddaf..47ce01548d856 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForGlobalishSpecifierSymlink.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForGlobalishSpecifierSymlink.d.ts @@ -1,35 +1,35 @@ //// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink.ts] //// -//// [/p1/node_modules/typescript-fsa/src/impl.d.ts] +//// [impl.d.ts] export function getA(): A; export enum A { Val } -//// [/p1/node_modules/typescript-fsa/index.d.ts] +//// [index.d.ts] export * from "./src/impl"; -//// [/p1/node_modules/typescript-fsa/package.json] +//// [package.json] { "name": "typescript-fsa", "version": "1.0.0" } -//// [/p2/node_modules/typescript-fsa/src/impl.d.ts] +//// [impl.d.ts] export function getA(): A; export enum A { Val } -//// [/p2/node_modules/typescript-fsa/index.d.ts] +//// [index.d.ts] export * from "./src/impl"; -//// [/p2/node_modules/typescript-fsa/package.json] +//// [package.json] { "name": "typescript-fsa", "version": "1.0.0" } -//// [/p1/index.ts] +//// [index.ts] import * as _whatever from "p2"; import { getA } from "typescript-fsa"; export const a = getA(); -//// [/p2/index.d.ts] +//// [index.d.ts] export const a: import("typescript-fsa").A; 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 index ae346f57dc93d..c1c6477dd89cc 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForGlobalishSpecifierSymlink2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitForGlobalishSpecifierSymlink2.d.ts @@ -1,23 +1,23 @@ //// [tests/cases/compiler/declarationEmitForGlobalishSpecifierSymlink2.ts] //// -//// [/cache/typescript-fsa/src/impl.d.ts] +//// [impl.d.ts] export function getA(): A; export enum A { Val } -//// [/cache/typescript-fsa/index.d.ts] +//// [index.d.ts] export * from "./src/impl"; -//// [/cache/typescript-fsa/package.json] +//// [package.json] { "name": "typescript-fsa", "version": "1.0.0" } -//// [/p1/index.ts] +//// [index.ts] import * as _whatever from "p2"; import { getA } from "typescript-fsa"; export const a = getA(); -//// [/p2/index.d.ts] +//// [index.d.ts] export const a: import("typescript-fsa").A; 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 index c99df09f95496..0a317627c2e91 100644 --- 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 @@ -1,5 +1,113 @@ //// [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] //// 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 index 4b5007fac71c5..8c828f75fd179 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitMappedPrivateTypeTypeParameter.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitMappedPrivateTypeTypeParameter.d.ts @@ -1,9 +1,9 @@ //// [tests/cases/compiler/declarationEmitMappedPrivateTypeTypeParameter.ts] //// -//// [/Helpers.ts] +//// [Helpers.ts] export type StringKeyOf = Extract; -//// [/FromFactor.ts] +//// [FromFactor.ts] export type RowToColumns = { [TName in StringKeyOf]: any; } 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 index a4995a1049d45..68e270dd8f79a 100644 --- 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 @@ -1,6 +1,32 @@ //// [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] //// 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 index c266cd9a304b7..c65de812b97fb 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectAssignedDefaultExport.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectAssignedDefaultExport.d.ts @@ -1,6 +1,6 @@ //// [tests/cases/compiler/declarationEmitObjectAssignedDefaultExport.ts] //// -//// [node_modules/styled-components/node_modules/hoist-non-react-statics/index.d.ts] +//// [index.d.ts] interface Statics { "$$whatever": string; } @@ -8,7 +8,7 @@ declare namespace hoistNonReactStatics { type NonReactStatics = {[X in Exclude]: T[X]} } export = hoistNonReactStatics; -//// [node_modules/styled-components/index.d.ts] +//// [index.d.ts] import * as hoistNonReactStatics from "hoist-non-react-statics"; export interface DefaultTheme {} export type StyledComponent = 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 index 2a997517e839d..d94d01ce38ab7 100644 --- 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 @@ -1,6 +1,13 @@ //// [tests/cases/compiler/declarationEmitOptionalMethod.ts] //// - +//// [declarationEmitOptionalMethod.ts] +export const Foo = (opts: { + a?(): void, + b?: () => void, +}): { + c?(): void, + d?: () => void, +} => ({ }); /// [Declarations] //// 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 index 078bd3fb79d91..f963caa4e5561 100644 --- 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 @@ -1,5 +1,10 @@ //// [tests/cases/compiler/declarationEmitParameterProperty.ts] //// +//// [declarationEmitParameterProperty.ts] +export class Foo { + constructor(public bar?: string) { + } +} /// [Declarations] //// 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 index 04699effec883..97733ceea752f 100644 --- 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 @@ -1,5 +1,22 @@ //// [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] //// 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 index 8dec21a813f75..652cc3ff74b61 100644 --- 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 @@ -1,5 +1,22 @@ //// [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] //// 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 index 206a2d57844a1..05267053cd4b7 100644 --- 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 @@ -1,6 +1,107 @@ //// [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] //// 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 index dea540f4622d3..b0b6c6a3bd742 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference.d.ts @@ -1,14 +1,14 @@ //// [tests/cases/compiler/declarationEmitReexportedSymlinkReference.ts] //// -//// [monorepo/pkg3/src/index.ts] +//// [index.ts] export * from './keys'; -//// [monorepo/pkg3/src/keys.ts] +//// [keys.ts] import {MetadataAccessor} from "@raymondfeng/pkg2"; export const ADMIN = MetadataAccessor.create('1'); -//// [monorepo/pkg1/dist/index.d.ts] +//// [index.d.ts] export * from './types'; -//// [monorepo/pkg1/dist/types.d.ts] +//// [types.d.ts] export declare type A = { id: string; }; @@ -22,7 +22,7 @@ export declare class MetadataAccessor { toString(): string; static create(key: string): MetadataAccessor; } -//// [monorepo/pkg1/package.json] +//// [package.json] { "name": "@raymondfeng/pkg1", "version": "1.0.0", @@ -30,11 +30,11 @@ export declare class MetadataAccessor { "main": "dist/index.js", "typings": "dist/index.d.ts" } -//// [monorepo/pkg2/dist/index.d.ts] +//// [index.d.ts] export * from './types'; -//// [monorepo/pkg2/dist/types.d.ts] +//// [types.d.ts] export * from '@raymondfeng/pkg1'; -//// [monorepo/pkg2/package.json] +//// [package.json] { "name": "@raymondfeng/pkg2", "version": "1.0.0", 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 index 5c6a12eba5ae2..bb8f326852af8 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference2.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference2.d.ts @@ -1,14 +1,14 @@ //// [tests/cases/compiler/declarationEmitReexportedSymlinkReference2.ts] //// -//// [monorepo/pkg3/src/index.ts] +//// [index.ts] export * from './keys'; -//// [monorepo/pkg3/src/keys.ts] +//// [keys.ts] import {MetadataAccessor} from "@raymondfeng/pkg2"; export const ADMIN = MetadataAccessor.create('1'); -//// [monorepo/pkg1/dist/index.d.ts] +//// [index.d.ts] export * from './types'; -//// [monorepo/pkg1/dist/types.d.ts] +//// [types.d.ts] export declare type A = { id: string; }; @@ -22,7 +22,7 @@ export declare class MetadataAccessor { toString(): string; static create(key: string): MetadataAccessor; } -//// [monorepo/pkg1/package.json] +//// [package.json] { "name": "@raymondfeng/pkg1", "version": "1.0.0", @@ -30,14 +30,14 @@ export declare class MetadataAccessor { "main": "dist/index.js", "typings": "dist/index.d.ts" } -//// [monorepo/pkg2/dist/index.d.ts] +//// [index.d.ts] import "./secondary"; export * from './types'; -//// [monorepo/pkg2/dist/types.d.ts] +//// [types.d.ts] export {MetadataAccessor} from '@raymondfeng/pkg1'; -//// [monorepo/pkg2/dist/secondary.d.ts] +//// [secondary.d.ts] export {IdType} from '@raymondfeng/pkg1'; -//// [monorepo/pkg2/package.json] +//// [package.json] { "name": "@raymondfeng/pkg2", "version": "1.0.0", 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 index 5112b22379a69..1d41e1a869618 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference3.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReexportedSymlinkReference3.d.ts @@ -1,14 +1,14 @@ //// [tests/cases/compiler/declarationEmitReexportedSymlinkReference3.ts] //// -//// [monorepo/pkg3/src/index.ts] +//// [index.ts] export * from './keys'; -//// [monorepo/pkg3/src/keys.ts] +//// [keys.ts] import {MetadataAccessor} from "@raymondfeng/pkg2"; export const ADMIN = MetadataAccessor.create('1'); -//// [monorepo/pkg1/dist/index.d.ts] +//// [index.d.ts] export * from './types'; -//// [monorepo/pkg1/dist/types.d.ts] +//// [types.d.ts] export declare type A = { id: string; }; @@ -22,7 +22,7 @@ export declare class MetadataAccessor { toString(): string; static create(key: string): MetadataAccessor; } -//// [monorepo/pkg1/package.json] +//// [package.json] { "name": "@raymondfeng/pkg1", "version": "1.0.0", @@ -30,11 +30,11 @@ export declare class MetadataAccessor { "main": "dist/index.js", "typings": "dist/index.d.ts" } -//// [monorepo/pkg2/dist/index.d.ts] +//// [index.d.ts] export * from './types'; -//// [monorepo/pkg2/dist/types.d.ts] +//// [types.d.ts] export {MetadataAccessor} from '@raymondfeng/pkg1'; -//// [monorepo/pkg2/package.json] +//// [package.json] { "name": "@raymondfeng/pkg2", "version": "1.0.0", 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 index 9970c6bf60de2..a881bd3f5fef0 100644 --- 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 @@ -1,5 +1,60 @@ //// [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] //// 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 index 44273fa77b349..2dbd287cdd4b1 100644 --- 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 @@ -1,5 +1,14 @@ //// [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[] = 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] //// 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 index 2bb9046d9f950..bd8b61a0a5be0 100644 --- 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 @@ -1,5 +1,343 @@ //// [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] //// 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 index 45713968ba9ed..527fe2475483d 100644 --- 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 @@ -1,5 +1,352 @@ //// [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] //// 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 index a7c41bcfe8b15..8cec9201484f7 100644 --- 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 @@ -1,5 +1,102 @@ //// [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] //// 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 index 98257113cddb9..463d699f9b006 100644 --- 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 @@ -1,5 +1,214 @@ //// [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] //// 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 index f5d8357d66cba..21f62d92fa996 100644 --- 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 @@ -1,6 +1,21 @@ //// [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] //// 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 index 1006c0aac5c3b..d3dd921e4b972 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/legacyNodeModulesExportsSpecifierGenerationConditions.d.ts @@ -2,12 +2,12 @@ //// [index.ts] export const a = async () => (await import("inner")).x(); -//// [node_modules/inner/index.d.ts] +//// [index.d.ts] export { x } from "./other.js"; -//// [node_modules/inner/other.d.ts] +//// [other.d.ts] import { Thing } from "./private.js" export const x: () => Thing; -//// [node_modules/inner/private.d.ts] +//// [private.d.ts] export interface Thing {} // not exported in export map, inaccessible under new module modes //// [package.json] { @@ -16,7 +16,7 @@ export interface Thing {} // not exported in export map, inaccessible under new "type": "module", "exports": "./index.js" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index f559570ba7fa5..9c044af178b55 100644 --- 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 @@ -1,5 +1,63 @@ //// [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] //// 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 index 8d80fa8723292..cb73fceb8eb92 100644 --- 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 @@ -1,5 +1,49 @@ //// [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] //// 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 index 0f1edb41066d8..63408dc9c498f 100644 --- 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 @@ -1,5 +1,73 @@ //// [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] //// 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 index cc1c1eaa2c170..ec4840d8fcb02 100644 --- 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 @@ -1,5 +1,28 @@ //// [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] //// 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 index 415fc7747323b..9e25dcd7b8d0f 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModuleReexportFromDottedPath.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/nodeModuleReexportFromDottedPath.d.ts @@ -1,6 +1,6 @@ //// [tests/cases/compiler/nodeModuleReexportFromDottedPath.ts] //// -//// [/node_modules/.prisma/client/index.d.ts] +//// [index.d.ts] export interface PrismaClientOptions { rejectOnNotFound?: any; } @@ -9,10 +9,10 @@ export class PrismaClient { private fetcher; } -//// [/node_modules/@prisma/client/index.d.ts] +//// [index.d.ts] export * from ".prisma/client"; -//// [/index.ts] +//// [index.ts] import { PrismaClient } from "@prisma/client"; declare const enhancePrisma: (client: TPrismaClientCtor) => TPrismaClientCtor & { enhanced: unknown }; const EnhancedPrisma = enhancePrisma(PrismaClient); 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 index 576c0d24c19ad..47ab9a3f95713 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts] //// -//// [subfolder/index.ts] +//// [index.ts] // cjs format file export * from "fs"; export * as fs from "fs"; @@ -14,7 +14,7 @@ export * as fs from "fs"; "private": true, "type": "module" } -//// [subfolder/package.json] +//// [package.json] { "type": "commonjs" } 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 index 576c0d24c19ad..47ab9a3f95713 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/allowJs/nodeModulesAllowJsImportHelpersCollisions2.ts] //// -//// [subfolder/index.ts] +//// [index.ts] // cjs format file export * from "fs"; export * as fs from "fs"; @@ -14,7 +14,7 @@ export * as fs from "fs"; "private": true, "type": "module" } -//// [subfolder/package.json] +//// [package.json] { "type": "commonjs" } 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 index 967ff7329f9cd..7f6bca552c9e2 100644 --- 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 @@ -4,10 +4,10 @@ // esm format file import { Thing } from "inner/other"; export const a = (await import("inner")).x(); -//// [node_modules/inner/index.d.ts] +//// [index.d.ts] // esm format file export { x } from "./other.js"; -//// [node_modules/inner/other.d.ts] +//// [other.d.ts] // esm format file export interface Thing {} export const x: () => Thing; @@ -18,7 +18,7 @@ export const x: () => Thing; "type": "module", "exports": "./index.js" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index 967ff7329f9cd..7f6bca552c9e2 100644 --- 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 @@ -4,10 +4,10 @@ // esm format file import { Thing } from "inner/other"; export const a = (await import("inner")).x(); -//// [node_modules/inner/index.d.ts] +//// [index.d.ts] // esm format file export { x } from "./other.js"; -//// [node_modules/inner/other.d.ts] +//// [other.d.ts] // esm format file export interface Thing {} export const x: () => Thing; @@ -18,7 +18,7 @@ export const x: () => Thing; "type": "module", "exports": "./index.js" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index 273bad68355d1..3a8730e1e97bc 100644 --- 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 @@ -5,10 +5,10 @@ import { Thing } from "inner/other"; export const a = (await import("inner")).x(); import {a as a2} from "package"; -//// [node_modules/inner/index.ts] +//// [index.ts] // esm format file export { x } from "./other.js"; -//// [node_modules/inner/other.ts] +//// [other.ts] // esm format file export interface Thing {} export const x: () => Thing = null as any; @@ -19,7 +19,7 @@ export const x: () => Thing = null as any; "type": "module", "exports": "./index.ts" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index 273bad68355d1..3a8730e1e97bc 100644 --- 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 @@ -5,10 +5,10 @@ import { Thing } from "inner/other"; export const a = (await import("inner")).x(); import {a as a2} from "package"; -//// [node_modules/inner/index.ts] +//// [index.ts] // esm format file export { x } from "./other.js"; -//// [node_modules/inner/other.ts] +//// [other.ts] // esm format file export interface Thing {} export const x: () => Thing = null as any; @@ -19,7 +19,7 @@ export const x: () => Thing = null as any; "type": "module", "exports": "./index.ts" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index 8288d6861a252..4568663e72ef1 100644 --- 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 @@ -4,10 +4,10 @@ // esm format file import { Thing } from "inner/other.js"; // should fail export const a = (await import("inner")).x(); -//// [node_modules/inner/index.d.ts] +//// [index.d.ts] // esm format file export { x } from "./other.js"; -//// [node_modules/inner/other.d.ts] +//// [other.d.ts] // esm format file export interface Thing {} export const x: () => Thing; @@ -18,7 +18,7 @@ export const x: () => Thing; "type": "module", "exports": "./index.js" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index 8288d6861a252..4568663e72ef1 100644 --- 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 @@ -4,10 +4,10 @@ // esm format file import { Thing } from "inner/other.js"; // should fail export const a = (await import("inner")).x(); -//// [node_modules/inner/index.d.ts] +//// [index.d.ts] // esm format file export { x } from "./other.js"; -//// [node_modules/inner/other.d.ts] +//// [other.d.ts] // esm format file export interface Thing {} export const x: () => Thing; @@ -18,7 +18,7 @@ export const x: () => Thing; "type": "module", "exports": "./index.js" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index ba6bad2f86986..3473da5aa83a8 100644 --- 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 @@ -4,10 +4,10 @@ // esm format file import { Thing } from "inner/other"; export const a = (await import("inner/index.js")).x(); -//// [node_modules/inner/index.d.ts] +//// [index.d.ts] // esm format file export { x } from "./other.js"; -//// [node_modules/inner/other.d.ts] +//// [other.d.ts] // esm format file export interface Thing {} export const x: () => Thing; @@ -18,7 +18,7 @@ export const x: () => Thing; "type": "module", "exports": "./index.js" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index ba6bad2f86986..3473da5aa83a8 100644 --- 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 @@ -4,10 +4,10 @@ // esm format file import { Thing } from "inner/other"; export const a = (await import("inner/index.js")).x(); -//// [node_modules/inner/index.d.ts] +//// [index.d.ts] // esm format file export { x } from "./other.js"; -//// [node_modules/inner/other.d.ts] +//// [other.d.ts] // esm format file export interface Thing {} export const x: () => Thing; @@ -18,7 +18,7 @@ export const x: () => Thing; "type": "module", "exports": "./index.js" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index 4aa3f9b74a602..5c0b944aae7f4 100644 --- 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 @@ -4,10 +4,10 @@ // esm format file import { Thing } from "inner/other"; export const a = (await import("inner/index.js")).x(); -//// [node_modules/inner/index.d.ts] +//// [index.d.ts] // esm format file export { x } from "./other.js"; -//// [node_modules/inner/other.d.ts] +//// [other.d.ts] // esm format file export interface Thing {} export const x: () => Thing; @@ -18,7 +18,7 @@ export const x: () => Thing; "type": "module", "exports": "./index.js" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index 4aa3f9b74a602..5c0b944aae7f4 100644 --- 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 @@ -4,10 +4,10 @@ // esm format file import { Thing } from "inner/other"; export const a = (await import("inner/index.js")).x(); -//// [node_modules/inner/index.d.ts] +//// [index.d.ts] // esm format file export { x } from "./other.js"; -//// [node_modules/inner/other.d.ts] +//// [other.d.ts] // esm format file export interface Thing {} export const x: () => Thing; @@ -18,7 +18,7 @@ export const x: () => Thing; "type": "module", "exports": "./index.js" } -//// [node_modules/inner/package.json] +//// [package.json] { "name": "inner", "private": true, 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 index 26a4d467816c9..ea15cfdd8f016 100644 --- 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 @@ -1,6 +1,70 @@ //// [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] //// 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 index 26a4d467816c9..ea15cfdd8f016 100644 --- 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 @@ -1,6 +1,70 @@ //// [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] //// 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 index 432fa0f6ebde5..474b8e0f3f3e9 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportAssignments.ts] //// -//// [subfolder/index.ts] +//// [index.ts] // cjs format file import fs = require("fs"); fs.readFile; @@ -23,7 +23,7 @@ export import fs2 = require("fs"); "private": true, "type": "module" } -//// [subfolder/package.json] +//// [package.json] { "type": "commonjs" } 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 index 432fa0f6ebde5..474b8e0f3f3e9 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportAssignments.ts] //// -//// [subfolder/index.ts] +//// [index.ts] // cjs format file import fs = require("fs"); fs.readFile; @@ -23,7 +23,7 @@ export import fs2 = require("fs"); "private": true, "type": "module" } -//// [subfolder/package.json] +//// [package.json] { "type": "commonjs" } 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 index 1880391c48a8b..7febf988ab1b4 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; @@ -8,7 +8,7 @@ export type LocalInterface = 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); -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -17,9 +17,9 @@ export const b = (null as any as import("pkg", { with: {"resolution-mode": "impo "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} /// [Declarations] //// 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 index 1880391c48a8b..7febf988ab1b4 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; @@ -8,7 +8,7 @@ export type LocalInterface = 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); -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -17,9 +17,9 @@ export const b = (null as any as import("pkg", { with: {"resolution-mode": "impo "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} /// [Declarations] //// 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 index 8df838d8de22e..c5dbe11f7f018 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts] //// -//// [subfolder/index.ts] +//// [index.ts] // cjs format file export * from "fs"; export * as fs from "fs"; @@ -14,7 +14,7 @@ export * as fs from "fs"; "private": true, "type": "module" } -//// [subfolder/package.json] +//// [package.json] { "type": "commonjs" } 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 index 8df838d8de22e..c5dbe11f7f018 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportHelpersCollisions2.ts] //// -//// [subfolder/index.ts] +//// [index.ts] // cjs format file export * from "fs"; export * as fs from "fs"; @@ -14,7 +14,7 @@ export * as fs from "fs"; "private": true, "type": "module" } -//// [subfolder/package.json] +//// [package.json] { "type": "commonjs" } 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 index 049bc187035f9..cd7340b8c7c9d 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts] //// -//// [subfolder/index.ts] +//// [index.ts] // cjs format file export {default} from "fs"; //// [index.ts] @@ -12,7 +12,7 @@ export {default} from "fs"; "private": true, "type": "module" } -//// [subfolder/package.json] +//// [package.json] { "type": "commonjs" } 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 index 049bc187035f9..cd7340b8c7c9d 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportHelpersCollisions3.ts] //// -//// [subfolder/index.ts] +//// [index.ts] // cjs format file export {default} from "fs"; //// [index.ts] @@ -12,7 +12,7 @@ export {default} from "fs"; "private": true, "type": "module" } -//// [subfolder/package.json] +//// [package.json] { "type": "commonjs" } 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 index 1e38832bba5e5..fc9b903a10276 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; @@ -8,7 +8,7 @@ export type LocalInterface = 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); -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -17,9 +17,9 @@ export const b = (null as any as import("pkg", { assert: {"resolution-mode": "im "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} /// [Declarations] //// 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 index 1e38832bba5e5..fc9b903a10276 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; @@ -8,7 +8,7 @@ export type LocalInterface = 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); -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -17,9 +17,9 @@ export const b = (null as any as import("pkg", { assert: {"resolution-mode": "im "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} /// [Declarations] //// 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 index 4f775a3310322..99b389ae3a6f8 100644 --- 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 @@ -1,5 +1,61 @@ //// [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] //// 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 index a69a2ae1c3f7b..321c0d7b5a28f 100644 --- 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 @@ -1,5 +1,14 @@ //// [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] //// 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 index 4ce986eea8c5b..da7eb7b50fdc7 100644 --- 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 @@ -1,5 +1,15 @@ //// [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] //// 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 index 7a121b6456114..e9a34dcbc9d36 100644 --- 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 @@ -1,5 +1,22 @@ //// [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] //// 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 index 94085ba64c0a8..40e555d25afe8 100644 --- 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 @@ -1,6 +1,22 @@ //// [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] //// 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 index 4ca60c72f56be..42d4050bbb029 100644 --- 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 @@ -1,6 +1,10 @@ //// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit10.ts] //// - +//// [symbolDeclarationEmit10.ts] +var obj = { + get [Symbol.isConcatSpreadable](): string { return '' }, + set [Symbol.isConcatSpreadable](x) { } +} /// [Declarations] //// 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 index 8f1011862e5e8..07fccbe138732 100644 --- 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 @@ -1,6 +1,9 @@ //// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit8.ts] //// - +//// [symbolDeclarationEmit8.ts] +var obj = { + [Symbol.isConcatSpreadable]: 0 +} /// [Declarations] //// 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 index 5af0c37b94b45..36c97ea28dba9 100644 --- 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 @@ -1,6 +1,9 @@ //// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit9.ts] //// - +//// [symbolDeclarationEmit9.ts] +var obj = { + [Symbol.isConcatSpreadable](): void { } +} /// [Declarations] //// 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 index 3bc3ff483c619..50b77177cdc35 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts @@ -1,23 +1,23 @@ //// [tests/cases/compiler/symbolLinkDeclarationEmitModuleNamesImportRef.ts] //// -//// [Folder/monorepo/core/index.ts] +//// [index.ts] import { styles } from "package-a"; export function getStyles() { return styles; } -//// [Folder/monorepo/package-a/index.d.ts] +//// [index.d.ts] export declare const styles: import("styled-components").InterpolationValue[]; -//// [Folder/node_modules/styled-components/package.json] +//// [package.json] { "name": "styled-components", "version": "3.3.3", "typings": "typings/styled-components.d.ts" } -//// [Folder/node_modules/styled-components/typings/styled-components.d.ts] +//// [styled-components.d.ts] export interface InterpolationValue {} /// [Declarations] //// 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 index 721f09c8b9cdb..b2cf0e68c5c99 100644 --- 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 @@ -1,6 +1,16 @@ //// [tests/cases/compiler/symbolObserverMismatchingPolyfillsWorkTogether.ts] //// - +//// [symbolObserverMismatchingPolyfillsWorkTogether.ts] +interface SymbolConstructor { + readonly observer: symbol; +} +interface SymbolConstructor { + readonly observer: unique symbol; +} + +const obj = { + [Symbol.observer]: 0 +}; /// [Declarations] //// 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 index 59a7f6b0471d1..34f0bb944369d 100644 --- 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 @@ -1,5 +1,9 @@ //// [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] //// 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 index d45c0ab5af033..c78003ab8be81 100644 --- 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 @@ -1,5 +1,268 @@ //// [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] //// 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 index 1b93fa228bc3f..7889e5141eee1 100644 --- 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 @@ -1,5 +1,321 @@ //// [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] //// 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 index 5cfc5413a4447..f45cfd2fc3e32 100644 --- 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 @@ -1,5 +1,148 @@ //// [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] //// 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 index 0d5b6c55508a1..63632978e9a45 100644 --- 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 @@ -1,5 +1,27 @@ //// [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] //// diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts index 8493db557b857..aef2953dcc16b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/typesVersionsDeclarationEmit.multiFile.d.ts @@ -7,7 +7,7 @@ import { fb } from "ext/other"; export const va = fa(); export const vb = fb(); -//// [node_modules/ext/package.json] +//// [package.json] { "name": "ext", "version": "1.0.0", @@ -17,19 +17,19 @@ export const vb = fb(); } } -//// [node_modules/ext/index.d.ts] +//// [index.d.ts] export interface A {} export function fa(): A; -//// [node_modules/ext/other.d.ts] +//// [other.d.ts] export interface B {} export function fb(): B; -//// [node_modules/ext/ts3.1/index.d.ts] +//// [index.d.ts] export interface A {} export function fa(): A; -//// [node_modules/ext/ts3.1/other.d.ts] +//// [other.d.ts] export interface B {} export function fb(): B; 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 index b96204e8aa7c1..75333b6da974c 100644 --- 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 @@ -7,7 +7,7 @@ import { fb } from "ext/other"; export const va: any = fa(); export const vb = fb(); -//// [node_modules/ext/package.json] +//// [package.json] { "name": "ext", "version": "1.0.0", @@ -17,18 +17,18 @@ export const vb = fb(); } } -//// [node_modules/ext/index.d.ts] +//// [index.d.ts] export interface A {} export function fa(): A; -//// [node_modules/ext/other.d.ts] +//// [other.d.ts] export interface B {} export function fb(): B; -//// [node_modules/ext/ts3.1/index.d.ts] +//// [index.d.ts] export * from "../"; -//// [node_modules/ext/ts3.1/other.d.ts] +//// [other.d.ts] export * from "../other"; 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 index 5d6d44aac8399..b62632d4c47bf 100644 --- 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 @@ -7,7 +7,7 @@ import { fa as fa2 } from "ext/other"; export const va = fa(); export const va2 = fa2(); -//// [node_modules/ext/package.json] +//// [package.json] { "name": "ext", "version": "1.0.0", @@ -19,15 +19,15 @@ export const va2 = fa2(); } } -//// [node_modules/ext/index.d.ts] +//// [index.d.ts] export interface A {} export function fa(): A; -//// [node_modules/ext/other.d.ts] +//// [other.d.ts] export interface A2 {} export function fa(): A2; -//// [node_modules/ext/ts3.1/index.d.ts] +//// [index.d.ts] export * from "../other"; 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 index 683c2254b3abf..63d30b13caf41 100644 --- 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 @@ -1,5 +1,442 @@ //// [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] //// 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 index e00e713fd50f4..7d67d46bbc58f 100644 --- 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 @@ -1,5 +1,53 @@ //// [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] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitHasTypesRefOnNamespaceUse.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitHasTypesRefOnNamespaceUse.d.ts index ed4a0733aefe1..9bc2cec5999e1 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitHasTypesRefOnNamespaceUse.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitHasTypesRefOnNamespaceUse.d.ts @@ -1,14 +1,14 @@ //// [tests/cases/compiler/declarationEmitHasTypesRefOnNamespaceUse.ts] //// -//// [/src/index.ts] +//// [index.ts] class Src implements NS.Dep { } -//// [/deps/dep/dep.d.ts] +//// [dep.d.ts] declare namespace NS { interface Dep { } } -//// [/deps/dep/package.json] +//// [package.json] { "typings": "dep.d.ts" } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/declarationFilesWithTypeReferences2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationFilesWithTypeReferences2.d.ts index 433a0b2932a6c..ec6d6b4f94382 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/declarationFilesWithTypeReferences2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/declarationFilesWithTypeReferences2.d.ts @@ -1,11 +1,11 @@ //// [tests/cases/compiler/declarationFilesWithTypeReferences2.ts] //// -//// [/node_modules/@types/node/index.d.ts] +//// [index.d.ts] interface Error2 { stack2: string; } -//// [/app.ts] +//// [app.ts] function foo(): Error2 { return undefined; } 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 index 16791b5b055b6..0d5c065231c98 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; @@ -8,7 +8,7 @@ export type LocalInterface = 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); -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -17,9 +17,9 @@ export const b = (null as any as import("pkg", { with: {"resolution-mode": "impo "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} /// [Declarations] //// 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 index 16791b5b055b6..0d5c065231c98 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; @@ -8,7 +8,7 @@ export type LocalInterface = 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); -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -17,9 +17,9 @@ export const b = (null as any as import("pkg", { with: {"resolution-mode": "impo "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} /// [Declarations] //// 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 index fec91f74af30d..c1d2eb1e27f81 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmitErrors.ts] //// -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -9,13 +9,13 @@ "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { with: {"resolution-mode": "foobar"} }).RequireInterface & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; @@ -23,7 +23,7 @@ export type LocalInterface = 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] +//// [other.ts] // missing with: export type LocalInterface = & import("pkg", {"resolution-mode": "require"}).RequireInterface @@ -32,7 +32,7 @@ export type LocalInterface = 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] +//// [other2.ts] // wrong attribute key export type LocalInterface = & import("pkg", { with: {"bad": "require"} }).RequireInterface @@ -41,7 +41,7 @@ export type LocalInterface = 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] +//// [other3.ts] // Array instead of object-y thing export type LocalInterface = & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface @@ -50,7 +50,7 @@ export type LocalInterface = 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] +//// [other4.ts] // Indirected attribute objecty-thing - not allowed type Attribute1 = { with: {"resolution-mode": "require"} }; type Attribute2 = { with: {"resolution-mode": "import"} }; @@ -62,7 +62,7 @@ export type LocalInterface = export const a = (null as any as import("pkg", Attribute1).RequireInterface); export const b = (null as any as import("pkg", Attribute2).ImportInterface); -//// [/other5.ts] +//// [other5.ts] export type LocalInterface = & import("pkg", { with: {} }).RequireInterface & import("pkg", { with: {} }).ImportInterface; 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 index fec91f74af30d..c1d2eb1e27f81 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmitErrors.ts] //// -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -9,13 +9,13 @@ "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { with: {"resolution-mode": "foobar"} }).RequireInterface & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; @@ -23,7 +23,7 @@ export type LocalInterface = 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] +//// [other.ts] // missing with: export type LocalInterface = & import("pkg", {"resolution-mode": "require"}).RequireInterface @@ -32,7 +32,7 @@ export type LocalInterface = 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] +//// [other2.ts] // wrong attribute key export type LocalInterface = & import("pkg", { with: {"bad": "require"} }).RequireInterface @@ -41,7 +41,7 @@ export type LocalInterface = 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] +//// [other3.ts] // Array instead of object-y thing export type LocalInterface = & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface @@ -50,7 +50,7 @@ export type LocalInterface = 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] +//// [other4.ts] // Indirected attribute objecty-thing - not allowed type Attribute1 = { with: {"resolution-mode": "require"} }; type Attribute2 = { with: {"resolution-mode": "import"} }; @@ -62,7 +62,7 @@ export type LocalInterface = export const a = (null as any as import("pkg", Attribute1).RequireInterface); export const b = (null as any as import("pkg", Attribute2).ImportInterface); -//// [/other5.ts] +//// [other5.ts] export type LocalInterface = & import("pkg", { with: {} }).RequireInterface & import("pkg", { with: {} }).ImportInterface; 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 index a2ec4da866f7e..423eba3ae2576 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; @@ -8,7 +8,7 @@ export type LocalInterface = 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); -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -17,9 +17,9 @@ export const b = (null as any as import("pkg", { assert: {"resolution-mode": "im "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} /// [Declarations] //// 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 index a2ec4da866f7e..423eba3ae2576 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; @@ -8,7 +8,7 @@ export type LocalInterface = 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); -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -17,9 +17,9 @@ export const b = (null as any as import("pkg", { assert: {"resolution-mode": "im "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} /// [Declarations] //// 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 index 087965900048c..59679a98a19a3 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts] //// -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -9,18 +9,18 @@ "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} -//// [/index.ts] +//// [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] +//// [other.ts] // missing assert: export type LocalInterface = & import("pkg", {"resolution-mode": "require"}).RequireInterface @@ -28,7 +28,7 @@ export type LocalInterface = 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] +//// [other2.ts] // wrong assertion key export type LocalInterface = & import("pkg", { assert: {"bad": "require"} }).RequireInterface @@ -36,7 +36,7 @@ export type LocalInterface = 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] +//// [other3.ts] // Array instead of object-y thing export type LocalInterface = & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface @@ -44,7 +44,7 @@ export type LocalInterface = 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] +//// [other4.ts] // Indirected assertion objecty-thing - not allowed type Asserts1 = { assert: {"resolution-mode": "require"} }; type Asserts2 = { assert: {"resolution-mode": "import"} }; @@ -55,7 +55,7 @@ export type LocalInterface = export const a = (null as any as import("pkg", Asserts1).RequireInterface); export const b = (null as any as import("pkg", Asserts2).ImportInterface); -//// [/other5.ts] +//// [other5.ts] export type LocalInterface = & import("pkg", { assert: {} }).RequireInterface & import("pkg", { assert: {} }).ImportInterface; 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 index 087965900048c..59679a98a19a3 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts] //// -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -9,18 +9,18 @@ "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} -//// [/index.ts] +//// [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] +//// [other.ts] // missing assert: export type LocalInterface = & import("pkg", {"resolution-mode": "require"}).RequireInterface @@ -28,7 +28,7 @@ export type LocalInterface = 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] +//// [other2.ts] // wrong assertion key export type LocalInterface = & import("pkg", { assert: {"bad": "require"} }).RequireInterface @@ -36,7 +36,7 @@ export type LocalInterface = 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] +//// [other3.ts] // Array instead of object-y thing export type LocalInterface = & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface @@ -44,7 +44,7 @@ export type LocalInterface = 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] +//// [other4.ts] // Indirected assertion objecty-thing - not allowed type Asserts1 = { assert: {"resolution-mode": "require"} }; type Asserts2 = { assert: {"resolution-mode": "import"} }; @@ -55,7 +55,7 @@ export type LocalInterface = export const a = (null as any as import("pkg", Asserts1).RequireInterface); export const b = (null as any as import("pkg", Asserts2).ImportInterface); -//// [/other5.ts] +//// [other5.ts] export type LocalInterface = & import("pkg", { assert: {} }).RequireInterface & import("pkg", { assert: {} }).ImportInterface; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseAssertEntriesError.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseAssertEntriesError.d.ts index 3c0370ce1c202..88e89e89662c6 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parseAssertEntriesError.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parseAssertEntriesError.d.ts @@ -1,6 +1,6 @@ //// [tests/cases/compiler/parseAssertEntriesError.ts] //// -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { assert: {1234, "resolution-mode": "require"} }).RequireInterface & import("pkg", { assert: {1234, "resolution-mode": "import"} }).ImportInterface; @@ -8,7 +8,7 @@ export type LocalInterface = 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); -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -17,9 +17,9 @@ export const b = (null as any as import("pkg", { assert: {1234, "resolution-mode "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} /// [Declarations] //// diff --git a/tests/baselines/reference/isolated-declarations/original/dte/parseImportAttributesError.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/parseImportAttributesError.d.ts index 968ec9c312524..90ec9089ac8db 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/parseImportAttributesError.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/parseImportAttributesError.d.ts @@ -1,6 +1,6 @@ //// [tests/cases/compiler/parseImportAttributesError.ts] //// -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { with: {1234, "resolution-mode": "require"} }).RequireInterface & import("pkg", { with: {1234, "resolution-mode": "import"} }).ImportInterface; @@ -8,7 +8,7 @@ export type LocalInterface = 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); -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -18,10 +18,10 @@ export const b = (null as any as import("pkg", { with: {1234, "resolution-mode": } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives11.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives11.d.ts index 825cefac8f643..31b9aa2c2a877 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives11.d.ts @@ -1,13 +1,13 @@ //// [tests/cases/compiler/typeReferenceDirectives11.ts] //// -//// [/mod2.ts] +//// [mod2.ts] import {foo} from "./mod1"; export const bar = foo(); -//// [/types/lib/index.d.ts] +//// [index.d.ts] interface Lib { x } -//// [/mod1.ts] +//// [mod1.ts] export function foo(): Lib { return {x: 1} } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives13.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives13.d.ts index 5674e3a755243..02b26e1697c09 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives13.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives13.d.ts @@ -1,16 +1,16 @@ //// [tests/cases/compiler/typeReferenceDirectives13.ts] //// -//// [/app.ts] +//// [app.ts] /// import {$} from "./ref"; export interface A { x: () => typeof $ } -//// [/ref.d.ts] +//// [ref.d.ts] export interface $ { x } -//// [/types/lib/index.d.ts] +//// [index.d.ts] declare let $: { x: number } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives2.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives2.d.ts index 35dc5fbc5e32d..6dc94773e98de 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives2.d.ts @@ -1,10 +1,10 @@ //// [tests/cases/compiler/typeReferenceDirectives2.ts] //// -//// [/app.ts] +//// [app.ts] interface A { x: $ } -//// [/types/lib/index.d.ts] +//// [index.d.ts] interface $ { 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 index 48ac75f180737..c75c9c2e4cee1 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives5.d.ts @@ -1,15 +1,15 @@ //// [tests/cases/compiler/typeReferenceDirectives5.ts] //// -//// [/app.ts] +//// [app.ts] /// import {$} from "./ref"; export interface A { x: typeof $; } -//// [/ref.d.ts] +//// [ref.d.ts] export interface $ { x } -//// [/types/lib/index.d.ts] +//// [index.d.ts] declare let $: { x: number } diff --git a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts index 0dd9ed42dba44..c8552c033897f 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/typeReferenceDirectives8.d.ts @@ -1,12 +1,12 @@ //// [tests/cases/compiler/typeReferenceDirectives8.ts] //// -//// [/mod2.ts] +//// [mod2.ts] import {foo} from "./mod1"; export const bar = foo(); -//// [/types/lib/index.d.ts] +//// [index.d.ts] interface Lib { x } -//// [/mod1.ts] +//// [mod1.ts] export function foo(): Lib { return {x: 1} } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitHasTypesRefOnNamespaceUse.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitHasTypesRefOnNamespaceUse.d.ts index 642d0f5d96c17..9c7f7134b5ab5 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitHasTypesRefOnNamespaceUse.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitHasTypesRefOnNamespaceUse.d.ts @@ -1,14 +1,14 @@ //// [tests/cases/compiler/declarationEmitHasTypesRefOnNamespaceUse.ts] //// -//// [/src/index.ts] +//// [index.ts] class Src implements NS.Dep { } -//// [/deps/dep/dep.d.ts] +//// [dep.d.ts] declare namespace NS { interface Dep { } } -//// [/deps/dep/package.json] +//// [package.json] { "typings": "dep.d.ts" } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationFilesWithTypeReferences2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationFilesWithTypeReferences2.d.ts index abe1a7644c416..9f755a5e07cd1 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/declarationFilesWithTypeReferences2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/declarationFilesWithTypeReferences2.d.ts @@ -1,11 +1,11 @@ //// [tests/cases/compiler/declarationFilesWithTypeReferences2.ts] //// -//// [/node_modules/@types/node/index.d.ts] +//// [index.d.ts] interface Error2 { stack2: string; } -//// [/app.ts] +//// [app.ts] function foo(): Error2 { return undefined; } 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 index b3c4f6d9274ca..f2f214d0009ed 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; @@ -8,7 +8,7 @@ export type LocalInterface = 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); -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -17,9 +17,9 @@ export const b = (null as any as import("pkg", { with: {"resolution-mode": "impo "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} /// [Declarations] //// 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 index b3c4f6d9274ca..f2f214d0009ed 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmit.ts] //// -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { with: {"resolution-mode": "require"} }).RequireInterface & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; @@ -8,7 +8,7 @@ export type LocalInterface = 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); -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -17,9 +17,9 @@ export const b = (null as any as import("pkg", { with: {"resolution-mode": "impo "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} /// [Declarations] //// 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 index 7c4e323e17eab..74dc5dfcd82a1 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmitErrors.ts] //// -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -9,13 +9,13 @@ "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { with: {"resolution-mode": "foobar"} }).RequireInterface & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; @@ -23,7 +23,7 @@ export type LocalInterface = 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] +//// [other.ts] // missing with: export type LocalInterface = & import("pkg", {"resolution-mode": "require"}).RequireInterface @@ -32,7 +32,7 @@ export type LocalInterface = 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] +//// [other2.ts] // wrong attribute key export type LocalInterface = & import("pkg", { with: {"bad": "require"} }).RequireInterface @@ -41,7 +41,7 @@ export type LocalInterface = 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] +//// [other3.ts] // Array instead of object-y thing export type LocalInterface = & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface @@ -50,7 +50,7 @@ export type LocalInterface = 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] +//// [other4.ts] // Indirected attribute objecty-thing - not allowed type Attribute1 = { with: {"resolution-mode": "require"} }; type Attribute2 = { with: {"resolution-mode": "import"} }; @@ -62,7 +62,7 @@ export type LocalInterface = export const a = (null as any as import("pkg", Attribute1).RequireInterface); export const b = (null as any as import("pkg", Attribute2).ImportInterface); -//// [/other5.ts] +//// [other5.ts] export type LocalInterface = & import("pkg", { with: {} }).RequireInterface & import("pkg", { with: {} }).ImportInterface; 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 index 7c4e323e17eab..74dc5dfcd82a1 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportAttributesTypeModeDeclarationEmitErrors.ts] //// -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -9,13 +9,13 @@ "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { with: {"resolution-mode": "foobar"} }).RequireInterface & import("pkg", { with: {"resolution-mode": "import"} }).ImportInterface; @@ -23,7 +23,7 @@ export type LocalInterface = 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] +//// [other.ts] // missing with: export type LocalInterface = & import("pkg", {"resolution-mode": "require"}).RequireInterface @@ -32,7 +32,7 @@ export type LocalInterface = 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] +//// [other2.ts] // wrong attribute key export type LocalInterface = & import("pkg", { with: {"bad": "require"} }).RequireInterface @@ -41,7 +41,7 @@ export type LocalInterface = 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] +//// [other3.ts] // Array instead of object-y thing export type LocalInterface = & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface @@ -50,7 +50,7 @@ export type LocalInterface = 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] +//// [other4.ts] // Indirected attribute objecty-thing - not allowed type Attribute1 = { with: {"resolution-mode": "require"} }; type Attribute2 = { with: {"resolution-mode": "import"} }; @@ -62,7 +62,7 @@ export type LocalInterface = export const a = (null as any as import("pkg", Attribute1).RequireInterface); export const b = (null as any as import("pkg", Attribute2).ImportInterface); -//// [/other5.ts] +//// [other5.ts] export type LocalInterface = & import("pkg", { with: {} }).RequireInterface & import("pkg", { with: {} }).ImportInterface; 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 index 10615e67cb746..392bce9ddd0b7 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; @@ -8,7 +8,7 @@ export type LocalInterface = 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); -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -17,9 +17,9 @@ export const b = (null as any as import("pkg", { assert: {"resolution-mode": "im "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} /// [Declarations] //// 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 index 10615e67cb746..392bce9ddd0b7 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmit1.ts] //// -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { assert: {"resolution-mode": "require"} }).RequireInterface & import("pkg", { assert: {"resolution-mode": "import"} }).ImportInterface; @@ -8,7 +8,7 @@ export type LocalInterface = 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); -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -17,9 +17,9 @@ export const b = (null as any as import("pkg", { assert: {"resolution-mode": "im "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} /// [Declarations] //// 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 index 58dda95bb2dfc..46f5501137e72 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts] //// -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -9,18 +9,18 @@ "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} -//// [/index.ts] +//// [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] +//// [other.ts] // missing assert: export type LocalInterface = & import("pkg", {"resolution-mode": "require"}).RequireInterface @@ -28,7 +28,7 @@ export type LocalInterface = 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] +//// [other2.ts] // wrong assertion key export type LocalInterface = & import("pkg", { assert: {"bad": "require"} }).RequireInterface @@ -36,7 +36,7 @@ export type LocalInterface = 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] +//// [other3.ts] // Array instead of object-y thing export type LocalInterface = & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface @@ -44,7 +44,7 @@ export type LocalInterface = 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] +//// [other4.ts] // Indirected assertion objecty-thing - not allowed type Asserts1 = { assert: {"resolution-mode": "require"} }; type Asserts2 = { assert: {"resolution-mode": "import"} }; @@ -55,7 +55,7 @@ export type LocalInterface = export const a = (null as any as import("pkg", Asserts1).RequireInterface); export const b = (null as any as import("pkg", Asserts2).ImportInterface); -//// [/other5.ts] +//// [other5.ts] export type LocalInterface = & import("pkg", { assert: {} }).RequireInterface & import("pkg", { assert: {} }).ImportInterface; 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 index 58dda95bb2dfc..46f5501137e72 100644 --- 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 @@ -1,6 +1,6 @@ //// [tests/cases/conformance/node/nodeModulesImportTypeModeDeclarationEmitErrors1.ts] //// -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -9,18 +9,18 @@ "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} -//// [/index.ts] +//// [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] +//// [other.ts] // missing assert: export type LocalInterface = & import("pkg", {"resolution-mode": "require"}).RequireInterface @@ -28,7 +28,7 @@ export type LocalInterface = 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] +//// [other2.ts] // wrong assertion key export type LocalInterface = & import("pkg", { assert: {"bad": "require"} }).RequireInterface @@ -36,7 +36,7 @@ export type LocalInterface = 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] +//// [other3.ts] // Array instead of object-y thing export type LocalInterface = & import("pkg", [ {"resolution-mode": "require"} ]).RequireInterface @@ -44,7 +44,7 @@ export type LocalInterface = 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] +//// [other4.ts] // Indirected assertion objecty-thing - not allowed type Asserts1 = { assert: {"resolution-mode": "require"} }; type Asserts2 = { assert: {"resolution-mode": "import"} }; @@ -55,7 +55,7 @@ export type LocalInterface = export const a = (null as any as import("pkg", Asserts1).RequireInterface); export const b = (null as any as import("pkg", Asserts2).ImportInterface); -//// [/other5.ts] +//// [other5.ts] export type LocalInterface = & import("pkg", { assert: {} }).RequireInterface & import("pkg", { assert: {} }).ImportInterface; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parseAssertEntriesError.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseAssertEntriesError.d.ts index 7218e40bb4e91..c8df99fda7e5a 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parseAssertEntriesError.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parseAssertEntriesError.d.ts @@ -1,6 +1,6 @@ //// [tests/cases/compiler/parseAssertEntriesError.ts] //// -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { assert: {1234, "resolution-mode": "require"} }).RequireInterface & import("pkg", { assert: {1234, "resolution-mode": "import"} }).ImportInterface; @@ -8,7 +8,7 @@ export type LocalInterface = 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); -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -17,9 +17,9 @@ export const b = (null as any as import("pkg", { assert: {1234, "resolution-mode "require": "./require.js" } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} /// [Declarations] //// diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/parseImportAttributesError.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/parseImportAttributesError.d.ts index bce304225c8c7..dc4201799c4fc 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/parseImportAttributesError.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/parseImportAttributesError.d.ts @@ -1,6 +1,6 @@ //// [tests/cases/compiler/parseImportAttributesError.ts] //// -//// [/index.ts] +//// [index.ts] export type LocalInterface = & import("pkg", { with: {1234, "resolution-mode": "require"} }).RequireInterface & import("pkg", { with: {1234, "resolution-mode": "import"} }).ImportInterface; @@ -8,7 +8,7 @@ export type LocalInterface = 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); -//// [/node_modules/pkg/package.json] +//// [package.json] { "name": "pkg", "version": "0.0.1", @@ -18,10 +18,10 @@ export const b = (null as any as import("pkg", { with: {1234, "resolution-mode": } } -//// [/node_modules/pkg/import.d.ts] +//// [import.d.ts] export interface ImportInterface {} -//// [/node_modules/pkg/require.d.ts] +//// [require.d.ts] export interface RequireInterface {} diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives11.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives11.d.ts index e8482a871cc8b..5b6c5a1bfde11 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives11.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives11.d.ts @@ -1,13 +1,13 @@ //// [tests/cases/compiler/typeReferenceDirectives11.ts] //// -//// [/mod2.ts] +//// [mod2.ts] import {foo} from "./mod1"; export const bar = foo(); -//// [/types/lib/index.d.ts] +//// [index.d.ts] interface Lib { x } -//// [/mod1.ts] +//// [mod1.ts] export function foo(): Lib { return {x: 1} } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives13.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives13.d.ts index 85405f4a243f0..4c7d78a887ca5 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives13.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives13.d.ts @@ -1,16 +1,16 @@ //// [tests/cases/compiler/typeReferenceDirectives13.ts] //// -//// [/app.ts] +//// [app.ts] /// import {$} from "./ref"; export interface A { x: () => typeof $ } -//// [/ref.d.ts] +//// [ref.d.ts] export interface $ { x } -//// [/types/lib/index.d.ts] +//// [index.d.ts] declare let $: { x: number } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives2.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives2.d.ts index a66e24ae78c68..cc529addfd456 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives2.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives2.d.ts @@ -1,10 +1,10 @@ //// [tests/cases/compiler/typeReferenceDirectives2.ts] //// -//// [/app.ts] +//// [app.ts] interface A { x: $ } -//// [/types/lib/index.d.ts] +//// [index.d.ts] interface $ { x } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives5.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives5.d.ts index e4b3ec017b3b8..8327d7446dfde 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives5.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives5.d.ts @@ -1,15 +1,15 @@ //// [tests/cases/compiler/typeReferenceDirectives5.ts] //// -//// [/app.ts] +//// [app.ts] /// import {$} from "./ref"; export interface A { x: typeof $; } -//// [/ref.d.ts] +//// [ref.d.ts] export interface $ { x } -//// [/types/lib/index.d.ts] +//// [index.d.ts] declare let $: { x: number } diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts index c13cd850b26a5..b6c7fde8bb3f7 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/typeReferenceDirectives8.d.ts @@ -1,12 +1,12 @@ //// [tests/cases/compiler/typeReferenceDirectives8.ts] //// -//// [/mod2.ts] +//// [mod2.ts] import {foo} from "./mod1"; export const bar = foo(); -//// [/types/lib/index.d.ts] +//// [index.d.ts] interface Lib { x } -//// [/mod1.ts] +//// [mod1.ts] export function foo(): Lib { return {x: 1} } From 7c4dbedda8b7d04fbf924df20799733f6dbe5dbb Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 12 Jan 2024 14:53:49 +0000 Subject: [PATCH 207/224] Removed fix for alias parameter removal (not needed anymore) --- src/compiler/checker.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 5b8a456ea687a..ea1d54eddc8ba 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14905,9 +14905,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return true; } - if(nodeIsSynthesized(node)) { - return false; - } if (node.initializer) { const signature = getSignatureFromDeclaration(node.parent); From c3245bb130cf470fa6048374fb43f0d76273b935 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 12 Jan 2024 14:57:58 +0000 Subject: [PATCH 208/224] Fixed formatting. --- src/compiler/checker.ts | 1 - src/compiler/moduleSpecifiers.ts | 36 +++++------ src/compiler/transformers/declarations.ts | 78 +++++++++++------------ src/compiler/types.ts | 7 +- src/compiler/utilities.ts | 1 - src/harness/harnessIO.ts | 1 - src/testRunner/compilerRunner.ts | 6 +- 7 files changed, 64 insertions(+), 66 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ea1d54eddc8ba..c45f285125357 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14905,7 +14905,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return true; } - if (node.initializer) { const signature = getSignatureFromDeclaration(node.parent); const parameterIndex = node.parent.parameters.indexOf(node); diff --git a/src/compiler/moduleSpecifiers.ts b/src/compiler/moduleSpecifiers.ts index 1fc7459416a34..d80f0ff5ea1c9 100644 --- a/src/compiler/moduleSpecifiers.ts +++ b/src/compiler/moduleSpecifiers.ts @@ -933,41 +933,41 @@ function tryGetModuleNameFromExportsOrImports(options: CompilerOptions, host: Mo function tryGetModuleNameFromExports(options: CompilerOptions, host: ModuleSpecifierResolutionHost, targetFilePath: string, packageDirectory: string, packageName: string, exports: unknown, conditions: string[]): { moduleFileToTry: string; } | undefined { if (typeof exports === "object" && exports !== null && !Array.isArray(exports) && allKeysStartWithDot(exports as MapLike)) { // eslint-disable-line no-null/no-null - // sub-mappings - // 3 cases: - // * directory mappings (legacyish, key ends with / (technically allows index/extension resolution under cjs mode)) - // * pattern mappings (contains a *) - // * exact mappings (no *, does not end with /) - return forEach(getOwnKeys(exports as MapLike), k => { - const subPackageName = getNormalizedAbsolutePath(combinePaths(packageName, k), /*currentDirectory*/ undefined); - const mode = endsWith(k, "/") ? MatchingMode.Directory - : k.includes("*") ? MatchingMode.Pattern - : MatchingMode.Exact; + // sub-mappings + // 3 cases: + // * directory mappings (legacyish, key ends with / (technically allows index/extension resolution under cjs mode)) + // * pattern mappings (contains a *) + // * exact mappings (no *, does not end with /) + return forEach(getOwnKeys(exports as MapLike), k => { + const subPackageName = getNormalizedAbsolutePath(combinePaths(packageName, k), /*currentDirectory*/ undefined); + const mode = endsWith(k, "/") ? MatchingMode.Directory + : k.includes("*") ? MatchingMode.Pattern + : MatchingMode.Exact; return tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, subPackageName, (exports as MapLike)[k], conditions, mode, /*isImports*/ false); - }); - } + }); + } return tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, exports, conditions, MatchingMode.Exact, /*isImports*/ false); - } +} function tryGetModuleNameFromPackageJsonImports(moduleFileName: string, sourceDirectory: string, options: CompilerOptions, host: ModuleSpecifierResolutionHost, importMode: ResolutionMode) { if (!host.readFile || !getResolvePackageJsonImports(options)) { return undefined; - } + } const ancestorDirectoryWithPackageJson = getNearestAncestorDirectoryWithPackageJson(host, sourceDirectory); if (!ancestorDirectoryWithPackageJson) { return undefined; - } + } const packageJsonPath = combinePaths(ancestorDirectoryWithPackageJson, "package.json"); const cachedPackageJson = host.getPackageJsonInfoCache?.()?.getPackageJsonInfo(packageJsonPath); if (isMissingPackageJsonInfo(cachedPackageJson) || !host.fileExists(packageJsonPath)) { return undefined; - } + } const packageJsonContent = cachedPackageJson?.contents.packageJsonContent || tryParseJson(host.readFile(packageJsonPath)!); const imports = packageJsonContent?.imports; if (!imports) { - return undefined; -} + return undefined; + } const conditions = getConditions(options, importMode); return forEach(getOwnKeys(imports as MapLike), k => { if (!startsWith(k, "#") || k === "#" || startsWith(k, "#/")) return undefined; diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index c102bc8a29e2a..bc7adb049eb07 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -1496,9 +1496,9 @@ export function transformDeclarations(context: TransformationContext | IsolatedT input, factory.updateConstructSignature( input, - ensureTypeParams(input, input.typeParameters), - updateParamsList(input, input.parameters), - ensureType(input, input.type), + ensureTypeParams(input, input.typeParameters), + updateParamsList(input, input.parameters), + ensureType(input, input.type), ), )); case SyntaxKind.Constructor: { @@ -1506,9 +1506,9 @@ export function transformDeclarations(context: TransformationContext | IsolatedT const ctor = ensureBindingAliasesInParameterList( input, factory.createConstructorDeclaration( - /*modifiers*/ ensureModifiers(input), - updateParamsList(input, input.parameters, ModifierFlags.None), - /*body*/ undefined, + /*modifiers*/ ensureModifiers(input), + updateParamsList(input, input.parameters, ModifierFlags.None), + /*body*/ undefined, ), ); return cleanup(ctor); @@ -1520,14 +1520,14 @@ export function transformDeclarations(context: TransformationContext | IsolatedT const sig = ensureBindingAliasesInParameterList( input, factory.createMethodDeclaration( - ensureModifiers(input), - /*asteriskToken*/ undefined, - input.name, - input.questionToken, - ensureTypeParams(input, input.typeParameters), - updateParamsList(input, input.parameters), - ensureType(input, input.type), - /*body*/ undefined, + ensureModifiers(input), + /*asteriskToken*/ undefined, + input.name, + input.questionToken, + ensureTypeParams(input, input.typeParameters), + updateParamsList(input, input.parameters), + ensureType(input, input.type), + /*body*/ undefined, ), ); return cleanup(sig); @@ -1543,11 +1543,11 @@ export function transformDeclarations(context: TransformationContext | IsolatedT input, factory.updateGetAccessorDeclaration( input, - ensureModifiers(input), - input.name, - updateAccessorParamsList(input, hasEffectiveModifier(input, ModifierFlags.Private)), - ensureType(input, accessorType), - /*body*/ undefined, + ensureModifiers(input), + input.name, + updateAccessorParamsList(input, hasEffectiveModifier(input, ModifierFlags.Private)), + ensureType(input, accessorType), + /*body*/ undefined, ), )); } @@ -1559,10 +1559,10 @@ export function transformDeclarations(context: TransformationContext | IsolatedT input, factory.updateSetAccessorDeclaration( input, - ensureModifiers(input), - input.name, - updateAccessorParamsList(input, hasEffectiveModifier(input, ModifierFlags.Private)), - /*body*/ undefined, + ensureModifiers(input), + input.name, + updateAccessorParamsList(input, hasEffectiveModifier(input, ModifierFlags.Private)), + /*body*/ undefined, ), )); } @@ -1597,12 +1597,12 @@ export function transformDeclarations(context: TransformationContext | IsolatedT input, factory.updateMethodSignature( input, - ensureModifiers(input), - input.name, - input.questionToken, - ensureTypeParams(input, input.typeParameters), - updateParamsList(input, input.parameters), - ensureType(input, input.type), + ensureModifiers(input), + input.name, + input.questionToken, + ensureTypeParams(input, input.typeParameters), + updateParamsList(input, input.parameters), + ensureType(input, input.type), ), )); } @@ -1611,9 +1611,9 @@ export function transformDeclarations(context: TransformationContext | IsolatedT input, factory.updateCallSignature( input, - ensureTypeParams(input, input.typeParameters), - updateParamsList(input, input.parameters), - ensureType(input, input.type), + ensureTypeParams(input, input.typeParameters), + updateParamsList(input, input.parameters), + ensureType(input, input.type), ), )); } @@ -1890,13 +1890,13 @@ export function transformDeclarations(context: TransformationContext | IsolatedT input, factory.updateFunctionDeclaration( input, - ensureModifiers(input), - /*asteriskToken*/ undefined, - input.name, - ensureTypeParams(input, input.typeParameters), - updateParamsList(input, input.parameters), - ensureType(input, input.type), - /*body*/ undefined, + ensureModifiers(input), + /*asteriskToken*/ undefined, + input.name, + ensureTypeParams(input, input.typeParameters), + updateParamsList(input, input.parameters), + ensureType(input, input.type), + /*body*/ undefined, ), )); if (clean && resolver.isExpandoFunction(input) && shouldEmitFunctionProperties(input)) { diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 6b3a5eff118ae..5b89ab2e54ff1 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -5680,7 +5680,6 @@ export enum TypeReferenceSerializationKind { ObjectType, } - /** @internal */ export interface CoreEmitResolver { isLiteralComputedName(node: ComputedPropertyName): boolean; @@ -8204,8 +8203,8 @@ export interface SourceFileMayBeEmittedHost { export interface CoreEmitHost { getCurrentDirectory(): string; getCommonSourceDirectory(): string; - getCanonicalFileName(fileName: string): string; -} + getCanonicalFileName(fileName: string): string; +} /** @internal */ export interface EmitHost extends ScriptReferenceHost, ModuleSpecifierResolutionHost, SourceFileMayBeEmittedHost, CoreEmitHost { @@ -9281,7 +9280,7 @@ export interface IsolatedTransformationContext extends CoreTransformationContext addDiagnostic(diag: Diagnostic): void; } /** @internal */ -export interface NullTransformationContext extends Omit { +export interface NullTransformationContext extends Omit { kind: TransformationContextKind.NullContext; getEmitResolver(): never; getEmitHost(): never; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 171135cb19dfa..abd7eb4dc60f2 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -10727,7 +10727,6 @@ export function getAnyImportSyntax(node: Node): AnyImportSyntax | undefined { } } - /** @internal */ export function isGlobalSourceFile(node: Node) { return node.kind === SyntaxKind.SourceFile && !isExternalOrCommonJsModule(node as SourceFile); diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index 4aac0d486938f..eb020c8d9e04c 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -1139,7 +1139,6 @@ export namespace Compiler { Baseline.runBaseline(type + "/" + baselinePath.replace(/\.tsx?/, `.d.ts`), code.length > 0 ? code : null); } - export function doDeclarationMapBaseline( baselinePath: string, type: string, diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 8e826f903073e..f670752ac3569 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -120,7 +120,8 @@ export class CompilerBaselineRunner extends RunnerBase { const isolatedTestEnv = IsolatedDeclarationTest.transformEnvironment(environment); if (isolatedTestEnv) { isolatedTest = new IsolatedDeclarationTest(isolatedTestEnv); - } else { + } + else { this.skip(); } }); @@ -139,7 +140,8 @@ export class CompilerBaselineRunner extends RunnerBase { const fixedIsolatedTestEnv = FixedIsolatedDeclarationTest.fixTestProject(environment); if (fixedIsolatedTestEnv) { fixedIsolatedTest = new FixedIsolatedDeclarationTest(fixedIsolatedTestEnv); - } else { + } + else { this.skip(); } }); From b2706e0a831c5c6befe1627c61b10f9463de49a7 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 12 Jan 2024 15:58:05 +0000 Subject: [PATCH 209/224] Fixed minor code review issues. --- .gitignore | 1 - src/compiler/transformers/declarations/emitBinder.ts | 2 +- src/compiler/transformers/declarations/emitResolver.ts | 4 +--- .../transformers/declarations/localInferenceResolver.ts | 2 +- .../transformers/declarations/transpileDeclaration.ts | 3 +-- src/compiler/types.ts | 3 ++- src/compiler/utilities.ts | 6 ------ tests/baselines/reference/api/typescript.d.ts | 2 -- 8 files changed, 6 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index 6c946ef6507d4..b084ac14ecc28 100644 --- a/.gitignore +++ b/.gitignore @@ -57,7 +57,6 @@ yarn.lock yarn-error.log .parallelperf.* tests/baselines/reference/dt -tests/auto-fixed/* .failed-tests TEST-results.xml package-lock.json diff --git a/src/compiler/transformers/declarations/emitBinder.ts b/src/compiler/transformers/declarations/emitBinder.ts index 5ac1b14c41e0a..ec153b3a6ab7a 100644 --- a/src/compiler/transformers/declarations/emitBinder.ts +++ b/src/compiler/transformers/declarations/emitBinder.ts @@ -909,5 +909,5 @@ export function getMemberKeyFromElement(element: NamedDeclaration): MemberKey | } const name = element.name; if (!name || isElementAccessExpression(name) || isObjectBindingPattern(name) || isArrayBindingPattern(name) || isJsxNamespacedName(name) || isPropertyAccessExpression(name)) return undefined; - return getMemberKey(name) as MemberKey; + return getMemberKey(name); } diff --git a/src/compiler/transformers/declarations/emitResolver.ts b/src/compiler/transformers/declarations/emitResolver.ts index de4d3f641b9d1..29bc1430827d3 100644 --- a/src/compiler/transformers/declarations/emitResolver.ts +++ b/src/compiler/transformers/declarations/emitResolver.ts @@ -386,9 +386,7 @@ export function createEmitDeclarationResolver(file: SourceFile): CoreEmitResolve function isDeclarationVisible(node: Node): boolean { if (node) { const links = getNodeLinks(node); - if (links.isVisible === undefined) { - links.isVisible = !!determineIfDeclarationIsVisible(node, isDeclarationVisible); - } + links.isVisible ??= !!determineIfDeclarationIsVisible(node, isDeclarationVisible); return links.isVisible; } diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 7e1165d38d861..ad7bc0bd3f1fb 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -107,7 +107,7 @@ import { VisitResult, } from "../../_namespaces/ts"; -enum NarrowBehavior { +const enum NarrowBehavior { None = 0, AsConst = 1, KeepLiterals = 2, diff --git a/src/compiler/transformers/declarations/transpileDeclaration.ts b/src/compiler/transformers/declarations/transpileDeclaration.ts index a9024039ff2c4..0cefee523be3e 100644 --- a/src/compiler/transformers/declarations/transpileDeclaration.ts +++ b/src/compiler/transformers/declarations/transpileDeclaration.ts @@ -16,7 +16,6 @@ import { IsolatedTransformationContext, normalizeSlashes, nullTransformationContext, - PrinterOptions, SourceFile, TransformationContextKind, transformDeclarations, @@ -59,7 +58,7 @@ export function transpileDeclaration(sourceFile: SourceFile, transpileOptions: T extendedDiagnostics: compilerOptions.extendedDiagnostics, onlyPrintJsDocStyle: true, omitBraceSourceMapPositions: true, - } as PrinterOptions); + }); const writer = createTextWriter(getNewLineCharacter(compilerOptions)); const declarationPath = getDeclarationEmitOutputFilePathWorker( diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 5b89ab2e54ff1..7b77eee97d3e8 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -10150,8 +10150,9 @@ export interface UserPreferences { readonly organizeImportsCaseFirst?: "upper" | "lower" | false; readonly organizeImportsTypeOrder?: "first" | "last" | "inline"; readonly excludeLibrarySymbolsInNavTo?: boolean; - + /** @internal */ readonly includeInlineTypeFixes?: boolean; + /** @internal */ readonly includeRelativeTypeFixes?: boolean; } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index abd7eb4dc60f2..806e56efe1187 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -8698,12 +8698,6 @@ export const computedOptions = createComputedCompilerOptions({ return !!(compilerOptions.isolatedModules || compilerOptions.verbatimModuleSyntax); }, }, - isolatedDeclarations: { - dependencies: ["verbatimModuleSyntax"], - computeValue: compilerOptions => { - return !!(compilerOptions.isolatedDeclarations); - }, - }, esModuleInterop: { dependencies: ["module", "target"], computeValue: (compilerOptions): boolean => { diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 4e20fe28be1c2..b0222465e5a77 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -8808,8 +8808,6 @@ declare namespace ts { readonly organizeImportsCaseFirst?: "upper" | "lower" | false; readonly organizeImportsTypeOrder?: "first" | "last" | "inline"; readonly excludeLibrarySymbolsInNavTo?: boolean; - readonly includeInlineTypeFixes?: boolean; - readonly includeRelativeTypeFixes?: boolean; } /** Represents a bigint literal value without requiring bigint support */ interface PseudoBigInt { From 2164696fa12387283461c6f515ee0c808bed8e4a Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Sat, 13 Jan 2024 17:42:06 +0000 Subject: [PATCH 210/224] Updated baseline. --- ...itBindingPatternWithReservedWord.d.ts.diff | 17 ------ ...ndingPatternWithReservedWord.d.ts.map.diff | 16 ++++++ .../declarationEmitBindingPatterns.d.ts.diff | 17 ------ ...clarationEmitBindingPatterns.d.ts.map.diff | 16 ++++++ ...tBindingPatternsFunctionExpr.d.ts.map.diff | 16 ++++++ ...tDuplicateParameterDestructuring.d.ts.diff | 24 --------- ...licateParameterDestructuring.d.ts.map.diff | 16 ++++++ ...lternativeContainingModules1.d.ts.map.diff | 2 +- ...lternativeContainingModules2.d.ts.map.diff | 2 +- ...clarationEmitUsingTypeAlias1.d.ts.map.diff | 2 +- .../destructuringInFunctionType.d.ts.map.diff | 8 +-- .../diff/noInferRedeclaration.d.ts.map.diff | 19 +++++++ ...structuredPropertyInFunctionType.d.ts.diff | 31 ++++------- ...ionEmitBindingPatternWithReservedWord.d.ts | 44 --------------- ...mitBindingPatternWithReservedWord.d.ts.map | 53 +++++++++++++++++++ .../dte/declarationEmitBindingPatterns.d.ts | 22 -------- .../declarationEmitBindingPatterns.d.ts.map | 31 +++++++++++ ...onEmitBindingPatternsFunctionExpr.d.ts.map | 44 +++++++++++++++ ...onEmitDuplicateParameterDestructuring.d.ts | 22 -------- ...itDuplicateParameterDestructuring.d.ts.map | 31 +++++++++++ .../dte/destructuringInFunctionType.d.ts.map | 6 +-- .../dte/noInferRedeclaration.d.ts.map | 38 +++++++++++++ ...ingDestructuredPropertyInFunctionType.d.ts | 44 +++++++-------- ...ionEmitBindingPatternWithReservedWord.d.ts | 44 --------------- ...mitBindingPatternWithReservedWord.d.ts.map | 53 +++++++++++++++++++ .../tsc/declarationEmitBindingPatterns.d.ts | 22 -------- .../declarationEmitBindingPatterns.d.ts.map | 31 +++++++++++ ...onEmitBindingPatternsFunctionExpr.d.ts.map | 44 +++++++++++++++ ...onEmitDuplicateParameterDestructuring.d.ts | 22 -------- ...itDuplicateParameterDestructuring.d.ts.map | 31 +++++++++++ .../tsc/destructuringInFunctionType.d.ts.map | 6 +-- .../tsc/noInferRedeclaration.d.ts.map | 38 +++++++++++++ ...ingDestructuredPropertyInFunctionType.d.ts | 30 +++++------ ...itBindingPatternWithReservedWord.d.ts.diff | 15 ------ ...structuredPropertyInFunctionType.d.ts.diff | 16 +++--- ...ionEmitBindingPatternWithReservedWord.d.ts | 43 --------------- ...ingDestructuredPropertyInFunctionType.d.ts | 42 +++++++-------- ...ionEmitBindingPatternWithReservedWord.d.ts | 43 --------------- ...ingDestructuredPropertyInFunctionType.d.ts | 36 ++++++------- ...ationEmitBindingPatternWithReservedWord.ts | 3 +- .../declarationEmitBindingPatterns.ts | 2 +- ...nEmitUsingAlternativeContainingModules1.ts | 1 + ...nEmitUsingAlternativeContainingModules2.ts | 1 + .../declarationEmitUsingTypeAlias1.ts | 1 + ...amingDestructuredPropertyInFunctionType.ts | 2 +- .../typeInference/noInferRedeclaration.ts | 1 + 46 files changed, 592 insertions(+), 456 deletions(-) delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatternWithReservedWord.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatternWithReservedWord.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatterns.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatterns.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatternsFunctionExpr.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDuplicateParameterDestructuring.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDuplicateParameterDestructuring.d.ts.map.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/noInferRedeclaration.d.ts.map.diff delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatternWithReservedWord.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatternWithReservedWord.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatterns.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatterns.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatternsFunctionExpr.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDuplicateParameterDestructuring.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDuplicateParameterDestructuring.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/noInferRedeclaration.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternWithReservedWord.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternWithReservedWord.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatterns.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatterns.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternsFunctionExpr.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDuplicateParameterDestructuring.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDuplicateParameterDestructuring.d.ts.map create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/noInferRedeclaration.d.ts.map delete mode 100644 tests/baselines/reference/isolated-declarations/original/diff/declarationEmitBindingPatternWithReservedWord.d.ts.diff delete mode 100644 tests/baselines/reference/isolated-declarations/original/dte/declarationEmitBindingPatternWithReservedWord.d.ts delete mode 100644 tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitBindingPatternWithReservedWord.d.ts diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatternWithReservedWord.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatternWithReservedWord.d.ts.diff deleted file mode 100644 index a4b532e9f5d33..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatternWithReservedWord.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: #56992 Type printer preserves binding element aliases.]] //// - -//// [tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -9,7 +9,7 @@ - default: ConvertLocaleConfig; - config?: LocaleConfig | undefined; - name?: string; - } --export declare const getLocales: ({ app, name, default: defaultLocalesConfig, config: userLocalesConfig, }: GetLocalesOptions) => ConvertLocaleConfig; -+export declare const getLocales: ({ app, name, default: defaultLocalesConfig, config, }: GetLocalesOptions) => ConvertLocaleConfig; - export {}; - //# sourceMappingURL=declarationEmitBindingPatternWithReservedWord.d.ts.map -\ No newline at end of file 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.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatterns.d.ts.diff deleted file mode 100644 index 3f4537aafdcf6..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitBindingPatterns.d.ts.diff +++ /dev/null @@ -1,17 +0,0 @@ -// [[Reason: #56992 Type printer preserves binding element aliases.]] //// - -//// [tests/cases/compiler/declarationEmitBindingPatterns.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,8 +1,8 @@ - - - //// [declarationEmitBindingPatterns.d.ts] --declare const k: ({ x: z }: { -+declare const k: ({ x }: { - x?: string; - }) => void; - declare var a: any; - declare function f({}?: any, []?: any, { p: {} }?: any): void; 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=,eyJ2ZXJzaW9uIjozLCJmaWxl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iwic291cmNlcyI6WyJkZWNsYXJhdGlvbkVtaXRCaW5kaW5nUGF0dGVybnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsUUFBQSxNQUFNLENBQUMsR0FBSSxFQUFDLENBQUMsRUFBRSxDQUFPLEVBQUMsRUFBRTtJQUNqQixDQUFDLENBQUMsRUFBRSxNQUFNLENBQUM7Q0FDZCxLQUFHLElBQVcsQ0FBQTtBQUVuQixRQUFBLElBQUksQ0FBQyxFQUFFLEdBQUcsQ0FBQztBQUNYLGlCQUFTLENBQUMsQ0FBQyxFQUFFLEdBQUUsR0FBTyxFQUFFLEVBQUUsR0FBRSxHQUFPLEVBQUUsRUFBRSxDQUFDLEVBQUUsRUFBTSxFQUFDLEdBQUUsR0FBTyxHQUFHLElBQUksQ0FDaEUifQ==,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,E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ines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDuplicateParameterDestructuring.d.ts.diff deleted file mode 100644 index c9b500a1c1433..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/diff/declarationEmitDuplicateParameterDestructuring.d.ts.diff +++ /dev/null @@ -1,24 +0,0 @@ -// [[Reason: Sourcemap is more detailed]] //// - -//// [tests/cases/compiler/declarationEmitDuplicateParameterDestructuring.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -1,12 +1,12 @@ - - - //// [declarationEmitDuplicateParameterDestructuring.d.ts] --export declare const fn1: ({ prop: a, prop: b }: { -+export declare const fn1: ({ prop, prop }: { - prop: number; - }) => number; --export declare const fn2: ({ prop: a }: { -+export declare const fn2: ({ prop }: { - prop: number; --}, { prop: b }: { -+}, { prop }: { - prop: number; - }) => number; - //# sourceMappingURL=declarationEmitDuplicateParameterDestructuring.d.ts.map -\ No newline at end of file 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,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZm4xOiAoeyBwcm9wOiBhLCBwcm9wOiBiIH06IHsNCiAgICBwcm9wOiBudW1iZXI7DQp9KSA9PiBudW1iZXI7DQpleHBvcnQgZGVjbGFyZSBjb25zdCBmbjI6ICh7IHByb3A6IGEgfTogew0KICAgIHByb3A6IG51bWJlcjsNCn0sIHsgcHJvcDogYiB9OiB7DQogICAgcHJvcDogbnVtYmVyOw0KfSkgPT4gbnVtYmVyOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZGVjbGFyYXRpb25FbWl0RHVwbGljYXRlUGFyYW1ldGVyRGVzdHJ1Y3R1cmluZy5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0RHVwbGljYXRlUGFyYW1ldGVyRGVzdHJ1Y3R1cmluZy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZGVjbGFyYXRpb25FbWl0RHVwbGljYXRlUGFyYW1ldGVyRGVz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jZXMiOlsiZGVjbGFyYXRpb25FbWl0RHVwbGljYXRlUGFyYW1ldGVyRGVzdHJ1Y3R1cmluZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxlQUFPLE1BQU0sR0FBRyxHQUFJLEVBQUUsSUFBSSxFQUFFLENBQUMsRUFBRSxJQUFJLEVBQUUsQ0FBQyxFQUFFLEVBQUU7SUFBRSxJQUFJLEVBQUUsTUFBTSxDQUFBO0NBQUUsS0FBRyxNQUFlLENBQUM7QUFFN0UsZUFBTyxNQUFNLEdBQUcsR0FBSSxFQUFFLElBQUksRUFBRSxDQUFDLEVBQUUsRUFBRTtJQUFFLElBQUksRUFBRSxNQUFNLENBQUE7Q0FBRSxFQUFFLEVBQUUsSUFBSSxFQUFFLENBQUMsRUFBRSxFQUFFO0lBQUUsSUFBSSxFQUFFLE1BQU0sQ0FBQTtDQUFFLEtBQUcsTUFBZSxDQUFDIn0=,ZXhwb3J0IGNvbnN0IGZuMSA9ICh7IHByb3A6IGEsIHByb3A6IGIgfTogeyBwcm9wOiBudW1iZXIgfSk6IG51bWJlciA9PiBhICsgYjsKCmV4cG9ydCBjb25zdCBmbjIgPSAoeyBwcm9wOiBhIH06IHsgcHJvcDogbnVtYmVyIH0sIHsgcHJvcDogYiB9OiB7IHByb3A6IG51bWJlciB9KTogbnVtYmVyID0+IGEgKyBiOwo= + 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 index d0b2781411da7..fa1b0cb05fda6 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/compiler/declarationEmitUsingAlternativeContainingModules1.ts] //// 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 index 7b95b348ef398..f682af2ead87d 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/compiler/declarationEmitUsingAlternativeContainingModules2.ts] //// 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 index f51f04b702369..c0254e46c1f1e 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: undefined]] //// +// [[Reason: Sourcemap is more detailed]] //// //// [tests/cases/compiler/declarationEmitUsingTypeAlias1.ts] //// 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 index 6dfad6547e8c9..83aee29c75108 100644 --- 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 @@ -8,9 +8,9 @@ @@ -1,6 +1,6 @@ //// [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,CAAI,EAAE,EAAE,EAAE,CAAI,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,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;IACxB;QACI,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC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6IFtiLCBjXSB9XTogWwogICAgICAgIHsKICAgICAgICAgICAgYTogW2FueSwgYW55XTsKICAgICAgICB9CiAgICBdKSA9PiB2b2lkOwoKdmFyIHYxID0gKFthLCBiLCBjXTogWwogICAgICAgIGFueSwKICAgICAgICBhbnksCiAgICAgICAgYW55CiAgICBdKTogc3RyaW5nID0+ICJoZWxsbyI7CnZhciB2MjogKFthLCBiLCBjXTogWwogICAgYW55LAogICAgYW55LAogICAgYW55Cl0pID0+IHN0cmluZzsK -+//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIGEgew0KICAgIGE6IGFueTsNCn0NCmludGVyZmFjZSBiIHsNCiAgICBiOiBhbnk7DQp9DQppbnRlcmZhY2UgYyB7DQogICAgYzogYW55Ow0KfQ0KdHlwZSBUMSA9IChbYSwgYiwgY10pOw0KdHlwZSBGMSA9IChbYSwgYiwgY106IFsNCiAgICBhbnksDQogICAgYW55LA0KICAgIGFueQ0KXSkgPT4gdm9pZDsNCnR5cGUgVDIgPSAoew0KICAgIGE6IGFueTsNCn0pOw0KdHlwZSBGMiA9ICh7IGEgfTogew0KICAgIGE6IGFueTsNCn0pID0+IHZvaWQ7DQp0eXBlIFQzID0gKFt7DQogICAgYTogYjsNCn0sIHsNCiAgICBiOiBhOw0KfV0pOw0KdHlwZSBGMyA9IChbeyBhIH0sIHsgYiB9XTogWw0KICAgIHsNCiAgICAgICAgYTogYW55Ow0KICAgIH0sDQogICAgew0KICAgICAgICBiOiBhbnk7DQogICAgfQ0KXSkgPT4gdm9pZDsNCnR5cGUgVDQgPSAoW3sNCiAgICBhOiBbYiwgY107DQp9XSk7DQp0eXBlIEY0ID0gKFt7IGE6IFtiLCBjXSB9XTogWw0KICAgIHsNCiAgICAgICAgYTogW2FueSwgYW55XTsNCiAgICB9DQpdKSA9PiB2b2lkOw0KdHlwZSBDMSA9IG5ldyAoW3sgYTogW2IsIGNdIH1dOiBbDQogICAgew0KICAgICAgICBhOiBbYW55LCBhbnldOw0KICA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iLCBjXTogWwogICAgYW55LAogICAgYW55LAogICAgYW55Cl0pID0+IHN0cmluZzsK +-//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIGEgew0KICAgIGE6IGFueTsNCn0NCmludGVyZmFjZSBiIHsNCiAgICBiOiBhbnk7DQp9DQppbnRlcmZhY2UgYyB7DQogICAgYzogYW55Ow0KfQ0KdHlwZSBUMSA9IChbYSwgYiwgY10pOw0KdHlwZSBGMSA9IChbYSwgYiwgY106IFsNCiAgICBhbnksDQogICAgYW55LA0KICAgIGFueQ0KXSkgPT4gdm9pZDsNCnR5cGUgVDIgPSAoew0KICAgIGE6IGFueTsNCn0pOw0KdHlwZSBGMiA9ICh7IGEgfTogew0KICAgIGE6IGFueTsNCn0pID0+IHZvaWQ7DQp0eXBlIFQzID0gKFt7DQogICAgYTogYjsNCn0sIHsNCiAgICBiOiBhOw0KfV0pOw0KdHlwZSBGMyA9IChbeyBhOiBiIH0sIHsgYjogYSB9XTogWw0KICAgIHsNCiAgICAgICAgYTogYW55Ow0KICAgIH0sDQogICAgew0KICAgICAgICBiOiBhbnk7DQogICAgfQ0KXSkgPT4gdm9pZDsNCnR5cGUgVDQgPSAoW3sNCiAgICBhOiBbYiwgY107DQp9XSk7DQp0eXBlIEY0ID0gKFt7IGE6IFtiLCBjXSB9XTogWw0KICAgIHsNCiAgICAgICAgYTogW2FueSwgYW55XTsNCiAgICB9DQpdKSA9PiB2b2lkOw0KdHlwZSBDMSA9IG5ldyAoW3sgYTogW2IsIGNdIH1dOiBbDQogICAgew0KICAgICAgICBhOiBbYW55LCBhbnldOw0KICAgIH0NCl0pID0+IHZvaWQ7DQpkZWNsYXJlIHZhciB2MTogKFthLCBiLCBjXTogWw0KICAgIGFueSwNCiAgICBhbnksDQogICAgYW55DQpdKSA9PiBzdHJpbmc7DQpkZWNsYXJlIHZhciB2MjogKFthLCBiLCBjXTogWw0KICAgIGFueSwNCiAgICBhbnksDQogICAgYW55DQpdKSA9PiBzdHJpbmc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FDIn0=,aW50ZXJmYWNlIGEgeyBhIH0KaW50ZXJmYWNlIGIgeyBiIH0KaW50ZXJmYWNlIGMgeyBjIH0KCnR5cGUgVDEgPSAoW2EsIGIsIGNdKTsKdHlwZSBGMSA9IChbYSwgYiwgY106IFsKICAgIGFueSwKICAgIGFueSwKICAgIGFueQpdKSA9PiB2b2lkOwoKdHlwZSBUMiA9ICh7IGEgfSk7CnR5cGUgRjIgPSAoeyBhIH06IHsKICAgIGE6IGFueTsKfSkgPT4gdm9pZDsKCnR5cGUgVDMgPSAoW3sgYTogYiB9LCB7IGI6IGEgfV0pOwp0eXBlIEYzID0gKFt7IGE6IGIgfSwgeyBiOiBhIH1dOiBbCiAgICB7CiAgICAgICAgYTogYW55OwogICAgfSwKICAgIHsKICAgICAgICBiOiBhbnk7CiAgICB9Cl0pID0+IHZvaWQ7Cgp0eXBlIFQ0ID0gKFt7IGE6IFtiLCBjXSB9XSk7CnR5cGUgRjQgPSAoW3sgYTogW2IsIGNdIH1dOiBbCiAgICB7CiAgICAgICAgYTogW2FueSwgYW55XTsKICAgIH0KXSkgPT4gdm9pZDsKCnR5cGUgQzEgPSBuZXcgKFt7IGE6IFtiLCBjXSB9XTogWwogICAgICAgIHsKICAgICAgICAgICAgYTogW2FueSwgYW55XTsKICAgICAgICB9CiAgICBdKSA9PiB2b2lkOwoKdmFyIHYxID0gKFthLCBiLCBjXTogWwogICAgICAgIGFueSwKICAgICAgICBhbnksCiAgICAgICAgYW55CiAgICBdKTogc3RyaW5nID0+ICJoZWxsbyI7CnZhciB2MjogKFthLCBiLCBjXTogWwogICAgYW55LAogICAgYW55LAogICAgYW55Cl0pID0+IHN0cmluZzsK ++//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIGEgew0KICAgIGE6IGFueTsNCn0NCmludGVyZmFjZSBiIHsNCiAgICBiOiBhbnk7DQp9DQppbnRlcmZhY2UgYyB7DQogICAgYzogYW55Ow0KfQ0KdHlwZSBUMSA9IChbYSwgYiw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QpdKSA9PiB2b2lkOwoKdHlwZSBUMiA9ICh7IGEgfSk7CnR5cGUgRjIgPSAoeyBhIH06IHsKICAgIGE6IGFueTsKfSkgPT4gdm9pZDsKCnR5cGUgVDMgPSAoW3sgYTogYiB9LCB7IGI6IGEgfV0pOwp0eXBlIEYzID0gKFt7IGE6IGIgfSwgeyBiOiBhIH1dOiBbCiAgICB7CiAgICAgICAgYTogYW55OwogICAgfSwKICAgIHsKICAgICAgICBiOiBhbnk7CiAgICB9Cl0pID0+IHZvaWQ7Cgp0eXBlIFQ0ID0gKFt7IGE6IFtiLCBjXSB9XSk7CnR5cGUgRjQgPSAoW3sgYTogW2IsIGNdIH1dOiBbCiAgICB7CiAgICAgICAgYTogW2FueSwgYW55XTsKICAgIH0KXSkgPT4gdm9pZDsKCnR5cGUgQzEgPSBuZXcgKFt7IGE6IFtiLCBjXSB9XTogWwogICAgICAgIHsKICAgICAgICAgICAgYTogW2FueSwgYW55XTsKICAgICAgICB9CiAgICBdKSA9PiB2b2lkOwoKdmFyIHYxID0gKFthLCBiLCBjXTogWwogICAgICAgIGFueSwKICAgICAgICBhbnksCiAgICAgICAgYW55CiAgICBdKTogc3RyaW5nID0+ICJoZWxsbyI7CnZhciB2MjogKFthLCBiLCBjXTogWwogICAgYW55LAogICAgYW55LAogICAgYW55Cl0pID0+IHN0cmluZzsK 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/renamingDestructuredPropertyInFunctionType.d.ts.diff b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/renamingDestructuredPropertyInFunctionType.d.ts.diff index 20ba8c6f31e93..8b9cae16a3e3d 100644 --- 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 @@ -1,35 +1,26 @@ -// [[Reason: Aliases are preserved for binding patterns GH#55654]] //// +// [[Reason: TS normalizes types]] //// //// [tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts] //// =================================================================== --- TSC declarations +++ DTE declarations -@@ -82,20 +82,20 @@ - a: any; - }): any; +@@ -84,15 +84,15 @@ } - declare function f1({ a }: O): void; --declare const f2: ({ a: string }: O) => void; --declare const f3: ({ a: string, b, c }: O) => void; + 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 f2: ({ a }: O) => void; -+declare const f3: ({ a, b, c }: O) => void; -+declare const f4: ({ a }: O) => typeof string; -+declare const f5: ({ a, b, c }: O) => typeof 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; -+ method({ a }: O): void; + method({ a: string }: O): void; }; declare const obj2: { - method({ a: string }: O): string; -+ method({ a }: O): typeof string; ++ method({ a: string }: O): typeof string; }; - declare function f6({ a }: O): void; --declare const f7: ({ a: string, b, c }: O) => void; -+declare const f7: ({ a, b, c }: O) => void; + 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; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatternWithReservedWord.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatternWithReservedWord.d.ts deleted file mode 100644 index d0acf03ac476a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatternWithReservedWord.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -//// [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, }: GetLocalesOptions) => ConvertLocaleConfig; -export {}; -//# sourceMappingURL=declarationEmitBindingPatternWithReservedWord.d.ts.map \ No newline at end of file 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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b25maWc8VD4gPT4gewogICAgcmV0dXJuIGRlZmF1bHRMb2NhbGVzQ29uZmlnOwp9Owo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatterns.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatterns.d.ts deleted file mode 100644 index 9e1f9a8eb98ac..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitBindingPatterns.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -//// [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 }: { - x?: string; -}) => void; -declare var a: any; -declare function f({}?: any, []?: any, { p: {} }?: any): void; -//# sourceMappingURL=declarationEmitBindingPatterns.d.ts.map \ No newline at end of file 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+IHZvaWQ7DQpkZWNsYXJlIGNvbnN0IGR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ywgeyBuYW1lOiBhbGlhcyB9OiBOYW1lZCk6IHZvaWQgPT4geyB9CmNvbnN0IGR1cGxpY2F0ZUluZGV0aWZpZXJzMyA9ICh7IG5hbWU6IGFsaWFzIH06IE5hbWVkLCB7IG5hbWU6IGFsaWFzMiB9OiBOYW1lZCk6IHZvaWQgPT4geyB9CgpsZXQgdmFsdWUgPSAiIjsKLy8gMi5DYW4gY2hhbmdlIGluIG1lYW5pbmcgZm9yIHR5cGVvZiB2YWx1ZSBpZiB3ZSByZW1vdmUgYWxpYXMKY29uc3Qgc2hhZG93ZWRWYXJpYWJsZSA9ICh7IHZhbHVlOiBhbGlhcyB9OiB7IHZhbHVlOiBzdHJpbmcgfSk6IHR5cGVvZiB2YWx1ZSA9PiB2YWx1ZTs= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDuplicateParameterDestructuring.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDuplicateParameterDestructuring.d.ts deleted file mode 100644 index bd6274512b00a..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/declarationEmitDuplicateParameterDestructuring.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -//// [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, prop }: { - prop: number; -}) => number; -export declare const fn2: ({ prop }: { - prop: number; -}, { prop }: { - prop: number; -}) => number; -//# sourceMappingURL=declarationEmitDuplicateParameterDestructuring.d.ts.map \ No newline at end of file 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,ZXhwb3J0IGRlY2xhcmUgY29uc3QgZm4xOiAoeyBwcm9wOiBhLCBwcm9wOiBiIH06IHsNCiAgICBwcm9wOiBudW1iZXI7DQp9KSA9PiBudW1iZXI7DQpleHBvcnQgZGVjbGFyZSBjb25zd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JlciB9KTogbnVtYmVyID0+IGEgKyBiOwo= + 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 index a977a07be0186..da5bd444af1a5 100644 --- 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 @@ -83,7 +83,7 @@ type T3 = ([{ }, { b: a; }]); -type F3 = ([{ a }, { b }]: [ +type F3 = ([{ a: b }, { b: a }]: [ { a: any; }, @@ -120,7 +120,7 @@ declare var v2: ([a, b, c]: [ //// [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,C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ACb,GAAG;IACH,GAAG;IACH,GAAG;CACN,KAAG,MAAiB,CAAC;AAC1B,QAAA,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE;IAChB,GAAG;IACH,GAAG;IACH,GAAG;CACN,KAAK,MAAM,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIGEgew0KICAgIGE6IGFueTsNCn0NCmludGVyZmFjZSBiIHsNCiAgICBiOiBhbnk7DQp9DQppbnRlcmZhY2UgYyB7DQogICAgYzogYW55Ow0KfQ0KdHlwZSBUMSA9IChbYSwgYiwgY10pOw0KdHlwZSBGMSA9IChbYSwgYiwgY106IFsNCiAgICBhbnksDQogICAgYW55LA0KICAgIGFueQ0KXSkgPT4gdm9pZDsNCnR5cGUgVDIgPSAoew0KICAgIGE6IGFueTsNCn0pOw0KdHlwZSBGMiA9ICh7IGEgfTogew0KICAgIGE6IGFueTsNCn0pID0+IHZvaWQ7DQp0eXBlIFQzID0gKFt7DQogICAgYTogYjsNCn0sIHsNCiAgICBiOiBhOw0KfV0pOw0KdHlwZSBGMyA9IChbeyBhIH0sIHsgYiB9XTogWw0KICAgIHsNCiAgICAgICAgYTogYW55Ow0KICAgIH0sDQogICAgew0KICAgICAgICBiOiBhbnk7DQogICAgfQ0KXSkgPT4gdm9pZDsNCnR5cGUgVDQgPSAoW3sNCiAgICBhOiBbYiwgY107DQp9XSk7DQp0eXBlIEY0ID0gKFt7IGE6IFtiLCBjXSB9XTogWw0KICAgIHsNCiAgICAgICAgYTogW2FueSwgYW55XTsNCiAgICB9DQpdKSA9PiB2b2lkOw0KdHlwZSBDMSA9IG5ldyAoW3sgYTogW2IsIGNdIH1dOiBbDQogICAgew0KICAgICAgICBhOiBbYW55LCBhbnldOw0KICAgIH0NCl0pID0+IHZvaWQ7DQpkZWNsYXJlIHZhciB2MTogKFthLCBiLCBjXTogWw0KICAgIGFueSwNCiAgICBhbnksDQogICAgYW55DQpdK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0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxDQUFDLEVBQUU7SUFDaEIsR0FBRztJQUNILEdBQUc7SUFDSCxHQUFHO0NBQ04sS0FBSyxNQUFNLENBQUMifQ==,aW50ZXJmYWNlIGEgeyBhIH0KaW50ZXJmYWNlIGIgeyBiIH0KaW50ZXJmYWNlIGMgeyBjIH0KCnR5cGUgVDEgPSAoW2EsIGIsIGNdKTsKdHlwZSBGMSA9IChbYSwgYiwgY106IFsKICAgIGFueSwKICAgIGFueSwKICAgIGFueQpdKSA9PiB2b2lkOwoKdHlwZSBUMiA9ICh7IGEgfSk7CnR5cGUgRjIgPSAoeyBhIH06IHsKICAgIGE6IGFueTsKfSkgPT4gdm9pZDsKCnR5cGUgVDMgPSAoW3sgYTogYiB9LCB7IGI6IGEgfV0pOwp0eXBlIEYzID0gKFt7IGE6IGIgfSwgeyBiOiBhIH1dOiBbCiAgICB7CiAgICAgICAgYTogYW55OwogICAgfSwKICAgIHsKICAgICAgICBiOiBhbnk7CiAgICB9Cl0pID0+IHZvaWQ7Cgp0eXBlIFQ0ID0gKFt7IGE6IFtiLCBjXSB9XSk7CnR5cGUgRjQgPSAoW3sgYTogW2IsIGNdIH1dOiBbCiAgICB7CiAgICAgICAgYTogW2FueSwgYW55XTsKICAgIH0KXSkgPT4gdm9pZDsKCnR5cGUgQzEgPSBuZXcgKFt7IGE6IFtiLCBjXSB9XTogWwogICAgICAgIHsKICAgICAgICAgICAgYTogW2FueSwgYW55XTsKICAgICAgICB9CiAgICBdKSA9PiB2b2lkOwoKdmFyIHYxID0gKFthLCBiLCBjXTogWwogICAgICAgIGFueSwKICAgICAgICBhbnksCiAgICAgICAgYW55CiAgICBdKTogc3RyaW5nID0+ICJoZWxsbyI7CnZhciB2MjogKFthLCBiLCBjXTogWwogICAgYW55LAogICAgYW55LAogICAgYW55Cl0pID0+IHN0cmluZzsK +//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIGEgew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eyBiIH0KaW50ZXJmYWNlIGMgeyBjIH0KCnR5cGUgVDEgPSAoW2EsIGIsIGNdKTsKdHlwZSBGMSA9IChbYSwgYiwgY106IFsKICAgIGFueSwKICAgIGFueSwKICAgIGFueQpdKSA9PiB2b2lkOwoKdHlwZSBUMiA9ICh7IGEgfSk7CnR5cGUgRjIgPSAoeyBhIH06IHsKICAgIGE6IGFueTsKfSkgPT4gdm9pZDsKCnR5cGUgVDMgPSAoW3sgYTogYiB9LCB7IGI6IGEgfV0pOwp0eXBlIEYzID0gKFt7IGE6IGIgfSwgeyBiOiBhIH1dOiBbCiAgICB7CiAgICAgICAgYTogYW55OwogICAgfSwKICAgIHsKICAgICAgICBiOiBhbnk7CiAgICB9Cl0pID0+IHZvaWQ7Cgp0eXBlIFQ0ID0gKFt7IGE6IFtiLCBjXSB9XSk7CnR5cGUgRjQgPSAoW3sgYTogW2IsIGNdIH1dOiBbCiAgICB7CiAgICAgICAgYTogW2FueSwgYW55XTsKICAgIH0KXSkgPT4gdm9pZDsKCnR5cGUgQzEgPSBuZXcgKFt7IGE6IFtiLCBjXSB9XTogWwogICAgICAgIHsKICAgICAgICAgICAgYTogW2FueSwgYW55XTsKICAgICAgICB9CiAgICBdKSA9PiB2b2lkOwoKdmFyIHYxID0gKFthLCBiLCBjXTogWwogICAgICAgIGFueSwKICAgICAgICBhbnksCiAgICAgICAgYW55CiAgICBdKTogc3RyaW5nID0+ICJoZWxsbyI7CnZhciB2MjogKFthLCBiLCBjXTogWwogICAgYW55LAogICAgYW55LAogICAgYW55Cl0pID0+IHN0cmluZzsK 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/renamingDestructuredPropertyInFunctionType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/renamingDestructuredPropertyInFunctionType.d.ts index d7f1b12f0a43c..73bd5f979cbd2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/renamingDestructuredPropertyInFunctionType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/renamingDestructuredPropertyInFunctionType.d.ts @@ -125,14 +125,14 @@ type O = { c: number; }; type F1 = (arg: number) => any; -type F2 = ({ a }: O) => any; -type F3 = ({ a, b, c }: O) => any; -type F4 = ({ a }: O) => any; -type F5 = ({ a, b, c }: O) => 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, b: number }: { +type F7 = ({ a: string, b: number }: { a: any; b: any; }) => typeof number; @@ -146,14 +146,14 @@ type F9 = ([a, b, c]: [ any ]) => void; type G1 = new (arg: number) => any; -type G2 = new ({ a }: O) => any; -type G3 = new ({ a, b, c }: O) => any; -type G4 = new ({ a }: O) => any; -type G5 = new ({ a, b, c }: O) => 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, b: number }: { +type G7 = new ({ a: string, b: number }: { a: any; b: any; }) => typeof number; @@ -188,31 +188,31 @@ type G13 = new ({ [2]: string }: { }) => void; interface I { method1(arg: number): any; - method2({ a }: { + method2({ a: string }: { a: any; }): any; (arg: number): any; - ({ a }: { + ({ a: string }: { a: any; }): any; new (arg: number): any; - new ({ a }: { + new ({ a: string }: { a: any; }): any; } -declare function f1({ a }: O): void; -declare const f2: ({ a }: O) => void; -declare const f3: ({ a, b, c }: O) => void; -declare const f4: ({ a }: O) => typeof string; -declare const f5: ({ a, b, c }: O) => typeof string; +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 }: O): void; + method({ a: string }: O): void; }; declare const obj2: { - method({ a }: O): typeof string; + method({ a: string }: O): typeof string; }; -declare function f6({ a }: O): void; -declare const f7: ({ a, b, c }: O) => void; +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; diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternWithReservedWord.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternWithReservedWord.d.ts deleted file mode 100644 index 7ec6c70421fd7..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternWithReservedWord.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -//// [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 \ No newline at end of file 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,m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RhID0gTG9jYWxlRGF0YT4gPSBSZWNvcmQ8c3RyaW5nLCBQYXJ0aWFsPFQ+PjsKCmV4cG9ydCBpbnRlcmZhY2UgR2V0TG9jYWxlc09wdGlvbnM8VCBleHRlbmRzIExvY2FsZURhdGE+IHsKICAgIGFwcDogdW5rbm93bjsKICAgIGRlZmF1bHQ6IENvbnZlcnRMb2NhbGVDb25maWc8VD47CiAgICBjb25maWc/OiBMb2NhbGVDb25maWc8VD4gfCB1bmRlZmluZWQ7CiAgICBuYW1lPzogc3RyaW5nOwp9CgpleHBvcnQgY29uc3QgZ2V0TG9jYWxlcyA9IDxUIGV4dGVuZHMgTG9jYWxlRGF0YT4oewogICAgYXBwLAogICAgbmFtZSwKICAgIGRlZmF1bHQ6IGRlZmF1bHRMb2NhbGVzQ29uZmlnLAogICAgY29uZmlnOiB1c2VyTG9jYWxlc0NvbmZpZyA9IHt9LAp9OiBHZXRMb2NhbGVzT3B0aW9uczxUPik6IENvbnZlcnRMb2NhbGVDb25maWc8VD4gPT4gewogICAgcmV0dXJuIGRlZmF1bHRMb2NhbGVzQ29uZmlnOwp9Owo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatterns.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatterns.d.ts deleted file mode 100644 index 3bdc1f24420bd..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatterns.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -//// [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 \ No newline at end of file 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,CAAA;AAE5F,QAAA,IAAI,KAAK,QAAK,CAAC;A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lhcyB9OiBOYW1lZCk6IHZvaWQgPT4geyB9CmNvbnN0IGR1cGxpY2F0ZUluZGV0aWZpZXJzMyA9ICh7IG5hbWU6IGFsaWFzIH06IE5hbWVkLCB7IG5hbWU6IGFsaWFzMiB9OiBOYW1lZCk6IHZvaWQgPT4geyB9CgpsZXQgdmFsdWUgPSAiIjsKLy8gMi5DYW4gY2hhbmdlIGluIG1lYW5pbmcgZm9yIHR5cGVvZiB2YWx1ZSBpZiB3ZSByZW1vdmUgYWxpYXMKY29uc3Qgc2hhZG93ZWRWYXJpYWJsZSA9ICh7IHZhbHVlOiBhbGlhcyB9OiB7IHZhbHVlOiBzdHJpbmcgfSk6IHR5cGVvZiB2YWx1ZSA9PiB2YWx1ZTs= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDuplicateParameterDestructuring.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDuplicateParameterDestructuring.d.ts deleted file mode 100644 index 828362f6c4b48..0000000000000 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDuplicateParameterDestructuring.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -//// [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 \ No newline at end of file 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/destructuringInFunctionType.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringInFunctionType.d.ts.map index a1e22fd4a02c1..3abcb185c9ea6 100644 --- 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 @@ -83,7 +83,7 @@ type T3 = ([{ }, { b: a; }]); -type F3 = ([{ a }, { b }]: [ +type F3 = ([{ a: b }, { b: a }]: [ { a: any; }, @@ -120,7 +120,7 @@ declare var v2: ([a, b, c]: [ //// [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,CAAI,EAAE,EAAE,EAAE,CAAI,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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fSkgPT4gdm9pZDsKCnR5cGUgVDMgPSAoW3sgYTogYiB9LCB7IGI6IGEgfV0pOwp0eXBlIEYzID0gKFt7IGE6IGIgfSwgeyBiOiBhIH1dOiBbCiAgICB7CiAgICAgICAgYTogYW55OwogICAgfSwKICAgIHsKICAgICAgICBiOiBhbnk7CiAgICB9Cl0pID0+IHZvaWQ7Cgp0eXBlIFQ0ID0gKFt7IGE6IFtiLCBjXSB9XSk7CnR5cGUgRjQgPSAoW3sgYTogW2IsIGNdIH1dOiBbCiAgICB7CiAgICAgICAgYTogW2FueSwgYW55XTsKICAgIH0KXSkgPT4gdm9pZDsKCnR5cGUgQzEgPSBuZXcgKFt7IGE6IFtiLCBjXSB9XTogWwogICAgICAgIHsKICAgICAgICAgICAgYTogW2FueSwgYW55XTsKICAgICAgICB9CiAgICBdKSA9PiB2b2lkOwoKdmFyIHYxID0gKFthLCBiLCBjXTogWwogICAgICAgIGFueSwKICAgICAgICBhbnksCiAgICAgICAgYW55CiAgICBdKTogc3RyaW5nID0+ICJoZWxsbyI7CnZhciB2MjogKFthLCBiLCBjXTogWwogICAgYW55LAogICAgYW55LAogICAgYW55Cl0pID0+IHN0cmluZzsK +//// https://sokra.github.io/source-map-visualization#base64,aW50ZXJmYWNlIGEgew0KICAgIGE6IGFueTsNCn0NCmludGVyZmFjZSBiIHsNCiAgICBiOiBhbnk7DQp9DQppbnRlcmZhY2UgYyB7DQogICAgYzogYW55Ow0KfQ0KdHlwZSBUMSA9IChbYSwgYiwgY10pOw0KdHlwZSBGMSA9IChbYSwgYiwgY106IFsNCiAgICBhbnksDQogICAgYW55LA0KICAgIGFueQ0KXSkgPT4gdm9pZDsNCnR5cGUgVDIgPSAoew0KICAgIGE6IGFueTsNCn0pOw0KdHlwZSBGMiA9ICh7IGEgfTogew0KICAgIGE6IGFueTsNCn0pID0+IHZvaWQ7DQp0eXBlIFQzID0gKFt7DQogICAgYTogYjsNCn0sIHsNCiAgICBiOiBhOw0KfV0pOw0KdHlwZ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LCBjXSB9XSk7CnR5cGUgRjQgPSAoW3sgYTogW2IsIGNdIH1dOiBbCiAgICB7CiAgICAgICAgYTogW2FueSwgYW55XTsKICAgIH0KXSkgPT4gdm9pZDsKCnR5cGUgQzEgPSBuZXcgKFt7IGE6IFtiLCBjXSB9XTogWwogICAgICAgIHsKICAgICAgICAgICAgYTogW2FueSwgYW55XTsKICAgICAgICB9CiAgICBdKSA9PiB2b2lkOwoKdmFyIHYxID0gKFthLCBiLCBjXTogWwogICAgICAgIGFueSwKICAgICAgICBhbnksCiAgICAgICAgYW55CiAgICBdKTogc3RyaW5nID0+ICJoZWxsbyI7CnZhciB2MjogKFthLCBiLCBjXTogWwogICAgYW55LAogICAgYW55LAogICAgYW55Cl0pID0+IHN0cmluZzsK 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/renamingDestructuredPropertyInFunctionType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/renamingDestructuredPropertyInFunctionType.d.ts index 657238facdd09..abf707ae15de1 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/renamingDestructuredPropertyInFunctionType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/renamingDestructuredPropertyInFunctionType.d.ts @@ -125,14 +125,14 @@ type O = { c: number; }; type F1 = (arg: number) => any; -type F2 = ({ a }: O) => any; -type F3 = ({ a, b, c }: O) => any; -type F4 = ({ a }: O) => any; -type F5 = ({ a, b, c }: O) => 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, b: number }: { +type F7 = ({ a: string, b: number }: { a: any; b: any; }) => typeof number; @@ -146,14 +146,14 @@ type F9 = ([a, b, c]: [ any ]) => void; type G1 = new (arg: number) => any; -type G2 = new ({ a }: O) => any; -type G3 = new ({ a, b, c }: O) => any; -type G4 = new ({ a }: O) => any; -type G5 = new ({ a, b, c }: O) => 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, b: number }: { +type G7 = new ({ a: string, b: number }: { a: any; b: any; }) => typeof number; @@ -188,19 +188,19 @@ type G13 = new ({ [2]: string }: { }) => void; interface I { method1(arg: number): any; - method2({ a }: { + method2({ a: string }: { a: any; }): any; (arg: number): any; - ({ a }: { + ({ a: string }: { a: any; }): any; new (arg: number): any; - new ({ a }: { + new ({ a: string }: { a: any; }): any; } -declare function f1({ a }: O): void; +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; @@ -211,7 +211,7 @@ declare const obj1: { declare const obj2: { method({ a: string }: O): string; }; -declare function f6({ a }: O): void; +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 }: { diff --git a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitBindingPatternWithReservedWord.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitBindingPatternWithReservedWord.d.ts.diff deleted file mode 100644 index d57a1fb92e008..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/diff/declarationEmitBindingPatternWithReservedWord.d.ts.diff +++ /dev/null @@ -1,15 +0,0 @@ -// [[Reason: #56992 Type printer preserves binding element aliases.]] //// - -//// [tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts] //// - -=================================================================== ---- TSC declarations -+++ DTE declarations -@@ -9,6 +9,6 @@ - default: ConvertLocaleConfig; - config?: LocaleConfig | undefined; - name?: string; - } --export declare const getLocales: ({ app, name, default: defaultLocalesConfig, config: userLocalesConfig, }: GetLocalesOptions) => ConvertLocaleConfig; -+export declare const getLocales: ({ app, name, default: defaultLocalesConfig, config, }: GetLocalesOptions) => ConvertLocaleConfig; - export {}; 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 index 9c36b148c8482..cfc6f34b5a363 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/renamingDestructuredPropertyInFunctionType.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/renamingDestructuredPropertyInFunctionType.d.ts.diff @@ -7,18 +7,18 @@ +++ DTE declarations @@ -42,13 +42,13 @@ } - declare function f1({ a }: O): invalid; - declare const f2: ({ a }: O) => invalid; - declare const f3: ({ a, b, c }: O) => invalid; + 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 }: O) => typeof string; -+declare const f5: ({ a, b, c }: O) => typeof 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 }: O): typeof string; ++ method({ a: string }: O): typeof string; }; - declare function f6({ a }: O): invalid; - declare const f7: ({ a, b, c }: O) => invalid; + 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/dte/declarationEmitBindingPatternWithReservedWord.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitBindingPatternWithReservedWord.d.ts deleted file mode 100644 index 46b8b82ba5f76..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/dte/declarationEmitBindingPatternWithReservedWord.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -//// [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, }: GetLocalesOptions) => ConvertLocaleConfig; -export {}; diff --git a/tests/baselines/reference/isolated-declarations/original/dte/renamingDestructuredPropertyInFunctionType.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/renamingDestructuredPropertyInFunctionType.d.ts index 669d937f4c672..8c398216dee4b 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/renamingDestructuredPropertyInFunctionType.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/renamingDestructuredPropertyInFunctionType.d.ts @@ -79,21 +79,21 @@ type O = { c: number; }; type F1 = (arg: number) => any; -type F2 = ({ a }: O) => any; -type F3 = ({ a, b, c }: O) => any; -type F4 = ({ a }: O) => any; -type F5 = ({ a, b, c }: O) => 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, b: number }: invalid) => typeof number; +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 }: O) => any; -type G3 = new ({ a, b, c }: O) => any; -type G4 = new ({ a }: O) => any; -type G5 = new ({ a, b, c }: O) => 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, b: number }: invalid) => typeof number; +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; @@ -106,23 +106,23 @@ type G12 = new ({ ["a"]: string }: O) => void; type G13 = new ({ [2]: string }: invalid) => void; interface I { method1(arg: number): any; - method2({ a }: invalid): any; + method2({ a: string }: invalid): any; (arg: number): any; - ({ a }: invalid): any; + ({ a: string }: invalid): any; new (arg: number): any; - new ({ a }: invalid): any; + new ({ a: string }: invalid): any; } -declare function f1({ a }: O): invalid; -declare const f2: ({ a }: O) => invalid; -declare const f3: ({ a, b, c }: O) => invalid; -declare const f4: ({ a }: O) => typeof string; -declare const f5: ({ a, b, c }: O) => typeof string; +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 }: O): typeof string; + method({ a: string }: O): typeof string; }; -declare function f6({ a }: O): invalid; -declare const f7: ({ a, b, c }: O) => invalid; +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; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitBindingPatternWithReservedWord.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitBindingPatternWithReservedWord.d.ts deleted file mode 100644 index 22a24f3e4160e..0000000000000 --- a/tests/baselines/reference/isolated-declarations/original/tsc/declarationEmitBindingPatternWithReservedWord.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -//// [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 {}; diff --git a/tests/baselines/reference/isolated-declarations/original/tsc/renamingDestructuredPropertyInFunctionType.d.ts b/tests/baselines/reference/isolated-declarations/original/tsc/renamingDestructuredPropertyInFunctionType.d.ts index 28c25ca6034c2..3f7954f937255 100644 --- a/tests/baselines/reference/isolated-declarations/original/tsc/renamingDestructuredPropertyInFunctionType.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/tsc/renamingDestructuredPropertyInFunctionType.d.ts @@ -79,21 +79,21 @@ type O = { c: number; }; type F1 = (arg: number) => any; -type F2 = ({ a }: O) => any; -type F3 = ({ a, b, c }: O) => any; -type F4 = ({ a }: O) => any; -type F5 = ({ a, b, c }: O) => 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, b: number }: invalid) => typeof number; +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 }: O) => any; -type G3 = new ({ a, b, c }: O) => any; -type G4 = new ({ a }: O) => any; -type G5 = new ({ a, b, c }: O) => 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, b: number }: invalid) => typeof number; +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; @@ -106,23 +106,23 @@ type G12 = new ({ ["a"]: string }: O) => void; type G13 = new ({ [2]: string }: invalid) => void; interface I { method1(arg: number): any; - method2({ a }: invalid): any; + method2({ a: string }: invalid): any; (arg: number): any; - ({ a }: invalid): any; + ({ a: string }: invalid): any; new (arg: number): any; - new ({ a }: invalid): any; + new ({ a: string }: invalid): any; } -declare function f1({ a }: O): invalid; -declare const f2: ({ a }: O) => invalid; -declare const f3: ({ a, b, c }: O) => invalid; +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 }: O): invalid; -declare const f7: ({ a, b, c }: O) => invalid; +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; diff --git a/tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts b/tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts index 23275bd5888ab..2b2e35b5e6a7d 100644 --- a/tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts +++ b/tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts @@ -1,6 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: #56992 Type printer preserves binding element aliases. -// @isolatedDeclarationDiffReason: #56992 Type printer preserves binding element aliases. +// @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 a30c09f20799b..6b8b76afc463f 100644 --- a/tests/cases/compiler/declarationEmitBindingPatterns.ts +++ b/tests/cases/compiler/declarationEmitBindingPatterns.ts @@ -1,5 +1,5 @@ // @declaration: true -// @isolatedDeclarationFixedDiffReason: #56992 Type printer preserves binding element aliases. +// @isolatedDeclarationFixedDiffReason: Sourcemap is more detailed const k = ({x: z = 'y'}) => { } 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/renamingDestructuredPropertyInFunctionType.ts b/tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts index 321278c69ae8d..1ba267d5ec45f 100644 --- a/tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts +++ b/tests/cases/compiler/renamingDestructuredPropertyInFunctionType.ts @@ -1,7 +1,7 @@ // @target: es2015 // @declaration: true // @isolatedDeclarationDiffReason: TS normalizes types -// @isolatedDeclarationFixedDiffReason: Aliases are preserved for binding patterns GH#55654 +// @isolatedDeclarationFixedDiffReason: TS normalizes types // GH#37454, GH#41044 type O = { a?: string; b: number; c: number; }; 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; From e2e6adcc7d6aeeeda8b17e21fe2ead4abe7aa5ba Mon Sep 17 00:00:00 2001 From: Hana Joo Date: Sun, 14 Jan 2024 20:41:00 +0000 Subject: [PATCH 211/224] Convert while into a for loop, and remove comment where it's not needed Signed-off-by: Hana Joo --- .../transformers/declarations/transpileDeclaration.ts | 1 - src/services/codefixes/fixMissingTypeAnnotationOnExports.ts | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/compiler/transformers/declarations/transpileDeclaration.ts b/src/compiler/transformers/declarations/transpileDeclaration.ts index 0cefee523be3e..ea7507e53bfce 100644 --- a/src/compiler/transformers/declarations/transpileDeclaration.ts +++ b/src/compiler/transformers/declarations/transpileDeclaration.ts @@ -84,7 +84,6 @@ export function transpileDeclaration(sourceFile: SourceFile, transpileOptions: T diagnostics, }; - // logic replicated from emitter.ts function getSourceMapGenerator(declarationFilePath: string, declarationMapPath: string) { if (!getAreDeclarationMapsEnabled(compilerOptions)) return; diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index 129b0030def6d..fa3b3468656c0 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -698,10 +698,7 @@ function withChanges( const expressionToVar = new Map(); - let i = 0; - while (i < bindingElements.length) { - const bindingElement = bindingElements[i]; - + for (const bindingElement of bindingElements) { if (bindingElement.element!.propertyName && isComputedPropertyName(bindingElement.element!.propertyName)) { const computedExpression = bindingElement.element!.propertyName.expression; const identifierForComputedProperty = factory.getGeneratedNameForNode(computedExpression); @@ -775,7 +772,6 @@ function withChanges( ), )); } - ++i; } if (enclosingVarStmt.declarationList.declarations.length > 1) { From b2b946c8579df9e809207c5a79b102b2e14a93f4 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 15 Jan 2024 10:17:48 +0000 Subject: [PATCH 212/224] Changed bind to arrow function. --- src/services/utilities.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 1dde8a23b6edd..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: host.readFile.bind(host), + readFile: fileName => host.readFile(fileName), useCaseSensitiveFileNames: maybeBind(host, host.useCaseSensitiveFileNames), getSymlinkCache: maybeBind(host, host.getSymlinkCache) || program.getSymlinkCache, getModuleSpecifierCache: maybeBind(host, host.getModuleSpecifierCache), From 47374f353079110f4a462fc0efd94c0f907ed9e5 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Mon, 15 Jan 2024 13:46:27 +0000 Subject: [PATCH 213/224] Removed namespaces for fixer. --- src/harness/_namespaces/fixer.ts | 3 --- src/testRunner/_namespaces/fixer.ts | 3 --- src/testRunner/compilerRunner.ts | 4 ++-- 3 files changed, 2 insertions(+), 8 deletions(-) delete mode 100644 src/harness/_namespaces/fixer.ts delete mode 100644 src/testRunner/_namespaces/fixer.ts diff --git a/src/harness/_namespaces/fixer.ts b/src/harness/_namespaces/fixer.ts deleted file mode 100644 index c5b7f26dc68f3..0000000000000 --- a/src/harness/_namespaces/fixer.ts +++ /dev/null @@ -1,3 +0,0 @@ -/* Generated file to emulate the fixer namespace. */ - -export * from "../isolatedDeclarationFixer"; diff --git a/src/testRunner/_namespaces/fixer.ts b/src/testRunner/_namespaces/fixer.ts deleted file mode 100644 index eecd8b75acc09..0000000000000 --- a/src/testRunner/_namespaces/fixer.ts +++ /dev/null @@ -1,3 +0,0 @@ -/* Generated file to emulate the fixer namespace. */ - -export * from "../../harness/_namespaces/fixer"; diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index f670752ac3569..c35255d92b268 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -1,7 +1,7 @@ -import * as compiler from "./_namespaces/compiler"; import { fixTestFiles, -} from "./_namespaces/fixer"; +} from "../harness/isolatedDeclarationFixer"; +import * as compiler from "./_namespaces/compiler"; import { Baseline, Compiler, From 6803a00c5c25093b4b420ddb82b80234dbe91461 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 16 Jan 2024 13:01:41 +0000 Subject: [PATCH 214/224] Fix bugs from testing in real project. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/debug.ts | 9 +++++ .../transformers/declarations/emitBinder.ts | 1 + .../declarations/localInferenceResolver.ts | 3 ++ .../declarations/transpileDeclaration.ts | 9 +++-- src/harness/harnessIO.ts | 38 ++++++++++++------- .../fixMissingTypeAnnotationOnExports.ts | 6 +++ ...AnnotationOnExports35-inline-short-hand.ts | 10 +++++ 7 files changed, 60 insertions(+), 16 deletions(-) diff --git a/src/compiler/debug.ts b/src/compiler/debug.ts index 8912ffee391f1..b5ea2bfa86053 100644 --- a/src/compiler/debug.ts +++ b/src/compiler/debug.ts @@ -356,6 +356,15 @@ export namespace Debug { } } + /** + * Asserts the symbol is defined and is of the right kind (originating in TSC or sample DTE depending o context) + * The default implementation just asserts the symbol is not null + * In tests it is overridden to ensure we don't accidentally use TSC symbols in DTE + */ + // eslint-disable-next-line prefer-const + export let assertSymbolValid = (symbol: Symbol) => { + assert(symbol, "Symbol not defined"); + }; /** * Asserts a value has the specified type in typespace only (does not perform a runtime assertion). * This is useful in cases where we switch on `node.kind` and can be reasonably sure the type is accurate, and diff --git a/src/compiler/transformers/declarations/emitBinder.ts b/src/compiler/transformers/declarations/emitBinder.ts index ec153b3a6ab7a..cb97460789fbd 100644 --- a/src/compiler/transformers/declarations/emitBinder.ts +++ b/src/compiler/transformers/declarations/emitBinder.ts @@ -701,6 +701,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { } // Default export declarations set isVisible on true on associated symbols in the type checker. function bindExportAssignment(node: ExportAssignment) { + bindNode(node.expression); if (node.expression && isIdentifier(node.expression)) { const name = node.expression.escapedText; postBindingAction.push(() => { diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index ad7bc0bd3f1fb..63bc1a059403d 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -530,6 +530,7 @@ export function createLocalInferenceResolver({ }); if (nameKey) { + Debug.assertSymbolValid(prop.symbol); const exitingIndex = members.get(prop.symbol); if (exitingIndex !== undefined && !isMethodOrAccessor(prop)) { properties[exitingIndex] = newProp; @@ -663,6 +664,7 @@ export function createLocalInferenceResolver({ function normalizePropertyName(symbol: Symbol, isMethod: boolean) { let nameText; + Debug.assertSymbolValid(symbol); Debug.assert(symbol.declarations !== undefined, "Symbol has no declarations"); let stringNamed = !!length(symbol.declarations); let singleQuote = stringNamed; @@ -789,6 +791,7 @@ export function createLocalInferenceResolver({ return localInference(node.expression, NarrowBehavior.KeepLiterals); } else if (isVariableDeclaration(node)) { + Debug.assertSymbolValid(node.symbol); const firstDeclaration = node.symbol.valueDeclaration; // Use first declaration of variable for the type if (node !== firstDeclaration && firstDeclaration && isVariableDeclaration(firstDeclaration)) { diff --git a/src/compiler/transformers/declarations/transpileDeclaration.ts b/src/compiler/transformers/declarations/transpileDeclaration.ts index ea7507e53bfce..ad839eb0a34a1 100644 --- a/src/compiler/transformers/declarations/transpileDeclaration.ts +++ b/src/compiler/transformers/declarations/transpileDeclaration.ts @@ -28,12 +28,15 @@ export function transpileDeclaration(sourceFile: SourceFile, transpileOptions: T ...transpileOptions.compilerOptions, isolatedDeclarations: true, }; + const getCanonicalFileName = createGetCanonicalFileName(!!compilerOptions.useCaseSensitiveFileNames); + const currentDirectory = normalizeSlashes(transpileOptions.currentDirectory ?? "."); + const commonSourceDirectory = normalizeSlashes(ensureTrailingDirectorySeparator(transpileOptions.commonSourceDirectory ?? ".")); const emitHost = { - getCurrentDirectory: () => transpileOptions.currentDirectory ?? ".", - getCanonicalFileName: createGetCanonicalFileName(!!compilerOptions.useCaseSensitiveFileNames), + getCurrentDirectory: () => currentDirectory, + getCanonicalFileName, useCaseSensitiveFileNames: () => !!compilerOptions.useCaseSensitiveFileNames, getCompilerOptions: () => compilerOptions.compilerOptions, - getCommonSourceDirectory: () => ensureTrailingDirectorySeparator(transpileOptions.commonSourceDirectory ?? "."), + getCommonSourceDirectory: () => commonSourceDirectory, }; const emitResolver = createEmitDeclarationResolver(sourceFile); const diagnostics: Diagnostic[] = []; diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index 7f94664897b2f..fd5e4976b51ee 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -651,20 +651,32 @@ export namespace Compiler { 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)); + const assertSymbolValid = ts.Debug.assertSymbolValid; + ts.Debug.assertSymbolValid = symbol => { + assertSymbolValid(symbol); + if (symbol.name) { + ts.Debug.assert(symbol.name[1] === ":", "Symbol is not from DTE"); + } + }; + try { + 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); + } + finally { + ts.Debug.assertSymbolValid = assertSymbolValid; } - diagnostics.push(...fileDiagnostics); }); return { dts, dtsMap, diagnostics }; } diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts index fa3b3468656c0..715079cf32e39 100644 --- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts +++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts @@ -1007,6 +1007,12 @@ function withChanges( if (isParameter(node)) { return emptyInferenceResult; } + if (isShorthandPropertyAssignment(node)) { + return { + typeNode: createTypeOfFromEntityNameExpression(node.name), + mutatedTarget: false, + }; + } if (isEntityNameExpression(node)) { return { typeNode: createTypeOfFromEntityNameExpression(node), diff --git a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports35-inline-short-hand.ts b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports35-inline-short-hand.ts index de2bc11800412..68b7596ad0b9c 100644 --- a/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports35-inline-short-hand.ts +++ b/tests/cases/fourslash/codeFixMissingTypeAnnotationOnExports35-inline-short-hand.ts @@ -17,3 +17,13 @@ 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 +};` +}); From edc4d3249bd59f28d47fb91d63cb7e08af033958 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 16 Jan 2024 15:20:52 +0000 Subject: [PATCH 215/224] Addressed code review comments. --- .../declarations/localInferenceResolver.ts | 1 - ...cessorNoUseDefineForClassFields.errors.txt | 49 ------------------- .../autoAccessorNoUseDefineForClassFields.js | 4 +- ...oAccessorNoUseDefineForClassFields.symbols | 6 +-- ...utoAccessorNoUseDefineForClassFields.types | 4 +- .../autoAccessorNoUseDefineForClassFields.ts | 2 +- 6 files changed, 8 insertions(+), 58 deletions(-) delete mode 100644 tests/baselines/reference/autoAccessorNoUseDefineForClassFields.errors.txt diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index ad7bc0bd3f1fb..0caf55428a5b0 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -710,7 +710,6 @@ export function createLocalInferenceResolver({ ); } - // Copied similar function in checker. Maybe a reusable one should be created. function deepClone(node: T): T { const clonedNode = visitEachChild(node, deepClone, nullTransformationContext, deepCloneNodes); // If node has children visitEachChild will already return a new node diff --git a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.errors.txt b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.errors.txt deleted file mode 100644 index 89a2e0e0c32e5..0000000000000 --- a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.errors.txt +++ /dev/null @@ -1,49 +0,0 @@ -file3-2.ts(1,7): error TS2300: Duplicate identifier 'C3'. -file3.ts(1,7): error TS2300: Duplicate identifier 'C3'. - - -==== file1.ts (0 errors) ==== - // https://github.com/microsoft/TypeScript/issues/51528 - class C1 { - static accessor x = 0; - } - -==== file2.ts (0 errors) ==== - class C2 { - static accessor #x = 0; - } - -==== file3.ts (1 errors) ==== - class C3 { - ~~ -!!! error TS2300: Duplicate identifier 'C3'. -!!! related TS6203 file3-2.ts:1:7: 'C3' was also declared here. - static accessor #x = 0; - accessor #y = 0; - } - -==== file3-2.ts (1 errors) ==== - class C3 { - ~~ -!!! error TS2300: Duplicate identifier 'C3'. -!!! related TS6203 file3.ts:1:7: 'C3' was also declared here. - accessor x = 0; - } - -==== file4.ts (0 errors) ==== - class C4 { - accessor #x = 0; - } - -==== file5.ts (0 errors) ==== - class C5 { - x = 0; - accessor #x = 1; - } - -==== file6.ts (0 errors) ==== - class C6 { - accessor #x = 0; - x = 1; - } - \ No newline at end of file diff --git a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.js b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.js index a2d0ad89cccac..ff667dc51f4c1 100644 --- a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.js +++ b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.js @@ -18,7 +18,7 @@ class C3 { } //// [file3-2.ts] -class C3 { +class C32 { accessor x = 0; } @@ -55,7 +55,7 @@ class C3 { accessor #y = 0; } //// [file3-2.js] -class C3 { +class C32 { accessor x = 0; } //// [file4.js] diff --git a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.symbols b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.symbols index 2df26cb704247..9c4ab983fa9d2 100644 --- a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.symbols +++ b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.symbols @@ -29,11 +29,11 @@ class C3 { } === file3-2.ts === -class C3 { ->C3 : Symbol(C3, Decl(file3-2.ts, 0, 0)) +class C32 { +>C32 : Symbol(C32, Decl(file3-2.ts, 0, 0)) accessor x = 0; ->x : Symbol(C3.x, Decl(file3-2.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 62a0c7691f7ab..69294d2e43ce6 100644 --- a/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.types +++ b/tests/baselines/reference/autoAccessorNoUseDefineForClassFields.types @@ -33,8 +33,8 @@ class C3 { } === file3-2.ts === -class C3 { ->C3 : C3 +class C32 { +>C32 : C32 accessor x = 0; >x : number diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorNoUseDefineForClassFields.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorNoUseDefineForClassFields.ts index 98dc20d92940a..8475055c4a829 100644 --- a/tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorNoUseDefineForClassFields.ts +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/autoAccessorNoUseDefineForClassFields.ts @@ -19,7 +19,7 @@ class C3 { } // @filename: file3-2.ts -class C3 { +class C32 { accessor x = 0; } From f65c3b6d1cd539d6b43b20304571dbd0dced0667 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 16 Jan 2024 15:24:06 +0000 Subject: [PATCH 216/224] Addressed feedback Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/debug.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/debug.ts b/src/compiler/debug.ts index b5ea2bfa86053..aca37cbe325b1 100644 --- a/src/compiler/debug.ts +++ b/src/compiler/debug.ts @@ -357,7 +357,7 @@ export namespace Debug { } /** - * Asserts the symbol is defined and is of the right kind (originating in TSC or sample DTE depending o context) + * Asserts the symbol is defined and is of the right kind (originating in TSC or sample DTE depending o the test that is currently being run) * The default implementation just asserts the symbol is not null * In tests it is overridden to ensure we don't accidentally use TSC symbols in DTE */ From 8347b231714fbf8fdc53e659005620ee4e0728da Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Tue, 16 Jan 2024 16:41:47 +0000 Subject: [PATCH 217/224] Remove stale diff reasons. Signed-off-by: Titian Cernicova-Dragomir --- src/harness/harnessIO.ts | 8 ---- src/testRunner/compilerRunner.ts | 47 ++++++++++++------- tests/cases/compiler/arrayFind.ts | 1 - tests/cases/compiler/bigintIndex.ts | 1 - tests/cases/compiler/booleanFilterAnyArray.ts | 1 - .../capturedParametersInInitializers1.ts | 1 - .../circularObjectLiteralAccessors.ts | 1 - tests/cases/compiler/complicatedPrivacy.ts | 1 - tests/cases/compiler/constEnumErrors.ts | 1 - tests/cases/compiler/contextualTyping.ts | 1 - tests/cases/compiler/contextualTyping38.ts | 1 - tests/cases/compiler/contextualTyping39.ts | 1 - ...dataWithImportDeclarationNameCollision7.ts | 1 - .../decoratorsOnComputedProperties.ts | 1 - ...cateObjectLiteralProperty_computedName1.ts | 1 - ...cateObjectLiteralProperty_computedName2.ts | 1 - .../duplicateVarsAcrossFileBoundaries.ts | 1 - tests/cases/compiler/escapedIdentifiers.ts | 1 - tests/cases/compiler/forwardRefInEnum.ts | 1 - .../cases/compiler/gettersAndSettersErrors.ts | 1 - .../compiler/inKeywordAndIntersection.ts | 1 - .../indexSignatureMustHaveTypeAnnotation.ts | 1 - .../cases/compiler/indexWithoutParamType2.ts | 1 - tests/cases/compiler/intTypeCheck.ts | 1 - ...ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts | 3 +- ...lutionWithSuffixes_one_externalTSModule.ts | 1 - .../objectLiteralEnumPropertyNames.ts | 1 - .../compiler/overloadsWithComputedNames.ts | 1 - .../compiler/parseInvalidNonNullableTypes.ts | 1 - .../compiler/parseInvalidNullableTypes.ts | 1 - tests/cases/compiler/parseTypes.ts | 1 - tests/cases/compiler/propertyAssignment.ts | 1 - .../compiler/typeUsedAsTypeLiteralIndex.ts | 1 - .../conformance/Symbols/ES5SymbolProperty1.ts | 1 - .../conformance/Symbols/ES5SymbolProperty2.ts | 1 - .../conformance/Symbols/ES5SymbolProperty3.ts | 1 - .../conformance/Symbols/ES5SymbolProperty4.ts | 1 - .../conformance/Symbols/ES5SymbolProperty5.ts | 1 - .../conformance/Symbols/ES5SymbolProperty6.ts | 1 - .../conformance/Symbols/ES5SymbolProperty7.ts | 1 - .../asyncFunctionDeclaration8_es2017.ts | 1 - .../asyncFunctionDeclaration8_es5.ts | 1 - .../asyncFunctionDeclaration8_es6.ts | 1 - .../derivedClassOverridesProtectedMembers.ts | 1 - .../derivedClassOverridesProtectedMembers2.ts | 1 - .../derivedClassOverridesProtectedMembers3.ts | 1 - .../derivedClassOverridesPublicMembers.ts | 1 - .../staticPropertyNameConflicts.ts | 1 - .../es6/Symbols/symbolProperty1.ts | 1 - .../es6/Symbols/symbolProperty2.ts | 1 - .../es6/Symbols/symbolProperty3.ts | 1 - .../es6/Symbols/symbolProperty52.ts | 1 - .../es6/Symbols/symbolProperty53.ts | 1 - .../es6/Symbols/symbolProperty54.ts | 1 - .../es6/Symbols/symbolProperty58.ts | 1 - .../es6/Symbols/symbolProperty59.ts | 1 - .../computedPropertyNames10_ES5.ts | 1 - .../computedPropertyNames10_ES6.ts | 1 - .../computedPropertyNames11_ES5.ts | 1 - .../computedPropertyNames11_ES6.ts | 1 - .../computedPropertyNames12_ES5.ts | 1 - .../computedPropertyNames12_ES6.ts | 1 - .../computedPropertyNames13_ES5.ts | 1 - .../computedPropertyNames13_ES6.ts | 1 - .../computedPropertyNames14_ES5.ts | 1 - .../computedPropertyNames14_ES6.ts | 1 - .../computedPropertyNames15_ES5.ts | 1 - .../computedPropertyNames15_ES6.ts | 1 - .../computedPropertyNames16_ES5.ts | 1 - .../computedPropertyNames16_ES6.ts | 1 - .../computedPropertyNames17_ES5.ts | 1 - .../computedPropertyNames17_ES6.ts | 1 - .../computedPropertyNames2_ES5.ts | 1 - .../computedPropertyNames2_ES6.ts | 1 - .../computedPropertyNames4_ES5.ts | 1 - .../computedPropertyNames4_ES6.ts | 1 - .../computedPropertyNames5_ES5.ts | 1 - .../computedPropertyNames5_ES6.ts | 1 - .../computedPropertyNames6_ES5.ts | 1 - .../computedPropertyNames6_ES6.ts | 1 - .../computedPropertyNames7_ES5.ts | 1 - .../computedPropertyNames7_ES6.ts | 1 - .../computedPropertyNamesOnOverloads_ES5.ts | 1 - .../computedPropertyNamesOnOverloads_ES6.ts | 1 - ...computedPropertyNamesWithStaticProperty.ts | 1 - .../FunctionDeclaration8_es6.ts | 2 - .../MemberFunctionDeclaration3_es6.ts | 1 - .../expressions/asOperator/asOperator1.ts | 1 - .../generatedContextualTyping.ts | 1 - .../objectLiteralGettersAndSetters.ts | 1 - .../optionalChainingInference.ts | 1 - .../superSymbolIndexedAccess1.ts | 1 - .../superSymbolIndexedAccess3.ts | 1 - .../superSymbolIndexedAccess4.ts | 1 - .../superSymbolIndexedAccess5.ts | 1 - .../superSymbolIndexedAccess6.ts | 1 - .../reExportAliasMakesInstantiated.ts | 1 - ...tionEmitDynamicImportWithPackageExports.ts | 1 - .../parserES5ComputedPropertyName1.ts | 1 - .../parserES5ComputedPropertyName10.ts | 1 - .../parserES5ComputedPropertyName11.ts | 1 - .../parserES5ComputedPropertyName2.ts | 1 - .../parserES5ComputedPropertyName3.ts | 1 - .../parserES5ComputedPropertyName4.ts | 1 - .../parserES5ComputedPropertyName5.ts | 1 - .../parserES5ComputedPropertyName7.ts | 1 - .../parserES5ComputedPropertyName8.ts | 1 - .../parserES5ComputedPropertyName9.ts | 1 - .../parserCastVersusArrowFunction1.ts | 1 - .../IndexSignatures/parserIndexSignature11.ts | 1 - .../IndexSignatures/parserIndexSignature5.ts | 1 - .../StrictMode/parserStrictMode8.ts | 1 - .../Symbols/parserES5SymbolProperty1.ts | 1 - .../Symbols/parserES5SymbolProperty2.ts | 1 - .../Symbols/parserES5SymbolProperty3.ts | 1 - .../Symbols/parserES5SymbolProperty4.ts | 1 - .../Symbols/parserES5SymbolProperty5.ts | 1 - .../Symbols/parserES5SymbolProperty6.ts | 1 - .../Symbols/parserES5SymbolProperty7.ts | 1 - .../Symbols/parserES5SymbolProperty8.ts | 1 - .../Symbols/parserES5SymbolProperty9.ts | 1 - .../parserComputedPropertyName1.ts | 1 - .../parserComputedPropertyName10.ts | 1 - .../parserComputedPropertyName11.ts | 1 - .../parserComputedPropertyName12.ts | 1 - .../parserComputedPropertyName13.ts | 1 - .../parserComputedPropertyName14.ts | 1 - .../parserComputedPropertyName15.ts | 1 - .../parserComputedPropertyName17.ts | 1 - .../parserComputedPropertyName18.ts | 1 - .../parserComputedPropertyName19.ts | 1 - .../parserComputedPropertyName2.ts | 1 - .../parserComputedPropertyName20.ts | 1 - .../parserComputedPropertyName21.ts | 1 - .../parserComputedPropertyName22.ts | 1 - .../parserComputedPropertyName23.ts | 1 - .../parserComputedPropertyName24.ts | 1 - .../parserComputedPropertyName25.ts | 1 - .../parserComputedPropertyName27.ts | 1 - .../parserComputedPropertyName28.ts | 1 - .../parserComputedPropertyName29.ts | 1 - .../parserComputedPropertyName3.ts | 1 - .../parserComputedPropertyName31.ts | 1 - .../parserComputedPropertyName32.ts | 1 - .../parserComputedPropertyName33.ts | 1 - .../parserComputedPropertyName36.ts | 1 - .../parserComputedPropertyName37.ts | 1 - .../parserComputedPropertyName38.ts | 1 - .../parserComputedPropertyName39.ts | 1 - .../parserComputedPropertyName4.ts | 1 - .../parserComputedPropertyName5.ts | 1 - .../parserComputedPropertyName6.ts | 1 - .../parserComputedPropertyName7.ts | 1 - .../parserComputedPropertyName8.ts | 1 - .../parserComputedPropertyName9.ts | 1 - .../pedantic/noUncheckedIndexedAccess.ts | 1 - .../salsa/typeFromPropertyAssignment32.ts | 1 - .../salsa/typeFromPropertyAssignment33.ts | 1 - .../for-ofStatements/ES5For-ofTypeCheck10.ts | 1 - .../literal/literalTypesAndTypeAssertions.ts | 1 - .../stringLiteralsWithTypeAssertions01.ts | 3 +- .../typeQueries/recursiveTypesWithTypeof.ts | 1 - ...genericTypeReferenceWithoutTypeArgument.ts | 1 - ...enericTypeReferenceWithoutTypeArgument2.ts | 1 - .../types/thisType/thisTypeErrors.ts | 1 - .../types/thisType/thisTypeInAccessors.ts | 1 - .../contextualSignatureInstantiation.ts | 1 - 167 files changed, 31 insertions(+), 194 deletions(-) diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index 7f94664897b2f..7fb7013c9c850 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -1050,10 +1050,6 @@ export namespace Compiler { fullDiff += Diff.createTwoFilesPatch("TSC", "DTE", tscContent, dteContent, "declarations", "declarations"); Baseline.runBaseline(type + "/" + baselinePath.replace(/\.tsx?/, `.d.ts.map.diff`), fullDiff); - - if (reason === undefined) { - throw new Error("The test is not equivalent between TSC and DTE. Please provide an isolatedDeclarationDiffReason/isolatedDeclarationFixedDiffReason setting in the test if this is intentional"); - } } export function doDeclarationDiffBaseline( @@ -1077,10 +1073,6 @@ export namespace Compiler { fullDiff += Diff.createTwoFilesPatch("TSC", "DTE", tscContent, dteContent, "declarations", "declarations"); Baseline.runBaseline(type + "/" + baselinePath.replace(/\.tsx?/, `.d.ts.diff`), fullDiff); - - if (reason === undefined) { - throw new Error("The test is not equivalent between TSC and DTE. Please provide an isolatedDeclarationDiffReason/isolatedDeclarationFixedDiffReason setting in the test if this is intentional"); - } } function sourceContent(tsSources: readonly TestFile[]) { let code = ""; diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index c35255d92b268..c2a01ad0c6b0a 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -128,6 +128,7 @@ export class CompilerBaselineRunner extends RunnerBase { it(`Correct dte emit for ${fileName}`, () => isolatedTest?.verifyDteOutput()); it(`Correct tsc emit for ${fileName}`, () => isolatedTest?.verifyTscOutput()); it(`Correct dte/tsc diff ${fileName}`, () => isolatedTest?.verifyDiff()); + it(`Correct diff reason ${fileName}`, () => isolatedTest?.verifyDiffReason()); after(() => { isolatedTest = undefined!; @@ -141,7 +142,8 @@ export class CompilerBaselineRunner extends RunnerBase { if (fixedIsolatedTestEnv) { fixedIsolatedTest = new FixedIsolatedDeclarationTest(fixedIsolatedTestEnv); } - else { + else if(!environment.compilerOptions.isolatedDeclarationDiffReason) { + // Don't skip if they have a reason we need to fail if unused reasons exist this.skip(); } }); @@ -151,6 +153,7 @@ export class CompilerBaselineRunner extends RunnerBase { it(`Correct dte map emit for ${fileName}`, () => fixedIsolatedTest?.verifyDteMapOutput()); it(`Correct tsc map emit for ${fileName}`, () => fixedIsolatedTest?.verifyTscMapOutput()); it(`Correct dte/tsc map diff ${fileName}`, () => fixedIsolatedTest?.verifyMapDiff()); + it(`Correct diff reason ${fileName}`, () => fixedIsolatedTest?.verifyDiffReason()); after(() => { fixedIsolatedTest = undefined!; @@ -480,13 +483,15 @@ class IsolatedDeclarationTest extends CompilerTestBase { protected isDiagnosticEquivalent: boolean; protected isOutputMapEquivalent: boolean; - static transformEnvironment(compilerEnvironment: CompilerTestEnvironment): CompilerTestEnvironment | undefined { + static transformEnvironment(compilerEnvironment: CompilerTestEnvironment, shouldNotExclude = !!compilerEnvironment.testCaseContent.settings.isolatedDeclarationDiffReason): CompilerTestEnvironment | undefined { const options = compilerEnvironment.compilerOptions; - // 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; + 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) { @@ -658,11 +663,15 @@ class IsolatedDeclarationTest extends CompilerTestBase { ); } + 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) { - if (this.isOutputMapEquivalent) { - ts.Debug.assert(this.diffReason === undefined, "Should not have a diff reason if everything is equivalent"); - } return; } Compiler.doDeclarationDiffBaseline( @@ -697,16 +706,18 @@ class IsolatedDeclarationTest extends CompilerTestBase { } class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest { - static fixTestProject(compilerEnvironment: CompilerTestEnvironment): CompilerTestEnvironment | undefined { - // 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; + 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); + const env = IsolatedDeclarationTest.transformEnvironment(compilerEnvironment, shouldNotExclude); if (!env) { return undefined; } diff --git a/tests/cases/compiler/arrayFind.ts b/tests/cases/compiler/arrayFind.ts index 80505ee58ad7a..90883974766b7 100644 --- a/tests/cases/compiler/arrayFind.ts +++ b/tests/cases/compiler/arrayFind.ts @@ -1,5 +1,4 @@ // @lib: es2015 -// @isolatedDeclarationDiffReason: TS normalizes types // test fix for #18112, type guard predicates should narrow returned element function isNumber(x: any): x is number { diff --git a/tests/cases/compiler/bigintIndex.ts b/tests/cases/compiler/bigintIndex.ts index 86a23489d66f1..a959eac590f05 100644 --- a/tests/cases/compiler/bigintIndex.ts +++ b/tests/cases/compiler/bigintIndex.ts @@ -1,5 +1,4 @@ // @target: es2020 -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @filename: a.ts interface BigIntIndex { diff --git a/tests/cases/compiler/booleanFilterAnyArray.ts b/tests/cases/compiler/booleanFilterAnyArray.ts index 66f2ed3ca6c53..e7a7814ca0ea7 100644 --- a/tests/cases/compiler/booleanFilterAnyArray.ts +++ b/tests/cases/compiler/booleanFilterAnyArray.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: TS normalizes types interface Bullean { } interface BulleanConstructor { new(v1?: any): Bullean; diff --git a/tests/cases/compiler/capturedParametersInInitializers1.ts b/tests/cases/compiler/capturedParametersInInitializers1.ts index 12a879dbaaf5f..be989e92f8bcf 100644 --- a/tests/cases/compiler/capturedParametersInInitializers1.ts +++ b/tests/cases/compiler/capturedParametersInInitializers1.ts @@ -1,5 +1,4 @@ // @target: es6 -// @isolatedDeclarationDiffReason: TS normalizes types // ok - usage is deferred function foo1(y = class {c = x}, x = 1) { new y().c; diff --git a/tests/cases/compiler/circularObjectLiteralAccessors.ts b/tests/cases/compiler/circularObjectLiteralAccessors.ts index 028c0af486e8f..3546ee75e6f75 100644 --- a/tests/cases/compiler/circularObjectLiteralAccessors.ts +++ b/tests/cases/compiler/circularObjectLiteralAccessors.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: TS merges accessors with the same type. DTE can only merge if one type is specified. // @target: es5 // Repro from #6000 diff --git a/tests/cases/compiler/complicatedPrivacy.ts b/tests/cases/compiler/complicatedPrivacy.ts index dc60d06ec2610..774a2244f97fc 100644 --- a/tests/cases/compiler/complicatedPrivacy.ts +++ b/tests/cases/compiler/complicatedPrivacy.ts @@ -1,5 +1,4 @@ // @target: es5 -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC module m1 { export module m2 { diff --git a/tests/cases/compiler/constEnumErrors.ts b/tests/cases/compiler/constEnumErrors.ts index 1d8529330ace9..ca2289ef3bf33 100644 --- a/tests/cases/compiler/constEnumErrors.ts +++ b/tests/cases/compiler/constEnumErrors.ts @@ -1,5 +1,4 @@ // @lib: es5 -// @isolatedDeclarationDiffReason: TSC detects forward ref which is not allowed and so enum value is undefined, which is also the way we detect isolated declaration errors. const enum E { A } diff --git a/tests/cases/compiler/contextualTyping.ts b/tests/cases/compiler/contextualTyping.ts index 7fe7307cccdfc..73a75d0146623 100644 --- a/tests/cases/compiler/contextualTyping.ts +++ b/tests/cases/compiler/contextualTyping.ts @@ -1,5 +1,4 @@ // @sourcemap: true -// @isolatedDeclarationDiffReason: TS normalizes types // DEFAULT INTERFACES interface IFoo { n: number; diff --git a/tests/cases/compiler/contextualTyping38.ts b/tests/cases/compiler/contextualTyping38.ts index fd383e75e3227..d6533d168267a 100644 --- a/tests/cases/compiler/contextualTyping38.ts +++ b/tests/cases/compiler/contextualTyping38.ts @@ -1,2 +1 @@ -// @isolatedDeclarationDiffReason: TS normalizes types var foo = <{ (): number; }> function(a) { return a }; \ No newline at end of file diff --git a/tests/cases/compiler/contextualTyping39.ts b/tests/cases/compiler/contextualTyping39.ts index cfb3f9002746b..295d9775b0d54 100644 --- a/tests/cases/compiler/contextualTyping39.ts +++ b/tests/cases/compiler/contextualTyping39.ts @@ -1,2 +1 @@ -// @isolatedDeclarationDiffReason: TS normalizes types var foo = <{ (): number; }> function() { return "err"; }; \ No newline at end of file diff --git a/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts b/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts index cb289d01fc6e2..76c68dab6cfa2 100644 --- a/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts +++ b/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision7.ts @@ -3,7 +3,6 @@ // @emitdecoratormetadata: true // @target: es5 // @module: commonjs -// @isolatedDeclarationDiffReason: TSC removes import that is not used in a semantically valid way. DTE can't know about this. // @filename: db.ts export default class db { public doSomething() { diff --git a/tests/cases/compiler/decoratorsOnComputedProperties.ts b/tests/cases/compiler/decoratorsOnComputedProperties.ts index 2e8104041f745..cb9cfe5f9977e 100644 --- a/tests/cases/compiler/decoratorsOnComputedProperties.ts +++ b/tests/cases/compiler/decoratorsOnComputedProperties.ts @@ -1,6 +1,5 @@ // @target: es6 // @experimentalDecorators: true -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC function x(o: object, k: PropertyKey) { } let i = 0; function foo(): string { return ++i + ""; } diff --git a/tests/cases/compiler/duplicateObjectLiteralProperty_computedName1.ts b/tests/cases/compiler/duplicateObjectLiteralProperty_computedName1.ts index bb90c5f89208f..9bc5e2e3d934b 100644 --- a/tests/cases/compiler/duplicateObjectLiteralProperty_computedName1.ts +++ b/tests/cases/compiler/duplicateObjectLiteralProperty_computedName1.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: DTE preserves different duplicate identifier const t1 = { 1: 1, [1]: 0 // duplicate diff --git a/tests/cases/compiler/duplicateObjectLiteralProperty_computedName2.ts b/tests/cases/compiler/duplicateObjectLiteralProperty_computedName2.ts index a34847e44ea65..ff56ce9cfd486 100644 --- a/tests/cases/compiler/duplicateObjectLiteralProperty_computedName2.ts +++ b/tests/cases/compiler/duplicateObjectLiteralProperty_computedName2.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Computed property are not resolved const n = 1; const s = "s"; enum E1 { A = "ENUM_KEY" } diff --git a/tests/cases/compiler/duplicateVarsAcrossFileBoundaries.ts b/tests/cases/compiler/duplicateVarsAcrossFileBoundaries.ts index d2bd47dee4a75..03de4077caf88 100644 --- a/tests/cases/compiler/duplicateVarsAcrossFileBoundaries.ts +++ b/tests/cases/compiler/duplicateVarsAcrossFileBoundaries.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: TSC Resolves variable types across files. // @Filename: duplicateVarsAcrossFileBoundaries_0.ts var x = 3; var y = ""; diff --git a/tests/cases/compiler/escapedIdentifiers.ts b/tests/cases/compiler/escapedIdentifiers.ts index 375abf8d69d09..c58c59d9b4241 100644 --- a/tests/cases/compiler/escapedIdentifiers.ts +++ b/tests/cases/compiler/escapedIdentifiers.ts @@ -1,6 +1,5 @@ // @allowUnusedLabels: true // @allowUnreachableCode: true -// @isolatedDeclarationDiffReason: DTE resolves unicode escapes in some cases. /* 0 .. \u0030 diff --git a/tests/cases/compiler/forwardRefInEnum.ts b/tests/cases/compiler/forwardRefInEnum.ts index 7c54a6331e90c..97bc1819d7b38 100644 --- a/tests/cases/compiler/forwardRefInEnum.ts +++ b/tests/cases/compiler/forwardRefInEnum.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: TSC detects forward ref which is not allowed and so enum value is undefined, which is also the way we detect isolated declaration errors. enum E1 { // illegal case // forward reference to the element of the same enum diff --git a/tests/cases/compiler/gettersAndSettersErrors.ts b/tests/cases/compiler/gettersAndSettersErrors.ts index 3065b861f9104..fcc26abf6221f 100644 --- a/tests/cases/compiler/gettersAndSettersErrors.ts +++ b/tests/cases/compiler/gettersAndSettersErrors.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Duplicate identifiers in class result in different types class C { public get Foo() { return "foo";} // ok public set Foo(foo:string) {} // ok diff --git a/tests/cases/compiler/inKeywordAndIntersection.ts b/tests/cases/compiler/inKeywordAndIntersection.ts index f81391f3b0f1e..dadf93a8649d0 100644 --- a/tests/cases/compiler/inKeywordAndIntersection.ts +++ b/tests/cases/compiler/inKeywordAndIntersection.ts @@ -1,5 +1,4 @@ // @strict: true -// @isolatedDeclarationDiffReason: TS normalizes types class A { a = 0 } class B { b = 0 } diff --git a/tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts b/tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts index 2f0b82a252c32..47d818065a1dc 100644 --- a/tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts +++ b/tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface I { // Used to be indexer, now it is a computed property [x]: string; diff --git a/tests/cases/compiler/indexWithoutParamType2.ts b/tests/cases/compiler/indexWithoutParamType2.ts index c48f197c94ffa..0def5dc06a911 100644 --- a/tests/cases/compiler/indexWithoutParamType2.ts +++ b/tests/cases/compiler/indexWithoutParamType2.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { // Used to be indexer, now it is a computed property [x]: string diff --git a/tests/cases/compiler/intTypeCheck.ts b/tests/cases/compiler/intTypeCheck.ts index e17aa854c7e57..a156309786353 100644 --- a/tests/cases/compiler/intTypeCheck.ts +++ b/tests/cases/compiler/intTypeCheck.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface i1 { //Property Signatures p; diff --git a/tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts b/tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts index 8a9ce2e980093..290cf0e42119f 100644 --- a/tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts +++ b/tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts @@ -1,5 +1,4 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC -// @lib: es5 +// @lib: es5 // @target: es6 // All will be error from using ES6 features but only include ES5 library diff --git a/tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts b/tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts index b2bd6ddb0599e..7e5afac88ee0f 100644 --- a/tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts +++ b/tests/cases/compiler/moduleResolutionWithSuffixes_one_externalTSModule.ts @@ -1,5 +1,4 @@ // moduleSuffixes has one entry and there's a matching package with TS files. -// @isolatedDeclarationDiffReason: checker.typeToTypeNode deliberately fails on types that originate from node_modules // @fullEmitPaths: true // @filename: /tsconfig.json { diff --git a/tests/cases/compiler/objectLiteralEnumPropertyNames.ts b/tests/cases/compiler/objectLiteralEnumPropertyNames.ts index 578c47c4f67e5..0f698d9c51d8d 100644 --- a/tests/cases/compiler/objectLiteralEnumPropertyNames.ts +++ b/tests/cases/compiler/objectLiteralEnumPropertyNames.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Computed property are not resolved // Fixes #16887 enum Strs { A = 'a', diff --git a/tests/cases/compiler/overloadsWithComputedNames.ts b/tests/cases/compiler/overloadsWithComputedNames.ts index ff2b3d5e57639..810beff88874c 100644 --- a/tests/cases/compiler/overloadsWithComputedNames.ts +++ b/tests/cases/compiler/overloadsWithComputedNames.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // https://github.com/microsoft/TypeScript/issues/52329 class Person { ["B"](a: number): string; diff --git a/tests/cases/compiler/parseInvalidNonNullableTypes.ts b/tests/cases/compiler/parseInvalidNonNullableTypes.ts index 468f5be1a70ab..f1ad19c6a2d98 100644 --- a/tests/cases/compiler/parseInvalidNonNullableTypes.ts +++ b/tests/cases/compiler/parseInvalidNonNullableTypes.ts @@ -1,5 +1,4 @@ // @strict: true -// @isolatedDeclarationDiffReason: Syntactically invalid. function f1(a: string): a is string! { return true; diff --git a/tests/cases/compiler/parseInvalidNullableTypes.ts b/tests/cases/compiler/parseInvalidNullableTypes.ts index f7f5c7fc7750c..f7d9f2643513e 100644 --- a/tests/cases/compiler/parseInvalidNullableTypes.ts +++ b/tests/cases/compiler/parseInvalidNullableTypes.ts @@ -1,5 +1,4 @@ // @strict: true -// @isolatedDeclarationDiffReason: Syntactically invalid. function f1(a: string): a is ?string { return true; diff --git a/tests/cases/compiler/parseTypes.ts b/tests/cases/compiler/parseTypes.ts index 8c6407d05b5e7..c259deb2a2aa3 100644 --- a/tests/cases/compiler/parseTypes.ts +++ b/tests/cases/compiler/parseTypes.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: TS normalizes types var x = <() => number>null; var y = <{(): number; }>null; diff --git a/tests/cases/compiler/propertyAssignment.ts b/tests/cases/compiler/propertyAssignment.ts index 3ebddff41838e..0c8351fb05d2f 100644 --- a/tests/cases/compiler/propertyAssignment.ts +++ b/tests/cases/compiler/propertyAssignment.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Syntactically invalid. var foo1: { new ():any; } diff --git a/tests/cases/compiler/typeUsedAsTypeLiteralIndex.ts b/tests/cases/compiler/typeUsedAsTypeLiteralIndex.ts index 3626c45634d12..908491330e206 100644 --- a/tests/cases/compiler/typeUsedAsTypeLiteralIndex.ts +++ b/tests/cases/compiler/typeUsedAsTypeLiteralIndex.ts @@ -1,5 +1,4 @@ // @target: esnext -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC type K = number | string; type T = { diff --git a/tests/cases/conformance/Symbols/ES5SymbolProperty1.ts b/tests/cases/conformance/Symbols/ES5SymbolProperty1.ts index 9128979e905d0..8a9276416c5e4 100644 --- a/tests/cases/conformance/Symbols/ES5SymbolProperty1.ts +++ b/tests/cases/conformance/Symbols/ES5SymbolProperty1.ts @@ -1,5 +1,4 @@ //@target: ES5 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface SymbolConstructor { foo: string; } diff --git a/tests/cases/conformance/Symbols/ES5SymbolProperty2.ts b/tests/cases/conformance/Symbols/ES5SymbolProperty2.ts index 14d3c5668d7bd..6bfce5fc58ddb 100644 --- a/tests/cases/conformance/Symbols/ES5SymbolProperty2.ts +++ b/tests/cases/conformance/Symbols/ES5SymbolProperty2.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 module M { var Symbol: any; diff --git a/tests/cases/conformance/Symbols/ES5SymbolProperty3.ts b/tests/cases/conformance/Symbols/ES5SymbolProperty3.ts index de77c6b169495..a6eecc721241d 100644 --- a/tests/cases/conformance/Symbols/ES5SymbolProperty3.ts +++ b/tests/cases/conformance/Symbols/ES5SymbolProperty3.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 var Symbol: any; diff --git a/tests/cases/conformance/Symbols/ES5SymbolProperty4.ts b/tests/cases/conformance/Symbols/ES5SymbolProperty4.ts index c7fb56b65ed5a..2b14e64a33ced 100644 --- a/tests/cases/conformance/Symbols/ES5SymbolProperty4.ts +++ b/tests/cases/conformance/Symbols/ES5SymbolProperty4.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 var Symbol: { iterator: string }; diff --git a/tests/cases/conformance/Symbols/ES5SymbolProperty5.ts b/tests/cases/conformance/Symbols/ES5SymbolProperty5.ts index 012c3cdb5ff0d..ec46ddad21dc1 100644 --- a/tests/cases/conformance/Symbols/ES5SymbolProperty5.ts +++ b/tests/cases/conformance/Symbols/ES5SymbolProperty5.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 var Symbol: { iterator: symbol }; diff --git a/tests/cases/conformance/Symbols/ES5SymbolProperty6.ts b/tests/cases/conformance/Symbols/ES5SymbolProperty6.ts index 20c0fdc0165f1..59b7d2291aada 100644 --- a/tests/cases/conformance/Symbols/ES5SymbolProperty6.ts +++ b/tests/cases/conformance/Symbols/ES5SymbolProperty6.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 class C { [Symbol.iterator]() { } diff --git a/tests/cases/conformance/Symbols/ES5SymbolProperty7.ts b/tests/cases/conformance/Symbols/ES5SymbolProperty7.ts index 517bd01a069bb..766b86f9b5d33 100644 --- a/tests/cases/conformance/Symbols/ES5SymbolProperty7.ts +++ b/tests/cases/conformance/Symbols/ES5SymbolProperty7.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 var Symbol: { iterator: any }; diff --git a/tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts b/tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts index 4cc015a22f86e..64e62a2719ef0 100644 --- a/tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts +++ b/tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration8_es2017.ts @@ -1,4 +1,3 @@ // @target: es2017 // @noEmitHelpers: true -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v = { [await]: foo } \ No newline at end of file diff --git a/tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts b/tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts index b443fe619194f..27db170b08039 100644 --- a/tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts +++ b/tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration8_es5.ts @@ -1,5 +1,4 @@ // @target: ES5 // @lib: es5,es2015.promise // @noEmitHelpers: true -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v = { [await]: foo } \ No newline at end of file diff --git a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts index 128db35bce16a..764b0f3fb8a79 100644 --- a/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts +++ b/tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration8_es6.ts @@ -1,4 +1,3 @@ // @target: ES6 // @noEmitHelpers: true -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v = { [await]: foo } \ No newline at end of file diff --git a/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers.ts b/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers.ts index a59887c6f70d8..76c03c73d6336 100644 --- a/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers.ts +++ b/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: TS normalizes types // @target: ES5 var x: { foo: string; } diff --git a/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers2.ts b/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers2.ts index 94047c58376fd..fb1955f1d952d 100644 --- a/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers2.ts +++ b/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers2.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: TS normalizes types // @target: ES5 var x: { foo: string; } var y: { foo: string; bar: string; } diff --git a/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts b/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts index a55b2a6dc596e..d24e313c24093 100644 --- a/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts +++ b/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesProtectedMembers3.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: TS normalizes types // @target: ES5 var x: { foo: string; } diff --git a/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts b/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts index 99925431cebed..eebed0cd5c6a5 100644 --- a/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts +++ b/tests/cases/conformance/classes/members/inheritanceAndOverriding/derivedClassOverridesPublicMembers.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: TS normalizes types var x: { foo: string; } var y: { foo: string; bar: string; } diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts index 0dc092393bb60..71096e7b8f313 100644 --- a/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflicts.ts @@ -1,6 +1,5 @@ // @target: es5 // @useDefineForClassFields: true,false -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC const FunctionPropertyNames = { name: 'name', diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty1.ts b/tests/cases/conformance/es6/Symbols/symbolProperty1.ts index b8c11d1eaed4f..0e008511be3fe 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty1.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty1.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var s: symbol; var x = { [s]: 0, diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty2.ts b/tests/cases/conformance/es6/Symbols/symbolProperty2.ts index e9cb71d98139a..44a2ba1387464 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty2.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty2.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var s = Symbol(); var x = { [s]: 0, diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty3.ts b/tests/cases/conformance/es6/Symbols/symbolProperty3.ts index 5b4a1586269e0..027e93a86adfb 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty3.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty3.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var s = Symbol; var x = { [s]: 0, diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty52.ts b/tests/cases/conformance/es6/Symbols/symbolProperty52.ts index 30bfb844b22cb..b14838a6914b4 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty52.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty52.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var obj = { [Symbol.nonsense]: 0 }; diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty53.ts b/tests/cases/conformance/es6/Symbols/symbolProperty53.ts index bd03fd5fb3eb2..c58b6e885afcc 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty53.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty53.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var obj = { [Symbol.for]: 0 }; diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty54.ts b/tests/cases/conformance/es6/Symbols/symbolProperty54.ts index 6853d64020344..b3eab2a54a154 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty54.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty54.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var obj = { [Symbol.prototype]: 0 }; \ No newline at end of file diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty58.ts b/tests/cases/conformance/es6/Symbols/symbolProperty58.ts index f4d18e76e2443..48cc6eb90f32c 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty58.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty58.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface SymbolConstructor { foo: string; } diff --git a/tests/cases/conformance/es6/Symbols/symbolProperty59.ts b/tests/cases/conformance/es6/Symbols/symbolProperty59.ts index a63831a80232e..bdea9dab62c28 100644 --- a/tests/cases/conformance/es6/Symbols/symbolProperty59.ts +++ b/tests/cases/conformance/es6/Symbols/symbolProperty59.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface I { [Symbol.keyFor]: string; } \ No newline at end of file diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts index 8746d4950a6e0..59a8e9d34200d 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES5.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es5 var s: string; var n: number; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts index d90af9f003620..0ab74d788c832 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames10_ES6.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es6 var s: string; var n: number; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES5.ts index 693cb7ef13d39..33288184b16d6 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES5.ts @@ -1,5 +1,4 @@ // @target: es5 -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var s: string; var n: number; var a: any; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES6.ts index 68457f8f8ade9..d41c56fe953ed 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames11_ES6.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es6 var s: string; var n: number; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts index d7cb1544e2d26..365ca67c1a39b 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts @@ -1,5 +1,4 @@ // @target: es5 -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var s: string; var n: number; var a: any; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts index 91286f90d9d8b..e046899d3310d 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts @@ -1,5 +1,4 @@ // @target: es6 -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var s: string; var n: number; var a: any; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES5.ts index 7e0f5379b38db..fb44bfb41452a 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES5.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es5 var s: string; var n: number; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES6.ts index fc91cb9d237c9..de40dc4e774ea 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames13_ES6.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es6 var s: string; var n: number; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES5.ts index 07d5febbdd480..8f78f279eba2f 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES5.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es5 var b: boolean; class C { diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES6.ts index 6ba3016e523e6..d90f2d7f9767d 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames14_ES6.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es6 var b: boolean; class C { diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts index a961b1e83af65..2baa39cf61ae7 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES5.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es5 var p1: number | string; var p2: number | number[]; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES6.ts index 2a271f40534b1..60b62d2903496 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames15_ES6.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es6 var p1: number | string; var p2: number | number[]; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES5.ts index 826700ed18f30..01204a1e61949 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES5.ts @@ -1,5 +1,4 @@ // @target: es5 -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var s: string; var n: number; var a: any; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES6.ts index b6b4c6b39cd24..c42e6e97177e5 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames16_ES6.ts @@ -1,5 +1,4 @@ // @target: es6 -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var s: string; var n: number; var a: any; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES5.ts index 9aeb797ffd135..e52067cc7f42e 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES5.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es5 var b: boolean; class C { diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts index ae8268a23f8fb..d795b527d064d 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames17_ES6.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es6 var b: boolean; class C { diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES5.ts index c8400f36d86d5..7c2517cd5145a 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES5.ts @@ -1,5 +1,4 @@ // @target: es5 -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var methodName = "method"; var accessorName = "accessor"; class C { diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES6.ts index d8885d788593a..c63ec81d4e64c 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames2_ES6.ts @@ -1,5 +1,4 @@ // @target: es6 -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var methodName = "method"; var accessorName = "accessor"; class C { diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES5.ts index 10faebdb41e75..17089b7244f66 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES5.ts @@ -1,5 +1,4 @@ // @target: es5 -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var s: string; var n: number; var a: any; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES6.ts index 67bfc47d38aab..a6d4e17c44a6b 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames4_ES6.ts @@ -1,5 +1,4 @@ // @target: es6 -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var s: string; var n: number; var a: any; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES5.ts index 7811a783d358c..e9d7d6ffab497 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES5.ts @@ -1,5 +1,4 @@ // @target: es5 -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var b: boolean; var v = { [b]: 0, diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES6.ts index 9b348ce58d777..590f819c4e4cc 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames5_ES6.ts @@ -1,5 +1,4 @@ // @target: es6 -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var b: boolean; var v = { [b]: 0, diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES5.ts index 48edc0d6fcf02..0521873d70ca0 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES5.ts @@ -1,5 +1,4 @@ // @target: es5 -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var p1: number | string; var p2: number | number[]; var p3: string | boolean; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES6.ts index 5456d747c63c3..b21b76b03f2cf 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames6_ES6.ts @@ -1,5 +1,4 @@ // @target: es6 -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var p1: number | string; var p2: number | number[]; var p3: string | boolean; diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES5.ts index b3ce0bed7e573..e3b379602b93e 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES5.ts @@ -1,5 +1,4 @@ // @target: es5 -// @isolatedDeclarationDiffReason: Computed property are not resolved enum E { member } diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES6.ts index 87ce8b403c68c..5063d1e2d0c64 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNames7_ES6.ts @@ -1,5 +1,4 @@ // @target: es6 -// @isolatedDeclarationDiffReason: Computed property are not resolved enum E { member } diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts index 19ee4452d7c68..a025a074e3129 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts @@ -1,5 +1,4 @@ // @target: es5 -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var methodName = "method"; var accessorName = "accessor"; class C { diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts index 0760d3277200e..4d6fe09b80a00 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts @@ -1,5 +1,4 @@ // @target: es6 -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var methodName = "method"; var accessorName = "accessor"; class C { diff --git a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts index 6b3d565e41643..7eccd615bc4c3 100644 --- a/tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts +++ b/tests/cases/conformance/es6/computedProperties/computedPropertyNamesWithStaticProperty.ts @@ -1,5 +1,4 @@ // @target: es6 -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { class C1 { static staticProp = 10; diff --git a/tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts b/tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts index 2676ee9baa3c6..4b65f204babb1 100644 --- a/tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts +++ b/tests/cases/conformance/es6/functionDeclarations/FunctionDeclaration8_es6.ts @@ -1,3 +1 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v = { [yield]: foo } \ No newline at end of file diff --git a/tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts b/tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts index bf95ce89ff9ad..4872449161067 100644 --- a/tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts +++ b/tests/cases/conformance/es6/memberFunctionDeclarations/MemberFunctionDeclaration3_es6.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC // @target: es6 class C { *[foo]() { } diff --git a/tests/cases/conformance/expressions/asOperator/asOperator1.ts b/tests/cases/conformance/expressions/asOperator/asOperator1.ts index 4a3888eda8392..cf953d75ab46e 100644 --- a/tests/cases/conformance/expressions/asOperator/asOperator1.ts +++ b/tests/cases/conformance/expressions/asOperator/asOperator1.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: TS changes the order of union constituents var as = 43; var x = undefined as number; var y = (null as string).length; diff --git a/tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts b/tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts index 7316c2eaadc4e..d6bfd84fd9a8c 100644 --- a/tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts +++ b/tests/cases/conformance/expressions/contextualTyping/generatedContextualTyping.ts @@ -1,5 +1,4 @@ // @allowUnreachableCode: true -// @isolatedDeclarationDiffReason: TS normalizes types class Base { private p; } class Derived1 extends Base { private m; } diff --git a/tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts b/tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts index 1f51edac0b6e9..af0622179ac7f 100644 --- a/tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts +++ b/tests/cases/conformance/expressions/objectLiterals/objectLiteralGettersAndSetters.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: TS merges accessors with the same type. DTE can only merge if one type is specified. // Get and set accessor with the same name var sameName1a = { get 'a'() { return ''; }, set a(n) { var p = n; var p: string; } }; var sameName2a = { get 0.0() { return ''; }, set 0(n) { var p = n; var p: string; } }; diff --git a/tests/cases/conformance/expressions/optionalChaining/optionalChainingInference.ts b/tests/cases/conformance/expressions/optionalChaining/optionalChainingInference.ts index 762d896268866..1b321913a1682 100644 --- a/tests/cases/conformance/expressions/optionalChaining/optionalChainingInference.ts +++ b/tests/cases/conformance/expressions/optionalChaining/optionalChainingInference.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: TS normalizes types // https://github.com/microsoft/TypeScript/issues/34579 declare function unbox(box: { value: T | undefined }): T; declare const su: string | undefined; diff --git a/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess1.ts b/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess1.ts index ee95cee9d15a8..160a76f5c6108 100644 --- a/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess1.ts +++ b/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess1.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 var symbol = Symbol.for('myThing'); diff --git a/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess3.ts b/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess3.ts index 8656fedbea08b..2fbbbdc63e60a 100644 --- a/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess3.ts +++ b/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess3.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 var symbol = Symbol.for('myThing'); diff --git a/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess4.ts b/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess4.ts index c87b7cbe90e95..095fcc1dbb7ed 100644 --- a/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess4.ts +++ b/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess4.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 var symbol = Symbol.for('myThing'); diff --git a/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess5.ts b/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess5.ts index 79e9ec37c6a3c..3c1a376eab6d3 100644 --- a/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess5.ts +++ b/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess5.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 var symbol: any; diff --git a/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess6.ts b/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess6.ts index 19451904a92dd..3850821e9f3de 100644 --- a/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess6.ts +++ b/tests/cases/conformance/expressions/superPropertyAccess/superSymbolIndexedAccess6.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 var symbol: any; diff --git a/tests/cases/conformance/internalModules/moduleDeclarations/reExportAliasMakesInstantiated.ts b/tests/cases/conformance/internalModules/moduleDeclarations/reExportAliasMakesInstantiated.ts index 2b6596c1f8503..8d62691b2bc86 100644 --- a/tests/cases/conformance/internalModules/moduleDeclarations/reExportAliasMakesInstantiated.ts +++ b/tests/cases/conformance/internalModules/moduleDeclarations/reExportAliasMakesInstantiated.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: GH#55571 declare module pack1 { const test1: string; export { test1 }; diff --git a/tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts b/tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts index 96c6b33b14c87..ca8c373363ace 100644 --- a/tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts +++ b/tests/cases/conformance/node/nodeModulesDeclarationEmitDynamicImportWithPackageExports.ts @@ -1,7 +1,6 @@ // @module: nodenext // @declaration: true // @isolatedDeclarations: false -// @isolatedDeclarationFixedDiffReason: Skipped due to GH:56394 // @filename: index.ts // esm format file export {}; diff --git a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts index 3a1ff1b3e16c5..8316cdfbc0e3e 100644 --- a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts +++ b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts @@ -1,5 +1,4 @@ //@target: ES5 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC declare class C { [e]: number } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts index b4fb51875563b..777c44e01852a 100644 --- a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts +++ b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts @@ -1,5 +1,4 @@ //@target: ES5 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { [e] = 1 } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts index be39e9a454fae..b5e27ecc71b38 100644 --- a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts +++ b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 class C { [e](); diff --git a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts index 0a02a9bb2e8a8..2f37b0f2cadec 100644 --- a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts +++ b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName2.ts @@ -1,3 +1,2 @@ //@target: ES5 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v = { [e]: 1 }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts index 0faa43fef992e..5091ee0b98cb3 100644 --- a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts +++ b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName3.ts @@ -1,3 +1,2 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 var v = { [e]() { } }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts index b2e78d51c95b3..67b97a6a0bb5e 100644 --- a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts +++ b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName4.ts @@ -1,3 +1,2 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 var v = { get [e]() { } }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts index 544800b9f41df..0507207141078 100644 --- a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts +++ b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts @@ -1,5 +1,4 @@ //@target: ES5 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface I { [e]: number } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts index 44474c6ab3346..280dc1a5a0ddd 100644 --- a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts +++ b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 class C { [e] diff --git a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts index 43016f76e7926..48abbd6fe9523 100644 --- a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts +++ b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts @@ -1,3 +1,2 @@ //@target: ES5 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v: { [e]: number }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts index 9879d507b4556..de00d6f82455a 100644 --- a/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts +++ b/tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts @@ -1,5 +1,4 @@ //@target: ES5 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { [e]: Type } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts b/tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts index 272e8e8944e33..f060c9cf7f489 100644 --- a/tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts +++ b/tests/cases/conformance/parser/ecmascript5/Generics/parserCastVersusArrowFunction1.ts @@ -1,5 +1,4 @@ // @isolatedDeclarations: false -// @isolatedDeclarationDiffReason: Syntactically invalid. var v = () => 1; var v = a; diff --git a/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts b/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts index 65654dbbe7d5f..1c78f24a213b3 100644 --- a/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts +++ b/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts @@ -1,4 +1,3 @@ -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface I { [p]; // Used to be indexer, now it is a computed property [p1: string]; diff --git a/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts b/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts index 77100fd872c18..e77c8fe9bb08d 100644 --- a/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts +++ b/tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface I { [a] // Used to be indexer, now it is a computed property } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts b/tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts index 4f74b2cee5218..7bfe896e7c4d0 100644 --- a/tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts +++ b/tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode8.ts @@ -1,5 +1,4 @@ // @skipDefaultLibCheck: false -// @isolatedDeclarationDiffReason: Symbol merges with global eval and is not written to declarations. "use strict"; function eval() { } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty1.ts b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty1.ts index 337714a37ea95..64ca01bba6c80 100644 --- a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty1.ts +++ b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty1.ts @@ -1,5 +1,4 @@ //@target: ES5 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface I { [Symbol.iterator]: string; } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty2.ts b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty2.ts index 145aa1047b9be..cc606c2e6a3d5 100644 --- a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty2.ts +++ b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty2.ts @@ -1,5 +1,4 @@ //@target: ES5 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface I { [Symbol.unscopables](): string; } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty3.ts b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty3.ts index 978683bbe9f58..978d4ef95f018 100644 --- a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty3.ts +++ b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty3.ts @@ -1,5 +1,4 @@ //@target: ES5 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC declare class C { [Symbol.unscopables](): string; } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts index 6b50a6758b249..7f16672ebd254 100644 --- a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts +++ b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts @@ -1,5 +1,4 @@ //@target: ES5 -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC declare class C { [Symbol.isRegExp]: string; } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty5.ts b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty5.ts index ef4197a94222d..fb7f00d769420 100644 --- a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty5.ts +++ b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty5.ts @@ -1,5 +1,4 @@ //@target: ES5 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { [Symbol.isRegExp]: string; } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty6.ts b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty6.ts index 35b86c3ee2f0e..3fc8e6f897977 100644 --- a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty6.ts +++ b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty6.ts @@ -1,5 +1,4 @@ //@target: ES5 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { [Symbol.toStringTag]: string = ""; } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty7.ts b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty7.ts index d216ba95f86cf..a27636388c074 100644 --- a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty7.ts +++ b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty7.ts @@ -1,5 +1,4 @@ //@target: ES5 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { [Symbol.toStringTag](): void { } } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts index 5f1167de7fe75..78e5738f7da8e 100644 --- a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts +++ b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts @@ -1,5 +1,4 @@ //@target: ES5 -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var x: { [Symbol.toPrimitive](): string } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty9.ts b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty9.ts index dc6f8b364d92d..7838df4d8fcbf 100644 --- a/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty9.ts +++ b/tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty9.ts @@ -1,5 +1,4 @@ //@target: ES5 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var x: { [Symbol.toPrimitive]: string } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName1.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName1.ts index 47e13ca871f13..e6fbccb8e1f66 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName1.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName1.ts @@ -1,3 +1,2 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v = { [e] }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts index 49c3f97e11880..6f87e04e3f569 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { [e] = 1 } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts index 74bd87980a1a0..17af42fcca36a 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 class C { [e](); diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts index 239f36daca18e..b9b870a9ec930 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName12.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 class C { [e]() { } diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts index c9658123ffb53..809e258d2d484 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts @@ -1,3 +1,2 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v: { [e]: number }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts index c480df02cf280..3d9fb800d70f5 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts @@ -1,3 +1,2 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v: { [e](): number }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts index 6fa26e939512f..ba0a7b84b904b 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts @@ -1,3 +1,2 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v: { [e: number]: string; [e]: number }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts index 292128fee03de..6e6485ea85f31 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName17.ts @@ -1,3 +1,2 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 var v = { set [e](v) { } } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts index a09e98727b0ad..dd05fcac48287 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts @@ -1,3 +1,2 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v: { [e]?(): number }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts index 460c485a8ccc4..f190dadb92c9e 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts @@ -1,3 +1,2 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v: { [e]? }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts index cd0005248ab76..4efacefce9b8f 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName2.ts @@ -1,3 +1,2 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v = { [e]: 1 }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts index b105256dc8f59..148f07becc15b 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface I { [e](): number } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts index 0fc2f118c282a..f9ec2669ae389 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC interface I { [e]: number } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts index c4e40438a9d87..237a4f4e12ccf 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC declare class C { [e]: number } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts index 161a0d4b51658..633931ad3689f 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName23.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC declare class C { get [e](): number } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts index 0acb66a337990..8ff0f753e1fa5 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName24.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { set [e](v) { } } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts index c8c4515865052..3bf29e66baeb0 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { // No ASI [e] = 0 diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts index 8f917c77bf202..d52b7d43cfc94 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName27.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { // No ASI [e]: number = 0 diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts index a4bc0459ec9ee..2cae79f193465 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { [e]: number = 0; [e2]: number diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts index 7961dc3493836..c3e42731ab99f 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { // yes ASI [e] = id++ diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts index 3a1b3a8de5567..0988e19a1ef02 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName3.ts @@ -1,3 +1,2 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 var v = { [e]() { } }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts index 4f12dca90ee1d..30e511fa91b85 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { // yes ASI [e]: number diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts index 76d4c26e15317..f1a50fe108d67 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC declare class C { [e](): number } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts index 472621d53b6ee..2ca7ac84af70d 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName33.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { // No ASI [e] = 0 diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts index 900e20cc9865a..62f5e3404533a 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { [public ]: string; } \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts index 1eac443f2ef57..3af8e29c66670 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName37.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v = { [public]: 0 }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts index d1bda6cf47f0e..21d13e569ddb2 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName38.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 class C { [public]() { } diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts index 2ab65bba6a823..af56d4d23fe41 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName39.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 "use strict"; class C { diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts index 1d3a0beb6f3e1..e36773105fe7b 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName4.ts @@ -1,3 +1,2 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 var v = { get [e]() { } }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName5.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName5.ts index 533c30327f529..869f340929b82 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName5.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName5.ts @@ -1,3 +1,2 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 var v = { public get [e]() { } }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts index f04772c9b62e8..aaf4131d1580f 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName6.ts @@ -1,3 +1,2 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC var v = { [e]: 1, [e + e]: 2 }; \ No newline at end of file diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts index e6a5f6b46c3bd..8f918c6116049 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 class C { [e] diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts index 8e9fd09e9ab77..6e55c04b7a17c 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES6 class C { public [e] diff --git a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts index a9fe9f135e51e..0c60d35fb909a 100644 --- a/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts +++ b/tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts @@ -1,5 +1,4 @@ //@target: ES6 -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC class C { [e]: Type } \ No newline at end of file diff --git a/tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts b/tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts index 91a5401f8a0ad..a07324f834892 100644 --- a/tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts +++ b/tests/cases/conformance/pedantic/noUncheckedIndexedAccess.ts @@ -1,6 +1,5 @@ // @strict: true // @noUncheckedIndexedAccess: true -// @isolatedDeclarationDiffReason: TS normalizes types type CheckBooleanOnly = any; // Validate CheckBooleanOnly works - should error diff --git a/tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts b/tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts index f58616ff48eb0..498aa151e7306 100644 --- a/tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts +++ b/tests/cases/conformance/salsa/typeFromPropertyAssignment32.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Property is defined in another file. DTE can't detect this but TSC has another error for this already // @Filename: expando.ts function ExpandoMerge(n: number) { return n; diff --git a/tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts b/tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts index d3e95d9a9b2c6..d98f689329dd3 100644 --- a/tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts +++ b/tests/cases/conformance/salsa/typeFromPropertyAssignment33.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Property is defined in another file. DTE can't detect this but TSC has another error for this already // @Filename: ns.ts namespace ExpandoMerge { export var p3 = 333; diff --git a/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts b/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts index ac1091044d404..b832d57855ed2 100644 --- a/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts +++ b/tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC //@target: ES5 // In ES3/5, you cannot for...of over an arbitrary iterable. diff --git a/tests/cases/conformance/types/literal/literalTypesAndTypeAssertions.ts b/tests/cases/conformance/types/literal/literalTypesAndTypeAssertions.ts index 692ca1f1ed14e..5c11dd91035e8 100644 --- a/tests/cases/conformance/types/literal/literalTypesAndTypeAssertions.ts +++ b/tests/cases/conformance/types/literal/literalTypesAndTypeAssertions.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: TS normalizes types const obj = { a: "foo" as "foo", b: <"foo">"foo", diff --git a/tests/cases/conformance/types/literal/stringLiteralsWithTypeAssertions01.ts b/tests/cases/conformance/types/literal/stringLiteralsWithTypeAssertions01.ts index e590e0570f332..2e3542704129d 100644 --- a/tests/cases/conformance/types/literal/stringLiteralsWithTypeAssertions01.ts +++ b/tests/cases/conformance/types/literal/stringLiteralsWithTypeAssertions01.ts @@ -1,5 +1,4 @@ -// @isolatedDeclarationDiffReason: TS normalizes types -let fooOrBar: "foo" | "bar"; +let fooOrBar: "foo" | "bar"; let a = "foo" as "bar"; let b = "bar" as "foo"; diff --git a/tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts b/tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts index d1e3ce2b798f4..b39d9dd53a8fd 100644 --- a/tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts +++ b/tests/cases/conformance/types/specifyingTypes/typeQueries/recursiveTypesWithTypeof.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: TS normalizes types // The following are errors because of circular references var c: typeof c; var c: any; diff --git a/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts b/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts index aedab63711a19..86f6df5cdfe3d 100644 --- a/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts +++ b/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: TS resolves types // it is an error to use a generic type without type arguments // all of these are errors diff --git a/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts b/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts index 2a7d99d9fde0c..7f062766cb3b5 100644 --- a/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts +++ b/tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: TS resolves types // it is an error to use a generic type without type arguments // all of these are errors diff --git a/tests/cases/conformance/types/thisType/thisTypeErrors.ts b/tests/cases/conformance/types/thisType/thisTypeErrors.ts index b1b99832b8dd5..a7e4a46493d05 100644 --- a/tests/cases/conformance/types/thisType/thisTypeErrors.ts +++ b/tests/cases/conformance/types/thisType/thisTypeErrors.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: TS resolves invalid types to any var x1: this; var x2: { a: this }; var x3: this[]; diff --git a/tests/cases/conformance/types/thisType/thisTypeInAccessors.ts b/tests/cases/conformance/types/thisType/thisTypeInAccessors.ts index aa4d5c0509f75..b09037597671e 100644 --- a/tests/cases/conformance/types/thisType/thisTypeInAccessors.ts +++ b/tests/cases/conformance/types/thisType/thisTypeInAccessors.ts @@ -1,7 +1,6 @@ // @noImplicitAny: true // @noImplicitThis: true // @target: es5 -// @isolatedDeclarationDiffReason: TS merges accessors with the same type. DTE can only merge if one type is specified. interface Foo { n: number; x: number; diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts b/tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts index d708a389ba03d..30c6579dabb07 100644 --- a/tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts +++ b/tests/cases/conformance/types/typeRelationships/typeInference/contextualSignatureInstantiation.ts @@ -1,4 +1,3 @@ -// @isolatedDeclarationDiffReason: TS changes the order of union constituents // TypeScript Spec, section 4.12.2: // If e is an expression of a function type that contains exactly one generic call signature and no other members, // and T is a function type with exactly one non - generic call signature and no other members, then any inferences From 373aaf44140eaa31485653a655201a2293c755e9 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 17 Jan 2024 13:07:52 +0000 Subject: [PATCH 218/224] Made test names more consistent. Signed-off-by: Titian Cernicova-Dragomir --- src/testRunner/compilerRunner.ts | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index c2a01ad0c6b0a..3e776ec8e171e 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -127,8 +127,8 @@ export class CompilerBaselineRunner extends RunnerBase { }); it(`Correct dte emit for ${fileName}`, () => isolatedTest?.verifyDteOutput()); it(`Correct tsc emit for ${fileName}`, () => isolatedTest?.verifyTscOutput()); - it(`Correct dte/tsc diff ${fileName}`, () => isolatedTest?.verifyDiff()); - it(`Correct diff reason ${fileName}`, () => isolatedTest?.verifyDiffReason()); + it(`Correct dte/tsc diff for ${fileName}`, () => isolatedTest?.verifyDiff()); + it(`Correct diff reason for ${fileName}`, () => isolatedTest?.verifyDiffReason()); after(() => { isolatedTest = undefined!; @@ -142,18 +142,17 @@ export class CompilerBaselineRunner extends RunnerBase { if (fixedIsolatedTestEnv) { fixedIsolatedTest = new FixedIsolatedDeclarationTest(fixedIsolatedTestEnv); } - else if(!environment.compilerOptions.isolatedDeclarationDiffReason) { - // Don't skip if they have a reason we need to fail if unused reasons exist + else { this.skip(); } }); - it(`Correct dte emit for ${fileName}`, () => fixedIsolatedTest?.verifyDteOutput()); - it(`Correct tsc emit for ${fileName}`, () => fixedIsolatedTest?.verifyTscOutput()); - it(`Correct dte/tsc diff ${fileName}`, () => fixedIsolatedTest?.verifyDiff()); - it(`Correct dte map emit for ${fileName}`, () => fixedIsolatedTest?.verifyDteMapOutput()); - it(`Correct tsc map emit for ${fileName}`, () => fixedIsolatedTest?.verifyTscMapOutput()); - it(`Correct dte/tsc map diff ${fileName}`, () => fixedIsolatedTest?.verifyMapDiff()); - it(`Correct diff reason ${fileName}`, () => fixedIsolatedTest?.verifyDiffReason()); + 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!; From 163e4badd56ead13266f705752a7c7c90d743e60 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 17 Jan 2024 13:51:05 +0000 Subject: [PATCH 219/224] Changed command line option flags for isolated declarations. --- src/compiler/commandLineParser.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index a5bad12c01828..77cfc5dc6caa8 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -821,8 +821,9 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [ type: "boolean", category: Diagnostics.Interop_Constraints, description: Diagnostics.Ensure_that_each_file_can_have_declaration_emit_generated_without_type_information, - transpileOptionValue: true, defaultValueDescription: false, + affectsBuildInfo: true, + affectsEmit: true, }, // Strict Type Checks From e7ad116cd40c35b292206140fd2a211e17f0c807 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 17 Jan 2024 15:07:49 +0000 Subject: [PATCH 220/224] Fixed formatting. Signed-off-by: Titian Cernicova-Dragomir --- src/testRunner/compilerRunner.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts index 3e776ec8e171e..96236d2dfb9d8 100644 --- a/src/testRunner/compilerRunner.ts +++ b/src/testRunner/compilerRunner.ts @@ -488,7 +488,7 @@ class IsolatedDeclarationTest extends CompilerTestBase { // 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)) { + if (options.isolatedDeclarations === false || options.noEmit || options.noTypesAndSymbols || !options.declaration) { return undefined; } } @@ -665,7 +665,8 @@ class IsolatedDeclarationTest extends CompilerTestBase { 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 { + } + else { ts.Debug.assert(this.diffReason !== undefined, "Should have a reason if everything is not equivalent"); } } @@ -706,7 +707,7 @@ class IsolatedDeclarationTest extends CompilerTestBase { class FixedIsolatedDeclarationTest extends IsolatedDeclarationTest { static fixTestProject(compilerEnvironment: CompilerTestEnvironment, shouldNotExclude = !!compilerEnvironment.testCaseContent.settings.isolatedDeclarationFixedDiffReason): CompilerTestEnvironment | undefined { - if(!shouldNotExclude) { + if (!shouldNotExclude) { // Exclude test that disable types and symbols (good proxy for very complex test) if (compilerEnvironment.compilerOptions.noTypesAndSymbols) { return undefined; From 418f97537438ccafa336842ed5d7ada703a1578b Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Wed, 17 Jan 2024 22:26:34 +0000 Subject: [PATCH 221/224] Addressed small review issues. --- .../transformers/declarations/emitBinder.ts | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/compiler/transformers/declarations/emitBinder.ts b/src/compiler/transformers/declarations/emitBinder.ts index cb97460789fbd..08153e76f2f4a 100644 --- a/src/compiler/transformers/declarations/emitBinder.ts +++ b/src/compiler/transformers/declarations/emitBinder.ts @@ -180,7 +180,7 @@ const knownFunctionMembers = new Set([ export function bindSourceFileForDeclarationEmit(file: SourceFile) { const nodeLinks: EmitDeclarationNodeLinks[] = []; function tryGetNodeLinks(node: Node): EmitDeclarationNodeLinks | undefined { - const id = (node as any).id; + const id = node.id; if (!id) return undefined; return nodeLinks[id]; } @@ -274,7 +274,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { /* eslint-disable no-var */ var currentScope: Node = undefined!; var currentFunctionLocalSymbolTable: EmitDeclarationSymbolTable = undefined!; - var currentSymbol: EmitDeclarationSymbol = undefined!; + var currentParent: EmitDeclarationSymbol = undefined!; var currentLocalSymbolTable: EmitDeclarationSymbolTable = undefined!; var currentExportsSymbolTable: EmitDeclarationSymbolTable | undefined; var postBindingAction: (() => void)[] = []; @@ -296,7 +296,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { } function createEmitSymbol(): EmitDeclarationSymbol { return { - parent: currentSymbol, + parent: currentParent, declarations: [], flags: 0, }; @@ -353,24 +353,24 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { return symbol; } function withScope(scope: Node, exports: EmitDeclarationSymbolTable | undefined, fn: () => void) { - const old = [currentScope, currentSymbol, currentFunctionLocalSymbolTable, currentLocalSymbolTable, currentExportsSymbolTable] as const; + const old = [currentScope, currentParent, currentFunctionLocalSymbolTable, currentLocalSymbolTable, currentExportsSymbolTable] as const; currentScope = scope; const links = getNodeLinks(scope); currentLocalSymbolTable = links.locals ??= new Map(); - currentSymbol = links.symbol ?? currentSymbol; + currentParent = links.symbol ?? currentParent; currentExportsSymbolTable = exports; if (isBlockScopedContainerTopLevel(scope)) { currentFunctionLocalSymbolTable = currentLocalSymbolTable; } fn(); - [currentScope, currentSymbol, currentFunctionLocalSymbolTable, currentLocalSymbolTable, currentExportsSymbolTable] = old; + [currentScope, currentParent, currentFunctionLocalSymbolTable, currentLocalSymbolTable, currentExportsSymbolTable] = old; } - function withMembers(symbol: EmitDeclarationSymbol, table: "members" | "exports" = "members", fn: () => void) { - const old = [currentLocalSymbolTable, currentSymbol] as const; - currentSymbol = symbol; - currentLocalSymbolTable = symbol[table] ??= new Map(); + function withMembers(symbol: EmitDeclarationSymbol, addToExports = false, fn: () => void) { + const old = [currentLocalSymbolTable, currentParent] as const; + currentParent = symbol; + currentLocalSymbolTable = addToExports ? symbol.exports ??= new Map() : symbol.members ??= new Map(); fn(); - [currentLocalSymbolTable, currentSymbol] = old; + [currentLocalSymbolTable, currentParent] = old; } interface LocalAndExportName { @@ -492,7 +492,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { function bindObjectLiteral(object: ObjectLiteralExpression) { const objectSymbol = createAnonymousEmitSymbol(object); - withMembers(objectSymbol, "members", () => { + withMembers(objectSymbol, /*addToExports*/ false, () => { object.properties.forEach(m => { bindNode(m); }); @@ -687,7 +687,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { } function bindTypeLiteralNode(node: TypeLiteralNode) { const objectSymbol = createAnonymousEmitSymbol(node); - withMembers(objectSymbol, "members", () => { + withMembers(objectSymbol, /*addToExports*/ false, () => { node.members.forEach(bindNode); }); } @@ -727,14 +727,14 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { }); }); } - elements.forEach(e => { + for (const e of elements) { postBindingAction.push(() => { const resolvedSymbol = resolveName(e, (e.propertyName ?? e.name).escapedText, ~0); if (resolvedSymbol) { resolvedSymbol.declarations.forEach(d => getNodeLinks(d).isVisible = true); } }); - }); + } } } function bindEnumDeclaration(node: EnumDeclaration) { @@ -777,7 +777,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { withScope(interfaceDeclaration, /*exports*/ undefined, () => { bindTypeParameters(interfaceDeclaration.typeParameters); }); - withMembers(interfaceSymbol, "members", () => { + withMembers(interfaceSymbol, /*addToExports*/ false, () => { interfaceDeclaration.members.forEach(m => { bindNode(m); }); @@ -790,7 +790,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { withScope(classDeclaration, /*exports*/ undefined, () => { bindTypeParameters(classDeclaration.typeParameters); }); - withMembers(classSymbol, "members", () => { + withMembers(classSymbol, /*addToExports*/ false, () => { classDeclaration.members.forEach(m => { if (hasSyntacticModifier(m, ModifierFlags.Static)) return; if (m.kind === SyntaxKind.SemicolonClassElement || m.kind === SyntaxKind.ClassStaticBlockDeclaration) return; @@ -798,7 +798,7 @@ export function bindSourceFileForDeclarationEmit(file: SourceFile) { bindNode(m); }); }); - withMembers(classSymbol, "exports", () => { + withMembers(classSymbol, /*addToExports*/ true, () => { classDeclaration.members.forEach(m => { if (!hasSyntacticModifier(m, ModifierFlags.Static)) return; if ( From 3188a824c1781d6f9c2c61f703109da8ed0cf26f Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Thu, 18 Jan 2024 18:45:50 +0000 Subject: [PATCH 222/224] Remove binder from transpileDeclaration implementation. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/_namespaces/ts.ts | 1 - src/compiler/checker.ts | 64 +- src/compiler/debug.ts | 9 - .../transformers/declarations/emitBinder.ts | 914 ------------------ .../transformers/declarations/emitResolver.ts | 204 +++- .../declarations/localInferenceResolver.ts | 6 +- .../declarations/transpileDeclaration.ts | 2 +- src/compiler/utilities.ts | 77 +- src/harness/harnessIO.ts | 38 +- 9 files changed, 277 insertions(+), 1038 deletions(-) delete mode 100644 src/compiler/transformers/declarations/emitBinder.ts diff --git a/src/compiler/_namespaces/ts.ts b/src/compiler/_namespaces/ts.ts index 20fa80074efca..4026133359586 100644 --- a/src/compiler/_namespaces/ts.ts +++ b/src/compiler/_namespaces/ts.ts @@ -57,7 +57,6 @@ export * from "../transformers/module/system"; export * from "../transformers/module/esnextAnd2015"; export * from "../transformers/module/node"; export * from "../transformers/declarations/diagnostics"; -export * from "../transformers/declarations/emitBinder"; export * from "../transformers/declarations/emitResolver"; export * from "../transformers/declarations/transpileDeclaration"; export * from "../transformers/declarations/localInferenceResolver"; diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index aa13fd95c7636..4f9301cf5f64d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -241,7 +241,6 @@ import { getAllJSDocTags, getAllowSyntheticDefaultImports, getAncestor, - getAnyImportSyntax, getAssignedExpandoInitializer, getAssignmentDeclarationKind, getAssignmentDeclarationPropertyAccessKind, @@ -329,6 +328,7 @@ import { getModeForUsageLocation, getModifiers, getModuleInstanceState, + getModuleSpecifierForImportOrExport, getNameFromImportAttribute, getNameFromIndexInfo, getNameOfDeclaration, @@ -1477,7 +1477,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : ObjectFlags.FreshLiteral; var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes; - var { hasVisibleDeclarations, isEntityNameVisible } = createEntityVisibilityChecker({ + var { hasVisibleDeclarations, isEntityNameVisible, collectLinkedAliases } = createEntityVisibilityChecker({ defaultSymbolAccessibility: SymbolAccessibility.NotAccessible, isThisAccessible, isDeclarationVisible, @@ -1485,6 +1485,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { getNodeLinks(declaration).isVisible = true; }, resolveName, + getTargetOfExportSpecifier, }); var checkBinaryExpression = createCheckBinaryExpression(); var emitResolver = createResolver(); @@ -4168,23 +4169,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( @@ -10367,48 +10351,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { 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); - } - } - } - }); - } - } /** * Push an entry on the type resolution stack. If an entry with the given target and the given property name diff --git a/src/compiler/debug.ts b/src/compiler/debug.ts index aca37cbe325b1..8912ffee391f1 100644 --- a/src/compiler/debug.ts +++ b/src/compiler/debug.ts @@ -356,15 +356,6 @@ export namespace Debug { } } - /** - * Asserts the symbol is defined and is of the right kind (originating in TSC or sample DTE depending o the test that is currently being run) - * The default implementation just asserts the symbol is not null - * In tests it is overridden to ensure we don't accidentally use TSC symbols in DTE - */ - // eslint-disable-next-line prefer-const - export let assertSymbolValid = (symbol: Symbol) => { - assert(symbol, "Symbol not defined"); - }; /** * Asserts a value has the specified type in typespace only (does not perform a runtime assertion). * This is useful in cases where we switch on `node.kind` and can be reasonably sure the type is accurate, and diff --git a/src/compiler/transformers/declarations/emitBinder.ts b/src/compiler/transformers/declarations/emitBinder.ts deleted file mode 100644 index 08153e76f2f4a..0000000000000 --- a/src/compiler/transformers/declarations/emitBinder.ts +++ /dev/null @@ -1,914 +0,0 @@ -import { - __String, - ArrayBindingElement, - ArrowFunction, - BindingPattern, - CallSignatureDeclaration, - ClassDeclaration, - ClassExpression, - ComputedPropertyName, - ConditionalTypeNode, - ConstructorDeclaration, - ConstructorTypeNode, - ConstructSignatureDeclaration, - Declaration, - EnumDeclaration, - ExportAssignment, - ExportDeclaration, - Expression, - factory, - findAncestor, - forEachChild, - FunctionDeclaration, - FunctionExpression, - FunctionTypeNode, - GetAccessorDeclaration, - getCombinedNodeFlags, - getModuleInstanceState, - getNodeId, - hasAmbientModifier, - hasSyntacticModifier, - ImportDeclaration, - ImportEqualsDeclaration, - InferTypeNode, - InterfaceDeclaration, - isArrayBindingPattern, - isBinaryExpression, - isBindingPattern, - isBlockOrCatchScoped, - isBlockScopedContainerTopLevel, - isComputedPropertyName, - isConditionalTypeNode, - isConstructorDeclaration, - isConstructSignatureDeclaration, - isDeclaration, - isElementAccessExpression, - isEnumConst, - isExpression, - isFunctionDeclaration, - isFunctionExpressionOrArrowFunction, - isIdentifier, - isJsxNamespacedName, - isModuleBlock, - isModuleDeclaration, - isNamedExports, - isNumericLiteral, - isObjectBindingPattern, - isPrefixUnaryExpression, - isPrivateIdentifier, - isPropertyAccessExpression, - isPropertyName, - isSourceFile, - isStringLiteralLike, - isVarConst, - isVariableDeclaration, - MappedTypeNode, - MethodDeclaration, - MethodSignature, - ModifierFlags, - ModuleDeclaration, - ModuleInstanceState, - NamedDeclaration, - Node, - NodeArray, - NodeFlags, - NoSubstitutionTemplateLiteral, - ObjectLiteralExpression, - ParameterDeclaration, - PropertyDeclaration, - PropertyName, - SetAccessorDeclaration, - setValueDeclaration, - SourceFile, - Symbol, - SymbolFlags, - SyntaxKind, - TypeAliasDeclaration, - TypeLiteralNode, - TypeParameterDeclaration, - VariableDeclaration, -} from "../../_namespaces/ts"; - -/** @internal */ -export interface EmitDeclarationNodeLinks { - isVisible?: boolean; - symbol?: EmitDeclarationSymbol; - localSymbol?: EmitDeclarationSymbol; - locals?: EmitDeclarationSymbolTable; - enumValue?: string | number | undefined; -} - -/** @internal */ -export type EmitDeclarationSymbolTable = Map; - -/** @internal */ -export interface EmitDeclarationSymbol { - name?: MemberKey; - parent?: EmitDeclarationSymbol; - exportSymbol?: EmitDeclarationSymbol; - declarations: Declaration[]; - valueDeclaration?: Declaration; - signatureDeclarations?: Node[]; - flags: SymbolFlags; - members?: EmitDeclarationSymbolTable; - exports?: EmitDeclarationSymbolTable; -} - -interface SymbolRegistrationFlags { - includes: SymbolFlags; - excludes: SymbolFlags; -} -const syntaxKindToSymbolMap = { - [SyntaxKind.TypeParameter]: { includes: SymbolFlags.TypeParameter, excludes: SymbolFlags.TypeParameterExcludes }, - [SyntaxKind.Parameter]: { includes: SymbolFlags.FunctionScopedVariable, excludes: SymbolFlags.ParameterExcludes }, - [SyntaxKind.VariableDeclaration]: { - fnScope: { includes: SymbolFlags.FunctionScopedVariable, excludes: SymbolFlags.FunctionScopedVariableExcludes }, - blockScope: { includes: SymbolFlags.BlockScopedVariable, excludes: SymbolFlags.BlockScopedVariableExcludes }, - }, - [SyntaxKind.BindingElement]: { includes: SymbolFlags.BlockScopedVariable, excludes: SymbolFlags.BlockScopedVariableExcludes }, - [SyntaxKind.PropertyDeclaration]: { includes: SymbolFlags.Property, excludes: SymbolFlags.PropertyExcludes }, - [SyntaxKind.PropertySignature]: { includes: SymbolFlags.Property, excludes: SymbolFlags.PropertyExcludes }, - [SyntaxKind.PropertyAssignment]: { includes: SymbolFlags.Property, excludes: SymbolFlags.PropertyExcludes }, - [SyntaxKind.ShorthandPropertyAssignment]: { includes: SymbolFlags.Property, excludes: SymbolFlags.PropertyExcludes }, - [SyntaxKind.EnumMember]: { includes: SymbolFlags.EnumMember, excludes: SymbolFlags.EnumMemberExcludes }, - [SyntaxKind.CallSignature]: { includes: SymbolFlags.Signature, excludes: SymbolFlags.None }, - [SyntaxKind.ConstructSignature]: { includes: SymbolFlags.Signature, excludes: SymbolFlags.None }, - [SyntaxKind.IndexSignature]: { includes: SymbolFlags.Signature, excludes: SymbolFlags.None }, - [SyntaxKind.MethodDeclaration]: { includes: SymbolFlags.Method, excludes: SymbolFlags.MethodExcludes }, - [SyntaxKind.MethodSignature]: { includes: SymbolFlags.Method, excludes: SymbolFlags.MethodExcludes }, - [SyntaxKind.FunctionDeclaration]: { includes: SymbolFlags.Function, excludes: SymbolFlags.FunctionExcludes }, - [SyntaxKind.Constructor]: { includes: SymbolFlags.Constructor, excludes: SymbolFlags.None }, - [SyntaxKind.GetAccessor]: { includes: SymbolFlags.GetAccessor, excludes: SymbolFlags.GetAccessorExcludes }, - [SyntaxKind.SetAccessor]: { includes: SymbolFlags.SetAccessor, excludes: SymbolFlags.SetAccessorExcludes }, - [SyntaxKind.ClassExpression]: { includes: SymbolFlags.Class, excludes: SymbolFlags.ClassExcludes }, - [SyntaxKind.ClassDeclaration]: { includes: SymbolFlags.Class, excludes: SymbolFlags.ClassExcludes }, - [SyntaxKind.InterfaceDeclaration]: { includes: SymbolFlags.Interface, excludes: SymbolFlags.InterfaceExcludes }, - [SyntaxKind.TypeAliasDeclaration]: { includes: SymbolFlags.TypeAlias, excludes: SymbolFlags.TypeAliasExcludes }, - [SyntaxKind.EnumDeclaration]: { - const: { includes: SymbolFlags.ConstEnum, excludes: SymbolFlags.ConstEnumExcludes }, - regular: { includes: SymbolFlags.RegularEnum, excludes: SymbolFlags.RegularEnumExcludes }, - }, - [SyntaxKind.ModuleDeclaration]: { - value: { includes: SymbolFlags.ValueModule, excludes: SymbolFlags.ValueModuleExcludes }, - namespace: { includes: SymbolFlags.NamespaceModule, excludes: SymbolFlags.NamespaceModuleExcludes }, - }, - [SyntaxKind.ImportEqualsDeclaration]: { includes: SymbolFlags.Alias, excludes: SymbolFlags.AliasExcludes }, - [SyntaxKind.NamespaceImport]: { includes: SymbolFlags.Alias, excludes: SymbolFlags.AliasExcludes }, - [SyntaxKind.ImportSpecifier]: { includes: SymbolFlags.Alias, excludes: SymbolFlags.AliasExcludes }, - [SyntaxKind.ExportSpecifier]: { includes: SymbolFlags.Alias | SymbolFlags.ExportValue, excludes: SymbolFlags.AliasExcludes }, - [SyntaxKind.NamespaceExportDeclaration]: { includes: SymbolFlags.Alias, excludes: SymbolFlags.AliasExcludes }, - [SyntaxKind.ImportClause]: { includes: SymbolFlags.Alias, excludes: SymbolFlags.AliasExcludes }, -} as const satisfies Partial>>; - -/** - * Assigning values to a property of a function will usually cause those members to be implicitly declared on the function - * even if they were were not declared (expando functions) - * DTE needs to detect these members and error on them since this behavior is not supported in isolated declarations - * There are however members that can be assigned on a function that are not expando members, namely members that come from Function - * In DTE we do not load the full d.ts so we keep a list of known members of function that can be assigned without considering them expando members. - */ -const knownFunctionMembers = new Set([ - "I:apply", - "I:call", - "I:bind", - "I:toString", - "I:prototype", - "I:length", -]); - -/** @internal */ -export function bindSourceFileForDeclarationEmit(file: SourceFile) { - const nodeLinks: EmitDeclarationNodeLinks[] = []; - function tryGetNodeLinks(node: Node): EmitDeclarationNodeLinks | undefined { - const id = node.id; - if (!id) return undefined; - return nodeLinks[id]; - } - function getNodeLinks(node: Node): EmitDeclarationNodeLinks { - const nodeId = getNodeId(node); - return nodeLinks[nodeId] || (nodeLinks[nodeId] = {}); - } - - bind(); - - return { - tryGetNodeLinks, - getNodeLinks, - resolveName, - resolveMemberKey, - resolveEntityName, - getMemberKey, - }; - - function resolveEntityName(location: Node, node: Expression, meaning: SymbolFlags): EmitDeclarationSymbol | 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(getMemberKey(name)); - if (!memberSymbol || !(memberSymbol.flags & meaning)) { - if (symbol.valueDeclaration && isModuleDeclaration(symbol.valueDeclaration)) { - return getNodeLinks(symbol.valueDeclaration)?.locals?.get(getMemberKey(name)); - } - return undefined; - } - return memberSymbol; - } - else { - return undefined; - } - } - - function resolveName(enclosingDeclaration: Node, escapedText: __String, meaning: SymbolFlags) { - return resolveMemberKey(enclosingDeclaration, getMemberKey(escapedText as string), meaning); - } - function resolveMemberKey(enclosingDeclaration: Node, key: MemberKey, meaning: SymbolFlags) { - function getSymbolFromScope(table: EmitDeclarationSymbolTable | undefined) { - const symbol = table?.get(key); - if (symbol && ((symbol.flags & meaning) || (symbol.flags & SymbolFlags.Alias))) { - return symbol; - } - } - - let currentScope = enclosingDeclaration; - while (currentScope) { - const links = tryGetNodeLinks(currentScope); - let symbol = getSymbolFromScope(links?.locals); - if (!symbol && (isModuleDeclaration(currentScope) || isSourceFile(currentScope))) { - symbol = getSymbolFromScope(links?.symbol?.exports); - } - if (symbol) return symbol; - currentScope = currentScope.parent; - } - return undefined; - } - - function tryGetSymbolFlagsForNode(node: Node): SymbolRegistrationFlags | undefined { - return getSymbolFlagsForNode(node as Node & { kind: keyof typeof syntaxKindToSymbolMap; }); - } - function getSymbolFlagsForNode(node: Node & { kind: keyof typeof syntaxKindToSymbolMap; }): SymbolRegistrationFlags { - if (node.kind === SyntaxKind.VariableDeclaration) { - return getCombinedNodeFlags(node) & NodeFlags.BlockScoped ? - syntaxKindToSymbolMap[node.kind].blockScope : - syntaxKindToSymbolMap[node.kind].fnScope; - } - if (node.kind === SyntaxKind.EnumDeclaration) { - return isEnumConst(node as EnumDeclaration) ? - syntaxKindToSymbolMap[node.kind].const : - syntaxKindToSymbolMap[node.kind].regular; - } - if (node.kind === SyntaxKind.ModuleDeclaration) { - return getModuleInstanceState(node as ModuleDeclaration) === ModuleInstanceState.Instantiated ? - syntaxKindToSymbolMap[node.kind].value : - syntaxKindToSymbolMap[node.kind].namespace; - } - return syntaxKindToSymbolMap[node.kind]; - } - function bind() { - /* eslint-disable no-var */ - var currentScope: Node = undefined!; - var currentFunctionLocalSymbolTable: EmitDeclarationSymbolTable = undefined!; - var currentParent: EmitDeclarationSymbol = undefined!; - var currentLocalSymbolTable: EmitDeclarationSymbolTable = undefined!; - var currentExportsSymbolTable: EmitDeclarationSymbolTable | undefined; - var postBindingAction: (() => void)[] = []; - - var fileLinks = getNodeLinks(file).symbol = createEmitSymbol(); - fileLinks.declarations.push(file); - setValueDeclaration(fileLinks as Symbol, file); - /* eslint-enable no-var */ - fileLinks.exports = new Map(); - withScope(file, fileLinks.exports, () => bindEachFunctionsFirst(file.statements)); - postBindingAction.forEach(fn => fn()); - - function createAnonymousEmitSymbol(node: Declaration): EmitDeclarationSymbol { - const symbol = createEmitSymbol(); - symbol.declarations.push(node); - setValueDeclaration(symbol as Symbol, node); - node.symbol = symbol as Symbol; - return symbol; - } - function createEmitSymbol(): EmitDeclarationSymbol { - return { - parent: currentParent, - declarations: [], - flags: 0, - }; - } - function getSymbol(table: EmitDeclarationSymbolTable, name: MemberKey) { - let symbol = table.get(name); - if (!symbol) { - symbol = createEmitSymbol(); - symbol.name = name; - table.set(name, symbol); - } - return symbol; - } - function addLocalAndExportDeclaration(name: LocalAndExportName | MemberKey | undefined, node: Declaration, flags: SymbolRegistrationFlags, isExport: boolean, isBlockScoped = true) { - const { exportName, localName } = typeof name === "object" ? name : { exportName: name, localName: name }; - if (isExport) { - const exportKind = flags.includes & SymbolFlags.Value ? SymbolFlags.ExportValue : 0; - const localSymbol = addLocalOnlyDeclaration(localName, node, { includes: exportKind, excludes: flags.excludes }, isBlockScoped); - const exportSymbol = addExportOnlyDeclaration(exportName, node, flags); - localSymbol.exportSymbol = exportSymbol; - // Export symbol can be undefined if the export modifier was placed in an unexpected position. - // We just assume the local symbol should be used. There are already bigger issues in the file anyway. - return exportSymbol ?? localSymbol; - } - else { - return addLocalOnlyDeclaration(localName, node, flags, isBlockScoped); - } - } - function addExportOnlyDeclaration(name: MemberKey | undefined, node: Declaration, flagsAndForbiddenFlags: SymbolRegistrationFlags) { - if (!currentExportsSymbolTable) { - return undefined; - } - return addDeclaration(currentExportsSymbolTable, name, node, flagsAndForbiddenFlags); - } - function addLocalOnlyDeclaration(name: MemberKey | undefined, node: Declaration, flagsAndForbiddenFlags: SymbolRegistrationFlags, isBlockScoped = true) { - return addDeclaration(isBlockScoped ? currentLocalSymbolTable : currentFunctionLocalSymbolTable, name, node, flagsAndForbiddenFlags); - } - - function addDeclaration(table: EmitDeclarationSymbolTable, name: MemberKey | undefined, node: Declaration, { includes, excludes }: SymbolRegistrationFlags) { - let symbol = name !== undefined ? getSymbol(table, name) : createEmitSymbol(); - // Symbols don't merge, create new one - if (excludes & symbol.flags) { - // Variables and expando members from assignments are always allowed to merge - if (!(includes & SymbolFlags.Variable && symbol.flags & SymbolFlags.Assignment)) { - symbol = createEmitSymbol(); - } - } - symbol.declarations.push(node); - setValueDeclaration(symbol as Symbol, node); - symbol.flags |= includes; - getNodeLinks(node).symbol = symbol; - // Some parts of declarations.ts use the symbol directly. We provide enough of it for everything to work. - node.symbol = symbol as Symbol; - return symbol; - } - function withScope(scope: Node, exports: EmitDeclarationSymbolTable | undefined, fn: () => void) { - const old = [currentScope, currentParent, currentFunctionLocalSymbolTable, currentLocalSymbolTable, currentExportsSymbolTable] as const; - currentScope = scope; - const links = getNodeLinks(scope); - currentLocalSymbolTable = links.locals ??= new Map(); - currentParent = links.symbol ?? currentParent; - currentExportsSymbolTable = exports; - if (isBlockScopedContainerTopLevel(scope)) { - currentFunctionLocalSymbolTable = currentLocalSymbolTable; - } - fn(); - [currentScope, currentParent, currentFunctionLocalSymbolTable, currentLocalSymbolTable, currentExportsSymbolTable] = old; - } - function withMembers(symbol: EmitDeclarationSymbol, addToExports = false, fn: () => void) { - const old = [currentLocalSymbolTable, currentParent] as const; - currentParent = symbol; - currentLocalSymbolTable = addToExports ? symbol.exports ??= new Map() : symbol.members ??= new Map(); - fn(); - [currentLocalSymbolTable, currentParent] = old; - } - - interface LocalAndExportName { - exportName?: MemberKey; - localName?: MemberKey; - } - function getStatementName(s: NamedDeclaration): undefined | MemberKey | LocalAndExportName { - if (hasSyntacticModifier(s, ModifierFlags.Export) && hasSyntacticModifier(s, ModifierFlags.Default)) { - return { - exportName: "default" as MemberKey, - localName: getMemberKeyFromElement(s), - }; - } - if (s) { - return getMemberKeyFromElement(s); - } - } - - function bindTypeParameters(typeParameters: TypeParameterDeclaration[] | NodeArray | undefined) { - typeParameters?.forEach(t => addLocalOnlyDeclaration(getMemberKey(t.name), t, getSymbolFlagsForNode(t))); - } - function bindVariable(d: VariableDeclaration | ParameterDeclaration | PropertyDeclaration) { - bindNode(d.type); - const isExported = isExportedVariable(d); - const isBlockScoped = isBlockOrCatchScoped(d); - if (d.initializer) { - bindNode(d.initializer); - } - if (isBindingPattern(d.name)) { - function bindBindingPattern(pattern: BindingPattern) { - // type BindingPattern = ObjectBindingPattern | ArrayBindingPattern; - (pattern.elements as NodeArray).forEach(b => { - if (b.kind === SyntaxKind.OmittedExpression) return; - if (!b.name) return; - - if (isIdentifier(b.name)) { - addLocalAndExportDeclaration(getMemberKey(b.name), b, getSymbolFlagsForNode(b), isExported, isBlockScoped); - } - else { - bindBindingPattern(b.name); - } - }); - } - bindBindingPattern(d.name); - } - else { - addLocalAndExportDeclaration(getMemberKeyFromElement(d), d, getSymbolFlagsForNode(d), isExported, isBlockScoped); - } - function isExportedVariable(d: VariableDeclaration | ParameterDeclaration | PropertyDeclaration) { - if (!isVariableDeclaration(d)) return false; - // exported directly - if (hasSyntacticModifier(d.parent.parent, ModifierFlags.Export)) { - return true; - } - // or part of an ambient module declaration - const module = findAncestor(d, isBlockScopedContainerTopLevel); - return !!module && hasAmbientModifier(module); - } - } - function bindEachFunctionsFirst(nodes: NodeArray | undefined): void { - if (!nodes) return; - bindContainer(nodes, n => n.kind === SyntaxKind.FunctionDeclaration); - bindContainer(nodes, n => n.kind !== SyntaxKind.FunctionDeclaration); - } - function bindExpandoMembers(expression: Node) { - if (isBinaryExpression(expression) && expression.operatorToken.kind === SyntaxKind.EqualsToken) { - const assignmentTarget = expression.left; - const isPropertyAccess = isPropertyAccessExpression(assignmentTarget); - if ( - (isPropertyAccess || isElementAccessExpression(assignmentTarget)) - ) { - let name; - if (isPropertyAccess) { - name = assignmentTarget.name; - } - else { - const argumentExpression = assignmentTarget.argumentExpression; - name = factory.createComputedPropertyName(argumentExpression); - } - const key = getMemberKey(name); - if (!key || knownFunctionMembers.has(key)) return; - const target = resolveEntityName(expression, assignmentTarget.expression, SymbolFlags.Value | SymbolFlags.ExportValue); - if (!target) return; - const fn = target.declarations.find(canHaveExpandoMembers); - if (!fn) return; - - const parentLocals = target.parent?.valueDeclaration && getNodeLinks(target.parent.valueDeclaration).locals; - if (currentFunctionLocalSymbolTable !== parentLocals && target.parent?.valueDeclaration?.kind !== SyntaxKind.ModuleDeclaration) return; - - target.exports ??= new Map(); - if (target.exportSymbol) { - target.exportSymbol.exports = target.exports; - } - withScope(fn, target.exports, () => { - const { includes, excludes } = syntaxKindToSymbolMap[SyntaxKind.PropertyDeclaration]; - addExportOnlyDeclaration(key, assignmentTarget, { - includes: includes | SymbolFlags.Assignment, - excludes: excludes & ~SymbolFlags.Assignment, - }); - }); - } - } - } - - function canHaveExpandoMembers(declaration: Node) { - if (isFunctionDeclaration(declaration)) { - return true; - } - else if (isVariableDeclaration(declaration)) { - if (declaration.type || !isVarConst(declaration)) { - return false; - } - if (!(declaration.initializer && isFunctionExpressionOrArrowFunction(declaration.initializer))) { - return false; - } - return true; - } - } - function bindObjectLiteral(object: ObjectLiteralExpression) { - const objectSymbol = createAnonymousEmitSymbol(object); - - withMembers(objectSymbol, /*addToExports*/ false, () => { - object.properties.forEach(m => { - bindNode(m); - }); - }); - } - function bindContainer(statements: NodeArray | Node[], filter: (node: Node) => boolean) { - statements.forEach(statement => { - if (!filter(statement)) return; - bindNode(statement); - }); - } - function bindChildren(node: Node) { - forEachChild(node, bindNode, arr => arr.forEach(bindNode)); - } - function bindNode(node: Node | undefined) { - if (!node) return; - - switch (node.kind) { - case SyntaxKind.ObjectLiteralExpression: - bindObjectLiteralExpression(node as ObjectLiteralExpression); - break; - case SyntaxKind.TypeLiteral: - bindTypeLiteralNode(node as TypeLiteralNode); - break; - case SyntaxKind.TypeAliasDeclaration: - bindTypeAliasDeclaration(node as TypeAliasDeclaration); - break; - case SyntaxKind.MappedType: - bindMappedTypeNode(node as MappedTypeNode); - break; - case SyntaxKind.ConditionalType: - bindConditionalTypeNode(node as ConditionalTypeNode); - break; - case SyntaxKind.InferType: - bindInferTypeNode(node as InferTypeNode); - break; - case SyntaxKind.ImportEqualsDeclaration: - bindImportEqualsDeclaration(node as ImportEqualsDeclaration); - break; - case SyntaxKind.ImportDeclaration: - bindImportDeclaration(node as ImportDeclaration); - break; - case SyntaxKind.ExportAssignment: - bindExportAssignment(node as ExportAssignment); - break; - case SyntaxKind.ExportDeclaration: - bindExportDeclaration(node as ExportDeclaration); - break; - case SyntaxKind.VariableDeclaration: - bindVariable(node as VariableDeclaration); - break; - case SyntaxKind.FunctionExpression: - case SyntaxKind.ArrowFunction: - bindFunctionExpressionOrArrowFunction(node as FunctionExpression | ArrowFunction); - break; - case SyntaxKind.FunctionDeclaration: - case SyntaxKind.MethodDeclaration: - case SyntaxKind.Constructor: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.MethodSignature: - case SyntaxKind.CallSignature: - case SyntaxKind.ConstructSignature: - case SyntaxKind.FunctionType: - case SyntaxKind.ConstructorType: - bindFunctionLikeContainer(node as FunctionLikeContainer); - break; - case SyntaxKind.ClassExpression: - // Class Expressions are not supported - break; - case SyntaxKind.EnumDeclaration: - bindEnumDeclaration(node as EnumDeclaration); - break; - case SyntaxKind.ModuleDeclaration: - bindModuleDeclaration(node as ModuleDeclaration); - break; - case SyntaxKind.InterfaceDeclaration: - bindInterfaceDeclaration(node as InterfaceDeclaration); - break; - case SyntaxKind.ClassDeclaration: - bindClassDeclaration(node as ClassDeclaration); - break; - case SyntaxKind.ForOfStatement: - case SyntaxKind.ForInStatement: - case SyntaxKind.ForStatement: - case SyntaxKind.Block: - withScope(node, /*exports*/ undefined, () => { - bindChildren(node); - }); - break; - default: - if (isDeclaration(node)) { - bindDeclaration(node); - } - else if (isExpression(node)) { - bindExpandoMembers(node); - bindChildren(node); - } - else { - bindChildren(node); - } - break; - } - } - function bindObjectLiteralExpression(node: ObjectLiteralExpression) { - bindObjectLiteral(node); - } - function bindMappedTypeNode(node: MappedTypeNode) { - const mappedType = node; - withScope(node, /*exports*/ undefined, () => { - bindTypeParameters([mappedType.typeParameter]); - }); - bindNode(mappedType.nameType); - bindNode(mappedType.type); - } - function bindConditionalTypeNode(node: ConditionalTypeNode) { - withScope(node.extendsType, /*exports*/ undefined, () => { - bindNode(node.extendsType); - }); - bindNode(node.checkType); - bindNode(node.falseType); - getNodeLinks(node.trueType).locals = getNodeLinks(node.extendsType).locals; - bindNode(node.trueType); - } - function bindInferTypeNode(node: InferTypeNode) { - const conditionalTypeOwner = findAncestor(node, isConditionalTypeNode); - // Probably an error, infer not in a conditional type context - // Try to bind the rest of it - if (conditionalTypeOwner) { - withScope(conditionalTypeOwner, /*exports*/ undefined, () => { - bindTypeParameters([node.typeParameter]); - }); - } - bindChildren(node); - } - function bindFunctionExpressionOrArrowFunction(node: FunctionExpression | ArrowFunction) { - createAnonymousEmitSymbol(node); - withScope(node, /*exports*/ undefined, () => { - bindTypeParameters(node.typeParameters); - bindNode(node.type); - node.parameters.forEach(bindVariable); - }); - } - function bindImportEqualsDeclaration(node: ImportEqualsDeclaration) { - addLocalOnlyDeclaration(getMemberKey(node.name), node, getSymbolFlagsForNode(node)); - } - function bindImportDeclaration(node: ImportDeclaration) { - if (!node.importClause) { - return; - } - if (node.importClause.name) { - addLocalOnlyDeclaration(getMemberKey(node.importClause.name), node.importClause, getSymbolFlagsForNode(node.importClause)); - } - if (node.importClause.namedBindings) { - const namedBindings = node.importClause.namedBindings; - if (namedBindings.kind === SyntaxKind.NamedImports) { - namedBindings.elements.forEach(v => { - addLocalOnlyDeclaration(getMemberKey(v.name), v, getSymbolFlagsForNode(v)); - }); - } - else if (namedBindings.kind === SyntaxKind.NamespaceImport) { - addLocalOnlyDeclaration(getMemberKey(namedBindings.name), namedBindings, getSymbolFlagsForNode(namedBindings)); - } - else { - throw new Error("Not supported"); - } - } - } - type FunctionLikeContainer = - | FunctionDeclaration - | MethodDeclaration - | ConstructorDeclaration - | GetAccessorDeclaration - | SetAccessorDeclaration - | MethodSignature - | FunctionDeclaration - | CallSignatureDeclaration - | ConstructSignatureDeclaration - | FunctionTypeNode - | ConstructorTypeNode; - function bindFunctionLikeContainer(node: FunctionLikeContainer) { - const isExported = hasSyntacticModifier(node, ModifierFlags.Export); - const declarationFlags = tryGetSymbolFlagsForNode(node); - if (declarationFlags) { - addLocalAndExportDeclaration(getStatementName(node), node, declarationFlags, isExported); - } - withScope(node, /*exports*/ undefined, () => { - bindTypeParameters(node.typeParameters); - bindNode(node.type); - node.parameters.forEach(bindVariable); - }); - } - function bindTypeLiteralNode(node: TypeLiteralNode) { - const objectSymbol = createAnonymousEmitSymbol(node); - withMembers(objectSymbol, /*addToExports*/ false, () => { - node.members.forEach(bindNode); - }); - } - function bindTypeAliasDeclaration(node: TypeAliasDeclaration) { - const isExported = hasSyntacticModifier(node, ModifierFlags.Export); - addLocalAndExportDeclaration(getStatementName(node), node, getSymbolFlagsForNode(node), isExported); - withScope(node, /*exports*/ undefined, () => { - bindTypeParameters(node.typeParameters); - bindNode(node.type); - }); - } - // Default export declarations set isVisible on true on associated symbols in the type checker. - function bindExportAssignment(node: ExportAssignment) { - bindNode(node.expression); - if (node.expression && isIdentifier(node.expression)) { - const name = node.expression.escapedText; - postBindingAction.push(() => { - const resolvedSymbol = resolveName(node.expression, name, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias); - if (resolvedSymbol) { - resolvedSymbol.declarations.forEach(d => getNodeLinks(d).isVisible = true); - } - }); - } - } - function bindExportDeclaration(node: ExportDeclaration) { - if (node.exportClause && isNamedExports(node.exportClause)) { - const elements = node.exportClause.elements; - if (node.moduleSpecifier) { - // TODO is currentExportsSymbolTable ok here? - withScope(node, /*exports*/ undefined, () => { - elements.forEach(e => { - const { includes, excludes } = getSymbolFlagsForNode(e); - addLocalOnlyDeclaration(getMemberKey(e.propertyName ?? e.name), e, { - includes: includes | SymbolFlags.ExportValue, - excludes, - }); - }); - }); - } - for (const e of elements) { - postBindingAction.push(() => { - const resolvedSymbol = resolveName(e, (e.propertyName ?? e.name).escapedText, ~0); - if (resolvedSymbol) { - resolvedSymbol.declarations.forEach(d => getNodeLinks(d).isVisible = true); - } - }); - } - } - } - function bindEnumDeclaration(node: EnumDeclaration) { - const isExported = hasSyntacticModifier(node, ModifierFlags.Export); - addLocalAndExportDeclaration(getStatementName(node), node, getSymbolFlagsForNode(node), isExported); - withScope(node, /*exports*/ undefined, () => { - node.members.forEach(m => { - addLocalOnlyDeclaration(getMemberKeyFromElement(m), m, getSymbolFlagsForNode(m)); - }); - }); - } - function bindModuleDeclaration(node: ModuleDeclaration) { - const isExported = hasSyntacticModifier(node, ModifierFlags.Export); - function bindModuleDeclaration(moduleDeclaration: ModuleDeclaration) { - const name = isIdentifier(moduleDeclaration.name) ? moduleDeclaration.name : undefined; - const moduleSymbol = addLocalAndExportDeclaration(getMemberKey(name), moduleDeclaration, getSymbolFlagsForNode(moduleDeclaration), isExported); - moduleSymbol.exports ??= new Map(); - withScope(moduleDeclaration, moduleSymbol.exports, () => { - if (moduleDeclaration.body) { - if (isModuleBlock(moduleDeclaration.body)) { - const moduleBlock = moduleDeclaration.body; - bindEachFunctionsFirst(moduleBlock.statements); - } - else if (isModuleDeclaration(moduleDeclaration.body)) { - const subModule = moduleDeclaration.body; - bindModuleDeclaration(subModule); - } - else { - throw new Error("Unsupported body type"); - } - } - }); - } - bindModuleDeclaration(node); - } - function bindInterfaceDeclaration(node: InterfaceDeclaration) { - const isExported = hasSyntacticModifier(node, ModifierFlags.Export); - const interfaceDeclaration = node; - const interfaceSymbol = addLocalAndExportDeclaration(getStatementName(interfaceDeclaration), interfaceDeclaration, getSymbolFlagsForNode(interfaceDeclaration), isExported); - withScope(interfaceDeclaration, /*exports*/ undefined, () => { - bindTypeParameters(interfaceDeclaration.typeParameters); - }); - withMembers(interfaceSymbol, /*addToExports*/ false, () => { - interfaceDeclaration.members.forEach(m => { - bindNode(m); - }); - }); - } - function bindClassDeclaration(node: ClassExpression | ClassDeclaration) { - const isExported = hasSyntacticModifier(node, ModifierFlags.Export); - const classDeclaration = node; - const classSymbol = addLocalAndExportDeclaration(getStatementName(classDeclaration), classDeclaration, getSymbolFlagsForNode(classDeclaration), isExported); - withScope(classDeclaration, /*exports*/ undefined, () => { - bindTypeParameters(classDeclaration.typeParameters); - }); - withMembers(classSymbol, /*addToExports*/ false, () => { - classDeclaration.members.forEach(m => { - if (hasSyntacticModifier(m, ModifierFlags.Static)) return; - if (m.kind === SyntaxKind.SemicolonClassElement || m.kind === SyntaxKind.ClassStaticBlockDeclaration) return; - - bindNode(m); - }); - }); - withMembers(classSymbol, /*addToExports*/ true, () => { - classDeclaration.members.forEach(m => { - if (!hasSyntacticModifier(m, ModifierFlags.Static)) return; - if ( - m.kind === SyntaxKind.SemicolonClassElement - || m.kind === SyntaxKind.ClassStaticBlockDeclaration - ) return; - - bindNode(m); - }); - }); - } - function bindDeclaration(node: Declaration) { - const flags = tryGetSymbolFlagsForNode(node); - // Unsupported declaration - if (!flags) { - return; - } - addLocalOnlyDeclaration(getMemberKeyFromElement(node), node, flags); - bindChildren(node); - } - } -} - -/** @internal */ -export type MemberKey = string & { - __memberKey: void; -}; - -/** - * Gets the symbolic name for a member from its type. - * @internal - */ -export function getMemberKey(name: string | Exclude | NoSubstitutionTemplateLiteral): MemberKey; -/** - * Gets the symbolic name for a member from its type. - * @internal - */ -export function getMemberKey(name: string | PropertyName | NoSubstitutionTemplateLiteral | undefined): MemberKey | undefined; -export function getMemberKey(name: string | PropertyName | NoSubstitutionTemplateLiteral | undefined): string | undefined { - if (name === undefined) { - return undefined; - } - if (typeof name === "string") { - return ("I:" + name); - } - if (isPrivateIdentifier(name)) { - return ("P:" + name.escapedText); - } - if (isIdentifier(name)) { - return ("I:" + name.escapedText); - } - if (isStringLiteralLike(name)) { - return ("I:" + name.text); - } - if (isNumericLiteral(name)) { - return ("I:" + (+name.text)); - } - if (isComputedPropertyName(name)) { - let computedName = name.expression; - - if (isStringLiteralLike(computedName)) { - return ("I:" + computedName.text); - } - if (isNumericLiteral(computedName)) { - return ("I:" + (+computedName.text)); - } - if ( - isPrefixUnaryExpression(computedName) - && isNumericLiteral(computedName.operand) - ) { - if (computedName.operator === SyntaxKind.MinusToken) { - return ("I:" + (-computedName.operand.text)); - } - else if (computedName.operator === SyntaxKind.PlusToken) { - return ("I:" + (+computedName.operand.text)); - } - else { - return undefined; - } - } - let fullId = "C:"; - // We only support dotted identifiers as property keys - while (true) { - if (isIdentifier(computedName)) { - fullId += computedName.escapedText; - break; - } - else if (isPropertyAccessExpression(computedName)) { - fullId += computedName.name.escapedText; - computedName = computedName.expression; - } - else { - // Can't compute a property key, bail - return undefined; - } - } - return fullId; - } - return undefined; -} - -/** - * Gets the symbolic name for a member from its type. - * @internal - */ -export function getMemberKeyFromElement(element: NamedDeclaration): MemberKey | undefined { - if (isConstructorDeclaration(element) || isConstructSignatureDeclaration(element)) { - return "@constructor" as MemberKey; - } - const name = element.name; - if (!name || isElementAccessExpression(name) || isObjectBindingPattern(name) || isArrayBindingPattern(name) || isJsxNamespacedName(name) || isPropertyAccessExpression(name)) return undefined; - return getMemberKey(name); -} diff --git a/src/compiler/transformers/declarations/emitResolver.ts b/src/compiler/transformers/declarations/emitResolver.ts index 29bc1430827d3..e2c82e24da3f1 100644 --- a/src/compiler/transformers/declarations/emitResolver.ts +++ b/src/compiler/transformers/declarations/emitResolver.ts @@ -1,5 +1,8 @@ import { - bindSourceFileForDeclarationEmit, + __String, + bindSourceFile, + canHaveLocals, + CompilerOptions, ComputedPropertyName, CoreEmitResolver, createEntityVisibilityChecker, @@ -8,30 +11,35 @@ import { DeclarationName, determineIfDeclarationIsVisible, ElementAccessExpression, - EmitDeclarationNodeLinks, - EmitDeclarationSymbol, emptyArray, EnumDeclaration, EnumMember, + ExportSpecifier, Expression, factory, + forEachChild, forEachEntry, FunctionDeclaration, FunctionLikeDeclaration, - getMemberKey, getNameOfDeclaration, + getNodeId, getParseTreeNode, + getPropertyNameForPropertyNameNode, hasDynamicName, hasProperty, hasSyntacticModifier, + Identifier, isAccessor, isBigIntLiteral, + isComputedPropertyName, isDeclarationReadonly, isElementAccessExpression, isEntityNameExpression, isEnumDeclaration, isEnumMember, isExpandoPropertyDeclaration, + isExportAssignment, + isExportSpecifier, isFunctionDeclaration, isFunctionExpressionOrArrowFunction, isFunctionLike, @@ -39,12 +47,15 @@ import { isGetAccessorDeclaration, isIdentifier, isInfinityOrNaNString, + isModuleDeclaration, isNumericLiteral, isPrefixUnaryExpression, isPrimitiveLiteralValue, isPropertyAccessExpression, + isPropertyName, isSetAccessor, isSetAccessorDeclaration, + isSourceFile, isStringLiteralLike, isTemplateExpression, isVarConst, @@ -63,17 +74,47 @@ import { PropertySignature, skipParentheses, SourceFile, + Symbol, SymbolAccessibility, SymbolFlags, + SymbolTable, SyntaxKind, VariableDeclaration, } from "../../_namespaces/ts"; + + +// /** +// * Assigning values to a property of a function will usually cause those members to be implicitly declared on the function +// * even if they were were not declared (expando functions) +// * DTE needs to detect these members and error on them since this behavior is not supported in isolated declarations +// * There are however members that can be assigned on a function that are not expando members, namely members that come from Function +// * In DTE we do not load the full d.ts so we keep a list of known members of function that can be assigned without considering them expando members. +// */ +// // const knownFunctionMembers = new Set([ +// // "I:apply", +// // "I:call", +// // "I:bind", +// // "I:toString", +// // "I:prototype", +// // "I:length", +// // ]); + + /** @internal */ -export function createEmitDeclarationResolver(file: SourceFile): CoreEmitResolver { - const { getNodeLinks, resolveMemberKey, resolveName, resolveEntityName } = bindSourceFileForDeclarationEmit(file); +export interface EmitDeclarationNodeLinks { + signatureDeclarations?: Node[]; + isVisible?: boolean; + enumValue?: string | number | undefined; + isVisibilityComputed?: boolean +} + - const { isEntityNameVisible } = createEntityVisibilityChecker({ +/** @internal */ +export function createEmitDeclarationResolver(file: SourceFile, options: CompilerOptions): CoreEmitResolver { + const nodeLinks: EmitDeclarationNodeLinks[] = []; + + const { isEntityNameVisible, collectLinkedAliases } = createEntityVisibilityChecker({ defaultSymbolAccessibility: SymbolAccessibility.Accessible, isDeclarationVisible, markDeclarationAsVisible(declaration) { @@ -83,13 +124,95 @@ export function createEmitDeclarationResolver(file: SourceFile): CoreEmitResolve return { accessibility: SymbolAccessibility.Accessible }; }, resolveName, + getTargetOfExportSpecifier }); + bindSourceFile(file, options); + collectAllLinkedAliases(file); + + function getTargetOfExportSpecifier(node: ExportSpecifier, meaning: SymbolFlags): Symbol | undefined { + // throw new Error("getTargetOfExportSpecifier"); + // if (idText(node.propertyName || node.name) === InternalSymbolName.Default) { + // const specifier = getModuleSpecifierForImportOrExport(node); + // const moduleSymbol = specifier && resolveEntityName(node, specifier, SymbolFlags.Module); + // if (moduleSymbol) { + // return resolveEntityName(moduleSymbol, node); + // } + // } + 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, key: __String, meaning: SymbolFlags) { + function getSymbolFromScope(table: SymbolTable | undefined) { + const symbol = table?.get(key); + if (symbol && ((symbol.flags & meaning) || (symbol.flags & SymbolFlags.Alias))) { + return symbol; + } + } + let currentScope = enclosingDeclaration; + while (currentScope) { + if(canHaveLocals(currentScope)) { + let symbol = getSymbolFromScope(currentScope.locals); + if (!symbol && (isModuleDeclaration(currentScope) || isSourceFile(currentScope)) && currentScope.symbol) { + symbol = getSymbolFromScope(currentScope.symbol.exports); + } + if (symbol) return symbol; + } + currentScope = currentScope.parent; + } + return undefined; + } + function getEnumValueFromName(name: PropertyName | NoSubstitutionTemplateLiteral, location: EnumDeclaration) { - const enumKey = getMemberKey(name); + const enumKey = getSymbolName(name); if (!enumKey) return undefined; - const enumMemberSymbol = resolveMemberKey(location, enumKey, SymbolFlags.Value); - const enumMemberDeclaration = enumMemberSymbol?.declarations[0]; + const enumMemberSymbol = resolveName(location, enumKey, SymbolFlags.Value); + const enumMemberDeclaration = enumMemberSymbol?.declarations?.[0]; if (enumMemberDeclaration && isEnumMember(enumMemberDeclaration)) { return getNodeLinks(enumMemberDeclaration).enumValue; } @@ -99,7 +222,7 @@ export function createEmitDeclarationResolver(file: SourceFile): CoreEmitResolve function isExpressionMemberOfEnum(target: Expression, location: EnumDeclaration) { const symbol = resolveEntityName(location, target, SymbolFlags.Namespace); - return !!symbol?.declarations.some(d => d === location); + return !!symbol?.declarations?.some(d => d === location); } const evaluate = createEvaluator({ evaluateElementAccessExpression(expr, location) { @@ -303,12 +426,14 @@ export function createEmitDeclarationResolver(file: SourceFile): CoreEmitResolve return !hasDynamicName(node) || isIdentifierComputedName(name); }, isImplementationOfOverload(node) { - function getSignaturesOfSymbol(symbol: EmitDeclarationSymbol | undefined): Node[] { - if (!symbol) return emptyArray; - if (symbol.signatureDeclarations) return symbol.signatureDeclarations; + function getSignaturesOfSymbol(symbol: Symbol | undefined): Node[] { + if (!symbol || !symbol.valueDeclaration) return emptyArray; + const links = getNodeLinks(symbol.valueDeclaration); + if (links.signatureDeclarations) return links.signatureDeclarations; + + if (!symbol || !symbol.declarations) return (links.signatureDeclarations = emptyArray); - if (!symbol || !symbol.declarations) return (symbol.signatureDeclarations = emptyArray); - const result: Node[] = symbol.signatureDeclarations = []; + const result: Node[] = links.signatureDeclarations = []; for (let i = 0; i < symbol.declarations.length; i++) { const decl = symbol.declarations[i]; if (!isFunctionLike(decl) || isGetAccessor(decl) || isSetAccessor(decl)) { @@ -337,7 +462,7 @@ export function createEmitDeclarationResolver(file: SourceFile): CoreEmitResolve 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 = getNodeLinks(node).symbol; + const symbol = node.symbol; 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; @@ -385,6 +510,7 @@ export function createEmitDeclarationResolver(file: SourceFile): CoreEmitResolve function isDeclarationVisible(node: Node): boolean { if (node) { + const links = getNodeLinks(node); links.isVisible ??= !!determineIfDeclarationIsVisible(node, isDeclarationVisible); return links.isVisible; @@ -393,3 +519,47 @@ export function createEmitDeclarationResolver(file: SourceFile): CoreEmitResolve return false; } } + +/** + * Gets the symbolic name for a member from its type. + * @internal + */ +export function getSymbolName(name: Exclude): __String; +/** + * Gets the symbolic name for a member from its type. + * @internal + */ +export function getSymbolName(name: ElementAccessExpression | PropertyName): __String | undefined; +export 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; + + let computedName = isComputedPropertyName(name) ? name.expression: + isElementAccessExpression(name) ? name.argumentExpression: + undefined; + + if (computedName) { + let fullId = "__!"; + // We only support dotted identifiers as property keys + while (true) { + if (isIdentifier(computedName)) { + fullId += computedName.escapedText; + break; + } + else if (isPropertyAccessExpression(computedName)) { + fullId += computedName.name.escapedText; + computedName = computedName.expression; + } + else { + // Can't compute a property key, bail + return undefined; + } + } + return fullId as __String; + } + return undefined; +} diff --git a/src/compiler/transformers/declarations/localInferenceResolver.ts b/src/compiler/transformers/declarations/localInferenceResolver.ts index 48597a2bf78e7..ec3851a3c7c0e 100644 --- a/src/compiler/transformers/declarations/localInferenceResolver.ts +++ b/src/compiler/transformers/declarations/localInferenceResolver.ts @@ -19,7 +19,6 @@ import { GetAccessorDeclaration, getCommentRange, getEmitScriptTarget, - getMemberKeyFromElement, getNameOfDeclaration, getTextOfNode, HasInferredType, @@ -498,7 +497,7 @@ export function createLocalInferenceResolver({ } } - const nameKey = getMemberKeyFromElement(prop); + const nameKey = prop.symbol.escapedName; const name = normalizePropertyName(prop.symbol, isMethodDeclaration(prop)) ?? deepClone(visitNode(prop.name, visitDeclarationSubtree, isPropertyName)!); @@ -530,7 +529,6 @@ export function createLocalInferenceResolver({ }); if (nameKey) { - Debug.assertSymbolValid(prop.symbol); const exitingIndex = members.get(prop.symbol); if (exitingIndex !== undefined && !isMethodOrAccessor(prop)) { properties[exitingIndex] = newProp; @@ -664,7 +662,6 @@ export function createLocalInferenceResolver({ function normalizePropertyName(symbol: Symbol, isMethod: boolean) { let nameText; - Debug.assertSymbolValid(symbol); Debug.assert(symbol.declarations !== undefined, "Symbol has no declarations"); let stringNamed = !!length(symbol.declarations); let singleQuote = stringNamed; @@ -790,7 +787,6 @@ export function createLocalInferenceResolver({ return localInference(node.expression, NarrowBehavior.KeepLiterals); } else if (isVariableDeclaration(node)) { - Debug.assertSymbolValid(node.symbol); const firstDeclaration = node.symbol.valueDeclaration; // Use first declaration of variable for the type if (node !== firstDeclaration && firstDeclaration && isVariableDeclaration(firstDeclaration)) { diff --git a/src/compiler/transformers/declarations/transpileDeclaration.ts b/src/compiler/transformers/declarations/transpileDeclaration.ts index ad839eb0a34a1..ff457c261ccab 100644 --- a/src/compiler/transformers/declarations/transpileDeclaration.ts +++ b/src/compiler/transformers/declarations/transpileDeclaration.ts @@ -38,7 +38,7 @@ export function transpileDeclaration(sourceFile: SourceFile, transpileOptions: T getCompilerOptions: () => compilerOptions.compilerOptions, getCommonSourceDirectory: () => commonSourceDirectory, }; - const emitResolver = createEmitDeclarationResolver(sourceFile); + const emitResolver = createEmitDeclarationResolver(sourceFile, compilerOptions); const diagnostics: Diagnostic[] = []; const transformationContext: IsolatedTransformationContext = { ...nullTransformationContext, diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 93b6cd696abe7..e83b7f2be941b 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -229,6 +229,7 @@ import { ImportDeclaration, ImportEqualsDeclaration, ImportMetaProperty, + ImportOrExportSpecifier, ImportSpecifier, ImportTypeNode, IndexInfo, @@ -465,6 +466,7 @@ import { PseudoBigInt, PunctuationOrKeywordSyntaxKind, PunctuationSyntaxKind, + pushIfUnique, QualifiedName, QuestionQuestionEqualsToken, ReadonlyCollection, @@ -537,6 +539,7 @@ import { TransformFlags, TransientSymbol, TriviaSyntaxKind, + tryAddToSet, tryCast, tryRemovePrefix, TryStatement, @@ -10925,11 +10928,30 @@ export function createEvaluator({ evaluateElementAccessExpression, evaluateEntit } /** @internal */ -export function createEntityVisibilityChecker({ isDeclarationVisible, isThisAccessible, markDeclarationAsVisible: markNodeAsVisible, resolveName, defaultSymbolAccessibility }: { +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, @@ -10939,9 +10961,54 @@ export function createEntityVisibilityChecker | 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; @@ -11010,7 +11077,7 @@ export function createEntityVisibilityChecker { - assertSymbolValid(symbol); - if (symbol.name) { - ts.Debug.assert(symbol.name[1] === ":", "Symbol is not from DTE"); - } - }; - try { - 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); - } - finally { - ts.Debug.assertSymbolValid = assertSymbolValid; + 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 }; } From e1bb3004605e4adb5b10cef7fb8fb2c5ce822e67 Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Fri, 19 Jan 2024 15:32:22 +0000 Subject: [PATCH 223/224] Fix emit resolver to use same name resolver as the checker. Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/checker.ts | 650 +++--------------- .../transformers/declarations/emitResolver.ts | 272 +++++--- src/compiler/utilities.ts | 585 +++++++++++++++- ...isolatedDeclarationErrorsClasses.d.ts.diff | 24 +- ...eclarationErrorsExpandoFunctions.d.ts.diff | 55 ++ .../dte/isolatedDeclarationErrorsClasses.d.ts | 8 +- ...atedDeclarationErrorsExpandoFunctions.d.ts | 54 ++ ...atedDeclarationErrorsExpandoFunctions.d.ts | 28 + ...isolatedDeclarationErrorsClasses.d.ts.diff | 25 +- .../dte/isolatedDeclarationErrorsClasses.d.ts | 12 +- ...clarationErrorsExpandoFunctions.errors.txt | 35 + ...olatedDeclarationErrorsExpandoFunctions.js | 23 + ...dDeclarationErrorsExpandoFunctions.symbols | 41 ++ ...tedDeclarationErrorsExpandoFunctions.types | 55 ++ ...olatedDeclarationErrorsExpandoFunctions.ts | 15 + .../es6/Symbols/symbolDeclarationEmit12.ts | 2 - 16 files changed, 1179 insertions(+), 705 deletions(-) create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationErrorsExpandoFunctions.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsExpandoFunctions.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationErrorsExpandoFunctions.d.ts create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsExpandoFunctions.errors.txt create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsExpandoFunctions.js create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsExpandoFunctions.symbols create mode 100644 tests/baselines/reference/isolatedDeclarationErrorsExpandoFunctions.types create mode 100644 tests/cases/compiler/isolatedDeclarationErrorsExpandoFunctions.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 4f9301cf5f64d..34feb987c932d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -116,6 +116,7 @@ import { createModeAwareCacheKey, createModuleNotFoundChain, createMultiMap, + createNameResolver, createPrinterWithDefaults, createPrinterWithRemoveComments, createPrinterWithRemoveCommentsNeverAsciiEscape, @@ -189,6 +190,7 @@ import { find, findAncestor, findBestPatternMatch, + findConstructorDeclaration, findIndex, findLast, findLastIndex, @@ -323,7 +325,6 @@ import { getJSXTransformEnabled, getLeftmostAccessExpression, getLineAndCharacterOfPosition, - getLocalSymbolForExportDefault, getMembersOfDeclaration, getModeForUsageLocation, getModifiers, @@ -486,7 +487,6 @@ import { isCatchClauseVariableDeclarationOrBindingElement, isCheckJsEnabledForFile, isClassDeclaration, - isClassElement, isClassExpression, isClassInstanceProperty, isClassLike, @@ -497,6 +497,7 @@ import { isCompoundAssignment, isComputedNonLiteralName, isComputedPropertyName, + isConstAssertion, isConstructorDeclaration, isConstructorTypeNode, isConstructSignatureDeclaration, @@ -602,7 +603,6 @@ import { isJSDocParameterTag, isJSDocPropertyLikeTag, isJSDocPropertyTag, - isJSDocReturnTag, isJSDocSatisfiesExpression, isJSDocSatisfiesTag, isJSDocSignature, @@ -613,7 +613,6 @@ import { isJSDocTypedefTag, isJSDocTypeExpression, isJSDocTypeLiteral, - isJSDocTypeTag, isJSDocUnknownType, isJSDocVariadicType, isJsonSourceFile, @@ -658,7 +657,6 @@ import { isNewExpression, isNodeDescendantOf, isNonNullAccess, - isNullishCoalesce, isNumericLiteral, isNumericLiteralName, isObjectBindingPattern, @@ -1870,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[] = []; @@ -3011,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 @@ -3097,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(() => { @@ -3511,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) && @@ -3561,7 +3149,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } return undefined; } - else if (nameNotFoundMessage && checkAndReportErrorForInvalidInitializer()) { + else if (nameNotFoundMessage && checkAndReportErrorForInvalidInitializer(errorLocation, propertyWithInvalidInitializer, nameArg)) { return undefined; } @@ -3584,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); } @@ -3657,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; @@ -5731,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++; @@ -10351,7 +9875,6 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return false; } - /** * Push an entry on the type resolution stack. If an entry with the given target and the given property name * is already on the stack, and no entries in between already have a type, then a circularity has occurred. @@ -33086,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; } diff --git a/src/compiler/transformers/declarations/emitResolver.ts b/src/compiler/transformers/declarations/emitResolver.ts index e2c82e24da3f1..9117bd115dddc 100644 --- a/src/compiler/transformers/declarations/emitResolver.ts +++ b/src/compiler/transformers/declarations/emitResolver.ts @@ -1,13 +1,15 @@ import { __String, bindSourceFile, - canHaveLocals, CompilerOptions, ComputedPropertyName, CoreEmitResolver, createEntityVisibilityChecker, createEvaluator, + createNameResolver, + createSymbolTable, Debug, + Declaration, DeclarationName, determineIfDeclarationIsVisible, ElementAccessExpression, @@ -21,16 +23,20 @@ import { forEachEntry, FunctionDeclaration, FunctionLikeDeclaration, + getMembersOfDeclaration, getNameOfDeclaration, getNodeId, getParseTreeNode, getPropertyNameForPropertyNameNode, hasDynamicName, hasProperty, + hasStaticModifier, hasSyntacticModifier, Identifier, + InternalSymbolName, isAccessor, isBigIntLiteral, + isBinaryExpression, isComputedPropertyName, isDeclarationReadonly, isElementAccessExpression, @@ -55,17 +61,18 @@ import { isPropertyName, isSetAccessor, isSetAccessorDeclaration, - isSourceFile, isStringLiteralLike, isTemplateExpression, isVarConst, isVariableDeclaration, LateBoundDeclaration, + MemberName, ModifierFlags, Node, NodeFlags, nodeIsPresent, NoSubstitutionTemplateLiteral, + objectAllocator, ParameterDeclaration, parsePseudoBigInt, PropertyAccessExpression, @@ -73,6 +80,7 @@ import { PropertyName, PropertySignature, skipParentheses, + some, SourceFile, Symbol, SymbolAccessibility, @@ -82,38 +90,25 @@ import { VariableDeclaration, } from "../../_namespaces/ts"; - - -// /** -// * Assigning values to a property of a function will usually cause those members to be implicitly declared on the function -// * even if they were were not declared (expando functions) -// * DTE needs to detect these members and error on them since this behavior is not supported in isolated declarations -// * There are however members that can be assigned on a function that are not expando members, namely members that come from Function -// * In DTE we do not load the full d.ts so we keep a list of known members of function that can be assigned without considering them expando members. -// */ -// // const knownFunctionMembers = new Set([ -// // "I:apply", -// // "I:call", -// // "I:bind", -// // "I:toString", -// // "I:prototype", -// // "I:length", -// // ]); - - -/** @internal */ -export interface EmitDeclarationNodeLinks { +interface EmitSymbolLinks { + lateBoundSymbol?: Symbol; + signatureDeclarations?: Node[]; + lateBoundMembers?: SymbolTable; + lateBoundExports?: SymbolTable; +} +interface EmitDeclarationNodeLinks { signatureDeclarations?: Node[]; isVisible?: boolean; enumValue?: string | number | undefined; - isVisibilityComputed?: boolean + 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, @@ -124,20 +119,27 @@ export function createEmitDeclarationResolver(file: SourceFile, options: Compile return { accessibility: SymbolAccessibility.Accessible }; }, resolveName, - getTargetOfExportSpecifier + 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 { - // throw new Error("getTargetOfExportSpecifier"); - // if (idText(node.propertyName || node.name) === InternalSymbolName.Default) { - // const specifier = getModuleSpecifierForImportOrExport(node); - // const moduleSymbol = specifier && resolveEntityName(node, specifier, SymbolFlags.Module); - // if (moduleSymbol) { - // return resolveEntityName(moduleSymbol, node); - // } - // } const resolved = resolveEntityName(node, node.propertyName || node.name, meaning); return resolved; } @@ -186,27 +188,123 @@ export function createEmitDeclarationResolver(file: SourceFile, options: Compile } } - function resolveName(enclosingDeclaration: Node, key: __String, meaning: SymbolFlags) { - function getSymbolFromScope(table: SymbolTable | undefined) { - const symbol = table?.get(key); - if (symbol && ((symbol.flags & meaning) || (symbol.flags & SymbolFlags.Alias))) { - return symbol; + 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(); } - let currentScope = enclosingDeclaration; - while (currentScope) { - if(canHaveLocals(currentScope)) { - let symbol = getSymbolFromScope(currentScope.locals); - if (!symbol && (isModuleDeclaration(currentScope) || isSourceFile(currentScope)) && currentScope.symbol) { - symbol = getSymbolFromScope(currentScope.symbol.exports); + 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); + } } - if (symbol) return symbol; } - currentScope = currentScope.parent; } - return undefined; + 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); @@ -346,7 +444,6 @@ export function createEmitDeclarationResolver(file: SourceFile, options: Compile if (!declaration) { return false; } - const symbol = declaration.symbol; if (isVariableDeclaration(declaration)) { if (declaration.type || !isVarConst(declaration)) { return false; @@ -355,7 +452,13 @@ export function createEmitDeclarationResolver(file: SourceFile, options: Compile return false; } } - return !!symbol.exports && !!forEachEntry(symbol.exports, p => p.flags & SymbolFlags.Value && isExpandoPropertyDeclaration(p.valueDeclaration)); + + 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 { @@ -366,10 +469,11 @@ export function createEmitDeclarationResolver(file: SourceFile, options: Compile return undefined; }, getPropertiesOfContainerFunction(node: FunctionDeclaration | VariableDeclaration) { - return [...node.symbol.exports?.values() ?? []]; + const symbol = getSymbolOfDeclaration(node); + return [...symbol.exports?.values() ?? [], ...resolveAllLateBoundSymbols(symbol, /*isStatic*/ true).values()]; }, getAllAccessorDeclarations(declaration) { - const symbol = declaration.symbol; + const symbol = getSymbolOfDeclaration(declaration); const declaredAccessors = symbol?.declarations?.filter(isAccessor); const declarations = declaredAccessors?.length ? declaredAccessors : [declaration]; return { @@ -426,9 +530,8 @@ export function createEmitDeclarationResolver(file: SourceFile, options: Compile return !hasDynamicName(node) || isIdentifierComputedName(name); }, isImplementationOfOverload(node) { - function getSignaturesOfSymbol(symbol: Symbol | undefined): Node[] { - if (!symbol || !symbol.valueDeclaration) return emptyArray; - const links = getNodeLinks(symbol.valueDeclaration); + function getSignaturesOfSymbol(symbol: Symbol): Node[] { + const links = getSymbolLinks(symbol); if (links.signatureDeclarations) return links.signatureDeclarations; if (!symbol || !symbol.declarations) return (links.signatureDeclarations = emptyArray); @@ -436,14 +539,7 @@ export function createEmitDeclarationResolver(file: SourceFile, options: Compile const result: Node[] = links.signatureDeclarations = []; for (let i = 0; i < symbol.declarations.length; i++) { const decl = symbol.declarations[i]; - if (!isFunctionLike(decl) || isGetAccessor(decl) || isSetAccessor(decl)) { - // If non methods got merged in a class member bail with an empty array - // This is TS error behavior and we want to preserve iot as much as possible - // if(isClassElement(decl)) { - // return emptyArray; - // } - continue; - } + 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). @@ -462,7 +558,7 @@ export function createEmitDeclarationResolver(file: SourceFile, options: Compile 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 = node.symbol; + 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; @@ -510,7 +606,6 @@ export function createEmitDeclarationResolver(file: SourceFile, options: Compile function isDeclarationVisible(node: Node): boolean { if (node) { - const links = getNodeLinks(node); links.isVisible ??= !!determineIfDeclarationIsVisible(node, isDeclarationVisible); return links.isVisible; @@ -520,26 +615,29 @@ export function createEmitDeclarationResolver(file: SourceFile, options: Compile } } -/** - * Gets the symbolic name for a member from its type. - * @internal - */ -export function getSymbolName(name: Exclude): __String; -/** - * Gets the symbolic name for a member from its type. - * @internal - */ -export function getSymbolName(name: ElementAccessExpression | PropertyName): __String | undefined; -export function getSymbolName(name: ElementAccessExpression | PropertyName): __String | undefined { - +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): + isElementAccessExpression(name) && isPropertyName(name.argumentExpression) ? getPropertyNameForPropertyNameNode(name.argumentExpression) : undefined; - if(staticName) return staticName; + if (staticName) return staticName; + + return getDynamicSymbolName(name); +} + +function getEntityNameComponent(identifier: MemberName): __String { + const name = getPropertyNameForPropertyNameNode(identifier); + if (name && name.indexOf(".")) { + return name.replace(/\./g, "..") as __String; + } + return name; +} - let computedName = isComputedPropertyName(name) ? name.expression: - isElementAccessExpression(name) ? name.argumentExpression: +function getDynamicSymbolName(name: ElementAccessExpression | PropertyName) { + let computedName = isComputedPropertyName(name) ? name.expression : + isElementAccessExpression(name) ? name.argumentExpression : undefined; if (computedName) { @@ -547,19 +645,19 @@ export function getSymbolName(name: ElementAccessExpression | PropertyName): __S // We only support dotted identifiers as property keys while (true) { if (isIdentifier(computedName)) { - fullId += computedName.escapedText; - break; + const componentName = getEntityNameComponent(computedName); + fullId += componentName; + return fullId as __String; } else if (isPropertyAccessExpression(computedName)) { - fullId += computedName.name.escapedText; + const componentName = getEntityNameComponent(computedName.name); computedName = computedName.expression; + fullId += componentName + "."; } else { - // Can't compute a property key, bail return undefined; } } - return fullId as __String; } return undefined; } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index e83b7f2be941b..289977b77acce 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -43,6 +43,7 @@ import { CallLikeExpression, CallSignatureDeclaration, canHaveDecorators, + canHaveLocals, canHaveModifiers, CaseBlock, CaseClause, @@ -235,16 +236,19 @@ import { IndexInfo, indexOfAnyCharCode, IndexSignatureDeclaration, + InferTypeNode, InitializedVariableDeclaration, insertSorted, InstanceofExpression, InterfaceDeclaration, InternalEmitFlags, + InternalSymbolName, isAccessor, isAnyDirectorySeparator, isArray, isArrayLiteralExpression, isArrowFunction, + isAssertionExpression, isAutoAccessorPropertyDeclaration, isBigIntLiteral, isBinaryExpression, @@ -259,6 +263,7 @@ import { isCommaListExpression, isComputedPropertyName, isConstructorDeclaration, + isConstTypeReference, isDeclaration, isDecorator, isElementAccessExpression, @@ -295,6 +300,7 @@ import { isJSDocOverloadTag, isJSDocParameterTag, isJSDocPropertyLikeTag, + isJSDocReturnTag, isJSDocSatisfiesTag, isJSDocSignature, isJSDocTag, @@ -316,15 +322,19 @@ import { isMethodOrAccessor, isModifierLike, isModuleDeclaration, + isModuleOrEnumDeclaration, isNamedDeclaration, isNamespaceExport, isNamespaceExportDeclaration, isNamespaceImport, isNonNullExpression, isNoSubstitutionTemplateLiteral, + isNullishCoalesce, isNumericLiteral, + isObjectBindingPattern, isObjectLiteralExpression, isOmittedExpression, + isOptionalChain, isParameter, isParameterPropertyDeclaration, isParenthesizedExpression, @@ -351,6 +361,7 @@ import { isTypeLiteralNode, isTypeNode, isTypeParameterDeclaration, + isTypeQueryNode, isTypeReferenceNode, isVariableDeclaration, isVariableStatement, @@ -5107,6 +5118,9 @@ export function isIdentifierComputedName(name: DeclarationName): boolean { } /** @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: @@ -10963,8 +10977,6 @@ export function createEntityVisibilityChecker({ isDeclarationVisible, isThisAcce getSpellingSuggestions?: boolean, ): Symbol | undefined; }) { - - function collectLinkedAliases(node: Identifier, setVisibility?: boolean): Node[] | undefined { let exportSymbol: Symbol | undefined; if (node.parent && node.parent.kind === SyntaxKind.ExportAssignment) { @@ -11153,3 +11165,572 @@ export function isPrimitiveLiteralValue(node: Expression, includeBigInt = true): } 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/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 index e6fca408e428b..a1ba1c9c32509 100644 --- 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 @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -17,15 +17,23 @@ +@@ -17,15 +17,21 @@ set getSetOk2(value: number); get getSetOk3(): number; set getSetOk3(value: number); @@ -18,8 +18,6 @@ + [missing]: number; [noAnnotationLiteralName](): void; [noParamAnnotationLiteralName](v: string): void; -+ [noAnnotationStringName](): void; -+ [noParamAnnotationStringName](v: invalid): void; + get [noAnnotationStringName](): number; + set [noParamAnnotationStringName](value: invalid); } @@ -29,12 +27,9 @@ } export {}; -@@ -33,16 +41,18 @@ - - 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. +@@ -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(44,35): error TS9011: Parameter must have an explicit 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. @@ -44,23 +39,12 @@ -==== isolatedDeclarationErrorsClasses.ts (8 errors) ==== -+==== isolatedDeclarationErrorsClasses.ts (10 errors) ==== ++==== isolatedDeclarationErrorsClasses.ts (9 errors) ==== export class Cls { field: number = 1 + 1; method(): void {} -@@ -91,16 +101,22 @@ - - [noParamAnnotationStringName](v): void { } - ~ - !!! error TS7006: Parameter 'v' implicitly has an 'any' type. -+ ~ -+!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -+!!! related TS9028 isolatedDeclarationErrorsClasses.ts:44:35: Add a type annotation to the parameter v. - - get [noAnnotationStringName](): number { return 0;} - - set [noParamAnnotationStringName](value) { } +@@ -99,8 +106,11 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation. ~~~~~ 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..5bfaa64825de6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationErrorsExpandoFunctions.d.ts.diff @@ -0,0 +1,55 @@ +// [[Reason: 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/dte/isolatedDeclarationErrorsClasses.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsClasses.d.ts index deea9e5fed88d..9775b1125a00d 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsClasses.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationErrorsClasses.d.ts @@ -89,8 +89,6 @@ export declare class C { [missing]: number; [noAnnotationLiteralName](): void; [noParamAnnotationLiteralName](v: string): void; - [noAnnotationStringName](): void; - [noParamAnnotationStringName](v: invalid): void; get [noAnnotationStringName](): number; set [noParamAnnotationStringName](value: invalid); } @@ -105,7 +103,6 @@ export {}; 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(44,35): error TS9011: Parameter must have an explicit 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. @@ -114,7 +111,7 @@ isolatedDeclarationErrorsClasses.ts(55,5): error TS1169: A computed property nam isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralName]', which lacks return-type annotation, implicitly has an 'any' return type. -==== isolatedDeclarationErrorsClasses.ts (10 errors) ==== +==== isolatedDeclarationErrorsClasses.ts (9 errors) ==== export class Cls { field: number = 1 + 1; @@ -165,9 +162,6 @@ isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralNa [noParamAnnotationStringName](v): void { } ~ !!! error TS7006: Parameter 'v' implicitly has an 'any' type. - ~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 isolatedDeclarationErrorsClasses.ts:44:35: Add a type annotation to the parameter v. get [noAnnotationStringName](): number { return 0;} 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/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/original/diff/isolatedDeclarationErrorsClasses.d.ts.diff b/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrorsClasses.d.ts.diff index 2ef3cc8ae222f..ed1ea183d51f5 100644 --- a/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrorsClasses.d.ts.diff +++ b/tests/baselines/reference/isolated-declarations/original/diff/isolatedDeclarationErrorsClasses.d.ts.diff @@ -5,7 +5,7 @@ =================================================================== --- TSC declarations +++ DTE declarations -@@ -17,15 +17,23 @@ +@@ -17,15 +17,21 @@ set getSetOk2(value: number); get getSetOk3(): number; set getSetOk3(value: number); @@ -18,8 +18,6 @@ + [missing]: number; [noAnnotationLiteralName](): void; [noParamAnnotationLiteralName](v: string): void; -+ [noAnnotationStringName](): invalid; -+ [noParamAnnotationStringName](v: invalid): void; + get [noAnnotationStringName](): invalid; + set [noParamAnnotationStringName](value: invalid); } @@ -29,17 +27,15 @@ } export {}; -@@ -42,15 +50,15 @@ +@@ -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(42,5): error TS9008: Method must have an explicit return type annotation 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(44,35): error TS9011: Parameter must have an explicit type annotation 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. @@ -49,23 +45,26 @@ 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. -@@ -130,27 +138,31 @@ + +-==== 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. -+!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -+!!! related TS9034 isolatedDeclarationErrorsClasses.ts:42:5: Add a return type to the method [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. -+ ~ -+!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -+!!! related TS9028 isolatedDeclarationErrorsClasses.ts:44:35: Add a type annotation to the parameter v. get [noAnnotationStringName]() { return 0;} ~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsClasses.d.ts b/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsClasses.d.ts index 44cf94c995b06..35277ad5bd69c 100644 --- a/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsClasses.d.ts +++ b/tests/baselines/reference/isolated-declarations/original/dte/isolatedDeclarationErrorsClasses.d.ts @@ -89,8 +89,6 @@ export declare class C { [missing]: number; [noAnnotationLiteralName](): void; [noParamAnnotationLiteralName](v: string): void; - [noAnnotationStringName](): invalid; - [noParamAnnotationStringName](v: invalid): void; get [noAnnotationStringName](): invalid; set [noParamAnnotationStringName](value: invalid); } @@ -114,9 +112,7 @@ isolatedDeclarationErrorsClasses.ts(12,17): error TS9009: At least one accessor 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 TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. isolatedDeclarationErrorsClasses.ts(44,35): error TS7006: Parameter 'v' implicitly has an 'any' type. -isolatedDeclarationErrorsClasses.ts(44,35): error TS9011: Parameter must have an explicit type annotation 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,39): error TS7006: Parameter 'value' implicitly has an 'any' type. @@ -126,7 +122,7 @@ isolatedDeclarationErrorsClasses.ts(55,5): error TS1169: A computed property nam 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; @@ -201,16 +197,10 @@ isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralNa [noParamAnnotationLiteralName](v: string): void { } [noAnnotationStringName]() { } - ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations. -!!! related TS9034 isolatedDeclarationErrorsClasses.ts:42:5: Add a return type to the method [noParamAnnotationStringName](v): void { } ~ !!! error TS7006: Parameter 'v' implicitly has an 'any' type. - ~ -!!! error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations. -!!! related TS9028 isolatedDeclarationErrorsClasses.ts:44:35: Add a type annotation to the parameter v. get [noAnnotationStringName]() { return 0;} ~~~~~~~~~~~~~~~~~~~~~~~~ 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/cases/compiler/isolatedDeclarationErrorsExpandoFunctions.ts b/tests/cases/compiler/isolatedDeclarationErrorsExpandoFunctions.ts new file mode 100644 index 0000000000000..503c3de6cb3f8 --- /dev/null +++ b/tests/cases/compiler/isolatedDeclarationErrorsExpandoFunctions.ts @@ -0,0 +1,15 @@ +// @declaration: true +// @isolatedDeclarations: true +// @declarationMap: false +// @target: ESNext +// @isolatedDeclarationFixedDiffReason: 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/conformance/es6/Symbols/symbolDeclarationEmit12.ts b/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts index 80f6bc43bd006..8422b1ec016de 100644 --- a/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts +++ b/tests/cases/conformance/es6/Symbols/symbolDeclarationEmit12.ts @@ -1,7 +1,5 @@ //@target: ES6 //@declaration: true -//@isolatedDeclarationDiffReason: Invalid computed property can only be detected by TSC -//@isolatedDeclarationFixedDiffReason: Can't fix computed properties module M { interface I { } export class C { From dc1ffe92039e06d130a9c4fdaa4aa9b37968d3bb Mon Sep 17 00:00:00 2001 From: Titian Cernicova-Dragomir Date: Sun, 21 Jan 2024 15:44:16 +0000 Subject: [PATCH 224/224] Switched over to `entityNameToString` Signed-off-by: Titian Cernicova-Dragomir --- src/compiler/debug.ts | 14 +- .../transformers/declarations/emitResolver.ts | 120 +++++++----------- ...eclarationErrorsExpandoFunctions.d.ts.diff | 2 +- .../isolatedDeclarationLazySymbols.d.ts.diff | 45 +++++++ .../dte/isolatedDeclarationLazySymbols.d.ts | 87 +++++++++++++ .../tsc/isolatedDeclarationLazySymbols.d.ts | 87 +++++++++++++ .../isolatedDeclarationLazySymbols.errors.txt | 40 ++++++ .../isolatedDeclarationLazySymbols.js | 45 +++++++ .../isolatedDeclarationLazySymbols.symbols | 69 ++++++++++ .../isolatedDeclarationLazySymbols.types | 89 +++++++++++++ ...olatedDeclarationErrorsExpandoFunctions.ts | 2 +- .../isolatedDeclarationLazySymbols.ts | 29 +++++ 12 files changed, 548 insertions(+), 81 deletions(-) create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/diff/isolatedDeclarationLazySymbols.d.ts.diff create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/dte/isolatedDeclarationLazySymbols.d.ts create mode 100644 tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isolatedDeclarationLazySymbols.d.ts create mode 100644 tests/baselines/reference/isolatedDeclarationLazySymbols.errors.txt create mode 100644 tests/baselines/reference/isolatedDeclarationLazySymbols.js create mode 100644 tests/baselines/reference/isolatedDeclarationLazySymbols.symbols create mode 100644 tests/baselines/reference/isolatedDeclarationLazySymbols.types create mode 100644 tests/cases/compiler/isolatedDeclarationLazySymbols.ts 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/transformers/declarations/emitResolver.ts b/src/compiler/transformers/declarations/emitResolver.ts index 9117bd115dddc..ccef24871a1f3 100644 --- a/src/compiler/transformers/declarations/emitResolver.ts +++ b/src/compiler/transformers/declarations/emitResolver.ts @@ -1,5 +1,6 @@ import { __String, + BigIntLiteral, bindSourceFile, CompilerOptions, ComputedPropertyName, @@ -14,6 +15,7 @@ import { determineIfDeclarationIsVisible, ElementAccessExpression, emptyArray, + entityNameToString, EnumDeclaration, EnumMember, ExportSpecifier, @@ -35,7 +37,6 @@ import { Identifier, InternalSymbolName, isAccessor, - isBigIntLiteral, isBinaryExpression, isComputedPropertyName, isDeclarationReadonly, @@ -54,27 +55,25 @@ import { isIdentifier, isInfinityOrNaNString, isModuleDeclaration, - isNumericLiteral, - isPrefixUnaryExpression, isPrimitiveLiteralValue, isPropertyAccessExpression, isPropertyName, isSetAccessor, isSetAccessorDeclaration, isStringLiteralLike, - isTemplateExpression, isVarConst, isVariableDeclaration, LateBoundDeclaration, - MemberName, ModifierFlags, Node, NodeFlags, nodeIsPresent, NoSubstitutionTemplateLiteral, + NumericLiteral, objectAllocator, ParameterDeclaration, parsePseudoBigInt, + PrefixUnaryExpression, PropertyAccessExpression, PropertyDeclaration, PropertyName, @@ -82,11 +81,13 @@ import { skipParentheses, some, SourceFile, + StringLiteralLike, Symbol, SymbolAccessibility, SymbolFlags, SymbolTable, SyntaxKind, + TemplateExpression, VariableDeclaration, } from "../../_namespaces/ts"; @@ -357,48 +358,44 @@ export function createEmitDeclarationResolver(file: SourceFile, options: Compile onNumericLiteral() {}, }); function clonePrimitiveLiteralValue(node: Expression): Expression { - if (isNumericLiteral(node)) { - return factory.createNumericLiteral(node.text); - } - if (isBigIntLiteral(node)) { - return factory.createBigIntLiteral({ negative: false, base10Value: parsePseudoBigInt(node.text) }); - } - if (isStringLiteralLike(node)) { - return factory.createStringLiteral(node.text); - } - - if (node.kind === SyntaxKind.FalseKeyword) { - return factory.createFalse(); - } - - if (node.kind === SyntaxKind.TrueKeyword) { - return factory.createTrue(); - } - - if (isPrefixUnaryExpression(node)) { - return factory.createPrefixUnaryExpression( - node.operator, - clonePrimitiveLiteralValue(node.operand), - ); - } - if (isTemplateExpression(node)) { - const evaluatedValue = evaluate(node); - if (evaluatedValue !== undefined) { - return factory.createStringLiteral(evaluatedValue); - } - return factory.createTemplateExpression( - factory.createTemplateHead(node.head.text, node.head.rawText, node.head.templateFlags), - node.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), - ) - ), - ); + 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}`); } - Debug.assert(false, `Unable to clone unknown literal type. Kind: ${node.kind}`); } function isLiteralConstDeclaration(node: VariableDeclaration | PropertyDeclaration | PropertySignature | ParameterDeclaration): boolean { @@ -627,37 +624,12 @@ function getSymbolName(name: ElementAccessExpression | PropertyName): __String | return getDynamicSymbolName(name); } -function getEntityNameComponent(identifier: MemberName): __String { - const name = getPropertyNameForPropertyNameNode(identifier); - if (name && name.indexOf(".")) { - return name.replace(/\./g, "..") as __String; - } - return name; -} - function getDynamicSymbolName(name: ElementAccessExpression | PropertyName) { - let computedName = isComputedPropertyName(name) ? name.expression : + const computedName = isComputedPropertyName(name) ? name.expression : isElementAccessExpression(name) ? name.argumentExpression : undefined; - - if (computedName) { - let fullId = "__!"; - // We only support dotted identifiers as property keys - while (true) { - if (isIdentifier(computedName)) { - const componentName = getEntityNameComponent(computedName); - fullId += componentName; - return fullId as __String; - } - else if (isPropertyAccessExpression(computedName)) { - const componentName = getEntityNameComponent(computedName.name); - computedName = computedName.expression; - fullId += componentName + "."; - } - else { - return undefined; - } - } + if (computedName && isEntityNameExpression(computedName)) { + return ("__!" + entityNameToString(computedName)) as __String; } return undefined; } 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 index 5bfaa64825de6..f677c51d38b54 100644 --- 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 @@ -1,4 +1,4 @@ -// [[Reason: Function declarations are not fixed.]] //// +// [[Reason: Expando function declarations are not fixed.]] //// //// [tests/cases/compiler/isolatedDeclarationErrorsExpandoFunctions.ts] //// 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/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/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/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/cases/compiler/isolatedDeclarationErrorsExpandoFunctions.ts b/tests/cases/compiler/isolatedDeclarationErrorsExpandoFunctions.ts index 503c3de6cb3f8..2afd232fdb232 100644 --- a/tests/cases/compiler/isolatedDeclarationErrorsExpandoFunctions.ts +++ b/tests/cases/compiler/isolatedDeclarationErrorsExpandoFunctions.ts @@ -2,7 +2,7 @@ // @isolatedDeclarations: true // @declarationMap: false // @target: ESNext -// @isolatedDeclarationFixedDiffReason: Function declarations are not fixed. +// @isolatedDeclarationFixedDiffReason: Expando function declarations are not fixed. export function foo() {} 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

]: { + 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;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,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAEtE;AAID,KAAK,GAAG,CAAC,CAAC,SAAS,MAAM,IAAI;KACxB,SAAS,IAAI,CAAC,IAAI,MAAM,SAAS,EAAE,GAAG,SAA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N0cmluZz4ob2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5czogT2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5czxLPiwga2V5OiBLKTogdm9pZCB7CiAgY29uc3Qgc2hvdWxkQmVUcnVlOiB0cnVlID0gb2JqZWN0V2l0aFVuZGVyc2NvcmVkS2V5c1tgXyR7a2V5fWBdOwp9Cg== + 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..2576057761f97 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mappedTypeGenericIndexedAccess.d.ts.map @@ -0,0 +1,53 @@ +//// [tests/cases/compiler/mappedTypeGenericIndexedAccess.ts] //// + + + +/// [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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uYSksCn07Cgpjb25zdCBvblNvbWVFdmVudCA9IDxUIGV4dGVuZHMga2V5b2YgVHlwZXNNYXA+KHA6IFA8VD4pOiB2b2lkIHwgdW5kZWZpbmVkID0+CiAgICB0eXBlSGFuZGxlcnNbcC50XT8uKHApOwo= + diff --git a/tests/baselines/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..9464b8ca8029c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/mixinClassesAnnotated.d.ts.map @@ -0,0 +1,49 @@ +//// [tests/cases/conformance/classes/mixinClassesAnnotated.ts] //// + + + +/// [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,GAA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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..06dbaeb2fdd70 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/moduleDeclarationExportStarShadowingGlobalIsNameable.d.ts.map @@ -0,0 +1,53 @@ +//// [tests/cases/compiler/moduleDeclarationExportStarShadowingGlobalIsNameable.ts] //// + + + +/// [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/nodeModuleReexportFromDottedPath.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModuleReexportFromDottedPath.d.ts index efd6c0d327990..0b7b1ad2603af 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModuleReexportFromDottedPath.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModuleReexportFromDottedPath.d.ts @@ -27,7 +27,6 @@ export default new EnhancedPrisma(); declare const _default: invalid; export default _default; //# sourceMappingURL=index.d.ts.map - /// [Errors] //// /index.ts(4,16): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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..28fbb8d6585f1 --- /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] //// + +//// [subfolder/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" +} +//// [subfolder/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..28fbb8d6585f1 --- /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] //// + +//// [subfolder/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" +} +//// [subfolder/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 index 404a4d01d329b..df0ac13b8f26d 100644 --- 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 @@ -33,7 +33,6 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; //# sourceMappingURL=index.d.ts.map - /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 404a4d01d329b..df0ac13b8f26d 100644 --- 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 @@ -33,7 +33,6 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; //# sourceMappingURL=index.d.ts.map - /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 282a222c27882..0bb86851c4940 100644 --- 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 @@ -34,17 +34,14 @@ export const x: () => Thing = null as any; //// [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'. 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 index 282a222c27882..0bb86851c4940 100644 --- 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 @@ -34,17 +34,14 @@ export const x: () => Thing = null as any; //// [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'. 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 index 1a91cdff6e298..ad02db5ab3d72 100644 --- 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 @@ -40,7 +40,6 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; //# sourceMappingURL=index.d.ts.map - /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 1a91cdff6e298..ad02db5ab3d72 100644 --- 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 @@ -40,7 +40,6 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; //# sourceMappingURL=index.d.ts.map - /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 91a9114902939..868f7b7fd545c 100644 --- 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 @@ -35,7 +35,6 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; //# sourceMappingURL=index.d.ts.map - /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index 91a9114902939..868f7b7fd545c 100644 --- 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 @@ -35,7 +35,6 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; //# sourceMappingURL=index.d.ts.map - /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index a211cd95faddd..d5d6589e987ab 100644 --- 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 @@ -35,7 +35,6 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; //# sourceMappingURL=index.d.ts.map - /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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 index a211cd95faddd..d5d6589e987ab 100644 --- 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 @@ -35,7 +35,6 @@ export const x: () => Thing; //// [index.d.ts] export declare const a: invalid; //# sourceMappingURL=index.d.ts.map - /// [Errors] //// error TS2468: Cannot find global value 'Promise'. 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..053e0d16e1510 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesForbidenSyntax(module=node16).d.ts.map @@ -0,0 +1,78 @@ +//// [tests/cases/conformance/node/nodeModulesForbidenSyntax.ts] //// + + + +/// [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..053e0d16e1510 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nodeModulesForbidenSyntax(module=nodenext).d.ts.map @@ -0,0 +1,78 @@ +//// [tests/cases/conformance/node/nodeModulesForbidenSyntax.ts] //// + + + +/// [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..832db12d182cf --- /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] //// + +//// [subfolder/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" +} +//// [subfolder/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..832db12d182cf --- /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] //// + +//// [subfolder/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" +} +//// [subfolder/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..6e944e455cd2a --- /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); + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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..6e944e455cd2a --- /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); + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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..0953d29a97d5f --- /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] //// + +//// [subfolder/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" +} +//// [subfolder/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..0953d29a97d5f --- /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] //// + +//// [subfolder/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" +} +//// [subfolder/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..6b04ed6bbe2dd --- /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] //// + +//// [subfolder/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" +} +//// [subfolder/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..6b04ed6bbe2dd --- /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] //// + +//// [subfolder/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" +} +//// [subfolder/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..78e25837599e9 --- /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); + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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..78e25837599e9 --- /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); + +//// [/node_modules/pkg/package.json] +{ + "name": "pkg", + "version": "0.0.1", + "exports": { + "import": "./import.js", + "require": "./require.js" + } +} +//// [/node_modules/pkg/import.d.ts] +export interface ImportInterface {} +//// [/node_modules/pkg/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 index de7dd626574b5..7d341991e7448 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nullPropertyName.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/nullPropertyName.d.ts @@ -92,7 +92,6 @@ foo.of = 1; //// [nullPropertyName.d.ts] declare function foo(): void; //# sourceMappingURL=nullPropertyName.d.ts.map - /// [Errors] //// nullPropertyName.ts(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. 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 index 853f569d5f14b..bd10e86efe4ee 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/numericEnumMappedType.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/numericEnumMappedType.d.ts @@ -84,7 +84,6 @@ declare enum E { declare const e: E; declare const x: E.ONE; //# sourceMappingURL=numericEnumMappedType.d.ts.map - /// [Errors] //// numericEnumMappedType.ts(25,11): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalMethods.d.ts new file mode 100644 index 0000000000000..2e361c0198f60 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalMethods.d.ts @@ -0,0 +1,93 @@ +//// [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; + e: number; + a: number; + b?: number; + c?: number; + constructor(d?: number, 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 \ No newline at end of file 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..f7fac24e04ed9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/optionalProperties01.d.ts.map @@ -0,0 +1,26 @@ +//// [tests/cases/conformance/types/typeRelationships/comparable/optionalProperties01.ts] //// + + + +/// [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..0ec623098199f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parameterDestructuringObjectLiteral.d.ts.map @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/parameterDestructuringObjectLiteral.ts] //// + + + +/// [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/paramterDestrcuturingDeclaration.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/paramterDestrcuturingDeclaration.d.ts new file mode 100644 index 0000000000000..00699300847e4 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/paramterDestrcuturingDeclaration.d.ts @@ -0,0 +1,47 @@ +//// [tests/cases/compiler/paramterDestrcuturingDeclaration.ts] //// + +//// [paramterDestrcuturingDeclaration.ts] +interface C { + ({p: name}: { + p: any; + }): any; + new ({p: boolean}: { + p: any; + }): any; +} + + +/// [Declarations] //// + + + +//// [paramterDestrcuturingDeclaration.d.ts] +interface C { + ({ p: name }: { + p: any; + }): any; + new ({ p: boolean }: { + p: any; + }): any; +} +//# sourceMappingURL=paramterDestrcuturingDeclaration.d.ts.map +/// [Errors] //// + +paramterDestrcuturingDeclaration.ts(2,10): error TS2842: 'name' is an unused renaming of 'p'. Did you intend to use it as a type annotation? +paramterDestrcuturingDeclaration.ts(5,14): error TS2842: 'boolean' is an unused renaming of 'p'. Did you intend to use it as a type annotation? + + +==== paramterDestrcuturingDeclaration.ts (2 errors) ==== + interface C { + ({p: name}: { + ~~~~ +!!! error TS2842: 'name' is an unused renaming of 'p'. Did you intend to use it as a type annotation? + p: any; + }): any; + new ({p: boolean}: { + ~~~~~~~ +!!! error TS2842: 'boolean' is an unused renaming of 'p'. Did you intend to use it as a type annotation? + p: any; + }): any; + } + \ No newline at end of file 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..64ae3564dc852 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/parenthesisDoesNotBlockAliasSymbolCreation.d.ts.map @@ -0,0 +1,39 @@ +//// [tests/cases/compiler/parenthesisDoesNotBlockAliasSymbolCreation.ts] //// + + + +/// [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,EAAW,CAAC,CAAC;IAAE,CAAC,EAAG,MAAM,CAAA;CAAE,CAAC,CAAC;AAC3C,eAAO,MAAM,EAAE,EAAW,EAAE,CAAC;IAAE,CAAC,EAAG,MAAM,CAAA;CAAE,CAAC,CAAC;AAC7C,eAAO,MAAM,EAAE,EAAW;IAAE,CAAC,EAAG,MAAM,CAAA;CAAE,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;AAC5D,eAAO,MAAM,EAAE,EAAW;IAAE,CAAC,EAAG,MAAM,CAAA;CAAE,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IHR5cGUgSW52YWxpZEtleXM8SyBleHRlbmRzIHN0cmluZyB8IG51bWJlciB8IHN5bWJv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IFtQIGluIEtdPyA6IG5ldmVyIH0KKTsKCmV4cG9ydCB0eXBlIEE8VD4gPSAoCiAgICBUICYgSW52YWxpZEtleXM8ImEiPgopOwpleHBvcnQgdHlwZSBBMjxUPiA9ICgKICAgIFQgJiBJbnZhbGlkS2V5czI8ImEiPgopOwoKZXhwb3J0IGNvbnN0IGEgPSBudWxsIGFzIEE8eyB4IDogbnVtYmVyIH0+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..d0b2421080ed3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/reexportWrittenCorrectlyInDeclaration.d.ts.map @@ -0,0 +1,53 @@ +//// [tests/cases/compiler/reexportWrittenCorrectlyInDeclaration.ts] //// + + + +/// [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/stringLiteralObjectLiteralDeclaration1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/stringLiteralObjectLiteralDeclaration1.d.ts.map new file mode 100644 index 0000000000000..efb6ffa6e0fa8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/stringLiteralObjectLiteralDeclaration1.d.ts.map @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/stringLiteralObjectLiteralDeclaration1.ts] //// + + + +/// [Declarations] //// + + + +//// [stringLiteralObjectLiteralDeclaration1.d.ts] +declare namespace m1 { + var n: { + 'foo bar': number; + }; +} +//# sourceMappingURL=stringLiteralObjectLiteralDeclaration1.d.ts.map + +/// [Declarations Maps] //// + + +//// [stringLiteralObjectLiteralDeclaration1.d.ts.map] +{"version":3,"file":"stringLiteralObjectLiteralDeclaration1.d.ts","sourceRoot":"","sources":["stringLiteralObjectLiteralDeclaration1.ts"],"names":[],"mappings":"AAAA,kBAAO,EAAE,CAAC;IACD,IAAI,CAAC;QAAK,SAAS;KAAK,CAAC;CACjC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBuYW1lc3BhY2UgbTEgew0KICAgIHZhciBuOiB7DQogICAgICAgICdmb28gYmFyJzogbnVtYmVyOw0KICAgIH07DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1zdHJpbmdMaXRlcmFsT2JqZWN0TGl0ZXJhbERlY2xhcmF0aW9uMS5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaW5nTGl0ZXJhbE9iamVjdExpdGVyYWxEZWNsYXJhdGlvbjEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInN0cmluZ0xpdGVyYWxPYmplY3RMaXRlcmFsRGVjbGFyYXRpb24xLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGtCQUFPLEVBQUUsQ0FBQztJQUNELElBQUksQ0FBQztRQUFLLFNBQVM7S0FBSyxDQUFDO0NBQ2pDIn0=,bW9kdWxlIG0xIHsKICBleHBvcnQgdmFyIG4gPSB7ICdmb28gYmFyJzogNCB9Owp9Cg== + 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 index 21f7415bf8c0f..a1dbcacfad5c2 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit12.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit12.d.ts @@ -32,7 +32,6 @@ declare namespace M { export {}; } //# sourceMappingURL=symbolDeclarationEmit12.d.ts.map - /// [Errors] //// symbolDeclarationEmit12.ts(5,9): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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..95e610bc0f65f --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit8.d.ts.map @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit8.ts] //// + + + +/// [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..3e4ac70a09d84 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolDeclarationEmit9.d.ts.map @@ -0,0 +1,22 @@ +//// [tests/cases/conformance/es6/Symbols/symbolDeclarationEmit9.ts] //// + + + +/// [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 index 26326b0e17a4a..847e35281f833 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolLinkDeclarationEmitModuleNamesImportRef.d.ts @@ -27,7 +27,6 @@ export interface InterpolationValue {} //// [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: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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..eed66802f5fc8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/symbolObserverMismatchingPolyfillsWorkTogether.d.ts.map @@ -0,0 +1,28 @@ +//// [tests/cases/compiler/symbolObserverMismatchingPolyfillsWorkTogether.ts] //// + + + +/// [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/templateLiteralTypes2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes2.d.ts.map new file mode 100644 index 0000000000000..fdc9cadbaf9e5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes2.d.ts.map @@ -0,0 +1,51 @@ +//// [tests/cases/conformance/types/literal/templateLiteralTypes2.ts] //// + + + +/// [Declarations] //// + + + +//// [templateLiteralTypes2.d.ts] +declare function ft1(s: string, n: number, u: 'foo' | 'bar' | 'baz', t: T): void; +declare function ft2(s: string): string; +declare function ft10(s: string): void; +declare function ft11(s: string, cond: boolean): void; +declare function ft12(s: string): void; +declare function widening(x: T): T; +declare function nonWidening(x: T): T; +declare function ft13(s: string, cond: boolean): void; +type T0 = string | `${number}px`; +declare function ft14(t: `foo${number}`): void; +declare function g1(x: T): T; +declare function g2(x: T): T; +declare function ft20(s: string): void; +declare function takesLiteral(literal: T): T extends `foo.bar.${infer R}` ? R : unknown; +declare const t1: "baz"; +declare const id2 = "foo.bar.baz"; +declare const t2: "baz"; +declare const someString: string; +declare const t3: string; +declare const id4: string; +declare const t4: unknown; +declare const someUnion: 'abc' | 'def' | 'ghi'; +declare const t5: "abc" | "def" | "ghi"; +declare const pixelValue: number; +type PixelValueType = `${number}px`; +declare const pixelString: PixelValueType; +declare const pixelStringWithTemplate: PixelValueType; +declare function getCardTitle(title: string): `test-${string}`; +declare const interpolatedStyle: { + rotate: number; +}; +declare function C2(transform: "-moz-initial" | (string & {})): number; +//# sourceMappingURL=templateLiteralTypes2.d.ts.map + +/// [Declarations Maps] //// + + +//// [templateLiteralTypes2.d.ts.map] +{"version":3,"file":"templateLiteralTypes2.d.ts","sourceRoot":"","sources":["templateLiteralTypes2.ts"],"names":[],"mappings":"AAAA,iBAAS,GAAG,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,CASzF;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE9B;AAED,iBAAS,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAS7B;AAED,iBAAS,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAW5C;AAED,iBAAS,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAW7B;AAED,OAAO,UAAU,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AACtC,OAAO,UAAU,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAE1E,iBAAS,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAK5C;AAED,KAAK,EAAE,GAAG,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC;AA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HNvbWVVbmlvbjogJ2FiYycgfCAnZGVmJyB8ICdnaGknOwpjb25zdCB0NTogImFiYyIgfCAiZGVmIiB8ICJnaGkiID0gdGFrZXNMaXRlcmFsKGBmb28uYmFyLiR7c29tZVVuaW9ufWApOyAgLy8gImFiYyIgfCAiZGVmIiB8ICJnaGkiCgovLyBSZXBybyBmcm9tICM0MTczMgoKY29uc3QgcGl4ZWxWYWx1ZTogbnVtYmVyID0gMjI7Cgp0eXBlIFBpeGVsVmFsdWVUeXBlID0gYCR7bnVtYmVyfXB4YDsKCmNvbnN0IHBpeGVsU3RyaW5nOiBQaXhlbFZhbHVlVHlwZSA9IGAyMnB4YDsKCmNvbnN0IHBpeGVsU3RyaW5nV2l0aFRlbXBsYXRlOiBQaXhlbFZhbHVlVHlwZSA9IGAke3BpeGVsVmFsdWV9cHhgOwoKLy8gUmVwcm8gZnJvbSAjNDMxNDMKCmZ1bmN0aW9uIGdldENhcmRUaXRsZSh0aXRsZTogc3RyaW5nKTogYHRlc3QtJHtzdHJpbmd9YCB7CiAgICByZXR1cm4gYHRlc3QtJHt0aXRsZX1gOwp9CgovLyBSZXBybyBmcm9tICM0MzQyNAoKY29uc3QgaW50ZXJwb2xhdGVkU3R5bGUgPSB7IHJvdGF0ZTogMTIgfTsKZnVuY3Rpb24gQzIodHJhbnNmb3JtOiAiLW1vei1pbml0aWFsIiB8IChzdHJpbmcgJiB7fSkpOiBudW1iZXIgeyByZXR1cm4gMTI7IH0KQzIoYHJvdGF0ZSgke2ludGVycG9sYXRlZFN0eWxlLnJvdGF0ZX1kaWcpYCk7Cg== + 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 index 5860c44da6799..4a693f5269f1c 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes4.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralTypes4.d.ts @@ -467,7 +467,6 @@ 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 TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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..494bac7079780 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/templateLiteralsInTypes.d.ts.map @@ -0,0 +1,20 @@ +//// [tests/cases/compiler/templateLiteralsInTypes.ts] //// + + + +/// [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/typeFromPropertyAssignment29.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts index cb6042927483e..cb7e23d0afe9b 100644 --- a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeFromPropertyAssignment29.d.ts @@ -152,14 +152,9 @@ 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(1,10): error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. @@ -174,13 +169,14 @@ typeFromPropertyAssignment29.ts(87,14): error TS2339: Property 'prop' does not e typeFromPropertyAssignment29.ts(88,14): error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. typeFromPropertyAssignment29.ts(91,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoClass'. typeFromPropertyAssignment29.ts(91,50): error TS2339: Property 'm' does not exist on type 'typeof ExpandoClass'. +typeFromPropertyAssignment29.ts(94,20): error TS9011: Declaration emit for class expressions are 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,30): error TS2339: Property 'prop' does not exist on type 'typeof ExpandoExpr3'. typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exist on type 'typeof ExpandoExpr3'. -==== typeFromPropertyAssignment29.ts (16 errors) ==== +==== typeFromPropertyAssignment29.ts (17 errors) ==== function ExpandoDecl(n: number): string { ~~~~~~~~~~~ !!! error TS9009: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function. @@ -299,6 +295,8 @@ typeFromPropertyAssignment29.ts(101,50): error TS2339: Property 'm' does not exi // Class expressions shouldn't work in typescript either var ExpandoExpr3 = class { + ~~~~~ +!!! error TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. n = 10001; } ExpandoExpr3.prop = 3 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..3ba650af51802 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeGuardFunctionOfFormThis.d.ts.map @@ -0,0 +1,75 @@ +//// [tests/cases/conformance/expressions/typeGuards/typeGuardFunctionOfFormThis.ts] //// + + + +/// [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,QAAO,IAAI,IAAI,UAAU,CAE/B;IACD,OAAO,QAAO,IAAI,IAAI,UAAU,CAE/B;CACJ;AAED,cAAM,UAAW,SAAQ,UAAU;IAC/B,MAAM,IAAI,I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GV0IG1pbWljOiBNaW1pY0d1YXJkID0gbmV3IE1pbWljR3VhcmQoKTsKCmEuaXNMZWFkZXIgPSBtaW1pYy5pc0xlYWRlcjsKYS5pc0ZvbGxvd2VyID0gbWltaWMuaXNGb2xsb3dlcjsKCmlmIChtaW1pYy5pc0ZvbGxvd2VyKCkpIHsKICAgIG1pbWljLmZvbGxvdygpOwogICAgbWltaWMuaXNGb2xsb3dlciA9IGEuaXNGb2xsb3dlcjsKfQoKCmludGVyZmFjZSBNaW1pY0d1YXJkSW50ZXJmYWNlIHsKICAgIGlzTGVhZGVyKCk6IHRoaXMgaXMgTGVhZEd1YXJkOwogICAgaXNGb2xsb3dlcigpOiB0aGlzIGlzIEZvbGxvd2VyR3VhcmQ7Cn0K + 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..b4055aefa1565 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/typeofImportTypeOnlyExport.d.ts.map @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/declarationEmit/typeofImportTypeOnlyExport.ts] //// + + + +/// [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,ZGVjbGFyZSBjbGFzcyBDbGFzc01hcERpcmVjdGl2ZSB7DQp9DQpleH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mU7Cn0gPSBkaXJlY3RpdmUoQ2xhc3NNYXBEaXJlY3RpdmUpOwo= + 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 index 1dea3b73a02c8..0a51548a505dc 100644 --- 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 @@ -42,7 +42,6 @@ export function fb(): B; export declare const va: invalid; export declare const vb: invalid; //# sourceMappingURL=main.d.ts.map - /// [Errors] //// main.ts(4,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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 index 77b8109f9bd6c..ae06b2ce1ccba 100644 --- 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 @@ -40,7 +40,6 @@ export * from "../other"; 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'. 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 index a28b9a08608a8..50a7f5c172142 100644 --- 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 @@ -39,7 +39,6 @@ export * from "../other"; export declare const va: invalid; export declare const va2: invalid; //# sourceMappingURL=main.d.ts.map - /// [Errors] //// main.ts(4,19): error TS9007: Declaration emit for this file requires type resolution. An explicit type annotation may unblock declaration emit. 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..f3f2e43899d69 --- /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 TS9011: Declaration emit for class expressions are 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 TS9011: Declaration emit for class expressions are 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/uniqueSymbolsDeclarationsErrors.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/uniqueSymbolsDeclarationsErrors.d.ts.map new file mode 100644 index 0000000000000..514de2a7b1750 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/uniqueSymbolsDeclarationsErrors.d.ts.map @@ -0,0 +1,65 @@ +//// [tests/cases/conformance/types/uniqueSymbol/uniqueSymbolsDeclarationsErrors.ts] //// + + + +/// [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 + +/// [Declarations Maps] //// + + +//// [uniqueSymbolsDeclarationsEr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FzcyBDbGFzc1dpdGhQcml2YXRlTmFtZWRBY2Nlc3NvcnMgewogICAgZ2V0IFtzXSgpOiBhbnkgeyByZXR1cm4gdW5kZWZpbmVkOyB9CiAgICBzZXQgW3NdKHY6IGFueSkgeyB9CiAgICBzdGF0aWMgZ2V0IFtzXSgpOiBhbnkgeyByZXR1cm4gdW5kZWZpbmVkOyB9CiAgICBzdGF0aWMgc2V0IFtzXSh2OiBhbnkpIHsgfQp9 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/vardecl.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/vardecl.d.ts.map new file mode 100644 index 0000000000000..9d3a16d4150ff --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/vardecl.d.ts.map @@ -0,0 +1,96 @@ +//// [tests/cases/compiler/vardecl.ts] //// + + + +/// [Declarations] //// + + + +//// [vardecl.d.ts] +declare var simpleVar: any; +declare var anotherVar: any; +declare var varWithSimpleType: number; +declare var varWithArrayType: number[]; +declare var varWithInitialValue: number; +declare var withComplicatedValue: { + x: number; + y: number; + desc: string; +}; +declare var declaredVar: any; +declare var declareVar2: any; +declare var declaredVar3: any; +declare var deckareVarWithType: number; +declare var arrayVar: string[]; +declare var complicatedArrayVar: { + x: number; + y: string; +}[]; +declare var n1: { + [s: string]: number; +}; +declare var c: { + new?(): any; +}; +declare var d: { + foo?(): { + x: number; + }; +}; +declare var d3: { + foo(): { + x: number; + y: number; + }; +}; +declare var d2: { + foo(): { + x: number; + }; +}; +declare var n2: { + (): void; +}; +declare var n4: { + (): void; +}[]; +declare var d4: { + foo(n: string, x: { + x: number; + y: number; + }): { + x: number; + y: number; + }; +}; +declare namespace m2 { + var a: any, b2: number, b: any; + class C2 { + b: any; + constructor(b: any); + } + var mE: any; + var d1E: any, d2E: any; + var b2E: any; + var v1E: any; +} +declare var a22: any, b22: number, c22: number; +declare var nn: any; +declare var da1: any, da2: any; +declare var normalVar: any; +declare var dv1: any; +declare var xl: any; +declare var x: any; +declare var z: any; +declare function foo(a2: any): void; +declare var b: number; +//# sourceMappingURL=vardecl.d.ts.map + +/// [Declarations Maps] //// + + +//// [vardecl.d.ts.map] +{"version":3,"file":"vardecl.d.ts","sourceRoot":"","sources":["vardecl.ts"],"names":[],"mappings":"AAAA,QAAA,IAAI,SAAS,EAAE,GAAG,CAAC;AAEnB,QAAA,IAAI,UAAU,EAAE,GAAG,CAAC;AACpB,QAAA,IAAI,iBAAiB,EAAE,MAAM,CAAC;AAC9B,QAAA,IAAI,gBAAgB,EAAE,MAAM,EAAE,CAAC;AAE/B,QAAA,IAAI,mBAAmB,QAAK,CAAC;AAE7B,QAAA,IAAI,oBAAoB;IAAK,CAAC;IAAM,CAAC;IAAM,IAAI;CAAc,CAAC;AAE9D,OAAO,CAAC,IAAI,WAAW,EAAE,GAAG,CAAC;AAC7B,OAAO,CAAC,IAAI,WAAW,EAAE,GAAG,CAAA;AAE5B,OAAO,CAAC,IAAI,YAAY,EAAE,GAAG,CAAC;AAC9B,OAAO,CAAC,IAAI,kBAAkB,EAAE,MAAM,CAAC;AAEvC,QAAA,IAAI,QAAQ,EAAE,MAAM,EAAe,CAAC;AAEpC,QAAA,IAAI,mBAAmB,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;CAAE,EAAE,CAAE;AAGtD,QAAA,IAAI,EAAE,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAAE,CAAC;AAEjC,QAAA,IAAI,CAAC,EAAG;IACA,GAAG,CAAC,IAAK,GAAG,CAAC;CAChB,CAAA;AAEL,QAAA,IAAI,CAAC,EAAE;IACH,GAAG,CAAC,IAAK;QACL,CAAC,EAAE,MAAM,CAAC;KACb,CAAC;CACL,CAAA;AAED,QAAA,IAAI,EAAE,EAAE;IACJ,GAAG,IAAI;QACH,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;KACb,CAAC;C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QyB7CiAgICAgICAgY29uc3RydWN0b3IgKHB1YmxpYyBiKSB7CiAgICAgICAgfQogICAgfQoKICAgIGV4cG9ydCBjbGFzcyBDMiB7CiAgICAgICAgY29uc3RydWN0b3IgKHB1YmxpYyBiOiBhbnkpIHsKICAgICAgICB9CiAgICB9CiAgICB2YXIgbTsKICAgIGRlY2xhcmUgdmFyIGQxLCBkMjsKICAgIHZhciBiMjM7CiAgICBkZWNsYXJlIHZhciB2MTsKICAgIGV4cG9ydCB2YXIgbUU6IGFueTsKICAgIGV4cG9ydCBkZWNsYXJlIHZhciBkMUU6IGFueSwgZDJFOiBhbnk7CiAgICBleHBvcnQgdmFyIGIyRTogYW55OwogICAgZXhwb3J0IGRlY2xhcmUgdmFyIHYxRTogYW55Owp9Cgp2YXIgYTIyOiBhbnksIGIyMiA9IDEwLCBjMjIgPSAzMDsKdmFyIG5uOiBhbnk7CgpkZWNsYXJlIHZhciBkYTE6IGFueSwgZGEyOiBhbnk7CnZhciBub3JtYWxWYXI6IGFueTsKZGVjbGFyZSB2YXIgZHYxOiBhbnk7CnZhciB4bDogYW55Owp2YXIgeDogYW55Owp2YXIgejogYW55OwoKZnVuY3Rpb24gZm9vKGEyOiBhbnkpOiB2b2lkIHsKICAgIHZhciBhID0gMTA7Cn0KCmZvciAodmFyIGkgPSAwLCBqID0gMDsgaSA8IDEwOyBpKyspIHsKICAgIGorKzsKfQoKCmZvciAodmFyIGsgPSAwOyBrIDwgMzA7IGsrKykgewogICAgaysrOwp9CnZhciBiID0gMTA7Cg== + 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..4ecc64a92f273 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/variadicTuples1.d.ts.map @@ -0,0 +1,208 @@ +//// [tests/cases/conformance/types/tuple/variadicTuples1.ts] //// + + + +/// [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,CAAC,SAAS,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,MAAM,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC;AAIlE,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAClC,KAAK,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC;AACnB,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAC3B,KAAK,GAAG,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;AACzB,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,EAA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to-fixed/dte/varianceAnnotations.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/varianceAnnotations.d.ts new file mode 100644 index 0000000000000..3a543e6da3380 --- /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 TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. +varianceAnnotations.ts(170,20): error TS9011: Declaration emit for class expressions are 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 TS9011: Declaration emit for class expressions are not supported with --isolatedDeclarations. + foo(): InstanceType<(typeof Anon)> { + return this; + } + } + + let OuterC = class C { + ~ +!!! error TS9011: Declaration emit for class expressions are 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..3a2c6f576d0b6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/weakTypesAndLiterals01.d.ts.map @@ -0,0 +1,33 @@ +//// [tests/cases/conformance/types/typeRelationships/comparable/weakTypesAndLiterals01.ts] //// + + + +/// [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,GAAI,GAAG,EAAE,SAAS,KAAG,SAO3B,CAAA;AAED,QA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lmIChhcmcgPT09ICJBIikgewogICAgICAgIHJldHVybiBhcmc7CiAgICB9CiAgICBlbHNlIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQp9Cgpjb25zdCBnID0gKGFyZzogV2Vha1R5cGVzKTogV2Vha1R5cGVzID0+IHsKICAgIGlmIChhcmcgPT09ICJBIikgewogICAgICAgIHJldHVybiBhcmc7CiAgICB9CiAgICBlbHNlIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQp9Cgpjb25zdCBoID0gKGFyZzogTGl0ZXJhbHNPcldlYWtUeXBlcyk6IExpdGVyYWxzT3JXZWFrVHlwZXMgPT4gewogICAgaWYgKGFyZyA9PT0gYU9yQikgewogICAgICAgIHJldHVybiBhcmc7CiAgICB9CiAgICBlbHNlIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQp9Cgpjb25zdCBpID0gKGFyZzogV2Vha1R5cGVzKTogV2Vha1R5cGVzID0+IHsKICAgIGlmIChhcmcgPT09IGFPckIpIHsKICAgICAgICByZXR1cm4gYXJnOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgcmV0dXJuIGFyZzsKICAgIH0KfQo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/dte/withExportDecl.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/withExportDecl.d.ts.map new file mode 100644 index 0000000000000..3dd1a61b87afd --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/dte/withExportDecl.d.ts.map @@ -0,0 +1,44 @@ +//// [tests/cases/compiler/withExportDecl.ts] //// + + + +/// [Declarations] //// + + + +//// [withExportDecl.d.ts] +export declare var exportedSimpleVar: any; +export declare var exportedVarWithInitialValue: number; +export declare var exportedWithComplicatedValue: { + x: number; + y: number; + desc: string; +}; +export declare var exportedDeclaredVar: number; +export declare var exportedArrayVar: { + x: number; + y: string; +}[]; +export declare function exportedFunction(): { + x: string; + y: string; + n: number; +}; +export declare namespace m2 { + var a: number; +} +export declare namespace m3 { + function foo(): string; +} +export declare var eVar1: any, eVar2: number; +export declare var eVar3: number, eVar4: any, eVar5: any; +//# sourceMappingURL=withExportDecl.d.ts.map + +/// [Declarations Maps] //// + + +//// [withExportDecl.d.ts.map] +{"version":3,"file":"withExportDecl.d.ts","sourceRoot":"","sources":["withExportDecl.ts"],"names":[],"mappings":"AACA,eAAO,IAAI,iBAAiB,EAAE,GAAG,CAAC;AAOlC,eAAO,IAAI,2BAA2B,QAAK,CAAC;AAG5C,eAAO,IAAI,4BAA4B;IAAK,CAAC;IAAM,CAAC;IAAM,IAAI;CAAc,CAAC;AAO7E,MAAM,CAAC,OAAO,CAAC,IAAI,mBAAmB,EAAE,MAAM,CAAC;AAI/C,eAAO,IAAI,gBAAgB,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;CAAE,EAAE,CAAE;AAW1D,wBAAgB,gBAAgB,IAAI;IAChC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb,CAEA;AAOD,MAAM,CAAC,OAAO,WAAQ,EAAE,CAAC;IAEd,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAGD,yBAAc,EAAE,CAAC;IAEb,SAAgB,GAAG,IAAI,MAAM,CAE5B;CACJ;AAED,eAAO,IAAI,KAAK,EAAE,GAAG,EAAE,KAAK,QAAK,CAAC;AAElC,eAAO,IAAI,KAAK,QAAK,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgdmFyIGV4cG9ydGVkU2ltcGxlVmFyOiBhbnk7DQpleHBvcnQgZGVjbGFyZSB2YXIgZXhwb3J0ZWRWYXJXaXRoSW5pdGlhbFZhbHVlOiBudW1iZXI7DQpleHBvcnQgZGVjbGFyZSB2YXIgZXhwb3J0ZWRXaXRoQ29tcGxpY2F0ZWRWYW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cm4gbTEuZm9vKCk7CiAgICB9Cn0KCmV4cG9ydCB2YXIgZVZhcjE6IGFueSwgZVZhcjIgPSAxMDsKdmFyIGVWYXIyMjsKZXhwb3J0IHZhciBlVmFyMyA9IDEwLCBlVmFyNDogYW55LCBlVmFyNTogYW55Ow== + 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/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/coAndContraVariantInferences.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/coAndContraVariantInferences.d.ts.map new file mode 100644 index 0000000000000..150fdf77c2307 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/coAndContraVariantInferences.d.ts.map @@ -0,0 +1,41 @@ +//// [tests/cases/compiler/coAndContraVariantInferences.ts] //// + + + +/// [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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LmxvZyhhY3Rpb24pOwoKY2FsbChhY3Rpb25BLCBwcmludEZuKTsKY2FsbChhY3Rpb25CLCBwcmludEZuKTsK + 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..3562e6c15c736 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/commentsVarDecl.d.ts.map @@ -0,0 +1,42 @@ +//// [tests/cases/compiler/commentsVarDecl.ts] //// + + + +/// [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;AA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ovKiogY29tbWVudCBsaW5lIDIqLwp2YXIgeCA9IDcwOyAvKiBtdWx0aWxpbmUgdHJhaWxpbmcgY29tbWVudCAKdGhpcyBpcyBtdWx0aWxpbmUgdHJhaWxpbmcgY29tbWVudCAqLwovKiogVHJpcGxlIHNsYXNoIGNvbW1lbnQgb24gdGhlIGFzc2lnbm1lbnQgc2hvdWxkbnQgYmUgaW4gLmQudHMgZmlsZSovCnggPSBteVZhcmlhYmxlOwoKLyoqIHRyaXBsZSBzbGFzaCBjb21tZW50MSovCi8qKiBqc2RvY3N0eWxlIGNvbW1lbnQgLSBvbmx5IHRoaXMgY29tbWVudCBzaG91bGQgYmUgaW4gLmQudHMgZmlsZSovCnZhciBuID0gMzA7CgovKiogdmFyIGRlY2thcmF0aW9uIHdpdGggY29tbWVudCBvbiB0eXBlIGFzIHdlbGwqLwp2YXIgeSA9IC8qKiB2YWx1ZSBjb21tZW50ICovIDIwOwoKLy8vIHZhciBkZWNrYXJhdGlvbiB3aXRoIGNvbW1lbnQgb24gdHlwZSBhcyB3ZWxsCnZhciB5eSA9CiAgICAvLy8gdmFsdWUgY29tbWVudAogICAgMjA7CgovKiogY29tbWVudDIgKi8KdmFyIHogPSAvKiogbGFtYmRhIGNvbW1lbnQgKi8gKHg6IG51bWJlciwgeTogbnVtYmVyKTogbnVtYmVyID0+IHggKyB5OwoKdmFyIHoyOiAvKiogdHlwZSBjb21tZW50Ki8gKHg6IG51bWJlcikgPT4gc3RyaW5nOwoKdmFyIHgyOiAoeDogbnVtYmVyKSA9PiBzdHJpbmcgPSB6MjsKCnZhciBuNDogKHg6IG51bWJlcikgPT4gc3RyaW5nOwpuNCA9IHoyOw== + 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..f47895fe60b4d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/conditionalTypes1.d.ts.map @@ -0,0 +1,284 @@ +//// [tests/cases/conformance/types/conditional/conditionalTypes1.ts] //// + + + +/// [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,EAAE,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ZW5kcyBBcnJheTxhbnk+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..fe01917a7549c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/constAssertions.d.ts.map @@ -0,0 +1,139 @@ +//// [tests/cases/conformance/expressions/typeAssertions/constAssertions.ts] //// + + + +/// [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,I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9uTWF0Y2giIHwgIndyaXRlX21hdGNoIiB8ICJ3cml0ZV9ub25NYXRjaCIgewogICAgY29uc3QgYWN0aW9uID0gdmVyaWZ5ID8gYHZlcmlmeWAgOiBgd3JpdGVgOwogICAgY29uc3QgY29udGVudE1hdGNoID0gY29udGVudE1hdGNoZXMgPyBgbWF0Y2hgIDogYG5vbk1hdGNoYDsKICAgIGNvbnN0IG91dGNvbWUgPSBgJHthY3Rpb259XyR7Y29udGVudE1hdGNofWAgYXMgY29uc3Q7CiAgICByZXR1cm4gb3V0Y29tZTsKfQoKZnVuY3Rpb24gYWNjZXNzb3JOYW1lczxTIGV4dGVuZHMgc3RyaW5nPihwcm9wTmFtZTogUyk6IHJlYWRvbmx5IFtgZ2V0LSR7U31gLCBgc2V0LSR7U31gXSB7CiAgICByZXR1cm4gW2BnZXQtJHtwcm9wTmFtZX1gLCBgc2V0LSR7cHJvcE5hbWV9YF0gYXMgY29uc3Q7Cn0KCmNvbnN0IG5zMTogcmVhZG9ubHkgWyJnZXQtZm9vIiwgInNldC1mb28iXSA9IGFjY2Vzc29yTmFtZXMoJ2ZvbycpOwoKLy8gcmVwcm8gZnJvbSBodHRwczovL2dpdGh1Yi5jb20vbWljcm9zb2Z0L1R5cGVTY3JpcHQvaXNzdWVzLzU0Mzc0CmludGVyZmFjZSBGb281NDM3NCB7CiAgYTogMTsKICBiOiAyOwp9Cgpjb25zdCBmb29Db25zdDU0Mzc0OiBGb281NDM3NCA9IHsKICBhOiAxLAogIGI6IDMKfSBhcyBjb25zdAo= + 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..130135920b575 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/contextuallyTypedStringLiteralsInJsxAttributes01.d.ts.map @@ -0,0 +1,30 @@ +//// [tests/cases/conformance/types/contextualTypes/jsxAttributes/contextuallyTypedStringLiteralsInJsxAttributes01.tsx] //// + + + +/// [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/OiBhbnk7DQogICAgfQ0KfQ0KZGVjbGFyZSBjb25zdCBGb29Db21wb25lbnQ6IChwcm9wczogew0KICAgIGZvbzogIkEiIHwgIkIiIHwgIkMiOw0KfSkgPT4gSlNYLkVsZW1lbnQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1jb250ZXh0dWFsbHlUeXBlZFN0cmluZ0xpdGVyYWxzSW5Kc3hBdHRyaWJ1dGVzMDEuZC50cy5tY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tests/baselines/reference/isolated-declarations/auto-fixed/tsc/controlFlowAliasing.d.ts.map new file mode 100644 index 0000000000000..04b5e4d7e8483 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/controlFlowAliasing.d.ts.map @@ -0,0 +1,162 @@ +//// [tests/cases/conformance/controlFlow/controlFlowAliasing.ts] //// + + + +/// [Declarations] //// + + + +//// [controlFlowAliasing.d.ts] +declare function f10(x: string | number): void; +declare function f11(x: unknown): void; +declare function f12(x: string | number | boolean): void; +declare function f13(x: string | number | boolean): void; +declare function f14(x: number | null | undefined): number | null; +declare function f15(obj: { + readonly x: string | number; +}): void; +declare function f16(obj: { + readonly x: string | number; +}): void; +declare function f17(obj: readonly [string | number]): void; +declare function f18(obj: readonly [string | number]): void; +declare function f20(obj: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare function f21(obj: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare function f22(obj: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare function f23(obj: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare function f24(arg: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare function f25(arg: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare function f26(outer: { + readonly obj: { + kind: 'foo'; + foo: string; + } | { + kind: 'bar'; + bar: number; + }; +}): void; +declare function f27(outer: { + obj: { + kind: 'foo'; + foo: string; + } | { + kind: 'bar'; + bar: number; + }; +}): void; +declare function f28(obj?: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare function f30(obj: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare function f31(obj: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare function f32(obj: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare function f33(obj: { + kind: 'foo'; + foo: string; +} | { + kind: 'bar'; + bar: number; +}): void; +declare class C10 { + readonly x: string | number; + constructor(x: string | number); +} +declare class C11 { + readonly x: string | number; + constructor(x: string | number); +} +declare function f40(obj: { + kind: 'foo'; + foo?: string; +} | { + kind: 'bar'; + bar?: number; +}): void; +type Data = { + kind: 'str'; + payload: string; +} | { + kind: 'num'; + payload: number; +}; +declare function gg2(obj: Data): void; +declare function foo({ kind, payload }: Data): void; +declare const obj: { + fn: () => boolean; +}; +declare const a: boolean; +declare class Utils { + static isDefined(value: T): value is NonNullable; +} +declare class A53267 { + readonly testNumber: number | undefined; + foo(): void; +} +//# sourceMappingURL=controlFlowAliasing.d.ts.map + +/// [Declarations Maps] //// + + +//// [controlFlowAliasing.d.ts.map] +{"version":3,"file":"controlFlowAliasing.d.ts","sourceRoot":"","sources":["controlFlowAliasing.ts"],"names":[],"mappings":"AAEA,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQrC;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,CAK7B;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAS/C;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAU/C;AAED,iBAAS,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAGxD;AAED,iBAAS,GAAG,CAAC,GAAG,EAAE;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,IAAI,CAKvD;AAED,iBAAS,GAAG,CAAC,GAAG,EAAE;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,IAAI,CAMvD;AAED,i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gIH0KfQoKZnVuY3Rpb24gZjI2KG91dGVyOiB7IHJlYWRvbmx5IG9iajogeyBraW5kOiAnZm9vJywgZm9vOiBzdHJpbmcgfSB8IHsga2luZDogJ2JhcicsIGJhcjogbnVtYmVyIH0gfSk6IHZvaWQgewogICAgY29uc3QgaXNGb28gPSBvdXRlci5vYmoua2luZCA9PT0gJ2Zvbyc7CiAgICBpZiAoaXNGb28pIHsKICAgICAgICBvdXRlci5vYmouZm9vOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgb3V0ZXIub2JqLmJhcjsKICAgIH0KfQoKZnVuY3Rpb24gZjI3KG91dGVyOiB7IG9iajogeyBraW5kOiAnZm9vJywgZm9vOiBzdHJpbmcgfSB8IHsga2luZDogJ2JhcicsIGJhcjogbnVtYmVyIH0gfSk6IHZvaWQgewogICAgY29uc3QgaXNGb28gPSBvdXRlci5vYmoua2luZCA9PT0gJ2Zvbyc7CiAgICBpZiAoaXNGb28pIHsKICAgICAgICBvdXRlci5vYmouZm9vOyAgLy8gTm90IG5hcnJvd2VkIGJlY2F1c2Ugb2JqIGlzIG11dGFibGUKICAgIH0KICAgIGVsc2UgewogICAgICAgIG91dGVyLm9iai5iYXI7ICAvLyBOb3QgbmFycm93ZWQgYmVjYXVzZSBvYmogaXMgbXV0YWJsZQogICAgfQp9CgpmdW5jdGlvbiBmMjgob2JqPzogeyBraW5kOiAnZm9vJywgZm9vOiBzdHJpbmcgfSB8IHsga2luZDogJ2JhcicsIGJhcjogbnVtYmVyIH0pOiB2b2lkIHsKICAgIGNvbnN0IGlzRm9vID0gb2JqICYmIG9iai5raW5kID09PSAnZm9vJzsKICAgIGNvbnN0IGlzQmFyID0gb2JqICYmIG9iai5raW5kID09PSAnYmFyJzsKICAgIGlmIChpc0ZvbykgewogICAgICAgIG9iai5mb287CiAgICB9CiAgICBpZiAoaXNCYXIpIHsKICAgICAgICBvYmouYmFyOwogICAgfQp9CgovLyBOYXJyb3dpbmcgYnkgYWxpYXNlZCBkaXNjcmltaW5hbnQgcHJvcGVydHkgYWNjZXNzCgpmdW5jdGlvbiBmMzAob2JqOiB7IGtpbmQ6ICdmb28nLCBmb286IHN0cmluZyB9IHwgeyBraW5kOiAnYmFyJywgYmFyOiBudW1iZXIgfSk6IHZvaWQgewogICAgY29uc3Qga2luZCA9IG9iai5raW5kOwogICAgaWYgKGtpbmQgPT09ICdmb28nKSB7CiAgICAgICAgb2JqLmZvbzsKICAgIH0KICAgIGVsc2UgewogICAgICAgIG9iai5iYXI7CiAgICB9Cn0KCmZ1bmN0aW9uIGYzMShvYmo6IHsga2luZDogJ2ZvbycsIGZvbzogc3RyaW5nIH0gfCB7IGtpbmQ6ICdiYXInLCBiYXI6IG51bWJlciB9KTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQgfSA9IG9iajsKICAgIGlmIChraW5kID09PSAnZm9vJykgewogICAgICAgIG9iai5mb287CiAgICB9CiAgICBlbHNlIHsKICAgICAgICBvYmouYmFyOwogICAgfQp9CgpmdW5jdGlvbiBmMzIob2JqOiB7IGtpbmQ6ICdmb28nLCBmb286IHN0cmluZyB9IHwgeyBraW5kOiAnYmFyJywgYmFyOiBudW1iZXIgfSk6IHZvaWQgewogICAgY29uc3QgeyBraW5kOiBrIH0gPSBvYmo7CiAgICBpZiAoayA9PT0gJ2ZvbycpIHsKICAgICAgICBvYmouZm9vOwogICAgfQogICAgZWxzZSB7CiAgICAgICAgb2JqLmJhcjsKICAgIH0KfQoKZnVuY3Rpb24gZjMzKG9iajogeyBraW5kOiAnZm9vJywgZm9vOiBzdHJpbmcgfSB8IHsga2luZDogJ2JhcicsIGJhcjogbnVtYmVyIH0pOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCB9ID0gb2JqOwogICAgc3dpdGNoIChraW5kKSB7CiAgICAgICAgY2FzZSAnZm9vJzogb2JqLmZvbzsgYnJlYWs7CiAgICAgICAgY2FzZSAnYmFyJzogb2JqLmJhcjsgYnJlYWs7CiAgICB9Cn0KCgpjbGFzcyBDMTAgewogICAgY29uc3RydWN0b3IocmVhZG9ubHkgeDogc3RyaW5nIHwgbnVtYmVyKSB7CiAgICAgICAgY29uc3QgdGhpc1hfaXNTdHJpbmcgPSB0eXBlb2YgdGhpcy54ID09PSAnc3RyaW5nJzsKICAgICAgICBjb25zdCB4SXNTdHJpbmcgPSB0eXBlb2YgeCA9PT0gJ3N0cmluZyc7CiAgICAgICAgaWYgKHRoaXNYX2lzU3RyaW5nICYmIHhJc1N0cmluZykgewogICAgICAgICAgICBsZXQgczogc3RyaW5nOwogICAgICAgICAgICBzID0gdGhpcy54OwogICAgICAgICAgICBzID0geDsKICAgICAgICB9CiAgICB9Cn0KCmNsYXNzIEMxMSB7CiAgICBjb25zdHJ1Y3RvcihyZWFkb25seSB4OiBzdHJpbmcgfCBudW1iZXIpIHsKICAgICAgICBjb25zdCB0aGlzWF9pc1N0cmluZyA9IHR5cGVvZiB0aGlzLnggPT09ICdzdHJpbmcnOwogICAgICAgIGNvbnN0IHhJc1N0cmluZyA9IHR5cGVvZiB4ID09PSAnc3RyaW5nJzsKICAgICAgICBpZiAodGhpc1hfaXNTdHJpbmcgJiYgeElzU3RyaW5nKSB7CiAgICAgICAgICAgIC8vIFNvbWUgbmFycm93aW5ncyBtYXkgYmUgaW52YWxpZGF0ZWQgZHVlIHRvIGxhdGVyIGFzc2lnbm1lbnRzLgogICAgICAgICAgICBsZXQgczogc3RyaW5nOwogICAgICAgICAgICBzID0gdGhpcy54OwogICAgICAgICAgICBzID0geDsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHRoaXMueCA9IDEwOwogICAgICAgICAgICB4ID0gMTA7CiAgICAgICAgfQogICAgfQp9CgovLyBNaXhpbmcgb2YgYWxpYXNlZCBkaXNjcmltaW5hbnRzIGFuZCBjb25kaXRpb25hbHMKCmZ1bmN0aW9uIGY0MChvYmo6IHsga2luZDogJ2ZvbycsIGZvbz86IHN0cmluZyB9IHwgeyBraW5kOiAnYmFyJywgYmFyP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F0aWMgaXNEZWZpbmVkPFQ+KHZhbHVlOiBUKTogdmFsdWUgaXMgTm9uTnVsbGFibGU8VD4gewogICAgcmV0dXJuIHZhbHVlICE9IG51bGw7CiAgfQp9CgpjbGFzcyBBNTMyNjcgewogIHB1YmxpYyByZWFkb25seSB0ZXN0TnVtYmVyOiBudW1iZXIgfCB1bmRlZmluZWQ7CgogIGZvbygpOiB2b2lkIHsKICAgIGNvbnN0IGlzTnVtYmVyID0gVXRpbHMuaXNEZWZpbmVkKHRoaXMudGVzdE51bWJlcik7CgogICAgaWYgKGlzTnVtYmVyKSB7CiAgICAgIGNvbnN0IHg6IG51bWJlciA9IHRoaXMudGVzdE51bWJlcjsKICAgIH0KICB9Cn0= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/controlFlowAliasing.d.ts.map.formatted b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/controlFlowAliasing.d.ts.map.formatted new file mode 100644 index 0000000000000..b2cef008738db --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/controlFlowAliasing.d.ts.map.formatted @@ -0,0 +1,7835 @@ +//// [controlFlowAliasing.ts] //// + +//// [controlFlowAliasing.d.ts.map] +{ + "version": 3, + "file": "controlFlowAliasing.d.ts", + "sourceRoot": "", + "sources": [ + "controlFlowAliasing.ts" + ], + "names": [], + "mappings": [ + { + "generatedLine": 1, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 1, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 1, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 12, + "name": null, + "generatedText": "f10", + "sourceText": "f10" + }, + { + "generatedLine": 1, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 1, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 14, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 1, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 16, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 1, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 22, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 1, + "generatedColumn": 33, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 25, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 1, + "generatedColumn": 39, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 31, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 1, + "generatedColumn": 42, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 34, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 1, + "generatedColumn": 46, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 3, + "originalColumn": 38, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 1, + "generatedColumn": 47, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 11, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 2, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 13, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 2, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 13, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 2, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 13, + "originalColumn": 12, + "name": null, + "generatedText": "f11", + "sourceText": "f11" + }, + { + "generatedLine": 2, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 13, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 2, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 13, + "originalColumn": 14, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 2, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 13, + "originalColumn": 16, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 2, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 13, + "originalColumn": 23, + "name": null, + "generatedText": "unknown", + "sourceText": "unknown" + }, + { + "generatedLine": 2, + "generatedColumn": 34, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 13, + "originalColumn": 26, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 2, + "generatedColumn": 38, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 13, + "originalColumn": 30, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 2, + "generatedColumn": 39, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 18, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 3, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 3, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 3, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 12, + "name": null, + "generatedText": "f12", + "sourceText": "f12" + }, + { + "generatedLine": 3, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 3, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 14, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 3, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 16, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 3, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 22, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 3, + "generatedColumn": 33, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 25, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 3, + "generatedColumn": 39, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 31, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 3, + "generatedColumn": 42, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 34, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 3, + "generatedColumn": 49, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 41, + "name": null, + "generatedText": "boolean", + "sourceText": "boolean" + }, + { + "generatedLine": 3, + "generatedColumn": 52, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 44, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 3, + "generatedColumn": 56, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 20, + "originalColumn": 48, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 3, + "generatedColumn": 57, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 29, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 4, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 4, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 4, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 12, + "name": null, + "generatedText": "f13", + "sourceText": "f13" + }, + { + "generatedLine": 4, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 4, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 14, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 4, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 16, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 4, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 22, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 4, + "generatedColumn": 33, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 25, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 4, + "generatedColumn": 39, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 31, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 4, + "generatedColumn": 42, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 34, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 4, + "generatedColumn": 49, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 41, + "name": null, + "generatedText": "boolean", + "sourceText": "boolean" + }, + { + "generatedLine": 4, + "generatedColumn": 52, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 44, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 4, + "generatedColumn": 56, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 31, + "originalColumn": 48, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 4, + "generatedColumn": 57, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 41, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 5, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 5, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 5, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 12, + "name": null, + "generatedText": "f14", + "sourceText": "f14" + }, + { + "generatedLine": 5, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 5, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 14, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 5, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 16, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 5, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 22, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 5, + "generatedColumn": 33, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 25, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 5, + "generatedColumn": 37, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 29, + "name": null, + "generatedText": "null", + "sourceText": "null" + }, + { + "generatedLine": 5, + "generatedColumn": 40, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 32, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 5, + "generatedColumn": 49, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 41, + "name": null, + "generatedText": "undefined", + "sourceText": "undefined" + }, + { + "generatedLine": 5, + "generatedColumn": 52, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 44, + "name": null, + "generatedText": "): ", + "sourceText": "): " + }, + { + "generatedLine": 5, + "generatedColumn": 58, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 50, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 5, + "generatedColumn": 61, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 53, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 5, + "generatedColumn": 65, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 43, + "originalColumn": 57, + "name": null, + "generatedText": "null", + "sourceText": "null" + }, + { + "generatedLine": 5, + "generatedColumn": 66, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 46, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 6, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 6, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 6, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 12, + "name": null, + "generatedText": "f15", + "sourceText": "f15" + }, + { + "generatedLine": 6, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 6, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 6, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 7, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 7, + "generatedColumn": 12, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 28, + "name": null, + "generatedText": "readonly", + "sourceText": "readonly" + }, + { + "generatedLine": 7, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 29, + "name": null, + "generatedText": " ", + "sourceText": " " + }, + { + "generatedLine": 7, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 30, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 7, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 32, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 7, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 38, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 7, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 41, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 7, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 47, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 7, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 47, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 8, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 49, + "name": null + }, + { + "generatedLine": 8, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 52, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 8, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 48, + "originalColumn": 56, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 8, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 53, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 9, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 9, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 9, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 12, + "name": null, + "generatedText": "f16", + "sourceText": "f16" + }, + { + "generatedLine": 9, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 9, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 9, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 10, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 10, + "generatedColumn": 12, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 28, + "name": null, + "generatedText": "readonly", + "sourceText": "readonly" + }, + { + "generatedLine": 10, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 29, + "name": null, + "generatedText": " ", + "sourceText": " " + }, + { + "generatedLine": 10, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 30, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 10, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 32, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 10, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 38, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 10, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 41, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 10, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 47, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 10, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 47, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 11, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 49, + "name": null + }, + { + "generatedLine": 11, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 52, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 11, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 55, + "originalColumn": 56, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 11, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 61, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 12, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 12, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 12, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 12, + "name": null, + "generatedText": "f17", + "sourceText": "f17" + }, + { + "generatedLine": 12, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 12, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 12, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 12, + "generatedColumn": 35, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 27, + "name": null, + "generatedText": "readonly ", + "sourceText": "readonly " + }, + { + "generatedLine": 12, + "generatedColumn": 36, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 28, + "name": null, + "generatedText": "[", + "sourceText": "[" + }, + { + "generatedLine": 12, + "generatedColumn": 42, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 34, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 12, + "generatedColumn": 45, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 37, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 12, + "generatedColumn": 51, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 43, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 12, + "generatedColumn": 52, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 44, + "name": null, + "generatedText": "]", + "sourceText": "]" + }, + { + "generatedLine": 12, + "generatedColumn": 55, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 47, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 12, + "generatedColumn": 59, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 63, + "originalColumn": 51, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 12, + "generatedColumn": 60, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 68, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 13, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 13, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 13, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 12, + "name": null, + "generatedText": "f18", + "sourceText": "f18" + }, + { + "generatedLine": 13, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 13, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 13, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 13, + "generatedColumn": 35, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 27, + "name": null, + "generatedText": "readonly ", + "sourceText": "readonly " + }, + { + "generatedLine": 13, + "generatedColumn": 36, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 28, + "name": null, + "generatedText": "[", + "sourceText": "[" + }, + { + "generatedLine": 13, + "generatedColumn": 42, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 34, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 13, + "generatedColumn": 45, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 37, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 13, + "generatedColumn": 51, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 43, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 13, + "generatedColumn": 52, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 44, + "name": null, + "generatedText": "]", + "sourceText": "]" + }, + { + "generatedLine": 13, + "generatedColumn": 55, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 47, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 13, + "generatedColumn": 59, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 70, + "originalColumn": 51, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 13, + "generatedColumn": 60, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 76, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 14, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 14, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 14, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 12, + "name": null, + "generatedText": "f20", + "sourceText": "f20" + }, + { + "generatedLine": 14, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 14, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 14, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 15, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 15, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 15, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 15, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 15, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 16, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 16, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 16, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 38, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 16, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 44, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 16, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 44, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 17, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 46, + "name": null + }, + { + "generatedLine": 17, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 49, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 18, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 18, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 55, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 18, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 57, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 18, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 62, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 18, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 63, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 19, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 19, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 67, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 19, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 69, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 19, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 75, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 19, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 75, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 20, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 77, + "name": null + }, + { + "generatedLine": 20, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 80, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 20, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 78, + "originalColumn": 84, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 20, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 86, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 21, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 21, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 21, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 12, + "name": null, + "generatedText": "f21", + "sourceText": "f21" + }, + { + "generatedLine": 21, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 21, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 21, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 22, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 22, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 22, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 22, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 22, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 23, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 23, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 23, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 38, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 23, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 44, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 23, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 44, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 24, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 46, + "name": null + }, + { + "generatedLine": 24, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 49, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 25, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 25, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 55, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 25, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 57, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 25, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 62, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 25, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 63, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 26, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 26, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 67, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 26, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 69, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 26, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 75, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 26, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 75, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 27, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 77, + "name": null + }, + { + "generatedLine": 27, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 80, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 27, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 88, + "originalColumn": 84, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 27, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 96, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 28, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 28, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 28, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 12, + "name": null, + "generatedText": "f22", + "sourceText": "f22" + }, + { + "generatedLine": 28, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 28, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 28, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 29, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 29, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 29, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 29, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 29, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 30, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 30, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 30, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 38, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 30, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 44, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 30, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 44, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 31, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 46, + "name": null + }, + { + "generatedLine": 31, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 49, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 32, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 32, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 55, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 32, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 57, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 32, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 62, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 32, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 63, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 33, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 33, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 67, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 33, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 69, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 33, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 75, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 33, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 75, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 34, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 77, + "name": null + }, + { + "generatedLine": 34, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 80, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 34, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 98, + "originalColumn": 84, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 34, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 106, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 35, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 35, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 35, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 12, + "name": null, + "generatedText": "f23", + "sourceText": "f23" + }, + { + "generatedLine": 35, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 35, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 35, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 36, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 36, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 36, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 36, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 36, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 37, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 37, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 37, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 38, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 37, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 44, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 37, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 44, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 38, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 46, + "name": null + }, + { + "generatedLine": 38, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 49, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 39, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 39, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 55, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 39, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 57, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 39, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 62, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 39, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 63, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 40, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 40, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 67, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 40, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 69, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 40, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 75, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 40, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 75, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 41, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 77, + "name": null + }, + { + "generatedLine": 41, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 80, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 41, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 108, + "originalColumn": 84, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 41, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 117, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 42, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 42, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 42, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 12, + "name": null, + "generatedText": "f24", + "sourceText": "f24" + }, + { + "generatedLine": 42, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 42, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 16, + "name": null, + "generatedText": "arg", + "sourceText": "arg" + }, + { + "generatedLine": 42, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 43, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 43, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 43, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 43, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 43, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 44, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 44, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 44, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 38, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 44, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 44, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 44, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 44, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 45, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 46, + "name": null + }, + { + "generatedLine": 45, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 49, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 46, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 46, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 55, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 46, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 57, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 46, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 62, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 46, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 63, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 47, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 47, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 67, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 47, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 69, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 47, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 75, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 47, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 75, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 48, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 77, + "name": null + }, + { + "generatedLine": 48, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 80, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 48, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 119, + "originalColumn": 84, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 48, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 128, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 49, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 49, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 49, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 12, + "name": null, + "generatedText": "f25", + "sourceText": "f25" + }, + { + "generatedLine": 49, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 49, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 16, + "name": null, + "generatedText": "arg", + "sourceText": "arg" + }, + { + "generatedLine": 49, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 50, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 50, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 50, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 50, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 50, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 51, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 51, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 51, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 38, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 51, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 44, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 51, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 44, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 52, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 46, + "name": null + }, + { + "generatedLine": 52, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 49, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 53, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 53, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 55, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 53, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 57, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 53, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 62, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 53, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 63, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 54, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 54, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 67, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 54, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 69, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 54, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 75, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 54, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 75, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 55, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 77, + "name": null + }, + { + "generatedLine": 55, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 80, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 55, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 130, + "originalColumn": 84, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 55, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 139, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 56, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 56, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 56, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 12, + "name": null, + "generatedText": "f26", + "sourceText": "f26" + }, + { + "generatedLine": 56, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 56, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 18, + "name": null, + "generatedText": "outer", + "sourceText": "outer" + }, + { + "generatedLine": 56, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 20, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 57, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 22, + "name": null + }, + { + "generatedLine": 57, + "generatedColumn": 12, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 30, + "name": null, + "generatedText": "readonly", + "sourceText": "readonly" + }, + { + "generatedLine": 57, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 31, + "name": null, + "generatedText": " ", + "sourceText": " " + }, + { + "generatedLine": 57, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 34, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 57, + "generatedColumn": 18, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 36, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 58, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 38, + "name": null + }, + { + "generatedLine": 58, + "generatedColumn": 12, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 42, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 58, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 44, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 58, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 49, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 58, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 50, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 59, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 59, + "generatedColumn": 11, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 54, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 59, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 56, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 59, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 62, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 59, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 62, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 60, + "generatedColumn": 5, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 60, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 67, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 61, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 69, + "name": null + }, + { + "generatedLine": 61, + "generatedColumn": 12, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 73, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 61, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 75, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 61, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 80, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 61, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 81, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 62, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 82, + "name": null + }, + { + "generatedLine": 62, + "generatedColumn": 11, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 85, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 62, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 87, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 62, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 93, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 62, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 93, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 63, + "generatedColumn": 5, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 95, + "name": null + }, + { + "generatedLine": 63, + "generatedColumn": 6, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 95, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 64, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 97, + "name": null + }, + { + "generatedLine": 64, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 100, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 64, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 141, + "originalColumn": 104, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 64, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 149, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 65, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 65, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 65, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 12, + "name": null, + "generatedText": "f27", + "sourceText": "f27" + }, + { + "generatedLine": 65, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 65, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 18, + "name": null, + "generatedText": "outer", + "sourceText": "outer" + }, + { + "generatedLine": 65, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 20, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 66, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 22, + "name": null + }, + { + "generatedLine": 66, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 25, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 66, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 27, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 67, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 29, + "name": null + }, + { + "generatedLine": 67, + "generatedColumn": 12, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 33, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 67, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 35, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 67, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 40, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 67, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 41, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 68, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 42, + "name": null + }, + { + "generatedLine": 68, + "generatedColumn": 11, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 45, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 68, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 47, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 68, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 53, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 68, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 53, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 69, + "generatedColumn": 5, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 55, + "name": null + }, + { + "generatedLine": 69, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 58, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 70, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 60, + "name": null + }, + { + "generatedLine": 70, + "generatedColumn": 12, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 64, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 70, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 66, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 70, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 71, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 70, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 72, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 71, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 73, + "name": null + }, + { + "generatedLine": 71, + "generatedColumn": 11, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 76, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 71, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 78, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 71, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 84, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 71, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 84, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 72, + "generatedColumn": 5, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 86, + "name": null + }, + { + "generatedLine": 72, + "generatedColumn": 6, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 86, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 73, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 88, + "name": null + }, + { + "generatedLine": 73, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 91, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 73, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 151, + "originalColumn": 95, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 73, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 159, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 74, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 74, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 74, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 12, + "name": null, + "generatedText": "f28", + "sourceText": "f28" + }, + { + "generatedLine": 74, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 74, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 74, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 17, + "name": null, + "generatedText": "?", + "sourceText": "?" + }, + { + "generatedLine": 74, + "generatedColumn": 27, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 19, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 75, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 21, + "name": null + }, + { + "generatedLine": 75, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 25, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 75, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 27, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 75, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 32, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 75, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 33, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 76, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 34, + "name": null + }, + { + "generatedLine": 76, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 37, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 76, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 39, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 76, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 45, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 76, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 45, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 77, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 47, + "name": null + }, + { + "generatedLine": 77, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 50, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 78, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 52, + "name": null + }, + { + "generatedLine": 78, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 56, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 78, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 58, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 78, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 63, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 78, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 64, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 79, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 65, + "name": null + }, + { + "generatedLine": 79, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 68, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 79, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 70, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 79, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 76, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 79, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 76, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 80, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 78, + "name": null + }, + { + "generatedLine": 80, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 81, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 80, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 161, + "originalColumn": 85, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 80, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 170, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 81, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 81, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 81, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 12, + "name": null, + "generatedText": "f30", + "sourceText": "f30" + }, + { + "generatedLine": 81, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 81, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 81, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 82, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 82, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 82, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 82, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 82, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 83, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 83, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 83, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 38, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 83, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 44, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 83, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 44, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 84, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 46, + "name": null + }, + { + "generatedLine": 84, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 49, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 85, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 85, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 55, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 85, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 57, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 85, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 62, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 85, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 63, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 86, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 86, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 67, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 86, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 69, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 86, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 75, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 86, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 75, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 87, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 77, + "name": null + }, + { + "generatedLine": 87, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 80, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 87, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 174, + "originalColumn": 84, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 87, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 182, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 88, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 88, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 88, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 12, + "name": null, + "generatedText": "f31", + "sourceText": "f31" + }, + { + "generatedLine": 88, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 88, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 88, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 89, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 89, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 89, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 89, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 89, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 90, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 90, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 90, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 38, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 90, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 44, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 90, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 44, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 91, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 46, + "name": null + }, + { + "generatedLine": 91, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 49, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 92, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 92, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 55, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 92, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 57, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 92, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 62, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 92, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 63, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 93, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 93, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 67, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 93, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 69, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 93, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 75, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 93, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 75, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 94, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 77, + "name": null + }, + { + "generatedLine": 94, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 80, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 94, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 184, + "originalColumn": 84, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 94, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 192, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 95, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 95, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 95, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 12, + "name": null, + "generatedText": "f32", + "sourceText": "f32" + }, + { + "generatedLine": 95, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 95, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 95, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 96, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 96, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 96, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 96, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 96, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 97, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 97, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 97, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 38, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 97, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 44, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 97, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 44, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 98, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 46, + "name": null + }, + { + "generatedLine": 98, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 49, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 99, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 99, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 55, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 99, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 57, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 99, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 62, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 99, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 63, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 100, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 100, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 67, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 100, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 69, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 100, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 75, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 100, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 75, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 101, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 77, + "name": null + }, + { + "generatedLine": 101, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 80, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 101, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 194, + "originalColumn": 84, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 101, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 202, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 102, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 102, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 102, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 12, + "name": null, + "generatedText": "f33", + "sourceText": "f33" + }, + { + "generatedLine": 102, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 102, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 102, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 103, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 103, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 103, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 103, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 103, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 104, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 104, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 104, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 38, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 104, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 44, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 104, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 44, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 105, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 46, + "name": null + }, + { + "generatedLine": 105, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 49, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 106, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 51, + "name": null + }, + { + "generatedLine": 106, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 55, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 106, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 57, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 106, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 62, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 106, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 63, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 107, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 64, + "name": null + }, + { + "generatedLine": 107, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 67, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 107, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 69, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 107, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 75, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 107, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 75, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 108, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 77, + "name": null + }, + { + "generatedLine": 108, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 80, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 108, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 204, + "originalColumn": 84, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 108, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 210, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 109, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 213, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 109, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 213, + "originalColumn": 6, + "name": null, + "generatedText": "declare class ", + "sourceText": "class " + }, + { + "generatedLine": 109, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 213, + "originalColumn": 9, + "name": null, + "generatedText": "C10", + "sourceText": "C10" + }, + { + "generatedLine": 110, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 16, + "name": null + }, + { + "generatedLine": 110, + "generatedColumn": 12, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 24, + "name": null, + "generatedText": "readonly", + "sourceText": "readonly" + }, + { + "generatedLine": 110, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 25, + "name": null, + "generatedText": " ", + "sourceText": " " + }, + { + "generatedLine": 110, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 26, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 110, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 28, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 110, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 34, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 110, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 37, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 110, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 43, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 111, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 25, + "name": null + }, + { + "generatedLine": 111, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 26, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 111, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 28, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 111, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 34, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 111, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 37, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 111, + "generatedColumn": 34, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 214, + "originalColumn": 43, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 112, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 223, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 113, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 225, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 113, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 225, + "originalColumn": 6, + "name": null, + "generatedText": "declare class ", + "sourceText": "class " + }, + { + "generatedLine": 113, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 225, + "originalColumn": 9, + "name": null, + "generatedText": "C11", + "sourceText": "C11" + }, + { + "generatedLine": 114, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 16, + "name": null + }, + { + "generatedLine": 114, + "generatedColumn": 12, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 24, + "name": null, + "generatedText": "readonly", + "sourceText": "readonly" + }, + { + "generatedLine": 114, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 25, + "name": null, + "generatedText": " ", + "sourceText": " " + }, + { + "generatedLine": 114, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 26, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 114, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 28, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 114, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 34, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 114, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 37, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 114, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 43, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 115, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 25, + "name": null + }, + { + "generatedLine": 115, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 26, + "name": null, + "generatedText": "x", + "sourceText": "x" + }, + { + "generatedLine": 115, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 28, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 115, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 34, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 115, + "generatedColumn": 28, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 37, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 115, + "generatedColumn": 34, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 226, + "originalColumn": 43, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 116, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 240, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 117, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 117, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 117, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 12, + "name": null, + "generatedText": "f40", + "sourceText": "f40" + }, + { + "generatedLine": 117, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 117, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 117, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 118, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 20, + "name": null + }, + { + "generatedLine": 118, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 24, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 118, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 26, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 118, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 31, + "name": null, + "generatedText": "'foo'", + "sourceText": "'foo'" + }, + { + "generatedLine": 118, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 32, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 119, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 33, + "name": null + }, + { + "generatedLine": 119, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 36, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 119, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 37, + "name": null, + "generatedText": "?", + "sourceText": "?" + }, + { + "generatedLine": 119, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 39, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 119, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 45, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 119, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 45, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 120, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 47, + "name": null + }, + { + "generatedLine": 120, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 50, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 121, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 52, + "name": null + }, + { + "generatedLine": 121, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 56, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 121, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 58, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 121, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 63, + "name": null, + "generatedText": "'bar'", + "sourceText": "'bar'" + }, + { + "generatedLine": 121, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 64, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 122, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 65, + "name": null + }, + { + "generatedLine": 122, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 68, + "name": null, + "generatedText": "bar", + "sourceText": "bar" + }, + { + "generatedLine": 122, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 69, + "name": null, + "generatedText": "?", + "sourceText": "?" + }, + { + "generatedLine": 122, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 71, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 122, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 77, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 122, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 77, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 123, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 79, + "name": null + }, + { + "generatedLine": 123, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 82, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 123, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 244, + "originalColumn": 86, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 123, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 250, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 124, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 124, + "generatedColumn": 5, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 5, + "name": null, + "generatedText": "type ", + "sourceText": "type " + }, + { + "generatedLine": 124, + "generatedColumn": 9, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 9, + "name": null, + "generatedText": "Data", + "sourceText": "Data" + }, + { + "generatedLine": 124, + "generatedColumn": 12, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 12, + "name": null, + "generatedText": " = ", + "sourceText": " = " + }, + { + "generatedLine": 125, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 14, + "name": null + }, + { + "generatedLine": 125, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 18, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 125, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 20, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 125, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 25, + "name": null, + "generatedText": "'str'", + "sourceText": "'str'" + }, + { + "generatedLine": 125, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 26, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 126, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 27, + "name": null + }, + { + "generatedLine": 126, + "generatedColumn": 11, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 34, + "name": null, + "generatedText": "payload", + "sourceText": "payload" + }, + { + "generatedLine": 126, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 36, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 126, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 42, + "name": null, + "generatedText": "string", + "sourceText": "string" + }, + { + "generatedLine": 126, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 42, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 127, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 44, + "name": null + }, + { + "generatedLine": 127, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 47, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 128, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 49, + "name": null + }, + { + "generatedLine": 128, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 53, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 128, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 55, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 128, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 60, + "name": null, + "generatedText": "'num'", + "sourceText": "'num'" + }, + { + "generatedLine": 128, + "generatedColumn": 16, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 61, + "name": null, + "generatedText": ";", + "sourceText": "," + }, + { + "generatedLine": 129, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 62, + "name": null + }, + { + "generatedLine": 129, + "generatedColumn": 11, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 69, + "name": null, + "generatedText": "payload", + "sourceText": "payload" + }, + { + "generatedLine": 129, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 71, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 129, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 77, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 129, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 77, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 130, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 79, + "name": null + }, + { + "generatedLine": 130, + "generatedColumn": 2, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 254, + "originalColumn": 80, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 131, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 256, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 131, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 256, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 131, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 256, + "originalColumn": 12, + "name": null, + "generatedText": "gg2", + "sourceText": "gg2" + }, + { + "generatedLine": 131, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 256, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 131, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 256, + "originalColumn": 16, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 131, + "generatedColumn": 26, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 256, + "originalColumn": 18, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 131, + "generatedColumn": 30, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 256, + "originalColumn": 22, + "name": null, + "generatedText": "Data", + "sourceText": "Data" + }, + { + "generatedLine": 131, + "generatedColumn": 33, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 256, + "originalColumn": 25, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 131, + "generatedColumn": 37, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 256, + "originalColumn": 29, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 131, + "generatedColumn": 38, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 263, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 132, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 132, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 9, + "name": null, + "generatedText": "declare function ", + "sourceText": "function " + }, + { + "generatedLine": 132, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 12, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 132, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 13, + "name": null, + "generatedText": "(", + "sourceText": "(" + }, + { + "generatedLine": 132, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 15, + "name": null, + "generatedText": "{ ", + "sourceText": "{ " + }, + { + "generatedLine": 132, + "generatedColumn": 27, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 19, + "name": null, + "generatedText": "kind", + "sourceText": "kind" + }, + { + "generatedLine": 132, + "generatedColumn": 29, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 21, + "name": null, + "generatedText": ", ", + "sourceText": ", " + }, + { + "generatedLine": 132, + "generatedColumn": 36, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 28, + "name": null, + "generatedText": "payload", + "sourceText": "payload" + }, + { + "generatedLine": 132, + "generatedColumn": 38, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 30, + "name": null, + "generatedText": " }", + "sourceText": " }" + }, + { + "generatedLine": 132, + "generatedColumn": 40, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 32, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 132, + "generatedColumn": 44, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 36, + "name": null, + "generatedText": "Data", + "sourceText": "Data" + }, + { + "generatedLine": 132, + "generatedColumn": 47, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 39, + "name": null, + "generatedText": "): ", + "sourceText": ") {" + }, + { + "generatedLine": 132, + "generatedColumn": 51, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 265, + "originalColumn": 43, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 132, + "generatedColumn": 52, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 272, + "originalColumn": 1, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 133, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 276, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 133, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 276, + "originalColumn": 0, + "name": null, + "generatedText": "declare ", + "sourceText": "" + }, + { + "generatedLine": 133, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 276, + "originalColumn": 6, + "name": null, + "generatedText": "const ", + "sourceText": "const " + }, + { + "generatedLine": 133, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 276, + "originalColumn": 9, + "name": null, + "generatedText": "obj", + "sourceText": "obj" + }, + { + "generatedLine": 134, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 277, + "originalColumn": 12, + "name": null + }, + { + "generatedLine": 134, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 277, + "originalColumn": 19, + "name": null, + "generatedText": "boolean", + "sourceText": "> true" + }, + { + "generatedLine": 135, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 278, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 135, + "generatedColumn": 2, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 278, + "originalColumn": 2, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 136, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 282, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 136, + "generatedColumn": 8, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 282, + "originalColumn": 0, + "name": null, + "generatedText": "declare ", + "sourceText": "" + }, + { + "generatedLine": 136, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 282, + "originalColumn": 6, + "name": null, + "generatedText": "const ", + "sourceText": "const " + }, + { + "generatedLine": 136, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 282, + "originalColumn": 7, + "name": null, + "generatedText": "a", + "sourceText": "a" + }, + { + "generatedLine": 136, + "generatedColumn": 17, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 282, + "originalColumn": 9, + "name": null, + "generatedText": ": ", + "sourceText": " =" + }, + { + "generatedLine": 136, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 282, + "originalColumn": 27, + "name": null, + "generatedText": "boolean", + "sourceText": " obj.fn();" + }, + { + "generatedLine": 136, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 282, + "originalColumn": 28, + "name": null, + "generatedText": ";", + "sourceText": "" + }, + { + "generatedLine": 137, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 285, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 137, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 285, + "originalColumn": 6, + "name": null, + "generatedText": "declare class ", + "sourceText": "class " + }, + { + "generatedLine": 137, + "generatedColumn": 19, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 285, + "originalColumn": 11, + "name": null, + "generatedText": "Utils", + "sourceText": "Utils" + }, + { + "generatedLine": 138, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 2, + "name": null + }, + { + "generatedLine": 138, + "generatedColumn": 10, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 8, + "name": null, + "generatedText": "static", + "sourceText": "static" + }, + { + "generatedLine": 138, + "generatedColumn": 11, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 9, + "name": null, + "generatedText": " ", + "sourceText": " " + }, + { + "generatedLine": 138, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 18, + "name": null, + "generatedText": "isDefined", + "sourceText": "isDefined" + }, + { + "generatedLine": 138, + "generatedColumn": 21, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 19, + "name": null, + "generatedText": "<", + "sourceText": "<" + }, + { + "generatedLine": 138, + "generatedColumn": 22, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 20, + "name": null, + "generatedText": "T", + "sourceText": "T" + }, + { + "generatedLine": 138, + "generatedColumn": 24, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 22, + "name": null, + "generatedText": ">(", + "sourceText": ">(" + }, + { + "generatedLine": 138, + "generatedColumn": 29, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 27, + "name": null, + "generatedText": "value", + "sourceText": "value" + }, + { + "generatedLine": 138, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 29, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 138, + "generatedColumn": 32, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 30, + "name": null, + "generatedText": "T", + "sourceText": "T" + }, + { + "generatedLine": 138, + "generatedColumn": 35, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 33, + "name": null, + "generatedText": "): ", + "sourceText": "): " + }, + { + "generatedLine": 138, + "generatedColumn": 40, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 38, + "name": null, + "generatedText": "value", + "sourceText": "value" + }, + { + "generatedLine": 138, + "generatedColumn": 44, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 42, + "name": null, + "generatedText": " is ", + "sourceText": " is " + }, + { + "generatedLine": 138, + "generatedColumn": 55, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 53, + "name": null, + "generatedText": "NonNullable", + "sourceText": "NonNullable" + }, + { + "generatedLine": 138, + "generatedColumn": 56, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 54, + "name": null, + "generatedText": "<", + "sourceText": "<" + }, + { + "generatedLine": 138, + "generatedColumn": 57, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 55, + "name": null, + "generatedText": "T", + "sourceText": "T" + }, + { + "generatedLine": 138, + "generatedColumn": 58, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 286, + "originalColumn": 56, + "name": null, + "generatedText": ">", + "sourceText": ">" + }, + { + "generatedLine": 139, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 289, + "originalColumn": 1, + "name": null + }, + { + "generatedLine": 140, + "generatedColumn": 0, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 291, + "originalColumn": 0, + "name": null + }, + { + "generatedLine": 140, + "generatedColumn": 14, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 291, + "originalColumn": 6, + "name": null, + "generatedText": "declare class ", + "sourceText": "class " + }, + { + "generatedLine": 140, + "generatedColumn": 20, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 291, + "originalColumn": 12, + "name": null, + "generatedText": "A53267", + "sourceText": "A53267" + }, + { + "generatedLine": 141, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 292, + "originalColumn": 2, + "name": null + }, + { + "generatedLine": 141, + "generatedColumn": 13, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 292, + "originalColumn": 18, + "name": null, + "generatedText": "readonly ", + "sourceText": "public readonly " + }, + { + "generatedLine": 141, + "generatedColumn": 23, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 292, + "originalColumn": 28, + "name": null, + "generatedText": "testNumber", + "sourceText": "testNumber" + }, + { + "generatedLine": 141, + "generatedColumn": 25, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 292, + "originalColumn": 30, + "name": null, + "generatedText": ": ", + "sourceText": ": " + }, + { + "generatedLine": 141, + "generatedColumn": 31, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 292, + "originalColumn": 36, + "name": null, + "generatedText": "number", + "sourceText": "number" + }, + { + "generatedLine": 141, + "generatedColumn": 34, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 292, + "originalColumn": 39, + "name": null, + "generatedText": " | ", + "sourceText": " | " + }, + { + "generatedLine": 141, + "generatedColumn": 43, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 292, + "originalColumn": 48, + "name": null, + "generatedText": "undefined", + "sourceText": "undefined" + }, + { + "generatedLine": 141, + "generatedColumn": 44, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 292, + "originalColumn": 49, + "name": null, + "generatedText": ";", + "sourceText": ";" + }, + { + "generatedLine": 142, + "generatedColumn": 4, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 294, + "originalColumn": 2, + "name": null + }, + { + "generatedLine": 142, + "generatedColumn": 7, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 294, + "originalColumn": 5, + "name": null, + "generatedText": "foo", + "sourceText": "foo" + }, + { + "generatedLine": 142, + "generatedColumn": 11, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 294, + "originalColumn": 9, + "name": null, + "generatedText": "(): ", + "sourceText": "() {" + }, + { + "generatedLine": 142, + "generatedColumn": 15, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 294, + "originalColumn": 13, + "name": null, + "generatedText": "void", + "sourceText": "" + }, + { + "generatedLine": 143, + "generatedColumn": 1, + "lastGeneratedColumn": null, + "source": "controlFlowAliasing.ts", + "originalLine": 301, + "originalColumn": 1, + "name": null + } + ] +} \ No newline at end of file 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..08651037cbaab --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileEmitDeclarationOnly.d.ts.map @@ -0,0 +1,27 @@ +//// [tests/cases/compiler/declFileEmitDeclarationOnly.ts] //// + + + +/// [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/declFileRegressionTests.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileRegressionTests.d.ts.map new file mode 100644 index 0000000000000..324e205580cb2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declFileRegressionTests.d.ts.map @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/declFileRegressionTests.ts] //// + + + +/// [Declarations] //// + + + +//// [declFileRegressionTests.d.ts] +declare var n: { + w: any; + x: string; + y: () => void; + z: number; +}; +//# sourceMappingURL=declFileRegressionTests.d.ts.map + +/// [Declarations Maps] //// + + +//// [declFileRegressionTests.d.ts.map] +{"version":3,"file":"declFileRegressionTests.d.ts","sourceRoot":"","sources":["declFileRegressionTests.ts"],"names":[],"mappings":"AAEA,QAAA,IAAI,CAAC;;;aAA4B,IAAI;;CAAgB,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YXIgbjogew0KICAgIHc6IGFueTsNCiAgICB4OiBzdHJpbmc7DQogICAgeTogKCkgPT4gdm9pZDsNCiAgICB6OiBudW1iZXI7DQp9Ow0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZGVjbEZpbGVSZWdyZXNzaW9uVGVzdHMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbEZpbGVSZWdyZXNzaW9uVGVzdHMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xGaWxlUmVncmVzc2lvblRlc3RzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLFFBQUEsSUFBSSxDQUFDOzs7YUFBNEIsSUFBSTs7Q0FBZ0IsQ0FBQyJ9,Ly8gJ251bGwnIG5vdCBjb252ZXJ0ZWQgdG8gJ2FueScgaW4gZC50cwovLyBmdW5jdGlvbiB0eXBlcyBub3QgcGlwZWQgdGhyb3VnaCBjb3JyZWN0bHkKdmFyIG4gPSB7IHc6IG51bGwsIHg6ICcnLCB5OiAoKTogdm9pZCA9PiB7IH0sIHo6IDMyIH07Cgo= + 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..d5db661bd7c71 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitAliasExportStar.d.ts.map @@ -0,0 +1,40 @@ +//// [tests/cases/compiler/declarationEmitAliasExportStar.ts] //// + + + +/// [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..5e39436a2b9e8 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatternWithReservedWord.d.ts.map @@ -0,0 +1,30 @@ +//// [tests/cases/compiler/declarationEmitBindingPatternWithReservedWord.ts] //// + + + +/// [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+Ow0KdHlwZSBDb252ZXJ0TG9jYWxlQ29uZmlnPFQgZXh0ZW5kcyBMb2NhbGVEYXRhID0gTG9jYWxlRGF0YT4gPSBSZWNvcmQ8c3RyaW5nLCBUPjsNCnR5cGUgTG9jYWxlQ29uZmlnPFQgZXh0ZW5kcyBMb2NhbGVEYXRhID0gTG9jYWxlRG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9jYWxlcyA9IDxUIGV4dGVuZHMgTG9jYWxlRGF0YT4oewogICAgYXBwLAogICAgbmFtZSwKICAgIGRlZmF1bHQ6IGRlZmF1bHRMb2NhbGVzQ29uZmlnLAogICAgY29uZmlnOiB1c2VyTG9jYWxlc0NvbmZpZyA9IHt9LAp9OiBHZXRMb2NhbGVzT3B0aW9uczxUPik6IENvbnZlcnRMb2NhbGVDb25maWc8VD4gPT4gewogICAgcmV0dXJuIGRlZmF1bHRMb2NhbGVzQ29uZmlnOwp9Owo= + 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..1a2f9dce6fce6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBindingPatterns.d.ts.map @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/declarationEmitBindingPatterns.ts] //// + + + +/// [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/declarationEmitBundleWithAmbientReferences.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBundleWithAmbientReferences.d.ts new file mode 100644 index 0000000000000..9f8a9745aa0f6 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitBundleWithAmbientReferences.d.ts @@ -0,0 +1,35 @@ +//// [tests/cases/compiler/declarationEmitBundleWithAmbientReferences.ts] //// + +//// [lib/lib.d.ts] +declare module "lib/result" { + export type Result = (E & Failure) | (T & Success); + export interface Failure { } + export interface Success { } +} + +//// [src/datastore_result.ts] +import { Result } from "lib/result"; + +export type T = Result; + +//// [src/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/declarationEmitComputedNameCausesImportToBePainted.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitComputedNameCausesImportToBePainted.d.ts.map new file mode 100644 index 0000000000000..543d35c1e2079 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitComputedNameCausesImportToBePainted.d.ts.map @@ -0,0 +1,34 @@ +//// [tests/cases/compiler/declarationEmitComputedNameCausesImportToBePainted.ts] //// + + + +/// [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..f960a1a1c6173 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitCrossFileImportTypeOfAmbientModule.d.ts @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/declarationEmitCrossFileImportTypeOfAmbientModule.ts] //// + +//// [types/component.d.ts] +declare module '@namespace/component' { + export class Foo {} +} +//// [packages/somepackage/index.d.ts] +import { Foo } from "@namespace/component"; +export declare const item: typeof Foo; +//// [packages/secondpackage/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/declarationEmitDestructuringObjectLiteralPattern.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern.d.ts.map new file mode 100644 index 0000000000000..83a7169925443 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern.d.ts.map @@ -0,0 +1,81 @@ +//// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern.ts] //// + + + +/// [Declarations] //// + + + +//// [declarationEmitDestructuringObjectLiteralPattern.d.ts] +declare const dest: { + x4: number; + y4: string; +}; +declare const x4: number; +declare const dest_2: { + x5: number; + y5: string; +}; +declare const y5: string; +declare const dest_1: { + x6: number; + y6: string; +}; +declare const x6: number; +declare const y6: string; +declare const dest: { + x7: number; + y7: string; +}; +declare const a1: number; +declare const dest_2: { + x8: number; + y8: string; +}; +declare const b1: string; +declare const dest_1: { + x9: number; + y9: string; +}; +declare const a2: number; +declare const b2: string; +declare const dest: { + a: number; + b: { + a: string; + b: { + a: boolean; + }; + }; +}; +declare const x11: number; +declare const y11: string; +declare const z11: boolean; +declare function f15(): { + a4: string; + b4: number; + c4: boolean; +}; +declare const dest_1: { + a4: string; + b4: number; + c4: boolean; +}; +declare const a4: string; +declare const b4: number; +declare const c4: boolean; +declare namespace m { + const a4: string; + const b4: number; + const c4: boolean; +} +//# sourceMappingURL=declarationEmitDestructuringObjectLiteralPattern.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitDestructuringObjectLiteralPattern.d.ts.map] +{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,IAAI;;;CAAyB,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,IAAI;;;CAAyB,CAAC;AACpC,QAAA,MAAM,EAAE,EAAE,MAAgB,CAAC;AAC3B,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAE7B,QAAA,MAAM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IGRlc3QuYTQ7CiAgICBleHBvcnQgY29uc3QgYjQ6IG51bWJlciA9IGRlc3QuYjQ7CiAgICBleHBvcnQgY29uc3QgYzQ6IGJvb2xlYW4gPSBkZXN0LmM0Owp9 + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map new file mode 100644 index 0000000000000..3aa68d1a4b599 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern1.d.ts.map @@ -0,0 +1,51 @@ +//// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts] //// + + + +/// [Declarations] //// + + + +//// [declarationEmitDestructuringObjectLiteralPattern1.d.ts] +declare const dest_2: { + x4: number; + y4: string; +}; +declare const x4: number; +declare const dest_1: { + x5: number; + y5: string; +}; +declare const y5: string; +declare const dest: { + x6: number; + y6: string; +}; +declare const x6: number; +declare const y6: string; +declare const dest_2: { + x7: number; + y7: string; +}; +declare const a1: number; +declare const dest_1: { + x8: number; + y8: string; +}; +declare const b1: string; +declare const dest: { + x9: number; + y9: string; +}; +declare const a2: number; +declare const b2: string; +//# sourceMappingURL=declarationEmitDestructuringObjectLiteralPattern1.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitDestructuringObjectLiteralPattern1.d.ts.map] +{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern1.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern1.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,MAAM;;;CAAyB,CAAC;AACtC,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,IAAI;;;CAAyB,CAAC;AACpC,Q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EVBQUUsRUFBRSxNQUFnQixDQUFDIn0=,dmFyIHsgfSA9IHsgeDogNSwgeTogImhlbGxvIiB9Owpjb25zdCBkZXN0XzIgPSB7IHg0OiA1LCB5NDogImhlbGxvIiB9Owpjb25zdCB4NDogbnVtYmVyID0gZGVzdF8yLng0Owpjb25zdCBkZXN0XzEgPSB7IHg1OiA1LCB5NTogImhlbGxvIiB9Owpjb25zdCB5NTogc3RyaW5nID0gZGVzdF8xLnk1Owpjb25zdCBkZXN0ID0geyB4NjogNSwgeTY6ICJoZWxsbyIgfTsKY29uc3QgeDY6IG51bWJlciA9IGRlc3QueDY7CmNvbnN0IHk2OiBzdHJpbmcgPSBkZXN0Lnk2Owpjb25zdCBkZXN0XzIgPSB7IHg3OiA1LCB5NzogImhlbGxvIiB9Owpjb25zdCBhMTogbnVtYmVyID0gZGVzdF8yLng3Owpjb25zdCBkZXN0XzEgPSB7IHg4OiA1LCB5ODogImhlbGxvIiB9Owpjb25zdCBiMTogc3RyaW5nID0gZGVzdF8xLnk4Owpjb25zdCBkZXN0ID0geyB4OTogNSwgeTk6ICJoZWxsbyIgfTsKY29uc3QgYTI6IG51bWJlciA9IGRlc3QueDk7CmNvbnN0IGIyOiBzdHJpbmcgPSBkZXN0Lnk5Ow== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map new file mode 100644 index 0000000000000..9191507581a1b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDestructuringObjectLiteralPattern2.d.ts.map @@ -0,0 +1,49 @@ +//// [tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern2.ts] //// + + + +/// [Declarations] //// + + + +//// [declarationEmitDestructuringObjectLiteralPattern2.d.ts] +declare const dest: { + a: number; + b: { + a: string; + b: { + a: boolean; + }; + }; +}; +declare const x11: number; +declare const y11: string; +declare const z11: boolean; +declare function f15(): { + a4: string; + b4: number; + c4: boolean; +}; +declare const dest_1: { + a4: string; + b4: number; + c4: boolean; +}; +declare const a4: string; +declare const b4: number; +declare const c4: boolean; +declare namespace m { + const a4: string; + const b4: number; + const c4: boolean; +} +//# sourceMappingURL=declarationEmitDestructuringObjectLiteralPattern2.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitDestructuringObjectLiteralPattern2.d.ts.map] +{"version":3,"file":"declarationEmitDestructuringObjectLiteralPattern2.d.ts","sourceRoot":"","sources":["declarationEmitDestructuringObjectLiteralPattern2.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,IAAI;;;;;;;;CAA8C,CAAC;AACzD,QAAA,MAAM,GAAG,EAAE,MAAe,CAAC;AAC3B,QAAA,MAAM,GAAG,EAAE,MAAiB,CAAC;AAC7B,QAAA,MAAM,GAAG,EAAE,OAAoB,CAAC;AAEhC,iBAAS,GAAG,IAAI;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,OAAO,CAAC;CACf,CAKA;AACD,QAAA,MAAM,MAAM,EAAE;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,OAAO,CAAC;CACP,CAAC;AACV,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,EAAE,EAAE,MAAkB,CAAC;AAC7B,QAAA,MAAM,EAAE,EAAE,OAAmB,CAAC;AAE9B,kBAAO,CAAC,CAAC;IAEE,MAAM,EAAE,EAAE,MAAgB,CAAC;IAC3B,MAAM,EAAE,EAAE,MAAgB,CAAC;IAC3B,MAAM,EAAE,EAAE,OAAiB,CAAC;CACtC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBkZXN0OiB7DQogICAgYTogbnVtYmVyOw0KICAgIGI6IHsNCiAgICAgICAgYTogc3RyaW5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hlbGxvIjsKICAgIHZhciBiNCA9IDE7CiAgICB2YXIgYzQgPSB0cnVlOwogICAgcmV0dXJuIHsgYTQsIGI0LCBjNCB9Owp9CmNvbnN0IGRlc3RfMTogewogICAgYTQ6IHN0cmluZzsKICAgIGI0OiBudW1iZXI7CiAgICBjNDogYm9vbGVhbjsKfSA9IGYxNSgpOwpjb25zdCBhNDogc3RyaW5nID0gZGVzdF8xLmE0Owpjb25zdCBiNDogbnVtYmVyID0gZGVzdF8xLmI0Owpjb25zdCBjNDogYm9vbGVhbiA9IGRlc3RfMS5jNDsKCm1vZHVsZSBtIHsKICAgIGNvbnN0IGRlc3QgPSBmMTUoKTsKICAgIGV4cG9ydCBjb25zdCBhNDogc3RyaW5nID0gZGVzdC5hNDsKICAgIGV4cG9ydCBjb25zdCBiNDogbnVtYmVyID0gZGVzdC5iNDsKICAgIGV4cG9ydCBjb25zdCBjNDogYm9vbGVhbiA9IGRlc3QuYzQ7Cn0= + 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..d0d2ba4538c98 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDistributiveConditionalWithInfer.d.ts.map @@ -0,0 +1,20 @@ +//// [tests/cases/compiler/declarationEmitDistributiveConditionalWithInfer.ts] //// + + + +/// [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..48d0f70f4ba5c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitDuplicateParameterDestructuring.d.ts.map @@ -0,0 +1,27 @@ +//// [tests/cases/compiler/declarationEmitDuplicateParameterDestructuring.ts] //// + + + +/// [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/declarationEmitExportAliasVisibiilityMarking.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExportAliasVisibiilityMarking.d.ts.map new file mode 100644 index 0000000000000..e512100ee04a0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitExportAliasVisibiilityMarking.d.ts.map @@ -0,0 +1,50 @@ +//// [tests/cases/compiler/declarationEmitExportAliasVisibiilityMarking.ts] //// + + + +/// [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.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,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/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/declarationEmitGlobalThisPreserved.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitGlobalThisPreserved.d.ts.map new file mode 100644 index 0000000000000..c99df09f95496 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitGlobalThisPreserved.d.ts.map @@ -0,0 +1,78 @@ +//// [tests/cases/compiler/declarationEmitGlobalThisPreserved.ts] //// + + + +/// [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,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YmxlOiAoaXNOYU46IHR5cGVvZiBnbG9iYWxUaGlzLmlzTmFOKSA9PiB0eXBlb2YgZ2xvYmFsVGhpcy5pc05hTiA9IChpc05hTikgPT4gaXNOYU47CgpleHBvcnQgZnVuY3Rpb24gZXhwbGljaXRseVR5cGVkRnVuY3Rpb24oaXNOYU46IHR5cGVvZiBnbG9iYWxUaGlzLmlzTmFOKTogdHlwZW9mIGdsb2JhbFRoaXMuaXNOYU4gewogICAgcmV0dXJuIGlzTmFOOwp9OwoKZXhwb3J0IHR5cGUgQXNPYmplY3RQcm9wZXJ0eSA9IHsKICAgIGlzTmFOOiB0eXBlb2YgZ2xvYmFsVGhpcy5pc05hTjsKfQoKZXhwb3J0IGNsYXNzIEFzQ2xhc3NQcm9wZXJ0eSB7CiAgICBpc05hTj86IHR5cGVvZiBnbG9iYWxUaGlzLmlzTmFOOwp9CgpleHBvcnQgdHlwZSBBc0Z1bmN0aW9uVHlwZSA9IChpc05hTjogdHlwZW9mIGdsb2JhbFRoaXMuaXNOYU4pID0+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/declarationEmitInferredDefaultExportType2.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitInferredDefaultExportType2.d.ts.map new file mode 100644 index 0000000000000..82d65da583799 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitInferredDefaultExportType2.d.ts.map @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/declarationEmitInferredDefaultExportType2.ts] //// + + + +/// [Declarations] //// + + + +//// [declarationEmitInferredDefaultExportType2.d.ts] +declare const _default: { + foo: readonly []; + bar: any; + baz: any; +}; +export = _default; +//# sourceMappingURL=declarationEmitInferredDefaultExportType2.d.ts.map + +/// [Declarations Maps] //// + + +//// [declarationEmitInferredDefaultExportType2.d.ts.map] +{"version":3,"file":"declarationEmitInferredDefaultExportType2.d.ts","sourceRoot":"","sources":["declarationEmitInferredDefaultExportType2.ts"],"names":[],"mappings":";;;;;AACA,kBAIC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBfZGVmYXVsdDogew0KICAgIGZvbzogcmVhZG9ubHkgW107DQogICAgYmFyOiBhbnk7DQogICAgYmF6OiBhbnk7DQp9Ow0KZXhwb3J0ID0gX2RlZmF1bHQ7DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbkVtaXRJbmZlcnJlZERlZmF1bHRFeHBvcnRUeXBlMi5kLnRzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0SW5mZXJyZWREZWZhdWx0RXhwb3J0VHlwZTIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImRlY2xhcmF0aW9uRW1pdEluZmVycmVkRGVmYXVsdEV4cG9ydFR5cGUyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQ0Esa0JBSUMifQ==,Ly8gdGVzdC50cwpleHBvcnQgPSB7CiAgZm9vOiBbXSBhcyBjb25zdCwKICBiYXI6IHVuZGVmaW5lZCwKICBiYXo6IG51bGwKfQ== + 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/declarationEmitKeywordDestructuring.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitKeywordDestructuring.d.ts new file mode 100644 index 0000000000000..1cb28db051774 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitKeywordDestructuring.d.ts @@ -0,0 +1,112 @@ +//// [tests/cases/compiler/declarationEmitKeywordDestructuring.ts] //// + +//// [declarationEmitKeywordDestructuring.ts] +type P = { + enum: boolean; + function: boolean; + abstract: boolean; + async: boolean; + await: boolean; + one: boolean; +}; + +function f1({ enum: _enum, ...rest }: P): { + function: boolean; + abstract: boolean; + async: boolean; + await: boolean; + one: boolean; +} { + return rest; +} + +function f2({ function: _function, ...rest }: P): { + enum: boolean; + abstract: boolean; + async: boolean; + await: boolean; + one: boolean; +} { + return rest; +} + +function f3({ abstract: _abstract, ...rest }: P): { + enum: boolean; + function: boolean; + async: boolean; + await: boolean; + one: boolean; +} { + return rest; +} + +function f4({ async: _async, ...rest }: P): { + enum: boolean; + function: boolean; + abstract: boolean; + await: boolean; + one: boolean; +} { + return rest; +} + +function f5({ await: _await, ...rest }: P): { + enum: boolean; + function: boolean; + abstract: boolean; + async: boolean; + one: boolean; +} { + return rest; +} + + +/// [Declarations] //// + + + +//// [declarationEmitKeywordDestructuring.d.ts] +type P = { + enum: boolean; + function: boolean; + abstract: boolean; + async: boolean; + await: boolean; + one: boolean; +}; +declare function f1({ enum: _enum, ...rest }: P): { + function: boolean; + abstract: boolean; + async: boolean; + await: boolean; + one: boolean; +}; +declare function f2({ function: _function, ...rest }: P): { + enum: boolean; + abstract: boolean; + async: boolean; + await: boolean; + one: boolean; +}; +declare function f3({ abstract, ...rest }: P): { + enum: boolean; + function: boolean; + async: boolean; + await: boolean; + one: boolean; +}; +declare function f4({ async, ...rest }: P): { + enum: boolean; + function: boolean; + abstract: boolean; + await: boolean; + one: boolean; +}; +declare function f5({ await, ...rest }: P): { + enum: boolean; + function: boolean; + abstract: boolean; + async: boolean; + one: boolean; +}; +//# sourceMappingURL=declarationEmitKeywordDestructuring.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/declarationEmitMappedPrivateTypeTypeParameter.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitMappedPrivateTypeTypeParameter.d.ts new file mode 100644 index 0000000000000..4b5007fac71c5 --- /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/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/declarationEmitObjectLiteralAccessors1.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectLiteralAccessors1.d.ts.map new file mode 100644 index 0000000000000..ecaef0e12a0e5 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitObjectLiteralAccessors1.d.ts.map @@ -0,0 +1,37 @@ +//// [tests/cases/compiler/declarationEmitObjectLiteralAccessors1.ts] //// + + + +/// [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 + +/// [Declarations Maps] //// + + +//// [declarationEmitObjectLiteralAccessors1.d.ts.map] +{"version":3,"file":"declarationEmitObjectLiteralAccessors1.d.ts","sourceRoot":"","sources":["declarationEmitObjectLiteralAccessors1.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,IAAI,EAAE;IACf,gDAAgD;IAChD,CAAC,EAAE,MAAM,CAAC;CAQb,CAAC;AAGF,eAAO,MAAM,IAAI,EAAE;IACf,wBAAwB;IACxB,IAAI,CAAC,IAAI,MAAM,CAAC;IAChB,wBAAwB;IACxB,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE;CAQpB,CAAC;AAEF,eAAO,MAAM,IAAI;IACf,wBAAwB;;CAIzB,CAAC;AAEF,eAAO,MAAM,IAAI;IACf,wBAAwB;;CAEzB,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZXhwb3J0IGRlY2xhcmUgY29uc3Qgb2JqMTogew0KICAgIC8qKiBteSBhd2Vzb21lIGdldHRlciAoZmlyc3QgaW4gc291cmNlIG9yZGVyKSAqLw0KICAgIHg6IHN0cmluZzsNCn07DQpleHBvcnQgZGVjbGFyZSBjb25zdCBvYmoyOiB7DQogICAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovDQogICAgZ2V0IHgoKTogc3RyaW5nOw0KICAgIC8qKiBteSBhd2Vzb21lIHNldHRlciAqLw0KICAgIHNldCB4KGE6IG51bWJlcik7DQp9Ow0KZXhwb3J0IGRlY2xhcmUgY29uc3Qgb2JqMzogew0KICAgIC8qKiBteSBhd2Vzb21lIGdldHRlciAqLw0KICAgIHJlYWRvbmx5IHg6IHN0cmluZzsNCn07DQpleHBvcnQgZGVjbGFyZSBjb25zdCBvYmo0OiB7DQogICAgLyoqIG15IGF3Z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NldHRlciAoc2Vjb25kIGluIHNvdXJjZSBvcmRlcikgKi8KICBzZXQgeChhOiBzdHJpbmcpIHt9LAp9OwoKLy8gZGl2ZXJnZW50IGFjY2Vzc29ycwpleHBvcnQgY29uc3Qgb2JqMjogewogICAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovCiAgICBnZXQgeCgpOiBzdHJpbmc7CiAgICAvKiogbXkgYXdlc29tZSBzZXR0ZXIgKi8KICAgIHNldCB4KGE6IG51bWJlcik7Cn0gPSB7CiAgLyoqIG15IGF3ZXNvbWUgZ2V0dGVyICovCiAgZ2V0IHgoKTogc3RyaW5nIHsKICAgIHJldHVybiAiIjsKICB9LAogIC8qKiBteSBhd2Vzb21lIHNldHRlciAqLwogIHNldCB4KGE6IG51bWJlcikge30sCn07CgpleHBvcnQgY29uc3Qgb2JqMyA9IHsKICAvKiogbXkgYXdlc29tZSBnZXR0ZXIgKi8KICBnZXQgeCgpOiBzdHJpbmcgewogICAgcmV0dXJuICIiOwogIH0sCn07CgpleHBvcnQgY29uc3Qgb2JqNCA9IHsKICAvKiogbXkgYXdlc29tZSBzZXR0ZXIgKi8KICBzZXQgeChhOiBudW1iZXIpIHt9LAp9Owo= + 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..2a997517e839d --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitOptionalMethod.d.ts.map @@ -0,0 +1,26 @@ +//// [tests/cases/compiler/declarationEmitOptionalMethod.ts] //// + + + +/// [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 b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitParameterProperty.d.ts new file mode 100644 index 0000000000000..79edb8fe1d495 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitParameterProperty.d.ts @@ -0,0 +1,19 @@ +//// [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 \ No newline at end of file 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..04699effec883 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPrefersPathKindBasedOnBundling.d.ts.map @@ -0,0 +1,33 @@ +//// [tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling.ts] //// + + + +/// [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..8dec21a813f75 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitPrefersPathKindBasedOnBundling2.d.ts.map @@ -0,0 +1,37 @@ +//// [tests/cases/compiler/declarationEmitPrefersPathKindBasedOnBundling2.ts] //// + + + +/// [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..206a2d57844a1 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitRecursiveConditionalAliasPreserved.d.ts.map @@ -0,0 +1,21 @@ +//// [tests/cases/compiler/declarationEmitRecursiveConditionalAliasPreserved.ts] //// + + + +/// [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/declarationEmitRetainsJsdocyComments.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitRetainsJsdocyComments.d.ts.map new file mode 100644 index 0000000000000..9970c6bf60de2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitRetainsJsdocyComments.d.ts.map @@ -0,0 +1,55 @@ +//// [tests/cases/compiler/declarationEmitRetainsJsdocyComments.ts] //// + + + +/// [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,LyoqDQogKiBjb21tZW50MQ0KICogQHBhcmFtIHANCiAqLw0KZXhwb3J0IGRlY2xhcmUgY29uc3QgZm9vOiAocDogc3RyaW5nKSA9PiB7DQogICAgLyoqDQogICAgICogY29tbWVudDINCiAgICAgKiBAcGFyYW0gcw0KICAgICAqLw0KICAgIGJhcjogKHM6IG51bWJlcikgPT4gdm9pZDsNCiAgICAvKioNCiAgICAgKiBjb21tZW50Mw0KICAgICAqIEBwYXJhbSBzDQogICAgICovDQogICAgYmFyMihzOiBudW1iZXIpOiB2b2lkOw0KfTsNCmV4cG9ydCBkZWNsYXJlIGNsYXNzIEZvbyB7DQogICAgLyoqDQogICAgICogY29tbWVudDQNCiAgICAgKiBAcGFyYW0gcw0KICAgICAqLw0KICAgIGJhcihzOiBudW1iZXIpOiB2b2lkOw0KfQ0KZXhwb3J0IGRlY2xhcmUgY29uc3QgDQovKioNCiogY29tbWVudDUNCiovDQpzb21lTWV0aG9kOiBhbnk7DQpkZWNsYXJlIGdsb2JhbCB7DQogICAgaW50ZXJmYWNlIEV4dEZ1bmMgew0KICAgICAgICAvKioNCiAgICAgICAgKiBjb21tZW50Ng0KICAgICAgICAqLw0KICAgICAgICBzb21lTWV0aG9kKGNvbGxlY3Rpb246IGFueVtdKTogYm9vbGVhbjsNCiAgICB9DQp9DQovLyMgc291cmNlTWFwcGluZ1VSTD1kZWNsYXJhdGlvbkVtaXRSZXRhaW5zSnNkb2N5Q29tbWVudHMuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0UmV0YWluc0pzZG9jeUNvb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ogY29tbWVudDMKICAgICAgICAgKiBAcGFyYW0gcyAKICAgICAgICAgKi8KICAgICAgICBiYXIyKHM6IG51bWJlcikge30sCiAgICB9Cn0KCmV4cG9ydCBjbGFzcyBGb28gewogICAgLyoqCiAgICAgKiBjb21tZW50NAogICAgICogQHBhcmFtIHMgIAogICAgICovCiAgICBiYXIoczogbnVtYmVyKTogdm9pZCB7CiAgICB9Cn0KCmNvbnN0IGRlc3QgPSBudWxsIGFzIGFueTsKZXhwb3J0IGNvbnN0CiAgICAvKioKICAgICogY29tbWVudDUKICAgICovCiAgICBzb21lTWV0aG9kOiBhbnkgPSBkZXN0LnNvbWVNZXRob2Q7CgpkZWNsYXJlIGdsb2JhbCB7CiAgICBpbnRlcmZhY2UgRXh0RnVuYyB7CiAgICAgICAgLyoqCiAgICAgICAgKiBjb21tZW50NgogICAgICAgICovCiAgICAgICAgc29tZU1ldGhvZChjb2xsZWN0aW9uOiBhbnlbXSk6IGJvb2xlYW47CiAgICB9Cn0K + 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..44273fa77b349 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitReusesLambdaParameterNodes.d.ts.map @@ -0,0 +1,22 @@ +//// [tests/cases/compiler/declarationEmitReusesLambdaParameterNodes.ts] //// + + + +/// [Declarations] //// + + + +//// [index.d.ts] +import { Props } from "react-select"; +export declare const CustomSelect1: (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,ZGVjbGFyZSBjbGFzcyBBIHsNCn0NCmRlY2xhcmUgdmFyIGE6IDxBPih4OiBBKSA9PiBBOw0KZGVjbGFyZSBmdW5jdGlvbiBhMjxBPih4OiBBKTogQTsNCmRlY2xhcmUgdmFyIGEzOiA8QT4oeDogQSkgPT4gZ2xvYmFsVGhpcy5BOw0KZGVjbGFyZSBmdW5jdGlvbiBhNDxBPih4OiBBKTogZ2xvYmFsVGhpcy5BOw0KaW50ZXJmYWNlIEIgew0KfQ0KZGVjbGFyZSB2YXIgYjogPEI+KHg6IEIpID0+IEI7DQpkZWNsYXJlIGZ1bmN0aW9uIGIyPEI+KHg6IEIpOiBCOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9ZGVjbGFyYXRpb25FbWl0VHlwZVBhcmFtZXRlck5hbWVJbk91dGVyU2NvcGUuZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjbGFyYXRpb25FbWl0VHlwZVBhcmFtZXRlck5hbWVJbk91dGVyU2NvcGUuZC50cyIsInNvdXJjZVJvb3Qi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ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitTypeParameterNameShadowedInternally.d.ts.map new file mode 100644 index 0000000000000..ac4d9556fae81 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/declarationEmitTypeParameterNameShadowedInternally.d.ts.map @@ -0,0 +1,20 @@ +//// [tests/cases/compiler/declarationEmitTypeParameterNameShadowedInternally.ts] //// + + + +/// [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/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/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..c67c3b92e4d4e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/defaultParameterAddsUndefinedWithStrictNullChecks.d.ts.map @@ -0,0 +1,31 @@ +//// [tests/cases/compiler/defaultParameterAddsUndefinedWithStrictNullChecks.ts] //// + + + +/// [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;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,aAA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ICE9PSB1bmRlZmluZWQpIHsKICAgICAgICBpZiAoeSA9PT0gZmFsc2UpIHsKICAgICAgICAgICAgcmV0dXJuIHk7CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIHRydWU7Cn0K + 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/dependentDestructuredVariables.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/dependentDestructuredVariables.d.ts.map new file mode 100644 index 0000000000000..4ce400370686b --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/dependentDestructuredVariables.d.ts.map @@ -0,0 +1,168 @@ +//// [tests/cases/conformance/controlFlow/dependentDestructuredVariables.ts] //// + + + +/// [Declarations] //// + + + +//// [dependentDestructuredVariables.d.ts] +type Action = { + kind: 'A'; + payload: number; +} | { + kind: 'B'; + payload: string; +}; +declare function f10({ kind, payload }: Action): void; +declare function f11(action: Action): void; +declare function f12({ kind, payload }: Action): void; +declare function f13({ kind, payload }: T): void; +declare function f14(t: T): void; +type Action2 = { + kind: 'A'; + payload: number | undefined; +} | { + kind: 'B'; + payload: string | undefined; +}; +declare function f20({ kind, payload }: Action2): void; +declare function f21(action: Action2): void; +declare function f22(action: Action2): void; +declare function f23({ kind, payload }: Action2): void; +type Foo = { + kind: 'A'; + isA: true; +} | { + kind: 'B'; + isA: false; +} | { + kind: 'C'; + isA: false; +}; +declare function f30({ kind, isA }: Foo): void; +type Args = ['A', number] | ['B', string]; +declare function f40(...[kind, data]: Args): void; +interface A { + variant: 'a'; + value: T; +} +interface B { + variant: 'b'; + value: Array; +} +type AB = A | B; +declare function printValue(t: T): void; +declare function printValueList(t: Array): void; +declare function unrefined1(ab: AB): void; +type Action3 = { + type: 'add'; + payload: { + toAdd: number; + }; +} | { + type: 'remove'; + payload: { + toRemove: number; + }; +}; +declare const reducerBroken: (state: number, { type, payload }: Action3) => number; +declare var it: Iterator; +declare const dest: IteratorResult; +declare const value: any; +declare const done: boolean | undefined; +declare function f50(cb: (...args: Args) => void): void; +declare const f51: (...args: ['A', number] | ['B', string]) => void; +declare const f52: (...args: ['A', number] | ['B']) => void; +declare function readFile(path: string, callback: (...args: [err: null, data: unknown[]] | [err: Error, data: undefined]) => void): void; +type ReducerArgs = ["add", { + a: number; + b: number; +}] | ["concat", { + firstArr: any[]; + secondArr: any[]; +}]; +declare const reducer: (...args: ReducerArgs) => void; +type FooMethod = { + method(...args: [ + type: "str", + cb: (e: string) => void + ] | [ + type: "num", + cb: (e: number) => void + ]): void; +}; +declare let fooM: FooMethod; +type FooAsyncMethod = { + method(...args: [ + type: "str", + cb: (e: string) => void + ] | [ + type: "num", + cb: (e: number) => void + ]): Promise; +}; +declare let fooAsyncM: FooAsyncMethod; +type FooGenMethod = { + method(...args: [ + type: "str", + cb: (e: string) => void + ] | [ + type: "num", + cb: (e: number) => void + ]): Generator; +}; +declare let fooGenM: FooGenMethod; +type FooAsyncGenMethod = { + method(...args: [ + type: "str", + cb: (e: string) => void + ] | [ + type: "num", + cb: (e: number) => void + ]): AsyncGenerator; +}; +declare let fooAsyncGenM: FooAsyncGenMethod; +type Func = (...args: T) => void; +declare const f60: Func; +declare function foo({ value1, test1, test2, test3, test4, test5, test6, test7, test8, test9 }: { + value1: any; + test1?: any; + test2?: any; + test3?: any; + test4?: any; + test5?: any; + test6?: any; + test7?: any; + test8?: any; + test9?: any; +}): void; +declare function fa1(x: [true, number] | [false, string]): void; +declare function fa2(x: { + guard: true; + value: number; +} | { + guard: false; + value: string; +}): void; +declare const fa3: (...args: [true, number] | [false, string]) => void; +interface ClientEvents { + warn: [message: string]; + shardDisconnect: [closeEvent: CloseEvent, shardId: number]; +} +declare class Client { + on(event: K, listener: (...args: ClientEvents[K]) => void): void; +} +declare const bot: Client; +declare function fz1([x, y]: [1, 2] | [3, 4] | [5]): void; +declare function tooNarrow([x, y]: [1, 1] | [1, 2] | [1]): void; +//# sourceMappingURL=dependentDestructuredVariables.d.ts.map + +/// [Declarations Maps] //// + + +//// [dependentDestructuredVariables.d.ts.map] +{"version":3,"file":"dependentDestructuredVariables.d.ts","sourceRoot":"","sources":["dependentDestructuredVariables.ts"],"names":[],"mappings":"AAAA,KAAK,MAAM,GACL;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAErC,iBAAS,GAAG,CAAC,EAAE,I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FkZCIsIHsNCiAgICBhOiBudW1iZXI7DQogICAgYjogbnVtYmVyOw0KfV0gfCBbImNvbmNhdCIsIHsNCiAgICBmaXJzdEFycjogYW55W107DQogICAgc2Vjb25kQXJyOiBhbnlbXTsNCn1dOw0KZGVjbGFyZSBjb25zdCByZWR1Y2VyOiAoLi4uYXJnczogUmVkdWNlckFyZ3MpID0+IHZvaWQ7DQp0eXBlIEZvb01ldGhvZCA9IHsNCiAgICBtZXRob2QoLi4uYXJnczogWw0KICAgICAgICB0eXBlOiAic3RyIiwNCiAgICAgICAgY2I6IChlOiBzdHJpbmcpID0+IHZvaWQNCiAgICBdIHwgWw0KICAgICAgICB0eXBlOiAibnVtIiwNCiAgICAgICAgY2I6IChlOiBudW1iZXIpID0+IHZvaWQNCiAgICBdKTogdm9pZDsNCn07DQpkZWNsYXJlIGxldCBmb29NOiBGb29NZXRob2Q7DQp0eXBlIEZvb0FzeW5jTWV0aG9kID0gew0KICAgIG1ldGhvZCguLi5hcmdzOiBbDQogICAgICAgIHR5cGU6ICJzdHIiLA0KICAgICAgICBjYjogKGU6IHN0cmluZykgPT4gdm9pZA0KICAgIF0gfCBbDQogICAgICAgIHR5cGU6ICJudW0iLA0KICAgICAgICBjYjogKGU6IG51bWJlcikgPT4gdm9pZA0KICAgIF0pOiBQcm9taXNlPGFueT47DQp9Ow0KZGVjbGFyZSBsZXQgZm9vQXN5bmNNOiBGb29Bc3luY01ldGhvZDsNCnR5cGUgRm9vR2VuTWV0aG9kID0gew0KICAgIG1ldGhvZCguLi5hcmdzOiBbDQogICAgICAgIHR5cGU6ICJzdHIiLA0KICAgICAgICBjYjogKGU6IHN0cmluZykgPT4gdm9pZA0KICAgIF0gfCBbDQogICAgICAgIHR5cGU6ICJudW0iLA0KICAgICAgICBjYjogKGU6IG51bWJlcikgPT4gdm9pZA0KICAgIF0pOiBHZW5lcmF0b3I8YW55LCBhbnksIGFueT47DQp9Ow0KZGVjbGFyZSBsZXQgZm9vR2VuTTogRm9vR2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ICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgcGF5bG9hZC50b1VwcGVyQ2FzZSgpOwogICAgICAgICAgICBicmVhazsKICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICBwYXlsb2FkOyAgLy8gbmV2ZXIKICAgIH0KfQoKLy8gcmVwcm8gIzUwMjA2CmZ1bmN0aW9uIGYxMzxUIGV4dGVuZHMgQWN0aW9uPih7IGtpbmQsIHBheWxvYWQgfTogVCk6IHZvaWQgewogICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgfQogICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgIH0KfQoKZnVuY3Rpb24gZjE0PFQgZXh0ZW5kcyBBY3Rpb24+KHQ6IFQpOiB2b2lkIHsKICAgIGNvbnN0IHsga2luZCwgcGF5bG9hZCB9ID0gdDsKICAgIGlmIChraW5kID09PSAnQScpIHsKICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgIH0KICAgIGlmIChraW5kID09PSAnQicpIHsKICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICB9Cn0KCnR5cGUgQWN0aW9uMiA9CiAgICB8IHsga2luZDogJ0EnLCBwYXlsb2FkOiBudW1iZXIgfCB1bmRlZmluZWQgfQogICAgfCB7IGtpbmQ6ICdCJywgcGF5bG9hZDogc3RyaW5nIHwgdW5kZWZpbmVkIH07CgpmdW5jdGlvbiBmMjAoeyBraW5kLCBwYXlsb2FkIH06IEFjdGlvbjIpOiB2b2lkIHsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjEoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgIGlmIChwYXlsb2FkKSB7CiAgICAgICAgaWYgKGtpbmQgPT09ICdBJykgewogICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICB9CiAgICAgICAgaWYgKGtpbmQgPT09ICdCJykgewogICAgICAgICAgICBwYXlsb2FkLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiBmMjIoYWN0aW9uOiBBY3Rpb24yKTogdm9pZCB7CiAgICBpZiAoYWN0aW9uLnBheWxvYWQpIHsKICAgICAgICBjb25zdCB7IGtpbmQsIHBheWxvYWQgfSA9IGFjdGlvbjsKICAgICAgICBpZiAoa2luZCA9PT0gJ0EnKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9GaXhlZCgpOwogICAgICAgIH0KICAgICAgICBpZiAoa2luZCA9PT0gJ0InKSB7CiAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICB9CiAgICB9Cn0KCmZ1bmN0aW9uIGYyMyh7IGtpbmQsIHBheWxvYWQgfTogQWN0aW9uMik6IHZvaWQgewogICAgaWYgKHBheWxvYWQpIHsKICAgICAgICBzd2l0Y2ggKGtpbmQpIHsKICAgICAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgICAgICBwYXlsb2FkLnRvRml4ZWQoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICdCJzoKICAgICAgICAgICAgICAgIHBheWxvYWQudG9VcHBlckNhc2UoKTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgICAgcGF5bG9hZDsgIC8vIG5ldmVyCiAgICAgICAgfQogICAgfQp9Cgp0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geDsgIC8vIDMKICAgIH0KICAgIGlmICh5ID09PSB1bmRlZmluZWQpIHsKICAgICAgICB4OyAgLy8gNQogICAgfQogICAgaWYgKHggPT09IDEpIHsKICAgICAgICB5OyAgLy8gMgogICAgfQogICAgaWYgKHggPT09IDMpIHsKICAgICAgICB5OyAgLy8gNAogICAgfQogICAgaWYgKHggPT09IDUpIHsKICAgICAgICB5OyAgLy8gdW5kZWZpbmVkCiAgICB9Cn0KCi8vIFJlcHJvIGZyb20gIzU1NjYxCgpmdW5jdGlvbiB0b29OYXJyb3coW3gsIHldOiBbMSwgMV0gfCBbMSwgMl0gfCBbMV0pOiB2b2lkIHsKICAgIGlmICh5ID09PSB1bmRlZmluZWQpIHsKICAgICAgICBjb25zdCBzaG91bGROb3RCZU9rOiBuZXZlciA9IHg7ICAvLyBFcnJvcgogICAgfQp9Cg== + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuredDeclarationEmit.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuredDeclarationEmit.d.ts.map new file mode 100644 index 0000000000000..3ba4603c1214c --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuredDeclarationEmit.d.ts.map @@ -0,0 +1,54 @@ +//// [tests/cases/compiler/destructuredDeclarationEmit.ts] //// + + + +/// [Declarations] //// + + + +//// [foo.d.ts] +declare const foo: { + bar: string; + bat: string; + bam: { + bork: { + bar: string; + baz: string; + }; + }; +}; +declare const arr: [0, 1, 2, ['a', 'b', 'c', [{ + def: 'def'; +}, { + sec: 'sec'; +}]]]; +export { foo, arr }; +//# sourceMappingURL=foo.d.ts.map +//// [index.d.ts] +import { foo, arr } from './foo'; +export { foo, arr }; +declare const baz: string; +declare const ibaz: string; +export { baz, ibaz }; +declare const one: 1; +declare const bee: "b"; +declare const sec: "sec"; +export { one, bee, sec }; +declare const foo2: string; +export { foo2 }; +//# sourceMappingURL=index.d.ts.map + +/// [Declarations Maps] //// + + +//// [foo.d.ts.map] +{"version":3,"file":"foo.d.ts","sourceRoot":"","sources":["foo.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,GAAG;;;;;;;;;CAAwE,CAAC;AAClF,QAAA,MAAM,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IAAC,GAAG,EAAE,KAAK,CAAA;CAAC,EAAE;IAAC,GAAG,EAAE,KAAK,CAAA;CAAC,CAAC,CAAC,CAA4D,CAAC;AAC/H,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCBmb286IHsNCiAgICBiYXI6IHN0cmluZzsNCiAgICBiYXQ6IHN0cmluZzsNCiAgICBiYW06IHsNCiAgICAgICAgYm9yazogew0KICAgICAgICAgICAgYmFyOiBzdHJpbmc7DQogICAgICAgICAgICBiYXo6IHN0cmluZzsNCiAgICAgICAgfTsNCiAgICB9Ow0KfTsNCmRlY2xhcmUgY29uc3QgYXJyOiBbMCwgMSwgMiwgWydhJywgJ2InLCAnYycsIFt7DQogICAgZGVmOiAnZGVmJzsNCn0sIHsNCiAgICBzZWM6ICdzZWMnOw0KfV1dXTsNCmV4cG9ydCB7IGZvbywgYXJyIH07DQovLyMgc291cmNlTWFwcGluZ1VSTD1mb28uZC50cy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJmb28udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsUUFBQSxNQUFNLEdBQUc7Ozs7Ozs7OztDQUF3RSxDQUFDO0FBQ2xGLFFBQUEsTUFBTSxHQUFHLEVBQUUsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLEdBQUcsRUFBRSxHQUFHLEVBQUUsR0FBRyxFQUFFLENBQUM7SUFBQyxHQUFHLEVBQUUsS0FBSyxDQUFBO0NBQUMsRUFBRTtJQUFDLEdBQUcsRUFBRSxLQUFLLENBQUE7Q0FBQyxDQUFDLENBQUMsQ0FBNEQsQ0FBQztBQUMvSCxPQUFPLEVBQUUsR0FBRyxFQUFFLEdBQUcsRUFBRSxDQUFDIn0=,Y29uc3QgZm9vID0geyBiYXI6ICdoZWxsbycsIGJhdDogJ3dvcmxkJywgYmFtOiB7IGJvcms6IHsgYmFyOiAnYScsIGJhejogJ2InIH0gfSB9Owpjb25zdCBhcnI6IFswLCAxLCAyLCBbJ2EnLCAnYicsICdjJywgW3tkZWY6ICdkZWYnfSwge3NlYzogJ3NlYyd9XV1dID0gWzAsIDEsIDIsIFsnYScsICdiJywgJ2MnLCBbe2RlZjogJ2RlZid9LCB7c2VjOiAnc2VjJ31dXV07CmV4cG9ydCB7IGZvbywgYXJyIH07 + + +//// [index.d.ts.map] +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEhB,QAAA,MAAM,GAAG,EAAE,MAAgB,CAAC;AAG5B,QAAA,MAAM,IAAI,EAAE,MAAyB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AAEjB,QAAA,MAAM,GAAG,EAAE,CAAU,CAAC;AACtB,QAAA,MAAM,GAAG,EAAE,GAAe,CAAC;AAC3B,QAAA,MAAM,GAAG,EAAE,KAAwB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAOzB,QAAA,MAAM,IAAI,EAAE,MAAiB,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,aW1wb3J0IHsgZm9vLCBhcnIgfSBmcm9tIC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lCLENBQUM7QUFDOUIsT0FBTyxFQUFFLElBQUksRUFBRSxDQUFDIn0=,aW1wb3J0IHsgZm9vLCBhcnIgfSBmcm9tICcuL2Zvbyc7CmV4cG9ydCB7IGZvbywgYXJyIH07CgogICAgY29uc3QgYmF6OiBzdHJpbmcgPSBmb28uYmFyOwogICAgY29uc3QgYmF0OiBzdHJpbmcgPSBmb28uYmF0OwogICAgY29uc3QgaWJhcjogc3RyaW5nID0gZm9vLmJhbS5ib3JrLmJhcjsKICAgIGNvbnN0IGliYXo6IHN0cmluZyA9IGZvby5iYW0uYm9yay5iYXo7CmV4cG9ydCB7IGJheiwgaWJheiB9OwoKICAgIGNvbnN0IG9uZTogMSA9IGFyclsxXTsKICAgIGNvbnN0IGJlZTogImIiID0gYXJyWzNdWzFdOwogICAgY29uc3Qgc2VjOiAic2VjIiA9IGFyclszXVszXVsxXS5zZWM7CmV4cG9ydCB7IG9uZSwgYmVlLCBzZWMgfTsKCmNvbnN0IGdldEZvbyA9ICgpID0+ICh7CiAgICBmb286ICdmb28nCn0pOwoKY29uc3QgZGVzdCA9IGdldEZvbygpOwpjb25zdCBmb28yOiBzdHJpbmcgPSBkZXN0LmZvbzsKZXhwb3J0IHsgZm9vMiB9Owo= + diff --git a/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringInFunctionType.d.ts b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringInFunctionType.d.ts new file mode 100644 index 0000000000000..957bb9e6e37e7 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/destructuringInFunctionType.d.ts @@ -0,0 +1,178 @@ +//// [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 }]: [ + { + 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 +/// [Errors] //// + +destructuringInFunctionType.ts(18,18): error TS2842: 'b' is an unused renaming of 'a'. Did you intend to use it as a type annotation? +destructuringInFunctionType.ts(18,28): error TS2842: 'a' is an unused renaming of 'b'. Did you intend to use it as a type annotation? + + +==== destructuringInFunctionType.ts (2 errors) ==== + 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 }]: [ + ~ +!!! error TS2842: 'b' is an unused renaming of 'a'. Did you intend to use it as a type annotation? + ~ +!!! error TS2842: 'a' is an unused renaming of 'b'. Did you intend to use it as a type annotation? + { + 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; + \ No newline at end of file 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..bec0423db36b9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/dynamicNamesErrors.d.ts.map @@ -0,0 +1,48 @@ +//// [tests/cases/compiler/dynamicNamesErrors.ts] //// + + + +/// [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;;WAEzB,MAAM;;;CAGhB,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBjb25zdCB4OiB1bmlxdWUgc3ltYm9sOw0KZGVjbGFyZSBjb25zdCB5OiB1bmlxdWUgc3ltYm9sOw0KZGVjbGFyZSBjb25zdCB6OiB1bmlxdWUgc3ltYm9sOw0KZGVjbGFyZSBjb25zdCB3OiB1bmlxdW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nQgY29uc3QgT2JqZWN0TGl0ZXJhbFZpc2liaWxpdHkgPSB7CiAgICBbeF06IDAsCiAgICBbeV0oKTogbnVtYmVyIHsgcmV0dXJuIDA7IH0sCiAgICBnZXQgW3pdKCk6IG51bWJlciB7IHJldHVybiAwOyB9LAogICAgc2V0IFt3XSh2YWx1ZTogbnVtYmVyKSB7IH0sCn07 + 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 b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emitMethodCalledNew.d.ts new file mode 100644 index 0000000000000..7739dc75851d0 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emitMethodCalledNew.d.ts @@ -0,0 +1,31 @@ +//// [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 \ No newline at end of file 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..2840ea8c33183 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emptyTuplesTypeAssertion01.d.ts.map @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion01.ts] //// + + + +/// [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..ae9bb06429ed3 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/emptyTuplesTypeAssertion02.d.ts.map @@ -0,0 +1,21 @@ +//// [tests/cases/conformance/types/tuple/emptyTuples/emptyTuplesTypeAssertion02.ts] //// + + + +/// [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/escapedReservedCompilerNamedIdentifier.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/escapedReservedCompilerNamedIdentifier.d.ts.map new file mode 100644 index 0000000000000..df2dc470e83b2 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/escapedReservedCompilerNamedIdentifier.d.ts.map @@ -0,0 +1,46 @@ +//// [tests/cases/compiler/escapedReservedCompilerNamedIdentifier.ts] //// + + + +/// [Declarations] //// + + + +//// [escapedReservedCompilerNamedIdentifier.d.ts] +declare var __proto__: number; +declare var o: { + __proto__: number; +}; +declare var b: number; +declare var o1: { + __proto__: number; +}; +declare var b1: number; +declare var ___proto__: number; +declare var o2: { + ___proto__: number; +}; +declare var b2: number; +declare var o3: { + ___proto__: number; +}; +declare var b3: number; +declare var _proto__: number; +declare var o4: { + _proto__: number; +}; +declare var b4: number; +declare var o5: { + _proto__: number; +}; +declare var b5: number; +//# sourceMappingURL=escapedReservedCompilerNamedIdentifier.d.ts.map + +/// [Declarations Maps] //// + + +//// [escapedReservedCompilerNamedIdentifier.d.ts.map] +{"version":3,"file":"escapedReservedCompilerNamedIdentifier.d.ts","sourceRoot":"","sources":["escapedReservedCompilerNamedIdentifier.ts"],"names":[],"mappings":"AACA,QAAA,IAAI,SAAS,QAAK,CAAC;AACnB,QAAA,IAAI,CAAC;;CAEJ,CAAC;AACF,QAAA,IAAI,CAAC,EAAE,MAAuB,CAAC;AAC/B,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAwB,CAAC;AAEjC,QAAA,IAAI,UAAU,QAAK,CAAC;AACpB,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAyB,CAAC;AAClC,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAyB,CAAC;AAElC,QAAA,IAAI,QAAQ,QAAK,CAAC;AAClB,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAuB,CAAC;AAChC,QAAA,IAAI,EAAE;;CAEL,CAAC;AACF,QAAA,IAAI,EAAE,EAAE,MAAuB,CAAC"} + +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSB2YX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X18gPSAxMDsKdmFyIG80ID0gewogICAgIl9wcm90b19fIjogMAp9Owp2YXIgYjQ6IG51bWJlciA9IG80WyJfcHJvdG9fXyJdOwp2YXIgbzUgPSB7CiAgICBfcHJvdG9fXzogMAp9Owp2YXIgYjU6IG51bWJlciA9IG81WyJfcHJvdG9fXyJdOw== + 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..4f24f0bdc3a3e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exhaustiveSwitchStatements1.d.ts.map @@ -0,0 +1,93 @@ +//// [tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts] //// + + + +/// [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;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,CAA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cm4gIjEiOwogICAgICAgIGNhc2UgImNpcmNsZSI6CiAgICAgICAgICAgIHN3aXRjaCAoczIua2luZCkgewogICAgICAgICAgICAgICAgY2FzZSAic3F1YXJlIjoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIjIiOwogICAgICAgICAgICAgICAgY2FzZSAiY2lyY2xlIjoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIjMiOwogICAgICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gIm5ldmVyIjsKICAgICAgICAgICAgfQogICAgfQp9CgpmdW5jdGlvbiB3aXRob3V0RGVmYXVsdChzMTogU2hhcGUyLCBzMjogU2hhcGUyKTogc3RyaW5nIHsKICAgIHN3aXRjaCAoczEua2luZCkgewogICAgICAgIGNhc2UgInNxdWFyZSI6CiAgICAgICAgICAgIHJldHVybiAiMSI7CiAgICAgICAgY2FzZSAiY2lyY2xlIjoKICAgICAgICAgICAgc3dpdGNoIChzMi5raW5kKSB7CiAgICAgICAgICAgICAgICBjYXNlICJzcXVhcmUiOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAiMiI7CiAgICAgICAgICAgICAgICBjYXNlICJjaXJjbGUiOgogICAgICAgICAgICAgICAgICAgIHJldHVybiAiMyI7CiAgICAgICAgICAgIH0KICAgIH0KfQoKLy8gUmVwcm8gZnJvbSAjMjA4MjMKCmZ1bmN0aW9uIHRlc3Q0KHZhbHVlOiAxIHwgMik6IHN0cmluZyB7CiAgICBsZXQgeDogc3RyaW5nOwogICAgc3dpdGNoICh2YWx1ZSkgewogICAgICAgIGNhc2UgMTogeCA9ICJvbmUiOyBicmVhazsKICAgICAgICBjYXNlIDI6IHggPSAidHdvIjsgYnJlYWs7CiAgICB9CiAgICByZXR1cm4geDsKfQoKLy8gUmVwcm8gZnJvbSAjMzQ2NjEKCmVudW0gQW5pbWFsIHsgRE9HLCBDQVQgfQoKZGVjbGFyZSBjb25zdCB6b286IHsgYW5pbWFsOiBBbmltY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hwZWN0ZWQKICB9Cn0= + 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..1f640c7ab4c46 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/exportAssignmentMembersVisibleInAugmentation.d.ts @@ -0,0 +1,56 @@ +//// [tests/cases/compiler/exportAssignmentMembersVisibleInAugmentation.ts] //// + +//// [/node_modules/foo/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/flatArrayNoExcessiveStackDepth.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/flatArrayNoExcessiveStackDepth.d.ts.map new file mode 100644 index 0000000000000..ce40821f57e75 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/flatArrayNoExcessiveStackDepth.d.ts.map @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/flatArrayNoExcessiveStackDepth.ts] //// + + + +/// [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,ZGVjbGFyZSBjb25zdCBmb286IHVua25vd25bXTsNCmRlY2xhcmUgY29uc3QgYmFyOiBzdHJpbmdbXTsNCmludGVyZmFjZSBGb28gZXh0ZW5kcyBBcnJheTxzdHJpbmc+IHsNCn0NCmRlY2xhcmUgY29uc3QgcmVwcm9fNDMyNDk6ICh2YWx1ZTogdW5rbm93bikgPT4gdm9pZDsNCmRlY2xhcmUgZnVuY3Rpb24gZjxBcnIsIEQgZXh0ZW5kcyBudW1iZXI+KHg6IEZsYXRBcnJheTxBcnIsIGFueT4sIHk6IEZsYXRBcnJheTxBcnIsIEQ+KTogdm9pZDsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWZsYXRBcnJheU5vRXhjZXNzaXZlU3RhY2tEZXB0aC5kLnR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25zdCBtYXRjaCA9IHZhbHVlLm1hdGNoKC9hbnl0aGluZy8pIHx8IFtdOwogICAgY29uc3QgWywgZXh0cmFjdGVkXSA9IG1hdGNoOwp9OwoKZnVuY3Rpb24gZjxBcnIsIEQgZXh0ZW5kcyBudW1iZXI+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..2a56f64ae4c6e --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/genericContextualTypes1.d.ts.map @@ -0,0 +1,51 @@ +//// [tests/cases/conformance/types/typeRelationships/typeInference/genericContextualTypes1.ts] //// + + + +/// [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,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAExC,OAAO,UAAU,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,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IDxBPihhOiBBW10pID0+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..2bb9046d9f950 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/indexSignatures1.d.ts.map @@ -0,0 +1,210 @@ +//// [tests/cases/conformance/types/members/indexSignatures1.ts] //// + + + +/// [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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ddOiBzdHJpbmcgfSA9IHsgW3N5bV06ICdoZWxsbyAnfTsgIC8vIFBlcm1pdHRlZCBmb3IgYmFja3dhcmRzIGNvbXBhdGliaWxpdHkKY29uc3Qgb2JqMzogeyBba2V5OiBudW1iZXJdOiBzdHJpbmcgfSA9IHsgW3N5bV06ICdoZWxsbyAnfTsgIC8vIEVycm9yCgovLyBSZXBybyBmcm9tICM0NTc3MgoKdHlwZSBJZCA9IHN0cmluZyAmIHsgX190YWc6ICdpZCAnfTsKdHlwZSBSZWMxID0geyBba2V5OiBJZF06IG51bWJlciB9Owp0eXBlIFJlYzIgPSBSZWNvcmQ8SWQsIG51bWJlcj47Cgp0eXBlIEsxID0ga2V5b2YgUmVjMTsgIC8vIElkCnR5cGUgSzIgPSBrZXlvZiBSZWMyOyAgLy8gSWQK + 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..45713968ba9ed --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/intraExpressionInferences.d.ts.map @@ -0,0 +1,162 @@ +//// [tests/cases/conformance/types/typeRelationships/typeInference/intraExpressionInferences.ts] //// + + + +/// [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,KAA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mcpID0+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/isomorphicMappedTypeInference.d.ts.map b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isomorphicMappedTypeInference.d.ts.map new file mode 100644 index 0000000000000..98257113cddb9 --- /dev/null +++ b/tests/baselines/reference/isolated-declarations/auto-fixed/tsc/isomorphicMappedTypeInference.d.ts.map @@ -0,0 +1,120 @@ +//// [tests/cases/conformance/types/mapped/isomorphicMappedTypeInference.ts] //// + + + +/// [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,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xULCBLIGV4dGVuZHMga2V5b2YgVD4ob2JqOiBULCBsaXN0OiBLW10pOiBQaWNrPFQsIEs+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